From dae88784331416120c71258de26cc6fda7969dc1 Mon Sep 17 00:00:00 2001 From: Mahe Tardy Date: Fri, 16 Aug 2024 19:13:19 +0200 Subject: [PATCH] deps: upgrade to Cilium 1.16.1 Signed-off-by: Mahe Tardy --- api/go.mod | 2 +- api/go.sum | 12 +- api/vendor/modules.txt | 2 +- contrib/tetragon-rthooks/go.mod | 2 +- contrib/tetragon-rthooks/go.sum | 4 +- contrib/tetragon-rthooks/vendor/modules.txt | 2 +- go.mod | 106 +- go.sum | 412 +- pkg/k8s/go.mod | 61 +- pkg/k8s/go.sum | 151 +- .../vendor/github.com/cilium/cilium/AUTHORS | 91 +- .../pkg/k8s/slim/k8s/apis/labels/labels.go | 31 + .../pkg/k8s/slim/k8s/apis/labels/selector.go | 73 + .../k8s/apis/labels/zz_generated.deepequal.go | 24 + .../k8s/slim/k8s/apis/meta/v1/generated.proto | 5 +- .../pkg/k8s/slim/k8s/apis/meta/v1/helpers.go | 123 + .../pkg/k8s/slim/k8s/apis/meta/v1/meta.go | 35 +- .../pkg/k8s/slim/k8s/apis/meta/v1/register.go | 28 +- .../pkg/k8s/slim/k8s/apis/meta/v1/types.go | 36 +- .../apis/meta/v1/zz_generated.conversion.go | 23 + .../k8s/apis/meta/v1/zz_generated.defaults.go | 20 + .../cilium/pkg/logging/logfields/logfields.go | 53 + .../cilium/cilium/pkg/logging/logging.go | 5 + .../cilium/cilium/pkg/logging/slog.go | 115 + .../emicklei/go-restful/v3/CHANGES.md | 12 + .../emicklei/go-restful/v3/README.md | 1 - .../emicklei/go-restful/v3/compress.go | 10 + .../emicklei/go-restful/v3/jsr311.go | 2 +- .../vendor/github.com/fatih/color/color.go | 13 +- .../go-openapi/jsonpointer/pointer.go | 2 +- .../github.com/go-openapi/swag/BENCHMARK.md | 52 + .../go-openapi/swag/initialism_index.go | 139 +- .../github.com/go-openapi/swag/name_lexem.go | 70 +- .../github.com/go-openapi/swag/split.go | 470 +- .../go-openapi/swag/string_bytes.go | 8 + .../vendor/github.com/go-openapi/swag/util.go | 198 +- .../vendor/github.com/go-openapi/swag/yaml.go | 3 +- .../github.com/spf13/cobra/.golangci.yml | 21 +- .../github.com/spf13/cobra/active_help.go | 13 +- pkg/k8s/vendor/github.com/spf13/cobra/args.go | 4 +- .../spf13/cobra/bash_completions.go | 25 +- .../vendor/github.com/spf13/cobra/cobra.go | 2 - .../vendor/github.com/spf13/cobra/command.go | 51 +- .../github.com/spf13/cobra/completions.go | 62 +- .../github.com/spf13/cobra/flag_groups.go | 34 +- .../spf13/cobra/powershell_completions.go | 4 +- pkg/k8s/vendor/github.com/spf13/pflag/flag.go | 29 +- pkg/k8s/vendor/github.com/spf13/pflag/ip.go | 3 + .../github.com/spf13/pflag/ipnet_slice.go | 147 + .../github.com/spf13/pflag/string_array.go | 4 - .../vendor/golang.org/x/mod/module/module.go | 2 + .../golang.org/x/net/http/httpguts/httplex.go | 13 +- .../vendor/golang.org/x/net/http2/frame.go | 13 +- .../vendor/golang.org/x/net/http2/http2.go | 19 +- .../vendor/golang.org/x/net/http2/server.go | 105 +- .../vendor/golang.org/x/net/http2/testsync.go | 331 - .../vendor/golang.org/x/net/http2/timer.go | 20 + .../golang.org/x/net/http2/transport.go | 325 +- .../x/net/http2/writesched_priority.go | 4 +- .../x/oauth2/internal/client_appengine.go | 13 - .../golang.org/x/oauth2/internal/transport.go | 5 - .../golang.org/x/sys/unix/asm_zos_s390x.s | 665 +- .../golang.org/x/sys/unix/bpxsvc_zos.go | 657 + .../vendor/golang.org/x/sys/unix/bpxsvc_zos.s | 192 + .../vendor/golang.org/x/sys/unix/epoll_zos.go | 220 - .../golang.org/x/sys/unix/fstatfs_zos.go | 163 - .../vendor/golang.org/x/sys/unix/mkerrors.sh | 2 + .../golang.org/x/sys/unix/mmap_nomremap.go | 2 +- .../golang.org/x/sys/unix/pagesize_unix.go | 2 +- .../x/sys/unix/readdirent_getdirentries.go | 2 +- .../golang.org/x/sys/unix/sockcmsg_zos.go | 58 + .../golang.org/x/sys/unix/symaddr_zos_s390x.s | 75 + .../x/sys/unix/syscall_zos_s390x.go | 1509 +- .../golang.org/x/sys/unix/sysvshm_unix.go | 2 +- .../x/sys/unix/sysvshm_unix_other.go | 2 +- .../golang.org/x/sys/unix/zerrors_linux.go | 29 +- .../x/sys/unix/zerrors_linux_386.go | 1 + .../x/sys/unix/zerrors_linux_amd64.go | 1 + .../x/sys/unix/zerrors_linux_arm64.go | 1 + .../x/sys/unix/zerrors_zos_s390x.go | 233 +- .../x/sys/unix/zsymaddr_zos_s390x.s | 364 + .../x/sys/unix/zsyscall_zos_s390x.go | 3113 +- .../x/sys/unix/zsysnum_linux_386.go | 5 + .../x/sys/unix/zsysnum_linux_amd64.go | 5 + .../x/sys/unix/zsysnum_linux_arm.go | 5 + .../x/sys/unix/zsysnum_linux_arm64.go | 5 + .../x/sys/unix/zsysnum_linux_loong64.go | 5 + .../x/sys/unix/zsysnum_linux_mips.go | 5 + .../x/sys/unix/zsysnum_linux_mips64.go | 5 + .../x/sys/unix/zsysnum_linux_mips64le.go | 5 + .../x/sys/unix/zsysnum_linux_mipsle.go | 5 + .../x/sys/unix/zsysnum_linux_ppc.go | 5 + .../x/sys/unix/zsysnum_linux_ppc64.go | 5 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 5 + .../x/sys/unix/zsysnum_linux_riscv64.go | 5 + .../x/sys/unix/zsysnum_linux_s390x.go | 5 + .../x/sys/unix/zsysnum_linux_sparc64.go | 5 + .../x/sys/unix/zsysnum_zos_s390x.go | 5507 ++-- .../golang.org/x/sys/unix/ztypes_linux.go | 59 +- .../golang.org/x/sys/unix/ztypes_linux_386.go | 8 - .../x/sys/unix/ztypes_linux_amd64.go | 9 - .../golang.org/x/sys/unix/ztypes_linux_arm.go | 9 - .../x/sys/unix/ztypes_linux_arm64.go | 9 - .../x/sys/unix/ztypes_linux_loong64.go | 9 - .../x/sys/unix/ztypes_linux_mips.go | 9 - .../x/sys/unix/ztypes_linux_mips64.go | 9 - .../x/sys/unix/ztypes_linux_mips64le.go | 9 - .../x/sys/unix/ztypes_linux_mipsle.go | 9 - .../golang.org/x/sys/unix/ztypes_linux_ppc.go | 9 - .../x/sys/unix/ztypes_linux_ppc64.go | 9 - .../x/sys/unix/ztypes_linux_ppc64le.go | 9 - .../x/sys/unix/ztypes_linux_riscv64.go | 9 - .../x/sys/unix/ztypes_linux_s390x.go | 9 - .../x/sys/unix/ztypes_linux_sparc64.go | 9 - .../golang.org/x/sys/unix/ztypes_zos_s390x.go | 146 +- .../golang.org/x/sys/windows/aliases.go | 2 +- .../vendor/golang.org/x/sys/windows/empty.s | 8 - .../x/sys/windows/security_windows.go | 1 + .../x/sys/windows/syscall_windows.go | 82 + .../golang.org/x/sys/windows/types_windows.go | 24 + .../x/sys/windows/zsyscall_windows.go | 135 +- .../x/tools/go/gcexportdata/gcexportdata.go | 2 +- .../tools/go/internal/packagesdriver/sizes.go | 1 + .../golang.org/x/tools/go/packages/doc.go | 48 +- .../x/tools/go/packages/external.go | 99 +- .../golang.org/x/tools/go/packages/golist.go | 117 +- .../x/tools/go/packages/packages.go | 297 +- .../x/tools/go/types/objectpath/objectpath.go | 23 +- .../x/tools/internal/aliases/aliases.go | 32 + .../x/tools/internal/aliases/aliases_go121.go | 31 + .../x/tools/internal/aliases/aliases_go122.go | 63 + .../x/tools/internal/event/tag/tag.go | 59 - .../x/tools/internal/gcimporter/gcimporter.go | 7 - .../x/tools/internal/gcimporter/iexport.go | 35 +- .../x/tools/internal/gcimporter/iimport.go | 80 +- .../internal/gcimporter/support_go117.go | 16 - .../internal/gcimporter/support_go118.go | 3 - .../x/tools/internal/gcimporter/unified_no.go | 4 +- .../tools/internal/gcimporter/unified_yes.go | 4 +- .../x/tools/internal/gcimporter/ureader_no.go | 19 - .../tools/internal/gcimporter/ureader_yes.go | 10 +- .../x/tools/internal/gocommand/invoke.go | 109 +- .../x/tools/internal/gocommand/vendor.go | 54 + .../x/tools/internal/gopathwalk/walk.go | 308 +- .../x/tools/internal/imports/fix.go | 287 +- .../x/tools/internal/imports/imports.go | 6 +- .../x/tools/internal/imports/mod.go | 348 +- .../x/tools/internal/imports/mod_cache.go | 119 +- .../x/tools/internal/imports/sortimports.go | 2 +- .../x/tools/internal/imports/zstdlib.go | 11345 ------- .../x/tools/internal/pkgbits/decoder.go | 4 + .../x/tools/internal/stdlib/manifest.go | 17320 +++++++++++ .../x/tools/internal/stdlib/stdlib.go | 97 + .../internal/tokeninternal/tokeninternal.go | 28 +- .../x/tools/internal/typeparams/common.go | 204 - .../x/tools/internal/typeparams/coretype.go | 122 - .../x/tools/internal/typeparams/normalize.go | 218 - .../x/tools/internal/typeparams/termlist.go | 163 - .../x/tools/internal/typeparams/typeterm.go | 169 - .../tools/internal/typesinternal/errorcode.go | 6 +- .../x/tools/internal/typesinternal/recv.go | 43 + .../x/tools/internal/typesinternal/toonew.go | 89 + .../x/tools/internal/typesinternal/types.go | 2 - .../tools/internal/typesinternal/types_118.go | 19 - .../x/tools/internal/versions/features.go | 43 + .../x/tools/internal/versions/toolchain.go | 14 + .../internal/versions/toolchain_go119.go | 14 + .../internal/versions/toolchain_go120.go | 14 + .../internal/versions/toolchain_go121.go | 14 + .../x/tools/internal/versions/types_go121.go | 18 +- .../x/tools/internal/versions/types_go122.go | 25 +- .../{versions_go121.go => versions.go} | 14 +- .../tools/internal/versions/versions_go122.go | 38 - .../google.golang.org/appengine/LICENSE | 202 - .../appengine/internal/api.go | 653 - .../appengine/internal/api_classic.go | 170 - .../appengine/internal/api_common.go | 141 - .../appengine/internal/app_id.go | 28 - .../appengine/internal/base/api_base.pb.go | 308 - .../appengine/internal/base/api_base.proto | 33 - .../internal/datastore/datastore_v3.pb.go | 4367 --- .../internal/datastore/datastore_v3.proto | 551 - .../appengine/internal/identity.go | 54 - .../appengine/internal/identity_classic.go | 62 - .../appengine/internal/identity_flex.go | 12 - .../appengine/internal/identity_vm.go | 134 - .../appengine/internal/internal.go | 110 - .../appengine/internal/log/log_service.pb.go | 1313 - .../appengine/internal/log/log_service.proto | 150 - .../appengine/internal/main.go | 17 - .../appengine/internal/main_common.go | 7 - .../appengine/internal/main_vm.go | 70 - .../appengine/internal/metadata.go | 60 - .../appengine/internal/net.go | 56 - .../appengine/internal/regen.sh | 40 - .../internal/remote_api/remote_api.pb.go | 361 - .../internal/remote_api/remote_api.proto | 44 - .../appengine/internal/transaction.go | 115 - .../internal/urlfetch/urlfetch_service.pb.go | 527 - .../internal/urlfetch/urlfetch_service.proto | 64 - .../appengine/urlfetch/urlfetch.go | 209 - .../protobuf/encoding/prototext/decode.go | 4 +- .../protobuf/encoding/prototext/encode.go | 20 +- .../protobuf/internal/descfmt/stringer.go | 1 + .../editiondefaults/editions_defaults.binpb | Bin 63 -> 93 bytes .../internal/editionssupport/editions.go | 13 + .../protobuf/internal/encoding/tag/tag.go | 4 +- .../protobuf/internal/encoding/text/decode.go | 2 +- .../protobuf/internal/errors/errors.go | 21 +- .../protobuf/internal/filedesc/desc.go | 88 +- .../protobuf/internal/filedesc/desc_init.go | 43 +- .../protobuf/internal/filedesc/desc_lazy.go | 49 +- .../internal/filedesc/desc_list_gen.go | 11 + .../protobuf/internal/filedesc/editions.go | 22 +- .../protobuf/internal/filedesc/placeholder.go | 1 + .../protobuf/internal/filetype/build.go | 4 +- .../protobuf/internal/genid/descriptor_gen.go | 49 +- .../internal/genid/go_features_gen.go | 2 +- .../protobuf/internal/impl/api_export.go | 6 +- .../protobuf/internal/impl/checkinit.go | 2 +- .../protobuf/internal/impl/codec_extension.go | 22 + .../protobuf/internal/impl/codec_field.go | 64 +- .../protobuf/internal/impl/codec_map.go | 15 +- .../internal/impl/codec_messageset.go | 22 + .../protobuf/internal/impl/convert.go | 2 +- .../protobuf/internal/impl/convert_list.go | 2 +- .../protobuf/internal/impl/convert_map.go | 2 +- .../protobuf/internal/impl/encode.go | 48 +- .../protobuf/internal/impl/extension.go | 8 +- .../protobuf/internal/impl/legacy_enum.go | 3 +- .../internal/impl/legacy_extension.go | 2 +- .../protobuf/internal/impl/legacy_file.go | 4 +- .../protobuf/internal/impl/legacy_message.go | 14 +- .../protobuf/internal/impl/message.go | 8 +- .../protobuf/internal/impl/message_reflect.go | 45 +- .../internal/impl/message_reflect_gen.go | 146 +- .../protobuf/internal/impl/pointer_reflect.go | 6 +- .../protobuf/internal/impl/pointer_unsafe.go | 4 +- .../protobuf/internal/order/range.go | 4 +- .../protobuf/internal/version/version.go | 4 +- .../protobuf/proto/decode.go | 2 + .../protobuf/proto/encode.go | 44 +- .../protobuf/proto/extension.go | 17 +- .../protobuf/proto/messageset.go | 7 +- .../google.golang.org/protobuf/proto/size.go | 2 + .../protobuf/reflect/protodesc/desc.go | 13 +- .../protobuf/reflect/protodesc/desc_init.go | 49 +- .../reflect/protodesc/desc_resolve.go | 5 + .../reflect/protodesc/desc_validate.go | 73 +- .../protobuf/reflect/protodesc/editions.go | 11 +- .../protobuf/reflect/protodesc/proto.go | 22 + .../protobuf/reflect/protoreflect/proto.go | 2 +- .../reflect/protoreflect/source_gen.go | 21 + .../protobuf/reflect/protoreflect/type.go | 12 +- .../reflect/protoreflect/value_pure.go | 14 +- .../reflect/protoreflect/value_union.go | 14 +- .../protoreflect/value_unsafe_go120.go | 6 +- .../protoreflect/value_unsafe_go121.go | 8 +- .../reflect/protoregistry/registry.go | 14 +- .../types/descriptorpb/descriptor.pb.go | 1141 +- .../types/gofeaturespb/go_features.pb.go | 122 +- .../types/gofeaturespb/go_features.proto | 28 - .../protobuf/types/known/anypb/any.pb.go | 4 +- .../types/known/durationpb/duration.pb.go | 4 +- .../types/known/timestamppb/timestamp.pb.go | 4 +- .../admissionregistration/v1/generated.pb.go | 6011 +++- .../admissionregistration/v1/generated.proto | 574 +- .../api/admissionregistration/v1/register.go | 4 + .../api/admissionregistration/v1/types.go | 604 +- .../v1/types_swagger_doc_generated.go | 178 +- .../v1/zz_generated.deepcopy.go | 432 + .../v1alpha1/generated.pb.go | 235 +- .../admissionregistration/v1alpha1/types.go | 4 +- .../v1beta1/generated.pb.go | 309 +- .../v1beta1/generated.proto | 15 +- .../admissionregistration/v1beta1/types.go | 19 +- .../v1beta1/types_swagger_doc_generated.go | 4 +- .../vendor/k8s.io/api/apidiscovery/v2}/doc.go | 9 +- .../api/apidiscovery/v2/generated.pb.go | 1742 ++ .../api/apidiscovery/v2/generated.proto | 156 + .../k8s.io/api/apidiscovery/v2}/register.go | 33 +- .../k8s.io/api/apidiscovery/v2/types.go | 155 + .../apidiscovery/v2/zz_generated.deepcopy.go | 190 + .../api/apidiscovery/v2beta1/generated.pb.go | 113 +- .../v1alpha1/generated.pb.go | 119 +- .../v1alpha1/generated.proto | 1 - .../api/apiserverinternal/v1alpha1/types.go | 1 - .../vendor/k8s.io/api/apps/v1/generated.pb.go | 341 +- .../vendor/k8s.io/api/apps/v1/generated.proto | 9 + pkg/k8s/vendor/k8s.io/api/apps/v1/types.go | 9 + .../k8s.io/api/apps/v1beta1/generated.pb.go | 299 +- .../k8s.io/api/apps/v1beta1/generated.proto | 5 + .../vendor/k8s.io/api/apps/v1beta1/types.go | 5 + .../k8s.io/api/apps/v1beta2/generated.pb.go | 365 +- .../k8s.io/api/apps/v1beta2/generated.proto | 9 + .../vendor/k8s.io/api/apps/v1beta2/types.go | 9 + .../api/authentication/v1/generated.pb.go | 154 +- .../api/authentication/v1/generated.proto | 4 + .../k8s.io/api/authentication/v1/types.go | 4 + .../authentication/v1alpha1/generated.pb.go | 59 +- .../authentication/v1beta1/generated.pb.go | 117 +- .../authentication/v1beta1/generated.proto | 3 + .../api/authentication/v1beta1/types.go | 3 + .../api/authorization/v1/generated.pb.go | 177 +- .../api/authorization/v1/generated.proto | 9 + .../k8s.io/api/authorization/v1/types.go | 9 + .../api/authorization/v1beta1/generated.pb.go | 183 +- .../api/authorization/v1beta1/generated.proto | 9 + .../k8s.io/api/authorization/v1beta1/types.go | 9 + .../k8s.io/api/autoscaling/v1/generated.pb.go | 255 +- .../k8s.io/api/autoscaling/v2/generated.pb.go | 243 +- .../api/autoscaling/v2beta1/generated.pb.go | 243 +- .../api/autoscaling/v2beta1/generated.proto | 3 + .../k8s.io/api/autoscaling/v2beta1/types.go | 3 + .../api/autoscaling/v2beta2/generated.pb.go | 255 +- .../api/autoscaling/v2beta2/generated.proto | 4 + .../k8s.io/api/autoscaling/v2beta2/types.go | 4 + .../k8s.io/api/batch/v1/generated.pb.go | 747 +- .../k8s.io/api/batch/v1/generated.proto | 96 +- pkg/k8s/vendor/k8s.io/api/batch/v1/types.go | 112 +- .../batch/v1/types_swagger_doc_generated.go | 37 +- .../api/batch/v1/zz_generated.deepcopy.go | 59 + .../k8s.io/api/batch/v1beta1/generated.pb.go | 115 +- .../api/certificates/v1/generated.pb.go | 133 +- .../api/certificates/v1alpha1/generated.pb.go | 74 +- .../api/certificates/v1beta1/generated.pb.go | 135 +- .../api/coordination/v1/generated.pb.go | 85 +- .../api/coordination/v1beta1/generated.pb.go | 85 +- .../api/core/v1/annotation_key_constants.go | 21 +- .../vendor/k8s.io/api/core/v1/generated.pb.go | 3602 ++- .../vendor/k8s.io/api/core/v1/generated.proto | 278 +- pkg/k8s/vendor/k8s.io/api/core/v1/types.go | 317 +- .../core/v1/types_swagger_doc_generated.go | 84 +- .../api/core/v1/zz_generated.deepcopy.go | 115 +- .../k8s.io/api/discovery/v1/generated.pb.go | 137 +- .../api/discovery/v1beta1/generated.pb.go | 135 +- .../k8s.io/api/events/v1/generated.pb.go | 111 +- .../k8s.io/api/events/v1beta1/generated.pb.go | 111 +- .../api/extensions/v1beta1/generated.pb.go | 447 +- .../api/extensions/v1beta1/generated.proto | 19 + .../k8s.io/api/extensions/v1beta1/types.go | 19 + .../k8s.io/api/flowcontrol/v1/generated.pb.go | 257 +- .../api/flowcontrol/v1beta1/generated.pb.go | 249 +- .../api/flowcontrol/v1beta2/generated.pb.go | 261 +- .../api/flowcontrol/v1beta3/generated.pb.go | 259 +- .../k8s.io/api/networking/v1/generated.pb.go | 275 +- .../k8s.io/api/networking/v1/generated.proto | 9 + .../vendor/k8s.io/api/networking/v1/types.go | 9 + .../api/networking/v1alpha1/generated.pb.go | 109 +- .../api/networking/v1alpha1/generated.proto | 1 + .../k8s.io/api/networking/v1alpha1/types.go | 1 + .../api/networking/v1beta1/generated.pb.go | 202 +- .../api/networking/v1beta1/generated.proto | 5 + .../k8s.io/api/networking/v1beta1/types.go | 5 + .../vendor/k8s.io/api/node/v1/generated.pb.go | 99 +- .../k8s.io/api/node/v1alpha1/generated.pb.go | 103 +- .../k8s.io/api/node/v1beta1/generated.pb.go | 99 +- .../k8s.io/api/policy/v1/generated.pb.go | 125 +- .../k8s.io/api/policy/v1beta1/generated.pb.go | 125 +- .../vendor/k8s.io/api/rbac/v1/generated.pb.go | 137 +- .../vendor/k8s.io/api/rbac/v1/generated.proto | 10 + pkg/k8s/vendor/k8s.io/api/rbac/v1/types.go | 10 + .../k8s.io/api/rbac/v1alpha1/generated.pb.go | 141 +- .../k8s.io/api/rbac/v1alpha1/generated.proto | 10 + .../vendor/k8s.io/api/rbac/v1alpha1/types.go | 10 + .../k8s.io/api/rbac/v1beta1/generated.pb.go | 137 +- .../k8s.io/api/rbac/v1beta1/generated.proto | 10 + .../vendor/k8s.io/api/rbac/v1beta1/types.go | 10 + .../api/resource/v1alpha2/generated.pb.go | 8396 ++++- .../api/resource/v1alpha2/generated.proto | 349 + .../api/resource/v1alpha2/namedresources.go | 127 + .../k8s.io/api/resource/v1alpha2/register.go | 6 + .../k8s.io/api/resource/v1alpha2/types.go | 277 +- .../v1alpha2/types_swagger_doc_generated.go | 179 +- .../v1alpha2/zz_generated.deepcopy.go | 630 +- .../k8s.io/api/scheduling/v1/generated.pb.go | 73 +- .../api/scheduling/v1alpha1/generated.pb.go | 71 +- .../api/scheduling/v1beta1/generated.pb.go | 73 +- .../k8s.io/api/storage/v1/generated.pb.go | 259 +- .../k8s.io/api/storage/v1/generated.proto | 10 +- pkg/k8s/vendor/k8s.io/api/storage/v1/types.go | 10 +- .../storage/v1/types_swagger_doc_generated.go | 4 +- .../api/storage/v1alpha1/generated.pb.go | 160 +- .../api/storage/v1alpha1/generated.proto | 2 - .../k8s.io/api/storage/v1alpha1/types.go | 2 - .../api/storage/v1beta1/generated.pb.go | 259 +- .../api/storage/v1beta1/generated.proto | 7 +- .../k8s.io/api/storage/v1beta1/types.go | 7 +- .../api/storagemigration/v1alpha1/doc.go | 23 + .../storagemigration/v1alpha1/generated.pb.go | 1688 + .../storagemigration/v1alpha1/generated.proto | 127 + .../api/storagemigration/v1alpha1/register.go | 58 + .../api/storagemigration/v1alpha1/types.go | 131 + .../v1alpha1/types_swagger_doc_generated.go | 95 + .../v1alpha1/zz_generated.deepcopy.go | 160 + .../zz_generated.prerelease-lifecycle.go | 58 + .../pkg/apis/apiextensions/types.go | 25 + .../pkg/apis/apiextensions/v1/conversion.go | 26 +- .../pkg/apis/apiextensions/v1/generated.pb.go | 679 +- .../pkg/apis/apiextensions/v1/generated.proto | 38 + .../pkg/apis/apiextensions/v1/types.go | 30 + .../apis/apiextensions/v1/types_jsonschema.go | 52 +- .../v1/zz_generated.conversion.go | 33 + .../apiextensions/v1/zz_generated.deepcopy.go | 21 + .../apiextensions/v1beta1/generated.pb.go | 742 +- .../apiextensions/v1beta1/generated.proto | 46 + .../pkg/apis/apiextensions/v1beta1/types.go | 38 + .../apiextensions/v1beta1/types_jsonschema.go | 52 +- .../v1beta1/zz_generated.conversion.go | 34 + .../v1beta1/zz_generated.deepcopy.go | 26 + .../apiextensions/zz_generated.deepcopy.go | 26 + .../v1/customresourcedefinitionversion.go | 14 + .../apiextensions/v1/selectablefield.go | 39 + .../v1beta1/customresourcedefinitionspec.go | 14 + .../customresourcedefinitionversion.go | 14 + .../apiextensions/v1beta1/selectablefield.go | 39 + .../pkg/api/resource/generated.pb.go | 43 +- .../apimachinery/pkg/api/validation}/OWNERS | 2 - .../pkg/apis/meta/v1/generated.pb.go | 441 +- .../pkg/apis/meta/v1/generated.proto | 22 + .../apimachinery/pkg/apis/meta/v1/types.go | 35 + .../pkg/apis/meta/v1beta1/generated.pb.go | 45 +- .../apimachinery/pkg/runtime/generated.pb.go | 65 +- .../k8s.io/apimachinery/pkg/runtime/helper.go | 12 +- .../pkg/runtime/schema/generated.pb.go | 31 +- .../pkg/util/intstr/generated.pb.go | 47 +- .../pkg/util/managedfields/node.yaml | 2 +- .../k8s.io/apimachinery/pkg/util/sets/doc.go | 2 +- .../apimachinery/pkg/util/sets/ordered.go | 53 - .../k8s.io/apimachinery/pkg/util/sets/set.go | 9 +- .../apimachinery/pkg/util/validation/OWNERS | 11 + .../pkg/util/validation/validation.go | 56 +- .../v1/auditannotation.go | 48 + .../v1/expressionwarning.go | 48 + .../v1/matchresources.go | 90 + .../v1/namedrulewithoperations.go | 94 + .../admissionregistration/v1/paramkind.go | 48 + .../admissionregistration/v1/paramref.go | 71 + .../admissionregistration/v1/typechecking.go | 44 + .../v1/validatingadmissionpolicy.go | 256 + .../v1/validatingadmissionpolicybinding.go | 247 + .../validatingadmissionpolicybindingspec.go | 72 + .../v1/validatingadmissionpolicyspec.go | 117 + .../v1/validatingadmissionpolicystatus.go | 66 + .../admissionregistration/v1/validation.go | 70 + .../admissionregistration/v1/variable.go | 48 + .../applyconfigurations/batch/v1/jobspec.go | 18 + .../batch/v1/successpolicy.go | 44 + .../batch/v1/successpolicyrule.go | 48 + .../core/v1/apparmorprofile.go | 52 + .../core/v1/containerstatus.go | 14 + .../core/v1/noderuntimehandler.go | 48 + .../core/v1/noderuntimehandlerfeatures.go | 39 + .../applyconfigurations/core/v1/nodestatus.go | 14 + .../core/v1/podsecuritycontext.go | 9 + .../core/v1/securitycontext.go | 9 + .../core/v1/servicespec.go | 9 + .../core/v1/volumemount.go | 21 +- .../core/v1/volumemountstatus.go | 70 + .../applyconfigurations/internal/internal.go | 702 +- .../v1alpha2/allocationresultmodel.go | 39 + .../v1alpha2/driverallocationresult.go | 52 + .../resource/v1alpha2/driverrequests.go | 66 + .../namedresourcesallocationresult.go | 39 + .../v1alpha2/namedresourcesattribute.go | 100 + .../v1alpha2/namedresourcesattributevalue.go | 97 + .../resource/v1alpha2/namedresourcesfilter.go | 39 + .../v1alpha2/namedresourcesinstance.go | 53 + .../v1alpha2/namedresourcesintslice.go | 41 + .../v1alpha2/namedresourcesrequest.go | 39 + .../v1alpha2/namedresourcesresources.go | 44 + .../v1alpha2/namedresourcesstringslice.go | 41 + .../v1alpha2/resourceclaimparameters.go | 272 + .../resource/v1alpha2/resourceclass.go | 9 + .../v1alpha2/resourceclassparameters.go | 277 + .../resource/v1alpha2/resourcefilter.go | 48 + .../resource/v1alpha2/resourcefiltermodel.go | 39 + .../resource/v1alpha2/resourcehandle.go | 13 +- .../resource/v1alpha2/resourcemodel.go | 39 + .../resource/v1alpha2/resourcerequest.go | 52 + .../resource/v1alpha2/resourcerequestmodel.go | 39 + .../resource/v1alpha2/resourceslice.go | 265 + .../v1alpha2/structuredresourcehandle.go | 75 + .../resource/v1alpha2/vendorparameters.go | 52 + .../v1alpha1/groupversionresource.go | 57 + .../v1alpha1/migrationcondition.go | 81 + .../v1alpha1/storageversionmigration.go | 256 + .../v1alpha1/storageversionmigrationspec.go | 48 + .../v1alpha1/storageversionmigrationstatus.go | 53 + .../discovery/aggregated_discovery.go | 124 +- .../client-go/discovery/discovery_client.go | 29 +- .../k8s.io/client-go/features/envvar.go | 138 + .../k8s.io/client-go/features/features.go | 143 + .../client-go/features/known_features.go | 54 + .../k8s.io/client-go/kubernetes/clientset.go | 13 + .../vendor/k8s.io/client-go/kubernetes/doc.go | 2 +- .../client-go/kubernetes/scheme/register.go | 2 + .../v1/admissionregistration_client.go | 10 + .../v1/generated_expansion.go | 4 + .../v1/validatingadmissionpolicy.go | 243 + .../v1/validatingadmissionpolicybinding.go | 197 + .../resource/v1alpha2/generated_expansion.go | 6 + .../resource/v1alpha2/resource_client.go | 15 + .../v1alpha2/resourceclaimparameters.go | 208 + .../v1alpha2/resourceclassparameters.go | 208 + .../typed/resource/v1alpha2/resourceslice.go | 197 + .../typed/storagemigration/v1alpha1}/doc.go | 6 +- .../v1alpha1/generated_expansion.go | 5 +- .../v1alpha1/storagemigration_client.go | 107 + .../v1alpha1/storageversionmigration.go | 243 + .../client-go/tools/cache/controller.go | 10 + .../k8s.io/client-go/tools/cache/index.go | 3 +- .../k8s.io/client-go/tools/cache/reflector.go | 18 +- .../client-go/tools/cache/shared_informer.go | 10 +- .../tools/cache/thread_safe_store.go | 92 +- .../client-go/tools/clientcmd/api/doc.go | 2 +- .../client-go/util/flowcontrol/backoff.go | 3 +- .../vendor/k8s.io/code-generator/README.md | 4 + .../cmd/applyconfiguration-gen/args/args.go | 63 +- .../args/externaltypes.go | 2 +- .../generators/applyconfiguration.go | 30 +- .../generators/internal.go | 8 +- .../generators/jsontagutil.go | 2 +- .../generators/openapi.go | 2 +- .../generators/refgraph.go | 8 +- .../generators/{packages.go => targets.go} | 137 +- .../generators/types.go | 2 +- .../applyconfiguration-gen/generators/util.go | 8 +- .../cmd/applyconfiguration-gen/main.go | 26 +- .../cmd/client-gen/args/args.go | 95 +- .../cmd/client-gen/args/gvpackages.go | 4 +- .../client-gen/generators/client_generator.go | 235 +- .../generators/fake/fake_client_generator.go | 93 +- .../fake/generator_fake_for_clientset.go | 21 +- .../fake/generator_fake_for_group.go | 18 +- .../fake/generator_fake_for_type.go | 23 +- .../generators/generator_for_clientset.go | 17 +- .../generators/generator_for_expansion.go | 6 +- .../generators/generator_for_group.go | 22 +- .../generators/generator_for_type.go | 27 +- .../generators/scheme/generator_for_scheme.go | 24 +- .../cmd/client-gen/generators/util/tags.go | 4 +- .../code-generator/cmd/client-gen/main.go | 32 +- .../cmd/client-gen/path/path.go | 31 - .../cmd/client-gen/types/helpers.go | 8 +- .../cmd/conversion-gen/args/args.go | 44 +- .../conversion-gen/generators/conversion.go | 257 +- .../code-generator/cmd/conversion-gen/main.go | 28 +- .../cmd/deepcopy-gen/args/args.go | 36 +- .../cmd}/deepcopy-gen/generators/deepcopy.go | 165 +- .../code-generator/cmd/deepcopy-gen/main.go | 71 +- .../cmd/defaulter-gen/args/args.go | 35 +- .../defaulter-gen/generators/defaulter.go | 241 +- .../code-generator/cmd/defaulter-gen/main.go | 24 +- .../cmd/go-to-protobuf/protobuf/cmd.go | 278 +- .../cmd/go-to-protobuf/protobuf/generator.go | 32 +- .../go-to-protobuf/protobuf/import_tracker.go | 4 +- .../cmd/go-to-protobuf/protobuf/namer.go | 33 +- .../cmd/go-to-protobuf/protobuf/package.go | 54 +- .../cmd/go-to-protobuf/protobuf/parser.go | 30 +- .../cmd/go-to-protobuf/protobuf/tags.go | 4 +- .../code-generator/cmd/import-boss/.gitignore | 1 - .../code-generator/cmd/import-boss/README.md | 97 - .../code-generator/cmd/import-boss/main.go | 45 - .../cmd/informer-gen/args/args.go | 79 +- .../cmd/informer-gen/generators/factory.go | 8 +- .../generators/factoryinterface.go | 8 +- .../cmd/informer-gen/generators/generic.go | 8 +- .../informer-gen/generators/groupinterface.go | 12 +- .../cmd/informer-gen/generators/informer.go | 8 +- .../cmd/informer-gen/generators/targets.go | 206 +- .../cmd/informer-gen/generators/types.go | 2 +- .../generators/versioninterface.go | 8 +- .../code-generator/cmd/informer-gen/main.go | 31 +- .../cmd/lister-gen/args/args.go | 50 +- .../cmd/lister-gen/generators/expansion.go | 18 +- .../cmd/lister-gen/generators/lister.go | 91 +- .../code-generator/cmd/lister-gen/main.go | 28 +- .../code-generator/cmd/openapi-gen/main.go | 57 - .../cmd/register-gen/args/args.go | 27 +- .../generators/register_external.go | 10 +- .../generators/{packages.go => targets.go} | 50 +- .../code-generator/cmd/register-gen/main.go | 23 +- .../code-generator/cmd/set-gen/.gitignore | 1 - .../k8s.io/code-generator/cmd/set-gen/main.go | 53 - .../k8s.io/code-generator/generate-groups.sh | 52 +- .../generate-internal-groups.sh | 280 +- .../k8s.io/code-generator/kube_codegen.sh | 452 +- .../code-generator/pkg/namer/tag-override.go | 7 +- .../k8s.io/code-generator/pkg/util/build.go | 60 - pkg/k8s/vendor/k8s.io/code-generator/tools.go | 3 - pkg/k8s/vendor/k8s.io/gengo/args/args.go | 199 - .../import-boss/generators/import_restrict.go | 443 - .../gengo/examples/set-gen/generators/sets.go | 378 - .../gengo/examples/set-gen/sets/byte.go | 221 - .../k8s.io/gengo/examples/set-gen/sets/int.go | 221 - .../gengo/examples/set-gen/sets/int64.go | 221 - .../gengo/examples/set-gen/sets/string.go | 221 - .../gengo/generator/default_generator.go | 62 - .../k8s.io/gengo/generator/default_package.go | 75 - .../k8s.io/gengo/generator/generator.go | 259 - .../k8s.io/gengo/generator/snippet_writer.go | 154 - .../gengo/generator/transitive_closure.go | 65 - pkg/k8s/vendor/k8s.io/gengo/namer/doc.go | 31 - .../vendor/k8s.io/gengo/namer/plural_namer.go | 120 - pkg/k8s/vendor/k8s.io/gengo/parser/doc.go | 19 - pkg/k8s/vendor/k8s.io/gengo/parser/parse.go | 925 - pkg/k8s/vendor/k8s.io/gengo/types/doc.go | 19 - pkg/k8s/vendor/k8s.io/gengo/types/flatten.go | 57 - pkg/k8s/vendor/k8s.io/gengo/{ => v2}/LICENSE | 0 pkg/k8s/vendor/k8s.io/gengo/v2/README.md | 53 + .../k8s.io/gengo/{types => v2}/comments.go | 21 +- pkg/k8s/vendor/k8s.io/gengo/v2/execute.go | 98 + .../k8s.io/gengo/{ => v2}/generator/doc.go | 2 +- .../gengo/{ => v2}/generator/error_tracker.go | 0 .../gengo/{ => v2}/generator/execute.go | 153 +- .../k8s.io/gengo/v2}/generator/generator.go | 123 +- .../k8s.io/gengo/v2/generator/go_generator.go | 61 + .../{ => v2}/generator/import_tracker.go | 14 +- .../gengo/v2/generator/simple_target.go | 77 + .../gengo/v2}/generator/snippet_writer.go | 18 +- .../k8s/vendor/k8s.io/gengo/v2}/namer/doc.go | 2 +- .../gengo/{ => v2}/namer/import_tracker.go | 4 +- .../k8s.io/gengo/{ => v2}/namer/namer.go | 2 +- .../k8s.io/gengo/{ => v2}/namer/order.go | 2 +- .../k8s.io/gengo/v2}/namer/plural_namer.go | 2 +- .../k8s/vendor/k8s.io/gengo/v2}/parser/doc.go | 2 +- .../vendor/k8s.io/gengo/v2/parser/parse.go | 821 + .../k8s/vendor/k8s.io/gengo/v2}/types/doc.go | 2 +- .../k8s.io/gengo/{ => v2}/types/types.go | 12 +- .../kube-openapi/cmd/openapi-gen/args/args.go | 76 - .../kube-openapi/pkg/generators/README.md | 49 - .../kube-openapi/pkg/generators/api_linter.go | 219 - .../kube-openapi/pkg/generators/config.go | 91 - .../kube-openapi/pkg/generators/enum.go | 162 - .../kube-openapi/pkg/generators/extension.go | 202 - .../kube-openapi/pkg/generators/markers.go | 345 - .../kube-openapi/pkg/generators/openapi.go | 968 - .../kube-openapi/pkg/generators/rules/OWNERS | 4 - .../kube-openapi/pkg/generators/rules/doc.go | 23 - .../pkg/generators/rules/idl_tag.go | 54 - .../pkg/generators/rules/names_match.go | 178 - .../generators/rules/omitempty_match_case.go | 64 - .../kube-openapi/pkg/generators/union.go | 207 - .../kube-openapi/pkg/util/sets/empty.go | 27 - .../kube-openapi/pkg/util/sets/string.go | 207 - .../vendor/k8s.io/utils/integer/integer.go | 73 - pkg/k8s/vendor/k8s.io/utils/trace/trace.go | 2 +- pkg/k8s/vendor/modules.txt | 127 +- .../pkg/crd/markers/validation.go | 20 + .../crd/markers/zz_generated.markerhelp.go | 20 + vendor/cel.dev/expr/.bazelversion | 2 - vendor/cel.dev/expr/.gitattributes | 2 - vendor/cel.dev/expr/.gitignore | 1 - vendor/cel.dev/expr/BUILD.bazel | 3 - vendor/cel.dev/expr/CODE_OF_CONDUCT.md | 25 - vendor/cel.dev/expr/CONTRIBUTING.md | 32 - vendor/cel.dev/expr/GOVERNANCE.md | 43 - vendor/cel.dev/expr/LICENSE | 202 - vendor/cel.dev/expr/MAINTAINERS.md | 13 - vendor/cel.dev/expr/README.md | 65 - vendor/cel.dev/expr/WORKSPACE | 145 - vendor/cel.dev/expr/checked.pb.go | 1432 - vendor/cel.dev/expr/cloudbuild.yaml | 9 - vendor/cel.dev/expr/eval.pb.go | 490 - vendor/cel.dev/expr/explain.pb.go | 236 - vendor/cel.dev/expr/regen_go_proto.sh | 9 - .../expr/regen_go_proto_canonical_protos.sh | 10 - vendor/cel.dev/expr/syntax.pb.go | 1633 - vendor/cel.dev/expr/value.pb.go | 653 - .../github.com/Azure/go-ansiterm/SECURITY.md | 41 + .../antlr/antlr4/runtime/Go/antlr/v4/LICENSE | 26 - .../antlr4/runtime/Go/antlr/v4/antlrdoc.go | 68 - .../antlr4/runtime/Go/antlr/v4/atn_config.go | 303 - .../runtime/Go/antlr/v4/atn_config_set.go | 441 - .../runtime/Go/antlr/v4/input_stream.go | 113 - .../antlr4/runtime/Go/antlr/v4/jcollect.go | 198 - .../runtime/Go/antlr/v4/prediction_context.go | 806 - .../runtime/Go/antlr/v4/prediction_mode.go | 529 - .../runtime/Go/antlr/v4/rule_context.go | 114 - .../antlr4/runtime/Go/antlr/v4/utils_set.go | 235 - .../github.com/antlr4-go/antlr/v4/.gitignore | 18 + vendor/github.com/antlr4-go/antlr/v4/LICENSE | 28 + .../github.com/antlr4-go/antlr/v4/README.md | 54 + .../github.com/antlr4-go/antlr/v4/antlrdoc.go | 102 + .../runtime/Go => antlr4-go}/antlr/v4/atn.go | 9 +- .../antlr4-go/antlr/v4/atn_config.go | 335 + .../antlr4-go/antlr/v4/atn_config_set.go | 301 + .../antlr/v4/atn_deserialization_options.go | 7 +- .../antlr/v4/atn_deserializer.go | 9 +- .../antlr/v4/atn_simulator.go | 17 +- .../Go => antlr4-go}/antlr/v4/atn_state.go | 224 +- .../Go => antlr4-go}/antlr/v4/atn_type.go | 0 .../Go => antlr4-go}/antlr/v4/char_stream.go | 2 +- .../antlr/v4/common_token_factory.go | 0 .../antlr/v4/common_token_stream.go | 39 +- .../Go => antlr4-go}/antlr/v4/comparators.go | 33 +- .../antlr4-go/antlr/v4/configuration.go | 214 + .../runtime/Go => antlr4-go}/antlr/v4/dfa.go | 47 +- .../antlr/v4/dfa_serializer.go | 2 +- .../Go => antlr4-go}/antlr/v4/dfa_state.go | 29 +- .../antlr/v4/diagnostic_error_listener.go | 11 +- .../antlr/v4/error_listener.go | 40 +- .../antlr/v4/error_strategy.go | 450 +- .../Go => antlr4-go}/antlr/v4/errors.go | 73 +- .../Go => antlr4-go}/antlr/v4/file_stream.go | 46 +- .../antlr4-go/antlr/v4/input_stream.go | 157 + .../Go => antlr4-go}/antlr/v4/int_stream.go | 0 .../Go => antlr4-go}/antlr/v4/interval_set.go | 60 +- .../github.com/antlr4-go/antlr/v4/jcollect.go | 685 + .../Go => antlr4-go}/antlr/v4/lexer.go | 68 +- .../Go => antlr4-go}/antlr/v4/lexer_action.go | 100 +- .../antlr/v4/lexer_action_executor.go | 61 +- .../antlr/v4/lexer_atn_simulator.go | 185 +- .../Go => antlr4-go}/antlr/v4/ll1_analyzer.go | 62 +- .../antlr4-go/antlr/v4/nostatistics.go | 47 + .../Go => antlr4-go}/antlr/v4/parser.go | 160 +- .../antlr/v4/parser_atn_simulator.go | 787 +- .../antlr/v4/parser_rule_context.go | 85 +- .../antlr4-go/antlr/v4/prediction_context.go | 727 + .../antlr/v4/prediction_context_cache.go | 48 + .../antlr4-go/antlr/v4/prediction_mode.go | 536 + .../Go => antlr4-go}/antlr/v4/recognizer.go | 65 +- .../antlr4-go/antlr/v4/rule_context.go | 40 + .../antlr/v4/semantic_context.go | 33 +- .../antlr4-go/antlr/v4/statistics.go | 281 + .../antlr4-go/antlr/v4/stats_data.go | 23 + .../Go => antlr4-go}/antlr/v4/token.go | 36 +- .../Go => antlr4-go}/antlr/v4/token_source.go | 0 .../Go => antlr4-go}/antlr/v4/token_stream.go | 3 +- .../antlr/v4/tokenstream_rewriter.go | 221 +- .../antlr/v4/trace_listener.go | 0 .../Go => antlr4-go}/antlr/v4/transition.go | 229 +- .../runtime/Go => antlr4-go}/antlr/v4/tree.go | 109 +- .../Go => antlr4-go}/antlr/v4/trees.go | 22 +- .../Go => antlr4-go}/antlr/v4/utils.go | 84 +- vendor/github.com/armon/go-metrics/.gitignore | 26 - .../github.com/armon/go-metrics/.travis.yml | 13 - vendor/github.com/armon/go-metrics/LICENSE | 20 - vendor/github.com/armon/go-metrics/README.md | 91 - .../github.com/armon/go-metrics/const_unix.go | 12 - .../armon/go-metrics/const_windows.go | 13 - vendor/github.com/armon/go-metrics/inmem.go | 339 - .../armon/go-metrics/inmem_endpoint.go | 162 - .../armon/go-metrics/inmem_signal.go | 117 - vendor/github.com/armon/go-metrics/metrics.go | 299 - vendor/github.com/armon/go-metrics/sink.go | 132 - vendor/github.com/armon/go-metrics/start.go | 158 - vendor/github.com/armon/go-metrics/statsd.go | 184 - .../github.com/armon/go-metrics/statsite.go | 172 - vendor/github.com/cilium/cilium/AUTHORS | 91 +- .../cilium/api/v1/client/bgp/bgp_client.go | 171 - .../v1/client/bgp/get_bgp_peers_parameters.go | 131 - .../v1/client/bgp/get_bgp_peers_responses.go | 233 - .../bgp/get_bgp_route_policies_parameters.go | 169 - .../bgp/get_bgp_route_policies_responses.go | 233 - .../client/bgp/get_bgp_routes_parameters.go | 286 - .../v1/client/bgp/get_bgp_routes_responses.go | 233 - .../cilium/api/v1/client/cilium_api_client.go | 160 - .../api/v1/client/daemon/daemon_client.go | 501 - .../get_cgroup_dump_metadata_parameters.go | 131 - .../get_cgroup_dump_metadata_responses.go | 168 - .../daemon/get_cluster_nodes_parameters.go | 161 - .../daemon/get_cluster_nodes_responses.go | 101 - .../v1/client/daemon/get_config_parameters.go | 131 - .../v1/client/daemon/get_config_responses.go | 101 - .../client/daemon/get_debuginfo_parameters.go | 131 - .../client/daemon/get_debuginfo_responses.go | 168 - .../v1/client/daemon/get_health_parameters.go | 159 - .../v1/client/daemon/get_health_responses.go | 101 - .../client/daemon/get_healthz_parameters.go | 159 - .../v1/client/daemon/get_healthz_responses.go | 101 - .../daemon/get_map_name_events_parameters.go | 189 - .../daemon/get_map_name_events_responses.go | 158 - .../client/daemon/get_map_name_parameters.go | 154 - .../client/daemon/get_map_name_responses.go | 158 - .../v1/client/daemon/get_map_parameters.go | 131 - .../api/v1/client/daemon/get_map_responses.go | 101 - .../client/daemon/get_node_ids_parameters.go | 131 - .../client/daemon/get_node_ids_responses.go | 99 - .../client/daemon/patch_config_parameters.go | 153 - .../client/daemon/patch_config_responses.go | 280 - .../endpoint/delete_endpoint_id_parameters.go | 168 - .../endpoint/delete_endpoint_id_responses.go | 396 - .../endpoint/delete_endpoint_parameters.go | 153 - .../endpoint/delete_endpoint_responses.go | 325 - .../api/v1/client/endpoint/endpoint_client.go | 555 - .../get_endpoint_id_config_parameters.go | 168 - .../get_endpoint_id_config_responses.go | 215 - .../get_endpoint_id_healthz_parameters.go | 168 - .../get_endpoint_id_healthz_responses.go | 272 - .../get_endpoint_id_labels_parameters.go | 168 - .../get_endpoint_id_labels_responses.go | 215 - .../get_endpoint_id_log_parameters.go | 168 - .../endpoint/get_endpoint_id_log_responses.go | 270 - .../endpoint/get_endpoint_id_parameters.go | 168 - .../endpoint/get_endpoint_id_responses.go | 282 - .../endpoint/get_endpoint_parameters.go | 157 - .../client/endpoint/get_endpoint_responses.go | 213 - .../patch_endpoint_id_config_parameters.go | 189 - .../patch_endpoint_id_config_responses.go | 384 - .../patch_endpoint_id_labels_parameters.go | 189 - .../patch_endpoint_id_labels_responses.go | 327 - .../endpoint/patch_endpoint_id_parameters.go | 189 - .../endpoint/patch_endpoint_id_responses.go | 394 - .../endpoint/put_endpoint_id_parameters.go | 189 - .../endpoint/put_endpoint_id_responses.go | 394 - .../client/ipam/delete_ipam_ip_parameters.go | 185 - .../client/ipam/delete_ipam_ip_responses.go | 384 - .../cilium/api/v1/client/ipam/ipam_client.go | 162 - .../v1/client/ipam/post_ipam_ip_parameters.go | 216 - .../v1/client/ipam/post_ipam_ip_responses.go | 384 - .../v1/client/ipam/post_ipam_parameters.go | 248 - .../api/v1/client/ipam/post_ipam_responses.go | 225 - .../client/metrics/get_metrics_parameters.go | 131 - .../client/metrics/get_metrics_responses.go | 156 - .../api/v1/client/metrics/metrics_client.go | 82 - .../policy/delete_fqdn_cache_parameters.go | 166 - .../policy/delete_fqdn_cache_responses.go | 213 - .../client/policy/delete_policy_parameters.go | 153 - .../client/policy/delete_policy_responses.go | 349 - .../policy/get_fqdn_cache_id_parameters.go | 270 - .../policy/get_fqdn_cache_id_responses.go | 223 - .../policy/get_fqdn_cache_parameters.go | 234 - .../client/policy/get_fqdn_cache_responses.go | 223 - .../policy/get_fqdn_names_parameters.go | 131 - .../client/policy/get_fqdn_names_responses.go | 168 - .../get_identity_endpoints_parameters.go | 131 - .../get_identity_endpoints_responses.go | 156 - .../policy/get_identity_id_parameters.go | 155 - .../policy/get_identity_id_responses.go | 349 - .../client/policy/get_identity_parameters.go | 157 - .../client/policy/get_identity_responses.go | 290 - .../api/v1/client/policy/get_ip_parameters.go | 166 - .../api/v1/client/policy/get_ip_responses.go | 223 - .../v1/client/policy/get_policy_parameters.go | 153 - .../v1/client/policy/get_policy_responses.go | 158 - .../policy/get_policy_selectors_parameters.go | 131 - .../policy/get_policy_selectors_responses.go | 99 - .../api/v1/client/policy/policy_client.go | 548 - .../v1/client/policy/put_policy_parameters.go | 232 - .../v1/client/policy/put_policy_responses.go | 359 - .../prefilter/delete_prefilter_parameters.go | 156 - .../prefilter/delete_prefilter_responses.go | 292 - .../prefilter/get_prefilter_parameters.go | 131 - .../prefilter/get_prefilter_responses.go | 168 - .../prefilter/patch_prefilter_parameters.go | 156 - .../prefilter/patch_prefilter_responses.go | 292 - .../v1/client/prefilter/prefilter_client.go | 162 - .../recorder/delete_recorder_id_parameters.go | 155 - .../recorder/delete_recorder_id_responses.go | 270 - .../recorder/get_recorder_id_parameters.go | 155 - .../recorder/get_recorder_id_responses.go | 158 - .../recorder/get_recorder_masks_parameters.go | 131 - .../recorder/get_recorder_masks_responses.go | 99 - .../recorder/get_recorder_parameters.go | 131 - .../client/recorder/get_recorder_responses.go | 99 - .../recorder/put_recorder_id_parameters.go | 179 - .../recorder/put_recorder_id_responses.go | 270 - .../api/v1/client/recorder/recorder_client.go | 243 - .../service/delete_service_id_parameters.go | 155 - .../service/delete_service_id_responses.go | 270 - .../v1/client/service/get_lrp_parameters.go | 131 - .../v1/client/service/get_lrp_responses.go | 99 - .../service/get_service_id_parameters.go | 155 - .../service/get_service_id_responses.go | 158 - .../client/service/get_service_parameters.go | 131 - .../client/service/get_service_responses.go | 99 - .../service/put_service_id_parameters.go | 179 - .../service/put_service_id_responses.go | 471 - .../api/v1/client/service/service_client.go | 243 - .../statedb/get_statedb_dump_parameters.go | 131 - .../statedb/get_statedb_dump_responses.go | 101 - .../get_statedb_query_table_parameters.go | 236 - .../get_statedb_query_table_responses.go | 227 - .../api/v1/client/statedb/statedb_client.go | 123 - .../cilium/cilium/api/v1/flow/README.md | 48 + .../cilium/cilium/api/v1/flow/flow.pb.go | 2330 +- .../cilium/cilium/api/v1/flow/flow.pb.json.go | 311 +- .../cilium/cilium/api/v1/flow/flow.proto | 71 +- .../health/client/cilium_health_api_client.go | 120 - .../connectivity/connectivity_client.go | 130 - .../connectivity/get_status_parameters.go | 131 - .../connectivity/get_status_responses.go | 101 - .../put_status_probe_parameters.go | 131 - .../put_status_probe_responses.go | 225 - .../client/restapi/get_healthz_parameters.go | 131 - .../client/restapi/get_healthz_responses.go | 168 - .../health/client/restapi/restapi_client.go | 87 - .../v1/health/models/connectivity_status.go | 56 - .../api/v1/health/models/endpoint_status.go | 165 - .../cilium/api/v1/health/models/error.go | 30 - .../api/v1/health/models/health_response.go | 153 - .../health/models/health_status_response.go | 168 - .../api/v1/health/models/host_status.go | 166 - .../api/v1/health/models/load_response.go | 59 - .../api/v1/health/models/node_status.go | 204 - .../api/v1/health/models/path_status.go | 157 - .../api/v1/health/models/self_status.go | 53 - .../cilium/api/v1/models/attach_mode.go | 81 + .../cilium/cilium/api/v1/models/b_p_f_map.go | 5 + .../cilium/api/v1/models/b_p_f_map_list.go | 5 + .../cilium/api/v1/models/b_p_f_map_status.go | 5 + .../cilium/api/v1/models/backend_address.go | 3 + .../cilium/cilium/api/v1/models/bgp_path.go | 15 + .../cilium/cilium/api/v1/models/bgp_peer.go | 10 + .../cilium/cilium/api/v1/models/bgp_route.go | 5 + .../cilium/api/v1/models/bgp_route_policy.go | 5 + .../v1/models/bgp_route_policy_statement.go | 5 + .../cilium/api/v1/models/c_id_r_policy.go | 10 + .../api/v1/models/cgroup_dump_metadata.go | 5 + .../api/v1/models/cgroup_pod_metadata.go | 5 + .../api/v1/models/cluster_mesh_status.go | 5 + .../api/v1/models/cluster_node_status.go | 10 + .../api/v1/models/cluster_nodes_response.go | 5 + .../cilium/api/v1/models/cluster_status.go | 10 + .../cilium/api/v1/models/controller_status.go | 10 + .../api/v1/models/controller_statuses.go | 5 + .../api/v1/models/daemon_configuration.go | 10 + .../v1/models/daemon_configuration_spec.go | 4 + .../v1/models/daemon_configuration_status.go | 36 + .../cilium/api/v1/models/datapath_mode.go | 8 +- .../cilium/cilium/api/v1/models/debug_info.go | 30 + .../cilium/api/v1/models/encryption_status.go | 10 + .../cilium/cilium/api/v1/models/endpoint.go | 10 + .../api/v1/models/endpoint_change_request.go | 17 + .../v1/models/endpoint_configuration_spec.go | 9 + .../models/endpoint_configuration_status.go | 13 + .../cilium/api/v1/models/endpoint_health.go | 12 + .../api/v1/models/endpoint_networking.go | 10 + .../cilium/api/v1/models/endpoint_policy.go | 14 + .../api/v1/models/endpoint_policy_status.go | 15 + .../cilium/api/v1/models/endpoint_status.go | 36 + .../api/v1/models/endpoint_status_change.go | 4 + .../api/v1/models/endpoint_status_log.go | 5 + .../cilium/api/v1/models/frontend_mapping.go | 10 + .../cilium/api/v1/models/host_routing.go | 110 - .../cilium/api/v1/models/hubble_status.go | 10 + .../api/v1/models/identity_endpoints.go | 5 + .../cilium/api/v1/models/ip_a_m_response.go | 12 + .../cilium/api/v1/models/ip_a_m_status.go | 4 + .../cilium/api/v1/models/ip_list_entry.go | 5 + .../api/v1/models/kube_proxy_replacement.go | 81 +- .../cilium/cilium/api/v1/models/l4_policy.go | 10 + .../cilium/api/v1/models/l_r_p_backend.go | 5 + .../cilium/cilium/api/v1/models/l_r_p_spec.go | 5 + .../cilium/api/v1/models/label_array.go | 5 + .../api/v1/models/label_configuration.go | 10 + .../v1/models/label_configuration_status.go | 5 + .../cilium/api/v1/models/masquerading.go | 5 + .../cilium/api/v1/models/module_health.go | 65 - .../cilium/api/v1/models/modules_health.go | 119 - .../cilium/api/v1/models/name_manager.go | 5 + .../cilium/api/v1/models/named_ports.go | 5 + .../cilium/api/v1/models/node_addressing.go | 10 + .../cilium/api/v1/models/node_element.go | 20 + .../cilium/cilium/api/v1/models/prefilter.go | 10 + .../cilium/api/v1/models/prefilter_status.go | 5 + .../cilium/api/v1/models/proxy_statistics.go | 5 + .../cilium/api/v1/models/proxy_status.go | 5 + .../cilium/cilium/api/v1/models/recorder.go | 10 + .../cilium/api/v1/models/recorder_mask.go | 5 + .../api/v1/models/recorder_mask_status.go | 5 + .../cilium/api/v1/models/recorder_spec.go | 5 + .../cilium/api/v1/models/recorder_status.go | 5 + .../cilium/api/v1/models/remote_cluster.go | 10 + .../v1/models/request_response_statistics.go | 10 + .../cilium/cilium/api/v1/models/routing.go | 163 + .../cilium/api/v1/models/selector_cache.go | 5 + .../cilium/cilium/api/v1/models/service.go | 10 + .../cilium/api/v1/models/service_spec.go | 11 + .../cilium/api/v1/models/service_status.go | 5 + .../cilium/api/v1/models/status_response.go | 305 +- .../cilium/api/v1/models/trace_selector.go | 10 + .../cilium/cilium/api/v1/models/trace_to.go | 5 + .../api/v1/models/wireguard_interface.go | 5 + .../cilium/api/v1/models/wireguard_status.go | 5 + .../api/v1/models/zz_generated.deepcopy.go | 42 +- .../cilium/pkg/alibabacloud/eni/types/doc.go | 8 - .../pkg/alibabacloud/eni/types/types.go | 203 - .../eni/types/zz_generated.deepcopy.go | 160 - .../eni/types/zz_generated.deepequal.go | 302 - .../cilium/cilium/pkg/allocator/allocator.go | 1069 - .../cilium/cilium/pkg/allocator/cache.go | 381 - .../cilium/cilium/pkg/allocator/doc.go | 5 - .../cilium/cilium/pkg/allocator/localkeys.go | 156 - .../cilium/cilium/pkg/allocator/logfields.go | 10 - .../cilium/cilium/pkg/annotation/k8s.go | 159 - .../cilium/cilium/pkg/api/apidisable.go | 42 - .../cilium/cilium/pkg/api/apierror.go | 66 - .../cilium/cilium/pkg/api/apipanic.go | 43 - .../cilium/cilium/pkg/api/config.go | 137 - .../github.com/cilium/cilium/pkg/api/const.go | 18 - .../github.com/cilium/cilium/pkg/api/doc.go | 5 - .../cilium/cilium/pkg/api/socket.go | 49 - .../cilium/cilium/pkg/aws/eni/types/doc.go | 7 - .../cilium/cilium/pkg/aws/eni/types/types.go | 274 - .../aws/eni/types/zz_generated.deepcopy.go | 176 - .../aws/eni/types/zz_generated.deepequal.go | 361 - .../cilium/cilium/pkg/azure/types/doc.go | 7 - .../cilium/cilium/pkg/azure/types/types.go | 194 - .../pkg/azure/types/zz_generated.deepcopy.go | 69 - .../pkg/azure/types/zz_generated.deepequal.go | 131 - .../cilium/cilium/pkg/backoff/backoff.go | 203 - .../github.com/cilium/cilium/pkg/bpf/bpf.go | 54 - .../cilium/cilium/pkg/bpf/bpf_linux.go | 168 - .../cilium/cilium/pkg/bpf/bpffs_linux.go | 301 - .../cilium/cilium/pkg/bpf/bpffs_migrate.go | 185 - .../cilium/cilium/pkg/bpf/bpfmap.go | 24 - .../cilium/cilium/pkg/bpf/collection.go | 466 - .../github.com/cilium/cilium/pkg/bpf/doc.go | 7 - .../cilium/cilium/pkg/bpf/endpoint.go | 71 - .../cilium/cilium/pkg/bpf/events.go | 286 - .../github.com/cilium/cilium/pkg/bpf/link.go | 47 - .../github.com/cilium/cilium/pkg/bpf/map.go | 77 - .../cilium/cilium/pkg/bpf/map_linux.go | 1206 - .../cilium/pkg/bpf/map_register_linux.go | 69 - .../cilium/cilium/pkg/bpf/metrics.go | 12 - .../cilium/cilium/pkg/bpf/stats_linux.go | 65 - .../cilium/cilium/pkg/byteorder/byteorder.go | 22 - .../pkg/byteorder/byteorder_bigendian.go | 17 - .../pkg/byteorder/byteorder_littleendian.go | 20 - .../cilium/cilium/pkg/byteorder/doc.go | 5 - .../cilium/cilium/pkg/client/client.go | 822 - .../cilium/cilium/pkg/client/config.go | 38 - .../cilium/cilium/pkg/client/endpoint.go | 148 - .../cilium/cilium/pkg/client/identity.go | 21 - .../cilium/cilium/pkg/client/ipam.go | 57 - .../cilium/cilium/pkg/client/lrp.go | 17 - .../cilium/cilium/pkg/client/policy.go | 60 - .../cilium/cilium/pkg/client/prefilter.go | 39 - .../cilium/cilium/pkg/client/recorder.go | 47 - .../cilium/cilium/pkg/client/service.go | 44 - .../cilium/pkg/clustermesh/types/option.go | 34 +- .../cilium/pkg/clustermesh/types/types.go | 43 +- .../cilium/cilium/pkg/command/exec/doc.go | 5 - .../cilium/cilium/pkg/command/exec/exec.go | 124 - .../cilium/cilium/pkg/common/const.go | 15 - .../cilium/cilium/pkg/common/utils.go | 137 - .../cilium/pkg/comparator/comparator.go | 106 - .../cilium/pkg/components/components.go | 25 - .../cilium/pkg/container/ring_buffer.go | 152 - .../cilium/cilium/pkg/controller/cell.go | 74 - .../cilium/pkg/controller/controller.go | 405 - .../cilium/cilium/pkg/controller/doc.go | 6 - .../cilium/cilium/pkg/controller/logfields.go | 26 - .../cilium/cilium/pkg/controller/manager.go | 374 - .../cilium/cilium/pkg/counter/counter.go | 41 - .../cilium/cilium/pkg/counter/doc.go | 5 - .../cilium/cilium/pkg/counter/integer.go | 40 - .../cilium/cilium/pkg/counter/prefixes.go | 171 - .../certificatemanager/certificate_manager.go | 177 - .../pkg/datapath/linux/bandwidth/bandwidth.go | 303 - .../pkg/datapath/linux/bandwidth/cell.go | 72 - .../pkg/datapath/linux/bandwidth/doc.go | 5 - .../pkg/datapath/linux/bandwidth/types.go | 10 - .../datapath/linux/config/defines/defines.go | 52 - .../datapath/linux/probes/attach_cgroup.go | 69 - .../pkg/datapath/linux/probes/attach_type.go | 81 - .../cilium/pkg/datapath/linux/probes/doc.go | 5 - .../pkg/datapath/linux/probes/kernel_hz.go | 151 - .../linux/probes/managed_neighbors.go | 117 - .../pkg/datapath/linux/probes/probes.go | 700 - .../pkg/datapath/linux/probes/probes_linux.go | 12 - .../linux/probes/probes_unspecified.go | 12 - .../pkg/datapath/loader/metrics/metrics.go | 27 - .../cilium/cilium/pkg/datapath/tunnel/cell.go | 53 - .../cilium/pkg/datapath/tunnel/tunnel.go | 221 - .../cilium/pkg/datapath/types/config.go | 131 - .../cilium/pkg/datapath/types/datapath.go | 39 - .../cilium/pkg/datapath/types/endpoint.go | 15 - .../cilium/cilium/pkg/datapath/types/ipsec.go | 10 - .../cilium/cilium/pkg/datapath/types/lbmap.go | 109 - .../cilium/pkg/datapath/types/loader.go | 82 - .../cilium/cilium/pkg/datapath/types/node.go | 153 - .../pkg/datapath/types/node_addressing.go | 44 - .../cilium/pkg/datapath/types/wireguard.go | 17 - .../cilium/cilium/pkg/debug/subsystem.go | 94 - .../cilium/cilium/pkg/defaults/defaults.go | 82 +- .../github.com/cilium/cilium/pkg/ebpf/doc.go | 7 - .../github.com/cilium/cilium/pkg/ebpf/ebpf.go | 13 - .../github.com/cilium/cilium/pkg/ebpf/map.go | 208 - .../cilium/cilium/pkg/ebpf/map_register.go | 57 - .../cilium/cilium/pkg/endpoint/id/id.go | 159 - .../cilium/pkg/endpoint/id/identifiers.go | 8 - .../cilium/pkg/endpoint/regeneration/owner.go | 67 - .../regeneration/regeneration_context.go | 63 - .../cilium/cilium/pkg/eventqueue/doc.go | 6 - .../cilium/pkg/eventqueue/eventqueue.go | 314 - .../cilium/cilium/pkg/fqdn/dns/dns.go | 39 - .../pkg/fqdn/matchpattern/matchpattern.go | 107 - .../cilium/cilium/pkg/fqdn/re/re.go | 81 - .../cilium/cilium/pkg/fqdn/restore/restore.go | 128 - .../cilium/cilium/pkg/health/client/client.go | 424 - .../cilium/pkg/health/client/modules.go | 121 - .../cilium/cilium/pkg/health/client/tree.go | 211 - .../cilium/pkg/health/defaults/defaults.go | 23 - .../cilium/cilium/pkg/hive/cell/cell.go | 58 - .../cilium/cilium/pkg/hive/cell/config.go | 203 - .../cilium/cilium/pkg/hive/cell/decorator.go | 62 - .../cilium/cilium/pkg/hive/cell/group.go | 29 - .../cilium/cilium/pkg/hive/cell/health.go | 309 - .../cilium/cilium/pkg/hive/cell/info.go | 124 - .../cilium/cilium/pkg/hive/cell/invoke.go | 87 - .../cilium/cilium/pkg/hive/cell/lifecycle.go | 226 - .../cilium/cilium/pkg/hive/cell/metric.go | 138 - .../cilium/cilium/pkg/hive/cell/module.go | 161 - .../cilium/cilium/pkg/hive/cell/provide.go | 98 - .../cilium/cilium/pkg/hive/cell/structured.go | 604 - .../cilium/cilium/pkg/hive/command.go | 39 - .../github.com/cilium/cilium/pkg/hive/doc.go | 31 - .../github.com/cilium/cilium/pkg/hive/hive.go | 388 - .../cilium/pkg/hive/internal/reflect.go | 55 - .../cilium/cilium/pkg/hive/metrics/health.go | 27 - .../cilium/cilium/pkg/hive/shutdowner.go | 31 - .../cilium/pkg/hubble/api/v1/interface.go | 22 - .../pkg/hubble/filters/cel_expression.go | 126 + .../pkg/hubble/filters/drop_reason_desc.go | 45 + .../cilium/pkg/hubble/filters/filters.go | 47 +- .../cilium/cilium/pkg/hubble/filters/ip.go | 12 + .../cilium/pkg/hubble/filters/labelparser.go | 110 + .../cilium/pkg/hubble/filters/labels.go | 25 +- .../pkg/hubble/filters/network_interface.go | 44 + .../cilium/cilium/pkg/iana/svcname.go | 20 - .../cilium/pkg/identity/cache/allocator.go | 575 - .../cilium/cilium/pkg/identity/cache/cache.go | 280 - .../cilium/cilium/pkg/identity/cache/local.go | 265 - .../cilium/cilium/pkg/identity/doc.go | 6 - .../cilium/cilium/pkg/identity/identity.go | 310 - .../pkg/identity/identitymanager/doc.go | 6 - .../pkg/identity/identitymanager/log.go | 13 - .../pkg/identity/identitymanager/manager.go | 216 - .../pkg/identity/identitymanager/observer.go | 21 - .../pkg/identity/key/global_identity.go | 72 - .../cilium/pkg/identity/model/identity.go | 44 - .../cilium/pkg/identity/numericidentity.go | 668 - .../cilium/cilium/pkg/identity/reserved.go | 64 - .../cilium/cilium/pkg/idpool/idpool.go | 239 - .../cilium/cilium/pkg/inctimer/inctimer.go | 80 - vendor/github.com/cilium/cilium/pkg/ip/ip.go | 17 +- .../cilium/cilium/pkg/ipam/types/doc.go | 9 - .../cilium/cilium/pkg/ipam/types/types.go | 578 - .../pkg/ipam/types/zz_generated.deepcopy.go | 434 - .../pkg/ipam/types/zz_generated.deepequal.go | 519 - .../cilium/pkg/ipcache/types/entries.go | 35 - .../cilium/cilium/pkg/ipcache/types/types.go | 109 - .../cilium/pkg/k8s/apis/cilium.io/const.go | 97 - .../cilium/pkg/k8s/apis/cilium.io/register.go | 19 - .../pkg/k8s/apis/cilium.io/utils/utils.go | 349 - .../pkg/k8s/apis/cilium.io/v2/ccec_types.go | 39 - .../pkg/k8s/apis/cilium.io/v2/ccnp_types.go | 141 - .../pkg/k8s/apis/cilium.io/v2/cec_types.go | 165 - .../pkg/k8s/apis/cilium.io/v2/cegp_types.go | 118 - .../pkg/k8s/apis/cilium.io/v2/cew_types.go | 84 - .../pkg/k8s/apis/cilium.io/v2/clrp_types.go | 235 - .../pkg/k8s/apis/cilium.io/v2/cnp_types.go | 297 - .../cilium/pkg/k8s/apis/cilium.io/v2/doc.go | 10 - .../pkg/k8s/apis/cilium.io/v2/errors.go | 44 - .../pkg/k8s/apis/cilium.io/v2/logfields.go | 11 - .../pkg/k8s/apis/cilium.io/v2/register.go | 197 - .../cilium/pkg/k8s/apis/cilium.io/v2/types.go | 491 - .../cilium.io/v2/zz_generated.deepcopy.go | 1395 - .../cilium.io/v2/zz_generated.deepequal.go | 1315 - .../cilium.io/v2alpha1/bgp_advert_types.go | 108 - .../cilium.io/v2alpha1/bgp_cluster_types.go | 138 - .../v2alpha1/bgp_node_override_types.go | 104 - .../apis/cilium.io/v2alpha1/bgp_node_types.go | 217 - .../apis/cilium.io/v2alpha1/bgp_peer_types.go | 179 - .../k8s/apis/cilium.io/v2alpha1/bgpp_types.go | 366 - .../cilium.io/v2alpha1/cidrgroups_types.go | 50 - .../k8s/apis/cilium.io/v2alpha1/cnc_types.go | 55 - .../pkg/k8s/apis/cilium.io/v2alpha1/doc.go | 10 - .../apis/cilium.io/v2alpha1/ippool_types.go | 86 - .../v2alpha1/l2announcement_types.go | 109 - .../apis/cilium.io/v2alpha1/lbipam_types.go | 126 - .../k8s/apis/cilium.io/v2alpha1/register.go | 180 - .../pkg/k8s/apis/cilium.io/v2alpha1/types.go | 77 - .../v2alpha1/zz_generated.deepcopy.go | 1877 -- .../v2alpha1/zz_generated.deepequal.go | 1534 - .../cilium/cilium/pkg/k8s/client/cell.go | 510 - .../client/clientset/versioned/clientset.go | 120 - .../versioned/fake/clientset_generated.go | 79 - .../client/clientset/versioned/fake/doc.go | 7 - .../clientset/versioned/fake/register.go | 45 - .../client/clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 45 - .../typed/cilium.io/v2/cilium.io_client.go | 139 - .../v2/ciliumclusterwideenvoyconfig.go | 155 - .../v2/ciliumclusterwidenetworkpolicy.go | 171 - .../cilium.io/v2/ciliumegressgatewaypolicy.go | 155 - .../typed/cilium.io/v2/ciliumendpoint.go | 182 - .../typed/cilium.io/v2/ciliumenvoyconfig.go | 165 - .../cilium.io/v2/ciliumexternalworkload.go | 171 - .../typed/cilium.io/v2/ciliumidentity.go | 155 - .../cilium.io/v2/ciliumlocalredirectpolicy.go | 182 - .../typed/cilium.io/v2/ciliumnetworkpolicy.go | 182 - .../typed/cilium.io/v2/ciliumnode.go | 171 - .../versioned/typed/cilium.io/v2/doc.go | 7 - .../versioned/typed/cilium.io/v2/fake/doc.go | 7 - .../v2/fake/fake_cilium.io_client.go | 63 - .../fake/fake_ciliumclusterwideenvoyconfig.go | 108 - .../fake_ciliumclusterwidenetworkpolicy.go | 119 - .../v2/fake/fake_ciliumegressgatewaypolicy.go | 108 - .../cilium.io/v2/fake/fake_ciliumendpoint.go | 128 - .../v2/fake/fake_ciliumenvoyconfig.go | 116 - .../v2/fake/fake_ciliumexternalworkload.go | 119 - .../cilium.io/v2/fake/fake_ciliumidentity.go | 108 - .../v2/fake/fake_ciliumlocalredirectpolicy.go | 128 - .../v2/fake/fake_ciliumnetworkpolicy.go | 128 - .../cilium.io/v2/fake/fake_ciliumnode.go | 119 - .../typed/cilium.io/v2/generated_expansion.go | 26 - .../cilium.io/v2alpha1/cilium.io_client.go | 149 - .../v2alpha1/ciliumbgpadvertisement.go | 155 - .../v2alpha1/ciliumbgpclusterconfig.go | 155 - .../cilium.io/v2alpha1/ciliumbgpnodeconfig.go | 171 - .../v2alpha1/ciliumbgpnodeconfigoverride.go | 155 - .../cilium.io/v2alpha1/ciliumbgppeerconfig.go | 155 - .../v2alpha1/ciliumbgppeeringpolicy.go | 155 - .../cilium.io/v2alpha1/ciliumcidrgroup.go | 155 - .../cilium.io/v2alpha1/ciliumendpointslice.go | 155 - .../v2alpha1/ciliuml2announcementpolicy.go | 171 - .../v2alpha1/ciliumloadbalancerippool.go | 171 - .../cilium.io/v2alpha1/ciliumnodeconfig.go | 165 - .../cilium.io/v2alpha1/ciliumpodippool.go | 155 - .../versioned/typed/cilium.io/v2alpha1/doc.go | 7 - .../typed/cilium.io/v2alpha1/fake/doc.go | 7 - .../v2alpha1/fake/fake_cilium.io_client.go | 71 - .../fake/fake_ciliumbgpadvertisement.go | 108 - .../fake/fake_ciliumbgpclusterconfig.go | 108 - .../v2alpha1/fake/fake_ciliumbgpnodeconfig.go | 119 - .../fake/fake_ciliumbgpnodeconfigoverride.go | 108 - .../v2alpha1/fake/fake_ciliumbgppeerconfig.go | 108 - .../fake/fake_ciliumbgppeeringpolicy.go | 108 - .../v2alpha1/fake/fake_ciliumcidrgroup.go | 108 - .../v2alpha1/fake/fake_ciliumendpointslice.go | 108 - .../fake/fake_ciliuml2announcementpolicy.go | 119 - .../fake/fake_ciliumloadbalancerippool.go | 119 - .../v2alpha1/fake/fake_ciliumnodeconfig.go | 116 - .../v2alpha1/fake/fake_ciliumpodippool.go | 108 - .../cilium.io/v2alpha1/generated_expansion.go | 30 - .../cilium/cilium/pkg/k8s/client/config.go | 69 - .../cilium/cilium/pkg/k8s/client/getters.go | 57 - .../cilium/cilium/pkg/k8s/constants/const.go | 10 - .../pkg/k8s/identitybackend/identity.go | 416 - .../cilium/pkg/k8s/informer/informer.go | 148 - .../cilium/cilium/pkg/k8s/metrics/metrics.go | 38 - .../pkg/k8s/slim/k8s/api/core/v1/doc.go | 11 - .../k8s/slim/k8s/api/core/v1/generated.pb.go | 10814 ------- .../k8s/slim/k8s/api/core/v1/generated.proto | 970 - .../pkg/k8s/slim/k8s/api/core/v1/register.go | 56 - .../pkg/k8s/slim/k8s/api/core/v1/taint.go | 28 - .../pkg/k8s/slim/k8s/api/core/v1/types.go | 1426 - .../k8s/api/core/v1/zz_generated.deepcopy.go | 1058 - .../k8s/api/core/v1/zz_generated.deepequal.go | 1379 - .../pkg/k8s/slim/k8s/api/discovery/v1/doc.go | 11 - .../slim/k8s/api/discovery/v1/generated.pb.go | 2092 -- .../slim/k8s/api/discovery/v1/generated.proto | 161 - .../k8s/slim/k8s/api/discovery/v1/types.go | 176 - .../k8s/api/discovery/v1/well_known_labels.go | 21 - .../api/discovery/v1/zz_generated.deepcopy.go | 230 - .../discovery/v1/zz_generated.deepequal.go | 284 - .../k8s/slim/k8s/api/discovery/v1beta1/doc.go | 12 - .../k8s/api/discovery/v1beta1/generated.pb.go | 1992 -- .../k8s/api/discovery/v1beta1/generated.proto | 156 - .../slim/k8s/api/discovery/v1beta1/types.go | 180 - .../discovery/v1beta1/well_known_labels.go | 21 - .../v1beta1/zz_generated.deepcopy.go | 220 - .../v1beta1/zz_generated.deepequal.go | 268 - .../pkg/k8s/slim/k8s/api/networking/v1/doc.go | 11 - .../k8s/api/networking/v1/generated.pb.go | 2195 -- .../k8s/api/networking/v1/generated.proto | 191 - .../slim/k8s/api/networking/v1/register.go | 42 - .../k8s/slim/k8s/api/networking/v1/types.go | 209 - .../networking/v1/well_known_annotations.go | 14 - .../networking/v1/zz_generated.deepcopy.go | 255 - .../networking/v1/zz_generated.deepequal.go | 317 - .../clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 43 - .../apiextensions/v1/apiextensions_client.go | 94 - .../v1/customresourcedefinition.go | 155 - .../versioned/typed/apiextensions/v1/doc.go | 7 - .../apiextensions/v1/generated_expansion.go | 8 - .../k8s/apiextensions-clientset/clientset.go | 89 - .../k8s/slim/k8s/apis/apiextensions/v1/doc.go | 14 - .../k8s/apis/apiextensions/v1/generated.pb.go | 568 - .../k8s/apis/apiextensions/v1/generated.proto | 37 - .../k8s/apis/apiextensions/v1/register.go | 43 - .../slim/k8s/apis/apiextensions/v1/types.go | 39 - .../apiextensions/v1/zz_generated.deepcopy.go | 72 - .../pkg/k8s/slim/k8s/apis/labels/labels.go | 31 + .../pkg/k8s/slim/k8s/apis/labels/selector.go | 73 + .../k8s/apis/labels/zz_generated.deepequal.go | 24 + .../k8s/slim/k8s/apis/meta/v1/generated.proto | 5 +- .../pkg/k8s/slim/k8s/apis/meta/v1/helpers.go | 123 + .../pkg/k8s/slim/k8s/apis/meta/v1/meta.go | 35 +- .../pkg/k8s/slim/k8s/apis/meta/v1/register.go | 28 +- .../pkg/k8s/slim/k8s/apis/meta/v1/types.go | 36 +- .../k8s/apis/meta/v1/validation/validation.go | 81 - .../apis/meta/v1/zz_generated.conversion.go | 23 + .../k8s/apis/meta/v1/zz_generated.defaults.go | 20 + .../pkg/k8s/slim/k8s/apis/meta/v1beta1/doc.go | 12 - .../k8s/apis/meta/v1beta1/generated.pb.go | 401 - .../k8s/apis/meta/v1beta1/generated.proto | 28 - .../slim/k8s/apis/meta/v1beta1/register.go | 32 - .../k8s/slim/k8s/apis/meta/v1beta1/types.go | 33 - .../meta/v1beta1/zz_generated.deepcopy.go | 47 - .../pkg/k8s/slim/k8s/apis/util/intstr/doc.go | 8 - .../slim/k8s/apis/util/intstr/generated.pb.go | 356 - .../slim/k8s/apis/util/intstr/generated.proto | 30 - .../k8s/slim/k8s/apis/util/intstr/intstr.go | 221 - .../util/intstr/zz_generated.deepequal.go | 29 - .../client/clientset/versioned/clientset.go | 146 - .../versioned/fake/clientset_generated.go | 93 - .../client/clientset/versioned/fake/doc.go | 7 - .../clientset/versioned/fake/register.go | 49 - .../client/clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 49 - .../versioned/typed/core/v1/core_client.go | 119 - .../clientset/versioned/typed/core/v1/doc.go | 7 - .../versioned/typed/core/v1/endpoints.go | 165 - .../versioned/typed/core/v1/fake/doc.go | 7 - .../typed/core/v1/fake/fake_core_client.go | 47 - .../typed/core/v1/fake/fake_endpoints.go | 116 - .../typed/core/v1/fake/fake_namespace.go | 100 - .../versioned/typed/core/v1/fake/fake_node.go | 119 - .../versioned/typed/core/v1/fake/fake_pod.go | 139 - .../typed/core/v1/fake/fake_secret.go | 116 - .../typed/core/v1/fake/fake_service.go | 120 - .../typed/core/v1/generated_expansion.go | 18 - .../versioned/typed/core/v1/namespace.go | 139 - .../clientset/versioned/typed/core/v1/node.go | 171 - .../clientset/versioned/typed/core/v1/pod.go | 199 - .../versioned/typed/core/v1/secret.go | 165 - .../versioned/typed/core/v1/service.go | 165 - .../typed/discovery/v1/discovery_client.go | 94 - .../versioned/typed/discovery/v1/doc.go | 7 - .../typed/discovery/v1/endpointslice.go | 165 - .../versioned/typed/discovery/v1/fake/doc.go | 7 - .../v1/fake/fake_discovery_client.go | 27 - .../discovery/v1/fake/fake_endpointslice.go | 116 - .../typed/discovery/v1/generated_expansion.go | 8 - .../discovery/v1beta1/discovery_client.go | 94 - .../versioned/typed/discovery/v1beta1/doc.go | 7 - .../typed/discovery/v1beta1/endpointslice.go | 165 - .../typed/discovery/v1beta1/fake/doc.go | 7 - .../v1beta1/fake/fake_discovery_client.go | 27 - .../v1beta1/fake/fake_endpointslice.go | 116 - .../discovery/v1beta1/generated_expansion.go | 8 - .../versioned/typed/networking/v1/doc.go | 7 - .../versioned/typed/networking/v1/fake/doc.go | 7 - .../v1/fake/fake_networking_client.go | 27 - .../networking/v1/fake/fake_networkpolicy.go | 116 - .../networking/v1/generated_expansion.go | 8 - .../typed/networking/v1/networking_client.go | 94 - .../typed/networking/v1/networkpolicy.go | 165 - .../cilium/pkg/k8s/utils/listwatcher.go | 76 - .../cilium/cilium/pkg/k8s/utils/utils.go | 281 - .../cilium/cilium/pkg/k8s/utils/workload.go | 94 - .../cilium/cilium/pkg/k8s/version/version.go | 309 - .../cilium/pkg/kvstore/allocator/allocator.go | 637 - .../cilium/pkg/kvstore/allocator/doc.go | 5 - .../cilium/pkg/kvstore/allocator/logfields.go | 13 - .../cilium/cilium/pkg/kvstore/backend.go | 236 - .../cilium/pkg/kvstore/backwards_compat.go | 31 - .../cilium/cilium/pkg/kvstore/cell.go | 161 - .../cilium/cilium/pkg/kvstore/client.go | 104 - .../cilium/cilium/pkg/kvstore/config.go | 103 - .../cilium/cilium/pkg/kvstore/consul.go | 790 - .../cilium/cilium/pkg/kvstore/doc.go | 6 - .../cilium/cilium/pkg/kvstore/dummy.go | 87 - .../cilium/cilium/pkg/kvstore/etcd.go | 1892 -- .../cilium/cilium/pkg/kvstore/etcd_debug.go | 400 - .../cilium/cilium/pkg/kvstore/etcd_lease.go | 307 - .../cilium/cilium/pkg/kvstore/events.go | 91 - .../cilium/cilium/pkg/kvstore/kvstore.go | 73 - .../cilium/cilium/pkg/kvstore/lock.go | 172 - .../cilium/cilium/pkg/kvstore/logfields.go | 46 - .../cilium/cilium/pkg/kvstore/metrics.go | 53 - .../cilium/cilium/pkg/kvstore/store/cell.go | 45 - .../cilium/cilium/pkg/kvstore/store/doc.go | 17 - .../cilium/pkg/kvstore/store/metrics.go | 38 - .../cilium/cilium/pkg/kvstore/store/store.go | 506 - .../cilium/pkg/kvstore/store/syncstore.go | 360 - .../cilium/pkg/kvstore/store/watchstore.go | 252 - .../cilium/pkg/kvstore/store/watchstoremgr.go | 144 - .../cilium/cilium/pkg/kvstore/trace.go | 24 - .../cilium/pkg/kvstore/watcher_cache.go | 41 - .../cilium/cilium/pkg/labels/array.go | 71 +- .../cilium/cilium/pkg/labels/cidr.go | 153 +- .../cilium/cilium/pkg/labels/labels.go | 147 +- .../cilium/cilium/pkg/labels/oplabels.go | 2 +- .../cilium/cilium/pkg/loadbalancer/doc.go | 8 - .../cilium/pkg/loadbalancer/loadbalancer.go | 824 - .../pkg/loadbalancer/zz_generated.deepcopy.go | 157 - .../loadbalancer/zz_generated.deepequal.go | 66 - .../cilium/pkg/logging/logfields/logfields.go | 53 + .../cilium/cilium/pkg/logging/logging.go | 5 + .../cilium/cilium/pkg/logging/slog.go | 115 + .../cilium/cilium/pkg/mac/mac_linux.go | 23 +- .../cilium/cilium/pkg/mac/mac_unspecified.go | 6 + .../cilium/cilium/pkg/maps/bwmap/bwmap.go | 83 - .../cilium/cilium/pkg/maps/bwmap/doc.go | 7 - .../cilium/pkg/maps/callsmap/callsmap.go | 19 - .../cilium/cilium/pkg/maps/callsmap/doc.go | 8 - .../cilium/cilium/pkg/maps/lxcmap/doc.go | 9 - .../cilium/cilium/pkg/maps/lxcmap/lxcmap.go | 239 - .../cilium/cilium/pkg/metrics/bpf.go | 90 - .../cilium/cilium/pkg/metrics/cell.go | 18 - .../cilium/cilium/pkg/metrics/interfaces.go | 199 - .../cilium/cilium/pkg/metrics/logging_hook.go | 96 - .../pkg/metrics/metric/collections/product.go | 74 - .../cilium/pkg/metrics/metric/counter.go | 205 - .../cilium/cilium/pkg/metrics/metric/gauge.go | 267 - .../cilium/pkg/metrics/metric/histogram.go | 335 - .../cilium/pkg/metrics/metric/metric.go | 343 - .../cilium/cilium/pkg/metrics/metrics.go | 1612 - .../cilium/cilium/pkg/metrics/metrics_unix.go | 30 - .../cilium/pkg/metrics/metrics_windows.go | 8 - .../cilium/cilium/pkg/metrics/middleware.go | 68 - .../cilium/cilium/pkg/metrics/registry.go | 249 - .../cilium/cilium/pkg/metrics/status.go | 162 - .../cilium/cilium/pkg/monitor/api/drop.go | 4 +- .../cilium/cilium/pkg/monitor/api/files.go | 45 + .../cilium/cilium/pkg/mountinfo/mountinfo.go | 115 - .../cilium/pkg/mountinfo/mountinfo_linux.go | 58 - .../pkg/mountinfo/mountinfo_unspecified.go | 24 - .../cilium/cilium/pkg/node/address.go | 631 - .../cilium/cilium/pkg/node/address_linux.go | 242 - .../cilium/cilium/pkg/node/address_other.go | 34 - .../cilium/pkg/node/addressing/addresstype.go | 65 - .../cilium/cilium/pkg/node/bootid.go | 18 - .../cilium/cilium/pkg/node/bootid_linux.go | 20 - .../github.com/cilium/cilium/pkg/node/doc.go | 6 - .../cilium/cilium/pkg/node/host_endpoint.go | 22 - .../github.com/cilium/cilium/pkg/node/ip.go | 14 - .../cilium/cilium/pkg/node/ip_linux.go | 52 - .../cilium/pkg/node/local_node_store.go | 159 - .../cilium/cilium/pkg/node/logfields.go | 11 - .../cilium/cilium/pkg/node/types/logfields.go | 11 - .../cilium/cilium/pkg/node/types/node.go | 664 - .../cilium/cilium/pkg/node/types/nodename.go | 68 - .../pkg/node/types/zz_generated.deepcopy.go | 138 - .../cilium/cilium/pkg/option/.gitignore | 1 + .../cilium/cilium/pkg/option/config.go | 761 +- .../cilium/cilium/pkg/option/daemon.go | 1 + .../cilium/cilium/pkg/option/endpoint.go | 1 + .../cilium/pkg/option/runtime_options.go | 6 + .../cilium/cilium/pkg/policy/api/cidr.go | 200 - .../cilium/cilium/pkg/policy/api/decision.go | 68 - .../cilium/cilium/pkg/policy/api/doc.go | 10 - .../cilium/cilium/pkg/policy/api/egress.go | 370 - .../cilium/cilium/pkg/policy/api/entity.go | 151 - .../cilium/cilium/pkg/policy/api/fqdn.go | 147 - .../cilium/cilium/pkg/policy/api/groups.go | 68 - .../cilium/cilium/pkg/policy/api/http.go | 144 - .../cilium/cilium/pkg/policy/api/icmp.go | 96 - .../cilium/cilium/pkg/policy/api/ingress.go | 215 - .../cilium/cilium/pkg/policy/api/l4.go | 331 - .../cilium/cilium/pkg/policy/api/l7.go | 23 - .../cilium/cilium/pkg/policy/api/rule.go | 244 - .../cilium/pkg/policy/api/rule_validation.go | 495 - .../cilium/cilium/pkg/policy/api/rules.go | 39 - .../cilium/cilium/pkg/policy/api/selector.go | 388 - .../cilium/cilium/pkg/policy/api/service.go | 28 - .../cilium/cilium/pkg/policy/api/utils.go | 172 - .../pkg/policy/api/zz_generated.deepcopy.go | 1080 - .../pkg/policy/api/zz_generated.deepequal.go | 1326 - .../cilium/cilium/pkg/policy/cidr.go | 75 - .../cilium/cilium/pkg/policy/config.go | 71 - .../cilium/cilium/pkg/policy/distillery.go | 241 - .../cilium/cilium/pkg/policy/identifier.go | 86 - .../github.com/cilium/cilium/pkg/policy/l4.go | 1405 - .../cilium/cilium/pkg/policy/mapstate.go | 1456 - .../cilium/cilium/pkg/policy/policy.go | 118 - .../cilium/cilium/pkg/policy/proxyid.go | 49 - .../cilium/cilium/pkg/policy/repository.go | 815 - .../cilium/cilium/pkg/policy/resolve.go | 304 - .../cilium/cilium/pkg/policy/rule.go | 794 - .../cilium/cilium/pkg/policy/rules.go | 160 - .../cilium/cilium/pkg/policy/selectorcache.go | 632 - .../pkg/policy/selectorcache_selector.go | 359 - .../cilium/pkg/policy/trafficdirection/doc.go | 6 - .../trafficdirection/trafficdirection.go | 33 - .../cilium/cilium/pkg/policy/trigger.go | 90 - .../cilium/cilium/pkg/policy/utils.go | 11 - .../cilium/cilium/pkg/policy/visibility.go | 223 - .../cilium/cilium/pkg/promise/promise.go | 143 - .../cilium/pkg/proxy/accesslog/record.go | 303 - .../cilium/cilium/pkg/rand/safe_rand.go | 87 - .../cilium/cilium/pkg/rate/api_limiter.go | 901 - .../github.com/cilium/cilium/pkg/rate/doc.go | 8 - .../cilium/cilium/pkg/rate/limiter.go | 110 - .../cilium/cilium/pkg/rate/metrics/metrics.go | 41 - .../cilium/cilium/pkg/safeio/safeio.go | 77 - .../cilium/cilium/pkg/safetime/doc.go | 6 - .../cilium/cilium/pkg/safetime/safetime.go | 42 - .../cilium/cilium/pkg/slices/slices.go | 6 + .../cilium/cilium/pkg/source/source.go | 100 - .../cilium/cilium/pkg/spanstat/doc.go | 6 - .../cilium/cilium/pkg/spanstat/spanstat.go | 113 - .../cilium/cilium/pkg/stream/observable.go | 59 - .../cilium/cilium/pkg/stream/operators.go | 247 - .../cilium/cilium/pkg/stream/sinks.go | 165 - .../cilium/cilium/pkg/stream/sources.go | 263 - .../cilium/cilium/pkg/sysctl/doc.go | 5 - .../cilium/cilium/pkg/sysctl/sysctl.go | 182 - .../cilium/cilium/pkg/trigger/doc.go | 6 - .../cilium/cilium/pkg/trigger/trigger.go | 221 - .../cilium/cilium/pkg/types/ipv4.go | 45 - .../cilium/cilium/pkg/types/ipv6.go | 41 - .../cilium/cilium/pkg/types/macaddr.go | 24 - .../cilium/cilium/pkg/types/portmap.go | 219 - .../cilium/cilium/pkg/u8proto/u8proto.go | 58 - .../cilium/cilium/pkg/version/version_unix.go | 32 +- .../cilium/pkg/wireguard/types/types.go | 17 - .../cilium/proxy/go/cilium/api/accesslog.go | 19 - .../proxy/go/cilium/api/accesslog.pb.go | 860 - .../go/cilium/api/accesslog.pb.validate.go | 810 - .../proxy/go/cilium/api/bpf_metadata.pb.go | 250 - .../go/cilium/api/bpf_metadata.pb.validate.go | 151 - .../go/cilium/api/health_check_sink.pb.go | 157 - .../api/health_check_sink.pb.validate.go | 149 - .../cilium/proxy/go/cilium/api/l7policy.pb.go | 167 - .../go/cilium/api/l7policy.pb.validate.go | 139 - .../proxy/go/cilium/api/network_filter.pb.go | 183 - .../cilium/api/network_filter.pb.validate.go | 142 - .../cilium/proxy/go/cilium/api/npds.pb.go | 1772 -- .../proxy/go/cilium/api/npds.pb.validate.go | 1971 -- .../cilium/proxy/go/cilium/api/nphds.pb.go | 362 - .../proxy/go/cilium/api/nphds.pb.validate.go | 171 - .../proxy/go/cilium/api/tls_wrapper.pb.go | 194 - .../go/cilium/api/tls_wrapper.pb.validate.go | 241 - .../proxy/go/cilium/api/websocket.pb.go | 411 - .../go/cilium/api/websocket.pb.validate.go | 389 - .../go/envoy/annotations/deprecation.pb.go | 164 - .../annotations/deprecation.pb.validate.go | 36 - .../proxy/go/envoy/annotations/resource.pb.go | 184 - .../envoy/annotations/resource.pb.validate.go | 140 - .../go/envoy/config/core/v3/address.pb.go | 1095 - .../config/core/v3/address.pb.validate.go | 1449 - .../go/envoy/config/core/v3/backoff.pb.go | 198 - .../config/core/v3/backoff.pb.validate.go | 207 - .../proxy/go/envoy/config/core/v3/base.pb.go | 2636 -- .../envoy/config/core/v3/base.pb.validate.go | 3316 -- .../envoy/config/core/v3/config_source.pb.go | 1203 - .../core/v3/config_source.pb.validate.go | 1344 - .../config/core/v3/event_service_config.pb.go | 205 - .../v3/event_service_config.pb.validate.go | 196 - .../go/envoy/config/core/v3/extension.pb.go | 190 - .../config/core/v3/extension.pb.validate.go | 164 - .../config/core/v3/grpc_method_list.pb.go | 251 - .../core/v3/grpc_method_list.pb.validate.go | 294 - .../envoy/config/core/v3/grpc_service.pb.go | 1769 -- .../core/v3/grpc_service.pb.validate.go | 2518 -- .../envoy/config/core/v3/health_check.pb.go | 1670 - .../core/v3/health_check.pb.validate.go | 2259 -- .../go/envoy/config/core/v3/http_uri.pb.go | 240 - .../config/core/v3/http_uri.pb.validate.go | 226 - .../go/envoy/config/core/v3/protocol.pb.go | 2382 -- .../config/core/v3/protocol.pb.validate.go | 2975 -- .../envoy/config/core/v3/proxy_protocol.pb.go | 375 - .../core/v3/proxy_protocol.pb.validate.go | 290 - .../go/envoy/config/core/v3/resolver.pb.go | 270 - .../config/core/v3/resolver.pb.validate.go | 318 - .../envoy/config/core/v3/socket_option.pb.go | 409 - .../core/v3/socket_option.pb.validate.go | 330 - .../core/v3/substitution_format_string.pb.go | 363 - .../substitution_format_string.pb.validate.go | 311 - .../config/core/v3/udp_socket_config.pb.go | 195 - .../core/v3/udp_socket_config.pb.validate.go | 180 - .../go/envoy/config/route/v3/route.pb.go | 566 - .../config/route/v3/route.pb.validate.go | 663 - .../config/route/v3/route_components.pb.go | 9015 ------ .../route/v3/route_components.pb.validate.go | 12142 -------- .../envoy/config/route/v3/scoped_route.pb.go | 469 - .../route/v3/scoped_route.pb.validate.go | 504 - .../go/envoy/service/discovery/v3/ads.pb.go | 373 - .../service/discovery/v3/ads.pb.validate.go | 135 - .../service/discovery/v3/discovery.pb.go | 1698 - .../discovery/v3/discovery.pb.validate.go | 2138 -- .../envoy/type/matcher/v3/filter_state.pb.go | 208 - .../matcher/v3/filter_state.pb.validate.go | 207 - .../envoy/type/matcher/v3/http_inputs.pb.go | 457 - .../matcher/v3/http_inputs.pb.validate.go | 614 - .../go/envoy/type/matcher/v3/metadata.pb.go | 308 - .../type/matcher/v3/metadata.pb.validate.go | 377 - .../proxy/go/envoy/type/matcher/v3/node.pb.go | 194 - .../envoy/type/matcher/v3/node.pb.validate.go | 198 - .../go/envoy/type/matcher/v3/number.pb.go | 218 - .../type/matcher/v3/number.pb.validate.go | 207 - .../proxy/go/envoy/type/matcher/v3/path.pb.go | 202 - .../envoy/type/matcher/v3/path.pb.validate.go | 204 - .../go/envoy/type/matcher/v3/regex.pb.go | 420 - .../type/matcher/v3/regex.pb.validate.go | 478 - .../type/matcher/v3/status_code_input.pb.go | 209 - .../v3/status_code_input.pb.validate.go | 246 - .../go/envoy/type/matcher/v3/string.pb.go | 379 - .../type/matcher/v3/string.pb.validate.go | 439 - .../go/envoy/type/matcher/v3/struct.pb.go | 334 - .../type/matcher/v3/struct.pb.validate.go | 363 - .../go/envoy/type/matcher/v3/value.pb.go | 468 - .../type/matcher/v3/value.pb.validate.go | 604 - .../go/envoy/type/metadata/v3/metadata.pb.go | 688 - .../type/metadata/v3/metadata.pb.validate.go | 1024 - .../go/envoy/type/tracing/v3/custom_tag.pb.go | 614 - .../type/tracing/v3/custom_tag.pb.validate.go | 846 - .../proxy/go/envoy/type/v3/hash_policy.pb.go | 338 - .../envoy/type/v3/hash_policy.pb.validate.go | 450 - .../cilium/proxy/go/envoy/type/v3/http.pb.go | 149 - .../go/envoy/type/v3/http.pb.validate.go | 36 - .../proxy/go/envoy/type/v3/http_status.pb.go | 463 - .../envoy/type/v3/http_status.pb.validate.go | 161 - .../proxy/go/envoy/type/v3/percent.pb.go | 321 - .../go/envoy/type/v3/percent.pb.validate.go | 260 - .../cilium/proxy/go/envoy/type/v3/range.pb.go | 329 - .../go/envoy/type/v3/range.pb.validate.go | 345 - .../go/envoy/type/v3/ratelimit_strategy.pb.go | 412 - .../type/v3/ratelimit_strategy.pb.validate.go | 380 - .../go/envoy/type/v3/ratelimit_unit.pb.go | 170 - .../type/v3/ratelimit_unit.pb.validate.go | 36 - .../go/envoy/type/v3/semantic_version.pb.go | 186 - .../type/v3/semantic_version.pb.validate.go | 142 - .../proxy/go/envoy/type/v3/token_bucket.pb.go | 209 - .../envoy/type/v3/token_bucket.pb.validate.go | 202 - .../cilium/proxy/pkg/policy/api/kafka/doc.go | 9 - .../proxy/pkg/policy/api/kafka/kafka.go | 318 - .../api/kafka/zz_generated.deepequal.go | 35 - vendor/github.com/cncf/xds/go/LICENSE | 201 - .../xds/go/udpa/annotations/migrate.pb.go | 411 - .../udpa/annotations/migrate.pb.validate.go | 350 - .../xds/go/udpa/annotations/security.pb.go | 196 - .../udpa/annotations/security.pb.validate.go | 142 - .../xds/go/udpa/annotations/sensitive.pb.go | 93 - .../udpa/annotations/sensitive.pb.validate.go | 36 - .../cncf/xds/go/udpa/annotations/status.pb.go | 253 - .../go/udpa/annotations/status.pb.validate.go | 140 - .../xds/go/udpa/annotations/versioning.pb.go | 179 - .../annotations/versioning.pb.validate.go | 140 - .../xds/go/xds/annotations/v3/migrate.pb.go | 412 - .../xds/annotations/v3/migrate.pb.validate.go | 350 - .../xds/go/xds/annotations/v3/security.pb.go | 197 - .../annotations/v3/security.pb.validate.go | 142 - .../xds/go/xds/annotations/v3/sensitive.pb.go | 93 - .../annotations/v3/sensitive.pb.validate.go | 36 - .../xds/go/xds/annotations/v3/status.pb.go | 495 - .../xds/annotations/v3/status.pb.validate.go | 452 - .../go/xds/annotations/v3/versioning.pb.go | 179 - .../annotations/v3/versioning.pb.validate.go | 140 - .../cncf/xds/go/xds/core/v3/authority.pb.go | 153 - .../go/xds/core/v3/authority.pb.validate.go | 146 - .../cncf/xds/go/xds/core/v3/cidr.pb.go | 172 - .../xds/go/xds/core/v3/cidr.pb.validate.go | 161 - .../xds/go/xds/core/v3/collection_entry.pb.go | 297 - .../core/v3/collection_entry.pb.validate.go | 383 - .../xds/go/xds/core/v3/context_params.pb.go | 160 - .../xds/core/v3/context_params.pb.validate.go | 138 - .../cncf/xds/go/xds/core/v3/extension.pb.go | 167 - .../go/xds/core/v3/extension.pb.validate.go | 164 - .../cncf/xds/go/xds/core/v3/resource.pb.go | 182 - .../go/xds/core/v3/resource.pb.validate.go | 195 - .../xds/go/xds/core/v3/resource_locator.pb.go | 406 - .../core/v3/resource_locator.pb.validate.go | 439 - .../xds/go/xds/core/v3/resource_name.pb.go | 190 - .../xds/core/v3/resource_name.pb.validate.go | 179 - .../cncf/xds/go/xds/type/matcher/v3/cel.pb.go | 172 - .../go/xds/type/matcher/v3/cel.pb.validate.go | 177 - .../xds/go/xds/type/matcher/v3/domain.pb.go | 242 - .../xds/type/matcher/v3/domain.pb.validate.go | 315 - .../go/xds/type/matcher/v3/http_inputs.pb.go | 143 - .../matcher/v3/http_inputs.pb.validate.go | 139 - .../cncf/xds/go/xds/type/matcher/v3/ip.pb.go | 256 - .../go/xds/type/matcher/v3/ip.pb.validate.go | 347 - .../xds/go/xds/type/matcher/v3/matcher.pb.go | 1060 - .../type/matcher/v3/matcher.pb.validate.go | 1913 -- .../xds/go/xds/type/matcher/v3/range.pb.go | 539 - .../xds/type/matcher/v3/range.pb.validate.go | 975 - .../xds/go/xds/type/matcher/v3/regex.pb.go | 242 - .../xds/type/matcher/v3/regex.pb.validate.go | 317 - .../xds/go/xds/type/matcher/v3/string.pb.go | 353 - .../xds/type/matcher/v3/string.pb.validate.go | 481 - .../cncf/xds/go/xds/type/v3/cel.pb.go | 330 - .../xds/go/xds/type/v3/cel.pb.validate.go | 450 - .../cncf/xds/go/xds/type/v3/range.pb.go | 298 - .../xds/go/xds/type/v3/range.pb.validate.go | 345 - .../xds/go/xds/type/v3/typed_struct.pb.go | 163 - .../xds/type/v3/typed_struct.pb.validate.go | 166 - vendor/github.com/coreos/go-semver/LICENSE | 202 - vendor/github.com/coreos/go-semver/NOTICE | 5 - .../coreos/go-semver/semver/semver.go | 296 - .../coreos/go-semver/semver/sort.go | 38 - .../coreos/go-systemd/v22/journal/journal.go | 46 - .../go-systemd/v22/journal/journal_unix.go | 267 - .../go-systemd/v22/journal/journal_windows.go | 43 - .../emicklei/go-restful/v3/CHANGES.md | 12 + .../emicklei/go-restful/v3/README.md | 1 - .../emicklei/go-restful/v3/compress.go | 10 + .../emicklei/go-restful/v3/jsr311.go | 2 +- .../envoyproxy/protoc-gen-validate/LICENSE | 202 - .../protoc-gen-validate/validate/BUILD | 74 - .../protoc-gen-validate/validate/validate.h | 183 - .../validate/validate.pb.go | 4106 --- .../validate/validate.proto | 862 - .../json-patch/v5/internal/json/decode.go | 1385 + .../json-patch/v5/internal/json/encode.go | 1486 + .../json-patch/v5/internal/json/fold.go | 141 + .../json-patch/v5/internal/json/fuzz.go | 42 + .../json-patch/v5/internal/json/indent.go | 143 + .../json-patch/v5/internal/json/scanner.go | 610 + .../json-patch/v5/internal/json/stream.go | 495 + .../json-patch/v5/internal/json/tables.go | 218 + .../json-patch/v5/internal/json/tags.go | 38 + .../github.com/evanphx/json-patch/v5/merge.go | 110 +- .../github.com/evanphx/json-patch/v5/patch.go | 389 +- vendor/github.com/go-ole/go-ole/.travis.yml | 8 - vendor/github.com/go-ole/go-ole/ChangeLog.md | 49 - vendor/github.com/go-ole/go-ole/LICENSE | 21 - vendor/github.com/go-ole/go-ole/README.md | 46 - vendor/github.com/go-ole/go-ole/appveyor.yml | 54 - vendor/github.com/go-ole/go-ole/com.go | 344 - vendor/github.com/go-ole/go-ole/com_func.go | 174 - vendor/github.com/go-ole/go-ole/connect.go | 192 - vendor/github.com/go-ole/go-ole/constants.go | 153 - vendor/github.com/go-ole/go-ole/error.go | 51 - vendor/github.com/go-ole/go-ole/error_func.go | 8 - .../github.com/go-ole/go-ole/error_windows.go | 24 - vendor/github.com/go-ole/go-ole/guid.go | 284 - .../go-ole/go-ole/iconnectionpoint.go | 20 - .../go-ole/go-ole/iconnectionpoint_func.go | 21 - .../go-ole/go-ole/iconnectionpoint_windows.go | 43 - .../go-ole/iconnectionpointcontainer.go | 17 - .../go-ole/iconnectionpointcontainer_func.go | 11 - .../iconnectionpointcontainer_windows.go | 25 - vendor/github.com/go-ole/go-ole/idispatch.go | 94 - .../go-ole/go-ole/idispatch_func.go | 19 - .../go-ole/go-ole/idispatch_windows.go | 202 - .../github.com/go-ole/go-ole/ienumvariant.go | 19 - .../go-ole/go-ole/ienumvariant_func.go | 19 - .../go-ole/go-ole/ienumvariant_windows.go | 63 - .../github.com/go-ole/go-ole/iinspectable.go | 18 - .../go-ole/go-ole/iinspectable_func.go | 15 - .../go-ole/go-ole/iinspectable_windows.go | 72 - .../go-ole/go-ole/iprovideclassinfo.go | 21 - .../go-ole/go-ole/iprovideclassinfo_func.go | 7 - .../go-ole/iprovideclassinfo_windows.go | 21 - vendor/github.com/go-ole/go-ole/itypeinfo.go | 34 - .../go-ole/go-ole/itypeinfo_func.go | 7 - .../go-ole/go-ole/itypeinfo_windows.go | 21 - vendor/github.com/go-ole/go-ole/iunknown.go | 57 - .../github.com/go-ole/go-ole/iunknown_func.go | 19 - .../go-ole/go-ole/iunknown_windows.go | 58 - vendor/github.com/go-ole/go-ole/ole.go | 190 - .../go-ole/go-ole/oleutil/connection.go | 100 - .../go-ole/go-ole/oleutil/connection_func.go | 10 - .../go-ole/oleutil/connection_windows.go | 58 - .../go-ole/go-ole/oleutil/go-get.go | 6 - .../go-ole/go-ole/oleutil/oleutil.go | 127 - vendor/github.com/go-ole/go-ole/safearray.go | 27 - .../go-ole/go-ole/safearray_func.go | 211 - .../go-ole/go-ole/safearray_windows.go | 337 - .../go-ole/go-ole/safearrayconversion.go | 140 - .../go-ole/go-ole/safearrayslices.go | 33 - vendor/github.com/go-ole/go-ole/utility.go | 101 - vendor/github.com/go-ole/go-ole/variables.go | 15 - vendor/github.com/go-ole/go-ole/variant.go | 105 - .../github.com/go-ole/go-ole/variant_386.go | 11 - .../github.com/go-ole/go-ole/variant_amd64.go | 12 - .../github.com/go-ole/go-ole/variant_arm.go | 11 - .../github.com/go-ole/go-ole/variant_arm64.go | 13 - .../go-ole/go-ole/variant_date_386.go | 22 - .../go-ole/go-ole/variant_date_amd64.go | 20 - .../go-ole/go-ole/variant_date_arm.go | 22 - .../go-ole/go-ole/variant_date_arm64.go | 23 - .../go-ole/go-ole/variant_ppc64le.go | 12 - .../github.com/go-ole/go-ole/variant_s390x.go | 12 - vendor/github.com/go-ole/go-ole/vt_string.go | 58 - vendor/github.com/go-ole/go-ole/winrt.go | 99 - vendor/github.com/go-ole/go-ole/winrt_doc.go | 36 - .../go-openapi/analysis/.golangci.yml | 53 +- .../github.com/go-openapi/analysis/README.md | 10 +- .../go-openapi/analysis/appveyor.yml | 32 - vendor/github.com/go-openapi/analysis/doc.go | 10 +- .../github.com/go-openapi/analysis/flatten.go | 64 +- .../go-openapi/analysis/flatten_name.go | 39 +- .../go-openapi/analysis/flatten_options.go | 1 + .../analysis/internal/debug/debug.go | 4 +- .../internal/flatten/replace/replace.go | 42 +- .../analysis/internal/flatten/sortref/keys.go | 2 +- .../github.com/go-openapi/analysis/mixin.go | 16 +- .../github.com/go-openapi/analysis/schema.go | 12 +- .../go-openapi/jsonpointer/pointer.go | 2 +- .../github.com/go-openapi/loads/.golangci.yml | 49 +- vendor/github.com/go-openapi/loads/README.md | 2 +- vendor/github.com/go-openapi/loads/doc.go | 9 +- vendor/github.com/go-openapi/loads/loaders.go | 9 +- vendor/github.com/go-openapi/loads/spec.go | 35 +- .../go-openapi/runtime/.editorconfig | 26 - .../go-openapi/runtime/.gitattributes | 1 - .../github.com/go-openapi/runtime/.gitignore | 5 - .../go-openapi/runtime/.golangci.yml | 62 - .../go-openapi/runtime/CODE_OF_CONDUCT.md | 74 - vendor/github.com/go-openapi/runtime/LICENSE | 202 - .../github.com/go-openapi/runtime/README.md | 10 - .../go-openapi/runtime/bytestream.go | 171 - .../go-openapi/runtime/client/auth_info.go | 77 - .../go-openapi/runtime/client/keepalive.go | 54 - .../runtime/client/opentelemetry.go | 211 - .../go-openapi/runtime/client/opentracing.go | 99 - .../go-openapi/runtime/client/request.go | 482 - .../go-openapi/runtime/client/response.go | 50 - .../go-openapi/runtime/client/runtime.go | 544 - .../go-openapi/runtime/client_auth_info.go | 30 - .../go-openapi/runtime/client_operation.go | 41 - .../go-openapi/runtime/client_request.go | 152 - .../go-openapi/runtime/client_response.go | 110 - .../go-openapi/runtime/constants.go | 49 - vendor/github.com/go-openapi/runtime/csv.go | 77 - .../github.com/go-openapi/runtime/discard.go | 9 - vendor/github.com/go-openapi/runtime/file.go | 19 - .../github.com/go-openapi/runtime/headers.go | 45 - .../go-openapi/runtime/interfaces.go | 112 - vendor/github.com/go-openapi/runtime/json.go | 38 - .../go-openapi/runtime/logger/logger.go | 20 - .../go-openapi/runtime/logger/standard.go | 22 - .../go-openapi/runtime/middleware/context.go | 639 - .../runtime/middleware/denco/LICENSE | 19 - .../runtime/middleware/denco/README.md | 180 - .../runtime/middleware/denco/router.go | 461 - .../runtime/middleware/denco/server.go | 106 - .../runtime/middleware/denco/util.go | 12 - .../go-openapi/runtime/middleware/doc.go | 63 - .../go-openapi/runtime/middleware/go18.go | 10 - .../runtime/middleware/header/header.go | 332 - .../runtime/middleware/negotiate.go | 98 - .../runtime/middleware/not_implemented.go | 67 - .../runtime/middleware/operation.go | 30 - .../runtime/middleware/parameter.go | 491 - .../go-openapi/runtime/middleware/pre_go18.go | 9 - .../go-openapi/runtime/middleware/rapidoc.go | 90 - .../go-openapi/runtime/middleware/redoc.go | 103 - .../go-openapi/runtime/middleware/request.go | 104 - .../go-openapi/runtime/middleware/router.go | 488 - .../go-openapi/runtime/middleware/security.go | 39 - .../go-openapi/runtime/middleware/spec.go | 47 - .../runtime/middleware/swaggerui.go | 168 - .../runtime/middleware/swaggerui_oauth2.go | 122 - .../runtime/middleware/ui_defaults.go | 8 - .../runtime/middleware/untyped/api.go | 287 - .../runtime/middleware/validation.go | 126 - .../github.com/go-openapi/runtime/request.go | 149 - .../runtime/security/authenticator.go | 277 - .../go-openapi/runtime/security/authorizer.go | 27 - .../github.com/go-openapi/runtime/statuses.go | 90 - vendor/github.com/go-openapi/runtime/text.go | 116 - .../github.com/go-openapi/runtime/values.go | 19 - vendor/github.com/go-openapi/runtime/xml.go | 36 - .../go-openapi/runtime/yamlpc/yaml.go | 39 - vendor/github.com/go-openapi/spec/.gitignore | 3 +- vendor/github.com/go-openapi/spec/README.md | 28 +- vendor/github.com/go-openapi/spec/bindata.go | 297 - vendor/github.com/go-openapi/spec/embed.go | 17 + vendor/github.com/go-openapi/spec/expander.go | 74 +- .../go-openapi/spec/schema_loader.go | 9 +- .../spec/schemas/jsonschema-draft-04.json | 149 + .../go-openapi/spec/schemas/v2/schema.json | 1607 + vendor/github.com/go-openapi/spec/spec.go | 4 +- vendor/github.com/go-openapi/spec/url_go18.go | 8 - vendor/github.com/go-openapi/spec/url_go19.go | 3 - .../github.com/go-openapi/swag/BENCHMARK.md | 52 + .../go-openapi/swag/initialism_index.go | 139 +- .../github.com/go-openapi/swag/name_lexem.go | 70 +- vendor/github.com/go-openapi/swag/split.go | 470 +- .../go-openapi/swag/string_bytes.go | 8 + vendor/github.com/go-openapi/swag/util.go | 198 +- vendor/github.com/go-openapi/swag/yaml.go | 3 +- .../go-openapi/validate/.golangci.yml | 56 +- .../go-openapi/validate/BENCHMARK.md | 31 + .../github.com/go-openapi/validate/README.md | 8 +- .../go-openapi/validate/default_validator.go | 108 +- .../go-openapi/validate/example_validator.go | 66 +- .../github.com/go-openapi/validate/formats.go | 78 +- .../github.com/go-openapi/validate/helpers.go | 21 +- .../go-openapi/validate/object_validator.go | 448 +- .../github.com/go-openapi/validate/options.go | 1 + .../github.com/go-openapi/validate/pools.go | 366 + .../go-openapi/validate/pools_debug.go | 1012 + .../github.com/go-openapi/validate/result.go | 131 +- .../github.com/go-openapi/validate/schema.go | 258 +- .../go-openapi/validate/schema_option.go | 31 +- .../go-openapi/validate/schema_props.go | 412 +- .../go-openapi/validate/slice_validator.go | 57 +- vendor/github.com/go-openapi/validate/spec.go | 133 +- .../go-openapi/validate/spec_messages.go | 5 + vendor/github.com/go-openapi/validate/type.go | 72 +- .../go-openapi/validate/validator.go | 934 +- .../github.com/go-openapi/validate/values.go | 8 +- .../github.com/google/cel-go/cel/BUILD.bazel | 8 + vendor/github.com/google/cel-go/cel/decls.go | 40 - vendor/github.com/google/cel-go/cel/env.go | 128 +- .../github.com/google/cel-go/cel/folding.go | 559 + .../github.com/google/cel-go/cel/inlining.go | 228 + vendor/github.com/google/cel-go/cel/io.go | 36 +- .../github.com/google/cel-go/cel/library.go | 61 +- vendor/github.com/google/cel-go/cel/macro.go | 456 +- .../github.com/google/cel-go/cel/optimizer.go | 509 + .../github.com/google/cel-go/cel/options.go | 2 + .../github.com/google/cel-go/cel/program.go | 60 +- .../github.com/google/cel-go/cel/validator.go | 51 +- .../google/cel-go/checker/BUILD.bazel | 1 - .../google/cel-go/checker/checker.go | 356 +- .../github.com/google/cel-go/checker/cost.go | 195 +- .../google/cel-go/checker/decls/decls.go | 2 +- .../github.com/google/cel-go/checker/env.go | 8 + .../google/cel-go/checker/errors.go | 18 +- .../google/cel-go/checker/printer.go | 34 +- .../github.com/google/cel-go/checker/types.go | 13 +- .../google/cel-go/common/ast/BUILD.bazel | 16 +- .../google/cel-go/common/ast/ast.go | 480 +- .../google/cel-go/common/ast/conversion.go | 632 + .../google/cel-go/common/ast/expr.go | 967 +- .../google/cel-go/common/ast/factory.go | 303 + .../google/cel-go/common/ast/navigable.go | 652 + .../cel-go/common/containers/BUILD.bazel | 4 +- .../cel-go/common/containers/container.go | 22 +- .../google/cel-go/common/debug/BUILD.bazel | 4 +- .../google/cel-go/common/debug/debug.go | 156 +- .../github.com/google/cel-go/common/errors.go | 2 +- .../google/cel-go/common/types/err.go | 25 +- .../google/cel-go/common/types/int.go | 12 + .../google/cel-go/common/types/list.go | 8 +- .../google/cel-go/common/types/optional.go | 2 +- .../google/cel-go/common/types/overflow.go | 40 + .../google/cel-go/common/types/provider.go | 51 +- .../google/cel-go/common/types/string.go | 7 +- .../google/cel-go/common/types/types.go | 19 +- .../google/cel-go/common/types/uint.go | 12 + .../github.com/google/cel-go/ext/BUILD.bazel | 7 +- vendor/github.com/google/cel-go/ext/README.md | 14 + .../github.com/google/cel-go/ext/bindings.go | 24 +- .../google/cel-go/ext/formatting.go | 904 + vendor/github.com/google/cel-go/ext/guards.go | 11 +- vendor/github.com/google/cel-go/ext/math.go | 67 +- vendor/github.com/google/cel-go/ext/native.go | 66 +- vendor/github.com/google/cel-go/ext/protos.go | 45 +- vendor/github.com/google/cel-go/ext/sets.go | 64 + .../github.com/google/cel-go/ext/strings.go | 456 +- .../google/cel-go/interpreter/BUILD.bazel | 1 - .../google/cel-go/interpreter/attributes.go | 3 + .../google/cel-go/interpreter/formatting.go | 383 - .../cel-go/interpreter/interpretable.go | 50 +- .../google/cel-go/interpreter/interpreter.go | 26 +- .../google/cel-go/interpreter/planner.go | 279 +- .../google/cel-go/interpreter/prune.go | 496 +- .../google/cel-go/parser/BUILD.bazel | 9 +- .../google/cel-go/parser/gen/BUILD.bazel | 2 +- .../cel-go/parser/gen/cel_base_listener.go | 4 +- .../cel-go/parser/gen/cel_base_visitor.go | 5 +- .../google/cel-go/parser/gen/cel_lexer.go | 603 +- .../google/cel-go/parser/gen/cel_listener.go | 5 +- .../google/cel-go/parser/gen/cel_parser.go | 2478 +- .../google/cel-go/parser/gen/cel_visitor.go | 8 +- .../google/cel-go/parser/gen/generate.sh | 2 +- .../github.com/google/cel-go/parser/helper.go | 580 +- .../github.com/google/cel-go/parser/input.go | 4 +- .../github.com/google/cel-go/parser/macro.go | 192 +- .../github.com/google/cel-go/parser/parser.go | 189 +- .../google/cel-go/parser/unparser.go | 222 +- vendor/github.com/google/gopacket/.gitignore | 38 - .../google/gopacket/.travis.gofmt.sh | 7 - .../google/gopacket/.travis.golint.sh | 28 - .../google/gopacket/.travis.govet.sh | 10 - .../google/gopacket/.travis.install.sh | 9 - .../google/gopacket/.travis.script.sh | 10 - vendor/github.com/google/gopacket/.travis.yml | 57 - vendor/github.com/google/gopacket/AUTHORS | 54 - .../google/gopacket/CONTRIBUTING.md | 215 - vendor/github.com/google/gopacket/LICENSE | 28 - vendor/github.com/google/gopacket/README.md | 12 - vendor/github.com/google/gopacket/base.go | 178 - vendor/github.com/google/gopacket/decode.go | 157 - vendor/github.com/google/gopacket/doc.go | 432 - vendor/github.com/google/gopacket/flows.go | 236 - vendor/github.com/google/gopacket/gc | 288 - .../github.com/google/gopacket/layerclass.go | 107 - .../google/gopacket/layers/.lint_blacklist | 39 - .../github.com/google/gopacket/layers/arp.go | 118 - .../github.com/google/gopacket/layers/asf.go | 166 - .../gopacket/layers/asf_presencepong.go | 194 - .../github.com/google/gopacket/layers/base.go | 52 - .../github.com/google/gopacket/layers/bfd.go | 481 - .../github.com/google/gopacket/layers/cdp.go | 659 - .../github.com/google/gopacket/layers/ctp.go | 109 - .../google/gopacket/layers/dhcpv4.go | 592 - .../google/gopacket/layers/dhcpv6.go | 360 - .../google/gopacket/layers/dhcpv6_options.go | 621 - .../github.com/google/gopacket/layers/dns.go | 1098 - .../github.com/google/gopacket/layers/doc.go | 61 - .../google/gopacket/layers/dot11.go | 2118 -- .../google/gopacket/layers/dot1q.go | 75 - .../github.com/google/gopacket/layers/eap.go | 114 - .../google/gopacket/layers/eapol.go | 302 - .../google/gopacket/layers/endpoints.go | 97 - .../google/gopacket/layers/enums.go | 443 - .../google/gopacket/layers/enums_generated.go | 434 - .../google/gopacket/layers/erspan2.go | 86 - .../google/gopacket/layers/etherip.go | 45 - .../google/gopacket/layers/ethernet.go | 123 - .../github.com/google/gopacket/layers/fddi.go | 41 - .../google/gopacket/layers/fuzz_layer.go | 39 - .../google/gopacket/layers/gen_linted.sh | 3 - .../google/gopacket/layers/geneve.go | 121 - .../github.com/google/gopacket/layers/gre.go | 200 - .../github.com/google/gopacket/layers/gtp.go | 184 - .../google/gopacket/layers/iana_ports.go | 11351 ------- .../google/gopacket/layers/icmp4.go | 267 - .../google/gopacket/layers/icmp6.go | 266 - .../google/gopacket/layers/icmp6msg.go | 578 - .../github.com/google/gopacket/layers/igmp.go | 355 - .../github.com/google/gopacket/layers/ip4.go | 325 - .../github.com/google/gopacket/layers/ip6.go | 722 - .../google/gopacket/layers/ipsec.go | 77 - .../google/gopacket/layers/layertypes.go | 223 - .../github.com/google/gopacket/layers/lcm.go | 218 - .../google/gopacket/layers/linux_sll.go | 98 - .../github.com/google/gopacket/layers/llc.go | 193 - .../github.com/google/gopacket/layers/lldp.go | 1603 - .../google/gopacket/layers/loopback.go | 80 - .../google/gopacket/layers/mldv1.go | 182 - .../google/gopacket/layers/mldv2.go | 619 - .../google/gopacket/layers/modbustcp.go | 150 - .../github.com/google/gopacket/layers/mpls.go | 87 - .../github.com/google/gopacket/layers/ndp.go | 611 - .../github.com/google/gopacket/layers/ntp.go | 416 - .../github.com/google/gopacket/layers/ospf.go | 715 - .../google/gopacket/layers/pflog.go | 84 - .../google/gopacket/layers/ports.go | 156 - .../github.com/google/gopacket/layers/ppp.go | 88 - .../google/gopacket/layers/pppoe.go | 60 - .../google/gopacket/layers/prism.go | 146 - .../google/gopacket/layers/radiotap.go | 1076 - .../google/gopacket/layers/radius.go | 560 - .../github.com/google/gopacket/layers/rmcp.go | 170 - .../github.com/google/gopacket/layers/rudp.go | 93 - .../github.com/google/gopacket/layers/sctp.go | 746 - .../google/gopacket/layers/sflow.go | 2567 -- .../github.com/google/gopacket/layers/sip.go | 542 - .../github.com/google/gopacket/layers/stp.go | 27 - .../github.com/google/gopacket/layers/tcp.go | 341 - .../google/gopacket/layers/tcpip.go | 104 - .../google/gopacket/layers/test_creator.py | 103 - .../github.com/google/gopacket/layers/tls.go | 283 - .../google/gopacket/layers/tls_alert.go | 165 - .../google/gopacket/layers/tls_appdata.go | 34 - .../google/gopacket/layers/tls_cipherspec.go | 64 - .../google/gopacket/layers/tls_handshake.go | 28 - .../github.com/google/gopacket/layers/udp.go | 133 - .../google/gopacket/layers/udplite.go | 44 - .../github.com/google/gopacket/layers/usb.go | 292 - .../github.com/google/gopacket/layers/vrrp.go | 156 - .../google/gopacket/layers/vxlan.go | 123 - .../google/gopacket/layers_decoder.go | 101 - .../github.com/google/gopacket/layertype.go | 111 - vendor/github.com/google/gopacket/packet.go | 864 - vendor/github.com/google/gopacket/parser.go | 350 - vendor/github.com/google/gopacket/time.go | 72 - vendor/github.com/google/gopacket/writer.go | 232 - .../hashicorp/consul/api/.copywrite.hcl | 8 - .../github.com/hashicorp/consul/api/LICENSE | 365 - .../github.com/hashicorp/consul/api/README.md | 77 - vendor/github.com/hashicorp/consul/api/acl.go | 1744 -- .../github.com/hashicorp/consul/api/agent.go | 1446 - vendor/github.com/hashicorp/consul/api/api.go | 1277 - .../hashicorp/consul/api/catalog.go | 377 - .../hashicorp/consul/api/config_entry.go | 688 - .../consul/api/config_entry_discoverychain.go | 385 - .../consul/api/config_entry_exports.go | 84 - .../consul/api/config_entry_gateways.go | 344 - .../api/config_entry_inline_certificate.go | 46 - .../consul/api/config_entry_intentions.go | 100 - .../consul/api/config_entry_jwt_provider.go | 310 - .../hashicorp/consul/api/config_entry_mesh.go | 90 - .../consul/api/config_entry_rate_limit_ip.go | 91 - .../consul/api/config_entry_routes.go | 281 - .../consul/api/config_entry_sameness_group.go | 29 - .../consul/api/config_entry_status.go | 358 - .../hashicorp/consul/api/connect.go | 18 - .../hashicorp/consul/api/connect_ca.go | 201 - .../hashicorp/consul/api/connect_intention.go | 461 - .../hashicorp/consul/api/coordinate.go | 122 - .../github.com/hashicorp/consul/api/debug.go | 141 - .../hashicorp/consul/api/discovery_chain.go | 283 - .../github.com/hashicorp/consul/api/event.go | 114 - .../hashicorp/consul/api/exported_services.go | 49 - .../github.com/hashicorp/consul/api/health.go | 398 - .../hashicorp/consul/api/internal.go | 67 - vendor/github.com/hashicorp/consul/api/kv.go | 307 - .../github.com/hashicorp/consul/api/lock.go | 411 - .../hashicorp/consul/api/namespace.go | 227 - .../hashicorp/consul/api/operator.go | 14 - .../hashicorp/consul/api/operator_area.go | 209 - .../hashicorp/consul/api/operator_audit.go | 40 - .../consul/api/operator_autopilot.go | 404 - .../hashicorp/consul/api/operator_keyring.go | 110 - .../hashicorp/consul/api/operator_license.go | 134 - .../hashicorp/consul/api/operator_raft.go | 132 - .../hashicorp/consul/api/operator_segment.go | 14 - .../hashicorp/consul/api/operator_usage.go | 57 - .../hashicorp/consul/api/partition.go | 167 - .../hashicorp/consul/api/peering.go | 295 - .../hashicorp/consul/api/prepared_query.go | 269 - vendor/github.com/hashicorp/consul/api/raw.go | 27 - .../hashicorp/consul/api/semaphore.go | 533 - .../hashicorp/consul/api/session.go | 246 - .../hashicorp/consul/api/snapshot.go | 57 - .../github.com/hashicorp/consul/api/status.go | 70 - vendor/github.com/hashicorp/consul/api/txn.go | 249 - vendor/github.com/hashicorp/errwrap/LICENSE | 354 - vendor/github.com/hashicorp/errwrap/README.md | 89 - .../github.com/hashicorp/errwrap/errwrap.go | 178 - .../github.com/hashicorp/go-cleanhttp/LICENSE | 363 - .../hashicorp/go-cleanhttp/README.md | 30 - .../hashicorp/go-cleanhttp/cleanhttp.go | 58 - .../github.com/hashicorp/go-cleanhttp/doc.go | 20 - .../hashicorp/go-cleanhttp/handlers.go | 48 - .../github.com/hashicorp/go-hclog/.gitignore | 1 - vendor/github.com/hashicorp/go-hclog/LICENSE | 19 - .../github.com/hashicorp/go-hclog/README.md | 148 - .../hashicorp/go-hclog/colorize_unix.go | 44 - .../hashicorp/go-hclog/colorize_windows.go | 41 - .../github.com/hashicorp/go-hclog/context.go | 41 - .../github.com/hashicorp/go-hclog/exclude.go | 74 - .../github.com/hashicorp/go-hclog/global.go | 67 - .../hashicorp/go-hclog/interceptlogger.go | 207 - .../hashicorp/go-hclog/intlogger.go | 918 - .../github.com/hashicorp/go-hclog/logger.go | 393 - .../hashicorp/go-hclog/nulllogger.go | 63 - .../hashicorp/go-hclog/stacktrace.go | 109 - .../github.com/hashicorp/go-hclog/stdlog.go | 113 - .../github.com/hashicorp/go-hclog/writer.go | 85 - .../hashicorp/go-immutable-radix/.gitignore | 24 - .../hashicorp/go-immutable-radix/CHANGELOG.md | 23 - .../hashicorp/go-immutable-radix/LICENSE | 363 - .../hashicorp/go-immutable-radix/README.md | 66 - .../hashicorp/go-immutable-radix/edges.go | 21 - .../hashicorp/go-immutable-radix/iradix.go | 676 - .../hashicorp/go-immutable-radix/iter.go | 205 - .../hashicorp/go-immutable-radix/node.go | 334 - .../hashicorp/go-immutable-radix/raw_iter.go | 78 - .../go-immutable-radix/reverse_iter.go | 239 - .../hashicorp/go-multierror/LICENSE | 353 - .../hashicorp/go-multierror/Makefile | 31 - .../hashicorp/go-multierror/README.md | 150 - .../hashicorp/go-multierror/append.go | 43 - .../hashicorp/go-multierror/flatten.go | 26 - .../hashicorp/go-multierror/format.go | 27 - .../hashicorp/go-multierror/group.go | 38 - .../hashicorp/go-multierror/multierror.go | 121 - .../hashicorp/go-multierror/prefix.go | 37 - .../hashicorp/go-multierror/sort.go | 16 - .../hashicorp/go-rootcerts/.travis.yml | 12 - .../github.com/hashicorp/go-rootcerts/LICENSE | 363 - .../hashicorp/go-rootcerts/Makefile | 8 - .../hashicorp/go-rootcerts/README.md | 44 - .../github.com/hashicorp/go-rootcerts/doc.go | 9 - .../hashicorp/go-rootcerts/rootcerts.go | 123 - .../hashicorp/go-rootcerts/rootcerts_base.go | 12 - .../go-rootcerts/rootcerts_darwin.go | 48 - .../github.com/hashicorp/golang-lru/LICENSE | 362 - .../hashicorp/golang-lru/simplelru/lru.go | 177 - .../golang-lru/simplelru/lru_interface.go | 39 - vendor/github.com/hashicorp/hcl/decoder.go | 46 +- .../github.com/hashicorp/hcl/hcl/ast/ast.go | 15 +- vendor/github.com/hashicorp/serf/LICENSE | 354 - .../hashicorp/serf/coordinate/client.go | 243 - .../hashicorp/serf/coordinate/config.go | 77 - .../hashicorp/serf/coordinate/coordinate.go | 203 - .../hashicorp/serf/coordinate/phantom.go | 187 - vendor/github.com/kr/pretty/.gitignore | 5 - vendor/github.com/kr/pretty/License | 19 - vendor/github.com/kr/pretty/Readme | 9 - vendor/github.com/kr/pretty/diff.go | 295 - vendor/github.com/kr/pretty/formatter.go | 355 - vendor/github.com/kr/pretty/pretty.go | 108 - vendor/github.com/kr/pretty/zero.go | 41 - vendor/github.com/kr/text/License | 19 - vendor/github.com/kr/text/Readme | 3 - vendor/github.com/kr/text/doc.go | 3 - vendor/github.com/kr/text/indent.go | 74 - vendor/github.com/kr/text/wrap.go | 86 - vendor/github.com/lufia/plan9stats/.gitignore | 12 - vendor/github.com/lufia/plan9stats/LICENSE | 29 - vendor/github.com/lufia/plan9stats/README.md | 2 - vendor/github.com/lufia/plan9stats/cpu.go | 288 - vendor/github.com/lufia/plan9stats/doc.go | 2 - vendor/github.com/lufia/plan9stats/host.go | 303 - vendor/github.com/lufia/plan9stats/int.go | 31 - vendor/github.com/lufia/plan9stats/opts.go | 21 - vendor/github.com/lufia/plan9stats/stats.go | 88 - .../go-osstat/LICENSE.txt} | 26 +- .../go-osstat/memory/memory_darwin.go | 128 + .../go-osstat/memory/memory_freebsd.go | 119 + .../go-osstat/memory/memory_linux.go | 85 + .../go-osstat/memory/memory_other.go | 19 + .../go-osstat/memory/memory_windows.go | 54 + .../github.com/mitchellh/go-homedir/LICENSE | 21 - .../github.com/mitchellh/go-homedir/README.md | 14 - .../mitchellh/go-homedir/homedir.go | 167 - .../opentracing/opentracing-go/.gitignore | 1 - .../opentracing/opentracing-go/.golangci.yml | 3 - .../opentracing/opentracing-go/CHANGELOG.md | 63 - .../opentracing/opentracing-go/LICENSE | 201 - .../opentracing/opentracing-go/Makefile | 20 - .../opentracing/opentracing-go/README.md | 171 - .../opentracing/opentracing-go/ext.go | 24 - .../opentracing/opentracing-go/ext/field.go | 17 - .../opentracing/opentracing-go/ext/tags.go | 215 - .../opentracing-go/globaltracer.go | 42 - .../opentracing/opentracing-go/gocontext.go | 65 - .../opentracing/opentracing-go/log/field.go | 282 - .../opentracing/opentracing-go/log/util.go | 61 - .../opentracing/opentracing-go/noop.go | 64 - .../opentracing/opentracing-go/propagation.go | 176 - .../opentracing/opentracing-go/span.go | 189 - .../opentracing/opentracing-go/tracer.go | 304 - .../github.com/power-devops/perfstat/LICENSE | 23 - .../power-devops/perfstat/c_helpers.c | 159 - .../power-devops/perfstat/c_helpers.h | 58 - .../power-devops/perfstat/config.go | 18 - .../power-devops/perfstat/cpustat.go | 98 - .../power-devops/perfstat/diskstat.go | 137 - .../github.com/power-devops/perfstat/doc.go | 315 - .../power-devops/perfstat/fsstat.go | 31 - .../power-devops/perfstat/helpers.go | 764 - .../power-devops/perfstat/lparstat.go | 26 - .../power-devops/perfstat/lvmstat.go | 72 - .../power-devops/perfstat/memstat.go | 84 - .../power-devops/perfstat/netstat.go | 117 - .../power-devops/perfstat/procstat.go | 75 - .../power-devops/perfstat/sysconf.go | 195 - .../power-devops/perfstat/systemcfg.go | 635 - .../power-devops/perfstat/types_cpu.go | 186 - .../power-devops/perfstat/types_disk.go | 176 - .../power-devops/perfstat/types_fs.go | 195 - .../power-devops/perfstat/types_lpar.go | 68 - .../power-devops/perfstat/types_lvm.go | 31 - .../power-devops/perfstat/types_memory.go | 101 - .../power-devops/perfstat/types_network.go | 163 - .../power-devops/perfstat/types_process.go | 43 - .../power-devops/perfstat/uptime.go | 35 - .../github.com/rogpeppe/go-internal/LICENSE | 27 - .../rogpeppe/go-internal/fmtsort/mapelem.go | 20 - .../rogpeppe/go-internal/fmtsort/sort.go | 209 - vendor/github.com/shirou/gopsutil/v3/LICENSE | 61 - .../shirou/gopsutil/v3/common/env.go | 23 - .../gopsutil/v3/internal/common/binary.go | 637 - .../gopsutil/v3/internal/common/common.go | 441 - .../v3/internal/common/common_darwin.go | 66 - .../v3/internal/common/common_freebsd.go | 82 - .../v3/internal/common/common_linux.go | 322 - .../v3/internal/common/common_openbsd.go | 66 - .../v3/internal/common/common_unix.go | 62 - .../v3/internal/common/common_windows.go | 304 - .../gopsutil/v3/internal/common/endian.go | 10 - .../gopsutil/v3/internal/common/sleep.go | 21 - .../gopsutil/v3/internal/common/warnings.go | 30 - .../github.com/shirou/gopsutil/v3/mem/mem.go | 118 - .../shirou/gopsutil/v3/mem/mem_aix.go | 16 - .../shirou/gopsutil/v3/mem/mem_aix_cgo.go | 51 - .../shirou/gopsutil/v3/mem/mem_aix_nocgo.go | 81 - .../shirou/gopsutil/v3/mem/mem_bsd.go | 87 - .../shirou/gopsutil/v3/mem/mem_darwin.go | 72 - .../shirou/gopsutil/v3/mem/mem_darwin_cgo.go | 58 - .../gopsutil/v3/mem/mem_darwin_nocgo.go | 89 - .../shirou/gopsutil/v3/mem/mem_fallback.go | 34 - .../shirou/gopsutil/v3/mem/mem_freebsd.go | 167 - .../shirou/gopsutil/v3/mem/mem_linux.go | 526 - .../shirou/gopsutil/v3/mem/mem_openbsd.go | 100 - .../shirou/gopsutil/v3/mem/mem_openbsd_386.go | 38 - .../gopsutil/v3/mem/mem_openbsd_amd64.go | 32 - .../shirou/gopsutil/v3/mem/mem_openbsd_arm.go | 38 - .../gopsutil/v3/mem/mem_openbsd_arm64.go | 38 - .../shirou/gopsutil/v3/mem/mem_plan9.go | 68 - .../shirou/gopsutil/v3/mem/mem_solaris.go | 213 - .../shirou/gopsutil/v3/mem/mem_windows.go | 166 - vendor/github.com/spf13/pflag/flag.go | 29 +- vendor/github.com/spf13/pflag/ip.go | 3 + vendor/github.com/spf13/pflag/ipnet_slice.go | 147 + vendor/github.com/spf13/pflag/string_array.go | 4 - .../tklauser/go-sysconf/.cirrus.yml | 23 - .../github.com/tklauser/go-sysconf/.gitignore | 1 - vendor/github.com/tklauser/go-sysconf/LICENSE | 29 - .../github.com/tklauser/go-sysconf/README.md | 46 - .../github.com/tklauser/go-sysconf/sysconf.go | 21 - .../tklauser/go-sysconf/sysconf_bsd.go | 38 - .../tklauser/go-sysconf/sysconf_darwin.go | 267 - .../tklauser/go-sysconf/sysconf_dragonfly.go | 220 - .../tklauser/go-sysconf/sysconf_freebsd.go | 226 - .../tklauser/go-sysconf/sysconf_generic.go | 46 - .../tklauser/go-sysconf/sysconf_linux.go | 345 - .../tklauser/go-sysconf/sysconf_netbsd.go | 250 - .../tklauser/go-sysconf/sysconf_openbsd.go | 271 - .../tklauser/go-sysconf/sysconf_posix.go | 83 - .../tklauser/go-sysconf/sysconf_solaris.go | 14 - .../go-sysconf/sysconf_unsupported.go | 17 - .../go-sysconf/zsysconf_defs_darwin.go | 254 - .../go-sysconf/zsysconf_defs_dragonfly.go | 228 - .../go-sysconf/zsysconf_defs_freebsd.go | 229 - .../go-sysconf/zsysconf_defs_linux.go | 147 - .../go-sysconf/zsysconf_defs_netbsd.go | 164 - .../go-sysconf/zsysconf_defs_openbsd.go | 263 - .../go-sysconf/zsysconf_defs_solaris.go | 139 - .../go-sysconf/zsysconf_values_freebsd_386.go | 12 - .../zsysconf_values_freebsd_amd64.go | 12 - .../go-sysconf/zsysconf_values_freebsd_arm.go | 12 - .../zsysconf_values_freebsd_arm64.go | 12 - .../zsysconf_values_freebsd_riscv64.go | 12 - .../go-sysconf/zsysconf_values_linux_386.go | 114 - .../go-sysconf/zsysconf_values_linux_amd64.go | 114 - .../go-sysconf/zsysconf_values_linux_arm.go | 114 - .../go-sysconf/zsysconf_values_linux_arm64.go | 114 - .../zsysconf_values_linux_loong64.go | 114 - .../go-sysconf/zsysconf_values_linux_mips.go | 114 - .../zsysconf_values_linux_mips64.go | 114 - .../zsysconf_values_linux_mips64le.go | 114 - .../zsysconf_values_linux_mipsle.go | 114 - .../go-sysconf/zsysconf_values_linux_ppc64.go | 114 - .../zsysconf_values_linux_ppc64le.go | 114 - .../zsysconf_values_linux_riscv64.go | 114 - .../go-sysconf/zsysconf_values_linux_s390x.go | 114 - .../go-sysconf/zsysconf_values_netbsd_386.go | 11 - .../zsysconf_values_netbsd_amd64.go | 11 - .../go-sysconf/zsysconf_values_netbsd_arm.go | 11 - .../zsysconf_values_netbsd_arm64.go | 11 - .../github.com/tklauser/numcpus/.cirrus.yml | 13 - vendor/github.com/tklauser/numcpus/LICENSE | 202 - vendor/github.com/tklauser/numcpus/README.md | 52 - vendor/github.com/tklauser/numcpus/numcpus.go | 75 - .../tklauser/numcpus/numcpus_bsd.go | 66 - .../tklauser/numcpus/numcpus_linux.go | 120 - .../tklauser/numcpus/numcpus_solaris.go | 56 - .../tklauser/numcpus/numcpus_unsupported.go | 42 - .../tklauser/numcpus/numcpus_windows.go | 41 - vendor/github.com/yusufpapurcu/wmi/LICENSE | 20 - vendor/github.com/yusufpapurcu/wmi/README.md | 6 - .../yusufpapurcu/wmi/swbemservices.go | 261 - vendor/github.com/yusufpapurcu/wmi/wmi.go | 591 - vendor/go.etcd.io/etcd/api/v3/LICENSE | 202 - .../go.etcd.io/etcd/api/v3/authpb/auth.pb.go | 1158 - .../go.etcd.io/etcd/api/v3/authpb/auth.proto | 42 - .../etcd/api/v3/etcdserverpb/etcdserver.pb.go | 1002 - .../etcd/api/v3/etcdserverpb/etcdserver.proto | 34 - .../api/v3/etcdserverpb/raft_internal.pb.go | 2673 -- .../api/v3/etcdserverpb/raft_internal.proto | 81 - .../v3/etcdserverpb/raft_internal_stringer.go | 183 - .../etcd/api/v3/etcdserverpb/rpc.pb.go | 25862 ---------------- .../etcd/api/v3/etcdserverpb/rpc.proto | 1199 - .../etcd/api/v3/membershippb/membership.pb.go | 1454 - .../etcd/api/v3/membershippb/membership.proto | 43 - vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.pb.go | 798 - vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.proto | 49 - .../etcd/api/v3/v3rpc/rpctypes/doc.go | 16 - .../etcd/api/v3/v3rpc/rpctypes/error.go | 267 - .../etcd/api/v3/v3rpc/rpctypes/md.go | 22 - .../api/v3/v3rpc/rpctypes/metadatafields.go | 20 - .../go.etcd.io/etcd/api/v3/version/version.go | 56 - vendor/go.etcd.io/etcd/client/pkg/v3/LICENSE | 202 - .../etcd/client/pkg/v3/logutil/doc.go | 16 - .../etcd/client/pkg/v3/logutil/log_level.go | 30 - .../etcd/client/pkg/v3/logutil/zap.go | 108 - .../etcd/client/pkg/v3/logutil/zap_journal.go | 93 - .../etcd/client/pkg/v3/systemd/doc.go | 16 - .../etcd/client/pkg/v3/systemd/journal.go | 29 - .../client/pkg/v3/tlsutil/cipher_suites.go | 56 - .../etcd/client/pkg/v3/tlsutil/doc.go | 16 - .../etcd/client/pkg/v3/tlsutil/tlsutil.go | 73 - .../etcd/client/pkg/v3/tlsutil/versions.go | 47 - .../etcd/client/pkg/v3/types/doc.go | 17 - .../go.etcd.io/etcd/client/pkg/v3/types/id.go | 39 - .../etcd/client/pkg/v3/types/set.go | 195 - .../etcd/client/pkg/v3/types/slice.go | 22 - .../etcd/client/pkg/v3/types/urls.go | 82 - .../etcd/client/pkg/v3/types/urlsmap.go | 107 - vendor/go.etcd.io/etcd/client/v3/LICENSE | 202 - vendor/go.etcd.io/etcd/client/v3/README.md | 92 - vendor/go.etcd.io/etcd/client/v3/auth.go | 236 - vendor/go.etcd.io/etcd/client/v3/client.go | 612 - vendor/go.etcd.io/etcd/client/v3/cluster.go | 141 - .../go.etcd.io/etcd/client/v3/compact_op.go | 51 - vendor/go.etcd.io/etcd/client/v3/compare.go | 140 - .../etcd/client/v3/concurrency/doc.go | 17 - .../etcd/client/v3/concurrency/election.go | 254 - .../etcd/client/v3/concurrency/key.go | 65 - .../etcd/client/v3/concurrency/mutex.go | 167 - .../etcd/client/v3/concurrency/session.go | 141 - .../etcd/client/v3/concurrency/stm.go | 387 - vendor/go.etcd.io/etcd/client/v3/config.go | 92 - .../etcd/client/v3/credentials/credentials.go | 131 - vendor/go.etcd.io/etcd/client/v3/ctx.go | 50 - vendor/go.etcd.io/etcd/client/v3/doc.go | 106 - .../client/v3/internal/endpoint/endpoint.go | 134 - .../client/v3/internal/resolver/resolver.go | 74 - vendor/go.etcd.io/etcd/client/v3/kv.go | 177 - vendor/go.etcd.io/etcd/client/v3/lease.go | 607 - vendor/go.etcd.io/etcd/client/v3/logger.go | 59 - .../go.etcd.io/etcd/client/v3/maintenance.go | 255 - vendor/go.etcd.io/etcd/client/v3/op.go | 583 - vendor/go.etcd.io/etcd/client/v3/options.go | 69 - vendor/go.etcd.io/etcd/client/v3/retry.go | 306 - .../etcd/client/v3/retry_interceptor.go | 433 - vendor/go.etcd.io/etcd/client/v3/sort.go | 37 - vendor/go.etcd.io/etcd/client/v3/txn.go | 150 - vendor/go.etcd.io/etcd/client/v3/utils.go | 31 - vendor/go.etcd.io/etcd/client/v3/watch.go | 1042 - .../go.etcd.io/etcd/client/v3/yaml/config.go | 91 - vendor/go.opentelemetry.io/otel/CHANGELOG.md | 119 +- vendor/go.opentelemetry.io/otel/CODEOWNERS | 4 +- .../go.opentelemetry.io/otel/CONTRIBUTING.md | 15 +- vendor/go.opentelemetry.io/otel/Makefile | 72 +- vendor/go.opentelemetry.io/otel/README.md | 21 +- vendor/go.opentelemetry.io/otel/RELEASING.md | 6 + .../otel/attribute/README.md | 3 + .../go.opentelemetry.io/otel/attribute/doc.go | 13 +- .../otel/attribute/encoder.go | 13 +- .../otel/attribute/filter.go | 13 +- .../otel/attribute/iterator.go | 13 +- .../go.opentelemetry.io/otel/attribute/key.go | 13 +- .../go.opentelemetry.io/otel/attribute/kv.go | 13 +- .../go.opentelemetry.io/otel/attribute/set.go | 139 +- .../otel/attribute/value.go | 31 +- .../otel/baggage/README.md | 3 + .../otel/baggage/baggage.go | 240 +- .../otel/baggage/context.go | 13 +- .../go.opentelemetry.io/otel/baggage/doc.go | 13 +- .../go.opentelemetry.io/otel/codes/README.md | 3 + .../go.opentelemetry.io/otel/codes/codes.go | 13 +- vendor/go.opentelemetry.io/otel/codes/doc.go | 13 +- vendor/go.opentelemetry.io/otel/doc.go | 13 +- .../go.opentelemetry.io/otel/error_handler.go | 13 +- .../go.opentelemetry.io/otel/get_main_pkgs.sh | 13 +- vendor/go.opentelemetry.io/otel/handler.go | 25 +- .../otel/internal/attribute/attribute.go | 13 +- .../otel/internal/baggage/baggage.go | 13 +- .../otel/internal/baggage/context.go | 13 +- .../go.opentelemetry.io/otel/internal/gen.go | 13 +- .../otel/internal/global/handler.go | 84 +- .../otel/internal/global/instruments.go | 65 +- .../otel/internal/global/internal_logging.go | 39 +- .../otel/internal/global/meter.go | 35 +- .../otel/internal/global/propagator.go | 13 +- .../otel/internal/global/state.go | 67 +- .../otel/internal/global/trace.go | 16 +- .../otel/internal/rawhelpers.go | 13 +- .../otel/internal_logging.go | 13 +- vendor/go.opentelemetry.io/otel/metric.go | 13 +- .../go.opentelemetry.io/otel/metric/README.md | 3 + .../otel/metric/asyncfloat64.go | 19 +- .../otel/metric/asyncint64.go | 13 +- .../go.opentelemetry.io/otel/metric/config.go | 13 +- vendor/go.opentelemetry.io/otel/metric/doc.go | 13 +- .../otel/metric/embedded/README.md | 3 + .../otel/metric/embedded/embedded.go | 33 +- .../otel/metric/instrument.go | 35 +- .../go.opentelemetry.io/otel/metric/meter.go | 21 +- .../otel/metric/syncfloat64.go | 73 +- .../otel/metric/syncint64.go | 67 +- .../go.opentelemetry.io/otel/propagation.go | 13 +- .../otel/propagation/README.md | 3 + .../otel/propagation/baggage.go | 13 +- .../otel/propagation/doc.go | 13 +- .../otel/propagation/propagation.go | 13 +- .../otel/propagation/trace_context.go | 15 +- vendor/go.opentelemetry.io/otel/renovate.json | 24 + .../otel/semconv/internal/v2/http.go | 404 - .../otel/semconv/internal/v2/net.go | 324 - .../otel/semconv/v1.17.0/doc.go | 20 - .../otel/semconv/v1.17.0/event.go | 199 - .../otel/semconv/v1.17.0/exception.go | 20 - .../otel/semconv/v1.17.0/http.go | 21 - .../otel/semconv/v1.17.0/httpconv/http.go | 152 - .../otel/semconv/v1.17.0/resource.go | 2010 -- .../otel/semconv/v1.17.0/schema.go | 20 - .../otel/semconv/v1.17.0/trace.go | 3375 -- .../otel/semconv/v1.20.0/README.md | 3 + .../otel/semconv/v1.20.0/attribute_group.go | 13 +- .../otel/semconv/v1.20.0/doc.go | 13 +- .../otel/semconv/v1.20.0/event.go | 13 +- .../otel/semconv/v1.20.0/exception.go | 13 +- .../otel/semconv/v1.20.0/http.go | 13 +- .../otel/semconv/v1.20.0/resource.go | 13 +- .../otel/semconv/v1.20.0/schema.go | 13 +- .../otel/semconv/v1.20.0/trace.go | 13 +- vendor/go.opentelemetry.io/otel/trace.go | 13 +- .../go.opentelemetry.io/otel/trace/README.md | 3 + .../go.opentelemetry.io/otel/trace/config.go | 13 +- .../go.opentelemetry.io/otel/trace/context.go | 17 +- vendor/go.opentelemetry.io/otel/trace/doc.go | 13 +- .../otel/trace/embedded/README.md | 3 + .../otel/trace/embedded/embedded.go | 13 +- .../otel/trace/nonrecording.go | 13 +- vendor/go.opentelemetry.io/otel/trace/noop.go | 20 +- .../go.opentelemetry.io/otel/trace/trace.go | 19 +- .../otel/trace/tracestate.go | 13 +- .../otel/verify_examples.sh | 13 +- .../otel/verify_readmes.sh | 21 + vendor/go.opentelemetry.io/otel/version.go | 15 +- vendor/go.opentelemetry.io/otel/versions.yaml | 25 +- vendor/go.uber.org/dig/.codecov.yml | 19 - vendor/go.uber.org/dig/.gitignore | 12 - vendor/go.uber.org/dig/CHANGELOG.md | 309 - vendor/go.uber.org/dig/LICENSE | 19 - vendor/go.uber.org/dig/Makefile | 67 - vendor/go.uber.org/dig/README.md | 51 - vendor/go.uber.org/dig/callback.go | 108 - vendor/go.uber.org/dig/check_license.sh | 17 - vendor/go.uber.org/dig/constructor.go | 243 - vendor/go.uber.org/dig/container.go | 282 - vendor/go.uber.org/dig/cycle_error.go | 79 - vendor/go.uber.org/dig/decorate.go | 313 - vendor/go.uber.org/dig/doc.go | 348 - vendor/go.uber.org/dig/error.go | 527 - vendor/go.uber.org/dig/glide.yaml | 7 - vendor/go.uber.org/dig/graph.go | 115 - vendor/go.uber.org/dig/group.go | 67 - vendor/go.uber.org/dig/inout.go | 175 - .../dig/internal/digerror/errors.go | 34 - .../dig/internal/digreflect/func.go | 125 - vendor/go.uber.org/dig/internal/dot/README.md | 61 - vendor/go.uber.org/dig/internal/dot/graph.go | 466 - .../go.uber.org/dig/internal/graph/graph.go | 118 - vendor/go.uber.org/dig/invoke.go | 211 - vendor/go.uber.org/dig/param.go | 668 - vendor/go.uber.org/dig/provide.go | 665 - vendor/go.uber.org/dig/result.go | 535 - vendor/go.uber.org/dig/scope.go | 326 - vendor/go.uber.org/dig/version.go | 24 - vendor/go.uber.org/dig/visualize.go | 192 - vendor/go.uber.org/zap/.codecov.yml | 17 - vendor/go.uber.org/zap/.gitignore | 32 - vendor/go.uber.org/zap/.golangci.yml | 77 - vendor/go.uber.org/zap/.readme.tmpl | 109 - vendor/go.uber.org/zap/CHANGELOG.md | 671 - vendor/go.uber.org/zap/CODE_OF_CONDUCT.md | 75 - vendor/go.uber.org/zap/CONTRIBUTING.md | 70 - vendor/go.uber.org/zap/FAQ.md | 164 - vendor/go.uber.org/zap/LICENSE.txt | 19 - vendor/go.uber.org/zap/Makefile | 76 - vendor/go.uber.org/zap/README.md | 137 - vendor/go.uber.org/zap/array.go | 447 - vendor/go.uber.org/zap/buffer/buffer.go | 146 - vendor/go.uber.org/zap/buffer/pool.go | 53 - vendor/go.uber.org/zap/checklicense.sh | 17 - vendor/go.uber.org/zap/config.go | 330 - vendor/go.uber.org/zap/doc.go | 117 - vendor/go.uber.org/zap/encoder.go | 79 - vendor/go.uber.org/zap/error.go | 82 - vendor/go.uber.org/zap/field.go | 613 - vendor/go.uber.org/zap/flag.go | 39 - vendor/go.uber.org/zap/glide.yaml | 34 - vendor/go.uber.org/zap/global.go | 169 - vendor/go.uber.org/zap/http_handler.go | 140 - .../zap/internal/bufferpool/bufferpool.go | 31 - .../go.uber.org/zap/internal/color/color.go | 44 - vendor/go.uber.org/zap/internal/exit/exit.go | 66 - .../go.uber.org/zap/internal/level_enabler.go | 37 - vendor/go.uber.org/zap/internal/pool/pool.go | 58 - .../zap/internal/stacktrace/stack.go | 181 - vendor/go.uber.org/zap/level.go | 153 - vendor/go.uber.org/zap/logger.go | 432 - vendor/go.uber.org/zap/options.go | 167 - vendor/go.uber.org/zap/sink.go | 180 - vendor/go.uber.org/zap/sugar.go | 437 - vendor/go.uber.org/zap/time.go | 27 - vendor/go.uber.org/zap/writer.go | 98 - .../zap/zapcore/buffered_write_syncer.go | 219 - vendor/go.uber.org/zap/zapcore/clock.go | 48 - .../zap/zapcore/console_encoder.go | 157 - vendor/go.uber.org/zap/zapcore/core.go | 122 - vendor/go.uber.org/zap/zapcore/doc.go | 24 - vendor/go.uber.org/zap/zapcore/encoder.go | 451 - vendor/go.uber.org/zap/zapcore/entry.go | 298 - vendor/go.uber.org/zap/zapcore/error.go | 136 - vendor/go.uber.org/zap/zapcore/field.go | 233 - vendor/go.uber.org/zap/zapcore/hook.go | 77 - .../go.uber.org/zap/zapcore/increase_level.go | 75 - .../go.uber.org/zap/zapcore/json_encoder.go | 583 - vendor/go.uber.org/zap/zapcore/lazy_with.go | 54 - vendor/go.uber.org/zap/zapcore/level.go | 229 - .../go.uber.org/zap/zapcore/level_strings.go | 46 - vendor/go.uber.org/zap/zapcore/marshaler.go | 61 - .../go.uber.org/zap/zapcore/memory_encoder.go | 179 - .../zap/zapcore/reflected_encoder.go | 41 - vendor/go.uber.org/zap/zapcore/sampler.go | 229 - vendor/go.uber.org/zap/zapcore/tee.go | 96 - .../go.uber.org/zap/zapcore/write_syncer.go | 122 - vendor/go.uber.org/zap/zapgrpc/zapgrpc.go | 245 - vendor/golang.org/x/net/websocket/client.go | 139 + vendor/golang.org/x/net/websocket/dial.go | 29 + vendor/golang.org/x/net/websocket/hybi.go | 582 + vendor/golang.org/x/net/websocket/server.go | 113 + .../golang.org/x/net/websocket/websocket.go | 448 + .../api/annotations/annotations.pb.go | 119 - .../googleapis/api/annotations/client.pb.go | 1848 -- .../api/annotations/field_behavior.pb.go | 266 - .../api/annotations/field_info.pb.go | 295 - .../googleapis/api/annotations/http.pb.go | 782 - .../googleapis/api/annotations/resource.pb.go | 655 - .../googleapis/api/annotations/routing.pb.go | 693 - .../googleapis/api/launch_stage.pb.go | 203 - .../grpc/resolver/manual/manual.go | 126 - .../k8s.io/api/admission/v1/generated.pb.go | 127 +- .../api/admission/v1beta1/generated.pb.go | 129 +- .../admissionregistration/v1/generated.pb.go | 6011 +++- .../admissionregistration/v1/generated.proto | 574 +- .../api/admissionregistration/v1/register.go | 4 + .../api/admissionregistration/v1/types.go | 604 +- .../v1/types_swagger_doc_generated.go | 178 +- .../v1/zz_generated.deepcopy.go | 432 + .../v1alpha1/generated.pb.go | 235 +- .../admissionregistration/v1alpha1/types.go | 4 +- .../v1beta1/generated.pb.go | 309 +- .../v1beta1/generated.proto | 15 +- .../admissionregistration/v1beta1/types.go | 19 +- .../v1beta1/types_swagger_doc_generated.go | 4 +- .../config => api/apidiscovery/v2}/doc.go | 8 +- .../api/apidiscovery/v2/generated.pb.go | 1742 ++ .../api/apidiscovery/v2/generated.proto | 156 + .../api/apidiscovery/v2}/register.go | 33 +- vendor/k8s.io/api/apidiscovery/v2/types.go | 155 + .../apidiscovery/v2/zz_generated.deepcopy.go | 190 + .../api/apidiscovery/v2beta1/generated.pb.go | 113 +- .../v1alpha1/generated.pb.go | 119 +- .../v1alpha1/generated.proto | 1 - .../api/apiserverinternal/v1alpha1/types.go | 1 - vendor/k8s.io/api/apps/v1/generated.pb.go | 341 +- vendor/k8s.io/api/apps/v1/generated.proto | 9 + vendor/k8s.io/api/apps/v1/types.go | 9 + .../k8s.io/api/apps/v1beta1/generated.pb.go | 299 +- .../k8s.io/api/apps/v1beta1/generated.proto | 5 + vendor/k8s.io/api/apps/v1beta1/types.go | 5 + .../k8s.io/api/apps/v1beta2/generated.pb.go | 365 +- .../k8s.io/api/apps/v1beta2/generated.proto | 9 + vendor/k8s.io/api/apps/v1beta2/types.go | 9 + .../api/authentication/v1/generated.pb.go | 154 +- .../api/authentication/v1/generated.proto | 4 + vendor/k8s.io/api/authentication/v1/types.go | 4 + .../authentication/v1alpha1/generated.pb.go | 59 +- .../authentication/v1beta1/generated.pb.go | 117 +- .../authentication/v1beta1/generated.proto | 3 + .../api/authentication/v1beta1/types.go | 3 + .../api/authorization/v1/generated.pb.go | 177 +- .../api/authorization/v1/generated.proto | 9 + vendor/k8s.io/api/authorization/v1/types.go | 9 + .../api/authorization/v1beta1/generated.pb.go | 183 +- .../api/authorization/v1beta1/generated.proto | 9 + .../k8s.io/api/authorization/v1beta1/types.go | 9 + .../k8s.io/api/autoscaling/v1/generated.pb.go | 255 +- .../k8s.io/api/autoscaling/v2/generated.pb.go | 243 +- .../api/autoscaling/v2beta1/generated.pb.go | 243 +- .../api/autoscaling/v2beta1/generated.proto | 3 + .../k8s.io/api/autoscaling/v2beta1/types.go | 3 + .../api/autoscaling/v2beta2/generated.pb.go | 255 +- .../api/autoscaling/v2beta2/generated.proto | 4 + .../k8s.io/api/autoscaling/v2beta2/types.go | 4 + vendor/k8s.io/api/batch/v1/generated.pb.go | 747 +- vendor/k8s.io/api/batch/v1/generated.proto | 96 +- vendor/k8s.io/api/batch/v1/types.go | 112 +- .../batch/v1/types_swagger_doc_generated.go | 37 +- .../api/batch/v1/zz_generated.deepcopy.go | 59 + .../k8s.io/api/batch/v1beta1/generated.pb.go | 115 +- .../api/certificates/v1/generated.pb.go | 133 +- .../api/certificates/v1alpha1/generated.pb.go | 74 +- .../api/certificates/v1beta1/generated.pb.go | 135 +- .../api/coordination/v1/generated.pb.go | 85 +- .../api/coordination/v1beta1/generated.pb.go | 85 +- .../api/core/v1/annotation_key_constants.go | 21 +- vendor/k8s.io/api/core/v1/generated.pb.go | 3602 ++- vendor/k8s.io/api/core/v1/generated.proto | 278 +- vendor/k8s.io/api/core/v1/types.go | 317 +- .../core/v1/types_swagger_doc_generated.go | 84 +- .../api/core/v1/zz_generated.deepcopy.go | 115 +- .../k8s.io/api/discovery/v1/generated.pb.go | 137 +- .../api/discovery/v1beta1/generated.pb.go | 135 +- vendor/k8s.io/api/events/v1/generated.pb.go | 111 +- .../k8s.io/api/events/v1beta1/generated.pb.go | 111 +- .../api/extensions/v1beta1/generated.pb.go | 447 +- .../api/extensions/v1beta1/generated.proto | 19 + vendor/k8s.io/api/extensions/v1beta1/types.go | 19 + .../k8s.io/api/flowcontrol/v1/generated.pb.go | 257 +- .../api/flowcontrol/v1beta1/generated.pb.go | 249 +- .../api/flowcontrol/v1beta2/generated.pb.go | 261 +- .../api/flowcontrol/v1beta3/generated.pb.go | 259 +- .../k8s.io/api/networking/v1/generated.pb.go | 275 +- .../k8s.io/api/networking/v1/generated.proto | 9 + vendor/k8s.io/api/networking/v1/types.go | 9 + .../api/networking/v1alpha1/generated.pb.go | 109 +- .../api/networking/v1alpha1/generated.proto | 1 + .../k8s.io/api/networking/v1alpha1/types.go | 1 + .../api/networking/v1beta1/generated.pb.go | 202 +- .../api/networking/v1beta1/generated.proto | 5 + vendor/k8s.io/api/networking/v1beta1/types.go | 5 + vendor/k8s.io/api/node/v1/generated.pb.go | 99 +- .../k8s.io/api/node/v1alpha1/generated.pb.go | 103 +- .../k8s.io/api/node/v1beta1/generated.pb.go | 99 +- vendor/k8s.io/api/policy/v1/generated.pb.go | 125 +- .../k8s.io/api/policy/v1beta1/generated.pb.go | 125 +- vendor/k8s.io/api/rbac/v1/generated.pb.go | 137 +- vendor/k8s.io/api/rbac/v1/generated.proto | 10 + vendor/k8s.io/api/rbac/v1/types.go | 10 + .../k8s.io/api/rbac/v1alpha1/generated.pb.go | 141 +- .../k8s.io/api/rbac/v1alpha1/generated.proto | 10 + vendor/k8s.io/api/rbac/v1alpha1/types.go | 10 + .../k8s.io/api/rbac/v1beta1/generated.pb.go | 137 +- .../k8s.io/api/rbac/v1beta1/generated.proto | 10 + vendor/k8s.io/api/rbac/v1beta1/types.go | 10 + .../api/resource/v1alpha2/generated.pb.go | 8396 ++++- .../api/resource/v1alpha2/generated.proto | 349 + .../api/resource/v1alpha2/namedresources.go | 127 + .../k8s.io/api/resource/v1alpha2/register.go | 6 + vendor/k8s.io/api/resource/v1alpha2/types.go | 277 +- .../v1alpha2/types_swagger_doc_generated.go | 179 +- .../v1alpha2/zz_generated.deepcopy.go | 630 +- .../k8s.io/api/scheduling/v1/generated.pb.go | 73 +- .../api/scheduling/v1alpha1/generated.pb.go | 71 +- .../api/scheduling/v1beta1/generated.pb.go | 73 +- vendor/k8s.io/api/storage/v1/generated.pb.go | 259 +- vendor/k8s.io/api/storage/v1/generated.proto | 10 +- vendor/k8s.io/api/storage/v1/types.go | 10 +- .../storage/v1/types_swagger_doc_generated.go | 4 +- .../api/storage/v1alpha1/generated.pb.go | 160 +- .../api/storage/v1alpha1/generated.proto | 2 - vendor/k8s.io/api/storage/v1alpha1/types.go | 2 - .../api/storage/v1beta1/generated.pb.go | 259 +- .../api/storage/v1beta1/generated.proto | 7 +- vendor/k8s.io/api/storage/v1beta1/types.go | 7 +- .../api/storagemigration/v1alpha1/doc.go | 23 + .../storagemigration/v1alpha1/generated.pb.go | 1688 + .../storagemigration/v1alpha1/generated.proto | 127 + .../api/storagemigration/v1alpha1/register.go | 58 + .../api/storagemigration/v1alpha1/types.go | 131 + .../v1alpha1/types_swagger_doc_generated.go | 95 + .../v1alpha1/zz_generated.deepcopy.go | 160 + .../zz_generated.prerelease-lifecycle.go | 58 + .../pkg/apis/apiextensions/types.go | 25 + .../pkg/apis/apiextensions/v1/conversion.go | 26 +- .../pkg/apis/apiextensions/v1/generated.pb.go | 679 +- .../pkg/apis/apiextensions/v1/generated.proto | 38 + .../pkg/apis/apiextensions/v1/types.go | 30 + .../apis/apiextensions/v1/types_jsonschema.go | 52 +- .../v1/zz_generated.conversion.go | 33 + .../apiextensions/v1/zz_generated.deepcopy.go | 21 + .../apiextensions/v1beta1/generated.pb.go | 742 +- .../apiextensions/v1beta1/generated.proto | 46 + .../pkg/apis/apiextensions/v1beta1/types.go | 38 + .../apiextensions/v1beta1/types_jsonschema.go | 52 +- .../v1beta1/zz_generated.conversion.go | 34 + .../v1beta1/zz_generated.deepcopy.go | 26 + .../apiextensions/zz_generated.deepcopy.go | 26 + .../pkg/apiserver/schema/cel/compilation.go | 6 +- .../pkg/apiserver/schema/cel/model/adaptor.go | 3 - .../pkg/apiserver/schema/cel/validation.go | 93 +- .../pkg/apiserver/validation/ratcheting.go | 12 +- .../v1/customresourcedefinitionversion.go | 14 + .../apiextensions/v1/selectablefield.go | 39 + .../v1beta1/customresourcedefinitionspec.go | 14 + .../customresourcedefinitionversion.go | 14 + .../apiextensions/v1beta1/selectablefield.go | 39 + .../clientset/fake/clientset_generated.go | 92 - .../clientset/clientset/fake/register.go | 58 - .../v1/fake/fake_customresourcedefinition.go | 178 - .../v1beta1/fake/fake_apiextensions_client.go | 40 - .../fake/fake_customresourcedefinition.go | 178 - .../pkg/features/kube_features.go | 10 +- .../pkg/api/resource/generated.pb.go | 43 +- .../apimachinery/pkg/api/validation/OWNERS | 11 + .../pkg/apis/meta/v1/generated.pb.go | 441 +- .../pkg/apis/meta/v1/generated.proto | 22 + .../apimachinery/pkg/apis/meta/v1/types.go | 35 + .../pkg/apis/meta/v1beta1/generated.pb.go | 45 +- .../apimachinery/pkg/runtime/generated.pb.go | 65 +- .../k8s.io/apimachinery/pkg/runtime/helper.go | 12 +- .../pkg/runtime/schema/generated.pb.go | 31 +- .../pkg/util/duration/duration.go | 93 - .../pkg/util/httpstream/wsstream/conn.go | 452 + .../pkg/util/httpstream/wsstream/doc.go | 69 + .../pkg/util/httpstream/wsstream/stream.go | 177 + .../pkg/util/intstr/generated.pb.go | 47 +- .../pkg/util/managedfields/node.yaml | 2 +- .../pkg/util/portforward/constants.go | 15 +- .../pkg/util/proxy/upgradeaware.go | 6 +- .../k8s.io/apimachinery/pkg/util/sets/doc.go | 2 +- .../apimachinery/pkg/util/sets/ordered.go | 53 - .../k8s.io/apimachinery/pkg/util/sets/set.go | 9 +- .../apimachinery/pkg/util/validation/OWNERS | 11 + .../pkg/util/validation/validation.go | 56 +- .../pkg/authentication/serviceaccount/util.go | 6 + .../authorization/authorizer/interfaces.go | 2 +- vendor/k8s.io/apiserver/pkg/cel/cidr.go | 87 + .../apiserver/pkg/cel/environment/base.go | 56 +- vendor/k8s.io/apiserver/pkg/cel/ip.go | 86 + .../k8s.io/apiserver/pkg/cel/library/cidr.go | 287 + .../k8s.io/apiserver/pkg/cel/library/cost.go | 150 + vendor/k8s.io/apiserver/pkg/cel/library/ip.go | 329 + .../v1/auditannotation.go | 48 + .../v1/expressionwarning.go | 48 + .../v1/matchresources.go | 90 + .../v1/namedrulewithoperations.go | 94 + .../admissionregistration/v1/paramkind.go | 48 + .../admissionregistration/v1/paramref.go | 71 + .../admissionregistration/v1/typechecking.go | 44 + .../v1/validatingadmissionpolicy.go | 256 + .../v1/validatingadmissionpolicybinding.go | 247 + .../validatingadmissionpolicybindingspec.go | 72 + .../v1/validatingadmissionpolicyspec.go | 117 + .../v1/validatingadmissionpolicystatus.go | 66 + .../admissionregistration/v1/validation.go | 70 + .../admissionregistration/v1/variable.go | 48 + .../applyconfigurations/batch/v1/jobspec.go | 18 + .../batch/v1/successpolicy.go | 44 + .../batch/v1/successpolicyrule.go | 48 + .../core/v1/apparmorprofile.go | 52 + .../core/v1/containerstatus.go | 14 + .../core/v1/noderuntimehandler.go | 48 + .../core/v1/noderuntimehandlerfeatures.go | 39 + .../applyconfigurations/core/v1/nodestatus.go | 14 + .../core/v1/podsecuritycontext.go | 9 + .../core/v1/securitycontext.go | 9 + .../core/v1/servicespec.go | 9 + .../core/v1/volumemount.go | 21 +- .../core/v1/volumemountstatus.go | 70 + .../applyconfigurations/internal/internal.go | 702 +- .../v1alpha2/allocationresultmodel.go | 39 + .../v1alpha2/driverallocationresult.go | 52 + .../resource/v1alpha2/driverrequests.go | 66 + .../namedresourcesallocationresult.go | 39 + .../v1alpha2/namedresourcesattribute.go | 100 + .../v1alpha2/namedresourcesattributevalue.go | 97 + .../resource/v1alpha2/namedresourcesfilter.go | 39 + .../v1alpha2/namedresourcesinstance.go | 53 + .../v1alpha2/namedresourcesintslice.go | 41 + .../v1alpha2/namedresourcesrequest.go | 39 + .../v1alpha2/namedresourcesresources.go | 44 + .../v1alpha2/namedresourcesstringslice.go | 41 + .../v1alpha2/resourceclaimparameters.go | 272 + .../resource/v1alpha2/resourceclass.go | 9 + .../v1alpha2/resourceclassparameters.go | 277 + .../resource/v1alpha2/resourcefilter.go | 48 + .../resource/v1alpha2/resourcefiltermodel.go | 39 + .../resource/v1alpha2/resourcehandle.go | 13 +- .../resource/v1alpha2/resourcemodel.go | 39 + .../resource/v1alpha2/resourcerequest.go | 52 + .../resource/v1alpha2/resourcerequestmodel.go | 39 + .../resource/v1alpha2/resourceslice.go | 265 + .../v1alpha2/structuredresourcehandle.go | 75 + .../resource/v1alpha2/vendorparameters.go | 52 + .../v1alpha1/groupversionresource.go | 57 + .../v1alpha1/migrationcondition.go | 81 + .../v1alpha1/storageversionmigration.go | 256 + .../v1alpha1/storageversionmigrationspec.go | 48 + .../v1alpha1/storageversionmigrationstatus.go | 53 + .../discovery/aggregated_discovery.go | 124 +- .../client-go/discovery/discovery_client.go | 29 +- vendor/k8s.io/client-go/features/envvar.go | 138 + vendor/k8s.io/client-go/features/features.go | 143 + .../client-go/features/known_features.go | 54 + .../admissionregistration/v1/interface.go | 14 + .../v1/validatingadmissionpolicy.go | 89 + .../v1/validatingadmissionpolicybinding.go | 89 + vendor/k8s.io/client-go/informers/doc.go | 2 +- vendor/k8s.io/client-go/informers/factory.go | 6 + vendor/k8s.io/client-go/informers/generic.go | 15 + .../informers/resource/v1alpha2/interface.go | 21 + .../v1alpha2/resourceclaimparameters.go | 90 + .../v1alpha2/resourceclassparameters.go | 90 + .../resource/v1alpha2/resourceslice.go | 89 + .../informers/storagemigration/interface.go | 46 + .../storagemigration/v1alpha1/interface.go | 45 + .../v1alpha1/storageversionmigration.go | 89 + .../k8s.io/client-go/kubernetes/clientset.go | 13 + vendor/k8s.io/client-go/kubernetes/doc.go | 2 +- .../kubernetes/fake/clientset_generated.go | 7 + .../client-go/kubernetes/fake/register.go | 2 + .../client-go/kubernetes/scheme/register.go | 2 + .../v1/admissionregistration_client.go | 10 + .../fake/fake_admissionregistration_client.go | 8 + .../v1/fake/fake_validatingadmissionpolicy.go | 178 + .../fake_validatingadmissionpolicybinding.go | 145 + .../v1/generated_expansion.go | 4 + .../v1/validatingadmissionpolicy.go | 243 + .../v1/validatingadmissionpolicybinding.go | 197 + .../v1alpha2/fake/fake_resource_client.go | 12 + .../fake/fake_resourceclaimparameters.go | 154 + .../fake/fake_resourceclassparameters.go | 154 + .../v1alpha2/fake/fake_resourceslice.go | 145 + .../resource/v1alpha2/generated_expansion.go | 6 + .../resource/v1alpha2/resource_client.go | 15 + .../v1alpha2/resourceclaimparameters.go | 208 + .../v1alpha2/resourceclassparameters.go | 208 + .../typed/resource/v1alpha2/resourceslice.go | 197 + .../typed/storagemigration/v1alpha1}/doc.go | 6 +- .../storagemigration/v1alpha1}/fake/doc.go | 0 .../fake/fake_storagemigration_client.go} | 10 +- .../fake/fake_storageversionmigration.go | 178 + .../v1alpha1/generated_expansion.go} | 5 +- .../v1alpha1/storagemigration_client.go | 107 + .../v1alpha1/storageversionmigration.go | 243 + .../v1/expansion_generated.go | 8 + .../v1/validatingadmissionpolicy.go | 68 + .../v1/validatingadmissionpolicybinding.go | 68 + .../resource/v1alpha2/expansion_generated.go | 20 + .../v1alpha2/resourceclaimparameters.go | 99 + .../v1alpha2/resourceclassparameters.go | 99 + .../resource/v1alpha2/resourceslice.go | 68 + .../v1alpha1/expansion_generated.go | 23 + .../v1alpha1/storageversionmigration.go | 68 + vendor/k8s.io/client-go/metadata/metadata.go | 4 +- .../k8s.io/client-go/restmapper/shortcut.go | 2 +- .../client-go/tools/cache/controller.go | 10 + vendor/k8s.io/client-go/tools/cache/index.go | 3 +- .../k8s.io/client-go/tools/cache/reflector.go | 18 +- .../client-go/tools/cache/shared_informer.go | 10 +- .../tools/cache/thread_safe_store.go | 92 +- .../client-go/tools/clientcmd/api/doc.go | 2 +- .../client-go/tools/clientcmd/api/v1/doc.go | 2 +- .../tools/clientcmd/client_config.go | 49 +- .../tools/leaderelection/leaderelection.go | 30 +- .../client-go/tools/leaderelection/metrics.go | 30 +- .../k8s.io/client-go/tools/portforward/OWNERS | 10 + .../tools/portforward/fallback_dialer.go | 57 + .../tools/portforward/portforward.go | 6 +- .../tools/portforward/tunneling_connection.go | 158 + .../tools/portforward/tunneling_dialer.go | 93 + vendor/k8s.io/client-go/tools/record/event.go | 19 +- .../client-go/tools/remotecommand/OWNERS | 10 + .../client-go/tools/remotecommand/fallback.go | 10 +- .../tools/remotecommand/websocket.go | 16 +- .../transport/websocket/roundtripper.go | 27 +- .../client-go/util/flowcontrol/backoff.go | 3 +- vendor/k8s.io/code-generator/README.md | 4 + .../cmd/applyconfiguration-gen/args/args.go | 63 +- .../args/externaltypes.go | 2 +- .../generators/applyconfiguration.go | 30 +- .../generators/internal.go | 8 +- .../generators/jsontagutil.go | 2 +- .../generators/openapi.go | 2 +- .../generators/refgraph.go | 8 +- .../generators/{packages.go => targets.go} | 137 +- .../generators/types.go | 2 +- .../applyconfiguration-gen/generators/util.go | 8 +- .../cmd/applyconfiguration-gen/main.go | 26 +- .../cmd/client-gen/args/args.go | 95 +- .../cmd/client-gen/args/gvpackages.go | 4 +- .../client-gen/generators/client_generator.go | 235 +- .../generators/fake/fake_client_generator.go | 93 +- .../fake/generator_fake_for_clientset.go | 21 +- .../fake/generator_fake_for_group.go | 18 +- .../fake/generator_fake_for_type.go | 23 +- .../generators/generator_for_clientset.go | 17 +- .../generators/generator_for_expansion.go | 6 +- .../generators/generator_for_group.go | 22 +- .../generators/generator_for_type.go | 27 +- .../generators/scheme/generator_for_scheme.go | 24 +- .../cmd/client-gen/generators/util/tags.go | 4 +- .../code-generator/cmd/client-gen/main.go | 32 +- .../cmd/client-gen/path/path.go | 31 - .../cmd/client-gen/types/helpers.go | 8 +- .../cmd/conversion-gen/args/args.go | 44 +- .../conversion-gen/generators/conversion.go | 257 +- .../code-generator/cmd/conversion-gen/main.go | 28 +- .../cmd/deepcopy-gen/args/args.go | 36 +- .../cmd}/deepcopy-gen/generators/deepcopy.go | 165 +- .../code-generator/cmd/deepcopy-gen/main.go | 71 +- .../cmd/defaulter-gen/args/args.go | 35 +- .../defaulter-gen/generators/defaulter.go | 241 +- .../code-generator/cmd/defaulter-gen/main.go | 24 +- .../cmd/go-to-protobuf/protobuf/cmd.go | 278 +- .../cmd/go-to-protobuf/protobuf/generator.go | 32 +- .../go-to-protobuf/protobuf/import_tracker.go | 4 +- .../cmd/go-to-protobuf/protobuf/namer.go | 33 +- .../cmd/go-to-protobuf/protobuf/package.go | 54 +- .../cmd/go-to-protobuf/protobuf/parser.go | 30 +- .../cmd/go-to-protobuf/protobuf/tags.go | 4 +- .../code-generator/cmd/import-boss/.gitignore | 1 - .../code-generator/cmd/import-boss/README.md | 97 - .../code-generator/cmd/import-boss/main.go | 45 - .../cmd/informer-gen/args/args.go | 79 +- .../cmd/informer-gen/generators/factory.go | 8 +- .../generators/factoryinterface.go | 8 +- .../cmd/informer-gen/generators/generic.go | 8 +- .../informer-gen/generators/groupinterface.go | 12 +- .../cmd/informer-gen/generators/informer.go | 8 +- .../cmd/informer-gen/generators/targets.go | 206 +- .../cmd/informer-gen/generators/types.go | 2 +- .../generators/versioninterface.go | 8 +- .../code-generator/cmd/informer-gen/main.go | 31 +- .../cmd/lister-gen/args/args.go | 50 +- .../cmd/lister-gen/generators/expansion.go | 18 +- .../cmd/lister-gen/generators/lister.go | 91 +- .../code-generator/cmd/lister-gen/main.go | 28 +- .../code-generator/cmd/openapi-gen/main.go | 57 - .../cmd/register-gen/args/args.go | 27 +- .../generators/register_external.go | 10 +- .../generators/{packages.go => targets.go} | 50 +- .../code-generator/cmd/register-gen/main.go | 23 +- .../code-generator/cmd/set-gen/.gitignore | 1 - .../k8s.io/code-generator/cmd/set-gen/main.go | 53 - .../k8s.io/code-generator/generate-groups.sh | 52 +- .../generate-internal-groups.sh | 280 +- vendor/k8s.io/code-generator/kube_codegen.sh | 452 +- .../code-generator/pkg/namer/tag-override.go | 7 +- .../k8s.io/code-generator/pkg/util/build.go | 60 - vendor/k8s.io/code-generator/tools.go | 3 - vendor/k8s.io/component-base/config/types.go | 80 - .../config/v1alpha1/conversion.go | 53 - .../config/v1alpha1/defaults.go | 98 - .../config/v1alpha1/register.go | 31 - .../component-base/config/v1alpha1/types.go | 82 - .../v1alpha1/zz_generated.conversion.go | 133 - .../config/v1alpha1/zz_generated.deepcopy.go | 88 - .../config/zz_generated.deepcopy.go | 73 - .../featuregate/feature_gate.go | 74 +- .../cri-api/pkg/apis/runtime/v1/api.pb.go | 2166 +- .../cri-api/pkg/apis/runtime/v1/api.proto | 83 +- vendor/k8s.io/gengo/LICENSE | 202 - vendor/k8s.io/gengo/args/args.go | 199 - .../import-boss/generators/import_restrict.go | 443 - .../gengo/examples/set-gen/generators/sets.go | 378 - .../gengo/examples/set-gen/sets/byte.go | 221 - .../gengo/examples/set-gen/sets/empty.go | 23 - .../k8s.io/gengo/examples/set-gen/sets/int.go | 221 - .../gengo/examples/set-gen/sets/int64.go | 221 - .../gengo/examples/set-gen/sets/string.go | 221 - .../gengo/generator/default_generator.go | 62 - .../k8s.io/gengo/generator/default_package.go | 75 - vendor/k8s.io/gengo/generator/doc.go | 31 - .../k8s.io/gengo/generator/error_tracker.go | 50 - vendor/k8s.io/gengo/generator/execute.go | 329 - .../k8s.io/gengo/generator/import_tracker.go | 89 - .../gengo/generator/transitive_closure.go | 65 - vendor/k8s.io/gengo/namer/import_tracker.go | 121 - vendor/k8s.io/gengo/namer/namer.go | 395 - vendor/k8s.io/gengo/namer/order.go | 72 - vendor/k8s.io/gengo/parser/parse.go | 925 - vendor/k8s.io/gengo/types/comments.go | 82 - vendor/k8s.io/gengo/types/flatten.go | 57 - vendor/k8s.io/gengo/types/types.go | 537 - .../kube-openapi/cmd/openapi-gen/args/args.go | 78 - .../kube-openapi/pkg/generators/README.md | 49 - .../kube-openapi/pkg/generators/api_linter.go | 219 - .../kube-openapi/pkg/generators/config.go | 84 - .../kube-openapi/pkg/generators/enum.go | 177 - .../kube-openapi/pkg/generators/extension.go | 203 - .../kube-openapi/pkg/generators/markers.go | 613 - .../kube-openapi/pkg/generators/openapi.go | 1024 - .../kube-openapi/pkg/generators/rules/OWNERS | 4 - .../kube-openapi/pkg/generators/rules/doc.go | 23 - .../pkg/generators/rules/idl_tag.go | 55 - .../pkg/generators/rules/names_match.go | 178 - .../generators/rules/omitempty_match_case.go | 64 - .../kube-openapi/pkg/generators/union.go | 208 - .../kube-openapi/pkg/util/sets/empty.go | 27 - .../kube-openapi/pkg/util/sets/string.go | 207 - vendor/k8s.io/utils/integer/integer.go | 73 - vendor/k8s.io/utils/trace/trace.go | 2 +- vendor/modules.txt | 455 +- .../controller-runtime/.golangci.yml | 16 +- vendor/sigs.k8s.io/controller-runtime/FAQ.md | 4 +- .../sigs.k8s.io/controller-runtime/Makefile | 49 +- vendor/sigs.k8s.io/controller-runtime/OWNERS | 3 +- .../controller-runtime/OWNERS_ALIASES | 6 - .../sigs.k8s.io/controller-runtime/RELEASE.md | 14 +- .../sigs.k8s.io/controller-runtime/alias.go | 8 - .../pkg/builder/controller.go | 60 +- .../controller-runtime/pkg/builder/webhook.go | 6 +- .../controller-runtime/pkg/cache/cache.go | 98 +- .../pkg/cache/delegating_by_gvk_cache.go | 8 + .../pkg/cache/informer_cache.go | 11 + .../pkg/cache/internal/cache_reader.go | 57 +- .../pkg/cache/internal/informers.go | 70 +- .../pkg/cache/multi_namespace_cache.go | 45 +- .../pkg/client/apiutil/apimachinery.go | 21 - .../pkg/client/apiutil/restmapper.go | 50 +- .../controller-runtime/pkg/client/client.go | 22 +- .../pkg/client/fake/client.go | 118 +- .../pkg/client/fieldowner.go | 20 +- .../controller-runtime/pkg/client/options.go | 2 +- .../controller-runtime/pkg/config/config.go | 112 - .../controller-runtime/pkg/config/doc.go | 19 - .../pkg/config/v1alpha1/doc.go | 22 - .../pkg/config/v1alpha1/register.go | 43 - .../pkg/config/v1alpha1/types.go | 179 - .../config/v1alpha1/zz_generated.deepcopy.go | 157 - .../pkg/controller/controller.go | 40 +- .../controllerutil/controllerutil.go | 114 +- .../controller-runtime/pkg/envtest/crd.go | 23 +- .../controller-runtime/pkg/envtest/server.go | 25 + .../controller-runtime/pkg/envtest/webhook.go | 10 +- .../controller-runtime/pkg/event/event.go | 51 +- .../controller-runtime/pkg/handler/enqueue.go | 43 +- .../pkg/handler/enqueue_mapped.go | 42 +- .../pkg/handler/enqueue_owner.go | 48 +- .../pkg/handler/eventhandler.go | 62 +- .../pkg/internal/controller/controller.go | 35 +- .../pkg/internal/field/selector/utils.go | 16 +- .../pkg/internal/source/event_handler.go | 32 +- .../pkg/internal/source/kind.go | 58 +- .../pkg/internal/syncs/syncs.go | 38 + .../internal/testing/controlplane/kubectl.go | 1 + .../testing/process/procattr_other.go} | 23 +- .../internal/testing/process/procattr_unix.go | 24 +- .../pkg/internal/testing/process/process.go | 4 + .../pkg/manager/internal.go | 37 +- .../controller-runtime/pkg/manager/manager.go | 129 +- .../pkg/manager/runnable_group.go | 20 +- .../controller-runtime/pkg/manager/server.go | 74 +- .../pkg/metrics/leaderelection.go | 23 +- .../pkg/metrics/server/server.go | 12 +- .../pkg/metrics/workqueue.go | 4 +- .../pkg/predicate/predicate.go | 179 +- .../pkg/reconcile/reconcile.go | 34 +- .../controller-runtime/pkg/source/source.go | 124 +- .../pkg/webhook/admission/decode.go | 25 +- .../pkg/webhook/admission/defaulter.go | 4 +- .../pkg/webhook/admission/defaulter_custom.go | 2 +- .../pkg/webhook/admission/http.go | 52 +- .../pkg/webhook/admission/validator.go | 4 +- .../pkg/webhook/admission/validator_custom.go | 3 +- .../controller-runtime/pkg/webhook/alias.go | 2 + .../pkg/crd/markers/validation.go | 20 + .../crd/markers/zz_generated.markerhelp.go | 20 + 3128 files changed, 151769 insertions(+), 491814 deletions(-) create mode 100644 pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.conversion.go create mode 100644 pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.defaults.go create mode 100644 pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/slog.go create mode 100644 pkg/k8s/vendor/github.com/go-openapi/swag/BENCHMARK.md create mode 100644 pkg/k8s/vendor/github.com/go-openapi/swag/string_bytes.go create mode 100644 pkg/k8s/vendor/github.com/spf13/pflag/ipnet_slice.go delete mode 100644 pkg/k8s/vendor/golang.org/x/net/http2/testsync.go create mode 100644 pkg/k8s/vendor/golang.org/x/net/http2/timer.go delete mode 100644 pkg/k8s/vendor/golang.org/x/oauth2/internal/client_appengine.go create mode 100644 pkg/k8s/vendor/golang.org/x/sys/unix/bpxsvc_zos.go create mode 100644 pkg/k8s/vendor/golang.org/x/sys/unix/bpxsvc_zos.s delete mode 100644 pkg/k8s/vendor/golang.org/x/sys/unix/epoll_zos.go delete mode 100644 pkg/k8s/vendor/golang.org/x/sys/unix/fstatfs_zos.go create mode 100644 pkg/k8s/vendor/golang.org/x/sys/unix/sockcmsg_zos.go create mode 100644 pkg/k8s/vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s create mode 100644 pkg/k8s/vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s delete mode 100644 pkg/k8s/vendor/golang.org/x/sys/windows/empty.s create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases.go create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go delete mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/event/tag/tag.go delete mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/support_go117.go delete mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/ureader_no.go delete mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/imports/zstdlib.go create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/stdlib/manifest.go create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/stdlib/stdlib.go delete mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/common.go delete mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/coretype.go delete mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/normalize.go delete mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/termlist.go delete mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/typeterm.go create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/recv.go create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/toonew.go delete mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/types_118.go create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/versions/features.go create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain.go create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go119.go create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go120.go create mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go121.go rename pkg/k8s/vendor/golang.org/x/tools/internal/versions/{versions_go121.go => versions.go} (77%) delete mode 100644 pkg/k8s/vendor/golang.org/x/tools/internal/versions/versions_go122.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/LICENSE delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/api.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/api_classic.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/api_common.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/app_id.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/base/api_base.pb.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/base/api_base.proto delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/identity.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/identity_classic.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/identity_flex.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/identity_vm.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/internal.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/log/log_service.pb.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/log/log_service.proto delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/main.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/main_common.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/main_vm.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/metadata.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/net.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/regen.sh delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/transaction.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto delete mode 100644 pkg/k8s/vendor/google.golang.org/appengine/urlfetch/urlfetch.go create mode 100644 pkg/k8s/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go delete mode 100644 pkg/k8s/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto rename {vendor/k8s.io/component-base/config/v1alpha1 => pkg/k8s/vendor/k8s.io/api/apidiscovery/v2}/doc.go (75%) create mode 100644 pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/generated.pb.go create mode 100644 pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/generated.proto rename {vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1 => pkg/k8s/vendor/k8s.io/api/apidiscovery/v2}/register.go (54%) create mode 100644 pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/types.go create mode 100644 pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/zz_generated.deepcopy.go create mode 100644 pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/namedresources.go create mode 100644 pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go create mode 100644 pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/generated.pb.go create mode 100644 pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/generated.proto create mode 100644 pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/register.go create mode 100644 pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/types.go create mode 100644 pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/types_swagger_doc_generated.go create mode 100644 pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.deepcopy.go create mode 100644 pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go create mode 100644 pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go create mode 100644 pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go rename {vendor/k8s.io/component-base/config => pkg/k8s/vendor/k8s.io/apimachinery/pkg/api/validation}/OWNERS (84%) delete mode 100644 pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go create mode 100644 pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresultmodel.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesallocationresult.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattribute.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattributevalue.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesfilter.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesinstance.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesintslice.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesrequest.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesresources.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesstringslice.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefiltermodel.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcemodel.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequestmodel.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceslice.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/groupversionresource.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/migrationcondition.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigration.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationspec.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationstatus.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/features/envvar.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/features/features.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/features/known_features.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go rename {vendor/k8s.io/gengo/examples/set-gen/sets => pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1}/doc.go (81%) rename vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/doc.go => pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go (89%) create mode 100644 pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storagemigration_client.go create mode 100644 pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go rename pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/{packages.go => targets.go} (64%) delete mode 100644 pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/path/path.go rename {vendor/k8s.io/gengo/examples => pkg/k8s/vendor/k8s.io/code-generator/cmd}/deepcopy-gen/generators/deepcopy.go (86%) rename {vendor/k8s.io/gengo/examples => pkg/k8s/vendor/k8s.io/code-generator/cmd}/defaulter-gen/generators/defaulter.go (87%) delete mode 100644 pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore delete mode 100644 pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/README.md delete mode 100644 pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/main.go rename vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go => pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go (56%) delete mode 100644 pkg/k8s/vendor/k8s.io/code-generator/cmd/openapi-gen/main.go rename pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/generators/{packages.go => targets.go} (74%) delete mode 100644 pkg/k8s/vendor/k8s.io/code-generator/cmd/set-gen/.gitignore delete mode 100644 pkg/k8s/vendor/k8s.io/code-generator/cmd/set-gen/main.go delete mode 100644 pkg/k8s/vendor/k8s.io/code-generator/pkg/util/build.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/args/args.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/examples/import-boss/generators/import_restrict.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/generators/sets.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/byte.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/int.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/int64.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/string.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/generator/default_generator.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/generator/default_package.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/generator/generator.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/generator/snippet_writer.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/generator/transitive_closure.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/namer/doc.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/namer/plural_namer.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/parser/doc.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/parser/parse.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/types/doc.go delete mode 100644 pkg/k8s/vendor/k8s.io/gengo/types/flatten.go rename pkg/k8s/vendor/k8s.io/gengo/{ => v2}/LICENSE (100%) create mode 100644 pkg/k8s/vendor/k8s.io/gengo/v2/README.md rename pkg/k8s/vendor/k8s.io/gengo/{types => v2}/comments.go (86%) create mode 100644 pkg/k8s/vendor/k8s.io/gengo/v2/execute.go rename pkg/k8s/vendor/k8s.io/gengo/{ => v2}/generator/doc.go (96%) rename pkg/k8s/vendor/k8s.io/gengo/{ => v2}/generator/error_tracker.go (100%) rename pkg/k8s/vendor/k8s.io/gengo/{ => v2}/generator/execute.go (54%) rename {vendor/k8s.io/gengo => pkg/k8s/vendor/k8s.io/gengo/v2}/generator/generator.go (63%) create mode 100644 pkg/k8s/vendor/k8s.io/gengo/v2/generator/go_generator.go rename pkg/k8s/vendor/k8s.io/gengo/{ => v2}/generator/import_tracker.go (88%) create mode 100644 pkg/k8s/vendor/k8s.io/gengo/v2/generator/simple_target.go rename {vendor/k8s.io/gengo => pkg/k8s/vendor/k8s.io/gengo/v2}/generator/snippet_writer.go (88%) rename {vendor/k8s.io/gengo => pkg/k8s/vendor/k8s.io/gengo/v2}/namer/doc.go (96%) rename pkg/k8s/vendor/k8s.io/gengo/{ => v2}/namer/import_tracker.go (98%) rename pkg/k8s/vendor/k8s.io/gengo/{ => v2}/namer/namer.go (99%) rename pkg/k8s/vendor/k8s.io/gengo/{ => v2}/namer/order.go (98%) rename {vendor/k8s.io/gengo => pkg/k8s/vendor/k8s.io/gengo/v2}/namer/plural_namer.go (99%) rename {vendor/k8s.io/gengo => pkg/k8s/vendor/k8s.io/gengo/v2}/parser/doc.go (92%) create mode 100644 pkg/k8s/vendor/k8s.io/gengo/v2/parser/parse.go rename {vendor/k8s.io/gengo => pkg/k8s/vendor/k8s.io/gengo/v2}/types/doc.go (93%) rename pkg/k8s/vendor/k8s.io/gengo/{ => v2}/types/types.go (98%) delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/README.md delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/config.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/enum.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/extension.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/markers.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/OWNERS delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/doc.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/idl_tag.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/omitempty_match_case.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/union.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/util/sets/empty.go delete mode 100644 pkg/k8s/vendor/k8s.io/kube-openapi/pkg/util/sets/string.go delete mode 100644 pkg/k8s/vendor/k8s.io/utils/integer/integer.go delete mode 100644 vendor/cel.dev/expr/.bazelversion delete mode 100644 vendor/cel.dev/expr/.gitattributes delete mode 100644 vendor/cel.dev/expr/.gitignore delete mode 100644 vendor/cel.dev/expr/BUILD.bazel delete mode 100644 vendor/cel.dev/expr/CODE_OF_CONDUCT.md delete mode 100644 vendor/cel.dev/expr/CONTRIBUTING.md delete mode 100644 vendor/cel.dev/expr/GOVERNANCE.md delete mode 100644 vendor/cel.dev/expr/LICENSE delete mode 100644 vendor/cel.dev/expr/MAINTAINERS.md delete mode 100644 vendor/cel.dev/expr/README.md delete mode 100644 vendor/cel.dev/expr/WORKSPACE delete mode 100644 vendor/cel.dev/expr/checked.pb.go delete mode 100644 vendor/cel.dev/expr/cloudbuild.yaml delete mode 100644 vendor/cel.dev/expr/eval.pb.go delete mode 100644 vendor/cel.dev/expr/explain.pb.go delete mode 100644 vendor/cel.dev/expr/regen_go_proto.sh delete mode 100644 vendor/cel.dev/expr/regen_go_proto_canonical_protos.sh delete mode 100644 vendor/cel.dev/expr/syntax.pb.go delete mode 100644 vendor/cel.dev/expr/value.pb.go create mode 100644 vendor/github.com/Azure/go-ansiterm/SECURITY.md delete mode 100644 vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/LICENSE delete mode 100644 vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/antlrdoc.go delete mode 100644 vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_config.go delete mode 100644 vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_config_set.go delete mode 100644 vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/input_stream.go delete mode 100644 vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/jcollect.go delete mode 100644 vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/prediction_context.go delete mode 100644 vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/prediction_mode.go delete mode 100644 vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/rule_context.go delete mode 100644 vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/utils_set.go create mode 100644 vendor/github.com/antlr4-go/antlr/v4/.gitignore create mode 100644 vendor/github.com/antlr4-go/antlr/v4/LICENSE create mode 100644 vendor/github.com/antlr4-go/antlr/v4/README.md create mode 100644 vendor/github.com/antlr4-go/antlr/v4/antlrdoc.go rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/atn.go (94%) create mode 100644 vendor/github.com/antlr4-go/antlr/v4/atn_config.go create mode 100644 vendor/github.com/antlr4-go/antlr/v4/atn_config_set.go rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/atn_deserialization_options.go (86%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/atn_deserializer.go (97%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/atn_simulator.go (66%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/atn_state.go (65%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/atn_type.go (100%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/char_stream.go (89%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/common_token_factory.go (100%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/common_token_stream.go (88%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/comparators.go (82%) create mode 100644 vendor/github.com/antlr4-go/antlr/v4/configuration.go rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/dfa.go (76%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/dfa_serializer.go (97%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/dfa_state.go (81%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/diagnostic_error_listener.go (92%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/error_listener.go (62%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/error_strategy.go (58%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/errors.go (73%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/file_stream.go (52%) create mode 100644 vendor/github.com/antlr4-go/antlr/v4/input_stream.go rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/int_stream.go (100%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/interval_set.go (82%) create mode 100644 vendor/github.com/antlr4-go/antlr/v4/jcollect.go rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/lexer.go (78%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/lexer_action.go (78%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/lexer_action_executor.go (70%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/lexer_atn_simulator.go (80%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/ll1_analyzer.go (73%) create mode 100644 vendor/github.com/antlr4-go/antlr/v4/nostatistics.go rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/parser.go (80%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/parser_atn_simulator.go (64%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/parser_rule_context.go (77%) create mode 100644 vendor/github.com/antlr4-go/antlr/v4/prediction_context.go create mode 100644 vendor/github.com/antlr4-go/antlr/v4/prediction_context_cache.go create mode 100644 vendor/github.com/antlr4-go/antlr/v4/prediction_mode.go rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/recognizer.go (70%) create mode 100644 vendor/github.com/antlr4-go/antlr/v4/rule_context.go rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/semantic_context.go (92%) create mode 100644 vendor/github.com/antlr4-go/antlr/v4/statistics.go create mode 100644 vendor/github.com/antlr4-go/antlr/v4/stats_data.go rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/token.go (86%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/token_source.go (100%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/token_stream.go (90%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/tokenstream_rewriter.go (73%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/trace_listener.go (100%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/transition.go (67%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/tree.go (62%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/trees.go (81%) rename vendor/github.com/{antlr/antlr4/runtime/Go => antlr4-go}/antlr/v4/utils.go (85%) delete mode 100644 vendor/github.com/armon/go-metrics/.gitignore delete mode 100644 vendor/github.com/armon/go-metrics/.travis.yml delete mode 100644 vendor/github.com/armon/go-metrics/LICENSE delete mode 100644 vendor/github.com/armon/go-metrics/README.md delete mode 100644 vendor/github.com/armon/go-metrics/const_unix.go delete mode 100644 vendor/github.com/armon/go-metrics/const_windows.go delete mode 100644 vendor/github.com/armon/go-metrics/inmem.go delete mode 100644 vendor/github.com/armon/go-metrics/inmem_endpoint.go delete mode 100644 vendor/github.com/armon/go-metrics/inmem_signal.go delete mode 100644 vendor/github.com/armon/go-metrics/metrics.go delete mode 100644 vendor/github.com/armon/go-metrics/sink.go delete mode 100644 vendor/github.com/armon/go-metrics/start.go delete mode 100644 vendor/github.com/armon/go-metrics/statsd.go delete mode 100644 vendor/github.com/armon/go-metrics/statsite.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/bgp/bgp_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_peers_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_peers_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_route_policies_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_route_policies_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_routes_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_routes_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/cilium_api_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/daemon_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cgroup_dump_metadata_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cgroup_dump_metadata_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cluster_nodes_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cluster_nodes_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_config_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_config_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_debuginfo_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_debuginfo_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_health_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_health_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_healthz_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_healthz_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_events_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_events_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_node_ids_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/get_node_ids_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/patch_config_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/daemon/patch_config_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/endpoint_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_config_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_config_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_healthz_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_healthz_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_labels_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_labels_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_log_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_log_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_config_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_config_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_labels_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_labels_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/put_endpoint_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/endpoint/put_endpoint_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/ipam/delete_ipam_ip_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/ipam/delete_ipam_ip_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/ipam/ipam_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_ip_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_ip_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/metrics/get_metrics_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/metrics/get_metrics_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/metrics/metrics_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/delete_fqdn_cache_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/delete_fqdn_cache_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/delete_policy_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/delete_policy_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_names_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_names_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_endpoints_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_endpoints_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_ip_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_ip_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_selectors_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_selectors_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/policy_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/put_policy_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/policy/put_policy_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/prefilter/delete_prefilter_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/prefilter/delete_prefilter_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/prefilter/get_prefilter_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/prefilter/get_prefilter_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/prefilter/patch_prefilter_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/prefilter/patch_prefilter_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/prefilter/prefilter_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/recorder/delete_recorder_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/recorder/delete_recorder_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_masks_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_masks_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/recorder/put_recorder_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/recorder/put_recorder_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/recorder/recorder_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/service/delete_service_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/service/delete_service_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/service/get_lrp_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/service/get_lrp_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/service/get_service_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/service/get_service_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/service/get_service_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/service/get_service_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/service/put_service_id_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/service/put_service_id_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/service/service_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_dump_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_dump_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_query_table_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_query_table_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/client/statedb/statedb_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/client/cilium_health_api_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/connectivity_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/get_status_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/get_status_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/put_status_probe_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/put_status_probe_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/client/restapi/get_healthz_parameters.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/client/restapi/get_healthz_responses.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/client/restapi/restapi_client.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/models/connectivity_status.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/models/endpoint_status.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/models/error.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/models/health_response.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/models/health_status_response.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/models/host_status.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/models/load_response.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/models/node_status.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/models/path_status.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/health/models/self_status.go create mode 100644 vendor/github.com/cilium/cilium/api/v1/models/attach_mode.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/models/host_routing.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/models/module_health.go delete mode 100644 vendor/github.com/cilium/cilium/api/v1/models/modules_health.go create mode 100644 vendor/github.com/cilium/cilium/api/v1/models/routing.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/allocator/allocator.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/allocator/cache.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/allocator/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/allocator/localkeys.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/allocator/logfields.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/annotation/k8s.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/api/apidisable.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/api/apierror.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/api/apipanic.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/api/config.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/api/const.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/api/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/api/socket.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/aws/eni/types/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/aws/eni/types/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/aws/eni/types/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/aws/eni/types/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/azure/types/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/azure/types/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/azure/types/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/azure/types/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/backoff/backoff.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/bpf.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/bpf_linux.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/bpffs_linux.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/bpffs_migrate.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/bpfmap.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/collection.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/endpoint.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/events.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/link.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/map.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/map_linux.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/map_register_linux.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/metrics.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/bpf/stats_linux.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/byteorder/byteorder.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/byteorder/byteorder_bigendian.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/byteorder/byteorder_littleendian.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/byteorder/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/client/client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/client/config.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/client/endpoint.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/client/identity.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/client/ipam.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/client/lrp.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/client/policy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/client/prefilter.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/client/recorder.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/client/service.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/command/exec/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/command/exec/exec.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/common/const.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/common/utils.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/comparator/comparator.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/components/components.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/container/ring_buffer.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/controller/cell.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/controller/controller.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/controller/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/controller/logfields.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/controller/manager.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/counter/counter.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/counter/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/counter/integer.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/counter/prefixes.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/crypto/certificatemanager/certificate_manager.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/bandwidth.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/cell.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/config/defines/defines.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/attach_cgroup.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/attach_type.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/kernel_hz.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/managed_neighbors.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes_linux.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes_unspecified.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/loader/metrics/metrics.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/tunnel/cell.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/tunnel/tunnel.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/types/config.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/types/datapath.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/types/endpoint.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/types/ipsec.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/types/lbmap.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/types/loader.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/types/node.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/types/node_addressing.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/datapath/types/wireguard.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/debug/subsystem.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/ebpf/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/ebpf/ebpf.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/ebpf/map.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/ebpf/map_register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/endpoint/id/id.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/endpoint/id/identifiers.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/endpoint/regeneration/owner.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/endpoint/regeneration/regeneration_context.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/eventqueue/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/eventqueue/eventqueue.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/fqdn/dns/dns.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/fqdn/matchpattern/matchpattern.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/fqdn/re/re.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/fqdn/restore/restore.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/health/client/client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/health/client/modules.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/health/client/tree.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/health/defaults/defaults.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/cell.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/config.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/decorator.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/group.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/health.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/info.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/invoke.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/lifecycle.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/metric.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/module.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/provide.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/cell/structured.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/command.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/hive.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/internal/reflect.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/metrics/health.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hive/shutdowner.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/hubble/api/v1/interface.go create mode 100644 vendor/github.com/cilium/cilium/pkg/hubble/filters/cel_expression.go create mode 100644 vendor/github.com/cilium/cilium/pkg/hubble/filters/drop_reason_desc.go create mode 100644 vendor/github.com/cilium/cilium/pkg/hubble/filters/labelparser.go create mode 100644 vendor/github.com/cilium/cilium/pkg/hubble/filters/network_interface.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/iana/svcname.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/cache/allocator.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/cache/cache.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/cache/local.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/identity.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/identitymanager/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/identitymanager/log.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/identitymanager/manager.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/identitymanager/observer.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/key/global_identity.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/model/identity.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/numericidentity.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/identity/reserved.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/idpool/idpool.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/inctimer/inctimer.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/ipam/types/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/ipam/types/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/ipam/types/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/ipam/types/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/ipcache/types/entries.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/ipcache/types/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/const.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/utils/utils.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/ccec_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/ccnp_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cec_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cegp_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cew_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/clrp_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cnp_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/errors.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/logfields.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_advert_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_cluster_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_node_override_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_node_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_peer_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgpp_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/cidrgroups_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/cnc_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/ippool_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/l2announcement_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/lbipam_types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/cell.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/clientset.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/clientset_generated.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/cilium.io_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwideenvoyconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwidenetworkpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumegressgatewaypolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumendpoint.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumenvoyconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumexternalworkload.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumidentity.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumlocalredirectpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnetworkpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnode.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_cilium.io_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwideenvoyconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwidenetworkpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumegressgatewaypolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumendpoint.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumenvoyconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumexternalworkload.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumidentity.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumlocalredirectpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnetworkpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnode.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/generated_expansion.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/cilium.io_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpadvertisement.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpclusterconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeerconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumcidrgroup.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumendpointslice.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliuml2announcementpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumloadbalancerippool.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumnodeconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumpodippool.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_cilium.io_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpadvertisement.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpclusterconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfigoverride.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeerconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeeringpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumcidrgroup.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumendpointslice.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliuml2announcementpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumloadbalancerippool.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumnodeconfig.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumpodippool.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/generated_expansion.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/config.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/client/getters.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/constants/const.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/identitybackend/identity.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/informer/informer.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/metrics/metrics.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.pb.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.proto delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/taint.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/generated.pb.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/generated.proto delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/well_known_labels.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/generated.pb.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/generated.proto delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/well_known_labels.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/generated.pb.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/generated.proto delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/well_known_annotations.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/apiextensions_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/customresourcedefinition.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/generated_expansion.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-clientset/clientset.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/generated.pb.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/generated.proto delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/validation/validation.go create mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.conversion.go create mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.defaults.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/generated.pb.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/generated.proto delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/types.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/generated.pb.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/generated.proto delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/intstr.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/clientset.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/clientset_generated.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme/register.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/core_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/endpoints.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_core_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_endpoints.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_namespace.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_node.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_pod.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_secret.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_service.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/generated_expansion.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/namespace.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/node.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/pod.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/secret.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/service.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/discovery_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/endpointslice.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_discovery_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_endpointslice.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/generated_expansion.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/discovery_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/endpointslice.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_discovery_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_endpointslice.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/generated_expansion.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networking_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networkpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/generated_expansion.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networking_client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networkpolicy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/utils/listwatcher.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/utils/utils.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/utils/workload.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/k8s/version/version.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/allocator/allocator.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/allocator/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/allocator/logfields.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/backend.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/backwards_compat.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/cell.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/client.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/config.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/consul.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/dummy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/etcd.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/etcd_debug.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/etcd_lease.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/events.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/kvstore.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/lock.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/logfields.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/metrics.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/store/cell.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/store/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/store/metrics.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/store/store.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/store/syncstore.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/store/watchstore.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/store/watchstoremgr.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/trace.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/kvstore/watcher_cache.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/loadbalancer/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/loadbalancer/loadbalancer.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/loadbalancer/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/loadbalancer/zz_generated.deepequal.go create mode 100644 vendor/github.com/cilium/cilium/pkg/logging/slog.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/maps/bwmap/bwmap.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/maps/bwmap/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/maps/callsmap/callsmap.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/maps/callsmap/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/maps/lxcmap/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/maps/lxcmap/lxcmap.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/bpf.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/cell.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/interfaces.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/logging_hook.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/metric/collections/product.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/metric/counter.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/metric/gauge.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/metric/histogram.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/metric/metric.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/metrics.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/metrics_unix.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/metrics_windows.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/middleware.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/registry.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/metrics/status.go create mode 100644 vendor/github.com/cilium/cilium/pkg/monitor/api/files.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo_linux.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo_unspecified.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/address.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/address_linux.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/address_other.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/addressing/addresstype.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/bootid.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/bootid_linux.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/host_endpoint.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/ip.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/ip_linux.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/local_node_store.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/logfields.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/types/logfields.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/types/node.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/types/nodename.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/node/types/zz_generated.deepcopy.go create mode 100644 vendor/github.com/cilium/cilium/pkg/option/.gitignore delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/cidr.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/decision.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/egress.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/entity.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/fqdn.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/groups.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/http.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/icmp.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/ingress.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/l4.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/l7.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/rule.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/rule_validation.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/rules.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/selector.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/service.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/utils.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/api/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/cidr.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/config.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/distillery.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/identifier.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/l4.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/mapstate.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/policy.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/proxyid.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/repository.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/resolve.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/rule.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/rules.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/selectorcache.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/selectorcache_selector.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/trafficdirection/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/trafficdirection/trafficdirection.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/trigger.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/utils.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/policy/visibility.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/promise/promise.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/proxy/accesslog/record.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/rand/safe_rand.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/rate/api_limiter.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/rate/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/rate/limiter.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/rate/metrics/metrics.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/safeio/safeio.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/safetime/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/safetime/safetime.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/source/source.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/spanstat/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/spanstat/spanstat.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/stream/observable.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/stream/operators.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/stream/sinks.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/stream/sources.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/sysctl/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/sysctl/sysctl.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/trigger/doc.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/trigger/trigger.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/types/ipv4.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/types/ipv6.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/types/macaddr.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/types/portmap.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/u8proto/u8proto.go delete mode 100644 vendor/github.com/cilium/cilium/pkg/wireguard/types/types.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/accesslog.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/accesslog.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/accesslog.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/bpf_metadata.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/bpf_metadata.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/health_check_sink.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/health_check_sink.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/l7policy.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/l7policy.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/network_filter.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/network_filter.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/npds.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/npds.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/nphds.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/nphds.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/tls_wrapper.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/tls_wrapper.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/websocket.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/cilium/api/websocket.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/annotations/deprecation.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/annotations/deprecation.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/annotations/resource.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/annotations/resource.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/address.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/address.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/backoff.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/backoff.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/base.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/base.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/config_source.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/config_source.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/event_service_config.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/event_service_config.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/extension.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/extension.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_method_list.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_method_list.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_service.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_service.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/health_check.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/health_check.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/http_uri.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/http_uri.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/protocol.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/protocol.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/proxy_protocol.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/proxy_protocol.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/resolver.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/resolver.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/socket_option.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/socket_option.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/substitution_format_string.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/substitution_format_string.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/udp_socket_config.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/core/v3/udp_socket_config.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route_components.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route_components.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/route/v3/scoped_route.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/config/route/v3/scoped_route.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/ads.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/ads.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/discovery.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/discovery.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/filter_state.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/filter_state.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/http_inputs.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/http_inputs.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/metadata.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/metadata.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/node.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/node.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/number.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/number.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/path.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/path.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/regex.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/regex.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/status_code_input.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/status_code_input.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/string.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/string.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/struct.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/struct.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/value.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/value.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/metadata/v3/metadata.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/metadata/v3/metadata.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/tracing/v3/custom_tag.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/tracing/v3/custom_tag.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/hash_policy.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/hash_policy.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/http.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/http.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/http_status.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/http_status.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/percent.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/percent.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/range.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/range.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_strategy.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_strategy.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_unit.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_unit.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/semantic_version.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/semantic_version.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/token_bucket.pb.go delete mode 100644 vendor/github.com/cilium/proxy/go/envoy/type/v3/token_bucket.pb.validate.go delete mode 100644 vendor/github.com/cilium/proxy/pkg/policy/api/kafka/doc.go delete mode 100644 vendor/github.com/cilium/proxy/pkg/policy/api/kafka/kafka.go delete mode 100644 vendor/github.com/cilium/proxy/pkg/policy/api/kafka/zz_generated.deepequal.go delete mode 100644 vendor/github.com/cncf/xds/go/LICENSE delete mode 100644 vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go delete mode 100644 vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go delete mode 100644 vendor/github.com/coreos/go-semver/LICENSE delete mode 100644 vendor/github.com/coreos/go-semver/NOTICE delete mode 100644 vendor/github.com/coreos/go-semver/semver/semver.go delete mode 100644 vendor/github.com/coreos/go-semver/semver/sort.go delete mode 100644 vendor/github.com/coreos/go-systemd/v22/journal/journal.go delete mode 100644 vendor/github.com/coreos/go-systemd/v22/journal/journal_unix.go delete mode 100644 vendor/github.com/coreos/go-systemd/v22/journal/journal_windows.go delete mode 100644 vendor/github.com/envoyproxy/protoc-gen-validate/LICENSE delete mode 100644 vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD delete mode 100644 vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h delete mode 100644 vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go delete mode 100644 vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto create mode 100644 vendor/github.com/evanphx/json-patch/v5/internal/json/decode.go create mode 100644 vendor/github.com/evanphx/json-patch/v5/internal/json/encode.go create mode 100644 vendor/github.com/evanphx/json-patch/v5/internal/json/fold.go create mode 100644 vendor/github.com/evanphx/json-patch/v5/internal/json/fuzz.go create mode 100644 vendor/github.com/evanphx/json-patch/v5/internal/json/indent.go create mode 100644 vendor/github.com/evanphx/json-patch/v5/internal/json/scanner.go create mode 100644 vendor/github.com/evanphx/json-patch/v5/internal/json/stream.go create mode 100644 vendor/github.com/evanphx/json-patch/v5/internal/json/tables.go create mode 100644 vendor/github.com/evanphx/json-patch/v5/internal/json/tags.go delete mode 100644 vendor/github.com/go-ole/go-ole/.travis.yml delete mode 100644 vendor/github.com/go-ole/go-ole/ChangeLog.md delete mode 100644 vendor/github.com/go-ole/go-ole/LICENSE delete mode 100644 vendor/github.com/go-ole/go-ole/README.md delete mode 100644 vendor/github.com/go-ole/go-ole/appveyor.yml delete mode 100644 vendor/github.com/go-ole/go-ole/com.go delete mode 100644 vendor/github.com/go-ole/go-ole/com_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/connect.go delete mode 100644 vendor/github.com/go-ole/go-ole/constants.go delete mode 100644 vendor/github.com/go-ole/go-ole/error.go delete mode 100644 vendor/github.com/go-ole/go-ole/error_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/error_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/guid.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpoint.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/idispatch.go delete mode 100644 vendor/github.com/go-ole/go-ole/idispatch_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/idispatch_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/ienumvariant.go delete mode 100644 vendor/github.com/go-ole/go-ole/ienumvariant_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/ienumvariant_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/iinspectable.go delete mode 100644 vendor/github.com/go-ole/go-ole/iinspectable_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/iinspectable_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/iprovideclassinfo.go delete mode 100644 vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/itypeinfo.go delete mode 100644 vendor/github.com/go-ole/go-ole/itypeinfo_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/itypeinfo_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/iunknown.go delete mode 100644 vendor/github.com/go-ole/go-ole/iunknown_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/iunknown_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/ole.go delete mode 100644 vendor/github.com/go-ole/go-ole/oleutil/connection.go delete mode 100644 vendor/github.com/go-ole/go-ole/oleutil/connection_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/oleutil/connection_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/oleutil/go-get.go delete mode 100644 vendor/github.com/go-ole/go-ole/oleutil/oleutil.go delete mode 100644 vendor/github.com/go-ole/go-ole/safearray.go delete mode 100644 vendor/github.com/go-ole/go-ole/safearray_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/safearray_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/safearrayconversion.go delete mode 100644 vendor/github.com/go-ole/go-ole/safearrayslices.go delete mode 100644 vendor/github.com/go-ole/go-ole/utility.go delete mode 100644 vendor/github.com/go-ole/go-ole/variables.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_386.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_amd64.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_arm.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_arm64.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_date_386.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_date_amd64.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_date_arm.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_date_arm64.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_ppc64le.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_s390x.go delete mode 100644 vendor/github.com/go-ole/go-ole/vt_string.go delete mode 100644 vendor/github.com/go-ole/go-ole/winrt.go delete mode 100644 vendor/github.com/go-ole/go-ole/winrt_doc.go delete mode 100644 vendor/github.com/go-openapi/analysis/appveyor.yml delete mode 100644 vendor/github.com/go-openapi/runtime/.editorconfig delete mode 100644 vendor/github.com/go-openapi/runtime/.gitattributes delete mode 100644 vendor/github.com/go-openapi/runtime/.gitignore delete mode 100644 vendor/github.com/go-openapi/runtime/.golangci.yml delete mode 100644 vendor/github.com/go-openapi/runtime/CODE_OF_CONDUCT.md delete mode 100644 vendor/github.com/go-openapi/runtime/LICENSE delete mode 100644 vendor/github.com/go-openapi/runtime/README.md delete mode 100644 vendor/github.com/go-openapi/runtime/bytestream.go delete mode 100644 vendor/github.com/go-openapi/runtime/client/auth_info.go delete mode 100644 vendor/github.com/go-openapi/runtime/client/keepalive.go delete mode 100644 vendor/github.com/go-openapi/runtime/client/opentelemetry.go delete mode 100644 vendor/github.com/go-openapi/runtime/client/opentracing.go delete mode 100644 vendor/github.com/go-openapi/runtime/client/request.go delete mode 100644 vendor/github.com/go-openapi/runtime/client/response.go delete mode 100644 vendor/github.com/go-openapi/runtime/client/runtime.go delete mode 100644 vendor/github.com/go-openapi/runtime/client_auth_info.go delete mode 100644 vendor/github.com/go-openapi/runtime/client_operation.go delete mode 100644 vendor/github.com/go-openapi/runtime/client_request.go delete mode 100644 vendor/github.com/go-openapi/runtime/client_response.go delete mode 100644 vendor/github.com/go-openapi/runtime/constants.go delete mode 100644 vendor/github.com/go-openapi/runtime/csv.go delete mode 100644 vendor/github.com/go-openapi/runtime/discard.go delete mode 100644 vendor/github.com/go-openapi/runtime/file.go delete mode 100644 vendor/github.com/go-openapi/runtime/headers.go delete mode 100644 vendor/github.com/go-openapi/runtime/interfaces.go delete mode 100644 vendor/github.com/go-openapi/runtime/json.go delete mode 100644 vendor/github.com/go-openapi/runtime/logger/logger.go delete mode 100644 vendor/github.com/go-openapi/runtime/logger/standard.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/context.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/denco/LICENSE delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/denco/README.md delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/denco/router.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/denco/server.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/denco/util.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/doc.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/go18.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/header/header.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/negotiate.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/not_implemented.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/operation.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/parameter.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/pre_go18.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/rapidoc.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/redoc.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/request.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/router.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/security.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/spec.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/swaggerui.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/ui_defaults.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/untyped/api.go delete mode 100644 vendor/github.com/go-openapi/runtime/middleware/validation.go delete mode 100644 vendor/github.com/go-openapi/runtime/request.go delete mode 100644 vendor/github.com/go-openapi/runtime/security/authenticator.go delete mode 100644 vendor/github.com/go-openapi/runtime/security/authorizer.go delete mode 100644 vendor/github.com/go-openapi/runtime/statuses.go delete mode 100644 vendor/github.com/go-openapi/runtime/text.go delete mode 100644 vendor/github.com/go-openapi/runtime/values.go delete mode 100644 vendor/github.com/go-openapi/runtime/xml.go delete mode 100644 vendor/github.com/go-openapi/runtime/yamlpc/yaml.go delete mode 100644 vendor/github.com/go-openapi/spec/bindata.go create mode 100644 vendor/github.com/go-openapi/spec/embed.go create mode 100644 vendor/github.com/go-openapi/spec/schemas/jsonschema-draft-04.json create mode 100644 vendor/github.com/go-openapi/spec/schemas/v2/schema.json delete mode 100644 vendor/github.com/go-openapi/spec/url_go18.go create mode 100644 vendor/github.com/go-openapi/swag/BENCHMARK.md create mode 100644 vendor/github.com/go-openapi/swag/string_bytes.go create mode 100644 vendor/github.com/go-openapi/validate/BENCHMARK.md create mode 100644 vendor/github.com/go-openapi/validate/pools.go create mode 100644 vendor/github.com/go-openapi/validate/pools_debug.go create mode 100644 vendor/github.com/google/cel-go/cel/folding.go create mode 100644 vendor/github.com/google/cel-go/cel/inlining.go create mode 100644 vendor/github.com/google/cel-go/cel/optimizer.go create mode 100644 vendor/github.com/google/cel-go/common/ast/conversion.go create mode 100644 vendor/github.com/google/cel-go/common/ast/factory.go create mode 100644 vendor/github.com/google/cel-go/common/ast/navigable.go create mode 100644 vendor/github.com/google/cel-go/ext/formatting.go delete mode 100644 vendor/github.com/google/cel-go/interpreter/formatting.go delete mode 100644 vendor/github.com/google/gopacket/.gitignore delete mode 100644 vendor/github.com/google/gopacket/.travis.gofmt.sh delete mode 100644 vendor/github.com/google/gopacket/.travis.golint.sh delete mode 100644 vendor/github.com/google/gopacket/.travis.govet.sh delete mode 100644 vendor/github.com/google/gopacket/.travis.install.sh delete mode 100644 vendor/github.com/google/gopacket/.travis.script.sh delete mode 100644 vendor/github.com/google/gopacket/.travis.yml delete mode 100644 vendor/github.com/google/gopacket/AUTHORS delete mode 100644 vendor/github.com/google/gopacket/CONTRIBUTING.md delete mode 100644 vendor/github.com/google/gopacket/LICENSE delete mode 100644 vendor/github.com/google/gopacket/README.md delete mode 100644 vendor/github.com/google/gopacket/base.go delete mode 100644 vendor/github.com/google/gopacket/decode.go delete mode 100644 vendor/github.com/google/gopacket/doc.go delete mode 100644 vendor/github.com/google/gopacket/flows.go delete mode 100644 vendor/github.com/google/gopacket/gc delete mode 100644 vendor/github.com/google/gopacket/layerclass.go delete mode 100644 vendor/github.com/google/gopacket/layers/.lint_blacklist delete mode 100644 vendor/github.com/google/gopacket/layers/arp.go delete mode 100644 vendor/github.com/google/gopacket/layers/asf.go delete mode 100644 vendor/github.com/google/gopacket/layers/asf_presencepong.go delete mode 100644 vendor/github.com/google/gopacket/layers/base.go delete mode 100644 vendor/github.com/google/gopacket/layers/bfd.go delete mode 100644 vendor/github.com/google/gopacket/layers/cdp.go delete mode 100644 vendor/github.com/google/gopacket/layers/ctp.go delete mode 100644 vendor/github.com/google/gopacket/layers/dhcpv4.go delete mode 100644 vendor/github.com/google/gopacket/layers/dhcpv6.go delete mode 100644 vendor/github.com/google/gopacket/layers/dhcpv6_options.go delete mode 100644 vendor/github.com/google/gopacket/layers/dns.go delete mode 100644 vendor/github.com/google/gopacket/layers/doc.go delete mode 100644 vendor/github.com/google/gopacket/layers/dot11.go delete mode 100644 vendor/github.com/google/gopacket/layers/dot1q.go delete mode 100644 vendor/github.com/google/gopacket/layers/eap.go delete mode 100644 vendor/github.com/google/gopacket/layers/eapol.go delete mode 100644 vendor/github.com/google/gopacket/layers/endpoints.go delete mode 100644 vendor/github.com/google/gopacket/layers/enums.go delete mode 100644 vendor/github.com/google/gopacket/layers/enums_generated.go delete mode 100644 vendor/github.com/google/gopacket/layers/erspan2.go delete mode 100644 vendor/github.com/google/gopacket/layers/etherip.go delete mode 100644 vendor/github.com/google/gopacket/layers/ethernet.go delete mode 100644 vendor/github.com/google/gopacket/layers/fddi.go delete mode 100644 vendor/github.com/google/gopacket/layers/fuzz_layer.go delete mode 100644 vendor/github.com/google/gopacket/layers/gen_linted.sh delete mode 100644 vendor/github.com/google/gopacket/layers/geneve.go delete mode 100644 vendor/github.com/google/gopacket/layers/gre.go delete mode 100644 vendor/github.com/google/gopacket/layers/gtp.go delete mode 100644 vendor/github.com/google/gopacket/layers/iana_ports.go delete mode 100644 vendor/github.com/google/gopacket/layers/icmp4.go delete mode 100644 vendor/github.com/google/gopacket/layers/icmp6.go delete mode 100644 vendor/github.com/google/gopacket/layers/icmp6msg.go delete mode 100644 vendor/github.com/google/gopacket/layers/igmp.go delete mode 100644 vendor/github.com/google/gopacket/layers/ip4.go delete mode 100644 vendor/github.com/google/gopacket/layers/ip6.go delete mode 100644 vendor/github.com/google/gopacket/layers/ipsec.go delete mode 100644 vendor/github.com/google/gopacket/layers/layertypes.go delete mode 100644 vendor/github.com/google/gopacket/layers/lcm.go delete mode 100644 vendor/github.com/google/gopacket/layers/linux_sll.go delete mode 100644 vendor/github.com/google/gopacket/layers/llc.go delete mode 100644 vendor/github.com/google/gopacket/layers/lldp.go delete mode 100644 vendor/github.com/google/gopacket/layers/loopback.go delete mode 100644 vendor/github.com/google/gopacket/layers/mldv1.go delete mode 100644 vendor/github.com/google/gopacket/layers/mldv2.go delete mode 100644 vendor/github.com/google/gopacket/layers/modbustcp.go delete mode 100644 vendor/github.com/google/gopacket/layers/mpls.go delete mode 100644 vendor/github.com/google/gopacket/layers/ndp.go delete mode 100644 vendor/github.com/google/gopacket/layers/ntp.go delete mode 100644 vendor/github.com/google/gopacket/layers/ospf.go delete mode 100644 vendor/github.com/google/gopacket/layers/pflog.go delete mode 100644 vendor/github.com/google/gopacket/layers/ports.go delete mode 100644 vendor/github.com/google/gopacket/layers/ppp.go delete mode 100644 vendor/github.com/google/gopacket/layers/pppoe.go delete mode 100644 vendor/github.com/google/gopacket/layers/prism.go delete mode 100644 vendor/github.com/google/gopacket/layers/radiotap.go delete mode 100644 vendor/github.com/google/gopacket/layers/radius.go delete mode 100644 vendor/github.com/google/gopacket/layers/rmcp.go delete mode 100644 vendor/github.com/google/gopacket/layers/rudp.go delete mode 100644 vendor/github.com/google/gopacket/layers/sctp.go delete mode 100644 vendor/github.com/google/gopacket/layers/sflow.go delete mode 100644 vendor/github.com/google/gopacket/layers/sip.go delete mode 100644 vendor/github.com/google/gopacket/layers/stp.go delete mode 100644 vendor/github.com/google/gopacket/layers/tcp.go delete mode 100644 vendor/github.com/google/gopacket/layers/tcpip.go delete mode 100644 vendor/github.com/google/gopacket/layers/test_creator.py delete mode 100644 vendor/github.com/google/gopacket/layers/tls.go delete mode 100644 vendor/github.com/google/gopacket/layers/tls_alert.go delete mode 100644 vendor/github.com/google/gopacket/layers/tls_appdata.go delete mode 100644 vendor/github.com/google/gopacket/layers/tls_cipherspec.go delete mode 100644 vendor/github.com/google/gopacket/layers/tls_handshake.go delete mode 100644 vendor/github.com/google/gopacket/layers/udp.go delete mode 100644 vendor/github.com/google/gopacket/layers/udplite.go delete mode 100644 vendor/github.com/google/gopacket/layers/usb.go delete mode 100644 vendor/github.com/google/gopacket/layers/vrrp.go delete mode 100644 vendor/github.com/google/gopacket/layers/vxlan.go delete mode 100644 vendor/github.com/google/gopacket/layers_decoder.go delete mode 100644 vendor/github.com/google/gopacket/layertype.go delete mode 100644 vendor/github.com/google/gopacket/packet.go delete mode 100644 vendor/github.com/google/gopacket/parser.go delete mode 100644 vendor/github.com/google/gopacket/time.go delete mode 100644 vendor/github.com/google/gopacket/writer.go delete mode 100644 vendor/github.com/hashicorp/consul/api/.copywrite.hcl delete mode 100644 vendor/github.com/hashicorp/consul/api/LICENSE delete mode 100644 vendor/github.com/hashicorp/consul/api/README.md delete mode 100644 vendor/github.com/hashicorp/consul/api/acl.go delete mode 100644 vendor/github.com/hashicorp/consul/api/agent.go delete mode 100644 vendor/github.com/hashicorp/consul/api/api.go delete mode 100644 vendor/github.com/hashicorp/consul/api/catalog.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_discoverychain.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_exports.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_gateways.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_inline_certificate.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_intentions.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_jwt_provider.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_mesh.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_rate_limit_ip.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_routes.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_sameness_group.go delete mode 100644 vendor/github.com/hashicorp/consul/api/config_entry_status.go delete mode 100644 vendor/github.com/hashicorp/consul/api/connect.go delete mode 100644 vendor/github.com/hashicorp/consul/api/connect_ca.go delete mode 100644 vendor/github.com/hashicorp/consul/api/connect_intention.go delete mode 100644 vendor/github.com/hashicorp/consul/api/coordinate.go delete mode 100644 vendor/github.com/hashicorp/consul/api/debug.go delete mode 100644 vendor/github.com/hashicorp/consul/api/discovery_chain.go delete mode 100644 vendor/github.com/hashicorp/consul/api/event.go delete mode 100644 vendor/github.com/hashicorp/consul/api/exported_services.go delete mode 100644 vendor/github.com/hashicorp/consul/api/health.go delete mode 100644 vendor/github.com/hashicorp/consul/api/internal.go delete mode 100644 vendor/github.com/hashicorp/consul/api/kv.go delete mode 100644 vendor/github.com/hashicorp/consul/api/lock.go delete mode 100644 vendor/github.com/hashicorp/consul/api/namespace.go delete mode 100644 vendor/github.com/hashicorp/consul/api/operator.go delete mode 100644 vendor/github.com/hashicorp/consul/api/operator_area.go delete mode 100644 vendor/github.com/hashicorp/consul/api/operator_audit.go delete mode 100644 vendor/github.com/hashicorp/consul/api/operator_autopilot.go delete mode 100644 vendor/github.com/hashicorp/consul/api/operator_keyring.go delete mode 100644 vendor/github.com/hashicorp/consul/api/operator_license.go delete mode 100644 vendor/github.com/hashicorp/consul/api/operator_raft.go delete mode 100644 vendor/github.com/hashicorp/consul/api/operator_segment.go delete mode 100644 vendor/github.com/hashicorp/consul/api/operator_usage.go delete mode 100644 vendor/github.com/hashicorp/consul/api/partition.go delete mode 100644 vendor/github.com/hashicorp/consul/api/peering.go delete mode 100644 vendor/github.com/hashicorp/consul/api/prepared_query.go delete mode 100644 vendor/github.com/hashicorp/consul/api/raw.go delete mode 100644 vendor/github.com/hashicorp/consul/api/semaphore.go delete mode 100644 vendor/github.com/hashicorp/consul/api/session.go delete mode 100644 vendor/github.com/hashicorp/consul/api/snapshot.go delete mode 100644 vendor/github.com/hashicorp/consul/api/status.go delete mode 100644 vendor/github.com/hashicorp/consul/api/txn.go delete mode 100644 vendor/github.com/hashicorp/errwrap/LICENSE delete mode 100644 vendor/github.com/hashicorp/errwrap/README.md delete mode 100644 vendor/github.com/hashicorp/errwrap/errwrap.go delete mode 100644 vendor/github.com/hashicorp/go-cleanhttp/LICENSE delete mode 100644 vendor/github.com/hashicorp/go-cleanhttp/README.md delete mode 100644 vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go delete mode 100644 vendor/github.com/hashicorp/go-cleanhttp/doc.go delete mode 100644 vendor/github.com/hashicorp/go-cleanhttp/handlers.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/.gitignore delete mode 100644 vendor/github.com/hashicorp/go-hclog/LICENSE delete mode 100644 vendor/github.com/hashicorp/go-hclog/README.md delete mode 100644 vendor/github.com/hashicorp/go-hclog/colorize_unix.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/colorize_windows.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/context.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/exclude.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/global.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/interceptlogger.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/intlogger.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/logger.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/nulllogger.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/stacktrace.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/stdlog.go delete mode 100644 vendor/github.com/hashicorp/go-hclog/writer.go delete mode 100644 vendor/github.com/hashicorp/go-immutable-radix/.gitignore delete mode 100644 vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md delete mode 100644 vendor/github.com/hashicorp/go-immutable-radix/LICENSE delete mode 100644 vendor/github.com/hashicorp/go-immutable-radix/README.md delete mode 100644 vendor/github.com/hashicorp/go-immutable-radix/edges.go delete mode 100644 vendor/github.com/hashicorp/go-immutable-radix/iradix.go delete mode 100644 vendor/github.com/hashicorp/go-immutable-radix/iter.go delete mode 100644 vendor/github.com/hashicorp/go-immutable-radix/node.go delete mode 100644 vendor/github.com/hashicorp/go-immutable-radix/raw_iter.go delete mode 100644 vendor/github.com/hashicorp/go-immutable-radix/reverse_iter.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/LICENSE delete mode 100644 vendor/github.com/hashicorp/go-multierror/Makefile delete mode 100644 vendor/github.com/hashicorp/go-multierror/README.md delete mode 100644 vendor/github.com/hashicorp/go-multierror/append.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/flatten.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/format.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/group.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/multierror.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/prefix.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/sort.go delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/.travis.yml delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/LICENSE delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/Makefile delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/README.md delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/doc.go delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/rootcerts.go delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go delete mode 100644 vendor/github.com/hashicorp/golang-lru/LICENSE delete mode 100644 vendor/github.com/hashicorp/golang-lru/simplelru/lru.go delete mode 100644 vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go delete mode 100644 vendor/github.com/hashicorp/serf/LICENSE delete mode 100644 vendor/github.com/hashicorp/serf/coordinate/client.go delete mode 100644 vendor/github.com/hashicorp/serf/coordinate/config.go delete mode 100644 vendor/github.com/hashicorp/serf/coordinate/coordinate.go delete mode 100644 vendor/github.com/hashicorp/serf/coordinate/phantom.go delete mode 100644 vendor/github.com/kr/pretty/.gitignore delete mode 100644 vendor/github.com/kr/pretty/License delete mode 100644 vendor/github.com/kr/pretty/Readme delete mode 100644 vendor/github.com/kr/pretty/diff.go delete mode 100644 vendor/github.com/kr/pretty/formatter.go delete mode 100644 vendor/github.com/kr/pretty/pretty.go delete mode 100644 vendor/github.com/kr/pretty/zero.go delete mode 100644 vendor/github.com/kr/text/License delete mode 100644 vendor/github.com/kr/text/Readme delete mode 100644 vendor/github.com/kr/text/doc.go delete mode 100644 vendor/github.com/kr/text/indent.go delete mode 100644 vendor/github.com/kr/text/wrap.go delete mode 100644 vendor/github.com/lufia/plan9stats/.gitignore delete mode 100644 vendor/github.com/lufia/plan9stats/LICENSE delete mode 100644 vendor/github.com/lufia/plan9stats/README.md delete mode 100644 vendor/github.com/lufia/plan9stats/cpu.go delete mode 100644 vendor/github.com/lufia/plan9stats/doc.go delete mode 100644 vendor/github.com/lufia/plan9stats/host.go delete mode 100644 vendor/github.com/lufia/plan9stats/int.go delete mode 100644 vendor/github.com/lufia/plan9stats/opts.go delete mode 100644 vendor/github.com/lufia/plan9stats/stats.go rename vendor/github.com/{cilium/proxy/LICENSE => mackerelio/go-osstat/LICENSE.txt} (89%) create mode 100644 vendor/github.com/mackerelio/go-osstat/memory/memory_darwin.go create mode 100644 vendor/github.com/mackerelio/go-osstat/memory/memory_freebsd.go create mode 100644 vendor/github.com/mackerelio/go-osstat/memory/memory_linux.go create mode 100644 vendor/github.com/mackerelio/go-osstat/memory/memory_other.go create mode 100644 vendor/github.com/mackerelio/go-osstat/memory/memory_windows.go delete mode 100644 vendor/github.com/mitchellh/go-homedir/LICENSE delete mode 100644 vendor/github.com/mitchellh/go-homedir/README.md delete mode 100644 vendor/github.com/mitchellh/go-homedir/homedir.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/.gitignore delete mode 100644 vendor/github.com/opentracing/opentracing-go/.golangci.yml delete mode 100644 vendor/github.com/opentracing/opentracing-go/CHANGELOG.md delete mode 100644 vendor/github.com/opentracing/opentracing-go/LICENSE delete mode 100644 vendor/github.com/opentracing/opentracing-go/Makefile delete mode 100644 vendor/github.com/opentracing/opentracing-go/README.md delete mode 100644 vendor/github.com/opentracing/opentracing-go/ext.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/ext/field.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/ext/tags.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/globaltracer.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/gocontext.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/log/field.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/log/util.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/noop.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/propagation.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/span.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/tracer.go delete mode 100644 vendor/github.com/power-devops/perfstat/LICENSE delete mode 100644 vendor/github.com/power-devops/perfstat/c_helpers.c delete mode 100644 vendor/github.com/power-devops/perfstat/c_helpers.h delete mode 100644 vendor/github.com/power-devops/perfstat/config.go delete mode 100644 vendor/github.com/power-devops/perfstat/cpustat.go delete mode 100644 vendor/github.com/power-devops/perfstat/diskstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/doc.go delete mode 100644 vendor/github.com/power-devops/perfstat/fsstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/helpers.go delete mode 100644 vendor/github.com/power-devops/perfstat/lparstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/lvmstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/memstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/netstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/procstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/sysconf.go delete mode 100644 vendor/github.com/power-devops/perfstat/systemcfg.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_cpu.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_disk.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_fs.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_lpar.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_lvm.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_memory.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_network.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_process.go delete mode 100644 vendor/github.com/power-devops/perfstat/uptime.go delete mode 100644 vendor/github.com/rogpeppe/go-internal/LICENSE delete mode 100644 vendor/github.com/rogpeppe/go-internal/fmtsort/mapelem.go delete mode 100644 vendor/github.com/rogpeppe/go-internal/fmtsort/sort.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/LICENSE delete mode 100644 vendor/github.com/shirou/gopsutil/v3/common/env.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/internal/common/binary.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/internal/common/common.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/internal/common/common_darwin.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/internal/common/common_freebsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/internal/common/common_linux.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/internal/common/common_openbsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/internal/common/common_unix.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/internal/common/common_windows.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/internal/common/endian.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/internal/common/sleep.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/internal/common/warnings.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_aix.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_cgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_nocgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_bsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin_cgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin_nocgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_fallback.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_freebsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_linux.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_386.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_amd64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_arm.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_arm64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_plan9.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_solaris.go delete mode 100644 vendor/github.com/shirou/gopsutil/v3/mem/mem_windows.go create mode 100644 vendor/github.com/spf13/pflag/ipnet_slice.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/.cirrus.yml delete mode 100644 vendor/github.com/tklauser/go-sysconf/.gitignore delete mode 100644 vendor/github.com/tklauser/go-sysconf/LICENSE delete mode 100644 vendor/github.com/tklauser/go-sysconf/README.md delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_dragonfly.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_freebsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_generic.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_linux.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_openbsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_posix.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_solaris.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go delete mode 100644 vendor/github.com/tklauser/numcpus/.cirrus.yml delete mode 100644 vendor/github.com/tklauser/numcpus/LICENSE delete mode 100644 vendor/github.com/tklauser/numcpus/README.md delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus.go delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus_bsd.go delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus_linux.go delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus_solaris.go delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus_unsupported.go delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus_windows.go delete mode 100644 vendor/github.com/yusufpapurcu/wmi/LICENSE delete mode 100644 vendor/github.com/yusufpapurcu/wmi/README.md delete mode 100644 vendor/github.com/yusufpapurcu/wmi/swbemservices.go delete mode 100644 vendor/github.com/yusufpapurcu/wmi/wmi.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/LICENSE delete mode 100644 vendor/go.etcd.io/etcd/api/v3/authpb/auth.pb.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/authpb/auth.proto delete mode 100644 vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.pb.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.proto delete mode 100644 vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.pb.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.proto delete mode 100644 vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal_stringer.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.pb.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.proto delete mode 100644 vendor/go.etcd.io/etcd/api/v3/membershippb/membership.pb.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/membershippb/membership.proto delete mode 100644 vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.pb.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.proto delete mode 100644 vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/doc.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/error.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/md.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/metadatafields.go delete mode 100644 vendor/go.etcd.io/etcd/api/v3/version/version.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/LICENSE delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/logutil/doc.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/logutil/log_level.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap_journal.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/systemd/doc.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/systemd/journal.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/cipher_suites.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/doc.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/tlsutil.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/versions.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/types/doc.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/types/id.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/types/set.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/types/slice.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/types/urls.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/types/urlsmap.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/LICENSE delete mode 100644 vendor/go.etcd.io/etcd/client/v3/README.md delete mode 100644 vendor/go.etcd.io/etcd/client/v3/auth.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/client.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/cluster.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/compact_op.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/compare.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/concurrency/doc.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/concurrency/election.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/concurrency/key.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/concurrency/mutex.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/concurrency/session.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/concurrency/stm.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/config.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/credentials/credentials.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/ctx.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/doc.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/internal/resolver/resolver.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/kv.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/lease.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/logger.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/maintenance.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/op.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/options.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/retry.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/retry_interceptor.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/sort.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/txn.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/utils.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/watch.go delete mode 100644 vendor/go.etcd.io/etcd/client/v3/yaml/config.go create mode 100644 vendor/go.opentelemetry.io/otel/attribute/README.md create mode 100644 vendor/go.opentelemetry.io/otel/baggage/README.md create mode 100644 vendor/go.opentelemetry.io/otel/codes/README.md create mode 100644 vendor/go.opentelemetry.io/otel/metric/README.md create mode 100644 vendor/go.opentelemetry.io/otel/metric/embedded/README.md create mode 100644 vendor/go.opentelemetry.io/otel/propagation/README.md create mode 100644 vendor/go.opentelemetry.io/otel/renovate.json delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/internal/v2/http.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/internal/v2/net.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.17.0/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.17.0/event.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.17.0/exception.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.17.0/http.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.17.0/httpconv/http.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.17.0/resource.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.17.0/schema.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.17.0/trace.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md create mode 100644 vendor/go.opentelemetry.io/otel/trace/README.md create mode 100644 vendor/go.opentelemetry.io/otel/trace/embedded/README.md create mode 100644 vendor/go.opentelemetry.io/otel/verify_readmes.sh delete mode 100644 vendor/go.uber.org/dig/.codecov.yml delete mode 100644 vendor/go.uber.org/dig/.gitignore delete mode 100644 vendor/go.uber.org/dig/CHANGELOG.md delete mode 100644 vendor/go.uber.org/dig/LICENSE delete mode 100644 vendor/go.uber.org/dig/Makefile delete mode 100644 vendor/go.uber.org/dig/README.md delete mode 100644 vendor/go.uber.org/dig/callback.go delete mode 100644 vendor/go.uber.org/dig/check_license.sh delete mode 100644 vendor/go.uber.org/dig/constructor.go delete mode 100644 vendor/go.uber.org/dig/container.go delete mode 100644 vendor/go.uber.org/dig/cycle_error.go delete mode 100644 vendor/go.uber.org/dig/decorate.go delete mode 100644 vendor/go.uber.org/dig/doc.go delete mode 100644 vendor/go.uber.org/dig/error.go delete mode 100644 vendor/go.uber.org/dig/glide.yaml delete mode 100644 vendor/go.uber.org/dig/graph.go delete mode 100644 vendor/go.uber.org/dig/group.go delete mode 100644 vendor/go.uber.org/dig/inout.go delete mode 100644 vendor/go.uber.org/dig/internal/digerror/errors.go delete mode 100644 vendor/go.uber.org/dig/internal/digreflect/func.go delete mode 100644 vendor/go.uber.org/dig/internal/dot/README.md delete mode 100644 vendor/go.uber.org/dig/internal/dot/graph.go delete mode 100644 vendor/go.uber.org/dig/internal/graph/graph.go delete mode 100644 vendor/go.uber.org/dig/invoke.go delete mode 100644 vendor/go.uber.org/dig/param.go delete mode 100644 vendor/go.uber.org/dig/provide.go delete mode 100644 vendor/go.uber.org/dig/result.go delete mode 100644 vendor/go.uber.org/dig/scope.go delete mode 100644 vendor/go.uber.org/dig/version.go delete mode 100644 vendor/go.uber.org/dig/visualize.go delete mode 100644 vendor/go.uber.org/zap/.codecov.yml delete mode 100644 vendor/go.uber.org/zap/.gitignore delete mode 100644 vendor/go.uber.org/zap/.golangci.yml delete mode 100644 vendor/go.uber.org/zap/.readme.tmpl delete mode 100644 vendor/go.uber.org/zap/CHANGELOG.md delete mode 100644 vendor/go.uber.org/zap/CODE_OF_CONDUCT.md delete mode 100644 vendor/go.uber.org/zap/CONTRIBUTING.md delete mode 100644 vendor/go.uber.org/zap/FAQ.md delete mode 100644 vendor/go.uber.org/zap/LICENSE.txt delete mode 100644 vendor/go.uber.org/zap/Makefile delete mode 100644 vendor/go.uber.org/zap/README.md delete mode 100644 vendor/go.uber.org/zap/array.go delete mode 100644 vendor/go.uber.org/zap/buffer/buffer.go delete mode 100644 vendor/go.uber.org/zap/buffer/pool.go delete mode 100644 vendor/go.uber.org/zap/checklicense.sh delete mode 100644 vendor/go.uber.org/zap/config.go delete mode 100644 vendor/go.uber.org/zap/doc.go delete mode 100644 vendor/go.uber.org/zap/encoder.go delete mode 100644 vendor/go.uber.org/zap/error.go delete mode 100644 vendor/go.uber.org/zap/field.go delete mode 100644 vendor/go.uber.org/zap/flag.go delete mode 100644 vendor/go.uber.org/zap/glide.yaml delete mode 100644 vendor/go.uber.org/zap/global.go delete mode 100644 vendor/go.uber.org/zap/http_handler.go delete mode 100644 vendor/go.uber.org/zap/internal/bufferpool/bufferpool.go delete mode 100644 vendor/go.uber.org/zap/internal/color/color.go delete mode 100644 vendor/go.uber.org/zap/internal/exit/exit.go delete mode 100644 vendor/go.uber.org/zap/internal/level_enabler.go delete mode 100644 vendor/go.uber.org/zap/internal/pool/pool.go delete mode 100644 vendor/go.uber.org/zap/internal/stacktrace/stack.go delete mode 100644 vendor/go.uber.org/zap/level.go delete mode 100644 vendor/go.uber.org/zap/logger.go delete mode 100644 vendor/go.uber.org/zap/options.go delete mode 100644 vendor/go.uber.org/zap/sink.go delete mode 100644 vendor/go.uber.org/zap/sugar.go delete mode 100644 vendor/go.uber.org/zap/time.go delete mode 100644 vendor/go.uber.org/zap/writer.go delete mode 100644 vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go delete mode 100644 vendor/go.uber.org/zap/zapcore/clock.go delete mode 100644 vendor/go.uber.org/zap/zapcore/console_encoder.go delete mode 100644 vendor/go.uber.org/zap/zapcore/core.go delete mode 100644 vendor/go.uber.org/zap/zapcore/doc.go delete mode 100644 vendor/go.uber.org/zap/zapcore/encoder.go delete mode 100644 vendor/go.uber.org/zap/zapcore/entry.go delete mode 100644 vendor/go.uber.org/zap/zapcore/error.go delete mode 100644 vendor/go.uber.org/zap/zapcore/field.go delete mode 100644 vendor/go.uber.org/zap/zapcore/hook.go delete mode 100644 vendor/go.uber.org/zap/zapcore/increase_level.go delete mode 100644 vendor/go.uber.org/zap/zapcore/json_encoder.go delete mode 100644 vendor/go.uber.org/zap/zapcore/lazy_with.go delete mode 100644 vendor/go.uber.org/zap/zapcore/level.go delete mode 100644 vendor/go.uber.org/zap/zapcore/level_strings.go delete mode 100644 vendor/go.uber.org/zap/zapcore/marshaler.go delete mode 100644 vendor/go.uber.org/zap/zapcore/memory_encoder.go delete mode 100644 vendor/go.uber.org/zap/zapcore/reflected_encoder.go delete mode 100644 vendor/go.uber.org/zap/zapcore/sampler.go delete mode 100644 vendor/go.uber.org/zap/zapcore/tee.go delete mode 100644 vendor/go.uber.org/zap/zapcore/write_syncer.go delete mode 100644 vendor/go.uber.org/zap/zapgrpc/zapgrpc.go create mode 100644 vendor/golang.org/x/net/websocket/client.go create mode 100644 vendor/golang.org/x/net/websocket/dial.go create mode 100644 vendor/golang.org/x/net/websocket/hybi.go create mode 100644 vendor/golang.org/x/net/websocket/server.go create mode 100644 vendor/golang.org/x/net/websocket/websocket.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go delete mode 100644 vendor/google.golang.org/grpc/resolver/manual/manual.go rename vendor/k8s.io/{component-base/config => api/apidiscovery/v2}/doc.go (75%) create mode 100644 vendor/k8s.io/api/apidiscovery/v2/generated.pb.go create mode 100644 vendor/k8s.io/api/apidiscovery/v2/generated.proto rename vendor/{github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1 => k8s.io/api/apidiscovery/v2}/register.go (54%) create mode 100644 vendor/k8s.io/api/apidiscovery/v2/types.go create mode 100644 vendor/k8s.io/api/apidiscovery/v2/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/api/resource/v1alpha2/namedresources.go create mode 100644 vendor/k8s.io/api/storagemigration/v1alpha1/doc.go create mode 100644 vendor/k8s.io/api/storagemigration/v1alpha1/generated.pb.go create mode 100644 vendor/k8s.io/api/storagemigration/v1alpha1/generated.proto create mode 100644 vendor/k8s.io/api/storagemigration/v1alpha1/register.go create mode 100644 vendor/k8s.io/api/storagemigration/v1alpha1/types.go create mode 100644 vendor/k8s.io/api/storagemigration/v1alpha1/types_swagger_doc_generated.go create mode 100644 vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go create mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/register.go delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/duration/duration.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/doc.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/stream.go rename pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/empty.go => vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go (62%) delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS create mode 100644 vendor/k8s.io/apiserver/pkg/cel/cidr.go create mode 100644 vendor/k8s.io/apiserver/pkg/cel/ip.go create mode 100644 vendor/k8s.io/apiserver/pkg/cel/library/cidr.go create mode 100644 vendor/k8s.io/apiserver/pkg/cel/library/ip.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresultmodel.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesallocationresult.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattribute.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattributevalue.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesfilter.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesinstance.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesintslice.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesrequest.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesresources.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesstringslice.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefiltermodel.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcemodel.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequestmodel.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceslice.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/groupversionresource.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/migrationcondition.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigration.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationspec.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationstatus.go create mode 100644 vendor/k8s.io/client-go/features/envvar.go create mode 100644 vendor/k8s.io/client-go/features/features.go create mode 100644 vendor/k8s.io/client-go/features/known_features.go create mode 100644 vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingadmissionpolicy.go create mode 100644 vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingadmissionpolicybinding.go create mode 100644 vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimparameters.go create mode 100644 vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceclassparameters.go create mode 100644 vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceslice.go create mode 100644 vendor/k8s.io/client-go/informers/storagemigration/interface.go create mode 100644 vendor/k8s.io/client-go/informers/storagemigration/v1alpha1/interface.go create mode 100644 vendor/k8s.io/client-go/informers/storagemigration/v1alpha1/storageversionmigration.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingadmissionpolicy.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingadmissionpolicybinding.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimparameters.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclassparameters.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceslice.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go rename {pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets => vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1}/doc.go (81%) rename vendor/k8s.io/{apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 => client-go/kubernetes/typed/storagemigration/v1alpha1}/fake/doc.go (100%) rename vendor/k8s.io/{apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_apiextensions_client.go => client-go/kubernetes/typed/storagemigration/v1alpha1/fake/fake_storagemigration_client.go} (72%) create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake/fake_storageversionmigration.go rename vendor/k8s.io/{apiextensions-apiserver/pkg/client/clientset/clientset/fake/doc.go => client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go} (88%) create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storagemigration_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go create mode 100644 vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingadmissionpolicy.go create mode 100644 vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingadmissionpolicybinding.go create mode 100644 vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimparameters.go create mode 100644 vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceclassparameters.go create mode 100644 vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceslice.go create mode 100644 vendor/k8s.io/client-go/listers/storagemigration/v1alpha1/expansion_generated.go create mode 100644 vendor/k8s.io/client-go/listers/storagemigration/v1alpha1/storageversionmigration.go create mode 100644 vendor/k8s.io/client-go/tools/portforward/OWNERS create mode 100644 vendor/k8s.io/client-go/tools/portforward/fallback_dialer.go create mode 100644 vendor/k8s.io/client-go/tools/portforward/tunneling_connection.go create mode 100644 vendor/k8s.io/client-go/tools/portforward/tunneling_dialer.go create mode 100644 vendor/k8s.io/client-go/tools/remotecommand/OWNERS rename vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/{packages.go => targets.go} (64%) delete mode 100644 vendor/k8s.io/code-generator/cmd/client-gen/path/path.go rename {pkg/k8s/vendor/k8s.io/gengo/examples => vendor/k8s.io/code-generator/cmd}/deepcopy-gen/generators/deepcopy.go (86%) rename {pkg/k8s/vendor/k8s.io/gengo/examples => vendor/k8s.io/code-generator/cmd}/defaulter-gen/generators/defaulter.go (87%) delete mode 100644 vendor/k8s.io/code-generator/cmd/import-boss/.gitignore delete mode 100644 vendor/k8s.io/code-generator/cmd/import-boss/README.md delete mode 100644 vendor/k8s.io/code-generator/cmd/import-boss/main.go rename pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go => vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go (56%) delete mode 100644 vendor/k8s.io/code-generator/cmd/openapi-gen/main.go rename vendor/k8s.io/code-generator/cmd/register-gen/generators/{packages.go => targets.go} (74%) delete mode 100644 vendor/k8s.io/code-generator/cmd/set-gen/.gitignore delete mode 100644 vendor/k8s.io/code-generator/cmd/set-gen/main.go delete mode 100644 vendor/k8s.io/code-generator/pkg/util/build.go delete mode 100644 vendor/k8s.io/component-base/config/types.go delete mode 100644 vendor/k8s.io/component-base/config/v1alpha1/conversion.go delete mode 100644 vendor/k8s.io/component-base/config/v1alpha1/defaults.go delete mode 100644 vendor/k8s.io/component-base/config/v1alpha1/register.go delete mode 100644 vendor/k8s.io/component-base/config/v1alpha1/types.go delete mode 100644 vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go delete mode 100644 vendor/k8s.io/component-base/config/v1alpha1/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/component-base/config/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/gengo/LICENSE delete mode 100644 vendor/k8s.io/gengo/args/args.go delete mode 100644 vendor/k8s.io/gengo/examples/import-boss/generators/import_restrict.go delete mode 100644 vendor/k8s.io/gengo/examples/set-gen/generators/sets.go delete mode 100644 vendor/k8s.io/gengo/examples/set-gen/sets/byte.go delete mode 100644 vendor/k8s.io/gengo/examples/set-gen/sets/empty.go delete mode 100644 vendor/k8s.io/gengo/examples/set-gen/sets/int.go delete mode 100644 vendor/k8s.io/gengo/examples/set-gen/sets/int64.go delete mode 100644 vendor/k8s.io/gengo/examples/set-gen/sets/string.go delete mode 100644 vendor/k8s.io/gengo/generator/default_generator.go delete mode 100644 vendor/k8s.io/gengo/generator/default_package.go delete mode 100644 vendor/k8s.io/gengo/generator/doc.go delete mode 100644 vendor/k8s.io/gengo/generator/error_tracker.go delete mode 100644 vendor/k8s.io/gengo/generator/execute.go delete mode 100644 vendor/k8s.io/gengo/generator/import_tracker.go delete mode 100644 vendor/k8s.io/gengo/generator/transitive_closure.go delete mode 100644 vendor/k8s.io/gengo/namer/import_tracker.go delete mode 100644 vendor/k8s.io/gengo/namer/namer.go delete mode 100644 vendor/k8s.io/gengo/namer/order.go delete mode 100644 vendor/k8s.io/gengo/parser/parse.go delete mode 100644 vendor/k8s.io/gengo/types/comments.go delete mode 100644 vendor/k8s.io/gengo/types/flatten.go delete mode 100644 vendor/k8s.io/gengo/types/types.go delete mode 100644 vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/README.md delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/config.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/enum.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/extension.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/markers.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/openapi.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/rules/OWNERS delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/rules/doc.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/rules/idl_tag.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/rules/omitempty_match_case.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/generators/union.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/util/sets/empty.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/util/sets/string.go delete mode 100644 vendor/k8s.io/utils/integer/integer.go delete mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/config/config.go delete mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/config/doc.go delete mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/doc.go delete mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/register.go delete mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/types.go delete mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/zz_generated.deepcopy.go create mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/internal/syncs/syncs.go rename vendor/{k8s.io/gengo/examples/set-gen/generators/tags.go => sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_other.go} (57%) rename pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/generators/tags.go => vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_unix.go (51%) diff --git a/api/go.mod b/api/go.mod index 3d916b41f98..0d2c5b6f5dd 100644 --- a/api/go.mod +++ b/api/go.mod @@ -20,7 +20,7 @@ require ( golang.org/x/net v0.28.0 // indirect golang.org/x/sys v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/api/go.sum b/api/go.sum index 60cf8f98779..088b3dd9ed3 100644 --- a/api/go.sum +++ b/api/go.sum @@ -5,18 +5,14 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8Yc github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -30,8 +26,8 @@ golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/api/vendor/modules.txt b/api/vendor/modules.txt index 5dfa202b962..5ea542fc09f 100644 --- a/api/vendor/modules.txt +++ b/api/vendor/modules.txt @@ -34,7 +34,7 @@ golang.org/x/text/secure/bidirule golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm -# google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 ## explicit; go 1.20 google.golang.org/genproto/googleapis/rpc/status # google.golang.org/grpc v1.65.0 diff --git a/contrib/tetragon-rthooks/go.mod b/contrib/tetragon-rthooks/go.mod index 7decac37757..a5913d51e2a 100644 --- a/contrib/tetragon-rthooks/go.mod +++ b/contrib/tetragon-rthooks/go.mod @@ -46,7 +46,7 @@ require ( golang.org/x/sys v0.24.0 // indirect golang.org/x/text v0.17.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/cri-api v0.27.1 // indirect diff --git a/contrib/tetragon-rthooks/go.sum b/contrib/tetragon-rthooks/go.sum index d0a94ebbe93..f042667d29d 100644 --- a/contrib/tetragon-rthooks/go.sum +++ b/contrib/tetragon-rthooks/go.sum @@ -144,8 +144,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= diff --git a/contrib/tetragon-rthooks/vendor/modules.txt b/contrib/tetragon-rthooks/vendor/modules.txt index ca6d63f18e6..f606a03aaf7 100644 --- a/contrib/tetragon-rthooks/vendor/modules.txt +++ b/contrib/tetragon-rthooks/vendor/modules.txt @@ -172,7 +172,7 @@ golang.org/x/text/unicode/norm # google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 ## explicit; go 1.20 google.golang.org/genproto/googleapis/api/expr/v1alpha1 -# google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 ## explicit; go 1.20 google.golang.org/genproto/googleapis/rpc/status # google.golang.org/grpc v1.65.0 diff --git a/go.mod b/go.mod index 13ffb51d964..d5150dc7175 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ toolchain go1.22.3 require ( github.com/bombsimon/logrusr/v4 v4.1.0 - github.com/cilium/cilium v1.15.7 + github.com/cilium/cilium v1.16.1 github.com/cilium/ebpf v0.16.0 github.com/cilium/little-vm-helper v0.0.19 github.com/cilium/lumberjack/v2 v2.3.0 @@ -32,7 +32,7 @@ require ( github.com/prometheus/procfs v0.15.1 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.1 - github.com/spf13/pflag v1.0.5 + github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace github.com/spf13/viper v1.19.0 github.com/sryoya/protorand v0.0.0-20240429201223-e7440656b2a4 github.com/stretchr/testify v1.9.0 @@ -47,33 +47,28 @@ require ( google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.29.8 - k8s.io/apiextensions-apiserver v0.29.8 - k8s.io/apimachinery v0.29.8 - k8s.io/client-go v0.29.8 - k8s.io/code-generator v0.29.8 - k8s.io/cri-api v0.30.4 + k8s.io/api v0.30.3 + k8s.io/apiextensions-apiserver v0.30.2 + k8s.io/apimachinery v0.30.3 + k8s.io/client-go v0.30.3 + k8s.io/code-generator v0.30.2 + k8s.io/cri-api v0.31.0 k8s.io/klog/v2 v2.120.1 k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f - sigs.k8s.io/controller-runtime v0.16.6 - sigs.k8s.io/controller-tools v0.14.0 + sigs.k8s.io/controller-runtime v0.18.4 + sigs.k8s.io/controller-tools v0.15.0 sigs.k8s.io/e2e-framework v0.2.0 sigs.k8s.io/yaml v1.4.0 ) require ( - cel.dev/expr v0.15.0 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9 // indirect - github.com/armon/go-metrics v0.4.1 // indirect + github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cilium/proxy v0.0.0-20231031145409-f19708f3d018 // indirect - github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b // indirect - github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect @@ -81,59 +76,42 @@ require ( github.com/docker/docker v27.1.1+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/emicklei/go-restful/v3 v3.11.2 // indirect - github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect - github.com/evanphx/json-patch v5.7.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.7.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.0 // indirect + github.com/evanphx/json-patch v5.9.0+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/analysis v0.21.4 // indirect + github.com/go-openapi/analysis v0.23.0 // indirect github.com/go-openapi/errors v0.22.0 // indirect - github.com/go-openapi/jsonpointer v0.20.2 // indirect - github.com/go-openapi/jsonreference v0.20.4 // indirect - github.com/go-openapi/loads v0.21.2 // indirect - github.com/go-openapi/runtime v0.26.2 // indirect - github.com/go-openapi/spec v0.20.11 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/loads v0.22.0 // indirect + github.com/go-openapi/spec v0.21.0 // indirect github.com/go-openapi/strfmt v0.23.0 // indirect - github.com/go-openapi/swag v0.22.7 // indirect - github.com/go-openapi/validate v0.22.3 // indirect + github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/validate v0.24.0 // indirect github.com/gobuffalo/flect v1.0.2 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/cel-go v0.17.7 // indirect + github.com/google/cel-go v0.20.1 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/gopacket v1.1.19 // indirect github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect - github.com/hashicorp/consul/api v1.28.2 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect - github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/serf v0.10.1 // indirect + github.com/hashicorp/hcl v1.0.1-vault-5 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/kr/pretty v0.3.1 // indirect - github.com/kr/text v0.2.0 // indirect - github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/mackerelio/go-osstat v0.2.5 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/spdystream v0.2.0 // indirect @@ -146,19 +124,15 @@ require ( github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/common v0.48.0 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/shirou/gopsutil/v3 v3.23.7 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect @@ -166,21 +140,14 @@ require ( github.com/subosito/gotenv v1.6.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/tklauser/go-sysconf v0.3.11 // indirect - github.com/tklauser/numcpus v0.6.0 // indirect github.com/vishvananda/netns v0.0.4 // indirect github.com/vladimirvivien/gexe v0.2.0 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.etcd.io/etcd/api/v3 v3.5.12 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.12 // indirect - go.etcd.io/etcd/client/v3 v3.5.12 // indirect go.mongodb.org/mongo-driver v1.14.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - go.uber.org/dig v1.17.1 // indirect - go.uber.org/zap v1.26.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect golang.org/x/mod v0.20.0 // indirect golang.org/x/net v0.28.0 // indirect @@ -191,15 +158,14 @@ require ( gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/apiserver v0.29.8 // indirect - k8s.io/component-base v0.29.8 // indirect - k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect + k8s.io/apiserver v0.30.3 // indirect + k8s.io/component-base v0.30.3 // indirect k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect - k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect + k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) @@ -212,12 +178,12 @@ replace ( // This replace directive has to be in sync with with github.com/cilium/cilium. // If the github.com/cilium/cilium version is bumped, the sync must be -// refreshed. As of now we use tag v1.14.0, see the replace directive: -// https://github.com/cilium/cilium/blob/v1.14/go.mod#L259-L271 +// refreshed. As of now we use tag v1.16.0, see the replace directive: +// https://github.com/cilium/cilium/blob/v1.16.1/go.mod#L285-L291 replace ( go.universe.tf/metallb => github.com/cilium/metallb v0.1.1-0.20220829170633-5d7dfb1129f7 // Using private fork of controller-tools. See commit msg for more context // as to why we are using a private fork. - sigs.k8s.io/controller-tools => github.com/cilium/controller-tools v0.8.0-1 + sigs.k8s.io/controller-tools => github.com/cilium/controller-tools v0.8.0-2 ) diff --git a/go.sum b/go.sum index 67967efe20b..c81f56edce8 100644 --- a/go.sum +++ b/go.sum @@ -1,44 +1,25 @@ -cel.dev/expr v0.15.0 h1:O1jzfJCQBfL5BFoYktaxwIhuttaQPsVWerH9/EEKx0w= -cel.dev/expr v0.15.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9 h1:goHVqTbFX3AIo0tzGr14pgfAW2ZfPChKO21Z9MGf/gk= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= +github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bombsimon/logrusr/v4 v4.1.0 h1:uZNPbwusB0eUXlO8hIUwStE6Lr5bLN6IgYgG+75kuh4= @@ -46,27 +27,23 @@ github.com/bombsimon/logrusr/v4 v4.1.0/go.mod h1:pjfHC5e59CvjTBIU3V3sGhFWFAnsnhO github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= -github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cilium/checkmate v1.0.3 h1:CQC5eOmlAZeEjPrVZY3ZwEBH64lHlx9mXYdUehEwI5w= -github.com/cilium/checkmate v1.0.3/go.mod h1:KiBTasf39/F2hf2yAmHw21YFl3hcEyP4Yk6filxc12A= -github.com/cilium/cilium v1.15.7 h1:7LwGfAW/fR/VFcm6zlESjE2Ut5vJWe+kdWq3RNJrNRc= -github.com/cilium/cilium v1.15.7/go.mod h1:6Ml8eeyWjMJKDeadutWhn5NibMps0H+yLOgfKBoHTUs= -github.com/cilium/controller-tools v0.8.0-1 h1:D5xhwSUZZceaKAacHOyfcpUMgLbs2TGeJEijNHlAQlc= -github.com/cilium/controller-tools v0.8.0-1/go.mod h1:qE2DXhVOiEq5ijmINcFbqi9GZrrUjzB1TuJU0xa6eoY= +github.com/cilium/cilium v1.16.1 h1:7FiLrRJbO3d/RE423FUN0GxhrFDQBYRwr1veHN7uBys= +github.com/cilium/cilium v1.16.1/go.mod h1:SIurqFNFBU9/sQTPC9tvrOktAMDnQOGPBCSYtsnjxp4= +github.com/cilium/controller-tools v0.8.0-2 h1:QkYiSOyZz4Aww7JrvoH/8DjuEZ/Hlq2VREWe2Sb2NTQ= +github.com/cilium/controller-tools v0.8.0-2/go.mod h1:qE2DXhVOiEq5ijmINcFbqi9GZrrUjzB1TuJU0xa6eoY= github.com/cilium/ebpf v0.16.0 h1:+BiEnHL6Z7lXnlGUsXQPPAE7+kenAd4ES8MQ5min0Ok= github.com/cilium/ebpf v0.16.0/go.mod h1:L7u2Blt2jMM/vLAVgjxluxtBKlz3/GWjB0dMOEngfwE= +github.com/cilium/hive v0.0.0-20240529072208-d997f86e4219 h1:iX4v9lg63iTv8x8MWUMVbeWqtAGcV6yh/w3Zp9sP3ME= +github.com/cilium/hive v0.0.0-20240529072208-d997f86e4219/go.mod h1:6tW1eCwSq8Wz8IVtpZE0MemoCWSrEOUa8aLKotmBRCo= github.com/cilium/little-vm-helper v0.0.19 h1:eJeJM/03MGLrLUXXTBDZo2JoX5cIbm5+9iWjoHgpy/M= github.com/cilium/little-vm-helper v0.0.19/go.mod h1:X3HGJKJ3/8vqP06VyajvD0nNDLYnGv96W8jWx4m3I7g= github.com/cilium/lumberjack/v2 v2.3.0 h1:IhVJMvPpqDYmQzC0KDhAoy7KlaRsyOsZnT97Nsa3u0o= github.com/cilium/lumberjack/v2 v2.3.0/go.mod h1:yfbtPGmg4i//5oEqzaMxDqSWqgfZFmMoV70Mc2k6v0A= -github.com/cilium/proxy v0.0.0-20231031145409-f19708f3d018 h1:R/QlThqx099hS6req1k2Q87fvLSRgCEicQGate9vxO4= -github.com/cilium/proxy v0.0.0-20231031145409-f19708f3d018/go.mod h1:p044XccCmONGIUbx3bJ7qvHXK0RcrdvIvbTGiu/RjUA= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/cilium/proxy v0.0.0-20240418093727-2c7164c53e26 h1:wzm/nEkcMO6oGSySoqe3/bMcF1sxrxI2ByidN3gg30A= +github.com/cilium/proxy v0.0.0-20240418093727-2c7164c53e26/go.mod h1:jzAmtWhlyR3kx+AwYdQvGM04lmHwsWhq1ySfAVpY/SA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= @@ -76,8 +53,6 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b h1:ga8SEFjZ60pxLcmhnThWgvH2wg8376yUJmPhEH4H3kw= -github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= @@ -107,8 +82,8 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/emicklei/go-restful/v3 v3.11.2 h1:1onLa9DcsMYO9P+CXaL0dStDqQ2EHHXLiz+BtnqkLAU= -github.com/emicklei/go-restful/v3 v3.11.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk= +github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -117,15 +92,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= -github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= -github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= -github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= -github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= +github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -141,52 +111,35 @@ github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+ github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= -github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= -github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= -github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= +github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= +github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= github.com/go-openapi/errors v0.22.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= -github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= -github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= -github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= -github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= -github.com/go-openapi/runtime v0.26.2 h1:elWyB9MacRzvIVgAZCBJmqTi7hBzU0hlKD4IvfX0Zl0= -github.com/go-openapi/runtime v0.26.2/go.mod h1:O034jyRZ557uJKzngbMDJXkcKJVzXJiymdSfgejrcRw= -github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/spec v0.20.11 h1:J/TzFDLTt4Rcl/l1PmyErvkqlJDncGvPTMnCI39I4gY= -github.com/go-openapi/spec v0.20.11/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/loads v0.22.0 h1:ECPGd4jX1U6NApCGG1We+uEozOAvXvJSF4nnwHZ8Aco= +github.com/go-openapi/loads v0.22.0/go.mod h1:yLsaTCS92mnSAZX5WWoxszLj0u+Ojl+Zs5Stn1oF+rs= +github.com/go-openapi/runtime v0.28.0 h1:gpPPmWSNGo214l6n8hzdXYhPuJcGtziTOgUpvsFWGIQ= +github.com/go-openapi/runtime v0.28.0/go.mod h1:QN7OzcS+XuYmkQLw05akXk0jRH/eZ3kb18+1KwW9gyc= +github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= +github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= -github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= -github.com/go-openapi/validate v0.22.3 h1:KxG9mu5HBRYbecRb37KRCihvGGtND2aXziBAv0NNfyI= -github.com/go-openapi/validate v0.22.3/go.mod h1:kVxh31KbfsxU8ZyoHaDbLBWU5CnMdqBUEtadQ2G4d5M= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= +github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= @@ -195,7 +148,6 @@ github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnD github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -203,7 +155,6 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -218,12 +169,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.17.7 h1:6ebJFzu1xO2n7TLtN+UBqShGBhlD85bhvglh5DpcfqQ= -github.com/google/cel-go v0.17.7/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= +github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -231,14 +178,12 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= @@ -247,7 +192,6 @@ github.com/google/gops v0.3.28 h1:2Xr57tqKAmQYRAfG12E+yLcoa2Y42UJo2lOrUFL9ark= github.com/google/gops v0.3.28/go.mod h1:6f6+Nl8LcHrzJwi8+p0ii+vmBFSlB4f8cOOkTJ7sk4c= github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -264,54 +208,10 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= -github.com/hashicorp/consul/api v1.28.2 h1:mXfkRHrpHN4YY3RqL09nXU1eHKLNiuAN4kHvDQ16k/8= -github.com/hashicorp/consul/api v1.28.2/go.mod h1:KyzqzgMEya+IZPcD65YFoOVAgPpbfERu4I/tzG6/ueE= -github.com/hashicorp/consul/sdk v0.16.0 h1:SE9m0W6DEfgIVCJX7xU+iv/hUl4m/nxqMTnCdMxDpJ8= -github.com/hashicorp/consul/sdk v0.16.0/go.mod h1:7pxqqhqoaPqnBnzXD1StKed62LqJeClzVsUEy85Zr0A= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= -github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= -github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= -github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= -github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31RPDgJM= +github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= @@ -330,22 +230,14 @@ github.com/jpillora/longestcommon v0.0.0-20161227235612-adb9d91ee629 h1:1dSBUfGl github.com/jpillora/longestcommon v0.0.0-20161227235612-adb9d91ee629/go.mod h1:mb5nS4uRANwOJSZj8rlCWAfAcGi72GGMIXx+xGOjA7M= github.com/jsimonetti/rtnetlink/v2 v2.0.1 h1:xda7qaHDSVOsADNouv7ukSuicKZO7GgVUCXxpaIEIlM= github.com/jsimonetti/rtnetlink/v2 v2.0.1/go.mod h1:7MoNYNbb3UaDHtF8udiJo/RH6VsTKP1pqKLUTVCvToE= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -353,46 +245,23 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/mackerelio/go-osstat v0.2.5 h1:+MqTbZUhoIt4m8qzkVoXUJg1EuifwlAJSk4Yl2GXh+o= +github.com/mackerelio/go-osstat v0.2.5/go.mod h1:atxwWF+POUZcdtR1wnsUcQxTytoHG4uhl2AKKzrOajY= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g= github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw= github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U= github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA= github.com/mennanov/fieldmask-utils v1.1.2 h1:f5hd3hYeWdl+q2thiKYyZZmqTqn90uayWG03bca9U+E= github.com/mennanov/fieldmask-utils v1.1.2/go.mod h1:xRqd9Fjz/gFEDYCQw7pxGouxqLhSPrkOdx2yhEAXEls= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= @@ -404,19 +273,14 @@ github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= @@ -435,70 +299,39 @@ github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b h1:FfH+VrHHk6Lxt9HdVS0PXzSXFyS2NbZKXv33FYPol0A= github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b/go.mod h1:AC62GU6hc0BrNm+9RK9VSiwa/EUe1bkIeFORAMcHvJU= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/shirou/gopsutil/v3 v3.23.7 h1:C+fHO8hfIppoJ1WdsVm1RoI0RwXoNdfTK7yWXV0wVj4= -github.com/shirou/gopsutil/v3 v3.23.7/go.mod h1:c4gnmoRC0hQuaLqvxnx1//VXQ0Ms/X9UnJF8pddY5z4= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= @@ -511,8 +344,9 @@ github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace h1:9PNP1jnUjRhfmGMlkXHjYPishpcw4jpSt/V/xYY3FMA= +github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/sryoya/protorand v0.0.0-20240429201223-e7440656b2a4 h1:/jKH9ivHOUkahZs3zPfJfOmkXDFB6OdsHZ4W8gyDb/c= @@ -520,19 +354,13 @@ github.com/sryoya/protorand v0.0.0-20240429201223-e7440656b2a4/go.mod h1:9a23nlv github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= @@ -544,14 +372,8 @@ github.com/tidwall/gjson v1.17.3 h1:bwWLZU7icoKRG+C+0PNwIKC6FCJO/Q3p2pZvuP0jN94= github.com/tidwall/gjson v1.17.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= -github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= -github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= -github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/vishvananda/netlink v1.2.1 h1:pfLv/qlJUwOTPvtWREA7c3PI4u81YkqZw1DYhI2HmLA= github.com/vishvananda/netlink v1.2.1/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs= github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= @@ -560,44 +382,37 @@ github.com/vladimirvivien/gexe v0.2.0 h1:nbdAQ6vbZ+ZNsolCgSVb9Fno60kzSuvtzVh6Ytq github.com/vladimirvivien/gexe v0.2.0/go.mod h1:LHQL00w/7gDUKIak24n801ABp8C+ni6eBht9vGVst8w= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.etcd.io/etcd/api/v3 v3.5.12 h1:W4sw5ZoU2Juc9gBWuLk5U6fHfNVyY1WC5g9uiXZio/c= -go.etcd.io/etcd/api/v3 v3.5.12/go.mod h1:Ot+o0SWSyT6uHhA56al1oCED0JImsRiU9Dc26+C2a+4= -go.etcd.io/etcd/client/pkg/v3 v3.5.12 h1:EYDL6pWwyOsylrQyLp2w+HkQ46ATiOvoEdMarindU2A= -go.etcd.io/etcd/client/pkg/v3 v3.5.12/go.mod h1:seTzl2d9APP8R5Y2hFL3NVlD6qC/dOT+3kvrqPyTas4= -go.etcd.io/etcd/client/v3 v3.5.12 h1:v5lCPXn1pf1Uu3M4laUE2hp/geOTc5uPcYYsNe1lDxg= -go.etcd.io/etcd/client/v3 v3.5.12/go.mod h1:tSbBCakoWmmddL+BKVAJHa9km+O/E+bumDe9mSbPiqw= -go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= +go.etcd.io/etcd/api/v3 v3.5.14 h1:vHObSCxyB9zlF60w7qzAdTcGaglbJOpSj1Xj9+WGxq0= +go.etcd.io/etcd/api/v3 v3.5.14/go.mod h1:BmtWcRlQvwa1h3G2jvKYwIQy4PkHlDej5t7uLMUdJUU= +go.etcd.io/etcd/client/pkg/v3 v3.5.14 h1:SaNH6Y+rVEdxfpA2Jr5wkEvN6Zykme5+YnbCkxvuWxQ= +go.etcd.io/etcd/client/pkg/v3 v3.5.14/go.mod h1:8uMgAokyG1czCtIdsq+AGyYQMvpIKnSvPjFMunkgeZI= +go.etcd.io/etcd/client/v3 v3.5.14 h1:CWfRs4FDaDoSz81giL7zPpZH2Z35tbOrAJkkjMqOupg= +go.etcd.io/etcd/client/v3 v3.5.14/go.mod h1:k3XfdV/VIHy/97rqWjoUzrj9tk7GgJGH9J8L4dNXmAk= go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= -go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/dig v1.17.1 h1:Tga8Lz8PcYNsWsyHMZ1Vm0OQOUaJNDyvPImgbAu9YSc= @@ -606,16 +421,13 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M= go4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -624,29 +436,21 @@ golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeId golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -659,40 +463,19 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -703,11 +486,8 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= @@ -717,10 +497,7 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= @@ -742,8 +519,8 @@ google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUE google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -769,11 +546,7 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -784,60 +557,51 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.29.8 h1:ZBKg9clWnIGtQ5yGhNwMw2zyyrsIAQaXhZACcYNflQE= -k8s.io/api v0.29.8/go.mod h1:XlGIpmpzKGrtVca7GlgNryZJ19SvQdI808NN7fy1SgQ= -k8s.io/apiextensions-apiserver v0.29.8 h1:VkyGgClTTWs8i81O13wsTLSs9Q1PWVr0L880F2GjwUI= -k8s.io/apiextensions-apiserver v0.29.8/go.mod h1:e6dPglIfPWm9ydsXuNqefecEVDH0uLfzClJEupSk2VU= -k8s.io/apimachinery v0.29.8 h1:uBHc9WuKiTHClIspJqtR84WNpG0aOGn45HWqxgXkk8Y= -k8s.io/apimachinery v0.29.8/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y= -k8s.io/apiserver v0.29.8 h1:A1PA+cmSPm2zevCesT+Qsc1NWeucbz88mERd5TA7Ho4= -k8s.io/apiserver v0.29.8/go.mod h1:jrKeEcCNY0K/lVlZ4gITRVYx5L0pPxj+cOR2MHTAOo0= -k8s.io/client-go v0.29.8 h1:QMRKcIzqE/qawknXcsi51GdIAYN8UP39S/M5KnFu/J0= -k8s.io/client-go v0.29.8/go.mod h1:ZzrAAVrqO2jVXMb8My/jTke8n0a/mIynnA3y/1y1UB0= -k8s.io/code-generator v0.29.8 h1:RQ6kM269HlPvmX4BDyjwPwCzsV6Gqa+rtmE96t9csbg= -k8s.io/code-generator v0.29.8/go.mod h1:7TYnI0dYItL2cKuhhgPSuF3WED9uMdELgbVXFfn/joE= -k8s.io/component-base v0.29.8 h1:4LJ94/eOJpDFZFbGbRH4CEyk29a7PZr8noVe9tBJUUY= -k8s.io/component-base v0.29.8/go.mod h1:FYOQSsKgh9/+FNleq8m6cXH2Cq8fNiUnJzDROowLaqU= -k8s.io/cri-api v0.30.4 h1:Q0A3QhPUWl4xv/rgmMnCLjEn2XldsLIn2VOgTzLLpck= -k8s.io/cri-api v0.30.4/go.mod h1://4/umPJSW1ISNSNng4OwjpkvswJOQwU8rnkvO8P+xg= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/api v0.30.3 h1:ImHwK9DCsPA9uoU3rVh4QHAHHK5dTSv1nxJUapx8hoQ= +k8s.io/api v0.30.3/go.mod h1:GPc8jlzoe5JG3pb0KJCSLX5oAFIW3/qNJITlDj8BH04= +k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE= +k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw= +k8s.io/apimachinery v0.30.3 h1:q1laaWCmrszyQuSQCfNB8cFgCuDAoPszKY4ucAjDwHc= +k8s.io/apimachinery v0.30.3/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/apiserver v0.30.3 h1:QZJndA9k2MjFqpnyYv/PH+9PE0SHhx3hBho4X0vE65g= +k8s.io/apiserver v0.30.3/go.mod h1:6Oa88y1CZqnzetd2JdepO0UXzQX4ZnOekx2/PtEjrOg= +k8s.io/client-go v0.30.3 h1:bHrJu3xQZNXIi8/MoxYtZBBWQQXwy16zqJwloXXfD3k= +k8s.io/client-go v0.30.3/go.mod h1:8d4pf8vYu665/kUbsxWAQ/JDBNWqfFeZnvFiVdmx89U= +k8s.io/code-generator v0.30.2 h1:ZY1+aGkqZVwKIyGsOzquaeZ5rSfE6wZHur8z3jQAaiw= +k8s.io/code-generator v0.30.2/go.mod h1:RQP5L67QxqgkVquk704CyvWFIq0e6RCMmLTXxjE8dVA= +k8s.io/component-base v0.30.3 h1:Ci0UqKWf4oiwy8hr1+E3dsnliKnkMLZMVbWzeorlk7s= +k8s.io/component-base v0.30.3/go.mod h1:C1SshT3rGPCuNtBs14RmVD2xW0EhRSeLvBh7AGk1quA= +k8s.io/cri-api v0.31.0 h1:6o0XrhWlc1/zseGCh+aMScdXCg5nT6KCGdyx7HQkSKo= +k8s.io/cri-api v0.31.0/go.mod h1:Po3TMAYH/+KrZabi7QiwQI4a692oZcUOUThd/rqwxrI= k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f h1:0LQagt0gDpKqvIkAMPaRGcXawNMouPECM1+F9BVxEaM= k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f/go.mod h1:S9tOR0FxgyusSNR+MboCuiDpVWkAifZvaYI1Q2ubgro= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 h1:TgtAeesdhpm2SGwkQasmbeqDo8th5wOBA5h/AjTKA4I= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0/go.mod h1:VHVDI/KrK4fjnV61bE2g3sA7tiETLn8sooImelsCx3Y= -sigs.k8s.io/controller-runtime v0.16.6 h1:FiXwTuFF5ZJKmozfP2Z0j7dh6kmxP4Ou1KLfxgKKC3I= -sigs.k8s.io/controller-runtime v0.16.6/go.mod h1:+dQzkZxnylD0u49e0a+7AR+vlibEBaThmPca7lTyUsI= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 h1:/U5vjBbQn3RChhv7P11uhYvCSm5G2GaIi5AIGBS6r4c= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0/go.mod h1:z7+wmGM2dfIiLRfrC6jb5kV2Mq/sK1ZP303cxzkV5Y4= +sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= +sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= sigs.k8s.io/e2e-framework v0.2.0 h1:gD6AWWAHFcHibI69E9TgkNFhh0mVwWtRCHy2RU057jQ= sigs.k8s.io/e2e-framework v0.2.0/go.mod h1:E6JXj/V4PIlb95jsn2WrNKG+Shb45xaaI7C0+BH4PL8= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/pkg/k8s/go.mod b/pkg/k8s/go.mod index 4337e353127..fe3194fe4c7 100644 --- a/pkg/k8s/go.mod +++ b/pkg/k8s/go.mod @@ -5,26 +5,26 @@ go 1.22.0 require ( github.com/blang/semver/v4 v4.0.0 - github.com/cilium/cilium v1.15.7 + github.com/cilium/cilium v1.16.1 github.com/sirupsen/logrus v1.9.3 golang.org/x/sync v0.8.0 - k8s.io/apiextensions-apiserver v0.29.8 - k8s.io/apimachinery v0.29.8 - k8s.io/client-go v0.29.8 - k8s.io/code-generator v0.29.8 - sigs.k8s.io/controller-tools v0.14.0 + k8s.io/apiextensions-apiserver v0.30.2 + k8s.io/apimachinery v0.30.2 + k8s.io/client-go v0.30.2 + k8s.io/code-generator v0.30.2 + sigs.k8s.io/controller-tools v0.15.0 sigs.k8s.io/yaml v1.4.0 ) require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.11.2 // indirect - github.com/evanphx/json-patch v5.7.0+incompatible // indirect - github.com/fatih/color v1.16.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.0 // indirect + github.com/evanphx/json-patch v5.9.0+incompatible // indirect + github.com/fatih/color v1.17.0 // indirect github.com/go-logr/logr v1.4.1 // indirect - github.com/go-openapi/jsonpointer v0.20.2 // indirect - github.com/go-openapi/jsonreference v0.20.4 // indirect - github.com/go-openapi/swag v0.22.7 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect @@ -44,38 +44,37 @@ require ( github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect + github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace // indirect + golang.org/x/mod v0.18.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/oauth2 v0.19.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/term v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.16.1 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/protobuf v1.33.0 // indirect + golang.org/x/tools v0.22.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.29.8 // indirect - k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect - k8s.io/klog/v2 v2.120.0 // indirect - k8s.io/kube-openapi v0.0.0-20240105020646-a37d4de58910 // indirect - k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect + k8s.io/api v0.30.2 // indirect + k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect + k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108 // indirect + k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) // This replace directive has to be in sync with with github.com/cilium/cilium. // If the github.com/cilium/cilium version is bumped, the sync must be -// refreshed. As of now we use tag v1.14.0, see the replace directive: -// https://github.com/cilium/cilium/blob/v1.14/go.mod#L259-L271 +// refreshed. As of now we use tag v1.16.0, see the replace directive: +// https://github.com/cilium/cilium/blob/v1.16.1/go.mod#L285-L291 replace ( go.universe.tf/metallb => github.com/cilium/metallb v0.1.1-0.20220829170633-5d7dfb1129f7 // Using private fork of controller-tools. See commit msg for more context // as to why we are using a private fork. - sigs.k8s.io/controller-tools => github.com/cilium/controller-tools v0.8.0-1 + sigs.k8s.io/controller-tools => github.com/cilium/controller-tools v0.8.0-2 ) diff --git a/pkg/k8s/go.sum b/pkg/k8s/go.sum index f75b63a8a16..760d36ddb5d 100644 --- a/pkg/k8s/go.sum +++ b/pkg/k8s/go.sum @@ -1,52 +1,44 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/cilium/checkmate v1.0.3 h1:CQC5eOmlAZeEjPrVZY3ZwEBH64lHlx9mXYdUehEwI5w= -github.com/cilium/checkmate v1.0.3/go.mod h1:KiBTasf39/F2hf2yAmHw21YFl3hcEyP4Yk6filxc12A= -github.com/cilium/cilium v1.15.7 h1:7LwGfAW/fR/VFcm6zlESjE2Ut5vJWe+kdWq3RNJrNRc= -github.com/cilium/cilium v1.15.7/go.mod h1:6Ml8eeyWjMJKDeadutWhn5NibMps0H+yLOgfKBoHTUs= -github.com/cilium/controller-tools v0.8.0-1 h1:D5xhwSUZZceaKAacHOyfcpUMgLbs2TGeJEijNHlAQlc= -github.com/cilium/controller-tools v0.8.0-1/go.mod h1:qE2DXhVOiEq5ijmINcFbqi9GZrrUjzB1TuJU0xa6eoY= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cilium/cilium v1.16.1 h1:7FiLrRJbO3d/RE423FUN0GxhrFDQBYRwr1veHN7uBys= +github.com/cilium/cilium v1.16.1/go.mod h1:SIurqFNFBU9/sQTPC9tvrOktAMDnQOGPBCSYtsnjxp4= +github.com/cilium/controller-tools v0.8.0-2 h1:QkYiSOyZz4Aww7JrvoH/8DjuEZ/Hlq2VREWe2Sb2NTQ= +github.com/cilium/controller-tools v0.8.0-2/go.mod h1:qE2DXhVOiEq5ijmINcFbqi9GZrrUjzB1TuJU0xa6eoY= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.11.2 h1:1onLa9DcsMYO9P+CXaL0dStDqQ2EHHXLiz+BtnqkLAU= -github.com/emicklei/go-restful/v3 v3.11.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= -github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= -github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk= +github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= +github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= -github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= -github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= -github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= -github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= -github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= @@ -61,11 +53,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= @@ -86,10 +75,10 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -104,10 +93,11 @@ github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71e github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace h1:9PNP1jnUjRhfmGMlkXHjYPishpcw4jpSt/V/xYY3FMA= +github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -120,76 +110,55 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/oauth2 v0.19.0 h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg= +golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -202,29 +171,27 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.29.8 h1:ZBKg9clWnIGtQ5yGhNwMw2zyyrsIAQaXhZACcYNflQE= -k8s.io/api v0.29.8/go.mod h1:XlGIpmpzKGrtVca7GlgNryZJ19SvQdI808NN7fy1SgQ= -k8s.io/apiextensions-apiserver v0.29.8 h1:VkyGgClTTWs8i81O13wsTLSs9Q1PWVr0L880F2GjwUI= -k8s.io/apiextensions-apiserver v0.29.8/go.mod h1:e6dPglIfPWm9ydsXuNqefecEVDH0uLfzClJEupSk2VU= -k8s.io/apimachinery v0.29.8 h1:uBHc9WuKiTHClIspJqtR84WNpG0aOGn45HWqxgXkk8Y= -k8s.io/apimachinery v0.29.8/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y= -k8s.io/client-go v0.29.8 h1:QMRKcIzqE/qawknXcsi51GdIAYN8UP39S/M5KnFu/J0= -k8s.io/client-go v0.29.8/go.mod h1:ZzrAAVrqO2jVXMb8My/jTke8n0a/mIynnA3y/1y1UB0= -k8s.io/code-generator v0.29.8 h1:RQ6kM269HlPvmX4BDyjwPwCzsV6Gqa+rtmE96t9csbg= -k8s.io/code-generator v0.29.8/go.mod h1:7TYnI0dYItL2cKuhhgPSuF3WED9uMdELgbVXFfn/joE= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.120.0 h1:z+q5mfovBj1fKFxiRzsa2DsJLPIVMk/KFL81LMOfK+8= -k8s.io/klog/v2 v2.120.0/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240105020646-a37d4de58910 h1:1Rp/XEKP5uxPs6QrsngEHAxBjaAR78iJRiJq5Fi7LSU= -k8s.io/kube-openapi v0.0.0-20240105020646-a37d4de58910/go.mod h1:Pa1PvrP7ACSkuX6I7KYomY6cmMA0Tx86waBhDUgoKPw= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI= +k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI= +k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE= +k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw= +k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= +k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50= +k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs= +k8s.io/code-generator v0.30.2 h1:ZY1+aGkqZVwKIyGsOzquaeZ5rSfE6wZHur8z3jQAaiw= +k8s.io/code-generator v0.30.2/go.mod h1:RQP5L67QxqgkVquk704CyvWFIq0e6RCMmLTXxjE8dVA= +k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= +k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108 h1:Q8Z7VlGhcJgBHJHYugJ/K/7iB8a2eSxCyxdVjJp+lLY= +k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/AUTHORS b/pkg/k8s/vendor/github.com/cilium/cilium/AUTHORS index 1151dec93cf..603eb8efc40 100644 --- a/pkg/k8s/vendor/github.com/cilium/cilium/AUTHORS +++ b/pkg/k8s/vendor/github.com/cilium/cilium/AUTHORS @@ -1,6 +1,7 @@ The following people, in alphabetical order, have either authored or signed off on commits in the Cilium repository: +a5r0n a5r0n@users.noreply.github.com Aaron Ecay aaron.ecay@sky.uk Àbéjídé Àyodélé abejideayodele@gmail.com Abirdcfly fp544037857@gmail.com @@ -20,7 +21,7 @@ Alban Crequy alban@kinvolk.io Aleksander Mistewicz amistewicz@google.com Aleksei Zakharov zakharov.a.g@yandex.ru Alexander Alemayhu alexander@alemayhu.com -Alexander Berger alex-berger@users.noreply.github.com +Alexander Berger alex-berger@gmx.ch Alexander Block ablock84@gmail.com Alexandre Perrin alex@isovalent.com Alexei Starovoitov alexei.starovoitov@gmail.com @@ -29,6 +30,8 @@ Alex Katsman alexkats@google.com Alex Romanov alex@romanov.ws Alex Szakaly alex.szakaly@gmail.com Alex Waring alex.waring@starlingbank.com +Alkama Hasan gl3118@myamu.ac.in +Alois Petutschnig alois@petutschnig.net Amey Bhide amey@covalent.io Amir Kheirkhahan amir.kheirkhahan@dbschenker.com amitmavgupta 115551423+amitmavgupta@users.noreply.github.com @@ -42,6 +45,7 @@ Andrei Kvapil kvapss@gmail.com André Martins andre@cilium.io Andrew Bulford andrew.bulford@form3.tech Andrew Holt andrew.holt@utmost.co +Andrew Li hui0787411@163.com Andrew Sauber 2046750+asauber@users.noreply.github.com Andrew Sy Kim kim.andrewsy@gmail.com Andrew Titmuss iandrewt@icloud.com @@ -66,8 +70,10 @@ Anton Ippolitov anton.ippolitov@datadoghq.com Antoni Zawodny zawodny@google.com Anton Protopopov aspsk@isovalent.com Anton Tykhyy atykhyy@gmail.com +Anubhab Majumdar anmajumdar@microsoft.com Anurag Aggarwal anurag.aggarwal@flipkart.com Archana Shinde archana.m.shinde@intel.com +Archer Wu archerwu9425@icloud.com Ardika Bagus me@ardikabs.com Arika Chen eaglesora@gmail.com Arnaud Meukam ameukam@gmail.com @@ -83,11 +89,13 @@ Ashwin Paranjpe ashwin@covalent.io Assiya Khuzyakhmetova assiya.khuzyakhmetova@nu.edu.kz Atkins Chang atkinschang@gmail.com Augustas Berneckas a.berneckas@gmail.com +Aurelien Benoist aurelien.benoist@sony.com Austin Cawley-Edwards austin.cawley@gmail.com AwesomePatrol AwesomePatrol@users.noreply.github.com ayesha khaliq ayeshakhaliqrana@gmail.com Ayush Dwivedi ayush.dwivedi@accuknox.com bakito github@bakito.ch +Barış Ekin Yıldırım 101638632+beyildirim@users.noreply.github.com Barun Acharya barun1024@gmail.com Basit Mustafa basit.mustafa@gmail.com Beatriz Martínez beatriz@isovalent.com @@ -105,7 +113,9 @@ Bolun Zhao blzhao@google.com Boran Car boran.car@gmail.com Boris Petrovic carnerito.b@gmail.com Brad Whitfield bradswhitfield@gmail.com +Brandon Ewing brandon.ewing@imc.com Brandon McNama brandonmcnama@outlook.com +Brian Payne payne.in.the.brian@gmail.com Brian Topping brian@coglative.com Bruno Miguel Custódio brunomcustodio@gmail.com Bryan Stenson bryan.stenson@okta.com @@ -116,12 +126,15 @@ Canh Ngo canhnt@gmail.com Carlos Andrés Rocha rchalumeau@magicleap.com Carlos Castro carlos.castro@jumo.world Carson Anderson carson.anderson@goteleport.com +Carson Yang yangchuansheng33@gmail.com Casey Callendrello cdc@isovalent.com +cdtzabra 22188574+cdtzabra@users.noreply.github.com Cezary Zawadka czawadka@google.com Chance Zibolski chance.zibolski@gmail.com Changyu Wang changyuwang@tencent.com Charles-Edouard Brétéché charled.breteche@gmail.com Charles-Henri Guérin charles-henri.guerin@zenika.com +Charles Uneze charlesniklaus@gmail.com chaunceyjiang chaunceyjiang@gmail.com Chen Kang kongchen28@gmail.com chentanjun tanjunchen20@gmail.com @@ -137,9 +150,11 @@ Christine Chen christine.chen@datadoghq.com Christine Kim xtineskim@gmail.com Christopher Biscardi chris@christopherbiscardi.com Christopher Schmidt fakod666@gmail.com +Christoph Puhl cpu@isovalent.com Chris Werner Rau cwrau@cwrau.info ChrsMark chrismarkou92@gmail.com Cilium Imagebot noreply@cilium.io +Cilium Release Bot noreply@cilium.io Cintia Sanchez Garcia cynthiasg@icloud.com CJ Virtucio cjv287@gmail.com Claudia J. Kang claudiajkang@gmail.com @@ -157,9 +172,11 @@ Cyril Scetbon cscetbon@gmail.com czybjtu smartczy@outlook.com Dale Ragan dale.ragan@sap.com Dalton Hubble dghubble@gmail.com +Damian Sawicki dsawicki@google.com Dan Everton deverton@godaddy.com Daneyon Hansen daneyon.hansen@solo.io Đặng Minh Dũng dungdm93@live.com +Daniel Bodky daniel.bodky@netways.de Daniel Borkmann daniel@iogearbox.net Daniel Dao dqminh89@gmail.com Daniel Finneran dan@thebsdbox.co.uk @@ -178,7 +195,7 @@ David Bimmler david.bimmler@isovalent.com David Birks davidebirks@gmail.com David Bouchare david.bouchare@datadoghq.com David Calvert david@0xdc.me -David Chen davidchen94@outlook.com +David Cheng david.cheng@shopline.com David Donchez donch@dailymotion.com David Korczynski david@adalogics.com David Leadbeater dgl@dgl.cx @@ -194,6 +211,7 @@ Denis GERMAIN dgermain@deezer.com Denis Khachyan khachyanda.gmail.com Derek Gaffney 17263955+gaffneyd4@users.noreply.github.com Deshi Xiao xiaods@gmail.com +deterclosed fliter@outlook.com Devarshi Sathiya devarshisathiya5@gmail.com Dharma Bellamkonda dharma.bellamkonda@gmail.com Didier Durand durand.didier@gmail.com @@ -232,6 +250,7 @@ Eohyung Lee liquidnuker@gmail.com Eric Bailey e.bailey@sportradar.com Eric Ferreira ericarlos23@gmail.com Eric Hausig 16280871+ehausig@users.noreply.github.com +Eric Mountain eric.mountain@datadoghq.com Eric M. Yanulis eric@eyanulis.net Eric Ripa eric@ripa.io Erik Chang erik.chang@nordstrom.com @@ -244,6 +263,7 @@ Fankaixi Li fankaixi.li@bytedance.com Federico Hernandez f@ederi.co Felix Färjsjö felix.farjsjo@gmail.com fengshunli 1171313930@qq.com +ferenets ferenets@nebius.com Fernand Galiana fernand.galiana@gmail.com Feroz Salam feroz.salam@isovalent.com FeynmanZhou pengfeizhou@yunify.com @@ -265,6 +285,7 @@ Gaurav Yadav gaurav.dev.iiitm@gmail.com Gavin McNair gavin.mcnair@kaluza.com George Gaál gb12335@gmail.com George Kontridze gkontridze@plaid.com +Gerald Pape gerald@giantswarm.io Geyslan G. Bem geyslan@gmail.com GH action ghabot@does.not.exist.cilium.org Gianluca Arbezzano gianarb92@gmail.com @@ -274,12 +295,12 @@ Glen Yu glen.yu@gmail.com Glib Smaga code@gsmaga.com Gobinath Krishnamoorthy gobinathk@google.com Gowtham Sundara gowtham.sundara@rapyuta-robotics.com -gray greyschwinger@gmail.com -Gray Lian gray.liang@isovalent.com +Gray Liang gray.liang@isovalent.com +guangwu guoguangwug@gmail.com Guilherme Oki guilherme.oki@wildlifestudios.com Guilherme Souza 101073+guilhermef@users.noreply.github.com Gunju Kim gjkim042@gmail.com -guoguangwu guoguangwu@magic-shield.com +hacktivist123 akintayoshedrack@gmail.com Haitao Li lihaitao@gmail.com Haiyue Wang haiyue.wang@intel.com Hang Yan hang.yan@hotmail.com @@ -289,38 +310,46 @@ Hao Zhang hao.zhang.am.i@gmail.com Harsh Modi harshmodi@google.com harsimran pabla hpabla@isovalent.com Hart Hoover hart.hoover@gmail.com +Hector Monsalve hmonsalv@gmail.com Heiko Rothe me@heikorothe.com Hemanth Malla hemanth.malla@datadoghq.com Hemslo Wang hemslo.wang@gmail.com +Hong Chen hong.chen.7219@gmail.com Hrittik hrittikcom@gmail.com Huagong Wang wanghuagong@kylinos.cn huangxuesen huangxuesen@kuaishou.com Hui Kong hui.kong@qunar.com +Hunter Gregory 42728408+huntergregory@users.noreply.github.com Hunter Massey hmassey@tradestation.com Husni Alhamdani dhanielluis@gmail.com +Huweicai i@huweicai.com hxysayhi 51870525+hxysayhi@users.noreply.github.com Ian Vernon ian@cilium.io Ifeanyi Ubah ify1992@yahoo.com Iiqbal2000 iqbalhafizh2000@gmail.com +Ilia Chernov cherno8.ilya@gmail.com Ilya Dmitrichenko errordeveloper@gmail.com Ilya Shaisultanov ilya.shaisultanov@gmail.com Ioannis Androulidakis androulidakis.ioannis@gmail.com +Isala Piyarisi mail@isala.me ishuar ishansharma887@gmail.com Ivan Makarychev i.makarychev@tinkoff.ru Ivar Lazzaro ivarlazzaro@gmail.com Jack-R-lantern tjdfkr2421@gmail.com +Jacob Henner henner@arcesium.com Jacopo Nardiello jnardiello@users.noreply.github.com Jaff Cheng jaff.cheng.sh@gmail.com Jaime Caamaño Ruiz jcaamano@suse.com +James Bodkin james.bodkin@amphora.net James Brookes jbrookes@confluent.io James Laverack james@isovalent.com James McShane james.mcshane@superorbital.io Jan-Erik Rediger janerik@fnordig.de Jan Jansen jan.jansen@gdata.de Jan Mraz strudelpi@pm.me +janvi01 janvibajo1@gmail.com Jarno Rajahalme jarno@isovalent.com Jason Aliyetti jaliyetti@gmail.com -JBodkin-Amphora james.bodkin@amphora.net Jean Raby jean@raby.sh Jed Salazar jedsalazar@gmail.com Jef Spaleta jspaleta@gmail.com @@ -333,7 +362,9 @@ Jian Zeng anonymousknight96@gmail.com JieJhih Jhang jiejhihjhang@gmail.com jignyasamishra iamjignyasa@gmail.com Jim Angel jimangel@google.com.com +Jimmy Song rootsongjc@gmail.com Jim Ntosas ntosas@gmail.com +Jingyuan Liang jingyuanliang@google.com JinLin Fu withlin@apache.org Jiong Wang jiong.wang@netronome.com jiuker 2818723467@qq.com @@ -348,15 +379,18 @@ Johannes Liebermann johanan.liebermann@gmail.com John Fastabend john.fastabend@gmail.com John Gardiner Myers jgmyers@proofpoint.com John Howard howardjohn@google.com +John Karoyannis karoyannis@yahoo.com John Watson johnw@planetscale.com John Zheng johnzhengaz@gmail.com Jomen Xiao jomenxiao@gmail.com Jonathan Davies jpds@protonmail.com Jonathan Grahl jonathan@keyholders.io Jones Shi shilei@hotstone.com.cn +Jonny jonny@linkpool.io Jooho Lee jhlee@si-analytics.ai Jorik Jonker jorik.jonker@eu.equinix.com Joseph-Irving joseph.irving500@gmail.com +Joseph Ligier joseph.ligier@accenture.com Joseph Sheng jiajun.sheng@microfocus.com Joseph Stevens thejosephstevens@gmail.com Joshua Roppo joshroppo@gmail.com @@ -384,6 +418,7 @@ Kenshin Chen smwyzi@qq.com kerthcet kerthcet@gmail.com Kevin Burke kevin@burke.dev Kevin Holditch 82885135+kevholditch-f3@users.noreply.github.com +Kevin Reeuwijk kevin.reeuwijk@spectrocloud.com Kiran Bondalapati kiran@bondalapati.com Kir Kolyshkin kolyshkin@gmail.com Koichiro Den den@klaipeden.com @@ -394,8 +429,10 @@ Laurent Bernaille laurent.bernaille@datadoghq.com Lawrence Gadban lawrence.gadban@solo.io ldelossa louis.delos@gmail.com Lehner Florian dev@der-flo.net +Leiw steven.l.wang@linux.intel.com Leonard Cohnen lc@edgeless.systems leonliao xiaobo.liao@gmail.com +Liam Parker liamchat500@gmail.com Liang Zhou zhoul110@chinatelecom.cn Li Chengyuan chengyuanli@hotmail.com Li Chun lichun823@gmail.com @@ -409,13 +446,15 @@ Livingstone S E livingstone.s.e@gmail.com Li Yiheng lyhutopi@gmail.com Liz Rice liz@lizrice.com log1cb0mb nabeelnrana@gmail.com +Loïc Blot nerzhul@users.noreply.github.com LongHui Li longhui.li@woqutech.com loomkoom 29258685+loomkoom@users.noreply.github.com Lorenz Bauer lmb@isovalent.com Lorenzo Fundaró lorenzofundaro@gmail.com -Louis DeLosSantos louis@isovalent.com +Louis DeLosSantos louis.delos@isovalent.com lou-lan loulan@loulan.me Lucas Leblow lucasleblow@mailbox.org +Lucas Rattz lucas.rattz@syself.com lucming 2876757716@qq.com Ludovic Ortega ludovic.ortega@adminafk.fr Lukas Stehlik stehlik.lukas@gmail.com @@ -427,6 +466,7 @@ Madhu Challa madhu@cilium.io Madhusudan.C.S madhusudancs@gmail.com Mahadev Panchal mahadev.panchal@benisontech.com MaiReo sawako.saki@gmail.com +Mais mai.saleh@siemens.com Maksym Lushpenko iviakciivi@gmail.com Manali Bhutiyani manali@covalent.io Mandar U Jog mjog@google.com @@ -440,7 +480,9 @@ Marco Aurelio Caldas Miranda 17923899+macmiranda@users.noreply.github Marco Hofstetter marco.hofstetter@isovalent.com Marco Iorio marco.iorio@isovalent.com Marco Kilchhofer mkilchhofer@users.noreply.github.com +Marc 'risson' Schmitt marc.schmitt@risson.space Marc Stulz m@footek.ch +Marc Suñé marc.sune@isovalent.com Marek Chodor mchodor@google.com Marga Manterola marga@isovalent.com Marino Wijay 45947861+distributethe6ix@users.noreply.github.com @@ -448,8 +490,8 @@ Mario Constanti mario@constanti.de Marius Gerling marius.gerling@uniberg.com Mark deVilliers markdevilliers@gmail.com Mark Pashmfouroush mark@isovalent.com -Mark St John markstjohn@google.com Markus Blaschke mblaschke82@gmail.com +Markus Nilsson markus.nilsson@yubico.com Martin Charles martincharles07@gmail.com Martin Koppehel martin.koppehel@st.ovgu.de Martin Odstrcilik martin.odstrcilik@gmail.com @@ -465,6 +507,7 @@ Matt Anderson matanderson@equinix.com Matthew Fenwick mfenwick100@gmail.com Matthew Gumport me@gum.pt Matthieu Antoine matthieu.antoine@jumo.world +Matthieu MOREL matthieu.morel35@gmail.com Matt Layher mdlayher@gmail.com Matyáš Kroupa kroupa.matyas@gmail.com Mauricio Vásquez mauricio@kinvolk.io @@ -474,6 +517,7 @@ Maximilian Bischoff maximilian.bischoff@inovex.de Maximilian Mack max@mack.io Maxim Mikityanskiy maxim@isovalent.com Max Körbächer 16919345+mkorbi@users.noreply.github.com +MeherRushi sudharushi0@gmail.com Melissa Peiffer mbp83@nau.edu Michael Aspinwall maspinwall@google.com Michael Fischer fiscmi@amazon.com @@ -493,6 +537,7 @@ Michi Mutsuzaki michi@isovalent.com Mike Fedosin mfedosin@gmail.com MikeLing sabergeass@gmail.com Mike Mwanje mwanjemike767@gmail.com +Misha Bragin bangvalo@gmail.com Mitch Hulscher mitch.hulscher@lib.io Moh Ahmed moh.ahmed@cengn.ca Mohammad Yosefpor 47300215+m-yosefpor@users.noreply.github.com @@ -500,6 +545,9 @@ Mohit Marathe mohitmarathe23@gmail.com Moritz Eckert m1gh7ym0@gmail.com Moritz Johner beller.moritz@googlemail.com Moshe Immerman moshe.immerman@vitalitygroup.com +mrproliu 741550557@qq.com +mvtab mvtabilitas@protonmail.com +naoki-take naoki-take@cybozu.co.jp Natalia Reka Ivanko natalia@isovalent.com Nate Sweet nathanjsweet@pm.me Nate Taylor ntaylor1781@gmail.com @@ -514,7 +562,7 @@ Neil Seward neil.seward@elasticpath.com Neil Wilson neil@aldur.co.uk Neutrollized glen.yu@gmail.com Nick M 4718+rkage@users.noreply.github.com -Nick Young nick@isovalent.com +Nick Young ynick@cisco.com Niclas Mietz solidnerd@users.noreply.github.com Nico Berlee nico.berlee@on2it.net Nicolas Busseneau nicolas@isovalent.com @@ -522,7 +570,7 @@ Nico Vibert nicolas.vibert@isovalent.com Nikhil Jha nikhiljha@users.noreply.github.com Nikhil Sharma nikhilsharma230303@gmail.com Nikolay Aleksandrov nikolay@isovalent.com -Nikolay Nikolaev nicknickolaev@gmail.com +Nikolay Nikolaev nikolay.nikolaev@isovalent.com Nirmoy Das ndas@suse.de Nishant Burte nburte@google.com Nitish Malhotra nitishm@microsoft.com @@ -540,7 +588,10 @@ Oliver Ni oliver.ni@gmail.com Oliver Wang a0924100192@gmail.com Omar Aloraini ooraini.dev@gmail.com Ondrej Blazek ondrej.blazek@firma.seznam.cz +Ondrej Sika ondrej@ondrejsika.com +Oshan Galwaduge oshan304@gmail.com Osthues osthues.matthias@gmail.com +Ovidiu Tirla otirla@google.com Pablo Ruiz pablo.ruiz@gmail.com Paco Xu paco.xu@daocloud.io Parth Patel parth.psu@gmail.com @@ -553,6 +604,7 @@ Pat Riehecky riehecky@fnal.gov Patrik Cyvoct patrik@ptrk.io Paul Bailey spacepants@users.noreply.github.com Paul Chaignon paul.chaignon@gmail.com +Paulo Castello da Costa pcastello@google.com Paulo Gomes pjbgf@linux.com Pavel Pavlov 40396270+PavelPavlov46@users.noreply.github.com Paweł Prażak pawelprazak@users.noreply.github.com @@ -561,6 +613,7 @@ pengbinbin1 pengbiny@163.com Pengfei Song pengfei.song@daocloud.io Peter Jausovec peter.jausovec@solo.io Peter Slovak slovak.peto@gmail.com +Petr Baloun petr.baloun@firma.seznam.cz Philippe Lafoucrière philippe.lafoucriere@gmail.com Philipp Gniewosz philipp.gniewosz@daimlertruck.com Philip Schmid phisch@cisco.com @@ -591,22 +644,27 @@ Ray Bejjani ray.bejjani@gmail.com Raymond de Jong raymond.dejong@isovalent.com Reilly Brogan reilly@reillybrogan.com Rei Shimizu Shikugawa@gmail.com +Remi Gelinas mail@remigelin.as Rémy Léone rleone@scaleway.com Renat Tuktarov yandzeek@gmail.com Renaud Gaubert renaud@openai.com Rene Luria rene@luria.ch René Veenhuis re.veenhuis@gmail.com Rene Zbinden rene.zbinden@postfinance.ch +renyunkang rykren1998@gmail.com Richard Lavoie richard.lavoie@logmein.com Richard Tweed RichardoC@users.noreply.github.com Ricky Ho horicky78@gmail.com Rio Kierkels riokierkels@gmail.com +Robin Elfrink robin@15augustus.nl Robin Gögge r.goegge@isovalent.com Robin Hahling robin.hahling@gw-computing.net +Rob Scott robertjscott@google.com Rocky Chen 40374064+rockc2020@users.noreply.github.com Rodrigo Chacon rochacon@gmail.com Romain Lenglet rlenglet@google.com Roman Ptitcyn romanspb@yahoo.com +Romuald Zdebskiy zdebskiy@hotmail.com Ronald van Zantvoort the.loeki@gmail.com Ross Guarino rssguar@gmail.com Rui Gu rui@covalent.io @@ -647,12 +705,14 @@ Shantanu Deshpande shantanud106@gmail.com Shunpoco tkngsnsk313320@gmail.com Sigurd Spieckermann sigurd.spieckermann@gmail.com Simone Sciarrati s.sciarrati@gmail.com +Simon Felding 45149055+simonfelding@users.noreply.github.com Simon Pasquier spasquier@mirantis.com sknop 118932232+sknop-cgn@users.noreply.github.com Smaine Kahlouch smainklh@gmail.com soggiest nicholas@isovalent.com spacewander spacewanderlzx@gmail.com Stacy Kim stacy.kim@ucla.edu +Stefan Zwanenburg stefan@zwanenburg.info Stephen Martin lockwood@opperline.com Steve Gargan sgargan@qualtrics.com Steven Ceuppens steven.ceuppens@icloud.com @@ -670,6 +730,7 @@ Sugang Li sugangli@google.com Sven Haardiek sven.haardiek@uni-muenster.de Swaminathan Vasudevan svasudevan@suse.com Taeung Song treeze.taeung@gmail.com +Taizeng Wu wutaizeng@gmail.com Takayoshi Nishida takayoshi.nishida@gmail.com Tamilmani tamanoha@microsoft.com Tam Mach tam.mach@cilium.io @@ -700,6 +761,7 @@ Tommo Cowling 952241+tlcowling@users.noreply.github.co Tomoki Sugiura tomoki-sugiura@cybozu.co.jp Tomoya Fujita Tomoya.Fujita@sony.com Tom Payne twpayne@gmail.com +Toni Tauro toni.tauro@adfinis.com Tony Lambiris tony@criticalstack.com Tony Lu tonylu@linux.alibaba.com Tony Norlin tony.norlin@localdomain.se @@ -709,6 +771,7 @@ Travis Glenn Hansen travisghansen@yahoo.com Trevor Roberts Jr Trevor.Roberts.Jr@gmail.com Trevor Tao trevor.tao@arm.com Umesh Keerthy B S umesh.freelance@gmail.com +Umesh Keerthy umesh.freelance@gmail.com usiegl00 50933431+usiegl00@users.noreply.github.com Vadim Ponomarev velizarx@gmail.com vakr vakr@microsoft.com @@ -716,11 +779,12 @@ Valas Valancius valas@google.com Vance Li vanceli@tencent.com Vigneshwaren Sunder vickymailed@gmail.com viktor-kurchenko viktor.kurchenko@isovalent.com +Viktor Kurchenko viktor.kurchenko@isovalent.com Viktor Kuzmin kvaster@gmail.com Viktor Oreshkin imselfish@stek29.rocks Ville Ojamo bluikko@users.noreply.github.com Vincent Li vincent.mc.li@gmail.com -Vipul Singh vipul21sept@gmail.com +Vipul Singh singhvipul@microsoft.com Vishal Choudhary sendtovishalchoudhary@gmail.com Vishnu Soman K vishnusomank05@gmail.com Vlad Artamonov 742047+vladdy@users.noreply.github.com @@ -731,12 +795,14 @@ Vlad Ungureanu vladu@palantir.com Wang Dong xdragon007@gmail.com Wang Li wangli09@kuaishou.com Wang Zhen lazybetrayer@gmail.com +Wanlin Du wanlindu@google.com Wayne Haber whaber@gitlab.com Wazir Ahmed wazir@accuknox.com Weilong Cui cuiwl@google.com Wei Yang wei.yang@daocloud.io Weizhou Lan weizhou.lan@daocloud.io Wenhu Wang wang15691700816@gmail.com +wenlxie xwlpt@126.com Wenxian Li wofanli@gmail.com Will Daly widaly@microsoft.com Will Deuschle wdeuschle@palantir.com @@ -749,13 +815,13 @@ Xiaoyang Zhu zhuxiaoyang1996@gmail.com XiaozhiD-web chuanzhi.dai@daocloud.io Xin Li xin.li@daocloud.io Xinyuan Zhang zhangxinyuan@google.com -xyz-li hui0787411@163.com yanggang gang.yang@daocloud.io yanhongchang yanhongchang@100tal.com Yash Shetty yashshetty@google.com Ye Sijun junnplus@gmail.com Yiannis Yiakoumis yiannis@selfienetworks.com Yingnan Zhang 342144303@qq.com +yogesh1801 yogeshsingla481@gmail.com Yongkun Gui ygui@google.com Yosh de Vos yosh@elzorro.nl youhonglian honglian.you@daocloud.io @@ -766,6 +832,7 @@ Yugo Kobayashi kobdotsh@gmail.com yulng wei.yang@daocloud.io Yurii Dzobak yurii.dzobak@lotusflare.com Yurii Komar Subreptivus@gmail.com +Yusho Yamaguchi yusho.yamaguchi@sony.com Yusuke Suzuki yusuke.suzuki@isovalent.com Yutaro Hayakawa yutaro.hayakawa@isovalent.com Yves Blusseau yves.blusseau@acoss.fr diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/labels.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/labels.go index 298e3393b14..32b29882230 100644 --- a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/labels.go +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/labels.go @@ -6,8 +6,11 @@ package labels import ( + "fmt" "sort" "strings" + + "k8s.io/apimachinery/pkg/util/validation/field" ) // Labels allows you to present labels independently from their storage. @@ -130,3 +133,31 @@ func Equals(labels1, labels2 Set) bool { } return true } + +// ConvertSelectorToLabelsMap converts selector string to labels map +// and validates keys and values +func ConvertSelectorToLabelsMap(selector string, opts ...field.PathOption) (Set, error) { + labelsMap := Set{} + + if len(selector) == 0 { + return labelsMap, nil + } + + labels := strings.Split(selector, ",") + for _, label := range labels { + l := strings.Split(label, "=") + if len(l) != 2 { + return labelsMap, fmt.Errorf("invalid selector: %s", l) + } + key := strings.TrimSpace(l[0]) + if err := validateLabelKey(key, field.ToPath(opts...)); err != nil { + return labelsMap, err + } + value := strings.TrimSpace(l[1]) + if err := validateLabelValue(key, value, field.ToPath(opts...)); err != nil { + return labelsMap, err + } + labelsMap[key] = value + } + return labelsMap, nil +} diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/selector.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/selector.go index ade6fc43498..6619aedca27 100644 --- a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/selector.go +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/selector.go @@ -950,3 +950,76 @@ func SelectorFromValidatedSet(ls Set) Selector { func ParseToRequirements(selector string, opts ...field.PathOption) ([]Requirement, error) { return parse(selector, field.ToPath(opts...)) } + +// ValidatedSetSelector wraps a Set, allowing it to implement the Selector interface. Unlike +// Set.AsSelectorPreValidated (which copies the input Set), this type simply wraps the underlying +// Set. As a result, it is substantially more efficient. A nil and empty Sets are considered +// equivalent to Everything(). +// +// Callers MUST ensure the underlying Set is not mutated, and that it is already validated. If these +// constraints are not met, Set.AsValidatedSelector should be preferred +// +// None of the Selector methods mutate the underlying Set, but Add() and Requirements() convert to +// the less optimized version. +type ValidatedSetSelector Set + +func (s ValidatedSetSelector) Matches(labels Labels) bool { + for k, v := range s { + if !labels.Has(k) || v != labels.Get(k) { + return false + } + } + return true +} + +func (s ValidatedSetSelector) Empty() bool { + return len(s) == 0 +} + +func (s ValidatedSetSelector) String() string { + keys := make([]string, 0, len(s)) + for k := range s { + keys = append(keys, k) + } + // Ensure deterministic output + sort.Strings(keys) + b := strings.Builder{} + for i, key := range keys { + v := s[key] + b.Grow(len(key) + 2 + len(v)) + if i != 0 { + b.WriteString(",") + } + b.WriteString(key) + b.WriteString("=") + b.WriteString(v) + } + return b.String() +} + +func (s ValidatedSetSelector) Add(r ...Requirement) Selector { + return s.toFullSelector().Add(r...) +} + +func (s ValidatedSetSelector) Requirements() (requirements Requirements, selectable bool) { + return s.toFullSelector().Requirements() +} + +func (s ValidatedSetSelector) DeepCopySelector() Selector { + res := make(ValidatedSetSelector, len(s)) + for k, v := range s { + res[k] = v + } + return res +} + +func (s ValidatedSetSelector) RequiresExactMatch(label string) (value string, found bool) { + v, f := s[label] + return v, f +} + +func (s ValidatedSetSelector) toFullSelector() Selector { + return SelectorFromValidatedSet(Set(s)) +} + +var _ Selector = ValidatedSetSelector{} diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/zz_generated.deepequal.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/zz_generated.deepequal.go index f05c7cb36ed..1f3ad535172 100644 --- a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/zz_generated.deepequal.go +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/zz_generated.deepequal.go @@ -177,3 +177,27 @@ func (in *Set) DeepEqual(other *Set) bool { return true } + +// DeepEqual is an autogenerated deepequal function, deeply comparing the +// receiver with other. in must be non-nil. +func (in *ValidatedSetSelector) DeepEqual(other *ValidatedSetSelector) bool { + if other == nil { + return false + } + + if len(*in) != len(*other) { + return false + } else { + for key, inValue := range *in { + if otherValue, present := (*other)[key]; !present { + return false + } else { + if inValue != otherValue { + return false + } + } + } + } + + return true +} diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto index 49ca0e991fe..f237c9313bf 100644 --- a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto @@ -96,6 +96,7 @@ message LabelSelector { // matchExpressions is a list of label selector requirements. The requirements are ANDed. // +kubebuilder:validation:Optional + // +listType=atomic repeated LabelSelectorRequirement matchExpressions = 2; } @@ -115,8 +116,8 @@ message LabelSelectorRequirement { // the values array must be non-empty. If the operator is Exists or DoesNotExist, // the values array must be empty. This array is replaced during a strategic // merge patch. - // // +kubebuilder:validation:Optional + // +listType=atomic repeated string values = 3; } @@ -263,6 +264,8 @@ message ObjectMeta { // +optional // +patchMergeKey=uid // +patchStrategy=merge + // +listType=map + // +listMapKey=uid repeated OwnerReference ownerReferences = 13; } diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/helpers.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/helpers.go index 0b9804f6e12..d2d08077a00 100644 --- a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/helpers.go +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/helpers.go @@ -9,6 +9,7 @@ import ( "fmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels" "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/selection" @@ -57,6 +58,100 @@ func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) { return selector, nil } +// LabelSelectorAsMap converts the LabelSelector api type into a map of strings, ie. the +// original structure of a label selector. Operators that cannot be converted into plain +// labels (Exists, DoesNotExist, NotIn, and In with more than one value) will result in +// an error. +func LabelSelectorAsMap(ps *LabelSelector) (map[string]string, error) { + if ps == nil { + return nil, nil + } + selector := map[string]string{} + for k, v := range ps.MatchLabels { + selector[k] = v + } + for _, expr := range ps.MatchExpressions { + switch expr.Operator { + case LabelSelectorOpIn: + if len(expr.Values) != 1 { + return selector, fmt.Errorf("operator %q without a single value cannot be converted into the old label selector format", expr.Operator) + } + // Should we do anything in case this will override a previous key-value pair? + selector[expr.Key] = expr.Values[0] + case LabelSelectorOpNotIn, LabelSelectorOpExists, LabelSelectorOpDoesNotExist: + return selector, fmt.Errorf("operator %q cannot be converted into the old label selector format", expr.Operator) + default: + return selector, fmt.Errorf("%q is not a valid selector operator", expr.Operator) + } + } + return selector, nil +} + +// ParseToLabelSelector parses a string representing a selector into a LabelSelector object. +// Note: This function should be kept in sync with the parser in pkg/labels/selector.go +func ParseToLabelSelector(selector string) (*LabelSelector, error) { + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return nil, fmt.Errorf("couldn't parse the selector string \"%s\": %w", selector, err) + } + + labelSelector := &LabelSelector{ + MatchLabels: map[string]string{}, + MatchExpressions: []LabelSelectorRequirement{}, + } + for _, req := range reqs { + var op LabelSelectorOperator + switch req.Operator() { + case selection.Equals, selection.DoubleEquals: + vals := req.Values() + if vals.Len() != 1 { + return nil, fmt.Errorf("equals operator must have exactly one value") + } + val, ok := vals.PopAny() + if !ok { + return nil, fmt.Errorf("equals operator has exactly one value but it cannot be retrieved") + } + labelSelector.MatchLabels[req.Key()] = val + continue + case selection.In: + op = LabelSelectorOpIn + case selection.NotIn: + op = LabelSelectorOpNotIn + case selection.Exists: + op = LabelSelectorOpExists + case selection.DoesNotExist: + op = LabelSelectorOpDoesNotExist + case selection.GreaterThan, selection.LessThan: + // Adding a separate case for these operators to indicate that this is deliberate + return nil, fmt.Errorf("%q isn't supported in label selectors", req.Operator()) + default: + return nil, fmt.Errorf("%q is not a valid label selector operator", req.Operator()) + } + labelSelector.MatchExpressions = append(labelSelector.MatchExpressions, LabelSelectorRequirement{ + Key: req.Key(), + Operator: op, + Values: sets.List(req.Values()), + }) + } + return labelSelector, nil +} + +// SetAsLabelSelector converts the labels.Set object into a LabelSelector api object. +func SetAsLabelSelector(ls labels.Set) *LabelSelector { + if ls == nil { + return nil + } + + selector := &LabelSelector{ + MatchLabels: make(map[string]string, len(ls)), + } + for label, value := range ls { + selector.MatchLabels[label] = value + } + + return selector +} + // FormatLabelSelector convert labelSelector into plain string func FormatLabelSelector(labelSelector *LabelSelector) string { selector, err := LabelSelectorAsSelector(labelSelector) @@ -102,3 +197,31 @@ func SlimOwnerReferences(references []metav1.OwnerReference) []OwnerReference { } return slimRefs } + +// HasAnnotation returns a bool if passed in annotation exists +func HasAnnotation(obj ObjectMeta, ann string) bool { + _, found := obj.Annotations[ann] + return found +} + +// SetMetaDataAnnotation sets the annotation and value +func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) { + if obj.Annotations == nil { + obj.Annotations = make(map[string]string) + } + obj.Annotations[ann] = value +} + +// HasLabel returns a bool if passed in label exists +func HasLabel(obj ObjectMeta, label string) bool { + _, found := obj.Labels[label] + return found +} + +// SetMetaDataLabel sets the label and value +func SetMetaDataLabel(obj *ObjectMeta, label string, value string) { + if obj.Labels == nil { + obj.Labels = make(map[string]string) + } + obj.Labels[label] = value +} diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/meta.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/meta.go index f5b506010f1..3ad98318308 100644 --- a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/meta.go +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/meta.go @@ -38,24 +38,22 @@ func (obj *ObjectMeta) GetObjectMeta() metav1.Object { return obj } // Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows // fast, direct access to metadata fields for API objects. -func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } -func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } -func (meta *ObjectMeta) GetName() string { return meta.Name } -func (meta *ObjectMeta) SetName(name string) { meta.Name = name } -func (meta *ObjectMeta) GetGenerateName() string { - panic("ObjectMeta - GetGenerateName() not implemented") +func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } +func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } +func (meta *ObjectMeta) GetName() string { return meta.Name } +func (meta *ObjectMeta) SetName(name string) { meta.Name = name } +func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName } +func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName } +func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } +func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } +func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } +func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } +func (meta *ObjectMeta) GetGeneration() int64 { panic("ObjectMeta - GetGeneration() not implemented") } +func (meta *ObjectMeta) SetGeneration(_ int64) { panic("ObjectMeta - SetGeneration() not implemented") } +func (meta *ObjectMeta) GetSelfLink() string { panic("ObjectMeta - GetSelfLink() not implemented") } +func (meta *ObjectMeta) SetSelfLink(_ string) { + panic("ObjectMeta - SetSelfLink() not implemented") } -func (meta *ObjectMeta) SetGenerateName(string) { - panic("ObjectMeta - SetGenerateName() not implemented") -} -func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } -func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } -func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } -func (meta *ObjectMeta) SetResourceVersion(ver string) { meta.ResourceVersion = ver } -func (meta *ObjectMeta) GetGeneration() int64 { panic("ObjectMeta - GetGeneration() not implemented") } -func (meta *ObjectMeta) SetGeneration(_ int64) { panic("ObjectMeta - SetGeneration() not implemented") } -func (meta *ObjectMeta) GetSelfLink() string { panic("ObjectMeta - GetSelfLink() not implemented") } -func (meta *ObjectMeta) SetSelfLink(_ string) { panic("ObjectMeta - SetSelfLink() not implemented") } func (meta *ObjectMeta) GetCreationTimestamp() metav1.Time { panic("ObjectMeta - GetCreationTimestamp() not implemented") } @@ -95,9 +93,6 @@ func (meta *ObjectMeta) GetOwnerReferences() []metav1.OwnerReference { func (meta *ObjectMeta) SetOwnerReferences(references []metav1.OwnerReference) { meta.OwnerReferences = SlimOwnerReferences(references) } -func (meta *ObjectMeta) GetZZZ_DeprecatedClusterName() string { panic("not implemented") } -func (meta *ObjectMeta) SetZZZ_DeprecatedClusterName(_ string) { panic("not implemented") } - func (meta *ObjectMeta) GetManagedFields() []metav1.ManagedFieldsEntry { panic("ObjectMeta - GetManagedFields() not implemented") } diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/register.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/register.go index 6df49bca435..d323d5714c4 100644 --- a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/register.go +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/register.go @@ -14,6 +14,13 @@ import ( // GroupName is the group name for this API. const GroupName = "meta.k8s.io" +var ( + // localSchemeBuilder is used to make compiler happy for autogenerated + // conversions. However, it's not used. + schemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &schemeBuilder +) + // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} @@ -21,6 +28,9 @@ var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // TODO: this should be v1 probably var Unversioned = schema.GroupVersion{Group: "", Version: "v1"} +// WatchEventKind is name reserved for serializing watch events. +const WatchEventKind = "WatchEvent" + // Kind takes an unqualified kind and returns a Group qualified GroupKind func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() @@ -32,6 +42,20 @@ var scheme = runtime.NewScheme() // ParameterCodec knows about query parameters used with the meta v1 API spec. var ParameterCodec = runtime.NewParameterCodec(scheme) +var optionsTypes = []runtime.Object{} + +// AddToGroupVersion registers common meta types into schemas. +func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) { + // Supports legacy code paths, most callers should use metav1.ParameterCodec for now + scheme.AddKnownTypes(groupVersion, optionsTypes...) + // Register Unversioned types under their own special group + scheme.AddUnversionedTypes(Unversioned) + + // register manually. This usually goes through the SchemeBuilder, which we cannot use here. + utilruntime.Must(RegisterConversions(scheme)) + utilruntime.Must(RegisterDefaults(scheme)) +} + // AddMetaToScheme registers base meta types into schemas. func AddMetaToScheme(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, @@ -43,8 +67,10 @@ func AddMetaToScheme(scheme *runtime.Scheme) error { } func init() { - scheme.AddUnversionedTypes(SchemeGroupVersion) + scheme.AddUnversionedTypes(SchemeGroupVersion, optionsTypes...) utilruntime.Must(AddMetaToScheme(scheme)) + // register manually. This usually goes through the SchemeBuilder, which we cannot use here. + utilruntime.Must(RegisterDefaults(scheme)) } diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/types.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/types.go index 728b0731286..d3dea84ccdf 100644 --- a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/types.go +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/types.go @@ -75,6 +75,18 @@ type ListMeta struct { RemainingItemCount *int64 `json:"remainingItemCount,omitempty" protobuf:"bytes,4,opt,name=remainingItemCount"` } +// Field path constants that are specific to the internal API +// representation. +const ( + ObjectNameField = "metadata.name" +) + +// These are internal finalizer values for Kubernetes-like APIs, must be qualified name unless defined here +const ( + FinalizerOrphanDependents = "orphan" + FinalizerDeleteDependents = "foregroundDeletion" +) + // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. type ObjectMeta struct { @@ -184,6 +196,8 @@ type ObjectMeta struct { // +optional // +patchMergeKey=uid // +patchStrategy=merge + // +listType=map + // +listMapKey=uid OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` } @@ -221,6 +235,25 @@ type OwnerReference struct { Controller *bool `json:"controller,omitempty" protobuf:"varint,6,opt,name=controller"` } +const ( + // FieldValidationIgnore ignores unknown/duplicate fields + FieldValidationIgnore = "Ignore" + // FieldValidationWarn responds with a warning, but successfully serve the request + FieldValidationWarn = "Warn" + // FieldValidationStrict fails the request on unknown/duplicate fields + FieldValidationStrict = "Strict" +) + +// TODO: remove me when watch is refactored +func LabelSelectorQueryParam(version string) string { + return "labelSelector" +} + +// TODO: remove me when watch is refactored +func FieldSelectorQueryParam(version string) string { + return "fieldSelector" +} + // Note: // There are two different styles of label selectors used in versioned types: // an older style which is represented as just a string in versioned types, and a @@ -240,6 +273,7 @@ type LabelSelector struct { MatchLabels map[string]MatchLabelsValue `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` // matchExpressions is a list of label selector requirements. The requirements are ANDed. // +kubebuilder:validation:Optional + // +listType=atomic MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` } @@ -263,8 +297,8 @@ type LabelSelectorRequirement struct { // the values array must be non-empty. If the operator is Exists or DoesNotExist, // the values array must be empty. This array is replaced during a strategic // merge patch. - // // +kubebuilder:validation:Optional + // +listType=atomic Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` } diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.conversion.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.conversion.go new file mode 100644 index 00000000000..e475040a27b --- /dev/null +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.conversion.go @@ -0,0 +1,23 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Cilium + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1 + +import ( + 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(s *runtime.Scheme) error { + return nil +} diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.defaults.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.defaults.go new file mode 100644 index 00000000000..cd8143c7f9a --- /dev/null +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.defaults.go @@ -0,0 +1,20 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Cilium + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +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/pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/logfields/logfields.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/logfields/logfields.go index 1416ba904ee..96882fd8892 100644 --- a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/logfields/logfields.go +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/logfields/logfields.go @@ -32,6 +32,9 @@ const ( // EndpointState is the current endpoint state EndpointState = "endpointState" + // Error is the Go error + Error = "error" + // EventUUID is an event unique identifier EventUUID = "eventID" @@ -53,6 +56,9 @@ const ( // Labels are any label, they may not be relevant to the security identity. Labels = "labels" + // Label is a singular label, where relevant + Label = "label" + // SourceFilter is the label or node information source SourceFilter = "sourceFilter" @@ -75,10 +81,25 @@ const ( // OldIdentity is a previously used security identity OldIdentity = "oldIdentity" + // PolicyKey is a policy map key + PolicyKey = "policyKey" + + // PolicyEntry is a policy map value + PolicyEntry = "policyEntry" + // PolicyRevision is the revision of the policy in the repository or of // the object in question PolicyRevision = "policyRevision" + // PolicyKeysAdded is a set of added policy map keys + PolicyKeysAdded = "policyKeysAdded" + + // PolicyKeysDeleted is a set of deleted policy map keys + PolicyKeysDeleted = "policyKeysDeleted" + + // PolicyEntriesOld is a set of old policy map keys and values + PolicyEntriesOld = "policyEntriesOld" + // DatapathPolicyRevision is the policy revision currently running in // the datapath DatapathPolicyRevision = "datapathPolicyRevision" @@ -238,6 +259,12 @@ const ( // VethPair is a tuple of Veth that are paired VethPair = "vethPair" + // Netkit is a netkit object or ID + Netkit = "netkit" + + // NetkitPair is a tuple of Netkit that are paired + NetkitPair = "netkitPair" + // NetNSName is a name of a network namespace NetNSName = "netNSName" @@ -317,6 +344,9 @@ const ( // BackendSlot is the backend slot number in a service BPF map BackendSlot = "backendSlot" + // ProxyName is the name of a proxy (e.g., "Envoy") + ProxyName = "proxyName" + // L7LBProxyPort is the port number of the Envoy listener a L7 LB service redirects traffic to for load balancing. L7LBProxyPort = "l7LBProxyPort" @@ -356,6 +386,9 @@ const ( // Listener is the name of an Envoy Listener defined in CEC or CCEC Listener = "listener" + // ListenerPriority is the priority of an Envoy Listener defined in CEC or CCEC + ListenerPriority = "listenerPriority" + // BPFMapKey is a key from a BPF map BPFMapKey = "bpfMapKey" @@ -740,6 +773,26 @@ const ( // State is the state of an individual component (apiserver, kvstore etc) State = "state" + // EtcdQPSLimit is the QPS limit for an etcd client. + EtcdQPSLimit = "etcdQPSLimit" + + // LeaseID identifies a KVStore lease + LeaseID = "leaseID" + + // EventType identifies the type of KVStore events + EventType = "eventType" + + // Entries specifies the number of KVStore entries + Entries = "entries" + // Action is the summarized action from a reconciliation. + Action = "action" + // EtcdClusterID is the ID of the etcd cluster EtcdClusterID = "etcdClusterID" + + // NetnsCookie is the Linux kernel netns cookie. + NetnsCookie = "netnsCookie" + + // Target identifies a target value + Target = "target" ) diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/logging.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/logging.go index 91dca60bcf0..4c03f85a7be 100644 --- a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/logging.go +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/logging.go @@ -166,6 +166,11 @@ func SetupLogging(loggers []string, logOpts LogOptions, tag string, debug bool) // background goroutines that are not cleaned up. initializeKLog() + if debug { + logOpts[LevelOpt] = "debug" + } + initializeSlog(logOpts, len(loggers) == 0) + // Updating the default log format SetLogFormat(logOpts.GetLogFormat()) diff --git a/pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/slog.go b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/slog.go new file mode 100644 index 00000000000..ec95a7e6b61 --- /dev/null +++ b/pkg/k8s/vendor/github.com/cilium/cilium/pkg/logging/slog.go @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Cilium + +package logging + +import ( + "context" + "log/slog" + "os" + "strings" + "time" + + "github.com/sirupsen/logrus" +) + +// SlogNopHandler discards all logs. +var SlogNopHandler slog.Handler = nopHandler{} + +type nopHandler struct{} + +func (nopHandler) Enabled(context.Context, slog.Level) bool { return false } +func (nopHandler) Handle(context.Context, slog.Record) error { return nil } +func (n nopHandler) WithAttrs([]slog.Attr) slog.Handler { return n } +func (n nopHandler) WithGroup(string) slog.Handler { return n } + +var slogHandlerOpts = &slog.HandlerOptions{ + AddSource: false, + Level: slog.LevelInfo, + ReplaceAttr: replaceLevelAndDropTime, +} + +// Default slog logger. Will be overwritten once initializeSlog is called. +var DefaultSlogLogger *slog.Logger = slog.New(slog.NewTextHandler( + os.Stderr, + slogHandlerOpts, +)) + +func slogLevel(l logrus.Level) slog.Level { + switch l { + case logrus.DebugLevel, logrus.TraceLevel: + return slog.LevelDebug + case logrus.InfoLevel: + return slog.LevelInfo + case logrus.WarnLevel: + return slog.LevelWarn + case logrus.ErrorLevel, logrus.PanicLevel, logrus.FatalLevel: + return slog.LevelError + default: + return slog.LevelInfo + } +} + +// Approximates the logrus output via slog for job groups during the transition +// phase. +func initializeSlog(logOpts LogOptions, useStdout bool) { + opts := *slogHandlerOpts + opts.Level = slogLevel(logOpts.GetLogLevel()) + + logFormat := logOpts.GetLogFormat() + switch logFormat { + case LogFormatJSON, LogFormatText: + opts.ReplaceAttr = replaceLevelAndDropTime + case LogFormatJSONTimestamp, LogFormatTextTimestamp: + opts.ReplaceAttr = replaceLevel + } + + writer := os.Stderr + if useStdout { + writer = os.Stdout + } + + switch logFormat { + case LogFormatJSON, LogFormatJSONTimestamp: + DefaultSlogLogger = slog.New(slog.NewJSONHandler( + writer, + &opts, + )) + case LogFormatText, LogFormatTextTimestamp: + DefaultSlogLogger = slog.New(slog.NewTextHandler( + writer, + &opts, + )) + } +} + +func replaceLevel(groups []string, a slog.Attr) slog.Attr { + switch a.Key { + case slog.TimeKey: + // Adjust to timestamp format that logrus uses; except that we can't + // force slog to quote the value like logrus does... + return slog.String(slog.TimeKey, a.Value.Time().Format(time.RFC3339)) + case slog.LevelKey: + // Lower-case the log level + return slog.Attr{ + Key: a.Key, + Value: slog.StringValue(strings.ToLower(a.Value.String())), + } + } + return a +} + +func replaceLevelAndDropTime(groups []string, a slog.Attr) slog.Attr { + switch a.Key { + case slog.TimeKey: + // Drop timestamps + return slog.Attr{} + case slog.LevelKey: + // Lower-case the log level + return slog.Attr{ + Key: a.Key, + Value: slog.StringValue(strings.ToLower(a.Value.String())), + } + } + return a +} diff --git a/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/CHANGES.md b/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/CHANGES.md index 5edd5a7ca9a..9e790390b62 100644 --- a/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/CHANGES.md +++ b/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/CHANGES.md @@ -1,5 +1,17 @@ # Change history of go-restful + +## [v3.12.0] - 2024-03-11 +- add Flush method #529 (#538) +- fix: Improper handling of empty POST requests (#543) + +## [v3.11.3] - 2024-01-09 +- better not have 2 tags on one commit + +## [v3.11.1, v3.11.2] - 2024-01-09 + +- fix by restoring custom JSON handler functions (Mike Beaumont #540) + ## [v3.11.0] - 2023-08-19 - restored behavior as <= v3.9.0 with option to change path strategy using TrimRightSlashEnabled. diff --git a/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/README.md b/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/README.md index 95a05a08944..7234604e47b 100644 --- a/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/README.md +++ b/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/README.md @@ -2,7 +2,6 @@ go-restful ========== package for building REST-style Web Services using Google Go -[![Build Status](https://travis-ci.org/emicklei/go-restful.png)](https://travis-ci.org/emicklei/go-restful) [![Go Report Card](https://goreportcard.com/badge/github.com/emicklei/go-restful)](https://goreportcard.com/report/github.com/emicklei/go-restful) [![GoDoc](https://godoc.org/github.com/emicklei/go-restful?status.svg)](https://pkg.go.dev/github.com/emicklei/go-restful) [![codecov](https://codecov.io/gh/emicklei/go-restful/branch/master/graph/badge.svg)](https://codecov.io/gh/emicklei/go-restful) diff --git a/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/compress.go b/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/compress.go index 1ff239f99fe..80adf55fdfe 100644 --- a/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/compress.go +++ b/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/compress.go @@ -49,6 +49,16 @@ func (c *CompressingResponseWriter) CloseNotify() <-chan bool { return c.writer.(http.CloseNotifier).CloseNotify() } +// Flush is part of http.Flusher interface. Noop if the underlying writer doesn't support it. +func (c *CompressingResponseWriter) Flush() { + flusher, ok := c.writer.(http.Flusher) + if !ok { + // writer doesn't support http.Flusher interface + return + } + flusher.Flush() +} + // Close the underlying compressor func (c *CompressingResponseWriter) Close() error { if c.isCompressorClosed() { diff --git a/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/jsr311.go b/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/jsr311.go index 07a0c91e942..a9b3faaa81f 100644 --- a/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/jsr311.go +++ b/pkg/k8s/vendor/github.com/emicklei/go-restful/v3/jsr311.go @@ -155,7 +155,7 @@ func (r RouterJSR311) detectRoute(routes []Route, httpRequest *http.Request) (*R method, length := httpRequest.Method, httpRequest.Header.Get("Content-Length") if (method == http.MethodPost || method == http.MethodPut || - method == http.MethodPatch) && length == "" { + method == http.MethodPatch) && (length == "" || length == "0") { return nil, NewError( http.StatusUnsupportedMediaType, fmt.Sprintf("415: Unsupported Media Type\n\nAvailable representations: %s", strings.Join(available, ", ")), diff --git a/pkg/k8s/vendor/github.com/fatih/color/color.go b/pkg/k8s/vendor/github.com/fatih/color/color.go index c4234287dcc..81094e87c56 100644 --- a/pkg/k8s/vendor/github.com/fatih/color/color.go +++ b/pkg/k8s/vendor/github.com/fatih/color/color.go @@ -269,7 +269,7 @@ func (c *Color) Printf(format string, a ...interface{}) (n int, err error) { // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { - return fmt.Fprintln(w, c.wrap(fmt.Sprint(a...))) + return fmt.Fprintln(w, c.wrap(sprintln(a...))) } // Println formats using the default formats for its operands and writes to @@ -278,7 +278,7 @@ func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { // encountered. This is the standard fmt.Print() method wrapped with the given // color. func (c *Color) Println(a ...interface{}) (n int, err error) { - return fmt.Fprintln(Output, c.wrap(fmt.Sprint(a...))) + return fmt.Fprintln(Output, c.wrap(sprintln(a...))) } // Sprint is just like Print, but returns a string instead of printing it. @@ -288,7 +288,7 @@ func (c *Color) Sprint(a ...interface{}) string { // Sprintln is just like Println, but returns a string instead of printing it. func (c *Color) Sprintln(a ...interface{}) string { - return fmt.Sprintln(c.Sprint(a...)) + return c.wrap(sprintln(a...)) + "\n" } // Sprintf is just like Printf, but returns a string instead of printing it. @@ -370,7 +370,7 @@ func (c *Color) SprintfFunc() func(format string, a ...interface{}) string { // string. Windows users should use this in conjunction with color.Output. func (c *Color) SprintlnFunc() func(a ...interface{}) string { return func(a ...interface{}) string { - return fmt.Sprintln(c.Sprint(a...)) + return c.wrap(sprintln(a...)) + "\n" } } @@ -648,3 +648,8 @@ func HiCyanString(format string, a ...interface{}) string { return colorString(f func HiWhiteString(format string, a ...interface{}) string { return colorString(format, FgHiWhite, a...) } + +// sprintln is a helper function to format a string with fmt.Sprintln and trim the trailing newline. +func sprintln(a ...interface{}) string { + return strings.TrimSuffix(fmt.Sprintln(a...), "\n") +} diff --git a/pkg/k8s/vendor/github.com/go-openapi/jsonpointer/pointer.go b/pkg/k8s/vendor/github.com/go-openapi/jsonpointer/pointer.go index d975773d490..d970c7cf448 100644 --- a/pkg/k8s/vendor/github.com/go-openapi/jsonpointer/pointer.go +++ b/pkg/k8s/vendor/github.com/go-openapi/jsonpointer/pointer.go @@ -264,7 +264,7 @@ func (p *Pointer) set(node, data any, nameProvider *swag.NameProvider) error { knd := reflect.ValueOf(node).Kind() if knd != reflect.Ptr && knd != reflect.Struct && knd != reflect.Map && knd != reflect.Slice && knd != reflect.Array { - return fmt.Errorf("only structs, pointers, maps and slices are supported for setting values") + return errors.New("only structs, pointers, maps and slices are supported for setting values") } if nameProvider == nil { diff --git a/pkg/k8s/vendor/github.com/go-openapi/swag/BENCHMARK.md b/pkg/k8s/vendor/github.com/go-openapi/swag/BENCHMARK.md new file mode 100644 index 00000000000..e7f28ed6b78 --- /dev/null +++ b/pkg/k8s/vendor/github.com/go-openapi/swag/BENCHMARK.md @@ -0,0 +1,52 @@ +# Benchmarks + +## Name mangling utilities + +```bash +go test -bench XXX -run XXX -benchtime 30s +``` + +### Benchmarks at b3e7a5386f996177e4808f11acb2aa93a0f660df + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz +BenchmarkToXXXName/ToGoName-4 862623 44101 ns/op 10450 B/op 732 allocs/op +BenchmarkToXXXName/ToVarName-4 853656 40728 ns/op 10468 B/op 734 allocs/op +BenchmarkToXXXName/ToFileName-4 1268312 27813 ns/op 9785 B/op 617 allocs/op +BenchmarkToXXXName/ToCommandName-4 1276322 27903 ns/op 9785 B/op 617 allocs/op +BenchmarkToXXXName/ToHumanNameLower-4 895334 40354 ns/op 10472 B/op 731 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-4 882441 40678 ns/op 10566 B/op 749 allocs/op +``` + +### Benchmarks after PR #79 + +~ x10 performance improvement and ~ /100 memory allocations. + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz +BenchmarkToXXXName/ToGoName-4 9595830 3991 ns/op 42 B/op 5 allocs/op +BenchmarkToXXXName/ToVarName-4 9194276 3984 ns/op 62 B/op 7 allocs/op +BenchmarkToXXXName/ToFileName-4 17002711 2123 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToCommandName-4 16772926 2111 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToHumanNameLower-4 9788331 3749 ns/op 92 B/op 6 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-4 9188260 3941 ns/op 104 B/op 6 allocs/op +``` + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: AMD Ryzen 7 5800X 8-Core Processor +BenchmarkToXXXName/ToGoName-16 18527378 1972 ns/op 42 B/op 5 allocs/op +BenchmarkToXXXName/ToVarName-16 15552692 2093 ns/op 62 B/op 7 allocs/op +BenchmarkToXXXName/ToFileName-16 32161176 1117 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToCommandName-16 32256634 1137 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToHumanNameLower-16 18599661 1946 ns/op 92 B/op 6 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-16 17581353 2054 ns/op 105 B/op 6 allocs/op +``` diff --git a/pkg/k8s/vendor/github.com/go-openapi/swag/initialism_index.go b/pkg/k8s/vendor/github.com/go-openapi/swag/initialism_index.go index 03555184d1b..20a359bb60a 100644 --- a/pkg/k8s/vendor/github.com/go-openapi/swag/initialism_index.go +++ b/pkg/k8s/vendor/github.com/go-openapi/swag/initialism_index.go @@ -16,9 +16,130 @@ package swag import ( "sort" + "strings" "sync" ) +var ( + // commonInitialisms are common acronyms that are kept as whole uppercased words. + commonInitialisms *indexOfInitialisms + + // initialisms is a slice of sorted initialisms + initialisms []string + + // a copy of initialisms pre-baked as []rune + initialismsRunes [][]rune + initialismsUpperCased [][]rune + + isInitialism func(string) bool + + maxAllocMatches int +) + +func init() { + // Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769 + configuredInitialisms := map[string]bool{ + "ACL": true, + "API": true, + "ASCII": true, + "CPU": true, + "CSS": true, + "DNS": true, + "EOF": true, + "GUID": true, + "HTML": true, + "HTTPS": true, + "HTTP": true, + "ID": true, + "IP": true, + "IPv4": true, + "IPv6": true, + "JSON": true, + "LHS": true, + "OAI": true, + "QPS": true, + "RAM": true, + "RHS": true, + "RPC": true, + "SLA": true, + "SMTP": true, + "SQL": true, + "SSH": true, + "TCP": true, + "TLS": true, + "TTL": true, + "UDP": true, + "UI": true, + "UID": true, + "UUID": true, + "URI": true, + "URL": true, + "UTF8": true, + "VM": true, + "XML": true, + "XMPP": true, + "XSRF": true, + "XSS": true, + } + + // a thread-safe index of initialisms + commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms) + initialisms = commonInitialisms.sorted() + initialismsRunes = asRunes(initialisms) + initialismsUpperCased = asUpperCased(initialisms) + maxAllocMatches = maxAllocHeuristic(initialismsRunes) + + // a test function + isInitialism = commonInitialisms.isInitialism +} + +func asRunes(in []string) [][]rune { + out := make([][]rune, len(in)) + for i, initialism := range in { + out[i] = []rune(initialism) + } + + return out +} + +func asUpperCased(in []string) [][]rune { + out := make([][]rune, len(in)) + + for i, initialism := range in { + out[i] = []rune(upper(trim(initialism))) + } + + return out +} + +func maxAllocHeuristic(in [][]rune) int { + heuristic := make(map[rune]int) + for _, initialism := range in { + heuristic[initialism[0]]++ + } + + var maxAlloc int + for _, val := range heuristic { + if val > maxAlloc { + maxAlloc = val + } + } + + return maxAlloc +} + +// AddInitialisms add additional initialisms +func AddInitialisms(words ...string) { + for _, word := range words { + // commonInitialisms[upper(word)] = true + commonInitialisms.add(upper(word)) + } + // sort again + initialisms = commonInitialisms.sorted() + initialismsRunes = asRunes(initialisms) + initialismsUpperCased = asUpperCased(initialisms) +} + // indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. // Since go1.9, this may be implemented with sync.Map. type indexOfInitialisms struct { @@ -55,7 +176,7 @@ func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { func (m *indexOfInitialisms) sorted() (result []string) { m.sortMutex.Lock() defer m.sortMutex.Unlock() - m.index.Range(func(key, value interface{}) bool { + m.index.Range(func(key, _ interface{}) bool { k := key.(string) result = append(result, k) return true @@ -63,3 +184,19 @@ func (m *indexOfInitialisms) sorted() (result []string) { sort.Sort(sort.Reverse(byInitialism(result))) return } + +type byInitialism []string + +func (s byInitialism) Len() int { + return len(s) +} +func (s byInitialism) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} +func (s byInitialism) Less(i, j int) bool { + if len(s[i]) != len(s[j]) { + return len(s[i]) < len(s[j]) + } + + return strings.Compare(s[i], s[j]) > 0 +} diff --git a/pkg/k8s/vendor/github.com/go-openapi/swag/name_lexem.go b/pkg/k8s/vendor/github.com/go-openapi/swag/name_lexem.go index aa7f6a9bb8e..8bb64ac32f9 100644 --- a/pkg/k8s/vendor/github.com/go-openapi/swag/name_lexem.go +++ b/pkg/k8s/vendor/github.com/go-openapi/swag/name_lexem.go @@ -14,74 +14,80 @@ package swag -import "unicode" +import ( + "unicode" + "unicode/utf8" +) type ( - nameLexem interface { - GetUnsafeGoName() string - GetOriginal() string - IsInitialism() bool - } + lexemKind uint8 - initialismNameLexem struct { + nameLexem struct { original string matchedInitialism string + kind lexemKind } +) - casualNameLexem struct { - original string - } +const ( + lexemKindCasualName lexemKind = iota + lexemKindInitialismName ) -func newInitialismNameLexem(original, matchedInitialism string) *initialismNameLexem { - return &initialismNameLexem{ +func newInitialismNameLexem(original, matchedInitialism string) nameLexem { + return nameLexem{ + kind: lexemKindInitialismName, original: original, matchedInitialism: matchedInitialism, } } -func newCasualNameLexem(original string) *casualNameLexem { - return &casualNameLexem{ +func newCasualNameLexem(original string) nameLexem { + return nameLexem{ + kind: lexemKindCasualName, original: original, } } -func (l *initialismNameLexem) GetUnsafeGoName() string { - return l.matchedInitialism -} +func (l nameLexem) GetUnsafeGoName() string { + if l.kind == lexemKindInitialismName { + return l.matchedInitialism + } + + var ( + first rune + rest string + ) -func (l *casualNameLexem) GetUnsafeGoName() string { - var first rune - var rest string for i, orig := range l.original { if i == 0 { first = orig continue } + if i > 0 { rest = l.original[i:] break } } + if len(l.original) > 1 { - return string(unicode.ToUpper(first)) + lower(rest) + b := poolOfBuffers.BorrowBuffer(utf8.UTFMax + len(rest)) + defer func() { + poolOfBuffers.RedeemBuffer(b) + }() + b.WriteRune(unicode.ToUpper(first)) + b.WriteString(lower(rest)) + return b.String() } return l.original } -func (l *initialismNameLexem) GetOriginal() string { +func (l nameLexem) GetOriginal() string { return l.original } -func (l *casualNameLexem) GetOriginal() string { - return l.original -} - -func (l *initialismNameLexem) IsInitialism() bool { - return true -} - -func (l *casualNameLexem) IsInitialism() bool { - return false +func (l nameLexem) IsInitialism() bool { + return l.kind == lexemKindInitialismName } diff --git a/pkg/k8s/vendor/github.com/go-openapi/swag/split.go b/pkg/k8s/vendor/github.com/go-openapi/swag/split.go index a1825fb7dc9..274727a866c 100644 --- a/pkg/k8s/vendor/github.com/go-openapi/swag/split.go +++ b/pkg/k8s/vendor/github.com/go-openapi/swag/split.go @@ -15,124 +15,269 @@ package swag import ( + "bytes" + "sync" "unicode" + "unicode/utf8" ) -var nameReplaceTable = map[rune]string{ - '@': "At ", - '&': "And ", - '|': "Pipe ", - '$': "Dollar ", - '!': "Bang ", - '-': "", - '_': "", -} - type ( splitter struct { - postSplitInitialismCheck bool initialisms []string + initialismsRunes [][]rune + initialismsUpperCased [][]rune // initialisms cached in their trimmed, upper-cased version + postSplitInitialismCheck bool + } + + splitterOption func(*splitter) + + initialismMatch struct { + body []rune + start, end int + complete bool + } + initialismMatches []initialismMatch +) + +type ( + // memory pools of temporary objects. + // + // These are used to recycle temporarily allocated objects + // and relieve the GC from undue pressure. + + matchesPool struct { + *sync.Pool } - splitterOption func(*splitter) *splitter + buffersPool struct { + *sync.Pool + } + + lexemsPool struct { + *sync.Pool + } + + splittersPool struct { + *sync.Pool + } ) -// split calls the splitter; splitter provides more control and post options +var ( + // poolOfMatches holds temporary slices for recycling during the initialism match process + poolOfMatches = matchesPool{ + Pool: &sync.Pool{ + New: func() any { + s := make(initialismMatches, 0, maxAllocMatches) + + return &s + }, + }, + } + + poolOfBuffers = buffersPool{ + Pool: &sync.Pool{ + New: func() any { + return new(bytes.Buffer) + }, + }, + } + + poolOfLexems = lexemsPool{ + Pool: &sync.Pool{ + New: func() any { + s := make([]nameLexem, 0, maxAllocMatches) + + return &s + }, + }, + } + + poolOfSplitters = splittersPool{ + Pool: &sync.Pool{ + New: func() any { + s := newSplitter() + + return &s + }, + }, + } +) + +// nameReplaceTable finds a word representation for special characters. +func nameReplaceTable(r rune) (string, bool) { + switch r { + case '@': + return "At ", true + case '&': + return "And ", true + case '|': + return "Pipe ", true + case '$': + return "Dollar ", true + case '!': + return "Bang ", true + case '-': + return "", true + case '_': + return "", true + default: + return "", false + } +} + +// split calls the splitter. +// +// Use newSplitter for more control and options func split(str string) []string { - lexems := newSplitter().split(str) - result := make([]string, 0, len(lexems)) + s := poolOfSplitters.BorrowSplitter() + lexems := s.split(str) + result := make([]string, 0, len(*lexems)) - for _, lexem := range lexems { + for _, lexem := range *lexems { result = append(result, lexem.GetOriginal()) } + poolOfLexems.RedeemLexems(lexems) + poolOfSplitters.RedeemSplitter(s) return result } -func (s *splitter) split(str string) []nameLexem { - return s.toNameLexems(str) -} - -func newSplitter(options ...splitterOption) *splitter { - splitter := &splitter{ +func newSplitter(options ...splitterOption) splitter { + s := splitter{ postSplitInitialismCheck: false, initialisms: initialisms, + initialismsRunes: initialismsRunes, + initialismsUpperCased: initialismsUpperCased, } for _, option := range options { - splitter = option(splitter) + option(&s) } - return splitter + return s } // withPostSplitInitialismCheck allows to catch initialisms after main split process -func withPostSplitInitialismCheck(s *splitter) *splitter { +func withPostSplitInitialismCheck(s *splitter) { s.postSplitInitialismCheck = true +} + +func (p matchesPool) BorrowMatches() *initialismMatches { + s := p.Get().(*initialismMatches) + *s = (*s)[:0] // reset slice, keep allocated capacity + return s } -type ( - initialismMatch struct { - start, end int - body []rune - complete bool +func (p buffersPool) BorrowBuffer(size int) *bytes.Buffer { + s := p.Get().(*bytes.Buffer) + s.Reset() + + if s.Cap() < size { + s.Grow(size) } - initialismMatches []*initialismMatch -) -func (s *splitter) toNameLexems(name string) []nameLexem { + return s +} + +func (p lexemsPool) BorrowLexems() *[]nameLexem { + s := p.Get().(*[]nameLexem) + *s = (*s)[:0] // reset slice, keep allocated capacity + + return s +} + +func (p splittersPool) BorrowSplitter(options ...splitterOption) *splitter { + s := p.Get().(*splitter) + s.postSplitInitialismCheck = false // reset options + for _, apply := range options { + apply(s) + } + + return s +} + +func (p matchesPool) RedeemMatches(s *initialismMatches) { + p.Put(s) +} + +func (p buffersPool) RedeemBuffer(s *bytes.Buffer) { + p.Put(s) +} + +func (p lexemsPool) RedeemLexems(s *[]nameLexem) { + p.Put(s) +} + +func (p splittersPool) RedeemSplitter(s *splitter) { + p.Put(s) +} + +func (m initialismMatch) isZero() bool { + return m.start == 0 && m.end == 0 +} + +func (s splitter) split(name string) *[]nameLexem { nameRunes := []rune(name) matches := s.gatherInitialismMatches(nameRunes) + if matches == nil { + return poolOfLexems.BorrowLexems() + } + return s.mapMatchesToNameLexems(nameRunes, matches) } -func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches { - matches := make(initialismMatches, 0) +func (s splitter) gatherInitialismMatches(nameRunes []rune) *initialismMatches { + var matches *initialismMatches for currentRunePosition, currentRune := range nameRunes { - newMatches := make(initialismMatches, 0, len(matches)) + // recycle these allocations as we loop over runes + // with such recycling, only 2 slices should be allocated per call + // instead of o(n). + newMatches := poolOfMatches.BorrowMatches() // check current initialism matches - for _, match := range matches { - if keepCompleteMatch := match.complete; keepCompleteMatch { - newMatches = append(newMatches, match) - continue - } + if matches != nil { // skip first iteration + for _, match := range *matches { + if keepCompleteMatch := match.complete; keepCompleteMatch { + *newMatches = append(*newMatches, match) + continue + } - // drop failed match - currentMatchRune := match.body[currentRunePosition-match.start] - if !s.initialismRuneEqual(currentMatchRune, currentRune) { - continue - } + // drop failed match + currentMatchRune := match.body[currentRunePosition-match.start] + if currentMatchRune != currentRune { + continue + } - // try to complete ongoing match - if currentRunePosition-match.start == len(match.body)-1 { - // we are close; the next step is to check the symbol ahead - // if it is a small letter, then it is not the end of match - // but beginning of the next word - - if currentRunePosition < len(nameRunes)-1 { - nextRune := nameRunes[currentRunePosition+1] - if newWord := unicode.IsLower(nextRune); newWord { - // oh ok, it was the start of a new word - continue + // try to complete ongoing match + if currentRunePosition-match.start == len(match.body)-1 { + // we are close; the next step is to check the symbol ahead + // if it is a small letter, then it is not the end of match + // but beginning of the next word + + if currentRunePosition < len(nameRunes)-1 { + nextRune := nameRunes[currentRunePosition+1] + if newWord := unicode.IsLower(nextRune); newWord { + // oh ok, it was the start of a new word + continue + } } + + match.complete = true + match.end = currentRunePosition } - match.complete = true - match.end = currentRunePosition + *newMatches = append(*newMatches, match) } - - newMatches = append(newMatches, match) } // check for new initialism matches - for _, initialism := range s.initialisms { - initialismRunes := []rune(initialism) - if s.initialismRuneEqual(initialismRunes[0], currentRune) { - newMatches = append(newMatches, &initialismMatch{ + for i := range s.initialisms { + initialismRunes := s.initialismsRunes[i] + if initialismRunes[0] == currentRune { + *newMatches = append(*newMatches, initialismMatch{ start: currentRunePosition, body: initialismRunes, complete: false, @@ -140,24 +285,28 @@ func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches { } } + if matches != nil { + poolOfMatches.RedeemMatches(matches) + } matches = newMatches } + // up to the caller to redeem this last slice return matches } -func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMatches) []nameLexem { - nameLexems := make([]nameLexem, 0) +func (s splitter) mapMatchesToNameLexems(nameRunes []rune, matches *initialismMatches) *[]nameLexem { + nameLexems := poolOfLexems.BorrowLexems() - var lastAcceptedMatch *initialismMatch - for _, match := range matches { + var lastAcceptedMatch initialismMatch + for _, match := range *matches { if !match.complete { continue } - if firstMatch := lastAcceptedMatch == nil; firstMatch { - nameLexems = append(nameLexems, s.breakCasualString(nameRunes[:match.start])...) - nameLexems = append(nameLexems, s.breakInitialism(string(match.body))) + if firstMatch := lastAcceptedMatch.isZero(); firstMatch { + s.appendBrokenDownCasualString(nameLexems, nameRunes[:match.start]) + *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) lastAcceptedMatch = match @@ -169,63 +318,66 @@ func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMa } middle := nameRunes[lastAcceptedMatch.end+1 : match.start] - nameLexems = append(nameLexems, s.breakCasualString(middle)...) - nameLexems = append(nameLexems, s.breakInitialism(string(match.body))) + s.appendBrokenDownCasualString(nameLexems, middle) + *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) lastAcceptedMatch = match } // we have not found any accepted matches - if lastAcceptedMatch == nil { - return s.breakCasualString(nameRunes) - } - - if lastAcceptedMatch.end+1 != len(nameRunes) { + if lastAcceptedMatch.isZero() { + *nameLexems = (*nameLexems)[:0] + s.appendBrokenDownCasualString(nameLexems, nameRunes) + } else if lastAcceptedMatch.end+1 != len(nameRunes) { rest := nameRunes[lastAcceptedMatch.end+1:] - nameLexems = append(nameLexems, s.breakCasualString(rest)...) + s.appendBrokenDownCasualString(nameLexems, rest) } - return nameLexems -} + poolOfMatches.RedeemMatches(matches) -func (s *splitter) initialismRuneEqual(a, b rune) bool { - return a == b + return nameLexems } -func (s *splitter) breakInitialism(original string) nameLexem { +func (s splitter) breakInitialism(original string) nameLexem { return newInitialismNameLexem(original, original) } -func (s *splitter) breakCasualString(str []rune) []nameLexem { - segments := make([]nameLexem, 0) - currentSegment := "" +func (s splitter) appendBrokenDownCasualString(segments *[]nameLexem, str []rune) { + currentSegment := poolOfBuffers.BorrowBuffer(len(str)) // unlike strings.Builder, bytes.Buffer initial storage can reused + defer func() { + poolOfBuffers.RedeemBuffer(currentSegment) + }() addCasualNameLexem := func(original string) { - segments = append(segments, newCasualNameLexem(original)) + *segments = append(*segments, newCasualNameLexem(original)) } addInitialismNameLexem := func(original, match string) { - segments = append(segments, newInitialismNameLexem(original, match)) + *segments = append(*segments, newInitialismNameLexem(original, match)) } - addNameLexem := func(original string) { - if s.postSplitInitialismCheck { - for _, initialism := range s.initialisms { - if upper(initialism) == upper(original) { - addInitialismNameLexem(original, initialism) + var addNameLexem func(string) + if s.postSplitInitialismCheck { + addNameLexem = func(original string) { + for i := range s.initialisms { + if isEqualFoldIgnoreSpace(s.initialismsUpperCased[i], original) { + addInitialismNameLexem(original, s.initialisms[i]) + return } } - } - addCasualNameLexem(original) + addCasualNameLexem(original) + } + } else { + addNameLexem = addCasualNameLexem } - for _, rn := range string(str) { - if replace, found := nameReplaceTable[rn]; found { - if currentSegment != "" { - addNameLexem(currentSegment) - currentSegment = "" + for _, rn := range str { + if replace, found := nameReplaceTable(rn); found { + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) + currentSegment.Reset() } if replace != "" { @@ -236,27 +388,121 @@ func (s *splitter) breakCasualString(str []rune) []nameLexem { } if !unicode.In(rn, unicode.L, unicode.M, unicode.N, unicode.Pc) { - if currentSegment != "" { - addNameLexem(currentSegment) - currentSegment = "" + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) + currentSegment.Reset() } continue } if unicode.IsUpper(rn) { - if currentSegment != "" { - addNameLexem(currentSegment) + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) } - currentSegment = "" + currentSegment.Reset() } - currentSegment += string(rn) + currentSegment.WriteRune(rn) + } + + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) } +} + +// isEqualFoldIgnoreSpace is the same as strings.EqualFold, but +// it ignores leading and trailing blank spaces in the compared +// string. +// +// base is assumed to be composed of upper-cased runes, and be already +// trimmed. +// +// This code is heavily inspired from strings.EqualFold. +func isEqualFoldIgnoreSpace(base []rune, str string) bool { + var i, baseIndex int + // equivalent to b := []byte(str), but without data copy + b := hackStringBytes(str) + + for i < len(b) { + if c := b[i]; c < utf8.RuneSelf { + // fast path for ASCII + if c != ' ' && c != '\t' { + break + } + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if !unicode.IsSpace(r) { + break + } + i += size + } + + if i >= len(b) { + return len(base) == 0 + } + + for _, baseRune := range base { + if i >= len(b) { + break + } + + if c := b[i]; c < utf8.RuneSelf { + // single byte rune case (ASCII) + if baseRune >= utf8.RuneSelf { + return false + } + + baseChar := byte(baseRune) + if c != baseChar && + !('a' <= c && c <= 'z' && c-'a'+'A' == baseChar) { + return false + } + + baseIndex++ + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if unicode.ToUpper(r) != baseRune { + return false + } + baseIndex++ + i += size + } + + if baseIndex != len(base) { + return false + } + + // all passed: now we should only have blanks + for i < len(b) { + if c := b[i]; c < utf8.RuneSelf { + // fast path for ASCII + if c != ' ' && c != '\t' { + return false + } + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if !unicode.IsSpace(r) { + return false + } - if currentSegment != "" { - addNameLexem(currentSegment) + i += size } - return segments + return true } diff --git a/pkg/k8s/vendor/github.com/go-openapi/swag/string_bytes.go b/pkg/k8s/vendor/github.com/go-openapi/swag/string_bytes.go new file mode 100644 index 00000000000..90745d5ca9f --- /dev/null +++ b/pkg/k8s/vendor/github.com/go-openapi/swag/string_bytes.go @@ -0,0 +1,8 @@ +package swag + +import "unsafe" + +// hackStringBytes returns the (unsafe) underlying bytes slice of a string. +func hackStringBytes(str string) []byte { + return unsafe.Slice(unsafe.StringData(str), len(str)) +} diff --git a/pkg/k8s/vendor/github.com/go-openapi/swag/util.go b/pkg/k8s/vendor/github.com/go-openapi/swag/util.go index 0413f7447cc..5051401c49f 100644 --- a/pkg/k8s/vendor/github.com/go-openapi/swag/util.go +++ b/pkg/k8s/vendor/github.com/go-openapi/swag/util.go @@ -18,76 +18,25 @@ import ( "reflect" "strings" "unicode" + "unicode/utf8" ) -// commonInitialisms are common acronyms that are kept as whole uppercased words. -var commonInitialisms *indexOfInitialisms - -// initialisms is a slice of sorted initialisms -var initialisms []string - -var isInitialism func(string) bool - // GoNamePrefixFunc sets an optional rule to prefix go names // which do not start with a letter. // +// The prefix function is assumed to return a string that starts with an upper case letter. +// // e.g. to help convert "123" into "{prefix}123" // // The default is to prefix with "X" var GoNamePrefixFunc func(string) string -func init() { - // Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769 - var configuredInitialisms = map[string]bool{ - "ACL": true, - "API": true, - "ASCII": true, - "CPU": true, - "CSS": true, - "DNS": true, - "EOF": true, - "GUID": true, - "HTML": true, - "HTTPS": true, - "HTTP": true, - "ID": true, - "IP": true, - "IPv4": true, - "IPv6": true, - "JSON": true, - "LHS": true, - "OAI": true, - "QPS": true, - "RAM": true, - "RHS": true, - "RPC": true, - "SLA": true, - "SMTP": true, - "SQL": true, - "SSH": true, - "TCP": true, - "TLS": true, - "TTL": true, - "UDP": true, - "UI": true, - "UID": true, - "UUID": true, - "URI": true, - "URL": true, - "UTF8": true, - "VM": true, - "XML": true, - "XMPP": true, - "XSRF": true, - "XSS": true, +func prefixFunc(name, in string) string { + if GoNamePrefixFunc == nil { + return "X" + in } - // a thread-safe index of initialisms - commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms) - initialisms = commonInitialisms.sorted() - - // a test function - isInitialism = commonInitialisms.isInitialism + return GoNamePrefixFunc(name) + in } const ( @@ -156,22 +105,6 @@ func SplitByFormat(data, format string) []string { return result } -type byInitialism []string - -func (s byInitialism) Len() int { - return len(s) -} -func (s byInitialism) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} -func (s byInitialism) Less(i, j int) bool { - if len(s[i]) != len(s[j]) { - return len(s[i]) < len(s[j]) - } - - return strings.Compare(s[i], s[j]) > 0 -} - // Removes leading whitespaces func trim(str string) string { return strings.TrimSpace(str) @@ -188,15 +121,20 @@ func lower(str string) string { } // Camelize an uppercased word -func Camelize(word string) (camelized string) { +func Camelize(word string) string { + camelized := poolOfBuffers.BorrowBuffer(len(word)) + defer func() { + poolOfBuffers.RedeemBuffer(camelized) + }() + for pos, ru := range []rune(word) { if pos > 0 { - camelized += string(unicode.ToLower(ru)) + camelized.WriteRune(unicode.ToLower(ru)) } else { - camelized += string(unicode.ToUpper(ru)) + camelized.WriteRune(unicode.ToUpper(ru)) } } - return + return camelized.String() } // ToFileName lowercases and underscores a go type name @@ -224,26 +162,31 @@ func ToCommandName(name string) string { // ToHumanNameLower represents a code name as a human series of words func ToHumanNameLower(name string) string { - in := newSplitter(withPostSplitInitialismCheck).split(name) - out := make([]string, 0, len(in)) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + in := s.split(name) + poolOfSplitters.RedeemSplitter(s) + out := make([]string, 0, len(*in)) - for _, w := range in { + for _, w := range *in { if !w.IsInitialism() { out = append(out, lower(w.GetOriginal())) } else { out = append(out, trim(w.GetOriginal())) } } + poolOfLexems.RedeemLexems(in) return strings.Join(out, " ") } // ToHumanNameTitle represents a code name as a human series of words with the first letters titleized func ToHumanNameTitle(name string) string { - in := newSplitter(withPostSplitInitialismCheck).split(name) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + in := s.split(name) + poolOfSplitters.RedeemSplitter(s) - out := make([]string, 0, len(in)) - for _, w := range in { + out := make([]string, 0, len(*in)) + for _, w := range *in { original := trim(w.GetOriginal()) if !w.IsInitialism() { out = append(out, Camelize(original)) @@ -251,6 +194,8 @@ func ToHumanNameTitle(name string) string { out = append(out, original) } } + poolOfLexems.RedeemLexems(in) + return strings.Join(out, " ") } @@ -283,35 +228,70 @@ func ToVarName(name string) string { // ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes func ToGoName(name string) string { - lexems := newSplitter(withPostSplitInitialismCheck).split(name) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + lexems := s.split(name) + poolOfSplitters.RedeemSplitter(s) + defer func() { + poolOfLexems.RedeemLexems(lexems) + }() + lexemes := *lexems + + if len(lexemes) == 0 { + return "" + } + + result := poolOfBuffers.BorrowBuffer(len(name)) + defer func() { + poolOfBuffers.RedeemBuffer(result) + }() + + // check if not starting with a letter, upper case + firstPart := lexemes[0].GetUnsafeGoName() + if lexemes[0].IsInitialism() { + firstPart = upper(firstPart) + } + + if c := firstPart[0]; c < utf8.RuneSelf { + // ASCII + switch { + case 'A' <= c && c <= 'Z': + result.WriteString(firstPart) + case 'a' <= c && c <= 'z': + result.WriteByte(c - 'a' + 'A') + result.WriteString(firstPart[1:]) + default: + result.WriteString(prefixFunc(name, firstPart)) + // NOTE: no longer check if prefixFunc returns a string that starts with uppercase: + // assume this is always the case + } + } else { + // unicode + firstRune, _ := utf8.DecodeRuneInString(firstPart) + switch { + case !unicode.IsLetter(firstRune): + result.WriteString(prefixFunc(name, firstPart)) + case !unicode.IsUpper(firstRune): + result.WriteString(prefixFunc(name, firstPart)) + /* + result.WriteRune(unicode.ToUpper(firstRune)) + result.WriteString(firstPart[offset:]) + */ + default: + result.WriteString(firstPart) + } + } - result := "" - for _, lexem := range lexems { + for _, lexem := range lexemes[1:] { goName := lexem.GetUnsafeGoName() // to support old behavior if lexem.IsInitialism() { goName = upper(goName) } - result += goName + result.WriteString(goName) } - if len(result) > 0 { - // Only prefix with X when the first character isn't an ascii letter - first := []rune(result)[0] - if !unicode.IsLetter(first) || (first > unicode.MaxASCII && !unicode.IsUpper(first)) { - if GoNamePrefixFunc == nil { - return "X" + result - } - result = GoNamePrefixFunc(name) + result - } - first = []rune(result)[0] - if unicode.IsLetter(first) && !unicode.IsUpper(first) { - result = string(append([]rune{unicode.ToUpper(first)}, []rune(result)[1:]...)) - } - } - - return result + return result.String() } // ContainsStrings searches a slice of strings for a case-sensitive match @@ -376,16 +356,6 @@ func IsZero(data interface{}) bool { } } -// AddInitialisms add additional initialisms -func AddInitialisms(words ...string) { - for _, word := range words { - // commonInitialisms[upper(word)] = true - commonInitialisms.add(upper(word)) - } - // sort again - initialisms = commonInitialisms.sorted() -} - // CommandLineOptionsGroup represents a group of user-defined command line options type CommandLineOptionsGroup struct { ShortDescription string diff --git a/pkg/k8s/vendor/github.com/go-openapi/swag/yaml.go b/pkg/k8s/vendor/github.com/go-openapi/swag/yaml.go index a8c4e359ea6..f59e0259320 100644 --- a/pkg/k8s/vendor/github.com/go-openapi/swag/yaml.go +++ b/pkg/k8s/vendor/github.com/go-openapi/swag/yaml.go @@ -16,6 +16,7 @@ package swag import ( "encoding/json" + "errors" "fmt" "path/filepath" "reflect" @@ -50,7 +51,7 @@ func BytesToYAMLDoc(data []byte) (interface{}, error) { return nil, err } if document.Kind != yaml.DocumentNode || len(document.Content) != 1 || document.Content[0].Kind != yaml.MappingNode { - return nil, fmt.Errorf("only YAML documents that are objects are supported") + return nil, errors.New("only YAML documents that are objects are supported") } return &document, nil } diff --git a/pkg/k8s/vendor/github.com/spf13/cobra/.golangci.yml b/pkg/k8s/vendor/github.com/spf13/cobra/.golangci.yml index a618ec24d84..2c8f4808c1a 100644 --- a/pkg/k8s/vendor/github.com/spf13/cobra/.golangci.yml +++ b/pkg/k8s/vendor/github.com/spf13/cobra/.golangci.yml @@ -26,33 +26,28 @@ linters: - errcheck #- exhaustive #- funlen - - gas #- gochecknoinits - goconst - #- gocritic + - gocritic #- gocyclo - #- gofmt + - gofmt - goimports - - golint #- gomnd #- goprintffuncname - #- gosec - #- gosimple + - gosec + - gosimple - govet - ineffassign - - interfacer #- lll - - maligned - - megacheck - #- misspell + - misspell #- nakedret #- noctx - #- nolintlint + - nolintlint #- rowserrcheck #- scopelint - #- staticcheck + - staticcheck #- structcheck ! deprecated since v1.49.0; replaced by 'unused' - #- stylecheck + - stylecheck #- typecheck - unconvert #- unparam diff --git a/pkg/k8s/vendor/github.com/spf13/cobra/active_help.go b/pkg/k8s/vendor/github.com/spf13/cobra/active_help.go index 5f965e057f2..25c30e3ccc3 100644 --- a/pkg/k8s/vendor/github.com/spf13/cobra/active_help.go +++ b/pkg/k8s/vendor/github.com/spf13/cobra/active_help.go @@ -17,21 +17,17 @@ package cobra import ( "fmt" "os" - "regexp" - "strings" ) const ( activeHelpMarker = "_activeHelp_ " // The below values should not be changed: programs will be using them explicitly // in their user documentation, and users will be using them explicitly. - activeHelpEnvVarSuffix = "_ACTIVE_HELP" - activeHelpGlobalEnvVar = "COBRA_ACTIVE_HELP" + activeHelpEnvVarSuffix = "ACTIVE_HELP" + activeHelpGlobalEnvVar = configEnvVarGlobalPrefix + "_" + activeHelpEnvVarSuffix activeHelpGlobalDisable = "0" ) -var activeHelpEnvVarPrefixSubstRegexp = regexp.MustCompile(`[^A-Z0-9_]`) - // AppendActiveHelp adds the specified string to the specified array to be used as ActiveHelp. // Such strings will be processed by the completion script and will be shown as ActiveHelp // to the user. @@ -60,8 +56,5 @@ func GetActiveHelpConfig(cmd *Command) string { // variable. It has the format _ACTIVE_HELP where is the name of the // root command in upper case, with all non-ASCII-alphanumeric characters replaced by `_`. func activeHelpEnvVar(name string) string { - // This format should not be changed: users will be using it explicitly. - activeHelpEnvVar := strings.ToUpper(fmt.Sprintf("%s%s", name, activeHelpEnvVarSuffix)) - activeHelpEnvVar = activeHelpEnvVarPrefixSubstRegexp.ReplaceAllString(activeHelpEnvVar, "_") - return activeHelpEnvVar + return configEnvVar(name, activeHelpEnvVarSuffix) } diff --git a/pkg/k8s/vendor/github.com/spf13/cobra/args.go b/pkg/k8s/vendor/github.com/spf13/cobra/args.go index e79ec33a81d..ed1e70ceaa4 100644 --- a/pkg/k8s/vendor/github.com/spf13/cobra/args.go +++ b/pkg/k8s/vendor/github.com/spf13/cobra/args.go @@ -52,9 +52,9 @@ func OnlyValidArgs(cmd *Command, args []string) error { if len(cmd.ValidArgs) > 0 { // Remove any description that may be included in ValidArgs. // A description is following a tab character. - var validArgs []string + validArgs := make([]string, 0, len(cmd.ValidArgs)) for _, v := range cmd.ValidArgs { - validArgs = append(validArgs, strings.Split(v, "\t")[0]) + validArgs = append(validArgs, strings.SplitN(v, "\t", 2)[0]) } for _, v := range args { if !stringInSlice(v, validArgs) { diff --git a/pkg/k8s/vendor/github.com/spf13/cobra/bash_completions.go b/pkg/k8s/vendor/github.com/spf13/cobra/bash_completions.go index 8a531518409..f4d198cbcbd 100644 --- a/pkg/k8s/vendor/github.com/spf13/cobra/bash_completions.go +++ b/pkg/k8s/vendor/github.com/spf13/cobra/bash_completions.go @@ -597,19 +597,16 @@ func writeRequiredFlag(buf io.StringWriter, cmd *Command) { if nonCompletableFlag(flag) { return } - for key := range flag.Annotations { - switch key { - case BashCompOneRequiredFlag: - format := " must_have_one_flag+=(\"--%s" - if flag.Value.Type() != "bool" { - format += "=" - } - format += cbn - WriteStringAndCheck(buf, fmt.Sprintf(format, flag.Name)) - - if len(flag.Shorthand) > 0 { - WriteStringAndCheck(buf, fmt.Sprintf(" must_have_one_flag+=(\"-%s"+cbn, flag.Shorthand)) - } + if _, ok := flag.Annotations[BashCompOneRequiredFlag]; ok { + format := " must_have_one_flag+=(\"--%s" + if flag.Value.Type() != "bool" { + format += "=" + } + format += cbn + WriteStringAndCheck(buf, fmt.Sprintf(format, flag.Name)) + + if len(flag.Shorthand) > 0 { + WriteStringAndCheck(buf, fmt.Sprintf(" must_have_one_flag+=(\"-%s"+cbn, flag.Shorthand)) } } }) @@ -621,7 +618,7 @@ func writeRequiredNouns(buf io.StringWriter, cmd *Command) { for _, value := range cmd.ValidArgs { // Remove any description that may be included following a tab character. // Descriptions are not supported by bash completion. - value = strings.Split(value, "\t")[0] + value = strings.SplitN(value, "\t", 2)[0] WriteStringAndCheck(buf, fmt.Sprintf(" must_have_one_noun+=(%q)\n", value)) } if cmd.ValidArgsFunction != nil { diff --git a/pkg/k8s/vendor/github.com/spf13/cobra/cobra.go b/pkg/k8s/vendor/github.com/spf13/cobra/cobra.go index a6b160ce53c..e0b0947b04c 100644 --- a/pkg/k8s/vendor/github.com/spf13/cobra/cobra.go +++ b/pkg/k8s/vendor/github.com/spf13/cobra/cobra.go @@ -193,8 +193,6 @@ func ld(s, t string, ignoreCase bool) int { d := make([][]int, len(s)+1) for i := range d { d[i] = make([]int, len(t)+1) - } - for i := range d { d[i][0] = i } for j := range d[0] { diff --git a/pkg/k8s/vendor/github.com/spf13/cobra/command.go b/pkg/k8s/vendor/github.com/spf13/cobra/command.go index 2fbe6c131a7..54748fc67eb 100644 --- a/pkg/k8s/vendor/github.com/spf13/cobra/command.go +++ b/pkg/k8s/vendor/github.com/spf13/cobra/command.go @@ -154,8 +154,10 @@ type Command struct { // pflags contains persistent flags. pflags *flag.FlagSet // lflags contains local flags. + // This field does not represent internal state, it's used as a cache to optimise LocalFlags function call lflags *flag.FlagSet // iflags contains inherited flags. + // This field does not represent internal state, it's used as a cache to optimise InheritedFlags function call iflags *flag.FlagSet // parentsPflags is all persistent flags of cmd's parents. parentsPflags *flag.FlagSet @@ -706,7 +708,7 @@ Loop: // This is not a flag or a flag value. Check to see if it matches what we're looking for, and if so, // return the args, excluding the one at this position. if s == x { - ret := []string{} + ret := make([]string, 0, len(args)-1) ret = append(ret, args[:pos]...) ret = append(ret, args[pos+1:]...) return ret @@ -754,14 +756,14 @@ func (c *Command) findSuggestions(arg string) string { if c.SuggestionsMinimumDistance <= 0 { c.SuggestionsMinimumDistance = 2 } - suggestionsString := "" + var sb strings.Builder if suggestions := c.SuggestionsFor(arg); len(suggestions) > 0 { - suggestionsString += "\n\nDid you mean this?\n" + sb.WriteString("\n\nDid you mean this?\n") for _, s := range suggestions { - suggestionsString += fmt.Sprintf("\t%v\n", s) + _, _ = fmt.Fprintf(&sb, "\t%v\n", s) } } - return suggestionsString + return sb.String() } func (c *Command) findNext(next string) *Command { @@ -873,7 +875,7 @@ func (c *Command) ArgsLenAtDash() int { func (c *Command) execute(a []string) (err error) { if c == nil { - return fmt.Errorf("Called Execute() on a nil Command") + return fmt.Errorf("called Execute() on a nil Command") } if len(c.Deprecated) > 0 { @@ -1187,10 +1189,11 @@ func (c *Command) InitDefaultHelpFlag() { c.mergePersistentFlags() if c.Flags().Lookup("help") == nil { usage := "help for " - if c.Name() == "" { + name := c.displayName() + if name == "" { usage += "this command" } else { - usage += c.Name() + usage += name } c.Flags().BoolP("help", "h", false, usage) _ = c.Flags().SetAnnotation("help", FlagSetByCobraAnnotation, []string{"true"}) @@ -1236,7 +1239,7 @@ func (c *Command) InitDefaultHelpCmd() { Use: "help [command]", Short: "Help about any command", Long: `Help provides help for any command in the application. -Simply type ` + c.Name() + ` help [path to command] for full details.`, +Simply type ` + c.displayName() + ` help [path to command] for full details.`, ValidArgsFunction: func(c *Command, args []string, toComplete string) ([]string, ShellCompDirective) { var completions []string cmd, _, e := c.Root().Find(args) @@ -1427,6 +1430,10 @@ func (c *Command) CommandPath() string { if c.HasParent() { return c.Parent().CommandPath() + " " + c.Name() } + return c.displayName() +} + +func (c *Command) displayName() string { if displayName, ok := c.Annotations[CommandDisplayNameAnnotation]; ok { return displayName } @@ -1436,10 +1443,11 @@ func (c *Command) CommandPath() string { // UseLine puts out the full usage for a given command (including parents). func (c *Command) UseLine() string { var useline string + use := strings.Replace(c.Use, c.Name(), c.displayName(), 1) if c.HasParent() { - useline = c.parent.CommandPath() + " " + c.Use + useline = c.parent.CommandPath() + " " + use } else { - useline = c.Use + useline = use } if c.DisableFlagsInUseLine { return useline @@ -1452,7 +1460,6 @@ func (c *Command) UseLine() string { // DebugFlags used to determine which flags have been assigned to which commands // and which persist. -// nolint:goconst func (c *Command) DebugFlags() { c.Println("DebugFlags called on", c.Name()) var debugflags func(*Command) @@ -1642,7 +1649,7 @@ func (c *Command) GlobalNormalizationFunc() func(f *flag.FlagSet, name string) f // to this command (local and persistent declared here and by all parents). func (c *Command) Flags() *flag.FlagSet { if c.flags == nil { - c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) + c.flags = flag.NewFlagSet(c.displayName(), flag.ContinueOnError) if c.flagErrorBuf == nil { c.flagErrorBuf = new(bytes.Buffer) } @@ -1653,10 +1660,11 @@ func (c *Command) Flags() *flag.FlagSet { } // LocalNonPersistentFlags are flags specific to this command which will NOT persist to subcommands. +// This function does not modify the flags of the current command, it's purpose is to return the current state. func (c *Command) LocalNonPersistentFlags() *flag.FlagSet { persistentFlags := c.PersistentFlags() - out := flag.NewFlagSet(c.Name(), flag.ContinueOnError) + out := flag.NewFlagSet(c.displayName(), flag.ContinueOnError) c.LocalFlags().VisitAll(func(f *flag.Flag) { if persistentFlags.Lookup(f.Name) == nil { out.AddFlag(f) @@ -1666,11 +1674,12 @@ func (c *Command) LocalNonPersistentFlags() *flag.FlagSet { } // LocalFlags returns the local FlagSet specifically set in the current command. +// This function does not modify the flags of the current command, it's purpose is to return the current state. func (c *Command) LocalFlags() *flag.FlagSet { c.mergePersistentFlags() if c.lflags == nil { - c.lflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) + c.lflags = flag.NewFlagSet(c.displayName(), flag.ContinueOnError) if c.flagErrorBuf == nil { c.flagErrorBuf = new(bytes.Buffer) } @@ -1693,11 +1702,12 @@ func (c *Command) LocalFlags() *flag.FlagSet { } // InheritedFlags returns all flags which were inherited from parent commands. +// This function does not modify the flags of the current command, it's purpose is to return the current state. func (c *Command) InheritedFlags() *flag.FlagSet { c.mergePersistentFlags() if c.iflags == nil { - c.iflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) + c.iflags = flag.NewFlagSet(c.displayName(), flag.ContinueOnError) if c.flagErrorBuf == nil { c.flagErrorBuf = new(bytes.Buffer) } @@ -1718,6 +1728,7 @@ func (c *Command) InheritedFlags() *flag.FlagSet { } // NonInheritedFlags returns all flags which were not inherited from parent commands. +// This function does not modify the flags of the current command, it's purpose is to return the current state. func (c *Command) NonInheritedFlags() *flag.FlagSet { return c.LocalFlags() } @@ -1725,7 +1736,7 @@ func (c *Command) NonInheritedFlags() *flag.FlagSet { // PersistentFlags returns the persistent FlagSet specifically set in the current command. func (c *Command) PersistentFlags() *flag.FlagSet { if c.pflags == nil { - c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) + c.pflags = flag.NewFlagSet(c.displayName(), flag.ContinueOnError) if c.flagErrorBuf == nil { c.flagErrorBuf = new(bytes.Buffer) } @@ -1738,9 +1749,9 @@ func (c *Command) PersistentFlags() *flag.FlagSet { func (c *Command) ResetFlags() { c.flagErrorBuf = new(bytes.Buffer) c.flagErrorBuf.Reset() - c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) + c.flags = flag.NewFlagSet(c.displayName(), flag.ContinueOnError) c.flags.SetOutput(c.flagErrorBuf) - c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) + c.pflags = flag.NewFlagSet(c.displayName(), flag.ContinueOnError) c.pflags.SetOutput(c.flagErrorBuf) c.lflags = nil @@ -1857,7 +1868,7 @@ func (c *Command) mergePersistentFlags() { // If c.parentsPflags == nil, it makes new. func (c *Command) updateParentsPflags() { if c.parentsPflags == nil { - c.parentsPflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) + c.parentsPflags = flag.NewFlagSet(c.displayName(), flag.ContinueOnError) c.parentsPflags.SetOutput(c.flagErrorBuf) c.parentsPflags.SortFlags = false } diff --git a/pkg/k8s/vendor/github.com/spf13/cobra/completions.go b/pkg/k8s/vendor/github.com/spf13/cobra/completions.go index b60f6b20007..c0c08b05721 100644 --- a/pkg/k8s/vendor/github.com/spf13/cobra/completions.go +++ b/pkg/k8s/vendor/github.com/spf13/cobra/completions.go @@ -17,6 +17,8 @@ package cobra import ( "fmt" "os" + "regexp" + "strconv" "strings" "sync" @@ -211,24 +213,29 @@ func (c *Command) initCompleteCmd(args []string) { // 2- Even without completions, we need to print the directive } - noDescriptions := (cmd.CalledAs() == ShellCompNoDescRequestCmd) + noDescriptions := cmd.CalledAs() == ShellCompNoDescRequestCmd + if !noDescriptions { + if doDescriptions, err := strconv.ParseBool(getEnvConfig(cmd, configEnvVarSuffixDescriptions)); err == nil { + noDescriptions = !doDescriptions + } + } + noActiveHelp := GetActiveHelpConfig(finalCmd) == activeHelpGlobalDisable + out := finalCmd.OutOrStdout() for _, comp := range completions { - if GetActiveHelpConfig(finalCmd) == activeHelpGlobalDisable { - // Remove all activeHelp entries in this case - if strings.HasPrefix(comp, activeHelpMarker) { - continue - } + if noActiveHelp && strings.HasPrefix(comp, activeHelpMarker) { + // Remove all activeHelp entries if it's disabled. + continue } if noDescriptions { // Remove any description that may be included following a tab character. - comp = strings.Split(comp, "\t")[0] + comp = strings.SplitN(comp, "\t", 2)[0] } // Make sure we only write the first line to the output. // This is needed if a description contains a linebreak. // Otherwise the shell scripts will interpret the other lines as new flags // and could therefore provide a wrong completion. - comp = strings.Split(comp, "\n")[0] + comp = strings.SplitN(comp, "\n", 2)[0] // Finally trim the completion. This is especially important to get rid // of a trailing tab when there are no description following it. @@ -237,14 +244,14 @@ func (c *Command) initCompleteCmd(args []string) { // although there is no description). comp = strings.TrimSpace(comp) - // Print each possible completion to stdout for the completion script to consume. - fmt.Fprintln(finalCmd.OutOrStdout(), comp) + // Print each possible completion to the output for the completion script to consume. + fmt.Fprintln(out, comp) } // As the last printout, print the completion directive for the completion script to parse. // The directive integer must be that last character following a single colon (:). // The completion script expects : - fmt.Fprintf(finalCmd.OutOrStdout(), ":%d\n", directive) + fmt.Fprintf(out, ":%d\n", directive) // Print some helpful info to stderr for the user to understand. // Output from stderr must be ignored by the completion script. @@ -291,7 +298,7 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi } if err != nil { // Unable to find the real command. E.g., someInvalidCmd - return c, []string{}, ShellCompDirectiveDefault, fmt.Errorf("Unable to find a command for arguments: %v", trimmedArgs) + return c, []string{}, ShellCompDirectiveDefault, fmt.Errorf("unable to find a command for arguments: %v", trimmedArgs) } finalCmd.ctx = c.ctx @@ -899,3 +906,34 @@ func CompError(msg string) { func CompErrorln(msg string) { CompError(fmt.Sprintf("%s\n", msg)) } + +// These values should not be changed: users will be using them explicitly. +const ( + configEnvVarGlobalPrefix = "COBRA" + configEnvVarSuffixDescriptions = "COMPLETION_DESCRIPTIONS" +) + +var configEnvVarPrefixSubstRegexp = regexp.MustCompile(`[^A-Z0-9_]`) + +// configEnvVar returns the name of the program-specific configuration environment +// variable. It has the format _ where is the name of the +// root command in upper case, with all non-ASCII-alphanumeric characters replaced by `_`. +func configEnvVar(name, suffix string) string { + // This format should not be changed: users will be using it explicitly. + v := strings.ToUpper(fmt.Sprintf("%s_%s", name, suffix)) + v = configEnvVarPrefixSubstRegexp.ReplaceAllString(v, "_") + return v +} + +// getEnvConfig returns the value of the configuration environment variable +// _ where is the name of the root command in upper +// case, with all non-ASCII-alphanumeric characters replaced by `_`. +// If the value is empty or not set, the value of the environment variable +// COBRA_ is returned instead. +func getEnvConfig(cmd *Command, suffix string) string { + v := os.Getenv(configEnvVar(cmd.Root().Name(), suffix)) + if v == "" { + v = os.Getenv(configEnvVar(configEnvVarGlobalPrefix, suffix)) + } + return v +} diff --git a/pkg/k8s/vendor/github.com/spf13/cobra/flag_groups.go b/pkg/k8s/vendor/github.com/spf13/cobra/flag_groups.go index 0671ec5f202..560612fd338 100644 --- a/pkg/k8s/vendor/github.com/spf13/cobra/flag_groups.go +++ b/pkg/k8s/vendor/github.com/spf13/cobra/flag_groups.go @@ -23,9 +23,9 @@ import ( ) const ( - requiredAsGroup = "cobra_annotation_required_if_others_set" - oneRequired = "cobra_annotation_one_required" - mutuallyExclusive = "cobra_annotation_mutually_exclusive" + requiredAsGroupAnnotation = "cobra_annotation_required_if_others_set" + oneRequiredAnnotation = "cobra_annotation_one_required" + mutuallyExclusiveAnnotation = "cobra_annotation_mutually_exclusive" ) // MarkFlagsRequiredTogether marks the given flags with annotations so that Cobra errors @@ -37,7 +37,7 @@ func (c *Command) MarkFlagsRequiredTogether(flagNames ...string) { if f == nil { panic(fmt.Sprintf("Failed to find flag %q and mark it as being required in a flag group", v)) } - if err := c.Flags().SetAnnotation(v, requiredAsGroup, append(f.Annotations[requiredAsGroup], strings.Join(flagNames, " "))); err != nil { + if err := c.Flags().SetAnnotation(v, requiredAsGroupAnnotation, append(f.Annotations[requiredAsGroupAnnotation], strings.Join(flagNames, " "))); err != nil { // Only errs if the flag isn't found. panic(err) } @@ -53,7 +53,7 @@ func (c *Command) MarkFlagsOneRequired(flagNames ...string) { if f == nil { panic(fmt.Sprintf("Failed to find flag %q and mark it as being in a one-required flag group", v)) } - if err := c.Flags().SetAnnotation(v, oneRequired, append(f.Annotations[oneRequired], strings.Join(flagNames, " "))); err != nil { + if err := c.Flags().SetAnnotation(v, oneRequiredAnnotation, append(f.Annotations[oneRequiredAnnotation], strings.Join(flagNames, " "))); err != nil { // Only errs if the flag isn't found. panic(err) } @@ -70,7 +70,7 @@ func (c *Command) MarkFlagsMutuallyExclusive(flagNames ...string) { panic(fmt.Sprintf("Failed to find flag %q and mark it as being in a mutually exclusive flag group", v)) } // Each time this is called is a single new entry; this allows it to be a member of multiple groups if needed. - if err := c.Flags().SetAnnotation(v, mutuallyExclusive, append(f.Annotations[mutuallyExclusive], strings.Join(flagNames, " "))); err != nil { + if err := c.Flags().SetAnnotation(v, mutuallyExclusiveAnnotation, append(f.Annotations[mutuallyExclusiveAnnotation], strings.Join(flagNames, " "))); err != nil { panic(err) } } @@ -91,9 +91,9 @@ func (c *Command) ValidateFlagGroups() error { oneRequiredGroupStatus := map[string]map[string]bool{} mutuallyExclusiveGroupStatus := map[string]map[string]bool{} flags.VisitAll(func(pflag *flag.Flag) { - processFlagForGroupAnnotation(flags, pflag, requiredAsGroup, groupStatus) - processFlagForGroupAnnotation(flags, pflag, oneRequired, oneRequiredGroupStatus) - processFlagForGroupAnnotation(flags, pflag, mutuallyExclusive, mutuallyExclusiveGroupStatus) + processFlagForGroupAnnotation(flags, pflag, requiredAsGroupAnnotation, groupStatus) + processFlagForGroupAnnotation(flags, pflag, oneRequiredAnnotation, oneRequiredGroupStatus) + processFlagForGroupAnnotation(flags, pflag, mutuallyExclusiveAnnotation, mutuallyExclusiveGroupStatus) }) if err := validateRequiredFlagGroups(groupStatus); err != nil { @@ -130,7 +130,7 @@ func processFlagForGroupAnnotation(flags *flag.FlagSet, pflag *flag.Flag, annota continue } - groupStatus[group] = map[string]bool{} + groupStatus[group] = make(map[string]bool, len(flagnames)) for _, name := range flagnames { groupStatus[group][name] = false } @@ -232,9 +232,9 @@ func (c *Command) enforceFlagGroupsForCompletion() { oneRequiredGroupStatus := map[string]map[string]bool{} mutuallyExclusiveGroupStatus := map[string]map[string]bool{} c.Flags().VisitAll(func(pflag *flag.Flag) { - processFlagForGroupAnnotation(flags, pflag, requiredAsGroup, groupStatus) - processFlagForGroupAnnotation(flags, pflag, oneRequired, oneRequiredGroupStatus) - processFlagForGroupAnnotation(flags, pflag, mutuallyExclusive, mutuallyExclusiveGroupStatus) + processFlagForGroupAnnotation(flags, pflag, requiredAsGroupAnnotation, groupStatus) + processFlagForGroupAnnotation(flags, pflag, oneRequiredAnnotation, oneRequiredGroupStatus) + processFlagForGroupAnnotation(flags, pflag, mutuallyExclusiveAnnotation, mutuallyExclusiveGroupStatus) }) // If a flag that is part of a group is present, we make all the other flags @@ -253,17 +253,17 @@ func (c *Command) enforceFlagGroupsForCompletion() { // If none of the flags of a one-required group are present, we make all the flags // of that group required so that the shell completion suggests them automatically for flagList, flagnameAndStatus := range oneRequiredGroupStatus { - set := 0 + isSet := false - for _, isSet := range flagnameAndStatus { + for _, isSet = range flagnameAndStatus { if isSet { - set++ + break } } // None of the flags of the group are set, mark all flags in the group // as required - if set == 0 { + if !isSet { for _, fName := range strings.Split(flagList, " ") { _ = c.MarkFlagRequired(fName) } diff --git a/pkg/k8s/vendor/github.com/spf13/cobra/powershell_completions.go b/pkg/k8s/vendor/github.com/spf13/cobra/powershell_completions.go index 55195193944..a830b7bcad2 100644 --- a/pkg/k8s/vendor/github.com/spf13/cobra/powershell_completions.go +++ b/pkg/k8s/vendor/github.com/spf13/cobra/powershell_completions.go @@ -28,8 +28,8 @@ import ( func genPowerShellComp(buf io.StringWriter, name string, includeDesc bool) { // Variables should not contain a '-' or ':' character nameForVar := name - nameForVar = strings.Replace(nameForVar, "-", "_", -1) - nameForVar = strings.Replace(nameForVar, ":", "_", -1) + nameForVar = strings.ReplaceAll(nameForVar, "-", "_") + nameForVar = strings.ReplaceAll(nameForVar, ":", "_") compCmd := ShellCompRequestCmd if !includeDesc { diff --git a/pkg/k8s/vendor/github.com/spf13/pflag/flag.go b/pkg/k8s/vendor/github.com/spf13/pflag/flag.go index 24a5036e95b..7c058de3744 100644 --- a/pkg/k8s/vendor/github.com/spf13/pflag/flag.go +++ b/pkg/k8s/vendor/github.com/spf13/pflag/flag.go @@ -160,7 +160,7 @@ type FlagSet struct { args []string // arguments after flags argsLenAtDash int // len(args) when a '--' was located when parsing, or -1 if no -- errorHandling ErrorHandling - output io.Writer // nil means stderr; use out() accessor + output io.Writer // nil means stderr; use Output() accessor interspersed bool // allow interspersed option/non-option args normalizeNameFunc func(f *FlagSet, name string) NormalizedName @@ -255,13 +255,20 @@ func (f *FlagSet) normalizeFlagName(name string) NormalizedName { return n(f, name) } -func (f *FlagSet) out() io.Writer { +// Output returns the destination for usage and error messages. os.Stderr is returned if +// output was not set or was set to nil. +func (f *FlagSet) Output() io.Writer { if f.output == nil { return os.Stderr } return f.output } +// Name returns the name of the flag set. +func (f *FlagSet) Name() string { + return f.name +} + // SetOutput sets the destination for usage and error messages. // If output is nil, os.Stderr is used. func (f *FlagSet) SetOutput(output io.Writer) { @@ -358,7 +365,7 @@ func (f *FlagSet) ShorthandLookup(name string) *Flag { } if len(name) > 1 { msg := fmt.Sprintf("can not look up shorthand which is more than one ASCII character: %q", name) - fmt.Fprintf(f.out(), msg) + fmt.Fprintf(f.Output(), msg) panic(msg) } c := name[0] @@ -482,7 +489,7 @@ func (f *FlagSet) Set(name, value string) error { } if flag.Deprecated != "" { - fmt.Fprintf(f.out(), "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) + fmt.Fprintf(f.Output(), "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) } return nil } @@ -523,7 +530,7 @@ func Set(name, value string) error { // otherwise, the default values of all defined flags in the set. func (f *FlagSet) PrintDefaults() { usages := f.FlagUsages() - fmt.Fprint(f.out(), usages) + fmt.Fprint(f.Output(), usages) } // defaultIsZeroValue returns true if the default value for this flag represents @@ -758,7 +765,7 @@ func PrintDefaults() { // defaultUsage is the default function to print a usage message. func defaultUsage(f *FlagSet) { - fmt.Fprintf(f.out(), "Usage of %s:\n", f.name) + fmt.Fprintf(f.Output(), "Usage of %s:\n", f.name) f.PrintDefaults() } @@ -844,7 +851,7 @@ func (f *FlagSet) AddFlag(flag *Flag) { _, alreadyThere := f.formal[normalizedFlagName] if alreadyThere { msg := fmt.Sprintf("%s flag redefined: %s", f.name, flag.Name) - fmt.Fprintln(f.out(), msg) + fmt.Fprintln(f.Output(), msg) panic(msg) // Happens only if flags are declared with identical names } if f.formal == nil { @@ -860,7 +867,7 @@ func (f *FlagSet) AddFlag(flag *Flag) { } if len(flag.Shorthand) > 1 { msg := fmt.Sprintf("%q shorthand is more than one ASCII character", flag.Shorthand) - fmt.Fprintf(f.out(), msg) + fmt.Fprintf(f.Output(), msg) panic(msg) } if f.shorthands == nil { @@ -870,7 +877,7 @@ func (f *FlagSet) AddFlag(flag *Flag) { used, alreadyThere := f.shorthands[c] if alreadyThere { msg := fmt.Sprintf("unable to redefine %q shorthand in %q flagset: it's already used for %q flag", c, f.name, used.Name) - fmt.Fprintf(f.out(), msg) + fmt.Fprintf(f.Output(), msg) panic(msg) } f.shorthands[c] = flag @@ -909,7 +916,7 @@ func VarP(value Value, name, shorthand, usage string) { func (f *FlagSet) failf(format string, a ...interface{}) error { err := fmt.Errorf(format, a...) if f.errorHandling != ContinueOnError { - fmt.Fprintln(f.out(), err) + fmt.Fprintln(f.Output(), err) f.usage() } return err @@ -1060,7 +1067,7 @@ func (f *FlagSet) parseSingleShortArg(shorthands string, args []string, fn parse } if flag.ShorthandDeprecated != "" { - fmt.Fprintf(f.out(), "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated) + fmt.Fprintf(f.Output(), "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated) } err = fn(flag, value) diff --git a/pkg/k8s/vendor/github.com/spf13/pflag/ip.go b/pkg/k8s/vendor/github.com/spf13/pflag/ip.go index 3d414ba69fe..06b8bcb5721 100644 --- a/pkg/k8s/vendor/github.com/spf13/pflag/ip.go +++ b/pkg/k8s/vendor/github.com/spf13/pflag/ip.go @@ -16,6 +16,9 @@ func newIPValue(val net.IP, p *net.IP) *ipValue { func (i *ipValue) String() string { return net.IP(*i).String() } func (i *ipValue) Set(s string) error { + if s == "" { + return nil + } ip := net.ParseIP(strings.TrimSpace(s)) if ip == nil { return fmt.Errorf("failed to parse IP: %q", s) diff --git a/pkg/k8s/vendor/github.com/spf13/pflag/ipnet_slice.go b/pkg/k8s/vendor/github.com/spf13/pflag/ipnet_slice.go new file mode 100644 index 00000000000..6b541aa8798 --- /dev/null +++ b/pkg/k8s/vendor/github.com/spf13/pflag/ipnet_slice.go @@ -0,0 +1,147 @@ +package pflag + +import ( + "fmt" + "io" + "net" + "strings" +) + +// -- ipNetSlice Value +type ipNetSliceValue struct { + value *[]net.IPNet + changed bool +} + +func newIPNetSliceValue(val []net.IPNet, p *[]net.IPNet) *ipNetSliceValue { + ipnsv := new(ipNetSliceValue) + ipnsv.value = p + *ipnsv.value = val + return ipnsv +} + +// Set converts, and assigns, the comma-separated IPNet argument string representation as the []net.IPNet value of this flag. +// If Set is called on a flag that already has a []net.IPNet assigned, the newly converted values will be appended. +func (s *ipNetSliceValue) Set(val string) error { + + // remove all quote characters + rmQuote := strings.NewReplacer(`"`, "", `'`, "", "`", "") + + // read flag arguments with CSV parser + ipNetStrSlice, err := readAsCSV(rmQuote.Replace(val)) + if err != nil && err != io.EOF { + return err + } + + // parse ip values into slice + out := make([]net.IPNet, 0, len(ipNetStrSlice)) + for _, ipNetStr := range ipNetStrSlice { + _, n, err := net.ParseCIDR(strings.TrimSpace(ipNetStr)) + if err != nil { + return fmt.Errorf("invalid string being converted to CIDR: %s", ipNetStr) + } + out = append(out, *n) + } + + if !s.changed { + *s.value = out + } else { + *s.value = append(*s.value, out...) + } + + s.changed = true + + return nil +} + +// Type returns a string that uniquely represents this flag's type. +func (s *ipNetSliceValue) Type() string { + return "ipNetSlice" +} + +// String defines a "native" format for this net.IPNet slice flag value. +func (s *ipNetSliceValue) String() string { + + ipNetStrSlice := make([]string, len(*s.value)) + for i, n := range *s.value { + ipNetStrSlice[i] = n.String() + } + + out, _ := writeAsCSV(ipNetStrSlice) + return "[" + out + "]" +} + +func ipNetSliceConv(val string) (interface{}, error) { + val = strings.Trim(val, "[]") + // Emtpy string would cause a slice with one (empty) entry + if len(val) == 0 { + return []net.IPNet{}, nil + } + ss := strings.Split(val, ",") + out := make([]net.IPNet, len(ss)) + for i, sval := range ss { + _, n, err := net.ParseCIDR(strings.TrimSpace(sval)) + if err != nil { + return nil, fmt.Errorf("invalid string being converted to CIDR: %s", sval) + } + out[i] = *n + } + return out, nil +} + +// GetIPNetSlice returns the []net.IPNet value of a flag with the given name +func (f *FlagSet) GetIPNetSlice(name string) ([]net.IPNet, error) { + val, err := f.getFlagType(name, "ipNetSlice", ipNetSliceConv) + if err != nil { + return []net.IPNet{}, err + } + return val.([]net.IPNet), nil +} + +// IPNetSliceVar defines a ipNetSlice flag with specified name, default value, and usage string. +// The argument p points to a []net.IPNet variable in which to store the value of the flag. +func (f *FlagSet) IPNetSliceVar(p *[]net.IPNet, name string, value []net.IPNet, usage string) { + f.VarP(newIPNetSliceValue(value, p), name, "", usage) +} + +// IPNetSliceVarP is like IPNetSliceVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IPNetSliceVarP(p *[]net.IPNet, name, shorthand string, value []net.IPNet, usage string) { + f.VarP(newIPNetSliceValue(value, p), name, shorthand, usage) +} + +// IPNetSliceVar defines a []net.IPNet flag with specified name, default value, and usage string. +// The argument p points to a []net.IPNet variable in which to store the value of the flag. +func IPNetSliceVar(p *[]net.IPNet, name string, value []net.IPNet, usage string) { + CommandLine.VarP(newIPNetSliceValue(value, p), name, "", usage) +} + +// IPNetSliceVarP is like IPNetSliceVar, but accepts a shorthand letter that can be used after a single dash. +func IPNetSliceVarP(p *[]net.IPNet, name, shorthand string, value []net.IPNet, usage string) { + CommandLine.VarP(newIPNetSliceValue(value, p), name, shorthand, usage) +} + +// IPNetSlice defines a []net.IPNet flag with specified name, default value, and usage string. +// The return value is the address of a []net.IPNet variable that stores the value of that flag. +func (f *FlagSet) IPNetSlice(name string, value []net.IPNet, usage string) *[]net.IPNet { + p := []net.IPNet{} + f.IPNetSliceVarP(&p, name, "", value, usage) + return &p +} + +// IPNetSliceP is like IPNetSlice, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IPNetSliceP(name, shorthand string, value []net.IPNet, usage string) *[]net.IPNet { + p := []net.IPNet{} + f.IPNetSliceVarP(&p, name, shorthand, value, usage) + return &p +} + +// IPNetSlice defines a []net.IPNet flag with specified name, default value, and usage string. +// The return value is the address of a []net.IP variable that stores the value of the flag. +func IPNetSlice(name string, value []net.IPNet, usage string) *[]net.IPNet { + return CommandLine.IPNetSliceP(name, "", value, usage) +} + +// IPNetSliceP is like IPNetSlice, but accepts a shorthand letter that can be used after a single dash. +func IPNetSliceP(name, shorthand string, value []net.IPNet, usage string) *[]net.IPNet { + return CommandLine.IPNetSliceP(name, shorthand, value, usage) +} diff --git a/pkg/k8s/vendor/github.com/spf13/pflag/string_array.go b/pkg/k8s/vendor/github.com/spf13/pflag/string_array.go index 4894af81802..d1ff0a96ba0 100644 --- a/pkg/k8s/vendor/github.com/spf13/pflag/string_array.go +++ b/pkg/k8s/vendor/github.com/spf13/pflag/string_array.go @@ -31,11 +31,7 @@ func (s *stringArrayValue) Append(val string) error { func (s *stringArrayValue) Replace(val []string) error { out := make([]string, len(val)) for i, d := range val { - var err error out[i] = d - if err != nil { - return err - } } *s.value = out return nil diff --git a/pkg/k8s/vendor/golang.org/x/mod/module/module.go b/pkg/k8s/vendor/golang.org/x/mod/module/module.go index 2a364b229b9..cac1a899e9c 100644 --- a/pkg/k8s/vendor/golang.org/x/mod/module/module.go +++ b/pkg/k8s/vendor/golang.org/x/mod/module/module.go @@ -506,6 +506,7 @@ var badWindowsNames = []string{ "PRN", "AUX", "NUL", + "COM0", "COM1", "COM2", "COM3", @@ -515,6 +516,7 @@ var badWindowsNames = []string{ "COM7", "COM8", "COM9", + "LPT0", "LPT1", "LPT2", "LPT3", diff --git a/pkg/k8s/vendor/golang.org/x/net/http/httpguts/httplex.go b/pkg/k8s/vendor/golang.org/x/net/http/httpguts/httplex.go index 6e071e85243..9b4de94019b 100644 --- a/pkg/k8s/vendor/golang.org/x/net/http/httpguts/httplex.go +++ b/pkg/k8s/vendor/golang.org/x/net/http/httpguts/httplex.go @@ -12,7 +12,7 @@ import ( "golang.org/x/net/idna" ) -var isTokenTable = [127]bool{ +var isTokenTable = [256]bool{ '!': true, '#': true, '$': true, @@ -93,12 +93,7 @@ var isTokenTable = [127]bool{ } func IsTokenRune(r rune) bool { - i := int(r) - return i < len(isTokenTable) && isTokenTable[i] -} - -func isNotToken(r rune) bool { - return !IsTokenRune(r) + return r < utf8.RuneSelf && isTokenTable[byte(r)] } // HeaderValuesContainsToken reports whether any string in values @@ -202,8 +197,8 @@ func ValidHeaderFieldName(v string) bool { if len(v) == 0 { return false } - for _, r := range v { - if !IsTokenRune(r) { + for i := 0; i < len(v); i++ { + if !isTokenTable[v[i]] { return false } } diff --git a/pkg/k8s/vendor/golang.org/x/net/http2/frame.go b/pkg/k8s/vendor/golang.org/x/net/http2/frame.go index 43557ab7e97..105c3b279c0 100644 --- a/pkg/k8s/vendor/golang.org/x/net/http2/frame.go +++ b/pkg/k8s/vendor/golang.org/x/net/http2/frame.go @@ -490,6 +490,9 @@ func terminalReadFrameError(err error) bool { // returned error is ErrFrameTooLarge. Other errors may be of type // ConnectionError, StreamError, or anything else from the underlying // reader. +// +// If ReadFrame returns an error and a non-nil Frame, the Frame's StreamID +// indicates the stream responsible for the error. func (fr *Framer) ReadFrame() (Frame, error) { fr.errDetail = nil if fr.lastFrame != nil { @@ -1521,7 +1524,7 @@ func (fr *Framer) maxHeaderStringLen() int { // readMetaFrame returns 0 or more CONTINUATION frames from fr and // merge them into the provided hf and returns a MetaHeadersFrame // with the decoded hpack values. -func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { +func (fr *Framer) readMetaFrame(hf *HeadersFrame) (Frame, error) { if fr.AllowIllegalReads { return nil, errors.New("illegal use of AllowIllegalReads with ReadMetaHeaders") } @@ -1592,7 +1595,7 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { } // It would be nice to send a RST_STREAM before sending the GOAWAY, // but the structure of the server's frame writer makes this difficult. - return nil, ConnectionError(ErrCodeProtocol) + return mh, ConnectionError(ErrCodeProtocol) } // Also close the connection after any CONTINUATION frame following an @@ -1604,11 +1607,11 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { } // It would be nice to send a RST_STREAM before sending the GOAWAY, // but the structure of the server's frame writer makes this difficult. - return nil, ConnectionError(ErrCodeProtocol) + return mh, ConnectionError(ErrCodeProtocol) } if _, err := hdec.Write(frag); err != nil { - return nil, ConnectionError(ErrCodeCompression) + return mh, ConnectionError(ErrCodeCompression) } if hc.HeadersEnded() { @@ -1625,7 +1628,7 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { mh.HeadersFrame.invalidate() if err := hdec.Close(); err != nil { - return nil, ConnectionError(ErrCodeCompression) + return mh, ConnectionError(ErrCodeCompression) } if invalid != nil { fr.errDetail = invalid diff --git a/pkg/k8s/vendor/golang.org/x/net/http2/http2.go b/pkg/k8s/vendor/golang.org/x/net/http2/http2.go index 6f2df281872..003e649f30c 100644 --- a/pkg/k8s/vendor/golang.org/x/net/http2/http2.go +++ b/pkg/k8s/vendor/golang.org/x/net/http2/http2.go @@ -17,6 +17,7 @@ package http2 // import "golang.org/x/net/http2" import ( "bufio" + "context" "crypto/tls" "fmt" "io" @@ -26,6 +27,7 @@ import ( "strconv" "strings" "sync" + "time" "golang.org/x/net/http/httpguts" ) @@ -210,12 +212,6 @@ type stringWriter interface { WriteString(s string) (n int, err error) } -// A gate lets two goroutines coordinate their activities. -type gate chan struct{} - -func (g gate) Done() { g <- struct{}{} } -func (g gate) Wait() { <-g } - // A closeWaiter is like a sync.WaitGroup but only goes 1 to 0 (open to closed). type closeWaiter chan struct{} @@ -383,3 +379,14 @@ func validPseudoPath(v string) bool { // makes that struct also non-comparable, and generally doesn't add // any size (as long as it's first). type incomparable [0]func() + +// synctestGroupInterface is the methods of synctestGroup used by Server and Transport. +// It's defined as an interface here to let us keep synctestGroup entirely test-only +// and not a part of non-test builds. +type synctestGroupInterface interface { + Join() + Now() time.Time + NewTimer(d time.Duration) timer + AfterFunc(d time.Duration, f func()) timer + ContextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) +} diff --git a/pkg/k8s/vendor/golang.org/x/net/http2/server.go b/pkg/k8s/vendor/golang.org/x/net/http2/server.go index ce2e8b40eee..6c349f3ec64 100644 --- a/pkg/k8s/vendor/golang.org/x/net/http2/server.go +++ b/pkg/k8s/vendor/golang.org/x/net/http2/server.go @@ -154,6 +154,39 @@ type Server struct { // so that we don't embed a Mutex in this struct, which will make the // struct non-copyable, which might break some callers. state *serverInternalState + + // Synchronization group used for testing. + // Outside of tests, this is nil. + group synctestGroupInterface +} + +func (s *Server) markNewGoroutine() { + if s.group != nil { + s.group.Join() + } +} + +func (s *Server) now() time.Time { + if s.group != nil { + return s.group.Now() + } + return time.Now() +} + +// newTimer creates a new time.Timer, or a synthetic timer in tests. +func (s *Server) newTimer(d time.Duration) timer { + if s.group != nil { + return s.group.NewTimer(d) + } + return timeTimer{time.NewTimer(d)} +} + +// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests. +func (s *Server) afterFunc(d time.Duration, f func()) timer { + if s.group != nil { + return s.group.AfterFunc(d, f) + } + return timeTimer{time.AfterFunc(d, f)} } func (s *Server) initialConnRecvWindowSize() int32 { @@ -400,6 +433,10 @@ func (o *ServeConnOpts) handler() http.Handler { // // The opts parameter is optional. If nil, default values are used. func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { + s.serveConn(c, opts, nil) +} + +func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverConn)) { baseCtx, cancel := serverConnBaseContext(c, opts) defer cancel() @@ -426,6 +463,9 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { pushEnabled: true, sawClientPreface: opts.SawClientPreface, } + if newf != nil { + newf(sc) + } s.state.registerConn(sc) defer s.state.unregisterConn(sc) @@ -599,8 +639,8 @@ type serverConn struct { inFrameScheduleLoop bool // whether we're in the scheduleFrameWrite loop needToSendGoAway bool // we need to schedule a GOAWAY frame write goAwayCode ErrCode - shutdownTimer *time.Timer // nil until used - idleTimer *time.Timer // nil if unused + shutdownTimer timer // nil until used + idleTimer timer // nil if unused // Owned by the writeFrameAsync goroutine: headerWriteBuf bytes.Buffer @@ -649,12 +689,12 @@ type stream struct { flow outflow // limits writing from Handler to client inflow inflow // what the client is allowed to POST/etc to us state streamState - resetQueued bool // RST_STREAM queued for write; set by sc.resetStream - gotTrailerHeader bool // HEADER frame for trailers was seen - wroteHeaders bool // whether we wrote headers (not status 100) - readDeadline *time.Timer // nil if unused - writeDeadline *time.Timer // nil if unused - closeErr error // set before cw is closed + resetQueued bool // RST_STREAM queued for write; set by sc.resetStream + gotTrailerHeader bool // HEADER frame for trailers was seen + wroteHeaders bool // whether we wrote headers (not status 100) + readDeadline timer // nil if unused + writeDeadline timer // nil if unused + closeErr error // set before cw is closed trailer http.Header // accumulated trailers reqTrailer http.Header // handler's Request.Trailer @@ -732,11 +772,7 @@ func isClosedConnError(err error) bool { return false } - // TODO: remove this string search and be more like the Windows - // case below. That might involve modifying the standard library - // to return better error types. - str := err.Error() - if strings.Contains(str, "use of closed network connection") { + if errors.Is(err, net.ErrClosed) { return true } @@ -815,8 +851,9 @@ type readFrameResult struct { // consumer is done with the frame. // It's run on its own goroutine. func (sc *serverConn) readFrames() { - gate := make(gate) - gateDone := gate.Done + sc.srv.markNewGoroutine() + gate := make(chan struct{}) + gateDone := func() { gate <- struct{}{} } for { f, err := sc.framer.ReadFrame() select { @@ -847,6 +884,7 @@ type frameWriteResult struct { // At most one goroutine can be running writeFrameAsync at a time per // serverConn. func (sc *serverConn) writeFrameAsync(wr FrameWriteRequest, wd *writeData) { + sc.srv.markNewGoroutine() var err error if wd == nil { err = wr.write.writeFrame(sc) @@ -926,13 +964,13 @@ func (sc *serverConn) serve() { sc.setConnState(http.StateIdle) if sc.srv.IdleTimeout > 0 { - sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer) + sc.idleTimer = sc.srv.afterFunc(sc.srv.IdleTimeout, sc.onIdleTimer) defer sc.idleTimer.Stop() } go sc.readFrames() // closed by defer sc.conn.Close above - settingsTimer := time.AfterFunc(firstSettingsTimeout, sc.onSettingsTimer) + settingsTimer := sc.srv.afterFunc(firstSettingsTimeout, sc.onSettingsTimer) defer settingsTimer.Stop() loopNum := 0 @@ -1061,10 +1099,10 @@ func (sc *serverConn) readPreface() error { errc <- nil } }() - timer := time.NewTimer(prefaceTimeout) // TODO: configurable on *Server? + timer := sc.srv.newTimer(prefaceTimeout) // TODO: configurable on *Server? defer timer.Stop() select { - case <-timer.C: + case <-timer.C(): return errPrefaceTimeout case err := <-errc: if err == nil { @@ -1429,7 +1467,7 @@ func (sc *serverConn) goAway(code ErrCode) { func (sc *serverConn) shutDownIn(d time.Duration) { sc.serveG.check() - sc.shutdownTimer = time.AfterFunc(d, sc.onShutdownTimer) + sc.shutdownTimer = sc.srv.afterFunc(d, sc.onShutdownTimer) } func (sc *serverConn) resetStream(se StreamError) { @@ -1482,6 +1520,11 @@ func (sc *serverConn) processFrameFromReader(res readFrameResult) bool { sc.goAway(ErrCodeFlowControl) return true case ConnectionError: + if res.f != nil { + if id := res.f.Header().StreamID; id > sc.maxClientStreamID { + sc.maxClientStreamID = id + } + } sc.logf("http2: server connection error from %v: %v", sc.conn.RemoteAddr(), ev) sc.goAway(ErrCode(ev)) return true // goAway will handle shutdown @@ -1638,7 +1681,7 @@ func (sc *serverConn) closeStream(st *stream, err error) { delete(sc.streams, st.id) if len(sc.streams) == 0 { sc.setConnState(http.StateIdle) - if sc.srv.IdleTimeout > 0 { + if sc.srv.IdleTimeout > 0 && sc.idleTimer != nil { sc.idleTimer.Reset(sc.srv.IdleTimeout) } if h1ServerKeepAlivesDisabled(sc.hs) { @@ -1660,6 +1703,7 @@ func (sc *serverConn) closeStream(st *stream, err error) { } } st.closeErr = err + st.cancelCtx() st.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc sc.writeSched.CloseStream(st.id) } @@ -2020,7 +2064,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { // (in Go 1.8), though. That's a more sane option anyway. if sc.hs.ReadTimeout > 0 { sc.conn.SetReadDeadline(time.Time{}) - st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout) + st.readDeadline = sc.srv.afterFunc(sc.hs.ReadTimeout, st.onReadTimeout) } return sc.scheduleHandler(id, rw, req, handler) @@ -2118,7 +2162,7 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream st.flow.add(sc.initialStreamSendWindowSize) st.inflow.init(sc.srv.initialStreamRecvWindowSize()) if sc.hs.WriteTimeout > 0 { - st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout) + st.writeDeadline = sc.srv.afterFunc(sc.hs.WriteTimeout, st.onWriteTimeout) } sc.streams[id] = st @@ -2342,6 +2386,7 @@ func (sc *serverConn) handlerDone() { // Run on its own goroutine. func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) { + sc.srv.markNewGoroutine() defer sc.sendServeMsg(handlerDoneMsg) didPanic := true defer func() { @@ -2638,7 +2683,7 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) { var date string if _, ok := rws.snapHeader["Date"]; !ok { // TODO(bradfitz): be faster here, like net/http? measure. - date = time.Now().UTC().Format(http.TimeFormat) + date = rws.conn.srv.now().UTC().Format(http.TimeFormat) } for _, v := range rws.snapHeader["Trailer"] { @@ -2760,7 +2805,7 @@ func (rws *responseWriterState) promoteUndeclaredTrailers() { func (w *responseWriter) SetReadDeadline(deadline time.Time) error { st := w.rws.stream - if !deadline.IsZero() && deadline.Before(time.Now()) { + if !deadline.IsZero() && deadline.Before(w.rws.conn.srv.now()) { // If we're setting a deadline in the past, reset the stream immediately // so writes after SetWriteDeadline returns will fail. st.onReadTimeout() @@ -2776,9 +2821,9 @@ func (w *responseWriter) SetReadDeadline(deadline time.Time) error { if deadline.IsZero() { st.readDeadline = nil } else if st.readDeadline == nil { - st.readDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onReadTimeout) + st.readDeadline = sc.srv.afterFunc(deadline.Sub(sc.srv.now()), st.onReadTimeout) } else { - st.readDeadline.Reset(deadline.Sub(time.Now())) + st.readDeadline.Reset(deadline.Sub(sc.srv.now())) } }) return nil @@ -2786,7 +2831,7 @@ func (w *responseWriter) SetReadDeadline(deadline time.Time) error { func (w *responseWriter) SetWriteDeadline(deadline time.Time) error { st := w.rws.stream - if !deadline.IsZero() && deadline.Before(time.Now()) { + if !deadline.IsZero() && deadline.Before(w.rws.conn.srv.now()) { // If we're setting a deadline in the past, reset the stream immediately // so writes after SetWriteDeadline returns will fail. st.onWriteTimeout() @@ -2802,9 +2847,9 @@ func (w *responseWriter) SetWriteDeadline(deadline time.Time) error { if deadline.IsZero() { st.writeDeadline = nil } else if st.writeDeadline == nil { - st.writeDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onWriteTimeout) + st.writeDeadline = sc.srv.afterFunc(deadline.Sub(sc.srv.now()), st.onWriteTimeout) } else { - st.writeDeadline.Reset(deadline.Sub(time.Now())) + st.writeDeadline.Reset(deadline.Sub(sc.srv.now())) } }) return nil diff --git a/pkg/k8s/vendor/golang.org/x/net/http2/testsync.go b/pkg/k8s/vendor/golang.org/x/net/http2/testsync.go deleted file mode 100644 index 61075bd16d3..00000000000 --- a/pkg/k8s/vendor/golang.org/x/net/http2/testsync.go +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright 2024 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 http2 - -import ( - "context" - "sync" - "time" -) - -// testSyncHooks coordinates goroutines in tests. -// -// For example, a call to ClientConn.RoundTrip involves several goroutines, including: -// - the goroutine running RoundTrip; -// - the clientStream.doRequest goroutine, which writes the request; and -// - the clientStream.readLoop goroutine, which reads the response. -// -// Using testSyncHooks, a test can start a RoundTrip and identify when all these goroutines -// are blocked waiting for some condition such as reading the Request.Body or waiting for -// flow control to become available. -// -// The testSyncHooks also manage timers and synthetic time in tests. -// This permits us to, for example, start a request and cause it to time out waiting for -// response headers without resorting to time.Sleep calls. -type testSyncHooks struct { - // active/inactive act as a mutex and condition variable. - // - // - neither chan contains a value: testSyncHooks is locked. - // - active contains a value: unlocked, and at least one goroutine is not blocked - // - inactive contains a value: unlocked, and all goroutines are blocked - active chan struct{} - inactive chan struct{} - - // goroutine counts - total int // total goroutines - condwait map[*sync.Cond]int // blocked in sync.Cond.Wait - blocked []*testBlockedGoroutine // otherwise blocked - - // fake time - now time.Time - timers []*fakeTimer - - // Transport testing: Report various events. - newclientconn func(*ClientConn) - newstream func(*clientStream) -} - -// testBlockedGoroutine is a blocked goroutine. -type testBlockedGoroutine struct { - f func() bool // blocked until f returns true - ch chan struct{} // closed when unblocked -} - -func newTestSyncHooks() *testSyncHooks { - h := &testSyncHooks{ - active: make(chan struct{}, 1), - inactive: make(chan struct{}, 1), - condwait: map[*sync.Cond]int{}, - } - h.inactive <- struct{}{} - h.now = time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC) - return h -} - -// lock acquires the testSyncHooks mutex. -func (h *testSyncHooks) lock() { - select { - case <-h.active: - case <-h.inactive: - } -} - -// waitInactive waits for all goroutines to become inactive. -func (h *testSyncHooks) waitInactive() { - for { - <-h.inactive - if !h.unlock() { - break - } - } -} - -// unlock releases the testSyncHooks mutex. -// It reports whether any goroutines are active. -func (h *testSyncHooks) unlock() (active bool) { - // Look for a blocked goroutine which can be unblocked. - blocked := h.blocked[:0] - unblocked := false - for _, b := range h.blocked { - if !unblocked && b.f() { - unblocked = true - close(b.ch) - } else { - blocked = append(blocked, b) - } - } - h.blocked = blocked - - // Count goroutines blocked on condition variables. - condwait := 0 - for _, count := range h.condwait { - condwait += count - } - - if h.total > condwait+len(blocked) { - h.active <- struct{}{} - return true - } else { - h.inactive <- struct{}{} - return false - } -} - -// goRun starts a new goroutine. -func (h *testSyncHooks) goRun(f func()) { - h.lock() - h.total++ - h.unlock() - go func() { - defer func() { - h.lock() - h.total-- - h.unlock() - }() - f() - }() -} - -// blockUntil indicates that a goroutine is blocked waiting for some condition to become true. -// It waits until f returns true before proceeding. -// -// Example usage: -// -// h.blockUntil(func() bool { -// // Is the context done yet? -// select { -// case <-ctx.Done(): -// default: -// return false -// } -// return true -// }) -// // Wait for the context to become done. -// <-ctx.Done() -// -// The function f passed to blockUntil must be non-blocking and idempotent. -func (h *testSyncHooks) blockUntil(f func() bool) { - if f() { - return - } - ch := make(chan struct{}) - h.lock() - h.blocked = append(h.blocked, &testBlockedGoroutine{ - f: f, - ch: ch, - }) - h.unlock() - <-ch -} - -// broadcast is sync.Cond.Broadcast. -func (h *testSyncHooks) condBroadcast(cond *sync.Cond) { - h.lock() - delete(h.condwait, cond) - h.unlock() - cond.Broadcast() -} - -// broadcast is sync.Cond.Wait. -func (h *testSyncHooks) condWait(cond *sync.Cond) { - h.lock() - h.condwait[cond]++ - h.unlock() -} - -// newTimer creates a new fake timer. -func (h *testSyncHooks) newTimer(d time.Duration) timer { - h.lock() - defer h.unlock() - t := &fakeTimer{ - hooks: h, - when: h.now.Add(d), - c: make(chan time.Time), - } - h.timers = append(h.timers, t) - return t -} - -// afterFunc creates a new fake AfterFunc timer. -func (h *testSyncHooks) afterFunc(d time.Duration, f func()) timer { - h.lock() - defer h.unlock() - t := &fakeTimer{ - hooks: h, - when: h.now.Add(d), - f: f, - } - h.timers = append(h.timers, t) - return t -} - -func (h *testSyncHooks) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) { - ctx, cancel := context.WithCancel(ctx) - t := h.afterFunc(d, cancel) - return ctx, func() { - t.Stop() - cancel() - } -} - -func (h *testSyncHooks) timeUntilEvent() time.Duration { - h.lock() - defer h.unlock() - var next time.Time - for _, t := range h.timers { - if next.IsZero() || t.when.Before(next) { - next = t.when - } - } - if d := next.Sub(h.now); d > 0 { - return d - } - return 0 -} - -// advance advances time and causes synthetic timers to fire. -func (h *testSyncHooks) advance(d time.Duration) { - h.lock() - defer h.unlock() - h.now = h.now.Add(d) - timers := h.timers[:0] - for _, t := range h.timers { - t := t // remove after go.mod depends on go1.22 - t.mu.Lock() - switch { - case t.when.After(h.now): - timers = append(timers, t) - case t.when.IsZero(): - // stopped timer - default: - t.when = time.Time{} - if t.c != nil { - close(t.c) - } - if t.f != nil { - h.total++ - go func() { - defer func() { - h.lock() - h.total-- - h.unlock() - }() - t.f() - }() - } - } - t.mu.Unlock() - } - h.timers = timers -} - -// A timer wraps a time.Timer, or a synthetic equivalent in tests. -// Unlike time.Timer, timer is single-use: The timer channel is closed when the timer expires. -type timer interface { - C() <-chan time.Time - Stop() bool - Reset(d time.Duration) bool -} - -// timeTimer implements timer using real time. -type timeTimer struct { - t *time.Timer - c chan time.Time -} - -// newTimeTimer creates a new timer using real time. -func newTimeTimer(d time.Duration) timer { - ch := make(chan time.Time) - t := time.AfterFunc(d, func() { - close(ch) - }) - return &timeTimer{t, ch} -} - -// newTimeAfterFunc creates an AfterFunc timer using real time. -func newTimeAfterFunc(d time.Duration, f func()) timer { - return &timeTimer{ - t: time.AfterFunc(d, f), - } -} - -func (t timeTimer) C() <-chan time.Time { return t.c } -func (t timeTimer) Stop() bool { return t.t.Stop() } -func (t timeTimer) Reset(d time.Duration) bool { return t.t.Reset(d) } - -// fakeTimer implements timer using fake time. -type fakeTimer struct { - hooks *testSyncHooks - - mu sync.Mutex - when time.Time // when the timer will fire - c chan time.Time // closed when the timer fires; mutually exclusive with f - f func() // called when the timer fires; mutually exclusive with c -} - -func (t *fakeTimer) C() <-chan time.Time { return t.c } - -func (t *fakeTimer) Stop() bool { - t.mu.Lock() - defer t.mu.Unlock() - stopped := t.when.IsZero() - t.when = time.Time{} - return stopped -} - -func (t *fakeTimer) Reset(d time.Duration) bool { - if t.c != nil || t.f == nil { - panic("fakeTimer only supports Reset on AfterFunc timers") - } - t.mu.Lock() - defer t.mu.Unlock() - t.hooks.lock() - defer t.hooks.unlock() - active := !t.when.IsZero() - t.when = t.hooks.now.Add(d) - if !active { - t.hooks.timers = append(t.hooks.timers, t) - } - return active -} diff --git a/pkg/k8s/vendor/golang.org/x/net/http2/timer.go b/pkg/k8s/vendor/golang.org/x/net/http2/timer.go new file mode 100644 index 00000000000..0b1c17b8129 --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/net/http2/timer.go @@ -0,0 +1,20 @@ +// Copyright 2024 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 http2 + +import "time" + +// A timer is a time.Timer, as an interface which can be replaced in tests. +type timer = interface { + C() <-chan time.Time + Reset(d time.Duration) bool + Stop() bool +} + +// timeTimer adapts a time.Timer to the timer interface. +type timeTimer struct { + *time.Timer +} + +func (t timeTimer) C() <-chan time.Time { return t.Timer.C } diff --git a/pkg/k8s/vendor/golang.org/x/net/http2/transport.go b/pkg/k8s/vendor/golang.org/x/net/http2/transport.go index ce375c8c753..98a49c6b6ee 100644 --- a/pkg/k8s/vendor/golang.org/x/net/http2/transport.go +++ b/pkg/k8s/vendor/golang.org/x/net/http2/transport.go @@ -185,7 +185,45 @@ type Transport struct { connPoolOnce sync.Once connPoolOrDef ClientConnPool // non-nil version of ConnPool - syncHooks *testSyncHooks + *transportTestHooks +} + +// Hook points used for testing. +// Outside of tests, t.transportTestHooks is nil and these all have minimal implementations. +// Inside tests, see the testSyncHooks function docs. + +type transportTestHooks struct { + newclientconn func(*ClientConn) + group synctestGroupInterface +} + +func (t *Transport) markNewGoroutine() { + if t != nil && t.transportTestHooks != nil { + t.transportTestHooks.group.Join() + } +} + +// newTimer creates a new time.Timer, or a synthetic timer in tests. +func (t *Transport) newTimer(d time.Duration) timer { + if t.transportTestHooks != nil { + return t.transportTestHooks.group.NewTimer(d) + } + return timeTimer{time.NewTimer(d)} +} + +// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests. +func (t *Transport) afterFunc(d time.Duration, f func()) timer { + if t.transportTestHooks != nil { + return t.transportTestHooks.group.AfterFunc(d, f) + } + return timeTimer{time.AfterFunc(d, f)} +} + +func (t *Transport) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) { + if t.transportTestHooks != nil { + return t.transportTestHooks.group.ContextWithTimeout(ctx, d) + } + return context.WithTimeout(ctx, d) } func (t *Transport) maxHeaderListSize() uint32 { @@ -352,60 +390,6 @@ type ClientConn struct { werr error // first write error that has occurred hbuf bytes.Buffer // HPACK encoder writes into this henc *hpack.Encoder - - syncHooks *testSyncHooks // can be nil -} - -// Hook points used for testing. -// Outside of tests, cc.syncHooks is nil and these all have minimal implementations. -// Inside tests, see the testSyncHooks function docs. - -// goRun starts a new goroutine. -func (cc *ClientConn) goRun(f func()) { - if cc.syncHooks != nil { - cc.syncHooks.goRun(f) - return - } - go f() -} - -// condBroadcast is cc.cond.Broadcast. -func (cc *ClientConn) condBroadcast() { - if cc.syncHooks != nil { - cc.syncHooks.condBroadcast(cc.cond) - } - cc.cond.Broadcast() -} - -// condWait is cc.cond.Wait. -func (cc *ClientConn) condWait() { - if cc.syncHooks != nil { - cc.syncHooks.condWait(cc.cond) - } - cc.cond.Wait() -} - -// newTimer creates a new time.Timer, or a synthetic timer in tests. -func (cc *ClientConn) newTimer(d time.Duration) timer { - if cc.syncHooks != nil { - return cc.syncHooks.newTimer(d) - } - return newTimeTimer(d) -} - -// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests. -func (cc *ClientConn) afterFunc(d time.Duration, f func()) timer { - if cc.syncHooks != nil { - return cc.syncHooks.afterFunc(d, f) - } - return newTimeAfterFunc(d, f) -} - -func (cc *ClientConn) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) { - if cc.syncHooks != nil { - return cc.syncHooks.contextWithTimeout(ctx, d) - } - return context.WithTimeout(ctx, d) } // clientStream is the state for a single HTTP/2 stream. One of these @@ -487,7 +471,7 @@ func (cs *clientStream) abortStreamLocked(err error) { // TODO(dneil): Clean up tests where cs.cc.cond is nil. if cs.cc.cond != nil { // Wake up writeRequestBody if it is waiting on flow control. - cs.cc.condBroadcast() + cs.cc.cond.Broadcast() } } @@ -497,7 +481,7 @@ func (cs *clientStream) abortRequestBodyWrite() { defer cc.mu.Unlock() if cs.reqBody != nil && cs.reqBodyClosed == nil { cs.closeReqBodyLocked() - cc.condBroadcast() + cc.cond.Broadcast() } } @@ -507,10 +491,11 @@ func (cs *clientStream) closeReqBodyLocked() { } cs.reqBodyClosed = make(chan struct{}) reqBodyClosed := cs.reqBodyClosed - cs.cc.goRun(func() { + go func() { + cs.cc.t.markNewGoroutine() cs.reqBody.Close() close(reqBodyClosed) - }) + }() } type stickyErrWriter struct { @@ -626,21 +611,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res backoff := float64(uint(1) << (uint(retry) - 1)) backoff += backoff * (0.1 * mathrand.Float64()) d := time.Second * time.Duration(backoff) - var tm timer - if t.syncHooks != nil { - tm = t.syncHooks.newTimer(d) - t.syncHooks.blockUntil(func() bool { - select { - case <-tm.C(): - case <-req.Context().Done(): - default: - return false - } - return true - }) - } else { - tm = newTimeTimer(d) - } + tm := t.newTimer(d) select { case <-tm.C(): t.vlogf("RoundTrip retrying after failure: %v", roundTripErr) @@ -725,8 +696,8 @@ func canRetryError(err error) bool { } func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse bool) (*ClientConn, error) { - if t.syncHooks != nil { - return t.newClientConn(nil, singleUse, t.syncHooks) + if t.transportTestHooks != nil { + return t.newClientConn(nil, singleUse) } host, _, err := net.SplitHostPort(addr) if err != nil { @@ -736,7 +707,7 @@ func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse b if err != nil { return nil, err } - return t.newClientConn(tconn, singleUse, nil) + return t.newClientConn(tconn, singleUse) } func (t *Transport) newTLSConfig(host string) *tls.Config { @@ -802,10 +773,10 @@ func (t *Transport) maxEncoderHeaderTableSize() uint32 { } func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { - return t.newClientConn(c, t.disableKeepAlives(), nil) + return t.newClientConn(c, t.disableKeepAlives()) } -func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHooks) (*ClientConn, error) { +func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) { cc := &ClientConn{ t: t, tconn: c, @@ -820,16 +791,12 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHoo wantSettingsAck: true, pings: make(map[[8]byte]chan struct{}), reqHeaderMu: make(chan struct{}, 1), - syncHooks: hooks, } - if hooks != nil { - hooks.newclientconn(cc) + if t.transportTestHooks != nil { + t.markNewGoroutine() + t.transportTestHooks.newclientconn(cc) c = cc.tconn } - if d := t.idleConnTimeout(); d != 0 { - cc.idleTimeout = d - cc.idleTimer = cc.afterFunc(d, cc.onIdleTimeout) - } if VerboseLogs { t.vlogf("http2: Transport creating client conn %p to %v", cc, c.RemoteAddr()) } @@ -893,7 +860,13 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHoo return nil, cc.werr } - cc.goRun(cc.readLoop) + // Start the idle timer after the connection is fully initialized. + if d := t.idleConnTimeout(); d != 0 { + cc.idleTimeout = d + cc.idleTimer = t.afterFunc(d, cc.onIdleTimeout) + } + + go cc.readLoop() return cc, nil } @@ -901,7 +874,7 @@ func (cc *ClientConn) healthCheck() { pingTimeout := cc.t.pingTimeout() // We don't need to periodically ping in the health check, because the readLoop of ClientConn will // trigger the healthCheck again if there is no frame received. - ctx, cancel := cc.contextWithTimeout(context.Background(), pingTimeout) + ctx, cancel := cc.t.contextWithTimeout(context.Background(), pingTimeout) defer cancel() cc.vlogf("http2: Transport sending health check") err := cc.Ping(ctx) @@ -936,7 +909,20 @@ func (cc *ClientConn) setGoAway(f *GoAwayFrame) { } last := f.LastStreamID for streamID, cs := range cc.streams { - if streamID > last { + if streamID <= last { + // The server's GOAWAY indicates that it received this stream. + // It will either finish processing it, or close the connection + // without doing so. Either way, leave the stream alone for now. + continue + } + if streamID == 1 && cc.goAway.ErrCode != ErrCodeNo { + // Don't retry the first stream on a connection if we get a non-NO error. + // If the server is sending an error on a new connection, + // retrying the request on a new one probably isn't going to work. + cs.abortStreamLocked(fmt.Errorf("http2: Transport received GOAWAY from server ErrCode:%v", cc.goAway.ErrCode)) + } else { + // Aborting the stream with errClentConnGotGoAway indicates that + // the request should be retried on a new connection. cs.abortStreamLocked(errClientConnGotGoAway) } } @@ -1131,7 +1117,8 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { // Wait for all in-flight streams to complete or connection to close done := make(chan struct{}) cancelled := false // guarded by cc.mu - cc.goRun(func() { + go func() { + cc.t.markNewGoroutine() cc.mu.Lock() defer cc.mu.Unlock() for { @@ -1143,9 +1130,9 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { if cancelled { break } - cc.condWait() + cc.cond.Wait() } - }) + }() shutdownEnterWaitStateHook() select { case <-done: @@ -1155,7 +1142,7 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { cc.mu.Lock() // Free the goroutine above cancelled = true - cc.condBroadcast() + cc.cond.Broadcast() cc.mu.Unlock() return ctx.Err() } @@ -1193,7 +1180,7 @@ func (cc *ClientConn) closeForError(err error) { for _, cs := range cc.streams { cs.abortStreamLocked(err) } - cc.condBroadcast() + cc.cond.Broadcast() cc.mu.Unlock() cc.closeConn() } @@ -1308,23 +1295,30 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) respHeaderRecv: make(chan struct{}), donec: make(chan struct{}), } - cc.goRun(func() { - cs.doRequest(req) - }) + + // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere? + if !cc.t.disableCompression() && + req.Header.Get("Accept-Encoding") == "" && + req.Header.Get("Range") == "" && + !cs.isHead { + // Request gzip only, not deflate. Deflate is ambiguous and + // not as universally supported anyway. + // See: https://zlib.net/zlib_faq.html#faq39 + // + // Note that we don't request this for HEAD requests, + // due to a bug in nginx: + // http://trac.nginx.org/nginx/ticket/358 + // https://golang.org/issue/5522 + // + // We don't request gzip if the request is for a range, since + // auto-decoding a portion of a gzipped document will just fail + // anyway. See https://golang.org/issue/8923 + cs.requestedGzip = true + } + + go cs.doRequest(req, streamf) waitDone := func() error { - if cc.syncHooks != nil { - cc.syncHooks.blockUntil(func() bool { - select { - case <-cs.donec: - case <-ctx.Done(): - case <-cs.reqCancel: - default: - return false - } - return true - }) - } select { case <-cs.donec: return nil @@ -1385,24 +1379,7 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) return err } - if streamf != nil { - streamf(cs) - } - for { - if cc.syncHooks != nil { - cc.syncHooks.blockUntil(func() bool { - select { - case <-cs.respHeaderRecv: - case <-cs.abort: - case <-ctx.Done(): - case <-cs.reqCancel: - default: - return false - } - return true - }) - } select { case <-cs.respHeaderRecv: return handleResponseHeaders() @@ -1432,8 +1409,9 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) // doRequest runs for the duration of the request lifetime. // // It sends the request and performs post-request cleanup (closing Request.Body, etc.). -func (cs *clientStream) doRequest(req *http.Request) { - err := cs.writeRequest(req) +func (cs *clientStream) doRequest(req *http.Request, streamf func(*clientStream)) { + cs.cc.t.markNewGoroutine() + err := cs.writeRequest(req, streamf) cs.cleanupWriteRequest(err) } @@ -1444,7 +1422,7 @@ func (cs *clientStream) doRequest(req *http.Request) { // // It returns non-nil if the request ends otherwise. // If the returned error is StreamError, the error Code may be used in resetting the stream. -func (cs *clientStream) writeRequest(req *http.Request) (err error) { +func (cs *clientStream) writeRequest(req *http.Request, streamf func(*clientStream)) (err error) { cc := cs.cc ctx := cs.ctx @@ -1458,21 +1436,6 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { if cc.reqHeaderMu == nil { panic("RoundTrip on uninitialized ClientConn") // for tests } - var newStreamHook func(*clientStream) - if cc.syncHooks != nil { - newStreamHook = cc.syncHooks.newstream - cc.syncHooks.blockUntil(func() bool { - select { - case cc.reqHeaderMu <- struct{}{}: - <-cc.reqHeaderMu - case <-cs.reqCancel: - case <-ctx.Done(): - default: - return false - } - return true - }) - } select { case cc.reqHeaderMu <- struct{}{}: case <-cs.reqCancel: @@ -1497,28 +1460,8 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { } cc.mu.Unlock() - if newStreamHook != nil { - newStreamHook(cs) - } - - // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere? - if !cc.t.disableCompression() && - req.Header.Get("Accept-Encoding") == "" && - req.Header.Get("Range") == "" && - !cs.isHead { - // Request gzip only, not deflate. Deflate is ambiguous and - // not as universally supported anyway. - // See: https://zlib.net/zlib_faq.html#faq39 - // - // Note that we don't request this for HEAD requests, - // due to a bug in nginx: - // http://trac.nginx.org/nginx/ticket/358 - // https://golang.org/issue/5522 - // - // We don't request gzip if the request is for a range, since - // auto-decoding a portion of a gzipped document will just fail - // anyway. See https://golang.org/issue/8923 - cs.requestedGzip = true + if streamf != nil { + streamf(cs) } continueTimeout := cc.t.expectContinueTimeout() @@ -1581,7 +1524,7 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { var respHeaderTimer <-chan time.Time var respHeaderRecv chan struct{} if d := cc.responseHeaderTimeout(); d != 0 { - timer := cc.newTimer(d) + timer := cc.t.newTimer(d) defer timer.Stop() respHeaderTimer = timer.C() respHeaderRecv = cs.respHeaderRecv @@ -1590,21 +1533,6 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { // or until the request is aborted (via context, error, or otherwise), // whichever comes first. for { - if cc.syncHooks != nil { - cc.syncHooks.blockUntil(func() bool { - select { - case <-cs.peerClosed: - case <-respHeaderTimer: - case <-respHeaderRecv: - case <-cs.abort: - case <-ctx.Done(): - case <-cs.reqCancel: - default: - return false - } - return true - }) - } select { case <-cs.peerClosed: return nil @@ -1753,7 +1681,7 @@ func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error { return nil } cc.pendingRequests++ - cc.condWait() + cc.cond.Wait() cc.pendingRequests-- select { case <-cs.abort: @@ -2015,7 +1943,7 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) cs.flow.take(take) return take, nil } - cc.condWait() + cc.cond.Wait() } } @@ -2298,7 +2226,7 @@ func (cc *ClientConn) forgetStreamID(id uint32) { } // Wake up writeRequestBody via clientStream.awaitFlowControl and // wake up RoundTrip if there is a pending request. - cc.condBroadcast() + cc.cond.Broadcast() closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 { @@ -2320,6 +2248,7 @@ type clientConnReadLoop struct { // readLoop runs in its own goroutine and reads and dispatches frames. func (cc *ClientConn) readLoop() { + cc.t.markNewGoroutine() rl := &clientConnReadLoop{cc: cc} defer rl.cleanup() cc.readerErr = rl.run() @@ -2386,7 +2315,7 @@ func (rl *clientConnReadLoop) cleanup() { cs.abortStreamLocked(err) } } - cc.condBroadcast() + cc.cond.Broadcast() cc.mu.Unlock() } @@ -2423,7 +2352,7 @@ func (rl *clientConnReadLoop) run() error { readIdleTimeout := cc.t.ReadIdleTimeout var t timer if readIdleTimeout != 0 { - t = cc.afterFunc(readIdleTimeout, cc.healthCheck) + t = cc.t.afterFunc(readIdleTimeout, cc.healthCheck) } for { f, err := cc.fr.ReadFrame() @@ -3021,7 +2950,7 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { for _, cs := range cc.streams { cs.flow.add(delta) } - cc.condBroadcast() + cc.cond.Broadcast() cc.initialWindowSize = s.Val case SettingHeaderTableSize: @@ -3076,7 +3005,7 @@ func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error { return ConnectionError(ErrCodeFlowControl) } - cc.condBroadcast() + cc.cond.Broadcast() return nil } @@ -3120,7 +3049,8 @@ func (cc *ClientConn) Ping(ctx context.Context) error { } var pingError error errc := make(chan struct{}) - cc.goRun(func() { + go func() { + cc.t.markNewGoroutine() cc.wmu.Lock() defer cc.wmu.Unlock() if pingError = cc.fr.WritePing(false, p); pingError != nil { @@ -3131,20 +3061,7 @@ func (cc *ClientConn) Ping(ctx context.Context) error { close(errc) return } - }) - if cc.syncHooks != nil { - cc.syncHooks.blockUntil(func() bool { - select { - case <-c: - case <-errc: - case <-ctx.Done(): - case <-cc.readerDone: - default: - return false - } - return true - }) - } + }() select { case <-c: return nil diff --git a/pkg/k8s/vendor/golang.org/x/net/http2/writesched_priority.go b/pkg/k8s/vendor/golang.org/x/net/http2/writesched_priority.go index 0a242c669e2..f6783339d11 100644 --- a/pkg/k8s/vendor/golang.org/x/net/http2/writesched_priority.go +++ b/pkg/k8s/vendor/golang.org/x/net/http2/writesched_priority.go @@ -443,8 +443,8 @@ func (ws *priorityWriteScheduler) addClosedOrIdleNode(list *[]*priorityNode, max } func (ws *priorityWriteScheduler) removeNode(n *priorityNode) { - for k := n.kids; k != nil; k = k.next { - k.setParent(n.parent) + for n.kids != nil { + n.kids.setParent(n.parent) } n.setParent(nil) delete(ws.nodes, n.id) diff --git a/pkg/k8s/vendor/golang.org/x/oauth2/internal/client_appengine.go b/pkg/k8s/vendor/golang.org/x/oauth2/internal/client_appengine.go deleted file mode 100644 index d28140f789e..00000000000 --- a/pkg/k8s/vendor/golang.org/x/oauth2/internal/client_appengine.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2018 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. - -//go:build appengine - -package internal - -import "google.golang.org/appengine/urlfetch" - -func init() { - appengineClientHook = urlfetch.Client -} diff --git a/pkg/k8s/vendor/golang.org/x/oauth2/internal/transport.go b/pkg/k8s/vendor/golang.org/x/oauth2/internal/transport.go index 572074a637d..b9db01ddfdf 100644 --- a/pkg/k8s/vendor/golang.org/x/oauth2/internal/transport.go +++ b/pkg/k8s/vendor/golang.org/x/oauth2/internal/transport.go @@ -18,16 +18,11 @@ var HTTPClient ContextKey // because nobody else can create a ContextKey, being unexported. type ContextKey struct{} -var appengineClientHook func(context.Context) *http.Client - func ContextClient(ctx context.Context) *http.Client { if ctx != nil { if hc, ok := ctx.Value(HTTPClient).(*http.Client); ok { return hc } } - if appengineClientHook != nil { - return appengineClientHook(ctx) - } return http.DefaultClient } diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/asm_zos_s390x.s b/pkg/k8s/vendor/golang.org/x/sys/unix/asm_zos_s390x.s index 2f67ba86d57..813dfad7d26 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/asm_zos_s390x.s +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/asm_zos_s390x.s @@ -9,9 +9,11 @@ #define PSALAA 1208(R0) #define GTAB64(x) 80(x) #define LCA64(x) 88(x) +#define SAVSTACK_ASYNC(x) 336(x) // in the LCA #define CAA(x) 8(x) -#define EDCHPXV(x) 1016(x) // in the CAA -#define SAVSTACK_ASYNC(x) 336(x) // in the LCA +#define CEECAATHDID(x) 976(x) // in the CAA +#define EDCHPXV(x) 1016(x) // in the CAA +#define GOCB(x) 1104(x) // in the CAA // SS_*, where x=SAVSTACK_ASYNC #define SS_LE(x) 0(x) @@ -19,405 +21,362 @@ #define SS_ERRNO(x) 16(x) #define SS_ERRNOJR(x) 20(x) -#define LE_CALL BYTE $0x0D; BYTE $0x76; // BL R7, R6 +// Function Descriptor Offsets +#define __errno 0x156*16 +#define __err2ad 0x16C*16 -TEXT ·clearErrno(SB),NOSPLIT,$0-0 - BL addrerrno<>(SB) - MOVD $0, 0(R3) +// Call Instructions +#define LE_CALL BYTE $0x0D; BYTE $0x76 // BL R7, R6 +#define SVC_LOAD BYTE $0x0A; BYTE $0x08 // SVC 08 LOAD +#define SVC_DELETE BYTE $0x0A; BYTE $0x09 // SVC 09 DELETE + +DATA zosLibVec<>(SB)/8, $0 +GLOBL zosLibVec<>(SB), NOPTR, $8 + +TEXT ·initZosLibVec(SB), NOSPLIT|NOFRAME, $0-0 + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + MOVD CAA(R8), R8 + MOVD EDCHPXV(R8), R8 + MOVD R8, zosLibVec<>(SB) + RET + +TEXT ·GetZosLibVec(SB), NOSPLIT|NOFRAME, $0-0 + MOVD zosLibVec<>(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·clearErrno(SB), NOSPLIT, $0-0 + BL addrerrno<>(SB) + MOVD $0, 0(R3) RET // Returns the address of errno in R3. -TEXT addrerrno<>(SB),NOSPLIT|NOFRAME,$0-0 +TEXT addrerrno<>(SB), NOSPLIT|NOFRAME, $0-0 // Get library control area (LCA). - MOVW PSALAA, R8 - MOVD LCA64(R8), R8 + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 // Get __errno FuncDesc. - MOVD CAA(R8), R9 - MOVD EDCHPXV(R9), R9 - ADD $(0x156*16), R9 - LMG 0(R9), R5, R6 + MOVD CAA(R8), R9 + MOVD EDCHPXV(R9), R9 + ADD $(__errno), R9 + LMG 0(R9), R5, R6 // Switch to saved LE stack. - MOVD SAVSTACK_ASYNC(R8), R9 - MOVD 0(R9), R4 - MOVD $0, 0(R9) + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD 0(R9), R4 + MOVD $0, 0(R9) // Call __errno function. LE_CALL NOPH // Switch back to Go stack. - XOR R0, R0 // Restore R0 to $0. - MOVD R4, 0(R9) // Save stack pointer. + XOR R0, R0 // Restore R0 to $0. + MOVD R4, 0(R9) // Save stack pointer. RET -TEXT ·syscall_syscall(SB),NOSPLIT,$0-56 - BL runtime·entersyscall(SB) - MOVD a1+8(FP), R1 - MOVD a2+16(FP), R2 - MOVD a3+24(FP), R3 +// func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64) +TEXT ·svcCall(SB), NOSPLIT, $0 + BL runtime·save_g(SB) // Save g and stack pointer + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD R15, 0(R9) - // Get library control area (LCA). - MOVW PSALAA, R8 - MOVD LCA64(R8), R8 + MOVD argv+8(FP), R1 // Move function arguments into registers + MOVD dsa+16(FP), g + MOVD fnptr+0(FP), R15 - // Get function. - MOVD CAA(R8), R9 - MOVD EDCHPXV(R9), R9 - MOVD trap+0(FP), R5 - SLD $4, R5 - ADD R5, R9 - LMG 0(R9), R5, R6 + BYTE $0x0D // Branch to function + BYTE $0xEF - // Restore LE stack. - MOVD SAVSTACK_ASYNC(R8), R9 - MOVD 0(R9), R4 - MOVD $0, 0(R9) + BL runtime·load_g(SB) // Restore g and stack pointer + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + MOVD SAVSTACK_ASYNC(R8), R9 + MOVD 0(R9), R15 - // Call function. - LE_CALL - NOPH - XOR R0, R0 // Restore R0 to $0. - MOVD R4, 0(R9) // Save stack pointer. - - MOVD R3, r1+32(FP) - MOVD R0, r2+40(FP) - MOVD R0, err+48(FP) - MOVW R3, R4 - CMP R4, $-1 - BNE done - BL addrerrno<>(SB) - MOVWZ 0(R3), R3 - MOVD R3, err+48(FP) -done: - BL runtime·exitsyscall(SB) RET -TEXT ·syscall_rawsyscall(SB),NOSPLIT,$0-56 - MOVD a1+8(FP), R1 - MOVD a2+16(FP), R2 - MOVD a3+24(FP), R3 - - // Get library control area (LCA). - MOVW PSALAA, R8 - MOVD LCA64(R8), R8 - - // Get function. - MOVD CAA(R8), R9 - MOVD EDCHPXV(R9), R9 - MOVD trap+0(FP), R5 - SLD $4, R5 - ADD R5, R9 - LMG 0(R9), R5, R6 +// func svcLoad(name *byte) unsafe.Pointer +TEXT ·svcLoad(SB), NOSPLIT, $0 + MOVD R15, R2 // Save go stack pointer + MOVD name+0(FP), R0 // Move SVC args into registers + MOVD $0x80000000, R1 + MOVD $0, R15 + SVC_LOAD + MOVW R15, R3 // Save return code from SVC + MOVD R2, R15 // Restore go stack pointer + CMP R3, $0 // Check SVC return code + BNE error + + MOVD $-2, R3 // Reset last bit of entry point to zero + AND R0, R3 + MOVD R3, ret+8(FP) // Return entry point returned by SVC + CMP R0, R3 // Check if last bit of entry point was set + BNE done + + MOVD R15, R2 // Save go stack pointer + MOVD $0, R15 // Move SVC args into registers (entry point still in r0 from SVC 08) + SVC_DELETE + MOVD R2, R15 // Restore go stack pointer - // Restore LE stack. - MOVD SAVSTACK_ASYNC(R8), R9 - MOVD 0(R9), R4 - MOVD $0, 0(R9) +error: + MOVD $0, ret+8(FP) // Return 0 on failure - // Call function. - LE_CALL - NOPH - XOR R0, R0 // Restore R0 to $0. - MOVD R4, 0(R9) // Save stack pointer. - - MOVD R3, r1+32(FP) - MOVD R0, r2+40(FP) - MOVD R0, err+48(FP) - MOVW R3, R4 - CMP R4, $-1 - BNE done - BL addrerrno<>(SB) - MOVWZ 0(R3), R3 - MOVD R3, err+48(FP) done: + XOR R0, R0 // Reset r0 to 0 RET -TEXT ·syscall_syscall6(SB),NOSPLIT,$0-80 - BL runtime·entersyscall(SB) - MOVD a1+8(FP), R1 - MOVD a2+16(FP), R2 - MOVD a3+24(FP), R3 +// func svcUnload(name *byte, fnptr unsafe.Pointer) int64 +TEXT ·svcUnload(SB), NOSPLIT, $0 + MOVD R15, R2 // Save go stack pointer + MOVD name+0(FP), R0 // Move SVC args into registers + MOVD fnptr+8(FP), R15 + SVC_DELETE + XOR R0, R0 // Reset r0 to 0 + MOVD R15, R1 // Save SVC return code + MOVD R2, R15 // Restore go stack pointer + MOVD R1, ret+16(FP) // Return SVC return code + RET +// func gettid() uint64 +TEXT ·gettid(SB), NOSPLIT, $0 // Get library control area (LCA). - MOVW PSALAA, R8 - MOVD LCA64(R8), R8 + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 - // Get function. - MOVD CAA(R8), R9 - MOVD EDCHPXV(R9), R9 - MOVD trap+0(FP), R5 - SLD $4, R5 - ADD R5, R9 - LMG 0(R9), R5, R6 + // Get CEECAATHDID + MOVD CAA(R8), R9 + MOVD CEECAATHDID(R9), R9 + MOVD R9, ret+0(FP) - // Restore LE stack. - MOVD SAVSTACK_ASYNC(R8), R9 - MOVD 0(R9), R4 - MOVD $0, 0(R9) - - // Fill in parameter list. - MOVD a4+32(FP), R12 - MOVD R12, (2176+24)(R4) - MOVD a5+40(FP), R12 - MOVD R12, (2176+32)(R4) - MOVD a6+48(FP), R12 - MOVD R12, (2176+40)(R4) - - // Call function. - LE_CALL - NOPH - XOR R0, R0 // Restore R0 to $0. - MOVD R4, 0(R9) // Save stack pointer. - - MOVD R3, r1+56(FP) - MOVD R0, r2+64(FP) - MOVD R0, err+72(FP) - MOVW R3, R4 - CMP R4, $-1 - BNE done - BL addrerrno<>(SB) - MOVWZ 0(R3), R3 - MOVD R3, err+72(FP) -done: - BL runtime·exitsyscall(SB) RET -TEXT ·syscall_rawsyscall6(SB),NOSPLIT,$0-80 - MOVD a1+8(FP), R1 - MOVD a2+16(FP), R2 - MOVD a3+24(FP), R3 - - // Get library control area (LCA). - MOVW PSALAA, R8 - MOVD LCA64(R8), R8 - - // Get function. - MOVD CAA(R8), R9 - MOVD EDCHPXV(R9), R9 - MOVD trap+0(FP), R5 - SLD $4, R5 - ADD R5, R9 - LMG 0(R9), R5, R6 +// +// Call LE function, if the return is -1 +// errno and errno2 is retrieved +// +TEXT ·CallLeFuncWithErr(SB), NOSPLIT, $0 + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + MOVD CAA(R8), R9 + MOVD g, GOCB(R9) // Restore LE stack. - MOVD SAVSTACK_ASYNC(R8), R9 - MOVD 0(R9), R4 - MOVD $0, 0(R9) - - // Fill in parameter list. - MOVD a4+32(FP), R12 - MOVD R12, (2176+24)(R4) - MOVD a5+40(FP), R12 - MOVD R12, (2176+32)(R4) - MOVD a6+48(FP), R12 - MOVD R12, (2176+40)(R4) - - // Call function. - LE_CALL + MOVD SAVSTACK_ASYNC(R8), R9 // R9-> LE stack frame saving address + MOVD 0(R9), R4 // R4-> restore previously saved stack frame pointer + + MOVD parms_base+8(FP), R7 // R7 -> argument array + MOVD parms_len+16(FP), R8 // R8 number of arguments + + // arg 1 ---> R1 + CMP R8, $0 + BEQ docall + SUB $1, R8 + MOVD 0(R7), R1 + + // arg 2 ---> R2 + CMP R8, $0 + BEQ docall + SUB $1, R8 + ADD $8, R7 + MOVD 0(R7), R2 + + // arg 3 --> R3 + CMP R8, $0 + BEQ docall + SUB $1, R8 + ADD $8, R7 + MOVD 0(R7), R3 + + CMP R8, $0 + BEQ docall + MOVD $2176+16, R6 // starting LE stack address-8 to store 4th argument + +repeat: + ADD $8, R7 + MOVD 0(R7), R0 // advance arg pointer by 8 byte + ADD $8, R6 // advance LE argument address by 8 byte + MOVD R0, (R4)(R6*1) // copy argument from go-slice to le-frame + SUB $1, R8 + CMP R8, $0 + BNE repeat + +docall: + MOVD funcdesc+0(FP), R8 // R8-> function descriptor + LMG 0(R8), R5, R6 + MOVD $0, 0(R9) // R9 address of SAVSTACK_ASYNC + LE_CALL // balr R7, R6 (return #1) + NOPH + MOVD R3, ret+32(FP) + CMP R3, $-1 // compare result to -1 + BNE done + + // retrieve errno and errno2 + MOVD zosLibVec<>(SB), R8 + ADD $(__errno), R8 + LMG 0(R8), R5, R6 + LE_CALL // balr R7, R6 __errno (return #3) NOPH - XOR R0, R0 // Restore R0 to $0. - MOVD R4, 0(R9) // Save stack pointer. - - MOVD R3, r1+56(FP) - MOVD R0, r2+64(FP) - MOVD R0, err+72(FP) - MOVW R3, R4 - CMP R4, $-1 - BNE done - BL ·rrno<>(SB) - MOVWZ 0(R3), R3 - MOVD R3, err+72(FP) + MOVWZ 0(R3), R3 + MOVD R3, err+48(FP) + MOVD zosLibVec<>(SB), R8 + ADD $(__err2ad), R8 + LMG 0(R8), R5, R6 + LE_CALL // balr R7, R6 __err2ad (return #2) + NOPH + MOVW (R3), R2 // retrieve errno2 + MOVD R2, errno2+40(FP) // store in return area + done: + MOVD R4, 0(R9) // Save stack pointer. RET -TEXT ·syscall_syscall9(SB),NOSPLIT,$0 - BL runtime·entersyscall(SB) - MOVD a1+8(FP), R1 - MOVD a2+16(FP), R2 - MOVD a3+24(FP), R3 - - // Get library control area (LCA). - MOVW PSALAA, R8 - MOVD LCA64(R8), R8 - - // Get function. - MOVD CAA(R8), R9 - MOVD EDCHPXV(R9), R9 - MOVD trap+0(FP), R5 - SLD $4, R5 - ADD R5, R9 - LMG 0(R9), R5, R6 +// +// Call LE function, if the return is 0 +// errno and errno2 is retrieved +// +TEXT ·CallLeFuncWithPtrReturn(SB), NOSPLIT, $0 + MOVW PSALAA, R8 + MOVD LCA64(R8), R8 + MOVD CAA(R8), R9 + MOVD g, GOCB(R9) // Restore LE stack. - MOVD SAVSTACK_ASYNC(R8), R9 - MOVD 0(R9), R4 - MOVD $0, 0(R9) - - // Fill in parameter list. - MOVD a4+32(FP), R12 - MOVD R12, (2176+24)(R4) - MOVD a5+40(FP), R12 - MOVD R12, (2176+32)(R4) - MOVD a6+48(FP), R12 - MOVD R12, (2176+40)(R4) - MOVD a7+56(FP), R12 - MOVD R12, (2176+48)(R4) - MOVD a8+64(FP), R12 - MOVD R12, (2176+56)(R4) - MOVD a9+72(FP), R12 - MOVD R12, (2176+64)(R4) - - // Call function. - LE_CALL + MOVD SAVSTACK_ASYNC(R8), R9 // R9-> LE stack frame saving address + MOVD 0(R9), R4 // R4-> restore previously saved stack frame pointer + + MOVD parms_base+8(FP), R7 // R7 -> argument array + MOVD parms_len+16(FP), R8 // R8 number of arguments + + // arg 1 ---> R1 + CMP R8, $0 + BEQ docall + SUB $1, R8 + MOVD 0(R7), R1 + + // arg 2 ---> R2 + CMP R8, $0 + BEQ docall + SUB $1, R8 + ADD $8, R7 + MOVD 0(R7), R2 + + // arg 3 --> R3 + CMP R8, $0 + BEQ docall + SUB $1, R8 + ADD $8, R7 + MOVD 0(R7), R3 + + CMP R8, $0 + BEQ docall + MOVD $2176+16, R6 // starting LE stack address-8 to store 4th argument + +repeat: + ADD $8, R7 + MOVD 0(R7), R0 // advance arg pointer by 8 byte + ADD $8, R6 // advance LE argument address by 8 byte + MOVD R0, (R4)(R6*1) // copy argument from go-slice to le-frame + SUB $1, R8 + CMP R8, $0 + BNE repeat + +docall: + MOVD funcdesc+0(FP), R8 // R8-> function descriptor + LMG 0(R8), R5, R6 + MOVD $0, 0(R9) // R9 address of SAVSTACK_ASYNC + LE_CALL // balr R7, R6 (return #1) NOPH - XOR R0, R0 // Restore R0 to $0. - MOVD R4, 0(R9) // Save stack pointer. - - MOVD R3, r1+80(FP) - MOVD R0, r2+88(FP) - MOVD R0, err+96(FP) - MOVW R3, R4 - CMP R4, $-1 - BNE done - BL addrerrno<>(SB) - MOVWZ 0(R3), R3 - MOVD R3, err+96(FP) -done: - BL runtime·exitsyscall(SB) - RET - -TEXT ·syscall_rawsyscall9(SB),NOSPLIT,$0 - MOVD a1+8(FP), R1 - MOVD a2+16(FP), R2 - MOVD a3+24(FP), R3 - - // Get library control area (LCA). - MOVW PSALAA, R8 - MOVD LCA64(R8), R8 - - // Get function. - MOVD CAA(R8), R9 - MOVD EDCHPXV(R9), R9 - MOVD trap+0(FP), R5 - SLD $4, R5 - ADD R5, R9 - LMG 0(R9), R5, R6 - - // Restore LE stack. - MOVD SAVSTACK_ASYNC(R8), R9 - MOVD 0(R9), R4 - MOVD $0, 0(R9) - - // Fill in parameter list. - MOVD a4+32(FP), R12 - MOVD R12, (2176+24)(R4) - MOVD a5+40(FP), R12 - MOVD R12, (2176+32)(R4) - MOVD a6+48(FP), R12 - MOVD R12, (2176+40)(R4) - MOVD a7+56(FP), R12 - MOVD R12, (2176+48)(R4) - MOVD a8+64(FP), R12 - MOVD R12, (2176+56)(R4) - MOVD a9+72(FP), R12 - MOVD R12, (2176+64)(R4) - - // Call function. - LE_CALL + MOVD R3, ret+32(FP) + CMP R3, $0 // compare result to 0 + BNE done + + // retrieve errno and errno2 + MOVD zosLibVec<>(SB), R8 + ADD $(__errno), R8 + LMG 0(R8), R5, R6 + LE_CALL // balr R7, R6 __errno (return #3) NOPH - XOR R0, R0 // Restore R0 to $0. - MOVD R4, 0(R9) // Save stack pointer. - - MOVD R3, r1+80(FP) - MOVD R0, r2+88(FP) - MOVD R0, err+96(FP) - MOVW R3, R4 - CMP R4, $-1 - BNE done - BL addrerrno<>(SB) - MOVWZ 0(R3), R3 - MOVD R3, err+96(FP) -done: - RET - -// func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64) -TEXT ·svcCall(SB),NOSPLIT,$0 - BL runtime·save_g(SB) // Save g and stack pointer - MOVW PSALAA, R8 - MOVD LCA64(R8), R8 - MOVD SAVSTACK_ASYNC(R8), R9 - MOVD R15, 0(R9) - - MOVD argv+8(FP), R1 // Move function arguments into registers - MOVD dsa+16(FP), g - MOVD fnptr+0(FP), R15 - - BYTE $0x0D // Branch to function - BYTE $0xEF - - BL runtime·load_g(SB) // Restore g and stack pointer - MOVW PSALAA, R8 - MOVD LCA64(R8), R8 - MOVD SAVSTACK_ASYNC(R8), R9 - MOVD 0(R9), R15 - - RET - -// func svcLoad(name *byte) unsafe.Pointer -TEXT ·svcLoad(SB),NOSPLIT,$0 - MOVD R15, R2 // Save go stack pointer - MOVD name+0(FP), R0 // Move SVC args into registers - MOVD $0x80000000, R1 - MOVD $0, R15 - BYTE $0x0A // SVC 08 LOAD - BYTE $0x08 - MOVW R15, R3 // Save return code from SVC - MOVD R2, R15 // Restore go stack pointer - CMP R3, $0 // Check SVC return code - BNE error - - MOVD $-2, R3 // Reset last bit of entry point to zero - AND R0, R3 - MOVD R3, addr+8(FP) // Return entry point returned by SVC - CMP R0, R3 // Check if last bit of entry point was set - BNE done - - MOVD R15, R2 // Save go stack pointer - MOVD $0, R15 // Move SVC args into registers (entry point still in r0 from SVC 08) - BYTE $0x0A // SVC 09 DELETE - BYTE $0x09 - MOVD R2, R15 // Restore go stack pointer + MOVWZ 0(R3), R3 + MOVD R3, err+48(FP) + MOVD zosLibVec<>(SB), R8 + ADD $(__err2ad), R8 + LMG 0(R8), R5, R6 + LE_CALL // balr R7, R6 __err2ad (return #2) + NOPH + MOVW (R3), R2 // retrieve errno2 + MOVD R2, errno2+40(FP) // store in return area + XOR R2, R2 + MOVWZ R2, (R3) // clear errno2 -error: - MOVD $0, addr+8(FP) // Return 0 on failure done: - XOR R0, R0 // Reset r0 to 0 + MOVD R4, 0(R9) // Save stack pointer. RET -// func svcUnload(name *byte, fnptr unsafe.Pointer) int64 -TEXT ·svcUnload(SB),NOSPLIT,$0 - MOVD R15, R2 // Save go stack pointer - MOVD name+0(FP), R0 // Move SVC args into registers - MOVD addr+8(FP), R15 - BYTE $0x0A // SVC 09 - BYTE $0x09 - XOR R0, R0 // Reset r0 to 0 - MOVD R15, R1 // Save SVC return code - MOVD R2, R15 // Restore go stack pointer - MOVD R1, rc+0(FP) // Return SVC return code +// +// function to test if a pointer can be safely dereferenced (content read) +// return 0 for succces +// +TEXT ·ptrtest(SB), NOSPLIT, $0-16 + MOVD arg+0(FP), R10 // test pointer in R10 + + // set up R2 to point to CEECAADMC + BYTE $0xE3; BYTE $0x20; BYTE $0x04; BYTE $0xB8; BYTE $0x00; BYTE $0x17 // llgt 2,1208 + BYTE $0xB9; BYTE $0x17; BYTE $0x00; BYTE $0x22 // llgtr 2,2 + BYTE $0xA5; BYTE $0x26; BYTE $0x7F; BYTE $0xFF // nilh 2,32767 + BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x58; BYTE $0x00; BYTE $0x04 // lg 2,88(2) + BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x08; BYTE $0x00; BYTE $0x04 // lg 2,8(2) + BYTE $0x41; BYTE $0x22; BYTE $0x03; BYTE $0x68 // la 2,872(2) + + // set up R5 to point to the "shunt" path which set 1 to R3 (failure) + BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x33 // xgr 3,3 + BYTE $0xA7; BYTE $0x55; BYTE $0x00; BYTE $0x04 // bras 5,lbl1 + BYTE $0xA7; BYTE $0x39; BYTE $0x00; BYTE $0x01 // lghi 3,1 + + // if r3 is not zero (failed) then branch to finish + BYTE $0xB9; BYTE $0x02; BYTE $0x00; BYTE $0x33 // lbl1 ltgr 3,3 + BYTE $0xA7; BYTE $0x74; BYTE $0x00; BYTE $0x08 // brc b'0111',lbl2 + + // stomic store shunt address in R5 into CEECAADMC + BYTE $0xE3; BYTE $0x52; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 5,0(2) + + // now try reading from the test pointer in R10, if it fails it branches to the "lghi" instruction above + BYTE $0xE3; BYTE $0x9A; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x04 // lg 9,0(10) + + // finish here, restore 0 into CEECAADMC + BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x99 // lbl2 xgr 9,9 + BYTE $0xE3; BYTE $0x92; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 9,0(2) + MOVD R3, ret+8(FP) // result in R3 RET -// func gettid() uint64 -TEXT ·gettid(SB), NOSPLIT, $0 - // Get library control area (LCA). - MOVW PSALAA, R8 - MOVD LCA64(R8), R8 - - // Get CEECAATHDID - MOVD CAA(R8), R9 - MOVD 0x3D0(R9), R9 - MOVD R9, ret+0(FP) - +// +// function to test if a untptr can be loaded from a pointer +// return 1: the 8-byte content +// 2: 0 for success, 1 for failure +// +// func safeload(ptr uintptr) ( value uintptr, error uintptr) +TEXT ·safeload(SB), NOSPLIT, $0-24 + MOVD ptr+0(FP), R10 // test pointer in R10 + MOVD $0x0, R6 + BYTE $0xE3; BYTE $0x20; BYTE $0x04; BYTE $0xB8; BYTE $0x00; BYTE $0x17 // llgt 2,1208 + BYTE $0xB9; BYTE $0x17; BYTE $0x00; BYTE $0x22 // llgtr 2,2 + BYTE $0xA5; BYTE $0x26; BYTE $0x7F; BYTE $0xFF // nilh 2,32767 + BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x58; BYTE $0x00; BYTE $0x04 // lg 2,88(2) + BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x08; BYTE $0x00; BYTE $0x04 // lg 2,8(2) + BYTE $0x41; BYTE $0x22; BYTE $0x03; BYTE $0x68 // la 2,872(2) + BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x33 // xgr 3,3 + BYTE $0xA7; BYTE $0x55; BYTE $0x00; BYTE $0x04 // bras 5,lbl1 + BYTE $0xA7; BYTE $0x39; BYTE $0x00; BYTE $0x01 // lghi 3,1 + BYTE $0xB9; BYTE $0x02; BYTE $0x00; BYTE $0x33 // lbl1 ltgr 3,3 + BYTE $0xA7; BYTE $0x74; BYTE $0x00; BYTE $0x08 // brc b'0111',lbl2 + BYTE $0xE3; BYTE $0x52; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 5,0(2) + BYTE $0xE3; BYTE $0x6A; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x04 // lg 6,0(10) + BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x99 // lbl2 xgr 9,9 + BYTE $0xE3; BYTE $0x92; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 9,0(2) + MOVD R6, value+8(FP) // result in R6 + MOVD R3, error+16(FP) // error in R3 RET diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/bpxsvc_zos.go b/pkg/k8s/vendor/golang.org/x/sys/unix/bpxsvc_zos.go new file mode 100644 index 00000000000..39d647d863a --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/bpxsvc_zos.go @@ -0,0 +1,657 @@ +// Copyright 2024 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. + +//go:build zos + +package unix + +import ( + "bytes" + "fmt" + "unsafe" +) + +//go:noescape +func bpxcall(plist []unsafe.Pointer, bpx_offset int64) + +//go:noescape +func A2e([]byte) + +//go:noescape +func E2a([]byte) + +const ( + BPX4STA = 192 // stat + BPX4FST = 104 // fstat + BPX4LST = 132 // lstat + BPX4OPN = 156 // open + BPX4CLO = 72 // close + BPX4CHR = 500 // chattr + BPX4FCR = 504 // fchattr + BPX4LCR = 1180 // lchattr + BPX4CTW = 492 // cond_timed_wait + BPX4GTH = 1056 // __getthent + BPX4PTQ = 412 // pthread_quiesc + BPX4PTR = 320 // ptrace +) + +const ( + //options + //byte1 + BPX_OPNFHIGH = 0x80 + //byte2 + BPX_OPNFEXEC = 0x80 + //byte3 + BPX_O_NOLARGEFILE = 0x08 + BPX_O_LARGEFILE = 0x04 + BPX_O_ASYNCSIG = 0x02 + BPX_O_SYNC = 0x01 + //byte4 + BPX_O_CREXCL = 0xc0 + BPX_O_CREAT = 0x80 + BPX_O_EXCL = 0x40 + BPX_O_NOCTTY = 0x20 + BPX_O_TRUNC = 0x10 + BPX_O_APPEND = 0x08 + BPX_O_NONBLOCK = 0x04 + BPX_FNDELAY = 0x04 + BPX_O_RDWR = 0x03 + BPX_O_RDONLY = 0x02 + BPX_O_WRONLY = 0x01 + BPX_O_ACCMODE = 0x03 + BPX_O_GETFL = 0x0f + + //mode + // byte1 (file type) + BPX_FT_DIR = 1 + BPX_FT_CHARSPEC = 2 + BPX_FT_REGFILE = 3 + BPX_FT_FIFO = 4 + BPX_FT_SYMLINK = 5 + BPX_FT_SOCKET = 6 + //byte3 + BPX_S_ISUID = 0x08 + BPX_S_ISGID = 0x04 + BPX_S_ISVTX = 0x02 + BPX_S_IRWXU1 = 0x01 + BPX_S_IRUSR = 0x01 + //byte4 + BPX_S_IRWXU2 = 0xc0 + BPX_S_IWUSR = 0x80 + BPX_S_IXUSR = 0x40 + BPX_S_IRWXG = 0x38 + BPX_S_IRGRP = 0x20 + BPX_S_IWGRP = 0x10 + BPX_S_IXGRP = 0x08 + BPX_S_IRWXOX = 0x07 + BPX_S_IROTH = 0x04 + BPX_S_IWOTH = 0x02 + BPX_S_IXOTH = 0x01 + + CW_INTRPT = 1 + CW_CONDVAR = 32 + CW_TIMEOUT = 64 + + PGTHA_NEXT = 2 + PGTHA_CURRENT = 1 + PGTHA_FIRST = 0 + PGTHA_LAST = 3 + PGTHA_PROCESS = 0x80 + PGTHA_CONTTY = 0x40 + PGTHA_PATH = 0x20 + PGTHA_COMMAND = 0x10 + PGTHA_FILEDATA = 0x08 + PGTHA_THREAD = 0x04 + PGTHA_PTAG = 0x02 + PGTHA_COMMANDLONG = 0x01 + PGTHA_THREADFAST = 0x80 + PGTHA_FILEPATH = 0x40 + PGTHA_THDSIGMASK = 0x20 + // thread quiece mode + QUIESCE_TERM int32 = 1 + QUIESCE_FORCE int32 = 2 + QUIESCE_QUERY int32 = 3 + QUIESCE_FREEZE int32 = 4 + QUIESCE_UNFREEZE int32 = 5 + FREEZE_THIS_THREAD int32 = 6 + FREEZE_EXIT int32 = 8 + QUIESCE_SRB int32 = 9 +) + +type Pgtha struct { + Pid uint32 // 0 + Tid0 uint32 // 4 + Tid1 uint32 + Accesspid byte // C + Accesstid byte // D + Accessasid uint16 // E + Loginname [8]byte // 10 + Flag1 byte // 18 + Flag1b2 byte // 19 +} + +type Bpxystat_t struct { // DSECT BPXYSTAT + St_id [4]uint8 // 0 + St_length uint16 // 0x4 + St_version uint16 // 0x6 + St_mode uint32 // 0x8 + St_ino uint32 // 0xc + St_dev uint32 // 0x10 + St_nlink uint32 // 0x14 + St_uid uint32 // 0x18 + St_gid uint32 // 0x1c + St_size uint64 // 0x20 + St_atime uint32 // 0x28 + St_mtime uint32 // 0x2c + St_ctime uint32 // 0x30 + St_rdev uint32 // 0x34 + St_auditoraudit uint32 // 0x38 + St_useraudit uint32 // 0x3c + St_blksize uint32 // 0x40 + St_createtime uint32 // 0x44 + St_auditid [4]uint32 // 0x48 + St_res01 uint32 // 0x58 + Ft_ccsid uint16 // 0x5c + Ft_flags uint16 // 0x5e + St_res01a [2]uint32 // 0x60 + St_res02 uint32 // 0x68 + St_blocks uint32 // 0x6c + St_opaque [3]uint8 // 0x70 + St_visible uint8 // 0x73 + St_reftime uint32 // 0x74 + St_fid uint64 // 0x78 + St_filefmt uint8 // 0x80 + St_fspflag2 uint8 // 0x81 + St_res03 [2]uint8 // 0x82 + St_ctimemsec uint32 // 0x84 + St_seclabel [8]uint8 // 0x88 + St_res04 [4]uint8 // 0x90 + // end of version 1 + _ uint32 // 0x94 + St_atime64 uint64 // 0x98 + St_mtime64 uint64 // 0xa0 + St_ctime64 uint64 // 0xa8 + St_createtime64 uint64 // 0xb0 + St_reftime64 uint64 // 0xb8 + _ uint64 // 0xc0 + St_res05 [16]uint8 // 0xc8 + // end of version 2 +} + +type BpxFilestatus struct { + Oflag1 byte + Oflag2 byte + Oflag3 byte + Oflag4 byte +} + +type BpxMode struct { + Ftype byte + Mode1 byte + Mode2 byte + Mode3 byte +} + +// Thr attribute structure for extended attributes +type Bpxyatt_t struct { // DSECT BPXYATT + Att_id [4]uint8 + Att_version uint16 + Att_res01 [2]uint8 + Att_setflags1 uint8 + Att_setflags2 uint8 + Att_setflags3 uint8 + Att_setflags4 uint8 + Att_mode uint32 + Att_uid uint32 + Att_gid uint32 + Att_opaquemask [3]uint8 + Att_visblmaskres uint8 + Att_opaque [3]uint8 + Att_visibleres uint8 + Att_size_h uint32 + Att_size_l uint32 + Att_atime uint32 + Att_mtime uint32 + Att_auditoraudit uint32 + Att_useraudit uint32 + Att_ctime uint32 + Att_reftime uint32 + // end of version 1 + Att_filefmt uint8 + Att_res02 [3]uint8 + Att_filetag uint32 + Att_res03 [8]uint8 + // end of version 2 + Att_atime64 uint64 + Att_mtime64 uint64 + Att_ctime64 uint64 + Att_reftime64 uint64 + Att_seclabel [8]uint8 + Att_ver3res02 [8]uint8 + // end of version 3 +} + +func BpxOpen(name string, options *BpxFilestatus, mode *BpxMode) (rv int32, rc int32, rn int32) { + if len(name) < 1024 { + var namebuf [1024]byte + sz := int32(copy(namebuf[:], name)) + A2e(namebuf[:sz]) + var parms [7]unsafe.Pointer + parms[0] = unsafe.Pointer(&sz) + parms[1] = unsafe.Pointer(&namebuf[0]) + parms[2] = unsafe.Pointer(options) + parms[3] = unsafe.Pointer(mode) + parms[4] = unsafe.Pointer(&rv) + parms[5] = unsafe.Pointer(&rc) + parms[6] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4OPN) + return rv, rc, rn + } + return -1, -1, -1 +} + +func BpxClose(fd int32) (rv int32, rc int32, rn int32) { + var parms [4]unsafe.Pointer + parms[0] = unsafe.Pointer(&fd) + parms[1] = unsafe.Pointer(&rv) + parms[2] = unsafe.Pointer(&rc) + parms[3] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4CLO) + return rv, rc, rn +} + +func BpxFileFStat(fd int32, st *Bpxystat_t) (rv int32, rc int32, rn int32) { + st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3} + st.St_version = 2 + stat_sz := uint32(unsafe.Sizeof(*st)) + var parms [6]unsafe.Pointer + parms[0] = unsafe.Pointer(&fd) + parms[1] = unsafe.Pointer(&stat_sz) + parms[2] = unsafe.Pointer(st) + parms[3] = unsafe.Pointer(&rv) + parms[4] = unsafe.Pointer(&rc) + parms[5] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4FST) + return rv, rc, rn +} + +func BpxFileStat(name string, st *Bpxystat_t) (rv int32, rc int32, rn int32) { + if len(name) < 1024 { + var namebuf [1024]byte + sz := int32(copy(namebuf[:], name)) + A2e(namebuf[:sz]) + st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3} + st.St_version = 2 + stat_sz := uint32(unsafe.Sizeof(*st)) + var parms [7]unsafe.Pointer + parms[0] = unsafe.Pointer(&sz) + parms[1] = unsafe.Pointer(&namebuf[0]) + parms[2] = unsafe.Pointer(&stat_sz) + parms[3] = unsafe.Pointer(st) + parms[4] = unsafe.Pointer(&rv) + parms[5] = unsafe.Pointer(&rc) + parms[6] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4STA) + return rv, rc, rn + } + return -1, -1, -1 +} + +func BpxFileLStat(name string, st *Bpxystat_t) (rv int32, rc int32, rn int32) { + if len(name) < 1024 { + var namebuf [1024]byte + sz := int32(copy(namebuf[:], name)) + A2e(namebuf[:sz]) + st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3} + st.St_version = 2 + stat_sz := uint32(unsafe.Sizeof(*st)) + var parms [7]unsafe.Pointer + parms[0] = unsafe.Pointer(&sz) + parms[1] = unsafe.Pointer(&namebuf[0]) + parms[2] = unsafe.Pointer(&stat_sz) + parms[3] = unsafe.Pointer(st) + parms[4] = unsafe.Pointer(&rv) + parms[5] = unsafe.Pointer(&rc) + parms[6] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4LST) + return rv, rc, rn + } + return -1, -1, -1 +} + +func BpxChattr(path string, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) { + if len(path) >= 1024 { + return -1, -1, -1 + } + var namebuf [1024]byte + sz := int32(copy(namebuf[:], path)) + A2e(namebuf[:sz]) + attr_sz := uint32(unsafe.Sizeof(*attr)) + var parms [7]unsafe.Pointer + parms[0] = unsafe.Pointer(&sz) + parms[1] = unsafe.Pointer(&namebuf[0]) + parms[2] = unsafe.Pointer(&attr_sz) + parms[3] = unsafe.Pointer(attr) + parms[4] = unsafe.Pointer(&rv) + parms[5] = unsafe.Pointer(&rc) + parms[6] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4CHR) + return rv, rc, rn +} + +func BpxLchattr(path string, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) { + if len(path) >= 1024 { + return -1, -1, -1 + } + var namebuf [1024]byte + sz := int32(copy(namebuf[:], path)) + A2e(namebuf[:sz]) + attr_sz := uint32(unsafe.Sizeof(*attr)) + var parms [7]unsafe.Pointer + parms[0] = unsafe.Pointer(&sz) + parms[1] = unsafe.Pointer(&namebuf[0]) + parms[2] = unsafe.Pointer(&attr_sz) + parms[3] = unsafe.Pointer(attr) + parms[4] = unsafe.Pointer(&rv) + parms[5] = unsafe.Pointer(&rc) + parms[6] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4LCR) + return rv, rc, rn +} + +func BpxFchattr(fd int32, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) { + attr_sz := uint32(unsafe.Sizeof(*attr)) + var parms [6]unsafe.Pointer + parms[0] = unsafe.Pointer(&fd) + parms[1] = unsafe.Pointer(&attr_sz) + parms[2] = unsafe.Pointer(attr) + parms[3] = unsafe.Pointer(&rv) + parms[4] = unsafe.Pointer(&rc) + parms[5] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4FCR) + return rv, rc, rn +} + +func BpxCondTimedWait(sec uint32, nsec uint32, events uint32, secrem *uint32, nsecrem *uint32) (rv int32, rc int32, rn int32) { + var parms [8]unsafe.Pointer + parms[0] = unsafe.Pointer(&sec) + parms[1] = unsafe.Pointer(&nsec) + parms[2] = unsafe.Pointer(&events) + parms[3] = unsafe.Pointer(secrem) + parms[4] = unsafe.Pointer(nsecrem) + parms[5] = unsafe.Pointer(&rv) + parms[6] = unsafe.Pointer(&rc) + parms[7] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4CTW) + return rv, rc, rn +} +func BpxGetthent(in *Pgtha, outlen *uint32, out unsafe.Pointer) (rv int32, rc int32, rn int32) { + var parms [7]unsafe.Pointer + inlen := uint32(26) // nothing else will work. Go says Pgtha is 28-byte because of alignment, but Pgtha is "packed" and must be 26-byte + parms[0] = unsafe.Pointer(&inlen) + parms[1] = unsafe.Pointer(&in) + parms[2] = unsafe.Pointer(outlen) + parms[3] = unsafe.Pointer(&out) + parms[4] = unsafe.Pointer(&rv) + parms[5] = unsafe.Pointer(&rc) + parms[6] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4GTH) + return rv, rc, rn +} +func ZosJobname() (jobname string, err error) { + var pgtha Pgtha + pgtha.Pid = uint32(Getpid()) + pgtha.Accesspid = PGTHA_CURRENT + pgtha.Flag1 = PGTHA_PROCESS + var out [256]byte + var outlen uint32 + outlen = 256 + rv, rc, rn := BpxGetthent(&pgtha, &outlen, unsafe.Pointer(&out[0])) + if rv == 0 { + gthc := []byte{0x87, 0xa3, 0x88, 0x83} // 'gthc' in ebcdic + ix := bytes.Index(out[:], gthc) + if ix == -1 { + err = fmt.Errorf("BPX4GTH: gthc return data not found") + return + } + jn := out[ix+80 : ix+88] // we didn't declare Pgthc, but jobname is 8-byte at offset 80 + E2a(jn) + jobname = string(bytes.TrimRight(jn, " ")) + + } else { + err = fmt.Errorf("BPX4GTH: rc=%d errno=%d reason=code=0x%x", rv, rc, rn) + } + return +} +func Bpx4ptq(code int32, data string) (rv int32, rc int32, rn int32) { + var userdata [8]byte + var parms [5]unsafe.Pointer + copy(userdata[:], data+" ") + A2e(userdata[:]) + parms[0] = unsafe.Pointer(&code) + parms[1] = unsafe.Pointer(&userdata[0]) + parms[2] = unsafe.Pointer(&rv) + parms[3] = unsafe.Pointer(&rc) + parms[4] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4PTQ) + return rv, rc, rn +} + +const ( + PT_TRACE_ME = 0 // Debug this process + PT_READ_I = 1 // Read a full word + PT_READ_D = 2 // Read a full word + PT_READ_U = 3 // Read control info + PT_WRITE_I = 4 //Write a full word + PT_WRITE_D = 5 //Write a full word + PT_CONTINUE = 7 //Continue the process + PT_KILL = 8 //Terminate the process + PT_READ_GPR = 11 // Read GPR, CR, PSW + PT_READ_FPR = 12 // Read FPR + PT_READ_VR = 13 // Read VR + PT_WRITE_GPR = 14 // Write GPR, CR, PSW + PT_WRITE_FPR = 15 // Write FPR + PT_WRITE_VR = 16 // Write VR + PT_READ_BLOCK = 17 // Read storage + PT_WRITE_BLOCK = 19 // Write storage + PT_READ_GPRH = 20 // Read GPRH + PT_WRITE_GPRH = 21 // Write GPRH + PT_REGHSET = 22 // Read all GPRHs + PT_ATTACH = 30 // Attach to a process + PT_DETACH = 31 // Detach from a process + PT_REGSET = 32 // Read all GPRs + PT_REATTACH = 33 // Reattach to a process + PT_LDINFO = 34 // Read loader info + PT_MULTI = 35 // Multi process mode + PT_LD64INFO = 36 // RMODE64 Info Area + PT_BLOCKREQ = 40 // Block request + PT_THREAD_INFO = 60 // Read thread info + PT_THREAD_MODIFY = 61 + PT_THREAD_READ_FOCUS = 62 + PT_THREAD_WRITE_FOCUS = 63 + PT_THREAD_HOLD = 64 + PT_THREAD_SIGNAL = 65 + PT_EXPLAIN = 66 + PT_EVENTS = 67 + PT_THREAD_INFO_EXTENDED = 68 + PT_REATTACH2 = 71 + PT_CAPTURE = 72 + PT_UNCAPTURE = 73 + PT_GET_THREAD_TCB = 74 + PT_GET_ALET = 75 + PT_SWAPIN = 76 + PT_EXTENDED_EVENT = 98 + PT_RECOVER = 99 // Debug a program check + PT_GPR0 = 0 // General purpose register 0 + PT_GPR1 = 1 // General purpose register 1 + PT_GPR2 = 2 // General purpose register 2 + PT_GPR3 = 3 // General purpose register 3 + PT_GPR4 = 4 // General purpose register 4 + PT_GPR5 = 5 // General purpose register 5 + PT_GPR6 = 6 // General purpose register 6 + PT_GPR7 = 7 // General purpose register 7 + PT_GPR8 = 8 // General purpose register 8 + PT_GPR9 = 9 // General purpose register 9 + PT_GPR10 = 10 // General purpose register 10 + PT_GPR11 = 11 // General purpose register 11 + PT_GPR12 = 12 // General purpose register 12 + PT_GPR13 = 13 // General purpose register 13 + PT_GPR14 = 14 // General purpose register 14 + PT_GPR15 = 15 // General purpose register 15 + PT_FPR0 = 16 // Floating point register 0 + PT_FPR1 = 17 // Floating point register 1 + PT_FPR2 = 18 // Floating point register 2 + PT_FPR3 = 19 // Floating point register 3 + PT_FPR4 = 20 // Floating point register 4 + PT_FPR5 = 21 // Floating point register 5 + PT_FPR6 = 22 // Floating point register 6 + PT_FPR7 = 23 // Floating point register 7 + PT_FPR8 = 24 // Floating point register 8 + PT_FPR9 = 25 // Floating point register 9 + PT_FPR10 = 26 // Floating point register 10 + PT_FPR11 = 27 // Floating point register 11 + PT_FPR12 = 28 // Floating point register 12 + PT_FPR13 = 29 // Floating point register 13 + PT_FPR14 = 30 // Floating point register 14 + PT_FPR15 = 31 // Floating point register 15 + PT_FPC = 32 // Floating point control register + PT_PSW = 40 // PSW + PT_PSW0 = 40 // Left half of the PSW + PT_PSW1 = 41 // Right half of the PSW + PT_CR0 = 42 // Control register 0 + PT_CR1 = 43 // Control register 1 + PT_CR2 = 44 // Control register 2 + PT_CR3 = 45 // Control register 3 + PT_CR4 = 46 // Control register 4 + PT_CR5 = 47 // Control register 5 + PT_CR6 = 48 // Control register 6 + PT_CR7 = 49 // Control register 7 + PT_CR8 = 50 // Control register 8 + PT_CR9 = 51 // Control register 9 + PT_CR10 = 52 // Control register 10 + PT_CR11 = 53 // Control register 11 + PT_CR12 = 54 // Control register 12 + PT_CR13 = 55 // Control register 13 + PT_CR14 = 56 // Control register 14 + PT_CR15 = 57 // Control register 15 + PT_GPRH0 = 58 // GP High register 0 + PT_GPRH1 = 59 // GP High register 1 + PT_GPRH2 = 60 // GP High register 2 + PT_GPRH3 = 61 // GP High register 3 + PT_GPRH4 = 62 // GP High register 4 + PT_GPRH5 = 63 // GP High register 5 + PT_GPRH6 = 64 // GP High register 6 + PT_GPRH7 = 65 // GP High register 7 + PT_GPRH8 = 66 // GP High register 8 + PT_GPRH9 = 67 // GP High register 9 + PT_GPRH10 = 68 // GP High register 10 + PT_GPRH11 = 69 // GP High register 11 + PT_GPRH12 = 70 // GP High register 12 + PT_GPRH13 = 71 // GP High register 13 + PT_GPRH14 = 72 // GP High register 14 + PT_GPRH15 = 73 // GP High register 15 + PT_VR0 = 74 // Vector register 0 + PT_VR1 = 75 // Vector register 1 + PT_VR2 = 76 // Vector register 2 + PT_VR3 = 77 // Vector register 3 + PT_VR4 = 78 // Vector register 4 + PT_VR5 = 79 // Vector register 5 + PT_VR6 = 80 // Vector register 6 + PT_VR7 = 81 // Vector register 7 + PT_VR8 = 82 // Vector register 8 + PT_VR9 = 83 // Vector register 9 + PT_VR10 = 84 // Vector register 10 + PT_VR11 = 85 // Vector register 11 + PT_VR12 = 86 // Vector register 12 + PT_VR13 = 87 // Vector register 13 + PT_VR14 = 88 // Vector register 14 + PT_VR15 = 89 // Vector register 15 + PT_VR16 = 90 // Vector register 16 + PT_VR17 = 91 // Vector register 17 + PT_VR18 = 92 // Vector register 18 + PT_VR19 = 93 // Vector register 19 + PT_VR20 = 94 // Vector register 20 + PT_VR21 = 95 // Vector register 21 + PT_VR22 = 96 // Vector register 22 + PT_VR23 = 97 // Vector register 23 + PT_VR24 = 98 // Vector register 24 + PT_VR25 = 99 // Vector register 25 + PT_VR26 = 100 // Vector register 26 + PT_VR27 = 101 // Vector register 27 + PT_VR28 = 102 // Vector register 28 + PT_VR29 = 103 // Vector register 29 + PT_VR30 = 104 // Vector register 30 + PT_VR31 = 105 // Vector register 31 + PT_PSWG = 106 // PSWG + PT_PSWG0 = 106 // Bytes 0-3 + PT_PSWG1 = 107 // Bytes 4-7 + PT_PSWG2 = 108 // Bytes 8-11 (IA high word) + PT_PSWG3 = 109 // Bytes 12-15 (IA low word) +) + +func Bpx4ptr(request int32, pid int32, addr unsafe.Pointer, data unsafe.Pointer, buffer unsafe.Pointer) (rv int32, rc int32, rn int32) { + var parms [8]unsafe.Pointer + parms[0] = unsafe.Pointer(&request) + parms[1] = unsafe.Pointer(&pid) + parms[2] = unsafe.Pointer(&addr) + parms[3] = unsafe.Pointer(&data) + parms[4] = unsafe.Pointer(&buffer) + parms[5] = unsafe.Pointer(&rv) + parms[6] = unsafe.Pointer(&rc) + parms[7] = unsafe.Pointer(&rn) + bpxcall(parms[:], BPX4PTR) + return rv, rc, rn +} + +func copyU8(val uint8, dest []uint8) int { + if len(dest) < 1 { + return 0 + } + dest[0] = val + return 1 +} + +func copyU8Arr(src, dest []uint8) int { + if len(dest) < len(src) { + return 0 + } + for i, v := range src { + dest[i] = v + } + return len(src) +} + +func copyU16(val uint16, dest []uint16) int { + if len(dest) < 1 { + return 0 + } + dest[0] = val + return 1 +} + +func copyU32(val uint32, dest []uint32) int { + if len(dest) < 1 { + return 0 + } + dest[0] = val + return 1 +} + +func copyU32Arr(src, dest []uint32) int { + if len(dest) < len(src) { + return 0 + } + for i, v := range src { + dest[i] = v + } + return len(src) +} + +func copyU64(val uint64, dest []uint64) int { + if len(dest) < 1 { + return 0 + } + dest[0] = val + return 1 +} diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/bpxsvc_zos.s b/pkg/k8s/vendor/golang.org/x/sys/unix/bpxsvc_zos.s new file mode 100644 index 00000000000..4bd4a179821 --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/bpxsvc_zos.s @@ -0,0 +1,192 @@ +// Copyright 2024 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. + +#include "go_asm.h" +#include "textflag.h" + +// function to call USS assembly language services +// +// doc: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_3.1.0/com.ibm.zos.v3r1.bpxb100/bit64env.htm +// +// arg1 unsafe.Pointer array that ressembles an OS PLIST +// +// arg2 function offset as in +// doc: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_3.1.0/com.ibm.zos.v3r1.bpxb100/bpx2cr_List_of_offsets.htm +// +// func bpxcall(plist []unsafe.Pointer, bpx_offset int64) + +TEXT ·bpxcall(SB), NOSPLIT|NOFRAME, $0 + MOVD plist_base+0(FP), R1 // r1 points to plist + MOVD bpx_offset+24(FP), R2 // r2 offset to BPX vector table + MOVD R14, R7 // save r14 + MOVD R15, R8 // save r15 + MOVWZ 16(R0), R9 + MOVWZ 544(R9), R9 + MOVWZ 24(R9), R9 // call vector in r9 + ADD R2, R9 // add offset to vector table + MOVWZ (R9), R9 // r9 points to entry point + BYTE $0x0D // BL R14,R9 --> basr r14,r9 + BYTE $0xE9 // clobbers 0,1,14,15 + MOVD R8, R15 // restore 15 + JMP R7 // return via saved return address + +// func A2e(arr [] byte) +// code page conversion from 819 to 1047 +TEXT ·A2e(SB), NOSPLIT|NOFRAME, $0 + MOVD arg_base+0(FP), R2 // pointer to arry of characters + MOVD arg_len+8(FP), R3 // count + XOR R0, R0 + XOR R1, R1 + BYTE $0xA7; BYTE $0x15; BYTE $0x00; BYTE $0x82 // BRAS 1,(2+(256/2)) + + // ASCII -> EBCDIC conversion table: + BYTE $0x00; BYTE $0x01; BYTE $0x02; BYTE $0x03 + BYTE $0x37; BYTE $0x2d; BYTE $0x2e; BYTE $0x2f + BYTE $0x16; BYTE $0x05; BYTE $0x15; BYTE $0x0b + BYTE $0x0c; BYTE $0x0d; BYTE $0x0e; BYTE $0x0f + BYTE $0x10; BYTE $0x11; BYTE $0x12; BYTE $0x13 + BYTE $0x3c; BYTE $0x3d; BYTE $0x32; BYTE $0x26 + BYTE $0x18; BYTE $0x19; BYTE $0x3f; BYTE $0x27 + BYTE $0x1c; BYTE $0x1d; BYTE $0x1e; BYTE $0x1f + BYTE $0x40; BYTE $0x5a; BYTE $0x7f; BYTE $0x7b + BYTE $0x5b; BYTE $0x6c; BYTE $0x50; BYTE $0x7d + BYTE $0x4d; BYTE $0x5d; BYTE $0x5c; BYTE $0x4e + BYTE $0x6b; BYTE $0x60; BYTE $0x4b; BYTE $0x61 + BYTE $0xf0; BYTE $0xf1; BYTE $0xf2; BYTE $0xf3 + BYTE $0xf4; BYTE $0xf5; BYTE $0xf6; BYTE $0xf7 + BYTE $0xf8; BYTE $0xf9; BYTE $0x7a; BYTE $0x5e + BYTE $0x4c; BYTE $0x7e; BYTE $0x6e; BYTE $0x6f + BYTE $0x7c; BYTE $0xc1; BYTE $0xc2; BYTE $0xc3 + BYTE $0xc4; BYTE $0xc5; BYTE $0xc6; BYTE $0xc7 + BYTE $0xc8; BYTE $0xc9; BYTE $0xd1; BYTE $0xd2 + BYTE $0xd3; BYTE $0xd4; BYTE $0xd5; BYTE $0xd6 + BYTE $0xd7; BYTE $0xd8; BYTE $0xd9; BYTE $0xe2 + BYTE $0xe3; BYTE $0xe4; BYTE $0xe5; BYTE $0xe6 + BYTE $0xe7; BYTE $0xe8; BYTE $0xe9; BYTE $0xad + BYTE $0xe0; BYTE $0xbd; BYTE $0x5f; BYTE $0x6d + BYTE $0x79; BYTE $0x81; BYTE $0x82; BYTE $0x83 + BYTE $0x84; BYTE $0x85; BYTE $0x86; BYTE $0x87 + BYTE $0x88; BYTE $0x89; BYTE $0x91; BYTE $0x92 + BYTE $0x93; BYTE $0x94; BYTE $0x95; BYTE $0x96 + BYTE $0x97; BYTE $0x98; BYTE $0x99; BYTE $0xa2 + BYTE $0xa3; BYTE $0xa4; BYTE $0xa5; BYTE $0xa6 + BYTE $0xa7; BYTE $0xa8; BYTE $0xa9; BYTE $0xc0 + BYTE $0x4f; BYTE $0xd0; BYTE $0xa1; BYTE $0x07 + BYTE $0x20; BYTE $0x21; BYTE $0x22; BYTE $0x23 + BYTE $0x24; BYTE $0x25; BYTE $0x06; BYTE $0x17 + BYTE $0x28; BYTE $0x29; BYTE $0x2a; BYTE $0x2b + BYTE $0x2c; BYTE $0x09; BYTE $0x0a; BYTE $0x1b + BYTE $0x30; BYTE $0x31; BYTE $0x1a; BYTE $0x33 + BYTE $0x34; BYTE $0x35; BYTE $0x36; BYTE $0x08 + BYTE $0x38; BYTE $0x39; BYTE $0x3a; BYTE $0x3b + BYTE $0x04; BYTE $0x14; BYTE $0x3e; BYTE $0xff + BYTE $0x41; BYTE $0xaa; BYTE $0x4a; BYTE $0xb1 + BYTE $0x9f; BYTE $0xb2; BYTE $0x6a; BYTE $0xb5 + BYTE $0xbb; BYTE $0xb4; BYTE $0x9a; BYTE $0x8a + BYTE $0xb0; BYTE $0xca; BYTE $0xaf; BYTE $0xbc + BYTE $0x90; BYTE $0x8f; BYTE $0xea; BYTE $0xfa + BYTE $0xbe; BYTE $0xa0; BYTE $0xb6; BYTE $0xb3 + BYTE $0x9d; BYTE $0xda; BYTE $0x9b; BYTE $0x8b + BYTE $0xb7; BYTE $0xb8; BYTE $0xb9; BYTE $0xab + BYTE $0x64; BYTE $0x65; BYTE $0x62; BYTE $0x66 + BYTE $0x63; BYTE $0x67; BYTE $0x9e; BYTE $0x68 + BYTE $0x74; BYTE $0x71; BYTE $0x72; BYTE $0x73 + BYTE $0x78; BYTE $0x75; BYTE $0x76; BYTE $0x77 + BYTE $0xac; BYTE $0x69; BYTE $0xed; BYTE $0xee + BYTE $0xeb; BYTE $0xef; BYTE $0xec; BYTE $0xbf + BYTE $0x80; BYTE $0xfd; BYTE $0xfe; BYTE $0xfb + BYTE $0xfc; BYTE $0xba; BYTE $0xae; BYTE $0x59 + BYTE $0x44; BYTE $0x45; BYTE $0x42; BYTE $0x46 + BYTE $0x43; BYTE $0x47; BYTE $0x9c; BYTE $0x48 + BYTE $0x54; BYTE $0x51; BYTE $0x52; BYTE $0x53 + BYTE $0x58; BYTE $0x55; BYTE $0x56; BYTE $0x57 + BYTE $0x8c; BYTE $0x49; BYTE $0xcd; BYTE $0xce + BYTE $0xcb; BYTE $0xcf; BYTE $0xcc; BYTE $0xe1 + BYTE $0x70; BYTE $0xdd; BYTE $0xde; BYTE $0xdb + BYTE $0xdc; BYTE $0x8d; BYTE $0x8e; BYTE $0xdf + +retry: + WORD $0xB9931022 // TROO 2,2,b'0001' + BVS retry + RET + +// func e2a(arr [] byte) +// code page conversion from 1047 to 819 +TEXT ·E2a(SB), NOSPLIT|NOFRAME, $0 + MOVD arg_base+0(FP), R2 // pointer to arry of characters + MOVD arg_len+8(FP), R3 // count + XOR R0, R0 + XOR R1, R1 + BYTE $0xA7; BYTE $0x15; BYTE $0x00; BYTE $0x82 // BRAS 1,(2+(256/2)) + + // EBCDIC -> ASCII conversion table: + BYTE $0x00; BYTE $0x01; BYTE $0x02; BYTE $0x03 + BYTE $0x9c; BYTE $0x09; BYTE $0x86; BYTE $0x7f + BYTE $0x97; BYTE $0x8d; BYTE $0x8e; BYTE $0x0b + BYTE $0x0c; BYTE $0x0d; BYTE $0x0e; BYTE $0x0f + BYTE $0x10; BYTE $0x11; BYTE $0x12; BYTE $0x13 + BYTE $0x9d; BYTE $0x0a; BYTE $0x08; BYTE $0x87 + BYTE $0x18; BYTE $0x19; BYTE $0x92; BYTE $0x8f + BYTE $0x1c; BYTE $0x1d; BYTE $0x1e; BYTE $0x1f + BYTE $0x80; BYTE $0x81; BYTE $0x82; BYTE $0x83 + BYTE $0x84; BYTE $0x85; BYTE $0x17; BYTE $0x1b + BYTE $0x88; BYTE $0x89; BYTE $0x8a; BYTE $0x8b + BYTE $0x8c; BYTE $0x05; BYTE $0x06; BYTE $0x07 + BYTE $0x90; BYTE $0x91; BYTE $0x16; BYTE $0x93 + BYTE $0x94; BYTE $0x95; BYTE $0x96; BYTE $0x04 + BYTE $0x98; BYTE $0x99; BYTE $0x9a; BYTE $0x9b + BYTE $0x14; BYTE $0x15; BYTE $0x9e; BYTE $0x1a + BYTE $0x20; BYTE $0xa0; BYTE $0xe2; BYTE $0xe4 + BYTE $0xe0; BYTE $0xe1; BYTE $0xe3; BYTE $0xe5 + BYTE $0xe7; BYTE $0xf1; BYTE $0xa2; BYTE $0x2e + BYTE $0x3c; BYTE $0x28; BYTE $0x2b; BYTE $0x7c + BYTE $0x26; BYTE $0xe9; BYTE $0xea; BYTE $0xeb + BYTE $0xe8; BYTE $0xed; BYTE $0xee; BYTE $0xef + BYTE $0xec; BYTE $0xdf; BYTE $0x21; BYTE $0x24 + BYTE $0x2a; BYTE $0x29; BYTE $0x3b; BYTE $0x5e + BYTE $0x2d; BYTE $0x2f; BYTE $0xc2; BYTE $0xc4 + BYTE $0xc0; BYTE $0xc1; BYTE $0xc3; BYTE $0xc5 + BYTE $0xc7; BYTE $0xd1; BYTE $0xa6; BYTE $0x2c + BYTE $0x25; BYTE $0x5f; BYTE $0x3e; BYTE $0x3f + BYTE $0xf8; BYTE $0xc9; BYTE $0xca; BYTE $0xcb + BYTE $0xc8; BYTE $0xcd; BYTE $0xce; BYTE $0xcf + BYTE $0xcc; BYTE $0x60; BYTE $0x3a; BYTE $0x23 + BYTE $0x40; BYTE $0x27; BYTE $0x3d; BYTE $0x22 + BYTE $0xd8; BYTE $0x61; BYTE $0x62; BYTE $0x63 + BYTE $0x64; BYTE $0x65; BYTE $0x66; BYTE $0x67 + BYTE $0x68; BYTE $0x69; BYTE $0xab; BYTE $0xbb + BYTE $0xf0; BYTE $0xfd; BYTE $0xfe; BYTE $0xb1 + BYTE $0xb0; BYTE $0x6a; BYTE $0x6b; BYTE $0x6c + BYTE $0x6d; BYTE $0x6e; BYTE $0x6f; BYTE $0x70 + BYTE $0x71; BYTE $0x72; BYTE $0xaa; BYTE $0xba + BYTE $0xe6; BYTE $0xb8; BYTE $0xc6; BYTE $0xa4 + BYTE $0xb5; BYTE $0x7e; BYTE $0x73; BYTE $0x74 + BYTE $0x75; BYTE $0x76; BYTE $0x77; BYTE $0x78 + BYTE $0x79; BYTE $0x7a; BYTE $0xa1; BYTE $0xbf + BYTE $0xd0; BYTE $0x5b; BYTE $0xde; BYTE $0xae + BYTE $0xac; BYTE $0xa3; BYTE $0xa5; BYTE $0xb7 + BYTE $0xa9; BYTE $0xa7; BYTE $0xb6; BYTE $0xbc + BYTE $0xbd; BYTE $0xbe; BYTE $0xdd; BYTE $0xa8 + BYTE $0xaf; BYTE $0x5d; BYTE $0xb4; BYTE $0xd7 + BYTE $0x7b; BYTE $0x41; BYTE $0x42; BYTE $0x43 + BYTE $0x44; BYTE $0x45; BYTE $0x46; BYTE $0x47 + BYTE $0x48; BYTE $0x49; BYTE $0xad; BYTE $0xf4 + BYTE $0xf6; BYTE $0xf2; BYTE $0xf3; BYTE $0xf5 + BYTE $0x7d; BYTE $0x4a; BYTE $0x4b; BYTE $0x4c + BYTE $0x4d; BYTE $0x4e; BYTE $0x4f; BYTE $0x50 + BYTE $0x51; BYTE $0x52; BYTE $0xb9; BYTE $0xfb + BYTE $0xfc; BYTE $0xf9; BYTE $0xfa; BYTE $0xff + BYTE $0x5c; BYTE $0xf7; BYTE $0x53; BYTE $0x54 + BYTE $0x55; BYTE $0x56; BYTE $0x57; BYTE $0x58 + BYTE $0x59; BYTE $0x5a; BYTE $0xb2; BYTE $0xd4 + BYTE $0xd6; BYTE $0xd2; BYTE $0xd3; BYTE $0xd5 + BYTE $0x30; BYTE $0x31; BYTE $0x32; BYTE $0x33 + BYTE $0x34; BYTE $0x35; BYTE $0x36; BYTE $0x37 + BYTE $0x38; BYTE $0x39; BYTE $0xb3; BYTE $0xdb + BYTE $0xdc; BYTE $0xd9; BYTE $0xda; BYTE $0x9f + +retry: + WORD $0xB9931022 // TROO 2,2,b'0001' + BVS retry + RET diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/epoll_zos.go b/pkg/k8s/vendor/golang.org/x/sys/unix/epoll_zos.go deleted file mode 100644 index 7753fddea81..00000000000 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/epoll_zos.go +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2020 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. - -//go:build zos && s390x - -package unix - -import ( - "sync" -) - -// This file simulates epoll on z/OS using poll. - -// Analogous to epoll_event on Linux. -// TODO(neeilan): Pad is because the Linux kernel expects a 96-bit struct. We never pass this to the kernel; remove? -type EpollEvent struct { - Events uint32 - Fd int32 - Pad int32 -} - -const ( - EPOLLERR = 0x8 - EPOLLHUP = 0x10 - EPOLLIN = 0x1 - EPOLLMSG = 0x400 - EPOLLOUT = 0x4 - EPOLLPRI = 0x2 - EPOLLRDBAND = 0x80 - EPOLLRDNORM = 0x40 - EPOLLWRBAND = 0x200 - EPOLLWRNORM = 0x100 - EPOLL_CTL_ADD = 0x1 - EPOLL_CTL_DEL = 0x2 - EPOLL_CTL_MOD = 0x3 - // The following constants are part of the epoll API, but represent - // currently unsupported functionality on z/OS. - // EPOLL_CLOEXEC = 0x80000 - // EPOLLET = 0x80000000 - // EPOLLONESHOT = 0x40000000 - // EPOLLRDHUP = 0x2000 // Typically used with edge-triggered notis - // EPOLLEXCLUSIVE = 0x10000000 // Exclusive wake-up mode - // EPOLLWAKEUP = 0x20000000 // Relies on Linux's BLOCK_SUSPEND capability -) - -// TODO(neeilan): We can eliminate these epToPoll / pToEpoll calls by using identical mask values for POLL/EPOLL -// constants where possible The lower 16 bits of epoll events (uint32) can fit any system poll event (int16). - -// epToPollEvt converts epoll event field to poll equivalent. -// In epoll, Events is a 32-bit field, while poll uses 16 bits. -func epToPollEvt(events uint32) int16 { - var ep2p = map[uint32]int16{ - EPOLLIN: POLLIN, - EPOLLOUT: POLLOUT, - EPOLLHUP: POLLHUP, - EPOLLPRI: POLLPRI, - EPOLLERR: POLLERR, - } - - var pollEvts int16 = 0 - for epEvt, pEvt := range ep2p { - if (events & epEvt) != 0 { - pollEvts |= pEvt - } - } - - return pollEvts -} - -// pToEpollEvt converts 16 bit poll event bitfields to 32-bit epoll event fields. -func pToEpollEvt(revents int16) uint32 { - var p2ep = map[int16]uint32{ - POLLIN: EPOLLIN, - POLLOUT: EPOLLOUT, - POLLHUP: EPOLLHUP, - POLLPRI: EPOLLPRI, - POLLERR: EPOLLERR, - } - - var epollEvts uint32 = 0 - for pEvt, epEvt := range p2ep { - if (revents & pEvt) != 0 { - epollEvts |= epEvt - } - } - - return epollEvts -} - -// Per-process epoll implementation. -type epollImpl struct { - mu sync.Mutex - epfd2ep map[int]*eventPoll - nextEpfd int -} - -// eventPoll holds a set of file descriptors being watched by the process. A process can have multiple epoll instances. -// On Linux, this is an in-kernel data structure accessed through a fd. -type eventPoll struct { - mu sync.Mutex - fds map[int]*EpollEvent -} - -// epoll impl for this process. -var impl epollImpl = epollImpl{ - epfd2ep: make(map[int]*eventPoll), - nextEpfd: 0, -} - -func (e *epollImpl) epollcreate(size int) (epfd int, err error) { - e.mu.Lock() - defer e.mu.Unlock() - epfd = e.nextEpfd - e.nextEpfd++ - - e.epfd2ep[epfd] = &eventPoll{ - fds: make(map[int]*EpollEvent), - } - return epfd, nil -} - -func (e *epollImpl) epollcreate1(flag int) (fd int, err error) { - return e.epollcreate(4) -} - -func (e *epollImpl) epollctl(epfd int, op int, fd int, event *EpollEvent) (err error) { - e.mu.Lock() - defer e.mu.Unlock() - - ep, ok := e.epfd2ep[epfd] - if !ok { - - return EBADF - } - - switch op { - case EPOLL_CTL_ADD: - // TODO(neeilan): When we make epfds and fds disjoint, detect epoll - // loops here (instances watching each other) and return ELOOP. - if _, ok := ep.fds[fd]; ok { - return EEXIST - } - ep.fds[fd] = event - case EPOLL_CTL_MOD: - if _, ok := ep.fds[fd]; !ok { - return ENOENT - } - ep.fds[fd] = event - case EPOLL_CTL_DEL: - if _, ok := ep.fds[fd]; !ok { - return ENOENT - } - delete(ep.fds, fd) - - } - return nil -} - -// Must be called while holding ep.mu -func (ep *eventPoll) getFds() []int { - fds := make([]int, len(ep.fds)) - for fd := range ep.fds { - fds = append(fds, fd) - } - return fds -} - -func (e *epollImpl) epollwait(epfd int, events []EpollEvent, msec int) (n int, err error) { - e.mu.Lock() // in [rare] case of concurrent epollcreate + epollwait - ep, ok := e.epfd2ep[epfd] - - if !ok { - e.mu.Unlock() - return 0, EBADF - } - - pollfds := make([]PollFd, 4) - for fd, epollevt := range ep.fds { - pollfds = append(pollfds, PollFd{Fd: int32(fd), Events: epToPollEvt(epollevt.Events)}) - } - e.mu.Unlock() - - n, err = Poll(pollfds, msec) - if err != nil { - return n, err - } - - i := 0 - for _, pFd := range pollfds { - if pFd.Revents != 0 { - events[i] = EpollEvent{Fd: pFd.Fd, Events: pToEpollEvt(pFd.Revents)} - i++ - } - - if i == n { - break - } - } - - return n, nil -} - -func EpollCreate(size int) (fd int, err error) { - return impl.epollcreate(size) -} - -func EpollCreate1(flag int) (fd int, err error) { - return impl.epollcreate1(flag) -} - -func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { - return impl.epollctl(epfd, op, fd, event) -} - -// Because EpollWait mutates events, the caller is expected to coordinate -// concurrent access if calling with the same epfd from multiple goroutines. -func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { - return impl.epollwait(epfd, events, msec) -} diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/fstatfs_zos.go b/pkg/k8s/vendor/golang.org/x/sys/unix/fstatfs_zos.go deleted file mode 100644 index c8bde601e77..00000000000 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/fstatfs_zos.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2020 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. - -//go:build zos && s390x - -package unix - -import ( - "unsafe" -) - -// This file simulates fstatfs on z/OS using fstatvfs and w_getmntent. - -func Fstatfs(fd int, stat *Statfs_t) (err error) { - var stat_v Statvfs_t - err = Fstatvfs(fd, &stat_v) - if err == nil { - // populate stat - stat.Type = 0 - stat.Bsize = stat_v.Bsize - stat.Blocks = stat_v.Blocks - stat.Bfree = stat_v.Bfree - stat.Bavail = stat_v.Bavail - stat.Files = stat_v.Files - stat.Ffree = stat_v.Ffree - stat.Fsid = stat_v.Fsid - stat.Namelen = stat_v.Namemax - stat.Frsize = stat_v.Frsize - stat.Flags = stat_v.Flag - for passn := 0; passn < 5; passn++ { - switch passn { - case 0: - err = tryGetmntent64(stat) - break - case 1: - err = tryGetmntent128(stat) - break - case 2: - err = tryGetmntent256(stat) - break - case 3: - err = tryGetmntent512(stat) - break - case 4: - err = tryGetmntent1024(stat) - break - default: - break - } - //proceed to return if: err is nil (found), err is nonnil but not ERANGE (another error occurred) - if err == nil || err != nil && err != ERANGE { - break - } - } - } - return err -} - -func tryGetmntent64(stat *Statfs_t) (err error) { - var mnt_ent_buffer struct { - header W_Mnth - filesys_info [64]W_Mntent - } - var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) - fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) - if err != nil { - return err - } - err = ERANGE //return ERANGE if no match is found in this batch - for i := 0; i < fs_count; i++ { - if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { - stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) - err = nil - break - } - } - return err -} - -func tryGetmntent128(stat *Statfs_t) (err error) { - var mnt_ent_buffer struct { - header W_Mnth - filesys_info [128]W_Mntent - } - var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) - fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) - if err != nil { - return err - } - err = ERANGE //return ERANGE if no match is found in this batch - for i := 0; i < fs_count; i++ { - if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { - stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) - err = nil - break - } - } - return err -} - -func tryGetmntent256(stat *Statfs_t) (err error) { - var mnt_ent_buffer struct { - header W_Mnth - filesys_info [256]W_Mntent - } - var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) - fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) - if err != nil { - return err - } - err = ERANGE //return ERANGE if no match is found in this batch - for i := 0; i < fs_count; i++ { - if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { - stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) - err = nil - break - } - } - return err -} - -func tryGetmntent512(stat *Statfs_t) (err error) { - var mnt_ent_buffer struct { - header W_Mnth - filesys_info [512]W_Mntent - } - var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) - fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) - if err != nil { - return err - } - err = ERANGE //return ERANGE if no match is found in this batch - for i := 0; i < fs_count; i++ { - if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { - stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) - err = nil - break - } - } - return err -} - -func tryGetmntent1024(stat *Statfs_t) (err error) { - var mnt_ent_buffer struct { - header W_Mnth - filesys_info [1024]W_Mntent - } - var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) - fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) - if err != nil { - return err - } - err = ERANGE //return ERANGE if no match is found in this batch - for i := 0; i < fs_count; i++ { - if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { - stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) - err = nil - break - } - } - return err -} diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/mkerrors.sh b/pkg/k8s/vendor/golang.org/x/sys/unix/mkerrors.sh index fdcaa974d23..4ed2e488b61 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -263,6 +263,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -549,6 +550,7 @@ ccflags="$@" $2 !~ "NLA_TYPE_MASK" && $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ && $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || + $2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ || $2 ~ /^FIORDCHK$/ || $2 ~ /^SIOC/ || $2 ~ /^TIOC/ || diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/mmap_nomremap.go b/pkg/k8s/vendor/golang.org/x/sys/unix/mmap_nomremap.go index 4b68e59780a..7f602ffd26d 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/mmap_nomremap.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/mmap_nomremap.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris +//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos package unix diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/pagesize_unix.go b/pkg/k8s/vendor/golang.org/x/sys/unix/pagesize_unix.go index 4d0a3430edc..0482408d7c6 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/pagesize_unix.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/pagesize_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos // For Unix, get the pagesize from the runtime. diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go b/pkg/k8s/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go index 130398b6b76..b903c00604b 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build darwin +//go:build darwin || zos package unix diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/sockcmsg_zos.go b/pkg/k8s/vendor/golang.org/x/sys/unix/sockcmsg_zos.go new file mode 100644 index 00000000000..3e53dbc0286 --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/sockcmsg_zos.go @@ -0,0 +1,58 @@ +// Copyright 2024 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. + +// Socket control messages + +package unix + +import "unsafe" + +// UnixCredentials encodes credentials into a socket control message +// for sending to another process. This can be used for +// authentication. +func UnixCredentials(ucred *Ucred) []byte { + b := make([]byte, CmsgSpace(SizeofUcred)) + h := (*Cmsghdr)(unsafe.Pointer(&b[0])) + h.Level = SOL_SOCKET + h.Type = SCM_CREDENTIALS + h.SetLen(CmsgLen(SizeofUcred)) + *(*Ucred)(h.data(0)) = *ucred + return b +} + +// ParseUnixCredentials decodes a socket control message that contains +// credentials in a Ucred structure. To receive such a message, the +// SO_PASSCRED option must be enabled on the socket. +func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) { + if m.Header.Level != SOL_SOCKET { + return nil, EINVAL + } + if m.Header.Type != SCM_CREDENTIALS { + return nil, EINVAL + } + ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0])) + return &ucred, nil +} + +// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO. +func PktInfo4(info *Inet4Pktinfo) []byte { + b := make([]byte, CmsgSpace(SizeofInet4Pktinfo)) + h := (*Cmsghdr)(unsafe.Pointer(&b[0])) + h.Level = SOL_IP + h.Type = IP_PKTINFO + h.SetLen(CmsgLen(SizeofInet4Pktinfo)) + *(*Inet4Pktinfo)(h.data(0)) = *info + return b +} + +// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO. +func PktInfo6(info *Inet6Pktinfo) []byte { + b := make([]byte, CmsgSpace(SizeofInet6Pktinfo)) + h := (*Cmsghdr)(unsafe.Pointer(&b[0])) + h.Level = SOL_IPV6 + h.Type = IPV6_PKTINFO + h.SetLen(CmsgLen(SizeofInet6Pktinfo)) + *(*Inet6Pktinfo)(h.data(0)) = *info + return b +} diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s b/pkg/k8s/vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s new file mode 100644 index 00000000000..3c4f33cb6a8 --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s @@ -0,0 +1,75 @@ +// Copyright 2024 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. + +//go:build zos && s390x && gc + +#include "textflag.h" + +// provide the address of function variable to be fixed up. + +TEXT ·getPipe2Addr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Pipe2(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_FlockAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Flock(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_GetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Getxattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_NanosleepAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Nanosleep(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_SetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Setxattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_Wait4Addr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Wait4(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_MountAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Mount(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_UnmountAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Unmount(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_UtimesNanoAtAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·UtimesNanoAt(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_UtimesNanoAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·UtimesNano(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_MkfifoatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Mkfifoat(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_ChtagAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Chtag(SB), R8 + MOVD R8, ret+0(FP) + RET + +TEXT ·get_ReadlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Readlinkat(SB), R8 + MOVD R8, ret+0(FP) + RET + diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/pkg/k8s/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go index b473038c615..312ae6ac1d2 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go @@ -4,11 +4,21 @@ //go:build zos && s390x +// Many of the following syscalls are not available on all versions of z/OS. +// Some missing calls have legacy implementations/simulations but others +// will be missing completely. To achieve consistent failing behaviour on +// legacy systems, we first test the function pointer via a safeloading +// mechanism to see if the function exists on a given system. Then execution +// is branched to either continue the function call, or return an error. + package unix import ( "bytes" "fmt" + "os" + "reflect" + "regexp" "runtime" "sort" "strings" @@ -17,17 +27,205 @@ import ( "unsafe" ) +//go:noescape +func initZosLibVec() + +//go:noescape +func GetZosLibVec() uintptr + +func init() { + initZosLibVec() + r0, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS_____GETENV_A<<4, uintptr(unsafe.Pointer(&([]byte("__ZOS_XSYSTRACE\x00"))[0]))) + if r0 != 0 { + n, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___ATOI_A<<4, r0) + ZosTraceLevel = int(n) + r0, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS_____GETENV_A<<4, uintptr(unsafe.Pointer(&([]byte("__ZOS_XSYSTRACEFD\x00"))[0]))) + if r0 != 0 { + fd, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___ATOI_A<<4, r0) + f := os.NewFile(fd, "zostracefile") + if f != nil { + ZosTracefile = f + } + } + + } +} + +//go:noescape +func CallLeFuncWithErr(funcdesc uintptr, parms ...uintptr) (ret, errno2 uintptr, err Errno) + +//go:noescape +func CallLeFuncWithPtrReturn(funcdesc uintptr, parms ...uintptr) (ret, errno2 uintptr, err Errno) + +// ------------------------------- +// pointer validity test +// good pointer returns 0 +// bad pointer returns 1 +// +//go:nosplit +func ptrtest(uintptr) uint64 + +// Load memory at ptr location with error handling if the location is invalid +// +//go:noescape +func safeload(ptr uintptr) (value uintptr, error uintptr) + const ( - O_CLOEXEC = 0 // Dummy value (not supported). - AF_LOCAL = AF_UNIX // AF_LOCAL is an alias for AF_UNIX + entrypointLocationOffset = 8 // From function descriptor + + xplinkEyecatcher = 0x00c300c500c500f1 // ".C.E.E.1" + eyecatcherOffset = 16 // From function entrypoint (negative) + ppa1LocationOffset = 8 // From function entrypoint (negative) + + nameLenOffset = 0x14 // From PPA1 start + nameOffset = 0x16 // From PPA1 start ) -func syscall_syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) -func syscall_rawsyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) -func syscall_syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) -func syscall_rawsyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) -func syscall_syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) -func syscall_rawsyscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) +func getPpaOffset(funcptr uintptr) int64 { + entrypoint, err := safeload(funcptr + entrypointLocationOffset) + if err != 0 { + return -1 + } + + // XPLink functions have ".C.E.E.1" as the first 8 bytes (EBCDIC) + val, err := safeload(entrypoint - eyecatcherOffset) + if err != 0 { + return -1 + } + if val != xplinkEyecatcher { + return -1 + } + + ppaoff, err := safeload(entrypoint - ppa1LocationOffset) + if err != 0 { + return -1 + } + + ppaoff >>= 32 + return int64(ppaoff) +} + +//------------------------------- +// function descriptor pointer validity test +// good pointer returns 0 +// bad pointer returns 1 + +// TODO: currently mksyscall_zos_s390x.go generate empty string for funcName +// have correct funcName pass to the funcptrtest function +func funcptrtest(funcptr uintptr, funcName string) uint64 { + entrypoint, err := safeload(funcptr + entrypointLocationOffset) + if err != 0 { + return 1 + } + + ppaoff := getPpaOffset(funcptr) + if ppaoff == -1 { + return 1 + } + + // PPA1 offset value is from the start of the entire function block, not the entrypoint + ppa1 := (entrypoint - eyecatcherOffset) + uintptr(ppaoff) + + nameLen, err := safeload(ppa1 + nameLenOffset) + if err != 0 { + return 1 + } + + nameLen >>= 48 + if nameLen > 128 { + return 1 + } + + // no function name input to argument end here + if funcName == "" { + return 0 + } + + var funcname [128]byte + for i := 0; i < int(nameLen); i += 8 { + v, err := safeload(ppa1 + nameOffset + uintptr(i)) + if err != 0 { + return 1 + } + funcname[i] = byte(v >> 56) + funcname[i+1] = byte(v >> 48) + funcname[i+2] = byte(v >> 40) + funcname[i+3] = byte(v >> 32) + funcname[i+4] = byte(v >> 24) + funcname[i+5] = byte(v >> 16) + funcname[i+6] = byte(v >> 8) + funcname[i+7] = byte(v) + } + + runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, // __e2a_l + []uintptr{uintptr(unsafe.Pointer(&funcname[0])), nameLen}) + + name := string(funcname[:nameLen]) + if name != funcName { + return 1 + } + + return 0 +} + +// For detection of capabilities on a system. +// Is function descriptor f a valid function? +func isValidLeFunc(f uintptr) error { + ret := funcptrtest(f, "") + if ret != 0 { + return fmt.Errorf("Bad pointer, not an LE function ") + } + return nil +} + +// Retrieve function name from descriptor +func getLeFuncName(f uintptr) (string, error) { + // assume it has been checked, only check ppa1 validity here + entry := ((*[2]uintptr)(unsafe.Pointer(f)))[1] + preamp := ((*[4]uint32)(unsafe.Pointer(entry - eyecatcherOffset))) + + offsetPpa1 := preamp[2] + if offsetPpa1 > 0x0ffff { + return "", fmt.Errorf("PPA1 offset seems too big 0x%x\n", offsetPpa1) + } + + ppa1 := uintptr(unsafe.Pointer(preamp)) + uintptr(offsetPpa1) + res := ptrtest(ppa1) + if res != 0 { + return "", fmt.Errorf("PPA1 address not valid") + } + + size := *(*uint16)(unsafe.Pointer(ppa1 + nameLenOffset)) + if size > 128 { + return "", fmt.Errorf("Function name seems too long, length=%d\n", size) + } + + var name [128]byte + funcname := (*[128]byte)(unsafe.Pointer(ppa1 + nameOffset)) + copy(name[0:size], funcname[0:size]) + + runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, // __e2a_l + []uintptr{uintptr(unsafe.Pointer(&name[0])), uintptr(size)}) + + return string(name[:size]), nil +} + +// Check z/OS version +func zosLeVersion() (version, release uint32) { + p1 := (*(*uintptr)(unsafe.Pointer(uintptr(1208)))) >> 32 + p1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 88))) + p1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 8))) + p1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 984))) + vrm := *(*uint32)(unsafe.Pointer(p1 + 80)) + version = (vrm & 0x00ff0000) >> 16 + release = (vrm & 0x0000ff00) >> 8 + return +} + +// returns a zos C FILE * for stdio fd 0, 1, 2 +func ZosStdioFilep(fd int32) uintptr { + return uintptr(*(*uint64)(unsafe.Pointer(uintptr(*(*uint64)(unsafe.Pointer(uintptr(*(*uint64)(unsafe.Pointer(uintptr(uint64(*(*uint32)(unsafe.Pointer(uintptr(1208)))) + 80))) + uint64((fd+2)<<3)))))))) +} func copyStat(stat *Stat_t, statLE *Stat_LE_t) { stat.Dev = uint64(statLE.Dev) @@ -65,6 +263,21 @@ func (d *Dirent) NameString() string { } } +func DecodeData(dest []byte, sz int, val uint64) { + for i := 0; i < sz; i++ { + dest[sz-1-i] = byte((val >> (uint64(i * 8))) & 0xff) + } +} + +func EncodeData(data []byte) uint64 { + var value uint64 + sz := len(data) + for i := 0; i < sz; i++ { + value |= uint64(data[i]) << uint64(((sz - i - 1) * 8)) + } + return value +} + func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { if sa.Port < 0 || sa.Port > 0xFFFF { return nil, 0, EINVAL @@ -74,7 +287,9 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) p[0] = byte(sa.Port >> 8) p[1] = byte(sa.Port) - sa.raw.Addr = sa.Addr + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil } @@ -88,7 +303,9 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) { p[0] = byte(sa.Port >> 8) p[1] = byte(sa.Port) sa.raw.Scope_id = sa.ZoneId - sa.raw.Addr = sa.Addr + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil } @@ -146,7 +363,9 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) { sa := new(SockaddrInet4) p := (*[2]byte)(unsafe.Pointer(&pp.Port)) sa.Port = int(p[0])<<8 + int(p[1]) - sa.Addr = pp.Addr + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } return sa, nil case AF_INET6: @@ -155,7 +374,9 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) { p := (*[2]byte)(unsafe.Pointer(&pp.Port)) sa.Port = int(p[0])<<8 + int(p[1]) sa.ZoneId = pp.Scope_id - sa.Addr = pp.Addr + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } return sa, nil } return nil, EAFNOSUPPORT @@ -177,6 +398,43 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) { return } +func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept4(fd, &rsa, &len, flags) + if err != nil { + return + } + if len > SizeofSockaddrAny { + panic("RawSockaddrAny too small") + } + // TODO(neeilan): Remove 0 in call + sa, err = anyToSockaddr(0, &rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +func Ctermid() (tty string, err error) { + var termdev [1025]byte + runtime.EnterSyscall() + r0, err2, err1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___CTERMID_A<<4, uintptr(unsafe.Pointer(&termdev[0]))) + runtime.ExitSyscall() + if r0 == 0 { + return "", fmt.Errorf("%s (errno2=0x%x)\n", err1.Error(), err2) + } + s := string(termdev[:]) + idx := strings.Index(s, string(rune(0))) + if idx == -1 { + tty = s + } else { + tty = s[:idx] + } + return +} + func (iov *Iovec) SetLen(length int) { iov.Len = uint64(length) } @@ -190,10 +448,16 @@ func (cmsg *Cmsghdr) SetLen(length int) { } //sys fcntl(fd int, cmd int, arg int) (val int, err error) +//sys Flistxattr(fd int, dest []byte) (sz int, err error) = SYS___FLISTXATTR_A +//sys Fremovexattr(fd int, attr string) (err error) = SYS___FREMOVEXATTR_A //sys read(fd int, p []byte) (n int, err error) //sys write(fd int, p []byte) (n int, err error) +//sys Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) = SYS___FGETXATTR_A +//sys Fsetxattr(fd int, attr string, data []byte, flag int) (err error) = SYS___FSETXATTR_A + //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = SYS___ACCEPT_A +//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) = SYS___ACCEPT4_A //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___BIND_A //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___CONNECT_A //sysnb getgroups(n int, list *_Gid_t) (nn int, err error) @@ -204,6 +468,7 @@ func (cmsg *Cmsghdr) SetLen(length int) { //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) //sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETPEERNAME_A //sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETSOCKNAME_A +//sys Removexattr(path string, attr string) (err error) = SYS___REMOVEXATTR_A //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = SYS___RECVFROM_A //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = SYS___SENDTO_A //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___RECVMSG_A @@ -212,6 +477,10 @@ func (cmsg *Cmsghdr) SetLen(length int) { //sys munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP //sys ioctl(fd int, req int, arg uintptr) (err error) = SYS_IOCTL //sys ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = SYS_IOCTL +//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error) = SYS_SHMAT +//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) = SYS_SHMCTL64 +//sys shmdt(addr uintptr) (err error) = SYS_SHMDT +//sys shmget(key int, size int, flag int) (id int, err error) = SYS_SHMGET //sys Access(path string, mode uint32) (err error) = SYS___ACCESS_A //sys Chdir(path string) (err error) = SYS___CHDIR_A @@ -220,14 +489,31 @@ func (cmsg *Cmsghdr) SetLen(length int) { //sys Creat(path string, mode uint32) (fd int, err error) = SYS___CREAT_A //sys Dup(oldfd int) (fd int, err error) //sys Dup2(oldfd int, newfd int) (err error) +//sys Dup3(oldfd int, newfd int, flags int) (err error) = SYS_DUP3 +//sys Dirfd(dirp uintptr) (fd int, err error) = SYS_DIRFD +//sys EpollCreate(size int) (fd int, err error) = SYS_EPOLL_CREATE +//sys EpollCreate1(flags int) (fd int, err error) = SYS_EPOLL_CREATE1 +//sys EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) = SYS_EPOLL_CTL +//sys EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) = SYS_EPOLL_PWAIT +//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_WAIT //sys Errno2() (er2 int) = SYS___ERRNO2 -//sys Err2ad() (eadd *int) = SYS___ERR2AD +//sys Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD //sys Exit(code int) +//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) = SYS___FACCESSAT_A + +func Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) { + return Faccessat(dirfd, path, mode, flags) +} + //sys Fchdir(fd int) (err error) //sys Fchmod(fd int, mode uint32) (err error) +//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) = SYS___FCHMODAT_A //sys Fchown(fd int, uid int, gid int) (err error) +//sys Fchownat(fd int, path string, uid int, gid int, flags int) (err error) = SYS___FCHOWNAT_A //sys FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) = SYS_FCNTL +//sys Fdatasync(fd int) (err error) = SYS_FDATASYNC //sys fstat(fd int, stat *Stat_LE_t) (err error) +//sys fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) = SYS___FSTATAT_A func Fstat(fd int, stat *Stat_t) (err error) { var statLE Stat_LE_t @@ -236,28 +522,208 @@ func Fstat(fd int, stat *Stat_t) (err error) { return } +func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { + var statLE Stat_LE_t + err = fstatat(dirfd, path, &statLE, flags) + copyStat(stat, &statLE) + return +} + +func impl_Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest))) + sz = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_GetxattrAddr() *(func(path string, attr string, dest []byte) (sz int, err error)) + +var Getxattr = enter_Getxattr + +func enter_Getxattr(path string, attr string, dest []byte) (sz int, err error) { + funcref := get_GetxattrAddr() + if validGetxattr() { + *funcref = impl_Getxattr + } else { + *funcref = error_Getxattr + } + return (*funcref)(path, attr, dest) +} + +func error_Getxattr(path string, attr string, dest []byte) (sz int, err error) { + return -1, ENOSYS +} + +func validGetxattr() bool { + if funcptrtest(GetZosLibVec()+SYS___GETXATTR_A<<4, "") == 0 { + if name, err := getLeFuncName(GetZosLibVec() + SYS___GETXATTR_A<<4); err == nil { + return name == "__getxattr_a" + } + } + return false +} + +//sys Lgetxattr(link string, attr string, dest []byte) (sz int, err error) = SYS___LGETXATTR_A +//sys Lsetxattr(path string, attr string, data []byte, flags int) (err error) = SYS___LSETXATTR_A + +func impl_Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags)) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_SetxattrAddr() *(func(path string, attr string, data []byte, flags int) (err error)) + +var Setxattr = enter_Setxattr + +func enter_Setxattr(path string, attr string, data []byte, flags int) (err error) { + funcref := get_SetxattrAddr() + if validSetxattr() { + *funcref = impl_Setxattr + } else { + *funcref = error_Setxattr + } + return (*funcref)(path, attr, data, flags) +} + +func error_Setxattr(path string, attr string, data []byte, flags int) (err error) { + return ENOSYS +} + +func validSetxattr() bool { + if funcptrtest(GetZosLibVec()+SYS___SETXATTR_A<<4, "") == 0 { + if name, err := getLeFuncName(GetZosLibVec() + SYS___SETXATTR_A<<4); err == nil { + return name == "__setxattr_a" + } + } + return false +} + +//sys Fstatfs(fd int, buf *Statfs_t) (err error) = SYS_FSTATFS //sys Fstatvfs(fd int, stat *Statvfs_t) (err error) = SYS_FSTATVFS //sys Fsync(fd int) (err error) +//sys Futimes(fd int, tv []Timeval) (err error) = SYS_FUTIMES +//sys Futimesat(dirfd int, path string, tv []Timeval) (err error) = SYS___FUTIMESAT_A //sys Ftruncate(fd int, length int64) (err error) -//sys Getpagesize() (pgsize int) = SYS_GETPAGESIZE +//sys Getrandom(buf []byte, flags int) (n int, err error) = SYS_GETRANDOM +//sys InotifyInit() (fd int, err error) = SYS_INOTIFY_INIT +//sys InotifyInit1(flags int) (fd int, err error) = SYS_INOTIFY_INIT1 +//sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) = SYS___INOTIFY_ADD_WATCH_A +//sys InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) = SYS_INOTIFY_RM_WATCH +//sys Listxattr(path string, dest []byte) (sz int, err error) = SYS___LISTXATTR_A +//sys Llistxattr(path string, dest []byte) (sz int, err error) = SYS___LLISTXATTR_A +//sys Lremovexattr(path string, attr string) (err error) = SYS___LREMOVEXATTR_A +//sys Lutimes(path string, tv []Timeval) (err error) = SYS___LUTIMES_A //sys Mprotect(b []byte, prot int) (err error) = SYS_MPROTECT //sys Msync(b []byte, flags int) (err error) = SYS_MSYNC +//sys Console2(cmsg *ConsMsg2, modstr *byte, concmd *uint32) (err error) = SYS___CONSOLE2 + +// Pipe2 begin + +//go:nosplit +func getPipe2Addr() *(func([]int, int) error) + +var Pipe2 = pipe2Enter + +func pipe2Enter(p []int, flags int) (err error) { + if funcptrtest(GetZosLibVec()+SYS_PIPE2<<4, "") == 0 { + *getPipe2Addr() = pipe2Impl + } else { + *getPipe2Addr() = pipe2Error + } + return (*getPipe2Addr())(p, flags) +} + +func pipe2Impl(p []int, flags int) (err error) { + var pp [2]_C_int + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PIPE2<<4, uintptr(unsafe.Pointer(&pp[0])), uintptr(flags)) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } else { + p[0] = int(pp[0]) + p[1] = int(pp[1]) + } + return +} +func pipe2Error(p []int, flags int) (err error) { + return fmt.Errorf("Pipe2 is not available on this system") +} + +// Pipe2 end + //sys Poll(fds []PollFd, timeout int) (n int, err error) = SYS_POLL + +func Readdir(dir uintptr) (dirent *Dirent, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READDIR_A<<4, uintptr(dir)) + runtime.ExitSyscall() + dirent = (*Dirent)(unsafe.Pointer(r0)) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//sys Readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) = SYS___READDIR_R_A +//sys Statfs(path string, buf *Statfs_t) (err error) = SYS___STATFS_A +//sys Syncfs(fd int) (err error) = SYS_SYNCFS //sys Times(tms *Tms) (ticks uintptr, err error) = SYS_TIMES //sys W_Getmntent(buff *byte, size int) (lastsys int, err error) = SYS_W_GETMNTENT //sys W_Getmntent_A(buff *byte, size int) (lastsys int, err error) = SYS___W_GETMNTENT_A //sys mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) = SYS___MOUNT_A -//sys unmount(filesystem string, mtm int) (err error) = SYS___UMOUNT_A +//sys unmount_LE(filesystem string, mtm int) (err error) = SYS___UMOUNT_A //sys Chroot(path string) (err error) = SYS___CHROOT_A //sys Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) = SYS_SELECT -//sysnb Uname(buf *Utsname) (err error) = SYS___UNAME_A +//sysnb Uname(buf *Utsname) (err error) = SYS_____OSNAME_A +//sys Unshare(flags int) (err error) = SYS_UNSHARE func Ptsname(fd int) (name string, err error) { - r0, _, e1 := syscall_syscall(SYS___PTSNAME_A, uintptr(fd), 0, 0) - name = u2s(unsafe.Pointer(r0)) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___PTSNAME_A<<4, uintptr(fd)) + runtime.ExitSyscall() + if r0 == 0 { + err = errnoErr2(e1, e2) + } else { + name = u2s(unsafe.Pointer(r0)) } return } @@ -272,13 +738,19 @@ func u2s(cstr unsafe.Pointer) string { } func Close(fd int) (err error) { - _, _, e1 := syscall_syscall(SYS_CLOSE, uintptr(fd), 0, 0) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSE<<4, uintptr(fd)) + runtime.ExitSyscall() for i := 0; e1 == EAGAIN && i < 10; i++ { - _, _, _ = syscall_syscall(SYS_USLEEP, uintptr(10), 0, 0) - _, _, e1 = syscall_syscall(SYS_CLOSE, uintptr(fd), 0, 0) + runtime.EnterSyscall() + CallLeFuncWithErr(GetZosLibVec()+SYS_USLEEP<<4, uintptr(10)) + runtime.ExitSyscall() + runtime.EnterSyscall() + r0, e2, e1 = CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSE<<4, uintptr(fd)) + runtime.ExitSyscall() } - if e1 != 0 { - err = errnoErr(e1) + if r0 != 0 { + err = errnoErr2(e1, e2) } return } @@ -288,9 +760,15 @@ func Madvise(b []byte, advice int) (err error) { return } +func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + return mapper.Mmap(fd, offset, length, prot, flags) +} + +func Munmap(b []byte) (err error) { + return mapper.Munmap(b) +} + //sys Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A -//sysnb Getegid() (egid int) -//sysnb Geteuid() (uid int) //sysnb Getgid() (gid int) //sysnb Getpid() (pid int) //sysnb Getpgid(pid int) (pgid int, err error) = SYS_GETPGID @@ -317,11 +795,14 @@ func Getrusage(who int, rusage *Rusage) (err error) { return } +//sys Getegid() (egid int) = SYS_GETEGID +//sys Geteuid() (euid int) = SYS_GETEUID //sysnb Getsid(pid int) (sid int, err error) = SYS_GETSID //sysnb Getuid() (uid int) //sysnb Kill(pid int, sig Signal) (err error) //sys Lchown(path string, uid int, gid int) (err error) = SYS___LCHOWN_A //sys Link(path string, link string) (err error) = SYS___LINK_A +//sys Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) = SYS___LINKAT_A //sys Listen(s int, n int) (err error) //sys lstat(path string, stat *Stat_LE_t) (err error) = SYS___LSTAT_A @@ -332,15 +813,150 @@ func Lstat(path string, stat *Stat_t) (err error) { return } +// for checking symlinks begins with $VERSION/ $SYSNAME/ $SYSSYMR/ $SYSSYMA/ +func isSpecialPath(path []byte) (v bool) { + var special = [4][8]byte{ + [8]byte{'V', 'E', 'R', 'S', 'I', 'O', 'N', '/'}, + [8]byte{'S', 'Y', 'S', 'N', 'A', 'M', 'E', '/'}, + [8]byte{'S', 'Y', 'S', 'S', 'Y', 'M', 'R', '/'}, + [8]byte{'S', 'Y', 'S', 'S', 'Y', 'M', 'A', '/'}} + + var i, j int + for i = 0; i < len(special); i++ { + for j = 0; j < len(special[i]); j++ { + if path[j] != special[i][j] { + break + } + } + if j == len(special[i]) { + return true + } + } + return false +} + +func realpath(srcpath string, abspath []byte) (pathlen int, errno int) { + var source [1024]byte + copy(source[:], srcpath) + source[len(srcpath)] = 0 + ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___REALPATH_A<<4, //__realpath_a() + []uintptr{uintptr(unsafe.Pointer(&source[0])), + uintptr(unsafe.Pointer(&abspath[0]))}) + if ret != 0 { + index := bytes.IndexByte(abspath[:], byte(0)) + if index != -1 { + return index, 0 + } + } else { + errptr := (*int)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, []uintptr{}))) //__errno() + return 0, *errptr + } + return 0, 245 // EBADDATA 245 +} + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + n = int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___READLINK_A<<4, + []uintptr{uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))})) + runtime.KeepAlive(unsafe.Pointer(_p0)) + if n == -1 { + value := *(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, []uintptr{}))) + err = errnoErr(Errno(value)) + } else { + if buf[0] == '$' { + if isSpecialPath(buf[1:9]) { + cnt, err1 := realpath(path, buf) + if err1 == 0 { + n = cnt + } + } + } + } + return +} + +func impl_Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READLINKAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + runtime.ExitSyscall() + n = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + return n, err + } else { + if buf[0] == '$' { + if isSpecialPath(buf[1:9]) { + cnt, err1 := realpath(path, buf) + if err1 == 0 { + n = cnt + } + } + } + } + return +} + +//go:nosplit +func get_ReadlinkatAddr() *(func(dirfd int, path string, buf []byte) (n int, err error)) + +var Readlinkat = enter_Readlinkat + +func enter_Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + funcref := get_ReadlinkatAddr() + if funcptrtest(GetZosLibVec()+SYS___READLINKAT_A<<4, "") == 0 { + *funcref = impl_Readlinkat + } else { + *funcref = error_Readlinkat + } + return (*funcref)(dirfd, path, buf) +} + +func error_Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + n = -1 + err = ENOSYS + return +} + //sys Mkdir(path string, mode uint32) (err error) = SYS___MKDIR_A +//sys Mkdirat(dirfd int, path string, mode uint32) (err error) = SYS___MKDIRAT_A //sys Mkfifo(path string, mode uint32) (err error) = SYS___MKFIFO_A //sys Mknod(path string, mode uint32, dev int) (err error) = SYS___MKNOD_A +//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) = SYS___MKNODAT_A +//sys PivotRoot(newroot string, oldroot string) (err error) = SYS___PIVOT_ROOT_A //sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) -//sys Readlink(path string, buf []byte) (n int, err error) = SYS___READLINK_A +//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) = SYS___PRCTL_A +//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT //sys Rename(from string, to string) (err error) = SYS___RENAME_A +//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) = SYS___RENAMEAT_A +//sys Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) = SYS___RENAMEAT2_A //sys Rmdir(path string) (err error) = SYS___RMDIR_A //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK +//sys Setegid(egid int) (err error) = SYS_SETEGID +//sys Seteuid(euid int) (err error) = SYS_SETEUID +//sys Sethostname(p []byte) (err error) = SYS___SETHOSTNAME_A +//sys Setns(fd int, nstype int) (err error) = SYS_SETNS //sys Setpriority(which int, who int, prio int) (err error) //sysnb Setpgid(pid int, pgid int) (err error) = SYS_SETPGID //sysnb Setrlimit(resource int, lim *Rlimit) (err error) @@ -360,32 +976,57 @@ func Stat(path string, sta *Stat_t) (err error) { } //sys Symlink(path string, link string) (err error) = SYS___SYMLINK_A +//sys Symlinkat(oldPath string, dirfd int, newPath string) (err error) = SYS___SYMLINKAT_A //sys Sync() = SYS_SYNC //sys Truncate(path string, length int64) (err error) = SYS___TRUNCATE_A //sys Tcgetattr(fildes int, termptr *Termios) (err error) = SYS_TCGETATTR //sys Tcsetattr(fildes int, when int, termptr *Termios) (err error) = SYS_TCSETATTR //sys Umask(mask int) (oldmask int) //sys Unlink(path string) (err error) = SYS___UNLINK_A +//sys Unlinkat(dirfd int, path string, flags int) (err error) = SYS___UNLINKAT_A //sys Utime(path string, utim *Utimbuf) (err error) = SYS___UTIME_A //sys open(path string, mode int, perm uint32) (fd int, err error) = SYS___OPEN_A func Open(path string, mode int, perm uint32) (fd int, err error) { + if mode&O_ACCMODE == 0 { + mode |= O_RDONLY + } return open(path, mode, perm) } -func Mkfifoat(dirfd int, path string, mode uint32) (err error) { - wd, err := Getwd() - if err != nil { - return err +//sys openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) = SYS___OPENAT_A + +func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + if flags&O_ACCMODE == 0 { + flags |= O_RDONLY } + return openat(dirfd, path, flags, mode) +} - if err := Fchdir(dirfd); err != nil { - return err +//sys openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) = SYS___OPENAT2_A + +func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) { + if how.Flags&O_ACCMODE == 0 { + how.Flags |= O_RDONLY } - defer Chdir(wd) + return openat2(dirfd, path, how, SizeofOpenHow) +} - return Mkfifo(path, mode) +func ZosFdToPath(dirfd int) (path string, err error) { + var buffer [1024]byte + runtime.EnterSyscall() + ret, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_W_IOCTL<<4, uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))) + runtime.ExitSyscall() + if ret == 0 { + zb := bytes.IndexByte(buffer[:], 0) + if zb == -1 { + zb = len(buffer) + } + CallLeFuncWithErr(GetZosLibVec()+SYS___E2A_L<<4, uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)) + return string(buffer[:zb]), nil + } + return "", errnoErr2(e1, e2) } //sys remove(path string) (err error) @@ -403,10 +1044,12 @@ func Getcwd(buf []byte) (n int, err error) { } else { p = unsafe.Pointer(&_zero) } - _, _, e := syscall_syscall(SYS___GETCWD_A, uintptr(p), uintptr(len(buf)), 0) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___GETCWD_A<<4, uintptr(p), uintptr(len(buf))) + runtime.ExitSyscall() n = clen(buf) + 1 - if e != 0 { - err = errnoErr(e) + if r0 == 0 { + err = errnoErr2(e1, e2) } return } @@ -520,9 +1163,41 @@ func (w WaitStatus) StopSignal() Signal { func (w WaitStatus) TrapCause() int { return -1 } +//sys waitid(idType int, id int, info *Siginfo, options int) (err error) + +func Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error) { + return waitid(idType, id, info, options) +} + //sys waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) -func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { +func impl_Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAIT4<<4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage))) + runtime.ExitSyscall() + wpid = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_Wait4Addr() *(func(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error)) + +var Wait4 = enter_Wait4 + +func enter_Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { + funcref := get_Wait4Addr() + if funcptrtest(GetZosLibVec()+SYS_WAIT4<<4, "") == 0 { + *funcref = impl_Wait4 + } else { + *funcref = legacyWait4 + } + return (*funcref)(pid, wstatus, options, rusage) +} + +func legacyWait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { // TODO(mundaym): z/OS doesn't have wait4. I don't think getrusage does what we want. // At the moment rusage will not be touched. var status _C_int @@ -571,23 +1246,62 @@ func Pipe(p []int) (err error) { } var pp [2]_C_int err = pipe(&pp) - if err == nil { - p[0] = int(pp[0]) - p[1] = int(pp[1]) - } + p[0] = int(pp[0]) + p[1] = int(pp[1]) return } //sys utimes(path string, timeval *[2]Timeval) (err error) = SYS___UTIMES_A func Utimes(path string, tv []Timeval) (err error) { + if tv == nil { + return utimes(path, nil) + } if len(tv) != 2 { return EINVAL } return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } -func UtimesNano(path string, ts []Timespec) error { +//sys utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) = SYS___UTIMENSAT_A + +func validUtimensat() bool { + if funcptrtest(GetZosLibVec()+SYS___UTIMENSAT_A<<4, "") == 0 { + if name, err := getLeFuncName(GetZosLibVec() + SYS___UTIMENSAT_A<<4); err == nil { + return name == "__utimensat_a" + } + } + return false +} + +// Begin UtimesNano + +//go:nosplit +func get_UtimesNanoAddr() *(func(path string, ts []Timespec) (err error)) + +var UtimesNano = enter_UtimesNano + +func enter_UtimesNano(path string, ts []Timespec) (err error) { + funcref := get_UtimesNanoAddr() + if validUtimensat() { + *funcref = utimesNanoImpl + } else { + *funcref = legacyUtimesNano + } + return (*funcref)(path, ts) +} + +func utimesNanoImpl(path string, ts []Timespec) (err error) { + if ts == nil { + return utimensat(AT_FDCWD, path, nil, 0) + } + if len(ts) != 2 { + return EINVAL + } + return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) +} + +func legacyUtimesNano(path string, ts []Timespec) (err error) { if len(ts) != 2 { return EINVAL } @@ -600,6 +1314,70 @@ func UtimesNano(path string, ts []Timespec) error { return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } +// End UtimesNano + +// Begin UtimesNanoAt + +//go:nosplit +func get_UtimesNanoAtAddr() *(func(dirfd int, path string, ts []Timespec, flags int) (err error)) + +var UtimesNanoAt = enter_UtimesNanoAt + +func enter_UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) (err error) { + funcref := get_UtimesNanoAtAddr() + if validUtimensat() { + *funcref = utimesNanoAtImpl + } else { + *funcref = legacyUtimesNanoAt + } + return (*funcref)(dirfd, path, ts, flags) +} + +func utimesNanoAtImpl(dirfd int, path string, ts []Timespec, flags int) (err error) { + if ts == nil { + return utimensat(dirfd, path, nil, flags) + } + if len(ts) != 2 { + return EINVAL + } + return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags) +} + +func legacyUtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) (err error) { + if path[0] != '/' { + dirPath, err := ZosFdToPath(dirfd) + if err != nil { + return err + } + path = dirPath + "/" + path + } + if flags == AT_SYMLINK_NOFOLLOW { + if len(ts) != 2 { + return EINVAL + } + + if ts[0].Nsec >= 5e8 { + ts[0].Sec++ + } + ts[0].Nsec = 0 + if ts[1].Nsec >= 5e8 { + ts[1].Sec++ + } + ts[1].Nsec = 0 + + // Not as efficient as it could be because Timespec and + // Timeval have different types in the different OSes + tv := []Timeval{ + NsecToTimeval(TimespecToNsec(ts[0])), + NsecToTimeval(TimespecToNsec(ts[1])), + } + return Lutimes(path, tv) + } + return UtimesNano(path, ts) +} + +// End UtimesNanoAt + func Getsockname(fd int) (sa Sockaddr, err error) { var rsa RawSockaddrAny var len _Socklen = SizeofSockaddrAny @@ -1186,67 +1964,46 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) return n, nil } -func Opendir(name string) (uintptr, error) { - p, err := BytePtrFromString(name) - if err != nil { - return 0, err - } - dir, _, e := syscall_syscall(SYS___OPENDIR_A, uintptr(unsafe.Pointer(p)), 0, 0) - runtime.KeepAlive(unsafe.Pointer(p)) - if e != 0 { - err = errnoErr(e) - } - return dir, err -} - -// clearsyscall.Errno resets the errno value to 0. -func clearErrno() - -func Readdir(dir uintptr) (*Dirent, error) { - var ent Dirent - var res uintptr - // __readdir_r_a returns errno at the end of the directory stream, rather than 0. - // Therefore to avoid false positives we clear errno before calling it. - - // TODO(neeilan): Commented this out to get sys/unix compiling on z/OS. Uncomment and fix. Error: "undefined: clearsyscall" - //clearsyscall.Errno() // TODO(mundaym): check pre-emption rules. - - e, _, _ := syscall_syscall(SYS___READDIR_R_A, dir, uintptr(unsafe.Pointer(&ent)), uintptr(unsafe.Pointer(&res))) - var err error - if e != 0 { - err = errnoErr(Errno(e)) - } - if res == 0 { - return nil, err - } - return &ent, err -} - -func readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) { - r0, _, e1 := syscall_syscall(SYS___READDIR_R_A, dirp, uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) - if int64(r0) == -1 { - err = errnoErr(Errno(e1)) +func Opendir(name string) (uintptr, error) { + p, err := BytePtrFromString(name) + if err != nil { + return 0, err } - return + err = nil + runtime.EnterSyscall() + dir, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___OPENDIR_A<<4, uintptr(unsafe.Pointer(p))) + runtime.ExitSyscall() + runtime.KeepAlive(unsafe.Pointer(p)) + if dir == 0 { + err = errnoErr2(e1, e2) + } + return dir, err } +// clearsyscall.Errno resets the errno value to 0. +func clearErrno() + func Closedir(dir uintptr) error { - _, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0) - if e != 0 { - return errnoErr(e) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSEDIR<<4, dir) + runtime.ExitSyscall() + if r0 != 0 { + return errnoErr2(e1, e2) } return nil } func Seekdir(dir uintptr, pos int) { - _, _, _ = syscall_syscall(SYS_SEEKDIR, dir, uintptr(pos), 0) + runtime.EnterSyscall() + CallLeFuncWithErr(GetZosLibVec()+SYS_SEEKDIR<<4, dir, uintptr(pos)) + runtime.ExitSyscall() } func Telldir(dir uintptr) (int, error) { - p, _, e := syscall_syscall(SYS_TELLDIR, dir, 0, 0) + p, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TELLDIR<<4, dir) pos := int(p) - if pos == -1 { - return pos, errnoErr(e) + if int64(p) == -1 { + return pos, errnoErr2(e1, e2) } return pos, nil } @@ -1261,19 +2018,55 @@ func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { *(*int64)(unsafe.Pointer(&flock[4])) = lk.Start *(*int64)(unsafe.Pointer(&flock[12])) = lk.Len *(*int32)(unsafe.Pointer(&flock[20])) = lk.Pid - _, _, errno := syscall_syscall(SYS_FCNTL, fd, uintptr(cmd), uintptr(unsafe.Pointer(&flock))) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, fd, uintptr(cmd), uintptr(unsafe.Pointer(&flock))) + runtime.ExitSyscall() lk.Type = *(*int16)(unsafe.Pointer(&flock[0])) lk.Whence = *(*int16)(unsafe.Pointer(&flock[2])) lk.Start = *(*int64)(unsafe.Pointer(&flock[4])) lk.Len = *(*int64)(unsafe.Pointer(&flock[12])) lk.Pid = *(*int32)(unsafe.Pointer(&flock[20])) - if errno == 0 { + if r0 == 0 { return nil } - return errno + return errnoErr2(e1, e2) +} + +func impl_Flock(fd int, how int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FLOCK<<4, uintptr(fd), uintptr(how)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_FlockAddr() *(func(fd int, how int) (err error)) + +var Flock = enter_Flock + +func validFlock(fp uintptr) bool { + if funcptrtest(GetZosLibVec()+SYS_FLOCK<<4, "") == 0 { + if name, err := getLeFuncName(GetZosLibVec() + SYS_FLOCK<<4); err == nil { + return name == "flock" + } + } + return false +} + +func enter_Flock(fd int, how int) (err error) { + funcref := get_FlockAddr() + if validFlock(GetZosLibVec() + SYS_FLOCK<<4) { + *funcref = impl_Flock + } else { + *funcref = legacyFlock + } + return (*funcref)(fd, how) } -func Flock(fd int, how int) error { +func legacyFlock(fd int, how int) error { var flock_type int16 var fcntl_cmd int @@ -1307,41 +2100,51 @@ func Flock(fd int, how int) error { } func Mlock(b []byte) (err error) { - _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP) + runtime.ExitSyscall() + if r0 != 0 { + err = errnoErr2(e1, e2) } return } func Mlock2(b []byte, flags int) (err error) { - _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP) + runtime.ExitSyscall() + if r0 != 0 { + err = errnoErr2(e1, e2) } return } func Mlockall(flags int) (err error) { - _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP) + runtime.ExitSyscall() + if r0 != 0 { + err = errnoErr2(e1, e2) } return } func Munlock(b []byte) (err error) { - _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_SWAP, 0, 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_SWAP) + runtime.ExitSyscall() + if r0 != 0 { + err = errnoErr2(e1, e2) } return } func Munlockall() (err error) { - _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_SWAP, 0, 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_SWAP) + runtime.ExitSyscall() + if r0 != 0 { + err = errnoErr2(e1, e2) } return } @@ -1372,15 +2175,104 @@ func ClockGettime(clockid int32, ts *Timespec) error { return nil } -func Statfs(path string, stat *Statfs_t) (err error) { - fd, err := open(path, O_RDONLY, 0) - defer Close(fd) - if err != nil { - return err +// Chtag + +//go:nosplit +func get_ChtagAddr() *(func(path string, ccsid uint64, textbit uint64) error) + +var Chtag = enter_Chtag + +func enter_Chtag(path string, ccsid uint64, textbit uint64) error { + funcref := get_ChtagAddr() + if validSetxattr() { + *funcref = impl_Chtag + } else { + *funcref = legacy_Chtag + } + return (*funcref)(path, ccsid, textbit) +} + +func legacy_Chtag(path string, ccsid uint64, textbit uint64) error { + tag := ccsid<<16 | textbit<<15 + var tag_buff [8]byte + DecodeData(tag_buff[:], 8, tag) + return Setxattr(path, "filetag", tag_buff[:], XATTR_REPLACE) +} + +func impl_Chtag(path string, ccsid uint64, textbit uint64) error { + tag := ccsid<<16 | textbit<<15 + var tag_buff [4]byte + DecodeData(tag_buff[:], 4, tag) + return Setxattr(path, "system.filetag", tag_buff[:], XATTR_REPLACE) +} + +// End of Chtag + +// Nanosleep + +//go:nosplit +func get_NanosleepAddr() *(func(time *Timespec, leftover *Timespec) error) + +var Nanosleep = enter_Nanosleep + +func enter_Nanosleep(time *Timespec, leftover *Timespec) error { + funcref := get_NanosleepAddr() + if funcptrtest(GetZosLibVec()+SYS_NANOSLEEP<<4, "") == 0 { + *funcref = impl_Nanosleep + } else { + *funcref = legacyNanosleep + } + return (*funcref)(time, leftover) +} + +func impl_Nanosleep(time *Timespec, leftover *Timespec) error { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_NANOSLEEP<<4, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover))) + runtime.ExitSyscall() + if int64(r0) == -1 { + return errnoErr2(e1, e2) + } + return nil +} + +func legacyNanosleep(time *Timespec, leftover *Timespec) error { + t0 := runtime.Nanotime1() + var secrem uint32 + var nsecrem uint32 + total := time.Sec*1000000000 + time.Nsec + elapsed := runtime.Nanotime1() - t0 + var rv int32 + var rc int32 + var err error + // repeatedly sleep for 1 second until less than 1 second left + for total-elapsed > 1000000000 { + rv, rc, _ = BpxCondTimedWait(uint32(1), uint32(0), uint32(CW_CONDVAR), &secrem, &nsecrem) + if rv != 0 && rc != 112 { // 112 is EAGAIN + if leftover != nil && rc == 120 { // 120 is EINTR + leftover.Sec = int64(secrem) + leftover.Nsec = int64(nsecrem) + } + err = Errno(rc) + return err + } + elapsed = runtime.Nanotime1() - t0 } - return Fstatfs(fd, stat) + // sleep the remainder + if total > elapsed { + rv, rc, _ = BpxCondTimedWait(uint32(0), uint32(total-elapsed), uint32(CW_CONDVAR), &secrem, &nsecrem) + } + if leftover != nil && rc == 120 { + leftover.Sec = int64(secrem) + leftover.Nsec = int64(nsecrem) + } + if rv != 0 && rc != 112 { + err = Errno(rc) + } + return err } +// End of Nanosleep + var ( Stdin = 0 Stdout = 1 @@ -1395,6 +2287,9 @@ var ( errENOENT error = syscall.ENOENT ) +var ZosTraceLevel int +var ZosTracefile *os.File + var ( signalNameMapOnce sync.Once signalNameMap map[string]syscall.Signal @@ -1416,6 +2311,56 @@ func errnoErr(e Errno) error { return e } +var reg *regexp.Regexp + +// enhanced with zos specific errno2 +func errnoErr2(e Errno, e2 uintptr) error { + switch e { + case 0: + return nil + case EAGAIN: + return errEAGAIN + /* + Allow the retrieval of errno2 for EINVAL and ENOENT on zos + case EINVAL: + return errEINVAL + case ENOENT: + return errENOENT + */ + } + if ZosTraceLevel > 0 { + var name string + if reg == nil { + reg = regexp.MustCompile("(^unix\\.[^/]+$|.*\\/unix\\.[^/]+$)") + } + i := 1 + pc, file, line, ok := runtime.Caller(i) + if ok { + name = runtime.FuncForPC(pc).Name() + } + for ok && reg.MatchString(runtime.FuncForPC(pc).Name()) { + i += 1 + pc, file, line, ok = runtime.Caller(i) + } + if ok { + if ZosTracefile == nil { + ZosConsolePrintf("From %s:%d\n", file, line) + ZosConsolePrintf("%s: %s (errno2=0x%x)\n", name, e.Error(), e2) + } else { + fmt.Fprintf(ZosTracefile, "From %s:%d\n", file, line) + fmt.Fprintf(ZosTracefile, "%s: %s (errno2=0x%x)\n", name, e.Error(), e2) + } + } else { + if ZosTracefile == nil { + ZosConsolePrintf("%s (errno2=0x%x)\n", e.Error(), e2) + } else { + fmt.Fprintf(ZosTracefile, "%s (errno2=0x%x)\n", e.Error(), e2) + } + } + } + return e +} + // ErrnoName returns the error name for error number e. func ErrnoName(e Errno) string { i := sort.Search(len(errorList), func(i int) bool { @@ -1474,6 +2419,9 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d return nil, EINVAL } + // Set __MAP_64 by default + flags |= __MAP_64 + // Map the requested memory. addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset) if errno != nil { @@ -1778,83 +2726,170 @@ func Exec(argv0 string, argv []string, envv []string) error { return syscall.Exec(argv0, argv, envv) } -func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { +func Getag(path string) (ccsid uint16, flag uint16, err error) { + var val [8]byte + sz, err := Getxattr(path, "ccsid", val[:]) + if err != nil { + return + } + ccsid = uint16(EncodeData(val[0:sz])) + sz, err = Getxattr(path, "flags", val[:]) + if err != nil { + return + } + flag = uint16(EncodeData(val[0:sz]) >> 15) + return +} + +// Mount begin +func impl_Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + var _p3 *byte + _p3, err = BytePtrFromString(data) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MOUNT1_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(_p3))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_MountAddr() *(func(source string, target string, fstype string, flags uintptr, data string) (err error)) + +var Mount = enter_Mount + +func enter_Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { + funcref := get_MountAddr() + if validMount() { + *funcref = impl_Mount + } else { + *funcref = legacyMount + } + return (*funcref)(source, target, fstype, flags, data) +} + +func legacyMount(source string, target string, fstype string, flags uintptr, data string) (err error) { if needspace := 8 - len(fstype); needspace <= 0 { - fstype = fstype[:8] + fstype = fstype[0:8] } else { - fstype += " "[:needspace] + fstype += " "[0:needspace] } return mount_LE(target, source, fstype, uint32(flags), int32(len(data)), data) } -func Unmount(name string, mtm int) (err error) { +func validMount() bool { + if funcptrtest(GetZosLibVec()+SYS___MOUNT1_A<<4, "") == 0 { + if name, err := getLeFuncName(GetZosLibVec() + SYS___MOUNT1_A<<4); err == nil { + return name == "__mount1_a" + } + } + return false +} + +// Mount end + +// Unmount begin +func impl_Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UMOUNT2_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_UnmountAddr() *(func(target string, flags int) (err error)) + +var Unmount = enter_Unmount + +func enter_Unmount(target string, flags int) (err error) { + funcref := get_UnmountAddr() + if funcptrtest(GetZosLibVec()+SYS___UMOUNT2_A<<4, "") == 0 { + *funcref = impl_Unmount + } else { + *funcref = legacyUnmount + } + return (*funcref)(target, flags) +} + +func legacyUnmount(name string, mtm int) (err error) { // mountpoint is always a full path and starts with a '/' // check if input string is not a mountpoint but a filesystem name if name[0] != '/' { - return unmount(name, mtm) + return unmount_LE(name, mtm) } // treat name as mountpoint b2s := func(arr []byte) string { - nulli := bytes.IndexByte(arr, 0) - if nulli == -1 { - return string(arr) - } else { - return string(arr[:nulli]) + var str string + for i := 0; i < len(arr); i++ { + if arr[i] == 0 { + str = string(arr[:i]) + break + } } + return str } var buffer struct { header W_Mnth fsinfo [64]W_Mntent } - fsCount, err := W_Getmntent_A((*byte)(unsafe.Pointer(&buffer)), int(unsafe.Sizeof(buffer))) - if err != nil { - return err - } - if fsCount == 0 { - return EINVAL - } - for i := 0; i < fsCount; i++ { - if b2s(buffer.fsinfo[i].Mountpoint[:]) == name { - err = unmount(b2s(buffer.fsinfo[i].Fsname[:]), mtm) - break + fs_count, err := W_Getmntent_A((*byte)(unsafe.Pointer(&buffer)), int(unsafe.Sizeof(buffer))) + if err == nil { + err = EINVAL + for i := 0; i < fs_count; i++ { + if b2s(buffer.fsinfo[i].Mountpoint[:]) == name { + err = unmount_LE(b2s(buffer.fsinfo[i].Fsname[:]), mtm) + break + } } + } else if fs_count == 0 { + err = EINVAL } return err } -func fdToPath(dirfd int) (path string, err error) { - var buffer [1024]byte - // w_ctrl() - ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_W_IOCTL<<4, - []uintptr{uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))}) - if ret == 0 { - zb := bytes.IndexByte(buffer[:], 0) - if zb == -1 { - zb = len(buffer) - } - // __e2a_l() - runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, - []uintptr{uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)}) - return string(buffer[:zb]), nil - } - // __errno() - errno := int(*(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, - []uintptr{})))) - // __errno2() - errno2 := int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO2<<4, - []uintptr{})) - // strerror_r() - ret = runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_STRERROR_R<<4, - []uintptr{uintptr(errno), uintptr(unsafe.Pointer(&buffer[0])), 1024}) - if ret == 0 { - zb := bytes.IndexByte(buffer[:], 0) - if zb == -1 { - zb = len(buffer) - } - return "", fmt.Errorf("%s (errno2=0x%x)", buffer[:zb], errno2) - } else { - return "", fmt.Errorf("fdToPath errno %d (errno2=0x%x)", errno, errno2) +// Unmount end + +func direntIno(buf []byte) (uint64, bool) { + return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) +} + +func direntReclen(buf []byte) (uint64, bool) { + return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) +} + +func direntNamlen(buf []byte) (uint64, bool) { + reclen, ok := direntReclen(buf) + if !ok { + return 0, false } + return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true } func direntLeToDirentUnix(dirent *direntLE, dir uintptr, path string) (Dirent, error) { @@ -1896,7 +2931,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { } // Get path from fd to avoid unavailable call (fdopendir) - path, err := fdToPath(fd) + path, err := ZosFdToPath(fd) if err != nil { return 0, err } @@ -1910,7 +2945,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { for { var entryLE direntLE var entrypLE *direntLE - e := readdir_r(d, &entryLE, &entrypLE) + e := Readdir_r(d, &entryLE, &entrypLE) if e != nil { return n, e } @@ -1956,23 +2991,127 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { return n, nil } -func ReadDirent(fd int, buf []byte) (n int, err error) { - var base = (*uintptr)(unsafe.Pointer(new(uint64))) - return Getdirentries(fd, buf, base) +func Err2ad() (eadd *int) { + r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS___ERR2AD<<4) + eadd = (*int)(unsafe.Pointer(r0)) + return } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) +func ZosConsolePrintf(format string, v ...interface{}) (int, error) { + type __cmsg struct { + _ uint16 + _ [2]uint8 + __msg_length uint32 + __msg uintptr + _ [4]uint8 + } + msg := fmt.Sprintf(format, v...) + strptr := unsafe.Pointer((*reflect.StringHeader)(unsafe.Pointer(&msg)).Data) + len := (*reflect.StringHeader)(unsafe.Pointer(&msg)).Len + cmsg := __cmsg{__msg_length: uint32(len), __msg: uintptr(strptr)} + cmd := uint32(0) + runtime.EnterSyscall() + rc, err2, err1 := CallLeFuncWithErr(GetZosLibVec()+SYS_____CONSOLE_A<<4, uintptr(unsafe.Pointer(&cmsg)), 0, uintptr(unsafe.Pointer(&cmd))) + runtime.ExitSyscall() + if rc != 0 { + return 0, fmt.Errorf("%s (errno2=0x%x)\n", err1.Error(), err2) + } + return 0, nil +} +func ZosStringToEbcdicBytes(str string, nullterm bool) (ebcdicBytes []byte) { + if nullterm { + ebcdicBytes = []byte(str + "\x00") + } else { + ebcdicBytes = []byte(str) + } + A2e(ebcdicBytes) + return +} +func ZosEbcdicBytesToString(b []byte, trimRight bool) (str string) { + res := make([]byte, len(b)) + copy(res, b) + E2a(res) + if trimRight { + str = string(bytes.TrimRight(res, " \x00")) + } else { + str = string(res) + } + return } -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) +func fdToPath(dirfd int) (path string, err error) { + var buffer [1024]byte + // w_ctrl() + ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_W_IOCTL<<4, + []uintptr{uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))}) + if ret == 0 { + zb := bytes.IndexByte(buffer[:], 0) + if zb == -1 { + zb = len(buffer) + } + // __e2a_l() + runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, + []uintptr{uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)}) + return string(buffer[:zb]), nil + } + // __errno() + errno := int(*(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, + []uintptr{})))) + // __errno2() + errno2 := int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO2<<4, + []uintptr{})) + // strerror_r() + ret = runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_STRERROR_R<<4, + []uintptr{uintptr(errno), uintptr(unsafe.Pointer(&buffer[0])), 1024}) + if ret == 0 { + zb := bytes.IndexByte(buffer[:], 0) + if zb == -1 { + zb = len(buffer) + } + return "", fmt.Errorf("%s (errno2=0x%x)", buffer[:zb], errno2) + } else { + return "", fmt.Errorf("fdToPath errno %d (errno2=0x%x)", errno, errno2) + } } -func direntNamlen(buf []byte) (uint64, bool) { - reclen, ok := direntReclen(buf) - if !ok { - return 0, false +func impl_Mkfifoat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return } - return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKFIFOAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_MkfifoatAddr() *(func(dirfd int, path string, mode uint32) (err error)) + +var Mkfifoat = enter_Mkfifoat + +func enter_Mkfifoat(dirfd int, path string, mode uint32) (err error) { + funcref := get_MkfifoatAddr() + if funcptrtest(GetZosLibVec()+SYS___MKFIFOAT_A<<4, "") == 0 { + *funcref = impl_Mkfifoat + } else { + *funcref = legacy_Mkfifoat + } + return (*funcref)(dirfd, path, mode) +} + +func legacy_Mkfifoat(dirfd int, path string, mode uint32) (err error) { + dirname, err := ZosFdToPath(dirfd) + if err != nil { + return err + } + return Mkfifo(dirname+"/"+path, mode) } + +//sys Posix_openpt(oflag int) (fd int, err error) = SYS_POSIX_OPENPT +//sys Grantpt(fildes int) (rc int, err error) = SYS_GRANTPT +//sys Unlockpt(fildes int) (rc int, err error) = SYS_UNLOCKPT diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/sysvshm_unix.go b/pkg/k8s/vendor/golang.org/x/sys/unix/sysvshm_unix.go index 79a84f18b46..672d6b0a880 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/sysvshm_unix.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/sysvshm_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (darwin && !ios) || linux +//go:build (darwin && !ios) || linux || zos package unix diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go b/pkg/k8s/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go index 9eb0db664cb..8b7977a28c0 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build darwin && !ios +//go:build (darwin && !ios) || zos package unix diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux.go index 36bf8399f4f..877a62b479a 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -491,6 +491,7 @@ const ( BPF_F_REPLACE = 0x4 BPF_F_SLEEPABLE = 0x10 BPF_F_STRICT_ALIGNMENT = 0x1 + BPF_F_TEST_REG_INVARIANTS = 0x80 BPF_F_TEST_RND_HI32 = 0x4 BPF_F_TEST_RUN_ON_CPU = 0x1 BPF_F_TEST_STATE_FREQ = 0x8 @@ -501,6 +502,7 @@ const ( BPF_IMM = 0x0 BPF_IND = 0x40 BPF_JA = 0x0 + BPF_JCOND = 0xe0 BPF_JEQ = 0x10 BPF_JGE = 0x30 BPF_JGT = 0x20 @@ -656,6 +658,9 @@ const ( CAN_NPROTO = 0x8 CAN_RAW = 0x1 CAN_RAW_FILTER_MAX = 0x200 + CAN_RAW_XL_VCID_RX_FILTER = 0x4 + CAN_RAW_XL_VCID_TX_PASS = 0x2 + CAN_RAW_XL_VCID_TX_SET = 0x1 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff @@ -1338,6 +1343,7 @@ const ( F_OFD_SETLK = 0x25 F_OFD_SETLKW = 0x26 F_OK = 0x0 + F_SEAL_EXEC = 0x20 F_SEAL_FUTURE_WRITE = 0x10 F_SEAL_GROW = 0x4 F_SEAL_SEAL = 0x1 @@ -1626,6 +1632,7 @@ const ( IP_FREEBIND = 0xf IP_HDRINCL = 0x3 IP_IPSEC_POLICY = 0x10 + IP_LOCAL_PORT_RANGE = 0x33 IP_MAXPACKET = 0xffff IP_MAX_MEMBERSHIPS = 0x14 IP_MF = 0x2000 @@ -1652,6 +1659,7 @@ const ( IP_PMTUDISC_OMIT = 0x5 IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 + IP_PROTOCOL = 0x34 IP_RECVERR = 0xb IP_RECVERR_RFC4884 = 0x1a IP_RECVFRAGSIZE = 0x19 @@ -1697,6 +1705,7 @@ const ( KEXEC_ARCH_S390 = 0x160000 KEXEC_ARCH_SH = 0x2a0000 KEXEC_ARCH_X86_64 = 0x3e0000 + KEXEC_FILE_DEBUG = 0x8 KEXEC_FILE_NO_INITRAMFS = 0x4 KEXEC_FILE_ON_CRASH = 0x2 KEXEC_FILE_UNLOAD = 0x1 @@ -1898,6 +1907,7 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MNT_ID_REQ_SIZE_VER0 = 0x18 MODULE_INIT_COMPRESSED_FILE = 0x4 MODULE_INIT_IGNORE_MODVERSIONS = 0x1 MODULE_INIT_IGNORE_VERMAGIC = 0x2 @@ -2166,7 +2176,7 @@ const ( NFT_SECMARK_CTX_MAXLEN = 0x100 NFT_SET_MAXNAMELEN = 0x100 NFT_SOCKET_MAX = 0x3 - NFT_TABLE_F_MASK = 0x3 + NFT_TABLE_F_MASK = 0x7 NFT_TABLE_MAXNAMELEN = 0x100 NFT_TRACETYPE_MAX = 0x3 NFT_TUNNEL_F_MASK = 0x7 @@ -2302,6 +2312,7 @@ const ( PERF_AUX_FLAG_PARTIAL = 0x4 PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK = 0xff00 PERF_AUX_FLAG_TRUNCATED = 0x1 + PERF_BRANCH_ENTRY_INFO_BITS_MAX = 0x21 PERF_BR_ARM64_DEBUG_DATA = 0x7 PERF_BR_ARM64_DEBUG_EXIT = 0x5 PERF_BR_ARM64_DEBUG_HALT = 0x4 @@ -2399,6 +2410,7 @@ const ( PERF_RECORD_MISC_USER = 0x2 PERF_SAMPLE_BRANCH_PLM_ALL = 0x7 PERF_SAMPLE_WEIGHT_TYPE = 0x1004000 + PID_FS_MAGIC = 0x50494446 PIPEFS_MAGIC = 0x50495045 PPPIOCGNPMODE = 0xc008744c PPPIOCNEWUNIT = 0xc004743e @@ -2892,8 +2904,9 @@ const ( RWF_APPEND = 0x10 RWF_DSYNC = 0x2 RWF_HIPRI = 0x1 + RWF_NOAPPEND = 0x20 RWF_NOWAIT = 0x8 - RWF_SUPPORTED = 0x1f + RWF_SUPPORTED = 0x3f RWF_SYNC = 0x4 RWF_WRITE_LIFE_NOT_SET = 0x0 SCHED_BATCH = 0x3 @@ -2914,7 +2927,9 @@ const ( SCHED_RESET_ON_FORK = 0x40000000 SCHED_RR = 0x2 SCM_CREDENTIALS = 0x2 + SCM_PIDFD = 0x4 SCM_RIGHTS = 0x1 + SCM_SECURITY = 0x3 SCM_TIMESTAMP = 0x1d SC_LOG_FLUSH = 0x100000 SECCOMP_ADDFD_FLAG_SEND = 0x2 @@ -3047,6 +3062,8 @@ const ( SIOCSMIIREG = 0x8949 SIOCSRARP = 0x8962 SIOCWANDEV = 0x894a + SK_DIAG_BPF_STORAGE_MAX = 0x3 + SK_DIAG_BPF_STORAGE_REQ_MAX = 0x1 SMACK_MAGIC = 0x43415d53 SMART_AUTOSAVE = 0xd2 SMART_AUTO_OFFLINE = 0xdb @@ -3067,6 +3084,8 @@ const ( SOCKFS_MAGIC = 0x534f434b SOCK_BUF_LOCK_MASK = 0x3 SOCK_DCCP = 0x6 + SOCK_DESTROY = 0x15 + SOCK_DIAG_BY_FAMILY = 0x14 SOCK_IOC_TYPE = 0x89 SOCK_PACKET = 0xa SOCK_RAW = 0x3 @@ -3168,6 +3187,7 @@ const ( STATX_GID = 0x10 STATX_INO = 0x100 STATX_MNT_ID = 0x1000 + STATX_MNT_ID_UNIQUE = 0x4000 STATX_MODE = 0x2 STATX_MTIME = 0x40 STATX_NLINK = 0x4 @@ -3255,6 +3275,7 @@ const ( TCP_MAX_WINSHIFT = 0xe TCP_MD5SIG = 0xe TCP_MD5SIG_EXT = 0x20 + TCP_MD5SIG_FLAG_IFINDEX = 0x2 TCP_MD5SIG_FLAG_PREFIX = 0x1 TCP_MD5SIG_MAXKEYLEN = 0x50 TCP_MSS = 0x200 @@ -3562,12 +3583,16 @@ const ( XDP_RX_RING = 0x2 XDP_SHARED_UMEM = 0x1 XDP_STATISTICS = 0x7 + XDP_TXMD_FLAGS_CHECKSUM = 0x2 + XDP_TXMD_FLAGS_TIMESTAMP = 0x1 + XDP_TX_METADATA = 0x2 XDP_TX_RING = 0x3 XDP_UMEM_COMPLETION_RING = 0x6 XDP_UMEM_FILL_RING = 0x5 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 XDP_UMEM_PGOFF_FILL_RING = 0x100000000 XDP_UMEM_REG = 0x4 + XDP_UMEM_TX_SW_CSUM = 0x2 XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1 XDP_USE_NEED_WAKEUP = 0x8 XDP_USE_SG = 0x10 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 42ff8c3c1b0..e4bc0bd57c7 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -118,6 +118,7 @@ const ( IXOFF = 0x1000 IXON = 0x400 MAP_32BIT = 0x40 + MAP_ABOVE4G = 0x80 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index dca436004fa..689317afdbf 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -118,6 +118,7 @@ const ( IXOFF = 0x1000 IXON = 0x400 MAP_32BIT = 0x40 + MAP_ABOVE4G = 0x80 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index d8cae6d1534..14270508b04 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -87,6 +87,7 @@ const ( FICLONE = 0x40049409 FICLONERANGE = 0x4020940d FLUSHO = 0x1000 + FPMR_MAGIC = 0x46504d52 FPSIMD_MAGIC = 0x46508001 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go index 4dfd2e051d3..da08b2ab3d9 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go @@ -10,41 +10,99 @@ package unix const ( - BRKINT = 0x0001 - CLOCK_MONOTONIC = 0x1 - CLOCK_PROCESS_CPUTIME_ID = 0x2 - CLOCK_REALTIME = 0x0 - CLOCK_THREAD_CPUTIME_ID = 0x3 - CS8 = 0x0030 - CSIZE = 0x0030 - ECHO = 0x00000008 - ECHONL = 0x00000001 - FD_CLOEXEC = 0x01 - FD_CLOFORK = 0x02 - FNDELAY = 0x04 - F_CLOSFD = 9 - F_CONTROL_CVT = 13 - F_DUPFD = 0 - F_DUPFD2 = 8 - F_GETFD = 1 - F_GETFL = 259 - F_GETLK = 5 - F_GETOWN = 10 - F_OK = 0x0 - F_RDLCK = 1 - F_SETFD = 2 - F_SETFL = 4 - F_SETLK = 6 - F_SETLKW = 7 - F_SETOWN = 11 - F_SETTAG = 12 - F_UNLCK = 3 - F_WRLCK = 2 - FSTYPE_ZFS = 0xe9 //"Z" - FSTYPE_HFS = 0xc8 //"H" - FSTYPE_NFS = 0xd5 //"N" - FSTYPE_TFS = 0xe3 //"T" - FSTYPE_AUTOMOUNT = 0xc1 //"A" + BRKINT = 0x0001 + CLOCAL = 0x1 + CLOCK_MONOTONIC = 0x1 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLONE_NEWIPC = 0x08000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x00020000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUTS = 0x04000000 + CLONE_PARENT = 0x00008000 + CS8 = 0x0030 + CSIZE = 0x0030 + ECHO = 0x00000008 + ECHONL = 0x00000001 + EFD_SEMAPHORE = 0x00002000 + EFD_CLOEXEC = 0x00001000 + EFD_NONBLOCK = 0x00000004 + EPOLL_CLOEXEC = 0x00001000 + EPOLL_CTL_ADD = 0 + EPOLL_CTL_MOD = 1 + EPOLL_CTL_DEL = 2 + EPOLLRDNORM = 0x0001 + EPOLLRDBAND = 0x0002 + EPOLLIN = 0x0003 + EPOLLOUT = 0x0004 + EPOLLWRBAND = 0x0008 + EPOLLPRI = 0x0010 + EPOLLERR = 0x0020 + EPOLLHUP = 0x0040 + EPOLLEXCLUSIVE = 0x20000000 + EPOLLONESHOT = 0x40000000 + FD_CLOEXEC = 0x01 + FD_CLOFORK = 0x02 + FD_SETSIZE = 0x800 + FNDELAY = 0x04 + F_CLOSFD = 9 + F_CONTROL_CVT = 13 + F_DUPFD = 0 + F_DUPFD2 = 8 + F_GETFD = 1 + F_GETFL = 259 + F_GETLK = 5 + F_GETOWN = 10 + F_OK = 0x0 + F_RDLCK = 1 + F_SETFD = 2 + F_SETFL = 4 + F_SETLK = 6 + F_SETLKW = 7 + F_SETOWN = 11 + F_SETTAG = 12 + F_UNLCK = 3 + F_WRLCK = 2 + FSTYPE_ZFS = 0xe9 //"Z" + FSTYPE_HFS = 0xc8 //"H" + FSTYPE_NFS = 0xd5 //"N" + FSTYPE_TFS = 0xe3 //"T" + FSTYPE_AUTOMOUNT = 0xc1 //"A" + GRND_NONBLOCK = 1 + GRND_RANDOM = 2 + HUPCL = 0x0100 // Hang up on last close + IN_CLOEXEC = 0x00001000 + IN_NONBLOCK = 0x00000004 + IN_ACCESS = 0x00000001 + IN_MODIFY = 0x00000002 + IN_ATTRIB = 0x00000004 + IN_CLOSE_WRITE = 0x00000008 + IN_CLOSE_NOWRITE = 0x00000010 + IN_OPEN = 0x00000020 + IN_MOVED_FROM = 0x00000040 + IN_MOVED_TO = 0x00000080 + IN_CREATE = 0x00000100 + IN_DELETE = 0x00000200 + IN_DELETE_SELF = 0x00000400 + IN_MOVE_SELF = 0x00000800 + IN_UNMOUNT = 0x00002000 + IN_Q_OVERFLOW = 0x00004000 + IN_IGNORED = 0x00008000 + IN_CLOSE = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) + IN_MOVE = (IN_MOVED_FROM | IN_MOVED_TO) + IN_ALL_EVENTS = (IN_ACCESS | IN_MODIFY | IN_ATTRIB | + IN_CLOSE | IN_OPEN | IN_MOVE | + IN_CREATE | IN_DELETE | IN_DELETE_SELF | + IN_MOVE_SELF) + IN_ONLYDIR = 0x01000000 + IN_DONT_FOLLOW = 0x02000000 + IN_EXCL_UNLINK = 0x04000000 + IN_MASK_CREATE = 0x10000000 + IN_MASK_ADD = 0x20000000 + IN_ISDIR = 0x40000000 + IN_ONESHOT = 0x80000000 IP6F_MORE_FRAG = 0x0001 IP6F_OFF_MASK = 0xfff8 IP6F_RESERVED_MASK = 0x0006 @@ -152,10 +210,18 @@ const ( IP_PKTINFO = 101 IP_RECVPKTINFO = 102 IP_TOS = 2 - IP_TTL = 3 + IP_TTL = 14 IP_UNBLOCK_SOURCE = 11 + ICMP6_FILTER = 1 + MCAST_INCLUDE = 0 + MCAST_EXCLUDE = 1 + MCAST_JOIN_GROUP = 40 + MCAST_LEAVE_GROUP = 41 + MCAST_JOIN_SOURCE_GROUP = 42 + MCAST_LEAVE_SOURCE_GROUP = 43 + MCAST_BLOCK_SOURCE = 44 + MCAST_UNBLOCK_SOURCE = 46 ICANON = 0x0010 - ICMP6_FILTER = 0x26 ICRNL = 0x0002 IEXTEN = 0x0020 IGNBRK = 0x0004 @@ -165,10 +231,10 @@ const ( ISTRIP = 0x0080 IXON = 0x0200 IXOFF = 0x0100 - LOCK_SH = 0x1 // Not exist on zOS - LOCK_EX = 0x2 // Not exist on zOS - LOCK_NB = 0x4 // Not exist on zOS - LOCK_UN = 0x8 // Not exist on zOS + LOCK_SH = 0x1 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_UN = 0x8 POLLIN = 0x0003 POLLOUT = 0x0004 POLLPRI = 0x0010 @@ -182,15 +248,29 @@ const ( MAP_PRIVATE = 0x1 // changes are private MAP_SHARED = 0x2 // changes are shared MAP_FIXED = 0x4 // place exactly - MCAST_JOIN_GROUP = 40 - MCAST_LEAVE_GROUP = 41 - MCAST_JOIN_SOURCE_GROUP = 42 - MCAST_LEAVE_SOURCE_GROUP = 43 - MCAST_BLOCK_SOURCE = 44 - MCAST_UNBLOCK_SOURCE = 45 + __MAP_MEGA = 0x8 + __MAP_64 = 0x10 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 MS_SYNC = 0x1 // msync - synchronous writes MS_ASYNC = 0x2 // asynchronous writes MS_INVALIDATE = 0x4 // invalidate mappings + MS_BIND = 0x00001000 + MS_MOVE = 0x00002000 + MS_NOSUID = 0x00000002 + MS_PRIVATE = 0x00040000 + MS_REC = 0x00004000 + MS_REMOUNT = 0x00008000 + MS_RDONLY = 0x00000001 + MS_UNBINDABLE = 0x00020000 + MNT_DETACH = 0x00000004 + ZOSDSFS_SUPER_MAGIC = 0x44534653 // zOS DSFS + NFS_SUPER_MAGIC = 0x6969 // NFS + NSFS_MAGIC = 0x6e736673 // PROCNS + PROC_SUPER_MAGIC = 0x9fa0 // proc FS + ZOSTFS_SUPER_MAGIC = 0x544653 // zOS TFS + ZOSUFS_SUPER_MAGIC = 0x554653 // zOS UFS + ZOSZFS_SUPER_MAGIC = 0x5A4653 // zOS ZFS MTM_RDONLY = 0x80000000 MTM_RDWR = 0x40000000 MTM_UMOUNT = 0x10000000 @@ -205,13 +285,20 @@ const ( MTM_REMOUNT = 0x00000100 MTM_NOSECURITY = 0x00000080 NFDBITS = 0x20 + ONLRET = 0x0020 // NL performs CR function O_ACCMODE = 0x03 O_APPEND = 0x08 O_ASYNCSIG = 0x0200 O_CREAT = 0x80 + O_DIRECT = 0x00002000 + O_NOFOLLOW = 0x00004000 + O_DIRECTORY = 0x00008000 + O_PATH = 0x00080000 + O_CLOEXEC = 0x00001000 O_EXCL = 0x40 O_GETFL = 0x0F O_LARGEFILE = 0x0400 + O_NDELAY = 0x4 O_NONBLOCK = 0x04 O_RDONLY = 0x02 O_RDWR = 0x03 @@ -248,6 +335,7 @@ const ( AF_IUCV = 17 AF_LAT = 14 AF_LINK = 18 + AF_LOCAL = AF_UNIX // AF_LOCAL is an alias for AF_UNIX AF_MAX = 30 AF_NBS = 7 AF_NDD = 23 @@ -285,15 +373,33 @@ const ( RLIMIT_AS = 5 RLIMIT_NOFILE = 6 RLIMIT_MEMLIMIT = 7 + RLIMIT_MEMLOCK = 0x8 RLIM_INFINITY = 2147483647 + SCHED_FIFO = 0x2 + SCM_CREDENTIALS = 0x2 SCM_RIGHTS = 0x01 SF_CLOSE = 0x00000002 SF_REUSE = 0x00000001 + SHM_RND = 0x2 + SHM_RDONLY = 0x1 + SHMLBA = 0x1000 + IPC_STAT = 0x3 + IPC_SET = 0x2 + IPC_RMID = 0x1 + IPC_PRIVATE = 0x0 + IPC_CREAT = 0x1000000 + __IPC_MEGA = 0x4000000 + __IPC_SHAREAS = 0x20000000 + __IPC_BELOWBAR = 0x10000000 + IPC_EXCL = 0x2000000 + __IPC_GIGA = 0x8000000 SHUT_RD = 0 SHUT_RDWR = 2 SHUT_WR = 1 + SOCK_CLOEXEC = 0x00001000 SOCK_CONN_DGRAM = 6 SOCK_DGRAM = 2 + SOCK_NONBLOCK = 0x800 SOCK_RAW = 3 SOCK_RDM = 4 SOCK_SEQPACKET = 5 @@ -378,8 +484,6 @@ const ( S_IFMST = 0x00FF0000 TCP_KEEPALIVE = 0x8 TCP_NODELAY = 0x1 - TCP_INFO = 0xb - TCP_USER_TIMEOUT = 0x1 TIOCGWINSZ = 0x4008a368 TIOCSWINSZ = 0x8008a367 TIOCSBRK = 0x2000a77b @@ -427,7 +531,10 @@ const ( VSUSP = 9 VTIME = 10 WCONTINUED = 0x4 + WEXITED = 0x8 WNOHANG = 0x1 + WNOWAIT = 0x20 + WSTOPPED = 0x10 WUNTRACED = 0x2 _BPX_SWAP = 1 _BPX_NONSWAP = 2 @@ -452,8 +559,28 @@ const ( MADV_FREE = 15 // for Linux compatibility -- no zos semantics MADV_WIPEONFORK = 16 // for Linux compatibility -- no zos semantics MADV_KEEPONFORK = 17 // for Linux compatibility -- no zos semantics - AT_SYMLINK_NOFOLLOW = 1 // for Unix compatibility -- no zos semantics - AT_FDCWD = 2 // for Unix compatibility -- no zos semantics + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 + XATTR_CREATE = 0x1 + XATTR_REPLACE = 0x2 + P_PID = 0 + P_PGID = 1 + P_ALL = 2 + PR_SET_NAME = 15 + PR_GET_NAME = 16 + PR_SET_NO_NEW_PRIVS = 38 + PR_GET_NO_NEW_PRIVS = 39 + PR_SET_DUMPABLE = 4 + PR_GET_DUMPABLE = 3 + PR_SET_PDEATHSIG = 1 + PR_GET_PDEATHSIG = 2 + PR_SET_CHILD_SUBREAPER = 36 + PR_GET_CHILD_SUBREAPER = 37 + AT_FDCWD = -100 + AT_EACCESS = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_REMOVEDIR = 0x200 + RENAME_NOREPLACE = 1 << 0 ) const ( @@ -476,6 +603,7 @@ const ( EMLINK = Errno(125) ENAMETOOLONG = Errno(126) ENFILE = Errno(127) + ENOATTR = Errno(265) ENODEV = Errno(128) ENOENT = Errno(129) ENOEXEC = Errno(130) @@ -700,7 +828,7 @@ var errorList = [...]struct { {145, "EDC5145I", "The parameter list is too long, or the message to receive was too large for the buffer."}, {146, "EDC5146I", "Too many levels of symbolic links."}, {147, "EDC5147I", "Illegal byte sequence."}, - {148, "", ""}, + {148, "EDC5148I", "The named attribute or data not available."}, {149, "EDC5149I", "Value Overflow Error."}, {150, "EDC5150I", "UNIX System Services is not active."}, {151, "EDC5151I", "Dynamic allocation error."}, @@ -743,6 +871,7 @@ var errorList = [...]struct { {259, "EDC5259I", "A CUN_RS_NO_CONVERSION error was issued by Unicode Services."}, {260, "EDC5260I", "A CUN_RS_TABLE_NOT_ALIGNED error was issued by Unicode Services."}, {262, "EDC5262I", "An iconv() function encountered an unexpected error while using Unicode Services."}, + {265, "EDC5265I", "The named attribute not available."}, {1000, "EDC8000I", "A bad socket-call constant was found in the IUCV header."}, {1001, "EDC8001I", "An error was found in the IUCV header."}, {1002, "EDC8002I", "A socket descriptor is out of range."}, diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s b/pkg/k8s/vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s new file mode 100644 index 00000000000..b77ff5db90d --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s @@ -0,0 +1,364 @@ +// go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s +// Code generated by the command above; see README.md. DO NOT EDIT. + +//go:build zos && s390x +#include "textflag.h" + +// provide the address of function variable to be fixed up. + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_FlistxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Flistxattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_FremovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Fremovexattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_FgetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Fgetxattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_FsetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Fsetxattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_accept4Addr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·accept4(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_RemovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Removexattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_Dup3Addr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Dup3(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_DirfdAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Dirfd(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_EpollCreateAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·EpollCreate(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_EpollCreate1Addr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·EpollCreate1(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_EpollCtlAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·EpollCtl(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_EpollPwaitAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·EpollPwait(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_EpollWaitAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·EpollWait(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_EventfdAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Eventfd(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_FaccessatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Faccessat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_FchmodatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Fchmodat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_FchownatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Fchownat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_FdatasyncAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Fdatasync(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_fstatatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·fstatat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_LgetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Lgetxattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_LsetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Lsetxattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_FstatfsAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Fstatfs(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_FutimesAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Futimes(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_FutimesatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Futimesat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_GetrandomAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Getrandom(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_InotifyInitAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·InotifyInit(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_InotifyInit1Addr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·InotifyInit1(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_InotifyAddWatchAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·InotifyAddWatch(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_InotifyRmWatchAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·InotifyRmWatch(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_ListxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Listxattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_LlistxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Llistxattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_LremovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Lremovexattr(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_LutimesAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Lutimes(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_StatfsAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Statfs(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_SyncfsAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Syncfs(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_UnshareAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Unshare(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_LinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Linkat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_MkdiratAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Mkdirat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_MknodatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Mknodat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_PivotRootAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·PivotRoot(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_PrctlAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Prctl(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_PrlimitAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Prlimit(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_RenameatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Renameat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_Renameat2Addr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Renameat2(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_SethostnameAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Sethostname(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_SetnsAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Setns(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_SymlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Symlinkat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_UnlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·Unlinkat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_openatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·openat(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_openat2Addr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·openat2(SB), R8 + MOVD R8, ret+0(FP) + RET + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +TEXT ·get_utimensatAddr(SB), NOSPLIT|NOFRAME, $0-8 + MOVD $·utimensat(SB), R8 + MOVD R8, ret+0(FP) + RET diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go index 94f01123831..7ccf66b7ee0 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -tags zos,s390x syscall_zos_s390x.go +// go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build zos && s390x @@ -6,17 +6,100 @@ package unix import ( + "runtime" + "syscall" "unsafe" ) +var _ syscall.Errno + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntl(fd int, cmd int, arg int) (val int, err error) { - r0, _, e1 := syscall_syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), uintptr(arg)) + runtime.ExitSyscall() val = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Flistxattr(fd int, dest []byte) (sz int, err error) { + var _p0 unsafe.Pointer + if len(dest) > 0 { + _p0 = unsafe.Pointer(&dest[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FLISTXATTR_A<<4, uintptr(fd), uintptr(_p0), uintptr(len(dest))) + runtime.ExitSyscall() + sz = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_FlistxattrAddr() *(func(fd int, dest []byte) (sz int, err error)) + +var Flistxattr = enter_Flistxattr + +func enter_Flistxattr(fd int, dest []byte) (sz int, err error) { + funcref := get_FlistxattrAddr() + if funcptrtest(GetZosLibVec()+SYS___FLISTXATTR_A<<4, "") == 0 { + *funcref = impl_Flistxattr + } else { + *funcref = error_Flistxattr + } + return (*funcref)(fd, dest) +} + +func error_Flistxattr(fd int, dest []byte) (sz int, err error) { + sz = -1 + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Fremovexattr(fd int, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attr) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FREMOVEXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_FremovexattrAddr() *(func(fd int, attr string) (err error)) + +var Fremovexattr = enter_Fremovexattr + +func enter_Fremovexattr(fd int, attr string) (err error) { + funcref := get_FremovexattrAddr() + if funcptrtest(GetZosLibVec()+SYS___FREMOVEXATTR_A<<4, "") == 0 { + *funcref = impl_Fremovexattr + } else { + *funcref = error_Fremovexattr } + return (*funcref)(fd, attr) +} + +func error_Fremovexattr(fd int, attr string) (err error) { + err = ENOSYS return } @@ -29,10 +112,12 @@ func read(fd int, p []byte) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := syscall_syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_READ<<4, uintptr(fd), uintptr(_p0), uintptr(len(p))) + runtime.ExitSyscall() n = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -46,31 +131,159 @@ func write(fd int, p []byte) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := syscall_syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WRITE<<4, uintptr(fd), uintptr(_p0), uintptr(len(p))) + runtime.ExitSyscall() n = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FGETXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + runtime.ExitSyscall() + sz = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_FgetxattrAddr() *(func(fd int, attr string, dest []byte) (sz int, err error)) + +var Fgetxattr = enter_Fgetxattr + +func enter_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { + funcref := get_FgetxattrAddr() + if funcptrtest(GetZosLibVec()+SYS___FGETXATTR_A<<4, "") == 0 { + *funcref = impl_Fgetxattr + } else { + *funcref = error_Fgetxattr + } + return (*funcref)(fd, attr, dest) +} + +func error_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { + sz = -1 + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(data) > 0 { + _p1 = unsafe.Pointer(&data[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FSETXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(data)), uintptr(flag)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_FsetxattrAddr() *(func(fd int, attr string, data []byte, flag int) (err error)) + +var Fsetxattr = enter_Fsetxattr + +func enter_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) { + funcref := get_FsetxattrAddr() + if funcptrtest(GetZosLibVec()+SYS___FSETXATTR_A<<4, "") == 0 { + *funcref = impl_Fsetxattr + } else { + *funcref = error_Fsetxattr } + return (*funcref)(fd, attr, data, flag) +} + +func error_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { - r0, _, e1 := syscall_syscall(SYS___ACCEPT_A, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCEPT_A<<4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + runtime.ExitSyscall() + fd = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCEPT4_A<<4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)) + runtime.ExitSyscall() fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_accept4Addr() *(func(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)) + +var accept4 = enter_accept4 + +func enter_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + funcref := get_accept4Addr() + if funcptrtest(GetZosLibVec()+SYS___ACCEPT4_A<<4, "") == 0 { + *funcref = impl_accept4 + } else { + *funcref = error_accept4 } + return (*funcref)(s, rsa, addrlen, flags) +} + +func error_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + fd = -1 + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { - _, _, e1 := syscall_syscall(SYS___BIND_A, uintptr(s), uintptr(addr), uintptr(addrlen)) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___BIND_A<<4, uintptr(s), uintptr(addr), uintptr(addrlen)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -78,9 +291,11 @@ func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { - _, _, e1 := syscall_syscall(SYS___CONNECT_A, uintptr(s), uintptr(addr), uintptr(addrlen)) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CONNECT_A<<4, uintptr(s), uintptr(addr), uintptr(addrlen)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -88,10 +303,10 @@ func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getgroups(n int, list *_Gid_t) (nn int, err error) { - r0, _, e1 := syscall_rawsyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETGROUPS<<4, uintptr(n), uintptr(unsafe.Pointer(list))) nn = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -99,9 +314,9 @@ func getgroups(n int, list *_Gid_t) (nn int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(n int, list *_Gid_t) (err error) { - _, _, e1 := syscall_rawsyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) - if e1 != 0 { - err = errnoErr(e1) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETGROUPS<<4, uintptr(n), uintptr(unsafe.Pointer(list))) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -109,9 +324,11 @@ func setgroups(n int, list *_Gid_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { - _, _, e1 := syscall_syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETSOCKOPT<<4, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -119,9 +336,11 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { - _, _, e1 := syscall_syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETSOCKOPT<<4, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -129,10 +348,10 @@ func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socket(domain int, typ int, proto int) (fd int, err error) { - r0, _, e1 := syscall_rawsyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SOCKET<<4, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -140,9 +359,9 @@ func socket(domain int, typ int, proto int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { - _, _, e1 := syscall_rawsyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SOCKETPAIR<<4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd))) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -150,9 +369,9 @@ func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { - _, _, e1 := syscall_rawsyscall(SYS___GETPEERNAME_A, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) - if e1 != 0 { - err = errnoErr(e1) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETPEERNAME_A<<4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -160,10 +379,52 @@ func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { - _, _, e1 := syscall_rawsyscall(SYS___GETSOCKNAME_A, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) - if e1 != 0 { - err = errnoErr(e1) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETSOCKNAME_A<<4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___REMOVEXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_RemovexattrAddr() *(func(path string, attr string) (err error)) + +var Removexattr = enter_Removexattr + +func enter_Removexattr(path string, attr string) (err error) { + funcref := get_RemovexattrAddr() + if funcptrtest(GetZosLibVec()+SYS___REMOVEXATTR_A<<4, "") == 0 { + *funcref = impl_Removexattr + } else { + *funcref = error_Removexattr } + return (*funcref)(path, attr) +} + +func error_Removexattr(path string, attr string) (err error) { + err = ENOSYS return } @@ -176,10 +437,12 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := syscall_syscall6(SYS___RECVFROM_A, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RECVFROM_A<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + runtime.ExitSyscall() n = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -193,9 +456,11 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) ( } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := syscall_syscall6(SYS___SENDTO_A, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SENDTO_A<<4, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -203,10 +468,12 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) ( // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { - r0, _, e1 := syscall_syscall(SYS___RECVMSG_A, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RECVMSG_A<<4, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + runtime.ExitSyscall() n = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -214,10 +481,12 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { - r0, _, e1 := syscall_syscall(SYS___SENDMSG_A, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SENDMSG_A<<4, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + runtime.ExitSyscall() n = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -225,10 +494,12 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { - r0, _, e1 := syscall_syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MMAP<<4, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + runtime.ExitSyscall() ret = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -236,9 +507,11 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) ( // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := syscall_syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MUNMAP<<4, uintptr(addr), uintptr(length)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -246,9 +519,11 @@ func munmap(addr uintptr, length uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req int, arg uintptr) (err error) { - _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_IOCTL<<4, uintptr(fd), uintptr(req), uintptr(arg)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -256,9 +531,62 @@ func ioctl(fd int, req int, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { - _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_IOCTL<<4, uintptr(fd), uintptr(req), uintptr(arg)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMAT<<4, uintptr(id), uintptr(addr), uintptr(flag)) + runtime.ExitSyscall() + ret = uintptr(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMCTL64<<4, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf))) + runtime.ExitSyscall() + result = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func shmdt(addr uintptr) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMDT<<4, uintptr(addr)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func shmget(key int, size int, flag int) (id int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMGET<<4, uintptr(key), uintptr(size), uintptr(flag)) + runtime.ExitSyscall() + id = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -271,9 +599,11 @@ func Access(path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := syscall_syscall(SYS___ACCESS_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCESS_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -286,9 +616,11 @@ func Chdir(path string) (err error) { if err != nil { return } - _, _, e1 := syscall_syscall(SYS___CHDIR_A, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHDIR_A<<4, uintptr(unsafe.Pointer(_p0))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -301,9 +633,11 @@ func Chown(path string, uid int, gid int) (err error) { if err != nil { return } - _, _, e1 := syscall_syscall(SYS___CHOWN_A, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHOWN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -316,9 +650,11 @@ func Chmod(path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := syscall_syscall(SYS___CHMOD_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHMOD_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -331,10 +667,12 @@ func Creat(path string, mode uint32) (fd int, err error) { if err != nil { return } - r0, _, e1 := syscall_syscall(SYS___CREAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CREAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + runtime.ExitSyscall() fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -342,10 +680,12 @@ func Creat(path string, mode uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(oldfd int) (fd int, err error) { - r0, _, e1 := syscall_syscall(SYS_DUP, uintptr(oldfd), 0, 0) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP<<4, uintptr(oldfd)) + runtime.ExitSyscall() fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -353,617 +693,2216 @@ func Dup(oldfd int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(oldfd int, newfd int) (err error) { - _, _, e1 := syscall_syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP2<<4, uintptr(oldfd), uintptr(newfd)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Errno2() (er2 int) { - uer2, _, _ := syscall_syscall(SYS___ERRNO2, 0, 0, 0) - er2 = int(uer2) +func impl_Dup3(oldfd int, newfd int, flags int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP3<<4, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_Dup3Addr() *(func(oldfd int, newfd int, flags int) (err error)) -func Err2ad() (eadd *int) { - ueadd, _, _ := syscall_syscall(SYS___ERR2AD, 0, 0, 0) - eadd = (*int)(unsafe.Pointer(ueadd)) - return -} +var Dup3 = enter_Dup3 -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func enter_Dup3(oldfd int, newfd int, flags int) (err error) { + funcref := get_Dup3Addr() + if funcptrtest(GetZosLibVec()+SYS_DUP3<<4, "") == 0 { + *funcref = impl_Dup3 + } else { + *funcref = error_Dup3 + } + return (*funcref)(oldfd, newfd, flags) +} -func Exit(code int) { - syscall_syscall(SYS_EXIT, uintptr(code), 0, 0) +func error_Dup3(oldfd int, newfd int, flags int) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Fchdir(fd int) (err error) { - _, _, e1 := syscall_syscall(SYS_FCHDIR, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) +func impl_Dirfd(dirp uintptr) (fd int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DIRFD<<4, uintptr(dirp)) + runtime.ExitSyscall() + fd = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_DirfdAddr() *(func(dirp uintptr) (fd int, err error)) -func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := syscall_syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) +var Dirfd = enter_Dirfd + +func enter_Dirfd(dirp uintptr) (fd int, err error) { + funcref := get_DirfdAddr() + if funcptrtest(GetZosLibVec()+SYS_DIRFD<<4, "") == 0 { + *funcref = impl_Dirfd + } else { + *funcref = error_Dirfd } + return (*funcref)(dirp) +} + +func error_Dirfd(dirp uintptr) (fd int, err error) { + fd = -1 + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Fchown(fd int, uid int, gid int) (err error) { - _, _, e1 := syscall_syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) - if e1 != 0 { - err = errnoErr(e1) +func impl_EpollCreate(size int) (fd int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CREATE<<4, uintptr(size)) + runtime.ExitSyscall() + fd = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_EpollCreateAddr() *(func(size int) (fd int, err error)) -func FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) { - r0, _, e1 := syscall_syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) - retval = int(r0) - if e1 != 0 { - err = errnoErr(e1) +var EpollCreate = enter_EpollCreate + +func enter_EpollCreate(size int) (fd int, err error) { + funcref := get_EpollCreateAddr() + if funcptrtest(GetZosLibVec()+SYS_EPOLL_CREATE<<4, "") == 0 { + *funcref = impl_EpollCreate + } else { + *funcref = error_EpollCreate } + return (*funcref)(size) +} + +func error_EpollCreate(size int) (fd int, err error) { + fd = -1 + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func fstat(fd int, stat *Stat_LE_t) (err error) { - _, _, e1 := syscall_syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) +func impl_EpollCreate1(flags int) (fd int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CREATE1<<4, uintptr(flags)) + runtime.ExitSyscall() + fd = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_EpollCreate1Addr() *(func(flags int) (fd int, err error)) -func Fstatvfs(fd int, stat *Statvfs_t) (err error) { - _, _, e1 := syscall_syscall(SYS_FSTATVFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) +var EpollCreate1 = enter_EpollCreate1 + +func enter_EpollCreate1(flags int) (fd int, err error) { + funcref := get_EpollCreate1Addr() + if funcptrtest(GetZosLibVec()+SYS_EPOLL_CREATE1<<4, "") == 0 { + *funcref = impl_EpollCreate1 + } else { + *funcref = error_EpollCreate1 } + return (*funcref)(flags) +} + +func error_EpollCreate1(flags int) (fd int, err error) { + fd = -1 + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Fsync(fd int) (err error) { - _, _, e1 := syscall_syscall(SYS_FSYNC, uintptr(fd), 0, 0) - if e1 != 0 { - err = errnoErr(e1) +func impl_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CTL<<4, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_EpollCtlAddr() *(func(epfd int, op int, fd int, event *EpollEvent) (err error)) -func Ftruncate(fd int, length int64) (err error) { - _, _, e1 := syscall_syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) +var EpollCtl = enter_EpollCtl + +func enter_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + funcref := get_EpollCtlAddr() + if funcptrtest(GetZosLibVec()+SYS_EPOLL_CTL<<4, "") == 0 { + *funcref = impl_EpollCtl + } else { + *funcref = error_EpollCtl } - return + return (*funcref)(epfd, op, fd, event) } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getpagesize() (pgsize int) { - r0, _, _ := syscall_syscall(SYS_GETPAGESIZE, 0, 0, 0) - pgsize = int(r0) +func error_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mprotect(b []byte, prot int) (err error) { +func impl_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) { var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := syscall_syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_PWAIT<<4, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), uintptr(unsafe.Pointer(sigmask))) + runtime.ExitSyscall() + n = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_EpollPwaitAddr() *(func(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error)) -func Msync(b []byte, flags int) (err error) { - var _p0 unsafe.Pointer - if len(b) > 0 { - _p0 = unsafe.Pointer(&b[0]) +var EpollPwait = enter_EpollPwait + +func enter_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) { + funcref := get_EpollPwaitAddr() + if funcptrtest(GetZosLibVec()+SYS_EPOLL_PWAIT<<4, "") == 0 { + *funcref = impl_EpollPwait } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, e1 := syscall_syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) - if e1 != 0 { - err = errnoErr(e1) + *funcref = error_EpollPwait } + return (*funcref)(epfd, events, msec, sigmask) +} + +func error_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) { + n = -1 + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Poll(fds []PollFd, timeout int) (n int, err error) { +func impl_EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { var _p0 unsafe.Pointer - if len(fds) > 0 { - _p0 = unsafe.Pointer(&fds[0]) + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := syscall_syscall(SYS_POLL, uintptr(_p0), uintptr(len(fds)), uintptr(timeout)) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_WAIT<<4, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec)) + runtime.ExitSyscall() n = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_EpollWaitAddr() *(func(epfd int, events []EpollEvent, msec int) (n int, err error)) -func Times(tms *Tms) (ticks uintptr, err error) { - r0, _, e1 := syscall_syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) - ticks = uintptr(r0) - if e1 != 0 { - err = errnoErr(e1) +var EpollWait = enter_EpollWait + +func enter_EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + funcref := get_EpollWaitAddr() + if funcptrtest(GetZosLibVec()+SYS_EPOLL_WAIT<<4, "") == 0 { + *funcref = impl_EpollWait + } else { + *funcref = error_EpollWait } + return (*funcref)(epfd, events, msec) +} + +func error_EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + n = -1 + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func W_Getmntent(buff *byte, size int) (lastsys int, err error) { - r0, _, e1 := syscall_syscall(SYS_W_GETMNTENT, uintptr(unsafe.Pointer(buff)), uintptr(size), 0) - lastsys = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } +func Errno2() (er2 int) { + runtime.EnterSyscall() + r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS___ERRNO2<<4) + runtime.ExitSyscall() + er2 = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func W_Getmntent_A(buff *byte, size int) (lastsys int, err error) { - r0, _, e1 := syscall_syscall(SYS___W_GETMNTENT_A, uintptr(unsafe.Pointer(buff)), uintptr(size), 0) - lastsys = int(r0) - if e1 != 0 { - err = errnoErr(e1) +func impl_Eventfd(initval uint, flags int) (fd int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EVENTFD<<4, uintptr(initval), uintptr(flags)) + runtime.ExitSyscall() + fd = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } +//go:nosplit +func get_EventfdAddr() *(func(initval uint, flags int) (fd int, err error)) + +var Eventfd = enter_Eventfd + +func enter_Eventfd(initval uint, flags int) (fd int, err error) { + funcref := get_EventfdAddr() + if funcptrtest(GetZosLibVec()+SYS_EVENTFD<<4, "") == 0 { + *funcref = impl_Eventfd + } else { + *funcref = error_Eventfd + } + return (*funcref)(initval, flags) +} + +func error_Eventfd(initval uint, flags int) (fd int, err error) { + fd = -1 + err = ENOSYS + return +} + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) { +func Exit(code int) { + runtime.EnterSyscall() + CallLeFuncWithErr(GetZosLibVec()+SYS_EXIT<<4, uintptr(code)) + runtime.ExitSyscall() + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } - var _p1 *byte - _p1, err = BytePtrFromString(filesystem) - if err != nil { - return - } - var _p2 *byte - _p2, err = BytePtrFromString(fstype) - if err != nil { - return - } - var _p3 *byte - _p3, err = BytePtrFromString(parm) - if err != nil { - return - } - _, _, e1 := syscall_syscall6(SYS___MOUNT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(mtm), uintptr(parmlen), uintptr(unsafe.Pointer(_p3))) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FACCESSAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_FaccessatAddr() *(func(dirfd int, path string, mode uint32, flags int) (err error)) -func unmount(filesystem string, mtm int) (err error) { +var Faccessat = enter_Faccessat + +func enter_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + funcref := get_FaccessatAddr() + if funcptrtest(GetZosLibVec()+SYS___FACCESSAT_A<<4, "") == 0 { + *funcref = impl_Faccessat + } else { + *funcref = error_Faccessat + } + return (*funcref)(dirfd, path, mode, flags) +} + +func error_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHDIR<<4, uintptr(fd)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHMOD<<4, uintptr(fd), uintptr(mode)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { var _p0 *byte - _p0, err = BytePtrFromString(filesystem) + _p0, err = BytePtrFromString(path) if err != nil { return } - _, _, e1 := syscall_syscall(SYS___UMOUNT_A, uintptr(unsafe.Pointer(_p0)), uintptr(mtm), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FCHMODAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_FchmodatAddr() *(func(dirfd int, path string, mode uint32, flags int) (err error)) + +var Fchmodat = enter_Fchmodat + +func enter_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + funcref := get_FchmodatAddr() + if funcptrtest(GetZosLibVec()+SYS___FCHMODAT_A<<4, "") == 0 { + *funcref = impl_Fchmodat + } else { + *funcref = error_Fchmodat + } + return (*funcref)(dirfd, path, mode, flags) +} + +func error_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHOWN<<4, uintptr(fd), uintptr(uid), uintptr(gid)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Chroot(path string) (err error) { +func impl_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } - _, _, e1 := syscall_syscall(SYS___CHROOT_A, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FCHOWNAT_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_FchownatAddr() *(func(fd int, path string, uid int, gid int, flags int) (err error)) + +var Fchownat = enter_Fchownat + +func enter_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) { + funcref := get_FchownatAddr() + if funcptrtest(GetZosLibVec()+SYS___FCHOWNAT_A<<4, "") == 0 { + *funcref = impl_Fchownat + } else { + *funcref = error_Fchownat } + return (*funcref)(fd, path, uid, gid, flags) +} + +func error_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Uname(buf *Utsname) (err error) { - _, _, e1 := syscall_rawsyscall(SYS___UNAME_A, uintptr(unsafe.Pointer(buf)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) +func FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), uintptr(arg)) + runtime.ExitSyscall() + retval = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Gethostname(buf []byte) (err error) { +func impl_Fdatasync(fd int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FDATASYNC<<4, uintptr(fd)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_FdatasyncAddr() *(func(fd int) (err error)) + +var Fdatasync = enter_Fdatasync + +func enter_Fdatasync(fd int) (err error) { + funcref := get_FdatasyncAddr() + if funcptrtest(GetZosLibVec()+SYS_FDATASYNC<<4, "") == 0 { + *funcref = impl_Fdatasync + } else { + *funcref = error_Fdatasync + } + return (*funcref)(fd) +} + +func error_Fdatasync(fd int) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fstat(fd int, stat *Stat_LE_t) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTAT<<4, uintptr(fd), uintptr(unsafe.Pointer(stat))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FSTATAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_fstatatAddr() *(func(dirfd int, path string, stat *Stat_LE_t, flags int) (err error)) + +var fstatat = enter_fstatat + +func enter_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) { + funcref := get_fstatatAddr() + if funcptrtest(GetZosLibVec()+SYS___FSTATAT_A<<4, "") == 0 { + *funcref = impl_fstatat + } else { + *funcref = error_fstatat + } + return (*funcref)(dirfd, path, stat, flags) +} + +func error_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LGETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest))) + runtime.ExitSyscall() + sz = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_LgetxattrAddr() *(func(link string, attr string, dest []byte) (sz int, err error)) + +var Lgetxattr = enter_Lgetxattr + +func enter_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { + funcref := get_LgetxattrAddr() + if funcptrtest(GetZosLibVec()+SYS___LGETXATTR_A<<4, "") == 0 { + *funcref = impl_Lgetxattr + } else { + *funcref = error_Lgetxattr + } + return (*funcref)(link, attr, dest) +} + +func error_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { + sz = -1 + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Lsetxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LSETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_LsetxattrAddr() *(func(path string, attr string, data []byte, flags int) (err error)) + +var Lsetxattr = enter_Lsetxattr + +func enter_Lsetxattr(path string, attr string, data []byte, flags int) (err error) { + funcref := get_LsetxattrAddr() + if funcptrtest(GetZosLibVec()+SYS___LSETXATTR_A<<4, "") == 0 { + *funcref = impl_Lsetxattr + } else { + *funcref = error_Lsetxattr + } + return (*funcref)(path, attr, data, flags) +} + +func error_Lsetxattr(path string, attr string, data []byte, flags int) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Fstatfs(fd int, buf *Statfs_t) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTATFS<<4, uintptr(fd), uintptr(unsafe.Pointer(buf))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_FstatfsAddr() *(func(fd int, buf *Statfs_t) (err error)) + +var Fstatfs = enter_Fstatfs + +func enter_Fstatfs(fd int, buf *Statfs_t) (err error) { + funcref := get_FstatfsAddr() + if funcptrtest(GetZosLibVec()+SYS_FSTATFS<<4, "") == 0 { + *funcref = impl_Fstatfs + } else { + *funcref = error_Fstatfs + } + return (*funcref)(fd, buf) +} + +func error_Fstatfs(fd int, buf *Statfs_t) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatvfs(fd int, stat *Statvfs_t) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTATVFS<<4, uintptr(fd), uintptr(unsafe.Pointer(stat))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSYNC<<4, uintptr(fd)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Futimes(fd int, tv []Timeval) (err error) { var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) + if len(tv) > 0 { + _p0 = unsafe.Pointer(&tv[0]) } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := syscall_syscall(SYS___GETHOSTNAME_A, uintptr(_p0), uintptr(len(buf)), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FUTIMES<<4, uintptr(fd), uintptr(_p0), uintptr(len(tv))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_FutimesAddr() *(func(fd int, tv []Timeval) (err error)) -func Getegid() (egid int) { - r0, _, _ := syscall_rawsyscall(SYS_GETEGID, 0, 0, 0) - egid = int(r0) +var Futimes = enter_Futimes + +func enter_Futimes(fd int, tv []Timeval) (err error) { + funcref := get_FutimesAddr() + if funcptrtest(GetZosLibVec()+SYS_FUTIMES<<4, "") == 0 { + *funcref = impl_Futimes + } else { + *funcref = error_Futimes + } + return (*funcref)(fd, tv) +} + +func error_Futimes(fd int, tv []Timeval) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Geteuid() (uid int) { - r0, _, _ := syscall_rawsyscall(SYS_GETEUID, 0, 0, 0) - uid = int(r0) +func impl_Futimesat(dirfd int, path string, tv []Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(tv) > 0 { + _p1 = unsafe.Pointer(&tv[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FUTIMESAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(tv))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_FutimesatAddr() *(func(dirfd int, path string, tv []Timeval) (err error)) + +var Futimesat = enter_Futimesat + +func enter_Futimesat(dirfd int, path string, tv []Timeval) (err error) { + funcref := get_FutimesatAddr() + if funcptrtest(GetZosLibVec()+SYS___FUTIMESAT_A<<4, "") == 0 { + *funcref = impl_Futimesat + } else { + *funcref = error_Futimesat + } + return (*funcref)(dirfd, path, tv) +} + +func error_Futimesat(dirfd int, path string, tv []Timeval) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getgid() (gid int) { - r0, _, _ := syscall_rawsyscall(SYS_GETGID, 0, 0, 0) - gid = int(r0) +func Ftruncate(fd int, length int64) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FTRUNCATE<<4, uintptr(fd), uintptr(length)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getpid() (pid int) { - r0, _, _ := syscall_rawsyscall(SYS_GETPID, 0, 0, 0) - pid = int(r0) +func impl_Getrandom(buf []byte, flags int) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRANDOM<<4, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) + runtime.ExitSyscall() + n = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_GetrandomAddr() *(func(buf []byte, flags int) (n int, err error)) + +var Getrandom = enter_Getrandom + +func enter_Getrandom(buf []byte, flags int) (n int, err error) { + funcref := get_GetrandomAddr() + if funcptrtest(GetZosLibVec()+SYS_GETRANDOM<<4, "") == 0 { + *funcref = impl_Getrandom + } else { + *funcref = error_Getrandom + } + return (*funcref)(buf, flags) +} + +func error_Getrandom(buf []byte, flags int) (n int, err error) { + n = -1 + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := syscall_rawsyscall(SYS_GETPGID, uintptr(pid), 0, 0) - pgid = int(r0) - if e1 != 0 { - err = errnoErr(e1) +func impl_InotifyInit() (fd int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec() + SYS_INOTIFY_INIT<<4) + runtime.ExitSyscall() + fd = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_InotifyInitAddr() *(func() (fd int, err error)) + +var InotifyInit = enter_InotifyInit + +func enter_InotifyInit() (fd int, err error) { + funcref := get_InotifyInitAddr() + if funcptrtest(GetZosLibVec()+SYS_INOTIFY_INIT<<4, "") == 0 { + *funcref = impl_InotifyInit + } else { + *funcref = error_InotifyInit } + return (*funcref)() +} + +func error_InotifyInit() (fd int, err error) { + fd = -1 + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getppid() (pid int) { - r0, _, _ := syscall_rawsyscall(SYS_GETPPID, 0, 0, 0) - pid = int(r0) +func impl_InotifyInit1(flags int) (fd int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_INOTIFY_INIT1<<4, uintptr(flags)) + runtime.ExitSyscall() + fd = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_InotifyInit1Addr() *(func(flags int) (fd int, err error)) + +var InotifyInit1 = enter_InotifyInit1 + +func enter_InotifyInit1(flags int) (fd int, err error) { + funcref := get_InotifyInit1Addr() + if funcptrtest(GetZosLibVec()+SYS_INOTIFY_INIT1<<4, "") == 0 { + *funcref = impl_InotifyInit1 + } else { + *funcref = error_InotifyInit1 + } + return (*funcref)(flags) +} + +func error_InotifyInit1(flags int) (fd int, err error) { + fd = -1 + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___INOTIFY_ADD_WATCH_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + runtime.ExitSyscall() + watchdesc = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_InotifyAddWatchAddr() *(func(fd int, pathname string, mask uint32) (watchdesc int, err error)) + +var InotifyAddWatch = enter_InotifyAddWatch + +func enter_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + funcref := get_InotifyAddWatchAddr() + if funcptrtest(GetZosLibVec()+SYS___INOTIFY_ADD_WATCH_A<<4, "") == 0 { + *funcref = impl_InotifyAddWatch + } else { + *funcref = error_InotifyAddWatch + } + return (*funcref)(fd, pathname, mask) +} + +func error_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + watchdesc = -1 + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_INOTIFY_RM_WATCH<<4, uintptr(fd), uintptr(watchdesc)) + runtime.ExitSyscall() + success = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_InotifyRmWatchAddr() *(func(fd int, watchdesc uint32) (success int, err error)) + +var InotifyRmWatch = enter_InotifyRmWatch + +func enter_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + funcref := get_InotifyRmWatchAddr() + if funcptrtest(GetZosLibVec()+SYS_INOTIFY_RM_WATCH<<4, "") == 0 { + *funcref = impl_InotifyRmWatch + } else { + *funcref = error_InotifyRmWatch + } + return (*funcref)(fd, watchdesc) +} + +func error_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + success = -1 + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LISTXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + runtime.ExitSyscall() + sz = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_ListxattrAddr() *(func(path string, dest []byte) (sz int, err error)) + +var Listxattr = enter_Listxattr + +func enter_Listxattr(path string, dest []byte) (sz int, err error) { + funcref := get_ListxattrAddr() + if funcptrtest(GetZosLibVec()+SYS___LISTXATTR_A<<4, "") == 0 { + *funcref = impl_Listxattr + } else { + *funcref = error_Listxattr + } + return (*funcref)(path, dest) +} + +func error_Listxattr(path string, dest []byte) (sz int, err error) { + sz = -1 + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Llistxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LLISTXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + runtime.ExitSyscall() + sz = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_LlistxattrAddr() *(func(path string, dest []byte) (sz int, err error)) + +var Llistxattr = enter_Llistxattr + +func enter_Llistxattr(path string, dest []byte) (sz int, err error) { + funcref := get_LlistxattrAddr() + if funcptrtest(GetZosLibVec()+SYS___LLISTXATTR_A<<4, "") == 0 { + *funcref = impl_Llistxattr + } else { + *funcref = error_Llistxattr + } + return (*funcref)(path, dest) +} + +func error_Llistxattr(path string, dest []byte) (sz int, err error) { + sz = -1 + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Lremovexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LREMOVEXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_LremovexattrAddr() *(func(path string, attr string) (err error)) + +var Lremovexattr = enter_Lremovexattr + +func enter_Lremovexattr(path string, attr string) (err error) { + funcref := get_LremovexattrAddr() + if funcptrtest(GetZosLibVec()+SYS___LREMOVEXATTR_A<<4, "") == 0 { + *funcref = impl_Lremovexattr + } else { + *funcref = error_Lremovexattr + } + return (*funcref)(path, attr) +} + +func error_Lremovexattr(path string, attr string) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Lutimes(path string, tv []Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(tv) > 0 { + _p1 = unsafe.Pointer(&tv[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LUTIMES_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(tv))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_LutimesAddr() *(func(path string, tv []Timeval) (err error)) + +var Lutimes = enter_Lutimes + +func enter_Lutimes(path string, tv []Timeval) (err error) { + funcref := get_LutimesAddr() + if funcptrtest(GetZosLibVec()+SYS___LUTIMES_A<<4, "") == 0 { + *funcref = impl_Lutimes + } else { + *funcref = error_Lutimes + } + return (*funcref)(path, tv) +} + +func error_Lutimes(path string, tv []Timeval) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MPROTECT<<4, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MSYNC<<4, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Console2(cmsg *ConsMsg2, modstr *byte, concmd *uint32) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CONSOLE2<<4, uintptr(unsafe.Pointer(cmsg)), uintptr(unsafe.Pointer(modstr)), uintptr(unsafe.Pointer(concmd))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Poll(fds []PollFd, timeout int) (n int, err error) { + var _p0 unsafe.Pointer + if len(fds) > 0 { + _p0 = unsafe.Pointer(&fds[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_POLL<<4, uintptr(_p0), uintptr(len(fds)), uintptr(timeout)) + runtime.ExitSyscall() + n = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READDIR_R_A<<4, uintptr(dirp), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___STATFS_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_StatfsAddr() *(func(path string, buf *Statfs_t) (err error)) + +var Statfs = enter_Statfs + +func enter_Statfs(path string, buf *Statfs_t) (err error) { + funcref := get_StatfsAddr() + if funcptrtest(GetZosLibVec()+SYS___STATFS_A<<4, "") == 0 { + *funcref = impl_Statfs + } else { + *funcref = error_Statfs + } + return (*funcref)(path, buf) +} + +func error_Statfs(path string, buf *Statfs_t) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Syncfs(fd int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SYNCFS<<4, uintptr(fd)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_SyncfsAddr() *(func(fd int) (err error)) + +var Syncfs = enter_Syncfs + +func enter_Syncfs(fd int) (err error) { + funcref := get_SyncfsAddr() + if funcptrtest(GetZosLibVec()+SYS_SYNCFS<<4, "") == 0 { + *funcref = impl_Syncfs + } else { + *funcref = error_Syncfs + } + return (*funcref)(fd) +} + +func error_Syncfs(fd int) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TIMES<<4, uintptr(unsafe.Pointer(tms))) + runtime.ExitSyscall() + ticks = uintptr(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func W_Getmntent(buff *byte, size int) (lastsys int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_W_GETMNTENT<<4, uintptr(unsafe.Pointer(buff)), uintptr(size)) + runtime.ExitSyscall() + lastsys = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func W_Getmntent_A(buff *byte, size int) (lastsys int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___W_GETMNTENT_A<<4, uintptr(unsafe.Pointer(buff)), uintptr(size)) + runtime.ExitSyscall() + lastsys = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(filesystem) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + var _p3 *byte + _p3, err = BytePtrFromString(parm) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MOUNT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(mtm), uintptr(parmlen), uintptr(unsafe.Pointer(_p3))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unmount_LE(filesystem string, mtm int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(filesystem) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UMOUNT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mtm)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHROOT_A<<4, uintptr(unsafe.Pointer(_p0))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SELECT<<4, uintptr(nmsgsfds), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout))) + runtime.ExitSyscall() + ret = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_____OSNAME_A<<4, uintptr(unsafe.Pointer(buf))) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Unshare(flags int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_UNSHARE<<4, uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_UnshareAddr() *(func(flags int) (err error)) + +var Unshare = enter_Unshare + +func enter_Unshare(flags int) (err error) { + funcref := get_UnshareAddr() + if funcptrtest(GetZosLibVec()+SYS_UNSHARE<<4, "") == 0 { + *funcref = impl_Unshare + } else { + *funcref = error_Unshare + } + return (*funcref)(flags) +} + +func error_Unshare(flags int) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gethostname(buf []byte) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETHOSTNAME_A<<4, uintptr(_p0), uintptr(len(buf))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETGID<<4) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETPID<<4) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETPGID<<4, uintptr(pid)) + pgid = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (pid int) { + r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETPPID<<4) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETPRIORITY<<4, uintptr(which), uintptr(who)) + runtime.ExitSyscall() + prio = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRLIMIT<<4, uintptr(resource), uintptr(unsafe.Pointer(rlim))) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getrusage(who int, rusage *rusage_zos) (err error) { + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRUSAGE<<4, uintptr(who), uintptr(unsafe.Pointer(rusage))) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + runtime.EnterSyscall() + r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETEGID<<4) + runtime.ExitSyscall() + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + runtime.EnterSyscall() + r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETEUID<<4) + runtime.ExitSyscall() + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETSID<<4, uintptr(pid)) + sid = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETUID<<4) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig Signal) (err error) { + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_KILL<<4, uintptr(pid), uintptr(sig)) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LCHOWN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LINK_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldPath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newPath) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LINKAT_A<<4, uintptr(oldDirFd), uintptr(unsafe.Pointer(_p0)), uintptr(newDirFd), uintptr(unsafe.Pointer(_p1)), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_LinkatAddr() *(func(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error)) + +var Linkat = enter_Linkat + +func enter_Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) { + funcref := get_LinkatAddr() + if funcptrtest(GetZosLibVec()+SYS___LINKAT_A<<4, "") == 0 { + *funcref = impl_Linkat + } else { + *funcref = error_Linkat + } + return (*funcref)(oldDirFd, oldPath, newDirFd, newPath, flags) +} + +func error_Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_LISTEN<<4, uintptr(s), uintptr(n)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func lstat(path string, stat *Stat_LE_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LSTAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKDIR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKDIRAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_MkdiratAddr() *(func(dirfd int, path string, mode uint32) (err error)) + +var Mkdirat = enter_Mkdirat + +func enter_Mkdirat(dirfd int, path string, mode uint32) (err error) { + funcref := get_MkdiratAddr() + if funcptrtest(GetZosLibVec()+SYS___MKDIRAT_A<<4, "") == 0 { + *funcref = impl_Mkdirat + } else { + *funcref = error_Mkdirat + } + return (*funcref)(dirfd, path, mode) +} + +func error_Mkdirat(dirfd int, path string, mode uint32) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKFIFO_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKNOD_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKNODAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_MknodatAddr() *(func(dirfd int, path string, mode uint32, dev int) (err error)) + +var Mknodat = enter_Mknodat + +func enter_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + funcref := get_MknodatAddr() + if funcptrtest(GetZosLibVec()+SYS___MKNODAT_A<<4, "") == 0 { + *funcref = impl_Mknodat + } else { + *funcref = error_Mknodat + } + return (*funcref)(dirfd, path, mode, dev) +} + +func error_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_PivotRoot(newroot string, oldroot string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(oldroot) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___PIVOT_ROOT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_PivotRootAddr() *(func(newroot string, oldroot string) (err error)) + +var PivotRoot = enter_PivotRoot + +func enter_PivotRoot(newroot string, oldroot string) (err error) { + funcref := get_PivotRootAddr() + if funcptrtest(GetZosLibVec()+SYS___PIVOT_ROOT_A<<4, "") == 0 { + *funcref = impl_PivotRoot + } else { + *funcref = error_PivotRoot + } + return (*funcref)(newroot, oldroot) +} + +func error_PivotRoot(newroot string, oldroot string) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PREAD<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset)) + runtime.ExitSyscall() + n = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := syscall_syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) - prio = int(r0) - if e1 != 0 { - err = errnoErr(e1) +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PWRITE<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset)) + runtime.ExitSyscall() + n = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := syscall_rawsyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) +func impl_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___PRCTL_A<<4, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_PrctlAddr() *(func(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)) -func getrusage(who int, rusage *rusage_zos) (err error) { - _, _, e1 := syscall_rawsyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) - if e1 != 0 { - err = errnoErr(e1) +var Prctl = enter_Prctl + +func enter_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + funcref := get_PrctlAddr() + if funcptrtest(GetZosLibVec()+SYS___PRCTL_A<<4, "") == 0 { + *funcref = impl_Prctl + } else { + *funcref = error_Prctl } - return + return (*funcref)(option, arg2, arg3, arg4, arg5) } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Getsid(pid int) (sid int, err error) { - r0, _, e1 := syscall_rawsyscall(SYS_GETSID, uintptr(pid), 0, 0) - sid = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } +func error_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getuid() (uid int) { - r0, _, _ := syscall_rawsyscall(SYS_GETUID, 0, 0, 0) - uid = int(r0) +func impl_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PRLIMIT<<4, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old))) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_PrlimitAddr() *(func(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error)) -func Kill(pid int, sig Signal) (err error) { - _, _, e1 := syscall_rawsyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) - if e1 != 0 { - err = errnoErr(e1) +var Prlimit = enter_Prlimit + +func enter_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { + funcref := get_PrlimitAddr() + if funcptrtest(GetZosLibVec()+SYS_PRLIMIT<<4, "") == 0 { + *funcref = impl_Prlimit + } else { + *funcref = error_Prlimit } + return (*funcref)(pid, resource, newlimit, old) +} + +func error_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Lchown(path string, uid int, gid int) (err error) { +func Rename(from string, to string) (err error) { var _p0 *byte - _p0, err = BytePtrFromString(path) + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) if err != nil { return } - _, _, e1 := syscall_syscall(SYS___LCHOWN_A, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAME_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Link(path string, link string) (err error) { +func impl_Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { var _p0 *byte - _p0, err = BytePtrFromString(path) + _p0, err = BytePtrFromString(oldpath) if err != nil { return } var _p1 *byte - _p1, err = BytePtrFromString(link) + _p1, err = BytePtrFromString(newpath) if err != nil { return } - _, _, e1 := syscall_syscall(SYS___LINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAMEAT_A<<4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_RenameatAddr() *(func(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)) -func Listen(s int, n int) (err error) { - _, _, e1 := syscall_syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) - if e1 != 0 { - err = errnoErr(e1) +var Renameat = enter_Renameat + +func enter_Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + funcref := get_RenameatAddr() + if funcptrtest(GetZosLibVec()+SYS___RENAMEAT_A<<4, "") == 0 { + *funcref = impl_Renameat + } else { + *funcref = error_Renameat } + return (*funcref)(olddirfd, oldpath, newdirfd, newpath) +} + +func error_Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func lstat(path string, stat *Stat_LE_t) (err error) { +func impl_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { var _p0 *byte - _p0, err = BytePtrFromString(path) + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) if err != nil { return } - _, _, e1 := syscall_syscall(SYS___LSTAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAMEAT2_A<<4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_Renameat2Addr() *(func(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error)) -func Mkdir(path string, mode uint32) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := syscall_syscall(SYS___MKDIR_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) +var Renameat2 = enter_Renameat2 + +func enter_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { + funcref := get_Renameat2Addr() + if funcptrtest(GetZosLibVec()+SYS___RENAMEAT2_A<<4, "") == 0 { + *funcref = impl_Renameat2 + } else { + *funcref = error_Renameat2 } + return (*funcref)(olddirfd, oldpath, newdirfd, newpath, flags) +} + +func error_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mkfifo(path string, mode uint32) (err error) { +func Rmdir(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } - _, _, e1 := syscall_syscall(SYS___MKFIFO_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RMDIR_A<<4, uintptr(unsafe.Pointer(_p0))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Mknod(path string, mode uint32, dev int) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := syscall_syscall(SYS___MKNOD_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) - if e1 != 0 { - err = errnoErr(e1) +func Seek(fd int, offset int64, whence int) (off int64, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_LSEEK<<4, uintptr(fd), uintptr(offset), uintptr(whence)) + runtime.ExitSyscall() + off = int64(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Pread(fd int, p []byte, offset int64) (n int, err error) { - var _p0 unsafe.Pointer - if len(p) > 0 { - _p0 = unsafe.Pointer(&p[0]) - } else { - _p0 = unsafe.Pointer(&_zero) +func Setegid(egid int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETEGID<<4, uintptr(egid)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } - r0, _, e1 := syscall_syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETEUID<<4, uintptr(euid)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Pwrite(fd int, p []byte, offset int64) (n int, err error) { +func impl_Sethostname(p []byte) (err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := syscall_syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SETHOSTNAME_A<<4, uintptr(_p0), uintptr(len(p))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_SethostnameAddr() *(func(p []byte) (err error)) -func Readlink(path string, buf []byte) (n int, err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - var _p1 unsafe.Pointer - if len(buf) > 0 { - _p1 = unsafe.Pointer(&buf[0]) +var Sethostname = enter_Sethostname + +func enter_Sethostname(p []byte) (err error) { + funcref := get_SethostnameAddr() + if funcptrtest(GetZosLibVec()+SYS___SETHOSTNAME_A<<4, "") == 0 { + *funcref = impl_Sethostname } else { - _p1 = unsafe.Pointer(&_zero) + *funcref = error_Sethostname } - r0, _, e1 := syscall_syscall(SYS___READLINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return + return (*funcref)(p) } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Rename(from string, to string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(from) - if err != nil { - return - } - var _p1 *byte - _p1, err = BytePtrFromString(to) - if err != nil { - return - } - _, _, e1 := syscall_syscall(SYS___RENAME_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) - } +func error_Sethostname(p []byte) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Rmdir(path string) (err error) { - var _p0 *byte - _p0, err = BytePtrFromString(path) - if err != nil { - return - } - _, _, e1 := syscall_syscall(SYS___RMDIR_A, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) +func impl_Setns(fd int, nstype int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETNS<<4, uintptr(fd), uintptr(nstype)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +//go:nosplit +func get_SetnsAddr() *(func(fd int, nstype int) (err error)) -func Seek(fd int, offset int64, whence int) (off int64, err error) { - r0, _, e1 := syscall_syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) - off = int64(r0) - if e1 != 0 { - err = errnoErr(e1) +var Setns = enter_Setns + +func enter_Setns(fd int, nstype int) (err error) { + funcref := get_SetnsAddr() + if funcptrtest(GetZosLibVec()+SYS_SETNS<<4, "") == 0 { + *funcref = impl_Setns + } else { + *funcref = error_Setns } + return (*funcref)(fd, nstype) +} + +func error_Setns(fd int, nstype int) (err error) { + err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := syscall_syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETPRIORITY<<4, uintptr(which), uintptr(who), uintptr(prio)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -971,9 +2910,9 @@ func Setpriority(which int, who int, prio int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := syscall_rawsyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) - if e1 != 0 { - err = errnoErr(e1) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETPGID<<4, uintptr(pid), uintptr(pgid)) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -981,9 +2920,9 @@ func Setpgid(pid int, pgid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrlimit(resource int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawsyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETRLIMIT<<4, uintptr(resource), uintptr(unsafe.Pointer(lim))) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -991,9 +2930,9 @@ func Setrlimit(resource int, lim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { - _, _, e1 := syscall_rawsyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) - if e1 != 0 { - err = errnoErr(e1) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETREGID<<4, uintptr(rgid), uintptr(egid)) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1001,9 +2940,9 @@ func Setregid(rgid int, egid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { - _, _, e1 := syscall_rawsyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) - if e1 != 0 { - err = errnoErr(e1) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETREUID<<4, uintptr(ruid), uintptr(euid)) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1011,10 +2950,10 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { - r0, _, e1 := syscall_rawsyscall(SYS_SETSID, 0, 0, 0) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec() + SYS_SETSID<<4) pid = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1022,9 +2961,11 @@ func Setsid() (pid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { - _, _, e1 := syscall_syscall(SYS_SETUID, uintptr(uid), 0, 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETUID<<4, uintptr(uid)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1032,9 +2973,11 @@ func Setuid(uid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(uid int) (err error) { - _, _, e1 := syscall_syscall(SYS_SETGID, uintptr(uid), 0, 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETGID<<4, uintptr(uid)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1042,9 +2985,11 @@ func Setgid(uid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(fd int, how int) (err error) { - _, _, e1 := syscall_syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHUTDOWN<<4, uintptr(fd), uintptr(how)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1057,9 +3002,11 @@ func stat(path string, statLE *Stat_LE_t) (err error) { if err != nil { return } - _, _, e1 := syscall_syscall(SYS___STAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statLE)), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___STAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statLE))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1077,17 +3024,63 @@ func Symlink(path string, link string) (err error) { if err != nil { return } - _, _, e1 := syscall_syscall(SYS___SYMLINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SYMLINK_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Symlinkat(oldPath string, dirfd int, newPath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldPath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newPath) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SYMLINKAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(dirfd), uintptr(unsafe.Pointer(_p1))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } +//go:nosplit +func get_SymlinkatAddr() *(func(oldPath string, dirfd int, newPath string) (err error)) + +var Symlinkat = enter_Symlinkat + +func enter_Symlinkat(oldPath string, dirfd int, newPath string) (err error) { + funcref := get_SymlinkatAddr() + if funcptrtest(GetZosLibVec()+SYS___SYMLINKAT_A<<4, "") == 0 { + *funcref = impl_Symlinkat + } else { + *funcref = error_Symlinkat + } + return (*funcref)(oldPath, dirfd, newPath) +} + +func error_Symlinkat(oldPath string, dirfd int, newPath string) (err error) { + err = ENOSYS + return +} + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() { - syscall_syscall(SYS_SYNC, 0, 0, 0) + runtime.EnterSyscall() + CallLeFuncWithErr(GetZosLibVec() + SYS_SYNC<<4) + runtime.ExitSyscall() return } @@ -1099,9 +3092,11 @@ func Truncate(path string, length int64) (err error) { if err != nil { return } - _, _, e1 := syscall_syscall(SYS___TRUNCATE_A, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___TRUNCATE_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(length)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1109,9 +3104,11 @@ func Truncate(path string, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Tcgetattr(fildes int, termptr *Termios) (err error) { - _, _, e1 := syscall_syscall(SYS_TCGETATTR, uintptr(fildes), uintptr(unsafe.Pointer(termptr)), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TCGETATTR<<4, uintptr(fildes), uintptr(unsafe.Pointer(termptr))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1119,9 +3116,11 @@ func Tcgetattr(fildes int, termptr *Termios) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Tcsetattr(fildes int, when int, termptr *Termios) (err error) { - _, _, e1 := syscall_syscall(SYS_TCSETATTR, uintptr(fildes), uintptr(when), uintptr(unsafe.Pointer(termptr))) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TCSETATTR<<4, uintptr(fildes), uintptr(when), uintptr(unsafe.Pointer(termptr))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1129,7 +3128,9 @@ func Tcsetattr(fildes int, when int, termptr *Termios) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := syscall_syscall(SYS_UMASK, uintptr(mask), 0, 0) + runtime.EnterSyscall() + r0, _, _ := CallLeFuncWithErr(GetZosLibVec()+SYS_UMASK<<4, uintptr(mask)) + runtime.ExitSyscall() oldmask = int(r0) return } @@ -1142,10 +3143,49 @@ func Unlink(path string) (err error) { if err != nil { return } - _, _, e1 := syscall_syscall(SYS___UNLINK_A, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UNLINK_A<<4, uintptr(unsafe.Pointer(_p0))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UNLINKAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_UnlinkatAddr() *(func(dirfd int, path string, flags int) (err error)) + +var Unlinkat = enter_Unlinkat + +func enter_Unlinkat(dirfd int, path string, flags int) (err error) { + funcref := get_UnlinkatAddr() + if funcptrtest(GetZosLibVec()+SYS___UNLINKAT_A<<4, "") == 0 { + *funcref = impl_Unlinkat + } else { + *funcref = error_Unlinkat } + return (*funcref)(dirfd, path, flags) +} + +func error_Unlinkat(dirfd int, path string, flags int) (err error) { + err = ENOSYS return } @@ -1157,9 +3197,11 @@ func Utime(path string, utim *Utimbuf) (err error) { if err != nil { return } - _, _, e1 := syscall_syscall(SYS___UTIME_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(utim)), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIME_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(utim))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1172,11 +3214,91 @@ func open(path string, mode int, perm uint32) (fd int, err error) { if err != nil { return } - r0, _, e1 := syscall_syscall(SYS___OPEN_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPEN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + runtime.ExitSyscall() + fd = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPENAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode)) + runtime.ExitSyscall() + fd = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_openatAddr() *(func(dirfd int, path string, flags int, mode uint32) (fd int, err error)) + +var openat = enter_openat + +func enter_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + funcref := get_openatAddr() + if funcptrtest(GetZosLibVec()+SYS___OPENAT_A<<4, "") == 0 { + *funcref = impl_openat + } else { + *funcref = error_openat + } + return (*funcref)(dirfd, path, flags, mode) +} + +func error_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + fd = -1 + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func impl_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPENAT2_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), uintptr(size)) + runtime.ExitSyscall() fd = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_openat2Addr() *(func(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error)) + +var openat2 = enter_openat2 + +func enter_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) { + funcref := get_openat2Addr() + if funcptrtest(GetZosLibVec()+SYS___OPENAT2_A<<4, "") == 0 { + *funcref = impl_openat2 + } else { + *funcref = error_openat2 } + return (*funcref)(dirfd, path, open_how, size) +} + +func error_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) { + fd = -1 + err = ENOSYS return } @@ -1188,9 +3310,23 @@ func remove(path string) (err error) { if err != nil { return } - _, _, e1 := syscall_syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_REMOVE<<4, uintptr(unsafe.Pointer(_p0))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func waitid(idType int, id int, info *Siginfo, options int) (err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAITID<<4, uintptr(idType), uintptr(id), uintptr(unsafe.Pointer(info)), uintptr(options)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1198,10 +3334,12 @@ func remove(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) { - r0, _, e1 := syscall_syscall(SYS_WAITPID, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options)) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAITPID<<4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options)) + runtime.ExitSyscall() wpid = int(r0) - if e1 != 0 { - err = errnoErr(e1) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1209,9 +3347,9 @@ func waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func gettimeofday(tv *timeval_zos) (err error) { - _, _, e1 := syscall_rawsyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETTIMEOFDAY<<4, uintptr(unsafe.Pointer(tv))) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1219,9 +3357,9 @@ func gettimeofday(tv *timeval_zos) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe(p *[2]_C_int) (err error) { - _, _, e1 := syscall_rawsyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PIPE<<4, uintptr(unsafe.Pointer(p))) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } @@ -1234,20 +3372,87 @@ func utimes(path string, timeval *[2]Timeval) (err error) { if err != nil { return } - _, _, e1 := syscall_syscall(SYS___UTIMES_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) - if e1 != 0 { - err = errnoErr(e1) + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIMES_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval))) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) { - r0, _, e1 := syscall_syscall6(SYS_SELECT, uintptr(nmsgsfds), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) - ret = int(r0) - if e1 != 0 { - err = errnoErr(e1) +func impl_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIMENSAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(ts)), uintptr(flags)) + runtime.ExitSyscall() + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +//go:nosplit +func get_utimensatAddr() *(func(dirfd int, path string, ts *[2]Timespec, flags int) (err error)) + +var utimensat = enter_utimensat + +func enter_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) { + funcref := get_utimensatAddr() + if funcptrtest(GetZosLibVec()+SYS___UTIMENSAT_A<<4, "") == 0 { + *funcref = impl_utimensat + } else { + *funcref = error_utimensat + } + return (*funcref)(dirfd, path, ts, flags) +} + +func error_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) { + err = ENOSYS + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Posix_openpt(oflag int) (fd int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_POSIX_OPENPT<<4, uintptr(oflag)) + runtime.ExitSyscall() + fd = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Grantpt(fildes int) (rc int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GRANTPT<<4, uintptr(fildes)) + runtime.ExitSyscall() + rc = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlockpt(fildes int) (rc int, err error) { + runtime.EnterSyscall() + r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_UNLOCKPT<<4, uintptr(fildes)) + runtime.ExitSyscall() + rc = int(r0) + if int64(r0) == -1 { + err = errnoErr2(e1, e2) } return } diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index 0cc3ce496e2..53aef5dc58d 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -452,4 +452,9 @@ const ( SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 + SYS_STATMOUNT = 457 + SYS_LISTMOUNT = 458 + SYS_LSM_GET_SELF_ATTR = 459 + SYS_LSM_SET_SELF_ATTR = 460 + SYS_LSM_LIST_MODULES = 461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index 856d92d69ef..71d524763d3 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -374,4 +374,9 @@ const ( SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 + SYS_STATMOUNT = 457 + SYS_LISTMOUNT = 458 + SYS_LSM_GET_SELF_ATTR = 459 + SYS_LSM_SET_SELF_ATTR = 460 + SYS_LSM_LIST_MODULES = 461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index 8d467094cf5..c747706131c 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -416,4 +416,9 @@ const ( SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 + SYS_STATMOUNT = 457 + SYS_LISTMOUNT = 458 + SYS_LSM_GET_SELF_ATTR = 459 + SYS_LSM_SET_SELF_ATTR = 460 + SYS_LSM_LIST_MODULES = 461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index edc173244d0..f96e214f6d4 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -319,4 +319,9 @@ const ( SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 + SYS_STATMOUNT = 457 + SYS_LISTMOUNT = 458 + SYS_LSM_GET_SELF_ATTR = 459 + SYS_LSM_SET_SELF_ATTR = 460 + SYS_LSM_LIST_MODULES = 461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go index 445eba20615..28425346cf1 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go @@ -313,4 +313,9 @@ const ( SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 + SYS_STATMOUNT = 457 + SYS_LISTMOUNT = 458 + SYS_LSM_GET_SELF_ATTR = 459 + SYS_LSM_SET_SELF_ATTR = 460 + SYS_LSM_LIST_MODULES = 461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index adba01bca70..d0953018dae 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -436,4 +436,9 @@ const ( SYS_FUTEX_WAKE = 4454 SYS_FUTEX_WAIT = 4455 SYS_FUTEX_REQUEUE = 4456 + SYS_STATMOUNT = 4457 + SYS_LISTMOUNT = 4458 + SYS_LSM_GET_SELF_ATTR = 4459 + SYS_LSM_SET_SELF_ATTR = 4460 + SYS_LSM_LIST_MODULES = 4461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 014c4e9c7a7..295c7f4b818 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -366,4 +366,9 @@ const ( SYS_FUTEX_WAKE = 5454 SYS_FUTEX_WAIT = 5455 SYS_FUTEX_REQUEUE = 5456 + SYS_STATMOUNT = 5457 + SYS_LISTMOUNT = 5458 + SYS_LSM_GET_SELF_ATTR = 5459 + SYS_LSM_SET_SELF_ATTR = 5460 + SYS_LSM_LIST_MODULES = 5461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index ccc97d74d05..d1a9eaca7a4 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -366,4 +366,9 @@ const ( SYS_FUTEX_WAKE = 5454 SYS_FUTEX_WAIT = 5455 SYS_FUTEX_REQUEUE = 5456 + SYS_STATMOUNT = 5457 + SYS_LISTMOUNT = 5458 + SYS_LSM_GET_SELF_ATTR = 5459 + SYS_LSM_SET_SELF_ATTR = 5460 + SYS_LSM_LIST_MODULES = 5461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index ec2b64a95d7..bec157c39fd 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -436,4 +436,9 @@ const ( SYS_FUTEX_WAKE = 4454 SYS_FUTEX_WAIT = 4455 SYS_FUTEX_REQUEUE = 4456 + SYS_STATMOUNT = 4457 + SYS_LISTMOUNT = 4458 + SYS_LSM_GET_SELF_ATTR = 4459 + SYS_LSM_SET_SELF_ATTR = 4460 + SYS_LSM_LIST_MODULES = 4461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go index 21a839e338b..7ee7bdc435c 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go @@ -443,4 +443,9 @@ const ( SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 + SYS_STATMOUNT = 457 + SYS_LISTMOUNT = 458 + SYS_LSM_GET_SELF_ATTR = 459 + SYS_LSM_SET_SELF_ATTR = 460 + SYS_LSM_LIST_MODULES = 461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index c11121ec3b4..fad1f25b449 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -415,4 +415,9 @@ const ( SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 + SYS_STATMOUNT = 457 + SYS_LISTMOUNT = 458 + SYS_LSM_GET_SELF_ATTR = 459 + SYS_LSM_SET_SELF_ATTR = 460 + SYS_LSM_LIST_MODULES = 461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index 909b631fcb4..7d3e16357d6 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -415,4 +415,9 @@ const ( SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 + SYS_STATMOUNT = 457 + SYS_LISTMOUNT = 458 + SYS_LSM_GET_SELF_ATTR = 459 + SYS_LSM_SET_SELF_ATTR = 460 + SYS_LSM_LIST_MODULES = 461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index e49bed16ea6..0ed53ad9f7e 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -320,4 +320,9 @@ const ( SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 + SYS_STATMOUNT = 457 + SYS_LISTMOUNT = 458 + SYS_LSM_GET_SELF_ATTR = 459 + SYS_LSM_SET_SELF_ATTR = 460 + SYS_LSM_LIST_MODULES = 461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index 66017d2d32b..2fba04ad500 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -381,4 +381,9 @@ const ( SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 + SYS_STATMOUNT = 457 + SYS_LISTMOUNT = 458 + SYS_LSM_GET_SELF_ATTR = 459 + SYS_LSM_SET_SELF_ATTR = 460 + SYS_LSM_LIST_MODULES = 461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go index 47bab18dced..621d00d741b 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go @@ -394,4 +394,9 @@ const ( SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 + SYS_STATMOUNT = 457 + SYS_LISTMOUNT = 458 + SYS_LSM_GET_SELF_ATTR = 459 + SYS_LSM_SET_SELF_ATTR = 460 + SYS_LSM_LIST_MODULES = 461 ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go index b2e30858199..5e8c263ca9c 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go @@ -1,2669 +1,2852 @@ -// Copyright 2020 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. +// go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s +// Code generated by the command above; see README.md. DO NOT EDIT. //go:build zos && s390x package unix -// TODO: auto-generate. - const ( - SYS_ACOSD128 = 0xB80 - SYS_ACOSD32 = 0xB7E - SYS_ACOSD64 = 0xB7F - SYS_ACOSHD128 = 0xB83 - SYS_ACOSHD32 = 0xB81 - SYS_ACOSHD64 = 0xB82 - SYS_AIO_FSYNC = 0xC69 - SYS_ASCTIME = 0x0AE - SYS_ASCTIME64 = 0xCD7 - SYS_ASCTIME64_R = 0xCD8 - SYS_ASIND128 = 0xB86 - SYS_ASIND32 = 0xB84 - SYS_ASIND64 = 0xB85 - SYS_ASINHD128 = 0xB89 - SYS_ASINHD32 = 0xB87 - SYS_ASINHD64 = 0xB88 - SYS_ATAN2D128 = 0xB8F - SYS_ATAN2D32 = 0xB8D - SYS_ATAN2D64 = 0xB8E - SYS_ATAND128 = 0xB8C - SYS_ATAND32 = 0xB8A - SYS_ATAND64 = 0xB8B - SYS_ATANHD128 = 0xB92 - SYS_ATANHD32 = 0xB90 - SYS_ATANHD64 = 0xB91 - SYS_BIND2ADDRSEL = 0xD59 - SYS_C16RTOMB = 0xD40 - SYS_C32RTOMB = 0xD41 - SYS_CBRTD128 = 0xB95 - SYS_CBRTD32 = 0xB93 - SYS_CBRTD64 = 0xB94 - SYS_CEILD128 = 0xB98 - SYS_CEILD32 = 0xB96 - SYS_CEILD64 = 0xB97 - SYS_CLEARENV = 0x0C9 - SYS_CLEARERR_UNLOCKED = 0xCA1 - SYS_CLOCK = 0x0AA - SYS_CLOGL = 0xA00 - SYS_CLRMEMF = 0x0BD - SYS_CONJ = 0xA03 - SYS_CONJF = 0xA06 - SYS_CONJL = 0xA09 - SYS_COPYSIGND128 = 0xB9E - SYS_COPYSIGND32 = 0xB9C - SYS_COPYSIGND64 = 0xB9D - SYS_COSD128 = 0xBA1 - SYS_COSD32 = 0xB9F - SYS_COSD64 = 0xBA0 - SYS_COSHD128 = 0xBA4 - SYS_COSHD32 = 0xBA2 - SYS_COSHD64 = 0xBA3 - SYS_CPOW = 0xA0C - SYS_CPOWF = 0xA0F - SYS_CPOWL = 0xA12 - SYS_CPROJ = 0xA15 - SYS_CPROJF = 0xA18 - SYS_CPROJL = 0xA1B - SYS_CREAL = 0xA1E - SYS_CREALF = 0xA21 - SYS_CREALL = 0xA24 - SYS_CSIN = 0xA27 - SYS_CSINF = 0xA2A - SYS_CSINH = 0xA30 - SYS_CSINHF = 0xA33 - SYS_CSINHL = 0xA36 - SYS_CSINL = 0xA2D - SYS_CSNAP = 0x0C5 - SYS_CSQRT = 0xA39 - SYS_CSQRTF = 0xA3C - SYS_CSQRTL = 0xA3F - SYS_CTAN = 0xA42 - SYS_CTANF = 0xA45 - SYS_CTANH = 0xA4B - SYS_CTANHF = 0xA4E - SYS_CTANHL = 0xA51 - SYS_CTANL = 0xA48 - SYS_CTIME = 0x0AB - SYS_CTIME64 = 0xCD9 - SYS_CTIME64_R = 0xCDA - SYS_CTRACE = 0x0C6 - SYS_DIFFTIME = 0x0A7 - SYS_DIFFTIME64 = 0xCDB - SYS_DLADDR = 0xC82 - SYS_DYNALLOC = 0x0C3 - SYS_DYNFREE = 0x0C2 - SYS_ERFCD128 = 0xBAA - SYS_ERFCD32 = 0xBA8 - SYS_ERFCD64 = 0xBA9 - SYS_ERFD128 = 0xBA7 - SYS_ERFD32 = 0xBA5 - SYS_ERFD64 = 0xBA6 - SYS_EXP2D128 = 0xBB0 - SYS_EXP2D32 = 0xBAE - SYS_EXP2D64 = 0xBAF - SYS_EXPD128 = 0xBAD - SYS_EXPD32 = 0xBAB - SYS_EXPD64 = 0xBAC - SYS_EXPM1D128 = 0xBB3 - SYS_EXPM1D32 = 0xBB1 - SYS_EXPM1D64 = 0xBB2 - SYS_FABSD128 = 0xBB6 - SYS_FABSD32 = 0xBB4 - SYS_FABSD64 = 0xBB5 - SYS_FDELREC_UNLOCKED = 0xCA2 - SYS_FDIMD128 = 0xBB9 - SYS_FDIMD32 = 0xBB7 - SYS_FDIMD64 = 0xBB8 - SYS_FDOPEN_UNLOCKED = 0xCFC - SYS_FECLEAREXCEPT = 0xAEA - SYS_FEGETENV = 0xAEB - SYS_FEGETEXCEPTFLAG = 0xAEC - SYS_FEGETROUND = 0xAED - SYS_FEHOLDEXCEPT = 0xAEE - SYS_FEOF_UNLOCKED = 0xCA3 - SYS_FERAISEEXCEPT = 0xAEF - SYS_FERROR_UNLOCKED = 0xCA4 - SYS_FESETENV = 0xAF0 - SYS_FESETEXCEPTFLAG = 0xAF1 - SYS_FESETROUND = 0xAF2 - SYS_FETCHEP = 0x0BF - SYS_FETESTEXCEPT = 0xAF3 - SYS_FEUPDATEENV = 0xAF4 - SYS_FE_DEC_GETROUND = 0xBBA - SYS_FE_DEC_SETROUND = 0xBBB - SYS_FFLUSH_UNLOCKED = 0xCA5 - SYS_FGETC_UNLOCKED = 0xC80 - SYS_FGETPOS64 = 0xCEE - SYS_FGETPOS64_UNLOCKED = 0xCF4 - SYS_FGETPOS_UNLOCKED = 0xCA6 - SYS_FGETS_UNLOCKED = 0xC7C - SYS_FGETWC_UNLOCKED = 0xCA7 - SYS_FGETWS_UNLOCKED = 0xCA8 - SYS_FILENO_UNLOCKED = 0xCA9 - SYS_FLDATA = 0x0C1 - SYS_FLDATA_UNLOCKED = 0xCAA - SYS_FLOCATE_UNLOCKED = 0xCAB - SYS_FLOORD128 = 0xBBE - SYS_FLOORD32 = 0xBBC - SYS_FLOORD64 = 0xBBD - SYS_FMA = 0xA63 - SYS_FMAD128 = 0xBC1 - SYS_FMAD32 = 0xBBF - SYS_FMAD64 = 0xBC0 - SYS_FMAF = 0xA66 - SYS_FMAL = 0xA69 - SYS_FMAX = 0xA6C - SYS_FMAXD128 = 0xBC4 - SYS_FMAXD32 = 0xBC2 - SYS_FMAXD64 = 0xBC3 - SYS_FMAXF = 0xA6F - SYS_FMAXL = 0xA72 - SYS_FMIN = 0xA75 - SYS_FMIND128 = 0xBC7 - SYS_FMIND32 = 0xBC5 - SYS_FMIND64 = 0xBC6 - SYS_FMINF = 0xA78 - SYS_FMINL = 0xA7B - SYS_FMODD128 = 0xBCA - SYS_FMODD32 = 0xBC8 - SYS_FMODD64 = 0xBC9 - SYS_FOPEN64 = 0xD49 - SYS_FOPEN64_UNLOCKED = 0xD4A - SYS_FOPEN_UNLOCKED = 0xCFA - SYS_FPRINTF_UNLOCKED = 0xCAC - SYS_FPUTC_UNLOCKED = 0xC81 - SYS_FPUTS_UNLOCKED = 0xC7E - SYS_FPUTWC_UNLOCKED = 0xCAD - SYS_FPUTWS_UNLOCKED = 0xCAE - SYS_FREAD_NOUPDATE = 0xCEC - SYS_FREAD_NOUPDATE_UNLOCKED = 0xCED - SYS_FREAD_UNLOCKED = 0xC7B - SYS_FREEIFADDRS = 0xCE6 - SYS_FREOPEN64 = 0xD4B - SYS_FREOPEN64_UNLOCKED = 0xD4C - SYS_FREOPEN_UNLOCKED = 0xCFB - SYS_FREXPD128 = 0xBCE - SYS_FREXPD32 = 0xBCC - SYS_FREXPD64 = 0xBCD - SYS_FSCANF_UNLOCKED = 0xCAF - SYS_FSEEK64 = 0xCEF - SYS_FSEEK64_UNLOCKED = 0xCF5 - SYS_FSEEKO64 = 0xCF0 - SYS_FSEEKO64_UNLOCKED = 0xCF6 - SYS_FSEEKO_UNLOCKED = 0xCB1 - SYS_FSEEK_UNLOCKED = 0xCB0 - SYS_FSETPOS64 = 0xCF1 - SYS_FSETPOS64_UNLOCKED = 0xCF7 - SYS_FSETPOS_UNLOCKED = 0xCB3 - SYS_FTELL64 = 0xCF2 - SYS_FTELL64_UNLOCKED = 0xCF8 - SYS_FTELLO64 = 0xCF3 - SYS_FTELLO64_UNLOCKED = 0xCF9 - SYS_FTELLO_UNLOCKED = 0xCB5 - SYS_FTELL_UNLOCKED = 0xCB4 - SYS_FUPDATE = 0x0B5 - SYS_FUPDATE_UNLOCKED = 0xCB7 - SYS_FWIDE_UNLOCKED = 0xCB8 - SYS_FWPRINTF_UNLOCKED = 0xCB9 - SYS_FWRITE_UNLOCKED = 0xC7A - SYS_FWSCANF_UNLOCKED = 0xCBA - SYS_GETDATE64 = 0xD4F - SYS_GETIFADDRS = 0xCE7 - SYS_GETIPV4SOURCEFILTER = 0xC77 - SYS_GETSOURCEFILTER = 0xC79 - SYS_GETSYNTX = 0x0FD - SYS_GETS_UNLOCKED = 0xC7D - SYS_GETTIMEOFDAY64 = 0xD50 - SYS_GETWCHAR_UNLOCKED = 0xCBC - SYS_GETWC_UNLOCKED = 0xCBB - SYS_GMTIME = 0x0B0 - SYS_GMTIME64 = 0xCDC - SYS_GMTIME64_R = 0xCDD - SYS_HYPOTD128 = 0xBD1 - SYS_HYPOTD32 = 0xBCF - SYS_HYPOTD64 = 0xBD0 - SYS_ILOGBD128 = 0xBD4 - SYS_ILOGBD32 = 0xBD2 - SYS_ILOGBD64 = 0xBD3 - SYS_ILOGBF = 0xA7E - SYS_ILOGBL = 0xA81 - SYS_INET6_IS_SRCADDR = 0xD5A - SYS_ISBLANK = 0x0FE - SYS_ISWALNUM = 0x0FF - SYS_LDEXPD128 = 0xBD7 - SYS_LDEXPD32 = 0xBD5 - SYS_LDEXPD64 = 0xBD6 - SYS_LGAMMAD128 = 0xBDA - SYS_LGAMMAD32 = 0xBD8 - SYS_LGAMMAD64 = 0xBD9 - SYS_LIO_LISTIO = 0xC6A - SYS_LLRINT = 0xA84 - SYS_LLRINTD128 = 0xBDD - SYS_LLRINTD32 = 0xBDB - SYS_LLRINTD64 = 0xBDC - SYS_LLRINTF = 0xA87 - SYS_LLRINTL = 0xA8A - SYS_LLROUND = 0xA8D - SYS_LLROUNDD128 = 0xBE0 - SYS_LLROUNDD32 = 0xBDE - SYS_LLROUNDD64 = 0xBDF - SYS_LLROUNDF = 0xA90 - SYS_LLROUNDL = 0xA93 - SYS_LOCALTIM = 0x0B1 - SYS_LOCALTIME = 0x0B1 - SYS_LOCALTIME64 = 0xCDE - SYS_LOCALTIME64_R = 0xCDF - SYS_LOG10D128 = 0xBE6 - SYS_LOG10D32 = 0xBE4 - SYS_LOG10D64 = 0xBE5 - SYS_LOG1PD128 = 0xBE9 - SYS_LOG1PD32 = 0xBE7 - SYS_LOG1PD64 = 0xBE8 - SYS_LOG2D128 = 0xBEC - SYS_LOG2D32 = 0xBEA - SYS_LOG2D64 = 0xBEB - SYS_LOGBD128 = 0xBEF - SYS_LOGBD32 = 0xBED - SYS_LOGBD64 = 0xBEE - SYS_LOGBF = 0xA96 - SYS_LOGBL = 0xA99 - SYS_LOGD128 = 0xBE3 - SYS_LOGD32 = 0xBE1 - SYS_LOGD64 = 0xBE2 - SYS_LRINT = 0xA9C - SYS_LRINTD128 = 0xBF2 - SYS_LRINTD32 = 0xBF0 - SYS_LRINTD64 = 0xBF1 - SYS_LRINTF = 0xA9F - SYS_LRINTL = 0xAA2 - SYS_LROUNDD128 = 0xBF5 - SYS_LROUNDD32 = 0xBF3 - SYS_LROUNDD64 = 0xBF4 - SYS_LROUNDL = 0xAA5 - SYS_MBLEN = 0x0AF - SYS_MBRTOC16 = 0xD42 - SYS_MBRTOC32 = 0xD43 - SYS_MEMSET = 0x0A3 - SYS_MKTIME = 0x0AC - SYS_MKTIME64 = 0xCE0 - SYS_MODFD128 = 0xBF8 - SYS_MODFD32 = 0xBF6 - SYS_MODFD64 = 0xBF7 - SYS_NAN = 0xAA8 - SYS_NAND128 = 0xBFB - SYS_NAND32 = 0xBF9 - SYS_NAND64 = 0xBFA - SYS_NANF = 0xAAA - SYS_NANL = 0xAAC - SYS_NEARBYINT = 0xAAE - SYS_NEARBYINTD128 = 0xBFE - SYS_NEARBYINTD32 = 0xBFC - SYS_NEARBYINTD64 = 0xBFD - SYS_NEARBYINTF = 0xAB1 - SYS_NEARBYINTL = 0xAB4 - SYS_NEXTAFTERD128 = 0xC01 - SYS_NEXTAFTERD32 = 0xBFF - SYS_NEXTAFTERD64 = 0xC00 - SYS_NEXTAFTERF = 0xAB7 - SYS_NEXTAFTERL = 0xABA - SYS_NEXTTOWARD = 0xABD - SYS_NEXTTOWARDD128 = 0xC04 - SYS_NEXTTOWARDD32 = 0xC02 - SYS_NEXTTOWARDD64 = 0xC03 - SYS_NEXTTOWARDF = 0xAC0 - SYS_NEXTTOWARDL = 0xAC3 - SYS_NL_LANGINFO = 0x0FC - SYS_PERROR_UNLOCKED = 0xCBD - SYS_POSIX_FALLOCATE = 0xCE8 - SYS_POSIX_MEMALIGN = 0xCE9 - SYS_POSIX_OPENPT = 0xC66 - SYS_POWD128 = 0xC07 - SYS_POWD32 = 0xC05 - SYS_POWD64 = 0xC06 - SYS_PRINTF_UNLOCKED = 0xCBE - SYS_PSELECT = 0xC67 - SYS_PTHREAD_ATTR_GETSTACK = 0xB3E - SYS_PTHREAD_ATTR_SETSTACK = 0xB3F - SYS_PTHREAD_SECURITY_APPLID_NP = 0xCE4 - SYS_PUTS_UNLOCKED = 0xC7F - SYS_PUTWCHAR_UNLOCKED = 0xCC0 - SYS_PUTWC_UNLOCKED = 0xCBF - SYS_QUANTEXPD128 = 0xD46 - SYS_QUANTEXPD32 = 0xD44 - SYS_QUANTEXPD64 = 0xD45 - SYS_QUANTIZED128 = 0xC0A - SYS_QUANTIZED32 = 0xC08 - SYS_QUANTIZED64 = 0xC09 - SYS_REMAINDERD128 = 0xC0D - SYS_REMAINDERD32 = 0xC0B - SYS_REMAINDERD64 = 0xC0C - SYS_RESIZE_ALLOC = 0xCEB - SYS_REWIND_UNLOCKED = 0xCC1 - SYS_RINTD128 = 0xC13 - SYS_RINTD32 = 0xC11 - SYS_RINTD64 = 0xC12 - SYS_RINTF = 0xACB - SYS_RINTL = 0xACD - SYS_ROUND = 0xACF - SYS_ROUNDD128 = 0xC16 - SYS_ROUNDD32 = 0xC14 - SYS_ROUNDD64 = 0xC15 - SYS_ROUNDF = 0xAD2 - SYS_ROUNDL = 0xAD5 - SYS_SAMEQUANTUMD128 = 0xC19 - SYS_SAMEQUANTUMD32 = 0xC17 - SYS_SAMEQUANTUMD64 = 0xC18 - SYS_SCALBLN = 0xAD8 - SYS_SCALBLND128 = 0xC1C - SYS_SCALBLND32 = 0xC1A - SYS_SCALBLND64 = 0xC1B - SYS_SCALBLNF = 0xADB - SYS_SCALBLNL = 0xADE - SYS_SCALBND128 = 0xC1F - SYS_SCALBND32 = 0xC1D - SYS_SCALBND64 = 0xC1E - SYS_SCALBNF = 0xAE3 - SYS_SCALBNL = 0xAE6 - SYS_SCANF_UNLOCKED = 0xCC2 - SYS_SCHED_YIELD = 0xB32 - SYS_SETENV = 0x0C8 - SYS_SETIPV4SOURCEFILTER = 0xC76 - SYS_SETSOURCEFILTER = 0xC78 - SYS_SHM_OPEN = 0xC8C - SYS_SHM_UNLINK = 0xC8D - SYS_SIND128 = 0xC22 - SYS_SIND32 = 0xC20 - SYS_SIND64 = 0xC21 - SYS_SINHD128 = 0xC25 - SYS_SINHD32 = 0xC23 - SYS_SINHD64 = 0xC24 - SYS_SIZEOF_ALLOC = 0xCEA - SYS_SOCKATMARK = 0xC68 - SYS_SQRTD128 = 0xC28 - SYS_SQRTD32 = 0xC26 - SYS_SQRTD64 = 0xC27 - SYS_STRCHR = 0x0A0 - SYS_STRCSPN = 0x0A1 - SYS_STRERROR = 0x0A8 - SYS_STRERROR_R = 0xB33 - SYS_STRFTIME = 0x0B2 - SYS_STRLEN = 0x0A9 - SYS_STRPBRK = 0x0A2 - SYS_STRSPN = 0x0A4 - SYS_STRSTR = 0x0A5 - SYS_STRTOD128 = 0xC2B - SYS_STRTOD32 = 0xC29 - SYS_STRTOD64 = 0xC2A - SYS_STRTOK = 0x0A6 - SYS_TAND128 = 0xC2E - SYS_TAND32 = 0xC2C - SYS_TAND64 = 0xC2D - SYS_TANHD128 = 0xC31 - SYS_TANHD32 = 0xC2F - SYS_TANHD64 = 0xC30 - SYS_TGAMMAD128 = 0xC34 - SYS_TGAMMAD32 = 0xC32 - SYS_TGAMMAD64 = 0xC33 - SYS_TIME = 0x0AD - SYS_TIME64 = 0xCE1 - SYS_TMPFILE64 = 0xD4D - SYS_TMPFILE64_UNLOCKED = 0xD4E - SYS_TMPFILE_UNLOCKED = 0xCFD - SYS_TRUNCD128 = 0xC40 - SYS_TRUNCD32 = 0xC3E - SYS_TRUNCD64 = 0xC3F - SYS_UNGETC_UNLOCKED = 0xCC3 - SYS_UNGETWC_UNLOCKED = 0xCC4 - SYS_UNSETENV = 0xB34 - SYS_VFPRINTF_UNLOCKED = 0xCC5 - SYS_VFSCANF_UNLOCKED = 0xCC7 - SYS_VFWPRINTF_UNLOCKED = 0xCC9 - SYS_VFWSCANF_UNLOCKED = 0xCCB - SYS_VPRINTF_UNLOCKED = 0xCCD - SYS_VSCANF_UNLOCKED = 0xCCF - SYS_VWPRINTF_UNLOCKED = 0xCD1 - SYS_VWSCANF_UNLOCKED = 0xCD3 - SYS_WCSTOD128 = 0xC43 - SYS_WCSTOD32 = 0xC41 - SYS_WCSTOD64 = 0xC42 - SYS_WPRINTF_UNLOCKED = 0xCD5 - SYS_WSCANF_UNLOCKED = 0xCD6 - SYS__FLUSHLBF = 0xD68 - SYS__FLUSHLBF_UNLOCKED = 0xD6F - SYS___ACOSHF_H = 0xA54 - SYS___ACOSHL_H = 0xA55 - SYS___ASINHF_H = 0xA56 - SYS___ASINHL_H = 0xA57 - SYS___ATANPID128 = 0xC6D - SYS___ATANPID32 = 0xC6B - SYS___ATANPID64 = 0xC6C - SYS___CBRTF_H = 0xA58 - SYS___CBRTL_H = 0xA59 - SYS___CDUMP = 0x0C4 - SYS___CLASS = 0xAFA - SYS___CLASS2 = 0xB99 - SYS___CLASS2D128 = 0xC99 - SYS___CLASS2D32 = 0xC97 - SYS___CLASS2D64 = 0xC98 - SYS___CLASS2F = 0xC91 - SYS___CLASS2F_B = 0xC93 - SYS___CLASS2F_H = 0xC94 - SYS___CLASS2L = 0xC92 - SYS___CLASS2L_B = 0xC95 - SYS___CLASS2L_H = 0xC96 - SYS___CLASS2_B = 0xB9A - SYS___CLASS2_H = 0xB9B - SYS___CLASS_B = 0xAFB - SYS___CLASS_H = 0xAFC - SYS___CLOGL_B = 0xA01 - SYS___CLOGL_H = 0xA02 - SYS___CLRENV = 0x0C9 - SYS___CLRMF = 0x0BD - SYS___CODEPAGE_INFO = 0xC64 - SYS___CONJF_B = 0xA07 - SYS___CONJF_H = 0xA08 - SYS___CONJL_B = 0xA0A - SYS___CONJL_H = 0xA0B - SYS___CONJ_B = 0xA04 - SYS___CONJ_H = 0xA05 - SYS___COPYSIGN_B = 0xA5A - SYS___COPYSIGN_H = 0xAF5 - SYS___COSPID128 = 0xC70 - SYS___COSPID32 = 0xC6E - SYS___COSPID64 = 0xC6F - SYS___CPOWF_B = 0xA10 - SYS___CPOWF_H = 0xA11 - SYS___CPOWL_B = 0xA13 - SYS___CPOWL_H = 0xA14 - SYS___CPOW_B = 0xA0D - SYS___CPOW_H = 0xA0E - SYS___CPROJF_B = 0xA19 - SYS___CPROJF_H = 0xA1A - SYS___CPROJL_B = 0xA1C - SYS___CPROJL_H = 0xA1D - SYS___CPROJ_B = 0xA16 - SYS___CPROJ_H = 0xA17 - SYS___CREALF_B = 0xA22 - SYS___CREALF_H = 0xA23 - SYS___CREALL_B = 0xA25 - SYS___CREALL_H = 0xA26 - SYS___CREAL_B = 0xA1F - SYS___CREAL_H = 0xA20 - SYS___CSINF_B = 0xA2B - SYS___CSINF_H = 0xA2C - SYS___CSINHF_B = 0xA34 - SYS___CSINHF_H = 0xA35 - SYS___CSINHL_B = 0xA37 - SYS___CSINHL_H = 0xA38 - SYS___CSINH_B = 0xA31 - SYS___CSINH_H = 0xA32 - SYS___CSINL_B = 0xA2E - SYS___CSINL_H = 0xA2F - SYS___CSIN_B = 0xA28 - SYS___CSIN_H = 0xA29 - SYS___CSNAP = 0x0C5 - SYS___CSQRTF_B = 0xA3D - SYS___CSQRTF_H = 0xA3E - SYS___CSQRTL_B = 0xA40 - SYS___CSQRTL_H = 0xA41 - SYS___CSQRT_B = 0xA3A - SYS___CSQRT_H = 0xA3B - SYS___CTANF_B = 0xA46 - SYS___CTANF_H = 0xA47 - SYS___CTANHF_B = 0xA4F - SYS___CTANHF_H = 0xA50 - SYS___CTANHL_B = 0xA52 - SYS___CTANHL_H = 0xA53 - SYS___CTANH_B = 0xA4C - SYS___CTANH_H = 0xA4D - SYS___CTANL_B = 0xA49 - SYS___CTANL_H = 0xA4A - SYS___CTAN_B = 0xA43 - SYS___CTAN_H = 0xA44 - SYS___CTEST = 0x0C7 - SYS___CTRACE = 0x0C6 - SYS___D1TOP = 0xC9B - SYS___D2TOP = 0xC9C - SYS___D4TOP = 0xC9D - SYS___DYNALL = 0x0C3 - SYS___DYNFRE = 0x0C2 - SYS___EXP2F_H = 0xA5E - SYS___EXP2L_H = 0xA5F - SYS___EXP2_H = 0xA5D - SYS___EXPM1F_H = 0xA5B - SYS___EXPM1L_H = 0xA5C - SYS___FBUFSIZE = 0xD60 - SYS___FLBF = 0xD62 - SYS___FLDATA = 0x0C1 - SYS___FMAF_B = 0xA67 - SYS___FMAF_H = 0xA68 - SYS___FMAL_B = 0xA6A - SYS___FMAL_H = 0xA6B - SYS___FMAXF_B = 0xA70 - SYS___FMAXF_H = 0xA71 - SYS___FMAXL_B = 0xA73 - SYS___FMAXL_H = 0xA74 - SYS___FMAX_B = 0xA6D - SYS___FMAX_H = 0xA6E - SYS___FMA_B = 0xA64 - SYS___FMA_H = 0xA65 - SYS___FMINF_B = 0xA79 - SYS___FMINF_H = 0xA7A - SYS___FMINL_B = 0xA7C - SYS___FMINL_H = 0xA7D - SYS___FMIN_B = 0xA76 - SYS___FMIN_H = 0xA77 - SYS___FPENDING = 0xD61 - SYS___FPENDING_UNLOCKED = 0xD6C - SYS___FPURGE = 0xD69 - SYS___FPURGE_UNLOCKED = 0xD70 - SYS___FP_CAST_D = 0xBCB - SYS___FREADABLE = 0xD63 - SYS___FREADAHEAD = 0xD6A - SYS___FREADAHEAD_UNLOCKED = 0xD71 - SYS___FREADING = 0xD65 - SYS___FREADING_UNLOCKED = 0xD6D - SYS___FSEEK2 = 0xB3C - SYS___FSETERR = 0xD6B - SYS___FSETLOCKING = 0xD67 - SYS___FTCHEP = 0x0BF - SYS___FTELL2 = 0xB3B - SYS___FUPDT = 0x0B5 - SYS___FWRITABLE = 0xD64 - SYS___FWRITING = 0xD66 - SYS___FWRITING_UNLOCKED = 0xD6E - SYS___GETCB = 0x0B4 - SYS___GETGRGID1 = 0xD5B - SYS___GETGRNAM1 = 0xD5C - SYS___GETTHENT = 0xCE5 - SYS___GETTOD = 0xD3E - SYS___HYPOTF_H = 0xAF6 - SYS___HYPOTL_H = 0xAF7 - SYS___ILOGBF_B = 0xA7F - SYS___ILOGBF_H = 0xA80 - SYS___ILOGBL_B = 0xA82 - SYS___ILOGBL_H = 0xA83 - SYS___ISBLANK_A = 0xB2E - SYS___ISBLNK = 0x0FE - SYS___ISWBLANK_A = 0xB2F - SYS___LE_CEEGTJS = 0xD72 - SYS___LE_TRACEBACK = 0xB7A - SYS___LGAMMAL_H = 0xA62 - SYS___LGAMMA_B_C99 = 0xB39 - SYS___LGAMMA_H_C99 = 0xB38 - SYS___LGAMMA_R_C99 = 0xB3A - SYS___LLRINTF_B = 0xA88 - SYS___LLRINTF_H = 0xA89 - SYS___LLRINTL_B = 0xA8B - SYS___LLRINTL_H = 0xA8C - SYS___LLRINT_B = 0xA85 - SYS___LLRINT_H = 0xA86 - SYS___LLROUNDF_B = 0xA91 - SYS___LLROUNDF_H = 0xA92 - SYS___LLROUNDL_B = 0xA94 - SYS___LLROUNDL_H = 0xA95 - SYS___LLROUND_B = 0xA8E - SYS___LLROUND_H = 0xA8F - SYS___LOCALE_CTL = 0xD47 - SYS___LOG1PF_H = 0xA60 - SYS___LOG1PL_H = 0xA61 - SYS___LOGBF_B = 0xA97 - SYS___LOGBF_H = 0xA98 - SYS___LOGBL_B = 0xA9A - SYS___LOGBL_H = 0xA9B - SYS___LOGIN_APPLID = 0xCE2 - SYS___LRINTF_B = 0xAA0 - SYS___LRINTF_H = 0xAA1 - SYS___LRINTL_B = 0xAA3 - SYS___LRINTL_H = 0xAA4 - SYS___LRINT_B = 0xA9D - SYS___LRINT_H = 0xA9E - SYS___LROUNDF_FIXUP = 0xB31 - SYS___LROUNDL_B = 0xAA6 - SYS___LROUNDL_H = 0xAA7 - SYS___LROUND_FIXUP = 0xB30 - SYS___MOSERVICES = 0xD3D - SYS___MUST_STAY_CLEAN = 0xB7C - SYS___NANF_B = 0xAAB - SYS___NANL_B = 0xAAD - SYS___NAN_B = 0xAA9 - SYS___NEARBYINTF_B = 0xAB2 - SYS___NEARBYINTF_H = 0xAB3 - SYS___NEARBYINTL_B = 0xAB5 - SYS___NEARBYINTL_H = 0xAB6 - SYS___NEARBYINT_B = 0xAAF - SYS___NEARBYINT_H = 0xAB0 - SYS___NEXTAFTERF_B = 0xAB8 - SYS___NEXTAFTERF_H = 0xAB9 - SYS___NEXTAFTERL_B = 0xABB - SYS___NEXTAFTERL_H = 0xABC - SYS___NEXTTOWARDF_B = 0xAC1 - SYS___NEXTTOWARDF_H = 0xAC2 - SYS___NEXTTOWARDL_B = 0xAC4 - SYS___NEXTTOWARDL_H = 0xAC5 - SYS___NEXTTOWARD_B = 0xABE - SYS___NEXTTOWARD_H = 0xABF - SYS___O_ENV = 0xB7D - SYS___PASSWD_APPLID = 0xCE3 - SYS___PTOD1 = 0xC9E - SYS___PTOD2 = 0xC9F - SYS___PTOD4 = 0xCA0 - SYS___REGCOMP_STD = 0x0EA - SYS___REMAINDERF_H = 0xAC6 - SYS___REMAINDERL_H = 0xAC7 - SYS___REMQUOD128 = 0xC10 - SYS___REMQUOD32 = 0xC0E - SYS___REMQUOD64 = 0xC0F - SYS___REMQUOF_H = 0xAC9 - SYS___REMQUOL_H = 0xACA - SYS___REMQUO_H = 0xAC8 - SYS___RINTF_B = 0xACC - SYS___RINTL_B = 0xACE - SYS___ROUNDF_B = 0xAD3 - SYS___ROUNDF_H = 0xAD4 - SYS___ROUNDL_B = 0xAD6 - SYS___ROUNDL_H = 0xAD7 - SYS___ROUND_B = 0xAD0 - SYS___ROUND_H = 0xAD1 - SYS___SCALBLNF_B = 0xADC - SYS___SCALBLNF_H = 0xADD - SYS___SCALBLNL_B = 0xADF - SYS___SCALBLNL_H = 0xAE0 - SYS___SCALBLN_B = 0xAD9 - SYS___SCALBLN_H = 0xADA - SYS___SCALBNF_B = 0xAE4 - SYS___SCALBNF_H = 0xAE5 - SYS___SCALBNL_B = 0xAE7 - SYS___SCALBNL_H = 0xAE8 - SYS___SCALBN_B = 0xAE1 - SYS___SCALBN_H = 0xAE2 - SYS___SETENV = 0x0C8 - SYS___SINPID128 = 0xC73 - SYS___SINPID32 = 0xC71 - SYS___SINPID64 = 0xC72 - SYS___SMF_RECORD2 = 0xD48 - SYS___STATIC_REINIT = 0xB3D - SYS___TGAMMAF_H_C99 = 0xB79 - SYS___TGAMMAL_H = 0xAE9 - SYS___TGAMMA_H_C99 = 0xB78 - SYS___TOCSNAME2 = 0xC9A - SYS_CEIL = 0x01F - SYS_CHAUDIT = 0x1E0 - SYS_EXP = 0x01A - SYS_FCHAUDIT = 0x1E1 - SYS_FREXP = 0x01D - SYS_GETGROUPSBYNAME = 0x1E2 - SYS_GETPWUID = 0x1A0 - SYS_GETUID = 0x1A1 - SYS_ISATTY = 0x1A3 - SYS_KILL = 0x1A4 - SYS_LDEXP = 0x01E - SYS_LINK = 0x1A5 - SYS_LOG10 = 0x01C - SYS_LSEEK = 0x1A6 - SYS_LSTAT = 0x1A7 - SYS_MKDIR = 0x1A8 - SYS_MKFIFO = 0x1A9 - SYS_MKNOD = 0x1AA - SYS_MODF = 0x01B - SYS_MOUNT = 0x1AB - SYS_OPEN = 0x1AC - SYS_OPENDIR = 0x1AD - SYS_PATHCONF = 0x1AE - SYS_PAUSE = 0x1AF - SYS_PIPE = 0x1B0 - SYS_PTHREAD_ATTR_DESTROY = 0x1E7 - SYS_PTHREAD_ATTR_GETDETACHSTATE = 0x1EB - SYS_PTHREAD_ATTR_GETSTACKSIZE = 0x1E9 - SYS_PTHREAD_ATTR_GETWEIGHT_NP = 0x1ED - SYS_PTHREAD_ATTR_INIT = 0x1E6 - SYS_PTHREAD_ATTR_SETDETACHSTATE = 0x1EA - SYS_PTHREAD_ATTR_SETSTACKSIZE = 0x1E8 - SYS_PTHREAD_ATTR_SETWEIGHT_NP = 0x1EC - SYS_PTHREAD_CANCEL = 0x1EE - SYS_PTHREAD_CLEANUP_POP = 0x1F0 - SYS_PTHREAD_CLEANUP_PUSH = 0x1EF - SYS_PTHREAD_CONDATTR_DESTROY = 0x1F2 - SYS_PTHREAD_CONDATTR_INIT = 0x1F1 - SYS_PTHREAD_COND_BROADCAST = 0x1F6 - SYS_PTHREAD_COND_DESTROY = 0x1F4 - SYS_PTHREAD_COND_INIT = 0x1F3 - SYS_PTHREAD_COND_SIGNAL = 0x1F5 - SYS_PTHREAD_COND_TIMEDWAIT = 0x1F8 - SYS_PTHREAD_COND_WAIT = 0x1F7 - SYS_PTHREAD_CREATE = 0x1F9 - SYS_PTHREAD_DETACH = 0x1FA - SYS_PTHREAD_EQUAL = 0x1FB - SYS_PTHREAD_EXIT = 0x1E4 - SYS_PTHREAD_GETSPECIFIC = 0x1FC - SYS_PTHREAD_JOIN = 0x1FD - SYS_PTHREAD_KEY_CREATE = 0x1FE - SYS_PTHREAD_KILL = 0x1E5 - SYS_PTHREAD_MUTEXATTR_INIT = 0x1FF - SYS_READ = 0x1B2 - SYS_READDIR = 0x1B3 - SYS_READLINK = 0x1B4 - SYS_REWINDDIR = 0x1B5 - SYS_RMDIR = 0x1B6 - SYS_SETEGID = 0x1B7 - SYS_SETEUID = 0x1B8 - SYS_SETGID = 0x1B9 - SYS_SETPGID = 0x1BA - SYS_SETSID = 0x1BB - SYS_SETUID = 0x1BC - SYS_SIGACTION = 0x1BD - SYS_SIGADDSET = 0x1BE - SYS_SIGDELSET = 0x1BF - SYS_SIGEMPTYSET = 0x1C0 - SYS_SIGFILLSET = 0x1C1 - SYS_SIGISMEMBER = 0x1C2 - SYS_SIGLONGJMP = 0x1C3 - SYS_SIGPENDING = 0x1C4 - SYS_SIGPROCMASK = 0x1C5 - SYS_SIGSETJMP = 0x1C6 - SYS_SIGSUSPEND = 0x1C7 - SYS_SIGWAIT = 0x1E3 - SYS_SLEEP = 0x1C8 - SYS_STAT = 0x1C9 - SYS_SYMLINK = 0x1CB - SYS_SYSCONF = 0x1CC - SYS_TCDRAIN = 0x1CD - SYS_TCFLOW = 0x1CE - SYS_TCFLUSH = 0x1CF - SYS_TCGETATTR = 0x1D0 - SYS_TCGETPGRP = 0x1D1 - SYS_TCSENDBREAK = 0x1D2 - SYS_TCSETATTR = 0x1D3 - SYS_TCSETPGRP = 0x1D4 - SYS_TIMES = 0x1D5 - SYS_TTYNAME = 0x1D6 - SYS_TZSET = 0x1D7 - SYS_UMASK = 0x1D8 - SYS_UMOUNT = 0x1D9 - SYS_UNAME = 0x1DA - SYS_UNLINK = 0x1DB - SYS_UTIME = 0x1DC - SYS_WAIT = 0x1DD - SYS_WAITPID = 0x1DE - SYS_WRITE = 0x1DF - SYS_W_GETPSENT = 0x1B1 - SYS_W_IOCTL = 0x1A2 - SYS_W_STATFS = 0x1CA - SYS_A64L = 0x2EF - SYS_BCMP = 0x2B9 - SYS_BCOPY = 0x2BA - SYS_BZERO = 0x2BB - SYS_CATCLOSE = 0x2B6 - SYS_CATGETS = 0x2B7 - SYS_CATOPEN = 0x2B8 - SYS_CRYPT = 0x2AC - SYS_DBM_CLEARERR = 0x2F7 - SYS_DBM_CLOSE = 0x2F8 - SYS_DBM_DELETE = 0x2F9 - SYS_DBM_ERROR = 0x2FA - SYS_DBM_FETCH = 0x2FB - SYS_DBM_FIRSTKEY = 0x2FC - SYS_DBM_NEXTKEY = 0x2FD - SYS_DBM_OPEN = 0x2FE - SYS_DBM_STORE = 0x2FF - SYS_DRAND48 = 0x2B2 - SYS_ENCRYPT = 0x2AD - SYS_ENDUTXENT = 0x2E1 - SYS_ERAND48 = 0x2B3 - SYS_ERF = 0x02C - SYS_ERFC = 0x02D - SYS_FCHDIR = 0x2D9 - SYS_FFS = 0x2BC - SYS_FMTMSG = 0x2E5 - SYS_FSTATVFS = 0x2B4 - SYS_FTIME = 0x2F5 - SYS_GAMMA = 0x02E - SYS_GETDATE = 0x2A6 - SYS_GETPAGESIZE = 0x2D8 - SYS_GETTIMEOFDAY = 0x2F6 - SYS_GETUTXENT = 0x2E0 - SYS_GETUTXID = 0x2E2 - SYS_GETUTXLINE = 0x2E3 - SYS_HCREATE = 0x2C6 - SYS_HDESTROY = 0x2C7 - SYS_HSEARCH = 0x2C8 - SYS_HYPOT = 0x02B - SYS_INDEX = 0x2BD - SYS_INITSTATE = 0x2C2 - SYS_INSQUE = 0x2CF - SYS_ISASCII = 0x2ED - SYS_JRAND48 = 0x2E6 - SYS_L64A = 0x2F0 - SYS_LCONG48 = 0x2EA - SYS_LFIND = 0x2C9 - SYS_LRAND48 = 0x2E7 - SYS_LSEARCH = 0x2CA - SYS_MEMCCPY = 0x2D4 - SYS_MRAND48 = 0x2E8 - SYS_NRAND48 = 0x2E9 - SYS_PCLOSE = 0x2D2 - SYS_POPEN = 0x2D1 - SYS_PUTUTXLINE = 0x2E4 - SYS_RANDOM = 0x2C4 - SYS_REMQUE = 0x2D0 - SYS_RINDEX = 0x2BE - SYS_SEED48 = 0x2EC - SYS_SETKEY = 0x2AE - SYS_SETSTATE = 0x2C3 - SYS_SETUTXENT = 0x2DF - SYS_SRAND48 = 0x2EB - SYS_SRANDOM = 0x2C5 - SYS_STATVFS = 0x2B5 - SYS_STRCASECMP = 0x2BF - SYS_STRDUP = 0x2C0 - SYS_STRNCASECMP = 0x2C1 - SYS_SWAB = 0x2D3 - SYS_TDELETE = 0x2CB - SYS_TFIND = 0x2CC - SYS_TOASCII = 0x2EE - SYS_TSEARCH = 0x2CD - SYS_TWALK = 0x2CE - SYS_UALARM = 0x2F1 - SYS_USLEEP = 0x2F2 - SYS_WAIT3 = 0x2A7 - SYS_WAITID = 0x2A8 - SYS_Y1 = 0x02A - SYS___ATOE = 0x2DB - SYS___ATOE_L = 0x2DC - SYS___CATTRM = 0x2A9 - SYS___CNVBLK = 0x2AF - SYS___CRYTRM = 0x2B0 - SYS___DLGHT = 0x2A1 - SYS___ECRTRM = 0x2B1 - SYS___ETOA = 0x2DD - SYS___ETOA_L = 0x2DE - SYS___GDTRM = 0x2AA - SYS___OCLCK = 0x2DA - SYS___OPARGF = 0x2A2 - SYS___OPERRF = 0x2A5 - SYS___OPINDF = 0x2A4 - SYS___OPOPTF = 0x2A3 - SYS___RNDTRM = 0x2AB - SYS___SRCTRM = 0x2F4 - SYS___TZONE = 0x2A0 - SYS___UTXTRM = 0x2F3 - SYS_ASIN = 0x03E - SYS_ISXDIGIT = 0x03B - SYS_SETLOCAL = 0x03A - SYS_SETLOCALE = 0x03A - SYS_SIN = 0x03F - SYS_TOLOWER = 0x03C - SYS_TOUPPER = 0x03D - SYS_ACCEPT_AND_RECV = 0x4F7 - SYS_ATOL = 0x04E - SYS_CHECKSCH = 0x4BC - SYS_CHECKSCHENV = 0x4BC - SYS_CLEARERR = 0x04C - SYS_CONNECTS = 0x4B5 - SYS_CONNECTSERVER = 0x4B5 - SYS_CONNECTW = 0x4B4 - SYS_CONNECTWORKMGR = 0x4B4 - SYS_CONTINUE = 0x4B3 - SYS_CONTINUEWORKUNIT = 0x4B3 - SYS_COPYSIGN = 0x4C2 - SYS_CREATEWO = 0x4B2 - SYS_CREATEWORKUNIT = 0x4B2 - SYS_DELETEWO = 0x4B9 - SYS_DELETEWORKUNIT = 0x4B9 - SYS_DISCONNE = 0x4B6 - SYS_DISCONNECTSERVER = 0x4B6 - SYS_FEOF = 0x04D - SYS_FERROR = 0x04A - SYS_FINITE = 0x4C8 - SYS_GAMMA_R = 0x4E2 - SYS_JOINWORK = 0x4B7 - SYS_JOINWORKUNIT = 0x4B7 - SYS_LEAVEWOR = 0x4B8 - SYS_LEAVEWORKUNIT = 0x4B8 - SYS_LGAMMA_R = 0x4EB - SYS_MATHERR = 0x4D0 - SYS_PERROR = 0x04F - SYS_QUERYMET = 0x4BA - SYS_QUERYMETRICS = 0x4BA - SYS_QUERYSCH = 0x4BB - SYS_QUERYSCHENV = 0x4BB - SYS_REWIND = 0x04B - SYS_SCALBN = 0x4D4 - SYS_SIGNIFIC = 0x4D5 - SYS_SIGNIFICAND = 0x4D5 - SYS___ACOSH_B = 0x4DA - SYS___ACOS_B = 0x4D9 - SYS___ASINH_B = 0x4BE - SYS___ASIN_B = 0x4DB - SYS___ATAN2_B = 0x4DC - SYS___ATANH_B = 0x4DD - SYS___ATAN_B = 0x4BF - SYS___CBRT_B = 0x4C0 - SYS___CEIL_B = 0x4C1 - SYS___COSH_B = 0x4DE - SYS___COS_B = 0x4C3 - SYS___DGHT = 0x4A8 - SYS___ENVN = 0x4B0 - SYS___ERFC_B = 0x4C5 - SYS___ERF_B = 0x4C4 - SYS___EXPM1_B = 0x4C6 - SYS___EXP_B = 0x4DF - SYS___FABS_B = 0x4C7 - SYS___FLOOR_B = 0x4C9 - SYS___FMOD_B = 0x4E0 - SYS___FP_SETMODE = 0x4F8 - SYS___FREXP_B = 0x4CA - SYS___GAMMA_B = 0x4E1 - SYS___GDRR = 0x4A1 - SYS___HRRNO = 0x4A2 - SYS___HYPOT_B = 0x4E3 - SYS___ILOGB_B = 0x4CB - SYS___ISNAN_B = 0x4CC - SYS___J0_B = 0x4E4 - SYS___J1_B = 0x4E6 - SYS___JN_B = 0x4E8 - SYS___LDEXP_B = 0x4CD - SYS___LGAMMA_B = 0x4EA - SYS___LOG10_B = 0x4ED - SYS___LOG1P_B = 0x4CE - SYS___LOGB_B = 0x4CF - SYS___LOGIN = 0x4F5 - SYS___LOG_B = 0x4EC - SYS___MLOCKALL = 0x4B1 - SYS___MODF_B = 0x4D1 - SYS___NEXTAFTER_B = 0x4D2 - SYS___OPENDIR2 = 0x4F3 - SYS___OPEN_STAT = 0x4F6 - SYS___OPND = 0x4A5 - SYS___OPPT = 0x4A6 - SYS___OPRG = 0x4A3 - SYS___OPRR = 0x4A4 - SYS___PID_AFFINITY = 0x4BD - SYS___POW_B = 0x4EE - SYS___READDIR2 = 0x4F4 - SYS___REMAINDER_B = 0x4EF - SYS___RINT_B = 0x4D3 - SYS___SCALB_B = 0x4F0 - SYS___SIGACTIONSET = 0x4FB - SYS___SIGGM = 0x4A7 - SYS___SINH_B = 0x4F1 - SYS___SIN_B = 0x4D6 - SYS___SQRT_B = 0x4F2 - SYS___TANH_B = 0x4D8 - SYS___TAN_B = 0x4D7 - SYS___TRRNO = 0x4AF - SYS___TZNE = 0x4A9 - SYS___TZZN = 0x4AA - SYS___UCREATE = 0x4FC - SYS___UFREE = 0x4FE - SYS___UHEAPREPORT = 0x4FF - SYS___UMALLOC = 0x4FD - SYS___Y0_B = 0x4E5 - SYS___Y1_B = 0x4E7 - SYS___YN_B = 0x4E9 - SYS_ABORT = 0x05C - SYS_ASCTIME_R = 0x5E0 - SYS_ATEXIT = 0x05D - SYS_CONNECTE = 0x5AE - SYS_CONNECTEXPORTIMPORT = 0x5AE - SYS_CTIME_R = 0x5E1 - SYS_DN_COMP = 0x5DF - SYS_DN_EXPAND = 0x5DD - SYS_DN_SKIPNAME = 0x5DE - SYS_EXIT = 0x05A - SYS_EXPORTWO = 0x5A1 - SYS_EXPORTWORKUNIT = 0x5A1 - SYS_EXTRACTW = 0x5A5 - SYS_EXTRACTWORKUNIT = 0x5A5 - SYS_FSEEKO = 0x5C9 - SYS_FTELLO = 0x5C8 - SYS_GETGRGID_R = 0x5E7 - SYS_GETGRNAM_R = 0x5E8 - SYS_GETLOGIN_R = 0x5E9 - SYS_GETPWNAM_R = 0x5EA - SYS_GETPWUID_R = 0x5EB - SYS_GMTIME_R = 0x5E2 - SYS_IMPORTWO = 0x5A3 - SYS_IMPORTWORKUNIT = 0x5A3 - SYS_INET_NTOP = 0x5D3 - SYS_INET_PTON = 0x5D4 - SYS_LLABS = 0x5CE - SYS_LLDIV = 0x5CB - SYS_LOCALTIME_R = 0x5E3 - SYS_PTHREAD_ATFORK = 0x5ED - SYS_PTHREAD_ATTR_GETDETACHSTATE_U98 = 0x5FB - SYS_PTHREAD_ATTR_GETGUARDSIZE = 0x5EE - SYS_PTHREAD_ATTR_GETSCHEDPARAM = 0x5F9 - SYS_PTHREAD_ATTR_GETSTACKADDR = 0x5EF - SYS_PTHREAD_ATTR_SETDETACHSTATE_U98 = 0x5FC - SYS_PTHREAD_ATTR_SETGUARDSIZE = 0x5F0 - SYS_PTHREAD_ATTR_SETSCHEDPARAM = 0x5FA - SYS_PTHREAD_ATTR_SETSTACKADDR = 0x5F1 - SYS_PTHREAD_CONDATTR_GETPSHARED = 0x5F2 - SYS_PTHREAD_CONDATTR_SETPSHARED = 0x5F3 - SYS_PTHREAD_DETACH_U98 = 0x5FD - SYS_PTHREAD_GETCONCURRENCY = 0x5F4 - SYS_PTHREAD_GETSPECIFIC_U98 = 0x5FE - SYS_PTHREAD_KEY_DELETE = 0x5F5 - SYS_PTHREAD_SETCANCELSTATE = 0x5FF - SYS_PTHREAD_SETCONCURRENCY = 0x5F6 - SYS_PTHREAD_SIGMASK = 0x5F7 - SYS_QUERYENC = 0x5AD - SYS_QUERYWORKUNITCLASSIFICATION = 0x5AD - SYS_RAISE = 0x05E - SYS_RAND_R = 0x5E4 - SYS_READDIR_R = 0x5E6 - SYS_REALLOC = 0x05B - SYS_RES_INIT = 0x5D8 - SYS_RES_MKQUERY = 0x5D7 - SYS_RES_QUERY = 0x5D9 - SYS_RES_QUERYDOMAIN = 0x5DC - SYS_RES_SEARCH = 0x5DA - SYS_RES_SEND = 0x5DB - SYS_SETJMP = 0x05F - SYS_SIGQUEUE = 0x5A9 - SYS_STRTOK_R = 0x5E5 - SYS_STRTOLL = 0x5B0 - SYS_STRTOULL = 0x5B1 - SYS_TTYNAME_R = 0x5EC - SYS_UNDOEXPO = 0x5A2 - SYS_UNDOEXPORTWORKUNIT = 0x5A2 - SYS_UNDOIMPO = 0x5A4 - SYS_UNDOIMPORTWORKUNIT = 0x5A4 - SYS_WCSTOLL = 0x5CC - SYS_WCSTOULL = 0x5CD - SYS___ABORT = 0x05C - SYS___CONSOLE2 = 0x5D2 - SYS___CPL = 0x5A6 - SYS___DISCARDDATA = 0x5F8 - SYS___DSA_PREV = 0x5B2 - SYS___EP_FIND = 0x5B3 - SYS___FP_SWAPMODE = 0x5AF - SYS___GETUSERID = 0x5AB - SYS___GET_CPUID = 0x5B9 - SYS___GET_SYSTEM_SETTINGS = 0x5BA - SYS___IPDOMAINNAME = 0x5AC - SYS___MAP_INIT = 0x5A7 - SYS___MAP_SERVICE = 0x5A8 - SYS___MOUNT = 0x5AA - SYS___MSGRCV_TIMED = 0x5B7 - SYS___RES = 0x5D6 - SYS___SEMOP_TIMED = 0x5B8 - SYS___SERVER_THREADS_QUERY = 0x5B4 - SYS_FPRINTF = 0x06D - SYS_FSCANF = 0x06A - SYS_PRINTF = 0x06F - SYS_SETBUF = 0x06B - SYS_SETVBUF = 0x06C - SYS_SSCANF = 0x06E - SYS___CATGETS_A = 0x6C0 - SYS___CHAUDIT_A = 0x6F4 - SYS___CHMOD_A = 0x6E8 - SYS___COLLATE_INIT_A = 0x6AC - SYS___CREAT_A = 0x6F6 - SYS___CTYPE_INIT_A = 0x6AF - SYS___DLLLOAD_A = 0x6DF - SYS___DLLQUERYFN_A = 0x6E0 - SYS___DLLQUERYVAR_A = 0x6E1 - SYS___E2A_L = 0x6E3 - SYS___EXECLE_A = 0x6A0 - SYS___EXECLP_A = 0x6A4 - SYS___EXECVE_A = 0x6C1 - SYS___EXECVP_A = 0x6C2 - SYS___EXECV_A = 0x6B1 - SYS___FPRINTF_A = 0x6FA - SYS___GETADDRINFO_A = 0x6BF - SYS___GETNAMEINFO_A = 0x6C4 - SYS___GET_WCTYPE_STD_A = 0x6AE - SYS___ICONV_OPEN_A = 0x6DE - SYS___IF_INDEXTONAME_A = 0x6DC - SYS___IF_NAMETOINDEX_A = 0x6DB - SYS___ISWCTYPE_A = 0x6B0 - SYS___IS_WCTYPE_STD_A = 0x6B2 - SYS___LOCALECONV_A = 0x6B8 - SYS___LOCALECONV_STD_A = 0x6B9 - SYS___LOCALE_INIT_A = 0x6B7 - SYS___LSTAT_A = 0x6EE - SYS___LSTAT_O_A = 0x6EF - SYS___MKDIR_A = 0x6E9 - SYS___MKFIFO_A = 0x6EC - SYS___MKNOD_A = 0x6F0 - SYS___MONETARY_INIT_A = 0x6BC - SYS___MOUNT_A = 0x6F1 - SYS___NL_CSINFO_A = 0x6D6 - SYS___NL_LANGINFO_A = 0x6BA - SYS___NL_LNAGINFO_STD_A = 0x6BB - SYS___NL_MONINFO_A = 0x6D7 - SYS___NL_NUMINFO_A = 0x6D8 - SYS___NL_RESPINFO_A = 0x6D9 - SYS___NL_TIMINFO_A = 0x6DA - SYS___NUMERIC_INIT_A = 0x6C6 - SYS___OPEN_A = 0x6F7 - SYS___PRINTF_A = 0x6DD - SYS___RESP_INIT_A = 0x6C7 - SYS___RPMATCH_A = 0x6C8 - SYS___RPMATCH_C_A = 0x6C9 - SYS___RPMATCH_STD_A = 0x6CA - SYS___SETLOCALE_A = 0x6F9 - SYS___SPAWNP_A = 0x6C5 - SYS___SPAWN_A = 0x6C3 - SYS___SPRINTF_A = 0x6FB - SYS___STAT_A = 0x6EA - SYS___STAT_O_A = 0x6EB - SYS___STRCOLL_STD_A = 0x6A1 - SYS___STRFMON_A = 0x6BD - SYS___STRFMON_STD_A = 0x6BE - SYS___STRFTIME_A = 0x6CC - SYS___STRFTIME_STD_A = 0x6CD - SYS___STRPTIME_A = 0x6CE - SYS___STRPTIME_STD_A = 0x6CF - SYS___STRXFRM_A = 0x6A2 - SYS___STRXFRM_C_A = 0x6A3 - SYS___STRXFRM_STD_A = 0x6A5 - SYS___SYNTAX_INIT_A = 0x6D4 - SYS___TIME_INIT_A = 0x6CB - SYS___TOD_INIT_A = 0x6D5 - SYS___TOWLOWER_A = 0x6B3 - SYS___TOWLOWER_STD_A = 0x6B4 - SYS___TOWUPPER_A = 0x6B5 - SYS___TOWUPPER_STD_A = 0x6B6 - SYS___UMOUNT_A = 0x6F2 - SYS___VFPRINTF_A = 0x6FC - SYS___VPRINTF_A = 0x6FD - SYS___VSPRINTF_A = 0x6FE - SYS___VSWPRINTF_A = 0x6FF - SYS___WCSCOLL_A = 0x6A6 - SYS___WCSCOLL_C_A = 0x6A7 - SYS___WCSCOLL_STD_A = 0x6A8 - SYS___WCSFTIME_A = 0x6D0 - SYS___WCSFTIME_STD_A = 0x6D1 - SYS___WCSXFRM_A = 0x6A9 - SYS___WCSXFRM_C_A = 0x6AA - SYS___WCSXFRM_STD_A = 0x6AB - SYS___WCTYPE_A = 0x6AD - SYS___W_GETMNTENT_A = 0x6F5 - SYS_____CCSIDTYPE_A = 0x6E6 - SYS_____CHATTR_A = 0x6E2 - SYS_____CSNAMETYPE_A = 0x6E7 - SYS_____OPEN_STAT_A = 0x6ED - SYS_____SPAWN2_A = 0x6D2 - SYS_____SPAWNP2_A = 0x6D3 - SYS_____TOCCSID_A = 0x6E4 - SYS_____TOCSNAME_A = 0x6E5 - SYS_ACL_FREE = 0x7FF - SYS_ACL_INIT = 0x7FE - SYS_FWIDE = 0x7DF - SYS_FWPRINTF = 0x7D1 - SYS_FWRITE = 0x07E - SYS_FWSCANF = 0x7D5 - SYS_GETCHAR = 0x07B - SYS_GETS = 0x07C - SYS_M_CREATE_LAYOUT = 0x7C9 - SYS_M_DESTROY_LAYOUT = 0x7CA - SYS_M_GETVALUES_LAYOUT = 0x7CB - SYS_M_SETVALUES_LAYOUT = 0x7CC - SYS_M_TRANSFORM_LAYOUT = 0x7CD - SYS_M_WTRANSFORM_LAYOUT = 0x7CE - SYS_PREAD = 0x7C7 - SYS_PUTC = 0x07D - SYS_PUTCHAR = 0x07A - SYS_PUTS = 0x07F - SYS_PWRITE = 0x7C8 - SYS_TOWCTRAN = 0x7D8 - SYS_TOWCTRANS = 0x7D8 - SYS_UNATEXIT = 0x7B5 - SYS_VFWPRINT = 0x7D3 - SYS_VFWPRINTF = 0x7D3 - SYS_VWPRINTF = 0x7D4 - SYS_WCTRANS = 0x7D7 - SYS_WPRINTF = 0x7D2 - SYS_WSCANF = 0x7D6 - SYS___ASCTIME_R_A = 0x7A1 - SYS___BASENAME_A = 0x7DC - SYS___BTOWC_A = 0x7E4 - SYS___CDUMP_A = 0x7B7 - SYS___CEE3DMP_A = 0x7B6 - SYS___CEILF_H = 0x7F4 - SYS___CEILL_H = 0x7F5 - SYS___CEIL_H = 0x7EA - SYS___CRYPT_A = 0x7BE - SYS___CSNAP_A = 0x7B8 - SYS___CTEST_A = 0x7B9 - SYS___CTIME_R_A = 0x7A2 - SYS___CTRACE_A = 0x7BA - SYS___DBM_OPEN_A = 0x7E6 - SYS___DIRNAME_A = 0x7DD - SYS___FABSF_H = 0x7FA - SYS___FABSL_H = 0x7FB - SYS___FABS_H = 0x7ED - SYS___FGETWC_A = 0x7AA - SYS___FGETWS_A = 0x7AD - SYS___FLOORF_H = 0x7F6 - SYS___FLOORL_H = 0x7F7 - SYS___FLOOR_H = 0x7EB - SYS___FPUTWC_A = 0x7A5 - SYS___FPUTWS_A = 0x7A8 - SYS___GETTIMEOFDAY_A = 0x7AE - SYS___GETWCHAR_A = 0x7AC - SYS___GETWC_A = 0x7AB - SYS___GLOB_A = 0x7DE - SYS___GMTIME_A = 0x7AF - SYS___GMTIME_R_A = 0x7B0 - SYS___INET_PTON_A = 0x7BC - SYS___J0_H = 0x7EE - SYS___J1_H = 0x7EF - SYS___JN_H = 0x7F0 - SYS___LOCALTIME_A = 0x7B1 - SYS___LOCALTIME_R_A = 0x7B2 - SYS___MALLOC24 = 0x7FC - SYS___MALLOC31 = 0x7FD - SYS___MKTIME_A = 0x7B3 - SYS___MODFF_H = 0x7F8 - SYS___MODFL_H = 0x7F9 - SYS___MODF_H = 0x7EC - SYS___OPENDIR_A = 0x7C2 - SYS___OSNAME = 0x7E0 - SYS___PUTWCHAR_A = 0x7A7 - SYS___PUTWC_A = 0x7A6 - SYS___READDIR_A = 0x7C3 - SYS___STRTOLL_A = 0x7A3 - SYS___STRTOULL_A = 0x7A4 - SYS___SYSLOG_A = 0x7BD - SYS___TZZNA = 0x7B4 - SYS___UNGETWC_A = 0x7A9 - SYS___UTIME_A = 0x7A0 - SYS___VFPRINTF2_A = 0x7E7 - SYS___VPRINTF2_A = 0x7E8 - SYS___VSPRINTF2_A = 0x7E9 - SYS___VSWPRNTF2_A = 0x7BB - SYS___WCSTOD_A = 0x7D9 - SYS___WCSTOL_A = 0x7DA - SYS___WCSTOUL_A = 0x7DB - SYS___WCTOB_A = 0x7E5 - SYS___Y0_H = 0x7F1 - SYS___Y1_H = 0x7F2 - SYS___YN_H = 0x7F3 - SYS_____OPENDIR2_A = 0x7BF - SYS_____OSNAME_A = 0x7E1 - SYS_____READDIR2_A = 0x7C0 - SYS_DLCLOSE = 0x8DF - SYS_DLERROR = 0x8E0 - SYS_DLOPEN = 0x8DD - SYS_DLSYM = 0x8DE - SYS_FLOCKFILE = 0x8D3 - SYS_FTRYLOCKFILE = 0x8D4 - SYS_FUNLOCKFILE = 0x8D5 - SYS_GETCHAR_UNLOCKED = 0x8D7 - SYS_GETC_UNLOCKED = 0x8D6 - SYS_PUTCHAR_UNLOCKED = 0x8D9 - SYS_PUTC_UNLOCKED = 0x8D8 - SYS_SNPRINTF = 0x8DA - SYS_VSNPRINTF = 0x8DB - SYS_WCSCSPN = 0x08B - SYS_WCSLEN = 0x08C - SYS_WCSNCAT = 0x08D - SYS_WCSNCMP = 0x08A - SYS_WCSNCPY = 0x08F - SYS_WCSSPN = 0x08E - SYS___ABSF_H = 0x8E7 - SYS___ABSL_H = 0x8E8 - SYS___ABS_H = 0x8E6 - SYS___ACOSF_H = 0x8EA - SYS___ACOSH_H = 0x8EC - SYS___ACOSL_H = 0x8EB - SYS___ACOS_H = 0x8E9 - SYS___ASINF_H = 0x8EE - SYS___ASINH_H = 0x8F0 - SYS___ASINL_H = 0x8EF - SYS___ASIN_H = 0x8ED - SYS___ATAN2F_H = 0x8F8 - SYS___ATAN2L_H = 0x8F9 - SYS___ATAN2_H = 0x8F7 - SYS___ATANF_H = 0x8F2 - SYS___ATANHF_H = 0x8F5 - SYS___ATANHL_H = 0x8F6 - SYS___ATANH_H = 0x8F4 - SYS___ATANL_H = 0x8F3 - SYS___ATAN_H = 0x8F1 - SYS___CBRT_H = 0x8FA - SYS___COPYSIGNF_H = 0x8FB - SYS___COPYSIGNL_H = 0x8FC - SYS___COSF_H = 0x8FE - SYS___COSL_H = 0x8FF - SYS___COS_H = 0x8FD - SYS___DLERROR_A = 0x8D2 - SYS___DLOPEN_A = 0x8D0 - SYS___DLSYM_A = 0x8D1 - SYS___GETUTXENT_A = 0x8C6 - SYS___GETUTXID_A = 0x8C7 - SYS___GETUTXLINE_A = 0x8C8 - SYS___ITOA = 0x8AA - SYS___ITOA_A = 0x8B0 - SYS___LE_CONDITION_TOKEN_BUILD = 0x8A5 - SYS___LE_MSG_ADD_INSERT = 0x8A6 - SYS___LE_MSG_GET = 0x8A7 - SYS___LE_MSG_GET_AND_WRITE = 0x8A8 - SYS___LE_MSG_WRITE = 0x8A9 - SYS___LLTOA = 0x8AE - SYS___LLTOA_A = 0x8B4 - SYS___LTOA = 0x8AC - SYS___LTOA_A = 0x8B2 - SYS___PUTCHAR_UNLOCKED_A = 0x8CC - SYS___PUTC_UNLOCKED_A = 0x8CB - SYS___PUTUTXLINE_A = 0x8C9 - SYS___RESET_EXCEPTION_HANDLER = 0x8E3 - SYS___REXEC_A = 0x8C4 - SYS___REXEC_AF_A = 0x8C5 - SYS___SET_EXCEPTION_HANDLER = 0x8E2 - SYS___SNPRINTF_A = 0x8CD - SYS___SUPERKILL = 0x8A4 - SYS___TCGETATTR_A = 0x8A1 - SYS___TCSETATTR_A = 0x8A2 - SYS___ULLTOA = 0x8AF - SYS___ULLTOA_A = 0x8B5 - SYS___ULTOA = 0x8AD - SYS___ULTOA_A = 0x8B3 - SYS___UTOA = 0x8AB - SYS___UTOA_A = 0x8B1 - SYS___VHM_EVENT = 0x8E4 - SYS___VSNPRINTF_A = 0x8CE - SYS_____GETENV_A = 0x8C3 - SYS_____UTMPXNAME_A = 0x8CA - SYS_CACOSH = 0x9A0 - SYS_CACOSHF = 0x9A3 - SYS_CACOSHL = 0x9A6 - SYS_CARG = 0x9A9 - SYS_CARGF = 0x9AC - SYS_CARGL = 0x9AF - SYS_CASIN = 0x9B2 - SYS_CASINF = 0x9B5 - SYS_CASINH = 0x9BB - SYS_CASINHF = 0x9BE - SYS_CASINHL = 0x9C1 - SYS_CASINL = 0x9B8 - SYS_CATAN = 0x9C4 - SYS_CATANF = 0x9C7 - SYS_CATANH = 0x9CD - SYS_CATANHF = 0x9D0 - SYS_CATANHL = 0x9D3 - SYS_CATANL = 0x9CA - SYS_CCOS = 0x9D6 - SYS_CCOSF = 0x9D9 - SYS_CCOSH = 0x9DF - SYS_CCOSHF = 0x9E2 - SYS_CCOSHL = 0x9E5 - SYS_CCOSL = 0x9DC - SYS_CEXP = 0x9E8 - SYS_CEXPF = 0x9EB - SYS_CEXPL = 0x9EE - SYS_CIMAG = 0x9F1 - SYS_CIMAGF = 0x9F4 - SYS_CIMAGL = 0x9F7 - SYS_CLOGF = 0x9FD - SYS_MEMCHR = 0x09B - SYS_MEMCMP = 0x09A - SYS_STRCOLL = 0x09C - SYS_STRNCMP = 0x09D - SYS_STRRCHR = 0x09F - SYS_STRXFRM = 0x09E - SYS___CACOSHF_B = 0x9A4 - SYS___CACOSHF_H = 0x9A5 - SYS___CACOSHL_B = 0x9A7 - SYS___CACOSHL_H = 0x9A8 - SYS___CACOSH_B = 0x9A1 - SYS___CACOSH_H = 0x9A2 - SYS___CARGF_B = 0x9AD - SYS___CARGF_H = 0x9AE - SYS___CARGL_B = 0x9B0 - SYS___CARGL_H = 0x9B1 - SYS___CARG_B = 0x9AA - SYS___CARG_H = 0x9AB - SYS___CASINF_B = 0x9B6 - SYS___CASINF_H = 0x9B7 - SYS___CASINHF_B = 0x9BF - SYS___CASINHF_H = 0x9C0 - SYS___CASINHL_B = 0x9C2 - SYS___CASINHL_H = 0x9C3 - SYS___CASINH_B = 0x9BC - SYS___CASINH_H = 0x9BD - SYS___CASINL_B = 0x9B9 - SYS___CASINL_H = 0x9BA - SYS___CASIN_B = 0x9B3 - SYS___CASIN_H = 0x9B4 - SYS___CATANF_B = 0x9C8 - SYS___CATANF_H = 0x9C9 - SYS___CATANHF_B = 0x9D1 - SYS___CATANHF_H = 0x9D2 - SYS___CATANHL_B = 0x9D4 - SYS___CATANHL_H = 0x9D5 - SYS___CATANH_B = 0x9CE - SYS___CATANH_H = 0x9CF - SYS___CATANL_B = 0x9CB - SYS___CATANL_H = 0x9CC - SYS___CATAN_B = 0x9C5 - SYS___CATAN_H = 0x9C6 - SYS___CCOSF_B = 0x9DA - SYS___CCOSF_H = 0x9DB - SYS___CCOSHF_B = 0x9E3 - SYS___CCOSHF_H = 0x9E4 - SYS___CCOSHL_B = 0x9E6 - SYS___CCOSHL_H = 0x9E7 - SYS___CCOSH_B = 0x9E0 - SYS___CCOSH_H = 0x9E1 - SYS___CCOSL_B = 0x9DD - SYS___CCOSL_H = 0x9DE - SYS___CCOS_B = 0x9D7 - SYS___CCOS_H = 0x9D8 - SYS___CEXPF_B = 0x9EC - SYS___CEXPF_H = 0x9ED - SYS___CEXPL_B = 0x9EF - SYS___CEXPL_H = 0x9F0 - SYS___CEXP_B = 0x9E9 - SYS___CEXP_H = 0x9EA - SYS___CIMAGF_B = 0x9F5 - SYS___CIMAGF_H = 0x9F6 - SYS___CIMAGL_B = 0x9F8 - SYS___CIMAGL_H = 0x9F9 - SYS___CIMAG_B = 0x9F2 - SYS___CIMAG_H = 0x9F3 - SYS___CLOG = 0x9FA - SYS___CLOGF_B = 0x9FE - SYS___CLOGF_H = 0x9FF - SYS___CLOG_B = 0x9FB - SYS___CLOG_H = 0x9FC - SYS_ISWCTYPE = 0x10C - SYS_ISWXDIGI = 0x10A - SYS_ISWXDIGIT = 0x10A - SYS_MBSINIT = 0x10F - SYS_TOWLOWER = 0x10D - SYS_TOWUPPER = 0x10E - SYS_WCTYPE = 0x10B - SYS_WCSSTR = 0x11B - SYS___RPMTCH = 0x11A - SYS_WCSTOD = 0x12E - SYS_WCSTOK = 0x12C - SYS_WCSTOL = 0x12D - SYS_WCSTOUL = 0x12F - SYS_FGETWC = 0x13C - SYS_FGETWS = 0x13D - SYS_FPUTWC = 0x13E - SYS_FPUTWS = 0x13F - SYS_REGERROR = 0x13B - SYS_REGFREE = 0x13A - SYS_COLLEQUIV = 0x14F - SYS_COLLTOSTR = 0x14E - SYS_ISMCCOLLEL = 0x14C - SYS_STRTOCOLL = 0x14D - SYS_DLLFREE = 0x16F - SYS_DLLQUERYFN = 0x16D - SYS_DLLQUERYVAR = 0x16E - SYS_GETMCCOLL = 0x16A - SYS_GETWMCCOLL = 0x16B - SYS___ERR2AD = 0x16C - SYS_CFSETOSPEED = 0x17A - SYS_CHDIR = 0x17B - SYS_CHMOD = 0x17C - SYS_CHOWN = 0x17D - SYS_CLOSE = 0x17E - SYS_CLOSEDIR = 0x17F - SYS_LOG = 0x017 - SYS_COSH = 0x018 - SYS_FCHMOD = 0x18A - SYS_FCHOWN = 0x18B - SYS_FCNTL = 0x18C - SYS_FILENO = 0x18D - SYS_FORK = 0x18E - SYS_FPATHCONF = 0x18F - SYS_GETLOGIN = 0x19A - SYS_GETPGRP = 0x19C - SYS_GETPID = 0x19D - SYS_GETPPID = 0x19E - SYS_GETPWNAM = 0x19F - SYS_TANH = 0x019 - SYS_W_GETMNTENT = 0x19B - SYS_POW = 0x020 - SYS_PTHREAD_SELF = 0x20A - SYS_PTHREAD_SETINTR = 0x20B - SYS_PTHREAD_SETINTRTYPE = 0x20C - SYS_PTHREAD_SETSPECIFIC = 0x20D - SYS_PTHREAD_TESTINTR = 0x20E - SYS_PTHREAD_YIELD = 0x20F - SYS_SQRT = 0x021 - SYS_FLOOR = 0x022 - SYS_J1 = 0x023 - SYS_WCSPBRK = 0x23F - SYS_BSEARCH = 0x24C - SYS_FABS = 0x024 - SYS_GETENV = 0x24A - SYS_LDIV = 0x24D - SYS_SYSTEM = 0x24B - SYS_FMOD = 0x025 - SYS___RETHROW = 0x25F - SYS___THROW = 0x25E - SYS_J0 = 0x026 - SYS_PUTENV = 0x26A - SYS___GETENV = 0x26F - SYS_SEMCTL = 0x27A - SYS_SEMGET = 0x27B - SYS_SEMOP = 0x27C - SYS_SHMAT = 0x27D - SYS_SHMCTL = 0x27E - SYS_SHMDT = 0x27F - SYS_YN = 0x027 - SYS_JN = 0x028 - SYS_SIGALTSTACK = 0x28A - SYS_SIGHOLD = 0x28B - SYS_SIGIGNORE = 0x28C - SYS_SIGINTERRUPT = 0x28D - SYS_SIGPAUSE = 0x28E - SYS_SIGRELSE = 0x28F - SYS_GETOPT = 0x29A - SYS_GETSUBOPT = 0x29D - SYS_LCHOWN = 0x29B - SYS_SETPGRP = 0x29E - SYS_TRUNCATE = 0x29C - SYS_Y0 = 0x029 - SYS___GDERR = 0x29F - SYS_ISALPHA = 0x030 - SYS_VFORK = 0x30F - SYS__LONGJMP = 0x30D - SYS__SETJMP = 0x30E - SYS_GLOB = 0x31A - SYS_GLOBFREE = 0x31B - SYS_ISALNUM = 0x031 - SYS_PUTW = 0x31C - SYS_SEEKDIR = 0x31D - SYS_TELLDIR = 0x31E - SYS_TEMPNAM = 0x31F - SYS_GETTIMEOFDAY_R = 0x32E - SYS_ISLOWER = 0x032 - SYS_LGAMMA = 0x32C - SYS_REMAINDER = 0x32A - SYS_SCALB = 0x32B - SYS_SYNC = 0x32F - SYS_TTYSLOT = 0x32D - SYS_ENDPROTOENT = 0x33A - SYS_ENDSERVENT = 0x33B - SYS_GETHOSTBYADDR = 0x33D - SYS_GETHOSTBYADDR_R = 0x33C - SYS_GETHOSTBYNAME = 0x33F - SYS_GETHOSTBYNAME_R = 0x33E - SYS_ISCNTRL = 0x033 - SYS_GETSERVBYNAME = 0x34A - SYS_GETSERVBYPORT = 0x34B - SYS_GETSERVENT = 0x34C - SYS_GETSOCKNAME = 0x34D - SYS_GETSOCKOPT = 0x34E - SYS_INET_ADDR = 0x34F - SYS_ISDIGIT = 0x034 - SYS_ISGRAPH = 0x035 - SYS_SELECT = 0x35B - SYS_SELECTEX = 0x35C - SYS_SEND = 0x35D - SYS_SENDTO = 0x35F - SYS_CHROOT = 0x36A - SYS_ISNAN = 0x36D - SYS_ISUPPER = 0x036 - SYS_ULIMIT = 0x36C - SYS_UTIMES = 0x36E - SYS_W_STATVFS = 0x36B - SYS___H_ERRNO = 0x36F - SYS_GRANTPT = 0x37A - SYS_ISPRINT = 0x037 - SYS_TCGETSID = 0x37C - SYS_UNLOCKPT = 0x37B - SYS___TCGETCP = 0x37D - SYS___TCSETCP = 0x37E - SYS___TCSETTABLES = 0x37F - SYS_ISPUNCT = 0x038 - SYS_NLIST = 0x38C - SYS___IPDBCS = 0x38D - SYS___IPDSPX = 0x38E - SYS___IPMSGC = 0x38F - SYS___STHOSTENT = 0x38B - SYS___STSERVENT = 0x38A - SYS_ISSPACE = 0x039 - SYS_COS = 0x040 - SYS_T_ALLOC = 0x40A - SYS_T_BIND = 0x40B - SYS_T_CLOSE = 0x40C - SYS_T_CONNECT = 0x40D - SYS_T_ERROR = 0x40E - SYS_T_FREE = 0x40F - SYS_TAN = 0x041 - SYS_T_RCVREL = 0x41A - SYS_T_RCVUDATA = 0x41B - SYS_T_RCVUDERR = 0x41C - SYS_T_SND = 0x41D - SYS_T_SNDDIS = 0x41E - SYS_T_SNDREL = 0x41F - SYS_GETPMSG = 0x42A - SYS_ISASTREAM = 0x42B - SYS_PUTMSG = 0x42C - SYS_PUTPMSG = 0x42D - SYS_SINH = 0x042 - SYS___ISPOSIXON = 0x42E - SYS___OPENMVSREL = 0x42F - SYS_ACOS = 0x043 - SYS_ATAN = 0x044 - SYS_ATAN2 = 0x045 - SYS_FTELL = 0x046 - SYS_FGETPOS = 0x047 - SYS_SOCK_DEBUG = 0x47A - SYS_SOCK_DO_TESTSTOR = 0x47D - SYS_TAKESOCKET = 0x47E - SYS___SERVER_INIT = 0x47F - SYS_FSEEK = 0x048 - SYS___IPHOST = 0x48B - SYS___IPNODE = 0x48C - SYS___SERVER_CLASSIFY_CREATE = 0x48D - SYS___SERVER_CLASSIFY_DESTROY = 0x48E - SYS___SERVER_CLASSIFY_RESET = 0x48F - SYS___SMF_RECORD = 0x48A - SYS_FSETPOS = 0x049 - SYS___FNWSA = 0x49B - SYS___SPAWN2 = 0x49D - SYS___SPAWNP2 = 0x49E - SYS_ATOF = 0x050 - SYS_PTHREAD_MUTEXATTR_GETPSHARED = 0x50A - SYS_PTHREAD_MUTEXATTR_SETPSHARED = 0x50B - SYS_PTHREAD_RWLOCK_DESTROY = 0x50C - SYS_PTHREAD_RWLOCK_INIT = 0x50D - SYS_PTHREAD_RWLOCK_RDLOCK = 0x50E - SYS_PTHREAD_RWLOCK_TRYRDLOCK = 0x50F - SYS_ATOI = 0x051 - SYS___FP_CLASS = 0x51D - SYS___FP_CLR_FLAG = 0x51A - SYS___FP_FINITE = 0x51E - SYS___FP_ISNAN = 0x51F - SYS___FP_RAISE_XCP = 0x51C - SYS___FP_READ_FLAG = 0x51B - SYS_RAND = 0x052 - SYS_SIGTIMEDWAIT = 0x52D - SYS_SIGWAITINFO = 0x52E - SYS___CHKBFP = 0x52F - SYS___FPC_RS = 0x52C - SYS___FPC_RW = 0x52A - SYS___FPC_SM = 0x52B - SYS_STRTOD = 0x053 - SYS_STRTOL = 0x054 - SYS_STRTOUL = 0x055 - SYS_MALLOC = 0x056 - SYS_SRAND = 0x057 - SYS_CALLOC = 0x058 - SYS_FREE = 0x059 - SYS___OSENV = 0x59F - SYS___W_PIOCTL = 0x59E - SYS_LONGJMP = 0x060 - SYS___FLOORF_B = 0x60A - SYS___FLOORL_B = 0x60B - SYS___FREXPF_B = 0x60C - SYS___FREXPL_B = 0x60D - SYS___LDEXPF_B = 0x60E - SYS___LDEXPL_B = 0x60F - SYS_SIGNAL = 0x061 - SYS___ATAN2F_B = 0x61A - SYS___ATAN2L_B = 0x61B - SYS___COSHF_B = 0x61C - SYS___COSHL_B = 0x61D - SYS___EXPF_B = 0x61E - SYS___EXPL_B = 0x61F - SYS_TMPNAM = 0x062 - SYS___ABSF_B = 0x62A - SYS___ABSL_B = 0x62C - SYS___ABS_B = 0x62B - SYS___FMODF_B = 0x62D - SYS___FMODL_B = 0x62E - SYS___MODFF_B = 0x62F - SYS_ATANL = 0x63A - SYS_CEILF = 0x63B - SYS_CEILL = 0x63C - SYS_COSF = 0x63D - SYS_COSHF = 0x63F - SYS_COSL = 0x63E - SYS_REMOVE = 0x063 - SYS_POWL = 0x64A - SYS_RENAME = 0x064 - SYS_SINF = 0x64B - SYS_SINHF = 0x64F - SYS_SINL = 0x64C - SYS_SQRTF = 0x64D - SYS_SQRTL = 0x64E - SYS_BTOWC = 0x65F - SYS_FREXPL = 0x65A - SYS_LDEXPF = 0x65B - SYS_LDEXPL = 0x65C - SYS_MODFF = 0x65D - SYS_MODFL = 0x65E - SYS_TMPFILE = 0x065 - SYS_FREOPEN = 0x066 - SYS___CHARMAP_INIT_A = 0x66E - SYS___GETHOSTBYADDR_R_A = 0x66C - SYS___GETHOSTBYNAME_A = 0x66A - SYS___GETHOSTBYNAME_R_A = 0x66D - SYS___MBLEN_A = 0x66F - SYS___RES_INIT_A = 0x66B - SYS_FCLOSE = 0x067 - SYS___GETGRGID_R_A = 0x67D - SYS___WCSTOMBS_A = 0x67A - SYS___WCSTOMBS_STD_A = 0x67B - SYS___WCSWIDTH_A = 0x67C - SYS___WCSWIDTH_ASIA = 0x67F - SYS___WCSWIDTH_STD_A = 0x67E - SYS_FFLUSH = 0x068 - SYS___GETLOGIN_R_A = 0x68E - SYS___GETPWNAM_R_A = 0x68C - SYS___GETPWUID_R_A = 0x68D - SYS___TTYNAME_R_A = 0x68F - SYS___WCWIDTH_ASIA = 0x68B - SYS___WCWIDTH_STD_A = 0x68A - SYS_FOPEN = 0x069 - SYS___REGEXEC_A = 0x69A - SYS___REGEXEC_STD_A = 0x69B - SYS___REGFREE_A = 0x69C - SYS___REGFREE_STD_A = 0x69D - SYS___STRCOLL_A = 0x69E - SYS___STRCOLL_C_A = 0x69F - SYS_SCANF = 0x070 - SYS___A64L_A = 0x70C - SYS___ECVT_A = 0x70D - SYS___FCVT_A = 0x70E - SYS___GCVT_A = 0x70F - SYS___STRTOUL_A = 0x70A - SYS_____AE_CORRESTBL_QUERY_A = 0x70B - SYS_SPRINTF = 0x071 - SYS___ACCESS_A = 0x71F - SYS___CATOPEN_A = 0x71E - SYS___GETOPT_A = 0x71D - SYS___REALPATH_A = 0x71A - SYS___SETENV_A = 0x71B - SYS___SYSTEM_A = 0x71C - SYS_FGETC = 0x072 - SYS___GAI_STRERROR_A = 0x72F - SYS___RMDIR_A = 0x72A - SYS___STATVFS_A = 0x72B - SYS___SYMLINK_A = 0x72C - SYS___TRUNCATE_A = 0x72D - SYS___UNLINK_A = 0x72E - SYS_VFPRINTF = 0x073 - SYS___ISSPACE_A = 0x73A - SYS___ISUPPER_A = 0x73B - SYS___ISWALNUM_A = 0x73F - SYS___ISXDIGIT_A = 0x73C - SYS___TOLOWER_A = 0x73D - SYS___TOUPPER_A = 0x73E - SYS_VPRINTF = 0x074 - SYS___CONFSTR_A = 0x74B - SYS___FDOPEN_A = 0x74E - SYS___FLDATA_A = 0x74F - SYS___FTOK_A = 0x74C - SYS___ISWXDIGIT_A = 0x74A - SYS___MKTEMP_A = 0x74D - SYS_VSPRINTF = 0x075 - SYS___GETGRGID_A = 0x75A - SYS___GETGRNAM_A = 0x75B - SYS___GETGROUPSBYNAME_A = 0x75C - SYS___GETHOSTENT_A = 0x75D - SYS___GETHOSTNAME_A = 0x75E - SYS___GETLOGIN_A = 0x75F - SYS_GETC = 0x076 - SYS___CREATEWORKUNIT_A = 0x76A - SYS___CTERMID_A = 0x76B - SYS___FMTMSG_A = 0x76C - SYS___INITGROUPS_A = 0x76D - SYS___MSGRCV_A = 0x76F - SYS_____LOGIN_A = 0x76E - SYS_FGETS = 0x077 - SYS___STRCASECMP_A = 0x77B - SYS___STRNCASECMP_A = 0x77C - SYS___TTYNAME_A = 0x77D - SYS___UNAME_A = 0x77E - SYS___UTIMES_A = 0x77F - SYS_____SERVER_PWU_A = 0x77A - SYS_FPUTC = 0x078 - SYS___CREAT_O_A = 0x78E - SYS___ENVNA = 0x78F - SYS___FREAD_A = 0x78A - SYS___FWRITE_A = 0x78B - SYS___ISASCII = 0x78D - SYS___OPEN_O_A = 0x78C - SYS_FPUTS = 0x079 - SYS___ASCTIME_A = 0x79C - SYS___CTIME_A = 0x79D - SYS___GETDATE_A = 0x79E - SYS___GETSERVBYPORT_A = 0x79A - SYS___GETSERVENT_A = 0x79B - SYS___TZSET_A = 0x79F - SYS_ACL_FROM_TEXT = 0x80C - SYS_ACL_SET_FD = 0x80A - SYS_ACL_SET_FILE = 0x80B - SYS_ACL_SORT = 0x80E - SYS_ACL_TO_TEXT = 0x80D - SYS_UNGETC = 0x080 - SYS___SHUTDOWN_REGISTRATION = 0x80F - SYS_FREAD = 0x081 - SYS_FREEADDRINFO = 0x81A - SYS_GAI_STRERROR = 0x81B - SYS_REXEC_AF = 0x81C - SYS___DYNALLOC_A = 0x81F - SYS___POE = 0x81D - SYS_WCSTOMBS = 0x082 - SYS___INET_ADDR_A = 0x82F - SYS___NLIST_A = 0x82A - SYS_____TCGETCP_A = 0x82B - SYS_____TCSETCP_A = 0x82C - SYS_____W_PIOCTL_A = 0x82E - SYS_MBTOWC = 0x083 - SYS___CABEND = 0x83D - SYS___LE_CIB_GET = 0x83E - SYS___RECVMSG_A = 0x83B - SYS___SENDMSG_A = 0x83A - SYS___SET_LAA_FOR_JIT = 0x83F - SYS_____LCHATTR_A = 0x83C - SYS_WCTOMB = 0x084 - SYS___CBRTL_B = 0x84A - SYS___COPYSIGNF_B = 0x84B - SYS___COPYSIGNL_B = 0x84C - SYS___COTANF_B = 0x84D - SYS___COTANL_B = 0x84F - SYS___COTAN_B = 0x84E - SYS_MBSTOWCS = 0x085 - SYS___LOG1PL_B = 0x85A - SYS___LOG2F_B = 0x85B - SYS___LOG2L_B = 0x85D - SYS___LOG2_B = 0x85C - SYS___REMAINDERF_B = 0x85E - SYS___REMAINDERL_B = 0x85F - SYS_ACOSHF = 0x86E - SYS_ACOSHL = 0x86F - SYS_WCSCPY = 0x086 - SYS___ERFCF_B = 0x86D - SYS___ERFF_B = 0x86C - SYS___LROUNDF_B = 0x86A - SYS___LROUND_B = 0x86B - SYS_COTANL = 0x87A - SYS_EXP2F = 0x87B - SYS_EXP2L = 0x87C - SYS_EXPM1F = 0x87D - SYS_EXPM1L = 0x87E - SYS_FDIMF = 0x87F - SYS_WCSCAT = 0x087 - SYS___COTANL = 0x87A - SYS_REMAINDERF = 0x88A - SYS_REMAINDERL = 0x88B - SYS_REMAINDF = 0x88A - SYS_REMAINDL = 0x88B - SYS_REMQUO = 0x88D - SYS_REMQUOF = 0x88C - SYS_REMQUOL = 0x88E - SYS_TGAMMAF = 0x88F - SYS_WCSCHR = 0x088 - SYS_ERFCF = 0x89B - SYS_ERFCL = 0x89C - SYS_ERFL = 0x89A - SYS_EXP2 = 0x89E - SYS_WCSCMP = 0x089 - SYS___EXP2_B = 0x89D - SYS___FAR_JUMP = 0x89F - SYS_ABS = 0x090 - SYS___ERFCL_H = 0x90A - SYS___EXPF_H = 0x90C - SYS___EXPL_H = 0x90D - SYS___EXPM1_H = 0x90E - SYS___EXP_H = 0x90B - SYS___FDIM_H = 0x90F - SYS_DIV = 0x091 - SYS___LOG2F_H = 0x91F - SYS___LOG2_H = 0x91E - SYS___LOGB_H = 0x91D - SYS___LOGF_H = 0x91B - SYS___LOGL_H = 0x91C - SYS___LOG_H = 0x91A - SYS_LABS = 0x092 - SYS___POWL_H = 0x92A - SYS___REMAINDER_H = 0x92B - SYS___RINT_H = 0x92C - SYS___SCALB_H = 0x92D - SYS___SINF_H = 0x92F - SYS___SIN_H = 0x92E - SYS_STRNCPY = 0x093 - SYS___TANHF_H = 0x93B - SYS___TANHL_H = 0x93C - SYS___TANH_H = 0x93A - SYS___TGAMMAF_H = 0x93E - SYS___TGAMMA_H = 0x93D - SYS___TRUNC_H = 0x93F - SYS_MEMCPY = 0x094 - SYS_VFWSCANF = 0x94A - SYS_VSWSCANF = 0x94E - SYS_VWSCANF = 0x94C - SYS_INET6_RTH_ADD = 0x95D - SYS_INET6_RTH_INIT = 0x95C - SYS_INET6_RTH_REVERSE = 0x95E - SYS_INET6_RTH_SEGMENTS = 0x95F - SYS_INET6_RTH_SPACE = 0x95B - SYS_MEMMOVE = 0x095 - SYS_WCSTOLD = 0x95A - SYS_STRCPY = 0x096 - SYS_STRCMP = 0x097 - SYS_CABS = 0x98E - SYS_STRCAT = 0x098 - SYS___CABS_B = 0x98F - SYS___POW_II = 0x98A - SYS___POW_II_B = 0x98B - SYS___POW_II_H = 0x98C - SYS_CACOSF = 0x99A - SYS_CACOSL = 0x99D - SYS_STRNCAT = 0x099 - SYS___CACOSF_B = 0x99B - SYS___CACOSF_H = 0x99C - SYS___CACOSL_B = 0x99E - SYS___CACOSL_H = 0x99F - SYS_ISWALPHA = 0x100 - SYS_ISWBLANK = 0x101 - SYS___ISWBLK = 0x101 - SYS_ISWCNTRL = 0x102 - SYS_ISWDIGIT = 0x103 - SYS_ISWGRAPH = 0x104 - SYS_ISWLOWER = 0x105 - SYS_ISWPRINT = 0x106 - SYS_ISWPUNCT = 0x107 - SYS_ISWSPACE = 0x108 - SYS_ISWUPPER = 0x109 - SYS_WCTOB = 0x110 - SYS_MBRLEN = 0x111 - SYS_MBRTOWC = 0x112 - SYS_MBSRTOWC = 0x113 - SYS_MBSRTOWCS = 0x113 - SYS_WCRTOMB = 0x114 - SYS_WCSRTOMB = 0x115 - SYS_WCSRTOMBS = 0x115 - SYS___CSID = 0x116 - SYS___WCSID = 0x117 - SYS_STRPTIME = 0x118 - SYS___STRPTM = 0x118 - SYS_STRFMON = 0x119 - SYS_WCSCOLL = 0x130 - SYS_WCSXFRM = 0x131 - SYS_WCSWIDTH = 0x132 - SYS_WCWIDTH = 0x133 - SYS_WCSFTIME = 0x134 - SYS_SWPRINTF = 0x135 - SYS_VSWPRINT = 0x136 - SYS_VSWPRINTF = 0x136 - SYS_SWSCANF = 0x137 - SYS_REGCOMP = 0x138 - SYS_REGEXEC = 0x139 - SYS_GETWC = 0x140 - SYS_GETWCHAR = 0x141 - SYS_PUTWC = 0x142 - SYS_PUTWCHAR = 0x143 - SYS_UNGETWC = 0x144 - SYS_ICONV_OPEN = 0x145 - SYS_ICONV = 0x146 - SYS_ICONV_CLOSE = 0x147 - SYS_COLLRANGE = 0x150 - SYS_CCLASS = 0x151 - SYS_COLLORDER = 0x152 - SYS___DEMANGLE = 0x154 - SYS_FDOPEN = 0x155 - SYS___ERRNO = 0x156 - SYS___ERRNO2 = 0x157 - SYS___TERROR = 0x158 - SYS_MAXCOLL = 0x169 - SYS_DLLLOAD = 0x170 - SYS__EXIT = 0x174 - SYS_ACCESS = 0x175 - SYS_ALARM = 0x176 - SYS_CFGETISPEED = 0x177 - SYS_CFGETOSPEED = 0x178 - SYS_CFSETISPEED = 0x179 - SYS_CREAT = 0x180 - SYS_CTERMID = 0x181 - SYS_DUP = 0x182 - SYS_DUP2 = 0x183 - SYS_EXECL = 0x184 - SYS_EXECLE = 0x185 - SYS_EXECLP = 0x186 - SYS_EXECV = 0x187 - SYS_EXECVE = 0x188 - SYS_EXECVP = 0x189 - SYS_FSTAT = 0x190 - SYS_FSYNC = 0x191 - SYS_FTRUNCATE = 0x192 - SYS_GETCWD = 0x193 - SYS_GETEGID = 0x194 - SYS_GETEUID = 0x195 - SYS_GETGID = 0x196 - SYS_GETGRGID = 0x197 - SYS_GETGRNAM = 0x198 - SYS_GETGROUPS = 0x199 - SYS_PTHREAD_MUTEXATTR_DESTROY = 0x200 - SYS_PTHREAD_MUTEXATTR_SETKIND_NP = 0x201 - SYS_PTHREAD_MUTEXATTR_GETKIND_NP = 0x202 - SYS_PTHREAD_MUTEX_INIT = 0x203 - SYS_PTHREAD_MUTEX_DESTROY = 0x204 - SYS_PTHREAD_MUTEX_LOCK = 0x205 - SYS_PTHREAD_MUTEX_TRYLOCK = 0x206 - SYS_PTHREAD_MUTEX_UNLOCK = 0x207 - SYS_PTHREAD_ONCE = 0x209 - SYS_TW_OPEN = 0x210 - SYS_TW_FCNTL = 0x211 - SYS_PTHREAD_JOIN_D4_NP = 0x212 - SYS_PTHREAD_CONDATTR_SETKIND_NP = 0x213 - SYS_PTHREAD_CONDATTR_GETKIND_NP = 0x214 - SYS_EXTLINK_NP = 0x215 - SYS___PASSWD = 0x216 - SYS_SETGROUPS = 0x217 - SYS_INITGROUPS = 0x218 - SYS_WCSRCHR = 0x240 - SYS_SVC99 = 0x241 - SYS___SVC99 = 0x241 - SYS_WCSWCS = 0x242 - SYS_LOCALECO = 0x243 - SYS_LOCALECONV = 0x243 - SYS___LIBREL = 0x244 - SYS_RELEASE = 0x245 - SYS___RLSE = 0x245 - SYS_FLOCATE = 0x246 - SYS___FLOCT = 0x246 - SYS_FDELREC = 0x247 - SYS___FDLREC = 0x247 - SYS_FETCH = 0x248 - SYS___FETCH = 0x248 - SYS_QSORT = 0x249 - SYS___CLEANUPCATCH = 0x260 - SYS___CATCHMATCH = 0x261 - SYS___CLEAN2UPCATCH = 0x262 - SYS_GETPRIORITY = 0x270 - SYS_NICE = 0x271 - SYS_SETPRIORITY = 0x272 - SYS_GETITIMER = 0x273 - SYS_SETITIMER = 0x274 - SYS_MSGCTL = 0x275 - SYS_MSGGET = 0x276 - SYS_MSGRCV = 0x277 - SYS_MSGSND = 0x278 - SYS_MSGXRCV = 0x279 - SYS___MSGXR = 0x279 - SYS_SHMGET = 0x280 - SYS___GETIPC = 0x281 - SYS_SETGRENT = 0x282 - SYS_GETGRENT = 0x283 - SYS_ENDGRENT = 0x284 - SYS_SETPWENT = 0x285 - SYS_GETPWENT = 0x286 - SYS_ENDPWENT = 0x287 - SYS_BSD_SIGNAL = 0x288 - SYS_KILLPG = 0x289 - SYS_SIGSET = 0x290 - SYS_SIGSTACK = 0x291 - SYS_GETRLIMIT = 0x292 - SYS_SETRLIMIT = 0x293 - SYS_GETRUSAGE = 0x294 - SYS_MMAP = 0x295 - SYS_MPROTECT = 0x296 - SYS_MSYNC = 0x297 - SYS_MUNMAP = 0x298 - SYS_CONFSTR = 0x299 - SYS___NDMTRM = 0x300 - SYS_FTOK = 0x301 - SYS_BASENAME = 0x302 - SYS_DIRNAME = 0x303 - SYS_GETDTABLESIZE = 0x304 - SYS_MKSTEMP = 0x305 - SYS_MKTEMP = 0x306 - SYS_NFTW = 0x307 - SYS_GETWD = 0x308 - SYS_LOCKF = 0x309 - SYS_WORDEXP = 0x310 - SYS_WORDFREE = 0x311 - SYS_GETPGID = 0x312 - SYS_GETSID = 0x313 - SYS___UTMPXNAME = 0x314 - SYS_CUSERID = 0x315 - SYS_GETPASS = 0x316 - SYS_FNMATCH = 0x317 - SYS_FTW = 0x318 - SYS_GETW = 0x319 - SYS_ACOSH = 0x320 - SYS_ASINH = 0x321 - SYS_ATANH = 0x322 - SYS_CBRT = 0x323 - SYS_EXPM1 = 0x324 - SYS_ILOGB = 0x325 - SYS_LOGB = 0x326 - SYS_LOG1P = 0x327 - SYS_NEXTAFTER = 0x328 - SYS_RINT = 0x329 - SYS_SPAWN = 0x330 - SYS_SPAWNP = 0x331 - SYS_GETLOGIN_UU = 0x332 - SYS_ECVT = 0x333 - SYS_FCVT = 0x334 - SYS_GCVT = 0x335 - SYS_ACCEPT = 0x336 - SYS_BIND = 0x337 - SYS_CONNECT = 0x338 - SYS_ENDHOSTENT = 0x339 - SYS_GETHOSTENT = 0x340 - SYS_GETHOSTID = 0x341 - SYS_GETHOSTNAME = 0x342 - SYS_GETNETBYADDR = 0x343 - SYS_GETNETBYNAME = 0x344 - SYS_GETNETENT = 0x345 - SYS_GETPEERNAME = 0x346 - SYS_GETPROTOBYNAME = 0x347 - SYS_GETPROTOBYNUMBER = 0x348 - SYS_GETPROTOENT = 0x349 - SYS_INET_LNAOF = 0x350 - SYS_INET_MAKEADDR = 0x351 - SYS_INET_NETOF = 0x352 - SYS_INET_NETWORK = 0x353 - SYS_INET_NTOA = 0x354 - SYS_IOCTL = 0x355 - SYS_LISTEN = 0x356 - SYS_READV = 0x357 - SYS_RECV = 0x358 - SYS_RECVFROM = 0x359 - SYS_SETHOSTENT = 0x360 - SYS_SETNETENT = 0x361 - SYS_SETPEER = 0x362 - SYS_SETPROTOENT = 0x363 - SYS_SETSERVENT = 0x364 - SYS_SETSOCKOPT = 0x365 - SYS_SHUTDOWN = 0x366 - SYS_SOCKET = 0x367 - SYS_SOCKETPAIR = 0x368 - SYS_WRITEV = 0x369 - SYS_ENDNETENT = 0x370 - SYS_CLOSELOG = 0x371 - SYS_OPENLOG = 0x372 - SYS_SETLOGMASK = 0x373 - SYS_SYSLOG = 0x374 - SYS_PTSNAME = 0x375 - SYS_SETREUID = 0x376 - SYS_SETREGID = 0x377 - SYS_REALPATH = 0x378 - SYS___SIGNGAM = 0x379 - SYS_POLL = 0x380 - SYS_REXEC = 0x381 - SYS___ISASCII2 = 0x382 - SYS___TOASCII2 = 0x383 - SYS_CHPRIORITY = 0x384 - SYS_PTHREAD_ATTR_SETSYNCTYPE_NP = 0x385 - SYS_PTHREAD_ATTR_GETSYNCTYPE_NP = 0x386 - SYS_PTHREAD_SET_LIMIT_NP = 0x387 - SYS___STNETENT = 0x388 - SYS___STPROTOENT = 0x389 - SYS___SELECT1 = 0x390 - SYS_PTHREAD_SECURITY_NP = 0x391 - SYS___CHECK_RESOURCE_AUTH_NP = 0x392 - SYS___CONVERT_ID_NP = 0x393 - SYS___OPENVMREL = 0x394 - SYS_WMEMCHR = 0x395 - SYS_WMEMCMP = 0x396 - SYS_WMEMCPY = 0x397 - SYS_WMEMMOVE = 0x398 - SYS_WMEMSET = 0x399 - SYS___FPUTWC = 0x400 - SYS___PUTWC = 0x401 - SYS___PWCHAR = 0x402 - SYS___WCSFTM = 0x403 - SYS___WCSTOK = 0x404 - SYS___WCWDTH = 0x405 - SYS_T_ACCEPT = 0x409 - SYS_T_GETINFO = 0x410 - SYS_T_GETPROTADDR = 0x411 - SYS_T_GETSTATE = 0x412 - SYS_T_LISTEN = 0x413 - SYS_T_LOOK = 0x414 - SYS_T_OPEN = 0x415 - SYS_T_OPTMGMT = 0x416 - SYS_T_RCV = 0x417 - SYS_T_RCVCONNECT = 0x418 - SYS_T_RCVDIS = 0x419 - SYS_T_SNDUDATA = 0x420 - SYS_T_STRERROR = 0x421 - SYS_T_SYNC = 0x422 - SYS_T_UNBIND = 0x423 - SYS___T_ERRNO = 0x424 - SYS___RECVMSG2 = 0x425 - SYS___SENDMSG2 = 0x426 - SYS_FATTACH = 0x427 - SYS_FDETACH = 0x428 - SYS_GETMSG = 0x429 - SYS_GETCONTEXT = 0x430 - SYS_SETCONTEXT = 0x431 - SYS_MAKECONTEXT = 0x432 - SYS_SWAPCONTEXT = 0x433 - SYS_PTHREAD_GETSPECIFIC_D8_NP = 0x434 - SYS_GETCLIENTID = 0x470 - SYS___GETCLIENTID = 0x471 - SYS_GETSTABLESIZE = 0x472 - SYS_GETIBMOPT = 0x473 - SYS_GETIBMSOCKOPT = 0x474 - SYS_GIVESOCKET = 0x475 - SYS_IBMSFLUSH = 0x476 - SYS_MAXDESC = 0x477 - SYS_SETIBMOPT = 0x478 - SYS_SETIBMSOCKOPT = 0x479 - SYS___SERVER_PWU = 0x480 - SYS_PTHREAD_TAG_NP = 0x481 - SYS___CONSOLE = 0x482 - SYS___WSINIT = 0x483 - SYS___IPTCPN = 0x489 - SYS___SERVER_CLASSIFY = 0x490 - SYS___HEAPRPT = 0x496 - SYS___ISBFP = 0x500 - SYS___FP_CAST = 0x501 - SYS___CERTIFICATE = 0x502 - SYS_SEND_FILE = 0x503 - SYS_AIO_CANCEL = 0x504 - SYS_AIO_ERROR = 0x505 - SYS_AIO_READ = 0x506 - SYS_AIO_RETURN = 0x507 - SYS_AIO_SUSPEND = 0x508 - SYS_AIO_WRITE = 0x509 - SYS_PTHREAD_RWLOCK_TRYWRLOCK = 0x510 - SYS_PTHREAD_RWLOCK_UNLOCK = 0x511 - SYS_PTHREAD_RWLOCK_WRLOCK = 0x512 - SYS_PTHREAD_RWLOCKATTR_GETPSHARED = 0x513 - SYS_PTHREAD_RWLOCKATTR_SETPSHARED = 0x514 - SYS_PTHREAD_RWLOCKATTR_INIT = 0x515 - SYS_PTHREAD_RWLOCKATTR_DESTROY = 0x516 - SYS___CTTBL = 0x517 - SYS_PTHREAD_MUTEXATTR_SETTYPE = 0x518 - SYS_PTHREAD_MUTEXATTR_GETTYPE = 0x519 - SYS___FP_UNORDERED = 0x520 - SYS___FP_READ_RND = 0x521 - SYS___FP_READ_RND_B = 0x522 - SYS___FP_SWAP_RND = 0x523 - SYS___FP_SWAP_RND_B = 0x524 - SYS___FP_LEVEL = 0x525 - SYS___FP_BTOH = 0x526 - SYS___FP_HTOB = 0x527 - SYS___FPC_RD = 0x528 - SYS___FPC_WR = 0x529 - SYS_PTHREAD_SETCANCELTYPE = 0x600 - SYS_PTHREAD_TESTCANCEL = 0x601 - SYS___ATANF_B = 0x602 - SYS___ATANL_B = 0x603 - SYS___CEILF_B = 0x604 - SYS___CEILL_B = 0x605 - SYS___COSF_B = 0x606 - SYS___COSL_B = 0x607 - SYS___FABSF_B = 0x608 - SYS___FABSL_B = 0x609 - SYS___SINF_B = 0x610 - SYS___SINL_B = 0x611 - SYS___TANF_B = 0x612 - SYS___TANL_B = 0x613 - SYS___TANHF_B = 0x614 - SYS___TANHL_B = 0x615 - SYS___ACOSF_B = 0x616 - SYS___ACOSL_B = 0x617 - SYS___ASINF_B = 0x618 - SYS___ASINL_B = 0x619 - SYS___LOGF_B = 0x620 - SYS___LOGL_B = 0x621 - SYS___LOG10F_B = 0x622 - SYS___LOG10L_B = 0x623 - SYS___POWF_B = 0x624 - SYS___POWL_B = 0x625 - SYS___SINHF_B = 0x626 - SYS___SINHL_B = 0x627 - SYS___SQRTF_B = 0x628 - SYS___SQRTL_B = 0x629 - SYS___MODFL_B = 0x630 - SYS_ABSF = 0x631 - SYS_ABSL = 0x632 - SYS_ACOSF = 0x633 - SYS_ACOSL = 0x634 - SYS_ASINF = 0x635 - SYS_ASINL = 0x636 - SYS_ATAN2F = 0x637 - SYS_ATAN2L = 0x638 - SYS_ATANF = 0x639 - SYS_COSHL = 0x640 - SYS_EXPF = 0x641 - SYS_EXPL = 0x642 - SYS_TANHF = 0x643 - SYS_TANHL = 0x644 - SYS_LOG10F = 0x645 - SYS_LOG10L = 0x646 - SYS_LOGF = 0x647 - SYS_LOGL = 0x648 - SYS_POWF = 0x649 - SYS_SINHL = 0x650 - SYS_TANF = 0x651 - SYS_TANL = 0x652 - SYS_FABSF = 0x653 - SYS_FABSL = 0x654 - SYS_FLOORF = 0x655 - SYS_FLOORL = 0x656 - SYS_FMODF = 0x657 - SYS_FMODL = 0x658 - SYS_FREXPF = 0x659 - SYS___CHATTR = 0x660 - SYS___FCHATTR = 0x661 - SYS___TOCCSID = 0x662 - SYS___CSNAMETYPE = 0x663 - SYS___TOCSNAME = 0x664 - SYS___CCSIDTYPE = 0x665 - SYS___AE_CORRESTBL_QUERY = 0x666 - SYS___AE_AUTOCONVERT_STATE = 0x667 - SYS_DN_FIND = 0x668 - SYS___GETHOSTBYADDR_A = 0x669 - SYS___MBLEN_SB_A = 0x670 - SYS___MBLEN_STD_A = 0x671 - SYS___MBLEN_UTF = 0x672 - SYS___MBSTOWCS_A = 0x673 - SYS___MBSTOWCS_STD_A = 0x674 - SYS___MBTOWC_A = 0x675 - SYS___MBTOWC_ISO1 = 0x676 - SYS___MBTOWC_SBCS = 0x677 - SYS___MBTOWC_MBCS = 0x678 - SYS___MBTOWC_UTF = 0x679 - SYS___CSID_A = 0x680 - SYS___CSID_STD_A = 0x681 - SYS___WCSID_A = 0x682 - SYS___WCSID_STD_A = 0x683 - SYS___WCTOMB_A = 0x684 - SYS___WCTOMB_ISO1 = 0x685 - SYS___WCTOMB_STD_A = 0x686 - SYS___WCTOMB_UTF = 0x687 - SYS___WCWIDTH_A = 0x688 - SYS___GETGRNAM_R_A = 0x689 - SYS___READDIR_R_A = 0x690 - SYS___E2A_S = 0x691 - SYS___FNMATCH_A = 0x692 - SYS___FNMATCH_C_A = 0x693 - SYS___EXECL_A = 0x694 - SYS___FNMATCH_STD_A = 0x695 - SYS___REGCOMP_A = 0x696 - SYS___REGCOMP_STD_A = 0x697 - SYS___REGERROR_A = 0x698 - SYS___REGERROR_STD_A = 0x699 - SYS___SWPRINTF_A = 0x700 - SYS___FSCANF_A = 0x701 - SYS___SCANF_A = 0x702 - SYS___SSCANF_A = 0x703 - SYS___SWSCANF_A = 0x704 - SYS___ATOF_A = 0x705 - SYS___ATOI_A = 0x706 - SYS___ATOL_A = 0x707 - SYS___STRTOD_A = 0x708 - SYS___STRTOL_A = 0x709 - SYS___L64A_A = 0x710 - SYS___STRERROR_A = 0x711 - SYS___PERROR_A = 0x712 - SYS___FETCH_A = 0x713 - SYS___GETENV_A = 0x714 - SYS___MKSTEMP_A = 0x717 - SYS___PTSNAME_A = 0x718 - SYS___PUTENV_A = 0x719 - SYS___CHDIR_A = 0x720 - SYS___CHOWN_A = 0x721 - SYS___CHROOT_A = 0x722 - SYS___GETCWD_A = 0x723 - SYS___GETWD_A = 0x724 - SYS___LCHOWN_A = 0x725 - SYS___LINK_A = 0x726 - SYS___PATHCONF_A = 0x727 - SYS___IF_NAMEINDEX_A = 0x728 - SYS___READLINK_A = 0x729 - SYS___EXTLINK_NP_A = 0x730 - SYS___ISALNUM_A = 0x731 - SYS___ISALPHA_A = 0x732 - SYS___A2E_S = 0x733 - SYS___ISCNTRL_A = 0x734 - SYS___ISDIGIT_A = 0x735 - SYS___ISGRAPH_A = 0x736 - SYS___ISLOWER_A = 0x737 - SYS___ISPRINT_A = 0x738 - SYS___ISPUNCT_A = 0x739 - SYS___ISWALPHA_A = 0x740 - SYS___A2E_L = 0x741 - SYS___ISWCNTRL_A = 0x742 - SYS___ISWDIGIT_A = 0x743 - SYS___ISWGRAPH_A = 0x744 - SYS___ISWLOWER_A = 0x745 - SYS___ISWPRINT_A = 0x746 - SYS___ISWPUNCT_A = 0x747 - SYS___ISWSPACE_A = 0x748 - SYS___ISWUPPER_A = 0x749 - SYS___REMOVE_A = 0x750 - SYS___RENAME_A = 0x751 - SYS___TMPNAM_A = 0x752 - SYS___FOPEN_A = 0x753 - SYS___FREOPEN_A = 0x754 - SYS___CUSERID_A = 0x755 - SYS___POPEN_A = 0x756 - SYS___TEMPNAM_A = 0x757 - SYS___FTW_A = 0x758 - SYS___GETGRENT_A = 0x759 - SYS___INET_NTOP_A = 0x760 - SYS___GETPASS_A = 0x761 - SYS___GETPWENT_A = 0x762 - SYS___GETPWNAM_A = 0x763 - SYS___GETPWUID_A = 0x764 - SYS_____CHECK_RESOURCE_AUTH_NP_A = 0x765 - SYS___CHECKSCHENV_A = 0x766 - SYS___CONNECTSERVER_A = 0x767 - SYS___CONNECTWORKMGR_A = 0x768 - SYS_____CONSOLE_A = 0x769 - SYS___MSGSND_A = 0x770 - SYS___MSGXRCV_A = 0x771 - SYS___NFTW_A = 0x772 - SYS_____PASSWD_A = 0x773 - SYS___PTHREAD_SECURITY_NP_A = 0x774 - SYS___QUERYMETRICS_A = 0x775 - SYS___QUERYSCHENV = 0x776 - SYS___READV_A = 0x777 - SYS_____SERVER_CLASSIFY_A = 0x778 - SYS_____SERVER_INIT_A = 0x779 - SYS___W_GETPSENT_A = 0x780 - SYS___WRITEV_A = 0x781 - SYS___W_STATFS_A = 0x782 - SYS___W_STATVFS_A = 0x783 - SYS___FPUTC_A = 0x784 - SYS___PUTCHAR_A = 0x785 - SYS___PUTS_A = 0x786 - SYS___FGETS_A = 0x787 - SYS___GETS_A = 0x788 - SYS___FPUTS_A = 0x789 - SYS___PUTC_A = 0x790 - SYS___AE_THREAD_SETMODE = 0x791 - SYS___AE_THREAD_SWAPMODE = 0x792 - SYS___GETNETBYADDR_A = 0x793 - SYS___GETNETBYNAME_A = 0x794 - SYS___GETNETENT_A = 0x795 - SYS___GETPROTOBYNAME_A = 0x796 - SYS___GETPROTOBYNUMBER_A = 0x797 - SYS___GETPROTOENT_A = 0x798 - SYS___GETSERVBYNAME_A = 0x799 - SYS_ACL_FIRST_ENTRY = 0x800 - SYS_ACL_GET_ENTRY = 0x801 - SYS_ACL_VALID = 0x802 - SYS_ACL_CREATE_ENTRY = 0x803 - SYS_ACL_DELETE_ENTRY = 0x804 - SYS_ACL_UPDATE_ENTRY = 0x805 - SYS_ACL_DELETE_FD = 0x806 - SYS_ACL_DELETE_FILE = 0x807 - SYS_ACL_GET_FD = 0x808 - SYS_ACL_GET_FILE = 0x809 - SYS___ERFL_B = 0x810 - SYS___ERFCL_B = 0x811 - SYS___LGAMMAL_B = 0x812 - SYS___SETHOOKEVENTS = 0x813 - SYS_IF_NAMETOINDEX = 0x814 - SYS_IF_INDEXTONAME = 0x815 - SYS_IF_NAMEINDEX = 0x816 - SYS_IF_FREENAMEINDEX = 0x817 - SYS_GETADDRINFO = 0x818 - SYS_GETNAMEINFO = 0x819 - SYS___DYNFREE_A = 0x820 - SYS___RES_QUERY_A = 0x821 - SYS___RES_SEARCH_A = 0x822 - SYS___RES_QUERYDOMAIN_A = 0x823 - SYS___RES_MKQUERY_A = 0x824 - SYS___RES_SEND_A = 0x825 - SYS___DN_EXPAND_A = 0x826 - SYS___DN_SKIPNAME_A = 0x827 - SYS___DN_COMP_A = 0x828 - SYS___DN_FIND_A = 0x829 - SYS___INET_NTOA_A = 0x830 - SYS___INET_NETWORK_A = 0x831 - SYS___ACCEPT_A = 0x832 - SYS___ACCEPT_AND_RECV_A = 0x833 - SYS___BIND_A = 0x834 - SYS___CONNECT_A = 0x835 - SYS___GETPEERNAME_A = 0x836 - SYS___GETSOCKNAME_A = 0x837 - SYS___RECVFROM_A = 0x838 - SYS___SENDTO_A = 0x839 - SYS___LCHATTR = 0x840 - SYS___WRITEDOWN = 0x841 - SYS_PTHREAD_MUTEX_INIT2 = 0x842 - SYS___ACOSHF_B = 0x843 - SYS___ACOSHL_B = 0x844 - SYS___ASINHF_B = 0x845 - SYS___ASINHL_B = 0x846 - SYS___ATANHF_B = 0x847 - SYS___ATANHL_B = 0x848 - SYS___CBRTF_B = 0x849 - SYS___EXP2F_B = 0x850 - SYS___EXP2L_B = 0x851 - SYS___EXPM1F_B = 0x852 - SYS___EXPM1L_B = 0x853 - SYS___FDIMF_B = 0x854 - SYS___FDIM_B = 0x855 - SYS___FDIML_B = 0x856 - SYS___HYPOTF_B = 0x857 - SYS___HYPOTL_B = 0x858 - SYS___LOG1PF_B = 0x859 - SYS___REMQUOF_B = 0x860 - SYS___REMQUO_B = 0x861 - SYS___REMQUOL_B = 0x862 - SYS___TGAMMAF_B = 0x863 - SYS___TGAMMA_B = 0x864 - SYS___TGAMMAL_B = 0x865 - SYS___TRUNCF_B = 0x866 - SYS___TRUNC_B = 0x867 - SYS___TRUNCL_B = 0x868 - SYS___LGAMMAF_B = 0x869 - SYS_ASINHF = 0x870 - SYS_ASINHL = 0x871 - SYS_ATANHF = 0x872 - SYS_ATANHL = 0x873 - SYS_CBRTF = 0x874 - SYS_CBRTL = 0x875 - SYS_COPYSIGNF = 0x876 - SYS_CPYSIGNF = 0x876 - SYS_COPYSIGNL = 0x877 - SYS_CPYSIGNL = 0x877 - SYS_COTANF = 0x878 - SYS___COTANF = 0x878 - SYS_COTAN = 0x879 - SYS___COTAN = 0x879 - SYS_FDIM = 0x881 - SYS_FDIML = 0x882 - SYS_HYPOTF = 0x883 - SYS_HYPOTL = 0x884 - SYS_LOG1PF = 0x885 - SYS_LOG1PL = 0x886 - SYS_LOG2F = 0x887 - SYS_LOG2 = 0x888 - SYS_LOG2L = 0x889 - SYS_TGAMMA = 0x890 - SYS_TGAMMAL = 0x891 - SYS_TRUNCF = 0x892 - SYS_TRUNC = 0x893 - SYS_TRUNCL = 0x894 - SYS_LGAMMAF = 0x895 - SYS_LGAMMAL = 0x896 - SYS_LROUNDF = 0x897 - SYS_LROUND = 0x898 - SYS_ERFF = 0x899 - SYS___COSHF_H = 0x900 - SYS___COSHL_H = 0x901 - SYS___COTAN_H = 0x902 - SYS___COTANF_H = 0x903 - SYS___COTANL_H = 0x904 - SYS___ERF_H = 0x905 - SYS___ERFF_H = 0x906 - SYS___ERFL_H = 0x907 - SYS___ERFC_H = 0x908 - SYS___ERFCF_H = 0x909 - SYS___FDIMF_H = 0x910 - SYS___FDIML_H = 0x911 - SYS___FMOD_H = 0x912 - SYS___FMODF_H = 0x913 - SYS___FMODL_H = 0x914 - SYS___GAMMA_H = 0x915 - SYS___HYPOT_H = 0x916 - SYS___ILOGB_H = 0x917 - SYS___LGAMMA_H = 0x918 - SYS___LGAMMAF_H = 0x919 - SYS___LOG2L_H = 0x920 - SYS___LOG1P_H = 0x921 - SYS___LOG10_H = 0x922 - SYS___LOG10F_H = 0x923 - SYS___LOG10L_H = 0x924 - SYS___LROUND_H = 0x925 - SYS___LROUNDF_H = 0x926 - SYS___NEXTAFTER_H = 0x927 - SYS___POW_H = 0x928 - SYS___POWF_H = 0x929 - SYS___SINL_H = 0x930 - SYS___SINH_H = 0x931 - SYS___SINHF_H = 0x932 - SYS___SINHL_H = 0x933 - SYS___SQRT_H = 0x934 - SYS___SQRTF_H = 0x935 - SYS___SQRTL_H = 0x936 - SYS___TAN_H = 0x937 - SYS___TANF_H = 0x938 - SYS___TANL_H = 0x939 - SYS___TRUNCF_H = 0x940 - SYS___TRUNCL_H = 0x941 - SYS___COSH_H = 0x942 - SYS___LE_DEBUG_SET_RESUME_MCH = 0x943 - SYS_VFSCANF = 0x944 - SYS_VSCANF = 0x946 - SYS_VSSCANF = 0x948 - SYS_IMAXABS = 0x950 - SYS_IMAXDIV = 0x951 - SYS_STRTOIMAX = 0x952 - SYS_STRTOUMAX = 0x953 - SYS_WCSTOIMAX = 0x954 - SYS_WCSTOUMAX = 0x955 - SYS_ATOLL = 0x956 - SYS_STRTOF = 0x957 - SYS_STRTOLD = 0x958 - SYS_WCSTOF = 0x959 - SYS_INET6_RTH_GETADDR = 0x960 - SYS_INET6_OPT_INIT = 0x961 - SYS_INET6_OPT_APPEND = 0x962 - SYS_INET6_OPT_FINISH = 0x963 - SYS_INET6_OPT_SET_VAL = 0x964 - SYS_INET6_OPT_NEXT = 0x965 - SYS_INET6_OPT_FIND = 0x966 - SYS_INET6_OPT_GET_VAL = 0x967 - SYS___POW_I = 0x987 - SYS___POW_I_B = 0x988 - SYS___POW_I_H = 0x989 - SYS___CABS_H = 0x990 - SYS_CABSF = 0x991 - SYS___CABSF_B = 0x992 - SYS___CABSF_H = 0x993 - SYS_CABSL = 0x994 - SYS___CABSL_B = 0x995 - SYS___CABSL_H = 0x996 - SYS_CACOS = 0x997 - SYS___CACOS_B = 0x998 - SYS___CACOS_H = 0x999 + SYS_LOG = 0x17 // 23 + SYS_COSH = 0x18 // 24 + SYS_TANH = 0x19 // 25 + SYS_EXP = 0x1A // 26 + SYS_MODF = 0x1B // 27 + SYS_LOG10 = 0x1C // 28 + SYS_FREXP = 0x1D // 29 + SYS_LDEXP = 0x1E // 30 + SYS_CEIL = 0x1F // 31 + SYS_POW = 0x20 // 32 + SYS_SQRT = 0x21 // 33 + SYS_FLOOR = 0x22 // 34 + SYS_J1 = 0x23 // 35 + SYS_FABS = 0x24 // 36 + SYS_FMOD = 0x25 // 37 + SYS_J0 = 0x26 // 38 + SYS_YN = 0x27 // 39 + SYS_JN = 0x28 // 40 + SYS_Y0 = 0x29 // 41 + SYS_Y1 = 0x2A // 42 + SYS_HYPOT = 0x2B // 43 + SYS_ERF = 0x2C // 44 + SYS_ERFC = 0x2D // 45 + SYS_GAMMA = 0x2E // 46 + SYS_ISALPHA = 0x30 // 48 + SYS_ISALNUM = 0x31 // 49 + SYS_ISLOWER = 0x32 // 50 + SYS_ISCNTRL = 0x33 // 51 + SYS_ISDIGIT = 0x34 // 52 + SYS_ISGRAPH = 0x35 // 53 + SYS_ISUPPER = 0x36 // 54 + SYS_ISPRINT = 0x37 // 55 + SYS_ISPUNCT = 0x38 // 56 + SYS_ISSPACE = 0x39 // 57 + SYS_SETLOCAL = 0x3A // 58 + SYS_SETLOCALE = 0x3A // 58 + SYS_ISXDIGIT = 0x3B // 59 + SYS_TOLOWER = 0x3C // 60 + SYS_TOUPPER = 0x3D // 61 + SYS_ASIN = 0x3E // 62 + SYS_SIN = 0x3F // 63 + SYS_COS = 0x40 // 64 + SYS_TAN = 0x41 // 65 + SYS_SINH = 0x42 // 66 + SYS_ACOS = 0x43 // 67 + SYS_ATAN = 0x44 // 68 + SYS_ATAN2 = 0x45 // 69 + SYS_FTELL = 0x46 // 70 + SYS_FGETPOS = 0x47 // 71 + SYS_FSEEK = 0x48 // 72 + SYS_FSETPOS = 0x49 // 73 + SYS_FERROR = 0x4A // 74 + SYS_REWIND = 0x4B // 75 + SYS_CLEARERR = 0x4C // 76 + SYS_FEOF = 0x4D // 77 + SYS_ATOL = 0x4E // 78 + SYS_PERROR = 0x4F // 79 + SYS_ATOF = 0x50 // 80 + SYS_ATOI = 0x51 // 81 + SYS_RAND = 0x52 // 82 + SYS_STRTOD = 0x53 // 83 + SYS_STRTOL = 0x54 // 84 + SYS_STRTOUL = 0x55 // 85 + SYS_MALLOC = 0x56 // 86 + SYS_SRAND = 0x57 // 87 + SYS_CALLOC = 0x58 // 88 + SYS_FREE = 0x59 // 89 + SYS_EXIT = 0x5A // 90 + SYS_REALLOC = 0x5B // 91 + SYS_ABORT = 0x5C // 92 + SYS___ABORT = 0x5C // 92 + SYS_ATEXIT = 0x5D // 93 + SYS_RAISE = 0x5E // 94 + SYS_SETJMP = 0x5F // 95 + SYS_LONGJMP = 0x60 // 96 + SYS_SIGNAL = 0x61 // 97 + SYS_TMPNAM = 0x62 // 98 + SYS_REMOVE = 0x63 // 99 + SYS_RENAME = 0x64 // 100 + SYS_TMPFILE = 0x65 // 101 + SYS_FREOPEN = 0x66 // 102 + SYS_FCLOSE = 0x67 // 103 + SYS_FFLUSH = 0x68 // 104 + SYS_FOPEN = 0x69 // 105 + SYS_FSCANF = 0x6A // 106 + SYS_SETBUF = 0x6B // 107 + SYS_SETVBUF = 0x6C // 108 + SYS_FPRINTF = 0x6D // 109 + SYS_SSCANF = 0x6E // 110 + SYS_PRINTF = 0x6F // 111 + SYS_SCANF = 0x70 // 112 + SYS_SPRINTF = 0x71 // 113 + SYS_FGETC = 0x72 // 114 + SYS_VFPRINTF = 0x73 // 115 + SYS_VPRINTF = 0x74 // 116 + SYS_VSPRINTF = 0x75 // 117 + SYS_GETC = 0x76 // 118 + SYS_FGETS = 0x77 // 119 + SYS_FPUTC = 0x78 // 120 + SYS_FPUTS = 0x79 // 121 + SYS_PUTCHAR = 0x7A // 122 + SYS_GETCHAR = 0x7B // 123 + SYS_GETS = 0x7C // 124 + SYS_PUTC = 0x7D // 125 + SYS_FWRITE = 0x7E // 126 + SYS_PUTS = 0x7F // 127 + SYS_UNGETC = 0x80 // 128 + SYS_FREAD = 0x81 // 129 + SYS_WCSTOMBS = 0x82 // 130 + SYS_MBTOWC = 0x83 // 131 + SYS_WCTOMB = 0x84 // 132 + SYS_MBSTOWCS = 0x85 // 133 + SYS_WCSCPY = 0x86 // 134 + SYS_WCSCAT = 0x87 // 135 + SYS_WCSCHR = 0x88 // 136 + SYS_WCSCMP = 0x89 // 137 + SYS_WCSNCMP = 0x8A // 138 + SYS_WCSCSPN = 0x8B // 139 + SYS_WCSLEN = 0x8C // 140 + SYS_WCSNCAT = 0x8D // 141 + SYS_WCSSPN = 0x8E // 142 + SYS_WCSNCPY = 0x8F // 143 + SYS_ABS = 0x90 // 144 + SYS_DIV = 0x91 // 145 + SYS_LABS = 0x92 // 146 + SYS_STRNCPY = 0x93 // 147 + SYS_MEMCPY = 0x94 // 148 + SYS_MEMMOVE = 0x95 // 149 + SYS_STRCPY = 0x96 // 150 + SYS_STRCMP = 0x97 // 151 + SYS_STRCAT = 0x98 // 152 + SYS_STRNCAT = 0x99 // 153 + SYS_MEMCMP = 0x9A // 154 + SYS_MEMCHR = 0x9B // 155 + SYS_STRCOLL = 0x9C // 156 + SYS_STRNCMP = 0x9D // 157 + SYS_STRXFRM = 0x9E // 158 + SYS_STRRCHR = 0x9F // 159 + SYS_STRCHR = 0xA0 // 160 + SYS_STRCSPN = 0xA1 // 161 + SYS_STRPBRK = 0xA2 // 162 + SYS_MEMSET = 0xA3 // 163 + SYS_STRSPN = 0xA4 // 164 + SYS_STRSTR = 0xA5 // 165 + SYS_STRTOK = 0xA6 // 166 + SYS_DIFFTIME = 0xA7 // 167 + SYS_STRERROR = 0xA8 // 168 + SYS_STRLEN = 0xA9 // 169 + SYS_CLOCK = 0xAA // 170 + SYS_CTIME = 0xAB // 171 + SYS_MKTIME = 0xAC // 172 + SYS_TIME = 0xAD // 173 + SYS_ASCTIME = 0xAE // 174 + SYS_MBLEN = 0xAF // 175 + SYS_GMTIME = 0xB0 // 176 + SYS_LOCALTIM = 0xB1 // 177 + SYS_LOCALTIME = 0xB1 // 177 + SYS_STRFTIME = 0xB2 // 178 + SYS___GETCB = 0xB4 // 180 + SYS_FUPDATE = 0xB5 // 181 + SYS___FUPDT = 0xB5 // 181 + SYS_CLRMEMF = 0xBD // 189 + SYS___CLRMF = 0xBD // 189 + SYS_FETCHEP = 0xBF // 191 + SYS___FTCHEP = 0xBF // 191 + SYS_FLDATA = 0xC1 // 193 + SYS___FLDATA = 0xC1 // 193 + SYS_DYNFREE = 0xC2 // 194 + SYS___DYNFRE = 0xC2 // 194 + SYS_DYNALLOC = 0xC3 // 195 + SYS___DYNALL = 0xC3 // 195 + SYS___CDUMP = 0xC4 // 196 + SYS_CSNAP = 0xC5 // 197 + SYS___CSNAP = 0xC5 // 197 + SYS_CTRACE = 0xC6 // 198 + SYS___CTRACE = 0xC6 // 198 + SYS___CTEST = 0xC7 // 199 + SYS_SETENV = 0xC8 // 200 + SYS___SETENV = 0xC8 // 200 + SYS_CLEARENV = 0xC9 // 201 + SYS___CLRENV = 0xC9 // 201 + SYS___REGCOMP_STD = 0xEA // 234 + SYS_NL_LANGINFO = 0xFC // 252 + SYS_GETSYNTX = 0xFD // 253 + SYS_ISBLANK = 0xFE // 254 + SYS___ISBLNK = 0xFE // 254 + SYS_ISWALNUM = 0xFF // 255 + SYS_ISWALPHA = 0x100 // 256 + SYS_ISWBLANK = 0x101 // 257 + SYS___ISWBLK = 0x101 // 257 + SYS_ISWCNTRL = 0x102 // 258 + SYS_ISWDIGIT = 0x103 // 259 + SYS_ISWGRAPH = 0x104 // 260 + SYS_ISWLOWER = 0x105 // 261 + SYS_ISWPRINT = 0x106 // 262 + SYS_ISWPUNCT = 0x107 // 263 + SYS_ISWSPACE = 0x108 // 264 + SYS_ISWUPPER = 0x109 // 265 + SYS_ISWXDIGI = 0x10A // 266 + SYS_ISWXDIGIT = 0x10A // 266 + SYS_WCTYPE = 0x10B // 267 + SYS_ISWCTYPE = 0x10C // 268 + SYS_TOWLOWER = 0x10D // 269 + SYS_TOWUPPER = 0x10E // 270 + SYS_MBSINIT = 0x10F // 271 + SYS_WCTOB = 0x110 // 272 + SYS_MBRLEN = 0x111 // 273 + SYS_MBRTOWC = 0x112 // 274 + SYS_MBSRTOWC = 0x113 // 275 + SYS_MBSRTOWCS = 0x113 // 275 + SYS_WCRTOMB = 0x114 // 276 + SYS_WCSRTOMB = 0x115 // 277 + SYS_WCSRTOMBS = 0x115 // 277 + SYS___CSID = 0x116 // 278 + SYS___WCSID = 0x117 // 279 + SYS_STRPTIME = 0x118 // 280 + SYS___STRPTM = 0x118 // 280 + SYS_STRFMON = 0x119 // 281 + SYS___RPMTCH = 0x11A // 282 + SYS_WCSSTR = 0x11B // 283 + SYS_WCSTOK = 0x12C // 300 + SYS_WCSTOL = 0x12D // 301 + SYS_WCSTOD = 0x12E // 302 + SYS_WCSTOUL = 0x12F // 303 + SYS_WCSCOLL = 0x130 // 304 + SYS_WCSXFRM = 0x131 // 305 + SYS_WCSWIDTH = 0x132 // 306 + SYS_WCWIDTH = 0x133 // 307 + SYS_WCSFTIME = 0x134 // 308 + SYS_SWPRINTF = 0x135 // 309 + SYS_VSWPRINT = 0x136 // 310 + SYS_VSWPRINTF = 0x136 // 310 + SYS_SWSCANF = 0x137 // 311 + SYS_REGCOMP = 0x138 // 312 + SYS_REGEXEC = 0x139 // 313 + SYS_REGFREE = 0x13A // 314 + SYS_REGERROR = 0x13B // 315 + SYS_FGETWC = 0x13C // 316 + SYS_FGETWS = 0x13D // 317 + SYS_FPUTWC = 0x13E // 318 + SYS_FPUTWS = 0x13F // 319 + SYS_GETWC = 0x140 // 320 + SYS_GETWCHAR = 0x141 // 321 + SYS_PUTWC = 0x142 // 322 + SYS_PUTWCHAR = 0x143 // 323 + SYS_UNGETWC = 0x144 // 324 + SYS_ICONV_OPEN = 0x145 // 325 + SYS_ICONV = 0x146 // 326 + SYS_ICONV_CLOSE = 0x147 // 327 + SYS_ISMCCOLLEL = 0x14C // 332 + SYS_STRTOCOLL = 0x14D // 333 + SYS_COLLTOSTR = 0x14E // 334 + SYS_COLLEQUIV = 0x14F // 335 + SYS_COLLRANGE = 0x150 // 336 + SYS_CCLASS = 0x151 // 337 + SYS_COLLORDER = 0x152 // 338 + SYS___DEMANGLE = 0x154 // 340 + SYS_FDOPEN = 0x155 // 341 + SYS___ERRNO = 0x156 // 342 + SYS___ERRNO2 = 0x157 // 343 + SYS___TERROR = 0x158 // 344 + SYS_MAXCOLL = 0x169 // 361 + SYS_GETMCCOLL = 0x16A // 362 + SYS_GETWMCCOLL = 0x16B // 363 + SYS___ERR2AD = 0x16C // 364 + SYS_DLLQUERYFN = 0x16D // 365 + SYS_DLLQUERYVAR = 0x16E // 366 + SYS_DLLFREE = 0x16F // 367 + SYS_DLLLOAD = 0x170 // 368 + SYS__EXIT = 0x174 // 372 + SYS_ACCESS = 0x175 // 373 + SYS_ALARM = 0x176 // 374 + SYS_CFGETISPEED = 0x177 // 375 + SYS_CFGETOSPEED = 0x178 // 376 + SYS_CFSETISPEED = 0x179 // 377 + SYS_CFSETOSPEED = 0x17A // 378 + SYS_CHDIR = 0x17B // 379 + SYS_CHMOD = 0x17C // 380 + SYS_CHOWN = 0x17D // 381 + SYS_CLOSE = 0x17E // 382 + SYS_CLOSEDIR = 0x17F // 383 + SYS_CREAT = 0x180 // 384 + SYS_CTERMID = 0x181 // 385 + SYS_DUP = 0x182 // 386 + SYS_DUP2 = 0x183 // 387 + SYS_EXECL = 0x184 // 388 + SYS_EXECLE = 0x185 // 389 + SYS_EXECLP = 0x186 // 390 + SYS_EXECV = 0x187 // 391 + SYS_EXECVE = 0x188 // 392 + SYS_EXECVP = 0x189 // 393 + SYS_FCHMOD = 0x18A // 394 + SYS_FCHOWN = 0x18B // 395 + SYS_FCNTL = 0x18C // 396 + SYS_FILENO = 0x18D // 397 + SYS_FORK = 0x18E // 398 + SYS_FPATHCONF = 0x18F // 399 + SYS_FSTAT = 0x190 // 400 + SYS_FSYNC = 0x191 // 401 + SYS_FTRUNCATE = 0x192 // 402 + SYS_GETCWD = 0x193 // 403 + SYS_GETEGID = 0x194 // 404 + SYS_GETEUID = 0x195 // 405 + SYS_GETGID = 0x196 // 406 + SYS_GETGRGID = 0x197 // 407 + SYS_GETGRNAM = 0x198 // 408 + SYS_GETGROUPS = 0x199 // 409 + SYS_GETLOGIN = 0x19A // 410 + SYS_W_GETMNTENT = 0x19B // 411 + SYS_GETPGRP = 0x19C // 412 + SYS_GETPID = 0x19D // 413 + SYS_GETPPID = 0x19E // 414 + SYS_GETPWNAM = 0x19F // 415 + SYS_GETPWUID = 0x1A0 // 416 + SYS_GETUID = 0x1A1 // 417 + SYS_W_IOCTL = 0x1A2 // 418 + SYS_ISATTY = 0x1A3 // 419 + SYS_KILL = 0x1A4 // 420 + SYS_LINK = 0x1A5 // 421 + SYS_LSEEK = 0x1A6 // 422 + SYS_LSTAT = 0x1A7 // 423 + SYS_MKDIR = 0x1A8 // 424 + SYS_MKFIFO = 0x1A9 // 425 + SYS_MKNOD = 0x1AA // 426 + SYS_MOUNT = 0x1AB // 427 + SYS_OPEN = 0x1AC // 428 + SYS_OPENDIR = 0x1AD // 429 + SYS_PATHCONF = 0x1AE // 430 + SYS_PAUSE = 0x1AF // 431 + SYS_PIPE = 0x1B0 // 432 + SYS_W_GETPSENT = 0x1B1 // 433 + SYS_READ = 0x1B2 // 434 + SYS_READDIR = 0x1B3 // 435 + SYS_READLINK = 0x1B4 // 436 + SYS_REWINDDIR = 0x1B5 // 437 + SYS_RMDIR = 0x1B6 // 438 + SYS_SETEGID = 0x1B7 // 439 + SYS_SETEUID = 0x1B8 // 440 + SYS_SETGID = 0x1B9 // 441 + SYS_SETPGID = 0x1BA // 442 + SYS_SETSID = 0x1BB // 443 + SYS_SETUID = 0x1BC // 444 + SYS_SIGACTION = 0x1BD // 445 + SYS_SIGADDSET = 0x1BE // 446 + SYS_SIGDELSET = 0x1BF // 447 + SYS_SIGEMPTYSET = 0x1C0 // 448 + SYS_SIGFILLSET = 0x1C1 // 449 + SYS_SIGISMEMBER = 0x1C2 // 450 + SYS_SIGLONGJMP = 0x1C3 // 451 + SYS_SIGPENDING = 0x1C4 // 452 + SYS_SIGPROCMASK = 0x1C5 // 453 + SYS_SIGSETJMP = 0x1C6 // 454 + SYS_SIGSUSPEND = 0x1C7 // 455 + SYS_SLEEP = 0x1C8 // 456 + SYS_STAT = 0x1C9 // 457 + SYS_W_STATFS = 0x1CA // 458 + SYS_SYMLINK = 0x1CB // 459 + SYS_SYSCONF = 0x1CC // 460 + SYS_TCDRAIN = 0x1CD // 461 + SYS_TCFLOW = 0x1CE // 462 + SYS_TCFLUSH = 0x1CF // 463 + SYS_TCGETATTR = 0x1D0 // 464 + SYS_TCGETPGRP = 0x1D1 // 465 + SYS_TCSENDBREAK = 0x1D2 // 466 + SYS_TCSETATTR = 0x1D3 // 467 + SYS_TCSETPGRP = 0x1D4 // 468 + SYS_TIMES = 0x1D5 // 469 + SYS_TTYNAME = 0x1D6 // 470 + SYS_TZSET = 0x1D7 // 471 + SYS_UMASK = 0x1D8 // 472 + SYS_UMOUNT = 0x1D9 // 473 + SYS_UNAME = 0x1DA // 474 + SYS_UNLINK = 0x1DB // 475 + SYS_UTIME = 0x1DC // 476 + SYS_WAIT = 0x1DD // 477 + SYS_WAITPID = 0x1DE // 478 + SYS_WRITE = 0x1DF // 479 + SYS_CHAUDIT = 0x1E0 // 480 + SYS_FCHAUDIT = 0x1E1 // 481 + SYS_GETGROUPSBYNAME = 0x1E2 // 482 + SYS_SIGWAIT = 0x1E3 // 483 + SYS_PTHREAD_EXIT = 0x1E4 // 484 + SYS_PTHREAD_KILL = 0x1E5 // 485 + SYS_PTHREAD_ATTR_INIT = 0x1E6 // 486 + SYS_PTHREAD_ATTR_DESTROY = 0x1E7 // 487 + SYS_PTHREAD_ATTR_SETSTACKSIZE = 0x1E8 // 488 + SYS_PTHREAD_ATTR_GETSTACKSIZE = 0x1E9 // 489 + SYS_PTHREAD_ATTR_SETDETACHSTATE = 0x1EA // 490 + SYS_PTHREAD_ATTR_GETDETACHSTATE = 0x1EB // 491 + SYS_PTHREAD_ATTR_SETWEIGHT_NP = 0x1EC // 492 + SYS_PTHREAD_ATTR_GETWEIGHT_NP = 0x1ED // 493 + SYS_PTHREAD_CANCEL = 0x1EE // 494 + SYS_PTHREAD_CLEANUP_PUSH = 0x1EF // 495 + SYS_PTHREAD_CLEANUP_POP = 0x1F0 // 496 + SYS_PTHREAD_CONDATTR_INIT = 0x1F1 // 497 + SYS_PTHREAD_CONDATTR_DESTROY = 0x1F2 // 498 + SYS_PTHREAD_COND_INIT = 0x1F3 // 499 + SYS_PTHREAD_COND_DESTROY = 0x1F4 // 500 + SYS_PTHREAD_COND_SIGNAL = 0x1F5 // 501 + SYS_PTHREAD_COND_BROADCAST = 0x1F6 // 502 + SYS_PTHREAD_COND_WAIT = 0x1F7 // 503 + SYS_PTHREAD_COND_TIMEDWAIT = 0x1F8 // 504 + SYS_PTHREAD_CREATE = 0x1F9 // 505 + SYS_PTHREAD_DETACH = 0x1FA // 506 + SYS_PTHREAD_EQUAL = 0x1FB // 507 + SYS_PTHREAD_GETSPECIFIC = 0x1FC // 508 + SYS_PTHREAD_JOIN = 0x1FD // 509 + SYS_PTHREAD_KEY_CREATE = 0x1FE // 510 + SYS_PTHREAD_MUTEXATTR_INIT = 0x1FF // 511 + SYS_PTHREAD_MUTEXATTR_DESTROY = 0x200 // 512 + SYS_PTHREAD_MUTEXATTR_SETKIND_NP = 0x201 // 513 + SYS_PTHREAD_MUTEXATTR_GETKIND_NP = 0x202 // 514 + SYS_PTHREAD_MUTEX_INIT = 0x203 // 515 + SYS_PTHREAD_MUTEX_DESTROY = 0x204 // 516 + SYS_PTHREAD_MUTEX_LOCK = 0x205 // 517 + SYS_PTHREAD_MUTEX_TRYLOCK = 0x206 // 518 + SYS_PTHREAD_MUTEX_UNLOCK = 0x207 // 519 + SYS_PTHREAD_ONCE = 0x209 // 521 + SYS_PTHREAD_SELF = 0x20A // 522 + SYS_PTHREAD_SETINTR = 0x20B // 523 + SYS_PTHREAD_SETINTRTYPE = 0x20C // 524 + SYS_PTHREAD_SETSPECIFIC = 0x20D // 525 + SYS_PTHREAD_TESTINTR = 0x20E // 526 + SYS_PTHREAD_YIELD = 0x20F // 527 + SYS_TW_OPEN = 0x210 // 528 + SYS_TW_FCNTL = 0x211 // 529 + SYS_PTHREAD_JOIN_D4_NP = 0x212 // 530 + SYS_PTHREAD_CONDATTR_SETKIND_NP = 0x213 // 531 + SYS_PTHREAD_CONDATTR_GETKIND_NP = 0x214 // 532 + SYS_EXTLINK_NP = 0x215 // 533 + SYS___PASSWD = 0x216 // 534 + SYS_SETGROUPS = 0x217 // 535 + SYS_INITGROUPS = 0x218 // 536 + SYS_WCSPBRK = 0x23F // 575 + SYS_WCSRCHR = 0x240 // 576 + SYS_SVC99 = 0x241 // 577 + SYS___SVC99 = 0x241 // 577 + SYS_WCSWCS = 0x242 // 578 + SYS_LOCALECO = 0x243 // 579 + SYS_LOCALECONV = 0x243 // 579 + SYS___LIBREL = 0x244 // 580 + SYS_RELEASE = 0x245 // 581 + SYS___RLSE = 0x245 // 581 + SYS_FLOCATE = 0x246 // 582 + SYS___FLOCT = 0x246 // 582 + SYS_FDELREC = 0x247 // 583 + SYS___FDLREC = 0x247 // 583 + SYS_FETCH = 0x248 // 584 + SYS___FETCH = 0x248 // 584 + SYS_QSORT = 0x249 // 585 + SYS_GETENV = 0x24A // 586 + SYS_SYSTEM = 0x24B // 587 + SYS_BSEARCH = 0x24C // 588 + SYS_LDIV = 0x24D // 589 + SYS___THROW = 0x25E // 606 + SYS___RETHROW = 0x25F // 607 + SYS___CLEANUPCATCH = 0x260 // 608 + SYS___CATCHMATCH = 0x261 // 609 + SYS___CLEAN2UPCATCH = 0x262 // 610 + SYS_PUTENV = 0x26A // 618 + SYS___GETENV = 0x26F // 623 + SYS_GETPRIORITY = 0x270 // 624 + SYS_NICE = 0x271 // 625 + SYS_SETPRIORITY = 0x272 // 626 + SYS_GETITIMER = 0x273 // 627 + SYS_SETITIMER = 0x274 // 628 + SYS_MSGCTL = 0x275 // 629 + SYS_MSGGET = 0x276 // 630 + SYS_MSGRCV = 0x277 // 631 + SYS_MSGSND = 0x278 // 632 + SYS_MSGXRCV = 0x279 // 633 + SYS___MSGXR = 0x279 // 633 + SYS_SEMCTL = 0x27A // 634 + SYS_SEMGET = 0x27B // 635 + SYS_SEMOP = 0x27C // 636 + SYS_SHMAT = 0x27D // 637 + SYS_SHMCTL = 0x27E // 638 + SYS_SHMDT = 0x27F // 639 + SYS_SHMGET = 0x280 // 640 + SYS___GETIPC = 0x281 // 641 + SYS_SETGRENT = 0x282 // 642 + SYS_GETGRENT = 0x283 // 643 + SYS_ENDGRENT = 0x284 // 644 + SYS_SETPWENT = 0x285 // 645 + SYS_GETPWENT = 0x286 // 646 + SYS_ENDPWENT = 0x287 // 647 + SYS_BSD_SIGNAL = 0x288 // 648 + SYS_KILLPG = 0x289 // 649 + SYS_SIGALTSTACK = 0x28A // 650 + SYS_SIGHOLD = 0x28B // 651 + SYS_SIGIGNORE = 0x28C // 652 + SYS_SIGINTERRUPT = 0x28D // 653 + SYS_SIGPAUSE = 0x28E // 654 + SYS_SIGRELSE = 0x28F // 655 + SYS_SIGSET = 0x290 // 656 + SYS_SIGSTACK = 0x291 // 657 + SYS_GETRLIMIT = 0x292 // 658 + SYS_SETRLIMIT = 0x293 // 659 + SYS_GETRUSAGE = 0x294 // 660 + SYS_MMAP = 0x295 // 661 + SYS_MPROTECT = 0x296 // 662 + SYS_MSYNC = 0x297 // 663 + SYS_MUNMAP = 0x298 // 664 + SYS_CONFSTR = 0x299 // 665 + SYS_GETOPT = 0x29A // 666 + SYS_LCHOWN = 0x29B // 667 + SYS_TRUNCATE = 0x29C // 668 + SYS_GETSUBOPT = 0x29D // 669 + SYS_SETPGRP = 0x29E // 670 + SYS___GDERR = 0x29F // 671 + SYS___TZONE = 0x2A0 // 672 + SYS___DLGHT = 0x2A1 // 673 + SYS___OPARGF = 0x2A2 // 674 + SYS___OPOPTF = 0x2A3 // 675 + SYS___OPINDF = 0x2A4 // 676 + SYS___OPERRF = 0x2A5 // 677 + SYS_GETDATE = 0x2A6 // 678 + SYS_WAIT3 = 0x2A7 // 679 + SYS_WAITID = 0x2A8 // 680 + SYS___CATTRM = 0x2A9 // 681 + SYS___GDTRM = 0x2AA // 682 + SYS___RNDTRM = 0x2AB // 683 + SYS_CRYPT = 0x2AC // 684 + SYS_ENCRYPT = 0x2AD // 685 + SYS_SETKEY = 0x2AE // 686 + SYS___CNVBLK = 0x2AF // 687 + SYS___CRYTRM = 0x2B0 // 688 + SYS___ECRTRM = 0x2B1 // 689 + SYS_DRAND48 = 0x2B2 // 690 + SYS_ERAND48 = 0x2B3 // 691 + SYS_FSTATVFS = 0x2B4 // 692 + SYS_STATVFS = 0x2B5 // 693 + SYS_CATCLOSE = 0x2B6 // 694 + SYS_CATGETS = 0x2B7 // 695 + SYS_CATOPEN = 0x2B8 // 696 + SYS_BCMP = 0x2B9 // 697 + SYS_BCOPY = 0x2BA // 698 + SYS_BZERO = 0x2BB // 699 + SYS_FFS = 0x2BC // 700 + SYS_INDEX = 0x2BD // 701 + SYS_RINDEX = 0x2BE // 702 + SYS_STRCASECMP = 0x2BF // 703 + SYS_STRDUP = 0x2C0 // 704 + SYS_STRNCASECMP = 0x2C1 // 705 + SYS_INITSTATE = 0x2C2 // 706 + SYS_SETSTATE = 0x2C3 // 707 + SYS_RANDOM = 0x2C4 // 708 + SYS_SRANDOM = 0x2C5 // 709 + SYS_HCREATE = 0x2C6 // 710 + SYS_HDESTROY = 0x2C7 // 711 + SYS_HSEARCH = 0x2C8 // 712 + SYS_LFIND = 0x2C9 // 713 + SYS_LSEARCH = 0x2CA // 714 + SYS_TDELETE = 0x2CB // 715 + SYS_TFIND = 0x2CC // 716 + SYS_TSEARCH = 0x2CD // 717 + SYS_TWALK = 0x2CE // 718 + SYS_INSQUE = 0x2CF // 719 + SYS_REMQUE = 0x2D0 // 720 + SYS_POPEN = 0x2D1 // 721 + SYS_PCLOSE = 0x2D2 // 722 + SYS_SWAB = 0x2D3 // 723 + SYS_MEMCCPY = 0x2D4 // 724 + SYS_GETPAGESIZE = 0x2D8 // 728 + SYS_FCHDIR = 0x2D9 // 729 + SYS___OCLCK = 0x2DA // 730 + SYS___ATOE = 0x2DB // 731 + SYS___ATOE_L = 0x2DC // 732 + SYS___ETOA = 0x2DD // 733 + SYS___ETOA_L = 0x2DE // 734 + SYS_SETUTXENT = 0x2DF // 735 + SYS_GETUTXENT = 0x2E0 // 736 + SYS_ENDUTXENT = 0x2E1 // 737 + SYS_GETUTXID = 0x2E2 // 738 + SYS_GETUTXLINE = 0x2E3 // 739 + SYS_PUTUTXLINE = 0x2E4 // 740 + SYS_FMTMSG = 0x2E5 // 741 + SYS_JRAND48 = 0x2E6 // 742 + SYS_LRAND48 = 0x2E7 // 743 + SYS_MRAND48 = 0x2E8 // 744 + SYS_NRAND48 = 0x2E9 // 745 + SYS_LCONG48 = 0x2EA // 746 + SYS_SRAND48 = 0x2EB // 747 + SYS_SEED48 = 0x2EC // 748 + SYS_ISASCII = 0x2ED // 749 + SYS_TOASCII = 0x2EE // 750 + SYS_A64L = 0x2EF // 751 + SYS_L64A = 0x2F0 // 752 + SYS_UALARM = 0x2F1 // 753 + SYS_USLEEP = 0x2F2 // 754 + SYS___UTXTRM = 0x2F3 // 755 + SYS___SRCTRM = 0x2F4 // 756 + SYS_FTIME = 0x2F5 // 757 + SYS_GETTIMEOFDAY = 0x2F6 // 758 + SYS_DBM_CLEARERR = 0x2F7 // 759 + SYS_DBM_CLOSE = 0x2F8 // 760 + SYS_DBM_DELETE = 0x2F9 // 761 + SYS_DBM_ERROR = 0x2FA // 762 + SYS_DBM_FETCH = 0x2FB // 763 + SYS_DBM_FIRSTKEY = 0x2FC // 764 + SYS_DBM_NEXTKEY = 0x2FD // 765 + SYS_DBM_OPEN = 0x2FE // 766 + SYS_DBM_STORE = 0x2FF // 767 + SYS___NDMTRM = 0x300 // 768 + SYS_FTOK = 0x301 // 769 + SYS_BASENAME = 0x302 // 770 + SYS_DIRNAME = 0x303 // 771 + SYS_GETDTABLESIZE = 0x304 // 772 + SYS_MKSTEMP = 0x305 // 773 + SYS_MKTEMP = 0x306 // 774 + SYS_NFTW = 0x307 // 775 + SYS_GETWD = 0x308 // 776 + SYS_LOCKF = 0x309 // 777 + SYS__LONGJMP = 0x30D // 781 + SYS__SETJMP = 0x30E // 782 + SYS_VFORK = 0x30F // 783 + SYS_WORDEXP = 0x310 // 784 + SYS_WORDFREE = 0x311 // 785 + SYS_GETPGID = 0x312 // 786 + SYS_GETSID = 0x313 // 787 + SYS___UTMPXNAME = 0x314 // 788 + SYS_CUSERID = 0x315 // 789 + SYS_GETPASS = 0x316 // 790 + SYS_FNMATCH = 0x317 // 791 + SYS_FTW = 0x318 // 792 + SYS_GETW = 0x319 // 793 + SYS_GLOB = 0x31A // 794 + SYS_GLOBFREE = 0x31B // 795 + SYS_PUTW = 0x31C // 796 + SYS_SEEKDIR = 0x31D // 797 + SYS_TELLDIR = 0x31E // 798 + SYS_TEMPNAM = 0x31F // 799 + SYS_ACOSH = 0x320 // 800 + SYS_ASINH = 0x321 // 801 + SYS_ATANH = 0x322 // 802 + SYS_CBRT = 0x323 // 803 + SYS_EXPM1 = 0x324 // 804 + SYS_ILOGB = 0x325 // 805 + SYS_LOGB = 0x326 // 806 + SYS_LOG1P = 0x327 // 807 + SYS_NEXTAFTER = 0x328 // 808 + SYS_RINT = 0x329 // 809 + SYS_REMAINDER = 0x32A // 810 + SYS_SCALB = 0x32B // 811 + SYS_LGAMMA = 0x32C // 812 + SYS_TTYSLOT = 0x32D // 813 + SYS_GETTIMEOFDAY_R = 0x32E // 814 + SYS_SYNC = 0x32F // 815 + SYS_SPAWN = 0x330 // 816 + SYS_SPAWNP = 0x331 // 817 + SYS_GETLOGIN_UU = 0x332 // 818 + SYS_ECVT = 0x333 // 819 + SYS_FCVT = 0x334 // 820 + SYS_GCVT = 0x335 // 821 + SYS_ACCEPT = 0x336 // 822 + SYS_BIND = 0x337 // 823 + SYS_CONNECT = 0x338 // 824 + SYS_ENDHOSTENT = 0x339 // 825 + SYS_ENDPROTOENT = 0x33A // 826 + SYS_ENDSERVENT = 0x33B // 827 + SYS_GETHOSTBYADDR_R = 0x33C // 828 + SYS_GETHOSTBYADDR = 0x33D // 829 + SYS_GETHOSTBYNAME_R = 0x33E // 830 + SYS_GETHOSTBYNAME = 0x33F // 831 + SYS_GETHOSTENT = 0x340 // 832 + SYS_GETHOSTID = 0x341 // 833 + SYS_GETHOSTNAME = 0x342 // 834 + SYS_GETNETBYADDR = 0x343 // 835 + SYS_GETNETBYNAME = 0x344 // 836 + SYS_GETNETENT = 0x345 // 837 + SYS_GETPEERNAME = 0x346 // 838 + SYS_GETPROTOBYNAME = 0x347 // 839 + SYS_GETPROTOBYNUMBER = 0x348 // 840 + SYS_GETPROTOENT = 0x349 // 841 + SYS_GETSERVBYNAME = 0x34A // 842 + SYS_GETSERVBYPORT = 0x34B // 843 + SYS_GETSERVENT = 0x34C // 844 + SYS_GETSOCKNAME = 0x34D // 845 + SYS_GETSOCKOPT = 0x34E // 846 + SYS_INET_ADDR = 0x34F // 847 + SYS_INET_LNAOF = 0x350 // 848 + SYS_INET_MAKEADDR = 0x351 // 849 + SYS_INET_NETOF = 0x352 // 850 + SYS_INET_NETWORK = 0x353 // 851 + SYS_INET_NTOA = 0x354 // 852 + SYS_IOCTL = 0x355 // 853 + SYS_LISTEN = 0x356 // 854 + SYS_READV = 0x357 // 855 + SYS_RECV = 0x358 // 856 + SYS_RECVFROM = 0x359 // 857 + SYS_SELECT = 0x35B // 859 + SYS_SELECTEX = 0x35C // 860 + SYS_SEND = 0x35D // 861 + SYS_SENDTO = 0x35F // 863 + SYS_SETHOSTENT = 0x360 // 864 + SYS_SETNETENT = 0x361 // 865 + SYS_SETPEER = 0x362 // 866 + SYS_SETPROTOENT = 0x363 // 867 + SYS_SETSERVENT = 0x364 // 868 + SYS_SETSOCKOPT = 0x365 // 869 + SYS_SHUTDOWN = 0x366 // 870 + SYS_SOCKET = 0x367 // 871 + SYS_SOCKETPAIR = 0x368 // 872 + SYS_WRITEV = 0x369 // 873 + SYS_CHROOT = 0x36A // 874 + SYS_W_STATVFS = 0x36B // 875 + SYS_ULIMIT = 0x36C // 876 + SYS_ISNAN = 0x36D // 877 + SYS_UTIMES = 0x36E // 878 + SYS___H_ERRNO = 0x36F // 879 + SYS_ENDNETENT = 0x370 // 880 + SYS_CLOSELOG = 0x371 // 881 + SYS_OPENLOG = 0x372 // 882 + SYS_SETLOGMASK = 0x373 // 883 + SYS_SYSLOG = 0x374 // 884 + SYS_PTSNAME = 0x375 // 885 + SYS_SETREUID = 0x376 // 886 + SYS_SETREGID = 0x377 // 887 + SYS_REALPATH = 0x378 // 888 + SYS___SIGNGAM = 0x379 // 889 + SYS_GRANTPT = 0x37A // 890 + SYS_UNLOCKPT = 0x37B // 891 + SYS_TCGETSID = 0x37C // 892 + SYS___TCGETCP = 0x37D // 893 + SYS___TCSETCP = 0x37E // 894 + SYS___TCSETTABLES = 0x37F // 895 + SYS_POLL = 0x380 // 896 + SYS_REXEC = 0x381 // 897 + SYS___ISASCII2 = 0x382 // 898 + SYS___TOASCII2 = 0x383 // 899 + SYS_CHPRIORITY = 0x384 // 900 + SYS_PTHREAD_ATTR_SETSYNCTYPE_NP = 0x385 // 901 + SYS_PTHREAD_ATTR_GETSYNCTYPE_NP = 0x386 // 902 + SYS_PTHREAD_SET_LIMIT_NP = 0x387 // 903 + SYS___STNETENT = 0x388 // 904 + SYS___STPROTOENT = 0x389 // 905 + SYS___STSERVENT = 0x38A // 906 + SYS___STHOSTENT = 0x38B // 907 + SYS_NLIST = 0x38C // 908 + SYS___IPDBCS = 0x38D // 909 + SYS___IPDSPX = 0x38E // 910 + SYS___IPMSGC = 0x38F // 911 + SYS___SELECT1 = 0x390 // 912 + SYS_PTHREAD_SECURITY_NP = 0x391 // 913 + SYS___CHECK_RESOURCE_AUTH_NP = 0x392 // 914 + SYS___CONVERT_ID_NP = 0x393 // 915 + SYS___OPENVMREL = 0x394 // 916 + SYS_WMEMCHR = 0x395 // 917 + SYS_WMEMCMP = 0x396 // 918 + SYS_WMEMCPY = 0x397 // 919 + SYS_WMEMMOVE = 0x398 // 920 + SYS_WMEMSET = 0x399 // 921 + SYS___FPUTWC = 0x400 // 1024 + SYS___PUTWC = 0x401 // 1025 + SYS___PWCHAR = 0x402 // 1026 + SYS___WCSFTM = 0x403 // 1027 + SYS___WCSTOK = 0x404 // 1028 + SYS___WCWDTH = 0x405 // 1029 + SYS_T_ACCEPT = 0x409 // 1033 + SYS_T_ALLOC = 0x40A // 1034 + SYS_T_BIND = 0x40B // 1035 + SYS_T_CLOSE = 0x40C // 1036 + SYS_T_CONNECT = 0x40D // 1037 + SYS_T_ERROR = 0x40E // 1038 + SYS_T_FREE = 0x40F // 1039 + SYS_T_GETINFO = 0x410 // 1040 + SYS_T_GETPROTADDR = 0x411 // 1041 + SYS_T_GETSTATE = 0x412 // 1042 + SYS_T_LISTEN = 0x413 // 1043 + SYS_T_LOOK = 0x414 // 1044 + SYS_T_OPEN = 0x415 // 1045 + SYS_T_OPTMGMT = 0x416 // 1046 + SYS_T_RCV = 0x417 // 1047 + SYS_T_RCVCONNECT = 0x418 // 1048 + SYS_T_RCVDIS = 0x419 // 1049 + SYS_T_RCVREL = 0x41A // 1050 + SYS_T_RCVUDATA = 0x41B // 1051 + SYS_T_RCVUDERR = 0x41C // 1052 + SYS_T_SND = 0x41D // 1053 + SYS_T_SNDDIS = 0x41E // 1054 + SYS_T_SNDREL = 0x41F // 1055 + SYS_T_SNDUDATA = 0x420 // 1056 + SYS_T_STRERROR = 0x421 // 1057 + SYS_T_SYNC = 0x422 // 1058 + SYS_T_UNBIND = 0x423 // 1059 + SYS___T_ERRNO = 0x424 // 1060 + SYS___RECVMSG2 = 0x425 // 1061 + SYS___SENDMSG2 = 0x426 // 1062 + SYS_FATTACH = 0x427 // 1063 + SYS_FDETACH = 0x428 // 1064 + SYS_GETMSG = 0x429 // 1065 + SYS_GETPMSG = 0x42A // 1066 + SYS_ISASTREAM = 0x42B // 1067 + SYS_PUTMSG = 0x42C // 1068 + SYS_PUTPMSG = 0x42D // 1069 + SYS___ISPOSIXON = 0x42E // 1070 + SYS___OPENMVSREL = 0x42F // 1071 + SYS_GETCONTEXT = 0x430 // 1072 + SYS_SETCONTEXT = 0x431 // 1073 + SYS_MAKECONTEXT = 0x432 // 1074 + SYS_SWAPCONTEXT = 0x433 // 1075 + SYS_PTHREAD_GETSPECIFIC_D8_NP = 0x434 // 1076 + SYS_GETCLIENTID = 0x470 // 1136 + SYS___GETCLIENTID = 0x471 // 1137 + SYS_GETSTABLESIZE = 0x472 // 1138 + SYS_GETIBMOPT = 0x473 // 1139 + SYS_GETIBMSOCKOPT = 0x474 // 1140 + SYS_GIVESOCKET = 0x475 // 1141 + SYS_IBMSFLUSH = 0x476 // 1142 + SYS_MAXDESC = 0x477 // 1143 + SYS_SETIBMOPT = 0x478 // 1144 + SYS_SETIBMSOCKOPT = 0x479 // 1145 + SYS_SOCK_DEBUG = 0x47A // 1146 + SYS_SOCK_DO_TESTSTOR = 0x47D // 1149 + SYS_TAKESOCKET = 0x47E // 1150 + SYS___SERVER_INIT = 0x47F // 1151 + SYS___SERVER_PWU = 0x480 // 1152 + SYS_PTHREAD_TAG_NP = 0x481 // 1153 + SYS___CONSOLE = 0x482 // 1154 + SYS___WSINIT = 0x483 // 1155 + SYS___IPTCPN = 0x489 // 1161 + SYS___SMF_RECORD = 0x48A // 1162 + SYS___IPHOST = 0x48B // 1163 + SYS___IPNODE = 0x48C // 1164 + SYS___SERVER_CLASSIFY_CREATE = 0x48D // 1165 + SYS___SERVER_CLASSIFY_DESTROY = 0x48E // 1166 + SYS___SERVER_CLASSIFY_RESET = 0x48F // 1167 + SYS___SERVER_CLASSIFY = 0x490 // 1168 + SYS___HEAPRPT = 0x496 // 1174 + SYS___FNWSA = 0x49B // 1179 + SYS___SPAWN2 = 0x49D // 1181 + SYS___SPAWNP2 = 0x49E // 1182 + SYS___GDRR = 0x4A1 // 1185 + SYS___HRRNO = 0x4A2 // 1186 + SYS___OPRG = 0x4A3 // 1187 + SYS___OPRR = 0x4A4 // 1188 + SYS___OPND = 0x4A5 // 1189 + SYS___OPPT = 0x4A6 // 1190 + SYS___SIGGM = 0x4A7 // 1191 + SYS___DGHT = 0x4A8 // 1192 + SYS___TZNE = 0x4A9 // 1193 + SYS___TZZN = 0x4AA // 1194 + SYS___TRRNO = 0x4AF // 1199 + SYS___ENVN = 0x4B0 // 1200 + SYS___MLOCKALL = 0x4B1 // 1201 + SYS_CREATEWO = 0x4B2 // 1202 + SYS_CREATEWORKUNIT = 0x4B2 // 1202 + SYS_CONTINUE = 0x4B3 // 1203 + SYS_CONTINUEWORKUNIT = 0x4B3 // 1203 + SYS_CONNECTW = 0x4B4 // 1204 + SYS_CONNECTWORKMGR = 0x4B4 // 1204 + SYS_CONNECTS = 0x4B5 // 1205 + SYS_CONNECTSERVER = 0x4B5 // 1205 + SYS_DISCONNE = 0x4B6 // 1206 + SYS_DISCONNECTSERVER = 0x4B6 // 1206 + SYS_JOINWORK = 0x4B7 // 1207 + SYS_JOINWORKUNIT = 0x4B7 // 1207 + SYS_LEAVEWOR = 0x4B8 // 1208 + SYS_LEAVEWORKUNIT = 0x4B8 // 1208 + SYS_DELETEWO = 0x4B9 // 1209 + SYS_DELETEWORKUNIT = 0x4B9 // 1209 + SYS_QUERYMET = 0x4BA // 1210 + SYS_QUERYMETRICS = 0x4BA // 1210 + SYS_QUERYSCH = 0x4BB // 1211 + SYS_QUERYSCHENV = 0x4BB // 1211 + SYS_CHECKSCH = 0x4BC // 1212 + SYS_CHECKSCHENV = 0x4BC // 1212 + SYS___PID_AFFINITY = 0x4BD // 1213 + SYS___ASINH_B = 0x4BE // 1214 + SYS___ATAN_B = 0x4BF // 1215 + SYS___CBRT_B = 0x4C0 // 1216 + SYS___CEIL_B = 0x4C1 // 1217 + SYS_COPYSIGN = 0x4C2 // 1218 + SYS___COS_B = 0x4C3 // 1219 + SYS___ERF_B = 0x4C4 // 1220 + SYS___ERFC_B = 0x4C5 // 1221 + SYS___EXPM1_B = 0x4C6 // 1222 + SYS___FABS_B = 0x4C7 // 1223 + SYS_FINITE = 0x4C8 // 1224 + SYS___FLOOR_B = 0x4C9 // 1225 + SYS___FREXP_B = 0x4CA // 1226 + SYS___ILOGB_B = 0x4CB // 1227 + SYS___ISNAN_B = 0x4CC // 1228 + SYS___LDEXP_B = 0x4CD // 1229 + SYS___LOG1P_B = 0x4CE // 1230 + SYS___LOGB_B = 0x4CF // 1231 + SYS_MATHERR = 0x4D0 // 1232 + SYS___MODF_B = 0x4D1 // 1233 + SYS___NEXTAFTER_B = 0x4D2 // 1234 + SYS___RINT_B = 0x4D3 // 1235 + SYS_SCALBN = 0x4D4 // 1236 + SYS_SIGNIFIC = 0x4D5 // 1237 + SYS_SIGNIFICAND = 0x4D5 // 1237 + SYS___SIN_B = 0x4D6 // 1238 + SYS___TAN_B = 0x4D7 // 1239 + SYS___TANH_B = 0x4D8 // 1240 + SYS___ACOS_B = 0x4D9 // 1241 + SYS___ACOSH_B = 0x4DA // 1242 + SYS___ASIN_B = 0x4DB // 1243 + SYS___ATAN2_B = 0x4DC // 1244 + SYS___ATANH_B = 0x4DD // 1245 + SYS___COSH_B = 0x4DE // 1246 + SYS___EXP_B = 0x4DF // 1247 + SYS___FMOD_B = 0x4E0 // 1248 + SYS___GAMMA_B = 0x4E1 // 1249 + SYS_GAMMA_R = 0x4E2 // 1250 + SYS___HYPOT_B = 0x4E3 // 1251 + SYS___J0_B = 0x4E4 // 1252 + SYS___Y0_B = 0x4E5 // 1253 + SYS___J1_B = 0x4E6 // 1254 + SYS___Y1_B = 0x4E7 // 1255 + SYS___JN_B = 0x4E8 // 1256 + SYS___YN_B = 0x4E9 // 1257 + SYS___LGAMMA_B = 0x4EA // 1258 + SYS_LGAMMA_R = 0x4EB // 1259 + SYS___LOG_B = 0x4EC // 1260 + SYS___LOG10_B = 0x4ED // 1261 + SYS___POW_B = 0x4EE // 1262 + SYS___REMAINDER_B = 0x4EF // 1263 + SYS___SCALB_B = 0x4F0 // 1264 + SYS___SINH_B = 0x4F1 // 1265 + SYS___SQRT_B = 0x4F2 // 1266 + SYS___OPENDIR2 = 0x4F3 // 1267 + SYS___READDIR2 = 0x4F4 // 1268 + SYS___LOGIN = 0x4F5 // 1269 + SYS___OPEN_STAT = 0x4F6 // 1270 + SYS_ACCEPT_AND_RECV = 0x4F7 // 1271 + SYS___FP_SETMODE = 0x4F8 // 1272 + SYS___SIGACTIONSET = 0x4FB // 1275 + SYS___UCREATE = 0x4FC // 1276 + SYS___UMALLOC = 0x4FD // 1277 + SYS___UFREE = 0x4FE // 1278 + SYS___UHEAPREPORT = 0x4FF // 1279 + SYS___ISBFP = 0x500 // 1280 + SYS___FP_CAST = 0x501 // 1281 + SYS___CERTIFICATE = 0x502 // 1282 + SYS_SEND_FILE = 0x503 // 1283 + SYS_AIO_CANCEL = 0x504 // 1284 + SYS_AIO_ERROR = 0x505 // 1285 + SYS_AIO_READ = 0x506 // 1286 + SYS_AIO_RETURN = 0x507 // 1287 + SYS_AIO_SUSPEND = 0x508 // 1288 + SYS_AIO_WRITE = 0x509 // 1289 + SYS_PTHREAD_MUTEXATTR_GETPSHARED = 0x50A // 1290 + SYS_PTHREAD_MUTEXATTR_SETPSHARED = 0x50B // 1291 + SYS_PTHREAD_RWLOCK_DESTROY = 0x50C // 1292 + SYS_PTHREAD_RWLOCK_INIT = 0x50D // 1293 + SYS_PTHREAD_RWLOCK_RDLOCK = 0x50E // 1294 + SYS_PTHREAD_RWLOCK_TRYRDLOCK = 0x50F // 1295 + SYS_PTHREAD_RWLOCK_TRYWRLOCK = 0x510 // 1296 + SYS_PTHREAD_RWLOCK_UNLOCK = 0x511 // 1297 + SYS_PTHREAD_RWLOCK_WRLOCK = 0x512 // 1298 + SYS_PTHREAD_RWLOCKATTR_GETPSHARED = 0x513 // 1299 + SYS_PTHREAD_RWLOCKATTR_SETPSHARED = 0x514 // 1300 + SYS_PTHREAD_RWLOCKATTR_INIT = 0x515 // 1301 + SYS_PTHREAD_RWLOCKATTR_DESTROY = 0x516 // 1302 + SYS___CTTBL = 0x517 // 1303 + SYS_PTHREAD_MUTEXATTR_SETTYPE = 0x518 // 1304 + SYS_PTHREAD_MUTEXATTR_GETTYPE = 0x519 // 1305 + SYS___FP_CLR_FLAG = 0x51A // 1306 + SYS___FP_READ_FLAG = 0x51B // 1307 + SYS___FP_RAISE_XCP = 0x51C // 1308 + SYS___FP_CLASS = 0x51D // 1309 + SYS___FP_FINITE = 0x51E // 1310 + SYS___FP_ISNAN = 0x51F // 1311 + SYS___FP_UNORDERED = 0x520 // 1312 + SYS___FP_READ_RND = 0x521 // 1313 + SYS___FP_READ_RND_B = 0x522 // 1314 + SYS___FP_SWAP_RND = 0x523 // 1315 + SYS___FP_SWAP_RND_B = 0x524 // 1316 + SYS___FP_LEVEL = 0x525 // 1317 + SYS___FP_BTOH = 0x526 // 1318 + SYS___FP_HTOB = 0x527 // 1319 + SYS___FPC_RD = 0x528 // 1320 + SYS___FPC_WR = 0x529 // 1321 + SYS___FPC_RW = 0x52A // 1322 + SYS___FPC_SM = 0x52B // 1323 + SYS___FPC_RS = 0x52C // 1324 + SYS_SIGTIMEDWAIT = 0x52D // 1325 + SYS_SIGWAITINFO = 0x52E // 1326 + SYS___CHKBFP = 0x52F // 1327 + SYS___W_PIOCTL = 0x59E // 1438 + SYS___OSENV = 0x59F // 1439 + SYS_EXPORTWO = 0x5A1 // 1441 + SYS_EXPORTWORKUNIT = 0x5A1 // 1441 + SYS_UNDOEXPO = 0x5A2 // 1442 + SYS_UNDOEXPORTWORKUNIT = 0x5A2 // 1442 + SYS_IMPORTWO = 0x5A3 // 1443 + SYS_IMPORTWORKUNIT = 0x5A3 // 1443 + SYS_UNDOIMPO = 0x5A4 // 1444 + SYS_UNDOIMPORTWORKUNIT = 0x5A4 // 1444 + SYS_EXTRACTW = 0x5A5 // 1445 + SYS_EXTRACTWORKUNIT = 0x5A5 // 1445 + SYS___CPL = 0x5A6 // 1446 + SYS___MAP_INIT = 0x5A7 // 1447 + SYS___MAP_SERVICE = 0x5A8 // 1448 + SYS_SIGQUEUE = 0x5A9 // 1449 + SYS___MOUNT = 0x5AA // 1450 + SYS___GETUSERID = 0x5AB // 1451 + SYS___IPDOMAINNAME = 0x5AC // 1452 + SYS_QUERYENC = 0x5AD // 1453 + SYS_QUERYWORKUNITCLASSIFICATION = 0x5AD // 1453 + SYS_CONNECTE = 0x5AE // 1454 + SYS_CONNECTEXPORTIMPORT = 0x5AE // 1454 + SYS___FP_SWAPMODE = 0x5AF // 1455 + SYS_STRTOLL = 0x5B0 // 1456 + SYS_STRTOULL = 0x5B1 // 1457 + SYS___DSA_PREV = 0x5B2 // 1458 + SYS___EP_FIND = 0x5B3 // 1459 + SYS___SERVER_THREADS_QUERY = 0x5B4 // 1460 + SYS___MSGRCV_TIMED = 0x5B7 // 1463 + SYS___SEMOP_TIMED = 0x5B8 // 1464 + SYS___GET_CPUID = 0x5B9 // 1465 + SYS___GET_SYSTEM_SETTINGS = 0x5BA // 1466 + SYS_FTELLO = 0x5C8 // 1480 + SYS_FSEEKO = 0x5C9 // 1481 + SYS_LLDIV = 0x5CB // 1483 + SYS_WCSTOLL = 0x5CC // 1484 + SYS_WCSTOULL = 0x5CD // 1485 + SYS_LLABS = 0x5CE // 1486 + SYS___CONSOLE2 = 0x5D2 // 1490 + SYS_INET_NTOP = 0x5D3 // 1491 + SYS_INET_PTON = 0x5D4 // 1492 + SYS___RES = 0x5D6 // 1494 + SYS_RES_MKQUERY = 0x5D7 // 1495 + SYS_RES_INIT = 0x5D8 // 1496 + SYS_RES_QUERY = 0x5D9 // 1497 + SYS_RES_SEARCH = 0x5DA // 1498 + SYS_RES_SEND = 0x5DB // 1499 + SYS_RES_QUERYDOMAIN = 0x5DC // 1500 + SYS_DN_EXPAND = 0x5DD // 1501 + SYS_DN_SKIPNAME = 0x5DE // 1502 + SYS_DN_COMP = 0x5DF // 1503 + SYS_ASCTIME_R = 0x5E0 // 1504 + SYS_CTIME_R = 0x5E1 // 1505 + SYS_GMTIME_R = 0x5E2 // 1506 + SYS_LOCALTIME_R = 0x5E3 // 1507 + SYS_RAND_R = 0x5E4 // 1508 + SYS_STRTOK_R = 0x5E5 // 1509 + SYS_READDIR_R = 0x5E6 // 1510 + SYS_GETGRGID_R = 0x5E7 // 1511 + SYS_GETGRNAM_R = 0x5E8 // 1512 + SYS_GETLOGIN_R = 0x5E9 // 1513 + SYS_GETPWNAM_R = 0x5EA // 1514 + SYS_GETPWUID_R = 0x5EB // 1515 + SYS_TTYNAME_R = 0x5EC // 1516 + SYS_PTHREAD_ATFORK = 0x5ED // 1517 + SYS_PTHREAD_ATTR_GETGUARDSIZE = 0x5EE // 1518 + SYS_PTHREAD_ATTR_GETSTACKADDR = 0x5EF // 1519 + SYS_PTHREAD_ATTR_SETGUARDSIZE = 0x5F0 // 1520 + SYS_PTHREAD_ATTR_SETSTACKADDR = 0x5F1 // 1521 + SYS_PTHREAD_CONDATTR_GETPSHARED = 0x5F2 // 1522 + SYS_PTHREAD_CONDATTR_SETPSHARED = 0x5F3 // 1523 + SYS_PTHREAD_GETCONCURRENCY = 0x5F4 // 1524 + SYS_PTHREAD_KEY_DELETE = 0x5F5 // 1525 + SYS_PTHREAD_SETCONCURRENCY = 0x5F6 // 1526 + SYS_PTHREAD_SIGMASK = 0x5F7 // 1527 + SYS___DISCARDDATA = 0x5F8 // 1528 + SYS_PTHREAD_ATTR_GETSCHEDPARAM = 0x5F9 // 1529 + SYS_PTHREAD_ATTR_SETSCHEDPARAM = 0x5FA // 1530 + SYS_PTHREAD_ATTR_GETDETACHSTATE_U98 = 0x5FB // 1531 + SYS_PTHREAD_ATTR_SETDETACHSTATE_U98 = 0x5FC // 1532 + SYS_PTHREAD_DETACH_U98 = 0x5FD // 1533 + SYS_PTHREAD_GETSPECIFIC_U98 = 0x5FE // 1534 + SYS_PTHREAD_SETCANCELSTATE = 0x5FF // 1535 + SYS_PTHREAD_SETCANCELTYPE = 0x600 // 1536 + SYS_PTHREAD_TESTCANCEL = 0x601 // 1537 + SYS___ATANF_B = 0x602 // 1538 + SYS___ATANL_B = 0x603 // 1539 + SYS___CEILF_B = 0x604 // 1540 + SYS___CEILL_B = 0x605 // 1541 + SYS___COSF_B = 0x606 // 1542 + SYS___COSL_B = 0x607 // 1543 + SYS___FABSF_B = 0x608 // 1544 + SYS___FABSL_B = 0x609 // 1545 + SYS___FLOORF_B = 0x60A // 1546 + SYS___FLOORL_B = 0x60B // 1547 + SYS___FREXPF_B = 0x60C // 1548 + SYS___FREXPL_B = 0x60D // 1549 + SYS___LDEXPF_B = 0x60E // 1550 + SYS___LDEXPL_B = 0x60F // 1551 + SYS___SINF_B = 0x610 // 1552 + SYS___SINL_B = 0x611 // 1553 + SYS___TANF_B = 0x612 // 1554 + SYS___TANL_B = 0x613 // 1555 + SYS___TANHF_B = 0x614 // 1556 + SYS___TANHL_B = 0x615 // 1557 + SYS___ACOSF_B = 0x616 // 1558 + SYS___ACOSL_B = 0x617 // 1559 + SYS___ASINF_B = 0x618 // 1560 + SYS___ASINL_B = 0x619 // 1561 + SYS___ATAN2F_B = 0x61A // 1562 + SYS___ATAN2L_B = 0x61B // 1563 + SYS___COSHF_B = 0x61C // 1564 + SYS___COSHL_B = 0x61D // 1565 + SYS___EXPF_B = 0x61E // 1566 + SYS___EXPL_B = 0x61F // 1567 + SYS___LOGF_B = 0x620 // 1568 + SYS___LOGL_B = 0x621 // 1569 + SYS___LOG10F_B = 0x622 // 1570 + SYS___LOG10L_B = 0x623 // 1571 + SYS___POWF_B = 0x624 // 1572 + SYS___POWL_B = 0x625 // 1573 + SYS___SINHF_B = 0x626 // 1574 + SYS___SINHL_B = 0x627 // 1575 + SYS___SQRTF_B = 0x628 // 1576 + SYS___SQRTL_B = 0x629 // 1577 + SYS___ABSF_B = 0x62A // 1578 + SYS___ABS_B = 0x62B // 1579 + SYS___ABSL_B = 0x62C // 1580 + SYS___FMODF_B = 0x62D // 1581 + SYS___FMODL_B = 0x62E // 1582 + SYS___MODFF_B = 0x62F // 1583 + SYS___MODFL_B = 0x630 // 1584 + SYS_ABSF = 0x631 // 1585 + SYS_ABSL = 0x632 // 1586 + SYS_ACOSF = 0x633 // 1587 + SYS_ACOSL = 0x634 // 1588 + SYS_ASINF = 0x635 // 1589 + SYS_ASINL = 0x636 // 1590 + SYS_ATAN2F = 0x637 // 1591 + SYS_ATAN2L = 0x638 // 1592 + SYS_ATANF = 0x639 // 1593 + SYS_ATANL = 0x63A // 1594 + SYS_CEILF = 0x63B // 1595 + SYS_CEILL = 0x63C // 1596 + SYS_COSF = 0x63D // 1597 + SYS_COSL = 0x63E // 1598 + SYS_COSHF = 0x63F // 1599 + SYS_COSHL = 0x640 // 1600 + SYS_EXPF = 0x641 // 1601 + SYS_EXPL = 0x642 // 1602 + SYS_TANHF = 0x643 // 1603 + SYS_TANHL = 0x644 // 1604 + SYS_LOG10F = 0x645 // 1605 + SYS_LOG10L = 0x646 // 1606 + SYS_LOGF = 0x647 // 1607 + SYS_LOGL = 0x648 // 1608 + SYS_POWF = 0x649 // 1609 + SYS_POWL = 0x64A // 1610 + SYS_SINF = 0x64B // 1611 + SYS_SINL = 0x64C // 1612 + SYS_SQRTF = 0x64D // 1613 + SYS_SQRTL = 0x64E // 1614 + SYS_SINHF = 0x64F // 1615 + SYS_SINHL = 0x650 // 1616 + SYS_TANF = 0x651 // 1617 + SYS_TANL = 0x652 // 1618 + SYS_FABSF = 0x653 // 1619 + SYS_FABSL = 0x654 // 1620 + SYS_FLOORF = 0x655 // 1621 + SYS_FLOORL = 0x656 // 1622 + SYS_FMODF = 0x657 // 1623 + SYS_FMODL = 0x658 // 1624 + SYS_FREXPF = 0x659 // 1625 + SYS_FREXPL = 0x65A // 1626 + SYS_LDEXPF = 0x65B // 1627 + SYS_LDEXPL = 0x65C // 1628 + SYS_MODFF = 0x65D // 1629 + SYS_MODFL = 0x65E // 1630 + SYS_BTOWC = 0x65F // 1631 + SYS___CHATTR = 0x660 // 1632 + SYS___FCHATTR = 0x661 // 1633 + SYS___TOCCSID = 0x662 // 1634 + SYS___CSNAMETYPE = 0x663 // 1635 + SYS___TOCSNAME = 0x664 // 1636 + SYS___CCSIDTYPE = 0x665 // 1637 + SYS___AE_CORRESTBL_QUERY = 0x666 // 1638 + SYS___AE_AUTOCONVERT_STATE = 0x667 // 1639 + SYS_DN_FIND = 0x668 // 1640 + SYS___GETHOSTBYADDR_A = 0x669 // 1641 + SYS___GETHOSTBYNAME_A = 0x66A // 1642 + SYS___RES_INIT_A = 0x66B // 1643 + SYS___GETHOSTBYADDR_R_A = 0x66C // 1644 + SYS___GETHOSTBYNAME_R_A = 0x66D // 1645 + SYS___CHARMAP_INIT_A = 0x66E // 1646 + SYS___MBLEN_A = 0x66F // 1647 + SYS___MBLEN_SB_A = 0x670 // 1648 + SYS___MBLEN_STD_A = 0x671 // 1649 + SYS___MBLEN_UTF = 0x672 // 1650 + SYS___MBSTOWCS_A = 0x673 // 1651 + SYS___MBSTOWCS_STD_A = 0x674 // 1652 + SYS___MBTOWC_A = 0x675 // 1653 + SYS___MBTOWC_ISO1 = 0x676 // 1654 + SYS___MBTOWC_SBCS = 0x677 // 1655 + SYS___MBTOWC_MBCS = 0x678 // 1656 + SYS___MBTOWC_UTF = 0x679 // 1657 + SYS___WCSTOMBS_A = 0x67A // 1658 + SYS___WCSTOMBS_STD_A = 0x67B // 1659 + SYS___WCSWIDTH_A = 0x67C // 1660 + SYS___GETGRGID_R_A = 0x67D // 1661 + SYS___WCSWIDTH_STD_A = 0x67E // 1662 + SYS___WCSWIDTH_ASIA = 0x67F // 1663 + SYS___CSID_A = 0x680 // 1664 + SYS___CSID_STD_A = 0x681 // 1665 + SYS___WCSID_A = 0x682 // 1666 + SYS___WCSID_STD_A = 0x683 // 1667 + SYS___WCTOMB_A = 0x684 // 1668 + SYS___WCTOMB_ISO1 = 0x685 // 1669 + SYS___WCTOMB_STD_A = 0x686 // 1670 + SYS___WCTOMB_UTF = 0x687 // 1671 + SYS___WCWIDTH_A = 0x688 // 1672 + SYS___GETGRNAM_R_A = 0x689 // 1673 + SYS___WCWIDTH_STD_A = 0x68A // 1674 + SYS___WCWIDTH_ASIA = 0x68B // 1675 + SYS___GETPWNAM_R_A = 0x68C // 1676 + SYS___GETPWUID_R_A = 0x68D // 1677 + SYS___GETLOGIN_R_A = 0x68E // 1678 + SYS___TTYNAME_R_A = 0x68F // 1679 + SYS___READDIR_R_A = 0x690 // 1680 + SYS___E2A_S = 0x691 // 1681 + SYS___FNMATCH_A = 0x692 // 1682 + SYS___FNMATCH_C_A = 0x693 // 1683 + SYS___EXECL_A = 0x694 // 1684 + SYS___FNMATCH_STD_A = 0x695 // 1685 + SYS___REGCOMP_A = 0x696 // 1686 + SYS___REGCOMP_STD_A = 0x697 // 1687 + SYS___REGERROR_A = 0x698 // 1688 + SYS___REGERROR_STD_A = 0x699 // 1689 + SYS___REGEXEC_A = 0x69A // 1690 + SYS___REGEXEC_STD_A = 0x69B // 1691 + SYS___REGFREE_A = 0x69C // 1692 + SYS___REGFREE_STD_A = 0x69D // 1693 + SYS___STRCOLL_A = 0x69E // 1694 + SYS___STRCOLL_C_A = 0x69F // 1695 + SYS___EXECLE_A = 0x6A0 // 1696 + SYS___STRCOLL_STD_A = 0x6A1 // 1697 + SYS___STRXFRM_A = 0x6A2 // 1698 + SYS___STRXFRM_C_A = 0x6A3 // 1699 + SYS___EXECLP_A = 0x6A4 // 1700 + SYS___STRXFRM_STD_A = 0x6A5 // 1701 + SYS___WCSCOLL_A = 0x6A6 // 1702 + SYS___WCSCOLL_C_A = 0x6A7 // 1703 + SYS___WCSCOLL_STD_A = 0x6A8 // 1704 + SYS___WCSXFRM_A = 0x6A9 // 1705 + SYS___WCSXFRM_C_A = 0x6AA // 1706 + SYS___WCSXFRM_STD_A = 0x6AB // 1707 + SYS___COLLATE_INIT_A = 0x6AC // 1708 + SYS___WCTYPE_A = 0x6AD // 1709 + SYS___GET_WCTYPE_STD_A = 0x6AE // 1710 + SYS___CTYPE_INIT_A = 0x6AF // 1711 + SYS___ISWCTYPE_A = 0x6B0 // 1712 + SYS___EXECV_A = 0x6B1 // 1713 + SYS___IS_WCTYPE_STD_A = 0x6B2 // 1714 + SYS___TOWLOWER_A = 0x6B3 // 1715 + SYS___TOWLOWER_STD_A = 0x6B4 // 1716 + SYS___TOWUPPER_A = 0x6B5 // 1717 + SYS___TOWUPPER_STD_A = 0x6B6 // 1718 + SYS___LOCALE_INIT_A = 0x6B7 // 1719 + SYS___LOCALECONV_A = 0x6B8 // 1720 + SYS___LOCALECONV_STD_A = 0x6B9 // 1721 + SYS___NL_LANGINFO_A = 0x6BA // 1722 + SYS___NL_LNAGINFO_STD_A = 0x6BB // 1723 + SYS___MONETARY_INIT_A = 0x6BC // 1724 + SYS___STRFMON_A = 0x6BD // 1725 + SYS___STRFMON_STD_A = 0x6BE // 1726 + SYS___GETADDRINFO_A = 0x6BF // 1727 + SYS___CATGETS_A = 0x6C0 // 1728 + SYS___EXECVE_A = 0x6C1 // 1729 + SYS___EXECVP_A = 0x6C2 // 1730 + SYS___SPAWN_A = 0x6C3 // 1731 + SYS___GETNAMEINFO_A = 0x6C4 // 1732 + SYS___SPAWNP_A = 0x6C5 // 1733 + SYS___NUMERIC_INIT_A = 0x6C6 // 1734 + SYS___RESP_INIT_A = 0x6C7 // 1735 + SYS___RPMATCH_A = 0x6C8 // 1736 + SYS___RPMATCH_C_A = 0x6C9 // 1737 + SYS___RPMATCH_STD_A = 0x6CA // 1738 + SYS___TIME_INIT_A = 0x6CB // 1739 + SYS___STRFTIME_A = 0x6CC // 1740 + SYS___STRFTIME_STD_A = 0x6CD // 1741 + SYS___STRPTIME_A = 0x6CE // 1742 + SYS___STRPTIME_STD_A = 0x6CF // 1743 + SYS___WCSFTIME_A = 0x6D0 // 1744 + SYS___WCSFTIME_STD_A = 0x6D1 // 1745 + SYS_____SPAWN2_A = 0x6D2 // 1746 + SYS_____SPAWNP2_A = 0x6D3 // 1747 + SYS___SYNTAX_INIT_A = 0x6D4 // 1748 + SYS___TOD_INIT_A = 0x6D5 // 1749 + SYS___NL_CSINFO_A = 0x6D6 // 1750 + SYS___NL_MONINFO_A = 0x6D7 // 1751 + SYS___NL_NUMINFO_A = 0x6D8 // 1752 + SYS___NL_RESPINFO_A = 0x6D9 // 1753 + SYS___NL_TIMINFO_A = 0x6DA // 1754 + SYS___IF_NAMETOINDEX_A = 0x6DB // 1755 + SYS___IF_INDEXTONAME_A = 0x6DC // 1756 + SYS___PRINTF_A = 0x6DD // 1757 + SYS___ICONV_OPEN_A = 0x6DE // 1758 + SYS___DLLLOAD_A = 0x6DF // 1759 + SYS___DLLQUERYFN_A = 0x6E0 // 1760 + SYS___DLLQUERYVAR_A = 0x6E1 // 1761 + SYS_____CHATTR_A = 0x6E2 // 1762 + SYS___E2A_L = 0x6E3 // 1763 + SYS_____TOCCSID_A = 0x6E4 // 1764 + SYS_____TOCSNAME_A = 0x6E5 // 1765 + SYS_____CCSIDTYPE_A = 0x6E6 // 1766 + SYS_____CSNAMETYPE_A = 0x6E7 // 1767 + SYS___CHMOD_A = 0x6E8 // 1768 + SYS___MKDIR_A = 0x6E9 // 1769 + SYS___STAT_A = 0x6EA // 1770 + SYS___STAT_O_A = 0x6EB // 1771 + SYS___MKFIFO_A = 0x6EC // 1772 + SYS_____OPEN_STAT_A = 0x6ED // 1773 + SYS___LSTAT_A = 0x6EE // 1774 + SYS___LSTAT_O_A = 0x6EF // 1775 + SYS___MKNOD_A = 0x6F0 // 1776 + SYS___MOUNT_A = 0x6F1 // 1777 + SYS___UMOUNT_A = 0x6F2 // 1778 + SYS___CHAUDIT_A = 0x6F4 // 1780 + SYS___W_GETMNTENT_A = 0x6F5 // 1781 + SYS___CREAT_A = 0x6F6 // 1782 + SYS___OPEN_A = 0x6F7 // 1783 + SYS___SETLOCALE_A = 0x6F9 // 1785 + SYS___FPRINTF_A = 0x6FA // 1786 + SYS___SPRINTF_A = 0x6FB // 1787 + SYS___VFPRINTF_A = 0x6FC // 1788 + SYS___VPRINTF_A = 0x6FD // 1789 + SYS___VSPRINTF_A = 0x6FE // 1790 + SYS___VSWPRINTF_A = 0x6FF // 1791 + SYS___SWPRINTF_A = 0x700 // 1792 + SYS___FSCANF_A = 0x701 // 1793 + SYS___SCANF_A = 0x702 // 1794 + SYS___SSCANF_A = 0x703 // 1795 + SYS___SWSCANF_A = 0x704 // 1796 + SYS___ATOF_A = 0x705 // 1797 + SYS___ATOI_A = 0x706 // 1798 + SYS___ATOL_A = 0x707 // 1799 + SYS___STRTOD_A = 0x708 // 1800 + SYS___STRTOL_A = 0x709 // 1801 + SYS___STRTOUL_A = 0x70A // 1802 + SYS_____AE_CORRESTBL_QUERY_A = 0x70B // 1803 + SYS___A64L_A = 0x70C // 1804 + SYS___ECVT_A = 0x70D // 1805 + SYS___FCVT_A = 0x70E // 1806 + SYS___GCVT_A = 0x70F // 1807 + SYS___L64A_A = 0x710 // 1808 + SYS___STRERROR_A = 0x711 // 1809 + SYS___PERROR_A = 0x712 // 1810 + SYS___FETCH_A = 0x713 // 1811 + SYS___GETENV_A = 0x714 // 1812 + SYS___MKSTEMP_A = 0x717 // 1815 + SYS___PTSNAME_A = 0x718 // 1816 + SYS___PUTENV_A = 0x719 // 1817 + SYS___REALPATH_A = 0x71A // 1818 + SYS___SETENV_A = 0x71B // 1819 + SYS___SYSTEM_A = 0x71C // 1820 + SYS___GETOPT_A = 0x71D // 1821 + SYS___CATOPEN_A = 0x71E // 1822 + SYS___ACCESS_A = 0x71F // 1823 + SYS___CHDIR_A = 0x720 // 1824 + SYS___CHOWN_A = 0x721 // 1825 + SYS___CHROOT_A = 0x722 // 1826 + SYS___GETCWD_A = 0x723 // 1827 + SYS___GETWD_A = 0x724 // 1828 + SYS___LCHOWN_A = 0x725 // 1829 + SYS___LINK_A = 0x726 // 1830 + SYS___PATHCONF_A = 0x727 // 1831 + SYS___IF_NAMEINDEX_A = 0x728 // 1832 + SYS___READLINK_A = 0x729 // 1833 + SYS___RMDIR_A = 0x72A // 1834 + SYS___STATVFS_A = 0x72B // 1835 + SYS___SYMLINK_A = 0x72C // 1836 + SYS___TRUNCATE_A = 0x72D // 1837 + SYS___UNLINK_A = 0x72E // 1838 + SYS___GAI_STRERROR_A = 0x72F // 1839 + SYS___EXTLINK_NP_A = 0x730 // 1840 + SYS___ISALNUM_A = 0x731 // 1841 + SYS___ISALPHA_A = 0x732 // 1842 + SYS___A2E_S = 0x733 // 1843 + SYS___ISCNTRL_A = 0x734 // 1844 + SYS___ISDIGIT_A = 0x735 // 1845 + SYS___ISGRAPH_A = 0x736 // 1846 + SYS___ISLOWER_A = 0x737 // 1847 + SYS___ISPRINT_A = 0x738 // 1848 + SYS___ISPUNCT_A = 0x739 // 1849 + SYS___ISSPACE_A = 0x73A // 1850 + SYS___ISUPPER_A = 0x73B // 1851 + SYS___ISXDIGIT_A = 0x73C // 1852 + SYS___TOLOWER_A = 0x73D // 1853 + SYS___TOUPPER_A = 0x73E // 1854 + SYS___ISWALNUM_A = 0x73F // 1855 + SYS___ISWALPHA_A = 0x740 // 1856 + SYS___A2E_L = 0x741 // 1857 + SYS___ISWCNTRL_A = 0x742 // 1858 + SYS___ISWDIGIT_A = 0x743 // 1859 + SYS___ISWGRAPH_A = 0x744 // 1860 + SYS___ISWLOWER_A = 0x745 // 1861 + SYS___ISWPRINT_A = 0x746 // 1862 + SYS___ISWPUNCT_A = 0x747 // 1863 + SYS___ISWSPACE_A = 0x748 // 1864 + SYS___ISWUPPER_A = 0x749 // 1865 + SYS___ISWXDIGIT_A = 0x74A // 1866 + SYS___CONFSTR_A = 0x74B // 1867 + SYS___FTOK_A = 0x74C // 1868 + SYS___MKTEMP_A = 0x74D // 1869 + SYS___FDOPEN_A = 0x74E // 1870 + SYS___FLDATA_A = 0x74F // 1871 + SYS___REMOVE_A = 0x750 // 1872 + SYS___RENAME_A = 0x751 // 1873 + SYS___TMPNAM_A = 0x752 // 1874 + SYS___FOPEN_A = 0x753 // 1875 + SYS___FREOPEN_A = 0x754 // 1876 + SYS___CUSERID_A = 0x755 // 1877 + SYS___POPEN_A = 0x756 // 1878 + SYS___TEMPNAM_A = 0x757 // 1879 + SYS___FTW_A = 0x758 // 1880 + SYS___GETGRENT_A = 0x759 // 1881 + SYS___GETGRGID_A = 0x75A // 1882 + SYS___GETGRNAM_A = 0x75B // 1883 + SYS___GETGROUPSBYNAME_A = 0x75C // 1884 + SYS___GETHOSTENT_A = 0x75D // 1885 + SYS___GETHOSTNAME_A = 0x75E // 1886 + SYS___GETLOGIN_A = 0x75F // 1887 + SYS___INET_NTOP_A = 0x760 // 1888 + SYS___GETPASS_A = 0x761 // 1889 + SYS___GETPWENT_A = 0x762 // 1890 + SYS___GETPWNAM_A = 0x763 // 1891 + SYS___GETPWUID_A = 0x764 // 1892 + SYS_____CHECK_RESOURCE_AUTH_NP_A = 0x765 // 1893 + SYS___CHECKSCHENV_A = 0x766 // 1894 + SYS___CONNECTSERVER_A = 0x767 // 1895 + SYS___CONNECTWORKMGR_A = 0x768 // 1896 + SYS_____CONSOLE_A = 0x769 // 1897 + SYS___CREATEWORKUNIT_A = 0x76A // 1898 + SYS___CTERMID_A = 0x76B // 1899 + SYS___FMTMSG_A = 0x76C // 1900 + SYS___INITGROUPS_A = 0x76D // 1901 + SYS_____LOGIN_A = 0x76E // 1902 + SYS___MSGRCV_A = 0x76F // 1903 + SYS___MSGSND_A = 0x770 // 1904 + SYS___MSGXRCV_A = 0x771 // 1905 + SYS___NFTW_A = 0x772 // 1906 + SYS_____PASSWD_A = 0x773 // 1907 + SYS___PTHREAD_SECURITY_NP_A = 0x774 // 1908 + SYS___QUERYMETRICS_A = 0x775 // 1909 + SYS___QUERYSCHENV = 0x776 // 1910 + SYS___READV_A = 0x777 // 1911 + SYS_____SERVER_CLASSIFY_A = 0x778 // 1912 + SYS_____SERVER_INIT_A = 0x779 // 1913 + SYS_____SERVER_PWU_A = 0x77A // 1914 + SYS___STRCASECMP_A = 0x77B // 1915 + SYS___STRNCASECMP_A = 0x77C // 1916 + SYS___TTYNAME_A = 0x77D // 1917 + SYS___UNAME_A = 0x77E // 1918 + SYS___UTIMES_A = 0x77F // 1919 + SYS___W_GETPSENT_A = 0x780 // 1920 + SYS___WRITEV_A = 0x781 // 1921 + SYS___W_STATFS_A = 0x782 // 1922 + SYS___W_STATVFS_A = 0x783 // 1923 + SYS___FPUTC_A = 0x784 // 1924 + SYS___PUTCHAR_A = 0x785 // 1925 + SYS___PUTS_A = 0x786 // 1926 + SYS___FGETS_A = 0x787 // 1927 + SYS___GETS_A = 0x788 // 1928 + SYS___FPUTS_A = 0x789 // 1929 + SYS___FREAD_A = 0x78A // 1930 + SYS___FWRITE_A = 0x78B // 1931 + SYS___OPEN_O_A = 0x78C // 1932 + SYS___ISASCII = 0x78D // 1933 + SYS___CREAT_O_A = 0x78E // 1934 + SYS___ENVNA = 0x78F // 1935 + SYS___PUTC_A = 0x790 // 1936 + SYS___AE_THREAD_SETMODE = 0x791 // 1937 + SYS___AE_THREAD_SWAPMODE = 0x792 // 1938 + SYS___GETNETBYADDR_A = 0x793 // 1939 + SYS___GETNETBYNAME_A = 0x794 // 1940 + SYS___GETNETENT_A = 0x795 // 1941 + SYS___GETPROTOBYNAME_A = 0x796 // 1942 + SYS___GETPROTOBYNUMBER_A = 0x797 // 1943 + SYS___GETPROTOENT_A = 0x798 // 1944 + SYS___GETSERVBYNAME_A = 0x799 // 1945 + SYS___GETSERVBYPORT_A = 0x79A // 1946 + SYS___GETSERVENT_A = 0x79B // 1947 + SYS___ASCTIME_A = 0x79C // 1948 + SYS___CTIME_A = 0x79D // 1949 + SYS___GETDATE_A = 0x79E // 1950 + SYS___TZSET_A = 0x79F // 1951 + SYS___UTIME_A = 0x7A0 // 1952 + SYS___ASCTIME_R_A = 0x7A1 // 1953 + SYS___CTIME_R_A = 0x7A2 // 1954 + SYS___STRTOLL_A = 0x7A3 // 1955 + SYS___STRTOULL_A = 0x7A4 // 1956 + SYS___FPUTWC_A = 0x7A5 // 1957 + SYS___PUTWC_A = 0x7A6 // 1958 + SYS___PUTWCHAR_A = 0x7A7 // 1959 + SYS___FPUTWS_A = 0x7A8 // 1960 + SYS___UNGETWC_A = 0x7A9 // 1961 + SYS___FGETWC_A = 0x7AA // 1962 + SYS___GETWC_A = 0x7AB // 1963 + SYS___GETWCHAR_A = 0x7AC // 1964 + SYS___FGETWS_A = 0x7AD // 1965 + SYS___GETTIMEOFDAY_A = 0x7AE // 1966 + SYS___GMTIME_A = 0x7AF // 1967 + SYS___GMTIME_R_A = 0x7B0 // 1968 + SYS___LOCALTIME_A = 0x7B1 // 1969 + SYS___LOCALTIME_R_A = 0x7B2 // 1970 + SYS___MKTIME_A = 0x7B3 // 1971 + SYS___TZZNA = 0x7B4 // 1972 + SYS_UNATEXIT = 0x7B5 // 1973 + SYS___CEE3DMP_A = 0x7B6 // 1974 + SYS___CDUMP_A = 0x7B7 // 1975 + SYS___CSNAP_A = 0x7B8 // 1976 + SYS___CTEST_A = 0x7B9 // 1977 + SYS___CTRACE_A = 0x7BA // 1978 + SYS___VSWPRNTF2_A = 0x7BB // 1979 + SYS___INET_PTON_A = 0x7BC // 1980 + SYS___SYSLOG_A = 0x7BD // 1981 + SYS___CRYPT_A = 0x7BE // 1982 + SYS_____OPENDIR2_A = 0x7BF // 1983 + SYS_____READDIR2_A = 0x7C0 // 1984 + SYS___OPENDIR_A = 0x7C2 // 1986 + SYS___READDIR_A = 0x7C3 // 1987 + SYS_PREAD = 0x7C7 // 1991 + SYS_PWRITE = 0x7C8 // 1992 + SYS_M_CREATE_LAYOUT = 0x7C9 // 1993 + SYS_M_DESTROY_LAYOUT = 0x7CA // 1994 + SYS_M_GETVALUES_LAYOUT = 0x7CB // 1995 + SYS_M_SETVALUES_LAYOUT = 0x7CC // 1996 + SYS_M_TRANSFORM_LAYOUT = 0x7CD // 1997 + SYS_M_WTRANSFORM_LAYOUT = 0x7CE // 1998 + SYS_FWPRINTF = 0x7D1 // 2001 + SYS_WPRINTF = 0x7D2 // 2002 + SYS_VFWPRINT = 0x7D3 // 2003 + SYS_VFWPRINTF = 0x7D3 // 2003 + SYS_VWPRINTF = 0x7D4 // 2004 + SYS_FWSCANF = 0x7D5 // 2005 + SYS_WSCANF = 0x7D6 // 2006 + SYS_WCTRANS = 0x7D7 // 2007 + SYS_TOWCTRAN = 0x7D8 // 2008 + SYS_TOWCTRANS = 0x7D8 // 2008 + SYS___WCSTOD_A = 0x7D9 // 2009 + SYS___WCSTOL_A = 0x7DA // 2010 + SYS___WCSTOUL_A = 0x7DB // 2011 + SYS___BASENAME_A = 0x7DC // 2012 + SYS___DIRNAME_A = 0x7DD // 2013 + SYS___GLOB_A = 0x7DE // 2014 + SYS_FWIDE = 0x7DF // 2015 + SYS___OSNAME = 0x7E0 // 2016 + SYS_____OSNAME_A = 0x7E1 // 2017 + SYS___BTOWC_A = 0x7E4 // 2020 + SYS___WCTOB_A = 0x7E5 // 2021 + SYS___DBM_OPEN_A = 0x7E6 // 2022 + SYS___VFPRINTF2_A = 0x7E7 // 2023 + SYS___VPRINTF2_A = 0x7E8 // 2024 + SYS___VSPRINTF2_A = 0x7E9 // 2025 + SYS___CEIL_H = 0x7EA // 2026 + SYS___FLOOR_H = 0x7EB // 2027 + SYS___MODF_H = 0x7EC // 2028 + SYS___FABS_H = 0x7ED // 2029 + SYS___J0_H = 0x7EE // 2030 + SYS___J1_H = 0x7EF // 2031 + SYS___JN_H = 0x7F0 // 2032 + SYS___Y0_H = 0x7F1 // 2033 + SYS___Y1_H = 0x7F2 // 2034 + SYS___YN_H = 0x7F3 // 2035 + SYS___CEILF_H = 0x7F4 // 2036 + SYS___CEILL_H = 0x7F5 // 2037 + SYS___FLOORF_H = 0x7F6 // 2038 + SYS___FLOORL_H = 0x7F7 // 2039 + SYS___MODFF_H = 0x7F8 // 2040 + SYS___MODFL_H = 0x7F9 // 2041 + SYS___FABSF_H = 0x7FA // 2042 + SYS___FABSL_H = 0x7FB // 2043 + SYS___MALLOC24 = 0x7FC // 2044 + SYS___MALLOC31 = 0x7FD // 2045 + SYS_ACL_INIT = 0x7FE // 2046 + SYS_ACL_FREE = 0x7FF // 2047 + SYS_ACL_FIRST_ENTRY = 0x800 // 2048 + SYS_ACL_GET_ENTRY = 0x801 // 2049 + SYS_ACL_VALID = 0x802 // 2050 + SYS_ACL_CREATE_ENTRY = 0x803 // 2051 + SYS_ACL_DELETE_ENTRY = 0x804 // 2052 + SYS_ACL_UPDATE_ENTRY = 0x805 // 2053 + SYS_ACL_DELETE_FD = 0x806 // 2054 + SYS_ACL_DELETE_FILE = 0x807 // 2055 + SYS_ACL_GET_FD = 0x808 // 2056 + SYS_ACL_GET_FILE = 0x809 // 2057 + SYS_ACL_SET_FD = 0x80A // 2058 + SYS_ACL_SET_FILE = 0x80B // 2059 + SYS_ACL_FROM_TEXT = 0x80C // 2060 + SYS_ACL_TO_TEXT = 0x80D // 2061 + SYS_ACL_SORT = 0x80E // 2062 + SYS___SHUTDOWN_REGISTRATION = 0x80F // 2063 + SYS___ERFL_B = 0x810 // 2064 + SYS___ERFCL_B = 0x811 // 2065 + SYS___LGAMMAL_B = 0x812 // 2066 + SYS___SETHOOKEVENTS = 0x813 // 2067 + SYS_IF_NAMETOINDEX = 0x814 // 2068 + SYS_IF_INDEXTONAME = 0x815 // 2069 + SYS_IF_NAMEINDEX = 0x816 // 2070 + SYS_IF_FREENAMEINDEX = 0x817 // 2071 + SYS_GETADDRINFO = 0x818 // 2072 + SYS_GETNAMEINFO = 0x819 // 2073 + SYS_FREEADDRINFO = 0x81A // 2074 + SYS_GAI_STRERROR = 0x81B // 2075 + SYS_REXEC_AF = 0x81C // 2076 + SYS___POE = 0x81D // 2077 + SYS___DYNALLOC_A = 0x81F // 2079 + SYS___DYNFREE_A = 0x820 // 2080 + SYS___RES_QUERY_A = 0x821 // 2081 + SYS___RES_SEARCH_A = 0x822 // 2082 + SYS___RES_QUERYDOMAIN_A = 0x823 // 2083 + SYS___RES_MKQUERY_A = 0x824 // 2084 + SYS___RES_SEND_A = 0x825 // 2085 + SYS___DN_EXPAND_A = 0x826 // 2086 + SYS___DN_SKIPNAME_A = 0x827 // 2087 + SYS___DN_COMP_A = 0x828 // 2088 + SYS___DN_FIND_A = 0x829 // 2089 + SYS___NLIST_A = 0x82A // 2090 + SYS_____TCGETCP_A = 0x82B // 2091 + SYS_____TCSETCP_A = 0x82C // 2092 + SYS_____W_PIOCTL_A = 0x82E // 2094 + SYS___INET_ADDR_A = 0x82F // 2095 + SYS___INET_NTOA_A = 0x830 // 2096 + SYS___INET_NETWORK_A = 0x831 // 2097 + SYS___ACCEPT_A = 0x832 // 2098 + SYS___ACCEPT_AND_RECV_A = 0x833 // 2099 + SYS___BIND_A = 0x834 // 2100 + SYS___CONNECT_A = 0x835 // 2101 + SYS___GETPEERNAME_A = 0x836 // 2102 + SYS___GETSOCKNAME_A = 0x837 // 2103 + SYS___RECVFROM_A = 0x838 // 2104 + SYS___SENDTO_A = 0x839 // 2105 + SYS___SENDMSG_A = 0x83A // 2106 + SYS___RECVMSG_A = 0x83B // 2107 + SYS_____LCHATTR_A = 0x83C // 2108 + SYS___CABEND = 0x83D // 2109 + SYS___LE_CIB_GET = 0x83E // 2110 + SYS___SET_LAA_FOR_JIT = 0x83F // 2111 + SYS___LCHATTR = 0x840 // 2112 + SYS___WRITEDOWN = 0x841 // 2113 + SYS_PTHREAD_MUTEX_INIT2 = 0x842 // 2114 + SYS___ACOSHF_B = 0x843 // 2115 + SYS___ACOSHL_B = 0x844 // 2116 + SYS___ASINHF_B = 0x845 // 2117 + SYS___ASINHL_B = 0x846 // 2118 + SYS___ATANHF_B = 0x847 // 2119 + SYS___ATANHL_B = 0x848 // 2120 + SYS___CBRTF_B = 0x849 // 2121 + SYS___CBRTL_B = 0x84A // 2122 + SYS___COPYSIGNF_B = 0x84B // 2123 + SYS___COPYSIGNL_B = 0x84C // 2124 + SYS___COTANF_B = 0x84D // 2125 + SYS___COTAN_B = 0x84E // 2126 + SYS___COTANL_B = 0x84F // 2127 + SYS___EXP2F_B = 0x850 // 2128 + SYS___EXP2L_B = 0x851 // 2129 + SYS___EXPM1F_B = 0x852 // 2130 + SYS___EXPM1L_B = 0x853 // 2131 + SYS___FDIMF_B = 0x854 // 2132 + SYS___FDIM_B = 0x855 // 2133 + SYS___FDIML_B = 0x856 // 2134 + SYS___HYPOTF_B = 0x857 // 2135 + SYS___HYPOTL_B = 0x858 // 2136 + SYS___LOG1PF_B = 0x859 // 2137 + SYS___LOG1PL_B = 0x85A // 2138 + SYS___LOG2F_B = 0x85B // 2139 + SYS___LOG2_B = 0x85C // 2140 + SYS___LOG2L_B = 0x85D // 2141 + SYS___REMAINDERF_B = 0x85E // 2142 + SYS___REMAINDERL_B = 0x85F // 2143 + SYS___REMQUOF_B = 0x860 // 2144 + SYS___REMQUO_B = 0x861 // 2145 + SYS___REMQUOL_B = 0x862 // 2146 + SYS___TGAMMAF_B = 0x863 // 2147 + SYS___TGAMMA_B = 0x864 // 2148 + SYS___TGAMMAL_B = 0x865 // 2149 + SYS___TRUNCF_B = 0x866 // 2150 + SYS___TRUNC_B = 0x867 // 2151 + SYS___TRUNCL_B = 0x868 // 2152 + SYS___LGAMMAF_B = 0x869 // 2153 + SYS___LROUNDF_B = 0x86A // 2154 + SYS___LROUND_B = 0x86B // 2155 + SYS___ERFF_B = 0x86C // 2156 + SYS___ERFCF_B = 0x86D // 2157 + SYS_ACOSHF = 0x86E // 2158 + SYS_ACOSHL = 0x86F // 2159 + SYS_ASINHF = 0x870 // 2160 + SYS_ASINHL = 0x871 // 2161 + SYS_ATANHF = 0x872 // 2162 + SYS_ATANHL = 0x873 // 2163 + SYS_CBRTF = 0x874 // 2164 + SYS_CBRTL = 0x875 // 2165 + SYS_COPYSIGNF = 0x876 // 2166 + SYS_CPYSIGNF = 0x876 // 2166 + SYS_COPYSIGNL = 0x877 // 2167 + SYS_CPYSIGNL = 0x877 // 2167 + SYS_COTANF = 0x878 // 2168 + SYS___COTANF = 0x878 // 2168 + SYS_COTAN = 0x879 // 2169 + SYS___COTAN = 0x879 // 2169 + SYS_COTANL = 0x87A // 2170 + SYS___COTANL = 0x87A // 2170 + SYS_EXP2F = 0x87B // 2171 + SYS_EXP2L = 0x87C // 2172 + SYS_EXPM1F = 0x87D // 2173 + SYS_EXPM1L = 0x87E // 2174 + SYS_FDIMF = 0x87F // 2175 + SYS_FDIM = 0x881 // 2177 + SYS_FDIML = 0x882 // 2178 + SYS_HYPOTF = 0x883 // 2179 + SYS_HYPOTL = 0x884 // 2180 + SYS_LOG1PF = 0x885 // 2181 + SYS_LOG1PL = 0x886 // 2182 + SYS_LOG2F = 0x887 // 2183 + SYS_LOG2 = 0x888 // 2184 + SYS_LOG2L = 0x889 // 2185 + SYS_REMAINDERF = 0x88A // 2186 + SYS_REMAINDF = 0x88A // 2186 + SYS_REMAINDERL = 0x88B // 2187 + SYS_REMAINDL = 0x88B // 2187 + SYS_REMQUOF = 0x88C // 2188 + SYS_REMQUO = 0x88D // 2189 + SYS_REMQUOL = 0x88E // 2190 + SYS_TGAMMAF = 0x88F // 2191 + SYS_TGAMMA = 0x890 // 2192 + SYS_TGAMMAL = 0x891 // 2193 + SYS_TRUNCF = 0x892 // 2194 + SYS_TRUNC = 0x893 // 2195 + SYS_TRUNCL = 0x894 // 2196 + SYS_LGAMMAF = 0x895 // 2197 + SYS_LGAMMAL = 0x896 // 2198 + SYS_LROUNDF = 0x897 // 2199 + SYS_LROUND = 0x898 // 2200 + SYS_ERFF = 0x899 // 2201 + SYS_ERFL = 0x89A // 2202 + SYS_ERFCF = 0x89B // 2203 + SYS_ERFCL = 0x89C // 2204 + SYS___EXP2_B = 0x89D // 2205 + SYS_EXP2 = 0x89E // 2206 + SYS___FAR_JUMP = 0x89F // 2207 + SYS___TCGETATTR_A = 0x8A1 // 2209 + SYS___TCSETATTR_A = 0x8A2 // 2210 + SYS___SUPERKILL = 0x8A4 // 2212 + SYS___LE_CONDITION_TOKEN_BUILD = 0x8A5 // 2213 + SYS___LE_MSG_ADD_INSERT = 0x8A6 // 2214 + SYS___LE_MSG_GET = 0x8A7 // 2215 + SYS___LE_MSG_GET_AND_WRITE = 0x8A8 // 2216 + SYS___LE_MSG_WRITE = 0x8A9 // 2217 + SYS___ITOA = 0x8AA // 2218 + SYS___UTOA = 0x8AB // 2219 + SYS___LTOA = 0x8AC // 2220 + SYS___ULTOA = 0x8AD // 2221 + SYS___LLTOA = 0x8AE // 2222 + SYS___ULLTOA = 0x8AF // 2223 + SYS___ITOA_A = 0x8B0 // 2224 + SYS___UTOA_A = 0x8B1 // 2225 + SYS___LTOA_A = 0x8B2 // 2226 + SYS___ULTOA_A = 0x8B3 // 2227 + SYS___LLTOA_A = 0x8B4 // 2228 + SYS___ULLTOA_A = 0x8B5 // 2229 + SYS_____GETENV_A = 0x8C3 // 2243 + SYS___REXEC_A = 0x8C4 // 2244 + SYS___REXEC_AF_A = 0x8C5 // 2245 + SYS___GETUTXENT_A = 0x8C6 // 2246 + SYS___GETUTXID_A = 0x8C7 // 2247 + SYS___GETUTXLINE_A = 0x8C8 // 2248 + SYS___PUTUTXLINE_A = 0x8C9 // 2249 + SYS_____UTMPXNAME_A = 0x8CA // 2250 + SYS___PUTC_UNLOCKED_A = 0x8CB // 2251 + SYS___PUTCHAR_UNLOCKED_A = 0x8CC // 2252 + SYS___SNPRINTF_A = 0x8CD // 2253 + SYS___VSNPRINTF_A = 0x8CE // 2254 + SYS___DLOPEN_A = 0x8D0 // 2256 + SYS___DLSYM_A = 0x8D1 // 2257 + SYS___DLERROR_A = 0x8D2 // 2258 + SYS_FLOCKFILE = 0x8D3 // 2259 + SYS_FTRYLOCKFILE = 0x8D4 // 2260 + SYS_FUNLOCKFILE = 0x8D5 // 2261 + SYS_GETC_UNLOCKED = 0x8D6 // 2262 + SYS_GETCHAR_UNLOCKED = 0x8D7 // 2263 + SYS_PUTC_UNLOCKED = 0x8D8 // 2264 + SYS_PUTCHAR_UNLOCKED = 0x8D9 // 2265 + SYS_SNPRINTF = 0x8DA // 2266 + SYS_VSNPRINTF = 0x8DB // 2267 + SYS_DLOPEN = 0x8DD // 2269 + SYS_DLSYM = 0x8DE // 2270 + SYS_DLCLOSE = 0x8DF // 2271 + SYS_DLERROR = 0x8E0 // 2272 + SYS___SET_EXCEPTION_HANDLER = 0x8E2 // 2274 + SYS___RESET_EXCEPTION_HANDLER = 0x8E3 // 2275 + SYS___VHM_EVENT = 0x8E4 // 2276 + SYS___ABS_H = 0x8E6 // 2278 + SYS___ABSF_H = 0x8E7 // 2279 + SYS___ABSL_H = 0x8E8 // 2280 + SYS___ACOS_H = 0x8E9 // 2281 + SYS___ACOSF_H = 0x8EA // 2282 + SYS___ACOSL_H = 0x8EB // 2283 + SYS___ACOSH_H = 0x8EC // 2284 + SYS___ASIN_H = 0x8ED // 2285 + SYS___ASINF_H = 0x8EE // 2286 + SYS___ASINL_H = 0x8EF // 2287 + SYS___ASINH_H = 0x8F0 // 2288 + SYS___ATAN_H = 0x8F1 // 2289 + SYS___ATANF_H = 0x8F2 // 2290 + SYS___ATANL_H = 0x8F3 // 2291 + SYS___ATANH_H = 0x8F4 // 2292 + SYS___ATANHF_H = 0x8F5 // 2293 + SYS___ATANHL_H = 0x8F6 // 2294 + SYS___ATAN2_H = 0x8F7 // 2295 + SYS___ATAN2F_H = 0x8F8 // 2296 + SYS___ATAN2L_H = 0x8F9 // 2297 + SYS___CBRT_H = 0x8FA // 2298 + SYS___COPYSIGNF_H = 0x8FB // 2299 + SYS___COPYSIGNL_H = 0x8FC // 2300 + SYS___COS_H = 0x8FD // 2301 + SYS___COSF_H = 0x8FE // 2302 + SYS___COSL_H = 0x8FF // 2303 + SYS___COSHF_H = 0x900 // 2304 + SYS___COSHL_H = 0x901 // 2305 + SYS___COTAN_H = 0x902 // 2306 + SYS___COTANF_H = 0x903 // 2307 + SYS___COTANL_H = 0x904 // 2308 + SYS___ERF_H = 0x905 // 2309 + SYS___ERFF_H = 0x906 // 2310 + SYS___ERFL_H = 0x907 // 2311 + SYS___ERFC_H = 0x908 // 2312 + SYS___ERFCF_H = 0x909 // 2313 + SYS___ERFCL_H = 0x90A // 2314 + SYS___EXP_H = 0x90B // 2315 + SYS___EXPF_H = 0x90C // 2316 + SYS___EXPL_H = 0x90D // 2317 + SYS___EXPM1_H = 0x90E // 2318 + SYS___FDIM_H = 0x90F // 2319 + SYS___FDIMF_H = 0x910 // 2320 + SYS___FDIML_H = 0x911 // 2321 + SYS___FMOD_H = 0x912 // 2322 + SYS___FMODF_H = 0x913 // 2323 + SYS___FMODL_H = 0x914 // 2324 + SYS___GAMMA_H = 0x915 // 2325 + SYS___HYPOT_H = 0x916 // 2326 + SYS___ILOGB_H = 0x917 // 2327 + SYS___LGAMMA_H = 0x918 // 2328 + SYS___LGAMMAF_H = 0x919 // 2329 + SYS___LOG_H = 0x91A // 2330 + SYS___LOGF_H = 0x91B // 2331 + SYS___LOGL_H = 0x91C // 2332 + SYS___LOGB_H = 0x91D // 2333 + SYS___LOG2_H = 0x91E // 2334 + SYS___LOG2F_H = 0x91F // 2335 + SYS___LOG2L_H = 0x920 // 2336 + SYS___LOG1P_H = 0x921 // 2337 + SYS___LOG10_H = 0x922 // 2338 + SYS___LOG10F_H = 0x923 // 2339 + SYS___LOG10L_H = 0x924 // 2340 + SYS___LROUND_H = 0x925 // 2341 + SYS___LROUNDF_H = 0x926 // 2342 + SYS___NEXTAFTER_H = 0x927 // 2343 + SYS___POW_H = 0x928 // 2344 + SYS___POWF_H = 0x929 // 2345 + SYS___POWL_H = 0x92A // 2346 + SYS___REMAINDER_H = 0x92B // 2347 + SYS___RINT_H = 0x92C // 2348 + SYS___SCALB_H = 0x92D // 2349 + SYS___SIN_H = 0x92E // 2350 + SYS___SINF_H = 0x92F // 2351 + SYS___SINL_H = 0x930 // 2352 + SYS___SINH_H = 0x931 // 2353 + SYS___SINHF_H = 0x932 // 2354 + SYS___SINHL_H = 0x933 // 2355 + SYS___SQRT_H = 0x934 // 2356 + SYS___SQRTF_H = 0x935 // 2357 + SYS___SQRTL_H = 0x936 // 2358 + SYS___TAN_H = 0x937 // 2359 + SYS___TANF_H = 0x938 // 2360 + SYS___TANL_H = 0x939 // 2361 + SYS___TANH_H = 0x93A // 2362 + SYS___TANHF_H = 0x93B // 2363 + SYS___TANHL_H = 0x93C // 2364 + SYS___TGAMMA_H = 0x93D // 2365 + SYS___TGAMMAF_H = 0x93E // 2366 + SYS___TRUNC_H = 0x93F // 2367 + SYS___TRUNCF_H = 0x940 // 2368 + SYS___TRUNCL_H = 0x941 // 2369 + SYS___COSH_H = 0x942 // 2370 + SYS___LE_DEBUG_SET_RESUME_MCH = 0x943 // 2371 + SYS_VFSCANF = 0x944 // 2372 + SYS_VSCANF = 0x946 // 2374 + SYS_VSSCANF = 0x948 // 2376 + SYS_VFWSCANF = 0x94A // 2378 + SYS_VWSCANF = 0x94C // 2380 + SYS_VSWSCANF = 0x94E // 2382 + SYS_IMAXABS = 0x950 // 2384 + SYS_IMAXDIV = 0x951 // 2385 + SYS_STRTOIMAX = 0x952 // 2386 + SYS_STRTOUMAX = 0x953 // 2387 + SYS_WCSTOIMAX = 0x954 // 2388 + SYS_WCSTOUMAX = 0x955 // 2389 + SYS_ATOLL = 0x956 // 2390 + SYS_STRTOF = 0x957 // 2391 + SYS_STRTOLD = 0x958 // 2392 + SYS_WCSTOF = 0x959 // 2393 + SYS_WCSTOLD = 0x95A // 2394 + SYS_INET6_RTH_SPACE = 0x95B // 2395 + SYS_INET6_RTH_INIT = 0x95C // 2396 + SYS_INET6_RTH_ADD = 0x95D // 2397 + SYS_INET6_RTH_REVERSE = 0x95E // 2398 + SYS_INET6_RTH_SEGMENTS = 0x95F // 2399 + SYS_INET6_RTH_GETADDR = 0x960 // 2400 + SYS_INET6_OPT_INIT = 0x961 // 2401 + SYS_INET6_OPT_APPEND = 0x962 // 2402 + SYS_INET6_OPT_FINISH = 0x963 // 2403 + SYS_INET6_OPT_SET_VAL = 0x964 // 2404 + SYS_INET6_OPT_NEXT = 0x965 // 2405 + SYS_INET6_OPT_FIND = 0x966 // 2406 + SYS_INET6_OPT_GET_VAL = 0x967 // 2407 + SYS___POW_I = 0x987 // 2439 + SYS___POW_I_B = 0x988 // 2440 + SYS___POW_I_H = 0x989 // 2441 + SYS___POW_II = 0x98A // 2442 + SYS___POW_II_B = 0x98B // 2443 + SYS___POW_II_H = 0x98C // 2444 + SYS_CABS = 0x98E // 2446 + SYS___CABS_B = 0x98F // 2447 + SYS___CABS_H = 0x990 // 2448 + SYS_CABSF = 0x991 // 2449 + SYS___CABSF_B = 0x992 // 2450 + SYS___CABSF_H = 0x993 // 2451 + SYS_CABSL = 0x994 // 2452 + SYS___CABSL_B = 0x995 // 2453 + SYS___CABSL_H = 0x996 // 2454 + SYS_CACOS = 0x997 // 2455 + SYS___CACOS_B = 0x998 // 2456 + SYS___CACOS_H = 0x999 // 2457 + SYS_CACOSF = 0x99A // 2458 + SYS___CACOSF_B = 0x99B // 2459 + SYS___CACOSF_H = 0x99C // 2460 + SYS_CACOSL = 0x99D // 2461 + SYS___CACOSL_B = 0x99E // 2462 + SYS___CACOSL_H = 0x99F // 2463 + SYS_CACOSH = 0x9A0 // 2464 + SYS___CACOSH_B = 0x9A1 // 2465 + SYS___CACOSH_H = 0x9A2 // 2466 + SYS_CACOSHF = 0x9A3 // 2467 + SYS___CACOSHF_B = 0x9A4 // 2468 + SYS___CACOSHF_H = 0x9A5 // 2469 + SYS_CACOSHL = 0x9A6 // 2470 + SYS___CACOSHL_B = 0x9A7 // 2471 + SYS___CACOSHL_H = 0x9A8 // 2472 + SYS_CARG = 0x9A9 // 2473 + SYS___CARG_B = 0x9AA // 2474 + SYS___CARG_H = 0x9AB // 2475 + SYS_CARGF = 0x9AC // 2476 + SYS___CARGF_B = 0x9AD // 2477 + SYS___CARGF_H = 0x9AE // 2478 + SYS_CARGL = 0x9AF // 2479 + SYS___CARGL_B = 0x9B0 // 2480 + SYS___CARGL_H = 0x9B1 // 2481 + SYS_CASIN = 0x9B2 // 2482 + SYS___CASIN_B = 0x9B3 // 2483 + SYS___CASIN_H = 0x9B4 // 2484 + SYS_CASINF = 0x9B5 // 2485 + SYS___CASINF_B = 0x9B6 // 2486 + SYS___CASINF_H = 0x9B7 // 2487 + SYS_CASINL = 0x9B8 // 2488 + SYS___CASINL_B = 0x9B9 // 2489 + SYS___CASINL_H = 0x9BA // 2490 + SYS_CASINH = 0x9BB // 2491 + SYS___CASINH_B = 0x9BC // 2492 + SYS___CASINH_H = 0x9BD // 2493 + SYS_CASINHF = 0x9BE // 2494 + SYS___CASINHF_B = 0x9BF // 2495 + SYS___CASINHF_H = 0x9C0 // 2496 + SYS_CASINHL = 0x9C1 // 2497 + SYS___CASINHL_B = 0x9C2 // 2498 + SYS___CASINHL_H = 0x9C3 // 2499 + SYS_CATAN = 0x9C4 // 2500 + SYS___CATAN_B = 0x9C5 // 2501 + SYS___CATAN_H = 0x9C6 // 2502 + SYS_CATANF = 0x9C7 // 2503 + SYS___CATANF_B = 0x9C8 // 2504 + SYS___CATANF_H = 0x9C9 // 2505 + SYS_CATANL = 0x9CA // 2506 + SYS___CATANL_B = 0x9CB // 2507 + SYS___CATANL_H = 0x9CC // 2508 + SYS_CATANH = 0x9CD // 2509 + SYS___CATANH_B = 0x9CE // 2510 + SYS___CATANH_H = 0x9CF // 2511 + SYS_CATANHF = 0x9D0 // 2512 + SYS___CATANHF_B = 0x9D1 // 2513 + SYS___CATANHF_H = 0x9D2 // 2514 + SYS_CATANHL = 0x9D3 // 2515 + SYS___CATANHL_B = 0x9D4 // 2516 + SYS___CATANHL_H = 0x9D5 // 2517 + SYS_CCOS = 0x9D6 // 2518 + SYS___CCOS_B = 0x9D7 // 2519 + SYS___CCOS_H = 0x9D8 // 2520 + SYS_CCOSF = 0x9D9 // 2521 + SYS___CCOSF_B = 0x9DA // 2522 + SYS___CCOSF_H = 0x9DB // 2523 + SYS_CCOSL = 0x9DC // 2524 + SYS___CCOSL_B = 0x9DD // 2525 + SYS___CCOSL_H = 0x9DE // 2526 + SYS_CCOSH = 0x9DF // 2527 + SYS___CCOSH_B = 0x9E0 // 2528 + SYS___CCOSH_H = 0x9E1 // 2529 + SYS_CCOSHF = 0x9E2 // 2530 + SYS___CCOSHF_B = 0x9E3 // 2531 + SYS___CCOSHF_H = 0x9E4 // 2532 + SYS_CCOSHL = 0x9E5 // 2533 + SYS___CCOSHL_B = 0x9E6 // 2534 + SYS___CCOSHL_H = 0x9E7 // 2535 + SYS_CEXP = 0x9E8 // 2536 + SYS___CEXP_B = 0x9E9 // 2537 + SYS___CEXP_H = 0x9EA // 2538 + SYS_CEXPF = 0x9EB // 2539 + SYS___CEXPF_B = 0x9EC // 2540 + SYS___CEXPF_H = 0x9ED // 2541 + SYS_CEXPL = 0x9EE // 2542 + SYS___CEXPL_B = 0x9EF // 2543 + SYS___CEXPL_H = 0x9F0 // 2544 + SYS_CIMAG = 0x9F1 // 2545 + SYS___CIMAG_B = 0x9F2 // 2546 + SYS___CIMAG_H = 0x9F3 // 2547 + SYS_CIMAGF = 0x9F4 // 2548 + SYS___CIMAGF_B = 0x9F5 // 2549 + SYS___CIMAGF_H = 0x9F6 // 2550 + SYS_CIMAGL = 0x9F7 // 2551 + SYS___CIMAGL_B = 0x9F8 // 2552 + SYS___CIMAGL_H = 0x9F9 // 2553 + SYS___CLOG = 0x9FA // 2554 + SYS___CLOG_B = 0x9FB // 2555 + SYS___CLOG_H = 0x9FC // 2556 + SYS_CLOGF = 0x9FD // 2557 + SYS___CLOGF_B = 0x9FE // 2558 + SYS___CLOGF_H = 0x9FF // 2559 + SYS_CLOGL = 0xA00 // 2560 + SYS___CLOGL_B = 0xA01 // 2561 + SYS___CLOGL_H = 0xA02 // 2562 + SYS_CONJ = 0xA03 // 2563 + SYS___CONJ_B = 0xA04 // 2564 + SYS___CONJ_H = 0xA05 // 2565 + SYS_CONJF = 0xA06 // 2566 + SYS___CONJF_B = 0xA07 // 2567 + SYS___CONJF_H = 0xA08 // 2568 + SYS_CONJL = 0xA09 // 2569 + SYS___CONJL_B = 0xA0A // 2570 + SYS___CONJL_H = 0xA0B // 2571 + SYS_CPOW = 0xA0C // 2572 + SYS___CPOW_B = 0xA0D // 2573 + SYS___CPOW_H = 0xA0E // 2574 + SYS_CPOWF = 0xA0F // 2575 + SYS___CPOWF_B = 0xA10 // 2576 + SYS___CPOWF_H = 0xA11 // 2577 + SYS_CPOWL = 0xA12 // 2578 + SYS___CPOWL_B = 0xA13 // 2579 + SYS___CPOWL_H = 0xA14 // 2580 + SYS_CPROJ = 0xA15 // 2581 + SYS___CPROJ_B = 0xA16 // 2582 + SYS___CPROJ_H = 0xA17 // 2583 + SYS_CPROJF = 0xA18 // 2584 + SYS___CPROJF_B = 0xA19 // 2585 + SYS___CPROJF_H = 0xA1A // 2586 + SYS_CPROJL = 0xA1B // 2587 + SYS___CPROJL_B = 0xA1C // 2588 + SYS___CPROJL_H = 0xA1D // 2589 + SYS_CREAL = 0xA1E // 2590 + SYS___CREAL_B = 0xA1F // 2591 + SYS___CREAL_H = 0xA20 // 2592 + SYS_CREALF = 0xA21 // 2593 + SYS___CREALF_B = 0xA22 // 2594 + SYS___CREALF_H = 0xA23 // 2595 + SYS_CREALL = 0xA24 // 2596 + SYS___CREALL_B = 0xA25 // 2597 + SYS___CREALL_H = 0xA26 // 2598 + SYS_CSIN = 0xA27 // 2599 + SYS___CSIN_B = 0xA28 // 2600 + SYS___CSIN_H = 0xA29 // 2601 + SYS_CSINF = 0xA2A // 2602 + SYS___CSINF_B = 0xA2B // 2603 + SYS___CSINF_H = 0xA2C // 2604 + SYS_CSINL = 0xA2D // 2605 + SYS___CSINL_B = 0xA2E // 2606 + SYS___CSINL_H = 0xA2F // 2607 + SYS_CSINH = 0xA30 // 2608 + SYS___CSINH_B = 0xA31 // 2609 + SYS___CSINH_H = 0xA32 // 2610 + SYS_CSINHF = 0xA33 // 2611 + SYS___CSINHF_B = 0xA34 // 2612 + SYS___CSINHF_H = 0xA35 // 2613 + SYS_CSINHL = 0xA36 // 2614 + SYS___CSINHL_B = 0xA37 // 2615 + SYS___CSINHL_H = 0xA38 // 2616 + SYS_CSQRT = 0xA39 // 2617 + SYS___CSQRT_B = 0xA3A // 2618 + SYS___CSQRT_H = 0xA3B // 2619 + SYS_CSQRTF = 0xA3C // 2620 + SYS___CSQRTF_B = 0xA3D // 2621 + SYS___CSQRTF_H = 0xA3E // 2622 + SYS_CSQRTL = 0xA3F // 2623 + SYS___CSQRTL_B = 0xA40 // 2624 + SYS___CSQRTL_H = 0xA41 // 2625 + SYS_CTAN = 0xA42 // 2626 + SYS___CTAN_B = 0xA43 // 2627 + SYS___CTAN_H = 0xA44 // 2628 + SYS_CTANF = 0xA45 // 2629 + SYS___CTANF_B = 0xA46 // 2630 + SYS___CTANF_H = 0xA47 // 2631 + SYS_CTANL = 0xA48 // 2632 + SYS___CTANL_B = 0xA49 // 2633 + SYS___CTANL_H = 0xA4A // 2634 + SYS_CTANH = 0xA4B // 2635 + SYS___CTANH_B = 0xA4C // 2636 + SYS___CTANH_H = 0xA4D // 2637 + SYS_CTANHF = 0xA4E // 2638 + SYS___CTANHF_B = 0xA4F // 2639 + SYS___CTANHF_H = 0xA50 // 2640 + SYS_CTANHL = 0xA51 // 2641 + SYS___CTANHL_B = 0xA52 // 2642 + SYS___CTANHL_H = 0xA53 // 2643 + SYS___ACOSHF_H = 0xA54 // 2644 + SYS___ACOSHL_H = 0xA55 // 2645 + SYS___ASINHF_H = 0xA56 // 2646 + SYS___ASINHL_H = 0xA57 // 2647 + SYS___CBRTF_H = 0xA58 // 2648 + SYS___CBRTL_H = 0xA59 // 2649 + SYS___COPYSIGN_B = 0xA5A // 2650 + SYS___EXPM1F_H = 0xA5B // 2651 + SYS___EXPM1L_H = 0xA5C // 2652 + SYS___EXP2_H = 0xA5D // 2653 + SYS___EXP2F_H = 0xA5E // 2654 + SYS___EXP2L_H = 0xA5F // 2655 + SYS___LOG1PF_H = 0xA60 // 2656 + SYS___LOG1PL_H = 0xA61 // 2657 + SYS___LGAMMAL_H = 0xA62 // 2658 + SYS_FMA = 0xA63 // 2659 + SYS___FMA_B = 0xA64 // 2660 + SYS___FMA_H = 0xA65 // 2661 + SYS_FMAF = 0xA66 // 2662 + SYS___FMAF_B = 0xA67 // 2663 + SYS___FMAF_H = 0xA68 // 2664 + SYS_FMAL = 0xA69 // 2665 + SYS___FMAL_B = 0xA6A // 2666 + SYS___FMAL_H = 0xA6B // 2667 + SYS_FMAX = 0xA6C // 2668 + SYS___FMAX_B = 0xA6D // 2669 + SYS___FMAX_H = 0xA6E // 2670 + SYS_FMAXF = 0xA6F // 2671 + SYS___FMAXF_B = 0xA70 // 2672 + SYS___FMAXF_H = 0xA71 // 2673 + SYS_FMAXL = 0xA72 // 2674 + SYS___FMAXL_B = 0xA73 // 2675 + SYS___FMAXL_H = 0xA74 // 2676 + SYS_FMIN = 0xA75 // 2677 + SYS___FMIN_B = 0xA76 // 2678 + SYS___FMIN_H = 0xA77 // 2679 + SYS_FMINF = 0xA78 // 2680 + SYS___FMINF_B = 0xA79 // 2681 + SYS___FMINF_H = 0xA7A // 2682 + SYS_FMINL = 0xA7B // 2683 + SYS___FMINL_B = 0xA7C // 2684 + SYS___FMINL_H = 0xA7D // 2685 + SYS_ILOGBF = 0xA7E // 2686 + SYS___ILOGBF_B = 0xA7F // 2687 + SYS___ILOGBF_H = 0xA80 // 2688 + SYS_ILOGBL = 0xA81 // 2689 + SYS___ILOGBL_B = 0xA82 // 2690 + SYS___ILOGBL_H = 0xA83 // 2691 + SYS_LLRINT = 0xA84 // 2692 + SYS___LLRINT_B = 0xA85 // 2693 + SYS___LLRINT_H = 0xA86 // 2694 + SYS_LLRINTF = 0xA87 // 2695 + SYS___LLRINTF_B = 0xA88 // 2696 + SYS___LLRINTF_H = 0xA89 // 2697 + SYS_LLRINTL = 0xA8A // 2698 + SYS___LLRINTL_B = 0xA8B // 2699 + SYS___LLRINTL_H = 0xA8C // 2700 + SYS_LLROUND = 0xA8D // 2701 + SYS___LLROUND_B = 0xA8E // 2702 + SYS___LLROUND_H = 0xA8F // 2703 + SYS_LLROUNDF = 0xA90 // 2704 + SYS___LLROUNDF_B = 0xA91 // 2705 + SYS___LLROUNDF_H = 0xA92 // 2706 + SYS_LLROUNDL = 0xA93 // 2707 + SYS___LLROUNDL_B = 0xA94 // 2708 + SYS___LLROUNDL_H = 0xA95 // 2709 + SYS_LOGBF = 0xA96 // 2710 + SYS___LOGBF_B = 0xA97 // 2711 + SYS___LOGBF_H = 0xA98 // 2712 + SYS_LOGBL = 0xA99 // 2713 + SYS___LOGBL_B = 0xA9A // 2714 + SYS___LOGBL_H = 0xA9B // 2715 + SYS_LRINT = 0xA9C // 2716 + SYS___LRINT_B = 0xA9D // 2717 + SYS___LRINT_H = 0xA9E // 2718 + SYS_LRINTF = 0xA9F // 2719 + SYS___LRINTF_B = 0xAA0 // 2720 + SYS___LRINTF_H = 0xAA1 // 2721 + SYS_LRINTL = 0xAA2 // 2722 + SYS___LRINTL_B = 0xAA3 // 2723 + SYS___LRINTL_H = 0xAA4 // 2724 + SYS_LROUNDL = 0xAA5 // 2725 + SYS___LROUNDL_B = 0xAA6 // 2726 + SYS___LROUNDL_H = 0xAA7 // 2727 + SYS_NAN = 0xAA8 // 2728 + SYS___NAN_B = 0xAA9 // 2729 + SYS_NANF = 0xAAA // 2730 + SYS___NANF_B = 0xAAB // 2731 + SYS_NANL = 0xAAC // 2732 + SYS___NANL_B = 0xAAD // 2733 + SYS_NEARBYINT = 0xAAE // 2734 + SYS___NEARBYINT_B = 0xAAF // 2735 + SYS___NEARBYINT_H = 0xAB0 // 2736 + SYS_NEARBYINTF = 0xAB1 // 2737 + SYS___NEARBYINTF_B = 0xAB2 // 2738 + SYS___NEARBYINTF_H = 0xAB3 // 2739 + SYS_NEARBYINTL = 0xAB4 // 2740 + SYS___NEARBYINTL_B = 0xAB5 // 2741 + SYS___NEARBYINTL_H = 0xAB6 // 2742 + SYS_NEXTAFTERF = 0xAB7 // 2743 + SYS___NEXTAFTERF_B = 0xAB8 // 2744 + SYS___NEXTAFTERF_H = 0xAB9 // 2745 + SYS_NEXTAFTERL = 0xABA // 2746 + SYS___NEXTAFTERL_B = 0xABB // 2747 + SYS___NEXTAFTERL_H = 0xABC // 2748 + SYS_NEXTTOWARD = 0xABD // 2749 + SYS___NEXTTOWARD_B = 0xABE // 2750 + SYS___NEXTTOWARD_H = 0xABF // 2751 + SYS_NEXTTOWARDF = 0xAC0 // 2752 + SYS___NEXTTOWARDF_B = 0xAC1 // 2753 + SYS___NEXTTOWARDF_H = 0xAC2 // 2754 + SYS_NEXTTOWARDL = 0xAC3 // 2755 + SYS___NEXTTOWARDL_B = 0xAC4 // 2756 + SYS___NEXTTOWARDL_H = 0xAC5 // 2757 + SYS___REMAINDERF_H = 0xAC6 // 2758 + SYS___REMAINDERL_H = 0xAC7 // 2759 + SYS___REMQUO_H = 0xAC8 // 2760 + SYS___REMQUOF_H = 0xAC9 // 2761 + SYS___REMQUOL_H = 0xACA // 2762 + SYS_RINTF = 0xACB // 2763 + SYS___RINTF_B = 0xACC // 2764 + SYS_RINTL = 0xACD // 2765 + SYS___RINTL_B = 0xACE // 2766 + SYS_ROUND = 0xACF // 2767 + SYS___ROUND_B = 0xAD0 // 2768 + SYS___ROUND_H = 0xAD1 // 2769 + SYS_ROUNDF = 0xAD2 // 2770 + SYS___ROUNDF_B = 0xAD3 // 2771 + SYS___ROUNDF_H = 0xAD4 // 2772 + SYS_ROUNDL = 0xAD5 // 2773 + SYS___ROUNDL_B = 0xAD6 // 2774 + SYS___ROUNDL_H = 0xAD7 // 2775 + SYS_SCALBLN = 0xAD8 // 2776 + SYS___SCALBLN_B = 0xAD9 // 2777 + SYS___SCALBLN_H = 0xADA // 2778 + SYS_SCALBLNF = 0xADB // 2779 + SYS___SCALBLNF_B = 0xADC // 2780 + SYS___SCALBLNF_H = 0xADD // 2781 + SYS_SCALBLNL = 0xADE // 2782 + SYS___SCALBLNL_B = 0xADF // 2783 + SYS___SCALBLNL_H = 0xAE0 // 2784 + SYS___SCALBN_B = 0xAE1 // 2785 + SYS___SCALBN_H = 0xAE2 // 2786 + SYS_SCALBNF = 0xAE3 // 2787 + SYS___SCALBNF_B = 0xAE4 // 2788 + SYS___SCALBNF_H = 0xAE5 // 2789 + SYS_SCALBNL = 0xAE6 // 2790 + SYS___SCALBNL_B = 0xAE7 // 2791 + SYS___SCALBNL_H = 0xAE8 // 2792 + SYS___TGAMMAL_H = 0xAE9 // 2793 + SYS_FECLEAREXCEPT = 0xAEA // 2794 + SYS_FEGETENV = 0xAEB // 2795 + SYS_FEGETEXCEPTFLAG = 0xAEC // 2796 + SYS_FEGETROUND = 0xAED // 2797 + SYS_FEHOLDEXCEPT = 0xAEE // 2798 + SYS_FERAISEEXCEPT = 0xAEF // 2799 + SYS_FESETENV = 0xAF0 // 2800 + SYS_FESETEXCEPTFLAG = 0xAF1 // 2801 + SYS_FESETROUND = 0xAF2 // 2802 + SYS_FETESTEXCEPT = 0xAF3 // 2803 + SYS_FEUPDATEENV = 0xAF4 // 2804 + SYS___COPYSIGN_H = 0xAF5 // 2805 + SYS___HYPOTF_H = 0xAF6 // 2806 + SYS___HYPOTL_H = 0xAF7 // 2807 + SYS___CLASS = 0xAFA // 2810 + SYS___CLASS_B = 0xAFB // 2811 + SYS___CLASS_H = 0xAFC // 2812 + SYS___ISBLANK_A = 0xB2E // 2862 + SYS___ISWBLANK_A = 0xB2F // 2863 + SYS___LROUND_FIXUP = 0xB30 // 2864 + SYS___LROUNDF_FIXUP = 0xB31 // 2865 + SYS_SCHED_YIELD = 0xB32 // 2866 + SYS_STRERROR_R = 0xB33 // 2867 + SYS_UNSETENV = 0xB34 // 2868 + SYS___LGAMMA_H_C99 = 0xB38 // 2872 + SYS___LGAMMA_B_C99 = 0xB39 // 2873 + SYS___LGAMMA_R_C99 = 0xB3A // 2874 + SYS___FTELL2 = 0xB3B // 2875 + SYS___FSEEK2 = 0xB3C // 2876 + SYS___STATIC_REINIT = 0xB3D // 2877 + SYS_PTHREAD_ATTR_GETSTACK = 0xB3E // 2878 + SYS_PTHREAD_ATTR_SETSTACK = 0xB3F // 2879 + SYS___TGAMMA_H_C99 = 0xB78 // 2936 + SYS___TGAMMAF_H_C99 = 0xB79 // 2937 + SYS___LE_TRACEBACK = 0xB7A // 2938 + SYS___MUST_STAY_CLEAN = 0xB7C // 2940 + SYS___O_ENV = 0xB7D // 2941 + SYS_ACOSD32 = 0xB7E // 2942 + SYS_ACOSD64 = 0xB7F // 2943 + SYS_ACOSD128 = 0xB80 // 2944 + SYS_ACOSHD32 = 0xB81 // 2945 + SYS_ACOSHD64 = 0xB82 // 2946 + SYS_ACOSHD128 = 0xB83 // 2947 + SYS_ASIND32 = 0xB84 // 2948 + SYS_ASIND64 = 0xB85 // 2949 + SYS_ASIND128 = 0xB86 // 2950 + SYS_ASINHD32 = 0xB87 // 2951 + SYS_ASINHD64 = 0xB88 // 2952 + SYS_ASINHD128 = 0xB89 // 2953 + SYS_ATAND32 = 0xB8A // 2954 + SYS_ATAND64 = 0xB8B // 2955 + SYS_ATAND128 = 0xB8C // 2956 + SYS_ATAN2D32 = 0xB8D // 2957 + SYS_ATAN2D64 = 0xB8E // 2958 + SYS_ATAN2D128 = 0xB8F // 2959 + SYS_ATANHD32 = 0xB90 // 2960 + SYS_ATANHD64 = 0xB91 // 2961 + SYS_ATANHD128 = 0xB92 // 2962 + SYS_CBRTD32 = 0xB93 // 2963 + SYS_CBRTD64 = 0xB94 // 2964 + SYS_CBRTD128 = 0xB95 // 2965 + SYS_CEILD32 = 0xB96 // 2966 + SYS_CEILD64 = 0xB97 // 2967 + SYS_CEILD128 = 0xB98 // 2968 + SYS___CLASS2 = 0xB99 // 2969 + SYS___CLASS2_B = 0xB9A // 2970 + SYS___CLASS2_H = 0xB9B // 2971 + SYS_COPYSIGND32 = 0xB9C // 2972 + SYS_COPYSIGND64 = 0xB9D // 2973 + SYS_COPYSIGND128 = 0xB9E // 2974 + SYS_COSD32 = 0xB9F // 2975 + SYS_COSD64 = 0xBA0 // 2976 + SYS_COSD128 = 0xBA1 // 2977 + SYS_COSHD32 = 0xBA2 // 2978 + SYS_COSHD64 = 0xBA3 // 2979 + SYS_COSHD128 = 0xBA4 // 2980 + SYS_ERFD32 = 0xBA5 // 2981 + SYS_ERFD64 = 0xBA6 // 2982 + SYS_ERFD128 = 0xBA7 // 2983 + SYS_ERFCD32 = 0xBA8 // 2984 + SYS_ERFCD64 = 0xBA9 // 2985 + SYS_ERFCD128 = 0xBAA // 2986 + SYS_EXPD32 = 0xBAB // 2987 + SYS_EXPD64 = 0xBAC // 2988 + SYS_EXPD128 = 0xBAD // 2989 + SYS_EXP2D32 = 0xBAE // 2990 + SYS_EXP2D64 = 0xBAF // 2991 + SYS_EXP2D128 = 0xBB0 // 2992 + SYS_EXPM1D32 = 0xBB1 // 2993 + SYS_EXPM1D64 = 0xBB2 // 2994 + SYS_EXPM1D128 = 0xBB3 // 2995 + SYS_FABSD32 = 0xBB4 // 2996 + SYS_FABSD64 = 0xBB5 // 2997 + SYS_FABSD128 = 0xBB6 // 2998 + SYS_FDIMD32 = 0xBB7 // 2999 + SYS_FDIMD64 = 0xBB8 // 3000 + SYS_FDIMD128 = 0xBB9 // 3001 + SYS_FE_DEC_GETROUND = 0xBBA // 3002 + SYS_FE_DEC_SETROUND = 0xBBB // 3003 + SYS_FLOORD32 = 0xBBC // 3004 + SYS_FLOORD64 = 0xBBD // 3005 + SYS_FLOORD128 = 0xBBE // 3006 + SYS_FMAD32 = 0xBBF // 3007 + SYS_FMAD64 = 0xBC0 // 3008 + SYS_FMAD128 = 0xBC1 // 3009 + SYS_FMAXD32 = 0xBC2 // 3010 + SYS_FMAXD64 = 0xBC3 // 3011 + SYS_FMAXD128 = 0xBC4 // 3012 + SYS_FMIND32 = 0xBC5 // 3013 + SYS_FMIND64 = 0xBC6 // 3014 + SYS_FMIND128 = 0xBC7 // 3015 + SYS_FMODD32 = 0xBC8 // 3016 + SYS_FMODD64 = 0xBC9 // 3017 + SYS_FMODD128 = 0xBCA // 3018 + SYS___FP_CAST_D = 0xBCB // 3019 + SYS_FREXPD32 = 0xBCC // 3020 + SYS_FREXPD64 = 0xBCD // 3021 + SYS_FREXPD128 = 0xBCE // 3022 + SYS_HYPOTD32 = 0xBCF // 3023 + SYS_HYPOTD64 = 0xBD0 // 3024 + SYS_HYPOTD128 = 0xBD1 // 3025 + SYS_ILOGBD32 = 0xBD2 // 3026 + SYS_ILOGBD64 = 0xBD3 // 3027 + SYS_ILOGBD128 = 0xBD4 // 3028 + SYS_LDEXPD32 = 0xBD5 // 3029 + SYS_LDEXPD64 = 0xBD6 // 3030 + SYS_LDEXPD128 = 0xBD7 // 3031 + SYS_LGAMMAD32 = 0xBD8 // 3032 + SYS_LGAMMAD64 = 0xBD9 // 3033 + SYS_LGAMMAD128 = 0xBDA // 3034 + SYS_LLRINTD32 = 0xBDB // 3035 + SYS_LLRINTD64 = 0xBDC // 3036 + SYS_LLRINTD128 = 0xBDD // 3037 + SYS_LLROUNDD32 = 0xBDE // 3038 + SYS_LLROUNDD64 = 0xBDF // 3039 + SYS_LLROUNDD128 = 0xBE0 // 3040 + SYS_LOGD32 = 0xBE1 // 3041 + SYS_LOGD64 = 0xBE2 // 3042 + SYS_LOGD128 = 0xBE3 // 3043 + SYS_LOG10D32 = 0xBE4 // 3044 + SYS_LOG10D64 = 0xBE5 // 3045 + SYS_LOG10D128 = 0xBE6 // 3046 + SYS_LOG1PD32 = 0xBE7 // 3047 + SYS_LOG1PD64 = 0xBE8 // 3048 + SYS_LOG1PD128 = 0xBE9 // 3049 + SYS_LOG2D32 = 0xBEA // 3050 + SYS_LOG2D64 = 0xBEB // 3051 + SYS_LOG2D128 = 0xBEC // 3052 + SYS_LOGBD32 = 0xBED // 3053 + SYS_LOGBD64 = 0xBEE // 3054 + SYS_LOGBD128 = 0xBEF // 3055 + SYS_LRINTD32 = 0xBF0 // 3056 + SYS_LRINTD64 = 0xBF1 // 3057 + SYS_LRINTD128 = 0xBF2 // 3058 + SYS_LROUNDD32 = 0xBF3 // 3059 + SYS_LROUNDD64 = 0xBF4 // 3060 + SYS_LROUNDD128 = 0xBF5 // 3061 + SYS_MODFD32 = 0xBF6 // 3062 + SYS_MODFD64 = 0xBF7 // 3063 + SYS_MODFD128 = 0xBF8 // 3064 + SYS_NAND32 = 0xBF9 // 3065 + SYS_NAND64 = 0xBFA // 3066 + SYS_NAND128 = 0xBFB // 3067 + SYS_NEARBYINTD32 = 0xBFC // 3068 + SYS_NEARBYINTD64 = 0xBFD // 3069 + SYS_NEARBYINTD128 = 0xBFE // 3070 + SYS_NEXTAFTERD32 = 0xBFF // 3071 + SYS_NEXTAFTERD64 = 0xC00 // 3072 + SYS_NEXTAFTERD128 = 0xC01 // 3073 + SYS_NEXTTOWARDD32 = 0xC02 // 3074 + SYS_NEXTTOWARDD64 = 0xC03 // 3075 + SYS_NEXTTOWARDD128 = 0xC04 // 3076 + SYS_POWD32 = 0xC05 // 3077 + SYS_POWD64 = 0xC06 // 3078 + SYS_POWD128 = 0xC07 // 3079 + SYS_QUANTIZED32 = 0xC08 // 3080 + SYS_QUANTIZED64 = 0xC09 // 3081 + SYS_QUANTIZED128 = 0xC0A // 3082 + SYS_REMAINDERD32 = 0xC0B // 3083 + SYS_REMAINDERD64 = 0xC0C // 3084 + SYS_REMAINDERD128 = 0xC0D // 3085 + SYS___REMQUOD32 = 0xC0E // 3086 + SYS___REMQUOD64 = 0xC0F // 3087 + SYS___REMQUOD128 = 0xC10 // 3088 + SYS_RINTD32 = 0xC11 // 3089 + SYS_RINTD64 = 0xC12 // 3090 + SYS_RINTD128 = 0xC13 // 3091 + SYS_ROUNDD32 = 0xC14 // 3092 + SYS_ROUNDD64 = 0xC15 // 3093 + SYS_ROUNDD128 = 0xC16 // 3094 + SYS_SAMEQUANTUMD32 = 0xC17 // 3095 + SYS_SAMEQUANTUMD64 = 0xC18 // 3096 + SYS_SAMEQUANTUMD128 = 0xC19 // 3097 + SYS_SCALBLND32 = 0xC1A // 3098 + SYS_SCALBLND64 = 0xC1B // 3099 + SYS_SCALBLND128 = 0xC1C // 3100 + SYS_SCALBND32 = 0xC1D // 3101 + SYS_SCALBND64 = 0xC1E // 3102 + SYS_SCALBND128 = 0xC1F // 3103 + SYS_SIND32 = 0xC20 // 3104 + SYS_SIND64 = 0xC21 // 3105 + SYS_SIND128 = 0xC22 // 3106 + SYS_SINHD32 = 0xC23 // 3107 + SYS_SINHD64 = 0xC24 // 3108 + SYS_SINHD128 = 0xC25 // 3109 + SYS_SQRTD32 = 0xC26 // 3110 + SYS_SQRTD64 = 0xC27 // 3111 + SYS_SQRTD128 = 0xC28 // 3112 + SYS_STRTOD32 = 0xC29 // 3113 + SYS_STRTOD64 = 0xC2A // 3114 + SYS_STRTOD128 = 0xC2B // 3115 + SYS_TAND32 = 0xC2C // 3116 + SYS_TAND64 = 0xC2D // 3117 + SYS_TAND128 = 0xC2E // 3118 + SYS_TANHD32 = 0xC2F // 3119 + SYS_TANHD64 = 0xC30 // 3120 + SYS_TANHD128 = 0xC31 // 3121 + SYS_TGAMMAD32 = 0xC32 // 3122 + SYS_TGAMMAD64 = 0xC33 // 3123 + SYS_TGAMMAD128 = 0xC34 // 3124 + SYS_TRUNCD32 = 0xC3E // 3134 + SYS_TRUNCD64 = 0xC3F // 3135 + SYS_TRUNCD128 = 0xC40 // 3136 + SYS_WCSTOD32 = 0xC41 // 3137 + SYS_WCSTOD64 = 0xC42 // 3138 + SYS_WCSTOD128 = 0xC43 // 3139 + SYS___CODEPAGE_INFO = 0xC64 // 3172 + SYS_POSIX_OPENPT = 0xC66 // 3174 + SYS_PSELECT = 0xC67 // 3175 + SYS_SOCKATMARK = 0xC68 // 3176 + SYS_AIO_FSYNC = 0xC69 // 3177 + SYS_LIO_LISTIO = 0xC6A // 3178 + SYS___ATANPID32 = 0xC6B // 3179 + SYS___ATANPID64 = 0xC6C // 3180 + SYS___ATANPID128 = 0xC6D // 3181 + SYS___COSPID32 = 0xC6E // 3182 + SYS___COSPID64 = 0xC6F // 3183 + SYS___COSPID128 = 0xC70 // 3184 + SYS___SINPID32 = 0xC71 // 3185 + SYS___SINPID64 = 0xC72 // 3186 + SYS___SINPID128 = 0xC73 // 3187 + SYS_SETIPV4SOURCEFILTER = 0xC76 // 3190 + SYS_GETIPV4SOURCEFILTER = 0xC77 // 3191 + SYS_SETSOURCEFILTER = 0xC78 // 3192 + SYS_GETSOURCEFILTER = 0xC79 // 3193 + SYS_FWRITE_UNLOCKED = 0xC7A // 3194 + SYS_FREAD_UNLOCKED = 0xC7B // 3195 + SYS_FGETS_UNLOCKED = 0xC7C // 3196 + SYS_GETS_UNLOCKED = 0xC7D // 3197 + SYS_FPUTS_UNLOCKED = 0xC7E // 3198 + SYS_PUTS_UNLOCKED = 0xC7F // 3199 + SYS_FGETC_UNLOCKED = 0xC80 // 3200 + SYS_FPUTC_UNLOCKED = 0xC81 // 3201 + SYS_DLADDR = 0xC82 // 3202 + SYS_SHM_OPEN = 0xC8C // 3212 + SYS_SHM_UNLINK = 0xC8D // 3213 + SYS___CLASS2F = 0xC91 // 3217 + SYS___CLASS2L = 0xC92 // 3218 + SYS___CLASS2F_B = 0xC93 // 3219 + SYS___CLASS2F_H = 0xC94 // 3220 + SYS___CLASS2L_B = 0xC95 // 3221 + SYS___CLASS2L_H = 0xC96 // 3222 + SYS___CLASS2D32 = 0xC97 // 3223 + SYS___CLASS2D64 = 0xC98 // 3224 + SYS___CLASS2D128 = 0xC99 // 3225 + SYS___TOCSNAME2 = 0xC9A // 3226 + SYS___D1TOP = 0xC9B // 3227 + SYS___D2TOP = 0xC9C // 3228 + SYS___D4TOP = 0xC9D // 3229 + SYS___PTOD1 = 0xC9E // 3230 + SYS___PTOD2 = 0xC9F // 3231 + SYS___PTOD4 = 0xCA0 // 3232 + SYS_CLEARERR_UNLOCKED = 0xCA1 // 3233 + SYS_FDELREC_UNLOCKED = 0xCA2 // 3234 + SYS_FEOF_UNLOCKED = 0xCA3 // 3235 + SYS_FERROR_UNLOCKED = 0xCA4 // 3236 + SYS_FFLUSH_UNLOCKED = 0xCA5 // 3237 + SYS_FGETPOS_UNLOCKED = 0xCA6 // 3238 + SYS_FGETWC_UNLOCKED = 0xCA7 // 3239 + SYS_FGETWS_UNLOCKED = 0xCA8 // 3240 + SYS_FILENO_UNLOCKED = 0xCA9 // 3241 + SYS_FLDATA_UNLOCKED = 0xCAA // 3242 + SYS_FLOCATE_UNLOCKED = 0xCAB // 3243 + SYS_FPRINTF_UNLOCKED = 0xCAC // 3244 + SYS_FPUTWC_UNLOCKED = 0xCAD // 3245 + SYS_FPUTWS_UNLOCKED = 0xCAE // 3246 + SYS_FSCANF_UNLOCKED = 0xCAF // 3247 + SYS_FSEEK_UNLOCKED = 0xCB0 // 3248 + SYS_FSEEKO_UNLOCKED = 0xCB1 // 3249 + SYS_FSETPOS_UNLOCKED = 0xCB3 // 3251 + SYS_FTELL_UNLOCKED = 0xCB4 // 3252 + SYS_FTELLO_UNLOCKED = 0xCB5 // 3253 + SYS_FUPDATE_UNLOCKED = 0xCB7 // 3255 + SYS_FWIDE_UNLOCKED = 0xCB8 // 3256 + SYS_FWPRINTF_UNLOCKED = 0xCB9 // 3257 + SYS_FWSCANF_UNLOCKED = 0xCBA // 3258 + SYS_GETWC_UNLOCKED = 0xCBB // 3259 + SYS_GETWCHAR_UNLOCKED = 0xCBC // 3260 + SYS_PERROR_UNLOCKED = 0xCBD // 3261 + SYS_PRINTF_UNLOCKED = 0xCBE // 3262 + SYS_PUTWC_UNLOCKED = 0xCBF // 3263 + SYS_PUTWCHAR_UNLOCKED = 0xCC0 // 3264 + SYS_REWIND_UNLOCKED = 0xCC1 // 3265 + SYS_SCANF_UNLOCKED = 0xCC2 // 3266 + SYS_UNGETC_UNLOCKED = 0xCC3 // 3267 + SYS_UNGETWC_UNLOCKED = 0xCC4 // 3268 + SYS_VFPRINTF_UNLOCKED = 0xCC5 // 3269 + SYS_VFSCANF_UNLOCKED = 0xCC7 // 3271 + SYS_VFWPRINTF_UNLOCKED = 0xCC9 // 3273 + SYS_VFWSCANF_UNLOCKED = 0xCCB // 3275 + SYS_VPRINTF_UNLOCKED = 0xCCD // 3277 + SYS_VSCANF_UNLOCKED = 0xCCF // 3279 + SYS_VWPRINTF_UNLOCKED = 0xCD1 // 3281 + SYS_VWSCANF_UNLOCKED = 0xCD3 // 3283 + SYS_WPRINTF_UNLOCKED = 0xCD5 // 3285 + SYS_WSCANF_UNLOCKED = 0xCD6 // 3286 + SYS_ASCTIME64 = 0xCD7 // 3287 + SYS_ASCTIME64_R = 0xCD8 // 3288 + SYS_CTIME64 = 0xCD9 // 3289 + SYS_CTIME64_R = 0xCDA // 3290 + SYS_DIFFTIME64 = 0xCDB // 3291 + SYS_GMTIME64 = 0xCDC // 3292 + SYS_GMTIME64_R = 0xCDD // 3293 + SYS_LOCALTIME64 = 0xCDE // 3294 + SYS_LOCALTIME64_R = 0xCDF // 3295 + SYS_MKTIME64 = 0xCE0 // 3296 + SYS_TIME64 = 0xCE1 // 3297 + SYS___LOGIN_APPLID = 0xCE2 // 3298 + SYS___PASSWD_APPLID = 0xCE3 // 3299 + SYS_PTHREAD_SECURITY_APPLID_NP = 0xCE4 // 3300 + SYS___GETTHENT = 0xCE5 // 3301 + SYS_FREEIFADDRS = 0xCE6 // 3302 + SYS_GETIFADDRS = 0xCE7 // 3303 + SYS_POSIX_FALLOCATE = 0xCE8 // 3304 + SYS_POSIX_MEMALIGN = 0xCE9 // 3305 + SYS_SIZEOF_ALLOC = 0xCEA // 3306 + SYS_RESIZE_ALLOC = 0xCEB // 3307 + SYS_FREAD_NOUPDATE = 0xCEC // 3308 + SYS_FREAD_NOUPDATE_UNLOCKED = 0xCED // 3309 + SYS_FGETPOS64 = 0xCEE // 3310 + SYS_FSEEK64 = 0xCEF // 3311 + SYS_FSEEKO64 = 0xCF0 // 3312 + SYS_FSETPOS64 = 0xCF1 // 3313 + SYS_FTELL64 = 0xCF2 // 3314 + SYS_FTELLO64 = 0xCF3 // 3315 + SYS_FGETPOS64_UNLOCKED = 0xCF4 // 3316 + SYS_FSEEK64_UNLOCKED = 0xCF5 // 3317 + SYS_FSEEKO64_UNLOCKED = 0xCF6 // 3318 + SYS_FSETPOS64_UNLOCKED = 0xCF7 // 3319 + SYS_FTELL64_UNLOCKED = 0xCF8 // 3320 + SYS_FTELLO64_UNLOCKED = 0xCF9 // 3321 + SYS_FOPEN_UNLOCKED = 0xCFA // 3322 + SYS_FREOPEN_UNLOCKED = 0xCFB // 3323 + SYS_FDOPEN_UNLOCKED = 0xCFC // 3324 + SYS_TMPFILE_UNLOCKED = 0xCFD // 3325 + SYS___MOSERVICES = 0xD3D // 3389 + SYS___GETTOD = 0xD3E // 3390 + SYS_C16RTOMB = 0xD40 // 3392 + SYS_C32RTOMB = 0xD41 // 3393 + SYS_MBRTOC16 = 0xD42 // 3394 + SYS_MBRTOC32 = 0xD43 // 3395 + SYS_QUANTEXPD32 = 0xD44 // 3396 + SYS_QUANTEXPD64 = 0xD45 // 3397 + SYS_QUANTEXPD128 = 0xD46 // 3398 + SYS___LOCALE_CTL = 0xD47 // 3399 + SYS___SMF_RECORD2 = 0xD48 // 3400 + SYS_FOPEN64 = 0xD49 // 3401 + SYS_FOPEN64_UNLOCKED = 0xD4A // 3402 + SYS_FREOPEN64 = 0xD4B // 3403 + SYS_FREOPEN64_UNLOCKED = 0xD4C // 3404 + SYS_TMPFILE64 = 0xD4D // 3405 + SYS_TMPFILE64_UNLOCKED = 0xD4E // 3406 + SYS_GETDATE64 = 0xD4F // 3407 + SYS_GETTIMEOFDAY64 = 0xD50 // 3408 + SYS_BIND2ADDRSEL = 0xD59 // 3417 + SYS_INET6_IS_SRCADDR = 0xD5A // 3418 + SYS___GETGRGID1 = 0xD5B // 3419 + SYS___GETGRNAM1 = 0xD5C // 3420 + SYS___FBUFSIZE = 0xD60 // 3424 + SYS___FPENDING = 0xD61 // 3425 + SYS___FLBF = 0xD62 // 3426 + SYS___FREADABLE = 0xD63 // 3427 + SYS___FWRITABLE = 0xD64 // 3428 + SYS___FREADING = 0xD65 // 3429 + SYS___FWRITING = 0xD66 // 3430 + SYS___FSETLOCKING = 0xD67 // 3431 + SYS__FLUSHLBF = 0xD68 // 3432 + SYS___FPURGE = 0xD69 // 3433 + SYS___FREADAHEAD = 0xD6A // 3434 + SYS___FSETERR = 0xD6B // 3435 + SYS___FPENDING_UNLOCKED = 0xD6C // 3436 + SYS___FREADING_UNLOCKED = 0xD6D // 3437 + SYS___FWRITING_UNLOCKED = 0xD6E // 3438 + SYS__FLUSHLBF_UNLOCKED = 0xD6F // 3439 + SYS___FPURGE_UNLOCKED = 0xD70 // 3440 + SYS___FREADAHEAD_UNLOCKED = 0xD71 // 3441 + SYS___LE_CEEGTJS = 0xD72 // 3442 + SYS___LE_RECORD_DUMP = 0xD73 // 3443 + SYS_FSTAT64 = 0xD74 // 3444 + SYS_LSTAT64 = 0xD75 // 3445 + SYS_STAT64 = 0xD76 // 3446 + SYS___READDIR2_64 = 0xD77 // 3447 + SYS___OPEN_STAT64 = 0xD78 // 3448 + SYS_FTW64 = 0xD79 // 3449 + SYS_NFTW64 = 0xD7A // 3450 + SYS_UTIME64 = 0xD7B // 3451 + SYS_UTIMES64 = 0xD7C // 3452 + SYS___GETIPC64 = 0xD7D // 3453 + SYS_MSGCTL64 = 0xD7E // 3454 + SYS_SEMCTL64 = 0xD7F // 3455 + SYS_SHMCTL64 = 0xD80 // 3456 + SYS_MSGXRCV64 = 0xD81 // 3457 + SYS___MGXR64 = 0xD81 // 3457 + SYS_W_GETPSENT64 = 0xD82 // 3458 + SYS_PTHREAD_COND_TIMEDWAIT64 = 0xD83 // 3459 + SYS_FTIME64 = 0xD85 // 3461 + SYS_GETUTXENT64 = 0xD86 // 3462 + SYS_GETUTXID64 = 0xD87 // 3463 + SYS_GETUTXLINE64 = 0xD88 // 3464 + SYS_PUTUTXLINE64 = 0xD89 // 3465 + SYS_NEWLOCALE = 0xD8A // 3466 + SYS_FREELOCALE = 0xD8B // 3467 + SYS_USELOCALE = 0xD8C // 3468 + SYS_DUPLOCALE = 0xD8D // 3469 + SYS___CHATTR64 = 0xD9C // 3484 + SYS___LCHATTR64 = 0xD9D // 3485 + SYS___FCHATTR64 = 0xD9E // 3486 + SYS_____CHATTR64_A = 0xD9F // 3487 + SYS_____LCHATTR64_A = 0xDA0 // 3488 + SYS___LE_CEEUSGD = 0xDA1 // 3489 + SYS___LE_IFAM_CON = 0xDA2 // 3490 + SYS___LE_IFAM_DSC = 0xDA3 // 3491 + SYS___LE_IFAM_GET = 0xDA4 // 3492 + SYS___LE_IFAM_QRY = 0xDA5 // 3493 + SYS_ALIGNED_ALLOC = 0xDA6 // 3494 + SYS_ACCEPT4 = 0xDA7 // 3495 + SYS___ACCEPT4_A = 0xDA8 // 3496 + SYS_COPYFILERANGE = 0xDA9 // 3497 + SYS_GETLINE = 0xDAA // 3498 + SYS___GETLINE_A = 0xDAB // 3499 + SYS_DIRFD = 0xDAC // 3500 + SYS_CLOCK_GETTIME = 0xDAD // 3501 + SYS_DUP3 = 0xDAE // 3502 + SYS_EPOLL_CREATE = 0xDAF // 3503 + SYS_EPOLL_CREATE1 = 0xDB0 // 3504 + SYS_EPOLL_CTL = 0xDB1 // 3505 + SYS_EPOLL_WAIT = 0xDB2 // 3506 + SYS_EPOLL_PWAIT = 0xDB3 // 3507 + SYS_EVENTFD = 0xDB4 // 3508 + SYS_STATFS = 0xDB5 // 3509 + SYS___STATFS_A = 0xDB6 // 3510 + SYS_FSTATFS = 0xDB7 // 3511 + SYS_INOTIFY_INIT = 0xDB8 // 3512 + SYS_INOTIFY_INIT1 = 0xDB9 // 3513 + SYS_INOTIFY_ADD_WATCH = 0xDBA // 3514 + SYS___INOTIFY_ADD_WATCH_A = 0xDBB // 3515 + SYS_INOTIFY_RM_WATCH = 0xDBC // 3516 + SYS_PIPE2 = 0xDBD // 3517 + SYS_PIVOT_ROOT = 0xDBE // 3518 + SYS___PIVOT_ROOT_A = 0xDBF // 3519 + SYS_PRCTL = 0xDC0 // 3520 + SYS_PRLIMIT = 0xDC1 // 3521 + SYS_SETHOSTNAME = 0xDC2 // 3522 + SYS___SETHOSTNAME_A = 0xDC3 // 3523 + SYS_SETRESUID = 0xDC4 // 3524 + SYS_SETRESGID = 0xDC5 // 3525 + SYS_PTHREAD_CONDATTR_GETCLOCK = 0xDC6 // 3526 + SYS_FLOCK = 0xDC7 // 3527 + SYS_FGETXATTR = 0xDC8 // 3528 + SYS___FGETXATTR_A = 0xDC9 // 3529 + SYS_FLISTXATTR = 0xDCA // 3530 + SYS___FLISTXATTR_A = 0xDCB // 3531 + SYS_FREMOVEXATTR = 0xDCC // 3532 + SYS___FREMOVEXATTR_A = 0xDCD // 3533 + SYS_FSETXATTR = 0xDCE // 3534 + SYS___FSETXATTR_A = 0xDCF // 3535 + SYS_GETXATTR = 0xDD0 // 3536 + SYS___GETXATTR_A = 0xDD1 // 3537 + SYS_LGETXATTR = 0xDD2 // 3538 + SYS___LGETXATTR_A = 0xDD3 // 3539 + SYS_LISTXATTR = 0xDD4 // 3540 + SYS___LISTXATTR_A = 0xDD5 // 3541 + SYS_LLISTXATTR = 0xDD6 // 3542 + SYS___LLISTXATTR_A = 0xDD7 // 3543 + SYS_LREMOVEXATTR = 0xDD8 // 3544 + SYS___LREMOVEXATTR_A = 0xDD9 // 3545 + SYS_LSETXATTR = 0xDDA // 3546 + SYS___LSETXATTR_A = 0xDDB // 3547 + SYS_REMOVEXATTR = 0xDDC // 3548 + SYS___REMOVEXATTR_A = 0xDDD // 3549 + SYS_SETXATTR = 0xDDE // 3550 + SYS___SETXATTR_A = 0xDDF // 3551 + SYS_FDATASYNC = 0xDE0 // 3552 + SYS_SYNCFS = 0xDE1 // 3553 + SYS_FUTIMES = 0xDE2 // 3554 + SYS_FUTIMESAT = 0xDE3 // 3555 + SYS___FUTIMESAT_A = 0xDE4 // 3556 + SYS_LUTIMES = 0xDE5 // 3557 + SYS___LUTIMES_A = 0xDE6 // 3558 + SYS_INET_ATON = 0xDE7 // 3559 + SYS_GETRANDOM = 0xDE8 // 3560 + SYS_GETTID = 0xDE9 // 3561 + SYS_MEMFD_CREATE = 0xDEA // 3562 + SYS___MEMFD_CREATE_A = 0xDEB // 3563 + SYS_FACCESSAT = 0xDEC // 3564 + SYS___FACCESSAT_A = 0xDED // 3565 + SYS_FCHMODAT = 0xDEE // 3566 + SYS___FCHMODAT_A = 0xDEF // 3567 + SYS_FCHOWNAT = 0xDF0 // 3568 + SYS___FCHOWNAT_A = 0xDF1 // 3569 + SYS_FSTATAT = 0xDF2 // 3570 + SYS___FSTATAT_A = 0xDF3 // 3571 + SYS_LINKAT = 0xDF4 // 3572 + SYS___LINKAT_A = 0xDF5 // 3573 + SYS_MKDIRAT = 0xDF6 // 3574 + SYS___MKDIRAT_A = 0xDF7 // 3575 + SYS_MKFIFOAT = 0xDF8 // 3576 + SYS___MKFIFOAT_A = 0xDF9 // 3577 + SYS_MKNODAT = 0xDFA // 3578 + SYS___MKNODAT_A = 0xDFB // 3579 + SYS_OPENAT = 0xDFC // 3580 + SYS___OPENAT_A = 0xDFD // 3581 + SYS_READLINKAT = 0xDFE // 3582 + SYS___READLINKAT_A = 0xDFF // 3583 + SYS_RENAMEAT = 0xE00 // 3584 + SYS___RENAMEAT_A = 0xE01 // 3585 + SYS_RENAMEAT2 = 0xE02 // 3586 + SYS___RENAMEAT2_A = 0xE03 // 3587 + SYS_SYMLINKAT = 0xE04 // 3588 + SYS___SYMLINKAT_A = 0xE05 // 3589 + SYS_UNLINKAT = 0xE06 // 3590 + SYS___UNLINKAT_A = 0xE07 // 3591 + SYS_SYSINFO = 0xE08 // 3592 + SYS_WAIT4 = 0xE0A // 3594 + SYS_CLONE = 0xE0B // 3595 + SYS_UNSHARE = 0xE0C // 3596 + SYS_SETNS = 0xE0D // 3597 + SYS_CAPGET = 0xE0E // 3598 + SYS_CAPSET = 0xE0F // 3599 + SYS_STRCHRNUL = 0xE10 // 3600 + SYS_PTHREAD_CONDATTR_SETCLOCK = 0xE12 // 3602 + SYS_OPEN_BY_HANDLE_AT = 0xE13 // 3603 + SYS___OPEN_BY_HANDLE_AT_A = 0xE14 // 3604 + SYS___INET_ATON_A = 0xE15 // 3605 + SYS_MOUNT1 = 0xE16 // 3606 + SYS___MOUNT1_A = 0xE17 // 3607 + SYS_UMOUNT1 = 0xE18 // 3608 + SYS___UMOUNT1_A = 0xE19 // 3609 + SYS_UMOUNT2 = 0xE1A // 3610 + SYS___UMOUNT2_A = 0xE1B // 3611 + SYS___PRCTL_A = 0xE1C // 3612 + SYS_LOCALTIME_R2 = 0xE1D // 3613 + SYS___LOCALTIME_R2_A = 0xE1E // 3614 + SYS_OPENAT2 = 0xE1F // 3615 + SYS___OPENAT2_A = 0xE20 // 3616 + SYS___LE_CEEMICT = 0xE21 // 3617 + SYS_GETENTROPY = 0xE22 // 3618 + SYS_NANOSLEEP = 0xE23 // 3619 + SYS_UTIMENSAT = 0xE24 // 3620 + SYS___UTIMENSAT_A = 0xE25 // 3621 + SYS_ASPRINTF = 0xE26 // 3622 + SYS___ASPRINTF_A = 0xE27 // 3623 + SYS_VASPRINTF = 0xE28 // 3624 + SYS___VASPRINTF_A = 0xE29 // 3625 + SYS_DPRINTF = 0xE2A // 3626 + SYS___DPRINTF_A = 0xE2B // 3627 + SYS_GETOPT_LONG = 0xE2C // 3628 + SYS___GETOPT_LONG_A = 0xE2D // 3629 + SYS_PSIGNAL = 0xE2E // 3630 + SYS___PSIGNAL_A = 0xE2F // 3631 + SYS_PSIGNAL_UNLOCKED = 0xE30 // 3632 + SYS___PSIGNAL_UNLOCKED_A = 0xE31 // 3633 + SYS_FSTATAT_O = 0xE32 // 3634 + SYS___FSTATAT_O_A = 0xE33 // 3635 + SYS_FSTATAT64 = 0xE34 // 3636 + SYS___FSTATAT64_A = 0xE35 // 3637 + SYS___CHATTRAT = 0xE36 // 3638 + SYS_____CHATTRAT_A = 0xE37 // 3639 + SYS___CHATTRAT64 = 0xE38 // 3640 + SYS_____CHATTRAT64_A = 0xE39 // 3641 + SYS_MADVISE = 0xE3A // 3642 + SYS___AUTHENTICATE = 0xE3B // 3643 + ) diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux.go index eff6bcdef81..4740b834854 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -1178,7 +1178,8 @@ const ( PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 0x10 PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT = 0x11 PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT = 0x12 - PERF_SAMPLE_BRANCH_MAX_SHIFT = 0x13 + PERF_SAMPLE_BRANCH_COUNTERS = 0x80000 + PERF_SAMPLE_BRANCH_MAX_SHIFT = 0x14 PERF_SAMPLE_BRANCH_USER = 0x1 PERF_SAMPLE_BRANCH_KERNEL = 0x2 PERF_SAMPLE_BRANCH_HV = 0x4 @@ -1198,7 +1199,7 @@ const ( PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 PERF_SAMPLE_BRANCH_HW_INDEX = 0x20000 PERF_SAMPLE_BRANCH_PRIV_SAVE = 0x40000 - PERF_SAMPLE_BRANCH_MAX = 0x80000 + PERF_SAMPLE_BRANCH_MAX = 0x100000 PERF_BR_UNKNOWN = 0x0 PERF_BR_COND = 0x1 PERF_BR_UNCOND = 0x2 @@ -2481,6 +2482,15 @@ type XDPMmapOffsets struct { Cr XDPRingOffset } +type XDPUmemReg struct { + Addr uint64 + Len uint64 + Chunk_size uint32 + Headroom uint32 + Flags uint32 + Tx_metadata_len uint32 +} + type XDPStatistics struct { Rx_dropped uint64 Rx_invalid_descs uint64 @@ -2935,7 +2945,7 @@ const ( BPF_TCP_LISTEN = 0xa BPF_TCP_CLOSING = 0xb BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd + BPF_TCP_MAX_STATES = 0xe TCP_BPF_IW = 0x3e9 TCP_BPF_SNDCWND_CLAMP = 0x3ea TCP_BPF_DELACK_MAX = 0x3eb @@ -3211,7 +3221,7 @@ const ( DEVLINK_CMD_LINECARD_NEW = 0x50 DEVLINK_CMD_LINECARD_DEL = 0x51 DEVLINK_CMD_SELFTESTS_GET = 0x52 - DEVLINK_CMD_MAX = 0x53 + DEVLINK_CMD_MAX = 0x54 DEVLINK_PORT_TYPE_NOTSET = 0x0 DEVLINK_PORT_TYPE_AUTO = 0x1 DEVLINK_PORT_TYPE_ETH = 0x2 @@ -4595,7 +4605,7 @@ const ( NL80211_ATTR_MAC_HINT = 0xc8 NL80211_ATTR_MAC_MASK = 0xd7 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca - NL80211_ATTR_MAX = 0x146 + NL80211_ATTR_MAX = 0x14a NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce NL80211_ATTR_MAX_MATCH_SETS = 0x85 @@ -4861,7 +4871,7 @@ const ( NL80211_BSS_FREQUENCY_OFFSET = 0x14 NL80211_BSS_INFORMATION_ELEMENTS = 0x6 NL80211_BSS_LAST_SEEN_BOOTTIME = 0xf - NL80211_BSS_MAX = 0x16 + NL80211_BSS_MAX = 0x18 NL80211_BSS_MLD_ADDR = 0x16 NL80211_BSS_MLO_LINK_ID = 0x15 NL80211_BSS_PAD = 0x10 @@ -4965,7 +4975,7 @@ const ( NL80211_CMD_LEAVE_IBSS = 0x2c NL80211_CMD_LEAVE_MESH = 0x45 NL80211_CMD_LEAVE_OCB = 0x6d - NL80211_CMD_MAX = 0x9a + NL80211_CMD_MAX = 0x9b NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29 NL80211_CMD_MODIFY_LINK_STA = 0x97 NL80211_CMD_NAN_MATCH = 0x78 @@ -5199,7 +5209,7 @@ const ( NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf - NL80211_FREQUENCY_ATTR_MAX = 0x1c + NL80211_FREQUENCY_ATTR_MAX = 0x20 NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc @@ -5693,7 +5703,7 @@ const ( NL80211_STA_FLAG_ASSOCIATED = 0x7 NL80211_STA_FLAG_AUTHENTICATED = 0x5 NL80211_STA_FLAG_AUTHORIZED = 0x1 - NL80211_STA_FLAG_MAX = 0x7 + NL80211_STA_FLAG_MAX = 0x8 NL80211_STA_FLAG_MAX_OLD_API = 0x6 NL80211_STA_FLAG_MFP = 0x4 NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2 @@ -5991,3 +6001,34 @@ type CachestatRange struct { Off uint64 Len uint64 } + +const ( + SK_MEMINFO_RMEM_ALLOC = 0x0 + SK_MEMINFO_RCVBUF = 0x1 + SK_MEMINFO_WMEM_ALLOC = 0x2 + SK_MEMINFO_SNDBUF = 0x3 + SK_MEMINFO_FWD_ALLOC = 0x4 + SK_MEMINFO_WMEM_QUEUED = 0x5 + SK_MEMINFO_OPTMEM = 0x6 + SK_MEMINFO_BACKLOG = 0x7 + SK_MEMINFO_DROPS = 0x8 + SK_MEMINFO_VARS = 0x9 + SKNLGRP_NONE = 0x0 + SKNLGRP_INET_TCP_DESTROY = 0x1 + SKNLGRP_INET_UDP_DESTROY = 0x2 + SKNLGRP_INET6_TCP_DESTROY = 0x3 + SKNLGRP_INET6_UDP_DESTROY = 0x4 + SK_DIAG_BPF_STORAGE_REQ_NONE = 0x0 + SK_DIAG_BPF_STORAGE_REQ_MAP_FD = 0x1 + SK_DIAG_BPF_STORAGE_REP_NONE = 0x0 + SK_DIAG_BPF_STORAGE = 0x1 + SK_DIAG_BPF_STORAGE_NONE = 0x0 + SK_DIAG_BPF_STORAGE_PAD = 0x1 + SK_DIAG_BPF_STORAGE_MAP_ID = 0x2 + SK_DIAG_BPF_STORAGE_MAP_VALUE = 0x3 +) + +type SockDiagReq struct { + Family uint8 + Protocol uint8 +} diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 438a30affad..fd402da43fc 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -477,14 +477,6 @@ const ( BLKPG = 0x1269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 -} - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index adceca3553b..eb7a5e1864a 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -492,15 +492,6 @@ const ( BLKPG = 0x1269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index eeaa00a37d6..d78ac108b6c 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -470,15 +470,6 @@ const ( BLKPG = 0x1269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index 6739aa91d4e..cd06d47f1f7 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -471,15 +471,6 @@ const ( BLKPG = 0x1269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go index 9920ef6317d..2f28fe26c1a 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go @@ -472,15 +472,6 @@ const ( BLKPG = 0x1269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index 2923b799a48..71d6cac2f1a 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -476,15 +476,6 @@ const ( BLKPG = 0x20001269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index ce2750ee415..8596d453563 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -474,15 +474,6 @@ const ( BLKPG = 0x20001269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 3038811d70b..cd60ea18662 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -474,15 +474,6 @@ const ( BLKPG = 0x20001269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index efc6fed18c1..b0ae420c489 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -476,15 +476,6 @@ const ( BLKPG = 0x20001269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go index 9a654b75a90..8359728759b 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go @@ -482,15 +482,6 @@ const ( BLKPG = 0x20001269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 40d358e33e3..69eb6a5c689 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -481,15 +481,6 @@ const ( BLKPG = 0x20001269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index 148c6ceb869..5f583cb62bf 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -481,15 +481,6 @@ const ( BLKPG = 0x20001269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 72ba81543ef..15adc04142f 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -499,15 +499,6 @@ const ( BLKPG = 0x1269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index 71e765508e2..cf3ce900377 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -495,15 +495,6 @@ const ( BLKPG = 0x1269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go index 4abbdb9de93..590b56739c5 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go @@ -476,15 +476,6 @@ const ( BLKPG = 0x20001269 ) -type XDPUmemReg struct { - Addr uint64 - Len uint64 - Size uint32 - Headroom uint32 - Flags uint32 - _ [4]byte -} - type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 diff --git a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go index 54f31be6373..d9a13af4684 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go +++ b/pkg/k8s/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go @@ -25,10 +25,13 @@ const ( SizeofIPv6Mreq = 20 SizeofICMPv6Filter = 32 SizeofIPv6MTUInfo = 32 + SizeofInet4Pktinfo = 8 + SizeofInet6Pktinfo = 20 SizeofLinger = 8 SizeofSockaddrInet4 = 16 SizeofSockaddrInet6 = 28 SizeofTCPInfo = 0x68 + SizeofUcred = 12 ) type ( @@ -69,12 +72,17 @@ type Utimbuf struct { } type Utsname struct { - Sysname [65]byte - Nodename [65]byte - Release [65]byte - Version [65]byte - Machine [65]byte - Domainname [65]byte + Sysname [16]byte + Nodename [32]byte + Release [8]byte + Version [8]byte + Machine [16]byte +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 } type RawSockaddrInet4 struct { @@ -325,7 +333,7 @@ type Statvfs_t struct { } type Statfs_t struct { - Type uint32 + Type uint64 Bsize uint64 Blocks uint64 Bfree uint64 @@ -336,6 +344,7 @@ type Statfs_t struct { Namelen uint64 Frsize uint64 Flags uint64 + _ [4]uint64 } type direntLE struct { @@ -412,3 +421,126 @@ type W_Mntent struct { Quiesceowner [8]byte _ [38]byte } + +type EpollEvent struct { + Events uint32 + _ int32 + Fd int32 + Pad int32 +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name string +} + +const ( + SizeofInotifyEvent = 0x10 +) + +type ConsMsg2 struct { + Cm2Format uint16 + Cm2R1 uint16 + Cm2Msglength uint32 + Cm2Msg *byte + Cm2R2 [4]byte + Cm2R3 [4]byte + Cm2Routcde *uint32 + Cm2Descr *uint32 + Cm2Msgflag uint32 + Cm2Token uint32 + Cm2Msgid *uint32 + Cm2R4 [4]byte + Cm2DomToken uint32 + Cm2DomMsgid *uint32 + Cm2ModCartptr *byte + Cm2ModConsidptr *byte + Cm2MsgCart [8]byte + Cm2MsgConsid [4]byte + Cm2R5 [12]byte +} + +const ( + CC_modify = 1 + CC_stop = 2 + CONSOLE_FORMAT_2 = 2 + CONSOLE_FORMAT_3 = 3 + CONSOLE_HRDCPY = 0x80000000 +) + +type OpenHow struct { + Flags uint64 + Mode uint64 + Resolve uint64 +} + +const SizeofOpenHow = 0x18 + +const ( + RESOLVE_CACHED = 0x20 + RESOLVE_BENEATH = 0x8 + RESOLVE_IN_ROOT = 0x10 + RESOLVE_NO_MAGICLINKS = 0x2 + RESOLVE_NO_SYMLINKS = 0x4 + RESOLVE_NO_XDEV = 0x1 +) + +type Siginfo struct { + Signo int32 + Errno int32 + Code int32 + Pid int32 + Uid uint32 + _ [44]byte +} + +type SysvIpcPerm struct { + Uid uint32 + Gid uint32 + Cuid uint32 + Cgid uint32 + Mode int32 +} + +type SysvShmDesc struct { + Perm SysvIpcPerm + _ [4]byte + Lpid int32 + Cpid int32 + Nattch uint32 + _ [4]byte + _ [4]byte + _ [4]byte + _ int32 + _ uint8 + _ uint8 + _ uint16 + _ *byte + Segsz uint64 + Atime Time_t + Dtime Time_t + Ctime Time_t +} + +type SysvShmDesc64 struct { + Perm SysvIpcPerm + _ [4]byte + Lpid int32 + Cpid int32 + Nattch uint32 + _ [4]byte + _ [4]byte + _ [4]byte + _ int32 + _ byte + _ uint8 + _ uint16 + _ *byte + Segsz uint64 + Atime int64 + Dtime int64 + Ctime int64 +} diff --git a/pkg/k8s/vendor/golang.org/x/sys/windows/aliases.go b/pkg/k8s/vendor/golang.org/x/sys/windows/aliases.go index ce2d713d62e..16f90560a23 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/windows/aliases.go +++ b/pkg/k8s/vendor/golang.org/x/sys/windows/aliases.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build windows && go1.9 +//go:build windows package windows diff --git a/pkg/k8s/vendor/golang.org/x/sys/windows/empty.s b/pkg/k8s/vendor/golang.org/x/sys/windows/empty.s deleted file mode 100644 index ba64caca5d3..00000000000 --- a/pkg/k8s/vendor/golang.org/x/sys/windows/empty.s +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2019 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. - -//go:build !go1.12 - -// This file is here to allow bodyless functions with go:linkname for Go 1.11 -// and earlier (see https://golang.org/issue/23311). diff --git a/pkg/k8s/vendor/golang.org/x/sys/windows/security_windows.go b/pkg/k8s/vendor/golang.org/x/sys/windows/security_windows.go index 26be94a8a7b..6f7d2ac70a9 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/windows/security_windows.go +++ b/pkg/k8s/vendor/golang.org/x/sys/windows/security_windows.go @@ -68,6 +68,7 @@ type UserInfo10 struct { //sys NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) = netapi32.NetUserGetInfo //sys NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) = netapi32.NetGetJoinInformation //sys NetApiBufferFree(buf *byte) (neterr error) = netapi32.NetApiBufferFree +//sys NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) = netapi32.NetUserEnum const ( // do not reorder diff --git a/pkg/k8s/vendor/golang.org/x/sys/windows/syscall_windows.go b/pkg/k8s/vendor/golang.org/x/sys/windows/syscall_windows.go index 6395a031d45..6525c62f3c2 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/pkg/k8s/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -165,6 +165,7 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW //sys CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) [failretval==InvalidHandle] = CreateNamedPipeW //sys ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) +//sys DisconnectNamedPipe(pipe Handle) (err error) //sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) //sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW //sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState @@ -348,8 +349,19 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys SetProcessPriorityBoost(process Handle, disable bool) (err error) = kernel32.SetProcessPriorityBoost //sys GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) //sys SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) +//sys ClearCommBreak(handle Handle) (err error) +//sys ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error) +//sys EscapeCommFunction(handle Handle, dwFunc uint32) (err error) +//sys GetCommState(handle Handle, lpDCB *DCB) (err error) +//sys GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) //sys GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) +//sys PurgeComm(handle Handle, dwFlags uint32) (err error) +//sys SetCommBreak(handle Handle) (err error) +//sys SetCommMask(handle Handle, dwEvtMask uint32) (err error) +//sys SetCommState(handle Handle, lpDCB *DCB) (err error) //sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) +//sys SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) +//sys WaitCommEvent(handle Handle, lpEvtMask *uint32, lpOverlapped *Overlapped) (err error) //sys GetActiveProcessorCount(groupNumber uint16) (ret uint32) //sys GetMaximumProcessorCount(groupNumber uint16) (ret uint32) //sys EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) = user32.EnumWindows @@ -1834,3 +1846,73 @@ func ResizePseudoConsole(pconsole Handle, size Coord) error { // accept arguments that can be casted to uintptr, and Coord can't. return resizePseudoConsole(pconsole, *((*uint32)(unsafe.Pointer(&size)))) } + +// DCB constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-dcb. +const ( + CBR_110 = 110 + CBR_300 = 300 + CBR_600 = 600 + CBR_1200 = 1200 + CBR_2400 = 2400 + CBR_4800 = 4800 + CBR_9600 = 9600 + CBR_14400 = 14400 + CBR_19200 = 19200 + CBR_38400 = 38400 + CBR_57600 = 57600 + CBR_115200 = 115200 + CBR_128000 = 128000 + CBR_256000 = 256000 + + DTR_CONTROL_DISABLE = 0x00000000 + DTR_CONTROL_ENABLE = 0x00000010 + DTR_CONTROL_HANDSHAKE = 0x00000020 + + RTS_CONTROL_DISABLE = 0x00000000 + RTS_CONTROL_ENABLE = 0x00001000 + RTS_CONTROL_HANDSHAKE = 0x00002000 + RTS_CONTROL_TOGGLE = 0x00003000 + + NOPARITY = 0 + ODDPARITY = 1 + EVENPARITY = 2 + MARKPARITY = 3 + SPACEPARITY = 4 + + ONESTOPBIT = 0 + ONE5STOPBITS = 1 + TWOSTOPBITS = 2 +) + +// EscapeCommFunction constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-escapecommfunction. +const ( + SETXOFF = 1 + SETXON = 2 + SETRTS = 3 + CLRRTS = 4 + SETDTR = 5 + CLRDTR = 6 + SETBREAK = 8 + CLRBREAK = 9 +) + +// PurgeComm constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-purgecomm. +const ( + PURGE_TXABORT = 0x0001 + PURGE_RXABORT = 0x0002 + PURGE_TXCLEAR = 0x0004 + PURGE_RXCLEAR = 0x0008 +) + +// SetCommMask constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setcommmask. +const ( + EV_RXCHAR = 0x0001 + EV_RXFLAG = 0x0002 + EV_TXEMPTY = 0x0004 + EV_CTS = 0x0008 + EV_DSR = 0x0010 + EV_RLSD = 0x0020 + EV_BREAK = 0x0040 + EV_ERR = 0x0080 + EV_RING = 0x0100 +) diff --git a/pkg/k8s/vendor/golang.org/x/sys/windows/types_windows.go b/pkg/k8s/vendor/golang.org/x/sys/windows/types_windows.go index 359780f6ace..d8cb71db0a6 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/windows/types_windows.go +++ b/pkg/k8s/vendor/golang.org/x/sys/windows/types_windows.go @@ -3380,3 +3380,27 @@ type BLOB struct { Size uint32 BlobData *byte } + +type ComStat struct { + Flags uint32 + CBInQue uint32 + CBOutQue uint32 +} + +type DCB struct { + DCBlength uint32 + BaudRate uint32 + Flags uint32 + wReserved uint16 + XonLim uint16 + XoffLim uint16 + ByteSize uint8 + Parity uint8 + StopBits uint8 + XonChar byte + XoffChar byte + ErrorChar byte + EofChar byte + EvtChar byte + wReserved1 uint16 +} diff --git a/pkg/k8s/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/pkg/k8s/vendor/golang.org/x/sys/windows/zsyscall_windows.go index e8791c82c30..9f73df75b5f 100644 --- a/pkg/k8s/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/pkg/k8s/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -188,6 +188,8 @@ var ( procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject") procCancelIo = modkernel32.NewProc("CancelIo") procCancelIoEx = modkernel32.NewProc("CancelIoEx") + procClearCommBreak = modkernel32.NewProc("ClearCommBreak") + procClearCommError = modkernel32.NewProc("ClearCommError") procCloseHandle = modkernel32.NewProc("CloseHandle") procClosePseudoConsole = modkernel32.NewProc("ClosePseudoConsole") procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe") @@ -212,7 +214,9 @@ var ( procDeleteProcThreadAttributeList = modkernel32.NewProc("DeleteProcThreadAttributeList") procDeleteVolumeMountPointW = modkernel32.NewProc("DeleteVolumeMountPointW") procDeviceIoControl = modkernel32.NewProc("DeviceIoControl") + procDisconnectNamedPipe = modkernel32.NewProc("DisconnectNamedPipe") procDuplicateHandle = modkernel32.NewProc("DuplicateHandle") + procEscapeCommFunction = modkernel32.NewProc("EscapeCommFunction") procExitProcess = modkernel32.NewProc("ExitProcess") procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW") procFindClose = modkernel32.NewProc("FindClose") @@ -236,6 +240,8 @@ var ( procGenerateConsoleCtrlEvent = modkernel32.NewProc("GenerateConsoleCtrlEvent") procGetACP = modkernel32.NewProc("GetACP") procGetActiveProcessorCount = modkernel32.NewProc("GetActiveProcessorCount") + procGetCommModemStatus = modkernel32.NewProc("GetCommModemStatus") + procGetCommState = modkernel32.NewProc("GetCommState") procGetCommTimeouts = modkernel32.NewProc("GetCommTimeouts") procGetCommandLineW = modkernel32.NewProc("GetCommandLineW") procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW") @@ -322,6 +328,7 @@ var ( procProcess32NextW = modkernel32.NewProc("Process32NextW") procProcessIdToSessionId = modkernel32.NewProc("ProcessIdToSessionId") procPulseEvent = modkernel32.NewProc("PulseEvent") + procPurgeComm = modkernel32.NewProc("PurgeComm") procQueryDosDeviceW = modkernel32.NewProc("QueryDosDeviceW") procQueryFullProcessImageNameW = modkernel32.NewProc("QueryFullProcessImageNameW") procQueryInformationJobObject = modkernel32.NewProc("QueryInformationJobObject") @@ -335,6 +342,9 @@ var ( procResetEvent = modkernel32.NewProc("ResetEvent") procResizePseudoConsole = modkernel32.NewProc("ResizePseudoConsole") procResumeThread = modkernel32.NewProc("ResumeThread") + procSetCommBreak = modkernel32.NewProc("SetCommBreak") + procSetCommMask = modkernel32.NewProc("SetCommMask") + procSetCommState = modkernel32.NewProc("SetCommState") procSetCommTimeouts = modkernel32.NewProc("SetCommTimeouts") procSetConsoleCursorPosition = modkernel32.NewProc("SetConsoleCursorPosition") procSetConsoleMode = modkernel32.NewProc("SetConsoleMode") @@ -342,7 +352,6 @@ var ( procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories") procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW") procSetEndOfFile = modkernel32.NewProc("SetEndOfFile") - procSetFileValidData = modkernel32.NewProc("SetFileValidData") procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW") procSetErrorMode = modkernel32.NewProc("SetErrorMode") procSetEvent = modkernel32.NewProc("SetEvent") @@ -351,6 +360,7 @@ var ( procSetFileInformationByHandle = modkernel32.NewProc("SetFileInformationByHandle") procSetFilePointer = modkernel32.NewProc("SetFilePointer") procSetFileTime = modkernel32.NewProc("SetFileTime") + procSetFileValidData = modkernel32.NewProc("SetFileValidData") procSetHandleInformation = modkernel32.NewProc("SetHandleInformation") procSetInformationJobObject = modkernel32.NewProc("SetInformationJobObject") procSetNamedPipeHandleState = modkernel32.NewProc("SetNamedPipeHandleState") @@ -361,6 +371,7 @@ var ( procSetStdHandle = modkernel32.NewProc("SetStdHandle") procSetVolumeLabelW = modkernel32.NewProc("SetVolumeLabelW") procSetVolumeMountPointW = modkernel32.NewProc("SetVolumeMountPointW") + procSetupComm = modkernel32.NewProc("SetupComm") procSizeofResource = modkernel32.NewProc("SizeofResource") procSleepEx = modkernel32.NewProc("SleepEx") procTerminateJobObject = modkernel32.NewProc("TerminateJobObject") @@ -379,6 +390,7 @@ var ( procVirtualQueryEx = modkernel32.NewProc("VirtualQueryEx") procVirtualUnlock = modkernel32.NewProc("VirtualUnlock") procWTSGetActiveConsoleSessionId = modkernel32.NewProc("WTSGetActiveConsoleSessionId") + procWaitCommEvent = modkernel32.NewProc("WaitCommEvent") procWaitForMultipleObjects = modkernel32.NewProc("WaitForMultipleObjects") procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject") procWriteConsoleW = modkernel32.NewProc("WriteConsoleW") @@ -389,6 +401,7 @@ var ( procTransmitFile = modmswsock.NewProc("TransmitFile") procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree") procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation") + procNetUserEnum = modnetapi32.NewProc("NetUserEnum") procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo") procNtCreateFile = modntdll.NewProc("NtCreateFile") procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile") @@ -1641,6 +1654,22 @@ func CancelIoEx(s Handle, o *Overlapped) (err error) { return } +func ClearCommBreak(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procClearCommBreak.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + +func ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error) { + r1, _, e1 := syscall.Syscall(procClearCommError.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(lpErrors)), uintptr(unsafe.Pointer(lpStat))) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func CloseHandle(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { @@ -1845,6 +1874,14 @@ func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBuff return } +func DisconnectNamedPipe(pipe Handle) (err error) { + r1, _, e1 := syscall.Syscall(procDisconnectNamedPipe.Addr(), 1, uintptr(pipe), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) { var _p0 uint32 if bInheritHandle { @@ -1857,6 +1894,14 @@ func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetP return } +func EscapeCommFunction(handle Handle, dwFunc uint32) (err error) { + r1, _, e1 := syscall.Syscall(procEscapeCommFunction.Addr(), 2, uintptr(handle), uintptr(dwFunc), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func ExitProcess(exitcode uint32) { syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0) return @@ -2058,6 +2103,22 @@ func GetActiveProcessorCount(groupNumber uint16) (ret uint32) { return } +func GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetCommModemStatus.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpModemStat)), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + +func GetCommState(handle Handle, lpDCB *DCB) (err error) { + r1, _, e1 := syscall.Syscall(procGetCommState.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpDCB)), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { r1, _, e1 := syscall.Syscall(procGetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0) if r1 == 0 { @@ -2810,6 +2871,14 @@ func PulseEvent(event Handle) (err error) { return } +func PurgeComm(handle Handle, dwFlags uint32) (err error) { + r1, _, e1 := syscall.Syscall(procPurgeComm.Addr(), 2, uintptr(handle), uintptr(dwFlags), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) { r0, _, e1 := syscall.Syscall(procQueryDosDeviceW.Addr(), 3, uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max)) n = uint32(r0) @@ -2924,6 +2993,30 @@ func ResumeThread(thread Handle) (ret uint32, err error) { return } +func SetCommBreak(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procSetCommBreak.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + +func SetCommMask(handle Handle, dwEvtMask uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetCommMask.Addr(), 2, uintptr(handle), uintptr(dwEvtMask), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + +func SetCommState(handle Handle, lpDCB *DCB) (err error) { + r1, _, e1 := syscall.Syscall(procSetCommState.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpDCB)), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { r1, _, e1 := syscall.Syscall(procSetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0) if r1 == 0 { @@ -2989,14 +3082,6 @@ func SetEndOfFile(handle Handle) (err error) { return } -func SetFileValidData(handle Handle, validDataLength int64) (err error) { - r1, _, e1 := syscall.Syscall(procSetFileValidData.Addr(), 2, uintptr(handle), uintptr(validDataLength), 0) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - func SetEnvironmentVariable(name *uint16, value *uint16) (err error) { r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0) if r1 == 0 { @@ -3060,6 +3145,14 @@ func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetim return } +func SetFileValidData(handle Handle, validDataLength int64) (err error) { + r1, _, e1 := syscall.Syscall(procSetFileValidData.Addr(), 2, uintptr(handle), uintptr(validDataLength), 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags)) if r1 == 0 { @@ -3145,6 +3238,14 @@ func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err erro return } +func SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetupComm.Addr(), 3, uintptr(handle), uintptr(dwInQueue), uintptr(dwOutQueue)) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func SizeofResource(module Handle, resInfo Handle) (size uint32, err error) { r0, _, e1 := syscall.Syscall(procSizeofResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0) size = uint32(r0) @@ -3291,6 +3392,14 @@ func WTSGetActiveConsoleSessionId() (sessionID uint32) { return } +func WaitCommEvent(handle Handle, lpEvtMask *uint32, lpOverlapped *Overlapped) (err error) { + r1, _, e1 := syscall.Syscall(procWaitCommEvent.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(lpEvtMask)), uintptr(unsafe.Pointer(lpOverlapped))) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) { var _p0 uint32 if waitAll { @@ -3378,6 +3487,14 @@ func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (nete return } +func NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) { + r0, _, _ := syscall.Syscall9(procNetUserEnum.Addr(), 8, uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle)), 0) + if r0 != 0 { + neterr = syscall.Errno(r0) + } + return +} + func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) { r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0) if r0 != 0 { diff --git a/pkg/k8s/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/pkg/k8s/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go index 03543bd4bb8..137cc8df1d8 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go +++ b/pkg/k8s/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go @@ -47,7 +47,7 @@ import ( func Find(importPath, srcDir string) (filename, path string) { cmd := exec.Command("go", "list", "-json", "-export", "--", importPath) cmd.Dir = srcDir - out, err := cmd.CombinedOutput() + out, err := cmd.Output() if err != nil { return "", "" } diff --git a/pkg/k8s/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go b/pkg/k8s/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go index 333676b7cfc..c6e7c0d442f 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go +++ b/pkg/k8s/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go @@ -13,6 +13,7 @@ import ( "golang.org/x/tools/internal/gocommand" ) +// TODO(adonovan): move back into go/packages. func GetSizesForArgsGolist(ctx context.Context, inv gocommand.Invocation, gocmdRunner *gocommand.Runner) (string, string, error) { inv.Verb = "list" inv.Args = []string{"-f", "{{context.GOARCH}} {{context.Compiler}}", "--", "unsafe"} diff --git a/pkg/k8s/vendor/golang.org/x/tools/go/packages/doc.go b/pkg/k8s/vendor/golang.org/x/tools/go/packages/doc.go index b2a0b7c6a67..3531ac8f5fc 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/go/packages/doc.go +++ b/pkg/k8s/vendor/golang.org/x/tools/go/packages/doc.go @@ -15,22 +15,10 @@ Load passes most patterns directly to the underlying build tool. The default build tool is the go command. Its supported patterns are described at https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns. +Other build systems may be supported by providing a "driver"; +see [The driver protocol]. -Load may be used in Go projects that use alternative build systems, by -installing an appropriate "driver" program for the build system and -specifying its location in the GOPACKAGESDRIVER environment variable. -For example, -https://github.com/bazelbuild/rules_go/wiki/Editor-and-tool-integration -explains how to use the driver for Bazel. -The driver program is responsible for interpreting patterns in its -preferred notation and reporting information about the packages that -they identify. -(See driverRequest and driverResponse types for the JSON -schema used by the protocol. -Though the protocol is supported, these types are currently unexported; -see #64608 for a proposal to publish them.) - -Regardless of driver, all patterns with the prefix "query=", where query is a +All patterns with the prefix "query=", where query is a non-empty string of letters from [a-z], are reserved and may be interpreted as query operators. @@ -86,7 +74,29 @@ for details. Most tools should pass their command-line arguments (after any flags) uninterpreted to [Load], so that it can interpret them according to the conventions of the underlying build system. + See the Example function for typical usage. + +# The driver protocol + +[Load] may be used to load Go packages even in Go projects that use +alternative build systems, by installing an appropriate "driver" +program for the build system and specifying its location in the +GOPACKAGESDRIVER environment variable. +For example, +https://github.com/bazelbuild/rules_go/wiki/Editor-and-tool-integration +explains how to use the driver for Bazel. + +The driver program is responsible for interpreting patterns in its +preferred notation and reporting information about the packages that +those patterns identify. Drivers must also support the special "file=" +and "pattern=" patterns described above. + +The patterns are provided as positional command-line arguments. A +JSON-encoded [DriverRequest] message providing additional information +is written to the driver's standard input. The driver must write a +JSON-encoded [DriverResponse] message to its standard output. (This +message differs from the JSON schema produced by 'go list'.) */ package packages // import "golang.org/x/tools/go/packages" @@ -188,14 +198,6 @@ Instead, ssadump no longer requests the runtime package, but seeks it among the dependencies of the user-specified packages, and emits an error if it is not found. -Overlays: The Overlay field in the Config allows providing alternate contents -for Go source files, by providing a mapping from file path to contents. -go/packages will pull in new imports added in overlay files when go/packages -is run in LoadImports mode or greater. -Overlay support for the go list driver isn't complete yet: if the file doesn't -exist on disk, it will only be recognized in an overlay if it is a non-test file -and the package would be reported even without the overlay. - Questions & Tasks - Add GOARCH/GOOS? diff --git a/pkg/k8s/vendor/golang.org/x/tools/go/packages/external.go b/pkg/k8s/vendor/golang.org/x/tools/go/packages/external.go index 7db1d1293ab..c2b4b711b59 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/go/packages/external.go +++ b/pkg/k8s/vendor/golang.org/x/tools/go/packages/external.go @@ -2,12 +2,11 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// This file enables an external tool to intercept package requests. -// If the tool is present then its results are used in preference to -// the go list command. - package packages +// This file defines the protocol that enables an external "driver" +// tool to supply package metadata in place of 'go list'. + import ( "bytes" "encoding/json" @@ -17,31 +16,71 @@ import ( "strings" ) -// The Driver Protocol +// DriverRequest defines the schema of a request for package metadata +// from an external driver program. The JSON-encoded DriverRequest +// message is provided to the driver program's standard input. The +// query patterns are provided as command-line arguments. // -// The driver, given the inputs to a call to Load, returns metadata about the packages specified. -// This allows for different build systems to support go/packages by telling go/packages how the -// packages' source is organized. -// The driver is a binary, either specified by the GOPACKAGESDRIVER environment variable or in -// the path as gopackagesdriver. It's given the inputs to load in its argv. See the package -// documentation in doc.go for the full description of the patterns that need to be supported. -// A driver receives as a JSON-serialized driverRequest struct in standard input and will -// produce a JSON-serialized driverResponse (see definition in packages.go) in its standard output. - -// driverRequest is used to provide the portion of Load's Config that is needed by a driver. -type driverRequest struct { +// See the package documentation for an overview. +type DriverRequest struct { Mode LoadMode `json:"mode"` + // Env specifies the environment the underlying build system should be run in. Env []string `json:"env"` + // BuildFlags are flags that should be passed to the underlying build system. BuildFlags []string `json:"build_flags"` + // Tests specifies whether the patterns should also return test packages. Tests bool `json:"tests"` - // Overlay maps file paths (relative to the driver's working directory) to the byte contents - // of overlay files. + + // Overlay maps file paths (relative to the driver's working directory) + // to the contents of overlay files (see Config.Overlay). Overlay map[string][]byte `json:"overlay"` } +// DriverResponse defines the schema of a response from an external +// driver program, providing the results of a query for package +// metadata. The driver program must write a JSON-encoded +// DriverResponse message to its standard output. +// +// See the package documentation for an overview. +type DriverResponse struct { + // NotHandled is returned if the request can't be handled by the current + // driver. If an external driver returns a response with NotHandled, the + // rest of the DriverResponse is ignored, and go/packages will fallback + // to the next driver. If go/packages is extended in the future to support + // lists of multiple drivers, go/packages will fall back to the next driver. + NotHandled bool + + // Compiler and Arch are the arguments pass of types.SizesFor + // to get a types.Sizes to use when type checking. + Compiler string + Arch string + + // Roots is the set of package IDs that make up the root packages. + // We have to encode this separately because when we encode a single package + // we cannot know if it is one of the roots as that requires knowledge of the + // graph it is part of. + Roots []string `json:",omitempty"` + + // Packages is the full set of packages in the graph. + // The packages are not connected into a graph. + // The Imports if populated will be stubs that only have their ID set. + // Imports will be connected and then type and syntax information added in a + // later pass (see refine). + Packages []*Package + + // GoVersion is the minor version number used by the driver + // (e.g. the go command on the PATH) when selecting .go files. + // Zero means unknown. + GoVersion int +} + +// driver is the type for functions that query the build system for the +// packages named by the patterns. +type driver func(cfg *Config, patterns ...string) (*DriverResponse, error) + // findExternalDriver returns the file path of a tool that supplies // the build system package structure, or "" if not found." // If GOPACKAGESDRIVER is set in the environment findExternalTool returns its @@ -64,8 +103,8 @@ func findExternalDriver(cfg *Config) driver { return nil } } - return func(cfg *Config, words ...string) (*driverResponse, error) { - req, err := json.Marshal(driverRequest{ + return func(cfg *Config, words ...string) (*DriverResponse, error) { + req, err := json.Marshal(DriverRequest{ Mode: cfg.Mode, Env: cfg.Env, BuildFlags: cfg.BuildFlags, @@ -80,7 +119,19 @@ func findExternalDriver(cfg *Config) driver { stderr := new(bytes.Buffer) cmd := exec.CommandContext(cfg.Context, tool, words...) cmd.Dir = cfg.Dir - cmd.Env = cfg.Env + // The cwd gets resolved to the real path. On Darwin, where + // /tmp is a symlink, this breaks anything that expects the + // working directory to keep the original path, including the + // go command when dealing with modules. + // + // os.Getwd stdlib has a special feature where if the + // cwd and the PWD are the same node then it trusts + // the PWD, so by setting it in the env for the child + // process we fix up all the paths returned by the go + // command. + // + // (See similar trick in Invocation.run in ../../internal/gocommand/invoke.go) + cmd.Env = append(slicesClip(cfg.Env), "PWD="+cfg.Dir) cmd.Stdin = bytes.NewReader(req) cmd.Stdout = buf cmd.Stderr = stderr @@ -92,10 +143,14 @@ func findExternalDriver(cfg *Config) driver { fmt.Fprintf(os.Stderr, "%s stderr: <<%s>>\n", cmdDebugStr(cmd), stderr) } - var response driverResponse + var response DriverResponse if err := json.Unmarshal(buf.Bytes(), &response); err != nil { return nil, err } return &response, nil } } + +// slicesClip removes unused capacity from the slice, returning s[:len(s):len(s)]. +// TODO(adonovan): use go1.21 slices.Clip. +func slicesClip[S ~[]E, E any](s S) S { return s[:len(s):len(s)] } diff --git a/pkg/k8s/vendor/golang.org/x/tools/go/packages/golist.go b/pkg/k8s/vendor/golang.org/x/tools/go/packages/golist.go index cd375fbc3c2..d9be410aa1a 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/go/packages/golist.go +++ b/pkg/k8s/vendor/golang.org/x/tools/go/packages/golist.go @@ -35,23 +35,23 @@ type goTooOldError struct { error } -// responseDeduper wraps a driverResponse, deduplicating its contents. +// responseDeduper wraps a DriverResponse, deduplicating its contents. type responseDeduper struct { seenRoots map[string]bool seenPackages map[string]*Package - dr *driverResponse + dr *DriverResponse } func newDeduper() *responseDeduper { return &responseDeduper{ - dr: &driverResponse{}, + dr: &DriverResponse{}, seenRoots: map[string]bool{}, seenPackages: map[string]*Package{}, } } -// addAll fills in r with a driverResponse. -func (r *responseDeduper) addAll(dr *driverResponse) { +// addAll fills in r with a DriverResponse. +func (r *responseDeduper) addAll(dr *DriverResponse) { for _, pkg := range dr.Packages { r.addPackage(pkg) } @@ -128,7 +128,7 @@ func (state *golistState) mustGetEnv() map[string]string { // goListDriver uses the go list command to interpret the patterns and produce // the build system package structure. // See driver for more details. -func goListDriver(cfg *Config, patterns ...string) (*driverResponse, error) { +func goListDriver(cfg *Config, patterns ...string) (_ *DriverResponse, err error) { // Make sure that any asynchronous go commands are killed when we return. parentCtx := cfg.Context if parentCtx == nil { @@ -146,16 +146,18 @@ func goListDriver(cfg *Config, patterns ...string) (*driverResponse, error) { } // Fill in response.Sizes asynchronously if necessary. - var sizeserr error - var sizeswg sync.WaitGroup if cfg.Mode&NeedTypesSizes != 0 || cfg.Mode&NeedTypes != 0 { - sizeswg.Add(1) + errCh := make(chan error) go func() { compiler, arch, err := packagesdriver.GetSizesForArgsGolist(ctx, state.cfgInvocation(), cfg.gocmdRunner) - sizeserr = err response.dr.Compiler = compiler response.dr.Arch = arch - sizeswg.Done() + errCh <- err + }() + defer func() { + if sizesErr := <-errCh; sizesErr != nil { + err = sizesErr + } }() } @@ -208,10 +210,7 @@ extractQueries: } } - sizeswg.Wait() - if sizeserr != nil { - return nil, sizeserr - } + // (We may yet return an error due to defer.) return response.dr, nil } @@ -266,7 +265,7 @@ func (state *golistState) runContainsQueries(response *responseDeduper, queries // adhocPackage attempts to load or construct an ad-hoc package for a given // query, if the original call to the driver produced inadequate results. -func (state *golistState) adhocPackage(pattern, query string) (*driverResponse, error) { +func (state *golistState) adhocPackage(pattern, query string) (*DriverResponse, error) { response, err := state.createDriverResponse(query) if err != nil { return nil, err @@ -357,7 +356,7 @@ func otherFiles(p *jsonPackage) [][]string { // createDriverResponse uses the "go list" command to expand the pattern // words and return a response for the specified packages. -func (state *golistState) createDriverResponse(words ...string) (*driverResponse, error) { +func (state *golistState) createDriverResponse(words ...string) (*DriverResponse, error) { // go list uses the following identifiers in ImportPath and Imports: // // "p" -- importable package or main (command) @@ -384,7 +383,7 @@ func (state *golistState) createDriverResponse(words ...string) (*driverResponse pkgs := make(map[string]*Package) additionalErrors := make(map[string][]Error) // Decode the JSON and convert it to Package form. - response := &driverResponse{ + response := &DriverResponse{ GoVersion: goVersion, } for dec := json.NewDecoder(buf); dec.More(); { @@ -842,6 +841,7 @@ func (state *golistState) cfgInvocation() gocommand.Invocation { Env: cfg.Env, Logf: cfg.Logf, WorkingDir: cfg.Dir, + Overlay: cfg.goListOverlayFile, } } @@ -850,26 +850,6 @@ func (state *golistState) invokeGo(verb string, args ...string) (*bytes.Buffer, cfg := state.cfg inv := state.cfgInvocation() - - // For Go versions 1.16 and above, `go list` accepts overlays directly via - // the -overlay flag. Set it, if it's available. - // - // The check for "list" is not necessarily required, but we should avoid - // getting the go version if possible. - if verb == "list" { - goVersion, err := state.getGoVersion() - if err != nil { - return nil, err - } - if goVersion >= 16 { - filename, cleanup, err := state.writeOverlays() - if err != nil { - return nil, err - } - defer cleanup() - inv.Overlay = filename - } - } inv.Verb = verb inv.Args = args gocmdRunner := cfg.gocmdRunner @@ -1016,67 +996,6 @@ func (state *golistState) invokeGo(verb string, args ...string) (*bytes.Buffer, return stdout, nil } -// OverlayJSON is the format overlay files are expected to be in. -// The Replace map maps from overlaid paths to replacement paths: -// the Go command will forward all reads trying to open -// each overlaid path to its replacement path, or consider the overlaid -// path not to exist if the replacement path is empty. -// -// From golang/go#39958. -type OverlayJSON struct { - Replace map[string]string `json:"replace,omitempty"` -} - -// writeOverlays writes out files for go list's -overlay flag, as described -// above. -func (state *golistState) writeOverlays() (filename string, cleanup func(), err error) { - // Do nothing if there are no overlays in the config. - if len(state.cfg.Overlay) == 0 { - return "", func() {}, nil - } - dir, err := os.MkdirTemp("", "gopackages-*") - if err != nil { - return "", nil, err - } - // The caller must clean up this directory, unless this function returns an - // error. - cleanup = func() { - os.RemoveAll(dir) - } - defer func() { - if err != nil { - cleanup() - } - }() - overlays := map[string]string{} - for k, v := range state.cfg.Overlay { - // Create a unique filename for the overlaid files, to avoid - // creating nested directories. - noSeparator := strings.Join(strings.Split(filepath.ToSlash(k), "/"), "") - f, err := os.CreateTemp(dir, fmt.Sprintf("*-%s", noSeparator)) - if err != nil { - return "", func() {}, err - } - if _, err := f.Write(v); err != nil { - return "", func() {}, err - } - if err := f.Close(); err != nil { - return "", func() {}, err - } - overlays[k] = f.Name() - } - b, err := json.Marshal(OverlayJSON{Replace: overlays}) - if err != nil { - return "", func() {}, err - } - // Write out the overlay file that contains the filepath mappings. - filename = filepath.Join(dir, "overlay.json") - if err := os.WriteFile(filename, b, 0665); err != nil { - return "", func() {}, err - } - return filename, cleanup, nil -} - func containsGoFile(s []string) bool { for _, f := range s { if strings.HasSuffix(f, ".go") { diff --git a/pkg/k8s/vendor/golang.org/x/tools/go/packages/packages.go b/pkg/k8s/vendor/golang.org/x/tools/go/packages/packages.go index 81e9e6a727d..34306ddd390 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/go/packages/packages.go +++ b/pkg/k8s/vendor/golang.org/x/tools/go/packages/packages.go @@ -9,6 +9,7 @@ package packages import ( "context" "encoding/json" + "errors" "fmt" "go/ast" "go/parser" @@ -24,6 +25,8 @@ import ( "sync" "time" + "golang.org/x/sync/errgroup" + "golang.org/x/tools/go/gcexportdata" "golang.org/x/tools/internal/gocommand" "golang.org/x/tools/internal/packagesinternal" @@ -34,10 +37,20 @@ import ( // A LoadMode controls the amount of detail to return when loading. // The bits below can be combined to specify which fields should be // filled in the result packages. +// // The zero value is a special case, equivalent to combining // the NeedName, NeedFiles, and NeedCompiledGoFiles bits. +// // ID and Errors (if present) will always be filled. -// Load may return more information than requested. +// [Load] may return more information than requested. +// +// Unfortunately there are a number of open bugs related to +// interactions among the LoadMode bits: +// - https://github.com/golang/go/issues/48226 +// - https://github.com/golang/go/issues/56633 +// - https://github.com/golang/go/issues/56677 +// - https://github.com/golang/go/issues/58726 +// - https://github.com/golang/go/issues/63517 type LoadMode int const ( @@ -120,15 +133,21 @@ const ( // A Config specifies details about how packages should be loaded. // The zero value is a valid configuration. +// // Calls to Load do not modify this struct. +// +// TODO(adonovan): #67702: this is currently false: in fact, +// calls to [Load] do not modify the public fields of this struct, but +// may modify hidden fields, so concurrent calls to [Load] must not +// use the same Config. But perhaps we should reestablish the +// documented invariant. type Config struct { // Mode controls the level of information returned for each package. Mode LoadMode // Context specifies the context for the load operation. - // If the context is cancelled, the loader may stop early - // and return an ErrCancelled error. - // If Context is nil, the load cannot be cancelled. + // Cancelling the context may cause [Load] to abort and + // return an error. Context context.Context // Logf is the logger for the config. @@ -197,50 +216,23 @@ type Config struct { // setting Tests may have no effect. Tests bool - // Overlay provides a mapping of absolute file paths to file contents. - // If the file with the given path already exists, the parser will use the - // alternative file contents provided by the map. + // Overlay is a mapping from absolute file paths to file contents. + // + // For each map entry, [Load] uses the alternative file + // contents provided by the overlay mapping instead of reading + // from the file system. This mechanism can be used to enable + // editor-integrated tools to correctly analyze the contents + // of modified but unsaved buffers, for example. // - // Overlays provide incomplete support for when a given file doesn't - // already exist on disk. See the package doc above for more details. + // The overlay mapping is passed to the build system's driver + // (see "The driver protocol") so that it too can report + // consistent package metadata about unsaved files. However, + // drivers may vary in their level of support for overlays. Overlay map[string][]byte -} -// driver is the type for functions that query the build system for the -// packages named by the patterns. -type driver func(cfg *Config, patterns ...string) (*driverResponse, error) - -// driverResponse contains the results for a driver query. -type driverResponse struct { - // NotHandled is returned if the request can't be handled by the current - // driver. If an external driver returns a response with NotHandled, the - // rest of the driverResponse is ignored, and go/packages will fallback - // to the next driver. If go/packages is extended in the future to support - // lists of multiple drivers, go/packages will fall back to the next driver. - NotHandled bool - - // Compiler and Arch are the arguments pass of types.SizesFor - // to get a types.Sizes to use when type checking. - Compiler string - Arch string - - // Roots is the set of package IDs that make up the root packages. - // We have to encode this separately because when we encode a single package - // we cannot know if it is one of the roots as that requires knowledge of the - // graph it is part of. - Roots []string `json:",omitempty"` - - // Packages is the full set of packages in the graph. - // The packages are not connected into a graph. - // The Imports if populated will be stubs that only have their ID set. - // Imports will be connected and then type and syntax information added in a - // later pass (see refine). - Packages []*Package - - // GoVersion is the minor version number used by the driver - // (e.g. the go command on the PATH) when selecting .go files. - // Zero means unknown. - GoVersion int + // goListOverlayFile is the JSON file that encodes the Overlay + // mapping, used by 'go list -overlay=...' + goListOverlayFile string } // Load loads and returns the Go packages named by the given patterns. @@ -248,8 +240,22 @@ type driverResponse struct { // Config specifies loading options; // nil behaves the same as an empty Config. // -// Load returns an error if any of the patterns was invalid -// as defined by the underlying build system. +// The [Config.Mode] field is a set of bits that determine what kinds +// of information should be computed and returned. Modes that require +// more information tend to be slower. See [LoadMode] for details +// and important caveats. Its zero value is equivalent to +// NeedName | NeedFiles | NeedCompiledGoFiles. +// +// Each call to Load returns a new set of [Package] instances. +// The Packages and their Imports form a directed acyclic graph. +// +// If the [NeedTypes] mode flag was set, each call to Load uses a new +// [types.Importer], so [types.Object] and [types.Type] values from +// different calls to Load must not be mixed as they will have +// inconsistent notions of type identity. +// +// If any of the patterns was invalid as defined by the +// underlying build system, Load returns an error. // It may return an empty list of packages without an error, // for instance for an empty expansion of a valid wildcard. // Errors associated with a particular package are recorded in the @@ -291,9 +297,28 @@ func Load(cfg *Config, patterns ...string) ([]*Package, error) { // no external driver, or the driver returns a response with NotHandled set, // defaultDriver will fall back to the go list driver. // The boolean result indicates that an external driver handled the request. -func defaultDriver(cfg *Config, patterns ...string) (*driverResponse, bool, error) { +func defaultDriver(cfg *Config, patterns ...string) (*DriverResponse, bool, error) { + const ( + // windowsArgMax specifies the maximum command line length for + // the Windows' CreateProcess function. + windowsArgMax = 32767 + // maxEnvSize is a very rough estimation of the maximum environment + // size of a user. + maxEnvSize = 16384 + // safeArgMax specifies the maximum safe command line length to use + // by the underlying driver excl. the environment. We choose the Windows' + // ARG_MAX as the starting point because it's one of the lowest ARG_MAX + // constants out of the different supported platforms, + // e.g., https://www.in-ulm.de/~mascheck/various/argmax/#results. + safeArgMax = windowsArgMax - maxEnvSize + ) + chunks, err := splitIntoChunks(patterns, safeArgMax) + if err != nil { + return nil, false, err + } + if driver := findExternalDriver(cfg); driver != nil { - response, err := driver(cfg, patterns...) + response, err := callDriverOnChunks(driver, cfg, chunks) if err != nil { return nil, false, err } else if !response.NotHandled { @@ -302,11 +327,99 @@ func defaultDriver(cfg *Config, patterns ...string) (*driverResponse, bool, erro // (fall through) } - response, err := goListDriver(cfg, patterns...) + // go list fallback + // + // Write overlays once, as there are many calls + // to 'go list' (one per chunk plus others too). + overlay, cleanupOverlay, err := gocommand.WriteOverlays(cfg.Overlay) + if err != nil { + return nil, false, err + } + defer cleanupOverlay() + cfg.goListOverlayFile = overlay + + response, err := callDriverOnChunks(goListDriver, cfg, chunks) + if err != nil { + return nil, false, err + } return response, false, err } +// splitIntoChunks chunks the slice so that the total number of characters +// in a chunk is no longer than argMax. +func splitIntoChunks(patterns []string, argMax int) ([][]string, error) { + if argMax <= 0 { + return nil, errors.New("failed to split patterns into chunks, negative safe argMax value") + } + var chunks [][]string + charsInChunk := 0 + nextChunkStart := 0 + for i, v := range patterns { + vChars := len(v) + if vChars > argMax { + // a single pattern is longer than the maximum safe ARG_MAX, hardly should happen + return nil, errors.New("failed to split patterns into chunks, a pattern is too long") + } + charsInChunk += vChars + 1 // +1 is for a whitespace between patterns that has to be counted too + if charsInChunk > argMax { + chunks = append(chunks, patterns[nextChunkStart:i]) + nextChunkStart = i + charsInChunk = vChars + } + } + // add the last chunk + if nextChunkStart < len(patterns) { + chunks = append(chunks, patterns[nextChunkStart:]) + } + return chunks, nil +} + +func callDriverOnChunks(driver driver, cfg *Config, chunks [][]string) (*DriverResponse, error) { + if len(chunks) == 0 { + return driver(cfg) + } + responses := make([]*DriverResponse, len(chunks)) + errNotHandled := errors.New("driver returned NotHandled") + var g errgroup.Group + for i, chunk := range chunks { + i := i + chunk := chunk + g.Go(func() (err error) { + responses[i], err = driver(cfg, chunk...) + if responses[i] != nil && responses[i].NotHandled { + err = errNotHandled + } + return err + }) + } + if err := g.Wait(); err != nil { + if errors.Is(err, errNotHandled) { + return &DriverResponse{NotHandled: true}, nil + } + return nil, err + } + return mergeResponses(responses...), nil +} + +func mergeResponses(responses ...*DriverResponse) *DriverResponse { + if len(responses) == 0 { + return nil + } + response := newDeduper() + response.dr.NotHandled = false + response.dr.Compiler = responses[0].Compiler + response.dr.Arch = responses[0].Arch + response.dr.GoVersion = responses[0].GoVersion + for _, v := range responses { + response.addAll(v) + } + return response.dr +} + // A Package describes a loaded Go package. +// +// It also defines part of the JSON schema of [DriverResponse]. +// See the package documentation for an overview. type Package struct { // ID is a unique identifier for a package, // in a syntax provided by the underlying build system. @@ -365,19 +478,30 @@ type Package struct { // to corresponding loaded Packages. Imports map[string]*Package + // Module is the module information for the package if it exists. + // + // Note: it may be missing for std and cmd; see Go issue #65816. + Module *Module + + // -- The following fields are not part of the driver JSON schema. -- + // Types provides type information for the package. // The NeedTypes LoadMode bit sets this field for packages matching the // patterns; type information for dependencies may be missing or incomplete, // unless NeedDeps and NeedImports are also set. - Types *types.Package + // + // Each call to [Load] returns a consistent set of type + // symbols, as defined by the comment at [types.Identical]. + // Avoid mixing type information from two or more calls to [Load]. + Types *types.Package `json:"-"` // Fset provides position information for Types, TypesInfo, and Syntax. // It is set only when Types is set. - Fset *token.FileSet + Fset *token.FileSet `json:"-"` // IllTyped indicates whether the package or any dependency contains errors. // It is set only when Types is set. - IllTyped bool + IllTyped bool `json:"-"` // Syntax is the package's syntax trees, for the files listed in CompiledGoFiles. // @@ -387,26 +511,28 @@ type Package struct { // // Syntax is kept in the same order as CompiledGoFiles, with the caveat that nils are // removed. If parsing returned nil, Syntax may be shorter than CompiledGoFiles. - Syntax []*ast.File + Syntax []*ast.File `json:"-"` // TypesInfo provides type information about the package's syntax trees. // It is set only when Syntax is set. - TypesInfo *types.Info + TypesInfo *types.Info `json:"-"` // TypesSizes provides the effective size function for types in TypesInfo. - TypesSizes types.Sizes + TypesSizes types.Sizes `json:"-"` + + // -- internal -- // forTest is the package under test, if any. forTest string // depsErrors is the DepsErrors field from the go list response, if any. depsErrors []*packagesinternal.PackageError - - // module is the module information for the package if it exists. - Module *Module } // Module provides module information for a package. +// +// It also defines part of the JSON schema of [DriverResponse]. +// See the package documentation for an overview. type Module struct { Path string // module path Version string // module version @@ -539,6 +665,7 @@ func (p *Package) UnmarshalJSON(b []byte) error { OtherFiles: flat.OtherFiles, EmbedFiles: flat.EmbedFiles, EmbedPatterns: flat.EmbedPatterns, + IgnoredFiles: flat.IgnoredFiles, ExportFile: flat.ExportFile, } if len(flat.Imports) > 0 { @@ -648,7 +775,7 @@ func newLoader(cfg *Config) *loader { // refine connects the supplied packages into a graph and then adds type // and syntax information as requested by the LoadMode. -func (ld *loader) refine(response *driverResponse) ([]*Package, error) { +func (ld *loader) refine(response *DriverResponse) ([]*Package, error) { roots := response.Roots rootMap := make(map[string]int, len(roots)) for i, root := range roots { @@ -795,6 +922,12 @@ func (ld *loader) refine(response *driverResponse) ([]*Package, error) { wg.Wait() } + // If the context is done, return its error and + // throw out [likely] incomplete packages. + if err := ld.Context.Err(); err != nil { + return nil, err + } + result := make([]*Package, len(initial)) for i, lpkg := range initial { result[i] = lpkg.Package @@ -890,6 +1023,14 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) { lpkg.Types = types.NewPackage(lpkg.PkgPath, lpkg.Name) lpkg.Fset = ld.Fset + // Start shutting down if the context is done and do not load + // source or export data files. + // Packages that import this one will have ld.Context.Err() != nil. + // ld.Context.Err() will be returned later by refine. + if ld.Context.Err() != nil { + return + } + // Subtle: we populate all Types fields with an empty Package // before loading export data so that export data processing // never has to create a types.Package for an indirect dependency, @@ -1009,6 +1150,13 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) { return } + // Start shutting down if the context is done and do not type check. + // Packages that import this one will have ld.Context.Err() != nil. + // ld.Context.Err() will be returned later by refine. + if ld.Context.Err() != nil { + return + } + lpkg.TypesInfo = &types.Info{ Types: make(map[ast.Expr]types.TypeAndValue), Defs: make(map[*ast.Ident]types.Object), @@ -1059,7 +1207,7 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) { Sizes: ld.sizes, // may be nil } if lpkg.Module != nil && lpkg.Module.GoVersion != "" { - typesinternal.SetGoVersion(tc, "go"+lpkg.Module.GoVersion) + tc.GoVersion = "go" + lpkg.Module.GoVersion } if (ld.Mode & typecheckCgo) != 0 { if !typesinternal.SetUsesCgo(tc) { @@ -1070,10 +1218,24 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) { return } } - types.NewChecker(tc, ld.Fset, lpkg.Types, lpkg.TypesInfo).Files(lpkg.Syntax) + typErr := types.NewChecker(tc, ld.Fset, lpkg.Types, lpkg.TypesInfo).Files(lpkg.Syntax) lpkg.importErrors = nil // no longer needed + // In go/types go1.21 and go1.22, Checker.Files failed fast with a + // a "too new" error, without calling tc.Error and without + // proceeding to type-check the package (#66525). + // We rely on the runtimeVersion error to give the suggested remedy. + if typErr != nil && len(lpkg.Errors) == 0 && len(lpkg.Syntax) > 0 { + if msg := typErr.Error(); strings.HasPrefix(msg, "package requires newer Go version") { + appendError(types.Error{ + Fset: ld.Fset, + Pos: lpkg.Syntax[0].Package, + Msg: msg, + }) + } + } + // If !Cgo, the type-checker uses FakeImportC mode, so // it doesn't invoke the importer for import "C", // nor report an error for the import, @@ -1095,6 +1257,12 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) { } } + // If types.Checker.Files had an error that was unreported, + // make sure to report the unknown error so the package is illTyped. + if typErr != nil && len(lpkg.Errors) == 0 { + appendError(typErr) + } + // Record accumulated errors. illTyped := len(lpkg.Errors) > 0 if !illTyped { @@ -1166,11 +1334,6 @@ func (ld *loader) parseFiles(filenames []string) ([]*ast.File, []error) { parsed := make([]*ast.File, n) errors := make([]error, n) for i, file := range filenames { - if ld.Config.Context.Err() != nil { - parsed[i] = nil - errors[i] = ld.Config.Context.Err() - continue - } wg.Add(1) go func(i int, filename string) { parsed[i], errors[i] = ld.parseFile(filename) diff --git a/pkg/k8s/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go b/pkg/k8s/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go index 11d5c8c3adf..a2386c347a2 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go +++ b/pkg/k8s/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go @@ -29,9 +29,12 @@ import ( "strconv" "strings" - "golang.org/x/tools/internal/typeparams" + "golang.org/x/tools/internal/aliases" + "golang.org/x/tools/internal/typesinternal" ) +// TODO(adonovan): think about generic aliases. + // A Path is an opaque name that identifies a types.Object // relative to its package. Conceptually, the name consists of a // sequence of destructuring operations applied to the package scope @@ -223,7 +226,7 @@ func (enc *Encoder) For(obj types.Object) (Path, error) { // Reject obviously non-viable cases. switch obj := obj.(type) { case *types.TypeName: - if _, ok := obj.Type().(*types.TypeParam); !ok { + if _, ok := aliases.Unalias(obj.Type()).(*types.TypeParam); !ok { // With the exception of type parameters, only package-level type names // have a path. return "", fmt.Errorf("no path for %v", obj) @@ -310,7 +313,7 @@ func (enc *Encoder) For(obj types.Object) (Path, error) { } // Inspect declared methods of defined types. - if T, ok := o.Type().(*types.Named); ok { + if T, ok := aliases.Unalias(o.Type()).(*types.Named); ok { path = append(path, opType) // The method index here is always with respect // to the underlying go/types data structures, @@ -391,17 +394,12 @@ func (enc *Encoder) concreteMethod(meth *types.Func) (Path, bool) { // of objectpath will only be giving us origin methods, anyway, as referring // to instantiated methods is usually not useful. - if typeparams.OriginMethod(meth) != meth { + if meth.Origin() != meth { return "", false } - recvT := meth.Type().(*types.Signature).Recv().Type() - if ptr, ok := recvT.(*types.Pointer); ok { - recvT = ptr.Elem() - } - - named, ok := recvT.(*types.Named) - if !ok { + _, named := typesinternal.ReceiverNamed(meth.Type().(*types.Signature).Recv()) + if named == nil { return "", false } @@ -444,6 +442,8 @@ func (enc *Encoder) concreteMethod(meth *types.Func) (Path, bool) { // nil, it will be allocated as necessary. func find(obj types.Object, T types.Type, path []byte, seen map[*types.TypeName]bool) []byte { switch T := T.(type) { + case *aliases.Alias: + return find(obj, aliases.Unalias(T), path, seen) case *types.Basic, *types.Named: // Named types belonging to pkg were handled already, // so T must belong to another package. No path. @@ -616,6 +616,7 @@ func Object(pkg *types.Package, p Path) (types.Object, error) { // Inv: t != nil, obj == nil + t = aliases.Unalias(t) switch code { case opElem: hasElem, ok := t.(hasElem) // Pointer, Slice, Array, Chan, Map diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases.go b/pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases.go new file mode 100644 index 00000000000..c24c2eee457 --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases.go @@ -0,0 +1,32 @@ +// Copyright 2024 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 aliases + +import ( + "go/token" + "go/types" +) + +// Package aliases defines backward compatible shims +// for the types.Alias type representation added in 1.22. +// This defines placeholders for x/tools until 1.26. + +// NewAlias creates a new TypeName in Package pkg that +// is an alias for the type rhs. +// +// The enabled parameter determines whether the resulting [TypeName]'s +// type is an [types.Alias]. Its value must be the result of a call to +// [Enabled], which computes the effective value of +// GODEBUG=gotypesalias=... by invoking the type checker. The Enabled +// function is expensive and should be called once per task (e.g. +// package import), not once per call to NewAlias. +func NewAlias(enabled bool, pos token.Pos, pkg *types.Package, name string, rhs types.Type) *types.TypeName { + if enabled { + tname := types.NewTypeName(pos, pkg, name, nil) + newAlias(tname, rhs) + return tname + } + return types.NewTypeName(pos, pkg, name, rhs) +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go b/pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go new file mode 100644 index 00000000000..c027b9f315f --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go @@ -0,0 +1,31 @@ +// Copyright 2024 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. + +//go:build !go1.22 +// +build !go1.22 + +package aliases + +import ( + "go/types" +) + +// Alias is a placeholder for a go/types.Alias for <=1.21. +// It will never be created by go/types. +type Alias struct{} + +func (*Alias) String() string { panic("unreachable") } +func (*Alias) Underlying() types.Type { panic("unreachable") } +func (*Alias) Obj() *types.TypeName { panic("unreachable") } +func Rhs(alias *Alias) types.Type { panic("unreachable") } + +// Unalias returns the type t for go <=1.21. +func Unalias(t types.Type) types.Type { return t } + +func newAlias(name *types.TypeName, rhs types.Type) *Alias { panic("unreachable") } + +// Enabled reports whether [NewAlias] should create [types.Alias] types. +// +// Before go1.22, this function always returns false. +func Enabled() bool { return false } diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go b/pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go new file mode 100644 index 00000000000..b3299548419 --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go @@ -0,0 +1,63 @@ +// Copyright 2024 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. + +//go:build go1.22 +// +build go1.22 + +package aliases + +import ( + "go/ast" + "go/parser" + "go/token" + "go/types" +) + +// Alias is an alias of types.Alias. +type Alias = types.Alias + +// Rhs returns the type on the right-hand side of the alias declaration. +func Rhs(alias *Alias) types.Type { + if alias, ok := any(alias).(interface{ Rhs() types.Type }); ok { + return alias.Rhs() // go1.23+ + } + + // go1.22's Alias didn't have the Rhs method, + // so Unalias is the best we can do. + return Unalias(alias) +} + +// Unalias is a wrapper of types.Unalias. +func Unalias(t types.Type) types.Type { return types.Unalias(t) } + +// newAlias is an internal alias around types.NewAlias. +// Direct usage is discouraged as the moment. +// Try to use NewAlias instead. +func newAlias(tname *types.TypeName, rhs types.Type) *Alias { + a := types.NewAlias(tname, rhs) + // TODO(go.dev/issue/65455): Remove kludgy workaround to set a.actual as a side-effect. + Unalias(a) + return a +} + +// Enabled reports whether [NewAlias] should create [types.Alias] types. +// +// This function is expensive! Call it sparingly. +func Enabled() bool { + // The only reliable way to compute the answer is to invoke go/types. + // We don't parse the GODEBUG environment variable, because + // (a) it's tricky to do so in a manner that is consistent + // with the godebug package; in particular, a simple + // substring check is not good enough. The value is a + // rightmost-wins list of options. But more importantly: + // (b) it is impossible to detect changes to the effective + // setting caused by os.Setenv("GODEBUG"), as happens in + // many tests. Therefore any attempt to cache the result + // is just incorrect. + fset := token.NewFileSet() + f, _ := parser.ParseFile(fset, "a.go", "package p; type A = int", 0) + pkg, _ := new(types.Config).Check("p", fset, []*ast.File{f}, nil) + _, enabled := pkg.Scope().Lookup("A").Type().(*types.Alias) + return enabled +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/event/tag/tag.go b/pkg/k8s/vendor/golang.org/x/tools/internal/event/tag/tag.go deleted file mode 100644 index 581b26c2041..00000000000 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/event/tag/tag.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2019 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 tag provides the labels used for telemetry throughout gopls. -package tag - -import ( - "golang.org/x/tools/internal/event/keys" -) - -var ( - // create the label keys we use - Method = keys.NewString("method", "") - StatusCode = keys.NewString("status.code", "") - StatusMessage = keys.NewString("status.message", "") - RPCID = keys.NewString("id", "") - RPCDirection = keys.NewString("direction", "") - File = keys.NewString("file", "") - Directory = keys.New("directory", "") - URI = keys.New("URI", "") - Package = keys.NewString("package", "") // sorted comma-separated list of Package IDs - PackagePath = keys.NewString("package_path", "") - Query = keys.New("query", "") - Snapshot = keys.NewUInt64("snapshot", "") - Operation = keys.NewString("operation", "") - - Position = keys.New("position", "") - Category = keys.NewString("category", "") - PackageCount = keys.NewInt("packages", "") - Files = keys.New("files", "") - Port = keys.NewInt("port", "") - Type = keys.New("type", "") - HoverKind = keys.NewString("hoverkind", "") - - NewServer = keys.NewString("new_server", "A new server was added") - EndServer = keys.NewString("end_server", "A server was shut down") - - ServerID = keys.NewString("server", "The server ID an event is related to") - Logfile = keys.NewString("logfile", "") - DebugAddress = keys.NewString("debug_address", "") - GoplsPath = keys.NewString("gopls_path", "") - ClientID = keys.NewString("client_id", "") - - Level = keys.NewInt("level", "The logging level") -) - -var ( - // create the stats we measure - Started = keys.NewInt64("started", "Count of started RPCs.") - ReceivedBytes = keys.NewInt64("received_bytes", "Bytes received.") //, unit.Bytes) - SentBytes = keys.NewInt64("sent_bytes", "Bytes sent.") //, unit.Bytes) - Latency = keys.NewFloat64("latency_ms", "Elapsed time in milliseconds") //, unit.Milliseconds) -) - -const ( - Inbound = "in" - Outbound = "out" -) diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go index 2d078ccb19c..39df91124a4 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go @@ -259,13 +259,6 @@ func Import(packages map[string]*types.Package, path, srcDir string, lookup func return } -func deref(typ types.Type) types.Type { - if p, _ := typ.(*types.Pointer); p != nil { - return p.Elem() - } - return typ -} - type byPath []*types.Package func (a byPath) Len() int { return len(a) } diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/iexport.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/iexport.go index 2ee8c70164f..deeb67f315a 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/iexport.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/iexport.go @@ -23,6 +23,7 @@ import ( "strings" "golang.org/x/tools/go/types/objectpath" + "golang.org/x/tools/internal/aliases" "golang.org/x/tools/internal/tokeninternal" ) @@ -463,7 +464,7 @@ func (p *iexporter) doDecl(obj types.Object) { switch obj := obj.(type) { case *types.Var: - w.tag('V') + w.tag(varTag) w.pos(obj.Pos()) w.typ(obj.Type(), obj.Pkg()) @@ -481,9 +482,9 @@ func (p *iexporter) doDecl(obj types.Object) { // Function. if sig.TypeParams().Len() == 0 { - w.tag('F') + w.tag(funcTag) } else { - w.tag('G') + w.tag(genericFuncTag) } w.pos(obj.Pos()) // The tparam list of the function type is the declaration of the type @@ -499,20 +500,20 @@ func (p *iexporter) doDecl(obj types.Object) { w.signature(sig) case *types.Const: - w.tag('C') + w.tag(constTag) w.pos(obj.Pos()) w.value(obj.Type(), obj.Val()) case *types.TypeName: t := obj.Type() - if tparam, ok := t.(*types.TypeParam); ok { - w.tag('P') + if tparam, ok := aliases.Unalias(t).(*types.TypeParam); ok { + w.tag(typeParamTag) w.pos(obj.Pos()) constraint := tparam.Constraint() if p.version >= iexportVersionGo1_18 { implicit := false - if iface, _ := constraint.(*types.Interface); iface != nil { + if iface, _ := aliases.Unalias(constraint).(*types.Interface); iface != nil { implicit = iface.IsImplicit() } w.bool(implicit) @@ -522,8 +523,13 @@ func (p *iexporter) doDecl(obj types.Object) { } if obj.IsAlias() { - w.tag('A') + w.tag(aliasTag) w.pos(obj.Pos()) + if alias, ok := t.(*aliases.Alias); ok { + // Preserve materialized aliases, + // even of non-exported types. + t = aliases.Rhs(alias) + } w.typ(t, obj.Pkg()) break } @@ -535,9 +541,9 @@ func (p *iexporter) doDecl(obj types.Object) { } if named.TypeParams().Len() == 0 { - w.tag('T') + w.tag(typeTag) } else { - w.tag('U') + w.tag(genericTypeTag) } w.pos(obj.Pos()) @@ -547,7 +553,7 @@ func (p *iexporter) doDecl(obj types.Object) { w.tparamList(obj.Name(), named.TypeParams(), obj.Pkg()) } - underlying := obj.Type().Underlying() + underlying := named.Underlying() w.typ(underlying, obj.Pkg()) if types.IsInterface(t) { @@ -738,6 +744,11 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { }() } switch t := t.(type) { + case *aliases.Alias: + // TODO(adonovan): support parameterized aliases, following *types.Named. + w.startType(aliasType) + w.qualifiedType(t.Obj()) + case *types.Named: if targs := t.TypeArgs(); targs.Len() > 0 { w.startType(instanceType) @@ -843,7 +854,7 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { for i := 0; i < n; i++ { ft := t.EmbeddedType(i) tPkg := pkg - if named, _ := ft.(*types.Named); named != nil { + if named, _ := aliases.Unalias(ft).(*types.Named); named != nil { w.pos(named.Obj().Pos()) } else { w.pos(token.NoPos) diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/iimport.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/iimport.go index 9bde15e3bc6..136aa03653c 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/iimport.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/iimport.go @@ -22,6 +22,8 @@ import ( "strings" "golang.org/x/tools/go/types/objectpath" + "golang.org/x/tools/internal/aliases" + "golang.org/x/tools/internal/typesinternal" ) type intReader struct { @@ -78,6 +80,20 @@ const ( typeParamType instanceType unionType + aliasType +) + +// Object tags +const ( + varTag = 'V' + funcTag = 'F' + genericFuncTag = 'G' + constTag = 'C' + aliasTag = 'A' + genericAliasTag = 'B' + typeParamTag = 'P' + typeTag = 'T' + genericTypeTag = 'U' ) // IImportData imports a package from the serialized package data @@ -194,6 +210,7 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte p := iimporter{ version: int(version), ipath: path, + aliases: aliases.Enabled(), shallow: shallow, reportf: reportf, @@ -224,6 +241,7 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte // Gather the relevant packages from the manifest. items := make([]GetPackagesItem, r.uint64()) + uniquePkgPaths := make(map[string]bool) for i := range items { pkgPathOff := r.uint64() pkgPath := p.stringAt(pkgPathOff) @@ -248,6 +266,12 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte } items[i].nameIndex = nameIndex + + uniquePkgPaths[pkgPath] = true + } + // Debugging #63822; hypothesis: there are duplicate PkgPaths. + if len(uniquePkgPaths) != len(items) { + reportf("found duplicate PkgPaths while reading export data manifest: %v", items) } // Request packages all at once from the client, @@ -315,7 +339,7 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte } // SetConstraint can't be called if the constraint type is not yet complete. - // When type params are created in the 'P' case of (*importReader).obj(), + // When type params are created in the typeParamTag case of (*importReader).obj(), // the associated constraint type may not be complete due to recursion. // Therefore, we defer calling SetConstraint there, and call it here instead // after all types are complete. @@ -346,6 +370,7 @@ type iimporter struct { version int ipath string + aliases bool shallow bool reportf ReportFunc // if non-nil, used to report bugs @@ -515,7 +540,7 @@ func canReuse(def *types.Named, rhs types.Type) bool { if def == nil { return true } - iface, _ := rhs.(*types.Interface) + iface, _ := aliases.Unalias(rhs).(*types.Interface) if iface == nil { return true } @@ -537,25 +562,29 @@ func (r *importReader) obj(name string) { pos := r.pos() switch tag { - case 'A': + case aliasTag: typ := r.typ() - - r.declare(types.NewTypeName(pos, r.currPkg, name, typ)) - - case 'C': + // TODO(adonovan): support generic aliases: + // if tag == genericAliasTag { + // tparams := r.tparamList() + // alias.SetTypeParams(tparams) + // } + r.declare(aliases.NewAlias(r.p.aliases, pos, r.currPkg, name, typ)) + + case constTag: typ, val := r.value() r.declare(types.NewConst(pos, r.currPkg, name, typ, val)) - case 'F', 'G': + case funcTag, genericFuncTag: var tparams []*types.TypeParam - if tag == 'G' { + if tag == genericFuncTag { tparams = r.tparamList() } sig := r.signature(nil, nil, tparams) r.declare(types.NewFunc(pos, r.currPkg, name, sig)) - case 'T', 'U': + case typeTag, genericTypeTag: // Types can be recursive. We need to setup a stub // declaration before recursing. obj := types.NewTypeName(pos, r.currPkg, name, nil) @@ -563,7 +592,7 @@ func (r *importReader) obj(name string) { // Declare obj before calling r.tparamList, so the new type name is recognized // if used in the constraint of one of its own typeparams (see #48280). r.declare(obj) - if tag == 'U' { + if tag == genericTypeTag { tparams := r.tparamList() named.SetTypeParams(tparams) } @@ -580,14 +609,13 @@ func (r *importReader) obj(name string) { // If the receiver has any targs, set those as the // rparams of the method (since those are the // typeparams being used in the method sig/body). - base := baseType(recv.Type()) - assert(base != nil) - targs := base.TypeArgs() + _, recvNamed := typesinternal.ReceiverNamed(recv) + targs := recvNamed.TypeArgs() var rparams []*types.TypeParam if targs.Len() > 0 { rparams = make([]*types.TypeParam, targs.Len()) for i := range rparams { - rparams[i] = targs.At(i).(*types.TypeParam) + rparams[i] = aliases.Unalias(targs.At(i)).(*types.TypeParam) } } msig := r.signature(recv, rparams, nil) @@ -596,7 +624,7 @@ func (r *importReader) obj(name string) { } } - case 'P': + case typeParamTag: // We need to "declare" a typeparam in order to have a name that // can be referenced recursively (if needed) in the type param's // bound. @@ -617,7 +645,7 @@ func (r *importReader) obj(name string) { } constraint := r.typ() if implicit { - iface, _ := constraint.(*types.Interface) + iface, _ := aliases.Unalias(constraint).(*types.Interface) if iface == nil { errorf("non-interface constraint marked implicit") } @@ -629,7 +657,7 @@ func (r *importReader) obj(name string) { // completely set up all types in ImportData. r.p.later = append(r.p.later, setConstraintArgs{t: t, constraint: constraint}) - case 'V': + case varTag: typ := r.typ() r.declare(types.NewVar(pos, r.currPkg, name, typ)) @@ -824,7 +852,7 @@ func (r *importReader) typ() types.Type { } func isInterface(t types.Type) bool { - _, ok := t.(*types.Interface) + _, ok := aliases.Unalias(t).(*types.Interface) return ok } @@ -846,7 +874,7 @@ func (r *importReader) doType(base *types.Named) (res types.Type) { errorf("unexpected kind tag in %q: %v", r.p.ipath, k) return nil - case definedType: + case aliasType, definedType: pkg, name := r.qualifiedIdent() r.p.doDecl(pkg, name) return pkg.Scope().Lookup(name).(*types.TypeName).Type() @@ -1023,7 +1051,7 @@ func (r *importReader) tparamList() []*types.TypeParam { for i := range xs { // Note: the standard library importer is tolerant of nil types here, // though would panic in SetTypeParams. - xs[i] = r.typ().(*types.TypeParam) + xs[i] = aliases.Unalias(r.typ()).(*types.TypeParam) } return xs } @@ -1070,13 +1098,3 @@ func (r *importReader) byte() byte { } return x } - -func baseType(typ types.Type) *types.Named { - // pointer receivers are never types.Named types - if p, _ := typ.(*types.Pointer); p != nil { - typ = p.Elem() - } - // receiver base types are always (possibly generic) types.Named types - n, _ := typ.(*types.Named) - return n -} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/support_go117.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/support_go117.go deleted file mode 100644 index d892273efb6..00000000000 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/support_go117.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2021 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. - -//go:build !go1.18 -// +build !go1.18 - -package gcimporter - -import "go/types" - -const iexportVersion = iexportVersionGo1_11 - -func additionalPredeclared() []types.Type { - return nil -} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go index edbe6ea7041..0cd3b91b65a 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.18 -// +build go1.18 - package gcimporter import "go/types" diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go index 286bf445483..38b624cadab 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !(go1.18 && goexperiment.unified) -// +build !go1.18 !goexperiment.unified +//go:build !goexperiment.unified +// +build !goexperiment.unified package gcimporter diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go index b5d69ffbe68..b5118d0b3a5 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.18 && goexperiment.unified -// +build go1.18,goexperiment.unified +//go:build goexperiment.unified +// +build goexperiment.unified package gcimporter diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/ureader_no.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/ureader_no.go deleted file mode 100644 index 8eb20729c2a..00000000000 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/ureader_no.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2022 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. - -//go:build !go1.18 -// +build !go1.18 - -package gcimporter - -import ( - "fmt" - "go/token" - "go/types" -) - -func UImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { - err = fmt.Errorf("go/tools compiled with a Go version earlier than 1.18 cannot read unified IR export data") - return -} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go index b977435f626..2c077068877 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go @@ -4,9 +4,6 @@ // Derived from go/internal/gcimporter/ureader.go -//go:build go1.18 -// +build go1.18 - package gcimporter import ( @@ -16,6 +13,7 @@ import ( "sort" "strings" + "golang.org/x/tools/internal/aliases" "golang.org/x/tools/internal/pkgbits" ) @@ -28,6 +26,7 @@ type pkgReader struct { ctxt *types.Context imports map[string]*types.Package // previously imported packages, indexed by path + aliases bool // create types.Alias nodes // lazily initialized arrays corresponding to the unified IR // PosBase, Pkg, and Type sections, respectively. @@ -101,6 +100,7 @@ func readUnifiedPackage(fset *token.FileSet, ctxt *types.Context, imports map[st ctxt: ctxt, imports: imports, + aliases: aliases.Enabled(), posBases: make([]string, input.NumElems(pkgbits.RelocPosBase)), pkgs: make([]*types.Package, input.NumElems(pkgbits.RelocPkg)), @@ -526,7 +526,7 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) { case pkgbits.ObjAlias: pos := r.pos() typ := r.typ() - declare(types.NewTypeName(pos, objPkg, objName, typ)) + declare(aliases.NewAlias(r.p.aliases, pos, objPkg, objName, typ)) case pkgbits.ObjConst: pos := r.pos() @@ -553,7 +553,7 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) { // If the underlying type is an interface, we need to // duplicate its methods so we can replace the receiver // parameter's type (#49906). - if iface, ok := underlying.(*types.Interface); ok && iface.NumExplicitMethods() != 0 { + if iface, ok := aliases.Unalias(underlying).(*types.Interface); ok && iface.NumExplicitMethods() != 0 { methods := make([]*types.Func, iface.NumExplicitMethods()) for i := range methods { fn := iface.ExplicitMethod(i) diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gocommand/invoke.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gocommand/invoke.go index 55312522dc2..af0ee6c614d 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gocommand/invoke.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/gocommand/invoke.go @@ -8,12 +8,14 @@ package gocommand import ( "bytes" "context" + "encoding/json" "errors" "fmt" "io" "log" "os" "os/exec" + "path/filepath" "reflect" "regexp" "runtime" @@ -25,7 +27,6 @@ import ( "golang.org/x/tools/internal/event" "golang.org/x/tools/internal/event/keys" "golang.org/x/tools/internal/event/label" - "golang.org/x/tools/internal/event/tag" ) // An Runner will run go command invocations and serialize @@ -55,11 +56,14 @@ func (runner *Runner) initialize() { // 1.14: go: updating go.mod: existing contents have changed since last read var modConcurrencyError = regexp.MustCompile(`go:.*go.mod.*contents have changed`) -// verb is an event label for the go command verb. -var verb = keys.NewString("verb", "go command verb") +// event keys for go command invocations +var ( + verb = keys.NewString("verb", "go command verb") + directory = keys.NewString("directory", "") +) func invLabels(inv Invocation) []label.Label { - return []label.Label{verb.Of(inv.Verb), tag.Directory.Of(inv.WorkingDir)} + return []label.Label{verb.Of(inv.Verb), directory.Of(inv.WorkingDir)} } // Run is a convenience wrapper around RunRaw. @@ -158,12 +162,17 @@ type Invocation struct { BuildFlags []string // If ModFlag is set, the go command is invoked with -mod=ModFlag. + // TODO(rfindley): remove, in favor of Args. ModFlag string // If ModFile is set, the go command is invoked with -modfile=ModFile. + // TODO(rfindley): remove, in favor of Args. ModFile string - // If Overlay is set, the go command is invoked with -overlay=Overlay. + // Overlay is the name of the JSON overlay file that describes + // unsaved editor buffers; see [WriteOverlays]. + // If set, the go command is invoked with -overlay=Overlay. + // TODO(rfindley): remove, in favor of Args. Overlay string // If CleanEnv is set, the invocation will run only with the environment @@ -250,12 +259,15 @@ func (i *Invocation) run(ctx context.Context, stdout, stderr io.Writer) error { waitDelay.Set(reflect.ValueOf(30 * time.Second)) } - // On darwin the cwd gets resolved to the real path, which breaks anything that - // expects the working directory to keep the original path, including the + // The cwd gets resolved to the real path. On Darwin, where + // /tmp is a symlink, this breaks anything that expects the + // working directory to keep the original path, including the // go command when dealing with modules. - // The Go stdlib has a special feature where if the cwd and the PWD are the - // same node then it trusts the PWD, so by setting it in the env for the child - // process we fix up all the paths returned by the go command. + // + // os.Getwd has a special feature where if the cwd and the PWD + // are the same node then it trusts the PWD, so by setting it + // in the env for the child process we fix up all the paths + // returned by the go command. if !i.CleanEnv { cmd.Env = os.Environ() } @@ -346,6 +358,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) (err error) { } } + startTime := time.Now() err = cmd.Start() if stdoutW != nil { // The child process has inherited the pipe file, @@ -372,7 +385,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) (err error) { case err := <-resChan: return err case <-timer.C: - HandleHangingGoCommand(cmd.Process) + HandleHangingGoCommand(startTime, cmd) case <-ctx.Done(): } } else { @@ -406,7 +419,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) (err error) { return <-resChan } -func HandleHangingGoCommand(proc *os.Process) { +func HandleHangingGoCommand(start time.Time, cmd *exec.Cmd) { switch runtime.GOOS { case "linux", "darwin", "freebsd", "netbsd": fmt.Fprintln(os.Stderr, `DETECTED A HANGING GO COMMAND @@ -439,7 +452,7 @@ See golang/go#54461 for more details.`) panic(fmt.Sprintf("running %s: %v", listFiles, err)) } } - panic(fmt.Sprintf("detected hanging go command (pid %d): see golang/go#54461 for more details", proc.Pid)) + panic(fmt.Sprintf("detected hanging go command (golang/go#54461); waited %s\n\tcommand:%s\n\tpid:%d", time.Since(start), cmd, cmd.Process.Pid)) } func cmdDebugStr(cmd *exec.Cmd) string { @@ -463,3 +476,73 @@ func cmdDebugStr(cmd *exec.Cmd) string { } return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v GOPROXY=%v PWD=%v %v", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["GOPROXY"], env["PWD"], strings.Join(args, " ")) } + +// WriteOverlays writes each value in the overlay (see the Overlay +// field of go/packages.Config) to a temporary file and returns the name +// of a JSON file describing the mapping that is suitable for the "go +// list -overlay" flag. +// +// On success, the caller must call the cleanup function exactly once +// when the files are no longer needed. +func WriteOverlays(overlay map[string][]byte) (filename string, cleanup func(), err error) { + // Do nothing if there are no overlays in the config. + if len(overlay) == 0 { + return "", func() {}, nil + } + + dir, err := os.MkdirTemp("", "gocommand-*") + if err != nil { + return "", nil, err + } + + // The caller must clean up this directory, + // unless this function returns an error. + // (The cleanup operand of each return + // statement below is ignored.) + defer func() { + cleanup = func() { + os.RemoveAll(dir) + } + if err != nil { + cleanup() + cleanup = nil + } + }() + + // Write each map entry to a temporary file. + overlays := make(map[string]string) + for k, v := range overlay { + // Use a unique basename for each file (001-foo.go), + // to avoid creating nested directories. + base := fmt.Sprintf("%d-%s.go", 1+len(overlays), filepath.Base(k)) + filename := filepath.Join(dir, base) + err := os.WriteFile(filename, v, 0666) + if err != nil { + return "", nil, err + } + overlays[k] = filename + } + + // Write the JSON overlay file that maps logical file names to temp files. + // + // OverlayJSON is the format overlay files are expected to be in. + // The Replace map maps from overlaid paths to replacement paths: + // the Go command will forward all reads trying to open + // each overlaid path to its replacement path, or consider the overlaid + // path not to exist if the replacement path is empty. + // + // From golang/go#39958. + type OverlayJSON struct { + Replace map[string]string `json:"replace,omitempty"` + } + b, err := json.Marshal(OverlayJSON{Replace: overlays}) + if err != nil { + return "", nil, err + } + filename = filepath.Join(dir, "overlay.json") + if err := os.WriteFile(filename, b, 0666); err != nil { + return "", nil, err + } + + return filename, nil, nil +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gocommand/vendor.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gocommand/vendor.go index 2d3d408c0be..e38d1fb4888 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gocommand/vendor.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/gocommand/vendor.go @@ -107,3 +107,57 @@ func getMainModuleAnd114(ctx context.Context, inv Invocation, r *Runner) (*Modul } return mod, lines[4] == "go1.14", nil } + +// WorkspaceVendorEnabled reports whether workspace vendoring is enabled. It takes a *Runner to execute Go commands +// with the supplied context.Context and Invocation. The Invocation can contain pre-defined fields, +// of which only Verb and Args are modified to run the appropriate Go command. +// Inspired by setDefaultBuildMod in modload/init.go +func WorkspaceVendorEnabled(ctx context.Context, inv Invocation, r *Runner) (bool, []*ModuleJSON, error) { + inv.Verb = "env" + inv.Args = []string{"GOWORK"} + stdout, err := r.Run(ctx, inv) + if err != nil { + return false, nil, err + } + goWork := string(bytes.TrimSpace(stdout.Bytes())) + if fi, err := os.Stat(filepath.Join(filepath.Dir(goWork), "vendor")); err == nil && fi.IsDir() { + mainMods, err := getWorkspaceMainModules(ctx, inv, r) + if err != nil { + return false, nil, err + } + return true, mainMods, nil + } + return false, nil, nil +} + +// getWorkspaceMainModules gets the main modules' information. +// This is the information needed to figure out if vendoring should be enabled. +func getWorkspaceMainModules(ctx context.Context, inv Invocation, r *Runner) ([]*ModuleJSON, error) { + const format = `{{.Path}} +{{.Dir}} +{{.GoMod}} +{{.GoVersion}} +` + inv.Verb = "list" + inv.Args = []string{"-m", "-f", format} + stdout, err := r.Run(ctx, inv) + if err != nil { + return nil, err + } + + lines := strings.Split(strings.TrimSuffix(stdout.String(), "\n"), "\n") + if len(lines) < 4 { + return nil, fmt.Errorf("unexpected stdout: %q", stdout.String()) + } + mods := make([]*ModuleJSON, 0, len(lines)/4) + for i := 0; i < len(lines); i += 4 { + mods = append(mods, &ModuleJSON{ + Path: lines[i], + Dir: lines[i+1], + GoMod: lines[i+2], + GoVersion: lines[i+3], + Main: true, + }) + } + return mods, nil +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/gopathwalk/walk.go b/pkg/k8s/vendor/golang.org/x/tools/internal/gopathwalk/walk.go index 52f74e643be..8361515519f 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/gopathwalk/walk.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/gopathwalk/walk.go @@ -9,11 +9,13 @@ package gopathwalk import ( "bufio" "bytes" + "io" "io/fs" - "log" "os" "path/filepath" + "runtime" "strings" + "sync" "time" ) @@ -21,8 +23,13 @@ import ( type Options struct { // If Logf is non-nil, debug logging is enabled through this function. Logf func(format string, args ...interface{}) + // Search module caches. Also disables legacy goimports ignore rules. ModulesEnabled bool + + // Maximum number of concurrent calls to user-provided callbacks, + // or 0 for GOMAXPROCS. + Concurrency int } // RootType indicates the type of a Root. @@ -43,19 +50,28 @@ type Root struct { Type RootType } -// Walk walks Go source directories ($GOROOT, $GOPATH, etc) to find packages. +// Walk concurrently walks Go source directories ($GOROOT, $GOPATH, etc) to find packages. +// // For each package found, add will be called with the absolute // paths of the containing source directory and the package directory. +// +// Unlike filepath.WalkDir, Walk follows symbolic links +// (while guarding against cycles). func Walk(roots []Root, add func(root Root, dir string), opts Options) { WalkSkip(roots, add, func(Root, string) bool { return false }, opts) } -// WalkSkip walks Go source directories ($GOROOT, $GOPATH, etc) to find packages. +// WalkSkip concurrently walks Go source directories ($GOROOT, $GOPATH, etc) to +// find packages. +// // For each package found, add will be called with the absolute // paths of the containing source directory and the package directory. // For each directory that will be scanned, skip will be called // with the absolute paths of the containing source directory and the directory. // If skip returns false on a directory it will be processed. +// +// Unlike filepath.WalkDir, WalkSkip follows symbolic links +// (while guarding against cycles). func WalkSkip(roots []Root, add func(root Root, dir string), skip func(root Root, dir string) bool, opts Options) { for _, root := range roots { walkDir(root, add, skip, opts) @@ -64,45 +80,51 @@ func WalkSkip(roots []Root, add func(root Root, dir string), skip func(root Root // walkDir creates a walker and starts fastwalk with this walker. func walkDir(root Root, add func(Root, string), skip func(root Root, dir string) bool, opts Options) { + if opts.Logf == nil { + opts.Logf = func(format string, args ...interface{}) {} + } if _, err := os.Stat(root.Path); os.IsNotExist(err) { - if opts.Logf != nil { - opts.Logf("skipping nonexistent directory: %v", root.Path) - } + opts.Logf("skipping nonexistent directory: %v", root.Path) return } start := time.Now() - if opts.Logf != nil { - opts.Logf("scanning %s", root.Path) + opts.Logf("scanning %s", root.Path) + + concurrency := opts.Concurrency + if concurrency == 0 { + // The walk be either CPU-bound or I/O-bound, depending on what the + // caller-supplied add function does and the details of the user's platform + // and machine. Rather than trying to fine-tune the concurrency level for a + // specific environment, we default to GOMAXPROCS: it is likely to be a good + // choice for a CPU-bound add function, and if it is instead I/O-bound, then + // dealing with I/O saturation is arguably the job of the kernel and/or + // runtime. (Oversaturating I/O seems unlikely to harm performance as badly + // as failing to saturate would.) + concurrency = runtime.GOMAXPROCS(0) } - w := &walker{ - root: root, - add: add, - skip: skip, - opts: opts, - added: make(map[string]bool), + root: root, + add: add, + skip: skip, + opts: opts, + sem: make(chan struct{}, concurrency), } w.init() - // Add a trailing path separator to cause filepath.WalkDir to traverse symlinks. + w.sem <- struct{}{} path := root.Path - if len(path) == 0 { - path = "." + string(filepath.Separator) - } else if !os.IsPathSeparator(path[len(path)-1]) { - path = path + string(filepath.Separator) + if path == "" { + path = "." } - - if err := filepath.WalkDir(path, w.walk); err != nil { - logf := opts.Logf - if logf == nil { - logf = log.Printf - } - logf("scanning directory %v: %v", root.Path, err) + if fi, err := os.Lstat(path); err == nil { + w.walk(path, nil, fs.FileInfoToDirEntry(fi)) + } else { + w.opts.Logf("scanning directory %v: %v", root.Path, err) } + <-w.sem + w.walking.Wait() - if opts.Logf != nil { - opts.Logf("scanned %s in %v", root.Path, time.Since(start)) - } + opts.Logf("scanned %s in %v", root.Path, time.Since(start)) } // walker is the callback for fastwalk.Walk. @@ -112,10 +134,18 @@ type walker struct { skip func(Root, string) bool // The callback that will be invoked for every dir. dir is skipped if it returns true. opts Options // Options passed to Walk by the user. - pathSymlinks []os.FileInfo - ignoredDirs []string + walking sync.WaitGroup + sem chan struct{} // Channel of semaphore tokens; send to acquire, receive to release. + ignoredDirs []string - added map[string]bool + added sync.Map // map[string]bool +} + +// A symlinkList is a linked list of os.FileInfos for parent directories +// reached via symlinks. +type symlinkList struct { + info os.FileInfo + prev *symlinkList } // init initializes the walker based on its Options @@ -132,9 +162,7 @@ func (w *walker) init() { for _, p := range ignoredPaths { full := filepath.Join(w.root.Path, p) w.ignoredDirs = append(w.ignoredDirs, full) - if w.opts.Logf != nil { - w.opts.Logf("Directory added to ignore list: %s", full) - } + w.opts.Logf("Directory added to ignore list: %s", full) } } @@ -144,12 +172,10 @@ func (w *walker) init() { func (w *walker) getIgnoredDirs(path string) []string { file := filepath.Join(path, ".goimportsignore") slurp, err := os.ReadFile(file) - if w.opts.Logf != nil { - if err != nil { - w.opts.Logf("%v", err) - } else { - w.opts.Logf("Read %s", file) - } + if err != nil { + w.opts.Logf("%v", err) + } else { + w.opts.Logf("Read %s", file) } if err != nil { return nil @@ -183,149 +209,129 @@ func (w *walker) shouldSkipDir(dir string) bool { // walk walks through the given path. // -// Errors are logged if w.opts.Logf is non-nil, but otherwise ignored: -// walk returns only nil or fs.SkipDir. -func (w *walker) walk(path string, d fs.DirEntry, err error) error { - if err != nil { - // We have no way to report errors back through Walk or WalkSkip, - // so just log and ignore them. - if w.opts.Logf != nil { +// Errors are logged if w.opts.Logf is non-nil, but otherwise ignored. +func (w *walker) walk(path string, pathSymlinks *symlinkList, d fs.DirEntry) { + if d.Type()&os.ModeSymlink != 0 { + // Walk the symlink's target rather than the symlink itself. + // + // (Note that os.Stat, unlike the lower-lever os.Readlink, + // follows arbitrarily many layers of symlinks, so it will eventually + // reach either a non-symlink or a nonexistent target.) + // + // TODO(bcmills): 'go list all' itself ignores symlinks within GOROOT/src + // and GOPATH/src. Do we really need to traverse them here? If so, why? + + fi, err := os.Stat(path) + if err != nil { w.opts.Logf("%v", err) + return + } + + // Avoid walking symlink cycles: if we have already followed a symlink to + // this directory as a parent of itself, don't follow it again. + // + // This doesn't catch the first time through a cycle, but it also minimizes + // the number of extra stat calls we make if we *don't* encounter a cycle. + // Since we don't actually expect to encounter symlink cycles in practice, + // this seems like the right tradeoff. + for parent := pathSymlinks; parent != nil; parent = parent.prev { + if os.SameFile(fi, parent.info) { + return + } } - if d == nil { - // Nothing more to do: the error prevents us from knowing - // what path even represents. - return nil + + pathSymlinks = &symlinkList{ + info: fi, + prev: pathSymlinks, } + d = fs.FileInfoToDirEntry(fi) } if d.Type().IsRegular() { if !strings.HasSuffix(path, ".go") { - return nil + return } dir := filepath.Dir(path) if dir == w.root.Path && (w.root.Type == RootGOROOT || w.root.Type == RootGOPATH) { // Doesn't make sense to have regular files // directly in your $GOPATH/src or $GOROOT/src. - return nil + // + // TODO(bcmills): there are many levels of directory within + // RootModuleCache where this also wouldn't make sense, + // Can we generalize this to any directory without a corresponding + // import path? + return } - if !w.added[dir] { + if _, dup := w.added.LoadOrStore(dir, true); !dup { w.add(w.root, dir) - w.added[dir] = true } - return nil } - if d.IsDir() { - base := filepath.Base(path) - if base == "" || base[0] == '.' || base[0] == '_' || - base == "testdata" || - (w.root.Type == RootGOROOT && w.opts.ModulesEnabled && base == "vendor") || - (!w.opts.ModulesEnabled && base == "node_modules") { - return fs.SkipDir - } - if w.shouldSkipDir(path) { - return fs.SkipDir - } - return nil + if !d.IsDir() { + return } - if d.Type()&os.ModeSymlink != 0 { - // TODO(bcmills): 'go list all' itself ignores symlinks within GOROOT/src - // and GOPATH/src. Do we really need to traverse them here? If so, why? - - fi, err := os.Stat(path) - if err != nil || !fi.IsDir() { - // Not a directory. Just walk the file (or broken link) and be done. - return w.walk(path, fs.FileInfoToDirEntry(fi), err) - } - - // Avoid walking symlink cycles: if we have already followed a symlink to - // this directory as a parent of itself, don't follow it again. - // - // This doesn't catch the first time through a cycle, but it also minimizes - // the number of extra stat calls we make if we *don't* encounter a cycle. - // Since we don't actually expect to encounter symlink cycles in practice, - // this seems like the right tradeoff. - for _, parent := range w.pathSymlinks { - if os.SameFile(fi, parent) { - return nil - } - } + base := filepath.Base(path) + if base == "" || base[0] == '.' || base[0] == '_' || + base == "testdata" || + (w.root.Type == RootGOROOT && w.opts.ModulesEnabled && base == "vendor") || + (!w.opts.ModulesEnabled && base == "node_modules") || + w.shouldSkipDir(path) { + return + } - w.pathSymlinks = append(w.pathSymlinks, fi) - defer func() { - w.pathSymlinks = w.pathSymlinks[:len(w.pathSymlinks)-1] - }() + // Read the directory and walk its entries. - // On some platforms the OS (or the Go os package) sometimes fails to - // resolve directory symlinks before a trailing slash - // (even though POSIX requires it to do so). - // - // On macOS that failure may be caused by a known libc/kernel bug; - // see https://go.dev/issue/59586. - // - // On Windows before Go 1.21, it may be caused by a bug in - // os.Lstat (fixed in https://go.dev/cl/463177). - // - // Since we need to handle this explicitly on broken platforms anyway, - // it is simplest to just always do that and not rely on POSIX pathname - // resolution to walk the directory (such as by calling WalkDir with - // a trailing slash appended to the path). + f, err := os.Open(path) + if err != nil { + w.opts.Logf("%v", err) + return + } + defer f.Close() + + for { + // We impose an arbitrary limit on the number of ReadDir results per + // directory to limit the amount of memory consumed for stale or upcoming + // directory entries. The limit trades off CPU (number of syscalls to read + // the whole directory) against RAM (reachable directory entries other than + // the one currently being processed). // - // Instead, we make a sequence of walk calls — directly and through - // recursive calls to filepath.WalkDir — simulating what WalkDir would do - // if the symlink were a regular directory. - - // First we call walk on the path as a directory - // (instead of a symlink). - err = w.walk(path, fs.FileInfoToDirEntry(fi), nil) - if err == fs.SkipDir { - return nil - } else if err != nil { - // This should be impossible, but handle it anyway in case - // walk is changed to return other errors. - return err - } - - // Now read the directory and walk its entries. - ents, err := os.ReadDir(path) + // Since we process the directories recursively, we will end up maintaining + // a slice of entries for each level of the directory tree. + // (Compare https://go.dev/issue/36197.) + ents, err := f.ReadDir(1024) if err != nil { - // Report the ReadDir error, as filepath.WalkDir would do. - err = w.walk(path, fs.FileInfoToDirEntry(fi), err) - if err == fs.SkipDir { - return nil - } else if err != nil { - return err // Again, should be impossible. + if err != io.EOF { + w.opts.Logf("%v", err) } - // Fall through and iterate over whatever entries we did manage to get. + break } for _, d := range ents { nextPath := filepath.Join(path, d.Name()) if d.IsDir() { - // We want to walk the whole directory tree rooted at nextPath, - // not just the single entry for the directory. - err := filepath.WalkDir(nextPath, w.walk) - if err != nil && w.opts.Logf != nil { - w.opts.Logf("%v", err) - } - } else { - err := w.walk(nextPath, d, nil) - if err == fs.SkipDir { - // Skip the rest of the entries in the parent directory of nextPath - // (that is, path itself). - break - } else if err != nil { - return err // Again, should be impossible. + select { + case w.sem <- struct{}{}: + // Got a new semaphore token, so we can traverse the directory concurrently. + d := d + w.walking.Add(1) + go func() { + defer func() { + <-w.sem + w.walking.Done() + }() + w.walk(nextPath, pathSymlinks, d) + }() + continue + + default: + // No tokens available, so traverse serially. } } + + w.walk(nextPath, pathSymlinks, d) } - return nil } - - // Not a file, regular directory, or symlink; skip. - return nil } diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/fix.go b/pkg/k8s/vendor/golang.org/x/tools/internal/imports/fix.go index dd369c072e0..4569313a089 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/fix.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/imports/fix.go @@ -13,6 +13,7 @@ import ( "go/build" "go/parser" "go/token" + "go/types" "io/fs" "io/ioutil" "os" @@ -30,6 +31,7 @@ import ( "golang.org/x/tools/internal/event" "golang.org/x/tools/internal/gocommand" "golang.org/x/tools/internal/gopathwalk" + "golang.org/x/tools/internal/stdlib" ) // importToGroup is a list of functions which map from an import path to @@ -102,7 +104,10 @@ type packageInfo struct { // parseOtherFiles parses all the Go files in srcDir except filename, including // test files if filename looks like a test. -func parseOtherFiles(fset *token.FileSet, srcDir, filename string) []*ast.File { +// +// It returns an error only if ctx is cancelled. Files with parse errors are +// ignored. +func parseOtherFiles(ctx context.Context, fset *token.FileSet, srcDir, filename string) ([]*ast.File, error) { // This could use go/packages but it doesn't buy much, and it fails // with https://golang.org/issue/26296 in LoadFiles mode in some cases. considerTests := strings.HasSuffix(filename, "_test.go") @@ -110,11 +115,14 @@ func parseOtherFiles(fset *token.FileSet, srcDir, filename string) []*ast.File { fileBase := filepath.Base(filename) packageFileInfos, err := os.ReadDir(srcDir) if err != nil { - return nil + return nil, ctx.Err() } var files []*ast.File for _, fi := range packageFileInfos { + if ctx.Err() != nil { + return nil, ctx.Err() + } if fi.Name() == fileBase || !strings.HasSuffix(fi.Name(), ".go") { continue } @@ -130,7 +138,7 @@ func parseOtherFiles(fset *token.FileSet, srcDir, filename string) []*ast.File { files = append(files, f) } - return files + return files, ctx.Err() } // addGlobals puts the names of package vars into the provided map. @@ -299,6 +307,20 @@ func (p *pass) loadPackageNames(imports []*ImportInfo) error { return nil } +// if there is a trailing major version, remove it +func withoutVersion(nm string) string { + if v := path.Base(nm); len(v) > 0 && v[0] == 'v' { + if _, err := strconv.Atoi(v[1:]); err == nil { + // this is, for instance, called with rand/v2 and returns rand + if len(v) < len(nm) { + xnm := nm[:len(nm)-len(v)-1] + return path.Base(xnm) + } + } + } + return nm +} + // importIdentifier returns the identifier that imp will introduce. It will // guess if the package name has not been loaded, e.g. because the source // is not available. @@ -308,7 +330,7 @@ func (p *pass) importIdentifier(imp *ImportInfo) string { } known := p.knownPackages[imp.ImportPath] if known != nil && known.name != "" { - return known.name + return withoutVersion(known.name) } return ImportPathToAssumedName(imp.ImportPath) } @@ -510,9 +532,9 @@ func (p *pass) assumeSiblingImportsValid() { } for left, rights := range refs { if imp, ok := importsByName[left]; ok { - if m, ok := stdlib[imp.ImportPath]; ok { + if m, ok := stdlib.PackageSymbols[imp.ImportPath]; ok { // We have the stdlib in memory; no need to guess. - rights = copyExports(m) + rights = symbolNameSet(m) } p.addCandidate(imp, &packageInfo{ // no name; we already know it. @@ -541,12 +563,7 @@ func (p *pass) addCandidate(imp *ImportInfo, pkg *packageInfo) { // fixImports adds and removes imports from f so that all its references are // satisfied and there are no unused imports. -// -// This is declared as a variable rather than a function so goimports can -// easily be extended by adding a file with an init function. -var fixImports = fixImportsDefault - -func fixImportsDefault(fset *token.FileSet, f *ast.File, filename string, env *ProcessEnv) error { +func fixImports(fset *token.FileSet, f *ast.File, filename string, env *ProcessEnv) error { fixes, err := getFixes(context.Background(), fset, f, filename, env) if err != nil { return err @@ -576,7 +593,10 @@ func getFixes(ctx context.Context, fset *token.FileSet, f *ast.File, filename st return fixes, nil } - otherFiles := parseOtherFiles(fset, srcDir, filename) + otherFiles, err := parseOtherFiles(ctx, fset, srcDir, filename) + if err != nil { + return nil, err + } // Second pass: add information from other files in the same package, // like their package vars and imports. @@ -640,7 +660,7 @@ func getCandidatePkgs(ctx context.Context, wrappedCallback *scanCallback, filena dupCheck := map[string]struct{}{} // Start off with the standard library. - for importPath, exports := range stdlib { + for importPath, symbols := range stdlib.PackageSymbols { p := &pkg{ dir: filepath.Join(goenv["GOROOT"], "src", importPath), importPathShort: importPath, @@ -649,6 +669,13 @@ func getCandidatePkgs(ctx context.Context, wrappedCallback *scanCallback, filena } dupCheck[importPath] = struct{}{} if notSelf(p) && wrappedCallback.dirFound(p) && wrappedCallback.packageNameLoaded(p) { + var exports []stdlib.Symbol + for _, sym := range symbols { + switch sym.Kind { + case stdlib.Func, stdlib.Type, stdlib.Var, stdlib.Const: + exports = append(exports, sym) + } + } wrappedCallback.exportsLoaded(p, exports) } } @@ -669,7 +696,7 @@ func getCandidatePkgs(ctx context.Context, wrappedCallback *scanCallback, filena dupCheck[pkg.importPathShort] = struct{}{} return notSelf(pkg) && wrappedCallback.packageNameLoaded(pkg) }, - exportsLoaded: func(pkg *pkg, exports []string) { + exportsLoaded: func(pkg *pkg, exports []stdlib.Symbol) { // If we're an x_test, load the package under test's test variant. if strings.HasSuffix(filePkg, "_test") && pkg.dir == filepath.Dir(filename) { var err error @@ -700,20 +727,21 @@ func ScoreImportPaths(ctx context.Context, env *ProcessEnv, paths []string) (map return result, nil } -func PrimeCache(ctx context.Context, env *ProcessEnv) error { +func PrimeCache(ctx context.Context, resolver Resolver) error { // Fully scan the disk for directories, but don't actually read any Go files. callback := &scanCallback{ - rootFound: func(gopathwalk.Root) bool { - return true + rootFound: func(root gopathwalk.Root) bool { + // See getCandidatePkgs: walking GOROOT is apparently expensive and + // unnecessary. + return root.Type != gopathwalk.RootGOROOT }, dirFound: func(pkg *pkg) bool { return false }, - packageNameLoaded: func(pkg *pkg) bool { - return false - }, + // packageNameLoaded and exportsLoaded must never be called. } - return getCandidatePkgs(ctx, callback, "", "", env) + + return resolver.scan(ctx, callback) } func candidateImportName(pkg *pkg) string { @@ -793,7 +821,7 @@ func GetImportPaths(ctx context.Context, wrapped func(ImportFix), searchPrefix, // A PackageExport is a package and its exports. type PackageExport struct { Fix *ImportFix - Exports []string + Exports []stdlib.Symbol } // GetPackageExports returns all known packages with name pkg and their exports. @@ -808,8 +836,8 @@ func GetPackageExports(ctx context.Context, wrapped func(PackageExport), searchP packageNameLoaded: func(pkg *pkg) bool { return pkg.packageName == searchPkg }, - exportsLoaded: func(pkg *pkg, exports []string) { - sort.Strings(exports) + exportsLoaded: func(pkg *pkg, exports []stdlib.Symbol) { + sortSymbols(exports) wrapped(PackageExport{ Fix: &ImportFix{ StmtInfo: ImportInfo{ @@ -827,16 +855,45 @@ func GetPackageExports(ctx context.Context, wrapped func(PackageExport), searchP return getCandidatePkgs(ctx, callback, filename, filePkg, env) } -var requiredGoEnvVars = []string{"GO111MODULE", "GOFLAGS", "GOINSECURE", "GOMOD", "GOMODCACHE", "GONOPROXY", "GONOSUMDB", "GOPATH", "GOPROXY", "GOROOT", "GOSUMDB", "GOWORK"} +// TODO(rfindley): we should depend on GOOS and GOARCH, to provide accurate +// imports when doing cross-platform development. +var requiredGoEnvVars = []string{ + "GO111MODULE", + "GOFLAGS", + "GOINSECURE", + "GOMOD", + "GOMODCACHE", + "GONOPROXY", + "GONOSUMDB", + "GOPATH", + "GOPROXY", + "GOROOT", + "GOSUMDB", + "GOWORK", +} // ProcessEnv contains environment variables and settings that affect the use of // the go command, the go/build package, etc. +// +// ...a ProcessEnv *also* overwrites its Env along with derived state in the +// form of the resolver. And because it is lazily initialized, an env may just +// be broken and unusable, but there is no way for the caller to detect that: +// all queries will just fail. +// +// TODO(rfindley): refactor this package so that this type (perhaps renamed to +// just Env or Config) is an immutable configuration struct, to be exchanged +// for an initialized object via a constructor that returns an error. Perhaps +// the signature should be `func NewResolver(*Env) (*Resolver, error)`, where +// resolver is a concrete type used for resolving imports. Via this +// refactoring, we can avoid the need to call ProcessEnv.init and +// ProcessEnv.GoEnv everywhere, and implicitly fix all the places where this +// these are misused. Also, we'd delegate the caller the decision of how to +// handle a broken environment. type ProcessEnv struct { GocmdRunner *gocommand.Runner BuildFlags []string ModFlag string - ModFile string // SkipPathInScan returns true if the path should be skipped from scans of // the RootCurrentModule root type. The function argument is a clean, @@ -846,7 +903,7 @@ type ProcessEnv struct { // Env overrides the OS environment, and can be used to specify // GOPROXY, GO111MODULE, etc. PATH cannot be set here, because // exec.Command will not honor it. - // Specifying all of RequiredGoEnvVars avoids a call to `go env`. + // Specifying all of requiredGoEnvVars avoids a call to `go env`. Env map[string]string WorkingDir string @@ -854,9 +911,17 @@ type ProcessEnv struct { // If Logf is non-nil, debug logging is enabled through this function. Logf func(format string, args ...interface{}) - initialized bool + // If set, ModCache holds a shared cache of directory info to use across + // multiple ProcessEnvs. + ModCache *DirInfoCache - resolver Resolver + initialized bool // see TODO above + + // resolver and resolverErr are lazily evaluated (see GetResolver). + // This is unclean, but see the big TODO in the docstring for ProcessEnv + // above: for now, we can't be sure that the ProcessEnv is fully initialized. + resolver Resolver + resolverErr error } func (e *ProcessEnv) goEnv() (map[string]string, error) { @@ -936,20 +1001,33 @@ func (e *ProcessEnv) env() []string { } func (e *ProcessEnv) GetResolver() (Resolver, error) { - if e.resolver != nil { - return e.resolver, nil - } if err := e.init(); err != nil { return nil, err } - if len(e.Env["GOMOD"]) == 0 && len(e.Env["GOWORK"]) == 0 { - e.resolver = newGopathResolver(e) - return e.resolver, nil + + if e.resolver == nil && e.resolverErr == nil { + // TODO(rfindley): we should only use a gopathResolver here if the working + // directory is actually *in* GOPATH. (I seem to recall an open gopls issue + // for this behavior, but I can't find it). + // + // For gopls, we can optionally explicitly choose a resolver type, since we + // already know the view type. + if len(e.Env["GOMOD"]) == 0 && len(e.Env["GOWORK"]) == 0 { + e.resolver = newGopathResolver(e) + } else if r, err := newModuleResolver(e, e.ModCache); err != nil { + e.resolverErr = err + } else { + e.resolver = Resolver(r) + } } - e.resolver = newModuleResolver(e) - return e.resolver, nil + + return e.resolver, e.resolverErr } +// buildContext returns the build.Context to use for matching files. +// +// TODO(rfindley): support dynamic GOOS, GOARCH here, when doing cross-platform +// development. func (e *ProcessEnv) buildContext() (*build.Context, error) { ctx := build.Default goenv, err := e.goEnv() @@ -999,24 +1077,40 @@ func addStdlibCandidates(pass *pass, refs references) error { if err != nil { return err } + localbase := func(nm string) string { + ans := path.Base(nm) + if ans[0] == 'v' { + // this is called, for instance, with math/rand/v2 and returns rand/v2 + if _, err := strconv.Atoi(ans[1:]); err == nil { + ix := strings.LastIndex(nm, ans) + more := path.Base(nm[:ix]) + ans = path.Join(more, ans) + } + } + return ans + } add := func(pkg string) { // Prevent self-imports. if path.Base(pkg) == pass.f.Name.Name && filepath.Join(goenv["GOROOT"], "src", pkg) == pass.srcDir { return } - exports := copyExports(stdlib[pkg]) + exports := symbolNameSet(stdlib.PackageSymbols[pkg]) pass.addCandidate( &ImportInfo{ImportPath: pkg}, - &packageInfo{name: path.Base(pkg), exports: exports}) + &packageInfo{name: localbase(pkg), exports: exports}) } for left := range refs { if left == "rand" { - // Make sure we try crypto/rand before math/rand. + // Make sure we try crypto/rand before any version of math/rand as both have Int() + // and our policy is to recommend crypto add("crypto/rand") - add("math/rand") + // if the user's no later than go1.21, this should be "math/rand" + // but we have no way of figuring out what the user is using + // TODO: investigate using the toolchain version to disambiguate in the stdlib + add("math/rand/v2") continue } - for importPath := range stdlib { + for importPath := range stdlib.PackageSymbols { if path.Base(importPath) == left { add(importPath) } @@ -1029,15 +1123,23 @@ func addStdlibCandidates(pass *pass, refs references) error { type Resolver interface { // loadPackageNames loads the package names in importPaths. loadPackageNames(importPaths []string, srcDir string) (map[string]string, error) + // scan works with callback to search for packages. See scanCallback for details. scan(ctx context.Context, callback *scanCallback) error + // loadExports returns the set of exported symbols in the package at dir. // loadExports may be called concurrently. - loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []string, error) + loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []stdlib.Symbol, error) + // scoreImportPath returns the relevance for an import path. scoreImportPath(ctx context.Context, path string) float64 - ClearForNewScan() + // ClearForNewScan returns a new Resolver based on the receiver that has + // cleared its internal caches of directory contents. + // + // The new resolver should be primed and then set via + // [ProcessEnv.UpdateResolver]. + ClearForNewScan() Resolver } // A scanCallback controls a call to scan and receives its results. @@ -1056,7 +1158,7 @@ type scanCallback struct { // If it returns true, the package's exports will be loaded. packageNameLoaded func(pkg *pkg) bool // exportsLoaded is called when a package's exports have been loaded. - exportsLoaded func(pkg *pkg, exports []string) + exportsLoaded func(pkg *pkg, exports []stdlib.Symbol) } func addExternalCandidates(ctx context.Context, pass *pass, refs references, filename string) error { @@ -1094,7 +1196,7 @@ func addExternalCandidates(ctx context.Context, pass *pass, refs references, fil if err != nil { return err } - if err = resolver.scan(context.Background(), callback); err != nil { + if err = resolver.scan(ctx, callback); err != nil { return err } @@ -1105,7 +1207,7 @@ func addExternalCandidates(ctx context.Context, pass *pass, refs references, fil } results := make(chan result, len(refs)) - ctx, cancel := context.WithCancel(context.TODO()) + ctx, cancel := context.WithCancel(ctx) var wg sync.WaitGroup defer func() { cancel() @@ -1120,7 +1222,7 @@ func addExternalCandidates(ctx context.Context, pass *pass, refs references, fil go func(pkgName string, symbols map[string]bool) { defer wg.Done() - found, err := findImport(ctx, pass, found[pkgName], pkgName, symbols, filename) + found, err := findImport(ctx, pass, found[pkgName], pkgName, symbols) if err != nil { firstErrOnce.Do(func() { @@ -1151,6 +1253,17 @@ func addExternalCandidates(ctx context.Context, pass *pass, refs references, fil }() for result := range results { + // Don't offer completions that would shadow predeclared + // names, such as github.com/coreos/etcd/error. + if types.Universe.Lookup(result.pkg.name) != nil { // predeclared + // Ideally we would skip this candidate only + // if the predeclared name is actually + // referenced by the file, but that's a lot + // trickier to compute and would still create + // an import that is likely to surprise the + // user before long. + continue + } pass.addCandidate(result.imp, result.pkg) } return firstErr @@ -1193,31 +1306,22 @@ func ImportPathToAssumedName(importPath string) string { type gopathResolver struct { env *ProcessEnv walked bool - cache *dirInfoCache + cache *DirInfoCache scanSema chan struct{} // scanSema prevents concurrent scans. } func newGopathResolver(env *ProcessEnv) *gopathResolver { r := &gopathResolver{ - env: env, - cache: &dirInfoCache{ - dirs: map[string]*directoryPackageInfo{}, - listeners: map[*int]cacheListener{}, - }, + env: env, + cache: NewDirInfoCache(), scanSema: make(chan struct{}, 1), } r.scanSema <- struct{}{} return r } -func (r *gopathResolver) ClearForNewScan() { - <-r.scanSema - r.cache = &dirInfoCache{ - dirs: map[string]*directoryPackageInfo{}, - listeners: map[*int]cacheListener{}, - } - r.walked = false - r.scanSema <- struct{}{} +func (r *gopathResolver) ClearForNewScan() Resolver { + return newGopathResolver(r.env) } func (r *gopathResolver) loadPackageNames(importPaths []string, srcDir string) (map[string]string, error) { @@ -1235,7 +1339,7 @@ func (r *gopathResolver) loadPackageNames(importPaths []string, srcDir string) ( // importPathToName finds out the actual package name, as declared in its .go files. func importPathToName(bctx *build.Context, importPath, srcDir string) string { // Fast path for standard library without going to disk. - if _, ok := stdlib[importPath]; ok { + if stdlib.HasPackage(importPath) { return path.Base(importPath) // stdlib packages always match their paths. } @@ -1433,7 +1537,7 @@ func (r *gopathResolver) scan(ctx context.Context, callback *scanCallback) error } func (r *gopathResolver) scoreImportPath(ctx context.Context, path string) float64 { - if _, ok := stdlib[path]; ok { + if stdlib.HasPackage(path) { return MaxRelevance } return MaxRelevance - 1 @@ -1450,7 +1554,7 @@ func filterRoots(roots []gopathwalk.Root, include func(gopathwalk.Root) bool) [] return result } -func (r *gopathResolver) loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []string, error) { +func (r *gopathResolver) loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []stdlib.Symbol, error) { if info, ok := r.cache.Load(pkg.dir); ok && !includeTest { return r.cache.CacheExports(ctx, r.env, info) } @@ -1470,7 +1574,7 @@ func VendorlessPath(ipath string) string { return ipath } -func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, includeTest bool) (string, []string, error) { +func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, includeTest bool) (string, []stdlib.Symbol, error) { // Look for non-test, buildable .go files which could provide exports. all, err := os.ReadDir(dir) if err != nil { @@ -1494,7 +1598,7 @@ func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, incl } var pkgName string - var exports []string + var exports []stdlib.Symbol fset := token.NewFileSet() for _, fi := range files { select { @@ -1521,24 +1625,44 @@ func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, incl continue } pkgName = f.Name.Name - for name := range f.Scope.Objects { + for name, obj := range f.Scope.Objects { if ast.IsExported(name) { - exports = append(exports, name) + var kind stdlib.Kind + switch obj.Kind { + case ast.Con: + kind = stdlib.Const + case ast.Typ: + kind = stdlib.Type + case ast.Var: + kind = stdlib.Var + case ast.Fun: + kind = stdlib.Func + } + exports = append(exports, stdlib.Symbol{ + Name: name, + Kind: kind, + Version: 0, // unknown; be permissive + }) } } } + sortSymbols(exports) if env.Logf != nil { - sortedExports := append([]string(nil), exports...) - sort.Strings(sortedExports) - env.Logf("loaded exports in dir %v (package %v): %v", dir, pkgName, strings.Join(sortedExports, ", ")) + env.Logf("loaded exports in dir %v (package %v): %v", dir, pkgName, exports) } return pkgName, exports, nil } +func sortSymbols(syms []stdlib.Symbol) { + sort.Slice(syms, func(i, j int) bool { + return syms[i].Name < syms[j].Name + }) +} + // findImport searches for a package with the given symbols. // If no package is found, findImport returns ("", false, nil) -func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgName string, symbols map[string]bool, filename string) (*pkg, error) { +func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgName string, symbols map[string]bool) (*pkg, error) { // Sort the candidates by their import package length, // assuming that shorter package names are better than long // ones. Note that this sorts by the de-vendored name, so @@ -1602,7 +1726,7 @@ func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgNa exportsMap := make(map[string]bool, len(exports)) for _, sym := range exports { - exportsMap[sym] = true + exportsMap[sym.Name] = true } // If it doesn't have the right @@ -1760,10 +1884,13 @@ func (fn visitFn) Visit(node ast.Node) ast.Visitor { return fn(node) } -func copyExports(pkg []string) map[string]bool { - m := make(map[string]bool, len(pkg)) - for _, v := range pkg { - m[v] = true +func symbolNameSet(symbols []stdlib.Symbol) map[string]bool { + names := make(map[string]bool) + for _, sym := range symbols { + switch sym.Kind { + case stdlib.Const, stdlib.Var, stdlib.Type, stdlib.Func: + names[sym.Name] = true + } } - return m + return names } diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/imports.go b/pkg/k8s/vendor/golang.org/x/tools/internal/imports/imports.go index 58e637b90f2..f83465520a4 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/imports.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/imports/imports.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:generate go run mkstdlib.go - // Package imports implements a Go pretty-printer (like package "go/format") // that also adds or removes import statements as necessary. package imports @@ -109,7 +107,7 @@ func ApplyFixes(fixes []*ImportFix, filename string, src []byte, opt *Options, e } // formatFile formats the file syntax tree. -// It may mutate the token.FileSet. +// It may mutate the token.FileSet and the ast.File. // // If an adjust function is provided, it is called after formatting // with the original source (formatFile's src parameter) and the @@ -236,7 +234,7 @@ func parse(fset *token.FileSet, filename string, src []byte, opt *Options) (*ast src = src[:len(src)-len("}\n")] // Gofmt has also indented the function body one level. // Remove that indent. - src = bytes.Replace(src, []byte("\n\t"), []byte("\n"), -1) + src = bytes.ReplaceAll(src, []byte("\n\t"), []byte("\n")) return matchSpace(orig, src) } return file, adjust, nil diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/mod.go b/pkg/k8s/vendor/golang.org/x/tools/internal/imports/mod.go index 5f4d435d3cc..82fe644a189 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/mod.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/imports/mod.go @@ -21,78 +21,138 @@ import ( "golang.org/x/tools/internal/event" "golang.org/x/tools/internal/gocommand" "golang.org/x/tools/internal/gopathwalk" + "golang.org/x/tools/internal/stdlib" ) -// ModuleResolver implements resolver for modules using the go command as little -// as feasible. +// Notes(rfindley): ModuleResolver appears to be heavily optimized for scanning +// as fast as possible, which is desirable for a call to goimports from the +// command line, but it doesn't work as well for gopls, where it suffers from +// slow startup (golang/go#44863) and intermittent hanging (golang/go#59216), +// both caused by populating the cache, albeit in slightly different ways. +// +// A high level list of TODOs: +// - Optimize the scan itself, as there is some redundancy statting and +// reading go.mod files. +// - Invert the relationship between ProcessEnv and Resolver (see the +// docstring of ProcessEnv). +// - Make it easier to use an external resolver implementation. +// +// Smaller TODOs are annotated in the code below. + +// ModuleResolver implements the Resolver interface for a workspace using +// modules. +// +// A goal of the ModuleResolver is to invoke the Go command as little as +// possible. To this end, it runs the Go command only for listing module +// information (i.e. `go list -m -e -json ...`). Package scanning, the process +// of loading package information for the modules, is implemented internally +// via the scan method. +// +// It has two types of state: the state derived from the go command, which +// is populated by init, and the state derived from scans, which is populated +// via scan. A root is considered scanned if it has been walked to discover +// directories. However, if the scan did not require additional information +// from the directory (such as package name or exports), the directory +// information itself may be partially populated. It will be lazily filled in +// as needed by scans, using the scanCallback. type ModuleResolver struct { - env *ProcessEnv - moduleCacheDir string - dummyVendorMod *gocommand.ModuleJSON // If vendoring is enabled, the pseudo-module that represents the /vendor directory. - roots []gopathwalk.Root - scanSema chan struct{} // scanSema prevents concurrent scans and guards scannedRoots. - scannedRoots map[gopathwalk.Root]bool - - initialized bool - mains []*gocommand.ModuleJSON - mainByDir map[string]*gocommand.ModuleJSON - modsByModPath []*gocommand.ModuleJSON // All modules, ordered by # of path components in module Path... - modsByDir []*gocommand.ModuleJSON // ...or number of path components in their Dir. - - // moduleCacheCache stores information about the module cache. - moduleCacheCache *dirInfoCache - otherCache *dirInfoCache + env *ProcessEnv + + // Module state, populated during construction + dummyVendorMod *gocommand.ModuleJSON // if vendoring is enabled, a pseudo-module to represent the /vendor directory + moduleCacheDir string // GOMODCACHE, inferred from GOPATH if unset + roots []gopathwalk.Root // roots to scan, in approximate order of importance + mains []*gocommand.ModuleJSON // main modules + mainByDir map[string]*gocommand.ModuleJSON // module information by dir, to join with roots + modsByModPath []*gocommand.ModuleJSON // all modules, ordered by # of path components in their module path + modsByDir []*gocommand.ModuleJSON // ...or by the number of path components in their Dir. + + // Scanning state, populated by scan + + // scanSema prevents concurrent scans, and guards scannedRoots and the cache + // fields below (though the caches themselves are concurrency safe). + // Receive to acquire, send to release. + scanSema chan struct{} + scannedRoots map[gopathwalk.Root]bool // if true, root has been walked + + // Caches of directory info, populated by scans and scan callbacks + // + // moduleCacheCache stores cached information about roots in the module + // cache, which are immutable and therefore do not need to be invalidated. + // + // otherCache stores information about all other roots (even GOROOT), which + // may change. + moduleCacheCache *DirInfoCache + otherCache *DirInfoCache } -func newModuleResolver(e *ProcessEnv) *ModuleResolver { +// newModuleResolver returns a new module-aware goimports resolver. +// +// Note: use caution when modifying this constructor: changes must also be +// reflected in ModuleResolver.ClearForNewScan. +func newModuleResolver(e *ProcessEnv, moduleCacheCache *DirInfoCache) (*ModuleResolver, error) { r := &ModuleResolver{ env: e, scanSema: make(chan struct{}, 1), } - r.scanSema <- struct{}{} - return r -} - -func (r *ModuleResolver) init() error { - if r.initialized { - return nil - } + r.scanSema <- struct{}{} // release goenv, err := r.env.goEnv() if err != nil { - return err + return nil, err } + + // TODO(rfindley): can we refactor to share logic with r.env.invokeGo? inv := gocommand.Invocation{ BuildFlags: r.env.BuildFlags, ModFlag: r.env.ModFlag, - ModFile: r.env.ModFile, Env: r.env.env(), Logf: r.env.Logf, WorkingDir: r.env.WorkingDir, } vendorEnabled := false - var mainModVendor *gocommand.ModuleJSON - - // Module vendor directories are ignored in workspace mode: - // https://go.googlesource.com/proposal/+/master/design/45713-workspace.md - if len(r.env.Env["GOWORK"]) == 0 { + var mainModVendor *gocommand.ModuleJSON // for module vendoring + var mainModsVendor []*gocommand.ModuleJSON // for workspace vendoring + + goWork := r.env.Env["GOWORK"] + if len(goWork) == 0 { + // TODO(rfindley): VendorEnabled runs the go command to get GOFLAGS, but + // they should be available from the ProcessEnv. Can we avoid the redundant + // invocation? vendorEnabled, mainModVendor, err = gocommand.VendorEnabled(context.TODO(), inv, r.env.GocmdRunner) if err != nil { - return err + return nil, err + } + } else { + vendorEnabled, mainModsVendor, err = gocommand.WorkspaceVendorEnabled(context.Background(), inv, r.env.GocmdRunner) + if err != nil { + return nil, err } } - if mainModVendor != nil && vendorEnabled { - // Vendor mode is on, so all the non-Main modules are irrelevant, - // and we need to search /vendor for everything. - r.mains = []*gocommand.ModuleJSON{mainModVendor} - r.dummyVendorMod = &gocommand.ModuleJSON{ - Path: "", - Dir: filepath.Join(mainModVendor.Dir, "vendor"), + if vendorEnabled { + if mainModVendor != nil { + // Module vendor mode is on, so all the non-Main modules are irrelevant, + // and we need to search /vendor for everything. + r.mains = []*gocommand.ModuleJSON{mainModVendor} + r.dummyVendorMod = &gocommand.ModuleJSON{ + Path: "", + Dir: filepath.Join(mainModVendor.Dir, "vendor"), + } + r.modsByModPath = []*gocommand.ModuleJSON{mainModVendor, r.dummyVendorMod} + r.modsByDir = []*gocommand.ModuleJSON{mainModVendor, r.dummyVendorMod} + } else { + // Workspace vendor mode is on, so all the non-Main modules are irrelevant, + // and we need to search /vendor for everything. + r.mains = mainModsVendor + r.dummyVendorMod = &gocommand.ModuleJSON{ + Path: "", + Dir: filepath.Join(filepath.Dir(goWork), "vendor"), + } + r.modsByModPath = append(append([]*gocommand.ModuleJSON{}, mainModsVendor...), r.dummyVendorMod) + r.modsByDir = append(append([]*gocommand.ModuleJSON{}, mainModsVendor...), r.dummyVendorMod) } - r.modsByModPath = []*gocommand.ModuleJSON{mainModVendor, r.dummyVendorMod} - r.modsByDir = []*gocommand.ModuleJSON{mainModVendor, r.dummyVendorMod} } else { // Vendor mode is off, so run go list -m ... to find everything. err := r.initAllMods() @@ -100,19 +160,14 @@ func (r *ModuleResolver) init() error { // GO111MODULE=on. Other errors are fatal. if err != nil { if errMsg := err.Error(); !strings.Contains(errMsg, "working directory is not part of a module") && !strings.Contains(errMsg, "go.mod file not found") { - return err + return nil, err } } } - if gmc := r.env.Env["GOMODCACHE"]; gmc != "" { - r.moduleCacheDir = gmc - } else { - gopaths := filepath.SplitList(goenv["GOPATH"]) - if len(gopaths) == 0 { - return fmt.Errorf("empty GOPATH") - } - r.moduleCacheDir = filepath.Join(gopaths[0], "/pkg/mod") + r.moduleCacheDir = gomodcacheForEnv(goenv) + if r.moduleCacheDir == "" { + return nil, fmt.Errorf("cannot resolve GOMODCACHE") } sort.Slice(r.modsByModPath, func(i, j int) bool { @@ -128,8 +183,9 @@ func (r *ModuleResolver) init() error { return count(j) < count(i) // descending order }) - r.roots = []gopathwalk.Root{ - {Path: filepath.Join(goenv["GOROOT"], "/src"), Type: gopathwalk.RootGOROOT}, + r.roots = []gopathwalk.Root{} + if goenv["GOROOT"] != "" { // "" happens in tests + r.roots = append(r.roots, gopathwalk.Root{Path: filepath.Join(goenv["GOROOT"], "/src"), Type: gopathwalk.RootGOROOT}) } r.mainByDir = make(map[string]*gocommand.ModuleJSON) for _, main := range r.mains { @@ -141,7 +197,11 @@ func (r *ModuleResolver) init() error { } else { addDep := func(mod *gocommand.ModuleJSON) { if mod.Replace == nil { - // This is redundant with the cache, but we'll skip it cheaply enough. + // This is redundant with the cache, but we'll skip it cheaply enough + // when we encounter it in the module cache scan. + // + // Including it at a lower index in r.roots than the module cache dir + // helps prioritize matches from within existing dependencies. r.roots = append(r.roots, gopathwalk.Root{Path: mod.Dir, Type: gopathwalk.RootModuleCache}) } else { r.roots = append(r.roots, gopathwalk.Root{Path: mod.Dir, Type: gopathwalk.RootOther}) @@ -158,24 +218,40 @@ func (r *ModuleResolver) init() error { addDep(mod) } } + // If provided, share the moduleCacheCache. + // + // TODO(rfindley): The module cache is immutable. However, the loaded + // exports do depend on GOOS and GOARCH. Fortunately, the + // ProcessEnv.buildContext does not adjust these from build.DefaultContext + // (even though it should). So for now, this is OK to share, but we need to + // add logic for handling GOOS/GOARCH. + r.moduleCacheCache = moduleCacheCache r.roots = append(r.roots, gopathwalk.Root{Path: r.moduleCacheDir, Type: gopathwalk.RootModuleCache}) } r.scannedRoots = map[gopathwalk.Root]bool{} if r.moduleCacheCache == nil { - r.moduleCacheCache = &dirInfoCache{ - dirs: map[string]*directoryPackageInfo{}, - listeners: map[*int]cacheListener{}, - } - } - if r.otherCache == nil { - r.otherCache = &dirInfoCache{ - dirs: map[string]*directoryPackageInfo{}, - listeners: map[*int]cacheListener{}, - } + r.moduleCacheCache = NewDirInfoCache() } - r.initialized = true - return nil + r.otherCache = NewDirInfoCache() + return r, nil +} + +// gomodcacheForEnv returns the GOMODCACHE value to use based on the given env +// map, which must have GOMODCACHE and GOPATH populated. +// +// TODO(rfindley): this is defensive refactoring. +// 1. Is this even relevant anymore? Can't we just read GOMODCACHE. +// 2. Use this to separate module cache scanning from other scanning. +func gomodcacheForEnv(goenv map[string]string) string { + if gmc := goenv["GOMODCACHE"]; gmc != "" { + return gmc + } + gopaths := filepath.SplitList(goenv["GOPATH"]) + if len(gopaths) == 0 { + return "" + } + return filepath.Join(gopaths[0], "/pkg/mod") } func (r *ModuleResolver) initAllMods() error { @@ -206,30 +282,86 @@ func (r *ModuleResolver) initAllMods() error { return nil } -func (r *ModuleResolver) ClearForNewScan() { - <-r.scanSema - r.scannedRoots = map[gopathwalk.Root]bool{} - r.otherCache = &dirInfoCache{ - dirs: map[string]*directoryPackageInfo{}, - listeners: map[*int]cacheListener{}, +// ClearForNewScan invalidates the last scan. +// +// It preserves the set of roots, but forgets about the set of directories. +// Though it forgets the set of module cache directories, it remembers their +// contents, since they are assumed to be immutable. +func (r *ModuleResolver) ClearForNewScan() Resolver { + <-r.scanSema // acquire r, to guard scannedRoots + r2 := &ModuleResolver{ + env: r.env, + dummyVendorMod: r.dummyVendorMod, + moduleCacheDir: r.moduleCacheDir, + roots: r.roots, + mains: r.mains, + mainByDir: r.mainByDir, + modsByModPath: r.modsByModPath, + + scanSema: make(chan struct{}, 1), + scannedRoots: make(map[gopathwalk.Root]bool), + otherCache: NewDirInfoCache(), + moduleCacheCache: r.moduleCacheCache, + } + r2.scanSema <- struct{}{} // r2 must start released + // Invalidate root scans. We don't need to invalidate module cache roots, + // because they are immutable. + // (We don't support a use case where GOMODCACHE is cleaned in the middle of + // e.g. a gopls session: the user must restart gopls to get accurate + // imports.) + // + // Scanning for new directories in GOMODCACHE should be handled elsewhere, + // via a call to ScanModuleCache. + for _, root := range r.roots { + if root.Type == gopathwalk.RootModuleCache && r.scannedRoots[root] { + r2.scannedRoots[root] = true + } } - r.scanSema <- struct{}{} + r.scanSema <- struct{}{} // release r + return r2 } -func (r *ModuleResolver) ClearForNewMod() { - <-r.scanSema - *r = ModuleResolver{ - env: r.env, - moduleCacheCache: r.moduleCacheCache, - otherCache: r.otherCache, - scanSema: r.scanSema, +// ClearModuleInfo invalidates resolver state that depends on go.mod file +// contents (essentially, the output of go list -m -json ...). +// +// Notably, it does not forget directory contents, which are reset +// asynchronously via ClearForNewScan. +// +// If the ProcessEnv is a GOPATH environment, ClearModuleInfo is a no op. +// +// TODO(rfindley): move this to a new env.go, consolidating ProcessEnv methods. +func (e *ProcessEnv) ClearModuleInfo() { + if r, ok := e.resolver.(*ModuleResolver); ok { + resolver, err := newModuleResolver(e, e.ModCache) + if err != nil { + e.resolver = nil + e.resolverErr = err + return + } + + <-r.scanSema // acquire (guards caches) + resolver.moduleCacheCache = r.moduleCacheCache + resolver.otherCache = r.otherCache + r.scanSema <- struct{}{} // release + + e.UpdateResolver(resolver) } - r.init() - r.scanSema <- struct{}{} } -// findPackage returns the module and directory that contains the package at -// the given import path, or returns nil, "" if no module is in scope. +// UpdateResolver sets the resolver for the ProcessEnv to use in imports +// operations. Only for use with the result of [Resolver.ClearForNewScan]. +// +// TODO(rfindley): this awkward API is a result of the (arguably) inverted +// relationship between configuration and state described in the doc comment +// for [ProcessEnv]. +func (e *ProcessEnv) UpdateResolver(r Resolver) { + e.resolver = r + e.resolverErr = nil +} + +// findPackage returns the module and directory from within the main modules +// and their dependencies that contains the package at the given import path, +// or returns nil, "" if no module is in scope. func (r *ModuleResolver) findPackage(importPath string) (*gocommand.ModuleJSON, string) { // This can't find packages in the stdlib, but that's harmless for all // the existing code paths. @@ -295,10 +427,6 @@ func (r *ModuleResolver) cacheStore(info directoryPackageInfo) { } } -func (r *ModuleResolver) cacheKeys() []string { - return append(r.moduleCacheCache.Keys(), r.otherCache.Keys()...) -} - // cachePackageName caches the package name for a dir already in the cache. func (r *ModuleResolver) cachePackageName(info directoryPackageInfo) (string, error) { if info.rootType == gopathwalk.RootModuleCache { @@ -307,7 +435,7 @@ func (r *ModuleResolver) cachePackageName(info directoryPackageInfo) (string, er return r.otherCache.CachePackageName(info) } -func (r *ModuleResolver) cacheExports(ctx context.Context, env *ProcessEnv, info directoryPackageInfo) (string, []string, error) { +func (r *ModuleResolver) cacheExports(ctx context.Context, env *ProcessEnv, info directoryPackageInfo) (string, []stdlib.Symbol, error) { if info.rootType == gopathwalk.RootModuleCache { return r.moduleCacheCache.CacheExports(ctx, env, info) } @@ -367,15 +495,15 @@ func (r *ModuleResolver) dirIsNestedModule(dir string, mod *gocommand.ModuleJSON return modDir != mod.Dir } -func (r *ModuleResolver) modInfo(dir string) (modDir string, modName string) { - readModName := func(modFile string) string { - modBytes, err := os.ReadFile(modFile) - if err != nil { - return "" - } - return modulePath(modBytes) +func readModName(modFile string) string { + modBytes, err := os.ReadFile(modFile) + if err != nil { + return "" } + return modulePath(modBytes) +} +func (r *ModuleResolver) modInfo(dir string) (modDir, modName string) { if r.dirInModuleCache(dir) { if matches := modCacheRegexp.FindStringSubmatch(dir); len(matches) == 3 { index := strings.Index(dir, matches[1]+"@"+matches[2]) @@ -409,11 +537,9 @@ func (r *ModuleResolver) dirInModuleCache(dir string) bool { } func (r *ModuleResolver) loadPackageNames(importPaths []string, srcDir string) (map[string]string, error) { - if err := r.init(); err != nil { - return nil, err - } names := map[string]string{} for _, path := range importPaths { + // TODO(rfindley): shouldn't this use the dirInfoCache? _, packageDir := r.findPackage(path) if packageDir == "" { continue @@ -431,10 +557,6 @@ func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error ctx, done := event.Start(ctx, "imports.ModuleResolver.scan") defer done() - if err := r.init(); err != nil { - return err - } - processDir := func(info directoryPackageInfo) { // Skip this directory if we were not able to get the package information successfully. if scanned, err := info.reachedStatus(directoryScanned); !scanned || err != nil { @@ -444,18 +566,18 @@ func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error if err != nil { return } - if !callback.dirFound(pkg) { return } + pkg.packageName, err = r.cachePackageName(info) if err != nil { return } - if !callback.packageNameLoaded(pkg) { return } + _, exports, err := r.loadExports(ctx, pkg, false) if err != nil { return @@ -494,7 +616,6 @@ func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error return packageScanned } - // Add anything new to the cache, and process it if we're still listening. add := func(root gopathwalk.Root, dir string) { r.cacheStore(r.scanDirForPackage(root, dir)) } @@ -509,9 +630,9 @@ func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error select { case <-ctx.Done(): return - case <-r.scanSema: + case <-r.scanSema: // acquire } - defer func() { r.scanSema <- struct{}{} }() + defer func() { r.scanSema <- struct{}{} }() // release // We have the lock on r.scannedRoots, and no other scans can run. for _, root := range roots { if ctx.Err() != nil { @@ -534,7 +655,7 @@ func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error } func (r *ModuleResolver) scoreImportPath(ctx context.Context, path string) float64 { - if _, ok := stdlib[path]; ok { + if stdlib.HasPackage(path) { return MaxRelevance } mod, _ := r.findPackage(path) @@ -612,10 +733,7 @@ func (r *ModuleResolver) canonicalize(info directoryPackageInfo) (*pkg, error) { return res, nil } -func (r *ModuleResolver) loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []string, error) { - if err := r.init(); err != nil { - return "", nil, err - } +func (r *ModuleResolver) loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []stdlib.Symbol, error) { if info, ok := r.cacheLoad(pkg.dir); ok && !includeTest { return r.cacheExports(ctx, r.env, info) } diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/mod_cache.go b/pkg/k8s/vendor/golang.org/x/tools/internal/imports/mod_cache.go index 45690abbb4f..b1192696b28 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/mod_cache.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/imports/mod_cache.go @@ -7,9 +7,14 @@ package imports import ( "context" "fmt" + "path" + "path/filepath" + "strings" "sync" + "golang.org/x/mod/module" "golang.org/x/tools/internal/gopathwalk" + "golang.org/x/tools/internal/stdlib" ) // To find packages to import, the resolver needs to know about all of @@ -39,6 +44,8 @@ const ( exportsLoaded ) +// directoryPackageInfo holds (possibly incomplete) information about packages +// contained in a given directory. type directoryPackageInfo struct { // status indicates the extent to which this struct has been filled in. status directoryPackageStatus @@ -63,8 +70,11 @@ type directoryPackageInfo struct { packageName string // the package name, as declared in the source. // Set when status >= exportsLoaded. - - exports []string + // TODO(rfindley): it's hard to see this, but exports depend implicitly on + // the default build context GOOS and GOARCH. + // + // We can make this explicit, and key exports by GOOS, GOARCH. + exports []stdlib.Symbol } // reachedStatus returns true when info has a status at least target and any error associated with @@ -79,7 +89,7 @@ func (info *directoryPackageInfo) reachedStatus(target directoryPackageStatus) ( return true, nil } -// dirInfoCache is a concurrency safe map for storing information about +// DirInfoCache is a concurrency-safe map for storing information about // directories that may contain packages. // // The information in this cache is built incrementally. Entries are initialized in scan. @@ -92,21 +102,26 @@ func (info *directoryPackageInfo) reachedStatus(target directoryPackageStatus) ( // The information in the cache is not expected to change for the cache's // lifetime, so there is no protection against competing writes. Users should // take care not to hold the cache across changes to the underlying files. -// -// TODO(suzmue): consider other concurrency strategies and data structures (RWLocks, sync.Map, etc) -type dirInfoCache struct { +type DirInfoCache struct { mu sync.Mutex // dirs stores information about packages in directories, keyed by absolute path. dirs map[string]*directoryPackageInfo listeners map[*int]cacheListener } +func NewDirInfoCache() *DirInfoCache { + return &DirInfoCache{ + dirs: make(map[string]*directoryPackageInfo), + listeners: make(map[*int]cacheListener), + } +} + type cacheListener func(directoryPackageInfo) // ScanAndListen calls listener on all the items in the cache, and on anything // newly added. The returned stop function waits for all in-flight callbacks to // finish and blocks new ones. -func (d *dirInfoCache) ScanAndListen(ctx context.Context, listener cacheListener) func() { +func (d *DirInfoCache) ScanAndListen(ctx context.Context, listener cacheListener) func() { ctx, cancel := context.WithCancel(ctx) // Flushing out all the callbacks is tricky without knowing how many there @@ -162,8 +177,10 @@ func (d *dirInfoCache) ScanAndListen(ctx context.Context, listener cacheListener } // Store stores the package info for dir. -func (d *dirInfoCache) Store(dir string, info directoryPackageInfo) { +func (d *DirInfoCache) Store(dir string, info directoryPackageInfo) { d.mu.Lock() + // TODO(rfindley, golang/go#59216): should we overwrite an existing entry? + // That seems incorrect as the cache should be idempotent. _, old := d.dirs[dir] d.dirs[dir] = &info var listeners []cacheListener @@ -180,7 +197,7 @@ func (d *dirInfoCache) Store(dir string, info directoryPackageInfo) { } // Load returns a copy of the directoryPackageInfo for absolute directory dir. -func (d *dirInfoCache) Load(dir string) (directoryPackageInfo, bool) { +func (d *DirInfoCache) Load(dir string) (directoryPackageInfo, bool) { d.mu.Lock() defer d.mu.Unlock() info, ok := d.dirs[dir] @@ -191,7 +208,7 @@ func (d *dirInfoCache) Load(dir string) (directoryPackageInfo, bool) { } // Keys returns the keys currently present in d. -func (d *dirInfoCache) Keys() (keys []string) { +func (d *DirInfoCache) Keys() (keys []string) { d.mu.Lock() defer d.mu.Unlock() for key := range d.dirs { @@ -200,7 +217,7 @@ func (d *dirInfoCache) Keys() (keys []string) { return keys } -func (d *dirInfoCache) CachePackageName(info directoryPackageInfo) (string, error) { +func (d *DirInfoCache) CachePackageName(info directoryPackageInfo) (string, error) { if loaded, err := info.reachedStatus(nameLoaded); loaded { return info.packageName, err } @@ -213,7 +230,7 @@ func (d *dirInfoCache) CachePackageName(info directoryPackageInfo) (string, erro return info.packageName, info.err } -func (d *dirInfoCache) CacheExports(ctx context.Context, env *ProcessEnv, info directoryPackageInfo) (string, []string, error) { +func (d *DirInfoCache) CacheExports(ctx context.Context, env *ProcessEnv, info directoryPackageInfo) (string, []stdlib.Symbol, error) { if reached, _ := info.reachedStatus(exportsLoaded); reached { return info.packageName, info.exports, info.err } @@ -234,3 +251,81 @@ func (d *dirInfoCache) CacheExports(ctx context.Context, env *ProcessEnv, info d d.Store(info.dir, info) return info.packageName, info.exports, info.err } + +// ScanModuleCache walks the given directory, which must be a GOMODCACHE value, +// for directory package information, storing the results in cache. +func ScanModuleCache(dir string, cache *DirInfoCache, logf func(string, ...any)) { + // Note(rfindley): it's hard to see, but this function attempts to implement + // just the side effects on cache of calling PrimeCache with a ProcessEnv + // that has the given dir as its GOMODCACHE. + // + // Teasing out the control flow, we see that we can avoid any handling of + // vendor/ and can infer module info entirely from the path, simplifying the + // logic here. + + root := gopathwalk.Root{ + Path: filepath.Clean(dir), + Type: gopathwalk.RootModuleCache, + } + + directoryInfo := func(root gopathwalk.Root, dir string) directoryPackageInfo { + // This is a copy of ModuleResolver.scanDirForPackage, trimmed down to + // logic that applies to a module cache directory. + + subdir := "" + if dir != root.Path { + subdir = dir[len(root.Path)+len("/"):] + } + + matches := modCacheRegexp.FindStringSubmatch(subdir) + if len(matches) == 0 { + return directoryPackageInfo{ + status: directoryScanned, + err: fmt.Errorf("invalid module cache path: %v", subdir), + } + } + modPath, err := module.UnescapePath(filepath.ToSlash(matches[1])) + if err != nil { + if logf != nil { + logf("decoding module cache path %q: %v", subdir, err) + } + return directoryPackageInfo{ + status: directoryScanned, + err: fmt.Errorf("decoding module cache path %q: %v", subdir, err), + } + } + importPath := path.Join(modPath, filepath.ToSlash(matches[3])) + index := strings.Index(dir, matches[1]+"@"+matches[2]) + modDir := filepath.Join(dir[:index], matches[1]+"@"+matches[2]) + modName := readModName(filepath.Join(modDir, "go.mod")) + return directoryPackageInfo{ + status: directoryScanned, + dir: dir, + rootType: root.Type, + nonCanonicalImportPath: importPath, + moduleDir: modDir, + moduleName: modName, + } + } + + add := func(root gopathwalk.Root, dir string) { + info := directoryInfo(root, dir) + cache.Store(info.dir, info) + } + + skip := func(_ gopathwalk.Root, dir string) bool { + // Skip directories that have already been scanned. + // + // Note that gopathwalk only adds "package" directories, which must contain + // a .go file, and all such package directories in the module cache are + // immutable. So if we can load a dir, it can be skipped. + info, ok := cache.Load(dir) + if !ok { + return false + } + packageScanned, _ := info.reachedStatus(directoryScanned) + return packageScanned + } + + gopathwalk.WalkSkip([]gopathwalk.Root{root}, add, skip, gopathwalk.Options{Logf: logf, ModulesEnabled: true}) +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/sortimports.go b/pkg/k8s/vendor/golang.org/x/tools/internal/imports/sortimports.go index 1a0a7ebd9e4..da8194fd965 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/sortimports.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/imports/sortimports.go @@ -18,7 +18,7 @@ import ( // sortImports sorts runs of consecutive import lines in import blocks in f. // It also removes duplicate imports when it is possible to do so without data loss. // -// It may mutate the token.File. +// It may mutate the token.File and the ast.File. func sortImports(localPrefix string, tokFile *token.File, f *ast.File) { for i, d := range f.Decls { d, ok := d.(*ast.GenDecl) diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/zstdlib.go b/pkg/k8s/vendor/golang.org/x/tools/internal/imports/zstdlib.go deleted file mode 100644 index 9f992c2bec8..00000000000 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/imports/zstdlib.go +++ /dev/null @@ -1,11345 +0,0 @@ -// Copyright 2022 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. - -// Code generated by mkstdlib.go. DO NOT EDIT. - -package imports - -var stdlib = map[string][]string{ - "archive/tar": { - "ErrFieldTooLong", - "ErrHeader", - "ErrInsecurePath", - "ErrWriteAfterClose", - "ErrWriteTooLong", - "FileInfoHeader", - "Format", - "FormatGNU", - "FormatPAX", - "FormatUSTAR", - "FormatUnknown", - "Header", - "NewReader", - "NewWriter", - "Reader", - "TypeBlock", - "TypeChar", - "TypeCont", - "TypeDir", - "TypeFifo", - "TypeGNULongLink", - "TypeGNULongName", - "TypeGNUSparse", - "TypeLink", - "TypeReg", - "TypeRegA", - "TypeSymlink", - "TypeXGlobalHeader", - "TypeXHeader", - "Writer", - }, - "archive/zip": { - "Compressor", - "Decompressor", - "Deflate", - "ErrAlgorithm", - "ErrChecksum", - "ErrFormat", - "ErrInsecurePath", - "File", - "FileHeader", - "FileInfoHeader", - "NewReader", - "NewWriter", - "OpenReader", - "ReadCloser", - "Reader", - "RegisterCompressor", - "RegisterDecompressor", - "Store", - "Writer", - }, - "bufio": { - "ErrAdvanceTooFar", - "ErrBadReadCount", - "ErrBufferFull", - "ErrFinalToken", - "ErrInvalidUnreadByte", - "ErrInvalidUnreadRune", - "ErrNegativeAdvance", - "ErrNegativeCount", - "ErrTooLong", - "MaxScanTokenSize", - "NewReadWriter", - "NewReader", - "NewReaderSize", - "NewScanner", - "NewWriter", - "NewWriterSize", - "ReadWriter", - "Reader", - "ScanBytes", - "ScanLines", - "ScanRunes", - "ScanWords", - "Scanner", - "SplitFunc", - "Writer", - }, - "bytes": { - "Buffer", - "Clone", - "Compare", - "Contains", - "ContainsAny", - "ContainsFunc", - "ContainsRune", - "Count", - "Cut", - "CutPrefix", - "CutSuffix", - "Equal", - "EqualFold", - "ErrTooLarge", - "Fields", - "FieldsFunc", - "HasPrefix", - "HasSuffix", - "Index", - "IndexAny", - "IndexByte", - "IndexFunc", - "IndexRune", - "Join", - "LastIndex", - "LastIndexAny", - "LastIndexByte", - "LastIndexFunc", - "Map", - "MinRead", - "NewBuffer", - "NewBufferString", - "NewReader", - "Reader", - "Repeat", - "Replace", - "ReplaceAll", - "Runes", - "Split", - "SplitAfter", - "SplitAfterN", - "SplitN", - "Title", - "ToLower", - "ToLowerSpecial", - "ToTitle", - "ToTitleSpecial", - "ToUpper", - "ToUpperSpecial", - "ToValidUTF8", - "Trim", - "TrimFunc", - "TrimLeft", - "TrimLeftFunc", - "TrimPrefix", - "TrimRight", - "TrimRightFunc", - "TrimSpace", - "TrimSuffix", - }, - "cmp": { - "Compare", - "Less", - "Ordered", - }, - "compress/bzip2": { - "NewReader", - "StructuralError", - }, - "compress/flate": { - "BestCompression", - "BestSpeed", - "CorruptInputError", - "DefaultCompression", - "HuffmanOnly", - "InternalError", - "NewReader", - "NewReaderDict", - "NewWriter", - "NewWriterDict", - "NoCompression", - "ReadError", - "Reader", - "Resetter", - "WriteError", - "Writer", - }, - "compress/gzip": { - "BestCompression", - "BestSpeed", - "DefaultCompression", - "ErrChecksum", - "ErrHeader", - "Header", - "HuffmanOnly", - "NewReader", - "NewWriter", - "NewWriterLevel", - "NoCompression", - "Reader", - "Writer", - }, - "compress/lzw": { - "LSB", - "MSB", - "NewReader", - "NewWriter", - "Order", - "Reader", - "Writer", - }, - "compress/zlib": { - "BestCompression", - "BestSpeed", - "DefaultCompression", - "ErrChecksum", - "ErrDictionary", - "ErrHeader", - "HuffmanOnly", - "NewReader", - "NewReaderDict", - "NewWriter", - "NewWriterLevel", - "NewWriterLevelDict", - "NoCompression", - "Resetter", - "Writer", - }, - "container/heap": { - "Fix", - "Init", - "Interface", - "Pop", - "Push", - "Remove", - }, - "container/list": { - "Element", - "List", - "New", - }, - "container/ring": { - "New", - "Ring", - }, - "context": { - "AfterFunc", - "Background", - "CancelCauseFunc", - "CancelFunc", - "Canceled", - "Cause", - "Context", - "DeadlineExceeded", - "TODO", - "WithCancel", - "WithCancelCause", - "WithDeadline", - "WithDeadlineCause", - "WithTimeout", - "WithTimeoutCause", - "WithValue", - "WithoutCancel", - }, - "crypto": { - "BLAKE2b_256", - "BLAKE2b_384", - "BLAKE2b_512", - "BLAKE2s_256", - "Decrypter", - "DecrypterOpts", - "Hash", - "MD4", - "MD5", - "MD5SHA1", - "PrivateKey", - "PublicKey", - "RIPEMD160", - "RegisterHash", - "SHA1", - "SHA224", - "SHA256", - "SHA384", - "SHA3_224", - "SHA3_256", - "SHA3_384", - "SHA3_512", - "SHA512", - "SHA512_224", - "SHA512_256", - "Signer", - "SignerOpts", - }, - "crypto/aes": { - "BlockSize", - "KeySizeError", - "NewCipher", - }, - "crypto/cipher": { - "AEAD", - "Block", - "BlockMode", - "NewCBCDecrypter", - "NewCBCEncrypter", - "NewCFBDecrypter", - "NewCFBEncrypter", - "NewCTR", - "NewGCM", - "NewGCMWithNonceSize", - "NewGCMWithTagSize", - "NewOFB", - "Stream", - "StreamReader", - "StreamWriter", - }, - "crypto/des": { - "BlockSize", - "KeySizeError", - "NewCipher", - "NewTripleDESCipher", - }, - "crypto/dsa": { - "ErrInvalidPublicKey", - "GenerateKey", - "GenerateParameters", - "L1024N160", - "L2048N224", - "L2048N256", - "L3072N256", - "ParameterSizes", - "Parameters", - "PrivateKey", - "PublicKey", - "Sign", - "Verify", - }, - "crypto/ecdh": { - "Curve", - "P256", - "P384", - "P521", - "PrivateKey", - "PublicKey", - "X25519", - }, - "crypto/ecdsa": { - "GenerateKey", - "PrivateKey", - "PublicKey", - "Sign", - "SignASN1", - "Verify", - "VerifyASN1", - }, - "crypto/ed25519": { - "GenerateKey", - "NewKeyFromSeed", - "Options", - "PrivateKey", - "PrivateKeySize", - "PublicKey", - "PublicKeySize", - "SeedSize", - "Sign", - "SignatureSize", - "Verify", - "VerifyWithOptions", - }, - "crypto/elliptic": { - "Curve", - "CurveParams", - "GenerateKey", - "Marshal", - "MarshalCompressed", - "P224", - "P256", - "P384", - "P521", - "Unmarshal", - "UnmarshalCompressed", - }, - "crypto/hmac": { - "Equal", - "New", - }, - "crypto/md5": { - "BlockSize", - "New", - "Size", - "Sum", - }, - "crypto/rand": { - "Int", - "Prime", - "Read", - "Reader", - }, - "crypto/rc4": { - "Cipher", - "KeySizeError", - "NewCipher", - }, - "crypto/rsa": { - "CRTValue", - "DecryptOAEP", - "DecryptPKCS1v15", - "DecryptPKCS1v15SessionKey", - "EncryptOAEP", - "EncryptPKCS1v15", - "ErrDecryption", - "ErrMessageTooLong", - "ErrVerification", - "GenerateKey", - "GenerateMultiPrimeKey", - "OAEPOptions", - "PKCS1v15DecryptOptions", - "PSSOptions", - "PSSSaltLengthAuto", - "PSSSaltLengthEqualsHash", - "PrecomputedValues", - "PrivateKey", - "PublicKey", - "SignPKCS1v15", - "SignPSS", - "VerifyPKCS1v15", - "VerifyPSS", - }, - "crypto/sha1": { - "BlockSize", - "New", - "Size", - "Sum", - }, - "crypto/sha256": { - "BlockSize", - "New", - "New224", - "Size", - "Size224", - "Sum224", - "Sum256", - }, - "crypto/sha512": { - "BlockSize", - "New", - "New384", - "New512_224", - "New512_256", - "Size", - "Size224", - "Size256", - "Size384", - "Sum384", - "Sum512", - "Sum512_224", - "Sum512_256", - }, - "crypto/subtle": { - "ConstantTimeByteEq", - "ConstantTimeCompare", - "ConstantTimeCopy", - "ConstantTimeEq", - "ConstantTimeLessOrEq", - "ConstantTimeSelect", - "XORBytes", - }, - "crypto/tls": { - "AlertError", - "Certificate", - "CertificateRequestInfo", - "CertificateVerificationError", - "CipherSuite", - "CipherSuiteName", - "CipherSuites", - "Client", - "ClientAuthType", - "ClientHelloInfo", - "ClientSessionCache", - "ClientSessionState", - "Config", - "Conn", - "ConnectionState", - "CurveID", - "CurveP256", - "CurveP384", - "CurveP521", - "Dial", - "DialWithDialer", - "Dialer", - "ECDSAWithP256AndSHA256", - "ECDSAWithP384AndSHA384", - "ECDSAWithP521AndSHA512", - "ECDSAWithSHA1", - "Ed25519", - "InsecureCipherSuites", - "Listen", - "LoadX509KeyPair", - "NewLRUClientSessionCache", - "NewListener", - "NewResumptionState", - "NoClientCert", - "PKCS1WithSHA1", - "PKCS1WithSHA256", - "PKCS1WithSHA384", - "PKCS1WithSHA512", - "PSSWithSHA256", - "PSSWithSHA384", - "PSSWithSHA512", - "ParseSessionState", - "QUICClient", - "QUICConfig", - "QUICConn", - "QUICEncryptionLevel", - "QUICEncryptionLevelApplication", - "QUICEncryptionLevelEarly", - "QUICEncryptionLevelHandshake", - "QUICEncryptionLevelInitial", - "QUICEvent", - "QUICEventKind", - "QUICHandshakeDone", - "QUICNoEvent", - "QUICRejectedEarlyData", - "QUICServer", - "QUICSessionTicketOptions", - "QUICSetReadSecret", - "QUICSetWriteSecret", - "QUICTransportParameters", - "QUICTransportParametersRequired", - "QUICWriteData", - "RecordHeaderError", - "RenegotiateFreelyAsClient", - "RenegotiateNever", - "RenegotiateOnceAsClient", - "RenegotiationSupport", - "RequestClientCert", - "RequireAndVerifyClientCert", - "RequireAnyClientCert", - "Server", - "SessionState", - "SignatureScheme", - "TLS_AES_128_GCM_SHA256", - "TLS_AES_256_GCM_SHA384", - "TLS_CHACHA20_POLY1305_SHA256", - "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", - "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", - "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", - "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", - "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", - "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305", - "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", - "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", - "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", - "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", - "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", - "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", - "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305", - "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", - "TLS_ECDHE_RSA_WITH_RC4_128_SHA", - "TLS_FALLBACK_SCSV", - "TLS_RSA_WITH_3DES_EDE_CBC_SHA", - "TLS_RSA_WITH_AES_128_CBC_SHA", - "TLS_RSA_WITH_AES_128_CBC_SHA256", - "TLS_RSA_WITH_AES_128_GCM_SHA256", - "TLS_RSA_WITH_AES_256_CBC_SHA", - "TLS_RSA_WITH_AES_256_GCM_SHA384", - "TLS_RSA_WITH_RC4_128_SHA", - "VerifyClientCertIfGiven", - "VersionName", - "VersionSSL30", - "VersionTLS10", - "VersionTLS11", - "VersionTLS12", - "VersionTLS13", - "X25519", - "X509KeyPair", - }, - "crypto/x509": { - "CANotAuthorizedForExtKeyUsage", - "CANotAuthorizedForThisName", - "CertPool", - "Certificate", - "CertificateInvalidError", - "CertificateRequest", - "ConstraintViolationError", - "CreateCertificate", - "CreateCertificateRequest", - "CreateRevocationList", - "DSA", - "DSAWithSHA1", - "DSAWithSHA256", - "DecryptPEMBlock", - "ECDSA", - "ECDSAWithSHA1", - "ECDSAWithSHA256", - "ECDSAWithSHA384", - "ECDSAWithSHA512", - "Ed25519", - "EncryptPEMBlock", - "ErrUnsupportedAlgorithm", - "Expired", - "ExtKeyUsage", - "ExtKeyUsageAny", - "ExtKeyUsageClientAuth", - "ExtKeyUsageCodeSigning", - "ExtKeyUsageEmailProtection", - "ExtKeyUsageIPSECEndSystem", - "ExtKeyUsageIPSECTunnel", - "ExtKeyUsageIPSECUser", - "ExtKeyUsageMicrosoftCommercialCodeSigning", - "ExtKeyUsageMicrosoftKernelCodeSigning", - "ExtKeyUsageMicrosoftServerGatedCrypto", - "ExtKeyUsageNetscapeServerGatedCrypto", - "ExtKeyUsageOCSPSigning", - "ExtKeyUsageServerAuth", - "ExtKeyUsageTimeStamping", - "HostnameError", - "IncompatibleUsage", - "IncorrectPasswordError", - "InsecureAlgorithmError", - "InvalidReason", - "IsEncryptedPEMBlock", - "KeyUsage", - "KeyUsageCRLSign", - "KeyUsageCertSign", - "KeyUsageContentCommitment", - "KeyUsageDataEncipherment", - "KeyUsageDecipherOnly", - "KeyUsageDigitalSignature", - "KeyUsageEncipherOnly", - "KeyUsageKeyAgreement", - "KeyUsageKeyEncipherment", - "MD2WithRSA", - "MD5WithRSA", - "MarshalECPrivateKey", - "MarshalPKCS1PrivateKey", - "MarshalPKCS1PublicKey", - "MarshalPKCS8PrivateKey", - "MarshalPKIXPublicKey", - "NameConstraintsWithoutSANs", - "NameMismatch", - "NewCertPool", - "NotAuthorizedToSign", - "PEMCipher", - "PEMCipher3DES", - "PEMCipherAES128", - "PEMCipherAES192", - "PEMCipherAES256", - "PEMCipherDES", - "ParseCRL", - "ParseCertificate", - "ParseCertificateRequest", - "ParseCertificates", - "ParseDERCRL", - "ParseECPrivateKey", - "ParsePKCS1PrivateKey", - "ParsePKCS1PublicKey", - "ParsePKCS8PrivateKey", - "ParsePKIXPublicKey", - "ParseRevocationList", - "PublicKeyAlgorithm", - "PureEd25519", - "RSA", - "RevocationList", - "RevocationListEntry", - "SHA1WithRSA", - "SHA256WithRSA", - "SHA256WithRSAPSS", - "SHA384WithRSA", - "SHA384WithRSAPSS", - "SHA512WithRSA", - "SHA512WithRSAPSS", - "SetFallbackRoots", - "SignatureAlgorithm", - "SystemCertPool", - "SystemRootsError", - "TooManyConstraints", - "TooManyIntermediates", - "UnconstrainedName", - "UnhandledCriticalExtension", - "UnknownAuthorityError", - "UnknownPublicKeyAlgorithm", - "UnknownSignatureAlgorithm", - "VerifyOptions", - }, - "crypto/x509/pkix": { - "AlgorithmIdentifier", - "AttributeTypeAndValue", - "AttributeTypeAndValueSET", - "CertificateList", - "Extension", - "Name", - "RDNSequence", - "RelativeDistinguishedNameSET", - "RevokedCertificate", - "TBSCertificateList", - }, - "database/sql": { - "ColumnType", - "Conn", - "DB", - "DBStats", - "Drivers", - "ErrConnDone", - "ErrNoRows", - "ErrTxDone", - "IsolationLevel", - "LevelDefault", - "LevelLinearizable", - "LevelReadCommitted", - "LevelReadUncommitted", - "LevelRepeatableRead", - "LevelSerializable", - "LevelSnapshot", - "LevelWriteCommitted", - "Named", - "NamedArg", - "NullBool", - "NullByte", - "NullFloat64", - "NullInt16", - "NullInt32", - "NullInt64", - "NullString", - "NullTime", - "Open", - "OpenDB", - "Out", - "RawBytes", - "Register", - "Result", - "Row", - "Rows", - "Scanner", - "Stmt", - "Tx", - "TxOptions", - }, - "database/sql/driver": { - "Bool", - "ColumnConverter", - "Conn", - "ConnBeginTx", - "ConnPrepareContext", - "Connector", - "DefaultParameterConverter", - "Driver", - "DriverContext", - "ErrBadConn", - "ErrRemoveArgument", - "ErrSkip", - "Execer", - "ExecerContext", - "Int32", - "IsScanValue", - "IsValue", - "IsolationLevel", - "NamedValue", - "NamedValueChecker", - "NotNull", - "Null", - "Pinger", - "Queryer", - "QueryerContext", - "Result", - "ResultNoRows", - "Rows", - "RowsAffected", - "RowsColumnTypeDatabaseTypeName", - "RowsColumnTypeLength", - "RowsColumnTypeNullable", - "RowsColumnTypePrecisionScale", - "RowsColumnTypeScanType", - "RowsNextResultSet", - "SessionResetter", - "Stmt", - "StmtExecContext", - "StmtQueryContext", - "String", - "Tx", - "TxOptions", - "Validator", - "Value", - "ValueConverter", - "Valuer", - }, - "debug/buildinfo": { - "BuildInfo", - "Read", - "ReadFile", - }, - "debug/dwarf": { - "AddrType", - "ArrayType", - "Attr", - "AttrAbstractOrigin", - "AttrAccessibility", - "AttrAddrBase", - "AttrAddrClass", - "AttrAlignment", - "AttrAllocated", - "AttrArtificial", - "AttrAssociated", - "AttrBaseTypes", - "AttrBinaryScale", - "AttrBitOffset", - "AttrBitSize", - "AttrByteSize", - "AttrCallAllCalls", - "AttrCallAllSourceCalls", - "AttrCallAllTailCalls", - "AttrCallColumn", - "AttrCallDataLocation", - "AttrCallDataValue", - "AttrCallFile", - "AttrCallLine", - "AttrCallOrigin", - "AttrCallPC", - "AttrCallParameter", - "AttrCallReturnPC", - "AttrCallTailCall", - "AttrCallTarget", - "AttrCallTargetClobbered", - "AttrCallValue", - "AttrCalling", - "AttrCommonRef", - "AttrCompDir", - "AttrConstExpr", - "AttrConstValue", - "AttrContainingType", - "AttrCount", - "AttrDataBitOffset", - "AttrDataLocation", - "AttrDataMemberLoc", - "AttrDecimalScale", - "AttrDecimalSign", - "AttrDeclColumn", - "AttrDeclFile", - "AttrDeclLine", - "AttrDeclaration", - "AttrDefaultValue", - "AttrDefaulted", - "AttrDeleted", - "AttrDescription", - "AttrDigitCount", - "AttrDiscr", - "AttrDiscrList", - "AttrDiscrValue", - "AttrDwoName", - "AttrElemental", - "AttrEncoding", - "AttrEndianity", - "AttrEntrypc", - "AttrEnumClass", - "AttrExplicit", - "AttrExportSymbols", - "AttrExtension", - "AttrExternal", - "AttrFrameBase", - "AttrFriend", - "AttrHighpc", - "AttrIdentifierCase", - "AttrImport", - "AttrInline", - "AttrIsOptional", - "AttrLanguage", - "AttrLinkageName", - "AttrLocation", - "AttrLoclistsBase", - "AttrLowerBound", - "AttrLowpc", - "AttrMacroInfo", - "AttrMacros", - "AttrMainSubprogram", - "AttrMutable", - "AttrName", - "AttrNamelistItem", - "AttrNoreturn", - "AttrObjectPointer", - "AttrOrdering", - "AttrPictureString", - "AttrPriority", - "AttrProducer", - "AttrPrototyped", - "AttrPure", - "AttrRanges", - "AttrRank", - "AttrRecursive", - "AttrReference", - "AttrReturnAddr", - "AttrRnglistsBase", - "AttrRvalueReference", - "AttrSegment", - "AttrSibling", - "AttrSignature", - "AttrSmall", - "AttrSpecification", - "AttrStartScope", - "AttrStaticLink", - "AttrStmtList", - "AttrStrOffsetsBase", - "AttrStride", - "AttrStrideSize", - "AttrStringLength", - "AttrStringLengthBitSize", - "AttrStringLengthByteSize", - "AttrThreadsScaled", - "AttrTrampoline", - "AttrType", - "AttrUpperBound", - "AttrUseLocation", - "AttrUseUTF8", - "AttrVarParam", - "AttrVirtuality", - "AttrVisibility", - "AttrVtableElemLoc", - "BasicType", - "BoolType", - "CharType", - "Class", - "ClassAddrPtr", - "ClassAddress", - "ClassBlock", - "ClassConstant", - "ClassExprLoc", - "ClassFlag", - "ClassLinePtr", - "ClassLocList", - "ClassLocListPtr", - "ClassMacPtr", - "ClassRangeListPtr", - "ClassReference", - "ClassReferenceAlt", - "ClassReferenceSig", - "ClassRngList", - "ClassRngListsPtr", - "ClassStrOffsetsPtr", - "ClassString", - "ClassStringAlt", - "ClassUnknown", - "CommonType", - "ComplexType", - "Data", - "DecodeError", - "DotDotDotType", - "Entry", - "EnumType", - "EnumValue", - "ErrUnknownPC", - "Field", - "FloatType", - "FuncType", - "IntType", - "LineEntry", - "LineFile", - "LineReader", - "LineReaderPos", - "New", - "Offset", - "PtrType", - "QualType", - "Reader", - "StructField", - "StructType", - "Tag", - "TagAccessDeclaration", - "TagArrayType", - "TagAtomicType", - "TagBaseType", - "TagCallSite", - "TagCallSiteParameter", - "TagCatchDwarfBlock", - "TagClassType", - "TagCoarrayType", - "TagCommonDwarfBlock", - "TagCommonInclusion", - "TagCompileUnit", - "TagCondition", - "TagConstType", - "TagConstant", - "TagDwarfProcedure", - "TagDynamicType", - "TagEntryPoint", - "TagEnumerationType", - "TagEnumerator", - "TagFileType", - "TagFormalParameter", - "TagFriend", - "TagGenericSubrange", - "TagImmutableType", - "TagImportedDeclaration", - "TagImportedModule", - "TagImportedUnit", - "TagInheritance", - "TagInlinedSubroutine", - "TagInterfaceType", - "TagLabel", - "TagLexDwarfBlock", - "TagMember", - "TagModule", - "TagMutableType", - "TagNamelist", - "TagNamelistItem", - "TagNamespace", - "TagPackedType", - "TagPartialUnit", - "TagPointerType", - "TagPtrToMemberType", - "TagReferenceType", - "TagRestrictType", - "TagRvalueReferenceType", - "TagSetType", - "TagSharedType", - "TagSkeletonUnit", - "TagStringType", - "TagStructType", - "TagSubprogram", - "TagSubrangeType", - "TagSubroutineType", - "TagTemplateAlias", - "TagTemplateTypeParameter", - "TagTemplateValueParameter", - "TagThrownType", - "TagTryDwarfBlock", - "TagTypeUnit", - "TagTypedef", - "TagUnionType", - "TagUnspecifiedParameters", - "TagUnspecifiedType", - "TagVariable", - "TagVariant", - "TagVariantPart", - "TagVolatileType", - "TagWithStmt", - "Type", - "TypedefType", - "UcharType", - "UintType", - "UnspecifiedType", - "UnsupportedType", - "VoidType", - }, - "debug/elf": { - "ARM_MAGIC_TRAMP_NUMBER", - "COMPRESS_HIOS", - "COMPRESS_HIPROC", - "COMPRESS_LOOS", - "COMPRESS_LOPROC", - "COMPRESS_ZLIB", - "COMPRESS_ZSTD", - "Chdr32", - "Chdr64", - "Class", - "CompressionType", - "DF_1_CONFALT", - "DF_1_DIRECT", - "DF_1_DISPRELDNE", - "DF_1_DISPRELPND", - "DF_1_EDITED", - "DF_1_ENDFILTEE", - "DF_1_GLOBAL", - "DF_1_GLOBAUDIT", - "DF_1_GROUP", - "DF_1_IGNMULDEF", - "DF_1_INITFIRST", - "DF_1_INTERPOSE", - "DF_1_KMOD", - "DF_1_LOADFLTR", - "DF_1_NOCOMMON", - "DF_1_NODEFLIB", - "DF_1_NODELETE", - "DF_1_NODIRECT", - "DF_1_NODUMP", - "DF_1_NOHDR", - "DF_1_NOKSYMS", - "DF_1_NOOPEN", - "DF_1_NORELOC", - "DF_1_NOW", - "DF_1_ORIGIN", - "DF_1_PIE", - "DF_1_SINGLETON", - "DF_1_STUB", - "DF_1_SYMINTPOSE", - "DF_1_TRANS", - "DF_1_WEAKFILTER", - "DF_BIND_NOW", - "DF_ORIGIN", - "DF_STATIC_TLS", - "DF_SYMBOLIC", - "DF_TEXTREL", - "DT_ADDRRNGHI", - "DT_ADDRRNGLO", - "DT_AUDIT", - "DT_AUXILIARY", - "DT_BIND_NOW", - "DT_CHECKSUM", - "DT_CONFIG", - "DT_DEBUG", - "DT_DEPAUDIT", - "DT_ENCODING", - "DT_FEATURE", - "DT_FILTER", - "DT_FINI", - "DT_FINI_ARRAY", - "DT_FINI_ARRAYSZ", - "DT_FLAGS", - "DT_FLAGS_1", - "DT_GNU_CONFLICT", - "DT_GNU_CONFLICTSZ", - "DT_GNU_HASH", - "DT_GNU_LIBLIST", - "DT_GNU_LIBLISTSZ", - "DT_GNU_PRELINKED", - "DT_HASH", - "DT_HIOS", - "DT_HIPROC", - "DT_INIT", - "DT_INIT_ARRAY", - "DT_INIT_ARRAYSZ", - "DT_JMPREL", - "DT_LOOS", - "DT_LOPROC", - "DT_MIPS_AUX_DYNAMIC", - "DT_MIPS_BASE_ADDRESS", - "DT_MIPS_COMPACT_SIZE", - "DT_MIPS_CONFLICT", - "DT_MIPS_CONFLICTNO", - "DT_MIPS_CXX_FLAGS", - "DT_MIPS_DELTA_CLASS", - "DT_MIPS_DELTA_CLASSSYM", - "DT_MIPS_DELTA_CLASSSYM_NO", - "DT_MIPS_DELTA_CLASS_NO", - "DT_MIPS_DELTA_INSTANCE", - "DT_MIPS_DELTA_INSTANCE_NO", - "DT_MIPS_DELTA_RELOC", - "DT_MIPS_DELTA_RELOC_NO", - "DT_MIPS_DELTA_SYM", - "DT_MIPS_DELTA_SYM_NO", - "DT_MIPS_DYNSTR_ALIGN", - "DT_MIPS_FLAGS", - "DT_MIPS_GOTSYM", - "DT_MIPS_GP_VALUE", - "DT_MIPS_HIDDEN_GOTIDX", - "DT_MIPS_HIPAGENO", - "DT_MIPS_ICHECKSUM", - "DT_MIPS_INTERFACE", - "DT_MIPS_INTERFACE_SIZE", - "DT_MIPS_IVERSION", - "DT_MIPS_LIBLIST", - "DT_MIPS_LIBLISTNO", - "DT_MIPS_LOCALPAGE_GOTIDX", - "DT_MIPS_LOCAL_GOTIDX", - "DT_MIPS_LOCAL_GOTNO", - "DT_MIPS_MSYM", - "DT_MIPS_OPTIONS", - "DT_MIPS_PERF_SUFFIX", - "DT_MIPS_PIXIE_INIT", - "DT_MIPS_PLTGOT", - "DT_MIPS_PROTECTED_GOTIDX", - "DT_MIPS_RLD_MAP", - "DT_MIPS_RLD_MAP_REL", - "DT_MIPS_RLD_TEXT_RESOLVE_ADDR", - "DT_MIPS_RLD_VERSION", - "DT_MIPS_RWPLT", - "DT_MIPS_SYMBOL_LIB", - "DT_MIPS_SYMTABNO", - "DT_MIPS_TIME_STAMP", - "DT_MIPS_UNREFEXTNO", - "DT_MOVEENT", - "DT_MOVESZ", - "DT_MOVETAB", - "DT_NEEDED", - "DT_NULL", - "DT_PLTGOT", - "DT_PLTPAD", - "DT_PLTPADSZ", - "DT_PLTREL", - "DT_PLTRELSZ", - "DT_POSFLAG_1", - "DT_PPC64_GLINK", - "DT_PPC64_OPD", - "DT_PPC64_OPDSZ", - "DT_PPC64_OPT", - "DT_PPC_GOT", - "DT_PPC_OPT", - "DT_PREINIT_ARRAY", - "DT_PREINIT_ARRAYSZ", - "DT_REL", - "DT_RELA", - "DT_RELACOUNT", - "DT_RELAENT", - "DT_RELASZ", - "DT_RELCOUNT", - "DT_RELENT", - "DT_RELSZ", - "DT_RPATH", - "DT_RUNPATH", - "DT_SONAME", - "DT_SPARC_REGISTER", - "DT_STRSZ", - "DT_STRTAB", - "DT_SYMBOLIC", - "DT_SYMENT", - "DT_SYMINENT", - "DT_SYMINFO", - "DT_SYMINSZ", - "DT_SYMTAB", - "DT_SYMTAB_SHNDX", - "DT_TEXTREL", - "DT_TLSDESC_GOT", - "DT_TLSDESC_PLT", - "DT_USED", - "DT_VALRNGHI", - "DT_VALRNGLO", - "DT_VERDEF", - "DT_VERDEFNUM", - "DT_VERNEED", - "DT_VERNEEDNUM", - "DT_VERSYM", - "Data", - "Dyn32", - "Dyn64", - "DynFlag", - "DynFlag1", - "DynTag", - "EI_ABIVERSION", - "EI_CLASS", - "EI_DATA", - "EI_NIDENT", - "EI_OSABI", - "EI_PAD", - "EI_VERSION", - "ELFCLASS32", - "ELFCLASS64", - "ELFCLASSNONE", - "ELFDATA2LSB", - "ELFDATA2MSB", - "ELFDATANONE", - "ELFMAG", - "ELFOSABI_86OPEN", - "ELFOSABI_AIX", - "ELFOSABI_ARM", - "ELFOSABI_AROS", - "ELFOSABI_CLOUDABI", - "ELFOSABI_FENIXOS", - "ELFOSABI_FREEBSD", - "ELFOSABI_HPUX", - "ELFOSABI_HURD", - "ELFOSABI_IRIX", - "ELFOSABI_LINUX", - "ELFOSABI_MODESTO", - "ELFOSABI_NETBSD", - "ELFOSABI_NONE", - "ELFOSABI_NSK", - "ELFOSABI_OPENBSD", - "ELFOSABI_OPENVMS", - "ELFOSABI_SOLARIS", - "ELFOSABI_STANDALONE", - "ELFOSABI_TRU64", - "EM_386", - "EM_486", - "EM_56800EX", - "EM_68HC05", - "EM_68HC08", - "EM_68HC11", - "EM_68HC12", - "EM_68HC16", - "EM_68K", - "EM_78KOR", - "EM_8051", - "EM_860", - "EM_88K", - "EM_960", - "EM_AARCH64", - "EM_ALPHA", - "EM_ALPHA_STD", - "EM_ALTERA_NIOS2", - "EM_AMDGPU", - "EM_ARC", - "EM_ARCA", - "EM_ARC_COMPACT", - "EM_ARC_COMPACT2", - "EM_ARM", - "EM_AVR", - "EM_AVR32", - "EM_BA1", - "EM_BA2", - "EM_BLACKFIN", - "EM_BPF", - "EM_C166", - "EM_CDP", - "EM_CE", - "EM_CLOUDSHIELD", - "EM_COGE", - "EM_COLDFIRE", - "EM_COOL", - "EM_COREA_1ST", - "EM_COREA_2ND", - "EM_CR", - "EM_CR16", - "EM_CRAYNV2", - "EM_CRIS", - "EM_CRX", - "EM_CSR_KALIMBA", - "EM_CUDA", - "EM_CYPRESS_M8C", - "EM_D10V", - "EM_D30V", - "EM_DSP24", - "EM_DSPIC30F", - "EM_DXP", - "EM_ECOG1", - "EM_ECOG16", - "EM_ECOG1X", - "EM_ECOG2", - "EM_ETPU", - "EM_EXCESS", - "EM_F2MC16", - "EM_FIREPATH", - "EM_FR20", - "EM_FR30", - "EM_FT32", - "EM_FX66", - "EM_H8S", - "EM_H8_300", - "EM_H8_300H", - "EM_H8_500", - "EM_HUANY", - "EM_IA_64", - "EM_INTEL205", - "EM_INTEL206", - "EM_INTEL207", - "EM_INTEL208", - "EM_INTEL209", - "EM_IP2K", - "EM_JAVELIN", - "EM_K10M", - "EM_KM32", - "EM_KMX16", - "EM_KMX32", - "EM_KMX8", - "EM_KVARC", - "EM_L10M", - "EM_LANAI", - "EM_LATTICEMICO32", - "EM_LOONGARCH", - "EM_M16C", - "EM_M32", - "EM_M32C", - "EM_M32R", - "EM_MANIK", - "EM_MAX", - "EM_MAXQ30", - "EM_MCHP_PIC", - "EM_MCST_ELBRUS", - "EM_ME16", - "EM_METAG", - "EM_MICROBLAZE", - "EM_MIPS", - "EM_MIPS_RS3_LE", - "EM_MIPS_RS4_BE", - "EM_MIPS_X", - "EM_MMA", - "EM_MMDSP_PLUS", - "EM_MMIX", - "EM_MN10200", - "EM_MN10300", - "EM_MOXIE", - "EM_MSP430", - "EM_NCPU", - "EM_NDR1", - "EM_NDS32", - "EM_NONE", - "EM_NORC", - "EM_NS32K", - "EM_OPEN8", - "EM_OPENRISC", - "EM_PARISC", - "EM_PCP", - "EM_PDP10", - "EM_PDP11", - "EM_PDSP", - "EM_PJ", - "EM_PPC", - "EM_PPC64", - "EM_PRISM", - "EM_QDSP6", - "EM_R32C", - "EM_RCE", - "EM_RH32", - "EM_RISCV", - "EM_RL78", - "EM_RS08", - "EM_RX", - "EM_S370", - "EM_S390", - "EM_SCORE7", - "EM_SEP", - "EM_SE_C17", - "EM_SE_C33", - "EM_SH", - "EM_SHARC", - "EM_SLE9X", - "EM_SNP1K", - "EM_SPARC", - "EM_SPARC32PLUS", - "EM_SPARCV9", - "EM_ST100", - "EM_ST19", - "EM_ST200", - "EM_ST7", - "EM_ST9PLUS", - "EM_STARCORE", - "EM_STM8", - "EM_STXP7X", - "EM_SVX", - "EM_TILE64", - "EM_TILEGX", - "EM_TILEPRO", - "EM_TINYJ", - "EM_TI_ARP32", - "EM_TI_C2000", - "EM_TI_C5500", - "EM_TI_C6000", - "EM_TI_PRU", - "EM_TMM_GPP", - "EM_TPC", - "EM_TRICORE", - "EM_TRIMEDIA", - "EM_TSK3000", - "EM_UNICORE", - "EM_V800", - "EM_V850", - "EM_VAX", - "EM_VIDEOCORE", - "EM_VIDEOCORE3", - "EM_VIDEOCORE5", - "EM_VISIUM", - "EM_VPP500", - "EM_X86_64", - "EM_XCORE", - "EM_XGATE", - "EM_XIMO16", - "EM_XTENSA", - "EM_Z80", - "EM_ZSP", - "ET_CORE", - "ET_DYN", - "ET_EXEC", - "ET_HIOS", - "ET_HIPROC", - "ET_LOOS", - "ET_LOPROC", - "ET_NONE", - "ET_REL", - "EV_CURRENT", - "EV_NONE", - "ErrNoSymbols", - "File", - "FileHeader", - "FormatError", - "Header32", - "Header64", - "ImportedSymbol", - "Machine", - "NT_FPREGSET", - "NT_PRPSINFO", - "NT_PRSTATUS", - "NType", - "NewFile", - "OSABI", - "Open", - "PF_MASKOS", - "PF_MASKPROC", - "PF_R", - "PF_W", - "PF_X", - "PT_AARCH64_ARCHEXT", - "PT_AARCH64_UNWIND", - "PT_ARM_ARCHEXT", - "PT_ARM_EXIDX", - "PT_DYNAMIC", - "PT_GNU_EH_FRAME", - "PT_GNU_MBIND_HI", - "PT_GNU_MBIND_LO", - "PT_GNU_PROPERTY", - "PT_GNU_RELRO", - "PT_GNU_STACK", - "PT_HIOS", - "PT_HIPROC", - "PT_INTERP", - "PT_LOAD", - "PT_LOOS", - "PT_LOPROC", - "PT_MIPS_ABIFLAGS", - "PT_MIPS_OPTIONS", - "PT_MIPS_REGINFO", - "PT_MIPS_RTPROC", - "PT_NOTE", - "PT_NULL", - "PT_OPENBSD_BOOTDATA", - "PT_OPENBSD_RANDOMIZE", - "PT_OPENBSD_WXNEEDED", - "PT_PAX_FLAGS", - "PT_PHDR", - "PT_S390_PGSTE", - "PT_SHLIB", - "PT_SUNWSTACK", - "PT_SUNW_EH_FRAME", - "PT_TLS", - "Prog", - "Prog32", - "Prog64", - "ProgFlag", - "ProgHeader", - "ProgType", - "R_386", - "R_386_16", - "R_386_32", - "R_386_32PLT", - "R_386_8", - "R_386_COPY", - "R_386_GLOB_DAT", - "R_386_GOT32", - "R_386_GOT32X", - "R_386_GOTOFF", - "R_386_GOTPC", - "R_386_IRELATIVE", - "R_386_JMP_SLOT", - "R_386_NONE", - "R_386_PC16", - "R_386_PC32", - "R_386_PC8", - "R_386_PLT32", - "R_386_RELATIVE", - "R_386_SIZE32", - "R_386_TLS_DESC", - "R_386_TLS_DESC_CALL", - "R_386_TLS_DTPMOD32", - "R_386_TLS_DTPOFF32", - "R_386_TLS_GD", - "R_386_TLS_GD_32", - "R_386_TLS_GD_CALL", - "R_386_TLS_GD_POP", - "R_386_TLS_GD_PUSH", - "R_386_TLS_GOTDESC", - "R_386_TLS_GOTIE", - "R_386_TLS_IE", - "R_386_TLS_IE_32", - "R_386_TLS_LDM", - "R_386_TLS_LDM_32", - "R_386_TLS_LDM_CALL", - "R_386_TLS_LDM_POP", - "R_386_TLS_LDM_PUSH", - "R_386_TLS_LDO_32", - "R_386_TLS_LE", - "R_386_TLS_LE_32", - "R_386_TLS_TPOFF", - "R_386_TLS_TPOFF32", - "R_390", - "R_390_12", - "R_390_16", - "R_390_20", - "R_390_32", - "R_390_64", - "R_390_8", - "R_390_COPY", - "R_390_GLOB_DAT", - "R_390_GOT12", - "R_390_GOT16", - "R_390_GOT20", - "R_390_GOT32", - "R_390_GOT64", - "R_390_GOTENT", - "R_390_GOTOFF", - "R_390_GOTOFF16", - "R_390_GOTOFF64", - "R_390_GOTPC", - "R_390_GOTPCDBL", - "R_390_GOTPLT12", - "R_390_GOTPLT16", - "R_390_GOTPLT20", - "R_390_GOTPLT32", - "R_390_GOTPLT64", - "R_390_GOTPLTENT", - "R_390_GOTPLTOFF16", - "R_390_GOTPLTOFF32", - "R_390_GOTPLTOFF64", - "R_390_JMP_SLOT", - "R_390_NONE", - "R_390_PC16", - "R_390_PC16DBL", - "R_390_PC32", - "R_390_PC32DBL", - "R_390_PC64", - "R_390_PLT16DBL", - "R_390_PLT32", - "R_390_PLT32DBL", - "R_390_PLT64", - "R_390_RELATIVE", - "R_390_TLS_DTPMOD", - "R_390_TLS_DTPOFF", - "R_390_TLS_GD32", - "R_390_TLS_GD64", - "R_390_TLS_GDCALL", - "R_390_TLS_GOTIE12", - "R_390_TLS_GOTIE20", - "R_390_TLS_GOTIE32", - "R_390_TLS_GOTIE64", - "R_390_TLS_IE32", - "R_390_TLS_IE64", - "R_390_TLS_IEENT", - "R_390_TLS_LDCALL", - "R_390_TLS_LDM32", - "R_390_TLS_LDM64", - "R_390_TLS_LDO32", - "R_390_TLS_LDO64", - "R_390_TLS_LE32", - "R_390_TLS_LE64", - "R_390_TLS_LOAD", - "R_390_TLS_TPOFF", - "R_AARCH64", - "R_AARCH64_ABS16", - "R_AARCH64_ABS32", - "R_AARCH64_ABS64", - "R_AARCH64_ADD_ABS_LO12_NC", - "R_AARCH64_ADR_GOT_PAGE", - "R_AARCH64_ADR_PREL_LO21", - "R_AARCH64_ADR_PREL_PG_HI21", - "R_AARCH64_ADR_PREL_PG_HI21_NC", - "R_AARCH64_CALL26", - "R_AARCH64_CONDBR19", - "R_AARCH64_COPY", - "R_AARCH64_GLOB_DAT", - "R_AARCH64_GOT_LD_PREL19", - "R_AARCH64_IRELATIVE", - "R_AARCH64_JUMP26", - "R_AARCH64_JUMP_SLOT", - "R_AARCH64_LD64_GOTOFF_LO15", - "R_AARCH64_LD64_GOTPAGE_LO15", - "R_AARCH64_LD64_GOT_LO12_NC", - "R_AARCH64_LDST128_ABS_LO12_NC", - "R_AARCH64_LDST16_ABS_LO12_NC", - "R_AARCH64_LDST32_ABS_LO12_NC", - "R_AARCH64_LDST64_ABS_LO12_NC", - "R_AARCH64_LDST8_ABS_LO12_NC", - "R_AARCH64_LD_PREL_LO19", - "R_AARCH64_MOVW_SABS_G0", - "R_AARCH64_MOVW_SABS_G1", - "R_AARCH64_MOVW_SABS_G2", - "R_AARCH64_MOVW_UABS_G0", - "R_AARCH64_MOVW_UABS_G0_NC", - "R_AARCH64_MOVW_UABS_G1", - "R_AARCH64_MOVW_UABS_G1_NC", - "R_AARCH64_MOVW_UABS_G2", - "R_AARCH64_MOVW_UABS_G2_NC", - "R_AARCH64_MOVW_UABS_G3", - "R_AARCH64_NONE", - "R_AARCH64_NULL", - "R_AARCH64_P32_ABS16", - "R_AARCH64_P32_ABS32", - "R_AARCH64_P32_ADD_ABS_LO12_NC", - "R_AARCH64_P32_ADR_GOT_PAGE", - "R_AARCH64_P32_ADR_PREL_LO21", - "R_AARCH64_P32_ADR_PREL_PG_HI21", - "R_AARCH64_P32_CALL26", - "R_AARCH64_P32_CONDBR19", - "R_AARCH64_P32_COPY", - "R_AARCH64_P32_GLOB_DAT", - "R_AARCH64_P32_GOT_LD_PREL19", - "R_AARCH64_P32_IRELATIVE", - "R_AARCH64_P32_JUMP26", - "R_AARCH64_P32_JUMP_SLOT", - "R_AARCH64_P32_LD32_GOT_LO12_NC", - "R_AARCH64_P32_LDST128_ABS_LO12_NC", - "R_AARCH64_P32_LDST16_ABS_LO12_NC", - "R_AARCH64_P32_LDST32_ABS_LO12_NC", - "R_AARCH64_P32_LDST64_ABS_LO12_NC", - "R_AARCH64_P32_LDST8_ABS_LO12_NC", - "R_AARCH64_P32_LD_PREL_LO19", - "R_AARCH64_P32_MOVW_SABS_G0", - "R_AARCH64_P32_MOVW_UABS_G0", - "R_AARCH64_P32_MOVW_UABS_G0_NC", - "R_AARCH64_P32_MOVW_UABS_G1", - "R_AARCH64_P32_PREL16", - "R_AARCH64_P32_PREL32", - "R_AARCH64_P32_RELATIVE", - "R_AARCH64_P32_TLSDESC", - "R_AARCH64_P32_TLSDESC_ADD_LO12_NC", - "R_AARCH64_P32_TLSDESC_ADR_PAGE21", - "R_AARCH64_P32_TLSDESC_ADR_PREL21", - "R_AARCH64_P32_TLSDESC_CALL", - "R_AARCH64_P32_TLSDESC_LD32_LO12_NC", - "R_AARCH64_P32_TLSDESC_LD_PREL19", - "R_AARCH64_P32_TLSGD_ADD_LO12_NC", - "R_AARCH64_P32_TLSGD_ADR_PAGE21", - "R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21", - "R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC", - "R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19", - "R_AARCH64_P32_TLSLE_ADD_TPREL_HI12", - "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12", - "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC", - "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0", - "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC", - "R_AARCH64_P32_TLSLE_MOVW_TPREL_G1", - "R_AARCH64_P32_TLS_DTPMOD", - "R_AARCH64_P32_TLS_DTPREL", - "R_AARCH64_P32_TLS_TPREL", - "R_AARCH64_P32_TSTBR14", - "R_AARCH64_PREL16", - "R_AARCH64_PREL32", - "R_AARCH64_PREL64", - "R_AARCH64_RELATIVE", - "R_AARCH64_TLSDESC", - "R_AARCH64_TLSDESC_ADD", - "R_AARCH64_TLSDESC_ADD_LO12_NC", - "R_AARCH64_TLSDESC_ADR_PAGE21", - "R_AARCH64_TLSDESC_ADR_PREL21", - "R_AARCH64_TLSDESC_CALL", - "R_AARCH64_TLSDESC_LD64_LO12_NC", - "R_AARCH64_TLSDESC_LDR", - "R_AARCH64_TLSDESC_LD_PREL19", - "R_AARCH64_TLSDESC_OFF_G0_NC", - "R_AARCH64_TLSDESC_OFF_G1", - "R_AARCH64_TLSGD_ADD_LO12_NC", - "R_AARCH64_TLSGD_ADR_PAGE21", - "R_AARCH64_TLSGD_ADR_PREL21", - "R_AARCH64_TLSGD_MOVW_G0_NC", - "R_AARCH64_TLSGD_MOVW_G1", - "R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21", - "R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC", - "R_AARCH64_TLSIE_LD_GOTTPREL_PREL19", - "R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC", - "R_AARCH64_TLSIE_MOVW_GOTTPREL_G1", - "R_AARCH64_TLSLD_ADR_PAGE21", - "R_AARCH64_TLSLD_ADR_PREL21", - "R_AARCH64_TLSLD_LDST128_DTPREL_LO12", - "R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC", - "R_AARCH64_TLSLE_ADD_TPREL_HI12", - "R_AARCH64_TLSLE_ADD_TPREL_LO12", - "R_AARCH64_TLSLE_ADD_TPREL_LO12_NC", - "R_AARCH64_TLSLE_LDST128_TPREL_LO12", - "R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC", - "R_AARCH64_TLSLE_MOVW_TPREL_G0", - "R_AARCH64_TLSLE_MOVW_TPREL_G0_NC", - "R_AARCH64_TLSLE_MOVW_TPREL_G1", - "R_AARCH64_TLSLE_MOVW_TPREL_G1_NC", - "R_AARCH64_TLSLE_MOVW_TPREL_G2", - "R_AARCH64_TLS_DTPMOD64", - "R_AARCH64_TLS_DTPREL64", - "R_AARCH64_TLS_TPREL64", - "R_AARCH64_TSTBR14", - "R_ALPHA", - "R_ALPHA_BRADDR", - "R_ALPHA_COPY", - "R_ALPHA_GLOB_DAT", - "R_ALPHA_GPDISP", - "R_ALPHA_GPREL32", - "R_ALPHA_GPRELHIGH", - "R_ALPHA_GPRELLOW", - "R_ALPHA_GPVALUE", - "R_ALPHA_HINT", - "R_ALPHA_IMMED_BR_HI32", - "R_ALPHA_IMMED_GP_16", - "R_ALPHA_IMMED_GP_HI32", - "R_ALPHA_IMMED_LO32", - "R_ALPHA_IMMED_SCN_HI32", - "R_ALPHA_JMP_SLOT", - "R_ALPHA_LITERAL", - "R_ALPHA_LITUSE", - "R_ALPHA_NONE", - "R_ALPHA_OP_PRSHIFT", - "R_ALPHA_OP_PSUB", - "R_ALPHA_OP_PUSH", - "R_ALPHA_OP_STORE", - "R_ALPHA_REFLONG", - "R_ALPHA_REFQUAD", - "R_ALPHA_RELATIVE", - "R_ALPHA_SREL16", - "R_ALPHA_SREL32", - "R_ALPHA_SREL64", - "R_ARM", - "R_ARM_ABS12", - "R_ARM_ABS16", - "R_ARM_ABS32", - "R_ARM_ABS32_NOI", - "R_ARM_ABS8", - "R_ARM_ALU_PCREL_15_8", - "R_ARM_ALU_PCREL_23_15", - "R_ARM_ALU_PCREL_7_0", - "R_ARM_ALU_PC_G0", - "R_ARM_ALU_PC_G0_NC", - "R_ARM_ALU_PC_G1", - "R_ARM_ALU_PC_G1_NC", - "R_ARM_ALU_PC_G2", - "R_ARM_ALU_SBREL_19_12_NC", - "R_ARM_ALU_SBREL_27_20_CK", - "R_ARM_ALU_SB_G0", - "R_ARM_ALU_SB_G0_NC", - "R_ARM_ALU_SB_G1", - "R_ARM_ALU_SB_G1_NC", - "R_ARM_ALU_SB_G2", - "R_ARM_AMP_VCALL9", - "R_ARM_BASE_ABS", - "R_ARM_CALL", - "R_ARM_COPY", - "R_ARM_GLOB_DAT", - "R_ARM_GNU_VTENTRY", - "R_ARM_GNU_VTINHERIT", - "R_ARM_GOT32", - "R_ARM_GOTOFF", - "R_ARM_GOTOFF12", - "R_ARM_GOTPC", - "R_ARM_GOTRELAX", - "R_ARM_GOT_ABS", - "R_ARM_GOT_BREL12", - "R_ARM_GOT_PREL", - "R_ARM_IRELATIVE", - "R_ARM_JUMP24", - "R_ARM_JUMP_SLOT", - "R_ARM_LDC_PC_G0", - "R_ARM_LDC_PC_G1", - "R_ARM_LDC_PC_G2", - "R_ARM_LDC_SB_G0", - "R_ARM_LDC_SB_G1", - "R_ARM_LDC_SB_G2", - "R_ARM_LDRS_PC_G0", - "R_ARM_LDRS_PC_G1", - "R_ARM_LDRS_PC_G2", - "R_ARM_LDRS_SB_G0", - "R_ARM_LDRS_SB_G1", - "R_ARM_LDRS_SB_G2", - "R_ARM_LDR_PC_G1", - "R_ARM_LDR_PC_G2", - "R_ARM_LDR_SBREL_11_10_NC", - "R_ARM_LDR_SB_G0", - "R_ARM_LDR_SB_G1", - "R_ARM_LDR_SB_G2", - "R_ARM_ME_TOO", - "R_ARM_MOVT_ABS", - "R_ARM_MOVT_BREL", - "R_ARM_MOVT_PREL", - "R_ARM_MOVW_ABS_NC", - "R_ARM_MOVW_BREL", - "R_ARM_MOVW_BREL_NC", - "R_ARM_MOVW_PREL_NC", - "R_ARM_NONE", - "R_ARM_PC13", - "R_ARM_PC24", - "R_ARM_PLT32", - "R_ARM_PLT32_ABS", - "R_ARM_PREL31", - "R_ARM_PRIVATE_0", - "R_ARM_PRIVATE_1", - "R_ARM_PRIVATE_10", - "R_ARM_PRIVATE_11", - "R_ARM_PRIVATE_12", - "R_ARM_PRIVATE_13", - "R_ARM_PRIVATE_14", - "R_ARM_PRIVATE_15", - "R_ARM_PRIVATE_2", - "R_ARM_PRIVATE_3", - "R_ARM_PRIVATE_4", - "R_ARM_PRIVATE_5", - "R_ARM_PRIVATE_6", - "R_ARM_PRIVATE_7", - "R_ARM_PRIVATE_8", - "R_ARM_PRIVATE_9", - "R_ARM_RABS32", - "R_ARM_RBASE", - "R_ARM_REL32", - "R_ARM_REL32_NOI", - "R_ARM_RELATIVE", - "R_ARM_RPC24", - "R_ARM_RREL32", - "R_ARM_RSBREL32", - "R_ARM_RXPC25", - "R_ARM_SBREL31", - "R_ARM_SBREL32", - "R_ARM_SWI24", - "R_ARM_TARGET1", - "R_ARM_TARGET2", - "R_ARM_THM_ABS5", - "R_ARM_THM_ALU_ABS_G0_NC", - "R_ARM_THM_ALU_ABS_G1_NC", - "R_ARM_THM_ALU_ABS_G2_NC", - "R_ARM_THM_ALU_ABS_G3", - "R_ARM_THM_ALU_PREL_11_0", - "R_ARM_THM_GOT_BREL12", - "R_ARM_THM_JUMP11", - "R_ARM_THM_JUMP19", - "R_ARM_THM_JUMP24", - "R_ARM_THM_JUMP6", - "R_ARM_THM_JUMP8", - "R_ARM_THM_MOVT_ABS", - "R_ARM_THM_MOVT_BREL", - "R_ARM_THM_MOVT_PREL", - "R_ARM_THM_MOVW_ABS_NC", - "R_ARM_THM_MOVW_BREL", - "R_ARM_THM_MOVW_BREL_NC", - "R_ARM_THM_MOVW_PREL_NC", - "R_ARM_THM_PC12", - "R_ARM_THM_PC22", - "R_ARM_THM_PC8", - "R_ARM_THM_RPC22", - "R_ARM_THM_SWI8", - "R_ARM_THM_TLS_CALL", - "R_ARM_THM_TLS_DESCSEQ16", - "R_ARM_THM_TLS_DESCSEQ32", - "R_ARM_THM_XPC22", - "R_ARM_TLS_CALL", - "R_ARM_TLS_DESCSEQ", - "R_ARM_TLS_DTPMOD32", - "R_ARM_TLS_DTPOFF32", - "R_ARM_TLS_GD32", - "R_ARM_TLS_GOTDESC", - "R_ARM_TLS_IE12GP", - "R_ARM_TLS_IE32", - "R_ARM_TLS_LDM32", - "R_ARM_TLS_LDO12", - "R_ARM_TLS_LDO32", - "R_ARM_TLS_LE12", - "R_ARM_TLS_LE32", - "R_ARM_TLS_TPOFF32", - "R_ARM_V4BX", - "R_ARM_XPC25", - "R_INFO", - "R_INFO32", - "R_LARCH", - "R_LARCH_32", - "R_LARCH_32_PCREL", - "R_LARCH_64", - "R_LARCH_ABS64_HI12", - "R_LARCH_ABS64_LO20", - "R_LARCH_ABS_HI20", - "R_LARCH_ABS_LO12", - "R_LARCH_ADD16", - "R_LARCH_ADD24", - "R_LARCH_ADD32", - "R_LARCH_ADD64", - "R_LARCH_ADD8", - "R_LARCH_B16", - "R_LARCH_B21", - "R_LARCH_B26", - "R_LARCH_COPY", - "R_LARCH_GNU_VTENTRY", - "R_LARCH_GNU_VTINHERIT", - "R_LARCH_GOT64_HI12", - "R_LARCH_GOT64_LO20", - "R_LARCH_GOT64_PC_HI12", - "R_LARCH_GOT64_PC_LO20", - "R_LARCH_GOT_HI20", - "R_LARCH_GOT_LO12", - "R_LARCH_GOT_PC_HI20", - "R_LARCH_GOT_PC_LO12", - "R_LARCH_IRELATIVE", - "R_LARCH_JUMP_SLOT", - "R_LARCH_MARK_LA", - "R_LARCH_MARK_PCREL", - "R_LARCH_NONE", - "R_LARCH_PCALA64_HI12", - "R_LARCH_PCALA64_LO20", - "R_LARCH_PCALA_HI20", - "R_LARCH_PCALA_LO12", - "R_LARCH_RELATIVE", - "R_LARCH_RELAX", - "R_LARCH_SOP_ADD", - "R_LARCH_SOP_AND", - "R_LARCH_SOP_ASSERT", - "R_LARCH_SOP_IF_ELSE", - "R_LARCH_SOP_NOT", - "R_LARCH_SOP_POP_32_S_0_10_10_16_S2", - "R_LARCH_SOP_POP_32_S_0_5_10_16_S2", - "R_LARCH_SOP_POP_32_S_10_12", - "R_LARCH_SOP_POP_32_S_10_16", - "R_LARCH_SOP_POP_32_S_10_16_S2", - "R_LARCH_SOP_POP_32_S_10_5", - "R_LARCH_SOP_POP_32_S_5_20", - "R_LARCH_SOP_POP_32_U", - "R_LARCH_SOP_POP_32_U_10_12", - "R_LARCH_SOP_PUSH_ABSOLUTE", - "R_LARCH_SOP_PUSH_DUP", - "R_LARCH_SOP_PUSH_GPREL", - "R_LARCH_SOP_PUSH_PCREL", - "R_LARCH_SOP_PUSH_PLT_PCREL", - "R_LARCH_SOP_PUSH_TLS_GD", - "R_LARCH_SOP_PUSH_TLS_GOT", - "R_LARCH_SOP_PUSH_TLS_TPREL", - "R_LARCH_SOP_SL", - "R_LARCH_SOP_SR", - "R_LARCH_SOP_SUB", - "R_LARCH_SUB16", - "R_LARCH_SUB24", - "R_LARCH_SUB32", - "R_LARCH_SUB64", - "R_LARCH_SUB8", - "R_LARCH_TLS_DTPMOD32", - "R_LARCH_TLS_DTPMOD64", - "R_LARCH_TLS_DTPREL32", - "R_LARCH_TLS_DTPREL64", - "R_LARCH_TLS_GD_HI20", - "R_LARCH_TLS_GD_PC_HI20", - "R_LARCH_TLS_IE64_HI12", - "R_LARCH_TLS_IE64_LO20", - "R_LARCH_TLS_IE64_PC_HI12", - "R_LARCH_TLS_IE64_PC_LO20", - "R_LARCH_TLS_IE_HI20", - "R_LARCH_TLS_IE_LO12", - "R_LARCH_TLS_IE_PC_HI20", - "R_LARCH_TLS_IE_PC_LO12", - "R_LARCH_TLS_LD_HI20", - "R_LARCH_TLS_LD_PC_HI20", - "R_LARCH_TLS_LE64_HI12", - "R_LARCH_TLS_LE64_LO20", - "R_LARCH_TLS_LE_HI20", - "R_LARCH_TLS_LE_LO12", - "R_LARCH_TLS_TPREL32", - "R_LARCH_TLS_TPREL64", - "R_MIPS", - "R_MIPS_16", - "R_MIPS_26", - "R_MIPS_32", - "R_MIPS_64", - "R_MIPS_ADD_IMMEDIATE", - "R_MIPS_CALL16", - "R_MIPS_CALL_HI16", - "R_MIPS_CALL_LO16", - "R_MIPS_DELETE", - "R_MIPS_GOT16", - "R_MIPS_GOT_DISP", - "R_MIPS_GOT_HI16", - "R_MIPS_GOT_LO16", - "R_MIPS_GOT_OFST", - "R_MIPS_GOT_PAGE", - "R_MIPS_GPREL16", - "R_MIPS_GPREL32", - "R_MIPS_HI16", - "R_MIPS_HIGHER", - "R_MIPS_HIGHEST", - "R_MIPS_INSERT_A", - "R_MIPS_INSERT_B", - "R_MIPS_JALR", - "R_MIPS_LITERAL", - "R_MIPS_LO16", - "R_MIPS_NONE", - "R_MIPS_PC16", - "R_MIPS_PJUMP", - "R_MIPS_REL16", - "R_MIPS_REL32", - "R_MIPS_RELGOT", - "R_MIPS_SCN_DISP", - "R_MIPS_SHIFT5", - "R_MIPS_SHIFT6", - "R_MIPS_SUB", - "R_MIPS_TLS_DTPMOD32", - "R_MIPS_TLS_DTPMOD64", - "R_MIPS_TLS_DTPREL32", - "R_MIPS_TLS_DTPREL64", - "R_MIPS_TLS_DTPREL_HI16", - "R_MIPS_TLS_DTPREL_LO16", - "R_MIPS_TLS_GD", - "R_MIPS_TLS_GOTTPREL", - "R_MIPS_TLS_LDM", - "R_MIPS_TLS_TPREL32", - "R_MIPS_TLS_TPREL64", - "R_MIPS_TLS_TPREL_HI16", - "R_MIPS_TLS_TPREL_LO16", - "R_PPC", - "R_PPC64", - "R_PPC64_ADDR14", - "R_PPC64_ADDR14_BRNTAKEN", - "R_PPC64_ADDR14_BRTAKEN", - "R_PPC64_ADDR16", - "R_PPC64_ADDR16_DS", - "R_PPC64_ADDR16_HA", - "R_PPC64_ADDR16_HI", - "R_PPC64_ADDR16_HIGH", - "R_PPC64_ADDR16_HIGHA", - "R_PPC64_ADDR16_HIGHER", - "R_PPC64_ADDR16_HIGHER34", - "R_PPC64_ADDR16_HIGHERA", - "R_PPC64_ADDR16_HIGHERA34", - "R_PPC64_ADDR16_HIGHEST", - "R_PPC64_ADDR16_HIGHEST34", - "R_PPC64_ADDR16_HIGHESTA", - "R_PPC64_ADDR16_HIGHESTA34", - "R_PPC64_ADDR16_LO", - "R_PPC64_ADDR16_LO_DS", - "R_PPC64_ADDR24", - "R_PPC64_ADDR32", - "R_PPC64_ADDR64", - "R_PPC64_ADDR64_LOCAL", - "R_PPC64_COPY", - "R_PPC64_D28", - "R_PPC64_D34", - "R_PPC64_D34_HA30", - "R_PPC64_D34_HI30", - "R_PPC64_D34_LO", - "R_PPC64_DTPMOD64", - "R_PPC64_DTPREL16", - "R_PPC64_DTPREL16_DS", - "R_PPC64_DTPREL16_HA", - "R_PPC64_DTPREL16_HI", - "R_PPC64_DTPREL16_HIGH", - "R_PPC64_DTPREL16_HIGHA", - "R_PPC64_DTPREL16_HIGHER", - "R_PPC64_DTPREL16_HIGHERA", - "R_PPC64_DTPREL16_HIGHEST", - "R_PPC64_DTPREL16_HIGHESTA", - "R_PPC64_DTPREL16_LO", - "R_PPC64_DTPREL16_LO_DS", - "R_PPC64_DTPREL34", - "R_PPC64_DTPREL64", - "R_PPC64_ENTRY", - "R_PPC64_GLOB_DAT", - "R_PPC64_GNU_VTENTRY", - "R_PPC64_GNU_VTINHERIT", - "R_PPC64_GOT16", - "R_PPC64_GOT16_DS", - "R_PPC64_GOT16_HA", - "R_PPC64_GOT16_HI", - "R_PPC64_GOT16_LO", - "R_PPC64_GOT16_LO_DS", - "R_PPC64_GOT_DTPREL16_DS", - "R_PPC64_GOT_DTPREL16_HA", - "R_PPC64_GOT_DTPREL16_HI", - "R_PPC64_GOT_DTPREL16_LO_DS", - "R_PPC64_GOT_DTPREL_PCREL34", - "R_PPC64_GOT_PCREL34", - "R_PPC64_GOT_TLSGD16", - "R_PPC64_GOT_TLSGD16_HA", - "R_PPC64_GOT_TLSGD16_HI", - "R_PPC64_GOT_TLSGD16_LO", - "R_PPC64_GOT_TLSGD_PCREL34", - "R_PPC64_GOT_TLSLD16", - "R_PPC64_GOT_TLSLD16_HA", - "R_PPC64_GOT_TLSLD16_HI", - "R_PPC64_GOT_TLSLD16_LO", - "R_PPC64_GOT_TLSLD_PCREL34", - "R_PPC64_GOT_TPREL16_DS", - "R_PPC64_GOT_TPREL16_HA", - "R_PPC64_GOT_TPREL16_HI", - "R_PPC64_GOT_TPREL16_LO_DS", - "R_PPC64_GOT_TPREL_PCREL34", - "R_PPC64_IRELATIVE", - "R_PPC64_JMP_IREL", - "R_PPC64_JMP_SLOT", - "R_PPC64_NONE", - "R_PPC64_PCREL28", - "R_PPC64_PCREL34", - "R_PPC64_PCREL_OPT", - "R_PPC64_PLT16_HA", - "R_PPC64_PLT16_HI", - "R_PPC64_PLT16_LO", - "R_PPC64_PLT16_LO_DS", - "R_PPC64_PLT32", - "R_PPC64_PLT64", - "R_PPC64_PLTCALL", - "R_PPC64_PLTCALL_NOTOC", - "R_PPC64_PLTGOT16", - "R_PPC64_PLTGOT16_DS", - "R_PPC64_PLTGOT16_HA", - "R_PPC64_PLTGOT16_HI", - "R_PPC64_PLTGOT16_LO", - "R_PPC64_PLTGOT_LO_DS", - "R_PPC64_PLTREL32", - "R_PPC64_PLTREL64", - "R_PPC64_PLTSEQ", - "R_PPC64_PLTSEQ_NOTOC", - "R_PPC64_PLT_PCREL34", - "R_PPC64_PLT_PCREL34_NOTOC", - "R_PPC64_REL14", - "R_PPC64_REL14_BRNTAKEN", - "R_PPC64_REL14_BRTAKEN", - "R_PPC64_REL16", - "R_PPC64_REL16DX_HA", - "R_PPC64_REL16_HA", - "R_PPC64_REL16_HI", - "R_PPC64_REL16_HIGH", - "R_PPC64_REL16_HIGHA", - "R_PPC64_REL16_HIGHER", - "R_PPC64_REL16_HIGHER34", - "R_PPC64_REL16_HIGHERA", - "R_PPC64_REL16_HIGHERA34", - "R_PPC64_REL16_HIGHEST", - "R_PPC64_REL16_HIGHEST34", - "R_PPC64_REL16_HIGHESTA", - "R_PPC64_REL16_HIGHESTA34", - "R_PPC64_REL16_LO", - "R_PPC64_REL24", - "R_PPC64_REL24_NOTOC", - "R_PPC64_REL24_P9NOTOC", - "R_PPC64_REL30", - "R_PPC64_REL32", - "R_PPC64_REL64", - "R_PPC64_RELATIVE", - "R_PPC64_SECTOFF", - "R_PPC64_SECTOFF_DS", - "R_PPC64_SECTOFF_HA", - "R_PPC64_SECTOFF_HI", - "R_PPC64_SECTOFF_LO", - "R_PPC64_SECTOFF_LO_DS", - "R_PPC64_TLS", - "R_PPC64_TLSGD", - "R_PPC64_TLSLD", - "R_PPC64_TOC", - "R_PPC64_TOC16", - "R_PPC64_TOC16_DS", - "R_PPC64_TOC16_HA", - "R_PPC64_TOC16_HI", - "R_PPC64_TOC16_LO", - "R_PPC64_TOC16_LO_DS", - "R_PPC64_TOCSAVE", - "R_PPC64_TPREL16", - "R_PPC64_TPREL16_DS", - "R_PPC64_TPREL16_HA", - "R_PPC64_TPREL16_HI", - "R_PPC64_TPREL16_HIGH", - "R_PPC64_TPREL16_HIGHA", - "R_PPC64_TPREL16_HIGHER", - "R_PPC64_TPREL16_HIGHERA", - "R_PPC64_TPREL16_HIGHEST", - "R_PPC64_TPREL16_HIGHESTA", - "R_PPC64_TPREL16_LO", - "R_PPC64_TPREL16_LO_DS", - "R_PPC64_TPREL34", - "R_PPC64_TPREL64", - "R_PPC64_UADDR16", - "R_PPC64_UADDR32", - "R_PPC64_UADDR64", - "R_PPC_ADDR14", - "R_PPC_ADDR14_BRNTAKEN", - "R_PPC_ADDR14_BRTAKEN", - "R_PPC_ADDR16", - "R_PPC_ADDR16_HA", - "R_PPC_ADDR16_HI", - "R_PPC_ADDR16_LO", - "R_PPC_ADDR24", - "R_PPC_ADDR32", - "R_PPC_COPY", - "R_PPC_DTPMOD32", - "R_PPC_DTPREL16", - "R_PPC_DTPREL16_HA", - "R_PPC_DTPREL16_HI", - "R_PPC_DTPREL16_LO", - "R_PPC_DTPREL32", - "R_PPC_EMB_BIT_FLD", - "R_PPC_EMB_MRKREF", - "R_PPC_EMB_NADDR16", - "R_PPC_EMB_NADDR16_HA", - "R_PPC_EMB_NADDR16_HI", - "R_PPC_EMB_NADDR16_LO", - "R_PPC_EMB_NADDR32", - "R_PPC_EMB_RELSDA", - "R_PPC_EMB_RELSEC16", - "R_PPC_EMB_RELST_HA", - "R_PPC_EMB_RELST_HI", - "R_PPC_EMB_RELST_LO", - "R_PPC_EMB_SDA21", - "R_PPC_EMB_SDA2I16", - "R_PPC_EMB_SDA2REL", - "R_PPC_EMB_SDAI16", - "R_PPC_GLOB_DAT", - "R_PPC_GOT16", - "R_PPC_GOT16_HA", - "R_PPC_GOT16_HI", - "R_PPC_GOT16_LO", - "R_PPC_GOT_TLSGD16", - "R_PPC_GOT_TLSGD16_HA", - "R_PPC_GOT_TLSGD16_HI", - "R_PPC_GOT_TLSGD16_LO", - "R_PPC_GOT_TLSLD16", - "R_PPC_GOT_TLSLD16_HA", - "R_PPC_GOT_TLSLD16_HI", - "R_PPC_GOT_TLSLD16_LO", - "R_PPC_GOT_TPREL16", - "R_PPC_GOT_TPREL16_HA", - "R_PPC_GOT_TPREL16_HI", - "R_PPC_GOT_TPREL16_LO", - "R_PPC_JMP_SLOT", - "R_PPC_LOCAL24PC", - "R_PPC_NONE", - "R_PPC_PLT16_HA", - "R_PPC_PLT16_HI", - "R_PPC_PLT16_LO", - "R_PPC_PLT32", - "R_PPC_PLTREL24", - "R_PPC_PLTREL32", - "R_PPC_REL14", - "R_PPC_REL14_BRNTAKEN", - "R_PPC_REL14_BRTAKEN", - "R_PPC_REL24", - "R_PPC_REL32", - "R_PPC_RELATIVE", - "R_PPC_SDAREL16", - "R_PPC_SECTOFF", - "R_PPC_SECTOFF_HA", - "R_PPC_SECTOFF_HI", - "R_PPC_SECTOFF_LO", - "R_PPC_TLS", - "R_PPC_TPREL16", - "R_PPC_TPREL16_HA", - "R_PPC_TPREL16_HI", - "R_PPC_TPREL16_LO", - "R_PPC_TPREL32", - "R_PPC_UADDR16", - "R_PPC_UADDR32", - "R_RISCV", - "R_RISCV_32", - "R_RISCV_32_PCREL", - "R_RISCV_64", - "R_RISCV_ADD16", - "R_RISCV_ADD32", - "R_RISCV_ADD64", - "R_RISCV_ADD8", - "R_RISCV_ALIGN", - "R_RISCV_BRANCH", - "R_RISCV_CALL", - "R_RISCV_CALL_PLT", - "R_RISCV_COPY", - "R_RISCV_GNU_VTENTRY", - "R_RISCV_GNU_VTINHERIT", - "R_RISCV_GOT_HI20", - "R_RISCV_GPREL_I", - "R_RISCV_GPREL_S", - "R_RISCV_HI20", - "R_RISCV_JAL", - "R_RISCV_JUMP_SLOT", - "R_RISCV_LO12_I", - "R_RISCV_LO12_S", - "R_RISCV_NONE", - "R_RISCV_PCREL_HI20", - "R_RISCV_PCREL_LO12_I", - "R_RISCV_PCREL_LO12_S", - "R_RISCV_RELATIVE", - "R_RISCV_RELAX", - "R_RISCV_RVC_BRANCH", - "R_RISCV_RVC_JUMP", - "R_RISCV_RVC_LUI", - "R_RISCV_SET16", - "R_RISCV_SET32", - "R_RISCV_SET6", - "R_RISCV_SET8", - "R_RISCV_SUB16", - "R_RISCV_SUB32", - "R_RISCV_SUB6", - "R_RISCV_SUB64", - "R_RISCV_SUB8", - "R_RISCV_TLS_DTPMOD32", - "R_RISCV_TLS_DTPMOD64", - "R_RISCV_TLS_DTPREL32", - "R_RISCV_TLS_DTPREL64", - "R_RISCV_TLS_GD_HI20", - "R_RISCV_TLS_GOT_HI20", - "R_RISCV_TLS_TPREL32", - "R_RISCV_TLS_TPREL64", - "R_RISCV_TPREL_ADD", - "R_RISCV_TPREL_HI20", - "R_RISCV_TPREL_I", - "R_RISCV_TPREL_LO12_I", - "R_RISCV_TPREL_LO12_S", - "R_RISCV_TPREL_S", - "R_SPARC", - "R_SPARC_10", - "R_SPARC_11", - "R_SPARC_13", - "R_SPARC_16", - "R_SPARC_22", - "R_SPARC_32", - "R_SPARC_5", - "R_SPARC_6", - "R_SPARC_64", - "R_SPARC_7", - "R_SPARC_8", - "R_SPARC_COPY", - "R_SPARC_DISP16", - "R_SPARC_DISP32", - "R_SPARC_DISP64", - "R_SPARC_DISP8", - "R_SPARC_GLOB_DAT", - "R_SPARC_GLOB_JMP", - "R_SPARC_GOT10", - "R_SPARC_GOT13", - "R_SPARC_GOT22", - "R_SPARC_H44", - "R_SPARC_HH22", - "R_SPARC_HI22", - "R_SPARC_HIPLT22", - "R_SPARC_HIX22", - "R_SPARC_HM10", - "R_SPARC_JMP_SLOT", - "R_SPARC_L44", - "R_SPARC_LM22", - "R_SPARC_LO10", - "R_SPARC_LOPLT10", - "R_SPARC_LOX10", - "R_SPARC_M44", - "R_SPARC_NONE", - "R_SPARC_OLO10", - "R_SPARC_PC10", - "R_SPARC_PC22", - "R_SPARC_PCPLT10", - "R_SPARC_PCPLT22", - "R_SPARC_PCPLT32", - "R_SPARC_PC_HH22", - "R_SPARC_PC_HM10", - "R_SPARC_PC_LM22", - "R_SPARC_PLT32", - "R_SPARC_PLT64", - "R_SPARC_REGISTER", - "R_SPARC_RELATIVE", - "R_SPARC_UA16", - "R_SPARC_UA32", - "R_SPARC_UA64", - "R_SPARC_WDISP16", - "R_SPARC_WDISP19", - "R_SPARC_WDISP22", - "R_SPARC_WDISP30", - "R_SPARC_WPLT30", - "R_SYM32", - "R_SYM64", - "R_TYPE32", - "R_TYPE64", - "R_X86_64", - "R_X86_64_16", - "R_X86_64_32", - "R_X86_64_32S", - "R_X86_64_64", - "R_X86_64_8", - "R_X86_64_COPY", - "R_X86_64_DTPMOD64", - "R_X86_64_DTPOFF32", - "R_X86_64_DTPOFF64", - "R_X86_64_GLOB_DAT", - "R_X86_64_GOT32", - "R_X86_64_GOT64", - "R_X86_64_GOTOFF64", - "R_X86_64_GOTPC32", - "R_X86_64_GOTPC32_TLSDESC", - "R_X86_64_GOTPC64", - "R_X86_64_GOTPCREL", - "R_X86_64_GOTPCREL64", - "R_X86_64_GOTPCRELX", - "R_X86_64_GOTPLT64", - "R_X86_64_GOTTPOFF", - "R_X86_64_IRELATIVE", - "R_X86_64_JMP_SLOT", - "R_X86_64_NONE", - "R_X86_64_PC16", - "R_X86_64_PC32", - "R_X86_64_PC32_BND", - "R_X86_64_PC64", - "R_X86_64_PC8", - "R_X86_64_PLT32", - "R_X86_64_PLT32_BND", - "R_X86_64_PLTOFF64", - "R_X86_64_RELATIVE", - "R_X86_64_RELATIVE64", - "R_X86_64_REX_GOTPCRELX", - "R_X86_64_SIZE32", - "R_X86_64_SIZE64", - "R_X86_64_TLSDESC", - "R_X86_64_TLSDESC_CALL", - "R_X86_64_TLSGD", - "R_X86_64_TLSLD", - "R_X86_64_TPOFF32", - "R_X86_64_TPOFF64", - "Rel32", - "Rel64", - "Rela32", - "Rela64", - "SHF_ALLOC", - "SHF_COMPRESSED", - "SHF_EXECINSTR", - "SHF_GROUP", - "SHF_INFO_LINK", - "SHF_LINK_ORDER", - "SHF_MASKOS", - "SHF_MASKPROC", - "SHF_MERGE", - "SHF_OS_NONCONFORMING", - "SHF_STRINGS", - "SHF_TLS", - "SHF_WRITE", - "SHN_ABS", - "SHN_COMMON", - "SHN_HIOS", - "SHN_HIPROC", - "SHN_HIRESERVE", - "SHN_LOOS", - "SHN_LOPROC", - "SHN_LORESERVE", - "SHN_UNDEF", - "SHN_XINDEX", - "SHT_DYNAMIC", - "SHT_DYNSYM", - "SHT_FINI_ARRAY", - "SHT_GNU_ATTRIBUTES", - "SHT_GNU_HASH", - "SHT_GNU_LIBLIST", - "SHT_GNU_VERDEF", - "SHT_GNU_VERNEED", - "SHT_GNU_VERSYM", - "SHT_GROUP", - "SHT_HASH", - "SHT_HIOS", - "SHT_HIPROC", - "SHT_HIUSER", - "SHT_INIT_ARRAY", - "SHT_LOOS", - "SHT_LOPROC", - "SHT_LOUSER", - "SHT_MIPS_ABIFLAGS", - "SHT_NOBITS", - "SHT_NOTE", - "SHT_NULL", - "SHT_PREINIT_ARRAY", - "SHT_PROGBITS", - "SHT_REL", - "SHT_RELA", - "SHT_SHLIB", - "SHT_STRTAB", - "SHT_SYMTAB", - "SHT_SYMTAB_SHNDX", - "STB_GLOBAL", - "STB_HIOS", - "STB_HIPROC", - "STB_LOCAL", - "STB_LOOS", - "STB_LOPROC", - "STB_WEAK", - "STT_COMMON", - "STT_FILE", - "STT_FUNC", - "STT_HIOS", - "STT_HIPROC", - "STT_LOOS", - "STT_LOPROC", - "STT_NOTYPE", - "STT_OBJECT", - "STT_SECTION", - "STT_TLS", - "STV_DEFAULT", - "STV_HIDDEN", - "STV_INTERNAL", - "STV_PROTECTED", - "ST_BIND", - "ST_INFO", - "ST_TYPE", - "ST_VISIBILITY", - "Section", - "Section32", - "Section64", - "SectionFlag", - "SectionHeader", - "SectionIndex", - "SectionType", - "Sym32", - "Sym32Size", - "Sym64", - "Sym64Size", - "SymBind", - "SymType", - "SymVis", - "Symbol", - "Type", - "Version", - }, - "debug/gosym": { - "DecodingError", - "Func", - "LineTable", - "NewLineTable", - "NewTable", - "Obj", - "Sym", - "Table", - "UnknownFileError", - "UnknownLineError", - }, - "debug/macho": { - "ARM64_RELOC_ADDEND", - "ARM64_RELOC_BRANCH26", - "ARM64_RELOC_GOT_LOAD_PAGE21", - "ARM64_RELOC_GOT_LOAD_PAGEOFF12", - "ARM64_RELOC_PAGE21", - "ARM64_RELOC_PAGEOFF12", - "ARM64_RELOC_POINTER_TO_GOT", - "ARM64_RELOC_SUBTRACTOR", - "ARM64_RELOC_TLVP_LOAD_PAGE21", - "ARM64_RELOC_TLVP_LOAD_PAGEOFF12", - "ARM64_RELOC_UNSIGNED", - "ARM_RELOC_BR24", - "ARM_RELOC_HALF", - "ARM_RELOC_HALF_SECTDIFF", - "ARM_RELOC_LOCAL_SECTDIFF", - "ARM_RELOC_PAIR", - "ARM_RELOC_PB_LA_PTR", - "ARM_RELOC_SECTDIFF", - "ARM_RELOC_VANILLA", - "ARM_THUMB_32BIT_BRANCH", - "ARM_THUMB_RELOC_BR22", - "Cpu", - "Cpu386", - "CpuAmd64", - "CpuArm", - "CpuArm64", - "CpuPpc", - "CpuPpc64", - "Dylib", - "DylibCmd", - "Dysymtab", - "DysymtabCmd", - "ErrNotFat", - "FatArch", - "FatArchHeader", - "FatFile", - "File", - "FileHeader", - "FlagAllModsBound", - "FlagAllowStackExecution", - "FlagAppExtensionSafe", - "FlagBindAtLoad", - "FlagBindsToWeak", - "FlagCanonical", - "FlagDeadStrippableDylib", - "FlagDyldLink", - "FlagForceFlat", - "FlagHasTLVDescriptors", - "FlagIncrLink", - "FlagLazyInit", - "FlagNoFixPrebinding", - "FlagNoHeapExecution", - "FlagNoMultiDefs", - "FlagNoReexportedDylibs", - "FlagNoUndefs", - "FlagPIE", - "FlagPrebindable", - "FlagPrebound", - "FlagRootSafe", - "FlagSetuidSafe", - "FlagSplitSegs", - "FlagSubsectionsViaSymbols", - "FlagTwoLevel", - "FlagWeakDefines", - "FormatError", - "GENERIC_RELOC_LOCAL_SECTDIFF", - "GENERIC_RELOC_PAIR", - "GENERIC_RELOC_PB_LA_PTR", - "GENERIC_RELOC_SECTDIFF", - "GENERIC_RELOC_TLV", - "GENERIC_RELOC_VANILLA", - "Load", - "LoadBytes", - "LoadCmd", - "LoadCmdDylib", - "LoadCmdDylinker", - "LoadCmdDysymtab", - "LoadCmdRpath", - "LoadCmdSegment", - "LoadCmdSegment64", - "LoadCmdSymtab", - "LoadCmdThread", - "LoadCmdUnixThread", - "Magic32", - "Magic64", - "MagicFat", - "NewFatFile", - "NewFile", - "Nlist32", - "Nlist64", - "Open", - "OpenFat", - "Regs386", - "RegsAMD64", - "Reloc", - "RelocTypeARM", - "RelocTypeARM64", - "RelocTypeGeneric", - "RelocTypeX86_64", - "Rpath", - "RpathCmd", - "Section", - "Section32", - "Section64", - "SectionHeader", - "Segment", - "Segment32", - "Segment64", - "SegmentHeader", - "Symbol", - "Symtab", - "SymtabCmd", - "Thread", - "Type", - "TypeBundle", - "TypeDylib", - "TypeExec", - "TypeObj", - "X86_64_RELOC_BRANCH", - "X86_64_RELOC_GOT", - "X86_64_RELOC_GOT_LOAD", - "X86_64_RELOC_SIGNED", - "X86_64_RELOC_SIGNED_1", - "X86_64_RELOC_SIGNED_2", - "X86_64_RELOC_SIGNED_4", - "X86_64_RELOC_SUBTRACTOR", - "X86_64_RELOC_TLV", - "X86_64_RELOC_UNSIGNED", - }, - "debug/pe": { - "COFFSymbol", - "COFFSymbolAuxFormat5", - "COFFSymbolSize", - "DataDirectory", - "File", - "FileHeader", - "FormatError", - "IMAGE_COMDAT_SELECT_ANY", - "IMAGE_COMDAT_SELECT_ASSOCIATIVE", - "IMAGE_COMDAT_SELECT_EXACT_MATCH", - "IMAGE_COMDAT_SELECT_LARGEST", - "IMAGE_COMDAT_SELECT_NODUPLICATES", - "IMAGE_COMDAT_SELECT_SAME_SIZE", - "IMAGE_DIRECTORY_ENTRY_ARCHITECTURE", - "IMAGE_DIRECTORY_ENTRY_BASERELOC", - "IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT", - "IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR", - "IMAGE_DIRECTORY_ENTRY_DEBUG", - "IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT", - "IMAGE_DIRECTORY_ENTRY_EXCEPTION", - "IMAGE_DIRECTORY_ENTRY_EXPORT", - "IMAGE_DIRECTORY_ENTRY_GLOBALPTR", - "IMAGE_DIRECTORY_ENTRY_IAT", - "IMAGE_DIRECTORY_ENTRY_IMPORT", - "IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG", - "IMAGE_DIRECTORY_ENTRY_RESOURCE", - "IMAGE_DIRECTORY_ENTRY_SECURITY", - "IMAGE_DIRECTORY_ENTRY_TLS", - "IMAGE_DLLCHARACTERISTICS_APPCONTAINER", - "IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE", - "IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY", - "IMAGE_DLLCHARACTERISTICS_GUARD_CF", - "IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA", - "IMAGE_DLLCHARACTERISTICS_NO_BIND", - "IMAGE_DLLCHARACTERISTICS_NO_ISOLATION", - "IMAGE_DLLCHARACTERISTICS_NO_SEH", - "IMAGE_DLLCHARACTERISTICS_NX_COMPAT", - "IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE", - "IMAGE_DLLCHARACTERISTICS_WDM_DRIVER", - "IMAGE_FILE_32BIT_MACHINE", - "IMAGE_FILE_AGGRESIVE_WS_TRIM", - "IMAGE_FILE_BYTES_REVERSED_HI", - "IMAGE_FILE_BYTES_REVERSED_LO", - "IMAGE_FILE_DEBUG_STRIPPED", - "IMAGE_FILE_DLL", - "IMAGE_FILE_EXECUTABLE_IMAGE", - "IMAGE_FILE_LARGE_ADDRESS_AWARE", - "IMAGE_FILE_LINE_NUMS_STRIPPED", - "IMAGE_FILE_LOCAL_SYMS_STRIPPED", - "IMAGE_FILE_MACHINE_AM33", - "IMAGE_FILE_MACHINE_AMD64", - "IMAGE_FILE_MACHINE_ARM", - "IMAGE_FILE_MACHINE_ARM64", - "IMAGE_FILE_MACHINE_ARMNT", - "IMAGE_FILE_MACHINE_EBC", - "IMAGE_FILE_MACHINE_I386", - "IMAGE_FILE_MACHINE_IA64", - "IMAGE_FILE_MACHINE_LOONGARCH32", - "IMAGE_FILE_MACHINE_LOONGARCH64", - "IMAGE_FILE_MACHINE_M32R", - "IMAGE_FILE_MACHINE_MIPS16", - "IMAGE_FILE_MACHINE_MIPSFPU", - "IMAGE_FILE_MACHINE_MIPSFPU16", - "IMAGE_FILE_MACHINE_POWERPC", - "IMAGE_FILE_MACHINE_POWERPCFP", - "IMAGE_FILE_MACHINE_R4000", - "IMAGE_FILE_MACHINE_RISCV128", - "IMAGE_FILE_MACHINE_RISCV32", - "IMAGE_FILE_MACHINE_RISCV64", - "IMAGE_FILE_MACHINE_SH3", - "IMAGE_FILE_MACHINE_SH3DSP", - "IMAGE_FILE_MACHINE_SH4", - "IMAGE_FILE_MACHINE_SH5", - "IMAGE_FILE_MACHINE_THUMB", - "IMAGE_FILE_MACHINE_UNKNOWN", - "IMAGE_FILE_MACHINE_WCEMIPSV2", - "IMAGE_FILE_NET_RUN_FROM_SWAP", - "IMAGE_FILE_RELOCS_STRIPPED", - "IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP", - "IMAGE_FILE_SYSTEM", - "IMAGE_FILE_UP_SYSTEM_ONLY", - "IMAGE_SCN_CNT_CODE", - "IMAGE_SCN_CNT_INITIALIZED_DATA", - "IMAGE_SCN_CNT_UNINITIALIZED_DATA", - "IMAGE_SCN_LNK_COMDAT", - "IMAGE_SCN_MEM_DISCARDABLE", - "IMAGE_SCN_MEM_EXECUTE", - "IMAGE_SCN_MEM_READ", - "IMAGE_SCN_MEM_WRITE", - "IMAGE_SUBSYSTEM_EFI_APPLICATION", - "IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER", - "IMAGE_SUBSYSTEM_EFI_ROM", - "IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER", - "IMAGE_SUBSYSTEM_NATIVE", - "IMAGE_SUBSYSTEM_NATIVE_WINDOWS", - "IMAGE_SUBSYSTEM_OS2_CUI", - "IMAGE_SUBSYSTEM_POSIX_CUI", - "IMAGE_SUBSYSTEM_UNKNOWN", - "IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION", - "IMAGE_SUBSYSTEM_WINDOWS_CE_GUI", - "IMAGE_SUBSYSTEM_WINDOWS_CUI", - "IMAGE_SUBSYSTEM_WINDOWS_GUI", - "IMAGE_SUBSYSTEM_XBOX", - "ImportDirectory", - "NewFile", - "Open", - "OptionalHeader32", - "OptionalHeader64", - "Reloc", - "Section", - "SectionHeader", - "SectionHeader32", - "StringTable", - "Symbol", - }, - "debug/plan9obj": { - "ErrNoSymbols", - "File", - "FileHeader", - "Magic386", - "Magic64", - "MagicAMD64", - "MagicARM", - "NewFile", - "Open", - "Section", - "SectionHeader", - "Sym", - }, - "embed": { - "FS", - }, - "encoding": { - "BinaryMarshaler", - "BinaryUnmarshaler", - "TextMarshaler", - "TextUnmarshaler", - }, - "encoding/ascii85": { - "CorruptInputError", - "Decode", - "Encode", - "MaxEncodedLen", - "NewDecoder", - "NewEncoder", - }, - "encoding/asn1": { - "BitString", - "ClassApplication", - "ClassContextSpecific", - "ClassPrivate", - "ClassUniversal", - "Enumerated", - "Flag", - "Marshal", - "MarshalWithParams", - "NullBytes", - "NullRawValue", - "ObjectIdentifier", - "RawContent", - "RawValue", - "StructuralError", - "SyntaxError", - "TagBMPString", - "TagBitString", - "TagBoolean", - "TagEnum", - "TagGeneralString", - "TagGeneralizedTime", - "TagIA5String", - "TagInteger", - "TagNull", - "TagNumericString", - "TagOID", - "TagOctetString", - "TagPrintableString", - "TagSequence", - "TagSet", - "TagT61String", - "TagUTCTime", - "TagUTF8String", - "Unmarshal", - "UnmarshalWithParams", - }, - "encoding/base32": { - "CorruptInputError", - "Encoding", - "HexEncoding", - "NewDecoder", - "NewEncoder", - "NewEncoding", - "NoPadding", - "StdEncoding", - "StdPadding", - }, - "encoding/base64": { - "CorruptInputError", - "Encoding", - "NewDecoder", - "NewEncoder", - "NewEncoding", - "NoPadding", - "RawStdEncoding", - "RawURLEncoding", - "StdEncoding", - "StdPadding", - "URLEncoding", - }, - "encoding/binary": { - "AppendByteOrder", - "AppendUvarint", - "AppendVarint", - "BigEndian", - "ByteOrder", - "LittleEndian", - "MaxVarintLen16", - "MaxVarintLen32", - "MaxVarintLen64", - "NativeEndian", - "PutUvarint", - "PutVarint", - "Read", - "ReadUvarint", - "ReadVarint", - "Size", - "Uvarint", - "Varint", - "Write", - }, - "encoding/csv": { - "ErrBareQuote", - "ErrFieldCount", - "ErrQuote", - "ErrTrailingComma", - "NewReader", - "NewWriter", - "ParseError", - "Reader", - "Writer", - }, - "encoding/gob": { - "CommonType", - "Decoder", - "Encoder", - "GobDecoder", - "GobEncoder", - "NewDecoder", - "NewEncoder", - "Register", - "RegisterName", - }, - "encoding/hex": { - "Decode", - "DecodeString", - "DecodedLen", - "Dump", - "Dumper", - "Encode", - "EncodeToString", - "EncodedLen", - "ErrLength", - "InvalidByteError", - "NewDecoder", - "NewEncoder", - }, - "encoding/json": { - "Compact", - "Decoder", - "Delim", - "Encoder", - "HTMLEscape", - "Indent", - "InvalidUTF8Error", - "InvalidUnmarshalError", - "Marshal", - "MarshalIndent", - "Marshaler", - "MarshalerError", - "NewDecoder", - "NewEncoder", - "Number", - "RawMessage", - "SyntaxError", - "Token", - "Unmarshal", - "UnmarshalFieldError", - "UnmarshalTypeError", - "Unmarshaler", - "UnsupportedTypeError", - "UnsupportedValueError", - "Valid", - }, - "encoding/pem": { - "Block", - "Decode", - "Encode", - "EncodeToMemory", - }, - "encoding/xml": { - "Attr", - "CharData", - "Comment", - "CopyToken", - "Decoder", - "Directive", - "Encoder", - "EndElement", - "Escape", - "EscapeText", - "HTMLAutoClose", - "HTMLEntity", - "Header", - "Marshal", - "MarshalIndent", - "Marshaler", - "MarshalerAttr", - "Name", - "NewDecoder", - "NewEncoder", - "NewTokenDecoder", - "ProcInst", - "StartElement", - "SyntaxError", - "TagPathError", - "Token", - "TokenReader", - "Unmarshal", - "UnmarshalError", - "Unmarshaler", - "UnmarshalerAttr", - "UnsupportedTypeError", - }, - "errors": { - "As", - "ErrUnsupported", - "Is", - "Join", - "New", - "Unwrap", - }, - "expvar": { - "Do", - "Float", - "Func", - "Get", - "Handler", - "Int", - "KeyValue", - "Map", - "NewFloat", - "NewInt", - "NewMap", - "NewString", - "Publish", - "String", - "Var", - }, - "flag": { - "Arg", - "Args", - "Bool", - "BoolFunc", - "BoolVar", - "CommandLine", - "ContinueOnError", - "Duration", - "DurationVar", - "ErrHelp", - "ErrorHandling", - "ExitOnError", - "Flag", - "FlagSet", - "Float64", - "Float64Var", - "Func", - "Getter", - "Int", - "Int64", - "Int64Var", - "IntVar", - "Lookup", - "NArg", - "NFlag", - "NewFlagSet", - "PanicOnError", - "Parse", - "Parsed", - "PrintDefaults", - "Set", - "String", - "StringVar", - "TextVar", - "Uint", - "Uint64", - "Uint64Var", - "UintVar", - "UnquoteUsage", - "Usage", - "Value", - "Var", - "Visit", - "VisitAll", - }, - "fmt": { - "Append", - "Appendf", - "Appendln", - "Errorf", - "FormatString", - "Formatter", - "Fprint", - "Fprintf", - "Fprintln", - "Fscan", - "Fscanf", - "Fscanln", - "GoStringer", - "Print", - "Printf", - "Println", - "Scan", - "ScanState", - "Scanf", - "Scanln", - "Scanner", - "Sprint", - "Sprintf", - "Sprintln", - "Sscan", - "Sscanf", - "Sscanln", - "State", - "Stringer", - }, - "go/ast": { - "ArrayType", - "AssignStmt", - "Bad", - "BadDecl", - "BadExpr", - "BadStmt", - "BasicLit", - "BinaryExpr", - "BlockStmt", - "BranchStmt", - "CallExpr", - "CaseClause", - "ChanDir", - "ChanType", - "CommClause", - "Comment", - "CommentGroup", - "CommentMap", - "CompositeLit", - "Con", - "Decl", - "DeclStmt", - "DeferStmt", - "Ellipsis", - "EmptyStmt", - "Expr", - "ExprStmt", - "Field", - "FieldFilter", - "FieldList", - "File", - "FileExports", - "Filter", - "FilterDecl", - "FilterFile", - "FilterFuncDuplicates", - "FilterImportDuplicates", - "FilterPackage", - "FilterUnassociatedComments", - "ForStmt", - "Fprint", - "Fun", - "FuncDecl", - "FuncLit", - "FuncType", - "GenDecl", - "GoStmt", - "Ident", - "IfStmt", - "ImportSpec", - "Importer", - "IncDecStmt", - "IndexExpr", - "IndexListExpr", - "Inspect", - "InterfaceType", - "IsExported", - "IsGenerated", - "KeyValueExpr", - "LabeledStmt", - "Lbl", - "MapType", - "MergeMode", - "MergePackageFiles", - "NewCommentMap", - "NewIdent", - "NewObj", - "NewPackage", - "NewScope", - "Node", - "NotNilFilter", - "ObjKind", - "Object", - "Package", - "PackageExports", - "ParenExpr", - "Pkg", - "Print", - "RECV", - "RangeStmt", - "ReturnStmt", - "SEND", - "Scope", - "SelectStmt", - "SelectorExpr", - "SendStmt", - "SliceExpr", - "SortImports", - "Spec", - "StarExpr", - "Stmt", - "StructType", - "SwitchStmt", - "Typ", - "TypeAssertExpr", - "TypeSpec", - "TypeSwitchStmt", - "UnaryExpr", - "ValueSpec", - "Var", - "Visitor", - "Walk", - }, - "go/build": { - "AllowBinary", - "ArchChar", - "Context", - "Default", - "Directive", - "FindOnly", - "IgnoreVendor", - "Import", - "ImportComment", - "ImportDir", - "ImportMode", - "IsLocalImport", - "MultiplePackageError", - "NoGoError", - "Package", - "ToolDir", - }, - "go/build/constraint": { - "AndExpr", - "Expr", - "GoVersion", - "IsGoBuild", - "IsPlusBuild", - "NotExpr", - "OrExpr", - "Parse", - "PlusBuildLines", - "SyntaxError", - "TagExpr", - }, - "go/constant": { - "BinaryOp", - "BitLen", - "Bool", - "BoolVal", - "Bytes", - "Compare", - "Complex", - "Denom", - "Float", - "Float32Val", - "Float64Val", - "Imag", - "Int", - "Int64Val", - "Kind", - "Make", - "MakeBool", - "MakeFloat64", - "MakeFromBytes", - "MakeFromLiteral", - "MakeImag", - "MakeInt64", - "MakeString", - "MakeUint64", - "MakeUnknown", - "Num", - "Real", - "Shift", - "Sign", - "String", - "StringVal", - "ToComplex", - "ToFloat", - "ToInt", - "Uint64Val", - "UnaryOp", - "Unknown", - "Val", - "Value", - }, - "go/doc": { - "AllDecls", - "AllMethods", - "Example", - "Examples", - "Filter", - "Func", - "IllegalPrefixes", - "IsPredeclared", - "Mode", - "New", - "NewFromFiles", - "Note", - "Package", - "PreserveAST", - "Synopsis", - "ToHTML", - "ToText", - "Type", - "Value", - }, - "go/doc/comment": { - "Block", - "Code", - "DefaultLookupPackage", - "Doc", - "DocLink", - "Heading", - "Italic", - "Link", - "LinkDef", - "List", - "ListItem", - "Paragraph", - "Parser", - "Plain", - "Printer", - "Text", - }, - "go/format": { - "Node", - "Source", - }, - "go/importer": { - "Default", - "For", - "ForCompiler", - "Lookup", - }, - "go/parser": { - "AllErrors", - "DeclarationErrors", - "ImportsOnly", - "Mode", - "PackageClauseOnly", - "ParseComments", - "ParseDir", - "ParseExpr", - "ParseExprFrom", - "ParseFile", - "SkipObjectResolution", - "SpuriousErrors", - "Trace", - }, - "go/printer": { - "CommentedNode", - "Config", - "Fprint", - "Mode", - "RawFormat", - "SourcePos", - "TabIndent", - "UseSpaces", - }, - "go/scanner": { - "Error", - "ErrorHandler", - "ErrorList", - "Mode", - "PrintError", - "ScanComments", - "Scanner", - }, - "go/token": { - "ADD", - "ADD_ASSIGN", - "AND", - "AND_ASSIGN", - "AND_NOT", - "AND_NOT_ASSIGN", - "ARROW", - "ASSIGN", - "BREAK", - "CASE", - "CHAN", - "CHAR", - "COLON", - "COMMA", - "COMMENT", - "CONST", - "CONTINUE", - "DEC", - "DEFAULT", - "DEFER", - "DEFINE", - "ELLIPSIS", - "ELSE", - "EOF", - "EQL", - "FALLTHROUGH", - "FLOAT", - "FOR", - "FUNC", - "File", - "FileSet", - "GEQ", - "GO", - "GOTO", - "GTR", - "HighestPrec", - "IDENT", - "IF", - "ILLEGAL", - "IMAG", - "IMPORT", - "INC", - "INT", - "INTERFACE", - "IsExported", - "IsIdentifier", - "IsKeyword", - "LAND", - "LBRACE", - "LBRACK", - "LEQ", - "LOR", - "LPAREN", - "LSS", - "Lookup", - "LowestPrec", - "MAP", - "MUL", - "MUL_ASSIGN", - "NEQ", - "NOT", - "NewFileSet", - "NoPos", - "OR", - "OR_ASSIGN", - "PACKAGE", - "PERIOD", - "Pos", - "Position", - "QUO", - "QUO_ASSIGN", - "RANGE", - "RBRACE", - "RBRACK", - "REM", - "REM_ASSIGN", - "RETURN", - "RPAREN", - "SELECT", - "SEMICOLON", - "SHL", - "SHL_ASSIGN", - "SHR", - "SHR_ASSIGN", - "STRING", - "STRUCT", - "SUB", - "SUB_ASSIGN", - "SWITCH", - "TILDE", - "TYPE", - "Token", - "UnaryPrec", - "VAR", - "XOR", - "XOR_ASSIGN", - }, - "go/types": { - "ArgumentError", - "Array", - "AssertableTo", - "AssignableTo", - "Basic", - "BasicInfo", - "BasicKind", - "Bool", - "Builtin", - "Byte", - "Chan", - "ChanDir", - "CheckExpr", - "Checker", - "Comparable", - "Complex128", - "Complex64", - "Config", - "Const", - "Context", - "ConvertibleTo", - "DefPredeclaredTestFuncs", - "Default", - "Error", - "Eval", - "ExprString", - "FieldVal", - "Float32", - "Float64", - "Func", - "Id", - "Identical", - "IdenticalIgnoreTags", - "Implements", - "ImportMode", - "Importer", - "ImporterFrom", - "Info", - "Initializer", - "Instance", - "Instantiate", - "Int", - "Int16", - "Int32", - "Int64", - "Int8", - "Interface", - "Invalid", - "IsBoolean", - "IsComplex", - "IsConstType", - "IsFloat", - "IsInteger", - "IsInterface", - "IsNumeric", - "IsOrdered", - "IsString", - "IsUnsigned", - "IsUntyped", - "Label", - "LookupFieldOrMethod", - "Map", - "MethodExpr", - "MethodSet", - "MethodVal", - "MissingMethod", - "Named", - "NewArray", - "NewChan", - "NewChecker", - "NewConst", - "NewContext", - "NewField", - "NewFunc", - "NewInterface", - "NewInterfaceType", - "NewLabel", - "NewMap", - "NewMethodSet", - "NewNamed", - "NewPackage", - "NewParam", - "NewPkgName", - "NewPointer", - "NewScope", - "NewSignature", - "NewSignatureType", - "NewSlice", - "NewStruct", - "NewTerm", - "NewTuple", - "NewTypeName", - "NewTypeParam", - "NewUnion", - "NewVar", - "Nil", - "Object", - "ObjectString", - "Package", - "PkgName", - "Pointer", - "Qualifier", - "RecvOnly", - "RelativeTo", - "Rune", - "Satisfies", - "Scope", - "Selection", - "SelectionKind", - "SelectionString", - "SendOnly", - "SendRecv", - "Signature", - "Sizes", - "SizesFor", - "Slice", - "StdSizes", - "String", - "Struct", - "Term", - "Tuple", - "Typ", - "Type", - "TypeAndValue", - "TypeList", - "TypeName", - "TypeParam", - "TypeParamList", - "TypeString", - "Uint", - "Uint16", - "Uint32", - "Uint64", - "Uint8", - "Uintptr", - "Union", - "Universe", - "Unsafe", - "UnsafePointer", - "UntypedBool", - "UntypedComplex", - "UntypedFloat", - "UntypedInt", - "UntypedNil", - "UntypedRune", - "UntypedString", - "Var", - "WriteExpr", - "WriteSignature", - "WriteType", - }, - "hash": { - "Hash", - "Hash32", - "Hash64", - }, - "hash/adler32": { - "Checksum", - "New", - "Size", - }, - "hash/crc32": { - "Castagnoli", - "Checksum", - "ChecksumIEEE", - "IEEE", - "IEEETable", - "Koopman", - "MakeTable", - "New", - "NewIEEE", - "Size", - "Table", - "Update", - }, - "hash/crc64": { - "Checksum", - "ECMA", - "ISO", - "MakeTable", - "New", - "Size", - "Table", - "Update", - }, - "hash/fnv": { - "New128", - "New128a", - "New32", - "New32a", - "New64", - "New64a", - }, - "hash/maphash": { - "Bytes", - "Hash", - "MakeSeed", - "Seed", - "String", - }, - "html": { - "EscapeString", - "UnescapeString", - }, - "html/template": { - "CSS", - "ErrAmbigContext", - "ErrBadHTML", - "ErrBranchEnd", - "ErrEndContext", - "ErrJSTemplate", - "ErrNoSuchTemplate", - "ErrOutputContext", - "ErrPartialCharset", - "ErrPartialEscape", - "ErrPredefinedEscaper", - "ErrRangeLoopReentry", - "ErrSlashAmbig", - "Error", - "ErrorCode", - "FuncMap", - "HTML", - "HTMLAttr", - "HTMLEscape", - "HTMLEscapeString", - "HTMLEscaper", - "IsTrue", - "JS", - "JSEscape", - "JSEscapeString", - "JSEscaper", - "JSStr", - "Must", - "New", - "OK", - "ParseFS", - "ParseFiles", - "ParseGlob", - "Srcset", - "Template", - "URL", - "URLQueryEscaper", - }, - "image": { - "Alpha", - "Alpha16", - "Black", - "CMYK", - "Config", - "Decode", - "DecodeConfig", - "ErrFormat", - "Gray", - "Gray16", - "Image", - "NRGBA", - "NRGBA64", - "NYCbCrA", - "NewAlpha", - "NewAlpha16", - "NewCMYK", - "NewGray", - "NewGray16", - "NewNRGBA", - "NewNRGBA64", - "NewNYCbCrA", - "NewPaletted", - "NewRGBA", - "NewRGBA64", - "NewUniform", - "NewYCbCr", - "Opaque", - "Paletted", - "PalettedImage", - "Point", - "Pt", - "RGBA", - "RGBA64", - "RGBA64Image", - "Rect", - "Rectangle", - "RegisterFormat", - "Transparent", - "Uniform", - "White", - "YCbCr", - "YCbCrSubsampleRatio", - "YCbCrSubsampleRatio410", - "YCbCrSubsampleRatio411", - "YCbCrSubsampleRatio420", - "YCbCrSubsampleRatio422", - "YCbCrSubsampleRatio440", - "YCbCrSubsampleRatio444", - "ZP", - "ZR", - }, - "image/color": { - "Alpha", - "Alpha16", - "Alpha16Model", - "AlphaModel", - "Black", - "CMYK", - "CMYKModel", - "CMYKToRGB", - "Color", - "Gray", - "Gray16", - "Gray16Model", - "GrayModel", - "Model", - "ModelFunc", - "NRGBA", - "NRGBA64", - "NRGBA64Model", - "NRGBAModel", - "NYCbCrA", - "NYCbCrAModel", - "Opaque", - "Palette", - "RGBA", - "RGBA64", - "RGBA64Model", - "RGBAModel", - "RGBToCMYK", - "RGBToYCbCr", - "Transparent", - "White", - "YCbCr", - "YCbCrModel", - "YCbCrToRGB", - }, - "image/color/palette": { - "Plan9", - "WebSafe", - }, - "image/draw": { - "Draw", - "DrawMask", - "Drawer", - "FloydSteinberg", - "Image", - "Op", - "Over", - "Quantizer", - "RGBA64Image", - "Src", - }, - "image/gif": { - "Decode", - "DecodeAll", - "DecodeConfig", - "DisposalBackground", - "DisposalNone", - "DisposalPrevious", - "Encode", - "EncodeAll", - "GIF", - "Options", - }, - "image/jpeg": { - "Decode", - "DecodeConfig", - "DefaultQuality", - "Encode", - "FormatError", - "Options", - "Reader", - "UnsupportedError", - }, - "image/png": { - "BestCompression", - "BestSpeed", - "CompressionLevel", - "Decode", - "DecodeConfig", - "DefaultCompression", - "Encode", - "Encoder", - "EncoderBuffer", - "EncoderBufferPool", - "FormatError", - "NoCompression", - "UnsupportedError", - }, - "index/suffixarray": { - "Index", - "New", - }, - "io": { - "ByteReader", - "ByteScanner", - "ByteWriter", - "Closer", - "Copy", - "CopyBuffer", - "CopyN", - "Discard", - "EOF", - "ErrClosedPipe", - "ErrNoProgress", - "ErrShortBuffer", - "ErrShortWrite", - "ErrUnexpectedEOF", - "LimitReader", - "LimitedReader", - "MultiReader", - "MultiWriter", - "NewOffsetWriter", - "NewSectionReader", - "NopCloser", - "OffsetWriter", - "Pipe", - "PipeReader", - "PipeWriter", - "ReadAll", - "ReadAtLeast", - "ReadCloser", - "ReadFull", - "ReadSeekCloser", - "ReadSeeker", - "ReadWriteCloser", - "ReadWriteSeeker", - "ReadWriter", - "Reader", - "ReaderAt", - "ReaderFrom", - "RuneReader", - "RuneScanner", - "SectionReader", - "SeekCurrent", - "SeekEnd", - "SeekStart", - "Seeker", - "StringWriter", - "TeeReader", - "WriteCloser", - "WriteSeeker", - "WriteString", - "Writer", - "WriterAt", - "WriterTo", - }, - "io/fs": { - "DirEntry", - "ErrClosed", - "ErrExist", - "ErrInvalid", - "ErrNotExist", - "ErrPermission", - "FS", - "File", - "FileInfo", - "FileInfoToDirEntry", - "FileMode", - "FormatDirEntry", - "FormatFileInfo", - "Glob", - "GlobFS", - "ModeAppend", - "ModeCharDevice", - "ModeDevice", - "ModeDir", - "ModeExclusive", - "ModeIrregular", - "ModeNamedPipe", - "ModePerm", - "ModeSetgid", - "ModeSetuid", - "ModeSocket", - "ModeSticky", - "ModeSymlink", - "ModeTemporary", - "ModeType", - "PathError", - "ReadDir", - "ReadDirFS", - "ReadDirFile", - "ReadFile", - "ReadFileFS", - "SkipAll", - "SkipDir", - "Stat", - "StatFS", - "Sub", - "SubFS", - "ValidPath", - "WalkDir", - "WalkDirFunc", - }, - "io/ioutil": { - "Discard", - "NopCloser", - "ReadAll", - "ReadDir", - "ReadFile", - "TempDir", - "TempFile", - "WriteFile", - }, - "log": { - "Default", - "Fatal", - "Fatalf", - "Fatalln", - "Flags", - "LUTC", - "Ldate", - "Llongfile", - "Lmicroseconds", - "Lmsgprefix", - "Logger", - "Lshortfile", - "LstdFlags", - "Ltime", - "New", - "Output", - "Panic", - "Panicf", - "Panicln", - "Prefix", - "Print", - "Printf", - "Println", - "SetFlags", - "SetOutput", - "SetPrefix", - "Writer", - }, - "log/slog": { - "Any", - "AnyValue", - "Attr", - "Bool", - "BoolValue", - "Debug", - "DebugContext", - "Default", - "Duration", - "DurationValue", - "Error", - "ErrorContext", - "Float64", - "Float64Value", - "Group", - "GroupValue", - "Handler", - "HandlerOptions", - "Info", - "InfoContext", - "Int", - "Int64", - "Int64Value", - "IntValue", - "JSONHandler", - "Kind", - "KindAny", - "KindBool", - "KindDuration", - "KindFloat64", - "KindGroup", - "KindInt64", - "KindLogValuer", - "KindString", - "KindTime", - "KindUint64", - "Level", - "LevelDebug", - "LevelError", - "LevelInfo", - "LevelKey", - "LevelVar", - "LevelWarn", - "Leveler", - "Log", - "LogAttrs", - "LogValuer", - "Logger", - "MessageKey", - "New", - "NewJSONHandler", - "NewLogLogger", - "NewRecord", - "NewTextHandler", - "Record", - "SetDefault", - "Source", - "SourceKey", - "String", - "StringValue", - "TextHandler", - "Time", - "TimeKey", - "TimeValue", - "Uint64", - "Uint64Value", - "Value", - "Warn", - "WarnContext", - "With", - }, - "log/syslog": { - "Dial", - "LOG_ALERT", - "LOG_AUTH", - "LOG_AUTHPRIV", - "LOG_CRIT", - "LOG_CRON", - "LOG_DAEMON", - "LOG_DEBUG", - "LOG_EMERG", - "LOG_ERR", - "LOG_FTP", - "LOG_INFO", - "LOG_KERN", - "LOG_LOCAL0", - "LOG_LOCAL1", - "LOG_LOCAL2", - "LOG_LOCAL3", - "LOG_LOCAL4", - "LOG_LOCAL5", - "LOG_LOCAL6", - "LOG_LOCAL7", - "LOG_LPR", - "LOG_MAIL", - "LOG_NEWS", - "LOG_NOTICE", - "LOG_SYSLOG", - "LOG_USER", - "LOG_UUCP", - "LOG_WARNING", - "New", - "NewLogger", - "Priority", - "Writer", - }, - "maps": { - "Clone", - "Copy", - "DeleteFunc", - "Equal", - "EqualFunc", - }, - "math": { - "Abs", - "Acos", - "Acosh", - "Asin", - "Asinh", - "Atan", - "Atan2", - "Atanh", - "Cbrt", - "Ceil", - "Copysign", - "Cos", - "Cosh", - "Dim", - "E", - "Erf", - "Erfc", - "Erfcinv", - "Erfinv", - "Exp", - "Exp2", - "Expm1", - "FMA", - "Float32bits", - "Float32frombits", - "Float64bits", - "Float64frombits", - "Floor", - "Frexp", - "Gamma", - "Hypot", - "Ilogb", - "Inf", - "IsInf", - "IsNaN", - "J0", - "J1", - "Jn", - "Ldexp", - "Lgamma", - "Ln10", - "Ln2", - "Log", - "Log10", - "Log10E", - "Log1p", - "Log2", - "Log2E", - "Logb", - "Max", - "MaxFloat32", - "MaxFloat64", - "MaxInt", - "MaxInt16", - "MaxInt32", - "MaxInt64", - "MaxInt8", - "MaxUint", - "MaxUint16", - "MaxUint32", - "MaxUint64", - "MaxUint8", - "Min", - "MinInt", - "MinInt16", - "MinInt32", - "MinInt64", - "MinInt8", - "Mod", - "Modf", - "NaN", - "Nextafter", - "Nextafter32", - "Phi", - "Pi", - "Pow", - "Pow10", - "Remainder", - "Round", - "RoundToEven", - "Signbit", - "Sin", - "Sincos", - "Sinh", - "SmallestNonzeroFloat32", - "SmallestNonzeroFloat64", - "Sqrt", - "Sqrt2", - "SqrtE", - "SqrtPhi", - "SqrtPi", - "Tan", - "Tanh", - "Trunc", - "Y0", - "Y1", - "Yn", - }, - "math/big": { - "Above", - "Accuracy", - "AwayFromZero", - "Below", - "ErrNaN", - "Exact", - "Float", - "Int", - "Jacobi", - "MaxBase", - "MaxExp", - "MaxPrec", - "MinExp", - "NewFloat", - "NewInt", - "NewRat", - "ParseFloat", - "Rat", - "RoundingMode", - "ToNearestAway", - "ToNearestEven", - "ToNegativeInf", - "ToPositiveInf", - "ToZero", - "Word", - }, - "math/bits": { - "Add", - "Add32", - "Add64", - "Div", - "Div32", - "Div64", - "LeadingZeros", - "LeadingZeros16", - "LeadingZeros32", - "LeadingZeros64", - "LeadingZeros8", - "Len", - "Len16", - "Len32", - "Len64", - "Len8", - "Mul", - "Mul32", - "Mul64", - "OnesCount", - "OnesCount16", - "OnesCount32", - "OnesCount64", - "OnesCount8", - "Rem", - "Rem32", - "Rem64", - "Reverse", - "Reverse16", - "Reverse32", - "Reverse64", - "Reverse8", - "ReverseBytes", - "ReverseBytes16", - "ReverseBytes32", - "ReverseBytes64", - "RotateLeft", - "RotateLeft16", - "RotateLeft32", - "RotateLeft64", - "RotateLeft8", - "Sub", - "Sub32", - "Sub64", - "TrailingZeros", - "TrailingZeros16", - "TrailingZeros32", - "TrailingZeros64", - "TrailingZeros8", - "UintSize", - }, - "math/cmplx": { - "Abs", - "Acos", - "Acosh", - "Asin", - "Asinh", - "Atan", - "Atanh", - "Conj", - "Cos", - "Cosh", - "Cot", - "Exp", - "Inf", - "IsInf", - "IsNaN", - "Log", - "Log10", - "NaN", - "Phase", - "Polar", - "Pow", - "Rect", - "Sin", - "Sinh", - "Sqrt", - "Tan", - "Tanh", - }, - "math/rand": { - "ExpFloat64", - "Float32", - "Float64", - "Int", - "Int31", - "Int31n", - "Int63", - "Int63n", - "Intn", - "New", - "NewSource", - "NewZipf", - "NormFloat64", - "Perm", - "Rand", - "Read", - "Seed", - "Shuffle", - "Source", - "Source64", - "Uint32", - "Uint64", - "Zipf", - }, - "mime": { - "AddExtensionType", - "BEncoding", - "ErrInvalidMediaParameter", - "ExtensionsByType", - "FormatMediaType", - "ParseMediaType", - "QEncoding", - "TypeByExtension", - "WordDecoder", - "WordEncoder", - }, - "mime/multipart": { - "ErrMessageTooLarge", - "File", - "FileHeader", - "Form", - "NewReader", - "NewWriter", - "Part", - "Reader", - "Writer", - }, - "mime/quotedprintable": { - "NewReader", - "NewWriter", - "Reader", - "Writer", - }, - "net": { - "Addr", - "AddrError", - "Buffers", - "CIDRMask", - "Conn", - "DNSConfigError", - "DNSError", - "DefaultResolver", - "Dial", - "DialIP", - "DialTCP", - "DialTimeout", - "DialUDP", - "DialUnix", - "Dialer", - "ErrClosed", - "ErrWriteToConnected", - "Error", - "FileConn", - "FileListener", - "FilePacketConn", - "FlagBroadcast", - "FlagLoopback", - "FlagMulticast", - "FlagPointToPoint", - "FlagRunning", - "FlagUp", - "Flags", - "HardwareAddr", - "IP", - "IPAddr", - "IPConn", - "IPMask", - "IPNet", - "IPv4", - "IPv4Mask", - "IPv4allrouter", - "IPv4allsys", - "IPv4bcast", - "IPv4len", - "IPv4zero", - "IPv6interfacelocalallnodes", - "IPv6len", - "IPv6linklocalallnodes", - "IPv6linklocalallrouters", - "IPv6loopback", - "IPv6unspecified", - "IPv6zero", - "Interface", - "InterfaceAddrs", - "InterfaceByIndex", - "InterfaceByName", - "Interfaces", - "InvalidAddrError", - "JoinHostPort", - "Listen", - "ListenConfig", - "ListenIP", - "ListenMulticastUDP", - "ListenPacket", - "ListenTCP", - "ListenUDP", - "ListenUnix", - "ListenUnixgram", - "Listener", - "LookupAddr", - "LookupCNAME", - "LookupHost", - "LookupIP", - "LookupMX", - "LookupNS", - "LookupPort", - "LookupSRV", - "LookupTXT", - "MX", - "NS", - "OpError", - "PacketConn", - "ParseCIDR", - "ParseError", - "ParseIP", - "ParseMAC", - "Pipe", - "ResolveIPAddr", - "ResolveTCPAddr", - "ResolveUDPAddr", - "ResolveUnixAddr", - "Resolver", - "SRV", - "SplitHostPort", - "TCPAddr", - "TCPAddrFromAddrPort", - "TCPConn", - "TCPListener", - "UDPAddr", - "UDPAddrFromAddrPort", - "UDPConn", - "UnixAddr", - "UnixConn", - "UnixListener", - "UnknownNetworkError", - }, - "net/http": { - "AllowQuerySemicolons", - "CanonicalHeaderKey", - "Client", - "CloseNotifier", - "ConnState", - "Cookie", - "CookieJar", - "DefaultClient", - "DefaultMaxHeaderBytes", - "DefaultMaxIdleConnsPerHost", - "DefaultServeMux", - "DefaultTransport", - "DetectContentType", - "Dir", - "ErrAbortHandler", - "ErrBodyNotAllowed", - "ErrBodyReadAfterClose", - "ErrContentLength", - "ErrHandlerTimeout", - "ErrHeaderTooLong", - "ErrHijacked", - "ErrLineTooLong", - "ErrMissingBoundary", - "ErrMissingContentLength", - "ErrMissingFile", - "ErrNoCookie", - "ErrNoLocation", - "ErrNotMultipart", - "ErrNotSupported", - "ErrSchemeMismatch", - "ErrServerClosed", - "ErrShortBody", - "ErrSkipAltProtocol", - "ErrUnexpectedTrailer", - "ErrUseLastResponse", - "ErrWriteAfterFlush", - "Error", - "FS", - "File", - "FileServer", - "FileSystem", - "Flusher", - "Get", - "Handle", - "HandleFunc", - "Handler", - "HandlerFunc", - "Head", - "Header", - "Hijacker", - "ListenAndServe", - "ListenAndServeTLS", - "LocalAddrContextKey", - "MaxBytesError", - "MaxBytesHandler", - "MaxBytesReader", - "MethodConnect", - "MethodDelete", - "MethodGet", - "MethodHead", - "MethodOptions", - "MethodPatch", - "MethodPost", - "MethodPut", - "MethodTrace", - "NewFileTransport", - "NewRequest", - "NewRequestWithContext", - "NewResponseController", - "NewServeMux", - "NoBody", - "NotFound", - "NotFoundHandler", - "ParseHTTPVersion", - "ParseTime", - "Post", - "PostForm", - "ProtocolError", - "ProxyFromEnvironment", - "ProxyURL", - "PushOptions", - "Pusher", - "ReadRequest", - "ReadResponse", - "Redirect", - "RedirectHandler", - "Request", - "Response", - "ResponseController", - "ResponseWriter", - "RoundTripper", - "SameSite", - "SameSiteDefaultMode", - "SameSiteLaxMode", - "SameSiteNoneMode", - "SameSiteStrictMode", - "Serve", - "ServeContent", - "ServeFile", - "ServeMux", - "ServeTLS", - "Server", - "ServerContextKey", - "SetCookie", - "StateActive", - "StateClosed", - "StateHijacked", - "StateIdle", - "StateNew", - "StatusAccepted", - "StatusAlreadyReported", - "StatusBadGateway", - "StatusBadRequest", - "StatusConflict", - "StatusContinue", - "StatusCreated", - "StatusEarlyHints", - "StatusExpectationFailed", - "StatusFailedDependency", - "StatusForbidden", - "StatusFound", - "StatusGatewayTimeout", - "StatusGone", - "StatusHTTPVersionNotSupported", - "StatusIMUsed", - "StatusInsufficientStorage", - "StatusInternalServerError", - "StatusLengthRequired", - "StatusLocked", - "StatusLoopDetected", - "StatusMethodNotAllowed", - "StatusMisdirectedRequest", - "StatusMovedPermanently", - "StatusMultiStatus", - "StatusMultipleChoices", - "StatusNetworkAuthenticationRequired", - "StatusNoContent", - "StatusNonAuthoritativeInfo", - "StatusNotAcceptable", - "StatusNotExtended", - "StatusNotFound", - "StatusNotImplemented", - "StatusNotModified", - "StatusOK", - "StatusPartialContent", - "StatusPaymentRequired", - "StatusPermanentRedirect", - "StatusPreconditionFailed", - "StatusPreconditionRequired", - "StatusProcessing", - "StatusProxyAuthRequired", - "StatusRequestEntityTooLarge", - "StatusRequestHeaderFieldsTooLarge", - "StatusRequestTimeout", - "StatusRequestURITooLong", - "StatusRequestedRangeNotSatisfiable", - "StatusResetContent", - "StatusSeeOther", - "StatusServiceUnavailable", - "StatusSwitchingProtocols", - "StatusTeapot", - "StatusTemporaryRedirect", - "StatusText", - "StatusTooEarly", - "StatusTooManyRequests", - "StatusUnauthorized", - "StatusUnavailableForLegalReasons", - "StatusUnprocessableEntity", - "StatusUnsupportedMediaType", - "StatusUpgradeRequired", - "StatusUseProxy", - "StatusVariantAlsoNegotiates", - "StripPrefix", - "TimeFormat", - "TimeoutHandler", - "TrailerPrefix", - "Transport", - }, - "net/http/cgi": { - "Handler", - "Request", - "RequestFromMap", - "Serve", - }, - "net/http/cookiejar": { - "Jar", - "New", - "Options", - "PublicSuffixList", - }, - "net/http/fcgi": { - "ErrConnClosed", - "ErrRequestAborted", - "ProcessEnv", - "Serve", - }, - "net/http/httptest": { - "DefaultRemoteAddr", - "NewRecorder", - "NewRequest", - "NewServer", - "NewTLSServer", - "NewUnstartedServer", - "ResponseRecorder", - "Server", - }, - "net/http/httptrace": { - "ClientTrace", - "ContextClientTrace", - "DNSDoneInfo", - "DNSStartInfo", - "GotConnInfo", - "WithClientTrace", - "WroteRequestInfo", - }, - "net/http/httputil": { - "BufferPool", - "ClientConn", - "DumpRequest", - "DumpRequestOut", - "DumpResponse", - "ErrClosed", - "ErrLineTooLong", - "ErrPersistEOF", - "ErrPipeline", - "NewChunkedReader", - "NewChunkedWriter", - "NewClientConn", - "NewProxyClientConn", - "NewServerConn", - "NewSingleHostReverseProxy", - "ProxyRequest", - "ReverseProxy", - "ServerConn", - }, - "net/http/pprof": { - "Cmdline", - "Handler", - "Index", - "Profile", - "Symbol", - "Trace", - }, - "net/mail": { - "Address", - "AddressParser", - "ErrHeaderNotPresent", - "Header", - "Message", - "ParseAddress", - "ParseAddressList", - "ParseDate", - "ReadMessage", - }, - "net/netip": { - "Addr", - "AddrFrom16", - "AddrFrom4", - "AddrFromSlice", - "AddrPort", - "AddrPortFrom", - "IPv4Unspecified", - "IPv6LinkLocalAllNodes", - "IPv6LinkLocalAllRouters", - "IPv6Loopback", - "IPv6Unspecified", - "MustParseAddr", - "MustParseAddrPort", - "MustParsePrefix", - "ParseAddr", - "ParseAddrPort", - "ParsePrefix", - "Prefix", - "PrefixFrom", - }, - "net/rpc": { - "Accept", - "Call", - "Client", - "ClientCodec", - "DefaultDebugPath", - "DefaultRPCPath", - "DefaultServer", - "Dial", - "DialHTTP", - "DialHTTPPath", - "ErrShutdown", - "HandleHTTP", - "NewClient", - "NewClientWithCodec", - "NewServer", - "Register", - "RegisterName", - "Request", - "Response", - "ServeCodec", - "ServeConn", - "ServeRequest", - "Server", - "ServerCodec", - "ServerError", - }, - "net/rpc/jsonrpc": { - "Dial", - "NewClient", - "NewClientCodec", - "NewServerCodec", - "ServeConn", - }, - "net/smtp": { - "Auth", - "CRAMMD5Auth", - "Client", - "Dial", - "NewClient", - "PlainAuth", - "SendMail", - "ServerInfo", - }, - "net/textproto": { - "CanonicalMIMEHeaderKey", - "Conn", - "Dial", - "Error", - "MIMEHeader", - "NewConn", - "NewReader", - "NewWriter", - "Pipeline", - "ProtocolError", - "Reader", - "TrimBytes", - "TrimString", - "Writer", - }, - "net/url": { - "Error", - "EscapeError", - "InvalidHostError", - "JoinPath", - "Parse", - "ParseQuery", - "ParseRequestURI", - "PathEscape", - "PathUnescape", - "QueryEscape", - "QueryUnescape", - "URL", - "User", - "UserPassword", - "Userinfo", - "Values", - }, - "os": { - "Args", - "Chdir", - "Chmod", - "Chown", - "Chtimes", - "Clearenv", - "Create", - "CreateTemp", - "DevNull", - "DirEntry", - "DirFS", - "Environ", - "ErrClosed", - "ErrDeadlineExceeded", - "ErrExist", - "ErrInvalid", - "ErrNoDeadline", - "ErrNotExist", - "ErrPermission", - "ErrProcessDone", - "Executable", - "Exit", - "Expand", - "ExpandEnv", - "File", - "FileInfo", - "FileMode", - "FindProcess", - "Getegid", - "Getenv", - "Geteuid", - "Getgid", - "Getgroups", - "Getpagesize", - "Getpid", - "Getppid", - "Getuid", - "Getwd", - "Hostname", - "Interrupt", - "IsExist", - "IsNotExist", - "IsPathSeparator", - "IsPermission", - "IsTimeout", - "Kill", - "Lchown", - "Link", - "LinkError", - "LookupEnv", - "Lstat", - "Mkdir", - "MkdirAll", - "MkdirTemp", - "ModeAppend", - "ModeCharDevice", - "ModeDevice", - "ModeDir", - "ModeExclusive", - "ModeIrregular", - "ModeNamedPipe", - "ModePerm", - "ModeSetgid", - "ModeSetuid", - "ModeSocket", - "ModeSticky", - "ModeSymlink", - "ModeTemporary", - "ModeType", - "NewFile", - "NewSyscallError", - "O_APPEND", - "O_CREATE", - "O_EXCL", - "O_RDONLY", - "O_RDWR", - "O_SYNC", - "O_TRUNC", - "O_WRONLY", - "Open", - "OpenFile", - "PathError", - "PathListSeparator", - "PathSeparator", - "Pipe", - "ProcAttr", - "Process", - "ProcessState", - "ReadDir", - "ReadFile", - "Readlink", - "Remove", - "RemoveAll", - "Rename", - "SEEK_CUR", - "SEEK_END", - "SEEK_SET", - "SameFile", - "Setenv", - "Signal", - "StartProcess", - "Stat", - "Stderr", - "Stdin", - "Stdout", - "Symlink", - "SyscallError", - "TempDir", - "Truncate", - "Unsetenv", - "UserCacheDir", - "UserConfigDir", - "UserHomeDir", - "WriteFile", - }, - "os/exec": { - "Cmd", - "Command", - "CommandContext", - "ErrDot", - "ErrNotFound", - "ErrWaitDelay", - "Error", - "ExitError", - "LookPath", - }, - "os/signal": { - "Ignore", - "Ignored", - "Notify", - "NotifyContext", - "Reset", - "Stop", - }, - "os/user": { - "Current", - "Group", - "Lookup", - "LookupGroup", - "LookupGroupId", - "LookupId", - "UnknownGroupError", - "UnknownGroupIdError", - "UnknownUserError", - "UnknownUserIdError", - "User", - }, - "path": { - "Base", - "Clean", - "Dir", - "ErrBadPattern", - "Ext", - "IsAbs", - "Join", - "Match", - "Split", - }, - "path/filepath": { - "Abs", - "Base", - "Clean", - "Dir", - "ErrBadPattern", - "EvalSymlinks", - "Ext", - "FromSlash", - "Glob", - "HasPrefix", - "IsAbs", - "IsLocal", - "Join", - "ListSeparator", - "Match", - "Rel", - "Separator", - "SkipAll", - "SkipDir", - "Split", - "SplitList", - "ToSlash", - "VolumeName", - "Walk", - "WalkDir", - "WalkFunc", - }, - "plugin": { - "Open", - "Plugin", - "Symbol", - }, - "reflect": { - "Append", - "AppendSlice", - "Array", - "ArrayOf", - "Bool", - "BothDir", - "Chan", - "ChanDir", - "ChanOf", - "Complex128", - "Complex64", - "Copy", - "DeepEqual", - "Float32", - "Float64", - "Func", - "FuncOf", - "Indirect", - "Int", - "Int16", - "Int32", - "Int64", - "Int8", - "Interface", - "Invalid", - "Kind", - "MakeChan", - "MakeFunc", - "MakeMap", - "MakeMapWithSize", - "MakeSlice", - "Map", - "MapIter", - "MapOf", - "Method", - "New", - "NewAt", - "Pointer", - "PointerTo", - "Ptr", - "PtrTo", - "RecvDir", - "Select", - "SelectCase", - "SelectDefault", - "SelectDir", - "SelectRecv", - "SelectSend", - "SendDir", - "Slice", - "SliceHeader", - "SliceOf", - "String", - "StringHeader", - "Struct", - "StructField", - "StructOf", - "StructTag", - "Swapper", - "Type", - "TypeOf", - "Uint", - "Uint16", - "Uint32", - "Uint64", - "Uint8", - "Uintptr", - "UnsafePointer", - "Value", - "ValueError", - "ValueOf", - "VisibleFields", - "Zero", - }, - "regexp": { - "Compile", - "CompilePOSIX", - "Match", - "MatchReader", - "MatchString", - "MustCompile", - "MustCompilePOSIX", - "QuoteMeta", - "Regexp", - }, - "regexp/syntax": { - "ClassNL", - "Compile", - "DotNL", - "EmptyBeginLine", - "EmptyBeginText", - "EmptyEndLine", - "EmptyEndText", - "EmptyNoWordBoundary", - "EmptyOp", - "EmptyOpContext", - "EmptyWordBoundary", - "ErrInternalError", - "ErrInvalidCharClass", - "ErrInvalidCharRange", - "ErrInvalidEscape", - "ErrInvalidNamedCapture", - "ErrInvalidPerlOp", - "ErrInvalidRepeatOp", - "ErrInvalidRepeatSize", - "ErrInvalidUTF8", - "ErrLarge", - "ErrMissingBracket", - "ErrMissingParen", - "ErrMissingRepeatArgument", - "ErrNestingDepth", - "ErrTrailingBackslash", - "ErrUnexpectedParen", - "Error", - "ErrorCode", - "Flags", - "FoldCase", - "Inst", - "InstAlt", - "InstAltMatch", - "InstCapture", - "InstEmptyWidth", - "InstFail", - "InstMatch", - "InstNop", - "InstOp", - "InstRune", - "InstRune1", - "InstRuneAny", - "InstRuneAnyNotNL", - "IsWordChar", - "Literal", - "MatchNL", - "NonGreedy", - "OneLine", - "Op", - "OpAlternate", - "OpAnyChar", - "OpAnyCharNotNL", - "OpBeginLine", - "OpBeginText", - "OpCapture", - "OpCharClass", - "OpConcat", - "OpEmptyMatch", - "OpEndLine", - "OpEndText", - "OpLiteral", - "OpNoMatch", - "OpNoWordBoundary", - "OpPlus", - "OpQuest", - "OpRepeat", - "OpStar", - "OpWordBoundary", - "POSIX", - "Parse", - "Perl", - "PerlX", - "Prog", - "Regexp", - "Simple", - "UnicodeGroups", - "WasDollar", - }, - "runtime": { - "BlockProfile", - "BlockProfileRecord", - "Breakpoint", - "CPUProfile", - "Caller", - "Callers", - "CallersFrames", - "Compiler", - "Error", - "Frame", - "Frames", - "Func", - "FuncForPC", - "GC", - "GOARCH", - "GOMAXPROCS", - "GOOS", - "GOROOT", - "Goexit", - "GoroutineProfile", - "Gosched", - "KeepAlive", - "LockOSThread", - "MemProfile", - "MemProfileRate", - "MemProfileRecord", - "MemStats", - "MutexProfile", - "NumCPU", - "NumCgoCall", - "NumGoroutine", - "PanicNilError", - "Pinner", - "ReadMemStats", - "ReadTrace", - "SetBlockProfileRate", - "SetCPUProfileRate", - "SetCgoTraceback", - "SetFinalizer", - "SetMutexProfileFraction", - "Stack", - "StackRecord", - "StartTrace", - "StopTrace", - "ThreadCreateProfile", - "TypeAssertionError", - "UnlockOSThread", - "Version", - }, - "runtime/cgo": { - "Handle", - "Incomplete", - "NewHandle", - }, - "runtime/coverage": { - "ClearCounters", - "WriteCounters", - "WriteCountersDir", - "WriteMeta", - "WriteMetaDir", - }, - "runtime/debug": { - "BuildInfo", - "BuildSetting", - "FreeOSMemory", - "GCStats", - "Module", - "ParseBuildInfo", - "PrintStack", - "ReadBuildInfo", - "ReadGCStats", - "SetGCPercent", - "SetMaxStack", - "SetMaxThreads", - "SetMemoryLimit", - "SetPanicOnFault", - "SetTraceback", - "Stack", - "WriteHeapDump", - }, - "runtime/metrics": { - "All", - "Description", - "Float64Histogram", - "KindBad", - "KindFloat64", - "KindFloat64Histogram", - "KindUint64", - "Read", - "Sample", - "Value", - "ValueKind", - }, - "runtime/pprof": { - "Do", - "ForLabels", - "Label", - "LabelSet", - "Labels", - "Lookup", - "NewProfile", - "Profile", - "Profiles", - "SetGoroutineLabels", - "StartCPUProfile", - "StopCPUProfile", - "WithLabels", - "WriteHeapProfile", - }, - "runtime/trace": { - "IsEnabled", - "Log", - "Logf", - "NewTask", - "Region", - "Start", - "StartRegion", - "Stop", - "Task", - "WithRegion", - }, - "slices": { - "BinarySearch", - "BinarySearchFunc", - "Clip", - "Clone", - "Compact", - "CompactFunc", - "Compare", - "CompareFunc", - "Contains", - "ContainsFunc", - "Delete", - "DeleteFunc", - "Equal", - "EqualFunc", - "Grow", - "Index", - "IndexFunc", - "Insert", - "IsSorted", - "IsSortedFunc", - "Max", - "MaxFunc", - "Min", - "MinFunc", - "Replace", - "Reverse", - "Sort", - "SortFunc", - "SortStableFunc", - }, - "sort": { - "Find", - "Float64Slice", - "Float64s", - "Float64sAreSorted", - "IntSlice", - "Interface", - "Ints", - "IntsAreSorted", - "IsSorted", - "Reverse", - "Search", - "SearchFloat64s", - "SearchInts", - "SearchStrings", - "Slice", - "SliceIsSorted", - "SliceStable", - "Sort", - "Stable", - "StringSlice", - "Strings", - "StringsAreSorted", - }, - "strconv": { - "AppendBool", - "AppendFloat", - "AppendInt", - "AppendQuote", - "AppendQuoteRune", - "AppendQuoteRuneToASCII", - "AppendQuoteRuneToGraphic", - "AppendQuoteToASCII", - "AppendQuoteToGraphic", - "AppendUint", - "Atoi", - "CanBackquote", - "ErrRange", - "ErrSyntax", - "FormatBool", - "FormatComplex", - "FormatFloat", - "FormatInt", - "FormatUint", - "IntSize", - "IsGraphic", - "IsPrint", - "Itoa", - "NumError", - "ParseBool", - "ParseComplex", - "ParseFloat", - "ParseInt", - "ParseUint", - "Quote", - "QuoteRune", - "QuoteRuneToASCII", - "QuoteRuneToGraphic", - "QuoteToASCII", - "QuoteToGraphic", - "QuotedPrefix", - "Unquote", - "UnquoteChar", - }, - "strings": { - "Builder", - "Clone", - "Compare", - "Contains", - "ContainsAny", - "ContainsFunc", - "ContainsRune", - "Count", - "Cut", - "CutPrefix", - "CutSuffix", - "EqualFold", - "Fields", - "FieldsFunc", - "HasPrefix", - "HasSuffix", - "Index", - "IndexAny", - "IndexByte", - "IndexFunc", - "IndexRune", - "Join", - "LastIndex", - "LastIndexAny", - "LastIndexByte", - "LastIndexFunc", - "Map", - "NewReader", - "NewReplacer", - "Reader", - "Repeat", - "Replace", - "ReplaceAll", - "Replacer", - "Split", - "SplitAfter", - "SplitAfterN", - "SplitN", - "Title", - "ToLower", - "ToLowerSpecial", - "ToTitle", - "ToTitleSpecial", - "ToUpper", - "ToUpperSpecial", - "ToValidUTF8", - "Trim", - "TrimFunc", - "TrimLeft", - "TrimLeftFunc", - "TrimPrefix", - "TrimRight", - "TrimRightFunc", - "TrimSpace", - "TrimSuffix", - }, - "sync": { - "Cond", - "Locker", - "Map", - "Mutex", - "NewCond", - "Once", - "OnceFunc", - "OnceValue", - "OnceValues", - "Pool", - "RWMutex", - "WaitGroup", - }, - "sync/atomic": { - "AddInt32", - "AddInt64", - "AddUint32", - "AddUint64", - "AddUintptr", - "Bool", - "CompareAndSwapInt32", - "CompareAndSwapInt64", - "CompareAndSwapPointer", - "CompareAndSwapUint32", - "CompareAndSwapUint64", - "CompareAndSwapUintptr", - "Int32", - "Int64", - "LoadInt32", - "LoadInt64", - "LoadPointer", - "LoadUint32", - "LoadUint64", - "LoadUintptr", - "Pointer", - "StoreInt32", - "StoreInt64", - "StorePointer", - "StoreUint32", - "StoreUint64", - "StoreUintptr", - "SwapInt32", - "SwapInt64", - "SwapPointer", - "SwapUint32", - "SwapUint64", - "SwapUintptr", - "Uint32", - "Uint64", - "Uintptr", - "Value", - }, - "syscall": { - "AF_ALG", - "AF_APPLETALK", - "AF_ARP", - "AF_ASH", - "AF_ATM", - "AF_ATMPVC", - "AF_ATMSVC", - "AF_AX25", - "AF_BLUETOOTH", - "AF_BRIDGE", - "AF_CAIF", - "AF_CAN", - "AF_CCITT", - "AF_CHAOS", - "AF_CNT", - "AF_COIP", - "AF_DATAKIT", - "AF_DECnet", - "AF_DLI", - "AF_E164", - "AF_ECMA", - "AF_ECONET", - "AF_ENCAP", - "AF_FILE", - "AF_HYLINK", - "AF_IEEE80211", - "AF_IEEE802154", - "AF_IMPLINK", - "AF_INET", - "AF_INET6", - "AF_INET6_SDP", - "AF_INET_SDP", - "AF_IPX", - "AF_IRDA", - "AF_ISDN", - "AF_ISO", - "AF_IUCV", - "AF_KEY", - "AF_LAT", - "AF_LINK", - "AF_LLC", - "AF_LOCAL", - "AF_MAX", - "AF_MPLS", - "AF_NATM", - "AF_NDRV", - "AF_NETBEUI", - "AF_NETBIOS", - "AF_NETGRAPH", - "AF_NETLINK", - "AF_NETROM", - "AF_NS", - "AF_OROUTE", - "AF_OSI", - "AF_PACKET", - "AF_PHONET", - "AF_PPP", - "AF_PPPOX", - "AF_PUP", - "AF_RDS", - "AF_RESERVED_36", - "AF_ROSE", - "AF_ROUTE", - "AF_RXRPC", - "AF_SCLUSTER", - "AF_SECURITY", - "AF_SIP", - "AF_SLOW", - "AF_SNA", - "AF_SYSTEM", - "AF_TIPC", - "AF_UNIX", - "AF_UNSPEC", - "AF_UTUN", - "AF_VENDOR00", - "AF_VENDOR01", - "AF_VENDOR02", - "AF_VENDOR03", - "AF_VENDOR04", - "AF_VENDOR05", - "AF_VENDOR06", - "AF_VENDOR07", - "AF_VENDOR08", - "AF_VENDOR09", - "AF_VENDOR10", - "AF_VENDOR11", - "AF_VENDOR12", - "AF_VENDOR13", - "AF_VENDOR14", - "AF_VENDOR15", - "AF_VENDOR16", - "AF_VENDOR17", - "AF_VENDOR18", - "AF_VENDOR19", - "AF_VENDOR20", - "AF_VENDOR21", - "AF_VENDOR22", - "AF_VENDOR23", - "AF_VENDOR24", - "AF_VENDOR25", - "AF_VENDOR26", - "AF_VENDOR27", - "AF_VENDOR28", - "AF_VENDOR29", - "AF_VENDOR30", - "AF_VENDOR31", - "AF_VENDOR32", - "AF_VENDOR33", - "AF_VENDOR34", - "AF_VENDOR35", - "AF_VENDOR36", - "AF_VENDOR37", - "AF_VENDOR38", - "AF_VENDOR39", - "AF_VENDOR40", - "AF_VENDOR41", - "AF_VENDOR42", - "AF_VENDOR43", - "AF_VENDOR44", - "AF_VENDOR45", - "AF_VENDOR46", - "AF_VENDOR47", - "AF_WANPIPE", - "AF_X25", - "AI_CANONNAME", - "AI_NUMERICHOST", - "AI_PASSIVE", - "APPLICATION_ERROR", - "ARPHRD_ADAPT", - "ARPHRD_APPLETLK", - "ARPHRD_ARCNET", - "ARPHRD_ASH", - "ARPHRD_ATM", - "ARPHRD_AX25", - "ARPHRD_BIF", - "ARPHRD_CHAOS", - "ARPHRD_CISCO", - "ARPHRD_CSLIP", - "ARPHRD_CSLIP6", - "ARPHRD_DDCMP", - "ARPHRD_DLCI", - "ARPHRD_ECONET", - "ARPHRD_EETHER", - "ARPHRD_ETHER", - "ARPHRD_EUI64", - "ARPHRD_FCAL", - "ARPHRD_FCFABRIC", - "ARPHRD_FCPL", - "ARPHRD_FCPP", - "ARPHRD_FDDI", - "ARPHRD_FRAD", - "ARPHRD_FRELAY", - "ARPHRD_HDLC", - "ARPHRD_HIPPI", - "ARPHRD_HWX25", - "ARPHRD_IEEE1394", - "ARPHRD_IEEE802", - "ARPHRD_IEEE80211", - "ARPHRD_IEEE80211_PRISM", - "ARPHRD_IEEE80211_RADIOTAP", - "ARPHRD_IEEE802154", - "ARPHRD_IEEE802154_PHY", - "ARPHRD_IEEE802_TR", - "ARPHRD_INFINIBAND", - "ARPHRD_IPDDP", - "ARPHRD_IPGRE", - "ARPHRD_IRDA", - "ARPHRD_LAPB", - "ARPHRD_LOCALTLK", - "ARPHRD_LOOPBACK", - "ARPHRD_METRICOM", - "ARPHRD_NETROM", - "ARPHRD_NONE", - "ARPHRD_PIMREG", - "ARPHRD_PPP", - "ARPHRD_PRONET", - "ARPHRD_RAWHDLC", - "ARPHRD_ROSE", - "ARPHRD_RSRVD", - "ARPHRD_SIT", - "ARPHRD_SKIP", - "ARPHRD_SLIP", - "ARPHRD_SLIP6", - "ARPHRD_STRIP", - "ARPHRD_TUNNEL", - "ARPHRD_TUNNEL6", - "ARPHRD_VOID", - "ARPHRD_X25", - "AUTHTYPE_CLIENT", - "AUTHTYPE_SERVER", - "Accept", - "Accept4", - "AcceptEx", - "Access", - "Acct", - "AddrinfoW", - "Adjtime", - "Adjtimex", - "AllThreadsSyscall", - "AllThreadsSyscall6", - "AttachLsf", - "B0", - "B1000000", - "B110", - "B115200", - "B1152000", - "B1200", - "B134", - "B14400", - "B150", - "B1500000", - "B1800", - "B19200", - "B200", - "B2000000", - "B230400", - "B2400", - "B2500000", - "B28800", - "B300", - "B3000000", - "B3500000", - "B38400", - "B4000000", - "B460800", - "B4800", - "B50", - "B500000", - "B57600", - "B576000", - "B600", - "B7200", - "B75", - "B76800", - "B921600", - "B9600", - "BASE_PROTOCOL", - "BIOCFEEDBACK", - "BIOCFLUSH", - "BIOCGBLEN", - "BIOCGDIRECTION", - "BIOCGDIRFILT", - "BIOCGDLT", - "BIOCGDLTLIST", - "BIOCGETBUFMODE", - "BIOCGETIF", - "BIOCGETZMAX", - "BIOCGFEEDBACK", - "BIOCGFILDROP", - "BIOCGHDRCMPLT", - "BIOCGRSIG", - "BIOCGRTIMEOUT", - "BIOCGSEESENT", - "BIOCGSTATS", - "BIOCGSTATSOLD", - "BIOCGTSTAMP", - "BIOCIMMEDIATE", - "BIOCLOCK", - "BIOCPROMISC", - "BIOCROTZBUF", - "BIOCSBLEN", - "BIOCSDIRECTION", - "BIOCSDIRFILT", - "BIOCSDLT", - "BIOCSETBUFMODE", - "BIOCSETF", - "BIOCSETFNR", - "BIOCSETIF", - "BIOCSETWF", - "BIOCSETZBUF", - "BIOCSFEEDBACK", - "BIOCSFILDROP", - "BIOCSHDRCMPLT", - "BIOCSRSIG", - "BIOCSRTIMEOUT", - "BIOCSSEESENT", - "BIOCSTCPF", - "BIOCSTSTAMP", - "BIOCSUDPF", - "BIOCVERSION", - "BPF_A", - "BPF_ABS", - "BPF_ADD", - "BPF_ALIGNMENT", - "BPF_ALIGNMENT32", - "BPF_ALU", - "BPF_AND", - "BPF_B", - "BPF_BUFMODE_BUFFER", - "BPF_BUFMODE_ZBUF", - "BPF_DFLTBUFSIZE", - "BPF_DIRECTION_IN", - "BPF_DIRECTION_OUT", - "BPF_DIV", - "BPF_H", - "BPF_IMM", - "BPF_IND", - "BPF_JA", - "BPF_JEQ", - "BPF_JGE", - "BPF_JGT", - "BPF_JMP", - "BPF_JSET", - "BPF_K", - "BPF_LD", - "BPF_LDX", - "BPF_LEN", - "BPF_LSH", - "BPF_MAJOR_VERSION", - "BPF_MAXBUFSIZE", - "BPF_MAXINSNS", - "BPF_MEM", - "BPF_MEMWORDS", - "BPF_MINBUFSIZE", - "BPF_MINOR_VERSION", - "BPF_MISC", - "BPF_MSH", - "BPF_MUL", - "BPF_NEG", - "BPF_OR", - "BPF_RELEASE", - "BPF_RET", - "BPF_RSH", - "BPF_ST", - "BPF_STX", - "BPF_SUB", - "BPF_TAX", - "BPF_TXA", - "BPF_T_BINTIME", - "BPF_T_BINTIME_FAST", - "BPF_T_BINTIME_MONOTONIC", - "BPF_T_BINTIME_MONOTONIC_FAST", - "BPF_T_FAST", - "BPF_T_FLAG_MASK", - "BPF_T_FORMAT_MASK", - "BPF_T_MICROTIME", - "BPF_T_MICROTIME_FAST", - "BPF_T_MICROTIME_MONOTONIC", - "BPF_T_MICROTIME_MONOTONIC_FAST", - "BPF_T_MONOTONIC", - "BPF_T_MONOTONIC_FAST", - "BPF_T_NANOTIME", - "BPF_T_NANOTIME_FAST", - "BPF_T_NANOTIME_MONOTONIC", - "BPF_T_NANOTIME_MONOTONIC_FAST", - "BPF_T_NONE", - "BPF_T_NORMAL", - "BPF_W", - "BPF_X", - "BRKINT", - "Bind", - "BindToDevice", - "BpfBuflen", - "BpfDatalink", - "BpfHdr", - "BpfHeadercmpl", - "BpfInsn", - "BpfInterface", - "BpfJump", - "BpfProgram", - "BpfStat", - "BpfStats", - "BpfStmt", - "BpfTimeout", - "BpfTimeval", - "BpfVersion", - "BpfZbuf", - "BpfZbufHeader", - "ByHandleFileInformation", - "BytePtrFromString", - "ByteSliceFromString", - "CCR0_FLUSH", - "CERT_CHAIN_POLICY_AUTHENTICODE", - "CERT_CHAIN_POLICY_AUTHENTICODE_TS", - "CERT_CHAIN_POLICY_BASE", - "CERT_CHAIN_POLICY_BASIC_CONSTRAINTS", - "CERT_CHAIN_POLICY_EV", - "CERT_CHAIN_POLICY_MICROSOFT_ROOT", - "CERT_CHAIN_POLICY_NT_AUTH", - "CERT_CHAIN_POLICY_SSL", - "CERT_E_CN_NO_MATCH", - "CERT_E_EXPIRED", - "CERT_E_PURPOSE", - "CERT_E_ROLE", - "CERT_E_UNTRUSTEDROOT", - "CERT_STORE_ADD_ALWAYS", - "CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG", - "CERT_STORE_PROV_MEMORY", - "CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT", - "CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT", - "CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT", - "CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT", - "CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT", - "CERT_TRUST_INVALID_BASIC_CONSTRAINTS", - "CERT_TRUST_INVALID_EXTENSION", - "CERT_TRUST_INVALID_NAME_CONSTRAINTS", - "CERT_TRUST_INVALID_POLICY_CONSTRAINTS", - "CERT_TRUST_IS_CYCLIC", - "CERT_TRUST_IS_EXPLICIT_DISTRUST", - "CERT_TRUST_IS_NOT_SIGNATURE_VALID", - "CERT_TRUST_IS_NOT_TIME_VALID", - "CERT_TRUST_IS_NOT_VALID_FOR_USAGE", - "CERT_TRUST_IS_OFFLINE_REVOCATION", - "CERT_TRUST_IS_REVOKED", - "CERT_TRUST_IS_UNTRUSTED_ROOT", - "CERT_TRUST_NO_ERROR", - "CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY", - "CERT_TRUST_REVOCATION_STATUS_UNKNOWN", - "CFLUSH", - "CLOCAL", - "CLONE_CHILD_CLEARTID", - "CLONE_CHILD_SETTID", - "CLONE_CLEAR_SIGHAND", - "CLONE_CSIGNAL", - "CLONE_DETACHED", - "CLONE_FILES", - "CLONE_FS", - "CLONE_INTO_CGROUP", - "CLONE_IO", - "CLONE_NEWCGROUP", - "CLONE_NEWIPC", - "CLONE_NEWNET", - "CLONE_NEWNS", - "CLONE_NEWPID", - "CLONE_NEWTIME", - "CLONE_NEWUSER", - "CLONE_NEWUTS", - "CLONE_PARENT", - "CLONE_PARENT_SETTID", - "CLONE_PID", - "CLONE_PIDFD", - "CLONE_PTRACE", - "CLONE_SETTLS", - "CLONE_SIGHAND", - "CLONE_SYSVSEM", - "CLONE_THREAD", - "CLONE_UNTRACED", - "CLONE_VFORK", - "CLONE_VM", - "CPUID_CFLUSH", - "CREAD", - "CREATE_ALWAYS", - "CREATE_NEW", - "CREATE_NEW_PROCESS_GROUP", - "CREATE_UNICODE_ENVIRONMENT", - "CRYPT_DEFAULT_CONTAINER_OPTIONAL", - "CRYPT_DELETEKEYSET", - "CRYPT_MACHINE_KEYSET", - "CRYPT_NEWKEYSET", - "CRYPT_SILENT", - "CRYPT_VERIFYCONTEXT", - "CS5", - "CS6", - "CS7", - "CS8", - "CSIZE", - "CSTART", - "CSTATUS", - "CSTOP", - "CSTOPB", - "CSUSP", - "CTL_MAXNAME", - "CTL_NET", - "CTL_QUERY", - "CTRL_BREAK_EVENT", - "CTRL_CLOSE_EVENT", - "CTRL_C_EVENT", - "CTRL_LOGOFF_EVENT", - "CTRL_SHUTDOWN_EVENT", - "CancelIo", - "CancelIoEx", - "CertAddCertificateContextToStore", - "CertChainContext", - "CertChainElement", - "CertChainPara", - "CertChainPolicyPara", - "CertChainPolicyStatus", - "CertCloseStore", - "CertContext", - "CertCreateCertificateContext", - "CertEnhKeyUsage", - "CertEnumCertificatesInStore", - "CertFreeCertificateChain", - "CertFreeCertificateContext", - "CertGetCertificateChain", - "CertInfo", - "CertOpenStore", - "CertOpenSystemStore", - "CertRevocationCrlInfo", - "CertRevocationInfo", - "CertSimpleChain", - "CertTrustListInfo", - "CertTrustStatus", - "CertUsageMatch", - "CertVerifyCertificateChainPolicy", - "Chdir", - "CheckBpfVersion", - "Chflags", - "Chmod", - "Chown", - "Chroot", - "Clearenv", - "Close", - "CloseHandle", - "CloseOnExec", - "Closesocket", - "CmsgLen", - "CmsgSpace", - "Cmsghdr", - "CommandLineToArgv", - "ComputerName", - "Conn", - "Connect", - "ConnectEx", - "ConvertSidToStringSid", - "ConvertStringSidToSid", - "CopySid", - "Creat", - "CreateDirectory", - "CreateFile", - "CreateFileMapping", - "CreateHardLink", - "CreateIoCompletionPort", - "CreatePipe", - "CreateProcess", - "CreateProcessAsUser", - "CreateSymbolicLink", - "CreateToolhelp32Snapshot", - "Credential", - "CryptAcquireContext", - "CryptGenRandom", - "CryptReleaseContext", - "DIOCBSFLUSH", - "DIOCOSFPFLUSH", - "DLL", - "DLLError", - "DLT_A429", - "DLT_A653_ICM", - "DLT_AIRONET_HEADER", - "DLT_AOS", - "DLT_APPLE_IP_OVER_IEEE1394", - "DLT_ARCNET", - "DLT_ARCNET_LINUX", - "DLT_ATM_CLIP", - "DLT_ATM_RFC1483", - "DLT_AURORA", - "DLT_AX25", - "DLT_AX25_KISS", - "DLT_BACNET_MS_TP", - "DLT_BLUETOOTH_HCI_H4", - "DLT_BLUETOOTH_HCI_H4_WITH_PHDR", - "DLT_CAN20B", - "DLT_CAN_SOCKETCAN", - "DLT_CHAOS", - "DLT_CHDLC", - "DLT_CISCO_IOS", - "DLT_C_HDLC", - "DLT_C_HDLC_WITH_DIR", - "DLT_DBUS", - "DLT_DECT", - "DLT_DOCSIS", - "DLT_DVB_CI", - "DLT_ECONET", - "DLT_EN10MB", - "DLT_EN3MB", - "DLT_ENC", - "DLT_ERF", - "DLT_ERF_ETH", - "DLT_ERF_POS", - "DLT_FC_2", - "DLT_FC_2_WITH_FRAME_DELIMS", - "DLT_FDDI", - "DLT_FLEXRAY", - "DLT_FRELAY", - "DLT_FRELAY_WITH_DIR", - "DLT_GCOM_SERIAL", - "DLT_GCOM_T1E1", - "DLT_GPF_F", - "DLT_GPF_T", - "DLT_GPRS_LLC", - "DLT_GSMTAP_ABIS", - "DLT_GSMTAP_UM", - "DLT_HDLC", - "DLT_HHDLC", - "DLT_HIPPI", - "DLT_IBM_SN", - "DLT_IBM_SP", - "DLT_IEEE802", - "DLT_IEEE802_11", - "DLT_IEEE802_11_RADIO", - "DLT_IEEE802_11_RADIO_AVS", - "DLT_IEEE802_15_4", - "DLT_IEEE802_15_4_LINUX", - "DLT_IEEE802_15_4_NOFCS", - "DLT_IEEE802_15_4_NONASK_PHY", - "DLT_IEEE802_16_MAC_CPS", - "DLT_IEEE802_16_MAC_CPS_RADIO", - "DLT_IPFILTER", - "DLT_IPMB", - "DLT_IPMB_LINUX", - "DLT_IPNET", - "DLT_IPOIB", - "DLT_IPV4", - "DLT_IPV6", - "DLT_IP_OVER_FC", - "DLT_JUNIPER_ATM1", - "DLT_JUNIPER_ATM2", - "DLT_JUNIPER_ATM_CEMIC", - "DLT_JUNIPER_CHDLC", - "DLT_JUNIPER_ES", - "DLT_JUNIPER_ETHER", - "DLT_JUNIPER_FIBRECHANNEL", - "DLT_JUNIPER_FRELAY", - "DLT_JUNIPER_GGSN", - "DLT_JUNIPER_ISM", - "DLT_JUNIPER_MFR", - "DLT_JUNIPER_MLFR", - "DLT_JUNIPER_MLPPP", - "DLT_JUNIPER_MONITOR", - "DLT_JUNIPER_PIC_PEER", - "DLT_JUNIPER_PPP", - "DLT_JUNIPER_PPPOE", - "DLT_JUNIPER_PPPOE_ATM", - "DLT_JUNIPER_SERVICES", - "DLT_JUNIPER_SRX_E2E", - "DLT_JUNIPER_ST", - "DLT_JUNIPER_VP", - "DLT_JUNIPER_VS", - "DLT_LAPB_WITH_DIR", - "DLT_LAPD", - "DLT_LIN", - "DLT_LINUX_EVDEV", - "DLT_LINUX_IRDA", - "DLT_LINUX_LAPD", - "DLT_LINUX_PPP_WITHDIRECTION", - "DLT_LINUX_SLL", - "DLT_LOOP", - "DLT_LTALK", - "DLT_MATCHING_MAX", - "DLT_MATCHING_MIN", - "DLT_MFR", - "DLT_MOST", - "DLT_MPEG_2_TS", - "DLT_MPLS", - "DLT_MTP2", - "DLT_MTP2_WITH_PHDR", - "DLT_MTP3", - "DLT_MUX27010", - "DLT_NETANALYZER", - "DLT_NETANALYZER_TRANSPARENT", - "DLT_NFC_LLCP", - "DLT_NFLOG", - "DLT_NG40", - "DLT_NULL", - "DLT_PCI_EXP", - "DLT_PFLOG", - "DLT_PFSYNC", - "DLT_PPI", - "DLT_PPP", - "DLT_PPP_BSDOS", - "DLT_PPP_ETHER", - "DLT_PPP_PPPD", - "DLT_PPP_SERIAL", - "DLT_PPP_WITH_DIR", - "DLT_PPP_WITH_DIRECTION", - "DLT_PRISM_HEADER", - "DLT_PRONET", - "DLT_RAIF1", - "DLT_RAW", - "DLT_RAWAF_MASK", - "DLT_RIO", - "DLT_SCCP", - "DLT_SITA", - "DLT_SLIP", - "DLT_SLIP_BSDOS", - "DLT_STANAG_5066_D_PDU", - "DLT_SUNATM", - "DLT_SYMANTEC_FIREWALL", - "DLT_TZSP", - "DLT_USB", - "DLT_USB_LINUX", - "DLT_USB_LINUX_MMAPPED", - "DLT_USER0", - "DLT_USER1", - "DLT_USER10", - "DLT_USER11", - "DLT_USER12", - "DLT_USER13", - "DLT_USER14", - "DLT_USER15", - "DLT_USER2", - "DLT_USER3", - "DLT_USER4", - "DLT_USER5", - "DLT_USER6", - "DLT_USER7", - "DLT_USER8", - "DLT_USER9", - "DLT_WIHART", - "DLT_X2E_SERIAL", - "DLT_X2E_XORAYA", - "DNSMXData", - "DNSPTRData", - "DNSRecord", - "DNSSRVData", - "DNSTXTData", - "DNS_INFO_NO_RECORDS", - "DNS_TYPE_A", - "DNS_TYPE_A6", - "DNS_TYPE_AAAA", - "DNS_TYPE_ADDRS", - "DNS_TYPE_AFSDB", - "DNS_TYPE_ALL", - "DNS_TYPE_ANY", - "DNS_TYPE_ATMA", - "DNS_TYPE_AXFR", - "DNS_TYPE_CERT", - "DNS_TYPE_CNAME", - "DNS_TYPE_DHCID", - "DNS_TYPE_DNAME", - "DNS_TYPE_DNSKEY", - "DNS_TYPE_DS", - "DNS_TYPE_EID", - "DNS_TYPE_GID", - "DNS_TYPE_GPOS", - "DNS_TYPE_HINFO", - "DNS_TYPE_ISDN", - "DNS_TYPE_IXFR", - "DNS_TYPE_KEY", - "DNS_TYPE_KX", - "DNS_TYPE_LOC", - "DNS_TYPE_MAILA", - "DNS_TYPE_MAILB", - "DNS_TYPE_MB", - "DNS_TYPE_MD", - "DNS_TYPE_MF", - "DNS_TYPE_MG", - "DNS_TYPE_MINFO", - "DNS_TYPE_MR", - "DNS_TYPE_MX", - "DNS_TYPE_NAPTR", - "DNS_TYPE_NBSTAT", - "DNS_TYPE_NIMLOC", - "DNS_TYPE_NS", - "DNS_TYPE_NSAP", - "DNS_TYPE_NSAPPTR", - "DNS_TYPE_NSEC", - "DNS_TYPE_NULL", - "DNS_TYPE_NXT", - "DNS_TYPE_OPT", - "DNS_TYPE_PTR", - "DNS_TYPE_PX", - "DNS_TYPE_RP", - "DNS_TYPE_RRSIG", - "DNS_TYPE_RT", - "DNS_TYPE_SIG", - "DNS_TYPE_SINK", - "DNS_TYPE_SOA", - "DNS_TYPE_SRV", - "DNS_TYPE_TEXT", - "DNS_TYPE_TKEY", - "DNS_TYPE_TSIG", - "DNS_TYPE_UID", - "DNS_TYPE_UINFO", - "DNS_TYPE_UNSPEC", - "DNS_TYPE_WINS", - "DNS_TYPE_WINSR", - "DNS_TYPE_WKS", - "DNS_TYPE_X25", - "DT_BLK", - "DT_CHR", - "DT_DIR", - "DT_FIFO", - "DT_LNK", - "DT_REG", - "DT_SOCK", - "DT_UNKNOWN", - "DT_WHT", - "DUPLICATE_CLOSE_SOURCE", - "DUPLICATE_SAME_ACCESS", - "DeleteFile", - "DetachLsf", - "DeviceIoControl", - "Dirent", - "DnsNameCompare", - "DnsQuery", - "DnsRecordListFree", - "DnsSectionAdditional", - "DnsSectionAnswer", - "DnsSectionAuthority", - "DnsSectionQuestion", - "Dup", - "Dup2", - "Dup3", - "DuplicateHandle", - "E2BIG", - "EACCES", - "EADDRINUSE", - "EADDRNOTAVAIL", - "EADV", - "EAFNOSUPPORT", - "EAGAIN", - "EALREADY", - "EAUTH", - "EBADARCH", - "EBADE", - "EBADEXEC", - "EBADF", - "EBADFD", - "EBADMACHO", - "EBADMSG", - "EBADR", - "EBADRPC", - "EBADRQC", - "EBADSLT", - "EBFONT", - "EBUSY", - "ECANCELED", - "ECAPMODE", - "ECHILD", - "ECHO", - "ECHOCTL", - "ECHOE", - "ECHOK", - "ECHOKE", - "ECHONL", - "ECHOPRT", - "ECHRNG", - "ECOMM", - "ECONNABORTED", - "ECONNREFUSED", - "ECONNRESET", - "EDEADLK", - "EDEADLOCK", - "EDESTADDRREQ", - "EDEVERR", - "EDOM", - "EDOOFUS", - "EDOTDOT", - "EDQUOT", - "EEXIST", - "EFAULT", - "EFBIG", - "EFER_LMA", - "EFER_LME", - "EFER_NXE", - "EFER_SCE", - "EFTYPE", - "EHOSTDOWN", - "EHOSTUNREACH", - "EHWPOISON", - "EIDRM", - "EILSEQ", - "EINPROGRESS", - "EINTR", - "EINVAL", - "EIO", - "EIPSEC", - "EISCONN", - "EISDIR", - "EISNAM", - "EKEYEXPIRED", - "EKEYREJECTED", - "EKEYREVOKED", - "EL2HLT", - "EL2NSYNC", - "EL3HLT", - "EL3RST", - "ELAST", - "ELF_NGREG", - "ELF_PRARGSZ", - "ELIBACC", - "ELIBBAD", - "ELIBEXEC", - "ELIBMAX", - "ELIBSCN", - "ELNRNG", - "ELOOP", - "EMEDIUMTYPE", - "EMFILE", - "EMLINK", - "EMSGSIZE", - "EMT_TAGOVF", - "EMULTIHOP", - "EMUL_ENABLED", - "EMUL_LINUX", - "EMUL_LINUX32", - "EMUL_MAXID", - "EMUL_NATIVE", - "ENAMETOOLONG", - "ENAVAIL", - "ENDRUNDISC", - "ENEEDAUTH", - "ENETDOWN", - "ENETRESET", - "ENETUNREACH", - "ENFILE", - "ENOANO", - "ENOATTR", - "ENOBUFS", - "ENOCSI", - "ENODATA", - "ENODEV", - "ENOENT", - "ENOEXEC", - "ENOKEY", - "ENOLCK", - "ENOLINK", - "ENOMEDIUM", - "ENOMEM", - "ENOMSG", - "ENONET", - "ENOPKG", - "ENOPOLICY", - "ENOPROTOOPT", - "ENOSPC", - "ENOSR", - "ENOSTR", - "ENOSYS", - "ENOTBLK", - "ENOTCAPABLE", - "ENOTCONN", - "ENOTDIR", - "ENOTEMPTY", - "ENOTNAM", - "ENOTRECOVERABLE", - "ENOTSOCK", - "ENOTSUP", - "ENOTTY", - "ENOTUNIQ", - "ENXIO", - "EN_SW_CTL_INF", - "EN_SW_CTL_PREC", - "EN_SW_CTL_ROUND", - "EN_SW_DATACHAIN", - "EN_SW_DENORM", - "EN_SW_INVOP", - "EN_SW_OVERFLOW", - "EN_SW_PRECLOSS", - "EN_SW_UNDERFLOW", - "EN_SW_ZERODIV", - "EOPNOTSUPP", - "EOVERFLOW", - "EOWNERDEAD", - "EPERM", - "EPFNOSUPPORT", - "EPIPE", - "EPOLLERR", - "EPOLLET", - "EPOLLHUP", - "EPOLLIN", - "EPOLLMSG", - "EPOLLONESHOT", - "EPOLLOUT", - "EPOLLPRI", - "EPOLLRDBAND", - "EPOLLRDHUP", - "EPOLLRDNORM", - "EPOLLWRBAND", - "EPOLLWRNORM", - "EPOLL_CLOEXEC", - "EPOLL_CTL_ADD", - "EPOLL_CTL_DEL", - "EPOLL_CTL_MOD", - "EPOLL_NONBLOCK", - "EPROCLIM", - "EPROCUNAVAIL", - "EPROGMISMATCH", - "EPROGUNAVAIL", - "EPROTO", - "EPROTONOSUPPORT", - "EPROTOTYPE", - "EPWROFF", - "EQFULL", - "ERANGE", - "EREMCHG", - "EREMOTE", - "EREMOTEIO", - "ERESTART", - "ERFKILL", - "EROFS", - "ERPCMISMATCH", - "ERROR_ACCESS_DENIED", - "ERROR_ALREADY_EXISTS", - "ERROR_BROKEN_PIPE", - "ERROR_BUFFER_OVERFLOW", - "ERROR_DIR_NOT_EMPTY", - "ERROR_ENVVAR_NOT_FOUND", - "ERROR_FILE_EXISTS", - "ERROR_FILE_NOT_FOUND", - "ERROR_HANDLE_EOF", - "ERROR_INSUFFICIENT_BUFFER", - "ERROR_IO_PENDING", - "ERROR_MOD_NOT_FOUND", - "ERROR_MORE_DATA", - "ERROR_NETNAME_DELETED", - "ERROR_NOT_FOUND", - "ERROR_NO_MORE_FILES", - "ERROR_OPERATION_ABORTED", - "ERROR_PATH_NOT_FOUND", - "ERROR_PRIVILEGE_NOT_HELD", - "ERROR_PROC_NOT_FOUND", - "ESHLIBVERS", - "ESHUTDOWN", - "ESOCKTNOSUPPORT", - "ESPIPE", - "ESRCH", - "ESRMNT", - "ESTALE", - "ESTRPIPE", - "ETHERCAP_JUMBO_MTU", - "ETHERCAP_VLAN_HWTAGGING", - "ETHERCAP_VLAN_MTU", - "ETHERMIN", - "ETHERMTU", - "ETHERMTU_JUMBO", - "ETHERTYPE_8023", - "ETHERTYPE_AARP", - "ETHERTYPE_ACCTON", - "ETHERTYPE_AEONIC", - "ETHERTYPE_ALPHA", - "ETHERTYPE_AMBER", - "ETHERTYPE_AMOEBA", - "ETHERTYPE_AOE", - "ETHERTYPE_APOLLO", - "ETHERTYPE_APOLLODOMAIN", - "ETHERTYPE_APPLETALK", - "ETHERTYPE_APPLITEK", - "ETHERTYPE_ARGONAUT", - "ETHERTYPE_ARP", - "ETHERTYPE_AT", - "ETHERTYPE_ATALK", - "ETHERTYPE_ATOMIC", - "ETHERTYPE_ATT", - "ETHERTYPE_ATTSTANFORD", - "ETHERTYPE_AUTOPHON", - "ETHERTYPE_AXIS", - "ETHERTYPE_BCLOOP", - "ETHERTYPE_BOFL", - "ETHERTYPE_CABLETRON", - "ETHERTYPE_CHAOS", - "ETHERTYPE_COMDESIGN", - "ETHERTYPE_COMPUGRAPHIC", - "ETHERTYPE_COUNTERPOINT", - "ETHERTYPE_CRONUS", - "ETHERTYPE_CRONUSVLN", - "ETHERTYPE_DCA", - "ETHERTYPE_DDE", - "ETHERTYPE_DEBNI", - "ETHERTYPE_DECAM", - "ETHERTYPE_DECCUST", - "ETHERTYPE_DECDIAG", - "ETHERTYPE_DECDNS", - "ETHERTYPE_DECDTS", - "ETHERTYPE_DECEXPER", - "ETHERTYPE_DECLAST", - "ETHERTYPE_DECLTM", - "ETHERTYPE_DECMUMPS", - "ETHERTYPE_DECNETBIOS", - "ETHERTYPE_DELTACON", - "ETHERTYPE_DIDDLE", - "ETHERTYPE_DLOG1", - "ETHERTYPE_DLOG2", - "ETHERTYPE_DN", - "ETHERTYPE_DOGFIGHT", - "ETHERTYPE_DSMD", - "ETHERTYPE_ECMA", - "ETHERTYPE_ENCRYPT", - "ETHERTYPE_ES", - "ETHERTYPE_EXCELAN", - "ETHERTYPE_EXPERDATA", - "ETHERTYPE_FLIP", - "ETHERTYPE_FLOWCONTROL", - "ETHERTYPE_FRARP", - "ETHERTYPE_GENDYN", - "ETHERTYPE_HAYES", - "ETHERTYPE_HIPPI_FP", - "ETHERTYPE_HITACHI", - "ETHERTYPE_HP", - "ETHERTYPE_IEEEPUP", - "ETHERTYPE_IEEEPUPAT", - "ETHERTYPE_IMLBL", - "ETHERTYPE_IMLBLDIAG", - "ETHERTYPE_IP", - "ETHERTYPE_IPAS", - "ETHERTYPE_IPV6", - "ETHERTYPE_IPX", - "ETHERTYPE_IPXNEW", - "ETHERTYPE_KALPANA", - "ETHERTYPE_LANBRIDGE", - "ETHERTYPE_LANPROBE", - "ETHERTYPE_LAT", - "ETHERTYPE_LBACK", - "ETHERTYPE_LITTLE", - "ETHERTYPE_LLDP", - "ETHERTYPE_LOGICRAFT", - "ETHERTYPE_LOOPBACK", - "ETHERTYPE_MATRA", - "ETHERTYPE_MAX", - "ETHERTYPE_MERIT", - "ETHERTYPE_MICP", - "ETHERTYPE_MOPDL", - "ETHERTYPE_MOPRC", - "ETHERTYPE_MOTOROLA", - "ETHERTYPE_MPLS", - "ETHERTYPE_MPLS_MCAST", - "ETHERTYPE_MUMPS", - "ETHERTYPE_NBPCC", - "ETHERTYPE_NBPCLAIM", - "ETHERTYPE_NBPCLREQ", - "ETHERTYPE_NBPCLRSP", - "ETHERTYPE_NBPCREQ", - "ETHERTYPE_NBPCRSP", - "ETHERTYPE_NBPDG", - "ETHERTYPE_NBPDGB", - "ETHERTYPE_NBPDLTE", - "ETHERTYPE_NBPRAR", - "ETHERTYPE_NBPRAS", - "ETHERTYPE_NBPRST", - "ETHERTYPE_NBPSCD", - "ETHERTYPE_NBPVCD", - "ETHERTYPE_NBS", - "ETHERTYPE_NCD", - "ETHERTYPE_NESTAR", - "ETHERTYPE_NETBEUI", - "ETHERTYPE_NOVELL", - "ETHERTYPE_NS", - "ETHERTYPE_NSAT", - "ETHERTYPE_NSCOMPAT", - "ETHERTYPE_NTRAILER", - "ETHERTYPE_OS9", - "ETHERTYPE_OS9NET", - "ETHERTYPE_PACER", - "ETHERTYPE_PAE", - "ETHERTYPE_PCS", - "ETHERTYPE_PLANNING", - "ETHERTYPE_PPP", - "ETHERTYPE_PPPOE", - "ETHERTYPE_PPPOEDISC", - "ETHERTYPE_PRIMENTS", - "ETHERTYPE_PUP", - "ETHERTYPE_PUPAT", - "ETHERTYPE_QINQ", - "ETHERTYPE_RACAL", - "ETHERTYPE_RATIONAL", - "ETHERTYPE_RAWFR", - "ETHERTYPE_RCL", - "ETHERTYPE_RDP", - "ETHERTYPE_RETIX", - "ETHERTYPE_REVARP", - "ETHERTYPE_SCA", - "ETHERTYPE_SECTRA", - "ETHERTYPE_SECUREDATA", - "ETHERTYPE_SGITW", - "ETHERTYPE_SG_BOUNCE", - "ETHERTYPE_SG_DIAG", - "ETHERTYPE_SG_NETGAMES", - "ETHERTYPE_SG_RESV", - "ETHERTYPE_SIMNET", - "ETHERTYPE_SLOW", - "ETHERTYPE_SLOWPROTOCOLS", - "ETHERTYPE_SNA", - "ETHERTYPE_SNMP", - "ETHERTYPE_SONIX", - "ETHERTYPE_SPIDER", - "ETHERTYPE_SPRITE", - "ETHERTYPE_STP", - "ETHERTYPE_TALARIS", - "ETHERTYPE_TALARISMC", - "ETHERTYPE_TCPCOMP", - "ETHERTYPE_TCPSM", - "ETHERTYPE_TEC", - "ETHERTYPE_TIGAN", - "ETHERTYPE_TRAIL", - "ETHERTYPE_TRANSETHER", - "ETHERTYPE_TYMSHARE", - "ETHERTYPE_UBBST", - "ETHERTYPE_UBDEBUG", - "ETHERTYPE_UBDIAGLOOP", - "ETHERTYPE_UBDL", - "ETHERTYPE_UBNIU", - "ETHERTYPE_UBNMC", - "ETHERTYPE_VALID", - "ETHERTYPE_VARIAN", - "ETHERTYPE_VAXELN", - "ETHERTYPE_VEECO", - "ETHERTYPE_VEXP", - "ETHERTYPE_VGLAB", - "ETHERTYPE_VINES", - "ETHERTYPE_VINESECHO", - "ETHERTYPE_VINESLOOP", - "ETHERTYPE_VITAL", - "ETHERTYPE_VLAN", - "ETHERTYPE_VLTLMAN", - "ETHERTYPE_VPROD", - "ETHERTYPE_VURESERVED", - "ETHERTYPE_WATERLOO", - "ETHERTYPE_WELLFLEET", - "ETHERTYPE_X25", - "ETHERTYPE_X75", - "ETHERTYPE_XNSSM", - "ETHERTYPE_XTP", - "ETHER_ADDR_LEN", - "ETHER_ALIGN", - "ETHER_CRC_LEN", - "ETHER_CRC_POLY_BE", - "ETHER_CRC_POLY_LE", - "ETHER_HDR_LEN", - "ETHER_MAX_DIX_LEN", - "ETHER_MAX_LEN", - "ETHER_MAX_LEN_JUMBO", - "ETHER_MIN_LEN", - "ETHER_PPPOE_ENCAP_LEN", - "ETHER_TYPE_LEN", - "ETHER_VLAN_ENCAP_LEN", - "ETH_P_1588", - "ETH_P_8021Q", - "ETH_P_802_2", - "ETH_P_802_3", - "ETH_P_AARP", - "ETH_P_ALL", - "ETH_P_AOE", - "ETH_P_ARCNET", - "ETH_P_ARP", - "ETH_P_ATALK", - "ETH_P_ATMFATE", - "ETH_P_ATMMPOA", - "ETH_P_AX25", - "ETH_P_BPQ", - "ETH_P_CAIF", - "ETH_P_CAN", - "ETH_P_CONTROL", - "ETH_P_CUST", - "ETH_P_DDCMP", - "ETH_P_DEC", - "ETH_P_DIAG", - "ETH_P_DNA_DL", - "ETH_P_DNA_RC", - "ETH_P_DNA_RT", - "ETH_P_DSA", - "ETH_P_ECONET", - "ETH_P_EDSA", - "ETH_P_FCOE", - "ETH_P_FIP", - "ETH_P_HDLC", - "ETH_P_IEEE802154", - "ETH_P_IEEEPUP", - "ETH_P_IEEEPUPAT", - "ETH_P_IP", - "ETH_P_IPV6", - "ETH_P_IPX", - "ETH_P_IRDA", - "ETH_P_LAT", - "ETH_P_LINK_CTL", - "ETH_P_LOCALTALK", - "ETH_P_LOOP", - "ETH_P_MOBITEX", - "ETH_P_MPLS_MC", - "ETH_P_MPLS_UC", - "ETH_P_PAE", - "ETH_P_PAUSE", - "ETH_P_PHONET", - "ETH_P_PPPTALK", - "ETH_P_PPP_DISC", - "ETH_P_PPP_MP", - "ETH_P_PPP_SES", - "ETH_P_PUP", - "ETH_P_PUPAT", - "ETH_P_RARP", - "ETH_P_SCA", - "ETH_P_SLOW", - "ETH_P_SNAP", - "ETH_P_TEB", - "ETH_P_TIPC", - "ETH_P_TRAILER", - "ETH_P_TR_802_2", - "ETH_P_WAN_PPP", - "ETH_P_WCCP", - "ETH_P_X25", - "ETIME", - "ETIMEDOUT", - "ETOOMANYREFS", - "ETXTBSY", - "EUCLEAN", - "EUNATCH", - "EUSERS", - "EVFILT_AIO", - "EVFILT_FS", - "EVFILT_LIO", - "EVFILT_MACHPORT", - "EVFILT_PROC", - "EVFILT_READ", - "EVFILT_SIGNAL", - "EVFILT_SYSCOUNT", - "EVFILT_THREADMARKER", - "EVFILT_TIMER", - "EVFILT_USER", - "EVFILT_VM", - "EVFILT_VNODE", - "EVFILT_WRITE", - "EV_ADD", - "EV_CLEAR", - "EV_DELETE", - "EV_DISABLE", - "EV_DISPATCH", - "EV_DROP", - "EV_ENABLE", - "EV_EOF", - "EV_ERROR", - "EV_FLAG0", - "EV_FLAG1", - "EV_ONESHOT", - "EV_OOBAND", - "EV_POLL", - "EV_RECEIPT", - "EV_SYSFLAGS", - "EWINDOWS", - "EWOULDBLOCK", - "EXDEV", - "EXFULL", - "EXTA", - "EXTB", - "EXTPROC", - "Environ", - "EpollCreate", - "EpollCreate1", - "EpollCtl", - "EpollEvent", - "EpollWait", - "Errno", - "EscapeArg", - "Exchangedata", - "Exec", - "Exit", - "ExitProcess", - "FD_CLOEXEC", - "FD_SETSIZE", - "FILE_ACTION_ADDED", - "FILE_ACTION_MODIFIED", - "FILE_ACTION_REMOVED", - "FILE_ACTION_RENAMED_NEW_NAME", - "FILE_ACTION_RENAMED_OLD_NAME", - "FILE_APPEND_DATA", - "FILE_ATTRIBUTE_ARCHIVE", - "FILE_ATTRIBUTE_DIRECTORY", - "FILE_ATTRIBUTE_HIDDEN", - "FILE_ATTRIBUTE_NORMAL", - "FILE_ATTRIBUTE_READONLY", - "FILE_ATTRIBUTE_REPARSE_POINT", - "FILE_ATTRIBUTE_SYSTEM", - "FILE_BEGIN", - "FILE_CURRENT", - "FILE_END", - "FILE_FLAG_BACKUP_SEMANTICS", - "FILE_FLAG_OPEN_REPARSE_POINT", - "FILE_FLAG_OVERLAPPED", - "FILE_LIST_DIRECTORY", - "FILE_MAP_COPY", - "FILE_MAP_EXECUTE", - "FILE_MAP_READ", - "FILE_MAP_WRITE", - "FILE_NOTIFY_CHANGE_ATTRIBUTES", - "FILE_NOTIFY_CHANGE_CREATION", - "FILE_NOTIFY_CHANGE_DIR_NAME", - "FILE_NOTIFY_CHANGE_FILE_NAME", - "FILE_NOTIFY_CHANGE_LAST_ACCESS", - "FILE_NOTIFY_CHANGE_LAST_WRITE", - "FILE_NOTIFY_CHANGE_SIZE", - "FILE_SHARE_DELETE", - "FILE_SHARE_READ", - "FILE_SHARE_WRITE", - "FILE_SKIP_COMPLETION_PORT_ON_SUCCESS", - "FILE_SKIP_SET_EVENT_ON_HANDLE", - "FILE_TYPE_CHAR", - "FILE_TYPE_DISK", - "FILE_TYPE_PIPE", - "FILE_TYPE_REMOTE", - "FILE_TYPE_UNKNOWN", - "FILE_WRITE_ATTRIBUTES", - "FLUSHO", - "FORMAT_MESSAGE_ALLOCATE_BUFFER", - "FORMAT_MESSAGE_ARGUMENT_ARRAY", - "FORMAT_MESSAGE_FROM_HMODULE", - "FORMAT_MESSAGE_FROM_STRING", - "FORMAT_MESSAGE_FROM_SYSTEM", - "FORMAT_MESSAGE_IGNORE_INSERTS", - "FORMAT_MESSAGE_MAX_WIDTH_MASK", - "FSCTL_GET_REPARSE_POINT", - "F_ADDFILESIGS", - "F_ADDSIGS", - "F_ALLOCATEALL", - "F_ALLOCATECONTIG", - "F_CANCEL", - "F_CHKCLEAN", - "F_CLOSEM", - "F_DUP2FD", - "F_DUP2FD_CLOEXEC", - "F_DUPFD", - "F_DUPFD_CLOEXEC", - "F_EXLCK", - "F_FINDSIGS", - "F_FLUSH_DATA", - "F_FREEZE_FS", - "F_FSCTL", - "F_FSDIRMASK", - "F_FSIN", - "F_FSINOUT", - "F_FSOUT", - "F_FSPRIV", - "F_FSVOID", - "F_FULLFSYNC", - "F_GETCODEDIR", - "F_GETFD", - "F_GETFL", - "F_GETLEASE", - "F_GETLK", - "F_GETLK64", - "F_GETLKPID", - "F_GETNOSIGPIPE", - "F_GETOWN", - "F_GETOWN_EX", - "F_GETPATH", - "F_GETPATH_MTMINFO", - "F_GETPIPE_SZ", - "F_GETPROTECTIONCLASS", - "F_GETPROTECTIONLEVEL", - "F_GETSIG", - "F_GLOBAL_NOCACHE", - "F_LOCK", - "F_LOG2PHYS", - "F_LOG2PHYS_EXT", - "F_MARKDEPENDENCY", - "F_MAXFD", - "F_NOCACHE", - "F_NODIRECT", - "F_NOTIFY", - "F_OGETLK", - "F_OK", - "F_OSETLK", - "F_OSETLKW", - "F_PARAM_MASK", - "F_PARAM_MAX", - "F_PATHPKG_CHECK", - "F_PEOFPOSMODE", - "F_PREALLOCATE", - "F_RDADVISE", - "F_RDAHEAD", - "F_RDLCK", - "F_READAHEAD", - "F_READBOOTSTRAP", - "F_SETBACKINGSTORE", - "F_SETFD", - "F_SETFL", - "F_SETLEASE", - "F_SETLK", - "F_SETLK64", - "F_SETLKW", - "F_SETLKW64", - "F_SETLKWTIMEOUT", - "F_SETLK_REMOTE", - "F_SETNOSIGPIPE", - "F_SETOWN", - "F_SETOWN_EX", - "F_SETPIPE_SZ", - "F_SETPROTECTIONCLASS", - "F_SETSIG", - "F_SETSIZE", - "F_SHLCK", - "F_SINGLE_WRITER", - "F_TEST", - "F_THAW_FS", - "F_TLOCK", - "F_TRANSCODEKEY", - "F_ULOCK", - "F_UNLCK", - "F_UNLCKSYS", - "F_VOLPOSMODE", - "F_WRITEBOOTSTRAP", - "F_WRLCK", - "Faccessat", - "Fallocate", - "Fbootstraptransfer_t", - "Fchdir", - "Fchflags", - "Fchmod", - "Fchmodat", - "Fchown", - "Fchownat", - "FcntlFlock", - "FdSet", - "Fdatasync", - "FileNotifyInformation", - "Filetime", - "FindClose", - "FindFirstFile", - "FindNextFile", - "Flock", - "Flock_t", - "FlushBpf", - "FlushFileBuffers", - "FlushViewOfFile", - "ForkExec", - "ForkLock", - "FormatMessage", - "Fpathconf", - "FreeAddrInfoW", - "FreeEnvironmentStrings", - "FreeLibrary", - "Fsid", - "Fstat", - "Fstatat", - "Fstatfs", - "Fstore_t", - "Fsync", - "Ftruncate", - "FullPath", - "Futimes", - "Futimesat", - "GENERIC_ALL", - "GENERIC_EXECUTE", - "GENERIC_READ", - "GENERIC_WRITE", - "GUID", - "GetAcceptExSockaddrs", - "GetAdaptersInfo", - "GetAddrInfoW", - "GetCommandLine", - "GetComputerName", - "GetConsoleMode", - "GetCurrentDirectory", - "GetCurrentProcess", - "GetEnvironmentStrings", - "GetEnvironmentVariable", - "GetExitCodeProcess", - "GetFileAttributes", - "GetFileAttributesEx", - "GetFileExInfoStandard", - "GetFileExMaxInfoLevel", - "GetFileInformationByHandle", - "GetFileType", - "GetFullPathName", - "GetHostByName", - "GetIfEntry", - "GetLastError", - "GetLengthSid", - "GetLongPathName", - "GetProcAddress", - "GetProcessTimes", - "GetProtoByName", - "GetQueuedCompletionStatus", - "GetServByName", - "GetShortPathName", - "GetStartupInfo", - "GetStdHandle", - "GetSystemTimeAsFileTime", - "GetTempPath", - "GetTimeZoneInformation", - "GetTokenInformation", - "GetUserNameEx", - "GetUserProfileDirectory", - "GetVersion", - "Getcwd", - "Getdents", - "Getdirentries", - "Getdtablesize", - "Getegid", - "Getenv", - "Geteuid", - "Getfsstat", - "Getgid", - "Getgroups", - "Getpagesize", - "Getpeername", - "Getpgid", - "Getpgrp", - "Getpid", - "Getppid", - "Getpriority", - "Getrlimit", - "Getrusage", - "Getsid", - "Getsockname", - "Getsockopt", - "GetsockoptByte", - "GetsockoptICMPv6Filter", - "GetsockoptIPMreq", - "GetsockoptIPMreqn", - "GetsockoptIPv6MTUInfo", - "GetsockoptIPv6Mreq", - "GetsockoptInet4Addr", - "GetsockoptInt", - "GetsockoptUcred", - "Gettid", - "Gettimeofday", - "Getuid", - "Getwd", - "Getxattr", - "HANDLE_FLAG_INHERIT", - "HKEY_CLASSES_ROOT", - "HKEY_CURRENT_CONFIG", - "HKEY_CURRENT_USER", - "HKEY_DYN_DATA", - "HKEY_LOCAL_MACHINE", - "HKEY_PERFORMANCE_DATA", - "HKEY_USERS", - "HUPCL", - "Handle", - "Hostent", - "ICANON", - "ICMP6_FILTER", - "ICMPV6_FILTER", - "ICMPv6Filter", - "ICRNL", - "IEXTEN", - "IFAN_ARRIVAL", - "IFAN_DEPARTURE", - "IFA_ADDRESS", - "IFA_ANYCAST", - "IFA_BROADCAST", - "IFA_CACHEINFO", - "IFA_F_DADFAILED", - "IFA_F_DEPRECATED", - "IFA_F_HOMEADDRESS", - "IFA_F_NODAD", - "IFA_F_OPTIMISTIC", - "IFA_F_PERMANENT", - "IFA_F_SECONDARY", - "IFA_F_TEMPORARY", - "IFA_F_TENTATIVE", - "IFA_LABEL", - "IFA_LOCAL", - "IFA_MAX", - "IFA_MULTICAST", - "IFA_ROUTE", - "IFA_UNSPEC", - "IFF_ALLMULTI", - "IFF_ALTPHYS", - "IFF_AUTOMEDIA", - "IFF_BROADCAST", - "IFF_CANTCHANGE", - "IFF_CANTCONFIG", - "IFF_DEBUG", - "IFF_DRV_OACTIVE", - "IFF_DRV_RUNNING", - "IFF_DYING", - "IFF_DYNAMIC", - "IFF_LINK0", - "IFF_LINK1", - "IFF_LINK2", - "IFF_LOOPBACK", - "IFF_MASTER", - "IFF_MONITOR", - "IFF_MULTICAST", - "IFF_NOARP", - "IFF_NOTRAILERS", - "IFF_NO_PI", - "IFF_OACTIVE", - "IFF_ONE_QUEUE", - "IFF_POINTOPOINT", - "IFF_POINTTOPOINT", - "IFF_PORTSEL", - "IFF_PPROMISC", - "IFF_PROMISC", - "IFF_RENAMING", - "IFF_RUNNING", - "IFF_SIMPLEX", - "IFF_SLAVE", - "IFF_SMART", - "IFF_STATICARP", - "IFF_TAP", - "IFF_TUN", - "IFF_TUN_EXCL", - "IFF_UP", - "IFF_VNET_HDR", - "IFLA_ADDRESS", - "IFLA_BROADCAST", - "IFLA_COST", - "IFLA_IFALIAS", - "IFLA_IFNAME", - "IFLA_LINK", - "IFLA_LINKINFO", - "IFLA_LINKMODE", - "IFLA_MAP", - "IFLA_MASTER", - "IFLA_MAX", - "IFLA_MTU", - "IFLA_NET_NS_PID", - "IFLA_OPERSTATE", - "IFLA_PRIORITY", - "IFLA_PROTINFO", - "IFLA_QDISC", - "IFLA_STATS", - "IFLA_TXQLEN", - "IFLA_UNSPEC", - "IFLA_WEIGHT", - "IFLA_WIRELESS", - "IFNAMSIZ", - "IFT_1822", - "IFT_A12MPPSWITCH", - "IFT_AAL2", - "IFT_AAL5", - "IFT_ADSL", - "IFT_AFLANE8023", - "IFT_AFLANE8025", - "IFT_ARAP", - "IFT_ARCNET", - "IFT_ARCNETPLUS", - "IFT_ASYNC", - "IFT_ATM", - "IFT_ATMDXI", - "IFT_ATMFUNI", - "IFT_ATMIMA", - "IFT_ATMLOGICAL", - "IFT_ATMRADIO", - "IFT_ATMSUBINTERFACE", - "IFT_ATMVCIENDPT", - "IFT_ATMVIRTUAL", - "IFT_BGPPOLICYACCOUNTING", - "IFT_BLUETOOTH", - "IFT_BRIDGE", - "IFT_BSC", - "IFT_CARP", - "IFT_CCTEMUL", - "IFT_CELLULAR", - "IFT_CEPT", - "IFT_CES", - "IFT_CHANNEL", - "IFT_CNR", - "IFT_COFFEE", - "IFT_COMPOSITELINK", - "IFT_DCN", - "IFT_DIGITALPOWERLINE", - "IFT_DIGITALWRAPPEROVERHEADCHANNEL", - "IFT_DLSW", - "IFT_DOCSCABLEDOWNSTREAM", - "IFT_DOCSCABLEMACLAYER", - "IFT_DOCSCABLEUPSTREAM", - "IFT_DOCSCABLEUPSTREAMCHANNEL", - "IFT_DS0", - "IFT_DS0BUNDLE", - "IFT_DS1FDL", - "IFT_DS3", - "IFT_DTM", - "IFT_DUMMY", - "IFT_DVBASILN", - "IFT_DVBASIOUT", - "IFT_DVBRCCDOWNSTREAM", - "IFT_DVBRCCMACLAYER", - "IFT_DVBRCCUPSTREAM", - "IFT_ECONET", - "IFT_ENC", - "IFT_EON", - "IFT_EPLRS", - "IFT_ESCON", - "IFT_ETHER", - "IFT_FAITH", - "IFT_FAST", - "IFT_FASTETHER", - "IFT_FASTETHERFX", - "IFT_FDDI", - "IFT_FIBRECHANNEL", - "IFT_FRAMERELAYINTERCONNECT", - "IFT_FRAMERELAYMPI", - "IFT_FRDLCIENDPT", - "IFT_FRELAY", - "IFT_FRELAYDCE", - "IFT_FRF16MFRBUNDLE", - "IFT_FRFORWARD", - "IFT_G703AT2MB", - "IFT_G703AT64K", - "IFT_GIF", - "IFT_GIGABITETHERNET", - "IFT_GR303IDT", - "IFT_GR303RDT", - "IFT_H323GATEKEEPER", - "IFT_H323PROXY", - "IFT_HDH1822", - "IFT_HDLC", - "IFT_HDSL2", - "IFT_HIPERLAN2", - "IFT_HIPPI", - "IFT_HIPPIINTERFACE", - "IFT_HOSTPAD", - "IFT_HSSI", - "IFT_HY", - "IFT_IBM370PARCHAN", - "IFT_IDSL", - "IFT_IEEE1394", - "IFT_IEEE80211", - "IFT_IEEE80212", - "IFT_IEEE8023ADLAG", - "IFT_IFGSN", - "IFT_IMT", - "IFT_INFINIBAND", - "IFT_INTERLEAVE", - "IFT_IP", - "IFT_IPFORWARD", - "IFT_IPOVERATM", - "IFT_IPOVERCDLC", - "IFT_IPOVERCLAW", - "IFT_IPSWITCH", - "IFT_IPXIP", - "IFT_ISDN", - "IFT_ISDNBASIC", - "IFT_ISDNPRIMARY", - "IFT_ISDNS", - "IFT_ISDNU", - "IFT_ISO88022LLC", - "IFT_ISO88023", - "IFT_ISO88024", - "IFT_ISO88025", - "IFT_ISO88025CRFPINT", - "IFT_ISO88025DTR", - "IFT_ISO88025FIBER", - "IFT_ISO88026", - "IFT_ISUP", - "IFT_L2VLAN", - "IFT_L3IPVLAN", - "IFT_L3IPXVLAN", - "IFT_LAPB", - "IFT_LAPD", - "IFT_LAPF", - "IFT_LINEGROUP", - "IFT_LOCALTALK", - "IFT_LOOP", - "IFT_MEDIAMAILOVERIP", - "IFT_MFSIGLINK", - "IFT_MIOX25", - "IFT_MODEM", - "IFT_MPC", - "IFT_MPLS", - "IFT_MPLSTUNNEL", - "IFT_MSDSL", - "IFT_MVL", - "IFT_MYRINET", - "IFT_NFAS", - "IFT_NSIP", - "IFT_OPTICALCHANNEL", - "IFT_OPTICALTRANSPORT", - "IFT_OTHER", - "IFT_P10", - "IFT_P80", - "IFT_PARA", - "IFT_PDP", - "IFT_PFLOG", - "IFT_PFLOW", - "IFT_PFSYNC", - "IFT_PLC", - "IFT_PON155", - "IFT_PON622", - "IFT_POS", - "IFT_PPP", - "IFT_PPPMULTILINKBUNDLE", - "IFT_PROPATM", - "IFT_PROPBWAP2MP", - "IFT_PROPCNLS", - "IFT_PROPDOCSWIRELESSDOWNSTREAM", - "IFT_PROPDOCSWIRELESSMACLAYER", - "IFT_PROPDOCSWIRELESSUPSTREAM", - "IFT_PROPMUX", - "IFT_PROPVIRTUAL", - "IFT_PROPWIRELESSP2P", - "IFT_PTPSERIAL", - "IFT_PVC", - "IFT_Q2931", - "IFT_QLLC", - "IFT_RADIOMAC", - "IFT_RADSL", - "IFT_REACHDSL", - "IFT_RFC1483", - "IFT_RS232", - "IFT_RSRB", - "IFT_SDLC", - "IFT_SDSL", - "IFT_SHDSL", - "IFT_SIP", - "IFT_SIPSIG", - "IFT_SIPTG", - "IFT_SLIP", - "IFT_SMDSDXI", - "IFT_SMDSICIP", - "IFT_SONET", - "IFT_SONETOVERHEADCHANNEL", - "IFT_SONETPATH", - "IFT_SONETVT", - "IFT_SRP", - "IFT_SS7SIGLINK", - "IFT_STACKTOSTACK", - "IFT_STARLAN", - "IFT_STF", - "IFT_T1", - "IFT_TDLC", - "IFT_TELINK", - "IFT_TERMPAD", - "IFT_TR008", - "IFT_TRANSPHDLC", - "IFT_TUNNEL", - "IFT_ULTRA", - "IFT_USB", - "IFT_V11", - "IFT_V35", - "IFT_V36", - "IFT_V37", - "IFT_VDSL", - "IFT_VIRTUALIPADDRESS", - "IFT_VIRTUALTG", - "IFT_VOICEDID", - "IFT_VOICEEM", - "IFT_VOICEEMFGD", - "IFT_VOICEENCAP", - "IFT_VOICEFGDEANA", - "IFT_VOICEFXO", - "IFT_VOICEFXS", - "IFT_VOICEOVERATM", - "IFT_VOICEOVERCABLE", - "IFT_VOICEOVERFRAMERELAY", - "IFT_VOICEOVERIP", - "IFT_X213", - "IFT_X25", - "IFT_X25DDN", - "IFT_X25HUNTGROUP", - "IFT_X25MLP", - "IFT_X25PLE", - "IFT_XETHER", - "IGNBRK", - "IGNCR", - "IGNORE", - "IGNPAR", - "IMAXBEL", - "INFINITE", - "INLCR", - "INPCK", - "INVALID_FILE_ATTRIBUTES", - "IN_ACCESS", - "IN_ALL_EVENTS", - "IN_ATTRIB", - "IN_CLASSA_HOST", - "IN_CLASSA_MAX", - "IN_CLASSA_NET", - "IN_CLASSA_NSHIFT", - "IN_CLASSB_HOST", - "IN_CLASSB_MAX", - "IN_CLASSB_NET", - "IN_CLASSB_NSHIFT", - "IN_CLASSC_HOST", - "IN_CLASSC_NET", - "IN_CLASSC_NSHIFT", - "IN_CLASSD_HOST", - "IN_CLASSD_NET", - "IN_CLASSD_NSHIFT", - "IN_CLOEXEC", - "IN_CLOSE", - "IN_CLOSE_NOWRITE", - "IN_CLOSE_WRITE", - "IN_CREATE", - "IN_DELETE", - "IN_DELETE_SELF", - "IN_DONT_FOLLOW", - "IN_EXCL_UNLINK", - "IN_IGNORED", - "IN_ISDIR", - "IN_LINKLOCALNETNUM", - "IN_LOOPBACKNET", - "IN_MASK_ADD", - "IN_MODIFY", - "IN_MOVE", - "IN_MOVED_FROM", - "IN_MOVED_TO", - "IN_MOVE_SELF", - "IN_NONBLOCK", - "IN_ONESHOT", - "IN_ONLYDIR", - "IN_OPEN", - "IN_Q_OVERFLOW", - "IN_RFC3021_HOST", - "IN_RFC3021_MASK", - "IN_RFC3021_NET", - "IN_RFC3021_NSHIFT", - "IN_UNMOUNT", - "IOC_IN", - "IOC_INOUT", - "IOC_OUT", - "IOC_VENDOR", - "IOC_WS2", - "IO_REPARSE_TAG_SYMLINK", - "IPMreq", - "IPMreqn", - "IPPROTO_3PC", - "IPPROTO_ADFS", - "IPPROTO_AH", - "IPPROTO_AHIP", - "IPPROTO_APES", - "IPPROTO_ARGUS", - "IPPROTO_AX25", - "IPPROTO_BHA", - "IPPROTO_BLT", - "IPPROTO_BRSATMON", - "IPPROTO_CARP", - "IPPROTO_CFTP", - "IPPROTO_CHAOS", - "IPPROTO_CMTP", - "IPPROTO_COMP", - "IPPROTO_CPHB", - "IPPROTO_CPNX", - "IPPROTO_DCCP", - "IPPROTO_DDP", - "IPPROTO_DGP", - "IPPROTO_DIVERT", - "IPPROTO_DIVERT_INIT", - "IPPROTO_DIVERT_RESP", - "IPPROTO_DONE", - "IPPROTO_DSTOPTS", - "IPPROTO_EGP", - "IPPROTO_EMCON", - "IPPROTO_ENCAP", - "IPPROTO_EON", - "IPPROTO_ESP", - "IPPROTO_ETHERIP", - "IPPROTO_FRAGMENT", - "IPPROTO_GGP", - "IPPROTO_GMTP", - "IPPROTO_GRE", - "IPPROTO_HELLO", - "IPPROTO_HMP", - "IPPROTO_HOPOPTS", - "IPPROTO_ICMP", - "IPPROTO_ICMPV6", - "IPPROTO_IDP", - "IPPROTO_IDPR", - "IPPROTO_IDRP", - "IPPROTO_IGMP", - "IPPROTO_IGP", - "IPPROTO_IGRP", - "IPPROTO_IL", - "IPPROTO_INLSP", - "IPPROTO_INP", - "IPPROTO_IP", - "IPPROTO_IPCOMP", - "IPPROTO_IPCV", - "IPPROTO_IPEIP", - "IPPROTO_IPIP", - "IPPROTO_IPPC", - "IPPROTO_IPV4", - "IPPROTO_IPV6", - "IPPROTO_IPV6_ICMP", - "IPPROTO_IRTP", - "IPPROTO_KRYPTOLAN", - "IPPROTO_LARP", - "IPPROTO_LEAF1", - "IPPROTO_LEAF2", - "IPPROTO_MAX", - "IPPROTO_MAXID", - "IPPROTO_MEAS", - "IPPROTO_MH", - "IPPROTO_MHRP", - "IPPROTO_MICP", - "IPPROTO_MOBILE", - "IPPROTO_MPLS", - "IPPROTO_MTP", - "IPPROTO_MUX", - "IPPROTO_ND", - "IPPROTO_NHRP", - "IPPROTO_NONE", - "IPPROTO_NSP", - "IPPROTO_NVPII", - "IPPROTO_OLD_DIVERT", - "IPPROTO_OSPFIGP", - "IPPROTO_PFSYNC", - "IPPROTO_PGM", - "IPPROTO_PIGP", - "IPPROTO_PIM", - "IPPROTO_PRM", - "IPPROTO_PUP", - "IPPROTO_PVP", - "IPPROTO_RAW", - "IPPROTO_RCCMON", - "IPPROTO_RDP", - "IPPROTO_ROUTING", - "IPPROTO_RSVP", - "IPPROTO_RVD", - "IPPROTO_SATEXPAK", - "IPPROTO_SATMON", - "IPPROTO_SCCSP", - "IPPROTO_SCTP", - "IPPROTO_SDRP", - "IPPROTO_SEND", - "IPPROTO_SEP", - "IPPROTO_SKIP", - "IPPROTO_SPACER", - "IPPROTO_SRPC", - "IPPROTO_ST", - "IPPROTO_SVMTP", - "IPPROTO_SWIPE", - "IPPROTO_TCF", - "IPPROTO_TCP", - "IPPROTO_TLSP", - "IPPROTO_TP", - "IPPROTO_TPXX", - "IPPROTO_TRUNK1", - "IPPROTO_TRUNK2", - "IPPROTO_TTP", - "IPPROTO_UDP", - "IPPROTO_UDPLITE", - "IPPROTO_VINES", - "IPPROTO_VISA", - "IPPROTO_VMTP", - "IPPROTO_VRRP", - "IPPROTO_WBEXPAK", - "IPPROTO_WBMON", - "IPPROTO_WSN", - "IPPROTO_XNET", - "IPPROTO_XTP", - "IPV6_2292DSTOPTS", - "IPV6_2292HOPLIMIT", - "IPV6_2292HOPOPTS", - "IPV6_2292NEXTHOP", - "IPV6_2292PKTINFO", - "IPV6_2292PKTOPTIONS", - "IPV6_2292RTHDR", - "IPV6_ADDRFORM", - "IPV6_ADD_MEMBERSHIP", - "IPV6_AUTHHDR", - "IPV6_AUTH_LEVEL", - "IPV6_AUTOFLOWLABEL", - "IPV6_BINDANY", - "IPV6_BINDV6ONLY", - "IPV6_BOUND_IF", - "IPV6_CHECKSUM", - "IPV6_DEFAULT_MULTICAST_HOPS", - "IPV6_DEFAULT_MULTICAST_LOOP", - "IPV6_DEFHLIM", - "IPV6_DONTFRAG", - "IPV6_DROP_MEMBERSHIP", - "IPV6_DSTOPTS", - "IPV6_ESP_NETWORK_LEVEL", - "IPV6_ESP_TRANS_LEVEL", - "IPV6_FAITH", - "IPV6_FLOWINFO_MASK", - "IPV6_FLOWLABEL_MASK", - "IPV6_FRAGTTL", - "IPV6_FW_ADD", - "IPV6_FW_DEL", - "IPV6_FW_FLUSH", - "IPV6_FW_GET", - "IPV6_FW_ZERO", - "IPV6_HLIMDEC", - "IPV6_HOPLIMIT", - "IPV6_HOPOPTS", - "IPV6_IPCOMP_LEVEL", - "IPV6_IPSEC_POLICY", - "IPV6_JOIN_ANYCAST", - "IPV6_JOIN_GROUP", - "IPV6_LEAVE_ANYCAST", - "IPV6_LEAVE_GROUP", - "IPV6_MAXHLIM", - "IPV6_MAXOPTHDR", - "IPV6_MAXPACKET", - "IPV6_MAX_GROUP_SRC_FILTER", - "IPV6_MAX_MEMBERSHIPS", - "IPV6_MAX_SOCK_SRC_FILTER", - "IPV6_MIN_MEMBERSHIPS", - "IPV6_MMTU", - "IPV6_MSFILTER", - "IPV6_MTU", - "IPV6_MTU_DISCOVER", - "IPV6_MULTICAST_HOPS", - "IPV6_MULTICAST_IF", - "IPV6_MULTICAST_LOOP", - "IPV6_NEXTHOP", - "IPV6_OPTIONS", - "IPV6_PATHMTU", - "IPV6_PIPEX", - "IPV6_PKTINFO", - "IPV6_PMTUDISC_DO", - "IPV6_PMTUDISC_DONT", - "IPV6_PMTUDISC_PROBE", - "IPV6_PMTUDISC_WANT", - "IPV6_PORTRANGE", - "IPV6_PORTRANGE_DEFAULT", - "IPV6_PORTRANGE_HIGH", - "IPV6_PORTRANGE_LOW", - "IPV6_PREFER_TEMPADDR", - "IPV6_RECVDSTOPTS", - "IPV6_RECVDSTPORT", - "IPV6_RECVERR", - "IPV6_RECVHOPLIMIT", - "IPV6_RECVHOPOPTS", - "IPV6_RECVPATHMTU", - "IPV6_RECVPKTINFO", - "IPV6_RECVRTHDR", - "IPV6_RECVTCLASS", - "IPV6_ROUTER_ALERT", - "IPV6_RTABLE", - "IPV6_RTHDR", - "IPV6_RTHDRDSTOPTS", - "IPV6_RTHDR_LOOSE", - "IPV6_RTHDR_STRICT", - "IPV6_RTHDR_TYPE_0", - "IPV6_RXDSTOPTS", - "IPV6_RXHOPOPTS", - "IPV6_SOCKOPT_RESERVED1", - "IPV6_TCLASS", - "IPV6_UNICAST_HOPS", - "IPV6_USE_MIN_MTU", - "IPV6_V6ONLY", - "IPV6_VERSION", - "IPV6_VERSION_MASK", - "IPV6_XFRM_POLICY", - "IP_ADD_MEMBERSHIP", - "IP_ADD_SOURCE_MEMBERSHIP", - "IP_AUTH_LEVEL", - "IP_BINDANY", - "IP_BLOCK_SOURCE", - "IP_BOUND_IF", - "IP_DEFAULT_MULTICAST_LOOP", - "IP_DEFAULT_MULTICAST_TTL", - "IP_DF", - "IP_DIVERTFL", - "IP_DONTFRAG", - "IP_DROP_MEMBERSHIP", - "IP_DROP_SOURCE_MEMBERSHIP", - "IP_DUMMYNET3", - "IP_DUMMYNET_CONFIGURE", - "IP_DUMMYNET_DEL", - "IP_DUMMYNET_FLUSH", - "IP_DUMMYNET_GET", - "IP_EF", - "IP_ERRORMTU", - "IP_ESP_NETWORK_LEVEL", - "IP_ESP_TRANS_LEVEL", - "IP_FAITH", - "IP_FREEBIND", - "IP_FW3", - "IP_FW_ADD", - "IP_FW_DEL", - "IP_FW_FLUSH", - "IP_FW_GET", - "IP_FW_NAT_CFG", - "IP_FW_NAT_DEL", - "IP_FW_NAT_GET_CONFIG", - "IP_FW_NAT_GET_LOG", - "IP_FW_RESETLOG", - "IP_FW_TABLE_ADD", - "IP_FW_TABLE_DEL", - "IP_FW_TABLE_FLUSH", - "IP_FW_TABLE_GETSIZE", - "IP_FW_TABLE_LIST", - "IP_FW_ZERO", - "IP_HDRINCL", - "IP_IPCOMP_LEVEL", - "IP_IPSECFLOWINFO", - "IP_IPSEC_LOCAL_AUTH", - "IP_IPSEC_LOCAL_CRED", - "IP_IPSEC_LOCAL_ID", - "IP_IPSEC_POLICY", - "IP_IPSEC_REMOTE_AUTH", - "IP_IPSEC_REMOTE_CRED", - "IP_IPSEC_REMOTE_ID", - "IP_MAXPACKET", - "IP_MAX_GROUP_SRC_FILTER", - "IP_MAX_MEMBERSHIPS", - "IP_MAX_SOCK_MUTE_FILTER", - "IP_MAX_SOCK_SRC_FILTER", - "IP_MAX_SOURCE_FILTER", - "IP_MF", - "IP_MINFRAGSIZE", - "IP_MINTTL", - "IP_MIN_MEMBERSHIPS", - "IP_MSFILTER", - "IP_MSS", - "IP_MTU", - "IP_MTU_DISCOVER", - "IP_MULTICAST_IF", - "IP_MULTICAST_IFINDEX", - "IP_MULTICAST_LOOP", - "IP_MULTICAST_TTL", - "IP_MULTICAST_VIF", - "IP_NAT__XXX", - "IP_OFFMASK", - "IP_OLD_FW_ADD", - "IP_OLD_FW_DEL", - "IP_OLD_FW_FLUSH", - "IP_OLD_FW_GET", - "IP_OLD_FW_RESETLOG", - "IP_OLD_FW_ZERO", - "IP_ONESBCAST", - "IP_OPTIONS", - "IP_ORIGDSTADDR", - "IP_PASSSEC", - "IP_PIPEX", - "IP_PKTINFO", - "IP_PKTOPTIONS", - "IP_PMTUDISC", - "IP_PMTUDISC_DO", - "IP_PMTUDISC_DONT", - "IP_PMTUDISC_PROBE", - "IP_PMTUDISC_WANT", - "IP_PORTRANGE", - "IP_PORTRANGE_DEFAULT", - "IP_PORTRANGE_HIGH", - "IP_PORTRANGE_LOW", - "IP_RECVDSTADDR", - "IP_RECVDSTPORT", - "IP_RECVERR", - "IP_RECVIF", - "IP_RECVOPTS", - "IP_RECVORIGDSTADDR", - "IP_RECVPKTINFO", - "IP_RECVRETOPTS", - "IP_RECVRTABLE", - "IP_RECVTOS", - "IP_RECVTTL", - "IP_RETOPTS", - "IP_RF", - "IP_ROUTER_ALERT", - "IP_RSVP_OFF", - "IP_RSVP_ON", - "IP_RSVP_VIF_OFF", - "IP_RSVP_VIF_ON", - "IP_RTABLE", - "IP_SENDSRCADDR", - "IP_STRIPHDR", - "IP_TOS", - "IP_TRAFFIC_MGT_BACKGROUND", - "IP_TRANSPARENT", - "IP_TTL", - "IP_UNBLOCK_SOURCE", - "IP_XFRM_POLICY", - "IPv6MTUInfo", - "IPv6Mreq", - "ISIG", - "ISTRIP", - "IUCLC", - "IUTF8", - "IXANY", - "IXOFF", - "IXON", - "IfAddrmsg", - "IfAnnounceMsghdr", - "IfData", - "IfInfomsg", - "IfMsghdr", - "IfaMsghdr", - "IfmaMsghdr", - "IfmaMsghdr2", - "ImplementsGetwd", - "Inet4Pktinfo", - "Inet6Pktinfo", - "InotifyAddWatch", - "InotifyEvent", - "InotifyInit", - "InotifyInit1", - "InotifyRmWatch", - "InterfaceAddrMessage", - "InterfaceAnnounceMessage", - "InterfaceInfo", - "InterfaceMessage", - "InterfaceMulticastAddrMessage", - "InvalidHandle", - "Ioperm", - "Iopl", - "Iovec", - "IpAdapterInfo", - "IpAddrString", - "IpAddressString", - "IpMaskString", - "Issetugid", - "KEY_ALL_ACCESS", - "KEY_CREATE_LINK", - "KEY_CREATE_SUB_KEY", - "KEY_ENUMERATE_SUB_KEYS", - "KEY_EXECUTE", - "KEY_NOTIFY", - "KEY_QUERY_VALUE", - "KEY_READ", - "KEY_SET_VALUE", - "KEY_WOW64_32KEY", - "KEY_WOW64_64KEY", - "KEY_WRITE", - "Kevent", - "Kevent_t", - "Kill", - "Klogctl", - "Kqueue", - "LANG_ENGLISH", - "LAYERED_PROTOCOL", - "LCNT_OVERLOAD_FLUSH", - "LINUX_REBOOT_CMD_CAD_OFF", - "LINUX_REBOOT_CMD_CAD_ON", - "LINUX_REBOOT_CMD_HALT", - "LINUX_REBOOT_CMD_KEXEC", - "LINUX_REBOOT_CMD_POWER_OFF", - "LINUX_REBOOT_CMD_RESTART", - "LINUX_REBOOT_CMD_RESTART2", - "LINUX_REBOOT_CMD_SW_SUSPEND", - "LINUX_REBOOT_MAGIC1", - "LINUX_REBOOT_MAGIC2", - "LOCK_EX", - "LOCK_NB", - "LOCK_SH", - "LOCK_UN", - "LazyDLL", - "LazyProc", - "Lchown", - "Linger", - "Link", - "Listen", - "Listxattr", - "LoadCancelIoEx", - "LoadConnectEx", - "LoadCreateSymbolicLink", - "LoadDLL", - "LoadGetAddrInfo", - "LoadLibrary", - "LoadSetFileCompletionNotificationModes", - "LocalFree", - "Log2phys_t", - "LookupAccountName", - "LookupAccountSid", - "LookupSID", - "LsfJump", - "LsfSocket", - "LsfStmt", - "Lstat", - "MADV_AUTOSYNC", - "MADV_CAN_REUSE", - "MADV_CORE", - "MADV_DOFORK", - "MADV_DONTFORK", - "MADV_DONTNEED", - "MADV_FREE", - "MADV_FREE_REUSABLE", - "MADV_FREE_REUSE", - "MADV_HUGEPAGE", - "MADV_HWPOISON", - "MADV_MERGEABLE", - "MADV_NOCORE", - "MADV_NOHUGEPAGE", - "MADV_NORMAL", - "MADV_NOSYNC", - "MADV_PROTECT", - "MADV_RANDOM", - "MADV_REMOVE", - "MADV_SEQUENTIAL", - "MADV_SPACEAVAIL", - "MADV_UNMERGEABLE", - "MADV_WILLNEED", - "MADV_ZERO_WIRED_PAGES", - "MAP_32BIT", - "MAP_ALIGNED_SUPER", - "MAP_ALIGNMENT_16MB", - "MAP_ALIGNMENT_1TB", - "MAP_ALIGNMENT_256TB", - "MAP_ALIGNMENT_4GB", - "MAP_ALIGNMENT_64KB", - "MAP_ALIGNMENT_64PB", - "MAP_ALIGNMENT_MASK", - "MAP_ALIGNMENT_SHIFT", - "MAP_ANON", - "MAP_ANONYMOUS", - "MAP_COPY", - "MAP_DENYWRITE", - "MAP_EXECUTABLE", - "MAP_FILE", - "MAP_FIXED", - "MAP_FLAGMASK", - "MAP_GROWSDOWN", - "MAP_HASSEMAPHORE", - "MAP_HUGETLB", - "MAP_INHERIT", - "MAP_INHERIT_COPY", - "MAP_INHERIT_DEFAULT", - "MAP_INHERIT_DONATE_COPY", - "MAP_INHERIT_NONE", - "MAP_INHERIT_SHARE", - "MAP_JIT", - "MAP_LOCKED", - "MAP_NOCACHE", - "MAP_NOCORE", - "MAP_NOEXTEND", - "MAP_NONBLOCK", - "MAP_NORESERVE", - "MAP_NOSYNC", - "MAP_POPULATE", - "MAP_PREFAULT_READ", - "MAP_PRIVATE", - "MAP_RENAME", - "MAP_RESERVED0080", - "MAP_RESERVED0100", - "MAP_SHARED", - "MAP_STACK", - "MAP_TRYFIXED", - "MAP_TYPE", - "MAP_WIRED", - "MAXIMUM_REPARSE_DATA_BUFFER_SIZE", - "MAXLEN_IFDESCR", - "MAXLEN_PHYSADDR", - "MAX_ADAPTER_ADDRESS_LENGTH", - "MAX_ADAPTER_DESCRIPTION_LENGTH", - "MAX_ADAPTER_NAME_LENGTH", - "MAX_COMPUTERNAME_LENGTH", - "MAX_INTERFACE_NAME_LEN", - "MAX_LONG_PATH", - "MAX_PATH", - "MAX_PROTOCOL_CHAIN", - "MCL_CURRENT", - "MCL_FUTURE", - "MNT_DETACH", - "MNT_EXPIRE", - "MNT_FORCE", - "MSG_BCAST", - "MSG_CMSG_CLOEXEC", - "MSG_COMPAT", - "MSG_CONFIRM", - "MSG_CONTROLMBUF", - "MSG_CTRUNC", - "MSG_DONTROUTE", - "MSG_DONTWAIT", - "MSG_EOF", - "MSG_EOR", - "MSG_ERRQUEUE", - "MSG_FASTOPEN", - "MSG_FIN", - "MSG_FLUSH", - "MSG_HAVEMORE", - "MSG_HOLD", - "MSG_IOVUSRSPACE", - "MSG_LENUSRSPACE", - "MSG_MCAST", - "MSG_MORE", - "MSG_NAMEMBUF", - "MSG_NBIO", - "MSG_NEEDSA", - "MSG_NOSIGNAL", - "MSG_NOTIFICATION", - "MSG_OOB", - "MSG_PEEK", - "MSG_PROXY", - "MSG_RCVMORE", - "MSG_RST", - "MSG_SEND", - "MSG_SYN", - "MSG_TRUNC", - "MSG_TRYHARD", - "MSG_USERFLAGS", - "MSG_WAITALL", - "MSG_WAITFORONE", - "MSG_WAITSTREAM", - "MS_ACTIVE", - "MS_ASYNC", - "MS_BIND", - "MS_DEACTIVATE", - "MS_DIRSYNC", - "MS_INVALIDATE", - "MS_I_VERSION", - "MS_KERNMOUNT", - "MS_KILLPAGES", - "MS_MANDLOCK", - "MS_MGC_MSK", - "MS_MGC_VAL", - "MS_MOVE", - "MS_NOATIME", - "MS_NODEV", - "MS_NODIRATIME", - "MS_NOEXEC", - "MS_NOSUID", - "MS_NOUSER", - "MS_POSIXACL", - "MS_PRIVATE", - "MS_RDONLY", - "MS_REC", - "MS_RELATIME", - "MS_REMOUNT", - "MS_RMT_MASK", - "MS_SHARED", - "MS_SILENT", - "MS_SLAVE", - "MS_STRICTATIME", - "MS_SYNC", - "MS_SYNCHRONOUS", - "MS_UNBINDABLE", - "Madvise", - "MapViewOfFile", - "MaxTokenInfoClass", - "Mclpool", - "MibIfRow", - "Mkdir", - "Mkdirat", - "Mkfifo", - "Mknod", - "Mknodat", - "Mlock", - "Mlockall", - "Mmap", - "Mount", - "MoveFile", - "Mprotect", - "Msghdr", - "Munlock", - "Munlockall", - "Munmap", - "MustLoadDLL", - "NAME_MAX", - "NETLINK_ADD_MEMBERSHIP", - "NETLINK_AUDIT", - "NETLINK_BROADCAST_ERROR", - "NETLINK_CONNECTOR", - "NETLINK_DNRTMSG", - "NETLINK_DROP_MEMBERSHIP", - "NETLINK_ECRYPTFS", - "NETLINK_FIB_LOOKUP", - "NETLINK_FIREWALL", - "NETLINK_GENERIC", - "NETLINK_INET_DIAG", - "NETLINK_IP6_FW", - "NETLINK_ISCSI", - "NETLINK_KOBJECT_UEVENT", - "NETLINK_NETFILTER", - "NETLINK_NFLOG", - "NETLINK_NO_ENOBUFS", - "NETLINK_PKTINFO", - "NETLINK_RDMA", - "NETLINK_ROUTE", - "NETLINK_SCSITRANSPORT", - "NETLINK_SELINUX", - "NETLINK_UNUSED", - "NETLINK_USERSOCK", - "NETLINK_XFRM", - "NET_RT_DUMP", - "NET_RT_DUMP2", - "NET_RT_FLAGS", - "NET_RT_IFLIST", - "NET_RT_IFLIST2", - "NET_RT_IFLISTL", - "NET_RT_IFMALIST", - "NET_RT_MAXID", - "NET_RT_OIFLIST", - "NET_RT_OOIFLIST", - "NET_RT_STAT", - "NET_RT_STATS", - "NET_RT_TABLE", - "NET_RT_TRASH", - "NLA_ALIGNTO", - "NLA_F_NESTED", - "NLA_F_NET_BYTEORDER", - "NLA_HDRLEN", - "NLMSG_ALIGNTO", - "NLMSG_DONE", - "NLMSG_ERROR", - "NLMSG_HDRLEN", - "NLMSG_MIN_TYPE", - "NLMSG_NOOP", - "NLMSG_OVERRUN", - "NLM_F_ACK", - "NLM_F_APPEND", - "NLM_F_ATOMIC", - "NLM_F_CREATE", - "NLM_F_DUMP", - "NLM_F_ECHO", - "NLM_F_EXCL", - "NLM_F_MATCH", - "NLM_F_MULTI", - "NLM_F_REPLACE", - "NLM_F_REQUEST", - "NLM_F_ROOT", - "NOFLSH", - "NOTE_ABSOLUTE", - "NOTE_ATTRIB", - "NOTE_BACKGROUND", - "NOTE_CHILD", - "NOTE_CRITICAL", - "NOTE_DELETE", - "NOTE_EOF", - "NOTE_EXEC", - "NOTE_EXIT", - "NOTE_EXITSTATUS", - "NOTE_EXIT_CSERROR", - "NOTE_EXIT_DECRYPTFAIL", - "NOTE_EXIT_DETAIL", - "NOTE_EXIT_DETAIL_MASK", - "NOTE_EXIT_MEMORY", - "NOTE_EXIT_REPARENTED", - "NOTE_EXTEND", - "NOTE_FFAND", - "NOTE_FFCOPY", - "NOTE_FFCTRLMASK", - "NOTE_FFLAGSMASK", - "NOTE_FFNOP", - "NOTE_FFOR", - "NOTE_FORK", - "NOTE_LEEWAY", - "NOTE_LINK", - "NOTE_LOWAT", - "NOTE_NONE", - "NOTE_NSECONDS", - "NOTE_PCTRLMASK", - "NOTE_PDATAMASK", - "NOTE_REAP", - "NOTE_RENAME", - "NOTE_RESOURCEEND", - "NOTE_REVOKE", - "NOTE_SECONDS", - "NOTE_SIGNAL", - "NOTE_TRACK", - "NOTE_TRACKERR", - "NOTE_TRIGGER", - "NOTE_TRUNCATE", - "NOTE_USECONDS", - "NOTE_VM_ERROR", - "NOTE_VM_PRESSURE", - "NOTE_VM_PRESSURE_SUDDEN_TERMINATE", - "NOTE_VM_PRESSURE_TERMINATE", - "NOTE_WRITE", - "NameCanonical", - "NameCanonicalEx", - "NameDisplay", - "NameDnsDomain", - "NameFullyQualifiedDN", - "NameSamCompatible", - "NameServicePrincipal", - "NameUniqueId", - "NameUnknown", - "NameUserPrincipal", - "Nanosleep", - "NetApiBufferFree", - "NetGetJoinInformation", - "NetSetupDomainName", - "NetSetupUnjoined", - "NetSetupUnknownStatus", - "NetSetupWorkgroupName", - "NetUserGetInfo", - "NetlinkMessage", - "NetlinkRIB", - "NetlinkRouteAttr", - "NetlinkRouteRequest", - "NewCallback", - "NewCallbackCDecl", - "NewLazyDLL", - "NlAttr", - "NlMsgerr", - "NlMsghdr", - "NsecToFiletime", - "NsecToTimespec", - "NsecToTimeval", - "Ntohs", - "OCRNL", - "OFDEL", - "OFILL", - "OFIOGETBMAP", - "OID_PKIX_KP_SERVER_AUTH", - "OID_SERVER_GATED_CRYPTO", - "OID_SGC_NETSCAPE", - "OLCUC", - "ONLCR", - "ONLRET", - "ONOCR", - "ONOEOT", - "OPEN_ALWAYS", - "OPEN_EXISTING", - "OPOST", - "O_ACCMODE", - "O_ALERT", - "O_ALT_IO", - "O_APPEND", - "O_ASYNC", - "O_CLOEXEC", - "O_CREAT", - "O_DIRECT", - "O_DIRECTORY", - "O_DP_GETRAWENCRYPTED", - "O_DSYNC", - "O_EVTONLY", - "O_EXCL", - "O_EXEC", - "O_EXLOCK", - "O_FSYNC", - "O_LARGEFILE", - "O_NDELAY", - "O_NOATIME", - "O_NOCTTY", - "O_NOFOLLOW", - "O_NONBLOCK", - "O_NOSIGPIPE", - "O_POPUP", - "O_RDONLY", - "O_RDWR", - "O_RSYNC", - "O_SHLOCK", - "O_SYMLINK", - "O_SYNC", - "O_TRUNC", - "O_TTY_INIT", - "O_WRONLY", - "Open", - "OpenCurrentProcessToken", - "OpenProcess", - "OpenProcessToken", - "Openat", - "Overlapped", - "PACKET_ADD_MEMBERSHIP", - "PACKET_BROADCAST", - "PACKET_DROP_MEMBERSHIP", - "PACKET_FASTROUTE", - "PACKET_HOST", - "PACKET_LOOPBACK", - "PACKET_MR_ALLMULTI", - "PACKET_MR_MULTICAST", - "PACKET_MR_PROMISC", - "PACKET_MULTICAST", - "PACKET_OTHERHOST", - "PACKET_OUTGOING", - "PACKET_RECV_OUTPUT", - "PACKET_RX_RING", - "PACKET_STATISTICS", - "PAGE_EXECUTE_READ", - "PAGE_EXECUTE_READWRITE", - "PAGE_EXECUTE_WRITECOPY", - "PAGE_READONLY", - "PAGE_READWRITE", - "PAGE_WRITECOPY", - "PARENB", - "PARMRK", - "PARODD", - "PENDIN", - "PFL_HIDDEN", - "PFL_MATCHES_PROTOCOL_ZERO", - "PFL_MULTIPLE_PROTO_ENTRIES", - "PFL_NETWORKDIRECT_PROVIDER", - "PFL_RECOMMENDED_PROTO_ENTRY", - "PF_FLUSH", - "PKCS_7_ASN_ENCODING", - "PMC5_PIPELINE_FLUSH", - "PRIO_PGRP", - "PRIO_PROCESS", - "PRIO_USER", - "PRI_IOFLUSH", - "PROCESS_QUERY_INFORMATION", - "PROCESS_TERMINATE", - "PROT_EXEC", - "PROT_GROWSDOWN", - "PROT_GROWSUP", - "PROT_NONE", - "PROT_READ", - "PROT_WRITE", - "PROV_DH_SCHANNEL", - "PROV_DSS", - "PROV_DSS_DH", - "PROV_EC_ECDSA_FULL", - "PROV_EC_ECDSA_SIG", - "PROV_EC_ECNRA_FULL", - "PROV_EC_ECNRA_SIG", - "PROV_FORTEZZA", - "PROV_INTEL_SEC", - "PROV_MS_EXCHANGE", - "PROV_REPLACE_OWF", - "PROV_RNG", - "PROV_RSA_AES", - "PROV_RSA_FULL", - "PROV_RSA_SCHANNEL", - "PROV_RSA_SIG", - "PROV_SPYRUS_LYNKS", - "PROV_SSL", - "PR_CAPBSET_DROP", - "PR_CAPBSET_READ", - "PR_CLEAR_SECCOMP_FILTER", - "PR_ENDIAN_BIG", - "PR_ENDIAN_LITTLE", - "PR_ENDIAN_PPC_LITTLE", - "PR_FPEMU_NOPRINT", - "PR_FPEMU_SIGFPE", - "PR_FP_EXC_ASYNC", - "PR_FP_EXC_DISABLED", - "PR_FP_EXC_DIV", - "PR_FP_EXC_INV", - "PR_FP_EXC_NONRECOV", - "PR_FP_EXC_OVF", - "PR_FP_EXC_PRECISE", - "PR_FP_EXC_RES", - "PR_FP_EXC_SW_ENABLE", - "PR_FP_EXC_UND", - "PR_GET_DUMPABLE", - "PR_GET_ENDIAN", - "PR_GET_FPEMU", - "PR_GET_FPEXC", - "PR_GET_KEEPCAPS", - "PR_GET_NAME", - "PR_GET_PDEATHSIG", - "PR_GET_SECCOMP", - "PR_GET_SECCOMP_FILTER", - "PR_GET_SECUREBITS", - "PR_GET_TIMERSLACK", - "PR_GET_TIMING", - "PR_GET_TSC", - "PR_GET_UNALIGN", - "PR_MCE_KILL", - "PR_MCE_KILL_CLEAR", - "PR_MCE_KILL_DEFAULT", - "PR_MCE_KILL_EARLY", - "PR_MCE_KILL_GET", - "PR_MCE_KILL_LATE", - "PR_MCE_KILL_SET", - "PR_SECCOMP_FILTER_EVENT", - "PR_SECCOMP_FILTER_SYSCALL", - "PR_SET_DUMPABLE", - "PR_SET_ENDIAN", - "PR_SET_FPEMU", - "PR_SET_FPEXC", - "PR_SET_KEEPCAPS", - "PR_SET_NAME", - "PR_SET_PDEATHSIG", - "PR_SET_PTRACER", - "PR_SET_SECCOMP", - "PR_SET_SECCOMP_FILTER", - "PR_SET_SECUREBITS", - "PR_SET_TIMERSLACK", - "PR_SET_TIMING", - "PR_SET_TSC", - "PR_SET_UNALIGN", - "PR_TASK_PERF_EVENTS_DISABLE", - "PR_TASK_PERF_EVENTS_ENABLE", - "PR_TIMING_STATISTICAL", - "PR_TIMING_TIMESTAMP", - "PR_TSC_ENABLE", - "PR_TSC_SIGSEGV", - "PR_UNALIGN_NOPRINT", - "PR_UNALIGN_SIGBUS", - "PTRACE_ARCH_PRCTL", - "PTRACE_ATTACH", - "PTRACE_CONT", - "PTRACE_DETACH", - "PTRACE_EVENT_CLONE", - "PTRACE_EVENT_EXEC", - "PTRACE_EVENT_EXIT", - "PTRACE_EVENT_FORK", - "PTRACE_EVENT_VFORK", - "PTRACE_EVENT_VFORK_DONE", - "PTRACE_GETCRUNCHREGS", - "PTRACE_GETEVENTMSG", - "PTRACE_GETFPREGS", - "PTRACE_GETFPXREGS", - "PTRACE_GETHBPREGS", - "PTRACE_GETREGS", - "PTRACE_GETREGSET", - "PTRACE_GETSIGINFO", - "PTRACE_GETVFPREGS", - "PTRACE_GETWMMXREGS", - "PTRACE_GET_THREAD_AREA", - "PTRACE_KILL", - "PTRACE_OLDSETOPTIONS", - "PTRACE_O_MASK", - "PTRACE_O_TRACECLONE", - "PTRACE_O_TRACEEXEC", - "PTRACE_O_TRACEEXIT", - "PTRACE_O_TRACEFORK", - "PTRACE_O_TRACESYSGOOD", - "PTRACE_O_TRACEVFORK", - "PTRACE_O_TRACEVFORKDONE", - "PTRACE_PEEKDATA", - "PTRACE_PEEKTEXT", - "PTRACE_PEEKUSR", - "PTRACE_POKEDATA", - "PTRACE_POKETEXT", - "PTRACE_POKEUSR", - "PTRACE_SETCRUNCHREGS", - "PTRACE_SETFPREGS", - "PTRACE_SETFPXREGS", - "PTRACE_SETHBPREGS", - "PTRACE_SETOPTIONS", - "PTRACE_SETREGS", - "PTRACE_SETREGSET", - "PTRACE_SETSIGINFO", - "PTRACE_SETVFPREGS", - "PTRACE_SETWMMXREGS", - "PTRACE_SET_SYSCALL", - "PTRACE_SET_THREAD_AREA", - "PTRACE_SINGLEBLOCK", - "PTRACE_SINGLESTEP", - "PTRACE_SYSCALL", - "PTRACE_SYSEMU", - "PTRACE_SYSEMU_SINGLESTEP", - "PTRACE_TRACEME", - "PT_ATTACH", - "PT_ATTACHEXC", - "PT_CONTINUE", - "PT_DATA_ADDR", - "PT_DENY_ATTACH", - "PT_DETACH", - "PT_FIRSTMACH", - "PT_FORCEQUOTA", - "PT_KILL", - "PT_MASK", - "PT_READ_D", - "PT_READ_I", - "PT_READ_U", - "PT_SIGEXC", - "PT_STEP", - "PT_TEXT_ADDR", - "PT_TEXT_END_ADDR", - "PT_THUPDATE", - "PT_TRACE_ME", - "PT_WRITE_D", - "PT_WRITE_I", - "PT_WRITE_U", - "ParseDirent", - "ParseNetlinkMessage", - "ParseNetlinkRouteAttr", - "ParseRoutingMessage", - "ParseRoutingSockaddr", - "ParseSocketControlMessage", - "ParseUnixCredentials", - "ParseUnixRights", - "PathMax", - "Pathconf", - "Pause", - "Pipe", - "Pipe2", - "PivotRoot", - "Pointer", - "PostQueuedCompletionStatus", - "Pread", - "Proc", - "ProcAttr", - "Process32First", - "Process32Next", - "ProcessEntry32", - "ProcessInformation", - "Protoent", - "PtraceAttach", - "PtraceCont", - "PtraceDetach", - "PtraceGetEventMsg", - "PtraceGetRegs", - "PtracePeekData", - "PtracePeekText", - "PtracePokeData", - "PtracePokeText", - "PtraceRegs", - "PtraceSetOptions", - "PtraceSetRegs", - "PtraceSingleStep", - "PtraceSyscall", - "Pwrite", - "REG_BINARY", - "REG_DWORD", - "REG_DWORD_BIG_ENDIAN", - "REG_DWORD_LITTLE_ENDIAN", - "REG_EXPAND_SZ", - "REG_FULL_RESOURCE_DESCRIPTOR", - "REG_LINK", - "REG_MULTI_SZ", - "REG_NONE", - "REG_QWORD", - "REG_QWORD_LITTLE_ENDIAN", - "REG_RESOURCE_LIST", - "REG_RESOURCE_REQUIREMENTS_LIST", - "REG_SZ", - "RLIMIT_AS", - "RLIMIT_CORE", - "RLIMIT_CPU", - "RLIMIT_CPU_USAGE_MONITOR", - "RLIMIT_DATA", - "RLIMIT_FSIZE", - "RLIMIT_NOFILE", - "RLIMIT_STACK", - "RLIM_INFINITY", - "RTAX_ADVMSS", - "RTAX_AUTHOR", - "RTAX_BRD", - "RTAX_CWND", - "RTAX_DST", - "RTAX_FEATURES", - "RTAX_FEATURE_ALLFRAG", - "RTAX_FEATURE_ECN", - "RTAX_FEATURE_SACK", - "RTAX_FEATURE_TIMESTAMP", - "RTAX_GATEWAY", - "RTAX_GENMASK", - "RTAX_HOPLIMIT", - "RTAX_IFA", - "RTAX_IFP", - "RTAX_INITCWND", - "RTAX_INITRWND", - "RTAX_LABEL", - "RTAX_LOCK", - "RTAX_MAX", - "RTAX_MTU", - "RTAX_NETMASK", - "RTAX_REORDERING", - "RTAX_RTO_MIN", - "RTAX_RTT", - "RTAX_RTTVAR", - "RTAX_SRC", - "RTAX_SRCMASK", - "RTAX_SSTHRESH", - "RTAX_TAG", - "RTAX_UNSPEC", - "RTAX_WINDOW", - "RTA_ALIGNTO", - "RTA_AUTHOR", - "RTA_BRD", - "RTA_CACHEINFO", - "RTA_DST", - "RTA_FLOW", - "RTA_GATEWAY", - "RTA_GENMASK", - "RTA_IFA", - "RTA_IFP", - "RTA_IIF", - "RTA_LABEL", - "RTA_MAX", - "RTA_METRICS", - "RTA_MULTIPATH", - "RTA_NETMASK", - "RTA_OIF", - "RTA_PREFSRC", - "RTA_PRIORITY", - "RTA_SRC", - "RTA_SRCMASK", - "RTA_TABLE", - "RTA_TAG", - "RTA_UNSPEC", - "RTCF_DIRECTSRC", - "RTCF_DOREDIRECT", - "RTCF_LOG", - "RTCF_MASQ", - "RTCF_NAT", - "RTCF_VALVE", - "RTF_ADDRCLASSMASK", - "RTF_ADDRCONF", - "RTF_ALLONLINK", - "RTF_ANNOUNCE", - "RTF_BLACKHOLE", - "RTF_BROADCAST", - "RTF_CACHE", - "RTF_CLONED", - "RTF_CLONING", - "RTF_CONDEMNED", - "RTF_DEFAULT", - "RTF_DELCLONE", - "RTF_DONE", - "RTF_DYNAMIC", - "RTF_FLOW", - "RTF_FMASK", - "RTF_GATEWAY", - "RTF_GWFLAG_COMPAT", - "RTF_HOST", - "RTF_IFREF", - "RTF_IFSCOPE", - "RTF_INTERFACE", - "RTF_IRTT", - "RTF_LINKRT", - "RTF_LLDATA", - "RTF_LLINFO", - "RTF_LOCAL", - "RTF_MASK", - "RTF_MODIFIED", - "RTF_MPATH", - "RTF_MPLS", - "RTF_MSS", - "RTF_MTU", - "RTF_MULTICAST", - "RTF_NAT", - "RTF_NOFORWARD", - "RTF_NONEXTHOP", - "RTF_NOPMTUDISC", - "RTF_PERMANENT_ARP", - "RTF_PINNED", - "RTF_POLICY", - "RTF_PRCLONING", - "RTF_PROTO1", - "RTF_PROTO2", - "RTF_PROTO3", - "RTF_PROXY", - "RTF_REINSTATE", - "RTF_REJECT", - "RTF_RNH_LOCKED", - "RTF_ROUTER", - "RTF_SOURCE", - "RTF_SRC", - "RTF_STATIC", - "RTF_STICKY", - "RTF_THROW", - "RTF_TUNNEL", - "RTF_UP", - "RTF_USETRAILERS", - "RTF_WASCLONED", - "RTF_WINDOW", - "RTF_XRESOLVE", - "RTM_ADD", - "RTM_BASE", - "RTM_CHANGE", - "RTM_CHGADDR", - "RTM_DELACTION", - "RTM_DELADDR", - "RTM_DELADDRLABEL", - "RTM_DELETE", - "RTM_DELLINK", - "RTM_DELMADDR", - "RTM_DELNEIGH", - "RTM_DELQDISC", - "RTM_DELROUTE", - "RTM_DELRULE", - "RTM_DELTCLASS", - "RTM_DELTFILTER", - "RTM_DESYNC", - "RTM_F_CLONED", - "RTM_F_EQUALIZE", - "RTM_F_NOTIFY", - "RTM_F_PREFIX", - "RTM_GET", - "RTM_GET2", - "RTM_GETACTION", - "RTM_GETADDR", - "RTM_GETADDRLABEL", - "RTM_GETANYCAST", - "RTM_GETDCB", - "RTM_GETLINK", - "RTM_GETMULTICAST", - "RTM_GETNEIGH", - "RTM_GETNEIGHTBL", - "RTM_GETQDISC", - "RTM_GETROUTE", - "RTM_GETRULE", - "RTM_GETTCLASS", - "RTM_GETTFILTER", - "RTM_IEEE80211", - "RTM_IFANNOUNCE", - "RTM_IFINFO", - "RTM_IFINFO2", - "RTM_LLINFO_UPD", - "RTM_LOCK", - "RTM_LOSING", - "RTM_MAX", - "RTM_MAXSIZE", - "RTM_MISS", - "RTM_NEWACTION", - "RTM_NEWADDR", - "RTM_NEWADDRLABEL", - "RTM_NEWLINK", - "RTM_NEWMADDR", - "RTM_NEWMADDR2", - "RTM_NEWNDUSEROPT", - "RTM_NEWNEIGH", - "RTM_NEWNEIGHTBL", - "RTM_NEWPREFIX", - "RTM_NEWQDISC", - "RTM_NEWROUTE", - "RTM_NEWRULE", - "RTM_NEWTCLASS", - "RTM_NEWTFILTER", - "RTM_NR_FAMILIES", - "RTM_NR_MSGTYPES", - "RTM_OIFINFO", - "RTM_OLDADD", - "RTM_OLDDEL", - "RTM_OOIFINFO", - "RTM_REDIRECT", - "RTM_RESOLVE", - "RTM_RTTUNIT", - "RTM_SETDCB", - "RTM_SETGATE", - "RTM_SETLINK", - "RTM_SETNEIGHTBL", - "RTM_VERSION", - "RTNH_ALIGNTO", - "RTNH_F_DEAD", - "RTNH_F_ONLINK", - "RTNH_F_PERVASIVE", - "RTNLGRP_IPV4_IFADDR", - "RTNLGRP_IPV4_MROUTE", - "RTNLGRP_IPV4_ROUTE", - "RTNLGRP_IPV4_RULE", - "RTNLGRP_IPV6_IFADDR", - "RTNLGRP_IPV6_IFINFO", - "RTNLGRP_IPV6_MROUTE", - "RTNLGRP_IPV6_PREFIX", - "RTNLGRP_IPV6_ROUTE", - "RTNLGRP_IPV6_RULE", - "RTNLGRP_LINK", - "RTNLGRP_ND_USEROPT", - "RTNLGRP_NEIGH", - "RTNLGRP_NONE", - "RTNLGRP_NOTIFY", - "RTNLGRP_TC", - "RTN_ANYCAST", - "RTN_BLACKHOLE", - "RTN_BROADCAST", - "RTN_LOCAL", - "RTN_MAX", - "RTN_MULTICAST", - "RTN_NAT", - "RTN_PROHIBIT", - "RTN_THROW", - "RTN_UNICAST", - "RTN_UNREACHABLE", - "RTN_UNSPEC", - "RTN_XRESOLVE", - "RTPROT_BIRD", - "RTPROT_BOOT", - "RTPROT_DHCP", - "RTPROT_DNROUTED", - "RTPROT_GATED", - "RTPROT_KERNEL", - "RTPROT_MRT", - "RTPROT_NTK", - "RTPROT_RA", - "RTPROT_REDIRECT", - "RTPROT_STATIC", - "RTPROT_UNSPEC", - "RTPROT_XORP", - "RTPROT_ZEBRA", - "RTV_EXPIRE", - "RTV_HOPCOUNT", - "RTV_MTU", - "RTV_RPIPE", - "RTV_RTT", - "RTV_RTTVAR", - "RTV_SPIPE", - "RTV_SSTHRESH", - "RTV_WEIGHT", - "RT_CACHING_CONTEXT", - "RT_CLASS_DEFAULT", - "RT_CLASS_LOCAL", - "RT_CLASS_MAIN", - "RT_CLASS_MAX", - "RT_CLASS_UNSPEC", - "RT_DEFAULT_FIB", - "RT_NORTREF", - "RT_SCOPE_HOST", - "RT_SCOPE_LINK", - "RT_SCOPE_NOWHERE", - "RT_SCOPE_SITE", - "RT_SCOPE_UNIVERSE", - "RT_TABLEID_MAX", - "RT_TABLE_COMPAT", - "RT_TABLE_DEFAULT", - "RT_TABLE_LOCAL", - "RT_TABLE_MAIN", - "RT_TABLE_MAX", - "RT_TABLE_UNSPEC", - "RUSAGE_CHILDREN", - "RUSAGE_SELF", - "RUSAGE_THREAD", - "Radvisory_t", - "RawConn", - "RawSockaddr", - "RawSockaddrAny", - "RawSockaddrDatalink", - "RawSockaddrInet4", - "RawSockaddrInet6", - "RawSockaddrLinklayer", - "RawSockaddrNetlink", - "RawSockaddrUnix", - "RawSyscall", - "RawSyscall6", - "Read", - "ReadConsole", - "ReadDirectoryChanges", - "ReadDirent", - "ReadFile", - "Readlink", - "Reboot", - "Recvfrom", - "Recvmsg", - "RegCloseKey", - "RegEnumKeyEx", - "RegOpenKeyEx", - "RegQueryInfoKey", - "RegQueryValueEx", - "RemoveDirectory", - "Removexattr", - "Rename", - "Renameat", - "Revoke", - "Rlimit", - "Rmdir", - "RouteMessage", - "RouteRIB", - "RoutingMessage", - "RtAttr", - "RtGenmsg", - "RtMetrics", - "RtMsg", - "RtMsghdr", - "RtNexthop", - "Rusage", - "SCM_BINTIME", - "SCM_CREDENTIALS", - "SCM_CREDS", - "SCM_RIGHTS", - "SCM_TIMESTAMP", - "SCM_TIMESTAMPING", - "SCM_TIMESTAMPNS", - "SCM_TIMESTAMP_MONOTONIC", - "SHUT_RD", - "SHUT_RDWR", - "SHUT_WR", - "SID", - "SIDAndAttributes", - "SIGABRT", - "SIGALRM", - "SIGBUS", - "SIGCHLD", - "SIGCLD", - "SIGCONT", - "SIGEMT", - "SIGFPE", - "SIGHUP", - "SIGILL", - "SIGINFO", - "SIGINT", - "SIGIO", - "SIGIOT", - "SIGKILL", - "SIGLIBRT", - "SIGLWP", - "SIGPIPE", - "SIGPOLL", - "SIGPROF", - "SIGPWR", - "SIGQUIT", - "SIGSEGV", - "SIGSTKFLT", - "SIGSTOP", - "SIGSYS", - "SIGTERM", - "SIGTHR", - "SIGTRAP", - "SIGTSTP", - "SIGTTIN", - "SIGTTOU", - "SIGUNUSED", - "SIGURG", - "SIGUSR1", - "SIGUSR2", - "SIGVTALRM", - "SIGWINCH", - "SIGXCPU", - "SIGXFSZ", - "SIOCADDDLCI", - "SIOCADDMULTI", - "SIOCADDRT", - "SIOCAIFADDR", - "SIOCAIFGROUP", - "SIOCALIFADDR", - "SIOCARPIPLL", - "SIOCATMARK", - "SIOCAUTOADDR", - "SIOCAUTONETMASK", - "SIOCBRDGADD", - "SIOCBRDGADDS", - "SIOCBRDGARL", - "SIOCBRDGDADDR", - "SIOCBRDGDEL", - "SIOCBRDGDELS", - "SIOCBRDGFLUSH", - "SIOCBRDGFRL", - "SIOCBRDGGCACHE", - "SIOCBRDGGFD", - "SIOCBRDGGHT", - "SIOCBRDGGIFFLGS", - "SIOCBRDGGMA", - "SIOCBRDGGPARAM", - "SIOCBRDGGPRI", - "SIOCBRDGGRL", - "SIOCBRDGGSIFS", - "SIOCBRDGGTO", - "SIOCBRDGIFS", - "SIOCBRDGRTS", - "SIOCBRDGSADDR", - "SIOCBRDGSCACHE", - "SIOCBRDGSFD", - "SIOCBRDGSHT", - "SIOCBRDGSIFCOST", - "SIOCBRDGSIFFLGS", - "SIOCBRDGSIFPRIO", - "SIOCBRDGSMA", - "SIOCBRDGSPRI", - "SIOCBRDGSPROTO", - "SIOCBRDGSTO", - "SIOCBRDGSTXHC", - "SIOCDARP", - "SIOCDELDLCI", - "SIOCDELMULTI", - "SIOCDELRT", - "SIOCDEVPRIVATE", - "SIOCDIFADDR", - "SIOCDIFGROUP", - "SIOCDIFPHYADDR", - "SIOCDLIFADDR", - "SIOCDRARP", - "SIOCGARP", - "SIOCGDRVSPEC", - "SIOCGETKALIVE", - "SIOCGETLABEL", - "SIOCGETPFLOW", - "SIOCGETPFSYNC", - "SIOCGETSGCNT", - "SIOCGETVIFCNT", - "SIOCGETVLAN", - "SIOCGHIWAT", - "SIOCGIFADDR", - "SIOCGIFADDRPREF", - "SIOCGIFALIAS", - "SIOCGIFALTMTU", - "SIOCGIFASYNCMAP", - "SIOCGIFBOND", - "SIOCGIFBR", - "SIOCGIFBRDADDR", - "SIOCGIFCAP", - "SIOCGIFCONF", - "SIOCGIFCOUNT", - "SIOCGIFDATA", - "SIOCGIFDESCR", - "SIOCGIFDEVMTU", - "SIOCGIFDLT", - "SIOCGIFDSTADDR", - "SIOCGIFENCAP", - "SIOCGIFFIB", - "SIOCGIFFLAGS", - "SIOCGIFGATTR", - "SIOCGIFGENERIC", - "SIOCGIFGMEMB", - "SIOCGIFGROUP", - "SIOCGIFHARDMTU", - "SIOCGIFHWADDR", - "SIOCGIFINDEX", - "SIOCGIFKPI", - "SIOCGIFMAC", - "SIOCGIFMAP", - "SIOCGIFMEDIA", - "SIOCGIFMEM", - "SIOCGIFMETRIC", - "SIOCGIFMTU", - "SIOCGIFNAME", - "SIOCGIFNETMASK", - "SIOCGIFPDSTADDR", - "SIOCGIFPFLAGS", - "SIOCGIFPHYS", - "SIOCGIFPRIORITY", - "SIOCGIFPSRCADDR", - "SIOCGIFRDOMAIN", - "SIOCGIFRTLABEL", - "SIOCGIFSLAVE", - "SIOCGIFSTATUS", - "SIOCGIFTIMESLOT", - "SIOCGIFTXQLEN", - "SIOCGIFVLAN", - "SIOCGIFWAKEFLAGS", - "SIOCGIFXFLAGS", - "SIOCGLIFADDR", - "SIOCGLIFPHYADDR", - "SIOCGLIFPHYRTABLE", - "SIOCGLIFPHYTTL", - "SIOCGLINKSTR", - "SIOCGLOWAT", - "SIOCGPGRP", - "SIOCGPRIVATE_0", - "SIOCGPRIVATE_1", - "SIOCGRARP", - "SIOCGSPPPPARAMS", - "SIOCGSTAMP", - "SIOCGSTAMPNS", - "SIOCGVH", - "SIOCGVNETID", - "SIOCIFCREATE", - "SIOCIFCREATE2", - "SIOCIFDESTROY", - "SIOCIFGCLONERS", - "SIOCINITIFADDR", - "SIOCPROTOPRIVATE", - "SIOCRSLVMULTI", - "SIOCRTMSG", - "SIOCSARP", - "SIOCSDRVSPEC", - "SIOCSETKALIVE", - "SIOCSETLABEL", - "SIOCSETPFLOW", - "SIOCSETPFSYNC", - "SIOCSETVLAN", - "SIOCSHIWAT", - "SIOCSIFADDR", - "SIOCSIFADDRPREF", - "SIOCSIFALTMTU", - "SIOCSIFASYNCMAP", - "SIOCSIFBOND", - "SIOCSIFBR", - "SIOCSIFBRDADDR", - "SIOCSIFCAP", - "SIOCSIFDESCR", - "SIOCSIFDSTADDR", - "SIOCSIFENCAP", - "SIOCSIFFIB", - "SIOCSIFFLAGS", - "SIOCSIFGATTR", - "SIOCSIFGENERIC", - "SIOCSIFHWADDR", - "SIOCSIFHWBROADCAST", - "SIOCSIFKPI", - "SIOCSIFLINK", - "SIOCSIFLLADDR", - "SIOCSIFMAC", - "SIOCSIFMAP", - "SIOCSIFMEDIA", - "SIOCSIFMEM", - "SIOCSIFMETRIC", - "SIOCSIFMTU", - "SIOCSIFNAME", - "SIOCSIFNETMASK", - "SIOCSIFPFLAGS", - "SIOCSIFPHYADDR", - "SIOCSIFPHYS", - "SIOCSIFPRIORITY", - "SIOCSIFRDOMAIN", - "SIOCSIFRTLABEL", - "SIOCSIFRVNET", - "SIOCSIFSLAVE", - "SIOCSIFTIMESLOT", - "SIOCSIFTXQLEN", - "SIOCSIFVLAN", - "SIOCSIFVNET", - "SIOCSIFXFLAGS", - "SIOCSLIFPHYADDR", - "SIOCSLIFPHYRTABLE", - "SIOCSLIFPHYTTL", - "SIOCSLINKSTR", - "SIOCSLOWAT", - "SIOCSPGRP", - "SIOCSRARP", - "SIOCSSPPPPARAMS", - "SIOCSVH", - "SIOCSVNETID", - "SIOCZIFDATA", - "SIO_GET_EXTENSION_FUNCTION_POINTER", - "SIO_GET_INTERFACE_LIST", - "SIO_KEEPALIVE_VALS", - "SIO_UDP_CONNRESET", - "SOCK_CLOEXEC", - "SOCK_DCCP", - "SOCK_DGRAM", - "SOCK_FLAGS_MASK", - "SOCK_MAXADDRLEN", - "SOCK_NONBLOCK", - "SOCK_NOSIGPIPE", - "SOCK_PACKET", - "SOCK_RAW", - "SOCK_RDM", - "SOCK_SEQPACKET", - "SOCK_STREAM", - "SOL_AAL", - "SOL_ATM", - "SOL_DECNET", - "SOL_ICMPV6", - "SOL_IP", - "SOL_IPV6", - "SOL_IRDA", - "SOL_PACKET", - "SOL_RAW", - "SOL_SOCKET", - "SOL_TCP", - "SOL_X25", - "SOMAXCONN", - "SO_ACCEPTCONN", - "SO_ACCEPTFILTER", - "SO_ATTACH_FILTER", - "SO_BINDANY", - "SO_BINDTODEVICE", - "SO_BINTIME", - "SO_BROADCAST", - "SO_BSDCOMPAT", - "SO_DEBUG", - "SO_DETACH_FILTER", - "SO_DOMAIN", - "SO_DONTROUTE", - "SO_DONTTRUNC", - "SO_ERROR", - "SO_KEEPALIVE", - "SO_LABEL", - "SO_LINGER", - "SO_LINGER_SEC", - "SO_LISTENINCQLEN", - "SO_LISTENQLEN", - "SO_LISTENQLIMIT", - "SO_MARK", - "SO_NETPROC", - "SO_NKE", - "SO_NOADDRERR", - "SO_NOHEADER", - "SO_NOSIGPIPE", - "SO_NOTIFYCONFLICT", - "SO_NO_CHECK", - "SO_NO_DDP", - "SO_NO_OFFLOAD", - "SO_NP_EXTENSIONS", - "SO_NREAD", - "SO_NUMRCVPKT", - "SO_NWRITE", - "SO_OOBINLINE", - "SO_OVERFLOWED", - "SO_PASSCRED", - "SO_PASSSEC", - "SO_PEERCRED", - "SO_PEERLABEL", - "SO_PEERNAME", - "SO_PEERSEC", - "SO_PRIORITY", - "SO_PROTOCOL", - "SO_PROTOTYPE", - "SO_RANDOMPORT", - "SO_RCVBUF", - "SO_RCVBUFFORCE", - "SO_RCVLOWAT", - "SO_RCVTIMEO", - "SO_RESTRICTIONS", - "SO_RESTRICT_DENYIN", - "SO_RESTRICT_DENYOUT", - "SO_RESTRICT_DENYSET", - "SO_REUSEADDR", - "SO_REUSEPORT", - "SO_REUSESHAREUID", - "SO_RTABLE", - "SO_RXQ_OVFL", - "SO_SECURITY_AUTHENTICATION", - "SO_SECURITY_ENCRYPTION_NETWORK", - "SO_SECURITY_ENCRYPTION_TRANSPORT", - "SO_SETFIB", - "SO_SNDBUF", - "SO_SNDBUFFORCE", - "SO_SNDLOWAT", - "SO_SNDTIMEO", - "SO_SPLICE", - "SO_TIMESTAMP", - "SO_TIMESTAMPING", - "SO_TIMESTAMPNS", - "SO_TIMESTAMP_MONOTONIC", - "SO_TYPE", - "SO_UPCALLCLOSEWAIT", - "SO_UPDATE_ACCEPT_CONTEXT", - "SO_UPDATE_CONNECT_CONTEXT", - "SO_USELOOPBACK", - "SO_USER_COOKIE", - "SO_VENDOR", - "SO_WANTMORE", - "SO_WANTOOBFLAG", - "SSLExtraCertChainPolicyPara", - "STANDARD_RIGHTS_ALL", - "STANDARD_RIGHTS_EXECUTE", - "STANDARD_RIGHTS_READ", - "STANDARD_RIGHTS_REQUIRED", - "STANDARD_RIGHTS_WRITE", - "STARTF_USESHOWWINDOW", - "STARTF_USESTDHANDLES", - "STD_ERROR_HANDLE", - "STD_INPUT_HANDLE", - "STD_OUTPUT_HANDLE", - "SUBLANG_ENGLISH_US", - "SW_FORCEMINIMIZE", - "SW_HIDE", - "SW_MAXIMIZE", - "SW_MINIMIZE", - "SW_NORMAL", - "SW_RESTORE", - "SW_SHOW", - "SW_SHOWDEFAULT", - "SW_SHOWMAXIMIZED", - "SW_SHOWMINIMIZED", - "SW_SHOWMINNOACTIVE", - "SW_SHOWNA", - "SW_SHOWNOACTIVATE", - "SW_SHOWNORMAL", - "SYMBOLIC_LINK_FLAG_DIRECTORY", - "SYNCHRONIZE", - "SYSCTL_VERSION", - "SYSCTL_VERS_0", - "SYSCTL_VERS_1", - "SYSCTL_VERS_MASK", - "SYS_ABORT2", - "SYS_ACCEPT", - "SYS_ACCEPT4", - "SYS_ACCEPT_NOCANCEL", - "SYS_ACCESS", - "SYS_ACCESS_EXTENDED", - "SYS_ACCT", - "SYS_ADD_KEY", - "SYS_ADD_PROFIL", - "SYS_ADJFREQ", - "SYS_ADJTIME", - "SYS_ADJTIMEX", - "SYS_AFS_SYSCALL", - "SYS_AIO_CANCEL", - "SYS_AIO_ERROR", - "SYS_AIO_FSYNC", - "SYS_AIO_MLOCK", - "SYS_AIO_READ", - "SYS_AIO_RETURN", - "SYS_AIO_SUSPEND", - "SYS_AIO_SUSPEND_NOCANCEL", - "SYS_AIO_WAITCOMPLETE", - "SYS_AIO_WRITE", - "SYS_ALARM", - "SYS_ARCH_PRCTL", - "SYS_ARM_FADVISE64_64", - "SYS_ARM_SYNC_FILE_RANGE", - "SYS_ATGETMSG", - "SYS_ATPGETREQ", - "SYS_ATPGETRSP", - "SYS_ATPSNDREQ", - "SYS_ATPSNDRSP", - "SYS_ATPUTMSG", - "SYS_ATSOCKET", - "SYS_AUDIT", - "SYS_AUDITCTL", - "SYS_AUDITON", - "SYS_AUDIT_SESSION_JOIN", - "SYS_AUDIT_SESSION_PORT", - "SYS_AUDIT_SESSION_SELF", - "SYS_BDFLUSH", - "SYS_BIND", - "SYS_BINDAT", - "SYS_BREAK", - "SYS_BRK", - "SYS_BSDTHREAD_CREATE", - "SYS_BSDTHREAD_REGISTER", - "SYS_BSDTHREAD_TERMINATE", - "SYS_CAPGET", - "SYS_CAPSET", - "SYS_CAP_ENTER", - "SYS_CAP_FCNTLS_GET", - "SYS_CAP_FCNTLS_LIMIT", - "SYS_CAP_GETMODE", - "SYS_CAP_GETRIGHTS", - "SYS_CAP_IOCTLS_GET", - "SYS_CAP_IOCTLS_LIMIT", - "SYS_CAP_NEW", - "SYS_CAP_RIGHTS_GET", - "SYS_CAP_RIGHTS_LIMIT", - "SYS_CHDIR", - "SYS_CHFLAGS", - "SYS_CHFLAGSAT", - "SYS_CHMOD", - "SYS_CHMOD_EXTENDED", - "SYS_CHOWN", - "SYS_CHOWN32", - "SYS_CHROOT", - "SYS_CHUD", - "SYS_CLOCK_ADJTIME", - "SYS_CLOCK_GETCPUCLOCKID2", - "SYS_CLOCK_GETRES", - "SYS_CLOCK_GETTIME", - "SYS_CLOCK_NANOSLEEP", - "SYS_CLOCK_SETTIME", - "SYS_CLONE", - "SYS_CLOSE", - "SYS_CLOSEFROM", - "SYS_CLOSE_NOCANCEL", - "SYS_CONNECT", - "SYS_CONNECTAT", - "SYS_CONNECT_NOCANCEL", - "SYS_COPYFILE", - "SYS_CPUSET", - "SYS_CPUSET_GETAFFINITY", - "SYS_CPUSET_GETID", - "SYS_CPUSET_SETAFFINITY", - "SYS_CPUSET_SETID", - "SYS_CREAT", - "SYS_CREATE_MODULE", - "SYS_CSOPS", - "SYS_CSOPS_AUDITTOKEN", - "SYS_DELETE", - "SYS_DELETE_MODULE", - "SYS_DUP", - "SYS_DUP2", - "SYS_DUP3", - "SYS_EACCESS", - "SYS_EPOLL_CREATE", - "SYS_EPOLL_CREATE1", - "SYS_EPOLL_CTL", - "SYS_EPOLL_CTL_OLD", - "SYS_EPOLL_PWAIT", - "SYS_EPOLL_WAIT", - "SYS_EPOLL_WAIT_OLD", - "SYS_EVENTFD", - "SYS_EVENTFD2", - "SYS_EXCHANGEDATA", - "SYS_EXECVE", - "SYS_EXIT", - "SYS_EXIT_GROUP", - "SYS_EXTATTRCTL", - "SYS_EXTATTR_DELETE_FD", - "SYS_EXTATTR_DELETE_FILE", - "SYS_EXTATTR_DELETE_LINK", - "SYS_EXTATTR_GET_FD", - "SYS_EXTATTR_GET_FILE", - "SYS_EXTATTR_GET_LINK", - "SYS_EXTATTR_LIST_FD", - "SYS_EXTATTR_LIST_FILE", - "SYS_EXTATTR_LIST_LINK", - "SYS_EXTATTR_SET_FD", - "SYS_EXTATTR_SET_FILE", - "SYS_EXTATTR_SET_LINK", - "SYS_FACCESSAT", - "SYS_FADVISE64", - "SYS_FADVISE64_64", - "SYS_FALLOCATE", - "SYS_FANOTIFY_INIT", - "SYS_FANOTIFY_MARK", - "SYS_FCHDIR", - "SYS_FCHFLAGS", - "SYS_FCHMOD", - "SYS_FCHMODAT", - "SYS_FCHMOD_EXTENDED", - "SYS_FCHOWN", - "SYS_FCHOWN32", - "SYS_FCHOWNAT", - "SYS_FCHROOT", - "SYS_FCNTL", - "SYS_FCNTL64", - "SYS_FCNTL_NOCANCEL", - "SYS_FDATASYNC", - "SYS_FEXECVE", - "SYS_FFCLOCK_GETCOUNTER", - "SYS_FFCLOCK_GETESTIMATE", - "SYS_FFCLOCK_SETESTIMATE", - "SYS_FFSCTL", - "SYS_FGETATTRLIST", - "SYS_FGETXATTR", - "SYS_FHOPEN", - "SYS_FHSTAT", - "SYS_FHSTATFS", - "SYS_FILEPORT_MAKEFD", - "SYS_FILEPORT_MAKEPORT", - "SYS_FKTRACE", - "SYS_FLISTXATTR", - "SYS_FLOCK", - "SYS_FORK", - "SYS_FPATHCONF", - "SYS_FREEBSD6_FTRUNCATE", - "SYS_FREEBSD6_LSEEK", - "SYS_FREEBSD6_MMAP", - "SYS_FREEBSD6_PREAD", - "SYS_FREEBSD6_PWRITE", - "SYS_FREEBSD6_TRUNCATE", - "SYS_FREMOVEXATTR", - "SYS_FSCTL", - "SYS_FSETATTRLIST", - "SYS_FSETXATTR", - "SYS_FSGETPATH", - "SYS_FSTAT", - "SYS_FSTAT64", - "SYS_FSTAT64_EXTENDED", - "SYS_FSTATAT", - "SYS_FSTATAT64", - "SYS_FSTATFS", - "SYS_FSTATFS64", - "SYS_FSTATV", - "SYS_FSTATVFS1", - "SYS_FSTAT_EXTENDED", - "SYS_FSYNC", - "SYS_FSYNC_NOCANCEL", - "SYS_FSYNC_RANGE", - "SYS_FTIME", - "SYS_FTRUNCATE", - "SYS_FTRUNCATE64", - "SYS_FUTEX", - "SYS_FUTIMENS", - "SYS_FUTIMES", - "SYS_FUTIMESAT", - "SYS_GETATTRLIST", - "SYS_GETAUDIT", - "SYS_GETAUDIT_ADDR", - "SYS_GETAUID", - "SYS_GETCONTEXT", - "SYS_GETCPU", - "SYS_GETCWD", - "SYS_GETDENTS", - "SYS_GETDENTS64", - "SYS_GETDIRENTRIES", - "SYS_GETDIRENTRIES64", - "SYS_GETDIRENTRIESATTR", - "SYS_GETDTABLECOUNT", - "SYS_GETDTABLESIZE", - "SYS_GETEGID", - "SYS_GETEGID32", - "SYS_GETEUID", - "SYS_GETEUID32", - "SYS_GETFH", - "SYS_GETFSSTAT", - "SYS_GETFSSTAT64", - "SYS_GETGID", - "SYS_GETGID32", - "SYS_GETGROUPS", - "SYS_GETGROUPS32", - "SYS_GETHOSTUUID", - "SYS_GETITIMER", - "SYS_GETLCID", - "SYS_GETLOGIN", - "SYS_GETLOGINCLASS", - "SYS_GETPEERNAME", - "SYS_GETPGID", - "SYS_GETPGRP", - "SYS_GETPID", - "SYS_GETPMSG", - "SYS_GETPPID", - "SYS_GETPRIORITY", - "SYS_GETRESGID", - "SYS_GETRESGID32", - "SYS_GETRESUID", - "SYS_GETRESUID32", - "SYS_GETRLIMIT", - "SYS_GETRTABLE", - "SYS_GETRUSAGE", - "SYS_GETSGROUPS", - "SYS_GETSID", - "SYS_GETSOCKNAME", - "SYS_GETSOCKOPT", - "SYS_GETTHRID", - "SYS_GETTID", - "SYS_GETTIMEOFDAY", - "SYS_GETUID", - "SYS_GETUID32", - "SYS_GETVFSSTAT", - "SYS_GETWGROUPS", - "SYS_GETXATTR", - "SYS_GET_KERNEL_SYMS", - "SYS_GET_MEMPOLICY", - "SYS_GET_ROBUST_LIST", - "SYS_GET_THREAD_AREA", - "SYS_GSSD_SYSCALL", - "SYS_GTTY", - "SYS_IDENTITYSVC", - "SYS_IDLE", - "SYS_INITGROUPS", - "SYS_INIT_MODULE", - "SYS_INOTIFY_ADD_WATCH", - "SYS_INOTIFY_INIT", - "SYS_INOTIFY_INIT1", - "SYS_INOTIFY_RM_WATCH", - "SYS_IOCTL", - "SYS_IOPERM", - "SYS_IOPL", - "SYS_IOPOLICYSYS", - "SYS_IOPRIO_GET", - "SYS_IOPRIO_SET", - "SYS_IO_CANCEL", - "SYS_IO_DESTROY", - "SYS_IO_GETEVENTS", - "SYS_IO_SETUP", - "SYS_IO_SUBMIT", - "SYS_IPC", - "SYS_ISSETUGID", - "SYS_JAIL", - "SYS_JAIL_ATTACH", - "SYS_JAIL_GET", - "SYS_JAIL_REMOVE", - "SYS_JAIL_SET", - "SYS_KAS_INFO", - "SYS_KDEBUG_TRACE", - "SYS_KENV", - "SYS_KEVENT", - "SYS_KEVENT64", - "SYS_KEXEC_LOAD", - "SYS_KEYCTL", - "SYS_KILL", - "SYS_KLDFIND", - "SYS_KLDFIRSTMOD", - "SYS_KLDLOAD", - "SYS_KLDNEXT", - "SYS_KLDSTAT", - "SYS_KLDSYM", - "SYS_KLDUNLOAD", - "SYS_KLDUNLOADF", - "SYS_KMQ_NOTIFY", - "SYS_KMQ_OPEN", - "SYS_KMQ_SETATTR", - "SYS_KMQ_TIMEDRECEIVE", - "SYS_KMQ_TIMEDSEND", - "SYS_KMQ_UNLINK", - "SYS_KQUEUE", - "SYS_KQUEUE1", - "SYS_KSEM_CLOSE", - "SYS_KSEM_DESTROY", - "SYS_KSEM_GETVALUE", - "SYS_KSEM_INIT", - "SYS_KSEM_OPEN", - "SYS_KSEM_POST", - "SYS_KSEM_TIMEDWAIT", - "SYS_KSEM_TRYWAIT", - "SYS_KSEM_UNLINK", - "SYS_KSEM_WAIT", - "SYS_KTIMER_CREATE", - "SYS_KTIMER_DELETE", - "SYS_KTIMER_GETOVERRUN", - "SYS_KTIMER_GETTIME", - "SYS_KTIMER_SETTIME", - "SYS_KTRACE", - "SYS_LCHFLAGS", - "SYS_LCHMOD", - "SYS_LCHOWN", - "SYS_LCHOWN32", - "SYS_LEDGER", - "SYS_LGETFH", - "SYS_LGETXATTR", - "SYS_LINK", - "SYS_LINKAT", - "SYS_LIO_LISTIO", - "SYS_LISTEN", - "SYS_LISTXATTR", - "SYS_LLISTXATTR", - "SYS_LOCK", - "SYS_LOOKUP_DCOOKIE", - "SYS_LPATHCONF", - "SYS_LREMOVEXATTR", - "SYS_LSEEK", - "SYS_LSETXATTR", - "SYS_LSTAT", - "SYS_LSTAT64", - "SYS_LSTAT64_EXTENDED", - "SYS_LSTATV", - "SYS_LSTAT_EXTENDED", - "SYS_LUTIMES", - "SYS_MAC_SYSCALL", - "SYS_MADVISE", - "SYS_MADVISE1", - "SYS_MAXSYSCALL", - "SYS_MBIND", - "SYS_MIGRATE_PAGES", - "SYS_MINCORE", - "SYS_MINHERIT", - "SYS_MKCOMPLEX", - "SYS_MKDIR", - "SYS_MKDIRAT", - "SYS_MKDIR_EXTENDED", - "SYS_MKFIFO", - "SYS_MKFIFOAT", - "SYS_MKFIFO_EXTENDED", - "SYS_MKNOD", - "SYS_MKNODAT", - "SYS_MLOCK", - "SYS_MLOCKALL", - "SYS_MMAP", - "SYS_MMAP2", - "SYS_MODCTL", - "SYS_MODFIND", - "SYS_MODFNEXT", - "SYS_MODIFY_LDT", - "SYS_MODNEXT", - "SYS_MODSTAT", - "SYS_MODWATCH", - "SYS_MOUNT", - "SYS_MOVE_PAGES", - "SYS_MPROTECT", - "SYS_MPX", - "SYS_MQUERY", - "SYS_MQ_GETSETATTR", - "SYS_MQ_NOTIFY", - "SYS_MQ_OPEN", - "SYS_MQ_TIMEDRECEIVE", - "SYS_MQ_TIMEDSEND", - "SYS_MQ_UNLINK", - "SYS_MREMAP", - "SYS_MSGCTL", - "SYS_MSGGET", - "SYS_MSGRCV", - "SYS_MSGRCV_NOCANCEL", - "SYS_MSGSND", - "SYS_MSGSND_NOCANCEL", - "SYS_MSGSYS", - "SYS_MSYNC", - "SYS_MSYNC_NOCANCEL", - "SYS_MUNLOCK", - "SYS_MUNLOCKALL", - "SYS_MUNMAP", - "SYS_NAME_TO_HANDLE_AT", - "SYS_NANOSLEEP", - "SYS_NEWFSTATAT", - "SYS_NFSCLNT", - "SYS_NFSSERVCTL", - "SYS_NFSSVC", - "SYS_NFSTAT", - "SYS_NICE", - "SYS_NLM_SYSCALL", - "SYS_NLSTAT", - "SYS_NMOUNT", - "SYS_NSTAT", - "SYS_NTP_ADJTIME", - "SYS_NTP_GETTIME", - "SYS_NUMA_GETAFFINITY", - "SYS_NUMA_SETAFFINITY", - "SYS_OABI_SYSCALL_BASE", - "SYS_OBREAK", - "SYS_OLDFSTAT", - "SYS_OLDLSTAT", - "SYS_OLDOLDUNAME", - "SYS_OLDSTAT", - "SYS_OLDUNAME", - "SYS_OPEN", - "SYS_OPENAT", - "SYS_OPENBSD_POLL", - "SYS_OPEN_BY_HANDLE_AT", - "SYS_OPEN_DPROTECTED_NP", - "SYS_OPEN_EXTENDED", - "SYS_OPEN_NOCANCEL", - "SYS_OVADVISE", - "SYS_PACCEPT", - "SYS_PATHCONF", - "SYS_PAUSE", - "SYS_PCICONFIG_IOBASE", - "SYS_PCICONFIG_READ", - "SYS_PCICONFIG_WRITE", - "SYS_PDFORK", - "SYS_PDGETPID", - "SYS_PDKILL", - "SYS_PERF_EVENT_OPEN", - "SYS_PERSONALITY", - "SYS_PID_HIBERNATE", - "SYS_PID_RESUME", - "SYS_PID_SHUTDOWN_SOCKETS", - "SYS_PID_SUSPEND", - "SYS_PIPE", - "SYS_PIPE2", - "SYS_PIVOT_ROOT", - "SYS_PMC_CONTROL", - "SYS_PMC_GET_INFO", - "SYS_POLL", - "SYS_POLLTS", - "SYS_POLL_NOCANCEL", - "SYS_POSIX_FADVISE", - "SYS_POSIX_FALLOCATE", - "SYS_POSIX_OPENPT", - "SYS_POSIX_SPAWN", - "SYS_PPOLL", - "SYS_PRCTL", - "SYS_PREAD", - "SYS_PREAD64", - "SYS_PREADV", - "SYS_PREAD_NOCANCEL", - "SYS_PRLIMIT64", - "SYS_PROCCTL", - "SYS_PROCESS_POLICY", - "SYS_PROCESS_VM_READV", - "SYS_PROCESS_VM_WRITEV", - "SYS_PROC_INFO", - "SYS_PROF", - "SYS_PROFIL", - "SYS_PSELECT", - "SYS_PSELECT6", - "SYS_PSET_ASSIGN", - "SYS_PSET_CREATE", - "SYS_PSET_DESTROY", - "SYS_PSYNCH_CVBROAD", - "SYS_PSYNCH_CVCLRPREPOST", - "SYS_PSYNCH_CVSIGNAL", - "SYS_PSYNCH_CVWAIT", - "SYS_PSYNCH_MUTEXDROP", - "SYS_PSYNCH_MUTEXWAIT", - "SYS_PSYNCH_RW_DOWNGRADE", - "SYS_PSYNCH_RW_LONGRDLOCK", - "SYS_PSYNCH_RW_RDLOCK", - "SYS_PSYNCH_RW_UNLOCK", - "SYS_PSYNCH_RW_UNLOCK2", - "SYS_PSYNCH_RW_UPGRADE", - "SYS_PSYNCH_RW_WRLOCK", - "SYS_PSYNCH_RW_YIELDWRLOCK", - "SYS_PTRACE", - "SYS_PUTPMSG", - "SYS_PWRITE", - "SYS_PWRITE64", - "SYS_PWRITEV", - "SYS_PWRITE_NOCANCEL", - "SYS_QUERY_MODULE", - "SYS_QUOTACTL", - "SYS_RASCTL", - "SYS_RCTL_ADD_RULE", - "SYS_RCTL_GET_LIMITS", - "SYS_RCTL_GET_RACCT", - "SYS_RCTL_GET_RULES", - "SYS_RCTL_REMOVE_RULE", - "SYS_READ", - "SYS_READAHEAD", - "SYS_READDIR", - "SYS_READLINK", - "SYS_READLINKAT", - "SYS_READV", - "SYS_READV_NOCANCEL", - "SYS_READ_NOCANCEL", - "SYS_REBOOT", - "SYS_RECV", - "SYS_RECVFROM", - "SYS_RECVFROM_NOCANCEL", - "SYS_RECVMMSG", - "SYS_RECVMSG", - "SYS_RECVMSG_NOCANCEL", - "SYS_REMAP_FILE_PAGES", - "SYS_REMOVEXATTR", - "SYS_RENAME", - "SYS_RENAMEAT", - "SYS_REQUEST_KEY", - "SYS_RESTART_SYSCALL", - "SYS_REVOKE", - "SYS_RFORK", - "SYS_RMDIR", - "SYS_RTPRIO", - "SYS_RTPRIO_THREAD", - "SYS_RT_SIGACTION", - "SYS_RT_SIGPENDING", - "SYS_RT_SIGPROCMASK", - "SYS_RT_SIGQUEUEINFO", - "SYS_RT_SIGRETURN", - "SYS_RT_SIGSUSPEND", - "SYS_RT_SIGTIMEDWAIT", - "SYS_RT_TGSIGQUEUEINFO", - "SYS_SBRK", - "SYS_SCHED_GETAFFINITY", - "SYS_SCHED_GETPARAM", - "SYS_SCHED_GETSCHEDULER", - "SYS_SCHED_GET_PRIORITY_MAX", - "SYS_SCHED_GET_PRIORITY_MIN", - "SYS_SCHED_RR_GET_INTERVAL", - "SYS_SCHED_SETAFFINITY", - "SYS_SCHED_SETPARAM", - "SYS_SCHED_SETSCHEDULER", - "SYS_SCHED_YIELD", - "SYS_SCTP_GENERIC_RECVMSG", - "SYS_SCTP_GENERIC_SENDMSG", - "SYS_SCTP_GENERIC_SENDMSG_IOV", - "SYS_SCTP_PEELOFF", - "SYS_SEARCHFS", - "SYS_SECURITY", - "SYS_SELECT", - "SYS_SELECT_NOCANCEL", - "SYS_SEMCONFIG", - "SYS_SEMCTL", - "SYS_SEMGET", - "SYS_SEMOP", - "SYS_SEMSYS", - "SYS_SEMTIMEDOP", - "SYS_SEM_CLOSE", - "SYS_SEM_DESTROY", - "SYS_SEM_GETVALUE", - "SYS_SEM_INIT", - "SYS_SEM_OPEN", - "SYS_SEM_POST", - "SYS_SEM_TRYWAIT", - "SYS_SEM_UNLINK", - "SYS_SEM_WAIT", - "SYS_SEM_WAIT_NOCANCEL", - "SYS_SEND", - "SYS_SENDFILE", - "SYS_SENDFILE64", - "SYS_SENDMMSG", - "SYS_SENDMSG", - "SYS_SENDMSG_NOCANCEL", - "SYS_SENDTO", - "SYS_SENDTO_NOCANCEL", - "SYS_SETATTRLIST", - "SYS_SETAUDIT", - "SYS_SETAUDIT_ADDR", - "SYS_SETAUID", - "SYS_SETCONTEXT", - "SYS_SETDOMAINNAME", - "SYS_SETEGID", - "SYS_SETEUID", - "SYS_SETFIB", - "SYS_SETFSGID", - "SYS_SETFSGID32", - "SYS_SETFSUID", - "SYS_SETFSUID32", - "SYS_SETGID", - "SYS_SETGID32", - "SYS_SETGROUPS", - "SYS_SETGROUPS32", - "SYS_SETHOSTNAME", - "SYS_SETITIMER", - "SYS_SETLCID", - "SYS_SETLOGIN", - "SYS_SETLOGINCLASS", - "SYS_SETNS", - "SYS_SETPGID", - "SYS_SETPRIORITY", - "SYS_SETPRIVEXEC", - "SYS_SETREGID", - "SYS_SETREGID32", - "SYS_SETRESGID", - "SYS_SETRESGID32", - "SYS_SETRESUID", - "SYS_SETRESUID32", - "SYS_SETREUID", - "SYS_SETREUID32", - "SYS_SETRLIMIT", - "SYS_SETRTABLE", - "SYS_SETSGROUPS", - "SYS_SETSID", - "SYS_SETSOCKOPT", - "SYS_SETTID", - "SYS_SETTID_WITH_PID", - "SYS_SETTIMEOFDAY", - "SYS_SETUID", - "SYS_SETUID32", - "SYS_SETWGROUPS", - "SYS_SETXATTR", - "SYS_SET_MEMPOLICY", - "SYS_SET_ROBUST_LIST", - "SYS_SET_THREAD_AREA", - "SYS_SET_TID_ADDRESS", - "SYS_SGETMASK", - "SYS_SHARED_REGION_CHECK_NP", - "SYS_SHARED_REGION_MAP_AND_SLIDE_NP", - "SYS_SHMAT", - "SYS_SHMCTL", - "SYS_SHMDT", - "SYS_SHMGET", - "SYS_SHMSYS", - "SYS_SHM_OPEN", - "SYS_SHM_UNLINK", - "SYS_SHUTDOWN", - "SYS_SIGACTION", - "SYS_SIGALTSTACK", - "SYS_SIGNAL", - "SYS_SIGNALFD", - "SYS_SIGNALFD4", - "SYS_SIGPENDING", - "SYS_SIGPROCMASK", - "SYS_SIGQUEUE", - "SYS_SIGQUEUEINFO", - "SYS_SIGRETURN", - "SYS_SIGSUSPEND", - "SYS_SIGSUSPEND_NOCANCEL", - "SYS_SIGTIMEDWAIT", - "SYS_SIGWAIT", - "SYS_SIGWAITINFO", - "SYS_SOCKET", - "SYS_SOCKETCALL", - "SYS_SOCKETPAIR", - "SYS_SPLICE", - "SYS_SSETMASK", - "SYS_SSTK", - "SYS_STACK_SNAPSHOT", - "SYS_STAT", - "SYS_STAT64", - "SYS_STAT64_EXTENDED", - "SYS_STATFS", - "SYS_STATFS64", - "SYS_STATV", - "SYS_STATVFS1", - "SYS_STAT_EXTENDED", - "SYS_STIME", - "SYS_STTY", - "SYS_SWAPCONTEXT", - "SYS_SWAPCTL", - "SYS_SWAPOFF", - "SYS_SWAPON", - "SYS_SYMLINK", - "SYS_SYMLINKAT", - "SYS_SYNC", - "SYS_SYNCFS", - "SYS_SYNC_FILE_RANGE", - "SYS_SYSARCH", - "SYS_SYSCALL", - "SYS_SYSCALL_BASE", - "SYS_SYSFS", - "SYS_SYSINFO", - "SYS_SYSLOG", - "SYS_TEE", - "SYS_TGKILL", - "SYS_THREAD_SELFID", - "SYS_THR_CREATE", - "SYS_THR_EXIT", - "SYS_THR_KILL", - "SYS_THR_KILL2", - "SYS_THR_NEW", - "SYS_THR_SELF", - "SYS_THR_SET_NAME", - "SYS_THR_SUSPEND", - "SYS_THR_WAKE", - "SYS_TIME", - "SYS_TIMERFD_CREATE", - "SYS_TIMERFD_GETTIME", - "SYS_TIMERFD_SETTIME", - "SYS_TIMER_CREATE", - "SYS_TIMER_DELETE", - "SYS_TIMER_GETOVERRUN", - "SYS_TIMER_GETTIME", - "SYS_TIMER_SETTIME", - "SYS_TIMES", - "SYS_TKILL", - "SYS_TRUNCATE", - "SYS_TRUNCATE64", - "SYS_TUXCALL", - "SYS_UGETRLIMIT", - "SYS_ULIMIT", - "SYS_UMASK", - "SYS_UMASK_EXTENDED", - "SYS_UMOUNT", - "SYS_UMOUNT2", - "SYS_UNAME", - "SYS_UNDELETE", - "SYS_UNLINK", - "SYS_UNLINKAT", - "SYS_UNMOUNT", - "SYS_UNSHARE", - "SYS_USELIB", - "SYS_USTAT", - "SYS_UTIME", - "SYS_UTIMENSAT", - "SYS_UTIMES", - "SYS_UTRACE", - "SYS_UUIDGEN", - "SYS_VADVISE", - "SYS_VFORK", - "SYS_VHANGUP", - "SYS_VM86", - "SYS_VM86OLD", - "SYS_VMSPLICE", - "SYS_VM_PRESSURE_MONITOR", - "SYS_VSERVER", - "SYS_WAIT4", - "SYS_WAIT4_NOCANCEL", - "SYS_WAIT6", - "SYS_WAITEVENT", - "SYS_WAITID", - "SYS_WAITID_NOCANCEL", - "SYS_WAITPID", - "SYS_WATCHEVENT", - "SYS_WORKQ_KERNRETURN", - "SYS_WORKQ_OPEN", - "SYS_WRITE", - "SYS_WRITEV", - "SYS_WRITEV_NOCANCEL", - "SYS_WRITE_NOCANCEL", - "SYS_YIELD", - "SYS__LLSEEK", - "SYS__LWP_CONTINUE", - "SYS__LWP_CREATE", - "SYS__LWP_CTL", - "SYS__LWP_DETACH", - "SYS__LWP_EXIT", - "SYS__LWP_GETNAME", - "SYS__LWP_GETPRIVATE", - "SYS__LWP_KILL", - "SYS__LWP_PARK", - "SYS__LWP_SELF", - "SYS__LWP_SETNAME", - "SYS__LWP_SETPRIVATE", - "SYS__LWP_SUSPEND", - "SYS__LWP_UNPARK", - "SYS__LWP_UNPARK_ALL", - "SYS__LWP_WAIT", - "SYS__LWP_WAKEUP", - "SYS__NEWSELECT", - "SYS__PSET_BIND", - "SYS__SCHED_GETAFFINITY", - "SYS__SCHED_GETPARAM", - "SYS__SCHED_SETAFFINITY", - "SYS__SCHED_SETPARAM", - "SYS__SYSCTL", - "SYS__UMTX_LOCK", - "SYS__UMTX_OP", - "SYS__UMTX_UNLOCK", - "SYS___ACL_ACLCHECK_FD", - "SYS___ACL_ACLCHECK_FILE", - "SYS___ACL_ACLCHECK_LINK", - "SYS___ACL_DELETE_FD", - "SYS___ACL_DELETE_FILE", - "SYS___ACL_DELETE_LINK", - "SYS___ACL_GET_FD", - "SYS___ACL_GET_FILE", - "SYS___ACL_GET_LINK", - "SYS___ACL_SET_FD", - "SYS___ACL_SET_FILE", - "SYS___ACL_SET_LINK", - "SYS___CAP_RIGHTS_GET", - "SYS___CLONE", - "SYS___DISABLE_THREADSIGNAL", - "SYS___GETCWD", - "SYS___GETLOGIN", - "SYS___GET_TCB", - "SYS___MAC_EXECVE", - "SYS___MAC_GETFSSTAT", - "SYS___MAC_GET_FD", - "SYS___MAC_GET_FILE", - "SYS___MAC_GET_LCID", - "SYS___MAC_GET_LCTX", - "SYS___MAC_GET_LINK", - "SYS___MAC_GET_MOUNT", - "SYS___MAC_GET_PID", - "SYS___MAC_GET_PROC", - "SYS___MAC_MOUNT", - "SYS___MAC_SET_FD", - "SYS___MAC_SET_FILE", - "SYS___MAC_SET_LCTX", - "SYS___MAC_SET_LINK", - "SYS___MAC_SET_PROC", - "SYS___MAC_SYSCALL", - "SYS___OLD_SEMWAIT_SIGNAL", - "SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL", - "SYS___POSIX_CHOWN", - "SYS___POSIX_FCHOWN", - "SYS___POSIX_LCHOWN", - "SYS___POSIX_RENAME", - "SYS___PTHREAD_CANCELED", - "SYS___PTHREAD_CHDIR", - "SYS___PTHREAD_FCHDIR", - "SYS___PTHREAD_KILL", - "SYS___PTHREAD_MARKCANCEL", - "SYS___PTHREAD_SIGMASK", - "SYS___QUOTACTL", - "SYS___SEMCTL", - "SYS___SEMWAIT_SIGNAL", - "SYS___SEMWAIT_SIGNAL_NOCANCEL", - "SYS___SETLOGIN", - "SYS___SETUGID", - "SYS___SET_TCB", - "SYS___SIGACTION_SIGTRAMP", - "SYS___SIGTIMEDWAIT", - "SYS___SIGWAIT", - "SYS___SIGWAIT_NOCANCEL", - "SYS___SYSCTL", - "SYS___TFORK", - "SYS___THREXIT", - "SYS___THRSIGDIVERT", - "SYS___THRSLEEP", - "SYS___THRWAKEUP", - "S_ARCH1", - "S_ARCH2", - "S_BLKSIZE", - "S_IEXEC", - "S_IFBLK", - "S_IFCHR", - "S_IFDIR", - "S_IFIFO", - "S_IFLNK", - "S_IFMT", - "S_IFREG", - "S_IFSOCK", - "S_IFWHT", - "S_IREAD", - "S_IRGRP", - "S_IROTH", - "S_IRUSR", - "S_IRWXG", - "S_IRWXO", - "S_IRWXU", - "S_ISGID", - "S_ISTXT", - "S_ISUID", - "S_ISVTX", - "S_IWGRP", - "S_IWOTH", - "S_IWRITE", - "S_IWUSR", - "S_IXGRP", - "S_IXOTH", - "S_IXUSR", - "S_LOGIN_SET", - "SecurityAttributes", - "Seek", - "Select", - "Sendfile", - "Sendmsg", - "SendmsgN", - "Sendto", - "Servent", - "SetBpf", - "SetBpfBuflen", - "SetBpfDatalink", - "SetBpfHeadercmpl", - "SetBpfImmediate", - "SetBpfInterface", - "SetBpfPromisc", - "SetBpfTimeout", - "SetCurrentDirectory", - "SetEndOfFile", - "SetEnvironmentVariable", - "SetFileAttributes", - "SetFileCompletionNotificationModes", - "SetFilePointer", - "SetFileTime", - "SetHandleInformation", - "SetKevent", - "SetLsfPromisc", - "SetNonblock", - "Setdomainname", - "Setegid", - "Setenv", - "Seteuid", - "Setfsgid", - "Setfsuid", - "Setgid", - "Setgroups", - "Sethostname", - "Setlogin", - "Setpgid", - "Setpriority", - "Setprivexec", - "Setregid", - "Setresgid", - "Setresuid", - "Setreuid", - "Setrlimit", - "Setsid", - "Setsockopt", - "SetsockoptByte", - "SetsockoptICMPv6Filter", - "SetsockoptIPMreq", - "SetsockoptIPMreqn", - "SetsockoptIPv6Mreq", - "SetsockoptInet4Addr", - "SetsockoptInt", - "SetsockoptLinger", - "SetsockoptString", - "SetsockoptTimeval", - "Settimeofday", - "Setuid", - "Setxattr", - "Shutdown", - "SidTypeAlias", - "SidTypeComputer", - "SidTypeDeletedAccount", - "SidTypeDomain", - "SidTypeGroup", - "SidTypeInvalid", - "SidTypeLabel", - "SidTypeUnknown", - "SidTypeUser", - "SidTypeWellKnownGroup", - "Signal", - "SizeofBpfHdr", - "SizeofBpfInsn", - "SizeofBpfProgram", - "SizeofBpfStat", - "SizeofBpfVersion", - "SizeofBpfZbuf", - "SizeofBpfZbufHeader", - "SizeofCmsghdr", - "SizeofICMPv6Filter", - "SizeofIPMreq", - "SizeofIPMreqn", - "SizeofIPv6MTUInfo", - "SizeofIPv6Mreq", - "SizeofIfAddrmsg", - "SizeofIfAnnounceMsghdr", - "SizeofIfData", - "SizeofIfInfomsg", - "SizeofIfMsghdr", - "SizeofIfaMsghdr", - "SizeofIfmaMsghdr", - "SizeofIfmaMsghdr2", - "SizeofInet4Pktinfo", - "SizeofInet6Pktinfo", - "SizeofInotifyEvent", - "SizeofLinger", - "SizeofMsghdr", - "SizeofNlAttr", - "SizeofNlMsgerr", - "SizeofNlMsghdr", - "SizeofRtAttr", - "SizeofRtGenmsg", - "SizeofRtMetrics", - "SizeofRtMsg", - "SizeofRtMsghdr", - "SizeofRtNexthop", - "SizeofSockFilter", - "SizeofSockFprog", - "SizeofSockaddrAny", - "SizeofSockaddrDatalink", - "SizeofSockaddrInet4", - "SizeofSockaddrInet6", - "SizeofSockaddrLinklayer", - "SizeofSockaddrNetlink", - "SizeofSockaddrUnix", - "SizeofTCPInfo", - "SizeofUcred", - "SlicePtrFromStrings", - "SockFilter", - "SockFprog", - "Sockaddr", - "SockaddrDatalink", - "SockaddrGen", - "SockaddrInet4", - "SockaddrInet6", - "SockaddrLinklayer", - "SockaddrNetlink", - "SockaddrUnix", - "Socket", - "SocketControlMessage", - "SocketDisableIPv6", - "Socketpair", - "Splice", - "StartProcess", - "StartupInfo", - "Stat", - "Stat_t", - "Statfs", - "Statfs_t", - "Stderr", - "Stdin", - "Stdout", - "StringBytePtr", - "StringByteSlice", - "StringSlicePtr", - "StringToSid", - "StringToUTF16", - "StringToUTF16Ptr", - "Symlink", - "Sync", - "SyncFileRange", - "SysProcAttr", - "SysProcIDMap", - "Syscall", - "Syscall12", - "Syscall15", - "Syscall18", - "Syscall6", - "Syscall9", - "SyscallN", - "Sysctl", - "SysctlUint32", - "Sysctlnode", - "Sysinfo", - "Sysinfo_t", - "Systemtime", - "TCGETS", - "TCIFLUSH", - "TCIOFLUSH", - "TCOFLUSH", - "TCPInfo", - "TCPKeepalive", - "TCP_CA_NAME_MAX", - "TCP_CONGCTL", - "TCP_CONGESTION", - "TCP_CONNECTIONTIMEOUT", - "TCP_CORK", - "TCP_DEFER_ACCEPT", - "TCP_ENABLE_ECN", - "TCP_INFO", - "TCP_KEEPALIVE", - "TCP_KEEPCNT", - "TCP_KEEPIDLE", - "TCP_KEEPINIT", - "TCP_KEEPINTVL", - "TCP_LINGER2", - "TCP_MAXBURST", - "TCP_MAXHLEN", - "TCP_MAXOLEN", - "TCP_MAXSEG", - "TCP_MAXWIN", - "TCP_MAX_SACK", - "TCP_MAX_WINSHIFT", - "TCP_MD5SIG", - "TCP_MD5SIG_MAXKEYLEN", - "TCP_MINMSS", - "TCP_MINMSSOVERLOAD", - "TCP_MSS", - "TCP_NODELAY", - "TCP_NOOPT", - "TCP_NOPUSH", - "TCP_NOTSENT_LOWAT", - "TCP_NSTATES", - "TCP_QUICKACK", - "TCP_RXT_CONNDROPTIME", - "TCP_RXT_FINDROP", - "TCP_SACK_ENABLE", - "TCP_SENDMOREACKS", - "TCP_SYNCNT", - "TCP_VENDOR", - "TCP_WINDOW_CLAMP", - "TCSAFLUSH", - "TCSETS", - "TF_DISCONNECT", - "TF_REUSE_SOCKET", - "TF_USE_DEFAULT_WORKER", - "TF_USE_KERNEL_APC", - "TF_USE_SYSTEM_THREAD", - "TF_WRITE_BEHIND", - "TH32CS_INHERIT", - "TH32CS_SNAPALL", - "TH32CS_SNAPHEAPLIST", - "TH32CS_SNAPMODULE", - "TH32CS_SNAPMODULE32", - "TH32CS_SNAPPROCESS", - "TH32CS_SNAPTHREAD", - "TIME_ZONE_ID_DAYLIGHT", - "TIME_ZONE_ID_STANDARD", - "TIME_ZONE_ID_UNKNOWN", - "TIOCCBRK", - "TIOCCDTR", - "TIOCCONS", - "TIOCDCDTIMESTAMP", - "TIOCDRAIN", - "TIOCDSIMICROCODE", - "TIOCEXCL", - "TIOCEXT", - "TIOCFLAG_CDTRCTS", - "TIOCFLAG_CLOCAL", - "TIOCFLAG_CRTSCTS", - "TIOCFLAG_MDMBUF", - "TIOCFLAG_PPS", - "TIOCFLAG_SOFTCAR", - "TIOCFLUSH", - "TIOCGDEV", - "TIOCGDRAINWAIT", - "TIOCGETA", - "TIOCGETD", - "TIOCGFLAGS", - "TIOCGICOUNT", - "TIOCGLCKTRMIOS", - "TIOCGLINED", - "TIOCGPGRP", - "TIOCGPTN", - "TIOCGQSIZE", - "TIOCGRANTPT", - "TIOCGRS485", - "TIOCGSERIAL", - "TIOCGSID", - "TIOCGSIZE", - "TIOCGSOFTCAR", - "TIOCGTSTAMP", - "TIOCGWINSZ", - "TIOCINQ", - "TIOCIXOFF", - "TIOCIXON", - "TIOCLINUX", - "TIOCMBIC", - "TIOCMBIS", - "TIOCMGDTRWAIT", - "TIOCMGET", - "TIOCMIWAIT", - "TIOCMODG", - "TIOCMODS", - "TIOCMSDTRWAIT", - "TIOCMSET", - "TIOCM_CAR", - "TIOCM_CD", - "TIOCM_CTS", - "TIOCM_DCD", - "TIOCM_DSR", - "TIOCM_DTR", - "TIOCM_LE", - "TIOCM_RI", - "TIOCM_RNG", - "TIOCM_RTS", - "TIOCM_SR", - "TIOCM_ST", - "TIOCNOTTY", - "TIOCNXCL", - "TIOCOUTQ", - "TIOCPKT", - "TIOCPKT_DATA", - "TIOCPKT_DOSTOP", - "TIOCPKT_FLUSHREAD", - "TIOCPKT_FLUSHWRITE", - "TIOCPKT_IOCTL", - "TIOCPKT_NOSTOP", - "TIOCPKT_START", - "TIOCPKT_STOP", - "TIOCPTMASTER", - "TIOCPTMGET", - "TIOCPTSNAME", - "TIOCPTYGNAME", - "TIOCPTYGRANT", - "TIOCPTYUNLK", - "TIOCRCVFRAME", - "TIOCREMOTE", - "TIOCSBRK", - "TIOCSCONS", - "TIOCSCTTY", - "TIOCSDRAINWAIT", - "TIOCSDTR", - "TIOCSERCONFIG", - "TIOCSERGETLSR", - "TIOCSERGETMULTI", - "TIOCSERGSTRUCT", - "TIOCSERGWILD", - "TIOCSERSETMULTI", - "TIOCSERSWILD", - "TIOCSER_TEMT", - "TIOCSETA", - "TIOCSETAF", - "TIOCSETAW", - "TIOCSETD", - "TIOCSFLAGS", - "TIOCSIG", - "TIOCSLCKTRMIOS", - "TIOCSLINED", - "TIOCSPGRP", - "TIOCSPTLCK", - "TIOCSQSIZE", - "TIOCSRS485", - "TIOCSSERIAL", - "TIOCSSIZE", - "TIOCSSOFTCAR", - "TIOCSTART", - "TIOCSTAT", - "TIOCSTI", - "TIOCSTOP", - "TIOCSTSTAMP", - "TIOCSWINSZ", - "TIOCTIMESTAMP", - "TIOCUCNTL", - "TIOCVHANGUP", - "TIOCXMTFRAME", - "TOKEN_ADJUST_DEFAULT", - "TOKEN_ADJUST_GROUPS", - "TOKEN_ADJUST_PRIVILEGES", - "TOKEN_ADJUST_SESSIONID", - "TOKEN_ALL_ACCESS", - "TOKEN_ASSIGN_PRIMARY", - "TOKEN_DUPLICATE", - "TOKEN_EXECUTE", - "TOKEN_IMPERSONATE", - "TOKEN_QUERY", - "TOKEN_QUERY_SOURCE", - "TOKEN_READ", - "TOKEN_WRITE", - "TOSTOP", - "TRUNCATE_EXISTING", - "TUNATTACHFILTER", - "TUNDETACHFILTER", - "TUNGETFEATURES", - "TUNGETIFF", - "TUNGETSNDBUF", - "TUNGETVNETHDRSZ", - "TUNSETDEBUG", - "TUNSETGROUP", - "TUNSETIFF", - "TUNSETLINK", - "TUNSETNOCSUM", - "TUNSETOFFLOAD", - "TUNSETOWNER", - "TUNSETPERSIST", - "TUNSETSNDBUF", - "TUNSETTXFILTER", - "TUNSETVNETHDRSZ", - "Tee", - "TerminateProcess", - "Termios", - "Tgkill", - "Time", - "Time_t", - "Times", - "Timespec", - "TimespecToNsec", - "Timeval", - "Timeval32", - "TimevalToNsec", - "Timex", - "Timezoneinformation", - "Tms", - "Token", - "TokenAccessInformation", - "TokenAuditPolicy", - "TokenDefaultDacl", - "TokenElevation", - "TokenElevationType", - "TokenGroups", - "TokenGroupsAndPrivileges", - "TokenHasRestrictions", - "TokenImpersonationLevel", - "TokenIntegrityLevel", - "TokenLinkedToken", - "TokenLogonSid", - "TokenMandatoryPolicy", - "TokenOrigin", - "TokenOwner", - "TokenPrimaryGroup", - "TokenPrivileges", - "TokenRestrictedSids", - "TokenSandBoxInert", - "TokenSessionId", - "TokenSessionReference", - "TokenSource", - "TokenStatistics", - "TokenType", - "TokenUIAccess", - "TokenUser", - "TokenVirtualizationAllowed", - "TokenVirtualizationEnabled", - "Tokenprimarygroup", - "Tokenuser", - "TranslateAccountName", - "TranslateName", - "TransmitFile", - "TransmitFileBuffers", - "Truncate", - "UNIX_PATH_MAX", - "USAGE_MATCH_TYPE_AND", - "USAGE_MATCH_TYPE_OR", - "UTF16FromString", - "UTF16PtrFromString", - "UTF16ToString", - "Ucred", - "Umask", - "Uname", - "Undelete", - "UnixCredentials", - "UnixRights", - "Unlink", - "Unlinkat", - "UnmapViewOfFile", - "Unmount", - "Unsetenv", - "Unshare", - "UserInfo10", - "Ustat", - "Ustat_t", - "Utimbuf", - "Utime", - "Utimes", - "UtimesNano", - "Utsname", - "VDISCARD", - "VDSUSP", - "VEOF", - "VEOL", - "VEOL2", - "VERASE", - "VERASE2", - "VINTR", - "VKILL", - "VLNEXT", - "VMIN", - "VQUIT", - "VREPRINT", - "VSTART", - "VSTATUS", - "VSTOP", - "VSUSP", - "VSWTC", - "VT0", - "VT1", - "VTDLY", - "VTIME", - "VWERASE", - "VirtualLock", - "VirtualUnlock", - "WAIT_ABANDONED", - "WAIT_FAILED", - "WAIT_OBJECT_0", - "WAIT_TIMEOUT", - "WALL", - "WALLSIG", - "WALTSIG", - "WCLONE", - "WCONTINUED", - "WCOREFLAG", - "WEXITED", - "WLINUXCLONE", - "WNOHANG", - "WNOTHREAD", - "WNOWAIT", - "WNOZOMBIE", - "WOPTSCHECKED", - "WORDSIZE", - "WSABuf", - "WSACleanup", - "WSADESCRIPTION_LEN", - "WSAData", - "WSAEACCES", - "WSAECONNABORTED", - "WSAECONNRESET", - "WSAEnumProtocols", - "WSAID_CONNECTEX", - "WSAIoctl", - "WSAPROTOCOL_LEN", - "WSAProtocolChain", - "WSAProtocolInfo", - "WSARecv", - "WSARecvFrom", - "WSASYS_STATUS_LEN", - "WSASend", - "WSASendTo", - "WSASendto", - "WSAStartup", - "WSTOPPED", - "WTRAPPED", - "WUNTRACED", - "Wait4", - "WaitForSingleObject", - "WaitStatus", - "Win32FileAttributeData", - "Win32finddata", - "Write", - "WriteConsole", - "WriteFile", - "X509_ASN_ENCODING", - "XCASE", - "XP1_CONNECTIONLESS", - "XP1_CONNECT_DATA", - "XP1_DISCONNECT_DATA", - "XP1_EXPEDITED_DATA", - "XP1_GRACEFUL_CLOSE", - "XP1_GUARANTEED_DELIVERY", - "XP1_GUARANTEED_ORDER", - "XP1_IFS_HANDLES", - "XP1_MESSAGE_ORIENTED", - "XP1_MULTIPOINT_CONTROL_PLANE", - "XP1_MULTIPOINT_DATA_PLANE", - "XP1_PARTIAL_MESSAGE", - "XP1_PSEUDO_STREAM", - "XP1_QOS_SUPPORTED", - "XP1_SAN_SUPPORT_SDP", - "XP1_SUPPORT_BROADCAST", - "XP1_SUPPORT_MULTIPOINT", - "XP1_UNI_RECV", - "XP1_UNI_SEND", - }, - "syscall/js": { - "CopyBytesToGo", - "CopyBytesToJS", - "Error", - "Func", - "FuncOf", - "Global", - "Null", - "Type", - "TypeBoolean", - "TypeFunction", - "TypeNull", - "TypeNumber", - "TypeObject", - "TypeString", - "TypeSymbol", - "TypeUndefined", - "Undefined", - "Value", - "ValueError", - "ValueOf", - }, - "testing": { - "AllocsPerRun", - "B", - "Benchmark", - "BenchmarkResult", - "Cover", - "CoverBlock", - "CoverMode", - "Coverage", - "F", - "Init", - "InternalBenchmark", - "InternalExample", - "InternalFuzzTarget", - "InternalTest", - "M", - "Main", - "MainStart", - "PB", - "RegisterCover", - "RunBenchmarks", - "RunExamples", - "RunTests", - "Short", - "T", - "TB", - "Testing", - "Verbose", - }, - "testing/fstest": { - "MapFS", - "MapFile", - "TestFS", - }, - "testing/iotest": { - "DataErrReader", - "ErrReader", - "ErrTimeout", - "HalfReader", - "NewReadLogger", - "NewWriteLogger", - "OneByteReader", - "TestReader", - "TimeoutReader", - "TruncateWriter", - }, - "testing/quick": { - "Check", - "CheckEqual", - "CheckEqualError", - "CheckError", - "Config", - "Generator", - "SetupError", - "Value", - }, - "testing/slogtest": { - "TestHandler", - }, - "text/scanner": { - "Char", - "Comment", - "EOF", - "Float", - "GoTokens", - "GoWhitespace", - "Ident", - "Int", - "Position", - "RawString", - "ScanChars", - "ScanComments", - "ScanFloats", - "ScanIdents", - "ScanInts", - "ScanRawStrings", - "ScanStrings", - "Scanner", - "SkipComments", - "String", - "TokenString", - }, - "text/tabwriter": { - "AlignRight", - "Debug", - "DiscardEmptyColumns", - "Escape", - "FilterHTML", - "NewWriter", - "StripEscape", - "TabIndent", - "Writer", - }, - "text/template": { - "ExecError", - "FuncMap", - "HTMLEscape", - "HTMLEscapeString", - "HTMLEscaper", - "IsTrue", - "JSEscape", - "JSEscapeString", - "JSEscaper", - "Must", - "New", - "ParseFS", - "ParseFiles", - "ParseGlob", - "Template", - "URLQueryEscaper", - }, - "text/template/parse": { - "ActionNode", - "BoolNode", - "BranchNode", - "BreakNode", - "ChainNode", - "CommandNode", - "CommentNode", - "ContinueNode", - "DotNode", - "FieldNode", - "IdentifierNode", - "IfNode", - "IsEmptyTree", - "ListNode", - "Mode", - "New", - "NewIdentifier", - "NilNode", - "Node", - "NodeAction", - "NodeBool", - "NodeBreak", - "NodeChain", - "NodeCommand", - "NodeComment", - "NodeContinue", - "NodeDot", - "NodeField", - "NodeIdentifier", - "NodeIf", - "NodeList", - "NodeNil", - "NodeNumber", - "NodePipe", - "NodeRange", - "NodeString", - "NodeTemplate", - "NodeText", - "NodeType", - "NodeVariable", - "NodeWith", - "NumberNode", - "Parse", - "ParseComments", - "PipeNode", - "Pos", - "RangeNode", - "SkipFuncCheck", - "StringNode", - "TemplateNode", - "TextNode", - "Tree", - "VariableNode", - "WithNode", - }, - "time": { - "ANSIC", - "After", - "AfterFunc", - "April", - "August", - "Date", - "DateOnly", - "DateTime", - "December", - "Duration", - "February", - "FixedZone", - "Friday", - "Hour", - "January", - "July", - "June", - "Kitchen", - "Layout", - "LoadLocation", - "LoadLocationFromTZData", - "Local", - "Location", - "March", - "May", - "Microsecond", - "Millisecond", - "Minute", - "Monday", - "Month", - "Nanosecond", - "NewTicker", - "NewTimer", - "November", - "Now", - "October", - "Parse", - "ParseDuration", - "ParseError", - "ParseInLocation", - "RFC1123", - "RFC1123Z", - "RFC3339", - "RFC3339Nano", - "RFC822", - "RFC822Z", - "RFC850", - "RubyDate", - "Saturday", - "Second", - "September", - "Since", - "Sleep", - "Stamp", - "StampMicro", - "StampMilli", - "StampNano", - "Sunday", - "Thursday", - "Tick", - "Ticker", - "Time", - "TimeOnly", - "Timer", - "Tuesday", - "UTC", - "Unix", - "UnixDate", - "UnixMicro", - "UnixMilli", - "Until", - "Wednesday", - "Weekday", - }, - "unicode": { - "ASCII_Hex_Digit", - "Adlam", - "Ahom", - "Anatolian_Hieroglyphs", - "Arabic", - "Armenian", - "Avestan", - "AzeriCase", - "Balinese", - "Bamum", - "Bassa_Vah", - "Batak", - "Bengali", - "Bhaiksuki", - "Bidi_Control", - "Bopomofo", - "Brahmi", - "Braille", - "Buginese", - "Buhid", - "C", - "Canadian_Aboriginal", - "Carian", - "CaseRange", - "CaseRanges", - "Categories", - "Caucasian_Albanian", - "Cc", - "Cf", - "Chakma", - "Cham", - "Cherokee", - "Chorasmian", - "Co", - "Common", - "Coptic", - "Cs", - "Cuneiform", - "Cypriot", - "Cypro_Minoan", - "Cyrillic", - "Dash", - "Deprecated", - "Deseret", - "Devanagari", - "Diacritic", - "Digit", - "Dives_Akuru", - "Dogra", - "Duployan", - "Egyptian_Hieroglyphs", - "Elbasan", - "Elymaic", - "Ethiopic", - "Extender", - "FoldCategory", - "FoldScript", - "Georgian", - "Glagolitic", - "Gothic", - "Grantha", - "GraphicRanges", - "Greek", - "Gujarati", - "Gunjala_Gondi", - "Gurmukhi", - "Han", - "Hangul", - "Hanifi_Rohingya", - "Hanunoo", - "Hatran", - "Hebrew", - "Hex_Digit", - "Hiragana", - "Hyphen", - "IDS_Binary_Operator", - "IDS_Trinary_Operator", - "Ideographic", - "Imperial_Aramaic", - "In", - "Inherited", - "Inscriptional_Pahlavi", - "Inscriptional_Parthian", - "Is", - "IsControl", - "IsDigit", - "IsGraphic", - "IsLetter", - "IsLower", - "IsMark", - "IsNumber", - "IsOneOf", - "IsPrint", - "IsPunct", - "IsSpace", - "IsSymbol", - "IsTitle", - "IsUpper", - "Javanese", - "Join_Control", - "Kaithi", - "Kannada", - "Katakana", - "Kawi", - "Kayah_Li", - "Kharoshthi", - "Khitan_Small_Script", - "Khmer", - "Khojki", - "Khudawadi", - "L", - "Lao", - "Latin", - "Lepcha", - "Letter", - "Limbu", - "Linear_A", - "Linear_B", - "Lisu", - "Ll", - "Lm", - "Lo", - "Logical_Order_Exception", - "Lower", - "LowerCase", - "Lt", - "Lu", - "Lycian", - "Lydian", - "M", - "Mahajani", - "Makasar", - "Malayalam", - "Mandaic", - "Manichaean", - "Marchen", - "Mark", - "Masaram_Gondi", - "MaxASCII", - "MaxCase", - "MaxLatin1", - "MaxRune", - "Mc", - "Me", - "Medefaidrin", - "Meetei_Mayek", - "Mende_Kikakui", - "Meroitic_Cursive", - "Meroitic_Hieroglyphs", - "Miao", - "Mn", - "Modi", - "Mongolian", - "Mro", - "Multani", - "Myanmar", - "N", - "Nabataean", - "Nag_Mundari", - "Nandinagari", - "Nd", - "New_Tai_Lue", - "Newa", - "Nko", - "Nl", - "No", - "Noncharacter_Code_Point", - "Number", - "Nushu", - "Nyiakeng_Puachue_Hmong", - "Ogham", - "Ol_Chiki", - "Old_Hungarian", - "Old_Italic", - "Old_North_Arabian", - "Old_Permic", - "Old_Persian", - "Old_Sogdian", - "Old_South_Arabian", - "Old_Turkic", - "Old_Uyghur", - "Oriya", - "Osage", - "Osmanya", - "Other", - "Other_Alphabetic", - "Other_Default_Ignorable_Code_Point", - "Other_Grapheme_Extend", - "Other_ID_Continue", - "Other_ID_Start", - "Other_Lowercase", - "Other_Math", - "Other_Uppercase", - "P", - "Pahawh_Hmong", - "Palmyrene", - "Pattern_Syntax", - "Pattern_White_Space", - "Pau_Cin_Hau", - "Pc", - "Pd", - "Pe", - "Pf", - "Phags_Pa", - "Phoenician", - "Pi", - "Po", - "Prepended_Concatenation_Mark", - "PrintRanges", - "Properties", - "Ps", - "Psalter_Pahlavi", - "Punct", - "Quotation_Mark", - "Radical", - "Range16", - "Range32", - "RangeTable", - "Regional_Indicator", - "Rejang", - "ReplacementChar", - "Runic", - "S", - "STerm", - "Samaritan", - "Saurashtra", - "Sc", - "Scripts", - "Sentence_Terminal", - "Sharada", - "Shavian", - "Siddham", - "SignWriting", - "SimpleFold", - "Sinhala", - "Sk", - "Sm", - "So", - "Soft_Dotted", - "Sogdian", - "Sora_Sompeng", - "Soyombo", - "Space", - "SpecialCase", - "Sundanese", - "Syloti_Nagri", - "Symbol", - "Syriac", - "Tagalog", - "Tagbanwa", - "Tai_Le", - "Tai_Tham", - "Tai_Viet", - "Takri", - "Tamil", - "Tangsa", - "Tangut", - "Telugu", - "Terminal_Punctuation", - "Thaana", - "Thai", - "Tibetan", - "Tifinagh", - "Tirhuta", - "Title", - "TitleCase", - "To", - "ToLower", - "ToTitle", - "ToUpper", - "Toto", - "TurkishCase", - "Ugaritic", - "Unified_Ideograph", - "Upper", - "UpperCase", - "UpperLower", - "Vai", - "Variation_Selector", - "Version", - "Vithkuqi", - "Wancho", - "Warang_Citi", - "White_Space", - "Yezidi", - "Yi", - "Z", - "Zanabazar_Square", - "Zl", - "Zp", - "Zs", - }, - "unicode/utf16": { - "AppendRune", - "Decode", - "DecodeRune", - "Encode", - "EncodeRune", - "IsSurrogate", - }, - "unicode/utf8": { - "AppendRune", - "DecodeLastRune", - "DecodeLastRuneInString", - "DecodeRune", - "DecodeRuneInString", - "EncodeRune", - "FullRune", - "FullRuneInString", - "MaxRune", - "RuneCount", - "RuneCountInString", - "RuneError", - "RuneLen", - "RuneSelf", - "RuneStart", - "UTFMax", - "Valid", - "ValidRune", - "ValidString", - }, - "unsafe": { - "Add", - "Alignof", - "Offsetof", - "Pointer", - "Sizeof", - "Slice", - "SliceData", - "String", - "StringData", - }, -} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/pkgbits/decoder.go b/pkg/k8s/vendor/golang.org/x/tools/internal/pkgbits/decoder.go index b92e8e6eb32..2acd85851e3 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/pkgbits/decoder.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/pkgbits/decoder.go @@ -23,6 +23,9 @@ type PkgDecoder struct { // version is the file format version. version uint32 + // aliases determines whether types.Aliases should be created + aliases bool + // sync indicates whether the file uses sync markers. sync bool @@ -73,6 +76,7 @@ func (pr *PkgDecoder) SyncMarkers() bool { return pr.sync } func NewPkgDecoder(pkgPath, input string) PkgDecoder { pr := PkgDecoder{ pkgPath: pkgPath, + //aliases: aliases.Enabled(), } // TODO(mdempsky): Implement direct indexing of input string to diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/pkg/k8s/vendor/golang.org/x/tools/internal/stdlib/manifest.go new file mode 100644 index 00000000000..fd6892075ee --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/stdlib/manifest.go @@ -0,0 +1,17320 @@ +// Copyright 2024 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. + +// Code generated by generate.go. DO NOT EDIT. + +package stdlib + +var PackageSymbols = map[string][]Symbol{ + "archive/tar": { + {"(*Header).FileInfo", Method, 1}, + {"(*Reader).Next", Method, 0}, + {"(*Reader).Read", Method, 0}, + {"(*Writer).AddFS", Method, 22}, + {"(*Writer).Close", Method, 0}, + {"(*Writer).Flush", Method, 0}, + {"(*Writer).Write", Method, 0}, + {"(*Writer).WriteHeader", Method, 0}, + {"(Format).String", Method, 10}, + {"ErrFieldTooLong", Var, 0}, + {"ErrHeader", Var, 0}, + {"ErrInsecurePath", Var, 20}, + {"ErrWriteAfterClose", Var, 0}, + {"ErrWriteTooLong", Var, 0}, + {"FileInfoHeader", Func, 1}, + {"Format", Type, 10}, + {"FormatGNU", Const, 10}, + {"FormatPAX", Const, 10}, + {"FormatUSTAR", Const, 10}, + {"FormatUnknown", Const, 10}, + {"Header", Type, 0}, + {"Header.AccessTime", Field, 0}, + {"Header.ChangeTime", Field, 0}, + {"Header.Devmajor", Field, 0}, + {"Header.Devminor", Field, 0}, + {"Header.Format", Field, 10}, + {"Header.Gid", Field, 0}, + {"Header.Gname", Field, 0}, + {"Header.Linkname", Field, 0}, + {"Header.ModTime", Field, 0}, + {"Header.Mode", Field, 0}, + {"Header.Name", Field, 0}, + {"Header.PAXRecords", Field, 10}, + {"Header.Size", Field, 0}, + {"Header.Typeflag", Field, 0}, + {"Header.Uid", Field, 0}, + {"Header.Uname", Field, 0}, + {"Header.Xattrs", Field, 3}, + {"NewReader", Func, 0}, + {"NewWriter", Func, 0}, + {"Reader", Type, 0}, + {"TypeBlock", Const, 0}, + {"TypeChar", Const, 0}, + {"TypeCont", Const, 0}, + {"TypeDir", Const, 0}, + {"TypeFifo", Const, 0}, + {"TypeGNULongLink", Const, 1}, + {"TypeGNULongName", Const, 1}, + {"TypeGNUSparse", Const, 3}, + {"TypeLink", Const, 0}, + {"TypeReg", Const, 0}, + {"TypeRegA", Const, 0}, + {"TypeSymlink", Const, 0}, + {"TypeXGlobalHeader", Const, 0}, + {"TypeXHeader", Const, 0}, + {"Writer", Type, 0}, + }, + "archive/zip": { + {"(*File).DataOffset", Method, 2}, + {"(*File).FileInfo", Method, 0}, + {"(*File).ModTime", Method, 0}, + {"(*File).Mode", Method, 0}, + {"(*File).Open", Method, 0}, + {"(*File).OpenRaw", Method, 17}, + {"(*File).SetModTime", Method, 0}, + {"(*File).SetMode", Method, 0}, + {"(*FileHeader).FileInfo", Method, 0}, + {"(*FileHeader).ModTime", Method, 0}, + {"(*FileHeader).Mode", Method, 0}, + {"(*FileHeader).SetModTime", Method, 0}, + {"(*FileHeader).SetMode", Method, 0}, + {"(*ReadCloser).Close", Method, 0}, + {"(*ReadCloser).Open", Method, 16}, + {"(*ReadCloser).RegisterDecompressor", Method, 6}, + {"(*Reader).Open", Method, 16}, + {"(*Reader).RegisterDecompressor", Method, 6}, + {"(*Writer).AddFS", Method, 22}, + {"(*Writer).Close", Method, 0}, + {"(*Writer).Copy", Method, 17}, + {"(*Writer).Create", Method, 0}, + {"(*Writer).CreateHeader", Method, 0}, + {"(*Writer).CreateRaw", Method, 17}, + {"(*Writer).Flush", Method, 4}, + {"(*Writer).RegisterCompressor", Method, 6}, + {"(*Writer).SetComment", Method, 10}, + {"(*Writer).SetOffset", Method, 5}, + {"Compressor", Type, 2}, + {"Decompressor", Type, 2}, + {"Deflate", Const, 0}, + {"ErrAlgorithm", Var, 0}, + {"ErrChecksum", Var, 0}, + {"ErrFormat", Var, 0}, + {"ErrInsecurePath", Var, 20}, + {"File", Type, 0}, + {"File.FileHeader", Field, 0}, + {"FileHeader", Type, 0}, + {"FileHeader.CRC32", Field, 0}, + {"FileHeader.Comment", Field, 0}, + {"FileHeader.CompressedSize", Field, 0}, + {"FileHeader.CompressedSize64", Field, 1}, + {"FileHeader.CreatorVersion", Field, 0}, + {"FileHeader.ExternalAttrs", Field, 0}, + {"FileHeader.Extra", Field, 0}, + {"FileHeader.Flags", Field, 0}, + {"FileHeader.Method", Field, 0}, + {"FileHeader.Modified", Field, 10}, + {"FileHeader.ModifiedDate", Field, 0}, + {"FileHeader.ModifiedTime", Field, 0}, + {"FileHeader.Name", Field, 0}, + {"FileHeader.NonUTF8", Field, 10}, + {"FileHeader.ReaderVersion", Field, 0}, + {"FileHeader.UncompressedSize", Field, 0}, + {"FileHeader.UncompressedSize64", Field, 1}, + {"FileInfoHeader", Func, 0}, + {"NewReader", Func, 0}, + {"NewWriter", Func, 0}, + {"OpenReader", Func, 0}, + {"ReadCloser", Type, 0}, + {"ReadCloser.Reader", Field, 0}, + {"Reader", Type, 0}, + {"Reader.Comment", Field, 0}, + {"Reader.File", Field, 0}, + {"RegisterCompressor", Func, 2}, + {"RegisterDecompressor", Func, 2}, + {"Store", Const, 0}, + {"Writer", Type, 0}, + }, + "bufio": { + {"(*Reader).Buffered", Method, 0}, + {"(*Reader).Discard", Method, 5}, + {"(*Reader).Peek", Method, 0}, + {"(*Reader).Read", Method, 0}, + {"(*Reader).ReadByte", Method, 0}, + {"(*Reader).ReadBytes", Method, 0}, + {"(*Reader).ReadLine", Method, 0}, + {"(*Reader).ReadRune", Method, 0}, + {"(*Reader).ReadSlice", Method, 0}, + {"(*Reader).ReadString", Method, 0}, + {"(*Reader).Reset", Method, 2}, + {"(*Reader).Size", Method, 10}, + {"(*Reader).UnreadByte", Method, 0}, + {"(*Reader).UnreadRune", Method, 0}, + {"(*Reader).WriteTo", Method, 1}, + {"(*Scanner).Buffer", Method, 6}, + {"(*Scanner).Bytes", Method, 1}, + {"(*Scanner).Err", Method, 1}, + {"(*Scanner).Scan", Method, 1}, + {"(*Scanner).Split", Method, 1}, + {"(*Scanner).Text", Method, 1}, + {"(*Writer).Available", Method, 0}, + {"(*Writer).AvailableBuffer", Method, 18}, + {"(*Writer).Buffered", Method, 0}, + {"(*Writer).Flush", Method, 0}, + {"(*Writer).ReadFrom", Method, 1}, + {"(*Writer).Reset", Method, 2}, + {"(*Writer).Size", Method, 10}, + {"(*Writer).Write", Method, 0}, + {"(*Writer).WriteByte", Method, 0}, + {"(*Writer).WriteRune", Method, 0}, + {"(*Writer).WriteString", Method, 0}, + {"(ReadWriter).Available", Method, 0}, + {"(ReadWriter).AvailableBuffer", Method, 18}, + {"(ReadWriter).Discard", Method, 5}, + {"(ReadWriter).Flush", Method, 0}, + {"(ReadWriter).Peek", Method, 0}, + {"(ReadWriter).Read", Method, 0}, + {"(ReadWriter).ReadByte", Method, 0}, + {"(ReadWriter).ReadBytes", Method, 0}, + {"(ReadWriter).ReadFrom", Method, 1}, + {"(ReadWriter).ReadLine", Method, 0}, + {"(ReadWriter).ReadRune", Method, 0}, + {"(ReadWriter).ReadSlice", Method, 0}, + {"(ReadWriter).ReadString", Method, 0}, + {"(ReadWriter).UnreadByte", Method, 0}, + {"(ReadWriter).UnreadRune", Method, 0}, + {"(ReadWriter).Write", Method, 0}, + {"(ReadWriter).WriteByte", Method, 0}, + {"(ReadWriter).WriteRune", Method, 0}, + {"(ReadWriter).WriteString", Method, 0}, + {"(ReadWriter).WriteTo", Method, 1}, + {"ErrAdvanceTooFar", Var, 1}, + {"ErrBadReadCount", Var, 15}, + {"ErrBufferFull", Var, 0}, + {"ErrFinalToken", Var, 6}, + {"ErrInvalidUnreadByte", Var, 0}, + {"ErrInvalidUnreadRune", Var, 0}, + {"ErrNegativeAdvance", Var, 1}, + {"ErrNegativeCount", Var, 0}, + {"ErrTooLong", Var, 1}, + {"MaxScanTokenSize", Const, 1}, + {"NewReadWriter", Func, 0}, + {"NewReader", Func, 0}, + {"NewReaderSize", Func, 0}, + {"NewScanner", Func, 1}, + {"NewWriter", Func, 0}, + {"NewWriterSize", Func, 0}, + {"ReadWriter", Type, 0}, + {"ReadWriter.Reader", Field, 0}, + {"ReadWriter.Writer", Field, 0}, + {"Reader", Type, 0}, + {"ScanBytes", Func, 1}, + {"ScanLines", Func, 1}, + {"ScanRunes", Func, 1}, + {"ScanWords", Func, 1}, + {"Scanner", Type, 1}, + {"SplitFunc", Type, 1}, + {"Writer", Type, 0}, + }, + "bytes": { + {"(*Buffer).Available", Method, 21}, + {"(*Buffer).AvailableBuffer", Method, 21}, + {"(*Buffer).Bytes", Method, 0}, + {"(*Buffer).Cap", Method, 5}, + {"(*Buffer).Grow", Method, 1}, + {"(*Buffer).Len", Method, 0}, + {"(*Buffer).Next", Method, 0}, + {"(*Buffer).Read", Method, 0}, + {"(*Buffer).ReadByte", Method, 0}, + {"(*Buffer).ReadBytes", Method, 0}, + {"(*Buffer).ReadFrom", Method, 0}, + {"(*Buffer).ReadRune", Method, 0}, + {"(*Buffer).ReadString", Method, 0}, + {"(*Buffer).Reset", Method, 0}, + {"(*Buffer).String", Method, 0}, + {"(*Buffer).Truncate", Method, 0}, + {"(*Buffer).UnreadByte", Method, 0}, + {"(*Buffer).UnreadRune", Method, 0}, + {"(*Buffer).Write", Method, 0}, + {"(*Buffer).WriteByte", Method, 0}, + {"(*Buffer).WriteRune", Method, 0}, + {"(*Buffer).WriteString", Method, 0}, + {"(*Buffer).WriteTo", Method, 0}, + {"(*Reader).Len", Method, 0}, + {"(*Reader).Read", Method, 0}, + {"(*Reader).ReadAt", Method, 0}, + {"(*Reader).ReadByte", Method, 0}, + {"(*Reader).ReadRune", Method, 0}, + {"(*Reader).Reset", Method, 7}, + {"(*Reader).Seek", Method, 0}, + {"(*Reader).Size", Method, 5}, + {"(*Reader).UnreadByte", Method, 0}, + {"(*Reader).UnreadRune", Method, 0}, + {"(*Reader).WriteTo", Method, 1}, + {"Buffer", Type, 0}, + {"Clone", Func, 20}, + {"Compare", Func, 0}, + {"Contains", Func, 0}, + {"ContainsAny", Func, 7}, + {"ContainsFunc", Func, 21}, + {"ContainsRune", Func, 7}, + {"Count", Func, 0}, + {"Cut", Func, 18}, + {"CutPrefix", Func, 20}, + {"CutSuffix", Func, 20}, + {"Equal", Func, 0}, + {"EqualFold", Func, 0}, + {"ErrTooLarge", Var, 0}, + {"Fields", Func, 0}, + {"FieldsFunc", Func, 0}, + {"HasPrefix", Func, 0}, + {"HasSuffix", Func, 0}, + {"Index", Func, 0}, + {"IndexAny", Func, 0}, + {"IndexByte", Func, 0}, + {"IndexFunc", Func, 0}, + {"IndexRune", Func, 0}, + {"Join", Func, 0}, + {"LastIndex", Func, 0}, + {"LastIndexAny", Func, 0}, + {"LastIndexByte", Func, 5}, + {"LastIndexFunc", Func, 0}, + {"Map", Func, 0}, + {"MinRead", Const, 0}, + {"NewBuffer", Func, 0}, + {"NewBufferString", Func, 0}, + {"NewReader", Func, 0}, + {"Reader", Type, 0}, + {"Repeat", Func, 0}, + {"Replace", Func, 0}, + {"ReplaceAll", Func, 12}, + {"Runes", Func, 0}, + {"Split", Func, 0}, + {"SplitAfter", Func, 0}, + {"SplitAfterN", Func, 0}, + {"SplitN", Func, 0}, + {"Title", Func, 0}, + {"ToLower", Func, 0}, + {"ToLowerSpecial", Func, 0}, + {"ToTitle", Func, 0}, + {"ToTitleSpecial", Func, 0}, + {"ToUpper", Func, 0}, + {"ToUpperSpecial", Func, 0}, + {"ToValidUTF8", Func, 13}, + {"Trim", Func, 0}, + {"TrimFunc", Func, 0}, + {"TrimLeft", Func, 0}, + {"TrimLeftFunc", Func, 0}, + {"TrimPrefix", Func, 1}, + {"TrimRight", Func, 0}, + {"TrimRightFunc", Func, 0}, + {"TrimSpace", Func, 0}, + {"TrimSuffix", Func, 1}, + }, + "cmp": { + {"Compare", Func, 21}, + {"Less", Func, 21}, + {"Or", Func, 22}, + {"Ordered", Type, 21}, + }, + "compress/bzip2": { + {"(StructuralError).Error", Method, 0}, + {"NewReader", Func, 0}, + {"StructuralError", Type, 0}, + }, + "compress/flate": { + {"(*ReadError).Error", Method, 0}, + {"(*WriteError).Error", Method, 0}, + {"(*Writer).Close", Method, 0}, + {"(*Writer).Flush", Method, 0}, + {"(*Writer).Reset", Method, 2}, + {"(*Writer).Write", Method, 0}, + {"(CorruptInputError).Error", Method, 0}, + {"(InternalError).Error", Method, 0}, + {"BestCompression", Const, 0}, + {"BestSpeed", Const, 0}, + {"CorruptInputError", Type, 0}, + {"DefaultCompression", Const, 0}, + {"HuffmanOnly", Const, 7}, + {"InternalError", Type, 0}, + {"NewReader", Func, 0}, + {"NewReaderDict", Func, 0}, + {"NewWriter", Func, 0}, + {"NewWriterDict", Func, 0}, + {"NoCompression", Const, 0}, + {"ReadError", Type, 0}, + {"ReadError.Err", Field, 0}, + {"ReadError.Offset", Field, 0}, + {"Reader", Type, 0}, + {"Resetter", Type, 4}, + {"WriteError", Type, 0}, + {"WriteError.Err", Field, 0}, + {"WriteError.Offset", Field, 0}, + {"Writer", Type, 0}, + }, + "compress/gzip": { + {"(*Reader).Close", Method, 0}, + {"(*Reader).Multistream", Method, 4}, + {"(*Reader).Read", Method, 0}, + {"(*Reader).Reset", Method, 3}, + {"(*Writer).Close", Method, 0}, + {"(*Writer).Flush", Method, 1}, + {"(*Writer).Reset", Method, 2}, + {"(*Writer).Write", Method, 0}, + {"BestCompression", Const, 0}, + {"BestSpeed", Const, 0}, + {"DefaultCompression", Const, 0}, + {"ErrChecksum", Var, 0}, + {"ErrHeader", Var, 0}, + {"Header", Type, 0}, + {"Header.Comment", Field, 0}, + {"Header.Extra", Field, 0}, + {"Header.ModTime", Field, 0}, + {"Header.Name", Field, 0}, + {"Header.OS", Field, 0}, + {"HuffmanOnly", Const, 8}, + {"NewReader", Func, 0}, + {"NewWriter", Func, 0}, + {"NewWriterLevel", Func, 0}, + {"NoCompression", Const, 0}, + {"Reader", Type, 0}, + {"Reader.Header", Field, 0}, + {"Writer", Type, 0}, + {"Writer.Header", Field, 0}, + }, + "compress/lzw": { + {"(*Reader).Close", Method, 17}, + {"(*Reader).Read", Method, 17}, + {"(*Reader).Reset", Method, 17}, + {"(*Writer).Close", Method, 17}, + {"(*Writer).Reset", Method, 17}, + {"(*Writer).Write", Method, 17}, + {"LSB", Const, 0}, + {"MSB", Const, 0}, + {"NewReader", Func, 0}, + {"NewWriter", Func, 0}, + {"Order", Type, 0}, + {"Reader", Type, 17}, + {"Writer", Type, 17}, + }, + "compress/zlib": { + {"(*Writer).Close", Method, 0}, + {"(*Writer).Flush", Method, 0}, + {"(*Writer).Reset", Method, 2}, + {"(*Writer).Write", Method, 0}, + {"BestCompression", Const, 0}, + {"BestSpeed", Const, 0}, + {"DefaultCompression", Const, 0}, + {"ErrChecksum", Var, 0}, + {"ErrDictionary", Var, 0}, + {"ErrHeader", Var, 0}, + {"HuffmanOnly", Const, 8}, + {"NewReader", Func, 0}, + {"NewReaderDict", Func, 0}, + {"NewWriter", Func, 0}, + {"NewWriterLevel", Func, 0}, + {"NewWriterLevelDict", Func, 0}, + {"NoCompression", Const, 0}, + {"Resetter", Type, 4}, + {"Writer", Type, 0}, + }, + "container/heap": { + {"Fix", Func, 2}, + {"Init", Func, 0}, + {"Interface", Type, 0}, + {"Pop", Func, 0}, + {"Push", Func, 0}, + {"Remove", Func, 0}, + }, + "container/list": { + {"(*Element).Next", Method, 0}, + {"(*Element).Prev", Method, 0}, + {"(*List).Back", Method, 0}, + {"(*List).Front", Method, 0}, + {"(*List).Init", Method, 0}, + {"(*List).InsertAfter", Method, 0}, + {"(*List).InsertBefore", Method, 0}, + {"(*List).Len", Method, 0}, + {"(*List).MoveAfter", Method, 2}, + {"(*List).MoveBefore", Method, 2}, + {"(*List).MoveToBack", Method, 0}, + {"(*List).MoveToFront", Method, 0}, + {"(*List).PushBack", Method, 0}, + {"(*List).PushBackList", Method, 0}, + {"(*List).PushFront", Method, 0}, + {"(*List).PushFrontList", Method, 0}, + {"(*List).Remove", Method, 0}, + {"Element", Type, 0}, + {"Element.Value", Field, 0}, + {"List", Type, 0}, + {"New", Func, 0}, + }, + "container/ring": { + {"(*Ring).Do", Method, 0}, + {"(*Ring).Len", Method, 0}, + {"(*Ring).Link", Method, 0}, + {"(*Ring).Move", Method, 0}, + {"(*Ring).Next", Method, 0}, + {"(*Ring).Prev", Method, 0}, + {"(*Ring).Unlink", Method, 0}, + {"New", Func, 0}, + {"Ring", Type, 0}, + {"Ring.Value", Field, 0}, + }, + "context": { + {"AfterFunc", Func, 21}, + {"Background", Func, 7}, + {"CancelCauseFunc", Type, 20}, + {"CancelFunc", Type, 7}, + {"Canceled", Var, 7}, + {"Cause", Func, 20}, + {"Context", Type, 7}, + {"DeadlineExceeded", Var, 7}, + {"TODO", Func, 7}, + {"WithCancel", Func, 7}, + {"WithCancelCause", Func, 20}, + {"WithDeadline", Func, 7}, + {"WithDeadlineCause", Func, 21}, + {"WithTimeout", Func, 7}, + {"WithTimeoutCause", Func, 21}, + {"WithValue", Func, 7}, + {"WithoutCancel", Func, 21}, + }, + "crypto": { + {"(Hash).Available", Method, 0}, + {"(Hash).HashFunc", Method, 4}, + {"(Hash).New", Method, 0}, + {"(Hash).Size", Method, 0}, + {"(Hash).String", Method, 15}, + {"BLAKE2b_256", Const, 9}, + {"BLAKE2b_384", Const, 9}, + {"BLAKE2b_512", Const, 9}, + {"BLAKE2s_256", Const, 9}, + {"Decrypter", Type, 5}, + {"DecrypterOpts", Type, 5}, + {"Hash", Type, 0}, + {"MD4", Const, 0}, + {"MD5", Const, 0}, + {"MD5SHA1", Const, 0}, + {"PrivateKey", Type, 0}, + {"PublicKey", Type, 2}, + {"RIPEMD160", Const, 0}, + {"RegisterHash", Func, 0}, + {"SHA1", Const, 0}, + {"SHA224", Const, 0}, + {"SHA256", Const, 0}, + {"SHA384", Const, 0}, + {"SHA3_224", Const, 4}, + {"SHA3_256", Const, 4}, + {"SHA3_384", Const, 4}, + {"SHA3_512", Const, 4}, + {"SHA512", Const, 0}, + {"SHA512_224", Const, 5}, + {"SHA512_256", Const, 5}, + {"Signer", Type, 4}, + {"SignerOpts", Type, 4}, + }, + "crypto/aes": { + {"(KeySizeError).Error", Method, 0}, + {"BlockSize", Const, 0}, + {"KeySizeError", Type, 0}, + {"NewCipher", Func, 0}, + }, + "crypto/cipher": { + {"(StreamReader).Read", Method, 0}, + {"(StreamWriter).Close", Method, 0}, + {"(StreamWriter).Write", Method, 0}, + {"AEAD", Type, 2}, + {"Block", Type, 0}, + {"BlockMode", Type, 0}, + {"NewCBCDecrypter", Func, 0}, + {"NewCBCEncrypter", Func, 0}, + {"NewCFBDecrypter", Func, 0}, + {"NewCFBEncrypter", Func, 0}, + {"NewCTR", Func, 0}, + {"NewGCM", Func, 2}, + {"NewGCMWithNonceSize", Func, 5}, + {"NewGCMWithTagSize", Func, 11}, + {"NewOFB", Func, 0}, + {"Stream", Type, 0}, + {"StreamReader", Type, 0}, + {"StreamReader.R", Field, 0}, + {"StreamReader.S", Field, 0}, + {"StreamWriter", Type, 0}, + {"StreamWriter.Err", Field, 0}, + {"StreamWriter.S", Field, 0}, + {"StreamWriter.W", Field, 0}, + }, + "crypto/des": { + {"(KeySizeError).Error", Method, 0}, + {"BlockSize", Const, 0}, + {"KeySizeError", Type, 0}, + {"NewCipher", Func, 0}, + {"NewTripleDESCipher", Func, 0}, + }, + "crypto/dsa": { + {"ErrInvalidPublicKey", Var, 0}, + {"GenerateKey", Func, 0}, + {"GenerateParameters", Func, 0}, + {"L1024N160", Const, 0}, + {"L2048N224", Const, 0}, + {"L2048N256", Const, 0}, + {"L3072N256", Const, 0}, + {"ParameterSizes", Type, 0}, + {"Parameters", Type, 0}, + {"Parameters.G", Field, 0}, + {"Parameters.P", Field, 0}, + {"Parameters.Q", Field, 0}, + {"PrivateKey", Type, 0}, + {"PrivateKey.PublicKey", Field, 0}, + {"PrivateKey.X", Field, 0}, + {"PublicKey", Type, 0}, + {"PublicKey.Parameters", Field, 0}, + {"PublicKey.Y", Field, 0}, + {"Sign", Func, 0}, + {"Verify", Func, 0}, + }, + "crypto/ecdh": { + {"(*PrivateKey).Bytes", Method, 20}, + {"(*PrivateKey).Curve", Method, 20}, + {"(*PrivateKey).ECDH", Method, 20}, + {"(*PrivateKey).Equal", Method, 20}, + {"(*PrivateKey).Public", Method, 20}, + {"(*PrivateKey).PublicKey", Method, 20}, + {"(*PublicKey).Bytes", Method, 20}, + {"(*PublicKey).Curve", Method, 20}, + {"(*PublicKey).Equal", Method, 20}, + {"Curve", Type, 20}, + {"P256", Func, 20}, + {"P384", Func, 20}, + {"P521", Func, 20}, + {"PrivateKey", Type, 20}, + {"PublicKey", Type, 20}, + {"X25519", Func, 20}, + }, + "crypto/ecdsa": { + {"(*PrivateKey).ECDH", Method, 20}, + {"(*PrivateKey).Equal", Method, 15}, + {"(*PrivateKey).Public", Method, 4}, + {"(*PrivateKey).Sign", Method, 4}, + {"(*PublicKey).ECDH", Method, 20}, + {"(*PublicKey).Equal", Method, 15}, + {"(PrivateKey).Add", Method, 0}, + {"(PrivateKey).Double", Method, 0}, + {"(PrivateKey).IsOnCurve", Method, 0}, + {"(PrivateKey).Params", Method, 0}, + {"(PrivateKey).ScalarBaseMult", Method, 0}, + {"(PrivateKey).ScalarMult", Method, 0}, + {"(PublicKey).Add", Method, 0}, + {"(PublicKey).Double", Method, 0}, + {"(PublicKey).IsOnCurve", Method, 0}, + {"(PublicKey).Params", Method, 0}, + {"(PublicKey).ScalarBaseMult", Method, 0}, + {"(PublicKey).ScalarMult", Method, 0}, + {"GenerateKey", Func, 0}, + {"PrivateKey", Type, 0}, + {"PrivateKey.D", Field, 0}, + {"PrivateKey.PublicKey", Field, 0}, + {"PublicKey", Type, 0}, + {"PublicKey.Curve", Field, 0}, + {"PublicKey.X", Field, 0}, + {"PublicKey.Y", Field, 0}, + {"Sign", Func, 0}, + {"SignASN1", Func, 15}, + {"Verify", Func, 0}, + {"VerifyASN1", Func, 15}, + }, + "crypto/ed25519": { + {"(*Options).HashFunc", Method, 20}, + {"(PrivateKey).Equal", Method, 15}, + {"(PrivateKey).Public", Method, 13}, + {"(PrivateKey).Seed", Method, 13}, + {"(PrivateKey).Sign", Method, 13}, + {"(PublicKey).Equal", Method, 15}, + {"GenerateKey", Func, 13}, + {"NewKeyFromSeed", Func, 13}, + {"Options", Type, 20}, + {"Options.Context", Field, 20}, + {"Options.Hash", Field, 20}, + {"PrivateKey", Type, 13}, + {"PrivateKeySize", Const, 13}, + {"PublicKey", Type, 13}, + {"PublicKeySize", Const, 13}, + {"SeedSize", Const, 13}, + {"Sign", Func, 13}, + {"SignatureSize", Const, 13}, + {"Verify", Func, 13}, + {"VerifyWithOptions", Func, 20}, + }, + "crypto/elliptic": { + {"(*CurveParams).Add", Method, 0}, + {"(*CurveParams).Double", Method, 0}, + {"(*CurveParams).IsOnCurve", Method, 0}, + {"(*CurveParams).Params", Method, 0}, + {"(*CurveParams).ScalarBaseMult", Method, 0}, + {"(*CurveParams).ScalarMult", Method, 0}, + {"Curve", Type, 0}, + {"CurveParams", Type, 0}, + {"CurveParams.B", Field, 0}, + {"CurveParams.BitSize", Field, 0}, + {"CurveParams.Gx", Field, 0}, + {"CurveParams.Gy", Field, 0}, + {"CurveParams.N", Field, 0}, + {"CurveParams.Name", Field, 5}, + {"CurveParams.P", Field, 0}, + {"GenerateKey", Func, 0}, + {"Marshal", Func, 0}, + {"MarshalCompressed", Func, 15}, + {"P224", Func, 0}, + {"P256", Func, 0}, + {"P384", Func, 0}, + {"P521", Func, 0}, + {"Unmarshal", Func, 0}, + {"UnmarshalCompressed", Func, 15}, + }, + "crypto/hmac": { + {"Equal", Func, 1}, + {"New", Func, 0}, + }, + "crypto/md5": { + {"BlockSize", Const, 0}, + {"New", Func, 0}, + {"Size", Const, 0}, + {"Sum", Func, 2}, + }, + "crypto/rand": { + {"Int", Func, 0}, + {"Prime", Func, 0}, + {"Read", Func, 0}, + {"Reader", Var, 0}, + }, + "crypto/rc4": { + {"(*Cipher).Reset", Method, 0}, + {"(*Cipher).XORKeyStream", Method, 0}, + {"(KeySizeError).Error", Method, 0}, + {"Cipher", Type, 0}, + {"KeySizeError", Type, 0}, + {"NewCipher", Func, 0}, + }, + "crypto/rsa": { + {"(*PSSOptions).HashFunc", Method, 4}, + {"(*PrivateKey).Decrypt", Method, 5}, + {"(*PrivateKey).Equal", Method, 15}, + {"(*PrivateKey).Precompute", Method, 0}, + {"(*PrivateKey).Public", Method, 4}, + {"(*PrivateKey).Sign", Method, 4}, + {"(*PrivateKey).Size", Method, 11}, + {"(*PrivateKey).Validate", Method, 0}, + {"(*PublicKey).Equal", Method, 15}, + {"(*PublicKey).Size", Method, 11}, + {"CRTValue", Type, 0}, + {"CRTValue.Coeff", Field, 0}, + {"CRTValue.Exp", Field, 0}, + {"CRTValue.R", Field, 0}, + {"DecryptOAEP", Func, 0}, + {"DecryptPKCS1v15", Func, 0}, + {"DecryptPKCS1v15SessionKey", Func, 0}, + {"EncryptOAEP", Func, 0}, + {"EncryptPKCS1v15", Func, 0}, + {"ErrDecryption", Var, 0}, + {"ErrMessageTooLong", Var, 0}, + {"ErrVerification", Var, 0}, + {"GenerateKey", Func, 0}, + {"GenerateMultiPrimeKey", Func, 0}, + {"OAEPOptions", Type, 5}, + {"OAEPOptions.Hash", Field, 5}, + {"OAEPOptions.Label", Field, 5}, + {"OAEPOptions.MGFHash", Field, 20}, + {"PKCS1v15DecryptOptions", Type, 5}, + {"PKCS1v15DecryptOptions.SessionKeyLen", Field, 5}, + {"PSSOptions", Type, 2}, + {"PSSOptions.Hash", Field, 4}, + {"PSSOptions.SaltLength", Field, 2}, + {"PSSSaltLengthAuto", Const, 2}, + {"PSSSaltLengthEqualsHash", Const, 2}, + {"PrecomputedValues", Type, 0}, + {"PrecomputedValues.CRTValues", Field, 0}, + {"PrecomputedValues.Dp", Field, 0}, + {"PrecomputedValues.Dq", Field, 0}, + {"PrecomputedValues.Qinv", Field, 0}, + {"PrivateKey", Type, 0}, + {"PrivateKey.D", Field, 0}, + {"PrivateKey.Precomputed", Field, 0}, + {"PrivateKey.Primes", Field, 0}, + {"PrivateKey.PublicKey", Field, 0}, + {"PublicKey", Type, 0}, + {"PublicKey.E", Field, 0}, + {"PublicKey.N", Field, 0}, + {"SignPKCS1v15", Func, 0}, + {"SignPSS", Func, 2}, + {"VerifyPKCS1v15", Func, 0}, + {"VerifyPSS", Func, 2}, + }, + "crypto/sha1": { + {"BlockSize", Const, 0}, + {"New", Func, 0}, + {"Size", Const, 0}, + {"Sum", Func, 2}, + }, + "crypto/sha256": { + {"BlockSize", Const, 0}, + {"New", Func, 0}, + {"New224", Func, 0}, + {"Size", Const, 0}, + {"Size224", Const, 0}, + {"Sum224", Func, 2}, + {"Sum256", Func, 2}, + }, + "crypto/sha512": { + {"BlockSize", Const, 0}, + {"New", Func, 0}, + {"New384", Func, 0}, + {"New512_224", Func, 5}, + {"New512_256", Func, 5}, + {"Size", Const, 0}, + {"Size224", Const, 5}, + {"Size256", Const, 5}, + {"Size384", Const, 0}, + {"Sum384", Func, 2}, + {"Sum512", Func, 2}, + {"Sum512_224", Func, 5}, + {"Sum512_256", Func, 5}, + }, + "crypto/subtle": { + {"ConstantTimeByteEq", Func, 0}, + {"ConstantTimeCompare", Func, 0}, + {"ConstantTimeCopy", Func, 0}, + {"ConstantTimeEq", Func, 0}, + {"ConstantTimeLessOrEq", Func, 2}, + {"ConstantTimeSelect", Func, 0}, + {"XORBytes", Func, 20}, + }, + "crypto/tls": { + {"(*CertificateRequestInfo).Context", Method, 17}, + {"(*CertificateRequestInfo).SupportsCertificate", Method, 14}, + {"(*CertificateVerificationError).Error", Method, 20}, + {"(*CertificateVerificationError).Unwrap", Method, 20}, + {"(*ClientHelloInfo).Context", Method, 17}, + {"(*ClientHelloInfo).SupportsCertificate", Method, 14}, + {"(*ClientSessionState).ResumptionState", Method, 21}, + {"(*Config).BuildNameToCertificate", Method, 0}, + {"(*Config).Clone", Method, 8}, + {"(*Config).DecryptTicket", Method, 21}, + {"(*Config).EncryptTicket", Method, 21}, + {"(*Config).SetSessionTicketKeys", Method, 5}, + {"(*Conn).Close", Method, 0}, + {"(*Conn).CloseWrite", Method, 8}, + {"(*Conn).ConnectionState", Method, 0}, + {"(*Conn).Handshake", Method, 0}, + {"(*Conn).HandshakeContext", Method, 17}, + {"(*Conn).LocalAddr", Method, 0}, + {"(*Conn).NetConn", Method, 18}, + {"(*Conn).OCSPResponse", Method, 0}, + {"(*Conn).Read", Method, 0}, + {"(*Conn).RemoteAddr", Method, 0}, + {"(*Conn).SetDeadline", Method, 0}, + {"(*Conn).SetReadDeadline", Method, 0}, + {"(*Conn).SetWriteDeadline", Method, 0}, + {"(*Conn).VerifyHostname", Method, 0}, + {"(*Conn).Write", Method, 0}, + {"(*ConnectionState).ExportKeyingMaterial", Method, 11}, + {"(*Dialer).Dial", Method, 15}, + {"(*Dialer).DialContext", Method, 15}, + {"(*QUICConn).Close", Method, 21}, + {"(*QUICConn).ConnectionState", Method, 21}, + {"(*QUICConn).HandleData", Method, 21}, + {"(*QUICConn).NextEvent", Method, 21}, + {"(*QUICConn).SendSessionTicket", Method, 21}, + {"(*QUICConn).SetTransportParameters", Method, 21}, + {"(*QUICConn).Start", Method, 21}, + {"(*SessionState).Bytes", Method, 21}, + {"(AlertError).Error", Method, 21}, + {"(ClientAuthType).String", Method, 15}, + {"(CurveID).String", Method, 15}, + {"(QUICEncryptionLevel).String", Method, 21}, + {"(RecordHeaderError).Error", Method, 6}, + {"(SignatureScheme).String", Method, 15}, + {"AlertError", Type, 21}, + {"Certificate", Type, 0}, + {"Certificate.Certificate", Field, 0}, + {"Certificate.Leaf", Field, 0}, + {"Certificate.OCSPStaple", Field, 0}, + {"Certificate.PrivateKey", Field, 0}, + {"Certificate.SignedCertificateTimestamps", Field, 5}, + {"Certificate.SupportedSignatureAlgorithms", Field, 14}, + {"CertificateRequestInfo", Type, 8}, + {"CertificateRequestInfo.AcceptableCAs", Field, 8}, + {"CertificateRequestInfo.SignatureSchemes", Field, 8}, + {"CertificateRequestInfo.Version", Field, 14}, + {"CertificateVerificationError", Type, 20}, + {"CertificateVerificationError.Err", Field, 20}, + {"CertificateVerificationError.UnverifiedCertificates", Field, 20}, + {"CipherSuite", Type, 14}, + {"CipherSuite.ID", Field, 14}, + {"CipherSuite.Insecure", Field, 14}, + {"CipherSuite.Name", Field, 14}, + {"CipherSuite.SupportedVersions", Field, 14}, + {"CipherSuiteName", Func, 14}, + {"CipherSuites", Func, 14}, + {"Client", Func, 0}, + {"ClientAuthType", Type, 0}, + {"ClientHelloInfo", Type, 4}, + {"ClientHelloInfo.CipherSuites", Field, 4}, + {"ClientHelloInfo.Conn", Field, 8}, + {"ClientHelloInfo.ServerName", Field, 4}, + {"ClientHelloInfo.SignatureSchemes", Field, 8}, + {"ClientHelloInfo.SupportedCurves", Field, 4}, + {"ClientHelloInfo.SupportedPoints", Field, 4}, + {"ClientHelloInfo.SupportedProtos", Field, 8}, + {"ClientHelloInfo.SupportedVersions", Field, 8}, + {"ClientSessionCache", Type, 3}, + {"ClientSessionState", Type, 3}, + {"Config", Type, 0}, + {"Config.Certificates", Field, 0}, + {"Config.CipherSuites", Field, 0}, + {"Config.ClientAuth", Field, 0}, + {"Config.ClientCAs", Field, 0}, + {"Config.ClientSessionCache", Field, 3}, + {"Config.CurvePreferences", Field, 3}, + {"Config.DynamicRecordSizingDisabled", Field, 7}, + {"Config.GetCertificate", Field, 4}, + {"Config.GetClientCertificate", Field, 8}, + {"Config.GetConfigForClient", Field, 8}, + {"Config.InsecureSkipVerify", Field, 0}, + {"Config.KeyLogWriter", Field, 8}, + {"Config.MaxVersion", Field, 2}, + {"Config.MinVersion", Field, 2}, + {"Config.NameToCertificate", Field, 0}, + {"Config.NextProtos", Field, 0}, + {"Config.PreferServerCipherSuites", Field, 1}, + {"Config.Rand", Field, 0}, + {"Config.Renegotiation", Field, 7}, + {"Config.RootCAs", Field, 0}, + {"Config.ServerName", Field, 0}, + {"Config.SessionTicketKey", Field, 1}, + {"Config.SessionTicketsDisabled", Field, 1}, + {"Config.Time", Field, 0}, + {"Config.UnwrapSession", Field, 21}, + {"Config.VerifyConnection", Field, 15}, + {"Config.VerifyPeerCertificate", Field, 8}, + {"Config.WrapSession", Field, 21}, + {"Conn", Type, 0}, + {"ConnectionState", Type, 0}, + {"ConnectionState.CipherSuite", Field, 0}, + {"ConnectionState.DidResume", Field, 1}, + {"ConnectionState.HandshakeComplete", Field, 0}, + {"ConnectionState.NegotiatedProtocol", Field, 0}, + {"ConnectionState.NegotiatedProtocolIsMutual", Field, 0}, + {"ConnectionState.OCSPResponse", Field, 5}, + {"ConnectionState.PeerCertificates", Field, 0}, + {"ConnectionState.ServerName", Field, 0}, + {"ConnectionState.SignedCertificateTimestamps", Field, 5}, + {"ConnectionState.TLSUnique", Field, 4}, + {"ConnectionState.VerifiedChains", Field, 0}, + {"ConnectionState.Version", Field, 3}, + {"CurveID", Type, 3}, + {"CurveP256", Const, 3}, + {"CurveP384", Const, 3}, + {"CurveP521", Const, 3}, + {"Dial", Func, 0}, + {"DialWithDialer", Func, 3}, + {"Dialer", Type, 15}, + {"Dialer.Config", Field, 15}, + {"Dialer.NetDialer", Field, 15}, + {"ECDSAWithP256AndSHA256", Const, 8}, + {"ECDSAWithP384AndSHA384", Const, 8}, + {"ECDSAWithP521AndSHA512", Const, 8}, + {"ECDSAWithSHA1", Const, 10}, + {"Ed25519", Const, 13}, + {"InsecureCipherSuites", Func, 14}, + {"Listen", Func, 0}, + {"LoadX509KeyPair", Func, 0}, + {"NewLRUClientSessionCache", Func, 3}, + {"NewListener", Func, 0}, + {"NewResumptionState", Func, 21}, + {"NoClientCert", Const, 0}, + {"PKCS1WithSHA1", Const, 8}, + {"PKCS1WithSHA256", Const, 8}, + {"PKCS1WithSHA384", Const, 8}, + {"PKCS1WithSHA512", Const, 8}, + {"PSSWithSHA256", Const, 8}, + {"PSSWithSHA384", Const, 8}, + {"PSSWithSHA512", Const, 8}, + {"ParseSessionState", Func, 21}, + {"QUICClient", Func, 21}, + {"QUICConfig", Type, 21}, + {"QUICConfig.TLSConfig", Field, 21}, + {"QUICConn", Type, 21}, + {"QUICEncryptionLevel", Type, 21}, + {"QUICEncryptionLevelApplication", Const, 21}, + {"QUICEncryptionLevelEarly", Const, 21}, + {"QUICEncryptionLevelHandshake", Const, 21}, + {"QUICEncryptionLevelInitial", Const, 21}, + {"QUICEvent", Type, 21}, + {"QUICEvent.Data", Field, 21}, + {"QUICEvent.Kind", Field, 21}, + {"QUICEvent.Level", Field, 21}, + {"QUICEvent.Suite", Field, 21}, + {"QUICEventKind", Type, 21}, + {"QUICHandshakeDone", Const, 21}, + {"QUICNoEvent", Const, 21}, + {"QUICRejectedEarlyData", Const, 21}, + {"QUICServer", Func, 21}, + {"QUICSessionTicketOptions", Type, 21}, + {"QUICSessionTicketOptions.EarlyData", Field, 21}, + {"QUICSetReadSecret", Const, 21}, + {"QUICSetWriteSecret", Const, 21}, + {"QUICTransportParameters", Const, 21}, + {"QUICTransportParametersRequired", Const, 21}, + {"QUICWriteData", Const, 21}, + {"RecordHeaderError", Type, 6}, + {"RecordHeaderError.Conn", Field, 12}, + {"RecordHeaderError.Msg", Field, 6}, + {"RecordHeaderError.RecordHeader", Field, 6}, + {"RenegotiateFreelyAsClient", Const, 7}, + {"RenegotiateNever", Const, 7}, + {"RenegotiateOnceAsClient", Const, 7}, + {"RenegotiationSupport", Type, 7}, + {"RequestClientCert", Const, 0}, + {"RequireAndVerifyClientCert", Const, 0}, + {"RequireAnyClientCert", Const, 0}, + {"Server", Func, 0}, + {"SessionState", Type, 21}, + {"SessionState.EarlyData", Field, 21}, + {"SessionState.Extra", Field, 21}, + {"SignatureScheme", Type, 8}, + {"TLS_AES_128_GCM_SHA256", Const, 12}, + {"TLS_AES_256_GCM_SHA384", Const, 12}, + {"TLS_CHACHA20_POLY1305_SHA256", Const, 12}, + {"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", Const, 2}, + {"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", Const, 8}, + {"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", Const, 2}, + {"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", Const, 2}, + {"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", Const, 5}, + {"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305", Const, 8}, + {"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", Const, 14}, + {"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", Const, 2}, + {"TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", Const, 0}, + {"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", Const, 0}, + {"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", Const, 8}, + {"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", Const, 2}, + {"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", Const, 1}, + {"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", Const, 5}, + {"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305", Const, 8}, + {"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", Const, 14}, + {"TLS_ECDHE_RSA_WITH_RC4_128_SHA", Const, 0}, + {"TLS_FALLBACK_SCSV", Const, 4}, + {"TLS_RSA_WITH_3DES_EDE_CBC_SHA", Const, 0}, + {"TLS_RSA_WITH_AES_128_CBC_SHA", Const, 0}, + {"TLS_RSA_WITH_AES_128_CBC_SHA256", Const, 8}, + {"TLS_RSA_WITH_AES_128_GCM_SHA256", Const, 6}, + {"TLS_RSA_WITH_AES_256_CBC_SHA", Const, 1}, + {"TLS_RSA_WITH_AES_256_GCM_SHA384", Const, 6}, + {"TLS_RSA_WITH_RC4_128_SHA", Const, 0}, + {"VerifyClientCertIfGiven", Const, 0}, + {"VersionName", Func, 21}, + {"VersionSSL30", Const, 2}, + {"VersionTLS10", Const, 2}, + {"VersionTLS11", Const, 2}, + {"VersionTLS12", Const, 2}, + {"VersionTLS13", Const, 12}, + {"X25519", Const, 8}, + {"X509KeyPair", Func, 0}, + }, + "crypto/x509": { + {"(*CertPool).AddCert", Method, 0}, + {"(*CertPool).AddCertWithConstraint", Method, 22}, + {"(*CertPool).AppendCertsFromPEM", Method, 0}, + {"(*CertPool).Clone", Method, 19}, + {"(*CertPool).Equal", Method, 19}, + {"(*CertPool).Subjects", Method, 0}, + {"(*Certificate).CheckCRLSignature", Method, 0}, + {"(*Certificate).CheckSignature", Method, 0}, + {"(*Certificate).CheckSignatureFrom", Method, 0}, + {"(*Certificate).CreateCRL", Method, 0}, + {"(*Certificate).Equal", Method, 0}, + {"(*Certificate).Verify", Method, 0}, + {"(*Certificate).VerifyHostname", Method, 0}, + {"(*CertificateRequest).CheckSignature", Method, 5}, + {"(*RevocationList).CheckSignatureFrom", Method, 19}, + {"(CertificateInvalidError).Error", Method, 0}, + {"(ConstraintViolationError).Error", Method, 0}, + {"(HostnameError).Error", Method, 0}, + {"(InsecureAlgorithmError).Error", Method, 6}, + {"(OID).Equal", Method, 22}, + {"(OID).EqualASN1OID", Method, 22}, + {"(OID).String", Method, 22}, + {"(PublicKeyAlgorithm).String", Method, 10}, + {"(SignatureAlgorithm).String", Method, 6}, + {"(SystemRootsError).Error", Method, 1}, + {"(SystemRootsError).Unwrap", Method, 16}, + {"(UnhandledCriticalExtension).Error", Method, 0}, + {"(UnknownAuthorityError).Error", Method, 0}, + {"CANotAuthorizedForExtKeyUsage", Const, 10}, + {"CANotAuthorizedForThisName", Const, 0}, + {"CertPool", Type, 0}, + {"Certificate", Type, 0}, + {"Certificate.AuthorityKeyId", Field, 0}, + {"Certificate.BasicConstraintsValid", Field, 0}, + {"Certificate.CRLDistributionPoints", Field, 2}, + {"Certificate.DNSNames", Field, 0}, + {"Certificate.EmailAddresses", Field, 0}, + {"Certificate.ExcludedDNSDomains", Field, 9}, + {"Certificate.ExcludedEmailAddresses", Field, 10}, + {"Certificate.ExcludedIPRanges", Field, 10}, + {"Certificate.ExcludedURIDomains", Field, 10}, + {"Certificate.ExtKeyUsage", Field, 0}, + {"Certificate.Extensions", Field, 2}, + {"Certificate.ExtraExtensions", Field, 2}, + {"Certificate.IPAddresses", Field, 1}, + {"Certificate.IsCA", Field, 0}, + {"Certificate.Issuer", Field, 0}, + {"Certificate.IssuingCertificateURL", Field, 2}, + {"Certificate.KeyUsage", Field, 0}, + {"Certificate.MaxPathLen", Field, 0}, + {"Certificate.MaxPathLenZero", Field, 4}, + {"Certificate.NotAfter", Field, 0}, + {"Certificate.NotBefore", Field, 0}, + {"Certificate.OCSPServer", Field, 2}, + {"Certificate.PermittedDNSDomains", Field, 0}, + {"Certificate.PermittedDNSDomainsCritical", Field, 0}, + {"Certificate.PermittedEmailAddresses", Field, 10}, + {"Certificate.PermittedIPRanges", Field, 10}, + {"Certificate.PermittedURIDomains", Field, 10}, + {"Certificate.Policies", Field, 22}, + {"Certificate.PolicyIdentifiers", Field, 0}, + {"Certificate.PublicKey", Field, 0}, + {"Certificate.PublicKeyAlgorithm", Field, 0}, + {"Certificate.Raw", Field, 0}, + {"Certificate.RawIssuer", Field, 0}, + {"Certificate.RawSubject", Field, 0}, + {"Certificate.RawSubjectPublicKeyInfo", Field, 0}, + {"Certificate.RawTBSCertificate", Field, 0}, + {"Certificate.SerialNumber", Field, 0}, + {"Certificate.Signature", Field, 0}, + {"Certificate.SignatureAlgorithm", Field, 0}, + {"Certificate.Subject", Field, 0}, + {"Certificate.SubjectKeyId", Field, 0}, + {"Certificate.URIs", Field, 10}, + {"Certificate.UnhandledCriticalExtensions", Field, 5}, + {"Certificate.UnknownExtKeyUsage", Field, 0}, + {"Certificate.Version", Field, 0}, + {"CertificateInvalidError", Type, 0}, + {"CertificateInvalidError.Cert", Field, 0}, + {"CertificateInvalidError.Detail", Field, 10}, + {"CertificateInvalidError.Reason", Field, 0}, + {"CertificateRequest", Type, 3}, + {"CertificateRequest.Attributes", Field, 3}, + {"CertificateRequest.DNSNames", Field, 3}, + {"CertificateRequest.EmailAddresses", Field, 3}, + {"CertificateRequest.Extensions", Field, 3}, + {"CertificateRequest.ExtraExtensions", Field, 3}, + {"CertificateRequest.IPAddresses", Field, 3}, + {"CertificateRequest.PublicKey", Field, 3}, + {"CertificateRequest.PublicKeyAlgorithm", Field, 3}, + {"CertificateRequest.Raw", Field, 3}, + {"CertificateRequest.RawSubject", Field, 3}, + {"CertificateRequest.RawSubjectPublicKeyInfo", Field, 3}, + {"CertificateRequest.RawTBSCertificateRequest", Field, 3}, + {"CertificateRequest.Signature", Field, 3}, + {"CertificateRequest.SignatureAlgorithm", Field, 3}, + {"CertificateRequest.Subject", Field, 3}, + {"CertificateRequest.URIs", Field, 10}, + {"CertificateRequest.Version", Field, 3}, + {"ConstraintViolationError", Type, 0}, + {"CreateCertificate", Func, 0}, + {"CreateCertificateRequest", Func, 3}, + {"CreateRevocationList", Func, 15}, + {"DSA", Const, 0}, + {"DSAWithSHA1", Const, 0}, + {"DSAWithSHA256", Const, 0}, + {"DecryptPEMBlock", Func, 1}, + {"ECDSA", Const, 1}, + {"ECDSAWithSHA1", Const, 1}, + {"ECDSAWithSHA256", Const, 1}, + {"ECDSAWithSHA384", Const, 1}, + {"ECDSAWithSHA512", Const, 1}, + {"Ed25519", Const, 13}, + {"EncryptPEMBlock", Func, 1}, + {"ErrUnsupportedAlgorithm", Var, 0}, + {"Expired", Const, 0}, + {"ExtKeyUsage", Type, 0}, + {"ExtKeyUsageAny", Const, 0}, + {"ExtKeyUsageClientAuth", Const, 0}, + {"ExtKeyUsageCodeSigning", Const, 0}, + {"ExtKeyUsageEmailProtection", Const, 0}, + {"ExtKeyUsageIPSECEndSystem", Const, 1}, + {"ExtKeyUsageIPSECTunnel", Const, 1}, + {"ExtKeyUsageIPSECUser", Const, 1}, + {"ExtKeyUsageMicrosoftCommercialCodeSigning", Const, 10}, + {"ExtKeyUsageMicrosoftKernelCodeSigning", Const, 10}, + {"ExtKeyUsageMicrosoftServerGatedCrypto", Const, 1}, + {"ExtKeyUsageNetscapeServerGatedCrypto", Const, 1}, + {"ExtKeyUsageOCSPSigning", Const, 0}, + {"ExtKeyUsageServerAuth", Const, 0}, + {"ExtKeyUsageTimeStamping", Const, 0}, + {"HostnameError", Type, 0}, + {"HostnameError.Certificate", Field, 0}, + {"HostnameError.Host", Field, 0}, + {"IncompatibleUsage", Const, 1}, + {"IncorrectPasswordError", Var, 1}, + {"InsecureAlgorithmError", Type, 6}, + {"InvalidReason", Type, 0}, + {"IsEncryptedPEMBlock", Func, 1}, + {"KeyUsage", Type, 0}, + {"KeyUsageCRLSign", Const, 0}, + {"KeyUsageCertSign", Const, 0}, + {"KeyUsageContentCommitment", Const, 0}, + {"KeyUsageDataEncipherment", Const, 0}, + {"KeyUsageDecipherOnly", Const, 0}, + {"KeyUsageDigitalSignature", Const, 0}, + {"KeyUsageEncipherOnly", Const, 0}, + {"KeyUsageKeyAgreement", Const, 0}, + {"KeyUsageKeyEncipherment", Const, 0}, + {"MD2WithRSA", Const, 0}, + {"MD5WithRSA", Const, 0}, + {"MarshalECPrivateKey", Func, 2}, + {"MarshalPKCS1PrivateKey", Func, 0}, + {"MarshalPKCS1PublicKey", Func, 10}, + {"MarshalPKCS8PrivateKey", Func, 10}, + {"MarshalPKIXPublicKey", Func, 0}, + {"NameConstraintsWithoutSANs", Const, 10}, + {"NameMismatch", Const, 8}, + {"NewCertPool", Func, 0}, + {"NotAuthorizedToSign", Const, 0}, + {"OID", Type, 22}, + {"OIDFromInts", Func, 22}, + {"PEMCipher", Type, 1}, + {"PEMCipher3DES", Const, 1}, + {"PEMCipherAES128", Const, 1}, + {"PEMCipherAES192", Const, 1}, + {"PEMCipherAES256", Const, 1}, + {"PEMCipherDES", Const, 1}, + {"ParseCRL", Func, 0}, + {"ParseCertificate", Func, 0}, + {"ParseCertificateRequest", Func, 3}, + {"ParseCertificates", Func, 0}, + {"ParseDERCRL", Func, 0}, + {"ParseECPrivateKey", Func, 1}, + {"ParsePKCS1PrivateKey", Func, 0}, + {"ParsePKCS1PublicKey", Func, 10}, + {"ParsePKCS8PrivateKey", Func, 0}, + {"ParsePKIXPublicKey", Func, 0}, + {"ParseRevocationList", Func, 19}, + {"PublicKeyAlgorithm", Type, 0}, + {"PureEd25519", Const, 13}, + {"RSA", Const, 0}, + {"RevocationList", Type, 15}, + {"RevocationList.AuthorityKeyId", Field, 19}, + {"RevocationList.Extensions", Field, 19}, + {"RevocationList.ExtraExtensions", Field, 15}, + {"RevocationList.Issuer", Field, 19}, + {"RevocationList.NextUpdate", Field, 15}, + {"RevocationList.Number", Field, 15}, + {"RevocationList.Raw", Field, 19}, + {"RevocationList.RawIssuer", Field, 19}, + {"RevocationList.RawTBSRevocationList", Field, 19}, + {"RevocationList.RevokedCertificateEntries", Field, 21}, + {"RevocationList.RevokedCertificates", Field, 15}, + {"RevocationList.Signature", Field, 19}, + {"RevocationList.SignatureAlgorithm", Field, 15}, + {"RevocationList.ThisUpdate", Field, 15}, + {"RevocationListEntry", Type, 21}, + {"RevocationListEntry.Extensions", Field, 21}, + {"RevocationListEntry.ExtraExtensions", Field, 21}, + {"RevocationListEntry.Raw", Field, 21}, + {"RevocationListEntry.ReasonCode", Field, 21}, + {"RevocationListEntry.RevocationTime", Field, 21}, + {"RevocationListEntry.SerialNumber", Field, 21}, + {"SHA1WithRSA", Const, 0}, + {"SHA256WithRSA", Const, 0}, + {"SHA256WithRSAPSS", Const, 8}, + {"SHA384WithRSA", Const, 0}, + {"SHA384WithRSAPSS", Const, 8}, + {"SHA512WithRSA", Const, 0}, + {"SHA512WithRSAPSS", Const, 8}, + {"SetFallbackRoots", Func, 20}, + {"SignatureAlgorithm", Type, 0}, + {"SystemCertPool", Func, 7}, + {"SystemRootsError", Type, 1}, + {"SystemRootsError.Err", Field, 7}, + {"TooManyConstraints", Const, 10}, + {"TooManyIntermediates", Const, 0}, + {"UnconstrainedName", Const, 10}, + {"UnhandledCriticalExtension", Type, 0}, + {"UnknownAuthorityError", Type, 0}, + {"UnknownAuthorityError.Cert", Field, 8}, + {"UnknownPublicKeyAlgorithm", Const, 0}, + {"UnknownSignatureAlgorithm", Const, 0}, + {"VerifyOptions", Type, 0}, + {"VerifyOptions.CurrentTime", Field, 0}, + {"VerifyOptions.DNSName", Field, 0}, + {"VerifyOptions.Intermediates", Field, 0}, + {"VerifyOptions.KeyUsages", Field, 1}, + {"VerifyOptions.MaxConstraintComparisions", Field, 10}, + {"VerifyOptions.Roots", Field, 0}, + }, + "crypto/x509/pkix": { + {"(*CertificateList).HasExpired", Method, 0}, + {"(*Name).FillFromRDNSequence", Method, 0}, + {"(Name).String", Method, 10}, + {"(Name).ToRDNSequence", Method, 0}, + {"(RDNSequence).String", Method, 10}, + {"AlgorithmIdentifier", Type, 0}, + {"AlgorithmIdentifier.Algorithm", Field, 0}, + {"AlgorithmIdentifier.Parameters", Field, 0}, + {"AttributeTypeAndValue", Type, 0}, + {"AttributeTypeAndValue.Type", Field, 0}, + {"AttributeTypeAndValue.Value", Field, 0}, + {"AttributeTypeAndValueSET", Type, 3}, + {"AttributeTypeAndValueSET.Type", Field, 3}, + {"AttributeTypeAndValueSET.Value", Field, 3}, + {"CertificateList", Type, 0}, + {"CertificateList.SignatureAlgorithm", Field, 0}, + {"CertificateList.SignatureValue", Field, 0}, + {"CertificateList.TBSCertList", Field, 0}, + {"Extension", Type, 0}, + {"Extension.Critical", Field, 0}, + {"Extension.Id", Field, 0}, + {"Extension.Value", Field, 0}, + {"Name", Type, 0}, + {"Name.CommonName", Field, 0}, + {"Name.Country", Field, 0}, + {"Name.ExtraNames", Field, 5}, + {"Name.Locality", Field, 0}, + {"Name.Names", Field, 0}, + {"Name.Organization", Field, 0}, + {"Name.OrganizationalUnit", Field, 0}, + {"Name.PostalCode", Field, 0}, + {"Name.Province", Field, 0}, + {"Name.SerialNumber", Field, 0}, + {"Name.StreetAddress", Field, 0}, + {"RDNSequence", Type, 0}, + {"RelativeDistinguishedNameSET", Type, 0}, + {"RevokedCertificate", Type, 0}, + {"RevokedCertificate.Extensions", Field, 0}, + {"RevokedCertificate.RevocationTime", Field, 0}, + {"RevokedCertificate.SerialNumber", Field, 0}, + {"TBSCertificateList", Type, 0}, + {"TBSCertificateList.Extensions", Field, 0}, + {"TBSCertificateList.Issuer", Field, 0}, + {"TBSCertificateList.NextUpdate", Field, 0}, + {"TBSCertificateList.Raw", Field, 0}, + {"TBSCertificateList.RevokedCertificates", Field, 0}, + {"TBSCertificateList.Signature", Field, 0}, + {"TBSCertificateList.ThisUpdate", Field, 0}, + {"TBSCertificateList.Version", Field, 0}, + }, + "database/sql": { + {"(*ColumnType).DatabaseTypeName", Method, 8}, + {"(*ColumnType).DecimalSize", Method, 8}, + {"(*ColumnType).Length", Method, 8}, + {"(*ColumnType).Name", Method, 8}, + {"(*ColumnType).Nullable", Method, 8}, + {"(*ColumnType).ScanType", Method, 8}, + {"(*Conn).BeginTx", Method, 9}, + {"(*Conn).Close", Method, 9}, + {"(*Conn).ExecContext", Method, 9}, + {"(*Conn).PingContext", Method, 9}, + {"(*Conn).PrepareContext", Method, 9}, + {"(*Conn).QueryContext", Method, 9}, + {"(*Conn).QueryRowContext", Method, 9}, + {"(*Conn).Raw", Method, 13}, + {"(*DB).Begin", Method, 0}, + {"(*DB).BeginTx", Method, 8}, + {"(*DB).Close", Method, 0}, + {"(*DB).Conn", Method, 9}, + {"(*DB).Driver", Method, 0}, + {"(*DB).Exec", Method, 0}, + {"(*DB).ExecContext", Method, 8}, + {"(*DB).Ping", Method, 1}, + {"(*DB).PingContext", Method, 8}, + {"(*DB).Prepare", Method, 0}, + {"(*DB).PrepareContext", Method, 8}, + {"(*DB).Query", Method, 0}, + {"(*DB).QueryContext", Method, 8}, + {"(*DB).QueryRow", Method, 0}, + {"(*DB).QueryRowContext", Method, 8}, + {"(*DB).SetConnMaxIdleTime", Method, 15}, + {"(*DB).SetConnMaxLifetime", Method, 6}, + {"(*DB).SetMaxIdleConns", Method, 1}, + {"(*DB).SetMaxOpenConns", Method, 2}, + {"(*DB).Stats", Method, 5}, + {"(*Null).Scan", Method, 22}, + {"(*NullBool).Scan", Method, 0}, + {"(*NullByte).Scan", Method, 17}, + {"(*NullFloat64).Scan", Method, 0}, + {"(*NullInt16).Scan", Method, 17}, + {"(*NullInt32).Scan", Method, 13}, + {"(*NullInt64).Scan", Method, 0}, + {"(*NullString).Scan", Method, 0}, + {"(*NullTime).Scan", Method, 13}, + {"(*Row).Err", Method, 15}, + {"(*Row).Scan", Method, 0}, + {"(*Rows).Close", Method, 0}, + {"(*Rows).ColumnTypes", Method, 8}, + {"(*Rows).Columns", Method, 0}, + {"(*Rows).Err", Method, 0}, + {"(*Rows).Next", Method, 0}, + {"(*Rows).NextResultSet", Method, 8}, + {"(*Rows).Scan", Method, 0}, + {"(*Stmt).Close", Method, 0}, + {"(*Stmt).Exec", Method, 0}, + {"(*Stmt).ExecContext", Method, 8}, + {"(*Stmt).Query", Method, 0}, + {"(*Stmt).QueryContext", Method, 8}, + {"(*Stmt).QueryRow", Method, 0}, + {"(*Stmt).QueryRowContext", Method, 8}, + {"(*Tx).Commit", Method, 0}, + {"(*Tx).Exec", Method, 0}, + {"(*Tx).ExecContext", Method, 8}, + {"(*Tx).Prepare", Method, 0}, + {"(*Tx).PrepareContext", Method, 8}, + {"(*Tx).Query", Method, 0}, + {"(*Tx).QueryContext", Method, 8}, + {"(*Tx).QueryRow", Method, 0}, + {"(*Tx).QueryRowContext", Method, 8}, + {"(*Tx).Rollback", Method, 0}, + {"(*Tx).Stmt", Method, 0}, + {"(*Tx).StmtContext", Method, 8}, + {"(IsolationLevel).String", Method, 11}, + {"(Null).Value", Method, 22}, + {"(NullBool).Value", Method, 0}, + {"(NullByte).Value", Method, 17}, + {"(NullFloat64).Value", Method, 0}, + {"(NullInt16).Value", Method, 17}, + {"(NullInt32).Value", Method, 13}, + {"(NullInt64).Value", Method, 0}, + {"(NullString).Value", Method, 0}, + {"(NullTime).Value", Method, 13}, + {"ColumnType", Type, 8}, + {"Conn", Type, 9}, + {"DB", Type, 0}, + {"DBStats", Type, 5}, + {"DBStats.Idle", Field, 11}, + {"DBStats.InUse", Field, 11}, + {"DBStats.MaxIdleClosed", Field, 11}, + {"DBStats.MaxIdleTimeClosed", Field, 15}, + {"DBStats.MaxLifetimeClosed", Field, 11}, + {"DBStats.MaxOpenConnections", Field, 11}, + {"DBStats.OpenConnections", Field, 5}, + {"DBStats.WaitCount", Field, 11}, + {"DBStats.WaitDuration", Field, 11}, + {"Drivers", Func, 4}, + {"ErrConnDone", Var, 9}, + {"ErrNoRows", Var, 0}, + {"ErrTxDone", Var, 0}, + {"IsolationLevel", Type, 8}, + {"LevelDefault", Const, 8}, + {"LevelLinearizable", Const, 8}, + {"LevelReadCommitted", Const, 8}, + {"LevelReadUncommitted", Const, 8}, + {"LevelRepeatableRead", Const, 8}, + {"LevelSerializable", Const, 8}, + {"LevelSnapshot", Const, 8}, + {"LevelWriteCommitted", Const, 8}, + {"Named", Func, 8}, + {"NamedArg", Type, 8}, + {"NamedArg.Name", Field, 8}, + {"NamedArg.Value", Field, 8}, + {"Null", Type, 22}, + {"Null.V", Field, 22}, + {"Null.Valid", Field, 22}, + {"NullBool", Type, 0}, + {"NullBool.Bool", Field, 0}, + {"NullBool.Valid", Field, 0}, + {"NullByte", Type, 17}, + {"NullByte.Byte", Field, 17}, + {"NullByte.Valid", Field, 17}, + {"NullFloat64", Type, 0}, + {"NullFloat64.Float64", Field, 0}, + {"NullFloat64.Valid", Field, 0}, + {"NullInt16", Type, 17}, + {"NullInt16.Int16", Field, 17}, + {"NullInt16.Valid", Field, 17}, + {"NullInt32", Type, 13}, + {"NullInt32.Int32", Field, 13}, + {"NullInt32.Valid", Field, 13}, + {"NullInt64", Type, 0}, + {"NullInt64.Int64", Field, 0}, + {"NullInt64.Valid", Field, 0}, + {"NullString", Type, 0}, + {"NullString.String", Field, 0}, + {"NullString.Valid", Field, 0}, + {"NullTime", Type, 13}, + {"NullTime.Time", Field, 13}, + {"NullTime.Valid", Field, 13}, + {"Open", Func, 0}, + {"OpenDB", Func, 10}, + {"Out", Type, 9}, + {"Out.Dest", Field, 9}, + {"Out.In", Field, 9}, + {"RawBytes", Type, 0}, + {"Register", Func, 0}, + {"Result", Type, 0}, + {"Row", Type, 0}, + {"Rows", Type, 0}, + {"Scanner", Type, 0}, + {"Stmt", Type, 0}, + {"Tx", Type, 0}, + {"TxOptions", Type, 8}, + {"TxOptions.Isolation", Field, 8}, + {"TxOptions.ReadOnly", Field, 8}, + }, + "database/sql/driver": { + {"(NotNull).ConvertValue", Method, 0}, + {"(Null).ConvertValue", Method, 0}, + {"(RowsAffected).LastInsertId", Method, 0}, + {"(RowsAffected).RowsAffected", Method, 0}, + {"Bool", Var, 0}, + {"ColumnConverter", Type, 0}, + {"Conn", Type, 0}, + {"ConnBeginTx", Type, 8}, + {"ConnPrepareContext", Type, 8}, + {"Connector", Type, 10}, + {"DefaultParameterConverter", Var, 0}, + {"Driver", Type, 0}, + {"DriverContext", Type, 10}, + {"ErrBadConn", Var, 0}, + {"ErrRemoveArgument", Var, 9}, + {"ErrSkip", Var, 0}, + {"Execer", Type, 0}, + {"ExecerContext", Type, 8}, + {"Int32", Var, 0}, + {"IsScanValue", Func, 0}, + {"IsValue", Func, 0}, + {"IsolationLevel", Type, 8}, + {"NamedValue", Type, 8}, + {"NamedValue.Name", Field, 8}, + {"NamedValue.Ordinal", Field, 8}, + {"NamedValue.Value", Field, 8}, + {"NamedValueChecker", Type, 9}, + {"NotNull", Type, 0}, + {"NotNull.Converter", Field, 0}, + {"Null", Type, 0}, + {"Null.Converter", Field, 0}, + {"Pinger", Type, 8}, + {"Queryer", Type, 1}, + {"QueryerContext", Type, 8}, + {"Result", Type, 0}, + {"ResultNoRows", Var, 0}, + {"Rows", Type, 0}, + {"RowsAffected", Type, 0}, + {"RowsColumnTypeDatabaseTypeName", Type, 8}, + {"RowsColumnTypeLength", Type, 8}, + {"RowsColumnTypeNullable", Type, 8}, + {"RowsColumnTypePrecisionScale", Type, 8}, + {"RowsColumnTypeScanType", Type, 8}, + {"RowsNextResultSet", Type, 8}, + {"SessionResetter", Type, 10}, + {"Stmt", Type, 0}, + {"StmtExecContext", Type, 8}, + {"StmtQueryContext", Type, 8}, + {"String", Var, 0}, + {"Tx", Type, 0}, + {"TxOptions", Type, 8}, + {"TxOptions.Isolation", Field, 8}, + {"TxOptions.ReadOnly", Field, 8}, + {"Validator", Type, 15}, + {"Value", Type, 0}, + {"ValueConverter", Type, 0}, + {"Valuer", Type, 0}, + }, + "debug/buildinfo": { + {"BuildInfo", Type, 18}, + {"Read", Func, 18}, + {"ReadFile", Func, 18}, + }, + "debug/dwarf": { + {"(*AddrType).Basic", Method, 0}, + {"(*AddrType).Common", Method, 0}, + {"(*AddrType).Size", Method, 0}, + {"(*AddrType).String", Method, 0}, + {"(*ArrayType).Common", Method, 0}, + {"(*ArrayType).Size", Method, 0}, + {"(*ArrayType).String", Method, 0}, + {"(*BasicType).Basic", Method, 0}, + {"(*BasicType).Common", Method, 0}, + {"(*BasicType).Size", Method, 0}, + {"(*BasicType).String", Method, 0}, + {"(*BoolType).Basic", Method, 0}, + {"(*BoolType).Common", Method, 0}, + {"(*BoolType).Size", Method, 0}, + {"(*BoolType).String", Method, 0}, + {"(*CharType).Basic", Method, 0}, + {"(*CharType).Common", Method, 0}, + {"(*CharType).Size", Method, 0}, + {"(*CharType).String", Method, 0}, + {"(*CommonType).Common", Method, 0}, + {"(*CommonType).Size", Method, 0}, + {"(*ComplexType).Basic", Method, 0}, + {"(*ComplexType).Common", Method, 0}, + {"(*ComplexType).Size", Method, 0}, + {"(*ComplexType).String", Method, 0}, + {"(*Data).AddSection", Method, 14}, + {"(*Data).AddTypes", Method, 3}, + {"(*Data).LineReader", Method, 5}, + {"(*Data).Ranges", Method, 7}, + {"(*Data).Reader", Method, 0}, + {"(*Data).Type", Method, 0}, + {"(*DotDotDotType).Common", Method, 0}, + {"(*DotDotDotType).Size", Method, 0}, + {"(*DotDotDotType).String", Method, 0}, + {"(*Entry).AttrField", Method, 5}, + {"(*Entry).Val", Method, 0}, + {"(*EnumType).Common", Method, 0}, + {"(*EnumType).Size", Method, 0}, + {"(*EnumType).String", Method, 0}, + {"(*FloatType).Basic", Method, 0}, + {"(*FloatType).Common", Method, 0}, + {"(*FloatType).Size", Method, 0}, + {"(*FloatType).String", Method, 0}, + {"(*FuncType).Common", Method, 0}, + {"(*FuncType).Size", Method, 0}, + {"(*FuncType).String", Method, 0}, + {"(*IntType).Basic", Method, 0}, + {"(*IntType).Common", Method, 0}, + {"(*IntType).Size", Method, 0}, + {"(*IntType).String", Method, 0}, + {"(*LineReader).Files", Method, 14}, + {"(*LineReader).Next", Method, 5}, + {"(*LineReader).Reset", Method, 5}, + {"(*LineReader).Seek", Method, 5}, + {"(*LineReader).SeekPC", Method, 5}, + {"(*LineReader).Tell", Method, 5}, + {"(*PtrType).Common", Method, 0}, + {"(*PtrType).Size", Method, 0}, + {"(*PtrType).String", Method, 0}, + {"(*QualType).Common", Method, 0}, + {"(*QualType).Size", Method, 0}, + {"(*QualType).String", Method, 0}, + {"(*Reader).AddressSize", Method, 5}, + {"(*Reader).ByteOrder", Method, 14}, + {"(*Reader).Next", Method, 0}, + {"(*Reader).Seek", Method, 0}, + {"(*Reader).SeekPC", Method, 7}, + {"(*Reader).SkipChildren", Method, 0}, + {"(*StructType).Common", Method, 0}, + {"(*StructType).Defn", Method, 0}, + {"(*StructType).Size", Method, 0}, + {"(*StructType).String", Method, 0}, + {"(*TypedefType).Common", Method, 0}, + {"(*TypedefType).Size", Method, 0}, + {"(*TypedefType).String", Method, 0}, + {"(*UcharType).Basic", Method, 0}, + {"(*UcharType).Common", Method, 0}, + {"(*UcharType).Size", Method, 0}, + {"(*UcharType).String", Method, 0}, + {"(*UintType).Basic", Method, 0}, + {"(*UintType).Common", Method, 0}, + {"(*UintType).Size", Method, 0}, + {"(*UintType).String", Method, 0}, + {"(*UnspecifiedType).Basic", Method, 4}, + {"(*UnspecifiedType).Common", Method, 4}, + {"(*UnspecifiedType).Size", Method, 4}, + {"(*UnspecifiedType).String", Method, 4}, + {"(*UnsupportedType).Common", Method, 13}, + {"(*UnsupportedType).Size", Method, 13}, + {"(*UnsupportedType).String", Method, 13}, + {"(*VoidType).Common", Method, 0}, + {"(*VoidType).Size", Method, 0}, + {"(*VoidType).String", Method, 0}, + {"(Attr).GoString", Method, 0}, + {"(Attr).String", Method, 0}, + {"(Class).GoString", Method, 5}, + {"(Class).String", Method, 5}, + {"(DecodeError).Error", Method, 0}, + {"(Tag).GoString", Method, 0}, + {"(Tag).String", Method, 0}, + {"AddrType", Type, 0}, + {"AddrType.BasicType", Field, 0}, + {"ArrayType", Type, 0}, + {"ArrayType.CommonType", Field, 0}, + {"ArrayType.Count", Field, 0}, + {"ArrayType.StrideBitSize", Field, 0}, + {"ArrayType.Type", Field, 0}, + {"Attr", Type, 0}, + {"AttrAbstractOrigin", Const, 0}, + {"AttrAccessibility", Const, 0}, + {"AttrAddrBase", Const, 14}, + {"AttrAddrClass", Const, 0}, + {"AttrAlignment", Const, 14}, + {"AttrAllocated", Const, 0}, + {"AttrArtificial", Const, 0}, + {"AttrAssociated", Const, 0}, + {"AttrBaseTypes", Const, 0}, + {"AttrBinaryScale", Const, 14}, + {"AttrBitOffset", Const, 0}, + {"AttrBitSize", Const, 0}, + {"AttrByteSize", Const, 0}, + {"AttrCallAllCalls", Const, 14}, + {"AttrCallAllSourceCalls", Const, 14}, + {"AttrCallAllTailCalls", Const, 14}, + {"AttrCallColumn", Const, 0}, + {"AttrCallDataLocation", Const, 14}, + {"AttrCallDataValue", Const, 14}, + {"AttrCallFile", Const, 0}, + {"AttrCallLine", Const, 0}, + {"AttrCallOrigin", Const, 14}, + {"AttrCallPC", Const, 14}, + {"AttrCallParameter", Const, 14}, + {"AttrCallReturnPC", Const, 14}, + {"AttrCallTailCall", Const, 14}, + {"AttrCallTarget", Const, 14}, + {"AttrCallTargetClobbered", Const, 14}, + {"AttrCallValue", Const, 14}, + {"AttrCalling", Const, 0}, + {"AttrCommonRef", Const, 0}, + {"AttrCompDir", Const, 0}, + {"AttrConstExpr", Const, 14}, + {"AttrConstValue", Const, 0}, + {"AttrContainingType", Const, 0}, + {"AttrCount", Const, 0}, + {"AttrDataBitOffset", Const, 14}, + {"AttrDataLocation", Const, 0}, + {"AttrDataMemberLoc", Const, 0}, + {"AttrDecimalScale", Const, 14}, + {"AttrDecimalSign", Const, 14}, + {"AttrDeclColumn", Const, 0}, + {"AttrDeclFile", Const, 0}, + {"AttrDeclLine", Const, 0}, + {"AttrDeclaration", Const, 0}, + {"AttrDefaultValue", Const, 0}, + {"AttrDefaulted", Const, 14}, + {"AttrDeleted", Const, 14}, + {"AttrDescription", Const, 0}, + {"AttrDigitCount", Const, 14}, + {"AttrDiscr", Const, 0}, + {"AttrDiscrList", Const, 0}, + {"AttrDiscrValue", Const, 0}, + {"AttrDwoName", Const, 14}, + {"AttrElemental", Const, 14}, + {"AttrEncoding", Const, 0}, + {"AttrEndianity", Const, 14}, + {"AttrEntrypc", Const, 0}, + {"AttrEnumClass", Const, 14}, + {"AttrExplicit", Const, 14}, + {"AttrExportSymbols", Const, 14}, + {"AttrExtension", Const, 0}, + {"AttrExternal", Const, 0}, + {"AttrFrameBase", Const, 0}, + {"AttrFriend", Const, 0}, + {"AttrHighpc", Const, 0}, + {"AttrIdentifierCase", Const, 0}, + {"AttrImport", Const, 0}, + {"AttrInline", Const, 0}, + {"AttrIsOptional", Const, 0}, + {"AttrLanguage", Const, 0}, + {"AttrLinkageName", Const, 14}, + {"AttrLocation", Const, 0}, + {"AttrLoclistsBase", Const, 14}, + {"AttrLowerBound", Const, 0}, + {"AttrLowpc", Const, 0}, + {"AttrMacroInfo", Const, 0}, + {"AttrMacros", Const, 14}, + {"AttrMainSubprogram", Const, 14}, + {"AttrMutable", Const, 14}, + {"AttrName", Const, 0}, + {"AttrNamelistItem", Const, 0}, + {"AttrNoreturn", Const, 14}, + {"AttrObjectPointer", Const, 14}, + {"AttrOrdering", Const, 0}, + {"AttrPictureString", Const, 14}, + {"AttrPriority", Const, 0}, + {"AttrProducer", Const, 0}, + {"AttrPrototyped", Const, 0}, + {"AttrPure", Const, 14}, + {"AttrRanges", Const, 0}, + {"AttrRank", Const, 14}, + {"AttrRecursive", Const, 14}, + {"AttrReference", Const, 14}, + {"AttrReturnAddr", Const, 0}, + {"AttrRnglistsBase", Const, 14}, + {"AttrRvalueReference", Const, 14}, + {"AttrSegment", Const, 0}, + {"AttrSibling", Const, 0}, + {"AttrSignature", Const, 14}, + {"AttrSmall", Const, 14}, + {"AttrSpecification", Const, 0}, + {"AttrStartScope", Const, 0}, + {"AttrStaticLink", Const, 0}, + {"AttrStmtList", Const, 0}, + {"AttrStrOffsetsBase", Const, 14}, + {"AttrStride", Const, 0}, + {"AttrStrideSize", Const, 0}, + {"AttrStringLength", Const, 0}, + {"AttrStringLengthBitSize", Const, 14}, + {"AttrStringLengthByteSize", Const, 14}, + {"AttrThreadsScaled", Const, 14}, + {"AttrTrampoline", Const, 0}, + {"AttrType", Const, 0}, + {"AttrUpperBound", Const, 0}, + {"AttrUseLocation", Const, 0}, + {"AttrUseUTF8", Const, 0}, + {"AttrVarParam", Const, 0}, + {"AttrVirtuality", Const, 0}, + {"AttrVisibility", Const, 0}, + {"AttrVtableElemLoc", Const, 0}, + {"BasicType", Type, 0}, + {"BasicType.BitOffset", Field, 0}, + {"BasicType.BitSize", Field, 0}, + {"BasicType.CommonType", Field, 0}, + {"BasicType.DataBitOffset", Field, 18}, + {"BoolType", Type, 0}, + {"BoolType.BasicType", Field, 0}, + {"CharType", Type, 0}, + {"CharType.BasicType", Field, 0}, + {"Class", Type, 5}, + {"ClassAddrPtr", Const, 14}, + {"ClassAddress", Const, 5}, + {"ClassBlock", Const, 5}, + {"ClassConstant", Const, 5}, + {"ClassExprLoc", Const, 5}, + {"ClassFlag", Const, 5}, + {"ClassLinePtr", Const, 5}, + {"ClassLocList", Const, 14}, + {"ClassLocListPtr", Const, 5}, + {"ClassMacPtr", Const, 5}, + {"ClassRangeListPtr", Const, 5}, + {"ClassReference", Const, 5}, + {"ClassReferenceAlt", Const, 5}, + {"ClassReferenceSig", Const, 5}, + {"ClassRngList", Const, 14}, + {"ClassRngListsPtr", Const, 14}, + {"ClassStrOffsetsPtr", Const, 14}, + {"ClassString", Const, 5}, + {"ClassStringAlt", Const, 5}, + {"ClassUnknown", Const, 6}, + {"CommonType", Type, 0}, + {"CommonType.ByteSize", Field, 0}, + {"CommonType.Name", Field, 0}, + {"ComplexType", Type, 0}, + {"ComplexType.BasicType", Field, 0}, + {"Data", Type, 0}, + {"DecodeError", Type, 0}, + {"DecodeError.Err", Field, 0}, + {"DecodeError.Name", Field, 0}, + {"DecodeError.Offset", Field, 0}, + {"DotDotDotType", Type, 0}, + {"DotDotDotType.CommonType", Field, 0}, + {"Entry", Type, 0}, + {"Entry.Children", Field, 0}, + {"Entry.Field", Field, 0}, + {"Entry.Offset", Field, 0}, + {"Entry.Tag", Field, 0}, + {"EnumType", Type, 0}, + {"EnumType.CommonType", Field, 0}, + {"EnumType.EnumName", Field, 0}, + {"EnumType.Val", Field, 0}, + {"EnumValue", Type, 0}, + {"EnumValue.Name", Field, 0}, + {"EnumValue.Val", Field, 0}, + {"ErrUnknownPC", Var, 5}, + {"Field", Type, 0}, + {"Field.Attr", Field, 0}, + {"Field.Class", Field, 5}, + {"Field.Val", Field, 0}, + {"FloatType", Type, 0}, + {"FloatType.BasicType", Field, 0}, + {"FuncType", Type, 0}, + {"FuncType.CommonType", Field, 0}, + {"FuncType.ParamType", Field, 0}, + {"FuncType.ReturnType", Field, 0}, + {"IntType", Type, 0}, + {"IntType.BasicType", Field, 0}, + {"LineEntry", Type, 5}, + {"LineEntry.Address", Field, 5}, + {"LineEntry.BasicBlock", Field, 5}, + {"LineEntry.Column", Field, 5}, + {"LineEntry.Discriminator", Field, 5}, + {"LineEntry.EndSequence", Field, 5}, + {"LineEntry.EpilogueBegin", Field, 5}, + {"LineEntry.File", Field, 5}, + {"LineEntry.ISA", Field, 5}, + {"LineEntry.IsStmt", Field, 5}, + {"LineEntry.Line", Field, 5}, + {"LineEntry.OpIndex", Field, 5}, + {"LineEntry.PrologueEnd", Field, 5}, + {"LineFile", Type, 5}, + {"LineFile.Length", Field, 5}, + {"LineFile.Mtime", Field, 5}, + {"LineFile.Name", Field, 5}, + {"LineReader", Type, 5}, + {"LineReaderPos", Type, 5}, + {"New", Func, 0}, + {"Offset", Type, 0}, + {"PtrType", Type, 0}, + {"PtrType.CommonType", Field, 0}, + {"PtrType.Type", Field, 0}, + {"QualType", Type, 0}, + {"QualType.CommonType", Field, 0}, + {"QualType.Qual", Field, 0}, + {"QualType.Type", Field, 0}, + {"Reader", Type, 0}, + {"StructField", Type, 0}, + {"StructField.BitOffset", Field, 0}, + {"StructField.BitSize", Field, 0}, + {"StructField.ByteOffset", Field, 0}, + {"StructField.ByteSize", Field, 0}, + {"StructField.DataBitOffset", Field, 18}, + {"StructField.Name", Field, 0}, + {"StructField.Type", Field, 0}, + {"StructType", Type, 0}, + {"StructType.CommonType", Field, 0}, + {"StructType.Field", Field, 0}, + {"StructType.Incomplete", Field, 0}, + {"StructType.Kind", Field, 0}, + {"StructType.StructName", Field, 0}, + {"Tag", Type, 0}, + {"TagAccessDeclaration", Const, 0}, + {"TagArrayType", Const, 0}, + {"TagAtomicType", Const, 14}, + {"TagBaseType", Const, 0}, + {"TagCallSite", Const, 14}, + {"TagCallSiteParameter", Const, 14}, + {"TagCatchDwarfBlock", Const, 0}, + {"TagClassType", Const, 0}, + {"TagCoarrayType", Const, 14}, + {"TagCommonDwarfBlock", Const, 0}, + {"TagCommonInclusion", Const, 0}, + {"TagCompileUnit", Const, 0}, + {"TagCondition", Const, 3}, + {"TagConstType", Const, 0}, + {"TagConstant", Const, 0}, + {"TagDwarfProcedure", Const, 0}, + {"TagDynamicType", Const, 14}, + {"TagEntryPoint", Const, 0}, + {"TagEnumerationType", Const, 0}, + {"TagEnumerator", Const, 0}, + {"TagFileType", Const, 0}, + {"TagFormalParameter", Const, 0}, + {"TagFriend", Const, 0}, + {"TagGenericSubrange", Const, 14}, + {"TagImmutableType", Const, 14}, + {"TagImportedDeclaration", Const, 0}, + {"TagImportedModule", Const, 0}, + {"TagImportedUnit", Const, 0}, + {"TagInheritance", Const, 0}, + {"TagInlinedSubroutine", Const, 0}, + {"TagInterfaceType", Const, 0}, + {"TagLabel", Const, 0}, + {"TagLexDwarfBlock", Const, 0}, + {"TagMember", Const, 0}, + {"TagModule", Const, 0}, + {"TagMutableType", Const, 0}, + {"TagNamelist", Const, 0}, + {"TagNamelistItem", Const, 0}, + {"TagNamespace", Const, 0}, + {"TagPackedType", Const, 0}, + {"TagPartialUnit", Const, 0}, + {"TagPointerType", Const, 0}, + {"TagPtrToMemberType", Const, 0}, + {"TagReferenceType", Const, 0}, + {"TagRestrictType", Const, 0}, + {"TagRvalueReferenceType", Const, 3}, + {"TagSetType", Const, 0}, + {"TagSharedType", Const, 3}, + {"TagSkeletonUnit", Const, 14}, + {"TagStringType", Const, 0}, + {"TagStructType", Const, 0}, + {"TagSubprogram", Const, 0}, + {"TagSubrangeType", Const, 0}, + {"TagSubroutineType", Const, 0}, + {"TagTemplateAlias", Const, 3}, + {"TagTemplateTypeParameter", Const, 0}, + {"TagTemplateValueParameter", Const, 0}, + {"TagThrownType", Const, 0}, + {"TagTryDwarfBlock", Const, 0}, + {"TagTypeUnit", Const, 3}, + {"TagTypedef", Const, 0}, + {"TagUnionType", Const, 0}, + {"TagUnspecifiedParameters", Const, 0}, + {"TagUnspecifiedType", Const, 0}, + {"TagVariable", Const, 0}, + {"TagVariant", Const, 0}, + {"TagVariantPart", Const, 0}, + {"TagVolatileType", Const, 0}, + {"TagWithStmt", Const, 0}, + {"Type", Type, 0}, + {"TypedefType", Type, 0}, + {"TypedefType.CommonType", Field, 0}, + {"TypedefType.Type", Field, 0}, + {"UcharType", Type, 0}, + {"UcharType.BasicType", Field, 0}, + {"UintType", Type, 0}, + {"UintType.BasicType", Field, 0}, + {"UnspecifiedType", Type, 4}, + {"UnspecifiedType.BasicType", Field, 4}, + {"UnsupportedType", Type, 13}, + {"UnsupportedType.CommonType", Field, 13}, + {"UnsupportedType.Tag", Field, 13}, + {"VoidType", Type, 0}, + {"VoidType.CommonType", Field, 0}, + }, + "debug/elf": { + {"(*File).Close", Method, 0}, + {"(*File).DWARF", Method, 0}, + {"(*File).DynString", Method, 1}, + {"(*File).DynValue", Method, 21}, + {"(*File).DynamicSymbols", Method, 4}, + {"(*File).ImportedLibraries", Method, 0}, + {"(*File).ImportedSymbols", Method, 0}, + {"(*File).Section", Method, 0}, + {"(*File).SectionByType", Method, 0}, + {"(*File).Symbols", Method, 0}, + {"(*FormatError).Error", Method, 0}, + {"(*Prog).Open", Method, 0}, + {"(*Section).Data", Method, 0}, + {"(*Section).Open", Method, 0}, + {"(Class).GoString", Method, 0}, + {"(Class).String", Method, 0}, + {"(CompressionType).GoString", Method, 6}, + {"(CompressionType).String", Method, 6}, + {"(Data).GoString", Method, 0}, + {"(Data).String", Method, 0}, + {"(DynFlag).GoString", Method, 0}, + {"(DynFlag).String", Method, 0}, + {"(DynFlag1).GoString", Method, 21}, + {"(DynFlag1).String", Method, 21}, + {"(DynTag).GoString", Method, 0}, + {"(DynTag).String", Method, 0}, + {"(Machine).GoString", Method, 0}, + {"(Machine).String", Method, 0}, + {"(NType).GoString", Method, 0}, + {"(NType).String", Method, 0}, + {"(OSABI).GoString", Method, 0}, + {"(OSABI).String", Method, 0}, + {"(Prog).ReadAt", Method, 0}, + {"(ProgFlag).GoString", Method, 0}, + {"(ProgFlag).String", Method, 0}, + {"(ProgType).GoString", Method, 0}, + {"(ProgType).String", Method, 0}, + {"(R_386).GoString", Method, 0}, + {"(R_386).String", Method, 0}, + {"(R_390).GoString", Method, 7}, + {"(R_390).String", Method, 7}, + {"(R_AARCH64).GoString", Method, 4}, + {"(R_AARCH64).String", Method, 4}, + {"(R_ALPHA).GoString", Method, 0}, + {"(R_ALPHA).String", Method, 0}, + {"(R_ARM).GoString", Method, 0}, + {"(R_ARM).String", Method, 0}, + {"(R_LARCH).GoString", Method, 19}, + {"(R_LARCH).String", Method, 19}, + {"(R_MIPS).GoString", Method, 6}, + {"(R_MIPS).String", Method, 6}, + {"(R_PPC).GoString", Method, 0}, + {"(R_PPC).String", Method, 0}, + {"(R_PPC64).GoString", Method, 5}, + {"(R_PPC64).String", Method, 5}, + {"(R_RISCV).GoString", Method, 11}, + {"(R_RISCV).String", Method, 11}, + {"(R_SPARC).GoString", Method, 0}, + {"(R_SPARC).String", Method, 0}, + {"(R_X86_64).GoString", Method, 0}, + {"(R_X86_64).String", Method, 0}, + {"(Section).ReadAt", Method, 0}, + {"(SectionFlag).GoString", Method, 0}, + {"(SectionFlag).String", Method, 0}, + {"(SectionIndex).GoString", Method, 0}, + {"(SectionIndex).String", Method, 0}, + {"(SectionType).GoString", Method, 0}, + {"(SectionType).String", Method, 0}, + {"(SymBind).GoString", Method, 0}, + {"(SymBind).String", Method, 0}, + {"(SymType).GoString", Method, 0}, + {"(SymType).String", Method, 0}, + {"(SymVis).GoString", Method, 0}, + {"(SymVis).String", Method, 0}, + {"(Type).GoString", Method, 0}, + {"(Type).String", Method, 0}, + {"(Version).GoString", Method, 0}, + {"(Version).String", Method, 0}, + {"ARM_MAGIC_TRAMP_NUMBER", Const, 0}, + {"COMPRESS_HIOS", Const, 6}, + {"COMPRESS_HIPROC", Const, 6}, + {"COMPRESS_LOOS", Const, 6}, + {"COMPRESS_LOPROC", Const, 6}, + {"COMPRESS_ZLIB", Const, 6}, + {"COMPRESS_ZSTD", Const, 21}, + {"Chdr32", Type, 6}, + {"Chdr32.Addralign", Field, 6}, + {"Chdr32.Size", Field, 6}, + {"Chdr32.Type", Field, 6}, + {"Chdr64", Type, 6}, + {"Chdr64.Addralign", Field, 6}, + {"Chdr64.Size", Field, 6}, + {"Chdr64.Type", Field, 6}, + {"Class", Type, 0}, + {"CompressionType", Type, 6}, + {"DF_1_CONFALT", Const, 21}, + {"DF_1_DIRECT", Const, 21}, + {"DF_1_DISPRELDNE", Const, 21}, + {"DF_1_DISPRELPND", Const, 21}, + {"DF_1_EDITED", Const, 21}, + {"DF_1_ENDFILTEE", Const, 21}, + {"DF_1_GLOBAL", Const, 21}, + {"DF_1_GLOBAUDIT", Const, 21}, + {"DF_1_GROUP", Const, 21}, + {"DF_1_IGNMULDEF", Const, 21}, + {"DF_1_INITFIRST", Const, 21}, + {"DF_1_INTERPOSE", Const, 21}, + {"DF_1_KMOD", Const, 21}, + {"DF_1_LOADFLTR", Const, 21}, + {"DF_1_NOCOMMON", Const, 21}, + {"DF_1_NODEFLIB", Const, 21}, + {"DF_1_NODELETE", Const, 21}, + {"DF_1_NODIRECT", Const, 21}, + {"DF_1_NODUMP", Const, 21}, + {"DF_1_NOHDR", Const, 21}, + {"DF_1_NOKSYMS", Const, 21}, + {"DF_1_NOOPEN", Const, 21}, + {"DF_1_NORELOC", Const, 21}, + {"DF_1_NOW", Const, 21}, + {"DF_1_ORIGIN", Const, 21}, + {"DF_1_PIE", Const, 21}, + {"DF_1_SINGLETON", Const, 21}, + {"DF_1_STUB", Const, 21}, + {"DF_1_SYMINTPOSE", Const, 21}, + {"DF_1_TRANS", Const, 21}, + {"DF_1_WEAKFILTER", Const, 21}, + {"DF_BIND_NOW", Const, 0}, + {"DF_ORIGIN", Const, 0}, + {"DF_STATIC_TLS", Const, 0}, + {"DF_SYMBOLIC", Const, 0}, + {"DF_TEXTREL", Const, 0}, + {"DT_ADDRRNGHI", Const, 16}, + {"DT_ADDRRNGLO", Const, 16}, + {"DT_AUDIT", Const, 16}, + {"DT_AUXILIARY", Const, 16}, + {"DT_BIND_NOW", Const, 0}, + {"DT_CHECKSUM", Const, 16}, + {"DT_CONFIG", Const, 16}, + {"DT_DEBUG", Const, 0}, + {"DT_DEPAUDIT", Const, 16}, + {"DT_ENCODING", Const, 0}, + {"DT_FEATURE", Const, 16}, + {"DT_FILTER", Const, 16}, + {"DT_FINI", Const, 0}, + {"DT_FINI_ARRAY", Const, 0}, + {"DT_FINI_ARRAYSZ", Const, 0}, + {"DT_FLAGS", Const, 0}, + {"DT_FLAGS_1", Const, 16}, + {"DT_GNU_CONFLICT", Const, 16}, + {"DT_GNU_CONFLICTSZ", Const, 16}, + {"DT_GNU_HASH", Const, 16}, + {"DT_GNU_LIBLIST", Const, 16}, + {"DT_GNU_LIBLISTSZ", Const, 16}, + {"DT_GNU_PRELINKED", Const, 16}, + {"DT_HASH", Const, 0}, + {"DT_HIOS", Const, 0}, + {"DT_HIPROC", Const, 0}, + {"DT_INIT", Const, 0}, + {"DT_INIT_ARRAY", Const, 0}, + {"DT_INIT_ARRAYSZ", Const, 0}, + {"DT_JMPREL", Const, 0}, + {"DT_LOOS", Const, 0}, + {"DT_LOPROC", Const, 0}, + {"DT_MIPS_AUX_DYNAMIC", Const, 16}, + {"DT_MIPS_BASE_ADDRESS", Const, 16}, + {"DT_MIPS_COMPACT_SIZE", Const, 16}, + {"DT_MIPS_CONFLICT", Const, 16}, + {"DT_MIPS_CONFLICTNO", Const, 16}, + {"DT_MIPS_CXX_FLAGS", Const, 16}, + {"DT_MIPS_DELTA_CLASS", Const, 16}, + {"DT_MIPS_DELTA_CLASSSYM", Const, 16}, + {"DT_MIPS_DELTA_CLASSSYM_NO", Const, 16}, + {"DT_MIPS_DELTA_CLASS_NO", Const, 16}, + {"DT_MIPS_DELTA_INSTANCE", Const, 16}, + {"DT_MIPS_DELTA_INSTANCE_NO", Const, 16}, + {"DT_MIPS_DELTA_RELOC", Const, 16}, + {"DT_MIPS_DELTA_RELOC_NO", Const, 16}, + {"DT_MIPS_DELTA_SYM", Const, 16}, + {"DT_MIPS_DELTA_SYM_NO", Const, 16}, + {"DT_MIPS_DYNSTR_ALIGN", Const, 16}, + {"DT_MIPS_FLAGS", Const, 16}, + {"DT_MIPS_GOTSYM", Const, 16}, + {"DT_MIPS_GP_VALUE", Const, 16}, + {"DT_MIPS_HIDDEN_GOTIDX", Const, 16}, + {"DT_MIPS_HIPAGENO", Const, 16}, + {"DT_MIPS_ICHECKSUM", Const, 16}, + {"DT_MIPS_INTERFACE", Const, 16}, + {"DT_MIPS_INTERFACE_SIZE", Const, 16}, + {"DT_MIPS_IVERSION", Const, 16}, + {"DT_MIPS_LIBLIST", Const, 16}, + {"DT_MIPS_LIBLISTNO", Const, 16}, + {"DT_MIPS_LOCALPAGE_GOTIDX", Const, 16}, + {"DT_MIPS_LOCAL_GOTIDX", Const, 16}, + {"DT_MIPS_LOCAL_GOTNO", Const, 16}, + {"DT_MIPS_MSYM", Const, 16}, + {"DT_MIPS_OPTIONS", Const, 16}, + {"DT_MIPS_PERF_SUFFIX", Const, 16}, + {"DT_MIPS_PIXIE_INIT", Const, 16}, + {"DT_MIPS_PLTGOT", Const, 16}, + {"DT_MIPS_PROTECTED_GOTIDX", Const, 16}, + {"DT_MIPS_RLD_MAP", Const, 16}, + {"DT_MIPS_RLD_MAP_REL", Const, 16}, + {"DT_MIPS_RLD_TEXT_RESOLVE_ADDR", Const, 16}, + {"DT_MIPS_RLD_VERSION", Const, 16}, + {"DT_MIPS_RWPLT", Const, 16}, + {"DT_MIPS_SYMBOL_LIB", Const, 16}, + {"DT_MIPS_SYMTABNO", Const, 16}, + {"DT_MIPS_TIME_STAMP", Const, 16}, + {"DT_MIPS_UNREFEXTNO", Const, 16}, + {"DT_MOVEENT", Const, 16}, + {"DT_MOVESZ", Const, 16}, + {"DT_MOVETAB", Const, 16}, + {"DT_NEEDED", Const, 0}, + {"DT_NULL", Const, 0}, + {"DT_PLTGOT", Const, 0}, + {"DT_PLTPAD", Const, 16}, + {"DT_PLTPADSZ", Const, 16}, + {"DT_PLTREL", Const, 0}, + {"DT_PLTRELSZ", Const, 0}, + {"DT_POSFLAG_1", Const, 16}, + {"DT_PPC64_GLINK", Const, 16}, + {"DT_PPC64_OPD", Const, 16}, + {"DT_PPC64_OPDSZ", Const, 16}, + {"DT_PPC64_OPT", Const, 16}, + {"DT_PPC_GOT", Const, 16}, + {"DT_PPC_OPT", Const, 16}, + {"DT_PREINIT_ARRAY", Const, 0}, + {"DT_PREINIT_ARRAYSZ", Const, 0}, + {"DT_REL", Const, 0}, + {"DT_RELA", Const, 0}, + {"DT_RELACOUNT", Const, 16}, + {"DT_RELAENT", Const, 0}, + {"DT_RELASZ", Const, 0}, + {"DT_RELCOUNT", Const, 16}, + {"DT_RELENT", Const, 0}, + {"DT_RELSZ", Const, 0}, + {"DT_RPATH", Const, 0}, + {"DT_RUNPATH", Const, 0}, + {"DT_SONAME", Const, 0}, + {"DT_SPARC_REGISTER", Const, 16}, + {"DT_STRSZ", Const, 0}, + {"DT_STRTAB", Const, 0}, + {"DT_SYMBOLIC", Const, 0}, + {"DT_SYMENT", Const, 0}, + {"DT_SYMINENT", Const, 16}, + {"DT_SYMINFO", Const, 16}, + {"DT_SYMINSZ", Const, 16}, + {"DT_SYMTAB", Const, 0}, + {"DT_SYMTAB_SHNDX", Const, 16}, + {"DT_TEXTREL", Const, 0}, + {"DT_TLSDESC_GOT", Const, 16}, + {"DT_TLSDESC_PLT", Const, 16}, + {"DT_USED", Const, 16}, + {"DT_VALRNGHI", Const, 16}, + {"DT_VALRNGLO", Const, 16}, + {"DT_VERDEF", Const, 16}, + {"DT_VERDEFNUM", Const, 16}, + {"DT_VERNEED", Const, 0}, + {"DT_VERNEEDNUM", Const, 0}, + {"DT_VERSYM", Const, 0}, + {"Data", Type, 0}, + {"Dyn32", Type, 0}, + {"Dyn32.Tag", Field, 0}, + {"Dyn32.Val", Field, 0}, + {"Dyn64", Type, 0}, + {"Dyn64.Tag", Field, 0}, + {"Dyn64.Val", Field, 0}, + {"DynFlag", Type, 0}, + {"DynFlag1", Type, 21}, + {"DynTag", Type, 0}, + {"EI_ABIVERSION", Const, 0}, + {"EI_CLASS", Const, 0}, + {"EI_DATA", Const, 0}, + {"EI_NIDENT", Const, 0}, + {"EI_OSABI", Const, 0}, + {"EI_PAD", Const, 0}, + {"EI_VERSION", Const, 0}, + {"ELFCLASS32", Const, 0}, + {"ELFCLASS64", Const, 0}, + {"ELFCLASSNONE", Const, 0}, + {"ELFDATA2LSB", Const, 0}, + {"ELFDATA2MSB", Const, 0}, + {"ELFDATANONE", Const, 0}, + {"ELFMAG", Const, 0}, + {"ELFOSABI_86OPEN", Const, 0}, + {"ELFOSABI_AIX", Const, 0}, + {"ELFOSABI_ARM", Const, 0}, + {"ELFOSABI_AROS", Const, 11}, + {"ELFOSABI_CLOUDABI", Const, 11}, + {"ELFOSABI_FENIXOS", Const, 11}, + {"ELFOSABI_FREEBSD", Const, 0}, + {"ELFOSABI_HPUX", Const, 0}, + {"ELFOSABI_HURD", Const, 0}, + {"ELFOSABI_IRIX", Const, 0}, + {"ELFOSABI_LINUX", Const, 0}, + {"ELFOSABI_MODESTO", Const, 0}, + {"ELFOSABI_NETBSD", Const, 0}, + {"ELFOSABI_NONE", Const, 0}, + {"ELFOSABI_NSK", Const, 0}, + {"ELFOSABI_OPENBSD", Const, 0}, + {"ELFOSABI_OPENVMS", Const, 0}, + {"ELFOSABI_SOLARIS", Const, 0}, + {"ELFOSABI_STANDALONE", Const, 0}, + {"ELFOSABI_TRU64", Const, 0}, + {"EM_386", Const, 0}, + {"EM_486", Const, 0}, + {"EM_56800EX", Const, 11}, + {"EM_68HC05", Const, 11}, + {"EM_68HC08", Const, 11}, + {"EM_68HC11", Const, 11}, + {"EM_68HC12", Const, 0}, + {"EM_68HC16", Const, 11}, + {"EM_68K", Const, 0}, + {"EM_78KOR", Const, 11}, + {"EM_8051", Const, 11}, + {"EM_860", Const, 0}, + {"EM_88K", Const, 0}, + {"EM_960", Const, 0}, + {"EM_AARCH64", Const, 4}, + {"EM_ALPHA", Const, 0}, + {"EM_ALPHA_STD", Const, 0}, + {"EM_ALTERA_NIOS2", Const, 11}, + {"EM_AMDGPU", Const, 11}, + {"EM_ARC", Const, 0}, + {"EM_ARCA", Const, 11}, + {"EM_ARC_COMPACT", Const, 11}, + {"EM_ARC_COMPACT2", Const, 11}, + {"EM_ARM", Const, 0}, + {"EM_AVR", Const, 11}, + {"EM_AVR32", Const, 11}, + {"EM_BA1", Const, 11}, + {"EM_BA2", Const, 11}, + {"EM_BLACKFIN", Const, 11}, + {"EM_BPF", Const, 11}, + {"EM_C166", Const, 11}, + {"EM_CDP", Const, 11}, + {"EM_CE", Const, 11}, + {"EM_CLOUDSHIELD", Const, 11}, + {"EM_COGE", Const, 11}, + {"EM_COLDFIRE", Const, 0}, + {"EM_COOL", Const, 11}, + {"EM_COREA_1ST", Const, 11}, + {"EM_COREA_2ND", Const, 11}, + {"EM_CR", Const, 11}, + {"EM_CR16", Const, 11}, + {"EM_CRAYNV2", Const, 11}, + {"EM_CRIS", Const, 11}, + {"EM_CRX", Const, 11}, + {"EM_CSR_KALIMBA", Const, 11}, + {"EM_CUDA", Const, 11}, + {"EM_CYPRESS_M8C", Const, 11}, + {"EM_D10V", Const, 11}, + {"EM_D30V", Const, 11}, + {"EM_DSP24", Const, 11}, + {"EM_DSPIC30F", Const, 11}, + {"EM_DXP", Const, 11}, + {"EM_ECOG1", Const, 11}, + {"EM_ECOG16", Const, 11}, + {"EM_ECOG1X", Const, 11}, + {"EM_ECOG2", Const, 11}, + {"EM_ETPU", Const, 11}, + {"EM_EXCESS", Const, 11}, + {"EM_F2MC16", Const, 11}, + {"EM_FIREPATH", Const, 11}, + {"EM_FR20", Const, 0}, + {"EM_FR30", Const, 11}, + {"EM_FT32", Const, 11}, + {"EM_FX66", Const, 11}, + {"EM_H8S", Const, 0}, + {"EM_H8_300", Const, 0}, + {"EM_H8_300H", Const, 0}, + {"EM_H8_500", Const, 0}, + {"EM_HUANY", Const, 11}, + {"EM_IA_64", Const, 0}, + {"EM_INTEL205", Const, 11}, + {"EM_INTEL206", Const, 11}, + {"EM_INTEL207", Const, 11}, + {"EM_INTEL208", Const, 11}, + {"EM_INTEL209", Const, 11}, + {"EM_IP2K", Const, 11}, + {"EM_JAVELIN", Const, 11}, + {"EM_K10M", Const, 11}, + {"EM_KM32", Const, 11}, + {"EM_KMX16", Const, 11}, + {"EM_KMX32", Const, 11}, + {"EM_KMX8", Const, 11}, + {"EM_KVARC", Const, 11}, + {"EM_L10M", Const, 11}, + {"EM_LANAI", Const, 11}, + {"EM_LATTICEMICO32", Const, 11}, + {"EM_LOONGARCH", Const, 19}, + {"EM_M16C", Const, 11}, + {"EM_M32", Const, 0}, + {"EM_M32C", Const, 11}, + {"EM_M32R", Const, 11}, + {"EM_MANIK", Const, 11}, + {"EM_MAX", Const, 11}, + {"EM_MAXQ30", Const, 11}, + {"EM_MCHP_PIC", Const, 11}, + {"EM_MCST_ELBRUS", Const, 11}, + {"EM_ME16", Const, 0}, + {"EM_METAG", Const, 11}, + {"EM_MICROBLAZE", Const, 11}, + {"EM_MIPS", Const, 0}, + {"EM_MIPS_RS3_LE", Const, 0}, + {"EM_MIPS_RS4_BE", Const, 0}, + {"EM_MIPS_X", Const, 0}, + {"EM_MMA", Const, 0}, + {"EM_MMDSP_PLUS", Const, 11}, + {"EM_MMIX", Const, 11}, + {"EM_MN10200", Const, 11}, + {"EM_MN10300", Const, 11}, + {"EM_MOXIE", Const, 11}, + {"EM_MSP430", Const, 11}, + {"EM_NCPU", Const, 0}, + {"EM_NDR1", Const, 0}, + {"EM_NDS32", Const, 11}, + {"EM_NONE", Const, 0}, + {"EM_NORC", Const, 11}, + {"EM_NS32K", Const, 11}, + {"EM_OPEN8", Const, 11}, + {"EM_OPENRISC", Const, 11}, + {"EM_PARISC", Const, 0}, + {"EM_PCP", Const, 0}, + {"EM_PDP10", Const, 11}, + {"EM_PDP11", Const, 11}, + {"EM_PDSP", Const, 11}, + {"EM_PJ", Const, 11}, + {"EM_PPC", Const, 0}, + {"EM_PPC64", Const, 0}, + {"EM_PRISM", Const, 11}, + {"EM_QDSP6", Const, 11}, + {"EM_R32C", Const, 11}, + {"EM_RCE", Const, 0}, + {"EM_RH32", Const, 0}, + {"EM_RISCV", Const, 11}, + {"EM_RL78", Const, 11}, + {"EM_RS08", Const, 11}, + {"EM_RX", Const, 11}, + {"EM_S370", Const, 0}, + {"EM_S390", Const, 0}, + {"EM_SCORE7", Const, 11}, + {"EM_SEP", Const, 11}, + {"EM_SE_C17", Const, 11}, + {"EM_SE_C33", Const, 11}, + {"EM_SH", Const, 0}, + {"EM_SHARC", Const, 11}, + {"EM_SLE9X", Const, 11}, + {"EM_SNP1K", Const, 11}, + {"EM_SPARC", Const, 0}, + {"EM_SPARC32PLUS", Const, 0}, + {"EM_SPARCV9", Const, 0}, + {"EM_ST100", Const, 0}, + {"EM_ST19", Const, 11}, + {"EM_ST200", Const, 11}, + {"EM_ST7", Const, 11}, + {"EM_ST9PLUS", Const, 11}, + {"EM_STARCORE", Const, 0}, + {"EM_STM8", Const, 11}, + {"EM_STXP7X", Const, 11}, + {"EM_SVX", Const, 11}, + {"EM_TILE64", Const, 11}, + {"EM_TILEGX", Const, 11}, + {"EM_TILEPRO", Const, 11}, + {"EM_TINYJ", Const, 0}, + {"EM_TI_ARP32", Const, 11}, + {"EM_TI_C2000", Const, 11}, + {"EM_TI_C5500", Const, 11}, + {"EM_TI_C6000", Const, 11}, + {"EM_TI_PRU", Const, 11}, + {"EM_TMM_GPP", Const, 11}, + {"EM_TPC", Const, 11}, + {"EM_TRICORE", Const, 0}, + {"EM_TRIMEDIA", Const, 11}, + {"EM_TSK3000", Const, 11}, + {"EM_UNICORE", Const, 11}, + {"EM_V800", Const, 0}, + {"EM_V850", Const, 11}, + {"EM_VAX", Const, 11}, + {"EM_VIDEOCORE", Const, 11}, + {"EM_VIDEOCORE3", Const, 11}, + {"EM_VIDEOCORE5", Const, 11}, + {"EM_VISIUM", Const, 11}, + {"EM_VPP500", Const, 0}, + {"EM_X86_64", Const, 0}, + {"EM_XCORE", Const, 11}, + {"EM_XGATE", Const, 11}, + {"EM_XIMO16", Const, 11}, + {"EM_XTENSA", Const, 11}, + {"EM_Z80", Const, 11}, + {"EM_ZSP", Const, 11}, + {"ET_CORE", Const, 0}, + {"ET_DYN", Const, 0}, + {"ET_EXEC", Const, 0}, + {"ET_HIOS", Const, 0}, + {"ET_HIPROC", Const, 0}, + {"ET_LOOS", Const, 0}, + {"ET_LOPROC", Const, 0}, + {"ET_NONE", Const, 0}, + {"ET_REL", Const, 0}, + {"EV_CURRENT", Const, 0}, + {"EV_NONE", Const, 0}, + {"ErrNoSymbols", Var, 4}, + {"File", Type, 0}, + {"File.FileHeader", Field, 0}, + {"File.Progs", Field, 0}, + {"File.Sections", Field, 0}, + {"FileHeader", Type, 0}, + {"FileHeader.ABIVersion", Field, 0}, + {"FileHeader.ByteOrder", Field, 0}, + {"FileHeader.Class", Field, 0}, + {"FileHeader.Data", Field, 0}, + {"FileHeader.Entry", Field, 1}, + {"FileHeader.Machine", Field, 0}, + {"FileHeader.OSABI", Field, 0}, + {"FileHeader.Type", Field, 0}, + {"FileHeader.Version", Field, 0}, + {"FormatError", Type, 0}, + {"Header32", Type, 0}, + {"Header32.Ehsize", Field, 0}, + {"Header32.Entry", Field, 0}, + {"Header32.Flags", Field, 0}, + {"Header32.Ident", Field, 0}, + {"Header32.Machine", Field, 0}, + {"Header32.Phentsize", Field, 0}, + {"Header32.Phnum", Field, 0}, + {"Header32.Phoff", Field, 0}, + {"Header32.Shentsize", Field, 0}, + {"Header32.Shnum", Field, 0}, + {"Header32.Shoff", Field, 0}, + {"Header32.Shstrndx", Field, 0}, + {"Header32.Type", Field, 0}, + {"Header32.Version", Field, 0}, + {"Header64", Type, 0}, + {"Header64.Ehsize", Field, 0}, + {"Header64.Entry", Field, 0}, + {"Header64.Flags", Field, 0}, + {"Header64.Ident", Field, 0}, + {"Header64.Machine", Field, 0}, + {"Header64.Phentsize", Field, 0}, + {"Header64.Phnum", Field, 0}, + {"Header64.Phoff", Field, 0}, + {"Header64.Shentsize", Field, 0}, + {"Header64.Shnum", Field, 0}, + {"Header64.Shoff", Field, 0}, + {"Header64.Shstrndx", Field, 0}, + {"Header64.Type", Field, 0}, + {"Header64.Version", Field, 0}, + {"ImportedSymbol", Type, 0}, + {"ImportedSymbol.Library", Field, 0}, + {"ImportedSymbol.Name", Field, 0}, + {"ImportedSymbol.Version", Field, 0}, + {"Machine", Type, 0}, + {"NT_FPREGSET", Const, 0}, + {"NT_PRPSINFO", Const, 0}, + {"NT_PRSTATUS", Const, 0}, + {"NType", Type, 0}, + {"NewFile", Func, 0}, + {"OSABI", Type, 0}, + {"Open", Func, 0}, + {"PF_MASKOS", Const, 0}, + {"PF_MASKPROC", Const, 0}, + {"PF_R", Const, 0}, + {"PF_W", Const, 0}, + {"PF_X", Const, 0}, + {"PT_AARCH64_ARCHEXT", Const, 16}, + {"PT_AARCH64_UNWIND", Const, 16}, + {"PT_ARM_ARCHEXT", Const, 16}, + {"PT_ARM_EXIDX", Const, 16}, + {"PT_DYNAMIC", Const, 0}, + {"PT_GNU_EH_FRAME", Const, 16}, + {"PT_GNU_MBIND_HI", Const, 16}, + {"PT_GNU_MBIND_LO", Const, 16}, + {"PT_GNU_PROPERTY", Const, 16}, + {"PT_GNU_RELRO", Const, 16}, + {"PT_GNU_STACK", Const, 16}, + {"PT_HIOS", Const, 0}, + {"PT_HIPROC", Const, 0}, + {"PT_INTERP", Const, 0}, + {"PT_LOAD", Const, 0}, + {"PT_LOOS", Const, 0}, + {"PT_LOPROC", Const, 0}, + {"PT_MIPS_ABIFLAGS", Const, 16}, + {"PT_MIPS_OPTIONS", Const, 16}, + {"PT_MIPS_REGINFO", Const, 16}, + {"PT_MIPS_RTPROC", Const, 16}, + {"PT_NOTE", Const, 0}, + {"PT_NULL", Const, 0}, + {"PT_OPENBSD_BOOTDATA", Const, 16}, + {"PT_OPENBSD_RANDOMIZE", Const, 16}, + {"PT_OPENBSD_WXNEEDED", Const, 16}, + {"PT_PAX_FLAGS", Const, 16}, + {"PT_PHDR", Const, 0}, + {"PT_S390_PGSTE", Const, 16}, + {"PT_SHLIB", Const, 0}, + {"PT_SUNWSTACK", Const, 16}, + {"PT_SUNW_EH_FRAME", Const, 16}, + {"PT_TLS", Const, 0}, + {"Prog", Type, 0}, + {"Prog.ProgHeader", Field, 0}, + {"Prog.ReaderAt", Field, 0}, + {"Prog32", Type, 0}, + {"Prog32.Align", Field, 0}, + {"Prog32.Filesz", Field, 0}, + {"Prog32.Flags", Field, 0}, + {"Prog32.Memsz", Field, 0}, + {"Prog32.Off", Field, 0}, + {"Prog32.Paddr", Field, 0}, + {"Prog32.Type", Field, 0}, + {"Prog32.Vaddr", Field, 0}, + {"Prog64", Type, 0}, + {"Prog64.Align", Field, 0}, + {"Prog64.Filesz", Field, 0}, + {"Prog64.Flags", Field, 0}, + {"Prog64.Memsz", Field, 0}, + {"Prog64.Off", Field, 0}, + {"Prog64.Paddr", Field, 0}, + {"Prog64.Type", Field, 0}, + {"Prog64.Vaddr", Field, 0}, + {"ProgFlag", Type, 0}, + {"ProgHeader", Type, 0}, + {"ProgHeader.Align", Field, 0}, + {"ProgHeader.Filesz", Field, 0}, + {"ProgHeader.Flags", Field, 0}, + {"ProgHeader.Memsz", Field, 0}, + {"ProgHeader.Off", Field, 0}, + {"ProgHeader.Paddr", Field, 0}, + {"ProgHeader.Type", Field, 0}, + {"ProgHeader.Vaddr", Field, 0}, + {"ProgType", Type, 0}, + {"R_386", Type, 0}, + {"R_386_16", Const, 10}, + {"R_386_32", Const, 0}, + {"R_386_32PLT", Const, 10}, + {"R_386_8", Const, 10}, + {"R_386_COPY", Const, 0}, + {"R_386_GLOB_DAT", Const, 0}, + {"R_386_GOT32", Const, 0}, + {"R_386_GOT32X", Const, 10}, + {"R_386_GOTOFF", Const, 0}, + {"R_386_GOTPC", Const, 0}, + {"R_386_IRELATIVE", Const, 10}, + {"R_386_JMP_SLOT", Const, 0}, + {"R_386_NONE", Const, 0}, + {"R_386_PC16", Const, 10}, + {"R_386_PC32", Const, 0}, + {"R_386_PC8", Const, 10}, + {"R_386_PLT32", Const, 0}, + {"R_386_RELATIVE", Const, 0}, + {"R_386_SIZE32", Const, 10}, + {"R_386_TLS_DESC", Const, 10}, + {"R_386_TLS_DESC_CALL", Const, 10}, + {"R_386_TLS_DTPMOD32", Const, 0}, + {"R_386_TLS_DTPOFF32", Const, 0}, + {"R_386_TLS_GD", Const, 0}, + {"R_386_TLS_GD_32", Const, 0}, + {"R_386_TLS_GD_CALL", Const, 0}, + {"R_386_TLS_GD_POP", Const, 0}, + {"R_386_TLS_GD_PUSH", Const, 0}, + {"R_386_TLS_GOTDESC", Const, 10}, + {"R_386_TLS_GOTIE", Const, 0}, + {"R_386_TLS_IE", Const, 0}, + {"R_386_TLS_IE_32", Const, 0}, + {"R_386_TLS_LDM", Const, 0}, + {"R_386_TLS_LDM_32", Const, 0}, + {"R_386_TLS_LDM_CALL", Const, 0}, + {"R_386_TLS_LDM_POP", Const, 0}, + {"R_386_TLS_LDM_PUSH", Const, 0}, + {"R_386_TLS_LDO_32", Const, 0}, + {"R_386_TLS_LE", Const, 0}, + {"R_386_TLS_LE_32", Const, 0}, + {"R_386_TLS_TPOFF", Const, 0}, + {"R_386_TLS_TPOFF32", Const, 0}, + {"R_390", Type, 7}, + {"R_390_12", Const, 7}, + {"R_390_16", Const, 7}, + {"R_390_20", Const, 7}, + {"R_390_32", Const, 7}, + {"R_390_64", Const, 7}, + {"R_390_8", Const, 7}, + {"R_390_COPY", Const, 7}, + {"R_390_GLOB_DAT", Const, 7}, + {"R_390_GOT12", Const, 7}, + {"R_390_GOT16", Const, 7}, + {"R_390_GOT20", Const, 7}, + {"R_390_GOT32", Const, 7}, + {"R_390_GOT64", Const, 7}, + {"R_390_GOTENT", Const, 7}, + {"R_390_GOTOFF", Const, 7}, + {"R_390_GOTOFF16", Const, 7}, + {"R_390_GOTOFF64", Const, 7}, + {"R_390_GOTPC", Const, 7}, + {"R_390_GOTPCDBL", Const, 7}, + {"R_390_GOTPLT12", Const, 7}, + {"R_390_GOTPLT16", Const, 7}, + {"R_390_GOTPLT20", Const, 7}, + {"R_390_GOTPLT32", Const, 7}, + {"R_390_GOTPLT64", Const, 7}, + {"R_390_GOTPLTENT", Const, 7}, + {"R_390_GOTPLTOFF16", Const, 7}, + {"R_390_GOTPLTOFF32", Const, 7}, + {"R_390_GOTPLTOFF64", Const, 7}, + {"R_390_JMP_SLOT", Const, 7}, + {"R_390_NONE", Const, 7}, + {"R_390_PC16", Const, 7}, + {"R_390_PC16DBL", Const, 7}, + {"R_390_PC32", Const, 7}, + {"R_390_PC32DBL", Const, 7}, + {"R_390_PC64", Const, 7}, + {"R_390_PLT16DBL", Const, 7}, + {"R_390_PLT32", Const, 7}, + {"R_390_PLT32DBL", Const, 7}, + {"R_390_PLT64", Const, 7}, + {"R_390_RELATIVE", Const, 7}, + {"R_390_TLS_DTPMOD", Const, 7}, + {"R_390_TLS_DTPOFF", Const, 7}, + {"R_390_TLS_GD32", Const, 7}, + {"R_390_TLS_GD64", Const, 7}, + {"R_390_TLS_GDCALL", Const, 7}, + {"R_390_TLS_GOTIE12", Const, 7}, + {"R_390_TLS_GOTIE20", Const, 7}, + {"R_390_TLS_GOTIE32", Const, 7}, + {"R_390_TLS_GOTIE64", Const, 7}, + {"R_390_TLS_IE32", Const, 7}, + {"R_390_TLS_IE64", Const, 7}, + {"R_390_TLS_IEENT", Const, 7}, + {"R_390_TLS_LDCALL", Const, 7}, + {"R_390_TLS_LDM32", Const, 7}, + {"R_390_TLS_LDM64", Const, 7}, + {"R_390_TLS_LDO32", Const, 7}, + {"R_390_TLS_LDO64", Const, 7}, + {"R_390_TLS_LE32", Const, 7}, + {"R_390_TLS_LE64", Const, 7}, + {"R_390_TLS_LOAD", Const, 7}, + {"R_390_TLS_TPOFF", Const, 7}, + {"R_AARCH64", Type, 4}, + {"R_AARCH64_ABS16", Const, 4}, + {"R_AARCH64_ABS32", Const, 4}, + {"R_AARCH64_ABS64", Const, 4}, + {"R_AARCH64_ADD_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_ADR_GOT_PAGE", Const, 4}, + {"R_AARCH64_ADR_PREL_LO21", Const, 4}, + {"R_AARCH64_ADR_PREL_PG_HI21", Const, 4}, + {"R_AARCH64_ADR_PREL_PG_HI21_NC", Const, 4}, + {"R_AARCH64_CALL26", Const, 4}, + {"R_AARCH64_CONDBR19", Const, 4}, + {"R_AARCH64_COPY", Const, 4}, + {"R_AARCH64_GLOB_DAT", Const, 4}, + {"R_AARCH64_GOT_LD_PREL19", Const, 4}, + {"R_AARCH64_IRELATIVE", Const, 4}, + {"R_AARCH64_JUMP26", Const, 4}, + {"R_AARCH64_JUMP_SLOT", Const, 4}, + {"R_AARCH64_LD64_GOTOFF_LO15", Const, 10}, + {"R_AARCH64_LD64_GOTPAGE_LO15", Const, 10}, + {"R_AARCH64_LD64_GOT_LO12_NC", Const, 4}, + {"R_AARCH64_LDST128_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_LDST16_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_LDST32_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_LDST64_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_LDST8_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_LD_PREL_LO19", Const, 4}, + {"R_AARCH64_MOVW_SABS_G0", Const, 4}, + {"R_AARCH64_MOVW_SABS_G1", Const, 4}, + {"R_AARCH64_MOVW_SABS_G2", Const, 4}, + {"R_AARCH64_MOVW_UABS_G0", Const, 4}, + {"R_AARCH64_MOVW_UABS_G0_NC", Const, 4}, + {"R_AARCH64_MOVW_UABS_G1", Const, 4}, + {"R_AARCH64_MOVW_UABS_G1_NC", Const, 4}, + {"R_AARCH64_MOVW_UABS_G2", Const, 4}, + {"R_AARCH64_MOVW_UABS_G2_NC", Const, 4}, + {"R_AARCH64_MOVW_UABS_G3", Const, 4}, + {"R_AARCH64_NONE", Const, 4}, + {"R_AARCH64_NULL", Const, 4}, + {"R_AARCH64_P32_ABS16", Const, 4}, + {"R_AARCH64_P32_ABS32", Const, 4}, + {"R_AARCH64_P32_ADD_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_P32_ADR_GOT_PAGE", Const, 4}, + {"R_AARCH64_P32_ADR_PREL_LO21", Const, 4}, + {"R_AARCH64_P32_ADR_PREL_PG_HI21", Const, 4}, + {"R_AARCH64_P32_CALL26", Const, 4}, + {"R_AARCH64_P32_CONDBR19", Const, 4}, + {"R_AARCH64_P32_COPY", Const, 4}, + {"R_AARCH64_P32_GLOB_DAT", Const, 4}, + {"R_AARCH64_P32_GOT_LD_PREL19", Const, 4}, + {"R_AARCH64_P32_IRELATIVE", Const, 4}, + {"R_AARCH64_P32_JUMP26", Const, 4}, + {"R_AARCH64_P32_JUMP_SLOT", Const, 4}, + {"R_AARCH64_P32_LD32_GOT_LO12_NC", Const, 4}, + {"R_AARCH64_P32_LDST128_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_P32_LDST16_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_P32_LDST32_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_P32_LDST64_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_P32_LDST8_ABS_LO12_NC", Const, 4}, + {"R_AARCH64_P32_LD_PREL_LO19", Const, 4}, + {"R_AARCH64_P32_MOVW_SABS_G0", Const, 4}, + {"R_AARCH64_P32_MOVW_UABS_G0", Const, 4}, + {"R_AARCH64_P32_MOVW_UABS_G0_NC", Const, 4}, + {"R_AARCH64_P32_MOVW_UABS_G1", Const, 4}, + {"R_AARCH64_P32_PREL16", Const, 4}, + {"R_AARCH64_P32_PREL32", Const, 4}, + {"R_AARCH64_P32_RELATIVE", Const, 4}, + {"R_AARCH64_P32_TLSDESC", Const, 4}, + {"R_AARCH64_P32_TLSDESC_ADD_LO12_NC", Const, 4}, + {"R_AARCH64_P32_TLSDESC_ADR_PAGE21", Const, 4}, + {"R_AARCH64_P32_TLSDESC_ADR_PREL21", Const, 4}, + {"R_AARCH64_P32_TLSDESC_CALL", Const, 4}, + {"R_AARCH64_P32_TLSDESC_LD32_LO12_NC", Const, 4}, + {"R_AARCH64_P32_TLSDESC_LD_PREL19", Const, 4}, + {"R_AARCH64_P32_TLSGD_ADD_LO12_NC", Const, 4}, + {"R_AARCH64_P32_TLSGD_ADR_PAGE21", Const, 4}, + {"R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21", Const, 4}, + {"R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC", Const, 4}, + {"R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19", Const, 4}, + {"R_AARCH64_P32_TLSLE_ADD_TPREL_HI12", Const, 4}, + {"R_AARCH64_P32_TLSLE_ADD_TPREL_LO12", Const, 4}, + {"R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC", Const, 4}, + {"R_AARCH64_P32_TLSLE_MOVW_TPREL_G0", Const, 4}, + {"R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC", Const, 4}, + {"R_AARCH64_P32_TLSLE_MOVW_TPREL_G1", Const, 4}, + {"R_AARCH64_P32_TLS_DTPMOD", Const, 4}, + {"R_AARCH64_P32_TLS_DTPREL", Const, 4}, + {"R_AARCH64_P32_TLS_TPREL", Const, 4}, + {"R_AARCH64_P32_TSTBR14", Const, 4}, + {"R_AARCH64_PREL16", Const, 4}, + {"R_AARCH64_PREL32", Const, 4}, + {"R_AARCH64_PREL64", Const, 4}, + {"R_AARCH64_RELATIVE", Const, 4}, + {"R_AARCH64_TLSDESC", Const, 4}, + {"R_AARCH64_TLSDESC_ADD", Const, 4}, + {"R_AARCH64_TLSDESC_ADD_LO12_NC", Const, 4}, + {"R_AARCH64_TLSDESC_ADR_PAGE21", Const, 4}, + {"R_AARCH64_TLSDESC_ADR_PREL21", Const, 4}, + {"R_AARCH64_TLSDESC_CALL", Const, 4}, + {"R_AARCH64_TLSDESC_LD64_LO12_NC", Const, 4}, + {"R_AARCH64_TLSDESC_LDR", Const, 4}, + {"R_AARCH64_TLSDESC_LD_PREL19", Const, 4}, + {"R_AARCH64_TLSDESC_OFF_G0_NC", Const, 4}, + {"R_AARCH64_TLSDESC_OFF_G1", Const, 4}, + {"R_AARCH64_TLSGD_ADD_LO12_NC", Const, 4}, + {"R_AARCH64_TLSGD_ADR_PAGE21", Const, 4}, + {"R_AARCH64_TLSGD_ADR_PREL21", Const, 10}, + {"R_AARCH64_TLSGD_MOVW_G0_NC", Const, 10}, + {"R_AARCH64_TLSGD_MOVW_G1", Const, 10}, + {"R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21", Const, 4}, + {"R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC", Const, 4}, + {"R_AARCH64_TLSIE_LD_GOTTPREL_PREL19", Const, 4}, + {"R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC", Const, 4}, + {"R_AARCH64_TLSIE_MOVW_GOTTPREL_G1", Const, 4}, + {"R_AARCH64_TLSLD_ADR_PAGE21", Const, 10}, + {"R_AARCH64_TLSLD_ADR_PREL21", Const, 10}, + {"R_AARCH64_TLSLD_LDST128_DTPREL_LO12", Const, 10}, + {"R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC", Const, 10}, + {"R_AARCH64_TLSLE_ADD_TPREL_HI12", Const, 4}, + {"R_AARCH64_TLSLE_ADD_TPREL_LO12", Const, 4}, + {"R_AARCH64_TLSLE_ADD_TPREL_LO12_NC", Const, 4}, + {"R_AARCH64_TLSLE_LDST128_TPREL_LO12", Const, 10}, + {"R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC", Const, 10}, + {"R_AARCH64_TLSLE_MOVW_TPREL_G0", Const, 4}, + {"R_AARCH64_TLSLE_MOVW_TPREL_G0_NC", Const, 4}, + {"R_AARCH64_TLSLE_MOVW_TPREL_G1", Const, 4}, + {"R_AARCH64_TLSLE_MOVW_TPREL_G1_NC", Const, 4}, + {"R_AARCH64_TLSLE_MOVW_TPREL_G2", Const, 4}, + {"R_AARCH64_TLS_DTPMOD64", Const, 4}, + {"R_AARCH64_TLS_DTPREL64", Const, 4}, + {"R_AARCH64_TLS_TPREL64", Const, 4}, + {"R_AARCH64_TSTBR14", Const, 4}, + {"R_ALPHA", Type, 0}, + {"R_ALPHA_BRADDR", Const, 0}, + {"R_ALPHA_COPY", Const, 0}, + {"R_ALPHA_GLOB_DAT", Const, 0}, + {"R_ALPHA_GPDISP", Const, 0}, + {"R_ALPHA_GPREL32", Const, 0}, + {"R_ALPHA_GPRELHIGH", Const, 0}, + {"R_ALPHA_GPRELLOW", Const, 0}, + {"R_ALPHA_GPVALUE", Const, 0}, + {"R_ALPHA_HINT", Const, 0}, + {"R_ALPHA_IMMED_BR_HI32", Const, 0}, + {"R_ALPHA_IMMED_GP_16", Const, 0}, + {"R_ALPHA_IMMED_GP_HI32", Const, 0}, + {"R_ALPHA_IMMED_LO32", Const, 0}, + {"R_ALPHA_IMMED_SCN_HI32", Const, 0}, + {"R_ALPHA_JMP_SLOT", Const, 0}, + {"R_ALPHA_LITERAL", Const, 0}, + {"R_ALPHA_LITUSE", Const, 0}, + {"R_ALPHA_NONE", Const, 0}, + {"R_ALPHA_OP_PRSHIFT", Const, 0}, + {"R_ALPHA_OP_PSUB", Const, 0}, + {"R_ALPHA_OP_PUSH", Const, 0}, + {"R_ALPHA_OP_STORE", Const, 0}, + {"R_ALPHA_REFLONG", Const, 0}, + {"R_ALPHA_REFQUAD", Const, 0}, + {"R_ALPHA_RELATIVE", Const, 0}, + {"R_ALPHA_SREL16", Const, 0}, + {"R_ALPHA_SREL32", Const, 0}, + {"R_ALPHA_SREL64", Const, 0}, + {"R_ARM", Type, 0}, + {"R_ARM_ABS12", Const, 0}, + {"R_ARM_ABS16", Const, 0}, + {"R_ARM_ABS32", Const, 0}, + {"R_ARM_ABS32_NOI", Const, 10}, + {"R_ARM_ABS8", Const, 0}, + {"R_ARM_ALU_PCREL_15_8", Const, 10}, + {"R_ARM_ALU_PCREL_23_15", Const, 10}, + {"R_ARM_ALU_PCREL_7_0", Const, 10}, + {"R_ARM_ALU_PC_G0", Const, 10}, + {"R_ARM_ALU_PC_G0_NC", Const, 10}, + {"R_ARM_ALU_PC_G1", Const, 10}, + {"R_ARM_ALU_PC_G1_NC", Const, 10}, + {"R_ARM_ALU_PC_G2", Const, 10}, + {"R_ARM_ALU_SBREL_19_12_NC", Const, 10}, + {"R_ARM_ALU_SBREL_27_20_CK", Const, 10}, + {"R_ARM_ALU_SB_G0", Const, 10}, + {"R_ARM_ALU_SB_G0_NC", Const, 10}, + {"R_ARM_ALU_SB_G1", Const, 10}, + {"R_ARM_ALU_SB_G1_NC", Const, 10}, + {"R_ARM_ALU_SB_G2", Const, 10}, + {"R_ARM_AMP_VCALL9", Const, 0}, + {"R_ARM_BASE_ABS", Const, 10}, + {"R_ARM_CALL", Const, 10}, + {"R_ARM_COPY", Const, 0}, + {"R_ARM_GLOB_DAT", Const, 0}, + {"R_ARM_GNU_VTENTRY", Const, 0}, + {"R_ARM_GNU_VTINHERIT", Const, 0}, + {"R_ARM_GOT32", Const, 0}, + {"R_ARM_GOTOFF", Const, 0}, + {"R_ARM_GOTOFF12", Const, 10}, + {"R_ARM_GOTPC", Const, 0}, + {"R_ARM_GOTRELAX", Const, 10}, + {"R_ARM_GOT_ABS", Const, 10}, + {"R_ARM_GOT_BREL12", Const, 10}, + {"R_ARM_GOT_PREL", Const, 10}, + {"R_ARM_IRELATIVE", Const, 10}, + {"R_ARM_JUMP24", Const, 10}, + {"R_ARM_JUMP_SLOT", Const, 0}, + {"R_ARM_LDC_PC_G0", Const, 10}, + {"R_ARM_LDC_PC_G1", Const, 10}, + {"R_ARM_LDC_PC_G2", Const, 10}, + {"R_ARM_LDC_SB_G0", Const, 10}, + {"R_ARM_LDC_SB_G1", Const, 10}, + {"R_ARM_LDC_SB_G2", Const, 10}, + {"R_ARM_LDRS_PC_G0", Const, 10}, + {"R_ARM_LDRS_PC_G1", Const, 10}, + {"R_ARM_LDRS_PC_G2", Const, 10}, + {"R_ARM_LDRS_SB_G0", Const, 10}, + {"R_ARM_LDRS_SB_G1", Const, 10}, + {"R_ARM_LDRS_SB_G2", Const, 10}, + {"R_ARM_LDR_PC_G1", Const, 10}, + {"R_ARM_LDR_PC_G2", Const, 10}, + {"R_ARM_LDR_SBREL_11_10_NC", Const, 10}, + {"R_ARM_LDR_SB_G0", Const, 10}, + {"R_ARM_LDR_SB_G1", Const, 10}, + {"R_ARM_LDR_SB_G2", Const, 10}, + {"R_ARM_ME_TOO", Const, 10}, + {"R_ARM_MOVT_ABS", Const, 10}, + {"R_ARM_MOVT_BREL", Const, 10}, + {"R_ARM_MOVT_PREL", Const, 10}, + {"R_ARM_MOVW_ABS_NC", Const, 10}, + {"R_ARM_MOVW_BREL", Const, 10}, + {"R_ARM_MOVW_BREL_NC", Const, 10}, + {"R_ARM_MOVW_PREL_NC", Const, 10}, + {"R_ARM_NONE", Const, 0}, + {"R_ARM_PC13", Const, 0}, + {"R_ARM_PC24", Const, 0}, + {"R_ARM_PLT32", Const, 0}, + {"R_ARM_PLT32_ABS", Const, 10}, + {"R_ARM_PREL31", Const, 10}, + {"R_ARM_PRIVATE_0", Const, 10}, + {"R_ARM_PRIVATE_1", Const, 10}, + {"R_ARM_PRIVATE_10", Const, 10}, + {"R_ARM_PRIVATE_11", Const, 10}, + {"R_ARM_PRIVATE_12", Const, 10}, + {"R_ARM_PRIVATE_13", Const, 10}, + {"R_ARM_PRIVATE_14", Const, 10}, + {"R_ARM_PRIVATE_15", Const, 10}, + {"R_ARM_PRIVATE_2", Const, 10}, + {"R_ARM_PRIVATE_3", Const, 10}, + {"R_ARM_PRIVATE_4", Const, 10}, + {"R_ARM_PRIVATE_5", Const, 10}, + {"R_ARM_PRIVATE_6", Const, 10}, + {"R_ARM_PRIVATE_7", Const, 10}, + {"R_ARM_PRIVATE_8", Const, 10}, + {"R_ARM_PRIVATE_9", Const, 10}, + {"R_ARM_RABS32", Const, 0}, + {"R_ARM_RBASE", Const, 0}, + {"R_ARM_REL32", Const, 0}, + {"R_ARM_REL32_NOI", Const, 10}, + {"R_ARM_RELATIVE", Const, 0}, + {"R_ARM_RPC24", Const, 0}, + {"R_ARM_RREL32", Const, 0}, + {"R_ARM_RSBREL32", Const, 0}, + {"R_ARM_RXPC25", Const, 10}, + {"R_ARM_SBREL31", Const, 10}, + {"R_ARM_SBREL32", Const, 0}, + {"R_ARM_SWI24", Const, 0}, + {"R_ARM_TARGET1", Const, 10}, + {"R_ARM_TARGET2", Const, 10}, + {"R_ARM_THM_ABS5", Const, 0}, + {"R_ARM_THM_ALU_ABS_G0_NC", Const, 10}, + {"R_ARM_THM_ALU_ABS_G1_NC", Const, 10}, + {"R_ARM_THM_ALU_ABS_G2_NC", Const, 10}, + {"R_ARM_THM_ALU_ABS_G3", Const, 10}, + {"R_ARM_THM_ALU_PREL_11_0", Const, 10}, + {"R_ARM_THM_GOT_BREL12", Const, 10}, + {"R_ARM_THM_JUMP11", Const, 10}, + {"R_ARM_THM_JUMP19", Const, 10}, + {"R_ARM_THM_JUMP24", Const, 10}, + {"R_ARM_THM_JUMP6", Const, 10}, + {"R_ARM_THM_JUMP8", Const, 10}, + {"R_ARM_THM_MOVT_ABS", Const, 10}, + {"R_ARM_THM_MOVT_BREL", Const, 10}, + {"R_ARM_THM_MOVT_PREL", Const, 10}, + {"R_ARM_THM_MOVW_ABS_NC", Const, 10}, + {"R_ARM_THM_MOVW_BREL", Const, 10}, + {"R_ARM_THM_MOVW_BREL_NC", Const, 10}, + {"R_ARM_THM_MOVW_PREL_NC", Const, 10}, + {"R_ARM_THM_PC12", Const, 10}, + {"R_ARM_THM_PC22", Const, 0}, + {"R_ARM_THM_PC8", Const, 0}, + {"R_ARM_THM_RPC22", Const, 0}, + {"R_ARM_THM_SWI8", Const, 0}, + {"R_ARM_THM_TLS_CALL", Const, 10}, + {"R_ARM_THM_TLS_DESCSEQ16", Const, 10}, + {"R_ARM_THM_TLS_DESCSEQ32", Const, 10}, + {"R_ARM_THM_XPC22", Const, 0}, + {"R_ARM_TLS_CALL", Const, 10}, + {"R_ARM_TLS_DESCSEQ", Const, 10}, + {"R_ARM_TLS_DTPMOD32", Const, 10}, + {"R_ARM_TLS_DTPOFF32", Const, 10}, + {"R_ARM_TLS_GD32", Const, 10}, + {"R_ARM_TLS_GOTDESC", Const, 10}, + {"R_ARM_TLS_IE12GP", Const, 10}, + {"R_ARM_TLS_IE32", Const, 10}, + {"R_ARM_TLS_LDM32", Const, 10}, + {"R_ARM_TLS_LDO12", Const, 10}, + {"R_ARM_TLS_LDO32", Const, 10}, + {"R_ARM_TLS_LE12", Const, 10}, + {"R_ARM_TLS_LE32", Const, 10}, + {"R_ARM_TLS_TPOFF32", Const, 10}, + {"R_ARM_V4BX", Const, 10}, + {"R_ARM_XPC25", Const, 0}, + {"R_INFO", Func, 0}, + {"R_INFO32", Func, 0}, + {"R_LARCH", Type, 19}, + {"R_LARCH_32", Const, 19}, + {"R_LARCH_32_PCREL", Const, 20}, + {"R_LARCH_64", Const, 19}, + {"R_LARCH_64_PCREL", Const, 22}, + {"R_LARCH_ABS64_HI12", Const, 20}, + {"R_LARCH_ABS64_LO20", Const, 20}, + {"R_LARCH_ABS_HI20", Const, 20}, + {"R_LARCH_ABS_LO12", Const, 20}, + {"R_LARCH_ADD16", Const, 19}, + {"R_LARCH_ADD24", Const, 19}, + {"R_LARCH_ADD32", Const, 19}, + {"R_LARCH_ADD6", Const, 22}, + {"R_LARCH_ADD64", Const, 19}, + {"R_LARCH_ADD8", Const, 19}, + {"R_LARCH_ADD_ULEB128", Const, 22}, + {"R_LARCH_ALIGN", Const, 22}, + {"R_LARCH_B16", Const, 20}, + {"R_LARCH_B21", Const, 20}, + {"R_LARCH_B26", Const, 20}, + {"R_LARCH_CFA", Const, 22}, + {"R_LARCH_COPY", Const, 19}, + {"R_LARCH_DELETE", Const, 22}, + {"R_LARCH_GNU_VTENTRY", Const, 20}, + {"R_LARCH_GNU_VTINHERIT", Const, 20}, + {"R_LARCH_GOT64_HI12", Const, 20}, + {"R_LARCH_GOT64_LO20", Const, 20}, + {"R_LARCH_GOT64_PC_HI12", Const, 20}, + {"R_LARCH_GOT64_PC_LO20", Const, 20}, + {"R_LARCH_GOT_HI20", Const, 20}, + {"R_LARCH_GOT_LO12", Const, 20}, + {"R_LARCH_GOT_PC_HI20", Const, 20}, + {"R_LARCH_GOT_PC_LO12", Const, 20}, + {"R_LARCH_IRELATIVE", Const, 19}, + {"R_LARCH_JUMP_SLOT", Const, 19}, + {"R_LARCH_MARK_LA", Const, 19}, + {"R_LARCH_MARK_PCREL", Const, 19}, + {"R_LARCH_NONE", Const, 19}, + {"R_LARCH_PCALA64_HI12", Const, 20}, + {"R_LARCH_PCALA64_LO20", Const, 20}, + {"R_LARCH_PCALA_HI20", Const, 20}, + {"R_LARCH_PCALA_LO12", Const, 20}, + {"R_LARCH_PCREL20_S2", Const, 22}, + {"R_LARCH_RELATIVE", Const, 19}, + {"R_LARCH_RELAX", Const, 20}, + {"R_LARCH_SOP_ADD", Const, 19}, + {"R_LARCH_SOP_AND", Const, 19}, + {"R_LARCH_SOP_ASSERT", Const, 19}, + {"R_LARCH_SOP_IF_ELSE", Const, 19}, + {"R_LARCH_SOP_NOT", Const, 19}, + {"R_LARCH_SOP_POP_32_S_0_10_10_16_S2", Const, 19}, + {"R_LARCH_SOP_POP_32_S_0_5_10_16_S2", Const, 19}, + {"R_LARCH_SOP_POP_32_S_10_12", Const, 19}, + {"R_LARCH_SOP_POP_32_S_10_16", Const, 19}, + {"R_LARCH_SOP_POP_32_S_10_16_S2", Const, 19}, + {"R_LARCH_SOP_POP_32_S_10_5", Const, 19}, + {"R_LARCH_SOP_POP_32_S_5_20", Const, 19}, + {"R_LARCH_SOP_POP_32_U", Const, 19}, + {"R_LARCH_SOP_POP_32_U_10_12", Const, 19}, + {"R_LARCH_SOP_PUSH_ABSOLUTE", Const, 19}, + {"R_LARCH_SOP_PUSH_DUP", Const, 19}, + {"R_LARCH_SOP_PUSH_GPREL", Const, 19}, + {"R_LARCH_SOP_PUSH_PCREL", Const, 19}, + {"R_LARCH_SOP_PUSH_PLT_PCREL", Const, 19}, + {"R_LARCH_SOP_PUSH_TLS_GD", Const, 19}, + {"R_LARCH_SOP_PUSH_TLS_GOT", Const, 19}, + {"R_LARCH_SOP_PUSH_TLS_TPREL", Const, 19}, + {"R_LARCH_SOP_SL", Const, 19}, + {"R_LARCH_SOP_SR", Const, 19}, + {"R_LARCH_SOP_SUB", Const, 19}, + {"R_LARCH_SUB16", Const, 19}, + {"R_LARCH_SUB24", Const, 19}, + {"R_LARCH_SUB32", Const, 19}, + {"R_LARCH_SUB6", Const, 22}, + {"R_LARCH_SUB64", Const, 19}, + {"R_LARCH_SUB8", Const, 19}, + {"R_LARCH_SUB_ULEB128", Const, 22}, + {"R_LARCH_TLS_DTPMOD32", Const, 19}, + {"R_LARCH_TLS_DTPMOD64", Const, 19}, + {"R_LARCH_TLS_DTPREL32", Const, 19}, + {"R_LARCH_TLS_DTPREL64", Const, 19}, + {"R_LARCH_TLS_GD_HI20", Const, 20}, + {"R_LARCH_TLS_GD_PC_HI20", Const, 20}, + {"R_LARCH_TLS_IE64_HI12", Const, 20}, + {"R_LARCH_TLS_IE64_LO20", Const, 20}, + {"R_LARCH_TLS_IE64_PC_HI12", Const, 20}, + {"R_LARCH_TLS_IE64_PC_LO20", Const, 20}, + {"R_LARCH_TLS_IE_HI20", Const, 20}, + {"R_LARCH_TLS_IE_LO12", Const, 20}, + {"R_LARCH_TLS_IE_PC_HI20", Const, 20}, + {"R_LARCH_TLS_IE_PC_LO12", Const, 20}, + {"R_LARCH_TLS_LD_HI20", Const, 20}, + {"R_LARCH_TLS_LD_PC_HI20", Const, 20}, + {"R_LARCH_TLS_LE64_HI12", Const, 20}, + {"R_LARCH_TLS_LE64_LO20", Const, 20}, + {"R_LARCH_TLS_LE_HI20", Const, 20}, + {"R_LARCH_TLS_LE_LO12", Const, 20}, + {"R_LARCH_TLS_TPREL32", Const, 19}, + {"R_LARCH_TLS_TPREL64", Const, 19}, + {"R_MIPS", Type, 6}, + {"R_MIPS_16", Const, 6}, + {"R_MIPS_26", Const, 6}, + {"R_MIPS_32", Const, 6}, + {"R_MIPS_64", Const, 6}, + {"R_MIPS_ADD_IMMEDIATE", Const, 6}, + {"R_MIPS_CALL16", Const, 6}, + {"R_MIPS_CALL_HI16", Const, 6}, + {"R_MIPS_CALL_LO16", Const, 6}, + {"R_MIPS_DELETE", Const, 6}, + {"R_MIPS_GOT16", Const, 6}, + {"R_MIPS_GOT_DISP", Const, 6}, + {"R_MIPS_GOT_HI16", Const, 6}, + {"R_MIPS_GOT_LO16", Const, 6}, + {"R_MIPS_GOT_OFST", Const, 6}, + {"R_MIPS_GOT_PAGE", Const, 6}, + {"R_MIPS_GPREL16", Const, 6}, + {"R_MIPS_GPREL32", Const, 6}, + {"R_MIPS_HI16", Const, 6}, + {"R_MIPS_HIGHER", Const, 6}, + {"R_MIPS_HIGHEST", Const, 6}, + {"R_MIPS_INSERT_A", Const, 6}, + {"R_MIPS_INSERT_B", Const, 6}, + {"R_MIPS_JALR", Const, 6}, + {"R_MIPS_LITERAL", Const, 6}, + {"R_MIPS_LO16", Const, 6}, + {"R_MIPS_NONE", Const, 6}, + {"R_MIPS_PC16", Const, 6}, + {"R_MIPS_PC32", Const, 22}, + {"R_MIPS_PJUMP", Const, 6}, + {"R_MIPS_REL16", Const, 6}, + {"R_MIPS_REL32", Const, 6}, + {"R_MIPS_RELGOT", Const, 6}, + {"R_MIPS_SCN_DISP", Const, 6}, + {"R_MIPS_SHIFT5", Const, 6}, + {"R_MIPS_SHIFT6", Const, 6}, + {"R_MIPS_SUB", Const, 6}, + {"R_MIPS_TLS_DTPMOD32", Const, 6}, + {"R_MIPS_TLS_DTPMOD64", Const, 6}, + {"R_MIPS_TLS_DTPREL32", Const, 6}, + {"R_MIPS_TLS_DTPREL64", Const, 6}, + {"R_MIPS_TLS_DTPREL_HI16", Const, 6}, + {"R_MIPS_TLS_DTPREL_LO16", Const, 6}, + {"R_MIPS_TLS_GD", Const, 6}, + {"R_MIPS_TLS_GOTTPREL", Const, 6}, + {"R_MIPS_TLS_LDM", Const, 6}, + {"R_MIPS_TLS_TPREL32", Const, 6}, + {"R_MIPS_TLS_TPREL64", Const, 6}, + {"R_MIPS_TLS_TPREL_HI16", Const, 6}, + {"R_MIPS_TLS_TPREL_LO16", Const, 6}, + {"R_PPC", Type, 0}, + {"R_PPC64", Type, 5}, + {"R_PPC64_ADDR14", Const, 5}, + {"R_PPC64_ADDR14_BRNTAKEN", Const, 5}, + {"R_PPC64_ADDR14_BRTAKEN", Const, 5}, + {"R_PPC64_ADDR16", Const, 5}, + {"R_PPC64_ADDR16_DS", Const, 5}, + {"R_PPC64_ADDR16_HA", Const, 5}, + {"R_PPC64_ADDR16_HI", Const, 5}, + {"R_PPC64_ADDR16_HIGH", Const, 10}, + {"R_PPC64_ADDR16_HIGHA", Const, 10}, + {"R_PPC64_ADDR16_HIGHER", Const, 5}, + {"R_PPC64_ADDR16_HIGHER34", Const, 20}, + {"R_PPC64_ADDR16_HIGHERA", Const, 5}, + {"R_PPC64_ADDR16_HIGHERA34", Const, 20}, + {"R_PPC64_ADDR16_HIGHEST", Const, 5}, + {"R_PPC64_ADDR16_HIGHEST34", Const, 20}, + {"R_PPC64_ADDR16_HIGHESTA", Const, 5}, + {"R_PPC64_ADDR16_HIGHESTA34", Const, 20}, + {"R_PPC64_ADDR16_LO", Const, 5}, + {"R_PPC64_ADDR16_LO_DS", Const, 5}, + {"R_PPC64_ADDR24", Const, 5}, + {"R_PPC64_ADDR32", Const, 5}, + {"R_PPC64_ADDR64", Const, 5}, + {"R_PPC64_ADDR64_LOCAL", Const, 10}, + {"R_PPC64_COPY", Const, 20}, + {"R_PPC64_D28", Const, 20}, + {"R_PPC64_D34", Const, 20}, + {"R_PPC64_D34_HA30", Const, 20}, + {"R_PPC64_D34_HI30", Const, 20}, + {"R_PPC64_D34_LO", Const, 20}, + {"R_PPC64_DTPMOD64", Const, 5}, + {"R_PPC64_DTPREL16", Const, 5}, + {"R_PPC64_DTPREL16_DS", Const, 5}, + {"R_PPC64_DTPREL16_HA", Const, 5}, + {"R_PPC64_DTPREL16_HI", Const, 5}, + {"R_PPC64_DTPREL16_HIGH", Const, 10}, + {"R_PPC64_DTPREL16_HIGHA", Const, 10}, + {"R_PPC64_DTPREL16_HIGHER", Const, 5}, + {"R_PPC64_DTPREL16_HIGHERA", Const, 5}, + {"R_PPC64_DTPREL16_HIGHEST", Const, 5}, + {"R_PPC64_DTPREL16_HIGHESTA", Const, 5}, + {"R_PPC64_DTPREL16_LO", Const, 5}, + {"R_PPC64_DTPREL16_LO_DS", Const, 5}, + {"R_PPC64_DTPREL34", Const, 20}, + {"R_PPC64_DTPREL64", Const, 5}, + {"R_PPC64_ENTRY", Const, 10}, + {"R_PPC64_GLOB_DAT", Const, 20}, + {"R_PPC64_GNU_VTENTRY", Const, 20}, + {"R_PPC64_GNU_VTINHERIT", Const, 20}, + {"R_PPC64_GOT16", Const, 5}, + {"R_PPC64_GOT16_DS", Const, 5}, + {"R_PPC64_GOT16_HA", Const, 5}, + {"R_PPC64_GOT16_HI", Const, 5}, + {"R_PPC64_GOT16_LO", Const, 5}, + {"R_PPC64_GOT16_LO_DS", Const, 5}, + {"R_PPC64_GOT_DTPREL16_DS", Const, 5}, + {"R_PPC64_GOT_DTPREL16_HA", Const, 5}, + {"R_PPC64_GOT_DTPREL16_HI", Const, 5}, + {"R_PPC64_GOT_DTPREL16_LO_DS", Const, 5}, + {"R_PPC64_GOT_DTPREL_PCREL34", Const, 20}, + {"R_PPC64_GOT_PCREL34", Const, 20}, + {"R_PPC64_GOT_TLSGD16", Const, 5}, + {"R_PPC64_GOT_TLSGD16_HA", Const, 5}, + {"R_PPC64_GOT_TLSGD16_HI", Const, 5}, + {"R_PPC64_GOT_TLSGD16_LO", Const, 5}, + {"R_PPC64_GOT_TLSGD_PCREL34", Const, 20}, + {"R_PPC64_GOT_TLSLD16", Const, 5}, + {"R_PPC64_GOT_TLSLD16_HA", Const, 5}, + {"R_PPC64_GOT_TLSLD16_HI", Const, 5}, + {"R_PPC64_GOT_TLSLD16_LO", Const, 5}, + {"R_PPC64_GOT_TLSLD_PCREL34", Const, 20}, + {"R_PPC64_GOT_TPREL16_DS", Const, 5}, + {"R_PPC64_GOT_TPREL16_HA", Const, 5}, + {"R_PPC64_GOT_TPREL16_HI", Const, 5}, + {"R_PPC64_GOT_TPREL16_LO_DS", Const, 5}, + {"R_PPC64_GOT_TPREL_PCREL34", Const, 20}, + {"R_PPC64_IRELATIVE", Const, 10}, + {"R_PPC64_JMP_IREL", Const, 10}, + {"R_PPC64_JMP_SLOT", Const, 5}, + {"R_PPC64_NONE", Const, 5}, + {"R_PPC64_PCREL28", Const, 20}, + {"R_PPC64_PCREL34", Const, 20}, + {"R_PPC64_PCREL_OPT", Const, 20}, + {"R_PPC64_PLT16_HA", Const, 20}, + {"R_PPC64_PLT16_HI", Const, 20}, + {"R_PPC64_PLT16_LO", Const, 20}, + {"R_PPC64_PLT16_LO_DS", Const, 10}, + {"R_PPC64_PLT32", Const, 20}, + {"R_PPC64_PLT64", Const, 20}, + {"R_PPC64_PLTCALL", Const, 20}, + {"R_PPC64_PLTCALL_NOTOC", Const, 20}, + {"R_PPC64_PLTGOT16", Const, 10}, + {"R_PPC64_PLTGOT16_DS", Const, 10}, + {"R_PPC64_PLTGOT16_HA", Const, 10}, + {"R_PPC64_PLTGOT16_HI", Const, 10}, + {"R_PPC64_PLTGOT16_LO", Const, 10}, + {"R_PPC64_PLTGOT_LO_DS", Const, 10}, + {"R_PPC64_PLTREL32", Const, 20}, + {"R_PPC64_PLTREL64", Const, 20}, + {"R_PPC64_PLTSEQ", Const, 20}, + {"R_PPC64_PLTSEQ_NOTOC", Const, 20}, + {"R_PPC64_PLT_PCREL34", Const, 20}, + {"R_PPC64_PLT_PCREL34_NOTOC", Const, 20}, + {"R_PPC64_REL14", Const, 5}, + {"R_PPC64_REL14_BRNTAKEN", Const, 5}, + {"R_PPC64_REL14_BRTAKEN", Const, 5}, + {"R_PPC64_REL16", Const, 5}, + {"R_PPC64_REL16DX_HA", Const, 10}, + {"R_PPC64_REL16_HA", Const, 5}, + {"R_PPC64_REL16_HI", Const, 5}, + {"R_PPC64_REL16_HIGH", Const, 20}, + {"R_PPC64_REL16_HIGHA", Const, 20}, + {"R_PPC64_REL16_HIGHER", Const, 20}, + {"R_PPC64_REL16_HIGHER34", Const, 20}, + {"R_PPC64_REL16_HIGHERA", Const, 20}, + {"R_PPC64_REL16_HIGHERA34", Const, 20}, + {"R_PPC64_REL16_HIGHEST", Const, 20}, + {"R_PPC64_REL16_HIGHEST34", Const, 20}, + {"R_PPC64_REL16_HIGHESTA", Const, 20}, + {"R_PPC64_REL16_HIGHESTA34", Const, 20}, + {"R_PPC64_REL16_LO", Const, 5}, + {"R_PPC64_REL24", Const, 5}, + {"R_PPC64_REL24_NOTOC", Const, 10}, + {"R_PPC64_REL24_P9NOTOC", Const, 21}, + {"R_PPC64_REL30", Const, 20}, + {"R_PPC64_REL32", Const, 5}, + {"R_PPC64_REL64", Const, 5}, + {"R_PPC64_RELATIVE", Const, 18}, + {"R_PPC64_SECTOFF", Const, 20}, + {"R_PPC64_SECTOFF_DS", Const, 10}, + {"R_PPC64_SECTOFF_HA", Const, 20}, + {"R_PPC64_SECTOFF_HI", Const, 20}, + {"R_PPC64_SECTOFF_LO", Const, 20}, + {"R_PPC64_SECTOFF_LO_DS", Const, 10}, + {"R_PPC64_TLS", Const, 5}, + {"R_PPC64_TLSGD", Const, 5}, + {"R_PPC64_TLSLD", Const, 5}, + {"R_PPC64_TOC", Const, 5}, + {"R_PPC64_TOC16", Const, 5}, + {"R_PPC64_TOC16_DS", Const, 5}, + {"R_PPC64_TOC16_HA", Const, 5}, + {"R_PPC64_TOC16_HI", Const, 5}, + {"R_PPC64_TOC16_LO", Const, 5}, + {"R_PPC64_TOC16_LO_DS", Const, 5}, + {"R_PPC64_TOCSAVE", Const, 10}, + {"R_PPC64_TPREL16", Const, 5}, + {"R_PPC64_TPREL16_DS", Const, 5}, + {"R_PPC64_TPREL16_HA", Const, 5}, + {"R_PPC64_TPREL16_HI", Const, 5}, + {"R_PPC64_TPREL16_HIGH", Const, 10}, + {"R_PPC64_TPREL16_HIGHA", Const, 10}, + {"R_PPC64_TPREL16_HIGHER", Const, 5}, + {"R_PPC64_TPREL16_HIGHERA", Const, 5}, + {"R_PPC64_TPREL16_HIGHEST", Const, 5}, + {"R_PPC64_TPREL16_HIGHESTA", Const, 5}, + {"R_PPC64_TPREL16_LO", Const, 5}, + {"R_PPC64_TPREL16_LO_DS", Const, 5}, + {"R_PPC64_TPREL34", Const, 20}, + {"R_PPC64_TPREL64", Const, 5}, + {"R_PPC64_UADDR16", Const, 20}, + {"R_PPC64_UADDR32", Const, 20}, + {"R_PPC64_UADDR64", Const, 20}, + {"R_PPC_ADDR14", Const, 0}, + {"R_PPC_ADDR14_BRNTAKEN", Const, 0}, + {"R_PPC_ADDR14_BRTAKEN", Const, 0}, + {"R_PPC_ADDR16", Const, 0}, + {"R_PPC_ADDR16_HA", Const, 0}, + {"R_PPC_ADDR16_HI", Const, 0}, + {"R_PPC_ADDR16_LO", Const, 0}, + {"R_PPC_ADDR24", Const, 0}, + {"R_PPC_ADDR32", Const, 0}, + {"R_PPC_COPY", Const, 0}, + {"R_PPC_DTPMOD32", Const, 0}, + {"R_PPC_DTPREL16", Const, 0}, + {"R_PPC_DTPREL16_HA", Const, 0}, + {"R_PPC_DTPREL16_HI", Const, 0}, + {"R_PPC_DTPREL16_LO", Const, 0}, + {"R_PPC_DTPREL32", Const, 0}, + {"R_PPC_EMB_BIT_FLD", Const, 0}, + {"R_PPC_EMB_MRKREF", Const, 0}, + {"R_PPC_EMB_NADDR16", Const, 0}, + {"R_PPC_EMB_NADDR16_HA", Const, 0}, + {"R_PPC_EMB_NADDR16_HI", Const, 0}, + {"R_PPC_EMB_NADDR16_LO", Const, 0}, + {"R_PPC_EMB_NADDR32", Const, 0}, + {"R_PPC_EMB_RELSDA", Const, 0}, + {"R_PPC_EMB_RELSEC16", Const, 0}, + {"R_PPC_EMB_RELST_HA", Const, 0}, + {"R_PPC_EMB_RELST_HI", Const, 0}, + {"R_PPC_EMB_RELST_LO", Const, 0}, + {"R_PPC_EMB_SDA21", Const, 0}, + {"R_PPC_EMB_SDA2I16", Const, 0}, + {"R_PPC_EMB_SDA2REL", Const, 0}, + {"R_PPC_EMB_SDAI16", Const, 0}, + {"R_PPC_GLOB_DAT", Const, 0}, + {"R_PPC_GOT16", Const, 0}, + {"R_PPC_GOT16_HA", Const, 0}, + {"R_PPC_GOT16_HI", Const, 0}, + {"R_PPC_GOT16_LO", Const, 0}, + {"R_PPC_GOT_TLSGD16", Const, 0}, + {"R_PPC_GOT_TLSGD16_HA", Const, 0}, + {"R_PPC_GOT_TLSGD16_HI", Const, 0}, + {"R_PPC_GOT_TLSGD16_LO", Const, 0}, + {"R_PPC_GOT_TLSLD16", Const, 0}, + {"R_PPC_GOT_TLSLD16_HA", Const, 0}, + {"R_PPC_GOT_TLSLD16_HI", Const, 0}, + {"R_PPC_GOT_TLSLD16_LO", Const, 0}, + {"R_PPC_GOT_TPREL16", Const, 0}, + {"R_PPC_GOT_TPREL16_HA", Const, 0}, + {"R_PPC_GOT_TPREL16_HI", Const, 0}, + {"R_PPC_GOT_TPREL16_LO", Const, 0}, + {"R_PPC_JMP_SLOT", Const, 0}, + {"R_PPC_LOCAL24PC", Const, 0}, + {"R_PPC_NONE", Const, 0}, + {"R_PPC_PLT16_HA", Const, 0}, + {"R_PPC_PLT16_HI", Const, 0}, + {"R_PPC_PLT16_LO", Const, 0}, + {"R_PPC_PLT32", Const, 0}, + {"R_PPC_PLTREL24", Const, 0}, + {"R_PPC_PLTREL32", Const, 0}, + {"R_PPC_REL14", Const, 0}, + {"R_PPC_REL14_BRNTAKEN", Const, 0}, + {"R_PPC_REL14_BRTAKEN", Const, 0}, + {"R_PPC_REL24", Const, 0}, + {"R_PPC_REL32", Const, 0}, + {"R_PPC_RELATIVE", Const, 0}, + {"R_PPC_SDAREL16", Const, 0}, + {"R_PPC_SECTOFF", Const, 0}, + {"R_PPC_SECTOFF_HA", Const, 0}, + {"R_PPC_SECTOFF_HI", Const, 0}, + {"R_PPC_SECTOFF_LO", Const, 0}, + {"R_PPC_TLS", Const, 0}, + {"R_PPC_TPREL16", Const, 0}, + {"R_PPC_TPREL16_HA", Const, 0}, + {"R_PPC_TPREL16_HI", Const, 0}, + {"R_PPC_TPREL16_LO", Const, 0}, + {"R_PPC_TPREL32", Const, 0}, + {"R_PPC_UADDR16", Const, 0}, + {"R_PPC_UADDR32", Const, 0}, + {"R_RISCV", Type, 11}, + {"R_RISCV_32", Const, 11}, + {"R_RISCV_32_PCREL", Const, 12}, + {"R_RISCV_64", Const, 11}, + {"R_RISCV_ADD16", Const, 11}, + {"R_RISCV_ADD32", Const, 11}, + {"R_RISCV_ADD64", Const, 11}, + {"R_RISCV_ADD8", Const, 11}, + {"R_RISCV_ALIGN", Const, 11}, + {"R_RISCV_BRANCH", Const, 11}, + {"R_RISCV_CALL", Const, 11}, + {"R_RISCV_CALL_PLT", Const, 11}, + {"R_RISCV_COPY", Const, 11}, + {"R_RISCV_GNU_VTENTRY", Const, 11}, + {"R_RISCV_GNU_VTINHERIT", Const, 11}, + {"R_RISCV_GOT_HI20", Const, 11}, + {"R_RISCV_GPREL_I", Const, 11}, + {"R_RISCV_GPREL_S", Const, 11}, + {"R_RISCV_HI20", Const, 11}, + {"R_RISCV_JAL", Const, 11}, + {"R_RISCV_JUMP_SLOT", Const, 11}, + {"R_RISCV_LO12_I", Const, 11}, + {"R_RISCV_LO12_S", Const, 11}, + {"R_RISCV_NONE", Const, 11}, + {"R_RISCV_PCREL_HI20", Const, 11}, + {"R_RISCV_PCREL_LO12_I", Const, 11}, + {"R_RISCV_PCREL_LO12_S", Const, 11}, + {"R_RISCV_RELATIVE", Const, 11}, + {"R_RISCV_RELAX", Const, 11}, + {"R_RISCV_RVC_BRANCH", Const, 11}, + {"R_RISCV_RVC_JUMP", Const, 11}, + {"R_RISCV_RVC_LUI", Const, 11}, + {"R_RISCV_SET16", Const, 11}, + {"R_RISCV_SET32", Const, 11}, + {"R_RISCV_SET6", Const, 11}, + {"R_RISCV_SET8", Const, 11}, + {"R_RISCV_SUB16", Const, 11}, + {"R_RISCV_SUB32", Const, 11}, + {"R_RISCV_SUB6", Const, 11}, + {"R_RISCV_SUB64", Const, 11}, + {"R_RISCV_SUB8", Const, 11}, + {"R_RISCV_TLS_DTPMOD32", Const, 11}, + {"R_RISCV_TLS_DTPMOD64", Const, 11}, + {"R_RISCV_TLS_DTPREL32", Const, 11}, + {"R_RISCV_TLS_DTPREL64", Const, 11}, + {"R_RISCV_TLS_GD_HI20", Const, 11}, + {"R_RISCV_TLS_GOT_HI20", Const, 11}, + {"R_RISCV_TLS_TPREL32", Const, 11}, + {"R_RISCV_TLS_TPREL64", Const, 11}, + {"R_RISCV_TPREL_ADD", Const, 11}, + {"R_RISCV_TPREL_HI20", Const, 11}, + {"R_RISCV_TPREL_I", Const, 11}, + {"R_RISCV_TPREL_LO12_I", Const, 11}, + {"R_RISCV_TPREL_LO12_S", Const, 11}, + {"R_RISCV_TPREL_S", Const, 11}, + {"R_SPARC", Type, 0}, + {"R_SPARC_10", Const, 0}, + {"R_SPARC_11", Const, 0}, + {"R_SPARC_13", Const, 0}, + {"R_SPARC_16", Const, 0}, + {"R_SPARC_22", Const, 0}, + {"R_SPARC_32", Const, 0}, + {"R_SPARC_5", Const, 0}, + {"R_SPARC_6", Const, 0}, + {"R_SPARC_64", Const, 0}, + {"R_SPARC_7", Const, 0}, + {"R_SPARC_8", Const, 0}, + {"R_SPARC_COPY", Const, 0}, + {"R_SPARC_DISP16", Const, 0}, + {"R_SPARC_DISP32", Const, 0}, + {"R_SPARC_DISP64", Const, 0}, + {"R_SPARC_DISP8", Const, 0}, + {"R_SPARC_GLOB_DAT", Const, 0}, + {"R_SPARC_GLOB_JMP", Const, 0}, + {"R_SPARC_GOT10", Const, 0}, + {"R_SPARC_GOT13", Const, 0}, + {"R_SPARC_GOT22", Const, 0}, + {"R_SPARC_H44", Const, 0}, + {"R_SPARC_HH22", Const, 0}, + {"R_SPARC_HI22", Const, 0}, + {"R_SPARC_HIPLT22", Const, 0}, + {"R_SPARC_HIX22", Const, 0}, + {"R_SPARC_HM10", Const, 0}, + {"R_SPARC_JMP_SLOT", Const, 0}, + {"R_SPARC_L44", Const, 0}, + {"R_SPARC_LM22", Const, 0}, + {"R_SPARC_LO10", Const, 0}, + {"R_SPARC_LOPLT10", Const, 0}, + {"R_SPARC_LOX10", Const, 0}, + {"R_SPARC_M44", Const, 0}, + {"R_SPARC_NONE", Const, 0}, + {"R_SPARC_OLO10", Const, 0}, + {"R_SPARC_PC10", Const, 0}, + {"R_SPARC_PC22", Const, 0}, + {"R_SPARC_PCPLT10", Const, 0}, + {"R_SPARC_PCPLT22", Const, 0}, + {"R_SPARC_PCPLT32", Const, 0}, + {"R_SPARC_PC_HH22", Const, 0}, + {"R_SPARC_PC_HM10", Const, 0}, + {"R_SPARC_PC_LM22", Const, 0}, + {"R_SPARC_PLT32", Const, 0}, + {"R_SPARC_PLT64", Const, 0}, + {"R_SPARC_REGISTER", Const, 0}, + {"R_SPARC_RELATIVE", Const, 0}, + {"R_SPARC_UA16", Const, 0}, + {"R_SPARC_UA32", Const, 0}, + {"R_SPARC_UA64", Const, 0}, + {"R_SPARC_WDISP16", Const, 0}, + {"R_SPARC_WDISP19", Const, 0}, + {"R_SPARC_WDISP22", Const, 0}, + {"R_SPARC_WDISP30", Const, 0}, + {"R_SPARC_WPLT30", Const, 0}, + {"R_SYM32", Func, 0}, + {"R_SYM64", Func, 0}, + {"R_TYPE32", Func, 0}, + {"R_TYPE64", Func, 0}, + {"R_X86_64", Type, 0}, + {"R_X86_64_16", Const, 0}, + {"R_X86_64_32", Const, 0}, + {"R_X86_64_32S", Const, 0}, + {"R_X86_64_64", Const, 0}, + {"R_X86_64_8", Const, 0}, + {"R_X86_64_COPY", Const, 0}, + {"R_X86_64_DTPMOD64", Const, 0}, + {"R_X86_64_DTPOFF32", Const, 0}, + {"R_X86_64_DTPOFF64", Const, 0}, + {"R_X86_64_GLOB_DAT", Const, 0}, + {"R_X86_64_GOT32", Const, 0}, + {"R_X86_64_GOT64", Const, 10}, + {"R_X86_64_GOTOFF64", Const, 10}, + {"R_X86_64_GOTPC32", Const, 10}, + {"R_X86_64_GOTPC32_TLSDESC", Const, 10}, + {"R_X86_64_GOTPC64", Const, 10}, + {"R_X86_64_GOTPCREL", Const, 0}, + {"R_X86_64_GOTPCREL64", Const, 10}, + {"R_X86_64_GOTPCRELX", Const, 10}, + {"R_X86_64_GOTPLT64", Const, 10}, + {"R_X86_64_GOTTPOFF", Const, 0}, + {"R_X86_64_IRELATIVE", Const, 10}, + {"R_X86_64_JMP_SLOT", Const, 0}, + {"R_X86_64_NONE", Const, 0}, + {"R_X86_64_PC16", Const, 0}, + {"R_X86_64_PC32", Const, 0}, + {"R_X86_64_PC32_BND", Const, 10}, + {"R_X86_64_PC64", Const, 10}, + {"R_X86_64_PC8", Const, 0}, + {"R_X86_64_PLT32", Const, 0}, + {"R_X86_64_PLT32_BND", Const, 10}, + {"R_X86_64_PLTOFF64", Const, 10}, + {"R_X86_64_RELATIVE", Const, 0}, + {"R_X86_64_RELATIVE64", Const, 10}, + {"R_X86_64_REX_GOTPCRELX", Const, 10}, + {"R_X86_64_SIZE32", Const, 10}, + {"R_X86_64_SIZE64", Const, 10}, + {"R_X86_64_TLSDESC", Const, 10}, + {"R_X86_64_TLSDESC_CALL", Const, 10}, + {"R_X86_64_TLSGD", Const, 0}, + {"R_X86_64_TLSLD", Const, 0}, + {"R_X86_64_TPOFF32", Const, 0}, + {"R_X86_64_TPOFF64", Const, 0}, + {"Rel32", Type, 0}, + {"Rel32.Info", Field, 0}, + {"Rel32.Off", Field, 0}, + {"Rel64", Type, 0}, + {"Rel64.Info", Field, 0}, + {"Rel64.Off", Field, 0}, + {"Rela32", Type, 0}, + {"Rela32.Addend", Field, 0}, + {"Rela32.Info", Field, 0}, + {"Rela32.Off", Field, 0}, + {"Rela64", Type, 0}, + {"Rela64.Addend", Field, 0}, + {"Rela64.Info", Field, 0}, + {"Rela64.Off", Field, 0}, + {"SHF_ALLOC", Const, 0}, + {"SHF_COMPRESSED", Const, 6}, + {"SHF_EXECINSTR", Const, 0}, + {"SHF_GROUP", Const, 0}, + {"SHF_INFO_LINK", Const, 0}, + {"SHF_LINK_ORDER", Const, 0}, + {"SHF_MASKOS", Const, 0}, + {"SHF_MASKPROC", Const, 0}, + {"SHF_MERGE", Const, 0}, + {"SHF_OS_NONCONFORMING", Const, 0}, + {"SHF_STRINGS", Const, 0}, + {"SHF_TLS", Const, 0}, + {"SHF_WRITE", Const, 0}, + {"SHN_ABS", Const, 0}, + {"SHN_COMMON", Const, 0}, + {"SHN_HIOS", Const, 0}, + {"SHN_HIPROC", Const, 0}, + {"SHN_HIRESERVE", Const, 0}, + {"SHN_LOOS", Const, 0}, + {"SHN_LOPROC", Const, 0}, + {"SHN_LORESERVE", Const, 0}, + {"SHN_UNDEF", Const, 0}, + {"SHN_XINDEX", Const, 0}, + {"SHT_DYNAMIC", Const, 0}, + {"SHT_DYNSYM", Const, 0}, + {"SHT_FINI_ARRAY", Const, 0}, + {"SHT_GNU_ATTRIBUTES", Const, 0}, + {"SHT_GNU_HASH", Const, 0}, + {"SHT_GNU_LIBLIST", Const, 0}, + {"SHT_GNU_VERDEF", Const, 0}, + {"SHT_GNU_VERNEED", Const, 0}, + {"SHT_GNU_VERSYM", Const, 0}, + {"SHT_GROUP", Const, 0}, + {"SHT_HASH", Const, 0}, + {"SHT_HIOS", Const, 0}, + {"SHT_HIPROC", Const, 0}, + {"SHT_HIUSER", Const, 0}, + {"SHT_INIT_ARRAY", Const, 0}, + {"SHT_LOOS", Const, 0}, + {"SHT_LOPROC", Const, 0}, + {"SHT_LOUSER", Const, 0}, + {"SHT_MIPS_ABIFLAGS", Const, 17}, + {"SHT_NOBITS", Const, 0}, + {"SHT_NOTE", Const, 0}, + {"SHT_NULL", Const, 0}, + {"SHT_PREINIT_ARRAY", Const, 0}, + {"SHT_PROGBITS", Const, 0}, + {"SHT_REL", Const, 0}, + {"SHT_RELA", Const, 0}, + {"SHT_SHLIB", Const, 0}, + {"SHT_STRTAB", Const, 0}, + {"SHT_SYMTAB", Const, 0}, + {"SHT_SYMTAB_SHNDX", Const, 0}, + {"STB_GLOBAL", Const, 0}, + {"STB_HIOS", Const, 0}, + {"STB_HIPROC", Const, 0}, + {"STB_LOCAL", Const, 0}, + {"STB_LOOS", Const, 0}, + {"STB_LOPROC", Const, 0}, + {"STB_WEAK", Const, 0}, + {"STT_COMMON", Const, 0}, + {"STT_FILE", Const, 0}, + {"STT_FUNC", Const, 0}, + {"STT_HIOS", Const, 0}, + {"STT_HIPROC", Const, 0}, + {"STT_LOOS", Const, 0}, + {"STT_LOPROC", Const, 0}, + {"STT_NOTYPE", Const, 0}, + {"STT_OBJECT", Const, 0}, + {"STT_SECTION", Const, 0}, + {"STT_TLS", Const, 0}, + {"STV_DEFAULT", Const, 0}, + {"STV_HIDDEN", Const, 0}, + {"STV_INTERNAL", Const, 0}, + {"STV_PROTECTED", Const, 0}, + {"ST_BIND", Func, 0}, + {"ST_INFO", Func, 0}, + {"ST_TYPE", Func, 0}, + {"ST_VISIBILITY", Func, 0}, + {"Section", Type, 0}, + {"Section.ReaderAt", Field, 0}, + {"Section.SectionHeader", Field, 0}, + {"Section32", Type, 0}, + {"Section32.Addr", Field, 0}, + {"Section32.Addralign", Field, 0}, + {"Section32.Entsize", Field, 0}, + {"Section32.Flags", Field, 0}, + {"Section32.Info", Field, 0}, + {"Section32.Link", Field, 0}, + {"Section32.Name", Field, 0}, + {"Section32.Off", Field, 0}, + {"Section32.Size", Field, 0}, + {"Section32.Type", Field, 0}, + {"Section64", Type, 0}, + {"Section64.Addr", Field, 0}, + {"Section64.Addralign", Field, 0}, + {"Section64.Entsize", Field, 0}, + {"Section64.Flags", Field, 0}, + {"Section64.Info", Field, 0}, + {"Section64.Link", Field, 0}, + {"Section64.Name", Field, 0}, + {"Section64.Off", Field, 0}, + {"Section64.Size", Field, 0}, + {"Section64.Type", Field, 0}, + {"SectionFlag", Type, 0}, + {"SectionHeader", Type, 0}, + {"SectionHeader.Addr", Field, 0}, + {"SectionHeader.Addralign", Field, 0}, + {"SectionHeader.Entsize", Field, 0}, + {"SectionHeader.FileSize", Field, 6}, + {"SectionHeader.Flags", Field, 0}, + {"SectionHeader.Info", Field, 0}, + {"SectionHeader.Link", Field, 0}, + {"SectionHeader.Name", Field, 0}, + {"SectionHeader.Offset", Field, 0}, + {"SectionHeader.Size", Field, 0}, + {"SectionHeader.Type", Field, 0}, + {"SectionIndex", Type, 0}, + {"SectionType", Type, 0}, + {"Sym32", Type, 0}, + {"Sym32.Info", Field, 0}, + {"Sym32.Name", Field, 0}, + {"Sym32.Other", Field, 0}, + {"Sym32.Shndx", Field, 0}, + {"Sym32.Size", Field, 0}, + {"Sym32.Value", Field, 0}, + {"Sym32Size", Const, 0}, + {"Sym64", Type, 0}, + {"Sym64.Info", Field, 0}, + {"Sym64.Name", Field, 0}, + {"Sym64.Other", Field, 0}, + {"Sym64.Shndx", Field, 0}, + {"Sym64.Size", Field, 0}, + {"Sym64.Value", Field, 0}, + {"Sym64Size", Const, 0}, + {"SymBind", Type, 0}, + {"SymType", Type, 0}, + {"SymVis", Type, 0}, + {"Symbol", Type, 0}, + {"Symbol.Info", Field, 0}, + {"Symbol.Library", Field, 13}, + {"Symbol.Name", Field, 0}, + {"Symbol.Other", Field, 0}, + {"Symbol.Section", Field, 0}, + {"Symbol.Size", Field, 0}, + {"Symbol.Value", Field, 0}, + {"Symbol.Version", Field, 13}, + {"Type", Type, 0}, + {"Version", Type, 0}, + }, + "debug/gosym": { + {"(*DecodingError).Error", Method, 0}, + {"(*LineTable).LineToPC", Method, 0}, + {"(*LineTable).PCToLine", Method, 0}, + {"(*Sym).BaseName", Method, 0}, + {"(*Sym).PackageName", Method, 0}, + {"(*Sym).ReceiverName", Method, 0}, + {"(*Sym).Static", Method, 0}, + {"(*Table).LineToPC", Method, 0}, + {"(*Table).LookupFunc", Method, 0}, + {"(*Table).LookupSym", Method, 0}, + {"(*Table).PCToFunc", Method, 0}, + {"(*Table).PCToLine", Method, 0}, + {"(*Table).SymByAddr", Method, 0}, + {"(*UnknownLineError).Error", Method, 0}, + {"(Func).BaseName", Method, 0}, + {"(Func).PackageName", Method, 0}, + {"(Func).ReceiverName", Method, 0}, + {"(Func).Static", Method, 0}, + {"(UnknownFileError).Error", Method, 0}, + {"DecodingError", Type, 0}, + {"Func", Type, 0}, + {"Func.End", Field, 0}, + {"Func.Entry", Field, 0}, + {"Func.FrameSize", Field, 0}, + {"Func.LineTable", Field, 0}, + {"Func.Locals", Field, 0}, + {"Func.Obj", Field, 0}, + {"Func.Params", Field, 0}, + {"Func.Sym", Field, 0}, + {"LineTable", Type, 0}, + {"LineTable.Data", Field, 0}, + {"LineTable.Line", Field, 0}, + {"LineTable.PC", Field, 0}, + {"NewLineTable", Func, 0}, + {"NewTable", Func, 0}, + {"Obj", Type, 0}, + {"Obj.Funcs", Field, 0}, + {"Obj.Paths", Field, 0}, + {"Sym", Type, 0}, + {"Sym.Func", Field, 0}, + {"Sym.GoType", Field, 0}, + {"Sym.Name", Field, 0}, + {"Sym.Type", Field, 0}, + {"Sym.Value", Field, 0}, + {"Table", Type, 0}, + {"Table.Files", Field, 0}, + {"Table.Funcs", Field, 0}, + {"Table.Objs", Field, 0}, + {"Table.Syms", Field, 0}, + {"UnknownFileError", Type, 0}, + {"UnknownLineError", Type, 0}, + {"UnknownLineError.File", Field, 0}, + {"UnknownLineError.Line", Field, 0}, + }, + "debug/macho": { + {"(*FatFile).Close", Method, 3}, + {"(*File).Close", Method, 0}, + {"(*File).DWARF", Method, 0}, + {"(*File).ImportedLibraries", Method, 0}, + {"(*File).ImportedSymbols", Method, 0}, + {"(*File).Section", Method, 0}, + {"(*File).Segment", Method, 0}, + {"(*FormatError).Error", Method, 0}, + {"(*Section).Data", Method, 0}, + {"(*Section).Open", Method, 0}, + {"(*Segment).Data", Method, 0}, + {"(*Segment).Open", Method, 0}, + {"(Cpu).GoString", Method, 0}, + {"(Cpu).String", Method, 0}, + {"(Dylib).Raw", Method, 0}, + {"(Dysymtab).Raw", Method, 0}, + {"(FatArch).Close", Method, 3}, + {"(FatArch).DWARF", Method, 3}, + {"(FatArch).ImportedLibraries", Method, 3}, + {"(FatArch).ImportedSymbols", Method, 3}, + {"(FatArch).Section", Method, 3}, + {"(FatArch).Segment", Method, 3}, + {"(LoadBytes).Raw", Method, 0}, + {"(LoadCmd).GoString", Method, 0}, + {"(LoadCmd).String", Method, 0}, + {"(RelocTypeARM).GoString", Method, 10}, + {"(RelocTypeARM).String", Method, 10}, + {"(RelocTypeARM64).GoString", Method, 10}, + {"(RelocTypeARM64).String", Method, 10}, + {"(RelocTypeGeneric).GoString", Method, 10}, + {"(RelocTypeGeneric).String", Method, 10}, + {"(RelocTypeX86_64).GoString", Method, 10}, + {"(RelocTypeX86_64).String", Method, 10}, + {"(Rpath).Raw", Method, 10}, + {"(Section).ReadAt", Method, 0}, + {"(Segment).Raw", Method, 0}, + {"(Segment).ReadAt", Method, 0}, + {"(Symtab).Raw", Method, 0}, + {"(Type).GoString", Method, 10}, + {"(Type).String", Method, 10}, + {"ARM64_RELOC_ADDEND", Const, 10}, + {"ARM64_RELOC_BRANCH26", Const, 10}, + {"ARM64_RELOC_GOT_LOAD_PAGE21", Const, 10}, + {"ARM64_RELOC_GOT_LOAD_PAGEOFF12", Const, 10}, + {"ARM64_RELOC_PAGE21", Const, 10}, + {"ARM64_RELOC_PAGEOFF12", Const, 10}, + {"ARM64_RELOC_POINTER_TO_GOT", Const, 10}, + {"ARM64_RELOC_SUBTRACTOR", Const, 10}, + {"ARM64_RELOC_TLVP_LOAD_PAGE21", Const, 10}, + {"ARM64_RELOC_TLVP_LOAD_PAGEOFF12", Const, 10}, + {"ARM64_RELOC_UNSIGNED", Const, 10}, + {"ARM_RELOC_BR24", Const, 10}, + {"ARM_RELOC_HALF", Const, 10}, + {"ARM_RELOC_HALF_SECTDIFF", Const, 10}, + {"ARM_RELOC_LOCAL_SECTDIFF", Const, 10}, + {"ARM_RELOC_PAIR", Const, 10}, + {"ARM_RELOC_PB_LA_PTR", Const, 10}, + {"ARM_RELOC_SECTDIFF", Const, 10}, + {"ARM_RELOC_VANILLA", Const, 10}, + {"ARM_THUMB_32BIT_BRANCH", Const, 10}, + {"ARM_THUMB_RELOC_BR22", Const, 10}, + {"Cpu", Type, 0}, + {"Cpu386", Const, 0}, + {"CpuAmd64", Const, 0}, + {"CpuArm", Const, 3}, + {"CpuArm64", Const, 11}, + {"CpuPpc", Const, 3}, + {"CpuPpc64", Const, 3}, + {"Dylib", Type, 0}, + {"Dylib.CompatVersion", Field, 0}, + {"Dylib.CurrentVersion", Field, 0}, + {"Dylib.LoadBytes", Field, 0}, + {"Dylib.Name", Field, 0}, + {"Dylib.Time", Field, 0}, + {"DylibCmd", Type, 0}, + {"DylibCmd.Cmd", Field, 0}, + {"DylibCmd.CompatVersion", Field, 0}, + {"DylibCmd.CurrentVersion", Field, 0}, + {"DylibCmd.Len", Field, 0}, + {"DylibCmd.Name", Field, 0}, + {"DylibCmd.Time", Field, 0}, + {"Dysymtab", Type, 0}, + {"Dysymtab.DysymtabCmd", Field, 0}, + {"Dysymtab.IndirectSyms", Field, 0}, + {"Dysymtab.LoadBytes", Field, 0}, + {"DysymtabCmd", Type, 0}, + {"DysymtabCmd.Cmd", Field, 0}, + {"DysymtabCmd.Extrefsymoff", Field, 0}, + {"DysymtabCmd.Extreloff", Field, 0}, + {"DysymtabCmd.Iextdefsym", Field, 0}, + {"DysymtabCmd.Ilocalsym", Field, 0}, + {"DysymtabCmd.Indirectsymoff", Field, 0}, + {"DysymtabCmd.Iundefsym", Field, 0}, + {"DysymtabCmd.Len", Field, 0}, + {"DysymtabCmd.Locreloff", Field, 0}, + {"DysymtabCmd.Modtaboff", Field, 0}, + {"DysymtabCmd.Nextdefsym", Field, 0}, + {"DysymtabCmd.Nextrefsyms", Field, 0}, + {"DysymtabCmd.Nextrel", Field, 0}, + {"DysymtabCmd.Nindirectsyms", Field, 0}, + {"DysymtabCmd.Nlocalsym", Field, 0}, + {"DysymtabCmd.Nlocrel", Field, 0}, + {"DysymtabCmd.Nmodtab", Field, 0}, + {"DysymtabCmd.Ntoc", Field, 0}, + {"DysymtabCmd.Nundefsym", Field, 0}, + {"DysymtabCmd.Tocoffset", Field, 0}, + {"ErrNotFat", Var, 3}, + {"FatArch", Type, 3}, + {"FatArch.FatArchHeader", Field, 3}, + {"FatArch.File", Field, 3}, + {"FatArchHeader", Type, 3}, + {"FatArchHeader.Align", Field, 3}, + {"FatArchHeader.Cpu", Field, 3}, + {"FatArchHeader.Offset", Field, 3}, + {"FatArchHeader.Size", Field, 3}, + {"FatArchHeader.SubCpu", Field, 3}, + {"FatFile", Type, 3}, + {"FatFile.Arches", Field, 3}, + {"FatFile.Magic", Field, 3}, + {"File", Type, 0}, + {"File.ByteOrder", Field, 0}, + {"File.Dysymtab", Field, 0}, + {"File.FileHeader", Field, 0}, + {"File.Loads", Field, 0}, + {"File.Sections", Field, 0}, + {"File.Symtab", Field, 0}, + {"FileHeader", Type, 0}, + {"FileHeader.Cmdsz", Field, 0}, + {"FileHeader.Cpu", Field, 0}, + {"FileHeader.Flags", Field, 0}, + {"FileHeader.Magic", Field, 0}, + {"FileHeader.Ncmd", Field, 0}, + {"FileHeader.SubCpu", Field, 0}, + {"FileHeader.Type", Field, 0}, + {"FlagAllModsBound", Const, 10}, + {"FlagAllowStackExecution", Const, 10}, + {"FlagAppExtensionSafe", Const, 10}, + {"FlagBindAtLoad", Const, 10}, + {"FlagBindsToWeak", Const, 10}, + {"FlagCanonical", Const, 10}, + {"FlagDeadStrippableDylib", Const, 10}, + {"FlagDyldLink", Const, 10}, + {"FlagForceFlat", Const, 10}, + {"FlagHasTLVDescriptors", Const, 10}, + {"FlagIncrLink", Const, 10}, + {"FlagLazyInit", Const, 10}, + {"FlagNoFixPrebinding", Const, 10}, + {"FlagNoHeapExecution", Const, 10}, + {"FlagNoMultiDefs", Const, 10}, + {"FlagNoReexportedDylibs", Const, 10}, + {"FlagNoUndefs", Const, 10}, + {"FlagPIE", Const, 10}, + {"FlagPrebindable", Const, 10}, + {"FlagPrebound", Const, 10}, + {"FlagRootSafe", Const, 10}, + {"FlagSetuidSafe", Const, 10}, + {"FlagSplitSegs", Const, 10}, + {"FlagSubsectionsViaSymbols", Const, 10}, + {"FlagTwoLevel", Const, 10}, + {"FlagWeakDefines", Const, 10}, + {"FormatError", Type, 0}, + {"GENERIC_RELOC_LOCAL_SECTDIFF", Const, 10}, + {"GENERIC_RELOC_PAIR", Const, 10}, + {"GENERIC_RELOC_PB_LA_PTR", Const, 10}, + {"GENERIC_RELOC_SECTDIFF", Const, 10}, + {"GENERIC_RELOC_TLV", Const, 10}, + {"GENERIC_RELOC_VANILLA", Const, 10}, + {"Load", Type, 0}, + {"LoadBytes", Type, 0}, + {"LoadCmd", Type, 0}, + {"LoadCmdDylib", Const, 0}, + {"LoadCmdDylinker", Const, 0}, + {"LoadCmdDysymtab", Const, 0}, + {"LoadCmdRpath", Const, 10}, + {"LoadCmdSegment", Const, 0}, + {"LoadCmdSegment64", Const, 0}, + {"LoadCmdSymtab", Const, 0}, + {"LoadCmdThread", Const, 0}, + {"LoadCmdUnixThread", Const, 0}, + {"Magic32", Const, 0}, + {"Magic64", Const, 0}, + {"MagicFat", Const, 3}, + {"NewFatFile", Func, 3}, + {"NewFile", Func, 0}, + {"Nlist32", Type, 0}, + {"Nlist32.Desc", Field, 0}, + {"Nlist32.Name", Field, 0}, + {"Nlist32.Sect", Field, 0}, + {"Nlist32.Type", Field, 0}, + {"Nlist32.Value", Field, 0}, + {"Nlist64", Type, 0}, + {"Nlist64.Desc", Field, 0}, + {"Nlist64.Name", Field, 0}, + {"Nlist64.Sect", Field, 0}, + {"Nlist64.Type", Field, 0}, + {"Nlist64.Value", Field, 0}, + {"Open", Func, 0}, + {"OpenFat", Func, 3}, + {"Regs386", Type, 0}, + {"Regs386.AX", Field, 0}, + {"Regs386.BP", Field, 0}, + {"Regs386.BX", Field, 0}, + {"Regs386.CS", Field, 0}, + {"Regs386.CX", Field, 0}, + {"Regs386.DI", Field, 0}, + {"Regs386.DS", Field, 0}, + {"Regs386.DX", Field, 0}, + {"Regs386.ES", Field, 0}, + {"Regs386.FLAGS", Field, 0}, + {"Regs386.FS", Field, 0}, + {"Regs386.GS", Field, 0}, + {"Regs386.IP", Field, 0}, + {"Regs386.SI", Field, 0}, + {"Regs386.SP", Field, 0}, + {"Regs386.SS", Field, 0}, + {"RegsAMD64", Type, 0}, + {"RegsAMD64.AX", Field, 0}, + {"RegsAMD64.BP", Field, 0}, + {"RegsAMD64.BX", Field, 0}, + {"RegsAMD64.CS", Field, 0}, + {"RegsAMD64.CX", Field, 0}, + {"RegsAMD64.DI", Field, 0}, + {"RegsAMD64.DX", Field, 0}, + {"RegsAMD64.FLAGS", Field, 0}, + {"RegsAMD64.FS", Field, 0}, + {"RegsAMD64.GS", Field, 0}, + {"RegsAMD64.IP", Field, 0}, + {"RegsAMD64.R10", Field, 0}, + {"RegsAMD64.R11", Field, 0}, + {"RegsAMD64.R12", Field, 0}, + {"RegsAMD64.R13", Field, 0}, + {"RegsAMD64.R14", Field, 0}, + {"RegsAMD64.R15", Field, 0}, + {"RegsAMD64.R8", Field, 0}, + {"RegsAMD64.R9", Field, 0}, + {"RegsAMD64.SI", Field, 0}, + {"RegsAMD64.SP", Field, 0}, + {"Reloc", Type, 10}, + {"Reloc.Addr", Field, 10}, + {"Reloc.Extern", Field, 10}, + {"Reloc.Len", Field, 10}, + {"Reloc.Pcrel", Field, 10}, + {"Reloc.Scattered", Field, 10}, + {"Reloc.Type", Field, 10}, + {"Reloc.Value", Field, 10}, + {"RelocTypeARM", Type, 10}, + {"RelocTypeARM64", Type, 10}, + {"RelocTypeGeneric", Type, 10}, + {"RelocTypeX86_64", Type, 10}, + {"Rpath", Type, 10}, + {"Rpath.LoadBytes", Field, 10}, + {"Rpath.Path", Field, 10}, + {"RpathCmd", Type, 10}, + {"RpathCmd.Cmd", Field, 10}, + {"RpathCmd.Len", Field, 10}, + {"RpathCmd.Path", Field, 10}, + {"Section", Type, 0}, + {"Section.ReaderAt", Field, 0}, + {"Section.Relocs", Field, 10}, + {"Section.SectionHeader", Field, 0}, + {"Section32", Type, 0}, + {"Section32.Addr", Field, 0}, + {"Section32.Align", Field, 0}, + {"Section32.Flags", Field, 0}, + {"Section32.Name", Field, 0}, + {"Section32.Nreloc", Field, 0}, + {"Section32.Offset", Field, 0}, + {"Section32.Reloff", Field, 0}, + {"Section32.Reserve1", Field, 0}, + {"Section32.Reserve2", Field, 0}, + {"Section32.Seg", Field, 0}, + {"Section32.Size", Field, 0}, + {"Section64", Type, 0}, + {"Section64.Addr", Field, 0}, + {"Section64.Align", Field, 0}, + {"Section64.Flags", Field, 0}, + {"Section64.Name", Field, 0}, + {"Section64.Nreloc", Field, 0}, + {"Section64.Offset", Field, 0}, + {"Section64.Reloff", Field, 0}, + {"Section64.Reserve1", Field, 0}, + {"Section64.Reserve2", Field, 0}, + {"Section64.Reserve3", Field, 0}, + {"Section64.Seg", Field, 0}, + {"Section64.Size", Field, 0}, + {"SectionHeader", Type, 0}, + {"SectionHeader.Addr", Field, 0}, + {"SectionHeader.Align", Field, 0}, + {"SectionHeader.Flags", Field, 0}, + {"SectionHeader.Name", Field, 0}, + {"SectionHeader.Nreloc", Field, 0}, + {"SectionHeader.Offset", Field, 0}, + {"SectionHeader.Reloff", Field, 0}, + {"SectionHeader.Seg", Field, 0}, + {"SectionHeader.Size", Field, 0}, + {"Segment", Type, 0}, + {"Segment.LoadBytes", Field, 0}, + {"Segment.ReaderAt", Field, 0}, + {"Segment.SegmentHeader", Field, 0}, + {"Segment32", Type, 0}, + {"Segment32.Addr", Field, 0}, + {"Segment32.Cmd", Field, 0}, + {"Segment32.Filesz", Field, 0}, + {"Segment32.Flag", Field, 0}, + {"Segment32.Len", Field, 0}, + {"Segment32.Maxprot", Field, 0}, + {"Segment32.Memsz", Field, 0}, + {"Segment32.Name", Field, 0}, + {"Segment32.Nsect", Field, 0}, + {"Segment32.Offset", Field, 0}, + {"Segment32.Prot", Field, 0}, + {"Segment64", Type, 0}, + {"Segment64.Addr", Field, 0}, + {"Segment64.Cmd", Field, 0}, + {"Segment64.Filesz", Field, 0}, + {"Segment64.Flag", Field, 0}, + {"Segment64.Len", Field, 0}, + {"Segment64.Maxprot", Field, 0}, + {"Segment64.Memsz", Field, 0}, + {"Segment64.Name", Field, 0}, + {"Segment64.Nsect", Field, 0}, + {"Segment64.Offset", Field, 0}, + {"Segment64.Prot", Field, 0}, + {"SegmentHeader", Type, 0}, + {"SegmentHeader.Addr", Field, 0}, + {"SegmentHeader.Cmd", Field, 0}, + {"SegmentHeader.Filesz", Field, 0}, + {"SegmentHeader.Flag", Field, 0}, + {"SegmentHeader.Len", Field, 0}, + {"SegmentHeader.Maxprot", Field, 0}, + {"SegmentHeader.Memsz", Field, 0}, + {"SegmentHeader.Name", Field, 0}, + {"SegmentHeader.Nsect", Field, 0}, + {"SegmentHeader.Offset", Field, 0}, + {"SegmentHeader.Prot", Field, 0}, + {"Symbol", Type, 0}, + {"Symbol.Desc", Field, 0}, + {"Symbol.Name", Field, 0}, + {"Symbol.Sect", Field, 0}, + {"Symbol.Type", Field, 0}, + {"Symbol.Value", Field, 0}, + {"Symtab", Type, 0}, + {"Symtab.LoadBytes", Field, 0}, + {"Symtab.Syms", Field, 0}, + {"Symtab.SymtabCmd", Field, 0}, + {"SymtabCmd", Type, 0}, + {"SymtabCmd.Cmd", Field, 0}, + {"SymtabCmd.Len", Field, 0}, + {"SymtabCmd.Nsyms", Field, 0}, + {"SymtabCmd.Stroff", Field, 0}, + {"SymtabCmd.Strsize", Field, 0}, + {"SymtabCmd.Symoff", Field, 0}, + {"Thread", Type, 0}, + {"Thread.Cmd", Field, 0}, + {"Thread.Data", Field, 0}, + {"Thread.Len", Field, 0}, + {"Thread.Type", Field, 0}, + {"Type", Type, 0}, + {"TypeBundle", Const, 3}, + {"TypeDylib", Const, 3}, + {"TypeExec", Const, 0}, + {"TypeObj", Const, 0}, + {"X86_64_RELOC_BRANCH", Const, 10}, + {"X86_64_RELOC_GOT", Const, 10}, + {"X86_64_RELOC_GOT_LOAD", Const, 10}, + {"X86_64_RELOC_SIGNED", Const, 10}, + {"X86_64_RELOC_SIGNED_1", Const, 10}, + {"X86_64_RELOC_SIGNED_2", Const, 10}, + {"X86_64_RELOC_SIGNED_4", Const, 10}, + {"X86_64_RELOC_SUBTRACTOR", Const, 10}, + {"X86_64_RELOC_TLV", Const, 10}, + {"X86_64_RELOC_UNSIGNED", Const, 10}, + }, + "debug/pe": { + {"(*COFFSymbol).FullName", Method, 8}, + {"(*File).COFFSymbolReadSectionDefAux", Method, 19}, + {"(*File).Close", Method, 0}, + {"(*File).DWARF", Method, 0}, + {"(*File).ImportedLibraries", Method, 0}, + {"(*File).ImportedSymbols", Method, 0}, + {"(*File).Section", Method, 0}, + {"(*FormatError).Error", Method, 0}, + {"(*Section).Data", Method, 0}, + {"(*Section).Open", Method, 0}, + {"(Section).ReadAt", Method, 0}, + {"(StringTable).String", Method, 8}, + {"COFFSymbol", Type, 1}, + {"COFFSymbol.Name", Field, 1}, + {"COFFSymbol.NumberOfAuxSymbols", Field, 1}, + {"COFFSymbol.SectionNumber", Field, 1}, + {"COFFSymbol.StorageClass", Field, 1}, + {"COFFSymbol.Type", Field, 1}, + {"COFFSymbol.Value", Field, 1}, + {"COFFSymbolAuxFormat5", Type, 19}, + {"COFFSymbolAuxFormat5.Checksum", Field, 19}, + {"COFFSymbolAuxFormat5.NumLineNumbers", Field, 19}, + {"COFFSymbolAuxFormat5.NumRelocs", Field, 19}, + {"COFFSymbolAuxFormat5.SecNum", Field, 19}, + {"COFFSymbolAuxFormat5.Selection", Field, 19}, + {"COFFSymbolAuxFormat5.Size", Field, 19}, + {"COFFSymbolSize", Const, 1}, + {"DataDirectory", Type, 3}, + {"DataDirectory.Size", Field, 3}, + {"DataDirectory.VirtualAddress", Field, 3}, + {"File", Type, 0}, + {"File.COFFSymbols", Field, 8}, + {"File.FileHeader", Field, 0}, + {"File.OptionalHeader", Field, 3}, + {"File.Sections", Field, 0}, + {"File.StringTable", Field, 8}, + {"File.Symbols", Field, 1}, + {"FileHeader", Type, 0}, + {"FileHeader.Characteristics", Field, 0}, + {"FileHeader.Machine", Field, 0}, + {"FileHeader.NumberOfSections", Field, 0}, + {"FileHeader.NumberOfSymbols", Field, 0}, + {"FileHeader.PointerToSymbolTable", Field, 0}, + {"FileHeader.SizeOfOptionalHeader", Field, 0}, + {"FileHeader.TimeDateStamp", Field, 0}, + {"FormatError", Type, 0}, + {"IMAGE_COMDAT_SELECT_ANY", Const, 19}, + {"IMAGE_COMDAT_SELECT_ASSOCIATIVE", Const, 19}, + {"IMAGE_COMDAT_SELECT_EXACT_MATCH", Const, 19}, + {"IMAGE_COMDAT_SELECT_LARGEST", Const, 19}, + {"IMAGE_COMDAT_SELECT_NODUPLICATES", Const, 19}, + {"IMAGE_COMDAT_SELECT_SAME_SIZE", Const, 19}, + {"IMAGE_DIRECTORY_ENTRY_ARCHITECTURE", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_BASERELOC", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_DEBUG", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_EXCEPTION", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_EXPORT", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_GLOBALPTR", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_IAT", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_IMPORT", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_RESOURCE", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_SECURITY", Const, 11}, + {"IMAGE_DIRECTORY_ENTRY_TLS", Const, 11}, + {"IMAGE_DLLCHARACTERISTICS_APPCONTAINER", Const, 15}, + {"IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE", Const, 15}, + {"IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY", Const, 15}, + {"IMAGE_DLLCHARACTERISTICS_GUARD_CF", Const, 15}, + {"IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA", Const, 15}, + {"IMAGE_DLLCHARACTERISTICS_NO_BIND", Const, 15}, + {"IMAGE_DLLCHARACTERISTICS_NO_ISOLATION", Const, 15}, + {"IMAGE_DLLCHARACTERISTICS_NO_SEH", Const, 15}, + {"IMAGE_DLLCHARACTERISTICS_NX_COMPAT", Const, 15}, + {"IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE", Const, 15}, + {"IMAGE_DLLCHARACTERISTICS_WDM_DRIVER", Const, 15}, + {"IMAGE_FILE_32BIT_MACHINE", Const, 15}, + {"IMAGE_FILE_AGGRESIVE_WS_TRIM", Const, 15}, + {"IMAGE_FILE_BYTES_REVERSED_HI", Const, 15}, + {"IMAGE_FILE_BYTES_REVERSED_LO", Const, 15}, + {"IMAGE_FILE_DEBUG_STRIPPED", Const, 15}, + {"IMAGE_FILE_DLL", Const, 15}, + {"IMAGE_FILE_EXECUTABLE_IMAGE", Const, 15}, + {"IMAGE_FILE_LARGE_ADDRESS_AWARE", Const, 15}, + {"IMAGE_FILE_LINE_NUMS_STRIPPED", Const, 15}, + {"IMAGE_FILE_LOCAL_SYMS_STRIPPED", Const, 15}, + {"IMAGE_FILE_MACHINE_AM33", Const, 0}, + {"IMAGE_FILE_MACHINE_AMD64", Const, 0}, + {"IMAGE_FILE_MACHINE_ARM", Const, 0}, + {"IMAGE_FILE_MACHINE_ARM64", Const, 11}, + {"IMAGE_FILE_MACHINE_ARMNT", Const, 12}, + {"IMAGE_FILE_MACHINE_EBC", Const, 0}, + {"IMAGE_FILE_MACHINE_I386", Const, 0}, + {"IMAGE_FILE_MACHINE_IA64", Const, 0}, + {"IMAGE_FILE_MACHINE_LOONGARCH32", Const, 19}, + {"IMAGE_FILE_MACHINE_LOONGARCH64", Const, 19}, + {"IMAGE_FILE_MACHINE_M32R", Const, 0}, + {"IMAGE_FILE_MACHINE_MIPS16", Const, 0}, + {"IMAGE_FILE_MACHINE_MIPSFPU", Const, 0}, + {"IMAGE_FILE_MACHINE_MIPSFPU16", Const, 0}, + {"IMAGE_FILE_MACHINE_POWERPC", Const, 0}, + {"IMAGE_FILE_MACHINE_POWERPCFP", Const, 0}, + {"IMAGE_FILE_MACHINE_R4000", Const, 0}, + {"IMAGE_FILE_MACHINE_RISCV128", Const, 20}, + {"IMAGE_FILE_MACHINE_RISCV32", Const, 20}, + {"IMAGE_FILE_MACHINE_RISCV64", Const, 20}, + {"IMAGE_FILE_MACHINE_SH3", Const, 0}, + {"IMAGE_FILE_MACHINE_SH3DSP", Const, 0}, + {"IMAGE_FILE_MACHINE_SH4", Const, 0}, + {"IMAGE_FILE_MACHINE_SH5", Const, 0}, + {"IMAGE_FILE_MACHINE_THUMB", Const, 0}, + {"IMAGE_FILE_MACHINE_UNKNOWN", Const, 0}, + {"IMAGE_FILE_MACHINE_WCEMIPSV2", Const, 0}, + {"IMAGE_FILE_NET_RUN_FROM_SWAP", Const, 15}, + {"IMAGE_FILE_RELOCS_STRIPPED", Const, 15}, + {"IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP", Const, 15}, + {"IMAGE_FILE_SYSTEM", Const, 15}, + {"IMAGE_FILE_UP_SYSTEM_ONLY", Const, 15}, + {"IMAGE_SCN_CNT_CODE", Const, 19}, + {"IMAGE_SCN_CNT_INITIALIZED_DATA", Const, 19}, + {"IMAGE_SCN_CNT_UNINITIALIZED_DATA", Const, 19}, + {"IMAGE_SCN_LNK_COMDAT", Const, 19}, + {"IMAGE_SCN_MEM_DISCARDABLE", Const, 19}, + {"IMAGE_SCN_MEM_EXECUTE", Const, 19}, + {"IMAGE_SCN_MEM_READ", Const, 19}, + {"IMAGE_SCN_MEM_WRITE", Const, 19}, + {"IMAGE_SUBSYSTEM_EFI_APPLICATION", Const, 15}, + {"IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER", Const, 15}, + {"IMAGE_SUBSYSTEM_EFI_ROM", Const, 15}, + {"IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER", Const, 15}, + {"IMAGE_SUBSYSTEM_NATIVE", Const, 15}, + {"IMAGE_SUBSYSTEM_NATIVE_WINDOWS", Const, 15}, + {"IMAGE_SUBSYSTEM_OS2_CUI", Const, 15}, + {"IMAGE_SUBSYSTEM_POSIX_CUI", Const, 15}, + {"IMAGE_SUBSYSTEM_UNKNOWN", Const, 15}, + {"IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION", Const, 15}, + {"IMAGE_SUBSYSTEM_WINDOWS_CE_GUI", Const, 15}, + {"IMAGE_SUBSYSTEM_WINDOWS_CUI", Const, 15}, + {"IMAGE_SUBSYSTEM_WINDOWS_GUI", Const, 15}, + {"IMAGE_SUBSYSTEM_XBOX", Const, 15}, + {"ImportDirectory", Type, 0}, + {"ImportDirectory.FirstThunk", Field, 0}, + {"ImportDirectory.ForwarderChain", Field, 0}, + {"ImportDirectory.Name", Field, 0}, + {"ImportDirectory.OriginalFirstThunk", Field, 0}, + {"ImportDirectory.TimeDateStamp", Field, 0}, + {"NewFile", Func, 0}, + {"Open", Func, 0}, + {"OptionalHeader32", Type, 3}, + {"OptionalHeader32.AddressOfEntryPoint", Field, 3}, + {"OptionalHeader32.BaseOfCode", Field, 3}, + {"OptionalHeader32.BaseOfData", Field, 3}, + {"OptionalHeader32.CheckSum", Field, 3}, + {"OptionalHeader32.DataDirectory", Field, 3}, + {"OptionalHeader32.DllCharacteristics", Field, 3}, + {"OptionalHeader32.FileAlignment", Field, 3}, + {"OptionalHeader32.ImageBase", Field, 3}, + {"OptionalHeader32.LoaderFlags", Field, 3}, + {"OptionalHeader32.Magic", Field, 3}, + {"OptionalHeader32.MajorImageVersion", Field, 3}, + {"OptionalHeader32.MajorLinkerVersion", Field, 3}, + {"OptionalHeader32.MajorOperatingSystemVersion", Field, 3}, + {"OptionalHeader32.MajorSubsystemVersion", Field, 3}, + {"OptionalHeader32.MinorImageVersion", Field, 3}, + {"OptionalHeader32.MinorLinkerVersion", Field, 3}, + {"OptionalHeader32.MinorOperatingSystemVersion", Field, 3}, + {"OptionalHeader32.MinorSubsystemVersion", Field, 3}, + {"OptionalHeader32.NumberOfRvaAndSizes", Field, 3}, + {"OptionalHeader32.SectionAlignment", Field, 3}, + {"OptionalHeader32.SizeOfCode", Field, 3}, + {"OptionalHeader32.SizeOfHeaders", Field, 3}, + {"OptionalHeader32.SizeOfHeapCommit", Field, 3}, + {"OptionalHeader32.SizeOfHeapReserve", Field, 3}, + {"OptionalHeader32.SizeOfImage", Field, 3}, + {"OptionalHeader32.SizeOfInitializedData", Field, 3}, + {"OptionalHeader32.SizeOfStackCommit", Field, 3}, + {"OptionalHeader32.SizeOfStackReserve", Field, 3}, + {"OptionalHeader32.SizeOfUninitializedData", Field, 3}, + {"OptionalHeader32.Subsystem", Field, 3}, + {"OptionalHeader32.Win32VersionValue", Field, 3}, + {"OptionalHeader64", Type, 3}, + {"OptionalHeader64.AddressOfEntryPoint", Field, 3}, + {"OptionalHeader64.BaseOfCode", Field, 3}, + {"OptionalHeader64.CheckSum", Field, 3}, + {"OptionalHeader64.DataDirectory", Field, 3}, + {"OptionalHeader64.DllCharacteristics", Field, 3}, + {"OptionalHeader64.FileAlignment", Field, 3}, + {"OptionalHeader64.ImageBase", Field, 3}, + {"OptionalHeader64.LoaderFlags", Field, 3}, + {"OptionalHeader64.Magic", Field, 3}, + {"OptionalHeader64.MajorImageVersion", Field, 3}, + {"OptionalHeader64.MajorLinkerVersion", Field, 3}, + {"OptionalHeader64.MajorOperatingSystemVersion", Field, 3}, + {"OptionalHeader64.MajorSubsystemVersion", Field, 3}, + {"OptionalHeader64.MinorImageVersion", Field, 3}, + {"OptionalHeader64.MinorLinkerVersion", Field, 3}, + {"OptionalHeader64.MinorOperatingSystemVersion", Field, 3}, + {"OptionalHeader64.MinorSubsystemVersion", Field, 3}, + {"OptionalHeader64.NumberOfRvaAndSizes", Field, 3}, + {"OptionalHeader64.SectionAlignment", Field, 3}, + {"OptionalHeader64.SizeOfCode", Field, 3}, + {"OptionalHeader64.SizeOfHeaders", Field, 3}, + {"OptionalHeader64.SizeOfHeapCommit", Field, 3}, + {"OptionalHeader64.SizeOfHeapReserve", Field, 3}, + {"OptionalHeader64.SizeOfImage", Field, 3}, + {"OptionalHeader64.SizeOfInitializedData", Field, 3}, + {"OptionalHeader64.SizeOfStackCommit", Field, 3}, + {"OptionalHeader64.SizeOfStackReserve", Field, 3}, + {"OptionalHeader64.SizeOfUninitializedData", Field, 3}, + {"OptionalHeader64.Subsystem", Field, 3}, + {"OptionalHeader64.Win32VersionValue", Field, 3}, + {"Reloc", Type, 8}, + {"Reloc.SymbolTableIndex", Field, 8}, + {"Reloc.Type", Field, 8}, + {"Reloc.VirtualAddress", Field, 8}, + {"Section", Type, 0}, + {"Section.ReaderAt", Field, 0}, + {"Section.Relocs", Field, 8}, + {"Section.SectionHeader", Field, 0}, + {"SectionHeader", Type, 0}, + {"SectionHeader.Characteristics", Field, 0}, + {"SectionHeader.Name", Field, 0}, + {"SectionHeader.NumberOfLineNumbers", Field, 0}, + {"SectionHeader.NumberOfRelocations", Field, 0}, + {"SectionHeader.Offset", Field, 0}, + {"SectionHeader.PointerToLineNumbers", Field, 0}, + {"SectionHeader.PointerToRelocations", Field, 0}, + {"SectionHeader.Size", Field, 0}, + {"SectionHeader.VirtualAddress", Field, 0}, + {"SectionHeader.VirtualSize", Field, 0}, + {"SectionHeader32", Type, 0}, + {"SectionHeader32.Characteristics", Field, 0}, + {"SectionHeader32.Name", Field, 0}, + {"SectionHeader32.NumberOfLineNumbers", Field, 0}, + {"SectionHeader32.NumberOfRelocations", Field, 0}, + {"SectionHeader32.PointerToLineNumbers", Field, 0}, + {"SectionHeader32.PointerToRawData", Field, 0}, + {"SectionHeader32.PointerToRelocations", Field, 0}, + {"SectionHeader32.SizeOfRawData", Field, 0}, + {"SectionHeader32.VirtualAddress", Field, 0}, + {"SectionHeader32.VirtualSize", Field, 0}, + {"StringTable", Type, 8}, + {"Symbol", Type, 1}, + {"Symbol.Name", Field, 1}, + {"Symbol.SectionNumber", Field, 1}, + {"Symbol.StorageClass", Field, 1}, + {"Symbol.Type", Field, 1}, + {"Symbol.Value", Field, 1}, + }, + "debug/plan9obj": { + {"(*File).Close", Method, 3}, + {"(*File).Section", Method, 3}, + {"(*File).Symbols", Method, 3}, + {"(*Section).Data", Method, 3}, + {"(*Section).Open", Method, 3}, + {"(Section).ReadAt", Method, 3}, + {"ErrNoSymbols", Var, 18}, + {"File", Type, 3}, + {"File.FileHeader", Field, 3}, + {"File.Sections", Field, 3}, + {"FileHeader", Type, 3}, + {"FileHeader.Bss", Field, 3}, + {"FileHeader.Entry", Field, 3}, + {"FileHeader.HdrSize", Field, 4}, + {"FileHeader.LoadAddress", Field, 4}, + {"FileHeader.Magic", Field, 3}, + {"FileHeader.PtrSize", Field, 3}, + {"Magic386", Const, 3}, + {"Magic64", Const, 3}, + {"MagicAMD64", Const, 3}, + {"MagicARM", Const, 3}, + {"NewFile", Func, 3}, + {"Open", Func, 3}, + {"Section", Type, 3}, + {"Section.ReaderAt", Field, 3}, + {"Section.SectionHeader", Field, 3}, + {"SectionHeader", Type, 3}, + {"SectionHeader.Name", Field, 3}, + {"SectionHeader.Offset", Field, 3}, + {"SectionHeader.Size", Field, 3}, + {"Sym", Type, 3}, + {"Sym.Name", Field, 3}, + {"Sym.Type", Field, 3}, + {"Sym.Value", Field, 3}, + }, + "embed": { + {"(FS).Open", Method, 16}, + {"(FS).ReadDir", Method, 16}, + {"(FS).ReadFile", Method, 16}, + {"FS", Type, 16}, + }, + "encoding": { + {"BinaryMarshaler", Type, 2}, + {"BinaryUnmarshaler", Type, 2}, + {"TextMarshaler", Type, 2}, + {"TextUnmarshaler", Type, 2}, + }, + "encoding/ascii85": { + {"(CorruptInputError).Error", Method, 0}, + {"CorruptInputError", Type, 0}, + {"Decode", Func, 0}, + {"Encode", Func, 0}, + {"MaxEncodedLen", Func, 0}, + {"NewDecoder", Func, 0}, + {"NewEncoder", Func, 0}, + }, + "encoding/asn1": { + {"(BitString).At", Method, 0}, + {"(BitString).RightAlign", Method, 0}, + {"(ObjectIdentifier).Equal", Method, 0}, + {"(ObjectIdentifier).String", Method, 3}, + {"(StructuralError).Error", Method, 0}, + {"(SyntaxError).Error", Method, 0}, + {"BitString", Type, 0}, + {"BitString.BitLength", Field, 0}, + {"BitString.Bytes", Field, 0}, + {"ClassApplication", Const, 6}, + {"ClassContextSpecific", Const, 6}, + {"ClassPrivate", Const, 6}, + {"ClassUniversal", Const, 6}, + {"Enumerated", Type, 0}, + {"Flag", Type, 0}, + {"Marshal", Func, 0}, + {"MarshalWithParams", Func, 10}, + {"NullBytes", Var, 9}, + {"NullRawValue", Var, 9}, + {"ObjectIdentifier", Type, 0}, + {"RawContent", Type, 0}, + {"RawValue", Type, 0}, + {"RawValue.Bytes", Field, 0}, + {"RawValue.Class", Field, 0}, + {"RawValue.FullBytes", Field, 0}, + {"RawValue.IsCompound", Field, 0}, + {"RawValue.Tag", Field, 0}, + {"StructuralError", Type, 0}, + {"StructuralError.Msg", Field, 0}, + {"SyntaxError", Type, 0}, + {"SyntaxError.Msg", Field, 0}, + {"TagBMPString", Const, 14}, + {"TagBitString", Const, 6}, + {"TagBoolean", Const, 6}, + {"TagEnum", Const, 6}, + {"TagGeneralString", Const, 6}, + {"TagGeneralizedTime", Const, 6}, + {"TagIA5String", Const, 6}, + {"TagInteger", Const, 6}, + {"TagNull", Const, 9}, + {"TagNumericString", Const, 10}, + {"TagOID", Const, 6}, + {"TagOctetString", Const, 6}, + {"TagPrintableString", Const, 6}, + {"TagSequence", Const, 6}, + {"TagSet", Const, 6}, + {"TagT61String", Const, 6}, + {"TagUTCTime", Const, 6}, + {"TagUTF8String", Const, 6}, + {"Unmarshal", Func, 0}, + {"UnmarshalWithParams", Func, 0}, + }, + "encoding/base32": { + {"(*Encoding).AppendDecode", Method, 22}, + {"(*Encoding).AppendEncode", Method, 22}, + {"(*Encoding).Decode", Method, 0}, + {"(*Encoding).DecodeString", Method, 0}, + {"(*Encoding).DecodedLen", Method, 0}, + {"(*Encoding).Encode", Method, 0}, + {"(*Encoding).EncodeToString", Method, 0}, + {"(*Encoding).EncodedLen", Method, 0}, + {"(CorruptInputError).Error", Method, 0}, + {"(Encoding).WithPadding", Method, 9}, + {"CorruptInputError", Type, 0}, + {"Encoding", Type, 0}, + {"HexEncoding", Var, 0}, + {"NewDecoder", Func, 0}, + {"NewEncoder", Func, 0}, + {"NewEncoding", Func, 0}, + {"NoPadding", Const, 9}, + {"StdEncoding", Var, 0}, + {"StdPadding", Const, 9}, + }, + "encoding/base64": { + {"(*Encoding).AppendDecode", Method, 22}, + {"(*Encoding).AppendEncode", Method, 22}, + {"(*Encoding).Decode", Method, 0}, + {"(*Encoding).DecodeString", Method, 0}, + {"(*Encoding).DecodedLen", Method, 0}, + {"(*Encoding).Encode", Method, 0}, + {"(*Encoding).EncodeToString", Method, 0}, + {"(*Encoding).EncodedLen", Method, 0}, + {"(CorruptInputError).Error", Method, 0}, + {"(Encoding).Strict", Method, 8}, + {"(Encoding).WithPadding", Method, 5}, + {"CorruptInputError", Type, 0}, + {"Encoding", Type, 0}, + {"NewDecoder", Func, 0}, + {"NewEncoder", Func, 0}, + {"NewEncoding", Func, 0}, + {"NoPadding", Const, 5}, + {"RawStdEncoding", Var, 5}, + {"RawURLEncoding", Var, 5}, + {"StdEncoding", Var, 0}, + {"StdPadding", Const, 5}, + {"URLEncoding", Var, 0}, + }, + "encoding/binary": { + {"AppendByteOrder", Type, 19}, + {"AppendUvarint", Func, 19}, + {"AppendVarint", Func, 19}, + {"BigEndian", Var, 0}, + {"ByteOrder", Type, 0}, + {"LittleEndian", Var, 0}, + {"MaxVarintLen16", Const, 0}, + {"MaxVarintLen32", Const, 0}, + {"MaxVarintLen64", Const, 0}, + {"NativeEndian", Var, 21}, + {"PutUvarint", Func, 0}, + {"PutVarint", Func, 0}, + {"Read", Func, 0}, + {"ReadUvarint", Func, 0}, + {"ReadVarint", Func, 0}, + {"Size", Func, 0}, + {"Uvarint", Func, 0}, + {"Varint", Func, 0}, + {"Write", Func, 0}, + }, + "encoding/csv": { + {"(*ParseError).Error", Method, 0}, + {"(*ParseError).Unwrap", Method, 13}, + {"(*Reader).FieldPos", Method, 17}, + {"(*Reader).InputOffset", Method, 19}, + {"(*Reader).Read", Method, 0}, + {"(*Reader).ReadAll", Method, 0}, + {"(*Writer).Error", Method, 1}, + {"(*Writer).Flush", Method, 0}, + {"(*Writer).Write", Method, 0}, + {"(*Writer).WriteAll", Method, 0}, + {"ErrBareQuote", Var, 0}, + {"ErrFieldCount", Var, 0}, + {"ErrQuote", Var, 0}, + {"ErrTrailingComma", Var, 0}, + {"NewReader", Func, 0}, + {"NewWriter", Func, 0}, + {"ParseError", Type, 0}, + {"ParseError.Column", Field, 0}, + {"ParseError.Err", Field, 0}, + {"ParseError.Line", Field, 0}, + {"ParseError.StartLine", Field, 10}, + {"Reader", Type, 0}, + {"Reader.Comma", Field, 0}, + {"Reader.Comment", Field, 0}, + {"Reader.FieldsPerRecord", Field, 0}, + {"Reader.LazyQuotes", Field, 0}, + {"Reader.ReuseRecord", Field, 9}, + {"Reader.TrailingComma", Field, 0}, + {"Reader.TrimLeadingSpace", Field, 0}, + {"Writer", Type, 0}, + {"Writer.Comma", Field, 0}, + {"Writer.UseCRLF", Field, 0}, + }, + "encoding/gob": { + {"(*Decoder).Decode", Method, 0}, + {"(*Decoder).DecodeValue", Method, 0}, + {"(*Encoder).Encode", Method, 0}, + {"(*Encoder).EncodeValue", Method, 0}, + {"CommonType", Type, 0}, + {"CommonType.Id", Field, 0}, + {"CommonType.Name", Field, 0}, + {"Decoder", Type, 0}, + {"Encoder", Type, 0}, + {"GobDecoder", Type, 0}, + {"GobEncoder", Type, 0}, + {"NewDecoder", Func, 0}, + {"NewEncoder", Func, 0}, + {"Register", Func, 0}, + {"RegisterName", Func, 0}, + }, + "encoding/hex": { + {"(InvalidByteError).Error", Method, 0}, + {"AppendDecode", Func, 22}, + {"AppendEncode", Func, 22}, + {"Decode", Func, 0}, + {"DecodeString", Func, 0}, + {"DecodedLen", Func, 0}, + {"Dump", Func, 0}, + {"Dumper", Func, 0}, + {"Encode", Func, 0}, + {"EncodeToString", Func, 0}, + {"EncodedLen", Func, 0}, + {"ErrLength", Var, 0}, + {"InvalidByteError", Type, 0}, + {"NewDecoder", Func, 10}, + {"NewEncoder", Func, 10}, + }, + "encoding/json": { + {"(*Decoder).Buffered", Method, 1}, + {"(*Decoder).Decode", Method, 0}, + {"(*Decoder).DisallowUnknownFields", Method, 10}, + {"(*Decoder).InputOffset", Method, 14}, + {"(*Decoder).More", Method, 5}, + {"(*Decoder).Token", Method, 5}, + {"(*Decoder).UseNumber", Method, 1}, + {"(*Encoder).Encode", Method, 0}, + {"(*Encoder).SetEscapeHTML", Method, 7}, + {"(*Encoder).SetIndent", Method, 7}, + {"(*InvalidUTF8Error).Error", Method, 0}, + {"(*InvalidUnmarshalError).Error", Method, 0}, + {"(*MarshalerError).Error", Method, 0}, + {"(*MarshalerError).Unwrap", Method, 13}, + {"(*RawMessage).MarshalJSON", Method, 0}, + {"(*RawMessage).UnmarshalJSON", Method, 0}, + {"(*SyntaxError).Error", Method, 0}, + {"(*UnmarshalFieldError).Error", Method, 0}, + {"(*UnmarshalTypeError).Error", Method, 0}, + {"(*UnsupportedTypeError).Error", Method, 0}, + {"(*UnsupportedValueError).Error", Method, 0}, + {"(Delim).String", Method, 5}, + {"(Number).Float64", Method, 1}, + {"(Number).Int64", Method, 1}, + {"(Number).String", Method, 1}, + {"(RawMessage).MarshalJSON", Method, 8}, + {"Compact", Func, 0}, + {"Decoder", Type, 0}, + {"Delim", Type, 5}, + {"Encoder", Type, 0}, + {"HTMLEscape", Func, 0}, + {"Indent", Func, 0}, + {"InvalidUTF8Error", Type, 0}, + {"InvalidUTF8Error.S", Field, 0}, + {"InvalidUnmarshalError", Type, 0}, + {"InvalidUnmarshalError.Type", Field, 0}, + {"Marshal", Func, 0}, + {"MarshalIndent", Func, 0}, + {"Marshaler", Type, 0}, + {"MarshalerError", Type, 0}, + {"MarshalerError.Err", Field, 0}, + {"MarshalerError.Type", Field, 0}, + {"NewDecoder", Func, 0}, + {"NewEncoder", Func, 0}, + {"Number", Type, 1}, + {"RawMessage", Type, 0}, + {"SyntaxError", Type, 0}, + {"SyntaxError.Offset", Field, 0}, + {"Token", Type, 5}, + {"Unmarshal", Func, 0}, + {"UnmarshalFieldError", Type, 0}, + {"UnmarshalFieldError.Field", Field, 0}, + {"UnmarshalFieldError.Key", Field, 0}, + {"UnmarshalFieldError.Type", Field, 0}, + {"UnmarshalTypeError", Type, 0}, + {"UnmarshalTypeError.Field", Field, 8}, + {"UnmarshalTypeError.Offset", Field, 5}, + {"UnmarshalTypeError.Struct", Field, 8}, + {"UnmarshalTypeError.Type", Field, 0}, + {"UnmarshalTypeError.Value", Field, 0}, + {"Unmarshaler", Type, 0}, + {"UnsupportedTypeError", Type, 0}, + {"UnsupportedTypeError.Type", Field, 0}, + {"UnsupportedValueError", Type, 0}, + {"UnsupportedValueError.Str", Field, 0}, + {"UnsupportedValueError.Value", Field, 0}, + {"Valid", Func, 9}, + }, + "encoding/pem": { + {"Block", Type, 0}, + {"Block.Bytes", Field, 0}, + {"Block.Headers", Field, 0}, + {"Block.Type", Field, 0}, + {"Decode", Func, 0}, + {"Encode", Func, 0}, + {"EncodeToMemory", Func, 0}, + }, + "encoding/xml": { + {"(*Decoder).Decode", Method, 0}, + {"(*Decoder).DecodeElement", Method, 0}, + {"(*Decoder).InputOffset", Method, 4}, + {"(*Decoder).InputPos", Method, 19}, + {"(*Decoder).RawToken", Method, 0}, + {"(*Decoder).Skip", Method, 0}, + {"(*Decoder).Token", Method, 0}, + {"(*Encoder).Close", Method, 20}, + {"(*Encoder).Encode", Method, 0}, + {"(*Encoder).EncodeElement", Method, 2}, + {"(*Encoder).EncodeToken", Method, 2}, + {"(*Encoder).Flush", Method, 2}, + {"(*Encoder).Indent", Method, 1}, + {"(*SyntaxError).Error", Method, 0}, + {"(*TagPathError).Error", Method, 0}, + {"(*UnsupportedTypeError).Error", Method, 0}, + {"(CharData).Copy", Method, 0}, + {"(Comment).Copy", Method, 0}, + {"(Directive).Copy", Method, 0}, + {"(ProcInst).Copy", Method, 0}, + {"(StartElement).Copy", Method, 0}, + {"(StartElement).End", Method, 2}, + {"(UnmarshalError).Error", Method, 0}, + {"Attr", Type, 0}, + {"Attr.Name", Field, 0}, + {"Attr.Value", Field, 0}, + {"CharData", Type, 0}, + {"Comment", Type, 0}, + {"CopyToken", Func, 0}, + {"Decoder", Type, 0}, + {"Decoder.AutoClose", Field, 0}, + {"Decoder.CharsetReader", Field, 0}, + {"Decoder.DefaultSpace", Field, 1}, + {"Decoder.Entity", Field, 0}, + {"Decoder.Strict", Field, 0}, + {"Directive", Type, 0}, + {"Encoder", Type, 0}, + {"EndElement", Type, 0}, + {"EndElement.Name", Field, 0}, + {"Escape", Func, 0}, + {"EscapeText", Func, 1}, + {"HTMLAutoClose", Var, 0}, + {"HTMLEntity", Var, 0}, + {"Header", Const, 0}, + {"Marshal", Func, 0}, + {"MarshalIndent", Func, 0}, + {"Marshaler", Type, 2}, + {"MarshalerAttr", Type, 2}, + {"Name", Type, 0}, + {"Name.Local", Field, 0}, + {"Name.Space", Field, 0}, + {"NewDecoder", Func, 0}, + {"NewEncoder", Func, 0}, + {"NewTokenDecoder", Func, 10}, + {"ProcInst", Type, 0}, + {"ProcInst.Inst", Field, 0}, + {"ProcInst.Target", Field, 0}, + {"StartElement", Type, 0}, + {"StartElement.Attr", Field, 0}, + {"StartElement.Name", Field, 0}, + {"SyntaxError", Type, 0}, + {"SyntaxError.Line", Field, 0}, + {"SyntaxError.Msg", Field, 0}, + {"TagPathError", Type, 0}, + {"TagPathError.Field1", Field, 0}, + {"TagPathError.Field2", Field, 0}, + {"TagPathError.Struct", Field, 0}, + {"TagPathError.Tag1", Field, 0}, + {"TagPathError.Tag2", Field, 0}, + {"Token", Type, 0}, + {"TokenReader", Type, 10}, + {"Unmarshal", Func, 0}, + {"UnmarshalError", Type, 0}, + {"Unmarshaler", Type, 2}, + {"UnmarshalerAttr", Type, 2}, + {"UnsupportedTypeError", Type, 0}, + {"UnsupportedTypeError.Type", Field, 0}, + }, + "errors": { + {"As", Func, 13}, + {"ErrUnsupported", Var, 21}, + {"Is", Func, 13}, + {"Join", Func, 20}, + {"New", Func, 0}, + {"Unwrap", Func, 13}, + }, + "expvar": { + {"(*Float).Add", Method, 0}, + {"(*Float).Set", Method, 0}, + {"(*Float).String", Method, 0}, + {"(*Float).Value", Method, 8}, + {"(*Int).Add", Method, 0}, + {"(*Int).Set", Method, 0}, + {"(*Int).String", Method, 0}, + {"(*Int).Value", Method, 8}, + {"(*Map).Add", Method, 0}, + {"(*Map).AddFloat", Method, 0}, + {"(*Map).Delete", Method, 12}, + {"(*Map).Do", Method, 0}, + {"(*Map).Get", Method, 0}, + {"(*Map).Init", Method, 0}, + {"(*Map).Set", Method, 0}, + {"(*Map).String", Method, 0}, + {"(*String).Set", Method, 0}, + {"(*String).String", Method, 0}, + {"(*String).Value", Method, 8}, + {"(Func).String", Method, 0}, + {"(Func).Value", Method, 8}, + {"Do", Func, 0}, + {"Float", Type, 0}, + {"Func", Type, 0}, + {"Get", Func, 0}, + {"Handler", Func, 8}, + {"Int", Type, 0}, + {"KeyValue", Type, 0}, + {"KeyValue.Key", Field, 0}, + {"KeyValue.Value", Field, 0}, + {"Map", Type, 0}, + {"NewFloat", Func, 0}, + {"NewInt", Func, 0}, + {"NewMap", Func, 0}, + {"NewString", Func, 0}, + {"Publish", Func, 0}, + {"String", Type, 0}, + {"Var", Type, 0}, + }, + "flag": { + {"(*FlagSet).Arg", Method, 0}, + {"(*FlagSet).Args", Method, 0}, + {"(*FlagSet).Bool", Method, 0}, + {"(*FlagSet).BoolFunc", Method, 21}, + {"(*FlagSet).BoolVar", Method, 0}, + {"(*FlagSet).Duration", Method, 0}, + {"(*FlagSet).DurationVar", Method, 0}, + {"(*FlagSet).ErrorHandling", Method, 10}, + {"(*FlagSet).Float64", Method, 0}, + {"(*FlagSet).Float64Var", Method, 0}, + {"(*FlagSet).Func", Method, 16}, + {"(*FlagSet).Init", Method, 0}, + {"(*FlagSet).Int", Method, 0}, + {"(*FlagSet).Int64", Method, 0}, + {"(*FlagSet).Int64Var", Method, 0}, + {"(*FlagSet).IntVar", Method, 0}, + {"(*FlagSet).Lookup", Method, 0}, + {"(*FlagSet).NArg", Method, 0}, + {"(*FlagSet).NFlag", Method, 0}, + {"(*FlagSet).Name", Method, 10}, + {"(*FlagSet).Output", Method, 10}, + {"(*FlagSet).Parse", Method, 0}, + {"(*FlagSet).Parsed", Method, 0}, + {"(*FlagSet).PrintDefaults", Method, 0}, + {"(*FlagSet).Set", Method, 0}, + {"(*FlagSet).SetOutput", Method, 0}, + {"(*FlagSet).String", Method, 0}, + {"(*FlagSet).StringVar", Method, 0}, + {"(*FlagSet).TextVar", Method, 19}, + {"(*FlagSet).Uint", Method, 0}, + {"(*FlagSet).Uint64", Method, 0}, + {"(*FlagSet).Uint64Var", Method, 0}, + {"(*FlagSet).UintVar", Method, 0}, + {"(*FlagSet).Var", Method, 0}, + {"(*FlagSet).Visit", Method, 0}, + {"(*FlagSet).VisitAll", Method, 0}, + {"Arg", Func, 0}, + {"Args", Func, 0}, + {"Bool", Func, 0}, + {"BoolFunc", Func, 21}, + {"BoolVar", Func, 0}, + {"CommandLine", Var, 2}, + {"ContinueOnError", Const, 0}, + {"Duration", Func, 0}, + {"DurationVar", Func, 0}, + {"ErrHelp", Var, 0}, + {"ErrorHandling", Type, 0}, + {"ExitOnError", Const, 0}, + {"Flag", Type, 0}, + {"Flag.DefValue", Field, 0}, + {"Flag.Name", Field, 0}, + {"Flag.Usage", Field, 0}, + {"Flag.Value", Field, 0}, + {"FlagSet", Type, 0}, + {"FlagSet.Usage", Field, 0}, + {"Float64", Func, 0}, + {"Float64Var", Func, 0}, + {"Func", Func, 16}, + {"Getter", Type, 2}, + {"Int", Func, 0}, + {"Int64", Func, 0}, + {"Int64Var", Func, 0}, + {"IntVar", Func, 0}, + {"Lookup", Func, 0}, + {"NArg", Func, 0}, + {"NFlag", Func, 0}, + {"NewFlagSet", Func, 0}, + {"PanicOnError", Const, 0}, + {"Parse", Func, 0}, + {"Parsed", Func, 0}, + {"PrintDefaults", Func, 0}, + {"Set", Func, 0}, + {"String", Func, 0}, + {"StringVar", Func, 0}, + {"TextVar", Func, 19}, + {"Uint", Func, 0}, + {"Uint64", Func, 0}, + {"Uint64Var", Func, 0}, + {"UintVar", Func, 0}, + {"UnquoteUsage", Func, 5}, + {"Usage", Var, 0}, + {"Value", Type, 0}, + {"Var", Func, 0}, + {"Visit", Func, 0}, + {"VisitAll", Func, 0}, + }, + "fmt": { + {"Append", Func, 19}, + {"Appendf", Func, 19}, + {"Appendln", Func, 19}, + {"Errorf", Func, 0}, + {"FormatString", Func, 20}, + {"Formatter", Type, 0}, + {"Fprint", Func, 0}, + {"Fprintf", Func, 0}, + {"Fprintln", Func, 0}, + {"Fscan", Func, 0}, + {"Fscanf", Func, 0}, + {"Fscanln", Func, 0}, + {"GoStringer", Type, 0}, + {"Print", Func, 0}, + {"Printf", Func, 0}, + {"Println", Func, 0}, + {"Scan", Func, 0}, + {"ScanState", Type, 0}, + {"Scanf", Func, 0}, + {"Scanln", Func, 0}, + {"Scanner", Type, 0}, + {"Sprint", Func, 0}, + {"Sprintf", Func, 0}, + {"Sprintln", Func, 0}, + {"Sscan", Func, 0}, + {"Sscanf", Func, 0}, + {"Sscanln", Func, 0}, + {"State", Type, 0}, + {"Stringer", Type, 0}, + }, + "go/ast": { + {"(*ArrayType).End", Method, 0}, + {"(*ArrayType).Pos", Method, 0}, + {"(*AssignStmt).End", Method, 0}, + {"(*AssignStmt).Pos", Method, 0}, + {"(*BadDecl).End", Method, 0}, + {"(*BadDecl).Pos", Method, 0}, + {"(*BadExpr).End", Method, 0}, + {"(*BadExpr).Pos", Method, 0}, + {"(*BadStmt).End", Method, 0}, + {"(*BadStmt).Pos", Method, 0}, + {"(*BasicLit).End", Method, 0}, + {"(*BasicLit).Pos", Method, 0}, + {"(*BinaryExpr).End", Method, 0}, + {"(*BinaryExpr).Pos", Method, 0}, + {"(*BlockStmt).End", Method, 0}, + {"(*BlockStmt).Pos", Method, 0}, + {"(*BranchStmt).End", Method, 0}, + {"(*BranchStmt).Pos", Method, 0}, + {"(*CallExpr).End", Method, 0}, + {"(*CallExpr).Pos", Method, 0}, + {"(*CaseClause).End", Method, 0}, + {"(*CaseClause).Pos", Method, 0}, + {"(*ChanType).End", Method, 0}, + {"(*ChanType).Pos", Method, 0}, + {"(*CommClause).End", Method, 0}, + {"(*CommClause).Pos", Method, 0}, + {"(*Comment).End", Method, 0}, + {"(*Comment).Pos", Method, 0}, + {"(*CommentGroup).End", Method, 0}, + {"(*CommentGroup).Pos", Method, 0}, + {"(*CommentGroup).Text", Method, 0}, + {"(*CompositeLit).End", Method, 0}, + {"(*CompositeLit).Pos", Method, 0}, + {"(*DeclStmt).End", Method, 0}, + {"(*DeclStmt).Pos", Method, 0}, + {"(*DeferStmt).End", Method, 0}, + {"(*DeferStmt).Pos", Method, 0}, + {"(*Ellipsis).End", Method, 0}, + {"(*Ellipsis).Pos", Method, 0}, + {"(*EmptyStmt).End", Method, 0}, + {"(*EmptyStmt).Pos", Method, 0}, + {"(*ExprStmt).End", Method, 0}, + {"(*ExprStmt).Pos", Method, 0}, + {"(*Field).End", Method, 0}, + {"(*Field).Pos", Method, 0}, + {"(*FieldList).End", Method, 0}, + {"(*FieldList).NumFields", Method, 0}, + {"(*FieldList).Pos", Method, 0}, + {"(*File).End", Method, 0}, + {"(*File).Pos", Method, 0}, + {"(*ForStmt).End", Method, 0}, + {"(*ForStmt).Pos", Method, 0}, + {"(*FuncDecl).End", Method, 0}, + {"(*FuncDecl).Pos", Method, 0}, + {"(*FuncLit).End", Method, 0}, + {"(*FuncLit).Pos", Method, 0}, + {"(*FuncType).End", Method, 0}, + {"(*FuncType).Pos", Method, 0}, + {"(*GenDecl).End", Method, 0}, + {"(*GenDecl).Pos", Method, 0}, + {"(*GoStmt).End", Method, 0}, + {"(*GoStmt).Pos", Method, 0}, + {"(*Ident).End", Method, 0}, + {"(*Ident).IsExported", Method, 0}, + {"(*Ident).Pos", Method, 0}, + {"(*Ident).String", Method, 0}, + {"(*IfStmt).End", Method, 0}, + {"(*IfStmt).Pos", Method, 0}, + {"(*ImportSpec).End", Method, 0}, + {"(*ImportSpec).Pos", Method, 0}, + {"(*IncDecStmt).End", Method, 0}, + {"(*IncDecStmt).Pos", Method, 0}, + {"(*IndexExpr).End", Method, 0}, + {"(*IndexExpr).Pos", Method, 0}, + {"(*IndexListExpr).End", Method, 18}, + {"(*IndexListExpr).Pos", Method, 18}, + {"(*InterfaceType).End", Method, 0}, + {"(*InterfaceType).Pos", Method, 0}, + {"(*KeyValueExpr).End", Method, 0}, + {"(*KeyValueExpr).Pos", Method, 0}, + {"(*LabeledStmt).End", Method, 0}, + {"(*LabeledStmt).Pos", Method, 0}, + {"(*MapType).End", Method, 0}, + {"(*MapType).Pos", Method, 0}, + {"(*Object).Pos", Method, 0}, + {"(*Package).End", Method, 0}, + {"(*Package).Pos", Method, 0}, + {"(*ParenExpr).End", Method, 0}, + {"(*ParenExpr).Pos", Method, 0}, + {"(*RangeStmt).End", Method, 0}, + {"(*RangeStmt).Pos", Method, 0}, + {"(*ReturnStmt).End", Method, 0}, + {"(*ReturnStmt).Pos", Method, 0}, + {"(*Scope).Insert", Method, 0}, + {"(*Scope).Lookup", Method, 0}, + {"(*Scope).String", Method, 0}, + {"(*SelectStmt).End", Method, 0}, + {"(*SelectStmt).Pos", Method, 0}, + {"(*SelectorExpr).End", Method, 0}, + {"(*SelectorExpr).Pos", Method, 0}, + {"(*SendStmt).End", Method, 0}, + {"(*SendStmt).Pos", Method, 0}, + {"(*SliceExpr).End", Method, 0}, + {"(*SliceExpr).Pos", Method, 0}, + {"(*StarExpr).End", Method, 0}, + {"(*StarExpr).Pos", Method, 0}, + {"(*StructType).End", Method, 0}, + {"(*StructType).Pos", Method, 0}, + {"(*SwitchStmt).End", Method, 0}, + {"(*SwitchStmt).Pos", Method, 0}, + {"(*TypeAssertExpr).End", Method, 0}, + {"(*TypeAssertExpr).Pos", Method, 0}, + {"(*TypeSpec).End", Method, 0}, + {"(*TypeSpec).Pos", Method, 0}, + {"(*TypeSwitchStmt).End", Method, 0}, + {"(*TypeSwitchStmt).Pos", Method, 0}, + {"(*UnaryExpr).End", Method, 0}, + {"(*UnaryExpr).Pos", Method, 0}, + {"(*ValueSpec).End", Method, 0}, + {"(*ValueSpec).Pos", Method, 0}, + {"(CommentMap).Comments", Method, 1}, + {"(CommentMap).Filter", Method, 1}, + {"(CommentMap).String", Method, 1}, + {"(CommentMap).Update", Method, 1}, + {"(ObjKind).String", Method, 0}, + {"ArrayType", Type, 0}, + {"ArrayType.Elt", Field, 0}, + {"ArrayType.Lbrack", Field, 0}, + {"ArrayType.Len", Field, 0}, + {"AssignStmt", Type, 0}, + {"AssignStmt.Lhs", Field, 0}, + {"AssignStmt.Rhs", Field, 0}, + {"AssignStmt.Tok", Field, 0}, + {"AssignStmt.TokPos", Field, 0}, + {"Bad", Const, 0}, + {"BadDecl", Type, 0}, + {"BadDecl.From", Field, 0}, + {"BadDecl.To", Field, 0}, + {"BadExpr", Type, 0}, + {"BadExpr.From", Field, 0}, + {"BadExpr.To", Field, 0}, + {"BadStmt", Type, 0}, + {"BadStmt.From", Field, 0}, + {"BadStmt.To", Field, 0}, + {"BasicLit", Type, 0}, + {"BasicLit.Kind", Field, 0}, + {"BasicLit.Value", Field, 0}, + {"BasicLit.ValuePos", Field, 0}, + {"BinaryExpr", Type, 0}, + {"BinaryExpr.Op", Field, 0}, + {"BinaryExpr.OpPos", Field, 0}, + {"BinaryExpr.X", Field, 0}, + {"BinaryExpr.Y", Field, 0}, + {"BlockStmt", Type, 0}, + {"BlockStmt.Lbrace", Field, 0}, + {"BlockStmt.List", Field, 0}, + {"BlockStmt.Rbrace", Field, 0}, + {"BranchStmt", Type, 0}, + {"BranchStmt.Label", Field, 0}, + {"BranchStmt.Tok", Field, 0}, + {"BranchStmt.TokPos", Field, 0}, + {"CallExpr", Type, 0}, + {"CallExpr.Args", Field, 0}, + {"CallExpr.Ellipsis", Field, 0}, + {"CallExpr.Fun", Field, 0}, + {"CallExpr.Lparen", Field, 0}, + {"CallExpr.Rparen", Field, 0}, + {"CaseClause", Type, 0}, + {"CaseClause.Body", Field, 0}, + {"CaseClause.Case", Field, 0}, + {"CaseClause.Colon", Field, 0}, + {"CaseClause.List", Field, 0}, + {"ChanDir", Type, 0}, + {"ChanType", Type, 0}, + {"ChanType.Arrow", Field, 1}, + {"ChanType.Begin", Field, 0}, + {"ChanType.Dir", Field, 0}, + {"ChanType.Value", Field, 0}, + {"CommClause", Type, 0}, + {"CommClause.Body", Field, 0}, + {"CommClause.Case", Field, 0}, + {"CommClause.Colon", Field, 0}, + {"CommClause.Comm", Field, 0}, + {"Comment", Type, 0}, + {"Comment.Slash", Field, 0}, + {"Comment.Text", Field, 0}, + {"CommentGroup", Type, 0}, + {"CommentGroup.List", Field, 0}, + {"CommentMap", Type, 1}, + {"CompositeLit", Type, 0}, + {"CompositeLit.Elts", Field, 0}, + {"CompositeLit.Incomplete", Field, 11}, + {"CompositeLit.Lbrace", Field, 0}, + {"CompositeLit.Rbrace", Field, 0}, + {"CompositeLit.Type", Field, 0}, + {"Con", Const, 0}, + {"Decl", Type, 0}, + {"DeclStmt", Type, 0}, + {"DeclStmt.Decl", Field, 0}, + {"DeferStmt", Type, 0}, + {"DeferStmt.Call", Field, 0}, + {"DeferStmt.Defer", Field, 0}, + {"Ellipsis", Type, 0}, + {"Ellipsis.Ellipsis", Field, 0}, + {"Ellipsis.Elt", Field, 0}, + {"EmptyStmt", Type, 0}, + {"EmptyStmt.Implicit", Field, 5}, + {"EmptyStmt.Semicolon", Field, 0}, + {"Expr", Type, 0}, + {"ExprStmt", Type, 0}, + {"ExprStmt.X", Field, 0}, + {"Field", Type, 0}, + {"Field.Comment", Field, 0}, + {"Field.Doc", Field, 0}, + {"Field.Names", Field, 0}, + {"Field.Tag", Field, 0}, + {"Field.Type", Field, 0}, + {"FieldFilter", Type, 0}, + {"FieldList", Type, 0}, + {"FieldList.Closing", Field, 0}, + {"FieldList.List", Field, 0}, + {"FieldList.Opening", Field, 0}, + {"File", Type, 0}, + {"File.Comments", Field, 0}, + {"File.Decls", Field, 0}, + {"File.Doc", Field, 0}, + {"File.FileEnd", Field, 20}, + {"File.FileStart", Field, 20}, + {"File.GoVersion", Field, 21}, + {"File.Imports", Field, 0}, + {"File.Name", Field, 0}, + {"File.Package", Field, 0}, + {"File.Scope", Field, 0}, + {"File.Unresolved", Field, 0}, + {"FileExports", Func, 0}, + {"Filter", Type, 0}, + {"FilterDecl", Func, 0}, + {"FilterFile", Func, 0}, + {"FilterFuncDuplicates", Const, 0}, + {"FilterImportDuplicates", Const, 0}, + {"FilterPackage", Func, 0}, + {"FilterUnassociatedComments", Const, 0}, + {"ForStmt", Type, 0}, + {"ForStmt.Body", Field, 0}, + {"ForStmt.Cond", Field, 0}, + {"ForStmt.For", Field, 0}, + {"ForStmt.Init", Field, 0}, + {"ForStmt.Post", Field, 0}, + {"Fprint", Func, 0}, + {"Fun", Const, 0}, + {"FuncDecl", Type, 0}, + {"FuncDecl.Body", Field, 0}, + {"FuncDecl.Doc", Field, 0}, + {"FuncDecl.Name", Field, 0}, + {"FuncDecl.Recv", Field, 0}, + {"FuncDecl.Type", Field, 0}, + {"FuncLit", Type, 0}, + {"FuncLit.Body", Field, 0}, + {"FuncLit.Type", Field, 0}, + {"FuncType", Type, 0}, + {"FuncType.Func", Field, 0}, + {"FuncType.Params", Field, 0}, + {"FuncType.Results", Field, 0}, + {"FuncType.TypeParams", Field, 18}, + {"GenDecl", Type, 0}, + {"GenDecl.Doc", Field, 0}, + {"GenDecl.Lparen", Field, 0}, + {"GenDecl.Rparen", Field, 0}, + {"GenDecl.Specs", Field, 0}, + {"GenDecl.Tok", Field, 0}, + {"GenDecl.TokPos", Field, 0}, + {"GoStmt", Type, 0}, + {"GoStmt.Call", Field, 0}, + {"GoStmt.Go", Field, 0}, + {"Ident", Type, 0}, + {"Ident.Name", Field, 0}, + {"Ident.NamePos", Field, 0}, + {"Ident.Obj", Field, 0}, + {"IfStmt", Type, 0}, + {"IfStmt.Body", Field, 0}, + {"IfStmt.Cond", Field, 0}, + {"IfStmt.Else", Field, 0}, + {"IfStmt.If", Field, 0}, + {"IfStmt.Init", Field, 0}, + {"ImportSpec", Type, 0}, + {"ImportSpec.Comment", Field, 0}, + {"ImportSpec.Doc", Field, 0}, + {"ImportSpec.EndPos", Field, 0}, + {"ImportSpec.Name", Field, 0}, + {"ImportSpec.Path", Field, 0}, + {"Importer", Type, 0}, + {"IncDecStmt", Type, 0}, + {"IncDecStmt.Tok", Field, 0}, + {"IncDecStmt.TokPos", Field, 0}, + {"IncDecStmt.X", Field, 0}, + {"IndexExpr", Type, 0}, + {"IndexExpr.Index", Field, 0}, + {"IndexExpr.Lbrack", Field, 0}, + {"IndexExpr.Rbrack", Field, 0}, + {"IndexExpr.X", Field, 0}, + {"IndexListExpr", Type, 18}, + {"IndexListExpr.Indices", Field, 18}, + {"IndexListExpr.Lbrack", Field, 18}, + {"IndexListExpr.Rbrack", Field, 18}, + {"IndexListExpr.X", Field, 18}, + {"Inspect", Func, 0}, + {"InterfaceType", Type, 0}, + {"InterfaceType.Incomplete", Field, 0}, + {"InterfaceType.Interface", Field, 0}, + {"InterfaceType.Methods", Field, 0}, + {"IsExported", Func, 0}, + {"IsGenerated", Func, 21}, + {"KeyValueExpr", Type, 0}, + {"KeyValueExpr.Colon", Field, 0}, + {"KeyValueExpr.Key", Field, 0}, + {"KeyValueExpr.Value", Field, 0}, + {"LabeledStmt", Type, 0}, + {"LabeledStmt.Colon", Field, 0}, + {"LabeledStmt.Label", Field, 0}, + {"LabeledStmt.Stmt", Field, 0}, + {"Lbl", Const, 0}, + {"MapType", Type, 0}, + {"MapType.Key", Field, 0}, + {"MapType.Map", Field, 0}, + {"MapType.Value", Field, 0}, + {"MergeMode", Type, 0}, + {"MergePackageFiles", Func, 0}, + {"NewCommentMap", Func, 1}, + {"NewIdent", Func, 0}, + {"NewObj", Func, 0}, + {"NewPackage", Func, 0}, + {"NewScope", Func, 0}, + {"Node", Type, 0}, + {"NotNilFilter", Func, 0}, + {"ObjKind", Type, 0}, + {"Object", Type, 0}, + {"Object.Data", Field, 0}, + {"Object.Decl", Field, 0}, + {"Object.Kind", Field, 0}, + {"Object.Name", Field, 0}, + {"Object.Type", Field, 0}, + {"Package", Type, 0}, + {"Package.Files", Field, 0}, + {"Package.Imports", Field, 0}, + {"Package.Name", Field, 0}, + {"Package.Scope", Field, 0}, + {"PackageExports", Func, 0}, + {"ParenExpr", Type, 0}, + {"ParenExpr.Lparen", Field, 0}, + {"ParenExpr.Rparen", Field, 0}, + {"ParenExpr.X", Field, 0}, + {"Pkg", Const, 0}, + {"Print", Func, 0}, + {"RECV", Const, 0}, + {"RangeStmt", Type, 0}, + {"RangeStmt.Body", Field, 0}, + {"RangeStmt.For", Field, 0}, + {"RangeStmt.Key", Field, 0}, + {"RangeStmt.Range", Field, 20}, + {"RangeStmt.Tok", Field, 0}, + {"RangeStmt.TokPos", Field, 0}, + {"RangeStmt.Value", Field, 0}, + {"RangeStmt.X", Field, 0}, + {"ReturnStmt", Type, 0}, + {"ReturnStmt.Results", Field, 0}, + {"ReturnStmt.Return", Field, 0}, + {"SEND", Const, 0}, + {"Scope", Type, 0}, + {"Scope.Objects", Field, 0}, + {"Scope.Outer", Field, 0}, + {"SelectStmt", Type, 0}, + {"SelectStmt.Body", Field, 0}, + {"SelectStmt.Select", Field, 0}, + {"SelectorExpr", Type, 0}, + {"SelectorExpr.Sel", Field, 0}, + {"SelectorExpr.X", Field, 0}, + {"SendStmt", Type, 0}, + {"SendStmt.Arrow", Field, 0}, + {"SendStmt.Chan", Field, 0}, + {"SendStmt.Value", Field, 0}, + {"SliceExpr", Type, 0}, + {"SliceExpr.High", Field, 0}, + {"SliceExpr.Lbrack", Field, 0}, + {"SliceExpr.Low", Field, 0}, + {"SliceExpr.Max", Field, 2}, + {"SliceExpr.Rbrack", Field, 0}, + {"SliceExpr.Slice3", Field, 2}, + {"SliceExpr.X", Field, 0}, + {"SortImports", Func, 0}, + {"Spec", Type, 0}, + {"StarExpr", Type, 0}, + {"StarExpr.Star", Field, 0}, + {"StarExpr.X", Field, 0}, + {"Stmt", Type, 0}, + {"StructType", Type, 0}, + {"StructType.Fields", Field, 0}, + {"StructType.Incomplete", Field, 0}, + {"StructType.Struct", Field, 0}, + {"SwitchStmt", Type, 0}, + {"SwitchStmt.Body", Field, 0}, + {"SwitchStmt.Init", Field, 0}, + {"SwitchStmt.Switch", Field, 0}, + {"SwitchStmt.Tag", Field, 0}, + {"Typ", Const, 0}, + {"TypeAssertExpr", Type, 0}, + {"TypeAssertExpr.Lparen", Field, 2}, + {"TypeAssertExpr.Rparen", Field, 2}, + {"TypeAssertExpr.Type", Field, 0}, + {"TypeAssertExpr.X", Field, 0}, + {"TypeSpec", Type, 0}, + {"TypeSpec.Assign", Field, 9}, + {"TypeSpec.Comment", Field, 0}, + {"TypeSpec.Doc", Field, 0}, + {"TypeSpec.Name", Field, 0}, + {"TypeSpec.Type", Field, 0}, + {"TypeSpec.TypeParams", Field, 18}, + {"TypeSwitchStmt", Type, 0}, + {"TypeSwitchStmt.Assign", Field, 0}, + {"TypeSwitchStmt.Body", Field, 0}, + {"TypeSwitchStmt.Init", Field, 0}, + {"TypeSwitchStmt.Switch", Field, 0}, + {"UnaryExpr", Type, 0}, + {"UnaryExpr.Op", Field, 0}, + {"UnaryExpr.OpPos", Field, 0}, + {"UnaryExpr.X", Field, 0}, + {"Unparen", Func, 22}, + {"ValueSpec", Type, 0}, + {"ValueSpec.Comment", Field, 0}, + {"ValueSpec.Doc", Field, 0}, + {"ValueSpec.Names", Field, 0}, + {"ValueSpec.Type", Field, 0}, + {"ValueSpec.Values", Field, 0}, + {"Var", Const, 0}, + {"Visitor", Type, 0}, + {"Walk", Func, 0}, + }, + "go/build": { + {"(*Context).Import", Method, 0}, + {"(*Context).ImportDir", Method, 0}, + {"(*Context).MatchFile", Method, 2}, + {"(*Context).SrcDirs", Method, 0}, + {"(*MultiplePackageError).Error", Method, 4}, + {"(*NoGoError).Error", Method, 0}, + {"(*Package).IsCommand", Method, 0}, + {"AllowBinary", Const, 0}, + {"ArchChar", Func, 0}, + {"Context", Type, 0}, + {"Context.BuildTags", Field, 0}, + {"Context.CgoEnabled", Field, 0}, + {"Context.Compiler", Field, 0}, + {"Context.Dir", Field, 14}, + {"Context.GOARCH", Field, 0}, + {"Context.GOOS", Field, 0}, + {"Context.GOPATH", Field, 0}, + {"Context.GOROOT", Field, 0}, + {"Context.HasSubdir", Field, 0}, + {"Context.InstallSuffix", Field, 1}, + {"Context.IsAbsPath", Field, 0}, + {"Context.IsDir", Field, 0}, + {"Context.JoinPath", Field, 0}, + {"Context.OpenFile", Field, 0}, + {"Context.ReadDir", Field, 0}, + {"Context.ReleaseTags", Field, 1}, + {"Context.SplitPathList", Field, 0}, + {"Context.ToolTags", Field, 17}, + {"Context.UseAllFiles", Field, 0}, + {"Default", Var, 0}, + {"Directive", Type, 21}, + {"Directive.Pos", Field, 21}, + {"Directive.Text", Field, 21}, + {"FindOnly", Const, 0}, + {"IgnoreVendor", Const, 6}, + {"Import", Func, 0}, + {"ImportComment", Const, 4}, + {"ImportDir", Func, 0}, + {"ImportMode", Type, 0}, + {"IsLocalImport", Func, 0}, + {"MultiplePackageError", Type, 4}, + {"MultiplePackageError.Dir", Field, 4}, + {"MultiplePackageError.Files", Field, 4}, + {"MultiplePackageError.Packages", Field, 4}, + {"NoGoError", Type, 0}, + {"NoGoError.Dir", Field, 0}, + {"Package", Type, 0}, + {"Package.AllTags", Field, 2}, + {"Package.BinDir", Field, 0}, + {"Package.BinaryOnly", Field, 7}, + {"Package.CFiles", Field, 0}, + {"Package.CXXFiles", Field, 2}, + {"Package.CgoCFLAGS", Field, 0}, + {"Package.CgoCPPFLAGS", Field, 2}, + {"Package.CgoCXXFLAGS", Field, 2}, + {"Package.CgoFFLAGS", Field, 7}, + {"Package.CgoFiles", Field, 0}, + {"Package.CgoLDFLAGS", Field, 0}, + {"Package.CgoPkgConfig", Field, 0}, + {"Package.ConflictDir", Field, 2}, + {"Package.Dir", Field, 0}, + {"Package.Directives", Field, 21}, + {"Package.Doc", Field, 0}, + {"Package.EmbedPatternPos", Field, 16}, + {"Package.EmbedPatterns", Field, 16}, + {"Package.FFiles", Field, 7}, + {"Package.GoFiles", Field, 0}, + {"Package.Goroot", Field, 0}, + {"Package.HFiles", Field, 0}, + {"Package.IgnoredGoFiles", Field, 1}, + {"Package.IgnoredOtherFiles", Field, 16}, + {"Package.ImportComment", Field, 4}, + {"Package.ImportPath", Field, 0}, + {"Package.ImportPos", Field, 0}, + {"Package.Imports", Field, 0}, + {"Package.InvalidGoFiles", Field, 6}, + {"Package.MFiles", Field, 3}, + {"Package.Name", Field, 0}, + {"Package.PkgObj", Field, 0}, + {"Package.PkgRoot", Field, 0}, + {"Package.PkgTargetRoot", Field, 5}, + {"Package.Root", Field, 0}, + {"Package.SFiles", Field, 0}, + {"Package.SrcRoot", Field, 0}, + {"Package.SwigCXXFiles", Field, 1}, + {"Package.SwigFiles", Field, 1}, + {"Package.SysoFiles", Field, 0}, + {"Package.TestDirectives", Field, 21}, + {"Package.TestEmbedPatternPos", Field, 16}, + {"Package.TestEmbedPatterns", Field, 16}, + {"Package.TestGoFiles", Field, 0}, + {"Package.TestImportPos", Field, 0}, + {"Package.TestImports", Field, 0}, + {"Package.XTestDirectives", Field, 21}, + {"Package.XTestEmbedPatternPos", Field, 16}, + {"Package.XTestEmbedPatterns", Field, 16}, + {"Package.XTestGoFiles", Field, 0}, + {"Package.XTestImportPos", Field, 0}, + {"Package.XTestImports", Field, 0}, + {"ToolDir", Var, 0}, + }, + "go/build/constraint": { + {"(*AndExpr).Eval", Method, 16}, + {"(*AndExpr).String", Method, 16}, + {"(*NotExpr).Eval", Method, 16}, + {"(*NotExpr).String", Method, 16}, + {"(*OrExpr).Eval", Method, 16}, + {"(*OrExpr).String", Method, 16}, + {"(*SyntaxError).Error", Method, 16}, + {"(*TagExpr).Eval", Method, 16}, + {"(*TagExpr).String", Method, 16}, + {"AndExpr", Type, 16}, + {"AndExpr.X", Field, 16}, + {"AndExpr.Y", Field, 16}, + {"Expr", Type, 16}, + {"GoVersion", Func, 21}, + {"IsGoBuild", Func, 16}, + {"IsPlusBuild", Func, 16}, + {"NotExpr", Type, 16}, + {"NotExpr.X", Field, 16}, + {"OrExpr", Type, 16}, + {"OrExpr.X", Field, 16}, + {"OrExpr.Y", Field, 16}, + {"Parse", Func, 16}, + {"PlusBuildLines", Func, 16}, + {"SyntaxError", Type, 16}, + {"SyntaxError.Err", Field, 16}, + {"SyntaxError.Offset", Field, 16}, + {"TagExpr", Type, 16}, + {"TagExpr.Tag", Field, 16}, + }, + "go/constant": { + {"(Kind).String", Method, 18}, + {"BinaryOp", Func, 5}, + {"BitLen", Func, 5}, + {"Bool", Const, 5}, + {"BoolVal", Func, 5}, + {"Bytes", Func, 5}, + {"Compare", Func, 5}, + {"Complex", Const, 5}, + {"Denom", Func, 5}, + {"Float", Const, 5}, + {"Float32Val", Func, 5}, + {"Float64Val", Func, 5}, + {"Imag", Func, 5}, + {"Int", Const, 5}, + {"Int64Val", Func, 5}, + {"Kind", Type, 5}, + {"Make", Func, 13}, + {"MakeBool", Func, 5}, + {"MakeFloat64", Func, 5}, + {"MakeFromBytes", Func, 5}, + {"MakeFromLiteral", Func, 5}, + {"MakeImag", Func, 5}, + {"MakeInt64", Func, 5}, + {"MakeString", Func, 5}, + {"MakeUint64", Func, 5}, + {"MakeUnknown", Func, 5}, + {"Num", Func, 5}, + {"Real", Func, 5}, + {"Shift", Func, 5}, + {"Sign", Func, 5}, + {"String", Const, 5}, + {"StringVal", Func, 5}, + {"ToComplex", Func, 6}, + {"ToFloat", Func, 6}, + {"ToInt", Func, 6}, + {"Uint64Val", Func, 5}, + {"UnaryOp", Func, 5}, + {"Unknown", Const, 5}, + {"Val", Func, 13}, + {"Value", Type, 5}, + }, + "go/doc": { + {"(*Package).Filter", Method, 0}, + {"(*Package).HTML", Method, 19}, + {"(*Package).Markdown", Method, 19}, + {"(*Package).Parser", Method, 19}, + {"(*Package).Printer", Method, 19}, + {"(*Package).Synopsis", Method, 19}, + {"(*Package).Text", Method, 19}, + {"AllDecls", Const, 0}, + {"AllMethods", Const, 0}, + {"Example", Type, 0}, + {"Example.Code", Field, 0}, + {"Example.Comments", Field, 0}, + {"Example.Doc", Field, 0}, + {"Example.EmptyOutput", Field, 1}, + {"Example.Name", Field, 0}, + {"Example.Order", Field, 1}, + {"Example.Output", Field, 0}, + {"Example.Play", Field, 1}, + {"Example.Suffix", Field, 14}, + {"Example.Unordered", Field, 7}, + {"Examples", Func, 0}, + {"Filter", Type, 0}, + {"Func", Type, 0}, + {"Func.Decl", Field, 0}, + {"Func.Doc", Field, 0}, + {"Func.Examples", Field, 14}, + {"Func.Level", Field, 0}, + {"Func.Name", Field, 0}, + {"Func.Orig", Field, 0}, + {"Func.Recv", Field, 0}, + {"IllegalPrefixes", Var, 1}, + {"IsPredeclared", Func, 8}, + {"Mode", Type, 0}, + {"New", Func, 0}, + {"NewFromFiles", Func, 14}, + {"Note", Type, 1}, + {"Note.Body", Field, 1}, + {"Note.End", Field, 1}, + {"Note.Pos", Field, 1}, + {"Note.UID", Field, 1}, + {"Package", Type, 0}, + {"Package.Bugs", Field, 0}, + {"Package.Consts", Field, 0}, + {"Package.Doc", Field, 0}, + {"Package.Examples", Field, 14}, + {"Package.Filenames", Field, 0}, + {"Package.Funcs", Field, 0}, + {"Package.ImportPath", Field, 0}, + {"Package.Imports", Field, 0}, + {"Package.Name", Field, 0}, + {"Package.Notes", Field, 1}, + {"Package.Types", Field, 0}, + {"Package.Vars", Field, 0}, + {"PreserveAST", Const, 12}, + {"Synopsis", Func, 0}, + {"ToHTML", Func, 0}, + {"ToText", Func, 0}, + {"Type", Type, 0}, + {"Type.Consts", Field, 0}, + {"Type.Decl", Field, 0}, + {"Type.Doc", Field, 0}, + {"Type.Examples", Field, 14}, + {"Type.Funcs", Field, 0}, + {"Type.Methods", Field, 0}, + {"Type.Name", Field, 0}, + {"Type.Vars", Field, 0}, + {"Value", Type, 0}, + {"Value.Decl", Field, 0}, + {"Value.Doc", Field, 0}, + {"Value.Names", Field, 0}, + }, + "go/doc/comment": { + {"(*DocLink).DefaultURL", Method, 19}, + {"(*Heading).DefaultID", Method, 19}, + {"(*List).BlankBefore", Method, 19}, + {"(*List).BlankBetween", Method, 19}, + {"(*Parser).Parse", Method, 19}, + {"(*Printer).Comment", Method, 19}, + {"(*Printer).HTML", Method, 19}, + {"(*Printer).Markdown", Method, 19}, + {"(*Printer).Text", Method, 19}, + {"Block", Type, 19}, + {"Code", Type, 19}, + {"Code.Text", Field, 19}, + {"DefaultLookupPackage", Func, 19}, + {"Doc", Type, 19}, + {"Doc.Content", Field, 19}, + {"Doc.Links", Field, 19}, + {"DocLink", Type, 19}, + {"DocLink.ImportPath", Field, 19}, + {"DocLink.Name", Field, 19}, + {"DocLink.Recv", Field, 19}, + {"DocLink.Text", Field, 19}, + {"Heading", Type, 19}, + {"Heading.Text", Field, 19}, + {"Italic", Type, 19}, + {"Link", Type, 19}, + {"Link.Auto", Field, 19}, + {"Link.Text", Field, 19}, + {"Link.URL", Field, 19}, + {"LinkDef", Type, 19}, + {"LinkDef.Text", Field, 19}, + {"LinkDef.URL", Field, 19}, + {"LinkDef.Used", Field, 19}, + {"List", Type, 19}, + {"List.ForceBlankBefore", Field, 19}, + {"List.ForceBlankBetween", Field, 19}, + {"List.Items", Field, 19}, + {"ListItem", Type, 19}, + {"ListItem.Content", Field, 19}, + {"ListItem.Number", Field, 19}, + {"Paragraph", Type, 19}, + {"Paragraph.Text", Field, 19}, + {"Parser", Type, 19}, + {"Parser.LookupPackage", Field, 19}, + {"Parser.LookupSym", Field, 19}, + {"Parser.Words", Field, 19}, + {"Plain", Type, 19}, + {"Printer", Type, 19}, + {"Printer.DocLinkBaseURL", Field, 19}, + {"Printer.DocLinkURL", Field, 19}, + {"Printer.HeadingID", Field, 19}, + {"Printer.HeadingLevel", Field, 19}, + {"Printer.TextCodePrefix", Field, 19}, + {"Printer.TextPrefix", Field, 19}, + {"Printer.TextWidth", Field, 19}, + {"Text", Type, 19}, + }, + "go/format": { + {"Node", Func, 1}, + {"Source", Func, 1}, + }, + "go/importer": { + {"Default", Func, 5}, + {"For", Func, 5}, + {"ForCompiler", Func, 12}, + {"Lookup", Type, 5}, + }, + "go/parser": { + {"AllErrors", Const, 1}, + {"DeclarationErrors", Const, 0}, + {"ImportsOnly", Const, 0}, + {"Mode", Type, 0}, + {"PackageClauseOnly", Const, 0}, + {"ParseComments", Const, 0}, + {"ParseDir", Func, 0}, + {"ParseExpr", Func, 0}, + {"ParseExprFrom", Func, 5}, + {"ParseFile", Func, 0}, + {"SkipObjectResolution", Const, 17}, + {"SpuriousErrors", Const, 0}, + {"Trace", Const, 0}, + }, + "go/printer": { + {"(*Config).Fprint", Method, 0}, + {"CommentedNode", Type, 0}, + {"CommentedNode.Comments", Field, 0}, + {"CommentedNode.Node", Field, 0}, + {"Config", Type, 0}, + {"Config.Indent", Field, 1}, + {"Config.Mode", Field, 0}, + {"Config.Tabwidth", Field, 0}, + {"Fprint", Func, 0}, + {"Mode", Type, 0}, + {"RawFormat", Const, 0}, + {"SourcePos", Const, 0}, + {"TabIndent", Const, 0}, + {"UseSpaces", Const, 0}, + }, + "go/scanner": { + {"(*ErrorList).Add", Method, 0}, + {"(*ErrorList).RemoveMultiples", Method, 0}, + {"(*ErrorList).Reset", Method, 0}, + {"(*Scanner).Init", Method, 0}, + {"(*Scanner).Scan", Method, 0}, + {"(Error).Error", Method, 0}, + {"(ErrorList).Err", Method, 0}, + {"(ErrorList).Error", Method, 0}, + {"(ErrorList).Len", Method, 0}, + {"(ErrorList).Less", Method, 0}, + {"(ErrorList).Sort", Method, 0}, + {"(ErrorList).Swap", Method, 0}, + {"Error", Type, 0}, + {"Error.Msg", Field, 0}, + {"Error.Pos", Field, 0}, + {"ErrorHandler", Type, 0}, + {"ErrorList", Type, 0}, + {"Mode", Type, 0}, + {"PrintError", Func, 0}, + {"ScanComments", Const, 0}, + {"Scanner", Type, 0}, + {"Scanner.ErrorCount", Field, 0}, + }, + "go/token": { + {"(*File).AddLine", Method, 0}, + {"(*File).AddLineColumnInfo", Method, 11}, + {"(*File).AddLineInfo", Method, 0}, + {"(*File).Base", Method, 0}, + {"(*File).Line", Method, 0}, + {"(*File).LineCount", Method, 0}, + {"(*File).LineStart", Method, 12}, + {"(*File).Lines", Method, 21}, + {"(*File).MergeLine", Method, 2}, + {"(*File).Name", Method, 0}, + {"(*File).Offset", Method, 0}, + {"(*File).Pos", Method, 0}, + {"(*File).Position", Method, 0}, + {"(*File).PositionFor", Method, 4}, + {"(*File).SetLines", Method, 0}, + {"(*File).SetLinesForContent", Method, 0}, + {"(*File).Size", Method, 0}, + {"(*FileSet).AddFile", Method, 0}, + {"(*FileSet).Base", Method, 0}, + {"(*FileSet).File", Method, 0}, + {"(*FileSet).Iterate", Method, 0}, + {"(*FileSet).Position", Method, 0}, + {"(*FileSet).PositionFor", Method, 4}, + {"(*FileSet).Read", Method, 0}, + {"(*FileSet).RemoveFile", Method, 20}, + {"(*FileSet).Write", Method, 0}, + {"(*Position).IsValid", Method, 0}, + {"(Pos).IsValid", Method, 0}, + {"(Position).String", Method, 0}, + {"(Token).IsKeyword", Method, 0}, + {"(Token).IsLiteral", Method, 0}, + {"(Token).IsOperator", Method, 0}, + {"(Token).Precedence", Method, 0}, + {"(Token).String", Method, 0}, + {"ADD", Const, 0}, + {"ADD_ASSIGN", Const, 0}, + {"AND", Const, 0}, + {"AND_ASSIGN", Const, 0}, + {"AND_NOT", Const, 0}, + {"AND_NOT_ASSIGN", Const, 0}, + {"ARROW", Const, 0}, + {"ASSIGN", Const, 0}, + {"BREAK", Const, 0}, + {"CASE", Const, 0}, + {"CHAN", Const, 0}, + {"CHAR", Const, 0}, + {"COLON", Const, 0}, + {"COMMA", Const, 0}, + {"COMMENT", Const, 0}, + {"CONST", Const, 0}, + {"CONTINUE", Const, 0}, + {"DEC", Const, 0}, + {"DEFAULT", Const, 0}, + {"DEFER", Const, 0}, + {"DEFINE", Const, 0}, + {"ELLIPSIS", Const, 0}, + {"ELSE", Const, 0}, + {"EOF", Const, 0}, + {"EQL", Const, 0}, + {"FALLTHROUGH", Const, 0}, + {"FLOAT", Const, 0}, + {"FOR", Const, 0}, + {"FUNC", Const, 0}, + {"File", Type, 0}, + {"FileSet", Type, 0}, + {"GEQ", Const, 0}, + {"GO", Const, 0}, + {"GOTO", Const, 0}, + {"GTR", Const, 0}, + {"HighestPrec", Const, 0}, + {"IDENT", Const, 0}, + {"IF", Const, 0}, + {"ILLEGAL", Const, 0}, + {"IMAG", Const, 0}, + {"IMPORT", Const, 0}, + {"INC", Const, 0}, + {"INT", Const, 0}, + {"INTERFACE", Const, 0}, + {"IsExported", Func, 13}, + {"IsIdentifier", Func, 13}, + {"IsKeyword", Func, 13}, + {"LAND", Const, 0}, + {"LBRACE", Const, 0}, + {"LBRACK", Const, 0}, + {"LEQ", Const, 0}, + {"LOR", Const, 0}, + {"LPAREN", Const, 0}, + {"LSS", Const, 0}, + {"Lookup", Func, 0}, + {"LowestPrec", Const, 0}, + {"MAP", Const, 0}, + {"MUL", Const, 0}, + {"MUL_ASSIGN", Const, 0}, + {"NEQ", Const, 0}, + {"NOT", Const, 0}, + {"NewFileSet", Func, 0}, + {"NoPos", Const, 0}, + {"OR", Const, 0}, + {"OR_ASSIGN", Const, 0}, + {"PACKAGE", Const, 0}, + {"PERIOD", Const, 0}, + {"Pos", Type, 0}, + {"Position", Type, 0}, + {"Position.Column", Field, 0}, + {"Position.Filename", Field, 0}, + {"Position.Line", Field, 0}, + {"Position.Offset", Field, 0}, + {"QUO", Const, 0}, + {"QUO_ASSIGN", Const, 0}, + {"RANGE", Const, 0}, + {"RBRACE", Const, 0}, + {"RBRACK", Const, 0}, + {"REM", Const, 0}, + {"REM_ASSIGN", Const, 0}, + {"RETURN", Const, 0}, + {"RPAREN", Const, 0}, + {"SELECT", Const, 0}, + {"SEMICOLON", Const, 0}, + {"SHL", Const, 0}, + {"SHL_ASSIGN", Const, 0}, + {"SHR", Const, 0}, + {"SHR_ASSIGN", Const, 0}, + {"STRING", Const, 0}, + {"STRUCT", Const, 0}, + {"SUB", Const, 0}, + {"SUB_ASSIGN", Const, 0}, + {"SWITCH", Const, 0}, + {"TILDE", Const, 18}, + {"TYPE", Const, 0}, + {"Token", Type, 0}, + {"UnaryPrec", Const, 0}, + {"VAR", Const, 0}, + {"XOR", Const, 0}, + {"XOR_ASSIGN", Const, 0}, + }, + "go/types": { + {"(*Alias).Obj", Method, 22}, + {"(*Alias).String", Method, 22}, + {"(*Alias).Underlying", Method, 22}, + {"(*ArgumentError).Error", Method, 18}, + {"(*ArgumentError).Unwrap", Method, 18}, + {"(*Array).Elem", Method, 5}, + {"(*Array).Len", Method, 5}, + {"(*Array).String", Method, 5}, + {"(*Array).Underlying", Method, 5}, + {"(*Basic).Info", Method, 5}, + {"(*Basic).Kind", Method, 5}, + {"(*Basic).Name", Method, 5}, + {"(*Basic).String", Method, 5}, + {"(*Basic).Underlying", Method, 5}, + {"(*Builtin).Exported", Method, 5}, + {"(*Builtin).Id", Method, 5}, + {"(*Builtin).Name", Method, 5}, + {"(*Builtin).Parent", Method, 5}, + {"(*Builtin).Pkg", Method, 5}, + {"(*Builtin).Pos", Method, 5}, + {"(*Builtin).String", Method, 5}, + {"(*Builtin).Type", Method, 5}, + {"(*Chan).Dir", Method, 5}, + {"(*Chan).Elem", Method, 5}, + {"(*Chan).String", Method, 5}, + {"(*Chan).Underlying", Method, 5}, + {"(*Checker).Files", Method, 5}, + {"(*Config).Check", Method, 5}, + {"(*Const).Exported", Method, 5}, + {"(*Const).Id", Method, 5}, + {"(*Const).Name", Method, 5}, + {"(*Const).Parent", Method, 5}, + {"(*Const).Pkg", Method, 5}, + {"(*Const).Pos", Method, 5}, + {"(*Const).String", Method, 5}, + {"(*Const).Type", Method, 5}, + {"(*Const).Val", Method, 5}, + {"(*Func).Exported", Method, 5}, + {"(*Func).FullName", Method, 5}, + {"(*Func).Id", Method, 5}, + {"(*Func).Name", Method, 5}, + {"(*Func).Origin", Method, 19}, + {"(*Func).Parent", Method, 5}, + {"(*Func).Pkg", Method, 5}, + {"(*Func).Pos", Method, 5}, + {"(*Func).Scope", Method, 5}, + {"(*Func).String", Method, 5}, + {"(*Func).Type", Method, 5}, + {"(*Info).ObjectOf", Method, 5}, + {"(*Info).PkgNameOf", Method, 22}, + {"(*Info).TypeOf", Method, 5}, + {"(*Initializer).String", Method, 5}, + {"(*Interface).Complete", Method, 5}, + {"(*Interface).Embedded", Method, 5}, + {"(*Interface).EmbeddedType", Method, 11}, + {"(*Interface).Empty", Method, 5}, + {"(*Interface).ExplicitMethod", Method, 5}, + {"(*Interface).IsComparable", Method, 18}, + {"(*Interface).IsImplicit", Method, 18}, + {"(*Interface).IsMethodSet", Method, 18}, + {"(*Interface).MarkImplicit", Method, 18}, + {"(*Interface).Method", Method, 5}, + {"(*Interface).NumEmbeddeds", Method, 5}, + {"(*Interface).NumExplicitMethods", Method, 5}, + {"(*Interface).NumMethods", Method, 5}, + {"(*Interface).String", Method, 5}, + {"(*Interface).Underlying", Method, 5}, + {"(*Label).Exported", Method, 5}, + {"(*Label).Id", Method, 5}, + {"(*Label).Name", Method, 5}, + {"(*Label).Parent", Method, 5}, + {"(*Label).Pkg", Method, 5}, + {"(*Label).Pos", Method, 5}, + {"(*Label).String", Method, 5}, + {"(*Label).Type", Method, 5}, + {"(*Map).Elem", Method, 5}, + {"(*Map).Key", Method, 5}, + {"(*Map).String", Method, 5}, + {"(*Map).Underlying", Method, 5}, + {"(*MethodSet).At", Method, 5}, + {"(*MethodSet).Len", Method, 5}, + {"(*MethodSet).Lookup", Method, 5}, + {"(*MethodSet).String", Method, 5}, + {"(*Named).AddMethod", Method, 5}, + {"(*Named).Method", Method, 5}, + {"(*Named).NumMethods", Method, 5}, + {"(*Named).Obj", Method, 5}, + {"(*Named).Origin", Method, 18}, + {"(*Named).SetTypeParams", Method, 18}, + {"(*Named).SetUnderlying", Method, 5}, + {"(*Named).String", Method, 5}, + {"(*Named).TypeArgs", Method, 18}, + {"(*Named).TypeParams", Method, 18}, + {"(*Named).Underlying", Method, 5}, + {"(*Nil).Exported", Method, 5}, + {"(*Nil).Id", Method, 5}, + {"(*Nil).Name", Method, 5}, + {"(*Nil).Parent", Method, 5}, + {"(*Nil).Pkg", Method, 5}, + {"(*Nil).Pos", Method, 5}, + {"(*Nil).String", Method, 5}, + {"(*Nil).Type", Method, 5}, + {"(*Package).Complete", Method, 5}, + {"(*Package).GoVersion", Method, 21}, + {"(*Package).Imports", Method, 5}, + {"(*Package).MarkComplete", Method, 5}, + {"(*Package).Name", Method, 5}, + {"(*Package).Path", Method, 5}, + {"(*Package).Scope", Method, 5}, + {"(*Package).SetImports", Method, 5}, + {"(*Package).SetName", Method, 6}, + {"(*Package).String", Method, 5}, + {"(*PkgName).Exported", Method, 5}, + {"(*PkgName).Id", Method, 5}, + {"(*PkgName).Imported", Method, 5}, + {"(*PkgName).Name", Method, 5}, + {"(*PkgName).Parent", Method, 5}, + {"(*PkgName).Pkg", Method, 5}, + {"(*PkgName).Pos", Method, 5}, + {"(*PkgName).String", Method, 5}, + {"(*PkgName).Type", Method, 5}, + {"(*Pointer).Elem", Method, 5}, + {"(*Pointer).String", Method, 5}, + {"(*Pointer).Underlying", Method, 5}, + {"(*Scope).Child", Method, 5}, + {"(*Scope).Contains", Method, 5}, + {"(*Scope).End", Method, 5}, + {"(*Scope).Innermost", Method, 5}, + {"(*Scope).Insert", Method, 5}, + {"(*Scope).Len", Method, 5}, + {"(*Scope).Lookup", Method, 5}, + {"(*Scope).LookupParent", Method, 5}, + {"(*Scope).Names", Method, 5}, + {"(*Scope).NumChildren", Method, 5}, + {"(*Scope).Parent", Method, 5}, + {"(*Scope).Pos", Method, 5}, + {"(*Scope).String", Method, 5}, + {"(*Scope).WriteTo", Method, 5}, + {"(*Selection).Index", Method, 5}, + {"(*Selection).Indirect", Method, 5}, + {"(*Selection).Kind", Method, 5}, + {"(*Selection).Obj", Method, 5}, + {"(*Selection).Recv", Method, 5}, + {"(*Selection).String", Method, 5}, + {"(*Selection).Type", Method, 5}, + {"(*Signature).Params", Method, 5}, + {"(*Signature).Recv", Method, 5}, + {"(*Signature).RecvTypeParams", Method, 18}, + {"(*Signature).Results", Method, 5}, + {"(*Signature).String", Method, 5}, + {"(*Signature).TypeParams", Method, 18}, + {"(*Signature).Underlying", Method, 5}, + {"(*Signature).Variadic", Method, 5}, + {"(*Slice).Elem", Method, 5}, + {"(*Slice).String", Method, 5}, + {"(*Slice).Underlying", Method, 5}, + {"(*StdSizes).Alignof", Method, 5}, + {"(*StdSizes).Offsetsof", Method, 5}, + {"(*StdSizes).Sizeof", Method, 5}, + {"(*Struct).Field", Method, 5}, + {"(*Struct).NumFields", Method, 5}, + {"(*Struct).String", Method, 5}, + {"(*Struct).Tag", Method, 5}, + {"(*Struct).Underlying", Method, 5}, + {"(*Term).String", Method, 18}, + {"(*Term).Tilde", Method, 18}, + {"(*Term).Type", Method, 18}, + {"(*Tuple).At", Method, 5}, + {"(*Tuple).Len", Method, 5}, + {"(*Tuple).String", Method, 5}, + {"(*Tuple).Underlying", Method, 5}, + {"(*TypeList).At", Method, 18}, + {"(*TypeList).Len", Method, 18}, + {"(*TypeName).Exported", Method, 5}, + {"(*TypeName).Id", Method, 5}, + {"(*TypeName).IsAlias", Method, 9}, + {"(*TypeName).Name", Method, 5}, + {"(*TypeName).Parent", Method, 5}, + {"(*TypeName).Pkg", Method, 5}, + {"(*TypeName).Pos", Method, 5}, + {"(*TypeName).String", Method, 5}, + {"(*TypeName).Type", Method, 5}, + {"(*TypeParam).Constraint", Method, 18}, + {"(*TypeParam).Index", Method, 18}, + {"(*TypeParam).Obj", Method, 18}, + {"(*TypeParam).SetConstraint", Method, 18}, + {"(*TypeParam).String", Method, 18}, + {"(*TypeParam).Underlying", Method, 18}, + {"(*TypeParamList).At", Method, 18}, + {"(*TypeParamList).Len", Method, 18}, + {"(*Union).Len", Method, 18}, + {"(*Union).String", Method, 18}, + {"(*Union).Term", Method, 18}, + {"(*Union).Underlying", Method, 18}, + {"(*Var).Anonymous", Method, 5}, + {"(*Var).Embedded", Method, 11}, + {"(*Var).Exported", Method, 5}, + {"(*Var).Id", Method, 5}, + {"(*Var).IsField", Method, 5}, + {"(*Var).Name", Method, 5}, + {"(*Var).Origin", Method, 19}, + {"(*Var).Parent", Method, 5}, + {"(*Var).Pkg", Method, 5}, + {"(*Var).Pos", Method, 5}, + {"(*Var).String", Method, 5}, + {"(*Var).Type", Method, 5}, + {"(Checker).ObjectOf", Method, 5}, + {"(Checker).PkgNameOf", Method, 22}, + {"(Checker).TypeOf", Method, 5}, + {"(Error).Error", Method, 5}, + {"(TypeAndValue).Addressable", Method, 5}, + {"(TypeAndValue).Assignable", Method, 5}, + {"(TypeAndValue).HasOk", Method, 5}, + {"(TypeAndValue).IsBuiltin", Method, 5}, + {"(TypeAndValue).IsNil", Method, 5}, + {"(TypeAndValue).IsType", Method, 5}, + {"(TypeAndValue).IsValue", Method, 5}, + {"(TypeAndValue).IsVoid", Method, 5}, + {"Alias", Type, 22}, + {"ArgumentError", Type, 18}, + {"ArgumentError.Err", Field, 18}, + {"ArgumentError.Index", Field, 18}, + {"Array", Type, 5}, + {"AssertableTo", Func, 5}, + {"AssignableTo", Func, 5}, + {"Basic", Type, 5}, + {"BasicInfo", Type, 5}, + {"BasicKind", Type, 5}, + {"Bool", Const, 5}, + {"Builtin", Type, 5}, + {"Byte", Const, 5}, + {"Chan", Type, 5}, + {"ChanDir", Type, 5}, + {"CheckExpr", Func, 13}, + {"Checker", Type, 5}, + {"Checker.Info", Field, 5}, + {"Comparable", Func, 5}, + {"Complex128", Const, 5}, + {"Complex64", Const, 5}, + {"Config", Type, 5}, + {"Config.Context", Field, 18}, + {"Config.DisableUnusedImportCheck", Field, 5}, + {"Config.Error", Field, 5}, + {"Config.FakeImportC", Field, 5}, + {"Config.GoVersion", Field, 18}, + {"Config.IgnoreFuncBodies", Field, 5}, + {"Config.Importer", Field, 5}, + {"Config.Sizes", Field, 5}, + {"Const", Type, 5}, + {"Context", Type, 18}, + {"ConvertibleTo", Func, 5}, + {"DefPredeclaredTestFuncs", Func, 5}, + {"Default", Func, 8}, + {"Error", Type, 5}, + {"Error.Fset", Field, 5}, + {"Error.Msg", Field, 5}, + {"Error.Pos", Field, 5}, + {"Error.Soft", Field, 5}, + {"Eval", Func, 5}, + {"ExprString", Func, 5}, + {"FieldVal", Const, 5}, + {"Float32", Const, 5}, + {"Float64", Const, 5}, + {"Func", Type, 5}, + {"Id", Func, 5}, + {"Identical", Func, 5}, + {"IdenticalIgnoreTags", Func, 8}, + {"Implements", Func, 5}, + {"ImportMode", Type, 6}, + {"Importer", Type, 5}, + {"ImporterFrom", Type, 6}, + {"Info", Type, 5}, + {"Info.Defs", Field, 5}, + {"Info.FileVersions", Field, 22}, + {"Info.Implicits", Field, 5}, + {"Info.InitOrder", Field, 5}, + {"Info.Instances", Field, 18}, + {"Info.Scopes", Field, 5}, + {"Info.Selections", Field, 5}, + {"Info.Types", Field, 5}, + {"Info.Uses", Field, 5}, + {"Initializer", Type, 5}, + {"Initializer.Lhs", Field, 5}, + {"Initializer.Rhs", Field, 5}, + {"Instance", Type, 18}, + {"Instance.Type", Field, 18}, + {"Instance.TypeArgs", Field, 18}, + {"Instantiate", Func, 18}, + {"Int", Const, 5}, + {"Int16", Const, 5}, + {"Int32", Const, 5}, + {"Int64", Const, 5}, + {"Int8", Const, 5}, + {"Interface", Type, 5}, + {"Invalid", Const, 5}, + {"IsBoolean", Const, 5}, + {"IsComplex", Const, 5}, + {"IsConstType", Const, 5}, + {"IsFloat", Const, 5}, + {"IsInteger", Const, 5}, + {"IsInterface", Func, 5}, + {"IsNumeric", Const, 5}, + {"IsOrdered", Const, 5}, + {"IsString", Const, 5}, + {"IsUnsigned", Const, 5}, + {"IsUntyped", Const, 5}, + {"Label", Type, 5}, + {"LookupFieldOrMethod", Func, 5}, + {"Map", Type, 5}, + {"MethodExpr", Const, 5}, + {"MethodSet", Type, 5}, + {"MethodVal", Const, 5}, + {"MissingMethod", Func, 5}, + {"Named", Type, 5}, + {"NewAlias", Func, 22}, + {"NewArray", Func, 5}, + {"NewChan", Func, 5}, + {"NewChecker", Func, 5}, + {"NewConst", Func, 5}, + {"NewContext", Func, 18}, + {"NewField", Func, 5}, + {"NewFunc", Func, 5}, + {"NewInterface", Func, 5}, + {"NewInterfaceType", Func, 11}, + {"NewLabel", Func, 5}, + {"NewMap", Func, 5}, + {"NewMethodSet", Func, 5}, + {"NewNamed", Func, 5}, + {"NewPackage", Func, 5}, + {"NewParam", Func, 5}, + {"NewPkgName", Func, 5}, + {"NewPointer", Func, 5}, + {"NewScope", Func, 5}, + {"NewSignature", Func, 5}, + {"NewSignatureType", Func, 18}, + {"NewSlice", Func, 5}, + {"NewStruct", Func, 5}, + {"NewTerm", Func, 18}, + {"NewTuple", Func, 5}, + {"NewTypeName", Func, 5}, + {"NewTypeParam", Func, 18}, + {"NewUnion", Func, 18}, + {"NewVar", Func, 5}, + {"Nil", Type, 5}, + {"Object", Type, 5}, + {"ObjectString", Func, 5}, + {"Package", Type, 5}, + {"PkgName", Type, 5}, + {"Pointer", Type, 5}, + {"Qualifier", Type, 5}, + {"RecvOnly", Const, 5}, + {"RelativeTo", Func, 5}, + {"Rune", Const, 5}, + {"Satisfies", Func, 20}, + {"Scope", Type, 5}, + {"Selection", Type, 5}, + {"SelectionKind", Type, 5}, + {"SelectionString", Func, 5}, + {"SendOnly", Const, 5}, + {"SendRecv", Const, 5}, + {"Signature", Type, 5}, + {"Sizes", Type, 5}, + {"SizesFor", Func, 9}, + {"Slice", Type, 5}, + {"StdSizes", Type, 5}, + {"StdSizes.MaxAlign", Field, 5}, + {"StdSizes.WordSize", Field, 5}, + {"String", Const, 5}, + {"Struct", Type, 5}, + {"Term", Type, 18}, + {"Tuple", Type, 5}, + {"Typ", Var, 5}, + {"Type", Type, 5}, + {"TypeAndValue", Type, 5}, + {"TypeAndValue.Type", Field, 5}, + {"TypeAndValue.Value", Field, 5}, + {"TypeList", Type, 18}, + {"TypeName", Type, 5}, + {"TypeParam", Type, 18}, + {"TypeParamList", Type, 18}, + {"TypeString", Func, 5}, + {"Uint", Const, 5}, + {"Uint16", Const, 5}, + {"Uint32", Const, 5}, + {"Uint64", Const, 5}, + {"Uint8", Const, 5}, + {"Uintptr", Const, 5}, + {"Unalias", Func, 22}, + {"Union", Type, 18}, + {"Universe", Var, 5}, + {"Unsafe", Var, 5}, + {"UnsafePointer", Const, 5}, + {"UntypedBool", Const, 5}, + {"UntypedComplex", Const, 5}, + {"UntypedFloat", Const, 5}, + {"UntypedInt", Const, 5}, + {"UntypedNil", Const, 5}, + {"UntypedRune", Const, 5}, + {"UntypedString", Const, 5}, + {"Var", Type, 5}, + {"WriteExpr", Func, 5}, + {"WriteSignature", Func, 5}, + {"WriteType", Func, 5}, + }, + "go/version": { + {"Compare", Func, 22}, + {"IsValid", Func, 22}, + {"Lang", Func, 22}, + }, + "hash": { + {"Hash", Type, 0}, + {"Hash32", Type, 0}, + {"Hash64", Type, 0}, + }, + "hash/adler32": { + {"Checksum", Func, 0}, + {"New", Func, 0}, + {"Size", Const, 0}, + }, + "hash/crc32": { + {"Castagnoli", Const, 0}, + {"Checksum", Func, 0}, + {"ChecksumIEEE", Func, 0}, + {"IEEE", Const, 0}, + {"IEEETable", Var, 0}, + {"Koopman", Const, 0}, + {"MakeTable", Func, 0}, + {"New", Func, 0}, + {"NewIEEE", Func, 0}, + {"Size", Const, 0}, + {"Table", Type, 0}, + {"Update", Func, 0}, + }, + "hash/crc64": { + {"Checksum", Func, 0}, + {"ECMA", Const, 0}, + {"ISO", Const, 0}, + {"MakeTable", Func, 0}, + {"New", Func, 0}, + {"Size", Const, 0}, + {"Table", Type, 0}, + {"Update", Func, 0}, + }, + "hash/fnv": { + {"New128", Func, 9}, + {"New128a", Func, 9}, + {"New32", Func, 0}, + {"New32a", Func, 0}, + {"New64", Func, 0}, + {"New64a", Func, 0}, + }, + "hash/maphash": { + {"(*Hash).BlockSize", Method, 14}, + {"(*Hash).Reset", Method, 14}, + {"(*Hash).Seed", Method, 14}, + {"(*Hash).SetSeed", Method, 14}, + {"(*Hash).Size", Method, 14}, + {"(*Hash).Sum", Method, 14}, + {"(*Hash).Sum64", Method, 14}, + {"(*Hash).Write", Method, 14}, + {"(*Hash).WriteByte", Method, 14}, + {"(*Hash).WriteString", Method, 14}, + {"Bytes", Func, 19}, + {"Hash", Type, 14}, + {"MakeSeed", Func, 14}, + {"Seed", Type, 14}, + {"String", Func, 19}, + }, + "html": { + {"EscapeString", Func, 0}, + {"UnescapeString", Func, 0}, + }, + "html/template": { + {"(*Error).Error", Method, 0}, + {"(*Template).AddParseTree", Method, 0}, + {"(*Template).Clone", Method, 0}, + {"(*Template).DefinedTemplates", Method, 6}, + {"(*Template).Delims", Method, 0}, + {"(*Template).Execute", Method, 0}, + {"(*Template).ExecuteTemplate", Method, 0}, + {"(*Template).Funcs", Method, 0}, + {"(*Template).Lookup", Method, 0}, + {"(*Template).Name", Method, 0}, + {"(*Template).New", Method, 0}, + {"(*Template).Option", Method, 5}, + {"(*Template).Parse", Method, 0}, + {"(*Template).ParseFS", Method, 16}, + {"(*Template).ParseFiles", Method, 0}, + {"(*Template).ParseGlob", Method, 0}, + {"(*Template).Templates", Method, 0}, + {"CSS", Type, 0}, + {"ErrAmbigContext", Const, 0}, + {"ErrBadHTML", Const, 0}, + {"ErrBranchEnd", Const, 0}, + {"ErrEndContext", Const, 0}, + {"ErrJSTemplate", Const, 21}, + {"ErrNoSuchTemplate", Const, 0}, + {"ErrOutputContext", Const, 0}, + {"ErrPartialCharset", Const, 0}, + {"ErrPartialEscape", Const, 0}, + {"ErrPredefinedEscaper", Const, 9}, + {"ErrRangeLoopReentry", Const, 0}, + {"ErrSlashAmbig", Const, 0}, + {"Error", Type, 0}, + {"Error.Description", Field, 0}, + {"Error.ErrorCode", Field, 0}, + {"Error.Line", Field, 0}, + {"Error.Name", Field, 0}, + {"Error.Node", Field, 4}, + {"ErrorCode", Type, 0}, + {"FuncMap", Type, 0}, + {"HTML", Type, 0}, + {"HTMLAttr", Type, 0}, + {"HTMLEscape", Func, 0}, + {"HTMLEscapeString", Func, 0}, + {"HTMLEscaper", Func, 0}, + {"IsTrue", Func, 6}, + {"JS", Type, 0}, + {"JSEscape", Func, 0}, + {"JSEscapeString", Func, 0}, + {"JSEscaper", Func, 0}, + {"JSStr", Type, 0}, + {"Must", Func, 0}, + {"New", Func, 0}, + {"OK", Const, 0}, + {"ParseFS", Func, 16}, + {"ParseFiles", Func, 0}, + {"ParseGlob", Func, 0}, + {"Srcset", Type, 10}, + {"Template", Type, 0}, + {"Template.Tree", Field, 2}, + {"URL", Type, 0}, + {"URLQueryEscaper", Func, 0}, + }, + "image": { + {"(*Alpha).AlphaAt", Method, 4}, + {"(*Alpha).At", Method, 0}, + {"(*Alpha).Bounds", Method, 0}, + {"(*Alpha).ColorModel", Method, 0}, + {"(*Alpha).Opaque", Method, 0}, + {"(*Alpha).PixOffset", Method, 0}, + {"(*Alpha).RGBA64At", Method, 17}, + {"(*Alpha).Set", Method, 0}, + {"(*Alpha).SetAlpha", Method, 0}, + {"(*Alpha).SetRGBA64", Method, 17}, + {"(*Alpha).SubImage", Method, 0}, + {"(*Alpha16).Alpha16At", Method, 4}, + {"(*Alpha16).At", Method, 0}, + {"(*Alpha16).Bounds", Method, 0}, + {"(*Alpha16).ColorModel", Method, 0}, + {"(*Alpha16).Opaque", Method, 0}, + {"(*Alpha16).PixOffset", Method, 0}, + {"(*Alpha16).RGBA64At", Method, 17}, + {"(*Alpha16).Set", Method, 0}, + {"(*Alpha16).SetAlpha16", Method, 0}, + {"(*Alpha16).SetRGBA64", Method, 17}, + {"(*Alpha16).SubImage", Method, 0}, + {"(*CMYK).At", Method, 5}, + {"(*CMYK).Bounds", Method, 5}, + {"(*CMYK).CMYKAt", Method, 5}, + {"(*CMYK).ColorModel", Method, 5}, + {"(*CMYK).Opaque", Method, 5}, + {"(*CMYK).PixOffset", Method, 5}, + {"(*CMYK).RGBA64At", Method, 17}, + {"(*CMYK).Set", Method, 5}, + {"(*CMYK).SetCMYK", Method, 5}, + {"(*CMYK).SetRGBA64", Method, 17}, + {"(*CMYK).SubImage", Method, 5}, + {"(*Gray).At", Method, 0}, + {"(*Gray).Bounds", Method, 0}, + {"(*Gray).ColorModel", Method, 0}, + {"(*Gray).GrayAt", Method, 4}, + {"(*Gray).Opaque", Method, 0}, + {"(*Gray).PixOffset", Method, 0}, + {"(*Gray).RGBA64At", Method, 17}, + {"(*Gray).Set", Method, 0}, + {"(*Gray).SetGray", Method, 0}, + {"(*Gray).SetRGBA64", Method, 17}, + {"(*Gray).SubImage", Method, 0}, + {"(*Gray16).At", Method, 0}, + {"(*Gray16).Bounds", Method, 0}, + {"(*Gray16).ColorModel", Method, 0}, + {"(*Gray16).Gray16At", Method, 4}, + {"(*Gray16).Opaque", Method, 0}, + {"(*Gray16).PixOffset", Method, 0}, + {"(*Gray16).RGBA64At", Method, 17}, + {"(*Gray16).Set", Method, 0}, + {"(*Gray16).SetGray16", Method, 0}, + {"(*Gray16).SetRGBA64", Method, 17}, + {"(*Gray16).SubImage", Method, 0}, + {"(*NRGBA).At", Method, 0}, + {"(*NRGBA).Bounds", Method, 0}, + {"(*NRGBA).ColorModel", Method, 0}, + {"(*NRGBA).NRGBAAt", Method, 4}, + {"(*NRGBA).Opaque", Method, 0}, + {"(*NRGBA).PixOffset", Method, 0}, + {"(*NRGBA).RGBA64At", Method, 17}, + {"(*NRGBA).Set", Method, 0}, + {"(*NRGBA).SetNRGBA", Method, 0}, + {"(*NRGBA).SetRGBA64", Method, 17}, + {"(*NRGBA).SubImage", Method, 0}, + {"(*NRGBA64).At", Method, 0}, + {"(*NRGBA64).Bounds", Method, 0}, + {"(*NRGBA64).ColorModel", Method, 0}, + {"(*NRGBA64).NRGBA64At", Method, 4}, + {"(*NRGBA64).Opaque", Method, 0}, + {"(*NRGBA64).PixOffset", Method, 0}, + {"(*NRGBA64).RGBA64At", Method, 17}, + {"(*NRGBA64).Set", Method, 0}, + {"(*NRGBA64).SetNRGBA64", Method, 0}, + {"(*NRGBA64).SetRGBA64", Method, 17}, + {"(*NRGBA64).SubImage", Method, 0}, + {"(*NYCbCrA).AOffset", Method, 6}, + {"(*NYCbCrA).At", Method, 6}, + {"(*NYCbCrA).Bounds", Method, 6}, + {"(*NYCbCrA).COffset", Method, 6}, + {"(*NYCbCrA).ColorModel", Method, 6}, + {"(*NYCbCrA).NYCbCrAAt", Method, 6}, + {"(*NYCbCrA).Opaque", Method, 6}, + {"(*NYCbCrA).RGBA64At", Method, 17}, + {"(*NYCbCrA).SubImage", Method, 6}, + {"(*NYCbCrA).YCbCrAt", Method, 6}, + {"(*NYCbCrA).YOffset", Method, 6}, + {"(*Paletted).At", Method, 0}, + {"(*Paletted).Bounds", Method, 0}, + {"(*Paletted).ColorIndexAt", Method, 0}, + {"(*Paletted).ColorModel", Method, 0}, + {"(*Paletted).Opaque", Method, 0}, + {"(*Paletted).PixOffset", Method, 0}, + {"(*Paletted).RGBA64At", Method, 17}, + {"(*Paletted).Set", Method, 0}, + {"(*Paletted).SetColorIndex", Method, 0}, + {"(*Paletted).SetRGBA64", Method, 17}, + {"(*Paletted).SubImage", Method, 0}, + {"(*RGBA).At", Method, 0}, + {"(*RGBA).Bounds", Method, 0}, + {"(*RGBA).ColorModel", Method, 0}, + {"(*RGBA).Opaque", Method, 0}, + {"(*RGBA).PixOffset", Method, 0}, + {"(*RGBA).RGBA64At", Method, 17}, + {"(*RGBA).RGBAAt", Method, 4}, + {"(*RGBA).Set", Method, 0}, + {"(*RGBA).SetRGBA", Method, 0}, + {"(*RGBA).SetRGBA64", Method, 17}, + {"(*RGBA).SubImage", Method, 0}, + {"(*RGBA64).At", Method, 0}, + {"(*RGBA64).Bounds", Method, 0}, + {"(*RGBA64).ColorModel", Method, 0}, + {"(*RGBA64).Opaque", Method, 0}, + {"(*RGBA64).PixOffset", Method, 0}, + {"(*RGBA64).RGBA64At", Method, 4}, + {"(*RGBA64).Set", Method, 0}, + {"(*RGBA64).SetRGBA64", Method, 0}, + {"(*RGBA64).SubImage", Method, 0}, + {"(*Uniform).At", Method, 0}, + {"(*Uniform).Bounds", Method, 0}, + {"(*Uniform).ColorModel", Method, 0}, + {"(*Uniform).Convert", Method, 0}, + {"(*Uniform).Opaque", Method, 0}, + {"(*Uniform).RGBA", Method, 0}, + {"(*Uniform).RGBA64At", Method, 17}, + {"(*YCbCr).At", Method, 0}, + {"(*YCbCr).Bounds", Method, 0}, + {"(*YCbCr).COffset", Method, 0}, + {"(*YCbCr).ColorModel", Method, 0}, + {"(*YCbCr).Opaque", Method, 0}, + {"(*YCbCr).RGBA64At", Method, 17}, + {"(*YCbCr).SubImage", Method, 0}, + {"(*YCbCr).YCbCrAt", Method, 4}, + {"(*YCbCr).YOffset", Method, 0}, + {"(Point).Add", Method, 0}, + {"(Point).Div", Method, 0}, + {"(Point).Eq", Method, 0}, + {"(Point).In", Method, 0}, + {"(Point).Mod", Method, 0}, + {"(Point).Mul", Method, 0}, + {"(Point).String", Method, 0}, + {"(Point).Sub", Method, 0}, + {"(Rectangle).Add", Method, 0}, + {"(Rectangle).At", Method, 5}, + {"(Rectangle).Bounds", Method, 5}, + {"(Rectangle).Canon", Method, 0}, + {"(Rectangle).ColorModel", Method, 5}, + {"(Rectangle).Dx", Method, 0}, + {"(Rectangle).Dy", Method, 0}, + {"(Rectangle).Empty", Method, 0}, + {"(Rectangle).Eq", Method, 0}, + {"(Rectangle).In", Method, 0}, + {"(Rectangle).Inset", Method, 0}, + {"(Rectangle).Intersect", Method, 0}, + {"(Rectangle).Overlaps", Method, 0}, + {"(Rectangle).RGBA64At", Method, 17}, + {"(Rectangle).Size", Method, 0}, + {"(Rectangle).String", Method, 0}, + {"(Rectangle).Sub", Method, 0}, + {"(Rectangle).Union", Method, 0}, + {"(YCbCrSubsampleRatio).String", Method, 0}, + {"Alpha", Type, 0}, + {"Alpha.Pix", Field, 0}, + {"Alpha.Rect", Field, 0}, + {"Alpha.Stride", Field, 0}, + {"Alpha16", Type, 0}, + {"Alpha16.Pix", Field, 0}, + {"Alpha16.Rect", Field, 0}, + {"Alpha16.Stride", Field, 0}, + {"Black", Var, 0}, + {"CMYK", Type, 5}, + {"CMYK.Pix", Field, 5}, + {"CMYK.Rect", Field, 5}, + {"CMYK.Stride", Field, 5}, + {"Config", Type, 0}, + {"Config.ColorModel", Field, 0}, + {"Config.Height", Field, 0}, + {"Config.Width", Field, 0}, + {"Decode", Func, 0}, + {"DecodeConfig", Func, 0}, + {"ErrFormat", Var, 0}, + {"Gray", Type, 0}, + {"Gray.Pix", Field, 0}, + {"Gray.Rect", Field, 0}, + {"Gray.Stride", Field, 0}, + {"Gray16", Type, 0}, + {"Gray16.Pix", Field, 0}, + {"Gray16.Rect", Field, 0}, + {"Gray16.Stride", Field, 0}, + {"Image", Type, 0}, + {"NRGBA", Type, 0}, + {"NRGBA.Pix", Field, 0}, + {"NRGBA.Rect", Field, 0}, + {"NRGBA.Stride", Field, 0}, + {"NRGBA64", Type, 0}, + {"NRGBA64.Pix", Field, 0}, + {"NRGBA64.Rect", Field, 0}, + {"NRGBA64.Stride", Field, 0}, + {"NYCbCrA", Type, 6}, + {"NYCbCrA.A", Field, 6}, + {"NYCbCrA.AStride", Field, 6}, + {"NYCbCrA.YCbCr", Field, 6}, + {"NewAlpha", Func, 0}, + {"NewAlpha16", Func, 0}, + {"NewCMYK", Func, 5}, + {"NewGray", Func, 0}, + {"NewGray16", Func, 0}, + {"NewNRGBA", Func, 0}, + {"NewNRGBA64", Func, 0}, + {"NewNYCbCrA", Func, 6}, + {"NewPaletted", Func, 0}, + {"NewRGBA", Func, 0}, + {"NewRGBA64", Func, 0}, + {"NewUniform", Func, 0}, + {"NewYCbCr", Func, 0}, + {"Opaque", Var, 0}, + {"Paletted", Type, 0}, + {"Paletted.Palette", Field, 0}, + {"Paletted.Pix", Field, 0}, + {"Paletted.Rect", Field, 0}, + {"Paletted.Stride", Field, 0}, + {"PalettedImage", Type, 0}, + {"Point", Type, 0}, + {"Point.X", Field, 0}, + {"Point.Y", Field, 0}, + {"Pt", Func, 0}, + {"RGBA", Type, 0}, + {"RGBA.Pix", Field, 0}, + {"RGBA.Rect", Field, 0}, + {"RGBA.Stride", Field, 0}, + {"RGBA64", Type, 0}, + {"RGBA64.Pix", Field, 0}, + {"RGBA64.Rect", Field, 0}, + {"RGBA64.Stride", Field, 0}, + {"RGBA64Image", Type, 17}, + {"Rect", Func, 0}, + {"Rectangle", Type, 0}, + {"Rectangle.Max", Field, 0}, + {"Rectangle.Min", Field, 0}, + {"RegisterFormat", Func, 0}, + {"Transparent", Var, 0}, + {"Uniform", Type, 0}, + {"Uniform.C", Field, 0}, + {"White", Var, 0}, + {"YCbCr", Type, 0}, + {"YCbCr.CStride", Field, 0}, + {"YCbCr.Cb", Field, 0}, + {"YCbCr.Cr", Field, 0}, + {"YCbCr.Rect", Field, 0}, + {"YCbCr.SubsampleRatio", Field, 0}, + {"YCbCr.Y", Field, 0}, + {"YCbCr.YStride", Field, 0}, + {"YCbCrSubsampleRatio", Type, 0}, + {"YCbCrSubsampleRatio410", Const, 5}, + {"YCbCrSubsampleRatio411", Const, 5}, + {"YCbCrSubsampleRatio420", Const, 0}, + {"YCbCrSubsampleRatio422", Const, 0}, + {"YCbCrSubsampleRatio440", Const, 1}, + {"YCbCrSubsampleRatio444", Const, 0}, + {"ZP", Var, 0}, + {"ZR", Var, 0}, + }, + "image/color": { + {"(Alpha).RGBA", Method, 0}, + {"(Alpha16).RGBA", Method, 0}, + {"(CMYK).RGBA", Method, 5}, + {"(Gray).RGBA", Method, 0}, + {"(Gray16).RGBA", Method, 0}, + {"(NRGBA).RGBA", Method, 0}, + {"(NRGBA64).RGBA", Method, 0}, + {"(NYCbCrA).RGBA", Method, 6}, + {"(Palette).Convert", Method, 0}, + {"(Palette).Index", Method, 0}, + {"(RGBA).RGBA", Method, 0}, + {"(RGBA64).RGBA", Method, 0}, + {"(YCbCr).RGBA", Method, 0}, + {"Alpha", Type, 0}, + {"Alpha.A", Field, 0}, + {"Alpha16", Type, 0}, + {"Alpha16.A", Field, 0}, + {"Alpha16Model", Var, 0}, + {"AlphaModel", Var, 0}, + {"Black", Var, 0}, + {"CMYK", Type, 5}, + {"CMYK.C", Field, 5}, + {"CMYK.K", Field, 5}, + {"CMYK.M", Field, 5}, + {"CMYK.Y", Field, 5}, + {"CMYKModel", Var, 5}, + {"CMYKToRGB", Func, 5}, + {"Color", Type, 0}, + {"Gray", Type, 0}, + {"Gray.Y", Field, 0}, + {"Gray16", Type, 0}, + {"Gray16.Y", Field, 0}, + {"Gray16Model", Var, 0}, + {"GrayModel", Var, 0}, + {"Model", Type, 0}, + {"ModelFunc", Func, 0}, + {"NRGBA", Type, 0}, + {"NRGBA.A", Field, 0}, + {"NRGBA.B", Field, 0}, + {"NRGBA.G", Field, 0}, + {"NRGBA.R", Field, 0}, + {"NRGBA64", Type, 0}, + {"NRGBA64.A", Field, 0}, + {"NRGBA64.B", Field, 0}, + {"NRGBA64.G", Field, 0}, + {"NRGBA64.R", Field, 0}, + {"NRGBA64Model", Var, 0}, + {"NRGBAModel", Var, 0}, + {"NYCbCrA", Type, 6}, + {"NYCbCrA.A", Field, 6}, + {"NYCbCrA.YCbCr", Field, 6}, + {"NYCbCrAModel", Var, 6}, + {"Opaque", Var, 0}, + {"Palette", Type, 0}, + {"RGBA", Type, 0}, + {"RGBA.A", Field, 0}, + {"RGBA.B", Field, 0}, + {"RGBA.G", Field, 0}, + {"RGBA.R", Field, 0}, + {"RGBA64", Type, 0}, + {"RGBA64.A", Field, 0}, + {"RGBA64.B", Field, 0}, + {"RGBA64.G", Field, 0}, + {"RGBA64.R", Field, 0}, + {"RGBA64Model", Var, 0}, + {"RGBAModel", Var, 0}, + {"RGBToCMYK", Func, 5}, + {"RGBToYCbCr", Func, 0}, + {"Transparent", Var, 0}, + {"White", Var, 0}, + {"YCbCr", Type, 0}, + {"YCbCr.Cb", Field, 0}, + {"YCbCr.Cr", Field, 0}, + {"YCbCr.Y", Field, 0}, + {"YCbCrModel", Var, 0}, + {"YCbCrToRGB", Func, 0}, + }, + "image/color/palette": { + {"Plan9", Var, 2}, + {"WebSafe", Var, 2}, + }, + "image/draw": { + {"(Op).Draw", Method, 2}, + {"Draw", Func, 0}, + {"DrawMask", Func, 0}, + {"Drawer", Type, 2}, + {"FloydSteinberg", Var, 2}, + {"Image", Type, 0}, + {"Op", Type, 0}, + {"Over", Const, 0}, + {"Quantizer", Type, 2}, + {"RGBA64Image", Type, 17}, + {"Src", Const, 0}, + }, + "image/gif": { + {"Decode", Func, 0}, + {"DecodeAll", Func, 0}, + {"DecodeConfig", Func, 0}, + {"DisposalBackground", Const, 5}, + {"DisposalNone", Const, 5}, + {"DisposalPrevious", Const, 5}, + {"Encode", Func, 2}, + {"EncodeAll", Func, 2}, + {"GIF", Type, 0}, + {"GIF.BackgroundIndex", Field, 5}, + {"GIF.Config", Field, 5}, + {"GIF.Delay", Field, 0}, + {"GIF.Disposal", Field, 5}, + {"GIF.Image", Field, 0}, + {"GIF.LoopCount", Field, 0}, + {"Options", Type, 2}, + {"Options.Drawer", Field, 2}, + {"Options.NumColors", Field, 2}, + {"Options.Quantizer", Field, 2}, + }, + "image/jpeg": { + {"(FormatError).Error", Method, 0}, + {"(UnsupportedError).Error", Method, 0}, + {"Decode", Func, 0}, + {"DecodeConfig", Func, 0}, + {"DefaultQuality", Const, 0}, + {"Encode", Func, 0}, + {"FormatError", Type, 0}, + {"Options", Type, 0}, + {"Options.Quality", Field, 0}, + {"Reader", Type, 0}, + {"UnsupportedError", Type, 0}, + }, + "image/png": { + {"(*Encoder).Encode", Method, 4}, + {"(FormatError).Error", Method, 0}, + {"(UnsupportedError).Error", Method, 0}, + {"BestCompression", Const, 4}, + {"BestSpeed", Const, 4}, + {"CompressionLevel", Type, 4}, + {"Decode", Func, 0}, + {"DecodeConfig", Func, 0}, + {"DefaultCompression", Const, 4}, + {"Encode", Func, 0}, + {"Encoder", Type, 4}, + {"Encoder.BufferPool", Field, 9}, + {"Encoder.CompressionLevel", Field, 4}, + {"EncoderBuffer", Type, 9}, + {"EncoderBufferPool", Type, 9}, + {"FormatError", Type, 0}, + {"NoCompression", Const, 4}, + {"UnsupportedError", Type, 0}, + }, + "index/suffixarray": { + {"(*Index).Bytes", Method, 0}, + {"(*Index).FindAllIndex", Method, 0}, + {"(*Index).Lookup", Method, 0}, + {"(*Index).Read", Method, 0}, + {"(*Index).Write", Method, 0}, + {"Index", Type, 0}, + {"New", Func, 0}, + }, + "io": { + {"(*LimitedReader).Read", Method, 0}, + {"(*OffsetWriter).Seek", Method, 20}, + {"(*OffsetWriter).Write", Method, 20}, + {"(*OffsetWriter).WriteAt", Method, 20}, + {"(*PipeReader).Close", Method, 0}, + {"(*PipeReader).CloseWithError", Method, 0}, + {"(*PipeReader).Read", Method, 0}, + {"(*PipeWriter).Close", Method, 0}, + {"(*PipeWriter).CloseWithError", Method, 0}, + {"(*PipeWriter).Write", Method, 0}, + {"(*SectionReader).Outer", Method, 22}, + {"(*SectionReader).Read", Method, 0}, + {"(*SectionReader).ReadAt", Method, 0}, + {"(*SectionReader).Seek", Method, 0}, + {"(*SectionReader).Size", Method, 0}, + {"ByteReader", Type, 0}, + {"ByteScanner", Type, 0}, + {"ByteWriter", Type, 1}, + {"Closer", Type, 0}, + {"Copy", Func, 0}, + {"CopyBuffer", Func, 5}, + {"CopyN", Func, 0}, + {"Discard", Var, 16}, + {"EOF", Var, 0}, + {"ErrClosedPipe", Var, 0}, + {"ErrNoProgress", Var, 1}, + {"ErrShortBuffer", Var, 0}, + {"ErrShortWrite", Var, 0}, + {"ErrUnexpectedEOF", Var, 0}, + {"LimitReader", Func, 0}, + {"LimitedReader", Type, 0}, + {"LimitedReader.N", Field, 0}, + {"LimitedReader.R", Field, 0}, + {"MultiReader", Func, 0}, + {"MultiWriter", Func, 0}, + {"NewOffsetWriter", Func, 20}, + {"NewSectionReader", Func, 0}, + {"NopCloser", Func, 16}, + {"OffsetWriter", Type, 20}, + {"Pipe", Func, 0}, + {"PipeReader", Type, 0}, + {"PipeWriter", Type, 0}, + {"ReadAll", Func, 16}, + {"ReadAtLeast", Func, 0}, + {"ReadCloser", Type, 0}, + {"ReadFull", Func, 0}, + {"ReadSeekCloser", Type, 16}, + {"ReadSeeker", Type, 0}, + {"ReadWriteCloser", Type, 0}, + {"ReadWriteSeeker", Type, 0}, + {"ReadWriter", Type, 0}, + {"Reader", Type, 0}, + {"ReaderAt", Type, 0}, + {"ReaderFrom", Type, 0}, + {"RuneReader", Type, 0}, + {"RuneScanner", Type, 0}, + {"SectionReader", Type, 0}, + {"SeekCurrent", Const, 7}, + {"SeekEnd", Const, 7}, + {"SeekStart", Const, 7}, + {"Seeker", Type, 0}, + {"StringWriter", Type, 12}, + {"TeeReader", Func, 0}, + {"WriteCloser", Type, 0}, + {"WriteSeeker", Type, 0}, + {"WriteString", Func, 0}, + {"Writer", Type, 0}, + {"WriterAt", Type, 0}, + {"WriterTo", Type, 0}, + }, + "io/fs": { + {"(*PathError).Error", Method, 16}, + {"(*PathError).Timeout", Method, 16}, + {"(*PathError).Unwrap", Method, 16}, + {"(FileMode).IsDir", Method, 16}, + {"(FileMode).IsRegular", Method, 16}, + {"(FileMode).Perm", Method, 16}, + {"(FileMode).String", Method, 16}, + {"(FileMode).Type", Method, 16}, + {"DirEntry", Type, 16}, + {"ErrClosed", Var, 16}, + {"ErrExist", Var, 16}, + {"ErrInvalid", Var, 16}, + {"ErrNotExist", Var, 16}, + {"ErrPermission", Var, 16}, + {"FS", Type, 16}, + {"File", Type, 16}, + {"FileInfo", Type, 16}, + {"FileInfoToDirEntry", Func, 17}, + {"FileMode", Type, 16}, + {"FormatDirEntry", Func, 21}, + {"FormatFileInfo", Func, 21}, + {"Glob", Func, 16}, + {"GlobFS", Type, 16}, + {"ModeAppend", Const, 16}, + {"ModeCharDevice", Const, 16}, + {"ModeDevice", Const, 16}, + {"ModeDir", Const, 16}, + {"ModeExclusive", Const, 16}, + {"ModeIrregular", Const, 16}, + {"ModeNamedPipe", Const, 16}, + {"ModePerm", Const, 16}, + {"ModeSetgid", Const, 16}, + {"ModeSetuid", Const, 16}, + {"ModeSocket", Const, 16}, + {"ModeSticky", Const, 16}, + {"ModeSymlink", Const, 16}, + {"ModeTemporary", Const, 16}, + {"ModeType", Const, 16}, + {"PathError", Type, 16}, + {"PathError.Err", Field, 16}, + {"PathError.Op", Field, 16}, + {"PathError.Path", Field, 16}, + {"ReadDir", Func, 16}, + {"ReadDirFS", Type, 16}, + {"ReadDirFile", Type, 16}, + {"ReadFile", Func, 16}, + {"ReadFileFS", Type, 16}, + {"SkipAll", Var, 20}, + {"SkipDir", Var, 16}, + {"Stat", Func, 16}, + {"StatFS", Type, 16}, + {"Sub", Func, 16}, + {"SubFS", Type, 16}, + {"ValidPath", Func, 16}, + {"WalkDir", Func, 16}, + {"WalkDirFunc", Type, 16}, + }, + "io/ioutil": { + {"Discard", Var, 0}, + {"NopCloser", Func, 0}, + {"ReadAll", Func, 0}, + {"ReadDir", Func, 0}, + {"ReadFile", Func, 0}, + {"TempDir", Func, 0}, + {"TempFile", Func, 0}, + {"WriteFile", Func, 0}, + }, + "log": { + {"(*Logger).Fatal", Method, 0}, + {"(*Logger).Fatalf", Method, 0}, + {"(*Logger).Fatalln", Method, 0}, + {"(*Logger).Flags", Method, 0}, + {"(*Logger).Output", Method, 0}, + {"(*Logger).Panic", Method, 0}, + {"(*Logger).Panicf", Method, 0}, + {"(*Logger).Panicln", Method, 0}, + {"(*Logger).Prefix", Method, 0}, + {"(*Logger).Print", Method, 0}, + {"(*Logger).Printf", Method, 0}, + {"(*Logger).Println", Method, 0}, + {"(*Logger).SetFlags", Method, 0}, + {"(*Logger).SetOutput", Method, 5}, + {"(*Logger).SetPrefix", Method, 0}, + {"(*Logger).Writer", Method, 12}, + {"Default", Func, 16}, + {"Fatal", Func, 0}, + {"Fatalf", Func, 0}, + {"Fatalln", Func, 0}, + {"Flags", Func, 0}, + {"LUTC", Const, 5}, + {"Ldate", Const, 0}, + {"Llongfile", Const, 0}, + {"Lmicroseconds", Const, 0}, + {"Lmsgprefix", Const, 14}, + {"Logger", Type, 0}, + {"Lshortfile", Const, 0}, + {"LstdFlags", Const, 0}, + {"Ltime", Const, 0}, + {"New", Func, 0}, + {"Output", Func, 5}, + {"Panic", Func, 0}, + {"Panicf", Func, 0}, + {"Panicln", Func, 0}, + {"Prefix", Func, 0}, + {"Print", Func, 0}, + {"Printf", Func, 0}, + {"Println", Func, 0}, + {"SetFlags", Func, 0}, + {"SetOutput", Func, 0}, + {"SetPrefix", Func, 0}, + {"Writer", Func, 13}, + }, + "log/slog": { + {"(*JSONHandler).Enabled", Method, 21}, + {"(*JSONHandler).Handle", Method, 21}, + {"(*JSONHandler).WithAttrs", Method, 21}, + {"(*JSONHandler).WithGroup", Method, 21}, + {"(*Level).UnmarshalJSON", Method, 21}, + {"(*Level).UnmarshalText", Method, 21}, + {"(*LevelVar).Level", Method, 21}, + {"(*LevelVar).MarshalText", Method, 21}, + {"(*LevelVar).Set", Method, 21}, + {"(*LevelVar).String", Method, 21}, + {"(*LevelVar).UnmarshalText", Method, 21}, + {"(*Logger).Debug", Method, 21}, + {"(*Logger).DebugContext", Method, 21}, + {"(*Logger).Enabled", Method, 21}, + {"(*Logger).Error", Method, 21}, + {"(*Logger).ErrorContext", Method, 21}, + {"(*Logger).Handler", Method, 21}, + {"(*Logger).Info", Method, 21}, + {"(*Logger).InfoContext", Method, 21}, + {"(*Logger).Log", Method, 21}, + {"(*Logger).LogAttrs", Method, 21}, + {"(*Logger).Warn", Method, 21}, + {"(*Logger).WarnContext", Method, 21}, + {"(*Logger).With", Method, 21}, + {"(*Logger).WithGroup", Method, 21}, + {"(*Record).Add", Method, 21}, + {"(*Record).AddAttrs", Method, 21}, + {"(*TextHandler).Enabled", Method, 21}, + {"(*TextHandler).Handle", Method, 21}, + {"(*TextHandler).WithAttrs", Method, 21}, + {"(*TextHandler).WithGroup", Method, 21}, + {"(Attr).Equal", Method, 21}, + {"(Attr).String", Method, 21}, + {"(Kind).String", Method, 21}, + {"(Level).Level", Method, 21}, + {"(Level).MarshalJSON", Method, 21}, + {"(Level).MarshalText", Method, 21}, + {"(Level).String", Method, 21}, + {"(Record).Attrs", Method, 21}, + {"(Record).Clone", Method, 21}, + {"(Record).NumAttrs", Method, 21}, + {"(Value).Any", Method, 21}, + {"(Value).Bool", Method, 21}, + {"(Value).Duration", Method, 21}, + {"(Value).Equal", Method, 21}, + {"(Value).Float64", Method, 21}, + {"(Value).Group", Method, 21}, + {"(Value).Int64", Method, 21}, + {"(Value).Kind", Method, 21}, + {"(Value).LogValuer", Method, 21}, + {"(Value).Resolve", Method, 21}, + {"(Value).String", Method, 21}, + {"(Value).Time", Method, 21}, + {"(Value).Uint64", Method, 21}, + {"Any", Func, 21}, + {"AnyValue", Func, 21}, + {"Attr", Type, 21}, + {"Attr.Key", Field, 21}, + {"Attr.Value", Field, 21}, + {"Bool", Func, 21}, + {"BoolValue", Func, 21}, + {"Debug", Func, 21}, + {"DebugContext", Func, 21}, + {"Default", Func, 21}, + {"Duration", Func, 21}, + {"DurationValue", Func, 21}, + {"Error", Func, 21}, + {"ErrorContext", Func, 21}, + {"Float64", Func, 21}, + {"Float64Value", Func, 21}, + {"Group", Func, 21}, + {"GroupValue", Func, 21}, + {"Handler", Type, 21}, + {"HandlerOptions", Type, 21}, + {"HandlerOptions.AddSource", Field, 21}, + {"HandlerOptions.Level", Field, 21}, + {"HandlerOptions.ReplaceAttr", Field, 21}, + {"Info", Func, 21}, + {"InfoContext", Func, 21}, + {"Int", Func, 21}, + {"Int64", Func, 21}, + {"Int64Value", Func, 21}, + {"IntValue", Func, 21}, + {"JSONHandler", Type, 21}, + {"Kind", Type, 21}, + {"KindAny", Const, 21}, + {"KindBool", Const, 21}, + {"KindDuration", Const, 21}, + {"KindFloat64", Const, 21}, + {"KindGroup", Const, 21}, + {"KindInt64", Const, 21}, + {"KindLogValuer", Const, 21}, + {"KindString", Const, 21}, + {"KindTime", Const, 21}, + {"KindUint64", Const, 21}, + {"Level", Type, 21}, + {"LevelDebug", Const, 21}, + {"LevelError", Const, 21}, + {"LevelInfo", Const, 21}, + {"LevelKey", Const, 21}, + {"LevelVar", Type, 21}, + {"LevelWarn", Const, 21}, + {"Leveler", Type, 21}, + {"Log", Func, 21}, + {"LogAttrs", Func, 21}, + {"LogValuer", Type, 21}, + {"Logger", Type, 21}, + {"MessageKey", Const, 21}, + {"New", Func, 21}, + {"NewJSONHandler", Func, 21}, + {"NewLogLogger", Func, 21}, + {"NewRecord", Func, 21}, + {"NewTextHandler", Func, 21}, + {"Record", Type, 21}, + {"Record.Level", Field, 21}, + {"Record.Message", Field, 21}, + {"Record.PC", Field, 21}, + {"Record.Time", Field, 21}, + {"SetDefault", Func, 21}, + {"SetLogLoggerLevel", Func, 22}, + {"Source", Type, 21}, + {"Source.File", Field, 21}, + {"Source.Function", Field, 21}, + {"Source.Line", Field, 21}, + {"SourceKey", Const, 21}, + {"String", Func, 21}, + {"StringValue", Func, 21}, + {"TextHandler", Type, 21}, + {"Time", Func, 21}, + {"TimeKey", Const, 21}, + {"TimeValue", Func, 21}, + {"Uint64", Func, 21}, + {"Uint64Value", Func, 21}, + {"Value", Type, 21}, + {"Warn", Func, 21}, + {"WarnContext", Func, 21}, + {"With", Func, 21}, + }, + "log/syslog": { + {"(*Writer).Alert", Method, 0}, + {"(*Writer).Close", Method, 0}, + {"(*Writer).Crit", Method, 0}, + {"(*Writer).Debug", Method, 0}, + {"(*Writer).Emerg", Method, 0}, + {"(*Writer).Err", Method, 0}, + {"(*Writer).Info", Method, 0}, + {"(*Writer).Notice", Method, 0}, + {"(*Writer).Warning", Method, 0}, + {"(*Writer).Write", Method, 0}, + {"Dial", Func, 0}, + {"LOG_ALERT", Const, 0}, + {"LOG_AUTH", Const, 1}, + {"LOG_AUTHPRIV", Const, 1}, + {"LOG_CRIT", Const, 0}, + {"LOG_CRON", Const, 1}, + {"LOG_DAEMON", Const, 1}, + {"LOG_DEBUG", Const, 0}, + {"LOG_EMERG", Const, 0}, + {"LOG_ERR", Const, 0}, + {"LOG_FTP", Const, 1}, + {"LOG_INFO", Const, 0}, + {"LOG_KERN", Const, 1}, + {"LOG_LOCAL0", Const, 1}, + {"LOG_LOCAL1", Const, 1}, + {"LOG_LOCAL2", Const, 1}, + {"LOG_LOCAL3", Const, 1}, + {"LOG_LOCAL4", Const, 1}, + {"LOG_LOCAL5", Const, 1}, + {"LOG_LOCAL6", Const, 1}, + {"LOG_LOCAL7", Const, 1}, + {"LOG_LPR", Const, 1}, + {"LOG_MAIL", Const, 1}, + {"LOG_NEWS", Const, 1}, + {"LOG_NOTICE", Const, 0}, + {"LOG_SYSLOG", Const, 1}, + {"LOG_USER", Const, 1}, + {"LOG_UUCP", Const, 1}, + {"LOG_WARNING", Const, 0}, + {"New", Func, 0}, + {"NewLogger", Func, 0}, + {"Priority", Type, 0}, + {"Writer", Type, 0}, + }, + "maps": { + {"Clone", Func, 21}, + {"Copy", Func, 21}, + {"DeleteFunc", Func, 21}, + {"Equal", Func, 21}, + {"EqualFunc", Func, 21}, + }, + "math": { + {"Abs", Func, 0}, + {"Acos", Func, 0}, + {"Acosh", Func, 0}, + {"Asin", Func, 0}, + {"Asinh", Func, 0}, + {"Atan", Func, 0}, + {"Atan2", Func, 0}, + {"Atanh", Func, 0}, + {"Cbrt", Func, 0}, + {"Ceil", Func, 0}, + {"Copysign", Func, 0}, + {"Cos", Func, 0}, + {"Cosh", Func, 0}, + {"Dim", Func, 0}, + {"E", Const, 0}, + {"Erf", Func, 0}, + {"Erfc", Func, 0}, + {"Erfcinv", Func, 10}, + {"Erfinv", Func, 10}, + {"Exp", Func, 0}, + {"Exp2", Func, 0}, + {"Expm1", Func, 0}, + {"FMA", Func, 14}, + {"Float32bits", Func, 0}, + {"Float32frombits", Func, 0}, + {"Float64bits", Func, 0}, + {"Float64frombits", Func, 0}, + {"Floor", Func, 0}, + {"Frexp", Func, 0}, + {"Gamma", Func, 0}, + {"Hypot", Func, 0}, + {"Ilogb", Func, 0}, + {"Inf", Func, 0}, + {"IsInf", Func, 0}, + {"IsNaN", Func, 0}, + {"J0", Func, 0}, + {"J1", Func, 0}, + {"Jn", Func, 0}, + {"Ldexp", Func, 0}, + {"Lgamma", Func, 0}, + {"Ln10", Const, 0}, + {"Ln2", Const, 0}, + {"Log", Func, 0}, + {"Log10", Func, 0}, + {"Log10E", Const, 0}, + {"Log1p", Func, 0}, + {"Log2", Func, 0}, + {"Log2E", Const, 0}, + {"Logb", Func, 0}, + {"Max", Func, 0}, + {"MaxFloat32", Const, 0}, + {"MaxFloat64", Const, 0}, + {"MaxInt", Const, 17}, + {"MaxInt16", Const, 0}, + {"MaxInt32", Const, 0}, + {"MaxInt64", Const, 0}, + {"MaxInt8", Const, 0}, + {"MaxUint", Const, 17}, + {"MaxUint16", Const, 0}, + {"MaxUint32", Const, 0}, + {"MaxUint64", Const, 0}, + {"MaxUint8", Const, 0}, + {"Min", Func, 0}, + {"MinInt", Const, 17}, + {"MinInt16", Const, 0}, + {"MinInt32", Const, 0}, + {"MinInt64", Const, 0}, + {"MinInt8", Const, 0}, + {"Mod", Func, 0}, + {"Modf", Func, 0}, + {"NaN", Func, 0}, + {"Nextafter", Func, 0}, + {"Nextafter32", Func, 4}, + {"Phi", Const, 0}, + {"Pi", Const, 0}, + {"Pow", Func, 0}, + {"Pow10", Func, 0}, + {"Remainder", Func, 0}, + {"Round", Func, 10}, + {"RoundToEven", Func, 10}, + {"Signbit", Func, 0}, + {"Sin", Func, 0}, + {"Sincos", Func, 0}, + {"Sinh", Func, 0}, + {"SmallestNonzeroFloat32", Const, 0}, + {"SmallestNonzeroFloat64", Const, 0}, + {"Sqrt", Func, 0}, + {"Sqrt2", Const, 0}, + {"SqrtE", Const, 0}, + {"SqrtPhi", Const, 0}, + {"SqrtPi", Const, 0}, + {"Tan", Func, 0}, + {"Tanh", Func, 0}, + {"Trunc", Func, 0}, + {"Y0", Func, 0}, + {"Y1", Func, 0}, + {"Yn", Func, 0}, + }, + "math/big": { + {"(*Float).Abs", Method, 5}, + {"(*Float).Acc", Method, 5}, + {"(*Float).Add", Method, 5}, + {"(*Float).Append", Method, 5}, + {"(*Float).Cmp", Method, 5}, + {"(*Float).Copy", Method, 5}, + {"(*Float).Float32", Method, 5}, + {"(*Float).Float64", Method, 5}, + {"(*Float).Format", Method, 5}, + {"(*Float).GobDecode", Method, 7}, + {"(*Float).GobEncode", Method, 7}, + {"(*Float).Int", Method, 5}, + {"(*Float).Int64", Method, 5}, + {"(*Float).IsInf", Method, 5}, + {"(*Float).IsInt", Method, 5}, + {"(*Float).MantExp", Method, 5}, + {"(*Float).MarshalText", Method, 6}, + {"(*Float).MinPrec", Method, 5}, + {"(*Float).Mode", Method, 5}, + {"(*Float).Mul", Method, 5}, + {"(*Float).Neg", Method, 5}, + {"(*Float).Parse", Method, 5}, + {"(*Float).Prec", Method, 5}, + {"(*Float).Quo", Method, 5}, + {"(*Float).Rat", Method, 5}, + {"(*Float).Scan", Method, 8}, + {"(*Float).Set", Method, 5}, + {"(*Float).SetFloat64", Method, 5}, + {"(*Float).SetInf", Method, 5}, + {"(*Float).SetInt", Method, 5}, + {"(*Float).SetInt64", Method, 5}, + {"(*Float).SetMantExp", Method, 5}, + {"(*Float).SetMode", Method, 5}, + {"(*Float).SetPrec", Method, 5}, + {"(*Float).SetRat", Method, 5}, + {"(*Float).SetString", Method, 5}, + {"(*Float).SetUint64", Method, 5}, + {"(*Float).Sign", Method, 5}, + {"(*Float).Signbit", Method, 5}, + {"(*Float).Sqrt", Method, 10}, + {"(*Float).String", Method, 5}, + {"(*Float).Sub", Method, 5}, + {"(*Float).Text", Method, 5}, + {"(*Float).Uint64", Method, 5}, + {"(*Float).UnmarshalText", Method, 6}, + {"(*Int).Abs", Method, 0}, + {"(*Int).Add", Method, 0}, + {"(*Int).And", Method, 0}, + {"(*Int).AndNot", Method, 0}, + {"(*Int).Append", Method, 6}, + {"(*Int).Binomial", Method, 0}, + {"(*Int).Bit", Method, 0}, + {"(*Int).BitLen", Method, 0}, + {"(*Int).Bits", Method, 0}, + {"(*Int).Bytes", Method, 0}, + {"(*Int).Cmp", Method, 0}, + {"(*Int).CmpAbs", Method, 10}, + {"(*Int).Div", Method, 0}, + {"(*Int).DivMod", Method, 0}, + {"(*Int).Exp", Method, 0}, + {"(*Int).FillBytes", Method, 15}, + {"(*Int).Float64", Method, 21}, + {"(*Int).Format", Method, 0}, + {"(*Int).GCD", Method, 0}, + {"(*Int).GobDecode", Method, 0}, + {"(*Int).GobEncode", Method, 0}, + {"(*Int).Int64", Method, 0}, + {"(*Int).IsInt64", Method, 9}, + {"(*Int).IsUint64", Method, 9}, + {"(*Int).Lsh", Method, 0}, + {"(*Int).MarshalJSON", Method, 1}, + {"(*Int).MarshalText", Method, 3}, + {"(*Int).Mod", Method, 0}, + {"(*Int).ModInverse", Method, 0}, + {"(*Int).ModSqrt", Method, 5}, + {"(*Int).Mul", Method, 0}, + {"(*Int).MulRange", Method, 0}, + {"(*Int).Neg", Method, 0}, + {"(*Int).Not", Method, 0}, + {"(*Int).Or", Method, 0}, + {"(*Int).ProbablyPrime", Method, 0}, + {"(*Int).Quo", Method, 0}, + {"(*Int).QuoRem", Method, 0}, + {"(*Int).Rand", Method, 0}, + {"(*Int).Rem", Method, 0}, + {"(*Int).Rsh", Method, 0}, + {"(*Int).Scan", Method, 0}, + {"(*Int).Set", Method, 0}, + {"(*Int).SetBit", Method, 0}, + {"(*Int).SetBits", Method, 0}, + {"(*Int).SetBytes", Method, 0}, + {"(*Int).SetInt64", Method, 0}, + {"(*Int).SetString", Method, 0}, + {"(*Int).SetUint64", Method, 1}, + {"(*Int).Sign", Method, 0}, + {"(*Int).Sqrt", Method, 8}, + {"(*Int).String", Method, 0}, + {"(*Int).Sub", Method, 0}, + {"(*Int).Text", Method, 6}, + {"(*Int).TrailingZeroBits", Method, 13}, + {"(*Int).Uint64", Method, 1}, + {"(*Int).UnmarshalJSON", Method, 1}, + {"(*Int).UnmarshalText", Method, 3}, + {"(*Int).Xor", Method, 0}, + {"(*Rat).Abs", Method, 0}, + {"(*Rat).Add", Method, 0}, + {"(*Rat).Cmp", Method, 0}, + {"(*Rat).Denom", Method, 0}, + {"(*Rat).Float32", Method, 4}, + {"(*Rat).Float64", Method, 1}, + {"(*Rat).FloatPrec", Method, 22}, + {"(*Rat).FloatString", Method, 0}, + {"(*Rat).GobDecode", Method, 0}, + {"(*Rat).GobEncode", Method, 0}, + {"(*Rat).Inv", Method, 0}, + {"(*Rat).IsInt", Method, 0}, + {"(*Rat).MarshalText", Method, 3}, + {"(*Rat).Mul", Method, 0}, + {"(*Rat).Neg", Method, 0}, + {"(*Rat).Num", Method, 0}, + {"(*Rat).Quo", Method, 0}, + {"(*Rat).RatString", Method, 0}, + {"(*Rat).Scan", Method, 0}, + {"(*Rat).Set", Method, 0}, + {"(*Rat).SetFloat64", Method, 1}, + {"(*Rat).SetFrac", Method, 0}, + {"(*Rat).SetFrac64", Method, 0}, + {"(*Rat).SetInt", Method, 0}, + {"(*Rat).SetInt64", Method, 0}, + {"(*Rat).SetString", Method, 0}, + {"(*Rat).SetUint64", Method, 13}, + {"(*Rat).Sign", Method, 0}, + {"(*Rat).String", Method, 0}, + {"(*Rat).Sub", Method, 0}, + {"(*Rat).UnmarshalText", Method, 3}, + {"(Accuracy).String", Method, 5}, + {"(ErrNaN).Error", Method, 5}, + {"(RoundingMode).String", Method, 5}, + {"Above", Const, 5}, + {"Accuracy", Type, 5}, + {"AwayFromZero", Const, 5}, + {"Below", Const, 5}, + {"ErrNaN", Type, 5}, + {"Exact", Const, 5}, + {"Float", Type, 5}, + {"Int", Type, 0}, + {"Jacobi", Func, 5}, + {"MaxBase", Const, 0}, + {"MaxExp", Const, 5}, + {"MaxPrec", Const, 5}, + {"MinExp", Const, 5}, + {"NewFloat", Func, 5}, + {"NewInt", Func, 0}, + {"NewRat", Func, 0}, + {"ParseFloat", Func, 5}, + {"Rat", Type, 0}, + {"RoundingMode", Type, 5}, + {"ToNearestAway", Const, 5}, + {"ToNearestEven", Const, 5}, + {"ToNegativeInf", Const, 5}, + {"ToPositiveInf", Const, 5}, + {"ToZero", Const, 5}, + {"Word", Type, 0}, + }, + "math/bits": { + {"Add", Func, 12}, + {"Add32", Func, 12}, + {"Add64", Func, 12}, + {"Div", Func, 12}, + {"Div32", Func, 12}, + {"Div64", Func, 12}, + {"LeadingZeros", Func, 9}, + {"LeadingZeros16", Func, 9}, + {"LeadingZeros32", Func, 9}, + {"LeadingZeros64", Func, 9}, + {"LeadingZeros8", Func, 9}, + {"Len", Func, 9}, + {"Len16", Func, 9}, + {"Len32", Func, 9}, + {"Len64", Func, 9}, + {"Len8", Func, 9}, + {"Mul", Func, 12}, + {"Mul32", Func, 12}, + {"Mul64", Func, 12}, + {"OnesCount", Func, 9}, + {"OnesCount16", Func, 9}, + {"OnesCount32", Func, 9}, + {"OnesCount64", Func, 9}, + {"OnesCount8", Func, 9}, + {"Rem", Func, 14}, + {"Rem32", Func, 14}, + {"Rem64", Func, 14}, + {"Reverse", Func, 9}, + {"Reverse16", Func, 9}, + {"Reverse32", Func, 9}, + {"Reverse64", Func, 9}, + {"Reverse8", Func, 9}, + {"ReverseBytes", Func, 9}, + {"ReverseBytes16", Func, 9}, + {"ReverseBytes32", Func, 9}, + {"ReverseBytes64", Func, 9}, + {"RotateLeft", Func, 9}, + {"RotateLeft16", Func, 9}, + {"RotateLeft32", Func, 9}, + {"RotateLeft64", Func, 9}, + {"RotateLeft8", Func, 9}, + {"Sub", Func, 12}, + {"Sub32", Func, 12}, + {"Sub64", Func, 12}, + {"TrailingZeros", Func, 9}, + {"TrailingZeros16", Func, 9}, + {"TrailingZeros32", Func, 9}, + {"TrailingZeros64", Func, 9}, + {"TrailingZeros8", Func, 9}, + {"UintSize", Const, 9}, + }, + "math/cmplx": { + {"Abs", Func, 0}, + {"Acos", Func, 0}, + {"Acosh", Func, 0}, + {"Asin", Func, 0}, + {"Asinh", Func, 0}, + {"Atan", Func, 0}, + {"Atanh", Func, 0}, + {"Conj", Func, 0}, + {"Cos", Func, 0}, + {"Cosh", Func, 0}, + {"Cot", Func, 0}, + {"Exp", Func, 0}, + {"Inf", Func, 0}, + {"IsInf", Func, 0}, + {"IsNaN", Func, 0}, + {"Log", Func, 0}, + {"Log10", Func, 0}, + {"NaN", Func, 0}, + {"Phase", Func, 0}, + {"Polar", Func, 0}, + {"Pow", Func, 0}, + {"Rect", Func, 0}, + {"Sin", Func, 0}, + {"Sinh", Func, 0}, + {"Sqrt", Func, 0}, + {"Tan", Func, 0}, + {"Tanh", Func, 0}, + }, + "math/rand": { + {"(*Rand).ExpFloat64", Method, 0}, + {"(*Rand).Float32", Method, 0}, + {"(*Rand).Float64", Method, 0}, + {"(*Rand).Int", Method, 0}, + {"(*Rand).Int31", Method, 0}, + {"(*Rand).Int31n", Method, 0}, + {"(*Rand).Int63", Method, 0}, + {"(*Rand).Int63n", Method, 0}, + {"(*Rand).Intn", Method, 0}, + {"(*Rand).NormFloat64", Method, 0}, + {"(*Rand).Perm", Method, 0}, + {"(*Rand).Read", Method, 6}, + {"(*Rand).Seed", Method, 0}, + {"(*Rand).Shuffle", Method, 10}, + {"(*Rand).Uint32", Method, 0}, + {"(*Rand).Uint64", Method, 8}, + {"(*Zipf).Uint64", Method, 0}, + {"ExpFloat64", Func, 0}, + {"Float32", Func, 0}, + {"Float64", Func, 0}, + {"Int", Func, 0}, + {"Int31", Func, 0}, + {"Int31n", Func, 0}, + {"Int63", Func, 0}, + {"Int63n", Func, 0}, + {"Intn", Func, 0}, + {"New", Func, 0}, + {"NewSource", Func, 0}, + {"NewZipf", Func, 0}, + {"NormFloat64", Func, 0}, + {"Perm", Func, 0}, + {"Rand", Type, 0}, + {"Read", Func, 6}, + {"Seed", Func, 0}, + {"Shuffle", Func, 10}, + {"Source", Type, 0}, + {"Source64", Type, 8}, + {"Uint32", Func, 0}, + {"Uint64", Func, 8}, + {"Zipf", Type, 0}, + }, + "math/rand/v2": { + {"(*ChaCha8).MarshalBinary", Method, 22}, + {"(*ChaCha8).Seed", Method, 22}, + {"(*ChaCha8).Uint64", Method, 22}, + {"(*ChaCha8).UnmarshalBinary", Method, 22}, + {"(*PCG).MarshalBinary", Method, 22}, + {"(*PCG).Seed", Method, 22}, + {"(*PCG).Uint64", Method, 22}, + {"(*PCG).UnmarshalBinary", Method, 22}, + {"(*Rand).ExpFloat64", Method, 22}, + {"(*Rand).Float32", Method, 22}, + {"(*Rand).Float64", Method, 22}, + {"(*Rand).Int", Method, 22}, + {"(*Rand).Int32", Method, 22}, + {"(*Rand).Int32N", Method, 22}, + {"(*Rand).Int64", Method, 22}, + {"(*Rand).Int64N", Method, 22}, + {"(*Rand).IntN", Method, 22}, + {"(*Rand).NormFloat64", Method, 22}, + {"(*Rand).Perm", Method, 22}, + {"(*Rand).Shuffle", Method, 22}, + {"(*Rand).Uint32", Method, 22}, + {"(*Rand).Uint32N", Method, 22}, + {"(*Rand).Uint64", Method, 22}, + {"(*Rand).Uint64N", Method, 22}, + {"(*Rand).UintN", Method, 22}, + {"(*Zipf).Uint64", Method, 22}, + {"ChaCha8", Type, 22}, + {"ExpFloat64", Func, 22}, + {"Float32", Func, 22}, + {"Float64", Func, 22}, + {"Int", Func, 22}, + {"Int32", Func, 22}, + {"Int32N", Func, 22}, + {"Int64", Func, 22}, + {"Int64N", Func, 22}, + {"IntN", Func, 22}, + {"N", Func, 22}, + {"New", Func, 22}, + {"NewChaCha8", Func, 22}, + {"NewPCG", Func, 22}, + {"NewZipf", Func, 22}, + {"NormFloat64", Func, 22}, + {"PCG", Type, 22}, + {"Perm", Func, 22}, + {"Rand", Type, 22}, + {"Shuffle", Func, 22}, + {"Source", Type, 22}, + {"Uint32", Func, 22}, + {"Uint32N", Func, 22}, + {"Uint64", Func, 22}, + {"Uint64N", Func, 22}, + {"UintN", Func, 22}, + {"Zipf", Type, 22}, + }, + "mime": { + {"(*WordDecoder).Decode", Method, 5}, + {"(*WordDecoder).DecodeHeader", Method, 5}, + {"(WordEncoder).Encode", Method, 5}, + {"AddExtensionType", Func, 0}, + {"BEncoding", Const, 5}, + {"ErrInvalidMediaParameter", Var, 9}, + {"ExtensionsByType", Func, 5}, + {"FormatMediaType", Func, 0}, + {"ParseMediaType", Func, 0}, + {"QEncoding", Const, 5}, + {"TypeByExtension", Func, 0}, + {"WordDecoder", Type, 5}, + {"WordDecoder.CharsetReader", Field, 5}, + {"WordEncoder", Type, 5}, + }, + "mime/multipart": { + {"(*FileHeader).Open", Method, 0}, + {"(*Form).RemoveAll", Method, 0}, + {"(*Part).Close", Method, 0}, + {"(*Part).FileName", Method, 0}, + {"(*Part).FormName", Method, 0}, + {"(*Part).Read", Method, 0}, + {"(*Reader).NextPart", Method, 0}, + {"(*Reader).NextRawPart", Method, 14}, + {"(*Reader).ReadForm", Method, 0}, + {"(*Writer).Boundary", Method, 0}, + {"(*Writer).Close", Method, 0}, + {"(*Writer).CreateFormField", Method, 0}, + {"(*Writer).CreateFormFile", Method, 0}, + {"(*Writer).CreatePart", Method, 0}, + {"(*Writer).FormDataContentType", Method, 0}, + {"(*Writer).SetBoundary", Method, 1}, + {"(*Writer).WriteField", Method, 0}, + {"ErrMessageTooLarge", Var, 9}, + {"File", Type, 0}, + {"FileHeader", Type, 0}, + {"FileHeader.Filename", Field, 0}, + {"FileHeader.Header", Field, 0}, + {"FileHeader.Size", Field, 9}, + {"Form", Type, 0}, + {"Form.File", Field, 0}, + {"Form.Value", Field, 0}, + {"NewReader", Func, 0}, + {"NewWriter", Func, 0}, + {"Part", Type, 0}, + {"Part.Header", Field, 0}, + {"Reader", Type, 0}, + {"Writer", Type, 0}, + }, + "mime/quotedprintable": { + {"(*Reader).Read", Method, 5}, + {"(*Writer).Close", Method, 5}, + {"(*Writer).Write", Method, 5}, + {"NewReader", Func, 5}, + {"NewWriter", Func, 5}, + {"Reader", Type, 5}, + {"Writer", Type, 5}, + {"Writer.Binary", Field, 5}, + }, + "net": { + {"(*AddrError).Error", Method, 0}, + {"(*AddrError).Temporary", Method, 0}, + {"(*AddrError).Timeout", Method, 0}, + {"(*Buffers).Read", Method, 8}, + {"(*Buffers).WriteTo", Method, 8}, + {"(*DNSConfigError).Error", Method, 0}, + {"(*DNSConfigError).Temporary", Method, 0}, + {"(*DNSConfigError).Timeout", Method, 0}, + {"(*DNSConfigError).Unwrap", Method, 13}, + {"(*DNSError).Error", Method, 0}, + {"(*DNSError).Temporary", Method, 0}, + {"(*DNSError).Timeout", Method, 0}, + {"(*Dialer).Dial", Method, 1}, + {"(*Dialer).DialContext", Method, 7}, + {"(*Dialer).MultipathTCP", Method, 21}, + {"(*Dialer).SetMultipathTCP", Method, 21}, + {"(*IP).UnmarshalText", Method, 2}, + {"(*IPAddr).Network", Method, 0}, + {"(*IPAddr).String", Method, 0}, + {"(*IPConn).Close", Method, 0}, + {"(*IPConn).File", Method, 0}, + {"(*IPConn).LocalAddr", Method, 0}, + {"(*IPConn).Read", Method, 0}, + {"(*IPConn).ReadFrom", Method, 0}, + {"(*IPConn).ReadFromIP", Method, 0}, + {"(*IPConn).ReadMsgIP", Method, 1}, + {"(*IPConn).RemoteAddr", Method, 0}, + {"(*IPConn).SetDeadline", Method, 0}, + {"(*IPConn).SetReadBuffer", Method, 0}, + {"(*IPConn).SetReadDeadline", Method, 0}, + {"(*IPConn).SetWriteBuffer", Method, 0}, + {"(*IPConn).SetWriteDeadline", Method, 0}, + {"(*IPConn).SyscallConn", Method, 9}, + {"(*IPConn).Write", Method, 0}, + {"(*IPConn).WriteMsgIP", Method, 1}, + {"(*IPConn).WriteTo", Method, 0}, + {"(*IPConn).WriteToIP", Method, 0}, + {"(*IPNet).Contains", Method, 0}, + {"(*IPNet).Network", Method, 0}, + {"(*IPNet).String", Method, 0}, + {"(*Interface).Addrs", Method, 0}, + {"(*Interface).MulticastAddrs", Method, 0}, + {"(*ListenConfig).Listen", Method, 11}, + {"(*ListenConfig).ListenPacket", Method, 11}, + {"(*ListenConfig).MultipathTCP", Method, 21}, + {"(*ListenConfig).SetMultipathTCP", Method, 21}, + {"(*OpError).Error", Method, 0}, + {"(*OpError).Temporary", Method, 0}, + {"(*OpError).Timeout", Method, 0}, + {"(*OpError).Unwrap", Method, 13}, + {"(*ParseError).Error", Method, 0}, + {"(*ParseError).Temporary", Method, 17}, + {"(*ParseError).Timeout", Method, 17}, + {"(*Resolver).LookupAddr", Method, 8}, + {"(*Resolver).LookupCNAME", Method, 8}, + {"(*Resolver).LookupHost", Method, 8}, + {"(*Resolver).LookupIP", Method, 15}, + {"(*Resolver).LookupIPAddr", Method, 8}, + {"(*Resolver).LookupMX", Method, 8}, + {"(*Resolver).LookupNS", Method, 8}, + {"(*Resolver).LookupNetIP", Method, 18}, + {"(*Resolver).LookupPort", Method, 8}, + {"(*Resolver).LookupSRV", Method, 8}, + {"(*Resolver).LookupTXT", Method, 8}, + {"(*TCPAddr).AddrPort", Method, 18}, + {"(*TCPAddr).Network", Method, 0}, + {"(*TCPAddr).String", Method, 0}, + {"(*TCPConn).Close", Method, 0}, + {"(*TCPConn).CloseRead", Method, 0}, + {"(*TCPConn).CloseWrite", Method, 0}, + {"(*TCPConn).File", Method, 0}, + {"(*TCPConn).LocalAddr", Method, 0}, + {"(*TCPConn).MultipathTCP", Method, 21}, + {"(*TCPConn).Read", Method, 0}, + {"(*TCPConn).ReadFrom", Method, 0}, + {"(*TCPConn).RemoteAddr", Method, 0}, + {"(*TCPConn).SetDeadline", Method, 0}, + {"(*TCPConn).SetKeepAlive", Method, 0}, + {"(*TCPConn).SetKeepAlivePeriod", Method, 2}, + {"(*TCPConn).SetLinger", Method, 0}, + {"(*TCPConn).SetNoDelay", Method, 0}, + {"(*TCPConn).SetReadBuffer", Method, 0}, + {"(*TCPConn).SetReadDeadline", Method, 0}, + {"(*TCPConn).SetWriteBuffer", Method, 0}, + {"(*TCPConn).SetWriteDeadline", Method, 0}, + {"(*TCPConn).SyscallConn", Method, 9}, + {"(*TCPConn).Write", Method, 0}, + {"(*TCPConn).WriteTo", Method, 22}, + {"(*TCPListener).Accept", Method, 0}, + {"(*TCPListener).AcceptTCP", Method, 0}, + {"(*TCPListener).Addr", Method, 0}, + {"(*TCPListener).Close", Method, 0}, + {"(*TCPListener).File", Method, 0}, + {"(*TCPListener).SetDeadline", Method, 0}, + {"(*TCPListener).SyscallConn", Method, 10}, + {"(*UDPAddr).AddrPort", Method, 18}, + {"(*UDPAddr).Network", Method, 0}, + {"(*UDPAddr).String", Method, 0}, + {"(*UDPConn).Close", Method, 0}, + {"(*UDPConn).File", Method, 0}, + {"(*UDPConn).LocalAddr", Method, 0}, + {"(*UDPConn).Read", Method, 0}, + {"(*UDPConn).ReadFrom", Method, 0}, + {"(*UDPConn).ReadFromUDP", Method, 0}, + {"(*UDPConn).ReadFromUDPAddrPort", Method, 18}, + {"(*UDPConn).ReadMsgUDP", Method, 1}, + {"(*UDPConn).ReadMsgUDPAddrPort", Method, 18}, + {"(*UDPConn).RemoteAddr", Method, 0}, + {"(*UDPConn).SetDeadline", Method, 0}, + {"(*UDPConn).SetReadBuffer", Method, 0}, + {"(*UDPConn).SetReadDeadline", Method, 0}, + {"(*UDPConn).SetWriteBuffer", Method, 0}, + {"(*UDPConn).SetWriteDeadline", Method, 0}, + {"(*UDPConn).SyscallConn", Method, 9}, + {"(*UDPConn).Write", Method, 0}, + {"(*UDPConn).WriteMsgUDP", Method, 1}, + {"(*UDPConn).WriteMsgUDPAddrPort", Method, 18}, + {"(*UDPConn).WriteTo", Method, 0}, + {"(*UDPConn).WriteToUDP", Method, 0}, + {"(*UDPConn).WriteToUDPAddrPort", Method, 18}, + {"(*UnixAddr).Network", Method, 0}, + {"(*UnixAddr).String", Method, 0}, + {"(*UnixConn).Close", Method, 0}, + {"(*UnixConn).CloseRead", Method, 1}, + {"(*UnixConn).CloseWrite", Method, 1}, + {"(*UnixConn).File", Method, 0}, + {"(*UnixConn).LocalAddr", Method, 0}, + {"(*UnixConn).Read", Method, 0}, + {"(*UnixConn).ReadFrom", Method, 0}, + {"(*UnixConn).ReadFromUnix", Method, 0}, + {"(*UnixConn).ReadMsgUnix", Method, 0}, + {"(*UnixConn).RemoteAddr", Method, 0}, + {"(*UnixConn).SetDeadline", Method, 0}, + {"(*UnixConn).SetReadBuffer", Method, 0}, + {"(*UnixConn).SetReadDeadline", Method, 0}, + {"(*UnixConn).SetWriteBuffer", Method, 0}, + {"(*UnixConn).SetWriteDeadline", Method, 0}, + {"(*UnixConn).SyscallConn", Method, 9}, + {"(*UnixConn).Write", Method, 0}, + {"(*UnixConn).WriteMsgUnix", Method, 0}, + {"(*UnixConn).WriteTo", Method, 0}, + {"(*UnixConn).WriteToUnix", Method, 0}, + {"(*UnixListener).Accept", Method, 0}, + {"(*UnixListener).AcceptUnix", Method, 0}, + {"(*UnixListener).Addr", Method, 0}, + {"(*UnixListener).Close", Method, 0}, + {"(*UnixListener).File", Method, 0}, + {"(*UnixListener).SetDeadline", Method, 0}, + {"(*UnixListener).SetUnlinkOnClose", Method, 8}, + {"(*UnixListener).SyscallConn", Method, 10}, + {"(Flags).String", Method, 0}, + {"(HardwareAddr).String", Method, 0}, + {"(IP).DefaultMask", Method, 0}, + {"(IP).Equal", Method, 0}, + {"(IP).IsGlobalUnicast", Method, 0}, + {"(IP).IsInterfaceLocalMulticast", Method, 0}, + {"(IP).IsLinkLocalMulticast", Method, 0}, + {"(IP).IsLinkLocalUnicast", Method, 0}, + {"(IP).IsLoopback", Method, 0}, + {"(IP).IsMulticast", Method, 0}, + {"(IP).IsPrivate", Method, 17}, + {"(IP).IsUnspecified", Method, 0}, + {"(IP).MarshalText", Method, 2}, + {"(IP).Mask", Method, 0}, + {"(IP).String", Method, 0}, + {"(IP).To16", Method, 0}, + {"(IP).To4", Method, 0}, + {"(IPMask).Size", Method, 0}, + {"(IPMask).String", Method, 0}, + {"(InvalidAddrError).Error", Method, 0}, + {"(InvalidAddrError).Temporary", Method, 0}, + {"(InvalidAddrError).Timeout", Method, 0}, + {"(UnknownNetworkError).Error", Method, 0}, + {"(UnknownNetworkError).Temporary", Method, 0}, + {"(UnknownNetworkError).Timeout", Method, 0}, + {"Addr", Type, 0}, + {"AddrError", Type, 0}, + {"AddrError.Addr", Field, 0}, + {"AddrError.Err", Field, 0}, + {"Buffers", Type, 8}, + {"CIDRMask", Func, 0}, + {"Conn", Type, 0}, + {"DNSConfigError", Type, 0}, + {"DNSConfigError.Err", Field, 0}, + {"DNSError", Type, 0}, + {"DNSError.Err", Field, 0}, + {"DNSError.IsNotFound", Field, 13}, + {"DNSError.IsTemporary", Field, 6}, + {"DNSError.IsTimeout", Field, 0}, + {"DNSError.Name", Field, 0}, + {"DNSError.Server", Field, 0}, + {"DefaultResolver", Var, 8}, + {"Dial", Func, 0}, + {"DialIP", Func, 0}, + {"DialTCP", Func, 0}, + {"DialTimeout", Func, 0}, + {"DialUDP", Func, 0}, + {"DialUnix", Func, 0}, + {"Dialer", Type, 1}, + {"Dialer.Cancel", Field, 6}, + {"Dialer.Control", Field, 11}, + {"Dialer.ControlContext", Field, 20}, + {"Dialer.Deadline", Field, 1}, + {"Dialer.DualStack", Field, 2}, + {"Dialer.FallbackDelay", Field, 5}, + {"Dialer.KeepAlive", Field, 3}, + {"Dialer.LocalAddr", Field, 1}, + {"Dialer.Resolver", Field, 8}, + {"Dialer.Timeout", Field, 1}, + {"ErrClosed", Var, 16}, + {"ErrWriteToConnected", Var, 0}, + {"Error", Type, 0}, + {"FileConn", Func, 0}, + {"FileListener", Func, 0}, + {"FilePacketConn", Func, 0}, + {"FlagBroadcast", Const, 0}, + {"FlagLoopback", Const, 0}, + {"FlagMulticast", Const, 0}, + {"FlagPointToPoint", Const, 0}, + {"FlagRunning", Const, 20}, + {"FlagUp", Const, 0}, + {"Flags", Type, 0}, + {"HardwareAddr", Type, 0}, + {"IP", Type, 0}, + {"IPAddr", Type, 0}, + {"IPAddr.IP", Field, 0}, + {"IPAddr.Zone", Field, 1}, + {"IPConn", Type, 0}, + {"IPMask", Type, 0}, + {"IPNet", Type, 0}, + {"IPNet.IP", Field, 0}, + {"IPNet.Mask", Field, 0}, + {"IPv4", Func, 0}, + {"IPv4Mask", Func, 0}, + {"IPv4allrouter", Var, 0}, + {"IPv4allsys", Var, 0}, + {"IPv4bcast", Var, 0}, + {"IPv4len", Const, 0}, + {"IPv4zero", Var, 0}, + {"IPv6interfacelocalallnodes", Var, 0}, + {"IPv6len", Const, 0}, + {"IPv6linklocalallnodes", Var, 0}, + {"IPv6linklocalallrouters", Var, 0}, + {"IPv6loopback", Var, 0}, + {"IPv6unspecified", Var, 0}, + {"IPv6zero", Var, 0}, + {"Interface", Type, 0}, + {"Interface.Flags", Field, 0}, + {"Interface.HardwareAddr", Field, 0}, + {"Interface.Index", Field, 0}, + {"Interface.MTU", Field, 0}, + {"Interface.Name", Field, 0}, + {"InterfaceAddrs", Func, 0}, + {"InterfaceByIndex", Func, 0}, + {"InterfaceByName", Func, 0}, + {"Interfaces", Func, 0}, + {"InvalidAddrError", Type, 0}, + {"JoinHostPort", Func, 0}, + {"Listen", Func, 0}, + {"ListenConfig", Type, 11}, + {"ListenConfig.Control", Field, 11}, + {"ListenConfig.KeepAlive", Field, 13}, + {"ListenIP", Func, 0}, + {"ListenMulticastUDP", Func, 0}, + {"ListenPacket", Func, 0}, + {"ListenTCP", Func, 0}, + {"ListenUDP", Func, 0}, + {"ListenUnix", Func, 0}, + {"ListenUnixgram", Func, 0}, + {"Listener", Type, 0}, + {"LookupAddr", Func, 0}, + {"LookupCNAME", Func, 0}, + {"LookupHost", Func, 0}, + {"LookupIP", Func, 0}, + {"LookupMX", Func, 0}, + {"LookupNS", Func, 1}, + {"LookupPort", Func, 0}, + {"LookupSRV", Func, 0}, + {"LookupTXT", Func, 0}, + {"MX", Type, 0}, + {"MX.Host", Field, 0}, + {"MX.Pref", Field, 0}, + {"NS", Type, 1}, + {"NS.Host", Field, 1}, + {"OpError", Type, 0}, + {"OpError.Addr", Field, 0}, + {"OpError.Err", Field, 0}, + {"OpError.Net", Field, 0}, + {"OpError.Op", Field, 0}, + {"OpError.Source", Field, 5}, + {"PacketConn", Type, 0}, + {"ParseCIDR", Func, 0}, + {"ParseError", Type, 0}, + {"ParseError.Text", Field, 0}, + {"ParseError.Type", Field, 0}, + {"ParseIP", Func, 0}, + {"ParseMAC", Func, 0}, + {"Pipe", Func, 0}, + {"ResolveIPAddr", Func, 0}, + {"ResolveTCPAddr", Func, 0}, + {"ResolveUDPAddr", Func, 0}, + {"ResolveUnixAddr", Func, 0}, + {"Resolver", Type, 8}, + {"Resolver.Dial", Field, 9}, + {"Resolver.PreferGo", Field, 8}, + {"Resolver.StrictErrors", Field, 9}, + {"SRV", Type, 0}, + {"SRV.Port", Field, 0}, + {"SRV.Priority", Field, 0}, + {"SRV.Target", Field, 0}, + {"SRV.Weight", Field, 0}, + {"SplitHostPort", Func, 0}, + {"TCPAddr", Type, 0}, + {"TCPAddr.IP", Field, 0}, + {"TCPAddr.Port", Field, 0}, + {"TCPAddr.Zone", Field, 1}, + {"TCPAddrFromAddrPort", Func, 18}, + {"TCPConn", Type, 0}, + {"TCPListener", Type, 0}, + {"UDPAddr", Type, 0}, + {"UDPAddr.IP", Field, 0}, + {"UDPAddr.Port", Field, 0}, + {"UDPAddr.Zone", Field, 1}, + {"UDPAddrFromAddrPort", Func, 18}, + {"UDPConn", Type, 0}, + {"UnixAddr", Type, 0}, + {"UnixAddr.Name", Field, 0}, + {"UnixAddr.Net", Field, 0}, + {"UnixConn", Type, 0}, + {"UnixListener", Type, 0}, + {"UnknownNetworkError", Type, 0}, + }, + "net/http": { + {"(*Client).CloseIdleConnections", Method, 12}, + {"(*Client).Do", Method, 0}, + {"(*Client).Get", Method, 0}, + {"(*Client).Head", Method, 0}, + {"(*Client).Post", Method, 0}, + {"(*Client).PostForm", Method, 0}, + {"(*Cookie).String", Method, 0}, + {"(*Cookie).Valid", Method, 18}, + {"(*MaxBytesError).Error", Method, 19}, + {"(*ProtocolError).Error", Method, 0}, + {"(*ProtocolError).Is", Method, 21}, + {"(*Request).AddCookie", Method, 0}, + {"(*Request).BasicAuth", Method, 4}, + {"(*Request).Clone", Method, 13}, + {"(*Request).Context", Method, 7}, + {"(*Request).Cookie", Method, 0}, + {"(*Request).Cookies", Method, 0}, + {"(*Request).FormFile", Method, 0}, + {"(*Request).FormValue", Method, 0}, + {"(*Request).MultipartReader", Method, 0}, + {"(*Request).ParseForm", Method, 0}, + {"(*Request).ParseMultipartForm", Method, 0}, + {"(*Request).PathValue", Method, 22}, + {"(*Request).PostFormValue", Method, 1}, + {"(*Request).ProtoAtLeast", Method, 0}, + {"(*Request).Referer", Method, 0}, + {"(*Request).SetBasicAuth", Method, 0}, + {"(*Request).SetPathValue", Method, 22}, + {"(*Request).UserAgent", Method, 0}, + {"(*Request).WithContext", Method, 7}, + {"(*Request).Write", Method, 0}, + {"(*Request).WriteProxy", Method, 0}, + {"(*Response).Cookies", Method, 0}, + {"(*Response).Location", Method, 0}, + {"(*Response).ProtoAtLeast", Method, 0}, + {"(*Response).Write", Method, 0}, + {"(*ResponseController).EnableFullDuplex", Method, 21}, + {"(*ResponseController).Flush", Method, 20}, + {"(*ResponseController).Hijack", Method, 20}, + {"(*ResponseController).SetReadDeadline", Method, 20}, + {"(*ResponseController).SetWriteDeadline", Method, 20}, + {"(*ServeMux).Handle", Method, 0}, + {"(*ServeMux).HandleFunc", Method, 0}, + {"(*ServeMux).Handler", Method, 1}, + {"(*ServeMux).ServeHTTP", Method, 0}, + {"(*Server).Close", Method, 8}, + {"(*Server).ListenAndServe", Method, 0}, + {"(*Server).ListenAndServeTLS", Method, 0}, + {"(*Server).RegisterOnShutdown", Method, 9}, + {"(*Server).Serve", Method, 0}, + {"(*Server).ServeTLS", Method, 9}, + {"(*Server).SetKeepAlivesEnabled", Method, 3}, + {"(*Server).Shutdown", Method, 8}, + {"(*Transport).CancelRequest", Method, 1}, + {"(*Transport).Clone", Method, 13}, + {"(*Transport).CloseIdleConnections", Method, 0}, + {"(*Transport).RegisterProtocol", Method, 0}, + {"(*Transport).RoundTrip", Method, 0}, + {"(ConnState).String", Method, 3}, + {"(Dir).Open", Method, 0}, + {"(HandlerFunc).ServeHTTP", Method, 0}, + {"(Header).Add", Method, 0}, + {"(Header).Clone", Method, 13}, + {"(Header).Del", Method, 0}, + {"(Header).Get", Method, 0}, + {"(Header).Set", Method, 0}, + {"(Header).Values", Method, 14}, + {"(Header).Write", Method, 0}, + {"(Header).WriteSubset", Method, 0}, + {"AllowQuerySemicolons", Func, 17}, + {"CanonicalHeaderKey", Func, 0}, + {"Client", Type, 0}, + {"Client.CheckRedirect", Field, 0}, + {"Client.Jar", Field, 0}, + {"Client.Timeout", Field, 3}, + {"Client.Transport", Field, 0}, + {"CloseNotifier", Type, 1}, + {"ConnState", Type, 3}, + {"Cookie", Type, 0}, + {"Cookie.Domain", Field, 0}, + {"Cookie.Expires", Field, 0}, + {"Cookie.HttpOnly", Field, 0}, + {"Cookie.MaxAge", Field, 0}, + {"Cookie.Name", Field, 0}, + {"Cookie.Path", Field, 0}, + {"Cookie.Raw", Field, 0}, + {"Cookie.RawExpires", Field, 0}, + {"Cookie.SameSite", Field, 11}, + {"Cookie.Secure", Field, 0}, + {"Cookie.Unparsed", Field, 0}, + {"Cookie.Value", Field, 0}, + {"CookieJar", Type, 0}, + {"DefaultClient", Var, 0}, + {"DefaultMaxHeaderBytes", Const, 0}, + {"DefaultMaxIdleConnsPerHost", Const, 0}, + {"DefaultServeMux", Var, 0}, + {"DefaultTransport", Var, 0}, + {"DetectContentType", Func, 0}, + {"Dir", Type, 0}, + {"ErrAbortHandler", Var, 8}, + {"ErrBodyNotAllowed", Var, 0}, + {"ErrBodyReadAfterClose", Var, 0}, + {"ErrContentLength", Var, 0}, + {"ErrHandlerTimeout", Var, 0}, + {"ErrHeaderTooLong", Var, 0}, + {"ErrHijacked", Var, 0}, + {"ErrLineTooLong", Var, 0}, + {"ErrMissingBoundary", Var, 0}, + {"ErrMissingContentLength", Var, 0}, + {"ErrMissingFile", Var, 0}, + {"ErrNoCookie", Var, 0}, + {"ErrNoLocation", Var, 0}, + {"ErrNotMultipart", Var, 0}, + {"ErrNotSupported", Var, 0}, + {"ErrSchemeMismatch", Var, 21}, + {"ErrServerClosed", Var, 8}, + {"ErrShortBody", Var, 0}, + {"ErrSkipAltProtocol", Var, 6}, + {"ErrUnexpectedTrailer", Var, 0}, + {"ErrUseLastResponse", Var, 7}, + {"ErrWriteAfterFlush", Var, 0}, + {"Error", Func, 0}, + {"FS", Func, 16}, + {"File", Type, 0}, + {"FileServer", Func, 0}, + {"FileServerFS", Func, 22}, + {"FileSystem", Type, 0}, + {"Flusher", Type, 0}, + {"Get", Func, 0}, + {"Handle", Func, 0}, + {"HandleFunc", Func, 0}, + {"Handler", Type, 0}, + {"HandlerFunc", Type, 0}, + {"Head", Func, 0}, + {"Header", Type, 0}, + {"Hijacker", Type, 0}, + {"ListenAndServe", Func, 0}, + {"ListenAndServeTLS", Func, 0}, + {"LocalAddrContextKey", Var, 7}, + {"MaxBytesError", Type, 19}, + {"MaxBytesError.Limit", Field, 19}, + {"MaxBytesHandler", Func, 18}, + {"MaxBytesReader", Func, 0}, + {"MethodConnect", Const, 6}, + {"MethodDelete", Const, 6}, + {"MethodGet", Const, 6}, + {"MethodHead", Const, 6}, + {"MethodOptions", Const, 6}, + {"MethodPatch", Const, 6}, + {"MethodPost", Const, 6}, + {"MethodPut", Const, 6}, + {"MethodTrace", Const, 6}, + {"NewFileTransport", Func, 0}, + {"NewFileTransportFS", Func, 22}, + {"NewRequest", Func, 0}, + {"NewRequestWithContext", Func, 13}, + {"NewResponseController", Func, 20}, + {"NewServeMux", Func, 0}, + {"NoBody", Var, 8}, + {"NotFound", Func, 0}, + {"NotFoundHandler", Func, 0}, + {"ParseHTTPVersion", Func, 0}, + {"ParseTime", Func, 1}, + {"Post", Func, 0}, + {"PostForm", Func, 0}, + {"ProtocolError", Type, 0}, + {"ProtocolError.ErrorString", Field, 0}, + {"ProxyFromEnvironment", Func, 0}, + {"ProxyURL", Func, 0}, + {"PushOptions", Type, 8}, + {"PushOptions.Header", Field, 8}, + {"PushOptions.Method", Field, 8}, + {"Pusher", Type, 8}, + {"ReadRequest", Func, 0}, + {"ReadResponse", Func, 0}, + {"Redirect", Func, 0}, + {"RedirectHandler", Func, 0}, + {"Request", Type, 0}, + {"Request.Body", Field, 0}, + {"Request.Cancel", Field, 5}, + {"Request.Close", Field, 0}, + {"Request.ContentLength", Field, 0}, + {"Request.Form", Field, 0}, + {"Request.GetBody", Field, 8}, + {"Request.Header", Field, 0}, + {"Request.Host", Field, 0}, + {"Request.Method", Field, 0}, + {"Request.MultipartForm", Field, 0}, + {"Request.PostForm", Field, 1}, + {"Request.Proto", Field, 0}, + {"Request.ProtoMajor", Field, 0}, + {"Request.ProtoMinor", Field, 0}, + {"Request.RemoteAddr", Field, 0}, + {"Request.RequestURI", Field, 0}, + {"Request.Response", Field, 7}, + {"Request.TLS", Field, 0}, + {"Request.Trailer", Field, 0}, + {"Request.TransferEncoding", Field, 0}, + {"Request.URL", Field, 0}, + {"Response", Type, 0}, + {"Response.Body", Field, 0}, + {"Response.Close", Field, 0}, + {"Response.ContentLength", Field, 0}, + {"Response.Header", Field, 0}, + {"Response.Proto", Field, 0}, + {"Response.ProtoMajor", Field, 0}, + {"Response.ProtoMinor", Field, 0}, + {"Response.Request", Field, 0}, + {"Response.Status", Field, 0}, + {"Response.StatusCode", Field, 0}, + {"Response.TLS", Field, 3}, + {"Response.Trailer", Field, 0}, + {"Response.TransferEncoding", Field, 0}, + {"Response.Uncompressed", Field, 7}, + {"ResponseController", Type, 20}, + {"ResponseWriter", Type, 0}, + {"RoundTripper", Type, 0}, + {"SameSite", Type, 11}, + {"SameSiteDefaultMode", Const, 11}, + {"SameSiteLaxMode", Const, 11}, + {"SameSiteNoneMode", Const, 13}, + {"SameSiteStrictMode", Const, 11}, + {"Serve", Func, 0}, + {"ServeContent", Func, 0}, + {"ServeFile", Func, 0}, + {"ServeFileFS", Func, 22}, + {"ServeMux", Type, 0}, + {"ServeTLS", Func, 9}, + {"Server", Type, 0}, + {"Server.Addr", Field, 0}, + {"Server.BaseContext", Field, 13}, + {"Server.ConnContext", Field, 13}, + {"Server.ConnState", Field, 3}, + {"Server.DisableGeneralOptionsHandler", Field, 20}, + {"Server.ErrorLog", Field, 3}, + {"Server.Handler", Field, 0}, + {"Server.IdleTimeout", Field, 8}, + {"Server.MaxHeaderBytes", Field, 0}, + {"Server.ReadHeaderTimeout", Field, 8}, + {"Server.ReadTimeout", Field, 0}, + {"Server.TLSConfig", Field, 0}, + {"Server.TLSNextProto", Field, 1}, + {"Server.WriteTimeout", Field, 0}, + {"ServerContextKey", Var, 7}, + {"SetCookie", Func, 0}, + {"StateActive", Const, 3}, + {"StateClosed", Const, 3}, + {"StateHijacked", Const, 3}, + {"StateIdle", Const, 3}, + {"StateNew", Const, 3}, + {"StatusAccepted", Const, 0}, + {"StatusAlreadyReported", Const, 7}, + {"StatusBadGateway", Const, 0}, + {"StatusBadRequest", Const, 0}, + {"StatusConflict", Const, 0}, + {"StatusContinue", Const, 0}, + {"StatusCreated", Const, 0}, + {"StatusEarlyHints", Const, 13}, + {"StatusExpectationFailed", Const, 0}, + {"StatusFailedDependency", Const, 7}, + {"StatusForbidden", Const, 0}, + {"StatusFound", Const, 0}, + {"StatusGatewayTimeout", Const, 0}, + {"StatusGone", Const, 0}, + {"StatusHTTPVersionNotSupported", Const, 0}, + {"StatusIMUsed", Const, 7}, + {"StatusInsufficientStorage", Const, 7}, + {"StatusInternalServerError", Const, 0}, + {"StatusLengthRequired", Const, 0}, + {"StatusLocked", Const, 7}, + {"StatusLoopDetected", Const, 7}, + {"StatusMethodNotAllowed", Const, 0}, + {"StatusMisdirectedRequest", Const, 11}, + {"StatusMovedPermanently", Const, 0}, + {"StatusMultiStatus", Const, 7}, + {"StatusMultipleChoices", Const, 0}, + {"StatusNetworkAuthenticationRequired", Const, 6}, + {"StatusNoContent", Const, 0}, + {"StatusNonAuthoritativeInfo", Const, 0}, + {"StatusNotAcceptable", Const, 0}, + {"StatusNotExtended", Const, 7}, + {"StatusNotFound", Const, 0}, + {"StatusNotImplemented", Const, 0}, + {"StatusNotModified", Const, 0}, + {"StatusOK", Const, 0}, + {"StatusPartialContent", Const, 0}, + {"StatusPaymentRequired", Const, 0}, + {"StatusPermanentRedirect", Const, 7}, + {"StatusPreconditionFailed", Const, 0}, + {"StatusPreconditionRequired", Const, 6}, + {"StatusProcessing", Const, 7}, + {"StatusProxyAuthRequired", Const, 0}, + {"StatusRequestEntityTooLarge", Const, 0}, + {"StatusRequestHeaderFieldsTooLarge", Const, 6}, + {"StatusRequestTimeout", Const, 0}, + {"StatusRequestURITooLong", Const, 0}, + {"StatusRequestedRangeNotSatisfiable", Const, 0}, + {"StatusResetContent", Const, 0}, + {"StatusSeeOther", Const, 0}, + {"StatusServiceUnavailable", Const, 0}, + {"StatusSwitchingProtocols", Const, 0}, + {"StatusTeapot", Const, 0}, + {"StatusTemporaryRedirect", Const, 0}, + {"StatusText", Func, 0}, + {"StatusTooEarly", Const, 12}, + {"StatusTooManyRequests", Const, 6}, + {"StatusUnauthorized", Const, 0}, + {"StatusUnavailableForLegalReasons", Const, 6}, + {"StatusUnprocessableEntity", Const, 7}, + {"StatusUnsupportedMediaType", Const, 0}, + {"StatusUpgradeRequired", Const, 7}, + {"StatusUseProxy", Const, 0}, + {"StatusVariantAlsoNegotiates", Const, 7}, + {"StripPrefix", Func, 0}, + {"TimeFormat", Const, 0}, + {"TimeoutHandler", Func, 0}, + {"TrailerPrefix", Const, 8}, + {"Transport", Type, 0}, + {"Transport.Dial", Field, 0}, + {"Transport.DialContext", Field, 7}, + {"Transport.DialTLS", Field, 4}, + {"Transport.DialTLSContext", Field, 14}, + {"Transport.DisableCompression", Field, 0}, + {"Transport.DisableKeepAlives", Field, 0}, + {"Transport.ExpectContinueTimeout", Field, 6}, + {"Transport.ForceAttemptHTTP2", Field, 13}, + {"Transport.GetProxyConnectHeader", Field, 16}, + {"Transport.IdleConnTimeout", Field, 7}, + {"Transport.MaxConnsPerHost", Field, 11}, + {"Transport.MaxIdleConns", Field, 7}, + {"Transport.MaxIdleConnsPerHost", Field, 0}, + {"Transport.MaxResponseHeaderBytes", Field, 7}, + {"Transport.OnProxyConnectResponse", Field, 20}, + {"Transport.Proxy", Field, 0}, + {"Transport.ProxyConnectHeader", Field, 8}, + {"Transport.ReadBufferSize", Field, 13}, + {"Transport.ResponseHeaderTimeout", Field, 1}, + {"Transport.TLSClientConfig", Field, 0}, + {"Transport.TLSHandshakeTimeout", Field, 3}, + {"Transport.TLSNextProto", Field, 6}, + {"Transport.WriteBufferSize", Field, 13}, + }, + "net/http/cgi": { + {"(*Handler).ServeHTTP", Method, 0}, + {"Handler", Type, 0}, + {"Handler.Args", Field, 0}, + {"Handler.Dir", Field, 0}, + {"Handler.Env", Field, 0}, + {"Handler.InheritEnv", Field, 0}, + {"Handler.Logger", Field, 0}, + {"Handler.Path", Field, 0}, + {"Handler.PathLocationHandler", Field, 0}, + {"Handler.Root", Field, 0}, + {"Handler.Stderr", Field, 7}, + {"Request", Func, 0}, + {"RequestFromMap", Func, 0}, + {"Serve", Func, 0}, + }, + "net/http/cookiejar": { + {"(*Jar).Cookies", Method, 1}, + {"(*Jar).SetCookies", Method, 1}, + {"Jar", Type, 1}, + {"New", Func, 1}, + {"Options", Type, 1}, + {"Options.PublicSuffixList", Field, 1}, + {"PublicSuffixList", Type, 1}, + }, + "net/http/fcgi": { + {"ErrConnClosed", Var, 5}, + {"ErrRequestAborted", Var, 5}, + {"ProcessEnv", Func, 9}, + {"Serve", Func, 0}, + }, + "net/http/httptest": { + {"(*ResponseRecorder).Flush", Method, 0}, + {"(*ResponseRecorder).Header", Method, 0}, + {"(*ResponseRecorder).Result", Method, 7}, + {"(*ResponseRecorder).Write", Method, 0}, + {"(*ResponseRecorder).WriteHeader", Method, 0}, + {"(*ResponseRecorder).WriteString", Method, 6}, + {"(*Server).Certificate", Method, 9}, + {"(*Server).Client", Method, 9}, + {"(*Server).Close", Method, 0}, + {"(*Server).CloseClientConnections", Method, 0}, + {"(*Server).Start", Method, 0}, + {"(*Server).StartTLS", Method, 0}, + {"DefaultRemoteAddr", Const, 0}, + {"NewRecorder", Func, 0}, + {"NewRequest", Func, 7}, + {"NewServer", Func, 0}, + {"NewTLSServer", Func, 0}, + {"NewUnstartedServer", Func, 0}, + {"ResponseRecorder", Type, 0}, + {"ResponseRecorder.Body", Field, 0}, + {"ResponseRecorder.Code", Field, 0}, + {"ResponseRecorder.Flushed", Field, 0}, + {"ResponseRecorder.HeaderMap", Field, 0}, + {"Server", Type, 0}, + {"Server.Config", Field, 0}, + {"Server.EnableHTTP2", Field, 14}, + {"Server.Listener", Field, 0}, + {"Server.TLS", Field, 0}, + {"Server.URL", Field, 0}, + }, + "net/http/httptrace": { + {"ClientTrace", Type, 7}, + {"ClientTrace.ConnectDone", Field, 7}, + {"ClientTrace.ConnectStart", Field, 7}, + {"ClientTrace.DNSDone", Field, 7}, + {"ClientTrace.DNSStart", Field, 7}, + {"ClientTrace.GetConn", Field, 7}, + {"ClientTrace.Got100Continue", Field, 7}, + {"ClientTrace.Got1xxResponse", Field, 11}, + {"ClientTrace.GotConn", Field, 7}, + {"ClientTrace.GotFirstResponseByte", Field, 7}, + {"ClientTrace.PutIdleConn", Field, 7}, + {"ClientTrace.TLSHandshakeDone", Field, 8}, + {"ClientTrace.TLSHandshakeStart", Field, 8}, + {"ClientTrace.Wait100Continue", Field, 7}, + {"ClientTrace.WroteHeaderField", Field, 11}, + {"ClientTrace.WroteHeaders", Field, 7}, + {"ClientTrace.WroteRequest", Field, 7}, + {"ContextClientTrace", Func, 7}, + {"DNSDoneInfo", Type, 7}, + {"DNSDoneInfo.Addrs", Field, 7}, + {"DNSDoneInfo.Coalesced", Field, 7}, + {"DNSDoneInfo.Err", Field, 7}, + {"DNSStartInfo", Type, 7}, + {"DNSStartInfo.Host", Field, 7}, + {"GotConnInfo", Type, 7}, + {"GotConnInfo.Conn", Field, 7}, + {"GotConnInfo.IdleTime", Field, 7}, + {"GotConnInfo.Reused", Field, 7}, + {"GotConnInfo.WasIdle", Field, 7}, + {"WithClientTrace", Func, 7}, + {"WroteRequestInfo", Type, 7}, + {"WroteRequestInfo.Err", Field, 7}, + }, + "net/http/httputil": { + {"(*ClientConn).Close", Method, 0}, + {"(*ClientConn).Do", Method, 0}, + {"(*ClientConn).Hijack", Method, 0}, + {"(*ClientConn).Pending", Method, 0}, + {"(*ClientConn).Read", Method, 0}, + {"(*ClientConn).Write", Method, 0}, + {"(*ProxyRequest).SetURL", Method, 20}, + {"(*ProxyRequest).SetXForwarded", Method, 20}, + {"(*ReverseProxy).ServeHTTP", Method, 0}, + {"(*ServerConn).Close", Method, 0}, + {"(*ServerConn).Hijack", Method, 0}, + {"(*ServerConn).Pending", Method, 0}, + {"(*ServerConn).Read", Method, 0}, + {"(*ServerConn).Write", Method, 0}, + {"BufferPool", Type, 6}, + {"ClientConn", Type, 0}, + {"DumpRequest", Func, 0}, + {"DumpRequestOut", Func, 0}, + {"DumpResponse", Func, 0}, + {"ErrClosed", Var, 0}, + {"ErrLineTooLong", Var, 0}, + {"ErrPersistEOF", Var, 0}, + {"ErrPipeline", Var, 0}, + {"NewChunkedReader", Func, 0}, + {"NewChunkedWriter", Func, 0}, + {"NewClientConn", Func, 0}, + {"NewProxyClientConn", Func, 0}, + {"NewServerConn", Func, 0}, + {"NewSingleHostReverseProxy", Func, 0}, + {"ProxyRequest", Type, 20}, + {"ProxyRequest.In", Field, 20}, + {"ProxyRequest.Out", Field, 20}, + {"ReverseProxy", Type, 0}, + {"ReverseProxy.BufferPool", Field, 6}, + {"ReverseProxy.Director", Field, 0}, + {"ReverseProxy.ErrorHandler", Field, 11}, + {"ReverseProxy.ErrorLog", Field, 4}, + {"ReverseProxy.FlushInterval", Field, 0}, + {"ReverseProxy.ModifyResponse", Field, 8}, + {"ReverseProxy.Rewrite", Field, 20}, + {"ReverseProxy.Transport", Field, 0}, + {"ServerConn", Type, 0}, + }, + "net/http/pprof": { + {"Cmdline", Func, 0}, + {"Handler", Func, 0}, + {"Index", Func, 0}, + {"Profile", Func, 0}, + {"Symbol", Func, 0}, + {"Trace", Func, 5}, + }, + "net/mail": { + {"(*Address).String", Method, 0}, + {"(*AddressParser).Parse", Method, 5}, + {"(*AddressParser).ParseList", Method, 5}, + {"(Header).AddressList", Method, 0}, + {"(Header).Date", Method, 0}, + {"(Header).Get", Method, 0}, + {"Address", Type, 0}, + {"Address.Address", Field, 0}, + {"Address.Name", Field, 0}, + {"AddressParser", Type, 5}, + {"AddressParser.WordDecoder", Field, 5}, + {"ErrHeaderNotPresent", Var, 0}, + {"Header", Type, 0}, + {"Message", Type, 0}, + {"Message.Body", Field, 0}, + {"Message.Header", Field, 0}, + {"ParseAddress", Func, 1}, + {"ParseAddressList", Func, 1}, + {"ParseDate", Func, 8}, + {"ReadMessage", Func, 0}, + }, + "net/netip": { + {"(*Addr).UnmarshalBinary", Method, 18}, + {"(*Addr).UnmarshalText", Method, 18}, + {"(*AddrPort).UnmarshalBinary", Method, 18}, + {"(*AddrPort).UnmarshalText", Method, 18}, + {"(*Prefix).UnmarshalBinary", Method, 18}, + {"(*Prefix).UnmarshalText", Method, 18}, + {"(Addr).AppendTo", Method, 18}, + {"(Addr).As16", Method, 18}, + {"(Addr).As4", Method, 18}, + {"(Addr).AsSlice", Method, 18}, + {"(Addr).BitLen", Method, 18}, + {"(Addr).Compare", Method, 18}, + {"(Addr).Is4", Method, 18}, + {"(Addr).Is4In6", Method, 18}, + {"(Addr).Is6", Method, 18}, + {"(Addr).IsGlobalUnicast", Method, 18}, + {"(Addr).IsInterfaceLocalMulticast", Method, 18}, + {"(Addr).IsLinkLocalMulticast", Method, 18}, + {"(Addr).IsLinkLocalUnicast", Method, 18}, + {"(Addr).IsLoopback", Method, 18}, + {"(Addr).IsMulticast", Method, 18}, + {"(Addr).IsPrivate", Method, 18}, + {"(Addr).IsUnspecified", Method, 18}, + {"(Addr).IsValid", Method, 18}, + {"(Addr).Less", Method, 18}, + {"(Addr).MarshalBinary", Method, 18}, + {"(Addr).MarshalText", Method, 18}, + {"(Addr).Next", Method, 18}, + {"(Addr).Prefix", Method, 18}, + {"(Addr).Prev", Method, 18}, + {"(Addr).String", Method, 18}, + {"(Addr).StringExpanded", Method, 18}, + {"(Addr).Unmap", Method, 18}, + {"(Addr).WithZone", Method, 18}, + {"(Addr).Zone", Method, 18}, + {"(AddrPort).Addr", Method, 18}, + {"(AddrPort).AppendTo", Method, 18}, + {"(AddrPort).Compare", Method, 22}, + {"(AddrPort).IsValid", Method, 18}, + {"(AddrPort).MarshalBinary", Method, 18}, + {"(AddrPort).MarshalText", Method, 18}, + {"(AddrPort).Port", Method, 18}, + {"(AddrPort).String", Method, 18}, + {"(Prefix).Addr", Method, 18}, + {"(Prefix).AppendTo", Method, 18}, + {"(Prefix).Bits", Method, 18}, + {"(Prefix).Contains", Method, 18}, + {"(Prefix).IsSingleIP", Method, 18}, + {"(Prefix).IsValid", Method, 18}, + {"(Prefix).MarshalBinary", Method, 18}, + {"(Prefix).MarshalText", Method, 18}, + {"(Prefix).Masked", Method, 18}, + {"(Prefix).Overlaps", Method, 18}, + {"(Prefix).String", Method, 18}, + {"Addr", Type, 18}, + {"AddrFrom16", Func, 18}, + {"AddrFrom4", Func, 18}, + {"AddrFromSlice", Func, 18}, + {"AddrPort", Type, 18}, + {"AddrPortFrom", Func, 18}, + {"IPv4Unspecified", Func, 18}, + {"IPv6LinkLocalAllNodes", Func, 18}, + {"IPv6LinkLocalAllRouters", Func, 20}, + {"IPv6Loopback", Func, 20}, + {"IPv6Unspecified", Func, 18}, + {"MustParseAddr", Func, 18}, + {"MustParseAddrPort", Func, 18}, + {"MustParsePrefix", Func, 18}, + {"ParseAddr", Func, 18}, + {"ParseAddrPort", Func, 18}, + {"ParsePrefix", Func, 18}, + {"Prefix", Type, 18}, + {"PrefixFrom", Func, 18}, + }, + "net/rpc": { + {"(*Client).Call", Method, 0}, + {"(*Client).Close", Method, 0}, + {"(*Client).Go", Method, 0}, + {"(*Server).Accept", Method, 0}, + {"(*Server).HandleHTTP", Method, 0}, + {"(*Server).Register", Method, 0}, + {"(*Server).RegisterName", Method, 0}, + {"(*Server).ServeCodec", Method, 0}, + {"(*Server).ServeConn", Method, 0}, + {"(*Server).ServeHTTP", Method, 0}, + {"(*Server).ServeRequest", Method, 0}, + {"(ServerError).Error", Method, 0}, + {"Accept", Func, 0}, + {"Call", Type, 0}, + {"Call.Args", Field, 0}, + {"Call.Done", Field, 0}, + {"Call.Error", Field, 0}, + {"Call.Reply", Field, 0}, + {"Call.ServiceMethod", Field, 0}, + {"Client", Type, 0}, + {"ClientCodec", Type, 0}, + {"DefaultDebugPath", Const, 0}, + {"DefaultRPCPath", Const, 0}, + {"DefaultServer", Var, 0}, + {"Dial", Func, 0}, + {"DialHTTP", Func, 0}, + {"DialHTTPPath", Func, 0}, + {"ErrShutdown", Var, 0}, + {"HandleHTTP", Func, 0}, + {"NewClient", Func, 0}, + {"NewClientWithCodec", Func, 0}, + {"NewServer", Func, 0}, + {"Register", Func, 0}, + {"RegisterName", Func, 0}, + {"Request", Type, 0}, + {"Request.Seq", Field, 0}, + {"Request.ServiceMethod", Field, 0}, + {"Response", Type, 0}, + {"Response.Error", Field, 0}, + {"Response.Seq", Field, 0}, + {"Response.ServiceMethod", Field, 0}, + {"ServeCodec", Func, 0}, + {"ServeConn", Func, 0}, + {"ServeRequest", Func, 0}, + {"Server", Type, 0}, + {"ServerCodec", Type, 0}, + {"ServerError", Type, 0}, + }, + "net/rpc/jsonrpc": { + {"Dial", Func, 0}, + {"NewClient", Func, 0}, + {"NewClientCodec", Func, 0}, + {"NewServerCodec", Func, 0}, + {"ServeConn", Func, 0}, + }, + "net/smtp": { + {"(*Client).Auth", Method, 0}, + {"(*Client).Close", Method, 2}, + {"(*Client).Data", Method, 0}, + {"(*Client).Extension", Method, 0}, + {"(*Client).Hello", Method, 1}, + {"(*Client).Mail", Method, 0}, + {"(*Client).Noop", Method, 10}, + {"(*Client).Quit", Method, 0}, + {"(*Client).Rcpt", Method, 0}, + {"(*Client).Reset", Method, 0}, + {"(*Client).StartTLS", Method, 0}, + {"(*Client).TLSConnectionState", Method, 5}, + {"(*Client).Verify", Method, 0}, + {"Auth", Type, 0}, + {"CRAMMD5Auth", Func, 0}, + {"Client", Type, 0}, + {"Client.Text", Field, 0}, + {"Dial", Func, 0}, + {"NewClient", Func, 0}, + {"PlainAuth", Func, 0}, + {"SendMail", Func, 0}, + {"ServerInfo", Type, 0}, + {"ServerInfo.Auth", Field, 0}, + {"ServerInfo.Name", Field, 0}, + {"ServerInfo.TLS", Field, 0}, + }, + "net/textproto": { + {"(*Conn).Close", Method, 0}, + {"(*Conn).Cmd", Method, 0}, + {"(*Conn).DotReader", Method, 0}, + {"(*Conn).DotWriter", Method, 0}, + {"(*Conn).EndRequest", Method, 0}, + {"(*Conn).EndResponse", Method, 0}, + {"(*Conn).Next", Method, 0}, + {"(*Conn).PrintfLine", Method, 0}, + {"(*Conn).ReadCodeLine", Method, 0}, + {"(*Conn).ReadContinuedLine", Method, 0}, + {"(*Conn).ReadContinuedLineBytes", Method, 0}, + {"(*Conn).ReadDotBytes", Method, 0}, + {"(*Conn).ReadDotLines", Method, 0}, + {"(*Conn).ReadLine", Method, 0}, + {"(*Conn).ReadLineBytes", Method, 0}, + {"(*Conn).ReadMIMEHeader", Method, 0}, + {"(*Conn).ReadResponse", Method, 0}, + {"(*Conn).StartRequest", Method, 0}, + {"(*Conn).StartResponse", Method, 0}, + {"(*Error).Error", Method, 0}, + {"(*Pipeline).EndRequest", Method, 0}, + {"(*Pipeline).EndResponse", Method, 0}, + {"(*Pipeline).Next", Method, 0}, + {"(*Pipeline).StartRequest", Method, 0}, + {"(*Pipeline).StartResponse", Method, 0}, + {"(*Reader).DotReader", Method, 0}, + {"(*Reader).ReadCodeLine", Method, 0}, + {"(*Reader).ReadContinuedLine", Method, 0}, + {"(*Reader).ReadContinuedLineBytes", Method, 0}, + {"(*Reader).ReadDotBytes", Method, 0}, + {"(*Reader).ReadDotLines", Method, 0}, + {"(*Reader).ReadLine", Method, 0}, + {"(*Reader).ReadLineBytes", Method, 0}, + {"(*Reader).ReadMIMEHeader", Method, 0}, + {"(*Reader).ReadResponse", Method, 0}, + {"(*Writer).DotWriter", Method, 0}, + {"(*Writer).PrintfLine", Method, 0}, + {"(MIMEHeader).Add", Method, 0}, + {"(MIMEHeader).Del", Method, 0}, + {"(MIMEHeader).Get", Method, 0}, + {"(MIMEHeader).Set", Method, 0}, + {"(MIMEHeader).Values", Method, 14}, + {"(ProtocolError).Error", Method, 0}, + {"CanonicalMIMEHeaderKey", Func, 0}, + {"Conn", Type, 0}, + {"Conn.Pipeline", Field, 0}, + {"Conn.Reader", Field, 0}, + {"Conn.Writer", Field, 0}, + {"Dial", Func, 0}, + {"Error", Type, 0}, + {"Error.Code", Field, 0}, + {"Error.Msg", Field, 0}, + {"MIMEHeader", Type, 0}, + {"NewConn", Func, 0}, + {"NewReader", Func, 0}, + {"NewWriter", Func, 0}, + {"Pipeline", Type, 0}, + {"ProtocolError", Type, 0}, + {"Reader", Type, 0}, + {"Reader.R", Field, 0}, + {"TrimBytes", Func, 1}, + {"TrimString", Func, 1}, + {"Writer", Type, 0}, + {"Writer.W", Field, 0}, + }, + "net/url": { + {"(*Error).Error", Method, 0}, + {"(*Error).Temporary", Method, 6}, + {"(*Error).Timeout", Method, 6}, + {"(*Error).Unwrap", Method, 13}, + {"(*URL).EscapedFragment", Method, 15}, + {"(*URL).EscapedPath", Method, 5}, + {"(*URL).Hostname", Method, 8}, + {"(*URL).IsAbs", Method, 0}, + {"(*URL).JoinPath", Method, 19}, + {"(*URL).MarshalBinary", Method, 8}, + {"(*URL).Parse", Method, 0}, + {"(*URL).Port", Method, 8}, + {"(*URL).Query", Method, 0}, + {"(*URL).Redacted", Method, 15}, + {"(*URL).RequestURI", Method, 0}, + {"(*URL).ResolveReference", Method, 0}, + {"(*URL).String", Method, 0}, + {"(*URL).UnmarshalBinary", Method, 8}, + {"(*Userinfo).Password", Method, 0}, + {"(*Userinfo).String", Method, 0}, + {"(*Userinfo).Username", Method, 0}, + {"(EscapeError).Error", Method, 0}, + {"(InvalidHostError).Error", Method, 6}, + {"(Values).Add", Method, 0}, + {"(Values).Del", Method, 0}, + {"(Values).Encode", Method, 0}, + {"(Values).Get", Method, 0}, + {"(Values).Has", Method, 17}, + {"(Values).Set", Method, 0}, + {"Error", Type, 0}, + {"Error.Err", Field, 0}, + {"Error.Op", Field, 0}, + {"Error.URL", Field, 0}, + {"EscapeError", Type, 0}, + {"InvalidHostError", Type, 6}, + {"JoinPath", Func, 19}, + {"Parse", Func, 0}, + {"ParseQuery", Func, 0}, + {"ParseRequestURI", Func, 0}, + {"PathEscape", Func, 8}, + {"PathUnescape", Func, 8}, + {"QueryEscape", Func, 0}, + {"QueryUnescape", Func, 0}, + {"URL", Type, 0}, + {"URL.ForceQuery", Field, 7}, + {"URL.Fragment", Field, 0}, + {"URL.Host", Field, 0}, + {"URL.OmitHost", Field, 19}, + {"URL.Opaque", Field, 0}, + {"URL.Path", Field, 0}, + {"URL.RawFragment", Field, 15}, + {"URL.RawPath", Field, 5}, + {"URL.RawQuery", Field, 0}, + {"URL.Scheme", Field, 0}, + {"URL.User", Field, 0}, + {"User", Func, 0}, + {"UserPassword", Func, 0}, + {"Userinfo", Type, 0}, + {"Values", Type, 0}, + }, + "os": { + {"(*File).Chdir", Method, 0}, + {"(*File).Chmod", Method, 0}, + {"(*File).Chown", Method, 0}, + {"(*File).Close", Method, 0}, + {"(*File).Fd", Method, 0}, + {"(*File).Name", Method, 0}, + {"(*File).Read", Method, 0}, + {"(*File).ReadAt", Method, 0}, + {"(*File).ReadDir", Method, 16}, + {"(*File).ReadFrom", Method, 15}, + {"(*File).Readdir", Method, 0}, + {"(*File).Readdirnames", Method, 0}, + {"(*File).Seek", Method, 0}, + {"(*File).SetDeadline", Method, 10}, + {"(*File).SetReadDeadline", Method, 10}, + {"(*File).SetWriteDeadline", Method, 10}, + {"(*File).Stat", Method, 0}, + {"(*File).Sync", Method, 0}, + {"(*File).SyscallConn", Method, 12}, + {"(*File).Truncate", Method, 0}, + {"(*File).Write", Method, 0}, + {"(*File).WriteAt", Method, 0}, + {"(*File).WriteString", Method, 0}, + {"(*File).WriteTo", Method, 22}, + {"(*LinkError).Error", Method, 0}, + {"(*LinkError).Unwrap", Method, 13}, + {"(*PathError).Error", Method, 0}, + {"(*PathError).Timeout", Method, 10}, + {"(*PathError).Unwrap", Method, 13}, + {"(*Process).Kill", Method, 0}, + {"(*Process).Release", Method, 0}, + {"(*Process).Signal", Method, 0}, + {"(*Process).Wait", Method, 0}, + {"(*ProcessState).ExitCode", Method, 12}, + {"(*ProcessState).Exited", Method, 0}, + {"(*ProcessState).Pid", Method, 0}, + {"(*ProcessState).String", Method, 0}, + {"(*ProcessState).Success", Method, 0}, + {"(*ProcessState).Sys", Method, 0}, + {"(*ProcessState).SysUsage", Method, 0}, + {"(*ProcessState).SystemTime", Method, 0}, + {"(*ProcessState).UserTime", Method, 0}, + {"(*SyscallError).Error", Method, 0}, + {"(*SyscallError).Timeout", Method, 10}, + {"(*SyscallError).Unwrap", Method, 13}, + {"(FileMode).IsDir", Method, 0}, + {"(FileMode).IsRegular", Method, 1}, + {"(FileMode).Perm", Method, 0}, + {"(FileMode).String", Method, 0}, + {"Args", Var, 0}, + {"Chdir", Func, 0}, + {"Chmod", Func, 0}, + {"Chown", Func, 0}, + {"Chtimes", Func, 0}, + {"Clearenv", Func, 0}, + {"Create", Func, 0}, + {"CreateTemp", Func, 16}, + {"DevNull", Const, 0}, + {"DirEntry", Type, 16}, + {"DirFS", Func, 16}, + {"Environ", Func, 0}, + {"ErrClosed", Var, 8}, + {"ErrDeadlineExceeded", Var, 15}, + {"ErrExist", Var, 0}, + {"ErrInvalid", Var, 0}, + {"ErrNoDeadline", Var, 10}, + {"ErrNotExist", Var, 0}, + {"ErrPermission", Var, 0}, + {"ErrProcessDone", Var, 16}, + {"Executable", Func, 8}, + {"Exit", Func, 0}, + {"Expand", Func, 0}, + {"ExpandEnv", Func, 0}, + {"File", Type, 0}, + {"FileInfo", Type, 0}, + {"FileMode", Type, 0}, + {"FindProcess", Func, 0}, + {"Getegid", Func, 0}, + {"Getenv", Func, 0}, + {"Geteuid", Func, 0}, + {"Getgid", Func, 0}, + {"Getgroups", Func, 0}, + {"Getpagesize", Func, 0}, + {"Getpid", Func, 0}, + {"Getppid", Func, 0}, + {"Getuid", Func, 0}, + {"Getwd", Func, 0}, + {"Hostname", Func, 0}, + {"Interrupt", Var, 0}, + {"IsExist", Func, 0}, + {"IsNotExist", Func, 0}, + {"IsPathSeparator", Func, 0}, + {"IsPermission", Func, 0}, + {"IsTimeout", Func, 10}, + {"Kill", Var, 0}, + {"Lchown", Func, 0}, + {"Link", Func, 0}, + {"LinkError", Type, 0}, + {"LinkError.Err", Field, 0}, + {"LinkError.New", Field, 0}, + {"LinkError.Old", Field, 0}, + {"LinkError.Op", Field, 0}, + {"LookupEnv", Func, 5}, + {"Lstat", Func, 0}, + {"Mkdir", Func, 0}, + {"MkdirAll", Func, 0}, + {"MkdirTemp", Func, 16}, + {"ModeAppend", Const, 0}, + {"ModeCharDevice", Const, 0}, + {"ModeDevice", Const, 0}, + {"ModeDir", Const, 0}, + {"ModeExclusive", Const, 0}, + {"ModeIrregular", Const, 11}, + {"ModeNamedPipe", Const, 0}, + {"ModePerm", Const, 0}, + {"ModeSetgid", Const, 0}, + {"ModeSetuid", Const, 0}, + {"ModeSocket", Const, 0}, + {"ModeSticky", Const, 0}, + {"ModeSymlink", Const, 0}, + {"ModeTemporary", Const, 0}, + {"ModeType", Const, 0}, + {"NewFile", Func, 0}, + {"NewSyscallError", Func, 0}, + {"O_APPEND", Const, 0}, + {"O_CREATE", Const, 0}, + {"O_EXCL", Const, 0}, + {"O_RDONLY", Const, 0}, + {"O_RDWR", Const, 0}, + {"O_SYNC", Const, 0}, + {"O_TRUNC", Const, 0}, + {"O_WRONLY", Const, 0}, + {"Open", Func, 0}, + {"OpenFile", Func, 0}, + {"PathError", Type, 0}, + {"PathError.Err", Field, 0}, + {"PathError.Op", Field, 0}, + {"PathError.Path", Field, 0}, + {"PathListSeparator", Const, 0}, + {"PathSeparator", Const, 0}, + {"Pipe", Func, 0}, + {"ProcAttr", Type, 0}, + {"ProcAttr.Dir", Field, 0}, + {"ProcAttr.Env", Field, 0}, + {"ProcAttr.Files", Field, 0}, + {"ProcAttr.Sys", Field, 0}, + {"Process", Type, 0}, + {"Process.Pid", Field, 0}, + {"ProcessState", Type, 0}, + {"ReadDir", Func, 16}, + {"ReadFile", Func, 16}, + {"Readlink", Func, 0}, + {"Remove", Func, 0}, + {"RemoveAll", Func, 0}, + {"Rename", Func, 0}, + {"SEEK_CUR", Const, 0}, + {"SEEK_END", Const, 0}, + {"SEEK_SET", Const, 0}, + {"SameFile", Func, 0}, + {"Setenv", Func, 0}, + {"Signal", Type, 0}, + {"StartProcess", Func, 0}, + {"Stat", Func, 0}, + {"Stderr", Var, 0}, + {"Stdin", Var, 0}, + {"Stdout", Var, 0}, + {"Symlink", Func, 0}, + {"SyscallError", Type, 0}, + {"SyscallError.Err", Field, 0}, + {"SyscallError.Syscall", Field, 0}, + {"TempDir", Func, 0}, + {"Truncate", Func, 0}, + {"Unsetenv", Func, 4}, + {"UserCacheDir", Func, 11}, + {"UserConfigDir", Func, 13}, + {"UserHomeDir", Func, 12}, + {"WriteFile", Func, 16}, + }, + "os/exec": { + {"(*Cmd).CombinedOutput", Method, 0}, + {"(*Cmd).Environ", Method, 19}, + {"(*Cmd).Output", Method, 0}, + {"(*Cmd).Run", Method, 0}, + {"(*Cmd).Start", Method, 0}, + {"(*Cmd).StderrPipe", Method, 0}, + {"(*Cmd).StdinPipe", Method, 0}, + {"(*Cmd).StdoutPipe", Method, 0}, + {"(*Cmd).String", Method, 13}, + {"(*Cmd).Wait", Method, 0}, + {"(*Error).Error", Method, 0}, + {"(*Error).Unwrap", Method, 13}, + {"(*ExitError).Error", Method, 0}, + {"(ExitError).ExitCode", Method, 12}, + {"(ExitError).Exited", Method, 0}, + {"(ExitError).Pid", Method, 0}, + {"(ExitError).String", Method, 0}, + {"(ExitError).Success", Method, 0}, + {"(ExitError).Sys", Method, 0}, + {"(ExitError).SysUsage", Method, 0}, + {"(ExitError).SystemTime", Method, 0}, + {"(ExitError).UserTime", Method, 0}, + {"Cmd", Type, 0}, + {"Cmd.Args", Field, 0}, + {"Cmd.Cancel", Field, 20}, + {"Cmd.Dir", Field, 0}, + {"Cmd.Env", Field, 0}, + {"Cmd.Err", Field, 19}, + {"Cmd.ExtraFiles", Field, 0}, + {"Cmd.Path", Field, 0}, + {"Cmd.Process", Field, 0}, + {"Cmd.ProcessState", Field, 0}, + {"Cmd.Stderr", Field, 0}, + {"Cmd.Stdin", Field, 0}, + {"Cmd.Stdout", Field, 0}, + {"Cmd.SysProcAttr", Field, 0}, + {"Cmd.WaitDelay", Field, 20}, + {"Command", Func, 0}, + {"CommandContext", Func, 7}, + {"ErrDot", Var, 19}, + {"ErrNotFound", Var, 0}, + {"ErrWaitDelay", Var, 20}, + {"Error", Type, 0}, + {"Error.Err", Field, 0}, + {"Error.Name", Field, 0}, + {"ExitError", Type, 0}, + {"ExitError.ProcessState", Field, 0}, + {"ExitError.Stderr", Field, 6}, + {"LookPath", Func, 0}, + }, + "os/signal": { + {"Ignore", Func, 5}, + {"Ignored", Func, 11}, + {"Notify", Func, 0}, + {"NotifyContext", Func, 16}, + {"Reset", Func, 5}, + {"Stop", Func, 1}, + }, + "os/user": { + {"(*User).GroupIds", Method, 7}, + {"(UnknownGroupError).Error", Method, 7}, + {"(UnknownGroupIdError).Error", Method, 7}, + {"(UnknownUserError).Error", Method, 0}, + {"(UnknownUserIdError).Error", Method, 0}, + {"Current", Func, 0}, + {"Group", Type, 7}, + {"Group.Gid", Field, 7}, + {"Group.Name", Field, 7}, + {"Lookup", Func, 0}, + {"LookupGroup", Func, 7}, + {"LookupGroupId", Func, 7}, + {"LookupId", Func, 0}, + {"UnknownGroupError", Type, 7}, + {"UnknownGroupIdError", Type, 7}, + {"UnknownUserError", Type, 0}, + {"UnknownUserIdError", Type, 0}, + {"User", Type, 0}, + {"User.Gid", Field, 0}, + {"User.HomeDir", Field, 0}, + {"User.Name", Field, 0}, + {"User.Uid", Field, 0}, + {"User.Username", Field, 0}, + }, + "path": { + {"Base", Func, 0}, + {"Clean", Func, 0}, + {"Dir", Func, 0}, + {"ErrBadPattern", Var, 0}, + {"Ext", Func, 0}, + {"IsAbs", Func, 0}, + {"Join", Func, 0}, + {"Match", Func, 0}, + {"Split", Func, 0}, + }, + "path/filepath": { + {"Abs", Func, 0}, + {"Base", Func, 0}, + {"Clean", Func, 0}, + {"Dir", Func, 0}, + {"ErrBadPattern", Var, 0}, + {"EvalSymlinks", Func, 0}, + {"Ext", Func, 0}, + {"FromSlash", Func, 0}, + {"Glob", Func, 0}, + {"HasPrefix", Func, 0}, + {"IsAbs", Func, 0}, + {"IsLocal", Func, 20}, + {"Join", Func, 0}, + {"ListSeparator", Const, 0}, + {"Match", Func, 0}, + {"Rel", Func, 0}, + {"Separator", Const, 0}, + {"SkipAll", Var, 20}, + {"SkipDir", Var, 0}, + {"Split", Func, 0}, + {"SplitList", Func, 0}, + {"ToSlash", Func, 0}, + {"VolumeName", Func, 0}, + {"Walk", Func, 0}, + {"WalkDir", Func, 16}, + {"WalkFunc", Type, 0}, + }, + "plugin": { + {"(*Plugin).Lookup", Method, 8}, + {"Open", Func, 8}, + {"Plugin", Type, 8}, + {"Symbol", Type, 8}, + }, + "reflect": { + {"(*MapIter).Key", Method, 12}, + {"(*MapIter).Next", Method, 12}, + {"(*MapIter).Reset", Method, 18}, + {"(*MapIter).Value", Method, 12}, + {"(*ValueError).Error", Method, 0}, + {"(ChanDir).String", Method, 0}, + {"(Kind).String", Method, 0}, + {"(Method).IsExported", Method, 17}, + {"(StructField).IsExported", Method, 17}, + {"(StructTag).Get", Method, 0}, + {"(StructTag).Lookup", Method, 7}, + {"(Value).Addr", Method, 0}, + {"(Value).Bool", Method, 0}, + {"(Value).Bytes", Method, 0}, + {"(Value).Call", Method, 0}, + {"(Value).CallSlice", Method, 0}, + {"(Value).CanAddr", Method, 0}, + {"(Value).CanComplex", Method, 18}, + {"(Value).CanConvert", Method, 17}, + {"(Value).CanFloat", Method, 18}, + {"(Value).CanInt", Method, 18}, + {"(Value).CanInterface", Method, 0}, + {"(Value).CanSet", Method, 0}, + {"(Value).CanUint", Method, 18}, + {"(Value).Cap", Method, 0}, + {"(Value).Clear", Method, 21}, + {"(Value).Close", Method, 0}, + {"(Value).Comparable", Method, 20}, + {"(Value).Complex", Method, 0}, + {"(Value).Convert", Method, 1}, + {"(Value).Elem", Method, 0}, + {"(Value).Equal", Method, 20}, + {"(Value).Field", Method, 0}, + {"(Value).FieldByIndex", Method, 0}, + {"(Value).FieldByIndexErr", Method, 18}, + {"(Value).FieldByName", Method, 0}, + {"(Value).FieldByNameFunc", Method, 0}, + {"(Value).Float", Method, 0}, + {"(Value).Grow", Method, 20}, + {"(Value).Index", Method, 0}, + {"(Value).Int", Method, 0}, + {"(Value).Interface", Method, 0}, + {"(Value).InterfaceData", Method, 0}, + {"(Value).IsNil", Method, 0}, + {"(Value).IsValid", Method, 0}, + {"(Value).IsZero", Method, 13}, + {"(Value).Kind", Method, 0}, + {"(Value).Len", Method, 0}, + {"(Value).MapIndex", Method, 0}, + {"(Value).MapKeys", Method, 0}, + {"(Value).MapRange", Method, 12}, + {"(Value).Method", Method, 0}, + {"(Value).MethodByName", Method, 0}, + {"(Value).NumField", Method, 0}, + {"(Value).NumMethod", Method, 0}, + {"(Value).OverflowComplex", Method, 0}, + {"(Value).OverflowFloat", Method, 0}, + {"(Value).OverflowInt", Method, 0}, + {"(Value).OverflowUint", Method, 0}, + {"(Value).Pointer", Method, 0}, + {"(Value).Recv", Method, 0}, + {"(Value).Send", Method, 0}, + {"(Value).Set", Method, 0}, + {"(Value).SetBool", Method, 0}, + {"(Value).SetBytes", Method, 0}, + {"(Value).SetCap", Method, 2}, + {"(Value).SetComplex", Method, 0}, + {"(Value).SetFloat", Method, 0}, + {"(Value).SetInt", Method, 0}, + {"(Value).SetIterKey", Method, 18}, + {"(Value).SetIterValue", Method, 18}, + {"(Value).SetLen", Method, 0}, + {"(Value).SetMapIndex", Method, 0}, + {"(Value).SetPointer", Method, 0}, + {"(Value).SetString", Method, 0}, + {"(Value).SetUint", Method, 0}, + {"(Value).SetZero", Method, 20}, + {"(Value).Slice", Method, 0}, + {"(Value).Slice3", Method, 2}, + {"(Value).String", Method, 0}, + {"(Value).TryRecv", Method, 0}, + {"(Value).TrySend", Method, 0}, + {"(Value).Type", Method, 0}, + {"(Value).Uint", Method, 0}, + {"(Value).UnsafeAddr", Method, 0}, + {"(Value).UnsafePointer", Method, 18}, + {"Append", Func, 0}, + {"AppendSlice", Func, 0}, + {"Array", Const, 0}, + {"ArrayOf", Func, 5}, + {"Bool", Const, 0}, + {"BothDir", Const, 0}, + {"Chan", Const, 0}, + {"ChanDir", Type, 0}, + {"ChanOf", Func, 1}, + {"Complex128", Const, 0}, + {"Complex64", Const, 0}, + {"Copy", Func, 0}, + {"DeepEqual", Func, 0}, + {"Float32", Const, 0}, + {"Float64", Const, 0}, + {"Func", Const, 0}, + {"FuncOf", Func, 5}, + {"Indirect", Func, 0}, + {"Int", Const, 0}, + {"Int16", Const, 0}, + {"Int32", Const, 0}, + {"Int64", Const, 0}, + {"Int8", Const, 0}, + {"Interface", Const, 0}, + {"Invalid", Const, 0}, + {"Kind", Type, 0}, + {"MakeChan", Func, 0}, + {"MakeFunc", Func, 1}, + {"MakeMap", Func, 0}, + {"MakeMapWithSize", Func, 9}, + {"MakeSlice", Func, 0}, + {"Map", Const, 0}, + {"MapIter", Type, 12}, + {"MapOf", Func, 1}, + {"Method", Type, 0}, + {"Method.Func", Field, 0}, + {"Method.Index", Field, 0}, + {"Method.Name", Field, 0}, + {"Method.PkgPath", Field, 0}, + {"Method.Type", Field, 0}, + {"New", Func, 0}, + {"NewAt", Func, 0}, + {"Pointer", Const, 18}, + {"PointerTo", Func, 18}, + {"Ptr", Const, 0}, + {"PtrTo", Func, 0}, + {"RecvDir", Const, 0}, + {"Select", Func, 1}, + {"SelectCase", Type, 1}, + {"SelectCase.Chan", Field, 1}, + {"SelectCase.Dir", Field, 1}, + {"SelectCase.Send", Field, 1}, + {"SelectDefault", Const, 1}, + {"SelectDir", Type, 1}, + {"SelectRecv", Const, 1}, + {"SelectSend", Const, 1}, + {"SendDir", Const, 0}, + {"Slice", Const, 0}, + {"SliceHeader", Type, 0}, + {"SliceHeader.Cap", Field, 0}, + {"SliceHeader.Data", Field, 0}, + {"SliceHeader.Len", Field, 0}, + {"SliceOf", Func, 1}, + {"String", Const, 0}, + {"StringHeader", Type, 0}, + {"StringHeader.Data", Field, 0}, + {"StringHeader.Len", Field, 0}, + {"Struct", Const, 0}, + {"StructField", Type, 0}, + {"StructField.Anonymous", Field, 0}, + {"StructField.Index", Field, 0}, + {"StructField.Name", Field, 0}, + {"StructField.Offset", Field, 0}, + {"StructField.PkgPath", Field, 0}, + {"StructField.Tag", Field, 0}, + {"StructField.Type", Field, 0}, + {"StructOf", Func, 7}, + {"StructTag", Type, 0}, + {"Swapper", Func, 8}, + {"Type", Type, 0}, + {"TypeFor", Func, 22}, + {"TypeOf", Func, 0}, + {"Uint", Const, 0}, + {"Uint16", Const, 0}, + {"Uint32", Const, 0}, + {"Uint64", Const, 0}, + {"Uint8", Const, 0}, + {"Uintptr", Const, 0}, + {"UnsafePointer", Const, 0}, + {"Value", Type, 0}, + {"ValueError", Type, 0}, + {"ValueError.Kind", Field, 0}, + {"ValueError.Method", Field, 0}, + {"ValueOf", Func, 0}, + {"VisibleFields", Func, 17}, + {"Zero", Func, 0}, + }, + "regexp": { + {"(*Regexp).Copy", Method, 6}, + {"(*Regexp).Expand", Method, 0}, + {"(*Regexp).ExpandString", Method, 0}, + {"(*Regexp).Find", Method, 0}, + {"(*Regexp).FindAll", Method, 0}, + {"(*Regexp).FindAllIndex", Method, 0}, + {"(*Regexp).FindAllString", Method, 0}, + {"(*Regexp).FindAllStringIndex", Method, 0}, + {"(*Regexp).FindAllStringSubmatch", Method, 0}, + {"(*Regexp).FindAllStringSubmatchIndex", Method, 0}, + {"(*Regexp).FindAllSubmatch", Method, 0}, + {"(*Regexp).FindAllSubmatchIndex", Method, 0}, + {"(*Regexp).FindIndex", Method, 0}, + {"(*Regexp).FindReaderIndex", Method, 0}, + {"(*Regexp).FindReaderSubmatchIndex", Method, 0}, + {"(*Regexp).FindString", Method, 0}, + {"(*Regexp).FindStringIndex", Method, 0}, + {"(*Regexp).FindStringSubmatch", Method, 0}, + {"(*Regexp).FindStringSubmatchIndex", Method, 0}, + {"(*Regexp).FindSubmatch", Method, 0}, + {"(*Regexp).FindSubmatchIndex", Method, 0}, + {"(*Regexp).LiteralPrefix", Method, 0}, + {"(*Regexp).Longest", Method, 1}, + {"(*Regexp).MarshalText", Method, 21}, + {"(*Regexp).Match", Method, 0}, + {"(*Regexp).MatchReader", Method, 0}, + {"(*Regexp).MatchString", Method, 0}, + {"(*Regexp).NumSubexp", Method, 0}, + {"(*Regexp).ReplaceAll", Method, 0}, + {"(*Regexp).ReplaceAllFunc", Method, 0}, + {"(*Regexp).ReplaceAllLiteral", Method, 0}, + {"(*Regexp).ReplaceAllLiteralString", Method, 0}, + {"(*Regexp).ReplaceAllString", Method, 0}, + {"(*Regexp).ReplaceAllStringFunc", Method, 0}, + {"(*Regexp).Split", Method, 1}, + {"(*Regexp).String", Method, 0}, + {"(*Regexp).SubexpIndex", Method, 15}, + {"(*Regexp).SubexpNames", Method, 0}, + {"(*Regexp).UnmarshalText", Method, 21}, + {"Compile", Func, 0}, + {"CompilePOSIX", Func, 0}, + {"Match", Func, 0}, + {"MatchReader", Func, 0}, + {"MatchString", Func, 0}, + {"MustCompile", Func, 0}, + {"MustCompilePOSIX", Func, 0}, + {"QuoteMeta", Func, 0}, + {"Regexp", Type, 0}, + }, + "regexp/syntax": { + {"(*Error).Error", Method, 0}, + {"(*Inst).MatchEmptyWidth", Method, 0}, + {"(*Inst).MatchRune", Method, 0}, + {"(*Inst).MatchRunePos", Method, 3}, + {"(*Inst).String", Method, 0}, + {"(*Prog).Prefix", Method, 0}, + {"(*Prog).StartCond", Method, 0}, + {"(*Prog).String", Method, 0}, + {"(*Regexp).CapNames", Method, 0}, + {"(*Regexp).Equal", Method, 0}, + {"(*Regexp).MaxCap", Method, 0}, + {"(*Regexp).Simplify", Method, 0}, + {"(*Regexp).String", Method, 0}, + {"(ErrorCode).String", Method, 0}, + {"(InstOp).String", Method, 3}, + {"(Op).String", Method, 11}, + {"ClassNL", Const, 0}, + {"Compile", Func, 0}, + {"DotNL", Const, 0}, + {"EmptyBeginLine", Const, 0}, + {"EmptyBeginText", Const, 0}, + {"EmptyEndLine", Const, 0}, + {"EmptyEndText", Const, 0}, + {"EmptyNoWordBoundary", Const, 0}, + {"EmptyOp", Type, 0}, + {"EmptyOpContext", Func, 0}, + {"EmptyWordBoundary", Const, 0}, + {"ErrInternalError", Const, 0}, + {"ErrInvalidCharClass", Const, 0}, + {"ErrInvalidCharRange", Const, 0}, + {"ErrInvalidEscape", Const, 0}, + {"ErrInvalidNamedCapture", Const, 0}, + {"ErrInvalidPerlOp", Const, 0}, + {"ErrInvalidRepeatOp", Const, 0}, + {"ErrInvalidRepeatSize", Const, 0}, + {"ErrInvalidUTF8", Const, 0}, + {"ErrLarge", Const, 20}, + {"ErrMissingBracket", Const, 0}, + {"ErrMissingParen", Const, 0}, + {"ErrMissingRepeatArgument", Const, 0}, + {"ErrNestingDepth", Const, 19}, + {"ErrTrailingBackslash", Const, 0}, + {"ErrUnexpectedParen", Const, 1}, + {"Error", Type, 0}, + {"Error.Code", Field, 0}, + {"Error.Expr", Field, 0}, + {"ErrorCode", Type, 0}, + {"Flags", Type, 0}, + {"FoldCase", Const, 0}, + {"Inst", Type, 0}, + {"Inst.Arg", Field, 0}, + {"Inst.Op", Field, 0}, + {"Inst.Out", Field, 0}, + {"Inst.Rune", Field, 0}, + {"InstAlt", Const, 0}, + {"InstAltMatch", Const, 0}, + {"InstCapture", Const, 0}, + {"InstEmptyWidth", Const, 0}, + {"InstFail", Const, 0}, + {"InstMatch", Const, 0}, + {"InstNop", Const, 0}, + {"InstOp", Type, 0}, + {"InstRune", Const, 0}, + {"InstRune1", Const, 0}, + {"InstRuneAny", Const, 0}, + {"InstRuneAnyNotNL", Const, 0}, + {"IsWordChar", Func, 0}, + {"Literal", Const, 0}, + {"MatchNL", Const, 0}, + {"NonGreedy", Const, 0}, + {"OneLine", Const, 0}, + {"Op", Type, 0}, + {"OpAlternate", Const, 0}, + {"OpAnyChar", Const, 0}, + {"OpAnyCharNotNL", Const, 0}, + {"OpBeginLine", Const, 0}, + {"OpBeginText", Const, 0}, + {"OpCapture", Const, 0}, + {"OpCharClass", Const, 0}, + {"OpConcat", Const, 0}, + {"OpEmptyMatch", Const, 0}, + {"OpEndLine", Const, 0}, + {"OpEndText", Const, 0}, + {"OpLiteral", Const, 0}, + {"OpNoMatch", Const, 0}, + {"OpNoWordBoundary", Const, 0}, + {"OpPlus", Const, 0}, + {"OpQuest", Const, 0}, + {"OpRepeat", Const, 0}, + {"OpStar", Const, 0}, + {"OpWordBoundary", Const, 0}, + {"POSIX", Const, 0}, + {"Parse", Func, 0}, + {"Perl", Const, 0}, + {"PerlX", Const, 0}, + {"Prog", Type, 0}, + {"Prog.Inst", Field, 0}, + {"Prog.NumCap", Field, 0}, + {"Prog.Start", Field, 0}, + {"Regexp", Type, 0}, + {"Regexp.Cap", Field, 0}, + {"Regexp.Flags", Field, 0}, + {"Regexp.Max", Field, 0}, + {"Regexp.Min", Field, 0}, + {"Regexp.Name", Field, 0}, + {"Regexp.Op", Field, 0}, + {"Regexp.Rune", Field, 0}, + {"Regexp.Rune0", Field, 0}, + {"Regexp.Sub", Field, 0}, + {"Regexp.Sub0", Field, 0}, + {"Simple", Const, 0}, + {"UnicodeGroups", Const, 0}, + {"WasDollar", Const, 0}, + }, + "runtime": { + {"(*BlockProfileRecord).Stack", Method, 1}, + {"(*Frames).Next", Method, 7}, + {"(*Func).Entry", Method, 0}, + {"(*Func).FileLine", Method, 0}, + {"(*Func).Name", Method, 0}, + {"(*MemProfileRecord).InUseBytes", Method, 0}, + {"(*MemProfileRecord).InUseObjects", Method, 0}, + {"(*MemProfileRecord).Stack", Method, 0}, + {"(*PanicNilError).Error", Method, 21}, + {"(*PanicNilError).RuntimeError", Method, 21}, + {"(*Pinner).Pin", Method, 21}, + {"(*Pinner).Unpin", Method, 21}, + {"(*StackRecord).Stack", Method, 0}, + {"(*TypeAssertionError).Error", Method, 0}, + {"(*TypeAssertionError).RuntimeError", Method, 0}, + {"BlockProfile", Func, 1}, + {"BlockProfileRecord", Type, 1}, + {"BlockProfileRecord.Count", Field, 1}, + {"BlockProfileRecord.Cycles", Field, 1}, + {"BlockProfileRecord.StackRecord", Field, 1}, + {"Breakpoint", Func, 0}, + {"CPUProfile", Func, 0}, + {"Caller", Func, 0}, + {"Callers", Func, 0}, + {"CallersFrames", Func, 7}, + {"Compiler", Const, 0}, + {"Error", Type, 0}, + {"Frame", Type, 7}, + {"Frame.Entry", Field, 7}, + {"Frame.File", Field, 7}, + {"Frame.Func", Field, 7}, + {"Frame.Function", Field, 7}, + {"Frame.Line", Field, 7}, + {"Frame.PC", Field, 7}, + {"Frames", Type, 7}, + {"Func", Type, 0}, + {"FuncForPC", Func, 0}, + {"GC", Func, 0}, + {"GOARCH", Const, 0}, + {"GOMAXPROCS", Func, 0}, + {"GOOS", Const, 0}, + {"GOROOT", Func, 0}, + {"Goexit", Func, 0}, + {"GoroutineProfile", Func, 0}, + {"Gosched", Func, 0}, + {"KeepAlive", Func, 7}, + {"LockOSThread", Func, 0}, + {"MemProfile", Func, 0}, + {"MemProfileRate", Var, 0}, + {"MemProfileRecord", Type, 0}, + {"MemProfileRecord.AllocBytes", Field, 0}, + {"MemProfileRecord.AllocObjects", Field, 0}, + {"MemProfileRecord.FreeBytes", Field, 0}, + {"MemProfileRecord.FreeObjects", Field, 0}, + {"MemProfileRecord.Stack0", Field, 0}, + {"MemStats", Type, 0}, + {"MemStats.Alloc", Field, 0}, + {"MemStats.BuckHashSys", Field, 0}, + {"MemStats.BySize", Field, 0}, + {"MemStats.DebugGC", Field, 0}, + {"MemStats.EnableGC", Field, 0}, + {"MemStats.Frees", Field, 0}, + {"MemStats.GCCPUFraction", Field, 5}, + {"MemStats.GCSys", Field, 2}, + {"MemStats.HeapAlloc", Field, 0}, + {"MemStats.HeapIdle", Field, 0}, + {"MemStats.HeapInuse", Field, 0}, + {"MemStats.HeapObjects", Field, 0}, + {"MemStats.HeapReleased", Field, 0}, + {"MemStats.HeapSys", Field, 0}, + {"MemStats.LastGC", Field, 0}, + {"MemStats.Lookups", Field, 0}, + {"MemStats.MCacheInuse", Field, 0}, + {"MemStats.MCacheSys", Field, 0}, + {"MemStats.MSpanInuse", Field, 0}, + {"MemStats.MSpanSys", Field, 0}, + {"MemStats.Mallocs", Field, 0}, + {"MemStats.NextGC", Field, 0}, + {"MemStats.NumForcedGC", Field, 8}, + {"MemStats.NumGC", Field, 0}, + {"MemStats.OtherSys", Field, 2}, + {"MemStats.PauseEnd", Field, 4}, + {"MemStats.PauseNs", Field, 0}, + {"MemStats.PauseTotalNs", Field, 0}, + {"MemStats.StackInuse", Field, 0}, + {"MemStats.StackSys", Field, 0}, + {"MemStats.Sys", Field, 0}, + {"MemStats.TotalAlloc", Field, 0}, + {"MutexProfile", Func, 8}, + {"NumCPU", Func, 0}, + {"NumCgoCall", Func, 0}, + {"NumGoroutine", Func, 0}, + {"PanicNilError", Type, 21}, + {"Pinner", Type, 21}, + {"ReadMemStats", Func, 0}, + {"ReadTrace", Func, 5}, + {"SetBlockProfileRate", Func, 1}, + {"SetCPUProfileRate", Func, 0}, + {"SetCgoTraceback", Func, 7}, + {"SetFinalizer", Func, 0}, + {"SetMutexProfileFraction", Func, 8}, + {"Stack", Func, 0}, + {"StackRecord", Type, 0}, + {"StackRecord.Stack0", Field, 0}, + {"StartTrace", Func, 5}, + {"StopTrace", Func, 5}, + {"ThreadCreateProfile", Func, 0}, + {"TypeAssertionError", Type, 0}, + {"UnlockOSThread", Func, 0}, + {"Version", Func, 0}, + }, + "runtime/cgo": { + {"(Handle).Delete", Method, 17}, + {"(Handle).Value", Method, 17}, + {"Handle", Type, 17}, + {"Incomplete", Type, 20}, + {"NewHandle", Func, 17}, + }, + "runtime/coverage": { + {"ClearCounters", Func, 20}, + {"WriteCounters", Func, 20}, + {"WriteCountersDir", Func, 20}, + {"WriteMeta", Func, 20}, + {"WriteMetaDir", Func, 20}, + }, + "runtime/debug": { + {"(*BuildInfo).String", Method, 18}, + {"BuildInfo", Type, 12}, + {"BuildInfo.Deps", Field, 12}, + {"BuildInfo.GoVersion", Field, 18}, + {"BuildInfo.Main", Field, 12}, + {"BuildInfo.Path", Field, 12}, + {"BuildInfo.Settings", Field, 18}, + {"BuildSetting", Type, 18}, + {"BuildSetting.Key", Field, 18}, + {"BuildSetting.Value", Field, 18}, + {"FreeOSMemory", Func, 1}, + {"GCStats", Type, 1}, + {"GCStats.LastGC", Field, 1}, + {"GCStats.NumGC", Field, 1}, + {"GCStats.Pause", Field, 1}, + {"GCStats.PauseEnd", Field, 4}, + {"GCStats.PauseQuantiles", Field, 1}, + {"GCStats.PauseTotal", Field, 1}, + {"Module", Type, 12}, + {"Module.Path", Field, 12}, + {"Module.Replace", Field, 12}, + {"Module.Sum", Field, 12}, + {"Module.Version", Field, 12}, + {"ParseBuildInfo", Func, 18}, + {"PrintStack", Func, 0}, + {"ReadBuildInfo", Func, 12}, + {"ReadGCStats", Func, 1}, + {"SetGCPercent", Func, 1}, + {"SetMaxStack", Func, 2}, + {"SetMaxThreads", Func, 2}, + {"SetMemoryLimit", Func, 19}, + {"SetPanicOnFault", Func, 3}, + {"SetTraceback", Func, 6}, + {"Stack", Func, 0}, + {"WriteHeapDump", Func, 3}, + }, + "runtime/metrics": { + {"(Value).Float64", Method, 16}, + {"(Value).Float64Histogram", Method, 16}, + {"(Value).Kind", Method, 16}, + {"(Value).Uint64", Method, 16}, + {"All", Func, 16}, + {"Description", Type, 16}, + {"Description.Cumulative", Field, 16}, + {"Description.Description", Field, 16}, + {"Description.Kind", Field, 16}, + {"Description.Name", Field, 16}, + {"Float64Histogram", Type, 16}, + {"Float64Histogram.Buckets", Field, 16}, + {"Float64Histogram.Counts", Field, 16}, + {"KindBad", Const, 16}, + {"KindFloat64", Const, 16}, + {"KindFloat64Histogram", Const, 16}, + {"KindUint64", Const, 16}, + {"Read", Func, 16}, + {"Sample", Type, 16}, + {"Sample.Name", Field, 16}, + {"Sample.Value", Field, 16}, + {"Value", Type, 16}, + {"ValueKind", Type, 16}, + }, + "runtime/pprof": { + {"(*Profile).Add", Method, 0}, + {"(*Profile).Count", Method, 0}, + {"(*Profile).Name", Method, 0}, + {"(*Profile).Remove", Method, 0}, + {"(*Profile).WriteTo", Method, 0}, + {"Do", Func, 9}, + {"ForLabels", Func, 9}, + {"Label", Func, 9}, + {"LabelSet", Type, 9}, + {"Labels", Func, 9}, + {"Lookup", Func, 0}, + {"NewProfile", Func, 0}, + {"Profile", Type, 0}, + {"Profiles", Func, 0}, + {"SetGoroutineLabels", Func, 9}, + {"StartCPUProfile", Func, 0}, + {"StopCPUProfile", Func, 0}, + {"WithLabels", Func, 9}, + {"WriteHeapProfile", Func, 0}, + }, + "runtime/trace": { + {"(*Region).End", Method, 11}, + {"(*Task).End", Method, 11}, + {"IsEnabled", Func, 11}, + {"Log", Func, 11}, + {"Logf", Func, 11}, + {"NewTask", Func, 11}, + {"Region", Type, 11}, + {"Start", Func, 5}, + {"StartRegion", Func, 11}, + {"Stop", Func, 5}, + {"Task", Type, 11}, + {"WithRegion", Func, 11}, + }, + "slices": { + {"BinarySearch", Func, 21}, + {"BinarySearchFunc", Func, 21}, + {"Clip", Func, 21}, + {"Clone", Func, 21}, + {"Compact", Func, 21}, + {"CompactFunc", Func, 21}, + {"Compare", Func, 21}, + {"CompareFunc", Func, 21}, + {"Concat", Func, 22}, + {"Contains", Func, 21}, + {"ContainsFunc", Func, 21}, + {"Delete", Func, 21}, + {"DeleteFunc", Func, 21}, + {"Equal", Func, 21}, + {"EqualFunc", Func, 21}, + {"Grow", Func, 21}, + {"Index", Func, 21}, + {"IndexFunc", Func, 21}, + {"Insert", Func, 21}, + {"IsSorted", Func, 21}, + {"IsSortedFunc", Func, 21}, + {"Max", Func, 21}, + {"MaxFunc", Func, 21}, + {"Min", Func, 21}, + {"MinFunc", Func, 21}, + {"Replace", Func, 21}, + {"Reverse", Func, 21}, + {"Sort", Func, 21}, + {"SortFunc", Func, 21}, + {"SortStableFunc", Func, 21}, + }, + "sort": { + {"(Float64Slice).Len", Method, 0}, + {"(Float64Slice).Less", Method, 0}, + {"(Float64Slice).Search", Method, 0}, + {"(Float64Slice).Sort", Method, 0}, + {"(Float64Slice).Swap", Method, 0}, + {"(IntSlice).Len", Method, 0}, + {"(IntSlice).Less", Method, 0}, + {"(IntSlice).Search", Method, 0}, + {"(IntSlice).Sort", Method, 0}, + {"(IntSlice).Swap", Method, 0}, + {"(StringSlice).Len", Method, 0}, + {"(StringSlice).Less", Method, 0}, + {"(StringSlice).Search", Method, 0}, + {"(StringSlice).Sort", Method, 0}, + {"(StringSlice).Swap", Method, 0}, + {"Find", Func, 19}, + {"Float64Slice", Type, 0}, + {"Float64s", Func, 0}, + {"Float64sAreSorted", Func, 0}, + {"IntSlice", Type, 0}, + {"Interface", Type, 0}, + {"Ints", Func, 0}, + {"IntsAreSorted", Func, 0}, + {"IsSorted", Func, 0}, + {"Reverse", Func, 1}, + {"Search", Func, 0}, + {"SearchFloat64s", Func, 0}, + {"SearchInts", Func, 0}, + {"SearchStrings", Func, 0}, + {"Slice", Func, 8}, + {"SliceIsSorted", Func, 8}, + {"SliceStable", Func, 8}, + {"Sort", Func, 0}, + {"Stable", Func, 2}, + {"StringSlice", Type, 0}, + {"Strings", Func, 0}, + {"StringsAreSorted", Func, 0}, + }, + "strconv": { + {"(*NumError).Error", Method, 0}, + {"(*NumError).Unwrap", Method, 14}, + {"AppendBool", Func, 0}, + {"AppendFloat", Func, 0}, + {"AppendInt", Func, 0}, + {"AppendQuote", Func, 0}, + {"AppendQuoteRune", Func, 0}, + {"AppendQuoteRuneToASCII", Func, 0}, + {"AppendQuoteRuneToGraphic", Func, 6}, + {"AppendQuoteToASCII", Func, 0}, + {"AppendQuoteToGraphic", Func, 6}, + {"AppendUint", Func, 0}, + {"Atoi", Func, 0}, + {"CanBackquote", Func, 0}, + {"ErrRange", Var, 0}, + {"ErrSyntax", Var, 0}, + {"FormatBool", Func, 0}, + {"FormatComplex", Func, 15}, + {"FormatFloat", Func, 0}, + {"FormatInt", Func, 0}, + {"FormatUint", Func, 0}, + {"IntSize", Const, 0}, + {"IsGraphic", Func, 6}, + {"IsPrint", Func, 0}, + {"Itoa", Func, 0}, + {"NumError", Type, 0}, + {"NumError.Err", Field, 0}, + {"NumError.Func", Field, 0}, + {"NumError.Num", Field, 0}, + {"ParseBool", Func, 0}, + {"ParseComplex", Func, 15}, + {"ParseFloat", Func, 0}, + {"ParseInt", Func, 0}, + {"ParseUint", Func, 0}, + {"Quote", Func, 0}, + {"QuoteRune", Func, 0}, + {"QuoteRuneToASCII", Func, 0}, + {"QuoteRuneToGraphic", Func, 6}, + {"QuoteToASCII", Func, 0}, + {"QuoteToGraphic", Func, 6}, + {"QuotedPrefix", Func, 17}, + {"Unquote", Func, 0}, + {"UnquoteChar", Func, 0}, + }, + "strings": { + {"(*Builder).Cap", Method, 12}, + {"(*Builder).Grow", Method, 10}, + {"(*Builder).Len", Method, 10}, + {"(*Builder).Reset", Method, 10}, + {"(*Builder).String", Method, 10}, + {"(*Builder).Write", Method, 10}, + {"(*Builder).WriteByte", Method, 10}, + {"(*Builder).WriteRune", Method, 10}, + {"(*Builder).WriteString", Method, 10}, + {"(*Reader).Len", Method, 0}, + {"(*Reader).Read", Method, 0}, + {"(*Reader).ReadAt", Method, 0}, + {"(*Reader).ReadByte", Method, 0}, + {"(*Reader).ReadRune", Method, 0}, + {"(*Reader).Reset", Method, 7}, + {"(*Reader).Seek", Method, 0}, + {"(*Reader).Size", Method, 5}, + {"(*Reader).UnreadByte", Method, 0}, + {"(*Reader).UnreadRune", Method, 0}, + {"(*Reader).WriteTo", Method, 1}, + {"(*Replacer).Replace", Method, 0}, + {"(*Replacer).WriteString", Method, 0}, + {"Builder", Type, 10}, + {"Clone", Func, 18}, + {"Compare", Func, 5}, + {"Contains", Func, 0}, + {"ContainsAny", Func, 0}, + {"ContainsFunc", Func, 21}, + {"ContainsRune", Func, 0}, + {"Count", Func, 0}, + {"Cut", Func, 18}, + {"CutPrefix", Func, 20}, + {"CutSuffix", Func, 20}, + {"EqualFold", Func, 0}, + {"Fields", Func, 0}, + {"FieldsFunc", Func, 0}, + {"HasPrefix", Func, 0}, + {"HasSuffix", Func, 0}, + {"Index", Func, 0}, + {"IndexAny", Func, 0}, + {"IndexByte", Func, 2}, + {"IndexFunc", Func, 0}, + {"IndexRune", Func, 0}, + {"Join", Func, 0}, + {"LastIndex", Func, 0}, + {"LastIndexAny", Func, 0}, + {"LastIndexByte", Func, 5}, + {"LastIndexFunc", Func, 0}, + {"Map", Func, 0}, + {"NewReader", Func, 0}, + {"NewReplacer", Func, 0}, + {"Reader", Type, 0}, + {"Repeat", Func, 0}, + {"Replace", Func, 0}, + {"ReplaceAll", Func, 12}, + {"Replacer", Type, 0}, + {"Split", Func, 0}, + {"SplitAfter", Func, 0}, + {"SplitAfterN", Func, 0}, + {"SplitN", Func, 0}, + {"Title", Func, 0}, + {"ToLower", Func, 0}, + {"ToLowerSpecial", Func, 0}, + {"ToTitle", Func, 0}, + {"ToTitleSpecial", Func, 0}, + {"ToUpper", Func, 0}, + {"ToUpperSpecial", Func, 0}, + {"ToValidUTF8", Func, 13}, + {"Trim", Func, 0}, + {"TrimFunc", Func, 0}, + {"TrimLeft", Func, 0}, + {"TrimLeftFunc", Func, 0}, + {"TrimPrefix", Func, 1}, + {"TrimRight", Func, 0}, + {"TrimRightFunc", Func, 0}, + {"TrimSpace", Func, 0}, + {"TrimSuffix", Func, 1}, + }, + "sync": { + {"(*Cond).Broadcast", Method, 0}, + {"(*Cond).Signal", Method, 0}, + {"(*Cond).Wait", Method, 0}, + {"(*Map).CompareAndDelete", Method, 20}, + {"(*Map).CompareAndSwap", Method, 20}, + {"(*Map).Delete", Method, 9}, + {"(*Map).Load", Method, 9}, + {"(*Map).LoadAndDelete", Method, 15}, + {"(*Map).LoadOrStore", Method, 9}, + {"(*Map).Range", Method, 9}, + {"(*Map).Store", Method, 9}, + {"(*Map).Swap", Method, 20}, + {"(*Mutex).Lock", Method, 0}, + {"(*Mutex).TryLock", Method, 18}, + {"(*Mutex).Unlock", Method, 0}, + {"(*Once).Do", Method, 0}, + {"(*Pool).Get", Method, 3}, + {"(*Pool).Put", Method, 3}, + {"(*RWMutex).Lock", Method, 0}, + {"(*RWMutex).RLock", Method, 0}, + {"(*RWMutex).RLocker", Method, 0}, + {"(*RWMutex).RUnlock", Method, 0}, + {"(*RWMutex).TryLock", Method, 18}, + {"(*RWMutex).TryRLock", Method, 18}, + {"(*RWMutex).Unlock", Method, 0}, + {"(*WaitGroup).Add", Method, 0}, + {"(*WaitGroup).Done", Method, 0}, + {"(*WaitGroup).Wait", Method, 0}, + {"Cond", Type, 0}, + {"Cond.L", Field, 0}, + {"Locker", Type, 0}, + {"Map", Type, 9}, + {"Mutex", Type, 0}, + {"NewCond", Func, 0}, + {"Once", Type, 0}, + {"OnceFunc", Func, 21}, + {"OnceValue", Func, 21}, + {"OnceValues", Func, 21}, + {"Pool", Type, 3}, + {"Pool.New", Field, 3}, + {"RWMutex", Type, 0}, + {"WaitGroup", Type, 0}, + }, + "sync/atomic": { + {"(*Bool).CompareAndSwap", Method, 19}, + {"(*Bool).Load", Method, 19}, + {"(*Bool).Store", Method, 19}, + {"(*Bool).Swap", Method, 19}, + {"(*Int32).Add", Method, 19}, + {"(*Int32).CompareAndSwap", Method, 19}, + {"(*Int32).Load", Method, 19}, + {"(*Int32).Store", Method, 19}, + {"(*Int32).Swap", Method, 19}, + {"(*Int64).Add", Method, 19}, + {"(*Int64).CompareAndSwap", Method, 19}, + {"(*Int64).Load", Method, 19}, + {"(*Int64).Store", Method, 19}, + {"(*Int64).Swap", Method, 19}, + {"(*Pointer).CompareAndSwap", Method, 19}, + {"(*Pointer).Load", Method, 19}, + {"(*Pointer).Store", Method, 19}, + {"(*Pointer).Swap", Method, 19}, + {"(*Uint32).Add", Method, 19}, + {"(*Uint32).CompareAndSwap", Method, 19}, + {"(*Uint32).Load", Method, 19}, + {"(*Uint32).Store", Method, 19}, + {"(*Uint32).Swap", Method, 19}, + {"(*Uint64).Add", Method, 19}, + {"(*Uint64).CompareAndSwap", Method, 19}, + {"(*Uint64).Load", Method, 19}, + {"(*Uint64).Store", Method, 19}, + {"(*Uint64).Swap", Method, 19}, + {"(*Uintptr).Add", Method, 19}, + {"(*Uintptr).CompareAndSwap", Method, 19}, + {"(*Uintptr).Load", Method, 19}, + {"(*Uintptr).Store", Method, 19}, + {"(*Uintptr).Swap", Method, 19}, + {"(*Value).CompareAndSwap", Method, 17}, + {"(*Value).Load", Method, 4}, + {"(*Value).Store", Method, 4}, + {"(*Value).Swap", Method, 17}, + {"AddInt32", Func, 0}, + {"AddInt64", Func, 0}, + {"AddUint32", Func, 0}, + {"AddUint64", Func, 0}, + {"AddUintptr", Func, 0}, + {"Bool", Type, 19}, + {"CompareAndSwapInt32", Func, 0}, + {"CompareAndSwapInt64", Func, 0}, + {"CompareAndSwapPointer", Func, 0}, + {"CompareAndSwapUint32", Func, 0}, + {"CompareAndSwapUint64", Func, 0}, + {"CompareAndSwapUintptr", Func, 0}, + {"Int32", Type, 19}, + {"Int64", Type, 19}, + {"LoadInt32", Func, 0}, + {"LoadInt64", Func, 0}, + {"LoadPointer", Func, 0}, + {"LoadUint32", Func, 0}, + {"LoadUint64", Func, 0}, + {"LoadUintptr", Func, 0}, + {"Pointer", Type, 19}, + {"StoreInt32", Func, 0}, + {"StoreInt64", Func, 0}, + {"StorePointer", Func, 0}, + {"StoreUint32", Func, 0}, + {"StoreUint64", Func, 0}, + {"StoreUintptr", Func, 0}, + {"SwapInt32", Func, 2}, + {"SwapInt64", Func, 2}, + {"SwapPointer", Func, 2}, + {"SwapUint32", Func, 2}, + {"SwapUint64", Func, 2}, + {"SwapUintptr", Func, 2}, + {"Uint32", Type, 19}, + {"Uint64", Type, 19}, + {"Uintptr", Type, 19}, + {"Value", Type, 4}, + }, + "syscall": { + {"(*Cmsghdr).SetLen", Method, 0}, + {"(*DLL).FindProc", Method, 0}, + {"(*DLL).MustFindProc", Method, 0}, + {"(*DLL).Release", Method, 0}, + {"(*DLLError).Error", Method, 0}, + {"(*DLLError).Unwrap", Method, 16}, + {"(*Filetime).Nanoseconds", Method, 0}, + {"(*Iovec).SetLen", Method, 0}, + {"(*LazyDLL).Handle", Method, 0}, + {"(*LazyDLL).Load", Method, 0}, + {"(*LazyDLL).NewProc", Method, 0}, + {"(*LazyProc).Addr", Method, 0}, + {"(*LazyProc).Call", Method, 0}, + {"(*LazyProc).Find", Method, 0}, + {"(*Msghdr).SetControllen", Method, 0}, + {"(*Proc).Addr", Method, 0}, + {"(*Proc).Call", Method, 0}, + {"(*PtraceRegs).PC", Method, 0}, + {"(*PtraceRegs).SetPC", Method, 0}, + {"(*RawSockaddrAny).Sockaddr", Method, 0}, + {"(*SID).Copy", Method, 0}, + {"(*SID).Len", Method, 0}, + {"(*SID).LookupAccount", Method, 0}, + {"(*SID).String", Method, 0}, + {"(*Timespec).Nano", Method, 0}, + {"(*Timespec).Unix", Method, 0}, + {"(*Timeval).Nano", Method, 0}, + {"(*Timeval).Nanoseconds", Method, 0}, + {"(*Timeval).Unix", Method, 0}, + {"(Errno).Error", Method, 0}, + {"(Errno).Is", Method, 13}, + {"(Errno).Temporary", Method, 0}, + {"(Errno).Timeout", Method, 0}, + {"(Signal).Signal", Method, 0}, + {"(Signal).String", Method, 0}, + {"(Token).Close", Method, 0}, + {"(Token).GetTokenPrimaryGroup", Method, 0}, + {"(Token).GetTokenUser", Method, 0}, + {"(Token).GetUserProfileDirectory", Method, 0}, + {"(WaitStatus).Continued", Method, 0}, + {"(WaitStatus).CoreDump", Method, 0}, + {"(WaitStatus).ExitStatus", Method, 0}, + {"(WaitStatus).Exited", Method, 0}, + {"(WaitStatus).Signal", Method, 0}, + {"(WaitStatus).Signaled", Method, 0}, + {"(WaitStatus).StopSignal", Method, 0}, + {"(WaitStatus).Stopped", Method, 0}, + {"(WaitStatus).TrapCause", Method, 0}, + {"AF_ALG", Const, 0}, + {"AF_APPLETALK", Const, 0}, + {"AF_ARP", Const, 0}, + {"AF_ASH", Const, 0}, + {"AF_ATM", Const, 0}, + {"AF_ATMPVC", Const, 0}, + {"AF_ATMSVC", Const, 0}, + {"AF_AX25", Const, 0}, + {"AF_BLUETOOTH", Const, 0}, + {"AF_BRIDGE", Const, 0}, + {"AF_CAIF", Const, 0}, + {"AF_CAN", Const, 0}, + {"AF_CCITT", Const, 0}, + {"AF_CHAOS", Const, 0}, + {"AF_CNT", Const, 0}, + {"AF_COIP", Const, 0}, + {"AF_DATAKIT", Const, 0}, + {"AF_DECnet", Const, 0}, + {"AF_DLI", Const, 0}, + {"AF_E164", Const, 0}, + {"AF_ECMA", Const, 0}, + {"AF_ECONET", Const, 0}, + {"AF_ENCAP", Const, 1}, + {"AF_FILE", Const, 0}, + {"AF_HYLINK", Const, 0}, + {"AF_IEEE80211", Const, 0}, + {"AF_IEEE802154", Const, 0}, + {"AF_IMPLINK", Const, 0}, + {"AF_INET", Const, 0}, + {"AF_INET6", Const, 0}, + {"AF_INET6_SDP", Const, 3}, + {"AF_INET_SDP", Const, 3}, + {"AF_IPX", Const, 0}, + {"AF_IRDA", Const, 0}, + {"AF_ISDN", Const, 0}, + {"AF_ISO", Const, 0}, + {"AF_IUCV", Const, 0}, + {"AF_KEY", Const, 0}, + {"AF_LAT", Const, 0}, + {"AF_LINK", Const, 0}, + {"AF_LLC", Const, 0}, + {"AF_LOCAL", Const, 0}, + {"AF_MAX", Const, 0}, + {"AF_MPLS", Const, 1}, + {"AF_NATM", Const, 0}, + {"AF_NDRV", Const, 0}, + {"AF_NETBEUI", Const, 0}, + {"AF_NETBIOS", Const, 0}, + {"AF_NETGRAPH", Const, 0}, + {"AF_NETLINK", Const, 0}, + {"AF_NETROM", Const, 0}, + {"AF_NS", Const, 0}, + {"AF_OROUTE", Const, 1}, + {"AF_OSI", Const, 0}, + {"AF_PACKET", Const, 0}, + {"AF_PHONET", Const, 0}, + {"AF_PPP", Const, 0}, + {"AF_PPPOX", Const, 0}, + {"AF_PUP", Const, 0}, + {"AF_RDS", Const, 0}, + {"AF_RESERVED_36", Const, 0}, + {"AF_ROSE", Const, 0}, + {"AF_ROUTE", Const, 0}, + {"AF_RXRPC", Const, 0}, + {"AF_SCLUSTER", Const, 0}, + {"AF_SECURITY", Const, 0}, + {"AF_SIP", Const, 0}, + {"AF_SLOW", Const, 0}, + {"AF_SNA", Const, 0}, + {"AF_SYSTEM", Const, 0}, + {"AF_TIPC", Const, 0}, + {"AF_UNIX", Const, 0}, + {"AF_UNSPEC", Const, 0}, + {"AF_UTUN", Const, 16}, + {"AF_VENDOR00", Const, 0}, + {"AF_VENDOR01", Const, 0}, + {"AF_VENDOR02", Const, 0}, + {"AF_VENDOR03", Const, 0}, + {"AF_VENDOR04", Const, 0}, + {"AF_VENDOR05", Const, 0}, + {"AF_VENDOR06", Const, 0}, + {"AF_VENDOR07", Const, 0}, + {"AF_VENDOR08", Const, 0}, + {"AF_VENDOR09", Const, 0}, + {"AF_VENDOR10", Const, 0}, + {"AF_VENDOR11", Const, 0}, + {"AF_VENDOR12", Const, 0}, + {"AF_VENDOR13", Const, 0}, + {"AF_VENDOR14", Const, 0}, + {"AF_VENDOR15", Const, 0}, + {"AF_VENDOR16", Const, 0}, + {"AF_VENDOR17", Const, 0}, + {"AF_VENDOR18", Const, 0}, + {"AF_VENDOR19", Const, 0}, + {"AF_VENDOR20", Const, 0}, + {"AF_VENDOR21", Const, 0}, + {"AF_VENDOR22", Const, 0}, + {"AF_VENDOR23", Const, 0}, + {"AF_VENDOR24", Const, 0}, + {"AF_VENDOR25", Const, 0}, + {"AF_VENDOR26", Const, 0}, + {"AF_VENDOR27", Const, 0}, + {"AF_VENDOR28", Const, 0}, + {"AF_VENDOR29", Const, 0}, + {"AF_VENDOR30", Const, 0}, + {"AF_VENDOR31", Const, 0}, + {"AF_VENDOR32", Const, 0}, + {"AF_VENDOR33", Const, 0}, + {"AF_VENDOR34", Const, 0}, + {"AF_VENDOR35", Const, 0}, + {"AF_VENDOR36", Const, 0}, + {"AF_VENDOR37", Const, 0}, + {"AF_VENDOR38", Const, 0}, + {"AF_VENDOR39", Const, 0}, + {"AF_VENDOR40", Const, 0}, + {"AF_VENDOR41", Const, 0}, + {"AF_VENDOR42", Const, 0}, + {"AF_VENDOR43", Const, 0}, + {"AF_VENDOR44", Const, 0}, + {"AF_VENDOR45", Const, 0}, + {"AF_VENDOR46", Const, 0}, + {"AF_VENDOR47", Const, 0}, + {"AF_WANPIPE", Const, 0}, + {"AF_X25", Const, 0}, + {"AI_CANONNAME", Const, 1}, + {"AI_NUMERICHOST", Const, 1}, + {"AI_PASSIVE", Const, 1}, + {"APPLICATION_ERROR", Const, 0}, + {"ARPHRD_ADAPT", Const, 0}, + {"ARPHRD_APPLETLK", Const, 0}, + {"ARPHRD_ARCNET", Const, 0}, + {"ARPHRD_ASH", Const, 0}, + {"ARPHRD_ATM", Const, 0}, + {"ARPHRD_AX25", Const, 0}, + {"ARPHRD_BIF", Const, 0}, + {"ARPHRD_CHAOS", Const, 0}, + {"ARPHRD_CISCO", Const, 0}, + {"ARPHRD_CSLIP", Const, 0}, + {"ARPHRD_CSLIP6", Const, 0}, + {"ARPHRD_DDCMP", Const, 0}, + {"ARPHRD_DLCI", Const, 0}, + {"ARPHRD_ECONET", Const, 0}, + {"ARPHRD_EETHER", Const, 0}, + {"ARPHRD_ETHER", Const, 0}, + {"ARPHRD_EUI64", Const, 0}, + {"ARPHRD_FCAL", Const, 0}, + {"ARPHRD_FCFABRIC", Const, 0}, + {"ARPHRD_FCPL", Const, 0}, + {"ARPHRD_FCPP", Const, 0}, + {"ARPHRD_FDDI", Const, 0}, + {"ARPHRD_FRAD", Const, 0}, + {"ARPHRD_FRELAY", Const, 1}, + {"ARPHRD_HDLC", Const, 0}, + {"ARPHRD_HIPPI", Const, 0}, + {"ARPHRD_HWX25", Const, 0}, + {"ARPHRD_IEEE1394", Const, 0}, + {"ARPHRD_IEEE802", Const, 0}, + {"ARPHRD_IEEE80211", Const, 0}, + {"ARPHRD_IEEE80211_PRISM", Const, 0}, + {"ARPHRD_IEEE80211_RADIOTAP", Const, 0}, + {"ARPHRD_IEEE802154", Const, 0}, + {"ARPHRD_IEEE802154_PHY", Const, 0}, + {"ARPHRD_IEEE802_TR", Const, 0}, + {"ARPHRD_INFINIBAND", Const, 0}, + {"ARPHRD_IPDDP", Const, 0}, + {"ARPHRD_IPGRE", Const, 0}, + {"ARPHRD_IRDA", Const, 0}, + {"ARPHRD_LAPB", Const, 0}, + {"ARPHRD_LOCALTLK", Const, 0}, + {"ARPHRD_LOOPBACK", Const, 0}, + {"ARPHRD_METRICOM", Const, 0}, + {"ARPHRD_NETROM", Const, 0}, + {"ARPHRD_NONE", Const, 0}, + {"ARPHRD_PIMREG", Const, 0}, + {"ARPHRD_PPP", Const, 0}, + {"ARPHRD_PRONET", Const, 0}, + {"ARPHRD_RAWHDLC", Const, 0}, + {"ARPHRD_ROSE", Const, 0}, + {"ARPHRD_RSRVD", Const, 0}, + {"ARPHRD_SIT", Const, 0}, + {"ARPHRD_SKIP", Const, 0}, + {"ARPHRD_SLIP", Const, 0}, + {"ARPHRD_SLIP6", Const, 0}, + {"ARPHRD_STRIP", Const, 1}, + {"ARPHRD_TUNNEL", Const, 0}, + {"ARPHRD_TUNNEL6", Const, 0}, + {"ARPHRD_VOID", Const, 0}, + {"ARPHRD_X25", Const, 0}, + {"AUTHTYPE_CLIENT", Const, 0}, + {"AUTHTYPE_SERVER", Const, 0}, + {"Accept", Func, 0}, + {"Accept4", Func, 1}, + {"AcceptEx", Func, 0}, + {"Access", Func, 0}, + {"Acct", Func, 0}, + {"AddrinfoW", Type, 1}, + {"AddrinfoW.Addr", Field, 1}, + {"AddrinfoW.Addrlen", Field, 1}, + {"AddrinfoW.Canonname", Field, 1}, + {"AddrinfoW.Family", Field, 1}, + {"AddrinfoW.Flags", Field, 1}, + {"AddrinfoW.Next", Field, 1}, + {"AddrinfoW.Protocol", Field, 1}, + {"AddrinfoW.Socktype", Field, 1}, + {"Adjtime", Func, 0}, + {"Adjtimex", Func, 0}, + {"AllThreadsSyscall", Func, 16}, + {"AllThreadsSyscall6", Func, 16}, + {"AttachLsf", Func, 0}, + {"B0", Const, 0}, + {"B1000000", Const, 0}, + {"B110", Const, 0}, + {"B115200", Const, 0}, + {"B1152000", Const, 0}, + {"B1200", Const, 0}, + {"B134", Const, 0}, + {"B14400", Const, 1}, + {"B150", Const, 0}, + {"B1500000", Const, 0}, + {"B1800", Const, 0}, + {"B19200", Const, 0}, + {"B200", Const, 0}, + {"B2000000", Const, 0}, + {"B230400", Const, 0}, + {"B2400", Const, 0}, + {"B2500000", Const, 0}, + {"B28800", Const, 1}, + {"B300", Const, 0}, + {"B3000000", Const, 0}, + {"B3500000", Const, 0}, + {"B38400", Const, 0}, + {"B4000000", Const, 0}, + {"B460800", Const, 0}, + {"B4800", Const, 0}, + {"B50", Const, 0}, + {"B500000", Const, 0}, + {"B57600", Const, 0}, + {"B576000", Const, 0}, + {"B600", Const, 0}, + {"B7200", Const, 1}, + {"B75", Const, 0}, + {"B76800", Const, 1}, + {"B921600", Const, 0}, + {"B9600", Const, 0}, + {"BASE_PROTOCOL", Const, 2}, + {"BIOCFEEDBACK", Const, 0}, + {"BIOCFLUSH", Const, 0}, + {"BIOCGBLEN", Const, 0}, + {"BIOCGDIRECTION", Const, 0}, + {"BIOCGDIRFILT", Const, 1}, + {"BIOCGDLT", Const, 0}, + {"BIOCGDLTLIST", Const, 0}, + {"BIOCGETBUFMODE", Const, 0}, + {"BIOCGETIF", Const, 0}, + {"BIOCGETZMAX", Const, 0}, + {"BIOCGFEEDBACK", Const, 1}, + {"BIOCGFILDROP", Const, 1}, + {"BIOCGHDRCMPLT", Const, 0}, + {"BIOCGRSIG", Const, 0}, + {"BIOCGRTIMEOUT", Const, 0}, + {"BIOCGSEESENT", Const, 0}, + {"BIOCGSTATS", Const, 0}, + {"BIOCGSTATSOLD", Const, 1}, + {"BIOCGTSTAMP", Const, 1}, + {"BIOCIMMEDIATE", Const, 0}, + {"BIOCLOCK", Const, 0}, + {"BIOCPROMISC", Const, 0}, + {"BIOCROTZBUF", Const, 0}, + {"BIOCSBLEN", Const, 0}, + {"BIOCSDIRECTION", Const, 0}, + {"BIOCSDIRFILT", Const, 1}, + {"BIOCSDLT", Const, 0}, + {"BIOCSETBUFMODE", Const, 0}, + {"BIOCSETF", Const, 0}, + {"BIOCSETFNR", Const, 0}, + {"BIOCSETIF", Const, 0}, + {"BIOCSETWF", Const, 0}, + {"BIOCSETZBUF", Const, 0}, + {"BIOCSFEEDBACK", Const, 1}, + {"BIOCSFILDROP", Const, 1}, + {"BIOCSHDRCMPLT", Const, 0}, + {"BIOCSRSIG", Const, 0}, + {"BIOCSRTIMEOUT", Const, 0}, + {"BIOCSSEESENT", Const, 0}, + {"BIOCSTCPF", Const, 1}, + {"BIOCSTSTAMP", Const, 1}, + {"BIOCSUDPF", Const, 1}, + {"BIOCVERSION", Const, 0}, + {"BPF_A", Const, 0}, + {"BPF_ABS", Const, 0}, + {"BPF_ADD", Const, 0}, + {"BPF_ALIGNMENT", Const, 0}, + {"BPF_ALIGNMENT32", Const, 1}, + {"BPF_ALU", Const, 0}, + {"BPF_AND", Const, 0}, + {"BPF_B", Const, 0}, + {"BPF_BUFMODE_BUFFER", Const, 0}, + {"BPF_BUFMODE_ZBUF", Const, 0}, + {"BPF_DFLTBUFSIZE", Const, 1}, + {"BPF_DIRECTION_IN", Const, 1}, + {"BPF_DIRECTION_OUT", Const, 1}, + {"BPF_DIV", Const, 0}, + {"BPF_H", Const, 0}, + {"BPF_IMM", Const, 0}, + {"BPF_IND", Const, 0}, + {"BPF_JA", Const, 0}, + {"BPF_JEQ", Const, 0}, + {"BPF_JGE", Const, 0}, + {"BPF_JGT", Const, 0}, + {"BPF_JMP", Const, 0}, + {"BPF_JSET", Const, 0}, + {"BPF_K", Const, 0}, + {"BPF_LD", Const, 0}, + {"BPF_LDX", Const, 0}, + {"BPF_LEN", Const, 0}, + {"BPF_LSH", Const, 0}, + {"BPF_MAJOR_VERSION", Const, 0}, + {"BPF_MAXBUFSIZE", Const, 0}, + {"BPF_MAXINSNS", Const, 0}, + {"BPF_MEM", Const, 0}, + {"BPF_MEMWORDS", Const, 0}, + {"BPF_MINBUFSIZE", Const, 0}, + {"BPF_MINOR_VERSION", Const, 0}, + {"BPF_MISC", Const, 0}, + {"BPF_MSH", Const, 0}, + {"BPF_MUL", Const, 0}, + {"BPF_NEG", Const, 0}, + {"BPF_OR", Const, 0}, + {"BPF_RELEASE", Const, 0}, + {"BPF_RET", Const, 0}, + {"BPF_RSH", Const, 0}, + {"BPF_ST", Const, 0}, + {"BPF_STX", Const, 0}, + {"BPF_SUB", Const, 0}, + {"BPF_TAX", Const, 0}, + {"BPF_TXA", Const, 0}, + {"BPF_T_BINTIME", Const, 1}, + {"BPF_T_BINTIME_FAST", Const, 1}, + {"BPF_T_BINTIME_MONOTONIC", Const, 1}, + {"BPF_T_BINTIME_MONOTONIC_FAST", Const, 1}, + {"BPF_T_FAST", Const, 1}, + {"BPF_T_FLAG_MASK", Const, 1}, + {"BPF_T_FORMAT_MASK", Const, 1}, + {"BPF_T_MICROTIME", Const, 1}, + {"BPF_T_MICROTIME_FAST", Const, 1}, + {"BPF_T_MICROTIME_MONOTONIC", Const, 1}, + {"BPF_T_MICROTIME_MONOTONIC_FAST", Const, 1}, + {"BPF_T_MONOTONIC", Const, 1}, + {"BPF_T_MONOTONIC_FAST", Const, 1}, + {"BPF_T_NANOTIME", Const, 1}, + {"BPF_T_NANOTIME_FAST", Const, 1}, + {"BPF_T_NANOTIME_MONOTONIC", Const, 1}, + {"BPF_T_NANOTIME_MONOTONIC_FAST", Const, 1}, + {"BPF_T_NONE", Const, 1}, + {"BPF_T_NORMAL", Const, 1}, + {"BPF_W", Const, 0}, + {"BPF_X", Const, 0}, + {"BRKINT", Const, 0}, + {"Bind", Func, 0}, + {"BindToDevice", Func, 0}, + {"BpfBuflen", Func, 0}, + {"BpfDatalink", Func, 0}, + {"BpfHdr", Type, 0}, + {"BpfHdr.Caplen", Field, 0}, + {"BpfHdr.Datalen", Field, 0}, + {"BpfHdr.Hdrlen", Field, 0}, + {"BpfHdr.Pad_cgo_0", Field, 0}, + {"BpfHdr.Tstamp", Field, 0}, + {"BpfHeadercmpl", Func, 0}, + {"BpfInsn", Type, 0}, + {"BpfInsn.Code", Field, 0}, + {"BpfInsn.Jf", Field, 0}, + {"BpfInsn.Jt", Field, 0}, + {"BpfInsn.K", Field, 0}, + {"BpfInterface", Func, 0}, + {"BpfJump", Func, 0}, + {"BpfProgram", Type, 0}, + {"BpfProgram.Insns", Field, 0}, + {"BpfProgram.Len", Field, 0}, + {"BpfProgram.Pad_cgo_0", Field, 0}, + {"BpfStat", Type, 0}, + {"BpfStat.Capt", Field, 2}, + {"BpfStat.Drop", Field, 0}, + {"BpfStat.Padding", Field, 2}, + {"BpfStat.Recv", Field, 0}, + {"BpfStats", Func, 0}, + {"BpfStmt", Func, 0}, + {"BpfTimeout", Func, 0}, + {"BpfTimeval", Type, 2}, + {"BpfTimeval.Sec", Field, 2}, + {"BpfTimeval.Usec", Field, 2}, + {"BpfVersion", Type, 0}, + {"BpfVersion.Major", Field, 0}, + {"BpfVersion.Minor", Field, 0}, + {"BpfZbuf", Type, 0}, + {"BpfZbuf.Bufa", Field, 0}, + {"BpfZbuf.Bufb", Field, 0}, + {"BpfZbuf.Buflen", Field, 0}, + {"BpfZbufHeader", Type, 0}, + {"BpfZbufHeader.Kernel_gen", Field, 0}, + {"BpfZbufHeader.Kernel_len", Field, 0}, + {"BpfZbufHeader.User_gen", Field, 0}, + {"BpfZbufHeader.X_bzh_pad", Field, 0}, + {"ByHandleFileInformation", Type, 0}, + {"ByHandleFileInformation.CreationTime", Field, 0}, + {"ByHandleFileInformation.FileAttributes", Field, 0}, + {"ByHandleFileInformation.FileIndexHigh", Field, 0}, + {"ByHandleFileInformation.FileIndexLow", Field, 0}, + {"ByHandleFileInformation.FileSizeHigh", Field, 0}, + {"ByHandleFileInformation.FileSizeLow", Field, 0}, + {"ByHandleFileInformation.LastAccessTime", Field, 0}, + {"ByHandleFileInformation.LastWriteTime", Field, 0}, + {"ByHandleFileInformation.NumberOfLinks", Field, 0}, + {"ByHandleFileInformation.VolumeSerialNumber", Field, 0}, + {"BytePtrFromString", Func, 1}, + {"ByteSliceFromString", Func, 1}, + {"CCR0_FLUSH", Const, 1}, + {"CERT_CHAIN_POLICY_AUTHENTICODE", Const, 0}, + {"CERT_CHAIN_POLICY_AUTHENTICODE_TS", Const, 0}, + {"CERT_CHAIN_POLICY_BASE", Const, 0}, + {"CERT_CHAIN_POLICY_BASIC_CONSTRAINTS", Const, 0}, + {"CERT_CHAIN_POLICY_EV", Const, 0}, + {"CERT_CHAIN_POLICY_MICROSOFT_ROOT", Const, 0}, + {"CERT_CHAIN_POLICY_NT_AUTH", Const, 0}, + {"CERT_CHAIN_POLICY_SSL", Const, 0}, + {"CERT_E_CN_NO_MATCH", Const, 0}, + {"CERT_E_EXPIRED", Const, 0}, + {"CERT_E_PURPOSE", Const, 0}, + {"CERT_E_ROLE", Const, 0}, + {"CERT_E_UNTRUSTEDROOT", Const, 0}, + {"CERT_STORE_ADD_ALWAYS", Const, 0}, + {"CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG", Const, 0}, + {"CERT_STORE_PROV_MEMORY", Const, 0}, + {"CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT", Const, 0}, + {"CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT", Const, 0}, + {"CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT", Const, 0}, + {"CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT", Const, 0}, + {"CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT", Const, 0}, + {"CERT_TRUST_INVALID_BASIC_CONSTRAINTS", Const, 0}, + {"CERT_TRUST_INVALID_EXTENSION", Const, 0}, + {"CERT_TRUST_INVALID_NAME_CONSTRAINTS", Const, 0}, + {"CERT_TRUST_INVALID_POLICY_CONSTRAINTS", Const, 0}, + {"CERT_TRUST_IS_CYCLIC", Const, 0}, + {"CERT_TRUST_IS_EXPLICIT_DISTRUST", Const, 0}, + {"CERT_TRUST_IS_NOT_SIGNATURE_VALID", Const, 0}, + {"CERT_TRUST_IS_NOT_TIME_VALID", Const, 0}, + {"CERT_TRUST_IS_NOT_VALID_FOR_USAGE", Const, 0}, + {"CERT_TRUST_IS_OFFLINE_REVOCATION", Const, 0}, + {"CERT_TRUST_IS_REVOKED", Const, 0}, + {"CERT_TRUST_IS_UNTRUSTED_ROOT", Const, 0}, + {"CERT_TRUST_NO_ERROR", Const, 0}, + {"CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY", Const, 0}, + {"CERT_TRUST_REVOCATION_STATUS_UNKNOWN", Const, 0}, + {"CFLUSH", Const, 1}, + {"CLOCAL", Const, 0}, + {"CLONE_CHILD_CLEARTID", Const, 2}, + {"CLONE_CHILD_SETTID", Const, 2}, + {"CLONE_CLEAR_SIGHAND", Const, 20}, + {"CLONE_CSIGNAL", Const, 3}, + {"CLONE_DETACHED", Const, 2}, + {"CLONE_FILES", Const, 2}, + {"CLONE_FS", Const, 2}, + {"CLONE_INTO_CGROUP", Const, 20}, + {"CLONE_IO", Const, 2}, + {"CLONE_NEWCGROUP", Const, 20}, + {"CLONE_NEWIPC", Const, 2}, + {"CLONE_NEWNET", Const, 2}, + {"CLONE_NEWNS", Const, 2}, + {"CLONE_NEWPID", Const, 2}, + {"CLONE_NEWTIME", Const, 20}, + {"CLONE_NEWUSER", Const, 2}, + {"CLONE_NEWUTS", Const, 2}, + {"CLONE_PARENT", Const, 2}, + {"CLONE_PARENT_SETTID", Const, 2}, + {"CLONE_PID", Const, 3}, + {"CLONE_PIDFD", Const, 20}, + {"CLONE_PTRACE", Const, 2}, + {"CLONE_SETTLS", Const, 2}, + {"CLONE_SIGHAND", Const, 2}, + {"CLONE_SYSVSEM", Const, 2}, + {"CLONE_THREAD", Const, 2}, + {"CLONE_UNTRACED", Const, 2}, + {"CLONE_VFORK", Const, 2}, + {"CLONE_VM", Const, 2}, + {"CPUID_CFLUSH", Const, 1}, + {"CREAD", Const, 0}, + {"CREATE_ALWAYS", Const, 0}, + {"CREATE_NEW", Const, 0}, + {"CREATE_NEW_PROCESS_GROUP", Const, 1}, + {"CREATE_UNICODE_ENVIRONMENT", Const, 0}, + {"CRYPT_DEFAULT_CONTAINER_OPTIONAL", Const, 0}, + {"CRYPT_DELETEKEYSET", Const, 0}, + {"CRYPT_MACHINE_KEYSET", Const, 0}, + {"CRYPT_NEWKEYSET", Const, 0}, + {"CRYPT_SILENT", Const, 0}, + {"CRYPT_VERIFYCONTEXT", Const, 0}, + {"CS5", Const, 0}, + {"CS6", Const, 0}, + {"CS7", Const, 0}, + {"CS8", Const, 0}, + {"CSIZE", Const, 0}, + {"CSTART", Const, 1}, + {"CSTATUS", Const, 1}, + {"CSTOP", Const, 1}, + {"CSTOPB", Const, 0}, + {"CSUSP", Const, 1}, + {"CTL_MAXNAME", Const, 0}, + {"CTL_NET", Const, 0}, + {"CTL_QUERY", Const, 1}, + {"CTRL_BREAK_EVENT", Const, 1}, + {"CTRL_CLOSE_EVENT", Const, 14}, + {"CTRL_C_EVENT", Const, 1}, + {"CTRL_LOGOFF_EVENT", Const, 14}, + {"CTRL_SHUTDOWN_EVENT", Const, 14}, + {"CancelIo", Func, 0}, + {"CancelIoEx", Func, 1}, + {"CertAddCertificateContextToStore", Func, 0}, + {"CertChainContext", Type, 0}, + {"CertChainContext.ChainCount", Field, 0}, + {"CertChainContext.Chains", Field, 0}, + {"CertChainContext.HasRevocationFreshnessTime", Field, 0}, + {"CertChainContext.LowerQualityChainCount", Field, 0}, + {"CertChainContext.LowerQualityChains", Field, 0}, + {"CertChainContext.RevocationFreshnessTime", Field, 0}, + {"CertChainContext.Size", Field, 0}, + {"CertChainContext.TrustStatus", Field, 0}, + {"CertChainElement", Type, 0}, + {"CertChainElement.ApplicationUsage", Field, 0}, + {"CertChainElement.CertContext", Field, 0}, + {"CertChainElement.ExtendedErrorInfo", Field, 0}, + {"CertChainElement.IssuanceUsage", Field, 0}, + {"CertChainElement.RevocationInfo", Field, 0}, + {"CertChainElement.Size", Field, 0}, + {"CertChainElement.TrustStatus", Field, 0}, + {"CertChainPara", Type, 0}, + {"CertChainPara.CacheResync", Field, 0}, + {"CertChainPara.CheckRevocationFreshnessTime", Field, 0}, + {"CertChainPara.RequestedUsage", Field, 0}, + {"CertChainPara.RequstedIssuancePolicy", Field, 0}, + {"CertChainPara.RevocationFreshnessTime", Field, 0}, + {"CertChainPara.Size", Field, 0}, + {"CertChainPara.URLRetrievalTimeout", Field, 0}, + {"CertChainPolicyPara", Type, 0}, + {"CertChainPolicyPara.ExtraPolicyPara", Field, 0}, + {"CertChainPolicyPara.Flags", Field, 0}, + {"CertChainPolicyPara.Size", Field, 0}, + {"CertChainPolicyStatus", Type, 0}, + {"CertChainPolicyStatus.ChainIndex", Field, 0}, + {"CertChainPolicyStatus.ElementIndex", Field, 0}, + {"CertChainPolicyStatus.Error", Field, 0}, + {"CertChainPolicyStatus.ExtraPolicyStatus", Field, 0}, + {"CertChainPolicyStatus.Size", Field, 0}, + {"CertCloseStore", Func, 0}, + {"CertContext", Type, 0}, + {"CertContext.CertInfo", Field, 0}, + {"CertContext.EncodedCert", Field, 0}, + {"CertContext.EncodingType", Field, 0}, + {"CertContext.Length", Field, 0}, + {"CertContext.Store", Field, 0}, + {"CertCreateCertificateContext", Func, 0}, + {"CertEnhKeyUsage", Type, 0}, + {"CertEnhKeyUsage.Length", Field, 0}, + {"CertEnhKeyUsage.UsageIdentifiers", Field, 0}, + {"CertEnumCertificatesInStore", Func, 0}, + {"CertFreeCertificateChain", Func, 0}, + {"CertFreeCertificateContext", Func, 0}, + {"CertGetCertificateChain", Func, 0}, + {"CertInfo", Type, 11}, + {"CertOpenStore", Func, 0}, + {"CertOpenSystemStore", Func, 0}, + {"CertRevocationCrlInfo", Type, 11}, + {"CertRevocationInfo", Type, 0}, + {"CertRevocationInfo.CrlInfo", Field, 0}, + {"CertRevocationInfo.FreshnessTime", Field, 0}, + {"CertRevocationInfo.HasFreshnessTime", Field, 0}, + {"CertRevocationInfo.OidSpecificInfo", Field, 0}, + {"CertRevocationInfo.RevocationOid", Field, 0}, + {"CertRevocationInfo.RevocationResult", Field, 0}, + {"CertRevocationInfo.Size", Field, 0}, + {"CertSimpleChain", Type, 0}, + {"CertSimpleChain.Elements", Field, 0}, + {"CertSimpleChain.HasRevocationFreshnessTime", Field, 0}, + {"CertSimpleChain.NumElements", Field, 0}, + {"CertSimpleChain.RevocationFreshnessTime", Field, 0}, + {"CertSimpleChain.Size", Field, 0}, + {"CertSimpleChain.TrustListInfo", Field, 0}, + {"CertSimpleChain.TrustStatus", Field, 0}, + {"CertTrustListInfo", Type, 11}, + {"CertTrustStatus", Type, 0}, + {"CertTrustStatus.ErrorStatus", Field, 0}, + {"CertTrustStatus.InfoStatus", Field, 0}, + {"CertUsageMatch", Type, 0}, + {"CertUsageMatch.Type", Field, 0}, + {"CertUsageMatch.Usage", Field, 0}, + {"CertVerifyCertificateChainPolicy", Func, 0}, + {"Chdir", Func, 0}, + {"CheckBpfVersion", Func, 0}, + {"Chflags", Func, 0}, + {"Chmod", Func, 0}, + {"Chown", Func, 0}, + {"Chroot", Func, 0}, + {"Clearenv", Func, 0}, + {"Close", Func, 0}, + {"CloseHandle", Func, 0}, + {"CloseOnExec", Func, 0}, + {"Closesocket", Func, 0}, + {"CmsgLen", Func, 0}, + {"CmsgSpace", Func, 0}, + {"Cmsghdr", Type, 0}, + {"Cmsghdr.Len", Field, 0}, + {"Cmsghdr.Level", Field, 0}, + {"Cmsghdr.Type", Field, 0}, + {"Cmsghdr.X__cmsg_data", Field, 0}, + {"CommandLineToArgv", Func, 0}, + {"ComputerName", Func, 0}, + {"Conn", Type, 9}, + {"Connect", Func, 0}, + {"ConnectEx", Func, 1}, + {"ConvertSidToStringSid", Func, 0}, + {"ConvertStringSidToSid", Func, 0}, + {"CopySid", Func, 0}, + {"Creat", Func, 0}, + {"CreateDirectory", Func, 0}, + {"CreateFile", Func, 0}, + {"CreateFileMapping", Func, 0}, + {"CreateHardLink", Func, 4}, + {"CreateIoCompletionPort", Func, 0}, + {"CreatePipe", Func, 0}, + {"CreateProcess", Func, 0}, + {"CreateProcessAsUser", Func, 10}, + {"CreateSymbolicLink", Func, 4}, + {"CreateToolhelp32Snapshot", Func, 4}, + {"Credential", Type, 0}, + {"Credential.Gid", Field, 0}, + {"Credential.Groups", Field, 0}, + {"Credential.NoSetGroups", Field, 9}, + {"Credential.Uid", Field, 0}, + {"CryptAcquireContext", Func, 0}, + {"CryptGenRandom", Func, 0}, + {"CryptReleaseContext", Func, 0}, + {"DIOCBSFLUSH", Const, 1}, + {"DIOCOSFPFLUSH", Const, 1}, + {"DLL", Type, 0}, + {"DLL.Handle", Field, 0}, + {"DLL.Name", Field, 0}, + {"DLLError", Type, 0}, + {"DLLError.Err", Field, 0}, + {"DLLError.Msg", Field, 0}, + {"DLLError.ObjName", Field, 0}, + {"DLT_A429", Const, 0}, + {"DLT_A653_ICM", Const, 0}, + {"DLT_AIRONET_HEADER", Const, 0}, + {"DLT_AOS", Const, 1}, + {"DLT_APPLE_IP_OVER_IEEE1394", Const, 0}, + {"DLT_ARCNET", Const, 0}, + {"DLT_ARCNET_LINUX", Const, 0}, + {"DLT_ATM_CLIP", Const, 0}, + {"DLT_ATM_RFC1483", Const, 0}, + {"DLT_AURORA", Const, 0}, + {"DLT_AX25", Const, 0}, + {"DLT_AX25_KISS", Const, 0}, + {"DLT_BACNET_MS_TP", Const, 0}, + {"DLT_BLUETOOTH_HCI_H4", Const, 0}, + {"DLT_BLUETOOTH_HCI_H4_WITH_PHDR", Const, 0}, + {"DLT_CAN20B", Const, 0}, + {"DLT_CAN_SOCKETCAN", Const, 1}, + {"DLT_CHAOS", Const, 0}, + {"DLT_CHDLC", Const, 0}, + {"DLT_CISCO_IOS", Const, 0}, + {"DLT_C_HDLC", Const, 0}, + {"DLT_C_HDLC_WITH_DIR", Const, 0}, + {"DLT_DBUS", Const, 1}, + {"DLT_DECT", Const, 1}, + {"DLT_DOCSIS", Const, 0}, + {"DLT_DVB_CI", Const, 1}, + {"DLT_ECONET", Const, 0}, + {"DLT_EN10MB", Const, 0}, + {"DLT_EN3MB", Const, 0}, + {"DLT_ENC", Const, 0}, + {"DLT_ERF", Const, 0}, + {"DLT_ERF_ETH", Const, 0}, + {"DLT_ERF_POS", Const, 0}, + {"DLT_FC_2", Const, 1}, + {"DLT_FC_2_WITH_FRAME_DELIMS", Const, 1}, + {"DLT_FDDI", Const, 0}, + {"DLT_FLEXRAY", Const, 0}, + {"DLT_FRELAY", Const, 0}, + {"DLT_FRELAY_WITH_DIR", Const, 0}, + {"DLT_GCOM_SERIAL", Const, 0}, + {"DLT_GCOM_T1E1", Const, 0}, + {"DLT_GPF_F", Const, 0}, + {"DLT_GPF_T", Const, 0}, + {"DLT_GPRS_LLC", Const, 0}, + {"DLT_GSMTAP_ABIS", Const, 1}, + {"DLT_GSMTAP_UM", Const, 1}, + {"DLT_HDLC", Const, 1}, + {"DLT_HHDLC", Const, 0}, + {"DLT_HIPPI", Const, 1}, + {"DLT_IBM_SN", Const, 0}, + {"DLT_IBM_SP", Const, 0}, + {"DLT_IEEE802", Const, 0}, + {"DLT_IEEE802_11", Const, 0}, + {"DLT_IEEE802_11_RADIO", Const, 0}, + {"DLT_IEEE802_11_RADIO_AVS", Const, 0}, + {"DLT_IEEE802_15_4", Const, 0}, + {"DLT_IEEE802_15_4_LINUX", Const, 0}, + {"DLT_IEEE802_15_4_NOFCS", Const, 1}, + {"DLT_IEEE802_15_4_NONASK_PHY", Const, 0}, + {"DLT_IEEE802_16_MAC_CPS", Const, 0}, + {"DLT_IEEE802_16_MAC_CPS_RADIO", Const, 0}, + {"DLT_IPFILTER", Const, 0}, + {"DLT_IPMB", Const, 0}, + {"DLT_IPMB_LINUX", Const, 0}, + {"DLT_IPNET", Const, 1}, + {"DLT_IPOIB", Const, 1}, + {"DLT_IPV4", Const, 1}, + {"DLT_IPV6", Const, 1}, + {"DLT_IP_OVER_FC", Const, 0}, + {"DLT_JUNIPER_ATM1", Const, 0}, + {"DLT_JUNIPER_ATM2", Const, 0}, + {"DLT_JUNIPER_ATM_CEMIC", Const, 1}, + {"DLT_JUNIPER_CHDLC", Const, 0}, + {"DLT_JUNIPER_ES", Const, 0}, + {"DLT_JUNIPER_ETHER", Const, 0}, + {"DLT_JUNIPER_FIBRECHANNEL", Const, 1}, + {"DLT_JUNIPER_FRELAY", Const, 0}, + {"DLT_JUNIPER_GGSN", Const, 0}, + {"DLT_JUNIPER_ISM", Const, 0}, + {"DLT_JUNIPER_MFR", Const, 0}, + {"DLT_JUNIPER_MLFR", Const, 0}, + {"DLT_JUNIPER_MLPPP", Const, 0}, + {"DLT_JUNIPER_MONITOR", Const, 0}, + {"DLT_JUNIPER_PIC_PEER", Const, 0}, + {"DLT_JUNIPER_PPP", Const, 0}, + {"DLT_JUNIPER_PPPOE", Const, 0}, + {"DLT_JUNIPER_PPPOE_ATM", Const, 0}, + {"DLT_JUNIPER_SERVICES", Const, 0}, + {"DLT_JUNIPER_SRX_E2E", Const, 1}, + {"DLT_JUNIPER_ST", Const, 0}, + {"DLT_JUNIPER_VP", Const, 0}, + {"DLT_JUNIPER_VS", Const, 1}, + {"DLT_LAPB_WITH_DIR", Const, 0}, + {"DLT_LAPD", Const, 0}, + {"DLT_LIN", Const, 0}, + {"DLT_LINUX_EVDEV", Const, 1}, + {"DLT_LINUX_IRDA", Const, 0}, + {"DLT_LINUX_LAPD", Const, 0}, + {"DLT_LINUX_PPP_WITHDIRECTION", Const, 0}, + {"DLT_LINUX_SLL", Const, 0}, + {"DLT_LOOP", Const, 0}, + {"DLT_LTALK", Const, 0}, + {"DLT_MATCHING_MAX", Const, 1}, + {"DLT_MATCHING_MIN", Const, 1}, + {"DLT_MFR", Const, 0}, + {"DLT_MOST", Const, 0}, + {"DLT_MPEG_2_TS", Const, 1}, + {"DLT_MPLS", Const, 1}, + {"DLT_MTP2", Const, 0}, + {"DLT_MTP2_WITH_PHDR", Const, 0}, + {"DLT_MTP3", Const, 0}, + {"DLT_MUX27010", Const, 1}, + {"DLT_NETANALYZER", Const, 1}, + {"DLT_NETANALYZER_TRANSPARENT", Const, 1}, + {"DLT_NFC_LLCP", Const, 1}, + {"DLT_NFLOG", Const, 1}, + {"DLT_NG40", Const, 1}, + {"DLT_NULL", Const, 0}, + {"DLT_PCI_EXP", Const, 0}, + {"DLT_PFLOG", Const, 0}, + {"DLT_PFSYNC", Const, 0}, + {"DLT_PPI", Const, 0}, + {"DLT_PPP", Const, 0}, + {"DLT_PPP_BSDOS", Const, 0}, + {"DLT_PPP_ETHER", Const, 0}, + {"DLT_PPP_PPPD", Const, 0}, + {"DLT_PPP_SERIAL", Const, 0}, + {"DLT_PPP_WITH_DIR", Const, 0}, + {"DLT_PPP_WITH_DIRECTION", Const, 0}, + {"DLT_PRISM_HEADER", Const, 0}, + {"DLT_PRONET", Const, 0}, + {"DLT_RAIF1", Const, 0}, + {"DLT_RAW", Const, 0}, + {"DLT_RAWAF_MASK", Const, 1}, + {"DLT_RIO", Const, 0}, + {"DLT_SCCP", Const, 0}, + {"DLT_SITA", Const, 0}, + {"DLT_SLIP", Const, 0}, + {"DLT_SLIP_BSDOS", Const, 0}, + {"DLT_STANAG_5066_D_PDU", Const, 1}, + {"DLT_SUNATM", Const, 0}, + {"DLT_SYMANTEC_FIREWALL", Const, 0}, + {"DLT_TZSP", Const, 0}, + {"DLT_USB", Const, 0}, + {"DLT_USB_LINUX", Const, 0}, + {"DLT_USB_LINUX_MMAPPED", Const, 1}, + {"DLT_USER0", Const, 0}, + {"DLT_USER1", Const, 0}, + {"DLT_USER10", Const, 0}, + {"DLT_USER11", Const, 0}, + {"DLT_USER12", Const, 0}, + {"DLT_USER13", Const, 0}, + {"DLT_USER14", Const, 0}, + {"DLT_USER15", Const, 0}, + {"DLT_USER2", Const, 0}, + {"DLT_USER3", Const, 0}, + {"DLT_USER4", Const, 0}, + {"DLT_USER5", Const, 0}, + {"DLT_USER6", Const, 0}, + {"DLT_USER7", Const, 0}, + {"DLT_USER8", Const, 0}, + {"DLT_USER9", Const, 0}, + {"DLT_WIHART", Const, 1}, + {"DLT_X2E_SERIAL", Const, 0}, + {"DLT_X2E_XORAYA", Const, 0}, + {"DNSMXData", Type, 0}, + {"DNSMXData.NameExchange", Field, 0}, + {"DNSMXData.Pad", Field, 0}, + {"DNSMXData.Preference", Field, 0}, + {"DNSPTRData", Type, 0}, + {"DNSPTRData.Host", Field, 0}, + {"DNSRecord", Type, 0}, + {"DNSRecord.Data", Field, 0}, + {"DNSRecord.Dw", Field, 0}, + {"DNSRecord.Length", Field, 0}, + {"DNSRecord.Name", Field, 0}, + {"DNSRecord.Next", Field, 0}, + {"DNSRecord.Reserved", Field, 0}, + {"DNSRecord.Ttl", Field, 0}, + {"DNSRecord.Type", Field, 0}, + {"DNSSRVData", Type, 0}, + {"DNSSRVData.Pad", Field, 0}, + {"DNSSRVData.Port", Field, 0}, + {"DNSSRVData.Priority", Field, 0}, + {"DNSSRVData.Target", Field, 0}, + {"DNSSRVData.Weight", Field, 0}, + {"DNSTXTData", Type, 0}, + {"DNSTXTData.StringArray", Field, 0}, + {"DNSTXTData.StringCount", Field, 0}, + {"DNS_INFO_NO_RECORDS", Const, 4}, + {"DNS_TYPE_A", Const, 0}, + {"DNS_TYPE_A6", Const, 0}, + {"DNS_TYPE_AAAA", Const, 0}, + {"DNS_TYPE_ADDRS", Const, 0}, + {"DNS_TYPE_AFSDB", Const, 0}, + {"DNS_TYPE_ALL", Const, 0}, + {"DNS_TYPE_ANY", Const, 0}, + {"DNS_TYPE_ATMA", Const, 0}, + {"DNS_TYPE_AXFR", Const, 0}, + {"DNS_TYPE_CERT", Const, 0}, + {"DNS_TYPE_CNAME", Const, 0}, + {"DNS_TYPE_DHCID", Const, 0}, + {"DNS_TYPE_DNAME", Const, 0}, + {"DNS_TYPE_DNSKEY", Const, 0}, + {"DNS_TYPE_DS", Const, 0}, + {"DNS_TYPE_EID", Const, 0}, + {"DNS_TYPE_GID", Const, 0}, + {"DNS_TYPE_GPOS", Const, 0}, + {"DNS_TYPE_HINFO", Const, 0}, + {"DNS_TYPE_ISDN", Const, 0}, + {"DNS_TYPE_IXFR", Const, 0}, + {"DNS_TYPE_KEY", Const, 0}, + {"DNS_TYPE_KX", Const, 0}, + {"DNS_TYPE_LOC", Const, 0}, + {"DNS_TYPE_MAILA", Const, 0}, + {"DNS_TYPE_MAILB", Const, 0}, + {"DNS_TYPE_MB", Const, 0}, + {"DNS_TYPE_MD", Const, 0}, + {"DNS_TYPE_MF", Const, 0}, + {"DNS_TYPE_MG", Const, 0}, + {"DNS_TYPE_MINFO", Const, 0}, + {"DNS_TYPE_MR", Const, 0}, + {"DNS_TYPE_MX", Const, 0}, + {"DNS_TYPE_NAPTR", Const, 0}, + {"DNS_TYPE_NBSTAT", Const, 0}, + {"DNS_TYPE_NIMLOC", Const, 0}, + {"DNS_TYPE_NS", Const, 0}, + {"DNS_TYPE_NSAP", Const, 0}, + {"DNS_TYPE_NSAPPTR", Const, 0}, + {"DNS_TYPE_NSEC", Const, 0}, + {"DNS_TYPE_NULL", Const, 0}, + {"DNS_TYPE_NXT", Const, 0}, + {"DNS_TYPE_OPT", Const, 0}, + {"DNS_TYPE_PTR", Const, 0}, + {"DNS_TYPE_PX", Const, 0}, + {"DNS_TYPE_RP", Const, 0}, + {"DNS_TYPE_RRSIG", Const, 0}, + {"DNS_TYPE_RT", Const, 0}, + {"DNS_TYPE_SIG", Const, 0}, + {"DNS_TYPE_SINK", Const, 0}, + {"DNS_TYPE_SOA", Const, 0}, + {"DNS_TYPE_SRV", Const, 0}, + {"DNS_TYPE_TEXT", Const, 0}, + {"DNS_TYPE_TKEY", Const, 0}, + {"DNS_TYPE_TSIG", Const, 0}, + {"DNS_TYPE_UID", Const, 0}, + {"DNS_TYPE_UINFO", Const, 0}, + {"DNS_TYPE_UNSPEC", Const, 0}, + {"DNS_TYPE_WINS", Const, 0}, + {"DNS_TYPE_WINSR", Const, 0}, + {"DNS_TYPE_WKS", Const, 0}, + {"DNS_TYPE_X25", Const, 0}, + {"DT_BLK", Const, 0}, + {"DT_CHR", Const, 0}, + {"DT_DIR", Const, 0}, + {"DT_FIFO", Const, 0}, + {"DT_LNK", Const, 0}, + {"DT_REG", Const, 0}, + {"DT_SOCK", Const, 0}, + {"DT_UNKNOWN", Const, 0}, + {"DT_WHT", Const, 0}, + {"DUPLICATE_CLOSE_SOURCE", Const, 0}, + {"DUPLICATE_SAME_ACCESS", Const, 0}, + {"DeleteFile", Func, 0}, + {"DetachLsf", Func, 0}, + {"DeviceIoControl", Func, 4}, + {"Dirent", Type, 0}, + {"Dirent.Fileno", Field, 0}, + {"Dirent.Ino", Field, 0}, + {"Dirent.Name", Field, 0}, + {"Dirent.Namlen", Field, 0}, + {"Dirent.Off", Field, 0}, + {"Dirent.Pad0", Field, 12}, + {"Dirent.Pad1", Field, 12}, + {"Dirent.Pad_cgo_0", Field, 0}, + {"Dirent.Reclen", Field, 0}, + {"Dirent.Seekoff", Field, 0}, + {"Dirent.Type", Field, 0}, + {"Dirent.X__d_padding", Field, 3}, + {"DnsNameCompare", Func, 4}, + {"DnsQuery", Func, 0}, + {"DnsRecordListFree", Func, 0}, + {"DnsSectionAdditional", Const, 4}, + {"DnsSectionAnswer", Const, 4}, + {"DnsSectionAuthority", Const, 4}, + {"DnsSectionQuestion", Const, 4}, + {"Dup", Func, 0}, + {"Dup2", Func, 0}, + {"Dup3", Func, 2}, + {"DuplicateHandle", Func, 0}, + {"E2BIG", Const, 0}, + {"EACCES", Const, 0}, + {"EADDRINUSE", Const, 0}, + {"EADDRNOTAVAIL", Const, 0}, + {"EADV", Const, 0}, + {"EAFNOSUPPORT", Const, 0}, + {"EAGAIN", Const, 0}, + {"EALREADY", Const, 0}, + {"EAUTH", Const, 0}, + {"EBADARCH", Const, 0}, + {"EBADE", Const, 0}, + {"EBADEXEC", Const, 0}, + {"EBADF", Const, 0}, + {"EBADFD", Const, 0}, + {"EBADMACHO", Const, 0}, + {"EBADMSG", Const, 0}, + {"EBADR", Const, 0}, + {"EBADRPC", Const, 0}, + {"EBADRQC", Const, 0}, + {"EBADSLT", Const, 0}, + {"EBFONT", Const, 0}, + {"EBUSY", Const, 0}, + {"ECANCELED", Const, 0}, + {"ECAPMODE", Const, 1}, + {"ECHILD", Const, 0}, + {"ECHO", Const, 0}, + {"ECHOCTL", Const, 0}, + {"ECHOE", Const, 0}, + {"ECHOK", Const, 0}, + {"ECHOKE", Const, 0}, + {"ECHONL", Const, 0}, + {"ECHOPRT", Const, 0}, + {"ECHRNG", Const, 0}, + {"ECOMM", Const, 0}, + {"ECONNABORTED", Const, 0}, + {"ECONNREFUSED", Const, 0}, + {"ECONNRESET", Const, 0}, + {"EDEADLK", Const, 0}, + {"EDEADLOCK", Const, 0}, + {"EDESTADDRREQ", Const, 0}, + {"EDEVERR", Const, 0}, + {"EDOM", Const, 0}, + {"EDOOFUS", Const, 0}, + {"EDOTDOT", Const, 0}, + {"EDQUOT", Const, 0}, + {"EEXIST", Const, 0}, + {"EFAULT", Const, 0}, + {"EFBIG", Const, 0}, + {"EFER_LMA", Const, 1}, + {"EFER_LME", Const, 1}, + {"EFER_NXE", Const, 1}, + {"EFER_SCE", Const, 1}, + {"EFTYPE", Const, 0}, + {"EHOSTDOWN", Const, 0}, + {"EHOSTUNREACH", Const, 0}, + {"EHWPOISON", Const, 0}, + {"EIDRM", Const, 0}, + {"EILSEQ", Const, 0}, + {"EINPROGRESS", Const, 0}, + {"EINTR", Const, 0}, + {"EINVAL", Const, 0}, + {"EIO", Const, 0}, + {"EIPSEC", Const, 1}, + {"EISCONN", Const, 0}, + {"EISDIR", Const, 0}, + {"EISNAM", Const, 0}, + {"EKEYEXPIRED", Const, 0}, + {"EKEYREJECTED", Const, 0}, + {"EKEYREVOKED", Const, 0}, + {"EL2HLT", Const, 0}, + {"EL2NSYNC", Const, 0}, + {"EL3HLT", Const, 0}, + {"EL3RST", Const, 0}, + {"ELAST", Const, 0}, + {"ELF_NGREG", Const, 0}, + {"ELF_PRARGSZ", Const, 0}, + {"ELIBACC", Const, 0}, + {"ELIBBAD", Const, 0}, + {"ELIBEXEC", Const, 0}, + {"ELIBMAX", Const, 0}, + {"ELIBSCN", Const, 0}, + {"ELNRNG", Const, 0}, + {"ELOOP", Const, 0}, + {"EMEDIUMTYPE", Const, 0}, + {"EMFILE", Const, 0}, + {"EMLINK", Const, 0}, + {"EMSGSIZE", Const, 0}, + {"EMT_TAGOVF", Const, 1}, + {"EMULTIHOP", Const, 0}, + {"EMUL_ENABLED", Const, 1}, + {"EMUL_LINUX", Const, 1}, + {"EMUL_LINUX32", Const, 1}, + {"EMUL_MAXID", Const, 1}, + {"EMUL_NATIVE", Const, 1}, + {"ENAMETOOLONG", Const, 0}, + {"ENAVAIL", Const, 0}, + {"ENDRUNDISC", Const, 1}, + {"ENEEDAUTH", Const, 0}, + {"ENETDOWN", Const, 0}, + {"ENETRESET", Const, 0}, + {"ENETUNREACH", Const, 0}, + {"ENFILE", Const, 0}, + {"ENOANO", Const, 0}, + {"ENOATTR", Const, 0}, + {"ENOBUFS", Const, 0}, + {"ENOCSI", Const, 0}, + {"ENODATA", Const, 0}, + {"ENODEV", Const, 0}, + {"ENOENT", Const, 0}, + {"ENOEXEC", Const, 0}, + {"ENOKEY", Const, 0}, + {"ENOLCK", Const, 0}, + {"ENOLINK", Const, 0}, + {"ENOMEDIUM", Const, 0}, + {"ENOMEM", Const, 0}, + {"ENOMSG", Const, 0}, + {"ENONET", Const, 0}, + {"ENOPKG", Const, 0}, + {"ENOPOLICY", Const, 0}, + {"ENOPROTOOPT", Const, 0}, + {"ENOSPC", Const, 0}, + {"ENOSR", Const, 0}, + {"ENOSTR", Const, 0}, + {"ENOSYS", Const, 0}, + {"ENOTBLK", Const, 0}, + {"ENOTCAPABLE", Const, 0}, + {"ENOTCONN", Const, 0}, + {"ENOTDIR", Const, 0}, + {"ENOTEMPTY", Const, 0}, + {"ENOTNAM", Const, 0}, + {"ENOTRECOVERABLE", Const, 0}, + {"ENOTSOCK", Const, 0}, + {"ENOTSUP", Const, 0}, + {"ENOTTY", Const, 0}, + {"ENOTUNIQ", Const, 0}, + {"ENXIO", Const, 0}, + {"EN_SW_CTL_INF", Const, 1}, + {"EN_SW_CTL_PREC", Const, 1}, + {"EN_SW_CTL_ROUND", Const, 1}, + {"EN_SW_DATACHAIN", Const, 1}, + {"EN_SW_DENORM", Const, 1}, + {"EN_SW_INVOP", Const, 1}, + {"EN_SW_OVERFLOW", Const, 1}, + {"EN_SW_PRECLOSS", Const, 1}, + {"EN_SW_UNDERFLOW", Const, 1}, + {"EN_SW_ZERODIV", Const, 1}, + {"EOPNOTSUPP", Const, 0}, + {"EOVERFLOW", Const, 0}, + {"EOWNERDEAD", Const, 0}, + {"EPERM", Const, 0}, + {"EPFNOSUPPORT", Const, 0}, + {"EPIPE", Const, 0}, + {"EPOLLERR", Const, 0}, + {"EPOLLET", Const, 0}, + {"EPOLLHUP", Const, 0}, + {"EPOLLIN", Const, 0}, + {"EPOLLMSG", Const, 0}, + {"EPOLLONESHOT", Const, 0}, + {"EPOLLOUT", Const, 0}, + {"EPOLLPRI", Const, 0}, + {"EPOLLRDBAND", Const, 0}, + {"EPOLLRDHUP", Const, 0}, + {"EPOLLRDNORM", Const, 0}, + {"EPOLLWRBAND", Const, 0}, + {"EPOLLWRNORM", Const, 0}, + {"EPOLL_CLOEXEC", Const, 0}, + {"EPOLL_CTL_ADD", Const, 0}, + {"EPOLL_CTL_DEL", Const, 0}, + {"EPOLL_CTL_MOD", Const, 0}, + {"EPOLL_NONBLOCK", Const, 0}, + {"EPROCLIM", Const, 0}, + {"EPROCUNAVAIL", Const, 0}, + {"EPROGMISMATCH", Const, 0}, + {"EPROGUNAVAIL", Const, 0}, + {"EPROTO", Const, 0}, + {"EPROTONOSUPPORT", Const, 0}, + {"EPROTOTYPE", Const, 0}, + {"EPWROFF", Const, 0}, + {"EQFULL", Const, 16}, + {"ERANGE", Const, 0}, + {"EREMCHG", Const, 0}, + {"EREMOTE", Const, 0}, + {"EREMOTEIO", Const, 0}, + {"ERESTART", Const, 0}, + {"ERFKILL", Const, 0}, + {"EROFS", Const, 0}, + {"ERPCMISMATCH", Const, 0}, + {"ERROR_ACCESS_DENIED", Const, 0}, + {"ERROR_ALREADY_EXISTS", Const, 0}, + {"ERROR_BROKEN_PIPE", Const, 0}, + {"ERROR_BUFFER_OVERFLOW", Const, 0}, + {"ERROR_DIR_NOT_EMPTY", Const, 8}, + {"ERROR_ENVVAR_NOT_FOUND", Const, 0}, + {"ERROR_FILE_EXISTS", Const, 0}, + {"ERROR_FILE_NOT_FOUND", Const, 0}, + {"ERROR_HANDLE_EOF", Const, 2}, + {"ERROR_INSUFFICIENT_BUFFER", Const, 0}, + {"ERROR_IO_PENDING", Const, 0}, + {"ERROR_MOD_NOT_FOUND", Const, 0}, + {"ERROR_MORE_DATA", Const, 3}, + {"ERROR_NETNAME_DELETED", Const, 3}, + {"ERROR_NOT_FOUND", Const, 1}, + {"ERROR_NO_MORE_FILES", Const, 0}, + {"ERROR_OPERATION_ABORTED", Const, 0}, + {"ERROR_PATH_NOT_FOUND", Const, 0}, + {"ERROR_PRIVILEGE_NOT_HELD", Const, 4}, + {"ERROR_PROC_NOT_FOUND", Const, 0}, + {"ESHLIBVERS", Const, 0}, + {"ESHUTDOWN", Const, 0}, + {"ESOCKTNOSUPPORT", Const, 0}, + {"ESPIPE", Const, 0}, + {"ESRCH", Const, 0}, + {"ESRMNT", Const, 0}, + {"ESTALE", Const, 0}, + {"ESTRPIPE", Const, 0}, + {"ETHERCAP_JUMBO_MTU", Const, 1}, + {"ETHERCAP_VLAN_HWTAGGING", Const, 1}, + {"ETHERCAP_VLAN_MTU", Const, 1}, + {"ETHERMIN", Const, 1}, + {"ETHERMTU", Const, 1}, + {"ETHERMTU_JUMBO", Const, 1}, + {"ETHERTYPE_8023", Const, 1}, + {"ETHERTYPE_AARP", Const, 1}, + {"ETHERTYPE_ACCTON", Const, 1}, + {"ETHERTYPE_AEONIC", Const, 1}, + {"ETHERTYPE_ALPHA", Const, 1}, + {"ETHERTYPE_AMBER", Const, 1}, + {"ETHERTYPE_AMOEBA", Const, 1}, + {"ETHERTYPE_AOE", Const, 1}, + {"ETHERTYPE_APOLLO", Const, 1}, + {"ETHERTYPE_APOLLODOMAIN", Const, 1}, + {"ETHERTYPE_APPLETALK", Const, 1}, + {"ETHERTYPE_APPLITEK", Const, 1}, + {"ETHERTYPE_ARGONAUT", Const, 1}, + {"ETHERTYPE_ARP", Const, 1}, + {"ETHERTYPE_AT", Const, 1}, + {"ETHERTYPE_ATALK", Const, 1}, + {"ETHERTYPE_ATOMIC", Const, 1}, + {"ETHERTYPE_ATT", Const, 1}, + {"ETHERTYPE_ATTSTANFORD", Const, 1}, + {"ETHERTYPE_AUTOPHON", Const, 1}, + {"ETHERTYPE_AXIS", Const, 1}, + {"ETHERTYPE_BCLOOP", Const, 1}, + {"ETHERTYPE_BOFL", Const, 1}, + {"ETHERTYPE_CABLETRON", Const, 1}, + {"ETHERTYPE_CHAOS", Const, 1}, + {"ETHERTYPE_COMDESIGN", Const, 1}, + {"ETHERTYPE_COMPUGRAPHIC", Const, 1}, + {"ETHERTYPE_COUNTERPOINT", Const, 1}, + {"ETHERTYPE_CRONUS", Const, 1}, + {"ETHERTYPE_CRONUSVLN", Const, 1}, + {"ETHERTYPE_DCA", Const, 1}, + {"ETHERTYPE_DDE", Const, 1}, + {"ETHERTYPE_DEBNI", Const, 1}, + {"ETHERTYPE_DECAM", Const, 1}, + {"ETHERTYPE_DECCUST", Const, 1}, + {"ETHERTYPE_DECDIAG", Const, 1}, + {"ETHERTYPE_DECDNS", Const, 1}, + {"ETHERTYPE_DECDTS", Const, 1}, + {"ETHERTYPE_DECEXPER", Const, 1}, + {"ETHERTYPE_DECLAST", Const, 1}, + {"ETHERTYPE_DECLTM", Const, 1}, + {"ETHERTYPE_DECMUMPS", Const, 1}, + {"ETHERTYPE_DECNETBIOS", Const, 1}, + {"ETHERTYPE_DELTACON", Const, 1}, + {"ETHERTYPE_DIDDLE", Const, 1}, + {"ETHERTYPE_DLOG1", Const, 1}, + {"ETHERTYPE_DLOG2", Const, 1}, + {"ETHERTYPE_DN", Const, 1}, + {"ETHERTYPE_DOGFIGHT", Const, 1}, + {"ETHERTYPE_DSMD", Const, 1}, + {"ETHERTYPE_ECMA", Const, 1}, + {"ETHERTYPE_ENCRYPT", Const, 1}, + {"ETHERTYPE_ES", Const, 1}, + {"ETHERTYPE_EXCELAN", Const, 1}, + {"ETHERTYPE_EXPERDATA", Const, 1}, + {"ETHERTYPE_FLIP", Const, 1}, + {"ETHERTYPE_FLOWCONTROL", Const, 1}, + {"ETHERTYPE_FRARP", Const, 1}, + {"ETHERTYPE_GENDYN", Const, 1}, + {"ETHERTYPE_HAYES", Const, 1}, + {"ETHERTYPE_HIPPI_FP", Const, 1}, + {"ETHERTYPE_HITACHI", Const, 1}, + {"ETHERTYPE_HP", Const, 1}, + {"ETHERTYPE_IEEEPUP", Const, 1}, + {"ETHERTYPE_IEEEPUPAT", Const, 1}, + {"ETHERTYPE_IMLBL", Const, 1}, + {"ETHERTYPE_IMLBLDIAG", Const, 1}, + {"ETHERTYPE_IP", Const, 1}, + {"ETHERTYPE_IPAS", Const, 1}, + {"ETHERTYPE_IPV6", Const, 1}, + {"ETHERTYPE_IPX", Const, 1}, + {"ETHERTYPE_IPXNEW", Const, 1}, + {"ETHERTYPE_KALPANA", Const, 1}, + {"ETHERTYPE_LANBRIDGE", Const, 1}, + {"ETHERTYPE_LANPROBE", Const, 1}, + {"ETHERTYPE_LAT", Const, 1}, + {"ETHERTYPE_LBACK", Const, 1}, + {"ETHERTYPE_LITTLE", Const, 1}, + {"ETHERTYPE_LLDP", Const, 1}, + {"ETHERTYPE_LOGICRAFT", Const, 1}, + {"ETHERTYPE_LOOPBACK", Const, 1}, + {"ETHERTYPE_MATRA", Const, 1}, + {"ETHERTYPE_MAX", Const, 1}, + {"ETHERTYPE_MERIT", Const, 1}, + {"ETHERTYPE_MICP", Const, 1}, + {"ETHERTYPE_MOPDL", Const, 1}, + {"ETHERTYPE_MOPRC", Const, 1}, + {"ETHERTYPE_MOTOROLA", Const, 1}, + {"ETHERTYPE_MPLS", Const, 1}, + {"ETHERTYPE_MPLS_MCAST", Const, 1}, + {"ETHERTYPE_MUMPS", Const, 1}, + {"ETHERTYPE_NBPCC", Const, 1}, + {"ETHERTYPE_NBPCLAIM", Const, 1}, + {"ETHERTYPE_NBPCLREQ", Const, 1}, + {"ETHERTYPE_NBPCLRSP", Const, 1}, + {"ETHERTYPE_NBPCREQ", Const, 1}, + {"ETHERTYPE_NBPCRSP", Const, 1}, + {"ETHERTYPE_NBPDG", Const, 1}, + {"ETHERTYPE_NBPDGB", Const, 1}, + {"ETHERTYPE_NBPDLTE", Const, 1}, + {"ETHERTYPE_NBPRAR", Const, 1}, + {"ETHERTYPE_NBPRAS", Const, 1}, + {"ETHERTYPE_NBPRST", Const, 1}, + {"ETHERTYPE_NBPSCD", Const, 1}, + {"ETHERTYPE_NBPVCD", Const, 1}, + {"ETHERTYPE_NBS", Const, 1}, + {"ETHERTYPE_NCD", Const, 1}, + {"ETHERTYPE_NESTAR", Const, 1}, + {"ETHERTYPE_NETBEUI", Const, 1}, + {"ETHERTYPE_NOVELL", Const, 1}, + {"ETHERTYPE_NS", Const, 1}, + {"ETHERTYPE_NSAT", Const, 1}, + {"ETHERTYPE_NSCOMPAT", Const, 1}, + {"ETHERTYPE_NTRAILER", Const, 1}, + {"ETHERTYPE_OS9", Const, 1}, + {"ETHERTYPE_OS9NET", Const, 1}, + {"ETHERTYPE_PACER", Const, 1}, + {"ETHERTYPE_PAE", Const, 1}, + {"ETHERTYPE_PCS", Const, 1}, + {"ETHERTYPE_PLANNING", Const, 1}, + {"ETHERTYPE_PPP", Const, 1}, + {"ETHERTYPE_PPPOE", Const, 1}, + {"ETHERTYPE_PPPOEDISC", Const, 1}, + {"ETHERTYPE_PRIMENTS", Const, 1}, + {"ETHERTYPE_PUP", Const, 1}, + {"ETHERTYPE_PUPAT", Const, 1}, + {"ETHERTYPE_QINQ", Const, 1}, + {"ETHERTYPE_RACAL", Const, 1}, + {"ETHERTYPE_RATIONAL", Const, 1}, + {"ETHERTYPE_RAWFR", Const, 1}, + {"ETHERTYPE_RCL", Const, 1}, + {"ETHERTYPE_RDP", Const, 1}, + {"ETHERTYPE_RETIX", Const, 1}, + {"ETHERTYPE_REVARP", Const, 1}, + {"ETHERTYPE_SCA", Const, 1}, + {"ETHERTYPE_SECTRA", Const, 1}, + {"ETHERTYPE_SECUREDATA", Const, 1}, + {"ETHERTYPE_SGITW", Const, 1}, + {"ETHERTYPE_SG_BOUNCE", Const, 1}, + {"ETHERTYPE_SG_DIAG", Const, 1}, + {"ETHERTYPE_SG_NETGAMES", Const, 1}, + {"ETHERTYPE_SG_RESV", Const, 1}, + {"ETHERTYPE_SIMNET", Const, 1}, + {"ETHERTYPE_SLOW", Const, 1}, + {"ETHERTYPE_SLOWPROTOCOLS", Const, 1}, + {"ETHERTYPE_SNA", Const, 1}, + {"ETHERTYPE_SNMP", Const, 1}, + {"ETHERTYPE_SONIX", Const, 1}, + {"ETHERTYPE_SPIDER", Const, 1}, + {"ETHERTYPE_SPRITE", Const, 1}, + {"ETHERTYPE_STP", Const, 1}, + {"ETHERTYPE_TALARIS", Const, 1}, + {"ETHERTYPE_TALARISMC", Const, 1}, + {"ETHERTYPE_TCPCOMP", Const, 1}, + {"ETHERTYPE_TCPSM", Const, 1}, + {"ETHERTYPE_TEC", Const, 1}, + {"ETHERTYPE_TIGAN", Const, 1}, + {"ETHERTYPE_TRAIL", Const, 1}, + {"ETHERTYPE_TRANSETHER", Const, 1}, + {"ETHERTYPE_TYMSHARE", Const, 1}, + {"ETHERTYPE_UBBST", Const, 1}, + {"ETHERTYPE_UBDEBUG", Const, 1}, + {"ETHERTYPE_UBDIAGLOOP", Const, 1}, + {"ETHERTYPE_UBDL", Const, 1}, + {"ETHERTYPE_UBNIU", Const, 1}, + {"ETHERTYPE_UBNMC", Const, 1}, + {"ETHERTYPE_VALID", Const, 1}, + {"ETHERTYPE_VARIAN", Const, 1}, + {"ETHERTYPE_VAXELN", Const, 1}, + {"ETHERTYPE_VEECO", Const, 1}, + {"ETHERTYPE_VEXP", Const, 1}, + {"ETHERTYPE_VGLAB", Const, 1}, + {"ETHERTYPE_VINES", Const, 1}, + {"ETHERTYPE_VINESECHO", Const, 1}, + {"ETHERTYPE_VINESLOOP", Const, 1}, + {"ETHERTYPE_VITAL", Const, 1}, + {"ETHERTYPE_VLAN", Const, 1}, + {"ETHERTYPE_VLTLMAN", Const, 1}, + {"ETHERTYPE_VPROD", Const, 1}, + {"ETHERTYPE_VURESERVED", Const, 1}, + {"ETHERTYPE_WATERLOO", Const, 1}, + {"ETHERTYPE_WELLFLEET", Const, 1}, + {"ETHERTYPE_X25", Const, 1}, + {"ETHERTYPE_X75", Const, 1}, + {"ETHERTYPE_XNSSM", Const, 1}, + {"ETHERTYPE_XTP", Const, 1}, + {"ETHER_ADDR_LEN", Const, 1}, + {"ETHER_ALIGN", Const, 1}, + {"ETHER_CRC_LEN", Const, 1}, + {"ETHER_CRC_POLY_BE", Const, 1}, + {"ETHER_CRC_POLY_LE", Const, 1}, + {"ETHER_HDR_LEN", Const, 1}, + {"ETHER_MAX_DIX_LEN", Const, 1}, + {"ETHER_MAX_LEN", Const, 1}, + {"ETHER_MAX_LEN_JUMBO", Const, 1}, + {"ETHER_MIN_LEN", Const, 1}, + {"ETHER_PPPOE_ENCAP_LEN", Const, 1}, + {"ETHER_TYPE_LEN", Const, 1}, + {"ETHER_VLAN_ENCAP_LEN", Const, 1}, + {"ETH_P_1588", Const, 0}, + {"ETH_P_8021Q", Const, 0}, + {"ETH_P_802_2", Const, 0}, + {"ETH_P_802_3", Const, 0}, + {"ETH_P_AARP", Const, 0}, + {"ETH_P_ALL", Const, 0}, + {"ETH_P_AOE", Const, 0}, + {"ETH_P_ARCNET", Const, 0}, + {"ETH_P_ARP", Const, 0}, + {"ETH_P_ATALK", Const, 0}, + {"ETH_P_ATMFATE", Const, 0}, + {"ETH_P_ATMMPOA", Const, 0}, + {"ETH_P_AX25", Const, 0}, + {"ETH_P_BPQ", Const, 0}, + {"ETH_P_CAIF", Const, 0}, + {"ETH_P_CAN", Const, 0}, + {"ETH_P_CONTROL", Const, 0}, + {"ETH_P_CUST", Const, 0}, + {"ETH_P_DDCMP", Const, 0}, + {"ETH_P_DEC", Const, 0}, + {"ETH_P_DIAG", Const, 0}, + {"ETH_P_DNA_DL", Const, 0}, + {"ETH_P_DNA_RC", Const, 0}, + {"ETH_P_DNA_RT", Const, 0}, + {"ETH_P_DSA", Const, 0}, + {"ETH_P_ECONET", Const, 0}, + {"ETH_P_EDSA", Const, 0}, + {"ETH_P_FCOE", Const, 0}, + {"ETH_P_FIP", Const, 0}, + {"ETH_P_HDLC", Const, 0}, + {"ETH_P_IEEE802154", Const, 0}, + {"ETH_P_IEEEPUP", Const, 0}, + {"ETH_P_IEEEPUPAT", Const, 0}, + {"ETH_P_IP", Const, 0}, + {"ETH_P_IPV6", Const, 0}, + {"ETH_P_IPX", Const, 0}, + {"ETH_P_IRDA", Const, 0}, + {"ETH_P_LAT", Const, 0}, + {"ETH_P_LINK_CTL", Const, 0}, + {"ETH_P_LOCALTALK", Const, 0}, + {"ETH_P_LOOP", Const, 0}, + {"ETH_P_MOBITEX", Const, 0}, + {"ETH_P_MPLS_MC", Const, 0}, + {"ETH_P_MPLS_UC", Const, 0}, + {"ETH_P_PAE", Const, 0}, + {"ETH_P_PAUSE", Const, 0}, + {"ETH_P_PHONET", Const, 0}, + {"ETH_P_PPPTALK", Const, 0}, + {"ETH_P_PPP_DISC", Const, 0}, + {"ETH_P_PPP_MP", Const, 0}, + {"ETH_P_PPP_SES", Const, 0}, + {"ETH_P_PUP", Const, 0}, + {"ETH_P_PUPAT", Const, 0}, + {"ETH_P_RARP", Const, 0}, + {"ETH_P_SCA", Const, 0}, + {"ETH_P_SLOW", Const, 0}, + {"ETH_P_SNAP", Const, 0}, + {"ETH_P_TEB", Const, 0}, + {"ETH_P_TIPC", Const, 0}, + {"ETH_P_TRAILER", Const, 0}, + {"ETH_P_TR_802_2", Const, 0}, + {"ETH_P_WAN_PPP", Const, 0}, + {"ETH_P_WCCP", Const, 0}, + {"ETH_P_X25", Const, 0}, + {"ETIME", Const, 0}, + {"ETIMEDOUT", Const, 0}, + {"ETOOMANYREFS", Const, 0}, + {"ETXTBSY", Const, 0}, + {"EUCLEAN", Const, 0}, + {"EUNATCH", Const, 0}, + {"EUSERS", Const, 0}, + {"EVFILT_AIO", Const, 0}, + {"EVFILT_FS", Const, 0}, + {"EVFILT_LIO", Const, 0}, + {"EVFILT_MACHPORT", Const, 0}, + {"EVFILT_PROC", Const, 0}, + {"EVFILT_READ", Const, 0}, + {"EVFILT_SIGNAL", Const, 0}, + {"EVFILT_SYSCOUNT", Const, 0}, + {"EVFILT_THREADMARKER", Const, 0}, + {"EVFILT_TIMER", Const, 0}, + {"EVFILT_USER", Const, 0}, + {"EVFILT_VM", Const, 0}, + {"EVFILT_VNODE", Const, 0}, + {"EVFILT_WRITE", Const, 0}, + {"EV_ADD", Const, 0}, + {"EV_CLEAR", Const, 0}, + {"EV_DELETE", Const, 0}, + {"EV_DISABLE", Const, 0}, + {"EV_DISPATCH", Const, 0}, + {"EV_DROP", Const, 3}, + {"EV_ENABLE", Const, 0}, + {"EV_EOF", Const, 0}, + {"EV_ERROR", Const, 0}, + {"EV_FLAG0", Const, 0}, + {"EV_FLAG1", Const, 0}, + {"EV_ONESHOT", Const, 0}, + {"EV_OOBAND", Const, 0}, + {"EV_POLL", Const, 0}, + {"EV_RECEIPT", Const, 0}, + {"EV_SYSFLAGS", Const, 0}, + {"EWINDOWS", Const, 0}, + {"EWOULDBLOCK", Const, 0}, + {"EXDEV", Const, 0}, + {"EXFULL", Const, 0}, + {"EXTA", Const, 0}, + {"EXTB", Const, 0}, + {"EXTPROC", Const, 0}, + {"Environ", Func, 0}, + {"EpollCreate", Func, 0}, + {"EpollCreate1", Func, 0}, + {"EpollCtl", Func, 0}, + {"EpollEvent", Type, 0}, + {"EpollEvent.Events", Field, 0}, + {"EpollEvent.Fd", Field, 0}, + {"EpollEvent.Pad", Field, 0}, + {"EpollEvent.PadFd", Field, 0}, + {"EpollWait", Func, 0}, + {"Errno", Type, 0}, + {"EscapeArg", Func, 0}, + {"Exchangedata", Func, 0}, + {"Exec", Func, 0}, + {"Exit", Func, 0}, + {"ExitProcess", Func, 0}, + {"FD_CLOEXEC", Const, 0}, + {"FD_SETSIZE", Const, 0}, + {"FILE_ACTION_ADDED", Const, 0}, + {"FILE_ACTION_MODIFIED", Const, 0}, + {"FILE_ACTION_REMOVED", Const, 0}, + {"FILE_ACTION_RENAMED_NEW_NAME", Const, 0}, + {"FILE_ACTION_RENAMED_OLD_NAME", Const, 0}, + {"FILE_APPEND_DATA", Const, 0}, + {"FILE_ATTRIBUTE_ARCHIVE", Const, 0}, + {"FILE_ATTRIBUTE_DIRECTORY", Const, 0}, + {"FILE_ATTRIBUTE_HIDDEN", Const, 0}, + {"FILE_ATTRIBUTE_NORMAL", Const, 0}, + {"FILE_ATTRIBUTE_READONLY", Const, 0}, + {"FILE_ATTRIBUTE_REPARSE_POINT", Const, 4}, + {"FILE_ATTRIBUTE_SYSTEM", Const, 0}, + {"FILE_BEGIN", Const, 0}, + {"FILE_CURRENT", Const, 0}, + {"FILE_END", Const, 0}, + {"FILE_FLAG_BACKUP_SEMANTICS", Const, 0}, + {"FILE_FLAG_OPEN_REPARSE_POINT", Const, 4}, + {"FILE_FLAG_OVERLAPPED", Const, 0}, + {"FILE_LIST_DIRECTORY", Const, 0}, + {"FILE_MAP_COPY", Const, 0}, + {"FILE_MAP_EXECUTE", Const, 0}, + {"FILE_MAP_READ", Const, 0}, + {"FILE_MAP_WRITE", Const, 0}, + {"FILE_NOTIFY_CHANGE_ATTRIBUTES", Const, 0}, + {"FILE_NOTIFY_CHANGE_CREATION", Const, 0}, + {"FILE_NOTIFY_CHANGE_DIR_NAME", Const, 0}, + {"FILE_NOTIFY_CHANGE_FILE_NAME", Const, 0}, + {"FILE_NOTIFY_CHANGE_LAST_ACCESS", Const, 0}, + {"FILE_NOTIFY_CHANGE_LAST_WRITE", Const, 0}, + {"FILE_NOTIFY_CHANGE_SIZE", Const, 0}, + {"FILE_SHARE_DELETE", Const, 0}, + {"FILE_SHARE_READ", Const, 0}, + {"FILE_SHARE_WRITE", Const, 0}, + {"FILE_SKIP_COMPLETION_PORT_ON_SUCCESS", Const, 2}, + {"FILE_SKIP_SET_EVENT_ON_HANDLE", Const, 2}, + {"FILE_TYPE_CHAR", Const, 0}, + {"FILE_TYPE_DISK", Const, 0}, + {"FILE_TYPE_PIPE", Const, 0}, + {"FILE_TYPE_REMOTE", Const, 0}, + {"FILE_TYPE_UNKNOWN", Const, 0}, + {"FILE_WRITE_ATTRIBUTES", Const, 0}, + {"FLUSHO", Const, 0}, + {"FORMAT_MESSAGE_ALLOCATE_BUFFER", Const, 0}, + {"FORMAT_MESSAGE_ARGUMENT_ARRAY", Const, 0}, + {"FORMAT_MESSAGE_FROM_HMODULE", Const, 0}, + {"FORMAT_MESSAGE_FROM_STRING", Const, 0}, + {"FORMAT_MESSAGE_FROM_SYSTEM", Const, 0}, + {"FORMAT_MESSAGE_IGNORE_INSERTS", Const, 0}, + {"FORMAT_MESSAGE_MAX_WIDTH_MASK", Const, 0}, + {"FSCTL_GET_REPARSE_POINT", Const, 4}, + {"F_ADDFILESIGS", Const, 0}, + {"F_ADDSIGS", Const, 0}, + {"F_ALLOCATEALL", Const, 0}, + {"F_ALLOCATECONTIG", Const, 0}, + {"F_CANCEL", Const, 0}, + {"F_CHKCLEAN", Const, 0}, + {"F_CLOSEM", Const, 1}, + {"F_DUP2FD", Const, 0}, + {"F_DUP2FD_CLOEXEC", Const, 1}, + {"F_DUPFD", Const, 0}, + {"F_DUPFD_CLOEXEC", Const, 0}, + {"F_EXLCK", Const, 0}, + {"F_FINDSIGS", Const, 16}, + {"F_FLUSH_DATA", Const, 0}, + {"F_FREEZE_FS", Const, 0}, + {"F_FSCTL", Const, 1}, + {"F_FSDIRMASK", Const, 1}, + {"F_FSIN", Const, 1}, + {"F_FSINOUT", Const, 1}, + {"F_FSOUT", Const, 1}, + {"F_FSPRIV", Const, 1}, + {"F_FSVOID", Const, 1}, + {"F_FULLFSYNC", Const, 0}, + {"F_GETCODEDIR", Const, 16}, + {"F_GETFD", Const, 0}, + {"F_GETFL", Const, 0}, + {"F_GETLEASE", Const, 0}, + {"F_GETLK", Const, 0}, + {"F_GETLK64", Const, 0}, + {"F_GETLKPID", Const, 0}, + {"F_GETNOSIGPIPE", Const, 0}, + {"F_GETOWN", Const, 0}, + {"F_GETOWN_EX", Const, 0}, + {"F_GETPATH", Const, 0}, + {"F_GETPATH_MTMINFO", Const, 0}, + {"F_GETPIPE_SZ", Const, 0}, + {"F_GETPROTECTIONCLASS", Const, 0}, + {"F_GETPROTECTIONLEVEL", Const, 16}, + {"F_GETSIG", Const, 0}, + {"F_GLOBAL_NOCACHE", Const, 0}, + {"F_LOCK", Const, 0}, + {"F_LOG2PHYS", Const, 0}, + {"F_LOG2PHYS_EXT", Const, 0}, + {"F_MARKDEPENDENCY", Const, 0}, + {"F_MAXFD", Const, 1}, + {"F_NOCACHE", Const, 0}, + {"F_NODIRECT", Const, 0}, + {"F_NOTIFY", Const, 0}, + {"F_OGETLK", Const, 0}, + {"F_OK", Const, 0}, + {"F_OSETLK", Const, 0}, + {"F_OSETLKW", Const, 0}, + {"F_PARAM_MASK", Const, 1}, + {"F_PARAM_MAX", Const, 1}, + {"F_PATHPKG_CHECK", Const, 0}, + {"F_PEOFPOSMODE", Const, 0}, + {"F_PREALLOCATE", Const, 0}, + {"F_RDADVISE", Const, 0}, + {"F_RDAHEAD", Const, 0}, + {"F_RDLCK", Const, 0}, + {"F_READAHEAD", Const, 0}, + {"F_READBOOTSTRAP", Const, 0}, + {"F_SETBACKINGSTORE", Const, 0}, + {"F_SETFD", Const, 0}, + {"F_SETFL", Const, 0}, + {"F_SETLEASE", Const, 0}, + {"F_SETLK", Const, 0}, + {"F_SETLK64", Const, 0}, + {"F_SETLKW", Const, 0}, + {"F_SETLKW64", Const, 0}, + {"F_SETLKWTIMEOUT", Const, 16}, + {"F_SETLK_REMOTE", Const, 0}, + {"F_SETNOSIGPIPE", Const, 0}, + {"F_SETOWN", Const, 0}, + {"F_SETOWN_EX", Const, 0}, + {"F_SETPIPE_SZ", Const, 0}, + {"F_SETPROTECTIONCLASS", Const, 0}, + {"F_SETSIG", Const, 0}, + {"F_SETSIZE", Const, 0}, + {"F_SHLCK", Const, 0}, + {"F_SINGLE_WRITER", Const, 16}, + {"F_TEST", Const, 0}, + {"F_THAW_FS", Const, 0}, + {"F_TLOCK", Const, 0}, + {"F_TRANSCODEKEY", Const, 16}, + {"F_ULOCK", Const, 0}, + {"F_UNLCK", Const, 0}, + {"F_UNLCKSYS", Const, 0}, + {"F_VOLPOSMODE", Const, 0}, + {"F_WRITEBOOTSTRAP", Const, 0}, + {"F_WRLCK", Const, 0}, + {"Faccessat", Func, 0}, + {"Fallocate", Func, 0}, + {"Fbootstraptransfer_t", Type, 0}, + {"Fbootstraptransfer_t.Buffer", Field, 0}, + {"Fbootstraptransfer_t.Length", Field, 0}, + {"Fbootstraptransfer_t.Offset", Field, 0}, + {"Fchdir", Func, 0}, + {"Fchflags", Func, 0}, + {"Fchmod", Func, 0}, + {"Fchmodat", Func, 0}, + {"Fchown", Func, 0}, + {"Fchownat", Func, 0}, + {"FcntlFlock", Func, 3}, + {"FdSet", Type, 0}, + {"FdSet.Bits", Field, 0}, + {"FdSet.X__fds_bits", Field, 0}, + {"Fdatasync", Func, 0}, + {"FileNotifyInformation", Type, 0}, + {"FileNotifyInformation.Action", Field, 0}, + {"FileNotifyInformation.FileName", Field, 0}, + {"FileNotifyInformation.FileNameLength", Field, 0}, + {"FileNotifyInformation.NextEntryOffset", Field, 0}, + {"Filetime", Type, 0}, + {"Filetime.HighDateTime", Field, 0}, + {"Filetime.LowDateTime", Field, 0}, + {"FindClose", Func, 0}, + {"FindFirstFile", Func, 0}, + {"FindNextFile", Func, 0}, + {"Flock", Func, 0}, + {"Flock_t", Type, 0}, + {"Flock_t.Len", Field, 0}, + {"Flock_t.Pad_cgo_0", Field, 0}, + {"Flock_t.Pad_cgo_1", Field, 3}, + {"Flock_t.Pid", Field, 0}, + {"Flock_t.Start", Field, 0}, + {"Flock_t.Sysid", Field, 0}, + {"Flock_t.Type", Field, 0}, + {"Flock_t.Whence", Field, 0}, + {"FlushBpf", Func, 0}, + {"FlushFileBuffers", Func, 0}, + {"FlushViewOfFile", Func, 0}, + {"ForkExec", Func, 0}, + {"ForkLock", Var, 0}, + {"FormatMessage", Func, 0}, + {"Fpathconf", Func, 0}, + {"FreeAddrInfoW", Func, 1}, + {"FreeEnvironmentStrings", Func, 0}, + {"FreeLibrary", Func, 0}, + {"Fsid", Type, 0}, + {"Fsid.Val", Field, 0}, + {"Fsid.X__fsid_val", Field, 2}, + {"Fsid.X__val", Field, 0}, + {"Fstat", Func, 0}, + {"Fstatat", Func, 12}, + {"Fstatfs", Func, 0}, + {"Fstore_t", Type, 0}, + {"Fstore_t.Bytesalloc", Field, 0}, + {"Fstore_t.Flags", Field, 0}, + {"Fstore_t.Length", Field, 0}, + {"Fstore_t.Offset", Field, 0}, + {"Fstore_t.Posmode", Field, 0}, + {"Fsync", Func, 0}, + {"Ftruncate", Func, 0}, + {"FullPath", Func, 4}, + {"Futimes", Func, 0}, + {"Futimesat", Func, 0}, + {"GENERIC_ALL", Const, 0}, + {"GENERIC_EXECUTE", Const, 0}, + {"GENERIC_READ", Const, 0}, + {"GENERIC_WRITE", Const, 0}, + {"GUID", Type, 1}, + {"GUID.Data1", Field, 1}, + {"GUID.Data2", Field, 1}, + {"GUID.Data3", Field, 1}, + {"GUID.Data4", Field, 1}, + {"GetAcceptExSockaddrs", Func, 0}, + {"GetAdaptersInfo", Func, 0}, + {"GetAddrInfoW", Func, 1}, + {"GetCommandLine", Func, 0}, + {"GetComputerName", Func, 0}, + {"GetConsoleMode", Func, 1}, + {"GetCurrentDirectory", Func, 0}, + {"GetCurrentProcess", Func, 0}, + {"GetEnvironmentStrings", Func, 0}, + {"GetEnvironmentVariable", Func, 0}, + {"GetExitCodeProcess", Func, 0}, + {"GetFileAttributes", Func, 0}, + {"GetFileAttributesEx", Func, 0}, + {"GetFileExInfoStandard", Const, 0}, + {"GetFileExMaxInfoLevel", Const, 0}, + {"GetFileInformationByHandle", Func, 0}, + {"GetFileType", Func, 0}, + {"GetFullPathName", Func, 0}, + {"GetHostByName", Func, 0}, + {"GetIfEntry", Func, 0}, + {"GetLastError", Func, 0}, + {"GetLengthSid", Func, 0}, + {"GetLongPathName", Func, 0}, + {"GetProcAddress", Func, 0}, + {"GetProcessTimes", Func, 0}, + {"GetProtoByName", Func, 0}, + {"GetQueuedCompletionStatus", Func, 0}, + {"GetServByName", Func, 0}, + {"GetShortPathName", Func, 0}, + {"GetStartupInfo", Func, 0}, + {"GetStdHandle", Func, 0}, + {"GetSystemTimeAsFileTime", Func, 0}, + {"GetTempPath", Func, 0}, + {"GetTimeZoneInformation", Func, 0}, + {"GetTokenInformation", Func, 0}, + {"GetUserNameEx", Func, 0}, + {"GetUserProfileDirectory", Func, 0}, + {"GetVersion", Func, 0}, + {"Getcwd", Func, 0}, + {"Getdents", Func, 0}, + {"Getdirentries", Func, 0}, + {"Getdtablesize", Func, 0}, + {"Getegid", Func, 0}, + {"Getenv", Func, 0}, + {"Geteuid", Func, 0}, + {"Getfsstat", Func, 0}, + {"Getgid", Func, 0}, + {"Getgroups", Func, 0}, + {"Getpagesize", Func, 0}, + {"Getpeername", Func, 0}, + {"Getpgid", Func, 0}, + {"Getpgrp", Func, 0}, + {"Getpid", Func, 0}, + {"Getppid", Func, 0}, + {"Getpriority", Func, 0}, + {"Getrlimit", Func, 0}, + {"Getrusage", Func, 0}, + {"Getsid", Func, 0}, + {"Getsockname", Func, 0}, + {"Getsockopt", Func, 1}, + {"GetsockoptByte", Func, 0}, + {"GetsockoptICMPv6Filter", Func, 2}, + {"GetsockoptIPMreq", Func, 0}, + {"GetsockoptIPMreqn", Func, 0}, + {"GetsockoptIPv6MTUInfo", Func, 2}, + {"GetsockoptIPv6Mreq", Func, 0}, + {"GetsockoptInet4Addr", Func, 0}, + {"GetsockoptInt", Func, 0}, + {"GetsockoptUcred", Func, 1}, + {"Gettid", Func, 0}, + {"Gettimeofday", Func, 0}, + {"Getuid", Func, 0}, + {"Getwd", Func, 0}, + {"Getxattr", Func, 1}, + {"HANDLE_FLAG_INHERIT", Const, 0}, + {"HKEY_CLASSES_ROOT", Const, 0}, + {"HKEY_CURRENT_CONFIG", Const, 0}, + {"HKEY_CURRENT_USER", Const, 0}, + {"HKEY_DYN_DATA", Const, 0}, + {"HKEY_LOCAL_MACHINE", Const, 0}, + {"HKEY_PERFORMANCE_DATA", Const, 0}, + {"HKEY_USERS", Const, 0}, + {"HUPCL", Const, 0}, + {"Handle", Type, 0}, + {"Hostent", Type, 0}, + {"Hostent.AddrList", Field, 0}, + {"Hostent.AddrType", Field, 0}, + {"Hostent.Aliases", Field, 0}, + {"Hostent.Length", Field, 0}, + {"Hostent.Name", Field, 0}, + {"ICANON", Const, 0}, + {"ICMP6_FILTER", Const, 2}, + {"ICMPV6_FILTER", Const, 2}, + {"ICMPv6Filter", Type, 2}, + {"ICMPv6Filter.Data", Field, 2}, + {"ICMPv6Filter.Filt", Field, 2}, + {"ICRNL", Const, 0}, + {"IEXTEN", Const, 0}, + {"IFAN_ARRIVAL", Const, 1}, + {"IFAN_DEPARTURE", Const, 1}, + {"IFA_ADDRESS", Const, 0}, + {"IFA_ANYCAST", Const, 0}, + {"IFA_BROADCAST", Const, 0}, + {"IFA_CACHEINFO", Const, 0}, + {"IFA_F_DADFAILED", Const, 0}, + {"IFA_F_DEPRECATED", Const, 0}, + {"IFA_F_HOMEADDRESS", Const, 0}, + {"IFA_F_NODAD", Const, 0}, + {"IFA_F_OPTIMISTIC", Const, 0}, + {"IFA_F_PERMANENT", Const, 0}, + {"IFA_F_SECONDARY", Const, 0}, + {"IFA_F_TEMPORARY", Const, 0}, + {"IFA_F_TENTATIVE", Const, 0}, + {"IFA_LABEL", Const, 0}, + {"IFA_LOCAL", Const, 0}, + {"IFA_MAX", Const, 0}, + {"IFA_MULTICAST", Const, 0}, + {"IFA_ROUTE", Const, 1}, + {"IFA_UNSPEC", Const, 0}, + {"IFF_ALLMULTI", Const, 0}, + {"IFF_ALTPHYS", Const, 0}, + {"IFF_AUTOMEDIA", Const, 0}, + {"IFF_BROADCAST", Const, 0}, + {"IFF_CANTCHANGE", Const, 0}, + {"IFF_CANTCONFIG", Const, 1}, + {"IFF_DEBUG", Const, 0}, + {"IFF_DRV_OACTIVE", Const, 0}, + {"IFF_DRV_RUNNING", Const, 0}, + {"IFF_DYING", Const, 0}, + {"IFF_DYNAMIC", Const, 0}, + {"IFF_LINK0", Const, 0}, + {"IFF_LINK1", Const, 0}, + {"IFF_LINK2", Const, 0}, + {"IFF_LOOPBACK", Const, 0}, + {"IFF_MASTER", Const, 0}, + {"IFF_MONITOR", Const, 0}, + {"IFF_MULTICAST", Const, 0}, + {"IFF_NOARP", Const, 0}, + {"IFF_NOTRAILERS", Const, 0}, + {"IFF_NO_PI", Const, 0}, + {"IFF_OACTIVE", Const, 0}, + {"IFF_ONE_QUEUE", Const, 0}, + {"IFF_POINTOPOINT", Const, 0}, + {"IFF_POINTTOPOINT", Const, 0}, + {"IFF_PORTSEL", Const, 0}, + {"IFF_PPROMISC", Const, 0}, + {"IFF_PROMISC", Const, 0}, + {"IFF_RENAMING", Const, 0}, + {"IFF_RUNNING", Const, 0}, + {"IFF_SIMPLEX", Const, 0}, + {"IFF_SLAVE", Const, 0}, + {"IFF_SMART", Const, 0}, + {"IFF_STATICARP", Const, 0}, + {"IFF_TAP", Const, 0}, + {"IFF_TUN", Const, 0}, + {"IFF_TUN_EXCL", Const, 0}, + {"IFF_UP", Const, 0}, + {"IFF_VNET_HDR", Const, 0}, + {"IFLA_ADDRESS", Const, 0}, + {"IFLA_BROADCAST", Const, 0}, + {"IFLA_COST", Const, 0}, + {"IFLA_IFALIAS", Const, 0}, + {"IFLA_IFNAME", Const, 0}, + {"IFLA_LINK", Const, 0}, + {"IFLA_LINKINFO", Const, 0}, + {"IFLA_LINKMODE", Const, 0}, + {"IFLA_MAP", Const, 0}, + {"IFLA_MASTER", Const, 0}, + {"IFLA_MAX", Const, 0}, + {"IFLA_MTU", Const, 0}, + {"IFLA_NET_NS_PID", Const, 0}, + {"IFLA_OPERSTATE", Const, 0}, + {"IFLA_PRIORITY", Const, 0}, + {"IFLA_PROTINFO", Const, 0}, + {"IFLA_QDISC", Const, 0}, + {"IFLA_STATS", Const, 0}, + {"IFLA_TXQLEN", Const, 0}, + {"IFLA_UNSPEC", Const, 0}, + {"IFLA_WEIGHT", Const, 0}, + {"IFLA_WIRELESS", Const, 0}, + {"IFNAMSIZ", Const, 0}, + {"IFT_1822", Const, 0}, + {"IFT_A12MPPSWITCH", Const, 0}, + {"IFT_AAL2", Const, 0}, + {"IFT_AAL5", Const, 0}, + {"IFT_ADSL", Const, 0}, + {"IFT_AFLANE8023", Const, 0}, + {"IFT_AFLANE8025", Const, 0}, + {"IFT_ARAP", Const, 0}, + {"IFT_ARCNET", Const, 0}, + {"IFT_ARCNETPLUS", Const, 0}, + {"IFT_ASYNC", Const, 0}, + {"IFT_ATM", Const, 0}, + {"IFT_ATMDXI", Const, 0}, + {"IFT_ATMFUNI", Const, 0}, + {"IFT_ATMIMA", Const, 0}, + {"IFT_ATMLOGICAL", Const, 0}, + {"IFT_ATMRADIO", Const, 0}, + {"IFT_ATMSUBINTERFACE", Const, 0}, + {"IFT_ATMVCIENDPT", Const, 0}, + {"IFT_ATMVIRTUAL", Const, 0}, + {"IFT_BGPPOLICYACCOUNTING", Const, 0}, + {"IFT_BLUETOOTH", Const, 1}, + {"IFT_BRIDGE", Const, 0}, + {"IFT_BSC", Const, 0}, + {"IFT_CARP", Const, 0}, + {"IFT_CCTEMUL", Const, 0}, + {"IFT_CELLULAR", Const, 0}, + {"IFT_CEPT", Const, 0}, + {"IFT_CES", Const, 0}, + {"IFT_CHANNEL", Const, 0}, + {"IFT_CNR", Const, 0}, + {"IFT_COFFEE", Const, 0}, + {"IFT_COMPOSITELINK", Const, 0}, + {"IFT_DCN", Const, 0}, + {"IFT_DIGITALPOWERLINE", Const, 0}, + {"IFT_DIGITALWRAPPEROVERHEADCHANNEL", Const, 0}, + {"IFT_DLSW", Const, 0}, + {"IFT_DOCSCABLEDOWNSTREAM", Const, 0}, + {"IFT_DOCSCABLEMACLAYER", Const, 0}, + {"IFT_DOCSCABLEUPSTREAM", Const, 0}, + {"IFT_DOCSCABLEUPSTREAMCHANNEL", Const, 1}, + {"IFT_DS0", Const, 0}, + {"IFT_DS0BUNDLE", Const, 0}, + {"IFT_DS1FDL", Const, 0}, + {"IFT_DS3", Const, 0}, + {"IFT_DTM", Const, 0}, + {"IFT_DUMMY", Const, 1}, + {"IFT_DVBASILN", Const, 0}, + {"IFT_DVBASIOUT", Const, 0}, + {"IFT_DVBRCCDOWNSTREAM", Const, 0}, + {"IFT_DVBRCCMACLAYER", Const, 0}, + {"IFT_DVBRCCUPSTREAM", Const, 0}, + {"IFT_ECONET", Const, 1}, + {"IFT_ENC", Const, 0}, + {"IFT_EON", Const, 0}, + {"IFT_EPLRS", Const, 0}, + {"IFT_ESCON", Const, 0}, + {"IFT_ETHER", Const, 0}, + {"IFT_FAITH", Const, 0}, + {"IFT_FAST", Const, 0}, + {"IFT_FASTETHER", Const, 0}, + {"IFT_FASTETHERFX", Const, 0}, + {"IFT_FDDI", Const, 0}, + {"IFT_FIBRECHANNEL", Const, 0}, + {"IFT_FRAMERELAYINTERCONNECT", Const, 0}, + {"IFT_FRAMERELAYMPI", Const, 0}, + {"IFT_FRDLCIENDPT", Const, 0}, + {"IFT_FRELAY", Const, 0}, + {"IFT_FRELAYDCE", Const, 0}, + {"IFT_FRF16MFRBUNDLE", Const, 0}, + {"IFT_FRFORWARD", Const, 0}, + {"IFT_G703AT2MB", Const, 0}, + {"IFT_G703AT64K", Const, 0}, + {"IFT_GIF", Const, 0}, + {"IFT_GIGABITETHERNET", Const, 0}, + {"IFT_GR303IDT", Const, 0}, + {"IFT_GR303RDT", Const, 0}, + {"IFT_H323GATEKEEPER", Const, 0}, + {"IFT_H323PROXY", Const, 0}, + {"IFT_HDH1822", Const, 0}, + {"IFT_HDLC", Const, 0}, + {"IFT_HDSL2", Const, 0}, + {"IFT_HIPERLAN2", Const, 0}, + {"IFT_HIPPI", Const, 0}, + {"IFT_HIPPIINTERFACE", Const, 0}, + {"IFT_HOSTPAD", Const, 0}, + {"IFT_HSSI", Const, 0}, + {"IFT_HY", Const, 0}, + {"IFT_IBM370PARCHAN", Const, 0}, + {"IFT_IDSL", Const, 0}, + {"IFT_IEEE1394", Const, 0}, + {"IFT_IEEE80211", Const, 0}, + {"IFT_IEEE80212", Const, 0}, + {"IFT_IEEE8023ADLAG", Const, 0}, + {"IFT_IFGSN", Const, 0}, + {"IFT_IMT", Const, 0}, + {"IFT_INFINIBAND", Const, 1}, + {"IFT_INTERLEAVE", Const, 0}, + {"IFT_IP", Const, 0}, + {"IFT_IPFORWARD", Const, 0}, + {"IFT_IPOVERATM", Const, 0}, + {"IFT_IPOVERCDLC", Const, 0}, + {"IFT_IPOVERCLAW", Const, 0}, + {"IFT_IPSWITCH", Const, 0}, + {"IFT_IPXIP", Const, 0}, + {"IFT_ISDN", Const, 0}, + {"IFT_ISDNBASIC", Const, 0}, + {"IFT_ISDNPRIMARY", Const, 0}, + {"IFT_ISDNS", Const, 0}, + {"IFT_ISDNU", Const, 0}, + {"IFT_ISO88022LLC", Const, 0}, + {"IFT_ISO88023", Const, 0}, + {"IFT_ISO88024", Const, 0}, + {"IFT_ISO88025", Const, 0}, + {"IFT_ISO88025CRFPINT", Const, 0}, + {"IFT_ISO88025DTR", Const, 0}, + {"IFT_ISO88025FIBER", Const, 0}, + {"IFT_ISO88026", Const, 0}, + {"IFT_ISUP", Const, 0}, + {"IFT_L2VLAN", Const, 0}, + {"IFT_L3IPVLAN", Const, 0}, + {"IFT_L3IPXVLAN", Const, 0}, + {"IFT_LAPB", Const, 0}, + {"IFT_LAPD", Const, 0}, + {"IFT_LAPF", Const, 0}, + {"IFT_LINEGROUP", Const, 1}, + {"IFT_LOCALTALK", Const, 0}, + {"IFT_LOOP", Const, 0}, + {"IFT_MEDIAMAILOVERIP", Const, 0}, + {"IFT_MFSIGLINK", Const, 0}, + {"IFT_MIOX25", Const, 0}, + {"IFT_MODEM", Const, 0}, + {"IFT_MPC", Const, 0}, + {"IFT_MPLS", Const, 0}, + {"IFT_MPLSTUNNEL", Const, 0}, + {"IFT_MSDSL", Const, 0}, + {"IFT_MVL", Const, 0}, + {"IFT_MYRINET", Const, 0}, + {"IFT_NFAS", Const, 0}, + {"IFT_NSIP", Const, 0}, + {"IFT_OPTICALCHANNEL", Const, 0}, + {"IFT_OPTICALTRANSPORT", Const, 0}, + {"IFT_OTHER", Const, 0}, + {"IFT_P10", Const, 0}, + {"IFT_P80", Const, 0}, + {"IFT_PARA", Const, 0}, + {"IFT_PDP", Const, 0}, + {"IFT_PFLOG", Const, 0}, + {"IFT_PFLOW", Const, 1}, + {"IFT_PFSYNC", Const, 0}, + {"IFT_PLC", Const, 0}, + {"IFT_PON155", Const, 1}, + {"IFT_PON622", Const, 1}, + {"IFT_POS", Const, 0}, + {"IFT_PPP", Const, 0}, + {"IFT_PPPMULTILINKBUNDLE", Const, 0}, + {"IFT_PROPATM", Const, 1}, + {"IFT_PROPBWAP2MP", Const, 0}, + {"IFT_PROPCNLS", Const, 0}, + {"IFT_PROPDOCSWIRELESSDOWNSTREAM", Const, 0}, + {"IFT_PROPDOCSWIRELESSMACLAYER", Const, 0}, + {"IFT_PROPDOCSWIRELESSUPSTREAM", Const, 0}, + {"IFT_PROPMUX", Const, 0}, + {"IFT_PROPVIRTUAL", Const, 0}, + {"IFT_PROPWIRELESSP2P", Const, 0}, + {"IFT_PTPSERIAL", Const, 0}, + {"IFT_PVC", Const, 0}, + {"IFT_Q2931", Const, 1}, + {"IFT_QLLC", Const, 0}, + {"IFT_RADIOMAC", Const, 0}, + {"IFT_RADSL", Const, 0}, + {"IFT_REACHDSL", Const, 0}, + {"IFT_RFC1483", Const, 0}, + {"IFT_RS232", Const, 0}, + {"IFT_RSRB", Const, 0}, + {"IFT_SDLC", Const, 0}, + {"IFT_SDSL", Const, 0}, + {"IFT_SHDSL", Const, 0}, + {"IFT_SIP", Const, 0}, + {"IFT_SIPSIG", Const, 1}, + {"IFT_SIPTG", Const, 1}, + {"IFT_SLIP", Const, 0}, + {"IFT_SMDSDXI", Const, 0}, + {"IFT_SMDSICIP", Const, 0}, + {"IFT_SONET", Const, 0}, + {"IFT_SONETOVERHEADCHANNEL", Const, 0}, + {"IFT_SONETPATH", Const, 0}, + {"IFT_SONETVT", Const, 0}, + {"IFT_SRP", Const, 0}, + {"IFT_SS7SIGLINK", Const, 0}, + {"IFT_STACKTOSTACK", Const, 0}, + {"IFT_STARLAN", Const, 0}, + {"IFT_STF", Const, 0}, + {"IFT_T1", Const, 0}, + {"IFT_TDLC", Const, 0}, + {"IFT_TELINK", Const, 1}, + {"IFT_TERMPAD", Const, 0}, + {"IFT_TR008", Const, 0}, + {"IFT_TRANSPHDLC", Const, 0}, + {"IFT_TUNNEL", Const, 0}, + {"IFT_ULTRA", Const, 0}, + {"IFT_USB", Const, 0}, + {"IFT_V11", Const, 0}, + {"IFT_V35", Const, 0}, + {"IFT_V36", Const, 0}, + {"IFT_V37", Const, 0}, + {"IFT_VDSL", Const, 0}, + {"IFT_VIRTUALIPADDRESS", Const, 0}, + {"IFT_VIRTUALTG", Const, 1}, + {"IFT_VOICEDID", Const, 1}, + {"IFT_VOICEEM", Const, 0}, + {"IFT_VOICEEMFGD", Const, 1}, + {"IFT_VOICEENCAP", Const, 0}, + {"IFT_VOICEFGDEANA", Const, 1}, + {"IFT_VOICEFXO", Const, 0}, + {"IFT_VOICEFXS", Const, 0}, + {"IFT_VOICEOVERATM", Const, 0}, + {"IFT_VOICEOVERCABLE", Const, 1}, + {"IFT_VOICEOVERFRAMERELAY", Const, 0}, + {"IFT_VOICEOVERIP", Const, 0}, + {"IFT_X213", Const, 0}, + {"IFT_X25", Const, 0}, + {"IFT_X25DDN", Const, 0}, + {"IFT_X25HUNTGROUP", Const, 0}, + {"IFT_X25MLP", Const, 0}, + {"IFT_X25PLE", Const, 0}, + {"IFT_XETHER", Const, 0}, + {"IGNBRK", Const, 0}, + {"IGNCR", Const, 0}, + {"IGNORE", Const, 0}, + {"IGNPAR", Const, 0}, + {"IMAXBEL", Const, 0}, + {"INFINITE", Const, 0}, + {"INLCR", Const, 0}, + {"INPCK", Const, 0}, + {"INVALID_FILE_ATTRIBUTES", Const, 0}, + {"IN_ACCESS", Const, 0}, + {"IN_ALL_EVENTS", Const, 0}, + {"IN_ATTRIB", Const, 0}, + {"IN_CLASSA_HOST", Const, 0}, + {"IN_CLASSA_MAX", Const, 0}, + {"IN_CLASSA_NET", Const, 0}, + {"IN_CLASSA_NSHIFT", Const, 0}, + {"IN_CLASSB_HOST", Const, 0}, + {"IN_CLASSB_MAX", Const, 0}, + {"IN_CLASSB_NET", Const, 0}, + {"IN_CLASSB_NSHIFT", Const, 0}, + {"IN_CLASSC_HOST", Const, 0}, + {"IN_CLASSC_NET", Const, 0}, + {"IN_CLASSC_NSHIFT", Const, 0}, + {"IN_CLASSD_HOST", Const, 0}, + {"IN_CLASSD_NET", Const, 0}, + {"IN_CLASSD_NSHIFT", Const, 0}, + {"IN_CLOEXEC", Const, 0}, + {"IN_CLOSE", Const, 0}, + {"IN_CLOSE_NOWRITE", Const, 0}, + {"IN_CLOSE_WRITE", Const, 0}, + {"IN_CREATE", Const, 0}, + {"IN_DELETE", Const, 0}, + {"IN_DELETE_SELF", Const, 0}, + {"IN_DONT_FOLLOW", Const, 0}, + {"IN_EXCL_UNLINK", Const, 0}, + {"IN_IGNORED", Const, 0}, + {"IN_ISDIR", Const, 0}, + {"IN_LINKLOCALNETNUM", Const, 0}, + {"IN_LOOPBACKNET", Const, 0}, + {"IN_MASK_ADD", Const, 0}, + {"IN_MODIFY", Const, 0}, + {"IN_MOVE", Const, 0}, + {"IN_MOVED_FROM", Const, 0}, + {"IN_MOVED_TO", Const, 0}, + {"IN_MOVE_SELF", Const, 0}, + {"IN_NONBLOCK", Const, 0}, + {"IN_ONESHOT", Const, 0}, + {"IN_ONLYDIR", Const, 0}, + {"IN_OPEN", Const, 0}, + {"IN_Q_OVERFLOW", Const, 0}, + {"IN_RFC3021_HOST", Const, 1}, + {"IN_RFC3021_MASK", Const, 1}, + {"IN_RFC3021_NET", Const, 1}, + {"IN_RFC3021_NSHIFT", Const, 1}, + {"IN_UNMOUNT", Const, 0}, + {"IOC_IN", Const, 1}, + {"IOC_INOUT", Const, 1}, + {"IOC_OUT", Const, 1}, + {"IOC_VENDOR", Const, 3}, + {"IOC_WS2", Const, 1}, + {"IO_REPARSE_TAG_SYMLINK", Const, 4}, + {"IPMreq", Type, 0}, + {"IPMreq.Interface", Field, 0}, + {"IPMreq.Multiaddr", Field, 0}, + {"IPMreqn", Type, 0}, + {"IPMreqn.Address", Field, 0}, + {"IPMreqn.Ifindex", Field, 0}, + {"IPMreqn.Multiaddr", Field, 0}, + {"IPPROTO_3PC", Const, 0}, + {"IPPROTO_ADFS", Const, 0}, + {"IPPROTO_AH", Const, 0}, + {"IPPROTO_AHIP", Const, 0}, + {"IPPROTO_APES", Const, 0}, + {"IPPROTO_ARGUS", Const, 0}, + {"IPPROTO_AX25", Const, 0}, + {"IPPROTO_BHA", Const, 0}, + {"IPPROTO_BLT", Const, 0}, + {"IPPROTO_BRSATMON", Const, 0}, + {"IPPROTO_CARP", Const, 0}, + {"IPPROTO_CFTP", Const, 0}, + {"IPPROTO_CHAOS", Const, 0}, + {"IPPROTO_CMTP", Const, 0}, + {"IPPROTO_COMP", Const, 0}, + {"IPPROTO_CPHB", Const, 0}, + {"IPPROTO_CPNX", Const, 0}, + {"IPPROTO_DCCP", Const, 0}, + {"IPPROTO_DDP", Const, 0}, + {"IPPROTO_DGP", Const, 0}, + {"IPPROTO_DIVERT", Const, 0}, + {"IPPROTO_DIVERT_INIT", Const, 3}, + {"IPPROTO_DIVERT_RESP", Const, 3}, + {"IPPROTO_DONE", Const, 0}, + {"IPPROTO_DSTOPTS", Const, 0}, + {"IPPROTO_EGP", Const, 0}, + {"IPPROTO_EMCON", Const, 0}, + {"IPPROTO_ENCAP", Const, 0}, + {"IPPROTO_EON", Const, 0}, + {"IPPROTO_ESP", Const, 0}, + {"IPPROTO_ETHERIP", Const, 0}, + {"IPPROTO_FRAGMENT", Const, 0}, + {"IPPROTO_GGP", Const, 0}, + {"IPPROTO_GMTP", Const, 0}, + {"IPPROTO_GRE", Const, 0}, + {"IPPROTO_HELLO", Const, 0}, + {"IPPROTO_HMP", Const, 0}, + {"IPPROTO_HOPOPTS", Const, 0}, + {"IPPROTO_ICMP", Const, 0}, + {"IPPROTO_ICMPV6", Const, 0}, + {"IPPROTO_IDP", Const, 0}, + {"IPPROTO_IDPR", Const, 0}, + {"IPPROTO_IDRP", Const, 0}, + {"IPPROTO_IGMP", Const, 0}, + {"IPPROTO_IGP", Const, 0}, + {"IPPROTO_IGRP", Const, 0}, + {"IPPROTO_IL", Const, 0}, + {"IPPROTO_INLSP", Const, 0}, + {"IPPROTO_INP", Const, 0}, + {"IPPROTO_IP", Const, 0}, + {"IPPROTO_IPCOMP", Const, 0}, + {"IPPROTO_IPCV", Const, 0}, + {"IPPROTO_IPEIP", Const, 0}, + {"IPPROTO_IPIP", Const, 0}, + {"IPPROTO_IPPC", Const, 0}, + {"IPPROTO_IPV4", Const, 0}, + {"IPPROTO_IPV6", Const, 0}, + {"IPPROTO_IPV6_ICMP", Const, 1}, + {"IPPROTO_IRTP", Const, 0}, + {"IPPROTO_KRYPTOLAN", Const, 0}, + {"IPPROTO_LARP", Const, 0}, + {"IPPROTO_LEAF1", Const, 0}, + {"IPPROTO_LEAF2", Const, 0}, + {"IPPROTO_MAX", Const, 0}, + {"IPPROTO_MAXID", Const, 0}, + {"IPPROTO_MEAS", Const, 0}, + {"IPPROTO_MH", Const, 1}, + {"IPPROTO_MHRP", Const, 0}, + {"IPPROTO_MICP", Const, 0}, + {"IPPROTO_MOBILE", Const, 0}, + {"IPPROTO_MPLS", Const, 1}, + {"IPPROTO_MTP", Const, 0}, + {"IPPROTO_MUX", Const, 0}, + {"IPPROTO_ND", Const, 0}, + {"IPPROTO_NHRP", Const, 0}, + {"IPPROTO_NONE", Const, 0}, + {"IPPROTO_NSP", Const, 0}, + {"IPPROTO_NVPII", Const, 0}, + {"IPPROTO_OLD_DIVERT", Const, 0}, + {"IPPROTO_OSPFIGP", Const, 0}, + {"IPPROTO_PFSYNC", Const, 0}, + {"IPPROTO_PGM", Const, 0}, + {"IPPROTO_PIGP", Const, 0}, + {"IPPROTO_PIM", Const, 0}, + {"IPPROTO_PRM", Const, 0}, + {"IPPROTO_PUP", Const, 0}, + {"IPPROTO_PVP", Const, 0}, + {"IPPROTO_RAW", Const, 0}, + {"IPPROTO_RCCMON", Const, 0}, + {"IPPROTO_RDP", Const, 0}, + {"IPPROTO_ROUTING", Const, 0}, + {"IPPROTO_RSVP", Const, 0}, + {"IPPROTO_RVD", Const, 0}, + {"IPPROTO_SATEXPAK", Const, 0}, + {"IPPROTO_SATMON", Const, 0}, + {"IPPROTO_SCCSP", Const, 0}, + {"IPPROTO_SCTP", Const, 0}, + {"IPPROTO_SDRP", Const, 0}, + {"IPPROTO_SEND", Const, 1}, + {"IPPROTO_SEP", Const, 0}, + {"IPPROTO_SKIP", Const, 0}, + {"IPPROTO_SPACER", Const, 0}, + {"IPPROTO_SRPC", Const, 0}, + {"IPPROTO_ST", Const, 0}, + {"IPPROTO_SVMTP", Const, 0}, + {"IPPROTO_SWIPE", Const, 0}, + {"IPPROTO_TCF", Const, 0}, + {"IPPROTO_TCP", Const, 0}, + {"IPPROTO_TLSP", Const, 0}, + {"IPPROTO_TP", Const, 0}, + {"IPPROTO_TPXX", Const, 0}, + {"IPPROTO_TRUNK1", Const, 0}, + {"IPPROTO_TRUNK2", Const, 0}, + {"IPPROTO_TTP", Const, 0}, + {"IPPROTO_UDP", Const, 0}, + {"IPPROTO_UDPLITE", Const, 0}, + {"IPPROTO_VINES", Const, 0}, + {"IPPROTO_VISA", Const, 0}, + {"IPPROTO_VMTP", Const, 0}, + {"IPPROTO_VRRP", Const, 1}, + {"IPPROTO_WBEXPAK", Const, 0}, + {"IPPROTO_WBMON", Const, 0}, + {"IPPROTO_WSN", Const, 0}, + {"IPPROTO_XNET", Const, 0}, + {"IPPROTO_XTP", Const, 0}, + {"IPV6_2292DSTOPTS", Const, 0}, + {"IPV6_2292HOPLIMIT", Const, 0}, + {"IPV6_2292HOPOPTS", Const, 0}, + {"IPV6_2292NEXTHOP", Const, 0}, + {"IPV6_2292PKTINFO", Const, 0}, + {"IPV6_2292PKTOPTIONS", Const, 0}, + {"IPV6_2292RTHDR", Const, 0}, + {"IPV6_ADDRFORM", Const, 0}, + {"IPV6_ADD_MEMBERSHIP", Const, 0}, + {"IPV6_AUTHHDR", Const, 0}, + {"IPV6_AUTH_LEVEL", Const, 1}, + {"IPV6_AUTOFLOWLABEL", Const, 0}, + {"IPV6_BINDANY", Const, 0}, + {"IPV6_BINDV6ONLY", Const, 0}, + {"IPV6_BOUND_IF", Const, 0}, + {"IPV6_CHECKSUM", Const, 0}, + {"IPV6_DEFAULT_MULTICAST_HOPS", Const, 0}, + {"IPV6_DEFAULT_MULTICAST_LOOP", Const, 0}, + {"IPV6_DEFHLIM", Const, 0}, + {"IPV6_DONTFRAG", Const, 0}, + {"IPV6_DROP_MEMBERSHIP", Const, 0}, + {"IPV6_DSTOPTS", Const, 0}, + {"IPV6_ESP_NETWORK_LEVEL", Const, 1}, + {"IPV6_ESP_TRANS_LEVEL", Const, 1}, + {"IPV6_FAITH", Const, 0}, + {"IPV6_FLOWINFO_MASK", Const, 0}, + {"IPV6_FLOWLABEL_MASK", Const, 0}, + {"IPV6_FRAGTTL", Const, 0}, + {"IPV6_FW_ADD", Const, 0}, + {"IPV6_FW_DEL", Const, 0}, + {"IPV6_FW_FLUSH", Const, 0}, + {"IPV6_FW_GET", Const, 0}, + {"IPV6_FW_ZERO", Const, 0}, + {"IPV6_HLIMDEC", Const, 0}, + {"IPV6_HOPLIMIT", Const, 0}, + {"IPV6_HOPOPTS", Const, 0}, + {"IPV6_IPCOMP_LEVEL", Const, 1}, + {"IPV6_IPSEC_POLICY", Const, 0}, + {"IPV6_JOIN_ANYCAST", Const, 0}, + {"IPV6_JOIN_GROUP", Const, 0}, + {"IPV6_LEAVE_ANYCAST", Const, 0}, + {"IPV6_LEAVE_GROUP", Const, 0}, + {"IPV6_MAXHLIM", Const, 0}, + {"IPV6_MAXOPTHDR", Const, 0}, + {"IPV6_MAXPACKET", Const, 0}, + {"IPV6_MAX_GROUP_SRC_FILTER", Const, 0}, + {"IPV6_MAX_MEMBERSHIPS", Const, 0}, + {"IPV6_MAX_SOCK_SRC_FILTER", Const, 0}, + {"IPV6_MIN_MEMBERSHIPS", Const, 0}, + {"IPV6_MMTU", Const, 0}, + {"IPV6_MSFILTER", Const, 0}, + {"IPV6_MTU", Const, 0}, + {"IPV6_MTU_DISCOVER", Const, 0}, + {"IPV6_MULTICAST_HOPS", Const, 0}, + {"IPV6_MULTICAST_IF", Const, 0}, + {"IPV6_MULTICAST_LOOP", Const, 0}, + {"IPV6_NEXTHOP", Const, 0}, + {"IPV6_OPTIONS", Const, 1}, + {"IPV6_PATHMTU", Const, 0}, + {"IPV6_PIPEX", Const, 1}, + {"IPV6_PKTINFO", Const, 0}, + {"IPV6_PMTUDISC_DO", Const, 0}, + {"IPV6_PMTUDISC_DONT", Const, 0}, + {"IPV6_PMTUDISC_PROBE", Const, 0}, + {"IPV6_PMTUDISC_WANT", Const, 0}, + {"IPV6_PORTRANGE", Const, 0}, + {"IPV6_PORTRANGE_DEFAULT", Const, 0}, + {"IPV6_PORTRANGE_HIGH", Const, 0}, + {"IPV6_PORTRANGE_LOW", Const, 0}, + {"IPV6_PREFER_TEMPADDR", Const, 0}, + {"IPV6_RECVDSTOPTS", Const, 0}, + {"IPV6_RECVDSTPORT", Const, 3}, + {"IPV6_RECVERR", Const, 0}, + {"IPV6_RECVHOPLIMIT", Const, 0}, + {"IPV6_RECVHOPOPTS", Const, 0}, + {"IPV6_RECVPATHMTU", Const, 0}, + {"IPV6_RECVPKTINFO", Const, 0}, + {"IPV6_RECVRTHDR", Const, 0}, + {"IPV6_RECVTCLASS", Const, 0}, + {"IPV6_ROUTER_ALERT", Const, 0}, + {"IPV6_RTABLE", Const, 1}, + {"IPV6_RTHDR", Const, 0}, + {"IPV6_RTHDRDSTOPTS", Const, 0}, + {"IPV6_RTHDR_LOOSE", Const, 0}, + {"IPV6_RTHDR_STRICT", Const, 0}, + {"IPV6_RTHDR_TYPE_0", Const, 0}, + {"IPV6_RXDSTOPTS", Const, 0}, + {"IPV6_RXHOPOPTS", Const, 0}, + {"IPV6_SOCKOPT_RESERVED1", Const, 0}, + {"IPV6_TCLASS", Const, 0}, + {"IPV6_UNICAST_HOPS", Const, 0}, + {"IPV6_USE_MIN_MTU", Const, 0}, + {"IPV6_V6ONLY", Const, 0}, + {"IPV6_VERSION", Const, 0}, + {"IPV6_VERSION_MASK", Const, 0}, + {"IPV6_XFRM_POLICY", Const, 0}, + {"IP_ADD_MEMBERSHIP", Const, 0}, + {"IP_ADD_SOURCE_MEMBERSHIP", Const, 0}, + {"IP_AUTH_LEVEL", Const, 1}, + {"IP_BINDANY", Const, 0}, + {"IP_BLOCK_SOURCE", Const, 0}, + {"IP_BOUND_IF", Const, 0}, + {"IP_DEFAULT_MULTICAST_LOOP", Const, 0}, + {"IP_DEFAULT_MULTICAST_TTL", Const, 0}, + {"IP_DF", Const, 0}, + {"IP_DIVERTFL", Const, 3}, + {"IP_DONTFRAG", Const, 0}, + {"IP_DROP_MEMBERSHIP", Const, 0}, + {"IP_DROP_SOURCE_MEMBERSHIP", Const, 0}, + {"IP_DUMMYNET3", Const, 0}, + {"IP_DUMMYNET_CONFIGURE", Const, 0}, + {"IP_DUMMYNET_DEL", Const, 0}, + {"IP_DUMMYNET_FLUSH", Const, 0}, + {"IP_DUMMYNET_GET", Const, 0}, + {"IP_EF", Const, 1}, + {"IP_ERRORMTU", Const, 1}, + {"IP_ESP_NETWORK_LEVEL", Const, 1}, + {"IP_ESP_TRANS_LEVEL", Const, 1}, + {"IP_FAITH", Const, 0}, + {"IP_FREEBIND", Const, 0}, + {"IP_FW3", Const, 0}, + {"IP_FW_ADD", Const, 0}, + {"IP_FW_DEL", Const, 0}, + {"IP_FW_FLUSH", Const, 0}, + {"IP_FW_GET", Const, 0}, + {"IP_FW_NAT_CFG", Const, 0}, + {"IP_FW_NAT_DEL", Const, 0}, + {"IP_FW_NAT_GET_CONFIG", Const, 0}, + {"IP_FW_NAT_GET_LOG", Const, 0}, + {"IP_FW_RESETLOG", Const, 0}, + {"IP_FW_TABLE_ADD", Const, 0}, + {"IP_FW_TABLE_DEL", Const, 0}, + {"IP_FW_TABLE_FLUSH", Const, 0}, + {"IP_FW_TABLE_GETSIZE", Const, 0}, + {"IP_FW_TABLE_LIST", Const, 0}, + {"IP_FW_ZERO", Const, 0}, + {"IP_HDRINCL", Const, 0}, + {"IP_IPCOMP_LEVEL", Const, 1}, + {"IP_IPSECFLOWINFO", Const, 1}, + {"IP_IPSEC_LOCAL_AUTH", Const, 1}, + {"IP_IPSEC_LOCAL_CRED", Const, 1}, + {"IP_IPSEC_LOCAL_ID", Const, 1}, + {"IP_IPSEC_POLICY", Const, 0}, + {"IP_IPSEC_REMOTE_AUTH", Const, 1}, + {"IP_IPSEC_REMOTE_CRED", Const, 1}, + {"IP_IPSEC_REMOTE_ID", Const, 1}, + {"IP_MAXPACKET", Const, 0}, + {"IP_MAX_GROUP_SRC_FILTER", Const, 0}, + {"IP_MAX_MEMBERSHIPS", Const, 0}, + {"IP_MAX_SOCK_MUTE_FILTER", Const, 0}, + {"IP_MAX_SOCK_SRC_FILTER", Const, 0}, + {"IP_MAX_SOURCE_FILTER", Const, 0}, + {"IP_MF", Const, 0}, + {"IP_MINFRAGSIZE", Const, 1}, + {"IP_MINTTL", Const, 0}, + {"IP_MIN_MEMBERSHIPS", Const, 0}, + {"IP_MSFILTER", Const, 0}, + {"IP_MSS", Const, 0}, + {"IP_MTU", Const, 0}, + {"IP_MTU_DISCOVER", Const, 0}, + {"IP_MULTICAST_IF", Const, 0}, + {"IP_MULTICAST_IFINDEX", Const, 0}, + {"IP_MULTICAST_LOOP", Const, 0}, + {"IP_MULTICAST_TTL", Const, 0}, + {"IP_MULTICAST_VIF", Const, 0}, + {"IP_NAT__XXX", Const, 0}, + {"IP_OFFMASK", Const, 0}, + {"IP_OLD_FW_ADD", Const, 0}, + {"IP_OLD_FW_DEL", Const, 0}, + {"IP_OLD_FW_FLUSH", Const, 0}, + {"IP_OLD_FW_GET", Const, 0}, + {"IP_OLD_FW_RESETLOG", Const, 0}, + {"IP_OLD_FW_ZERO", Const, 0}, + {"IP_ONESBCAST", Const, 0}, + {"IP_OPTIONS", Const, 0}, + {"IP_ORIGDSTADDR", Const, 0}, + {"IP_PASSSEC", Const, 0}, + {"IP_PIPEX", Const, 1}, + {"IP_PKTINFO", Const, 0}, + {"IP_PKTOPTIONS", Const, 0}, + {"IP_PMTUDISC", Const, 0}, + {"IP_PMTUDISC_DO", Const, 0}, + {"IP_PMTUDISC_DONT", Const, 0}, + {"IP_PMTUDISC_PROBE", Const, 0}, + {"IP_PMTUDISC_WANT", Const, 0}, + {"IP_PORTRANGE", Const, 0}, + {"IP_PORTRANGE_DEFAULT", Const, 0}, + {"IP_PORTRANGE_HIGH", Const, 0}, + {"IP_PORTRANGE_LOW", Const, 0}, + {"IP_RECVDSTADDR", Const, 0}, + {"IP_RECVDSTPORT", Const, 1}, + {"IP_RECVERR", Const, 0}, + {"IP_RECVIF", Const, 0}, + {"IP_RECVOPTS", Const, 0}, + {"IP_RECVORIGDSTADDR", Const, 0}, + {"IP_RECVPKTINFO", Const, 0}, + {"IP_RECVRETOPTS", Const, 0}, + {"IP_RECVRTABLE", Const, 1}, + {"IP_RECVTOS", Const, 0}, + {"IP_RECVTTL", Const, 0}, + {"IP_RETOPTS", Const, 0}, + {"IP_RF", Const, 0}, + {"IP_ROUTER_ALERT", Const, 0}, + {"IP_RSVP_OFF", Const, 0}, + {"IP_RSVP_ON", Const, 0}, + {"IP_RSVP_VIF_OFF", Const, 0}, + {"IP_RSVP_VIF_ON", Const, 0}, + {"IP_RTABLE", Const, 1}, + {"IP_SENDSRCADDR", Const, 0}, + {"IP_STRIPHDR", Const, 0}, + {"IP_TOS", Const, 0}, + {"IP_TRAFFIC_MGT_BACKGROUND", Const, 0}, + {"IP_TRANSPARENT", Const, 0}, + {"IP_TTL", Const, 0}, + {"IP_UNBLOCK_SOURCE", Const, 0}, + {"IP_XFRM_POLICY", Const, 0}, + {"IPv6MTUInfo", Type, 2}, + {"IPv6MTUInfo.Addr", Field, 2}, + {"IPv6MTUInfo.Mtu", Field, 2}, + {"IPv6Mreq", Type, 0}, + {"IPv6Mreq.Interface", Field, 0}, + {"IPv6Mreq.Multiaddr", Field, 0}, + {"ISIG", Const, 0}, + {"ISTRIP", Const, 0}, + {"IUCLC", Const, 0}, + {"IUTF8", Const, 0}, + {"IXANY", Const, 0}, + {"IXOFF", Const, 0}, + {"IXON", Const, 0}, + {"IfAddrmsg", Type, 0}, + {"IfAddrmsg.Family", Field, 0}, + {"IfAddrmsg.Flags", Field, 0}, + {"IfAddrmsg.Index", Field, 0}, + {"IfAddrmsg.Prefixlen", Field, 0}, + {"IfAddrmsg.Scope", Field, 0}, + {"IfAnnounceMsghdr", Type, 1}, + {"IfAnnounceMsghdr.Hdrlen", Field, 2}, + {"IfAnnounceMsghdr.Index", Field, 1}, + {"IfAnnounceMsghdr.Msglen", Field, 1}, + {"IfAnnounceMsghdr.Name", Field, 1}, + {"IfAnnounceMsghdr.Type", Field, 1}, + {"IfAnnounceMsghdr.Version", Field, 1}, + {"IfAnnounceMsghdr.What", Field, 1}, + {"IfData", Type, 0}, + {"IfData.Addrlen", Field, 0}, + {"IfData.Baudrate", Field, 0}, + {"IfData.Capabilities", Field, 2}, + {"IfData.Collisions", Field, 0}, + {"IfData.Datalen", Field, 0}, + {"IfData.Epoch", Field, 0}, + {"IfData.Hdrlen", Field, 0}, + {"IfData.Hwassist", Field, 0}, + {"IfData.Ibytes", Field, 0}, + {"IfData.Ierrors", Field, 0}, + {"IfData.Imcasts", Field, 0}, + {"IfData.Ipackets", Field, 0}, + {"IfData.Iqdrops", Field, 0}, + {"IfData.Lastchange", Field, 0}, + {"IfData.Link_state", Field, 0}, + {"IfData.Mclpool", Field, 2}, + {"IfData.Metric", Field, 0}, + {"IfData.Mtu", Field, 0}, + {"IfData.Noproto", Field, 0}, + {"IfData.Obytes", Field, 0}, + {"IfData.Oerrors", Field, 0}, + {"IfData.Omcasts", Field, 0}, + {"IfData.Opackets", Field, 0}, + {"IfData.Pad", Field, 2}, + {"IfData.Pad_cgo_0", Field, 2}, + {"IfData.Pad_cgo_1", Field, 2}, + {"IfData.Physical", Field, 0}, + {"IfData.Recvquota", Field, 0}, + {"IfData.Recvtiming", Field, 0}, + {"IfData.Reserved1", Field, 0}, + {"IfData.Reserved2", Field, 0}, + {"IfData.Spare_char1", Field, 0}, + {"IfData.Spare_char2", Field, 0}, + {"IfData.Type", Field, 0}, + {"IfData.Typelen", Field, 0}, + {"IfData.Unused1", Field, 0}, + {"IfData.Unused2", Field, 0}, + {"IfData.Xmitquota", Field, 0}, + {"IfData.Xmittiming", Field, 0}, + {"IfInfomsg", Type, 0}, + {"IfInfomsg.Change", Field, 0}, + {"IfInfomsg.Family", Field, 0}, + {"IfInfomsg.Flags", Field, 0}, + {"IfInfomsg.Index", Field, 0}, + {"IfInfomsg.Type", Field, 0}, + {"IfInfomsg.X__ifi_pad", Field, 0}, + {"IfMsghdr", Type, 0}, + {"IfMsghdr.Addrs", Field, 0}, + {"IfMsghdr.Data", Field, 0}, + {"IfMsghdr.Flags", Field, 0}, + {"IfMsghdr.Hdrlen", Field, 2}, + {"IfMsghdr.Index", Field, 0}, + {"IfMsghdr.Msglen", Field, 0}, + {"IfMsghdr.Pad1", Field, 2}, + {"IfMsghdr.Pad2", Field, 2}, + {"IfMsghdr.Pad_cgo_0", Field, 0}, + {"IfMsghdr.Pad_cgo_1", Field, 2}, + {"IfMsghdr.Tableid", Field, 2}, + {"IfMsghdr.Type", Field, 0}, + {"IfMsghdr.Version", Field, 0}, + {"IfMsghdr.Xflags", Field, 2}, + {"IfaMsghdr", Type, 0}, + {"IfaMsghdr.Addrs", Field, 0}, + {"IfaMsghdr.Flags", Field, 0}, + {"IfaMsghdr.Hdrlen", Field, 2}, + {"IfaMsghdr.Index", Field, 0}, + {"IfaMsghdr.Metric", Field, 0}, + {"IfaMsghdr.Msglen", Field, 0}, + {"IfaMsghdr.Pad1", Field, 2}, + {"IfaMsghdr.Pad2", Field, 2}, + {"IfaMsghdr.Pad_cgo_0", Field, 0}, + {"IfaMsghdr.Tableid", Field, 2}, + {"IfaMsghdr.Type", Field, 0}, + {"IfaMsghdr.Version", Field, 0}, + {"IfmaMsghdr", Type, 0}, + {"IfmaMsghdr.Addrs", Field, 0}, + {"IfmaMsghdr.Flags", Field, 0}, + {"IfmaMsghdr.Index", Field, 0}, + {"IfmaMsghdr.Msglen", Field, 0}, + {"IfmaMsghdr.Pad_cgo_0", Field, 0}, + {"IfmaMsghdr.Type", Field, 0}, + {"IfmaMsghdr.Version", Field, 0}, + {"IfmaMsghdr2", Type, 0}, + {"IfmaMsghdr2.Addrs", Field, 0}, + {"IfmaMsghdr2.Flags", Field, 0}, + {"IfmaMsghdr2.Index", Field, 0}, + {"IfmaMsghdr2.Msglen", Field, 0}, + {"IfmaMsghdr2.Pad_cgo_0", Field, 0}, + {"IfmaMsghdr2.Refcount", Field, 0}, + {"IfmaMsghdr2.Type", Field, 0}, + {"IfmaMsghdr2.Version", Field, 0}, + {"ImplementsGetwd", Const, 0}, + {"Inet4Pktinfo", Type, 0}, + {"Inet4Pktinfo.Addr", Field, 0}, + {"Inet4Pktinfo.Ifindex", Field, 0}, + {"Inet4Pktinfo.Spec_dst", Field, 0}, + {"Inet6Pktinfo", Type, 0}, + {"Inet6Pktinfo.Addr", Field, 0}, + {"Inet6Pktinfo.Ifindex", Field, 0}, + {"InotifyAddWatch", Func, 0}, + {"InotifyEvent", Type, 0}, + {"InotifyEvent.Cookie", Field, 0}, + {"InotifyEvent.Len", Field, 0}, + {"InotifyEvent.Mask", Field, 0}, + {"InotifyEvent.Name", Field, 0}, + {"InotifyEvent.Wd", Field, 0}, + {"InotifyInit", Func, 0}, + {"InotifyInit1", Func, 0}, + {"InotifyRmWatch", Func, 0}, + {"InterfaceAddrMessage", Type, 0}, + {"InterfaceAddrMessage.Data", Field, 0}, + {"InterfaceAddrMessage.Header", Field, 0}, + {"InterfaceAnnounceMessage", Type, 1}, + {"InterfaceAnnounceMessage.Header", Field, 1}, + {"InterfaceInfo", Type, 0}, + {"InterfaceInfo.Address", Field, 0}, + {"InterfaceInfo.BroadcastAddress", Field, 0}, + {"InterfaceInfo.Flags", Field, 0}, + {"InterfaceInfo.Netmask", Field, 0}, + {"InterfaceMessage", Type, 0}, + {"InterfaceMessage.Data", Field, 0}, + {"InterfaceMessage.Header", Field, 0}, + {"InterfaceMulticastAddrMessage", Type, 0}, + {"InterfaceMulticastAddrMessage.Data", Field, 0}, + {"InterfaceMulticastAddrMessage.Header", Field, 0}, + {"InvalidHandle", Const, 0}, + {"Ioperm", Func, 0}, + {"Iopl", Func, 0}, + {"Iovec", Type, 0}, + {"Iovec.Base", Field, 0}, + {"Iovec.Len", Field, 0}, + {"IpAdapterInfo", Type, 0}, + {"IpAdapterInfo.AdapterName", Field, 0}, + {"IpAdapterInfo.Address", Field, 0}, + {"IpAdapterInfo.AddressLength", Field, 0}, + {"IpAdapterInfo.ComboIndex", Field, 0}, + {"IpAdapterInfo.CurrentIpAddress", Field, 0}, + {"IpAdapterInfo.Description", Field, 0}, + {"IpAdapterInfo.DhcpEnabled", Field, 0}, + {"IpAdapterInfo.DhcpServer", Field, 0}, + {"IpAdapterInfo.GatewayList", Field, 0}, + {"IpAdapterInfo.HaveWins", Field, 0}, + {"IpAdapterInfo.Index", Field, 0}, + {"IpAdapterInfo.IpAddressList", Field, 0}, + {"IpAdapterInfo.LeaseExpires", Field, 0}, + {"IpAdapterInfo.LeaseObtained", Field, 0}, + {"IpAdapterInfo.Next", Field, 0}, + {"IpAdapterInfo.PrimaryWinsServer", Field, 0}, + {"IpAdapterInfo.SecondaryWinsServer", Field, 0}, + {"IpAdapterInfo.Type", Field, 0}, + {"IpAddrString", Type, 0}, + {"IpAddrString.Context", Field, 0}, + {"IpAddrString.IpAddress", Field, 0}, + {"IpAddrString.IpMask", Field, 0}, + {"IpAddrString.Next", Field, 0}, + {"IpAddressString", Type, 0}, + {"IpAddressString.String", Field, 0}, + {"IpMaskString", Type, 0}, + {"IpMaskString.String", Field, 2}, + {"Issetugid", Func, 0}, + {"KEY_ALL_ACCESS", Const, 0}, + {"KEY_CREATE_LINK", Const, 0}, + {"KEY_CREATE_SUB_KEY", Const, 0}, + {"KEY_ENUMERATE_SUB_KEYS", Const, 0}, + {"KEY_EXECUTE", Const, 0}, + {"KEY_NOTIFY", Const, 0}, + {"KEY_QUERY_VALUE", Const, 0}, + {"KEY_READ", Const, 0}, + {"KEY_SET_VALUE", Const, 0}, + {"KEY_WOW64_32KEY", Const, 0}, + {"KEY_WOW64_64KEY", Const, 0}, + {"KEY_WRITE", Const, 0}, + {"Kevent", Func, 0}, + {"Kevent_t", Type, 0}, + {"Kevent_t.Data", Field, 0}, + {"Kevent_t.Fflags", Field, 0}, + {"Kevent_t.Filter", Field, 0}, + {"Kevent_t.Flags", Field, 0}, + {"Kevent_t.Ident", Field, 0}, + {"Kevent_t.Pad_cgo_0", Field, 2}, + {"Kevent_t.Udata", Field, 0}, + {"Kill", Func, 0}, + {"Klogctl", Func, 0}, + {"Kqueue", Func, 0}, + {"LANG_ENGLISH", Const, 0}, + {"LAYERED_PROTOCOL", Const, 2}, + {"LCNT_OVERLOAD_FLUSH", Const, 1}, + {"LINUX_REBOOT_CMD_CAD_OFF", Const, 0}, + {"LINUX_REBOOT_CMD_CAD_ON", Const, 0}, + {"LINUX_REBOOT_CMD_HALT", Const, 0}, + {"LINUX_REBOOT_CMD_KEXEC", Const, 0}, + {"LINUX_REBOOT_CMD_POWER_OFF", Const, 0}, + {"LINUX_REBOOT_CMD_RESTART", Const, 0}, + {"LINUX_REBOOT_CMD_RESTART2", Const, 0}, + {"LINUX_REBOOT_CMD_SW_SUSPEND", Const, 0}, + {"LINUX_REBOOT_MAGIC1", Const, 0}, + {"LINUX_REBOOT_MAGIC2", Const, 0}, + {"LOCK_EX", Const, 0}, + {"LOCK_NB", Const, 0}, + {"LOCK_SH", Const, 0}, + {"LOCK_UN", Const, 0}, + {"LazyDLL", Type, 0}, + {"LazyDLL.Name", Field, 0}, + {"LazyProc", Type, 0}, + {"LazyProc.Name", Field, 0}, + {"Lchown", Func, 0}, + {"Linger", Type, 0}, + {"Linger.Linger", Field, 0}, + {"Linger.Onoff", Field, 0}, + {"Link", Func, 0}, + {"Listen", Func, 0}, + {"Listxattr", Func, 1}, + {"LoadCancelIoEx", Func, 1}, + {"LoadConnectEx", Func, 1}, + {"LoadCreateSymbolicLink", Func, 4}, + {"LoadDLL", Func, 0}, + {"LoadGetAddrInfo", Func, 1}, + {"LoadLibrary", Func, 0}, + {"LoadSetFileCompletionNotificationModes", Func, 2}, + {"LocalFree", Func, 0}, + {"Log2phys_t", Type, 0}, + {"Log2phys_t.Contigbytes", Field, 0}, + {"Log2phys_t.Devoffset", Field, 0}, + {"Log2phys_t.Flags", Field, 0}, + {"LookupAccountName", Func, 0}, + {"LookupAccountSid", Func, 0}, + {"LookupSID", Func, 0}, + {"LsfJump", Func, 0}, + {"LsfSocket", Func, 0}, + {"LsfStmt", Func, 0}, + {"Lstat", Func, 0}, + {"MADV_AUTOSYNC", Const, 1}, + {"MADV_CAN_REUSE", Const, 0}, + {"MADV_CORE", Const, 1}, + {"MADV_DOFORK", Const, 0}, + {"MADV_DONTFORK", Const, 0}, + {"MADV_DONTNEED", Const, 0}, + {"MADV_FREE", Const, 0}, + {"MADV_FREE_REUSABLE", Const, 0}, + {"MADV_FREE_REUSE", Const, 0}, + {"MADV_HUGEPAGE", Const, 0}, + {"MADV_HWPOISON", Const, 0}, + {"MADV_MERGEABLE", Const, 0}, + {"MADV_NOCORE", Const, 1}, + {"MADV_NOHUGEPAGE", Const, 0}, + {"MADV_NORMAL", Const, 0}, + {"MADV_NOSYNC", Const, 1}, + {"MADV_PROTECT", Const, 1}, + {"MADV_RANDOM", Const, 0}, + {"MADV_REMOVE", Const, 0}, + {"MADV_SEQUENTIAL", Const, 0}, + {"MADV_SPACEAVAIL", Const, 3}, + {"MADV_UNMERGEABLE", Const, 0}, + {"MADV_WILLNEED", Const, 0}, + {"MADV_ZERO_WIRED_PAGES", Const, 0}, + {"MAP_32BIT", Const, 0}, + {"MAP_ALIGNED_SUPER", Const, 3}, + {"MAP_ALIGNMENT_16MB", Const, 3}, + {"MAP_ALIGNMENT_1TB", Const, 3}, + {"MAP_ALIGNMENT_256TB", Const, 3}, + {"MAP_ALIGNMENT_4GB", Const, 3}, + {"MAP_ALIGNMENT_64KB", Const, 3}, + {"MAP_ALIGNMENT_64PB", Const, 3}, + {"MAP_ALIGNMENT_MASK", Const, 3}, + {"MAP_ALIGNMENT_SHIFT", Const, 3}, + {"MAP_ANON", Const, 0}, + {"MAP_ANONYMOUS", Const, 0}, + {"MAP_COPY", Const, 0}, + {"MAP_DENYWRITE", Const, 0}, + {"MAP_EXECUTABLE", Const, 0}, + {"MAP_FILE", Const, 0}, + {"MAP_FIXED", Const, 0}, + {"MAP_FLAGMASK", Const, 3}, + {"MAP_GROWSDOWN", Const, 0}, + {"MAP_HASSEMAPHORE", Const, 0}, + {"MAP_HUGETLB", Const, 0}, + {"MAP_INHERIT", Const, 3}, + {"MAP_INHERIT_COPY", Const, 3}, + {"MAP_INHERIT_DEFAULT", Const, 3}, + {"MAP_INHERIT_DONATE_COPY", Const, 3}, + {"MAP_INHERIT_NONE", Const, 3}, + {"MAP_INHERIT_SHARE", Const, 3}, + {"MAP_JIT", Const, 0}, + {"MAP_LOCKED", Const, 0}, + {"MAP_NOCACHE", Const, 0}, + {"MAP_NOCORE", Const, 1}, + {"MAP_NOEXTEND", Const, 0}, + {"MAP_NONBLOCK", Const, 0}, + {"MAP_NORESERVE", Const, 0}, + {"MAP_NOSYNC", Const, 1}, + {"MAP_POPULATE", Const, 0}, + {"MAP_PREFAULT_READ", Const, 1}, + {"MAP_PRIVATE", Const, 0}, + {"MAP_RENAME", Const, 0}, + {"MAP_RESERVED0080", Const, 0}, + {"MAP_RESERVED0100", Const, 1}, + {"MAP_SHARED", Const, 0}, + {"MAP_STACK", Const, 0}, + {"MAP_TRYFIXED", Const, 3}, + {"MAP_TYPE", Const, 0}, + {"MAP_WIRED", Const, 3}, + {"MAXIMUM_REPARSE_DATA_BUFFER_SIZE", Const, 4}, + {"MAXLEN_IFDESCR", Const, 0}, + {"MAXLEN_PHYSADDR", Const, 0}, + {"MAX_ADAPTER_ADDRESS_LENGTH", Const, 0}, + {"MAX_ADAPTER_DESCRIPTION_LENGTH", Const, 0}, + {"MAX_ADAPTER_NAME_LENGTH", Const, 0}, + {"MAX_COMPUTERNAME_LENGTH", Const, 0}, + {"MAX_INTERFACE_NAME_LEN", Const, 0}, + {"MAX_LONG_PATH", Const, 0}, + {"MAX_PATH", Const, 0}, + {"MAX_PROTOCOL_CHAIN", Const, 2}, + {"MCL_CURRENT", Const, 0}, + {"MCL_FUTURE", Const, 0}, + {"MNT_DETACH", Const, 0}, + {"MNT_EXPIRE", Const, 0}, + {"MNT_FORCE", Const, 0}, + {"MSG_BCAST", Const, 1}, + {"MSG_CMSG_CLOEXEC", Const, 0}, + {"MSG_COMPAT", Const, 0}, + {"MSG_CONFIRM", Const, 0}, + {"MSG_CONTROLMBUF", Const, 1}, + {"MSG_CTRUNC", Const, 0}, + {"MSG_DONTROUTE", Const, 0}, + {"MSG_DONTWAIT", Const, 0}, + {"MSG_EOF", Const, 0}, + {"MSG_EOR", Const, 0}, + {"MSG_ERRQUEUE", Const, 0}, + {"MSG_FASTOPEN", Const, 1}, + {"MSG_FIN", Const, 0}, + {"MSG_FLUSH", Const, 0}, + {"MSG_HAVEMORE", Const, 0}, + {"MSG_HOLD", Const, 0}, + {"MSG_IOVUSRSPACE", Const, 1}, + {"MSG_LENUSRSPACE", Const, 1}, + {"MSG_MCAST", Const, 1}, + {"MSG_MORE", Const, 0}, + {"MSG_NAMEMBUF", Const, 1}, + {"MSG_NBIO", Const, 0}, + {"MSG_NEEDSA", Const, 0}, + {"MSG_NOSIGNAL", Const, 0}, + {"MSG_NOTIFICATION", Const, 0}, + {"MSG_OOB", Const, 0}, + {"MSG_PEEK", Const, 0}, + {"MSG_PROXY", Const, 0}, + {"MSG_RCVMORE", Const, 0}, + {"MSG_RST", Const, 0}, + {"MSG_SEND", Const, 0}, + {"MSG_SYN", Const, 0}, + {"MSG_TRUNC", Const, 0}, + {"MSG_TRYHARD", Const, 0}, + {"MSG_USERFLAGS", Const, 1}, + {"MSG_WAITALL", Const, 0}, + {"MSG_WAITFORONE", Const, 0}, + {"MSG_WAITSTREAM", Const, 0}, + {"MS_ACTIVE", Const, 0}, + {"MS_ASYNC", Const, 0}, + {"MS_BIND", Const, 0}, + {"MS_DEACTIVATE", Const, 0}, + {"MS_DIRSYNC", Const, 0}, + {"MS_INVALIDATE", Const, 0}, + {"MS_I_VERSION", Const, 0}, + {"MS_KERNMOUNT", Const, 0}, + {"MS_KILLPAGES", Const, 0}, + {"MS_MANDLOCK", Const, 0}, + {"MS_MGC_MSK", Const, 0}, + {"MS_MGC_VAL", Const, 0}, + {"MS_MOVE", Const, 0}, + {"MS_NOATIME", Const, 0}, + {"MS_NODEV", Const, 0}, + {"MS_NODIRATIME", Const, 0}, + {"MS_NOEXEC", Const, 0}, + {"MS_NOSUID", Const, 0}, + {"MS_NOUSER", Const, 0}, + {"MS_POSIXACL", Const, 0}, + {"MS_PRIVATE", Const, 0}, + {"MS_RDONLY", Const, 0}, + {"MS_REC", Const, 0}, + {"MS_RELATIME", Const, 0}, + {"MS_REMOUNT", Const, 0}, + {"MS_RMT_MASK", Const, 0}, + {"MS_SHARED", Const, 0}, + {"MS_SILENT", Const, 0}, + {"MS_SLAVE", Const, 0}, + {"MS_STRICTATIME", Const, 0}, + {"MS_SYNC", Const, 0}, + {"MS_SYNCHRONOUS", Const, 0}, + {"MS_UNBINDABLE", Const, 0}, + {"Madvise", Func, 0}, + {"MapViewOfFile", Func, 0}, + {"MaxTokenInfoClass", Const, 0}, + {"Mclpool", Type, 2}, + {"Mclpool.Alive", Field, 2}, + {"Mclpool.Cwm", Field, 2}, + {"Mclpool.Grown", Field, 2}, + {"Mclpool.Hwm", Field, 2}, + {"Mclpool.Lwm", Field, 2}, + {"MibIfRow", Type, 0}, + {"MibIfRow.AdminStatus", Field, 0}, + {"MibIfRow.Descr", Field, 0}, + {"MibIfRow.DescrLen", Field, 0}, + {"MibIfRow.InDiscards", Field, 0}, + {"MibIfRow.InErrors", Field, 0}, + {"MibIfRow.InNUcastPkts", Field, 0}, + {"MibIfRow.InOctets", Field, 0}, + {"MibIfRow.InUcastPkts", Field, 0}, + {"MibIfRow.InUnknownProtos", Field, 0}, + {"MibIfRow.Index", Field, 0}, + {"MibIfRow.LastChange", Field, 0}, + {"MibIfRow.Mtu", Field, 0}, + {"MibIfRow.Name", Field, 0}, + {"MibIfRow.OperStatus", Field, 0}, + {"MibIfRow.OutDiscards", Field, 0}, + {"MibIfRow.OutErrors", Field, 0}, + {"MibIfRow.OutNUcastPkts", Field, 0}, + {"MibIfRow.OutOctets", Field, 0}, + {"MibIfRow.OutQLen", Field, 0}, + {"MibIfRow.OutUcastPkts", Field, 0}, + {"MibIfRow.PhysAddr", Field, 0}, + {"MibIfRow.PhysAddrLen", Field, 0}, + {"MibIfRow.Speed", Field, 0}, + {"MibIfRow.Type", Field, 0}, + {"Mkdir", Func, 0}, + {"Mkdirat", Func, 0}, + {"Mkfifo", Func, 0}, + {"Mknod", Func, 0}, + {"Mknodat", Func, 0}, + {"Mlock", Func, 0}, + {"Mlockall", Func, 0}, + {"Mmap", Func, 0}, + {"Mount", Func, 0}, + {"MoveFile", Func, 0}, + {"Mprotect", Func, 0}, + {"Msghdr", Type, 0}, + {"Msghdr.Control", Field, 0}, + {"Msghdr.Controllen", Field, 0}, + {"Msghdr.Flags", Field, 0}, + {"Msghdr.Iov", Field, 0}, + {"Msghdr.Iovlen", Field, 0}, + {"Msghdr.Name", Field, 0}, + {"Msghdr.Namelen", Field, 0}, + {"Msghdr.Pad_cgo_0", Field, 0}, + {"Msghdr.Pad_cgo_1", Field, 0}, + {"Munlock", Func, 0}, + {"Munlockall", Func, 0}, + {"Munmap", Func, 0}, + {"MustLoadDLL", Func, 0}, + {"NAME_MAX", Const, 0}, + {"NETLINK_ADD_MEMBERSHIP", Const, 0}, + {"NETLINK_AUDIT", Const, 0}, + {"NETLINK_BROADCAST_ERROR", Const, 0}, + {"NETLINK_CONNECTOR", Const, 0}, + {"NETLINK_DNRTMSG", Const, 0}, + {"NETLINK_DROP_MEMBERSHIP", Const, 0}, + {"NETLINK_ECRYPTFS", Const, 0}, + {"NETLINK_FIB_LOOKUP", Const, 0}, + {"NETLINK_FIREWALL", Const, 0}, + {"NETLINK_GENERIC", Const, 0}, + {"NETLINK_INET_DIAG", Const, 0}, + {"NETLINK_IP6_FW", Const, 0}, + {"NETLINK_ISCSI", Const, 0}, + {"NETLINK_KOBJECT_UEVENT", Const, 0}, + {"NETLINK_NETFILTER", Const, 0}, + {"NETLINK_NFLOG", Const, 0}, + {"NETLINK_NO_ENOBUFS", Const, 0}, + {"NETLINK_PKTINFO", Const, 0}, + {"NETLINK_RDMA", Const, 0}, + {"NETLINK_ROUTE", Const, 0}, + {"NETLINK_SCSITRANSPORT", Const, 0}, + {"NETLINK_SELINUX", Const, 0}, + {"NETLINK_UNUSED", Const, 0}, + {"NETLINK_USERSOCK", Const, 0}, + {"NETLINK_XFRM", Const, 0}, + {"NET_RT_DUMP", Const, 0}, + {"NET_RT_DUMP2", Const, 0}, + {"NET_RT_FLAGS", Const, 0}, + {"NET_RT_IFLIST", Const, 0}, + {"NET_RT_IFLIST2", Const, 0}, + {"NET_RT_IFLISTL", Const, 1}, + {"NET_RT_IFMALIST", Const, 0}, + {"NET_RT_MAXID", Const, 0}, + {"NET_RT_OIFLIST", Const, 1}, + {"NET_RT_OOIFLIST", Const, 1}, + {"NET_RT_STAT", Const, 0}, + {"NET_RT_STATS", Const, 1}, + {"NET_RT_TABLE", Const, 1}, + {"NET_RT_TRASH", Const, 0}, + {"NLA_ALIGNTO", Const, 0}, + {"NLA_F_NESTED", Const, 0}, + {"NLA_F_NET_BYTEORDER", Const, 0}, + {"NLA_HDRLEN", Const, 0}, + {"NLMSG_ALIGNTO", Const, 0}, + {"NLMSG_DONE", Const, 0}, + {"NLMSG_ERROR", Const, 0}, + {"NLMSG_HDRLEN", Const, 0}, + {"NLMSG_MIN_TYPE", Const, 0}, + {"NLMSG_NOOP", Const, 0}, + {"NLMSG_OVERRUN", Const, 0}, + {"NLM_F_ACK", Const, 0}, + {"NLM_F_APPEND", Const, 0}, + {"NLM_F_ATOMIC", Const, 0}, + {"NLM_F_CREATE", Const, 0}, + {"NLM_F_DUMP", Const, 0}, + {"NLM_F_ECHO", Const, 0}, + {"NLM_F_EXCL", Const, 0}, + {"NLM_F_MATCH", Const, 0}, + {"NLM_F_MULTI", Const, 0}, + {"NLM_F_REPLACE", Const, 0}, + {"NLM_F_REQUEST", Const, 0}, + {"NLM_F_ROOT", Const, 0}, + {"NOFLSH", Const, 0}, + {"NOTE_ABSOLUTE", Const, 0}, + {"NOTE_ATTRIB", Const, 0}, + {"NOTE_BACKGROUND", Const, 16}, + {"NOTE_CHILD", Const, 0}, + {"NOTE_CRITICAL", Const, 16}, + {"NOTE_DELETE", Const, 0}, + {"NOTE_EOF", Const, 1}, + {"NOTE_EXEC", Const, 0}, + {"NOTE_EXIT", Const, 0}, + {"NOTE_EXITSTATUS", Const, 0}, + {"NOTE_EXIT_CSERROR", Const, 16}, + {"NOTE_EXIT_DECRYPTFAIL", Const, 16}, + {"NOTE_EXIT_DETAIL", Const, 16}, + {"NOTE_EXIT_DETAIL_MASK", Const, 16}, + {"NOTE_EXIT_MEMORY", Const, 16}, + {"NOTE_EXIT_REPARENTED", Const, 16}, + {"NOTE_EXTEND", Const, 0}, + {"NOTE_FFAND", Const, 0}, + {"NOTE_FFCOPY", Const, 0}, + {"NOTE_FFCTRLMASK", Const, 0}, + {"NOTE_FFLAGSMASK", Const, 0}, + {"NOTE_FFNOP", Const, 0}, + {"NOTE_FFOR", Const, 0}, + {"NOTE_FORK", Const, 0}, + {"NOTE_LEEWAY", Const, 16}, + {"NOTE_LINK", Const, 0}, + {"NOTE_LOWAT", Const, 0}, + {"NOTE_NONE", Const, 0}, + {"NOTE_NSECONDS", Const, 0}, + {"NOTE_PCTRLMASK", Const, 0}, + {"NOTE_PDATAMASK", Const, 0}, + {"NOTE_REAP", Const, 0}, + {"NOTE_RENAME", Const, 0}, + {"NOTE_RESOURCEEND", Const, 0}, + {"NOTE_REVOKE", Const, 0}, + {"NOTE_SECONDS", Const, 0}, + {"NOTE_SIGNAL", Const, 0}, + {"NOTE_TRACK", Const, 0}, + {"NOTE_TRACKERR", Const, 0}, + {"NOTE_TRIGGER", Const, 0}, + {"NOTE_TRUNCATE", Const, 1}, + {"NOTE_USECONDS", Const, 0}, + {"NOTE_VM_ERROR", Const, 0}, + {"NOTE_VM_PRESSURE", Const, 0}, + {"NOTE_VM_PRESSURE_SUDDEN_TERMINATE", Const, 0}, + {"NOTE_VM_PRESSURE_TERMINATE", Const, 0}, + {"NOTE_WRITE", Const, 0}, + {"NameCanonical", Const, 0}, + {"NameCanonicalEx", Const, 0}, + {"NameDisplay", Const, 0}, + {"NameDnsDomain", Const, 0}, + {"NameFullyQualifiedDN", Const, 0}, + {"NameSamCompatible", Const, 0}, + {"NameServicePrincipal", Const, 0}, + {"NameUniqueId", Const, 0}, + {"NameUnknown", Const, 0}, + {"NameUserPrincipal", Const, 0}, + {"Nanosleep", Func, 0}, + {"NetApiBufferFree", Func, 0}, + {"NetGetJoinInformation", Func, 2}, + {"NetSetupDomainName", Const, 2}, + {"NetSetupUnjoined", Const, 2}, + {"NetSetupUnknownStatus", Const, 2}, + {"NetSetupWorkgroupName", Const, 2}, + {"NetUserGetInfo", Func, 0}, + {"NetlinkMessage", Type, 0}, + {"NetlinkMessage.Data", Field, 0}, + {"NetlinkMessage.Header", Field, 0}, + {"NetlinkRIB", Func, 0}, + {"NetlinkRouteAttr", Type, 0}, + {"NetlinkRouteAttr.Attr", Field, 0}, + {"NetlinkRouteAttr.Value", Field, 0}, + {"NetlinkRouteRequest", Type, 0}, + {"NetlinkRouteRequest.Data", Field, 0}, + {"NetlinkRouteRequest.Header", Field, 0}, + {"NewCallback", Func, 0}, + {"NewCallbackCDecl", Func, 3}, + {"NewLazyDLL", Func, 0}, + {"NlAttr", Type, 0}, + {"NlAttr.Len", Field, 0}, + {"NlAttr.Type", Field, 0}, + {"NlMsgerr", Type, 0}, + {"NlMsgerr.Error", Field, 0}, + {"NlMsgerr.Msg", Field, 0}, + {"NlMsghdr", Type, 0}, + {"NlMsghdr.Flags", Field, 0}, + {"NlMsghdr.Len", Field, 0}, + {"NlMsghdr.Pid", Field, 0}, + {"NlMsghdr.Seq", Field, 0}, + {"NlMsghdr.Type", Field, 0}, + {"NsecToFiletime", Func, 0}, + {"NsecToTimespec", Func, 0}, + {"NsecToTimeval", Func, 0}, + {"Ntohs", Func, 0}, + {"OCRNL", Const, 0}, + {"OFDEL", Const, 0}, + {"OFILL", Const, 0}, + {"OFIOGETBMAP", Const, 1}, + {"OID_PKIX_KP_SERVER_AUTH", Var, 0}, + {"OID_SERVER_GATED_CRYPTO", Var, 0}, + {"OID_SGC_NETSCAPE", Var, 0}, + {"OLCUC", Const, 0}, + {"ONLCR", Const, 0}, + {"ONLRET", Const, 0}, + {"ONOCR", Const, 0}, + {"ONOEOT", Const, 1}, + {"OPEN_ALWAYS", Const, 0}, + {"OPEN_EXISTING", Const, 0}, + {"OPOST", Const, 0}, + {"O_ACCMODE", Const, 0}, + {"O_ALERT", Const, 0}, + {"O_ALT_IO", Const, 1}, + {"O_APPEND", Const, 0}, + {"O_ASYNC", Const, 0}, + {"O_CLOEXEC", Const, 0}, + {"O_CREAT", Const, 0}, + {"O_DIRECT", Const, 0}, + {"O_DIRECTORY", Const, 0}, + {"O_DP_GETRAWENCRYPTED", Const, 16}, + {"O_DSYNC", Const, 0}, + {"O_EVTONLY", Const, 0}, + {"O_EXCL", Const, 0}, + {"O_EXEC", Const, 0}, + {"O_EXLOCK", Const, 0}, + {"O_FSYNC", Const, 0}, + {"O_LARGEFILE", Const, 0}, + {"O_NDELAY", Const, 0}, + {"O_NOATIME", Const, 0}, + {"O_NOCTTY", Const, 0}, + {"O_NOFOLLOW", Const, 0}, + {"O_NONBLOCK", Const, 0}, + {"O_NOSIGPIPE", Const, 1}, + {"O_POPUP", Const, 0}, + {"O_RDONLY", Const, 0}, + {"O_RDWR", Const, 0}, + {"O_RSYNC", Const, 0}, + {"O_SHLOCK", Const, 0}, + {"O_SYMLINK", Const, 0}, + {"O_SYNC", Const, 0}, + {"O_TRUNC", Const, 0}, + {"O_TTY_INIT", Const, 0}, + {"O_WRONLY", Const, 0}, + {"Open", Func, 0}, + {"OpenCurrentProcessToken", Func, 0}, + {"OpenProcess", Func, 0}, + {"OpenProcessToken", Func, 0}, + {"Openat", Func, 0}, + {"Overlapped", Type, 0}, + {"Overlapped.HEvent", Field, 0}, + {"Overlapped.Internal", Field, 0}, + {"Overlapped.InternalHigh", Field, 0}, + {"Overlapped.Offset", Field, 0}, + {"Overlapped.OffsetHigh", Field, 0}, + {"PACKET_ADD_MEMBERSHIP", Const, 0}, + {"PACKET_BROADCAST", Const, 0}, + {"PACKET_DROP_MEMBERSHIP", Const, 0}, + {"PACKET_FASTROUTE", Const, 0}, + {"PACKET_HOST", Const, 0}, + {"PACKET_LOOPBACK", Const, 0}, + {"PACKET_MR_ALLMULTI", Const, 0}, + {"PACKET_MR_MULTICAST", Const, 0}, + {"PACKET_MR_PROMISC", Const, 0}, + {"PACKET_MULTICAST", Const, 0}, + {"PACKET_OTHERHOST", Const, 0}, + {"PACKET_OUTGOING", Const, 0}, + {"PACKET_RECV_OUTPUT", Const, 0}, + {"PACKET_RX_RING", Const, 0}, + {"PACKET_STATISTICS", Const, 0}, + {"PAGE_EXECUTE_READ", Const, 0}, + {"PAGE_EXECUTE_READWRITE", Const, 0}, + {"PAGE_EXECUTE_WRITECOPY", Const, 0}, + {"PAGE_READONLY", Const, 0}, + {"PAGE_READWRITE", Const, 0}, + {"PAGE_WRITECOPY", Const, 0}, + {"PARENB", Const, 0}, + {"PARMRK", Const, 0}, + {"PARODD", Const, 0}, + {"PENDIN", Const, 0}, + {"PFL_HIDDEN", Const, 2}, + {"PFL_MATCHES_PROTOCOL_ZERO", Const, 2}, + {"PFL_MULTIPLE_PROTO_ENTRIES", Const, 2}, + {"PFL_NETWORKDIRECT_PROVIDER", Const, 2}, + {"PFL_RECOMMENDED_PROTO_ENTRY", Const, 2}, + {"PF_FLUSH", Const, 1}, + {"PKCS_7_ASN_ENCODING", Const, 0}, + {"PMC5_PIPELINE_FLUSH", Const, 1}, + {"PRIO_PGRP", Const, 2}, + {"PRIO_PROCESS", Const, 2}, + {"PRIO_USER", Const, 2}, + {"PRI_IOFLUSH", Const, 1}, + {"PROCESS_QUERY_INFORMATION", Const, 0}, + {"PROCESS_TERMINATE", Const, 2}, + {"PROT_EXEC", Const, 0}, + {"PROT_GROWSDOWN", Const, 0}, + {"PROT_GROWSUP", Const, 0}, + {"PROT_NONE", Const, 0}, + {"PROT_READ", Const, 0}, + {"PROT_WRITE", Const, 0}, + {"PROV_DH_SCHANNEL", Const, 0}, + {"PROV_DSS", Const, 0}, + {"PROV_DSS_DH", Const, 0}, + {"PROV_EC_ECDSA_FULL", Const, 0}, + {"PROV_EC_ECDSA_SIG", Const, 0}, + {"PROV_EC_ECNRA_FULL", Const, 0}, + {"PROV_EC_ECNRA_SIG", Const, 0}, + {"PROV_FORTEZZA", Const, 0}, + {"PROV_INTEL_SEC", Const, 0}, + {"PROV_MS_EXCHANGE", Const, 0}, + {"PROV_REPLACE_OWF", Const, 0}, + {"PROV_RNG", Const, 0}, + {"PROV_RSA_AES", Const, 0}, + {"PROV_RSA_FULL", Const, 0}, + {"PROV_RSA_SCHANNEL", Const, 0}, + {"PROV_RSA_SIG", Const, 0}, + {"PROV_SPYRUS_LYNKS", Const, 0}, + {"PROV_SSL", Const, 0}, + {"PR_CAPBSET_DROP", Const, 0}, + {"PR_CAPBSET_READ", Const, 0}, + {"PR_CLEAR_SECCOMP_FILTER", Const, 0}, + {"PR_ENDIAN_BIG", Const, 0}, + {"PR_ENDIAN_LITTLE", Const, 0}, + {"PR_ENDIAN_PPC_LITTLE", Const, 0}, + {"PR_FPEMU_NOPRINT", Const, 0}, + {"PR_FPEMU_SIGFPE", Const, 0}, + {"PR_FP_EXC_ASYNC", Const, 0}, + {"PR_FP_EXC_DISABLED", Const, 0}, + {"PR_FP_EXC_DIV", Const, 0}, + {"PR_FP_EXC_INV", Const, 0}, + {"PR_FP_EXC_NONRECOV", Const, 0}, + {"PR_FP_EXC_OVF", Const, 0}, + {"PR_FP_EXC_PRECISE", Const, 0}, + {"PR_FP_EXC_RES", Const, 0}, + {"PR_FP_EXC_SW_ENABLE", Const, 0}, + {"PR_FP_EXC_UND", Const, 0}, + {"PR_GET_DUMPABLE", Const, 0}, + {"PR_GET_ENDIAN", Const, 0}, + {"PR_GET_FPEMU", Const, 0}, + {"PR_GET_FPEXC", Const, 0}, + {"PR_GET_KEEPCAPS", Const, 0}, + {"PR_GET_NAME", Const, 0}, + {"PR_GET_PDEATHSIG", Const, 0}, + {"PR_GET_SECCOMP", Const, 0}, + {"PR_GET_SECCOMP_FILTER", Const, 0}, + {"PR_GET_SECUREBITS", Const, 0}, + {"PR_GET_TIMERSLACK", Const, 0}, + {"PR_GET_TIMING", Const, 0}, + {"PR_GET_TSC", Const, 0}, + {"PR_GET_UNALIGN", Const, 0}, + {"PR_MCE_KILL", Const, 0}, + {"PR_MCE_KILL_CLEAR", Const, 0}, + {"PR_MCE_KILL_DEFAULT", Const, 0}, + {"PR_MCE_KILL_EARLY", Const, 0}, + {"PR_MCE_KILL_GET", Const, 0}, + {"PR_MCE_KILL_LATE", Const, 0}, + {"PR_MCE_KILL_SET", Const, 0}, + {"PR_SECCOMP_FILTER_EVENT", Const, 0}, + {"PR_SECCOMP_FILTER_SYSCALL", Const, 0}, + {"PR_SET_DUMPABLE", Const, 0}, + {"PR_SET_ENDIAN", Const, 0}, + {"PR_SET_FPEMU", Const, 0}, + {"PR_SET_FPEXC", Const, 0}, + {"PR_SET_KEEPCAPS", Const, 0}, + {"PR_SET_NAME", Const, 0}, + {"PR_SET_PDEATHSIG", Const, 0}, + {"PR_SET_PTRACER", Const, 0}, + {"PR_SET_SECCOMP", Const, 0}, + {"PR_SET_SECCOMP_FILTER", Const, 0}, + {"PR_SET_SECUREBITS", Const, 0}, + {"PR_SET_TIMERSLACK", Const, 0}, + {"PR_SET_TIMING", Const, 0}, + {"PR_SET_TSC", Const, 0}, + {"PR_SET_UNALIGN", Const, 0}, + {"PR_TASK_PERF_EVENTS_DISABLE", Const, 0}, + {"PR_TASK_PERF_EVENTS_ENABLE", Const, 0}, + {"PR_TIMING_STATISTICAL", Const, 0}, + {"PR_TIMING_TIMESTAMP", Const, 0}, + {"PR_TSC_ENABLE", Const, 0}, + {"PR_TSC_SIGSEGV", Const, 0}, + {"PR_UNALIGN_NOPRINT", Const, 0}, + {"PR_UNALIGN_SIGBUS", Const, 0}, + {"PTRACE_ARCH_PRCTL", Const, 0}, + {"PTRACE_ATTACH", Const, 0}, + {"PTRACE_CONT", Const, 0}, + {"PTRACE_DETACH", Const, 0}, + {"PTRACE_EVENT_CLONE", Const, 0}, + {"PTRACE_EVENT_EXEC", Const, 0}, + {"PTRACE_EVENT_EXIT", Const, 0}, + {"PTRACE_EVENT_FORK", Const, 0}, + {"PTRACE_EVENT_VFORK", Const, 0}, + {"PTRACE_EVENT_VFORK_DONE", Const, 0}, + {"PTRACE_GETCRUNCHREGS", Const, 0}, + {"PTRACE_GETEVENTMSG", Const, 0}, + {"PTRACE_GETFPREGS", Const, 0}, + {"PTRACE_GETFPXREGS", Const, 0}, + {"PTRACE_GETHBPREGS", Const, 0}, + {"PTRACE_GETREGS", Const, 0}, + {"PTRACE_GETREGSET", Const, 0}, + {"PTRACE_GETSIGINFO", Const, 0}, + {"PTRACE_GETVFPREGS", Const, 0}, + {"PTRACE_GETWMMXREGS", Const, 0}, + {"PTRACE_GET_THREAD_AREA", Const, 0}, + {"PTRACE_KILL", Const, 0}, + {"PTRACE_OLDSETOPTIONS", Const, 0}, + {"PTRACE_O_MASK", Const, 0}, + {"PTRACE_O_TRACECLONE", Const, 0}, + {"PTRACE_O_TRACEEXEC", Const, 0}, + {"PTRACE_O_TRACEEXIT", Const, 0}, + {"PTRACE_O_TRACEFORK", Const, 0}, + {"PTRACE_O_TRACESYSGOOD", Const, 0}, + {"PTRACE_O_TRACEVFORK", Const, 0}, + {"PTRACE_O_TRACEVFORKDONE", Const, 0}, + {"PTRACE_PEEKDATA", Const, 0}, + {"PTRACE_PEEKTEXT", Const, 0}, + {"PTRACE_PEEKUSR", Const, 0}, + {"PTRACE_POKEDATA", Const, 0}, + {"PTRACE_POKETEXT", Const, 0}, + {"PTRACE_POKEUSR", Const, 0}, + {"PTRACE_SETCRUNCHREGS", Const, 0}, + {"PTRACE_SETFPREGS", Const, 0}, + {"PTRACE_SETFPXREGS", Const, 0}, + {"PTRACE_SETHBPREGS", Const, 0}, + {"PTRACE_SETOPTIONS", Const, 0}, + {"PTRACE_SETREGS", Const, 0}, + {"PTRACE_SETREGSET", Const, 0}, + {"PTRACE_SETSIGINFO", Const, 0}, + {"PTRACE_SETVFPREGS", Const, 0}, + {"PTRACE_SETWMMXREGS", Const, 0}, + {"PTRACE_SET_SYSCALL", Const, 0}, + {"PTRACE_SET_THREAD_AREA", Const, 0}, + {"PTRACE_SINGLEBLOCK", Const, 0}, + {"PTRACE_SINGLESTEP", Const, 0}, + {"PTRACE_SYSCALL", Const, 0}, + {"PTRACE_SYSEMU", Const, 0}, + {"PTRACE_SYSEMU_SINGLESTEP", Const, 0}, + {"PTRACE_TRACEME", Const, 0}, + {"PT_ATTACH", Const, 0}, + {"PT_ATTACHEXC", Const, 0}, + {"PT_CONTINUE", Const, 0}, + {"PT_DATA_ADDR", Const, 0}, + {"PT_DENY_ATTACH", Const, 0}, + {"PT_DETACH", Const, 0}, + {"PT_FIRSTMACH", Const, 0}, + {"PT_FORCEQUOTA", Const, 0}, + {"PT_KILL", Const, 0}, + {"PT_MASK", Const, 1}, + {"PT_READ_D", Const, 0}, + {"PT_READ_I", Const, 0}, + {"PT_READ_U", Const, 0}, + {"PT_SIGEXC", Const, 0}, + {"PT_STEP", Const, 0}, + {"PT_TEXT_ADDR", Const, 0}, + {"PT_TEXT_END_ADDR", Const, 0}, + {"PT_THUPDATE", Const, 0}, + {"PT_TRACE_ME", Const, 0}, + {"PT_WRITE_D", Const, 0}, + {"PT_WRITE_I", Const, 0}, + {"PT_WRITE_U", Const, 0}, + {"ParseDirent", Func, 0}, + {"ParseNetlinkMessage", Func, 0}, + {"ParseNetlinkRouteAttr", Func, 0}, + {"ParseRoutingMessage", Func, 0}, + {"ParseRoutingSockaddr", Func, 0}, + {"ParseSocketControlMessage", Func, 0}, + {"ParseUnixCredentials", Func, 0}, + {"ParseUnixRights", Func, 0}, + {"PathMax", Const, 0}, + {"Pathconf", Func, 0}, + {"Pause", Func, 0}, + {"Pipe", Func, 0}, + {"Pipe2", Func, 1}, + {"PivotRoot", Func, 0}, + {"Pointer", Type, 11}, + {"PostQueuedCompletionStatus", Func, 0}, + {"Pread", Func, 0}, + {"Proc", Type, 0}, + {"Proc.Dll", Field, 0}, + {"Proc.Name", Field, 0}, + {"ProcAttr", Type, 0}, + {"ProcAttr.Dir", Field, 0}, + {"ProcAttr.Env", Field, 0}, + {"ProcAttr.Files", Field, 0}, + {"ProcAttr.Sys", Field, 0}, + {"Process32First", Func, 4}, + {"Process32Next", Func, 4}, + {"ProcessEntry32", Type, 4}, + {"ProcessEntry32.DefaultHeapID", Field, 4}, + {"ProcessEntry32.ExeFile", Field, 4}, + {"ProcessEntry32.Flags", Field, 4}, + {"ProcessEntry32.ModuleID", Field, 4}, + {"ProcessEntry32.ParentProcessID", Field, 4}, + {"ProcessEntry32.PriClassBase", Field, 4}, + {"ProcessEntry32.ProcessID", Field, 4}, + {"ProcessEntry32.Size", Field, 4}, + {"ProcessEntry32.Threads", Field, 4}, + {"ProcessEntry32.Usage", Field, 4}, + {"ProcessInformation", Type, 0}, + {"ProcessInformation.Process", Field, 0}, + {"ProcessInformation.ProcessId", Field, 0}, + {"ProcessInformation.Thread", Field, 0}, + {"ProcessInformation.ThreadId", Field, 0}, + {"Protoent", Type, 0}, + {"Protoent.Aliases", Field, 0}, + {"Protoent.Name", Field, 0}, + {"Protoent.Proto", Field, 0}, + {"PtraceAttach", Func, 0}, + {"PtraceCont", Func, 0}, + {"PtraceDetach", Func, 0}, + {"PtraceGetEventMsg", Func, 0}, + {"PtraceGetRegs", Func, 0}, + {"PtracePeekData", Func, 0}, + {"PtracePeekText", Func, 0}, + {"PtracePokeData", Func, 0}, + {"PtracePokeText", Func, 0}, + {"PtraceRegs", Type, 0}, + {"PtraceRegs.Cs", Field, 0}, + {"PtraceRegs.Ds", Field, 0}, + {"PtraceRegs.Eax", Field, 0}, + {"PtraceRegs.Ebp", Field, 0}, + {"PtraceRegs.Ebx", Field, 0}, + {"PtraceRegs.Ecx", Field, 0}, + {"PtraceRegs.Edi", Field, 0}, + {"PtraceRegs.Edx", Field, 0}, + {"PtraceRegs.Eflags", Field, 0}, + {"PtraceRegs.Eip", Field, 0}, + {"PtraceRegs.Es", Field, 0}, + {"PtraceRegs.Esi", Field, 0}, + {"PtraceRegs.Esp", Field, 0}, + {"PtraceRegs.Fs", Field, 0}, + {"PtraceRegs.Fs_base", Field, 0}, + {"PtraceRegs.Gs", Field, 0}, + {"PtraceRegs.Gs_base", Field, 0}, + {"PtraceRegs.Orig_eax", Field, 0}, + {"PtraceRegs.Orig_rax", Field, 0}, + {"PtraceRegs.R10", Field, 0}, + {"PtraceRegs.R11", Field, 0}, + {"PtraceRegs.R12", Field, 0}, + {"PtraceRegs.R13", Field, 0}, + {"PtraceRegs.R14", Field, 0}, + {"PtraceRegs.R15", Field, 0}, + {"PtraceRegs.R8", Field, 0}, + {"PtraceRegs.R9", Field, 0}, + {"PtraceRegs.Rax", Field, 0}, + {"PtraceRegs.Rbp", Field, 0}, + {"PtraceRegs.Rbx", Field, 0}, + {"PtraceRegs.Rcx", Field, 0}, + {"PtraceRegs.Rdi", Field, 0}, + {"PtraceRegs.Rdx", Field, 0}, + {"PtraceRegs.Rip", Field, 0}, + {"PtraceRegs.Rsi", Field, 0}, + {"PtraceRegs.Rsp", Field, 0}, + {"PtraceRegs.Ss", Field, 0}, + {"PtraceRegs.Uregs", Field, 0}, + {"PtraceRegs.Xcs", Field, 0}, + {"PtraceRegs.Xds", Field, 0}, + {"PtraceRegs.Xes", Field, 0}, + {"PtraceRegs.Xfs", Field, 0}, + {"PtraceRegs.Xgs", Field, 0}, + {"PtraceRegs.Xss", Field, 0}, + {"PtraceSetOptions", Func, 0}, + {"PtraceSetRegs", Func, 0}, + {"PtraceSingleStep", Func, 0}, + {"PtraceSyscall", Func, 1}, + {"Pwrite", Func, 0}, + {"REG_BINARY", Const, 0}, + {"REG_DWORD", Const, 0}, + {"REG_DWORD_BIG_ENDIAN", Const, 0}, + {"REG_DWORD_LITTLE_ENDIAN", Const, 0}, + {"REG_EXPAND_SZ", Const, 0}, + {"REG_FULL_RESOURCE_DESCRIPTOR", Const, 0}, + {"REG_LINK", Const, 0}, + {"REG_MULTI_SZ", Const, 0}, + {"REG_NONE", Const, 0}, + {"REG_QWORD", Const, 0}, + {"REG_QWORD_LITTLE_ENDIAN", Const, 0}, + {"REG_RESOURCE_LIST", Const, 0}, + {"REG_RESOURCE_REQUIREMENTS_LIST", Const, 0}, + {"REG_SZ", Const, 0}, + {"RLIMIT_AS", Const, 0}, + {"RLIMIT_CORE", Const, 0}, + {"RLIMIT_CPU", Const, 0}, + {"RLIMIT_CPU_USAGE_MONITOR", Const, 16}, + {"RLIMIT_DATA", Const, 0}, + {"RLIMIT_FSIZE", Const, 0}, + {"RLIMIT_NOFILE", Const, 0}, + {"RLIMIT_STACK", Const, 0}, + {"RLIM_INFINITY", Const, 0}, + {"RTAX_ADVMSS", Const, 0}, + {"RTAX_AUTHOR", Const, 0}, + {"RTAX_BRD", Const, 0}, + {"RTAX_CWND", Const, 0}, + {"RTAX_DST", Const, 0}, + {"RTAX_FEATURES", Const, 0}, + {"RTAX_FEATURE_ALLFRAG", Const, 0}, + {"RTAX_FEATURE_ECN", Const, 0}, + {"RTAX_FEATURE_SACK", Const, 0}, + {"RTAX_FEATURE_TIMESTAMP", Const, 0}, + {"RTAX_GATEWAY", Const, 0}, + {"RTAX_GENMASK", Const, 0}, + {"RTAX_HOPLIMIT", Const, 0}, + {"RTAX_IFA", Const, 0}, + {"RTAX_IFP", Const, 0}, + {"RTAX_INITCWND", Const, 0}, + {"RTAX_INITRWND", Const, 0}, + {"RTAX_LABEL", Const, 1}, + {"RTAX_LOCK", Const, 0}, + {"RTAX_MAX", Const, 0}, + {"RTAX_MTU", Const, 0}, + {"RTAX_NETMASK", Const, 0}, + {"RTAX_REORDERING", Const, 0}, + {"RTAX_RTO_MIN", Const, 0}, + {"RTAX_RTT", Const, 0}, + {"RTAX_RTTVAR", Const, 0}, + {"RTAX_SRC", Const, 1}, + {"RTAX_SRCMASK", Const, 1}, + {"RTAX_SSTHRESH", Const, 0}, + {"RTAX_TAG", Const, 1}, + {"RTAX_UNSPEC", Const, 0}, + {"RTAX_WINDOW", Const, 0}, + {"RTA_ALIGNTO", Const, 0}, + {"RTA_AUTHOR", Const, 0}, + {"RTA_BRD", Const, 0}, + {"RTA_CACHEINFO", Const, 0}, + {"RTA_DST", Const, 0}, + {"RTA_FLOW", Const, 0}, + {"RTA_GATEWAY", Const, 0}, + {"RTA_GENMASK", Const, 0}, + {"RTA_IFA", Const, 0}, + {"RTA_IFP", Const, 0}, + {"RTA_IIF", Const, 0}, + {"RTA_LABEL", Const, 1}, + {"RTA_MAX", Const, 0}, + {"RTA_METRICS", Const, 0}, + {"RTA_MULTIPATH", Const, 0}, + {"RTA_NETMASK", Const, 0}, + {"RTA_OIF", Const, 0}, + {"RTA_PREFSRC", Const, 0}, + {"RTA_PRIORITY", Const, 0}, + {"RTA_SRC", Const, 0}, + {"RTA_SRCMASK", Const, 1}, + {"RTA_TABLE", Const, 0}, + {"RTA_TAG", Const, 1}, + {"RTA_UNSPEC", Const, 0}, + {"RTCF_DIRECTSRC", Const, 0}, + {"RTCF_DOREDIRECT", Const, 0}, + {"RTCF_LOG", Const, 0}, + {"RTCF_MASQ", Const, 0}, + {"RTCF_NAT", Const, 0}, + {"RTCF_VALVE", Const, 0}, + {"RTF_ADDRCLASSMASK", Const, 0}, + {"RTF_ADDRCONF", Const, 0}, + {"RTF_ALLONLINK", Const, 0}, + {"RTF_ANNOUNCE", Const, 1}, + {"RTF_BLACKHOLE", Const, 0}, + {"RTF_BROADCAST", Const, 0}, + {"RTF_CACHE", Const, 0}, + {"RTF_CLONED", Const, 1}, + {"RTF_CLONING", Const, 0}, + {"RTF_CONDEMNED", Const, 0}, + {"RTF_DEFAULT", Const, 0}, + {"RTF_DELCLONE", Const, 0}, + {"RTF_DONE", Const, 0}, + {"RTF_DYNAMIC", Const, 0}, + {"RTF_FLOW", Const, 0}, + {"RTF_FMASK", Const, 0}, + {"RTF_GATEWAY", Const, 0}, + {"RTF_GWFLAG_COMPAT", Const, 3}, + {"RTF_HOST", Const, 0}, + {"RTF_IFREF", Const, 0}, + {"RTF_IFSCOPE", Const, 0}, + {"RTF_INTERFACE", Const, 0}, + {"RTF_IRTT", Const, 0}, + {"RTF_LINKRT", Const, 0}, + {"RTF_LLDATA", Const, 0}, + {"RTF_LLINFO", Const, 0}, + {"RTF_LOCAL", Const, 0}, + {"RTF_MASK", Const, 1}, + {"RTF_MODIFIED", Const, 0}, + {"RTF_MPATH", Const, 1}, + {"RTF_MPLS", Const, 1}, + {"RTF_MSS", Const, 0}, + {"RTF_MTU", Const, 0}, + {"RTF_MULTICAST", Const, 0}, + {"RTF_NAT", Const, 0}, + {"RTF_NOFORWARD", Const, 0}, + {"RTF_NONEXTHOP", Const, 0}, + {"RTF_NOPMTUDISC", Const, 0}, + {"RTF_PERMANENT_ARP", Const, 1}, + {"RTF_PINNED", Const, 0}, + {"RTF_POLICY", Const, 0}, + {"RTF_PRCLONING", Const, 0}, + {"RTF_PROTO1", Const, 0}, + {"RTF_PROTO2", Const, 0}, + {"RTF_PROTO3", Const, 0}, + {"RTF_PROXY", Const, 16}, + {"RTF_REINSTATE", Const, 0}, + {"RTF_REJECT", Const, 0}, + {"RTF_RNH_LOCKED", Const, 0}, + {"RTF_ROUTER", Const, 16}, + {"RTF_SOURCE", Const, 1}, + {"RTF_SRC", Const, 1}, + {"RTF_STATIC", Const, 0}, + {"RTF_STICKY", Const, 0}, + {"RTF_THROW", Const, 0}, + {"RTF_TUNNEL", Const, 1}, + {"RTF_UP", Const, 0}, + {"RTF_USETRAILERS", Const, 1}, + {"RTF_WASCLONED", Const, 0}, + {"RTF_WINDOW", Const, 0}, + {"RTF_XRESOLVE", Const, 0}, + {"RTM_ADD", Const, 0}, + {"RTM_BASE", Const, 0}, + {"RTM_CHANGE", Const, 0}, + {"RTM_CHGADDR", Const, 1}, + {"RTM_DELACTION", Const, 0}, + {"RTM_DELADDR", Const, 0}, + {"RTM_DELADDRLABEL", Const, 0}, + {"RTM_DELETE", Const, 0}, + {"RTM_DELLINK", Const, 0}, + {"RTM_DELMADDR", Const, 0}, + {"RTM_DELNEIGH", Const, 0}, + {"RTM_DELQDISC", Const, 0}, + {"RTM_DELROUTE", Const, 0}, + {"RTM_DELRULE", Const, 0}, + {"RTM_DELTCLASS", Const, 0}, + {"RTM_DELTFILTER", Const, 0}, + {"RTM_DESYNC", Const, 1}, + {"RTM_F_CLONED", Const, 0}, + {"RTM_F_EQUALIZE", Const, 0}, + {"RTM_F_NOTIFY", Const, 0}, + {"RTM_F_PREFIX", Const, 0}, + {"RTM_GET", Const, 0}, + {"RTM_GET2", Const, 0}, + {"RTM_GETACTION", Const, 0}, + {"RTM_GETADDR", Const, 0}, + {"RTM_GETADDRLABEL", Const, 0}, + {"RTM_GETANYCAST", Const, 0}, + {"RTM_GETDCB", Const, 0}, + {"RTM_GETLINK", Const, 0}, + {"RTM_GETMULTICAST", Const, 0}, + {"RTM_GETNEIGH", Const, 0}, + {"RTM_GETNEIGHTBL", Const, 0}, + {"RTM_GETQDISC", Const, 0}, + {"RTM_GETROUTE", Const, 0}, + {"RTM_GETRULE", Const, 0}, + {"RTM_GETTCLASS", Const, 0}, + {"RTM_GETTFILTER", Const, 0}, + {"RTM_IEEE80211", Const, 0}, + {"RTM_IFANNOUNCE", Const, 0}, + {"RTM_IFINFO", Const, 0}, + {"RTM_IFINFO2", Const, 0}, + {"RTM_LLINFO_UPD", Const, 1}, + {"RTM_LOCK", Const, 0}, + {"RTM_LOSING", Const, 0}, + {"RTM_MAX", Const, 0}, + {"RTM_MAXSIZE", Const, 1}, + {"RTM_MISS", Const, 0}, + {"RTM_NEWACTION", Const, 0}, + {"RTM_NEWADDR", Const, 0}, + {"RTM_NEWADDRLABEL", Const, 0}, + {"RTM_NEWLINK", Const, 0}, + {"RTM_NEWMADDR", Const, 0}, + {"RTM_NEWMADDR2", Const, 0}, + {"RTM_NEWNDUSEROPT", Const, 0}, + {"RTM_NEWNEIGH", Const, 0}, + {"RTM_NEWNEIGHTBL", Const, 0}, + {"RTM_NEWPREFIX", Const, 0}, + {"RTM_NEWQDISC", Const, 0}, + {"RTM_NEWROUTE", Const, 0}, + {"RTM_NEWRULE", Const, 0}, + {"RTM_NEWTCLASS", Const, 0}, + {"RTM_NEWTFILTER", Const, 0}, + {"RTM_NR_FAMILIES", Const, 0}, + {"RTM_NR_MSGTYPES", Const, 0}, + {"RTM_OIFINFO", Const, 1}, + {"RTM_OLDADD", Const, 0}, + {"RTM_OLDDEL", Const, 0}, + {"RTM_OOIFINFO", Const, 1}, + {"RTM_REDIRECT", Const, 0}, + {"RTM_RESOLVE", Const, 0}, + {"RTM_RTTUNIT", Const, 0}, + {"RTM_SETDCB", Const, 0}, + {"RTM_SETGATE", Const, 1}, + {"RTM_SETLINK", Const, 0}, + {"RTM_SETNEIGHTBL", Const, 0}, + {"RTM_VERSION", Const, 0}, + {"RTNH_ALIGNTO", Const, 0}, + {"RTNH_F_DEAD", Const, 0}, + {"RTNH_F_ONLINK", Const, 0}, + {"RTNH_F_PERVASIVE", Const, 0}, + {"RTNLGRP_IPV4_IFADDR", Const, 1}, + {"RTNLGRP_IPV4_MROUTE", Const, 1}, + {"RTNLGRP_IPV4_ROUTE", Const, 1}, + {"RTNLGRP_IPV4_RULE", Const, 1}, + {"RTNLGRP_IPV6_IFADDR", Const, 1}, + {"RTNLGRP_IPV6_IFINFO", Const, 1}, + {"RTNLGRP_IPV6_MROUTE", Const, 1}, + {"RTNLGRP_IPV6_PREFIX", Const, 1}, + {"RTNLGRP_IPV6_ROUTE", Const, 1}, + {"RTNLGRP_IPV6_RULE", Const, 1}, + {"RTNLGRP_LINK", Const, 1}, + {"RTNLGRP_ND_USEROPT", Const, 1}, + {"RTNLGRP_NEIGH", Const, 1}, + {"RTNLGRP_NONE", Const, 1}, + {"RTNLGRP_NOTIFY", Const, 1}, + {"RTNLGRP_TC", Const, 1}, + {"RTN_ANYCAST", Const, 0}, + {"RTN_BLACKHOLE", Const, 0}, + {"RTN_BROADCAST", Const, 0}, + {"RTN_LOCAL", Const, 0}, + {"RTN_MAX", Const, 0}, + {"RTN_MULTICAST", Const, 0}, + {"RTN_NAT", Const, 0}, + {"RTN_PROHIBIT", Const, 0}, + {"RTN_THROW", Const, 0}, + {"RTN_UNICAST", Const, 0}, + {"RTN_UNREACHABLE", Const, 0}, + {"RTN_UNSPEC", Const, 0}, + {"RTN_XRESOLVE", Const, 0}, + {"RTPROT_BIRD", Const, 0}, + {"RTPROT_BOOT", Const, 0}, + {"RTPROT_DHCP", Const, 0}, + {"RTPROT_DNROUTED", Const, 0}, + {"RTPROT_GATED", Const, 0}, + {"RTPROT_KERNEL", Const, 0}, + {"RTPROT_MRT", Const, 0}, + {"RTPROT_NTK", Const, 0}, + {"RTPROT_RA", Const, 0}, + {"RTPROT_REDIRECT", Const, 0}, + {"RTPROT_STATIC", Const, 0}, + {"RTPROT_UNSPEC", Const, 0}, + {"RTPROT_XORP", Const, 0}, + {"RTPROT_ZEBRA", Const, 0}, + {"RTV_EXPIRE", Const, 0}, + {"RTV_HOPCOUNT", Const, 0}, + {"RTV_MTU", Const, 0}, + {"RTV_RPIPE", Const, 0}, + {"RTV_RTT", Const, 0}, + {"RTV_RTTVAR", Const, 0}, + {"RTV_SPIPE", Const, 0}, + {"RTV_SSTHRESH", Const, 0}, + {"RTV_WEIGHT", Const, 0}, + {"RT_CACHING_CONTEXT", Const, 1}, + {"RT_CLASS_DEFAULT", Const, 0}, + {"RT_CLASS_LOCAL", Const, 0}, + {"RT_CLASS_MAIN", Const, 0}, + {"RT_CLASS_MAX", Const, 0}, + {"RT_CLASS_UNSPEC", Const, 0}, + {"RT_DEFAULT_FIB", Const, 1}, + {"RT_NORTREF", Const, 1}, + {"RT_SCOPE_HOST", Const, 0}, + {"RT_SCOPE_LINK", Const, 0}, + {"RT_SCOPE_NOWHERE", Const, 0}, + {"RT_SCOPE_SITE", Const, 0}, + {"RT_SCOPE_UNIVERSE", Const, 0}, + {"RT_TABLEID_MAX", Const, 1}, + {"RT_TABLE_COMPAT", Const, 0}, + {"RT_TABLE_DEFAULT", Const, 0}, + {"RT_TABLE_LOCAL", Const, 0}, + {"RT_TABLE_MAIN", Const, 0}, + {"RT_TABLE_MAX", Const, 0}, + {"RT_TABLE_UNSPEC", Const, 0}, + {"RUSAGE_CHILDREN", Const, 0}, + {"RUSAGE_SELF", Const, 0}, + {"RUSAGE_THREAD", Const, 0}, + {"Radvisory_t", Type, 0}, + {"Radvisory_t.Count", Field, 0}, + {"Radvisory_t.Offset", Field, 0}, + {"Radvisory_t.Pad_cgo_0", Field, 0}, + {"RawConn", Type, 9}, + {"RawSockaddr", Type, 0}, + {"RawSockaddr.Data", Field, 0}, + {"RawSockaddr.Family", Field, 0}, + {"RawSockaddr.Len", Field, 0}, + {"RawSockaddrAny", Type, 0}, + {"RawSockaddrAny.Addr", Field, 0}, + {"RawSockaddrAny.Pad", Field, 0}, + {"RawSockaddrDatalink", Type, 0}, + {"RawSockaddrDatalink.Alen", Field, 0}, + {"RawSockaddrDatalink.Data", Field, 0}, + {"RawSockaddrDatalink.Family", Field, 0}, + {"RawSockaddrDatalink.Index", Field, 0}, + {"RawSockaddrDatalink.Len", Field, 0}, + {"RawSockaddrDatalink.Nlen", Field, 0}, + {"RawSockaddrDatalink.Pad_cgo_0", Field, 2}, + {"RawSockaddrDatalink.Slen", Field, 0}, + {"RawSockaddrDatalink.Type", Field, 0}, + {"RawSockaddrInet4", Type, 0}, + {"RawSockaddrInet4.Addr", Field, 0}, + {"RawSockaddrInet4.Family", Field, 0}, + {"RawSockaddrInet4.Len", Field, 0}, + {"RawSockaddrInet4.Port", Field, 0}, + {"RawSockaddrInet4.Zero", Field, 0}, + {"RawSockaddrInet6", Type, 0}, + {"RawSockaddrInet6.Addr", Field, 0}, + {"RawSockaddrInet6.Family", Field, 0}, + {"RawSockaddrInet6.Flowinfo", Field, 0}, + {"RawSockaddrInet6.Len", Field, 0}, + {"RawSockaddrInet6.Port", Field, 0}, + {"RawSockaddrInet6.Scope_id", Field, 0}, + {"RawSockaddrLinklayer", Type, 0}, + {"RawSockaddrLinklayer.Addr", Field, 0}, + {"RawSockaddrLinklayer.Family", Field, 0}, + {"RawSockaddrLinklayer.Halen", Field, 0}, + {"RawSockaddrLinklayer.Hatype", Field, 0}, + {"RawSockaddrLinklayer.Ifindex", Field, 0}, + {"RawSockaddrLinklayer.Pkttype", Field, 0}, + {"RawSockaddrLinklayer.Protocol", Field, 0}, + {"RawSockaddrNetlink", Type, 0}, + {"RawSockaddrNetlink.Family", Field, 0}, + {"RawSockaddrNetlink.Groups", Field, 0}, + {"RawSockaddrNetlink.Pad", Field, 0}, + {"RawSockaddrNetlink.Pid", Field, 0}, + {"RawSockaddrUnix", Type, 0}, + {"RawSockaddrUnix.Family", Field, 0}, + {"RawSockaddrUnix.Len", Field, 0}, + {"RawSockaddrUnix.Pad_cgo_0", Field, 2}, + {"RawSockaddrUnix.Path", Field, 0}, + {"RawSyscall", Func, 0}, + {"RawSyscall6", Func, 0}, + {"Read", Func, 0}, + {"ReadConsole", Func, 1}, + {"ReadDirectoryChanges", Func, 0}, + {"ReadDirent", Func, 0}, + {"ReadFile", Func, 0}, + {"Readlink", Func, 0}, + {"Reboot", Func, 0}, + {"Recvfrom", Func, 0}, + {"Recvmsg", Func, 0}, + {"RegCloseKey", Func, 0}, + {"RegEnumKeyEx", Func, 0}, + {"RegOpenKeyEx", Func, 0}, + {"RegQueryInfoKey", Func, 0}, + {"RegQueryValueEx", Func, 0}, + {"RemoveDirectory", Func, 0}, + {"Removexattr", Func, 1}, + {"Rename", Func, 0}, + {"Renameat", Func, 0}, + {"Revoke", Func, 0}, + {"Rlimit", Type, 0}, + {"Rlimit.Cur", Field, 0}, + {"Rlimit.Max", Field, 0}, + {"Rmdir", Func, 0}, + {"RouteMessage", Type, 0}, + {"RouteMessage.Data", Field, 0}, + {"RouteMessage.Header", Field, 0}, + {"RouteRIB", Func, 0}, + {"RoutingMessage", Type, 0}, + {"RtAttr", Type, 0}, + {"RtAttr.Len", Field, 0}, + {"RtAttr.Type", Field, 0}, + {"RtGenmsg", Type, 0}, + {"RtGenmsg.Family", Field, 0}, + {"RtMetrics", Type, 0}, + {"RtMetrics.Expire", Field, 0}, + {"RtMetrics.Filler", Field, 0}, + {"RtMetrics.Hopcount", Field, 0}, + {"RtMetrics.Locks", Field, 0}, + {"RtMetrics.Mtu", Field, 0}, + {"RtMetrics.Pad", Field, 3}, + {"RtMetrics.Pksent", Field, 0}, + {"RtMetrics.Recvpipe", Field, 0}, + {"RtMetrics.Refcnt", Field, 2}, + {"RtMetrics.Rtt", Field, 0}, + {"RtMetrics.Rttvar", Field, 0}, + {"RtMetrics.Sendpipe", Field, 0}, + {"RtMetrics.Ssthresh", Field, 0}, + {"RtMetrics.Weight", Field, 0}, + {"RtMsg", Type, 0}, + {"RtMsg.Dst_len", Field, 0}, + {"RtMsg.Family", Field, 0}, + {"RtMsg.Flags", Field, 0}, + {"RtMsg.Protocol", Field, 0}, + {"RtMsg.Scope", Field, 0}, + {"RtMsg.Src_len", Field, 0}, + {"RtMsg.Table", Field, 0}, + {"RtMsg.Tos", Field, 0}, + {"RtMsg.Type", Field, 0}, + {"RtMsghdr", Type, 0}, + {"RtMsghdr.Addrs", Field, 0}, + {"RtMsghdr.Errno", Field, 0}, + {"RtMsghdr.Flags", Field, 0}, + {"RtMsghdr.Fmask", Field, 0}, + {"RtMsghdr.Hdrlen", Field, 2}, + {"RtMsghdr.Index", Field, 0}, + {"RtMsghdr.Inits", Field, 0}, + {"RtMsghdr.Mpls", Field, 2}, + {"RtMsghdr.Msglen", Field, 0}, + {"RtMsghdr.Pad_cgo_0", Field, 0}, + {"RtMsghdr.Pad_cgo_1", Field, 2}, + {"RtMsghdr.Pid", Field, 0}, + {"RtMsghdr.Priority", Field, 2}, + {"RtMsghdr.Rmx", Field, 0}, + {"RtMsghdr.Seq", Field, 0}, + {"RtMsghdr.Tableid", Field, 2}, + {"RtMsghdr.Type", Field, 0}, + {"RtMsghdr.Use", Field, 0}, + {"RtMsghdr.Version", Field, 0}, + {"RtNexthop", Type, 0}, + {"RtNexthop.Flags", Field, 0}, + {"RtNexthop.Hops", Field, 0}, + {"RtNexthop.Ifindex", Field, 0}, + {"RtNexthop.Len", Field, 0}, + {"Rusage", Type, 0}, + {"Rusage.CreationTime", Field, 0}, + {"Rusage.ExitTime", Field, 0}, + {"Rusage.Idrss", Field, 0}, + {"Rusage.Inblock", Field, 0}, + {"Rusage.Isrss", Field, 0}, + {"Rusage.Ixrss", Field, 0}, + {"Rusage.KernelTime", Field, 0}, + {"Rusage.Majflt", Field, 0}, + {"Rusage.Maxrss", Field, 0}, + {"Rusage.Minflt", Field, 0}, + {"Rusage.Msgrcv", Field, 0}, + {"Rusage.Msgsnd", Field, 0}, + {"Rusage.Nivcsw", Field, 0}, + {"Rusage.Nsignals", Field, 0}, + {"Rusage.Nswap", Field, 0}, + {"Rusage.Nvcsw", Field, 0}, + {"Rusage.Oublock", Field, 0}, + {"Rusage.Stime", Field, 0}, + {"Rusage.UserTime", Field, 0}, + {"Rusage.Utime", Field, 0}, + {"SCM_BINTIME", Const, 0}, + {"SCM_CREDENTIALS", Const, 0}, + {"SCM_CREDS", Const, 0}, + {"SCM_RIGHTS", Const, 0}, + {"SCM_TIMESTAMP", Const, 0}, + {"SCM_TIMESTAMPING", Const, 0}, + {"SCM_TIMESTAMPNS", Const, 0}, + {"SCM_TIMESTAMP_MONOTONIC", Const, 0}, + {"SHUT_RD", Const, 0}, + {"SHUT_RDWR", Const, 0}, + {"SHUT_WR", Const, 0}, + {"SID", Type, 0}, + {"SIDAndAttributes", Type, 0}, + {"SIDAndAttributes.Attributes", Field, 0}, + {"SIDAndAttributes.Sid", Field, 0}, + {"SIGABRT", Const, 0}, + {"SIGALRM", Const, 0}, + {"SIGBUS", Const, 0}, + {"SIGCHLD", Const, 0}, + {"SIGCLD", Const, 0}, + {"SIGCONT", Const, 0}, + {"SIGEMT", Const, 0}, + {"SIGFPE", Const, 0}, + {"SIGHUP", Const, 0}, + {"SIGILL", Const, 0}, + {"SIGINFO", Const, 0}, + {"SIGINT", Const, 0}, + {"SIGIO", Const, 0}, + {"SIGIOT", Const, 0}, + {"SIGKILL", Const, 0}, + {"SIGLIBRT", Const, 1}, + {"SIGLWP", Const, 0}, + {"SIGPIPE", Const, 0}, + {"SIGPOLL", Const, 0}, + {"SIGPROF", Const, 0}, + {"SIGPWR", Const, 0}, + {"SIGQUIT", Const, 0}, + {"SIGSEGV", Const, 0}, + {"SIGSTKFLT", Const, 0}, + {"SIGSTOP", Const, 0}, + {"SIGSYS", Const, 0}, + {"SIGTERM", Const, 0}, + {"SIGTHR", Const, 0}, + {"SIGTRAP", Const, 0}, + {"SIGTSTP", Const, 0}, + {"SIGTTIN", Const, 0}, + {"SIGTTOU", Const, 0}, + {"SIGUNUSED", Const, 0}, + {"SIGURG", Const, 0}, + {"SIGUSR1", Const, 0}, + {"SIGUSR2", Const, 0}, + {"SIGVTALRM", Const, 0}, + {"SIGWINCH", Const, 0}, + {"SIGXCPU", Const, 0}, + {"SIGXFSZ", Const, 0}, + {"SIOCADDDLCI", Const, 0}, + {"SIOCADDMULTI", Const, 0}, + {"SIOCADDRT", Const, 0}, + {"SIOCAIFADDR", Const, 0}, + {"SIOCAIFGROUP", Const, 0}, + {"SIOCALIFADDR", Const, 0}, + {"SIOCARPIPLL", Const, 0}, + {"SIOCATMARK", Const, 0}, + {"SIOCAUTOADDR", Const, 0}, + {"SIOCAUTONETMASK", Const, 0}, + {"SIOCBRDGADD", Const, 1}, + {"SIOCBRDGADDS", Const, 1}, + {"SIOCBRDGARL", Const, 1}, + {"SIOCBRDGDADDR", Const, 1}, + {"SIOCBRDGDEL", Const, 1}, + {"SIOCBRDGDELS", Const, 1}, + {"SIOCBRDGFLUSH", Const, 1}, + {"SIOCBRDGFRL", Const, 1}, + {"SIOCBRDGGCACHE", Const, 1}, + {"SIOCBRDGGFD", Const, 1}, + {"SIOCBRDGGHT", Const, 1}, + {"SIOCBRDGGIFFLGS", Const, 1}, + {"SIOCBRDGGMA", Const, 1}, + {"SIOCBRDGGPARAM", Const, 1}, + {"SIOCBRDGGPRI", Const, 1}, + {"SIOCBRDGGRL", Const, 1}, + {"SIOCBRDGGSIFS", Const, 1}, + {"SIOCBRDGGTO", Const, 1}, + {"SIOCBRDGIFS", Const, 1}, + {"SIOCBRDGRTS", Const, 1}, + {"SIOCBRDGSADDR", Const, 1}, + {"SIOCBRDGSCACHE", Const, 1}, + {"SIOCBRDGSFD", Const, 1}, + {"SIOCBRDGSHT", Const, 1}, + {"SIOCBRDGSIFCOST", Const, 1}, + {"SIOCBRDGSIFFLGS", Const, 1}, + {"SIOCBRDGSIFPRIO", Const, 1}, + {"SIOCBRDGSMA", Const, 1}, + {"SIOCBRDGSPRI", Const, 1}, + {"SIOCBRDGSPROTO", Const, 1}, + {"SIOCBRDGSTO", Const, 1}, + {"SIOCBRDGSTXHC", Const, 1}, + {"SIOCDARP", Const, 0}, + {"SIOCDELDLCI", Const, 0}, + {"SIOCDELMULTI", Const, 0}, + {"SIOCDELRT", Const, 0}, + {"SIOCDEVPRIVATE", Const, 0}, + {"SIOCDIFADDR", Const, 0}, + {"SIOCDIFGROUP", Const, 0}, + {"SIOCDIFPHYADDR", Const, 0}, + {"SIOCDLIFADDR", Const, 0}, + {"SIOCDRARP", Const, 0}, + {"SIOCGARP", Const, 0}, + {"SIOCGDRVSPEC", Const, 0}, + {"SIOCGETKALIVE", Const, 1}, + {"SIOCGETLABEL", Const, 1}, + {"SIOCGETPFLOW", Const, 1}, + {"SIOCGETPFSYNC", Const, 1}, + {"SIOCGETSGCNT", Const, 0}, + {"SIOCGETVIFCNT", Const, 0}, + {"SIOCGETVLAN", Const, 0}, + {"SIOCGHIWAT", Const, 0}, + {"SIOCGIFADDR", Const, 0}, + {"SIOCGIFADDRPREF", Const, 1}, + {"SIOCGIFALIAS", Const, 1}, + {"SIOCGIFALTMTU", Const, 0}, + {"SIOCGIFASYNCMAP", Const, 0}, + {"SIOCGIFBOND", Const, 0}, + {"SIOCGIFBR", Const, 0}, + {"SIOCGIFBRDADDR", Const, 0}, + {"SIOCGIFCAP", Const, 0}, + {"SIOCGIFCONF", Const, 0}, + {"SIOCGIFCOUNT", Const, 0}, + {"SIOCGIFDATA", Const, 1}, + {"SIOCGIFDESCR", Const, 0}, + {"SIOCGIFDEVMTU", Const, 0}, + {"SIOCGIFDLT", Const, 1}, + {"SIOCGIFDSTADDR", Const, 0}, + {"SIOCGIFENCAP", Const, 0}, + {"SIOCGIFFIB", Const, 1}, + {"SIOCGIFFLAGS", Const, 0}, + {"SIOCGIFGATTR", Const, 1}, + {"SIOCGIFGENERIC", Const, 0}, + {"SIOCGIFGMEMB", Const, 0}, + {"SIOCGIFGROUP", Const, 0}, + {"SIOCGIFHARDMTU", Const, 3}, + {"SIOCGIFHWADDR", Const, 0}, + {"SIOCGIFINDEX", Const, 0}, + {"SIOCGIFKPI", Const, 0}, + {"SIOCGIFMAC", Const, 0}, + {"SIOCGIFMAP", Const, 0}, + {"SIOCGIFMEDIA", Const, 0}, + {"SIOCGIFMEM", Const, 0}, + {"SIOCGIFMETRIC", Const, 0}, + {"SIOCGIFMTU", Const, 0}, + {"SIOCGIFNAME", Const, 0}, + {"SIOCGIFNETMASK", Const, 0}, + {"SIOCGIFPDSTADDR", Const, 0}, + {"SIOCGIFPFLAGS", Const, 0}, + {"SIOCGIFPHYS", Const, 0}, + {"SIOCGIFPRIORITY", Const, 1}, + {"SIOCGIFPSRCADDR", Const, 0}, + {"SIOCGIFRDOMAIN", Const, 1}, + {"SIOCGIFRTLABEL", Const, 1}, + {"SIOCGIFSLAVE", Const, 0}, + {"SIOCGIFSTATUS", Const, 0}, + {"SIOCGIFTIMESLOT", Const, 1}, + {"SIOCGIFTXQLEN", Const, 0}, + {"SIOCGIFVLAN", Const, 0}, + {"SIOCGIFWAKEFLAGS", Const, 0}, + {"SIOCGIFXFLAGS", Const, 1}, + {"SIOCGLIFADDR", Const, 0}, + {"SIOCGLIFPHYADDR", Const, 0}, + {"SIOCGLIFPHYRTABLE", Const, 1}, + {"SIOCGLIFPHYTTL", Const, 3}, + {"SIOCGLINKSTR", Const, 1}, + {"SIOCGLOWAT", Const, 0}, + {"SIOCGPGRP", Const, 0}, + {"SIOCGPRIVATE_0", Const, 0}, + {"SIOCGPRIVATE_1", Const, 0}, + {"SIOCGRARP", Const, 0}, + {"SIOCGSPPPPARAMS", Const, 3}, + {"SIOCGSTAMP", Const, 0}, + {"SIOCGSTAMPNS", Const, 0}, + {"SIOCGVH", Const, 1}, + {"SIOCGVNETID", Const, 3}, + {"SIOCIFCREATE", Const, 0}, + {"SIOCIFCREATE2", Const, 0}, + {"SIOCIFDESTROY", Const, 0}, + {"SIOCIFGCLONERS", Const, 0}, + {"SIOCINITIFADDR", Const, 1}, + {"SIOCPROTOPRIVATE", Const, 0}, + {"SIOCRSLVMULTI", Const, 0}, + {"SIOCRTMSG", Const, 0}, + {"SIOCSARP", Const, 0}, + {"SIOCSDRVSPEC", Const, 0}, + {"SIOCSETKALIVE", Const, 1}, + {"SIOCSETLABEL", Const, 1}, + {"SIOCSETPFLOW", Const, 1}, + {"SIOCSETPFSYNC", Const, 1}, + {"SIOCSETVLAN", Const, 0}, + {"SIOCSHIWAT", Const, 0}, + {"SIOCSIFADDR", Const, 0}, + {"SIOCSIFADDRPREF", Const, 1}, + {"SIOCSIFALTMTU", Const, 0}, + {"SIOCSIFASYNCMAP", Const, 0}, + {"SIOCSIFBOND", Const, 0}, + {"SIOCSIFBR", Const, 0}, + {"SIOCSIFBRDADDR", Const, 0}, + {"SIOCSIFCAP", Const, 0}, + {"SIOCSIFDESCR", Const, 0}, + {"SIOCSIFDSTADDR", Const, 0}, + {"SIOCSIFENCAP", Const, 0}, + {"SIOCSIFFIB", Const, 1}, + {"SIOCSIFFLAGS", Const, 0}, + {"SIOCSIFGATTR", Const, 1}, + {"SIOCSIFGENERIC", Const, 0}, + {"SIOCSIFHWADDR", Const, 0}, + {"SIOCSIFHWBROADCAST", Const, 0}, + {"SIOCSIFKPI", Const, 0}, + {"SIOCSIFLINK", Const, 0}, + {"SIOCSIFLLADDR", Const, 0}, + {"SIOCSIFMAC", Const, 0}, + {"SIOCSIFMAP", Const, 0}, + {"SIOCSIFMEDIA", Const, 0}, + {"SIOCSIFMEM", Const, 0}, + {"SIOCSIFMETRIC", Const, 0}, + {"SIOCSIFMTU", Const, 0}, + {"SIOCSIFNAME", Const, 0}, + {"SIOCSIFNETMASK", Const, 0}, + {"SIOCSIFPFLAGS", Const, 0}, + {"SIOCSIFPHYADDR", Const, 0}, + {"SIOCSIFPHYS", Const, 0}, + {"SIOCSIFPRIORITY", Const, 1}, + {"SIOCSIFRDOMAIN", Const, 1}, + {"SIOCSIFRTLABEL", Const, 1}, + {"SIOCSIFRVNET", Const, 0}, + {"SIOCSIFSLAVE", Const, 0}, + {"SIOCSIFTIMESLOT", Const, 1}, + {"SIOCSIFTXQLEN", Const, 0}, + {"SIOCSIFVLAN", Const, 0}, + {"SIOCSIFVNET", Const, 0}, + {"SIOCSIFXFLAGS", Const, 1}, + {"SIOCSLIFPHYADDR", Const, 0}, + {"SIOCSLIFPHYRTABLE", Const, 1}, + {"SIOCSLIFPHYTTL", Const, 3}, + {"SIOCSLINKSTR", Const, 1}, + {"SIOCSLOWAT", Const, 0}, + {"SIOCSPGRP", Const, 0}, + {"SIOCSRARP", Const, 0}, + {"SIOCSSPPPPARAMS", Const, 3}, + {"SIOCSVH", Const, 1}, + {"SIOCSVNETID", Const, 3}, + {"SIOCZIFDATA", Const, 1}, + {"SIO_GET_EXTENSION_FUNCTION_POINTER", Const, 1}, + {"SIO_GET_INTERFACE_LIST", Const, 0}, + {"SIO_KEEPALIVE_VALS", Const, 3}, + {"SIO_UDP_CONNRESET", Const, 4}, + {"SOCK_CLOEXEC", Const, 0}, + {"SOCK_DCCP", Const, 0}, + {"SOCK_DGRAM", Const, 0}, + {"SOCK_FLAGS_MASK", Const, 1}, + {"SOCK_MAXADDRLEN", Const, 0}, + {"SOCK_NONBLOCK", Const, 0}, + {"SOCK_NOSIGPIPE", Const, 1}, + {"SOCK_PACKET", Const, 0}, + {"SOCK_RAW", Const, 0}, + {"SOCK_RDM", Const, 0}, + {"SOCK_SEQPACKET", Const, 0}, + {"SOCK_STREAM", Const, 0}, + {"SOL_AAL", Const, 0}, + {"SOL_ATM", Const, 0}, + {"SOL_DECNET", Const, 0}, + {"SOL_ICMPV6", Const, 0}, + {"SOL_IP", Const, 0}, + {"SOL_IPV6", Const, 0}, + {"SOL_IRDA", Const, 0}, + {"SOL_PACKET", Const, 0}, + {"SOL_RAW", Const, 0}, + {"SOL_SOCKET", Const, 0}, + {"SOL_TCP", Const, 0}, + {"SOL_X25", Const, 0}, + {"SOMAXCONN", Const, 0}, + {"SO_ACCEPTCONN", Const, 0}, + {"SO_ACCEPTFILTER", Const, 0}, + {"SO_ATTACH_FILTER", Const, 0}, + {"SO_BINDANY", Const, 1}, + {"SO_BINDTODEVICE", Const, 0}, + {"SO_BINTIME", Const, 0}, + {"SO_BROADCAST", Const, 0}, + {"SO_BSDCOMPAT", Const, 0}, + {"SO_DEBUG", Const, 0}, + {"SO_DETACH_FILTER", Const, 0}, + {"SO_DOMAIN", Const, 0}, + {"SO_DONTROUTE", Const, 0}, + {"SO_DONTTRUNC", Const, 0}, + {"SO_ERROR", Const, 0}, + {"SO_KEEPALIVE", Const, 0}, + {"SO_LABEL", Const, 0}, + {"SO_LINGER", Const, 0}, + {"SO_LINGER_SEC", Const, 0}, + {"SO_LISTENINCQLEN", Const, 0}, + {"SO_LISTENQLEN", Const, 0}, + {"SO_LISTENQLIMIT", Const, 0}, + {"SO_MARK", Const, 0}, + {"SO_NETPROC", Const, 1}, + {"SO_NKE", Const, 0}, + {"SO_NOADDRERR", Const, 0}, + {"SO_NOHEADER", Const, 1}, + {"SO_NOSIGPIPE", Const, 0}, + {"SO_NOTIFYCONFLICT", Const, 0}, + {"SO_NO_CHECK", Const, 0}, + {"SO_NO_DDP", Const, 0}, + {"SO_NO_OFFLOAD", Const, 0}, + {"SO_NP_EXTENSIONS", Const, 0}, + {"SO_NREAD", Const, 0}, + {"SO_NUMRCVPKT", Const, 16}, + {"SO_NWRITE", Const, 0}, + {"SO_OOBINLINE", Const, 0}, + {"SO_OVERFLOWED", Const, 1}, + {"SO_PASSCRED", Const, 0}, + {"SO_PASSSEC", Const, 0}, + {"SO_PEERCRED", Const, 0}, + {"SO_PEERLABEL", Const, 0}, + {"SO_PEERNAME", Const, 0}, + {"SO_PEERSEC", Const, 0}, + {"SO_PRIORITY", Const, 0}, + {"SO_PROTOCOL", Const, 0}, + {"SO_PROTOTYPE", Const, 1}, + {"SO_RANDOMPORT", Const, 0}, + {"SO_RCVBUF", Const, 0}, + {"SO_RCVBUFFORCE", Const, 0}, + {"SO_RCVLOWAT", Const, 0}, + {"SO_RCVTIMEO", Const, 0}, + {"SO_RESTRICTIONS", Const, 0}, + {"SO_RESTRICT_DENYIN", Const, 0}, + {"SO_RESTRICT_DENYOUT", Const, 0}, + {"SO_RESTRICT_DENYSET", Const, 0}, + {"SO_REUSEADDR", Const, 0}, + {"SO_REUSEPORT", Const, 0}, + {"SO_REUSESHAREUID", Const, 0}, + {"SO_RTABLE", Const, 1}, + {"SO_RXQ_OVFL", Const, 0}, + {"SO_SECURITY_AUTHENTICATION", Const, 0}, + {"SO_SECURITY_ENCRYPTION_NETWORK", Const, 0}, + {"SO_SECURITY_ENCRYPTION_TRANSPORT", Const, 0}, + {"SO_SETFIB", Const, 0}, + {"SO_SNDBUF", Const, 0}, + {"SO_SNDBUFFORCE", Const, 0}, + {"SO_SNDLOWAT", Const, 0}, + {"SO_SNDTIMEO", Const, 0}, + {"SO_SPLICE", Const, 1}, + {"SO_TIMESTAMP", Const, 0}, + {"SO_TIMESTAMPING", Const, 0}, + {"SO_TIMESTAMPNS", Const, 0}, + {"SO_TIMESTAMP_MONOTONIC", Const, 0}, + {"SO_TYPE", Const, 0}, + {"SO_UPCALLCLOSEWAIT", Const, 0}, + {"SO_UPDATE_ACCEPT_CONTEXT", Const, 0}, + {"SO_UPDATE_CONNECT_CONTEXT", Const, 1}, + {"SO_USELOOPBACK", Const, 0}, + {"SO_USER_COOKIE", Const, 1}, + {"SO_VENDOR", Const, 3}, + {"SO_WANTMORE", Const, 0}, + {"SO_WANTOOBFLAG", Const, 0}, + {"SSLExtraCertChainPolicyPara", Type, 0}, + {"SSLExtraCertChainPolicyPara.AuthType", Field, 0}, + {"SSLExtraCertChainPolicyPara.Checks", Field, 0}, + {"SSLExtraCertChainPolicyPara.ServerName", Field, 0}, + {"SSLExtraCertChainPolicyPara.Size", Field, 0}, + {"STANDARD_RIGHTS_ALL", Const, 0}, + {"STANDARD_RIGHTS_EXECUTE", Const, 0}, + {"STANDARD_RIGHTS_READ", Const, 0}, + {"STANDARD_RIGHTS_REQUIRED", Const, 0}, + {"STANDARD_RIGHTS_WRITE", Const, 0}, + {"STARTF_USESHOWWINDOW", Const, 0}, + {"STARTF_USESTDHANDLES", Const, 0}, + {"STD_ERROR_HANDLE", Const, 0}, + {"STD_INPUT_HANDLE", Const, 0}, + {"STD_OUTPUT_HANDLE", Const, 0}, + {"SUBLANG_ENGLISH_US", Const, 0}, + {"SW_FORCEMINIMIZE", Const, 0}, + {"SW_HIDE", Const, 0}, + {"SW_MAXIMIZE", Const, 0}, + {"SW_MINIMIZE", Const, 0}, + {"SW_NORMAL", Const, 0}, + {"SW_RESTORE", Const, 0}, + {"SW_SHOW", Const, 0}, + {"SW_SHOWDEFAULT", Const, 0}, + {"SW_SHOWMAXIMIZED", Const, 0}, + {"SW_SHOWMINIMIZED", Const, 0}, + {"SW_SHOWMINNOACTIVE", Const, 0}, + {"SW_SHOWNA", Const, 0}, + {"SW_SHOWNOACTIVATE", Const, 0}, + {"SW_SHOWNORMAL", Const, 0}, + {"SYMBOLIC_LINK_FLAG_DIRECTORY", Const, 4}, + {"SYNCHRONIZE", Const, 0}, + {"SYSCTL_VERSION", Const, 1}, + {"SYSCTL_VERS_0", Const, 1}, + {"SYSCTL_VERS_1", Const, 1}, + {"SYSCTL_VERS_MASK", Const, 1}, + {"SYS_ABORT2", Const, 0}, + {"SYS_ACCEPT", Const, 0}, + {"SYS_ACCEPT4", Const, 0}, + {"SYS_ACCEPT_NOCANCEL", Const, 0}, + {"SYS_ACCESS", Const, 0}, + {"SYS_ACCESS_EXTENDED", Const, 0}, + {"SYS_ACCT", Const, 0}, + {"SYS_ADD_KEY", Const, 0}, + {"SYS_ADD_PROFIL", Const, 0}, + {"SYS_ADJFREQ", Const, 1}, + {"SYS_ADJTIME", Const, 0}, + {"SYS_ADJTIMEX", Const, 0}, + {"SYS_AFS_SYSCALL", Const, 0}, + {"SYS_AIO_CANCEL", Const, 0}, + {"SYS_AIO_ERROR", Const, 0}, + {"SYS_AIO_FSYNC", Const, 0}, + {"SYS_AIO_MLOCK", Const, 14}, + {"SYS_AIO_READ", Const, 0}, + {"SYS_AIO_RETURN", Const, 0}, + {"SYS_AIO_SUSPEND", Const, 0}, + {"SYS_AIO_SUSPEND_NOCANCEL", Const, 0}, + {"SYS_AIO_WAITCOMPLETE", Const, 14}, + {"SYS_AIO_WRITE", Const, 0}, + {"SYS_ALARM", Const, 0}, + {"SYS_ARCH_PRCTL", Const, 0}, + {"SYS_ARM_FADVISE64_64", Const, 0}, + {"SYS_ARM_SYNC_FILE_RANGE", Const, 0}, + {"SYS_ATGETMSG", Const, 0}, + {"SYS_ATPGETREQ", Const, 0}, + {"SYS_ATPGETRSP", Const, 0}, + {"SYS_ATPSNDREQ", Const, 0}, + {"SYS_ATPSNDRSP", Const, 0}, + {"SYS_ATPUTMSG", Const, 0}, + {"SYS_ATSOCKET", Const, 0}, + {"SYS_AUDIT", Const, 0}, + {"SYS_AUDITCTL", Const, 0}, + {"SYS_AUDITON", Const, 0}, + {"SYS_AUDIT_SESSION_JOIN", Const, 0}, + {"SYS_AUDIT_SESSION_PORT", Const, 0}, + {"SYS_AUDIT_SESSION_SELF", Const, 0}, + {"SYS_BDFLUSH", Const, 0}, + {"SYS_BIND", Const, 0}, + {"SYS_BINDAT", Const, 3}, + {"SYS_BREAK", Const, 0}, + {"SYS_BRK", Const, 0}, + {"SYS_BSDTHREAD_CREATE", Const, 0}, + {"SYS_BSDTHREAD_REGISTER", Const, 0}, + {"SYS_BSDTHREAD_TERMINATE", Const, 0}, + {"SYS_CAPGET", Const, 0}, + {"SYS_CAPSET", Const, 0}, + {"SYS_CAP_ENTER", Const, 0}, + {"SYS_CAP_FCNTLS_GET", Const, 1}, + {"SYS_CAP_FCNTLS_LIMIT", Const, 1}, + {"SYS_CAP_GETMODE", Const, 0}, + {"SYS_CAP_GETRIGHTS", Const, 0}, + {"SYS_CAP_IOCTLS_GET", Const, 1}, + {"SYS_CAP_IOCTLS_LIMIT", Const, 1}, + {"SYS_CAP_NEW", Const, 0}, + {"SYS_CAP_RIGHTS_GET", Const, 1}, + {"SYS_CAP_RIGHTS_LIMIT", Const, 1}, + {"SYS_CHDIR", Const, 0}, + {"SYS_CHFLAGS", Const, 0}, + {"SYS_CHFLAGSAT", Const, 3}, + {"SYS_CHMOD", Const, 0}, + {"SYS_CHMOD_EXTENDED", Const, 0}, + {"SYS_CHOWN", Const, 0}, + {"SYS_CHOWN32", Const, 0}, + {"SYS_CHROOT", Const, 0}, + {"SYS_CHUD", Const, 0}, + {"SYS_CLOCK_ADJTIME", Const, 0}, + {"SYS_CLOCK_GETCPUCLOCKID2", Const, 1}, + {"SYS_CLOCK_GETRES", Const, 0}, + {"SYS_CLOCK_GETTIME", Const, 0}, + {"SYS_CLOCK_NANOSLEEP", Const, 0}, + {"SYS_CLOCK_SETTIME", Const, 0}, + {"SYS_CLONE", Const, 0}, + {"SYS_CLOSE", Const, 0}, + {"SYS_CLOSEFROM", Const, 0}, + {"SYS_CLOSE_NOCANCEL", Const, 0}, + {"SYS_CONNECT", Const, 0}, + {"SYS_CONNECTAT", Const, 3}, + {"SYS_CONNECT_NOCANCEL", Const, 0}, + {"SYS_COPYFILE", Const, 0}, + {"SYS_CPUSET", Const, 0}, + {"SYS_CPUSET_GETAFFINITY", Const, 0}, + {"SYS_CPUSET_GETID", Const, 0}, + {"SYS_CPUSET_SETAFFINITY", Const, 0}, + {"SYS_CPUSET_SETID", Const, 0}, + {"SYS_CREAT", Const, 0}, + {"SYS_CREATE_MODULE", Const, 0}, + {"SYS_CSOPS", Const, 0}, + {"SYS_CSOPS_AUDITTOKEN", Const, 16}, + {"SYS_DELETE", Const, 0}, + {"SYS_DELETE_MODULE", Const, 0}, + {"SYS_DUP", Const, 0}, + {"SYS_DUP2", Const, 0}, + {"SYS_DUP3", Const, 0}, + {"SYS_EACCESS", Const, 0}, + {"SYS_EPOLL_CREATE", Const, 0}, + {"SYS_EPOLL_CREATE1", Const, 0}, + {"SYS_EPOLL_CTL", Const, 0}, + {"SYS_EPOLL_CTL_OLD", Const, 0}, + {"SYS_EPOLL_PWAIT", Const, 0}, + {"SYS_EPOLL_WAIT", Const, 0}, + {"SYS_EPOLL_WAIT_OLD", Const, 0}, + {"SYS_EVENTFD", Const, 0}, + {"SYS_EVENTFD2", Const, 0}, + {"SYS_EXCHANGEDATA", Const, 0}, + {"SYS_EXECVE", Const, 0}, + {"SYS_EXIT", Const, 0}, + {"SYS_EXIT_GROUP", Const, 0}, + {"SYS_EXTATTRCTL", Const, 0}, + {"SYS_EXTATTR_DELETE_FD", Const, 0}, + {"SYS_EXTATTR_DELETE_FILE", Const, 0}, + {"SYS_EXTATTR_DELETE_LINK", Const, 0}, + {"SYS_EXTATTR_GET_FD", Const, 0}, + {"SYS_EXTATTR_GET_FILE", Const, 0}, + {"SYS_EXTATTR_GET_LINK", Const, 0}, + {"SYS_EXTATTR_LIST_FD", Const, 0}, + {"SYS_EXTATTR_LIST_FILE", Const, 0}, + {"SYS_EXTATTR_LIST_LINK", Const, 0}, + {"SYS_EXTATTR_SET_FD", Const, 0}, + {"SYS_EXTATTR_SET_FILE", Const, 0}, + {"SYS_EXTATTR_SET_LINK", Const, 0}, + {"SYS_FACCESSAT", Const, 0}, + {"SYS_FADVISE64", Const, 0}, + {"SYS_FADVISE64_64", Const, 0}, + {"SYS_FALLOCATE", Const, 0}, + {"SYS_FANOTIFY_INIT", Const, 0}, + {"SYS_FANOTIFY_MARK", Const, 0}, + {"SYS_FCHDIR", Const, 0}, + {"SYS_FCHFLAGS", Const, 0}, + {"SYS_FCHMOD", Const, 0}, + {"SYS_FCHMODAT", Const, 0}, + {"SYS_FCHMOD_EXTENDED", Const, 0}, + {"SYS_FCHOWN", Const, 0}, + {"SYS_FCHOWN32", Const, 0}, + {"SYS_FCHOWNAT", Const, 0}, + {"SYS_FCHROOT", Const, 1}, + {"SYS_FCNTL", Const, 0}, + {"SYS_FCNTL64", Const, 0}, + {"SYS_FCNTL_NOCANCEL", Const, 0}, + {"SYS_FDATASYNC", Const, 0}, + {"SYS_FEXECVE", Const, 0}, + {"SYS_FFCLOCK_GETCOUNTER", Const, 0}, + {"SYS_FFCLOCK_GETESTIMATE", Const, 0}, + {"SYS_FFCLOCK_SETESTIMATE", Const, 0}, + {"SYS_FFSCTL", Const, 0}, + {"SYS_FGETATTRLIST", Const, 0}, + {"SYS_FGETXATTR", Const, 0}, + {"SYS_FHOPEN", Const, 0}, + {"SYS_FHSTAT", Const, 0}, + {"SYS_FHSTATFS", Const, 0}, + {"SYS_FILEPORT_MAKEFD", Const, 0}, + {"SYS_FILEPORT_MAKEPORT", Const, 0}, + {"SYS_FKTRACE", Const, 1}, + {"SYS_FLISTXATTR", Const, 0}, + {"SYS_FLOCK", Const, 0}, + {"SYS_FORK", Const, 0}, + {"SYS_FPATHCONF", Const, 0}, + {"SYS_FREEBSD6_FTRUNCATE", Const, 0}, + {"SYS_FREEBSD6_LSEEK", Const, 0}, + {"SYS_FREEBSD6_MMAP", Const, 0}, + {"SYS_FREEBSD6_PREAD", Const, 0}, + {"SYS_FREEBSD6_PWRITE", Const, 0}, + {"SYS_FREEBSD6_TRUNCATE", Const, 0}, + {"SYS_FREMOVEXATTR", Const, 0}, + {"SYS_FSCTL", Const, 0}, + {"SYS_FSETATTRLIST", Const, 0}, + {"SYS_FSETXATTR", Const, 0}, + {"SYS_FSGETPATH", Const, 0}, + {"SYS_FSTAT", Const, 0}, + {"SYS_FSTAT64", Const, 0}, + {"SYS_FSTAT64_EXTENDED", Const, 0}, + {"SYS_FSTATAT", Const, 0}, + {"SYS_FSTATAT64", Const, 0}, + {"SYS_FSTATFS", Const, 0}, + {"SYS_FSTATFS64", Const, 0}, + {"SYS_FSTATV", Const, 0}, + {"SYS_FSTATVFS1", Const, 1}, + {"SYS_FSTAT_EXTENDED", Const, 0}, + {"SYS_FSYNC", Const, 0}, + {"SYS_FSYNC_NOCANCEL", Const, 0}, + {"SYS_FSYNC_RANGE", Const, 1}, + {"SYS_FTIME", Const, 0}, + {"SYS_FTRUNCATE", Const, 0}, + {"SYS_FTRUNCATE64", Const, 0}, + {"SYS_FUTEX", Const, 0}, + {"SYS_FUTIMENS", Const, 1}, + {"SYS_FUTIMES", Const, 0}, + {"SYS_FUTIMESAT", Const, 0}, + {"SYS_GETATTRLIST", Const, 0}, + {"SYS_GETAUDIT", Const, 0}, + {"SYS_GETAUDIT_ADDR", Const, 0}, + {"SYS_GETAUID", Const, 0}, + {"SYS_GETCONTEXT", Const, 0}, + {"SYS_GETCPU", Const, 0}, + {"SYS_GETCWD", Const, 0}, + {"SYS_GETDENTS", Const, 0}, + {"SYS_GETDENTS64", Const, 0}, + {"SYS_GETDIRENTRIES", Const, 0}, + {"SYS_GETDIRENTRIES64", Const, 0}, + {"SYS_GETDIRENTRIESATTR", Const, 0}, + {"SYS_GETDTABLECOUNT", Const, 1}, + {"SYS_GETDTABLESIZE", Const, 0}, + {"SYS_GETEGID", Const, 0}, + {"SYS_GETEGID32", Const, 0}, + {"SYS_GETEUID", Const, 0}, + {"SYS_GETEUID32", Const, 0}, + {"SYS_GETFH", Const, 0}, + {"SYS_GETFSSTAT", Const, 0}, + {"SYS_GETFSSTAT64", Const, 0}, + {"SYS_GETGID", Const, 0}, + {"SYS_GETGID32", Const, 0}, + {"SYS_GETGROUPS", Const, 0}, + {"SYS_GETGROUPS32", Const, 0}, + {"SYS_GETHOSTUUID", Const, 0}, + {"SYS_GETITIMER", Const, 0}, + {"SYS_GETLCID", Const, 0}, + {"SYS_GETLOGIN", Const, 0}, + {"SYS_GETLOGINCLASS", Const, 0}, + {"SYS_GETPEERNAME", Const, 0}, + {"SYS_GETPGID", Const, 0}, + {"SYS_GETPGRP", Const, 0}, + {"SYS_GETPID", Const, 0}, + {"SYS_GETPMSG", Const, 0}, + {"SYS_GETPPID", Const, 0}, + {"SYS_GETPRIORITY", Const, 0}, + {"SYS_GETRESGID", Const, 0}, + {"SYS_GETRESGID32", Const, 0}, + {"SYS_GETRESUID", Const, 0}, + {"SYS_GETRESUID32", Const, 0}, + {"SYS_GETRLIMIT", Const, 0}, + {"SYS_GETRTABLE", Const, 1}, + {"SYS_GETRUSAGE", Const, 0}, + {"SYS_GETSGROUPS", Const, 0}, + {"SYS_GETSID", Const, 0}, + {"SYS_GETSOCKNAME", Const, 0}, + {"SYS_GETSOCKOPT", Const, 0}, + {"SYS_GETTHRID", Const, 1}, + {"SYS_GETTID", Const, 0}, + {"SYS_GETTIMEOFDAY", Const, 0}, + {"SYS_GETUID", Const, 0}, + {"SYS_GETUID32", Const, 0}, + {"SYS_GETVFSSTAT", Const, 1}, + {"SYS_GETWGROUPS", Const, 0}, + {"SYS_GETXATTR", Const, 0}, + {"SYS_GET_KERNEL_SYMS", Const, 0}, + {"SYS_GET_MEMPOLICY", Const, 0}, + {"SYS_GET_ROBUST_LIST", Const, 0}, + {"SYS_GET_THREAD_AREA", Const, 0}, + {"SYS_GSSD_SYSCALL", Const, 14}, + {"SYS_GTTY", Const, 0}, + {"SYS_IDENTITYSVC", Const, 0}, + {"SYS_IDLE", Const, 0}, + {"SYS_INITGROUPS", Const, 0}, + {"SYS_INIT_MODULE", Const, 0}, + {"SYS_INOTIFY_ADD_WATCH", Const, 0}, + {"SYS_INOTIFY_INIT", Const, 0}, + {"SYS_INOTIFY_INIT1", Const, 0}, + {"SYS_INOTIFY_RM_WATCH", Const, 0}, + {"SYS_IOCTL", Const, 0}, + {"SYS_IOPERM", Const, 0}, + {"SYS_IOPL", Const, 0}, + {"SYS_IOPOLICYSYS", Const, 0}, + {"SYS_IOPRIO_GET", Const, 0}, + {"SYS_IOPRIO_SET", Const, 0}, + {"SYS_IO_CANCEL", Const, 0}, + {"SYS_IO_DESTROY", Const, 0}, + {"SYS_IO_GETEVENTS", Const, 0}, + {"SYS_IO_SETUP", Const, 0}, + {"SYS_IO_SUBMIT", Const, 0}, + {"SYS_IPC", Const, 0}, + {"SYS_ISSETUGID", Const, 0}, + {"SYS_JAIL", Const, 0}, + {"SYS_JAIL_ATTACH", Const, 0}, + {"SYS_JAIL_GET", Const, 0}, + {"SYS_JAIL_REMOVE", Const, 0}, + {"SYS_JAIL_SET", Const, 0}, + {"SYS_KAS_INFO", Const, 16}, + {"SYS_KDEBUG_TRACE", Const, 0}, + {"SYS_KENV", Const, 0}, + {"SYS_KEVENT", Const, 0}, + {"SYS_KEVENT64", Const, 0}, + {"SYS_KEXEC_LOAD", Const, 0}, + {"SYS_KEYCTL", Const, 0}, + {"SYS_KILL", Const, 0}, + {"SYS_KLDFIND", Const, 0}, + {"SYS_KLDFIRSTMOD", Const, 0}, + {"SYS_KLDLOAD", Const, 0}, + {"SYS_KLDNEXT", Const, 0}, + {"SYS_KLDSTAT", Const, 0}, + {"SYS_KLDSYM", Const, 0}, + {"SYS_KLDUNLOAD", Const, 0}, + {"SYS_KLDUNLOADF", Const, 0}, + {"SYS_KMQ_NOTIFY", Const, 14}, + {"SYS_KMQ_OPEN", Const, 14}, + {"SYS_KMQ_SETATTR", Const, 14}, + {"SYS_KMQ_TIMEDRECEIVE", Const, 14}, + {"SYS_KMQ_TIMEDSEND", Const, 14}, + {"SYS_KMQ_UNLINK", Const, 14}, + {"SYS_KQUEUE", Const, 0}, + {"SYS_KQUEUE1", Const, 1}, + {"SYS_KSEM_CLOSE", Const, 14}, + {"SYS_KSEM_DESTROY", Const, 14}, + {"SYS_KSEM_GETVALUE", Const, 14}, + {"SYS_KSEM_INIT", Const, 14}, + {"SYS_KSEM_OPEN", Const, 14}, + {"SYS_KSEM_POST", Const, 14}, + {"SYS_KSEM_TIMEDWAIT", Const, 14}, + {"SYS_KSEM_TRYWAIT", Const, 14}, + {"SYS_KSEM_UNLINK", Const, 14}, + {"SYS_KSEM_WAIT", Const, 14}, + {"SYS_KTIMER_CREATE", Const, 0}, + {"SYS_KTIMER_DELETE", Const, 0}, + {"SYS_KTIMER_GETOVERRUN", Const, 0}, + {"SYS_KTIMER_GETTIME", Const, 0}, + {"SYS_KTIMER_SETTIME", Const, 0}, + {"SYS_KTRACE", Const, 0}, + {"SYS_LCHFLAGS", Const, 0}, + {"SYS_LCHMOD", Const, 0}, + {"SYS_LCHOWN", Const, 0}, + {"SYS_LCHOWN32", Const, 0}, + {"SYS_LEDGER", Const, 16}, + {"SYS_LGETFH", Const, 0}, + {"SYS_LGETXATTR", Const, 0}, + {"SYS_LINK", Const, 0}, + {"SYS_LINKAT", Const, 0}, + {"SYS_LIO_LISTIO", Const, 0}, + {"SYS_LISTEN", Const, 0}, + {"SYS_LISTXATTR", Const, 0}, + {"SYS_LLISTXATTR", Const, 0}, + {"SYS_LOCK", Const, 0}, + {"SYS_LOOKUP_DCOOKIE", Const, 0}, + {"SYS_LPATHCONF", Const, 0}, + {"SYS_LREMOVEXATTR", Const, 0}, + {"SYS_LSEEK", Const, 0}, + {"SYS_LSETXATTR", Const, 0}, + {"SYS_LSTAT", Const, 0}, + {"SYS_LSTAT64", Const, 0}, + {"SYS_LSTAT64_EXTENDED", Const, 0}, + {"SYS_LSTATV", Const, 0}, + {"SYS_LSTAT_EXTENDED", Const, 0}, + {"SYS_LUTIMES", Const, 0}, + {"SYS_MAC_SYSCALL", Const, 0}, + {"SYS_MADVISE", Const, 0}, + {"SYS_MADVISE1", Const, 0}, + {"SYS_MAXSYSCALL", Const, 0}, + {"SYS_MBIND", Const, 0}, + {"SYS_MIGRATE_PAGES", Const, 0}, + {"SYS_MINCORE", Const, 0}, + {"SYS_MINHERIT", Const, 0}, + {"SYS_MKCOMPLEX", Const, 0}, + {"SYS_MKDIR", Const, 0}, + {"SYS_MKDIRAT", Const, 0}, + {"SYS_MKDIR_EXTENDED", Const, 0}, + {"SYS_MKFIFO", Const, 0}, + {"SYS_MKFIFOAT", Const, 0}, + {"SYS_MKFIFO_EXTENDED", Const, 0}, + {"SYS_MKNOD", Const, 0}, + {"SYS_MKNODAT", Const, 0}, + {"SYS_MLOCK", Const, 0}, + {"SYS_MLOCKALL", Const, 0}, + {"SYS_MMAP", Const, 0}, + {"SYS_MMAP2", Const, 0}, + {"SYS_MODCTL", Const, 1}, + {"SYS_MODFIND", Const, 0}, + {"SYS_MODFNEXT", Const, 0}, + {"SYS_MODIFY_LDT", Const, 0}, + {"SYS_MODNEXT", Const, 0}, + {"SYS_MODSTAT", Const, 0}, + {"SYS_MODWATCH", Const, 0}, + {"SYS_MOUNT", Const, 0}, + {"SYS_MOVE_PAGES", Const, 0}, + {"SYS_MPROTECT", Const, 0}, + {"SYS_MPX", Const, 0}, + {"SYS_MQUERY", Const, 1}, + {"SYS_MQ_GETSETATTR", Const, 0}, + {"SYS_MQ_NOTIFY", Const, 0}, + {"SYS_MQ_OPEN", Const, 0}, + {"SYS_MQ_TIMEDRECEIVE", Const, 0}, + {"SYS_MQ_TIMEDSEND", Const, 0}, + {"SYS_MQ_UNLINK", Const, 0}, + {"SYS_MREMAP", Const, 0}, + {"SYS_MSGCTL", Const, 0}, + {"SYS_MSGGET", Const, 0}, + {"SYS_MSGRCV", Const, 0}, + {"SYS_MSGRCV_NOCANCEL", Const, 0}, + {"SYS_MSGSND", Const, 0}, + {"SYS_MSGSND_NOCANCEL", Const, 0}, + {"SYS_MSGSYS", Const, 0}, + {"SYS_MSYNC", Const, 0}, + {"SYS_MSYNC_NOCANCEL", Const, 0}, + {"SYS_MUNLOCK", Const, 0}, + {"SYS_MUNLOCKALL", Const, 0}, + {"SYS_MUNMAP", Const, 0}, + {"SYS_NAME_TO_HANDLE_AT", Const, 0}, + {"SYS_NANOSLEEP", Const, 0}, + {"SYS_NEWFSTATAT", Const, 0}, + {"SYS_NFSCLNT", Const, 0}, + {"SYS_NFSSERVCTL", Const, 0}, + {"SYS_NFSSVC", Const, 0}, + {"SYS_NFSTAT", Const, 0}, + {"SYS_NICE", Const, 0}, + {"SYS_NLM_SYSCALL", Const, 14}, + {"SYS_NLSTAT", Const, 0}, + {"SYS_NMOUNT", Const, 0}, + {"SYS_NSTAT", Const, 0}, + {"SYS_NTP_ADJTIME", Const, 0}, + {"SYS_NTP_GETTIME", Const, 0}, + {"SYS_NUMA_GETAFFINITY", Const, 14}, + {"SYS_NUMA_SETAFFINITY", Const, 14}, + {"SYS_OABI_SYSCALL_BASE", Const, 0}, + {"SYS_OBREAK", Const, 0}, + {"SYS_OLDFSTAT", Const, 0}, + {"SYS_OLDLSTAT", Const, 0}, + {"SYS_OLDOLDUNAME", Const, 0}, + {"SYS_OLDSTAT", Const, 0}, + {"SYS_OLDUNAME", Const, 0}, + {"SYS_OPEN", Const, 0}, + {"SYS_OPENAT", Const, 0}, + {"SYS_OPENBSD_POLL", Const, 0}, + {"SYS_OPEN_BY_HANDLE_AT", Const, 0}, + {"SYS_OPEN_DPROTECTED_NP", Const, 16}, + {"SYS_OPEN_EXTENDED", Const, 0}, + {"SYS_OPEN_NOCANCEL", Const, 0}, + {"SYS_OVADVISE", Const, 0}, + {"SYS_PACCEPT", Const, 1}, + {"SYS_PATHCONF", Const, 0}, + {"SYS_PAUSE", Const, 0}, + {"SYS_PCICONFIG_IOBASE", Const, 0}, + {"SYS_PCICONFIG_READ", Const, 0}, + {"SYS_PCICONFIG_WRITE", Const, 0}, + {"SYS_PDFORK", Const, 0}, + {"SYS_PDGETPID", Const, 0}, + {"SYS_PDKILL", Const, 0}, + {"SYS_PERF_EVENT_OPEN", Const, 0}, + {"SYS_PERSONALITY", Const, 0}, + {"SYS_PID_HIBERNATE", Const, 0}, + {"SYS_PID_RESUME", Const, 0}, + {"SYS_PID_SHUTDOWN_SOCKETS", Const, 0}, + {"SYS_PID_SUSPEND", Const, 0}, + {"SYS_PIPE", Const, 0}, + {"SYS_PIPE2", Const, 0}, + {"SYS_PIVOT_ROOT", Const, 0}, + {"SYS_PMC_CONTROL", Const, 1}, + {"SYS_PMC_GET_INFO", Const, 1}, + {"SYS_POLL", Const, 0}, + {"SYS_POLLTS", Const, 1}, + {"SYS_POLL_NOCANCEL", Const, 0}, + {"SYS_POSIX_FADVISE", Const, 0}, + {"SYS_POSIX_FALLOCATE", Const, 0}, + {"SYS_POSIX_OPENPT", Const, 0}, + {"SYS_POSIX_SPAWN", Const, 0}, + {"SYS_PPOLL", Const, 0}, + {"SYS_PRCTL", Const, 0}, + {"SYS_PREAD", Const, 0}, + {"SYS_PREAD64", Const, 0}, + {"SYS_PREADV", Const, 0}, + {"SYS_PREAD_NOCANCEL", Const, 0}, + {"SYS_PRLIMIT64", Const, 0}, + {"SYS_PROCCTL", Const, 3}, + {"SYS_PROCESS_POLICY", Const, 0}, + {"SYS_PROCESS_VM_READV", Const, 0}, + {"SYS_PROCESS_VM_WRITEV", Const, 0}, + {"SYS_PROC_INFO", Const, 0}, + {"SYS_PROF", Const, 0}, + {"SYS_PROFIL", Const, 0}, + {"SYS_PSELECT", Const, 0}, + {"SYS_PSELECT6", Const, 0}, + {"SYS_PSET_ASSIGN", Const, 1}, + {"SYS_PSET_CREATE", Const, 1}, + {"SYS_PSET_DESTROY", Const, 1}, + {"SYS_PSYNCH_CVBROAD", Const, 0}, + {"SYS_PSYNCH_CVCLRPREPOST", Const, 0}, + {"SYS_PSYNCH_CVSIGNAL", Const, 0}, + {"SYS_PSYNCH_CVWAIT", Const, 0}, + {"SYS_PSYNCH_MUTEXDROP", Const, 0}, + {"SYS_PSYNCH_MUTEXWAIT", Const, 0}, + {"SYS_PSYNCH_RW_DOWNGRADE", Const, 0}, + {"SYS_PSYNCH_RW_LONGRDLOCK", Const, 0}, + {"SYS_PSYNCH_RW_RDLOCK", Const, 0}, + {"SYS_PSYNCH_RW_UNLOCK", Const, 0}, + {"SYS_PSYNCH_RW_UNLOCK2", Const, 0}, + {"SYS_PSYNCH_RW_UPGRADE", Const, 0}, + {"SYS_PSYNCH_RW_WRLOCK", Const, 0}, + {"SYS_PSYNCH_RW_YIELDWRLOCK", Const, 0}, + {"SYS_PTRACE", Const, 0}, + {"SYS_PUTPMSG", Const, 0}, + {"SYS_PWRITE", Const, 0}, + {"SYS_PWRITE64", Const, 0}, + {"SYS_PWRITEV", Const, 0}, + {"SYS_PWRITE_NOCANCEL", Const, 0}, + {"SYS_QUERY_MODULE", Const, 0}, + {"SYS_QUOTACTL", Const, 0}, + {"SYS_RASCTL", Const, 1}, + {"SYS_RCTL_ADD_RULE", Const, 0}, + {"SYS_RCTL_GET_LIMITS", Const, 0}, + {"SYS_RCTL_GET_RACCT", Const, 0}, + {"SYS_RCTL_GET_RULES", Const, 0}, + {"SYS_RCTL_REMOVE_RULE", Const, 0}, + {"SYS_READ", Const, 0}, + {"SYS_READAHEAD", Const, 0}, + {"SYS_READDIR", Const, 0}, + {"SYS_READLINK", Const, 0}, + {"SYS_READLINKAT", Const, 0}, + {"SYS_READV", Const, 0}, + {"SYS_READV_NOCANCEL", Const, 0}, + {"SYS_READ_NOCANCEL", Const, 0}, + {"SYS_REBOOT", Const, 0}, + {"SYS_RECV", Const, 0}, + {"SYS_RECVFROM", Const, 0}, + {"SYS_RECVFROM_NOCANCEL", Const, 0}, + {"SYS_RECVMMSG", Const, 0}, + {"SYS_RECVMSG", Const, 0}, + {"SYS_RECVMSG_NOCANCEL", Const, 0}, + {"SYS_REMAP_FILE_PAGES", Const, 0}, + {"SYS_REMOVEXATTR", Const, 0}, + {"SYS_RENAME", Const, 0}, + {"SYS_RENAMEAT", Const, 0}, + {"SYS_REQUEST_KEY", Const, 0}, + {"SYS_RESTART_SYSCALL", Const, 0}, + {"SYS_REVOKE", Const, 0}, + {"SYS_RFORK", Const, 0}, + {"SYS_RMDIR", Const, 0}, + {"SYS_RTPRIO", Const, 0}, + {"SYS_RTPRIO_THREAD", Const, 0}, + {"SYS_RT_SIGACTION", Const, 0}, + {"SYS_RT_SIGPENDING", Const, 0}, + {"SYS_RT_SIGPROCMASK", Const, 0}, + {"SYS_RT_SIGQUEUEINFO", Const, 0}, + {"SYS_RT_SIGRETURN", Const, 0}, + {"SYS_RT_SIGSUSPEND", Const, 0}, + {"SYS_RT_SIGTIMEDWAIT", Const, 0}, + {"SYS_RT_TGSIGQUEUEINFO", Const, 0}, + {"SYS_SBRK", Const, 0}, + {"SYS_SCHED_GETAFFINITY", Const, 0}, + {"SYS_SCHED_GETPARAM", Const, 0}, + {"SYS_SCHED_GETSCHEDULER", Const, 0}, + {"SYS_SCHED_GET_PRIORITY_MAX", Const, 0}, + {"SYS_SCHED_GET_PRIORITY_MIN", Const, 0}, + {"SYS_SCHED_RR_GET_INTERVAL", Const, 0}, + {"SYS_SCHED_SETAFFINITY", Const, 0}, + {"SYS_SCHED_SETPARAM", Const, 0}, + {"SYS_SCHED_SETSCHEDULER", Const, 0}, + {"SYS_SCHED_YIELD", Const, 0}, + {"SYS_SCTP_GENERIC_RECVMSG", Const, 0}, + {"SYS_SCTP_GENERIC_SENDMSG", Const, 0}, + {"SYS_SCTP_GENERIC_SENDMSG_IOV", Const, 0}, + {"SYS_SCTP_PEELOFF", Const, 0}, + {"SYS_SEARCHFS", Const, 0}, + {"SYS_SECURITY", Const, 0}, + {"SYS_SELECT", Const, 0}, + {"SYS_SELECT_NOCANCEL", Const, 0}, + {"SYS_SEMCONFIG", Const, 1}, + {"SYS_SEMCTL", Const, 0}, + {"SYS_SEMGET", Const, 0}, + {"SYS_SEMOP", Const, 0}, + {"SYS_SEMSYS", Const, 0}, + {"SYS_SEMTIMEDOP", Const, 0}, + {"SYS_SEM_CLOSE", Const, 0}, + {"SYS_SEM_DESTROY", Const, 0}, + {"SYS_SEM_GETVALUE", Const, 0}, + {"SYS_SEM_INIT", Const, 0}, + {"SYS_SEM_OPEN", Const, 0}, + {"SYS_SEM_POST", Const, 0}, + {"SYS_SEM_TRYWAIT", Const, 0}, + {"SYS_SEM_UNLINK", Const, 0}, + {"SYS_SEM_WAIT", Const, 0}, + {"SYS_SEM_WAIT_NOCANCEL", Const, 0}, + {"SYS_SEND", Const, 0}, + {"SYS_SENDFILE", Const, 0}, + {"SYS_SENDFILE64", Const, 0}, + {"SYS_SENDMMSG", Const, 0}, + {"SYS_SENDMSG", Const, 0}, + {"SYS_SENDMSG_NOCANCEL", Const, 0}, + {"SYS_SENDTO", Const, 0}, + {"SYS_SENDTO_NOCANCEL", Const, 0}, + {"SYS_SETATTRLIST", Const, 0}, + {"SYS_SETAUDIT", Const, 0}, + {"SYS_SETAUDIT_ADDR", Const, 0}, + {"SYS_SETAUID", Const, 0}, + {"SYS_SETCONTEXT", Const, 0}, + {"SYS_SETDOMAINNAME", Const, 0}, + {"SYS_SETEGID", Const, 0}, + {"SYS_SETEUID", Const, 0}, + {"SYS_SETFIB", Const, 0}, + {"SYS_SETFSGID", Const, 0}, + {"SYS_SETFSGID32", Const, 0}, + {"SYS_SETFSUID", Const, 0}, + {"SYS_SETFSUID32", Const, 0}, + {"SYS_SETGID", Const, 0}, + {"SYS_SETGID32", Const, 0}, + {"SYS_SETGROUPS", Const, 0}, + {"SYS_SETGROUPS32", Const, 0}, + {"SYS_SETHOSTNAME", Const, 0}, + {"SYS_SETITIMER", Const, 0}, + {"SYS_SETLCID", Const, 0}, + {"SYS_SETLOGIN", Const, 0}, + {"SYS_SETLOGINCLASS", Const, 0}, + {"SYS_SETNS", Const, 0}, + {"SYS_SETPGID", Const, 0}, + {"SYS_SETPRIORITY", Const, 0}, + {"SYS_SETPRIVEXEC", Const, 0}, + {"SYS_SETREGID", Const, 0}, + {"SYS_SETREGID32", Const, 0}, + {"SYS_SETRESGID", Const, 0}, + {"SYS_SETRESGID32", Const, 0}, + {"SYS_SETRESUID", Const, 0}, + {"SYS_SETRESUID32", Const, 0}, + {"SYS_SETREUID", Const, 0}, + {"SYS_SETREUID32", Const, 0}, + {"SYS_SETRLIMIT", Const, 0}, + {"SYS_SETRTABLE", Const, 1}, + {"SYS_SETSGROUPS", Const, 0}, + {"SYS_SETSID", Const, 0}, + {"SYS_SETSOCKOPT", Const, 0}, + {"SYS_SETTID", Const, 0}, + {"SYS_SETTID_WITH_PID", Const, 0}, + {"SYS_SETTIMEOFDAY", Const, 0}, + {"SYS_SETUID", Const, 0}, + {"SYS_SETUID32", Const, 0}, + {"SYS_SETWGROUPS", Const, 0}, + {"SYS_SETXATTR", Const, 0}, + {"SYS_SET_MEMPOLICY", Const, 0}, + {"SYS_SET_ROBUST_LIST", Const, 0}, + {"SYS_SET_THREAD_AREA", Const, 0}, + {"SYS_SET_TID_ADDRESS", Const, 0}, + {"SYS_SGETMASK", Const, 0}, + {"SYS_SHARED_REGION_CHECK_NP", Const, 0}, + {"SYS_SHARED_REGION_MAP_AND_SLIDE_NP", Const, 0}, + {"SYS_SHMAT", Const, 0}, + {"SYS_SHMCTL", Const, 0}, + {"SYS_SHMDT", Const, 0}, + {"SYS_SHMGET", Const, 0}, + {"SYS_SHMSYS", Const, 0}, + {"SYS_SHM_OPEN", Const, 0}, + {"SYS_SHM_UNLINK", Const, 0}, + {"SYS_SHUTDOWN", Const, 0}, + {"SYS_SIGACTION", Const, 0}, + {"SYS_SIGALTSTACK", Const, 0}, + {"SYS_SIGNAL", Const, 0}, + {"SYS_SIGNALFD", Const, 0}, + {"SYS_SIGNALFD4", Const, 0}, + {"SYS_SIGPENDING", Const, 0}, + {"SYS_SIGPROCMASK", Const, 0}, + {"SYS_SIGQUEUE", Const, 0}, + {"SYS_SIGQUEUEINFO", Const, 1}, + {"SYS_SIGRETURN", Const, 0}, + {"SYS_SIGSUSPEND", Const, 0}, + {"SYS_SIGSUSPEND_NOCANCEL", Const, 0}, + {"SYS_SIGTIMEDWAIT", Const, 0}, + {"SYS_SIGWAIT", Const, 0}, + {"SYS_SIGWAITINFO", Const, 0}, + {"SYS_SOCKET", Const, 0}, + {"SYS_SOCKETCALL", Const, 0}, + {"SYS_SOCKETPAIR", Const, 0}, + {"SYS_SPLICE", Const, 0}, + {"SYS_SSETMASK", Const, 0}, + {"SYS_SSTK", Const, 0}, + {"SYS_STACK_SNAPSHOT", Const, 0}, + {"SYS_STAT", Const, 0}, + {"SYS_STAT64", Const, 0}, + {"SYS_STAT64_EXTENDED", Const, 0}, + {"SYS_STATFS", Const, 0}, + {"SYS_STATFS64", Const, 0}, + {"SYS_STATV", Const, 0}, + {"SYS_STATVFS1", Const, 1}, + {"SYS_STAT_EXTENDED", Const, 0}, + {"SYS_STIME", Const, 0}, + {"SYS_STTY", Const, 0}, + {"SYS_SWAPCONTEXT", Const, 0}, + {"SYS_SWAPCTL", Const, 1}, + {"SYS_SWAPOFF", Const, 0}, + {"SYS_SWAPON", Const, 0}, + {"SYS_SYMLINK", Const, 0}, + {"SYS_SYMLINKAT", Const, 0}, + {"SYS_SYNC", Const, 0}, + {"SYS_SYNCFS", Const, 0}, + {"SYS_SYNC_FILE_RANGE", Const, 0}, + {"SYS_SYSARCH", Const, 0}, + {"SYS_SYSCALL", Const, 0}, + {"SYS_SYSCALL_BASE", Const, 0}, + {"SYS_SYSFS", Const, 0}, + {"SYS_SYSINFO", Const, 0}, + {"SYS_SYSLOG", Const, 0}, + {"SYS_TEE", Const, 0}, + {"SYS_TGKILL", Const, 0}, + {"SYS_THREAD_SELFID", Const, 0}, + {"SYS_THR_CREATE", Const, 0}, + {"SYS_THR_EXIT", Const, 0}, + {"SYS_THR_KILL", Const, 0}, + {"SYS_THR_KILL2", Const, 0}, + {"SYS_THR_NEW", Const, 0}, + {"SYS_THR_SELF", Const, 0}, + {"SYS_THR_SET_NAME", Const, 0}, + {"SYS_THR_SUSPEND", Const, 0}, + {"SYS_THR_WAKE", Const, 0}, + {"SYS_TIME", Const, 0}, + {"SYS_TIMERFD_CREATE", Const, 0}, + {"SYS_TIMERFD_GETTIME", Const, 0}, + {"SYS_TIMERFD_SETTIME", Const, 0}, + {"SYS_TIMER_CREATE", Const, 0}, + {"SYS_TIMER_DELETE", Const, 0}, + {"SYS_TIMER_GETOVERRUN", Const, 0}, + {"SYS_TIMER_GETTIME", Const, 0}, + {"SYS_TIMER_SETTIME", Const, 0}, + {"SYS_TIMES", Const, 0}, + {"SYS_TKILL", Const, 0}, + {"SYS_TRUNCATE", Const, 0}, + {"SYS_TRUNCATE64", Const, 0}, + {"SYS_TUXCALL", Const, 0}, + {"SYS_UGETRLIMIT", Const, 0}, + {"SYS_ULIMIT", Const, 0}, + {"SYS_UMASK", Const, 0}, + {"SYS_UMASK_EXTENDED", Const, 0}, + {"SYS_UMOUNT", Const, 0}, + {"SYS_UMOUNT2", Const, 0}, + {"SYS_UNAME", Const, 0}, + {"SYS_UNDELETE", Const, 0}, + {"SYS_UNLINK", Const, 0}, + {"SYS_UNLINKAT", Const, 0}, + {"SYS_UNMOUNT", Const, 0}, + {"SYS_UNSHARE", Const, 0}, + {"SYS_USELIB", Const, 0}, + {"SYS_USTAT", Const, 0}, + {"SYS_UTIME", Const, 0}, + {"SYS_UTIMENSAT", Const, 0}, + {"SYS_UTIMES", Const, 0}, + {"SYS_UTRACE", Const, 0}, + {"SYS_UUIDGEN", Const, 0}, + {"SYS_VADVISE", Const, 1}, + {"SYS_VFORK", Const, 0}, + {"SYS_VHANGUP", Const, 0}, + {"SYS_VM86", Const, 0}, + {"SYS_VM86OLD", Const, 0}, + {"SYS_VMSPLICE", Const, 0}, + {"SYS_VM_PRESSURE_MONITOR", Const, 0}, + {"SYS_VSERVER", Const, 0}, + {"SYS_WAIT4", Const, 0}, + {"SYS_WAIT4_NOCANCEL", Const, 0}, + {"SYS_WAIT6", Const, 1}, + {"SYS_WAITEVENT", Const, 0}, + {"SYS_WAITID", Const, 0}, + {"SYS_WAITID_NOCANCEL", Const, 0}, + {"SYS_WAITPID", Const, 0}, + {"SYS_WATCHEVENT", Const, 0}, + {"SYS_WORKQ_KERNRETURN", Const, 0}, + {"SYS_WORKQ_OPEN", Const, 0}, + {"SYS_WRITE", Const, 0}, + {"SYS_WRITEV", Const, 0}, + {"SYS_WRITEV_NOCANCEL", Const, 0}, + {"SYS_WRITE_NOCANCEL", Const, 0}, + {"SYS_YIELD", Const, 0}, + {"SYS__LLSEEK", Const, 0}, + {"SYS__LWP_CONTINUE", Const, 1}, + {"SYS__LWP_CREATE", Const, 1}, + {"SYS__LWP_CTL", Const, 1}, + {"SYS__LWP_DETACH", Const, 1}, + {"SYS__LWP_EXIT", Const, 1}, + {"SYS__LWP_GETNAME", Const, 1}, + {"SYS__LWP_GETPRIVATE", Const, 1}, + {"SYS__LWP_KILL", Const, 1}, + {"SYS__LWP_PARK", Const, 1}, + {"SYS__LWP_SELF", Const, 1}, + {"SYS__LWP_SETNAME", Const, 1}, + {"SYS__LWP_SETPRIVATE", Const, 1}, + {"SYS__LWP_SUSPEND", Const, 1}, + {"SYS__LWP_UNPARK", Const, 1}, + {"SYS__LWP_UNPARK_ALL", Const, 1}, + {"SYS__LWP_WAIT", Const, 1}, + {"SYS__LWP_WAKEUP", Const, 1}, + {"SYS__NEWSELECT", Const, 0}, + {"SYS__PSET_BIND", Const, 1}, + {"SYS__SCHED_GETAFFINITY", Const, 1}, + {"SYS__SCHED_GETPARAM", Const, 1}, + {"SYS__SCHED_SETAFFINITY", Const, 1}, + {"SYS__SCHED_SETPARAM", Const, 1}, + {"SYS__SYSCTL", Const, 0}, + {"SYS__UMTX_LOCK", Const, 0}, + {"SYS__UMTX_OP", Const, 0}, + {"SYS__UMTX_UNLOCK", Const, 0}, + {"SYS___ACL_ACLCHECK_FD", Const, 0}, + {"SYS___ACL_ACLCHECK_FILE", Const, 0}, + {"SYS___ACL_ACLCHECK_LINK", Const, 0}, + {"SYS___ACL_DELETE_FD", Const, 0}, + {"SYS___ACL_DELETE_FILE", Const, 0}, + {"SYS___ACL_DELETE_LINK", Const, 0}, + {"SYS___ACL_GET_FD", Const, 0}, + {"SYS___ACL_GET_FILE", Const, 0}, + {"SYS___ACL_GET_LINK", Const, 0}, + {"SYS___ACL_SET_FD", Const, 0}, + {"SYS___ACL_SET_FILE", Const, 0}, + {"SYS___ACL_SET_LINK", Const, 0}, + {"SYS___CAP_RIGHTS_GET", Const, 14}, + {"SYS___CLONE", Const, 1}, + {"SYS___DISABLE_THREADSIGNAL", Const, 0}, + {"SYS___GETCWD", Const, 0}, + {"SYS___GETLOGIN", Const, 1}, + {"SYS___GET_TCB", Const, 1}, + {"SYS___MAC_EXECVE", Const, 0}, + {"SYS___MAC_GETFSSTAT", Const, 0}, + {"SYS___MAC_GET_FD", Const, 0}, + {"SYS___MAC_GET_FILE", Const, 0}, + {"SYS___MAC_GET_LCID", Const, 0}, + {"SYS___MAC_GET_LCTX", Const, 0}, + {"SYS___MAC_GET_LINK", Const, 0}, + {"SYS___MAC_GET_MOUNT", Const, 0}, + {"SYS___MAC_GET_PID", Const, 0}, + {"SYS___MAC_GET_PROC", Const, 0}, + {"SYS___MAC_MOUNT", Const, 0}, + {"SYS___MAC_SET_FD", Const, 0}, + {"SYS___MAC_SET_FILE", Const, 0}, + {"SYS___MAC_SET_LCTX", Const, 0}, + {"SYS___MAC_SET_LINK", Const, 0}, + {"SYS___MAC_SET_PROC", Const, 0}, + {"SYS___MAC_SYSCALL", Const, 0}, + {"SYS___OLD_SEMWAIT_SIGNAL", Const, 0}, + {"SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL", Const, 0}, + {"SYS___POSIX_CHOWN", Const, 1}, + {"SYS___POSIX_FCHOWN", Const, 1}, + {"SYS___POSIX_LCHOWN", Const, 1}, + {"SYS___POSIX_RENAME", Const, 1}, + {"SYS___PTHREAD_CANCELED", Const, 0}, + {"SYS___PTHREAD_CHDIR", Const, 0}, + {"SYS___PTHREAD_FCHDIR", Const, 0}, + {"SYS___PTHREAD_KILL", Const, 0}, + {"SYS___PTHREAD_MARKCANCEL", Const, 0}, + {"SYS___PTHREAD_SIGMASK", Const, 0}, + {"SYS___QUOTACTL", Const, 1}, + {"SYS___SEMCTL", Const, 1}, + {"SYS___SEMWAIT_SIGNAL", Const, 0}, + {"SYS___SEMWAIT_SIGNAL_NOCANCEL", Const, 0}, + {"SYS___SETLOGIN", Const, 1}, + {"SYS___SETUGID", Const, 0}, + {"SYS___SET_TCB", Const, 1}, + {"SYS___SIGACTION_SIGTRAMP", Const, 1}, + {"SYS___SIGTIMEDWAIT", Const, 1}, + {"SYS___SIGWAIT", Const, 0}, + {"SYS___SIGWAIT_NOCANCEL", Const, 0}, + {"SYS___SYSCTL", Const, 0}, + {"SYS___TFORK", Const, 1}, + {"SYS___THREXIT", Const, 1}, + {"SYS___THRSIGDIVERT", Const, 1}, + {"SYS___THRSLEEP", Const, 1}, + {"SYS___THRWAKEUP", Const, 1}, + {"S_ARCH1", Const, 1}, + {"S_ARCH2", Const, 1}, + {"S_BLKSIZE", Const, 0}, + {"S_IEXEC", Const, 0}, + {"S_IFBLK", Const, 0}, + {"S_IFCHR", Const, 0}, + {"S_IFDIR", Const, 0}, + {"S_IFIFO", Const, 0}, + {"S_IFLNK", Const, 0}, + {"S_IFMT", Const, 0}, + {"S_IFREG", Const, 0}, + {"S_IFSOCK", Const, 0}, + {"S_IFWHT", Const, 0}, + {"S_IREAD", Const, 0}, + {"S_IRGRP", Const, 0}, + {"S_IROTH", Const, 0}, + {"S_IRUSR", Const, 0}, + {"S_IRWXG", Const, 0}, + {"S_IRWXO", Const, 0}, + {"S_IRWXU", Const, 0}, + {"S_ISGID", Const, 0}, + {"S_ISTXT", Const, 0}, + {"S_ISUID", Const, 0}, + {"S_ISVTX", Const, 0}, + {"S_IWGRP", Const, 0}, + {"S_IWOTH", Const, 0}, + {"S_IWRITE", Const, 0}, + {"S_IWUSR", Const, 0}, + {"S_IXGRP", Const, 0}, + {"S_IXOTH", Const, 0}, + {"S_IXUSR", Const, 0}, + {"S_LOGIN_SET", Const, 1}, + {"SecurityAttributes", Type, 0}, + {"SecurityAttributes.InheritHandle", Field, 0}, + {"SecurityAttributes.Length", Field, 0}, + {"SecurityAttributes.SecurityDescriptor", Field, 0}, + {"Seek", Func, 0}, + {"Select", Func, 0}, + {"Sendfile", Func, 0}, + {"Sendmsg", Func, 0}, + {"SendmsgN", Func, 3}, + {"Sendto", Func, 0}, + {"Servent", Type, 0}, + {"Servent.Aliases", Field, 0}, + {"Servent.Name", Field, 0}, + {"Servent.Port", Field, 0}, + {"Servent.Proto", Field, 0}, + {"SetBpf", Func, 0}, + {"SetBpfBuflen", Func, 0}, + {"SetBpfDatalink", Func, 0}, + {"SetBpfHeadercmpl", Func, 0}, + {"SetBpfImmediate", Func, 0}, + {"SetBpfInterface", Func, 0}, + {"SetBpfPromisc", Func, 0}, + {"SetBpfTimeout", Func, 0}, + {"SetCurrentDirectory", Func, 0}, + {"SetEndOfFile", Func, 0}, + {"SetEnvironmentVariable", Func, 0}, + {"SetFileAttributes", Func, 0}, + {"SetFileCompletionNotificationModes", Func, 2}, + {"SetFilePointer", Func, 0}, + {"SetFileTime", Func, 0}, + {"SetHandleInformation", Func, 0}, + {"SetKevent", Func, 0}, + {"SetLsfPromisc", Func, 0}, + {"SetNonblock", Func, 0}, + {"Setdomainname", Func, 0}, + {"Setegid", Func, 0}, + {"Setenv", Func, 0}, + {"Seteuid", Func, 0}, + {"Setfsgid", Func, 0}, + {"Setfsuid", Func, 0}, + {"Setgid", Func, 0}, + {"Setgroups", Func, 0}, + {"Sethostname", Func, 0}, + {"Setlogin", Func, 0}, + {"Setpgid", Func, 0}, + {"Setpriority", Func, 0}, + {"Setprivexec", Func, 0}, + {"Setregid", Func, 0}, + {"Setresgid", Func, 0}, + {"Setresuid", Func, 0}, + {"Setreuid", Func, 0}, + {"Setrlimit", Func, 0}, + {"Setsid", Func, 0}, + {"Setsockopt", Func, 0}, + {"SetsockoptByte", Func, 0}, + {"SetsockoptICMPv6Filter", Func, 2}, + {"SetsockoptIPMreq", Func, 0}, + {"SetsockoptIPMreqn", Func, 0}, + {"SetsockoptIPv6Mreq", Func, 0}, + {"SetsockoptInet4Addr", Func, 0}, + {"SetsockoptInt", Func, 0}, + {"SetsockoptLinger", Func, 0}, + {"SetsockoptString", Func, 0}, + {"SetsockoptTimeval", Func, 0}, + {"Settimeofday", Func, 0}, + {"Setuid", Func, 0}, + {"Setxattr", Func, 1}, + {"Shutdown", Func, 0}, + {"SidTypeAlias", Const, 0}, + {"SidTypeComputer", Const, 0}, + {"SidTypeDeletedAccount", Const, 0}, + {"SidTypeDomain", Const, 0}, + {"SidTypeGroup", Const, 0}, + {"SidTypeInvalid", Const, 0}, + {"SidTypeLabel", Const, 0}, + {"SidTypeUnknown", Const, 0}, + {"SidTypeUser", Const, 0}, + {"SidTypeWellKnownGroup", Const, 0}, + {"Signal", Type, 0}, + {"SizeofBpfHdr", Const, 0}, + {"SizeofBpfInsn", Const, 0}, + {"SizeofBpfProgram", Const, 0}, + {"SizeofBpfStat", Const, 0}, + {"SizeofBpfVersion", Const, 0}, + {"SizeofBpfZbuf", Const, 0}, + {"SizeofBpfZbufHeader", Const, 0}, + {"SizeofCmsghdr", Const, 0}, + {"SizeofICMPv6Filter", Const, 2}, + {"SizeofIPMreq", Const, 0}, + {"SizeofIPMreqn", Const, 0}, + {"SizeofIPv6MTUInfo", Const, 2}, + {"SizeofIPv6Mreq", Const, 0}, + {"SizeofIfAddrmsg", Const, 0}, + {"SizeofIfAnnounceMsghdr", Const, 1}, + {"SizeofIfData", Const, 0}, + {"SizeofIfInfomsg", Const, 0}, + {"SizeofIfMsghdr", Const, 0}, + {"SizeofIfaMsghdr", Const, 0}, + {"SizeofIfmaMsghdr", Const, 0}, + {"SizeofIfmaMsghdr2", Const, 0}, + {"SizeofInet4Pktinfo", Const, 0}, + {"SizeofInet6Pktinfo", Const, 0}, + {"SizeofInotifyEvent", Const, 0}, + {"SizeofLinger", Const, 0}, + {"SizeofMsghdr", Const, 0}, + {"SizeofNlAttr", Const, 0}, + {"SizeofNlMsgerr", Const, 0}, + {"SizeofNlMsghdr", Const, 0}, + {"SizeofRtAttr", Const, 0}, + {"SizeofRtGenmsg", Const, 0}, + {"SizeofRtMetrics", Const, 0}, + {"SizeofRtMsg", Const, 0}, + {"SizeofRtMsghdr", Const, 0}, + {"SizeofRtNexthop", Const, 0}, + {"SizeofSockFilter", Const, 0}, + {"SizeofSockFprog", Const, 0}, + {"SizeofSockaddrAny", Const, 0}, + {"SizeofSockaddrDatalink", Const, 0}, + {"SizeofSockaddrInet4", Const, 0}, + {"SizeofSockaddrInet6", Const, 0}, + {"SizeofSockaddrLinklayer", Const, 0}, + {"SizeofSockaddrNetlink", Const, 0}, + {"SizeofSockaddrUnix", Const, 0}, + {"SizeofTCPInfo", Const, 1}, + {"SizeofUcred", Const, 0}, + {"SlicePtrFromStrings", Func, 1}, + {"SockFilter", Type, 0}, + {"SockFilter.Code", Field, 0}, + {"SockFilter.Jf", Field, 0}, + {"SockFilter.Jt", Field, 0}, + {"SockFilter.K", Field, 0}, + {"SockFprog", Type, 0}, + {"SockFprog.Filter", Field, 0}, + {"SockFprog.Len", Field, 0}, + {"SockFprog.Pad_cgo_0", Field, 0}, + {"Sockaddr", Type, 0}, + {"SockaddrDatalink", Type, 0}, + {"SockaddrDatalink.Alen", Field, 0}, + {"SockaddrDatalink.Data", Field, 0}, + {"SockaddrDatalink.Family", Field, 0}, + {"SockaddrDatalink.Index", Field, 0}, + {"SockaddrDatalink.Len", Field, 0}, + {"SockaddrDatalink.Nlen", Field, 0}, + {"SockaddrDatalink.Slen", Field, 0}, + {"SockaddrDatalink.Type", Field, 0}, + {"SockaddrGen", Type, 0}, + {"SockaddrInet4", Type, 0}, + {"SockaddrInet4.Addr", Field, 0}, + {"SockaddrInet4.Port", Field, 0}, + {"SockaddrInet6", Type, 0}, + {"SockaddrInet6.Addr", Field, 0}, + {"SockaddrInet6.Port", Field, 0}, + {"SockaddrInet6.ZoneId", Field, 0}, + {"SockaddrLinklayer", Type, 0}, + {"SockaddrLinklayer.Addr", Field, 0}, + {"SockaddrLinklayer.Halen", Field, 0}, + {"SockaddrLinklayer.Hatype", Field, 0}, + {"SockaddrLinklayer.Ifindex", Field, 0}, + {"SockaddrLinklayer.Pkttype", Field, 0}, + {"SockaddrLinklayer.Protocol", Field, 0}, + {"SockaddrNetlink", Type, 0}, + {"SockaddrNetlink.Family", Field, 0}, + {"SockaddrNetlink.Groups", Field, 0}, + {"SockaddrNetlink.Pad", Field, 0}, + {"SockaddrNetlink.Pid", Field, 0}, + {"SockaddrUnix", Type, 0}, + {"SockaddrUnix.Name", Field, 0}, + {"Socket", Func, 0}, + {"SocketControlMessage", Type, 0}, + {"SocketControlMessage.Data", Field, 0}, + {"SocketControlMessage.Header", Field, 0}, + {"SocketDisableIPv6", Var, 0}, + {"Socketpair", Func, 0}, + {"Splice", Func, 0}, + {"StartProcess", Func, 0}, + {"StartupInfo", Type, 0}, + {"StartupInfo.Cb", Field, 0}, + {"StartupInfo.Desktop", Field, 0}, + {"StartupInfo.FillAttribute", Field, 0}, + {"StartupInfo.Flags", Field, 0}, + {"StartupInfo.ShowWindow", Field, 0}, + {"StartupInfo.StdErr", Field, 0}, + {"StartupInfo.StdInput", Field, 0}, + {"StartupInfo.StdOutput", Field, 0}, + {"StartupInfo.Title", Field, 0}, + {"StartupInfo.X", Field, 0}, + {"StartupInfo.XCountChars", Field, 0}, + {"StartupInfo.XSize", Field, 0}, + {"StartupInfo.Y", Field, 0}, + {"StartupInfo.YCountChars", Field, 0}, + {"StartupInfo.YSize", Field, 0}, + {"Stat", Func, 0}, + {"Stat_t", Type, 0}, + {"Stat_t.Atim", Field, 0}, + {"Stat_t.Atim_ext", Field, 12}, + {"Stat_t.Atimespec", Field, 0}, + {"Stat_t.Birthtimespec", Field, 0}, + {"Stat_t.Blksize", Field, 0}, + {"Stat_t.Blocks", Field, 0}, + {"Stat_t.Btim_ext", Field, 12}, + {"Stat_t.Ctim", Field, 0}, + {"Stat_t.Ctim_ext", Field, 12}, + {"Stat_t.Ctimespec", Field, 0}, + {"Stat_t.Dev", Field, 0}, + {"Stat_t.Flags", Field, 0}, + {"Stat_t.Gen", Field, 0}, + {"Stat_t.Gid", Field, 0}, + {"Stat_t.Ino", Field, 0}, + {"Stat_t.Lspare", Field, 0}, + {"Stat_t.Lspare0", Field, 2}, + {"Stat_t.Lspare1", Field, 2}, + {"Stat_t.Mode", Field, 0}, + {"Stat_t.Mtim", Field, 0}, + {"Stat_t.Mtim_ext", Field, 12}, + {"Stat_t.Mtimespec", Field, 0}, + {"Stat_t.Nlink", Field, 0}, + {"Stat_t.Pad_cgo_0", Field, 0}, + {"Stat_t.Pad_cgo_1", Field, 0}, + {"Stat_t.Pad_cgo_2", Field, 0}, + {"Stat_t.Padding0", Field, 12}, + {"Stat_t.Padding1", Field, 12}, + {"Stat_t.Qspare", Field, 0}, + {"Stat_t.Rdev", Field, 0}, + {"Stat_t.Size", Field, 0}, + {"Stat_t.Spare", Field, 2}, + {"Stat_t.Uid", Field, 0}, + {"Stat_t.X__pad0", Field, 0}, + {"Stat_t.X__pad1", Field, 0}, + {"Stat_t.X__pad2", Field, 0}, + {"Stat_t.X__st_birthtim", Field, 2}, + {"Stat_t.X__st_ino", Field, 0}, + {"Stat_t.X__unused", Field, 0}, + {"Statfs", Func, 0}, + {"Statfs_t", Type, 0}, + {"Statfs_t.Asyncreads", Field, 0}, + {"Statfs_t.Asyncwrites", Field, 0}, + {"Statfs_t.Bavail", Field, 0}, + {"Statfs_t.Bfree", Field, 0}, + {"Statfs_t.Blocks", Field, 0}, + {"Statfs_t.Bsize", Field, 0}, + {"Statfs_t.Charspare", Field, 0}, + {"Statfs_t.F_asyncreads", Field, 2}, + {"Statfs_t.F_asyncwrites", Field, 2}, + {"Statfs_t.F_bavail", Field, 2}, + {"Statfs_t.F_bfree", Field, 2}, + {"Statfs_t.F_blocks", Field, 2}, + {"Statfs_t.F_bsize", Field, 2}, + {"Statfs_t.F_ctime", Field, 2}, + {"Statfs_t.F_favail", Field, 2}, + {"Statfs_t.F_ffree", Field, 2}, + {"Statfs_t.F_files", Field, 2}, + {"Statfs_t.F_flags", Field, 2}, + {"Statfs_t.F_fsid", Field, 2}, + {"Statfs_t.F_fstypename", Field, 2}, + {"Statfs_t.F_iosize", Field, 2}, + {"Statfs_t.F_mntfromname", Field, 2}, + {"Statfs_t.F_mntfromspec", Field, 3}, + {"Statfs_t.F_mntonname", Field, 2}, + {"Statfs_t.F_namemax", Field, 2}, + {"Statfs_t.F_owner", Field, 2}, + {"Statfs_t.F_spare", Field, 2}, + {"Statfs_t.F_syncreads", Field, 2}, + {"Statfs_t.F_syncwrites", Field, 2}, + {"Statfs_t.Ffree", Field, 0}, + {"Statfs_t.Files", Field, 0}, + {"Statfs_t.Flags", Field, 0}, + {"Statfs_t.Frsize", Field, 0}, + {"Statfs_t.Fsid", Field, 0}, + {"Statfs_t.Fssubtype", Field, 0}, + {"Statfs_t.Fstypename", Field, 0}, + {"Statfs_t.Iosize", Field, 0}, + {"Statfs_t.Mntfromname", Field, 0}, + {"Statfs_t.Mntonname", Field, 0}, + {"Statfs_t.Mount_info", Field, 2}, + {"Statfs_t.Namelen", Field, 0}, + {"Statfs_t.Namemax", Field, 0}, + {"Statfs_t.Owner", Field, 0}, + {"Statfs_t.Pad_cgo_0", Field, 0}, + {"Statfs_t.Pad_cgo_1", Field, 2}, + {"Statfs_t.Reserved", Field, 0}, + {"Statfs_t.Spare", Field, 0}, + {"Statfs_t.Syncreads", Field, 0}, + {"Statfs_t.Syncwrites", Field, 0}, + {"Statfs_t.Type", Field, 0}, + {"Statfs_t.Version", Field, 0}, + {"Stderr", Var, 0}, + {"Stdin", Var, 0}, + {"Stdout", Var, 0}, + {"StringBytePtr", Func, 0}, + {"StringByteSlice", Func, 0}, + {"StringSlicePtr", Func, 0}, + {"StringToSid", Func, 0}, + {"StringToUTF16", Func, 0}, + {"StringToUTF16Ptr", Func, 0}, + {"Symlink", Func, 0}, + {"Sync", Func, 0}, + {"SyncFileRange", Func, 0}, + {"SysProcAttr", Type, 0}, + {"SysProcAttr.AdditionalInheritedHandles", Field, 17}, + {"SysProcAttr.AmbientCaps", Field, 9}, + {"SysProcAttr.CgroupFD", Field, 20}, + {"SysProcAttr.Chroot", Field, 0}, + {"SysProcAttr.Cloneflags", Field, 2}, + {"SysProcAttr.CmdLine", Field, 0}, + {"SysProcAttr.CreationFlags", Field, 1}, + {"SysProcAttr.Credential", Field, 0}, + {"SysProcAttr.Ctty", Field, 1}, + {"SysProcAttr.Foreground", Field, 5}, + {"SysProcAttr.GidMappings", Field, 4}, + {"SysProcAttr.GidMappingsEnableSetgroups", Field, 5}, + {"SysProcAttr.HideWindow", Field, 0}, + {"SysProcAttr.Jail", Field, 21}, + {"SysProcAttr.NoInheritHandles", Field, 16}, + {"SysProcAttr.Noctty", Field, 0}, + {"SysProcAttr.ParentProcess", Field, 17}, + {"SysProcAttr.Pdeathsig", Field, 0}, + {"SysProcAttr.Pgid", Field, 5}, + {"SysProcAttr.PidFD", Field, 22}, + {"SysProcAttr.ProcessAttributes", Field, 13}, + {"SysProcAttr.Ptrace", Field, 0}, + {"SysProcAttr.Setctty", Field, 0}, + {"SysProcAttr.Setpgid", Field, 0}, + {"SysProcAttr.Setsid", Field, 0}, + {"SysProcAttr.ThreadAttributes", Field, 13}, + {"SysProcAttr.Token", Field, 10}, + {"SysProcAttr.UidMappings", Field, 4}, + {"SysProcAttr.Unshareflags", Field, 7}, + {"SysProcAttr.UseCgroupFD", Field, 20}, + {"SysProcIDMap", Type, 4}, + {"SysProcIDMap.ContainerID", Field, 4}, + {"SysProcIDMap.HostID", Field, 4}, + {"SysProcIDMap.Size", Field, 4}, + {"Syscall", Func, 0}, + {"Syscall12", Func, 0}, + {"Syscall15", Func, 0}, + {"Syscall18", Func, 12}, + {"Syscall6", Func, 0}, + {"Syscall9", Func, 0}, + {"SyscallN", Func, 18}, + {"Sysctl", Func, 0}, + {"SysctlUint32", Func, 0}, + {"Sysctlnode", Type, 2}, + {"Sysctlnode.Flags", Field, 2}, + {"Sysctlnode.Name", Field, 2}, + {"Sysctlnode.Num", Field, 2}, + {"Sysctlnode.Un", Field, 2}, + {"Sysctlnode.Ver", Field, 2}, + {"Sysctlnode.X__rsvd", Field, 2}, + {"Sysctlnode.X_sysctl_desc", Field, 2}, + {"Sysctlnode.X_sysctl_func", Field, 2}, + {"Sysctlnode.X_sysctl_parent", Field, 2}, + {"Sysctlnode.X_sysctl_size", Field, 2}, + {"Sysinfo", Func, 0}, + {"Sysinfo_t", Type, 0}, + {"Sysinfo_t.Bufferram", Field, 0}, + {"Sysinfo_t.Freehigh", Field, 0}, + {"Sysinfo_t.Freeram", Field, 0}, + {"Sysinfo_t.Freeswap", Field, 0}, + {"Sysinfo_t.Loads", Field, 0}, + {"Sysinfo_t.Pad", Field, 0}, + {"Sysinfo_t.Pad_cgo_0", Field, 0}, + {"Sysinfo_t.Pad_cgo_1", Field, 0}, + {"Sysinfo_t.Procs", Field, 0}, + {"Sysinfo_t.Sharedram", Field, 0}, + {"Sysinfo_t.Totalhigh", Field, 0}, + {"Sysinfo_t.Totalram", Field, 0}, + {"Sysinfo_t.Totalswap", Field, 0}, + {"Sysinfo_t.Unit", Field, 0}, + {"Sysinfo_t.Uptime", Field, 0}, + {"Sysinfo_t.X_f", Field, 0}, + {"Systemtime", Type, 0}, + {"Systemtime.Day", Field, 0}, + {"Systemtime.DayOfWeek", Field, 0}, + {"Systemtime.Hour", Field, 0}, + {"Systemtime.Milliseconds", Field, 0}, + {"Systemtime.Minute", Field, 0}, + {"Systemtime.Month", Field, 0}, + {"Systemtime.Second", Field, 0}, + {"Systemtime.Year", Field, 0}, + {"TCGETS", Const, 0}, + {"TCIFLUSH", Const, 1}, + {"TCIOFLUSH", Const, 1}, + {"TCOFLUSH", Const, 1}, + {"TCPInfo", Type, 1}, + {"TCPInfo.Advmss", Field, 1}, + {"TCPInfo.Ato", Field, 1}, + {"TCPInfo.Backoff", Field, 1}, + {"TCPInfo.Ca_state", Field, 1}, + {"TCPInfo.Fackets", Field, 1}, + {"TCPInfo.Last_ack_recv", Field, 1}, + {"TCPInfo.Last_ack_sent", Field, 1}, + {"TCPInfo.Last_data_recv", Field, 1}, + {"TCPInfo.Last_data_sent", Field, 1}, + {"TCPInfo.Lost", Field, 1}, + {"TCPInfo.Options", Field, 1}, + {"TCPInfo.Pad_cgo_0", Field, 1}, + {"TCPInfo.Pmtu", Field, 1}, + {"TCPInfo.Probes", Field, 1}, + {"TCPInfo.Rcv_mss", Field, 1}, + {"TCPInfo.Rcv_rtt", Field, 1}, + {"TCPInfo.Rcv_space", Field, 1}, + {"TCPInfo.Rcv_ssthresh", Field, 1}, + {"TCPInfo.Reordering", Field, 1}, + {"TCPInfo.Retrans", Field, 1}, + {"TCPInfo.Retransmits", Field, 1}, + {"TCPInfo.Rto", Field, 1}, + {"TCPInfo.Rtt", Field, 1}, + {"TCPInfo.Rttvar", Field, 1}, + {"TCPInfo.Sacked", Field, 1}, + {"TCPInfo.Snd_cwnd", Field, 1}, + {"TCPInfo.Snd_mss", Field, 1}, + {"TCPInfo.Snd_ssthresh", Field, 1}, + {"TCPInfo.State", Field, 1}, + {"TCPInfo.Total_retrans", Field, 1}, + {"TCPInfo.Unacked", Field, 1}, + {"TCPKeepalive", Type, 3}, + {"TCPKeepalive.Interval", Field, 3}, + {"TCPKeepalive.OnOff", Field, 3}, + {"TCPKeepalive.Time", Field, 3}, + {"TCP_CA_NAME_MAX", Const, 0}, + {"TCP_CONGCTL", Const, 1}, + {"TCP_CONGESTION", Const, 0}, + {"TCP_CONNECTIONTIMEOUT", Const, 0}, + {"TCP_CORK", Const, 0}, + {"TCP_DEFER_ACCEPT", Const, 0}, + {"TCP_ENABLE_ECN", Const, 16}, + {"TCP_INFO", Const, 0}, + {"TCP_KEEPALIVE", Const, 0}, + {"TCP_KEEPCNT", Const, 0}, + {"TCP_KEEPIDLE", Const, 0}, + {"TCP_KEEPINIT", Const, 1}, + {"TCP_KEEPINTVL", Const, 0}, + {"TCP_LINGER2", Const, 0}, + {"TCP_MAXBURST", Const, 0}, + {"TCP_MAXHLEN", Const, 0}, + {"TCP_MAXOLEN", Const, 0}, + {"TCP_MAXSEG", Const, 0}, + {"TCP_MAXWIN", Const, 0}, + {"TCP_MAX_SACK", Const, 0}, + {"TCP_MAX_WINSHIFT", Const, 0}, + {"TCP_MD5SIG", Const, 0}, + {"TCP_MD5SIG_MAXKEYLEN", Const, 0}, + {"TCP_MINMSS", Const, 0}, + {"TCP_MINMSSOVERLOAD", Const, 0}, + {"TCP_MSS", Const, 0}, + {"TCP_NODELAY", Const, 0}, + {"TCP_NOOPT", Const, 0}, + {"TCP_NOPUSH", Const, 0}, + {"TCP_NOTSENT_LOWAT", Const, 16}, + {"TCP_NSTATES", Const, 1}, + {"TCP_QUICKACK", Const, 0}, + {"TCP_RXT_CONNDROPTIME", Const, 0}, + {"TCP_RXT_FINDROP", Const, 0}, + {"TCP_SACK_ENABLE", Const, 1}, + {"TCP_SENDMOREACKS", Const, 16}, + {"TCP_SYNCNT", Const, 0}, + {"TCP_VENDOR", Const, 3}, + {"TCP_WINDOW_CLAMP", Const, 0}, + {"TCSAFLUSH", Const, 1}, + {"TCSETS", Const, 0}, + {"TF_DISCONNECT", Const, 0}, + {"TF_REUSE_SOCKET", Const, 0}, + {"TF_USE_DEFAULT_WORKER", Const, 0}, + {"TF_USE_KERNEL_APC", Const, 0}, + {"TF_USE_SYSTEM_THREAD", Const, 0}, + {"TF_WRITE_BEHIND", Const, 0}, + {"TH32CS_INHERIT", Const, 4}, + {"TH32CS_SNAPALL", Const, 4}, + {"TH32CS_SNAPHEAPLIST", Const, 4}, + {"TH32CS_SNAPMODULE", Const, 4}, + {"TH32CS_SNAPMODULE32", Const, 4}, + {"TH32CS_SNAPPROCESS", Const, 4}, + {"TH32CS_SNAPTHREAD", Const, 4}, + {"TIME_ZONE_ID_DAYLIGHT", Const, 0}, + {"TIME_ZONE_ID_STANDARD", Const, 0}, + {"TIME_ZONE_ID_UNKNOWN", Const, 0}, + {"TIOCCBRK", Const, 0}, + {"TIOCCDTR", Const, 0}, + {"TIOCCONS", Const, 0}, + {"TIOCDCDTIMESTAMP", Const, 0}, + {"TIOCDRAIN", Const, 0}, + {"TIOCDSIMICROCODE", Const, 0}, + {"TIOCEXCL", Const, 0}, + {"TIOCEXT", Const, 0}, + {"TIOCFLAG_CDTRCTS", Const, 1}, + {"TIOCFLAG_CLOCAL", Const, 1}, + {"TIOCFLAG_CRTSCTS", Const, 1}, + {"TIOCFLAG_MDMBUF", Const, 1}, + {"TIOCFLAG_PPS", Const, 1}, + {"TIOCFLAG_SOFTCAR", Const, 1}, + {"TIOCFLUSH", Const, 0}, + {"TIOCGDEV", Const, 0}, + {"TIOCGDRAINWAIT", Const, 0}, + {"TIOCGETA", Const, 0}, + {"TIOCGETD", Const, 0}, + {"TIOCGFLAGS", Const, 1}, + {"TIOCGICOUNT", Const, 0}, + {"TIOCGLCKTRMIOS", Const, 0}, + {"TIOCGLINED", Const, 1}, + {"TIOCGPGRP", Const, 0}, + {"TIOCGPTN", Const, 0}, + {"TIOCGQSIZE", Const, 1}, + {"TIOCGRANTPT", Const, 1}, + {"TIOCGRS485", Const, 0}, + {"TIOCGSERIAL", Const, 0}, + {"TIOCGSID", Const, 0}, + {"TIOCGSIZE", Const, 1}, + {"TIOCGSOFTCAR", Const, 0}, + {"TIOCGTSTAMP", Const, 1}, + {"TIOCGWINSZ", Const, 0}, + {"TIOCINQ", Const, 0}, + {"TIOCIXOFF", Const, 0}, + {"TIOCIXON", Const, 0}, + {"TIOCLINUX", Const, 0}, + {"TIOCMBIC", Const, 0}, + {"TIOCMBIS", Const, 0}, + {"TIOCMGDTRWAIT", Const, 0}, + {"TIOCMGET", Const, 0}, + {"TIOCMIWAIT", Const, 0}, + {"TIOCMODG", Const, 0}, + {"TIOCMODS", Const, 0}, + {"TIOCMSDTRWAIT", Const, 0}, + {"TIOCMSET", Const, 0}, + {"TIOCM_CAR", Const, 0}, + {"TIOCM_CD", Const, 0}, + {"TIOCM_CTS", Const, 0}, + {"TIOCM_DCD", Const, 0}, + {"TIOCM_DSR", Const, 0}, + {"TIOCM_DTR", Const, 0}, + {"TIOCM_LE", Const, 0}, + {"TIOCM_RI", Const, 0}, + {"TIOCM_RNG", Const, 0}, + {"TIOCM_RTS", Const, 0}, + {"TIOCM_SR", Const, 0}, + {"TIOCM_ST", Const, 0}, + {"TIOCNOTTY", Const, 0}, + {"TIOCNXCL", Const, 0}, + {"TIOCOUTQ", Const, 0}, + {"TIOCPKT", Const, 0}, + {"TIOCPKT_DATA", Const, 0}, + {"TIOCPKT_DOSTOP", Const, 0}, + {"TIOCPKT_FLUSHREAD", Const, 0}, + {"TIOCPKT_FLUSHWRITE", Const, 0}, + {"TIOCPKT_IOCTL", Const, 0}, + {"TIOCPKT_NOSTOP", Const, 0}, + {"TIOCPKT_START", Const, 0}, + {"TIOCPKT_STOP", Const, 0}, + {"TIOCPTMASTER", Const, 0}, + {"TIOCPTMGET", Const, 1}, + {"TIOCPTSNAME", Const, 1}, + {"TIOCPTYGNAME", Const, 0}, + {"TIOCPTYGRANT", Const, 0}, + {"TIOCPTYUNLK", Const, 0}, + {"TIOCRCVFRAME", Const, 1}, + {"TIOCREMOTE", Const, 0}, + {"TIOCSBRK", Const, 0}, + {"TIOCSCONS", Const, 0}, + {"TIOCSCTTY", Const, 0}, + {"TIOCSDRAINWAIT", Const, 0}, + {"TIOCSDTR", Const, 0}, + {"TIOCSERCONFIG", Const, 0}, + {"TIOCSERGETLSR", Const, 0}, + {"TIOCSERGETMULTI", Const, 0}, + {"TIOCSERGSTRUCT", Const, 0}, + {"TIOCSERGWILD", Const, 0}, + {"TIOCSERSETMULTI", Const, 0}, + {"TIOCSERSWILD", Const, 0}, + {"TIOCSER_TEMT", Const, 0}, + {"TIOCSETA", Const, 0}, + {"TIOCSETAF", Const, 0}, + {"TIOCSETAW", Const, 0}, + {"TIOCSETD", Const, 0}, + {"TIOCSFLAGS", Const, 1}, + {"TIOCSIG", Const, 0}, + {"TIOCSLCKTRMIOS", Const, 0}, + {"TIOCSLINED", Const, 1}, + {"TIOCSPGRP", Const, 0}, + {"TIOCSPTLCK", Const, 0}, + {"TIOCSQSIZE", Const, 1}, + {"TIOCSRS485", Const, 0}, + {"TIOCSSERIAL", Const, 0}, + {"TIOCSSIZE", Const, 1}, + {"TIOCSSOFTCAR", Const, 0}, + {"TIOCSTART", Const, 0}, + {"TIOCSTAT", Const, 0}, + {"TIOCSTI", Const, 0}, + {"TIOCSTOP", Const, 0}, + {"TIOCSTSTAMP", Const, 1}, + {"TIOCSWINSZ", Const, 0}, + {"TIOCTIMESTAMP", Const, 0}, + {"TIOCUCNTL", Const, 0}, + {"TIOCVHANGUP", Const, 0}, + {"TIOCXMTFRAME", Const, 1}, + {"TOKEN_ADJUST_DEFAULT", Const, 0}, + {"TOKEN_ADJUST_GROUPS", Const, 0}, + {"TOKEN_ADJUST_PRIVILEGES", Const, 0}, + {"TOKEN_ADJUST_SESSIONID", Const, 11}, + {"TOKEN_ALL_ACCESS", Const, 0}, + {"TOKEN_ASSIGN_PRIMARY", Const, 0}, + {"TOKEN_DUPLICATE", Const, 0}, + {"TOKEN_EXECUTE", Const, 0}, + {"TOKEN_IMPERSONATE", Const, 0}, + {"TOKEN_QUERY", Const, 0}, + {"TOKEN_QUERY_SOURCE", Const, 0}, + {"TOKEN_READ", Const, 0}, + {"TOKEN_WRITE", Const, 0}, + {"TOSTOP", Const, 0}, + {"TRUNCATE_EXISTING", Const, 0}, + {"TUNATTACHFILTER", Const, 0}, + {"TUNDETACHFILTER", Const, 0}, + {"TUNGETFEATURES", Const, 0}, + {"TUNGETIFF", Const, 0}, + {"TUNGETSNDBUF", Const, 0}, + {"TUNGETVNETHDRSZ", Const, 0}, + {"TUNSETDEBUG", Const, 0}, + {"TUNSETGROUP", Const, 0}, + {"TUNSETIFF", Const, 0}, + {"TUNSETLINK", Const, 0}, + {"TUNSETNOCSUM", Const, 0}, + {"TUNSETOFFLOAD", Const, 0}, + {"TUNSETOWNER", Const, 0}, + {"TUNSETPERSIST", Const, 0}, + {"TUNSETSNDBUF", Const, 0}, + {"TUNSETTXFILTER", Const, 0}, + {"TUNSETVNETHDRSZ", Const, 0}, + {"Tee", Func, 0}, + {"TerminateProcess", Func, 0}, + {"Termios", Type, 0}, + {"Termios.Cc", Field, 0}, + {"Termios.Cflag", Field, 0}, + {"Termios.Iflag", Field, 0}, + {"Termios.Ispeed", Field, 0}, + {"Termios.Lflag", Field, 0}, + {"Termios.Line", Field, 0}, + {"Termios.Oflag", Field, 0}, + {"Termios.Ospeed", Field, 0}, + {"Termios.Pad_cgo_0", Field, 0}, + {"Tgkill", Func, 0}, + {"Time", Func, 0}, + {"Time_t", Type, 0}, + {"Times", Func, 0}, + {"Timespec", Type, 0}, + {"Timespec.Nsec", Field, 0}, + {"Timespec.Pad_cgo_0", Field, 2}, + {"Timespec.Sec", Field, 0}, + {"TimespecToNsec", Func, 0}, + {"Timeval", Type, 0}, + {"Timeval.Pad_cgo_0", Field, 0}, + {"Timeval.Sec", Field, 0}, + {"Timeval.Usec", Field, 0}, + {"Timeval32", Type, 0}, + {"Timeval32.Sec", Field, 0}, + {"Timeval32.Usec", Field, 0}, + {"TimevalToNsec", Func, 0}, + {"Timex", Type, 0}, + {"Timex.Calcnt", Field, 0}, + {"Timex.Constant", Field, 0}, + {"Timex.Errcnt", Field, 0}, + {"Timex.Esterror", Field, 0}, + {"Timex.Freq", Field, 0}, + {"Timex.Jitcnt", Field, 0}, + {"Timex.Jitter", Field, 0}, + {"Timex.Maxerror", Field, 0}, + {"Timex.Modes", Field, 0}, + {"Timex.Offset", Field, 0}, + {"Timex.Pad_cgo_0", Field, 0}, + {"Timex.Pad_cgo_1", Field, 0}, + {"Timex.Pad_cgo_2", Field, 0}, + {"Timex.Pad_cgo_3", Field, 0}, + {"Timex.Ppsfreq", Field, 0}, + {"Timex.Precision", Field, 0}, + {"Timex.Shift", Field, 0}, + {"Timex.Stabil", Field, 0}, + {"Timex.Status", Field, 0}, + {"Timex.Stbcnt", Field, 0}, + {"Timex.Tai", Field, 0}, + {"Timex.Tick", Field, 0}, + {"Timex.Time", Field, 0}, + {"Timex.Tolerance", Field, 0}, + {"Timezoneinformation", Type, 0}, + {"Timezoneinformation.Bias", Field, 0}, + {"Timezoneinformation.DaylightBias", Field, 0}, + {"Timezoneinformation.DaylightDate", Field, 0}, + {"Timezoneinformation.DaylightName", Field, 0}, + {"Timezoneinformation.StandardBias", Field, 0}, + {"Timezoneinformation.StandardDate", Field, 0}, + {"Timezoneinformation.StandardName", Field, 0}, + {"Tms", Type, 0}, + {"Tms.Cstime", Field, 0}, + {"Tms.Cutime", Field, 0}, + {"Tms.Stime", Field, 0}, + {"Tms.Utime", Field, 0}, + {"Token", Type, 0}, + {"TokenAccessInformation", Const, 0}, + {"TokenAuditPolicy", Const, 0}, + {"TokenDefaultDacl", Const, 0}, + {"TokenElevation", Const, 0}, + {"TokenElevationType", Const, 0}, + {"TokenGroups", Const, 0}, + {"TokenGroupsAndPrivileges", Const, 0}, + {"TokenHasRestrictions", Const, 0}, + {"TokenImpersonationLevel", Const, 0}, + {"TokenIntegrityLevel", Const, 0}, + {"TokenLinkedToken", Const, 0}, + {"TokenLogonSid", Const, 0}, + {"TokenMandatoryPolicy", Const, 0}, + {"TokenOrigin", Const, 0}, + {"TokenOwner", Const, 0}, + {"TokenPrimaryGroup", Const, 0}, + {"TokenPrivileges", Const, 0}, + {"TokenRestrictedSids", Const, 0}, + {"TokenSandBoxInert", Const, 0}, + {"TokenSessionId", Const, 0}, + {"TokenSessionReference", Const, 0}, + {"TokenSource", Const, 0}, + {"TokenStatistics", Const, 0}, + {"TokenType", Const, 0}, + {"TokenUIAccess", Const, 0}, + {"TokenUser", Const, 0}, + {"TokenVirtualizationAllowed", Const, 0}, + {"TokenVirtualizationEnabled", Const, 0}, + {"Tokenprimarygroup", Type, 0}, + {"Tokenprimarygroup.PrimaryGroup", Field, 0}, + {"Tokenuser", Type, 0}, + {"Tokenuser.User", Field, 0}, + {"TranslateAccountName", Func, 0}, + {"TranslateName", Func, 0}, + {"TransmitFile", Func, 0}, + {"TransmitFileBuffers", Type, 0}, + {"TransmitFileBuffers.Head", Field, 0}, + {"TransmitFileBuffers.HeadLength", Field, 0}, + {"TransmitFileBuffers.Tail", Field, 0}, + {"TransmitFileBuffers.TailLength", Field, 0}, + {"Truncate", Func, 0}, + {"UNIX_PATH_MAX", Const, 12}, + {"USAGE_MATCH_TYPE_AND", Const, 0}, + {"USAGE_MATCH_TYPE_OR", Const, 0}, + {"UTF16FromString", Func, 1}, + {"UTF16PtrFromString", Func, 1}, + {"UTF16ToString", Func, 0}, + {"Ucred", Type, 0}, + {"Ucred.Gid", Field, 0}, + {"Ucred.Pid", Field, 0}, + {"Ucred.Uid", Field, 0}, + {"Umask", Func, 0}, + {"Uname", Func, 0}, + {"Undelete", Func, 0}, + {"UnixCredentials", Func, 0}, + {"UnixRights", Func, 0}, + {"Unlink", Func, 0}, + {"Unlinkat", Func, 0}, + {"UnmapViewOfFile", Func, 0}, + {"Unmount", Func, 0}, + {"Unsetenv", Func, 4}, + {"Unshare", Func, 0}, + {"UserInfo10", Type, 0}, + {"UserInfo10.Comment", Field, 0}, + {"UserInfo10.FullName", Field, 0}, + {"UserInfo10.Name", Field, 0}, + {"UserInfo10.UsrComment", Field, 0}, + {"Ustat", Func, 0}, + {"Ustat_t", Type, 0}, + {"Ustat_t.Fname", Field, 0}, + {"Ustat_t.Fpack", Field, 0}, + {"Ustat_t.Pad_cgo_0", Field, 0}, + {"Ustat_t.Pad_cgo_1", Field, 0}, + {"Ustat_t.Tfree", Field, 0}, + {"Ustat_t.Tinode", Field, 0}, + {"Utimbuf", Type, 0}, + {"Utimbuf.Actime", Field, 0}, + {"Utimbuf.Modtime", Field, 0}, + {"Utime", Func, 0}, + {"Utimes", Func, 0}, + {"UtimesNano", Func, 1}, + {"Utsname", Type, 0}, + {"Utsname.Domainname", Field, 0}, + {"Utsname.Machine", Field, 0}, + {"Utsname.Nodename", Field, 0}, + {"Utsname.Release", Field, 0}, + {"Utsname.Sysname", Field, 0}, + {"Utsname.Version", Field, 0}, + {"VDISCARD", Const, 0}, + {"VDSUSP", Const, 1}, + {"VEOF", Const, 0}, + {"VEOL", Const, 0}, + {"VEOL2", Const, 0}, + {"VERASE", Const, 0}, + {"VERASE2", Const, 1}, + {"VINTR", Const, 0}, + {"VKILL", Const, 0}, + {"VLNEXT", Const, 0}, + {"VMIN", Const, 0}, + {"VQUIT", Const, 0}, + {"VREPRINT", Const, 0}, + {"VSTART", Const, 0}, + {"VSTATUS", Const, 1}, + {"VSTOP", Const, 0}, + {"VSUSP", Const, 0}, + {"VSWTC", Const, 0}, + {"VT0", Const, 1}, + {"VT1", Const, 1}, + {"VTDLY", Const, 1}, + {"VTIME", Const, 0}, + {"VWERASE", Const, 0}, + {"VirtualLock", Func, 0}, + {"VirtualUnlock", Func, 0}, + {"WAIT_ABANDONED", Const, 0}, + {"WAIT_FAILED", Const, 0}, + {"WAIT_OBJECT_0", Const, 0}, + {"WAIT_TIMEOUT", Const, 0}, + {"WALL", Const, 0}, + {"WALLSIG", Const, 1}, + {"WALTSIG", Const, 1}, + {"WCLONE", Const, 0}, + {"WCONTINUED", Const, 0}, + {"WCOREFLAG", Const, 0}, + {"WEXITED", Const, 0}, + {"WLINUXCLONE", Const, 0}, + {"WNOHANG", Const, 0}, + {"WNOTHREAD", Const, 0}, + {"WNOWAIT", Const, 0}, + {"WNOZOMBIE", Const, 1}, + {"WOPTSCHECKED", Const, 1}, + {"WORDSIZE", Const, 0}, + {"WSABuf", Type, 0}, + {"WSABuf.Buf", Field, 0}, + {"WSABuf.Len", Field, 0}, + {"WSACleanup", Func, 0}, + {"WSADESCRIPTION_LEN", Const, 0}, + {"WSAData", Type, 0}, + {"WSAData.Description", Field, 0}, + {"WSAData.HighVersion", Field, 0}, + {"WSAData.MaxSockets", Field, 0}, + {"WSAData.MaxUdpDg", Field, 0}, + {"WSAData.SystemStatus", Field, 0}, + {"WSAData.VendorInfo", Field, 0}, + {"WSAData.Version", Field, 0}, + {"WSAEACCES", Const, 2}, + {"WSAECONNABORTED", Const, 9}, + {"WSAECONNRESET", Const, 3}, + {"WSAEnumProtocols", Func, 2}, + {"WSAID_CONNECTEX", Var, 1}, + {"WSAIoctl", Func, 0}, + {"WSAPROTOCOL_LEN", Const, 2}, + {"WSAProtocolChain", Type, 2}, + {"WSAProtocolChain.ChainEntries", Field, 2}, + {"WSAProtocolChain.ChainLen", Field, 2}, + {"WSAProtocolInfo", Type, 2}, + {"WSAProtocolInfo.AddressFamily", Field, 2}, + {"WSAProtocolInfo.CatalogEntryId", Field, 2}, + {"WSAProtocolInfo.MaxSockAddr", Field, 2}, + {"WSAProtocolInfo.MessageSize", Field, 2}, + {"WSAProtocolInfo.MinSockAddr", Field, 2}, + {"WSAProtocolInfo.NetworkByteOrder", Field, 2}, + {"WSAProtocolInfo.Protocol", Field, 2}, + {"WSAProtocolInfo.ProtocolChain", Field, 2}, + {"WSAProtocolInfo.ProtocolMaxOffset", Field, 2}, + {"WSAProtocolInfo.ProtocolName", Field, 2}, + {"WSAProtocolInfo.ProviderFlags", Field, 2}, + {"WSAProtocolInfo.ProviderId", Field, 2}, + {"WSAProtocolInfo.ProviderReserved", Field, 2}, + {"WSAProtocolInfo.SecurityScheme", Field, 2}, + {"WSAProtocolInfo.ServiceFlags1", Field, 2}, + {"WSAProtocolInfo.ServiceFlags2", Field, 2}, + {"WSAProtocolInfo.ServiceFlags3", Field, 2}, + {"WSAProtocolInfo.ServiceFlags4", Field, 2}, + {"WSAProtocolInfo.SocketType", Field, 2}, + {"WSAProtocolInfo.Version", Field, 2}, + {"WSARecv", Func, 0}, + {"WSARecvFrom", Func, 0}, + {"WSASYS_STATUS_LEN", Const, 0}, + {"WSASend", Func, 0}, + {"WSASendTo", Func, 0}, + {"WSASendto", Func, 0}, + {"WSAStartup", Func, 0}, + {"WSTOPPED", Const, 0}, + {"WTRAPPED", Const, 1}, + {"WUNTRACED", Const, 0}, + {"Wait4", Func, 0}, + {"WaitForSingleObject", Func, 0}, + {"WaitStatus", Type, 0}, + {"WaitStatus.ExitCode", Field, 0}, + {"Win32FileAttributeData", Type, 0}, + {"Win32FileAttributeData.CreationTime", Field, 0}, + {"Win32FileAttributeData.FileAttributes", Field, 0}, + {"Win32FileAttributeData.FileSizeHigh", Field, 0}, + {"Win32FileAttributeData.FileSizeLow", Field, 0}, + {"Win32FileAttributeData.LastAccessTime", Field, 0}, + {"Win32FileAttributeData.LastWriteTime", Field, 0}, + {"Win32finddata", Type, 0}, + {"Win32finddata.AlternateFileName", Field, 0}, + {"Win32finddata.CreationTime", Field, 0}, + {"Win32finddata.FileAttributes", Field, 0}, + {"Win32finddata.FileName", Field, 0}, + {"Win32finddata.FileSizeHigh", Field, 0}, + {"Win32finddata.FileSizeLow", Field, 0}, + {"Win32finddata.LastAccessTime", Field, 0}, + {"Win32finddata.LastWriteTime", Field, 0}, + {"Win32finddata.Reserved0", Field, 0}, + {"Win32finddata.Reserved1", Field, 0}, + {"Write", Func, 0}, + {"WriteConsole", Func, 1}, + {"WriteFile", Func, 0}, + {"X509_ASN_ENCODING", Const, 0}, + {"XCASE", Const, 0}, + {"XP1_CONNECTIONLESS", Const, 2}, + {"XP1_CONNECT_DATA", Const, 2}, + {"XP1_DISCONNECT_DATA", Const, 2}, + {"XP1_EXPEDITED_DATA", Const, 2}, + {"XP1_GRACEFUL_CLOSE", Const, 2}, + {"XP1_GUARANTEED_DELIVERY", Const, 2}, + {"XP1_GUARANTEED_ORDER", Const, 2}, + {"XP1_IFS_HANDLES", Const, 2}, + {"XP1_MESSAGE_ORIENTED", Const, 2}, + {"XP1_MULTIPOINT_CONTROL_PLANE", Const, 2}, + {"XP1_MULTIPOINT_DATA_PLANE", Const, 2}, + {"XP1_PARTIAL_MESSAGE", Const, 2}, + {"XP1_PSEUDO_STREAM", Const, 2}, + {"XP1_QOS_SUPPORTED", Const, 2}, + {"XP1_SAN_SUPPORT_SDP", Const, 2}, + {"XP1_SUPPORT_BROADCAST", Const, 2}, + {"XP1_SUPPORT_MULTIPOINT", Const, 2}, + {"XP1_UNI_RECV", Const, 2}, + {"XP1_UNI_SEND", Const, 2}, + }, + "syscall/js": { + {"CopyBytesToGo", Func, 0}, + {"CopyBytesToJS", Func, 0}, + {"Error", Type, 0}, + {"Func", Type, 0}, + {"FuncOf", Func, 0}, + {"Global", Func, 0}, + {"Null", Func, 0}, + {"Type", Type, 0}, + {"TypeBoolean", Const, 0}, + {"TypeFunction", Const, 0}, + {"TypeNull", Const, 0}, + {"TypeNumber", Const, 0}, + {"TypeObject", Const, 0}, + {"TypeString", Const, 0}, + {"TypeSymbol", Const, 0}, + {"TypeUndefined", Const, 0}, + {"Undefined", Func, 0}, + {"Value", Type, 0}, + {"ValueError", Type, 0}, + {"ValueOf", Func, 0}, + }, + "testing": { + {"(*B).Cleanup", Method, 14}, + {"(*B).Elapsed", Method, 20}, + {"(*B).Error", Method, 0}, + {"(*B).Errorf", Method, 0}, + {"(*B).Fail", Method, 0}, + {"(*B).FailNow", Method, 0}, + {"(*B).Failed", Method, 0}, + {"(*B).Fatal", Method, 0}, + {"(*B).Fatalf", Method, 0}, + {"(*B).Helper", Method, 9}, + {"(*B).Log", Method, 0}, + {"(*B).Logf", Method, 0}, + {"(*B).Name", Method, 8}, + {"(*B).ReportAllocs", Method, 1}, + {"(*B).ReportMetric", Method, 13}, + {"(*B).ResetTimer", Method, 0}, + {"(*B).Run", Method, 7}, + {"(*B).RunParallel", Method, 3}, + {"(*B).SetBytes", Method, 0}, + {"(*B).SetParallelism", Method, 3}, + {"(*B).Setenv", Method, 17}, + {"(*B).Skip", Method, 1}, + {"(*B).SkipNow", Method, 1}, + {"(*B).Skipf", Method, 1}, + {"(*B).Skipped", Method, 1}, + {"(*B).StartTimer", Method, 0}, + {"(*B).StopTimer", Method, 0}, + {"(*B).TempDir", Method, 15}, + {"(*F).Add", Method, 18}, + {"(*F).Cleanup", Method, 18}, + {"(*F).Error", Method, 18}, + {"(*F).Errorf", Method, 18}, + {"(*F).Fail", Method, 18}, + {"(*F).FailNow", Method, 18}, + {"(*F).Failed", Method, 18}, + {"(*F).Fatal", Method, 18}, + {"(*F).Fatalf", Method, 18}, + {"(*F).Fuzz", Method, 18}, + {"(*F).Helper", Method, 18}, + {"(*F).Log", Method, 18}, + {"(*F).Logf", Method, 18}, + {"(*F).Name", Method, 18}, + {"(*F).Setenv", Method, 18}, + {"(*F).Skip", Method, 18}, + {"(*F).SkipNow", Method, 18}, + {"(*F).Skipf", Method, 18}, + {"(*F).Skipped", Method, 18}, + {"(*F).TempDir", Method, 18}, + {"(*M).Run", Method, 4}, + {"(*PB).Next", Method, 3}, + {"(*T).Cleanup", Method, 14}, + {"(*T).Deadline", Method, 15}, + {"(*T).Error", Method, 0}, + {"(*T).Errorf", Method, 0}, + {"(*T).Fail", Method, 0}, + {"(*T).FailNow", Method, 0}, + {"(*T).Failed", Method, 0}, + {"(*T).Fatal", Method, 0}, + {"(*T).Fatalf", Method, 0}, + {"(*T).Helper", Method, 9}, + {"(*T).Log", Method, 0}, + {"(*T).Logf", Method, 0}, + {"(*T).Name", Method, 8}, + {"(*T).Parallel", Method, 0}, + {"(*T).Run", Method, 7}, + {"(*T).Setenv", Method, 17}, + {"(*T).Skip", Method, 1}, + {"(*T).SkipNow", Method, 1}, + {"(*T).Skipf", Method, 1}, + {"(*T).Skipped", Method, 1}, + {"(*T).TempDir", Method, 15}, + {"(BenchmarkResult).AllocedBytesPerOp", Method, 1}, + {"(BenchmarkResult).AllocsPerOp", Method, 1}, + {"(BenchmarkResult).MemString", Method, 1}, + {"(BenchmarkResult).NsPerOp", Method, 0}, + {"(BenchmarkResult).String", Method, 0}, + {"AllocsPerRun", Func, 1}, + {"B", Type, 0}, + {"B.N", Field, 0}, + {"Benchmark", Func, 0}, + {"BenchmarkResult", Type, 0}, + {"BenchmarkResult.Bytes", Field, 0}, + {"BenchmarkResult.Extra", Field, 13}, + {"BenchmarkResult.MemAllocs", Field, 1}, + {"BenchmarkResult.MemBytes", Field, 1}, + {"BenchmarkResult.N", Field, 0}, + {"BenchmarkResult.T", Field, 0}, + {"Cover", Type, 2}, + {"Cover.Blocks", Field, 2}, + {"Cover.Counters", Field, 2}, + {"Cover.CoveredPackages", Field, 2}, + {"Cover.Mode", Field, 2}, + {"CoverBlock", Type, 2}, + {"CoverBlock.Col0", Field, 2}, + {"CoverBlock.Col1", Field, 2}, + {"CoverBlock.Line0", Field, 2}, + {"CoverBlock.Line1", Field, 2}, + {"CoverBlock.Stmts", Field, 2}, + {"CoverMode", Func, 8}, + {"Coverage", Func, 4}, + {"F", Type, 18}, + {"Init", Func, 13}, + {"InternalBenchmark", Type, 0}, + {"InternalBenchmark.F", Field, 0}, + {"InternalBenchmark.Name", Field, 0}, + {"InternalExample", Type, 0}, + {"InternalExample.F", Field, 0}, + {"InternalExample.Name", Field, 0}, + {"InternalExample.Output", Field, 0}, + {"InternalExample.Unordered", Field, 7}, + {"InternalFuzzTarget", Type, 18}, + {"InternalFuzzTarget.Fn", Field, 18}, + {"InternalFuzzTarget.Name", Field, 18}, + {"InternalTest", Type, 0}, + {"InternalTest.F", Field, 0}, + {"InternalTest.Name", Field, 0}, + {"M", Type, 4}, + {"Main", Func, 0}, + {"MainStart", Func, 4}, + {"PB", Type, 3}, + {"RegisterCover", Func, 2}, + {"RunBenchmarks", Func, 0}, + {"RunExamples", Func, 0}, + {"RunTests", Func, 0}, + {"Short", Func, 0}, + {"T", Type, 0}, + {"TB", Type, 2}, + {"Testing", Func, 21}, + {"Verbose", Func, 1}, + }, + "testing/fstest": { + {"(MapFS).Glob", Method, 16}, + {"(MapFS).Open", Method, 16}, + {"(MapFS).ReadDir", Method, 16}, + {"(MapFS).ReadFile", Method, 16}, + {"(MapFS).Stat", Method, 16}, + {"(MapFS).Sub", Method, 16}, + {"MapFS", Type, 16}, + {"MapFile", Type, 16}, + {"MapFile.Data", Field, 16}, + {"MapFile.ModTime", Field, 16}, + {"MapFile.Mode", Field, 16}, + {"MapFile.Sys", Field, 16}, + {"TestFS", Func, 16}, + }, + "testing/iotest": { + {"DataErrReader", Func, 0}, + {"ErrReader", Func, 16}, + {"ErrTimeout", Var, 0}, + {"HalfReader", Func, 0}, + {"NewReadLogger", Func, 0}, + {"NewWriteLogger", Func, 0}, + {"OneByteReader", Func, 0}, + {"TestReader", Func, 16}, + {"TimeoutReader", Func, 0}, + {"TruncateWriter", Func, 0}, + }, + "testing/quick": { + {"(*CheckEqualError).Error", Method, 0}, + {"(*CheckError).Error", Method, 0}, + {"(SetupError).Error", Method, 0}, + {"Check", Func, 0}, + {"CheckEqual", Func, 0}, + {"CheckEqualError", Type, 0}, + {"CheckEqualError.CheckError", Field, 0}, + {"CheckEqualError.Out1", Field, 0}, + {"CheckEqualError.Out2", Field, 0}, + {"CheckError", Type, 0}, + {"CheckError.Count", Field, 0}, + {"CheckError.In", Field, 0}, + {"Config", Type, 0}, + {"Config.MaxCount", Field, 0}, + {"Config.MaxCountScale", Field, 0}, + {"Config.Rand", Field, 0}, + {"Config.Values", Field, 0}, + {"Generator", Type, 0}, + {"SetupError", Type, 0}, + {"Value", Func, 0}, + }, + "testing/slogtest": { + {"Run", Func, 22}, + {"TestHandler", Func, 21}, + }, + "text/scanner": { + {"(*Position).IsValid", Method, 0}, + {"(*Scanner).Init", Method, 0}, + {"(*Scanner).IsValid", Method, 0}, + {"(*Scanner).Next", Method, 0}, + {"(*Scanner).Peek", Method, 0}, + {"(*Scanner).Pos", Method, 0}, + {"(*Scanner).Scan", Method, 0}, + {"(*Scanner).TokenText", Method, 0}, + {"(Position).String", Method, 0}, + {"(Scanner).String", Method, 0}, + {"Char", Const, 0}, + {"Comment", Const, 0}, + {"EOF", Const, 0}, + {"Float", Const, 0}, + {"GoTokens", Const, 0}, + {"GoWhitespace", Const, 0}, + {"Ident", Const, 0}, + {"Int", Const, 0}, + {"Position", Type, 0}, + {"Position.Column", Field, 0}, + {"Position.Filename", Field, 0}, + {"Position.Line", Field, 0}, + {"Position.Offset", Field, 0}, + {"RawString", Const, 0}, + {"ScanChars", Const, 0}, + {"ScanComments", Const, 0}, + {"ScanFloats", Const, 0}, + {"ScanIdents", Const, 0}, + {"ScanInts", Const, 0}, + {"ScanRawStrings", Const, 0}, + {"ScanStrings", Const, 0}, + {"Scanner", Type, 0}, + {"Scanner.Error", Field, 0}, + {"Scanner.ErrorCount", Field, 0}, + {"Scanner.IsIdentRune", Field, 4}, + {"Scanner.Mode", Field, 0}, + {"Scanner.Position", Field, 0}, + {"Scanner.Whitespace", Field, 0}, + {"SkipComments", Const, 0}, + {"String", Const, 0}, + {"TokenString", Func, 0}, + }, + "text/tabwriter": { + {"(*Writer).Flush", Method, 0}, + {"(*Writer).Init", Method, 0}, + {"(*Writer).Write", Method, 0}, + {"AlignRight", Const, 0}, + {"Debug", Const, 0}, + {"DiscardEmptyColumns", Const, 0}, + {"Escape", Const, 0}, + {"FilterHTML", Const, 0}, + {"NewWriter", Func, 0}, + {"StripEscape", Const, 0}, + {"TabIndent", Const, 0}, + {"Writer", Type, 0}, + }, + "text/template": { + {"(*Template).AddParseTree", Method, 0}, + {"(*Template).Clone", Method, 0}, + {"(*Template).DefinedTemplates", Method, 5}, + {"(*Template).Delims", Method, 0}, + {"(*Template).Execute", Method, 0}, + {"(*Template).ExecuteTemplate", Method, 0}, + {"(*Template).Funcs", Method, 0}, + {"(*Template).Lookup", Method, 0}, + {"(*Template).Name", Method, 0}, + {"(*Template).New", Method, 0}, + {"(*Template).Option", Method, 5}, + {"(*Template).Parse", Method, 0}, + {"(*Template).ParseFS", Method, 16}, + {"(*Template).ParseFiles", Method, 0}, + {"(*Template).ParseGlob", Method, 0}, + {"(*Template).Templates", Method, 0}, + {"(ExecError).Error", Method, 6}, + {"(ExecError).Unwrap", Method, 13}, + {"(Template).Copy", Method, 2}, + {"(Template).ErrorContext", Method, 1}, + {"ExecError", Type, 6}, + {"ExecError.Err", Field, 6}, + {"ExecError.Name", Field, 6}, + {"FuncMap", Type, 0}, + {"HTMLEscape", Func, 0}, + {"HTMLEscapeString", Func, 0}, + {"HTMLEscaper", Func, 0}, + {"IsTrue", Func, 6}, + {"JSEscape", Func, 0}, + {"JSEscapeString", Func, 0}, + {"JSEscaper", Func, 0}, + {"Must", Func, 0}, + {"New", Func, 0}, + {"ParseFS", Func, 16}, + {"ParseFiles", Func, 0}, + {"ParseGlob", Func, 0}, + {"Template", Type, 0}, + {"Template.Tree", Field, 0}, + {"URLQueryEscaper", Func, 0}, + }, + "text/template/parse": { + {"(*ActionNode).Copy", Method, 0}, + {"(*ActionNode).String", Method, 0}, + {"(*BoolNode).Copy", Method, 0}, + {"(*BoolNode).String", Method, 0}, + {"(*BranchNode).Copy", Method, 4}, + {"(*BranchNode).String", Method, 0}, + {"(*BreakNode).Copy", Method, 18}, + {"(*BreakNode).String", Method, 18}, + {"(*ChainNode).Add", Method, 1}, + {"(*ChainNode).Copy", Method, 1}, + {"(*ChainNode).String", Method, 1}, + {"(*CommandNode).Copy", Method, 0}, + {"(*CommandNode).String", Method, 0}, + {"(*CommentNode).Copy", Method, 16}, + {"(*CommentNode).String", Method, 16}, + {"(*ContinueNode).Copy", Method, 18}, + {"(*ContinueNode).String", Method, 18}, + {"(*DotNode).Copy", Method, 0}, + {"(*DotNode).String", Method, 0}, + {"(*DotNode).Type", Method, 0}, + {"(*FieldNode).Copy", Method, 0}, + {"(*FieldNode).String", Method, 0}, + {"(*IdentifierNode).Copy", Method, 0}, + {"(*IdentifierNode).SetPos", Method, 1}, + {"(*IdentifierNode).SetTree", Method, 4}, + {"(*IdentifierNode).String", Method, 0}, + {"(*IfNode).Copy", Method, 0}, + {"(*IfNode).String", Method, 0}, + {"(*ListNode).Copy", Method, 0}, + {"(*ListNode).CopyList", Method, 0}, + {"(*ListNode).String", Method, 0}, + {"(*NilNode).Copy", Method, 1}, + {"(*NilNode).String", Method, 1}, + {"(*NilNode).Type", Method, 1}, + {"(*NumberNode).Copy", Method, 0}, + {"(*NumberNode).String", Method, 0}, + {"(*PipeNode).Copy", Method, 0}, + {"(*PipeNode).CopyPipe", Method, 0}, + {"(*PipeNode).String", Method, 0}, + {"(*RangeNode).Copy", Method, 0}, + {"(*RangeNode).String", Method, 0}, + {"(*StringNode).Copy", Method, 0}, + {"(*StringNode).String", Method, 0}, + {"(*TemplateNode).Copy", Method, 0}, + {"(*TemplateNode).String", Method, 0}, + {"(*TextNode).Copy", Method, 0}, + {"(*TextNode).String", Method, 0}, + {"(*Tree).Copy", Method, 2}, + {"(*Tree).ErrorContext", Method, 1}, + {"(*Tree).Parse", Method, 0}, + {"(*VariableNode).Copy", Method, 0}, + {"(*VariableNode).String", Method, 0}, + {"(*WithNode).Copy", Method, 0}, + {"(*WithNode).String", Method, 0}, + {"(ActionNode).Position", Method, 1}, + {"(ActionNode).Type", Method, 0}, + {"(BoolNode).Position", Method, 1}, + {"(BoolNode).Type", Method, 0}, + {"(BranchNode).Position", Method, 1}, + {"(BranchNode).Type", Method, 0}, + {"(BreakNode).Position", Method, 18}, + {"(BreakNode).Type", Method, 18}, + {"(ChainNode).Position", Method, 1}, + {"(ChainNode).Type", Method, 1}, + {"(CommandNode).Position", Method, 1}, + {"(CommandNode).Type", Method, 0}, + {"(CommentNode).Position", Method, 16}, + {"(CommentNode).Type", Method, 16}, + {"(ContinueNode).Position", Method, 18}, + {"(ContinueNode).Type", Method, 18}, + {"(DotNode).Position", Method, 1}, + {"(FieldNode).Position", Method, 1}, + {"(FieldNode).Type", Method, 0}, + {"(IdentifierNode).Position", Method, 1}, + {"(IdentifierNode).Type", Method, 0}, + {"(IfNode).Position", Method, 1}, + {"(IfNode).Type", Method, 0}, + {"(ListNode).Position", Method, 1}, + {"(ListNode).Type", Method, 0}, + {"(NilNode).Position", Method, 1}, + {"(NodeType).Type", Method, 0}, + {"(NumberNode).Position", Method, 1}, + {"(NumberNode).Type", Method, 0}, + {"(PipeNode).Position", Method, 1}, + {"(PipeNode).Type", Method, 0}, + {"(Pos).Position", Method, 1}, + {"(RangeNode).Position", Method, 1}, + {"(RangeNode).Type", Method, 0}, + {"(StringNode).Position", Method, 1}, + {"(StringNode).Type", Method, 0}, + {"(TemplateNode).Position", Method, 1}, + {"(TemplateNode).Type", Method, 0}, + {"(TextNode).Position", Method, 1}, + {"(TextNode).Type", Method, 0}, + {"(VariableNode).Position", Method, 1}, + {"(VariableNode).Type", Method, 0}, + {"(WithNode).Position", Method, 1}, + {"(WithNode).Type", Method, 0}, + {"ActionNode", Type, 0}, + {"ActionNode.Line", Field, 0}, + {"ActionNode.NodeType", Field, 0}, + {"ActionNode.Pipe", Field, 0}, + {"ActionNode.Pos", Field, 1}, + {"BoolNode", Type, 0}, + {"BoolNode.NodeType", Field, 0}, + {"BoolNode.Pos", Field, 1}, + {"BoolNode.True", Field, 0}, + {"BranchNode", Type, 0}, + {"BranchNode.ElseList", Field, 0}, + {"BranchNode.Line", Field, 0}, + {"BranchNode.List", Field, 0}, + {"BranchNode.NodeType", Field, 0}, + {"BranchNode.Pipe", Field, 0}, + {"BranchNode.Pos", Field, 1}, + {"BreakNode", Type, 18}, + {"BreakNode.Line", Field, 18}, + {"BreakNode.NodeType", Field, 18}, + {"BreakNode.Pos", Field, 18}, + {"ChainNode", Type, 1}, + {"ChainNode.Field", Field, 1}, + {"ChainNode.Node", Field, 1}, + {"ChainNode.NodeType", Field, 1}, + {"ChainNode.Pos", Field, 1}, + {"CommandNode", Type, 0}, + {"CommandNode.Args", Field, 0}, + {"CommandNode.NodeType", Field, 0}, + {"CommandNode.Pos", Field, 1}, + {"CommentNode", Type, 16}, + {"CommentNode.NodeType", Field, 16}, + {"CommentNode.Pos", Field, 16}, + {"CommentNode.Text", Field, 16}, + {"ContinueNode", Type, 18}, + {"ContinueNode.Line", Field, 18}, + {"ContinueNode.NodeType", Field, 18}, + {"ContinueNode.Pos", Field, 18}, + {"DotNode", Type, 0}, + {"DotNode.NodeType", Field, 4}, + {"DotNode.Pos", Field, 1}, + {"FieldNode", Type, 0}, + {"FieldNode.Ident", Field, 0}, + {"FieldNode.NodeType", Field, 0}, + {"FieldNode.Pos", Field, 1}, + {"IdentifierNode", Type, 0}, + {"IdentifierNode.Ident", Field, 0}, + {"IdentifierNode.NodeType", Field, 0}, + {"IdentifierNode.Pos", Field, 1}, + {"IfNode", Type, 0}, + {"IfNode.BranchNode", Field, 0}, + {"IsEmptyTree", Func, 0}, + {"ListNode", Type, 0}, + {"ListNode.NodeType", Field, 0}, + {"ListNode.Nodes", Field, 0}, + {"ListNode.Pos", Field, 1}, + {"Mode", Type, 16}, + {"New", Func, 0}, + {"NewIdentifier", Func, 0}, + {"NilNode", Type, 1}, + {"NilNode.NodeType", Field, 4}, + {"NilNode.Pos", Field, 1}, + {"Node", Type, 0}, + {"NodeAction", Const, 0}, + {"NodeBool", Const, 0}, + {"NodeBreak", Const, 18}, + {"NodeChain", Const, 1}, + {"NodeCommand", Const, 0}, + {"NodeComment", Const, 16}, + {"NodeContinue", Const, 18}, + {"NodeDot", Const, 0}, + {"NodeField", Const, 0}, + {"NodeIdentifier", Const, 0}, + {"NodeIf", Const, 0}, + {"NodeList", Const, 0}, + {"NodeNil", Const, 1}, + {"NodeNumber", Const, 0}, + {"NodePipe", Const, 0}, + {"NodeRange", Const, 0}, + {"NodeString", Const, 0}, + {"NodeTemplate", Const, 0}, + {"NodeText", Const, 0}, + {"NodeType", Type, 0}, + {"NodeVariable", Const, 0}, + {"NodeWith", Const, 0}, + {"NumberNode", Type, 0}, + {"NumberNode.Complex128", Field, 0}, + {"NumberNode.Float64", Field, 0}, + {"NumberNode.Int64", Field, 0}, + {"NumberNode.IsComplex", Field, 0}, + {"NumberNode.IsFloat", Field, 0}, + {"NumberNode.IsInt", Field, 0}, + {"NumberNode.IsUint", Field, 0}, + {"NumberNode.NodeType", Field, 0}, + {"NumberNode.Pos", Field, 1}, + {"NumberNode.Text", Field, 0}, + {"NumberNode.Uint64", Field, 0}, + {"Parse", Func, 0}, + {"ParseComments", Const, 16}, + {"PipeNode", Type, 0}, + {"PipeNode.Cmds", Field, 0}, + {"PipeNode.Decl", Field, 0}, + {"PipeNode.IsAssign", Field, 11}, + {"PipeNode.Line", Field, 0}, + {"PipeNode.NodeType", Field, 0}, + {"PipeNode.Pos", Field, 1}, + {"Pos", Type, 1}, + {"RangeNode", Type, 0}, + {"RangeNode.BranchNode", Field, 0}, + {"SkipFuncCheck", Const, 17}, + {"StringNode", Type, 0}, + {"StringNode.NodeType", Field, 0}, + {"StringNode.Pos", Field, 1}, + {"StringNode.Quoted", Field, 0}, + {"StringNode.Text", Field, 0}, + {"TemplateNode", Type, 0}, + {"TemplateNode.Line", Field, 0}, + {"TemplateNode.Name", Field, 0}, + {"TemplateNode.NodeType", Field, 0}, + {"TemplateNode.Pipe", Field, 0}, + {"TemplateNode.Pos", Field, 1}, + {"TextNode", Type, 0}, + {"TextNode.NodeType", Field, 0}, + {"TextNode.Pos", Field, 1}, + {"TextNode.Text", Field, 0}, + {"Tree", Type, 0}, + {"Tree.Mode", Field, 16}, + {"Tree.Name", Field, 0}, + {"Tree.ParseName", Field, 1}, + {"Tree.Root", Field, 0}, + {"VariableNode", Type, 0}, + {"VariableNode.Ident", Field, 0}, + {"VariableNode.NodeType", Field, 0}, + {"VariableNode.Pos", Field, 1}, + {"WithNode", Type, 0}, + {"WithNode.BranchNode", Field, 0}, + }, + "time": { + {"(*Location).String", Method, 0}, + {"(*ParseError).Error", Method, 0}, + {"(*Ticker).Reset", Method, 15}, + {"(*Ticker).Stop", Method, 0}, + {"(*Time).GobDecode", Method, 0}, + {"(*Time).UnmarshalBinary", Method, 2}, + {"(*Time).UnmarshalJSON", Method, 0}, + {"(*Time).UnmarshalText", Method, 2}, + {"(*Timer).Reset", Method, 1}, + {"(*Timer).Stop", Method, 0}, + {"(Duration).Abs", Method, 19}, + {"(Duration).Hours", Method, 0}, + {"(Duration).Microseconds", Method, 13}, + {"(Duration).Milliseconds", Method, 13}, + {"(Duration).Minutes", Method, 0}, + {"(Duration).Nanoseconds", Method, 0}, + {"(Duration).Round", Method, 9}, + {"(Duration).Seconds", Method, 0}, + {"(Duration).String", Method, 0}, + {"(Duration).Truncate", Method, 9}, + {"(Month).String", Method, 0}, + {"(Time).Add", Method, 0}, + {"(Time).AddDate", Method, 0}, + {"(Time).After", Method, 0}, + {"(Time).AppendFormat", Method, 5}, + {"(Time).Before", Method, 0}, + {"(Time).Clock", Method, 0}, + {"(Time).Compare", Method, 20}, + {"(Time).Date", Method, 0}, + {"(Time).Day", Method, 0}, + {"(Time).Equal", Method, 0}, + {"(Time).Format", Method, 0}, + {"(Time).GoString", Method, 17}, + {"(Time).GobEncode", Method, 0}, + {"(Time).Hour", Method, 0}, + {"(Time).ISOWeek", Method, 0}, + {"(Time).In", Method, 0}, + {"(Time).IsDST", Method, 17}, + {"(Time).IsZero", Method, 0}, + {"(Time).Local", Method, 0}, + {"(Time).Location", Method, 0}, + {"(Time).MarshalBinary", Method, 2}, + {"(Time).MarshalJSON", Method, 0}, + {"(Time).MarshalText", Method, 2}, + {"(Time).Minute", Method, 0}, + {"(Time).Month", Method, 0}, + {"(Time).Nanosecond", Method, 0}, + {"(Time).Round", Method, 1}, + {"(Time).Second", Method, 0}, + {"(Time).String", Method, 0}, + {"(Time).Sub", Method, 0}, + {"(Time).Truncate", Method, 1}, + {"(Time).UTC", Method, 0}, + {"(Time).Unix", Method, 0}, + {"(Time).UnixMicro", Method, 17}, + {"(Time).UnixMilli", Method, 17}, + {"(Time).UnixNano", Method, 0}, + {"(Time).Weekday", Method, 0}, + {"(Time).Year", Method, 0}, + {"(Time).YearDay", Method, 1}, + {"(Time).Zone", Method, 0}, + {"(Time).ZoneBounds", Method, 19}, + {"(Weekday).String", Method, 0}, + {"ANSIC", Const, 0}, + {"After", Func, 0}, + {"AfterFunc", Func, 0}, + {"April", Const, 0}, + {"August", Const, 0}, + {"Date", Func, 0}, + {"DateOnly", Const, 20}, + {"DateTime", Const, 20}, + {"December", Const, 0}, + {"Duration", Type, 0}, + {"February", Const, 0}, + {"FixedZone", Func, 0}, + {"Friday", Const, 0}, + {"Hour", Const, 0}, + {"January", Const, 0}, + {"July", Const, 0}, + {"June", Const, 0}, + {"Kitchen", Const, 0}, + {"Layout", Const, 17}, + {"LoadLocation", Func, 0}, + {"LoadLocationFromTZData", Func, 10}, + {"Local", Var, 0}, + {"Location", Type, 0}, + {"March", Const, 0}, + {"May", Const, 0}, + {"Microsecond", Const, 0}, + {"Millisecond", Const, 0}, + {"Minute", Const, 0}, + {"Monday", Const, 0}, + {"Month", Type, 0}, + {"Nanosecond", Const, 0}, + {"NewTicker", Func, 0}, + {"NewTimer", Func, 0}, + {"November", Const, 0}, + {"Now", Func, 0}, + {"October", Const, 0}, + {"Parse", Func, 0}, + {"ParseDuration", Func, 0}, + {"ParseError", Type, 0}, + {"ParseError.Layout", Field, 0}, + {"ParseError.LayoutElem", Field, 0}, + {"ParseError.Message", Field, 0}, + {"ParseError.Value", Field, 0}, + {"ParseError.ValueElem", Field, 0}, + {"ParseInLocation", Func, 1}, + {"RFC1123", Const, 0}, + {"RFC1123Z", Const, 0}, + {"RFC3339", Const, 0}, + {"RFC3339Nano", Const, 0}, + {"RFC822", Const, 0}, + {"RFC822Z", Const, 0}, + {"RFC850", Const, 0}, + {"RubyDate", Const, 0}, + {"Saturday", Const, 0}, + {"Second", Const, 0}, + {"September", Const, 0}, + {"Since", Func, 0}, + {"Sleep", Func, 0}, + {"Stamp", Const, 0}, + {"StampMicro", Const, 0}, + {"StampMilli", Const, 0}, + {"StampNano", Const, 0}, + {"Sunday", Const, 0}, + {"Thursday", Const, 0}, + {"Tick", Func, 0}, + {"Ticker", Type, 0}, + {"Ticker.C", Field, 0}, + {"Time", Type, 0}, + {"TimeOnly", Const, 20}, + {"Timer", Type, 0}, + {"Timer.C", Field, 0}, + {"Tuesday", Const, 0}, + {"UTC", Var, 0}, + {"Unix", Func, 0}, + {"UnixDate", Const, 0}, + {"UnixMicro", Func, 17}, + {"UnixMilli", Func, 17}, + {"Until", Func, 8}, + {"Wednesday", Const, 0}, + {"Weekday", Type, 0}, + }, + "unicode": { + {"(SpecialCase).ToLower", Method, 0}, + {"(SpecialCase).ToTitle", Method, 0}, + {"(SpecialCase).ToUpper", Method, 0}, + {"ASCII_Hex_Digit", Var, 0}, + {"Adlam", Var, 7}, + {"Ahom", Var, 5}, + {"Anatolian_Hieroglyphs", Var, 5}, + {"Arabic", Var, 0}, + {"Armenian", Var, 0}, + {"Avestan", Var, 0}, + {"AzeriCase", Var, 0}, + {"Balinese", Var, 0}, + {"Bamum", Var, 0}, + {"Bassa_Vah", Var, 4}, + {"Batak", Var, 0}, + {"Bengali", Var, 0}, + {"Bhaiksuki", Var, 7}, + {"Bidi_Control", Var, 0}, + {"Bopomofo", Var, 0}, + {"Brahmi", Var, 0}, + {"Braille", Var, 0}, + {"Buginese", Var, 0}, + {"Buhid", Var, 0}, + {"C", Var, 0}, + {"Canadian_Aboriginal", Var, 0}, + {"Carian", Var, 0}, + {"CaseRange", Type, 0}, + {"CaseRange.Delta", Field, 0}, + {"CaseRange.Hi", Field, 0}, + {"CaseRange.Lo", Field, 0}, + {"CaseRanges", Var, 0}, + {"Categories", Var, 0}, + {"Caucasian_Albanian", Var, 4}, + {"Cc", Var, 0}, + {"Cf", Var, 0}, + {"Chakma", Var, 1}, + {"Cham", Var, 0}, + {"Cherokee", Var, 0}, + {"Chorasmian", Var, 16}, + {"Co", Var, 0}, + {"Common", Var, 0}, + {"Coptic", Var, 0}, + {"Cs", Var, 0}, + {"Cuneiform", Var, 0}, + {"Cypriot", Var, 0}, + {"Cypro_Minoan", Var, 21}, + {"Cyrillic", Var, 0}, + {"Dash", Var, 0}, + {"Deprecated", Var, 0}, + {"Deseret", Var, 0}, + {"Devanagari", Var, 0}, + {"Diacritic", Var, 0}, + {"Digit", Var, 0}, + {"Dives_Akuru", Var, 16}, + {"Dogra", Var, 13}, + {"Duployan", Var, 4}, + {"Egyptian_Hieroglyphs", Var, 0}, + {"Elbasan", Var, 4}, + {"Elymaic", Var, 14}, + {"Ethiopic", Var, 0}, + {"Extender", Var, 0}, + {"FoldCategory", Var, 0}, + {"FoldScript", Var, 0}, + {"Georgian", Var, 0}, + {"Glagolitic", Var, 0}, + {"Gothic", Var, 0}, + {"Grantha", Var, 4}, + {"GraphicRanges", Var, 0}, + {"Greek", Var, 0}, + {"Gujarati", Var, 0}, + {"Gunjala_Gondi", Var, 13}, + {"Gurmukhi", Var, 0}, + {"Han", Var, 0}, + {"Hangul", Var, 0}, + {"Hanifi_Rohingya", Var, 13}, + {"Hanunoo", Var, 0}, + {"Hatran", Var, 5}, + {"Hebrew", Var, 0}, + {"Hex_Digit", Var, 0}, + {"Hiragana", Var, 0}, + {"Hyphen", Var, 0}, + {"IDS_Binary_Operator", Var, 0}, + {"IDS_Trinary_Operator", Var, 0}, + {"Ideographic", Var, 0}, + {"Imperial_Aramaic", Var, 0}, + {"In", Func, 2}, + {"Inherited", Var, 0}, + {"Inscriptional_Pahlavi", Var, 0}, + {"Inscriptional_Parthian", Var, 0}, + {"Is", Func, 0}, + {"IsControl", Func, 0}, + {"IsDigit", Func, 0}, + {"IsGraphic", Func, 0}, + {"IsLetter", Func, 0}, + {"IsLower", Func, 0}, + {"IsMark", Func, 0}, + {"IsNumber", Func, 0}, + {"IsOneOf", Func, 0}, + {"IsPrint", Func, 0}, + {"IsPunct", Func, 0}, + {"IsSpace", Func, 0}, + {"IsSymbol", Func, 0}, + {"IsTitle", Func, 0}, + {"IsUpper", Func, 0}, + {"Javanese", Var, 0}, + {"Join_Control", Var, 0}, + {"Kaithi", Var, 0}, + {"Kannada", Var, 0}, + {"Katakana", Var, 0}, + {"Kawi", Var, 21}, + {"Kayah_Li", Var, 0}, + {"Kharoshthi", Var, 0}, + {"Khitan_Small_Script", Var, 16}, + {"Khmer", Var, 0}, + {"Khojki", Var, 4}, + {"Khudawadi", Var, 4}, + {"L", Var, 0}, + {"Lao", Var, 0}, + {"Latin", Var, 0}, + {"Lepcha", Var, 0}, + {"Letter", Var, 0}, + {"Limbu", Var, 0}, + {"Linear_A", Var, 4}, + {"Linear_B", Var, 0}, + {"Lisu", Var, 0}, + {"Ll", Var, 0}, + {"Lm", Var, 0}, + {"Lo", Var, 0}, + {"Logical_Order_Exception", Var, 0}, + {"Lower", Var, 0}, + {"LowerCase", Const, 0}, + {"Lt", Var, 0}, + {"Lu", Var, 0}, + {"Lycian", Var, 0}, + {"Lydian", Var, 0}, + {"M", Var, 0}, + {"Mahajani", Var, 4}, + {"Makasar", Var, 13}, + {"Malayalam", Var, 0}, + {"Mandaic", Var, 0}, + {"Manichaean", Var, 4}, + {"Marchen", Var, 7}, + {"Mark", Var, 0}, + {"Masaram_Gondi", Var, 10}, + {"MaxASCII", Const, 0}, + {"MaxCase", Const, 0}, + {"MaxLatin1", Const, 0}, + {"MaxRune", Const, 0}, + {"Mc", Var, 0}, + {"Me", Var, 0}, + {"Medefaidrin", Var, 13}, + {"Meetei_Mayek", Var, 0}, + {"Mende_Kikakui", Var, 4}, + {"Meroitic_Cursive", Var, 1}, + {"Meroitic_Hieroglyphs", Var, 1}, + {"Miao", Var, 1}, + {"Mn", Var, 0}, + {"Modi", Var, 4}, + {"Mongolian", Var, 0}, + {"Mro", Var, 4}, + {"Multani", Var, 5}, + {"Myanmar", Var, 0}, + {"N", Var, 0}, + {"Nabataean", Var, 4}, + {"Nag_Mundari", Var, 21}, + {"Nandinagari", Var, 14}, + {"Nd", Var, 0}, + {"New_Tai_Lue", Var, 0}, + {"Newa", Var, 7}, + {"Nko", Var, 0}, + {"Nl", Var, 0}, + {"No", Var, 0}, + {"Noncharacter_Code_Point", Var, 0}, + {"Number", Var, 0}, + {"Nushu", Var, 10}, + {"Nyiakeng_Puachue_Hmong", Var, 14}, + {"Ogham", Var, 0}, + {"Ol_Chiki", Var, 0}, + {"Old_Hungarian", Var, 5}, + {"Old_Italic", Var, 0}, + {"Old_North_Arabian", Var, 4}, + {"Old_Permic", Var, 4}, + {"Old_Persian", Var, 0}, + {"Old_Sogdian", Var, 13}, + {"Old_South_Arabian", Var, 0}, + {"Old_Turkic", Var, 0}, + {"Old_Uyghur", Var, 21}, + {"Oriya", Var, 0}, + {"Osage", Var, 7}, + {"Osmanya", Var, 0}, + {"Other", Var, 0}, + {"Other_Alphabetic", Var, 0}, + {"Other_Default_Ignorable_Code_Point", Var, 0}, + {"Other_Grapheme_Extend", Var, 0}, + {"Other_ID_Continue", Var, 0}, + {"Other_ID_Start", Var, 0}, + {"Other_Lowercase", Var, 0}, + {"Other_Math", Var, 0}, + {"Other_Uppercase", Var, 0}, + {"P", Var, 0}, + {"Pahawh_Hmong", Var, 4}, + {"Palmyrene", Var, 4}, + {"Pattern_Syntax", Var, 0}, + {"Pattern_White_Space", Var, 0}, + {"Pau_Cin_Hau", Var, 4}, + {"Pc", Var, 0}, + {"Pd", Var, 0}, + {"Pe", Var, 0}, + {"Pf", Var, 0}, + {"Phags_Pa", Var, 0}, + {"Phoenician", Var, 0}, + {"Pi", Var, 0}, + {"Po", Var, 0}, + {"Prepended_Concatenation_Mark", Var, 7}, + {"PrintRanges", Var, 0}, + {"Properties", Var, 0}, + {"Ps", Var, 0}, + {"Psalter_Pahlavi", Var, 4}, + {"Punct", Var, 0}, + {"Quotation_Mark", Var, 0}, + {"Radical", Var, 0}, + {"Range16", Type, 0}, + {"Range16.Hi", Field, 0}, + {"Range16.Lo", Field, 0}, + {"Range16.Stride", Field, 0}, + {"Range32", Type, 0}, + {"Range32.Hi", Field, 0}, + {"Range32.Lo", Field, 0}, + {"Range32.Stride", Field, 0}, + {"RangeTable", Type, 0}, + {"RangeTable.LatinOffset", Field, 1}, + {"RangeTable.R16", Field, 0}, + {"RangeTable.R32", Field, 0}, + {"Regional_Indicator", Var, 10}, + {"Rejang", Var, 0}, + {"ReplacementChar", Const, 0}, + {"Runic", Var, 0}, + {"S", Var, 0}, + {"STerm", Var, 0}, + {"Samaritan", Var, 0}, + {"Saurashtra", Var, 0}, + {"Sc", Var, 0}, + {"Scripts", Var, 0}, + {"Sentence_Terminal", Var, 7}, + {"Sharada", Var, 1}, + {"Shavian", Var, 0}, + {"Siddham", Var, 4}, + {"SignWriting", Var, 5}, + {"SimpleFold", Func, 0}, + {"Sinhala", Var, 0}, + {"Sk", Var, 0}, + {"Sm", Var, 0}, + {"So", Var, 0}, + {"Soft_Dotted", Var, 0}, + {"Sogdian", Var, 13}, + {"Sora_Sompeng", Var, 1}, + {"Soyombo", Var, 10}, + {"Space", Var, 0}, + {"SpecialCase", Type, 0}, + {"Sundanese", Var, 0}, + {"Syloti_Nagri", Var, 0}, + {"Symbol", Var, 0}, + {"Syriac", Var, 0}, + {"Tagalog", Var, 0}, + {"Tagbanwa", Var, 0}, + {"Tai_Le", Var, 0}, + {"Tai_Tham", Var, 0}, + {"Tai_Viet", Var, 0}, + {"Takri", Var, 1}, + {"Tamil", Var, 0}, + {"Tangsa", Var, 21}, + {"Tangut", Var, 7}, + {"Telugu", Var, 0}, + {"Terminal_Punctuation", Var, 0}, + {"Thaana", Var, 0}, + {"Thai", Var, 0}, + {"Tibetan", Var, 0}, + {"Tifinagh", Var, 0}, + {"Tirhuta", Var, 4}, + {"Title", Var, 0}, + {"TitleCase", Const, 0}, + {"To", Func, 0}, + {"ToLower", Func, 0}, + {"ToTitle", Func, 0}, + {"ToUpper", Func, 0}, + {"Toto", Var, 21}, + {"TurkishCase", Var, 0}, + {"Ugaritic", Var, 0}, + {"Unified_Ideograph", Var, 0}, + {"Upper", Var, 0}, + {"UpperCase", Const, 0}, + {"UpperLower", Const, 0}, + {"Vai", Var, 0}, + {"Variation_Selector", Var, 0}, + {"Version", Const, 0}, + {"Vithkuqi", Var, 21}, + {"Wancho", Var, 14}, + {"Warang_Citi", Var, 4}, + {"White_Space", Var, 0}, + {"Yezidi", Var, 16}, + {"Yi", Var, 0}, + {"Z", Var, 0}, + {"Zanabazar_Square", Var, 10}, + {"Zl", Var, 0}, + {"Zp", Var, 0}, + {"Zs", Var, 0}, + }, + "unicode/utf16": { + {"AppendRune", Func, 20}, + {"Decode", Func, 0}, + {"DecodeRune", Func, 0}, + {"Encode", Func, 0}, + {"EncodeRune", Func, 0}, + {"IsSurrogate", Func, 0}, + }, + "unicode/utf8": { + {"AppendRune", Func, 18}, + {"DecodeLastRune", Func, 0}, + {"DecodeLastRuneInString", Func, 0}, + {"DecodeRune", Func, 0}, + {"DecodeRuneInString", Func, 0}, + {"EncodeRune", Func, 0}, + {"FullRune", Func, 0}, + {"FullRuneInString", Func, 0}, + {"MaxRune", Const, 0}, + {"RuneCount", Func, 0}, + {"RuneCountInString", Func, 0}, + {"RuneError", Const, 0}, + {"RuneLen", Func, 0}, + {"RuneSelf", Const, 0}, + {"RuneStart", Func, 0}, + {"UTFMax", Const, 0}, + {"Valid", Func, 0}, + {"ValidRune", Func, 1}, + {"ValidString", Func, 0}, + }, + "unsafe": { + {"Add", Func, 0}, + {"Alignof", Func, 0}, + {"Offsetof", Func, 0}, + {"Pointer", Type, 0}, + {"Sizeof", Func, 0}, + {"Slice", Func, 0}, + {"SliceData", Func, 0}, + {"String", Func, 0}, + {"StringData", Func, 0}, + }, +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/stdlib/stdlib.go b/pkg/k8s/vendor/golang.org/x/tools/internal/stdlib/stdlib.go new file mode 100644 index 00000000000..98904017f2c --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/stdlib/stdlib.go @@ -0,0 +1,97 @@ +// Copyright 2022 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. + +//go:generate go run generate.go + +// Package stdlib provides a table of all exported symbols in the +// standard library, along with the version at which they first +// appeared. +package stdlib + +import ( + "fmt" + "strings" +) + +type Symbol struct { + Name string + Kind Kind + Version Version // Go version that first included the symbol +} + +// A Kind indicates the kind of a symbol: +// function, variable, constant, type, and so on. +type Kind int8 + +const ( + Invalid Kind = iota // Example name: + Type // "Buffer" + Func // "Println" + Var // "EOF" + Const // "Pi" + Field // "Point.X" + Method // "(*Buffer).Grow" +) + +func (kind Kind) String() string { + return [...]string{ + Invalid: "invalid", + Type: "type", + Func: "func", + Var: "var", + Const: "const", + Field: "field", + Method: "method", + }[kind] +} + +// A Version represents a version of Go of the form "go1.%d". +type Version int8 + +// String returns a version string of the form "go1.23", without allocating. +func (v Version) String() string { return versions[v] } + +var versions [30]string // (increase constant as needed) + +func init() { + for i := range versions { + versions[i] = fmt.Sprintf("go1.%d", i) + } +} + +// HasPackage reports whether the specified package path is part of +// the standard library's public API. +func HasPackage(path string) bool { + _, ok := PackageSymbols[path] + return ok +} + +// SplitField splits the field symbol name into type and field +// components. It must be called only on Field symbols. +// +// Example: "File.Package" -> ("File", "Package") +func (sym *Symbol) SplitField() (typename, name string) { + if sym.Kind != Field { + panic("not a field") + } + typename, name, _ = strings.Cut(sym.Name, ".") + return +} + +// SplitMethod splits the method symbol name into pointer, receiver, +// and method components. It must be called only on Method symbols. +// +// Example: "(*Buffer).Grow" -> (true, "Buffer", "Grow") +func (sym *Symbol) SplitMethod() (ptr bool, recv, name string) { + if sym.Kind != Method { + panic("not a method") + } + recv, name, _ = strings.Cut(sym.Name, ".") + recv = recv[len("(") : len(recv)-len(")")] + ptr = recv[0] == '*' + if ptr { + recv = recv[len("*"):] + } + return +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go b/pkg/k8s/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go index 7e638ec24fc..ff9437a36cd 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go @@ -34,30 +34,16 @@ func GetLines(file *token.File) []int { lines []int _ []struct{} } - type tokenFile118 struct { - _ *token.FileSet // deleted in go1.19 - tokenFile119 - } - - type uP = unsafe.Pointer - switch unsafe.Sizeof(*file) { - case unsafe.Sizeof(tokenFile118{}): - var ptr *tokenFile118 - *(*uP)(uP(&ptr)) = uP(file) - ptr.mu.Lock() - defer ptr.mu.Unlock() - return ptr.lines - case unsafe.Sizeof(tokenFile119{}): - var ptr *tokenFile119 - *(*uP)(uP(&ptr)) = uP(file) - ptr.mu.Lock() - defer ptr.mu.Unlock() - return ptr.lines - - default: + if unsafe.Sizeof(*file) != unsafe.Sizeof(tokenFile119{}) { panic("unexpected token.File size") } + var ptr *tokenFile119 + type uP = unsafe.Pointer + *(*uP)(uP(&ptr)) = uP(file) + ptr.mu.Lock() + defer ptr.mu.Unlock() + return ptr.lines } // AddExistingFiles adds the specified files to the FileSet if they diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/common.go b/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/common.go deleted file mode 100644 index cdab9885314..00000000000 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/common.go +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright 2021 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 typeparams contains common utilities for writing tools that interact -// with generic Go code, as introduced with Go 1.18. -// -// Many of the types and functions in this package are proxies for the new APIs -// introduced in the standard library with Go 1.18. For example, the -// typeparams.Union type is an alias for go/types.Union, and the ForTypeSpec -// function returns the value of the go/ast.TypeSpec.TypeParams field. At Go -// versions older than 1.18 these helpers are implemented as stubs, allowing -// users of this package to write code that handles generic constructs inline, -// even if the Go version being used to compile does not support generics. -// -// Additionally, this package contains common utilities for working with the -// new generic constructs, to supplement the standard library APIs. Notably, -// the StructuralTerms API computes a minimal representation of the structural -// restrictions on a type parameter. -// -// An external version of these APIs is available in the -// golang.org/x/exp/typeparams module. -package typeparams - -import ( - "fmt" - "go/ast" - "go/token" - "go/types" -) - -// UnpackIndexExpr extracts data from AST nodes that represent index -// expressions. -// -// For an ast.IndexExpr, the resulting indices slice will contain exactly one -// index expression. For an ast.IndexListExpr (go1.18+), it may have a variable -// number of index expressions. -// -// For nodes that don't represent index expressions, the first return value of -// UnpackIndexExpr will be nil. -func UnpackIndexExpr(n ast.Node) (x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) { - switch e := n.(type) { - case *ast.IndexExpr: - return e.X, e.Lbrack, []ast.Expr{e.Index}, e.Rbrack - case *ast.IndexListExpr: - return e.X, e.Lbrack, e.Indices, e.Rbrack - } - return nil, token.NoPos, nil, token.NoPos -} - -// PackIndexExpr returns an *ast.IndexExpr or *ast.IndexListExpr, depending on -// the cardinality of indices. Calling PackIndexExpr with len(indices) == 0 -// will panic. -func PackIndexExpr(x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) ast.Expr { - switch len(indices) { - case 0: - panic("empty indices") - case 1: - return &ast.IndexExpr{ - X: x, - Lbrack: lbrack, - Index: indices[0], - Rbrack: rbrack, - } - default: - return &ast.IndexListExpr{ - X: x, - Lbrack: lbrack, - Indices: indices, - Rbrack: rbrack, - } - } -} - -// IsTypeParam reports whether t is a type parameter. -func IsTypeParam(t types.Type) bool { - _, ok := t.(*types.TypeParam) - return ok -} - -// OriginMethod returns the origin method associated with the method fn. -// For methods on a non-generic receiver base type, this is just -// fn. However, for methods with a generic receiver, OriginMethod returns the -// corresponding method in the method set of the origin type. -// -// As a special case, if fn is not a method (has no receiver), OriginMethod -// returns fn. -func OriginMethod(fn *types.Func) *types.Func { - recv := fn.Type().(*types.Signature).Recv() - if recv == nil { - return fn - } - base := recv.Type() - p, isPtr := base.(*types.Pointer) - if isPtr { - base = p.Elem() - } - named, isNamed := base.(*types.Named) - if !isNamed { - // Receiver is a *types.Interface. - return fn - } - if named.TypeParams().Len() == 0 { - // Receiver base has no type parameters, so we can avoid the lookup below. - return fn - } - orig := named.Origin() - gfn, _, _ := types.LookupFieldOrMethod(orig, true, fn.Pkg(), fn.Name()) - - // This is a fix for a gopls crash (#60628) due to a go/types bug (#60634). In: - // package p - // type T *int - // func (*T) f() {} - // LookupFieldOrMethod(T, true, p, f)=nil, but NewMethodSet(*T)={(*T).f}. - // Here we make them consistent by force. - // (The go/types bug is general, but this workaround is reached only - // for generic T thanks to the early return above.) - if gfn == nil { - mset := types.NewMethodSet(types.NewPointer(orig)) - for i := 0; i < mset.Len(); i++ { - m := mset.At(i) - if m.Obj().Id() == fn.Id() { - gfn = m.Obj() - break - } - } - } - - // In golang/go#61196, we observe another crash, this time inexplicable. - if gfn == nil { - panic(fmt.Sprintf("missing origin method for %s.%s; named == origin: %t, named.NumMethods(): %d, origin.NumMethods(): %d", named, fn, named == orig, named.NumMethods(), orig.NumMethods())) - } - - return gfn.(*types.Func) -} - -// GenericAssignableTo is a generalization of types.AssignableTo that -// implements the following rule for uninstantiated generic types: -// -// If V and T are generic named types, then V is considered assignable to T if, -// for every possible instantation of V[A_1, ..., A_N], the instantiation -// T[A_1, ..., A_N] is valid and V[A_1, ..., A_N] implements T[A_1, ..., A_N]. -// -// If T has structural constraints, they must be satisfied by V. -// -// For example, consider the following type declarations: -// -// type Interface[T any] interface { -// Accept(T) -// } -// -// type Container[T any] struct { -// Element T -// } -// -// func (c Container[T]) Accept(t T) { c.Element = t } -// -// In this case, GenericAssignableTo reports that instantiations of Container -// are assignable to the corresponding instantiation of Interface. -func GenericAssignableTo(ctxt *types.Context, V, T types.Type) bool { - // If V and T are not both named, or do not have matching non-empty type - // parameter lists, fall back on types.AssignableTo. - - VN, Vnamed := V.(*types.Named) - TN, Tnamed := T.(*types.Named) - if !Vnamed || !Tnamed { - return types.AssignableTo(V, T) - } - - vtparams := VN.TypeParams() - ttparams := TN.TypeParams() - if vtparams.Len() == 0 || vtparams.Len() != ttparams.Len() || VN.TypeArgs().Len() != 0 || TN.TypeArgs().Len() != 0 { - return types.AssignableTo(V, T) - } - - // V and T have the same (non-zero) number of type params. Instantiate both - // with the type parameters of V. This must always succeed for V, and will - // succeed for T if and only if the type set of each type parameter of V is a - // subset of the type set of the corresponding type parameter of T, meaning - // that every instantiation of V corresponds to a valid instantiation of T. - - // Minor optimization: ensure we share a context across the two - // instantiations below. - if ctxt == nil { - ctxt = types.NewContext() - } - - var targs []types.Type - for i := 0; i < vtparams.Len(); i++ { - targs = append(targs, vtparams.At(i)) - } - - vinst, err := types.Instantiate(ctxt, V, targs, true) - if err != nil { - panic("type parameters should satisfy their own constraints") - } - - tinst, err := types.Instantiate(ctxt, T, targs, true) - if err != nil { - return false - } - - return types.AssignableTo(vinst, tinst) -} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/coretype.go b/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/coretype.go deleted file mode 100644 index 7ea8840eab7..00000000000 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/coretype.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2022 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 typeparams - -import ( - "go/types" -) - -// CoreType returns the core type of T or nil if T does not have a core type. -// -// See https://go.dev/ref/spec#Core_types for the definition of a core type. -func CoreType(T types.Type) types.Type { - U := T.Underlying() - if _, ok := U.(*types.Interface); !ok { - return U // for non-interface types, - } - - terms, err := _NormalTerms(U) - if len(terms) == 0 || err != nil { - // len(terms) -> empty type set of interface. - // err != nil => U is invalid, exceeds complexity bounds, or has an empty type set. - return nil // no core type. - } - - U = terms[0].Type().Underlying() - var identical int // i in [0,identical) => Identical(U, terms[i].Type().Underlying()) - for identical = 1; identical < len(terms); identical++ { - if !types.Identical(U, terms[identical].Type().Underlying()) { - break - } - } - - if identical == len(terms) { - // https://go.dev/ref/spec#Core_types - // "There is a single type U which is the underlying type of all types in the type set of T" - return U - } - ch, ok := U.(*types.Chan) - if !ok { - return nil // no core type as identical < len(terms) and U is not a channel. - } - // https://go.dev/ref/spec#Core_types - // "the type chan E if T contains only bidirectional channels, or the type chan<- E or - // <-chan E depending on the direction of the directional channels present." - for chans := identical; chans < len(terms); chans++ { - curr, ok := terms[chans].Type().Underlying().(*types.Chan) - if !ok { - return nil - } - if !types.Identical(ch.Elem(), curr.Elem()) { - return nil // channel elements are not identical. - } - if ch.Dir() == types.SendRecv { - // ch is bidirectional. We can safely always use curr's direction. - ch = curr - } else if curr.Dir() != types.SendRecv && ch.Dir() != curr.Dir() { - // ch and curr are not bidirectional and not the same direction. - return nil - } - } - return ch -} - -// _NormalTerms returns a slice of terms representing the normalized structural -// type restrictions of a type, if any. -// -// For all types other than *types.TypeParam, *types.Interface, and -// *types.Union, this is just a single term with Tilde() == false and -// Type() == typ. For *types.TypeParam, *types.Interface, and *types.Union, see -// below. -// -// Structural type restrictions of a type parameter are created via -// non-interface types embedded in its constraint interface (directly, or via a -// chain of interface embeddings). For example, in the declaration type -// T[P interface{~int; m()}] int the structural restriction of the type -// parameter P is ~int. -// -// With interface embedding and unions, the specification of structural type -// restrictions may be arbitrarily complex. For example, consider the -// following: -// -// type A interface{ ~string|~[]byte } -// -// type B interface{ int|string } -// -// type C interface { ~string|~int } -// -// type T[P interface{ A|B; C }] int -// -// In this example, the structural type restriction of P is ~string|int: A|B -// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int, -// which when intersected with C (~string|~int) yields ~string|int. -// -// _NormalTerms computes these expansions and reductions, producing a -// "normalized" form of the embeddings. A structural restriction is normalized -// if it is a single union containing no interface terms, and is minimal in the -// sense that removing any term changes the set of types satisfying the -// constraint. It is left as a proof for the reader that, modulo sorting, there -// is exactly one such normalized form. -// -// Because the minimal representation always takes this form, _NormalTerms -// returns a slice of tilde terms corresponding to the terms of the union in -// the normalized structural restriction. An error is returned if the type is -// invalid, exceeds complexity bounds, or has an empty type set. In the latter -// case, _NormalTerms returns ErrEmptyTypeSet. -// -// _NormalTerms makes no guarantees about the order of terms, except that it -// is deterministic. -func _NormalTerms(typ types.Type) ([]*types.Term, error) { - switch typ := typ.(type) { - case *types.TypeParam: - return StructuralTerms(typ) - case *types.Union: - return UnionTermSet(typ) - case *types.Interface: - return InterfaceTermSet(typ) - default: - return []*types.Term{types.NewTerm(false, typ)}, nil - } -} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/normalize.go b/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/normalize.go deleted file mode 100644 index 93c80fdc96c..00000000000 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/normalize.go +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright 2021 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 typeparams - -import ( - "errors" - "fmt" - "go/types" - "os" - "strings" -) - -//go:generate go run copytermlist.go - -const debug = false - -var ErrEmptyTypeSet = errors.New("empty type set") - -// StructuralTerms returns a slice of terms representing the normalized -// structural type restrictions of a type parameter, if any. -// -// Structural type restrictions of a type parameter are created via -// non-interface types embedded in its constraint interface (directly, or via a -// chain of interface embeddings). For example, in the declaration -// -// type T[P interface{~int; m()}] int -// -// the structural restriction of the type parameter P is ~int. -// -// With interface embedding and unions, the specification of structural type -// restrictions may be arbitrarily complex. For example, consider the -// following: -// -// type A interface{ ~string|~[]byte } -// -// type B interface{ int|string } -// -// type C interface { ~string|~int } -// -// type T[P interface{ A|B; C }] int -// -// In this example, the structural type restriction of P is ~string|int: A|B -// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int, -// which when intersected with C (~string|~int) yields ~string|int. -// -// StructuralTerms computes these expansions and reductions, producing a -// "normalized" form of the embeddings. A structural restriction is normalized -// if it is a single union containing no interface terms, and is minimal in the -// sense that removing any term changes the set of types satisfying the -// constraint. It is left as a proof for the reader that, modulo sorting, there -// is exactly one such normalized form. -// -// Because the minimal representation always takes this form, StructuralTerms -// returns a slice of tilde terms corresponding to the terms of the union in -// the normalized structural restriction. An error is returned if the -// constraint interface is invalid, exceeds complexity bounds, or has an empty -// type set. In the latter case, StructuralTerms returns ErrEmptyTypeSet. -// -// StructuralTerms makes no guarantees about the order of terms, except that it -// is deterministic. -func StructuralTerms(tparam *types.TypeParam) ([]*types.Term, error) { - constraint := tparam.Constraint() - if constraint == nil { - return nil, fmt.Errorf("%s has nil constraint", tparam) - } - iface, _ := constraint.Underlying().(*types.Interface) - if iface == nil { - return nil, fmt.Errorf("constraint is %T, not *types.Interface", constraint.Underlying()) - } - return InterfaceTermSet(iface) -} - -// InterfaceTermSet computes the normalized terms for a constraint interface, -// returning an error if the term set cannot be computed or is empty. In the -// latter case, the error will be ErrEmptyTypeSet. -// -// See the documentation of StructuralTerms for more information on -// normalization. -func InterfaceTermSet(iface *types.Interface) ([]*types.Term, error) { - return computeTermSet(iface) -} - -// UnionTermSet computes the normalized terms for a union, returning an error -// if the term set cannot be computed or is empty. In the latter case, the -// error will be ErrEmptyTypeSet. -// -// See the documentation of StructuralTerms for more information on -// normalization. -func UnionTermSet(union *types.Union) ([]*types.Term, error) { - return computeTermSet(union) -} - -func computeTermSet(typ types.Type) ([]*types.Term, error) { - tset, err := computeTermSetInternal(typ, make(map[types.Type]*termSet), 0) - if err != nil { - return nil, err - } - if tset.terms.isEmpty() { - return nil, ErrEmptyTypeSet - } - if tset.terms.isAll() { - return nil, nil - } - var terms []*types.Term - for _, term := range tset.terms { - terms = append(terms, types.NewTerm(term.tilde, term.typ)) - } - return terms, nil -} - -// A termSet holds the normalized set of terms for a given type. -// -// The name termSet is intentionally distinct from 'type set': a type set is -// all types that implement a type (and includes method restrictions), whereas -// a term set just represents the structural restrictions on a type. -type termSet struct { - complete bool - terms termlist -} - -func indentf(depth int, format string, args ...interface{}) { - fmt.Fprintf(os.Stderr, strings.Repeat(".", depth)+format+"\n", args...) -} - -func computeTermSetInternal(t types.Type, seen map[types.Type]*termSet, depth int) (res *termSet, err error) { - if t == nil { - panic("nil type") - } - - if debug { - indentf(depth, "%s", t.String()) - defer func() { - if err != nil { - indentf(depth, "=> %s", err) - } else { - indentf(depth, "=> %s", res.terms.String()) - } - }() - } - - const maxTermCount = 100 - if tset, ok := seen[t]; ok { - if !tset.complete { - return nil, fmt.Errorf("cycle detected in the declaration of %s", t) - } - return tset, nil - } - - // Mark the current type as seen to avoid infinite recursion. - tset := new(termSet) - defer func() { - tset.complete = true - }() - seen[t] = tset - - switch u := t.Underlying().(type) { - case *types.Interface: - // The term set of an interface is the intersection of the term sets of its - // embedded types. - tset.terms = allTermlist - for i := 0; i < u.NumEmbeddeds(); i++ { - embedded := u.EmbeddedType(i) - if _, ok := embedded.Underlying().(*types.TypeParam); ok { - return nil, fmt.Errorf("invalid embedded type %T", embedded) - } - tset2, err := computeTermSetInternal(embedded, seen, depth+1) - if err != nil { - return nil, err - } - tset.terms = tset.terms.intersect(tset2.terms) - } - case *types.Union: - // The term set of a union is the union of term sets of its terms. - tset.terms = nil - for i := 0; i < u.Len(); i++ { - t := u.Term(i) - var terms termlist - switch t.Type().Underlying().(type) { - case *types.Interface: - tset2, err := computeTermSetInternal(t.Type(), seen, depth+1) - if err != nil { - return nil, err - } - terms = tset2.terms - case *types.TypeParam, *types.Union: - // A stand-alone type parameter or union is not permitted as union - // term. - return nil, fmt.Errorf("invalid union term %T", t) - default: - if t.Type() == types.Typ[types.Invalid] { - continue - } - terms = termlist{{t.Tilde(), t.Type()}} - } - tset.terms = tset.terms.union(terms) - if len(tset.terms) > maxTermCount { - return nil, fmt.Errorf("exceeded max term count %d", maxTermCount) - } - } - case *types.TypeParam: - panic("unreachable") - default: - // For all other types, the term set is just a single non-tilde term - // holding the type itself. - if u != types.Typ[types.Invalid] { - tset.terms = termlist{{false, t}} - } - } - return tset, nil -} - -// under is a facade for the go/types internal function of the same name. It is -// used by typeterm.go. -func under(t types.Type) types.Type { - return t.Underlying() -} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/termlist.go b/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/termlist.go deleted file mode 100644 index cbd12f80131..00000000000 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/termlist.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2021 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. - -// Code generated by copytermlist.go DO NOT EDIT. - -package typeparams - -import ( - "bytes" - "go/types" -) - -// A termlist represents the type set represented by the union -// t1 ∪ y2 ∪ ... tn of the type sets of the terms t1 to tn. -// A termlist is in normal form if all terms are disjoint. -// termlist operations don't require the operands to be in -// normal form. -type termlist []*term - -// allTermlist represents the set of all types. -// It is in normal form. -var allTermlist = termlist{new(term)} - -// String prints the termlist exactly (without normalization). -func (xl termlist) String() string { - if len(xl) == 0 { - return "∅" - } - var buf bytes.Buffer - for i, x := range xl { - if i > 0 { - buf.WriteString(" | ") - } - buf.WriteString(x.String()) - } - return buf.String() -} - -// isEmpty reports whether the termlist xl represents the empty set of types. -func (xl termlist) isEmpty() bool { - // If there's a non-nil term, the entire list is not empty. - // If the termlist is in normal form, this requires at most - // one iteration. - for _, x := range xl { - if x != nil { - return false - } - } - return true -} - -// isAll reports whether the termlist xl represents the set of all types. -func (xl termlist) isAll() bool { - // If there's a 𝓤 term, the entire list is 𝓤. - // If the termlist is in normal form, this requires at most - // one iteration. - for _, x := range xl { - if x != nil && x.typ == nil { - return true - } - } - return false -} - -// norm returns the normal form of xl. -func (xl termlist) norm() termlist { - // Quadratic algorithm, but good enough for now. - // TODO(gri) fix asymptotic performance - used := make([]bool, len(xl)) - var rl termlist - for i, xi := range xl { - if xi == nil || used[i] { - continue - } - for j := i + 1; j < len(xl); j++ { - xj := xl[j] - if xj == nil || used[j] { - continue - } - if u1, u2 := xi.union(xj); u2 == nil { - // If we encounter a 𝓤 term, the entire list is 𝓤. - // Exit early. - // (Note that this is not just an optimization; - // if we continue, we may end up with a 𝓤 term - // and other terms and the result would not be - // in normal form.) - if u1.typ == nil { - return allTermlist - } - xi = u1 - used[j] = true // xj is now unioned into xi - ignore it in future iterations - } - } - rl = append(rl, xi) - } - return rl -} - -// union returns the union xl ∪ yl. -func (xl termlist) union(yl termlist) termlist { - return append(xl, yl...).norm() -} - -// intersect returns the intersection xl ∩ yl. -func (xl termlist) intersect(yl termlist) termlist { - if xl.isEmpty() || yl.isEmpty() { - return nil - } - - // Quadratic algorithm, but good enough for now. - // TODO(gri) fix asymptotic performance - var rl termlist - for _, x := range xl { - for _, y := range yl { - if r := x.intersect(y); r != nil { - rl = append(rl, r) - } - } - } - return rl.norm() -} - -// equal reports whether xl and yl represent the same type set. -func (xl termlist) equal(yl termlist) bool { - // TODO(gri) this should be more efficient - return xl.subsetOf(yl) && yl.subsetOf(xl) -} - -// includes reports whether t ∈ xl. -func (xl termlist) includes(t types.Type) bool { - for _, x := range xl { - if x.includes(t) { - return true - } - } - return false -} - -// supersetOf reports whether y ⊆ xl. -func (xl termlist) supersetOf(y *term) bool { - for _, x := range xl { - if y.subsetOf(x) { - return true - } - } - return false -} - -// subsetOf reports whether xl ⊆ yl. -func (xl termlist) subsetOf(yl termlist) bool { - if yl.isEmpty() { - return xl.isEmpty() - } - - // each term x of xl must be a subset of yl - for _, x := range xl { - if !yl.supersetOf(x) { - return false // x is not a subset yl - } - } - return true -} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/typeterm.go b/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/typeterm.go deleted file mode 100644 index 7350bb702a1..00000000000 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/typeparams/typeterm.go +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2021 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. - -// Code generated by copytermlist.go DO NOT EDIT. - -package typeparams - -import "go/types" - -// A term describes elementary type sets: -// -// ∅: (*term)(nil) == ∅ // set of no types (empty set) -// 𝓤: &term{} == 𝓤 // set of all types (𝓤niverse) -// T: &term{false, T} == {T} // set of type T -// ~t: &term{true, t} == {t' | under(t') == t} // set of types with underlying type t -type term struct { - tilde bool // valid if typ != nil - typ types.Type -} - -func (x *term) String() string { - switch { - case x == nil: - return "∅" - case x.typ == nil: - return "𝓤" - case x.tilde: - return "~" + x.typ.String() - default: - return x.typ.String() - } -} - -// equal reports whether x and y represent the same type set. -func (x *term) equal(y *term) bool { - // easy cases - switch { - case x == nil || y == nil: - return x == y - case x.typ == nil || y.typ == nil: - return x.typ == y.typ - } - // ∅ ⊂ x, y ⊂ 𝓤 - - return x.tilde == y.tilde && types.Identical(x.typ, y.typ) -} - -// union returns the union x ∪ y: zero, one, or two non-nil terms. -func (x *term) union(y *term) (_, _ *term) { - // easy cases - switch { - case x == nil && y == nil: - return nil, nil // ∅ ∪ ∅ == ∅ - case x == nil: - return y, nil // ∅ ∪ y == y - case y == nil: - return x, nil // x ∪ ∅ == x - case x.typ == nil: - return x, nil // 𝓤 ∪ y == 𝓤 - case y.typ == nil: - return y, nil // x ∪ 𝓤 == 𝓤 - } - // ∅ ⊂ x, y ⊂ 𝓤 - - if x.disjoint(y) { - return x, y // x ∪ y == (x, y) if x ∩ y == ∅ - } - // x.typ == y.typ - - // ~t ∪ ~t == ~t - // ~t ∪ T == ~t - // T ∪ ~t == ~t - // T ∪ T == T - if x.tilde || !y.tilde { - return x, nil - } - return y, nil -} - -// intersect returns the intersection x ∩ y. -func (x *term) intersect(y *term) *term { - // easy cases - switch { - case x == nil || y == nil: - return nil // ∅ ∩ y == ∅ and ∩ ∅ == ∅ - case x.typ == nil: - return y // 𝓤 ∩ y == y - case y.typ == nil: - return x // x ∩ 𝓤 == x - } - // ∅ ⊂ x, y ⊂ 𝓤 - - if x.disjoint(y) { - return nil // x ∩ y == ∅ if x ∩ y == ∅ - } - // x.typ == y.typ - - // ~t ∩ ~t == ~t - // ~t ∩ T == T - // T ∩ ~t == T - // T ∩ T == T - if !x.tilde || y.tilde { - return x - } - return y -} - -// includes reports whether t ∈ x. -func (x *term) includes(t types.Type) bool { - // easy cases - switch { - case x == nil: - return false // t ∈ ∅ == false - case x.typ == nil: - return true // t ∈ 𝓤 == true - } - // ∅ ⊂ x ⊂ 𝓤 - - u := t - if x.tilde { - u = under(u) - } - return types.Identical(x.typ, u) -} - -// subsetOf reports whether x ⊆ y. -func (x *term) subsetOf(y *term) bool { - // easy cases - switch { - case x == nil: - return true // ∅ ⊆ y == true - case y == nil: - return false // x ⊆ ∅ == false since x != ∅ - case y.typ == nil: - return true // x ⊆ 𝓤 == true - case x.typ == nil: - return false // 𝓤 ⊆ y == false since y != 𝓤 - } - // ∅ ⊂ x, y ⊂ 𝓤 - - if x.disjoint(y) { - return false // x ⊆ y == false if x ∩ y == ∅ - } - // x.typ == y.typ - - // ~t ⊆ ~t == true - // ~t ⊆ T == false - // T ⊆ ~t == true - // T ⊆ T == true - return !x.tilde || y.tilde -} - -// disjoint reports whether x ∩ y == ∅. -// x.typ and y.typ must not be nil. -func (x *term) disjoint(y *term) bool { - if debug && (x.typ == nil || y.typ == nil) { - panic("invalid argument(s)") - } - ux := x.typ - if y.tilde { - ux = under(ux) - } - uy := y.typ - if x.tilde { - uy = under(uy) - } - return !types.Identical(ux, uy) -} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go b/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go index 07484073a57..834e05381ce 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go @@ -167,7 +167,7 @@ const ( UntypedNilUse // WrongAssignCount occurs when the number of values on the right-hand side - // of an assignment or or initialization expression does not match the number + // of an assignment or initialization expression does not match the number // of variables on the left-hand side. // // Example: @@ -1449,10 +1449,10 @@ const ( NotAGenericType // WrongTypeArgCount occurs when a type or function is instantiated with an - // incorrent number of type arguments, including when a generic type or + // incorrect number of type arguments, including when a generic type or // function is used without instantiation. // - // Errors inolving failed type inference are assigned other error codes. + // Errors involving failed type inference are assigned other error codes. // // Example: // type T[p any] int diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/recv.go b/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/recv.go new file mode 100644 index 00000000000..fea7c8b75e8 --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/recv.go @@ -0,0 +1,43 @@ +// Copyright 2024 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 typesinternal + +import ( + "go/types" + + "golang.org/x/tools/internal/aliases" +) + +// ReceiverNamed returns the named type (if any) associated with the +// type of recv, which may be of the form N or *N, or aliases thereof. +// It also reports whether a Pointer was present. +func ReceiverNamed(recv *types.Var) (isPtr bool, named *types.Named) { + t := recv.Type() + if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok { + isPtr = true + t = ptr.Elem() + } + named, _ = aliases.Unalias(t).(*types.Named) + return +} + +// Unpointer returns T given *T or an alias thereof. +// For all other types it is the identity function. +// It does not look at underlying types. +// The result may be an alias. +// +// Use this function to strip off the optional pointer on a receiver +// in a field or method selection, without losing the named type +// (which is needed to compute the method set). +// +// See also [typeparams.MustDeref], which removes one level of +// indirection from the type, regardless of named types (analogous to +// a LOAD instruction). +func Unpointer(t types.Type) types.Type { + if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok { + return ptr.Elem() + } + return t +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/toonew.go b/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/toonew.go new file mode 100644 index 00000000000..cc86487eaa0 --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/toonew.go @@ -0,0 +1,89 @@ +// Copyright 2024 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 typesinternal + +import ( + "go/types" + + "golang.org/x/tools/internal/stdlib" + "golang.org/x/tools/internal/versions" +) + +// TooNewStdSymbols computes the set of package-level symbols +// exported by pkg that are not available at the specified version. +// The result maps each symbol to its minimum version. +// +// The pkg is allowed to contain type errors. +func TooNewStdSymbols(pkg *types.Package, version string) map[types.Object]string { + disallowed := make(map[types.Object]string) + + // Pass 1: package-level symbols. + symbols := stdlib.PackageSymbols[pkg.Path()] + for _, sym := range symbols { + symver := sym.Version.String() + if versions.Before(version, symver) { + switch sym.Kind { + case stdlib.Func, stdlib.Var, stdlib.Const, stdlib.Type: + disallowed[pkg.Scope().Lookup(sym.Name)] = symver + } + } + } + + // Pass 2: fields and methods. + // + // We allow fields and methods if their associated type is + // disallowed, as otherwise we would report false positives + // for compatibility shims. Consider: + // + // //go:build go1.22 + // type T struct { F std.Real } // correct new API + // + // //go:build !go1.22 + // type T struct { F fake } // shim + // type fake struct { ... } + // func (fake) M () {} + // + // These alternative declarations of T use either the std.Real + // type, introduced in go1.22, or a fake type, for the field + // F. (The fakery could be arbitrarily deep, involving more + // nested fields and methods than are shown here.) Clients + // that use the compatibility shim T will compile with any + // version of go, whether older or newer than go1.22, but only + // the newer version will use the std.Real implementation. + // + // Now consider a reference to method M in new(T).F.M() in a + // module that requires a minimum of go1.21. The analysis may + // occur using a version of Go higher than 1.21, selecting the + // first version of T, so the method M is Real.M. This would + // spuriously cause the analyzer to report a reference to a + // too-new symbol even though this expression compiles just + // fine (with the fake implementation) using go1.21. + for _, sym := range symbols { + symVersion := sym.Version.String() + if !versions.Before(version, symVersion) { + continue // allowed + } + + var obj types.Object + switch sym.Kind { + case stdlib.Field: + typename, name := sym.SplitField() + if t := pkg.Scope().Lookup(typename); t != nil && disallowed[t] == "" { + obj, _, _ = types.LookupFieldOrMethod(t.Type(), false, pkg, name) + } + + case stdlib.Method: + ptr, recvname, name := sym.SplitMethod() + if t := pkg.Scope().Lookup(recvname); t != nil && disallowed[t] == "" { + obj, _, _ = types.LookupFieldOrMethod(t.Type(), ptr, pkg, name) + } + } + if obj != nil { + disallowed[obj] = symVersion + } + } + + return disallowed +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/types.go b/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/types.go index ce7d4351b22..7c77c2fbc03 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/types.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/types.go @@ -48,5 +48,3 @@ func ReadGo116ErrorData(err types.Error) (code ErrorCode, start, end token.Pos, } return ErrorCode(data[0]), token.Pos(data[1]), token.Pos(data[2]), true } - -var SetGoVersion = func(conf *types.Config, version string) bool { return false } diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/types_118.go b/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/types_118.go deleted file mode 100644 index a42b072a67d..00000000000 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/typesinternal/types_118.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2021 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. - -//go:build go1.18 -// +build go1.18 - -package typesinternal - -import ( - "go/types" -) - -func init() { - SetGoVersion = func(conf *types.Config, version string) bool { - conf.GoVersion = version - return true - } -} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/features.go b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/features.go new file mode 100644 index 00000000000..b53f1786161 --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/features.go @@ -0,0 +1,43 @@ +// Copyright 2023 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 versions + +// This file contains predicates for working with file versions to +// decide when a tool should consider a language feature enabled. + +// GoVersions that features in x/tools can be gated to. +const ( + Go1_18 = "go1.18" + Go1_19 = "go1.19" + Go1_20 = "go1.20" + Go1_21 = "go1.21" + Go1_22 = "go1.22" +) + +// Future is an invalid unknown Go version sometime in the future. +// Do not use directly with Compare. +const Future = "" + +// AtLeast reports whether the file version v comes after a Go release. +// +// Use this predicate to enable a behavior once a certain Go release +// has happened (and stays enabled in the future). +func AtLeast(v, release string) bool { + if v == Future { + return true // an unknown future version is always after y. + } + return Compare(Lang(v), Lang(release)) >= 0 +} + +// Before reports whether the file version v is strictly before a Go release. +// +// Use this predicate to disable a behavior once a certain Go release +// has happened (and stays enabled in the future). +func Before(v, release string) bool { + if v == Future { + return false // an unknown future version happens after y. + } + return Compare(Lang(v), Lang(release)) < 0 +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain.go b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain.go new file mode 100644 index 00000000000..377bf7a53b4 --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain.go @@ -0,0 +1,14 @@ +// Copyright 2024 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 versions + +// toolchain is maximum version (<1.22) that the go toolchain used +// to build the current tool is known to support. +// +// When a tool is built with >=1.22, the value of toolchain is unused. +// +// x/tools does not support building with go <1.18. So we take this +// as the minimum possible maximum. +var toolchain string = Go1_18 diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go119.go b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go119.go new file mode 100644 index 00000000000..f65beed9d83 --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go119.go @@ -0,0 +1,14 @@ +// Copyright 2024 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. + +//go:build go1.19 +// +build go1.19 + +package versions + +func init() { + if Compare(toolchain, Go1_19) < 0 { + toolchain = Go1_19 + } +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go120.go b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go120.go new file mode 100644 index 00000000000..1a9efa126cd --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go120.go @@ -0,0 +1,14 @@ +// Copyright 2024 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. + +//go:build go1.20 +// +build go1.20 + +package versions + +func init() { + if Compare(toolchain, Go1_20) < 0 { + toolchain = Go1_20 + } +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go121.go b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go121.go new file mode 100644 index 00000000000..b7ef216dfec --- /dev/null +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/toolchain_go121.go @@ -0,0 +1,14 @@ +// Copyright 2024 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. + +//go:build go1.21 +// +build go1.21 + +package versions + +func init() { + if Compare(toolchain, Go1_21) < 0 { + toolchain = Go1_21 + } +} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/types_go121.go b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/types_go121.go index a7b79207aee..b4345d3349e 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/types_go121.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/types_go121.go @@ -12,9 +12,19 @@ import ( "go/types" ) -// FileVersions always reports the a file's Go version as the -// zero version at this Go version. -func FileVersions(info *types.Info, file *ast.File) string { return "" } +// FileVersion returns a language version (<=1.21) derived from runtime.Version() +// or an unknown future version. +func FileVersion(info *types.Info, file *ast.File) string { + // In x/tools built with Go <= 1.21, we do not have Info.FileVersions + // available. We use a go version derived from the toolchain used to + // compile the tool by default. + // This will be <= go1.21. We take this as the maximum version that + // this tool can support. + // + // There are no features currently in x/tools that need to tell fine grained + // differences for versions <1.22. + return toolchain +} -// InitFileVersions is a noop at this Go version. +// InitFileVersions is a noop when compiled with this Go version. func InitFileVersions(*types.Info) {} diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/types_go122.go b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/types_go122.go index 7b9ba89a822..aac5db62c98 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/types_go122.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/types_go122.go @@ -12,10 +12,27 @@ import ( "go/types" ) -// FileVersions maps a file to the file's semantic Go version. -// The reported version is the zero version if a version cannot be determined. -func FileVersions(info *types.Info, file *ast.File) string { - return info.FileVersions[file] +// FileVersion returns a file's Go version. +// The reported version is an unknown Future version if a +// version cannot be determined. +func FileVersion(info *types.Info, file *ast.File) string { + // In tools built with Go >= 1.22, the Go version of a file + // follow a cascades of sources: + // 1) types.Info.FileVersion, which follows the cascade: + // 1.a) file version (ast.File.GoVersion), + // 1.b) the package version (types.Config.GoVersion), or + // 2) is some unknown Future version. + // + // File versions require a valid package version to be provided to types + // in Config.GoVersion. Config.GoVersion is either from the package's module + // or the toolchain (go run). This value should be provided by go/packages + // or unitchecker.Config.GoVersion. + if v := info.FileVersions[file]; IsValid(v) { + return v + } + // Note: we could instead return runtime.Version() [if valid]. + // This would act as a max version on what a tool can support. + return Future } // InitFileVersions initializes info to record Go versions for Go files. diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/versions_go121.go b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/versions.go similarity index 77% rename from pkg/k8s/vendor/golang.org/x/tools/internal/versions/versions_go121.go rename to pkg/k8s/vendor/golang.org/x/tools/internal/versions/versions.go index cf4a7d0360f..8d1f7453dbf 100644 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/versions_go121.go +++ b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/versions.go @@ -2,11 +2,18 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !go1.22 -// +build !go1.22 - package versions +import ( + "strings" +) + +// Note: If we use build tags to use go/versions when go >=1.22, +// we run into go.dev/issue/53737. Under some operations users would see an +// import of "go/versions" even if they would not compile the file. +// For example, during `go get -u ./...` (go.dev/issue/64490) we do not try to include +// For this reason, this library just a clone of go/versions for the moment. + // Lang returns the Go language version for version x. // If x is not a valid version, Lang returns the empty string. // For example: @@ -42,6 +49,7 @@ func IsValid(x string) bool { return isValid(stripGo(x)) } // stripGo converts from a "go1.21" version to a "1.21" version. // If v does not start with "go", stripGo returns the empty string (a known invalid version). func stripGo(v string) string { + v, _, _ = strings.Cut(v, "-") // strip -bigcorp suffix. if len(v) < 2 || v[:2] != "go" { return "" } diff --git a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/versions_go122.go b/pkg/k8s/vendor/golang.org/x/tools/internal/versions/versions_go122.go deleted file mode 100644 index c1c1814b28d..00000000000 --- a/pkg/k8s/vendor/golang.org/x/tools/internal/versions/versions_go122.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2023 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. - -//go:build go1.22 -// +build go1.22 - -package versions - -import ( - "go/version" -) - -// Lang returns the Go language version for version x. -// If x is not a valid version, Lang returns the empty string. -// For example: -// -// Lang("go1.21rc2") = "go1.21" -// Lang("go1.21.2") = "go1.21" -// Lang("go1.21") = "go1.21" -// Lang("go1") = "go1" -// Lang("bad") = "" -// Lang("1.21") = "" -func Lang(x string) string { return version.Lang(x) } - -// Compare returns -1, 0, or +1 depending on whether -// x < y, x == y, or x > y, interpreted as Go versions. -// The versions x and y must begin with a "go" prefix: "go1.21" not "1.21". -// Invalid versions, including the empty string, compare less than -// valid versions and equal to each other. -// The language version "go1.21" compares less than the -// release candidate and eventual releases "go1.21rc1" and "go1.21.0". -// Custom toolchain suffixes are ignored during comparison: -// "go1.21.0" and "go1.21.0-bigcorp" are equal. -func Compare(x, y string) int { return version.Compare(x, y) } - -// IsValid reports whether the version x is valid. -func IsValid(x string) bool { return version.IsValid(x) } diff --git a/pkg/k8s/vendor/google.golang.org/appengine/LICENSE b/pkg/k8s/vendor/google.golang.org/appengine/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/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/pkg/k8s/vendor/google.golang.org/appengine/internal/api.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/api.go deleted file mode 100644 index 0569f5dd43e..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/api.go +++ /dev/null @@ -1,653 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build !appengine -// +build !appengine - -package internal - -import ( - "bytes" - "context" - "errors" - "fmt" - "io/ioutil" - "log" - "net" - "net/http" - "net/url" - "os" - "runtime" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/golang/protobuf/proto" - - basepb "google.golang.org/appengine/internal/base" - logpb "google.golang.org/appengine/internal/log" - remotepb "google.golang.org/appengine/internal/remote_api" -) - -const ( - apiPath = "/rpc_http" -) - -var ( - // Incoming headers. - ticketHeader = http.CanonicalHeaderKey("X-AppEngine-API-Ticket") - dapperHeader = http.CanonicalHeaderKey("X-Google-DapperTraceInfo") - traceHeader = http.CanonicalHeaderKey("X-Cloud-Trace-Context") - curNamespaceHeader = http.CanonicalHeaderKey("X-AppEngine-Current-Namespace") - userIPHeader = http.CanonicalHeaderKey("X-AppEngine-User-IP") - remoteAddrHeader = http.CanonicalHeaderKey("X-AppEngine-Remote-Addr") - devRequestIdHeader = http.CanonicalHeaderKey("X-Appengine-Dev-Request-Id") - - // Outgoing headers. - apiEndpointHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Endpoint") - apiEndpointHeaderValue = []string{"app-engine-apis"} - apiMethodHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Method") - apiMethodHeaderValue = []string{"/VMRemoteAPI.CallRemoteAPI"} - apiDeadlineHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Deadline") - apiContentType = http.CanonicalHeaderKey("Content-Type") - apiContentTypeValue = []string{"application/octet-stream"} - logFlushHeader = http.CanonicalHeaderKey("X-AppEngine-Log-Flush-Count") - - apiHTTPClient = &http.Client{ - Transport: &http.Transport{ - Proxy: http.ProxyFromEnvironment, - Dial: limitDial, - MaxIdleConns: 1000, - MaxIdleConnsPerHost: 10000, - IdleConnTimeout: 90 * time.Second, - }, - } -) - -func apiURL(ctx context.Context) *url.URL { - host, port := "appengine.googleapis.internal", "10001" - if h := os.Getenv("API_HOST"); h != "" { - host = h - } - if hostOverride := ctx.Value(apiHostOverrideKey); hostOverride != nil { - host = hostOverride.(string) - } - if p := os.Getenv("API_PORT"); p != "" { - port = p - } - if portOverride := ctx.Value(apiPortOverrideKey); portOverride != nil { - port = portOverride.(string) - } - return &url.URL{ - Scheme: "http", - Host: host + ":" + port, - Path: apiPath, - } -} - -// Middleware wraps an http handler so that it can make GAE API calls -func Middleware(next http.Handler) http.Handler { - return handleHTTPMiddleware(executeRequestSafelyMiddleware(next)) -} - -func handleHTTPMiddleware(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - c := &aeContext{ - req: r, - outHeader: w.Header(), - } - r = r.WithContext(withContext(r.Context(), c)) - c.req = r - - stopFlushing := make(chan int) - - // Patch up RemoteAddr so it looks reasonable. - if addr := r.Header.Get(userIPHeader); addr != "" { - r.RemoteAddr = addr - } else if addr = r.Header.Get(remoteAddrHeader); addr != "" { - r.RemoteAddr = addr - } else { - // Should not normally reach here, but pick a sensible default anyway. - r.RemoteAddr = "127.0.0.1" - } - // The address in the headers will most likely be of these forms: - // 123.123.123.123 - // 2001:db8::1 - // net/http.Request.RemoteAddr is specified to be in "IP:port" form. - if _, _, err := net.SplitHostPort(r.RemoteAddr); err != nil { - // Assume the remote address is only a host; add a default port. - r.RemoteAddr = net.JoinHostPort(r.RemoteAddr, "80") - } - - if logToLogservice() { - // Start goroutine responsible for flushing app logs. - // This is done after adding c to ctx.m (and stopped before removing it) - // because flushing logs requires making an API call. - go c.logFlusher(stopFlushing) - } - - next.ServeHTTP(c, r) - c.outHeader = nil // make sure header changes aren't respected any more - - flushed := make(chan struct{}) - if logToLogservice() { - stopFlushing <- 1 // any logging beyond this point will be dropped - - // Flush any pending logs asynchronously. - c.pendingLogs.Lock() - flushes := c.pendingLogs.flushes - if len(c.pendingLogs.lines) > 0 { - flushes++ - } - c.pendingLogs.Unlock() - go func() { - defer close(flushed) - // Force a log flush, because with very short requests we - // may not ever flush logs. - c.flushLog(true) - }() - w.Header().Set(logFlushHeader, strconv.Itoa(flushes)) - } - - // Avoid nil Write call if c.Write is never called. - if c.outCode != 0 { - w.WriteHeader(c.outCode) - } - if c.outBody != nil { - w.Write(c.outBody) - } - if logToLogservice() { - // Wait for the last flush to complete before returning, - // otherwise the security ticket will not be valid. - <-flushed - } - }) -} - -func executeRequestSafelyMiddleware(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - defer func() { - if x := recover(); x != nil { - c := w.(*aeContext) - logf(c, 4, "%s", renderPanic(x)) // 4 == critical - c.outCode = 500 - } - }() - - next.ServeHTTP(w, r) - }) -} - -func renderPanic(x interface{}) string { - buf := make([]byte, 16<<10) // 16 KB should be plenty - buf = buf[:runtime.Stack(buf, false)] - - // Remove the first few stack frames: - // this func - // the recover closure in the caller - // That will root the stack trace at the site of the panic. - const ( - skipStart = "internal.renderPanic" - skipFrames = 2 - ) - start := bytes.Index(buf, []byte(skipStart)) - p := start - for i := 0; i < skipFrames*2 && p+1 < len(buf); i++ { - p = bytes.IndexByte(buf[p+1:], '\n') + p + 1 - if p < 0 { - break - } - } - if p >= 0 { - // buf[start:p+1] is the block to remove. - // Copy buf[p+1:] over buf[start:] and shrink buf. - copy(buf[start:], buf[p+1:]) - buf = buf[:len(buf)-(p+1-start)] - } - - // Add panic heading. - head := fmt.Sprintf("panic: %v\n\n", x) - if len(head) > len(buf) { - // Extremely unlikely to happen. - return head - } - copy(buf[len(head):], buf) - copy(buf, head) - - return string(buf) -} - -// aeContext represents the aeContext of an in-flight HTTP request. -// It implements the appengine.Context and http.ResponseWriter interfaces. -type aeContext struct { - req *http.Request - - outCode int - outHeader http.Header - outBody []byte - - pendingLogs struct { - sync.Mutex - lines []*logpb.UserAppLogLine - flushes int - } -} - -var contextKey = "holds a *context" - -// jointContext joins two contexts in a superficial way. -// It takes values and timeouts from a base context, and only values from another context. -type jointContext struct { - base context.Context - valuesOnly context.Context -} - -func (c jointContext) Deadline() (time.Time, bool) { - return c.base.Deadline() -} - -func (c jointContext) Done() <-chan struct{} { - return c.base.Done() -} - -func (c jointContext) Err() error { - return c.base.Err() -} - -func (c jointContext) Value(key interface{}) interface{} { - if val := c.base.Value(key); val != nil { - return val - } - return c.valuesOnly.Value(key) -} - -// fromContext returns the App Engine context or nil if ctx is not -// derived from an App Engine context. -func fromContext(ctx context.Context) *aeContext { - c, _ := ctx.Value(&contextKey).(*aeContext) - return c -} - -func withContext(parent context.Context, c *aeContext) context.Context { - ctx := context.WithValue(parent, &contextKey, c) - if ns := c.req.Header.Get(curNamespaceHeader); ns != "" { - ctx = withNamespace(ctx, ns) - } - return ctx -} - -func toContext(c *aeContext) context.Context { - return withContext(context.Background(), c) -} - -func IncomingHeaders(ctx context.Context) http.Header { - if c := fromContext(ctx); c != nil { - return c.req.Header - } - return nil -} - -func ReqContext(req *http.Request) context.Context { - return req.Context() -} - -func WithContext(parent context.Context, req *http.Request) context.Context { - return jointContext{ - base: parent, - valuesOnly: req.Context(), - } -} - -// RegisterTestRequest registers the HTTP request req for testing, such that -// any API calls are sent to the provided URL. -// It should only be used by aetest package. -func RegisterTestRequest(req *http.Request, apiURL *url.URL, appID string) *http.Request { - ctx := req.Context() - ctx = withAPIHostOverride(ctx, apiURL.Hostname()) - ctx = withAPIPortOverride(ctx, apiURL.Port()) - ctx = WithAppIDOverride(ctx, appID) - - // use the unregistered request as a placeholder so that withContext can read the headers - c := &aeContext{req: req} - c.req = req.WithContext(withContext(ctx, c)) - return c.req -} - -var errTimeout = &CallError{ - Detail: "Deadline exceeded", - Code: int32(remotepb.RpcError_CANCELLED), - Timeout: true, -} - -func (c *aeContext) Header() http.Header { return c.outHeader } - -// Copied from $GOROOT/src/pkg/net/http/transfer.go. Some response status -// codes do not permit a response body (nor response entity headers such as -// Content-Length, Content-Type, etc). -func bodyAllowedForStatus(status int) bool { - switch { - case status >= 100 && status <= 199: - return false - case status == 204: - return false - case status == 304: - return false - } - return true -} - -func (c *aeContext) Write(b []byte) (int, error) { - if c.outCode == 0 { - c.WriteHeader(http.StatusOK) - } - if len(b) > 0 && !bodyAllowedForStatus(c.outCode) { - return 0, http.ErrBodyNotAllowed - } - c.outBody = append(c.outBody, b...) - return len(b), nil -} - -func (c *aeContext) WriteHeader(code int) { - if c.outCode != 0 { - logf(c, 3, "WriteHeader called multiple times on request.") // error level - return - } - c.outCode = code -} - -func post(ctx context.Context, body []byte, timeout time.Duration) (b []byte, err error) { - apiURL := apiURL(ctx) - hreq := &http.Request{ - Method: "POST", - URL: apiURL, - Header: http.Header{ - apiEndpointHeader: apiEndpointHeaderValue, - apiMethodHeader: apiMethodHeaderValue, - apiContentType: apiContentTypeValue, - apiDeadlineHeader: []string{strconv.FormatFloat(timeout.Seconds(), 'f', -1, 64)}, - }, - Body: ioutil.NopCloser(bytes.NewReader(body)), - ContentLength: int64(len(body)), - Host: apiURL.Host, - } - c := fromContext(ctx) - if c != nil { - if info := c.req.Header.Get(dapperHeader); info != "" { - hreq.Header.Set(dapperHeader, info) - } - if info := c.req.Header.Get(traceHeader); info != "" { - hreq.Header.Set(traceHeader, info) - } - } - - tr := apiHTTPClient.Transport.(*http.Transport) - - var timedOut int32 // atomic; set to 1 if timed out - t := time.AfterFunc(timeout, func() { - atomic.StoreInt32(&timedOut, 1) - tr.CancelRequest(hreq) - }) - defer t.Stop() - defer func() { - // Check if timeout was exceeded. - if atomic.LoadInt32(&timedOut) != 0 { - err = errTimeout - } - }() - - hresp, err := apiHTTPClient.Do(hreq) - if err != nil { - return nil, &CallError{ - Detail: fmt.Sprintf("service bridge HTTP failed: %v", err), - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - defer hresp.Body.Close() - hrespBody, err := ioutil.ReadAll(hresp.Body) - if hresp.StatusCode != 200 { - return nil, &CallError{ - Detail: fmt.Sprintf("service bridge returned HTTP %d (%q)", hresp.StatusCode, hrespBody), - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - if err != nil { - return nil, &CallError{ - Detail: fmt.Sprintf("service bridge response bad: %v", err), - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - return hrespBody, nil -} - -func Call(ctx context.Context, service, method string, in, out proto.Message) error { - if ns := NamespaceFromContext(ctx); ns != "" { - if fn, ok := NamespaceMods[service]; ok { - fn(in, ns) - } - } - - if f, ctx, ok := callOverrideFromContext(ctx); ok { - return f(ctx, service, method, in, out) - } - - // Handle already-done contexts quickly. - select { - case <-ctx.Done(): - return ctx.Err() - default: - } - - c := fromContext(ctx) - - // Apply transaction modifications if we're in a transaction. - if t := transactionFromContext(ctx); t != nil { - if t.finished { - return errors.New("transaction aeContext has expired") - } - applyTransaction(in, &t.transaction) - } - - // Default RPC timeout is 60s. - timeout := 60 * time.Second - if deadline, ok := ctx.Deadline(); ok { - timeout = deadline.Sub(time.Now()) - } - - data, err := proto.Marshal(in) - if err != nil { - return err - } - - ticket := "" - if c != nil { - ticket = c.req.Header.Get(ticketHeader) - if dri := c.req.Header.Get(devRequestIdHeader); IsDevAppServer() && dri != "" { - ticket = dri - } - } - req := &remotepb.Request{ - ServiceName: &service, - Method: &method, - Request: data, - RequestId: &ticket, - } - hreqBody, err := proto.Marshal(req) - if err != nil { - return err - } - - hrespBody, err := post(ctx, hreqBody, timeout) - if err != nil { - return err - } - - res := &remotepb.Response{} - if err := proto.Unmarshal(hrespBody, res); err != nil { - return err - } - if res.RpcError != nil { - ce := &CallError{ - Detail: res.RpcError.GetDetail(), - Code: *res.RpcError.Code, - } - switch remotepb.RpcError_ErrorCode(ce.Code) { - case remotepb.RpcError_CANCELLED, remotepb.RpcError_DEADLINE_EXCEEDED: - ce.Timeout = true - } - return ce - } - if res.ApplicationError != nil { - return &APIError{ - Service: *req.ServiceName, - Detail: res.ApplicationError.GetDetail(), - Code: *res.ApplicationError.Code, - } - } - if res.Exception != nil || res.JavaException != nil { - // This shouldn't happen, but let's be defensive. - return &CallError{ - Detail: "service bridge returned exception", - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - return proto.Unmarshal(res.Response, out) -} - -func (c *aeContext) Request() *http.Request { - return c.req -} - -func (c *aeContext) addLogLine(ll *logpb.UserAppLogLine) { - // Truncate long log lines. - // TODO(dsymonds): Check if this is still necessary. - const lim = 8 << 10 - if len(*ll.Message) > lim { - suffix := fmt.Sprintf("...(length %d)", len(*ll.Message)) - ll.Message = proto.String((*ll.Message)[:lim-len(suffix)] + suffix) - } - - c.pendingLogs.Lock() - c.pendingLogs.lines = append(c.pendingLogs.lines, ll) - c.pendingLogs.Unlock() -} - -var logLevelName = map[int64]string{ - 0: "DEBUG", - 1: "INFO", - 2: "WARNING", - 3: "ERROR", - 4: "CRITICAL", -} - -func logf(c *aeContext, level int64, format string, args ...interface{}) { - if c == nil { - panic("not an App Engine aeContext") - } - s := fmt.Sprintf(format, args...) - s = strings.TrimRight(s, "\n") // Remove any trailing newline characters. - if logToLogservice() { - c.addLogLine(&logpb.UserAppLogLine{ - TimestampUsec: proto.Int64(time.Now().UnixNano() / 1e3), - Level: &level, - Message: &s, - }) - } - // Log to stdout if not deployed - if !IsSecondGen() { - log.Print(logLevelName[level] + ": " + s) - } -} - -// flushLog attempts to flush any pending logs to the appserver. -// It should not be called concurrently. -func (c *aeContext) flushLog(force bool) (flushed bool) { - c.pendingLogs.Lock() - // Grab up to 30 MB. We can get away with up to 32 MB, but let's be cautious. - n, rem := 0, 30<<20 - for ; n < len(c.pendingLogs.lines); n++ { - ll := c.pendingLogs.lines[n] - // Each log line will require about 3 bytes of overhead. - nb := proto.Size(ll) + 3 - if nb > rem { - break - } - rem -= nb - } - lines := c.pendingLogs.lines[:n] - c.pendingLogs.lines = c.pendingLogs.lines[n:] - c.pendingLogs.Unlock() - - if len(lines) == 0 && !force { - // Nothing to flush. - return false - } - - rescueLogs := false - defer func() { - if rescueLogs { - c.pendingLogs.Lock() - c.pendingLogs.lines = append(lines, c.pendingLogs.lines...) - c.pendingLogs.Unlock() - } - }() - - buf, err := proto.Marshal(&logpb.UserAppLogGroup{ - LogLine: lines, - }) - if err != nil { - log.Printf("internal.flushLog: marshaling UserAppLogGroup: %v", err) - rescueLogs = true - return false - } - - req := &logpb.FlushRequest{ - Logs: buf, - } - res := &basepb.VoidProto{} - c.pendingLogs.Lock() - c.pendingLogs.flushes++ - c.pendingLogs.Unlock() - if err := Call(toContext(c), "logservice", "Flush", req, res); err != nil { - log.Printf("internal.flushLog: Flush RPC: %v", err) - rescueLogs = true - return false - } - return true -} - -const ( - // Log flushing parameters. - flushInterval = 1 * time.Second - forceFlushInterval = 60 * time.Second -) - -func (c *aeContext) logFlusher(stop <-chan int) { - lastFlush := time.Now() - tick := time.NewTicker(flushInterval) - for { - select { - case <-stop: - // Request finished. - tick.Stop() - return - case <-tick.C: - force := time.Now().Sub(lastFlush) > forceFlushInterval - if c.flushLog(force) { - lastFlush = time.Now() - } - } - } -} - -func ContextForTesting(req *http.Request) context.Context { - return toContext(&aeContext{req: req}) -} - -func logToLogservice() bool { - // TODO: replace logservice with json structured logs to $LOG_DIR/app.log.json - // where $LOG_DIR is /var/log in prod and some tmpdir in dev - return os.Getenv("LOG_TO_LOGSERVICE") != "0" -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/api_classic.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/api_classic.go deleted file mode 100644 index 87c33c798e8..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/api_classic.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2015 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build appengine -// +build appengine - -package internal - -import ( - "context" - "errors" - "fmt" - "net/http" - "time" - - "appengine" - "appengine_internal" - basepb "appengine_internal/base" - - "github.com/golang/protobuf/proto" -) - -var contextKey = "holds an appengine.Context" - -// fromContext returns the App Engine context or nil if ctx is not -// derived from an App Engine context. -func fromContext(ctx context.Context) appengine.Context { - c, _ := ctx.Value(&contextKey).(appengine.Context) - return c -} - -// This is only for classic App Engine adapters. -func ClassicContextFromContext(ctx context.Context) (appengine.Context, error) { - c := fromContext(ctx) - if c == nil { - return nil, errNotAppEngineContext - } - return c, nil -} - -func withContext(parent context.Context, c appengine.Context) context.Context { - ctx := context.WithValue(parent, &contextKey, c) - - s := &basepb.StringProto{} - c.Call("__go__", "GetNamespace", &basepb.VoidProto{}, s, nil) - if ns := s.GetValue(); ns != "" { - ctx = NamespacedContext(ctx, ns) - } - - return ctx -} - -func IncomingHeaders(ctx context.Context) http.Header { - if c := fromContext(ctx); c != nil { - if req, ok := c.Request().(*http.Request); ok { - return req.Header - } - } - return nil -} - -func ReqContext(req *http.Request) context.Context { - return WithContext(context.Background(), req) -} - -func WithContext(parent context.Context, req *http.Request) context.Context { - c := appengine.NewContext(req) - return withContext(parent, c) -} - -type testingContext struct { - appengine.Context - - req *http.Request -} - -func (t *testingContext) FullyQualifiedAppID() string { return "dev~testcontext" } -func (t *testingContext) Call(service, method string, _, _ appengine_internal.ProtoMessage, _ *appengine_internal.CallOptions) error { - if service == "__go__" && method == "GetNamespace" { - return nil - } - return fmt.Errorf("testingContext: unsupported Call") -} -func (t *testingContext) Request() interface{} { return t.req } - -func ContextForTesting(req *http.Request) context.Context { - return withContext(context.Background(), &testingContext{req: req}) -} - -func Call(ctx context.Context, service, method string, in, out proto.Message) error { - if ns := NamespaceFromContext(ctx); ns != "" { - if fn, ok := NamespaceMods[service]; ok { - fn(in, ns) - } - } - - if f, ctx, ok := callOverrideFromContext(ctx); ok { - return f(ctx, service, method, in, out) - } - - // Handle already-done contexts quickly. - select { - case <-ctx.Done(): - return ctx.Err() - default: - } - - c := fromContext(ctx) - if c == nil { - // Give a good error message rather than a panic lower down. - return errNotAppEngineContext - } - - // Apply transaction modifications if we're in a transaction. - if t := transactionFromContext(ctx); t != nil { - if t.finished { - return errors.New("transaction context has expired") - } - applyTransaction(in, &t.transaction) - } - - var opts *appengine_internal.CallOptions - if d, ok := ctx.Deadline(); ok { - opts = &appengine_internal.CallOptions{ - Timeout: d.Sub(time.Now()), - } - } - - err := c.Call(service, method, in, out, opts) - switch v := err.(type) { - case *appengine_internal.APIError: - return &APIError{ - Service: v.Service, - Detail: v.Detail, - Code: v.Code, - } - case *appengine_internal.CallError: - return &CallError{ - Detail: v.Detail, - Code: v.Code, - Timeout: v.Timeout, - } - } - return err -} - -func Middleware(next http.Handler) http.Handler { - panic("Middleware called; this should be impossible") -} - -func logf(c appengine.Context, level int64, format string, args ...interface{}) { - var fn func(format string, args ...interface{}) - switch level { - case 0: - fn = c.Debugf - case 1: - fn = c.Infof - case 2: - fn = c.Warningf - case 3: - fn = c.Errorf - case 4: - fn = c.Criticalf - default: - // This shouldn't happen. - fn = c.Criticalf - } - fn(format, args...) -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/api_common.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/api_common.go deleted file mode 100644 index 5b95c13d926..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/api_common.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2015 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -import ( - "context" - "errors" - "os" - - "github.com/golang/protobuf/proto" -) - -type ctxKey string - -func (c ctxKey) String() string { - return "appengine context key: " + string(c) -} - -var errNotAppEngineContext = errors.New("not an App Engine context") - -type CallOverrideFunc func(ctx context.Context, service, method string, in, out proto.Message) error - -var callOverrideKey = "holds []CallOverrideFunc" - -func WithCallOverride(ctx context.Context, f CallOverrideFunc) context.Context { - // We avoid appending to any existing call override - // so we don't risk overwriting a popped stack below. - var cofs []CallOverrideFunc - if uf, ok := ctx.Value(&callOverrideKey).([]CallOverrideFunc); ok { - cofs = append(cofs, uf...) - } - cofs = append(cofs, f) - return context.WithValue(ctx, &callOverrideKey, cofs) -} - -func callOverrideFromContext(ctx context.Context) (CallOverrideFunc, context.Context, bool) { - cofs, _ := ctx.Value(&callOverrideKey).([]CallOverrideFunc) - if len(cofs) == 0 { - return nil, nil, false - } - // We found a list of overrides; grab the last, and reconstitute a - // context that will hide it. - f := cofs[len(cofs)-1] - ctx = context.WithValue(ctx, &callOverrideKey, cofs[:len(cofs)-1]) - return f, ctx, true -} - -type logOverrideFunc func(level int64, format string, args ...interface{}) - -var logOverrideKey = "holds a logOverrideFunc" - -func WithLogOverride(ctx context.Context, f logOverrideFunc) context.Context { - return context.WithValue(ctx, &logOverrideKey, f) -} - -var appIDOverrideKey = "holds a string, being the full app ID" - -func WithAppIDOverride(ctx context.Context, appID string) context.Context { - return context.WithValue(ctx, &appIDOverrideKey, appID) -} - -var apiHostOverrideKey = ctxKey("holds a string, being the alternate API_HOST") - -func withAPIHostOverride(ctx context.Context, apiHost string) context.Context { - return context.WithValue(ctx, apiHostOverrideKey, apiHost) -} - -var apiPortOverrideKey = ctxKey("holds a string, being the alternate API_PORT") - -func withAPIPortOverride(ctx context.Context, apiPort string) context.Context { - return context.WithValue(ctx, apiPortOverrideKey, apiPort) -} - -var namespaceKey = "holds the namespace string" - -func withNamespace(ctx context.Context, ns string) context.Context { - return context.WithValue(ctx, &namespaceKey, ns) -} - -func NamespaceFromContext(ctx context.Context) string { - // If there's no namespace, return the empty string. - ns, _ := ctx.Value(&namespaceKey).(string) - return ns -} - -// FullyQualifiedAppID returns the fully-qualified application ID. -// This may contain a partition prefix (e.g. "s~" for High Replication apps), -// or a domain prefix (e.g. "example.com:"). -func FullyQualifiedAppID(ctx context.Context) string { - if id, ok := ctx.Value(&appIDOverrideKey).(string); ok { - return id - } - return fullyQualifiedAppID(ctx) -} - -func Logf(ctx context.Context, level int64, format string, args ...interface{}) { - if f, ok := ctx.Value(&logOverrideKey).(logOverrideFunc); ok { - f(level, format, args...) - return - } - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - logf(c, level, format, args...) -} - -// NamespacedContext wraps a Context to support namespaces. -func NamespacedContext(ctx context.Context, namespace string) context.Context { - return withNamespace(ctx, namespace) -} - -// SetTestEnv sets the env variables for testing background ticket in Flex. -func SetTestEnv() func() { - var environ = []struct { - key, value string - }{ - {"GAE_LONG_APP_ID", "my-app-id"}, - {"GAE_MINOR_VERSION", "067924799508853122"}, - {"GAE_MODULE_INSTANCE", "0"}, - {"GAE_MODULE_NAME", "default"}, - {"GAE_MODULE_VERSION", "20150612t184001"}, - } - - for _, v := range environ { - old := os.Getenv(v.key) - os.Setenv(v.key, v.value) - v.value = old - } - return func() { // Restore old environment after the test completes. - for _, v := range environ { - if v.value == "" { - os.Unsetenv(v.key) - continue - } - os.Setenv(v.key, v.value) - } - } -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/app_id.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/app_id.go deleted file mode 100644 index 11df8c07b53..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/app_id.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -import ( - "strings" -) - -func parseFullAppID(appid string) (partition, domain, displayID string) { - if i := strings.Index(appid, "~"); i != -1 { - partition, appid = appid[:i], appid[i+1:] - } - if i := strings.Index(appid, ":"); i != -1 { - domain, appid = appid[:i], appid[i+1:] - } - return partition, domain, appid -} - -// appID returns "appid" or "domain.com:appid". -func appID(fullAppID string) string { - _, dom, dis := parseFullAppID(fullAppID) - if dom != "" { - return dom + ":" + dis - } - return dis -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/base/api_base.pb.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/base/api_base.pb.go deleted file mode 100644 index db4777e68e5..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/base/api_base.pb.go +++ /dev/null @@ -1,308 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/base/api_base.proto - -package base - -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 - -type StringProto struct { - Value *string `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StringProto) Reset() { *m = StringProto{} } -func (m *StringProto) String() string { return proto.CompactTextString(m) } -func (*StringProto) ProtoMessage() {} -func (*StringProto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{0} -} -func (m *StringProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StringProto.Unmarshal(m, b) -} -func (m *StringProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StringProto.Marshal(b, m, deterministic) -} -func (dst *StringProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringProto.Merge(dst, src) -} -func (m *StringProto) XXX_Size() int { - return xxx_messageInfo_StringProto.Size(m) -} -func (m *StringProto) XXX_DiscardUnknown() { - xxx_messageInfo_StringProto.DiscardUnknown(m) -} - -var xxx_messageInfo_StringProto proto.InternalMessageInfo - -func (m *StringProto) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value - } - return "" -} - -type Integer32Proto struct { - Value *int32 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Integer32Proto) Reset() { *m = Integer32Proto{} } -func (m *Integer32Proto) String() string { return proto.CompactTextString(m) } -func (*Integer32Proto) ProtoMessage() {} -func (*Integer32Proto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{1} -} -func (m *Integer32Proto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Integer32Proto.Unmarshal(m, b) -} -func (m *Integer32Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Integer32Proto.Marshal(b, m, deterministic) -} -func (dst *Integer32Proto) XXX_Merge(src proto.Message) { - xxx_messageInfo_Integer32Proto.Merge(dst, src) -} -func (m *Integer32Proto) XXX_Size() int { - return xxx_messageInfo_Integer32Proto.Size(m) -} -func (m *Integer32Proto) XXX_DiscardUnknown() { - xxx_messageInfo_Integer32Proto.DiscardUnknown(m) -} - -var xxx_messageInfo_Integer32Proto proto.InternalMessageInfo - -func (m *Integer32Proto) GetValue() int32 { - if m != nil && m.Value != nil { - return *m.Value - } - return 0 -} - -type Integer64Proto struct { - Value *int64 `protobuf:"varint,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Integer64Proto) Reset() { *m = Integer64Proto{} } -func (m *Integer64Proto) String() string { return proto.CompactTextString(m) } -func (*Integer64Proto) ProtoMessage() {} -func (*Integer64Proto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{2} -} -func (m *Integer64Proto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Integer64Proto.Unmarshal(m, b) -} -func (m *Integer64Proto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Integer64Proto.Marshal(b, m, deterministic) -} -func (dst *Integer64Proto) XXX_Merge(src proto.Message) { - xxx_messageInfo_Integer64Proto.Merge(dst, src) -} -func (m *Integer64Proto) XXX_Size() int { - return xxx_messageInfo_Integer64Proto.Size(m) -} -func (m *Integer64Proto) XXX_DiscardUnknown() { - xxx_messageInfo_Integer64Proto.DiscardUnknown(m) -} - -var xxx_messageInfo_Integer64Proto proto.InternalMessageInfo - -func (m *Integer64Proto) GetValue() int64 { - if m != nil && m.Value != nil { - return *m.Value - } - return 0 -} - -type BoolProto struct { - Value *bool `protobuf:"varint,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BoolProto) Reset() { *m = BoolProto{} } -func (m *BoolProto) String() string { return proto.CompactTextString(m) } -func (*BoolProto) ProtoMessage() {} -func (*BoolProto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{3} -} -func (m *BoolProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BoolProto.Unmarshal(m, b) -} -func (m *BoolProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BoolProto.Marshal(b, m, deterministic) -} -func (dst *BoolProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_BoolProto.Merge(dst, src) -} -func (m *BoolProto) XXX_Size() int { - return xxx_messageInfo_BoolProto.Size(m) -} -func (m *BoolProto) XXX_DiscardUnknown() { - xxx_messageInfo_BoolProto.DiscardUnknown(m) -} - -var xxx_messageInfo_BoolProto proto.InternalMessageInfo - -func (m *BoolProto) GetValue() bool { - if m != nil && m.Value != nil { - return *m.Value - } - return false -} - -type DoubleProto struct { - Value *float64 `protobuf:"fixed64,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DoubleProto) Reset() { *m = DoubleProto{} } -func (m *DoubleProto) String() string { return proto.CompactTextString(m) } -func (*DoubleProto) ProtoMessage() {} -func (*DoubleProto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{4} -} -func (m *DoubleProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DoubleProto.Unmarshal(m, b) -} -func (m *DoubleProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DoubleProto.Marshal(b, m, deterministic) -} -func (dst *DoubleProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleProto.Merge(dst, src) -} -func (m *DoubleProto) XXX_Size() int { - return xxx_messageInfo_DoubleProto.Size(m) -} -func (m *DoubleProto) XXX_DiscardUnknown() { - xxx_messageInfo_DoubleProto.DiscardUnknown(m) -} - -var xxx_messageInfo_DoubleProto proto.InternalMessageInfo - -func (m *DoubleProto) GetValue() float64 { - if m != nil && m.Value != nil { - return *m.Value - } - return 0 -} - -type BytesProto struct { - Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BytesProto) Reset() { *m = BytesProto{} } -func (m *BytesProto) String() string { return proto.CompactTextString(m) } -func (*BytesProto) ProtoMessage() {} -func (*BytesProto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{5} -} -func (m *BytesProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BytesProto.Unmarshal(m, b) -} -func (m *BytesProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BytesProto.Marshal(b, m, deterministic) -} -func (dst *BytesProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_BytesProto.Merge(dst, src) -} -func (m *BytesProto) XXX_Size() int { - return xxx_messageInfo_BytesProto.Size(m) -} -func (m *BytesProto) XXX_DiscardUnknown() { - xxx_messageInfo_BytesProto.DiscardUnknown(m) -} - -var xxx_messageInfo_BytesProto proto.InternalMessageInfo - -func (m *BytesProto) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -type VoidProto struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VoidProto) Reset() { *m = VoidProto{} } -func (m *VoidProto) String() string { return proto.CompactTextString(m) } -func (*VoidProto) ProtoMessage() {} -func (*VoidProto) Descriptor() ([]byte, []int) { - return fileDescriptor_api_base_9d49f8792e0c1140, []int{6} -} -func (m *VoidProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VoidProto.Unmarshal(m, b) -} -func (m *VoidProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VoidProto.Marshal(b, m, deterministic) -} -func (dst *VoidProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_VoidProto.Merge(dst, src) -} -func (m *VoidProto) XXX_Size() int { - return xxx_messageInfo_VoidProto.Size(m) -} -func (m *VoidProto) XXX_DiscardUnknown() { - xxx_messageInfo_VoidProto.DiscardUnknown(m) -} - -var xxx_messageInfo_VoidProto proto.InternalMessageInfo - -func init() { - proto.RegisterType((*StringProto)(nil), "appengine.base.StringProto") - proto.RegisterType((*Integer32Proto)(nil), "appengine.base.Integer32Proto") - proto.RegisterType((*Integer64Proto)(nil), "appengine.base.Integer64Proto") - proto.RegisterType((*BoolProto)(nil), "appengine.base.BoolProto") - proto.RegisterType((*DoubleProto)(nil), "appengine.base.DoubleProto") - proto.RegisterType((*BytesProto)(nil), "appengine.base.BytesProto") - proto.RegisterType((*VoidProto)(nil), "appengine.base.VoidProto") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/base/api_base.proto", fileDescriptor_api_base_9d49f8792e0c1140) -} - -var fileDescriptor_api_base_9d49f8792e0c1140 = []byte{ - // 199 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xcf, 0x3f, 0x4b, 0xc6, 0x30, - 0x10, 0x06, 0x70, 0x5a, 0xad, 0xb4, 0x57, 0xe9, 0x20, 0x0e, 0x1d, 0xb5, 0x05, 0x71, 0x4a, 0x40, - 0x45, 0x9c, 0x83, 0x8b, 0x9b, 0x28, 0x38, 0xb8, 0x48, 0x8a, 0xc7, 0x11, 0x08, 0xb9, 0x90, 0xa6, - 0x82, 0xdf, 0x5e, 0xda, 0xd2, 0xfa, 0xc2, 0x9b, 0xed, 0xfe, 0xfc, 0xe0, 0xe1, 0x81, 0x27, 0x62, - 0x26, 0x8b, 0x82, 0xd8, 0x6a, 0x47, 0x82, 0x03, 0x49, 0xed, 0x3d, 0x3a, 0x32, 0x0e, 0xa5, 0x71, - 0x11, 0x83, 0xd3, 0x56, 0x0e, 0x7a, 0x44, 0xa9, 0xbd, 0xf9, 0x9a, 0x07, 0xe1, 0x03, 0x47, 0xbe, - 0x68, 0x76, 0x27, 0xe6, 0x6b, 0xd7, 0x43, 0xfd, 0x1e, 0x83, 0x71, 0xf4, 0xba, 0xbc, 0x2f, 0xa1, - 0xf8, 0xd1, 0x76, 0xc2, 0x36, 0xbb, 0xca, 0x6f, 0xab, 0xb7, 0x75, 0xe9, 0x6e, 0xa0, 0x79, 0x71, - 0x11, 0x09, 0xc3, 0xfd, 0x5d, 0xc2, 0x15, 0xc7, 0xee, 0xf1, 0x21, 0xe1, 0x4e, 0x36, 0x77, 0x0d, - 0x95, 0x62, 0xb6, 0x09, 0x52, 0x6e, 0xa4, 0x87, 0xfa, 0x99, 0xa7, 0xc1, 0x62, 0x02, 0x65, 0xff, - 0x79, 0xa0, 0x7e, 0x23, 0x8e, 0xab, 0x69, 0x0f, 0xcd, 0xb9, 0xca, 0xcb, 0xdd, 0xd5, 0x50, 0x7d, - 0xb0, 0xf9, 0x5e, 0x98, 0x3a, 0xfb, 0x3c, 0x9d, 0x9b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xba, - 0x37, 0x25, 0xea, 0x44, 0x01, 0x00, 0x00, -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/base/api_base.proto b/pkg/k8s/vendor/google.golang.org/appengine/internal/base/api_base.proto deleted file mode 100644 index 56cd7a3cad0..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/base/api_base.proto +++ /dev/null @@ -1,33 +0,0 @@ -// Built-in base types for API calls. Primarily useful as return types. - -syntax = "proto2"; -option go_package = "base"; - -package appengine.base; - -message StringProto { - required string value = 1; -} - -message Integer32Proto { - required int32 value = 1; -} - -message Integer64Proto { - required int64 value = 1; -} - -message BoolProto { - required bool value = 1; -} - -message DoubleProto { - required double value = 1; -} - -message BytesProto { - required bytes value = 1 [ctype=CORD]; -} - -message VoidProto { -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go deleted file mode 100644 index 2fb74828969..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go +++ /dev/null @@ -1,4367 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/datastore/datastore_v3.proto - -package datastore - -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 - -type Property_Meaning int32 - -const ( - Property_NO_MEANING Property_Meaning = 0 - Property_BLOB Property_Meaning = 14 - Property_TEXT Property_Meaning = 15 - Property_BYTESTRING Property_Meaning = 16 - Property_ATOM_CATEGORY Property_Meaning = 1 - Property_ATOM_LINK Property_Meaning = 2 - Property_ATOM_TITLE Property_Meaning = 3 - Property_ATOM_CONTENT Property_Meaning = 4 - Property_ATOM_SUMMARY Property_Meaning = 5 - Property_ATOM_AUTHOR Property_Meaning = 6 - Property_GD_WHEN Property_Meaning = 7 - Property_GD_EMAIL Property_Meaning = 8 - Property_GEORSS_POINT Property_Meaning = 9 - Property_GD_IM Property_Meaning = 10 - Property_GD_PHONENUMBER Property_Meaning = 11 - Property_GD_POSTALADDRESS Property_Meaning = 12 - Property_GD_RATING Property_Meaning = 13 - Property_BLOBKEY Property_Meaning = 17 - Property_ENTITY_PROTO Property_Meaning = 19 - Property_INDEX_VALUE Property_Meaning = 18 -) - -var Property_Meaning_name = map[int32]string{ - 0: "NO_MEANING", - 14: "BLOB", - 15: "TEXT", - 16: "BYTESTRING", - 1: "ATOM_CATEGORY", - 2: "ATOM_LINK", - 3: "ATOM_TITLE", - 4: "ATOM_CONTENT", - 5: "ATOM_SUMMARY", - 6: "ATOM_AUTHOR", - 7: "GD_WHEN", - 8: "GD_EMAIL", - 9: "GEORSS_POINT", - 10: "GD_IM", - 11: "GD_PHONENUMBER", - 12: "GD_POSTALADDRESS", - 13: "GD_RATING", - 17: "BLOBKEY", - 19: "ENTITY_PROTO", - 18: "INDEX_VALUE", -} -var Property_Meaning_value = map[string]int32{ - "NO_MEANING": 0, - "BLOB": 14, - "TEXT": 15, - "BYTESTRING": 16, - "ATOM_CATEGORY": 1, - "ATOM_LINK": 2, - "ATOM_TITLE": 3, - "ATOM_CONTENT": 4, - "ATOM_SUMMARY": 5, - "ATOM_AUTHOR": 6, - "GD_WHEN": 7, - "GD_EMAIL": 8, - "GEORSS_POINT": 9, - "GD_IM": 10, - "GD_PHONENUMBER": 11, - "GD_POSTALADDRESS": 12, - "GD_RATING": 13, - "BLOBKEY": 17, - "ENTITY_PROTO": 19, - "INDEX_VALUE": 18, -} - -func (x Property_Meaning) Enum() *Property_Meaning { - p := new(Property_Meaning) - *p = x - return p -} -func (x Property_Meaning) String() string { - return proto.EnumName(Property_Meaning_name, int32(x)) -} -func (x *Property_Meaning) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Property_Meaning_value, data, "Property_Meaning") - if err != nil { - return err - } - *x = Property_Meaning(value) - return nil -} -func (Property_Meaning) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 0} -} - -type Property_FtsTokenizationOption int32 - -const ( - Property_HTML Property_FtsTokenizationOption = 1 - Property_ATOM Property_FtsTokenizationOption = 2 -) - -var Property_FtsTokenizationOption_name = map[int32]string{ - 1: "HTML", - 2: "ATOM", -} -var Property_FtsTokenizationOption_value = map[string]int32{ - "HTML": 1, - "ATOM": 2, -} - -func (x Property_FtsTokenizationOption) Enum() *Property_FtsTokenizationOption { - p := new(Property_FtsTokenizationOption) - *p = x - return p -} -func (x Property_FtsTokenizationOption) String() string { - return proto.EnumName(Property_FtsTokenizationOption_name, int32(x)) -} -func (x *Property_FtsTokenizationOption) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Property_FtsTokenizationOption_value, data, "Property_FtsTokenizationOption") - if err != nil { - return err - } - *x = Property_FtsTokenizationOption(value) - return nil -} -func (Property_FtsTokenizationOption) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2, 1} -} - -type EntityProto_Kind int32 - -const ( - EntityProto_GD_CONTACT EntityProto_Kind = 1 - EntityProto_GD_EVENT EntityProto_Kind = 2 - EntityProto_GD_MESSAGE EntityProto_Kind = 3 -) - -var EntityProto_Kind_name = map[int32]string{ - 1: "GD_CONTACT", - 2: "GD_EVENT", - 3: "GD_MESSAGE", -} -var EntityProto_Kind_value = map[string]int32{ - "GD_CONTACT": 1, - "GD_EVENT": 2, - "GD_MESSAGE": 3, -} - -func (x EntityProto_Kind) Enum() *EntityProto_Kind { - p := new(EntityProto_Kind) - *p = x - return p -} -func (x EntityProto_Kind) String() string { - return proto.EnumName(EntityProto_Kind_name, int32(x)) -} -func (x *EntityProto_Kind) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(EntityProto_Kind_value, data, "EntityProto_Kind") - if err != nil { - return err - } - *x = EntityProto_Kind(value) - return nil -} -func (EntityProto_Kind) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6, 0} -} - -type Index_Property_Direction int32 - -const ( - Index_Property_ASCENDING Index_Property_Direction = 1 - Index_Property_DESCENDING Index_Property_Direction = 2 -) - -var Index_Property_Direction_name = map[int32]string{ - 1: "ASCENDING", - 2: "DESCENDING", -} -var Index_Property_Direction_value = map[string]int32{ - "ASCENDING": 1, - "DESCENDING": 2, -} - -func (x Index_Property_Direction) Enum() *Index_Property_Direction { - p := new(Index_Property_Direction) - *p = x - return p -} -func (x Index_Property_Direction) String() string { - return proto.EnumName(Index_Property_Direction_name, int32(x)) -} -func (x *Index_Property_Direction) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Index_Property_Direction_value, data, "Index_Property_Direction") - if err != nil { - return err - } - *x = Index_Property_Direction(value) - return nil -} -func (Index_Property_Direction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0, 0} -} - -type CompositeIndex_State int32 - -const ( - CompositeIndex_WRITE_ONLY CompositeIndex_State = 1 - CompositeIndex_READ_WRITE CompositeIndex_State = 2 - CompositeIndex_DELETED CompositeIndex_State = 3 - CompositeIndex_ERROR CompositeIndex_State = 4 -) - -var CompositeIndex_State_name = map[int32]string{ - 1: "WRITE_ONLY", - 2: "READ_WRITE", - 3: "DELETED", - 4: "ERROR", -} -var CompositeIndex_State_value = map[string]int32{ - "WRITE_ONLY": 1, - "READ_WRITE": 2, - "DELETED": 3, - "ERROR": 4, -} - -func (x CompositeIndex_State) Enum() *CompositeIndex_State { - p := new(CompositeIndex_State) - *p = x - return p -} -func (x CompositeIndex_State) String() string { - return proto.EnumName(CompositeIndex_State_name, int32(x)) -} -func (x *CompositeIndex_State) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(CompositeIndex_State_value, data, "CompositeIndex_State") - if err != nil { - return err - } - *x = CompositeIndex_State(value) - return nil -} -func (CompositeIndex_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9, 0} -} - -type Snapshot_Status int32 - -const ( - Snapshot_INACTIVE Snapshot_Status = 0 - Snapshot_ACTIVE Snapshot_Status = 1 -) - -var Snapshot_Status_name = map[int32]string{ - 0: "INACTIVE", - 1: "ACTIVE", -} -var Snapshot_Status_value = map[string]int32{ - "INACTIVE": 0, - "ACTIVE": 1, -} - -func (x Snapshot_Status) Enum() *Snapshot_Status { - p := new(Snapshot_Status) - *p = x - return p -} -func (x Snapshot_Status) String() string { - return proto.EnumName(Snapshot_Status_name, int32(x)) -} -func (x *Snapshot_Status) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Snapshot_Status_value, data, "Snapshot_Status") - if err != nil { - return err - } - *x = Snapshot_Status(value) - return nil -} -func (Snapshot_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12, 0} -} - -type Query_Hint int32 - -const ( - Query_ORDER_FIRST Query_Hint = 1 - Query_ANCESTOR_FIRST Query_Hint = 2 - Query_FILTER_FIRST Query_Hint = 3 -) - -var Query_Hint_name = map[int32]string{ - 1: "ORDER_FIRST", - 2: "ANCESTOR_FIRST", - 3: "FILTER_FIRST", -} -var Query_Hint_value = map[string]int32{ - "ORDER_FIRST": 1, - "ANCESTOR_FIRST": 2, - "FILTER_FIRST": 3, -} - -func (x Query_Hint) Enum() *Query_Hint { - p := new(Query_Hint) - *p = x - return p -} -func (x Query_Hint) String() string { - return proto.EnumName(Query_Hint_name, int32(x)) -} -func (x *Query_Hint) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Query_Hint_value, data, "Query_Hint") - if err != nil { - return err - } - *x = Query_Hint(value) - return nil -} -func (Query_Hint) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0} -} - -type Query_Filter_Operator int32 - -const ( - Query_Filter_LESS_THAN Query_Filter_Operator = 1 - Query_Filter_LESS_THAN_OR_EQUAL Query_Filter_Operator = 2 - Query_Filter_GREATER_THAN Query_Filter_Operator = 3 - Query_Filter_GREATER_THAN_OR_EQUAL Query_Filter_Operator = 4 - Query_Filter_EQUAL Query_Filter_Operator = 5 - Query_Filter_IN Query_Filter_Operator = 6 - Query_Filter_EXISTS Query_Filter_Operator = 7 -) - -var Query_Filter_Operator_name = map[int32]string{ - 1: "LESS_THAN", - 2: "LESS_THAN_OR_EQUAL", - 3: "GREATER_THAN", - 4: "GREATER_THAN_OR_EQUAL", - 5: "EQUAL", - 6: "IN", - 7: "EXISTS", -} -var Query_Filter_Operator_value = map[string]int32{ - "LESS_THAN": 1, - "LESS_THAN_OR_EQUAL": 2, - "GREATER_THAN": 3, - "GREATER_THAN_OR_EQUAL": 4, - "EQUAL": 5, - "IN": 6, - "EXISTS": 7, -} - -func (x Query_Filter_Operator) Enum() *Query_Filter_Operator { - p := new(Query_Filter_Operator) - *p = x - return p -} -func (x Query_Filter_Operator) String() string { - return proto.EnumName(Query_Filter_Operator_name, int32(x)) -} -func (x *Query_Filter_Operator) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Query_Filter_Operator_value, data, "Query_Filter_Operator") - if err != nil { - return err - } - *x = Query_Filter_Operator(value) - return nil -} -func (Query_Filter_Operator) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0, 0} -} - -type Query_Order_Direction int32 - -const ( - Query_Order_ASCENDING Query_Order_Direction = 1 - Query_Order_DESCENDING Query_Order_Direction = 2 -) - -var Query_Order_Direction_name = map[int32]string{ - 1: "ASCENDING", - 2: "DESCENDING", -} -var Query_Order_Direction_value = map[string]int32{ - "ASCENDING": 1, - "DESCENDING": 2, -} - -func (x Query_Order_Direction) Enum() *Query_Order_Direction { - p := new(Query_Order_Direction) - *p = x - return p -} -func (x Query_Order_Direction) String() string { - return proto.EnumName(Query_Order_Direction_name, int32(x)) -} -func (x *Query_Order_Direction) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Query_Order_Direction_value, data, "Query_Order_Direction") - if err != nil { - return err - } - *x = Query_Order_Direction(value) - return nil -} -func (Query_Order_Direction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1, 0} -} - -type Error_ErrorCode int32 - -const ( - Error_BAD_REQUEST Error_ErrorCode = 1 - Error_CONCURRENT_TRANSACTION Error_ErrorCode = 2 - Error_INTERNAL_ERROR Error_ErrorCode = 3 - Error_NEED_INDEX Error_ErrorCode = 4 - Error_TIMEOUT Error_ErrorCode = 5 - Error_PERMISSION_DENIED Error_ErrorCode = 6 - Error_BIGTABLE_ERROR Error_ErrorCode = 7 - Error_COMMITTED_BUT_STILL_APPLYING Error_ErrorCode = 8 - Error_CAPABILITY_DISABLED Error_ErrorCode = 9 - Error_TRY_ALTERNATE_BACKEND Error_ErrorCode = 10 - Error_SAFE_TIME_TOO_OLD Error_ErrorCode = 11 -) - -var Error_ErrorCode_name = map[int32]string{ - 1: "BAD_REQUEST", - 2: "CONCURRENT_TRANSACTION", - 3: "INTERNAL_ERROR", - 4: "NEED_INDEX", - 5: "TIMEOUT", - 6: "PERMISSION_DENIED", - 7: "BIGTABLE_ERROR", - 8: "COMMITTED_BUT_STILL_APPLYING", - 9: "CAPABILITY_DISABLED", - 10: "TRY_ALTERNATE_BACKEND", - 11: "SAFE_TIME_TOO_OLD", -} -var Error_ErrorCode_value = map[string]int32{ - "BAD_REQUEST": 1, - "CONCURRENT_TRANSACTION": 2, - "INTERNAL_ERROR": 3, - "NEED_INDEX": 4, - "TIMEOUT": 5, - "PERMISSION_DENIED": 6, - "BIGTABLE_ERROR": 7, - "COMMITTED_BUT_STILL_APPLYING": 8, - "CAPABILITY_DISABLED": 9, - "TRY_ALTERNATE_BACKEND": 10, - "SAFE_TIME_TOO_OLD": 11, -} - -func (x Error_ErrorCode) Enum() *Error_ErrorCode { - p := new(Error_ErrorCode) - *p = x - return p -} -func (x Error_ErrorCode) String() string { - return proto.EnumName(Error_ErrorCode_name, int32(x)) -} -func (x *Error_ErrorCode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Error_ErrorCode_value, data, "Error_ErrorCode") - if err != nil { - return err - } - *x = Error_ErrorCode(value) - return nil -} -func (Error_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19, 0} -} - -type PutRequest_AutoIdPolicy int32 - -const ( - PutRequest_CURRENT PutRequest_AutoIdPolicy = 0 - PutRequest_SEQUENTIAL PutRequest_AutoIdPolicy = 1 -) - -var PutRequest_AutoIdPolicy_name = map[int32]string{ - 0: "CURRENT", - 1: "SEQUENTIAL", -} -var PutRequest_AutoIdPolicy_value = map[string]int32{ - "CURRENT": 0, - "SEQUENTIAL": 1, -} - -func (x PutRequest_AutoIdPolicy) Enum() *PutRequest_AutoIdPolicy { - p := new(PutRequest_AutoIdPolicy) - *p = x - return p -} -func (x PutRequest_AutoIdPolicy) String() string { - return proto.EnumName(PutRequest_AutoIdPolicy_name, int32(x)) -} -func (x *PutRequest_AutoIdPolicy) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(PutRequest_AutoIdPolicy_value, data, "PutRequest_AutoIdPolicy") - if err != nil { - return err - } - *x = PutRequest_AutoIdPolicy(value) - return nil -} -func (PutRequest_AutoIdPolicy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23, 0} -} - -type BeginTransactionRequest_TransactionMode int32 - -const ( - BeginTransactionRequest_UNKNOWN BeginTransactionRequest_TransactionMode = 0 - BeginTransactionRequest_READ_ONLY BeginTransactionRequest_TransactionMode = 1 - BeginTransactionRequest_READ_WRITE BeginTransactionRequest_TransactionMode = 2 -) - -var BeginTransactionRequest_TransactionMode_name = map[int32]string{ - 0: "UNKNOWN", - 1: "READ_ONLY", - 2: "READ_WRITE", -} -var BeginTransactionRequest_TransactionMode_value = map[string]int32{ - "UNKNOWN": 0, - "READ_ONLY": 1, - "READ_WRITE": 2, -} - -func (x BeginTransactionRequest_TransactionMode) Enum() *BeginTransactionRequest_TransactionMode { - p := new(BeginTransactionRequest_TransactionMode) - *p = x - return p -} -func (x BeginTransactionRequest_TransactionMode) String() string { - return proto.EnumName(BeginTransactionRequest_TransactionMode_name, int32(x)) -} -func (x *BeginTransactionRequest_TransactionMode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(BeginTransactionRequest_TransactionMode_value, data, "BeginTransactionRequest_TransactionMode") - if err != nil { - return err - } - *x = BeginTransactionRequest_TransactionMode(value) - return nil -} -func (BeginTransactionRequest_TransactionMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36, 0} -} - -type Action struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Action) Reset() { *m = Action{} } -func (m *Action) String() string { return proto.CompactTextString(m) } -func (*Action) ProtoMessage() {} -func (*Action) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{0} -} -func (m *Action) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Action.Unmarshal(m, b) -} -func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Action.Marshal(b, m, deterministic) -} -func (dst *Action) XXX_Merge(src proto.Message) { - xxx_messageInfo_Action.Merge(dst, src) -} -func (m *Action) XXX_Size() int { - return xxx_messageInfo_Action.Size(m) -} -func (m *Action) XXX_DiscardUnknown() { - xxx_messageInfo_Action.DiscardUnknown(m) -} - -var xxx_messageInfo_Action proto.InternalMessageInfo - -type PropertyValue struct { - Int64Value *int64 `protobuf:"varint,1,opt,name=int64Value" json:"int64Value,omitempty"` - BooleanValue *bool `protobuf:"varint,2,opt,name=booleanValue" json:"booleanValue,omitempty"` - StringValue *string `protobuf:"bytes,3,opt,name=stringValue" json:"stringValue,omitempty"` - DoubleValue *float64 `protobuf:"fixed64,4,opt,name=doubleValue" json:"doubleValue,omitempty"` - Pointvalue *PropertyValue_PointValue `protobuf:"group,5,opt,name=PointValue,json=pointvalue" json:"pointvalue,omitempty"` - Uservalue *PropertyValue_UserValue `protobuf:"group,8,opt,name=UserValue,json=uservalue" json:"uservalue,omitempty"` - Referencevalue *PropertyValue_ReferenceValue `protobuf:"group,12,opt,name=ReferenceValue,json=referencevalue" json:"referencevalue,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PropertyValue) Reset() { *m = PropertyValue{} } -func (m *PropertyValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue) ProtoMessage() {} -func (*PropertyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1} -} -func (m *PropertyValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PropertyValue.Unmarshal(m, b) -} -func (m *PropertyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PropertyValue.Marshal(b, m, deterministic) -} -func (dst *PropertyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PropertyValue.Merge(dst, src) -} -func (m *PropertyValue) XXX_Size() int { - return xxx_messageInfo_PropertyValue.Size(m) -} -func (m *PropertyValue) XXX_DiscardUnknown() { - xxx_messageInfo_PropertyValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PropertyValue proto.InternalMessageInfo - -func (m *PropertyValue) GetInt64Value() int64 { - if m != nil && m.Int64Value != nil { - return *m.Int64Value - } - return 0 -} - -func (m *PropertyValue) GetBooleanValue() bool { - if m != nil && m.BooleanValue != nil { - return *m.BooleanValue - } - return false -} - -func (m *PropertyValue) GetStringValue() string { - if m != nil && m.StringValue != nil { - return *m.StringValue - } - return "" -} - -func (m *PropertyValue) GetDoubleValue() float64 { - if m != nil && m.DoubleValue != nil { - return *m.DoubleValue - } - return 0 -} - -func (m *PropertyValue) GetPointvalue() *PropertyValue_PointValue { - if m != nil { - return m.Pointvalue - } - return nil -} - -func (m *PropertyValue) GetUservalue() *PropertyValue_UserValue { - if m != nil { - return m.Uservalue - } - return nil -} - -func (m *PropertyValue) GetReferencevalue() *PropertyValue_ReferenceValue { - if m != nil { - return m.Referencevalue - } - return nil -} - -type PropertyValue_PointValue struct { - X *float64 `protobuf:"fixed64,6,req,name=x" json:"x,omitempty"` - Y *float64 `protobuf:"fixed64,7,req,name=y" json:"y,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PropertyValue_PointValue) Reset() { *m = PropertyValue_PointValue{} } -func (m *PropertyValue_PointValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_PointValue) ProtoMessage() {} -func (*PropertyValue_PointValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 0} -} -func (m *PropertyValue_PointValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PropertyValue_PointValue.Unmarshal(m, b) -} -func (m *PropertyValue_PointValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PropertyValue_PointValue.Marshal(b, m, deterministic) -} -func (dst *PropertyValue_PointValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PropertyValue_PointValue.Merge(dst, src) -} -func (m *PropertyValue_PointValue) XXX_Size() int { - return xxx_messageInfo_PropertyValue_PointValue.Size(m) -} -func (m *PropertyValue_PointValue) XXX_DiscardUnknown() { - xxx_messageInfo_PropertyValue_PointValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PropertyValue_PointValue proto.InternalMessageInfo - -func (m *PropertyValue_PointValue) GetX() float64 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -func (m *PropertyValue_PointValue) GetY() float64 { - if m != nil && m.Y != nil { - return *m.Y - } - return 0 -} - -type PropertyValue_UserValue struct { - Email *string `protobuf:"bytes,9,req,name=email" json:"email,omitempty"` - AuthDomain *string `protobuf:"bytes,10,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` - Nickname *string `protobuf:"bytes,11,opt,name=nickname" json:"nickname,omitempty"` - FederatedIdentity *string `protobuf:"bytes,21,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` - FederatedProvider *string `protobuf:"bytes,22,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PropertyValue_UserValue) Reset() { *m = PropertyValue_UserValue{} } -func (m *PropertyValue_UserValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_UserValue) ProtoMessage() {} -func (*PropertyValue_UserValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 1} -} -func (m *PropertyValue_UserValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PropertyValue_UserValue.Unmarshal(m, b) -} -func (m *PropertyValue_UserValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PropertyValue_UserValue.Marshal(b, m, deterministic) -} -func (dst *PropertyValue_UserValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PropertyValue_UserValue.Merge(dst, src) -} -func (m *PropertyValue_UserValue) XXX_Size() int { - return xxx_messageInfo_PropertyValue_UserValue.Size(m) -} -func (m *PropertyValue_UserValue) XXX_DiscardUnknown() { - xxx_messageInfo_PropertyValue_UserValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PropertyValue_UserValue proto.InternalMessageInfo - -func (m *PropertyValue_UserValue) GetEmail() string { - if m != nil && m.Email != nil { - return *m.Email - } - return "" -} - -func (m *PropertyValue_UserValue) GetAuthDomain() string { - if m != nil && m.AuthDomain != nil { - return *m.AuthDomain - } - return "" -} - -func (m *PropertyValue_UserValue) GetNickname() string { - if m != nil && m.Nickname != nil { - return *m.Nickname - } - return "" -} - -func (m *PropertyValue_UserValue) GetFederatedIdentity() string { - if m != nil && m.FederatedIdentity != nil { - return *m.FederatedIdentity - } - return "" -} - -func (m *PropertyValue_UserValue) GetFederatedProvider() string { - if m != nil && m.FederatedProvider != nil { - return *m.FederatedProvider - } - return "" -} - -type PropertyValue_ReferenceValue struct { - App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` - NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` - Pathelement []*PropertyValue_ReferenceValue_PathElement `protobuf:"group,14,rep,name=PathElement,json=pathelement" json:"pathelement,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PropertyValue_ReferenceValue) Reset() { *m = PropertyValue_ReferenceValue{} } -func (m *PropertyValue_ReferenceValue) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_ReferenceValue) ProtoMessage() {} -func (*PropertyValue_ReferenceValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2} -} -func (m *PropertyValue_ReferenceValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PropertyValue_ReferenceValue.Unmarshal(m, b) -} -func (m *PropertyValue_ReferenceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PropertyValue_ReferenceValue.Marshal(b, m, deterministic) -} -func (dst *PropertyValue_ReferenceValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PropertyValue_ReferenceValue.Merge(dst, src) -} -func (m *PropertyValue_ReferenceValue) XXX_Size() int { - return xxx_messageInfo_PropertyValue_ReferenceValue.Size(m) -} -func (m *PropertyValue_ReferenceValue) XXX_DiscardUnknown() { - xxx_messageInfo_PropertyValue_ReferenceValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PropertyValue_ReferenceValue proto.InternalMessageInfo - -func (m *PropertyValue_ReferenceValue) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -func (m *PropertyValue_ReferenceValue) GetNameSpace() string { - if m != nil && m.NameSpace != nil { - return *m.NameSpace - } - return "" -} - -func (m *PropertyValue_ReferenceValue) GetPathelement() []*PropertyValue_ReferenceValue_PathElement { - if m != nil { - return m.Pathelement - } - return nil -} - -type PropertyValue_ReferenceValue_PathElement struct { - Type *string `protobuf:"bytes,15,req,name=type" json:"type,omitempty"` - Id *int64 `protobuf:"varint,16,opt,name=id" json:"id,omitempty"` - Name *string `protobuf:"bytes,17,opt,name=name" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PropertyValue_ReferenceValue_PathElement) Reset() { - *m = PropertyValue_ReferenceValue_PathElement{} -} -func (m *PropertyValue_ReferenceValue_PathElement) String() string { return proto.CompactTextString(m) } -func (*PropertyValue_ReferenceValue_PathElement) ProtoMessage() {} -func (*PropertyValue_ReferenceValue_PathElement) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{1, 2, 0} -} -func (m *PropertyValue_ReferenceValue_PathElement) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Unmarshal(m, b) -} -func (m *PropertyValue_ReferenceValue_PathElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Marshal(b, m, deterministic) -} -func (dst *PropertyValue_ReferenceValue_PathElement) XXX_Merge(src proto.Message) { - xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Merge(dst, src) -} -func (m *PropertyValue_ReferenceValue_PathElement) XXX_Size() int { - return xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.Size(m) -} -func (m *PropertyValue_ReferenceValue_PathElement) XXX_DiscardUnknown() { - xxx_messageInfo_PropertyValue_ReferenceValue_PathElement.DiscardUnknown(m) -} - -var xxx_messageInfo_PropertyValue_ReferenceValue_PathElement proto.InternalMessageInfo - -func (m *PropertyValue_ReferenceValue_PathElement) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -func (m *PropertyValue_ReferenceValue_PathElement) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id - } - return 0 -} - -func (m *PropertyValue_ReferenceValue_PathElement) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -type Property struct { - Meaning *Property_Meaning `protobuf:"varint,1,opt,name=meaning,enum=appengine.Property_Meaning,def=0" json:"meaning,omitempty"` - MeaningUri *string `protobuf:"bytes,2,opt,name=meaning_uri,json=meaningUri" json:"meaning_uri,omitempty"` - Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` - Value *PropertyValue `protobuf:"bytes,5,req,name=value" json:"value,omitempty"` - Multiple *bool `protobuf:"varint,4,req,name=multiple" json:"multiple,omitempty"` - Searchable *bool `protobuf:"varint,6,opt,name=searchable,def=0" json:"searchable,omitempty"` - FtsTokenizationOption *Property_FtsTokenizationOption `protobuf:"varint,8,opt,name=fts_tokenization_option,json=ftsTokenizationOption,enum=appengine.Property_FtsTokenizationOption" json:"fts_tokenization_option,omitempty"` - Locale *string `protobuf:"bytes,9,opt,name=locale,def=en" json:"locale,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Property) Reset() { *m = Property{} } -func (m *Property) String() string { return proto.CompactTextString(m) } -func (*Property) ProtoMessage() {} -func (*Property) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{2} -} -func (m *Property) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Property.Unmarshal(m, b) -} -func (m *Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Property.Marshal(b, m, deterministic) -} -func (dst *Property) XXX_Merge(src proto.Message) { - xxx_messageInfo_Property.Merge(dst, src) -} -func (m *Property) XXX_Size() int { - return xxx_messageInfo_Property.Size(m) -} -func (m *Property) XXX_DiscardUnknown() { - xxx_messageInfo_Property.DiscardUnknown(m) -} - -var xxx_messageInfo_Property proto.InternalMessageInfo - -const Default_Property_Meaning Property_Meaning = Property_NO_MEANING -const Default_Property_Searchable bool = false -const Default_Property_Locale string = "en" - -func (m *Property) GetMeaning() Property_Meaning { - if m != nil && m.Meaning != nil { - return *m.Meaning - } - return Default_Property_Meaning -} - -func (m *Property) GetMeaningUri() string { - if m != nil && m.MeaningUri != nil { - return *m.MeaningUri - } - return "" -} - -func (m *Property) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Property) GetValue() *PropertyValue { - if m != nil { - return m.Value - } - return nil -} - -func (m *Property) GetMultiple() bool { - if m != nil && m.Multiple != nil { - return *m.Multiple - } - return false -} - -func (m *Property) GetSearchable() bool { - if m != nil && m.Searchable != nil { - return *m.Searchable - } - return Default_Property_Searchable -} - -func (m *Property) GetFtsTokenizationOption() Property_FtsTokenizationOption { - if m != nil && m.FtsTokenizationOption != nil { - return *m.FtsTokenizationOption - } - return Property_HTML -} - -func (m *Property) GetLocale() string { - if m != nil && m.Locale != nil { - return *m.Locale - } - return Default_Property_Locale -} - -type Path struct { - Element []*Path_Element `protobuf:"group,1,rep,name=Element,json=element" json:"element,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Path) Reset() { *m = Path{} } -func (m *Path) String() string { return proto.CompactTextString(m) } -func (*Path) ProtoMessage() {} -func (*Path) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3} -} -func (m *Path) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Path.Unmarshal(m, b) -} -func (m *Path) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Path.Marshal(b, m, deterministic) -} -func (dst *Path) XXX_Merge(src proto.Message) { - xxx_messageInfo_Path.Merge(dst, src) -} -func (m *Path) XXX_Size() int { - return xxx_messageInfo_Path.Size(m) -} -func (m *Path) XXX_DiscardUnknown() { - xxx_messageInfo_Path.DiscardUnknown(m) -} - -var xxx_messageInfo_Path proto.InternalMessageInfo - -func (m *Path) GetElement() []*Path_Element { - if m != nil { - return m.Element - } - return nil -} - -type Path_Element struct { - Type *string `protobuf:"bytes,2,req,name=type" json:"type,omitempty"` - Id *int64 `protobuf:"varint,3,opt,name=id" json:"id,omitempty"` - Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Path_Element) Reset() { *m = Path_Element{} } -func (m *Path_Element) String() string { return proto.CompactTextString(m) } -func (*Path_Element) ProtoMessage() {} -func (*Path_Element) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3, 0} -} -func (m *Path_Element) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Path_Element.Unmarshal(m, b) -} -func (m *Path_Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Path_Element.Marshal(b, m, deterministic) -} -func (dst *Path_Element) XXX_Merge(src proto.Message) { - xxx_messageInfo_Path_Element.Merge(dst, src) -} -func (m *Path_Element) XXX_Size() int { - return xxx_messageInfo_Path_Element.Size(m) -} -func (m *Path_Element) XXX_DiscardUnknown() { - xxx_messageInfo_Path_Element.DiscardUnknown(m) -} - -var xxx_messageInfo_Path_Element proto.InternalMessageInfo - -func (m *Path_Element) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -func (m *Path_Element) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id - } - return 0 -} - -func (m *Path_Element) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -type Reference struct { - App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` - NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` - Path *Path `protobuf:"bytes,14,req,name=path" json:"path,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Reference) Reset() { *m = Reference{} } -func (m *Reference) String() string { return proto.CompactTextString(m) } -func (*Reference) ProtoMessage() {} -func (*Reference) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{4} -} -func (m *Reference) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Reference.Unmarshal(m, b) -} -func (m *Reference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Reference.Marshal(b, m, deterministic) -} -func (dst *Reference) XXX_Merge(src proto.Message) { - xxx_messageInfo_Reference.Merge(dst, src) -} -func (m *Reference) XXX_Size() int { - return xxx_messageInfo_Reference.Size(m) -} -func (m *Reference) XXX_DiscardUnknown() { - xxx_messageInfo_Reference.DiscardUnknown(m) -} - -var xxx_messageInfo_Reference proto.InternalMessageInfo - -func (m *Reference) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -func (m *Reference) GetNameSpace() string { - if m != nil && m.NameSpace != nil { - return *m.NameSpace - } - return "" -} - -func (m *Reference) GetPath() *Path { - if m != nil { - return m.Path - } - return nil -} - -type User struct { - Email *string `protobuf:"bytes,1,req,name=email" json:"email,omitempty"` - AuthDomain *string `protobuf:"bytes,2,req,name=auth_domain,json=authDomain" json:"auth_domain,omitempty"` - Nickname *string `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"` - FederatedIdentity *string `protobuf:"bytes,6,opt,name=federated_identity,json=federatedIdentity" json:"federated_identity,omitempty"` - FederatedProvider *string `protobuf:"bytes,7,opt,name=federated_provider,json=federatedProvider" json:"federated_provider,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *User) Reset() { *m = User{} } -func (m *User) String() string { return proto.CompactTextString(m) } -func (*User) ProtoMessage() {} -func (*User) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{5} -} -func (m *User) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_User.Unmarshal(m, b) -} -func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_User.Marshal(b, m, deterministic) -} -func (dst *User) XXX_Merge(src proto.Message) { - xxx_messageInfo_User.Merge(dst, src) -} -func (m *User) XXX_Size() int { - return xxx_messageInfo_User.Size(m) -} -func (m *User) XXX_DiscardUnknown() { - xxx_messageInfo_User.DiscardUnknown(m) -} - -var xxx_messageInfo_User proto.InternalMessageInfo - -func (m *User) GetEmail() string { - if m != nil && m.Email != nil { - return *m.Email - } - return "" -} - -func (m *User) GetAuthDomain() string { - if m != nil && m.AuthDomain != nil { - return *m.AuthDomain - } - return "" -} - -func (m *User) GetNickname() string { - if m != nil && m.Nickname != nil { - return *m.Nickname - } - return "" -} - -func (m *User) GetFederatedIdentity() string { - if m != nil && m.FederatedIdentity != nil { - return *m.FederatedIdentity - } - return "" -} - -func (m *User) GetFederatedProvider() string { - if m != nil && m.FederatedProvider != nil { - return *m.FederatedProvider - } - return "" -} - -type EntityProto struct { - Key *Reference `protobuf:"bytes,13,req,name=key" json:"key,omitempty"` - EntityGroup *Path `protobuf:"bytes,16,req,name=entity_group,json=entityGroup" json:"entity_group,omitempty"` - Owner *User `protobuf:"bytes,17,opt,name=owner" json:"owner,omitempty"` - Kind *EntityProto_Kind `protobuf:"varint,4,opt,name=kind,enum=appengine.EntityProto_Kind" json:"kind,omitempty"` - KindUri *string `protobuf:"bytes,5,opt,name=kind_uri,json=kindUri" json:"kind_uri,omitempty"` - Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` - RawProperty []*Property `protobuf:"bytes,15,rep,name=raw_property,json=rawProperty" json:"raw_property,omitempty"` - Rank *int32 `protobuf:"varint,18,opt,name=rank" json:"rank,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EntityProto) Reset() { *m = EntityProto{} } -func (m *EntityProto) String() string { return proto.CompactTextString(m) } -func (*EntityProto) ProtoMessage() {} -func (*EntityProto) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{6} -} -func (m *EntityProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EntityProto.Unmarshal(m, b) -} -func (m *EntityProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EntityProto.Marshal(b, m, deterministic) -} -func (dst *EntityProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntityProto.Merge(dst, src) -} -func (m *EntityProto) XXX_Size() int { - return xxx_messageInfo_EntityProto.Size(m) -} -func (m *EntityProto) XXX_DiscardUnknown() { - xxx_messageInfo_EntityProto.DiscardUnknown(m) -} - -var xxx_messageInfo_EntityProto proto.InternalMessageInfo - -func (m *EntityProto) GetKey() *Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *EntityProto) GetEntityGroup() *Path { - if m != nil { - return m.EntityGroup - } - return nil -} - -func (m *EntityProto) GetOwner() *User { - if m != nil { - return m.Owner - } - return nil -} - -func (m *EntityProto) GetKind() EntityProto_Kind { - if m != nil && m.Kind != nil { - return *m.Kind - } - return EntityProto_GD_CONTACT -} - -func (m *EntityProto) GetKindUri() string { - if m != nil && m.KindUri != nil { - return *m.KindUri - } - return "" -} - -func (m *EntityProto) GetProperty() []*Property { - if m != nil { - return m.Property - } - return nil -} - -func (m *EntityProto) GetRawProperty() []*Property { - if m != nil { - return m.RawProperty - } - return nil -} - -func (m *EntityProto) GetRank() int32 { - if m != nil && m.Rank != nil { - return *m.Rank - } - return 0 -} - -type CompositeProperty struct { - IndexId *int64 `protobuf:"varint,1,req,name=index_id,json=indexId" json:"index_id,omitempty"` - Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompositeProperty) Reset() { *m = CompositeProperty{} } -func (m *CompositeProperty) String() string { return proto.CompactTextString(m) } -func (*CompositeProperty) ProtoMessage() {} -func (*CompositeProperty) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{7} -} -func (m *CompositeProperty) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompositeProperty.Unmarshal(m, b) -} -func (m *CompositeProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompositeProperty.Marshal(b, m, deterministic) -} -func (dst *CompositeProperty) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompositeProperty.Merge(dst, src) -} -func (m *CompositeProperty) XXX_Size() int { - return xxx_messageInfo_CompositeProperty.Size(m) -} -func (m *CompositeProperty) XXX_DiscardUnknown() { - xxx_messageInfo_CompositeProperty.DiscardUnknown(m) -} - -var xxx_messageInfo_CompositeProperty proto.InternalMessageInfo - -func (m *CompositeProperty) GetIndexId() int64 { - if m != nil && m.IndexId != nil { - return *m.IndexId - } - return 0 -} - -func (m *CompositeProperty) GetValue() []string { - if m != nil { - return m.Value - } - return nil -} - -type Index struct { - EntityType *string `protobuf:"bytes,1,req,name=entity_type,json=entityType" json:"entity_type,omitempty"` - Ancestor *bool `protobuf:"varint,5,req,name=ancestor" json:"ancestor,omitempty"` - Property []*Index_Property `protobuf:"group,2,rep,name=Property,json=property" json:"property,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Index) Reset() { *m = Index{} } -func (m *Index) String() string { return proto.CompactTextString(m) } -func (*Index) ProtoMessage() {} -func (*Index) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8} -} -func (m *Index) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Index.Unmarshal(m, b) -} -func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Index.Marshal(b, m, deterministic) -} -func (dst *Index) XXX_Merge(src proto.Message) { - xxx_messageInfo_Index.Merge(dst, src) -} -func (m *Index) XXX_Size() int { - return xxx_messageInfo_Index.Size(m) -} -func (m *Index) XXX_DiscardUnknown() { - xxx_messageInfo_Index.DiscardUnknown(m) -} - -var xxx_messageInfo_Index proto.InternalMessageInfo - -func (m *Index) GetEntityType() string { - if m != nil && m.EntityType != nil { - return *m.EntityType - } - return "" -} - -func (m *Index) GetAncestor() bool { - if m != nil && m.Ancestor != nil { - return *m.Ancestor - } - return false -} - -func (m *Index) GetProperty() []*Index_Property { - if m != nil { - return m.Property - } - return nil -} - -type Index_Property struct { - Name *string `protobuf:"bytes,3,req,name=name" json:"name,omitempty"` - Direction *Index_Property_Direction `protobuf:"varint,4,opt,name=direction,enum=appengine.Index_Property_Direction,def=1" json:"direction,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Index_Property) Reset() { *m = Index_Property{} } -func (m *Index_Property) String() string { return proto.CompactTextString(m) } -func (*Index_Property) ProtoMessage() {} -func (*Index_Property) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{8, 0} -} -func (m *Index_Property) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Index_Property.Unmarshal(m, b) -} -func (m *Index_Property) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Index_Property.Marshal(b, m, deterministic) -} -func (dst *Index_Property) XXX_Merge(src proto.Message) { - xxx_messageInfo_Index_Property.Merge(dst, src) -} -func (m *Index_Property) XXX_Size() int { - return xxx_messageInfo_Index_Property.Size(m) -} -func (m *Index_Property) XXX_DiscardUnknown() { - xxx_messageInfo_Index_Property.DiscardUnknown(m) -} - -var xxx_messageInfo_Index_Property proto.InternalMessageInfo - -const Default_Index_Property_Direction Index_Property_Direction = Index_Property_ASCENDING - -func (m *Index_Property) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Index_Property) GetDirection() Index_Property_Direction { - if m != nil && m.Direction != nil { - return *m.Direction - } - return Default_Index_Property_Direction -} - -type CompositeIndex struct { - AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` - Id *int64 `protobuf:"varint,2,req,name=id" json:"id,omitempty"` - Definition *Index `protobuf:"bytes,3,req,name=definition" json:"definition,omitempty"` - State *CompositeIndex_State `protobuf:"varint,4,req,name=state,enum=appengine.CompositeIndex_State" json:"state,omitempty"` - OnlyUseIfRequired *bool `protobuf:"varint,6,opt,name=only_use_if_required,json=onlyUseIfRequired,def=0" json:"only_use_if_required,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompositeIndex) Reset() { *m = CompositeIndex{} } -func (m *CompositeIndex) String() string { return proto.CompactTextString(m) } -func (*CompositeIndex) ProtoMessage() {} -func (*CompositeIndex) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{9} -} -func (m *CompositeIndex) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompositeIndex.Unmarshal(m, b) -} -func (m *CompositeIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompositeIndex.Marshal(b, m, deterministic) -} -func (dst *CompositeIndex) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompositeIndex.Merge(dst, src) -} -func (m *CompositeIndex) XXX_Size() int { - return xxx_messageInfo_CompositeIndex.Size(m) -} -func (m *CompositeIndex) XXX_DiscardUnknown() { - xxx_messageInfo_CompositeIndex.DiscardUnknown(m) -} - -var xxx_messageInfo_CompositeIndex proto.InternalMessageInfo - -const Default_CompositeIndex_OnlyUseIfRequired bool = false - -func (m *CompositeIndex) GetAppId() string { - if m != nil && m.AppId != nil { - return *m.AppId - } - return "" -} - -func (m *CompositeIndex) GetId() int64 { - if m != nil && m.Id != nil { - return *m.Id - } - return 0 -} - -func (m *CompositeIndex) GetDefinition() *Index { - if m != nil { - return m.Definition - } - return nil -} - -func (m *CompositeIndex) GetState() CompositeIndex_State { - if m != nil && m.State != nil { - return *m.State - } - return CompositeIndex_WRITE_ONLY -} - -func (m *CompositeIndex) GetOnlyUseIfRequired() bool { - if m != nil && m.OnlyUseIfRequired != nil { - return *m.OnlyUseIfRequired - } - return Default_CompositeIndex_OnlyUseIfRequired -} - -type IndexPostfix struct { - IndexValue []*IndexPostfix_IndexValue `protobuf:"bytes,1,rep,name=index_value,json=indexValue" json:"index_value,omitempty"` - Key *Reference `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` - Before *bool `protobuf:"varint,3,opt,name=before,def=1" json:"before,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IndexPostfix) Reset() { *m = IndexPostfix{} } -func (m *IndexPostfix) String() string { return proto.CompactTextString(m) } -func (*IndexPostfix) ProtoMessage() {} -func (*IndexPostfix) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10} -} -func (m *IndexPostfix) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IndexPostfix.Unmarshal(m, b) -} -func (m *IndexPostfix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IndexPostfix.Marshal(b, m, deterministic) -} -func (dst *IndexPostfix) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexPostfix.Merge(dst, src) -} -func (m *IndexPostfix) XXX_Size() int { - return xxx_messageInfo_IndexPostfix.Size(m) -} -func (m *IndexPostfix) XXX_DiscardUnknown() { - xxx_messageInfo_IndexPostfix.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexPostfix proto.InternalMessageInfo - -const Default_IndexPostfix_Before bool = true - -func (m *IndexPostfix) GetIndexValue() []*IndexPostfix_IndexValue { - if m != nil { - return m.IndexValue - } - return nil -} - -func (m *IndexPostfix) GetKey() *Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *IndexPostfix) GetBefore() bool { - if m != nil && m.Before != nil { - return *m.Before - } - return Default_IndexPostfix_Before -} - -type IndexPostfix_IndexValue struct { - PropertyName *string `protobuf:"bytes,1,req,name=property_name,json=propertyName" json:"property_name,omitempty"` - Value *PropertyValue `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IndexPostfix_IndexValue) Reset() { *m = IndexPostfix_IndexValue{} } -func (m *IndexPostfix_IndexValue) String() string { return proto.CompactTextString(m) } -func (*IndexPostfix_IndexValue) ProtoMessage() {} -func (*IndexPostfix_IndexValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{10, 0} -} -func (m *IndexPostfix_IndexValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IndexPostfix_IndexValue.Unmarshal(m, b) -} -func (m *IndexPostfix_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IndexPostfix_IndexValue.Marshal(b, m, deterministic) -} -func (dst *IndexPostfix_IndexValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexPostfix_IndexValue.Merge(dst, src) -} -func (m *IndexPostfix_IndexValue) XXX_Size() int { - return xxx_messageInfo_IndexPostfix_IndexValue.Size(m) -} -func (m *IndexPostfix_IndexValue) XXX_DiscardUnknown() { - xxx_messageInfo_IndexPostfix_IndexValue.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexPostfix_IndexValue proto.InternalMessageInfo - -func (m *IndexPostfix_IndexValue) GetPropertyName() string { - if m != nil && m.PropertyName != nil { - return *m.PropertyName - } - return "" -} - -func (m *IndexPostfix_IndexValue) GetValue() *PropertyValue { - if m != nil { - return m.Value - } - return nil -} - -type IndexPosition struct { - Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` - Before *bool `protobuf:"varint,2,opt,name=before,def=1" json:"before,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IndexPosition) Reset() { *m = IndexPosition{} } -func (m *IndexPosition) String() string { return proto.CompactTextString(m) } -func (*IndexPosition) ProtoMessage() {} -func (*IndexPosition) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{11} -} -func (m *IndexPosition) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IndexPosition.Unmarshal(m, b) -} -func (m *IndexPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IndexPosition.Marshal(b, m, deterministic) -} -func (dst *IndexPosition) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexPosition.Merge(dst, src) -} -func (m *IndexPosition) XXX_Size() int { - return xxx_messageInfo_IndexPosition.Size(m) -} -func (m *IndexPosition) XXX_DiscardUnknown() { - xxx_messageInfo_IndexPosition.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexPosition proto.InternalMessageInfo - -const Default_IndexPosition_Before bool = true - -func (m *IndexPosition) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *IndexPosition) GetBefore() bool { - if m != nil && m.Before != nil { - return *m.Before - } - return Default_IndexPosition_Before -} - -type Snapshot struct { - Ts *int64 `protobuf:"varint,1,req,name=ts" json:"ts,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Snapshot) Reset() { *m = Snapshot{} } -func (m *Snapshot) String() string { return proto.CompactTextString(m) } -func (*Snapshot) ProtoMessage() {} -func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{12} -} -func (m *Snapshot) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Snapshot.Unmarshal(m, b) -} -func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic) -} -func (dst *Snapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_Snapshot.Merge(dst, src) -} -func (m *Snapshot) XXX_Size() int { - return xxx_messageInfo_Snapshot.Size(m) -} -func (m *Snapshot) XXX_DiscardUnknown() { - xxx_messageInfo_Snapshot.DiscardUnknown(m) -} - -var xxx_messageInfo_Snapshot proto.InternalMessageInfo - -func (m *Snapshot) GetTs() int64 { - if m != nil && m.Ts != nil { - return *m.Ts - } - return 0 -} - -type InternalHeader struct { - Qos *string `protobuf:"bytes,1,opt,name=qos" json:"qos,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InternalHeader) Reset() { *m = InternalHeader{} } -func (m *InternalHeader) String() string { return proto.CompactTextString(m) } -func (*InternalHeader) ProtoMessage() {} -func (*InternalHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{13} -} -func (m *InternalHeader) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InternalHeader.Unmarshal(m, b) -} -func (m *InternalHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InternalHeader.Marshal(b, m, deterministic) -} -func (dst *InternalHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_InternalHeader.Merge(dst, src) -} -func (m *InternalHeader) XXX_Size() int { - return xxx_messageInfo_InternalHeader.Size(m) -} -func (m *InternalHeader) XXX_DiscardUnknown() { - xxx_messageInfo_InternalHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_InternalHeader proto.InternalMessageInfo - -func (m *InternalHeader) GetQos() string { - if m != nil && m.Qos != nil { - return *m.Qos - } - return "" -} - -type Transaction struct { - Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` - Handle *uint64 `protobuf:"fixed64,1,req,name=handle" json:"handle,omitempty"` - App *string `protobuf:"bytes,2,req,name=app" json:"app,omitempty"` - MarkChanges *bool `protobuf:"varint,3,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Transaction) Reset() { *m = Transaction{} } -func (m *Transaction) String() string { return proto.CompactTextString(m) } -func (*Transaction) ProtoMessage() {} -func (*Transaction) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{14} -} -func (m *Transaction) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Transaction.Unmarshal(m, b) -} -func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Transaction.Marshal(b, m, deterministic) -} -func (dst *Transaction) XXX_Merge(src proto.Message) { - xxx_messageInfo_Transaction.Merge(dst, src) -} -func (m *Transaction) XXX_Size() int { - return xxx_messageInfo_Transaction.Size(m) -} -func (m *Transaction) XXX_DiscardUnknown() { - xxx_messageInfo_Transaction.DiscardUnknown(m) -} - -var xxx_messageInfo_Transaction proto.InternalMessageInfo - -const Default_Transaction_MarkChanges bool = false - -func (m *Transaction) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *Transaction) GetHandle() uint64 { - if m != nil && m.Handle != nil { - return *m.Handle - } - return 0 -} - -func (m *Transaction) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -func (m *Transaction) GetMarkChanges() bool { - if m != nil && m.MarkChanges != nil { - return *m.MarkChanges - } - return Default_Transaction_MarkChanges -} - -type Query struct { - Header *InternalHeader `protobuf:"bytes,39,opt,name=header" json:"header,omitempty"` - App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` - NameSpace *string `protobuf:"bytes,29,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` - Kind *string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"` - Ancestor *Reference `protobuf:"bytes,17,opt,name=ancestor" json:"ancestor,omitempty"` - Filter []*Query_Filter `protobuf:"group,4,rep,name=Filter,json=filter" json:"filter,omitempty"` - SearchQuery *string `protobuf:"bytes,8,opt,name=search_query,json=searchQuery" json:"search_query,omitempty"` - Order []*Query_Order `protobuf:"group,9,rep,name=Order,json=order" json:"order,omitempty"` - Hint *Query_Hint `protobuf:"varint,18,opt,name=hint,enum=appengine.Query_Hint" json:"hint,omitempty"` - Count *int32 `protobuf:"varint,23,opt,name=count" json:"count,omitempty"` - Offset *int32 `protobuf:"varint,12,opt,name=offset,def=0" json:"offset,omitempty"` - Limit *int32 `protobuf:"varint,16,opt,name=limit" json:"limit,omitempty"` - CompiledCursor *CompiledCursor `protobuf:"bytes,30,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` - EndCompiledCursor *CompiledCursor `protobuf:"bytes,31,opt,name=end_compiled_cursor,json=endCompiledCursor" json:"end_compiled_cursor,omitempty"` - CompositeIndex []*CompositeIndex `protobuf:"bytes,19,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` - RequirePerfectPlan *bool `protobuf:"varint,20,opt,name=require_perfect_plan,json=requirePerfectPlan,def=0" json:"require_perfect_plan,omitempty"` - KeysOnly *bool `protobuf:"varint,21,opt,name=keys_only,json=keysOnly,def=0" json:"keys_only,omitempty"` - Transaction *Transaction `protobuf:"bytes,22,opt,name=transaction" json:"transaction,omitempty"` - Compile *bool `protobuf:"varint,25,opt,name=compile,def=0" json:"compile,omitempty"` - FailoverMs *int64 `protobuf:"varint,26,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` - Strong *bool `protobuf:"varint,32,opt,name=strong" json:"strong,omitempty"` - PropertyName []string `protobuf:"bytes,33,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` - GroupByPropertyName []string `protobuf:"bytes,34,rep,name=group_by_property_name,json=groupByPropertyName" json:"group_by_property_name,omitempty"` - Distinct *bool `protobuf:"varint,24,opt,name=distinct" json:"distinct,omitempty"` - MinSafeTimeSeconds *int64 `protobuf:"varint,35,opt,name=min_safe_time_seconds,json=minSafeTimeSeconds" json:"min_safe_time_seconds,omitempty"` - SafeReplicaName []string `protobuf:"bytes,36,rep,name=safe_replica_name,json=safeReplicaName" json:"safe_replica_name,omitempty"` - PersistOffset *bool `protobuf:"varint,37,opt,name=persist_offset,json=persistOffset,def=0" json:"persist_offset,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Query) Reset() { *m = Query{} } -func (m *Query) String() string { return proto.CompactTextString(m) } -func (*Query) ProtoMessage() {} -func (*Query) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15} -} -func (m *Query) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Query.Unmarshal(m, b) -} -func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Query.Marshal(b, m, deterministic) -} -func (dst *Query) XXX_Merge(src proto.Message) { - xxx_messageInfo_Query.Merge(dst, src) -} -func (m *Query) XXX_Size() int { - return xxx_messageInfo_Query.Size(m) -} -func (m *Query) XXX_DiscardUnknown() { - xxx_messageInfo_Query.DiscardUnknown(m) -} - -var xxx_messageInfo_Query proto.InternalMessageInfo - -const Default_Query_Offset int32 = 0 -const Default_Query_RequirePerfectPlan bool = false -const Default_Query_KeysOnly bool = false -const Default_Query_Compile bool = false -const Default_Query_PersistOffset bool = false - -func (m *Query) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *Query) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -func (m *Query) GetNameSpace() string { - if m != nil && m.NameSpace != nil { - return *m.NameSpace - } - return "" -} - -func (m *Query) GetKind() string { - if m != nil && m.Kind != nil { - return *m.Kind - } - return "" -} - -func (m *Query) GetAncestor() *Reference { - if m != nil { - return m.Ancestor - } - return nil -} - -func (m *Query) GetFilter() []*Query_Filter { - if m != nil { - return m.Filter - } - return nil -} - -func (m *Query) GetSearchQuery() string { - if m != nil && m.SearchQuery != nil { - return *m.SearchQuery - } - return "" -} - -func (m *Query) GetOrder() []*Query_Order { - if m != nil { - return m.Order - } - return nil -} - -func (m *Query) GetHint() Query_Hint { - if m != nil && m.Hint != nil { - return *m.Hint - } - return Query_ORDER_FIRST -} - -func (m *Query) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *Query) GetOffset() int32 { - if m != nil && m.Offset != nil { - return *m.Offset - } - return Default_Query_Offset -} - -func (m *Query) GetLimit() int32 { - if m != nil && m.Limit != nil { - return *m.Limit - } - return 0 -} - -func (m *Query) GetCompiledCursor() *CompiledCursor { - if m != nil { - return m.CompiledCursor - } - return nil -} - -func (m *Query) GetEndCompiledCursor() *CompiledCursor { - if m != nil { - return m.EndCompiledCursor - } - return nil -} - -func (m *Query) GetCompositeIndex() []*CompositeIndex { - if m != nil { - return m.CompositeIndex - } - return nil -} - -func (m *Query) GetRequirePerfectPlan() bool { - if m != nil && m.RequirePerfectPlan != nil { - return *m.RequirePerfectPlan - } - return Default_Query_RequirePerfectPlan -} - -func (m *Query) GetKeysOnly() bool { - if m != nil && m.KeysOnly != nil { - return *m.KeysOnly - } - return Default_Query_KeysOnly -} - -func (m *Query) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *Query) GetCompile() bool { - if m != nil && m.Compile != nil { - return *m.Compile - } - return Default_Query_Compile -} - -func (m *Query) GetFailoverMs() int64 { - if m != nil && m.FailoverMs != nil { - return *m.FailoverMs - } - return 0 -} - -func (m *Query) GetStrong() bool { - if m != nil && m.Strong != nil { - return *m.Strong - } - return false -} - -func (m *Query) GetPropertyName() []string { - if m != nil { - return m.PropertyName - } - return nil -} - -func (m *Query) GetGroupByPropertyName() []string { - if m != nil { - return m.GroupByPropertyName - } - return nil -} - -func (m *Query) GetDistinct() bool { - if m != nil && m.Distinct != nil { - return *m.Distinct - } - return false -} - -func (m *Query) GetMinSafeTimeSeconds() int64 { - if m != nil && m.MinSafeTimeSeconds != nil { - return *m.MinSafeTimeSeconds - } - return 0 -} - -func (m *Query) GetSafeReplicaName() []string { - if m != nil { - return m.SafeReplicaName - } - return nil -} - -func (m *Query) GetPersistOffset() bool { - if m != nil && m.PersistOffset != nil { - return *m.PersistOffset - } - return Default_Query_PersistOffset -} - -type Query_Filter struct { - Op *Query_Filter_Operator `protobuf:"varint,6,req,name=op,enum=appengine.Query_Filter_Operator" json:"op,omitempty"` - Property []*Property `protobuf:"bytes,14,rep,name=property" json:"property,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Query_Filter) Reset() { *m = Query_Filter{} } -func (m *Query_Filter) String() string { return proto.CompactTextString(m) } -func (*Query_Filter) ProtoMessage() {} -func (*Query_Filter) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 0} -} -func (m *Query_Filter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Query_Filter.Unmarshal(m, b) -} -func (m *Query_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Query_Filter.Marshal(b, m, deterministic) -} -func (dst *Query_Filter) XXX_Merge(src proto.Message) { - xxx_messageInfo_Query_Filter.Merge(dst, src) -} -func (m *Query_Filter) XXX_Size() int { - return xxx_messageInfo_Query_Filter.Size(m) -} -func (m *Query_Filter) XXX_DiscardUnknown() { - xxx_messageInfo_Query_Filter.DiscardUnknown(m) -} - -var xxx_messageInfo_Query_Filter proto.InternalMessageInfo - -func (m *Query_Filter) GetOp() Query_Filter_Operator { - if m != nil && m.Op != nil { - return *m.Op - } - return Query_Filter_LESS_THAN -} - -func (m *Query_Filter) GetProperty() []*Property { - if m != nil { - return m.Property - } - return nil -} - -type Query_Order struct { - Property *string `protobuf:"bytes,10,req,name=property" json:"property,omitempty"` - Direction *Query_Order_Direction `protobuf:"varint,11,opt,name=direction,enum=appengine.Query_Order_Direction,def=1" json:"direction,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Query_Order) Reset() { *m = Query_Order{} } -func (m *Query_Order) String() string { return proto.CompactTextString(m) } -func (*Query_Order) ProtoMessage() {} -func (*Query_Order) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{15, 1} -} -func (m *Query_Order) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Query_Order.Unmarshal(m, b) -} -func (m *Query_Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Query_Order.Marshal(b, m, deterministic) -} -func (dst *Query_Order) XXX_Merge(src proto.Message) { - xxx_messageInfo_Query_Order.Merge(dst, src) -} -func (m *Query_Order) XXX_Size() int { - return xxx_messageInfo_Query_Order.Size(m) -} -func (m *Query_Order) XXX_DiscardUnknown() { - xxx_messageInfo_Query_Order.DiscardUnknown(m) -} - -var xxx_messageInfo_Query_Order proto.InternalMessageInfo - -const Default_Query_Order_Direction Query_Order_Direction = Query_Order_ASCENDING - -func (m *Query_Order) GetProperty() string { - if m != nil && m.Property != nil { - return *m.Property - } - return "" -} - -func (m *Query_Order) GetDirection() Query_Order_Direction { - if m != nil && m.Direction != nil { - return *m.Direction - } - return Default_Query_Order_Direction -} - -type CompiledQuery struct { - Primaryscan *CompiledQuery_PrimaryScan `protobuf:"group,1,req,name=PrimaryScan,json=primaryscan" json:"primaryscan,omitempty"` - Mergejoinscan []*CompiledQuery_MergeJoinScan `protobuf:"group,7,rep,name=MergeJoinScan,json=mergejoinscan" json:"mergejoinscan,omitempty"` - IndexDef *Index `protobuf:"bytes,21,opt,name=index_def,json=indexDef" json:"index_def,omitempty"` - Offset *int32 `protobuf:"varint,10,opt,name=offset,def=0" json:"offset,omitempty"` - Limit *int32 `protobuf:"varint,11,opt,name=limit" json:"limit,omitempty"` - KeysOnly *bool `protobuf:"varint,12,req,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` - PropertyName []string `protobuf:"bytes,24,rep,name=property_name,json=propertyName" json:"property_name,omitempty"` - DistinctInfixSize *int32 `protobuf:"varint,25,opt,name=distinct_infix_size,json=distinctInfixSize" json:"distinct_infix_size,omitempty"` - Entityfilter *CompiledQuery_EntityFilter `protobuf:"group,13,opt,name=EntityFilter,json=entityfilter" json:"entityfilter,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledQuery) Reset() { *m = CompiledQuery{} } -func (m *CompiledQuery) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery) ProtoMessage() {} -func (*CompiledQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16} -} -func (m *CompiledQuery) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledQuery.Unmarshal(m, b) -} -func (m *CompiledQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledQuery.Marshal(b, m, deterministic) -} -func (dst *CompiledQuery) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledQuery.Merge(dst, src) -} -func (m *CompiledQuery) XXX_Size() int { - return xxx_messageInfo_CompiledQuery.Size(m) -} -func (m *CompiledQuery) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledQuery.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledQuery proto.InternalMessageInfo - -const Default_CompiledQuery_Offset int32 = 0 - -func (m *CompiledQuery) GetPrimaryscan() *CompiledQuery_PrimaryScan { - if m != nil { - return m.Primaryscan - } - return nil -} - -func (m *CompiledQuery) GetMergejoinscan() []*CompiledQuery_MergeJoinScan { - if m != nil { - return m.Mergejoinscan - } - return nil -} - -func (m *CompiledQuery) GetIndexDef() *Index { - if m != nil { - return m.IndexDef - } - return nil -} - -func (m *CompiledQuery) GetOffset() int32 { - if m != nil && m.Offset != nil { - return *m.Offset - } - return Default_CompiledQuery_Offset -} - -func (m *CompiledQuery) GetLimit() int32 { - if m != nil && m.Limit != nil { - return *m.Limit - } - return 0 -} - -func (m *CompiledQuery) GetKeysOnly() bool { - if m != nil && m.KeysOnly != nil { - return *m.KeysOnly - } - return false -} - -func (m *CompiledQuery) GetPropertyName() []string { - if m != nil { - return m.PropertyName - } - return nil -} - -func (m *CompiledQuery) GetDistinctInfixSize() int32 { - if m != nil && m.DistinctInfixSize != nil { - return *m.DistinctInfixSize - } - return 0 -} - -func (m *CompiledQuery) GetEntityfilter() *CompiledQuery_EntityFilter { - if m != nil { - return m.Entityfilter - } - return nil -} - -type CompiledQuery_PrimaryScan struct { - IndexName *string `protobuf:"bytes,2,opt,name=index_name,json=indexName" json:"index_name,omitempty"` - StartKey *string `protobuf:"bytes,3,opt,name=start_key,json=startKey" json:"start_key,omitempty"` - StartInclusive *bool `protobuf:"varint,4,opt,name=start_inclusive,json=startInclusive" json:"start_inclusive,omitempty"` - EndKey *string `protobuf:"bytes,5,opt,name=end_key,json=endKey" json:"end_key,omitempty"` - EndInclusive *bool `protobuf:"varint,6,opt,name=end_inclusive,json=endInclusive" json:"end_inclusive,omitempty"` - StartPostfixValue []string `protobuf:"bytes,22,rep,name=start_postfix_value,json=startPostfixValue" json:"start_postfix_value,omitempty"` - EndPostfixValue []string `protobuf:"bytes,23,rep,name=end_postfix_value,json=endPostfixValue" json:"end_postfix_value,omitempty"` - EndUnappliedLogTimestampUs *int64 `protobuf:"varint,19,opt,name=end_unapplied_log_timestamp_us,json=endUnappliedLogTimestampUs" json:"end_unapplied_log_timestamp_us,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledQuery_PrimaryScan) Reset() { *m = CompiledQuery_PrimaryScan{} } -func (m *CompiledQuery_PrimaryScan) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery_PrimaryScan) ProtoMessage() {} -func (*CompiledQuery_PrimaryScan) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 0} -} -func (m *CompiledQuery_PrimaryScan) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledQuery_PrimaryScan.Unmarshal(m, b) -} -func (m *CompiledQuery_PrimaryScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledQuery_PrimaryScan.Marshal(b, m, deterministic) -} -func (dst *CompiledQuery_PrimaryScan) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledQuery_PrimaryScan.Merge(dst, src) -} -func (m *CompiledQuery_PrimaryScan) XXX_Size() int { - return xxx_messageInfo_CompiledQuery_PrimaryScan.Size(m) -} -func (m *CompiledQuery_PrimaryScan) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledQuery_PrimaryScan.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledQuery_PrimaryScan proto.InternalMessageInfo - -func (m *CompiledQuery_PrimaryScan) GetIndexName() string { - if m != nil && m.IndexName != nil { - return *m.IndexName - } - return "" -} - -func (m *CompiledQuery_PrimaryScan) GetStartKey() string { - if m != nil && m.StartKey != nil { - return *m.StartKey - } - return "" -} - -func (m *CompiledQuery_PrimaryScan) GetStartInclusive() bool { - if m != nil && m.StartInclusive != nil { - return *m.StartInclusive - } - return false -} - -func (m *CompiledQuery_PrimaryScan) GetEndKey() string { - if m != nil && m.EndKey != nil { - return *m.EndKey - } - return "" -} - -func (m *CompiledQuery_PrimaryScan) GetEndInclusive() bool { - if m != nil && m.EndInclusive != nil { - return *m.EndInclusive - } - return false -} - -func (m *CompiledQuery_PrimaryScan) GetStartPostfixValue() []string { - if m != nil { - return m.StartPostfixValue - } - return nil -} - -func (m *CompiledQuery_PrimaryScan) GetEndPostfixValue() []string { - if m != nil { - return m.EndPostfixValue - } - return nil -} - -func (m *CompiledQuery_PrimaryScan) GetEndUnappliedLogTimestampUs() int64 { - if m != nil && m.EndUnappliedLogTimestampUs != nil { - return *m.EndUnappliedLogTimestampUs - } - return 0 -} - -type CompiledQuery_MergeJoinScan struct { - IndexName *string `protobuf:"bytes,8,req,name=index_name,json=indexName" json:"index_name,omitempty"` - PrefixValue []string `protobuf:"bytes,9,rep,name=prefix_value,json=prefixValue" json:"prefix_value,omitempty"` - ValuePrefix *bool `protobuf:"varint,20,opt,name=value_prefix,json=valuePrefix,def=0" json:"value_prefix,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledQuery_MergeJoinScan) Reset() { *m = CompiledQuery_MergeJoinScan{} } -func (m *CompiledQuery_MergeJoinScan) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery_MergeJoinScan) ProtoMessage() {} -func (*CompiledQuery_MergeJoinScan) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 1} -} -func (m *CompiledQuery_MergeJoinScan) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledQuery_MergeJoinScan.Unmarshal(m, b) -} -func (m *CompiledQuery_MergeJoinScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledQuery_MergeJoinScan.Marshal(b, m, deterministic) -} -func (dst *CompiledQuery_MergeJoinScan) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledQuery_MergeJoinScan.Merge(dst, src) -} -func (m *CompiledQuery_MergeJoinScan) XXX_Size() int { - return xxx_messageInfo_CompiledQuery_MergeJoinScan.Size(m) -} -func (m *CompiledQuery_MergeJoinScan) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledQuery_MergeJoinScan.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledQuery_MergeJoinScan proto.InternalMessageInfo - -const Default_CompiledQuery_MergeJoinScan_ValuePrefix bool = false - -func (m *CompiledQuery_MergeJoinScan) GetIndexName() string { - if m != nil && m.IndexName != nil { - return *m.IndexName - } - return "" -} - -func (m *CompiledQuery_MergeJoinScan) GetPrefixValue() []string { - if m != nil { - return m.PrefixValue - } - return nil -} - -func (m *CompiledQuery_MergeJoinScan) GetValuePrefix() bool { - if m != nil && m.ValuePrefix != nil { - return *m.ValuePrefix - } - return Default_CompiledQuery_MergeJoinScan_ValuePrefix -} - -type CompiledQuery_EntityFilter struct { - Distinct *bool `protobuf:"varint,14,opt,name=distinct,def=0" json:"distinct,omitempty"` - Kind *string `protobuf:"bytes,17,opt,name=kind" json:"kind,omitempty"` - Ancestor *Reference `protobuf:"bytes,18,opt,name=ancestor" json:"ancestor,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledQuery_EntityFilter) Reset() { *m = CompiledQuery_EntityFilter{} } -func (m *CompiledQuery_EntityFilter) String() string { return proto.CompactTextString(m) } -func (*CompiledQuery_EntityFilter) ProtoMessage() {} -func (*CompiledQuery_EntityFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{16, 2} -} -func (m *CompiledQuery_EntityFilter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledQuery_EntityFilter.Unmarshal(m, b) -} -func (m *CompiledQuery_EntityFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledQuery_EntityFilter.Marshal(b, m, deterministic) -} -func (dst *CompiledQuery_EntityFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledQuery_EntityFilter.Merge(dst, src) -} -func (m *CompiledQuery_EntityFilter) XXX_Size() int { - return xxx_messageInfo_CompiledQuery_EntityFilter.Size(m) -} -func (m *CompiledQuery_EntityFilter) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledQuery_EntityFilter.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledQuery_EntityFilter proto.InternalMessageInfo - -const Default_CompiledQuery_EntityFilter_Distinct bool = false - -func (m *CompiledQuery_EntityFilter) GetDistinct() bool { - if m != nil && m.Distinct != nil { - return *m.Distinct - } - return Default_CompiledQuery_EntityFilter_Distinct -} - -func (m *CompiledQuery_EntityFilter) GetKind() string { - if m != nil && m.Kind != nil { - return *m.Kind - } - return "" -} - -func (m *CompiledQuery_EntityFilter) GetAncestor() *Reference { - if m != nil { - return m.Ancestor - } - return nil -} - -type CompiledCursor struct { - Position *CompiledCursor_Position `protobuf:"group,2,opt,name=Position,json=position" json:"position,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledCursor) Reset() { *m = CompiledCursor{} } -func (m *CompiledCursor) String() string { return proto.CompactTextString(m) } -func (*CompiledCursor) ProtoMessage() {} -func (*CompiledCursor) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17} -} -func (m *CompiledCursor) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledCursor.Unmarshal(m, b) -} -func (m *CompiledCursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledCursor.Marshal(b, m, deterministic) -} -func (dst *CompiledCursor) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledCursor.Merge(dst, src) -} -func (m *CompiledCursor) XXX_Size() int { - return xxx_messageInfo_CompiledCursor.Size(m) -} -func (m *CompiledCursor) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledCursor.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledCursor proto.InternalMessageInfo - -func (m *CompiledCursor) GetPosition() *CompiledCursor_Position { - if m != nil { - return m.Position - } - return nil -} - -type CompiledCursor_Position struct { - StartKey *string `protobuf:"bytes,27,opt,name=start_key,json=startKey" json:"start_key,omitempty"` - Indexvalue []*CompiledCursor_Position_IndexValue `protobuf:"group,29,rep,name=IndexValue,json=indexvalue" json:"indexvalue,omitempty"` - Key *Reference `protobuf:"bytes,32,opt,name=key" json:"key,omitempty"` - StartInclusive *bool `protobuf:"varint,28,opt,name=start_inclusive,json=startInclusive,def=1" json:"start_inclusive,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledCursor_Position) Reset() { *m = CompiledCursor_Position{} } -func (m *CompiledCursor_Position) String() string { return proto.CompactTextString(m) } -func (*CompiledCursor_Position) ProtoMessage() {} -func (*CompiledCursor_Position) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0} -} -func (m *CompiledCursor_Position) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledCursor_Position.Unmarshal(m, b) -} -func (m *CompiledCursor_Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledCursor_Position.Marshal(b, m, deterministic) -} -func (dst *CompiledCursor_Position) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledCursor_Position.Merge(dst, src) -} -func (m *CompiledCursor_Position) XXX_Size() int { - return xxx_messageInfo_CompiledCursor_Position.Size(m) -} -func (m *CompiledCursor_Position) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledCursor_Position.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledCursor_Position proto.InternalMessageInfo - -const Default_CompiledCursor_Position_StartInclusive bool = true - -func (m *CompiledCursor_Position) GetStartKey() string { - if m != nil && m.StartKey != nil { - return *m.StartKey - } - return "" -} - -func (m *CompiledCursor_Position) GetIndexvalue() []*CompiledCursor_Position_IndexValue { - if m != nil { - return m.Indexvalue - } - return nil -} - -func (m *CompiledCursor_Position) GetKey() *Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *CompiledCursor_Position) GetStartInclusive() bool { - if m != nil && m.StartInclusive != nil { - return *m.StartInclusive - } - return Default_CompiledCursor_Position_StartInclusive -} - -type CompiledCursor_Position_IndexValue struct { - Property *string `protobuf:"bytes,30,opt,name=property" json:"property,omitempty"` - Value *PropertyValue `protobuf:"bytes,31,req,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompiledCursor_Position_IndexValue) Reset() { *m = CompiledCursor_Position_IndexValue{} } -func (m *CompiledCursor_Position_IndexValue) String() string { return proto.CompactTextString(m) } -func (*CompiledCursor_Position_IndexValue) ProtoMessage() {} -func (*CompiledCursor_Position_IndexValue) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{17, 0, 0} -} -func (m *CompiledCursor_Position_IndexValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompiledCursor_Position_IndexValue.Unmarshal(m, b) -} -func (m *CompiledCursor_Position_IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompiledCursor_Position_IndexValue.Marshal(b, m, deterministic) -} -func (dst *CompiledCursor_Position_IndexValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompiledCursor_Position_IndexValue.Merge(dst, src) -} -func (m *CompiledCursor_Position_IndexValue) XXX_Size() int { - return xxx_messageInfo_CompiledCursor_Position_IndexValue.Size(m) -} -func (m *CompiledCursor_Position_IndexValue) XXX_DiscardUnknown() { - xxx_messageInfo_CompiledCursor_Position_IndexValue.DiscardUnknown(m) -} - -var xxx_messageInfo_CompiledCursor_Position_IndexValue proto.InternalMessageInfo - -func (m *CompiledCursor_Position_IndexValue) GetProperty() string { - if m != nil && m.Property != nil { - return *m.Property - } - return "" -} - -func (m *CompiledCursor_Position_IndexValue) GetValue() *PropertyValue { - if m != nil { - return m.Value - } - return nil -} - -type Cursor struct { - Cursor *uint64 `protobuf:"fixed64,1,req,name=cursor" json:"cursor,omitempty"` - App *string `protobuf:"bytes,2,opt,name=app" json:"app,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cursor) Reset() { *m = Cursor{} } -func (m *Cursor) String() string { return proto.CompactTextString(m) } -func (*Cursor) ProtoMessage() {} -func (*Cursor) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{18} -} -func (m *Cursor) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Cursor.Unmarshal(m, b) -} -func (m *Cursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Cursor.Marshal(b, m, deterministic) -} -func (dst *Cursor) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cursor.Merge(dst, src) -} -func (m *Cursor) XXX_Size() int { - return xxx_messageInfo_Cursor.Size(m) -} -func (m *Cursor) XXX_DiscardUnknown() { - xxx_messageInfo_Cursor.DiscardUnknown(m) -} - -var xxx_messageInfo_Cursor proto.InternalMessageInfo - -func (m *Cursor) GetCursor() uint64 { - if m != nil && m.Cursor != nil { - return *m.Cursor - } - return 0 -} - -func (m *Cursor) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -type Error struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Error) Reset() { *m = Error{} } -func (m *Error) String() string { return proto.CompactTextString(m) } -func (*Error) ProtoMessage() {} -func (*Error) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{19} -} -func (m *Error) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Error.Unmarshal(m, b) -} -func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Error.Marshal(b, m, deterministic) -} -func (dst *Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_Error.Merge(dst, src) -} -func (m *Error) XXX_Size() int { - return xxx_messageInfo_Error.Size(m) -} -func (m *Error) XXX_DiscardUnknown() { - xxx_messageInfo_Error.DiscardUnknown(m) -} - -var xxx_messageInfo_Error proto.InternalMessageInfo - -type Cost struct { - IndexWrites *int32 `protobuf:"varint,1,opt,name=index_writes,json=indexWrites" json:"index_writes,omitempty"` - IndexWriteBytes *int32 `protobuf:"varint,2,opt,name=index_write_bytes,json=indexWriteBytes" json:"index_write_bytes,omitempty"` - EntityWrites *int32 `protobuf:"varint,3,opt,name=entity_writes,json=entityWrites" json:"entity_writes,omitempty"` - EntityWriteBytes *int32 `protobuf:"varint,4,opt,name=entity_write_bytes,json=entityWriteBytes" json:"entity_write_bytes,omitempty"` - Commitcost *Cost_CommitCost `protobuf:"group,5,opt,name=CommitCost,json=commitcost" json:"commitcost,omitempty"` - ApproximateStorageDelta *int32 `protobuf:"varint,8,opt,name=approximate_storage_delta,json=approximateStorageDelta" json:"approximate_storage_delta,omitempty"` - IdSequenceUpdates *int32 `protobuf:"varint,9,opt,name=id_sequence_updates,json=idSequenceUpdates" json:"id_sequence_updates,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cost) Reset() { *m = Cost{} } -func (m *Cost) String() string { return proto.CompactTextString(m) } -func (*Cost) ProtoMessage() {} -func (*Cost) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20} -} -func (m *Cost) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Cost.Unmarshal(m, b) -} -func (m *Cost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Cost.Marshal(b, m, deterministic) -} -func (dst *Cost) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cost.Merge(dst, src) -} -func (m *Cost) XXX_Size() int { - return xxx_messageInfo_Cost.Size(m) -} -func (m *Cost) XXX_DiscardUnknown() { - xxx_messageInfo_Cost.DiscardUnknown(m) -} - -var xxx_messageInfo_Cost proto.InternalMessageInfo - -func (m *Cost) GetIndexWrites() int32 { - if m != nil && m.IndexWrites != nil { - return *m.IndexWrites - } - return 0 -} - -func (m *Cost) GetIndexWriteBytes() int32 { - if m != nil && m.IndexWriteBytes != nil { - return *m.IndexWriteBytes - } - return 0 -} - -func (m *Cost) GetEntityWrites() int32 { - if m != nil && m.EntityWrites != nil { - return *m.EntityWrites - } - return 0 -} - -func (m *Cost) GetEntityWriteBytes() int32 { - if m != nil && m.EntityWriteBytes != nil { - return *m.EntityWriteBytes - } - return 0 -} - -func (m *Cost) GetCommitcost() *Cost_CommitCost { - if m != nil { - return m.Commitcost - } - return nil -} - -func (m *Cost) GetApproximateStorageDelta() int32 { - if m != nil && m.ApproximateStorageDelta != nil { - return *m.ApproximateStorageDelta - } - return 0 -} - -func (m *Cost) GetIdSequenceUpdates() int32 { - if m != nil && m.IdSequenceUpdates != nil { - return *m.IdSequenceUpdates - } - return 0 -} - -type Cost_CommitCost struct { - RequestedEntityPuts *int32 `protobuf:"varint,6,opt,name=requested_entity_puts,json=requestedEntityPuts" json:"requested_entity_puts,omitempty"` - RequestedEntityDeletes *int32 `protobuf:"varint,7,opt,name=requested_entity_deletes,json=requestedEntityDeletes" json:"requested_entity_deletes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cost_CommitCost) Reset() { *m = Cost_CommitCost{} } -func (m *Cost_CommitCost) String() string { return proto.CompactTextString(m) } -func (*Cost_CommitCost) ProtoMessage() {} -func (*Cost_CommitCost) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{20, 0} -} -func (m *Cost_CommitCost) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Cost_CommitCost.Unmarshal(m, b) -} -func (m *Cost_CommitCost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Cost_CommitCost.Marshal(b, m, deterministic) -} -func (dst *Cost_CommitCost) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cost_CommitCost.Merge(dst, src) -} -func (m *Cost_CommitCost) XXX_Size() int { - return xxx_messageInfo_Cost_CommitCost.Size(m) -} -func (m *Cost_CommitCost) XXX_DiscardUnknown() { - xxx_messageInfo_Cost_CommitCost.DiscardUnknown(m) -} - -var xxx_messageInfo_Cost_CommitCost proto.InternalMessageInfo - -func (m *Cost_CommitCost) GetRequestedEntityPuts() int32 { - if m != nil && m.RequestedEntityPuts != nil { - return *m.RequestedEntityPuts - } - return 0 -} - -func (m *Cost_CommitCost) GetRequestedEntityDeletes() int32 { - if m != nil && m.RequestedEntityDeletes != nil { - return *m.RequestedEntityDeletes - } - return 0 -} - -type GetRequest struct { - Header *InternalHeader `protobuf:"bytes,6,opt,name=header" json:"header,omitempty"` - Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` - Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` - FailoverMs *int64 `protobuf:"varint,3,opt,name=failover_ms,json=failoverMs" json:"failover_ms,omitempty"` - Strong *bool `protobuf:"varint,4,opt,name=strong" json:"strong,omitempty"` - AllowDeferred *bool `protobuf:"varint,5,opt,name=allow_deferred,json=allowDeferred,def=0" json:"allow_deferred,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetRequest) Reset() { *m = GetRequest{} } -func (m *GetRequest) String() string { return proto.CompactTextString(m) } -func (*GetRequest) ProtoMessage() {} -func (*GetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{21} -} -func (m *GetRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetRequest.Unmarshal(m, b) -} -func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) -} -func (dst *GetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetRequest.Merge(dst, src) -} -func (m *GetRequest) XXX_Size() int { - return xxx_messageInfo_GetRequest.Size(m) -} -func (m *GetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetRequest proto.InternalMessageInfo - -const Default_GetRequest_AllowDeferred bool = false - -func (m *GetRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *GetRequest) GetKey() []*Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *GetRequest) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *GetRequest) GetFailoverMs() int64 { - if m != nil && m.FailoverMs != nil { - return *m.FailoverMs - } - return 0 -} - -func (m *GetRequest) GetStrong() bool { - if m != nil && m.Strong != nil { - return *m.Strong - } - return false -} - -func (m *GetRequest) GetAllowDeferred() bool { - if m != nil && m.AllowDeferred != nil { - return *m.AllowDeferred - } - return Default_GetRequest_AllowDeferred -} - -type GetResponse struct { - Entity []*GetResponse_Entity `protobuf:"group,1,rep,name=Entity,json=entity" json:"entity,omitempty"` - Deferred []*Reference `protobuf:"bytes,5,rep,name=deferred" json:"deferred,omitempty"` - InOrder *bool `protobuf:"varint,6,opt,name=in_order,json=inOrder,def=1" json:"in_order,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetResponse) Reset() { *m = GetResponse{} } -func (m *GetResponse) String() string { return proto.CompactTextString(m) } -func (*GetResponse) ProtoMessage() {} -func (*GetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22} -} -func (m *GetResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetResponse.Unmarshal(m, b) -} -func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic) -} -func (dst *GetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetResponse.Merge(dst, src) -} -func (m *GetResponse) XXX_Size() int { - return xxx_messageInfo_GetResponse.Size(m) -} -func (m *GetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetResponse proto.InternalMessageInfo - -const Default_GetResponse_InOrder bool = true - -func (m *GetResponse) GetEntity() []*GetResponse_Entity { - if m != nil { - return m.Entity - } - return nil -} - -func (m *GetResponse) GetDeferred() []*Reference { - if m != nil { - return m.Deferred - } - return nil -} - -func (m *GetResponse) GetInOrder() bool { - if m != nil && m.InOrder != nil { - return *m.InOrder - } - return Default_GetResponse_InOrder -} - -type GetResponse_Entity struct { - Entity *EntityProto `protobuf:"bytes,2,opt,name=entity" json:"entity,omitempty"` - Key *Reference `protobuf:"bytes,4,opt,name=key" json:"key,omitempty"` - Version *int64 `protobuf:"varint,3,opt,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetResponse_Entity) Reset() { *m = GetResponse_Entity{} } -func (m *GetResponse_Entity) String() string { return proto.CompactTextString(m) } -func (*GetResponse_Entity) ProtoMessage() {} -func (*GetResponse_Entity) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{22, 0} -} -func (m *GetResponse_Entity) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetResponse_Entity.Unmarshal(m, b) -} -func (m *GetResponse_Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetResponse_Entity.Marshal(b, m, deterministic) -} -func (dst *GetResponse_Entity) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetResponse_Entity.Merge(dst, src) -} -func (m *GetResponse_Entity) XXX_Size() int { - return xxx_messageInfo_GetResponse_Entity.Size(m) -} -func (m *GetResponse_Entity) XXX_DiscardUnknown() { - xxx_messageInfo_GetResponse_Entity.DiscardUnknown(m) -} - -var xxx_messageInfo_GetResponse_Entity proto.InternalMessageInfo - -func (m *GetResponse_Entity) GetEntity() *EntityProto { - if m != nil { - return m.Entity - } - return nil -} - -func (m *GetResponse_Entity) GetKey() *Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *GetResponse_Entity) GetVersion() int64 { - if m != nil && m.Version != nil { - return *m.Version - } - return 0 -} - -type PutRequest struct { - Header *InternalHeader `protobuf:"bytes,11,opt,name=header" json:"header,omitempty"` - Entity []*EntityProto `protobuf:"bytes,1,rep,name=entity" json:"entity,omitempty"` - Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"` - CompositeIndex []*CompositeIndex `protobuf:"bytes,3,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` - Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` - Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` - MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` - Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` - AutoIdPolicy *PutRequest_AutoIdPolicy `protobuf:"varint,10,opt,name=auto_id_policy,json=autoIdPolicy,enum=appengine.PutRequest_AutoIdPolicy,def=0" json:"auto_id_policy,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PutRequest) Reset() { *m = PutRequest{} } -func (m *PutRequest) String() string { return proto.CompactTextString(m) } -func (*PutRequest) ProtoMessage() {} -func (*PutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{23} -} -func (m *PutRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PutRequest.Unmarshal(m, b) -} -func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PutRequest.Marshal(b, m, deterministic) -} -func (dst *PutRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PutRequest.Merge(dst, src) -} -func (m *PutRequest) XXX_Size() int { - return xxx_messageInfo_PutRequest.Size(m) -} -func (m *PutRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PutRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PutRequest proto.InternalMessageInfo - -const Default_PutRequest_Trusted bool = false -const Default_PutRequest_Force bool = false -const Default_PutRequest_MarkChanges bool = false -const Default_PutRequest_AutoIdPolicy PutRequest_AutoIdPolicy = PutRequest_CURRENT - -func (m *PutRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *PutRequest) GetEntity() []*EntityProto { - if m != nil { - return m.Entity - } - return nil -} - -func (m *PutRequest) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *PutRequest) GetCompositeIndex() []*CompositeIndex { - if m != nil { - return m.CompositeIndex - } - return nil -} - -func (m *PutRequest) GetTrusted() bool { - if m != nil && m.Trusted != nil { - return *m.Trusted - } - return Default_PutRequest_Trusted -} - -func (m *PutRequest) GetForce() bool { - if m != nil && m.Force != nil { - return *m.Force - } - return Default_PutRequest_Force -} - -func (m *PutRequest) GetMarkChanges() bool { - if m != nil && m.MarkChanges != nil { - return *m.MarkChanges - } - return Default_PutRequest_MarkChanges -} - -func (m *PutRequest) GetSnapshot() []*Snapshot { - if m != nil { - return m.Snapshot - } - return nil -} - -func (m *PutRequest) GetAutoIdPolicy() PutRequest_AutoIdPolicy { - if m != nil && m.AutoIdPolicy != nil { - return *m.AutoIdPolicy - } - return Default_PutRequest_AutoIdPolicy -} - -type PutResponse struct { - Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` - Cost *Cost `protobuf:"bytes,2,opt,name=cost" json:"cost,omitempty"` - Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PutResponse) Reset() { *m = PutResponse{} } -func (m *PutResponse) String() string { return proto.CompactTextString(m) } -func (*PutResponse) ProtoMessage() {} -func (*PutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{24} -} -func (m *PutResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PutResponse.Unmarshal(m, b) -} -func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PutResponse.Marshal(b, m, deterministic) -} -func (dst *PutResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PutResponse.Merge(dst, src) -} -func (m *PutResponse) XXX_Size() int { - return xxx_messageInfo_PutResponse.Size(m) -} -func (m *PutResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PutResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PutResponse proto.InternalMessageInfo - -func (m *PutResponse) GetKey() []*Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *PutResponse) GetCost() *Cost { - if m != nil { - return m.Cost - } - return nil -} - -func (m *PutResponse) GetVersion() []int64 { - if m != nil { - return m.Version - } - return nil -} - -type TouchRequest struct { - Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` - Key []*Reference `protobuf:"bytes,1,rep,name=key" json:"key,omitempty"` - CompositeIndex []*CompositeIndex `protobuf:"bytes,2,rep,name=composite_index,json=compositeIndex" json:"composite_index,omitempty"` - Force *bool `protobuf:"varint,3,opt,name=force,def=0" json:"force,omitempty"` - Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TouchRequest) Reset() { *m = TouchRequest{} } -func (m *TouchRequest) String() string { return proto.CompactTextString(m) } -func (*TouchRequest) ProtoMessage() {} -func (*TouchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{25} -} -func (m *TouchRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TouchRequest.Unmarshal(m, b) -} -func (m *TouchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TouchRequest.Marshal(b, m, deterministic) -} -func (dst *TouchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TouchRequest.Merge(dst, src) -} -func (m *TouchRequest) XXX_Size() int { - return xxx_messageInfo_TouchRequest.Size(m) -} -func (m *TouchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TouchRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TouchRequest proto.InternalMessageInfo - -const Default_TouchRequest_Force bool = false - -func (m *TouchRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *TouchRequest) GetKey() []*Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *TouchRequest) GetCompositeIndex() []*CompositeIndex { - if m != nil { - return m.CompositeIndex - } - return nil -} - -func (m *TouchRequest) GetForce() bool { - if m != nil && m.Force != nil { - return *m.Force - } - return Default_TouchRequest_Force -} - -func (m *TouchRequest) GetSnapshot() []*Snapshot { - if m != nil { - return m.Snapshot - } - return nil -} - -type TouchResponse struct { - Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TouchResponse) Reset() { *m = TouchResponse{} } -func (m *TouchResponse) String() string { return proto.CompactTextString(m) } -func (*TouchResponse) ProtoMessage() {} -func (*TouchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{26} -} -func (m *TouchResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TouchResponse.Unmarshal(m, b) -} -func (m *TouchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TouchResponse.Marshal(b, m, deterministic) -} -func (dst *TouchResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TouchResponse.Merge(dst, src) -} -func (m *TouchResponse) XXX_Size() int { - return xxx_messageInfo_TouchResponse.Size(m) -} -func (m *TouchResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TouchResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TouchResponse proto.InternalMessageInfo - -func (m *TouchResponse) GetCost() *Cost { - if m != nil { - return m.Cost - } - return nil -} - -type DeleteRequest struct { - Header *InternalHeader `protobuf:"bytes,10,opt,name=header" json:"header,omitempty"` - Key []*Reference `protobuf:"bytes,6,rep,name=key" json:"key,omitempty"` - Transaction *Transaction `protobuf:"bytes,5,opt,name=transaction" json:"transaction,omitempty"` - Trusted *bool `protobuf:"varint,4,opt,name=trusted,def=0" json:"trusted,omitempty"` - Force *bool `protobuf:"varint,7,opt,name=force,def=0" json:"force,omitempty"` - MarkChanges *bool `protobuf:"varint,8,opt,name=mark_changes,json=markChanges,def=0" json:"mark_changes,omitempty"` - Snapshot []*Snapshot `protobuf:"bytes,9,rep,name=snapshot" json:"snapshot,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } -func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteRequest) ProtoMessage() {} -func (*DeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{27} -} -func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteRequest.Unmarshal(m, b) -} -func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) -} -func (dst *DeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRequest.Merge(dst, src) -} -func (m *DeleteRequest) XXX_Size() int { - return xxx_messageInfo_DeleteRequest.Size(m) -} -func (m *DeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo - -const Default_DeleteRequest_Trusted bool = false -const Default_DeleteRequest_Force bool = false -const Default_DeleteRequest_MarkChanges bool = false - -func (m *DeleteRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *DeleteRequest) GetKey() []*Reference { - if m != nil { - return m.Key - } - return nil -} - -func (m *DeleteRequest) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *DeleteRequest) GetTrusted() bool { - if m != nil && m.Trusted != nil { - return *m.Trusted - } - return Default_DeleteRequest_Trusted -} - -func (m *DeleteRequest) GetForce() bool { - if m != nil && m.Force != nil { - return *m.Force - } - return Default_DeleteRequest_Force -} - -func (m *DeleteRequest) GetMarkChanges() bool { - if m != nil && m.MarkChanges != nil { - return *m.MarkChanges - } - return Default_DeleteRequest_MarkChanges -} - -func (m *DeleteRequest) GetSnapshot() []*Snapshot { - if m != nil { - return m.Snapshot - } - return nil -} - -type DeleteResponse struct { - Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` - Version []int64 `protobuf:"varint,3,rep,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } -func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteResponse) ProtoMessage() {} -func (*DeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{28} -} -func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteResponse.Unmarshal(m, b) -} -func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) -} -func (dst *DeleteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteResponse.Merge(dst, src) -} -func (m *DeleteResponse) XXX_Size() int { - return xxx_messageInfo_DeleteResponse.Size(m) -} -func (m *DeleteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo - -func (m *DeleteResponse) GetCost() *Cost { - if m != nil { - return m.Cost - } - return nil -} - -func (m *DeleteResponse) GetVersion() []int64 { - if m != nil { - return m.Version - } - return nil -} - -type NextRequest struct { - Header *InternalHeader `protobuf:"bytes,5,opt,name=header" json:"header,omitempty"` - Cursor *Cursor `protobuf:"bytes,1,req,name=cursor" json:"cursor,omitempty"` - Count *int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"` - Offset *int32 `protobuf:"varint,4,opt,name=offset,def=0" json:"offset,omitempty"` - Compile *bool `protobuf:"varint,3,opt,name=compile,def=0" json:"compile,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NextRequest) Reset() { *m = NextRequest{} } -func (m *NextRequest) String() string { return proto.CompactTextString(m) } -func (*NextRequest) ProtoMessage() {} -func (*NextRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{29} -} -func (m *NextRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NextRequest.Unmarshal(m, b) -} -func (m *NextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NextRequest.Marshal(b, m, deterministic) -} -func (dst *NextRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NextRequest.Merge(dst, src) -} -func (m *NextRequest) XXX_Size() int { - return xxx_messageInfo_NextRequest.Size(m) -} -func (m *NextRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NextRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_NextRequest proto.InternalMessageInfo - -const Default_NextRequest_Offset int32 = 0 -const Default_NextRequest_Compile bool = false - -func (m *NextRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *NextRequest) GetCursor() *Cursor { - if m != nil { - return m.Cursor - } - return nil -} - -func (m *NextRequest) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *NextRequest) GetOffset() int32 { - if m != nil && m.Offset != nil { - return *m.Offset - } - return Default_NextRequest_Offset -} - -func (m *NextRequest) GetCompile() bool { - if m != nil && m.Compile != nil { - return *m.Compile - } - return Default_NextRequest_Compile -} - -type QueryResult struct { - Cursor *Cursor `protobuf:"bytes,1,opt,name=cursor" json:"cursor,omitempty"` - Result []*EntityProto `protobuf:"bytes,2,rep,name=result" json:"result,omitempty"` - SkippedResults *int32 `protobuf:"varint,7,opt,name=skipped_results,json=skippedResults" json:"skipped_results,omitempty"` - MoreResults *bool `protobuf:"varint,3,req,name=more_results,json=moreResults" json:"more_results,omitempty"` - KeysOnly *bool `protobuf:"varint,4,opt,name=keys_only,json=keysOnly" json:"keys_only,omitempty"` - IndexOnly *bool `protobuf:"varint,9,opt,name=index_only,json=indexOnly" json:"index_only,omitempty"` - SmallOps *bool `protobuf:"varint,10,opt,name=small_ops,json=smallOps" json:"small_ops,omitempty"` - CompiledQuery *CompiledQuery `protobuf:"bytes,5,opt,name=compiled_query,json=compiledQuery" json:"compiled_query,omitempty"` - CompiledCursor *CompiledCursor `protobuf:"bytes,6,opt,name=compiled_cursor,json=compiledCursor" json:"compiled_cursor,omitempty"` - Index []*CompositeIndex `protobuf:"bytes,8,rep,name=index" json:"index,omitempty"` - Version []int64 `protobuf:"varint,11,rep,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *QueryResult) Reset() { *m = QueryResult{} } -func (m *QueryResult) String() string { return proto.CompactTextString(m) } -func (*QueryResult) ProtoMessage() {} -func (*QueryResult) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{30} -} -func (m *QueryResult) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryResult.Unmarshal(m, b) -} -func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic) -} -func (dst *QueryResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResult.Merge(dst, src) -} -func (m *QueryResult) XXX_Size() int { - return xxx_messageInfo_QueryResult.Size(m) -} -func (m *QueryResult) XXX_DiscardUnknown() { - xxx_messageInfo_QueryResult.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryResult proto.InternalMessageInfo - -func (m *QueryResult) GetCursor() *Cursor { - if m != nil { - return m.Cursor - } - return nil -} - -func (m *QueryResult) GetResult() []*EntityProto { - if m != nil { - return m.Result - } - return nil -} - -func (m *QueryResult) GetSkippedResults() int32 { - if m != nil && m.SkippedResults != nil { - return *m.SkippedResults - } - return 0 -} - -func (m *QueryResult) GetMoreResults() bool { - if m != nil && m.MoreResults != nil { - return *m.MoreResults - } - return false -} - -func (m *QueryResult) GetKeysOnly() bool { - if m != nil && m.KeysOnly != nil { - return *m.KeysOnly - } - return false -} - -func (m *QueryResult) GetIndexOnly() bool { - if m != nil && m.IndexOnly != nil { - return *m.IndexOnly - } - return false -} - -func (m *QueryResult) GetSmallOps() bool { - if m != nil && m.SmallOps != nil { - return *m.SmallOps - } - return false -} - -func (m *QueryResult) GetCompiledQuery() *CompiledQuery { - if m != nil { - return m.CompiledQuery - } - return nil -} - -func (m *QueryResult) GetCompiledCursor() *CompiledCursor { - if m != nil { - return m.CompiledCursor - } - return nil -} - -func (m *QueryResult) GetIndex() []*CompositeIndex { - if m != nil { - return m.Index - } - return nil -} - -func (m *QueryResult) GetVersion() []int64 { - if m != nil { - return m.Version - } - return nil -} - -type AllocateIdsRequest struct { - Header *InternalHeader `protobuf:"bytes,4,opt,name=header" json:"header,omitempty"` - ModelKey *Reference `protobuf:"bytes,1,opt,name=model_key,json=modelKey" json:"model_key,omitempty"` - Size *int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` - Max *int64 `protobuf:"varint,3,opt,name=max" json:"max,omitempty"` - Reserve []*Reference `protobuf:"bytes,5,rep,name=reserve" json:"reserve,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AllocateIdsRequest) Reset() { *m = AllocateIdsRequest{} } -func (m *AllocateIdsRequest) String() string { return proto.CompactTextString(m) } -func (*AllocateIdsRequest) ProtoMessage() {} -func (*AllocateIdsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{31} -} -func (m *AllocateIdsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AllocateIdsRequest.Unmarshal(m, b) -} -func (m *AllocateIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AllocateIdsRequest.Marshal(b, m, deterministic) -} -func (dst *AllocateIdsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocateIdsRequest.Merge(dst, src) -} -func (m *AllocateIdsRequest) XXX_Size() int { - return xxx_messageInfo_AllocateIdsRequest.Size(m) -} -func (m *AllocateIdsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AllocateIdsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AllocateIdsRequest proto.InternalMessageInfo - -func (m *AllocateIdsRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *AllocateIdsRequest) GetModelKey() *Reference { - if m != nil { - return m.ModelKey - } - return nil -} - -func (m *AllocateIdsRequest) GetSize() int64 { - if m != nil && m.Size != nil { - return *m.Size - } - return 0 -} - -func (m *AllocateIdsRequest) GetMax() int64 { - if m != nil && m.Max != nil { - return *m.Max - } - return 0 -} - -func (m *AllocateIdsRequest) GetReserve() []*Reference { - if m != nil { - return m.Reserve - } - return nil -} - -type AllocateIdsResponse struct { - Start *int64 `protobuf:"varint,1,req,name=start" json:"start,omitempty"` - End *int64 `protobuf:"varint,2,req,name=end" json:"end,omitempty"` - Cost *Cost `protobuf:"bytes,3,opt,name=cost" json:"cost,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AllocateIdsResponse) Reset() { *m = AllocateIdsResponse{} } -func (m *AllocateIdsResponse) String() string { return proto.CompactTextString(m) } -func (*AllocateIdsResponse) ProtoMessage() {} -func (*AllocateIdsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{32} -} -func (m *AllocateIdsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AllocateIdsResponse.Unmarshal(m, b) -} -func (m *AllocateIdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AllocateIdsResponse.Marshal(b, m, deterministic) -} -func (dst *AllocateIdsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocateIdsResponse.Merge(dst, src) -} -func (m *AllocateIdsResponse) XXX_Size() int { - return xxx_messageInfo_AllocateIdsResponse.Size(m) -} -func (m *AllocateIdsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AllocateIdsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AllocateIdsResponse proto.InternalMessageInfo - -func (m *AllocateIdsResponse) GetStart() int64 { - if m != nil && m.Start != nil { - return *m.Start - } - return 0 -} - -func (m *AllocateIdsResponse) GetEnd() int64 { - if m != nil && m.End != nil { - return *m.End - } - return 0 -} - -func (m *AllocateIdsResponse) GetCost() *Cost { - if m != nil { - return m.Cost - } - return nil -} - -type CompositeIndices struct { - Index []*CompositeIndex `protobuf:"bytes,1,rep,name=index" json:"index,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompositeIndices) Reset() { *m = CompositeIndices{} } -func (m *CompositeIndices) String() string { return proto.CompactTextString(m) } -func (*CompositeIndices) ProtoMessage() {} -func (*CompositeIndices) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{33} -} -func (m *CompositeIndices) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CompositeIndices.Unmarshal(m, b) -} -func (m *CompositeIndices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CompositeIndices.Marshal(b, m, deterministic) -} -func (dst *CompositeIndices) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompositeIndices.Merge(dst, src) -} -func (m *CompositeIndices) XXX_Size() int { - return xxx_messageInfo_CompositeIndices.Size(m) -} -func (m *CompositeIndices) XXX_DiscardUnknown() { - xxx_messageInfo_CompositeIndices.DiscardUnknown(m) -} - -var xxx_messageInfo_CompositeIndices proto.InternalMessageInfo - -func (m *CompositeIndices) GetIndex() []*CompositeIndex { - if m != nil { - return m.Index - } - return nil -} - -type AddActionsRequest struct { - Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` - Transaction *Transaction `protobuf:"bytes,1,req,name=transaction" json:"transaction,omitempty"` - Action []*Action `protobuf:"bytes,2,rep,name=action" json:"action,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddActionsRequest) Reset() { *m = AddActionsRequest{} } -func (m *AddActionsRequest) String() string { return proto.CompactTextString(m) } -func (*AddActionsRequest) ProtoMessage() {} -func (*AddActionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{34} -} -func (m *AddActionsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddActionsRequest.Unmarshal(m, b) -} -func (m *AddActionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddActionsRequest.Marshal(b, m, deterministic) -} -func (dst *AddActionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddActionsRequest.Merge(dst, src) -} -func (m *AddActionsRequest) XXX_Size() int { - return xxx_messageInfo_AddActionsRequest.Size(m) -} -func (m *AddActionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddActionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AddActionsRequest proto.InternalMessageInfo - -func (m *AddActionsRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *AddActionsRequest) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *AddActionsRequest) GetAction() []*Action { - if m != nil { - return m.Action - } - return nil -} - -type AddActionsResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddActionsResponse) Reset() { *m = AddActionsResponse{} } -func (m *AddActionsResponse) String() string { return proto.CompactTextString(m) } -func (*AddActionsResponse) ProtoMessage() {} -func (*AddActionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{35} -} -func (m *AddActionsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddActionsResponse.Unmarshal(m, b) -} -func (m *AddActionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddActionsResponse.Marshal(b, m, deterministic) -} -func (dst *AddActionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddActionsResponse.Merge(dst, src) -} -func (m *AddActionsResponse) XXX_Size() int { - return xxx_messageInfo_AddActionsResponse.Size(m) -} -func (m *AddActionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AddActionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AddActionsResponse proto.InternalMessageInfo - -type BeginTransactionRequest struct { - Header *InternalHeader `protobuf:"bytes,3,opt,name=header" json:"header,omitempty"` - App *string `protobuf:"bytes,1,req,name=app" json:"app,omitempty"` - AllowMultipleEg *bool `protobuf:"varint,2,opt,name=allow_multiple_eg,json=allowMultipleEg,def=0" json:"allow_multiple_eg,omitempty"` - DatabaseId *string `protobuf:"bytes,4,opt,name=database_id,json=databaseId" json:"database_id,omitempty"` - Mode *BeginTransactionRequest_TransactionMode `protobuf:"varint,5,opt,name=mode,enum=appengine.BeginTransactionRequest_TransactionMode,def=0" json:"mode,omitempty"` - PreviousTransaction *Transaction `protobuf:"bytes,7,opt,name=previous_transaction,json=previousTransaction" json:"previous_transaction,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BeginTransactionRequest) Reset() { *m = BeginTransactionRequest{} } -func (m *BeginTransactionRequest) String() string { return proto.CompactTextString(m) } -func (*BeginTransactionRequest) ProtoMessage() {} -func (*BeginTransactionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{36} -} -func (m *BeginTransactionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BeginTransactionRequest.Unmarshal(m, b) -} -func (m *BeginTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BeginTransactionRequest.Marshal(b, m, deterministic) -} -func (dst *BeginTransactionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BeginTransactionRequest.Merge(dst, src) -} -func (m *BeginTransactionRequest) XXX_Size() int { - return xxx_messageInfo_BeginTransactionRequest.Size(m) -} -func (m *BeginTransactionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BeginTransactionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BeginTransactionRequest proto.InternalMessageInfo - -const Default_BeginTransactionRequest_AllowMultipleEg bool = false -const Default_BeginTransactionRequest_Mode BeginTransactionRequest_TransactionMode = BeginTransactionRequest_UNKNOWN - -func (m *BeginTransactionRequest) GetHeader() *InternalHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *BeginTransactionRequest) GetApp() string { - if m != nil && m.App != nil { - return *m.App - } - return "" -} - -func (m *BeginTransactionRequest) GetAllowMultipleEg() bool { - if m != nil && m.AllowMultipleEg != nil { - return *m.AllowMultipleEg - } - return Default_BeginTransactionRequest_AllowMultipleEg -} - -func (m *BeginTransactionRequest) GetDatabaseId() string { - if m != nil && m.DatabaseId != nil { - return *m.DatabaseId - } - return "" -} - -func (m *BeginTransactionRequest) GetMode() BeginTransactionRequest_TransactionMode { - if m != nil && m.Mode != nil { - return *m.Mode - } - return Default_BeginTransactionRequest_Mode -} - -func (m *BeginTransactionRequest) GetPreviousTransaction() *Transaction { - if m != nil { - return m.PreviousTransaction - } - return nil -} - -type CommitResponse struct { - Cost *Cost `protobuf:"bytes,1,opt,name=cost" json:"cost,omitempty"` - Version []*CommitResponse_Version `protobuf:"group,3,rep,name=Version,json=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CommitResponse) Reset() { *m = CommitResponse{} } -func (m *CommitResponse) String() string { return proto.CompactTextString(m) } -func (*CommitResponse) ProtoMessage() {} -func (*CommitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37} -} -func (m *CommitResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CommitResponse.Unmarshal(m, b) -} -func (m *CommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CommitResponse.Marshal(b, m, deterministic) -} -func (dst *CommitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitResponse.Merge(dst, src) -} -func (m *CommitResponse) XXX_Size() int { - return xxx_messageInfo_CommitResponse.Size(m) -} -func (m *CommitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CommitResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitResponse proto.InternalMessageInfo - -func (m *CommitResponse) GetCost() *Cost { - if m != nil { - return m.Cost - } - return nil -} - -func (m *CommitResponse) GetVersion() []*CommitResponse_Version { - if m != nil { - return m.Version - } - return nil -} - -type CommitResponse_Version struct { - RootEntityKey *Reference `protobuf:"bytes,4,req,name=root_entity_key,json=rootEntityKey" json:"root_entity_key,omitempty"` - Version *int64 `protobuf:"varint,5,req,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CommitResponse_Version) Reset() { *m = CommitResponse_Version{} } -func (m *CommitResponse_Version) String() string { return proto.CompactTextString(m) } -func (*CommitResponse_Version) ProtoMessage() {} -func (*CommitResponse_Version) Descriptor() ([]byte, []int) { - return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{37, 0} -} -func (m *CommitResponse_Version) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CommitResponse_Version.Unmarshal(m, b) -} -func (m *CommitResponse_Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CommitResponse_Version.Marshal(b, m, deterministic) -} -func (dst *CommitResponse_Version) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitResponse_Version.Merge(dst, src) -} -func (m *CommitResponse_Version) XXX_Size() int { - return xxx_messageInfo_CommitResponse_Version.Size(m) -} -func (m *CommitResponse_Version) XXX_DiscardUnknown() { - xxx_messageInfo_CommitResponse_Version.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitResponse_Version proto.InternalMessageInfo - -func (m *CommitResponse_Version) GetRootEntityKey() *Reference { - if m != nil { - return m.RootEntityKey - } - return nil -} - -func (m *CommitResponse_Version) GetVersion() int64 { - if m != nil && m.Version != nil { - return *m.Version - } - return 0 -} - -func init() { - proto.RegisterType((*Action)(nil), "appengine.Action") - proto.RegisterType((*PropertyValue)(nil), "appengine.PropertyValue") - proto.RegisterType((*PropertyValue_PointValue)(nil), "appengine.PropertyValue.PointValue") - proto.RegisterType((*PropertyValue_UserValue)(nil), "appengine.PropertyValue.UserValue") - proto.RegisterType((*PropertyValue_ReferenceValue)(nil), "appengine.PropertyValue.ReferenceValue") - proto.RegisterType((*PropertyValue_ReferenceValue_PathElement)(nil), "appengine.PropertyValue.ReferenceValue.PathElement") - proto.RegisterType((*Property)(nil), "appengine.Property") - proto.RegisterType((*Path)(nil), "appengine.Path") - proto.RegisterType((*Path_Element)(nil), "appengine.Path.Element") - proto.RegisterType((*Reference)(nil), "appengine.Reference") - proto.RegisterType((*User)(nil), "appengine.User") - proto.RegisterType((*EntityProto)(nil), "appengine.EntityProto") - proto.RegisterType((*CompositeProperty)(nil), "appengine.CompositeProperty") - proto.RegisterType((*Index)(nil), "appengine.Index") - proto.RegisterType((*Index_Property)(nil), "appengine.Index.Property") - proto.RegisterType((*CompositeIndex)(nil), "appengine.CompositeIndex") - proto.RegisterType((*IndexPostfix)(nil), "appengine.IndexPostfix") - proto.RegisterType((*IndexPostfix_IndexValue)(nil), "appengine.IndexPostfix.IndexValue") - proto.RegisterType((*IndexPosition)(nil), "appengine.IndexPosition") - proto.RegisterType((*Snapshot)(nil), "appengine.Snapshot") - proto.RegisterType((*InternalHeader)(nil), "appengine.InternalHeader") - proto.RegisterType((*Transaction)(nil), "appengine.Transaction") - proto.RegisterType((*Query)(nil), "appengine.Query") - proto.RegisterType((*Query_Filter)(nil), "appengine.Query.Filter") - proto.RegisterType((*Query_Order)(nil), "appengine.Query.Order") - proto.RegisterType((*CompiledQuery)(nil), "appengine.CompiledQuery") - proto.RegisterType((*CompiledQuery_PrimaryScan)(nil), "appengine.CompiledQuery.PrimaryScan") - proto.RegisterType((*CompiledQuery_MergeJoinScan)(nil), "appengine.CompiledQuery.MergeJoinScan") - proto.RegisterType((*CompiledQuery_EntityFilter)(nil), "appengine.CompiledQuery.EntityFilter") - proto.RegisterType((*CompiledCursor)(nil), "appengine.CompiledCursor") - proto.RegisterType((*CompiledCursor_Position)(nil), "appengine.CompiledCursor.Position") - proto.RegisterType((*CompiledCursor_Position_IndexValue)(nil), "appengine.CompiledCursor.Position.IndexValue") - proto.RegisterType((*Cursor)(nil), "appengine.Cursor") - proto.RegisterType((*Error)(nil), "appengine.Error") - proto.RegisterType((*Cost)(nil), "appengine.Cost") - proto.RegisterType((*Cost_CommitCost)(nil), "appengine.Cost.CommitCost") - proto.RegisterType((*GetRequest)(nil), "appengine.GetRequest") - proto.RegisterType((*GetResponse)(nil), "appengine.GetResponse") - proto.RegisterType((*GetResponse_Entity)(nil), "appengine.GetResponse.Entity") - proto.RegisterType((*PutRequest)(nil), "appengine.PutRequest") - proto.RegisterType((*PutResponse)(nil), "appengine.PutResponse") - proto.RegisterType((*TouchRequest)(nil), "appengine.TouchRequest") - proto.RegisterType((*TouchResponse)(nil), "appengine.TouchResponse") - proto.RegisterType((*DeleteRequest)(nil), "appengine.DeleteRequest") - proto.RegisterType((*DeleteResponse)(nil), "appengine.DeleteResponse") - proto.RegisterType((*NextRequest)(nil), "appengine.NextRequest") - proto.RegisterType((*QueryResult)(nil), "appengine.QueryResult") - proto.RegisterType((*AllocateIdsRequest)(nil), "appengine.AllocateIdsRequest") - proto.RegisterType((*AllocateIdsResponse)(nil), "appengine.AllocateIdsResponse") - proto.RegisterType((*CompositeIndices)(nil), "appengine.CompositeIndices") - proto.RegisterType((*AddActionsRequest)(nil), "appengine.AddActionsRequest") - proto.RegisterType((*AddActionsResponse)(nil), "appengine.AddActionsResponse") - proto.RegisterType((*BeginTransactionRequest)(nil), "appengine.BeginTransactionRequest") - proto.RegisterType((*CommitResponse)(nil), "appengine.CommitResponse") - proto.RegisterType((*CommitResponse_Version)(nil), "appengine.CommitResponse.Version") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/datastore/datastore_v3.proto", fileDescriptor_datastore_v3_83b17b80c34f6179) -} - -var fileDescriptor_datastore_v3_83b17b80c34f6179 = []byte{ - // 4156 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x73, 0xe3, 0x46, - 0x76, 0x37, 0xc1, 0xef, 0x47, 0x89, 0x82, 0x5a, 0xf3, 0xc1, 0xa1, 0x3f, 0x46, 0xc6, 0xac, 0x6d, - 0xd9, 0x6b, 0x73, 0x6c, 0xf9, 0x23, 0x5b, 0x4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 0x87, 0x54, 0x2d, 0x69, 0xff, 0x53, 0x80, - 0x15, 0x94, 0xe7, 0xd0, 0x8f, 0xe2, 0x89, 0xfb, 0x92, 0xec, 0x41, 0x43, 0x98, 0xdd, 0xa9, 0x2c, - 0xe8, 0xb9, 0x33, 0x68, 0x8b, 0x7b, 0x96, 0x68, 0x31, 0x90, 0x75, 0xb4, 0x9b, 0x3e, 0x27, 0x21, - 0x45, 0x41, 0xa7, 0xbf, 0x22, 0xa4, 0xbc, 0x05, 0x95, 0x67, 0x6c, 0xe2, 0x87, 0x22, 0x04, 0xd6, - 0x76, 0x4a, 0x71, 0x38, 0x67, 0x54, 0xd2, 0xda, 0x36, 0xc0, 0xf9, 0xfa, 0xe4, 0x01, 0xac, 0x26, - 0xc6, 0x66, 0xa1, 0x71, 0x89, 0x93, 0x5b, 0x49, 0x88, 0x83, 0x5c, 0x75, 0xa3, 0x5c, 0xab, 0xba, - 0xd1, 0xbe, 0x86, 0xd5, 0x64, 0x3f, 0xe2, 0xfc, 0x54, 0x21, 0x79, 0x01, 0x63, 0xca, 0x82, 0x8c, - 0xca, 0x45, 0x19, 0xb5, 0x9f, 0x41, 0x6d, 0xe4, 0xd9, 0x41, 0x74, 0xe2, 0xc7, 0xdc, 0x7a, 0xe2, - 0x48, 0xfa, 0xaa, 0x12, 0x47, 0x9a, 0x06, 0x15, 0x7e, 0x38, 0xf3, 0x88, 0xbb, 0xbf, 0x31, 0xe8, - 0xee, 0x99, 0xc6, 0xb7, 0xba, 0xfa, 0x06, 0x01, 0xa8, 0xc8, 0xe7, 0x82, 0xa6, 0x41, 0xd3, 0x90, - 0xed, 0xd8, 0x63, 0x66, 0x3b, 0x2c, 0xe4, 0x12, 0xfc, 0xe0, 0x47, 0x89, 0x04, 0x3f, 0xf8, 0x91, - 0xf6, 0x17, 0x05, 0x68, 0x98, 0xa1, 0xed, 0x45, 0xb6, 0x30, 0xf7, 0xcf, 0xa0, 0x72, 0x82, 0x58, - 0x74, 0xa3, 0xc6, 0x82, 0x7f, 0x66, 0x17, 0xa3, 0x12, 0x48, 0xee, 0x40, 0xe5, 0xc4, 0xf6, 0x9c, - 0xa9, 0xd0, 0x5a, 0x85, 0xca, 0x51, 0x92, 0x1b, 0x95, 0xf3, 0xdc, 0xb8, 0x05, 0x2b, 0x33, 0x3b, - 0x7c, 0x6e, 0x8d, 0x4f, 0x6c, 0xef, 0x98, 0x45, 0xf2, 0x60, 0xa4, 0x05, 0x36, 0x38, 0x6b, 0x4f, - 0x70, 0xb4, 0xbf, 0x5f, 0x81, 0xf2, 0x37, 0x73, 0x16, 0x9e, 0x65, 0x04, 0xfa, 0xe0, 0xba, 0x02, - 0xc9, 0x17, 0x17, 0x2e, 0x4b, 0xca, 0x6f, 0x2f, 0x26, 0x65, 0x22, 0x53, 0x84, 0xc8, 0x95, 0x22, - 0x0b, 0x7c, 0x9a, 0x09, 0x63, 0xeb, 0x57, 0xd8, 0xda, 0x79, 0x70, 0x7b, 0x08, 0x95, 0x89, 0x3b, - 0x8d, 0x51, 0x75, 0x8b, 0xd5, 0x08, 0xee, 0xa5, 0xf3, 0x08, 0xd9, 0x54, 0xc2, 0xc8, 0xbb, 0xb0, - 0x22, 0x2a, 0x59, 0xeb, 0x07, 0xce, 0xc6, 0x82, 0x95, 0xf7, 0xa6, 0x48, 0x13, 0xbb, 0xff, 0x18, - 0xca, 0x7e, 0xc8, 0x37, 0x5f, 0xc7, 0x25, 0xef, 0x5c, 0x58, 0x72, 0xc8, 0xb9, 0x54, 0x80, 0xc8, - 0x87, 0x50, 0x3a, 0x71, 0xbd, 0x18, 0xb3, 0x46, 0x73, 0xfb, 0xf6, 0x05, 0xf0, 0x63, 0xd7, 0x8b, - 0x29, 0x42, 0x78, 0x98, 0x1f, 0xfb, 0x73, 0x2f, 0x6e, 0xdd, 0xc5, 0x0c, 0x23, 0x06, 0xe4, 0x1e, - 0x54, 0xfc, 0xc9, 0x24, 0x62, 0x31, 0x76, 0x96, 0xe5, 0x9d, 0xc2, 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0xff, - 0x29, 0x4f, 0x60, 0x35, 0x72, 0x17, 0x36, 0xf6, 0xba, 0x87, 0xdd, 0x5d, 0xa3, 0x6f, 0x98, 0x4f, - 0xad, 0x9e, 0x31, 0xe2, 0xf3, 0x7b, 0x6a, 0x9d, 0x27, 0x6c, 0x93, 0x3e, 0xb5, 0xba, 0x7d, 0x14, - 0xcd, 0xd4, 0xad, 0xdd, 0xee, 0xde, 0x13, 0x7d, 0xd0, 0x53, 0x81, 0x0b, 0x30, 0xea, 0x3e, 0xd2, - 0x2d, 0x2e, 0x92, 0x65, 0x0e, 0x87, 0xd6, 0xb0, 0xdf, 0x53, 0x1b, 0xda, 0xbf, 0x14, 0xa1, 0xb4, - 0xe7, 0x47, 0x31, 0xf7, 0x46, 0xe1, 0xac, 0x2f, 0x42, 0x37, 0x66, 0xa2, 0x7f, 0x2b, 0x53, 0xd1, - 0x4b, 0x7f, 0x87, 0x24, 0x1e, 0x50, 0x32, 0x10, 0xeb, 0xd9, 0x19, 0xc7, 0x29, 0x88, 0x5b, 0x3b, - 0xc7, 0xed, 0x72, 0xb2, 0x88, 0x68, 0x78, 0x85, 0x23, 0xd7, 0x2b, 0x22, 0x4e, 0x06, 0x61, 0xb9, - 0xe0, 0xc7, 0x40, 0xb2, 0x20, 0xb9, 0x62, 0x09, 0x91, 0x6a, 0x06, 0x29, 0x96, 0xdc, 0x01, 0x18, - 0xfb, 0xb3, 0x99, 0x1b, 0x8f, 0xfd, 0x28, 0x96, 0x5f, 0xc8, 0xda, 0x39, 0x63, 0x8f, 0x62, 0x6e, - 0xf1, 0x33, 0x37, 0xe6, 0x8f, 0x34, 0x83, 0x26, 0x3b, 0x70, 0xcf, 0x0e, 0x82, 0xd0, 0x7f, 0xe9, - 0xce, 0xec, 0x98, 0x59, 0xdc, 0x73, 0xed, 0x63, 0x66, 0x39, 0x6c, 0x1a, 0xdb, 0xd8, 0x13, 0x95, - 0xe9, 0xdd, 0x0c, 0x60, 0x24, 0xf8, 0x3d, 0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, 0xda, 0xc2, 0xcb, 0x78, 0x6d, 0x26, 0x5f, 0xa7, 0xbe, 0x41, - 0x56, 0xa1, 0x8e, 0x1f, 0xbb, 0x97, 0x7f, 0xfb, 0xd6, 0xfe, 0xb5, 0x80, 0x57, 0x4c, 0x33, 0x37, - 0xbe, 0x59, 0x06, 0xfb, 0xcd, 0x7c, 0x06, 0x83, 0xed, 0x77, 0xf3, 0xe6, 0x9b, 0x59, 0xb0, 0xf3, - 0xad, 0x00, 0xa6, 0x41, 0xa4, 0x6d, 0x43, 0x55, 0xd2, 0xc8, 0x6f, 0xc1, 0x5a, 0xe8, 0xfb, 0x71, - 0xd2, 0x89, 0x8a, 0x0e, 0xe4, 0xf2, 0x3f, 0xdb, 0xac, 0x72, 0xb0, 0x48, 0x06, 0x4f, 0xf2, 0xbd, - 0x48, 0x59, 0xfc, 0x0d, 0x44, 0x0e, 0x77, 0x1b, 0xbf, 0x5b, 0x4f, 0xff, 0xb7, 0xfb, 0xbf, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x35, 0x9f, 0x30, 0x98, 0xf2, 0x2b, 0x00, 0x00, -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto b/pkg/k8s/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto deleted file mode 100644 index 497b4d9a9af..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto +++ /dev/null @@ -1,551 +0,0 @@ -syntax = "proto2"; -option go_package = "datastore"; - -package appengine; - -message Action{} - -message PropertyValue { - optional int64 int64Value = 1; - optional bool booleanValue = 2; - optional string stringValue = 3; - optional double doubleValue = 4; - - optional group PointValue = 5 { - required double x = 6; - required double y = 7; - } - - optional group UserValue = 8 { - required string email = 9; - required string auth_domain = 10; - optional string nickname = 11; - optional string federated_identity = 21; - optional string federated_provider = 22; - } - - optional group ReferenceValue = 12 { - required string app = 13; - optional string name_space = 20; - repeated group PathElement = 14 { - required string type = 15; - optional int64 id = 16; - optional string name = 17; - } - } -} - -message Property { - enum Meaning { - NO_MEANING = 0; - BLOB = 14; - TEXT = 15; - BYTESTRING = 16; - - ATOM_CATEGORY = 1; - ATOM_LINK = 2; - ATOM_TITLE = 3; - ATOM_CONTENT = 4; - ATOM_SUMMARY = 5; - ATOM_AUTHOR = 6; - - GD_WHEN = 7; - GD_EMAIL = 8; - GEORSS_POINT = 9; - GD_IM = 10; - - GD_PHONENUMBER = 11; - GD_POSTALADDRESS = 12; - - GD_RATING = 13; - - BLOBKEY = 17; - ENTITY_PROTO = 19; - - INDEX_VALUE = 18; - }; - - optional Meaning meaning = 1 [default = NO_MEANING]; - optional string meaning_uri = 2; - - required string name = 3; - - required PropertyValue value = 5; - - required bool multiple = 4; - - optional bool searchable = 6 [default=false]; - - enum FtsTokenizationOption { - HTML = 1; - ATOM = 2; - } - - optional FtsTokenizationOption fts_tokenization_option = 8; - - optional string locale = 9 [default = "en"]; -} - -message Path { - repeated group Element = 1 { - required string type = 2; - optional int64 id = 3; - optional string name = 4; - } -} - -message Reference { - required string app = 13; - optional string name_space = 20; - required Path path = 14; -} - -message User { - required string email = 1; - required string auth_domain = 2; - optional string nickname = 3; - optional string federated_identity = 6; - optional string federated_provider = 7; -} - -message EntityProto { - required Reference key = 13; - required Path entity_group = 16; - optional User owner = 17; - - enum Kind { - GD_CONTACT = 1; - GD_EVENT = 2; - GD_MESSAGE = 3; - } - optional Kind kind = 4; - optional string kind_uri = 5; - - repeated Property property = 14; - repeated Property raw_property = 15; - - optional int32 rank = 18; -} - -message CompositeProperty { - required int64 index_id = 1; - repeated string value = 2; -} - -message Index { - required string entity_type = 1; - required bool ancestor = 5; - repeated group Property = 2 { - required string name = 3; - enum Direction { - ASCENDING = 1; - DESCENDING = 2; - } - optional Direction direction = 4 [default = ASCENDING]; - } -} - -message CompositeIndex { - required string app_id = 1; - required int64 id = 2; - required Index definition = 3; - - enum State { - WRITE_ONLY = 1; - READ_WRITE = 2; - DELETED = 3; - ERROR = 4; - } - required State state = 4; - - optional bool only_use_if_required = 6 [default = false]; -} - -message IndexPostfix { - message IndexValue { - required string property_name = 1; - required PropertyValue value = 2; - } - - repeated IndexValue index_value = 1; - - optional Reference key = 2; - - optional bool before = 3 [default=true]; -} - -message IndexPosition { - optional string key = 1; - - optional bool before = 2 [default=true]; -} - -message Snapshot { - enum Status { - INACTIVE = 0; - ACTIVE = 1; - } - - required int64 ts = 1; -} - -message InternalHeader { - optional string qos = 1; -} - -message Transaction { - optional InternalHeader header = 4; - required fixed64 handle = 1; - required string app = 2; - optional bool mark_changes = 3 [default = false]; -} - -message Query { - optional InternalHeader header = 39; - - required string app = 1; - optional string name_space = 29; - - optional string kind = 3; - optional Reference ancestor = 17; - - repeated group Filter = 4 { - enum Operator { - LESS_THAN = 1; - LESS_THAN_OR_EQUAL = 2; - GREATER_THAN = 3; - GREATER_THAN_OR_EQUAL = 4; - EQUAL = 5; - IN = 6; - EXISTS = 7; - } - - required Operator op = 6; - repeated Property property = 14; - } - - optional string search_query = 8; - - repeated group Order = 9 { - enum Direction { - ASCENDING = 1; - DESCENDING = 2; - } - - required string property = 10; - optional Direction direction = 11 [default = ASCENDING]; - } - - enum Hint { - ORDER_FIRST = 1; - ANCESTOR_FIRST = 2; - FILTER_FIRST = 3; - } - optional Hint hint = 18; - - optional int32 count = 23; - - optional int32 offset = 12 [default = 0]; - - optional int32 limit = 16; - - optional CompiledCursor compiled_cursor = 30; - optional CompiledCursor end_compiled_cursor = 31; - - repeated CompositeIndex composite_index = 19; - - optional bool require_perfect_plan = 20 [default = false]; - - optional bool keys_only = 21 [default = false]; - - optional Transaction transaction = 22; - - optional bool compile = 25 [default = false]; - - optional int64 failover_ms = 26; - - optional bool strong = 32; - - repeated string property_name = 33; - - repeated string group_by_property_name = 34; - - optional bool distinct = 24; - - optional int64 min_safe_time_seconds = 35; - - repeated string safe_replica_name = 36; - - optional bool persist_offset = 37 [default=false]; -} - -message CompiledQuery { - required group PrimaryScan = 1 { - optional string index_name = 2; - - optional string start_key = 3; - optional bool start_inclusive = 4; - optional string end_key = 5; - optional bool end_inclusive = 6; - - repeated string start_postfix_value = 22; - repeated string end_postfix_value = 23; - - optional int64 end_unapplied_log_timestamp_us = 19; - } - - repeated group MergeJoinScan = 7 { - required string index_name = 8; - - repeated string prefix_value = 9; - - optional bool value_prefix = 20 [default=false]; - } - - optional Index index_def = 21; - - optional int32 offset = 10 [default = 0]; - - optional int32 limit = 11; - - required bool keys_only = 12; - - repeated string property_name = 24; - - optional int32 distinct_infix_size = 25; - - optional group EntityFilter = 13 { - optional bool distinct = 14 [default=false]; - - optional string kind = 17; - optional Reference ancestor = 18; - } -} - -message CompiledCursor { - optional group Position = 2 { - optional string start_key = 27; - - repeated group IndexValue = 29 { - optional string property = 30; - required PropertyValue value = 31; - } - - optional Reference key = 32; - - optional bool start_inclusive = 28 [default=true]; - } -} - -message Cursor { - required fixed64 cursor = 1; - - optional string app = 2; -} - -message Error { - enum ErrorCode { - BAD_REQUEST = 1; - CONCURRENT_TRANSACTION = 2; - INTERNAL_ERROR = 3; - NEED_INDEX = 4; - TIMEOUT = 5; - PERMISSION_DENIED = 6; - BIGTABLE_ERROR = 7; - COMMITTED_BUT_STILL_APPLYING = 8; - CAPABILITY_DISABLED = 9; - TRY_ALTERNATE_BACKEND = 10; - SAFE_TIME_TOO_OLD = 11; - } -} - -message Cost { - optional int32 index_writes = 1; - optional int32 index_write_bytes = 2; - optional int32 entity_writes = 3; - optional int32 entity_write_bytes = 4; - optional group CommitCost = 5 { - optional int32 requested_entity_puts = 6; - optional int32 requested_entity_deletes = 7; - }; - optional int32 approximate_storage_delta = 8; - optional int32 id_sequence_updates = 9; -} - -message GetRequest { - optional InternalHeader header = 6; - - repeated Reference key = 1; - optional Transaction transaction = 2; - - optional int64 failover_ms = 3; - - optional bool strong = 4; - - optional bool allow_deferred = 5 [default=false]; -} - -message GetResponse { - repeated group Entity = 1 { - optional EntityProto entity = 2; - optional Reference key = 4; - - optional int64 version = 3; - } - - repeated Reference deferred = 5; - - optional bool in_order = 6 [default=true]; -} - -message PutRequest { - optional InternalHeader header = 11; - - repeated EntityProto entity = 1; - optional Transaction transaction = 2; - repeated CompositeIndex composite_index = 3; - - optional bool trusted = 4 [default = false]; - - optional bool force = 7 [default = false]; - - optional bool mark_changes = 8 [default = false]; - repeated Snapshot snapshot = 9; - - enum AutoIdPolicy { - CURRENT = 0; - SEQUENTIAL = 1; - } - optional AutoIdPolicy auto_id_policy = 10 [default = CURRENT]; -} - -message PutResponse { - repeated Reference key = 1; - optional Cost cost = 2; - repeated int64 version = 3; -} - -message TouchRequest { - optional InternalHeader header = 10; - - repeated Reference key = 1; - repeated CompositeIndex composite_index = 2; - optional bool force = 3 [default = false]; - repeated Snapshot snapshot = 9; -} - -message TouchResponse { - optional Cost cost = 1; -} - -message DeleteRequest { - optional InternalHeader header = 10; - - repeated Reference key = 6; - optional Transaction transaction = 5; - - optional bool trusted = 4 [default = false]; - - optional bool force = 7 [default = false]; - - optional bool mark_changes = 8 [default = false]; - repeated Snapshot snapshot = 9; -} - -message DeleteResponse { - optional Cost cost = 1; - repeated int64 version = 3; -} - -message NextRequest { - optional InternalHeader header = 5; - - required Cursor cursor = 1; - optional int32 count = 2; - - optional int32 offset = 4 [default = 0]; - - optional bool compile = 3 [default = false]; -} - -message QueryResult { - optional Cursor cursor = 1; - - repeated EntityProto result = 2; - - optional int32 skipped_results = 7; - - required bool more_results = 3; - - optional bool keys_only = 4; - - optional bool index_only = 9; - - optional bool small_ops = 10; - - optional CompiledQuery compiled_query = 5; - - optional CompiledCursor compiled_cursor = 6; - - repeated CompositeIndex index = 8; - - repeated int64 version = 11; -} - -message AllocateIdsRequest { - optional InternalHeader header = 4; - - optional Reference model_key = 1; - - optional int64 size = 2; - - optional int64 max = 3; - - repeated Reference reserve = 5; -} - -message AllocateIdsResponse { - required int64 start = 1; - required int64 end = 2; - optional Cost cost = 3; -} - -message CompositeIndices { - repeated CompositeIndex index = 1; -} - -message AddActionsRequest { - optional InternalHeader header = 3; - - required Transaction transaction = 1; - repeated Action action = 2; -} - -message AddActionsResponse { -} - -message BeginTransactionRequest { - optional InternalHeader header = 3; - - required string app = 1; - optional bool allow_multiple_eg = 2 [default = false]; - optional string database_id = 4; - - enum TransactionMode { - UNKNOWN = 0; - READ_ONLY = 1; - READ_WRITE = 2; - } - optional TransactionMode mode = 5 [default = UNKNOWN]; - - optional Transaction previous_transaction = 7; -} - -message CommitResponse { - optional Cost cost = 1; - - repeated group Version = 3 { - required Reference root_entity_key = 4; - required int64 version = 5; - } -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/identity.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/identity.go deleted file mode 100644 index 0f95aa91d5b..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/identity.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -import ( - "context" - "os" -) - -var ( - // This is set to true in identity_classic.go, which is behind the appengine build tag. - // The appengine build tag is set for the first generation runtimes (<= Go 1.9) but not - // the second generation runtimes (>= Go 1.11), so this indicates whether we're on a - // first-gen runtime. See IsStandard below for the second-gen check. - appengineStandard bool - - // This is set to true in identity_flex.go, which is behind the appenginevm build tag. - appengineFlex bool -) - -// AppID is the implementation of the wrapper function of the same name in -// ../identity.go. See that file for commentary. -func AppID(c context.Context) string { - return appID(FullyQualifiedAppID(c)) -} - -// IsStandard is the implementation of the wrapper function of the same name in -// ../appengine.go. See that file for commentary. -func IsStandard() bool { - // appengineStandard will be true for first-gen runtimes (<= Go 1.9) but not - // second-gen (>= Go 1.11). - return appengineStandard || IsSecondGen() -} - -// IsSecondGen is the implementation of the wrapper function of the same name in -// ../appengine.go. See that file for commentary. -func IsSecondGen() bool { - // Second-gen runtimes set $GAE_ENV so we use that to check if we're on a second-gen runtime. - return os.Getenv("GAE_ENV") == "standard" -} - -// IsFlex is the implementation of the wrapper function of the same name in -// ../appengine.go. See that file for commentary. -func IsFlex() bool { - return appengineFlex -} - -// IsAppEngine is the implementation of the wrapper function of the same name in -// ../appengine.go. See that file for commentary. -func IsAppEngine() bool { - return IsStandard() || IsFlex() -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/identity_classic.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/identity_classic.go deleted file mode 100644 index 5ad3548bf74..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/identity_classic.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2015 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build appengine -// +build appengine - -package internal - -import ( - "context" - - "appengine" -) - -func init() { - appengineStandard = true -} - -func DefaultVersionHostname(ctx context.Context) string { - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - return appengine.DefaultVersionHostname(c) -} - -func Datacenter(_ context.Context) string { return appengine.Datacenter() } -func ServerSoftware() string { return appengine.ServerSoftware() } -func InstanceID() string { return appengine.InstanceID() } -func IsDevAppServer() bool { return appengine.IsDevAppServer() } - -func RequestID(ctx context.Context) string { - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - return appengine.RequestID(c) -} - -func ModuleName(ctx context.Context) string { - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - return appengine.ModuleName(c) -} -func VersionID(ctx context.Context) string { - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - return appengine.VersionID(c) -} - -func fullyQualifiedAppID(ctx context.Context) string { - c := fromContext(ctx) - if c == nil { - panic(errNotAppEngineContext) - } - return c.FullyQualifiedAppID() -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/identity_flex.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/identity_flex.go deleted file mode 100644 index 4201b6b585a..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/identity_flex.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2018 Google LLC. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build appenginevm -// +build appenginevm - -package internal - -func init() { - appengineFlex = true -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/identity_vm.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/identity_vm.go deleted file mode 100644 index 18ddda3a423..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/identity_vm.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build !appengine -// +build !appengine - -package internal - -import ( - "context" - "log" - "net/http" - "os" - "strings" -) - -// These functions are implementations of the wrapper functions -// in ../appengine/identity.go. See that file for commentary. - -const ( - hDefaultVersionHostname = "X-AppEngine-Default-Version-Hostname" - hRequestLogId = "X-AppEngine-Request-Log-Id" - hDatacenter = "X-AppEngine-Datacenter" -) - -func ctxHeaders(ctx context.Context) http.Header { - c := fromContext(ctx) - if c == nil { - return nil - } - return c.Request().Header -} - -func DefaultVersionHostname(ctx context.Context) string { - return ctxHeaders(ctx).Get(hDefaultVersionHostname) -} - -func RequestID(ctx context.Context) string { - return ctxHeaders(ctx).Get(hRequestLogId) -} - -func Datacenter(ctx context.Context) string { - if dc := ctxHeaders(ctx).Get(hDatacenter); dc != "" { - return dc - } - // If the header isn't set, read zone from the metadata service. - // It has the format projects/[NUMERIC_PROJECT_ID]/zones/[ZONE] - zone, err := getMetadata("instance/zone") - if err != nil { - log.Printf("Datacenter: %v", err) - return "" - } - parts := strings.Split(string(zone), "/") - if len(parts) == 0 { - return "" - } - return parts[len(parts)-1] -} - -func ServerSoftware() string { - // TODO(dsymonds): Remove fallback when we've verified this. - if s := os.Getenv("SERVER_SOFTWARE"); s != "" { - return s - } - if s := os.Getenv("GAE_ENV"); s != "" { - return s - } - return "Google App Engine/1.x.x" -} - -// TODO(dsymonds): Remove the metadata fetches. - -func ModuleName(_ context.Context) string { - if s := os.Getenv("GAE_MODULE_NAME"); s != "" { - return s - } - if s := os.Getenv("GAE_SERVICE"); s != "" { - return s - } - return string(mustGetMetadata("instance/attributes/gae_backend_name")) -} - -func VersionID(_ context.Context) string { - if s1, s2 := os.Getenv("GAE_MODULE_VERSION"), os.Getenv("GAE_MINOR_VERSION"); s1 != "" && s2 != "" { - return s1 + "." + s2 - } - if s1, s2 := os.Getenv("GAE_VERSION"), os.Getenv("GAE_DEPLOYMENT_ID"); s1 != "" && s2 != "" { - return s1 + "." + s2 - } - return string(mustGetMetadata("instance/attributes/gae_backend_version")) + "." + string(mustGetMetadata("instance/attributes/gae_backend_minor_version")) -} - -func InstanceID() string { - if s := os.Getenv("GAE_MODULE_INSTANCE"); s != "" { - return s - } - if s := os.Getenv("GAE_INSTANCE"); s != "" { - return s - } - return string(mustGetMetadata("instance/attributes/gae_backend_instance")) -} - -func partitionlessAppID() string { - // gae_project has everything except the partition prefix. - if appID := os.Getenv("GAE_LONG_APP_ID"); appID != "" { - return appID - } - if project := os.Getenv("GOOGLE_CLOUD_PROJECT"); project != "" { - return project - } - return string(mustGetMetadata("instance/attributes/gae_project")) -} - -func fullyQualifiedAppID(_ context.Context) string { - if s := os.Getenv("GAE_APPLICATION"); s != "" { - return s - } - appID := partitionlessAppID() - - part := os.Getenv("GAE_PARTITION") - if part == "" { - part = string(mustGetMetadata("instance/attributes/gae_partition")) - } - - if part != "" { - appID = part + "~" + appID - } - return appID -} - -func IsDevAppServer() bool { - return os.Getenv("RUN_WITH_DEVAPPSERVER") != "" || os.Getenv("GAE_ENV") == "localdev" -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/internal.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/internal.go deleted file mode 100644 index 051ea3980ab..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/internal.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -// Package internal provides support for package appengine. -// -// Programs should not use this package directly. Its API is not stable. -// Use packages appengine and appengine/* instead. -package internal - -import ( - "fmt" - - "github.com/golang/protobuf/proto" - - remotepb "google.golang.org/appengine/internal/remote_api" -) - -// errorCodeMaps is a map of service name to the error code map for the service. -var errorCodeMaps = make(map[string]map[int32]string) - -// RegisterErrorCodeMap is called from API implementations to register their -// error code map. This should only be called from init functions. -func RegisterErrorCodeMap(service string, m map[int32]string) { - errorCodeMaps[service] = m -} - -type timeoutCodeKey struct { - service string - code int32 -} - -// timeoutCodes is the set of service+code pairs that represent timeouts. -var timeoutCodes = make(map[timeoutCodeKey]bool) - -func RegisterTimeoutErrorCode(service string, code int32) { - timeoutCodes[timeoutCodeKey{service, code}] = true -} - -// APIError is the type returned by appengine.Context's Call method -// when an API call fails in an API-specific way. This may be, for instance, -// a taskqueue API call failing with TaskQueueServiceError::UNKNOWN_QUEUE. -type APIError struct { - Service string - Detail string - Code int32 // API-specific error code -} - -func (e *APIError) Error() string { - if e.Code == 0 { - if e.Detail == "" { - return "APIError " - } - return e.Detail - } - s := fmt.Sprintf("API error %d", e.Code) - if m, ok := errorCodeMaps[e.Service]; ok { - s += " (" + e.Service + ": " + m[e.Code] + ")" - } else { - // Shouldn't happen, but provide a bit more detail if it does. - s = e.Service + " " + s - } - if e.Detail != "" { - s += ": " + e.Detail - } - return s -} - -func (e *APIError) IsTimeout() bool { - return timeoutCodes[timeoutCodeKey{e.Service, e.Code}] -} - -// CallError is the type returned by appengine.Context's Call method when an -// API call fails in a generic way, such as RpcError::CAPABILITY_DISABLED. -type CallError struct { - Detail string - Code int32 - // TODO: Remove this if we get a distinguishable error code. - Timeout bool -} - -func (e *CallError) Error() string { - var msg string - switch remotepb.RpcError_ErrorCode(e.Code) { - case remotepb.RpcError_UNKNOWN: - return e.Detail - case remotepb.RpcError_OVER_QUOTA: - msg = "Over quota" - case remotepb.RpcError_CAPABILITY_DISABLED: - msg = "Capability disabled" - case remotepb.RpcError_CANCELLED: - msg = "Canceled" - default: - msg = fmt.Sprintf("Call error %d", e.Code) - } - s := msg + ": " + e.Detail - if e.Timeout { - s += " (timeout)" - } - return s -} - -func (e *CallError) IsTimeout() bool { - return e.Timeout -} - -// NamespaceMods is a map from API service to a function that will mutate an RPC request to attach a namespace. -// The function should be prepared to be called on the same message more than once; it should only modify the -// RPC request the first time. -var NamespaceMods = make(map[string]func(m proto.Message, namespace string)) diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/log/log_service.pb.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/log/log_service.pb.go deleted file mode 100644 index 8545ac4ad6a..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/log/log_service.pb.go +++ /dev/null @@ -1,1313 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/log/log_service.proto - -package log - -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 - -type LogServiceError_ErrorCode int32 - -const ( - LogServiceError_OK LogServiceError_ErrorCode = 0 - LogServiceError_INVALID_REQUEST LogServiceError_ErrorCode = 1 - LogServiceError_STORAGE_ERROR LogServiceError_ErrorCode = 2 -) - -var LogServiceError_ErrorCode_name = map[int32]string{ - 0: "OK", - 1: "INVALID_REQUEST", - 2: "STORAGE_ERROR", -} -var LogServiceError_ErrorCode_value = map[string]int32{ - "OK": 0, - "INVALID_REQUEST": 1, - "STORAGE_ERROR": 2, -} - -func (x LogServiceError_ErrorCode) Enum() *LogServiceError_ErrorCode { - p := new(LogServiceError_ErrorCode) - *p = x - return p -} -func (x LogServiceError_ErrorCode) String() string { - return proto.EnumName(LogServiceError_ErrorCode_name, int32(x)) -} -func (x *LogServiceError_ErrorCode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(LogServiceError_ErrorCode_value, data, "LogServiceError_ErrorCode") - if err != nil { - return err - } - *x = LogServiceError_ErrorCode(value) - return nil -} -func (LogServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{0, 0} -} - -type LogServiceError struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogServiceError) Reset() { *m = LogServiceError{} } -func (m *LogServiceError) String() string { return proto.CompactTextString(m) } -func (*LogServiceError) ProtoMessage() {} -func (*LogServiceError) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{0} -} -func (m *LogServiceError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogServiceError.Unmarshal(m, b) -} -func (m *LogServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogServiceError.Marshal(b, m, deterministic) -} -func (dst *LogServiceError) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogServiceError.Merge(dst, src) -} -func (m *LogServiceError) XXX_Size() int { - return xxx_messageInfo_LogServiceError.Size(m) -} -func (m *LogServiceError) XXX_DiscardUnknown() { - xxx_messageInfo_LogServiceError.DiscardUnknown(m) -} - -var xxx_messageInfo_LogServiceError proto.InternalMessageInfo - -type UserAppLogLine struct { - TimestampUsec *int64 `protobuf:"varint,1,req,name=timestamp_usec,json=timestampUsec" json:"timestamp_usec,omitempty"` - Level *int64 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` - Message *string `protobuf:"bytes,3,req,name=message" json:"message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserAppLogLine) Reset() { *m = UserAppLogLine{} } -func (m *UserAppLogLine) String() string { return proto.CompactTextString(m) } -func (*UserAppLogLine) ProtoMessage() {} -func (*UserAppLogLine) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{1} -} -func (m *UserAppLogLine) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserAppLogLine.Unmarshal(m, b) -} -func (m *UserAppLogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserAppLogLine.Marshal(b, m, deterministic) -} -func (dst *UserAppLogLine) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserAppLogLine.Merge(dst, src) -} -func (m *UserAppLogLine) XXX_Size() int { - return xxx_messageInfo_UserAppLogLine.Size(m) -} -func (m *UserAppLogLine) XXX_DiscardUnknown() { - xxx_messageInfo_UserAppLogLine.DiscardUnknown(m) -} - -var xxx_messageInfo_UserAppLogLine proto.InternalMessageInfo - -func (m *UserAppLogLine) GetTimestampUsec() int64 { - if m != nil && m.TimestampUsec != nil { - return *m.TimestampUsec - } - return 0 -} - -func (m *UserAppLogLine) GetLevel() int64 { - if m != nil && m.Level != nil { - return *m.Level - } - return 0 -} - -func (m *UserAppLogLine) GetMessage() string { - if m != nil && m.Message != nil { - return *m.Message - } - return "" -} - -type UserAppLogGroup struct { - LogLine []*UserAppLogLine `protobuf:"bytes,2,rep,name=log_line,json=logLine" json:"log_line,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserAppLogGroup) Reset() { *m = UserAppLogGroup{} } -func (m *UserAppLogGroup) String() string { return proto.CompactTextString(m) } -func (*UserAppLogGroup) ProtoMessage() {} -func (*UserAppLogGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{2} -} -func (m *UserAppLogGroup) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserAppLogGroup.Unmarshal(m, b) -} -func (m *UserAppLogGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserAppLogGroup.Marshal(b, m, deterministic) -} -func (dst *UserAppLogGroup) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserAppLogGroup.Merge(dst, src) -} -func (m *UserAppLogGroup) XXX_Size() int { - return xxx_messageInfo_UserAppLogGroup.Size(m) -} -func (m *UserAppLogGroup) XXX_DiscardUnknown() { - xxx_messageInfo_UserAppLogGroup.DiscardUnknown(m) -} - -var xxx_messageInfo_UserAppLogGroup proto.InternalMessageInfo - -func (m *UserAppLogGroup) GetLogLine() []*UserAppLogLine { - if m != nil { - return m.LogLine - } - return nil -} - -type FlushRequest struct { - Logs []byte `protobuf:"bytes,1,opt,name=logs" json:"logs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FlushRequest) Reset() { *m = FlushRequest{} } -func (m *FlushRequest) String() string { return proto.CompactTextString(m) } -func (*FlushRequest) ProtoMessage() {} -func (*FlushRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{3} -} -func (m *FlushRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FlushRequest.Unmarshal(m, b) -} -func (m *FlushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FlushRequest.Marshal(b, m, deterministic) -} -func (dst *FlushRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlushRequest.Merge(dst, src) -} -func (m *FlushRequest) XXX_Size() int { - return xxx_messageInfo_FlushRequest.Size(m) -} -func (m *FlushRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FlushRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_FlushRequest proto.InternalMessageInfo - -func (m *FlushRequest) GetLogs() []byte { - if m != nil { - return m.Logs - } - return nil -} - -type SetStatusRequest struct { - Status *string `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetStatusRequest) Reset() { *m = SetStatusRequest{} } -func (m *SetStatusRequest) String() string { return proto.CompactTextString(m) } -func (*SetStatusRequest) ProtoMessage() {} -func (*SetStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{4} -} -func (m *SetStatusRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetStatusRequest.Unmarshal(m, b) -} -func (m *SetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetStatusRequest.Marshal(b, m, deterministic) -} -func (dst *SetStatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetStatusRequest.Merge(dst, src) -} -func (m *SetStatusRequest) XXX_Size() int { - return xxx_messageInfo_SetStatusRequest.Size(m) -} -func (m *SetStatusRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SetStatusRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SetStatusRequest proto.InternalMessageInfo - -func (m *SetStatusRequest) GetStatus() string { - if m != nil && m.Status != nil { - return *m.Status - } - return "" -} - -type LogOffset struct { - RequestId []byte `protobuf:"bytes,1,opt,name=request_id,json=requestId" json:"request_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogOffset) Reset() { *m = LogOffset{} } -func (m *LogOffset) String() string { return proto.CompactTextString(m) } -func (*LogOffset) ProtoMessage() {} -func (*LogOffset) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{5} -} -func (m *LogOffset) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogOffset.Unmarshal(m, b) -} -func (m *LogOffset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogOffset.Marshal(b, m, deterministic) -} -func (dst *LogOffset) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogOffset.Merge(dst, src) -} -func (m *LogOffset) XXX_Size() int { - return xxx_messageInfo_LogOffset.Size(m) -} -func (m *LogOffset) XXX_DiscardUnknown() { - xxx_messageInfo_LogOffset.DiscardUnknown(m) -} - -var xxx_messageInfo_LogOffset proto.InternalMessageInfo - -func (m *LogOffset) GetRequestId() []byte { - if m != nil { - return m.RequestId - } - return nil -} - -type LogLine struct { - Time *int64 `protobuf:"varint,1,req,name=time" json:"time,omitempty"` - Level *int32 `protobuf:"varint,2,req,name=level" json:"level,omitempty"` - LogMessage *string `protobuf:"bytes,3,req,name=log_message,json=logMessage" json:"log_message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogLine) Reset() { *m = LogLine{} } -func (m *LogLine) String() string { return proto.CompactTextString(m) } -func (*LogLine) ProtoMessage() {} -func (*LogLine) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{6} -} -func (m *LogLine) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogLine.Unmarshal(m, b) -} -func (m *LogLine) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogLine.Marshal(b, m, deterministic) -} -func (dst *LogLine) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogLine.Merge(dst, src) -} -func (m *LogLine) XXX_Size() int { - return xxx_messageInfo_LogLine.Size(m) -} -func (m *LogLine) XXX_DiscardUnknown() { - xxx_messageInfo_LogLine.DiscardUnknown(m) -} - -var xxx_messageInfo_LogLine proto.InternalMessageInfo - -func (m *LogLine) GetTime() int64 { - if m != nil && m.Time != nil { - return *m.Time - } - return 0 -} - -func (m *LogLine) GetLevel() int32 { - if m != nil && m.Level != nil { - return *m.Level - } - return 0 -} - -func (m *LogLine) GetLogMessage() string { - if m != nil && m.LogMessage != nil { - return *m.LogMessage - } - return "" -} - -type RequestLog struct { - AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` - ModuleId *string `protobuf:"bytes,37,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"` - VersionId *string `protobuf:"bytes,2,req,name=version_id,json=versionId" json:"version_id,omitempty"` - RequestId []byte `protobuf:"bytes,3,req,name=request_id,json=requestId" json:"request_id,omitempty"` - Offset *LogOffset `protobuf:"bytes,35,opt,name=offset" json:"offset,omitempty"` - Ip *string `protobuf:"bytes,4,req,name=ip" json:"ip,omitempty"` - Nickname *string `protobuf:"bytes,5,opt,name=nickname" json:"nickname,omitempty"` - StartTime *int64 `protobuf:"varint,6,req,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *int64 `protobuf:"varint,7,req,name=end_time,json=endTime" json:"end_time,omitempty"` - Latency *int64 `protobuf:"varint,8,req,name=latency" json:"latency,omitempty"` - Mcycles *int64 `protobuf:"varint,9,req,name=mcycles" json:"mcycles,omitempty"` - Method *string `protobuf:"bytes,10,req,name=method" json:"method,omitempty"` - Resource *string `protobuf:"bytes,11,req,name=resource" json:"resource,omitempty"` - HttpVersion *string `protobuf:"bytes,12,req,name=http_version,json=httpVersion" json:"http_version,omitempty"` - Status *int32 `protobuf:"varint,13,req,name=status" json:"status,omitempty"` - ResponseSize *int64 `protobuf:"varint,14,req,name=response_size,json=responseSize" json:"response_size,omitempty"` - Referrer *string `protobuf:"bytes,15,opt,name=referrer" json:"referrer,omitempty"` - UserAgent *string `protobuf:"bytes,16,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"` - UrlMapEntry *string `protobuf:"bytes,17,req,name=url_map_entry,json=urlMapEntry" json:"url_map_entry,omitempty"` - Combined *string `protobuf:"bytes,18,req,name=combined" json:"combined,omitempty"` - ApiMcycles *int64 `protobuf:"varint,19,opt,name=api_mcycles,json=apiMcycles" json:"api_mcycles,omitempty"` - Host *string `protobuf:"bytes,20,opt,name=host" json:"host,omitempty"` - Cost *float64 `protobuf:"fixed64,21,opt,name=cost" json:"cost,omitempty"` - TaskQueueName *string `protobuf:"bytes,22,opt,name=task_queue_name,json=taskQueueName" json:"task_queue_name,omitempty"` - TaskName *string `protobuf:"bytes,23,opt,name=task_name,json=taskName" json:"task_name,omitempty"` - WasLoadingRequest *bool `protobuf:"varint,24,opt,name=was_loading_request,json=wasLoadingRequest" json:"was_loading_request,omitempty"` - PendingTime *int64 `protobuf:"varint,25,opt,name=pending_time,json=pendingTime" json:"pending_time,omitempty"` - ReplicaIndex *int32 `protobuf:"varint,26,opt,name=replica_index,json=replicaIndex,def=-1" json:"replica_index,omitempty"` - Finished *bool `protobuf:"varint,27,opt,name=finished,def=1" json:"finished,omitempty"` - CloneKey []byte `protobuf:"bytes,28,opt,name=clone_key,json=cloneKey" json:"clone_key,omitempty"` - Line []*LogLine `protobuf:"bytes,29,rep,name=line" json:"line,omitempty"` - LinesIncomplete *bool `protobuf:"varint,36,opt,name=lines_incomplete,json=linesIncomplete" json:"lines_incomplete,omitempty"` - AppEngineRelease []byte `protobuf:"bytes,38,opt,name=app_engine_release,json=appEngineRelease" json:"app_engine_release,omitempty"` - ExitReason *int32 `protobuf:"varint,30,opt,name=exit_reason,json=exitReason" json:"exit_reason,omitempty"` - WasThrottledForTime *bool `protobuf:"varint,31,opt,name=was_throttled_for_time,json=wasThrottledForTime" json:"was_throttled_for_time,omitempty"` - WasThrottledForRequests *bool `protobuf:"varint,32,opt,name=was_throttled_for_requests,json=wasThrottledForRequests" json:"was_throttled_for_requests,omitempty"` - ThrottledTime *int64 `protobuf:"varint,33,opt,name=throttled_time,json=throttledTime" json:"throttled_time,omitempty"` - ServerName []byte `protobuf:"bytes,34,opt,name=server_name,json=serverName" json:"server_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RequestLog) Reset() { *m = RequestLog{} } -func (m *RequestLog) String() string { return proto.CompactTextString(m) } -func (*RequestLog) ProtoMessage() {} -func (*RequestLog) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{7} -} -func (m *RequestLog) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RequestLog.Unmarshal(m, b) -} -func (m *RequestLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RequestLog.Marshal(b, m, deterministic) -} -func (dst *RequestLog) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestLog.Merge(dst, src) -} -func (m *RequestLog) XXX_Size() int { - return xxx_messageInfo_RequestLog.Size(m) -} -func (m *RequestLog) XXX_DiscardUnknown() { - xxx_messageInfo_RequestLog.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestLog proto.InternalMessageInfo - -const Default_RequestLog_ModuleId string = "default" -const Default_RequestLog_ReplicaIndex int32 = -1 -const Default_RequestLog_Finished bool = true - -func (m *RequestLog) GetAppId() string { - if m != nil && m.AppId != nil { - return *m.AppId - } - return "" -} - -func (m *RequestLog) GetModuleId() string { - if m != nil && m.ModuleId != nil { - return *m.ModuleId - } - return Default_RequestLog_ModuleId -} - -func (m *RequestLog) GetVersionId() string { - if m != nil && m.VersionId != nil { - return *m.VersionId - } - return "" -} - -func (m *RequestLog) GetRequestId() []byte { - if m != nil { - return m.RequestId - } - return nil -} - -func (m *RequestLog) GetOffset() *LogOffset { - if m != nil { - return m.Offset - } - return nil -} - -func (m *RequestLog) GetIp() string { - if m != nil && m.Ip != nil { - return *m.Ip - } - return "" -} - -func (m *RequestLog) GetNickname() string { - if m != nil && m.Nickname != nil { - return *m.Nickname - } - return "" -} - -func (m *RequestLog) GetStartTime() int64 { - if m != nil && m.StartTime != nil { - return *m.StartTime - } - return 0 -} - -func (m *RequestLog) GetEndTime() int64 { - if m != nil && m.EndTime != nil { - return *m.EndTime - } - return 0 -} - -func (m *RequestLog) GetLatency() int64 { - if m != nil && m.Latency != nil { - return *m.Latency - } - return 0 -} - -func (m *RequestLog) GetMcycles() int64 { - if m != nil && m.Mcycles != nil { - return *m.Mcycles - } - return 0 -} - -func (m *RequestLog) GetMethod() string { - if m != nil && m.Method != nil { - return *m.Method - } - return "" -} - -func (m *RequestLog) GetResource() string { - if m != nil && m.Resource != nil { - return *m.Resource - } - return "" -} - -func (m *RequestLog) GetHttpVersion() string { - if m != nil && m.HttpVersion != nil { - return *m.HttpVersion - } - return "" -} - -func (m *RequestLog) GetStatus() int32 { - if m != nil && m.Status != nil { - return *m.Status - } - return 0 -} - -func (m *RequestLog) GetResponseSize() int64 { - if m != nil && m.ResponseSize != nil { - return *m.ResponseSize - } - return 0 -} - -func (m *RequestLog) GetReferrer() string { - if m != nil && m.Referrer != nil { - return *m.Referrer - } - return "" -} - -func (m *RequestLog) GetUserAgent() string { - if m != nil && m.UserAgent != nil { - return *m.UserAgent - } - return "" -} - -func (m *RequestLog) GetUrlMapEntry() string { - if m != nil && m.UrlMapEntry != nil { - return *m.UrlMapEntry - } - return "" -} - -func (m *RequestLog) GetCombined() string { - if m != nil && m.Combined != nil { - return *m.Combined - } - return "" -} - -func (m *RequestLog) GetApiMcycles() int64 { - if m != nil && m.ApiMcycles != nil { - return *m.ApiMcycles - } - return 0 -} - -func (m *RequestLog) GetHost() string { - if m != nil && m.Host != nil { - return *m.Host - } - return "" -} - -func (m *RequestLog) GetCost() float64 { - if m != nil && m.Cost != nil { - return *m.Cost - } - return 0 -} - -func (m *RequestLog) GetTaskQueueName() string { - if m != nil && m.TaskQueueName != nil { - return *m.TaskQueueName - } - return "" -} - -func (m *RequestLog) GetTaskName() string { - if m != nil && m.TaskName != nil { - return *m.TaskName - } - return "" -} - -func (m *RequestLog) GetWasLoadingRequest() bool { - if m != nil && m.WasLoadingRequest != nil { - return *m.WasLoadingRequest - } - return false -} - -func (m *RequestLog) GetPendingTime() int64 { - if m != nil && m.PendingTime != nil { - return *m.PendingTime - } - return 0 -} - -func (m *RequestLog) GetReplicaIndex() int32 { - if m != nil && m.ReplicaIndex != nil { - return *m.ReplicaIndex - } - return Default_RequestLog_ReplicaIndex -} - -func (m *RequestLog) GetFinished() bool { - if m != nil && m.Finished != nil { - return *m.Finished - } - return Default_RequestLog_Finished -} - -func (m *RequestLog) GetCloneKey() []byte { - if m != nil { - return m.CloneKey - } - return nil -} - -func (m *RequestLog) GetLine() []*LogLine { - if m != nil { - return m.Line - } - return nil -} - -func (m *RequestLog) GetLinesIncomplete() bool { - if m != nil && m.LinesIncomplete != nil { - return *m.LinesIncomplete - } - return false -} - -func (m *RequestLog) GetAppEngineRelease() []byte { - if m != nil { - return m.AppEngineRelease - } - return nil -} - -func (m *RequestLog) GetExitReason() int32 { - if m != nil && m.ExitReason != nil { - return *m.ExitReason - } - return 0 -} - -func (m *RequestLog) GetWasThrottledForTime() bool { - if m != nil && m.WasThrottledForTime != nil { - return *m.WasThrottledForTime - } - return false -} - -func (m *RequestLog) GetWasThrottledForRequests() bool { - if m != nil && m.WasThrottledForRequests != nil { - return *m.WasThrottledForRequests - } - return false -} - -func (m *RequestLog) GetThrottledTime() int64 { - if m != nil && m.ThrottledTime != nil { - return *m.ThrottledTime - } - return 0 -} - -func (m *RequestLog) GetServerName() []byte { - if m != nil { - return m.ServerName - } - return nil -} - -type LogModuleVersion struct { - ModuleId *string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,def=default" json:"module_id,omitempty"` - VersionId *string `protobuf:"bytes,2,opt,name=version_id,json=versionId" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogModuleVersion) Reset() { *m = LogModuleVersion{} } -func (m *LogModuleVersion) String() string { return proto.CompactTextString(m) } -func (*LogModuleVersion) ProtoMessage() {} -func (*LogModuleVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{8} -} -func (m *LogModuleVersion) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogModuleVersion.Unmarshal(m, b) -} -func (m *LogModuleVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogModuleVersion.Marshal(b, m, deterministic) -} -func (dst *LogModuleVersion) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogModuleVersion.Merge(dst, src) -} -func (m *LogModuleVersion) XXX_Size() int { - return xxx_messageInfo_LogModuleVersion.Size(m) -} -func (m *LogModuleVersion) XXX_DiscardUnknown() { - xxx_messageInfo_LogModuleVersion.DiscardUnknown(m) -} - -var xxx_messageInfo_LogModuleVersion proto.InternalMessageInfo - -const Default_LogModuleVersion_ModuleId string = "default" - -func (m *LogModuleVersion) GetModuleId() string { - if m != nil && m.ModuleId != nil { - return *m.ModuleId - } - return Default_LogModuleVersion_ModuleId -} - -func (m *LogModuleVersion) GetVersionId() string { - if m != nil && m.VersionId != nil { - return *m.VersionId - } - return "" -} - -type LogReadRequest struct { - AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` - VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` - ModuleVersion []*LogModuleVersion `protobuf:"bytes,19,rep,name=module_version,json=moduleVersion" json:"module_version,omitempty"` - StartTime *int64 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *int64 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` - Offset *LogOffset `protobuf:"bytes,5,opt,name=offset" json:"offset,omitempty"` - RequestId [][]byte `protobuf:"bytes,6,rep,name=request_id,json=requestId" json:"request_id,omitempty"` - MinimumLogLevel *int32 `protobuf:"varint,7,opt,name=minimum_log_level,json=minimumLogLevel" json:"minimum_log_level,omitempty"` - IncludeIncomplete *bool `protobuf:"varint,8,opt,name=include_incomplete,json=includeIncomplete" json:"include_incomplete,omitempty"` - Count *int64 `protobuf:"varint,9,opt,name=count" json:"count,omitempty"` - CombinedLogRegex *string `protobuf:"bytes,14,opt,name=combined_log_regex,json=combinedLogRegex" json:"combined_log_regex,omitempty"` - HostRegex *string `protobuf:"bytes,15,opt,name=host_regex,json=hostRegex" json:"host_regex,omitempty"` - ReplicaIndex *int32 `protobuf:"varint,16,opt,name=replica_index,json=replicaIndex" json:"replica_index,omitempty"` - IncludeAppLogs *bool `protobuf:"varint,10,opt,name=include_app_logs,json=includeAppLogs" json:"include_app_logs,omitempty"` - AppLogsPerRequest *int32 `protobuf:"varint,17,opt,name=app_logs_per_request,json=appLogsPerRequest" json:"app_logs_per_request,omitempty"` - IncludeHost *bool `protobuf:"varint,11,opt,name=include_host,json=includeHost" json:"include_host,omitempty"` - IncludeAll *bool `protobuf:"varint,12,opt,name=include_all,json=includeAll" json:"include_all,omitempty"` - CacheIterator *bool `protobuf:"varint,13,opt,name=cache_iterator,json=cacheIterator" json:"cache_iterator,omitempty"` - NumShards *int32 `protobuf:"varint,18,opt,name=num_shards,json=numShards" json:"num_shards,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogReadRequest) Reset() { *m = LogReadRequest{} } -func (m *LogReadRequest) String() string { return proto.CompactTextString(m) } -func (*LogReadRequest) ProtoMessage() {} -func (*LogReadRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{9} -} -func (m *LogReadRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogReadRequest.Unmarshal(m, b) -} -func (m *LogReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogReadRequest.Marshal(b, m, deterministic) -} -func (dst *LogReadRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogReadRequest.Merge(dst, src) -} -func (m *LogReadRequest) XXX_Size() int { - return xxx_messageInfo_LogReadRequest.Size(m) -} -func (m *LogReadRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LogReadRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LogReadRequest proto.InternalMessageInfo - -func (m *LogReadRequest) GetAppId() string { - if m != nil && m.AppId != nil { - return *m.AppId - } - return "" -} - -func (m *LogReadRequest) GetVersionId() []string { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *LogReadRequest) GetModuleVersion() []*LogModuleVersion { - if m != nil { - return m.ModuleVersion - } - return nil -} - -func (m *LogReadRequest) GetStartTime() int64 { - if m != nil && m.StartTime != nil { - return *m.StartTime - } - return 0 -} - -func (m *LogReadRequest) GetEndTime() int64 { - if m != nil && m.EndTime != nil { - return *m.EndTime - } - return 0 -} - -func (m *LogReadRequest) GetOffset() *LogOffset { - if m != nil { - return m.Offset - } - return nil -} - -func (m *LogReadRequest) GetRequestId() [][]byte { - if m != nil { - return m.RequestId - } - return nil -} - -func (m *LogReadRequest) GetMinimumLogLevel() int32 { - if m != nil && m.MinimumLogLevel != nil { - return *m.MinimumLogLevel - } - return 0 -} - -func (m *LogReadRequest) GetIncludeIncomplete() bool { - if m != nil && m.IncludeIncomplete != nil { - return *m.IncludeIncomplete - } - return false -} - -func (m *LogReadRequest) GetCount() int64 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *LogReadRequest) GetCombinedLogRegex() string { - if m != nil && m.CombinedLogRegex != nil { - return *m.CombinedLogRegex - } - return "" -} - -func (m *LogReadRequest) GetHostRegex() string { - if m != nil && m.HostRegex != nil { - return *m.HostRegex - } - return "" -} - -func (m *LogReadRequest) GetReplicaIndex() int32 { - if m != nil && m.ReplicaIndex != nil { - return *m.ReplicaIndex - } - return 0 -} - -func (m *LogReadRequest) GetIncludeAppLogs() bool { - if m != nil && m.IncludeAppLogs != nil { - return *m.IncludeAppLogs - } - return false -} - -func (m *LogReadRequest) GetAppLogsPerRequest() int32 { - if m != nil && m.AppLogsPerRequest != nil { - return *m.AppLogsPerRequest - } - return 0 -} - -func (m *LogReadRequest) GetIncludeHost() bool { - if m != nil && m.IncludeHost != nil { - return *m.IncludeHost - } - return false -} - -func (m *LogReadRequest) GetIncludeAll() bool { - if m != nil && m.IncludeAll != nil { - return *m.IncludeAll - } - return false -} - -func (m *LogReadRequest) GetCacheIterator() bool { - if m != nil && m.CacheIterator != nil { - return *m.CacheIterator - } - return false -} - -func (m *LogReadRequest) GetNumShards() int32 { - if m != nil && m.NumShards != nil { - return *m.NumShards - } - return 0 -} - -type LogReadResponse struct { - Log []*RequestLog `protobuf:"bytes,1,rep,name=log" json:"log,omitempty"` - Offset *LogOffset `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"` - LastEndTime *int64 `protobuf:"varint,3,opt,name=last_end_time,json=lastEndTime" json:"last_end_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogReadResponse) Reset() { *m = LogReadResponse{} } -func (m *LogReadResponse) String() string { return proto.CompactTextString(m) } -func (*LogReadResponse) ProtoMessage() {} -func (*LogReadResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{10} -} -func (m *LogReadResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogReadResponse.Unmarshal(m, b) -} -func (m *LogReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogReadResponse.Marshal(b, m, deterministic) -} -func (dst *LogReadResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogReadResponse.Merge(dst, src) -} -func (m *LogReadResponse) XXX_Size() int { - return xxx_messageInfo_LogReadResponse.Size(m) -} -func (m *LogReadResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LogReadResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LogReadResponse proto.InternalMessageInfo - -func (m *LogReadResponse) GetLog() []*RequestLog { - if m != nil { - return m.Log - } - return nil -} - -func (m *LogReadResponse) GetOffset() *LogOffset { - if m != nil { - return m.Offset - } - return nil -} - -func (m *LogReadResponse) GetLastEndTime() int64 { - if m != nil && m.LastEndTime != nil { - return *m.LastEndTime - } - return 0 -} - -type LogUsageRecord struct { - VersionId *string `protobuf:"bytes,1,opt,name=version_id,json=versionId" json:"version_id,omitempty"` - StartTime *int32 `protobuf:"varint,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *int32 `protobuf:"varint,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"` - Count *int64 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"` - TotalSize *int64 `protobuf:"varint,5,opt,name=total_size,json=totalSize" json:"total_size,omitempty"` - Records *int32 `protobuf:"varint,6,opt,name=records" json:"records,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogUsageRecord) Reset() { *m = LogUsageRecord{} } -func (m *LogUsageRecord) String() string { return proto.CompactTextString(m) } -func (*LogUsageRecord) ProtoMessage() {} -func (*LogUsageRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{11} -} -func (m *LogUsageRecord) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogUsageRecord.Unmarshal(m, b) -} -func (m *LogUsageRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogUsageRecord.Marshal(b, m, deterministic) -} -func (dst *LogUsageRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogUsageRecord.Merge(dst, src) -} -func (m *LogUsageRecord) XXX_Size() int { - return xxx_messageInfo_LogUsageRecord.Size(m) -} -func (m *LogUsageRecord) XXX_DiscardUnknown() { - xxx_messageInfo_LogUsageRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_LogUsageRecord proto.InternalMessageInfo - -func (m *LogUsageRecord) GetVersionId() string { - if m != nil && m.VersionId != nil { - return *m.VersionId - } - return "" -} - -func (m *LogUsageRecord) GetStartTime() int32 { - if m != nil && m.StartTime != nil { - return *m.StartTime - } - return 0 -} - -func (m *LogUsageRecord) GetEndTime() int32 { - if m != nil && m.EndTime != nil { - return *m.EndTime - } - return 0 -} - -func (m *LogUsageRecord) GetCount() int64 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *LogUsageRecord) GetTotalSize() int64 { - if m != nil && m.TotalSize != nil { - return *m.TotalSize - } - return 0 -} - -func (m *LogUsageRecord) GetRecords() int32 { - if m != nil && m.Records != nil { - return *m.Records - } - return 0 -} - -type LogUsageRequest struct { - AppId *string `protobuf:"bytes,1,req,name=app_id,json=appId" json:"app_id,omitempty"` - VersionId []string `protobuf:"bytes,2,rep,name=version_id,json=versionId" json:"version_id,omitempty"` - StartTime *int32 `protobuf:"varint,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` - EndTime *int32 `protobuf:"varint,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` - ResolutionHours *uint32 `protobuf:"varint,5,opt,name=resolution_hours,json=resolutionHours,def=1" json:"resolution_hours,omitempty"` - CombineVersions *bool `protobuf:"varint,6,opt,name=combine_versions,json=combineVersions" json:"combine_versions,omitempty"` - UsageVersion *int32 `protobuf:"varint,7,opt,name=usage_version,json=usageVersion" json:"usage_version,omitempty"` - VersionsOnly *bool `protobuf:"varint,8,opt,name=versions_only,json=versionsOnly" json:"versions_only,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogUsageRequest) Reset() { *m = LogUsageRequest{} } -func (m *LogUsageRequest) String() string { return proto.CompactTextString(m) } -func (*LogUsageRequest) ProtoMessage() {} -func (*LogUsageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{12} -} -func (m *LogUsageRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogUsageRequest.Unmarshal(m, b) -} -func (m *LogUsageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogUsageRequest.Marshal(b, m, deterministic) -} -func (dst *LogUsageRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogUsageRequest.Merge(dst, src) -} -func (m *LogUsageRequest) XXX_Size() int { - return xxx_messageInfo_LogUsageRequest.Size(m) -} -func (m *LogUsageRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LogUsageRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LogUsageRequest proto.InternalMessageInfo - -const Default_LogUsageRequest_ResolutionHours uint32 = 1 - -func (m *LogUsageRequest) GetAppId() string { - if m != nil && m.AppId != nil { - return *m.AppId - } - return "" -} - -func (m *LogUsageRequest) GetVersionId() []string { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *LogUsageRequest) GetStartTime() int32 { - if m != nil && m.StartTime != nil { - return *m.StartTime - } - return 0 -} - -func (m *LogUsageRequest) GetEndTime() int32 { - if m != nil && m.EndTime != nil { - return *m.EndTime - } - return 0 -} - -func (m *LogUsageRequest) GetResolutionHours() uint32 { - if m != nil && m.ResolutionHours != nil { - return *m.ResolutionHours - } - return Default_LogUsageRequest_ResolutionHours -} - -func (m *LogUsageRequest) GetCombineVersions() bool { - if m != nil && m.CombineVersions != nil { - return *m.CombineVersions - } - return false -} - -func (m *LogUsageRequest) GetUsageVersion() int32 { - if m != nil && m.UsageVersion != nil { - return *m.UsageVersion - } - return 0 -} - -func (m *LogUsageRequest) GetVersionsOnly() bool { - if m != nil && m.VersionsOnly != nil { - return *m.VersionsOnly - } - return false -} - -type LogUsageResponse struct { - Usage []*LogUsageRecord `protobuf:"bytes,1,rep,name=usage" json:"usage,omitempty"` - Summary *LogUsageRecord `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogUsageResponse) Reset() { *m = LogUsageResponse{} } -func (m *LogUsageResponse) String() string { return proto.CompactTextString(m) } -func (*LogUsageResponse) ProtoMessage() {} -func (*LogUsageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_log_service_f054fd4b5012319d, []int{13} -} -func (m *LogUsageResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogUsageResponse.Unmarshal(m, b) -} -func (m *LogUsageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogUsageResponse.Marshal(b, m, deterministic) -} -func (dst *LogUsageResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogUsageResponse.Merge(dst, src) -} -func (m *LogUsageResponse) XXX_Size() int { - return xxx_messageInfo_LogUsageResponse.Size(m) -} -func (m *LogUsageResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LogUsageResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LogUsageResponse proto.InternalMessageInfo - -func (m *LogUsageResponse) GetUsage() []*LogUsageRecord { - if m != nil { - return m.Usage - } - return nil -} - -func (m *LogUsageResponse) GetSummary() *LogUsageRecord { - if m != nil { - return m.Summary - } - return nil -} - -func init() { - proto.RegisterType((*LogServiceError)(nil), "appengine.LogServiceError") - proto.RegisterType((*UserAppLogLine)(nil), "appengine.UserAppLogLine") - proto.RegisterType((*UserAppLogGroup)(nil), "appengine.UserAppLogGroup") - proto.RegisterType((*FlushRequest)(nil), "appengine.FlushRequest") - proto.RegisterType((*SetStatusRequest)(nil), "appengine.SetStatusRequest") - proto.RegisterType((*LogOffset)(nil), "appengine.LogOffset") - proto.RegisterType((*LogLine)(nil), "appengine.LogLine") - proto.RegisterType((*RequestLog)(nil), "appengine.RequestLog") - proto.RegisterType((*LogModuleVersion)(nil), "appengine.LogModuleVersion") - proto.RegisterType((*LogReadRequest)(nil), "appengine.LogReadRequest") - proto.RegisterType((*LogReadResponse)(nil), "appengine.LogReadResponse") - proto.RegisterType((*LogUsageRecord)(nil), "appengine.LogUsageRecord") - proto.RegisterType((*LogUsageRequest)(nil), "appengine.LogUsageRequest") - proto.RegisterType((*LogUsageResponse)(nil), "appengine.LogUsageResponse") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/log/log_service.proto", fileDescriptor_log_service_f054fd4b5012319d) -} - -var fileDescriptor_log_service_f054fd4b5012319d = []byte{ - // 1553 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x72, 0xdb, 0xc6, - 0x15, 0x2e, 0x48, 0x51, 0x24, 0x0f, 0x49, 0x91, 0x5a, 0xcb, 0xce, 0xda, 0xae, 0x6b, 0x1a, 0x4e, - 0x1c, 0xd6, 0x93, 0x48, 0x93, 0xa4, 0x57, 0xca, 0x95, 0xd3, 0x2a, 0x8e, 0x26, 0xb4, 0xd5, 0x40, - 0x72, 0x3a, 0xd3, 0x1b, 0x0c, 0x0a, 0x1c, 0x81, 0x18, 0x2f, 0xb1, 0xc8, 0xee, 0xc2, 0x91, 0x72, - 0xdb, 0xdb, 0x3e, 0x46, 0x1f, 0xa2, 0xaf, 0xd2, 0xb7, 0xe9, 0xec, 0xd9, 0x05, 0x44, 0x2a, 0x4d, - 0xc6, 0x33, 0xb9, 0xe0, 0x10, 0xfb, 0x9d, 0x83, 0xdd, 0xf3, 0xf3, 0x9d, 0x6f, 0x01, 0xc7, 0xb9, - 0x94, 0xb9, 0xc0, 0xc3, 0x5c, 0x8a, 0xa4, 0xcc, 0x0f, 0xa5, 0xca, 0x8f, 0x92, 0xaa, 0xc2, 0x32, - 0x2f, 0x4a, 0x3c, 0x2a, 0x4a, 0x83, 0xaa, 0x4c, 0xc4, 0x91, 0x90, 0xb9, 0xfd, 0xc5, 0x1a, 0xd5, - 0xbb, 0x22, 0xc5, 0xc3, 0x4a, 0x49, 0x23, 0xd9, 0xb0, 0xf5, 0x0c, 0x5f, 0xc3, 0x74, 0x29, 0xf3, - 0x73, 0x67, 0x3e, 0x51, 0x4a, 0xaa, 0xf0, 0x4b, 0x18, 0xd2, 0xc3, 0x9f, 0x65, 0x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2, 0xbd, 0xcd, 0x11, 0x9f, 0xd9, 0xcf, 0x11, 0x51, 0x1b, 0xbb, 0xf7, 0x4a, 0xd6, 0x4a, 0x53, - 0x0a, 0x93, 0xe3, 0xe0, 0xb3, 0x68, 0x7a, 0x63, 0xfa, 0xc6, 0x5a, 0xec, 0x25, 0xe3, 0x07, 0xa7, - 0xd1, 0x23, 0x97, 0xd4, 0x20, 0x9a, 0x7a, 0xdc, 0x8b, 0x0e, 0x7d, 0xa0, 0xd4, 0x36, 0xb1, 0x56, - 0xb8, 0xdc, 0xa8, 0x8f, 0x09, 0x6c, 0xa4, 0xe9, 0x29, 0x4c, 0x9a, 0x7d, 0x62, 0x59, 0x8a, 0x6b, - 0x3f, 0xe2, 0xe3, 0x06, 0x3c, 0x2b, 0xc5, 0x75, 0x78, 0x45, 0x2a, 0xed, 0xab, 0xe4, 0x09, 0x77, - 0x04, 0x3d, 0xda, 0xc8, 0x53, 0xee, 0xfe, 0x36, 0x8d, 0x36, 0xc8, 0x10, 0x39, 0x3f, 0xf6, 0x05, - 0xf4, 0x75, 0xbd, 0x5e, 0x27, 0xea, 0xda, 0x33, 0xef, 0x57, 0x5e, 0x69, 0x3c, 0xbf, 0xea, 0xfd, - 0xdd, 0x92, 0xf6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0xd9, 0xa0, 0xf8, 0x48, 0x0d, 0x00, - 0x00, -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/log/log_service.proto b/pkg/k8s/vendor/google.golang.org/appengine/internal/log/log_service.proto deleted file mode 100644 index 8981dc47577..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/log/log_service.proto +++ /dev/null @@ -1,150 +0,0 @@ -syntax = "proto2"; -option go_package = "log"; - -package appengine; - -message LogServiceError { - enum ErrorCode { - OK = 0; - INVALID_REQUEST = 1; - STORAGE_ERROR = 2; - } -} - -message UserAppLogLine { - required int64 timestamp_usec = 1; - required int64 level = 2; - required string message = 3; -} - -message UserAppLogGroup { - repeated UserAppLogLine log_line = 2; -} - -message FlushRequest { - optional bytes logs = 1; -} - -message SetStatusRequest { - required string status = 1; -} - - -message LogOffset { - optional bytes request_id = 1; -} - -message LogLine { - required int64 time = 1; - required int32 level = 2; - required string log_message = 3; -} - -message RequestLog { - required string app_id = 1; - optional string module_id = 37 [default="default"]; - required string version_id = 2; - required bytes request_id = 3; - optional LogOffset offset = 35; - required string ip = 4; - optional string nickname = 5; - required int64 start_time = 6; - required int64 end_time = 7; - required int64 latency = 8; - required int64 mcycles = 9; - required string method = 10; - required string resource = 11; - required string http_version = 12; - required int32 status = 13; - required int64 response_size = 14; - optional string referrer = 15; - optional string user_agent = 16; - required string url_map_entry = 17; - required string combined = 18; - optional int64 api_mcycles = 19; - optional string host = 20; - optional double cost = 21; - - optional string task_queue_name = 22; - optional string task_name = 23; - - optional bool was_loading_request = 24; - optional int64 pending_time = 25; - optional int32 replica_index = 26 [default = -1]; - optional bool finished = 27 [default = true]; - optional bytes clone_key = 28; - - repeated LogLine line = 29; - - optional bool lines_incomplete = 36; - optional bytes app_engine_release = 38; - - optional int32 exit_reason = 30; - optional bool was_throttled_for_time = 31; - optional bool was_throttled_for_requests = 32; - optional int64 throttled_time = 33; - - optional bytes server_name = 34; -} - -message LogModuleVersion { - optional string module_id = 1 [default="default"]; - optional string version_id = 2; -} - -message LogReadRequest { - required string app_id = 1; - repeated string version_id = 2; - repeated LogModuleVersion module_version = 19; - - optional int64 start_time = 3; - optional int64 end_time = 4; - optional LogOffset offset = 5; - repeated bytes request_id = 6; - - optional int32 minimum_log_level = 7; - optional bool include_incomplete = 8; - optional int64 count = 9; - - optional string combined_log_regex = 14; - optional string host_regex = 15; - optional int32 replica_index = 16; - - optional bool include_app_logs = 10; - optional int32 app_logs_per_request = 17; - optional bool include_host = 11; - optional bool include_all = 12; - optional bool cache_iterator = 13; - optional int32 num_shards = 18; -} - -message LogReadResponse { - repeated RequestLog log = 1; - optional LogOffset offset = 2; - optional int64 last_end_time = 3; -} - -message LogUsageRecord { - optional string version_id = 1; - optional int32 start_time = 2; - optional int32 end_time = 3; - optional int64 count = 4; - optional int64 total_size = 5; - optional int32 records = 6; -} - -message LogUsageRequest { - required string app_id = 1; - repeated string version_id = 2; - optional int32 start_time = 3; - optional int32 end_time = 4; - optional uint32 resolution_hours = 5 [default = 1]; - optional bool combine_versions = 6; - optional int32 usage_version = 7; - optional bool versions_only = 8; -} - -message LogUsageResponse { - repeated LogUsageRecord usage = 1; - optional LogUsageRecord summary = 2; -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/main.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/main.go deleted file mode 100644 index afd0ae84fdf..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/main.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build appengine -// +build appengine - -package internal - -import ( - "appengine_internal" -) - -func Main() { - MainPath = "" - appengine_internal.Main() -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/main_common.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/main_common.go deleted file mode 100644 index 357dce4dd01..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/main_common.go +++ /dev/null @@ -1,7 +0,0 @@ -package internal - -// MainPath stores the file path of the main package. On App Engine Standard -// using Go version 1.9 and below, this will be unset. On App Engine Flex and -// App Engine Standard second-gen (Go 1.11 and above), this will be the -// filepath to package main. -var MainPath string diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/main_vm.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/main_vm.go deleted file mode 100644 index 86a8caf06f3..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/main_vm.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build !appengine -// +build !appengine - -package internal - -import ( - "io" - "log" - "net/http" - "net/url" - "os" - "path/filepath" - "runtime" -) - -func Main() { - MainPath = filepath.Dir(findMainPath()) - installHealthChecker(http.DefaultServeMux) - - port := "8080" - if s := os.Getenv("PORT"); s != "" { - port = s - } - - host := "" - if IsDevAppServer() { - host = "127.0.0.1" - } - if err := http.ListenAndServe(host+":"+port, Middleware(http.DefaultServeMux)); err != nil { - log.Fatalf("http.ListenAndServe: %v", err) - } -} - -// Find the path to package main by looking at the root Caller. -func findMainPath() string { - pc := make([]uintptr, 100) - n := runtime.Callers(2, pc) - frames := runtime.CallersFrames(pc[:n]) - for { - frame, more := frames.Next() - // Tests won't have package main, instead they have testing.tRunner - if frame.Function == "main.main" || frame.Function == "testing.tRunner" { - return frame.File - } - if !more { - break - } - } - return "" -} - -func installHealthChecker(mux *http.ServeMux) { - // If no health check handler has been installed by this point, add a trivial one. - const healthPath = "/_ah/health" - hreq := &http.Request{ - Method: "GET", - URL: &url.URL{ - Path: healthPath, - }, - } - if _, pat := mux.Handler(hreq); pat != healthPath { - mux.HandleFunc(healthPath, func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, "ok") - }) - } -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/metadata.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/metadata.go deleted file mode 100644 index c4ba63bb481..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/metadata.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2014 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -// This file has code for accessing metadata. -// -// References: -// https://cloud.google.com/compute/docs/metadata - -import ( - "fmt" - "io/ioutil" - "net/http" - "net/url" -) - -const ( - metadataHost = "metadata" - metadataPath = "/computeMetadata/v1/" -) - -var ( - metadataRequestHeaders = http.Header{ - "Metadata-Flavor": []string{"Google"}, - } -) - -// TODO(dsymonds): Do we need to support default values, like Python? -func mustGetMetadata(key string) []byte { - b, err := getMetadata(key) - if err != nil { - panic(fmt.Sprintf("Metadata fetch failed for '%s': %v", key, err)) - } - return b -} - -func getMetadata(key string) ([]byte, error) { - // TODO(dsymonds): May need to use url.Parse to support keys with query args. - req := &http.Request{ - Method: "GET", - URL: &url.URL{ - Scheme: "http", - Host: metadataHost, - Path: metadataPath + key, - }, - Header: metadataRequestHeaders, - Host: metadataHost, - } - resp, err := http.DefaultClient.Do(req) - if err != nil { - return nil, err - } - defer resp.Body.Close() - if resp.StatusCode != 200 { - return nil, fmt.Errorf("metadata server returned HTTP %d", resp.StatusCode) - } - return ioutil.ReadAll(resp.Body) -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/net.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/net.go deleted file mode 100644 index fe429720e1f..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/net.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2014 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -// This file implements a network dialer that limits the number of concurrent connections. -// It is only used for API calls. - -import ( - "log" - "net" - "runtime" - "sync" - "time" -) - -var limitSem = make(chan int, 100) // TODO(dsymonds): Use environment variable. - -func limitRelease() { - // non-blocking - select { - case <-limitSem: - default: - // This should not normally happen. - log.Print("appengine: unbalanced limitSem release!") - } -} - -func limitDial(network, addr string) (net.Conn, error) { - limitSem <- 1 - - // Dial with a timeout in case the API host is MIA. - // The connection should normally be very fast. - conn, err := net.DialTimeout(network, addr, 10*time.Second) - if err != nil { - limitRelease() - return nil, err - } - lc := &limitConn{Conn: conn} - runtime.SetFinalizer(lc, (*limitConn).Close) // shouldn't usually be required - return lc, nil -} - -type limitConn struct { - close sync.Once - net.Conn -} - -func (lc *limitConn) Close() error { - defer lc.close.Do(func() { - limitRelease() - runtime.SetFinalizer(lc, nil) - }) - return lc.Conn.Close() -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/regen.sh b/pkg/k8s/vendor/google.golang.org/appengine/internal/regen.sh deleted file mode 100644 index 2fdb546a633..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/regen.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -e -# -# This script rebuilds the generated code for the protocol buffers. -# To run this you will need protoc and goprotobuf installed; -# see https://github.com/golang/protobuf for instructions. - -PKG=google.golang.org/appengine - -function die() { - echo 1>&2 $* - exit 1 -} - -# Sanity check that the right tools are accessible. -for tool in go protoc protoc-gen-go; do - q=$(which $tool) || die "didn't find $tool" - echo 1>&2 "$tool: $q" -done - -echo -n 1>&2 "finding package dir... " -pkgdir=$(go list -f '{{.Dir}}' $PKG) -echo 1>&2 $pkgdir -base=$(echo $pkgdir | sed "s,/$PKG\$,,") -echo 1>&2 "base: $base" -cd $base - -# Run protoc once per package. -for dir in $(find $PKG/internal -name '*.proto' | xargs dirname | sort | uniq); do - echo 1>&2 "* $dir" - protoc --go_out=. $dir/*.proto -done - -for f in $(find $PKG/internal -name '*.pb.go'); do - # Remove proto.RegisterEnum calls. - # These cause duplicate registration panics when these packages - # are used on classic App Engine. proto.RegisterEnum only affects - # parsing the text format; we don't care about that. - # https://code.google.com/p/googleappengine/issues/detail?id=11670#c17 - sed -i '/proto.RegisterEnum/d' $f -done diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go deleted file mode 100644 index 8d782a38e17..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go +++ /dev/null @@ -1,361 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/remote_api/remote_api.proto - -package remote_api - -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 - -type RpcError_ErrorCode int32 - -const ( - RpcError_UNKNOWN RpcError_ErrorCode = 0 - RpcError_CALL_NOT_FOUND RpcError_ErrorCode = 1 - RpcError_PARSE_ERROR RpcError_ErrorCode = 2 - RpcError_SECURITY_VIOLATION RpcError_ErrorCode = 3 - RpcError_OVER_QUOTA RpcError_ErrorCode = 4 - RpcError_REQUEST_TOO_LARGE RpcError_ErrorCode = 5 - RpcError_CAPABILITY_DISABLED RpcError_ErrorCode = 6 - RpcError_FEATURE_DISABLED RpcError_ErrorCode = 7 - RpcError_BAD_REQUEST RpcError_ErrorCode = 8 - RpcError_RESPONSE_TOO_LARGE RpcError_ErrorCode = 9 - RpcError_CANCELLED RpcError_ErrorCode = 10 - RpcError_REPLAY_ERROR RpcError_ErrorCode = 11 - RpcError_DEADLINE_EXCEEDED RpcError_ErrorCode = 12 -) - -var RpcError_ErrorCode_name = map[int32]string{ - 0: "UNKNOWN", - 1: "CALL_NOT_FOUND", - 2: "PARSE_ERROR", - 3: "SECURITY_VIOLATION", - 4: "OVER_QUOTA", - 5: "REQUEST_TOO_LARGE", - 6: "CAPABILITY_DISABLED", - 7: "FEATURE_DISABLED", - 8: "BAD_REQUEST", - 9: "RESPONSE_TOO_LARGE", - 10: "CANCELLED", - 11: "REPLAY_ERROR", - 12: "DEADLINE_EXCEEDED", -} -var RpcError_ErrorCode_value = map[string]int32{ - "UNKNOWN": 0, - "CALL_NOT_FOUND": 1, - "PARSE_ERROR": 2, - "SECURITY_VIOLATION": 3, - "OVER_QUOTA": 4, - "REQUEST_TOO_LARGE": 5, - "CAPABILITY_DISABLED": 6, - "FEATURE_DISABLED": 7, - "BAD_REQUEST": 8, - "RESPONSE_TOO_LARGE": 9, - "CANCELLED": 10, - "REPLAY_ERROR": 11, - "DEADLINE_EXCEEDED": 12, -} - -func (x RpcError_ErrorCode) Enum() *RpcError_ErrorCode { - p := new(RpcError_ErrorCode) - *p = x - return p -} -func (x RpcError_ErrorCode) String() string { - return proto.EnumName(RpcError_ErrorCode_name, int32(x)) -} -func (x *RpcError_ErrorCode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RpcError_ErrorCode_value, data, "RpcError_ErrorCode") - if err != nil { - return err - } - *x = RpcError_ErrorCode(value) - return nil -} -func (RpcError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_remote_api_1978114ec33a273d, []int{2, 0} -} - -type Request struct { - ServiceName *string `protobuf:"bytes,2,req,name=service_name,json=serviceName" json:"service_name,omitempty"` - Method *string `protobuf:"bytes,3,req,name=method" json:"method,omitempty"` - Request []byte `protobuf:"bytes,4,req,name=request" json:"request,omitempty"` - RequestId *string `protobuf:"bytes,5,opt,name=request_id,json=requestId" json:"request_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Request) Reset() { *m = Request{} } -func (m *Request) String() string { return proto.CompactTextString(m) } -func (*Request) ProtoMessage() {} -func (*Request) Descriptor() ([]byte, []int) { - return fileDescriptor_remote_api_1978114ec33a273d, []int{0} -} -func (m *Request) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Request.Unmarshal(m, b) -} -func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Request.Marshal(b, m, deterministic) -} -func (dst *Request) XXX_Merge(src proto.Message) { - xxx_messageInfo_Request.Merge(dst, src) -} -func (m *Request) XXX_Size() int { - return xxx_messageInfo_Request.Size(m) -} -func (m *Request) XXX_DiscardUnknown() { - xxx_messageInfo_Request.DiscardUnknown(m) -} - -var xxx_messageInfo_Request proto.InternalMessageInfo - -func (m *Request) GetServiceName() string { - if m != nil && m.ServiceName != nil { - return *m.ServiceName - } - return "" -} - -func (m *Request) GetMethod() string { - if m != nil && m.Method != nil { - return *m.Method - } - return "" -} - -func (m *Request) GetRequest() []byte { - if m != nil { - return m.Request - } - return nil -} - -func (m *Request) GetRequestId() string { - if m != nil && m.RequestId != nil { - return *m.RequestId - } - return "" -} - -type ApplicationError struct { - Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` - Detail *string `protobuf:"bytes,2,req,name=detail" json:"detail,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ApplicationError) Reset() { *m = ApplicationError{} } -func (m *ApplicationError) String() string { return proto.CompactTextString(m) } -func (*ApplicationError) ProtoMessage() {} -func (*ApplicationError) Descriptor() ([]byte, []int) { - return fileDescriptor_remote_api_1978114ec33a273d, []int{1} -} -func (m *ApplicationError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ApplicationError.Unmarshal(m, b) -} -func (m *ApplicationError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ApplicationError.Marshal(b, m, deterministic) -} -func (dst *ApplicationError) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApplicationError.Merge(dst, src) -} -func (m *ApplicationError) XXX_Size() int { - return xxx_messageInfo_ApplicationError.Size(m) -} -func (m *ApplicationError) XXX_DiscardUnknown() { - xxx_messageInfo_ApplicationError.DiscardUnknown(m) -} - -var xxx_messageInfo_ApplicationError proto.InternalMessageInfo - -func (m *ApplicationError) GetCode() int32 { - if m != nil && m.Code != nil { - return *m.Code - } - return 0 -} - -func (m *ApplicationError) GetDetail() string { - if m != nil && m.Detail != nil { - return *m.Detail - } - return "" -} - -type RpcError struct { - Code *int32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"` - Detail *string `protobuf:"bytes,2,opt,name=detail" json:"detail,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RpcError) Reset() { *m = RpcError{} } -func (m *RpcError) String() string { return proto.CompactTextString(m) } -func (*RpcError) ProtoMessage() {} -func (*RpcError) Descriptor() ([]byte, []int) { - return fileDescriptor_remote_api_1978114ec33a273d, []int{2} -} -func (m *RpcError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RpcError.Unmarshal(m, b) -} -func (m *RpcError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RpcError.Marshal(b, m, deterministic) -} -func (dst *RpcError) XXX_Merge(src proto.Message) { - xxx_messageInfo_RpcError.Merge(dst, src) -} -func (m *RpcError) XXX_Size() int { - return xxx_messageInfo_RpcError.Size(m) -} -func (m *RpcError) XXX_DiscardUnknown() { - xxx_messageInfo_RpcError.DiscardUnknown(m) -} - -var xxx_messageInfo_RpcError proto.InternalMessageInfo - -func (m *RpcError) GetCode() int32 { - if m != nil && m.Code != nil { - return *m.Code - } - return 0 -} - -func (m *RpcError) GetDetail() string { - if m != nil && m.Detail != nil { - return *m.Detail - } - return "" -} - -type Response struct { - Response []byte `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"` - Exception []byte `protobuf:"bytes,2,opt,name=exception" json:"exception,omitempty"` - ApplicationError *ApplicationError `protobuf:"bytes,3,opt,name=application_error,json=applicationError" json:"application_error,omitempty"` - JavaException []byte `protobuf:"bytes,4,opt,name=java_exception,json=javaException" json:"java_exception,omitempty"` - RpcError *RpcError `protobuf:"bytes,5,opt,name=rpc_error,json=rpcError" json:"rpc_error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Response) Reset() { *m = Response{} } -func (m *Response) String() string { return proto.CompactTextString(m) } -func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_remote_api_1978114ec33a273d, []int{3} -} -func (m *Response) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Response.Unmarshal(m, b) -} -func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Response.Marshal(b, m, deterministic) -} -func (dst *Response) XXX_Merge(src proto.Message) { - xxx_messageInfo_Response.Merge(dst, src) -} -func (m *Response) XXX_Size() int { - return xxx_messageInfo_Response.Size(m) -} -func (m *Response) XXX_DiscardUnknown() { - xxx_messageInfo_Response.DiscardUnknown(m) -} - -var xxx_messageInfo_Response proto.InternalMessageInfo - -func (m *Response) GetResponse() []byte { - if m != nil { - return m.Response - } - return nil -} - -func (m *Response) GetException() []byte { - if m != nil { - return m.Exception - } - return nil -} - -func (m *Response) GetApplicationError() *ApplicationError { - if m != nil { - return m.ApplicationError - } - return nil -} - -func (m *Response) GetJavaException() []byte { - if m != nil { - return m.JavaException - } - return nil -} - -func (m *Response) GetRpcError() *RpcError { - if m != nil { - return m.RpcError - } - return nil -} - -func init() { - proto.RegisterType((*Request)(nil), "remote_api.Request") - proto.RegisterType((*ApplicationError)(nil), "remote_api.ApplicationError") - proto.RegisterType((*RpcError)(nil), "remote_api.RpcError") - proto.RegisterType((*Response)(nil), "remote_api.Response") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/remote_api/remote_api.proto", fileDescriptor_remote_api_1978114ec33a273d) -} - -var fileDescriptor_remote_api_1978114ec33a273d = []byte{ - // 531 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x51, 0x6e, 0xd3, 0x40, - 0x10, 0x86, 0xb1, 0x9b, 0x34, 0xf1, 0xc4, 0x2d, 0xdb, 0xa5, 0x14, 0x0b, 0x15, 0x29, 0x44, 0x42, - 0xca, 0x53, 0x2a, 0x38, 0x00, 0x62, 0x63, 0x6f, 0x91, 0x85, 0x65, 0xa7, 0x6b, 0xbb, 0x50, 0x5e, - 0x56, 0x2b, 0x67, 0x65, 0x8c, 0x12, 0xaf, 0xd9, 0x98, 0x8a,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, 0xf6, - 0x7f, 0x89, 0x46, 0x2f, 0xf1, 0x97, 0x09, 0x56, 0x9b, 0xe5, 0x36, 0x7f, 0x4d, 0x60, 0x94, 0x86, - 0x1f, 0xc2, 0xe8, 0x63, 0x88, 0x1e, 0x61, 0x0c, 0xc7, 0x2e, 0x09, 0x02, 0x1e, 0x46, 0x09, 0xbf, - 0x8c, 0xd2, 0xd0, 0x43, 0x06, 0x7e, 0x0c, 0x93, 0x15, 0x61, 0x31, 0xe5, 0x94, 0xb1, 0x88, 0x21, - 0x13, 0x9f, 0x01, 0x8e, 0xa9, 0x9b, 0x32, 0x3f, 0xb9, 0xe1, 0xd7, 0x7e, 0x14, 0x90, 0xc4, 0x8f, - 0x42, 0x74, 0x80, 0x8f, 0x01, 0xa2, 0x6b, 0xca, 0xf8, 0x55, 0x1a, 0x25, 0x04, 0x0d, 0xf0, 0x53, - 0x38, 0x61, 0xf4, 0x2a, 0xa5, 0x71, 0xc2, 0x93, 0x28, 0xe2, 0x01, 0x61, 0xef, 0x29, 0x1a, 0xe2, - 0x67, 0xf0, 0xc4, 0x25, 0x2b, 0xb2, 0xf4, 0x83, 0xa6, 0x80, 0xe7, 0xc7, 0x64, 0x19, 0x50, 0x0f, - 0x1d, 0xe2, 0x53, 0x40, 0x97, 0x94, 0x24, 0x29, 0xa3, 0x7b, 0x77, 0xd4, 0xe0, 0x97, 0xc4, 0xe3, - 0x5d, 0x25, 0x34, 0x6e, 0xf0, 0x8c, 0xc6, 0xab, 0x28, 0x8c, 0x69, 0xaf, 0xae, 0x85, 0x8f, 0xc0, - 0x72, 0x49, 0xe8, 0xd2, 0xa0, 0xc9, 0x03, 0x8c, 0xc0, 0x66, 0x74, 0x15, 0x90, 0x9b, 0xae, 0xef, - 0x49, 0xd3, 0x8f, 0x47, 0x89, 0x17, 0xf8, 0x21, 0xe5, 0xf4, 0x93, 0x4b, 0xa9, 0x47, 0x3d, 0x64, - 0xcf, 0xfe, 0x18, 0x30, 0x66, 0x72, 0x57, 0xa9, 0x72, 0x27, 0xf1, 0x73, 0x18, 0xeb, 0x4e, 0x3b, - 0xc6, 0xd4, 0x98, 0xdb, 0xec, 0x3e, 0xc6, 0xe7, 0x60, 0xc9, 0x1f, 0x99, 0xac, 0x9a, 0x75, 0xb5, - 0x23, 0xb5, 0xd9, 0xde, 0xc0, 0x3e, 0x9c, 0x88, 0xfd, 0x3a, 0xb9, 0x6c, 0x06, 0xec, 0x1c, 0x4c, - 0x8d, 0xf9, 0xe4, 0xcd, 0xf9, 0xa2, 0x77, 0x87, 0x0f, 0x77, 0xce, 0x90, 0x78, 0x78, 0x05, 0xaf, - 0xe0, 0xf8, 0xab, 0xb8, 0x15, 0x7c, 0x4f, 0x1b, 0xb4, 0xb4, 0xa3, 0xc6, 0xa5, 0xf7, 0xc4, 0xd7, - 0x60, 0xe9, 0x2a, 0xeb, 0x48, 0xc3, 0x96, 0x74, 0xda, 0x27, 0xdd, 0x1d, 0x07, 0x1b, 0xeb, 0x4e, - 0x2d, 0xed, 0xcf, 0xbd, 0x07, 0xf0, 0x37, 0x00, 0x00, 0xff, 0xff, 0x38, 0xd1, 0x0f, 0x22, 0x4f, - 0x03, 0x00, 0x00, -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto b/pkg/k8s/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto deleted file mode 100644 index f21763a4e23..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto2"; -option go_package = "remote_api"; - -package remote_api; - -message Request { - required string service_name = 2; - required string method = 3; - required bytes request = 4; - optional string request_id = 5; -} - -message ApplicationError { - required int32 code = 1; - required string detail = 2; -} - -message RpcError { - enum ErrorCode { - UNKNOWN = 0; - CALL_NOT_FOUND = 1; - PARSE_ERROR = 2; - SECURITY_VIOLATION = 3; - OVER_QUOTA = 4; - REQUEST_TOO_LARGE = 5; - CAPABILITY_DISABLED = 6; - FEATURE_DISABLED = 7; - BAD_REQUEST = 8; - RESPONSE_TOO_LARGE = 9; - CANCELLED = 10; - REPLAY_ERROR = 11; - DEADLINE_EXCEEDED = 12; - } - required int32 code = 1; - optional string detail = 2; -} - -message Response { - optional bytes response = 1; - optional bytes exception = 2; - optional ApplicationError application_error = 3; - optional bytes java_exception = 4; - optional RpcError rpc_error = 5; -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/transaction.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/transaction.go deleted file mode 100644 index 2ae8ab9fa42..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/transaction.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2014 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package internal - -// This file implements hooks for applying datastore transactions. - -import ( - "context" - "errors" - "reflect" - - "github.com/golang/protobuf/proto" - - basepb "google.golang.org/appengine/internal/base" - pb "google.golang.org/appengine/internal/datastore" -) - -var transactionSetters = make(map[reflect.Type]reflect.Value) - -// RegisterTransactionSetter registers a function that sets transaction information -// in a protocol buffer message. f should be a function with two arguments, -// the first being a protocol buffer type, and the second being *datastore.Transaction. -func RegisterTransactionSetter(f interface{}) { - v := reflect.ValueOf(f) - transactionSetters[v.Type().In(0)] = v -} - -// applyTransaction applies the transaction t to message pb -// by using the relevant setter passed to RegisterTransactionSetter. -func applyTransaction(pb proto.Message, t *pb.Transaction) { - v := reflect.ValueOf(pb) - if f, ok := transactionSetters[v.Type()]; ok { - f.Call([]reflect.Value{v, reflect.ValueOf(t)}) - } -} - -var transactionKey = "used for *Transaction" - -func transactionFromContext(ctx context.Context) *transaction { - t, _ := ctx.Value(&transactionKey).(*transaction) - return t -} - -func withTransaction(ctx context.Context, t *transaction) context.Context { - return context.WithValue(ctx, &transactionKey, t) -} - -type transaction struct { - transaction pb.Transaction - finished bool -} - -var ErrConcurrentTransaction = errors.New("internal: concurrent transaction") - -func RunTransactionOnce(c context.Context, f func(context.Context) error, xg bool, readOnly bool, previousTransaction *pb.Transaction) (*pb.Transaction, error) { - if transactionFromContext(c) != nil { - return nil, errors.New("nested transactions are not supported") - } - - // Begin the transaction. - t := &transaction{} - req := &pb.BeginTransactionRequest{ - App: proto.String(FullyQualifiedAppID(c)), - } - if xg { - req.AllowMultipleEg = proto.Bool(true) - } - if previousTransaction != nil { - req.PreviousTransaction = previousTransaction - } - if readOnly { - req.Mode = pb.BeginTransactionRequest_READ_ONLY.Enum() - } else { - req.Mode = pb.BeginTransactionRequest_READ_WRITE.Enum() - } - if err := Call(c, "datastore_v3", "BeginTransaction", req, &t.transaction); err != nil { - return nil, err - } - - // Call f, rolling back the transaction if f returns a non-nil error, or panics. - // The panic is not recovered. - defer func() { - if t.finished { - return - } - t.finished = true - // Ignore the error return value, since we are already returning a non-nil - // error (or we're panicking). - Call(c, "datastore_v3", "Rollback", &t.transaction, &basepb.VoidProto{}) - }() - if err := f(withTransaction(c, t)); err != nil { - return &t.transaction, err - } - t.finished = true - - // Commit the transaction. - res := &pb.CommitResponse{} - err := Call(c, "datastore_v3", "Commit", &t.transaction, res) - if ae, ok := err.(*APIError); ok { - /* TODO: restore this conditional - if appengine.IsDevAppServer() { - */ - // The Python Dev AppServer raises an ApplicationError with error code 2 (which is - // Error.CONCURRENT_TRANSACTION) and message "Concurrency exception.". - if ae.Code == int32(pb.Error_BAD_REQUEST) && ae.Detail == "ApplicationError: 2 Concurrency exception." { - return &t.transaction, ErrConcurrentTransaction - } - if ae.Code == int32(pb.Error_CONCURRENT_TRANSACTION) { - return &t.transaction, ErrConcurrentTransaction - } - } - return &t.transaction, err -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go b/pkg/k8s/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go deleted file mode 100644 index 5f727750adc..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go +++ /dev/null @@ -1,527 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto - -package urlfetch - -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 - -type URLFetchServiceError_ErrorCode int32 - -const ( - URLFetchServiceError_OK URLFetchServiceError_ErrorCode = 0 - URLFetchServiceError_INVALID_URL URLFetchServiceError_ErrorCode = 1 - URLFetchServiceError_FETCH_ERROR URLFetchServiceError_ErrorCode = 2 - URLFetchServiceError_UNSPECIFIED_ERROR URLFetchServiceError_ErrorCode = 3 - URLFetchServiceError_RESPONSE_TOO_LARGE URLFetchServiceError_ErrorCode = 4 - URLFetchServiceError_DEADLINE_EXCEEDED URLFetchServiceError_ErrorCode = 5 - URLFetchServiceError_SSL_CERTIFICATE_ERROR URLFetchServiceError_ErrorCode = 6 - URLFetchServiceError_DNS_ERROR URLFetchServiceError_ErrorCode = 7 - URLFetchServiceError_CLOSED URLFetchServiceError_ErrorCode = 8 - URLFetchServiceError_INTERNAL_TRANSIENT_ERROR URLFetchServiceError_ErrorCode = 9 - URLFetchServiceError_TOO_MANY_REDIRECTS URLFetchServiceError_ErrorCode = 10 - URLFetchServiceError_MALFORMED_REPLY URLFetchServiceError_ErrorCode = 11 - URLFetchServiceError_CONNECTION_ERROR URLFetchServiceError_ErrorCode = 12 -) - -var URLFetchServiceError_ErrorCode_name = map[int32]string{ - 0: "OK", - 1: "INVALID_URL", - 2: "FETCH_ERROR", - 3: "UNSPECIFIED_ERROR", - 4: "RESPONSE_TOO_LARGE", - 5: "DEADLINE_EXCEEDED", - 6: "SSL_CERTIFICATE_ERROR", - 7: "DNS_ERROR", - 8: "CLOSED", - 9: "INTERNAL_TRANSIENT_ERROR", - 10: "TOO_MANY_REDIRECTS", - 11: "MALFORMED_REPLY", - 12: "CONNECTION_ERROR", -} -var URLFetchServiceError_ErrorCode_value = map[string]int32{ - "OK": 0, - "INVALID_URL": 1, - "FETCH_ERROR": 2, - "UNSPECIFIED_ERROR": 3, - "RESPONSE_TOO_LARGE": 4, - "DEADLINE_EXCEEDED": 5, - "SSL_CERTIFICATE_ERROR": 6, - "DNS_ERROR": 7, - "CLOSED": 8, - "INTERNAL_TRANSIENT_ERROR": 9, - "TOO_MANY_REDIRECTS": 10, - "MALFORMED_REPLY": 11, - "CONNECTION_ERROR": 12, -} - -func (x URLFetchServiceError_ErrorCode) Enum() *URLFetchServiceError_ErrorCode { - p := new(URLFetchServiceError_ErrorCode) - *p = x - return p -} -func (x URLFetchServiceError_ErrorCode) String() string { - return proto.EnumName(URLFetchServiceError_ErrorCode_name, int32(x)) -} -func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(URLFetchServiceError_ErrorCode_value, data, "URLFetchServiceError_ErrorCode") - if err != nil { - return err - } - *x = URLFetchServiceError_ErrorCode(value) - return nil -} -func (URLFetchServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0, 0} -} - -type URLFetchRequest_RequestMethod int32 - -const ( - URLFetchRequest_GET URLFetchRequest_RequestMethod = 1 - URLFetchRequest_POST URLFetchRequest_RequestMethod = 2 - URLFetchRequest_HEAD URLFetchRequest_RequestMethod = 3 - URLFetchRequest_PUT URLFetchRequest_RequestMethod = 4 - URLFetchRequest_DELETE URLFetchRequest_RequestMethod = 5 - URLFetchRequest_PATCH URLFetchRequest_RequestMethod = 6 -) - -var URLFetchRequest_RequestMethod_name = map[int32]string{ - 1: "GET", - 2: "POST", - 3: "HEAD", - 4: "PUT", - 5: "DELETE", - 6: "PATCH", -} -var URLFetchRequest_RequestMethod_value = map[string]int32{ - "GET": 1, - "POST": 2, - "HEAD": 3, - "PUT": 4, - "DELETE": 5, - "PATCH": 6, -} - -func (x URLFetchRequest_RequestMethod) Enum() *URLFetchRequest_RequestMethod { - p := new(URLFetchRequest_RequestMethod) - *p = x - return p -} -func (x URLFetchRequest_RequestMethod) String() string { - return proto.EnumName(URLFetchRequest_RequestMethod_name, int32(x)) -} -func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(URLFetchRequest_RequestMethod_value, data, "URLFetchRequest_RequestMethod") - if err != nil { - return err - } - *x = URLFetchRequest_RequestMethod(value) - return nil -} -func (URLFetchRequest_RequestMethod) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0} -} - -type URLFetchServiceError struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *URLFetchServiceError) Reset() { *m = URLFetchServiceError{} } -func (m *URLFetchServiceError) String() string { return proto.CompactTextString(m) } -func (*URLFetchServiceError) ProtoMessage() {} -func (*URLFetchServiceError) Descriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{0} -} -func (m *URLFetchServiceError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_URLFetchServiceError.Unmarshal(m, b) -} -func (m *URLFetchServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_URLFetchServiceError.Marshal(b, m, deterministic) -} -func (dst *URLFetchServiceError) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLFetchServiceError.Merge(dst, src) -} -func (m *URLFetchServiceError) XXX_Size() int { - return xxx_messageInfo_URLFetchServiceError.Size(m) -} -func (m *URLFetchServiceError) XXX_DiscardUnknown() { - xxx_messageInfo_URLFetchServiceError.DiscardUnknown(m) -} - -var xxx_messageInfo_URLFetchServiceError proto.InternalMessageInfo - -type URLFetchRequest struct { - Method *URLFetchRequest_RequestMethod `protobuf:"varint,1,req,name=Method,enum=appengine.URLFetchRequest_RequestMethod" json:"Method,omitempty"` - Url *string `protobuf:"bytes,2,req,name=Url" json:"Url,omitempty"` - Header []*URLFetchRequest_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"` - Payload []byte `protobuf:"bytes,6,opt,name=Payload" json:"Payload,omitempty"` - FollowRedirects *bool `protobuf:"varint,7,opt,name=FollowRedirects,def=1" json:"FollowRedirects,omitempty"` - Deadline *float64 `protobuf:"fixed64,8,opt,name=Deadline" json:"Deadline,omitempty"` - MustValidateServerCertificate *bool `protobuf:"varint,9,opt,name=MustValidateServerCertificate,def=1" json:"MustValidateServerCertificate,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *URLFetchRequest) Reset() { *m = URLFetchRequest{} } -func (m *URLFetchRequest) String() string { return proto.CompactTextString(m) } -func (*URLFetchRequest) ProtoMessage() {} -func (*URLFetchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1} -} -func (m *URLFetchRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_URLFetchRequest.Unmarshal(m, b) -} -func (m *URLFetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_URLFetchRequest.Marshal(b, m, deterministic) -} -func (dst *URLFetchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLFetchRequest.Merge(dst, src) -} -func (m *URLFetchRequest) XXX_Size() int { - return xxx_messageInfo_URLFetchRequest.Size(m) -} -func (m *URLFetchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_URLFetchRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_URLFetchRequest proto.InternalMessageInfo - -const Default_URLFetchRequest_FollowRedirects bool = true -const Default_URLFetchRequest_MustValidateServerCertificate bool = true - -func (m *URLFetchRequest) GetMethod() URLFetchRequest_RequestMethod { - if m != nil && m.Method != nil { - return *m.Method - } - return URLFetchRequest_GET -} - -func (m *URLFetchRequest) GetUrl() string { - if m != nil && m.Url != nil { - return *m.Url - } - return "" -} - -func (m *URLFetchRequest) GetHeader() []*URLFetchRequest_Header { - if m != nil { - return m.Header - } - return nil -} - -func (m *URLFetchRequest) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -func (m *URLFetchRequest) GetFollowRedirects() bool { - if m != nil && m.FollowRedirects != nil { - return *m.FollowRedirects - } - return Default_URLFetchRequest_FollowRedirects -} - -func (m *URLFetchRequest) GetDeadline() float64 { - if m != nil && m.Deadline != nil { - return *m.Deadline - } - return 0 -} - -func (m *URLFetchRequest) GetMustValidateServerCertificate() bool { - if m != nil && m.MustValidateServerCertificate != nil { - return *m.MustValidateServerCertificate - } - return Default_URLFetchRequest_MustValidateServerCertificate -} - -type URLFetchRequest_Header struct { - Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` - Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *URLFetchRequest_Header) Reset() { *m = URLFetchRequest_Header{} } -func (m *URLFetchRequest_Header) String() string { return proto.CompactTextString(m) } -func (*URLFetchRequest_Header) ProtoMessage() {} -func (*URLFetchRequest_Header) Descriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{1, 0} -} -func (m *URLFetchRequest_Header) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_URLFetchRequest_Header.Unmarshal(m, b) -} -func (m *URLFetchRequest_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_URLFetchRequest_Header.Marshal(b, m, deterministic) -} -func (dst *URLFetchRequest_Header) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLFetchRequest_Header.Merge(dst, src) -} -func (m *URLFetchRequest_Header) XXX_Size() int { - return xxx_messageInfo_URLFetchRequest_Header.Size(m) -} -func (m *URLFetchRequest_Header) XXX_DiscardUnknown() { - xxx_messageInfo_URLFetchRequest_Header.DiscardUnknown(m) -} - -var xxx_messageInfo_URLFetchRequest_Header proto.InternalMessageInfo - -func (m *URLFetchRequest_Header) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *URLFetchRequest_Header) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value - } - return "" -} - -type URLFetchResponse struct { - Content []byte `protobuf:"bytes,1,opt,name=Content" json:"Content,omitempty"` - StatusCode *int32 `protobuf:"varint,2,req,name=StatusCode" json:"StatusCode,omitempty"` - Header []*URLFetchResponse_Header `protobuf:"group,3,rep,name=Header,json=header" json:"header,omitempty"` - ContentWasTruncated *bool `protobuf:"varint,6,opt,name=ContentWasTruncated,def=0" json:"ContentWasTruncated,omitempty"` - ExternalBytesSent *int64 `protobuf:"varint,7,opt,name=ExternalBytesSent" json:"ExternalBytesSent,omitempty"` - ExternalBytesReceived *int64 `protobuf:"varint,8,opt,name=ExternalBytesReceived" json:"ExternalBytesReceived,omitempty"` - FinalUrl *string `protobuf:"bytes,9,opt,name=FinalUrl" json:"FinalUrl,omitempty"` - ApiCpuMilliseconds *int64 `protobuf:"varint,10,opt,name=ApiCpuMilliseconds,def=0" json:"ApiCpuMilliseconds,omitempty"` - ApiBytesSent *int64 `protobuf:"varint,11,opt,name=ApiBytesSent,def=0" json:"ApiBytesSent,omitempty"` - ApiBytesReceived *int64 `protobuf:"varint,12,opt,name=ApiBytesReceived,def=0" json:"ApiBytesReceived,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *URLFetchResponse) Reset() { *m = URLFetchResponse{} } -func (m *URLFetchResponse) String() string { return proto.CompactTextString(m) } -func (*URLFetchResponse) ProtoMessage() {} -func (*URLFetchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2} -} -func (m *URLFetchResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_URLFetchResponse.Unmarshal(m, b) -} -func (m *URLFetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_URLFetchResponse.Marshal(b, m, deterministic) -} -func (dst *URLFetchResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLFetchResponse.Merge(dst, src) -} -func (m *URLFetchResponse) XXX_Size() int { - return xxx_messageInfo_URLFetchResponse.Size(m) -} -func (m *URLFetchResponse) XXX_DiscardUnknown() { - xxx_messageInfo_URLFetchResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_URLFetchResponse proto.InternalMessageInfo - -const Default_URLFetchResponse_ContentWasTruncated bool = false -const Default_URLFetchResponse_ApiCpuMilliseconds int64 = 0 -const Default_URLFetchResponse_ApiBytesSent int64 = 0 -const Default_URLFetchResponse_ApiBytesReceived int64 = 0 - -func (m *URLFetchResponse) GetContent() []byte { - if m != nil { - return m.Content - } - return nil -} - -func (m *URLFetchResponse) GetStatusCode() int32 { - if m != nil && m.StatusCode != nil { - return *m.StatusCode - } - return 0 -} - -func (m *URLFetchResponse) GetHeader() []*URLFetchResponse_Header { - if m != nil { - return m.Header - } - return nil -} - -func (m *URLFetchResponse) GetContentWasTruncated() bool { - if m != nil && m.ContentWasTruncated != nil { - return *m.ContentWasTruncated - } - return Default_URLFetchResponse_ContentWasTruncated -} - -func (m *URLFetchResponse) GetExternalBytesSent() int64 { - if m != nil && m.ExternalBytesSent != nil { - return *m.ExternalBytesSent - } - return 0 -} - -func (m *URLFetchResponse) GetExternalBytesReceived() int64 { - if m != nil && m.ExternalBytesReceived != nil { - return *m.ExternalBytesReceived - } - return 0 -} - -func (m *URLFetchResponse) GetFinalUrl() string { - if m != nil && m.FinalUrl != nil { - return *m.FinalUrl - } - return "" -} - -func (m *URLFetchResponse) GetApiCpuMilliseconds() int64 { - if m != nil && m.ApiCpuMilliseconds != nil { - return *m.ApiCpuMilliseconds - } - return Default_URLFetchResponse_ApiCpuMilliseconds -} - -func (m *URLFetchResponse) GetApiBytesSent() int64 { - if m != nil && m.ApiBytesSent != nil { - return *m.ApiBytesSent - } - return Default_URLFetchResponse_ApiBytesSent -} - -func (m *URLFetchResponse) GetApiBytesReceived() int64 { - if m != nil && m.ApiBytesReceived != nil { - return *m.ApiBytesReceived - } - return Default_URLFetchResponse_ApiBytesReceived -} - -type URLFetchResponse_Header struct { - Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"` - Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *URLFetchResponse_Header) Reset() { *m = URLFetchResponse_Header{} } -func (m *URLFetchResponse_Header) String() string { return proto.CompactTextString(m) } -func (*URLFetchResponse_Header) ProtoMessage() {} -func (*URLFetchResponse_Header) Descriptor() ([]byte, []int) { - return fileDescriptor_urlfetch_service_b245a7065f33bced, []int{2, 0} -} -func (m *URLFetchResponse_Header) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_URLFetchResponse_Header.Unmarshal(m, b) -} -func (m *URLFetchResponse_Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_URLFetchResponse_Header.Marshal(b, m, deterministic) -} -func (dst *URLFetchResponse_Header) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLFetchResponse_Header.Merge(dst, src) -} -func (m *URLFetchResponse_Header) XXX_Size() int { - return xxx_messageInfo_URLFetchResponse_Header.Size(m) -} -func (m *URLFetchResponse_Header) XXX_DiscardUnknown() { - xxx_messageInfo_URLFetchResponse_Header.DiscardUnknown(m) -} - -var xxx_messageInfo_URLFetchResponse_Header proto.InternalMessageInfo - -func (m *URLFetchResponse_Header) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *URLFetchResponse_Header) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value - } - return "" -} - -func init() { - proto.RegisterType((*URLFetchServiceError)(nil), "appengine.URLFetchServiceError") - proto.RegisterType((*URLFetchRequest)(nil), "appengine.URLFetchRequest") - proto.RegisterType((*URLFetchRequest_Header)(nil), "appengine.URLFetchRequest.Header") - proto.RegisterType((*URLFetchResponse)(nil), "appengine.URLFetchResponse") - proto.RegisterType((*URLFetchResponse_Header)(nil), "appengine.URLFetchResponse.Header") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto", fileDescriptor_urlfetch_service_b245a7065f33bced) -} - -var fileDescriptor_urlfetch_service_b245a7065f33bced = []byte{ - // 770 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6e, 0xe3, 0x54, - 0x10, 0xc6, 0x76, 0x7e, 0xa7, 0x5d, 0x7a, 0x76, 0xb6, 0x45, 0x66, 0xb5, 0xa0, 0x10, 0x09, 0x29, - 0x17, 0x90, 0x2e, 0x2b, 0x24, 0x44, 0xaf, 0x70, 0xed, 0x93, 0xad, 0xa9, 0x63, 0x47, 0xc7, 0x4e, - 0x61, 0xb9, 0xb1, 0xac, 0x78, 0x9a, 0x5a, 0xb2, 0xec, 0x60, 0x9f, 0x2c, 0xf4, 0x35, 0x78, 0x0d, - 0xde, 0x87, 0xa7, 0xe1, 0x02, 0x9d, 0xc4, 0xc9, 0x6e, 0xbb, 0xd1, 0x4a, 0x5c, 0x65, 0xe6, 0x9b, - 0xef, 0xcc, 0x99, 0x7c, 0xdf, 0xf8, 0x80, 0xb3, 0x2c, 0xcb, 0x65, 0x4e, 0xe3, 0x65, 0x99, 0x27, - 0xc5, 0x72, 0x5c, 0x56, 0xcb, 0xf3, 0x64, 0xb5, 0xa2, 0x62, 0x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x29, 0xff, 0x73, 0xfb, 0x02, - 0x5c, 0xde, 0x4b, 0xaa, 0x43, 0x35, 0xb8, 0x72, 0xd7, 0x10, 0x1f, 0x16, 0xf0, 0x7b, 0x38, 0x7b, - 0x00, 0x0a, 0x5a, 0x50, 0xf6, 0x96, 0xd2, 0x8d, 0xcd, 0x86, 0x38, 0x5c, 0x54, 0xfb, 0x30, 0xc9, - 0x8a, 0x24, 0x57, 0xfb, 0xaa, 0xec, 0xed, 0x8b, 0x7d, 0x8e, 0xdf, 0x01, 0x5a, 0xab, 0xcc, 0x5e, - 0xad, 0xa7, 0x59, 0x9e, 0x67, 0x35, 0x2d, 0xca, 0x22, 0xad, 0x4d, 0x50, 0xed, 0x2e, 0xb4, 0x97, - 0xe2, 0x40, 0x11, 0xbf, 0x86, 0x63, 0x6b, 0x95, 0xbd, 0x9b, 0xf6, 0x68, 0x47, 0x7e, 0x00, 0xe3, - 0xb7, 0xc0, 0x76, 0xf9, 0x7e, 0xcc, 0xe3, 0x1d, 0xf5, 0x83, 0xd2, 0xff, 0x5f, 0xa6, 0x4b, 0xf8, - 0xad, 0xb7, 0x7b, 0x2a, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x9f, 0x6d, 0x24, 0x63, 0x05, - 0x00, 0x00, -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto b/pkg/k8s/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto deleted file mode 100644 index f695edf6a90..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto +++ /dev/null @@ -1,64 +0,0 @@ -syntax = "proto2"; -option go_package = "urlfetch"; - -package appengine; - -message URLFetchServiceError { - enum ErrorCode { - OK = 0; - INVALID_URL = 1; - FETCH_ERROR = 2; - UNSPECIFIED_ERROR = 3; - RESPONSE_TOO_LARGE = 4; - DEADLINE_EXCEEDED = 5; - SSL_CERTIFICATE_ERROR = 6; - DNS_ERROR = 7; - CLOSED = 8; - INTERNAL_TRANSIENT_ERROR = 9; - TOO_MANY_REDIRECTS = 10; - MALFORMED_REPLY = 11; - CONNECTION_ERROR = 12; - } -} - -message URLFetchRequest { - enum RequestMethod { - GET = 1; - POST = 2; - HEAD = 3; - PUT = 4; - DELETE = 5; - PATCH = 6; - } - required RequestMethod Method = 1; - required string Url = 2; - repeated group Header = 3 { - required string Key = 4; - required string Value = 5; - } - optional bytes Payload = 6 [ctype=CORD]; - - optional bool FollowRedirects = 7 [default=true]; - - optional double Deadline = 8; - - optional bool MustValidateServerCertificate = 9 [default=true]; -} - -message URLFetchResponse { - optional bytes Content = 1; - required int32 StatusCode = 2; - repeated group Header = 3 { - required string Key = 4; - required string Value = 5; - } - optional bool ContentWasTruncated = 6 [default=false]; - optional int64 ExternalBytesSent = 7; - optional int64 ExternalBytesReceived = 8; - - optional string FinalUrl = 9; - - optional int64 ApiCpuMilliseconds = 10 [default=0]; - optional int64 ApiBytesSent = 11 [default=0]; - optional int64 ApiBytesReceived = 12 [default=0]; -} diff --git a/pkg/k8s/vendor/google.golang.org/appengine/urlfetch/urlfetch.go b/pkg/k8s/vendor/google.golang.org/appengine/urlfetch/urlfetch.go deleted file mode 100644 index 6c0d72418d8..00000000000 --- a/pkg/k8s/vendor/google.golang.org/appengine/urlfetch/urlfetch.go +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -// Package urlfetch provides an http.RoundTripper implementation -// for fetching URLs via App Engine's urlfetch service. -package urlfetch // import "google.golang.org/appengine/urlfetch" - -import ( - "context" - "errors" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "strconv" - "strings" - "time" - - "github.com/golang/protobuf/proto" - - "google.golang.org/appengine/internal" - pb "google.golang.org/appengine/internal/urlfetch" -) - -// Transport is an implementation of http.RoundTripper for -// App Engine. Users should generally create an http.Client using -// this transport and use the Client rather than using this transport -// directly. -type Transport struct { - Context context.Context - - // Controls whether the application checks the validity of SSL certificates - // over HTTPS connections. A value of false (the default) instructs the - // application to send a request to the server only if the certificate is - // valid and signed by a trusted certificate authority (CA), and also - // includes a hostname that matches the certificate. A value of true - // instructs the application to perform no certificate validation. - AllowInvalidServerCertificate bool -} - -// Verify statically that *Transport implements http.RoundTripper. -var _ http.RoundTripper = (*Transport)(nil) - -// Client returns an *http.Client using a default urlfetch Transport. This -// client will check the validity of SSL certificates. -// -// Any deadline of the provided context will be used for requests through this client. -// If the client does not have a deadline, then an App Engine default of 60 second is used. -func Client(ctx context.Context) *http.Client { - return &http.Client{ - Transport: &Transport{ - Context: ctx, - }, - } -} - -type bodyReader struct { - content []byte - truncated bool - closed bool -} - -// ErrTruncatedBody is the error returned after the final Read() from a -// response's Body if the body has been truncated by App Engine's proxy. -var ErrTruncatedBody = errors.New("urlfetch: truncated body") - -func statusCodeToText(code int) string { - if t := http.StatusText(code); t != "" { - return t - } - return strconv.Itoa(code) -} - -func (br *bodyReader) Read(p []byte) (n int, err error) { - if br.closed { - if br.truncated { - return 0, ErrTruncatedBody - } - return 0, io.EOF - } - n = copy(p, br.content) - if n > 0 { - br.content = br.content[n:] - return - } - if br.truncated { - br.closed = true - return 0, ErrTruncatedBody - } - return 0, io.EOF -} - -func (br *bodyReader) Close() error { - br.closed = true - br.content = nil - return nil -} - -// A map of the URL Fetch-accepted methods that take a request body. -var methodAcceptsRequestBody = map[string]bool{ - "POST": true, - "PUT": true, - "PATCH": true, -} - -// urlString returns a valid string given a URL. This function is necessary because -// the String method of URL doesn't correctly handle URLs with non-empty Opaque values. -// See http://code.google.com/p/go/issues/detail?id=4860. -func urlString(u *url.URL) string { - if u.Opaque == "" || strings.HasPrefix(u.Opaque, "//") { - return u.String() - } - aux := *u - aux.Opaque = "//" + aux.Host + aux.Opaque - return aux.String() -} - -// RoundTrip issues a single HTTP request and returns its response. Per the -// http.RoundTripper interface, RoundTrip only returns an error if there -// was an unsupported request or the URL Fetch proxy fails. -// Note that HTTP response codes such as 5xx, 403, 404, etc are not -// errors as far as the transport is concerned and will be returned -// with err set to nil. -func (t *Transport) RoundTrip(req *http.Request) (res *http.Response, err error) { - methNum, ok := pb.URLFetchRequest_RequestMethod_value[req.Method] - if !ok { - return nil, fmt.Errorf("urlfetch: unsupported HTTP method %q", req.Method) - } - - method := pb.URLFetchRequest_RequestMethod(methNum) - - freq := &pb.URLFetchRequest{ - Method: &method, - Url: proto.String(urlString(req.URL)), - FollowRedirects: proto.Bool(false), // http.Client's responsibility - MustValidateServerCertificate: proto.Bool(!t.AllowInvalidServerCertificate), - } - if deadline, ok := t.Context.Deadline(); ok { - freq.Deadline = proto.Float64(deadline.Sub(time.Now()).Seconds()) - } - - for k, vals := range req.Header { - for _, val := range vals { - freq.Header = append(freq.Header, &pb.URLFetchRequest_Header{ - Key: proto.String(k), - Value: proto.String(val), - }) - } - } - if methodAcceptsRequestBody[req.Method] && req.Body != nil { - // Avoid a []byte copy if req.Body has a Bytes method. - switch b := req.Body.(type) { - case interface { - Bytes() []byte - }: - freq.Payload = b.Bytes() - default: - freq.Payload, err = ioutil.ReadAll(req.Body) - if err != nil { - return nil, err - } - } - } - - fres := &pb.URLFetchResponse{} - if err := internal.Call(t.Context, "urlfetch", "Fetch", freq, fres); err != nil { - return nil, err - } - - res = &http.Response{} - res.StatusCode = int(*fres.StatusCode) - res.Status = fmt.Sprintf("%d %s", res.StatusCode, statusCodeToText(res.StatusCode)) - res.Header = make(http.Header) - res.Request = req - - // Faked: - res.ProtoMajor = 1 - res.ProtoMinor = 1 - res.Proto = "HTTP/1.1" - res.Close = true - - for _, h := range fres.Header { - hkey := http.CanonicalHeaderKey(*h.Key) - hval := *h.Value - if hkey == "Content-Length" { - // Will get filled in below for all but HEAD requests. - if req.Method == "HEAD" { - res.ContentLength, _ = strconv.ParseInt(hval, 10, 64) - } - continue - } - res.Header.Add(hkey, hval) - } - - if req.Method != "HEAD" { - res.ContentLength = int64(len(fres.Content)) - } - - truncated := fres.GetContentWasTruncated() - res.Body = &bodyReader{content: fres.Content, truncated: truncated} - return -} - -func init() { - internal.RegisterErrorCodeMap("urlfetch", pb.URLFetchServiceError_ErrorCode_name) - internal.RegisterTimeoutErrorCode("urlfetch", int32(pb.URLFetchServiceError_DEADLINE_EXCEEDED)) -} diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/pkg/k8s/vendor/google.golang.org/protobuf/encoding/prototext/decode.go index a45f112bce3..24bc98ac422 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/encoding/prototext/decode.go @@ -84,7 +84,7 @@ type decoder struct { } // newError returns an error object with position info. -func (d decoder) newError(pos int, f string, x ...interface{}) error { +func (d decoder) newError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("(line %d:%d): ", line, column) return errors.New(head+f, x...) @@ -96,7 +96,7 @@ func (d decoder) unexpectedTokenError(tok text.Token) error { } // syntaxError returns a syntax error for given position. -func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { +func (d decoder) syntaxError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("syntax error (line %d:%d): ", line, column) return errors.New(head+f, x...) diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/encoding/prototext/encode.go b/pkg/k8s/vendor/google.golang.org/protobuf/encoding/prototext/encode.go index 95967e8112a..1f57e6610a2 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/encoding/prototext/encode.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/encoding/prototext/encode.go @@ -27,15 +27,17 @@ const defaultIndent = " " // Format formats the message as a multiline string. // This function is only intended for human consumption and ignores errors. -// Do not depend on the output being stable. It may change over time across -// different versions of the program. +// Do not depend on the output being stable. Its output will change across +// different builds of your program, even when using the same version of the +// protobuf module. func Format(m proto.Message) string { return MarshalOptions{Multiline: true}.Format(m) } // Marshal writes the given [proto.Message] in textproto format using default -// options. Do not depend on the output being stable. It may change over time -// across different versions of the program. +// options. Do not depend on the output being stable. Its output will change +// across different builds of your program, even when using the same version of +// the protobuf module. func Marshal(m proto.Message) ([]byte, error) { return MarshalOptions{}.Marshal(m) } @@ -84,8 +86,9 @@ type MarshalOptions struct { // Format formats the message as a string. // This method is only intended for human consumption and ignores errors. -// Do not depend on the output being stable. It may change over time across -// different versions of the program. +// Do not depend on the output being stable. Its output will change across +// different builds of your program, even when using the same version of the +// protobuf module. func (o MarshalOptions) Format(m proto.Message) string { if m == nil || !m.ProtoReflect().IsValid() { return "" // invalid syntax, but okay since this is for debugging @@ -98,8 +101,9 @@ func (o MarshalOptions) Format(m proto.Message) string { } // Marshal writes the given [proto.Message] in textproto format using options in -// MarshalOptions object. Do not depend on the output being stable. It may -// change over time across different versions of the program. +// MarshalOptions object. Do not depend on the output being stable. Its output +// will change across different builds of your program, even when using the +// same version of the protobuf module. func (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) { return o.marshal(nil, m) } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go index a45625c8d1f..87e46bd4dfb 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go @@ -252,6 +252,7 @@ func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool, record fu {rv.MethodByName("Values"), "Values"}, {rv.MethodByName("ReservedNames"), "ReservedNames"}, {rv.MethodByName("ReservedRanges"), "ReservedRanges"}, + {rv.MethodByName("IsClosed"), "IsClosed"}, }...) case protoreflect.EnumValueDescriptor: diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb b/pkg/k8s/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb index 18f0756874367adcdb790ffde125b6a7388b4eaa..ff6a38360add36f53d48bb0863b701696e0d7b2d 100644 GIT binary patch literal 93 zcmd;*mUzal#C*w)K}(Q>QGiK;Nr72|(SYfa9TNv5m$bxlxFnMRqXeS@6Ht;7B*_4j Ve8H{+(u69m1u{(G8N0>{b^xZ!4_5#H literal 63 zcmd-Q6yo7v6kw8IQef6#G+>f=#?A#2ViI7KU{qiN3NcDNhX^qu3B6!fc*d^rf*k<7 Cln3+x diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go new file mode 100644 index 00000000000..029a6a12d74 --- /dev/null +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go @@ -0,0 +1,13 @@ +// Copyright 2024 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 editionssupport defines constants for editions that are supported. +package editionssupport + +import descriptorpb "google.golang.org/protobuf/types/descriptorpb" + +const ( + Minimum = descriptorpb.Edition_EDITION_PROTO2 + Maximum = descriptorpb.Edition_EDITION_2023 +) diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go index 373d208374f..7e87c760443 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go @@ -32,6 +32,7 @@ var byteType = reflect.TypeOf(byte(0)) func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescriptors) protoreflect.FieldDescriptor { f := new(filedesc.Field) f.L0.ParentFile = filedesc.SurrogateProto2 + f.L1.EditionFeatures = f.L0.ParentFile.L1.EditionFeatures for len(tag) > 0 { i := strings.IndexByte(tag, ',') if i < 0 { @@ -107,8 +108,7 @@ func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescri f.L1.StringName.InitJSON(jsonName) } case s == "packed": - f.L1.HasPacked = true - f.L1.IsPacked = true + f.L1.EditionFeatures.IsPacked = true case strings.HasPrefix(s, "weak="): f.L1.IsWeak = true f.L1.Message = filedesc.PlaceholderMessage(protoreflect.FullName(s[len("weak="):])) diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go index 87853e786d0..099b2bf451b 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go @@ -601,7 +601,7 @@ func (d *Decoder) consumeToken(kind Kind, size int, attrs uint8) Token { // newSyntaxError returns a syntax error with line and column information for // current position. -func (d *Decoder) newSyntaxError(f string, x ...interface{}) error { +func (d *Decoder) newSyntaxError(f string, x ...any) error { e := errors.New(f, x...) line, column := d.Position(len(d.orig) - len(d.in)) return errors.New("syntax error (line %d:%d): %v", line, column, e) diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/errors/errors.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/errors/errors.go index 20c17b35e3a..c2d6bd5265d 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/errors/errors.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/errors/errors.go @@ -17,7 +17,7 @@ var Error = errors.New("protobuf error") // New formats a string according to the format specifier and arguments and // returns an error that has a "proto" prefix. -func New(f string, x ...interface{}) error { +func New(f string, x ...any) error { return &prefixError{s: format(f, x...)} } @@ -43,7 +43,7 @@ func (e *prefixError) Unwrap() error { // Wrap returns an error that has a "proto" prefix, the formatted string described // by the format specifier and arguments, and a suffix of err. The error wraps err. -func Wrap(err error, f string, x ...interface{}) error { +func Wrap(err error, f string, x ...any) error { return &wrapError{ s: format(f, x...), err: err, @@ -67,7 +67,7 @@ func (e *wrapError) Is(target error) bool { return target == Error } -func format(f string, x ...interface{}) string { +func format(f string, x ...any) string { // avoid "proto: " prefix when chaining for i := 0; i < len(x); i++ { switch e := x[i].(type) { @@ -87,3 +87,18 @@ func InvalidUTF8(name string) error { func RequiredNotSet(name string) error { return New("required field %v not set", name) } + +type SizeMismatchError struct { + Calculated, Measured int +} + +func (e *SizeMismatchError) Error() string { + return fmt.Sprintf("size mismatch (see https://github.com/golang/protobuf/issues/1609): calculated=%d, measured=%d", e.Calculated, e.Measured) +} + +func MismatchedSizeCalculation(calculated, measured int) error { + return &SizeMismatchError{ + Calculated: calculated, + Measured: measured, + } +} diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index 8826bcf4021..df53ff40b25 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -7,6 +7,7 @@ package filedesc import ( "bytes" "fmt" + "strings" "sync" "sync/atomic" @@ -108,9 +109,12 @@ func (fd *File) ParentFile() protoreflect.FileDescriptor { return fd } func (fd *File) Parent() protoreflect.Descriptor { return nil } func (fd *File) Index() int { return 0 } func (fd *File) Syntax() protoreflect.Syntax { return fd.L1.Syntax } -func (fd *File) Name() protoreflect.Name { return fd.L1.Package.Name() } -func (fd *File) FullName() protoreflect.FullName { return fd.L1.Package } -func (fd *File) IsPlaceholder() bool { return false } + +// Not exported and just used to reconstruct the original FileDescriptor proto +func (fd *File) Edition() int32 { return int32(fd.L1.Edition) } +func (fd *File) Name() protoreflect.Name { return fd.L1.Package.Name() } +func (fd *File) FullName() protoreflect.FullName { return fd.L1.Package } +func (fd *File) IsPlaceholder() bool { return false } func (fd *File) Options() protoreflect.ProtoMessage { if f := fd.lazyInit().Options; f != nil { return f() @@ -202,6 +206,9 @@ func (ed *Enum) lazyInit() *EnumL2 { ed.L0.ParentFile.lazyInit() // implicitly initializes L2 return ed.L2 } +func (ed *Enum) IsClosed() bool { + return !ed.L1.EditionFeatures.IsOpenEnum +} func (ed *EnumValue) Options() protoreflect.ProtoMessage { if f := ed.L1.Options; f != nil { @@ -251,10 +258,6 @@ type ( StringName stringName IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto IsWeak bool // promoted from google.protobuf.FieldOptions - HasPacked bool // promoted from google.protobuf.FieldOptions - IsPacked bool // promoted from google.protobuf.FieldOptions - HasEnforceUTF8 bool // promoted from google.protobuf.FieldOptions - EnforceUTF8 bool // promoted from google.protobuf.FieldOptions Default defaultValue ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields Enum protoreflect.EnumDescriptor @@ -331,8 +334,7 @@ func (fd *Field) HasPresence() bool { if fd.L1.Cardinality == protoreflect.Repeated { return false } - explicitFieldPresence := fd.Syntax() == protoreflect.Editions && fd.L1.EditionFeatures.IsFieldPresence - return fd.Syntax() == protoreflect.Proto2 || explicitFieldPresence || fd.L1.Message != nil || fd.L1.ContainingOneof != nil + return fd.IsExtension() || fd.L1.EditionFeatures.IsFieldPresence || fd.L1.Message != nil || fd.L1.ContainingOneof != nil } func (fd *Field) HasOptionalKeyword() bool { return (fd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && fd.L1.Cardinality == protoreflect.Optional && fd.L1.ContainingOneof == nil) || fd.L1.IsProto3Optional @@ -345,14 +347,7 @@ func (fd *Field) IsPacked() bool { case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind: return false } - if fd.L0.ParentFile.L1.Syntax == protoreflect.Editions { - return fd.L1.EditionFeatures.IsPacked - } - if fd.L0.ParentFile.L1.Syntax == protoreflect.Proto3 { - // proto3 repeated fields are packed by default. - return !fd.L1.HasPacked || fd.L1.IsPacked - } - return fd.L1.IsPacked + return fd.L1.EditionFeatures.IsPacked } func (fd *Field) IsExtension() bool { return false } func (fd *Field) IsWeak() bool { return fd.L1.IsWeak } @@ -388,6 +383,10 @@ func (fd *Field) Message() protoreflect.MessageDescriptor { } return fd.L1.Message } +func (fd *Field) IsMapEntry() bool { + parent, ok := fd.L0.Parent.(protoreflect.MessageDescriptor) + return ok && parent.IsMapEntry() +} func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) } func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {} @@ -399,13 +398,7 @@ func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {} // WARNING: This method is exempt from the compatibility promise and may be // removed in the future without warning. func (fd *Field) EnforceUTF8() bool { - if fd.L0.ParentFile.L1.Syntax == protoreflect.Editions { - return fd.L1.EditionFeatures.IsUTF8Validated - } - if fd.L1.HasEnforceUTF8 { - return fd.L1.EnforceUTF8 - } - return fd.L0.ParentFile.L1.Syntax == protoreflect.Proto3 + return fd.L1.EditionFeatures.IsUTF8Validated } func (od *Oneof) IsSynthetic() bool { @@ -438,7 +431,6 @@ type ( Options func() protoreflect.ProtoMessage StringName stringName IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto - IsPacked bool // promoted from google.protobuf.FieldOptions Default defaultValue Enum protoreflect.EnumDescriptor Message protoreflect.MessageDescriptor @@ -461,7 +453,16 @@ func (xd *Extension) HasPresence() bool { return xd.L1.Cardi func (xd *Extension) HasOptionalKeyword() bool { return (xd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && xd.L1.Cardinality == protoreflect.Optional) || xd.lazyInit().IsProto3Optional } -func (xd *Extension) IsPacked() bool { return xd.lazyInit().IsPacked } +func (xd *Extension) IsPacked() bool { + if xd.L1.Cardinality != protoreflect.Repeated { + return false + } + switch xd.L1.Kind { + case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind: + return false + } + return xd.L1.EditionFeatures.IsPacked +} func (xd *Extension) IsExtension() bool { return true } func (xd *Extension) IsWeak() bool { return false } func (xd *Extension) IsList() bool { return xd.Cardinality() == protoreflect.Repeated } @@ -542,8 +543,9 @@ func (md *Method) ProtoInternal(pragma.DoNotImplement) {} // Surrogate files are can be used to create standalone descriptors // where the syntax is only information derived from the parent file. var ( - SurrogateProto2 = &File{L1: FileL1{Syntax: protoreflect.Proto2}, L2: &FileL2{}} - SurrogateProto3 = &File{L1: FileL1{Syntax: protoreflect.Proto3}, L2: &FileL2{}} + SurrogateProto2 = &File{L1: FileL1{Syntax: protoreflect.Proto2}, L2: &FileL2{}} + SurrogateProto3 = &File{L1: FileL1{Syntax: protoreflect.Proto3}, L2: &FileL2{}} + SurrogateEdition2023 = &File{L1: FileL1{Syntax: protoreflect.Editions, Edition: Edition2023}, L2: &FileL2{}} ) type ( @@ -585,6 +587,34 @@ func (s *stringName) InitJSON(name string) { s.nameJSON = name } +// Returns true if this field is structured like the synthetic field of a proto2 +// group. This allows us to expand our treatment of delimited fields without +// breaking proto2 files that have been upgraded to editions. +func isGroupLike(fd protoreflect.FieldDescriptor) bool { + // Groups are always group types. + if fd.Kind() != protoreflect.GroupKind { + return false + } + + // Group fields are always the lowercase type name. + if strings.ToLower(string(fd.Message().Name())) != string(fd.Name()) { + return false + } + + // Groups could only be defined in the same file they're used. + if fd.Message().ParentFile() != fd.ParentFile() { + return false + } + + // Group messages are always defined in the same scope as the field. File + // level extensions will compare NULL == NULL here, which is why the file + // comparison above is necessary to ensure both come from the same file. + if fd.IsExtension() { + return fd.Parent() == fd.Message().Parent() + } + return fd.ContainingMessage() == fd.Message().Parent() +} + func (s *stringName) lazyInit(fd protoreflect.FieldDescriptor) *stringName { s.once.Do(func() { if fd.IsExtension() { @@ -605,7 +635,7 @@ func (s *stringName) lazyInit(fd protoreflect.FieldDescriptor) *stringName { // Format the text name. s.nameText = string(fd.Name()) - if fd.Kind() == protoreflect.GroupKind { + if isGroupLike(fd) { s.nameText = string(fd.Message().Name()) } } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go index 237e64fd237..8a57d60b08c 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go @@ -113,8 +113,10 @@ func (fd *File) unmarshalSeed(b []byte) { switch string(v) { case "proto2": fd.L1.Syntax = protoreflect.Proto2 + fd.L1.Edition = EditionProto2 case "proto3": fd.L1.Syntax = protoreflect.Proto3 + fd.L1.Edition = EditionProto3 case "editions": fd.L1.Syntax = protoreflect.Editions default: @@ -177,11 +179,10 @@ func (fd *File) unmarshalSeed(b []byte) { // If syntax is missing, it is assumed to be proto2. if fd.L1.Syntax == 0 { fd.L1.Syntax = protoreflect.Proto2 + fd.L1.Edition = EditionProto2 } - if fd.L1.Syntax == protoreflect.Editions { - fd.L1.EditionFeatures = getFeaturesFor(fd.L1.Edition) - } + fd.L1.EditionFeatures = getFeaturesFor(fd.L1.Edition) // Parse editions features from options if any if options != nil { @@ -267,6 +268,7 @@ func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protorefl ed.L0.ParentFile = pf ed.L0.Parent = pd ed.L0.Index = i + ed.L1.EditionFeatures = featuresFromParentDesc(ed.Parent()) var numValues int for b := b; len(b) > 0; { @@ -443,6 +445,7 @@ func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd prot xd.L0.ParentFile = pf xd.L0.Parent = pd xd.L0.Index = i + xd.L1.EditionFeatures = featuresFromParentDesc(pd) for len(b) > 0 { num, typ, n := protowire.ConsumeTag(b) @@ -467,6 +470,38 @@ func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd prot xd.L0.FullName = appendFullName(sb, pd.FullName(), v) case genid.FieldDescriptorProto_Extendee_field_number: xd.L1.Extendee = PlaceholderMessage(makeFullName(sb, v)) + case genid.FieldDescriptorProto_Options_field_number: + xd.unmarshalOptions(v) + } + default: + m := protowire.ConsumeFieldValue(num, typ, b) + b = b[m:] + } + } + + if xd.L1.Kind == protoreflect.MessageKind && xd.L1.EditionFeatures.IsDelimitedEncoded { + xd.L1.Kind = protoreflect.GroupKind + } +} + +func (xd *Extension) unmarshalOptions(b []byte) { + for len(b) > 0 { + num, typ, n := protowire.ConsumeTag(b) + b = b[n:] + switch typ { + case protowire.VarintType: + v, m := protowire.ConsumeVarint(b) + b = b[m:] + switch num { + case genid.FieldOptions_Packed_field_number: + xd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v) + } + case protowire.BytesType: + v, m := protowire.ConsumeBytes(b) + b = b[m:] + switch num { + case genid.FieldOptions_Features_field_number: + xd.L1.EditionFeatures = unmarshalFeatureSet(v, xd.L1.EditionFeatures) } default: m := protowire.ConsumeFieldValue(num, typ, b) @@ -499,7 +534,7 @@ func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protor } var nameBuilderPool = sync.Pool{ - New: func() interface{} { return new(strs.Builder) }, + New: func() any { return new(strs.Builder) }, } func getBuilder() *strs.Builder { diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go index 482a61cc10e..e56c91a8dbe 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go @@ -45,6 +45,11 @@ func (file *File) resolveMessages() { case protoreflect.MessageKind, protoreflect.GroupKind: fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx) depIdx++ + if fd.L1.Kind == protoreflect.GroupKind && (fd.IsMap() || fd.IsMapEntry()) { + // A map field might inherit delimited encoding from a file-wide default feature. + // But maps never actually use delimited encoding. (At least for now...) + fd.L1.Kind = protoreflect.MessageKind + } } // Default is resolved here since it depends on Enum being resolved. @@ -466,10 +471,10 @@ func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoref b = b[m:] } } - if fd.Syntax() == protoreflect.Editions && fd.L1.Kind == protoreflect.MessageKind && fd.L1.EditionFeatures.IsDelimitedEncoded { + if fd.L1.Kind == protoreflect.MessageKind && fd.L1.EditionFeatures.IsDelimitedEncoded { fd.L1.Kind = protoreflect.GroupKind } - if fd.Syntax() == protoreflect.Editions && fd.L1.EditionFeatures.IsLegacyRequired { + if fd.L1.EditionFeatures.IsLegacyRequired { fd.L1.Cardinality = protoreflect.Required } if rawTypeName != nil { @@ -496,13 +501,11 @@ func (fd *Field) unmarshalOptions(b []byte) { b = b[m:] switch num { case genid.FieldOptions_Packed_field_number: - fd.L1.HasPacked = true - fd.L1.IsPacked = protowire.DecodeBool(v) + fd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v) case genid.FieldOptions_Weak_field_number: fd.L1.IsWeak = protowire.DecodeBool(v) case FieldOptions_EnforceUTF8: - fd.L1.HasEnforceUTF8 = true - fd.L1.EnforceUTF8 = protowire.DecodeBool(v) + fd.L1.EditionFeatures.IsUTF8Validated = protowire.DecodeBool(v) } case protowire.BytesType: v, m := protowire.ConsumeBytes(b) @@ -548,7 +551,6 @@ func (od *Oneof) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoref func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { var rawTypeName []byte var rawOptions []byte - xd.L1.EditionFeatures = featuresFromParentDesc(xd.L1.Extendee) xd.L2 = new(ExtensionL2) for len(b) > 0 { num, typ, n := protowire.ConsumeTag(b) @@ -572,7 +574,6 @@ func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { case genid.FieldDescriptorProto_TypeName_field_number: rawTypeName = v case genid.FieldDescriptorProto_Options_field_number: - xd.unmarshalOptions(v) rawOptions = appendOptions(rawOptions, v) } default: @@ -580,12 +581,6 @@ func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { b = b[m:] } } - if xd.Syntax() == protoreflect.Editions && xd.L1.Kind == protoreflect.MessageKind && xd.L1.EditionFeatures.IsDelimitedEncoded { - xd.L1.Kind = protoreflect.GroupKind - } - if xd.Syntax() == protoreflect.Editions && xd.L1.EditionFeatures.IsLegacyRequired { - xd.L1.Cardinality = protoreflect.Required - } if rawTypeName != nil { name := makeFullName(sb, rawTypeName) switch xd.L1.Kind { @@ -598,32 +593,6 @@ func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { xd.L2.Options = xd.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Field, rawOptions) } -func (xd *Extension) unmarshalOptions(b []byte) { - for len(b) > 0 { - num, typ, n := protowire.ConsumeTag(b) - b = b[n:] - switch typ { - case protowire.VarintType: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - switch num { - case genid.FieldOptions_Packed_field_number: - xd.L2.IsPacked = protowire.DecodeBool(v) - } - case protowire.BytesType: - v, m := protowire.ConsumeBytes(b) - b = b[m:] - switch num { - case genid.FieldOptions_Features_field_number: - xd.L1.EditionFeatures = unmarshalFeatureSet(v, xd.L1.EditionFeatures) - } - default: - m := protowire.ConsumeFieldValue(num, typ, b) - b = b[m:] - } - } -} - func (sd *Service) unmarshalFull(b []byte, sb *strs.Builder) { var rawMethods [][]byte var rawOptions []byte diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go index 30db19fdc75..f4107c05f4e 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go @@ -8,6 +8,7 @@ package filedesc import ( "fmt" + "strings" "sync" "google.golang.org/protobuf/internal/descfmt" @@ -198,6 +199,16 @@ func (p *Fields) lazyInit() *Fields { if _, ok := p.byText[d.TextName()]; !ok { p.byText[d.TextName()] = d } + if isGroupLike(d) { + lowerJSONName := strings.ToLower(d.JSONName()) + if _, ok := p.byJSON[lowerJSONName]; !ok { + p.byJSON[lowerJSONName] = d + } + lowerTextName := strings.ToLower(d.TextName()) + if _, ok := p.byText[lowerTextName]; !ok { + p.byText[lowerTextName] = d + } + } if _, ok := p.byNum[d.Number()]; !ok { p.byNum[d.Number()] = d } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/editions.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/editions.go index 0375a49d407..11f5f356b66 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/editions.go @@ -14,9 +14,13 @@ import ( ) var defaultsCache = make(map[Edition]EditionFeatures) +var defaultsKeys = []Edition{} func init() { unmarshalEditionDefaults(editiondefaults.Defaults) + SurrogateProto2.L1.EditionFeatures = getFeaturesFor(EditionProto2) + SurrogateProto3.L1.EditionFeatures = getFeaturesFor(EditionProto3) + SurrogateEdition2023.L1.EditionFeatures = getFeaturesFor(Edition2023) } func unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures { @@ -104,12 +108,15 @@ func unmarshalEditionDefault(b []byte) { v, m := protowire.ConsumeBytes(b) b = b[m:] switch num { - case genid.FeatureSetDefaults_FeatureSetEditionDefault_Features_field_number: + case genid.FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_number: + fs = unmarshalFeatureSet(v, fs) + case genid.FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_number: fs = unmarshalFeatureSet(v, fs) } } } defaultsCache[ed] = fs + defaultsKeys = append(defaultsKeys, ed) } func unmarshalEditionDefaults(b []byte) { @@ -135,8 +142,15 @@ func unmarshalEditionDefaults(b []byte) { } func getFeaturesFor(ed Edition) EditionFeatures { - if def, ok := defaultsCache[ed]; ok { - return def + match := EditionUnknown + for _, key := range defaultsKeys { + if key > ed { + break + } + match = key + } + if match == EditionUnknown { + panic(fmt.Sprintf("unsupported edition: %v", ed)) } - panic(fmt.Sprintf("unsupported edition: %v", ed)) + return defaultsCache[match] } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go index 28240ebc5c4..bfb3b841704 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go @@ -63,6 +63,7 @@ func (e PlaceholderEnum) Options() protoreflect.ProtoMessage { return des func (e PlaceholderEnum) Values() protoreflect.EnumValueDescriptors { return emptyEnumValues } func (e PlaceholderEnum) ReservedNames() protoreflect.Names { return emptyNames } func (e PlaceholderEnum) ReservedRanges() protoreflect.EnumRanges { return emptyEnumRanges } +func (e PlaceholderEnum) IsClosed() bool { return false } func (e PlaceholderEnum) ProtoType(protoreflect.EnumDescriptor) { return } func (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement) { return } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filetype/build.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filetype/build.go index f0e38c4ef4e..ba83fea44c3 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/filetype/build.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/filetype/build.go @@ -68,7 +68,7 @@ type Builder struct { // and for input and output messages referenced by service methods. // Dependencies must come after declarations, but the ordering of // dependencies themselves is unspecified. - GoTypes []interface{} + GoTypes []any // DependencyIndexes is an ordered list of indexes into GoTypes for the // dependencies of messages, extensions, or services. @@ -268,7 +268,7 @@ func (x depIdxs) Get(i, j int32) int32 { type ( resolverByIndex struct { - goTypes []interface{} + goTypes []any depIdxs depIdxs fileRegistry } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go index 40272c893f7..f30ab6b586f 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go @@ -21,6 +21,7 @@ const ( // Enum values for google.protobuf.Edition. const ( Edition_EDITION_UNKNOWN_enum_value = 0 + Edition_EDITION_LEGACY_enum_value = 900 Edition_EDITION_PROTO2_enum_value = 998 Edition_EDITION_PROTO3_enum_value = 999 Edition_EDITION_2023_enum_value = 1000 @@ -653,6 +654,7 @@ const ( FieldOptions_Targets_field_name protoreflect.Name = "targets" FieldOptions_EditionDefaults_field_name protoreflect.Name = "edition_defaults" FieldOptions_Features_field_name protoreflect.Name = "features" + FieldOptions_FeatureSupport_field_name protoreflect.Name = "feature_support" FieldOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" FieldOptions_Ctype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.ctype" @@ -667,6 +669,7 @@ const ( FieldOptions_Targets_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.targets" FieldOptions_EditionDefaults_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.edition_defaults" FieldOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.features" + FieldOptions_FeatureSupport_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.feature_support" FieldOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.uninterpreted_option" ) @@ -684,6 +687,7 @@ const ( FieldOptions_Targets_field_number protoreflect.FieldNumber = 19 FieldOptions_EditionDefaults_field_number protoreflect.FieldNumber = 20 FieldOptions_Features_field_number protoreflect.FieldNumber = 21 + FieldOptions_FeatureSupport_field_number protoreflect.FieldNumber = 22 FieldOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) @@ -767,6 +771,33 @@ const ( FieldOptions_EditionDefault_Value_field_number protoreflect.FieldNumber = 2 ) +// Names for google.protobuf.FieldOptions.FeatureSupport. +const ( + FieldOptions_FeatureSupport_message_name protoreflect.Name = "FeatureSupport" + FieldOptions_FeatureSupport_message_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport" +) + +// Field names for google.protobuf.FieldOptions.FeatureSupport. +const ( + FieldOptions_FeatureSupport_EditionIntroduced_field_name protoreflect.Name = "edition_introduced" + FieldOptions_FeatureSupport_EditionDeprecated_field_name protoreflect.Name = "edition_deprecated" + FieldOptions_FeatureSupport_DeprecationWarning_field_name protoreflect.Name = "deprecation_warning" + FieldOptions_FeatureSupport_EditionRemoved_field_name protoreflect.Name = "edition_removed" + + FieldOptions_FeatureSupport_EditionIntroduced_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_introduced" + FieldOptions_FeatureSupport_EditionDeprecated_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_deprecated" + FieldOptions_FeatureSupport_DeprecationWarning_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.deprecation_warning" + FieldOptions_FeatureSupport_EditionRemoved_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_removed" +) + +// Field numbers for google.protobuf.FieldOptions.FeatureSupport. +const ( + FieldOptions_FeatureSupport_EditionIntroduced_field_number protoreflect.FieldNumber = 1 + FieldOptions_FeatureSupport_EditionDeprecated_field_number protoreflect.FieldNumber = 2 + FieldOptions_FeatureSupport_DeprecationWarning_field_number protoreflect.FieldNumber = 3 + FieldOptions_FeatureSupport_EditionRemoved_field_number protoreflect.FieldNumber = 4 +) + // Names for google.protobuf.OneofOptions. const ( OneofOptions_message_name protoreflect.Name = "OneofOptions" @@ -829,11 +860,13 @@ const ( EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated" EnumValueOptions_Features_field_name protoreflect.Name = "features" EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact" + EnumValueOptions_FeatureSupport_field_name protoreflect.Name = "feature_support" EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated" EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features" EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact" + EnumValueOptions_FeatureSupport_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.feature_support" EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option" ) @@ -842,6 +875,7 @@ const ( EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1 EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2 EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3 + EnumValueOptions_FeatureSupport_field_number protoreflect.FieldNumber = 4 EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) @@ -1110,17 +1144,20 @@ const ( // Field names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. const ( - FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_name protoreflect.Name = "edition" - FeatureSetDefaults_FeatureSetEditionDefault_Features_field_name protoreflect.Name = "features" + FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_name protoreflect.Name = "edition" + FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_name protoreflect.Name = "overridable_features" + FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_name protoreflect.Name = "fixed_features" - FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition" - FeatureSetDefaults_FeatureSetEditionDefault_Features_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features" + FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition" + FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features" + FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features" ) // Field numbers for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. const ( - FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number protoreflect.FieldNumber = 3 - FeatureSetDefaults_FeatureSetEditionDefault_Features_field_number protoreflect.FieldNumber = 2 + FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number protoreflect.FieldNumber = 3 + FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_number protoreflect.FieldNumber = 4 + FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_number protoreflect.FieldNumber = 5 ) // Names for google.protobuf.SourceCodeInfo. diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go index fd9015e8eee..9a652a2b424 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go @@ -10,7 +10,7 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" ) -const File_reflect_protodesc_proto_go_features_proto = "reflect/protodesc/proto/go_features.proto" +const File_google_protobuf_go_features_proto = "google/protobuf/go_features.proto" // Names for google.protobuf.GoFeatures. const ( diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/api_export.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/api_export.go index a371f98de14..5d5771c2ed5 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/api_export.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/api_export.go @@ -22,13 +22,13 @@ type Export struct{} // NewError formats a string according to the format specifier and arguments and // returns an error that has a "proto" prefix. -func (Export) NewError(f string, x ...interface{}) error { +func (Export) NewError(f string, x ...any) error { return errors.New(f, x...) } // enum is any enum type generated by protoc-gen-go // and must be a named int32 type. -type enum = interface{} +type enum = any // EnumOf returns the protoreflect.Enum interface over e. // It returns nil if e is nil. @@ -81,7 +81,7 @@ func (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNu // message is any message type generated by protoc-gen-go // and must be a pointer to a named struct type. -type message = interface{} +type message = any // legacyMessageWrapper wraps a v2 message as a v1 message. type legacyMessageWrapper struct{ m protoreflect.ProtoMessage } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/checkinit.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/checkinit.go index bff041edc94..f29e6a8fa88 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/checkinit.go @@ -68,7 +68,7 @@ func (mi *MessageInfo) isInitExtensions(ext *map[int32]ExtensionField) error { } for _, x := range *ext { ei := getExtensionFieldInfo(x.Type()) - if ei.funcs.isInit == nil { + if ei.funcs.isInit == nil || x.isUnexpandedLazy() { continue } v := x.Value() diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go index 2b8f122c27b..4bb0a7a20ce 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go @@ -99,6 +99,28 @@ func (f *ExtensionField) canLazy(xt protoreflect.ExtensionType) bool { return false } +// isUnexpandedLazy returns true if the ExensionField is lazy and not +// yet expanded, which means it's present and already checked for +// initialized required fields. +func (f *ExtensionField) isUnexpandedLazy() bool { + return f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0 +} + +// lazyBuffer retrieves the buffer for a lazy extension if it's not yet expanded. +// +// The returned buffer has to be kept over whatever operation we're planning, +// as re-retrieving it will fail after the message is lazily decoded. +func (f *ExtensionField) lazyBuffer() []byte { + // This function might be in the critical path, so check the atomic without + // taking a look first, then only take the lock if needed. + if !f.isUnexpandedLazy() { + return nil + } + f.lazy.mu.Lock() + defer f.lazy.mu.Unlock() + return f.lazy.b +} + func (f *ExtensionField) lazyInit() { f.lazy.mu.Lock() defer f.lazy.mu.Unlock() diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_field.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_field.go index 3fadd241e1c..78ee47e44b9 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_field.go @@ -233,9 +233,15 @@ func sizeMessageInfo(p pointer, f *coderFieldInfo, opts marshalOptions) int { } func appendMessageInfo(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { + calculatedSize := f.mi.sizePointer(p.Elem(), opts) b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(f.mi.sizePointer(p.Elem(), opts))) - return f.mi.marshalAppendPointer(b, p.Elem(), opts) + b = protowire.AppendVarint(b, uint64(calculatedSize)) + before := len(b) + b, err := f.mi.marshalAppendPointer(b, p.Elem(), opts) + if measuredSize := len(b) - before; calculatedSize != measuredSize && err == nil { + return nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize) + } + return b, err } func consumeMessageInfo(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { @@ -262,14 +268,21 @@ func isInitMessageInfo(p pointer, f *coderFieldInfo) error { return f.mi.checkInitializedPointer(p.Elem()) } -func sizeMessage(m proto.Message, tagsize int, _ marshalOptions) int { - return protowire.SizeBytes(proto.Size(m)) + tagsize +func sizeMessage(m proto.Message, tagsize int, opts marshalOptions) int { + return protowire.SizeBytes(opts.Options().Size(m)) + tagsize } func appendMessage(b []byte, m proto.Message, wiretag uint64, opts marshalOptions) ([]byte, error) { + mopts := opts.Options() + calculatedSize := mopts.Size(m) b = protowire.AppendVarint(b, wiretag) - b = protowire.AppendVarint(b, uint64(proto.Size(m))) - return opts.Options().MarshalAppend(b, m) + b = protowire.AppendVarint(b, uint64(calculatedSize)) + before := len(b) + b, err := mopts.MarshalAppend(b, m) + if measuredSize := len(b) - before; calculatedSize != measuredSize && err == nil { + return nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize) + } + return b, err } func consumeMessage(b []byte, m proto.Message, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, err error) { @@ -405,8 +418,8 @@ func consumeGroupType(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInf return f.mi.unmarshalPointer(b, p.Elem(), f.num, opts) } -func sizeGroup(m proto.Message, tagsize int, _ marshalOptions) int { - return 2*tagsize + proto.Size(m) +func sizeGroup(m proto.Message, tagsize int, opts marshalOptions) int { + return 2*tagsize + opts.Options().Size(m) } func appendGroup(b []byte, m proto.Message, wiretag uint64, opts marshalOptions) ([]byte, error) { @@ -482,10 +495,14 @@ func appendMessageSliceInfo(b []byte, p pointer, f *coderFieldInfo, opts marshal b = protowire.AppendVarint(b, f.wiretag) siz := f.mi.sizePointer(v, opts) b = protowire.AppendVarint(b, uint64(siz)) + before := len(b) b, err = f.mi.marshalAppendPointer(b, v, opts) if err != nil { return b, err } + if measuredSize := len(b) - before; siz != measuredSize { + return nil, errors.MismatchedSizeCalculation(siz, measuredSize) + } } return b, nil } @@ -520,28 +537,34 @@ func isInitMessageSliceInfo(p pointer, f *coderFieldInfo) error { return nil } -func sizeMessageSlice(p pointer, goType reflect.Type, tagsize int, _ marshalOptions) int { +func sizeMessageSlice(p pointer, goType reflect.Type, tagsize int, opts marshalOptions) int { + mopts := opts.Options() s := p.PointerSlice() n := 0 for _, v := range s { m := asMessage(v.AsValueOf(goType.Elem())) - n += protowire.SizeBytes(proto.Size(m)) + tagsize + n += protowire.SizeBytes(mopts.Size(m)) + tagsize } return n } func appendMessageSlice(b []byte, p pointer, wiretag uint64, goType reflect.Type, opts marshalOptions) ([]byte, error) { + mopts := opts.Options() s := p.PointerSlice() var err error for _, v := range s { m := asMessage(v.AsValueOf(goType.Elem())) b = protowire.AppendVarint(b, wiretag) - siz := proto.Size(m) + siz := mopts.Size(m) b = protowire.AppendVarint(b, uint64(siz)) - b, err = opts.Options().MarshalAppend(b, m) + before := len(b) + b, err = mopts.MarshalAppend(b, m) if err != nil { return b, err } + if measuredSize := len(b) - before; siz != measuredSize { + return nil, errors.MismatchedSizeCalculation(siz, measuredSize) + } } return b, nil } @@ -582,11 +605,12 @@ func isInitMessageSlice(p pointer, goType reflect.Type) error { // Slices of messages func sizeMessageSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int { + mopts := opts.Options() list := listv.List() n := 0 for i, llen := 0, list.Len(); i < llen; i++ { m := list.Get(i).Message().Interface() - n += protowire.SizeBytes(proto.Size(m)) + tagsize + n += protowire.SizeBytes(mopts.Size(m)) + tagsize } return n } @@ -597,13 +621,17 @@ func appendMessageSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, for i, llen := 0, list.Len(); i < llen; i++ { m := list.Get(i).Message().Interface() b = protowire.AppendVarint(b, wiretag) - siz := proto.Size(m) + siz := mopts.Size(m) b = protowire.AppendVarint(b, uint64(siz)) + before := len(b) var err error b, err = mopts.MarshalAppend(b, m) if err != nil { return b, err } + if measuredSize := len(b) - before; siz != measuredSize { + return nil, errors.MismatchedSizeCalculation(siz, measuredSize) + } } return b, nil } @@ -651,11 +679,12 @@ var coderMessageSliceValue = valueCoderFuncs{ } func sizeGroupSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int { + mopts := opts.Options() list := listv.List() n := 0 for i, llen := 0, list.Len(); i < llen; i++ { m := list.Get(i).Message().Interface() - n += 2*tagsize + proto.Size(m) + n += 2*tagsize + mopts.Size(m) } return n } @@ -738,12 +767,13 @@ func makeGroupSliceFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) } } -func sizeGroupSlice(p pointer, messageType reflect.Type, tagsize int, _ marshalOptions) int { +func sizeGroupSlice(p pointer, messageType reflect.Type, tagsize int, opts marshalOptions) int { + mopts := opts.Options() s := p.PointerSlice() n := 0 for _, v := range s { m := asMessage(v.AsValueOf(messageType.Elem())) - n += 2*tagsize + proto.Size(m) + n += 2*tagsize + mopts.Size(m) } return n } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_map.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_map.go index 111b9d16f99..fb35f0bae9c 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_map.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_map.go @@ -9,6 +9,7 @@ import ( "sort" "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/reflect/protoreflect" ) @@ -240,11 +241,16 @@ func appendMapItem(b []byte, keyrv, valrv reflect.Value, mapi *mapInfo, f *coder size += mapi.keyFuncs.size(key.Value(), mapKeyTagSize, opts) size += mapi.valFuncs.size(val, mapValTagSize, opts) b = protowire.AppendVarint(b, uint64(size)) + before := len(b) b, err := mapi.keyFuncs.marshal(b, key.Value(), mapi.keyWiretag, opts) if err != nil { return nil, err } - return mapi.valFuncs.marshal(b, val, mapi.valWiretag, opts) + b, err = mapi.valFuncs.marshal(b, val, mapi.valWiretag, opts) + if measuredSize := len(b) - before; size != measuredSize && err == nil { + return nil, errors.MismatchedSizeCalculation(size, measuredSize) + } + return b, err } else { key := mapi.conv.keyConv.PBValueOf(keyrv).MapKey() val := pointerOfValue(valrv) @@ -259,7 +265,12 @@ func appendMapItem(b []byte, keyrv, valrv reflect.Value, mapi *mapInfo, f *coder } b = protowire.AppendVarint(b, mapi.valWiretag) b = protowire.AppendVarint(b, uint64(valSize)) - return f.mi.marshalAppendPointer(b, val, opts) + before := len(b) + b, err = f.mi.marshalAppendPointer(b, val, opts) + if measuredSize := len(b) - before; valSize != measuredSize && err == nil { + return nil, errors.MismatchedSizeCalculation(valSize, measuredSize) + } + return b, err } } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go index b7a23faf1e4..7a16ec13dd1 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go @@ -26,6 +26,15 @@ func sizeMessageSet(mi *MessageInfo, p pointer, opts marshalOptions) (size int) } num, _ := protowire.DecodeTag(xi.wiretag) size += messageset.SizeField(num) + if fullyLazyExtensions(opts) { + // Don't expand the extension, instead use the buffer to calculate size + if lb := x.lazyBuffer(); lb != nil { + // We got hold of the buffer, so it's still lazy. + // Don't count the tag size in the extension buffer, it's already added. + size += protowire.SizeTag(messageset.FieldMessage) + len(lb) - xi.tagsize + continue + } + } size += xi.funcs.size(x.Value(), protowire.SizeTag(messageset.FieldMessage), opts) } @@ -85,6 +94,19 @@ func marshalMessageSetField(mi *MessageInfo, b []byte, x ExtensionField, opts ma xi := getExtensionFieldInfo(x.Type()) num, _ := protowire.DecodeTag(xi.wiretag) b = messageset.AppendFieldStart(b, num) + + if fullyLazyExtensions(opts) { + // Don't expand the extension if it's still in wire format, instead use the buffer content. + if lb := x.lazyBuffer(); lb != nil { + // The tag inside the lazy buffer is a different tag (the extension + // number), but what we need here is the tag for FieldMessage: + b = protowire.AppendVarint(b, protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType)) + b = append(b, lb[xi.tagsize:]...) + b = messageset.AppendFieldEnd(b) + return b, nil + } + } + b, err := xi.funcs.marshal(b, x.Value(), protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType), opts) if err != nil { return b, err diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert.go index 185ef2efa5b..e06ece55a26 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert.go @@ -14,7 +14,7 @@ import ( // unwrapper unwraps the value to the underlying value. // This is implemented by List and Map. type unwrapper interface { - protoUnwrap() interface{} + protoUnwrap() any } // A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types. diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert_list.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert_list.go index f89136516f9..18cb96fd70a 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert_list.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert_list.go @@ -136,6 +136,6 @@ func (ls *listReflect) NewElement() protoreflect.Value { func (ls *listReflect) IsValid() bool { return !ls.v.IsNil() } -func (ls *listReflect) protoUnwrap() interface{} { +func (ls *listReflect) protoUnwrap() any { return ls.v.Interface() } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert_map.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert_map.go index f30b0a0576d..304244a651d 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/convert_map.go @@ -116,6 +116,6 @@ func (ms *mapReflect) NewValue() protoreflect.Value { func (ms *mapReflect) IsValid() bool { return !ms.v.IsNil() } -func (ms *mapReflect) protoUnwrap() interface{} { +func (ms *mapReflect) protoUnwrap() any { return ms.v.Interface() } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/encode.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/encode.go index 845c67d6e7e..febd2122472 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/encode.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/encode.go @@ -49,8 +49,11 @@ func (mi *MessageInfo) sizePointer(p pointer, opts marshalOptions) (size int) { return 0 } if opts.UseCachedSize() && mi.sizecacheOffset.IsValid() { - if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size >= 0 { - return int(size) + // The size cache contains the size + 1, to allow the + // zero value to be invalid, while also allowing for a + // 0 size to be cached. + if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size > 0 { + return int(size - 1) } } return mi.sizePointerSlow(p, opts) @@ -60,7 +63,7 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int if flags.ProtoLegacy && mi.isMessageSet { size = sizeMessageSet(mi, p, opts) if mi.sizecacheOffset.IsValid() { - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) + atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1)) } return size } @@ -84,13 +87,16 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int } } if mi.sizecacheOffset.IsValid() { - if size > math.MaxInt32 { + if size > (math.MaxInt32 - 1) { // The size is too large for the int32 sizecache field. // We will need to recompute the size when encoding; // unfortunately expensive, but better than invalid output. - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), -1) + atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), 0) } else { - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) + // The size cache contains the size + 1, to allow the + // zero value to be invalid, while also allowing for a + // 0 size to be cached. + atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1)) } } return size @@ -149,6 +155,14 @@ func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOpt return b, nil } +// fullyLazyExtensions returns true if we should attempt to keep extensions lazy over size and marshal. +func fullyLazyExtensions(opts marshalOptions) bool { + // When deterministic marshaling is requested, force an unmarshal for lazy + // extensions to produce a deterministic result, instead of passing through + // bytes lazily that may or may not match what Go Protobuf would produce. + return opts.flags&piface.MarshalDeterministic == 0 +} + func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) { if ext == nil { return 0 @@ -158,6 +172,14 @@ func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marsha if xi.funcs.size == nil { continue } + if fullyLazyExtensions(opts) { + // Don't expand the extension, instead use the buffer to calculate size + if lb := x.lazyBuffer(); lb != nil { + // We got hold of the buffer, so it's still lazy. + n += len(lb) + continue + } + } n += xi.funcs.size(x.Value(), xi.tagsize, opts) } return n @@ -176,6 +198,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField, var err error for _, x := range *ext { xi := getExtensionFieldInfo(x.Type()) + if fullyLazyExtensions(opts) { + // Don't expand the extension if it's still in wire format, instead use the buffer content. + if lb := x.lazyBuffer(); lb != nil { + b = append(b, lb...) + continue + } + } b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) } return b, err @@ -191,6 +220,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField, for _, k := range keys { x := (*ext)[int32(k)] xi := getExtensionFieldInfo(x.Type()) + if fullyLazyExtensions(opts) { + // Don't expand the extension if it's still in wire format, instead use the buffer content. + if lb := x.lazyBuffer(); lb != nil { + b = append(b, lb...) + continue + } + } b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) if err != nil { return b, err diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/extension.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/extension.go index cb25b0bae1d..e31249f64f7 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/extension.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/extension.go @@ -53,7 +53,7 @@ type ExtensionInfo struct { // type returned by InterfaceOf may not be identical. // // Deprecated: Use InterfaceOf(xt.Zero()) instead. - ExtensionType interface{} + ExtensionType any // Field is the field number of the extension. // @@ -95,16 +95,16 @@ func (xi *ExtensionInfo) New() protoreflect.Value { func (xi *ExtensionInfo) Zero() protoreflect.Value { return xi.lazyInit().Zero() } -func (xi *ExtensionInfo) ValueOf(v interface{}) protoreflect.Value { +func (xi *ExtensionInfo) ValueOf(v any) protoreflect.Value { return xi.lazyInit().PBValueOf(reflect.ValueOf(v)) } -func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) interface{} { +func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) any { return xi.lazyInit().GoValueOf(v).Interface() } func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool { return xi.lazyInit().IsValidPB(v) } -func (xi *ExtensionInfo) IsValidInterface(v interface{}) bool { +func (xi *ExtensionInfo) IsValidInterface(v any) bool { return xi.lazyInit().IsValidGo(reflect.ValueOf(v)) } func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor { diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go index c2a803bb2f9..81b2b1a763d 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go @@ -97,7 +97,7 @@ func (e *legacyEnumWrapper) Number() protoreflect.EnumNumber { func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum { return e } -func (e *legacyEnumWrapper) protoUnwrap() interface{} { +func (e *legacyEnumWrapper) protoUnwrap() any { v := reflect.New(e.goTyp).Elem() v.SetInt(int64(e.num)) return v.Interface() @@ -167,6 +167,7 @@ func aberrantLoadEnumDesc(t reflect.Type) protoreflect.EnumDescriptor { ed := &filedesc.Enum{L2: new(filedesc.EnumL2)} ed.L0.FullName = AberrantDeriveFullName(t) // e.g., github_com.user.repo.MyEnum ed.L0.ParentFile = filedesc.SurrogateProto3 + ed.L1.EditionFeatures = ed.L0.ParentFile.L1.EditionFeatures ed.L2.Values.List = append(ed.L2.Values.List, filedesc.EnumValue{}) // TODO: Use the presence of a UnmarshalJSON method to determine proto2? diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go index 87b30d0504c..6e8677ee633 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go @@ -118,7 +118,7 @@ func (xi *ExtensionInfo) initFromLegacy() { xd.L1.Number = protoreflect.FieldNumber(xi.Field) xd.L1.Cardinality = fd.L1.Cardinality xd.L1.Kind = fd.L1.Kind - xd.L2.IsPacked = fd.L1.IsPacked + xd.L1.EditionFeatures = fd.L1.EditionFeatures xd.L2.Default = fd.L1.Default xd.L1.Extendee = Export{}.MessageDescriptorOf(xi.ExtendedType) xd.L2.Enum = ed diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go index 9ab091086c9..b649f1124b8 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go @@ -7,7 +7,7 @@ package impl import ( "bytes" "compress/gzip" - "io/ioutil" + "io" "sync" "google.golang.org/protobuf/internal/filedesc" @@ -51,7 +51,7 @@ func legacyLoadFileDesc(b []byte) protoreflect.FileDescriptor { if err != nil { panic(err) } - b2, err := ioutil.ReadAll(zr) + b2, err := io.ReadAll(zr) if err != nil { panic(err) } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go index 2ab2c629784..bf0b6049b46 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go @@ -204,6 +204,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName } } + md.L1.EditionFeatures = md.L0.ParentFile.L1.EditionFeatures // Obtain a list of oneof wrapper types. var oneofWrappers []reflect.Type methods := make([]reflect.Method, 0, 2) @@ -215,7 +216,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName } for _, fn := range methods { for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { + if vs, ok := v.Interface().([]any); ok { for _, v := range vs { oneofWrappers = append(oneofWrappers, reflect.TypeOf(v)) } @@ -250,6 +251,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName od := &md.L2.Oneofs.List[n] od.L0.FullName = md.FullName().Append(protoreflect.Name(tag)) od.L0.ParentFile = md.L0.ParentFile + od.L1.EditionFeatures = md.L1.EditionFeatures od.L0.Parent = md od.L0.Index = n @@ -260,6 +262,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName aberrantAppendField(md, f.Type, tag, "", "") fd := &md.L2.Fields.List[len(md.L2.Fields.List)-1] fd.L1.ContainingOneof = od + fd.L1.EditionFeatures = od.L1.EditionFeatures od.L1.Fields.List = append(od.L1.Fields.List, fd) } } @@ -307,14 +310,14 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey, fd.L0.Parent = md fd.L0.Index = n - if fd.L1.IsWeak || fd.L1.HasPacked { + if fd.L1.IsWeak || fd.L1.EditionFeatures.IsPacked { fd.L1.Options = func() protoreflect.ProtoMessage { opts := descopts.Field.ProtoReflect().New() if fd.L1.IsWeak { opts.Set(opts.Descriptor().Fields().ByName("weak"), protoreflect.ValueOfBool(true)) } - if fd.L1.HasPacked { - opts.Set(opts.Descriptor().Fields().ByName("packed"), protoreflect.ValueOfBool(fd.L1.IsPacked)) + if fd.L1.EditionFeatures.IsPacked { + opts.Set(opts.Descriptor().Fields().ByName("packed"), protoreflect.ValueOfBool(fd.L1.EditionFeatures.IsPacked)) } return opts.Interface() } @@ -344,6 +347,7 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey, md2.L0.ParentFile = md.L0.ParentFile md2.L0.Parent = md md2.L0.Index = n + md2.L1.EditionFeatures = md.L1.EditionFeatures md2.L1.IsMapEntry = true md2.L2.Options = func() protoreflect.ProtoMessage { @@ -563,6 +567,6 @@ func (m aberrantMessage) IsValid() bool { func (m aberrantMessage) ProtoMethods() *protoiface.Methods { return aberrantProtoMethods } -func (m aberrantMessage) protoUnwrap() interface{} { +func (m aberrantMessage) protoUnwrap() any { return m.v.Interface() } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message.go index 629bacdcedd..019399d454d 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message.go @@ -35,7 +35,7 @@ type MessageInfo struct { Exporter exporter // OneofWrappers is list of pointers to oneof wrapper struct types. - OneofWrappers []interface{} + OneofWrappers []any initMu sync.Mutex // protects all unexported fields initDone uint32 @@ -47,7 +47,7 @@ type MessageInfo struct { // exporter is a function that returns a reference to the ith field of v, // where v is a pointer to a struct. It returns nil if it does not support // exporting the requested field (e.g., already exported). -type exporter func(v interface{}, i int) interface{} +type exporter func(v any, i int) any // getMessageInfo returns the MessageInfo for any message type that // is generated by our implementation of protoc-gen-go (for v2 and on). @@ -201,7 +201,7 @@ fieldLoop: } for _, fn := range methods { for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { + if vs, ok := v.Interface().([]any); ok { oneofWrappers = vs } } @@ -256,7 +256,7 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType { type mapEntryType struct { desc protoreflect.MessageDescriptor - valType interface{} // zero value of enum or message type + valType any // zero value of enum or message type } func (mt mapEntryType) New() protoreflect.Message { diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go index d9ea010bef9..ecb4623d701 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go @@ -20,7 +20,7 @@ type reflectMessageInfo struct { // fieldTypes contains the zero value of an enum or message field. // For lists, it contains the element type. // For maps, it contains the entry value type. - fieldTypes map[protoreflect.FieldNumber]interface{} + fieldTypes map[protoreflect.FieldNumber]any // denseFields is a subset of fields where: // 0 < fieldDesc.Number() < len(denseFields) @@ -28,7 +28,7 @@ type reflectMessageInfo struct { denseFields []*fieldInfo // rangeInfos is a list of all fields (not belonging to a oneof) and oneofs. - rangeInfos []interface{} // either *fieldInfo or *oneofInfo + rangeInfos []any // either *fieldInfo or *oneofInfo getUnknown func(pointer) protoreflect.RawFields setUnknown func(pointer, protoreflect.RawFields) @@ -224,7 +224,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { } if ft != nil { if mi.fieldTypes == nil { - mi.fieldTypes = make(map[protoreflect.FieldNumber]interface{}) + mi.fieldTypes = make(map[protoreflect.FieldNumber]any) } mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface() } @@ -247,39 +247,39 @@ func (m *extensionMap) Range(f func(protoreflect.FieldDescriptor, protoreflect.V } } } -func (m *extensionMap) Has(xt protoreflect.ExtensionType) (ok bool) { +func (m *extensionMap) Has(xd protoreflect.ExtensionTypeDescriptor) (ok bool) { if m == nil { return false } - xd := xt.TypeDescriptor() x, ok := (*m)[int32(xd.Number())] if !ok { return false } + if x.isUnexpandedLazy() { + // Avoid calling x.Value(), which triggers a lazy unmarshal. + return true + } switch { case xd.IsList(): return x.Value().List().Len() > 0 case xd.IsMap(): return x.Value().Map().Len() > 0 - case xd.Message() != nil: - return x.Value().Message().IsValid() } return true } -func (m *extensionMap) Clear(xt protoreflect.ExtensionType) { - delete(*m, int32(xt.TypeDescriptor().Number())) +func (m *extensionMap) Clear(xd protoreflect.ExtensionTypeDescriptor) { + delete(*m, int32(xd.Number())) } -func (m *extensionMap) Get(xt protoreflect.ExtensionType) protoreflect.Value { - xd := xt.TypeDescriptor() +func (m *extensionMap) Get(xd protoreflect.ExtensionTypeDescriptor) protoreflect.Value { if m != nil { if x, ok := (*m)[int32(xd.Number())]; ok { return x.Value() } } - return xt.Zero() + return xd.Type().Zero() } -func (m *extensionMap) Set(xt protoreflect.ExtensionType, v protoreflect.Value) { - xd := xt.TypeDescriptor() +func (m *extensionMap) Set(xd protoreflect.ExtensionTypeDescriptor, v protoreflect.Value) { + xt := xd.Type() isValid := true switch { case !xt.IsValidValue(v): @@ -292,7 +292,7 @@ func (m *extensionMap) Set(xt protoreflect.ExtensionType, v protoreflect.Value) isValid = v.Message().IsValid() } if !isValid { - panic(fmt.Sprintf("%v: assigning invalid value", xt.TypeDescriptor().FullName())) + panic(fmt.Sprintf("%v: assigning invalid value", xd.FullName())) } if *m == nil { @@ -302,16 +302,15 @@ func (m *extensionMap) Set(xt protoreflect.ExtensionType, v protoreflect.Value) x.Set(xt, v) (*m)[int32(xd.Number())] = x } -func (m *extensionMap) Mutable(xt protoreflect.ExtensionType) protoreflect.Value { - xd := xt.TypeDescriptor() +func (m *extensionMap) Mutable(xd protoreflect.ExtensionTypeDescriptor) protoreflect.Value { if xd.Kind() != protoreflect.MessageKind && xd.Kind() != protoreflect.GroupKind && !xd.IsList() && !xd.IsMap() { panic("invalid Mutable on field with non-composite type") } if x, ok := (*m)[int32(xd.Number())]; ok { return x.Value() } - v := xt.New() - m.Set(xt, v) + v := xd.Type().New() + m.Set(xd, v) return v } @@ -394,7 +393,7 @@ var ( // MessageOf returns a reflective view over a message. The input must be a // pointer to a named Go struct. If the provided type has a ProtoReflect method, // it must be implemented by calling this method. -func (mi *MessageInfo) MessageOf(m interface{}) protoreflect.Message { +func (mi *MessageInfo) MessageOf(m any) protoreflect.Message { if reflect.TypeOf(m) != mi.GoReflectType { panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType)) } @@ -422,13 +421,13 @@ func (m *messageIfaceWrapper) Reset() { func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message { return (*messageReflectWrapper)(m) } -func (m *messageIfaceWrapper) protoUnwrap() interface{} { +func (m *messageIfaceWrapper) protoUnwrap() any { return m.p.AsIfaceOf(m.mi.GoReflectType.Elem()) } // checkField verifies that the provided field descriptor is valid. // Exactly one of the returned values is populated. -func (mi *MessageInfo) checkField(fd protoreflect.FieldDescriptor) (*fieldInfo, protoreflect.ExtensionType) { +func (mi *MessageInfo) checkField(fd protoreflect.FieldDescriptor) (*fieldInfo, protoreflect.ExtensionTypeDescriptor) { var fi *fieldInfo if n := fd.Number(); 0 < n && int(n) < len(mi.denseFields) { fi = mi.denseFields[n] @@ -457,7 +456,7 @@ func (mi *MessageInfo) checkField(fd protoreflect.FieldDescriptor) (*fieldInfo, if !ok { panic(fmt.Sprintf("extension %v does not implement protoreflect.ExtensionTypeDescriptor", fd.FullName())) } - return nil, xtd.Type() + return nil, xtd } panic(fmt.Sprintf("field %v is invalid", fd.FullName())) } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go index 741d6e5b6bd..99dc23c6f0a 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go @@ -23,12 +23,13 @@ func (m *messageState) New() protoreflect.Message { func (m *messageState) Interface() protoreflect.ProtoMessage { return m.protoUnwrap().(protoreflect.ProtoMessage) } -func (m *messageState) protoUnwrap() interface{} { +func (m *messageState) protoUnwrap() any { return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) } func (m *messageState) ProtoMethods() *protoiface.Methods { - m.messageInfo().init() - return &m.messageInfo().methods + mi := m.messageInfo() + mi.init() + return &mi.methods } // ProtoMessageInfo is a pseudo-internal API for allowing the v1 code @@ -41,8 +42,9 @@ func (m *messageState) ProtoMessageInfo() *MessageInfo { } func (m *messageState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - m.messageInfo().init() - for _, ri := range m.messageInfo().rangeInfos { + mi := m.messageInfo() + mi.init() + for _, ri := range mi.rangeInfos { switch ri := ri.(type) { case *fieldInfo: if ri.has(m.pointer()) { @@ -52,77 +54,86 @@ func (m *messageState) Range(f func(protoreflect.FieldDescriptor, protoreflect.V } case *oneofInfo: if n := ri.which(m.pointer()); n > 0 { - fi := m.messageInfo().fields[n] + fi := mi.fields[n] if !f(fi.fieldDesc, fi.get(m.pointer())) { return } } } } - m.messageInfo().extensionMap(m.pointer()).Range(f) + mi.extensionMap(m.pointer()).Range(f) } func (m *messageState) Has(fd protoreflect.FieldDescriptor) bool { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.has(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Has(xt) + return mi.extensionMap(m.pointer()).Has(xd) } } func (m *messageState) Clear(fd protoreflect.FieldDescriptor) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { fi.clear(m.pointer()) } else { - m.messageInfo().extensionMap(m.pointer()).Clear(xt) + mi.extensionMap(m.pointer()).Clear(xd) } } func (m *messageState) Get(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.get(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Get(xt) + return mi.extensionMap(m.pointer()).Get(xd) } } func (m *messageState) Set(fd protoreflect.FieldDescriptor, v protoreflect.Value) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { fi.set(m.pointer(), v) } else { - m.messageInfo().extensionMap(m.pointer()).Set(xt, v) + mi.extensionMap(m.pointer()).Set(xd, v) } } func (m *messageState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.mutable(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Mutable(xt) + return mi.extensionMap(m.pointer()).Mutable(xd) } } func (m *messageState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.newField() } else { - return xt.New() + return xd.Type().New() } } func (m *messageState) WhichOneof(od protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - m.messageInfo().init() - if oi := m.messageInfo().oneofs[od.Name()]; oi != nil && oi.oneofDesc == od { + mi := m.messageInfo() + mi.init() + if oi := mi.oneofs[od.Name()]; oi != nil && oi.oneofDesc == od { return od.Fields().ByNumber(oi.which(m.pointer())) } panic("invalid oneof descriptor " + string(od.FullName()) + " for message " + string(m.Descriptor().FullName())) } func (m *messageState) GetUnknown() protoreflect.RawFields { - m.messageInfo().init() - return m.messageInfo().getUnknown(m.pointer()) + mi := m.messageInfo() + mi.init() + return mi.getUnknown(m.pointer()) } func (m *messageState) SetUnknown(b protoreflect.RawFields) { - m.messageInfo().init() - m.messageInfo().setUnknown(m.pointer(), b) + mi := m.messageInfo() + mi.init() + mi.setUnknown(m.pointer(), b) } func (m *messageState) IsValid() bool { return !m.pointer().IsNil() @@ -143,12 +154,13 @@ func (m *messageReflectWrapper) Interface() protoreflect.ProtoMessage { } return (*messageIfaceWrapper)(m) } -func (m *messageReflectWrapper) protoUnwrap() interface{} { +func (m *messageReflectWrapper) protoUnwrap() any { return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) } func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods { - m.messageInfo().init() - return &m.messageInfo().methods + mi := m.messageInfo() + mi.init() + return &mi.methods } // ProtoMessageInfo is a pseudo-internal API for allowing the v1 code @@ -161,8 +173,9 @@ func (m *messageReflectWrapper) ProtoMessageInfo() *MessageInfo { } func (m *messageReflectWrapper) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - m.messageInfo().init() - for _, ri := range m.messageInfo().rangeInfos { + mi := m.messageInfo() + mi.init() + for _, ri := range mi.rangeInfos { switch ri := ri.(type) { case *fieldInfo: if ri.has(m.pointer()) { @@ -172,77 +185,86 @@ func (m *messageReflectWrapper) Range(f func(protoreflect.FieldDescriptor, proto } case *oneofInfo: if n := ri.which(m.pointer()); n > 0 { - fi := m.messageInfo().fields[n] + fi := mi.fields[n] if !f(fi.fieldDesc, fi.get(m.pointer())) { return } } } } - m.messageInfo().extensionMap(m.pointer()).Range(f) + mi.extensionMap(m.pointer()).Range(f) } func (m *messageReflectWrapper) Has(fd protoreflect.FieldDescriptor) bool { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.has(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Has(xt) + return mi.extensionMap(m.pointer()).Has(xd) } } func (m *messageReflectWrapper) Clear(fd protoreflect.FieldDescriptor) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { fi.clear(m.pointer()) } else { - m.messageInfo().extensionMap(m.pointer()).Clear(xt) + mi.extensionMap(m.pointer()).Clear(xd) } } func (m *messageReflectWrapper) Get(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.get(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Get(xt) + return mi.extensionMap(m.pointer()).Get(xd) } } func (m *messageReflectWrapper) Set(fd protoreflect.FieldDescriptor, v protoreflect.Value) { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { fi.set(m.pointer(), v) } else { - m.messageInfo().extensionMap(m.pointer()).Set(xt, v) + mi.extensionMap(m.pointer()).Set(xd, v) } } func (m *messageReflectWrapper) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.mutable(m.pointer()) } else { - return m.messageInfo().extensionMap(m.pointer()).Mutable(xt) + return mi.extensionMap(m.pointer()).Mutable(xd) } } func (m *messageReflectWrapper) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - m.messageInfo().init() - if fi, xt := m.messageInfo().checkField(fd); fi != nil { + mi := m.messageInfo() + mi.init() + if fi, xd := mi.checkField(fd); fi != nil { return fi.newField() } else { - return xt.New() + return xd.Type().New() } } func (m *messageReflectWrapper) WhichOneof(od protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - m.messageInfo().init() - if oi := m.messageInfo().oneofs[od.Name()]; oi != nil && oi.oneofDesc == od { + mi := m.messageInfo() + mi.init() + if oi := mi.oneofs[od.Name()]; oi != nil && oi.oneofDesc == od { return od.Fields().ByNumber(oi.which(m.pointer())) } panic("invalid oneof descriptor " + string(od.FullName()) + " for message " + string(m.Descriptor().FullName())) } func (m *messageReflectWrapper) GetUnknown() protoreflect.RawFields { - m.messageInfo().init() - return m.messageInfo().getUnknown(m.pointer()) + mi := m.messageInfo() + mi.init() + return mi.getUnknown(m.pointer()) } func (m *messageReflectWrapper) SetUnknown(b protoreflect.RawFields) { - m.messageInfo().init() - m.messageInfo().setUnknown(m.pointer(), b) + mi := m.messageInfo() + mi.init() + mi.setUnknown(m.pointer(), b) } func (m *messageReflectWrapper) IsValid() bool { return !m.pointer().IsNil() diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go index 517e94434c7..da685e8a29d 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go @@ -16,7 +16,7 @@ import ( const UnsafeEnabled = false // Pointer is an opaque pointer type. -type Pointer interface{} +type Pointer any // offset represents the offset to a struct field, accessible from a pointer. // The offset is the field index into a struct. @@ -62,7 +62,7 @@ func pointerOfValue(v reflect.Value) pointer { } // pointerOfIface returns the pointer portion of an interface. -func pointerOfIface(v interface{}) pointer { +func pointerOfIface(v any) pointer { return pointer{v: reflect.ValueOf(v)} } @@ -93,7 +93,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value { // AsIfaceOf treats p as a pointer to an object of type t and returns the value. // It is equivalent to p.AsValueOf(t).Interface() -func (p pointer) AsIfaceOf(t reflect.Type) interface{} { +func (p pointer) AsIfaceOf(t reflect.Type) any { return p.AsValueOf(t).Interface() } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go index 4b020e31164..5f20ca5d8ab 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go @@ -50,7 +50,7 @@ func pointerOfValue(v reflect.Value) pointer { } // pointerOfIface returns the pointer portion of an interface. -func pointerOfIface(v interface{}) pointer { +func pointerOfIface(v any) pointer { type ifaceHeader struct { Type unsafe.Pointer Data unsafe.Pointer @@ -80,7 +80,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value { // AsIfaceOf treats p as a pointer to an object of type t and returns the value. // It is equivalent to p.AsValueOf(t).Interface() -func (p pointer) AsIfaceOf(t reflect.Type) interface{} { +func (p pointer) AsIfaceOf(t reflect.Type) any { // TODO: Use tricky unsafe magic to directly create ifaceHeader. return p.AsValueOf(t).Interface() } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/order/range.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/order/range.go index 1665a68e5b7..a1f09162d05 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/order/range.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/order/range.go @@ -18,7 +18,7 @@ type messageField struct { } var messageFieldPool = sync.Pool{ - New: func() interface{} { return new([]messageField) }, + New: func() any { return new([]messageField) }, } type ( @@ -69,7 +69,7 @@ type mapEntry struct { } var mapEntryPool = sync.Pool{ - New: func() interface{} { return new([]mapEntry) }, + New: func() any { return new([]mapEntry) }, } type ( diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/internal/version/version.go b/pkg/k8s/vendor/google.golang.org/protobuf/internal/version/version.go index a50fcfb49b7..dbbf1f6862c 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/internal/version/version.go @@ -51,8 +51,8 @@ import ( // 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 33 - Patch = 0 + Minor = 34 + Patch = 2 PreRelease = "" ) diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/proto/decode.go b/pkg/k8s/vendor/google.golang.org/protobuf/proto/decode.go index e5b03b56771..d75a6534c1b 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/proto/decode.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/proto/decode.go @@ -51,6 +51,8 @@ type UnmarshalOptions struct { // Unmarshal parses the wire-format message in b and places the result in m. // The provided message must be mutable (e.g., a non-nil pointer to a message). +// +// See the [UnmarshalOptions] type if you need more control. func Unmarshal(b []byte, m Message) error { _, err := UnmarshalOptions{RecursionLimit: protowire.DefaultRecursionLimit}.unmarshal(b, m.ProtoReflect()) return err diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/proto/encode.go b/pkg/k8s/vendor/google.golang.org/protobuf/proto/encode.go index 4fed202f9fc..1f847bcc358 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/proto/encode.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/proto/encode.go @@ -5,12 +5,17 @@ package proto import ( + "errors" + "fmt" + "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/encoding/messageset" "google.golang.org/protobuf/internal/order" "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/runtime/protoiface" + + protoerrors "google.golang.org/protobuf/internal/errors" ) // MarshalOptions configures the marshaler. @@ -70,7 +75,32 @@ type MarshalOptions struct { UseCachedSize bool } +// flags turns the specified MarshalOptions (user-facing) into +// protoiface.MarshalInputFlags (used internally by the marshaler). +// +// See impl.marshalOptions.Options for the inverse operation. +func (o MarshalOptions) flags() protoiface.MarshalInputFlags { + var flags protoiface.MarshalInputFlags + + // Note: o.AllowPartial is always forced to true by MarshalOptions.marshal, + // which is why it is not a part of MarshalInputFlags. + + if o.Deterministic { + flags |= protoiface.MarshalDeterministic + } + + if o.UseCachedSize { + flags |= protoiface.MarshalUseCachedSize + } + + return flags +} + // Marshal returns the wire-format encoding of m. +// +// This is the most common entry point for encoding a Protobuf message. +// +// See the [MarshalOptions] type if you need more control. func Marshal(m Message) ([]byte, error) { // Treat nil message interface as an empty message; nothing to output. if m == nil { @@ -116,6 +146,9 @@ func emptyBytesForMessage(m Message) []byte { // MarshalAppend appends the wire-format encoding of m to b, // returning the result. +// +// This is a less common entry point than [Marshal], which is only needed if you +// need to supply your own buffers for performance reasons. func (o MarshalOptions) MarshalAppend(b []byte, m Message) ([]byte, error) { // Treat nil message interface as an empty message; nothing to append. if m == nil { @@ -145,12 +178,7 @@ func (o MarshalOptions) marshal(b []byte, m protoreflect.Message) (out protoifac in := protoiface.MarshalInput{ Message: m, Buf: b, - } - if o.Deterministic { - in.Flags |= protoiface.MarshalDeterministic - } - if o.UseCachedSize { - in.Flags |= protoiface.MarshalUseCachedSize + Flags: o.flags(), } if methods.Size != nil { sout := methods.Size(protoiface.SizeInput{ @@ -168,6 +196,10 @@ func (o MarshalOptions) marshal(b []byte, m protoreflect.Message) (out protoifac out.Buf, err = o.marshalMessageSlow(b, m) } if err != nil { + var mismatch *protoerrors.SizeMismatchError + if errors.As(err, &mismatch) { + return out, fmt.Errorf("marshaling %s: %v", string(m.Descriptor().FullName()), err) + } return out, err } if allowPartial { diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/proto/extension.go b/pkg/k8s/vendor/google.golang.org/protobuf/proto/extension.go index 17899a3a767..d248f292846 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/proto/extension.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/proto/extension.go @@ -11,18 +11,21 @@ import ( // HasExtension reports whether an extension field is populated. // It returns false if m is invalid or if xt does not extend m. func HasExtension(m Message, xt protoreflect.ExtensionType) bool { - // Treat nil message interface as an empty message; no populated fields. - if m == nil { + // Treat nil message interface or descriptor as an empty message; no populated + // fields. + if m == nil || xt == nil { return false } // As a special-case, we reports invalid or mismatching descriptors // as always not being populated (since they aren't). - if xt == nil || m.ProtoReflect().Descriptor() != xt.TypeDescriptor().ContainingMessage() { + mr := m.ProtoReflect() + xd := xt.TypeDescriptor() + if mr.Descriptor() != xd.ContainingMessage() { return false } - return m.ProtoReflect().Has(xt.TypeDescriptor()) + return mr.Has(xd) } // ClearExtension clears an extension field such that subsequent @@ -36,7 +39,7 @@ func ClearExtension(m Message, xt protoreflect.ExtensionType) { // If the field is unpopulated, it returns the default value for // scalars and an immutable, empty value for lists or messages. // It panics if xt does not extend m. -func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { +func GetExtension(m Message, xt protoreflect.ExtensionType) any { // Treat nil message interface as an empty message; return the default. if m == nil { return xt.InterfaceOf(xt.Zero()) @@ -48,7 +51,7 @@ func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { // SetExtension stores the value of an extension field. // It panics if m is invalid, xt does not extend m, or if type of v // is invalid for the specified extension field. -func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { +func SetExtension(m Message, xt protoreflect.ExtensionType, v any) { xd := xt.TypeDescriptor() pv := xt.ValueOf(v) @@ -75,7 +78,7 @@ func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { // It returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current extension field. -func RangeExtensions(m Message, f func(protoreflect.ExtensionType, interface{}) bool) { +func RangeExtensions(m Message, f func(protoreflect.ExtensionType, any) bool) { // Treat nil message interface as an empty message; nothing to range over. if m == nil { return diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/proto/messageset.go b/pkg/k8s/vendor/google.golang.org/protobuf/proto/messageset.go index 312d5d45c60..575d14831ff 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/proto/messageset.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/proto/messageset.go @@ -47,11 +47,16 @@ func (o MarshalOptions) marshalMessageSet(b []byte, m protoreflect.Message) ([]b func (o MarshalOptions) marshalMessageSetField(b []byte, fd protoreflect.FieldDescriptor, value protoreflect.Value) ([]byte, error) { b = messageset.AppendFieldStart(b, fd.Number()) b = protowire.AppendTag(b, messageset.FieldMessage, protowire.BytesType) - b = protowire.AppendVarint(b, uint64(o.Size(value.Message().Interface()))) + calculatedSize := o.Size(value.Message().Interface()) + b = protowire.AppendVarint(b, uint64(calculatedSize)) + before := len(b) b, err := o.marshalMessage(b, value.Message()) if err != nil { return b, err } + if measuredSize := len(b) - before; calculatedSize != measuredSize { + return nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize) + } b = messageset.AppendFieldEnd(b) return b, nil } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/proto/size.go b/pkg/k8s/vendor/google.golang.org/protobuf/proto/size.go index f1692b49b6c..052fb5ae313 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/proto/size.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/proto/size.go @@ -34,6 +34,7 @@ func (o MarshalOptions) size(m protoreflect.Message) (size int) { if methods != nil && methods.Size != nil { out := methods.Size(protoiface.SizeInput{ Message: m, + Flags: o.flags(), }) return out.Size } @@ -42,6 +43,7 @@ func (o MarshalOptions) size(m protoreflect.Message) (size int) { // This case is mainly used for legacy types with a Marshal method. out, _ := methods.Marshal(protoiface.MarshalInput{ Message: m, + Flags: o.flags(), }) return len(out.Buf) } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go index baa0cc6218f..8fbecb4f58d 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go @@ -13,6 +13,7 @@ package protodesc import ( + "google.golang.org/protobuf/internal/editionssupport" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/pragma" @@ -91,15 +92,17 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot switch fd.GetSyntax() { case "proto2", "": f.L1.Syntax = protoreflect.Proto2 + f.L1.Edition = filedesc.EditionProto2 case "proto3": f.L1.Syntax = protoreflect.Proto3 + f.L1.Edition = filedesc.EditionProto3 case "editions": f.L1.Syntax = protoreflect.Editions f.L1.Edition = fromEditionProto(fd.GetEdition()) default: return nil, errors.New("invalid syntax: %q", fd.GetSyntax()) } - if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < SupportedEditionsMinimum || fd.GetEdition() > SupportedEditionsMaximum) { + if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < editionssupport.Minimum || fd.GetEdition() > editionssupport.Maximum) { return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition()) } f.L1.Path = fd.GetName() @@ -114,9 +117,7 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot opts = proto.Clone(opts).(*descriptorpb.FileOptions) f.L2.Options = func() protoreflect.ProtoMessage { return opts } } - if f.L1.Syntax == protoreflect.Editions { - initFileDescFromFeatureSet(f, fd.GetOptions().GetFeatures()) - } + initFileDescFromFeatureSet(f, fd.GetOptions().GetFeatures()) f.L2.Imports = make(filedesc.FileImports, len(fd.GetDependency())) for _, i := range fd.GetPublicDependency() { @@ -219,10 +220,10 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot if err := validateEnumDeclarations(f.L1.Enums.List, fd.GetEnumType()); err != nil { return nil, err } - if err := validateMessageDeclarations(f.L1.Messages.List, fd.GetMessageType()); err != nil { + if err := validateMessageDeclarations(f, f.L1.Messages.List, fd.GetMessageType()); err != nil { return nil, err } - if err := validateExtensionDeclarations(f.L1.Extensions.List, fd.GetExtension()); err != nil { + if err := validateExtensionDeclarations(f, f.L1.Extensions.List, fd.GetExtension()); err != nil { return nil, err } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go index b3278163c52..85617554272 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go @@ -69,9 +69,7 @@ func (r descsByName) initMessagesDeclarations(mds []*descriptorpb.DescriptorProt if m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil { return nil, err } - if m.Base.L0.ParentFile.Syntax() == protoreflect.Editions { - m.L1.EditionFeatures = mergeEditionFeatures(parent, md.GetOptions().GetFeatures()) - } + m.L1.EditionFeatures = mergeEditionFeatures(parent, md.GetOptions().GetFeatures()) if opts := md.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.MessageOptions) m.L2.Options = func() protoreflect.ProtoMessage { return opts } @@ -146,13 +144,15 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc if f.L0, err = r.makeBase(f, parent, fd.GetName(), i, sb); err != nil { return nil, err } + f.L1.EditionFeatures = mergeEditionFeatures(parent, fd.GetOptions().GetFeatures()) f.L1.IsProto3Optional = fd.GetProto3Optional() if opts := fd.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.FieldOptions) f.L1.Options = func() protoreflect.ProtoMessage { return opts } f.L1.IsWeak = opts.GetWeak() - f.L1.HasPacked = opts.Packed != nil - f.L1.IsPacked = opts.GetPacked() + if opts.Packed != nil { + f.L1.EditionFeatures.IsPacked = opts.GetPacked() + } } f.L1.Number = protoreflect.FieldNumber(fd.GetNumber()) f.L1.Cardinality = protoreflect.Cardinality(fd.GetLabel()) @@ -163,32 +163,12 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc f.L1.StringName.InitJSON(fd.GetJsonName()) } - if f.Base.L0.ParentFile.Syntax() == protoreflect.Editions { - f.L1.EditionFeatures = mergeEditionFeatures(parent, fd.GetOptions().GetFeatures()) - - if f.L1.EditionFeatures.IsLegacyRequired { - f.L1.Cardinality = protoreflect.Required - } - // We reuse the existing field because the old option `[packed = - // true]` is mutually exclusive with the editions feature. - if canBePacked(fd) { - f.L1.HasPacked = true - f.L1.IsPacked = f.L1.EditionFeatures.IsPacked - } - - // We pretend this option is always explicitly set because the only - // use of HasEnforceUTF8 is to determine whether to use EnforceUTF8 - // or to return the appropriate default. - // When using editions we either parse the option or resolve the - // appropriate default here (instead of later when this option is - // requested from the descriptor). - // In proto2/proto3 syntax HasEnforceUTF8 might be false. - f.L1.HasEnforceUTF8 = true - f.L1.EnforceUTF8 = f.L1.EditionFeatures.IsUTF8Validated + if f.L1.EditionFeatures.IsLegacyRequired { + f.L1.Cardinality = protoreflect.Required + } - if f.L1.Kind == protoreflect.MessageKind && f.L1.EditionFeatures.IsDelimitedEncoded { - f.L1.Kind = protoreflect.GroupKind - } + if f.L1.Kind == protoreflect.MessageKind && f.L1.EditionFeatures.IsDelimitedEncoded { + f.L1.Kind = protoreflect.GroupKind } } return fs, nil @@ -201,12 +181,10 @@ func (r descsByName) initOneofsFromDescriptorProto(ods []*descriptorpb.OneofDesc if o.L0, err = r.makeBase(o, parent, od.GetName(), i, sb); err != nil { return nil, err } + o.L1.EditionFeatures = mergeEditionFeatures(parent, od.GetOptions().GetFeatures()) if opts := od.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.OneofOptions) o.L1.Options = func() protoreflect.ProtoMessage { return opts } - if parent.Syntax() == protoreflect.Editions { - o.L1.EditionFeatures = mergeEditionFeatures(parent, opts.GetFeatures()) - } } } return os, nil @@ -220,10 +198,13 @@ func (r descsByName) initExtensionDeclarations(xds []*descriptorpb.FieldDescript if x.L0, err = r.makeBase(x, parent, xd.GetName(), i, sb); err != nil { return nil, err } + x.L1.EditionFeatures = mergeEditionFeatures(parent, xd.GetOptions().GetFeatures()) if opts := xd.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.FieldOptions) x.L2.Options = func() protoreflect.ProtoMessage { return opts } - x.L2.IsPacked = opts.GetPacked() + if opts.Packed != nil { + x.L1.EditionFeatures.IsPacked = opts.GetPacked() + } } x.L1.Number = protoreflect.FieldNumber(xd.GetNumber()) x.L1.Cardinality = protoreflect.Cardinality(xd.GetLabel()) diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go index 254ca585424..f3cebab29c8 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go @@ -46,6 +46,11 @@ func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*desc if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil { return errors.New("message field %q cannot resolve type: %v", f.FullName(), err) } + if f.L1.Kind == protoreflect.GroupKind && (f.IsMap() || f.IsMapEntry()) { + // A map field might inherit delimited encoding from a file-wide default feature. + // But maps never actually use delimited encoding. (At least for now...) + f.L1.Kind = protoreflect.MessageKind + } if fd.DefaultValue != nil { v, ev, err := unmarshalDefault(fd.GetDefaultValue(), f, r.allowUnresolvable) if err != nil { diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go index e4dcaf876c9..6de31c2ebdb 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go @@ -45,11 +45,11 @@ func validateEnumDeclarations(es []filedesc.Enum, eds []*descriptorpb.EnumDescri if allowAlias && !foundAlias { return errors.New("enum %q allows aliases, but none were found", e.FullName()) } - if e.Syntax() == protoreflect.Proto3 { + if !e.IsClosed() { if v := e.Values().Get(0); v.Number() != 0 { - return errors.New("enum %q using proto3 semantics must have zero number for the first value", v.FullName()) + return errors.New("enum %q using open semantics must have zero number for the first value", v.FullName()) } - // Verify that value names in proto3 do not conflict if the + // Verify that value names in open enums do not conflict if the // case-insensitive prefix is removed. // See protoc v3.8.0: src/google/protobuf/descriptor.cc:4991-5055 names := map[string]protoreflect.EnumValueDescriptor{} @@ -58,7 +58,7 @@ func validateEnumDeclarations(es []filedesc.Enum, eds []*descriptorpb.EnumDescri v1 := e.Values().Get(i) s := strs.EnumValueName(strs.TrimEnumPrefix(string(v1.Name()), prefix)) if v2, ok := names[s]; ok && v1.Number() != v2.Number() { - return errors.New("enum %q using proto3 semantics has conflict: %q with %q", e.FullName(), v1.Name(), v2.Name()) + return errors.New("enum %q using open semantics has conflict: %q with %q", e.FullName(), v1.Name(), v2.Name()) } names[s] = v1 } @@ -80,7 +80,9 @@ func validateEnumDeclarations(es []filedesc.Enum, eds []*descriptorpb.EnumDescri return nil } -func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) error { +func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) error { + // There are a few limited exceptions only for proto3 + isProto3 := file.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3) for i, md := range mds { m := &ms[i] @@ -107,25 +109,13 @@ func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.Desc if isMessageSet && !flags.ProtoLegacy { return errors.New("message %q is a MessageSet, which is a legacy proto1 feature that is no longer supported", m.FullName()) } - if isMessageSet && (m.Syntax() == protoreflect.Proto3 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) { + if isMessageSet && (isProto3 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) { return errors.New("message %q is an invalid proto1 MessageSet", m.FullName()) } - if m.Syntax() == protoreflect.Proto3 { + if isProto3 { if m.ExtensionRanges().Len() > 0 { return errors.New("message %q using proto3 semantics cannot have extension ranges", m.FullName()) } - // Verify that field names in proto3 do not conflict if lowercased - // with all underscores removed. - // See protoc v3.8.0: src/google/protobuf/descriptor.cc:5830-5847 - names := map[string]protoreflect.FieldDescriptor{} - for i := 0; i < m.Fields().Len(); i++ { - f1 := m.Fields().Get(i) - s := strings.Replace(strings.ToLower(string(f1.Name())), "_", "", -1) - if f2, ok := names[s]; ok { - return errors.New("message %q using proto3 semantics has conflict: %q with %q", m.FullName(), f1.Name(), f2.Name()) - } - names[s] = f1 - } } for j, fd := range md.GetField() { @@ -149,7 +139,7 @@ func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.Desc return errors.New("message field %q may not have extendee: %q", f.FullName(), fd.GetExtendee()) } if f.L1.IsProto3Optional { - if f.Syntax() != protoreflect.Proto3 { + if !isProto3 { return errors.New("message field %q under proto3 optional semantics must be specified in the proto3 syntax", f.FullName()) } if f.Cardinality() != protoreflect.Optional { @@ -162,26 +152,29 @@ func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.Desc if f.IsWeak() && !flags.ProtoLegacy { return errors.New("message field %q is a weak field, which is a legacy proto1 feature that is no longer supported", f.FullName()) } - if f.IsWeak() && (f.Syntax() != protoreflect.Proto2 || !isOptionalMessage(f) || f.ContainingOneof() != nil) { + if f.IsWeak() && (!f.HasPresence() || !isOptionalMessage(f) || f.ContainingOneof() != nil) { return errors.New("message field %q may only be weak for an optional message", f.FullName()) } if f.IsPacked() && !isPackable(f) { return errors.New("message field %q is not packable", f.FullName()) } - if err := checkValidGroup(f); err != nil { + if err := checkValidGroup(file, f); err != nil { return errors.New("message field %q is an invalid group: %v", f.FullName(), err) } if err := checkValidMap(f); err != nil { return errors.New("message field %q is an invalid map: %v", f.FullName(), err) } - if f.Syntax() == protoreflect.Proto3 { + if isProto3 { if f.Cardinality() == protoreflect.Required { return errors.New("message field %q using proto3 semantics cannot be required", f.FullName()) } - if f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().Syntax() != protoreflect.Proto3 { - return errors.New("message field %q using proto3 semantics may only depend on a proto3 enum", f.FullName()) + if f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().IsClosed() { + return errors.New("message field %q using proto3 semantics may only depend on open enums", f.FullName()) } } + if f.Cardinality() == protoreflect.Optional && !f.HasPresence() && f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().IsClosed() { + return errors.New("message field %q with implicit presence may only use open enums", f.FullName()) + } } seenSynthetic := false // synthetic oneofs for proto3 optional must come after real oneofs for j := range md.GetOneofDecl() { @@ -215,17 +208,17 @@ func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.Desc if err := validateEnumDeclarations(m.L1.Enums.List, md.GetEnumType()); err != nil { return err } - if err := validateMessageDeclarations(m.L1.Messages.List, md.GetNestedType()); err != nil { + if err := validateMessageDeclarations(file, m.L1.Messages.List, md.GetNestedType()); err != nil { return err } - if err := validateExtensionDeclarations(m.L1.Extensions.List, md.GetExtension()); err != nil { + if err := validateExtensionDeclarations(file, m.L1.Extensions.List, md.GetExtension()); err != nil { return err } } return nil } -func validateExtensionDeclarations(xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) error { +func validateExtensionDeclarations(f *filedesc.File, xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) error { for i, xd := range xds { x := &xs[i] // NOTE: Avoid using the IsValid method since extensions to MessageSet @@ -267,13 +260,13 @@ func validateExtensionDeclarations(xs []filedesc.Extension, xds []*descriptorpb. if x.IsPacked() && !isPackable(x) { return errors.New("extension field %q is not packable", x.FullName()) } - if err := checkValidGroup(x); err != nil { + if err := checkValidGroup(f, x); err != nil { return errors.New("extension field %q is an invalid group: %v", x.FullName(), err) } if md := x.Message(); md != nil && md.IsMapEntry() { return errors.New("extension field %q cannot be a map entry", x.FullName()) } - if x.Syntax() == protoreflect.Proto3 { + if f.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3) { switch x.ContainingMessage().FullName() { case (*descriptorpb.FileOptions)(nil).ProtoReflect().Descriptor().FullName(): case (*descriptorpb.EnumOptions)(nil).ProtoReflect().Descriptor().FullName(): @@ -309,21 +302,25 @@ func isPackable(fd protoreflect.FieldDescriptor) bool { // checkValidGroup reports whether fd is a valid group according to the same // rules that protoc imposes. -func checkValidGroup(fd protoreflect.FieldDescriptor) error { +func checkValidGroup(f *filedesc.File, fd protoreflect.FieldDescriptor) error { md := fd.Message() switch { case fd.Kind() != protoreflect.GroupKind: return nil - case fd.Syntax() == protoreflect.Proto3: + case f.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3): return errors.New("invalid under proto3 semantics") case md == nil || md.IsPlaceholder(): return errors.New("message must be resolvable") - case fd.FullName().Parent() != md.FullName().Parent(): - return errors.New("message and field must be declared in the same scope") - case !unicode.IsUpper(rune(md.Name()[0])): - return errors.New("message name must start with an uppercase") - case fd.Name() != protoreflect.Name(strings.ToLower(string(md.Name()))): - return errors.New("field name must be lowercased form of the message name") + } + if f.L1.Edition < fromEditionProto(descriptorpb.Edition_EDITION_2023) { + switch { + case fd.FullName().Parent() != md.FullName().Parent(): + return errors.New("message and field must be declared in the same scope") + case !unicode.IsUpper(rune(md.Name()[0])): + return errors.New("message name must start with an uppercase") + case fd.Name() != protoreflect.Name(strings.ToLower(string(md.Name()))): + return errors.New("field name must be lowercased form of the message name") + } } return nil } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go index 2a6b29d1791..804830eda36 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go @@ -17,11 +17,6 @@ import ( gofeaturespb "google.golang.org/protobuf/types/gofeaturespb" ) -const ( - SupportedEditionsMinimum = descriptorpb.Edition_EDITION_PROTO2 - SupportedEditionsMaximum = descriptorpb.Edition_EDITION_2023 -) - var defaults = &descriptorpb.FeatureSetDefaults{} var defaultsCacheMu sync.Mutex var defaultsCache = make(map[filedesc.Edition]*descriptorpb.FeatureSet) @@ -67,18 +62,20 @@ func getFeatureSetFor(ed filedesc.Edition) *descriptorpb.FeatureSet { fmt.Fprintf(os.Stderr, "internal error: unsupported edition %v (did you forget to update the embedded defaults (i.e. the bootstrap descriptor proto)?)\n", edpb) os.Exit(1) } - fs := defaults.GetDefaults()[0].GetFeatures() + fsed := defaults.GetDefaults()[0] // Using a linear search for now. // Editions are guaranteed to be sorted and thus we could use a binary search. // Given that there are only a handful of editions (with one more per year) // there is not much reason to use a binary search. for _, def := range defaults.GetDefaults() { if def.GetEdition() <= edpb { - fs = def.GetFeatures() + fsed = def } else { break } } + fs := proto.Clone(fsed.GetFixedFeatures()).(*descriptorpb.FeatureSet) + proto.Merge(fs, fsed.GetOverridableFeatures()) defaultsCache[ed] = fs return fs } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go index 9d6e05420f7..a5de8d40013 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go @@ -73,6 +73,16 @@ func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileD if syntax := file.Syntax(); syntax != protoreflect.Proto2 && syntax.IsValid() { p.Syntax = proto.String(file.Syntax().String()) } + if file.Syntax() == protoreflect.Editions { + desc := file + if fileImportDesc, ok := file.(protoreflect.FileImport); ok { + desc = fileImportDesc.FileDescriptor + } + + if editionsInterface, ok := desc.(interface{ Edition() int32 }); ok { + p.Edition = descriptorpb.Edition(editionsInterface.Edition()).Enum() + } + } return p } @@ -153,6 +163,18 @@ func ToFieldDescriptorProto(field protoreflect.FieldDescriptor) *descriptorpb.Fi if field.Syntax() == protoreflect.Proto3 && field.HasOptionalKeyword() { p.Proto3Optional = proto.Bool(true) } + if field.Syntax() == protoreflect.Editions { + // Editions have no group keyword, this type is only set so that downstream users continue + // treating this as delimited encoding. + if p.GetType() == descriptorpb.FieldDescriptorProto_TYPE_GROUP { + p.Type = descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum() + } + // Editions have no required keyword, this label is only set so that downstream users continue + // treating it as required. + if p.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REQUIRED { + p.Label = descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum() + } + } if field.HasDefault() { def, err := defval.Marshal(field.Default(), field.DefaultEnumValue(), field.Kind(), defval.Descriptor) if err != nil && field.DefaultEnumValue() != nil { diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go index 00b01fbd8c9..c85bfaa5bb7 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go @@ -161,7 +161,7 @@ const ( // IsValid reports whether the syntax is valid. func (s Syntax) IsValid() bool { switch s { - case Proto2, Proto3: + case Proto2, Proto3, Editions: return true default: return false diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go index 7dcc2ff09e9..ea154eec44d 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go @@ -373,6 +373,8 @@ func (p *SourcePath) appendFieldOptions(b []byte) []byte { b = p.appendRepeatedField(b, "edition_defaults", (*SourcePath).appendFieldOptions_EditionDefault) case 21: b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) + case 22: + b = p.appendSingularField(b, "feature_support", (*SourcePath).appendFieldOptions_FeatureSupport) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } @@ -483,6 +485,8 @@ func (p *SourcePath) appendEnumValueOptions(b []byte) []byte { b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) case 3: b = p.appendSingularField(b, "debug_redact", nil) + case 4: + b = p.appendSingularField(b, "feature_support", (*SourcePath).appendFieldOptions_FeatureSupport) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } @@ -519,6 +523,23 @@ func (p *SourcePath) appendFieldOptions_EditionDefault(b []byte) []byte { return b } +func (p *SourcePath) appendFieldOptions_FeatureSupport(b []byte) []byte { + if len(*p) == 0 { + return b + } + switch (*p)[0] { + case 1: + b = p.appendSingularField(b, "edition_introduced", nil) + case 2: + b = p.appendSingularField(b, "edition_deprecated", nil) + case 3: + b = p.appendSingularField(b, "deprecation_warning", nil) + case 4: + b = p.appendSingularField(b, "edition_removed", nil) + } + return b +} + func (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte { if len(*p) == 0 { return b diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go index 60ff62b4c85..cd8fadbaf8f 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go @@ -510,7 +510,7 @@ type ExtensionType interface { // // ValueOf is more extensive than protoreflect.ValueOf for a given field's // value as it has more type information available. - ValueOf(interface{}) Value + ValueOf(any) Value // InterfaceOf completely unwraps the Value to the underlying Go type. // InterfaceOf panics if the input is nil or does not represent the @@ -519,13 +519,13 @@ type ExtensionType interface { // // InterfaceOf is able to unwrap the Value further than Value.Interface // as it has more type information available. - InterfaceOf(Value) interface{} + InterfaceOf(Value) any // IsValidValue reports whether the Value is valid to assign to the field. IsValidValue(Value) bool // IsValidInterface reports whether the input is valid to assign to the field. - IsValidInterface(interface{}) bool + IsValidInterface(any) bool } // EnumDescriptor describes an enum and @@ -544,6 +544,12 @@ type EnumDescriptor interface { // ReservedRanges is a list of reserved ranges of enum numbers. ReservedRanges() EnumRanges + // IsClosed reports whether this enum uses closed semantics. + // See https://protobuf.dev/programming-guides/enum/#definitions. + // Note: the Go protobuf implementation is not spec compliant and treats + // all enums as open enums. + IsClosed() bool + isEnumDescriptor } type isEnumDescriptor interface{ ProtoType(EnumDescriptor) } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go index 7ced876f4e8..75f83a2af03 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go @@ -32,11 +32,11 @@ const ( type value struct { pragma.DoNotCompare // 0B - typ valueType // 8B - num uint64 // 8B - str string // 16B - bin []byte // 24B - iface interface{} // 16B + typ valueType // 8B + num uint64 // 8B + str string // 16B + bin []byte // 24B + iface any // 16B } func valueOfString(v string) Value { @@ -45,7 +45,7 @@ func valueOfString(v string) Value { func valueOfBytes(v []byte) Value { return Value{typ: bytesType, bin: v} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { return Value{typ: ifaceType, iface: v} } @@ -55,6 +55,6 @@ func (v Value) getString() string { func (v Value) getBytes() []byte { return v.bin } -func (v Value) getIface() interface{} { +func (v Value) getIface() any { return v.iface } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go index 1603097311e..9fe83cef5a9 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go @@ -69,8 +69,8 @@ import ( // composite Value. Modifying an empty, read-only value panics. type Value value -// The protoreflect API uses a custom Value union type instead of interface{} -// to keep the future open for performance optimizations. Using an interface{} +// The protoreflect API uses a custom Value union type instead of any +// to keep the future open for performance optimizations. Using an any // always incurs an allocation for primitives (e.g., int64) since it needs to // be boxed on the heap (as interfaces can only contain pointers natively). // Instead, we represent the Value union as a flat struct that internally keeps @@ -85,7 +85,7 @@ type Value value // ValueOf returns a Value initialized with the concrete value stored in v. // This panics if the type does not match one of the allowed types in the // Value union. -func ValueOf(v interface{}) Value { +func ValueOf(v any) Value { switch v := v.(type) { case nil: return Value{} @@ -192,10 +192,10 @@ func (v Value) IsValid() bool { return v.typ != nilType } -// Interface returns v as an interface{}. +// Interface returns v as an any. // // Invariant: v == ValueOf(v).Interface() -func (v Value) Interface() interface{} { +func (v Value) Interface() any { switch v.typ { case nilType: return nil @@ -406,8 +406,8 @@ func (k MapKey) IsValid() bool { return Value(k).IsValid() } -// Interface returns k as an interface{}. -func (k MapKey) Interface() interface{} { +// Interface returns k as an any. +func (k MapKey) Interface() any { return Value(k).Interface() } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go index b1fdbe3e8e1..7f3583ead81 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go @@ -45,7 +45,7 @@ var ( // typeOf returns a pointer to the Go type information. // The pointer is comparable and equal if and only if the types are identical. -func typeOf(t interface{}) unsafe.Pointer { +func typeOf(t any) unsafe.Pointer { return (*ifaceHeader)(unsafe.Pointer(&t)).Type } @@ -80,7 +80,7 @@ func valueOfBytes(v []byte) Value { p := (*sliceHeader)(unsafe.Pointer(&v)) return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { p := (*ifaceHeader)(unsafe.Pointer(&v)) return Value{typ: p.Type, ptr: p.Data} } @@ -93,7 +93,7 @@ func (v Value) getBytes() (x []byte) { *(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)} return x } -func (v Value) getIface() (x interface{}) { +func (v Value) getIface() (x any) { *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} return x } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go index 43547011173..f7d386990a0 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go @@ -15,7 +15,7 @@ import ( type ( ifaceHeader struct { - _ [0]interface{} // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. + _ [0]any // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. Type unsafe.Pointer Data unsafe.Pointer } @@ -37,7 +37,7 @@ var ( // typeOf returns a pointer to the Go type information. // The pointer is comparable and equal if and only if the types are identical. -func typeOf(t interface{}) unsafe.Pointer { +func typeOf(t any) unsafe.Pointer { return (*ifaceHeader)(unsafe.Pointer(&t)).Type } @@ -70,7 +70,7 @@ func valueOfString(v string) Value { func valueOfBytes(v []byte) Value { return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { p := (*ifaceHeader)(unsafe.Pointer(&v)) return Value{typ: p.Type, ptr: p.Data} } @@ -81,7 +81,7 @@ func (v Value) getString() string { func (v Value) getBytes() []byte { return unsafe.Slice((*byte)(v.ptr), v.num) } -func (v Value) getIface() (x interface{}) { +func (v Value) getIface() (x any) { *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} return x } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go index 6267dc52a67..de177733914 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go @@ -95,7 +95,7 @@ type Files struct { // multiple files. Only top-level declarations are registered. // Note that enum values are in the top-level since that are in the same // scope as the parent enum. - descsByName map[protoreflect.FullName]interface{} + descsByName map[protoreflect.FullName]any filesByPath map[string][]protoreflect.FileDescriptor numFiles int } @@ -117,7 +117,7 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error { defer globalMutex.Unlock() } if r.descsByName == nil { - r.descsByName = map[protoreflect.FullName]interface{}{ + r.descsByName = map[protoreflect.FullName]any{ "": &packageDescriptor{}, } r.filesByPath = make(map[string][]protoreflect.FileDescriptor) @@ -485,7 +485,7 @@ type Types struct { } type ( - typesByName map[protoreflect.FullName]interface{} + typesByName map[protoreflect.FullName]any extensionsByMessage map[protoreflect.FullName]extensionsByNumber extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType ) @@ -570,7 +570,7 @@ func (r *Types) RegisterExtension(xt protoreflect.ExtensionType) error { return nil } -func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interface{}) error { +func (r *Types) register(kind string, desc protoreflect.Descriptor, typ any) error { name := desc.FullName() prev := r.typesByName[name] if prev != nil { @@ -841,7 +841,7 @@ func (r *Types) RangeExtensionsByMessage(message protoreflect.FullName, f func(p } } -func typeName(t interface{}) string { +func typeName(t any) string { switch t.(type) { case protoreflect.EnumType: return "enum" @@ -854,7 +854,7 @@ func typeName(t interface{}) string { } } -func amendErrorWithCaller(err error, prev, curr interface{}) error { +func amendErrorWithCaller(err error, prev, curr any) error { prevPkg := goPackage(prev) currPkg := goPackage(curr) if prevPkg == "" || currPkg == "" || prevPkg == currPkg { @@ -863,7 +863,7 @@ func amendErrorWithCaller(err error, prev, curr interface{}) error { return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg) } -func goPackage(v interface{}) string { +func goPackage(v any) string { switch d := v.(type) { case protoreflect.EnumType: v = d.Descriptor() diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/pkg/k8s/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go index 78624cf60b3..9403eb07507 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -54,6 +54,9 @@ type Edition int32 const ( // A placeholder for an unknown edition value. Edition_EDITION_UNKNOWN Edition = 0 + // A placeholder edition for specifying default behaviors *before* a feature + // was first introduced. This is effectively an "infinite past". + Edition_EDITION_LEGACY Edition = 900 // Legacy syntax "editions". These pre-date editions, but behave much like // distinct editions. These can't be used to specify the edition of proto // files, but feature definitions must supply proto2/proto3 defaults for @@ -82,6 +85,7 @@ const ( var ( Edition_name = map[int32]string{ 0: "EDITION_UNKNOWN", + 900: "EDITION_LEGACY", 998: "EDITION_PROTO2", 999: "EDITION_PROTO3", 1000: "EDITION_2023", @@ -95,6 +99,7 @@ var ( } Edition_value = map[string]int32{ "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -2177,12 +2182,16 @@ type FileOptions struct { // // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. + // A proto2 file can set this to true to opt in to UTF-8 checking for Java, + // which will throw an exception if invalid UTF-8 is parsed from the wire or + // assigned to a string field. + // + // TODO: clarify exactly what kinds of field types this option + // applies to, and update these docs accordingly. + // + // Proto3 files already perform these checks. Setting the option explicitly to + // false has no effect: it cannot be used to opt proto3 files out of UTF-8 + // checks. JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"` OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` // Sets the Go package where structs generated from this .proto will be @@ -2679,7 +2688,8 @@ type FieldOptions struct { Targets []FieldOptions_OptionTargetType `protobuf:"varint,19,rep,name=targets,enum=google.protobuf.FieldOptions_OptionTargetType" json:"targets,omitempty"` EditionDefaults []*FieldOptions_EditionDefault `protobuf:"bytes,20,rep,name=edition_defaults,json=editionDefaults" json:"edition_defaults,omitempty"` // Any features defined in the specific edition. - Features *FeatureSet `protobuf:"bytes,21,opt,name=features" json:"features,omitempty"` + Features *FeatureSet `protobuf:"bytes,21,opt,name=features" json:"features,omitempty"` + FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,22,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } @@ -2811,6 +2821,13 @@ func (x *FieldOptions) GetFeatures() *FeatureSet { return nil } +func (x *FieldOptions) GetFeatureSupport() *FieldOptions_FeatureSupport { + if x != nil { + return x.FeatureSupport + } + return nil +} + func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -2995,6 +3012,8 @@ type EnumValueOptions struct { // out when using debug formats, e.g. when the field contains sensitive // credentials. DebugRedact *bool `protobuf:"varint,3,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"` + // Information about the support window of a feature value. + FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,4,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } @@ -3058,6 +3077,13 @@ func (x *EnumValueOptions) GetDebugRedact() bool { return Default_EnumValueOptions_DebugRedact } +func (x *EnumValueOptions) GetFeatureSupport() *FieldOptions_FeatureSupport { + if x != nil { + return x.FeatureSupport + } + return nil +} + func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -3968,6 +3994,88 @@ func (x *FieldOptions_EditionDefault) GetValue() string { return "" } +// Information about the support window of a feature. +type FieldOptions_FeatureSupport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The edition that this feature was first available in. In editions + // earlier than this one, the default assigned to EDITION_LEGACY will be + // used, and proto files will not be able to override it. + EditionIntroduced *Edition `protobuf:"varint,1,opt,name=edition_introduced,json=editionIntroduced,enum=google.protobuf.Edition" json:"edition_introduced,omitempty"` + // The edition this feature becomes deprecated in. Using this after this + // edition may trigger warnings. + EditionDeprecated *Edition `protobuf:"varint,2,opt,name=edition_deprecated,json=editionDeprecated,enum=google.protobuf.Edition" json:"edition_deprecated,omitempty"` + // The deprecation warning text if this feature is used after the edition it + // was marked deprecated in. + DeprecationWarning *string `protobuf:"bytes,3,opt,name=deprecation_warning,json=deprecationWarning" json:"deprecation_warning,omitempty"` + // The edition this feature is no longer available in. In editions after + // this one, the last default assigned will be used, and proto files will + // not be able to override it. + EditionRemoved *Edition `protobuf:"varint,4,opt,name=edition_removed,json=editionRemoved,enum=google.protobuf.Edition" json:"edition_removed,omitempty"` +} + +func (x *FieldOptions_FeatureSupport) Reset() { + *x = FieldOptions_FeatureSupport{} + if protoimpl.UnsafeEnabled { + mi := &file_google_protobuf_descriptor_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldOptions_FeatureSupport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldOptions_FeatureSupport) ProtoMessage() {} + +func (x *FieldOptions_FeatureSupport) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldOptions_FeatureSupport.ProtoReflect.Descriptor instead. +func (*FieldOptions_FeatureSupport) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 1} +} + +func (x *FieldOptions_FeatureSupport) GetEditionIntroduced() Edition { + if x != nil && x.EditionIntroduced != nil { + return *x.EditionIntroduced + } + return Edition_EDITION_UNKNOWN +} + +func (x *FieldOptions_FeatureSupport) GetEditionDeprecated() Edition { + if x != nil && x.EditionDeprecated != nil { + return *x.EditionDeprecated + } + return Edition_EDITION_UNKNOWN +} + +func (x *FieldOptions_FeatureSupport) GetDeprecationWarning() string { + if x != nil && x.DeprecationWarning != nil { + return *x.DeprecationWarning + } + return "" +} + +func (x *FieldOptions_FeatureSupport) GetEditionRemoved() Edition { + if x != nil && x.EditionRemoved != nil { + return *x.EditionRemoved + } + return Edition_EDITION_UNKNOWN +} + // The name of the uninterpreted option. Each string represents a segment in // a dot-separated name. is_extension is true iff a segment represents an // extension (denoted with parentheses in options specs in .proto files). @@ -3985,7 +4093,7 @@ type UninterpretedOption_NamePart struct { func (x *UninterpretedOption_NamePart) Reset() { *x = UninterpretedOption_NamePart{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[28] + mi := &file_google_protobuf_descriptor_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3998,7 +4106,7 @@ func (x *UninterpretedOption_NamePart) String() string { func (*UninterpretedOption_NamePart) ProtoMessage() {} func (x *UninterpretedOption_NamePart) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[28] + mi := &file_google_protobuf_descriptor_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4037,14 +4145,17 @@ type FeatureSetDefaults_FeatureSetEditionDefault struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` - Features *FeatureSet `protobuf:"bytes,2,opt,name=features" json:"features,omitempty"` + Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + // Defaults of features that can be overridden in this edition. + OverridableFeatures *FeatureSet `protobuf:"bytes,4,opt,name=overridable_features,json=overridableFeatures" json:"overridable_features,omitempty"` + // Defaults of features that can't be overridden in this edition. + FixedFeatures *FeatureSet `protobuf:"bytes,5,opt,name=fixed_features,json=fixedFeatures" json:"fixed_features,omitempty"` } func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() { *x = FeatureSetDefaults_FeatureSetEditionDefault{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[29] + mi := &file_google_protobuf_descriptor_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4057,7 +4168,7 @@ func (x *FeatureSetDefaults_FeatureSetEditionDefault) String() string { func (*FeatureSetDefaults_FeatureSetEditionDefault) ProtoMessage() {} func (x *FeatureSetDefaults_FeatureSetEditionDefault) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[29] + mi := &file_google_protobuf_descriptor_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4080,9 +4191,16 @@ func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetEdition() Edition { return Edition_EDITION_UNKNOWN } -func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFeatures() *FeatureSet { +func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetOverridableFeatures() *FeatureSet { if x != nil { - return x.Features + return x.OverridableFeatures + } + return nil +} + +func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFixedFeatures() *FeatureSet { + if x != nil { + return x.FixedFeatures } return nil } @@ -4188,7 +4306,7 @@ type SourceCodeInfo_Location struct { func (x *SourceCodeInfo_Location) Reset() { *x = SourceCodeInfo_Location{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[30] + mi := &file_google_protobuf_descriptor_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4201,7 +4319,7 @@ func (x *SourceCodeInfo_Location) String() string { func (*SourceCodeInfo_Location) ProtoMessage() {} func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[30] + mi := &file_google_protobuf_descriptor_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4275,7 +4393,7 @@ type GeneratedCodeInfo_Annotation struct { func (x *GeneratedCodeInfo_Annotation) Reset() { *x = GeneratedCodeInfo_Annotation{} if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[31] + mi := &file_google_protobuf_descriptor_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4288,7 +4406,7 @@ func (x *GeneratedCodeInfo_Annotation) String() string { func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message { - mi := &file_google_protobuf_descriptor_proto_msgTypes[31] + mi := &file_google_protobuf_descriptor_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4597,7 +4715,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x69, 0x6e, 0x67, 0x22, 0x97, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x69, 0x6e, 0x67, 0x22, 0xad, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, @@ -4670,405 +4788,445 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xf4, 0x03, - 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, - 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, - 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, - 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, - 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, - 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, - 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, - 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, - 0x08, 0x09, 0x10, 0x0a, 0x22, 0xad, 0x0a, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, - 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, - 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, - 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, - 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, - 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, - 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, - 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, - 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, - 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, - 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, - 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, - 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, - 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, - 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, - 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, - 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, - 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, - 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, - 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, - 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, - 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, - 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, - 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, - 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, - 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, - 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, - 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, - 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, - 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, - 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, - 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, - 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, - 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, - 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, - 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, - 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, - 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, - 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, - 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, + 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x52, 0x14, 0x70, + 0x68, 0x70, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, + 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, + 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, + 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, + 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, + 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, + 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, + 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, + 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, + 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, + 0x55, 0x0a, 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, - 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, - 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, + 0x0e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, + 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, + 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, + 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, + 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, + 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, + 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, + 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, + 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, + 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, + 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, + 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, + 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, + 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, + 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, + 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, - 0x80, 0x80, 0x02, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, - 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, - 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, - 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, - 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, - 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, - 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, - 0x54, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, - 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, - 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, - 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, - 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x10, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, - 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, - 0x0b, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8c, 0x0a, 0x0a, - 0x0a, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x8b, 0x01, 0x0a, 0x0e, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, - 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, - 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, - 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, - 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, - 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, 0x65, 0x6e, 0x75, - 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, + 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, + 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, + 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xd8, 0x02, + 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, + 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x55, 0x0a, 0x0f, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, + 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, + 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, + 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, + 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, + 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, + 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, 0x08, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, + 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, + 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, + 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, + 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, + 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, + 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, + 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, + 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, + 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x0a, 0x0a, 0x0a, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x3f, 0x88, 0x01, + 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0d, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x09, + 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, + 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, + 0x09, 0x12, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, + 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x17, 0x72, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, - 0x70, 0x65, 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0b, - 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x09, 0x12, 0x04, - 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x92, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, - 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x27, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, - 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, - 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0x52, - 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x78, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, - 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x23, 0x88, 0x01, 0x01, - 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, - 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, - 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x78, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, - 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x20, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, - 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, - 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7c, 0x0a, 0x0b, 0x6a, 0x73, - 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, - 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x33, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, - 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, - 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, - 0x01, 0x0a, 0x12, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0x52, 0x0a, 0x6a, 0x73, - 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45, - 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, - 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, - 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, - 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, - 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x22, - 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x50, 0x45, - 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, - 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, - 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x43, 0x0a, 0x0e, 0x55, 0x74, 0x66, 0x38, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x54, 0x46, - 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, - 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x53, 0x0a, 0x0f, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, - 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, - 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, - 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, - 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, - 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, - 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, - 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, - 0x10, 0xe9, 0x07, 0x2a, 0x06, 0x08, 0xe9, 0x07, 0x10, 0xea, 0x07, 0x2a, 0x06, 0x08, 0xea, 0x07, - 0x10, 0xeb, 0x07, 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, - 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, 0x07, 0x22, 0xfe, 0x02, 0x0a, 0x12, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, - 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, - 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0x87, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, - 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, - 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, - 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, - 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, - 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, - 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, - 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, - 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, - 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, - 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, - 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, - 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, - 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, - 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, + 0x2d, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, + 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x15, + 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, + 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0xe6, + 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0xb2, + 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x26, 0x88, 0x01, + 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, + 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xb2, 0x01, + 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, 0x98, 0x01, + 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, + 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, + 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0a, + 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, + 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, + 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, + 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, + 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, + 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, + 0x02, 0x22, 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, + 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, + 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, + 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x49, 0x0a, 0x0e, 0x55, 0x74, 0x66, + 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, + 0x54, 0x46, 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, + 0x46, 0x59, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x04, + 0x08, 0x01, 0x10, 0x01, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, + 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, + 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, + 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, + 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, + 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, + 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, + 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x8b, 0x4e, 0x2a, 0x06, 0x08, 0x8b, 0x4e, + 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, + 0x10, 0xe8, 0x07, 0x22, 0xef, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, - 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, - 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, - 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, - 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x2a, 0x92, 0x02, 0x0a, 0x07, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, - 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, - 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, - 0x33, 0x10, 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x32, 0x30, 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, - 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, - 0x59, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, - 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, - 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, - 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, - 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, - 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, - 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, - 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, - 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, - 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf8, 0x01, 0x0a, 0x18, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x14, 0x6f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, + 0x62, 0x6c, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, + 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, + 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, + 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, + 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, + 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, + 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, + 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, + 0x10, 0x02, 0x2a, 0xa7, 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, + 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, + 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, + 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, + 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, + 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, + 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, + 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, + 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, + 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, + 0x4e, 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, + 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, } var ( @@ -5084,8 +5242,8 @@ func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { } var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 17) -var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 32) -var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ +var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 33) +var file_google_protobuf_descriptor_proto_goTypes = []any{ (Edition)(0), // 0: google.protobuf.Edition (ExtensionRangeOptions_VerificationState)(0), // 1: google.protobuf.ExtensionRangeOptions.VerificationState (FieldDescriptorProto_Type)(0), // 2: google.protobuf.FieldDescriptorProto.Type @@ -5131,10 +5289,11 @@ var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ (*ExtensionRangeOptions_Declaration)(nil), // 42: google.protobuf.ExtensionRangeOptions.Declaration (*EnumDescriptorProto_EnumReservedRange)(nil), // 43: google.protobuf.EnumDescriptorProto.EnumReservedRange (*FieldOptions_EditionDefault)(nil), // 44: google.protobuf.FieldOptions.EditionDefault - (*UninterpretedOption_NamePart)(nil), // 45: google.protobuf.UninterpretedOption.NamePart - (*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 46: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - (*SourceCodeInfo_Location)(nil), // 47: google.protobuf.SourceCodeInfo.Location - (*GeneratedCodeInfo_Annotation)(nil), // 48: google.protobuf.GeneratedCodeInfo.Annotation + (*FieldOptions_FeatureSupport)(nil), // 45: google.protobuf.FieldOptions.FeatureSupport + (*UninterpretedOption_NamePart)(nil), // 46: google.protobuf.UninterpretedOption.NamePart + (*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 47: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + (*SourceCodeInfo_Location)(nil), // 48: google.protobuf.SourceCodeInfo.Location + (*GeneratedCodeInfo_Annotation)(nil), // 49: google.protobuf.GeneratedCodeInfo.Annotation } var file_google_protobuf_descriptor_proto_depIdxs = []int32{ 18, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto @@ -5179,40 +5338,46 @@ var file_google_protobuf_descriptor_proto_depIdxs = []int32{ 8, // 39: google.protobuf.FieldOptions.targets:type_name -> google.protobuf.FieldOptions.OptionTargetType 44, // 40: google.protobuf.FieldOptions.edition_defaults:type_name -> google.protobuf.FieldOptions.EditionDefault 36, // 41: google.protobuf.FieldOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 42: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 36, // 43: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 44: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 36, // 45: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 46: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 36, // 47: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 48: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 36, // 49: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 50: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 9, // 51: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel - 36, // 52: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 53: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 45, // 54: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart - 10, // 55: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence - 11, // 56: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType - 12, // 57: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding - 13, // 58: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation - 14, // 59: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding - 15, // 60: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat - 46, // 61: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - 0, // 62: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition - 0, // 63: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition - 47, // 64: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location - 48, // 65: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation - 20, // 66: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions - 0, // 67: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition - 0, // 68: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition - 36, // 69: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features:type_name -> google.protobuf.FeatureSet - 16, // 70: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic - 71, // [71:71] is the sub-list for method output_type - 71, // [71:71] is the sub-list for method input_type - 71, // [71:71] is the sub-list for extension type_name - 71, // [71:71] is the sub-list for extension extendee - 0, // [0:71] is the sub-list for field type_name + 45, // 42: google.protobuf.FieldOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport + 35, // 43: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 44: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 45: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 46: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 47: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 48: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet + 45, // 49: google.protobuf.EnumValueOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport + 35, // 50: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 51: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 52: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 9, // 53: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel + 36, // 54: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 55: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 46, // 56: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart + 10, // 57: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence + 11, // 58: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType + 12, // 59: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding + 13, // 60: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation + 14, // 61: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding + 15, // 62: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat + 47, // 63: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + 0, // 64: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition + 0, // 65: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition + 48, // 66: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location + 49, // 67: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation + 20, // 68: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions + 0, // 69: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition + 0, // 70: google.protobuf.FieldOptions.FeatureSupport.edition_introduced:type_name -> google.protobuf.Edition + 0, // 71: google.protobuf.FieldOptions.FeatureSupport.edition_deprecated:type_name -> google.protobuf.Edition + 0, // 72: google.protobuf.FieldOptions.FeatureSupport.edition_removed:type_name -> google.protobuf.Edition + 0, // 73: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition + 36, // 74: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features:type_name -> google.protobuf.FeatureSet + 36, // 75: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features:type_name -> google.protobuf.FeatureSet + 16, // 76: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic + 77, // [77:77] is the sub-list for method output_type + 77, // [77:77] is the sub-list for method input_type + 77, // [77:77] is the sub-list for extension type_name + 77, // [77:77] is the sub-list for extension extendee + 0, // [0:77] is the sub-list for field type_name } func init() { file_google_protobuf_descriptor_proto_init() } @@ -5221,7 +5386,7 @@ func file_google_protobuf_descriptor_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FileDescriptorSet); i { case 0: return &v.state @@ -5233,7 +5398,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FileDescriptorProto); i { case 0: return &v.state @@ -5245,7 +5410,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto); i { case 0: return &v.state @@ -5257,7 +5422,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ExtensionRangeOptions); i { case 0: return &v.state @@ -5271,7 +5436,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*FieldDescriptorProto); i { case 0: return &v.state @@ -5283,7 +5448,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*OneofDescriptorProto); i { case 0: return &v.state @@ -5295,7 +5460,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*EnumDescriptorProto); i { case 0: return &v.state @@ -5307,7 +5472,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*EnumValueDescriptorProto); i { case 0: return &v.state @@ -5319,7 +5484,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*ServiceDescriptorProto); i { case 0: return &v.state @@ -5331,7 +5496,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*MethodDescriptorProto); i { case 0: return &v.state @@ -5343,7 +5508,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*FileOptions); i { case 0: return &v.state @@ -5357,7 +5522,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*MessageOptions); i { case 0: return &v.state @@ -5371,7 +5536,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions); i { case 0: return &v.state @@ -5385,7 +5550,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*OneofOptions); i { case 0: return &v.state @@ -5399,7 +5564,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*EnumOptions); i { case 0: return &v.state @@ -5413,7 +5578,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*EnumValueOptions); i { case 0: return &v.state @@ -5427,7 +5592,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*ServiceOptions); i { case 0: return &v.state @@ -5441,7 +5606,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*MethodOptions); i { case 0: return &v.state @@ -5455,7 +5620,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*UninterpretedOption); i { case 0: return &v.state @@ -5467,7 +5632,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*FeatureSet); i { case 0: return &v.state @@ -5481,7 +5646,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*FeatureSetDefaults); i { case 0: return &v.state @@ -5493,7 +5658,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*SourceCodeInfo); i { case 0: return &v.state @@ -5505,7 +5670,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*GeneratedCodeInfo); i { case 0: return &v.state @@ -5517,7 +5682,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto_ExtensionRange); i { case 0: return &v.state @@ -5529,7 +5694,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto_ReservedRange); i { case 0: return &v.state @@ -5541,7 +5706,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*ExtensionRangeOptions_Declaration); i { case 0: return &v.state @@ -5553,7 +5718,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*EnumDescriptorProto_EnumReservedRange); i { case 0: return &v.state @@ -5565,7 +5730,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions_EditionDefault); i { case 0: return &v.state @@ -5577,7 +5742,19 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*FieldOptions_FeatureSupport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*UninterpretedOption_NamePart); i { case 0: return &v.state @@ -5589,7 +5766,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*FeatureSetDefaults_FeatureSetEditionDefault); i { case 0: return &v.state @@ -5601,7 +5778,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*SourceCodeInfo_Location); i { case 0: return &v.state @@ -5613,7 +5790,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*GeneratedCodeInfo_Annotation); i { case 0: return &v.state @@ -5632,7 +5809,7 @@ func file_google_protobuf_descriptor_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc, NumEnums: 17, - NumMessages: 32, + NumMessages: 33, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/pkg/k8s/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go index 25de5ae0085..a2ca940c50f 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go @@ -6,9 +6,9 @@ // https://developers.google.com/open-source/licenses/bsd // Code generated by protoc-gen-go. DO NOT EDIT. -// source: reflect/protodesc/proto/go_features.proto +// source: google/protobuf/go_features.proto -package proto +package gofeaturespb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -30,7 +30,7 @@ type GoFeatures struct { func (x *GoFeatures) Reset() { *x = GoFeatures{} if protoimpl.UnsafeEnabled { - mi := &file_reflect_protodesc_proto_go_features_proto_msgTypes[0] + mi := &file_google_protobuf_go_features_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -43,7 +43,7 @@ func (x *GoFeatures) String() string { func (*GoFeatures) ProtoMessage() {} func (x *GoFeatures) ProtoReflect() protoreflect.Message { - mi := &file_reflect_protodesc_proto_go_features_proto_msgTypes[0] + mi := &file_google_protobuf_go_features_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -56,7 +56,7 @@ func (x *GoFeatures) ProtoReflect() protoreflect.Message { // Deprecated: Use GoFeatures.ProtoReflect.Descriptor instead. func (*GoFeatures) Descriptor() ([]byte, []int) { - return file_reflect_protodesc_proto_go_features_proto_rawDescGZIP(), []int{0} + return file_google_protobuf_go_features_proto_rawDescGZIP(), []int{0} } func (x *GoFeatures) GetLegacyUnmarshalJsonEnum() bool { @@ -66,69 +66,73 @@ func (x *GoFeatures) GetLegacyUnmarshalJsonEnum() bool { return false } -var file_reflect_protodesc_proto_go_features_proto_extTypes = []protoimpl.ExtensionInfo{ +var file_google_protobuf_go_features_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.FeatureSet)(nil), ExtensionType: (*GoFeatures)(nil), Field: 1002, - Name: "google.protobuf.go", + Name: "pb.go", Tag: "bytes,1002,opt,name=go", - Filename: "reflect/protodesc/proto/go_features.proto", + Filename: "google/protobuf/go_features.proto", }, } // Extension fields to descriptorpb.FeatureSet. var ( - // optional google.protobuf.GoFeatures go = 1002; - E_Go = &file_reflect_protodesc_proto_go_features_proto_extTypes[0] + // optional pb.GoFeatures go = 1002; + E_Go = &file_google_protobuf_go_features_proto_extTypes[0] ) -var File_reflect_protodesc_proto_go_features_proto protoreflect.FileDescriptor - -var file_reflect_protodesc_proto_go_features_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x64, - 0x65, 0x73, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a, 0x20, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, - 0x0a, 0x0a, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x1a, - 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, - 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x1f, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, 0x75, - 0x65, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, 0xe7, - 0x07, 0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, - 0x61, 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x49, 0x0a, 0x02, 0x67, 0x6f, - 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x64, 0x65, 0x73, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, +var File_google_protobuf_go_features_proto protoreflect.FileDescriptor + +var file_google_protobuf_go_features_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0a, 0x47, 0x6f, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xbe, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73, + 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x80, 0x01, + 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, + 0x75, 0x65, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, + 0xe7, 0x07, 0xb2, 0x01, 0x5b, 0x08, 0xe8, 0x07, 0x10, 0xe8, 0x07, 0x1a, 0x53, 0x54, 0x68, 0x65, + 0x20, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x20, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, + 0x6c, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, + 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, + 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, + 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, + 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x62, } var ( - file_reflect_protodesc_proto_go_features_proto_rawDescOnce sync.Once - file_reflect_protodesc_proto_go_features_proto_rawDescData = file_reflect_protodesc_proto_go_features_proto_rawDesc + file_google_protobuf_go_features_proto_rawDescOnce sync.Once + file_google_protobuf_go_features_proto_rawDescData = file_google_protobuf_go_features_proto_rawDesc ) -func file_reflect_protodesc_proto_go_features_proto_rawDescGZIP() []byte { - file_reflect_protodesc_proto_go_features_proto_rawDescOnce.Do(func() { - file_reflect_protodesc_proto_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(file_reflect_protodesc_proto_go_features_proto_rawDescData) +func file_google_protobuf_go_features_proto_rawDescGZIP() []byte { + file_google_protobuf_go_features_proto_rawDescOnce.Do(func() { + file_google_protobuf_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_go_features_proto_rawDescData) }) - return file_reflect_protodesc_proto_go_features_proto_rawDescData + return file_google_protobuf_go_features_proto_rawDescData } -var file_reflect_protodesc_proto_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_reflect_protodesc_proto_go_features_proto_goTypes = []interface{}{ - (*GoFeatures)(nil), // 0: google.protobuf.GoFeatures +var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_protobuf_go_features_proto_goTypes = []any{ + (*GoFeatures)(nil), // 0: pb.GoFeatures (*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet } -var file_reflect_protodesc_proto_go_features_proto_depIdxs = []int32{ - 1, // 0: google.protobuf.go:extendee -> google.protobuf.FeatureSet - 0, // 1: google.protobuf.go:type_name -> google.protobuf.GoFeatures +var file_google_protobuf_go_features_proto_depIdxs = []int32{ + 1, // 0: pb.go:extendee -> google.protobuf.FeatureSet + 0, // 1: pb.go:type_name -> pb.GoFeatures 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 1, // [1:2] is the sub-list for extension type_name @@ -136,13 +140,13 @@ var file_reflect_protodesc_proto_go_features_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_reflect_protodesc_proto_go_features_proto_init() } -func file_reflect_protodesc_proto_go_features_proto_init() { - if File_reflect_protodesc_proto_go_features_proto != nil { +func init() { file_google_protobuf_go_features_proto_init() } +func file_google_protobuf_go_features_proto_init() { + if File_google_protobuf_go_features_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_reflect_protodesc_proto_go_features_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GoFeatures); i { case 0: return &v.state @@ -159,19 +163,19 @@ func file_reflect_protodesc_proto_go_features_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_reflect_protodesc_proto_go_features_proto_rawDesc, + RawDescriptor: file_google_protobuf_go_features_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 1, NumServices: 0, }, - GoTypes: file_reflect_protodesc_proto_go_features_proto_goTypes, - DependencyIndexes: file_reflect_protodesc_proto_go_features_proto_depIdxs, - MessageInfos: file_reflect_protodesc_proto_go_features_proto_msgTypes, - ExtensionInfos: file_reflect_protodesc_proto_go_features_proto_extTypes, + GoTypes: file_google_protobuf_go_features_proto_goTypes, + DependencyIndexes: file_google_protobuf_go_features_proto_depIdxs, + MessageInfos: file_google_protobuf_go_features_proto_msgTypes, + ExtensionInfos: file_google_protobuf_go_features_proto_extTypes, }.Build() - File_reflect_protodesc_proto_go_features_proto = out.File - file_reflect_protodesc_proto_go_features_proto_rawDesc = nil - file_reflect_protodesc_proto_go_features_proto_goTypes = nil - file_reflect_protodesc_proto_go_features_proto_depIdxs = nil + File_google_protobuf_go_features_proto = out.File + file_google_protobuf_go_features_proto_rawDesc = nil + file_google_protobuf_go_features_proto_goTypes = nil + file_google_protobuf_go_features_proto_depIdxs = nil } diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto b/pkg/k8s/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto deleted file mode 100644 index d246571296e..00000000000 --- a/pkg/k8s/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto +++ /dev/null @@ -1,28 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2023 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -syntax = "proto2"; - -package google.protobuf; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/protobuf/types/gofeaturespb"; - -extend google.protobuf.FeatureSet { - optional GoFeatures go = 1002; -} - -message GoFeatures { - // Whether or not to generate the deprecated UnmarshalJSON method for enums. - optional bool legacy_unmarshal_json_enum = 1 [ - retention = RETENTION_RUNTIME, - targets = TARGET_TYPE_ENUM, - edition_defaults = { edition: EDITION_PROTO2, value: "true" }, - edition_defaults = { edition: EDITION_PROTO3, value: "false" } - ]; -} diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/pkg/k8s/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go index 9de51be5403..7172b43d383 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go @@ -445,7 +445,7 @@ func file_google_protobuf_any_proto_rawDescGZIP() []byte { } var file_google_protobuf_any_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_any_proto_goTypes = []interface{}{ +var file_google_protobuf_any_proto_goTypes = []any{ (*Any)(nil), // 0: google.protobuf.Any } var file_google_protobuf_any_proto_depIdxs = []int32{ @@ -462,7 +462,7 @@ func file_google_protobuf_any_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Any); i { case 0: return &v.state diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/pkg/k8s/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go index df709a8dd4c..1b71bcd910a 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go @@ -323,7 +323,7 @@ func file_google_protobuf_duration_proto_rawDescGZIP() []byte { } var file_google_protobuf_duration_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_duration_proto_goTypes = []interface{}{ +var file_google_protobuf_duration_proto_goTypes = []any{ (*Duration)(nil), // 0: google.protobuf.Duration } var file_google_protobuf_duration_proto_depIdxs = []int32{ @@ -340,7 +340,7 @@ func file_google_protobuf_duration_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Duration); i { case 0: return &v.state diff --git a/pkg/k8s/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/pkg/k8s/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go index 81511a3363e..83a5a645b08 100644 --- a/pkg/k8s/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go +++ b/pkg/k8s/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go @@ -332,7 +332,7 @@ func file_google_protobuf_timestamp_proto_rawDescGZIP() []byte { } var file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_timestamp_proto_goTypes = []interface{}{ +var file_google_protobuf_timestamp_proto_goTypes = []any{ (*Timestamp)(nil), // 0: google.protobuf.Timestamp } var file_google_protobuf_timestamp_proto_depIdxs = []int32{ @@ -349,7 +349,7 @@ func file_google_protobuf_timestamp_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Timestamp); i { case 0: return &v.state diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go index 9a2d0bccdda..09295734dfe 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1/generated.proto +// source: k8s.io/api/admissionregistration/v1/generated.proto package v1 @@ -25,6 +25,7 @@ import ( io "io" proto "github.com/gogo/protobuf/proto" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" @@ -44,10 +45,66 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } +func (*AuditAnnotation) ProtoMessage() {} +func (*AuditAnnotation) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{0} +} +func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AuditAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *AuditAnnotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_AuditAnnotation.Merge(m, src) +} +func (m *AuditAnnotation) XXX_Size() int { + return m.Size() +} +func (m *AuditAnnotation) XXX_DiscardUnknown() { + xxx_messageInfo_AuditAnnotation.DiscardUnknown(m) +} + +var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo + +func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } +func (*ExpressionWarning) ProtoMessage() {} +func (*ExpressionWarning) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{1} +} +func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExpressionWarning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ExpressionWarning) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExpressionWarning.Merge(m, src) +} +func (m *ExpressionWarning) XXX_Size() int { + return m.Size() +} +func (m *ExpressionWarning) XXX_DiscardUnknown() { + xxx_messageInfo_ExpressionWarning.DiscardUnknown(m) +} + +var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo + func (m *MatchCondition) Reset() { *m = MatchCondition{} } func (*MatchCondition) ProtoMessage() {} func (*MatchCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{0} + return fileDescriptor_3205c7dc5bf0c9bf, []int{2} } func (m *MatchCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -72,10 +129,38 @@ func (m *MatchCondition) XXX_DiscardUnknown() { var xxx_messageInfo_MatchCondition proto.InternalMessageInfo +func (m *MatchResources) Reset() { *m = MatchResources{} } +func (*MatchResources) ProtoMessage() {} +func (*MatchResources) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{3} +} +func (m *MatchResources) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MatchResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MatchResources) XXX_Merge(src proto.Message) { + xxx_messageInfo_MatchResources.Merge(m, src) +} +func (m *MatchResources) XXX_Size() int { + return m.Size() +} +func (m *MatchResources) XXX_DiscardUnknown() { + xxx_messageInfo_MatchResources.DiscardUnknown(m) +} + +var xxx_messageInfo_MatchResources proto.InternalMessageInfo + func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } func (*MutatingWebhook) ProtoMessage() {} func (*MutatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{1} + return fileDescriptor_3205c7dc5bf0c9bf, []int{4} } func (m *MutatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +188,7 @@ var xxx_messageInfo_MutatingWebhook proto.InternalMessageInfo func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} } func (*MutatingWebhookConfiguration) ProtoMessage() {} func (*MutatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{2} + return fileDescriptor_3205c7dc5bf0c9bf, []int{5} } func (m *MutatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +216,7 @@ var xxx_messageInfo_MutatingWebhookConfiguration proto.InternalMessageInfo func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} } func (*MutatingWebhookConfigurationList) ProtoMessage() {} func (*MutatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{3} + return fileDescriptor_3205c7dc5bf0c9bf, []int{6} } func (m *MutatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -156,10 +241,94 @@ func (m *MutatingWebhookConfigurationList) XXX_DiscardUnknown() { var xxx_messageInfo_MutatingWebhookConfigurationList proto.InternalMessageInfo +func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } +func (*NamedRuleWithOperations) ProtoMessage() {} +func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{7} +} +func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedRuleWithOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedRuleWithOperations) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedRuleWithOperations.Merge(m, src) +} +func (m *NamedRuleWithOperations) XXX_Size() int { + return m.Size() +} +func (m *NamedRuleWithOperations) XXX_DiscardUnknown() { + xxx_messageInfo_NamedRuleWithOperations.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo + +func (m *ParamKind) Reset() { *m = ParamKind{} } +func (*ParamKind) ProtoMessage() {} +func (*ParamKind) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{8} +} +func (m *ParamKind) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParamKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ParamKind) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParamKind.Merge(m, src) +} +func (m *ParamKind) XXX_Size() int { + return m.Size() +} +func (m *ParamKind) XXX_DiscardUnknown() { + xxx_messageInfo_ParamKind.DiscardUnknown(m) +} + +var xxx_messageInfo_ParamKind proto.InternalMessageInfo + +func (m *ParamRef) Reset() { *m = ParamRef{} } +func (*ParamRef) ProtoMessage() {} +func (*ParamRef) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{9} +} +func (m *ParamRef) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParamRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ParamRef) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParamRef.Merge(m, src) +} +func (m *ParamRef) XXX_Size() int { + return m.Size() +} +func (m *ParamRef) XXX_DiscardUnknown() { + xxx_messageInfo_ParamRef.DiscardUnknown(m) +} + +var xxx_messageInfo_ParamRef proto.InternalMessageInfo + func (m *Rule) Reset() { *m = Rule{} } func (*Rule) ProtoMessage() {} func (*Rule) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{4} + return fileDescriptor_3205c7dc5bf0c9bf, []int{10} } func (m *Rule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +356,7 @@ var xxx_messageInfo_Rule proto.InternalMessageInfo func (m *RuleWithOperations) Reset() { *m = RuleWithOperations{} } func (*RuleWithOperations) ProtoMessage() {} func (*RuleWithOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{5} + return fileDescriptor_3205c7dc5bf0c9bf, []int{11} } func (m *RuleWithOperations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +384,7 @@ var xxx_messageInfo_RuleWithOperations proto.InternalMessageInfo func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{6} + return fileDescriptor_3205c7dc5bf0c9bf, []int{12} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -240,10 +409,234 @@ func (m *ServiceReference) XXX_DiscardUnknown() { var xxx_messageInfo_ServiceReference proto.InternalMessageInfo +func (m *TypeChecking) Reset() { *m = TypeChecking{} } +func (*TypeChecking) ProtoMessage() {} +func (*TypeChecking) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{13} +} +func (m *TypeChecking) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TypeChecking) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *TypeChecking) XXX_Merge(src proto.Message) { + xxx_messageInfo_TypeChecking.Merge(m, src) +} +func (m *TypeChecking) XXX_Size() int { + return m.Size() +} +func (m *TypeChecking) XXX_DiscardUnknown() { + xxx_messageInfo_TypeChecking.DiscardUnknown(m) +} + +var xxx_messageInfo_TypeChecking proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } +func (*ValidatingAdmissionPolicy) ProtoMessage() {} +func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{14} +} +func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicy.Merge(m, src) +} +func (m *ValidatingAdmissionPolicy) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } +func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} +func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{15} +} +func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicyBinding.Merge(m, src) +} +func (m *ValidatingAdmissionPolicyBinding) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicyBinding) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicyBinding.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } +func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} +func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{16} +} +func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicyBindingList.Merge(m, src) +} +func (m *ValidatingAdmissionPolicyBindingList) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicyBindingList.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } +func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} +func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{17} +} +func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.Merge(m, src) +} +func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } +func (*ValidatingAdmissionPolicyList) ProtoMessage() {} +func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{18} +} +func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicyList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicyList.Merge(m, src) +} +func (m *ValidatingAdmissionPolicyList) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicyList) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicyList.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } +func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} +func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{19} +} +func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicySpec.Merge(m, src) +} +func (m *ValidatingAdmissionPolicySpec) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicySpec) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicySpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } +func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} +func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{20} +} +func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicyStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicyStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicyStatus.Merge(m, src) +} +func (m *ValidatingAdmissionPolicyStatus) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicyStatus) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicyStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo + func (m *ValidatingWebhook) Reset() { *m = ValidatingWebhook{} } func (*ValidatingWebhook) ProtoMessage() {} func (*ValidatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{7} + return fileDescriptor_3205c7dc5bf0c9bf, []int{21} } func (m *ValidatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +664,7 @@ var xxx_messageInfo_ValidatingWebhook proto.InternalMessageInfo func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} } func (*ValidatingWebhookConfiguration) ProtoMessage() {} func (*ValidatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{8} + return fileDescriptor_3205c7dc5bf0c9bf, []int{22} } func (m *ValidatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +692,7 @@ var xxx_messageInfo_ValidatingWebhookConfiguration proto.InternalMessageInfo func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} } func (*ValidatingWebhookConfigurationList) ProtoMessage() {} func (*ValidatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{9} + return fileDescriptor_3205c7dc5bf0c9bf, []int{23} } func (m *ValidatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -324,10 +717,66 @@ func (m *ValidatingWebhookConfigurationList) XXX_DiscardUnknown() { var xxx_messageInfo_ValidatingWebhookConfigurationList proto.InternalMessageInfo +func (m *Validation) Reset() { *m = Validation{} } +func (*Validation) ProtoMessage() {} +func (*Validation) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{24} +} +func (m *Validation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Validation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Validation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Validation.Merge(m, src) +} +func (m *Validation) XXX_Size() int { + return m.Size() +} +func (m *Validation) XXX_DiscardUnknown() { + xxx_messageInfo_Validation.DiscardUnknown(m) +} + +var xxx_messageInfo_Validation proto.InternalMessageInfo + +func (m *Variable) Reset() { *m = Variable{} } +func (*Variable) ProtoMessage() {} +func (*Variable) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{25} +} +func (m *Variable) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Variable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Variable) XXX_Merge(src proto.Message) { + xxx_messageInfo_Variable.Merge(m, src) +} +func (m *Variable) XXX_Size() int { + return m.Size() +} +func (m *Variable) XXX_DiscardUnknown() { + xxx_messageInfo_Variable.DiscardUnknown(m) +} + +var xxx_messageInfo_Variable proto.InternalMessageInfo + func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{10} + return fileDescriptor_3205c7dc5bf0c9bf, []int{26} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -353,99 +802,237 @@ func (m *WebhookClientConfig) XXX_DiscardUnknown() { var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo func init() { + proto.RegisterType((*AuditAnnotation)(nil), "k8s.io.api.admissionregistration.v1.AuditAnnotation") + proto.RegisterType((*ExpressionWarning)(nil), "k8s.io.api.admissionregistration.v1.ExpressionWarning") proto.RegisterType((*MatchCondition)(nil), "k8s.io.api.admissionregistration.v1.MatchCondition") + proto.RegisterType((*MatchResources)(nil), "k8s.io.api.admissionregistration.v1.MatchResources") proto.RegisterType((*MutatingWebhook)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhook") proto.RegisterType((*MutatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhookConfiguration") proto.RegisterType((*MutatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhookConfigurationList") + proto.RegisterType((*NamedRuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1.NamedRuleWithOperations") + proto.RegisterType((*ParamKind)(nil), "k8s.io.api.admissionregistration.v1.ParamKind") + proto.RegisterType((*ParamRef)(nil), "k8s.io.api.admissionregistration.v1.ParamRef") proto.RegisterType((*Rule)(nil), "k8s.io.api.admissionregistration.v1.Rule") proto.RegisterType((*RuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1.RuleWithOperations") proto.RegisterType((*ServiceReference)(nil), "k8s.io.api.admissionregistration.v1.ServiceReference") + proto.RegisterType((*TypeChecking)(nil), "k8s.io.api.admissionregistration.v1.TypeChecking") + proto.RegisterType((*ValidatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicy") + proto.RegisterType((*ValidatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding") + proto.RegisterType((*ValidatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingList") + proto.RegisterType((*ValidatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec") + proto.RegisterType((*ValidatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyList") + proto.RegisterType((*ValidatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicySpec") + proto.RegisterType((*ValidatingAdmissionPolicyStatus)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyStatus") proto.RegisterType((*ValidatingWebhook)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhook") proto.RegisterType((*ValidatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhookConfiguration") proto.RegisterType((*ValidatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhookConfigurationList") + proto.RegisterType((*Validation)(nil), "k8s.io.api.admissionregistration.v1.Validation") + proto.RegisterType((*Variable)(nil), "k8s.io.api.admissionregistration.v1.Variable") proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.api.admissionregistration.v1.WebhookClientConfig") } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1/generated.proto", fileDescriptor_aaac5994f79683e8) -} - -var fileDescriptor_aaac5994f79683e8 = []byte{ - // 1169 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0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 0xde, 0x96, 0x95, - 0x66, 0x45, 0x3d, 0x52, 0x6b, 0x3b, 0xc2, 0x50, 0x62, 0x6d, 0xee, 0xbc, 0x3e, 0xae, 0x2e, 0xbd, - 0x39, 0xae, 0x2e, 0x1d, 0x1d, 0x57, 0x97, 0x7e, 0x0c, 0xab, 0xc6, 0xeb, 0xb0, 0x6a, 0xbc, 0x09, - 0xab, 0xc6, 0x51, 0x58, 0x35, 0xfe, 0x0a, 0xab, 0xc6, 0x4f, 0x7f, 0x57, 0x97, 0xbe, 0xbb, 0x99, - 0xe1, 0xbf, 0x04, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xe1, 0x3a, 0x73, 0x64, 0x10, 0x00, - 0x00, + proto.RegisterFile("k8s.io/api/admissionregistration/v1/generated.proto", fileDescriptor_3205c7dc5bf0c9bf) +} + +var fileDescriptor_3205c7dc5bf0c9bf = []byte{ + // 2075 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xf7, 0x8a, 0x94, 0x44, 0x3e, 0xea, 0x8b, 0x13, 0x27, 0xa2, 0x1d, 0x87, 0x2b, 0x6c, 0x82, + 0xc2, 0x46, 0x63, 0x32, 0xb2, 0x53, 0x27, 0x08, 0x8a, 0x06, 0xa2, 0xfc, 0x01, 0xc5, 0x96, 0x2d, + 0x8c, 0x12, 0xa9, 0x68, 0xdd, 0x22, 0xab, 0xdd, 0x21, 0xb9, 0x11, 0xb9, 0xbb, 0xd8, 0xd9, 0x65, + 0xac, 0x9e, 0x8a, 0xf6, 0x5e, 0x14, 0xe8, 0x5f, 0xd0, 0xfe, 0x09, 0xbd, 0xb4, 0x40, 0x4f, 0xbd, + 0xf9, 0x52, 0x20, 0x3d, 0xd5, 0x87, 0x62, 0x51, 0xb3, 0x97, 0x1e, 0x7a, 0x68, 0xaf, 0x02, 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f, 0x2e, 0xdd, 0x25, 0x47, 0x98, 0xd1, 0xd1, 0x06, 0x2c, 0x8f, 0xd4, 0x81, 0x47, + 0x6e, 0x3d, 0xb2, 0x1d, 0xc2, 0x23, 0xd4, 0x98, 0xe1, 0xa2, 0xab, 0x42, 0x74, 0x79, 0x2f, 0xcd, + 0xc6, 0x59, 0x79, 0x65, 0x00, 0xf5, 0xf8, 0x6b, 0x5f, 0x75, 0x4c, 0xc3, 0xec, 0xa1, 0xf7, 0xa1, + 0xd2, 0x35, 0xc8, 0x40, 0xc7, 0xa4, 0x2b, 0x00, 0x57, 0x04, 0x60, 0xe5, 0xb6, 0xa0, 0xe3, 0x48, + 0x02, 0x5d, 0x81, 0xf9, 0xaf, 0x03, 0xc5, 0x46, 0x89, 0x0b, 0x2f, 0x0b, 0xe1, 0x79, 0x81, 0x87, + 0x43, 0xbe, 0xd2, 0x85, 0xa5, 0x6d, 0xd5, 0xd5, 0xfa, 0x9b, 0x96, 0xa9, 0x1b, 0xdc, 0xc3, 0x35, + 0x28, 0x9b, 0xea, 0x90, 0x08, 0x17, 0x17, 0x84, 0x66, 0xf9, 0xbe, 0x3a, 0x24, 0x98, 0x73, 0xd0, + 0x35, 0x00, 0x92, 0xf5, 0x0f, 0x09, 0x39, 0x48, 0xb8, 0x96, 0x90, 0x52, 0xfe, 0x54, 0x16, 0x86, + 0x30, 0xa1, 0x96, 0xe7, 0x68, 0x84, 0xa2, 0x47, 0x50, 0x67, 0x70, 0xd4, 0x56, 0x35, 0xb2, 0x4b, + 0x06, 0x44, 0x73, 0x2d, 0x87, 0x5b, 0xad, 0x5d, 0xbb, 0xde, 0x8a, 0x93, 0x2d, 0xda, 0xb1, 0x96, + 0x7d, 0xd8, 0x63, 0x04, 0xda, 0x62, 0x89, 0xd1, 0x1a, 0xad, 0xb7, 0xee, 0xa9, 0x07, 0x64, 0x10, + 0xaa, 0x76, 0xde, 0x1c, 0xfb, 0x72, 0xfd, 0x7e, 0x16, 0x11, 0x4f, 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 0xa7, 0xae, 0x77, 0xd7, 0x26, 0x5a, + 0xbc, 0x6f, 0xec, 0x0b, 0x73, 0x74, 0x34, 0x80, 0x39, 0xea, 0xaa, 0xae, 0x47, 0xc5, 0xdd, 0x72, + 0xf3, 0x05, 0xed, 0x70, 0xac, 0xce, 0x92, 0xb0, 0x34, 0x17, 0x7c, 0x63, 0x61, 0x43, 0xf9, 0xb7, + 0x04, 0x6b, 0x53, 0x75, 0x3b, 0x86, 0xa9, 0xb3, 0xdd, 0x7f, 0xf5, 0xa1, 0x3d, 0x4c, 0x85, 0x76, + 0xeb, 0xc5, 0x5c, 0x16, 0xcb, 0x9e, 0x16, 0x61, 0xe5, 0x5f, 0x12, 0xbc, 0x77, 0x92, 0xf2, 0x19, + 0x34, 0x13, 0x5f, 0xa5, 0x9b, 0x89, 0x5b, 0x2f, 0xc5, 0xe9, 0x29, 0x0d, 0xc5, 0x7f, 0x66, 0x4e, + 0x76, 0x99, 0x45, 0x88, 0x55, 0x64, 0x9b, 0x13, 0xef, 0xc7, 0x45, 0x33, 0xda, 0xba, 0x9d, 0x88, + 0x83, 0x13, 0x52, 0x68, 0x1f, 0x2a, 0xb6, 0x28, 0xb7, 0x62, 0x03, 0xaf, 0x16, 0xf2, 0x25, 0xac, + 0xd1, 0x41, 0x25, 0x0c, 0xbf, 0x70, 0x04, 0xc6, 0x1e, 0x3c, 0xc3, 0xd4, 0x54, 0x25, 0xa7, 0xdc, + 0x9e, 0xd0, 0x43, 0x47, 0xaa, 0xc1, 0x73, 0x23, 0x4d, 0xc3, 0x19, 0x78, 0xb4, 0x0f, 0xf5, 0x91, + 0x88, 0x92, 0x65, 0x06, 0x85, 0x31, 0x18, 0x25, 0x54, 0x3b, 0x57, 0xd8, 0x33, 0x6d, 0x2f, 0xcb, + 0x3c, 0xf6, 0xe5, 0x95, 0x2c, 0x11, 0x4f, 0x62, 0x28, 0x63, 0x09, 0xde, 0x99, 0x1a, 0xff, 0x33, + 0xc8, 0x35, 0x2d, 0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x17, 0xc4, 0x6a, 0xea, 0xdb, 0x59, 0x01, 0x3c, 0xa9, 0xa3, 0x7c, 0x06, 0x95, 0xb0, 0xfe, 0xa3, + 0x06, 0x94, 0x13, 0x2f, 0xa5, 0xc0, 0x71, 0x4e, 0xc9, 0x04, 0x66, 0x26, 0x3f, 0x30, 0xca, 0xef, + 0x25, 0x78, 0x23, 0xa7, 0x0a, 0xa1, 0x0b, 0x50, 0xf2, 0x9c, 0x81, 0x08, 0xc1, 0xfc, 0xd8, 0x97, + 0x4b, 0x5f, 0xe0, 0x7b, 0x98, 0xd1, 0xd0, 0x43, 0x98, 0xa7, 0xc1, 0xfc, 0x48, 0xe4, 0xd1, 0x77, + 0x0a, 0x6d, 0x76, 0x76, 0xe6, 0xd4, 0xa9, 0xb1, 0xf0, 0x87, 0xd4, 0x10, 0x12, 0x5d, 0x86, 0x8a, + 0xa6, 0x76, 0x3c, 0x53, 0x17, 0xf3, 0xae, 0x85, 0xe0, 0x75, 0xb6, 0xb9, 0x11, 0xd0, 0x70, 0xc4, + 0xed, 0x6c, 0x3d, 0x7e, 0xda, 0x3c, 0xf7, 0xcd, 0xd3, 0xe6, 0xb9, 0x27, 0x4f, 0x9b, 0xe7, 0x7e, + 0x3a, 0x6e, 0x4a, 0x8f, 0xc7, 0x4d, 0xe9, 0x9b, 0x71, 0x53, 0x7a, 0x32, 0x6e, 0x4a, 0x7f, 0x1b, + 0x37, 0xa5, 0x5f, 0xfe, 0xbd, 0x79, 0xee, 0x07, 0xef, 0x16, 0xf8, 0x6f, 0x8c, 0xff, 0x05, 0x00, + 0x00, 0xff, 0xff, 0x1e, 0x59, 0xab, 0xd9, 0xb3, 0x21, 0x00, 0x00, +} + +func (m *AuditAnnotation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AuditAnnotation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AuditAnnotation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.ValueExpression) + copy(dAtA[i:], m.ValueExpression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ValueExpression))) + i-- + dAtA[i] = 0x12 + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ExpressionWarning) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExpressionWarning) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExpressionWarning) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Warning) + copy(dAtA[i:], m.Warning) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Warning))) + i-- + dAtA[i] = 0x1a + i -= len(m.FieldRef) + copy(dAtA[i:], m.FieldRef) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldRef))) + i-- + dAtA[i] = 0x12 + return len(dAtA) - i, nil } func (m *MatchCondition) Marshal() (dAtA []byte, err error) { @@ -481,6 +1068,88 @@ func (m *MatchCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MatchResources) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MatchResources) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MatchResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MatchPolicy != nil { + i -= len(*m.MatchPolicy) + copy(dAtA[i:], *m.MatchPolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchPolicy))) + i-- + dAtA[i] = 0x3a + } + if len(m.ExcludeResourceRules) > 0 { + for iNdEx := len(m.ExcludeResourceRules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExcludeResourceRules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.ResourceRules) > 0 { + for iNdEx := len(m.ResourceRules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ResourceRules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.ObjectSelector != nil { + { + size, err := m.ObjectSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.NamespaceSelector != nil { + { + size, err := m.NamespaceSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *MutatingWebhook) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -707,6 +1376,133 @@ func (m *MutatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *NamedRuleWithOperations) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NamedRuleWithOperations) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamedRuleWithOperations) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.RuleWithOperations.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.ResourceNames) > 0 { + for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ResourceNames[iNdEx]) + copy(dAtA[i:], m.ResourceNames[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceNames[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ParamKind) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParamKind) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamKind) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Kind) + copy(dAtA[i:], m.Kind) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i-- + dAtA[i] = 0x12 + i -= len(m.APIVersion) + copy(dAtA[i:], m.APIVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ParamRef) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParamRef) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamRef) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ParameterNotFoundAction != nil { + i -= len(*m.ParameterNotFoundAction) + copy(dAtA[i:], *m.ParameterNotFoundAction) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ParameterNotFoundAction))) + i-- + dAtA[i] = 0x22 + } + if m.Selector != nil { + { + size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *Rule) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -851,7 +1647,7 @@ func (m *ServiceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ValidatingWebhook) Marshal() (dAtA []byte, err error) { +func (m *TypeChecking) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -861,20 +1657,20 @@ func (m *ValidatingWebhook) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ValidatingWebhook) MarshalTo(dAtA []byte) (int, error) { +func (m *TypeChecking) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TypeChecking) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.MatchConditions) > 0 { - for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- { + if len(m.ExpressionWarnings) > 0 { + for iNdEx := len(m.ExpressionWarnings) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ExpressionWarnings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -882,84 +1678,87 @@ func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x5a - } - } - if m.ObjectSelector != nil { - { - size, err := m.ObjectSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x52 } - if m.MatchPolicy != nil { - i -= len(*m.MatchPolicy) - copy(dAtA[i:], *m.MatchPolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchPolicy))) - i-- - dAtA[i] = 0x4a + return len(dAtA) - i, nil +} + +func (m *ValidatingAdmissionPolicy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.AdmissionReviewVersions) > 0 { - for iNdEx := len(m.AdmissionReviewVersions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AdmissionReviewVersions[iNdEx]) - copy(dAtA[i:], m.AdmissionReviewVersions[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AdmissionReviewVersions[iNdEx]))) - i-- - dAtA[i] = 0x42 + return dAtA[:n], nil +} + +func (m *ValidatingAdmissionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - if m.TimeoutSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds)) - i-- - dAtA[i] = 0x38 - } - if m.SideEffects != nil { - i -= len(*m.SideEffects) - copy(dAtA[i:], *m.SideEffects) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SideEffects))) - i-- - dAtA[i] = 0x32 - } - if m.NamespaceSelector != nil { - { - size, err := m.NamespaceSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a - } - if m.FailurePolicy != nil { - i -= len(*m.FailurePolicy) - copy(dAtA[i:], *m.FailurePolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy))) - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - if len(m.Rules) > 0 { - for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ValidatingAdmissionPolicyBinding) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ValidatingAdmissionPolicyBinding) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicyBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l { - size, err := m.ClientConfig.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -968,15 +1767,20 @@ func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ValidatingWebhookConfiguration) Marshal() (dAtA []byte, err error) { +func (m *ValidatingAdmissionPolicyBindingList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -986,20 +1790,20 @@ func (m *ValidatingWebhookConfiguration) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ValidatingWebhookConfiguration) MarshalTo(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicyBindingList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicyBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Webhooks) > 0 { - for iNdEx := len(m.Webhooks) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Webhooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1011,7 +1815,7 @@ func (m *ValidatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, } } { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1023,7 +1827,7 @@ func (m *ValidatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *ValidatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) { +func (m *ValidatingAdmissionPolicyBindingSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1033,12 +1837,73 @@ func (m *ValidatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *ValidatingWebhookConfigurationList) MarshalTo(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicyBindingSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicyBindingSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidationActions) > 0 { + for iNdEx := len(m.ValidationActions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ValidationActions[iNdEx]) + copy(dAtA[i:], m.ValidationActions[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ValidationActions[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if m.MatchResources != nil { + { + size, err := m.MatchResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.ParamRef != nil { + { + size, err := m.ParamRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.PolicyName) + copy(dAtA[i:], m.PolicyName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.PolicyName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ValidatingAdmissionPolicyList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatingAdmissionPolicyList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1070,7 +1935,7 @@ func (m *ValidatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } -func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) { +func (m *ValidatingAdmissionPolicySpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1080,33 +1945,94 @@ func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *WebhookClientConfig) MarshalTo(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicySpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *WebhookClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.URL != nil { - i -= len(*m.URL) - copy(dAtA[i:], *m.URL) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.URL))) + if len(m.Variables) > 0 { + for iNdEx := len(m.Variables) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Variables[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.MatchConditions) > 0 { + for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.AuditAnnotations) > 0 { + for iNdEx := len(m.AuditAnnotations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AuditAnnotations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if m.FailurePolicy != nil { + i -= len(*m.FailurePolicy) + copy(dAtA[i:], *m.FailurePolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } - if m.CABundle != nil { - i -= len(m.CABundle) - copy(dAtA[i:], m.CABundle) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) + if len(m.Validations) > 0 { + for iNdEx := len(m.Validations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Validations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.MatchConstraints != nil { + { + size, err := m.MatchConstraints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } - if m.Service != nil { + if m.ParamKind != nil { { - size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ParamKind.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1119,191 +2045,488 @@ func (m *WebhookClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *ValidatingAdmissionPolicyStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MatchCondition) Size() (n int) { - if m == nil { - return 0 - } + +func (m *ValidatingAdmissionPolicyStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicyStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Expression) - n += 1 + l + sovGenerated(uint64(l)) - return n + if len(m.Conditions) > 0 { + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.TypeChecking != nil { + { + size, err := m.TypeChecking.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil } -func (m *MutatingWebhook) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingWebhook) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ValidatingWebhook) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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 len(m.MatchConditions) > 0 { + for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a } } - if m.FailurePolicy != nil { - l = len(*m.FailurePolicy) - n += 1 + l + sovGenerated(uint64(l)) + if m.ObjectSelector != nil { + { + size, err := m.ObjectSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 } - if m.NamespaceSelector != nil { - l = m.NamespaceSelector.Size() - n += 1 + l + sovGenerated(uint64(l)) + if m.MatchPolicy != nil { + i -= len(*m.MatchPolicy) + copy(dAtA[i:], *m.MatchPolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchPolicy))) + i-- + dAtA[i] = 0x4a } - if m.SideEffects != nil { - l = len(*m.SideEffects) - n += 1 + l + sovGenerated(uint64(l)) + if len(m.AdmissionReviewVersions) > 0 { + for iNdEx := len(m.AdmissionReviewVersions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AdmissionReviewVersions[iNdEx]) + copy(dAtA[i:], m.AdmissionReviewVersions[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.AdmissionReviewVersions[iNdEx]))) + i-- + dAtA[i] = 0x42 + } } if m.TimeoutSeconds != nil { - n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) + i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds)) + i-- + dAtA[i] = 0x38 } - if len(m.AdmissionReviewVersions) > 0 { - for _, s := range m.AdmissionReviewVersions { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + if m.SideEffects != nil { + i -= len(*m.SideEffects) + copy(dAtA[i:], *m.SideEffects) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SideEffects))) + i-- + dAtA[i] = 0x32 } - if m.MatchPolicy != nil { - l = len(*m.MatchPolicy) - n += 1 + l + sovGenerated(uint64(l)) + if m.NamespaceSelector != nil { + { + size, err := m.NamespaceSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } - if m.ReinvocationPolicy != nil { - l = len(*m.ReinvocationPolicy) - n += 1 + l + sovGenerated(uint64(l)) + if m.FailurePolicy != nil { + i -= len(*m.FailurePolicy) + copy(dAtA[i:], *m.FailurePolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy))) + i-- + dAtA[i] = 0x22 } - if m.ObjectSelector != nil { - l = m.ObjectSelector.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } - if len(m.MatchConditions) > 0 { - for _, e := range m.MatchConditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + { + size, err := m.ClientConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *MutatingWebhookConfiguration) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingWebhookConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ValidatingWebhookConfiguration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Webhooks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Webhooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *MutatingWebhookConfigurationList) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ValidatingWebhookConfigurationList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *Rule) Size() (n int) { - if m == nil { - return 0 +func (m *Validation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *Validation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Validation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.APIGroups) > 0 { - for _, s := range m.APIGroups { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + i -= len(m.MessageExpression) + copy(dAtA[i:], m.MessageExpression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.MessageExpression))) + i-- + dAtA[i] = 0x22 + if m.Reason != nil { + i -= len(*m.Reason) + copy(dAtA[i:], *m.Reason) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Reason))) + i-- + dAtA[i] = 0x1a } - if len(m.APIVersions) > 0 { - for _, s := range m.APIVersions { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Variable) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.Resources) > 0 { - for _, s := range m.Resources { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) + return dAtA[:n], nil +} + +func (m *Variable) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Variable) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WebhookClientConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WebhookClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.URL != nil { + i -= len(*m.URL) + copy(dAtA[i:], *m.URL) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.URL))) + i-- + dAtA[i] = 0x1a + } + if m.CABundle != nil { + i -= len(m.CABundle) + copy(dAtA[i:], m.CABundle) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) + i-- + dAtA[i] = 0x12 + } + if m.Service != nil { + { + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - if m.Scope != nil { - l = len(*m.Scope) - n += 1 + l + sovGenerated(uint64(l)) + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AuditAnnotation) Size() (n int) { + if m == nil { + return 0 } + var l int + _ = l + l = len(m.Key) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ValueExpression) + n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *RuleWithOperations) Size() (n int) { +func (m *ExpressionWarning) Size() (n int) { if m == nil { return 0 } 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() + l = len(m.FieldRef) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Warning) n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *ServiceReference) Size() (n int) { +func (m *MatchCondition) Size() (n int) { if m == nil { return 0 } 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) + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *MatchResources) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NamespaceSelector != nil { + l = m.NamespaceSelector.Size() n += 1 + l + sovGenerated(uint64(l)) } - if m.Port != nil { - n += 1 + sovGenerated(uint64(*m.Port)) + if m.ObjectSelector != nil { + l = m.ObjectSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.ResourceRules) > 0 { + for _, e := range m.ResourceRules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ExcludeResourceRules) > 0 { + for _, e := range m.ExcludeResourceRules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.MatchPolicy != nil { + l = len(*m.MatchPolicy) + n += 1 + l + sovGenerated(uint64(l)) } return n } -func (m *ValidatingWebhook) Size() (n int) { +func (m *MutatingWebhook) Size() (n int) { if m == nil { return 0 } @@ -1344,6 +2567,10 @@ func (m *ValidatingWebhook) Size() (n int) { l = len(*m.MatchPolicy) n += 1 + l + sovGenerated(uint64(l)) } + if m.ReinvocationPolicy != nil { + l = len(*m.ReinvocationPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } if m.ObjectSelector != nil { l = m.ObjectSelector.Size() n += 1 + l + sovGenerated(uint64(l)) @@ -1357,7 +2584,7 @@ func (m *ValidatingWebhook) Size() (n int) { return n } -func (m *ValidatingWebhookConfiguration) Size() (n int) { +func (m *MutatingWebhookConfiguration) Size() (n int) { if m == nil { return 0 } @@ -1374,7 +2601,7 @@ func (m *ValidatingWebhookConfiguration) Size() (n int) { return n } -func (m *ValidatingWebhookConfigurationList) Size() (n int) { +func (m *MutatingWebhookConfigurationList) Size() (n int) { if m == nil { return 0 } @@ -1391,227 +2618,2818 @@ func (m *ValidatingWebhookConfigurationList) Size() (n int) { return n } -func (m *WebhookClientConfig) Size() (n int) { +func (m *NamedRuleWithOperations) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Service != nil { - l = m.Service.Size() - 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 m.CABundle != nil { - l = len(m.CABundle) + l = m.RuleWithOperations.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ParamKind) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ParamRef) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + if m.Selector != nil { + l = m.Selector.Size() n += 1 + l + sovGenerated(uint64(l)) } - if m.URL != nil { - l = len(*m.URL) + if m.ParameterNotFoundAction != nil { + l = len(*m.ParameterNotFoundAction) n += 1 + l + sovGenerated(uint64(l)) } return n } -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *MatchCondition) String() string { - if this == nil { - return "nil" +func (m *Rule) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&MatchCondition{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, - `}`, - }, "") - return s -} -func (this *MutatingWebhook) String() string { - if this == nil { - return "nil" + var l int + _ = l + if len(m.APIGroups) > 0 { + for _, s := range m.APIGroups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForRules := "[]RuleWithOperations{" - for _, f := range this.Rules { - repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + "," + if len(m.APIVersions) > 0 { + for _, s := range m.APIVersions { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForRules += "}" - repeatedStringForMatchConditions := "[]MatchCondition{" - for _, f := range this.MatchConditions { - repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + if len(m.Resources) > 0 { + for _, s := range m.Resources { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForMatchConditions += "}" - s := strings.Join([]string{`&MutatingWebhook{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`, - `Rules:` + repeatedStringForRules + `,`, - `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, - `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`, - `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, - `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`, - `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, - `ReinvocationPolicy:` + valueToStringGenerated(this.ReinvocationPolicy) + `,`, - `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `MatchConditions:` + repeatedStringForMatchConditions + `,`, - `}`, - }, "") - return s + if m.Scope != nil { + l = len(*m.Scope) + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (this *MutatingWebhookConfiguration) String() string { - if this == nil { - return "nil" + +func (m *RuleWithOperations) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForWebhooks := "[]MutatingWebhook{" - for _, f := range this.Webhooks { - repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "MutatingWebhook", "MutatingWebhook", 1), `&`, ``, 1) + "," + var l int + _ = l + if len(m.Operations) > 0 { + for _, s := range m.Operations { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForWebhooks += "}" - s := strings.Join([]string{`&MutatingWebhookConfiguration{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Webhooks:` + repeatedStringForWebhooks + `,`, - `}`, - }, "") - return s + l = m.Rule.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *MutatingWebhookConfigurationList) String() string { - if this == nil { - return "nil" + +func (m *ServiceReference) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForItems := "[]MutatingWebhookConfiguration{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "MutatingWebhookConfiguration", "MutatingWebhookConfiguration", 1), `&`, ``, 1) + "," + 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)) } - repeatedStringForItems += "}" - s := strings.Join([]string{`&MutatingWebhookConfigurationList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *Rule) String() string { - if this == nil { - return "nil" + if m.Port != nil { + n += 1 + sovGenerated(uint64(*m.Port)) } - s := strings.Join([]string{`&Rule{`, - `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`, - `APIVersions:` + fmt.Sprintf("%v", this.APIVersions) + `,`, - `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, - `Scope:` + valueToStringGenerated(this.Scope) + `,`, - `}`, - }, "") - return s + return n } -func (this *RuleWithOperations) String() string { - if this == nil { - return "nil" + +func (m *TypeChecking) Size() (n int) { + if m == nil { + return 0 } - 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 + var l int + _ = l + if len(m.ExpressionWarnings) > 0 { + for _, e := range m.ExpressionWarnings { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (this *ServiceReference) String() string { - if this == nil { - return "nil" + +func (m *ValidatingAdmissionPolicy) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ServiceReference{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Path:` + valueToStringGenerated(this.Path) + `,`, - `Port:` + valueToStringGenerated(this.Port) + `,`, - `}`, - }, "") - return s + 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 (this *ValidatingWebhook) String() string { - if this == nil { - return "nil" + +func (m *ValidatingAdmissionPolicyBinding) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForRules := "[]RuleWithOperations{" - for _, f := range this.Rules { - repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + "," + 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 *ValidatingAdmissionPolicyBindingList) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForRules += "}" - repeatedStringForMatchConditions := "[]MatchCondition{" - for _, f := range this.MatchConditions { - repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + 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)) + } } - repeatedStringForMatchConditions += "}" - s := strings.Join([]string{`&ValidatingWebhook{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`, - `Rules:` + repeatedStringForRules + `,`, - `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, - `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`, - `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, - `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`, - `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, - `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `MatchConditions:` + repeatedStringForMatchConditions + `,`, - `}`, - }, "") - return s + return n } -func (this *ValidatingWebhookConfiguration) String() string { - if this == nil { - return "nil" + +func (m *ValidatingAdmissionPolicyBindingSpec) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForWebhooks := "[]ValidatingWebhook{" - for _, f := range this.Webhooks { - repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "ValidatingWebhook", "ValidatingWebhook", 1), `&`, ``, 1) + "," + var l int + _ = l + l = len(m.PolicyName) + n += 1 + l + sovGenerated(uint64(l)) + if m.ParamRef != nil { + l = m.ParamRef.Size() + n += 1 + l + sovGenerated(uint64(l)) } - repeatedStringForWebhooks += "}" - s := strings.Join([]string{`&ValidatingWebhookConfiguration{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Webhooks:` + repeatedStringForWebhooks + `,`, - `}`, - }, "") - return s -} -func (this *ValidatingWebhookConfigurationList) String() string { - if this == nil { - return "nil" + if m.MatchResources != nil { + l = m.MatchResources.Size() + n += 1 + l + sovGenerated(uint64(l)) } - repeatedStringForItems := "[]ValidatingWebhookConfiguration{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingWebhookConfiguration", "ValidatingWebhookConfiguration", 1), `&`, ``, 1) + "," + if len(m.ValidationActions) > 0 { + for _, s := range m.ValidationActions { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ValidatingWebhookConfigurationList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, + return n +} + +func (m *ValidatingAdmissionPolicyList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ValidatingAdmissionPolicySpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ParamKind != nil { + l = m.ParamKind.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.MatchConstraints != nil { + l = m.MatchConstraints.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Validations) > 0 { + for _, e := range m.Validations { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.FailurePolicy != nil { + l = len(*m.FailurePolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.AuditAnnotations) > 0 { + for _, e := range m.AuditAnnotations { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.MatchConditions) > 0 { + for _, e := range m.MatchConditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Variables) > 0 { + for _, e := range m.Variables { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ValidatingAdmissionPolicyStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovGenerated(uint64(m.ObservedGeneration)) + if m.TypeChecking != nil { + l = m.TypeChecking.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 *ValidatingWebhook) Size() (n int) { + if m == nil { + return 0 + } + 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)) + } + if m.SideEffects != nil { + l = len(*m.SideEffects) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.TimeoutSeconds != nil { + n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) + } + if len(m.AdmissionReviewVersions) > 0 { + for _, s := range m.AdmissionReviewVersions { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.MatchPolicy != nil { + l = len(*m.MatchPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ObjectSelector != nil { + l = m.ObjectSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.MatchConditions) > 0 { + for _, e := range m.MatchConditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ValidatingWebhookConfiguration) Size() (n int) { + if m == nil { + return 0 + } + 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) { + if m == nil { + return 0 + } + 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 *Validation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + if m.Reason != nil { + l = len(*m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.MessageExpression) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Variable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *WebhookClientConfig) Size() (n int) { + if m == nil { + return 0 + } + 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) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *AuditAnnotation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AuditAnnotation{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `ValueExpression:` + fmt.Sprintf("%v", this.ValueExpression) + `,`, `}`, }, "") return s } -func (this *WebhookClientConfig) String() string { +func (this *ExpressionWarning) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExpressionWarning{`, + `FieldRef:` + fmt.Sprintf("%v", this.FieldRef) + `,`, + `Warning:` + fmt.Sprintf("%v", this.Warning) + `,`, + `}`, + }, "") + return s +} +func (this *MatchCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MatchCondition{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `}`, + }, "") + return s +} +func (this *MatchResources) String() string { + if this == nil { + return "nil" + } + repeatedStringForResourceRules := "[]NamedRuleWithOperations{" + for _, f := range this.ResourceRules { + repeatedStringForResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + "," + } + repeatedStringForResourceRules += "}" + repeatedStringForExcludeResourceRules := "[]NamedRuleWithOperations{" + for _, f := range this.ExcludeResourceRules { + repeatedStringForExcludeResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + "," + } + repeatedStringForExcludeResourceRules += "}" + s := strings.Join([]string{`&MatchResources{`, + `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `ResourceRules:` + repeatedStringForResourceRules + `,`, + `ExcludeResourceRules:` + repeatedStringForExcludeResourceRules + `,`, + `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, + `}`, + }, "") + return s +} +func (this *MutatingWebhook) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&WebhookClientConfig{`, - `Service:` + strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1) + `,`, - `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, - `URL:` + valueToStringGenerated(this.URL) + `,`, - `}`, - }, "") - return s + repeatedStringForRules := "[]RuleWithOperations{" + for _, f := range this.Rules { + repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + "," + } + repeatedStringForRules += "}" + repeatedStringForMatchConditions := "[]MatchCondition{" + for _, f := range this.MatchConditions { + repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForMatchConditions += "}" + s := strings.Join([]string{`&MutatingWebhook{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`, + `Rules:` + repeatedStringForRules + `,`, + `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, + `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`, + `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, + `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`, + `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, + `ReinvocationPolicy:` + valueToStringGenerated(this.ReinvocationPolicy) + `,`, + `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `MatchConditions:` + repeatedStringForMatchConditions + `,`, + `}`, + }, "") + return s +} +func (this *MutatingWebhookConfiguration) String() string { + if this == nil { + return "nil" + } + repeatedStringForWebhooks := "[]MutatingWebhook{" + for _, f := range this.Webhooks { + repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "MutatingWebhook", "MutatingWebhook", 1), `&`, ``, 1) + "," + } + repeatedStringForWebhooks += "}" + s := strings.Join([]string{`&MutatingWebhookConfiguration{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Webhooks:` + repeatedStringForWebhooks + `,`, + `}`, + }, "") + return s +} +func (this *MutatingWebhookConfigurationList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]MutatingWebhookConfiguration{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "MutatingWebhookConfiguration", "MutatingWebhookConfiguration", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&MutatingWebhookConfigurationList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *NamedRuleWithOperations) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedRuleWithOperations{`, + `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, + `RuleWithOperations:` + strings.Replace(strings.Replace(this.RuleWithOperations.String(), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ParamKind) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ParamKind{`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `}`, + }, "") + return s +} +func (this *ParamRef) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ParamRef{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `ParameterNotFoundAction:` + valueToStringGenerated(this.ParameterNotFoundAction) + `,`, + `}`, + }, "") + 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) + `,`, + `Scope:` + valueToStringGenerated(this.Scope) + `,`, + `}`, + }, "") + 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) + `,`, + `Port:` + valueToStringGenerated(this.Port) + `,`, + `}`, + }, "") + return s +} +func (this *TypeChecking) String() string { + if this == nil { + return "nil" + } + repeatedStringForExpressionWarnings := "[]ExpressionWarning{" + for _, f := range this.ExpressionWarnings { + repeatedStringForExpressionWarnings += strings.Replace(strings.Replace(f.String(), "ExpressionWarning", "ExpressionWarning", 1), `&`, ``, 1) + "," + } + repeatedStringForExpressionWarnings += "}" + s := strings.Join([]string{`&TypeChecking{`, + `ExpressionWarnings:` + repeatedStringForExpressionWarnings + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidatingAdmissionPolicy{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicySpec", "ValidatingAdmissionPolicySpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ValidatingAdmissionPolicyStatus", "ValidatingAdmissionPolicyStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyBinding) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidatingAdmissionPolicyBinding{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicyBindingSpec", "ValidatingAdmissionPolicyBindingSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyBindingList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ValidatingAdmissionPolicyBinding{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicyBinding", "ValidatingAdmissionPolicyBinding", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyBindingSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingSpec{`, + `PolicyName:` + fmt.Sprintf("%v", this.PolicyName) + `,`, + `ParamRef:` + strings.Replace(this.ParamRef.String(), "ParamRef", "ParamRef", 1) + `,`, + `MatchResources:` + strings.Replace(this.MatchResources.String(), "MatchResources", "MatchResources", 1) + `,`, + `ValidationActions:` + fmt.Sprintf("%v", this.ValidationActions) + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ValidatingAdmissionPolicy{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicy", "ValidatingAdmissionPolicy", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicyList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicySpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForValidations := "[]Validation{" + for _, f := range this.Validations { + repeatedStringForValidations += strings.Replace(strings.Replace(f.String(), "Validation", "Validation", 1), `&`, ``, 1) + "," + } + repeatedStringForValidations += "}" + repeatedStringForAuditAnnotations := "[]AuditAnnotation{" + for _, f := range this.AuditAnnotations { + repeatedStringForAuditAnnotations += strings.Replace(strings.Replace(f.String(), "AuditAnnotation", "AuditAnnotation", 1), `&`, ``, 1) + "," + } + repeatedStringForAuditAnnotations += "}" + repeatedStringForMatchConditions := "[]MatchCondition{" + for _, f := range this.MatchConditions { + repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForMatchConditions += "}" + repeatedStringForVariables := "[]Variable{" + for _, f := range this.Variables { + repeatedStringForVariables += strings.Replace(strings.Replace(f.String(), "Variable", "Variable", 1), `&`, ``, 1) + "," + } + repeatedStringForVariables += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicySpec{`, + `ParamKind:` + strings.Replace(this.ParamKind.String(), "ParamKind", "ParamKind", 1) + `,`, + `MatchConstraints:` + strings.Replace(this.MatchConstraints.String(), "MatchResources", "MatchResources", 1) + `,`, + `Validations:` + repeatedStringForValidations + `,`, + `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, + `AuditAnnotations:` + repeatedStringForAuditAnnotations + `,`, + `MatchConditions:` + repeatedStringForMatchConditions + `,`, + `Variables:` + repeatedStringForVariables + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForConditions := "[]Condition{" + for _, f := range this.Conditions { + repeatedStringForConditions += fmt.Sprintf("%v", f) + "," + } + repeatedStringForConditions += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicyStatus{`, + `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, + `TypeChecking:` + strings.Replace(this.TypeChecking.String(), "TypeChecking", "TypeChecking", 1) + `,`, + `Conditions:` + repeatedStringForConditions + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingWebhook) String() string { + if this == nil { + return "nil" + } + repeatedStringForRules := "[]RuleWithOperations{" + for _, f := range this.Rules { + repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + "," + } + repeatedStringForRules += "}" + repeatedStringForMatchConditions := "[]MatchCondition{" + for _, f := range this.MatchConditions { + repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForMatchConditions += "}" + s := strings.Join([]string{`&ValidatingWebhook{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`, + `Rules:` + repeatedStringForRules + `,`, + `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, + `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`, + `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, + `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`, + `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, + `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `MatchConditions:` + repeatedStringForMatchConditions + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingWebhookConfiguration) String() string { + if this == nil { + return "nil" + } + repeatedStringForWebhooks := "[]ValidatingWebhook{" + for _, f := range this.Webhooks { + repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "ValidatingWebhook", "ValidatingWebhook", 1), `&`, ``, 1) + "," + } + repeatedStringForWebhooks += "}" + s := strings.Join([]string{`&ValidatingWebhookConfiguration{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Webhooks:` + repeatedStringForWebhooks + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingWebhookConfigurationList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ValidatingWebhookConfiguration{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingWebhookConfiguration", "ValidatingWebhookConfiguration", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ValidatingWebhookConfigurationList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *Validation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Validation{`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `Reason:` + valueToStringGenerated(this.Reason) + `,`, + `MessageExpression:` + fmt.Sprintf("%v", this.MessageExpression) + `,`, + `}`, + }, "") + return s +} +func (this *Variable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Variable{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `}`, + }, "") + return s +} +func (this *WebhookClientConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WebhookClientConfig{`, + `Service:` + strings.Replace(this.Service.String(), "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 *AuditAnnotation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuditAnnotation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuditAnnotation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValueExpression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValueExpression = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExpressionWarning) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExpressionWarning: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExpressionWarning: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldRef = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warning", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warning = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MatchCondition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MatchCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MatchCondition: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Expression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Expression = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MatchResources) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MatchResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MatchResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NamespaceSelector == nil { + m.NamespaceSelector = &v1.LabelSelector{} + } + if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectSelector == nil { + m.ObjectSelector = &v1.LabelSelector{} + } + if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceRules = append(m.ResourceRules, NamedRuleWithOperations{}) + if err := m.ResourceRules[len(m.ResourceRules)-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 ExcludeResourceRules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExcludeResourceRules = append(m.ExcludeResourceRules, NamedRuleWithOperations{}) + if err := m.ExcludeResourceRules[len(m.ExcludeResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := MatchPolicyType(dAtA[iNdEx:postIndex]) + m.MatchPolicy = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MutatingWebhook: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MutatingWebhook: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NamespaceSelector == nil { + m.NamespaceSelector = &v1.LabelSelector{} + } + if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SideEffects", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := SideEffectClass(dAtA[iNdEx:postIndex]) + m.SideEffects = &s + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", 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.TimeoutSeconds = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdmissionReviewVersions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AdmissionReviewVersions = append(m.AdmissionReviewVersions, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := MatchPolicyType(dAtA[iNdEx:postIndex]) + m.MatchPolicy = &s + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReinvocationPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := ReinvocationPolicyType(dAtA[iNdEx:postIndex]) + m.ReinvocationPolicy = &s + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectSelector == nil { + m.ObjectSelector = &v1.LabelSelector{} + } + if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchConditions = append(m.MatchConditions, MatchCondition{}) + if err := m.MatchConditions[len(m.MatchConditions)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Webhooks = append(m.Webhooks, MutatingWebhook{}) + 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) || (iNdEx+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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedRuleWithOperations) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedRuleWithOperations: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedRuleWithOperations: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuleWithOperations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RuleWithOperations.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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParamKind) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParamKind: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamKind: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParamRef) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParamRef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamRef: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Selector == nil { + m.Selector = &v1.LabelSelector{} + } + if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParameterNotFoundAction", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := ParameterNotFoundActionType(dAtA[iNdEx:postIndex]) + m.ParameterNotFoundAction = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Scope", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := ScopeType(dAtA[iNdEx:postIndex]) + m.Scope = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *MatchCondition) Unmarshal(dAtA []byte) error { +func (m *ServiceReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1634,13 +5452,45 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MatchCondition: wiretype end group for non-group") + return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MatchCondition: illegal tag %d (wire type %d)", fieldNum, wire) + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) } @@ -1667,16 +5517,119 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error { if postIndex < 0 { return ErrInvalidLengthGenerated } - if postIndex > l { + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Path = &s + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", 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.Port = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TypeChecking) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TypeChecking: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TypeChecking: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExpressionWarnings", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1686,23 +5639,25 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Expression = string(dAtA[iNdEx:postIndex]) + m.ExpressionWarnings = append(m.ExpressionWarnings, ExpressionWarning{}) + if err := m.ExpressionWarnings[len(m.ExpressionWarnings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -1725,7 +5680,7 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error { } return nil } -func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { +func (m *ValidatingAdmissionPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1748,17 +5703,17 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MutatingWebhook: wiretype end group for non-group") + return fmt.Errorf("proto: ValidatingAdmissionPolicy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MutatingWebhook: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidatingAdmissionPolicy: 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) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1768,27 +5723,28 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + 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 ClientConfig", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1815,13 +5771,13 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ClientConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + 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 Rules", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1848,47 +5804,63 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { 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 { + if err := m.Status.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 - } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatingAdmissionPolicyBinding) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - s := FailurePolicyType(dAtA[iNdEx:postIndex]) - m.FailurePolicy = &s - iNdEx = postIndex - case 5: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatingAdmissionPolicyBinding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatingAdmissionPolicyBinding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1915,71 +5887,15 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.NamespaceSelector == nil { - m.NamespaceSelector = &v1.LabelSelector{} - } - if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SideEffects", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := SideEffectClass(dAtA[iNdEx:postIndex]) - m.SideEffects = &s - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", 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.TimeoutSeconds = &v - case 8: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdmissionReviewVersions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1989,93 +5905,78 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.AdmissionReviewVersions = append(m.AdmissionReviewVersions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - s := MatchPolicyType(dAtA[iNdEx:postIndex]) - m.MatchPolicy = &s iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReinvocationPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatingAdmissionPolicyBindingList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - s := ReinvocationPolicyType(dAtA[iNdEx:postIndex]) - m.ReinvocationPolicy = &s - iNdEx = postIndex - case 11: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatingAdmissionPolicyBindingList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatingAdmissionPolicyBindingList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2102,16 +6003,13 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ObjectSelector == nil { - m.ObjectSelector = &v1.LabelSelector{} - } - if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 12: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2138,8 +6036,8 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MatchConditions = append(m.MatchConditions, MatchCondition{}) - if err := m.MatchConditions[len(m.MatchConditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, ValidatingAdmissionPolicyBinding{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2164,7 +6062,7 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { } return nil } -func (m *MutatingWebhookConfiguration) Unmarshal(dAtA []byte) error { +func (m *ValidatingAdmissionPolicyBindingSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2187,15 +6085,47 @@ func (m *MutatingWebhookConfiguration) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MutatingWebhookConfiguration: wiretype end group for non-group") + return fmt.Errorf("proto: ValidatingAdmissionPolicyBindingSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MutatingWebhookConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidatingAdmissionPolicyBindingSpec: 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) + return fmt.Errorf("proto: wrong wireType = %d for field PolicyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PolicyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParamRef", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2222,13 +6152,16 @@ func (m *MutatingWebhookConfiguration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.ParamRef == nil { + m.ParamRef = &ParamRef{} + } + if err := m.ParamRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Webhooks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchResources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2255,11 +6188,45 @@ func (m *MutatingWebhookConfiguration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Webhooks = append(m.Webhooks, MutatingWebhook{}) - if err := m.Webhooks[len(m.Webhooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.MatchResources == nil { + m.MatchResources = &MatchResources{} + } + if err := m.MatchResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidationActions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidationActions = append(m.ValidationActions, ValidationAction(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2281,7 +6248,7 @@ func (m *MutatingWebhookConfiguration) Unmarshal(dAtA []byte) error { } return nil } -func (m *MutatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { +func (m *ValidatingAdmissionPolicyList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2304,10 +6271,10 @@ func (m *MutatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MutatingWebhookConfigurationList: wiretype end group for non-group") + return fmt.Errorf("proto: ValidatingAdmissionPolicyList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MutatingWebhookConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidatingAdmissionPolicyList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2372,7 +6339,7 @@ func (m *MutatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, MutatingWebhookConfiguration{}) + m.Items = append(m.Items, ValidatingAdmissionPolicy{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2398,7 +6365,7 @@ func (m *MutatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { } return nil } -func (m *Rule) Unmarshal(dAtA []byte) error { +func (m *ValidatingAdmissionPolicySpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2421,17 +6388,17 @@ func (m *Rule) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Rule: wiretype end group for non-group") + return fmt.Errorf("proto: ValidatingAdmissionPolicySpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Rule: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidatingAdmissionPolicySpec: 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) + return fmt.Errorf("proto: wrong wireType = %d for field ParamKind", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2441,29 +6408,33 @@ func (m *Rule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex])) + if m.ParamKind == nil { + m.ParamKind = &ParamKind{} + } + if err := m.ParamKind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIVersions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchConstraints", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2473,29 +6444,33 @@ func (m *Rule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.APIVersions = append(m.APIVersions, string(dAtA[iNdEx:postIndex])) + if m.MatchConstraints == nil { + m.MatchConstraints = &MatchResources{} + } + if err := m.MatchConstraints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Validations", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2505,27 +6480,29 @@ func (m *Rule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex])) + m.Validations = append(m.Validations, Validation{}) + if err := m.Validations[len(m.Validations)-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 Scope", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2553,64 +6530,48 @@ func (m *Rule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := ScopeType(dAtA[iNdEx:postIndex]) - m.Scope = &s + s := FailurePolicyType(dAtA[iNdEx:postIndex]) + m.FailurePolicy = &s iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+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 + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuditAnnotations", wireType) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if msglen < 0 { + return ErrInvalidLengthGenerated } - } - 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: + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AuditAnnotations = append(m.AuditAnnotations, AuditAnnotation{}) + if err := m.AuditAnnotations[len(m.AuditAnnotations)-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 Operations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2620,27 +6581,29 @@ func (m *RuleWithOperations) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Operations = append(m.Operations, OperationType(dAtA[iNdEx:postIndex])) + m.MatchConditions = append(m.MatchConditions, MatchCondition{}) + if err := m.MatchConditions[len(m.MatchConditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Variables", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2667,7 +6630,8 @@ func (m *RuleWithOperations) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Rule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Variables = append(m.Variables, Variable{}) + if err := m.Variables[len(m.Variables)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2692,7 +6656,7 @@ func (m *RuleWithOperations) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceReference) Unmarshal(dAtA []byte) error { +func (m *ValidatingAdmissionPolicyStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2715,17 +6679,17 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group") + return fmt.Errorf("proto: ValidatingAdmissionPolicyStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidatingAdmissionPolicyStatus: 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) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) } - var stringLen uint64 + m.ObservedGeneration = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2735,29 +6699,16 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.ObservedGeneration |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - 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) + return fmt.Errorf("proto: wrong wireType = %d for field TypeChecking", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2767,29 +6718,33 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if m.TypeChecking == nil { + m.TypeChecking = &TypeChecking{} + } + if err := m.TypeChecking.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2799,45 +6754,26 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.Path = &s - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", 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.Conditions = append(m.Conditions, v1.Condition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Port = &v + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3108,12 +7044,197 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { break } } - m.TimeoutSeconds = &v - case 8: + m.TimeoutSeconds = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdmissionReviewVersions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AdmissionReviewVersions = append(m.AdmissionReviewVersions, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := MatchPolicyType(dAtA[iNdEx:postIndex]) + m.MatchPolicy = &s + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectSelector == nil { + m.ObjectSelector = &v1.LabelSelector{} + } + if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchConditions = append(m.MatchConditions, MatchCondition{}) + if err := m.MatchConditions[len(m.MatchConditions)-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) || (iNdEx+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 AdmissionReviewVersions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3123,29 +7244,30 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.AdmissionReviewVersions = append(m.AdmissionReviewVersions, string(dAtA[iNdEx:postIndex])) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 9: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Webhooks", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3155,28 +7277,79 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := MatchPolicyType(dAtA[iNdEx:postIndex]) - m.MatchPolicy = &s + m.Webhooks = append(m.Webhooks, ValidatingWebhook{}) + if err := m.Webhooks[len(m.Webhooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 10: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 ObjectSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3203,16 +7376,13 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ObjectSelector == nil { - m.ObjectSelector = &v1.LabelSelector{} - } - if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 11: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3239,8 +7409,8 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MatchConditions = append(m.MatchConditions, MatchCondition{}) - if err := m.MatchConditions[len(m.MatchConditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, ValidatingWebhookConfiguration{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3265,7 +7435,7 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { } return nil } -func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error { +func (m *Validation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3288,17 +7458,17 @@ func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ValidatingWebhookConfiguration: wiretype end group for non-group") + return fmt.Errorf("proto: Validation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatingWebhookConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Validation: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3308,30 +7478,29 @@ func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Expression = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Webhooks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3341,25 +7510,88 @@ func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Webhooks = append(m.Webhooks, ValidatingWebhook{}) - if err := m.Webhooks[len(m.Webhooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF } + s := k8s_io_apimachinery_pkg_apis_meta_v1.StatusReason(dAtA[iNdEx:postIndex]) + m.Reason = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessageExpression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MessageExpression = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3382,7 +7614,7 @@ func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error { } return nil } -func (m *ValidatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { +func (m *Variable) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3405,17 +7637,17 @@ func (m *ValidatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ValidatingWebhookConfigurationList: wiretype end group for non-group") + return fmt.Errorf("proto: Variable: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatingWebhookConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Variable: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3425,30 +7657,29 @@ func (m *ValidatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3458,25 +7689,23 @@ func (m *ValidatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } 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 - } + m.Expression = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/generated.proto b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/generated.proto index a8903621c8e..44589007a23 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/generated.proto @@ -28,6 +28,56 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". option go_package = "k8s.io/api/admissionregistration/v1"; +// AuditAnnotation describes how to produce an audit annotation for an API request. +message AuditAnnotation { + // key specifies the audit annotation key. The audit annotation keys of + // a ValidatingAdmissionPolicy must be unique. The key must be a qualified + // name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. + // + // The key is combined with the resource name of the + // ValidatingAdmissionPolicy to construct an audit annotation key: + // "{ValidatingAdmissionPolicy name}/{key}". + // + // If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy + // and the same audit annotation key, the annotation key will be identical. + // In this case, the first annotation written with the key will be included + // in the audit event and all subsequent annotations with the same key + // will be discarded. + // + // Required. + optional string key = 1; + + // valueExpression represents the expression which is evaluated by CEL to + // produce an audit annotation value. The expression must evaluate to either + // a string or null value. If the expression evaluates to a string, the + // audit annotation is included with the string value. If the expression + // evaluates to null or empty string the audit annotation will be omitted. + // The valueExpression may be no longer than 5kb in length. + // If the result of the valueExpression is more than 10kb in length, it + // will be truncated to 10kb. + // + // If multiple ValidatingAdmissionPolicyBinding resources match an + // API request, then the valueExpression will be evaluated for + // each binding. All unique values produced by the valueExpressions + // will be joined together in a comma-separated list. + // + // Required. + optional string valueExpression = 2; +} + +// ExpressionWarning is a warning information that targets a specific expression. +message ExpressionWarning { + // The path to the field that refers the expression. + // For example, the reference to the expression of the first item of + // validations is "spec.validations[0].expression" + optional string fieldRef = 2; + + // The content of type checking information in a human-readable form. + // Each line of the warning contains the type that the expression is checked + // against, followed by the type check error from the compiler. + optional string warning = 3; +} + // MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook. message MatchCondition { // Name is an identifier for this match condition, used for strategic merging of MatchConditions, @@ -57,6 +107,101 @@ message MatchCondition { optional string expression = 2; } +// MatchResources decides whether to run the admission control policy on an object based +// on whether it meets the match criteria. +// The exclude rules take precedence over include rules (if a resource matches both, it is excluded) +// +structType=atomic +message MatchResources { + // NamespaceSelector decides whether to run the admission control policy 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 policy. + // + // 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 policy 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 = 1; + + // ObjectSelector decides whether to run the validation based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the cel validation, and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector objectSelector = 2; + + // ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. + // The policy cares about an operation if it matches _any_ Rule. + // +listType=atomic + // +optional + repeated NamedRuleWithOperations resourceRules = 3; + + // ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. + // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) + // +listType=atomic + // +optional + repeated NamedRuleWithOperations excludeResourceRules = 4; + + // matchPolicy defines how the "MatchResources" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. + // + // Defaults to "Equivalent" + // +optional + optional string matchPolicy = 7; +} + // MutatingWebhook describes an admission webhook and the resources and operations it applies to. message MutatingWebhook { // The name of the admission webhook. @@ -76,6 +221,7 @@ message MutatingWebhook { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic repeated RuleWithOperations rules = 3; // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -183,6 +329,7 @@ message MutatingWebhook { // If a persisted webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail // and be subject to the failure policy. + // +listType=atomic repeated string admissionReviewVersions = 8; // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. @@ -215,13 +362,10 @@ message MutatingWebhook { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional repeated MatchCondition matchConditions = 12; } @@ -236,6 +380,8 @@ message MutatingWebhookConfiguration { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated MutatingWebhook Webhooks = 2; } @@ -250,6 +396,88 @@ message MutatingWebhookConfigurationList { repeated MutatingWebhookConfiguration items = 2; } +// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. +// +structType=atomic +message NamedRuleWithOperations { + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +listType=atomic + // +optional + repeated string resourceNames = 1; + + // RuleWithOperations is a tuple of Operations and Resources. + optional RuleWithOperations ruleWithOperations = 2; +} + +// ParamKind is a tuple of Group Kind and Version. +// +structType=atomic +message ParamKind { + // APIVersion is the API group version the resources belong to. + // In format of "group/version". + // Required. + optional string apiVersion = 1; + + // Kind is the API kind the resources belong to. + // Required. + optional string kind = 2; +} + +// ParamRef describes how to locate the params to be used as input to +// expressions of rules applied by a policy binding. +// +structType=atomic +message ParamRef { + // name is the name of the resource being referenced. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + // + // A single parameter used for all admission requests can be configured + // by setting the `name` field, leaving `selector` blank, and setting namespace + // if `paramKind` is namespace-scoped. + optional string name = 1; + + // namespace is the namespace of the referenced resource. Allows limiting + // the search for params to a specific namespace. Applies to both `name` and + // `selector` fields. + // + // A per-namespace parameter may be used by specifying a namespace-scoped + // `paramKind` in the policy and leaving this field empty. + // + // - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this + // field results in a configuration error. + // + // - If `paramKind` is namespace-scoped, the namespace of the object being + // evaluated for admission will be used when this field is left unset. Take + // care that if this is left empty the binding must not match any cluster-scoped + // resources, which will result in an error. + // + // +optional + optional string namespace = 2; + + // selector can be used to match multiple param objects based on their labels. + // Supply selector: {} to match all resources of the ParamKind. + // + // If multiple params are found, they are all evaluated with the policy expressions + // and the results are ANDed together. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + // + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3; + + // `parameterNotFoundAction` controls the behavior of the binding when the resource + // exists, and name or selector is valid, but there are no parameters + // matched by the binding. If the value is set to `Allow`, then no + // matched parameters will be treated as successful validation by the binding. + // If set to `Deny`, then no matched parameters will be subject to the + // `failurePolicy` of the policy. + // + // Allowed values are `Allow` or `Deny` + // + // Required + optional string parameterNotFoundAction = 4; +} + // Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended // to make sure that all the tuple expansions are valid. message Rule { @@ -333,6 +561,248 @@ message ServiceReference { optional int32 port = 4; } +// TypeChecking contains results of type checking the expressions in the +// ValidatingAdmissionPolicy +message TypeChecking { + // The type checking warnings for each expression. + // +optional + // +listType=atomic + repeated ExpressionWarning expressionWarnings = 1; +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 +// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. +message ValidatingAdmissionPolicy { + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the ValidatingAdmissionPolicy. + optional ValidatingAdmissionPolicySpec spec = 2; + + // The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy + // behaves in the expected way. + // Populated by the system. + // Read-only. + // +optional + optional ValidatingAdmissionPolicyStatus status = 3; +} + +// ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. +// ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. +// +// For a given admission request, each binding will cause its policy to be +// evaluated N times, where N is 1 for policies/bindings that don't use +// params, otherwise N is the number of parameters selected by the binding. +// +// The CEL expressions of a policy must have a computed CEL cost below the maximum +// CEL budget. Each evaluation of the policy is given an independent CEL cost budget. +// Adding/removing policies, bindings, or params can not affect whether a +// given (policy, binding, param) combination is within its own CEL budget. +message ValidatingAdmissionPolicyBinding { + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. + optional ValidatingAdmissionPolicyBindingSpec spec = 2; +} + +// ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. +message ValidatingAdmissionPolicyBindingList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // List of PolicyBinding. + repeated ValidatingAdmissionPolicyBinding items = 2; +} + +// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. +message ValidatingAdmissionPolicyBindingSpec { + // PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. + // If the referenced resource does not exist, this binding is considered invalid and will be ignored + // Required. + optional string policyName = 1; + + // paramRef specifies the parameter resource used to configure the admission control policy. + // It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. + // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. + // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + // +optional + optional ParamRef paramRef = 2; + + // MatchResources declares what resources match this binding and will be validated by it. + // Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. + // If this is unset, all resources matched by the policy are validated by this binding + // When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. + // Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required. + // +optional + optional MatchResources matchResources = 3; + + // validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. + // If a validation evaluates to false it is always enforced according to these actions. + // + // Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according + // to these actions only if the FailurePolicy is set to Fail, otherwise the failures are + // ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. + // + // validationActions is declared as a set of action values. Order does + // not matter. validationActions may not contain duplicates of the same action. + // + // The supported actions values are: + // + // "Deny" specifies that a validation failure results in a denied request. + // + // "Warn" specifies that a validation failure is reported to the request client + // in HTTP Warning headers, with a warning code of 299. Warnings can be sent + // both for allowed or denied admission responses. + // + // "Audit" specifies that a validation failure is included in the published + // audit event for the request. The audit event will contain a + // `validation.policy.admission.k8s.io/validation_failure` audit annotation + // with a value containing the details of the validation failures, formatted as + // a JSON list of objects, each with the following fields: + // - message: The validation failure message string + // - policy: The resource name of the ValidatingAdmissionPolicy + // - binding: The resource name of the ValidatingAdmissionPolicyBinding + // - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy + // - validationActions: The enforcement actions enacted for the validation failure + // Example audit annotation: + // `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"` + // + // Clients should expect to handle additional values by ignoring + // any values not recognized. + // + // "Deny" and "Warn" may not be used together since this combination + // needlessly duplicates the validation failure both in the + // API response body and the HTTP warning headers. + // + // Required. + // +listType=set + repeated string validationActions = 4; +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 +// ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. +message ValidatingAdmissionPolicyList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // List of ValidatingAdmissionPolicy. + repeated ValidatingAdmissionPolicy items = 2; +} + +// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. +message ValidatingAdmissionPolicySpec { + // ParamKind specifies the kind of resources used to parameterize this policy. + // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. + // If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. + // If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null. + // +optional + optional ParamKind paramKind = 1; + + // MatchConstraints specifies what resources this policy is designed to validate. + // The AdmissionPolicy cares about a request if it matches _all_ Constraints. + // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API + // ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. + // Required. + optional MatchResources matchConstraints = 2; + + // Validations contain CEL expressions which is used to apply the validation. + // Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is + // required. + // +listType=atomic + // +optional + repeated Validation validations = 3; + + // failurePolicy defines how to handle failures for the admission policy. Failures can + // occur from CEL expression parse errors, type check errors, runtime errors and invalid + // or mis-configured policy definitions or bindings. + // + // A policy is invalid if spec.paramKind refers to a non-existent Kind. + // A binding is invalid if spec.paramRef.name refers to a non-existent resource. + // + // failurePolicy does not define how validations that evaluate to false are handled. + // + // When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions + // define how failures are enforced. + // + // Allowed values are Ignore or Fail. Defaults to Fail. + // +optional + optional string failurePolicy = 4; + + // auditAnnotations contains CEL expressions which are used to produce audit + // annotations for the audit event of the API request. + // validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is + // required. + // +listType=atomic + // +optional + repeated AuditAnnotation auditAnnotations = 5; + + // MatchConditions is a list of conditions that must be met for a request to be validated. + // Match conditions filter requests that have already been matched by the rules, + // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // If a parameter object is provided, it can be accessed via the `params` handle in the same + // manner as validation expressions. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the policy is skipped + // + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + repeated MatchCondition matchConditions = 6; + + // Variables contain definitions of variables that can be used in composition of other expressions. + // Each variable is defined as a named CEL expression. + // The variables defined here will be available under `variables` in other expressions of the policy + // except MatchConditions because MatchConditions are evaluated before the rest of the policy. + // + // The expression of a variable can refer to other variables defined earlier in the list but not those after. + // Thus, Variables must be sorted by the order of first appearance and acyclic. + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + repeated Variable variables = 7; +} + +// ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. +message ValidatingAdmissionPolicyStatus { + // The generation observed by the controller. + // +optional + optional int64 observedGeneration = 1; + + // The results of type checking for each expression. + // Presence of this field indicates the completion of the type checking. + // +optional + optional TypeChecking typeChecking = 2; + + // The conditions represent the latest available observations of a policy's current state. + // +optional + // +listType=map + // +listMapKey=type + repeated k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 3; +} + // ValidatingWebhook describes an admission webhook and the resources and operations it applies to. message ValidatingWebhook { // The name of the admission webhook. @@ -352,6 +822,7 @@ message ValidatingWebhook { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic repeated RuleWithOperations rules = 3; // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -459,6 +930,7 @@ message ValidatingWebhook { // If a persisted webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail // and be subject to the failure policy. + // +listType=atomic repeated string admissionReviewVersions = 8; // MatchConditions is a list of conditions that must be met for a request to be sent to this @@ -473,13 +945,10 @@ message ValidatingWebhook { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional repeated MatchCondition matchConditions = 11; } @@ -494,6 +963,8 @@ message ValidatingWebhookConfiguration { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated ValidatingWebhook Webhooks = 2; } @@ -508,6 +979,97 @@ message ValidatingWebhookConfigurationList { repeated ValidatingWebhookConfiguration items = 2; } +// Validation specifies the CEL expression which is used to apply the validation. +message Validation { + // Expression represents the expression which will be evaluated by CEL. + // ref: https://github.com/google/cel-spec + // CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object. No other metadata properties are accessible. + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Accessible property names are escaped according to the following rules when accessed in the expression: + // - '__' escapes to '__underscores__' + // - '.' escapes to '__dot__' + // - '-' escapes to '__dash__' + // - '/' escapes to '__slash__' + // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: + // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", + // "import", "let", "loop", "package", "namespace", "return". + // Examples: + // - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"} + // - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"} + // - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"} + // + // Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. + // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: + // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and + // non-intersecting elements in `Y` are appended, retaining their partial order. + // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values + // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with + // non-intersecting keys are appended, retaining their partial order. + // Required. + optional string Expression = 1; + + // Message represents the message displayed when validation fails. The message is required if the Expression contains + // line breaks. The message must not contain line breaks. + // If unset, the message is "failed rule: {Rule}". + // e.g. "must be a URL with the host matching spec.host" + // If the Expression contains line breaks. Message is required. + // The message must not contain line breaks. + // If unset, the message is "failed Expression: {Expression}". + // +optional + optional string message = 2; + + // Reason represents a machine-readable description of why this validation failed. + // If this is the first validation in the list to fail, this reason, as well as the + // corresponding HTTP response code, are used in the + // HTTP response to the client. + // The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". + // If not set, StatusReasonInvalid is used in the response to the client. + // +optional + optional string reason = 3; + + // messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + // Since messageExpression is used as a failure message, it must evaluate to a string. + // If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. + // If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced + // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string + // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and + // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. + // messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. + // Example: + // "object.x must be less than max ("+string(params.max)+")" + // +optional + optional string messageExpression = 4; +} + +// Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. +// +structType=atomic +message Variable { + // Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. + // The variable can be accessed in other expressions through `variables` + // For example, if name is "foo", the variable will be available as `variables.foo` + optional string Name = 1; + + // Expression is the expression that will be evaluated as the value of the variable. + // The CEL expression has access to the same identifiers as the CEL expressions in Validation. + optional string Expression = 2; +} + // WebhookClientConfig contains the information to make a TLS // connection with the webhook message WebhookClientConfig { diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/register.go b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/register.go index e42a8bce3be..da74379ce2e 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/register.go +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/register.go @@ -50,6 +50,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ValidatingWebhookConfigurationList{}, &MutatingWebhookConfiguration{}, &MutatingWebhookConfigurationList{}, + &ValidatingAdmissionPolicy{}, + &ValidatingAdmissionPolicyList{}, + &ValidatingAdmissionPolicyBinding{}, + &ValidatingAdmissionPolicyBindingList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/types.go b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/types.go index 07ed7a6246b..0510712b246 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/types.go @@ -91,6 +91,18 @@ const ( Fail FailurePolicyType = "Fail" ) +// ParameterNotFoundActionType specifies a failure policy that defines how a binding +// is evaluated when the param referred by its perNamespaceParamRef is not found. +type ParameterNotFoundActionType string + +const ( + // Allow means all requests will be admitted if no param resources + // could be found. + AllowAction ParameterNotFoundActionType = "Allow" + // Deny means all requests will be denied if no param resources are found. + DenyAction ParameterNotFoundActionType = "Deny" +) + // MatchPolicyType specifies the type of match policy. // +enum type MatchPolicyType string @@ -120,6 +132,584 @@ const ( SideEffectClassNoneOnDryRun SideEffectClass = "NoneOnDryRun" ) +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 +// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. +type ValidatingAdmissionPolicy struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the desired behavior of the ValidatingAdmissionPolicy. + Spec ValidatingAdmissionPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + // The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy + // behaves in the expected way. + // Populated by the system. + // Read-only. + // +optional + Status ValidatingAdmissionPolicyStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. +type ValidatingAdmissionPolicyStatus struct { + // The generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` + // The results of type checking for each expression. + // Presence of this field indicates the completion of the type checking. + // +optional + TypeChecking *TypeChecking `json:"typeChecking,omitempty" protobuf:"bytes,2,opt,name=typeChecking"` + // The conditions represent the latest available observations of a policy's current state. + // +optional + // +listType=map + // +listMapKey=type + Conditions []metav1.Condition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"` +} + +// ValidatingAdmissionPolicyConditionType is the condition type of admission validation policy. +type ValidatingAdmissionPolicyConditionType string + +// TypeChecking contains results of type checking the expressions in the +// ValidatingAdmissionPolicy +type TypeChecking struct { + // The type checking warnings for each expression. + // +optional + // +listType=atomic + ExpressionWarnings []ExpressionWarning `json:"expressionWarnings,omitempty" protobuf:"bytes,1,rep,name=expressionWarnings"` +} + +// ExpressionWarning is a warning information that targets a specific expression. +type ExpressionWarning struct { + // The path to the field that refers the expression. + // For example, the reference to the expression of the first item of + // validations is "spec.validations[0].expression" + FieldRef string `json:"fieldRef" protobuf:"bytes,2,opt,name=fieldRef"` + // The content of type checking information in a human-readable form. + // Each line of the warning contains the type that the expression is checked + // against, followed by the type check error from the compiler. + Warning string `json:"warning" protobuf:"bytes,3,opt,name=warning"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 +// ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. +type ValidatingAdmissionPolicyList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // List of ValidatingAdmissionPolicy. + Items []ValidatingAdmissionPolicy `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` +} + +// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. +type ValidatingAdmissionPolicySpec struct { + // ParamKind specifies the kind of resources used to parameterize this policy. + // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. + // If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. + // If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null. + // +optional + ParamKind *ParamKind `json:"paramKind,omitempty" protobuf:"bytes,1,rep,name=paramKind"` + + // MatchConstraints specifies what resources this policy is designed to validate. + // The AdmissionPolicy cares about a request if it matches _all_ Constraints. + // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API + // ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. + // Required. + MatchConstraints *MatchResources `json:"matchConstraints,omitempty" protobuf:"bytes,2,rep,name=matchConstraints"` + + // Validations contain CEL expressions which is used to apply the validation. + // Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is + // required. + // +listType=atomic + // +optional + Validations []Validation `json:"validations,omitempty" protobuf:"bytes,3,rep,name=validations"` + + // failurePolicy defines how to handle failures for the admission policy. Failures can + // occur from CEL expression parse errors, type check errors, runtime errors and invalid + // or mis-configured policy definitions or bindings. + // + // A policy is invalid if spec.paramKind refers to a non-existent Kind. + // A binding is invalid if spec.paramRef.name refers to a non-existent resource. + // + // failurePolicy does not define how validations that evaluate to false are handled. + // + // When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions + // define how failures are enforced. + // + // Allowed values are Ignore or Fail. Defaults to Fail. + // +optional + FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"` + + // auditAnnotations contains CEL expressions which are used to produce audit + // annotations for the audit event of the API request. + // validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is + // required. + // +listType=atomic + // +optional + AuditAnnotations []AuditAnnotation `json:"auditAnnotations,omitempty" protobuf:"bytes,5,rep,name=auditAnnotations"` + + // MatchConditions is a list of conditions that must be met for a request to be validated. + // Match conditions filter requests that have already been matched by the rules, + // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // If a parameter object is provided, it can be accessed via the `params` handle in the same + // manner as validation expressions. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the policy is skipped + // + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,6,rep,name=matchConditions"` + + // Variables contain definitions of variables that can be used in composition of other expressions. + // Each variable is defined as a named CEL expression. + // The variables defined here will be available under `variables` in other expressions of the policy + // except MatchConditions because MatchConditions are evaluated before the rest of the policy. + // + // The expression of a variable can refer to other variables defined earlier in the list but not those after. + // Thus, Variables must be sorted by the order of first appearance and acyclic. + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + Variables []Variable `json:"variables,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=variables"` +} + +// ParamKind is a tuple of Group Kind and Version. +// +structType=atomic +type ParamKind struct { + // APIVersion is the API group version the resources belong to. + // In format of "group/version". + // Required. + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,1,rep,name=apiVersion"` + + // Kind is the API kind the resources belong to. + // Required. + Kind string `json:"kind,omitempty" protobuf:"bytes,2,rep,name=kind"` +} + +// Validation specifies the CEL expression which is used to apply the validation. +type Validation struct { + // Expression represents the expression which will be evaluated by CEL. + // ref: https://github.com/google/cel-spec + // CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object. No other metadata properties are accessible. + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Accessible property names are escaped according to the following rules when accessed in the expression: + // - '__' escapes to '__underscores__' + // - '.' escapes to '__dot__' + // - '-' escapes to '__dash__' + // - '/' escapes to '__slash__' + // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: + // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", + // "import", "let", "loop", "package", "namespace", "return". + // Examples: + // - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"} + // - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"} + // - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"} + // + // Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. + // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: + // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and + // non-intersecting elements in `Y` are appended, retaining their partial order. + // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values + // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with + // non-intersecting keys are appended, retaining their partial order. + // Required. + Expression string `json:"expression" protobuf:"bytes,1,opt,name=Expression"` + // Message represents the message displayed when validation fails. The message is required if the Expression contains + // line breaks. The message must not contain line breaks. + // If unset, the message is "failed rule: {Rule}". + // e.g. "must be a URL with the host matching spec.host" + // If the Expression contains line breaks. Message is required. + // The message must not contain line breaks. + // If unset, the message is "failed Expression: {Expression}". + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` + // Reason represents a machine-readable description of why this validation failed. + // If this is the first validation in the list to fail, this reason, as well as the + // corresponding HTTP response code, are used in the + // HTTP response to the client. + // The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". + // If not set, StatusReasonInvalid is used in the response to the client. + // +optional + Reason *metav1.StatusReason `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` + // messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + // Since messageExpression is used as a failure message, it must evaluate to a string. + // If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. + // If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced + // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string + // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and + // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. + // messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. + // Example: + // "object.x must be less than max ("+string(params.max)+")" + // +optional + MessageExpression string `json:"messageExpression,omitempty" protobuf:"bytes,4,opt,name=messageExpression"` +} + +// Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. +// +structType=atomic +type Variable struct { + // Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. + // The variable can be accessed in other expressions through `variables` + // For example, if name is "foo", the variable will be available as `variables.foo` + Name string `json:"name" protobuf:"bytes,1,opt,name=Name"` + + // Expression is the expression that will be evaluated as the value of the variable. + // The CEL expression has access to the same identifiers as the CEL expressions in Validation. + Expression string `json:"expression" protobuf:"bytes,2,opt,name=Expression"` +} + +// AuditAnnotation describes how to produce an audit annotation for an API request. +type AuditAnnotation struct { + // key specifies the audit annotation key. The audit annotation keys of + // a ValidatingAdmissionPolicy must be unique. The key must be a qualified + // name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. + // + // The key is combined with the resource name of the + // ValidatingAdmissionPolicy to construct an audit annotation key: + // "{ValidatingAdmissionPolicy name}/{key}". + // + // If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy + // and the same audit annotation key, the annotation key will be identical. + // In this case, the first annotation written with the key will be included + // in the audit event and all subsequent annotations with the same key + // will be discarded. + // + // Required. + Key string `json:"key" protobuf:"bytes,1,opt,name=key"` + + // valueExpression represents the expression which is evaluated by CEL to + // produce an audit annotation value. The expression must evaluate to either + // a string or null value. If the expression evaluates to a string, the + // audit annotation is included with the string value. If the expression + // evaluates to null or empty string the audit annotation will be omitted. + // The valueExpression may be no longer than 5kb in length. + // If the result of the valueExpression is more than 10kb in length, it + // will be truncated to 10kb. + // + // If multiple ValidatingAdmissionPolicyBinding resources match an + // API request, then the valueExpression will be evaluated for + // each binding. All unique values produced by the valueExpressions + // will be joined together in a comma-separated list. + // + // Required. + ValueExpression string `json:"valueExpression" protobuf:"bytes,2,opt,name=valueExpression"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. +// ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. +// +// For a given admission request, each binding will cause its policy to be +// evaluated N times, where N is 1 for policies/bindings that don't use +// params, otherwise N is the number of parameters selected by the binding. +// +// The CEL expressions of a policy must have a computed CEL cost below the maximum +// CEL budget. Each evaluation of the policy is given an independent CEL cost budget. +// Adding/removing policies, bindings, or params can not affect whether a +// given (policy, binding, param) combination is within its own CEL budget. +type ValidatingAdmissionPolicyBinding struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. + Spec ValidatingAdmissionPolicyBindingSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. +type ValidatingAdmissionPolicyBindingList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // List of PolicyBinding. + Items []ValidatingAdmissionPolicyBinding `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` +} + +// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. +type ValidatingAdmissionPolicyBindingSpec struct { + // PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. + // If the referenced resource does not exist, this binding is considered invalid and will be ignored + // Required. + PolicyName string `json:"policyName,omitempty" protobuf:"bytes,1,rep,name=policyName"` + + // paramRef specifies the parameter resource used to configure the admission control policy. + // It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. + // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. + // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + // +optional + ParamRef *ParamRef `json:"paramRef,omitempty" protobuf:"bytes,2,rep,name=paramRef"` + + // MatchResources declares what resources match this binding and will be validated by it. + // Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. + // If this is unset, all resources matched by the policy are validated by this binding + // When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. + // Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required. + // +optional + MatchResources *MatchResources `json:"matchResources,omitempty" protobuf:"bytes,3,rep,name=matchResources"` + + // validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. + // If a validation evaluates to false it is always enforced according to these actions. + // + // Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according + // to these actions only if the FailurePolicy is set to Fail, otherwise the failures are + // ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. + // + // validationActions is declared as a set of action values. Order does + // not matter. validationActions may not contain duplicates of the same action. + // + // The supported actions values are: + // + // "Deny" specifies that a validation failure results in a denied request. + // + // "Warn" specifies that a validation failure is reported to the request client + // in HTTP Warning headers, with a warning code of 299. Warnings can be sent + // both for allowed or denied admission responses. + // + // "Audit" specifies that a validation failure is included in the published + // audit event for the request. The audit event will contain a + // `validation.policy.admission.k8s.io/validation_failure` audit annotation + // with a value containing the details of the validation failures, formatted as + // a JSON list of objects, each with the following fields: + // - message: The validation failure message string + // - policy: The resource name of the ValidatingAdmissionPolicy + // - binding: The resource name of the ValidatingAdmissionPolicyBinding + // - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy + // - validationActions: The enforcement actions enacted for the validation failure + // Example audit annotation: + // `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"` + // + // Clients should expect to handle additional values by ignoring + // any values not recognized. + // + // "Deny" and "Warn" may not be used together since this combination + // needlessly duplicates the validation failure both in the + // API response body and the HTTP warning headers. + // + // Required. + // +listType=set + ValidationActions []ValidationAction `json:"validationActions,omitempty" protobuf:"bytes,4,rep,name=validationActions"` +} + +// ParamRef describes how to locate the params to be used as input to +// expressions of rules applied by a policy binding. +// +structType=atomic +type ParamRef struct { + // name is the name of the resource being referenced. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + // + // A single parameter used for all admission requests can be configured + // by setting the `name` field, leaving `selector` blank, and setting namespace + // if `paramKind` is namespace-scoped. + // + Name string `json:"name,omitempty" protobuf:"bytes,1,rep,name=name"` + + // namespace is the namespace of the referenced resource. Allows limiting + // the search for params to a specific namespace. Applies to both `name` and + // `selector` fields. + // + // A per-namespace parameter may be used by specifying a namespace-scoped + // `paramKind` in the policy and leaving this field empty. + // + // - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this + // field results in a configuration error. + // + // - If `paramKind` is namespace-scoped, the namespace of the object being + // evaluated for admission will be used when this field is left unset. Take + // care that if this is left empty the binding must not match any cluster-scoped + // resources, which will result in an error. + // + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,rep,name=namespace"` + + // selector can be used to match multiple param objects based on their labels. + // Supply selector: {} to match all resources of the ParamKind. + // + // If multiple params are found, they are all evaluated with the policy expressions + // and the results are ANDed together. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + // + // +optional + Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,3,rep,name=selector"` + + // `parameterNotFoundAction` controls the behavior of the binding when the resource + // exists, and name or selector is valid, but there are no parameters + // matched by the binding. If the value is set to `Allow`, then no + // matched parameters will be treated as successful validation by the binding. + // If set to `Deny`, then no matched parameters will be subject to the + // `failurePolicy` of the policy. + // + // Allowed values are `Allow` or `Deny` + // + // Required + ParameterNotFoundAction *ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty" protobuf:"bytes,4,rep,name=parameterNotFoundAction"` +} + +// MatchResources decides whether to run the admission control policy on an object based +// on whether it meets the match criteria. +// The exclude rules take precedence over include rules (if a resource matches both, it is excluded) +// +structType=atomic +type MatchResources struct { + // NamespaceSelector decides whether to run the admission control policy 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 policy. + // + // 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 policy 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,1,opt,name=namespaceSelector"` + // ObjectSelector decides whether to run the validation based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the cel validation, and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + // +optional + ObjectSelector *metav1.LabelSelector `json:"objectSelector,omitempty" protobuf:"bytes,2,opt,name=objectSelector"` + // ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. + // The policy cares about an operation if it matches _any_ Rule. + // +listType=atomic + // +optional + ResourceRules []NamedRuleWithOperations `json:"resourceRules,omitempty" protobuf:"bytes,3,rep,name=resourceRules"` + // ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. + // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) + // +listType=atomic + // +optional + ExcludeResourceRules []NamedRuleWithOperations `json:"excludeResourceRules,omitempty" protobuf:"bytes,4,rep,name=excludeResourceRules"` + // matchPolicy defines how the "MatchResources" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. + // + // Defaults to "Equivalent" + // +optional + MatchPolicy *MatchPolicyType `json:"matchPolicy,omitempty" protobuf:"bytes,7,opt,name=matchPolicy,casttype=MatchPolicyType"` +} + +// ValidationAction specifies a policy enforcement action. +// +enum +type ValidationAction string + +const ( + // Deny specifies that a validation failure results in a denied request. + Deny ValidationAction = "Deny" + // Warn specifies that a validation failure is reported to the request client + // in HTTP Warning headers, with a warning code of 299. Warnings can be sent + // both for allowed or denied admission responses. + Warn ValidationAction = "Warn" + // Audit specifies that a validation failure is included in the published + // audit event for the request. The audit event will contain a + // `validation.policy.admission.k8s.io/validation_failure` audit annotation + // with a value containing the details of the validation failure. + Audit ValidationAction = "Audit" +) + +// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. +// +structType=atomic +type NamedRuleWithOperations struct { + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +listType=atomic + // +optional + ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,1,rep,name=resourceNames"` + // RuleWithOperations is a tuple of Operations and Resources. + RuleWithOperations `json:",inline" protobuf:"bytes,2,opt,name=ruleWithOperations"` +} + // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -134,6 +724,8 @@ type ValidatingWebhookConfiguration struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Webhooks []ValidatingWebhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"` } @@ -164,6 +756,8 @@ type MutatingWebhookConfiguration struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Webhooks []MutatingWebhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"` } @@ -199,6 +793,7 @@ type ValidatingWebhook struct { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -306,6 +901,7 @@ type ValidatingWebhook struct { // If a persisted webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail // and be subject to the failure policy. + // +listType=atomic AdmissionReviewVersions []string `json:"admissionReviewVersions" protobuf:"bytes,8,rep,name=admissionReviewVersions"` // MatchConditions is a list of conditions that must be met for a request to be sent to this @@ -320,13 +916,10 @@ type ValidatingWebhook struct { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,11,opt,name=matchConditions"` } @@ -350,6 +943,7 @@ type MutatingWebhook struct { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -457,6 +1051,7 @@ type MutatingWebhook struct { // If a persisted webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail // and be subject to the failure policy. + // +listType=atomic AdmissionReviewVersions []string `json:"admissionReviewVersions" protobuf:"bytes,8,rep,name=admissionReviewVersions"` // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. @@ -489,13 +1084,10 @@ type MutatingWebhook struct { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,12,opt,name=matchConditions"` } diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go index c41cceb2f24..f43139505d1 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go @@ -27,6 +27,26 @@ package v1 // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_AuditAnnotation = map[string]string{ + "": "AuditAnnotation describes how to produce an audit annotation for an API request.", + "key": "key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\nThe key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.\n\nRequired.", + "valueExpression": "valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.\n\nRequired.", +} + +func (AuditAnnotation) SwaggerDoc() map[string]string { + return map_AuditAnnotation +} + +var map_ExpressionWarning = map[string]string{ + "": "ExpressionWarning is a warning information that targets a specific expression.", + "fieldRef": "The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\"", + "warning": "The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.", +} + +func (ExpressionWarning) SwaggerDoc() map[string]string { + return map_ExpressionWarning +} + var map_MatchCondition = map[string]string{ "": "MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.", "name": "Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\nRequired.", @@ -37,6 +57,19 @@ func (MatchCondition) SwaggerDoc() map[string]string { return map_MatchCondition } +var map_MatchResources = map[string]string{ + "": "MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", + "namespaceSelector": "NamespaceSelector decides whether to run the admission control policy 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 policy.\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 policy 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.", + "objectSelector": "ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", + "resourceRules": "ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.", + "excludeResourceRules": "ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", + "matchPolicy": "matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.\n\nDefaults to \"Equivalent\"", +} + +func (MatchResources) SwaggerDoc() map[string]string { + return map_MatchResources +} + var map_MutatingWebhook = map[string]string{ "": "MutatingWebhook 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.", @@ -50,7 +83,7 @@ var map_MutatingWebhook = map[string]string{ "timeoutSeconds": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.", "admissionReviewVersions": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.", "reinvocationPolicy": "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", - "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.", + "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped", } func (MutatingWebhook) SwaggerDoc() map[string]string { @@ -77,6 +110,37 @@ func (MutatingWebhookConfigurationList) SwaggerDoc() map[string]string { return map_MutatingWebhookConfigurationList } +var map_NamedRuleWithOperations = map[string]string{ + "": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.", + "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", +} + +func (NamedRuleWithOperations) SwaggerDoc() map[string]string { + return map_NamedRuleWithOperations +} + +var map_ParamKind = map[string]string{ + "": "ParamKind is a tuple of Group Kind and Version.", + "apiVersion": "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.", + "kind": "Kind is the API kind the resources belong to. Required.", +} + +func (ParamKind) SwaggerDoc() map[string]string { + return map_ParamKind +} + +var map_ParamRef = map[string]string{ + "": "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.", + "name": "name is the name of the resource being referenced.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.\n\nA single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped.", + "namespace": "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.", + "selector": "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", + "parameterNotFoundAction": "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny`\n\nRequired", +} + +func (ParamRef) SwaggerDoc() map[string]string { + return map_ParamRef +} + 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.", @@ -110,6 +174,94 @@ func (ServiceReference) SwaggerDoc() map[string]string { return map_ServiceReference } +var map_TypeChecking = map[string]string{ + "": "TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy", + "expressionWarnings": "The type checking warnings for each expression.", +} + +func (TypeChecking) SwaggerDoc() map[string]string { + return map_TypeChecking +} + +var map_ValidatingAdmissionPolicy = map[string]string{ + "": "ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "spec": "Specification of the desired behavior of the ValidatingAdmissionPolicy.", + "status": "The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only.", +} + +func (ValidatingAdmissionPolicy) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicy +} + +var map_ValidatingAdmissionPolicyBinding = map[string]string{ + "": "ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.\n\nThe CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "spec": "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.", +} + +func (ValidatingAdmissionPolicyBinding) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicyBinding +} + +var map_ValidatingAdmissionPolicyBindingList = map[string]string{ + "": "ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "items": "List of PolicyBinding.", +} + +func (ValidatingAdmissionPolicyBindingList) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicyBindingList +} + +var map_ValidatingAdmissionPolicyBindingSpec = map[string]string{ + "": "ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.", + "policyName": "PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", + "paramRef": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", + "matchResources": "MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.", + "validationActions": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", +} + +func (ValidatingAdmissionPolicyBindingSpec) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicyBindingSpec +} + +var map_ValidatingAdmissionPolicyList = map[string]string{ + "": "ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "items": "List of ValidatingAdmissionPolicy.", +} + +func (ValidatingAdmissionPolicyList) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicyList +} + +var map_ValidatingAdmissionPolicySpec = map[string]string{ + "": "ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.", + "paramKind": "ParamKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.", + "matchConstraints": "MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.", + "validations": "Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.", + "failurePolicy": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nWhen failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.\n\nAllowed values are Ignore or Fail. Defaults to Fail.", + "auditAnnotations": "auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.", + "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nIf a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the policy is skipped", + "variables": "Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.", +} + +func (ValidatingAdmissionPolicySpec) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicySpec +} + +var map_ValidatingAdmissionPolicyStatus = map[string]string{ + "": "ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.", + "observedGeneration": "The generation observed by the controller.", + "typeChecking": "The results of type checking for each expression. Presence of this field indicates the completion of the type checking.", + "conditions": "The conditions represent the latest available observations of a policy's current state.", +} + +func (ValidatingAdmissionPolicyStatus) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicyStatus +} + var map_ValidatingWebhook = map[string]string{ "": "ValidatingWebhook 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.", @@ -122,7 +274,7 @@ var map_ValidatingWebhook = map[string]string{ "sideEffects": "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.", "timeoutSeconds": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.", "admissionReviewVersions": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.", - "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.", + "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped", } func (ValidatingWebhook) SwaggerDoc() map[string]string { @@ -149,6 +301,28 @@ func (ValidatingWebhookConfigurationList) SwaggerDoc() map[string]string { return map_ValidatingWebhookConfigurationList } +var map_Validation = map[string]string{ + "": "Validation specifies the CEL expression which is used to apply the validation.", + "expression": "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired.", + "message": "Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\".", + "reason": "Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client.", + "messageExpression": "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\"", +} + +func (Validation) SwaggerDoc() map[string]string { + return map_Validation +} + +var map_Variable = map[string]string{ + "": "Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.", + "name": "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`", + "expression": "Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.", +} + +func (Variable) SwaggerDoc() map[string]string { + return map_Variable +} + 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.", diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/zz_generated.deepcopy.go b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/zz_generated.deepcopy.go index b9560991384..bfe599c1d32 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/zz_generated.deepcopy.go +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1/zz_generated.deepcopy.go @@ -26,6 +26,38 @@ 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 *AuditAnnotation) DeepCopyInto(out *AuditAnnotation) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditAnnotation. +func (in *AuditAnnotation) DeepCopy() *AuditAnnotation { + if in == nil { + return nil + } + out := new(AuditAnnotation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExpressionWarning) DeepCopyInto(out *ExpressionWarning) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExpressionWarning. +func (in *ExpressionWarning) DeepCopy() *ExpressionWarning { + if in == nil { + return nil + } + out := new(ExpressionWarning) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MatchCondition) DeepCopyInto(out *MatchCondition) { *out = *in @@ -42,6 +74,51 @@ func (in *MatchCondition) DeepCopy() *MatchCondition { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MatchResources) DeepCopyInto(out *MatchResources) { + *out = *in + if in.NamespaceSelector != nil { + in, out := &in.NamespaceSelector, &out.NamespaceSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.ObjectSelector != nil { + in, out := &in.ObjectSelector, &out.ObjectSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.ResourceRules != nil { + in, out := &in.ResourceRules, &out.ResourceRules + *out = make([]NamedRuleWithOperations, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ExcludeResourceRules != nil { + in, out := &in.ExcludeResourceRules, &out.ExcludeResourceRules + *out = make([]NamedRuleWithOperations, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MatchPolicy != nil { + in, out := &in.MatchPolicy, &out.MatchPolicy + *out = new(MatchPolicyType) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchResources. +func (in *MatchResources) DeepCopy() *MatchResources { + if in == nil { + return nil + } + out := new(MatchResources) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingWebhook) DeepCopyInto(out *MutatingWebhook) { *out = *in @@ -177,6 +254,70 @@ func (in *MutatingWebhookConfigurationList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedRuleWithOperations) DeepCopyInto(out *NamedRuleWithOperations) { + *out = *in + if in.ResourceNames != nil { + in, out := &in.ResourceNames, &out.ResourceNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.RuleWithOperations.DeepCopyInto(&out.RuleWithOperations) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedRuleWithOperations. +func (in *NamedRuleWithOperations) DeepCopy() *NamedRuleWithOperations { + if in == nil { + return nil + } + out := new(NamedRuleWithOperations) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParamKind) DeepCopyInto(out *ParamKind) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamKind. +func (in *ParamKind) DeepCopy() *ParamKind { + if in == nil { + return nil + } + out := new(ParamKind) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParamRef) DeepCopyInto(out *ParamRef) { + *out = *in + if in.Selector != nil { + in, out := &in.Selector, &out.Selector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.ParameterNotFoundAction != nil { + in, out := &in.ParameterNotFoundAction, &out.ParameterNotFoundAction + *out = new(ParameterNotFoundActionType) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamRef. +func (in *ParamRef) DeepCopy() *ParamRef { + if in == nil { + return nil + } + out := new(ParamRef) + in.DeepCopyInto(out) + return out +} + // 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 @@ -261,6 +402,260 @@ func (in *ServiceReference) DeepCopy() *ServiceReference { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TypeChecking) DeepCopyInto(out *TypeChecking) { + *out = *in + if in.ExpressionWarnings != nil { + in, out := &in.ExpressionWarnings, &out.ExpressionWarnings + *out = make([]ExpressionWarning, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeChecking. +func (in *TypeChecking) DeepCopy() *TypeChecking { + if in == nil { + return nil + } + out := new(TypeChecking) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidatingAdmissionPolicy) DeepCopyInto(out *ValidatingAdmissionPolicy) { + *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 ValidatingAdmissionPolicy. +func (in *ValidatingAdmissionPolicy) DeepCopy() *ValidatingAdmissionPolicy { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingAdmissionPolicy) 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 *ValidatingAdmissionPolicyBinding) DeepCopyInto(out *ValidatingAdmissionPolicyBinding) { + *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 ValidatingAdmissionPolicyBinding. +func (in *ValidatingAdmissionPolicyBinding) DeepCopy() *ValidatingAdmissionPolicyBinding { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicyBinding) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingAdmissionPolicyBinding) 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 *ValidatingAdmissionPolicyBindingList) DeepCopyInto(out *ValidatingAdmissionPolicyBindingList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ValidatingAdmissionPolicyBinding, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBindingList. +func (in *ValidatingAdmissionPolicyBindingList) DeepCopy() *ValidatingAdmissionPolicyBindingList { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicyBindingList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingAdmissionPolicyBindingList) 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 *ValidatingAdmissionPolicyBindingSpec) DeepCopyInto(out *ValidatingAdmissionPolicyBindingSpec) { + *out = *in + if in.ParamRef != nil { + in, out := &in.ParamRef, &out.ParamRef + *out = new(ParamRef) + (*in).DeepCopyInto(*out) + } + if in.MatchResources != nil { + in, out := &in.MatchResources, &out.MatchResources + *out = new(MatchResources) + (*in).DeepCopyInto(*out) + } + if in.ValidationActions != nil { + in, out := &in.ValidationActions, &out.ValidationActions + *out = make([]ValidationAction, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBindingSpec. +func (in *ValidatingAdmissionPolicyBindingSpec) DeepCopy() *ValidatingAdmissionPolicyBindingSpec { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicyBindingSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidatingAdmissionPolicyList) DeepCopyInto(out *ValidatingAdmissionPolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ValidatingAdmissionPolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyList. +func (in *ValidatingAdmissionPolicyList) DeepCopy() *ValidatingAdmissionPolicyList { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingAdmissionPolicyList) 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 *ValidatingAdmissionPolicySpec) DeepCopyInto(out *ValidatingAdmissionPolicySpec) { + *out = *in + if in.ParamKind != nil { + in, out := &in.ParamKind, &out.ParamKind + *out = new(ParamKind) + **out = **in + } + if in.MatchConstraints != nil { + in, out := &in.MatchConstraints, &out.MatchConstraints + *out = new(MatchResources) + (*in).DeepCopyInto(*out) + } + if in.Validations != nil { + in, out := &in.Validations, &out.Validations + *out = make([]Validation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.FailurePolicy != nil { + in, out := &in.FailurePolicy, &out.FailurePolicy + *out = new(FailurePolicyType) + **out = **in + } + if in.AuditAnnotations != nil { + in, out := &in.AuditAnnotations, &out.AuditAnnotations + *out = make([]AuditAnnotation, len(*in)) + copy(*out, *in) + } + if in.MatchConditions != nil { + in, out := &in.MatchConditions, &out.MatchConditions + *out = make([]MatchCondition, len(*in)) + copy(*out, *in) + } + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make([]Variable, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicySpec. +func (in *ValidatingAdmissionPolicySpec) DeepCopy() *ValidatingAdmissionPolicySpec { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidatingAdmissionPolicyStatus) DeepCopyInto(out *ValidatingAdmissionPolicyStatus) { + *out = *in + if in.TypeChecking != nil { + in, out := &in.TypeChecking, &out.TypeChecking + *out = new(TypeChecking) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyStatus. +func (in *ValidatingAdmissionPolicyStatus) DeepCopy() *ValidatingAdmissionPolicyStatus { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicyStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingWebhook) DeepCopyInto(out *ValidatingWebhook) { *out = *in @@ -391,6 +786,43 @@ func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Validation) DeepCopyInto(out *Validation) { + *out = *in + if in.Reason != nil { + in, out := &in.Reason, &out.Reason + *out = new(metav1.StatusReason) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Validation. +func (in *Validation) DeepCopy() *Validation { + if in == nil { + return nil + } + out := new(Validation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Variable) DeepCopyInto(out *Variable) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. +func (in *Variable) DeepCopy() *Variable { + if in == nil { + return nil + } + out := new(Variable) + 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 diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go index 4f1373ec5a7..111cc728741 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto +// source: k8s.io/api/admissionregistration/v1alpha1/generated.proto package v1alpha1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } func (*AuditAnnotation) ProtoMessage() {} func (*AuditAnnotation) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{0} + return fileDescriptor_2c49182728ae0af5, []int{0} } func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } func (*ExpressionWarning) ProtoMessage() {} func (*ExpressionWarning) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{1} + return fileDescriptor_2c49182728ae0af5, []int{1} } func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -104,7 +104,7 @@ var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo func (m *MatchCondition) Reset() { *m = MatchCondition{} } func (*MatchCondition) ProtoMessage() {} func (*MatchCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{2} + return fileDescriptor_2c49182728ae0af5, []int{2} } func (m *MatchCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +132,7 @@ var xxx_messageInfo_MatchCondition proto.InternalMessageInfo func (m *MatchResources) Reset() { *m = MatchResources{} } func (*MatchResources) ProtoMessage() {} func (*MatchResources) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{3} + return fileDescriptor_2c49182728ae0af5, []int{3} } func (m *MatchResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -160,7 +160,7 @@ var xxx_messageInfo_MatchResources proto.InternalMessageInfo func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } func (*NamedRuleWithOperations) ProtoMessage() {} func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{4} + return fileDescriptor_2c49182728ae0af5, []int{4} } func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -188,7 +188,7 @@ var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo func (m *ParamKind) Reset() { *m = ParamKind{} } func (*ParamKind) ProtoMessage() {} func (*ParamKind) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{5} + return fileDescriptor_2c49182728ae0af5, []int{5} } func (m *ParamKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -216,7 +216,7 @@ var xxx_messageInfo_ParamKind proto.InternalMessageInfo func (m *ParamRef) Reset() { *m = ParamRef{} } func (*ParamRef) ProtoMessage() {} func (*ParamRef) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{6} + return fileDescriptor_2c49182728ae0af5, []int{6} } func (m *ParamRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -244,7 +244,7 @@ var xxx_messageInfo_ParamRef proto.InternalMessageInfo func (m *TypeChecking) Reset() { *m = TypeChecking{} } func (*TypeChecking) ProtoMessage() {} func (*TypeChecking) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{7} + return fileDescriptor_2c49182728ae0af5, []int{7} } func (m *TypeChecking) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,7 +272,7 @@ var xxx_messageInfo_TypeChecking proto.InternalMessageInfo func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } func (*ValidatingAdmissionPolicy) ProtoMessage() {} func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{8} + return fileDescriptor_2c49182728ae0af5, []int{8} } func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -300,7 +300,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{9} + return fileDescriptor_2c49182728ae0af5, []int{9} } func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -328,7 +328,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{10} + return fileDescriptor_2c49182728ae0af5, []int{10} } func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -356,7 +356,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageIn func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{11} + return fileDescriptor_2c49182728ae0af5, []int{11} } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,7 +384,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageIn func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } func (*ValidatingAdmissionPolicyList) ProtoMessage() {} func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{12} + return fileDescriptor_2c49182728ae0af5, []int{12} } func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -412,7 +412,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{13} + return fileDescriptor_2c49182728ae0af5, []int{13} } func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -440,7 +440,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{14} + return fileDescriptor_2c49182728ae0af5, []int{14} } func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -468,7 +468,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo func (m *Validation) Reset() { *m = Validation{} } func (*Validation) ProtoMessage() {} func (*Validation) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{15} + return fileDescriptor_2c49182728ae0af5, []int{15} } func (m *Validation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -496,7 +496,7 @@ var xxx_messageInfo_Validation proto.InternalMessageInfo func (m *Variable) Reset() { *m = Variable{} } func (*Variable) ProtoMessage() {} func (*Variable) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{16} + return fileDescriptor_2c49182728ae0af5, []int{16} } func (m *Variable) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -542,106 +542,105 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto", fileDescriptor_c3be8d256e3ae3cf) -} - -var fileDescriptor_c3be8d256e3ae3cf = []byte{ - // 1509 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x6f, 0x1b, 0x45, - 0x18, 0xcf, 0xc6, 0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, 0xbf, 0xf6, 0x6a, 0xca, 0xb7, 0xbf, 0xd5, - 0x26, 0x3e, 0x5c, 0x1d, 0xf9, 0x5f, 0xbc, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xad, 0xe2, 0x61, - 0x96, 0x0a, 0x14, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/admissionregistration/v1alpha1/generated.proto", fileDescriptor_2c49182728ae0af5) +} + +var fileDescriptor_2c49182728ae0af5 = []byte{ + // 1498 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5b, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xc6, 0x6e, 0x12, 0x8f, 0x73, 0xb1, 0xe7, 0xdf, 0x2a, 0x6e, 0xfe, 0xd4, 0x1b, 0xad, + 0x2a, 0xd4, 0x48, 0xb0, 0x26, 0x69, 0xa1, 0xb4, 0x42, 0x42, 0xd9, 0xde, 0xe8, 0x25, 0x17, 0x4d, + 0x51, 0x22, 0x21, 0x90, 0x98, 0xec, 0x4e, 0xec, 0x69, 0xbc, 0x17, 0x76, 0xd6, 0xa1, 0x11, 0x48, + 0x54, 0xe2, 0x05, 0xde, 0x78, 0xe0, 0x85, 0x57, 0x3e, 0x02, 0xdf, 0x80, 0xb7, 0x3e, 0xf6, 0xb1, + 0x3c, 0x60, 0x51, 0xf3, 0xc2, 0x27, 0x00, 0x29, 0x2f, 0xa0, 0x99, 0x9d, 0xbd, 0xda, 0x26, 0x76, + 0x09, 0xbc, 0x79, 0xce, 0x9c, 0xf3, 0xfb, 0xcd, 0x39, 0x73, 0xce, 0xd9, 0x33, 0x06, 0xd7, 0x0e, + 0xde, 0x66, 0x3a, 0x75, 0x1b, 0xd8, 0xa3, 0x0d, 0x6c, 0xd9, 0x94, 0x31, 0xea, 0x3a, 0x3e, 0x69, + 0x52, 0x16, 0xf8, 0x38, 0xa0, 0xae, 0xd3, 0x38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f, 0x4f, 0x53, 0xdd, 0xc8, 0x2b, 0xa0, 0x7e, 0x1b, 0xed, 0x1e, 0x98, + 0x89, 0xb2, 0x0b, 0xd6, 0x40, 0x31, 0xf5, 0xf9, 0x0e, 0x1d, 0x17, 0x92, 0x5c, 0x60, 0x26, 0x07, + 0x07, 0xc6, 0xd8, 0x7a, 0xfa, 0xa2, 0x3e, 0xf1, 0xec, 0x45, 0x7d, 0xe2, 0xf9, 0x8b, 0xfa, 0xc4, + 0x93, 0x5e, 0x5d, 0x79, 0xda, 0xab, 0x2b, 0xcf, 0x7a, 0x75, 0xe5, 0x79, 0xaf, 0xae, 0xfc, 0xd2, + 0xab, 0x2b, 0xdf, 0xfc, 0x5a, 0x9f, 0xf8, 0x60, 0x65, 0xe4, 0x7f, 0xf1, 0xfe, 0x0a, 0x00, 0x00, + 0xff, 0xff, 0x22, 0xbd, 0xc5, 0xc7, 0xf1, 0x13, 0x00, 0x00, } func (m *AuditAnnotation) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go index 78d918bc72f..bd6b17e1588 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go @@ -142,7 +142,7 @@ type ValidatingAdmissionPolicyList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingAdmissionPolicy. - Items []ValidatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicy `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. @@ -404,7 +404,7 @@ type ValidatingAdmissionPolicyBindingList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of PolicyBinding. - Items []ValidatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicyBinding `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go index 267ddc1cbd6..261ae41bd03 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto +// source: k8s.io/api/admissionregistration/v1beta1/generated.proto package v1beta1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } func (*AuditAnnotation) ProtoMessage() {} func (*AuditAnnotation) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{0} + return fileDescriptor_7f7c65a4f012fb19, []int{0} } func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } func (*ExpressionWarning) ProtoMessage() {} func (*ExpressionWarning) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{1} + return fileDescriptor_7f7c65a4f012fb19, []int{1} } func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo func (m *MatchCondition) Reset() { *m = MatchCondition{} } func (*MatchCondition) ProtoMessage() {} func (*MatchCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{2} + return fileDescriptor_7f7c65a4f012fb19, []int{2} } func (m *MatchCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_MatchCondition proto.InternalMessageInfo func (m *MatchResources) Reset() { *m = MatchResources{} } func (*MatchResources) ProtoMessage() {} func (*MatchResources) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{3} + return fileDescriptor_7f7c65a4f012fb19, []int{3} } func (m *MatchResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_MatchResources proto.InternalMessageInfo func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } func (*MutatingWebhook) ProtoMessage() {} func (*MutatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{4} + return fileDescriptor_7f7c65a4f012fb19, []int{4} } func (m *MutatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_MutatingWebhook proto.InternalMessageInfo func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} } func (*MutatingWebhookConfiguration) ProtoMessage() {} func (*MutatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{5} + return fileDescriptor_7f7c65a4f012fb19, []int{5} } func (m *MutatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +217,7 @@ var xxx_messageInfo_MutatingWebhookConfiguration proto.InternalMessageInfo func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} } func (*MutatingWebhookConfigurationList) ProtoMessage() {} func (*MutatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{6} + return fileDescriptor_7f7c65a4f012fb19, []int{6} } func (m *MutatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -245,7 +245,7 @@ var xxx_messageInfo_MutatingWebhookConfigurationList proto.InternalMessageInfo func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } func (*NamedRuleWithOperations) ProtoMessage() {} func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{7} + return fileDescriptor_7f7c65a4f012fb19, []int{7} } func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -273,7 +273,7 @@ var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo func (m *ParamKind) Reset() { *m = ParamKind{} } func (*ParamKind) ProtoMessage() {} func (*ParamKind) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{8} + return fileDescriptor_7f7c65a4f012fb19, []int{8} } func (m *ParamKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -301,7 +301,7 @@ var xxx_messageInfo_ParamKind proto.InternalMessageInfo func (m *ParamRef) Reset() { *m = ParamRef{} } func (*ParamRef) ProtoMessage() {} func (*ParamRef) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{9} + return fileDescriptor_7f7c65a4f012fb19, []int{9} } func (m *ParamRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -329,7 +329,7 @@ var xxx_messageInfo_ParamRef proto.InternalMessageInfo func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{10} + return fileDescriptor_7f7c65a4f012fb19, []int{10} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -357,7 +357,7 @@ var xxx_messageInfo_ServiceReference proto.InternalMessageInfo func (m *TypeChecking) Reset() { *m = TypeChecking{} } func (*TypeChecking) ProtoMessage() {} func (*TypeChecking) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{11} + return fileDescriptor_7f7c65a4f012fb19, []int{11} } func (m *TypeChecking) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -385,7 +385,7 @@ var xxx_messageInfo_TypeChecking proto.InternalMessageInfo func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } func (*ValidatingAdmissionPolicy) ProtoMessage() {} func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{12} + return fileDescriptor_7f7c65a4f012fb19, []int{12} } func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -413,7 +413,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{13} + return fileDescriptor_7f7c65a4f012fb19, []int{13} } func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -441,7 +441,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{14} + return fileDescriptor_7f7c65a4f012fb19, []int{14} } func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -469,7 +469,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageIn func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{15} + return fileDescriptor_7f7c65a4f012fb19, []int{15} } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -497,7 +497,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageIn func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } func (*ValidatingAdmissionPolicyList) ProtoMessage() {} func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{16} + return fileDescriptor_7f7c65a4f012fb19, []int{16} } func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -525,7 +525,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{17} + return fileDescriptor_7f7c65a4f012fb19, []int{17} } func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -553,7 +553,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{18} + return fileDescriptor_7f7c65a4f012fb19, []int{18} } func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -581,7 +581,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo func (m *ValidatingWebhook) Reset() { *m = ValidatingWebhook{} } func (*ValidatingWebhook) ProtoMessage() {} func (*ValidatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{19} + return fileDescriptor_7f7c65a4f012fb19, []int{19} } func (m *ValidatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -609,7 +609,7 @@ var xxx_messageInfo_ValidatingWebhook proto.InternalMessageInfo func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} } func (*ValidatingWebhookConfiguration) ProtoMessage() {} func (*ValidatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{20} + return fileDescriptor_7f7c65a4f012fb19, []int{20} } func (m *ValidatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -637,7 +637,7 @@ var xxx_messageInfo_ValidatingWebhookConfiguration proto.InternalMessageInfo func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} } func (*ValidatingWebhookConfigurationList) ProtoMessage() {} func (*ValidatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{21} + return fileDescriptor_7f7c65a4f012fb19, []int{21} } func (m *ValidatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -665,7 +665,7 @@ var xxx_messageInfo_ValidatingWebhookConfigurationList proto.InternalMessageInfo func (m *Validation) Reset() { *m = Validation{} } func (*Validation) ProtoMessage() {} func (*Validation) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{22} + return fileDescriptor_7f7c65a4f012fb19, []int{22} } func (m *Validation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -693,7 +693,7 @@ var xxx_messageInfo_Validation proto.InternalMessageInfo func (m *Variable) Reset() { *m = Variable{} } func (*Variable) ProtoMessage() {} func (*Variable) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{23} + return fileDescriptor_7f7c65a4f012fb19, []int{23} } func (m *Variable) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -721,7 +721,7 @@ var xxx_messageInfo_Variable proto.InternalMessageInfo func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{24} + return fileDescriptor_7f7c65a4f012fb19, []int{24} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -775,135 +775,134 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto", fileDescriptor_abeea74cbc46f55a) -} - -var fileDescriptor_abeea74cbc46f55a = []byte{ - // 1973 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x1a, 0x4d, 0x6f, 0x23, 0x49, - 0x35, 0x1d, 0xe7, 0xc3, 0x7e, 0xce, 0x97, 0x6b, 0x67, 0x89, 0x77, 0x76, 0xd6, 0x8e, 0x5a, 0x2b, - 0x94, 0x91, 0xc0, 0xde, 0xc9, 0xae, 0x76, 0x97, 0x59, 0x21, 0x14, 0x67, 0x67, 0x86, 0x99, 0x9d, - 0x64, 0x42, 0x65, 0x37, 0x91, 0x60, 0x57, 0x9a, 0x72, 0x77, 0xd9, 0x6e, 0x6c, 0x77, 0x37, 0x5d, - 0x6d, 0xcf, 0x04, 0x24, 0x40, 0xe2, 0xb0, 0x57, 0x24, 0x2e, 0x48, 0x9c, 0xf8, 0x0b, 0xdc, 0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59, 0xdd, 0x0c, 0x31, 0xfc, 0x04, 0x96, 0xb4, 0x9e, 0x41, 0x4d, 0x77, 0xc7, 0x32, 0x5b, 0x46, - 0x5b, 0x06, 0xc0, 0xb7, 0xb3, 0x3b, 0x42, 0xaa, 0xda, 0x89, 0x08, 0x69, 0x5c, 0x93, 0x8a, 0x96, - 0xa2, 0x50, 0x1c, 0x53, 0x84, 0x3e, 0x87, 0x79, 0x27, 0x12, 0x02, 0x1f, 0x64, 0xd1, 0x58, 0x4b, - 0x71, 0xf8, 0xb2, 0xd4, 0x35, 0xef, 0x79, 0xd8, 0x13, 0x8a, 0x1e, 0xc2, 0x72, 0x8b, 0x18, 0xbd, - 0x81, 0x43, 0xa5, 0x53, 0xe7, 0x84, 0x07, 0xbe, 0xce, 0x23, 0xe4, 0x6e, 0x14, 0x71, 0x3a, 0xaa, - 0x96, 0x62, 0x00, 0xe1, 0xd8, 0x38, 0x73, 0xf2, 0x82, 0x0a, 0x17, 0xba, 0xa0, 0xf4, 0x3c, 0x9f, - 0xff, 0xff, 0xe4, 0x79, 0xf1, 0xe5, 0xe6, 0xf9, 0xc7, 0x50, 0x64, 0x86, 0x4e, 0xef, 0xb4, 0x5a, - 0x54, 0x73, 0x59, 0x79, 0x21, 0x74, 0xd8, 0x41, 0x08, 0xe6, 0x0e, 0x0b, 0x3f, 0x77, 0x7a, 0x84, - 0x31, 0x1c, 0x65, 0x43, 0xb7, 0x61, 0x85, 0x77, 0x25, 0x6b, 0xe0, 0x1e, 0x50, 0xcd, 0x32, 0x75, - 0x26, 0x52, 0x63, 0xde, 0x3b, 0xc1, 0xa7, 0x31, 0x0c, 0x4e, 0x50, 0xa2, 0xcf, 0x60, 0x3d, 0x88, - 0x22, 0x4c, 0x87, 0x06, 0x7d, 0x72, 0x48, 0x1d, 0xfe, 0xc1, 0xca, 0xf9, 0x8d, 0xdc, 0x66, 0xa1, - 0xf1, 0xe6, 0x78, 0x54, 0x5d, 0xdf, 0x4e, 0x27, 0xc1, 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, - 0xc8, 0x8b, 0x52, 0xb4, 0x89, 0x0a, 0x04, 0x8e, 0xd3, 0xa1, 0x5f, 0x28, 0x80, 0x9c, 0x09, 0x79, - 0xb2, 0x73, 0x5c, 0xb8, 0x8e, 0x5f, 0x97, 0x06, 0xa0, 0x49, 0x1c, 0x4e, 0x51, 0xa7, 0x12, 0x28, - 0xec, 0x13, 0x87, 0xf4, 0x3f, 0x31, 0x4c, 0x9d, 0x4f, 0x62, 0xc4, 0x36, 0x64, 0x96, 0xca, 0x6e, - 0x17, 0x84, 0xd9, 0xf6, 0xfe, 0x7d, 0x89, 0xc1, 0x11, 0x2a, 0xde, 0x1b, 0xbb, 0x86, 0xa9, 0xcb, - 0xb9, 0x2d, 0xe8, 0x8d, 0x5c, 0x1e, 0x16, 0x18, 0xf5, 0x77, 0xb3, 0x90, 0x17, 0x3a, 0xf8, 0x2c, - 0x79, 0x76, 0x2b, 0xad, 0x43, 0x21, 0x28, 0xbd, 0x52, 0x6a, 0x49, 0x92, 0x15, 0x82, 0x32, 0x8d, - 0x43, 0x1a, 0xf4, 0x05, 0xe4, 0x99, 0x5f, 0x90, 0x73, 0x17, 0x2f, 0xc8, 0x4b, 0x3c, 0xd2, 0x82, - 0x52, 0x1c, 0x88, 0x44, 0x2e, 0xac, 0xdb, 0xfc, 0xf4, 0xd4, 0xa5, 0xce, 0x9e, 0xe5, 0xde, 0xb5, - 0x06, 0xa6, 0xbe, 0xad, 0x71, 0xef, 0xc9, 0x6e, 0x78, 0x9b, 0x97, 0xc0, 0xfd, 0x74, 0x92, 0xd3, - 0x51, 0xf5, 0xcd, 0x29, 0x28, 0x51, 0xba, 0xa6, 0x89, 0x56, 0x7f, 0xab, 0xc0, 0xda, 0x01, 0x75, - 0x86, 0x86, 0x46, 0x31, 0x6d, 0x51, 0x87, 0x9a, 0x5a, 0xc2, 0x35, 0x4a, 0x06, 0xd7, 0xf8, 0xde, - 0x9e, 0x9d, 0xea, 0xed, 0x1b, 0x30, 0x67, 0x13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 0xbb, 0xaf, 0x25, 0xef, 0x8d, 0xb7, 0xb3, 0xed, 0xc1, 0x70, 0x80, 0x6d, 0xec, 0x3d, 0x3b, 0xa9, - 0xcc, 0x7c, 0x75, 0x52, 0x99, 0x79, 0x7e, 0x52, 0x99, 0xf9, 0xf9, 0xb8, 0xa2, 0x3c, 0x1b, 0x57, - 0x94, 0xaf, 0xc6, 0x15, 0xe5, 0xf9, 0xb8, 0xa2, 0xfc, 0x75, 0x5c, 0x51, 0x7e, 0xf9, 0xb7, 0xca, - 0xcc, 0xf7, 0x37, 0xb3, 0xfe, 0x97, 0xc3, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x71, 0x54, 0x54, - 0xe6, 0x29, 0x21, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/admissionregistration/v1beta1/generated.proto", fileDescriptor_7f7c65a4f012fb19) +} + +var fileDescriptor_7f7c65a4f012fb19 = []byte{ + // 1957 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x1a, 0x4d, 0x6f, 0x1b, 0xc7, + 0xd5, 0x2b, 0x52, 0x12, 0xf9, 0xa8, 0x2f, 0x4e, 0x9c, 0x8a, 0x76, 0x1c, 0x52, 0x58, 0x04, 0x85, + 0x0c, 0xb4, 0x64, 0xac, 0x04, 0x89, 0xeb, 0xa0, 0x28, 0x44, 0xc5, 0x76, 0xed, 0x58, 0xb2, 0x30, + 0x4a, 0x24, 0xa0, 0x4d, 0x00, 0x8f, 0x76, 0x87, 0xe4, 0x96, 0xe4, 0xee, 0x76, 0x67, 0x49, 0x5b, + 0x2d, 0xd0, 0x16, 0xe8, 0x21, 0xd7, 0x02, 0xbd, 0x14, 0xe8, 0xa9, 0x7f, 0xa1, 0xf7, 0x02, 0xed, + 0xcd, 0xc7, 0xdc, 0x6a, 0xa0, 0x28, 0x51, 0xb1, 0x87, 0x9e, 0x7a, 0xe8, 0xa1, 0x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, 0x14, 0x75, 0x2a, 0x81, + 0xe2, 0x2e, 0x71, 0x48, 0xff, 0x13, 0xc3, 0xd4, 0xf9, 0x24, 0x46, 0x6c, 0x43, 0x66, 0xa9, 0xec, + 0x76, 0x41, 0x98, 0x6d, 0xee, 0x3e, 0x90, 0x18, 0x1c, 0xa1, 0xe2, 0xbd, 0xb1, 0x6b, 0x98, 0xba, + 0x9c, 0xdb, 0x82, 0xde, 0xc8, 0xe5, 0x61, 0x81, 0x51, 0x7f, 0x3f, 0x03, 0x05, 0xa1, 0x83, 0xcf, + 0x92, 0xa7, 0xb7, 0xd2, 0x06, 0x14, 0x83, 0xd2, 0x2b, 0xa5, 0x96, 0x25, 0x59, 0x31, 0x28, 0xd3, + 0x38, 0xa4, 0x41, 0x5f, 0x40, 0x81, 0xf9, 0x05, 0x39, 0x77, 0xfe, 0x82, 0xbc, 0xc0, 0x23, 0x2d, + 0x28, 0xc5, 0x81, 0x48, 0xe4, 0xc2, 0xaa, 0xcd, 0x4f, 0x4f, 0x5d, 0xea, 0xec, 0x58, 0xee, 0x3d, + 0x6b, 0x60, 0xea, 0x9b, 0x1a, 0xf7, 0x9e, 0xec, 0x86, 0x77, 0x78, 0x09, 0xdc, 0x4d, 0x27, 0x39, + 0x19, 0xd5, 0xde, 0x9a, 0x82, 0x12, 0xa5, 0x6b, 0x9a, 0x68, 0xf5, 0x77, 0x0a, 0xac, 0xec, 0x51, + 0x67, 0x68, 0x68, 0x14, 0xd3, 0x16, 0x75, 0xa8, 0xa9, 0x25, 0x5c, 0xa3, 0x64, 0x70, 0x8d, 0xef, + 0xed, 0x99, 0xa9, 0xde, 0xbe, 0x01, 0x79, 0x9b, 0xb8, 0x1d, 0x39, 0xd8, 0x17, 0x38, 0x76, 0x97, + 0xb8, 0x1d, 0x2c, 0xa0, 0x02, 0x6b, 0x39, 0xae, 0x30, 0x74, 0x56, 0x62, 0x2d, 0xc7, 0xc5, 0x02, + 0xaa, 0xfe, 0x46, 0x81, 0x05, 0x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x55, 0xe5, 0xf9, 0xb8, + 0xaa, 0x7c, 0x35, 0xae, 0x2a, 0x2f, 0xc6, 0x55, 0xe5, 0x6f, 0xe3, 0xaa, 0xf2, 0xab, 0xbf, 0x57, + 0xaf, 0xfc, 0x60, 0x3d, 0xeb, 0x7f, 0x39, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x6f, 0xf2, 0xe8, + 0x4a, 0x10, 0x21, 0x00, 0x00, } func (m *AuditAnnotation) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto index 1855cdfc4f7..91479acc20b 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto @@ -222,6 +222,7 @@ message MutatingWebhook { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic repeated k8s.io.api.admissionregistration.v1.RuleWithOperations rules = 3; // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -332,6 +333,7 @@ message MutatingWebhook { // and be subject to the failure policy. // Default to `['v1beta1']`. // +optional + // +listType=atomic repeated string admissionReviewVersions = 8; // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. @@ -364,13 +366,10 @@ message MutatingWebhook { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional repeated MatchCondition matchConditions = 12; } @@ -386,6 +385,8 @@ message MutatingWebhookConfiguration { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated MutatingWebhook Webhooks = 2; } @@ -765,6 +766,7 @@ message ValidatingWebhook { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic repeated k8s.io.api.admissionregistration.v1.RuleWithOperations rules = 3; // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -856,6 +858,7 @@ message ValidatingWebhook { // Requests with the dryRun attribute will be auto-rejected if they match a webhook with // sideEffects == Unknown or Some. Defaults to Unknown. // +optional + // +listType=atomic optional string sideEffects = 6; // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, @@ -875,6 +878,7 @@ message ValidatingWebhook { // and be subject to the failure policy. // Default to `['v1beta1']`. // +optional + // +listType=atomic repeated string admissionReviewVersions = 8; // MatchConditions is a list of conditions that must be met for a request to be sent to this @@ -889,13 +893,10 @@ message ValidatingWebhook { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional repeated MatchCondition matchConditions = 11; } @@ -911,6 +912,8 @@ message ValidatingWebhookConfiguration { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated ValidatingWebhook Webhooks = 2; } diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/types.go b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/types.go index 27085e056a1..cf1e29a6cab 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/types.go @@ -158,7 +158,7 @@ type ValidatingAdmissionPolicyList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingAdmissionPolicy. - Items []ValidatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicy `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. @@ -419,7 +419,7 @@ type ValidatingAdmissionPolicyBindingList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of PolicyBinding. - Items []ValidatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicyBinding `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. @@ -684,6 +684,8 @@ type ValidatingWebhookConfiguration struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Webhooks []ValidatingWebhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"` } @@ -723,6 +725,8 @@ type MutatingWebhookConfiguration struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Webhooks []MutatingWebhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"` } @@ -762,6 +766,7 @@ type ValidatingWebhook struct { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -853,6 +858,7 @@ type ValidatingWebhook struct { // Requests with the dryRun attribute will be auto-rejected if they match a webhook with // sideEffects == Unknown or Some. Defaults to Unknown. // +optional + // +listType=atomic SideEffects *SideEffectClass `json:"sideEffects,omitempty" protobuf:"bytes,6,opt,name=sideEffects,casttype=SideEffectClass"` // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, @@ -872,6 +878,7 @@ type ValidatingWebhook struct { // and be subject to the failure policy. // Default to `['v1beta1']`. // +optional + // +listType=atomic AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty" protobuf:"bytes,8,rep,name=admissionReviewVersions"` // MatchConditions is a list of conditions that must be met for a request to be sent to this @@ -886,13 +893,10 @@ type ValidatingWebhook struct { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,11,rep,name=matchConditions"` } @@ -916,6 +920,7 @@ type MutatingWebhook struct { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -1026,6 +1031,7 @@ type MutatingWebhook struct { // and be subject to the failure policy. // Default to `['v1beta1']`. // +optional + // +listType=atomic AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty" protobuf:"bytes,8,rep,name=admissionReviewVersions"` // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. @@ -1058,13 +1064,10 @@ type MutatingWebhook struct { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,12,rep,name=matchConditions"` } diff --git a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go index adaf4bc11db..cc1509b539a 100644 --- a/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go +++ b/pkg/k8s/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go @@ -83,7 +83,7 @@ var map_MutatingWebhook = map[string]string{ "timeoutSeconds": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds.", "admissionReviewVersions": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. Default to `['v1beta1']`.", "reinvocationPolicy": "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", - "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.", + "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped", } func (MutatingWebhook) SwaggerDoc() map[string]string { @@ -253,7 +253,7 @@ var map_ValidatingWebhook = map[string]string{ "sideEffects": "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", "timeoutSeconds": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds.", "admissionReviewVersions": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. Default to `['v1beta1']`.", - "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.", + "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped", } func (ValidatingWebhook) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/component-base/config/v1alpha1/doc.go b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/doc.go similarity index 75% rename from vendor/k8s.io/component-base/config/v1alpha1/doc.go rename to pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/doc.go index 3cd4f4292e5..d47aa859768 100644 --- a/vendor/k8s.io/component-base/config/v1alpha1/doc.go +++ b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,6 +15,9 @@ limitations under the License. */ // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=k8s.io/component-base/config +// +k8s:protobuf-gen=package +// +k8s:openapi-gen=true -package v1alpha1 // import "k8s.io/component-base/config/v1alpha1" +// +groupName=apidiscovery.k8s.io + +package v2 // import "k8s.io/api/apidiscovery/v2" diff --git a/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/generated.pb.go new file mode 100644 index 00000000000..5c37feaa2ea --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/generated.pb.go @@ -0,0 +1,1742 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/api/apidiscovery/v2/generated.proto + +package v2 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *APIGroupDiscovery) Reset() { *m = APIGroupDiscovery{} } +func (*APIGroupDiscovery) ProtoMessage() {} +func (*APIGroupDiscovery) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b7287280068d8f, []int{0} +} +func (m *APIGroupDiscovery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APIGroupDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *APIGroupDiscovery) XXX_Merge(src proto.Message) { + xxx_messageInfo_APIGroupDiscovery.Merge(m, src) +} +func (m *APIGroupDiscovery) XXX_Size() int { + return m.Size() +} +func (m *APIGroupDiscovery) XXX_DiscardUnknown() { + xxx_messageInfo_APIGroupDiscovery.DiscardUnknown(m) +} + +var xxx_messageInfo_APIGroupDiscovery proto.InternalMessageInfo + +func (m *APIGroupDiscoveryList) Reset() { *m = APIGroupDiscoveryList{} } +func (*APIGroupDiscoveryList) ProtoMessage() {} +func (*APIGroupDiscoveryList) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b7287280068d8f, []int{1} +} +func (m *APIGroupDiscoveryList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APIGroupDiscoveryList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *APIGroupDiscoveryList) XXX_Merge(src proto.Message) { + xxx_messageInfo_APIGroupDiscoveryList.Merge(m, src) +} +func (m *APIGroupDiscoveryList) XXX_Size() int { + return m.Size() +} +func (m *APIGroupDiscoveryList) XXX_DiscardUnknown() { + xxx_messageInfo_APIGroupDiscoveryList.DiscardUnknown(m) +} + +var xxx_messageInfo_APIGroupDiscoveryList proto.InternalMessageInfo + +func (m *APIResourceDiscovery) Reset() { *m = APIResourceDiscovery{} } +func (*APIResourceDiscovery) ProtoMessage() {} +func (*APIResourceDiscovery) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b7287280068d8f, []int{2} +} +func (m *APIResourceDiscovery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APIResourceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *APIResourceDiscovery) XXX_Merge(src proto.Message) { + xxx_messageInfo_APIResourceDiscovery.Merge(m, src) +} +func (m *APIResourceDiscovery) XXX_Size() int { + return m.Size() +} +func (m *APIResourceDiscovery) XXX_DiscardUnknown() { + xxx_messageInfo_APIResourceDiscovery.DiscardUnknown(m) +} + +var xxx_messageInfo_APIResourceDiscovery proto.InternalMessageInfo + +func (m *APISubresourceDiscovery) Reset() { *m = APISubresourceDiscovery{} } +func (*APISubresourceDiscovery) ProtoMessage() {} +func (*APISubresourceDiscovery) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b7287280068d8f, []int{3} +} +func (m *APISubresourceDiscovery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APISubresourceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *APISubresourceDiscovery) XXX_Merge(src proto.Message) { + xxx_messageInfo_APISubresourceDiscovery.Merge(m, src) +} +func (m *APISubresourceDiscovery) XXX_Size() int { + return m.Size() +} +func (m *APISubresourceDiscovery) XXX_DiscardUnknown() { + xxx_messageInfo_APISubresourceDiscovery.DiscardUnknown(m) +} + +var xxx_messageInfo_APISubresourceDiscovery proto.InternalMessageInfo + +func (m *APIVersionDiscovery) Reset() { *m = APIVersionDiscovery{} } +func (*APIVersionDiscovery) ProtoMessage() {} +func (*APIVersionDiscovery) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b7287280068d8f, []int{4} +} +func (m *APIVersionDiscovery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APIVersionDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *APIVersionDiscovery) XXX_Merge(src proto.Message) { + xxx_messageInfo_APIVersionDiscovery.Merge(m, src) +} +func (m *APIVersionDiscovery) XXX_Size() int { + return m.Size() +} +func (m *APIVersionDiscovery) XXX_DiscardUnknown() { + xxx_messageInfo_APIVersionDiscovery.DiscardUnknown(m) +} + +var xxx_messageInfo_APIVersionDiscovery proto.InternalMessageInfo + +func init() { + proto.RegisterType((*APIGroupDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APIGroupDiscovery") + proto.RegisterType((*APIGroupDiscoveryList)(nil), "k8s.io.api.apidiscovery.v2.APIGroupDiscoveryList") + proto.RegisterType((*APIResourceDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APIResourceDiscovery") + proto.RegisterType((*APISubresourceDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APISubresourceDiscovery") + proto.RegisterType((*APIVersionDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APIVersionDiscovery") +} + +func init() { + proto.RegisterFile("k8s.io/api/apidiscovery/v2/generated.proto", fileDescriptor_e0b7287280068d8f) +} + +var fileDescriptor_e0b7287280068d8f = []byte{ + // 736 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x4e, 0xdb, 0x4c, + 0x14, 0x8d, 0x09, 0xf9, 0x48, 0x26, 0xc9, 0xd7, 0x30, 0x80, 0x6a, 0x65, 0xe1, 0xa0, 0x6c, 0x4a, + 0xab, 0x32, 0x86, 0x94, 0xa2, 0x2e, 0x9b, 0x94, 0xb6, 0x8a, 0xfa, 0x87, 0x26, 0x15, 0x8b, 0xaa, + 0x95, 0xea, 0x38, 0x83, 0xe3, 0x82, 0x7f, 0x34, 0xe3, 0x44, 0x62, 0xd7, 0x47, 0xe8, 0x13, 0xf4, + 0x79, 0xe8, 0x8e, 0x05, 0x0b, 0x56, 0x51, 0x49, 0x77, 0x7d, 0x04, 0x56, 0xd5, 0x8c, 0xc7, 0x3f, + 0x21, 0x44, 0x41, 0x5d, 0x74, 0x81, 0x84, 0xcf, 0x9c, 0x73, 0xee, 0x3d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, 0x55, 0x1a, 0x54, 0x3a, 0xd7, 0xce, 0xf1, 0x94, + 0x02, 0xd6, 0x40, 0x6e, 0x48, 0x68, 0x97, 0xa9, 0xb9, 0xf5, 0xec, 0x46, 0xa1, 0x55, 0xe0, 0x75, + 0x0f, 0x38, 0x80, 0x43, 0x1c, 0x22, 0x00, 0x58, 0xdf, 0xa3, 0xc1, 0x5b, 0xc3, 0x21, 0x4c, 0xfd, + 0x4f, 0xb0, 0xfe, 0xe7, 0xab, 0xda, 0x89, 0x51, 0x9c, 0x62, 0x70, 0xbe, 0x69, 0x04, 0xc4, 0xf2, + 0xa8, 0x4d, 0x98, 0xba, 0x94, 0xf0, 0x9f, 0xc5, 0x28, 0x4e, 0x31, 0xa0, 0x03, 0x4a, 0x6c, 0xd0, + 0x8d, 0x26, 0xcf, 0xd4, 0xbc, 0x58, 0x86, 0x47, 0x73, 0x96, 0xa1, 0x93, 0x48, 0x92, 0x95, 0x58, + 0x95, 0xb9, 0x4b, 0xa9, 0x53, 0x86, 0x27, 0xec, 0xeb, 0xe7, 0x0b, 0xe0, 0xee, 0x0c, 0x3d, 0x7c, + 0x0c, 0x8a, 0x29, 0xae, 0x5c, 0x93, 0x15, 0x69, 0x5a, 0x4c, 0x49, 0x70, 0x9a, 0xf7, 0x8f, 0x97, + 0x85, 0x81, 0xb2, 0x61, 0x9a, 0xc4, 0x0f, 0x48, 0xef, 0xfd, 0x89, 0x4f, 0x98, 0x9a, 0x15, 0x03, + 0xfb, 0xdb, 0x72, 0x6b, 0x32, 0x5e, 0xb9, 0x99, 0x36, 0xc5, 0x93, 0x35, 0x92, 0x2d, 0x59, 0xbc, + 0x79, 0x4b, 0xea, 0xbf, 0x15, 0xb0, 0x72, 0xc3, 0xbd, 0x03, 0xef, 0x83, 0x25, 0x79, 0xcf, 0xc8, + 0x71, 0xde, 0x91, 0xf5, 0x96, 0x24, 0x15, 0x47, 0xe7, 0xd0, 0x00, 0x85, 0x64, 0x0b, 0xc2, 0x2b, + 0x61, 0x6b, 0xce, 0x16, 0x4c, 0x7d, 0xe6, 0xad, 0x65, 0x69, 0x5f, 0xc0, 0xf1, 0xfb, 0x4f, 0x5c, + 0xe1, 0x73, 0x50, 0x38, 0xa4, 0x84, 0xf5, 0x5d, 0xc2, 0x98, 0xfc, 0xd8, 0xee, 0x45, 0x82, 0x17, + 0xd1, 0xc1, 0xd5, 0xa8, 0x06, 0x63, 0xc3, 0x18, 0xc5, 0x89, 0xb2, 0xf5, 0xf4, 0xf4, 0x52, 0xcb, + 0x9c, 0x5d, 0x6a, 0x99, 0x8b, 0x4b, 0x2d, 0xf3, 0x75, 0xac, 0x29, 0xa7, 0x63, 0x4d, 0x39, 0x1b, + 0x6b, 0xca, 0xc5, 0x58, 0x53, 0x7e, 0x8e, 0x35, 0xe5, 0xdb, 0x2f, 0x2d, 0xf3, 0xa1, 0x3a, 0xfb, + 0x37, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x35, 0x6a, 0x0f, 0x60, 0x07, 0x00, 0x00, +} + +func (m *APIGroupDiscovery) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIGroupDiscovery) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APIGroupDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Versions) > 0 { + for iNdEx := len(m.Versions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Versions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *APIGroupDiscoveryList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIGroupDiscoveryList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APIGroupDiscoveryList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *APIResourceDiscovery) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIResourceDiscovery) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APIResourceDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Subresources) > 0 { + for iNdEx := len(m.Subresources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Subresources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.Categories) > 0 { + for iNdEx := len(m.Categories) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Categories[iNdEx]) + copy(dAtA[i:], m.Categories[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Categories[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.ShortNames) > 0 { + for iNdEx := len(m.ShortNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ShortNames[iNdEx]) + copy(dAtA[i:], m.ShortNames[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ShortNames[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Verbs) > 0 { + for iNdEx := len(m.Verbs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Verbs[iNdEx]) + copy(dAtA[i:], m.Verbs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verbs[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + i -= len(m.SingularResource) + copy(dAtA[i:], m.SingularResource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SingularResource))) + i-- + dAtA[i] = 0x22 + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0x1a + if m.ResponseKind != nil { + { + size, err := m.ResponseKind.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *APISubresourceDiscovery) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APISubresourceDiscovery) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APISubresourceDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Verbs) > 0 { + for iNdEx := len(m.Verbs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Verbs[iNdEx]) + copy(dAtA[i:], m.Verbs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verbs[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.AcceptedTypes) > 0 { + for iNdEx := len(m.AcceptedTypes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AcceptedTypes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.ResponseKind != nil { + { + size, err := m.ResponseKind.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.Subresource) + copy(dAtA[i:], m.Subresource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *APIVersionDiscovery) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIVersionDiscovery) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APIVersionDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Freshness) + copy(dAtA[i:], m.Freshness) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Freshness))) + i-- + dAtA[i] = 0x1a + if len(m.Resources) > 0 { + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *APIGroupDiscovery) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Versions) > 0 { + for _, e := range m.Versions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *APIGroupDiscoveryList) Size() (n int) { + if m == nil { + return 0 + } + 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 *APIResourceDiscovery) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Resource) + n += 1 + l + sovGenerated(uint64(l)) + if m.ResponseKind != nil { + l = m.ResponseKind.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.Scope) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.SingularResource) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ShortNames) > 0 { + for _, s := range m.ShortNames { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Categories) > 0 { + for _, s := range m.Categories { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Subresources) > 0 { + for _, e := range m.Subresources { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *APISubresourceDiscovery) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Subresource) + n += 1 + l + sovGenerated(uint64(l)) + if m.ResponseKind != nil { + l = m.ResponseKind.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.AcceptedTypes) > 0 { + for _, e := range m.AcceptedTypes { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *APIVersionDiscovery) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.Freshness) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *APIGroupDiscovery) String() string { + if this == nil { + return "nil" + } + repeatedStringForVersions := "[]APIVersionDiscovery{" + for _, f := range this.Versions { + repeatedStringForVersions += strings.Replace(strings.Replace(f.String(), "APIVersionDiscovery", "APIVersionDiscovery", 1), `&`, ``, 1) + "," + } + repeatedStringForVersions += "}" + s := strings.Join([]string{`&APIGroupDiscovery{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Versions:` + repeatedStringForVersions + `,`, + `}`, + }, "") + return s +} +func (this *APIGroupDiscoveryList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]APIGroupDiscovery{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "APIGroupDiscovery", "APIGroupDiscovery", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&APIGroupDiscoveryList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *APIResourceDiscovery) String() string { + if this == nil { + return "nil" + } + repeatedStringForSubresources := "[]APISubresourceDiscovery{" + for _, f := range this.Subresources { + repeatedStringForSubresources += strings.Replace(strings.Replace(f.String(), "APISubresourceDiscovery", "APISubresourceDiscovery", 1), `&`, ``, 1) + "," + } + repeatedStringForSubresources += "}" + s := strings.Join([]string{`&APIResourceDiscovery{`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `ResponseKind:` + strings.Replace(fmt.Sprintf("%v", this.ResponseKind), "GroupVersionKind", "v1.GroupVersionKind", 1) + `,`, + `Scope:` + fmt.Sprintf("%v", this.Scope) + `,`, + `SingularResource:` + fmt.Sprintf("%v", this.SingularResource) + `,`, + `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, + `ShortNames:` + fmt.Sprintf("%v", this.ShortNames) + `,`, + `Categories:` + fmt.Sprintf("%v", this.Categories) + `,`, + `Subresources:` + repeatedStringForSubresources + `,`, + `}`, + }, "") + return s +} +func (this *APISubresourceDiscovery) String() string { + if this == nil { + return "nil" + } + repeatedStringForAcceptedTypes := "[]GroupVersionKind{" + for _, f := range this.AcceptedTypes { + repeatedStringForAcceptedTypes += fmt.Sprintf("%v", f) + "," + } + repeatedStringForAcceptedTypes += "}" + s := strings.Join([]string{`&APISubresourceDiscovery{`, + `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`, + `ResponseKind:` + strings.Replace(fmt.Sprintf("%v", this.ResponseKind), "GroupVersionKind", "v1.GroupVersionKind", 1) + `,`, + `AcceptedTypes:` + repeatedStringForAcceptedTypes + `,`, + `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, + `}`, + }, "") + return s +} +func (this *APIVersionDiscovery) String() string { + if this == nil { + return "nil" + } + repeatedStringForResources := "[]APIResourceDiscovery{" + for _, f := range this.Resources { + repeatedStringForResources += strings.Replace(strings.Replace(f.String(), "APIResourceDiscovery", "APIResourceDiscovery", 1), `&`, ``, 1) + "," + } + repeatedStringForResources += "}" + s := strings.Join([]string{`&APIVersionDiscovery{`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `Resources:` + repeatedStringForResources + `,`, + `Freshness:` + fmt.Sprintf("%v", this.Freshness) + `,`, + `}`, + }, "") + 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 *APIGroupDiscovery) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIGroupDiscovery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIGroupDiscovery: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Versions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Versions = append(m.Versions, APIVersionDiscovery{}) + if err := m.Versions[len(m.Versions)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APIGroupDiscoveryList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIGroupDiscoveryList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIGroupDiscoveryList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, APIGroupDiscovery{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APIResourceDiscovery) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIResourceDiscovery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIResourceDiscovery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseKind", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseKind == nil { + m.ResponseKind = &v1.GroupVersionKind{} + } + if err := m.ResponseKind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Scope = ResourceScope(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SingularResource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SingularResource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShortNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShortNames = append(m.ShortNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Categories", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Categories = append(m.Categories, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subresources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subresources = append(m.Subresources, APISubresourceDiscovery{}) + if err := m.Subresources[len(m.Subresources)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APISubresourceDiscovery) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APISubresourceDiscovery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APISubresourceDiscovery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subresource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseKind", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseKind == nil { + m.ResponseKind = &v1.GroupVersionKind{} + } + if err := m.ResponseKind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AcceptedTypes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AcceptedTypes = append(m.AcceptedTypes, v1.GroupVersionKind{}) + if err := m.AcceptedTypes[len(m.AcceptedTypes)-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 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APIVersionDiscovery) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIVersionDiscovery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIVersionDiscovery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, APIResourceDiscovery{}) + if err := m.Resources[len(m.Resources)-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 Freshness", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Freshness = DiscoveryFreshness(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 + depth := 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 + } + } + case 1: + iNdEx += 8 + 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 + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/generated.proto b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/generated.proto new file mode 100644 index 00000000000..fa56318a6de --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/generated.proto @@ -0,0 +1,156 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = "proto2"; + +package k8s.io.api.apidiscovery.v2; + +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"; + +// Package-wide variables from generator "generated". +option go_package = "k8s.io/api/apidiscovery/v2"; + +// APIGroupDiscovery holds information about which resources are being served for all version of the API Group. +// It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version. +// Versions are in descending order of preference, with the first version being the preferred entry. +message APIGroupDiscovery { + // Standard object's metadata. + // The only field completed will be name. For instance, resourceVersion will be empty. + // name is the name of the API group whose discovery information is presented here. + // name is allowed to be "" to represent the legacy, ungroupified resources. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // versions are the versions supported in this group. They are sorted in descending order of preference, + // with the preferred version being the first entry. + // +listType=map + // +listMapKey=version + repeated APIVersionDiscovery versions = 2; +} + +// APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery. +// This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated +// list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers) +// that a cluster supports. +message APIGroupDiscoveryList { + // ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // items is the list of groups for discovery. The groups are listed in priority order. + repeated APIGroupDiscovery items = 2; +} + +// APIResourceDiscovery provides information about an API resource for discovery. +message APIResourceDiscovery { + // resource is the plural name of the resource. This is used in the URL path and is the unique identifier + // for this resource across all versions in the API group. + // Resources with non-empty groups are located at /apis/// + // Resources with empty groups are located at /api/v1/ + optional string resource = 1; + + // responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. + // APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior. + // This value will be null or empty if an APIService reports subresources but supports no operations on the parent resource + optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind responseKind = 2; + + // scope indicates the scope of a resource, either Cluster or Namespaced + optional string scope = 3; + + // singularResource is the singular name of the resource. This allows clients to handle plural and singular opaquely. + // For many clients the singular form of the resource will be more understandable to users reading messages and should be used when integrating the name of the resource into a sentence. + // The command line tool kubectl, for example, allows use of the singular resource name in place of plurals. + // The singular form of a resource should always be an optional element - when in doubt use the canonical resource name. + optional string singularResource = 4; + + // verbs is a list of supported API operation types (this includes + // but is not limited to get, list, watch, create, update, patch, + // delete, deletecollection, and proxy). + // +listType=set + repeated string verbs = 5; + + // shortNames is a list of suggested short names of the resource. + // +listType=set + repeated string shortNames = 6; + + // categories is a list of the grouped resources this resource belongs to (e.g. 'all'). + // Clients may use this to simplify acting on multiple resource types at once. + // +listType=set + repeated string categories = 7; + + // subresources is a list of subresources provided by this resource. Subresources are located at /apis////name-of-instance/ + // +listType=map + // +listMapKey=subresource + repeated APISubresourceDiscovery subresources = 8; +} + +// APISubresourceDiscovery provides information about an API subresource for discovery. +message APISubresourceDiscovery { + // subresource is the name of the subresource. This is used in the URL path and is the unique identifier + // for this resource across all versions. + optional string subresource = 1; + + // responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. + // Some subresources do not return normal resources, these will have null or empty return types. + optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind responseKind = 2; + + // acceptedTypes describes the kinds that this endpoint accepts. + // Subresources may accept the standard content types or define + // custom negotiation schemes. The list may not be exhaustive for + // all operations. + // +listType=map + // +listMapKey=group + // +listMapKey=version + // +listMapKey=kind + repeated k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind acceptedTypes = 3; + + // verbs is a list of supported API operation types (this includes + // but is not limited to get, list, watch, create, update, patch, + // delete, deletecollection, and proxy). Subresources may define + // custom verbs outside the standard Kubernetes verb set. Clients + // should expect the behavior of standard verbs to align with + // Kubernetes interaction conventions. + // +listType=set + repeated string verbs = 4; +} + +// APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group. +message APIVersionDiscovery { + // version is the name of the version within a group version. + optional string version = 1; + + // resources is a list of APIResourceDiscovery objects for the corresponding group version. + // +listType=map + // +listMapKey=resource + repeated APIResourceDiscovery resources = 2; + + // freshness marks whether a group version's discovery document is up to date. + // "Current" indicates the discovery document was recently + // refreshed. "Stale" indicates the discovery document could not + // be retrieved and the returned discovery document may be + // significantly out of date. Clients that require the latest + // version of the discovery information be retrieved before + // performing an operation should not use the aggregated document + optional string freshness = 3; +} + diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/register.go b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/register.go similarity index 54% rename from vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/register.go rename to pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/register.go index 9040aba7b90..dd759defce5 100644 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/register.go +++ b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/register.go @@ -1,9 +1,20 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium +/* +Copyright 2024 The Kubernetes Authors. -// Copyright 2019 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -package v1beta1 + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -11,11 +22,11 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -// GroupName is the group name used in this package -const GroupName = "discovery.k8s.io" +// GroupName is the group name for this API. +const GroupName = "apidiscovery.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2"} // Kind takes an unqualified kind and returns a Group qualified GroupKind func Kind(kind string) schema.GroupKind { @@ -28,17 +39,17 @@ func Resource(resource string) schema.GroupResource { } var ( - // SchemeBuilder is the scheme builder with scheme init functions to run for this API package + // SchemeBuilder installs the api group to a scheme SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme + // AddToScheme adds api to a scheme AddToScheme = SchemeBuilder.AddToScheme ) // Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &EndpointSlice{}, - &EndpointSliceList{}, + &APIGroupDiscoveryList{}, + &APIGroupDiscovery{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/types.go b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/types.go new file mode 100644 index 00000000000..f0e31bcde52 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/types.go @@ -0,0 +1,155 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery. +// This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated +// list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers) +// that a cluster supports. +type APIGroupDiscoveryList struct { + v1.TypeMeta `json:",inline"` + // ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // items is the list of groups for discovery. The groups are listed in priority order. + Items []APIGroupDiscovery `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// APIGroupDiscovery holds information about which resources are being served for all version of the API Group. +// It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version. +// Versions are in descending order of preference, with the first version being the preferred entry. +type APIGroupDiscovery struct { + v1.TypeMeta `json:",inline"` + // Standard object's metadata. + // The only field completed will be name. For instance, resourceVersion will be empty. + // name is the name of the API group whose discovery information is presented here. + // name is allowed to be "" to represent the legacy, ungroupified resources. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // versions are the versions supported in this group. They are sorted in descending order of preference, + // with the preferred version being the first entry. + // +listType=map + // +listMapKey=version + Versions []APIVersionDiscovery `json:"versions,omitempty" protobuf:"bytes,2,rep,name=versions"` +} + +// APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group. +type APIVersionDiscovery struct { + // version is the name of the version within a group version. + Version string `json:"version" protobuf:"bytes,1,opt,name=version"` + // resources is a list of APIResourceDiscovery objects for the corresponding group version. + // +listType=map + // +listMapKey=resource + Resources []APIResourceDiscovery `json:"resources,omitempty" protobuf:"bytes,2,rep,name=resources"` + // freshness marks whether a group version's discovery document is up to date. + // "Current" indicates the discovery document was recently + // refreshed. "Stale" indicates the discovery document could not + // be retrieved and the returned discovery document may be + // significantly out of date. Clients that require the latest + // version of the discovery information be retrieved before + // performing an operation should not use the aggregated document + Freshness DiscoveryFreshness `json:"freshness,omitempty" protobuf:"bytes,3,opt,name=freshness"` +} + +// APIResourceDiscovery provides information about an API resource for discovery. +type APIResourceDiscovery struct { + // resource is the plural name of the resource. This is used in the URL path and is the unique identifier + // for this resource across all versions in the API group. + // Resources with non-empty groups are located at /apis/// + // Resources with empty groups are located at /api/v1/ + Resource string `json:"resource" protobuf:"bytes,1,opt,name=resource"` + // responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. + // APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior. + // This value will be null or empty if an APIService reports subresources but supports no operations on the parent resource + ResponseKind *v1.GroupVersionKind `json:"responseKind,omitempty" protobuf:"bytes,2,opt,name=responseKind"` + // scope indicates the scope of a resource, either Cluster or Namespaced + Scope ResourceScope `json:"scope" protobuf:"bytes,3,opt,name=scope"` + // singularResource is the singular name of the resource. This allows clients to handle plural and singular opaquely. + // For many clients the singular form of the resource will be more understandable to users reading messages and should be used when integrating the name of the resource into a sentence. + // The command line tool kubectl, for example, allows use of the singular resource name in place of plurals. + // The singular form of a resource should always be an optional element - when in doubt use the canonical resource name. + SingularResource string `json:"singularResource" protobuf:"bytes,4,opt,name=singularResource"` + // verbs is a list of supported API operation types (this includes + // but is not limited to get, list, watch, create, update, patch, + // delete, deletecollection, and proxy). + // +listType=set + Verbs []string `json:"verbs" protobuf:"bytes,5,opt,name=verbs"` + // shortNames is a list of suggested short names of the resource. + // +listType=set + ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,6,rep,name=shortNames"` + // categories is a list of the grouped resources this resource belongs to (e.g. 'all'). + // Clients may use this to simplify acting on multiple resource types at once. + // +listType=set + Categories []string `json:"categories,omitempty" protobuf:"bytes,7,rep,name=categories"` + // subresources is a list of subresources provided by this resource. Subresources are located at /apis////name-of-instance/ + // +listType=map + // +listMapKey=subresource + Subresources []APISubresourceDiscovery `json:"subresources,omitempty" protobuf:"bytes,8,rep,name=subresources"` +} + +// ResourceScope is an enum defining the different scopes available to a resource. +type ResourceScope string + +const ( + ScopeCluster ResourceScope = "Cluster" + ScopeNamespace ResourceScope = "Namespaced" +) + +// DiscoveryFreshness is an enum defining whether the Discovery document published by an apiservice is up to date (fresh). +type DiscoveryFreshness string + +const ( + DiscoveryFreshnessCurrent DiscoveryFreshness = "Current" + DiscoveryFreshnessStale DiscoveryFreshness = "Stale" +) + +// APISubresourceDiscovery provides information about an API subresource for discovery. +type APISubresourceDiscovery struct { + // subresource is the name of the subresource. This is used in the URL path and is the unique identifier + // for this resource across all versions. + Subresource string `json:"subresource" protobuf:"bytes,1,opt,name=subresource"` + // responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. + // Some subresources do not return normal resources, these will have null or empty return types. + ResponseKind *v1.GroupVersionKind `json:"responseKind,omitempty" protobuf:"bytes,2,opt,name=responseKind"` + // acceptedTypes describes the kinds that this endpoint accepts. + // Subresources may accept the standard content types or define + // custom negotiation schemes. The list may not be exhaustive for + // all operations. + // +listType=map + // +listMapKey=group + // +listMapKey=version + // +listMapKey=kind + AcceptedTypes []v1.GroupVersionKind `json:"acceptedTypes,omitempty" protobuf:"bytes,3,rep,name=acceptedTypes"` + // verbs is a list of supported API operation types (this includes + // but is not limited to get, list, watch, create, update, patch, + // delete, deletecollection, and proxy). Subresources may define + // custom verbs outside the standard Kubernetes verb set. Clients + // should expect the behavior of standard verbs to align with + // Kubernetes interaction conventions. + // +listType=set + Verbs []string `json:"verbs" protobuf:"bytes,4,opt,name=verbs"` +} diff --git a/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/zz_generated.deepcopy.go b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/zz_generated.deepcopy.go new file mode 100644 index 00000000000..029aeeab8c8 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2/zz_generated.deepcopy.go @@ -0,0 +1,190 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIGroupDiscovery) DeepCopyInto(out *APIGroupDiscovery) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]APIVersionDiscovery, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupDiscovery. +func (in *APIGroupDiscovery) DeepCopy() *APIGroupDiscovery { + if in == nil { + return nil + } + out := new(APIGroupDiscovery) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *APIGroupDiscovery) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIGroupDiscoveryList) DeepCopyInto(out *APIGroupDiscoveryList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]APIGroupDiscovery, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupDiscoveryList. +func (in *APIGroupDiscoveryList) DeepCopy() *APIGroupDiscoveryList { + if in == nil { + return nil + } + out := new(APIGroupDiscoveryList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *APIGroupDiscoveryList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIResourceDiscovery) DeepCopyInto(out *APIResourceDiscovery) { + *out = *in + if in.ResponseKind != nil { + in, out := &in.ResponseKind, &out.ResponseKind + *out = new(v1.GroupVersionKind) + **out = **in + } + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ShortNames != nil { + in, out := &in.ShortNames, &out.ShortNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Categories != nil { + in, out := &in.Categories, &out.Categories + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Subresources != nil { + in, out := &in.Subresources, &out.Subresources + *out = make([]APISubresourceDiscovery, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResourceDiscovery. +func (in *APIResourceDiscovery) DeepCopy() *APIResourceDiscovery { + if in == nil { + return nil + } + out := new(APIResourceDiscovery) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APISubresourceDiscovery) DeepCopyInto(out *APISubresourceDiscovery) { + *out = *in + if in.ResponseKind != nil { + in, out := &in.ResponseKind, &out.ResponseKind + *out = new(v1.GroupVersionKind) + **out = **in + } + if in.AcceptedTypes != nil { + in, out := &in.AcceptedTypes, &out.AcceptedTypes + *out = make([]v1.GroupVersionKind, len(*in)) + copy(*out, *in) + } + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APISubresourceDiscovery. +func (in *APISubresourceDiscovery) DeepCopy() *APISubresourceDiscovery { + if in == nil { + return nil + } + out := new(APISubresourceDiscovery) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIVersionDiscovery) DeepCopyInto(out *APIVersionDiscovery) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]APIResourceDiscovery, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIVersionDiscovery. +func (in *APIVersionDiscovery) DeepCopy() *APIVersionDiscovery { + if in == nil { + return nil + } + out := new(APIVersionDiscovery) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2beta1/generated.pb.go index ba6eee1b327..398c5f94f2a 100644 --- a/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/apidiscovery/v2beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/apidiscovery/v2beta1/generated.proto +// source: k8s.io/api/apidiscovery/v2beta1/generated.proto package v2beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *APIGroupDiscovery) Reset() { *m = APIGroupDiscovery{} } func (*APIGroupDiscovery) ProtoMessage() {} func (*APIGroupDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_0442b7af4d680cb7, []int{0} + return fileDescriptor_48661e6ba3d554f3, []int{0} } func (m *APIGroupDiscovery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_APIGroupDiscovery proto.InternalMessageInfo func (m *APIGroupDiscoveryList) Reset() { *m = APIGroupDiscoveryList{} } func (*APIGroupDiscoveryList) ProtoMessage() {} func (*APIGroupDiscoveryList) Descriptor() ([]byte, []int) { - return fileDescriptor_0442b7af4d680cb7, []int{1} + return fileDescriptor_48661e6ba3d554f3, []int{1} } func (m *APIGroupDiscoveryList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_APIGroupDiscoveryList proto.InternalMessageInfo func (m *APIResourceDiscovery) Reset() { *m = APIResourceDiscovery{} } func (*APIResourceDiscovery) ProtoMessage() {} func (*APIResourceDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_0442b7af4d680cb7, []int{2} + return fileDescriptor_48661e6ba3d554f3, []int{2} } func (m *APIResourceDiscovery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_APIResourceDiscovery proto.InternalMessageInfo func (m *APISubresourceDiscovery) Reset() { *m = APISubresourceDiscovery{} } func (*APISubresourceDiscovery) ProtoMessage() {} func (*APISubresourceDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_0442b7af4d680cb7, []int{3} + return fileDescriptor_48661e6ba3d554f3, []int{3} } func (m *APISubresourceDiscovery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_APISubresourceDiscovery proto.InternalMessageInfo func (m *APIVersionDiscovery) Reset() { *m = APIVersionDiscovery{} } func (*APIVersionDiscovery) ProtoMessage() {} func (*APIVersionDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_0442b7af4d680cb7, []int{4} + return fileDescriptor_48661e6ba3d554f3, []int{4} } func (m *APIVersionDiscovery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -193,59 +193,58 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apidiscovery/v2beta1/generated.proto", fileDescriptor_0442b7af4d680cb7) + proto.RegisterFile("k8s.io/api/apidiscovery/v2beta1/generated.proto", fileDescriptor_48661e6ba3d554f3) } -var fileDescriptor_0442b7af4d680cb7 = []byte{ - // 754 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x4e, 0xdb, 0x4c, - 0x14, 0x8d, 0x09, 0xf9, 0x48, 0x26, 0xc9, 0xf7, 0x85, 0x01, 0xf4, 0x59, 0x2c, 0x6c, 0x94, 0x4d, - 0xa9, 0xd4, 0xda, 0x25, 0x02, 0xc4, 0x36, 0x29, 0xb4, 0x8d, 0xfa, 0x87, 0x26, 0x15, 0x95, 0xaa, - 0x2e, 0x6a, 0x3b, 0x17, 0xc7, 0x0d, 0xb1, 0xad, 0x99, 0x71, 0x24, 0x76, 0x7d, 0x84, 0xbe, 0x43, - 0x5f, 0x86, 0x55, 0xc5, 0xa2, 0x0b, 0xba, 0x89, 0x4a, 0xfa, 0x00, 0xdd, 0xb3, 0xaa, 0xec, 0x8c, - 0x7f, 0x42, 0x40, 0x44, 0x5d, 0x74, 0x81, 0x84, 0xcf, 0x3d, 0xe7, 0xdc, 0x7b, 0x2e, 0xd7, 0x06, - 0x3d,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 0x7e, 0x4b, 0x82, 0x4a, 0xe2, 0x3a, 0x3e, 0x46, 0xa5, 0xf4, - 0x14, 0x26, 0x1f, 0x87, 0x9d, 0x79, 0x4e, 0x61, 0xe6, 0x85, 0x6f, 0x2d, 0x8b, 0x1e, 0x25, 0x92, - 0x1c, 0x41, 0x6a, 0x8d, 0x0f, 0x50, 0xe9, 0x98, 0x02, 0xeb, 0xb9, 0xc0, 0x98, 0x78, 0xed, 0xee, - 0xc5, 0x82, 0x27, 0x71, 0xe1, 0x6a, 0xa4, 0xe2, 0xc4, 0x30, 0x41, 0x49, 0xaa, 0x6c, 0x1d, 0x9c, - 0x5d, 0x2a, 0xb9, 0xf3, 0x4b, 0x25, 0x77, 0x71, 0xa9, 0xe4, 0x3e, 0x8d, 0x15, 0xe9, 0x6c, 0xac, - 0x48, 0xe7, 0x63, 0x45, 0xba, 0x18, 0x2b, 0xd2, 0x8f, 0xb1, 0x22, 0x7d, 0xfe, 0xa9, 0xe4, 0xde, - 0xa9, 0x77, 0xfc, 0x87, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x66, 0x3b, 0x84, 0x9c, 0x07, - 0x00, 0x00, +var fileDescriptor_48661e6ba3d554f3 = []byte{ + // 740 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x4e, 0xdb, 0x4a, + 0x18, 0x8d, 0x09, 0xb9, 0x24, 0x93, 0xe4, 0xde, 0x30, 0x80, 0xae, 0xc5, 0xc2, 0x46, 0xd9, 0x5c, + 0xae, 0xd4, 0x8e, 0x4b, 0x04, 0x88, 0x6d, 0x52, 0x68, 0x15, 0xf5, 0x0f, 0x4d, 0x2a, 0x2a, 0x55, + 0x5d, 0xd4, 0x71, 0x06, 0xc7, 0x85, 0xd8, 0xd6, 0xcc, 0x24, 0x12, 0xbb, 0x3e, 0x42, 0xdf, 0xa1, + 0x2f, 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0xa5, 0xfe, 0x53, 0x03, 0x2b, 0xb7, 0xdc, 0x40, 0xf0, 0x7f, + 0xb0, 0xa4, 0x6e, 0x1c, 0x35, 0xce, 0x7f, 0x54, 0xbd, 0x25, 0x45, 0xc5, 0xf1, 0x39, 0x3c, 0x06, + 0xa5, 0x74, 0x15, 0xa2, 0xcb, 0x61, 0x67, 0x9e, 0x55, 0x98, 0x79, 0xe1, 0x5b, 0xcb, 0xaa, 0x46, + 0x09, 0x27, 0x4b, 0x90, 0x5a, 0xc3, 0x03, 0x50, 0x3a, 0xa6, 0x84, 0xf5, 0x7d, 0xc2, 0x98, 0x7a, + 0xed, 0xfe, 0x8b, 0x05, 0x4f, 0xe2, 0x83, 0xeb, 0xb1, 0x09, 0x13, 0xc3, 0x04, 0xc5, 0xa9, 0xb2, + 0x75, 0x70, 0x7e, 0x65, 0xe4, 0x2e, 0xae, 0x8c, 0xdc, 0xe5, 0x95, 0x91, 0xfb, 0x38, 0x31, 0xb4, + 0xf3, 0x89, 0xa1, 0x5d, 0x4c, 0x0c, 0xed, 0x72, 0x62, 0x68, 0xdf, 0x27, 0x86, 0xf6, 0xe9, 0x87, + 0x91, 0x7b, 0x6b, 0xde, 0xf3, 0x0f, 0xfb, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x85, 0x3b, 0x06, + 0x83, 0x07, 0x00, 0x00, } func (m *APIGroupDiscovery) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go index 6871da414c3..b0343ffcfb3 100644 --- a/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto +// source: k8s.io/api/apiserverinternal/v1alpha1/generated.proto package v1alpha1 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ServerStorageVersion) Reset() { *m = ServerStorageVersion{} } func (*ServerStorageVersion) ProtoMessage() {} func (*ServerStorageVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{0} + return fileDescriptor_126bcbf538b54729, []int{0} } func (m *ServerStorageVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ServerStorageVersion proto.InternalMessageInfo func (m *StorageVersion) Reset() { *m = StorageVersion{} } func (*StorageVersion) ProtoMessage() {} func (*StorageVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{1} + return fileDescriptor_126bcbf538b54729, []int{1} } func (m *StorageVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_StorageVersion proto.InternalMessageInfo func (m *StorageVersionCondition) Reset() { *m = StorageVersionCondition{} } func (*StorageVersionCondition) ProtoMessage() {} func (*StorageVersionCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{2} + return fileDescriptor_126bcbf538b54729, []int{2} } func (m *StorageVersionCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_StorageVersionCondition proto.InternalMessageInfo func (m *StorageVersionList) Reset() { *m = StorageVersionList{} } func (*StorageVersionList) ProtoMessage() {} func (*StorageVersionList) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{3} + return fileDescriptor_126bcbf538b54729, []int{3} } func (m *StorageVersionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_StorageVersionList proto.InternalMessageInfo func (m *StorageVersionSpec) Reset() { *m = StorageVersionSpec{} } func (*StorageVersionSpec) ProtoMessage() {} func (*StorageVersionSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{4} + return fileDescriptor_126bcbf538b54729, []int{4} } func (m *StorageVersionSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_StorageVersionSpec proto.InternalMessageInfo func (m *StorageVersionStatus) Reset() { *m = StorageVersionStatus{} } func (*StorageVersionStatus) ProtoMessage() {} func (*StorageVersionStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{5} + return fileDescriptor_126bcbf538b54729, []int{5} } func (m *StorageVersionStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -221,61 +221,60 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto", fileDescriptor_a3903ff5e3cc7a03) + proto.RegisterFile("k8s.io/api/apiserverinternal/v1alpha1/generated.proto", fileDescriptor_126bcbf538b54729) } -var fileDescriptor_a3903ff5e3cc7a03 = []byte{ - // 790 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x41, 0x4f, 0xdb, 0x48, - 0x14, 0x8e, 0x49, 0x08, 0x30, 0xd9, 0x4d, 0x96, 0x59, 0x10, 0xd9, 0xac, 0xe4, 0xb0, 0x91, 0x58, - 0xb1, 0xbb, 0x5a, 0x7b, 0x89, 0x96, 0xaa, 0xb4, 0x52, 0x2b, 0x0c, 0xa8, 0xa2, 0x85, 0x52, 0x4d, - 0x50, 0x0f, 0xb4, 0x87, 0x4e, 0xec, 0xa9, 0xe3, 0x26, 0xf6, 0x58, 0x9e, 0x49, 0x24, 0x2e, 0x55, - 0x7f, 0x42, 0xfb, 0x3f, 0x7a, 0xec, 0x8f, 0xe0, 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2, 0xe7, 0xbf, 0xc4, - 0x2d, 0xe7, 0x07, 0x91, 0x6b, 0x2e, 0x3f, 0x01, 0xb3, 0x0e, 0x27, 0xae, 0x38, 0xc5, 0xec, 0x7a, - 0xa1, 0xbe, 0x79, 0x2b, 0x1f, 0x1a, 0x3f, 0xc7, 0x1d, 0x66, 0xf7, 0x05, 0x17, 0x8a, 0x28, 0x6b, - 0x4b, 0xa3, 0xfb, 0x11, 0x17, 0xa0, 0xf6, 0x45, 0x3c, 0x70, 0x13, 0x6c, 0x0c, 0xdf, 0x82, 0x12, - 0x4b, 0xc5, 0x59, 0x59, 0x91, 0x43, 0x4d, 0x7d, 0x39, 0x26, 0x3c, 0x9b, 0xc3, 0x67, 0x2e, 0x1d, - 0x67, 0x68, 0xb4, 0x19, 0x3c, 0x02, 0xcb, 0x26, 0x75, 0x5d, 0xea, 0xed, 0x4d, 0x7c, 0x2f, 0x7f, - 0x0b, 0xfb, 0xd5, 0xe5, 0x9d, 0x49, 0x05, 0x68, 0x32, 0x0e, 0x06, 0x00, 0x98, 0x83, 0x2b, 0x10, - 0x3d, 0x98, 0x85, 0xfa, 0x83, 0x5b, 0x09, 0x9c, 0xdc, 0xa4, 0xe1, 0x9b, 0x95, 0x84, 0x18, 0xba, - 0xd6, 0xc5, 0x78, 0x72, 0x76, 0xa9, 0x66, 0xce, 0x2f, 0xd5, 0xcc, 0xc5, 0xa5, 0x9a, 0x79, 0x17, - 0xaa, 0xca, 0x59, 0xa8, 0x2a, 0xe7, 0xa1, 0xaa, 0x5c, 0x84, 0xaa, 0xf2, 0x35, 0x54, 0x95, 0xf7, - 0xdf, 0xd4, 0xcc, 0xc9, 0xda, 0x54, 0x1f, 0xe4, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x3a, - 0x2e, 0x07, 0xd1, 0x07, 0x00, 0x00, +var fileDescriptor_126bcbf538b54729 = []byte{ + // 770 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 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0x2d, 0x39, 0x99, 0xee, 0x10, 0x8e, 0xf5, 0xce, + 0xd0, 0x2c, 0x25, 0xfd, 0x32, 0x94, 0xdf, 0x76, 0xb9, 0xed, 0x90, 0x21, 0xc0, 0x93, 0xff, 0x01, + 0x98, 0xd9, 0x24, 0x0e, 0x1e, 0xc4, 0x55, 0xbe, 0x4f, 0x80, 0xb9, 0x9a, 0xdc, 0x69, 0x8d, 0x53, + 0x1f, 0x5b, 0xe4, 0x1d, 0xf1, 0x99, 0x4d, 0x5d, 0xb8, 0x0a, 0x72, 0xd8, 0xb3, 0xc3, 0xd4, 0xf6, + 0x66, 0x51, 0x59, 0x54, 0x96, 0x67, 0x8c, 0x9b, 0xc7, 0xdd, 0x72, 0x2a, 0xe8, 0x96, 0x73, 0xeb, + 0x6f, 0xb7, 0x7b, 0x29, 0x74, 0xb1, 0x0e, 0xae, 0x83, 0x02, 0x71, 0x4d, 0xda, 0xb0, 0x5d, 0x2b, + 0x62, 0x2a, 0x4e, 0x48, 0xe8, 0x42, 0x04, 0x2d, 0x6c, 0x25, 0xd3, 0x68, 0xb0, 0x1e, 0x6e, 0x80, + 0xd9, 0x06, 0x31, 0x69, 0x03, 0xd7, 0x5b, 0xbd, 0x69, 0x58, 0x31, 0xbd, 0x98, 0x5e, 0x9e, 0x31, + 0xe6, 0x83, 0x6e, 0x79, 0x76, 0x73, 0x30, 0x89, 0x86, 0xeb, 0xe1, 0x33, 0x90, 0x97, 0x07, 0xd8, + 0x88, 0x19, 0x32, 0x92, 0x01, 0x06, 0xdd, 0x72, 0xbe, 0x96, 0xc8, 0xa0, 0x81, 0xca, 0xca, 0xcf, + 0x09, 0x90, 0x1f, 0x50, 0xe3, 0x23, 0x98, 0x16, 0x47, 0xd5, 0xc0, 0x1c, 0x4b, 0x29, 0x72, 0xd5, + 0x47, 0x5a, 0xdf, 0x2e, 0xb1, 0xe2, 0x9a, 0x77, 0x68, 0x49, 0xef, 0x68, 0xa2, 0x5a, 0xeb, 0xac, + 0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0xa8, + 0xca, 0x49, 0xa0, 0x2a, 0xa7, 0x81, 0xaa, 0xfc, 0x09, 0x54, 0xe5, 0xdb, 0x5f, 0x35, 0x75, 0xb0, + 0x34, 0xd6, 0x07, 0xf9, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0x04, 0x7d, 0x78, 0xb8, 0x07, + 0x00, 0x00, } func (m *ServerStorageVersion) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto b/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto index 6e6bab52182..ef442904802 100644 --- a/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto @@ -77,7 +77,6 @@ message StorageVersionCondition { optional int64 observedGeneration = 3; // Last time the condition transitioned from one status to another. - // +required optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; // The reason for the condition's last transition. diff --git a/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/types.go b/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/types.go index 0ffcf95f066..31a419abf13 100644 --- a/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/apiserverinternal/v1alpha1/types.go @@ -111,7 +111,6 @@ type StorageVersionCondition struct { // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` // Last time the condition transitioned from one status to another. - // +required LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` // The reason for the condition's last transition. // +required diff --git a/pkg/k8s/vendor/k8s.io/api/apps/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/apps/v1/generated.pb.go index 84a7af5994f..ea62a099fed 100644 --- a/pkg/k8s/vendor/k8s.io/api/apps/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/apps/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/apps/v1/generated.proto +// source: k8s.io/api/apps/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } func (*ControllerRevision) ProtoMessage() {} func (*ControllerRevision) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{0} + return fileDescriptor_5b781835628d5338, []int{0} } func (m *ControllerRevision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_ControllerRevision proto.InternalMessageInfo func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } func (*ControllerRevisionList) ProtoMessage() {} func (*ControllerRevisionList) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{1} + return fileDescriptor_5b781835628d5338, []int{1} } func (m *ControllerRevisionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_ControllerRevisionList proto.InternalMessageInfo func (m *DaemonSet) Reset() { *m = DaemonSet{} } func (*DaemonSet) ProtoMessage() {} func (*DaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{2} + return fileDescriptor_5b781835628d5338, []int{2} } func (m *DaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_DaemonSet proto.InternalMessageInfo func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } func (*DaemonSetCondition) ProtoMessage() {} func (*DaemonSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{3} + return fileDescriptor_5b781835628d5338, []int{3} } func (m *DaemonSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_DaemonSetCondition proto.InternalMessageInfo func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } func (*DaemonSetList) ProtoMessage() {} func (*DaemonSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{4} + return fileDescriptor_5b781835628d5338, []int{4} } func (m *DaemonSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_DaemonSetList proto.InternalMessageInfo func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } func (*DaemonSetSpec) ProtoMessage() {} func (*DaemonSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{5} + return fileDescriptor_5b781835628d5338, []int{5} } func (m *DaemonSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_DaemonSetSpec proto.InternalMessageInfo func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} func (*DaemonSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{6} + return fileDescriptor_5b781835628d5338, []int{6} } func (m *DaemonSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_DaemonSetStatus proto.InternalMessageInfo func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } func (*DaemonSetUpdateStrategy) ProtoMessage() {} func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{7} + return fileDescriptor_5b781835628d5338, []int{7} } func (m *DaemonSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_DaemonSetUpdateStrategy proto.InternalMessageInfo func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{8} + return fileDescriptor_5b781835628d5338, []int{8} } func (m *Deployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_Deployment proto.InternalMessageInfo func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } func (*DeploymentCondition) ProtoMessage() {} func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{9} + return fileDescriptor_5b781835628d5338, []int{9} } func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo func (m *DeploymentList) Reset() { *m = DeploymentList{} } func (*DeploymentList) ProtoMessage() {} func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{10} + return fileDescriptor_5b781835628d5338, []int{10} } func (m *DeploymentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_DeploymentList proto.InternalMessageInfo func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } func (*DeploymentSpec) ProtoMessage() {} func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{11} + return fileDescriptor_5b781835628d5338, []int{11} } func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } func (*DeploymentStatus) ProtoMessage() {} func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{12} + return fileDescriptor_5b781835628d5338, []int{12} } func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } func (*DeploymentStrategy) ProtoMessage() {} func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{13} + return fileDescriptor_5b781835628d5338, []int{13} } func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } func (*ReplicaSet) ProtoMessage() {} func (*ReplicaSet) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{14} + return fileDescriptor_5b781835628d5338, []int{14} } func (m *ReplicaSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_ReplicaSet proto.InternalMessageInfo func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } func (*ReplicaSetCondition) ProtoMessage() {} func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{15} + return fileDescriptor_5b781835628d5338, []int{15} } func (m *ReplicaSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_ReplicaSetCondition proto.InternalMessageInfo func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } func (*ReplicaSetList) ProtoMessage() {} func (*ReplicaSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{16} + return fileDescriptor_5b781835628d5338, []int{16} } func (m *ReplicaSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_ReplicaSetList proto.InternalMessageInfo func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } func (*ReplicaSetSpec) ProtoMessage() {} func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{17} + return fileDescriptor_5b781835628d5338, []int{17} } func (m *ReplicaSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_ReplicaSetSpec proto.InternalMessageInfo func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } func (*ReplicaSetStatus) ProtoMessage() {} func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{18} + return fileDescriptor_5b781835628d5338, []int{18} } func (m *ReplicaSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +583,7 @@ var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } func (*RollingUpdateDaemonSet) ProtoMessage() {} func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{19} + return fileDescriptor_5b781835628d5338, []int{19} } func (m *RollingUpdateDaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +611,7 @@ var xxx_messageInfo_RollingUpdateDaemonSet proto.InternalMessageInfo func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{20} + return fileDescriptor_5b781835628d5338, []int{20} } func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +639,7 @@ var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{21} + return fileDescriptor_5b781835628d5338, []int{21} } func (m *RollingUpdateStatefulSetStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -667,7 +667,7 @@ var xxx_messageInfo_RollingUpdateStatefulSetStrategy proto.InternalMessageInfo func (m *StatefulSet) Reset() { *m = StatefulSet{} } func (*StatefulSet) ProtoMessage() {} func (*StatefulSet) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{22} + return fileDescriptor_5b781835628d5338, []int{22} } func (m *StatefulSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -695,7 +695,7 @@ var xxx_messageInfo_StatefulSet proto.InternalMessageInfo func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } func (*StatefulSetCondition) ProtoMessage() {} func (*StatefulSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{23} + return fileDescriptor_5b781835628d5338, []int{23} } func (m *StatefulSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -723,7 +723,7 @@ var xxx_messageInfo_StatefulSetCondition proto.InternalMessageInfo func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } func (*StatefulSetList) ProtoMessage() {} func (*StatefulSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{24} + return fileDescriptor_5b781835628d5338, []int{24} } func (m *StatefulSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -751,7 +751,7 @@ var xxx_messageInfo_StatefulSetList proto.InternalMessageInfo func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } func (*StatefulSetOrdinals) ProtoMessage() {} func (*StatefulSetOrdinals) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{25} + return fileDescriptor_5b781835628d5338, []int{25} } func (m *StatefulSetOrdinals) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -781,7 +781,7 @@ func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) Reset() { } func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} func (*StatefulSetPersistentVolumeClaimRetentionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{26} + return fileDescriptor_5b781835628d5338, []int{26} } func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -809,7 +809,7 @@ var xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy proto.Intern func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } func (*StatefulSetSpec) ProtoMessage() {} func (*StatefulSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{27} + return fileDescriptor_5b781835628d5338, []int{27} } func (m *StatefulSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -837,7 +837,7 @@ var xxx_messageInfo_StatefulSetSpec proto.InternalMessageInfo func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } func (*StatefulSetStatus) ProtoMessage() {} func (*StatefulSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{28} + return fileDescriptor_5b781835628d5338, []int{28} } func (m *StatefulSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -865,7 +865,7 @@ var xxx_messageInfo_StatefulSetStatus proto.InternalMessageInfo func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } func (*StatefulSetUpdateStrategy) ProtoMessage() {} func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{29} + return fileDescriptor_5b781835628d5338, []int{29} } func (m *StatefulSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -924,150 +924,149 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apps/v1/generated.proto", fileDescriptor_e1014cab6f31e43b) + proto.RegisterFile("k8s.io/api/apps/v1/generated.proto", fileDescriptor_5b781835628d5338) } -var fileDescriptor_e1014cab6f31e43b = []byte{ - // 2211 bytes of a gzipped FileDescriptorProto +var fileDescriptor_5b781835628d5338 = []byte{ + // 2194 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, 0x15, 0xd7, 0xf2, 0x43, 0xa2, 0x86, 0x96, 0x64, 0x8f, 0x54, 0x89, 0xb1, 0x1b, 0xd2, 0xdd, 0xb8, - 0xb6, 0x12, 0xc7, 0x64, 0xed, 0x38, 0x41, 0x60, 0x17, 0x09, 0x44, 0x2a, 0x4d, 0xd3, 0xe8, 0xab, - 0x43, 0xcb, 0x01, 0xdc, 0xb4, 0xe8, 0x88, 0x1c, 0x53, 0x1b, 0xed, 0x17, 0x76, 0x87, 0x8a, 0x89, - 0x5e, 0x8a, 0x02, 0xbd, 0xf5, 0xd0, 0xbf, 0xa1, 0xff, 0x40, 0x51, 0x14, 0xcd, 0x2d, 0x08, 0x82, - 0x5e, 0x7c, 0x29, 0x10, 0xf4, 0xd2, 0x9c, 0x88, 0x9a, 0x39, 0x15, 0x45, 0x6f, 0xed, 0xc5, 0x97, - 0x16, 0x33, 0x3b, 0xfb, 0x3d, 0x2b, 0x52, 0x72, 0xac, 0x34, 0x81, 0x6f, 0xdc, 0x99, 0xdf, 0xfb, - 0xed, 0x9b, 0x99, 0xf7, 0xe6, 0xfd, 0x66, 0x96, 0xe0, 0xf6, 0xc1, 0xeb, 0x6e, 0x5d, 0xb3, 0x1a, - 0x07, 0xfd, 0x3d, 0xe2, 0x98, 0x84, 0x12, 0xb7, 0x71, 0x48, 0xcc, 0xae, 0xe5, 0x34, 0x44, 0x07, - 0xb6, 0xb5, 0x06, 0xb6, 0x6d, 0xb7, 0x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 0x61, 0xeb, 0x98, 0x12, 0x91, 0x26, 0xb1, - 0xf8, 0x66, 0xe1, 0xc2, 0xc8, 0x76, 0xac, 0xee, 0x1d, 0x01, 0xe3, 0x89, 0x12, 0xcc, 0x83, 0xdf, - 0x8a, 0x02, 0x1a, 0x78, 0x00, 0xe6, 0xfb, 0x76, 0x97, 0x21, 0x29, 0xdb, 0xba, 0x7b, 0x03, 0x11, - 0x3e, 0x57, 0x8f, 0x9c, 0x90, 0xdd, 0x98, 0x49, 0x73, 0x59, 0xbc, 0x60, 0x3e, 0xde, 0x8e, 0x12, - 0xd4, 0x70, 0x0d, 0x2c, 0x18, 0x9a, 0x89, 0x08, 0xee, 0x0e, 0xda, 0xa4, 0x63, 0x99, 0x5d, 0x97, - 0x07, 0x50, 0xb1, 0xb9, 0x22, 0x08, 0x16, 0x36, 0xe3, 0xdd, 0x28, 0x89, 0x87, 0x1b, 0x60, 0xc9, - 0xdf, 0x67, 0x7f, 0xa8, 0xb9, 0xd4, 0x72, 0x06, 0x1b, 0x9a, 0xa1, 0xd1, 0xca, 0x34, 0xe7, 0xa9, - 0x8c, 0x86, 0xb5, 0x25, 0x24, 0xe9, 0x47, 0x52, 0x2b, 0xf5, 0x37, 0xd3, 0x60, 0x21, 0xb1, 0x1b, - 0xc0, 0xbb, 0x60, 0xb9, 0xd3, 0x77, 0x1c, 0x62, 0xd2, 0xad, 0xbe, 0xb1, 0x47, 0x9c, 0x76, 0x67, - 0x9f, 0x74, 0xfb, 0x3a, 0xe9, 0xf2, 0x15, 0x2d, 0x36, 0xab, 0xc2, 0xd7, 0xe5, 0x96, 0x14, 0x85, - 0x32, 0xac, 0xe1, 0x8f, 0x00, 0x34, 0x79, 0xd3, 0xa6, 0xe6, 0xba, 0x01, 0x67, 0x8e, 0x73, 0x06, - 0x09, 0xb8, 0x95, 0x42, 0x20, 0x89, 0x15, 0xf3, 0xb1, 0x4b, 0x5c, 0xcd, 0x21, 0xdd, 0xa4, 0x8f, - 0xf9, 0x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 0x76, - 0x62, 0xe1, 0x6d, 0xe3, 0xbe, 0x4b, 0xba, 0x3c, 0x95, 0x4a, 0x61, 0x78, 0xef, 0xf0, 0x56, 0x24, - 0x7a, 0xe1, 0x2e, 0x58, 0xb1, 0x1d, 0xab, 0xe7, 0x10, 0xd7, 0x5d, 0x27, 0xb8, 0xab, 0x6b, 0x26, - 0xf1, 0x07, 0xe0, 0x55, 0xbd, 0x0b, 0xa3, 0x61, 0x6d, 0x65, 0x47, 0x0e, 0x41, 0x59, 0xb6, 0xea, - 0xc7, 0x05, 0x70, 0x36, 0xb9, 0x23, 0x66, 0x08, 0x11, 0xe5, 0x44, 0x42, 0xe4, 0xe5, 0x48, 0x88, - 0x7a, 0x2a, 0x2d, 0x72, 0xe6, 0x4f, 0x85, 0xe9, 0x1a, 0x58, 0x10, 0xc2, 0xc3, 0xef, 0x14, 0x52, - 0x2c, 0x58, 0x9e, 0xdd, 0x78, 0x37, 0x4a, 0xe2, 0xe1, 0x6d, 0x30, 0xe7, 0x70, 0x6d, 0xe5, 0x13, - 0x78, 0xfa, 0xe4, 0x5b, 0x82, 0x60, 0x0e, 0x45, 0x3b, 0x51, 0x1c, 0xcb, 0xb4, 0x49, 0x28, 0x39, - 0x7c, 0x82, 0x42, 0x5c, 0x9b, 0xac, 0x25, 0x01, 0x28, 0x6d, 0x03, 0x37, 0xc1, 0x62, 0xdf, 0x4c, - 0x53, 0x79, 0xb1, 0x76, 0x41, 0x50, 0x2d, 0xee, 0xa6, 0x21, 0x48, 0x66, 0x07, 0x7f, 0x12, 0x93, - 0x2b, 0xd3, 0x7c, 0x17, 0xb9, 0x72, 0x74, 0x3a, 0x4c, 0xac, 0x57, 0x24, 0x3a, 0xaa, 0x34, 0xa9, - 0x8e, 0x52, 0x3f, 0x52, 0x00, 0x4c, 0xa7, 0xe0, 0xd8, 0xc3, 0x7d, 0xca, 0x22, 0x52, 0x22, 0xbb, - 0x72, 0x85, 0x73, 0x75, 0xbc, 0xc2, 0x09, 0x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 0xad, 0x13, 0xdc, 0x33, 0x74, 0x8b, 0x04, + 0x03, 0xf0, 0xab, 0xde, 0x85, 0xd1, 0xb0, 0xb1, 0xb2, 0x23, 0x87, 0xa0, 0x3c, 0x5b, 0xf5, 0xa3, + 0x12, 0x38, 0x9b, 0xde, 0x11, 0x73, 0x84, 0x88, 0x72, 0x22, 0x21, 0xf2, 0x62, 0x2c, 0x44, 0x7d, + 0x95, 0x16, 0x3b, 0xf3, 0x67, 0xc2, 0x74, 0x0d, 0x2c, 0x08, 0xe1, 0x11, 0x74, 0x0a, 0x29, 0x16, + 0x2e, 0xcf, 0x6e, 0xb2, 0x1b, 0xa5, 0xf1, 0xf0, 0x35, 0x30, 0xe7, 0x72, 0x6d, 0x15, 0x10, 0xf8, + 0xfa, 0xe4, 0x5b, 0x82, 0x60, 0x0e, 0xc5, 0x3b, 0x51, 0x12, 0xcb, 0xb4, 0x49, 0x24, 0x39, 0x02, + 0x82, 0x52, 0x52, 0x9b, 0xac, 0xa5, 0x01, 0x28, 0x6b, 0x03, 0x37, 0xc1, 0xe2, 0xc0, 0xca, 0x52, + 0xf9, 0xb1, 0x76, 0x41, 0x50, 0x2d, 0xee, 0x66, 0x21, 0x48, 0x66, 0x07, 0x7f, 0x92, 0x90, 0x2b, + 0xd3, 0x7c, 0x17, 0xb9, 0x72, 0x74, 0x3a, 0x4c, 0xac, 0x57, 0x24, 0x3a, 0xaa, 0x32, 0xa9, 0x8e, + 0x52, 0x3f, 0x54, 0x00, 0xcc, 0xa6, 0xe0, 0xd8, 0xc3, 0x7d, 0xc6, 0x22, 0x56, 0x22, 0x7b, 0x72, + 0x85, 0x73, 0x75, 0xbc, 0xc2, 0x89, 0x76, 0xd0, 0xc9, 0x24, 0x8e, 0x98, 0xde, 0xd3, 0xb9, 0x98, + 0x99, 0x40, 0xe2, 0x44, 0xfe, 0x3c, 0x99, 0xc4, 0x89, 0xf1, 0x1c, 0x2d, 0x71, 0xfe, 0x59, 0x00, + 0x8b, 0x11,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, 0x79, 0x7d, 0xea, 0x2e, + 0xcc, 0xfe, 0x2b, 0xf3, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xfa, 0xed, 0x70, 0xaa, 0x29, + 0x00, 0x00, } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/apps/v1/generated.proto b/pkg/k8s/vendor/k8s.io/api/apps/v1/generated.proto index a7a7e7c5471..90014168615 100644 --- a/pkg/k8s/vendor/k8s.io/api/apps/v1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/apps/v1/generated.proto @@ -200,6 +200,8 @@ message DaemonSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DaemonSetCondition conditions = 10; } @@ -341,6 +343,8 @@ message DeploymentStatus { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DeploymentCondition conditions = 6; // Count of hash collisions for the Deployment. The Deployment controller uses this @@ -475,6 +479,8 @@ message ReplicaSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated ReplicaSetCondition conditions = 6; } @@ -688,6 +694,7 @@ message StatefulSetSpec { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4; // serviceName is the name of the service that governs this StatefulSet. @@ -782,6 +789,8 @@ message StatefulSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated StatefulSetCondition conditions = 10; // Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. diff --git a/pkg/k8s/vendor/k8s.io/api/apps/v1/types.go b/pkg/k8s/vendor/k8s.io/api/apps/v1/types.go index 644d368fe4d..96ff6209869 100644 --- a/pkg/k8s/vendor/k8s.io/api/apps/v1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/apps/v1/types.go @@ -211,6 +211,7 @@ type StatefulSetSpec struct { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"` // serviceName is the name of the service that governs this StatefulSet. @@ -305,6 +306,8 @@ type StatefulSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` // Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. @@ -507,6 +510,8 @@ type DeploymentStatus struct { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type 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 @@ -714,6 +719,8 @@ type DaemonSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` } @@ -884,6 +891,8 @@ type ReplicaSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/generated.pb.go index 2f1e7c00a18..76e755b4a36 100644 --- a/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta1/generated.proto +// source: k8s.io/api/apps/v1beta1/generated.proto package v1beta1 @@ -52,7 +52,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } func (*ControllerRevision) ProtoMessage() {} func (*ControllerRevision) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{0} + return fileDescriptor_2747f709ac7c95e7, []int{0} } func (m *ControllerRevision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +80,7 @@ var xxx_messageInfo_ControllerRevision proto.InternalMessageInfo func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } func (*ControllerRevisionList) ProtoMessage() {} func (*ControllerRevisionList) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{1} + return fileDescriptor_2747f709ac7c95e7, []int{1} } func (m *ControllerRevisionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,7 +108,7 @@ var xxx_messageInfo_ControllerRevisionList proto.InternalMessageInfo func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{2} + return fileDescriptor_2747f709ac7c95e7, []int{2} } func (m *Deployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -136,7 +136,7 @@ var xxx_messageInfo_Deployment proto.InternalMessageInfo func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } func (*DeploymentCondition) ProtoMessage() {} func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{3} + return fileDescriptor_2747f709ac7c95e7, []int{3} } func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +164,7 @@ var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo func (m *DeploymentList) Reset() { *m = DeploymentList{} } func (*DeploymentList) ProtoMessage() {} func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{4} + return fileDescriptor_2747f709ac7c95e7, []int{4} } func (m *DeploymentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +192,7 @@ var xxx_messageInfo_DeploymentList proto.InternalMessageInfo func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} } func (*DeploymentRollback) ProtoMessage() {} func (*DeploymentRollback) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{5} + return fileDescriptor_2747f709ac7c95e7, []int{5} } func (m *DeploymentRollback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +220,7 @@ var xxx_messageInfo_DeploymentRollback proto.InternalMessageInfo func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } func (*DeploymentSpec) ProtoMessage() {} func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{6} + return fileDescriptor_2747f709ac7c95e7, []int{6} } func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +248,7 @@ var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } func (*DeploymentStatus) ProtoMessage() {} func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{7} + return fileDescriptor_2747f709ac7c95e7, []int{7} } func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +276,7 @@ var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } func (*DeploymentStrategy) ProtoMessage() {} func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{8} + return fileDescriptor_2747f709ac7c95e7, []int{8} } func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -304,7 +304,7 @@ var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } func (*RollbackConfig) ProtoMessage() {} func (*RollbackConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{9} + return fileDescriptor_2747f709ac7c95e7, []int{9} } func (m *RollbackConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +332,7 @@ var xxx_messageInfo_RollbackConfig proto.InternalMessageInfo func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{10} + return fileDescriptor_2747f709ac7c95e7, []int{10} } func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +360,7 @@ var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{11} + return fileDescriptor_2747f709ac7c95e7, []int{11} } func (m *RollingUpdateStatefulSetStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,7 +388,7 @@ var xxx_messageInfo_RollingUpdateStatefulSetStrategy proto.InternalMessageInfo func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{12} + return fileDescriptor_2747f709ac7c95e7, []int{12} } func (m *Scale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +416,7 @@ var xxx_messageInfo_Scale proto.InternalMessageInfo func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{13} + return fileDescriptor_2747f709ac7c95e7, []int{13} } func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,7 +444,7 @@ var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{14} + return fileDescriptor_2747f709ac7c95e7, []int{14} } func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,7 +472,7 @@ var xxx_messageInfo_ScaleStatus proto.InternalMessageInfo func (m *StatefulSet) Reset() { *m = StatefulSet{} } func (*StatefulSet) ProtoMessage() {} func (*StatefulSet) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{15} + return fileDescriptor_2747f709ac7c95e7, []int{15} } func (m *StatefulSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +500,7 @@ var xxx_messageInfo_StatefulSet proto.InternalMessageInfo func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } func (*StatefulSetCondition) ProtoMessage() {} func (*StatefulSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{16} + return fileDescriptor_2747f709ac7c95e7, []int{16} } func (m *StatefulSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +528,7 @@ var xxx_messageInfo_StatefulSetCondition proto.InternalMessageInfo func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } func (*StatefulSetList) ProtoMessage() {} func (*StatefulSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{17} + return fileDescriptor_2747f709ac7c95e7, []int{17} } func (m *StatefulSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +556,7 @@ var xxx_messageInfo_StatefulSetList proto.InternalMessageInfo func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } func (*StatefulSetOrdinals) ProtoMessage() {} func (*StatefulSetOrdinals) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{18} + return fileDescriptor_2747f709ac7c95e7, []int{18} } func (m *StatefulSetOrdinals) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -586,7 +586,7 @@ func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) Reset() { } func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} func (*StatefulSetPersistentVolumeClaimRetentionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{19} + return fileDescriptor_2747f709ac7c95e7, []int{19} } func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -614,7 +614,7 @@ var xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy proto.Intern func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } func (*StatefulSetSpec) ProtoMessage() {} func (*StatefulSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{20} + return fileDescriptor_2747f709ac7c95e7, []int{20} } func (m *StatefulSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -642,7 +642,7 @@ var xxx_messageInfo_StatefulSetSpec proto.InternalMessageInfo func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } func (*StatefulSetStatus) ProtoMessage() {} func (*StatefulSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{21} + return fileDescriptor_2747f709ac7c95e7, []int{21} } func (m *StatefulSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -670,7 +670,7 @@ var xxx_messageInfo_StatefulSetStatus proto.InternalMessageInfo func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } func (*StatefulSetUpdateStrategy) ProtoMessage() {} func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{22} + return fileDescriptor_2747f709ac7c95e7, []int{22} } func (m *StatefulSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,138 +724,137 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta1/generated.proto", fileDescriptor_2a07313e8f66e805) + proto.RegisterFile("k8s.io/api/apps/v1beta1/generated.proto", fileDescriptor_2747f709ac7c95e7) } -var fileDescriptor_2a07313e8f66e805 = []byte{ - // 2034 bytes of a gzipped FileDescriptorProto +var fileDescriptor_2747f709ac7c95e7 = []byte{ + // 2018 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x52, 0xa2, 0x44, 0x3d, 0x45, 0x54, 0x3c, 0x52, 0x2d, 0x46, 0x69, 0x25, 0x61, 0x63, - 0x24, 0x4a, 0x62, 0x2f, 0x63, 0x25, 0x0d, 0x12, 0xbb, 0x75, 0x2b, 0x4a, 0x6e, 0xec, 0x40, 0x8a, + 0x15, 0xf7, 0x52, 0xa2, 0x44, 0x3d, 0x45, 0x94, 0x3d, 0x52, 0x2d, 0x46, 0x69, 0x25, 0x61, 0x63, + 0xc4, 0x4a, 0x62, 0x2f, 0x63, 0x25, 0x0d, 0x12, 0xbb, 0x75, 0x21, 0x4a, 0x6e, 0xec, 0x40, 0x8a, 0x94, 0x91, 0x64, 0xa3, 0xe9, 0x07, 0x32, 0x22, 0xc7, 0xd4, 0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0xa5, 0xfc, 0x4e, 0xa1, 0x60, 0xac, 0xaf, 0x74, 0xf3, 0x5f, 0x1a, 0xde, 0x2f, 0xf7, 0xd2, + 0x90, 0x33, 0x05, 0x9f, 0xff, 0xe4, 0xd0, 0xfa, 0xfe, 0xd3, 0x67, 0x2b, 0x97, 0xbe, 0x7c, 0xb6, + 0x72, 0xe9, 0xab, 0x67, 0x2b, 0x97, 0x7e, 0x31, 0x5a, 0x51, 0x9e, 0x8e, 0x56, 0x94, 0x2f, 0x47, + 0x2b, 0xca, 0x57, 0xa3, 0x15, 0xe5, 0xef, 0xa3, 0x15, 0xe5, 0x57, 0x5f, 0xaf, 0x5c, 0xfa, 0x64, + 0xa9, 0xe0, 0xdf, 0xe8, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xc9, 0xe6, 0x8c, 0xa7, 0x1e, 0x00, 0x00, } diff --git a/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/generated.proto b/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/generated.proto index 245ec30f421..8965622257d 100644 --- a/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/generated.proto @@ -208,6 +208,8 @@ message DeploymentStatus { // Conditions represent the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DeploymentCondition conditions = 6; // collisionCount is the count of hash collisions for the Deployment. The Deployment controller uses this @@ -445,6 +447,7 @@ message StatefulSetSpec { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4; // serviceName is the name of the service that governs this StatefulSet. @@ -536,6 +539,8 @@ message StatefulSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated StatefulSetCondition conditions = 10; // availableReplicas is the total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. diff --git a/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/types.go b/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/types.go index 59ed9c2ac3b..bdf9f93a9b7 100644 --- a/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/apps/v1beta1/types.go @@ -251,6 +251,7 @@ type StatefulSetSpec struct { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"` // serviceName is the name of the service that governs this StatefulSet. @@ -342,6 +343,8 @@ type StatefulSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` // availableReplicas is the total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. @@ -577,6 +580,8 @@ type DeploymentStatus struct { // Conditions represent the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` // collisionCount is the count of hash collisions for the Deployment. The Deployment controller uses this diff --git a/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/generated.pb.go index 6dfb4d5d2a8..1c3d3be5bc6 100644 --- a/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta2/generated.proto +// source: k8s.io/api/apps/v1beta2/generated.proto package v1beta2 @@ -52,7 +52,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } func (*ControllerRevision) ProtoMessage() {} func (*ControllerRevision) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{0} + return fileDescriptor_c423c016abf485d4, []int{0} } func (m *ControllerRevision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +80,7 @@ var xxx_messageInfo_ControllerRevision proto.InternalMessageInfo func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } func (*ControllerRevisionList) ProtoMessage() {} func (*ControllerRevisionList) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{1} + return fileDescriptor_c423c016abf485d4, []int{1} } func (m *ControllerRevisionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,7 +108,7 @@ var xxx_messageInfo_ControllerRevisionList proto.InternalMessageInfo func (m *DaemonSet) Reset() { *m = DaemonSet{} } func (*DaemonSet) ProtoMessage() {} func (*DaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{2} + return fileDescriptor_c423c016abf485d4, []int{2} } func (m *DaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -136,7 +136,7 @@ var xxx_messageInfo_DaemonSet proto.InternalMessageInfo func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } func (*DaemonSetCondition) ProtoMessage() {} func (*DaemonSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{3} + return fileDescriptor_c423c016abf485d4, []int{3} } func (m *DaemonSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +164,7 @@ var xxx_messageInfo_DaemonSetCondition proto.InternalMessageInfo func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } func (*DaemonSetList) ProtoMessage() {} func (*DaemonSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{4} + return fileDescriptor_c423c016abf485d4, []int{4} } func (m *DaemonSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +192,7 @@ var xxx_messageInfo_DaemonSetList proto.InternalMessageInfo func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } func (*DaemonSetSpec) ProtoMessage() {} func (*DaemonSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{5} + return fileDescriptor_c423c016abf485d4, []int{5} } func (m *DaemonSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +220,7 @@ var xxx_messageInfo_DaemonSetSpec proto.InternalMessageInfo func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} func (*DaemonSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{6} + return fileDescriptor_c423c016abf485d4, []int{6} } func (m *DaemonSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +248,7 @@ var xxx_messageInfo_DaemonSetStatus proto.InternalMessageInfo func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } func (*DaemonSetUpdateStrategy) ProtoMessage() {} func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{7} + return fileDescriptor_c423c016abf485d4, []int{7} } func (m *DaemonSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +276,7 @@ var xxx_messageInfo_DaemonSetUpdateStrategy proto.InternalMessageInfo func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{8} + return fileDescriptor_c423c016abf485d4, []int{8} } func (m *Deployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -304,7 +304,7 @@ var xxx_messageInfo_Deployment proto.InternalMessageInfo func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } func (*DeploymentCondition) ProtoMessage() {} func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{9} + return fileDescriptor_c423c016abf485d4, []int{9} } func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +332,7 @@ var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo func (m *DeploymentList) Reset() { *m = DeploymentList{} } func (*DeploymentList) ProtoMessage() {} func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{10} + return fileDescriptor_c423c016abf485d4, []int{10} } func (m *DeploymentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +360,7 @@ var xxx_messageInfo_DeploymentList proto.InternalMessageInfo func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } func (*DeploymentSpec) ProtoMessage() {} func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{11} + return fileDescriptor_c423c016abf485d4, []int{11} } func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,7 +388,7 @@ var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } func (*DeploymentStatus) ProtoMessage() {} func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{12} + return fileDescriptor_c423c016abf485d4, []int{12} } func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +416,7 @@ var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } func (*DeploymentStrategy) ProtoMessage() {} func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{13} + return fileDescriptor_c423c016abf485d4, []int{13} } func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,7 +444,7 @@ var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } func (*ReplicaSet) ProtoMessage() {} func (*ReplicaSet) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{14} + return fileDescriptor_c423c016abf485d4, []int{14} } func (m *ReplicaSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,7 +472,7 @@ var xxx_messageInfo_ReplicaSet proto.InternalMessageInfo func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } func (*ReplicaSetCondition) ProtoMessage() {} func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{15} + return fileDescriptor_c423c016abf485d4, []int{15} } func (m *ReplicaSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +500,7 @@ var xxx_messageInfo_ReplicaSetCondition proto.InternalMessageInfo func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } func (*ReplicaSetList) ProtoMessage() {} func (*ReplicaSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{16} + return fileDescriptor_c423c016abf485d4, []int{16} } func (m *ReplicaSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +528,7 @@ var xxx_messageInfo_ReplicaSetList proto.InternalMessageInfo func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } func (*ReplicaSetSpec) ProtoMessage() {} func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{17} + return fileDescriptor_c423c016abf485d4, []int{17} } func (m *ReplicaSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +556,7 @@ var xxx_messageInfo_ReplicaSetSpec proto.InternalMessageInfo func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } func (*ReplicaSetStatus) ProtoMessage() {} func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{18} + return fileDescriptor_c423c016abf485d4, []int{18} } func (m *ReplicaSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -584,7 +584,7 @@ var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } func (*RollingUpdateDaemonSet) ProtoMessage() {} func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{19} + return fileDescriptor_c423c016abf485d4, []int{19} } func (m *RollingUpdateDaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -612,7 +612,7 @@ var xxx_messageInfo_RollingUpdateDaemonSet proto.InternalMessageInfo func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{20} + return fileDescriptor_c423c016abf485d4, []int{20} } func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -640,7 +640,7 @@ var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{21} + return fileDescriptor_c423c016abf485d4, []int{21} } func (m *RollingUpdateStatefulSetStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +668,7 @@ var xxx_messageInfo_RollingUpdateStatefulSetStrategy proto.InternalMessageInfo func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{22} + return fileDescriptor_c423c016abf485d4, []int{22} } func (m *Scale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +696,7 @@ var xxx_messageInfo_Scale proto.InternalMessageInfo func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{23} + return fileDescriptor_c423c016abf485d4, []int{23} } func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,7 +724,7 @@ var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{24} + return fileDescriptor_c423c016abf485d4, []int{24} } func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -752,7 +752,7 @@ var xxx_messageInfo_ScaleStatus proto.InternalMessageInfo func (m *StatefulSet) Reset() { *m = StatefulSet{} } func (*StatefulSet) ProtoMessage() {} func (*StatefulSet) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{25} + return fileDescriptor_c423c016abf485d4, []int{25} } func (m *StatefulSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -780,7 +780,7 @@ var xxx_messageInfo_StatefulSet proto.InternalMessageInfo func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } func (*StatefulSetCondition) ProtoMessage() {} func (*StatefulSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{26} + return fileDescriptor_c423c016abf485d4, []int{26} } func (m *StatefulSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -808,7 +808,7 @@ var xxx_messageInfo_StatefulSetCondition proto.InternalMessageInfo func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } func (*StatefulSetList) ProtoMessage() {} func (*StatefulSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{27} + return fileDescriptor_c423c016abf485d4, []int{27} } func (m *StatefulSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -836,7 +836,7 @@ var xxx_messageInfo_StatefulSetList proto.InternalMessageInfo func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } func (*StatefulSetOrdinals) ProtoMessage() {} func (*StatefulSetOrdinals) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{28} + return fileDescriptor_c423c016abf485d4, []int{28} } func (m *StatefulSetOrdinals) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -866,7 +866,7 @@ func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) Reset() { } func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} func (*StatefulSetPersistentVolumeClaimRetentionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{29} + return fileDescriptor_c423c016abf485d4, []int{29} } func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -894,7 +894,7 @@ var xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy proto.Intern func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } func (*StatefulSetSpec) ProtoMessage() {} func (*StatefulSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{30} + return fileDescriptor_c423c016abf485d4, []int{30} } func (m *StatefulSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -922,7 +922,7 @@ var xxx_messageInfo_StatefulSetSpec proto.InternalMessageInfo func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } func (*StatefulSetStatus) ProtoMessage() {} func (*StatefulSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{31} + return fileDescriptor_c423c016abf485d4, []int{31} } func (m *StatefulSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -950,7 +950,7 @@ var xxx_messageInfo_StatefulSetStatus proto.InternalMessageInfo func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } func (*StatefulSetUpdateStrategy) ProtoMessage() {} func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{32} + return fileDescriptor_c423c016abf485d4, []int{32} } func (m *StatefulSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1013,158 +1013,157 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta2/generated.proto", fileDescriptor_42fe616264472f7e) + proto.RegisterFile("k8s.io/api/apps/v1beta2/generated.proto", fileDescriptor_c423c016abf485d4) } -var fileDescriptor_42fe616264472f7e = []byte{ - // 2345 bytes of a gzipped FileDescriptorProto +var fileDescriptor_c423c016abf485d4 = []byte{ + // 2328 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xf7, 0xf2, 0x43, 0x26, 0x87, 0x96, 0x64, 0x8f, 0x54, 0x89, 0x91, 0x5b, 0xd2, 0x58, 0x1b, - 0x8e, 0x12, 0xdb, 0xa4, 0xad, 0x7c, 0x20, 0xb1, 0xdb, 0xa4, 0xa2, 0x94, 0xda, 0x0e, 0xf4, 0xc1, - 0x0c, 0x2d, 0x07, 0x0d, 0xfa, 0xe1, 0x11, 0x39, 0xa6, 0x36, 0x5a, 0xee, 0x2e, 0x76, 0x87, 0x8c, - 0x89, 0x5e, 0x7a, 0x2d, 0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96, 0x53, 0x12, 0x1d, 0xbe, 0x15, 0x2a, 0x82, 0x97, 0x22, 0x45, 0xf0, + 0x4c, 0x8a, 0x59, 0xa0, 0x12, 0xee, 0x83, 0x59, 0x46, 0x48, 0x14, 0xbd, 0xef, 0xa8, 0x88, 0xbd, + 0xac, 0x99, 0x3a, 0x00, 0x14, 0xd4, 0xf6, 0x77, 0xe5, 0x53, 0xe3, 0x51, 0x7d, 0x36, 0x24, 0x43, + 0x61, 0x60, 0xf9, 0x57, 0x39, 0x00, 0x36, 0x88, 0xa9, 0x1a, 0x43, 0x8d, 0xe8, 0x47, 0xc1, 0x69, + 0x6e, 0x87, 0x38, 0xcd, 0xc5, 0xf4, 0x25, 0xf1, 0x9c, 0x4a, 0x25, 0x35, 0xef, 0x46, 0x48, 0xcd, + 0x8b, 0x59, 0xc0, 0x9e, 0xce, 0x6a, 0x3e, 0xcb, 0x83, 0x05, 0x5f, 0xd9, 0xa7, 0x35, 0x37, 0x42, + 0x2b, 0x7a, 0x31, 0xb2, 0xa2, 0xcb, 0x09, 0x26, 0xcf, 0x8d, 0xd7, 0x7c, 0x00, 0xe6, 0x18, 0xeb, + 0x70, 0xd6, 0x8f, 0x73, 0x9a, 0x99, 0xa9, 0x39, 0x8d, 0x57, 0x89, 0x36, 0x43, 0x48, 0x28, 0x82, + 0x9c, 0xc2, 0xa1, 0x8e, 0x7f, 0x1d, 0x39, 0xd4, 0x9f, 0x24, 0x30, 0xe7, 0x2f, 0xd3, 0x11, 0x90, + 0xa8, 0x5b, 0x61, 0x12, 0x75, 0x2e, 0x43, 0x70, 0xa6, 0xb0, 0xa8, 0xcf, 0x0a, 0x41, 0xd7, 0x39, + 0x8d, 0x5a, 0x61, 0x47, 0x30, 0x53, 0x55, 0xba, 0xd8, 0x16, 0xf5, 0xf6, 0x84, 0x73, 0xfc, 0x72, + 0xda, 0x90, 0x27, 0x0d, 0x11, 0xae, 0xdc, 0xf3, 0x25, 0x5c, 0xf9, 0x67, 0x43, 0xb8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4d, 0xfa, + 0xcd, 0x17, 0xb5, 0x63, 0xef, 0x2f, 0xa7, 0xfc, 0xe9, 0xf8, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xa4, 0x79, 0xcd, 0x52, 0x8e, 0x2c, 0x00, 0x00, } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/generated.proto b/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/generated.proto index ddbe3544114..3ae8a80094a 100644 --- a/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/generated.proto @@ -204,6 +204,8 @@ message DaemonSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DaemonSetCondition conditions = 10; } @@ -346,6 +348,8 @@ message DeploymentStatus { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DeploymentCondition conditions = 6; // Count of hash collisions for the Deployment. The Deployment controller uses this @@ -481,6 +485,8 @@ message ReplicaSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated ReplicaSetCondition conditions = 6; } @@ -733,6 +739,7 @@ message StatefulSetSpec { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4; // serviceName is the name of the service that governs this StatefulSet. @@ -824,6 +831,8 @@ message StatefulSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated StatefulSetCondition conditions = 10; // Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. diff --git a/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/types.go b/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/types.go index a97ac6fcf0b..6981c2a1758 100644 --- a/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/types.go +++ b/pkg/k8s/vendor/k8s.io/api/apps/v1beta2/types.go @@ -261,6 +261,7 @@ type StatefulSetSpec struct { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"` // serviceName is the name of the service that governs this StatefulSet. @@ -352,6 +353,8 @@ type StatefulSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` // Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. @@ -555,6 +558,8 @@ type DeploymentStatus struct { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type 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 @@ -765,6 +770,8 @@ type DaemonSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` } @@ -951,6 +958,8 @@ type ReplicaSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/pkg/k8s/vendor/k8s.io/api/authentication/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/authentication/v1/generated.pb.go index 304bbd0744d..6d922030c1c 100644 --- a/pkg/k8s/vendor/k8s.io/api/authentication/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/authentication/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1/generated.proto +// source: k8s.io/api/authentication/v1/generated.proto package v1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *BoundObjectReference) Reset() { *m = BoundObjectReference{} } func (*BoundObjectReference) ProtoMessage() {} func (*BoundObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{0} + return fileDescriptor_d1237cbf54dccd53, []int{0} } func (m *BoundObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_BoundObjectReference proto.InternalMessageInfo func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{1} + return fileDescriptor_d1237cbf54dccd53, []int{1} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_ExtraValue proto.InternalMessageInfo func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } func (*SelfSubjectReview) ProtoMessage() {} func (*SelfSubjectReview) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{2} + return fileDescriptor_d1237cbf54dccd53, []int{2} } func (m *SelfSubjectReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_SelfSubjectReview proto.InternalMessageInfo func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } func (*SelfSubjectReviewStatus) ProtoMessage() {} func (*SelfSubjectReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{3} + return fileDescriptor_d1237cbf54dccd53, []int{3} } func (m *SelfSubjectReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_SelfSubjectReviewStatus proto.InternalMessageInfo func (m *TokenRequest) Reset() { *m = TokenRequest{} } func (*TokenRequest) ProtoMessage() {} func (*TokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{4} + return fileDescriptor_d1237cbf54dccd53, []int{4} } func (m *TokenRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_TokenRequest proto.InternalMessageInfo func (m *TokenRequestSpec) Reset() { *m = TokenRequestSpec{} } func (*TokenRequestSpec) ProtoMessage() {} func (*TokenRequestSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{5} + return fileDescriptor_d1237cbf54dccd53, []int{5} } func (m *TokenRequestSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +217,7 @@ var xxx_messageInfo_TokenRequestSpec proto.InternalMessageInfo func (m *TokenRequestStatus) Reset() { *m = TokenRequestStatus{} } func (*TokenRequestStatus) ProtoMessage() {} func (*TokenRequestStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{6} + return fileDescriptor_d1237cbf54dccd53, []int{6} } func (m *TokenRequestStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -245,7 +245,7 @@ var xxx_messageInfo_TokenRequestStatus proto.InternalMessageInfo func (m *TokenReview) Reset() { *m = TokenReview{} } func (*TokenReview) ProtoMessage() {} func (*TokenReview) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{7} + return fileDescriptor_d1237cbf54dccd53, []int{7} } func (m *TokenReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -273,7 +273,7 @@ var xxx_messageInfo_TokenReview proto.InternalMessageInfo func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} } func (*TokenReviewSpec) ProtoMessage() {} func (*TokenReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{8} + return fileDescriptor_d1237cbf54dccd53, []int{8} } func (m *TokenReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -301,7 +301,7 @@ var xxx_messageInfo_TokenReviewSpec proto.InternalMessageInfo func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} } func (*TokenReviewStatus) ProtoMessage() {} func (*TokenReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{9} + return fileDescriptor_d1237cbf54dccd53, []int{9} } func (m *TokenReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -329,7 +329,7 @@ var xxx_messageInfo_TokenReviewStatus proto.InternalMessageInfo func (m *UserInfo) Reset() { *m = UserInfo{} } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{10} + return fileDescriptor_d1237cbf54dccd53, []int{10} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -370,71 +370,71 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1/generated.proto", fileDescriptor_2953ea822e7ffe1e) -} - -var fileDescriptor_2953ea822e7ffe1e = []byte{ - // 958 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4b, 0x6f, 0x23, 0x45, - 0x10, 0xf6, 0xf8, 0x11, 0xd9, 0xe5, 0x4d, 0x48, 0x7a, 0x59, 0x61, 0x85, 0xc5, 0x0e, 0xb3, 0x12, - 0x8a, 0x80, 0x9d, 0xd9, 0x58, 0x3c, 0x56, 0x8b, 0x84, 0x94, 0x21, 0x16, 0x58, 0x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00, 0x00, + proto.RegisterFile("k8s.io/api/authentication/v1/generated.proto", fileDescriptor_d1237cbf54dccd53) +} + +var fileDescriptor_d1237cbf54dccd53 = []byte{ + // 947 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4b, 0x6f, 0x23, 0xc5, + 0x13, 0xf7, 0xf8, 0x11, 0xd9, 0xe5, 0x4d, 0xfe, 0x49, 0xef, 0x7f, 0x85, 0x15, 0x16, 0x4f, 0x98, + 0x95, 0x50, 0x04, 0xbb, 0x33, 0x1b, 0x8b, 0xc7, 0x6a, 0x91, 0x90, 0x32, 0xc4, 0x02, 0x0b, 0xc1, + 0xae, 0xda, 0x49, 0x40, 0x48, 0x48, 0xb4, 0xc7, 0x1d, 0xa7, 0xf1, 0xce, 0x83, 0x99, 0x1e, 0xb3, + 0xbe, 0xed, 0x47, 0xe0, 0x08, 0x12, 0x07, 0x3e, 0x04, 0x12, 0x5f, 0x21, 0xc7, 0x15, 0xe2, 0xb0, + 0x07, 0x64, 0x91, 0xe1, 0xca, 0x91, 0x13, 0x27, 0xd4, 0x3d, 0x1d, 0xdb, 0x63, 0x27, 0x13, 0x9f, + 0xf6, 0xe6, 0xa9, 0xc7, 0xaf, 0xaa, 0x7e, 0x55, 0x5d, 0x65, 0xb8, 0x3b, 0x7c, 0x10, 0x99, 0xcc, + 0xb7, 0x48, 0xc0, 0x2c, 0x12, 0xf3, 0x53, 0xea, 0x71, 0xe6, 0x10, 0xce, 0x7c, 0xcf, 0x1a, 0xed, + 0x59, 0x03, 0xea, 0xd1, 0x90, 0x70, 0xda, 0x37, 0x83, 0xd0, 0xe7, 0x3e, 0xba, 0x9d, 0x5a, 0x9b, + 0x24, 0x60, 0x66, 0xd6, 0xda, 0x1c, 0xed, 0x6d, 0xdf, 0x1b, 0x30, 0x7e, 0x1a, 0xf7, 0x4c, 0xc7, + 0x77, 0xad, 0x81, 0x3f,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 0xa1, 0xc2, 0x38, 0x75, 0xa3, 0x86, + 0xb6, 0x53, 0xda, 0xad, 0xd9, 0xb5, 0x64, 0xa2, 0x57, 0x3a, 0x42, 0x80, 0x53, 0xf9, 0xc3, 0xea, + 0x0f, 0x3f, 0xeb, 0x85, 0x67, 0x7f, 0xec, 0x14, 0x8c, 0xdf, 0x35, 0xd8, 0xea, 0xd2, 0x27, 0x27, + 0xdd, 0x58, 0xb1, 0x31, 0x62, 0xf4, 0x3b, 0xf4, 0x35, 0x54, 0x45, 0x9f, 0xfa, 0x84, 0x13, 0x49, + 0x47, 0xbd, 0x75, 0xdf, 0x9c, 0x8d, 0xc8, 0x34, 0x13, 0x33, 0x18, 0x0e, 0x84, 0x20, 0x32, 0x85, + 0xb5, 0x39, 0xda, 0x33, 0x53, 0x4e, 0x3f, 0xa5, 0x9c, 0xcc, 0x88, 0x99, 0xc9, 0xf0, 0x14, 0x15, + 0x7d, 0x05, 0x6b, 0x11, 0x27, 0x3c, 0x8e, 0x24, 0x8d, 0xf5, 0xd6, 0x3b, 0x66, 0xde, 0x08, 0x9a, + 0x4b, 0x29, 0x76, 0xa5, 0xb3, 0xbd, 0xa1, 0x82, 0xac, 0xa5, 0xdf, 0x58, 0x81, 0x1a, 0x3e, 0xbc, + 0x72, 0x85, 0x0b, 0x3a, 0x84, 0x6a, 0x1c, 0xd1, 0xb0, 0xe3, 0x9d, 0xf8, 0xaa, 0xb6, 0x37, 0xf2, + 0x63, 0x1f, 0x29, 0x6b, 0x7b, 0x53, 0x05, 0xab, 0x5e, 0x48, 0xf0, 0x14, 0xc9, 0xf8, 0xa9, 0x08, + 0x37, 0x0e, 0xfd, 0x21, 0xf5, 0x30, 0xfd, 0x36, 0xa6, 0x11, 0x7f, 0x09, 0x14, 0x3e, 0x86, 0x72, + 0x14, 0x50, 0x47, 0x11, 0x68, 0xe6, 0x17, 0x31, 0x9f, 0x5b, 0x37, 0xa0, 0xce, 0x6c, 0x12, 0xc5, + 0x17, 0x96, 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0xb3, 0xf3, + 0x66, 0xe1, 0xf9, 0x79, 0xb3, 0xf0, 0xe2, 0xbc, 0x59, 0x78, 0x96, 0x34, 0xb5, 0xb3, 0xa4, 0xa9, + 0x3d, 0x4f, 0x9a, 0xda, 0x8b, 0xa4, 0xa9, 0xfd, 0x99, 0x34, 0xb5, 0xef, 0xff, 0x6a, 0x16, 0xbe, + 0xbc, 0x9d, 0xf7, 0x67, 0xf0, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xb7, 0xc1, 0xa0, 0x2b, + 0x0a, 0x00, 0x00, } func (m *BoundObjectReference) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/authentication/v1/generated.proto b/pkg/k8s/vendor/k8s.io/api/authentication/v1/generated.proto index 1632070c872..1fe2f4f2cec 100644 --- a/pkg/k8s/vendor/k8s.io/api/authentication/v1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/authentication/v1/generated.proto @@ -99,6 +99,7 @@ message TokenRequestSpec { // 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. + // +listType=atomic repeated string audiences = 1; // ExpirationSeconds is the requested duration of validity of the request. The @@ -154,6 +155,7 @@ message TokenReviewSpec { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic repeated string audiences = 2; } @@ -177,6 +179,7 @@ message TokenReviewStatus { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic repeated string audiences = 4; // Error indicates that the token couldn't be checked @@ -199,6 +202,7 @@ message UserInfo { // The names of groups this user is a part of. // +optional + // +listType=atomic repeated string groups = 3; // Any additional information provided by the authenticator. diff --git a/pkg/k8s/vendor/k8s.io/api/authentication/v1/types.go b/pkg/k8s/vendor/k8s.io/api/authentication/v1/types.go index b498007c000..4f4400e305c 100644 --- a/pkg/k8s/vendor/k8s.io/api/authentication/v1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/authentication/v1/types.go @@ -75,6 +75,7 @@ type TokenReviewSpec struct { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,2,rep,name=audiences"` } @@ -96,6 +97,7 @@ type TokenReviewStatus struct { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,4,rep,name=audiences"` // Error indicates that the token couldn't be checked // +optional @@ -115,6 +117,7 @@ type UserInfo struct { UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"` // The names of groups this user is a part of. // +optional + // +listType=atomic Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"` // Any additional information provided by the authenticator. // +optional @@ -156,6 +159,7 @@ type TokenRequestSpec struct { // 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. + // +listType=atomic Audiences []string `json:"audiences" protobuf:"bytes,1,rep,name=audiences"` // ExpirationSeconds is the requested duration of validity of the request. The diff --git a/pkg/k8s/vendor/k8s.io/api/authentication/v1alpha1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/authentication/v1alpha1/generated.pb.go index ea274ac07b8..98c106ec65a 100644 --- a/pkg/k8s/vendor/k8s.io/api/authentication/v1alpha1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/authentication/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1alpha1/generated.proto +// source: k8s.io/api/authentication/v1alpha1/generated.proto package v1alpha1 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } func (*SelfSubjectReview) ProtoMessage() {} func (*SelfSubjectReview) Descriptor() ([]byte, []int) { - return fileDescriptor_05a77aeb710b43c2, []int{0} + return fileDescriptor_f003acd72d3d5efb, []int{0} } func (m *SelfSubjectReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_SelfSubjectReview proto.InternalMessageInfo func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } func (*SelfSubjectReviewStatus) ProtoMessage() {} func (*SelfSubjectReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_05a77aeb710b43c2, []int{1} + return fileDescriptor_f003acd72d3d5efb, []int{1} } func (m *SelfSubjectReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,35 +105,34 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1alpha1/generated.proto", fileDescriptor_05a77aeb710b43c2) + proto.RegisterFile("k8s.io/api/authentication/v1alpha1/generated.proto", fileDescriptor_f003acd72d3d5efb) } -var fileDescriptor_05a77aeb710b43c2 = []byte{ - // 384 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xbd, 0x6e, 0xdb, 0x30, - 0x14, 0x85, 0xc5, 0x0e, 0x86, 0xa1, 0x02, 0x45, 0xab, 0xa5, 0x86, 0x07, 0xba, 0xd0, 0x50, 0x74, - 0x68, 0xc9, 0xba, 0x28, 0x8a, 0x02, 0xdd, 0x34, 0x35, 0x08, 0x82, 0x00, 0x72, 0xb2, 0x64, 0x0a, - 0x25, 0x5f, 0x4b, 0x8c, 0x2c, 0x52, 0x10, 0x49, 0x05, 0xd9, 0xf2, 0x08, 0x79, 0x2c, 0x8f, 0x1e, - 0x8d, 0x0c, 0x46, 0xac, 0xbc, 0x48, 0x20, 0x59, 0xb6, 0x11, 0x3b, 0xb6, 0x37, 0xde, 0xc3, 0xfb, - 0x9d, 0x7b, 0xf8, 0x63, 0x9f, 0x26, 0x7f, 0x15, 0xe1, 0x92, 0x26, 0x26, 0x80, 0x5c, 0x80, 0x06, - 0x45, 0x0b, 0x10, 0x43, 0x99, 0xd3, 0x66, 0x83, 0x65, 0x9c, 0x32, 0xa3, 0x63, 0x10, 0x9a, 0x87, - 0x4c, 0x73, 0x29, 0x68, 0xd1, 0x67, 0xe3, 0x2c, 0x66, 0x7d, 0x1a, 0x81, 0x80, 0x9c, 0x69, 0x18, - 0x92, 0x2c, 0x97, 0x5a, 0x3a, 0xee, 0x92, 0x21, 0x2c, 0xe3, 0xe4, 0x35, 0x43, 0x56, 0x4c, 0xf7, - 0x47, 0xc4, 0x75, 0x6c, 0x02, 0x12, 0xca, 0x94, 0x46, 0x32, 0x92, 0xb4, 0x46, 0x03, 0x33, 0xaa, - 0xab, 0xba, 0xa8, 0x57, 0x4b, 0xcb, 0xee, 0xf7, 0x43, 0x31, 0xb6, 0x03, 0x74, 0x7f, 0x6f, 0xba, - 0x53, 0x16, 0xc6, 0x5c, 0x40, 0x7e, 0x47, 0xb3, 0x24, 0xaa, 0x04, 0x45, 0x53, 0xd0, 0xec, 0x2d, - 0x8a, 0xee, 0xa3, 0x72, 0x23, 0x34, 0x4f, 0x61, 0x07, 0xf8, 0x73, 0x0c, 0x50, 0x61, 0x0c, 0x29, - 0xdb, 0xe6, 0xdc, 0x47, 0x64, 0x7f, 0x1a, 0xc0, 0x78, 0x34, 0x30, 0xc1, 0x0d, 0x84, 0xda, 0x87, - 0x82, 0xc3, 0xad, 0x73, 0x6d, 0xb7, 0xab, 0x64, 0x43, 0xa6, 0x59, 0x07, 0x7d, 0x41, 0xdf, 0xde, - 0xff, 0xfa, 0x49, 0x36, 0x17, 0xb9, 0x1e, 0x40, 0xb2, 0x24, 0xaa, 0x04, 0x45, 0xaa, 0x6e, 0x52, - 0xf4, 0xc9, 0x79, 0xed, 0x72, 0x06, 0x9a, 0x79, 0xce, 0x64, 0xde, 0xb3, 0xca, 0x79, 0xcf, 0xde, - 0x68, 0xfe, 0xda, 0xd5, 0x09, 0xed, 0x96, 0xd2, 0x4c, 0x1b, 0xd5, 0x79, 0x57, 0xfb, 0xff, 0x23, - 0xc7, 0x1f, 0x8a, 0xec, 0x04, 0x1d, 0xd4, 0x16, 0xde, 0x87, 0x66, 0x54, 0x6b, 0x59, 0xfb, 0x8d, - 0xb5, 0x2b, 0xed, 0xcf, 0x7b, 0x10, 0xe7, 0xc2, 0x6e, 0x1b, 0x05, 0xf9, 0x89, 0x18, 0xc9, 0xe6, - 0x84, 0x5f, 0x0f, 0x26, 0x20, 0x97, 0x4d, 0xb7, 0xf7, 0xb1, 0x19, 0xd6, 0x5e, 0x29, 0xfe, 0xda, - 0xc9, 0xfb, 0x3f, 0x59, 0x60, 0x6b, 0xba, 0xc0, 0xd6, 0x6c, 0x81, 0xad, 0xfb, 0x12, 0xa3, 0x49, - 0x89, 0xd1, 0xb4, 0xc4, 0x68, 0x56, 0x62, 0xf4, 0x54, 0x62, 0xf4, 0xf0, 0x8c, 0xad, 0x2b, 0xf7, - 0xf8, 0x3f, 0x7e, 0x09, 0x00, 0x00, 0xff, 0xff, 0xec, 0xf9, 0xa3, 0xcd, 0x05, 0x03, 0x00, 0x00, +var fileDescriptor_f003acd72d3d5efb = []byte{ + // 368 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x4f, 0xe2, 0x40, + 0x14, 0xc7, 0x3b, 0x7b, 0x20, 0xa4, 0x9b, 0x6c, 0x76, 0x7b, 0x59, 0xc2, 0x61, 0x30, 0x3d, 0x18, + 0x0f, 0x3a, 0x23, 0xc4, 0x18, 0x13, 0x6f, 0x3d, 0xe9, 0xc1, 0x98, 0x14, 0xbd, 0x78, 0xf2, 0x51, + 0x1e, 0xed, 0x08, 0xed, 0x34, 0xed, 0x14, 0xe3, 0xcd, 0x8f, 0xe0, 0xc7, 0xe2, 0xc8, 0x91, 0x78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 0x0a, 0x1c, 0x6b, 0x34, 0x6d, 0x18, 0xf9, 0xb4, 0x61, 0xae, + 0x7a, 0xee, 0xd2, 0x6a, 0x79, 0x66, 0x25, 0x55, 0xa0, 0xb2, 0xb4, 0xf6, 0x4b, 0xfb, 0x2f, 0xd9, + 0xfe, 0x8b, 0x62, 0x1b, 0x41, 0xdb, 0x5a, 0xe1, 0xfc, 0x29, 0x57, 0x55, 0xe6, 0xb5, 0x5b, 0xaa, + 0x6d, 0x69, 0xfe, 0xdf, 0x82, 0x58, 0x77, 0x66, 0x35, 0x4b, 0x31, 0xb9, 0x8e, 0x7a, 0xb2, 0xfc, + 0xc3, 0xc3, 0x9d, 0x09, 0xd8, 0x7d, 0x39, 0xed, 0xfc, 0x2d, 0x97, 0x55, 0x17, 0x1d, 0x77, 0x69, + 0x72, 0xae, 0x46, 0x33, 0x6a, 0x8c, 0x67, 0xd4, 0x98, 0xcc, 0xa8, 0xf1, 0x9a, 0x53, 0x32, 0xca, + 0x29, 0x19, 0xe7, 0x94, 0x4c, 0x72, 0x4a, 0x3e, 0x72, 0x4a, 0xde, 0x3e, 0xa9, 0xf1, 0x60, 0xef, + 0x7f, 0xc7, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x04, 0xfb, 0xb6, 0xfb, 0xec, 0x02, 0x00, 0x00, } func (m *SelfSubjectReview) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go index 7f1d5ca6ce1..41539264478 100644 --- a/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1beta1/generated.proto +// source: k8s.io/api/authentication/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{0} + return fileDescriptor_fdc2de40fd7f3b21, []int{0} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_ExtraValue proto.InternalMessageInfo func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } func (*SelfSubjectReview) ProtoMessage() {} func (*SelfSubjectReview) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{1} + return fileDescriptor_fdc2de40fd7f3b21, []int{1} } func (m *SelfSubjectReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_SelfSubjectReview proto.InternalMessageInfo func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } func (*SelfSubjectReviewStatus) ProtoMessage() {} func (*SelfSubjectReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{2} + return fileDescriptor_fdc2de40fd7f3b21, []int{2} } func (m *SelfSubjectReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_SelfSubjectReviewStatus proto.InternalMessageInfo func (m *TokenReview) Reset() { *m = TokenReview{} } func (*TokenReview) ProtoMessage() {} func (*TokenReview) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{3} + return fileDescriptor_fdc2de40fd7f3b21, []int{3} } func (m *TokenReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_TokenReview proto.InternalMessageInfo func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} } func (*TokenReviewSpec) ProtoMessage() {} func (*TokenReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{4} + return fileDescriptor_fdc2de40fd7f3b21, []int{4} } func (m *TokenReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_TokenReviewSpec proto.InternalMessageInfo func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} } func (*TokenReviewStatus) ProtoMessage() {} func (*TokenReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{5} + return fileDescriptor_fdc2de40fd7f3b21, []int{5} } func (m *TokenReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_TokenReviewStatus proto.InternalMessageInfo func (m *UserInfo) Reset() { *m = UserInfo{} } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{6} + return fileDescriptor_fdc2de40fd7f3b21, []int{6} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -252,57 +252,56 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1beta1/generated.proto", fileDescriptor_77c9b20d3ad27844) -} - -var fileDescriptor_77c9b20d3ad27844 = []byte{ - // 725 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x4f, 0x4f, 0x13, 0x41, - 0x14, 0xef, 0xf6, 0x0f, 0x69, 0xa7, 0x56, 0x61, 0x12, 0x23, 0x69, 0xe2, 0x16, 0x6a, 0x62, 0x48, - 0x80, 0x59, 0x21, 0x04, 0x09, 0x9e, 0x58, 0x25, 0x04, 0x13, 0x62, 0x32, 0x05, 0x0f, 0xea, 0xc1, - 0xe9, 0xf6, 0xb1, 0x5d,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x42, 0x88, 0x42, 0x91, 0x18, 0xeb, 0x96, 0x44, - 0xa8, 0xba, 0xc1, 0x6f, 0x51, 0x01, 0xc4, 0x13, 0x24, 0x7b, 0x29, 0x2f, 0xaf, 0xde, 0xc2, 0x1f, - 0x22, 0xdf, 0xae, 0x4d, 0x97, 0x07, 0x87, 0x43, 0xad, 0x09, 0x8c, 0x26, 0x9a, 0x55, 0x5b, 0xbd, - 0x6f, 0x32, 0x06, 0x4f, 0xa2, 0x5c, 0x07, 0x0e, 0x93, 0xb6, 0xa8, 0xf8, 0xc4, 0xcf, 0x51, 0xa1, - 0x27, 0x9e, 0x3e, 0x35, 0x9c, 0xc5, 0x1b, 0x24, 0x1f, 0xbc, 0x97, 0x34, 0xe1, 0xae, 0x67, 0xd7, - 0x34, 0x73, 0xeb, 0xf8, 0x4c, 0xcf, 0x9c, 0x9c, 0xe9, 0x99, 0xd3, 0x33, 0x3d, 0x73, 0x14, 0xeb, - 0xda, 0x71, 0xac, 0x6b, 0x27, 0xb1, 0xae, 0x9d, 0xc6, 0xba, 0xf6, 0x2b, 0xd6, 0xb5, 0xcf, 0xbf, - 0xf5, 0xcc, 0x9b, 0xd9, 0x6b, 0x7f, 0x60, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x19, 0x49, - 0x3f, 0xfd, 0x06, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/authentication/v1beta1/generated.proto", fileDescriptor_fdc2de40fd7f3b21) +} + +var fileDescriptor_fdc2de40fd7f3b21 = []byte{ + // 711 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x4e, 0xdb, 0x4e, + 0x10, 0x8e, 0xf3, 0x07, 0x25, 0x9b, 0x5f, 0x7e, 0x85, 0x95, 0xaa, 0xa2, 0x48, 0x75, 0x20, 0x95, + 0x2a, 0x24, 0x60, 0xdd, 0x20, 0x44, 0x11,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 0x14, 0x8a, 0xc4, 0x58, + 0xb7, 0x25, 0x42, 0xd5, 0x0d, 0x7e, 0x83, 0x0a, 0x20, 0x9e, 0x20, 0xd9, 0x4b, 0x79, 0x65, 0xed, + 0x0e, 0xfe, 0x10, 0xf9, 0x76, 0x6d, 0xb9, 0x3c, 0x38, 0x1a, 0x69, 0x4d, 0x60, 0x34, 0xd1, 0xac, + 0xda, 0xea, 0x7d, 0x93, 0x31, 0x78, 0x1a, 0xe5, 0xba, 0x70, 0x94, 0xb4, 0x45, 0xc5, 0x27, 0x7e, + 0x8e, 0x0a, 0x7d, 0xf1, 0xf4, 0xa9, 0xe1, 0x2c, 0xdf, 0x22, 0xf9, 0xf0, 0xbd, 0xa4, 0x09, 0x77, + 0x23, 0xbb, 0xae, 0x99, 0xdb, 0x27, 0xe7, 0x7a, 0xe6, 0xf4, 0x5c, 0xcf, 0x9c, 0x9d, 0xeb, 0x99, + 0xe3, 0x58, 0xd7, 0x4e, 0x62, 0x5d, 0x3b, 0x8d, 0x75, 0xed, 0x2c, 0xd6, 0xb5, 0x9f, 0xb1, 0xae, + 0x7d, 0xfa, 0xa5, 0x67, 0x5e, 0xcf, 0xdf, 0xf8, 0x03, 0xfb, 0x13, 0x00, 0x00, 0xff, 0xff, 0x45, + 0x72, 0x2b, 0xf2, 0xe4, 0x06, 0x00, 0x00, } func (m ExtraValue) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/generated.proto b/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/generated.proto index 53b4635d7e9..61658245d42 100644 --- a/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/generated.proto @@ -87,6 +87,7 @@ message TokenReviewSpec { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic repeated string audiences = 2; } @@ -110,6 +111,7 @@ message TokenReviewStatus { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic repeated string audiences = 4; // Error indicates that the token couldn't be checked @@ -132,6 +134,7 @@ message UserInfo { // The names of groups this user is a part of. // +optional + // +listType=atomic repeated string groups = 3; // Any additional information provided by the authenticator. diff --git a/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/types.go b/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/types.go index 5bce82e7cfd..8038ef7d346 100644 --- a/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/authentication/v1beta1/types.go @@ -60,6 +60,7 @@ type TokenReviewSpec struct { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,2,rep,name=audiences"` } @@ -81,6 +82,7 @@ type TokenReviewStatus struct { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,4,rep,name=audiences"` // Error indicates that the token couldn't be checked // +optional @@ -100,6 +102,7 @@ type UserInfo struct { UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"` // The names of groups this user is a part of. // +optional + // +listType=atomic Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"` // Any additional information provided by the authenticator. // +optional diff --git a/pkg/k8s/vendor/k8s.io/api/authorization/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/authorization/v1/generated.pb.go index 2e8e35a551c..dfa109b4249 100644 --- a/pkg/k8s/vendor/k8s.io/api/authorization/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/authorization/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1/generated.proto +// source: k8s.io/api/authorization/v1/generated.proto package v1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{0} + return fileDescriptor_aafd0e5e70cec678, []int{0} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_ExtraValue proto.InternalMessageInfo func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } func (*LocalSubjectAccessReview) ProtoMessage() {} func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{1} + return fileDescriptor_aafd0e5e70cec678, []int{1} } func (m *LocalSubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_LocalSubjectAccessReview proto.InternalMessageInfo func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } func (*NonResourceAttributes) ProtoMessage() {} func (*NonResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{2} + return fileDescriptor_aafd0e5e70cec678, []int{2} } func (m *NonResourceAttributes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_NonResourceAttributes proto.InternalMessageInfo func (m *NonResourceRule) Reset() { *m = NonResourceRule{} } func (*NonResourceRule) ProtoMessage() {} func (*NonResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{3} + return fileDescriptor_aafd0e5e70cec678, []int{3} } func (m *NonResourceRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_NonResourceRule proto.InternalMessageInfo func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } func (*ResourceAttributes) ProtoMessage() {} func (*ResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{4} + return fileDescriptor_aafd0e5e70cec678, []int{4} } func (m *ResourceAttributes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ResourceAttributes proto.InternalMessageInfo func (m *ResourceRule) Reset() { *m = ResourceRule{} } func (*ResourceRule) ProtoMessage() {} func (*ResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{5} + return fileDescriptor_aafd0e5e70cec678, []int{5} } func (m *ResourceRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_ResourceRule proto.InternalMessageInfo func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } func (*SelfSubjectAccessReview) ProtoMessage() {} func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{6} + return fileDescriptor_aafd0e5e70cec678, []int{6} } func (m *SelfSubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_SelfSubjectAccessReview proto.InternalMessageInfo func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{7} + return fileDescriptor_aafd0e5e70cec678, []int{7} } func (m *SelfSubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +271,7 @@ var xxx_messageInfo_SelfSubjectAccessReviewSpec proto.InternalMessageInfo func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} } func (*SelfSubjectRulesReview) ProtoMessage() {} func (*SelfSubjectRulesReview) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{8} + return fileDescriptor_aafd0e5e70cec678, []int{8} } func (m *SelfSubjectRulesReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +299,7 @@ var xxx_messageInfo_SelfSubjectRulesReview proto.InternalMessageInfo func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} } func (*SelfSubjectRulesReviewSpec) ProtoMessage() {} func (*SelfSubjectRulesReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{9} + return fileDescriptor_aafd0e5e70cec678, []int{9} } func (m *SelfSubjectRulesReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +327,7 @@ var xxx_messageInfo_SelfSubjectRulesReviewSpec proto.InternalMessageInfo func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } func (*SubjectAccessReview) ProtoMessage() {} func (*SubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{10} + return fileDescriptor_aafd0e5e70cec678, []int{10} } func (m *SubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +355,7 @@ var xxx_messageInfo_SubjectAccessReview proto.InternalMessageInfo func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } func (*SubjectAccessReviewSpec) ProtoMessage() {} func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{11} + return fileDescriptor_aafd0e5e70cec678, []int{11} } func (m *SubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -383,7 +383,7 @@ var xxx_messageInfo_SubjectAccessReviewSpec proto.InternalMessageInfo func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } func (*SubjectAccessReviewStatus) ProtoMessage() {} func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{12} + return fileDescriptor_aafd0e5e70cec678, []int{12} } func (m *SubjectAccessReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -411,7 +411,7 @@ var xxx_messageInfo_SubjectAccessReviewStatus proto.InternalMessageInfo func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} } func (*SubjectRulesReviewStatus) ProtoMessage() {} func (*SubjectRulesReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{13} + return fileDescriptor_aafd0e5e70cec678, []int{13} } func (m *SubjectRulesReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -455,83 +455,82 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1/generated.proto", fileDescriptor_e50da13573e369bd) + proto.RegisterFile("k8s.io/api/authorization/v1/generated.proto", fileDescriptor_aafd0e5e70cec678) } -var fileDescriptor_e50da13573e369bd = []byte{ - // 1140 bytes of a gzipped FileDescriptorProto +var fileDescriptor_aafd0e5e70cec678 = []byte{ + // 1126 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xfa, 0x4f, 0x62, 0x8f, 0x1b, 0x92, 0x4e, 0x94, 0x66, 0x9b, 0x08, 0x3b, 0x5a, 0x24, - 0x48, 0x45, 0xd9, 0x25, 0x56, 0xdb, 0x44, 0x95, 0x2a, 0x64, 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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0xc2, 0xfc, 0xce, 0x38, 0x8c, 0xce, 0xf3, 0x8d, 0x7f, 0xb3, 0x40, 0x9f, 0x34, 0xda, - 0xe0, 0x61, 0xbc, 0x8b, 0x48, 0x50, 0xae, 0x43, 0xe5, 0xda, 0xad, 0x4b, 0x35, 0x88, 0xd0, 0x68, - 0x2c, 0x29, 0x47, 0xe6, 0x92, 0xd2, 0xc4, 0xea, 0x22, 0x3f, 0x21, 0x05, 0x0b, 0xee, 0xf8, 0xce, - 0x1c, 0x2d, 0x55, 0xe5, 0xda, 0xed, 0xcb, 0xb6, 0x83, 0x3c, 0x4d, 0x57, 0xa7, 0x2d, 0x9c, 0x03, - 0x18, 0xba, 0x60, 0x1f, 0xd6, 0x00, 0x70, 0x5c, 0xdb, 0xeb, 0xf9, 0x5d, 0xc2, 0x89, 0x0c, 0x5b, - 0x31, 0x9e, 0x83, 0xbb, 0x23, 0x04, 0x25, 0x58, 0x69, 0xf1, 0xce, 0x5f, 0x2d, 0xde, 0x8d, 0xfa, - 0xe9, 0x59, 0x25, 0xf3, 0xfc, 0xac, 0x92, 0x79, 0x71, 0x56, 0xc9, 0x3c, 0x0b, 0x2b, 0xda, 0x69, - 0x58, 0xd1, 0x9e, 0x87, 0x15, 0xed, 0x45, 0x58, 0xd1, 0xfe, 0x0e, 0x2b, 0xda, 0xf7, 0xff, 0x54, - 0x32, 0x4f, 0x57, 0xa7, 0xfc, 0x53, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xea, 0x67, 0x63, 0x89, - 0x60, 0x0f, 0x00, 0x00, + 0x14, 0xf7, 0xfa, 0x4f, 0x6a, 0x3f, 0x37, 0x24, 0x9d, 0x28, 0xcd, 0x36, 0x11, 0x76, 0xb4, 0x48, + 0x90, 0xaa, 0x65, 0x97, 0x58, 0x6d, 0x13, 0x55, 0xaa, 0x90, 0xad, 0x46, 0x28, 0x52, 0x5b, 0xaa, + 0x89, 0x12, 0x89, 0x22, 0x10, 0xe3, 0xf5, 0xc4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0x12, 0x45, 0x75, 0x58, 0xa0, 0xdc, 0x4d, 0xe1, 0xff, 0x8e, 0xe7, 0x39, + 0xc3, 0x8c, 0xae, 0x48, 0x85, 0x85, 0x9d, 0x71, 0x18, 0x9f, 0xe7, 0x6b, 0xff, 0x64, 0x41, 0x9d, + 0x34, 0xda, 0xd0, 0x61, 0xbc, 0x8b, 0x08, 0x50, 0xac, 0x43, 0xe5, 0xda, 0xcd, 0x4b, 0x35, 0x08, + 0xd7, 0x68, 0x2c, 0x4b, 0x47, 0xe6, 0x93, 0xd2, 0xc4, 0xea, 0x22, 0x3e, 0x91, 0x07, 0x8b, 0xf6, + 0xf8, 0xce, 0x1c, 0x2d, 0x55, 0xe5, 0xda, 0xed, 0xcb, 0xb6, 0x83, 0x38, 0x4d, 0x95, 0xa7, 0x2d, + 0x9e, 0x03, 0x18, 0xbe, 0x60, 0x1f, 0xd5, 0x00, 0x2c, 0xdb, 0x74, 0x7a, 0x6e, 0x97, 0xfa, 0x54, + 0x84, 0xad, 0x18, 0xcf, 0xc1, 0xdd, 0x11, 0x82, 0x13, 0xac, 0xb4, 0x78, 0xe7, 0x67, 0x8b, 0x77, + 0xa3, 0x7e, 0x7a, 0x56, 0xc9, 0xbc, 0x38, 0xab, 0x64, 0x5e, 0x9e, 0x55, 0x32, 0xcf, 0xc3, 0x8a, + 0x72, 0x1a, 0x56, 0x94, 0x17, 0x61, 0x45, 0x79, 0x19, 0x56, 0x94, 0xbf, 0xc2, 0x8a, 0xf2, 0xdd, + 0xdf, 0x95, 0xcc, 0xb3, 0xb5, 0x29, 0xff, 0x94, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x45, 0x6f, + 0xe0, 0x61, 0x47, 0x0f, 0x00, 0x00, } func (m ExtraValue) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/authorization/v1/generated.proto b/pkg/k8s/vendor/k8s.io/api/authorization/v1/generated.proto index 47d3a57a072..83283d0bdbe 100644 --- a/pkg/k8s/vendor/k8s.io/api/authorization/v1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/authorization/v1/generated.proto @@ -69,11 +69,13 @@ message NonResourceAttributes { // 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. + // +listType=atomic 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 + // +listType=atomic repeated string nonResourceURLs = 2; } @@ -115,20 +117,24 @@ message ResourceAttributes { // 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. + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic repeated string resourceNames = 4; } @@ -220,6 +226,7 @@ message SubjectAccessReviewSpec { // Groups is the groups you're testing for. // +optional + // +listType=atomic repeated string groups = 4; // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer @@ -262,10 +269,12 @@ message SubjectAccessReviewStatus { 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. + // +listType=atomic 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. + // +listType=atomic repeated NonResourceRule nonResourceRules = 2; // Incomplete is true when the rules returned by this call are incomplete. This is most commonly diff --git a/pkg/k8s/vendor/k8s.io/api/authorization/v1/types.go b/pkg/k8s/vendor/k8s.io/api/authorization/v1/types.go index d1fe483f964..3b42956f899 100644 --- a/pkg/k8s/vendor/k8s.io/api/authorization/v1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/authorization/v1/types.go @@ -143,6 +143,7 @@ type SubjectAccessReviewSpec struct { User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"` // Groups is the groups you're testing for. // +optional + // +listType=atomic 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. @@ -232,9 +233,11 @@ type SelfSubjectRulesReviewSpec struct { 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. + // +listType=atomic 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. + // +listType=atomic 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. @@ -250,28 +253,34 @@ type SubjectRulesReviewStatus struct { // 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. + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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. + // +listType=atomic 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 + // +listType=atomic NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,2,rep,name=nonResourceURLs"` } diff --git a/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go index aadcf824049..28642ba6380 100644 --- a/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1beta1/generated.proto +// source: k8s.io/api/authorization/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{0} + return fileDescriptor_8eab727787743457, []int{0} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_ExtraValue proto.InternalMessageInfo func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } func (*LocalSubjectAccessReview) ProtoMessage() {} func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{1} + return fileDescriptor_8eab727787743457, []int{1} } func (m *LocalSubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_LocalSubjectAccessReview proto.InternalMessageInfo func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } func (*NonResourceAttributes) ProtoMessage() {} func (*NonResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{2} + return fileDescriptor_8eab727787743457, []int{2} } func (m *NonResourceAttributes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_NonResourceAttributes proto.InternalMessageInfo func (m *NonResourceRule) Reset() { *m = NonResourceRule{} } func (*NonResourceRule) ProtoMessage() {} func (*NonResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{3} + return fileDescriptor_8eab727787743457, []int{3} } func (m *NonResourceRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_NonResourceRule proto.InternalMessageInfo func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } func (*ResourceAttributes) ProtoMessage() {} func (*ResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{4} + return fileDescriptor_8eab727787743457, []int{4} } func (m *ResourceAttributes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ResourceAttributes proto.InternalMessageInfo func (m *ResourceRule) Reset() { *m = ResourceRule{} } func (*ResourceRule) ProtoMessage() {} func (*ResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{5} + return fileDescriptor_8eab727787743457, []int{5} } func (m *ResourceRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_ResourceRule proto.InternalMessageInfo func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } func (*SelfSubjectAccessReview) ProtoMessage() {} func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{6} + return fileDescriptor_8eab727787743457, []int{6} } func (m *SelfSubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_SelfSubjectAccessReview proto.InternalMessageInfo func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{7} + return fileDescriptor_8eab727787743457, []int{7} } func (m *SelfSubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +271,7 @@ var xxx_messageInfo_SelfSubjectAccessReviewSpec proto.InternalMessageInfo func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} } func (*SelfSubjectRulesReview) ProtoMessage() {} func (*SelfSubjectRulesReview) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{8} + return fileDescriptor_8eab727787743457, []int{8} } func (m *SelfSubjectRulesReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +299,7 @@ var xxx_messageInfo_SelfSubjectRulesReview proto.InternalMessageInfo func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} } func (*SelfSubjectRulesReviewSpec) ProtoMessage() {} func (*SelfSubjectRulesReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{9} + return fileDescriptor_8eab727787743457, []int{9} } func (m *SelfSubjectRulesReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +327,7 @@ var xxx_messageInfo_SelfSubjectRulesReviewSpec proto.InternalMessageInfo func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } func (*SubjectAccessReview) ProtoMessage() {} func (*SubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{10} + return fileDescriptor_8eab727787743457, []int{10} } func (m *SubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +355,7 @@ var xxx_messageInfo_SubjectAccessReview proto.InternalMessageInfo func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } func (*SubjectAccessReviewSpec) ProtoMessage() {} func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{11} + return fileDescriptor_8eab727787743457, []int{11} } func (m *SubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -383,7 +383,7 @@ var xxx_messageInfo_SubjectAccessReviewSpec proto.InternalMessageInfo func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } func (*SubjectAccessReviewStatus) ProtoMessage() {} func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{12} + return fileDescriptor_8eab727787743457, []int{12} } func (m *SubjectAccessReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -411,7 +411,7 @@ var xxx_messageInfo_SubjectAccessReviewStatus proto.InternalMessageInfo func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} } func (*SubjectRulesReviewStatus) ProtoMessage() {} func (*SubjectRulesReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{13} + return fileDescriptor_8eab727787743457, []int{13} } func (m *SubjectRulesReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -455,83 +455,82 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1beta1/generated.proto", fileDescriptor_43130d8376f09103) -} - -var fileDescriptor_43130d8376f09103 = []byte{ - // 1143 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xfa, 0x4f, 0x62, 0x8f, 0x1b, 0x92, 0x4e, 0x94, 0x66, 0x1b, 0x84, 0x6d, 0x19, 0x09, - 0x05, 0x51, 0x76, 0x49, 0x54, 0x48, 0x09, 0xf4, 0x10, 0x2b, 0x01, 0x45, 0x6a, 0x4b, 0x35, 0x51, - 0x72, 0xa0, 0x12, 0x30, 0xbb, 0x9e, 0xd8, 0x8b, 0xed, 0xdd, 0x65, 0x66, 0xd6, 0x21, 0x88, 0x43, - 0x8f, 0x1c, 0x39, 0x72, 0xe4, 0xc4, 0x77, 0xe0, 0x82, 0x04, 0xa7, 0x1c, 0x7b, 0x0c, 0x12, 0xb2, - 0xc8, 0xf2, 0x21, 0xb8, 0xa2, 0x99, 0x1d, 0x7b, 0xd7, 0xc9, 0x26, 0x8e, 0x73, 0xa0, 0x97, 0xde, - 0x3c, 0xef, 0xf7, 0x7b, 0x6f, 0xde, 0x7b, 0xf3, 0xde, 0xdb, 0x67, 0xb0, 0xdb, 0x79, 0xc0, 0x0c, - 0xc7, 0x33, 0x3b, 0x81, 0x45, 0xa8, 0x4b, 0x38, 0x61, 0x66, 0x9f, 0xb8, 0x4d, 0x8f, 0x9a, 0x0a, - 0xc0, 0xbe, 0x63, 0xe2, 0x80, 0xb7, 0x3d, 0xea, 0x7c, 0x87, 0xb9, 0xe3, 0xb9, 0x66, 0x7f, 0xcd, - 0x22, 0x1c, 0xaf, 0x99, 0x2d, 0xe2, 0x12, 0x8a, 0x39, 0x69, 0x1a, 0x3e, 0xf5, 0xb8, 0x07, 0x6b, - 0x91, 0x86, 0x81, 0x7d, 0xc7, 0x18, 0xd3, 0x30, 0x94, 0xc6, 0xca, 0xbb, 0x2d, 0x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x09, 0x1b, 0xa0, 0xd0, 0x17, 0x6b, 0xb9, 0xca, 0xf3, - 0xbd, 0xc9, 0x9e, 0xc6, 0xab, 0x3c, 0x8a, 0x54, 0x37, 0xb3, 0x0f, 0xb4, 0xfa, 0x9f, 0x1a, 0xb8, - 0x7b, 0x69, 0x41, 0x8a, 0x45, 0x09, 0x77, 0xbb, 0xde, 0x11, 0x69, 0xca, 0xbb, 0x8b, 0xf1, 0xa2, - 0xb4, 0x15, 0x89, 0xd1, 0x10, 0x87, 0x6f, 0x81, 0x99, 0x26, 0x71, 0x1d, 0xd2, 0x94, 0x2b, 0x55, - 0x31, 0xae, 0xe5, 0x6d, 0x29, 0x45, 0x0a, 0x15, 0x3c, 0x4a, 0x30, 0xf3, 0x5c, 0xb5, 0xc4, 0x8d, - 0x78, 0x48, 0x4a, 0x91, 0x42, 0xe1, 0x16, 0x98, 0x27, 0xc2, 0x4d, 0x19, 0xc4, 0x0e, 0xa5, 0xde, - 0xf0, 0x65, 0x97, 0x95, 0xc2, 0xfc, 0xce, 0x38, 0x8c, 0xce, 0xf3, 0xeb, 0xff, 0x66, 0x81, 0x7e, - 0xd9, 0xd8, 0x83, 0x9d, 0x78, 0x8b, 0x91, 0xa0, 0x5c, 0xa4, 0xca, 0xeb, 0xc6, 0xf5, 0x5b, 0x46, - 0xa8, 0x35, 0x96, 0x94, 0x37, 0x73, 0x49, 0x69, 0x62, 0xf3, 0x91, 0x47, 0x78, 0x04, 0x16, 0xdc, - 0xf1, 0x95, 0x3b, 0xda, 0xc9, 0xca, 0xeb, 0x6b, 0x53, 0x35, 0x88, 0xbc, 0x52, 0x57, 0x57, 0x2e, - 0x9c, 0x03, 0x18, 0xba, 0x70, 0x09, 0x5c, 0x07, 0xc0, 0x71, 0x6d, 0xaf, 0xe7, 0x77, 0x09, 0x27, - 0x32, 0x81, 0xc5, 0x78, 0x5a, 0xee, 0x8e, 0x10, 0x94, 0x60, 0xa5, 0x65, 0x3e, 0x3f, 0x5d, 0xe6, - 0x1b, 0x9f, 0x9c, 0x9c, 0x55, 0x32, 0x2f, 0xce, 0x2a, 0x99, 0xd3, 0xb3, 0x4a, 0xe6, 0x79, 0x58, - 0xd1, 0x4e, 0xc2, 0x8a, 0xf6, 0x22, 0xac, 0x68, 0xa7, 0x61, 0x45, 0xfb, 0x3b, 0xac, 0x68, 0x3f, - 0xfe, 0x53, 0xc9, 0x7c, 0x5e, 0x9b, 0xf4, 0x0f, 0xfc, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, - 0x16, 0x3a, 0xdf, 0xbd, 0x0f, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/authorization/v1beta1/generated.proto", fileDescriptor_8eab727787743457) +} + +var fileDescriptor_8eab727787743457 = []byte{ + // 1130 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xf7, 0xfa, 0x47, 0x62, 0x3f, 0x37, 0xdf, 0xa4, 0x13, 0xa5, 0xd9, 0xe6, 0x2b, 0x6c, 0xcb, + 0x48, 0x28, 0x88, 0xb2, 0xdb, 0x44, 0x85, 0x94, 0x40, 0x0f, 0xb1, 0x12, 0x50, 0xa4, 0xb6, 0x54, + 0x13, 0x25, 0x07, 0x2a, 0x01, 0xe3, 0xf5, 0xc4, 0x5e, 0x62, 0xef, 0x2e, 0x3b, 0xb3, 0x0e, 0x41, + 0x1c, 0x7a, 0xe4, 0xc8, 0x91, 0x23, 0x27, 0xfe, 0x07, 0x2e, 0x48, 0x70, 0xca, 0xb1, 0xc7, 0x20, + 0x21, 0x8b, 0x2c, 0x7f, 0x04, 0x57, 0x34, 0xb3, 0x63, 0xef, 0x3a, 0xd9, 0xc4, 0x49, 0x0e, 0xf4, + 0xd2, 0x9b, 0xe7, 0x7d, 0x3e, 0xef, 0xcd, 0x7b, 0x6f, 0xde, 0x7b, 0xfb, 0x0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0x4d, 0x6c, 0x3e, 0xf2, 0x88, + 0x0e, 0x61, 0xce, 0x19, 0x5f, 0xb9, 0xa3, 0x9d, 0xac, 0xbc, 0xba, 0x72, 0xad, 0x06, 0x91, 0x57, + 0xea, 0xea, 0xca, 0xb9, 0x33, 0x00, 0xc3, 0xe7, 0x2e, 0x41, 0xab, 0x00, 0xb6, 0x63, 0xb9, 0x3d, + 0xaf, 0x4b, 0x39, 0x95, 0x09, 0x2c, 0xc6, 0xd3, 0x72, 0x7b, 0x84, 0xe0, 0x04, 0x2b, 0x2d, 0xf3, + 0xf9, 0xeb, 0x65, 0xbe, 0xf1, 0xf1, 0xf1, 0x69, 0x25, 0xf3, 0xf2, 0xb4, 0x92, 0x39, 0x39, 0xad, + 0x64, 0x5e, 0x84, 0x15, 0xed, 0x38, 0xac, 0x68, 0x2f, 0xc3, 0x8a, 0x76, 0x12, 0x56, 0xb4, 0xbf, + 0xc2, 0x8a, 0xf6, 0xc3, 0xdf, 0x95, 0xcc, 0x67, 0xb5, 0x49, 0xff, 0xc0, 0xff, 0x0d, 0x00, 0x00, + 0xff, 0xff, 0xcd, 0x08, 0x09, 0x84, 0xa4, 0x0f, 0x00, 0x00, } func (m ExtraValue) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/generated.proto b/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/generated.proto index 01736202f83..43bea7aa12d 100644 --- a/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/generated.proto @@ -69,11 +69,13 @@ message NonResourceAttributes { // 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. + // +listType=atomic 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 + // +listType=atomic repeated string nonResourceURLs = 2; } @@ -115,20 +117,24 @@ message ResourceAttributes { // 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. + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic repeated string resourceNames = 4; } @@ -220,6 +226,7 @@ message SubjectAccessReviewSpec { // Groups is the groups you're testing for. // +optional + // +listType=atomic repeated string group = 4; // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer @@ -262,10 +269,12 @@ message SubjectAccessReviewStatus { 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. + // +listType=atomic 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. + // +listType=atomic repeated NonResourceRule nonResourceRules = 2; // Incomplete is true when the rules returned by this call are incomplete. This is most commonly diff --git a/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/types.go b/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/types.go index 26530986556..ef3a501b058 100644 --- a/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/authorization/v1beta1/types.go @@ -152,6 +152,7 @@ type SubjectAccessReviewSpec struct { User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"` // Groups is the groups you're testing for. // +optional + // +listType=atomic 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. @@ -244,9 +245,11 @@ type SelfSubjectRulesReviewSpec struct { 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. + // +listType=atomic 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. + // +listType=atomic 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. @@ -262,28 +265,34 @@ type SubjectRulesReviewStatus struct { // 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. + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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. + // +listType=atomic 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 + // +listType=atomic NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,2,rep,name=nonResourceURLs"` } diff --git a/pkg/k8s/vendor/k8s.io/api/autoscaling/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/autoscaling/v1/generated.pb.go index 289d1b827f6..3e3c2313519 100644 --- a/pkg/k8s/vendor/k8s.io/api/autoscaling/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/autoscaling/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v1/generated.proto +// source: k8s.io/api/autoscaling/v1/generated.proto package v1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } func (*ContainerResourceMetricSource) ProtoMessage() {} func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{0} + return fileDescriptor_1972394c0c7aac8b, []int{0} } func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } func (*ContainerResourceMetricStatus) ProtoMessage() {} func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{1} + return fileDescriptor_1972394c0c7aac8b, []int{1} } func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{2} + return fileDescriptor_1972394c0c7aac8b, []int{2} } func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } func (*ExternalMetricSource) ProtoMessage() {} func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{3} + return fileDescriptor_1972394c0c7aac8b, []int{3} } func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{4} + return fileDescriptor_1972394c0c7aac8b, []int{4} } func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{5} + return fileDescriptor_1972394c0c7aac8b, []int{5} } func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{6} + return fileDescriptor_1972394c0c7aac8b, []int{6} } func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{7} + return fileDescriptor_1972394c0c7aac8b, []int{7} } func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{8} + return fileDescriptor_1972394c0c7aac8b, []int{8} } func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{9} + return fileDescriptor_1972394c0c7aac8b, []int{9} } func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +330,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{10} + return fileDescriptor_1972394c0c7aac8b, []int{10} } func (m *MetricSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +358,7 @@ var xxx_messageInfo_MetricSpec proto.InternalMessageInfo func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{11} + return fileDescriptor_1972394c0c7aac8b, []int{11} } func (m *MetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +386,7 @@ var xxx_messageInfo_MetricStatus proto.InternalMessageInfo func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{12} + return fileDescriptor_1972394c0c7aac8b, []int{12} } func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +414,7 @@ var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{13} + return fileDescriptor_1972394c0c7aac8b, []int{13} } func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +442,7 @@ var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{14} + return fileDescriptor_1972394c0c7aac8b, []int{14} } func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +470,7 @@ var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{15} + return fileDescriptor_1972394c0c7aac8b, []int{15} } func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +498,7 @@ var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{16} + return fileDescriptor_1972394c0c7aac8b, []int{16} } func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +526,7 @@ var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{17} + return fileDescriptor_1972394c0c7aac8b, []int{17} } func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +554,7 @@ var xxx_messageInfo_ResourceMetricStatus proto.InternalMessageInfo func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{18} + return fileDescriptor_1972394c0c7aac8b, []int{18} } func (m *Scale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +582,7 @@ var xxx_messageInfo_Scale proto.InternalMessageInfo func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{19} + return fileDescriptor_1972394c0c7aac8b, []int{19} } func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +610,7 @@ var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{20} + return fileDescriptor_1972394c0c7aac8b, []int{20} } func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -660,112 +660,111 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v1/generated.proto", fileDescriptor_2bb1f2101a7f10e2) -} - -var fileDescriptor_2bb1f2101a7f10e2 = []byte{ - // 1608 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0xd4, 0xc6, - 0x17, 0xcf, 0x7e, 0x24, 0x24, 0x6f, 0x43, 0x3e, 0x06, 0xfe, 0x90, 0x84, 0x3f, 0xeb, 0xc8, 0x7f, - 0x84, 0xf2, 0x6f, 0x8b, 0xdd, 0x6c, 0x29, 0xa2, 0xa7, 0x2a, 0xde, 0x96, 0x82, 0x9a, 0x85, 0x30, - 0x09, 0x94, 0x7e, 0x8a, 0x89, 0x77, 0xd8, 0x98, 0xac, 0xed, 0x95, 0xed, 0x5d, 0x11, 0x24, 0xa4, - 0xf6, 0xd0, 0x7b, 0x2f, 0xb4, 0xd7, 0x56, 0xea, 0xb5, 0x67, 0xce, 0xbd, 0x71, 0xe4, 0x80, 0x54, - 0x4e, 0xab, 0xe2, 0x1e, 0x7a, 0xe8, 0xa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23, 0x2a, 0xd4, 0xb1, - 0x34, 0x75, 0x9d, 0xfd, 0x8d, 0xca, 0x90, 0x37, 0x88, 0x4e, 0xe7, 0x32, 0x8b, 0x99, 0xa5, 0x09, - 0x45, 0x7e, 0xdc, 0x16, 0x46, 0xdc, 0xb6, 0x90, 0xbf, 0x4a, 0x74, 0xfa, 0xa2, 0x2d, 0x08, 0xbd, - 0x8a, 0x93, 0x02, 0x18, 0x8f, 0x04, 0x33, 0x66, 0x74, 0x0b, 0xe6, 0x1c, 0x62, 0xd5, 0xa8, 0xb3, - 0xd2, 0xa2, 0x16, 0xa9, 0xd1, 0x1b, 0x8e, 0x56, 0xd7, 0xee, 0x13, 0x47, 0x33, 0x8d, 0xb9, 0xec, - 0x62, 0x66, 0x69, 0x54, 0xf9, 0xaf, 0xdb, 0x16, 0xe6, 0x36, 0x12, 0x68, 0x70, 0x22, 0x37, 0x6a, - 0x01, 0x8a, 0x9d, 0xdd, 0x24, 0xf5, 0x26, 0x9d, 0xcb, 0x2d, 0x66, 0x96, 0x0a, 0x25, 0x49, 0xea, - 0x38, 0x48, 0xa8, 0x15, 0xa9, 0xb1, 0x5d, 0x63, 0x1e, 0x13, 0x98, 0x4c, 0xba, 0xde, 0x24, 0x86, - 0xa3, 0x39, 0x3b, 0xca, 0x09, 0xb7, 0x2d, 0xa0, 0x8d, 0x1e, 0x34, 0xdc, 0x47, 0x02, 0x92, 0x61, - 0x42, 0x0d, 0xf4, 0x36, 0x37, 0xca, 0x74, 0x33, 0xcb, 0x75, 0x33, 0xd1, 0x51, 0x68, 0x87, 0x46, - 0xfc, 0x33, 0x45, 0xd3, 0x0e, 0x71, 0x9a, 0xf6, 0xc1, 0x68, 0xfa, 0x53, 0x98, 0x57, 0x9b, 0x96, - 0x45, 0x8d, 0x64, 0x55, 0x9f, 0x76, 0xdb, 0xc2, 0x7c, 0x39, 0x89, 0x08, 0x27, 0xf3, 0xa3, 0x07, - 0x70, 0x2c, 0x7e, 0xb8, 0x1f, 0x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, 0x28, 0x46, 0xd2, 0xec, 0x75, 0x18, 0x33, - 0x59, 0x64, 0x70, 0xbb, 0x9c, 0x4b, 0x09, 0xa7, 0xb0, 0xa4, 0x85, 0x40, 0x0a, 0x78, 0xb9, 0x8c, - 0x87, 0x16, 0x07, 0x42, 0x57, 0x20, 0xdf, 0x30, 0xab, 0x41, 0x21, 0x7a, 0x3d, 0x05, 0x70, 0xcd, - 0xac, 0xda, 0x31, 0xb8, 0x71, 0xef, 0xc6, 0xde, 0xaf, 0x98, 0x41, 0xa0, 0x8f, 0x61, 0x3c, 0x28, - 0xf8, 0xbc, 0x3b, 0x90, 0x53, 0xe0, 0xfa, 0x0d, 0xa0, 0xca, 0xa4, 0x97, 0xc8, 0x82, 0x13, 0x1c, - 0xc2, 0xa1, 0x07, 0x30, 0xab, 0x76, 0xcf, 0x53, 0x73, 0x47, 0x76, 0xad, 0x9d, 0xa9, 0xd3, 0xae, - 0xf2, 0x1f, 0xb7, 0x2d, 0xcc, 0xf6, 0x90, 0xe0, 0x5e, 0x49, 0xde, 0xcb, 0x28, 0xef, 0x14, 0x99, - 0x53, 0xa4, 0xbf, 0xac, 0x5f, 0xb7, 0xef, 0xbf, 0x2c, 0x38, 0xc1, 0x21, 0x9c, 0xf8, 0x5d, 0x1e, - 0x26, 0x63, 0xdd, 0xe7, 0x21, 0x7b, 0x86, 0xdf, 0x46, 0x1c, 0x98, 0x67, 0xf8, 0x70, 0x07, 0xea, - 0x19, 0x3e, 0xe4, 0x21, 0x79, 0x86, 0x2f, 0xec, 0x90, 0x3c, 0x23, 0xf2, 0xb2, 0x3e, 0x9e, 0xf1, - 0x34, 0x07, 0xa8, 0x37, 0x88, 0xd1, 0x17, 0x30, 0xe6, 0x97, 0x8b, 0x7d, 0x96, 0xd4, 0xb0, 0xb9, - 0xe1, 0xd5, 0x93, 0xa3, 0x76, 0x4d, 0x3f, 0xd9, 0x81, 0xa6, 0x1f, 0x7a, 0x10, 0x53, 0x62, 0x58, - 0x73, 0x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e8, 0xba, 0x78, 0xa2, 0x43, 0xdd, 0x9b, 0x13, 0x94, - 0x77, 0x1f, 0x3f, 0x2f, 0x8e, 0x3c, 0x79, 0x5e, 0x1c, 0x79, 0xf6, 0xbc, 0x38, 0xf2, 0xa5, 0x5b, - 0xcc, 0x3c, 0x76, 0x8b, 0x99, 0x27, 0x6e, 0x31, 0xf3, 0xcc, 0x2d, 0x66, 0x7e, 0x75, 0x8b, 0x99, - 0x6f, 0x7e, 0x2b, 0x8e, 0x7c, 0x32, 0x9f, 0xf8, 0x2f, 0xd5, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x5d, 0x92, 0x55, 0x29, 0x87, 0x1d, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/autoscaling/v1/generated.proto", fileDescriptor_1972394c0c7aac8b) +} + +var fileDescriptor_1972394c0c7aac8b = []byte{ + // 1593 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0x13, 0xd7, + 0x16, 0x8e, 0x7f, 0x12, 0x92, 0xe3, 0x90, 0x9f, 0x0b, 0x0f, 0x92, 0xf0, 0xf0, 0x44, 0xf3, 0x10, + 0x0a, 0xef, 0x3d, 0xc6, 0x8d, 0x4b, 0x11, 0x5d, 0x55, 0xb1, 0x5b, 0x0a, 0x6a, 0x0c, 0xe1, 0x26, + 0x50, 0xfa, 0x2b, 0x6e, 0xc6, 0x17, 0x67, 0x88, 0x67, 0xc6, 0x9a, 0x19, 0x5b, 0x04, 0x09, 0xa9, + 0x5d, 0x74, 0xdf, 0x0d, 0xed, 0xb6, 0x95, 0xba, 0xed, 0x9a, 0x75, 0x77, 0x2c, 0x59, 0x20, 0x95, + 0x95, 0x55, 0xa6, 0x8b, 0x2e, 0xba, 0xea, 0x96, 0x55, 0x75, 0xef, 0xdc, 0x19, 0xcf, 0xd8, 0x9e, + 0x89, 0xe3, 0x84, 0x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xf3, 0xa9, 0xe7, 0x6e, 0x3e, 0xf5, 0x8b, 0x9b, + 0x4f, 0x7d, 0xfd, 0x6b, 0x7e, 0xe4, 0xe3, 0xf9, 0xd8, 0x7f, 0xa9, 0xfe, 0x19, 0x00, 0x00, 0xff, + 0xff, 0xd7, 0x67, 0xd4, 0x08, 0x6e, 0x1d, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2/generated.pb.go index 9f57916d7c9..ece6dedadb1 100644 --- a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2/generated.proto +// source: k8s.io/api/autoscaling/v2/generated.proto package v2 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } func (*ContainerResourceMetricSource) ProtoMessage() {} func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{0} + return fileDescriptor_4d5f2c8767749221, []int{0} } func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } func (*ContainerResourceMetricStatus) ProtoMessage() {} func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{1} + return fileDescriptor_4d5f2c8767749221, []int{1} } func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{2} + return fileDescriptor_4d5f2c8767749221, []int{2} } func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } func (*ExternalMetricSource) ProtoMessage() {} func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{3} + return fileDescriptor_4d5f2c8767749221, []int{3} } func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{4} + return fileDescriptor_4d5f2c8767749221, []int{4} } func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo func (m *HPAScalingPolicy) Reset() { *m = HPAScalingPolicy{} } func (*HPAScalingPolicy) ProtoMessage() {} func (*HPAScalingPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{5} + return fileDescriptor_4d5f2c8767749221, []int{5} } func (m *HPAScalingPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_HPAScalingPolicy proto.InternalMessageInfo func (m *HPAScalingRules) Reset() { *m = HPAScalingRules{} } func (*HPAScalingRules) ProtoMessage() {} func (*HPAScalingRules) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{6} + return fileDescriptor_4d5f2c8767749221, []int{6} } func (m *HPAScalingRules) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_HPAScalingRules proto.InternalMessageInfo func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{7} + return fileDescriptor_4d5f2c8767749221, []int{7} } func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo func (m *HorizontalPodAutoscalerBehavior) Reset() { *m = HorizontalPodAutoscalerBehavior{} } func (*HorizontalPodAutoscalerBehavior) ProtoMessage() {} func (*HorizontalPodAutoscalerBehavior) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{8} + return fileDescriptor_4d5f2c8767749221, []int{8} } func (m *HorizontalPodAutoscalerBehavior) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerBehavior proto.InternalMessageInfo func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{9} + return fileDescriptor_4d5f2c8767749221, []int{9} } func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +330,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{10} + return fileDescriptor_4d5f2c8767749221, []int{10} } func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +358,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{11} + return fileDescriptor_4d5f2c8767749221, []int{11} } func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +386,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{12} + return fileDescriptor_4d5f2c8767749221, []int{12} } func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +414,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo func (m *MetricIdentifier) Reset() { *m = MetricIdentifier{} } func (*MetricIdentifier) ProtoMessage() {} func (*MetricIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{13} + return fileDescriptor_4d5f2c8767749221, []int{13} } func (m *MetricIdentifier) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +442,7 @@ var xxx_messageInfo_MetricIdentifier proto.InternalMessageInfo func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{14} + return fileDescriptor_4d5f2c8767749221, []int{14} } func (m *MetricSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +470,7 @@ var xxx_messageInfo_MetricSpec proto.InternalMessageInfo func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{15} + return fileDescriptor_4d5f2c8767749221, []int{15} } func (m *MetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +498,7 @@ var xxx_messageInfo_MetricStatus proto.InternalMessageInfo func (m *MetricTarget) Reset() { *m = MetricTarget{} } func (*MetricTarget) ProtoMessage() {} func (*MetricTarget) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{16} + return fileDescriptor_4d5f2c8767749221, []int{16} } func (m *MetricTarget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +526,7 @@ var xxx_messageInfo_MetricTarget proto.InternalMessageInfo func (m *MetricValueStatus) Reset() { *m = MetricValueStatus{} } func (*MetricValueStatus) ProtoMessage() {} func (*MetricValueStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{17} + return fileDescriptor_4d5f2c8767749221, []int{17} } func (m *MetricValueStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +554,7 @@ var xxx_messageInfo_MetricValueStatus proto.InternalMessageInfo func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{18} + return fileDescriptor_4d5f2c8767749221, []int{18} } func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +582,7 @@ var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{19} + return fileDescriptor_4d5f2c8767749221, []int{19} } func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +610,7 @@ var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{20} + return fileDescriptor_4d5f2c8767749221, []int{20} } func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -638,7 +638,7 @@ var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{21} + return fileDescriptor_4d5f2c8767749221, []int{21} } func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -666,7 +666,7 @@ var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{22} + return fileDescriptor_4d5f2c8767749221, []int{22} } func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -694,7 +694,7 @@ var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{23} + return fileDescriptor_4d5f2c8767749221, []int{23} } func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -747,120 +747,119 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2/generated.proto", fileDescriptor_b14d4df4b5f3935e) -} - -var fileDescriptor_b14d4df4b5f3935e = []byte{ - // 1738 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcb, 0x8f, 0x13, 0xc9, - 0x19, 0x9f, 0xb6, 0x3d, 0xaf, 0xf2, 0x3c, 0x8b, 0x97, 0x19, 0x84, 0x3d, 0xea, 0x90, 0x40, 0x48, - 0x68, 0x07, 0x87, 0x20, 0x14, 0x0e, 0xd1, 0xf4, 0x90, 0x84, 0x11, 0x33, 0x19, 0x53, 0x06, 0x26, - 0x89, 0x92, 0x88, 0x72, 0x77, 0x8d, 0xa7, 0x32, 0x76, 0xb7, 0xd5, 0xdd, 0x36, 0x0c, 0x52, 0xa4, - 0x5c, 0x72, 0x8f, 0x12, 0xa1, 0x28, 0xff, 0x03, 0xca, 0x29, 0x11, 0x39, 0xec, 0x4a, 0x2b, 0xed, - 0x1e, 0xb8, 0xac, 0xc4, 0x61, 0x0f, 0x9c, 0xac, 0xc5, 0x2b, 0xed, 0x71, 0xff, 0x00, 0x4e, 0xab, - 0x7a, 0xf4, 0xd3, 0xaf, 0x31, 0x3b, 0x8c, 0x34, 0x37, 0x57, 0xd5, 0xf7, 0xfd, 0xbe, 0x47, 0x7d, - 0xaf, 0x6a, 0x03, 0x7d, 0xff, 0x96, 0xab, 0x51, 0xb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, 0xb8, 0x03, 0x66, 0xf9, 0xcf, 0x3b, 0xf6, 0x13, 0x4b, 0xfa, 0x6d, 0x1c, 0xd0, 0x79, - 0x56, 0xf4, 0x2b, 0x3e, 0x00, 0x0a, 0xb1, 0xd4, 0xbf, 0xa5, 0xc1, 0xea, 0x00, 0x7b, 0xd6, 0x6d, - 0xcb, 0xa4, 0x2c, 0xc6, 0xe1, 0xdd, 0x58, 0x9a, 0xdf, 0x48, 0xa4, 0xf9, 0xa5, 0x51, 0xfc, 0x91, - 0xb4, 0xdf, 0x0c, 0x2e, 0x28, 0x15, 0xc3, 0x92, 0x6e, 0x7e, 0xd7, 0x29, 0xf4, 0x19, 0xac, 0xb4, - 0x00, 0x29, 0x7e, 0x19, 0xb0, 0x0d, 0x60, 0x1d, 0xbb, 0xde, 0x03, 0x07, 0x5b, 0xae, 0x90, 0x44, - 0x1b, 0x44, 0x5e, 0xfd, 0xd5, 0xc3, 0x05, 0x2d, 0xe3, 0xd0, 0x57, 0xa4, 0x16, 0x70, 0xb3, 0x07, - 0x0d, 0xf5, 0x91, 0x00, 0x7f, 0x00, 0xa6, 0x1c, 0x82, 0x5d, 0xdb, 0xca, 0x65, 0xb8, 0x15, 0x41, - 0xb0, 0x20, 0xbe, 0x8b, 0xe4, 0x29, 0xfc, 0x21, 0x98, 0x6e, 0x10, 0xd7, 0xc5, 0x35, 0x92, 0x9b, - 0xe4, 0x84, 0x41, 0x79, 0xdd, 0x12, 0xdb, 0xc8, 0x3f, 0x57, 0xbf, 0x50, 0xc0, 0x85, 0x01, 0x7e, - 0xdc, 0xa4, 0xae, 0x07, 0xff, 0xd0, 0x93, 0x95, 0xda, 0xe1, 0x0c, 0x64, 0xdc, 0x3c, 0x27, 0x83, + proto.RegisterFile("k8s.io/api/autoscaling/v2/generated.proto", fileDescriptor_4d5f2c8767749221) +} + +var fileDescriptor_4d5f2c8767749221 = []byte{ + // 1722 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0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98, 0xb2, 0x79, 0x99, 0x91, 0x1a, - 0x5e, 0x1b, 0xe2, 0xc7, 0x60, 0xde, 0x09, 0x80, 0x74, 0xc0, 0x1a, 0x83, 0xac, 0x53, 0x12, 0x08, + 0xee, 0x8c, 0x1f, 0x25, 0x41, 0xe1, 0x0d, 0x3b, 0x7a, 0xb0, 0xe5, 0xa2, 0x88, 0x08, 0xf5, 0x6f, + 0x0a, 0x58, 0x4a, 0x0e, 0xa9, 0xc1, 0x7b, 0x40, 0x19, 0xf8, 0x1e, 0xf8, 0x1d, 0x98, 0x11, 0x33, + 0x8f, 0xed, 0xc8, 0x6b, 0xff, 0xd1, 0x21, 0xcb, 0x1a, 0xae, 0x92, 0x7a, 0x45, 0xb2, 0x8a, 0x20, + 0xf6, 0x57, 0x28, 0x80, 0x54, 0x5f, 0x64, 0x00, 0x08, 0x73, 0x0a, 0xde, 0x8c, 0xf5, 0xb1, 0xd5, + 0x44, 0x1f, 0x5b, 0x8a, 0x3e, 0x2e, 0x22, 0x3d, 0xeb, 0x01, 0x98, 0xb2, 0x79, 0x99, 0x91, 0x1a, + 0x5e, 0x1f, 0xe2, 0xc7, 0x60, 0xde, 0x09, 0x80, 0x74, 0xc0, 0x1a, 0x83, 0xac, 0x53, 0x12, 0x08, 0x6e, 0x80, 0x4c, 0xd3, 0x36, 0xfd, 0x29, 0x65, 0xd8, 0x58, 0x57, 0xb6, 0x4d, 0x37, 0x06, 0x37, 0xc3, 0x34, 0x66, 0xbb, 0x88, 0x43, 0xb0, 0x29, 0xd1, 0xff, 0x94, 0xc0, 0xc3, 0x31, 0x5b, 0x2a, - 0x0e, 0x81, 0xeb, 0xf7, 0x60, 0x17, 0xde, 0xf3, 0x4f, 0x50, 0x00, 0x07, 0xff, 0x02, 0x96, 0x8d, + 0x0e, 0x81, 0xeb, 0xf7, 0x60, 0x17, 0xde, 0xf3, 0x4f, 0x50, 0x00, 0x07, 0xff, 0x08, 0x96, 0x8d, 0xe4, 0x03, 0x38, 0x37,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0xbf, 0x78, 0xf5, 0x36, 0x3f, 0xf1, 0xfa, 0x6d, 0x7e, 0xe2, 0xcd, 0xdb, 0xfc, 0xc4, 0x5f, - 0xbb, 0x79, 0xe5, 0x55, 0x37, 0xaf, 0xbc, 0xee, 0xe6, 0x95, 0x37, 0xdd, 0xbc, 0xf2, 0x65, 0x37, - 0xaf, 0xfc, 0xfd, 0xab, 0xfc, 0xc4, 0xef, 0xcf, 0x0f, 0xfc, 0xa7, 0xf0, 0xdb, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xc5, 0xb7, 0xf9, 0x52, 0x5e, 0x1c, 0x00, 0x00, + 0xea, 0xff, 0x92, 0x7e, 0x3b, 0x81, 0x9f, 0xcf, 0xfa, 0xdd, 0x72, 0xfa, 0x78, 0x6e, 0x59, 0xfd, + 0x8f, 0x02, 0x96, 0x92, 0x63, 0xc4, 0x09, 0xf9, 0x76, 0xfa, 0xff, 0xb8, 0xea, 0x27, 0xf1, 0xbb, + 0xe9, 0x4b, 0x05, 0x9c, 0x3e, 0x39, 0x7f, 0x93, 0xa8, 0xff, 0xea, 0x55, 0xf7, 0x04, 0xfc, 0xd9, + 0xa1, 0xff, 0xf4, 0xf5, 0xbb, 0xfc, 0xc4, 0x9b, 0x77, 0xf9, 0x89, 0xb7, 0xef, 0xf2, 0x13, 0x7f, + 0xea, 0xe6, 0x95, 0xd7, 0xdd, 0xbc, 0xf2, 0xa6, 0x9b, 0x57, 0xde, 0x76, 0xf3, 0xca, 0x17, 0xdd, + 0xbc, 0xf2, 0x97, 0x2f, 0xf3, 0x13, 0xbf, 0x39, 0x3f, 0xf0, 0x9f, 0xc2, 0x6f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xca, 0x8b, 0x47, 0xba, 0x45, 0x1c, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go index edda3581e76..69567089b6f 100644 --- a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto +// source: k8s.io/api/autoscaling/v2beta1/generated.proto package v2beta1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } func (*ContainerResourceMetricSource) ProtoMessage() {} func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{0} + return fileDescriptor_ea74040359c1ed83, []int{0} } func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } func (*ContainerResourceMetricStatus) ProtoMessage() {} func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{1} + return fileDescriptor_ea74040359c1ed83, []int{1} } func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{2} + return fileDescriptor_ea74040359c1ed83, []int{2} } func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } func (*ExternalMetricSource) ProtoMessage() {} func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{3} + return fileDescriptor_ea74040359c1ed83, []int{3} } func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{4} + return fileDescriptor_ea74040359c1ed83, []int{4} } func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{5} + return fileDescriptor_ea74040359c1ed83, []int{5} } func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{6} + return fileDescriptor_ea74040359c1ed83, []int{6} } func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{7} + return fileDescriptor_ea74040359c1ed83, []int{7} } func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{8} + return fileDescriptor_ea74040359c1ed83, []int{8} } func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{9} + return fileDescriptor_ea74040359c1ed83, []int{9} } func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +330,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{10} + return fileDescriptor_ea74040359c1ed83, []int{10} } func (m *MetricSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +358,7 @@ var xxx_messageInfo_MetricSpec proto.InternalMessageInfo func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{11} + return fileDescriptor_ea74040359c1ed83, []int{11} } func (m *MetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +386,7 @@ var xxx_messageInfo_MetricStatus proto.InternalMessageInfo func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{12} + return fileDescriptor_ea74040359c1ed83, []int{12} } func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +414,7 @@ var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{13} + return fileDescriptor_ea74040359c1ed83, []int{13} } func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +442,7 @@ var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{14} + return fileDescriptor_ea74040359c1ed83, []int{14} } func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +470,7 @@ var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{15} + return fileDescriptor_ea74040359c1ed83, []int{15} } func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +498,7 @@ var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{16} + return fileDescriptor_ea74040359c1ed83, []int{16} } func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +526,7 @@ var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{17} + return fileDescriptor_ea74040359c1ed83, []int{17} } func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -573,109 +573,108 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto", fileDescriptor_26c1bfc7a52d0478) -} - -var fileDescriptor_26c1bfc7a52d0478 = []byte{ - // 1565 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0x1b, 0x45, - 0x1b, 0x8e, 0xed, 0x4d, 0x9a, 0xbc, 0x4e, 0xf3, 0x33, 0xed, 0xd7, 0xba, 0xe9, 0x57, 0x3b, 0x5a, - 0x7d, 0xfa, 0x94, 0xaf, 0xfa, 0xd8, 0x6d, 0x4d, 0xf8, 0x91, 0x10, 0x12, 0xb1, 0x0b, 0x6d, 0x45, - 0xd2, 0x96, 0x49, 0x5a, 0x21, 0x68, 0x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e, 0x38, 0x34, 0xa7, 0x06, 0x34, 0xf4, 0xc2, 0x09, 0xb5, 0x95, 0xb9, 0xcd, - 0x18, 0x34, 0xee, 0x30, 0x85, 0xce, 0x43, 0xba, 0x6a, 0x3b, 0x98, 0xd6, 0x2a, 0xb6, 0x45, 0x98, - 0xba, 0x17, 0xc9, 0x96, 0xb4, 0xd1, 0x7e, 0x8d, 0xa3, 0x32, 0xe8, 0x05, 0x48, 0x57, 0xc9, 0x9d, - 0x50, 0x25, 0x25, 0x55, 0x8e, 0x29, 0x7b, 0xe9, 0x8d, 0xf6, 0x12, 0x8e, 0xca, 0xa1, 0xeb, 0x22, - 0x1a, 0x44, 0x95, 0x66, 0x19, 0x4d, 0xd2, 0x7c, 0x76, 0xd8, 0xf9, 0x54, 0x91, 0x17, 0x25, 0x22, - 0x12, 0x39, 0x12, 0x02, 0x07, 0x58, 0xfa, 0xf7, 0x1a, 0x9c, 0x19, 0x98, 0xfb, 0xe8, 0x0d, 0x40, - 0xee, 0x36, 0xa3, 0x5e, 0x83, 0x96, 0x2e, 0xfa, 0x97, 0x7e, 0x71, 0x3f, 0x11, 0x1c, 0xa7, 0xfc, - 0x96, 0x78, 0xb5, 0x6b, 0x15, 0xf7, 0xd0, 0x40, 0x16, 0x1c, 0x15, 0xc9, 0xe0, 0x13, 0x6a, 0xab, - 0xab, 0xd0, 0xfe, 0x32, 0x6d, 0xb1, 0xd5, 0xcc, 0x1d, 0x5d, 0x8f, 0x82, 0xe0, 0x38, 0x26, 0x5a, - 0x83, 0x79, 0x55, 0xeb, 0x3b, 0x08, 0x3e, 0xa9, 0x18, 0x98, 0x2f, 0xc6, 0x97, 0x71, 0xa7, 0xbc, - 0x80, 0x28, 0x51, 0x66, 0x7b, 0xb4, 0x14, 0x42, 0x68, 0x71, 0x88, 0x0b, 0xf1, 0x65, 0xdc, 0x29, - 0x8f, 0x2a, 0x30, 0xa7, 0x50, 0x15, 0xdf, 0x99, 0x49, 0xe9, 0xb2, 0xff, 0x8f, 0xe8, 0x32, 0xbf, - 0xe8, 0x86, 0x31, 0x58, 0x8c, 0x61, 0xe1, 0x0e, 0x6c, 0xc4, 0x01, 0xac, 0xa0, 0xc4, 0xb1, 0xcc, - 0x94, 0xb4, 0xf4, 0xda, 0x98, 0x39, 0x18, 0xd6, 0xca, 0x76, 0xfb, 0x0a, 0x5f, 0x31, 0x1c, 0xb1, - 0xa3, 0x7f, 0xab, 0x01, 0xb4, 0x23, 0x0c, 0xad, 0xc6, 0x8a, 0xfc, 0x72, 0x47, 0x91, 0x5f, 0x88, - 0x5e, 0x4e, 0x23, 0x05, 0xfd, 0x06, 0x4c, 0xb9, 0x32, 0xf3, 0x54, 0x30, 0xe4, 0x87, 0x6d, 0x3b, - 0xec, 0xa5, 0x21, 0x5a, 0x01, 0x44, 0xe9, 0x54, 0xf9, 0xab, 0xd0, 0xd0, 0x15, 0xd0, 0x6a, 0x6e, - 0x29, 0x68, 0x7e, 0xe7, 0x86, 0xa1, 0x5e, 0x73, 0x4b, 0x2c, 0x86, 0x39, 0x2d, 0xf6, 0x2e, 0xde, - 0x62, 0x89, 0x83, 0xde, 0x83, 0xe9, 0xe0, 0xba, 0xa1, 0xee, 0x26, 0xab, 0xc3, 0x30, 0x7b, 0xcd, - 0xc0, 0x85, 0x59, 0x51, 0x41, 0x83, 0x15, 0x1c, 0x62, 0xa2, 0x4f, 0x12, 0xb0, 0x68, 0x75, 0xce, - 0x74, 0x99, 0x23, 0xa3, 0xb5, 0xee, 0x81, 0x63, 0x77, 0xe1, 0x5f, 0xad, 0x66, 0x6e, 0xb1, 0x4b, - 0x04, 0x77, 0x9b, 0x13, 0x87, 0xa4, 0xea, 0xca, 0x2a, 0x1b, 0xce, 0x08, 0x87, 0xec, 0x35, 0x7b, - 0xf8, 0x87, 0x0c, 0x56, 0x70, 0x88, 0xa9, 0x7f, 0xa7, 0xc1, 0x6c, 0xec, 0x2e, 0xfc, 0x67, 0xc4, - 0x8c, 0x9f, 0x5a, 0x07, 0x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71, 0xff, 0x51, 0x76, 0xe2, 0xc1, 0xa3, - 0xec, 0xc4, 0xc7, 0xad, 0x6c, 0xe2, 0x5e, 0x2b, 0x9b, 0xb8, 0xdf, 0xca, 0x26, 0x1e, 0xb4, 0xb2, - 0x89, 0x5f, 0x5a, 0xd9, 0xc4, 0x67, 0xbf, 0x66, 0x27, 0xde, 0xc9, 0x0e, 0xfe, 0x93, 0xf1, 0x8f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x09, 0x76, 0xa2, 0x69, 0x9e, 0x1c, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/autoscaling/v2beta1/generated.proto", fileDescriptor_ea74040359c1ed83) +} + +var fileDescriptor_ea74040359c1ed83 = []byte{ + // 1549 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0x1b, 0xc5, + 0x17, 0x8f, 0xed, 0x4d, 0x9a, 0x3c, 0xa7, 0xf9, 0x98, 0xf6, 0xdf, 0xba, 0xe9, 0xbf, 0x76, 0xb4, + 0xfa, 0xeb, 0xaf, 0x50, 0xc1, 0xba, 0x35, 0xe1, 0x43, 0x42, 0x48, 0xc4, 0x2e, 0xd0, 0x8a, 0xb8, + 0x2d, 0x93, 0xb4, 0x42, 0xd0, 0x22, 0x26, 0xeb, 0xa9, 0xb3, 0xc4, 0xde, 0xb5, 0x76, 0xc6, 0x51, + 0x53, 0x84, 0x84, 0x90, 0xb8, 0x73, 0x81, 0x33, 0x48, 0x5c, 0x11, 0xe2, 0x02, 0x67, 0x6e, 0x3d, + 0xf6, 0xd8, 0x0a, 0x64, 0x51, 0x73, 0xe0, 0xcc, 0xb5, 0x27, 0x34, 0xb3, 0xb3, 0xeb, 0x5d, 0xdb, + 0x6b, 0x3b, 0x6e, 0x1a, 0x3e, 0xd4, 0x9b, 0x77, 0xe7, 0xbd, 0xdf, 0x9b, 0xf9, 0xbd, 0xa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50, 0xe4, 0x48, 0x08, 0xec, 0x63, 0xe9, 0x3f, 0x68, 0x70, 0x66, 0x60, 0xee, 0xa3, 0x37, 0x00, + 0x39, 0x5b, 0x8c, 0xba, 0xbb, 0xb4, 0xf2, 0xa6, 0x77, 0xe9, 0x17, 0xf7, 0x13, 0xc1, 0x71, 0xca, + 0x6b, 0x89, 0x57, 0x7a, 0x56, 0x71, 0x1f, 0x0d, 0x64, 0xc2, 0x51, 0x91, 0x0c, 0x1e, 0xa1, 0x96, + 0xba, 0x0a, 0xed, 0x2f, 0xd3, 0x16, 0xdb, 0xad, 0xdc, 0xd1, 0xf5, 0x30, 0x08, 0x8e, 0x62, 0xa2, + 0x35, 0x98, 0x57, 0xb5, 0xbe, 0x8b, 0xe0, 0x93, 0x8a, 0x81, 0xf9, 0x52, 0x74, 0x19, 0x77, 0xcb, + 0x0b, 0x88, 0x0a, 0x65, 0x96, 0x4b, 0x2b, 0x01, 0x84, 0x16, 0x85, 0xb8, 0x10, 0x5d, 0xc6, 0xdd, + 0xf2, 0xa8, 0x06, 0x73, 0x0a, 0x55, 0xf1, 0x9d, 0x99, 0x94, 0x2e, 0x7b, 0x76, 0x44, 0x97, 0x79, + 0x45, 0x37, 0x88, 0xc1, 0x52, 0x04, 0x0b, 0x77, 0x61, 0x23, 0x0e, 0x60, 0xfa, 0x25, 0x8e, 0x65, + 0xa6, 0xa4, 0xa5, 0xd7, 0xc6, 0xcc, 0xc1, 0xa0, 0x56, 0x76, 0xda, 0x57, 0xf0, 0x8a, 0xe1, 0x90, + 0x1d, 0xfd, 0x3b, 0x0d, 0xa0, 0x13, 0x61, 0x68, 0x35, 0x52, 0xe4, 0x97, 0xbb, 0x8a, 0xfc, 0x42, + 0xf8, 0x72, 0x1a, 0x2a, 0xe8, 0xd7, 0x61, 0xca, 0x91, 0x99, 0xa7, 0x82, 0xa1, 0x30, 0x6c, 0xdb, + 0x41, 0x2f, 0x0d, 0xd0, 0x8a, 0x20, 0x4a, 0xa7, 0xca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 0xc0, + 0x2c, 0x09, 0x8f, 0x63, 0x93, 0x63, 0x1d, 0x63, 0x41, 0xcc, 0x7e, 0x91, 0x39, 0x2c, 0x82, 0xaa, + 0xff, 0xd2, 0xed, 0x5b, 0xaf, 0x2a, 0xfc, 0x6d, 0x7d, 0x7b, 0x78, 0x53, 0xf1, 0xbf, 0xc2, 0xbd, + 0x5f, 0x27, 0x61, 0xa1, 0xbb, 0xb1, 0x8e, 0xf5, 0xf9, 0xe3, 0x4e, 0xdf, 0x6f, 0x38, 0xc9, 0xb1, + 0x36, 0x1d, 0xcc, 0x6a, 0x23, 0x7e, 0x9d, 0x0d, 0x7b, 0x22, 0x75, 0xe0, 0x9e, 0xd0, 0xbf, 0x89, + 0x72, 0x34, 0xfe, 0x27, 0xa2, 0x98, 0x0f, 0xaa, 0xc9, 0x43, 0xfa, 0xa0, 0xfa, 0x84, 0x69, 0xfa, + 0x36, 0x09, 0xc7, 0x9f, 0xfe, 0xa7, 0x30, 0xfa, 0xd7, 0xc7, 0x1f, 0x7b, 0xf9, 0x7a, 0xfa, 0xcf, + 0xc0, 0x28, 0x81, 0x5c, 0xbc, 0x70, 0xf7, 0x61, 0x76, 0xe2, 0xde, 0xc3, 0xec, 0xc4, 0xfd, 0x87, + 0xd9, 0x89, 0x4f, 0xda, 0xd9, 0xc4, 0xdd, 0x76, 0x36, 0x71, 0xaf, 0x9d, 0x4d, 0xdc, 0x6f, 0x67, + 0x13, 0xbf, 0xb6, 0xb3, 0x89, 0xcf, 0x7f, 0xcb, 0x4e, 0xbc, 0x9b, 0x1d, 0xfc, 0x27, 0xe3, 0x9f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x5b, 0x05, 0xaa, 0x18, 0x85, 0x1c, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto index 6b3d4152126..e2119d5550d 100644 --- a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto @@ -220,6 +220,7 @@ message HorizontalPodAutoscalerSpec { // increased, and vice-versa. See the individual metric source types for // more information about how each type of metric must respond. // +optional + // +listType=atomic repeated MetricSpec metrics = 4; } @@ -244,11 +245,13 @@ message HorizontalPodAutoscalerStatus { // currentMetrics is the last read state of the metrics used by this autoscaler. // +optional + // +listType=atomic 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. // +optional + // +listType=atomic repeated HorizontalPodAutoscalerCondition conditions = 6; } diff --git a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/types.go b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/types.go index 842284072d9..193cc43549d 100644 --- a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta1/types.go @@ -56,6 +56,7 @@ type HorizontalPodAutoscalerSpec struct { // increased, and vice-versa. See the individual metric source types for // more information about how each type of metric must respond. // +optional + // +listType=atomic Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"` } @@ -260,11 +261,13 @@ type HorizontalPodAutoscalerStatus struct { // currentMetrics is the last read state of the metrics used by this autoscaler. // +optional + // +listType=atomic 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. // +optional + // +listType=atomic Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go index 211acd1ae3f..741979505dc 100644 --- a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto +// source: k8s.io/api/autoscaling/v2beta2/generated.proto package v2beta2 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } func (*ContainerResourceMetricSource) ProtoMessage() {} func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{0} + return fileDescriptor_1076ab1fac987148, []int{0} } func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } func (*ContainerResourceMetricStatus) ProtoMessage() {} func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{1} + return fileDescriptor_1076ab1fac987148, []int{1} } func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{2} + return fileDescriptor_1076ab1fac987148, []int{2} } func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } func (*ExternalMetricSource) ProtoMessage() {} func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{3} + return fileDescriptor_1076ab1fac987148, []int{3} } func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{4} + return fileDescriptor_1076ab1fac987148, []int{4} } func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo func (m *HPAScalingPolicy) Reset() { *m = HPAScalingPolicy{} } func (*HPAScalingPolicy) ProtoMessage() {} func (*HPAScalingPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{5} + return fileDescriptor_1076ab1fac987148, []int{5} } func (m *HPAScalingPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_HPAScalingPolicy proto.InternalMessageInfo func (m *HPAScalingRules) Reset() { *m = HPAScalingRules{} } func (*HPAScalingRules) ProtoMessage() {} func (*HPAScalingRules) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{6} + return fileDescriptor_1076ab1fac987148, []int{6} } func (m *HPAScalingRules) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_HPAScalingRules proto.InternalMessageInfo func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{7} + return fileDescriptor_1076ab1fac987148, []int{7} } func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo func (m *HorizontalPodAutoscalerBehavior) Reset() { *m = HorizontalPodAutoscalerBehavior{} } func (*HorizontalPodAutoscalerBehavior) ProtoMessage() {} func (*HorizontalPodAutoscalerBehavior) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{8} + return fileDescriptor_1076ab1fac987148, []int{8} } func (m *HorizontalPodAutoscalerBehavior) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerBehavior proto.InternalMessageInfo func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{9} + return fileDescriptor_1076ab1fac987148, []int{9} } func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +330,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{10} + return fileDescriptor_1076ab1fac987148, []int{10} } func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +358,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{11} + return fileDescriptor_1076ab1fac987148, []int{11} } func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +386,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{12} + return fileDescriptor_1076ab1fac987148, []int{12} } func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +414,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo func (m *MetricIdentifier) Reset() { *m = MetricIdentifier{} } func (*MetricIdentifier) ProtoMessage() {} func (*MetricIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{13} + return fileDescriptor_1076ab1fac987148, []int{13} } func (m *MetricIdentifier) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +442,7 @@ var xxx_messageInfo_MetricIdentifier proto.InternalMessageInfo func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{14} + return fileDescriptor_1076ab1fac987148, []int{14} } func (m *MetricSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +470,7 @@ var xxx_messageInfo_MetricSpec proto.InternalMessageInfo func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{15} + return fileDescriptor_1076ab1fac987148, []int{15} } func (m *MetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +498,7 @@ var xxx_messageInfo_MetricStatus proto.InternalMessageInfo func (m *MetricTarget) Reset() { *m = MetricTarget{} } func (*MetricTarget) ProtoMessage() {} func (*MetricTarget) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{16} + return fileDescriptor_1076ab1fac987148, []int{16} } func (m *MetricTarget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +526,7 @@ var xxx_messageInfo_MetricTarget proto.InternalMessageInfo func (m *MetricValueStatus) Reset() { *m = MetricValueStatus{} } func (*MetricValueStatus) ProtoMessage() {} func (*MetricValueStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{17} + return fileDescriptor_1076ab1fac987148, []int{17} } func (m *MetricValueStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +554,7 @@ var xxx_messageInfo_MetricValueStatus proto.InternalMessageInfo func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{18} + return fileDescriptor_1076ab1fac987148, []int{18} } func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +582,7 @@ var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{19} + return fileDescriptor_1076ab1fac987148, []int{19} } func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +610,7 @@ var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{20} + return fileDescriptor_1076ab1fac987148, []int{20} } func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -638,7 +638,7 @@ var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{21} + return fileDescriptor_1076ab1fac987148, []int{21} } func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -666,7 +666,7 @@ var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{22} + return fileDescriptor_1076ab1fac987148, []int{22} } func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -694,7 +694,7 @@ var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{23} + return fileDescriptor_1076ab1fac987148, []int{23} } func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -747,120 +747,119 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto", fileDescriptor_592ad94d7d6be24f) + proto.RegisterFile("k8s.io/api/autoscaling/v2beta2/generated.proto", fileDescriptor_1076ab1fac987148) } -var fileDescriptor_592ad94d7d6be24f = []byte{ - // 1743 bytes of a gzipped FileDescriptorProto +var fileDescriptor_1076ab1fac987148 = []byte{ + // 1727 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, 0x15, 0xd7, 0x92, 0xd4, 0xd7, 0x50, 0x9f, 0xe3, 0x2f, 0x42, 0x86, 0x49, 0x61, 0x6b, 0xb4, 0xae, - 0xd1, 0x2e, 0x2b, 0x56, 0x6d, 0x0d, 0x18, 0x45, 0xab, 0x95, 0x5b, 0xdb, 0xb0, 0x64, 0xab, 0x43, - 0x59, 0x2d, 0x0a, 0xd9, 0xe8, 0x70, 0x77, 0x44, 0x4d, 0x45, 0xee, 0x12, 0xbb, 0x4b, 0xda, 0x72, + 0xd1, 0x2e, 0x2b, 0x56, 0x6d, 0x0d, 0x18, 0x45, 0xab, 0x95, 0xdb, 0xda, 0xb0, 0x64, 0xab, 0x43, + 0x59, 0x2d, 0x02, 0xd9, 0xc8, 0x70, 0x77, 0x44, 0x4d, 0x44, 0xee, 0x12, 0xbb, 0x4b, 0xda, 0x72, 0x80, 0x20, 0x08, 0x90, 0x7b, 0x90, 0x20, 0xd7, 0xfc, 0x09, 0x09, 0x7c, 0x09, 0x90, 0x63, 0x3e, 0x60, 0x18, 0x41, 0x10, 0xf8, 0x16, 0xe7, 0x42, 0xc4, 0xcc, 0x31, 0xc7, 0xdc, 0x7c, 0x0a, 0xe6, 0x63, 0x3f, 0x49, 0x89, 0x94, 0x20, 0x29, 0xd0, 0x8d, 0x3b, 0xf3, 0xde, 0xef, 0xcd, 0x7b, 0xf3, - 0x7b, 0x6f, 0xde, 0x0c, 0xc1, 0xcd, 0x9d, 0x6b, 0xae, 0x46, 0xed, 0xe2, 0x4e, 0xb3, 0x42, 0x1c, - 0x8b, 0x78, 0xc4, 0x2d, 0xb6, 0x88, 0x65, 0xda, 0x4e,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 0x02, 0x54, 0x78, 0x1f, 0x64, 0xdc, 0x06, 0x31, 0x24, 0x55, 0xaf, 0xf7, + 0xf5, 0xac, 0xf7, 0x42, 0xcb, 0x0d, 0x62, 0x84, 0xc5, 0x87, 0x7d, 0x21, 0x0e, 0x0b, 0x09, 0x18, + 0x71, 0x39, 0xa5, 0xf9, 0xae, 0x66, 0x4b, 0x7f, 0x3f, 0xac, 0x01, 0x91, 0x17, 0x41, 0xce, 0x89, + 0x6f, 0x24, 0xc1, 0xd5, 0xef, 0x14, 0x50, 0xd8, 0x43, 0x53, 0x27, 0xdb, 0xb8, 0x45, 0x6d, 0x07, + 0x6e, 0x80, 0x51, 0x3e, 0x72, 0xaf, 0x21, 0x43, 0x59, 0x1c, 0x7c, 0x1b, 0x39, 0x6d, 0xf5, 0x2c, + 0xcb, 0xc8, 0xb2, 0xc0, 0x40, 0x3e, 0x18, 0xdc, 0x04, 0xe3, 0xfc, 0xe7, 0x0d, 0xfb, 0xa1, 0x25, + 0xc3, 0x78, 0x60, 0xe4, 0x49, 0x76, 0x42, 0x94, 0x7d, 0x14, 0x14, 0x02, 0xaa, 0xef, 0xa6, 0xc1, + 0xfc, 0x1e, 0x9e, 0x2d, 0xdb, 0x96, 0x49, 0x19, 0xf9, 0xe1, 0xcd, 0x58, 0xfe, 0x2f, 0x26, 0xf2, + 0xff, 0x72, 0x3f, 0xfd, 0x48, 0x3d, 0x58, 0x09, 0xf6, 0x2b, 0x15, 0xc3, 0x92, 0x01, 0x7f, 0xd5, + 0x2e, 0xf4, 0xe8, 0xc7, 0xb4, 0x00, 0x29, 0xbe, 0x2d, 0xb0, 0x05, 0x60, 0x0d, 0xbb, 0xde, 0xba, + 0x83, 0x2d, 0x57, 0x58, 0xa2, 0x75, 0x22, 0x99, 0x70, 0x75, 0x30, 0x22, 0x33, 0x0d, 0x7d, 0x4e, + 0xae, 0x02, 0xae, 0x74, 0xa1, 0xa1, 0x1e, 0x16, 0xe0, 0x6f, 0xc1, 0x88, 0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0xa7, 0xd1, 0x6f, 0x3c, 0x7b, 0x99, 0x1f, 0x7a, 0xfe, 0x32, 0x3f, + 0xf4, 0xe2, 0x65, 0x7e, 0xe8, 0xed, 0x4e, 0x5e, 0x79, 0xd6, 0xc9, 0x2b, 0xcf, 0x3b, 0x79, 0xe5, + 0x45, 0x27, 0xaf, 0xfc, 0xd0, 0xc9, 0x2b, 0xef, 0xfd, 0x98, 0x1f, 0x7a, 0x2d, 0xbf, 0xff, 0x1f, + 0x9f, 0xbf, 0x04, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x27, 0xde, 0xc0, 0x19, 0x1d, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto index 5b2fe9442aa..41f7a16ea12 100644 --- a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto @@ -136,6 +136,7 @@ message HPAScalingRules { // policies is a list of potential scaling polices which can be used during scaling. // At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid // +optional + // +listType=atomic repeated HPAScalingPolicy policies = 2; } @@ -238,6 +239,7 @@ message HorizontalPodAutoscalerSpec { // more information about how each type of metric must respond. // If not set, the default metric will be set to 80% average CPU utilization. // +optional + // +listType=atomic repeated MetricSpec metrics = 4; // behavior configures the scaling behavior of the target @@ -268,11 +270,13 @@ message HorizontalPodAutoscalerStatus { // currentMetrics is the last read state of the metrics used by this autoscaler. // +optional + // +listType=atomic 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. // +optional + // +listType=atomic repeated HorizontalPodAutoscalerCondition conditions = 6; } diff --git a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/types.go b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/types.go index b0b7681c0eb..2fee0b8a0f0 100644 --- a/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/types.go +++ b/pkg/k8s/vendor/k8s.io/api/autoscaling/v2beta2/types.go @@ -76,6 +76,7 @@ type HorizontalPodAutoscalerSpec struct { // more information about how each type of metric must respond. // If not set, the default metric will be set to 80% average CPU utilization. // +optional + // +listType=atomic Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"` // behavior configures the scaling behavior of the target @@ -199,6 +200,7 @@ type HPAScalingRules struct { // policies is a list of potential scaling polices which can be used during scaling. // At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid // +optional + // +listType=atomic Policies []HPAScalingPolicy `json:"policies,omitempty" protobuf:"bytes,2,rep,name=policies"` } @@ -393,11 +395,13 @@ type HorizontalPodAutoscalerStatus struct { // currentMetrics is the last read state of the metrics used by this autoscaler. // +optional + // +listType=atomic 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. // +optional + // +listType=atomic Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/pkg/k8s/vendor/k8s.io/api/batch/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/batch/v1/generated.pb.go index 59a7482a0d2..6108a60839f 100644 --- a/pkg/k8s/vendor/k8s.io/api/batch/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/batch/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/batch/v1/generated.proto +// source: k8s.io/api/batch/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CronJob) Reset() { *m = CronJob{} } func (*CronJob) ProtoMessage() {} func (*CronJob) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{0} + return fileDescriptor_79228dc2c4001a22, []int{0} } func (m *CronJob) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_CronJob proto.InternalMessageInfo func (m *CronJobList) Reset() { *m = CronJobList{} } func (*CronJobList) ProtoMessage() {} func (*CronJobList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{1} + return fileDescriptor_79228dc2c4001a22, []int{1} } func (m *CronJobList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_CronJobList proto.InternalMessageInfo func (m *CronJobSpec) Reset() { *m = CronJobSpec{} } func (*CronJobSpec) ProtoMessage() {} func (*CronJobSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{2} + return fileDescriptor_79228dc2c4001a22, []int{2} } func (m *CronJobSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_CronJobSpec proto.InternalMessageInfo func (m *CronJobStatus) Reset() { *m = CronJobStatus{} } func (*CronJobStatus) ProtoMessage() {} func (*CronJobStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{3} + return fileDescriptor_79228dc2c4001a22, []int{3} } func (m *CronJobStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_CronJobStatus proto.InternalMessageInfo func (m *Job) Reset() { *m = Job{} } func (*Job) ProtoMessage() {} func (*Job) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{4} + return fileDescriptor_79228dc2c4001a22, []int{4} } func (m *Job) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_Job proto.InternalMessageInfo func (m *JobCondition) Reset() { *m = JobCondition{} } func (*JobCondition) ProtoMessage() {} func (*JobCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{5} + return fileDescriptor_79228dc2c4001a22, []int{5} } func (m *JobCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_JobCondition proto.InternalMessageInfo func (m *JobList) Reset() { *m = JobList{} } func (*JobList) ProtoMessage() {} func (*JobList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{6} + return fileDescriptor_79228dc2c4001a22, []int{6} } func (m *JobList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_JobList proto.InternalMessageInfo func (m *JobSpec) Reset() { *m = JobSpec{} } func (*JobSpec) ProtoMessage() {} func (*JobSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{7} + return fileDescriptor_79228dc2c4001a22, []int{7} } func (m *JobSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_JobSpec proto.InternalMessageInfo func (m *JobStatus) Reset() { *m = JobStatus{} } func (*JobStatus) ProtoMessage() {} func (*JobStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{8} + return fileDescriptor_79228dc2c4001a22, []int{8} } func (m *JobStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_JobStatus proto.InternalMessageInfo func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} } func (*JobTemplateSpec) ProtoMessage() {} func (*JobTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{9} + return fileDescriptor_79228dc2c4001a22, []int{9} } func (m *JobTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_JobTemplateSpec proto.InternalMessageInfo func (m *PodFailurePolicy) Reset() { *m = PodFailurePolicy{} } func (*PodFailurePolicy) ProtoMessage() {} func (*PodFailurePolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{10} + return fileDescriptor_79228dc2c4001a22, []int{10} } func (m *PodFailurePolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -361,7 +361,7 @@ func (m *PodFailurePolicyOnExitCodesRequirement) Reset() { } func (*PodFailurePolicyOnExitCodesRequirement) ProtoMessage() {} func (*PodFailurePolicyOnExitCodesRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{11} + return fileDescriptor_79228dc2c4001a22, []int{11} } func (m *PodFailurePolicyOnExitCodesRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -391,7 +391,7 @@ func (m *PodFailurePolicyOnPodConditionsPattern) Reset() { } func (*PodFailurePolicyOnPodConditionsPattern) ProtoMessage() {} func (*PodFailurePolicyOnPodConditionsPattern) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{12} + return fileDescriptor_79228dc2c4001a22, []int{12} } func (m *PodFailurePolicyOnPodConditionsPattern) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -419,7 +419,7 @@ var xxx_messageInfo_PodFailurePolicyOnPodConditionsPattern proto.InternalMessage func (m *PodFailurePolicyRule) Reset() { *m = PodFailurePolicyRule{} } func (*PodFailurePolicyRule) ProtoMessage() {} func (*PodFailurePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{13} + return fileDescriptor_79228dc2c4001a22, []int{13} } func (m *PodFailurePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,10 +444,66 @@ func (m *PodFailurePolicyRule) XXX_DiscardUnknown() { var xxx_messageInfo_PodFailurePolicyRule proto.InternalMessageInfo +func (m *SuccessPolicy) Reset() { *m = SuccessPolicy{} } +func (*SuccessPolicy) ProtoMessage() {} +func (*SuccessPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_79228dc2c4001a22, []int{14} +} +func (m *SuccessPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SuccessPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SuccessPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_SuccessPolicy.Merge(m, src) +} +func (m *SuccessPolicy) XXX_Size() int { + return m.Size() +} +func (m *SuccessPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_SuccessPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_SuccessPolicy proto.InternalMessageInfo + +func (m *SuccessPolicyRule) Reset() { *m = SuccessPolicyRule{} } +func (*SuccessPolicyRule) ProtoMessage() {} +func (*SuccessPolicyRule) Descriptor() ([]byte, []int) { + return fileDescriptor_79228dc2c4001a22, []int{15} +} +func (m *SuccessPolicyRule) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SuccessPolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SuccessPolicyRule) XXX_Merge(src proto.Message) { + xxx_messageInfo_SuccessPolicyRule.Merge(m, src) +} +func (m *SuccessPolicyRule) XXX_Size() int { + return m.Size() +} +func (m *SuccessPolicyRule) XXX_DiscardUnknown() { + xxx_messageInfo_SuccessPolicyRule.DiscardUnknown(m) +} + +var xxx_messageInfo_SuccessPolicyRule proto.InternalMessageInfo + func (m *UncountedTerminatedPods) Reset() { *m = UncountedTerminatedPods{} } func (*UncountedTerminatedPods) ProtoMessage() {} func (*UncountedTerminatedPods) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{14} + return fileDescriptor_79228dc2c4001a22, []int{16} } func (m *UncountedTerminatedPods) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -487,128 +543,135 @@ func init() { proto.RegisterType((*PodFailurePolicyOnExitCodesRequirement)(nil), "k8s.io.api.batch.v1.PodFailurePolicyOnExitCodesRequirement") proto.RegisterType((*PodFailurePolicyOnPodConditionsPattern)(nil), "k8s.io.api.batch.v1.PodFailurePolicyOnPodConditionsPattern") proto.RegisterType((*PodFailurePolicyRule)(nil), "k8s.io.api.batch.v1.PodFailurePolicyRule") + proto.RegisterType((*SuccessPolicy)(nil), "k8s.io.api.batch.v1.SuccessPolicy") + proto.RegisterType((*SuccessPolicyRule)(nil), "k8s.io.api.batch.v1.SuccessPolicyRule") proto.RegisterType((*UncountedTerminatedPods)(nil), "k8s.io.api.batch.v1.UncountedTerminatedPods") } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/batch/v1/generated.proto", fileDescriptor_3b52da57c93de713) -} - -var fileDescriptor_3b52da57c93de713 = []byte{ - // 1797 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0x23, 0x49, - 0x15, 0x8f, 0x93, 0x38, 0xb1, 0xcb, 0xf9, 0xf0, 0xd4, 0x64, 0x66, 0x4c, 0x58, 0xb9, 0xb3, 0x9e, - 0xdd, 0x55, 0x16, 0x2d, 0xed, 0x9d, 0xec, 0x88, 0xe5, 0x5b, 0x3b, 0x9d, 0x61, 0x96, 0x09, 0xce, - 0x8e, 0x29, 0x67, 0x40, 0x5a, 0x16, 0x44, 0xb9, 0xbb, 0xec, 0xf4, 0xa6, 0xdd, 0xd5, 0x74, 0x55, - 0x47, 0x93, 0x0b, 0x42, 0xe2, 0x0f, 0x80, 0xbf, 0x82, 0x23, 0x17, 0x38, 0xc3, 0x0d, 0xcd, 0x71, - 0xc5, 0x69, 0xc5, 0xa1, 0xc5, 0x34, 0x7f, 0x00, 0xf7, 0x20, 0x24, 0x54, 0xd5, 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0x2c, 0xe9, 0xfa, 0xa9, 0xdc, 0x5f, 0x8f, 0x4b, 0x85, 0x1b, 0xdf, 0x78, 0xfe, 0xa2, - 0xbb, 0xf4, 0xd9, 0x8b, 0xee, 0xd2, 0xe7, 0x2f, 0xba, 0x4b, 0xbf, 0x8a, 0xba, 0xb5, 0xe7, 0x51, - 0xb7, 0xf6, 0x59, 0xd4, 0xad, 0x7d, 0x1e, 0x75, 0x6b, 0x7f, 0x8f, 0xba, 0xb5, 0xdf, 0xfe, 0xa3, - 0xbb, 0xf4, 0xf1, 0xcd, 0x92, 0xdf, 0x71, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x43, 0xdf, 0xa6, - 0x7c, 0xf6, 0x15, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/batch/v1/generated.proto", fileDescriptor_79228dc2c4001a22) +} + +var fileDescriptor_79228dc2c4001a22 = []byte{ + // 1882 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0x37, 0x6d, 0xcb, 0x96, 0x46, 0xfe, 0x90, 0x27, 0x4e, 0xa2, 0xba, 0x0b, 0xd1, 0xab, 0xec, + 0x06, 0xde, 0x76, 0x2b, 0x6d, 0xbc, 0x41, 0xb7, 0x1f, 0x68, 0xb1, 0xa1, 0xd2, 0x6c, 0xe3, 0x95, + 0x37, 0xea, 0xc8, 0x69, 0x81, 0xdd, 0xb4, 0xe8, 0x88, 0x1c, 0xc9, 0xdc, 0x50, 0x1c, 0x96, 0x1c, + 0x1a, 0xf1, 0xa5, 0x28, 0xd0, 0x7f, 0xa0, 0x3d, 0xf6, 0x1f, 0xe8, 0xb1, 0x97, 0xf6, 0xdc, 0xde, + 0x8a, 0x1c, 0x17, 0x3d, 0x2d, 0x7a, 0x20, 0x1a, 0xf6, 0x0f, 0xe8, 0xdd, 0x45, 0x81, 0x62,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7b, 0x34, 0xf9, 0x94, 0xe8, 0xec, 0x98, 0x30, 0xac, 0xc1, 0xe7, 0x81, 0xba, 0x14, + 0x06, 0x2a, 0x48, 0x65, 0x28, 0x61, 0x85, 0x1a, 0x58, 0xf5, 0x1c, 0xa2, 0xb7, 0x97, 0x05, 0xfb, + 0x7e, 0xaf, 0x24, 0x06, 0x3d, 0xe9, 0xcd, 0xd8, 0x21, 0xba, 0xb6, 0x21, 0xd9, 0x56, 0xf9, 0x13, + 0x12, 0xb6, 0xf0, 0x08, 0xac, 0x79, 0x0c, 0x33, 0xdf, 0x6b, 0xaf, 0x08, 0x96, 0xee, 0xa5, 0x2c, + 0x02, 0xa9, 0x6d, 0x49, 0x9e, 0xb5, 0xe8, 0x19, 0x49, 0x86, 0xee, 0x1f, 0x14, 0xd0, 0x94, 0xc8, + 0xa1, 0xe9, 0x31, 0xf8, 0x64, 0xe1, 0x06, 0x7a, 0x57, 0xbb, 0x01, 0x6e, 0x2d, 0xde, 0xbf, 0x25, + 0x4f, 0xaa, 0xc7, 0x92, 0xcc, 0xdb, 0xdf, 0x03, 0x35, 0x93, 0x91, 0xb9, 0xd7, 0x5e, 0xde, 0x5f, + 0x39, 0x68, 0x1e, 0xbe, 0x76, 0x99, 0xe3, 0xda, 0xa6, 0x24, 0xaa, 0x3d, 0xe4, 0x26, 0x28, 0xb2, + 0xec, 0xfe, 0x6d, 0x35, 0x71, 0x98, 0x5f, 0x09, 0x7c, 0x1b, 0xd4, 0x79, 0x60, 0x0d, 0xdf, 0x22, + 0xc2, 0xe1, 0x46, 0xea, 0xc0, 0x58, 0xca, 0x51, 0x82, 0x80, 0x07, 0xa0, 0xce, 0x73, 0xe1, 0x63, + 0x6a, 0x93, 0x76, 0x5d, 0xa0, 0x37, 0x38, 0xf2, 0x44, 0xca, 0x50, 0xa2, 0x85, 0x8f, 0xc1, 0x4d, + 0x8f, 0x61, 0x97, 0x99, 0xf6, 0xec, 0x3e, 0xc1, 0x86, 0x65, 0xda, 0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x2f, 0x9f, 0x97, 0xd4, 0xd1, 0x6f, 0x15, 0xb0, 0xb3, 0x80, 0xe5, + 0x6b, 0x60, 0x32, 0x05, 0xe2, 0xd6, 0x1a, 0xc5, 0x4b, 0xac, 0x81, 0xe3, 0x82, 0x0e, 0x2d, 0xa0, + 0xf9, 0x9e, 0x96, 0xc8, 0x06, 0xbc, 0xf9, 0xc9, 0x2f, 0x03, 0x31, 0xcf, 0xc6, 0x39, 0x0d, 0x2a, + 0x20, 0xbb, 0x7f, 0x52, 0x40, 0x55, 0x2f, 0x85, 0xa3, 0xec, 0x0c, 0xe3, 0x17, 0xd0, 0xd0, 0x0e, + 0x73, 0xf3, 0xeb, 0x22, 0x50, 0x5f, 0xaf, 0xfa, 0xcb, 0x96, 0x27, 0xba, 0xd7, 0x7b, 0xfc, 0xf0, + 0x7e, 0x76, 0xc8, 0x7d, 0x90, 0x0c, 0xb9, 0x65, 0x41, 0xd7, 0x4f, 0x07, 0xdc, 0xd5, 0xb8, 0xa4, + 0xb9, 0xf6, 0xed, 0xe7, 0x2f, 0x3a, 0x4b, 0x9f, 0xbd, 0xe8, 0x2c, 0x7d, 0xfe, 0xa2, 0xb3, 0xf4, + 0xab, 0xb0, 0xa3, 0x3c, 0x0f, 0x3b, 0xca, 0x67, 0x61, 0x47, 0xf9, 0x3c, 0xec, 0x28, 0xff, 0x08, + 0x3b, 0xca, 0x6f, 0xfe, 0xd9, 0x59, 0xfa, 0xf8, 0x5a, 0xc9, 0x7f, 0xe8, 0xff, 0x0d, 0x00, 0x00, + 0xff, 0xff, 0x1e, 0x70, 0x68, 0xe1, 0x59, 0x17, 0x00, 0x00, } func (m *CronJob) Marshal() (dAtA []byte, err error) { @@ -1030,6 +1093,27 @@ func (m *JobSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SuccessPolicy != nil { + { + size, err := m.SuccessPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if m.ManagedBy != nil { + i -= len(*m.ManagedBy) + copy(dAtA[i:], *m.ManagedBy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ManagedBy))) + i-- + dAtA[i] = 0x7a + } if m.PodReplacementPolicy != nil { i -= len(*m.PodReplacementPolicy) copy(dAtA[i:], *m.PodReplacementPolicy) @@ -1449,6 +1533,78 @@ func (m *PodFailurePolicyRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SuccessPolicy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SuccessPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SuccessPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Rules) > 0 { + for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SuccessPolicyRule) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SuccessPolicyRule) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SuccessPolicyRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SucceededCount != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.SucceededCount)) + i-- + dAtA[i] = 0x10 + } + if m.SucceededIndexes != nil { + i -= len(*m.SucceededIndexes) + copy(dAtA[i:], *m.SucceededIndexes) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SucceededIndexes))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *UncountedTerminatedPods) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1691,6 +1847,14 @@ func (m *JobSpec) Size() (n int) { l = len(*m.PodReplacementPolicy) n += 1 + l + sovGenerated(uint64(l)) } + if m.ManagedBy != nil { + l = len(*m.ManagedBy) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.SuccessPolicy != nil { + l = m.SuccessPolicy.Size() + n += 2 + l + sovGenerated(uint64(l)) + } return n } @@ -1818,6 +1982,37 @@ func (m *PodFailurePolicyRule) Size() (n int) { return n } +func (m *SuccessPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *SuccessPolicyRule) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SucceededIndexes != nil { + l = len(*m.SucceededIndexes) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.SucceededCount != nil { + n += 1 + sovGenerated(uint64(*m.SucceededCount)) + } + return n +} + func (m *UncountedTerminatedPods) Size() (n int) { if m == nil { return 0 @@ -1969,6 +2164,8 @@ func (this *JobSpec) String() string { `BackoffLimitPerIndex:` + valueToStringGenerated(this.BackoffLimitPerIndex) + `,`, `MaxFailedIndexes:` + valueToStringGenerated(this.MaxFailedIndexes) + `,`, `PodReplacementPolicy:` + valueToStringGenerated(this.PodReplacementPolicy) + `,`, + `ManagedBy:` + valueToStringGenerated(this.ManagedBy) + `,`, + `SuccessPolicy:` + strings.Replace(this.SuccessPolicy.String(), "SuccessPolicy", "SuccessPolicy", 1) + `,`, `}`, }, "") return s @@ -2064,6 +2261,32 @@ func (this *PodFailurePolicyRule) String() string { }, "") return s } +func (this *SuccessPolicy) String() string { + if this == nil { + return "nil" + } + repeatedStringForRules := "[]SuccessPolicyRule{" + for _, f := range this.Rules { + repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "SuccessPolicyRule", "SuccessPolicyRule", 1), `&`, ``, 1) + "," + } + repeatedStringForRules += "}" + s := strings.Join([]string{`&SuccessPolicy{`, + `Rules:` + repeatedStringForRules + `,`, + `}`, + }, "") + return s +} +func (this *SuccessPolicyRule) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SuccessPolicyRule{`, + `SucceededIndexes:` + valueToStringGenerated(this.SucceededIndexes) + `,`, + `SucceededCount:` + valueToStringGenerated(this.SucceededCount) + `,`, + `}`, + }, "") + return s +} func (this *UncountedTerminatedPods) String() string { if this == nil { return "nil" @@ -3658,6 +3881,75 @@ func (m *JobSpec) Unmarshal(dAtA []byte) error { s := PodReplacementPolicy(dAtA[iNdEx:postIndex]) m.PodReplacementPolicy = &s iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ManagedBy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.ManagedBy = &s + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SuccessPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SuccessPolicy == nil { + m.SuccessPolicy = &SuccessPolicy{} + } + if err := m.SuccessPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -4690,6 +4982,193 @@ func (m *PodFailurePolicyRule) Unmarshal(dAtA []byte) error { } return nil } +func (m *SuccessPolicy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SuccessPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SuccessPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, SuccessPolicyRule{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SuccessPolicyRule) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SuccessPolicyRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SuccessPolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SucceededIndexes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.SucceededIndexes = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SucceededCount", 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.SucceededCount = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *UncountedTerminatedPods) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/pkg/k8s/vendor/k8s.io/api/batch/v1/generated.proto b/pkg/k8s/vendor/k8s.io/api/batch/v1/generated.proto index f8997798892..833b118d00e 100644 --- a/pkg/k8s/vendor/k8s.io/api/batch/v1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/batch/v1/generated.proto @@ -218,6 +218,17 @@ message JobSpec { // +optional optional PodFailurePolicy podFailurePolicy = 11; + // successPolicy specifies the policy when the Job can be declared as succeeded. + // If empty, the default behavior applies - the Job is declared as succeeded + // only when the number of succeeded pods equals to the completions. + // When the field is specified, it must be immutable and works only for the Indexed Jobs. + // Once the Job meets the SuccessPolicy, the lingering pods are terminated. + // + // This field is alpha-level. To use this field, you must enable the + // `JobSuccessPolicy` feature gate (disabled by default). + // +optional + optional SuccessPolicy successPolicy = 16; + // Specifies the number of retries before marking this job failed. // Defaults to 6 // +optional @@ -330,6 +341,20 @@ message JobSpec { // This is on by default. // +optional optional string podReplacementPolicy = 14; + + // ManagedBy field indicates the controller that manages a Job. The k8s Job + // controller reconciles jobs which don't have this field at all or the field + // value is the reserved string `kubernetes.io/job-controller`, but skips + // reconciling Jobs with a custom value for this field. + // The value must be a valid domain-prefixed path (e.g. acme.io/foo) - + // all characters before the first "/" must be a valid subdomain as defined + // by RFC 1123. All characters trailing the first "/" must be valid HTTP Path + // characters as defined by RFC 3986. The value cannot exceed 64 characters. + // + // This field is alpha-level. The job controller accepts setting the field + // when the feature gate JobManagedBy is enabled (disabled by default). + // +optional + optional string managedBy = 15; } // JobStatus represents the current state of a Job. @@ -340,6 +365,12 @@ message JobStatus { // status true; when the Job is resumed, the status of this condition will // become false. When a Job is completed, one of the conditions will have // type "Complete" and status true. + // + // A job is considered finished when it is in a terminal condition, either + // "Complete" or "Failed". A Job cannot have both the "Complete" and "Failed" conditions. + // Additionally, it cannot be in the "Complete" and "FailureTarget" conditions. + // The "Complete", "Failed" and "FailureTarget" conditions cannot be disabled. + // // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ // +optional // +patchMergeKey=type @@ -351,25 +382,36 @@ message JobStatus { // Job is created in the suspended state, this field is not set until the // first time it is resumed. This field is reset every time a Job is resumed // from suspension. It is represented in RFC3339 form and is in UTC. + // + // Once set, the field can only be removed when the job is suspended. + // The field cannot be modified while the job is unsuspended or finished. + // // +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. - // The completion time is only set when the job finishes successfully. + // The completion time is set when the job finishes successfully, and only then. + // The value cannot be updated or removed. The value indicates the same or + // later point in time as the startTime field. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3; - // The number of pending and running pods. + // The number of pending and running pods which are not terminating (without + // a deletionTimestamp). + // The value is zero for finished jobs. // +optional optional int32 active = 4; // The number of pods which reached phase Succeeded. + // The value increases monotonically for a given spec. However, it may + // decrease in reaction to scale down of elastic indexed jobs. // +optional optional int32 succeeded = 5; // The number of pods which reached phase Failed. + // The value increases monotonically. // +optional optional int32 failed = 6; @@ -391,7 +433,7 @@ message JobStatus { // +optional optional string completedIndexes = 7; - // FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. + // FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. // The indexes are represented in the text format analogous as for the // `completedIndexes` field, ie. they are kept as decimal integers // separated by commas. The numbers are listed in increasing order. Three or @@ -399,6 +441,8 @@ message JobStatus { // last element of the series, separated by a hyphen. // For example, if the failed indexes are 1, 3, 4, 5 and 7, they are // represented as "1,3-5,7". + // The set of failed indexes cannot overlap with the set of completed indexes. + // // This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` // feature gate is enabled (enabled by default). // +optional @@ -418,6 +462,7 @@ message JobStatus { // // Old jobs might not be tracked using this field, in which case the field // remains null. + // The structure is empty for finished jobs. // +optional optional UncountedTerminatedPods uncountedTerminatedPods = 8; @@ -532,6 +577,51 @@ message PodFailurePolicyRule { repeated PodFailurePolicyOnPodConditionsPattern onPodConditions = 3; } +// SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes. +message SuccessPolicy { + // rules represents the list of alternative rules for the declaring the Jobs + // as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, + // the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. + // The terminal state for such a Job has the "Complete" condition. + // Additionally, these rules are evaluated in order; Once the Job meets one of the rules, + // other rules are ignored. At most 20 elements are allowed. + // +listType=atomic + repeated SuccessPolicyRule rules = 1; +} + +// SuccessPolicyRule describes rule for declaring a Job as succeeded. +// Each rule must have at least one of the "succeededIndexes" or "succeededCount" specified. +message SuccessPolicyRule { + // succeededIndexes specifies the set of indexes + // which need to be contained in the actual set of the succeeded indexes for the Job. + // The list of indexes must be within 0 to ".spec.completions-1" and + // must not contain duplicates. At least one element is required. + // The indexes are represented as intervals separated by commas. + // The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. + // The number are listed in represented by the first and last element of the series, + // separated by a hyphen. + // For example, if the completed indexes are 1, 3, 4, 5 and 7, they are + // represented as "1,3-5,7". + // When this field is null, this field doesn't default to any value + // and is never evaluated at any time. + // + // +optional + optional string succeededIndexes = 1; + + // succeededCount specifies the minimal required size of the actual set of the succeeded indexes + // for the Job. When succeededCount is used along with succeededIndexes, the check is + // constrained only to the set of indexes specified by succeededIndexes. + // For example, given that succeededIndexes is "1-4", succeededCount is "3", + // and completed indexes are "1", "3", and "5", the Job isn't declared as succeeded + // because only "1" and "3" indexes are considered in that rules. + // When this field is null, this doesn't default to any value and + // is never evaluated at any time. + // When specified it needs to be a positive integer. + // + // +optional + optional int32 succeededCount = 2; +} + // UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't // been accounted in Job status counters. message UncountedTerminatedPods { diff --git a/pkg/k8s/vendor/k8s.io/api/batch/v1/types.go b/pkg/k8s/vendor/k8s.io/api/batch/v1/types.go index 65e1d3c5929..49b0ec6441d 100644 --- a/pkg/k8s/vendor/k8s.io/api/batch/v1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/batch/v1/types.go @@ -57,6 +57,9 @@ const ( // to the pod, which don't count towards the backoff limit, according to the // pod failure policy. When the annotation is absent zero is implied. JobIndexIgnoredFailureCountAnnotation = labelPrefix + "job-index-ignored-failure-count" + // JobControllerName reserved value for the managedBy field for the built-in + // Job controller. + JobControllerName = "kubernetes.io/job-controller" ) // +genclient @@ -171,7 +174,7 @@ type PodFailurePolicyOnExitCodesRequirement struct { // When specified, it should match one the container or initContainer // names in the pod template. // +optional - ContainerName *string `json:"containerName,omitempty" protobuf:"bytes,1,opt,name=containerName"` + ContainerName *string `json:"containerName" protobuf:"bytes,1,opt,name=containerName"` // Represents the relationship between the container exit code(s) and the // specified values. Containers completed with success (exit code 0) are @@ -231,14 +234,14 @@ type PodFailurePolicyRule struct { // Represents the requirement on the container exit codes. // +optional - OnExitCodes *PodFailurePolicyOnExitCodesRequirement `json:"onExitCodes,omitempty" protobuf:"bytes,2,opt,name=onExitCodes"` + OnExitCodes *PodFailurePolicyOnExitCodesRequirement `json:"onExitCodes" protobuf:"bytes,2,opt,name=onExitCodes"` // Represents the requirement on the pod conditions. The requirement is represented // as a list of pod condition patterns. The requirement is satisfied if at // least one pattern matches an actual pod condition. At most 20 elements are allowed. // +listType=atomic // +optional - OnPodConditions []PodFailurePolicyOnPodConditionsPattern `json:"onPodConditions,omitempty" protobuf:"bytes,3,opt,name=onPodConditions"` + OnPodConditions []PodFailurePolicyOnPodConditionsPattern `json:"onPodConditions" protobuf:"bytes,3,opt,name=onPodConditions"` } // PodFailurePolicy describes how failed pods influence the backoffLimit. @@ -252,6 +255,51 @@ type PodFailurePolicy struct { Rules []PodFailurePolicyRule `json:"rules" protobuf:"bytes,1,opt,name=rules"` } +// SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes. +type SuccessPolicy struct { + // rules represents the list of alternative rules for the declaring the Jobs + // as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, + // the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. + // The terminal state for such a Job has the "Complete" condition. + // Additionally, these rules are evaluated in order; Once the Job meets one of the rules, + // other rules are ignored. At most 20 elements are allowed. + // +listType=atomic + Rules []SuccessPolicyRule `json:"rules" protobuf:"bytes,1,opt,name=rules"` +} + +// SuccessPolicyRule describes rule for declaring a Job as succeeded. +// Each rule must have at least one of the "succeededIndexes" or "succeededCount" specified. +type SuccessPolicyRule struct { + // succeededIndexes specifies the set of indexes + // which need to be contained in the actual set of the succeeded indexes for the Job. + // The list of indexes must be within 0 to ".spec.completions-1" and + // must not contain duplicates. At least one element is required. + // The indexes are represented as intervals separated by commas. + // The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. + // The number are listed in represented by the first and last element of the series, + // separated by a hyphen. + // For example, if the completed indexes are 1, 3, 4, 5 and 7, they are + // represented as "1,3-5,7". + // When this field is null, this field doesn't default to any value + // and is never evaluated at any time. + // + // +optional + SucceededIndexes *string `json:"succeededIndexes,omitempty" protobuf:"bytes,1,opt,name=succeededIndexes"` + + // succeededCount specifies the minimal required size of the actual set of the succeeded indexes + // for the Job. When succeededCount is used along with succeededIndexes, the check is + // constrained only to the set of indexes specified by succeededIndexes. + // For example, given that succeededIndexes is "1-4", succeededCount is "3", + // and completed indexes are "1", "3", and "5", the Job isn't declared as succeeded + // because only "1" and "3" indexes are considered in that rules. + // When this field is null, this doesn't default to any value and + // is never evaluated at any time. + // When specified it needs to be a positive integer. + // + // +optional + SucceededCount *int32 `json:"succeededCount,omitempty" protobuf:"varint,2,opt,name=succeededCount"` +} + // JobSpec describes how the job execution will look like. type JobSpec struct { @@ -293,6 +341,17 @@ type JobSpec struct { // +optional PodFailurePolicy *PodFailurePolicy `json:"podFailurePolicy,omitempty" protobuf:"bytes,11,opt,name=podFailurePolicy"` + // successPolicy specifies the policy when the Job can be declared as succeeded. + // If empty, the default behavior applies - the Job is declared as succeeded + // only when the number of succeeded pods equals to the completions. + // When the field is specified, it must be immutable and works only for the Indexed Jobs. + // Once the Job meets the SuccessPolicy, the lingering pods are terminated. + // + // This field is alpha-level. To use this field, you must enable the + // `JobSuccessPolicy` feature gate (disabled by default). + // +optional + SuccessPolicy *SuccessPolicy `json:"successPolicy,omitempty" protobuf:"bytes,16,opt,name=successPolicy"` + // Specifies the number of retries before marking this job failed. // Defaults to 6 // +optional @@ -410,6 +469,20 @@ type JobSpec struct { // This is on by default. // +optional PodReplacementPolicy *PodReplacementPolicy `json:"podReplacementPolicy,omitempty" protobuf:"bytes,14,opt,name=podReplacementPolicy,casttype=podReplacementPolicy"` + + // ManagedBy field indicates the controller that manages a Job. The k8s Job + // controller reconciles jobs which don't have this field at all or the field + // value is the reserved string `kubernetes.io/job-controller`, but skips + // reconciling Jobs with a custom value for this field. + // The value must be a valid domain-prefixed path (e.g. acme.io/foo) - + // all characters before the first "/" must be a valid subdomain as defined + // by RFC 1123. All characters trailing the first "/" must be valid HTTP Path + // characters as defined by RFC 3986. The value cannot exceed 64 characters. + // + // This field is alpha-level. The job controller accepts setting the field + // when the feature gate JobManagedBy is enabled (disabled by default). + // +optional + ManagedBy *string `json:"managedBy,omitempty" protobuf:"bytes,15,opt,name=managedBy"` } // JobStatus represents the current state of a Job. @@ -420,6 +493,12 @@ type JobStatus struct { // status true; when the Job is resumed, the status of this condition will // become false. When a Job is completed, one of the conditions will have // type "Complete" and status true. + // + // A job is considered finished when it is in a terminal condition, either + // "Complete" or "Failed". A Job cannot have both the "Complete" and "Failed" conditions. + // Additionally, it cannot be in the "Complete" and "FailureTarget" conditions. + // The "Complete", "Failed" and "FailureTarget" conditions cannot be disabled. + // // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ // +optional // +patchMergeKey=type @@ -431,25 +510,36 @@ type JobStatus struct { // Job is created in the suspended state, this field is not set until the // first time it is resumed. This field is reset every time a Job is resumed // from suspension. It is represented in RFC3339 form and is in UTC. + // + // Once set, the field can only be removed when the job is suspended. + // The field cannot be modified while the job is unsuspended or finished. + // // +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. - // The completion time is only set when the job finishes successfully. + // The completion time is set when the job finishes successfully, and only then. + // The value cannot be updated or removed. The value indicates the same or + // later point in time as the startTime field. // +optional CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"` - // The number of pending and running pods. + // The number of pending and running pods which are not terminating (without + // a deletionTimestamp). + // The value is zero for finished jobs. // +optional Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"` // The number of pods which reached phase Succeeded. + // The value increases monotonically for a given spec. However, it may + // decrease in reaction to scale down of elastic indexed jobs. // +optional Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"` // The number of pods which reached phase Failed. + // The value increases monotonically. // +optional Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"` @@ -471,7 +561,7 @@ type JobStatus struct { // +optional CompletedIndexes string `json:"completedIndexes,omitempty" protobuf:"bytes,7,opt,name=completedIndexes"` - // FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. + // FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. // The indexes are represented in the text format analogous as for the // `completedIndexes` field, ie. they are kept as decimal integers // separated by commas. The numbers are listed in increasing order. Three or @@ -479,6 +569,8 @@ type JobStatus struct { // last element of the series, separated by a hyphen. // For example, if the failed indexes are 1, 3, 4, 5 and 7, they are // represented as "1,3-5,7". + // The set of failed indexes cannot overlap with the set of completed indexes. + // // This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` // feature gate is enabled (enabled by default). // +optional @@ -498,6 +590,7 @@ type JobStatus struct { // // Old jobs might not be tracked using this field, in which case the field // remains null. + // The structure is empty for finished jobs. // +optional UncountedTerminatedPods *UncountedTerminatedPods `json:"uncountedTerminatedPods,omitempty" protobuf:"bytes,8,opt,name=uncountedTerminatedPods"` @@ -532,6 +625,8 @@ const ( JobFailed JobConditionType = "Failed" // FailureTarget means the job is about to fail its execution. JobFailureTarget JobConditionType = "FailureTarget" + // JobSuccessCriteriaMet means the Job has been succeeded. + JobSuccessCriteriaMet JobConditionType = "SuccessCriteriaMet" ) const ( @@ -551,6 +646,11 @@ const ( // JobReasonFailedIndexes means Job has failed indexes. // This const is used in beta-level feature: https://kep.k8s.io/3850. JobReasonFailedIndexes string = "FailedIndexes" + // JobReasonSuccessPolicy reason indicates a SuccessCriteriaMet condition is added due to + // a Job met successPolicy. + // https://kep.k8s.io/3998 + // This is currently an alpha field. + JobReasonSuccessPolicy string = "SuccessPolicy" ) // JobCondition describes current state of a job. diff --git a/pkg/k8s/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go b/pkg/k8s/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go index 980f1e47505..84073b8d86c 100644 --- a/pkg/k8s/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go +++ b/pkg/k8s/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go @@ -116,6 +116,7 @@ var map_JobSpec = map[string]string{ "completions": "Specifies the desired number of successfully finished pods the job should be run with. Setting to null 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 continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.", "podFailurePolicy": "Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure.\n\nThis field is beta-level. It can be used when the `JobPodFailurePolicy` feature gate is enabled (enabled by default).", + "successPolicy": "successPolicy specifies the policy when the Job can be declared as succeeded. If empty, the default behavior applies - the Job is declared as succeeded only when the number of succeeded pods equals to the completions. When the field is specified, it must be immutable and works only for the Indexed Jobs. Once the Job meets the SuccessPolicy, the lingering pods are terminated.\n\nThis field is alpha-level. To use this field, you must enable the `JobSuccessPolicy` feature gate (disabled by default).", "backoffLimit": "Specifies the number of retries before marking this job failed. Defaults to 6", "backoffLimitPerIndex": "Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).", "maxFailedIndexes": "Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).", @@ -126,6 +127,7 @@ var map_JobSpec = map[string]string{ "completionMode": "completionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nMore completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, which is possible during upgrades due to version skew, the controller skips updates for the Job.", "suspend": "suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.", "podReplacementPolicy": "podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods\n when they are terminating (has a metadata.deletionTimestamp) or failed.\n- Failed means to wait until a previously created Pod is fully terminated (has phase\n Failed or Succeeded) before creating a replacement Pod.\n\nWhen using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle. This is on by default.", + "managedBy": "ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 64 characters.\n\nThis field is alpha-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (disabled by default).", } func (JobSpec) SwaggerDoc() map[string]string { @@ -134,16 +136,16 @@ func (JobSpec) SwaggerDoc() map[string]string { 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. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - "startTime": "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. 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. The completion time is only set when the job finishes successfully.", - "active": "The number of pending and running pods.", - "succeeded": "The number of pods which reached phase Succeeded.", - "failed": "The number of pods which reached phase Failed.", + "conditions": "The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true.\n\nA job is considered finished when it is in a terminal condition, either \"Complete\" or \"Failed\". A Job cannot have both the \"Complete\" and \"Failed\" conditions. Additionally, it cannot be in the \"Complete\" and \"FailureTarget\" conditions. The \"Complete\", \"Failed\" and \"FailureTarget\" conditions cannot be disabled.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + "startTime": "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.\n\nOnce set, the field can only be removed when the job is suspended. The field cannot be modified while the job is unsuspended or finished.", + "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. The completion time is set when the job finishes successfully, and only then. The value cannot be updated or removed. The value indicates the same or later point in time as the startTime field.", + "active": "The number of pending and running pods which are not terminating (without a deletionTimestamp). The value is zero for finished jobs.", + "succeeded": "The number of pods which reached phase Succeeded. The value increases monotonically for a given spec. However, it may decrease in reaction to scale down of elastic indexed jobs.", + "failed": "The number of pods which reached phase Failed. The value increases monotonically.", "terminating": "The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp).\n\nThis field is beta-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (enabled by default).", "completedIndexes": "completedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".", - "failedIndexes": "FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).", - "uncountedTerminatedPods": "uncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status:\n\n1. Add the pod UID to the arrays in this field. 2. Remove the pod finalizer. 3. Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nOld jobs might not be tracked using this field, in which case the field remains null.", + "failedIndexes": "FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". The set of failed indexes cannot overlap with the set of completed indexes.\n\nThis field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).", + "uncountedTerminatedPods": "uncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status:\n\n1. Add the pod UID to the arrays in this field. 2. Remove the pod finalizer. 3. Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nOld jobs might not be tracked using this field, in which case the field remains null. The structure is empty for finished jobs.", "ready": "The number of pods which have a Ready condition.", } @@ -202,6 +204,25 @@ func (PodFailurePolicyRule) SwaggerDoc() map[string]string { return map_PodFailurePolicyRule } +var map_SuccessPolicy = map[string]string{ + "": "SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes.", + "rules": "rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the \"SucceededCriteriaMet\" condition is added, and the lingering pods are removed. The terminal state for such a Job has the \"Complete\" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.", +} + +func (SuccessPolicy) SwaggerDoc() map[string]string { + return map_SuccessPolicy +} + +var map_SuccessPolicyRule = map[string]string{ + "": "SuccessPolicyRule describes rule for declaring a Job as succeeded. Each rule must have at least one of the \"succeededIndexes\" or \"succeededCount\" specified.", + "succeededIndexes": "succeededIndexes specifies the set of indexes which need to be contained in the actual set of the succeeded indexes for the Job. The list of indexes must be within 0 to \".spec.completions-1\" and must not contain duplicates. At least one element is required. The indexes are represented as intervals separated by commas. The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. The number are listed in represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". When this field is null, this field doesn't default to any value and is never evaluated at any time.", + "succeededCount": "succeededCount specifies the minimal required size of the actual set of the succeeded indexes for the Job. When succeededCount is used along with succeededIndexes, the check is constrained only to the set of indexes specified by succeededIndexes. For example, given that succeededIndexes is \"1-4\", succeededCount is \"3\", and completed indexes are \"1\", \"3\", and \"5\", the Job isn't declared as succeeded because only \"1\" and \"3\" indexes are considered in that rules. When this field is null, this doesn't default to any value and is never evaluated at any time. When specified it needs to be a positive integer.", +} + +func (SuccessPolicyRule) SwaggerDoc() map[string]string { + return map_SuccessPolicyRule +} + var map_UncountedTerminatedPods = map[string]string{ "": "UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.", "succeeded": "succeeded holds UIDs of succeeded Pods.", diff --git a/pkg/k8s/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go b/pkg/k8s/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go index 43fc41515be..88c58b3d111 100644 --- a/pkg/k8s/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go +++ b/pkg/k8s/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go @@ -262,6 +262,11 @@ func (in *JobSpec) DeepCopyInto(out *JobSpec) { *out = new(PodFailurePolicy) (*in).DeepCopyInto(*out) } + if in.SuccessPolicy != nil { + in, out := &in.SuccessPolicy, &out.SuccessPolicy + *out = new(SuccessPolicy) + (*in).DeepCopyInto(*out) + } if in.BackoffLimit != nil { in, out := &in.BackoffLimit, &out.BackoffLimit *out = new(int32) @@ -308,6 +313,11 @@ func (in *JobSpec) DeepCopyInto(out *JobSpec) { *out = new(PodReplacementPolicy) **out = **in } + if in.ManagedBy != nil { + in, out := &in.ManagedBy, &out.ManagedBy + *out = new(string) + **out = **in + } return } @@ -481,6 +491,55 @@ func (in *PodFailurePolicyRule) DeepCopy() *PodFailurePolicyRule { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SuccessPolicy) DeepCopyInto(out *SuccessPolicy) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]SuccessPolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SuccessPolicy. +func (in *SuccessPolicy) DeepCopy() *SuccessPolicy { + if in == nil { + return nil + } + out := new(SuccessPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SuccessPolicyRule) DeepCopyInto(out *SuccessPolicyRule) { + *out = *in + if in.SucceededIndexes != nil { + in, out := &in.SucceededIndexes, &out.SucceededIndexes + *out = new(string) + **out = **in + } + if in.SucceededCount != nil { + in, out := &in.SucceededCount, &out.SucceededCount + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SuccessPolicyRule. +func (in *SuccessPolicyRule) DeepCopy() *SuccessPolicyRule { + if in == nil { + return nil + } + out := new(SuccessPolicyRule) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UncountedTerminatedPods) DeepCopyInto(out *UncountedTerminatedPods) { *out = *in diff --git a/pkg/k8s/vendor/k8s.io/api/batch/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/batch/v1beta1/generated.pb.go index 03feb2ceafa..895d9c91966 100644 --- a/pkg/k8s/vendor/k8s.io/api/batch/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/batch/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/batch/v1beta1/generated.proto +// source: k8s.io/api/batch/v1beta1/generated.proto package v1beta1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CronJob) Reset() { *m = CronJob{} } func (*CronJob) ProtoMessage() {} func (*CronJob) Descriptor() ([]byte, []int) { - return fileDescriptor_e57b277b05179ae7, []int{0} + return fileDescriptor_ed95843ae7b4086b, []int{0} } func (m *CronJob) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_CronJob proto.InternalMessageInfo func (m *CronJobList) Reset() { *m = CronJobList{} } func (*CronJobList) ProtoMessage() {} func (*CronJobList) Descriptor() ([]byte, []int) { - return fileDescriptor_e57b277b05179ae7, []int{1} + return fileDescriptor_ed95843ae7b4086b, []int{1} } func (m *CronJobList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -104,7 +104,7 @@ var xxx_messageInfo_CronJobList proto.InternalMessageInfo func (m *CronJobSpec) Reset() { *m = CronJobSpec{} } func (*CronJobSpec) ProtoMessage() {} func (*CronJobSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e57b277b05179ae7, []int{2} + return fileDescriptor_ed95843ae7b4086b, []int{2} } func (m *CronJobSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +132,7 @@ var xxx_messageInfo_CronJobSpec proto.InternalMessageInfo func (m *CronJobStatus) Reset() { *m = CronJobStatus{} } func (*CronJobStatus) ProtoMessage() {} func (*CronJobStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e57b277b05179ae7, []int{3} + return fileDescriptor_ed95843ae7b4086b, []int{3} } func (m *CronJobStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -160,7 +160,7 @@ var xxx_messageInfo_CronJobStatus proto.InternalMessageInfo func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} } func (*JobTemplateSpec) ProtoMessage() {} func (*JobTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e57b277b05179ae7, []int{4} + return fileDescriptor_ed95843ae7b4086b, []int{4} } func (m *JobTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -194,60 +194,59 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/batch/v1beta1/generated.proto", fileDescriptor_e57b277b05179ae7) + proto.RegisterFile("k8s.io/api/batch/v1beta1/generated.proto", fileDescriptor_ed95843ae7b4086b) } -var fileDescriptor_e57b277b05179ae7 = []byte{ - // 787 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xbd, 0x49, 0x9c, 0xb8, 0xe3, 0x16, 0xd2, 0x01, 0xa5, 0x2b, 0x83, 0xd6, 0xc1, 0x55, - 0x85, 0x41, 0x30, 0x4b, 0x22, 0x84, 0x38, 0x55, 0xea, 0x16, 0x15, 0x08, 0x41, 0x45, 0xe3, 0x72, - 0xa9, 0x2a, 0xd4, 0xd9, 0xd9, 0x17, 0x67, 0x9a, 0xdd, 0x9d, 0xd5, 0xce, 0x6c, 0xa4, 0xdc, 0xb8, - 0x70, 0xe7, 0xbb, 0x70, 0xe7, 0x9c, 0x63, 0x6f, 0xf4, 0xb4, 0x22, 0xcb, 0xb7, 0xe0, 0x84, 0x66, - 0xbc, 0xb1, 0x5d, 0x7b, 0xdd, 0x84, 0x4b, 0x6f, 0x9e, 0x37, 0xff, 0xff, 0x6f, 0x9e, 0xde, 0x7b, - 0xfb, 0x8c, 0x1e, 0x9c, 0x7c, 0xad, 0x88, 0x90, 0xfe, 0x49, 0x11, 0x42, 0x9e, 0x82, 0x06, 0xe5, - 0x9f, 0x42, 0x1a, 0xc9, 0xdc, 0xaf, 0x2f, 0x58, 0x26, 0xfc, 0x90, 0x69, 0x7e, 0xec, 0x9f, 0xee, - 0x85, 0xa0, 0xd9, 0x9e, 0x3f, 0x86, 0x14, 0x72, 0xa6, 0x21, 0x22, 0x59, 0x2e, 0xb5, 0xc4, 0xee, - 0x44, 0x49, 0x58, 0x26, 0x88, 0x55, 0x92, 0x5a, 0xd9, 0xfb, 0x7c, 0x2c, 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b, 0xbd, - 0x9d, 0xaa, 0xec, 0xe3, 0xc3, 0x25, 0x12, 0x6d, 0xa0, 0x9b, 0x85, 0xf2, 0xee, 0xc2, 0xa8, 0xbc, - 0x85, 0x05, 0x7b, 0xff, 0xb5, 0x05, 0xfb, 0x61, 0xd3, 0x14, 0x93, 0x37, 0xec, 0xd5, 0xe0, 0xfe, - 0xf9, 0x85, 0xd7, 0x7a, 0x79, 0xe1, 0xb5, 0x5e, 0x5d, 0x78, 0xad, 0x5f, 0x2b, 0xcf, 0x39, 0xaf, - 0x3c, 0xe7, 0x65, 0xe5, 0x39, 0xaf, 0x2a, 0xcf, 0xf9, 0xbb, 0xf2, 0x9c, 0xdf, 0xff, 0xf1, 0x5a, - 0x4f, 0xdd, 0x55, 0xff, 0xc7, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x61, 0x72, 0xc3, 0xe0, 0xc3, +var fileDescriptor_ed95843ae7b4086b = []byte{ + // 771 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xcf, 0x8f, 0xdb, 0x44, + 0x14, 0xc7, 0xe3, 0x6c, 0x7e, 0x75, 0xd2, 0xc2, 0x76, 0x40, 0x5b, 0x2b, 0x20, 0x3b, 0xa4, 0xaa, + 0x08, 0x08, 0xc6, 0xec, 0x0a, 0x21, 0x4e, 0x95, 0x70, 0x51, 0x81, 0x25, 0xa8, 0x68, 0x52, 0x2e, + 0x55, 0x85, 0x3a, 0x9e, 0x4c, 0x92, 0xe9, 0xda, 0x1e, 0xcb, 0x33, 0x5e, 0x29, 0x37, 0x2e, 0xdc, + 0xf9, 0x5f, 0xb8, 0x73, 0xde, 0x63, 0x6f, 0xf4, 0x64, 0xb1, 0xe6, 0xbf, 0xe0, 0x84, 0x66, 0xe2, + 0x4d, 0xd2, 0xc4, 0xe9, 0x96, 0x0b, 0xb7, 0xcc, 0xf3, 0xf7, 0xfb, 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b6, 0x7e, 0x6e, + 0x5f, 0x19, 0x2b, 0x2e, 0x11, 0x30, 0x04, 0x87, 0x21, 0x91, 0xea, 0x6a, 0x28, 0xf5, 0xc8, 0x99, + 0x26, 0x75, 0x4f, 0x3e, 0x7e, 0xb3, 0x67, 0xa6, 0x1d, 0xfe, 0xbb, 0x45, 0xee, 0x1e, 0x8e, 0xb6, + 0x38, 0x78, 0x87, 0x0c, 0x53, 0x00, 0x4d, 0x6c, 0x55, 0x42, 0x73, 0x5f, 0xf3, 0x3f, 0xdf, 0x77, + 0x54, 0xe4, 0x2e, 0x1c, 0xed, 0x90, 0x70, 0x05, 0x5d, 0x2f, 0x94, 0xb7, 0xb7, 0x46, 0xe5, 0x7f, + 0x58, 0xb0, 0xf7, 0x5f, 0x59, 0xb0, 0xef, 0x57, 0x4d, 0x31, 0x7a, 0xcd, 0x5e, 0xf5, 0xef, 0x5f, + 0x5c, 0x3a, 0xb5, 0x17, 0x97, 0x4e, 0xed, 0xe5, 0xa5, 0x53, 0xfb, 0xa5, 0x70, 0xac, 0x8b, 0xc2, + 0xb1, 0x5e, 0x14, 0x8e, 0xf5, 0xb2, 0x70, 0xac, 0xbf, 0x0a, 0xc7, 0xfa, 0xed, 0x6f, 0xa7, 0xf6, + 0xc4, 0xde, 0xf7, 0x7f, 0xfc, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xaa, 0x2c, 0x86, 0xaa, 0x07, 0x00, 0x00, } diff --git a/pkg/k8s/vendor/k8s.io/api/certificates/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/certificates/v1/generated.pb.go index 37859babcd5..cba4a8ea492 100644 --- a/pkg/k8s/vendor/k8s.io/api/certificates/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/certificates/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1/generated.proto +// source: k8s.io/api/certificates/v1/generated.proto package v1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } func (*CertificateSigningRequest) ProtoMessage() {} func (*CertificateSigningRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{0} + return fileDescriptor_5f7d41da689f96f7, []int{0} } func (m *CertificateSigningRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_CertificateSigningRequest proto.InternalMessageInfo func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} } func (*CertificateSigningRequestCondition) ProtoMessage() {} func (*CertificateSigningRequestCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{1} + return fileDescriptor_5f7d41da689f96f7, []int{1} } func (m *CertificateSigningRequestCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_CertificateSigningRequestCondition proto.InternalMessageInfo func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} } func (*CertificateSigningRequestList) ProtoMessage() {} func (*CertificateSigningRequestList) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{2} + return fileDescriptor_5f7d41da689f96f7, []int{2} } func (m *CertificateSigningRequestList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_CertificateSigningRequestList proto.InternalMessageInfo func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} } func (*CertificateSigningRequestSpec) ProtoMessage() {} func (*CertificateSigningRequestSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{3} + return fileDescriptor_5f7d41da689f96f7, []int{3} } func (m *CertificateSigningRequestSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_CertificateSigningRequestSpec proto.InternalMessageInfo func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} } func (*CertificateSigningRequestStatus) ProtoMessage() {} func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{4} + return fileDescriptor_5f7d41da689f96f7, []int{4} } func (m *CertificateSigningRequestStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_CertificateSigningRequestStatus proto.InternalMessageInfo func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{5} + return fileDescriptor_5f7d41da689f96f7, []int{5} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -225,68 +225,67 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1/generated.proto", fileDescriptor_17e045d0de66f3c7) + proto.RegisterFile("k8s.io/api/certificates/v1/generated.proto", fileDescriptor_5f7d41da689f96f7) } -var fileDescriptor_17e045d0de66f3c7 = []byte{ - // 910 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdf, 0x6e, 0x1b, 0xc5, - 0x17, 0xf6, 0xc6, 0x7f, 0x62, 0x8f, 0xf3, 0x4b, 0xdb, 0xd1, 0x8f, 0x6a, 0xb1, 0x54, 0xaf, 0xb5, - 0x82, 0x2a, 0x20, 0xd8, 0x25, 0x51, 0x81, 0x50, 0x10, 0x42, 0x9b, 0x46, 0xa8, 0x22, 0x05, 0x69, - 0x92, 0x70, 0x51, 0xb8, 0xe8, 0x64, 0x7d, 0xba, 0x99, 0xba, 0xfb, 0x87, 0x99, 0x59, 0xab, 0xbe,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63, 0x9c, 0xea, 0x59, 0x85, 0x30, 0x4d, 0xfa, 0xc2, 0x6e, 0xf6, 0xac, 0x8d, 0x7a, - 0xf0, 0xce, 0x64, 0xec, 0xdc, 0xd8, 0x5d, 0x74, 0x92, 0x8b, 0x78, 0xec, 0xa1, 0x46, 0xae, 0x46, - 0x51, 0xd8, 0xf5, 0x5e, 0x75, 0xa3, 0x15, 0xdc, 0x54, 0x03, 0x7d, 0xa8, 0x2d, 0x67, 0x63, 0xa7, - 0xf9, 0x1d, 0x8c, 0xf4, 0x81, 0x18, 0x14, 0xfe, 0x08, 0x35, 0x73, 0x01, 0x3c, 0x51, 0x69, 0x16, - 0x6b, 0x50, 0xf6, 0xfe, 0xd0, 0xd8, 0x49, 0x89, 0xc0, 0xb7, 0x50, 0x35, 0x67, 0x7d, 0xb3, 0x06, - 0x6d, 0x03, 0xac, 0x1e, 0xde, 0xbf, 0x47, 0x94, 0x1d, 0xbb, 0xa8, 0x11, 0xf1, 0x34, 0xcf, 0x84, - 0x5d, 0xd3, 0xe2, 0x48, 0x89, 0x7f, 0xab, 0x2d, 0xc4, 0x78, 0x30, 0x43, 0x75, 0x78, 0x26, 0x39, - 0xb5, 0x1b, 0xfa, 0xfa, 0xee, 0x5d, 0xf9, 0x9d, 0xf3, 0x76, 0x15, 0xcd, 0x6e, 0x22, 0xf9, 0x68, - 0x76, 0x9b, 0xda, 0x46, 0x0a, 0x85, 0xce, 0x23, 0x84, 0x66, 0x18, 0x7c, 0x1d, 0x55, 0x07, 0x30, - 0x2a, 0x5e, 0x1d, 0xa2, 0x3e, 0xf1, 0x57, 0xa8, 0x3e, 0xa4, 0x4f, 0x73, 0x30, 0x4f, 0xee, 0xed, - 0xd7, 0xa5, 0xa2, 0x89, 0x7e, 0x54, 0x68, 0x52, 0x04, 0xdd, 0x5d, 0xd9, 0xb6, 0xdc, 0x13, 0x0b, - 0x39, 0x6f, 0x78, 0x2d, 0x31, 0x47, 0x28, 0x9c, 0xbe, 0x40, 0xc2, 0xb6, 0x74, 0xd5, 0x5f, 0x5f, - 0xa9, 0xea, 0xf2, 0x21, 0x9b, 0x8d, 0x52, 0x69, 0x12, 0x64, 0x4e, 0x05, 0x6f, 0xa2, 0xf6, 0x1c, - 0xab, 0xae, 0x6f, 0x2d, 0xb8, 0x36, 0x19, 0x3b, 0xed, 0x39, 0x72, 0x32, 0x8f, 0x71, 0x3f, 0x37, - 0xcd, 0xd2, 0x35, 0x62, 0x67, 0xba, 0x64, 0x96, 0xbe, 0xc8, 0xd6, 0xe2, 0xa6, 0xdc, 0x6d, 0xfe, - 0xf6, 0xbb, 0x53, 0x79, 0xfe, 0x77, 0xaf, 0x12, 0x7c, 0x73, 0x72, 0xda, 0xad, 0xbc, 0x38, 0xed, - 0x56, 0x5e, 0x9e, 0x76, 0x2b, 0xcf, 0x27, 0x5d, 0xeb, 0x64, 0xd2, 0xb5, 0x5e, 0x4c, 0xba, 0xd6, - 0xcb, 0x49, 0xd7, 0xfa, 0x67, 0xd2, 0xb5, 0x7e, 0x7d, 0xd5, 0xad, 0x3c, 0xec, 0x2c, 0xff, 0x2f, - 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x00, 0x0c, 0x1b, 0xcd, 0x08, 0x00, 0x00, +var fileDescriptor_5f7d41da689f96f7 = []byte{ + // 896 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xc6, 0x7f, 0x62, 0x8f, 0x43, 0xda, 0x8e, 0xa0, 0x5a, 0x2c, 0xd5, 0x6b, 0xad, 0xa0, + 0x0a, 0x15, 0xcc, 0x92, 0xa8, 0x40, 0x28, 0x08, 0xa1, 0x4d, 0x23, 0x54, 0x91, 0x82, 0x34, 0x49, + 0x38, 0x14, 0x0e, 0x9d, 0xac, 0x5f, 0x37, 0xd3, 0x74, 0xff, 0xb0, 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0xae, 0x54, 0x75, 0xf9, 0x90, 0x4d, 0x47, 0xa9, 0x84, 0x04, 0x9d, 0x71, 0xc1, 0xeb, 0xa8, + 0x3d, 0xa3, 0xaa, 0xeb, 0x5b, 0xf1, 0xaf, 0x8d, 0x47, 0x4e, 0x7b, 0x46, 0x9c, 0xce, 0x72, 0xdc, + 0x2f, 0x4c, 0xb3, 0x74, 0x8d, 0xd8, 0x99, 0x2c, 0x99, 0xa5, 0x3f, 0x64, 0x6b, 0x7e, 0x53, 0xee, + 0x35, 0x7f, 0xff, 0xc3, 0xa9, 0xbc, 0xf8, 0xa7, 0x57, 0xf1, 0xbf, 0x3d, 0x3e, 0xe9, 0x56, 0x5e, + 0x9e, 0x74, 0x2b, 0xaf, 0x4e, 0xba, 0x95, 0x17, 0xe3, 0xae, 0x75, 0x3c, 0xee, 0x5a, 0x2f, 0xc7, + 0x5d, 0xeb, 0xd5, 0xb8, 0x6b, 0xfd, 0x3b, 0xee, 0x5a, 0xbf, 0xbd, 0xee, 0x56, 0x1e, 0x75, 0x16, + 0xff, 0x2f, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x4a, 0x4f, 0xbc, 0xb4, 0x08, 0x00, 0x00, } func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go index 546ecbefbf7..a62a4005963 100644 --- a/pkg/k8s/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1alpha1/generated.proto +// source: k8s.io/api/certificates/v1alpha1/generated.proto package v1alpha1 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ClusterTrustBundle) Reset() { *m = ClusterTrustBundle{} } func (*ClusterTrustBundle) ProtoMessage() {} func (*ClusterTrustBundle) Descriptor() ([]byte, []int) { - return fileDescriptor_8915b0d419f9eda6, []int{0} + return fileDescriptor_f73d5fe56c015bb8, []int{0} } func (m *ClusterTrustBundle) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ClusterTrustBundle proto.InternalMessageInfo func (m *ClusterTrustBundleList) Reset() { *m = ClusterTrustBundleList{} } func (*ClusterTrustBundleList) ProtoMessage() {} func (*ClusterTrustBundleList) Descriptor() ([]byte, []int) { - return fileDescriptor_8915b0d419f9eda6, []int{1} + return fileDescriptor_f73d5fe56c015bb8, []int{1} } func (m *ClusterTrustBundleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_ClusterTrustBundleList proto.InternalMessageInfo func (m *ClusterTrustBundleSpec) Reset() { *m = ClusterTrustBundleSpec{} } func (*ClusterTrustBundleSpec) ProtoMessage() {} func (*ClusterTrustBundleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_8915b0d419f9eda6, []int{2} + return fileDescriptor_f73d5fe56c015bb8, []int{2} } func (m *ClusterTrustBundleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,39 +134,39 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1alpha1/generated.proto", fileDescriptor_8915b0d419f9eda6) -} - -var fileDescriptor_8915b0d419f9eda6 = []byte{ - // 448 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0x77, 0x6a, 0x0b, 0xed, 0x44, 0x41, 0x56, 0x90, 0x90, 0xc3, 0x34, 0xe4, 0xd4, 0x8b, - 0x33, 0x26, 0x54, 0xe9, 0x79, 0x05, 0xa1, 0xe0, 0x0f, 0xd8, 0x7a, 0xb1, 0x78, 0x70, 0x32, 0x79, - 0xdd, 0x8c, 0xc9, 0xee, 0x0e, 0x33, 0xb3, 0x01, 0x6f, 0x82, 0xff, 0x80, 0x7f, 0x56, 0x8e, 0xd5, - 0x53, 0x4f, 0xc5, 0xac, 0xff, 0x88, 0xcc, 0x64, 0x93, 0x5d, 0x5c, 0x25, 0xd2, 0xdb, 0xbe, 0x1f, - 0x9f, 0xef, 0x7b, 0xdf, 0xb7, 0x0c, 0x3e, 0x9f, 0x9d, 0x19, 0x2a, 0x73, 0x36, 0x2b, 0xc6, 0xa0, - 0x33, 0xb0, 0x60, 0xd8, 0x02, 0xb2, 0x49, 0xae, 0x59, 0x55, 0xe0, 0x4a, 0x32, 0x01, 0xda, 0xca, - 0x2b, 0x29, 0xb8, 0x2f, 0x0f, 0xf9, 0x5c, 0x4d, 0xf9, 0x90, 0x25, 0x90, 0x81, 0xe6, 0x16, 0x26, - 0x54, 0xe9, 0xdc, 0xe6, 0x61, 0x7f, 0x4d, 0x50, 0xae, 0x24, 0x6d, 0x12, 0x74, 0x43, 0xf4, 0x9e, - 0x24, 0xd2, 0x4e, 0x8b, 0x31, 0x15, 0x79, 0xca, 0x92, 0x3c, 0xc9, 0x99, 0x07, 0xc7, 0xc5, 0x95, - 0x8f, 0x7c, 0xe0, 0xbf, 0xd6, 0x82, 0xbd, 0xd3, 0x7a, 0x85, 0x94, 0x8b, 0xa9, 0xcc, 0x40, 0x7f, - 0x66, 0x6a, 0x96, 0xb8, 0x84, 0x61, 0x29, 0x58, 0xce, 0x16, 0xad, 0x35, 0x7a, 0xec, 0x5f, 0x94, - 0x2e, 0x32, 0x2b, 0x53, 0x68, 0x01, 0xcf, 0x77, 0x01, 0x46, 0x4c, 0x21, 0xe5, 0x7f, 0x72, 0x83, - 0x1f, 0x08, 0x87, 0x2f, 0xe6, 0x85, 0xb1, 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a, 0x8d, 0x09, 0x71, 0xb3, 0x2f, - 0x7a, 0xb9, 0x5c, 0x91, 0xe0, 0x7a, 0x45, 0x82, 0x9b, 0x15, 0x09, 0xbe, 0x94, 0x04, 0x2d, 0x4b, - 0x82, 0xae, 0x4b, 0x82, 0x6e, 0x4a, 0x82, 0x7e, 0x96, 0x04, 0x7d, 0xfb, 0x45, 0x82, 0xcb, 0xfe, - 0xae, 0x67, 0xf7, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x05, 0xe9, 0xaa, 0x07, 0xb2, 0x03, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/certificates/v1alpha1/generated.proto", fileDescriptor_f73d5fe56c015bb8) +} + +var fileDescriptor_f73d5fe56c015bb8 = []byte{ + // 437 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6a, 0xdb, 0x40, + 0x10, 0xc6, 0xb5, 0x69, 0x02, 0xc9, 0xba, 0x85, 0xa2, 0x42, 0x31, 0x3e, 0x6c, 0x8c, 0x4f, 0xb9, + 0x74, 0x37, 0x36, 0x69, 0xc9, 0x59, 0x85, 0x42, 0xa1, 0x7f, 0x40, 0xe9, 0xa5, 0xa1, 0x87, 0xae, + 0xd7, 0x13, 0x79, 0x6b, 0x4b, 0x5a, 0x76, 0x57, 0x86, 0xde, 0x0a, 0x7d, 0x81, 0x3e, 0x96, 0x8f, + 0x69, 0x4f, 0x39, 0x85, 0x5a, 0x7d, 0x91, 0xb2, 0x6b, 0xd9, 0x12, 0x55, 0x8b, 0x4b, 0x6e, 0x9a, + 0xd1, 0xfc, 0xbe, 0x6f, 0xbe, 0x11, 0xc2, 0xa7, 0xb3, 0x73, 0x43, 0x65, 0xce, 0xb8, 0x92, 0x4c, + 0x80, 0xb6, 0xf2, 0x4a, 0x0a, 0x6e, 0xc1, 0xb0, 0xc5, 0x90, 0xcf, 0xd5, 0x94, 0x0f,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, 0xf8, 0x71, 0x7b, 0xfc, 0x95, 0x34, 0x36, 0xfc, 0xd0, 0x0a, 0x46, + 0xff, 0x2f, 0x98, 0xa3, 0x7d, 0xac, 0x87, 0x95, 0xe1, 0xe1, 0xa6, 0xd3, 0x08, 0xf5, 0x1e, 0x1f, + 0x48, 0x0b, 0xa9, 0xe9, 0xee, 0xf5, 0xef, 0x9d, 0x74, 0x46, 0x67, 0x77, 0x49, 0x15, 0x3d, 0xa8, + 0x0c, 0x0e, 0x5e, 0x3a, 0xa9, 0x78, 0xad, 0x38, 0xf8, 0xfa, 0xd7, 0x4c, 0x2e, 0x74, 0x38, 0xc2, + 0xd8, 0xc8, 0x24, 0x03, 0xfd, 0x86, 0xa7, 0xe0, 0x53, 0x1d, 0xd5, 0xc7, 0xbf, 0xd8, 0xbe, 0x89, + 0x1b, 0x53, 0xe1, 0x53, 0xdc, 0xb1, 0xb5, 0x8c, 0xff, 0x0a, 0x47, 0xd1, 0xa3, 0x0a, 0xea, 0x34, + 0x1c, 0xe2, 0xe6, 0x5c, 0xf4, 0x62, 0xb9, 0x22, 0xc1, 0xf5, 0x8a, 0x04, 0x37, 0x2b, 0x12, 0x7c, + 0x29, 0x09, 0x5a, 0x96, 0x04, 0x5d, 0x97, 0x04, 0xdd, 0x94, 0x04, 0xfd, 0x2c, 0x09, 0xfa, 0xf6, + 0x8b, 0x04, 0x97, 0xfd, 0x5d, 0xbf, 0xdd, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x1c, 0xcb, + 0xdd, 0x99, 0x03, 0x00, 0x00, } func (m *ClusterTrustBundle) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go index 352b9faa7a6..b6d8ab3f599 100644 --- a/pkg/k8s/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1beta1/generated.proto +// source: k8s.io/api/certificates/v1beta1/generated.proto package v1beta1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } func (*CertificateSigningRequest) ProtoMessage() {} func (*CertificateSigningRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{0} + return fileDescriptor_6529c11a462c48a5, []int{0} } func (m *CertificateSigningRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_CertificateSigningRequest proto.InternalMessageInfo func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} } func (*CertificateSigningRequestCondition) ProtoMessage() {} func (*CertificateSigningRequestCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{1} + return fileDescriptor_6529c11a462c48a5, []int{1} } func (m *CertificateSigningRequestCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_CertificateSigningRequestCondition proto.InternalMessageInfo func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} } func (*CertificateSigningRequestList) ProtoMessage() {} func (*CertificateSigningRequestList) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{2} + return fileDescriptor_6529c11a462c48a5, []int{2} } func (m *CertificateSigningRequestList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_CertificateSigningRequestList proto.InternalMessageInfo func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} } func (*CertificateSigningRequestSpec) ProtoMessage() {} func (*CertificateSigningRequestSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{3} + return fileDescriptor_6529c11a462c48a5, []int{3} } func (m *CertificateSigningRequestSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_CertificateSigningRequestSpec proto.InternalMessageInfo func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} } func (*CertificateSigningRequestStatus) ProtoMessage() {} func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{4} + return fileDescriptor_6529c11a462c48a5, []int{4} } func (m *CertificateSigningRequestStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_CertificateSigningRequestStatus proto.InternalMessageInfo func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{5} + return fileDescriptor_6529c11a462c48a5, []int{5} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -225,69 +225,68 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1beta1/generated.proto", fileDescriptor_09d156762b8218ef) + proto.RegisterFile("k8s.io/api/certificates/v1beta1/generated.proto", fileDescriptor_6529c11a462c48a5) } -var fileDescriptor_09d156762b8218ef = []byte{ - // 915 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x5d, 0x6f, 0x1b, 0x45, - 0x17, 0xf6, 0xc6, 0x1f, 0xb1, 0xc7, 0x79, 0xd3, 0x76, 0xf4, 0x52, 0x2d, 0x96, 0xea, 0xb5, 0x2c, - 0x40, 0xe1, 0x6b, 0x96, 0x54, 0x15, 0x44, 0xb9, 0x40, 0xb0, 0x21, 0x82, 0x88, 0x14, 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 0xef, 0x14, 0x85, 0xe6, 0xcc, 0xdd, 0xb5, 0x1d, - 0xab, 0xfb, 0xa7, 0x85, 0x9c, 0x15, 0x0f, 0x27, 0xfe, 0x19, 0x21, 0x7f, 0xfa, 0x18, 0x09, 0xdb, - 0xd2, 0xe7, 0xdf, 0x7b, 0xf5, 0xf3, 0x17, 0x0f, 0xdb, 0xec, 0x37, 0xa6, 0x80, 0x04, 0x9d, 0xb3, - 0xc2, 0xdb, 0xa8, 0x39, 0x27, 0xad, 0x4f, 0xba, 0xe1, 0xdd, 0x98, 0x8c, 0x9d, 0xe6, 0x9c, 0x38, - 0x9d, 0x8f, 0xe9, 0x7e, 0x62, 0xca, 0xa6, 0x0f, 0x8a, 0x9d, 0xe9, 0xd0, 0x59, 0xfa, 0x5e, 0x1b, - 0x8b, 0x43, 0xb3, 0x5b, 0xff, 0xf5, 0x37, 0xa7, 0xf4, 0xf4, 0xaf, 0x4e, 0xc9, 0xdb, 0x3f, 0x3b, - 0x6f, 0x97, 0x9e, 0x9d, 0xb7, 0x4b, 0xcf, 0xcf, 0xdb, 0xa5, 0xa7, 0x93, 0xb6, 0x75, 0x36, 0x69, - 0x5b, 0xcf, 0x26, 0x6d, 0xeb, 0xf9, 0xa4, 0x6d, 0xfd, 0x3d, 0x69, 0x5b, 0xbf, 0xbc, 0x68, 0x97, - 0xbe, 0x77, 0x56, 0xfc, 0x77, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xe7, 0x9b, 0x78, 0xf6, - 0x08, 0x00, 0x00, +var fileDescriptor_6529c11a462c48a5 = []byte{ + // 901 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xf6, 0xc6, 0x1f, 0xb1, 0xc7, 0x21, 0x6d, 0x47, 0x50, 0x2d, 0x96, 0xea, 0xb5, 0x56, 0x80, + 0x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c, 0x9a, 0x8f, 0x56, 0xfb, 0x5e, 0x51, 0x68, 0xc1, 0xdc, 0x5e, + 0xd9, 0xb2, 0xdc, 0xbf, 0x2c, 0xe4, 0x2c, 0x79, 0x38, 0xf1, 0x2f, 0x08, 0x05, 0x93, 0xc7, 0x48, + 0xd8, 0x96, 0x3e, 0xff, 0xce, 0xab, 0x9f, 0xbf, 0x7c, 0xd8, 0xa6, 0xbf, 0x31, 0x25, 0x24, 0xe8, + 0x8c, 0x15, 0xde, 0x44, 0xed, 0x19, 0x69, 0x7d, 0xd2, 0x35, 0xff, 0xc6, 0x78, 0xe4, 0xb4, 0x67, + 0xc4, 0xe9, 0x6c, 0x8c, 0xfb, 0x99, 0x29, 0x9b, 0x3e, 0x28, 0x76, 0x26, 0x43, 0x67, 0xe9, 0x7b, + 0x6d, 0xcd, 0x0f, 0xcd, 0x76, 0xf3, 0xb7, 0xdf, 0x9d, 0xca, 0xd3, 0xbf, 0x7b, 0x15, 0x7f, 0xf7, + 0xec, 0xbc, 0x5b, 0x79, 0x76, 0xde, 0xad, 0x3c, 0x3f, 0xef, 0x56, 0x9e, 0x8e, 0xbb, 0xd6, 0xd9, + 0xb8, 0x6b, 0x3d, 0x1b, 0x77, 0xad, 0xe7, 0xe3, 0xae, 0xf5, 0xcf, 0xb8, 0x6b, 0xfd, 0xfa, 0xa2, + 0x5b, 0xf9, 0xc1, 0x59, 0xf2, 0xdf, 0xe5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0x2f, 0x11, + 0xe8, 0xdd, 0x08, 0x00, 0x00, } func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/coordination/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/coordination/v1/generated.pb.go index de061060135..8b7ab98caaa 100644 --- a/pkg/k8s/vendor/k8s.io/api/coordination/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/coordination/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1/generated.proto +// source: k8s.io/api/coordination/v1/generated.proto package v1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Lease) Reset() { *m = Lease{} } func (*Lease) ProtoMessage() {} func (*Lease) Descriptor() ([]byte, []int) { - return fileDescriptor_929e1148ad9baca3, []int{0} + return fileDescriptor_239d5a4df3139dce, []int{0} } func (m *Lease) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_Lease proto.InternalMessageInfo func (m *LeaseList) Reset() { *m = LeaseList{} } func (*LeaseList) ProtoMessage() {} func (*LeaseList) Descriptor() ([]byte, []int) { - return fileDescriptor_929e1148ad9baca3, []int{1} + return fileDescriptor_239d5a4df3139dce, []int{1} } func (m *LeaseList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_LeaseList proto.InternalMessageInfo func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } func (*LeaseSpec) ProtoMessage() {} func (*LeaseSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_929e1148ad9baca3, []int{2} + return fileDescriptor_239d5a4df3139dce, []int{2} } func (m *LeaseSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,45 +135,44 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1/generated.proto", fileDescriptor_929e1148ad9baca3) -} - -var fileDescriptor_929e1148ad9baca3 = []byte{ - // 539 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcf, 0x6e, 0xd3, 0x4c, - 0x14, 0xc5, 0xe3, 0x36, 0x91, 0x9a, 0xc9, 0xd7, 0x7e, 0x91, 0x95, 0x85, 0x95, 0x85, 0x5d, 0x22, - 0x21, 0x75, 0xc3, 0x0c, 0xa9, 0x10, 0x42, 0xac, 0x8a, 0x41, 0x40, 0xa5, 0x54, 0x48, 0x6e, 0x57, - 0xa8, 0x0b, 0x26, 0xf6, 0xc5, 0x19, 0x52, 0x7b, 0xcc, 0xcc, 0x38, 0xa8, 0x3b, 0x1e, 0x81, 0x2d, - 0x8f, 0x01, 0x4f, 0x91, 0x65, 0x97, 0x5d, 0x59, 0xc4, 0xbc, 0x08, 0x9a, 0x49, 0xda, 0x84, 0xfc, - 0x51, 0x2b, 0x76, 0x9e, 0x7b, 0xef, 0xf9, 0xdd, 0x73, 0xcf, 0xc2, 0xe8, 0xe5, 0xf0, 0x99, 0xc4, - 0x8c, 0x93, 0x61, 0xde, 0x07, 0x91, 0x82, 0x02, 0x49, 0x46, 0x90, 0x46, 0x5c, 0x90, 0x59, 0x83, - 0x66, 0x8c, 0x84, 0x9c, 0x8b, 0x88, 0xa5, 0x54, 0x31, 0x9e, 0x92, 0x51, 0x97, 0xc4, 0x90, 0x82, - 0xa0, 0x0a, 0x22, 0x9c, 0x09, 0xae, 0xb8, 0xdd, 0x9e, 0xce, 0x62, 0x9a, 0x31, 0xbc, 0x38, 0x8b, - 0x47, 0xdd, 0xf6, 0xa3, 0x98, 0xa9, 0x41, 0xde, 0xc7, 0x21, 0x4f, 0x48, 0xcc, 0x63, 0x4e, 0x8c, - 0xa4, 0x9f, 0x7f, 0x34, 0x2f, 0xf3, 0x30, 0x5f, 0x53, 0x54, 0xfb, 0xc9, 0x7c, 0x6d, 0x42, 0xc3, - 0x01, 0x4b, 0x41, 0x5c, 0x92, 0x6c, 0x18, 0xeb, 0x82, 0x24, 0x09, 0x28, 0xba, 0xc6, 0x40, 0x9b, - 0x6c, 0x52, 0x89, 0x3c, 0x55, 0x2c, 0x81, 0x15, 0xc1, 0xd3, 0xbb, 0x04, 0x32, 0x1c, 0x40, 0x42, - 0x97, 0x75, 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x42, 0xc8, 0xd3, 0x48, 0x9a, 0x58, 0x6b, 0xbe, 0x53, - 0x16, 0x5e, 0xab, 0xb7, 0xa6, 0x1f, 0xac, 0x55, 0xd9, 0x7d, 0xd4, 0xa0, 0xe1, 0xe7, 0x9c, 0x09, - 0x38, 0x63, 0x09, 0x38, 0xdb, 0x26, 0x40, 0x72, 0xbf, 0x00, 0x4f, 0x58, 0x28, 0xb8, 0x96, 0xf9, - 0xff, 0x97, 0x85, 0xd7, 0x78, 0x31, 0xe7, 0x04, 0x8b, 0x50, 0xfb, 0x1c, 0xd5, 0x05, 0xa4, 0xf0, - 0xc5, 0x6c, 0xa8, 0xfe, 0xdb, 0x86, 0xdd, 0xb2, 0xf0, 0xea, 0xc1, 0x0d, 0x25, 0x98, 0x03, 0xed, - 0x23, 0xd4, 0x34, 0x97, 0x9d, 0x09, 0x9a, 0x4a, 0xa6, 0x6f, 0x93, 0x4e, 0xcd, 0x64, 0xd1, 0x2a, - 0x0b, 0xaf, 0xd9, 0x5b, 0xea, 0x05, 0x2b, 0xd3, 0xfe, 0xd1, 0x78, 0xe2, 0x56, 0xae, 0x26, 0x6e, - 0xe5, 0x7a, 0xe2, 0x56, 0xbe, 0x96, 0xae, 0x35, 0x2e, 0x5d, 0xeb, 0xaa, 0x74, 0xad, 0xeb, 0xd2, - 0xb5, 0x7e, 0x95, 0xae, 0xf5, 0xed, 0xb7, 0x5b, 0x79, 0xdf, 0xde, 0xfc, 0x03, 0xf9, 0x13, 0x00, - 0x00, 0xff, 0xff, 0xef, 0xe4, 0x75, 0x3b, 0x76, 0x04, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/coordination/v1/generated.proto", fileDescriptor_239d5a4df3139dce) +} + +var fileDescriptor_239d5a4df3139dce = []byte{ + // 524 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x6f, 0xd3, 0x30, + 0x18, 0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 0x98, 0x5a, 0xab, + 0x81, 0xa3, 0x0a, 0xaf, 0xd9, 0x5d, 0x73, 0x1f, 0xae, 0x75, 0xd9, 0x3d, 0x54, 0x27, 0xd1, 0xd7, + 0x21, 0xe5, 0x70, 0x4a, 0x53, 0x70, 0xca, 0xa6, 0x40, 0xff, 0x6e, 0x05, 0x1e, 0xd3, 0x88, 0x33, + 0x6d, 0x0b, 0x1e, 0xaa, 0xc2, 0xab, 0xbf, 0x9e, 0x73, 0xc2, 0x45, 0xa8, 0x7d, 0x86, 0x6a, 0x1c, + 0x32, 0xf8, 0x66, 0x36, 0x54, 0xee, 0xb7, 0x61, 0x47, 0x15, 0x5e, 0x2d, 0xbc, 0xa6, 0x84, 0x73, + 0xa0, 0x7d, 0x88, 0x1a, 0xe6, 0x65, 0xa7, 0x9c, 0x64, 0x82, 0xea, 0xb7, 0x09, 0xa7, 0x6a, 0xba, + 0x68, 0xaa, 0xc2, 0x6b, 0x74, 0x97, 0xee, 0xc2, 0x15, 0x75, 0x70, 0x38, 0x9e, 0xb8, 0xa5, 0xcb, + 0x89, 0x5b, 0xba, 0x9a, 0xb8, 0xa5, 0xef, 0xca, 0xb5, 0xc6, 0xca, 0xb5, 0x2e, 0x95, 0x6b, 0x5d, + 0x29, 0xd7, 0xfa, 0xa3, 0x5c, 0xeb, 0xc7, 0x5f, 0xb7, 0xf4, 0xb1, 0xb5, 0xf9, 0x07, 0xf2, 0x2f, + 0x00, 0x00, 0xff, 0xff, 0xb0, 0xb0, 0x3a, 0x46, 0x5d, 0x04, 0x00, 0x00, } func (m *Lease) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go index 7334290fbbd..655de565901 100644 --- a/pkg/k8s/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1beta1/generated.proto +// source: k8s.io/api/coordination/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Lease) Reset() { *m = Lease{} } func (*Lease) ProtoMessage() {} func (*Lease) Descriptor() ([]byte, []int) { - return fileDescriptor_daca6bcd2ff63a80, []int{0} + return fileDescriptor_8d4e223b8bb23da3, []int{0} } func (m *Lease) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_Lease proto.InternalMessageInfo func (m *LeaseList) Reset() { *m = LeaseList{} } func (*LeaseList) ProtoMessage() {} func (*LeaseList) Descriptor() ([]byte, []int) { - return fileDescriptor_daca6bcd2ff63a80, []int{1} + return fileDescriptor_8d4e223b8bb23da3, []int{1} } func (m *LeaseList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_LeaseList proto.InternalMessageInfo func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } func (*LeaseSpec) ProtoMessage() {} func (*LeaseSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_daca6bcd2ff63a80, []int{2} + return fileDescriptor_8d4e223b8bb23da3, []int{2} } func (m *LeaseSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,45 +135,44 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1beta1/generated.proto", fileDescriptor_daca6bcd2ff63a80) -} - -var fileDescriptor_daca6bcd2ff63a80 = []byte{ - // 543 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xc1, 0x6e, 0xd3, 0x4e, - 0x10, 0xc6, 0xe3, 0xb6, 0x91, 0x9a, 0xcd, 0xbf, 0xfd, 0x47, 0x56, 0x0e, 0x56, 0x0e, 0x76, 0x95, - 0x03, 0xaa, 0x90, 0xd8, 0x25, 0x15, 0x42, 0x88, 0x13, 0x58, 0x20, 0xb5, 0xc2, 0x15, 0x92, 0xdb, - 0x13, 0xea, 0x81, 0xb5, 0x3d, 0x38, 0x4b, 0x6a, 0xaf, 0xd9, 0x5d, 0x07, 0xf5, 0xc6, 0x23, 0x70, - 0xe5, 0x45, 0xe0, 0x15, 0x72, 0xec, 0xb1, 0x27, 0x8b, 0x98, 0x17, 0x41, 0xde, 0xb8, 0x4d, 0x48, - 0x8a, 0x12, 0x71, 0xf3, 0xce, 0xcc, 0xf7, 0x9b, 0x6f, 0xbe, 0x83, 0xd1, 0xf1, 0xe8, 0x99, 0xc4, - 0x8c, 0x93, 0x51, 0x1e, 0x80, 0x48, 0x41, 0x81, 0x24, 0x63, 0x48, 0x23, 0x2e, 0x48, 0xdd, 0xa0, - 0x19, 0x23, 0x21, 0xe7, 0x22, 0x62, 0x29, 0x55, 0x8c, 0xa7, 0x64, 0x3c, 0x08, 0x40, 0xd1, 0x01, - 0x89, 0x21, 0x05, 0x41, 0x15, 0x44, 0x38, 0x13, 0x5c, 0x71, 0xd3, 0x99, 0x09, 0x30, 0xcd, 0x18, - 0x5e, 0x14, 0xe0, 0x5a, 0xd0, 0x7b, 0x14, 0x33, 0x35, 0xcc, 0x03, 0x1c, 0xf2, 0x84, 0xc4, 0x3c, - 0xe6, 0x44, 0xeb, 0x82, 0xfc, 0x83, 0x7e, 0xe9, 0x87, 0xfe, 0x9a, 0xf1, 0x7a, 0x4f, 0xe6, 0x06, - 0x12, 0x1a, 0x0e, 0x59, 0x0a, 0xe2, 0x8a, 0x64, 0xa3, 0xb8, 0x2a, 0x48, 0x92, 0x80, 0xa2, 0x64, - 0xbc, 0xe2, 0xa2, 0x47, 0xfe, 0xa6, 0x12, 0x79, 0xaa, 0x58, 0x02, 0x2b, 0x82, 0xa7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, 0x97, 0x15, 0xe8, 0x55, 0x2e, 0xf4, 0xfa, 0x33, 0x08, 0x79, 0x1a, 0x49, 0x1d, - 0x70, 0xd3, 0xb5, 0xca, 0xc2, 0xe9, 0x7a, 0xf7, 0xf4, 0xfd, 0x7b, 0x55, 0x66, 0x80, 0xda, 0x34, - 0xfc, 0x94, 0x33, 0x01, 0xe7, 0x2c, 0x01, 0x6b, 0x5b, 0xa7, 0x48, 0x36, 0x4b, 0xf1, 0x94, 0x85, - 0x82, 0x57, 0x32, 0xf7, 0xff, 0xb2, 0x70, 0xda, 0x2f, 0xe7, 0x1c, 0x7f, 0x11, 0x6a, 0x5e, 0xa0, - 0x96, 0x80, 0x14, 0x3e, 0xeb, 0x0d, 0x3b, 0xff, 0xb6, 0x61, 0xaf, 0x2c, 0x9c, 0x96, 0x7f, 0x4b, - 0xf1, 0xe7, 0x40, 0xf3, 0x05, 0xea, 0xe8, 0xcb, 0xce, 0x05, 0x4d, 0x25, 0xab, 0x6e, 0x93, 0x56, - 0x53, 0x67, 0xd1, 0x2d, 0x0b, 0xa7, 0xe3, 0x2d, 0xf5, 0xfc, 0x95, 0x69, 0xf7, 0xf5, 0x64, 0x6a, - 0x37, 0xae, 0xa7, 0x76, 0xe3, 0x66, 0x6a, 0x37, 0xbe, 0x94, 0xb6, 0x31, 0x29, 0x6d, 0xe3, 0xba, - 0xb4, 0x8d, 0x9b, 0xd2, 0x36, 0x7e, 0x96, 0xb6, 0xf1, 0xf5, 0x97, 0xdd, 0x78, 0xe7, 0xac, 0xf9, - 0xa9, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x19, 0x0e, 0xd7, 0x8f, 0x04, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/coordination/v1beta1/generated.proto", fileDescriptor_8d4e223b8bb23da3) +} + +var fileDescriptor_8d4e223b8bb23da3 = []byte{ + // 527 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x9b, 0xb5, 0x95, 0x56, 0x97, 0x8d, 0x2a, 0xea, 0x21, 0xea, 0x21, 0x99, 0x7a, 0x40, + 0x13, 0x12, 0x36, 0x9d, 0x10, 0x42, 0x9c, 0x20, 0x02, 0x89, 0x89, 0x4c, 0x48, 0xd9, 0x4e, 0x68, + 0x07, 0xdc, 0xe4, 0x91, 0x9a, 0x2e, 0x71, 0x88, 0xdd, 0xa2, 0xdd, 0xf8, 0x08, 0x5c, 0xf9, 0x22, + 0xf0, 0x15, 0x7a, 0xdc, 0x71, 0xa7, 0x88, 0x9a, 0x2f, 0x82, 0xec, 0x76, 0x6b, 0x69, 0x87, 0x5a, + 0x71, 0x8b, 0x9f, 0xdf, 0xef, 0xf7, 0xfe, 0x7e, 0x87, 0x20, 0x32, 0x7c, 0x26, 0x30, 0xe3, 0x84, + 0xe6, 0x8c, 0x44, 0x9c, 0x17, 0x31, 0xcb, 0xa8, 0x64, 0x3c, 0x23, 0xe3, 0x5e, 0x1f, 0x24, 0xed, + 0x91, 0x04, 0x32, 0x28, 0xa8, 0x84, 0x18, 0xe7, 0x05, 0x97, 0xdc, 0xf6, 0x66, 0x00, 0xa6, 0x39, + 0xc3, 0xcb, 0x00, 0x9e, 0x03, 0x9d, 0x47, 0x09, 0x93, 0x83, 0x51, 0x1f, 0x47, 0x3c, 0x25, 0x09, + 0x4f, 0x38, 0x31, 0x5c, 0x7f, 0xf4, 0xd1, 0x9c, 0xcc, 0xc1, 0x7c, 0xcd, 0x7c, 0x9d, 0x27, 0x8b, + 0x00, 0x29, 0x8d, 0x06, 0x2c, 0x83, 0xe2, 0x92, 0xe4, 0xc3, 0x44, 0x17, 0x04, 0x49, 0x41, 0x52, + 0x32, 0x5e, 0x4b, 0xd1, 0x21, 0xff, 0xa2, 0x8a, 0x51, 0x26, 0x59, 0x0a, 0x6b, 0xc0, 0xd3, 0x4d,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x5a, 0xf4, 0x6a, 0x54, 0x98, 0xf1, 0xa7, 0x10, 0xf1, 0x2c, 0x16, 0x66, + 0xc1, 0x75, 0xdf, 0x51, 0xa5, 0xd7, 0x0e, 0xee, 0xb8, 0x0f, 0xef, 0xa4, 0xec, 0x3e, 0x6a, 0xd2, + 0xe8, 0xf3, 0x88, 0x15, 0x70, 0xc6, 0x52, 0x70, 0xaa, 0x66, 0x8b, 0x64, 0xbb, 0x2d, 0x9e, 0xb0, + 0xa8, 0xe0, 0x1a, 0xf3, 0xef, 0xab, 0xd2, 0x6b, 0xbe, 0x5c, 0x78, 0xc2, 0x65, 0xa9, 0x7d, 0x8e, + 0x1a, 0x05, 0x64, 0xf0, 0xc5, 0x4c, 0xa8, 0xfd, 0xdf, 0x84, 0x3d, 0x55, 0x7a, 0x8d, 0xf0, 0xc6, + 0x12, 0x2e, 0x84, 0xf6, 0x0b, 0xd4, 0x32, 0x2f, 0x3b, 0x2b, 0x68, 0x26, 0x98, 0x7e, 0x9b, 0x70, + 0xea, 0x66, 0x17, 0x6d, 0x55, 0x7a, 0xad, 0x60, 0xe5, 0x2e, 0x5c, 0xeb, 0xf6, 0x5f, 0x4f, 0xa6, + 0x6e, 0xe5, 0x6a, 0xea, 0x56, 0xae, 0xa7, 0x6e, 0xe5, 0xab, 0x72, 0xad, 0x89, 0x72, 0xad, 0x2b, + 0xe5, 0x5a, 0xd7, 0xca, 0xb5, 0x7e, 0x29, 0xd7, 0xfa, 0xf6, 0xdb, 0xad, 0xbc, 0xf7, 0x36, 0xfc, + 0x54, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x81, 0x42, 0xfe, 0x76, 0x04, 0x00, 0x00, } func (m *Lease) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/core/v1/annotation_key_constants.go b/pkg/k8s/vendor/k8s.io/api/core/v1/annotation_key_constants.go index 106ba14c3df..5cf6f329f13 100644 --- a/pkg/k8s/vendor/k8s.io/api/core/v1/annotation_key_constants.go +++ b/pkg/k8s/vendor/k8s.io/api/core/v1/annotation_key_constants.go @@ -54,21 +54,18 @@ const ( // SeccompLocalhostProfileNamePrefix is the prefix for specifying profiles loaded from the node's disk. SeccompLocalhostProfileNamePrefix = "localhost/" - // AppArmorBetaContainerAnnotationKeyPrefix is the prefix to an annotation key specifying a container's apparmor profile. - AppArmorBetaContainerAnnotationKeyPrefix = "container.apparmor.security.beta.kubernetes.io/" - // AppArmorBetaDefaultProfileAnnotationKey is the annotation key specifying the default AppArmor profile. - AppArmorBetaDefaultProfileAnnotationKey = "apparmor.security.beta.kubernetes.io/defaultProfileName" - // AppArmorBetaAllowedProfilesAnnotationKey is the annotation key specifying the allowed AppArmor profiles. - AppArmorBetaAllowedProfilesAnnotationKey = "apparmor.security.beta.kubernetes.io/allowedProfileNames" + // DeprecatedAppArmorBetaContainerAnnotationKeyPrefix is the prefix to an annotation key specifying a container's apparmor profile. + // Deprecated: use a pod or container security context `appArmorProfile` field instead. + DeprecatedAppArmorBetaContainerAnnotationKeyPrefix = "container.apparmor.security.beta.kubernetes.io/" - // AppArmorBetaProfileRuntimeDefault is the profile specifying the runtime default. - AppArmorBetaProfileRuntimeDefault = "runtime/default" + // DeprecatedAppArmorBetaProfileRuntimeDefault is the profile specifying the runtime default. + DeprecatedAppArmorBetaProfileRuntimeDefault = "runtime/default" - // AppArmorBetaProfileNamePrefix is the prefix for specifying profiles loaded on the node. - AppArmorBetaProfileNamePrefix = "localhost/" + // DeprecatedAppArmorBetaProfileNamePrefix is the prefix for specifying profiles loaded on the node. + DeprecatedAppArmorBetaProfileNamePrefix = "localhost/" - // AppArmorBetaProfileNameUnconfined is the Unconfined AppArmor profile - AppArmorBetaProfileNameUnconfined = "unconfined" + // DeprecatedAppArmorBetaProfileNameUnconfined is the Unconfined AppArmor profile + DeprecatedAppArmorBetaProfileNameUnconfined = "unconfined" // DeprecatedSeccompProfileDockerDefault represents the default seccomp profile used by docker. // Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead. diff --git a/pkg/k8s/vendor/k8s.io/api/core/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/core/v1/generated.pb.go index 04c7939e0d5..d52d8da1896 100644 --- a/pkg/k8s/vendor/k8s.io/api/core/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/core/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/core/v1/generated.proto +// source: k8s.io/api/core/v1/generated.proto package v1 @@ -52,7 +52,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AWSElasticBlockStoreVolumeSource) Reset() { *m = AWSElasticBlockStoreVolumeSource{} } func (*AWSElasticBlockStoreVolumeSource) ProtoMessage() {} func (*AWSElasticBlockStoreVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{0} + return fileDescriptor_6c07b07c062484ab, []int{0} } func (m *AWSElasticBlockStoreVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +80,7 @@ var xxx_messageInfo_AWSElasticBlockStoreVolumeSource proto.InternalMessageInfo func (m *Affinity) Reset() { *m = Affinity{} } func (*Affinity) ProtoMessage() {} func (*Affinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{1} + return fileDescriptor_6c07b07c062484ab, []int{1} } func (m *Affinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,10 +105,38 @@ func (m *Affinity) XXX_DiscardUnknown() { var xxx_messageInfo_Affinity proto.InternalMessageInfo +func (m *AppArmorProfile) Reset() { *m = AppArmorProfile{} } +func (*AppArmorProfile) ProtoMessage() {} +func (*AppArmorProfile) Descriptor() ([]byte, []int) { + return fileDescriptor_6c07b07c062484ab, []int{2} +} +func (m *AppArmorProfile) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AppArmorProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *AppArmorProfile) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppArmorProfile.Merge(m, src) +} +func (m *AppArmorProfile) XXX_Size() int { + return m.Size() +} +func (m *AppArmorProfile) XXX_DiscardUnknown() { + xxx_messageInfo_AppArmorProfile.DiscardUnknown(m) +} + +var xxx_messageInfo_AppArmorProfile proto.InternalMessageInfo + func (m *AttachedVolume) Reset() { *m = AttachedVolume{} } func (*AttachedVolume) ProtoMessage() {} func (*AttachedVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{2} + return fileDescriptor_6c07b07c062484ab, []int{3} } func (m *AttachedVolume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -136,7 +164,7 @@ var xxx_messageInfo_AttachedVolume proto.InternalMessageInfo func (m *AvoidPods) Reset() { *m = AvoidPods{} } func (*AvoidPods) ProtoMessage() {} func (*AvoidPods) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{3} + return fileDescriptor_6c07b07c062484ab, []int{4} } func (m *AvoidPods) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +192,7 @@ var xxx_messageInfo_AvoidPods proto.InternalMessageInfo func (m *AzureDiskVolumeSource) Reset() { *m = AzureDiskVolumeSource{} } func (*AzureDiskVolumeSource) ProtoMessage() {} func (*AzureDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{4} + return fileDescriptor_6c07b07c062484ab, []int{5} } func (m *AzureDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +220,7 @@ var xxx_messageInfo_AzureDiskVolumeSource proto.InternalMessageInfo func (m *AzureFilePersistentVolumeSource) Reset() { *m = AzureFilePersistentVolumeSource{} } func (*AzureFilePersistentVolumeSource) ProtoMessage() {} func (*AzureFilePersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{5} + return fileDescriptor_6c07b07c062484ab, []int{6} } func (m *AzureFilePersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +248,7 @@ var xxx_messageInfo_AzureFilePersistentVolumeSource proto.InternalMessageInfo func (m *AzureFileVolumeSource) Reset() { *m = AzureFileVolumeSource{} } func (*AzureFileVolumeSource) ProtoMessage() {} func (*AzureFileVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{6} + return fileDescriptor_6c07b07c062484ab, []int{7} } func (m *AzureFileVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +276,7 @@ var xxx_messageInfo_AzureFileVolumeSource proto.InternalMessageInfo func (m *Binding) Reset() { *m = Binding{} } func (*Binding) ProtoMessage() {} func (*Binding) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{7} + return fileDescriptor_6c07b07c062484ab, []int{8} } func (m *Binding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +304,7 @@ var xxx_messageInfo_Binding proto.InternalMessageInfo func (m *CSIPersistentVolumeSource) Reset() { *m = CSIPersistentVolumeSource{} } func (*CSIPersistentVolumeSource) ProtoMessage() {} func (*CSIPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{8} + return fileDescriptor_6c07b07c062484ab, []int{9} } func (m *CSIPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -304,7 +332,7 @@ var xxx_messageInfo_CSIPersistentVolumeSource proto.InternalMessageInfo func (m *CSIVolumeSource) Reset() { *m = CSIVolumeSource{} } func (*CSIVolumeSource) ProtoMessage() {} func (*CSIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{9} + return fileDescriptor_6c07b07c062484ab, []int{10} } func (m *CSIVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +360,7 @@ var xxx_messageInfo_CSIVolumeSource proto.InternalMessageInfo func (m *Capabilities) Reset() { *m = Capabilities{} } func (*Capabilities) ProtoMessage() {} func (*Capabilities) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{10} + return fileDescriptor_6c07b07c062484ab, []int{11} } func (m *Capabilities) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +388,7 @@ var xxx_messageInfo_Capabilities proto.InternalMessageInfo func (m *CephFSPersistentVolumeSource) Reset() { *m = CephFSPersistentVolumeSource{} } func (*CephFSPersistentVolumeSource) ProtoMessage() {} func (*CephFSPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{11} + return fileDescriptor_6c07b07c062484ab, []int{12} } func (m *CephFSPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,7 +416,7 @@ var xxx_messageInfo_CephFSPersistentVolumeSource proto.InternalMessageInfo func (m *CephFSVolumeSource) Reset() { *m = CephFSVolumeSource{} } func (*CephFSVolumeSource) ProtoMessage() {} func (*CephFSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{12} + return fileDescriptor_6c07b07c062484ab, []int{13} } func (m *CephFSVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +444,7 @@ var xxx_messageInfo_CephFSVolumeSource proto.InternalMessageInfo func (m *CinderPersistentVolumeSource) Reset() { *m = CinderPersistentVolumeSource{} } func (*CinderPersistentVolumeSource) ProtoMessage() {} func (*CinderPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{13} + return fileDescriptor_6c07b07c062484ab, []int{14} } func (m *CinderPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,7 +472,7 @@ var xxx_messageInfo_CinderPersistentVolumeSource proto.InternalMessageInfo func (m *CinderVolumeSource) Reset() { *m = CinderVolumeSource{} } func (*CinderVolumeSource) ProtoMessage() {} func (*CinderVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{14} + return fileDescriptor_6c07b07c062484ab, []int{15} } func (m *CinderVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,7 +500,7 @@ var xxx_messageInfo_CinderVolumeSource proto.InternalMessageInfo func (m *ClaimSource) Reset() { *m = ClaimSource{} } func (*ClaimSource) ProtoMessage() {} func (*ClaimSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{15} + return fileDescriptor_6c07b07c062484ab, []int{16} } func (m *ClaimSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +528,7 @@ var xxx_messageInfo_ClaimSource proto.InternalMessageInfo func (m *ClientIPConfig) Reset() { *m = ClientIPConfig{} } func (*ClientIPConfig) ProtoMessage() {} func (*ClientIPConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{16} + return fileDescriptor_6c07b07c062484ab, []int{17} } func (m *ClientIPConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +556,7 @@ var xxx_messageInfo_ClientIPConfig proto.InternalMessageInfo func (m *ClusterTrustBundleProjection) Reset() { *m = ClusterTrustBundleProjection{} } func (*ClusterTrustBundleProjection) ProtoMessage() {} func (*ClusterTrustBundleProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{17} + return fileDescriptor_6c07b07c062484ab, []int{18} } func (m *ClusterTrustBundleProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +584,7 @@ var xxx_messageInfo_ClusterTrustBundleProjection proto.InternalMessageInfo func (m *ComponentCondition) Reset() { *m = ComponentCondition{} } func (*ComponentCondition) ProtoMessage() {} func (*ComponentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{18} + return fileDescriptor_6c07b07c062484ab, []int{19} } func (m *ComponentCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -584,7 +612,7 @@ var xxx_messageInfo_ComponentCondition proto.InternalMessageInfo func (m *ComponentStatus) Reset() { *m = ComponentStatus{} } func (*ComponentStatus) ProtoMessage() {} func (*ComponentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{19} + return fileDescriptor_6c07b07c062484ab, []int{20} } func (m *ComponentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -612,7 +640,7 @@ var xxx_messageInfo_ComponentStatus proto.InternalMessageInfo func (m *ComponentStatusList) Reset() { *m = ComponentStatusList{} } func (*ComponentStatusList) ProtoMessage() {} func (*ComponentStatusList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{20} + return fileDescriptor_6c07b07c062484ab, []int{21} } func (m *ComponentStatusList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -640,7 +668,7 @@ var xxx_messageInfo_ComponentStatusList proto.InternalMessageInfo func (m *ConfigMap) Reset() { *m = ConfigMap{} } func (*ConfigMap) ProtoMessage() {} func (*ConfigMap) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{21} + return fileDescriptor_6c07b07c062484ab, []int{22} } func (m *ConfigMap) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +696,7 @@ var xxx_messageInfo_ConfigMap proto.InternalMessageInfo func (m *ConfigMapEnvSource) Reset() { *m = ConfigMapEnvSource{} } func (*ConfigMapEnvSource) ProtoMessage() {} func (*ConfigMapEnvSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{22} + return fileDescriptor_6c07b07c062484ab, []int{23} } func (m *ConfigMapEnvSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +724,7 @@ var xxx_messageInfo_ConfigMapEnvSource proto.InternalMessageInfo func (m *ConfigMapKeySelector) Reset() { *m = ConfigMapKeySelector{} } func (*ConfigMapKeySelector) ProtoMessage() {} func (*ConfigMapKeySelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{23} + return fileDescriptor_6c07b07c062484ab, []int{24} } func (m *ConfigMapKeySelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,7 +752,7 @@ var xxx_messageInfo_ConfigMapKeySelector proto.InternalMessageInfo func (m *ConfigMapList) Reset() { *m = ConfigMapList{} } func (*ConfigMapList) ProtoMessage() {} func (*ConfigMapList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{24} + return fileDescriptor_6c07b07c062484ab, []int{25} } func (m *ConfigMapList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -752,7 +780,7 @@ var xxx_messageInfo_ConfigMapList proto.InternalMessageInfo func (m *ConfigMapNodeConfigSource) Reset() { *m = ConfigMapNodeConfigSource{} } func (*ConfigMapNodeConfigSource) ProtoMessage() {} func (*ConfigMapNodeConfigSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{25} + return fileDescriptor_6c07b07c062484ab, []int{26} } func (m *ConfigMapNodeConfigSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -780,7 +808,7 @@ var xxx_messageInfo_ConfigMapNodeConfigSource proto.InternalMessageInfo func (m *ConfigMapProjection) Reset() { *m = ConfigMapProjection{} } func (*ConfigMapProjection) ProtoMessage() {} func (*ConfigMapProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{26} + return fileDescriptor_6c07b07c062484ab, []int{27} } func (m *ConfigMapProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -808,7 +836,7 @@ var xxx_messageInfo_ConfigMapProjection proto.InternalMessageInfo func (m *ConfigMapVolumeSource) Reset() { *m = ConfigMapVolumeSource{} } func (*ConfigMapVolumeSource) ProtoMessage() {} func (*ConfigMapVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{27} + return fileDescriptor_6c07b07c062484ab, []int{28} } func (m *ConfigMapVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -836,7 +864,7 @@ var xxx_messageInfo_ConfigMapVolumeSource proto.InternalMessageInfo func (m *Container) Reset() { *m = Container{} } func (*Container) ProtoMessage() {} func (*Container) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{28} + return fileDescriptor_6c07b07c062484ab, []int{29} } func (m *Container) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -864,7 +892,7 @@ var xxx_messageInfo_Container proto.InternalMessageInfo func (m *ContainerImage) Reset() { *m = ContainerImage{} } func (*ContainerImage) ProtoMessage() {} func (*ContainerImage) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{29} + return fileDescriptor_6c07b07c062484ab, []int{30} } func (m *ContainerImage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -892,7 +920,7 @@ var xxx_messageInfo_ContainerImage proto.InternalMessageInfo func (m *ContainerPort) Reset() { *m = ContainerPort{} } func (*ContainerPort) ProtoMessage() {} func (*ContainerPort) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{30} + return fileDescriptor_6c07b07c062484ab, []int{31} } func (m *ContainerPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -920,7 +948,7 @@ var xxx_messageInfo_ContainerPort proto.InternalMessageInfo func (m *ContainerResizePolicy) Reset() { *m = ContainerResizePolicy{} } func (*ContainerResizePolicy) ProtoMessage() {} func (*ContainerResizePolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{31} + return fileDescriptor_6c07b07c062484ab, []int{32} } func (m *ContainerResizePolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -948,7 +976,7 @@ var xxx_messageInfo_ContainerResizePolicy proto.InternalMessageInfo func (m *ContainerState) Reset() { *m = ContainerState{} } func (*ContainerState) ProtoMessage() {} func (*ContainerState) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{32} + return fileDescriptor_6c07b07c062484ab, []int{33} } func (m *ContainerState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -976,7 +1004,7 @@ var xxx_messageInfo_ContainerState proto.InternalMessageInfo func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} } func (*ContainerStateRunning) ProtoMessage() {} func (*ContainerStateRunning) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{33} + return fileDescriptor_6c07b07c062484ab, []int{34} } func (m *ContainerStateRunning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1004,7 +1032,7 @@ var xxx_messageInfo_ContainerStateRunning proto.InternalMessageInfo func (m *ContainerStateTerminated) Reset() { *m = ContainerStateTerminated{} } func (*ContainerStateTerminated) ProtoMessage() {} func (*ContainerStateTerminated) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{34} + return fileDescriptor_6c07b07c062484ab, []int{35} } func (m *ContainerStateTerminated) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1032,7 +1060,7 @@ var xxx_messageInfo_ContainerStateTerminated proto.InternalMessageInfo func (m *ContainerStateWaiting) Reset() { *m = ContainerStateWaiting{} } func (*ContainerStateWaiting) ProtoMessage() {} func (*ContainerStateWaiting) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{35} + return fileDescriptor_6c07b07c062484ab, []int{36} } func (m *ContainerStateWaiting) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1060,7 +1088,7 @@ var xxx_messageInfo_ContainerStateWaiting proto.InternalMessageInfo func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } func (*ContainerStatus) ProtoMessage() {} func (*ContainerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{36} + return fileDescriptor_6c07b07c062484ab, []int{37} } func (m *ContainerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1088,7 +1116,7 @@ var xxx_messageInfo_ContainerStatus proto.InternalMessageInfo func (m *DaemonEndpoint) Reset() { *m = DaemonEndpoint{} } func (*DaemonEndpoint) ProtoMessage() {} func (*DaemonEndpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{37} + return fileDescriptor_6c07b07c062484ab, []int{38} } func (m *DaemonEndpoint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1116,7 +1144,7 @@ var xxx_messageInfo_DaemonEndpoint proto.InternalMessageInfo func (m *DownwardAPIProjection) Reset() { *m = DownwardAPIProjection{} } func (*DownwardAPIProjection) ProtoMessage() {} func (*DownwardAPIProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{38} + return fileDescriptor_6c07b07c062484ab, []int{39} } func (m *DownwardAPIProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1144,7 +1172,7 @@ var xxx_messageInfo_DownwardAPIProjection proto.InternalMessageInfo func (m *DownwardAPIVolumeFile) Reset() { *m = DownwardAPIVolumeFile{} } func (*DownwardAPIVolumeFile) ProtoMessage() {} func (*DownwardAPIVolumeFile) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{39} + return fileDescriptor_6c07b07c062484ab, []int{40} } func (m *DownwardAPIVolumeFile) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1172,7 +1200,7 @@ var xxx_messageInfo_DownwardAPIVolumeFile proto.InternalMessageInfo func (m *DownwardAPIVolumeSource) Reset() { *m = DownwardAPIVolumeSource{} } func (*DownwardAPIVolumeSource) ProtoMessage() {} func (*DownwardAPIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{40} + return fileDescriptor_6c07b07c062484ab, []int{41} } func (m *DownwardAPIVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1200,7 +1228,7 @@ var xxx_messageInfo_DownwardAPIVolumeSource proto.InternalMessageInfo func (m *EmptyDirVolumeSource) Reset() { *m = EmptyDirVolumeSource{} } func (*EmptyDirVolumeSource) ProtoMessage() {} func (*EmptyDirVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{41} + return fileDescriptor_6c07b07c062484ab, []int{42} } func (m *EmptyDirVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1228,7 +1256,7 @@ var xxx_messageInfo_EmptyDirVolumeSource proto.InternalMessageInfo func (m *EndpointAddress) Reset() { *m = EndpointAddress{} } func (*EndpointAddress) ProtoMessage() {} func (*EndpointAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{42} + return fileDescriptor_6c07b07c062484ab, []int{43} } func (m *EndpointAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1256,7 +1284,7 @@ var xxx_messageInfo_EndpointAddress proto.InternalMessageInfo func (m *EndpointPort) Reset() { *m = EndpointPort{} } func (*EndpointPort) ProtoMessage() {} func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{43} + return fileDescriptor_6c07b07c062484ab, []int{44} } func (m *EndpointPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1284,7 +1312,7 @@ var xxx_messageInfo_EndpointPort proto.InternalMessageInfo func (m *EndpointSubset) Reset() { *m = EndpointSubset{} } func (*EndpointSubset) ProtoMessage() {} func (*EndpointSubset) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{44} + return fileDescriptor_6c07b07c062484ab, []int{45} } func (m *EndpointSubset) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1312,7 +1340,7 @@ var xxx_messageInfo_EndpointSubset proto.InternalMessageInfo func (m *Endpoints) Reset() { *m = Endpoints{} } func (*Endpoints) ProtoMessage() {} func (*Endpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{45} + return fileDescriptor_6c07b07c062484ab, []int{46} } func (m *Endpoints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1340,7 +1368,7 @@ var xxx_messageInfo_Endpoints proto.InternalMessageInfo func (m *EndpointsList) Reset() { *m = EndpointsList{} } func (*EndpointsList) ProtoMessage() {} func (*EndpointsList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{46} + return fileDescriptor_6c07b07c062484ab, []int{47} } func (m *EndpointsList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1368,7 +1396,7 @@ var xxx_messageInfo_EndpointsList proto.InternalMessageInfo func (m *EnvFromSource) Reset() { *m = EnvFromSource{} } func (*EnvFromSource) ProtoMessage() {} func (*EnvFromSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{47} + return fileDescriptor_6c07b07c062484ab, []int{48} } func (m *EnvFromSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1396,7 +1424,7 @@ var xxx_messageInfo_EnvFromSource proto.InternalMessageInfo func (m *EnvVar) Reset() { *m = EnvVar{} } func (*EnvVar) ProtoMessage() {} func (*EnvVar) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{48} + return fileDescriptor_6c07b07c062484ab, []int{49} } func (m *EnvVar) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1424,7 +1452,7 @@ var xxx_messageInfo_EnvVar proto.InternalMessageInfo func (m *EnvVarSource) Reset() { *m = EnvVarSource{} } func (*EnvVarSource) ProtoMessage() {} func (*EnvVarSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{49} + return fileDescriptor_6c07b07c062484ab, []int{50} } func (m *EnvVarSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1452,7 +1480,7 @@ var xxx_messageInfo_EnvVarSource proto.InternalMessageInfo func (m *EphemeralContainer) Reset() { *m = EphemeralContainer{} } func (*EphemeralContainer) ProtoMessage() {} func (*EphemeralContainer) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{50} + return fileDescriptor_6c07b07c062484ab, []int{51} } func (m *EphemeralContainer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1480,7 +1508,7 @@ var xxx_messageInfo_EphemeralContainer proto.InternalMessageInfo func (m *EphemeralContainerCommon) Reset() { *m = EphemeralContainerCommon{} } func (*EphemeralContainerCommon) ProtoMessage() {} func (*EphemeralContainerCommon) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{51} + return fileDescriptor_6c07b07c062484ab, []int{52} } func (m *EphemeralContainerCommon) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1508,7 +1536,7 @@ var xxx_messageInfo_EphemeralContainerCommon proto.InternalMessageInfo func (m *EphemeralVolumeSource) Reset() { *m = EphemeralVolumeSource{} } func (*EphemeralVolumeSource) ProtoMessage() {} func (*EphemeralVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{52} + return fileDescriptor_6c07b07c062484ab, []int{53} } func (m *EphemeralVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1536,7 +1564,7 @@ var xxx_messageInfo_EphemeralVolumeSource proto.InternalMessageInfo func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{53} + return fileDescriptor_6c07b07c062484ab, []int{54} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1564,7 +1592,7 @@ var xxx_messageInfo_Event proto.InternalMessageInfo func (m *EventList) Reset() { *m = EventList{} } func (*EventList) ProtoMessage() {} func (*EventList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{54} + return fileDescriptor_6c07b07c062484ab, []int{55} } func (m *EventList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1592,7 +1620,7 @@ var xxx_messageInfo_EventList proto.InternalMessageInfo func (m *EventSeries) Reset() { *m = EventSeries{} } func (*EventSeries) ProtoMessage() {} func (*EventSeries) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{55} + return fileDescriptor_6c07b07c062484ab, []int{56} } func (m *EventSeries) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1620,7 +1648,7 @@ var xxx_messageInfo_EventSeries proto.InternalMessageInfo func (m *EventSource) Reset() { *m = EventSource{} } func (*EventSource) ProtoMessage() {} func (*EventSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{56} + return fileDescriptor_6c07b07c062484ab, []int{57} } func (m *EventSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1648,7 +1676,7 @@ var xxx_messageInfo_EventSource proto.InternalMessageInfo func (m *ExecAction) Reset() { *m = ExecAction{} } func (*ExecAction) ProtoMessage() {} func (*ExecAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{57} + return fileDescriptor_6c07b07c062484ab, []int{58} } func (m *ExecAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1676,7 +1704,7 @@ var xxx_messageInfo_ExecAction proto.InternalMessageInfo func (m *FCVolumeSource) Reset() { *m = FCVolumeSource{} } func (*FCVolumeSource) ProtoMessage() {} func (*FCVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{58} + return fileDescriptor_6c07b07c062484ab, []int{59} } func (m *FCVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1704,7 +1732,7 @@ var xxx_messageInfo_FCVolumeSource proto.InternalMessageInfo func (m *FlexPersistentVolumeSource) Reset() { *m = FlexPersistentVolumeSource{} } func (*FlexPersistentVolumeSource) ProtoMessage() {} func (*FlexPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{59} + return fileDescriptor_6c07b07c062484ab, []int{60} } func (m *FlexPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1732,7 +1760,7 @@ var xxx_messageInfo_FlexPersistentVolumeSource proto.InternalMessageInfo func (m *FlexVolumeSource) Reset() { *m = FlexVolumeSource{} } func (*FlexVolumeSource) ProtoMessage() {} func (*FlexVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{60} + return fileDescriptor_6c07b07c062484ab, []int{61} } func (m *FlexVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1760,7 +1788,7 @@ var xxx_messageInfo_FlexVolumeSource proto.InternalMessageInfo func (m *FlockerVolumeSource) Reset() { *m = FlockerVolumeSource{} } func (*FlockerVolumeSource) ProtoMessage() {} func (*FlockerVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{61} + return fileDescriptor_6c07b07c062484ab, []int{62} } func (m *FlockerVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1788,7 +1816,7 @@ var xxx_messageInfo_FlockerVolumeSource proto.InternalMessageInfo func (m *GCEPersistentDiskVolumeSource) Reset() { *m = GCEPersistentDiskVolumeSource{} } func (*GCEPersistentDiskVolumeSource) ProtoMessage() {} func (*GCEPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{62} + return fileDescriptor_6c07b07c062484ab, []int{63} } func (m *GCEPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1816,7 +1844,7 @@ var xxx_messageInfo_GCEPersistentDiskVolumeSource proto.InternalMessageInfo func (m *GRPCAction) Reset() { *m = GRPCAction{} } func (*GRPCAction) ProtoMessage() {} func (*GRPCAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{63} + return fileDescriptor_6c07b07c062484ab, []int{64} } func (m *GRPCAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1844,7 +1872,7 @@ var xxx_messageInfo_GRPCAction proto.InternalMessageInfo func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSource{} } func (*GitRepoVolumeSource) ProtoMessage() {} func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{64} + return fileDescriptor_6c07b07c062484ab, []int{65} } func (m *GitRepoVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1872,7 +1900,7 @@ var xxx_messageInfo_GitRepoVolumeSource proto.InternalMessageInfo func (m *GlusterfsPersistentVolumeSource) Reset() { *m = GlusterfsPersistentVolumeSource{} } func (*GlusterfsPersistentVolumeSource) ProtoMessage() {} func (*GlusterfsPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{65} + return fileDescriptor_6c07b07c062484ab, []int{66} } func (m *GlusterfsPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1900,7 +1928,7 @@ var xxx_messageInfo_GlusterfsPersistentVolumeSource proto.InternalMessageInfo func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} } func (*GlusterfsVolumeSource) ProtoMessage() {} func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{66} + return fileDescriptor_6c07b07c062484ab, []int{67} } func (m *GlusterfsVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1928,7 +1956,7 @@ var xxx_messageInfo_GlusterfsVolumeSource proto.InternalMessageInfo func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} } func (*HTTPGetAction) ProtoMessage() {} func (*HTTPGetAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{67} + return fileDescriptor_6c07b07c062484ab, []int{68} } func (m *HTTPGetAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1956,7 +1984,7 @@ var xxx_messageInfo_HTTPGetAction proto.InternalMessageInfo func (m *HTTPHeader) Reset() { *m = HTTPHeader{} } func (*HTTPHeader) ProtoMessage() {} func (*HTTPHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{68} + return fileDescriptor_6c07b07c062484ab, []int{69} } func (m *HTTPHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1984,7 +2012,7 @@ var xxx_messageInfo_HTTPHeader proto.InternalMessageInfo func (m *HostAlias) Reset() { *m = HostAlias{} } func (*HostAlias) ProtoMessage() {} func (*HostAlias) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{69} + return fileDescriptor_6c07b07c062484ab, []int{70} } func (m *HostAlias) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2012,7 +2040,7 @@ var xxx_messageInfo_HostAlias proto.InternalMessageInfo func (m *HostIP) Reset() { *m = HostIP{} } func (*HostIP) ProtoMessage() {} func (*HostIP) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{70} + return fileDescriptor_6c07b07c062484ab, []int{71} } func (m *HostIP) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2040,7 +2068,7 @@ var xxx_messageInfo_HostIP proto.InternalMessageInfo func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} } func (*HostPathVolumeSource) ProtoMessage() {} func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{71} + return fileDescriptor_6c07b07c062484ab, []int{72} } func (m *HostPathVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2068,7 +2096,7 @@ var xxx_messageInfo_HostPathVolumeSource proto.InternalMessageInfo func (m *ISCSIPersistentVolumeSource) Reset() { *m = ISCSIPersistentVolumeSource{} } func (*ISCSIPersistentVolumeSource) ProtoMessage() {} func (*ISCSIPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{72} + return fileDescriptor_6c07b07c062484ab, []int{73} } func (m *ISCSIPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2096,7 +2124,7 @@ var xxx_messageInfo_ISCSIPersistentVolumeSource proto.InternalMessageInfo func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} } func (*ISCSIVolumeSource) ProtoMessage() {} func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{73} + return fileDescriptor_6c07b07c062484ab, []int{74} } func (m *ISCSIVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2124,7 +2152,7 @@ var xxx_messageInfo_ISCSIVolumeSource proto.InternalMessageInfo func (m *KeyToPath) Reset() { *m = KeyToPath{} } func (*KeyToPath) ProtoMessage() {} func (*KeyToPath) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{74} + return fileDescriptor_6c07b07c062484ab, []int{75} } func (m *KeyToPath) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2152,7 +2180,7 @@ var xxx_messageInfo_KeyToPath proto.InternalMessageInfo func (m *Lifecycle) Reset() { *m = Lifecycle{} } func (*Lifecycle) ProtoMessage() {} func (*Lifecycle) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{75} + return fileDescriptor_6c07b07c062484ab, []int{76} } func (m *Lifecycle) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2180,7 +2208,7 @@ var xxx_messageInfo_Lifecycle proto.InternalMessageInfo func (m *LifecycleHandler) Reset() { *m = LifecycleHandler{} } func (*LifecycleHandler) ProtoMessage() {} func (*LifecycleHandler) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{76} + return fileDescriptor_6c07b07c062484ab, []int{77} } func (m *LifecycleHandler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2208,7 +2236,7 @@ var xxx_messageInfo_LifecycleHandler proto.InternalMessageInfo func (m *LimitRange) Reset() { *m = LimitRange{} } func (*LimitRange) ProtoMessage() {} func (*LimitRange) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{77} + return fileDescriptor_6c07b07c062484ab, []int{78} } func (m *LimitRange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2236,7 +2264,7 @@ var xxx_messageInfo_LimitRange proto.InternalMessageInfo func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} } func (*LimitRangeItem) ProtoMessage() {} func (*LimitRangeItem) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{78} + return fileDescriptor_6c07b07c062484ab, []int{79} } func (m *LimitRangeItem) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2264,7 +2292,7 @@ var xxx_messageInfo_LimitRangeItem proto.InternalMessageInfo func (m *LimitRangeList) Reset() { *m = LimitRangeList{} } func (*LimitRangeList) ProtoMessage() {} func (*LimitRangeList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{79} + return fileDescriptor_6c07b07c062484ab, []int{80} } func (m *LimitRangeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2292,7 +2320,7 @@ var xxx_messageInfo_LimitRangeList proto.InternalMessageInfo func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} } func (*LimitRangeSpec) ProtoMessage() {} func (*LimitRangeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{80} + return fileDescriptor_6c07b07c062484ab, []int{81} } func (m *LimitRangeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2320,7 +2348,7 @@ var xxx_messageInfo_LimitRangeSpec proto.InternalMessageInfo func (m *List) Reset() { *m = List{} } func (*List) ProtoMessage() {} func (*List) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{81} + return fileDescriptor_6c07b07c062484ab, []int{82} } func (m *List) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2348,7 +2376,7 @@ var xxx_messageInfo_List proto.InternalMessageInfo func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} } func (*LoadBalancerIngress) ProtoMessage() {} func (*LoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{82} + return fileDescriptor_6c07b07c062484ab, []int{83} } func (m *LoadBalancerIngress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2376,7 +2404,7 @@ var xxx_messageInfo_LoadBalancerIngress proto.InternalMessageInfo func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} } func (*LoadBalancerStatus) ProtoMessage() {} func (*LoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{83} + return fileDescriptor_6c07b07c062484ab, []int{84} } func (m *LoadBalancerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2404,7 +2432,7 @@ var xxx_messageInfo_LoadBalancerStatus proto.InternalMessageInfo func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} } func (*LocalObjectReference) ProtoMessage() {} func (*LocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{84} + return fileDescriptor_6c07b07c062484ab, []int{85} } func (m *LocalObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2432,7 +2460,7 @@ var xxx_messageInfo_LocalObjectReference proto.InternalMessageInfo func (m *LocalVolumeSource) Reset() { *m = LocalVolumeSource{} } func (*LocalVolumeSource) ProtoMessage() {} func (*LocalVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{85} + return fileDescriptor_6c07b07c062484ab, []int{86} } func (m *LocalVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2460,7 +2488,7 @@ var xxx_messageInfo_LocalVolumeSource proto.InternalMessageInfo func (m *ModifyVolumeStatus) Reset() { *m = ModifyVolumeStatus{} } func (*ModifyVolumeStatus) ProtoMessage() {} func (*ModifyVolumeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{86} + return fileDescriptor_6c07b07c062484ab, []int{87} } func (m *ModifyVolumeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2488,7 +2516,7 @@ var xxx_messageInfo_ModifyVolumeStatus proto.InternalMessageInfo func (m *NFSVolumeSource) Reset() { *m = NFSVolumeSource{} } func (*NFSVolumeSource) ProtoMessage() {} func (*NFSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{87} + return fileDescriptor_6c07b07c062484ab, []int{88} } func (m *NFSVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2516,7 +2544,7 @@ var xxx_messageInfo_NFSVolumeSource proto.InternalMessageInfo func (m *Namespace) Reset() { *m = Namespace{} } func (*Namespace) ProtoMessage() {} func (*Namespace) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{88} + return fileDescriptor_6c07b07c062484ab, []int{89} } func (m *Namespace) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2544,7 +2572,7 @@ var xxx_messageInfo_Namespace proto.InternalMessageInfo func (m *NamespaceCondition) Reset() { *m = NamespaceCondition{} } func (*NamespaceCondition) ProtoMessage() {} func (*NamespaceCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{89} + return fileDescriptor_6c07b07c062484ab, []int{90} } func (m *NamespaceCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2572,7 +2600,7 @@ var xxx_messageInfo_NamespaceCondition proto.InternalMessageInfo func (m *NamespaceList) Reset() { *m = NamespaceList{} } func (*NamespaceList) ProtoMessage() {} func (*NamespaceList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{90} + return fileDescriptor_6c07b07c062484ab, []int{91} } func (m *NamespaceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2600,7 +2628,7 @@ var xxx_messageInfo_NamespaceList proto.InternalMessageInfo func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} } func (*NamespaceSpec) ProtoMessage() {} func (*NamespaceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{91} + return fileDescriptor_6c07b07c062484ab, []int{92} } func (m *NamespaceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2628,7 +2656,7 @@ var xxx_messageInfo_NamespaceSpec proto.InternalMessageInfo func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} } func (*NamespaceStatus) ProtoMessage() {} func (*NamespaceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{92} + return fileDescriptor_6c07b07c062484ab, []int{93} } func (m *NamespaceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2656,7 +2684,7 @@ var xxx_messageInfo_NamespaceStatus proto.InternalMessageInfo func (m *Node) Reset() { *m = Node{} } func (*Node) ProtoMessage() {} func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{93} + return fileDescriptor_6c07b07c062484ab, []int{94} } func (m *Node) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2684,7 +2712,7 @@ var xxx_messageInfo_Node proto.InternalMessageInfo func (m *NodeAddress) Reset() { *m = NodeAddress{} } func (*NodeAddress) ProtoMessage() {} func (*NodeAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{94} + return fileDescriptor_6c07b07c062484ab, []int{95} } func (m *NodeAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2712,7 +2740,7 @@ var xxx_messageInfo_NodeAddress proto.InternalMessageInfo func (m *NodeAffinity) Reset() { *m = NodeAffinity{} } func (*NodeAffinity) ProtoMessage() {} func (*NodeAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{95} + return fileDescriptor_6c07b07c062484ab, []int{96} } func (m *NodeAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2740,7 +2768,7 @@ var xxx_messageInfo_NodeAffinity proto.InternalMessageInfo func (m *NodeCondition) Reset() { *m = NodeCondition{} } func (*NodeCondition) ProtoMessage() {} func (*NodeCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{96} + return fileDescriptor_6c07b07c062484ab, []int{97} } func (m *NodeCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2768,7 +2796,7 @@ var xxx_messageInfo_NodeCondition proto.InternalMessageInfo func (m *NodeConfigSource) Reset() { *m = NodeConfigSource{} } func (*NodeConfigSource) ProtoMessage() {} func (*NodeConfigSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{97} + return fileDescriptor_6c07b07c062484ab, []int{98} } func (m *NodeConfigSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2796,7 +2824,7 @@ var xxx_messageInfo_NodeConfigSource proto.InternalMessageInfo func (m *NodeConfigStatus) Reset() { *m = NodeConfigStatus{} } func (*NodeConfigStatus) ProtoMessage() {} func (*NodeConfigStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{98} + return fileDescriptor_6c07b07c062484ab, []int{99} } func (m *NodeConfigStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2824,7 +2852,7 @@ var xxx_messageInfo_NodeConfigStatus proto.InternalMessageInfo func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} } func (*NodeDaemonEndpoints) ProtoMessage() {} func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{99} + return fileDescriptor_6c07b07c062484ab, []int{100} } func (m *NodeDaemonEndpoints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2852,7 +2880,7 @@ var xxx_messageInfo_NodeDaemonEndpoints proto.InternalMessageInfo func (m *NodeList) Reset() { *m = NodeList{} } func (*NodeList) ProtoMessage() {} func (*NodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{100} + return fileDescriptor_6c07b07c062484ab, []int{101} } func (m *NodeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2880,7 +2908,7 @@ var xxx_messageInfo_NodeList proto.InternalMessageInfo func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} } func (*NodeProxyOptions) ProtoMessage() {} func (*NodeProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{101} + return fileDescriptor_6c07b07c062484ab, []int{102} } func (m *NodeProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2905,15 +2933,15 @@ func (m *NodeProxyOptions) XXX_DiscardUnknown() { var xxx_messageInfo_NodeProxyOptions proto.InternalMessageInfo -func (m *NodeResources) Reset() { *m = NodeResources{} } -func (*NodeResources) ProtoMessage() {} -func (*NodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{102} +func (m *NodeRuntimeHandler) Reset() { *m = NodeRuntimeHandler{} } +func (*NodeRuntimeHandler) ProtoMessage() {} +func (*NodeRuntimeHandler) Descriptor() ([]byte, []int) { + return fileDescriptor_6c07b07c062484ab, []int{103} } -func (m *NodeResources) XXX_Unmarshal(b []byte) error { +func (m *NodeRuntimeHandler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NodeResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *NodeRuntimeHandler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -2921,22 +2949,50 @@ func (m *NodeResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error } return b[:n], nil } -func (m *NodeResources) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeResources.Merge(m, src) +func (m *NodeRuntimeHandler) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeRuntimeHandler.Merge(m, src) } -func (m *NodeResources) XXX_Size() int { +func (m *NodeRuntimeHandler) XXX_Size() int { return m.Size() } -func (m *NodeResources) XXX_DiscardUnknown() { - xxx_messageInfo_NodeResources.DiscardUnknown(m) +func (m *NodeRuntimeHandler) XXX_DiscardUnknown() { + xxx_messageInfo_NodeRuntimeHandler.DiscardUnknown(m) } -var xxx_messageInfo_NodeResources proto.InternalMessageInfo +var xxx_messageInfo_NodeRuntimeHandler proto.InternalMessageInfo + +func (m *NodeRuntimeHandlerFeatures) Reset() { *m = NodeRuntimeHandlerFeatures{} } +func (*NodeRuntimeHandlerFeatures) ProtoMessage() {} +func (*NodeRuntimeHandlerFeatures) Descriptor() ([]byte, []int) { + return fileDescriptor_6c07b07c062484ab, []int{104} +} +func (m *NodeRuntimeHandlerFeatures) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeRuntimeHandlerFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NodeRuntimeHandlerFeatures) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeRuntimeHandlerFeatures.Merge(m, src) +} +func (m *NodeRuntimeHandlerFeatures) XXX_Size() int { + return m.Size() +} +func (m *NodeRuntimeHandlerFeatures) XXX_DiscardUnknown() { + xxx_messageInfo_NodeRuntimeHandlerFeatures.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeRuntimeHandlerFeatures proto.InternalMessageInfo func (m *NodeSelector) Reset() { *m = NodeSelector{} } func (*NodeSelector) ProtoMessage() {} func (*NodeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{103} + return fileDescriptor_6c07b07c062484ab, []int{105} } func (m *NodeSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2964,7 +3020,7 @@ var xxx_messageInfo_NodeSelector proto.InternalMessageInfo func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} } func (*NodeSelectorRequirement) ProtoMessage() {} func (*NodeSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{104} + return fileDescriptor_6c07b07c062484ab, []int{106} } func (m *NodeSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2992,7 +3048,7 @@ var xxx_messageInfo_NodeSelectorRequirement proto.InternalMessageInfo func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} } func (*NodeSelectorTerm) ProtoMessage() {} func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{105} + return fileDescriptor_6c07b07c062484ab, []int{107} } func (m *NodeSelectorTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3020,7 +3076,7 @@ var xxx_messageInfo_NodeSelectorTerm proto.InternalMessageInfo func (m *NodeSpec) Reset() { *m = NodeSpec{} } func (*NodeSpec) ProtoMessage() {} func (*NodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{106} + return fileDescriptor_6c07b07c062484ab, []int{108} } func (m *NodeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3048,7 +3104,7 @@ var xxx_messageInfo_NodeSpec proto.InternalMessageInfo func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{107} + return fileDescriptor_6c07b07c062484ab, []int{109} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3076,7 +3132,7 @@ var xxx_messageInfo_NodeStatus proto.InternalMessageInfo func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} } func (*NodeSystemInfo) ProtoMessage() {} func (*NodeSystemInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{108} + return fileDescriptor_6c07b07c062484ab, []int{110} } func (m *NodeSystemInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3104,7 +3160,7 @@ var xxx_messageInfo_NodeSystemInfo proto.InternalMessageInfo func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} } func (*ObjectFieldSelector) ProtoMessage() {} func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{109} + return fileDescriptor_6c07b07c062484ab, []int{111} } func (m *ObjectFieldSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3132,7 +3188,7 @@ var xxx_messageInfo_ObjectFieldSelector proto.InternalMessageInfo func (m *ObjectReference) Reset() { *m = ObjectReference{} } func (*ObjectReference) ProtoMessage() {} func (*ObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{110} + return fileDescriptor_6c07b07c062484ab, []int{112} } func (m *ObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3160,7 +3216,7 @@ var xxx_messageInfo_ObjectReference proto.InternalMessageInfo func (m *PersistentVolume) Reset() { *m = PersistentVolume{} } func (*PersistentVolume) ProtoMessage() {} func (*PersistentVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{111} + return fileDescriptor_6c07b07c062484ab, []int{113} } func (m *PersistentVolume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3188,7 +3244,7 @@ var xxx_messageInfo_PersistentVolume proto.InternalMessageInfo func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } func (*PersistentVolumeClaim) ProtoMessage() {} func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{112} + return fileDescriptor_6c07b07c062484ab, []int{114} } func (m *PersistentVolumeClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3216,7 +3272,7 @@ var xxx_messageInfo_PersistentVolumeClaim proto.InternalMessageInfo func (m *PersistentVolumeClaimCondition) Reset() { *m = PersistentVolumeClaimCondition{} } func (*PersistentVolumeClaimCondition) ProtoMessage() {} func (*PersistentVolumeClaimCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{113} + return fileDescriptor_6c07b07c062484ab, []int{115} } func (m *PersistentVolumeClaimCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3244,7 +3300,7 @@ var xxx_messageInfo_PersistentVolumeClaimCondition proto.InternalMessageInfo func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} } func (*PersistentVolumeClaimList) ProtoMessage() {} func (*PersistentVolumeClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{114} + return fileDescriptor_6c07b07c062484ab, []int{116} } func (m *PersistentVolumeClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3272,7 +3328,7 @@ var xxx_messageInfo_PersistentVolumeClaimList proto.InternalMessageInfo func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} } func (*PersistentVolumeClaimSpec) ProtoMessage() {} func (*PersistentVolumeClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{115} + return fileDescriptor_6c07b07c062484ab, []int{117} } func (m *PersistentVolumeClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3300,7 +3356,7 @@ var xxx_messageInfo_PersistentVolumeClaimSpec proto.InternalMessageInfo func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} } func (*PersistentVolumeClaimStatus) ProtoMessage() {} func (*PersistentVolumeClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{116} + return fileDescriptor_6c07b07c062484ab, []int{118} } func (m *PersistentVolumeClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3328,7 +3384,7 @@ var xxx_messageInfo_PersistentVolumeClaimStatus proto.InternalMessageInfo func (m *PersistentVolumeClaimTemplate) Reset() { *m = PersistentVolumeClaimTemplate{} } func (*PersistentVolumeClaimTemplate) ProtoMessage() {} func (*PersistentVolumeClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{117} + return fileDescriptor_6c07b07c062484ab, []int{119} } func (m *PersistentVolumeClaimTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3356,7 +3412,7 @@ var xxx_messageInfo_PersistentVolumeClaimTemplate proto.InternalMessageInfo func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} } func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {} func (*PersistentVolumeClaimVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{118} + return fileDescriptor_6c07b07c062484ab, []int{120} } func (m *PersistentVolumeClaimVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3384,7 +3440,7 @@ var xxx_messageInfo_PersistentVolumeClaimVolumeSource proto.InternalMessageInfo func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} } func (*PersistentVolumeList) ProtoMessage() {} func (*PersistentVolumeList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{119} + return fileDescriptor_6c07b07c062484ab, []int{121} } func (m *PersistentVolumeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3412,7 +3468,7 @@ var xxx_messageInfo_PersistentVolumeList proto.InternalMessageInfo func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} } func (*PersistentVolumeSource) ProtoMessage() {} func (*PersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{120} + return fileDescriptor_6c07b07c062484ab, []int{122} } func (m *PersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3440,7 +3496,7 @@ var xxx_messageInfo_PersistentVolumeSource proto.InternalMessageInfo func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} } func (*PersistentVolumeSpec) ProtoMessage() {} func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{121} + return fileDescriptor_6c07b07c062484ab, []int{123} } func (m *PersistentVolumeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3468,7 +3524,7 @@ var xxx_messageInfo_PersistentVolumeSpec proto.InternalMessageInfo func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} } func (*PersistentVolumeStatus) ProtoMessage() {} func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{122} + return fileDescriptor_6c07b07c062484ab, []int{124} } func (m *PersistentVolumeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3496,7 +3552,7 @@ var xxx_messageInfo_PersistentVolumeStatus proto.InternalMessageInfo func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} } func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {} func (*PhotonPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{123} + return fileDescriptor_6c07b07c062484ab, []int{125} } func (m *PhotonPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3524,7 +3580,7 @@ var xxx_messageInfo_PhotonPersistentDiskVolumeSource proto.InternalMessageInfo func (m *Pod) Reset() { *m = Pod{} } func (*Pod) ProtoMessage() {} func (*Pod) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{124} + return fileDescriptor_6c07b07c062484ab, []int{126} } func (m *Pod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3552,7 +3608,7 @@ var xxx_messageInfo_Pod proto.InternalMessageInfo func (m *PodAffinity) Reset() { *m = PodAffinity{} } func (*PodAffinity) ProtoMessage() {} func (*PodAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{125} + return fileDescriptor_6c07b07c062484ab, []int{127} } func (m *PodAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3580,7 +3636,7 @@ var xxx_messageInfo_PodAffinity proto.InternalMessageInfo func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} } func (*PodAffinityTerm) ProtoMessage() {} func (*PodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{126} + return fileDescriptor_6c07b07c062484ab, []int{128} } func (m *PodAffinityTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3608,7 +3664,7 @@ var xxx_messageInfo_PodAffinityTerm proto.InternalMessageInfo func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} } func (*PodAntiAffinity) ProtoMessage() {} func (*PodAntiAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{127} + return fileDescriptor_6c07b07c062484ab, []int{129} } func (m *PodAntiAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3636,7 +3692,7 @@ var xxx_messageInfo_PodAntiAffinity proto.InternalMessageInfo func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} } func (*PodAttachOptions) ProtoMessage() {} func (*PodAttachOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{128} + return fileDescriptor_6c07b07c062484ab, []int{130} } func (m *PodAttachOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3664,7 +3720,7 @@ var xxx_messageInfo_PodAttachOptions proto.InternalMessageInfo func (m *PodCondition) Reset() { *m = PodCondition{} } func (*PodCondition) ProtoMessage() {} func (*PodCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{129} + return fileDescriptor_6c07b07c062484ab, []int{131} } func (m *PodCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3692,7 +3748,7 @@ var xxx_messageInfo_PodCondition proto.InternalMessageInfo func (m *PodDNSConfig) Reset() { *m = PodDNSConfig{} } func (*PodDNSConfig) ProtoMessage() {} func (*PodDNSConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{130} + return fileDescriptor_6c07b07c062484ab, []int{132} } func (m *PodDNSConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3720,7 +3776,7 @@ var xxx_messageInfo_PodDNSConfig proto.InternalMessageInfo func (m *PodDNSConfigOption) Reset() { *m = PodDNSConfigOption{} } func (*PodDNSConfigOption) ProtoMessage() {} func (*PodDNSConfigOption) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{131} + return fileDescriptor_6c07b07c062484ab, []int{133} } func (m *PodDNSConfigOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3748,7 +3804,7 @@ var xxx_messageInfo_PodDNSConfigOption proto.InternalMessageInfo func (m *PodExecOptions) Reset() { *m = PodExecOptions{} } func (*PodExecOptions) ProtoMessage() {} func (*PodExecOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{132} + return fileDescriptor_6c07b07c062484ab, []int{134} } func (m *PodExecOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3776,7 +3832,7 @@ var xxx_messageInfo_PodExecOptions proto.InternalMessageInfo func (m *PodIP) Reset() { *m = PodIP{} } func (*PodIP) ProtoMessage() {} func (*PodIP) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{133} + return fileDescriptor_6c07b07c062484ab, []int{135} } func (m *PodIP) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3804,7 +3860,7 @@ var xxx_messageInfo_PodIP proto.InternalMessageInfo func (m *PodList) Reset() { *m = PodList{} } func (*PodList) ProtoMessage() {} func (*PodList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{134} + return fileDescriptor_6c07b07c062484ab, []int{136} } func (m *PodList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3832,7 +3888,7 @@ var xxx_messageInfo_PodList proto.InternalMessageInfo func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } func (*PodLogOptions) ProtoMessage() {} func (*PodLogOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{135} + return fileDescriptor_6c07b07c062484ab, []int{137} } func (m *PodLogOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3860,7 +3916,7 @@ var xxx_messageInfo_PodLogOptions proto.InternalMessageInfo func (m *PodOS) Reset() { *m = PodOS{} } func (*PodOS) ProtoMessage() {} func (*PodOS) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{136} + return fileDescriptor_6c07b07c062484ab, []int{138} } func (m *PodOS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3888,7 +3944,7 @@ var xxx_messageInfo_PodOS proto.InternalMessageInfo func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } func (*PodPortForwardOptions) ProtoMessage() {} func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{137} + return fileDescriptor_6c07b07c062484ab, []int{139} } func (m *PodPortForwardOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3916,7 +3972,7 @@ var xxx_messageInfo_PodPortForwardOptions proto.InternalMessageInfo func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} func (*PodProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{138} + return fileDescriptor_6c07b07c062484ab, []int{140} } func (m *PodProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3944,7 +4000,7 @@ var xxx_messageInfo_PodProxyOptions proto.InternalMessageInfo func (m *PodReadinessGate) Reset() { *m = PodReadinessGate{} } func (*PodReadinessGate) ProtoMessage() {} func (*PodReadinessGate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{139} + return fileDescriptor_6c07b07c062484ab, []int{141} } func (m *PodReadinessGate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3972,7 +4028,7 @@ var xxx_messageInfo_PodReadinessGate proto.InternalMessageInfo func (m *PodResourceClaim) Reset() { *m = PodResourceClaim{} } func (*PodResourceClaim) ProtoMessage() {} func (*PodResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{140} + return fileDescriptor_6c07b07c062484ab, []int{142} } func (m *PodResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4000,7 +4056,7 @@ var xxx_messageInfo_PodResourceClaim proto.InternalMessageInfo func (m *PodResourceClaimStatus) Reset() { *m = PodResourceClaimStatus{} } func (*PodResourceClaimStatus) ProtoMessage() {} func (*PodResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{141} + return fileDescriptor_6c07b07c062484ab, []int{143} } func (m *PodResourceClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4028,7 +4084,7 @@ var xxx_messageInfo_PodResourceClaimStatus proto.InternalMessageInfo func (m *PodSchedulingGate) Reset() { *m = PodSchedulingGate{} } func (*PodSchedulingGate) ProtoMessage() {} func (*PodSchedulingGate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{142} + return fileDescriptor_6c07b07c062484ab, []int{144} } func (m *PodSchedulingGate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4056,7 +4112,7 @@ var xxx_messageInfo_PodSchedulingGate proto.InternalMessageInfo func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } func (*PodSecurityContext) ProtoMessage() {} func (*PodSecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{143} + return fileDescriptor_6c07b07c062484ab, []int{145} } func (m *PodSecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4084,7 +4140,7 @@ var xxx_messageInfo_PodSecurityContext proto.InternalMessageInfo func (m *PodSignature) Reset() { *m = PodSignature{} } func (*PodSignature) ProtoMessage() {} func (*PodSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{144} + return fileDescriptor_6c07b07c062484ab, []int{146} } func (m *PodSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4112,7 +4168,7 @@ var xxx_messageInfo_PodSignature proto.InternalMessageInfo func (m *PodSpec) Reset() { *m = PodSpec{} } func (*PodSpec) ProtoMessage() {} func (*PodSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{145} + return fileDescriptor_6c07b07c062484ab, []int{147} } func (m *PodSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4140,7 +4196,7 @@ var xxx_messageInfo_PodSpec proto.InternalMessageInfo func (m *PodStatus) Reset() { *m = PodStatus{} } func (*PodStatus) ProtoMessage() {} func (*PodStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{146} + return fileDescriptor_6c07b07c062484ab, []int{148} } func (m *PodStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4168,7 +4224,7 @@ var xxx_messageInfo_PodStatus proto.InternalMessageInfo func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } func (*PodStatusResult) ProtoMessage() {} func (*PodStatusResult) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{147} + return fileDescriptor_6c07b07c062484ab, []int{149} } func (m *PodStatusResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4196,7 +4252,7 @@ var xxx_messageInfo_PodStatusResult proto.InternalMessageInfo func (m *PodTemplate) Reset() { *m = PodTemplate{} } func (*PodTemplate) ProtoMessage() {} func (*PodTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{148} + return fileDescriptor_6c07b07c062484ab, []int{150} } func (m *PodTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4224,7 +4280,7 @@ var xxx_messageInfo_PodTemplate proto.InternalMessageInfo func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } func (*PodTemplateList) ProtoMessage() {} func (*PodTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{149} + return fileDescriptor_6c07b07c062484ab, []int{151} } func (m *PodTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4252,7 +4308,7 @@ var xxx_messageInfo_PodTemplateList proto.InternalMessageInfo func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } func (*PodTemplateSpec) ProtoMessage() {} func (*PodTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{150} + return fileDescriptor_6c07b07c062484ab, []int{152} } func (m *PodTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4280,7 +4336,7 @@ var xxx_messageInfo_PodTemplateSpec proto.InternalMessageInfo func (m *PortStatus) Reset() { *m = PortStatus{} } func (*PortStatus) ProtoMessage() {} func (*PortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{151} + return fileDescriptor_6c07b07c062484ab, []int{153} } func (m *PortStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4308,7 +4364,7 @@ var xxx_messageInfo_PortStatus proto.InternalMessageInfo func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} } func (*PortworxVolumeSource) ProtoMessage() {} func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{152} + return fileDescriptor_6c07b07c062484ab, []int{154} } func (m *PortworxVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4336,7 +4392,7 @@ var xxx_messageInfo_PortworxVolumeSource proto.InternalMessageInfo func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} func (*Preconditions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{153} + return fileDescriptor_6c07b07c062484ab, []int{155} } func (m *Preconditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4364,7 +4420,7 @@ var xxx_messageInfo_Preconditions proto.InternalMessageInfo func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } func (*PreferAvoidPodsEntry) ProtoMessage() {} func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{154} + return fileDescriptor_6c07b07c062484ab, []int{156} } func (m *PreferAvoidPodsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4392,7 +4448,7 @@ var xxx_messageInfo_PreferAvoidPodsEntry proto.InternalMessageInfo func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } func (*PreferredSchedulingTerm) ProtoMessage() {} func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{155} + return fileDescriptor_6c07b07c062484ab, []int{157} } func (m *PreferredSchedulingTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4420,7 +4476,7 @@ var xxx_messageInfo_PreferredSchedulingTerm proto.InternalMessageInfo func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} func (*Probe) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{156} + return fileDescriptor_6c07b07c062484ab, []int{158} } func (m *Probe) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4448,7 +4504,7 @@ var xxx_messageInfo_Probe proto.InternalMessageInfo func (m *ProbeHandler) Reset() { *m = ProbeHandler{} } func (*ProbeHandler) ProtoMessage() {} func (*ProbeHandler) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{157} + return fileDescriptor_6c07b07c062484ab, []int{159} } func (m *ProbeHandler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4476,7 +4532,7 @@ var xxx_messageInfo_ProbeHandler proto.InternalMessageInfo func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } func (*ProjectedVolumeSource) ProtoMessage() {} func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{158} + return fileDescriptor_6c07b07c062484ab, []int{160} } func (m *ProjectedVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4504,7 +4560,7 @@ var xxx_messageInfo_ProjectedVolumeSource proto.InternalMessageInfo func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{159} + return fileDescriptor_6c07b07c062484ab, []int{161} } func (m *QuobyteVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4532,7 +4588,7 @@ var xxx_messageInfo_QuobyteVolumeSource proto.InternalMessageInfo func (m *RBDPersistentVolumeSource) Reset() { *m = RBDPersistentVolumeSource{} } func (*RBDPersistentVolumeSource) ProtoMessage() {} func (*RBDPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{160} + return fileDescriptor_6c07b07c062484ab, []int{162} } func (m *RBDPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4560,7 +4616,7 @@ var xxx_messageInfo_RBDPersistentVolumeSource proto.InternalMessageInfo func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } func (*RBDVolumeSource) ProtoMessage() {} func (*RBDVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{161} + return fileDescriptor_6c07b07c062484ab, []int{163} } func (m *RBDVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4588,7 +4644,7 @@ var xxx_messageInfo_RBDVolumeSource proto.InternalMessageInfo func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} func (*RangeAllocation) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{162} + return fileDescriptor_6c07b07c062484ab, []int{164} } func (m *RangeAllocation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4616,7 +4672,7 @@ var xxx_messageInfo_RangeAllocation proto.InternalMessageInfo func (m *ReplicationController) Reset() { *m = ReplicationController{} } func (*ReplicationController) ProtoMessage() {} func (*ReplicationController) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{163} + return fileDescriptor_6c07b07c062484ab, []int{165} } func (m *ReplicationController) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4644,7 +4700,7 @@ var xxx_messageInfo_ReplicationController proto.InternalMessageInfo func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } func (*ReplicationControllerCondition) ProtoMessage() {} func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{164} + return fileDescriptor_6c07b07c062484ab, []int{166} } func (m *ReplicationControllerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4672,7 +4728,7 @@ var xxx_messageInfo_ReplicationControllerCondition proto.InternalMessageInfo func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } func (*ReplicationControllerList) ProtoMessage() {} func (*ReplicationControllerList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{165} + return fileDescriptor_6c07b07c062484ab, []int{167} } func (m *ReplicationControllerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4700,7 +4756,7 @@ var xxx_messageInfo_ReplicationControllerList proto.InternalMessageInfo func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } func (*ReplicationControllerSpec) ProtoMessage() {} func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{166} + return fileDescriptor_6c07b07c062484ab, []int{168} } func (m *ReplicationControllerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4728,7 +4784,7 @@ var xxx_messageInfo_ReplicationControllerSpec proto.InternalMessageInfo func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } func (*ReplicationControllerStatus) ProtoMessage() {} func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{167} + return fileDescriptor_6c07b07c062484ab, []int{169} } func (m *ReplicationControllerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4756,7 +4812,7 @@ var xxx_messageInfo_ReplicationControllerStatus proto.InternalMessageInfo func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{168} + return fileDescriptor_6c07b07c062484ab, []int{170} } func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4784,7 +4840,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } func (*ResourceFieldSelector) ProtoMessage() {} func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{169} + return fileDescriptor_6c07b07c062484ab, []int{171} } func (m *ResourceFieldSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4812,7 +4868,7 @@ var xxx_messageInfo_ResourceFieldSelector proto.InternalMessageInfo func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} func (*ResourceQuota) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{170} + return fileDescriptor_6c07b07c062484ab, []int{172} } func (m *ResourceQuota) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4840,7 +4896,7 @@ var xxx_messageInfo_ResourceQuota proto.InternalMessageInfo func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } func (*ResourceQuotaList) ProtoMessage() {} func (*ResourceQuotaList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{171} + return fileDescriptor_6c07b07c062484ab, []int{173} } func (m *ResourceQuotaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4868,7 +4924,7 @@ var xxx_messageInfo_ResourceQuotaList proto.InternalMessageInfo func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } func (*ResourceQuotaSpec) ProtoMessage() {} func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{172} + return fileDescriptor_6c07b07c062484ab, []int{174} } func (m *ResourceQuotaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4896,7 +4952,7 @@ var xxx_messageInfo_ResourceQuotaSpec proto.InternalMessageInfo func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } func (*ResourceQuotaStatus) ProtoMessage() {} func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{173} + return fileDescriptor_6c07b07c062484ab, []int{175} } func (m *ResourceQuotaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4924,7 +4980,7 @@ var xxx_messageInfo_ResourceQuotaStatus proto.InternalMessageInfo func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } func (*ResourceRequirements) ProtoMessage() {} func (*ResourceRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{174} + return fileDescriptor_6c07b07c062484ab, []int{176} } func (m *ResourceRequirements) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4952,7 +5008,7 @@ var xxx_messageInfo_ResourceRequirements proto.InternalMessageInfo func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } func (*SELinuxOptions) ProtoMessage() {} func (*SELinuxOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{175} + return fileDescriptor_6c07b07c062484ab, []int{177} } func (m *SELinuxOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4980,7 +5036,7 @@ var xxx_messageInfo_SELinuxOptions proto.InternalMessageInfo func (m *ScaleIOPersistentVolumeSource) Reset() { *m = ScaleIOPersistentVolumeSource{} } func (*ScaleIOPersistentVolumeSource) ProtoMessage() {} func (*ScaleIOPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{176} + return fileDescriptor_6c07b07c062484ab, []int{178} } func (m *ScaleIOPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5008,7 +5064,7 @@ var xxx_messageInfo_ScaleIOPersistentVolumeSource proto.InternalMessageInfo func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} } func (*ScaleIOVolumeSource) ProtoMessage() {} func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{177} + return fileDescriptor_6c07b07c062484ab, []int{179} } func (m *ScaleIOVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5036,7 +5092,7 @@ var xxx_messageInfo_ScaleIOVolumeSource proto.InternalMessageInfo func (m *ScopeSelector) Reset() { *m = ScopeSelector{} } func (*ScopeSelector) ProtoMessage() {} func (*ScopeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{178} + return fileDescriptor_6c07b07c062484ab, []int{180} } func (m *ScopeSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5064,7 +5120,7 @@ var xxx_messageInfo_ScopeSelector proto.InternalMessageInfo func (m *ScopedResourceSelectorRequirement) Reset() { *m = ScopedResourceSelectorRequirement{} } func (*ScopedResourceSelectorRequirement) ProtoMessage() {} func (*ScopedResourceSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{179} + return fileDescriptor_6c07b07c062484ab, []int{181} } func (m *ScopedResourceSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5092,7 +5148,7 @@ var xxx_messageInfo_ScopedResourceSelectorRequirement proto.InternalMessageInfo func (m *SeccompProfile) Reset() { *m = SeccompProfile{} } func (*SeccompProfile) ProtoMessage() {} func (*SeccompProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{180} + return fileDescriptor_6c07b07c062484ab, []int{182} } func (m *SeccompProfile) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5120,7 +5176,7 @@ var xxx_messageInfo_SeccompProfile proto.InternalMessageInfo func (m *Secret) Reset() { *m = Secret{} } func (*Secret) ProtoMessage() {} func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{181} + return fileDescriptor_6c07b07c062484ab, []int{183} } func (m *Secret) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5148,7 +5204,7 @@ var xxx_messageInfo_Secret proto.InternalMessageInfo func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } func (*SecretEnvSource) ProtoMessage() {} func (*SecretEnvSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{182} + return fileDescriptor_6c07b07c062484ab, []int{184} } func (m *SecretEnvSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5176,7 +5232,7 @@ var xxx_messageInfo_SecretEnvSource proto.InternalMessageInfo func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } func (*SecretKeySelector) ProtoMessage() {} func (*SecretKeySelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{183} + return fileDescriptor_6c07b07c062484ab, []int{185} } func (m *SecretKeySelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5204,7 +5260,7 @@ var xxx_messageInfo_SecretKeySelector proto.InternalMessageInfo func (m *SecretList) Reset() { *m = SecretList{} } func (*SecretList) ProtoMessage() {} func (*SecretList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{184} + return fileDescriptor_6c07b07c062484ab, []int{186} } func (m *SecretList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5232,7 +5288,7 @@ var xxx_messageInfo_SecretList proto.InternalMessageInfo func (m *SecretProjection) Reset() { *m = SecretProjection{} } func (*SecretProjection) ProtoMessage() {} func (*SecretProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{185} + return fileDescriptor_6c07b07c062484ab, []int{187} } func (m *SecretProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5260,7 +5316,7 @@ var xxx_messageInfo_SecretProjection proto.InternalMessageInfo func (m *SecretReference) Reset() { *m = SecretReference{} } func (*SecretReference) ProtoMessage() {} func (*SecretReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{186} + return fileDescriptor_6c07b07c062484ab, []int{188} } func (m *SecretReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5288,7 +5344,7 @@ var xxx_messageInfo_SecretReference proto.InternalMessageInfo func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } func (*SecretVolumeSource) ProtoMessage() {} func (*SecretVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{187} + return fileDescriptor_6c07b07c062484ab, []int{189} } func (m *SecretVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5316,7 +5372,7 @@ var xxx_messageInfo_SecretVolumeSource proto.InternalMessageInfo func (m *SecurityContext) Reset() { *m = SecurityContext{} } func (*SecurityContext) ProtoMessage() {} func (*SecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{188} + return fileDescriptor_6c07b07c062484ab, []int{190} } func (m *SecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5344,7 +5400,7 @@ var xxx_messageInfo_SecurityContext proto.InternalMessageInfo func (m *SerializedReference) Reset() { *m = SerializedReference{} } func (*SerializedReference) ProtoMessage() {} func (*SerializedReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{189} + return fileDescriptor_6c07b07c062484ab, []int{191} } func (m *SerializedReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5372,7 +5428,7 @@ var xxx_messageInfo_SerializedReference proto.InternalMessageInfo func (m *Service) Reset() { *m = Service{} } func (*Service) ProtoMessage() {} func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{190} + return fileDescriptor_6c07b07c062484ab, []int{192} } func (m *Service) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5400,7 +5456,7 @@ var xxx_messageInfo_Service proto.InternalMessageInfo func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } func (*ServiceAccount) ProtoMessage() {} func (*ServiceAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{191} + return fileDescriptor_6c07b07c062484ab, []int{193} } func (m *ServiceAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5428,7 +5484,7 @@ var xxx_messageInfo_ServiceAccount proto.InternalMessageInfo func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } func (*ServiceAccountList) ProtoMessage() {} func (*ServiceAccountList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{192} + return fileDescriptor_6c07b07c062484ab, []int{194} } func (m *ServiceAccountList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5456,7 +5512,7 @@ var xxx_messageInfo_ServiceAccountList proto.InternalMessageInfo func (m *ServiceAccountTokenProjection) Reset() { *m = ServiceAccountTokenProjection{} } func (*ServiceAccountTokenProjection) ProtoMessage() {} func (*ServiceAccountTokenProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{193} + return fileDescriptor_6c07b07c062484ab, []int{195} } func (m *ServiceAccountTokenProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5484,7 +5540,7 @@ var xxx_messageInfo_ServiceAccountTokenProjection proto.InternalMessageInfo func (m *ServiceList) Reset() { *m = ServiceList{} } func (*ServiceList) ProtoMessage() {} func (*ServiceList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{194} + return fileDescriptor_6c07b07c062484ab, []int{196} } func (m *ServiceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5512,7 +5568,7 @@ var xxx_messageInfo_ServiceList proto.InternalMessageInfo func (m *ServicePort) Reset() { *m = ServicePort{} } func (*ServicePort) ProtoMessage() {} func (*ServicePort) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{195} + return fileDescriptor_6c07b07c062484ab, []int{197} } func (m *ServicePort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5540,7 +5596,7 @@ var xxx_messageInfo_ServicePort proto.InternalMessageInfo func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } func (*ServiceProxyOptions) ProtoMessage() {} func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{196} + return fileDescriptor_6c07b07c062484ab, []int{198} } func (m *ServiceProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5568,7 +5624,7 @@ var xxx_messageInfo_ServiceProxyOptions proto.InternalMessageInfo func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } func (*ServiceSpec) ProtoMessage() {} func (*ServiceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{197} + return fileDescriptor_6c07b07c062484ab, []int{199} } func (m *ServiceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5596,7 +5652,7 @@ var xxx_messageInfo_ServiceSpec proto.InternalMessageInfo func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} func (*ServiceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{198} + return fileDescriptor_6c07b07c062484ab, []int{200} } func (m *ServiceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5624,7 +5680,7 @@ var xxx_messageInfo_ServiceStatus proto.InternalMessageInfo func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } func (*SessionAffinityConfig) ProtoMessage() {} func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{199} + return fileDescriptor_6c07b07c062484ab, []int{201} } func (m *SessionAffinityConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5652,7 +5708,7 @@ var xxx_messageInfo_SessionAffinityConfig proto.InternalMessageInfo func (m *SleepAction) Reset() { *m = SleepAction{} } func (*SleepAction) ProtoMessage() {} func (*SleepAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{200} + return fileDescriptor_6c07b07c062484ab, []int{202} } func (m *SleepAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5680,7 +5736,7 @@ var xxx_messageInfo_SleepAction proto.InternalMessageInfo func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} } func (*StorageOSPersistentVolumeSource) ProtoMessage() {} func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{201} + return fileDescriptor_6c07b07c062484ab, []int{203} } func (m *StorageOSPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5708,7 +5764,7 @@ var xxx_messageInfo_StorageOSPersistentVolumeSource proto.InternalMessageInfo func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } func (*StorageOSVolumeSource) ProtoMessage() {} func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{202} + return fileDescriptor_6c07b07c062484ab, []int{204} } func (m *StorageOSVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5736,7 +5792,7 @@ var xxx_messageInfo_StorageOSVolumeSource proto.InternalMessageInfo func (m *Sysctl) Reset() { *m = Sysctl{} } func (*Sysctl) ProtoMessage() {} func (*Sysctl) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{203} + return fileDescriptor_6c07b07c062484ab, []int{205} } func (m *Sysctl) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5764,7 +5820,7 @@ var xxx_messageInfo_Sysctl proto.InternalMessageInfo func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } func (*TCPSocketAction) ProtoMessage() {} func (*TCPSocketAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{204} + return fileDescriptor_6c07b07c062484ab, []int{206} } func (m *TCPSocketAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5792,7 +5848,7 @@ var xxx_messageInfo_TCPSocketAction proto.InternalMessageInfo func (m *Taint) Reset() { *m = Taint{} } func (*Taint) ProtoMessage() {} func (*Taint) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{205} + return fileDescriptor_6c07b07c062484ab, []int{207} } func (m *Taint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5820,7 +5876,7 @@ var xxx_messageInfo_Taint proto.InternalMessageInfo func (m *Toleration) Reset() { *m = Toleration{} } func (*Toleration) ProtoMessage() {} func (*Toleration) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{206} + return fileDescriptor_6c07b07c062484ab, []int{208} } func (m *Toleration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5848,7 +5904,7 @@ var xxx_messageInfo_Toleration proto.InternalMessageInfo func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelectorLabelRequirement{} } func (*TopologySelectorLabelRequirement) ProtoMessage() {} func (*TopologySelectorLabelRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{207} + return fileDescriptor_6c07b07c062484ab, []int{209} } func (m *TopologySelectorLabelRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5876,7 +5932,7 @@ var xxx_messageInfo_TopologySelectorLabelRequirement proto.InternalMessageInfo func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} } func (*TopologySelectorTerm) ProtoMessage() {} func (*TopologySelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{208} + return fileDescriptor_6c07b07c062484ab, []int{210} } func (m *TopologySelectorTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5904,7 +5960,7 @@ var xxx_messageInfo_TopologySelectorTerm proto.InternalMessageInfo func (m *TopologySpreadConstraint) Reset() { *m = TopologySpreadConstraint{} } func (*TopologySpreadConstraint) ProtoMessage() {} func (*TopologySpreadConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{209} + return fileDescriptor_6c07b07c062484ab, []int{211} } func (m *TopologySpreadConstraint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5932,7 +5988,7 @@ var xxx_messageInfo_TopologySpreadConstraint proto.InternalMessageInfo func (m *TypedLocalObjectReference) Reset() { *m = TypedLocalObjectReference{} } func (*TypedLocalObjectReference) ProtoMessage() {} func (*TypedLocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{210} + return fileDescriptor_6c07b07c062484ab, []int{212} } func (m *TypedLocalObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5960,7 +6016,7 @@ var xxx_messageInfo_TypedLocalObjectReference proto.InternalMessageInfo func (m *TypedObjectReference) Reset() { *m = TypedObjectReference{} } func (*TypedObjectReference) ProtoMessage() {} func (*TypedObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{211} + return fileDescriptor_6c07b07c062484ab, []int{213} } func (m *TypedObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5988,7 +6044,7 @@ var xxx_messageInfo_TypedObjectReference proto.InternalMessageInfo func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{212} + return fileDescriptor_6c07b07c062484ab, []int{214} } func (m *Volume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6016,7 +6072,7 @@ var xxx_messageInfo_Volume proto.InternalMessageInfo func (m *VolumeDevice) Reset() { *m = VolumeDevice{} } func (*VolumeDevice) ProtoMessage() {} func (*VolumeDevice) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{213} + return fileDescriptor_6c07b07c062484ab, []int{215} } func (m *VolumeDevice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6044,7 +6100,7 @@ var xxx_messageInfo_VolumeDevice proto.InternalMessageInfo func (m *VolumeMount) Reset() { *m = VolumeMount{} } func (*VolumeMount) ProtoMessage() {} func (*VolumeMount) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{214} + return fileDescriptor_6c07b07c062484ab, []int{216} } func (m *VolumeMount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6069,10 +6125,38 @@ func (m *VolumeMount) XXX_DiscardUnknown() { var xxx_messageInfo_VolumeMount proto.InternalMessageInfo +func (m *VolumeMountStatus) Reset() { *m = VolumeMountStatus{} } +func (*VolumeMountStatus) ProtoMessage() {} +func (*VolumeMountStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_6c07b07c062484ab, []int{217} +} +func (m *VolumeMountStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VolumeMountStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *VolumeMountStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeMountStatus.Merge(m, src) +} +func (m *VolumeMountStatus) XXX_Size() int { + return m.Size() +} +func (m *VolumeMountStatus) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeMountStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeMountStatus proto.InternalMessageInfo + func (m *VolumeNodeAffinity) Reset() { *m = VolumeNodeAffinity{} } func (*VolumeNodeAffinity) ProtoMessage() {} func (*VolumeNodeAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{215} + return fileDescriptor_6c07b07c062484ab, []int{218} } func (m *VolumeNodeAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6100,7 +6184,7 @@ var xxx_messageInfo_VolumeNodeAffinity proto.InternalMessageInfo func (m *VolumeProjection) Reset() { *m = VolumeProjection{} } func (*VolumeProjection) ProtoMessage() {} func (*VolumeProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{216} + return fileDescriptor_6c07b07c062484ab, []int{219} } func (m *VolumeProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6128,7 +6212,7 @@ var xxx_messageInfo_VolumeProjection proto.InternalMessageInfo func (m *VolumeResourceRequirements) Reset() { *m = VolumeResourceRequirements{} } func (*VolumeResourceRequirements) ProtoMessage() {} func (*VolumeResourceRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{217} + return fileDescriptor_6c07b07c062484ab, []int{220} } func (m *VolumeResourceRequirements) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6156,7 +6240,7 @@ var xxx_messageInfo_VolumeResourceRequirements proto.InternalMessageInfo func (m *VolumeSource) Reset() { *m = VolumeSource{} } func (*VolumeSource) ProtoMessage() {} func (*VolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{218} + return fileDescriptor_6c07b07c062484ab, []int{221} } func (m *VolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6184,7 +6268,7 @@ var xxx_messageInfo_VolumeSource proto.InternalMessageInfo func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{219} + return fileDescriptor_6c07b07c062484ab, []int{222} } func (m *VsphereVirtualDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6212,7 +6296,7 @@ var xxx_messageInfo_VsphereVirtualDiskVolumeSource proto.InternalMessageInfo func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } func (*WeightedPodAffinityTerm) ProtoMessage() {} func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{220} + return fileDescriptor_6c07b07c062484ab, []int{223} } func (m *WeightedPodAffinityTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6240,7 +6324,7 @@ var xxx_messageInfo_WeightedPodAffinityTerm proto.InternalMessageInfo func (m *WindowsSecurityContextOptions) Reset() { *m = WindowsSecurityContextOptions{} } func (*WindowsSecurityContextOptions) ProtoMessage() {} func (*WindowsSecurityContextOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{221} + return fileDescriptor_6c07b07c062484ab, []int{224} } func (m *WindowsSecurityContextOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6268,6 +6352,7 @@ var xxx_messageInfo_WindowsSecurityContextOptions proto.InternalMessageInfo func init() { proto.RegisterType((*AWSElasticBlockStoreVolumeSource)(nil), "k8s.io.api.core.v1.AWSElasticBlockStoreVolumeSource") proto.RegisterType((*Affinity)(nil), "k8s.io.api.core.v1.Affinity") + proto.RegisterType((*AppArmorProfile)(nil), "k8s.io.api.core.v1.AppArmorProfile") proto.RegisterType((*AttachedVolume)(nil), "k8s.io.api.core.v1.AttachedVolume") proto.RegisterType((*AvoidPods)(nil), "k8s.io.api.core.v1.AvoidPods") proto.RegisterType((*AzureDiskVolumeSource)(nil), "k8s.io.api.core.v1.AzureDiskVolumeSource") @@ -6380,8 +6465,8 @@ func init() { proto.RegisterType((*NodeDaemonEndpoints)(nil), "k8s.io.api.core.v1.NodeDaemonEndpoints") proto.RegisterType((*NodeList)(nil), "k8s.io.api.core.v1.NodeList") proto.RegisterType((*NodeProxyOptions)(nil), "k8s.io.api.core.v1.NodeProxyOptions") - proto.RegisterType((*NodeResources)(nil), "k8s.io.api.core.v1.NodeResources") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.NodeResources.CapacityEntry") + proto.RegisterType((*NodeRuntimeHandler)(nil), "k8s.io.api.core.v1.NodeRuntimeHandler") + proto.RegisterType((*NodeRuntimeHandlerFeatures)(nil), "k8s.io.api.core.v1.NodeRuntimeHandlerFeatures") proto.RegisterType((*NodeSelector)(nil), "k8s.io.api.core.v1.NodeSelector") proto.RegisterType((*NodeSelectorRequirement)(nil), "k8s.io.api.core.v1.NodeSelectorRequirement") proto.RegisterType((*NodeSelectorTerm)(nil), "k8s.io.api.core.v1.NodeSelectorTerm") @@ -6511,6 +6596,7 @@ func init() { proto.RegisterType((*Volume)(nil), "k8s.io.api.core.v1.Volume") proto.RegisterType((*VolumeDevice)(nil), "k8s.io.api.core.v1.VolumeDevice") proto.RegisterType((*VolumeMount)(nil), "k8s.io.api.core.v1.VolumeMount") + proto.RegisterType((*VolumeMountStatus)(nil), "k8s.io.api.core.v1.VolumeMountStatus") proto.RegisterType((*VolumeNodeAffinity)(nil), "k8s.io.api.core.v1.VolumeNodeAffinity") proto.RegisterType((*VolumeProjection)(nil), "k8s.io.api.core.v1.VolumeProjection") proto.RegisterType((*VolumeResourceRequirements)(nil), "k8s.io.api.core.v1.VolumeResourceRequirements") @@ -6523,978 +6609,993 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/core/v1/generated.proto", fileDescriptor_83c10c24ec417dc9) -} - -var fileDescriptor_83c10c24ec417dc9 = []byte{ - // 15465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x69, 0x90, 0x1c, 0xc9, - 0x75, 0x18, 0xcc, 0xea, 0x9e, 0xab, 0xdf, 0xdc, 0x39, 0x00, 0x76, 0x30, 0x0b, 0xa0, 0xb1, 0xb5, - 0xbb, 0x58, 0xec, 0x35, 0x20, 0xf6, 0x20, 0x97, 0xbb, 0xcb, 0x15, 0xe7, 0x04, 0x66, 0x31, 0x33, - 0xe8, 0x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e2, 0x45, 0x46, 0x87, 0x3e, - 0x07, 0x10, 0x92, 0x5a, 0x40, 0x22, 0xad, 0x4b, 0xd5, 0xc4, 0xa8, 0x2a, 0x0c, 0xd6, 0xa8, 0xe8, - 0x86, 0x10, 0x6e, 0x3b, 0x01, 0x9b, 0x5f, 0xa2, 0x63, 0xd5, 0x86, 0x50, 0x95, 0x08, 0x1c, 0xd3, - 0x18, 0x1b, 0x42, 0xb1, 0xdb, 0x86, 0x80, 0x3e, 0x0c, 0xe3, 0x71, 0x65, 0x61, 0xcb, 0xa9, 0xc9, - 0x0e, 0x64, 0x4b, 0xa6, 0x6a, 0xa2, 0x70, 0x92, 0xd6, 0xfe, 0xdb, 0x96, 0x98, 0x3c, 0xf4, 0xab, - 0xdf, 0xe5, 0xdf, 0x6a, 0xff, 0x8a, 0x05, 0x83, 0xf3, 0xae, 0x57, 0x77, 0xbd, 0x2d, 0xf4, 0x29, - 0x18, 0xa2, 0x67, 0x53, 0xdd, 0x89, 0x1c, 0xb1, 0xef, 0xbd, 0x5f, 0x5b, 0x5b, 0xea, 0xa8, 0x98, - 0x6d, 0xed, 0x6c, 0x51, 0x40, 0x38, 0x4b, 0xa9, 0xe9, 0x6a, 0xbb, 0x7a, 0xf3, 0xd3, 0xa4, 0x16, + proto.RegisterFile("k8s.io/api/core/v1/generated.proto", fileDescriptor_6c07b07c062484ab) +} + +var fileDescriptor_6c07b07c062484ab = []byte{ + // 15708 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x59, 0x8c, 0x1c, 0xd9, + 0x75, 0x20, 0xaa, 0xc8, 0xac, 0xf5, 0xd4, 0x7e, 0x8b, 0x64, 0x17, 0xab, 0x49, 0x26, 0x3b, 0xba, + 0x9b, 0xcd, 0xde, 0x8a, 0x62, 0x2f, 0xea, 0x56, 0x77, 0xab, 0xad, 0x5a, 0xc9, 0x6c, 0x56, 0x15, + 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, 0xa9, 0xd7, 0x99, 0x74, 0x57, - 0x9a, 0x3f, 0x7e, 0x77, 0xbf, 0x5c, 0x9c, 0xab, 0x53, 0x31, 0x03, 0x14, 0xd5, 0x1e, 0xa6, 0x14, - 0xe8, 0x29, 0xe8, 0xab, 0x07, 0x7e, 0x6b, 0xba, 0xc0, 0x28, 0xe9, 0x2a, 0xef, 0x5b, 0x0c, 0xfc, - 0x56, 0x82, 0x94, 0xd1, 0xd8, 0xbf, 0x55, 0x80, 0x53, 0x0b, 0xa4, 0xb5, 0xbd, 0x5c, 0xcd, 0x39, - 0x2f, 0xce, 0xc3, 0x50, 0xd3, 0xf7, 0xdc, 0xc8, 0x0f, 0x42, 0x51, 0x35, 0x9b, 0x11, 0x6b, 0x02, - 0x86, 0x15, 0x16, 0x9d, 0x85, 0xbe, 0x56, 0x2c, 0xc4, 0x8e, 0x48, 0x01, 0x98, 0x89, 0xaf, 0x0c, - 0x43, 0x29, 0xda, 0x21, 0x09, 0xc4, 0x8c, 0x51, 0x14, 0xd7, 0x42, 0x12, 0x60, 0x86, 0x89, 0x25, - 0x01, 0x2a, 0x23, 0x88, 0x13, 0x21, 0x21, 0x09, 0x50, 0x0c, 0xd6, 0xa8, 0x50, 0x05, 0x4a, 0x61, - 0x62, 0x64, 0x7b, 0x5a, 0x9a, 0xa3, 0x4c, 0x54, 0x50, 0x23, 0x19, 0x33, 0x31, 0x4e, 0xb0, 0x81, - 0xae, 0xa2, 0xc2, 0xd7, 0x0b, 0x80, 0x78, 0x17, 0x7e, 0x9b, 0x75, 0xdc, 0xb5, 0x74, 0xc7, 0xf5, - 0xbe, 0x24, 0x0e, 0xab, 0xf7, 0xfe, 0x8b, 0x05, 0xa7, 0x16, 0x5c, 0xaf, 0x4e, 0x82, 0x9c, 0x09, - 0xf8, 0x60, 0xee, 0xce, 0x07, 0x13, 0x52, 0x8c, 0x29, 0xd6, 0x77, 0x08, 0x53, 0xcc, 0xfe, 0x4b, - 0x0b, 0x10, 0xff, 0x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9c, 0x50, - 0xf8, 0xe7, 0x69, 0xb3, 0x1c, 0x33, 0x28, 0x16, 0x58, 0x5d, 0xcb, 0xd8, 0xd7, 0x45, 0xcb, 0x68, - 0x74, 0x51, 0xff, 0xe1, 0x76, 0x11, 0xfa, 0x24, 0xc0, 0xa6, 0xeb, 0xb9, 0xe1, 0x36, 0xe3, 0x3e, - 0x70, 0x60, 0xee, 0x4a, 0x28, 0x5e, 0x56, 0x5c, 0xb0, 0xc6, 0x11, 0xbd, 0x08, 0xc3, 0x6a, 0x03, - 0x59, 0x59, 0x64, 0xce, 0x0a, 0x9a, 0xf3, 0x57, 0xbc, 0x9b, 0x2e, 0x62, 0x9d, 0xce, 0xfe, 0x74, - 0x72, 0xbe, 0x88, 0x15, 0xa0, 0xf5, 0xaf, 0xd5, 0x6b, 0xff, 0x16, 0x3a, 0xf7, 0xaf, 0xfd, 0xcd, - 0x01, 0x18, 0x37, 0x2a, 0x6b, 0x87, 0x3d, 0xec, 0xb9, 0x97, 0xe8, 0x01, 0xe4, 0x44, 0x44, 0xac, - 0x3f, 0xbb, 0xfb, 0x52, 0xd1, 0x0f, 0x29, 0xba, 0x02, 0x78, 0x79, 0xf4, 0x49, 0x28, 0x35, 0x9c, - 0x90, 0x69, 0x2c, 0x89, 0x58, 0x77, 0xbd, 0x30, 0x8b, 0x2f, 0x84, 0x4e, 0x18, 0x69, 0xa7, 0x3e, - 0xe7, 0x1d, 0xb3, 0xa4, 0x27, 0x25, 0x95, 0xaf, 0xa4, 0x03, 0xa8, 0x6a, 0x04, 0x15, 0xc2, 0xf6, - 0x30, 0xc7, 0xa1, 0x97, 0xd8, 0xd6, 0x4a, 0x67, 0xc5, 0x02, 0x95, 0x46, 0xd9, 0x34, 0xeb, 0x37, - 0x84, 0x6c, 0x85, 0xc3, 0x06, 0x65, 0x7c, 0x27, 0x1b, 0xe8, 0x70, 0x27, 0x7b, 0x12, 0x06, 0xd9, - 0x0f, 0x35, 0x03, 0xd4, 0x68, 0xac, 0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3, 0x35, 0x90, 0x6e, 0xe3, 0x8f, - 0x75, 0xb4, 0x4c, 0xf0, 0x50, 0x75, 0x01, 0xef, 0x85, 0x8a, 0x2c, 0x8a, 0x63, 0x2e, 0xe8, 0x0a, - 0x0c, 0xb6, 0x02, 0x52, 0x8d, 0x58, 0x1c, 0xa5, 0xde, 0x19, 0xf2, 0x59, 0xc3, 0x0b, 0x62, 0xc9, - 0xc1, 0xfe, 0x85, 0x02, 0x4c, 0x24, 0x49, 0xd1, 0xab, 0xd0, 0x47, 0x6e, 0x93, 0x9a, 0x68, 0x6f, - 0xe6, 0x51, 0x1c, 0xab, 0x26, 0x78, 0x07, 0xd0, 0xff, 0x98, 0x95, 0x42, 0x97, 0x61, 0x90, 0x9e, - 0xc3, 0x97, 0x54, 0xcc, 0xc0, 0x47, 0xf2, 0xce, 0x72, 0x25, 0xd0, 0xf0, 0xc6, 0x09, 0x10, 0x96, - 0xc5, 0x99, 0x1f, 0x58, 0xad, 0x55, 0xa5, 0x57, 0x9c, 0xa8, 0xd3, 0x4d, 0x7c, 0x63, 0xa1, 0xc2, - 0x89, 0x04, 0x37, 0xee, 0x07, 0x26, 0x81, 0x38, 0x66, 0x82, 0x3e, 0x02, 0xfd, 0x61, 0x83, 0x90, - 0x96, 0x30, 0xf4, 0x67, 0x2a, 0x17, 0xab, 0x94, 0x40, 0x70, 0x62, 0xca, 0x08, 0x06, 0xc0, 0xbc, - 0xa0, 0xfd, 0x8b, 0x16, 0x00, 0x77, 0x9c, 0x73, 0xbc, 0x2d, 0x72, 0x04, 0xfa, 0xf8, 0x45, 0xe8, - 0x0b, 0x5b, 0xa4, 0xd6, 0xc9, 0x7d, 0x3b, 0x6e, 0x4f, 0xb5, 0x45, 0x6a, 0xf1, 0x9c, 0xa5, 0xff, - 0x30, 0x2b, 0x6d, 0x7f, 0x3f, 0xc0, 0x58, 0x4c, 0xb6, 0x12, 0x91, 0x26, 0x7a, 0xd6, 0x08, 0x5b, - 0x72, 0x32, 0x11, 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 0xcf, 0x57, 0xe0, 0xa5, 0xdb, 0xa4, 0xd6, 0x66, 0x56, 0xcf, 0x2e, - 0x39, 0x6e, 0xd4, 0x0b, 0x85, 0xe7, 0xee, 0xee, 0x97, 0x67, 0xf1, 0x81, 0x78, 0xe3, 0x03, 0xb6, - 0x05, 0xfd, 0x9e, 0x05, 0x17, 0x78, 0x36, 0x96, 0xde, 0xdb, 0xdf, 0x41, 0x89, 0x50, 0x91, 0xac, - 0x62, 0x26, 0x1b, 0x24, 0x68, 0xce, 0x7f, 0x50, 0x74, 0xe8, 0x85, 0xca, 0xc1, 0xea, 0xc2, 0x07, - 0x6d, 0x9c, 0xfd, 0x8f, 0x8a, 0x30, 0x2a, 0x42, 0xeb, 0x89, 0x33, 0xe0, 0x45, 0x63, 0x4a, 0x3c, - 0x92, 0x98, 0x12, 0x93, 0x06, 0xf1, 0xe1, 0x6c, 0xff, 0x21, 0x4c, 0xd2, 0xcd, 0xf9, 0x32, 0x71, - 0x82, 0xe8, 0x26, 0x71, 0xb8, 0xbf, 0x5d, 0xf1, 0xc0, 0xbb, 0xbf, 0x52, 0xfc, 0xae, 0x26, 0x99, - 0xe1, 0x34, 0xff, 0xef, 0xa4, 0x33, 0xc7, 0x83, 0x89, 0x54, 0x74, 0xc4, 0x37, 0xa1, 0xa4, 0x9e, - 0xff, 0x88, 0x4d, 0xa7, 0x73, 0x90, 0xd1, 0x24, 0x07, 0xae, 0x57, 0x8c, 0x9f, 0x9e, 0xc5, 0xec, - 0xec, 0xbf, 0x57, 0x30, 0x2a, 0xe4, 0x83, 0xb8, 0x0e, 0x43, 0x4e, 0xc8, 0x02, 0x1f, 0xd7, 0x3b, - 0xa9, 0x7e, 0x53, 0xd5, 0xb0, 0x27, 0x58, 0x73, 0xa2, 0x24, 0x56, 0x3c, 0xd0, 0x65, 0xee, 0xd5, - 0xb8, 0x4b, 0x3a, 0xe9, 0x7d, 0x53, 0xdc, 0x40, 0xfa, 0x3d, 0xee, 0x12, 0x2c, 0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 0x02, 0x55, 0xa0, 0x9f, 0x3d, 0x18, 0x15, 0xa2, 0x6d, 0xe6, 0x55, 0xbe, 0xc3, - 0xc3, 0x6b, 0xfe, 0x18, 0x8d, 0x11, 0x60, 0xce, 0x08, 0x6d, 0xc0, 0x40, 0x8d, 0xa5, 0x6a, 0x17, - 0xb2, 0xec, 0xfb, 0x33, 0x8d, 0x0f, 0x1d, 0x72, 0xd8, 0x0b, 0x5d, 0x3c, 0xa3, 0xc0, 0x82, 0x17, - 0xe3, 0x4a, 0x5a, 0xdb, 0x9b, 0xf2, 0xc4, 0xca, 0xe6, 0x4a, 0x5a, 0xdb, 0xcb, 0xd5, 0x8e, 0x5c, - 0x19, 0x05, 0x16, 0xbc, 0xd0, 0xcb, 0x50, 0xd8, 0xac, 0x89, 0xc7, 0xa0, 0x99, 0x56, 0x08, 0x33, - 0x6e, 0xd1, 0xfc, 0xc0, 0xdd, 0xfd, 0x72, 0x61, 0x79, 0x01, 0x17, 0x36, 0x6b, 0x68, 0x1d, 0x06, - 0x37, 0x79, 0xa4, 0x13, 0x61, 0x68, 0x78, 0x22, 0x3b, 0x08, 0x4b, 0x2a, 0x18, 0x0a, 0x7f, 0x58, - 0x28, 0x10, 0x58, 0x32, 0x61, 0xc9, 0x64, 0x54, 0xc4, 0x16, 0x11, 0x30, 0x72, 0xf6, 0x60, 0x51, - 0x76, 0xf8, 0x55, 0x23, 0x8e, 0xfb, 0x82, 0x35, 0x8e, 0x74, 0x56, 0x3b, 0x77, 0xda, 0x01, 0xcb, - 0x26, 0x20, 0x22, 0x8b, 0x65, 0xce, 0xea, 0x39, 0x49, 0xd4, 0x69, 0x56, 0x2b, 0x22, 0x1c, 0x33, - 0x45, 0x3b, 0x30, 0xba, 0x1b, 0xb6, 0xb6, 0x89, 0x5c, 0xd2, 0x2c, 0xd0, 0x58, 0x8e, 0x34, 0x7b, - 0x5d, 0x10, 0xba, 0x41, 0xd4, 0x76, 0x1a, 0xa9, 0x5d, 0x88, 0x5d, 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, 0x27, 0x79, 0x76, 0x24, 0x7e, 0x95, 0xe6, 0x30, 0xac, 0xb0, 0x68, 0x8d, 0xed, 0xc4, 0x5c, - 0x0b, 0x34, 0x3d, 0x93, 0x1f, 0xba, 0x4c, 0xd7, 0x16, 0x71, 0xe1, 0x55, 0xfd, 0xc5, 0x31, 0x07, - 0x54, 0xd7, 0x92, 0x12, 0xd3, 0x2b, 0x40, 0x38, 0x7d, 0xaa, 0x83, 0xcb, 0x67, 0xe2, 0x56, 0x16, - 0x0b, 0x04, 0x06, 0x38, 0xc4, 0x09, 0x9e, 0xe8, 0x23, 0x30, 0x21, 0xe2, 0xd0, 0xc6, 0xdd, 0x74, - 0x3a, 0x7e, 0x16, 0x83, 0x13, 0x38, 0x9c, 0xa2, 0xe6, 0xd9, 0x89, 0x9c, 0x9b, 0x0d, 0x22, 0xb6, - 0xbe, 0x55, 0xd7, 0xdb, 0x09, 0xa7, 0xcf, 0xb0, 0xfd, 0x41, 0x64, 0x27, 0x4a, 0x62, 0x71, 0x46, - 0x09, 0xb4, 0x01, 0x13, 0xad, 0x80, 0x90, 0x26, 0x13, 0xf4, 0xc5, 0x79, 0x56, 0xe6, 0xa1, 0x61, - 0x68, 0x4b, 0x2a, 0x09, 0xdc, 0xbd, 0x0c, 0x18, 0x4e, 0x71, 0x40, 0xb7, 0x60, 0xc8, 0xdf, 0x25, - 0xc1, 0x36, 0x71, 0xea, 0xd3, 0x67, 0x3b, 0x3c, 0xd6, 0x12, 0x87, 0xdb, 0x55, 0x41, 0x9b, 0xf0, - 0x65, 0x91, 0xe0, 0xee, 0xbe, 0x2c, 0xb2, 0x32, 0xf4, 0x7f, 0x5a, 0x70, 0x52, 0x5a, 0x87, 0xaa, - 0x2d, 0xda, 0xeb, 0x0b, 0xbe, 0x17, 0x46, 0x01, 0x0f, 0x66, 0xf2, 0x48, 0x7e, 0x80, 0x8f, 0x8d, - 0x9c, 0x42, 0x4a, 0x11, 0x7d, 0x32, 0x8f, 0x22, 0xc4,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x8c, 0xc4, 0x26, 0x2d, 0x9f, 0x43, 0x9a, 0x5f, 0xb1, 0x71, 0x2b, - 0x10, 0x71, 0x2b, 0x15, 0x05, 0xfa, 0x18, 0x0c, 0xd6, 0xdd, 0x5d, 0x37, 0x14, 0xca, 0xb1, 0x03, - 0x1b, 0xe3, 0xe2, 0xad, 0x73, 0x91, 0xb3, 0xc1, 0x92, 0x9f, 0xfd, 0x43, 0x85, 0xb8, 0x4f, 0xde, - 0x68, 0xfb, 0x91, 0x73, 0x04, 0x27, 0xf9, 0x25, 0xe3, 0x24, 0x7f, 0x3c, 0x7b, 0xa0, 0xb5, 0x26, - 0xe5, 0x9e, 0xe0, 0x57, 0x13, 0x27, 0xf8, 0x13, 0xdd, 0x59, 0x75, 0x3e, 0xb9, 0xff, 0xa1, 0x05, - 0x93, 0x06, 0xfd, 0x11, 0x1c, 0x20, 0xcb, 0xe6, 0x01, 0xf2, 0x48, 0xd7, 0x6f, 0xc8, 0x39, 0x38, - 0xbe, 0xbf, 0x98, 0x68, 0x3b, 0x3b, 0x30, 0xde, 0x86, 0xbe, 0x6d, 0x27, 0xa8, 0x77, 0x4a, 0x59, - 0x94, 0x2a, 0x34, 0x7b, 0xd9, 0x09, 0x84, 0xa7, 0xc2, 0x33, 0xb2, 0xd7, 0x29, 0xa8, 0xab, 0x97, - 0x02, 0xab, 0x0a, 0xbd, 0x04, 0x03, 0x61, 0xcd, 0x6f, 0xa9, 0x37, 0x53, 0x2c, 0xe5, 0x6f, 0x95, - 0x41, 0xee, 0xed, 0x97, 0x91, 0x59, 0x1d, 0x05, 0x63, 0x41, 0x8f, 0xde, 0x84, 0x51, 0xf6, 0x4b, - 0xb9, 0x0d, 0x16, 0xf3, 0x35, 0x18, 0x55, 0x9d, 0x90, 0xfb, 0xd4, 0x1a, 0x20, 0x6c, 0xb2, 0x9a, - 0xd9, 0x82, 0x92, 0xfa, 0xac, 0x07, 0x6a, 0xed, 0xfe, 0x57, 0x45, 0x98, 0xca, 0x98, 0x73, 0x28, - 0x34, 0x46, 0xe2, 0x62, 0x8f, 0x53, 0xf5, 0x1d, 0x8e, 0x45, 0xc8, 0x2e, 0x50, 0x75, 0x31, 0xb7, - 0x7a, 0xae, 0xf4, 0x5a, 0x48, 0x92, 0x95, 0x52, 0x50, 0xf7, 0x4a, 0x69, 0x65, 0x47, 0xd6, 0xd5, - 0xb4, 0x22, 0xd5, 0xd2, 0x07, 0x3a, 0xa6, 0xbf, 0xd1, 0x07, 0xc7, 0xb2, 0xe2, 0x09, 0xa3, 0xcf, - 0x24, 0xf2, 0x88, 0xbf, 0xd0, 0xa9, 0x87, 0xf5, 0x92, 0x3c, 0xb9, 0xb8, 0x08, 0xe3, 0x39, 0x6b, - 0x66, 0x16, 0xef, 0xda, 0xcd, 0xa2, 0x4e, 0x16, 0x5e, 0x27, 0xe0, 0xf9, 0xdf, 0xe5, 0xf6, 0xf1, - 0x81, 0x9e, 0x1b, 0x20, 0x12, 0xc7, 0x87, 0x09, 0x97, 0x24, 0x09, 0xee, 0xee, 0x92, 0x24, 0x6b, - 0x46, 0x2b, 0x30, 0x50, 0xe3, 0xbe, 0x2e, 0xc5, 0xee, 0x5b, 0x18, 0x77, 0x74, 0x51, 0x1b, 0xb0, - 0x70, 0x70, 0x11, 0x0c, 0x66, 0x5c, 0x18, 0xd6, 0x3a, 0xe6, 0x81, 0x4e, 0x9e, 0x1d, 0x7a, 0xf0, - 0x69, 0x5d, 0xf0, 0x40, 0x27, 0xd0, 0x8f, 0x5a, 0x90, 0x78, 0xf0, 0xa2, 0x94, 0x72, 0x56, 0xae, - 0x52, 0xee, 0x2c, 0xf4, 0x05, 0x7e, 0x83, 0x24, 0x93, 0x54, 0x63, 0xbf, 0x41, 0x30, 0xc3, 0x50, - 0x8a, 0x28, 0x56, 0xb5, 0x8c, 0xe8, 0xd7, 0x48, 0x71, 0x41, 0x7c, 0x14, 0xfa, 0x1b, 0x64, 0x97, - 0x34, 0x92, 0xb9, 0x04, 0x57, 0x29, 0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x1d, 0xb9, 0xa7, - 0x50, 0xc4, 0x5a, 0x36, 0x2e, 0xb9, 0x03, 0xc7, 0x8c, 0xec, 0xff, 0x66, 0xc1, 0xa0, 0x78, 0xc9, - 0x77, 0x04, 0x52, 0xe3, 0x9c, 0x61, 0x94, 0x28, 0x67, 0x77, 0x18, 0x6b, 0x4c, 0xae, 0x39, 0x62, - 0x25, 0x61, 0x8e, 0x78, 0xa4, 0x13, 0x93, 0xce, 0x86, 0x88, 0xff, 0xaf, 0x48, 0xa5, 0x77, 0xe3, - 0x4d, 0xf9, 0x83, 0xef, 0x82, 0x75, 0x18, 0x0c, 0xc5, 0x9b, 0xe6, 0x42, 0xfe, 0x6b, 0x90, 0xe4, - 0x20, 0xc6, 0x5e, 0x74, 0xe2, 0x15, 0xb3, 0x64, 0x92, 0xf9, 0x58, 0xba, 0xf8, 0x00, 0x1f, 0x4b, - 0x77, 0x7b, 0x75, 0xdf, 0x77, 0x18, 0xaf, 0xee, 0xed, 0xaf, 0xb3, 0x93, 0x53, 0x87, 0x1f, 0x81, - 0x50, 0x75, 0xc9, 0x3c, 0x63, 0xed, 0x0e, 0x33, 0x4b, 0x34, 0x2a, 0x47, 0xb8, 0xfa, 0x45, 0x0b, - 0x4e, 0x67, 0x7c, 0x95, 0x26, 0x69, 0x3d, 0x03, 0x43, 0x4e, 0xbb, 0xee, 0xaa, 0xb5, 0xac, 0x99, - 0x26, 0xe7, 0x04, 0x1c, 0x2b, 0x0a, 0xb4, 0x00, 0x93, 0xe4, 0x76, 0xcb, 0xe5, 0x86, 0x5c, 0xdd, - 0xf9, 0xb8, 0xc8, 0x9f, 0x7f, 0x2e, 0x25, 0x91, 0x38, 0x4d, 0xaf, 0x02, 0x44, 0x15, 0x73, 0x03, - 0x44, 0xfd, 0xbc, 0x05, 0xc3, 0xea, 0x55, 0xef, 0x03, 0xef, 0xed, 0x8f, 0x98, 0xbd, 0xfd, 0x70, - 0x87, 0xde, 0xce, 0xe9, 0xe6, 0x3f, 0x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e4, 0x0c, 0x8c, 0x79, - 0x71, 0x74, 0x1d, 0x4a, 0x5b, 0x7c, 0xe3, 0xdb, 0x0c, 0x45, 0x12, 0xe3, 0xcc, 0xc3, 0xe8, 0x92, - 0x24, 0x4a, 0x67, 0x20, 0x57, 0x28, 0x1c, 0xb3, 0x42, 0x9f, 0xb7, 0xe0, 0x78, 0x32, 0x0b, 0x34, - 0x7b, 0x10, 0x24, 0x9c, 0x94, 0x5e, 0xec, 0x25, 0x2d, 0x37, 0x2b, 0x60, 0x54, 0xc8, 0x14, 0xfc, - 0x99, 0x64, 0x38, 0xbb, 0x3a, 0xda, 0xd1, 0xc1, 0xcd, 0xba, 0x70, 0x96, 0xc9, 0xec, 0xe8, 0x44, - 0xf0, 0x14, 0xde, 0xd1, 0x78, 0x7e, 0x11, 0xd3, 0x82, 0x68, 0x03, 0x60, 0xb3, 0x41, 0x64, 0xc2, - 0xfa, 0x91, 0xfc, 0xd3, 0x7f, 0x59, 0x51, 0xc9, 0x6c, 0x41, 0x54, 0x26, 0x8c, 0xa1, 0x58, 0xe3, - 0x43, 0xa7, 0x52, 0xcd, 0xf5, 0xea, 0x24, 0x60, 0xe6, 0x93, 0x9c, 0xa9, 0xb4, 0xc0, 0x28, 0xd2, - 0x53, 0x89, 0xc3, 0xb1, 0xe0, 0xc0, 0x78, 0x91, 0xd6, 0xf6, 0x66, 0xd8, 0x29, 0x2c, 0xfe, 0x02, - 0x69, 0x6d, 0x27, 0x26, 0x14, 0xe7, 0xc5, 0xe0, 0x58, 0x70, 0xa0, 0x4b, 0x66, 0x93, 0x2e, 0x20, - 0x12, 0x4c, 0x8f, 0xe7, 0x2f, 0x99, 0x65, 0x4e, 0x92, 0x5e, 0x32, 0x02, 0x81, 0x25, 0x13, 0xf4, - 0x49, 0x53, 0xda, 0x99, 0x60, 0x3c, 0x9f, 0xee, 0x22, 0xed, 0x18, 0x7c, 0x3b, 0xcb, 0x3b, 0x2f, - 0x43, 0x61, 0xb3, 0xc6, 0xc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 0x63, 0x6e, 0xa8, 0x06, 0xa3, 0x01, 0x09, 0xdd, 0x3b, 0xa4, 0xe2, 0x37, + 0xdc, 0xda, 0xde, 0xcc, 0x43, 0xac, 0x79, 0x4f, 0x76, 0xec, 0x32, 0xac, 0x15, 0x88, 0xed, 0x12, + 0x3a, 0x14, 0x1b, 0x4c, 0xd1, 0x9b, 0x30, 0x16, 0x90, 0x30, 0x72, 0x82, 0x48, 0xd4, 0x32, 0xa3, + 0xec, 0x88, 0x63, 0x58, 0x47, 0xf0, 0xeb, 0x44, 0x5c, 0x4d, 0x8c, 0xc1, 0x26, 0x07, 0xf4, 0x71, + 0x69, 0x24, 0x59, 0xf3, 0xdb, 0x5e, 0x14, 0xce, 0x0c, 0xb3, 0x76, 0x67, 0x5a, 0xd3, 0xaf, 0xc7, + 0x74, 0x49, 0x2b, 0x0a, 0x2f, 0x8c, 0x0d, 0x56, 0xe8, 0x93, 0x30, 0xc6, 0xff, 0x73, 0x23, 0x70, + 0x38, 0x73, 0x9c, 0xf1, 0x3e, 0x9b, 0xcf, 0x9b, 0x13, 0x2e, 0x1c, 0x17, 0xcc, 0xc7, 0x74, 0x68, + 0x88, 0x4d, 0x6e, 0x08, 0xc3, 0x58, 0xc3, 0xdd, 0x25, 0x1e, 0x09, 0xc3, 0x4a, 0xe0, 0xdf, 0x24, + 0x42, 0xa7, 0x7d, 0x32, 0xdb, 0x68, 0xec, 0xdf, 0x24, 0xe2, 0x12, 0xa8, 0x97, 0xc1, 0x26, 0x0b, + 0x74, 0x0d, 0xc6, 0x03, 0xe2, 0xd4, 0xdd, 0x98, 0xe9, 0x48, 0x37, 0xa6, 0xec, 0xe2, 0x8c, 0x8d, + 0x42, 0x38, 0xc1, 0x04, 0x5d, 0x85, 0x51, 0xd6, 0xe7, 0xed, 0x16, 0x67, 0x7a, 0xa2, 0x1b, 0x53, + 0xe6, 0x02, 0x51, 0xd5, 0x8a, 0x60, 0x83, 0x01, 0x7a, 0x03, 0x86, 0x1b, 0xee, 0x26, 0xa9, 0xed, + 0xd5, 0x1a, 0x64, 0x66, 0x94, 0x71, 0xcb, 0xdc, 0x0c, 0x57, 0x25, 0x11, 0x97, 0xcf, 0xd5, 0x5f, + 0x1c, 0x17, 0x47, 0xd7, 0xe1, 0x44, 0x44, 0x82, 0xa6, 0xeb, 0x39, 0x74, 0x13, 0x13, 0x57, 0x42, + 0x66, 0xcb, 0x1f, 0x63, 0xb3, 0xeb, 0x8c, 0x18, 0x8d, 0x13, 0x1b, 0x99, 0x54, 0x38, 0xa7, 0x34, + 0xba, 0x0d, 0x33, 0x19, 0x18, 0x3e, 0x6f, 0x8f, 0x31, 0xce, 0xaf, 0x09, 0xce, 0x33, 0x1b, 0x39, + 0x74, 0x07, 0x1d, 0x70, 0x38, 0x97, 0x3b, 0xba, 0x0a, 0x13, 0x6c, 0xe7, 0xac, 0xb4, 0x1b, 0x0d, + 0x51, 0xe1, 0x38, 0xab, 0xf0, 0x71, 0x29, 0x47, 0x94, 0x4d, 0xf4, 0xc1, 0x7e, 0x09, 0xe2, 0x7f, + 0x38, 0x59, 0x1a, 0xdd, 0x64, 0x66, 0xe3, 0x76, 0xe0, 0x46, 0x7b, 0x74, 0x55, 0x91, 0xdb, 0xd1, + 0xcc, 0x44, 0x47, 0x15, 0x9a, 0x4e, 0xaa, 0x6c, 0xcb, 0x3a, 0x10, 0x27, 0x19, 0xd2, 0xa3, 0x20, + 0x8c, 0xea, 0xae, 0x37, 0x33, 0xc9, 0xef, 0x53, 0x72, 0x27, 0xad, 0x52, 0x20, 0xe6, 0x38, 0x66, + 0x32, 0xa6, 0x3f, 0xae, 0xd2, 0x13, 0x77, 0x8a, 0x11, 0xc6, 0x26, 0x63, 0x89, 0xc0, 0x31, 0x0d, + 0x15, 0x82, 0xa3, 0x68, 0x6f, 0x06, 0x31, 0x52, 0xb5, 0x21, 0x6e, 0x6c, 0x7c, 0x1c, 0x53, 0xb8, + 0x7d, 0x13, 0xc6, 0xd5, 0x36, 0xc1, 0x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 0xd3, 0x79, 0x32, 0x1d, 0xea, 0xc5, 0xfe, 0x1f, 0x59, 0x70, 0xba, 0x63, 0x58, 0xa8, + 0x6f, 0xc3, 0xcb, 0x82, 0xfd, 0x39, 0x0b, 0x1e, 0xc9, 0x2c, 0x61, 0xf8, 0x35, 0x5e, 0x80, 0xe1, + 0x5a, 0x22, 0x59, 0x73, 0x1c, 0x20, 0x45, 0x25, 0x6a, 0x8e, 0x69, 0x0c, 0xf7, 0xc5, 0x42, 0x57, + 0xf7, 0xc5, 0xdf, 0xb6, 0x20, 0x75, 0xd4, 0x1f, 0x81, 0xe4, 0x59, 0x36, 0x25, 0xcf, 0xc7, 0x7a, + 0xe9, 0xcd, 0x1c, 0xa1, 0xf3, 0x6f, 0x26, 0xe0, 0x44, 0xce, 0x83, 0xdb, 0x5d, 0x98, 0xda, 0xaa, + 0x11, 0x33, 0xc2, 0x42, 0xa7, 0xc8, 0x63, 0x1d, 0xc3, 0x31, 0xf0, 0x1c, 0xd9, 0x29, 0x12, 0x9c, + 0xae, 0x02, 0x7d, 0xce, 0x82, 0x63, 0xce, 0xad, 0x70, 0x99, 0xde, 0x20, 0xdc, 0xda, 0x42, 0xc3, + 0xaf, 0xed, 0x50, 0xc1, 0x4c, 0x2e, 0xab, 0x17, 0x32, 0x15, 0xc8, 0x37, 0xaa, 0x29, 0x7a, 0xa3, + 0xfa, 0x99, 0xbb, 0xfb, 0xa5, 0x63, 0x59, 0x54, 0x38, 0xb3, 0x2e, 0x84, 0x45, 0x4e, 0x22, 0x27, + 0xda, 0xee, 0x14, 0x03, 0x24, 0xeb, 0x65, 0x34, 0x17, 0x89, 0x25, 0x06, 0x2b, 0x3e, 0xe8, 0xd3, + 0x30, 0xbc, 0x25, 0x9f, 0xfb, 0x67, 0x88, 0xdc, 0x71, 0x47, 0x76, 0x0e, 0x82, 0xc0, 0xfd, 0x41, + 0x14, 0x11, 0x8e, 0x99, 0xa2, 0xd7, 0xa1, 0xe8, 0x6d, 0x86, 0x22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 0xc0, 0x58, 0x43, 0x37, 0x25, 0x89, 0x79, 0x7a, 0x4f, 0x56, 0x28, 0xf1, 0x38, + 0x40, 0x03, 0x61, 0x93, 0x39, 0x9a, 0x03, 0x50, 0xbe, 0x15, 0x52, 0xdb, 0xcf, 0xae, 0x35, 0xca, + 0xf9, 0x22, 0xc4, 0x1a, 0x05, 0x7a, 0x11, 0x46, 0x22, 0xbf, 0xe5, 0x37, 0xfc, 0xad, 0xbd, 0x2b, + 0x44, 0x06, 0x30, 0x54, 0x8e, 0xbe, 0x1b, 0x31, 0x0a, 0xeb, 0x74, 0xe8, 0x36, 0x4c, 0x29, 0x26, + 0xd5, 0xfb, 0x60, 0x5e, 0x63, 0x6a, 0x93, 0xf5, 0x24, 0x47, 0x9c, 0xae, 0x04, 0xbd, 0x02, 0xe3, + 0xcc, 0xe3, 0x98, 0x95, 0xbf, 0x42, 0xf6, 0x64, 0x60, 0x5b, 0x26, 0x61, 0xaf, 0x19, 0x18, 0x9c, + 0xa0, 0x44, 0x8b, 0x30, 0xd5, 0x74, 0xc3, 0x44, 0xf1, 0x01, 0x56, 0x9c, 0x35, 0x60, 0x2d, 0x89, + 0xc4, 0x69, 0x7a, 0xfb, 0xe7, 0xc4, 0x18, 0x7b, 0x91, 0xfb, 0xfe, 0x72, 0x7c, 0x6f, 0x2f, 0xc7, + 0x6f, 0x58, 0x30, 0x49, 0x6b, 0x67, 0x6e, 0x94, 0x52, 0x90, 0x52, 0xa9, 0x0f, 0xac, 0x0e, 0xa9, + 0x0f, 0xce, 0xd1, 0x6d, 0xbb, 0xee, 0xb7, 0x23, 0xa1, 0x1d, 0xd5, 0xf6, 0x65, 0x0a, 0xc5, 0x02, + 0x2b, 0xe8, 0x48, 0x10, 0x88, 0x47, 0xe0, 0x3a, 0x1d, 0x09, 0x02, 0x2c, 0xb0, 0x32, 0x33, 0x42, + 0x5f, 0x76, 0x66, 0x04, 0x1e, 0xe0, 0x5a, 0x78, 0xc1, 0x09, 0x91, 0x56,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, 0x37, + 0x1a, 0xfe, 0xad, 0xe4, 0xb0, 0xae, 0x30, 0x28, 0x16, 0x58, 0xf4, 0x0c, 0x0c, 0xb5, 0x02, 0xb2, + 0xeb, 0xfa, 0x42, 0xbe, 0xd6, 0xcc, 0x58, 0x15, 0x01, 0xc7, 0x8a, 0x82, 0x5e, 0xbc, 0x43, 0xd7, + 0xa3, 0xb2, 0x44, 0xcd, 0xf7, 0xea, 0xdc, 0x36, 0x51, 0x14, 0xd9, 0x8f, 0x34, 0x38, 0x36, 0xa8, + 0xd0, 0x0d, 0x18, 0x66, 0xff, 0xd9, 0xb6, 0x73, 0xf8, 0xc4, 0xee, 0x22, 0x1f, 0xac, 0x60, 0x80, + 0x63, 0x5e, 0xe8, 0x39, 0x80, 0x48, 0x66, 0x10, 0x09, 0x45, 0xa4, 0x4a, 0x75, 0x17, 0x51, 0xb9, + 0x45, 0x42, 0xac, 0x51, 0xa1, 0xa7, 0x61, 0x38, 0x72, 0xdc, 0xc6, 0xaa, 0xeb, 0x31, 0xfb, 0x3d, + 0x6d, 0xbf, 0x48, 0xcb, 0x2a, 0x80, 0x38, 0xc6, 0x53, 0x59, 0x90, 0xc5, 0x20, 0x5a, 0xd8, 0x8b, + 0x44, 0x06, 0xb2, 0x22, 0x97, 0x05, 0x57, 0x15, 0x14, 0x6b, 0x14, 0x68, 0x1b, 0x4e, 0xb9, 0x1e, + 0xcb, 0x14, 0x44, 0xaa, 0x3b, 0x6e, 0x6b, 0x63, 0xb5, 0x7a, 0x9d, 0x04, 0xee, 0xe6, 0xde, 0x82, + 0x53, 0xdb, 0x21, 0x9e, 0x4c, 0xd9, 0xfd, 0x98, 0x68, 0xe2, 0xa9, 0x72, 0x07, 0x5a, 0xdc, 0x91, + 0x93, 0xfd, 0x3c, 0x9b, 0xef, 0x57, 0xab, 0xe8, 0x29, 0x63, 0xeb, 0x38, 0xa1, 0x6f, 0x1d, 0x07, + 0xfb, 0xa5, 0x81, 0xab, 0x55, 0x2d, 0x10,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0x3c, 0xd0, 0xc9, 0xb3, + 0x43, 0x0f, 0x3e, 0xad, 0x0b, 0x1e, 0xe8, 0x04, 0xfa, 0x71, 0x0b, 0x12, 0x8f, 0x6a, 0x94, 0x52, + 0xce, 0xca, 0x55, 0xca, 0x9d, 0x85, 0xbe, 0xc0, 0x6f, 0x90, 0x64, 0xf6, 0x6d, 0xec, 0x37, 0x08, + 0x66, 0x18, 0x4a, 0x11, 0xc5, 0xaa, 0x96, 0x51, 0xfd, 0x1a, 0x29, 0x2e, 0x88, 0x8f, 0x42, 0x7f, + 0x83, 0xec, 0x92, 0x46, 0x32, 0x49, 0xe2, 0x2a, 0x05, 0x62, 0x8e, 0xb3, 0x7f, 0xb9, 0x0f, 0x4e, + 0x77, 0x8c, 0xa7, 0x45, 0x2f, 0x63, 0x5b, 0x4e, 0x44, 0x6e, 0x39, 0x7b, 0xc9, 0x1c, 0x66, 0x97, + 0x38, 0x18, 0x4b, 0x3c, 0x7b, 0x62, 0xca, 0xf3, 0x83, 0x24, 0x54, 0x98, 0x22, 0x2d, 0x88, 0xc0, + 0x9a, 0x2a, 0xb1, 0xe2, 0xfd, 0x50, 0x89, 0x3d, 0x07, 0x10, 0x86, 0x0d, 0xee, 0x16, 0x58, 0x17, + 0x6f, 0x57, 0xe3, 0x3c, 0x32, 0xd5, 0x55, 0x81, 0xc1, 0x1a, 0x15, 0x5a, 0x82, 0xc9, 0x56, 0xe0, + 0x47, 0x5c, 0x23, 0xbc, 0xc4, 0x3d, 0x67, 0xfb, 0xcd, 0x50, 0x46, 0x95, 0x04, 0x1e, 0xa7, 0x4a, + 0xa0, 0x17, 0x61, 0x44, 0x84, 0x37, 0xaa, 0xf8, 0x7e, 0x43, 0x28, 0xa1, 0x94, 0x33, 0x69, 0x35, + 0x46, 0x61, 0x9d, 0x4e, 0x2b, 0xc6, 0xd4, 0xcc, 0x83, 0x99, 0xc5, 0xb8, 0xaa, 0x59, 0xa3, 0x4b, + 0x84, 0x42, 0x1f, 0xea, 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d9, 0x58, 0x33, 0x8e, 0x3e, 0x05, + 0x10, 0x46, 0x81, 0xeb, 0x6d, 0x51, 0x98, 0x88, 0xbf, 0xff, 0x54, 0x07, 0x6e, 0x55, 0x45, 0xcc, + 0x79, 0xc6, 0x7b, 0x8e, 0x42, 0x60, 0x8d, 0x23, 0x9a, 0x33, 0x4e, 0xfa, 0xd9, 0xc4, 0xd8, 0x01, + 0xe7, 0x1a, 0x8f, 0xd9, 0xec, 0x4b, 0x30, 0xac, 0x98, 0x77, 0xd3, 0x7e, 0x8d, 0xea, 0x62, 0xd1, + 0x47, 0x60, 0x22, 0xd1, 0xb6, 0x43, 0x29, 0xcf, 0x7e, 0xc5, 0x82, 0x09, 0xde, 0x98, 0x65, 0x6f, + 0x57, 0x9c, 0x06, 0x77, 0xe0, 0x58, 0x23, 0x63, 0x57, 0x16, 0xc3, 0xdf, 0xfb, 0x2e, 0xae, 0x94, + 0x65, 0x59, 0x58, 0x9c, 0x59, 0x07, 0x3a, 0x4f, 0x57, 0x1c, 0xdd, 0x75, 0x9d, 0x86, 0x88, 0xa1, + 0x30, 0xca, 0x57, 0x1b, 0x87, 0x61, 0x85, 0xb5, 0xff, 0xd4, 0x82, 0x29, 0xde, 0xf2, 0x2b, 0x64, + 0x4f, 0xed, 0x4d, 0xdf, 0xca, 0xb6, 0x8b, 0xd4, 0xbd, 0x85, 0x9c, 0xd4, 0xbd, 0xfa, 0xa7, 0x15, + 0x3b, 0x7e, 0xda, 0x57, 0x2c, 0x10, 0x33, 0xe4, 0x08, 0xf4, 0x19, 0xdf, 0x65, 0xea, 0x33, 0x66, + 0xf3, 0x17, 0x41, 0x8e, 0x22, 0xe3, 0xef, 0x2d, 0x98, 0xe4, 0x04, 0xb1, 0xad, 0xfe, 0x5b, 0x3a, + 0x0e, 0x0b, 0xe6, 0x17, 0x65, 0x3a, 0x5f, 0x5e, 0x21, 0x7b, 0x1b, 0x7e, 0xc5, 0x89, 0xb6, 0xb3, + 0x3f, 0xca, 0x18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 0x5b, 0x1a, 0xbd, 0x06, 0xc3, 0xad, + 0xc0, 0xaf, 0xad, 0x69, 0xcf, 0x8f, 0xcf, 0xd0, 0x0e, 0xac, 0x48, 0xe0, 0xc1, 0x7e, 0x69, 0x4c, + 0xfd, 0x61, 0x07, 0x7e, 0x5c, 0x20, 0x23, 0xf6, 0xc2, 0xc8, 0x83, 0x8e, 0xbd, 0x30, 0x7a, 0xbf, + 0x63, 0x2f, 0xec, 0xc0, 0x74, 0x95, 0x04, 0xae, 0xd3, 0x70, 0xef, 0x50, 0x99, 0x5c, 0xee, 0x81, + 0x1b, 0x30, 0x1c, 0x24, 0x76, 0xfd, 0x9e, 0x42, 0x2a, 0x6b, 0x59, 0xc5, 0xe4, 0x2e, 0x1f, 0x33, + 0xb2, 0xff, 0xab, 0x05, 0x83, 0xe2, 0xb5, 0xe0, 0x11, 0x48, 0xa6, 0xf3, 0x86, 0xe1, 0xa3, 0x94, + 0x3d, 0x28, 0xac, 0x31, 0xb9, 0x26, 0x8f, 0x72, 0xc2, 0xe4, 0xf1, 0x48, 0x27, 0x26, 0x9d, 0x8d, + 0x1d, 0xff, 0x67, 0x91, 0xde, 0x10, 0x8c, 0x77, 0xeb, 0x0f, 0xbe, 0x0b, 0xd6, 0x61, 0x30, 0x14, + 0xef, 0xa6, 0x0b, 0xf9, 0x2f, 0x4e, 0x92, 0x83, 0x18, 0x7b, 0xea, 0x89, 0x97, 0xd2, 0x92, 0x49, + 0xe6, 0x83, 0xec, 0xe2, 0x03, 0x7c, 0x90, 0xdd, 0xed, 0x65, 0x7f, 0xdf, 0xfd, 0x78, 0xd9, 0x6f, + 0x7f, 0x9d, 0x9d, 0xce, 0x3a, 0xfc, 0x08, 0x04, 0xb7, 0x4b, 0xe6, 0x39, 0x6e, 0x77, 0x98, 0x59, + 0xa2, 0x51, 0x39, 0x02, 0xdc, 0x2f, 0x59, 0x70, 0x3a, 0xe3, 0xab, 0x34, 0x69, 0xee, 0x19, 0x18, + 0x72, 0xda,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0xd6, 0x0e, + 0x42, 0x77, 0x97, 0x48, 0xb4, 0x58, 0x24, 0x73, 0x3c, 0xa8, 0x7e, 0x02, 0x79, 0xc0, 0x02, 0x39, + 0x25, 0x80, 0xcc, 0x68, 0x9c, 0x66, 0x84, 0x2e, 0xc0, 0x30, 0x53, 0xbd, 0x57, 0x62, 0x85, 0xb0, + 0x52, 0x7c, 0xad, 0x49, 0x04, 0x8e, 0x69, 0xd8, 0xe5, 0xa0, 0x7d, 0x93, 0x91, 0x27, 0xde, 0x2b, + 0x57, 0x39, 0x18, 0x4b, 0x3c, 0xfa, 0x18, 0x4c, 0xf2, 0x72, 0x81, 0xdf, 0x72, 0xb6, 0xb8, 0x49, + 0xb0, 0x5f, 0x05, 0x81, 0x99, 0x5c, 0x4b, 0xe0, 0x0e, 0xf6, 0x4b, 0xc7, 0x92, 0x30, 0xd6, 0xec, + 0x14, 0x17, 0xe6, 0xf9, 0xc7, 0x2b, 0xa1, 0x67, 0x46, 0xca, 0x61, 0x30, 0x46, 0x61, 0x9d, 0xce, + 0xfe, 0x3b, 0x0b, 0xa6, 0xb4, 0xa1, 0xea, 0x39, 0xaf, 0x81, 0xd1, 0x49, 0x85, 0x1e, 0x3a, 0xe9, + 0x70, 0x31, 0x09, 0x32, 0x47, 0xb8, 0xef, 0x3e, 0x8d, 0xb0, 0xfd, 0x69, 0x40, 0xe9, 0xac, 0x9d, + 0xe8, 0x0d, 0xee, 0x2e, 0xef, 0x06, 0xa4, 0xde, 0xc9, 0xe0, 0xaf, 0xc7, 0x77, 0x91, 0xef, 0x2b, + 0x79, 0x29, 0xac, 0xca, 0xdb, 0x3f, 0xdc, 0x07, 0x93, 0xc9, 0x88, 0x12, 0xe8, 0x32, 0x0c, 0x70, + 0x29, 0x5d, 0xb0, 0xef, 0xe0, 0x4f, 0xa6, 0xc5, 0xa1, 0x60, 0xf2, 0x8a, 0x10, 0xf4, 0x45, 0x79, + 0xf4, 0x36, 0x8c, 0xd4, 0xfd, 0x5b, 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0x80, 0xd2, 0x18, 0x31, 0xc2, 0xec, 0x6a, 0x9a, 0xe6, + 0x87, 0x33, 0x4a, 0xa0, 0x97, 0x60, 0x4c, 0xf9, 0xdb, 0x6b, 0x23, 0xce, 0x36, 0x76, 0xac, 0x23, + 0xb0, 0x49, 0x87, 0x2e, 0xf2, 0xec, 0x39, 0x22, 0xcf, 0x92, 0x30, 0x75, 0x4e, 0xc8, 0xd4, 0x38, + 0x02, 0x8c, 0x75, 0x9a, 0x85, 0x97, 0x7f, 0xef, 0x9b, 0x67, 0x3e, 0xf0, 0x87, 0xdf, 0x3c, 0xf3, + 0x81, 0x3f, 0xfd, 0xe6, 0x99, 0x0f, 0x7c, 0xdf, 0xdd, 0x33, 0xd6, 0xef, 0xdd, 0x3d, 0x63, 0xfd, + 0xe1, 0xdd, 0x33, 0xd6, 0x9f, 0xde, 0x3d, 0x63, 0xfd, 0xfb, 0xbb, 0x67, 0xac, 0x2f, 0xfd, 0xc5, + 0x99, 0x0f, 0xbc, 0x85, 0xe2, 0xf8, 0xc7, 0x17, 0xe8, 0xe8, 0x5c, 0xd8, 0xbd, 0xf8, 0x3f, 0x02, + 0x00, 0x00, 0xff, 0xff, 0xfd, 0xca, 0x84, 0xba, 0xa5, 0x1e, 0x01, 0x00, } func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) { @@ -7600,6 +7701,41 @@ func (m *Affinity) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *AppArmorProfile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AppArmorProfile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AppArmorProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LocalhostProfile != nil { + i -= len(*m.LocalhostProfile) + copy(dAtA[i:], *m.LocalhostProfile) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.LocalhostProfile))) + i-- + dAtA[i] = 0x12 + } + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *AttachedVolume) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -9617,6 +9753,20 @@ func (m *ContainerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.VolumeMounts) > 0 { + for iNdEx := len(m.VolumeMounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.VolumeMounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } if m.Resources != nil { { size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) @@ -13185,7 +13335,7 @@ func (m *NodeProxyOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *NodeResources) Marshal() (dAtA []byte, err error) { +func (m *NodeRuntimeHandler) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -13195,44 +13345,65 @@ func (m *NodeResources) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NodeResources) MarshalTo(dAtA []byte) (int, error) { +func (m *NodeRuntimeHandler) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NodeResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NodeRuntimeHandler) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Capacity) > 0 { - keysForCapacity := make([]string, 0, len(m.Capacity)) - for k := range m.Capacity { - keysForCapacity = append(keysForCapacity, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) - for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { - v := m.Capacity[ResourceName(keysForCapacity[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + if m.Features != nil { + { + size, err := m.Features.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 - i -= len(keysForCapacity[iNdEx]) - copy(dAtA[i:], keysForCapacity[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCapacity[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *NodeRuntimeHandlerFeatures) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodeRuntimeHandlerFeatures) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeRuntimeHandlerFeatures) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RecursiveReadOnlyMounts != nil { + i-- + if *m.RecursiveReadOnlyMounts { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -13468,6 +13639,20 @@ func (m *NodeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.RuntimeHandlers) > 0 { + for iNdEx := len(m.RuntimeHandlers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RuntimeHandlers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } if m.Config != nil { { size, err := m.Config.MarshalToSizedBuffer(dAtA[:i]) @@ -15818,6 +16003,18 @@ func (m *PodSecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.AppArmorProfile != nil { + { + size, err := m.AppArmorProfile.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } if m.SeccompProfile != nil { { size, err := m.SeccompProfile.MarshalToSizedBuffer(dAtA[:i]) @@ -18813,6 +19010,18 @@ func (m *SecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.AppArmorProfile != nil { + { + size, err := m.AppArmorProfile.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } if m.SeccompProfile != nil { { size, err := m.SeccompProfile.MarshalToSizedBuffer(dAtA[:i]) @@ -19314,6 +19523,15 @@ func (m *ServiceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.TrafficDistribution != nil { + i -= len(*m.TrafficDistribution) + copy(dAtA[i:], *m.TrafficDistribution) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.TrafficDistribution))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } if m.InternalTrafficPolicy != nil { i -= len(*m.InternalTrafficPolicy) copy(dAtA[i:], *m.InternalTrafficPolicy) @@ -20208,6 +20426,13 @@ func (m *VolumeMount) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.RecursiveReadOnly != nil { + i -= len(*m.RecursiveReadOnly) + copy(dAtA[i:], *m.RecursiveReadOnly) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.RecursiveReadOnly))) + i-- + dAtA[i] = 0x3a + } i -= len(m.SubPathExpr) copy(dAtA[i:], m.SubPathExpr) i = encodeVarintGenerated(dAtA, i, uint64(len(m.SubPathExpr))) @@ -20246,6 +20471,54 @@ func (m *VolumeMount) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *VolumeMountStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VolumeMountStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VolumeMountStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RecursiveReadOnly != nil { + i -= len(*m.RecursiveReadOnly) + copy(dAtA[i:], *m.RecursiveReadOnly) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.RecursiveReadOnly))) + i-- + dAtA[i] = 0x22 + } + i-- + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + i -= len(m.MountPath) + copy(dAtA[i:], m.MountPath) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.MountPath))) + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *VolumeNodeAffinity) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -21024,6 +21297,21 @@ func (m *Affinity) Size() (n int) { return n } +func (m *AppArmorProfile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + if m.LocalhostProfile != nil { + l = len(*m.LocalhostProfile) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *AttachedVolume) Size() (n int) { if m == nil { return 0 @@ -21803,6 +22091,12 @@ func (m *ContainerStatus) Size() (n int) { l = m.Resources.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 } @@ -23080,20 +23374,29 @@ func (m *NodeProxyOptions) Size() (n int) { return n } -func (m *NodeResources) Size() (n int) { +func (m *NodeRuntimeHandler) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Capacity) > 0 { - for k, v := range m.Capacity { - _ = 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.Name) + n += 1 + l + sovGenerated(uint64(l)) + if m.Features != nil { + l = m.Features.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *NodeRuntimeHandlerFeatures) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RecursiveReadOnlyMounts != nil { + n += 2 } return n } @@ -23249,6 +23552,12 @@ func (m *NodeStatus) Size() (n int) { l = m.Config.Size() n += 1 + l + sovGenerated(uint64(l)) } + if len(m.RuntimeHandlers) > 0 { + for _, e := range m.RuntimeHandlers { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -24088,6 +24397,10 @@ func (m *PodSecurityContext) Size() (n int) { l = m.SeccompProfile.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.AppArmorProfile != nil { + l = m.AppArmorProfile.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -25172,6 +25485,10 @@ func (m *SecurityContext) Size() (n int) { l = m.SeccompProfile.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.AppArmorProfile != nil { + l = m.AppArmorProfile.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -25386,6 +25703,10 @@ func (m *ServiceSpec) Size() (n int) { l = len(*m.InternalTrafficPolicy) n += 2 + l + sovGenerated(uint64(l)) } + if m.TrafficDistribution != nil { + l = len(*m.TrafficDistribution) + n += 2 + l + sovGenerated(uint64(l)) + } return n } @@ -25684,6 +26005,28 @@ func (m *VolumeMount) Size() (n int) { } l = len(m.SubPathExpr) n += 1 + l + sovGenerated(uint64(l)) + if m.RecursiveReadOnly != nil { + l = len(*m.RecursiveReadOnly) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *VolumeMountStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.MountPath) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + if m.RecursiveReadOnly != nil { + l = len(*m.RecursiveReadOnly) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -25965,6 +26308,17 @@ func (this *Affinity) String() string { }, "") return s } +func (this *AppArmorProfile) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AppArmorProfile{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `LocalhostProfile:` + valueToStringGenerated(this.LocalhostProfile) + `,`, + `}`, + }, "") + return s +} func (this *AttachedVolume) String() string { if this == nil { return "nil" @@ -26515,6 +26869,11 @@ func (this *ContainerStatus) String() string { if this == nil { return "nil" } + repeatedStringForVolumeMounts := "[]VolumeMountStatus{" + for _, f := range this.VolumeMounts { + repeatedStringForVolumeMounts += strings.Replace(strings.Replace(f.String(), "VolumeMountStatus", "VolumeMountStatus", 1), `&`, ``, 1) + "," + } + repeatedStringForVolumeMounts += "}" keysForAllocatedResources := make([]string, 0, len(this.AllocatedResources)) for k := range this.AllocatedResources { keysForAllocatedResources = append(keysForAllocatedResources, string(k)) @@ -26537,6 +26896,7 @@ func (this *ContainerStatus) String() string { `Started:` + valueToStringGenerated(this.Started) + `,`, `AllocatedResources:` + mapStringForAllocatedResources + `,`, `Resources:` + strings.Replace(this.Resources.String(), "ResourceRequirements", "ResourceRequirements", 1) + `,`, + `VolumeMounts:` + repeatedStringForVolumeMounts + `,`, `}`, }, "") return s @@ -27537,22 +27897,23 @@ func (this *NodeProxyOptions) String() string { }, "") return s } -func (this *NodeResources) String() string { +func (this *NodeRuntimeHandler) String() string { if this == nil { return "nil" } - keysForCapacity := make([]string, 0, len(this.Capacity)) - for k := range this.Capacity { - keysForCapacity = append(keysForCapacity, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) - mapStringForCapacity := "ResourceList{" - for _, k := range keysForCapacity { - mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)]) + s := strings.Join([]string{`&NodeRuntimeHandler{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Features:` + strings.Replace(this.Features.String(), "NodeRuntimeHandlerFeatures", "NodeRuntimeHandlerFeatures", 1) + `,`, + `}`, + }, "") + return s +} +func (this *NodeRuntimeHandlerFeatures) String() string { + if this == nil { + return "nil" } - mapStringForCapacity += "}" - s := strings.Join([]string{`&NodeResources{`, - `Capacity:` + mapStringForCapacity + `,`, + s := strings.Join([]string{`&NodeRuntimeHandlerFeatures{`, + `RecursiveReadOnlyMounts:` + valueToStringGenerated(this.RecursiveReadOnlyMounts) + `,`, `}`, }, "") return s @@ -27650,6 +28011,11 @@ func (this *NodeStatus) String() string { repeatedStringForVolumesAttached += strings.Replace(strings.Replace(f.String(), "AttachedVolume", "AttachedVolume", 1), `&`, ``, 1) + "," } repeatedStringForVolumesAttached += "}" + repeatedStringForRuntimeHandlers := "[]NodeRuntimeHandler{" + for _, f := range this.RuntimeHandlers { + repeatedStringForRuntimeHandlers += strings.Replace(strings.Replace(f.String(), "NodeRuntimeHandler", "NodeRuntimeHandler", 1), `&`, ``, 1) + "," + } + repeatedStringForRuntimeHandlers += "}" keysForCapacity := make([]string, 0, len(this.Capacity)) for k := range this.Capacity { keysForCapacity = append(keysForCapacity, string(k)) @@ -27682,6 +28048,7 @@ func (this *NodeStatus) String() string { `VolumesInUse:` + fmt.Sprintf("%v", this.VolumesInUse) + `,`, `VolumesAttached:` + repeatedStringForVolumesAttached + `,`, `Config:` + strings.Replace(this.Config.String(), "NodeConfigStatus", "NodeConfigStatus", 1) + `,`, + `RuntimeHandlers:` + repeatedStringForRuntimeHandlers + `,`, `}`, }, "") return s @@ -28256,6 +28623,7 @@ func (this *PodSecurityContext) String() string { `WindowsOptions:` + strings.Replace(this.WindowsOptions.String(), "WindowsSecurityContextOptions", "WindowsSecurityContextOptions", 1) + `,`, `FSGroupChangePolicy:` + valueToStringGenerated(this.FSGroupChangePolicy) + `,`, `SeccompProfile:` + strings.Replace(this.SeccompProfile.String(), "SeccompProfile", "SeccompProfile", 1) + `,`, + `AppArmorProfile:` + strings.Replace(this.AppArmorProfile.String(), "AppArmorProfile", "AppArmorProfile", 1) + `,`, `}`, }, "") return s @@ -29115,6 +29483,7 @@ func (this *SecurityContext) String() string { `ProcMount:` + valueToStringGenerated(this.ProcMount) + `,`, `WindowsOptions:` + strings.Replace(this.WindowsOptions.String(), "WindowsSecurityContextOptions", "WindowsSecurityContextOptions", 1) + `,`, `SeccompProfile:` + strings.Replace(this.SeccompProfile.String(), "SeccompProfile", "SeccompProfile", 1) + `,`, + `AppArmorProfile:` + strings.Replace(this.AppArmorProfile.String(), "AppArmorProfile", "AppArmorProfile", 1) + `,`, `}`, }, "") return s @@ -29272,6 +29641,7 @@ func (this *ServiceSpec) String() string { `AllocateLoadBalancerNodePorts:` + valueToStringGenerated(this.AllocateLoadBalancerNodePorts) + `,`, `LoadBalancerClass:` + valueToStringGenerated(this.LoadBalancerClass) + `,`, `InternalTrafficPolicy:` + valueToStringGenerated(this.InternalTrafficPolicy) + `,`, + `TrafficDistribution:` + valueToStringGenerated(this.TrafficDistribution) + `,`, `}`, }, "") return s @@ -29490,6 +29860,20 @@ func (this *VolumeMount) String() string { `SubPath:` + fmt.Sprintf("%v", this.SubPath) + `,`, `MountPropagation:` + valueToStringGenerated(this.MountPropagation) + `,`, `SubPathExpr:` + fmt.Sprintf("%v", this.SubPathExpr) + `,`, + `RecursiveReadOnly:` + valueToStringGenerated(this.RecursiveReadOnly) + `,`, + `}`, + }, "") + return s +} +func (this *VolumeMountStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VolumeMountStatus{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `MountPath:` + fmt.Sprintf("%v", this.MountPath) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `RecursiveReadOnly:` + valueToStringGenerated(this.RecursiveReadOnly) + `,`, `}`, }, "") return s @@ -29943,6 +30327,121 @@ func (m *Affinity) Unmarshal(dAtA []byte) error { } return nil } +func (m *AppArmorProfile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AppArmorProfile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AppArmorProfile: 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = AppArmorProfileType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalhostProfile", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.LocalhostProfile = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *AttachedVolume) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -36779,6 +37278,40 @@ func (m *ContainerStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VolumeMounts = append(m.VolumeMounts, VolumeMountStatus{}) + 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:]) @@ -47676,7 +48209,7 @@ func (m *NodeProxyOptions) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeResources) Unmarshal(dAtA []byte) error { +func (m *NodeRuntimeHandler) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -47699,15 +48232,47 @@ func (m *NodeResources) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NodeResources: wiretype end group for non-group") + return fmt.Errorf("proto: NodeRuntimeHandler: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NodeResources: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NodeRuntimeHandler: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Features", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -47734,106 +48299,84 @@ func (m *NodeResources) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Capacity == nil { - m.Capacity = make(ResourceList) + if m.Features == nil { + m.Features = &NodeRuntimeHandlerFeatures{} } - var mapkey ResourceName - mapvalue := &resource.Quantity{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if err := m.Features.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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeRuntimeHandlerFeatures) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeRuntimeHandlerFeatures: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeRuntimeHandlerFeatures: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RecursiveReadOnlyMounts", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = ResourceName(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - 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 postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &resource.Quantity{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break } } - m.Capacity[ResourceName(mapkey)] = *mapvalue - iNdEx = postIndex + b := bool(v != 0) + m.RecursiveReadOnlyMounts = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -49060,6 +49603,40 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeHandlers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuntimeHandlers = append(m.RuntimeHandlers, NodeRuntimeHandler{}) + if err := m.RuntimeHandlers[len(m.RuntimeHandlers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -56398,10 +56975,46 @@ func (m *PodSecurityContext) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SeccompProfile == nil { - m.SeccompProfile = &SeccompProfile{} + if m.SeccompProfile == nil { + m.SeccompProfile = &SeccompProfile{} + } + if err := m.SeccompProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppArmorProfile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AppArmorProfile == nil { + m.AppArmorProfile = &AppArmorProfile{} } - if err := m.SeccompProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.AppArmorProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -66074,6 +66687,42 @@ func (m *SecurityContext) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppArmorProfile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AppArmorProfile == nil { + m.AppArmorProfile = &AppArmorProfile{} + } + if err := m.AppArmorProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -67872,6 +68521,39 @@ func (m *ServiceSpec) Unmarshal(dAtA []byte) error { s := ServiceInternalTrafficPolicy(dAtA[iNdEx:postIndex]) m.InternalTrafficPolicy = &s iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TrafficDistribution", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.TrafficDistribution = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -70429,6 +71111,206 @@ func (m *VolumeMount) Unmarshal(dAtA []byte) error { } m.SubPathExpr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecursiveReadOnly", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := RecursiveReadOnlyMode(dAtA[iNdEx:postIndex]) + m.RecursiveReadOnly = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VolumeMountStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VolumeMountStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VolumeMountStatus: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 MountPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MountPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", 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.ReadOnly = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecursiveReadOnly", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := RecursiveReadOnlyMode(dAtA[iNdEx:postIndex]) + m.RecursiveReadOnly = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/pkg/k8s/vendor/k8s.io/api/core/v1/generated.proto b/pkg/k8s/vendor/k8s.io/api/core/v1/generated.proto index d099238cdf6..f3b47c722d1 100644 --- a/pkg/k8s/vendor/k8s.io/api/core/v1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/core/v1/generated.proto @@ -77,6 +77,25 @@ message Affinity { optional PodAntiAffinity podAntiAffinity = 3; } +// AppArmorProfile defines a pod or container's AppArmor settings. +// +union +message AppArmorProfile { + // type indicates which kind of AppArmor profile will be applied. + // Valid options are: + // Localhost - a profile pre-loaded on the node. + // RuntimeDefault - the container runtime's default profile. + // Unconfined - no AppArmor enforcement. + // +unionDiscriminator + optional string type = 1; + + // localhostProfile indicates a profile loaded on the node that should be used. + // The profile must be preconfigured on the node to work. + // Must match the loaded name of the profile. + // Must be set if and only if type is "Localhost". + // +optional + optional string localhostProfile = 2; +} + // AttachedVolume describes a volume attached to a node message AttachedVolume { // Name of the attached volume @@ -93,6 +112,7 @@ message AvoidPods { // Bounded-sized list of signatures of pods that should avoid this node, sorted // in timestamp order from oldest to newest. Size of the slice is unspecified. // +optional + // +listType=atomic repeated PreferAvoidPodsEntry preferAvoidPods = 1; } @@ -269,10 +289,12 @@ message CSIVolumeSource { message Capabilities { // Added capabilities // +optional + // +listType=atomic repeated string add = 1; // Removed capabilities // +optional + // +listType=atomic repeated string drop = 2; } @@ -281,6 +303,7 @@ message Capabilities { message CephFSPersistentVolumeSource { // monitors is Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +listType=atomic repeated string monitors = 1; // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / @@ -314,6 +337,7 @@ message CephFSPersistentVolumeSource { message CephFSVolumeSource { // monitors is Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +listType=atomic repeated string monitors = 1; // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / @@ -498,6 +522,8 @@ message ComponentStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated ComponentCondition conditions = 2; } @@ -628,6 +654,7 @@ message ConfigMapProjection { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic repeated KeyToPath items = 2; // optional specify whether the ConfigMap or its keys must be defined @@ -652,6 +679,7 @@ message ConfigMapVolumeSource { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic repeated KeyToPath items = 2; // defaultMode is optional: mode bits used to set permissions on created files by default. @@ -692,6 +720,7 @@ message Container { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic repeated string command = 3; // Arguments to the entrypoint. @@ -703,6 +732,7 @@ message Container { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic repeated string args = 4; // Container's working directory. @@ -734,6 +764,7 @@ message Container { // Values defined by an Env with a duplicate key will take precedence. // Cannot be updated. // +optional + // +listType=atomic repeated EnvFromSource envFrom = 19; // List of environment variables to set in the container. @@ -741,6 +772,8 @@ message Container { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated EnvVar env = 7; // Compute Resources required by this container. @@ -779,11 +812,15 @@ message Container { // +optional // +patchMergeKey=mountPath // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath repeated VolumeMount volumeMounts = 9; // volumeDevices is the list of block devices to be used by the container. // +patchMergeKey=devicePath // +patchStrategy=merge + // +listType=map + // +listMapKey=devicePath // +optional repeated VolumeDevice volumeDevices = 21; @@ -877,6 +914,7 @@ message ContainerImage { // Names by which this image is known. // e.g. ["kubernetes.example/hyperkube:v1.0.7", "cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7"] // +optional + // +listType=atomic repeated string names = 1; // The size of the image in bytes. @@ -1062,6 +1100,15 @@ message ContainerStatus { // +featureGate=InPlacePodVerticalScaling // +optional optional ResourceRequirements resources = 11; + + // Status of volume mounts. + // +optional + // +patchMergeKey=mountPath + // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath + // +featureGate=RecursiveReadOnlyMounts + repeated VolumeMountStatus volumeMounts = 12; } // DaemonEndpoint contains information about a single Daemon endpoint. @@ -1076,6 +1123,7 @@ message DaemonEndpoint { message DownwardAPIProjection { // Items is a list of DownwardAPIVolume file // +optional + // +listType=atomic repeated DownwardAPIVolumeFile items = 1; } @@ -1084,7 +1132,7 @@ message DownwardAPIVolumeFile { // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' optional string path = 1; - // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + // Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. // +optional optional ObjectFieldSelector fieldRef = 2; @@ -1108,6 +1156,7 @@ message DownwardAPIVolumeFile { message DownwardAPIVolumeSource { // Items is a list of downward API volume file // +optional + // +listType=atomic repeated DownwardAPIVolumeFile items = 1; // Optional: mode bits to use on created files by default. Must be a @@ -1218,16 +1267,19 @@ message EndpointSubset { // IP addresses which offer the related ports that are marked as ready. These endpoints // should be considered safe for load balancers and clients to utilize. // +optional + // +listType=atomic repeated EndpointAddress addresses = 1; // IP addresses which offer the related ports but are not currently marked as ready // because they have not yet finished starting, have recently failed a readiness check, // or have recently failed a liveness check. // +optional + // +listType=atomic repeated EndpointAddress notReadyAddresses = 2; // Port numbers available on the related IP addresses. // +optional + // +listType=atomic repeated EndpointPort ports = 3; } @@ -1258,6 +1310,7 @@ message Endpoints { // NotReadyAddresses in the same subset. // Sets of addresses and ports that comprise a service. // +optional + // +listType=atomic repeated EndpointSubset subsets = 2; } @@ -1377,6 +1430,7 @@ message EphemeralContainerCommon { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic repeated string command = 3; // Arguments to the entrypoint. @@ -1388,6 +1442,7 @@ message EphemeralContainerCommon { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic repeated string args = 4; // Container's working directory. @@ -1413,6 +1468,7 @@ message EphemeralContainerCommon { // Values defined by an Env with a duplicate key will take precedence. // Cannot be updated. // +optional + // +listType=atomic repeated EnvFromSource envFrom = 19; // List of environment variables to set in the container. @@ -1420,6 +1476,8 @@ message EphemeralContainerCommon { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated EnvVar env = 7; // Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources @@ -1446,11 +1504,15 @@ message EphemeralContainerCommon { // +optional // +patchMergeKey=mountPath // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath repeated VolumeMount volumeMounts = 9; // volumeDevices is the list of block devices to be used by the container. // +patchMergeKey=devicePath // +patchStrategy=merge + // +listType=map + // +listMapKey=devicePath // +optional repeated VolumeDevice volumeDevices = 21; @@ -1661,6 +1723,7 @@ message ExecAction { // a shell, you need to explicitly call out to that shell. // Exit status of 0 is treated as live/healthy and non-zero is unhealthy. // +optional + // +listType=atomic repeated string command = 1; } @@ -1670,6 +1733,7 @@ message ExecAction { message FCVolumeSource { // targetWWNs is Optional: FC target worldwide names (WWNs) // +optional + // +listType=atomic repeated string targetWWNs = 1; // lun is Optional: FC target lun number @@ -1691,6 +1755,7 @@ message FCVolumeSource { // wwids Optional: FC volume world wide identifiers (wwids) // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. // +optional + // +listType=atomic repeated string wwids = 5; } @@ -1903,6 +1968,7 @@ message HTTPGetAction { // Custom headers to set in the request. HTTP allows repeated headers. // +optional + // +listType=atomic repeated HTTPHeader httpHeaders = 5; } @@ -1920,9 +1986,11 @@ message HTTPHeader { // pod's hosts file. message HostAlias { // IP address of the host file entry. + // +required optional string ip = 1; // Hostnames for the above IP address. + // +listType=atomic repeated string hostnames = 2; } @@ -1982,6 +2050,7 @@ message ISCSIPersistentVolumeSource { // portals is the iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional + // +listType=atomic repeated string portals = 7; // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication @@ -2038,6 +2107,7 @@ message ISCSIVolumeSource { // portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional + // +listType=atomic repeated string portals = 7; // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication @@ -2181,6 +2251,7 @@ message LimitRangeList { // LimitRangeSpec defines a min/max usage limit for resources that match on kind. message LimitRangeSpec { // Limits is the list of LimitRangeItem objects that are enforced. + // +listType=atomic repeated LimitRangeItem limits = 1; } @@ -2229,6 +2300,7 @@ message LoadBalancerStatus { // Ingress is a list containing ingress points for the load-balancer. // Traffic intended for the service should be sent to these ingress points. // +optional + // +listType=atomic repeated LoadBalancerIngress ingress = 1; } @@ -2237,9 +2309,15 @@ message LoadBalancerStatus { // +structType=atomic message LocalObjectReference { // Name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + // This field is effectively required, but due to backwards compatibility is + // allowed to be empty. Instances of this type with an empty value here are + // almost certainly wrong. // TODO: Add other useful fields. apiVersion, kind, uid? + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // +optional + // +default="" + // +kubebuilder:default="" + // TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. optional string name = 1; } @@ -2347,6 +2425,7 @@ message NamespaceSpec { // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ // +optional + // +listType=atomic repeated string finalizers = 1; } @@ -2361,6 +2440,8 @@ message NamespaceStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated NamespaceCondition conditions = 2; } @@ -2414,6 +2495,7 @@ message NodeAffinity { // "weight" to the sum if the node matches the corresponding matchExpressions; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic repeated PreferredSchedulingTerm preferredDuringSchedulingIgnoredDuringExecution = 2; } @@ -2524,11 +2606,24 @@ message NodeProxyOptions { optional string path = 1; } -// NodeResources is an object for conveying resource information about a node. -// see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details. -message NodeResources { - // Capacity represents the available resources of a node - map capacity = 1; +// NodeRuntimeHandler is a set of runtime handler information. +message NodeRuntimeHandler { + // Runtime handler name. + // Empty for the default runtime handler. + // +optional + optional string name = 1; + + // Supported features. + // +optional + optional NodeRuntimeHandlerFeatures features = 2; +} + +// NodeRuntimeHandlerFeatures is a set of runtime features. +message NodeRuntimeHandlerFeatures { + // RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts. + // +featureGate=RecursiveReadOnlyMounts + // +optional + optional bool recursiveReadOnlyMounts = 1; } // A node selector represents the union of the results of one or more label queries @@ -2537,6 +2632,7 @@ message NodeResources { // +structType=atomic message NodeSelector { // Required. A list of node selector terms. The terms are ORed. + // +listType=atomic repeated NodeSelectorTerm nodeSelectorTerms = 1; } @@ -2556,6 +2652,7 @@ message NodeSelectorRequirement { // array must have a single element, which will be interpreted as an integer. // This array is replaced during a strategic merge patch. // +optional + // +listType=atomic repeated string values = 3; } @@ -2566,10 +2663,12 @@ message NodeSelectorRequirement { message NodeSelectorTerm { // A list of node selector requirements by node's labels. // +optional + // +listType=atomic repeated NodeSelectorRequirement matchExpressions = 1; // A list of node selector requirements by node's fields. // +optional + // +listType=atomic repeated NodeSelectorRequirement matchFields = 2; } @@ -2584,6 +2683,7 @@ message NodeSpec { // each of IPv4 and IPv6. // +optional // +patchStrategy=merge + // +listType=set repeated string podCIDRs = 7; // ID of the node assigned by the cloud provider in the format: :// @@ -2597,6 +2697,7 @@ message NodeSpec { // If specified, the node's taints. // +optional + // +listType=atomic repeated Taint taints = 5; // Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed. @@ -2632,6 +2733,8 @@ message NodeStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated NodeCondition conditions = 4; // List of addresses reachable to the node. @@ -2647,6 +2750,8 @@ message NodeStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated NodeAddress addresses = 5; // Endpoints of daemons running on the Node. @@ -2660,19 +2765,28 @@ message NodeStatus { // List of container images on this node // +optional + // +listType=atomic repeated ContainerImage images = 8; // List of attachable volumes in use (mounted) by the node. // +optional + // +listType=atomic repeated string volumesInUse = 9; // List of volumes that are attached to the node. // +optional + // +listType=atomic repeated AttachedVolume volumesAttached = 10; // Status of the config assigned to the node via the dynamic Kubelet config feature. // +optional optional NodeConfigStatus config = 11; + + // The available runtime handlers. + // +featureGate=RecursiveReadOnlyMounts + // +optional + // +listType=atomic + repeated NodeRuntimeHandler runtimeHandlers = 12; } // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. @@ -2840,7 +2954,7 @@ message PersistentVolumeClaimCondition { optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; // reason is a unique, this should be a short, machine understandable string that gives the reason - // for condition's last transition. If it reports "ResizeStarted" that means the underlying + // for condition's last transition. If it reports "Resizing" that means the underlying // persistent volume is being resized. // +optional optional string reason = 5; @@ -2868,6 +2982,7 @@ message PersistentVolumeClaimSpec { // accessModes contains the desired access modes the volume should have. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional + // +listType=atomic repeated string accessModes = 1; // selector is a label query over volumes to consider for binding. @@ -2943,7 +3058,7 @@ message PersistentVolumeClaimSpec { // If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be // set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource // exists. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass + // More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ // (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. // +featureGate=VolumeAttributesClass // +optional @@ -2959,6 +3074,7 @@ message PersistentVolumeClaimStatus { // accessModes contains the actual access modes the volume backing the PVC has. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional + // +listType=atomic repeated string accessModes = 2; // capacity represents the actual resources of the underlying volume. @@ -2966,10 +3082,12 @@ message PersistentVolumeClaimStatus { map capacity = 3; // conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - // resized then the Condition will be set to 'ResizeStarted'. + // resized then the Condition will be set to 'Resizing'. // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated PersistentVolumeClaimCondition conditions = 4; // allocatedResources tracks the resources allocated to a PVC including its capacity. @@ -3217,6 +3335,7 @@ message PersistentVolumeSpec { // accessModes contains all ways the volume can be mounted. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes // +optional + // +listType=atomic repeated string accessModes = 3; // claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. @@ -3244,6 +3363,7 @@ message PersistentVolumeSpec { // simply fail if one is invalid. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options // +optional + // +listType=atomic repeated string mountOptions = 7; // volumeMode defines if a volume is intended to be used with a formatted filesystem @@ -3335,6 +3455,7 @@ message PodAffinity { // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. // +optional + // +listType=atomic repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1; // The scheduler will prefer to schedule pods to nodes that satisfy @@ -3347,6 +3468,7 @@ message PodAffinity { // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2; } @@ -3367,6 +3489,7 @@ message PodAffinityTerm { // and the ones selected by namespaceSelector. // null or empty namespaces list and null namespaceSelector means "this pod's namespace". // +optional + // +listType=atomic repeated string namespaces = 2; // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching @@ -3386,12 +3509,12 @@ message PodAffinityTerm { // MatchLabelKeys is a set of pod label keys to select which pods will // be taken into consideration. The keys are used to lookup values from the - // incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` + // incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` // to select the group of existing pods which pods will be taken into consideration // for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming // pod labels will be ignored. The default value is empty. - // The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. - // Also, MatchLabelKeys cannot be set when LabelSelector isn't set. + // The same key is forbidden to exist in both matchLabelKeys and labelSelector. + // Also, matchLabelKeys cannot be set when labelSelector isn't set. // This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. // +listType=atomic // +optional @@ -3399,12 +3522,12 @@ message PodAffinityTerm { // MismatchLabelKeys is a set of pod label keys to select which pods will // be taken into consideration. The keys are used to lookup values from the - // incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` + // incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` // to select the group of existing pods which pods will be taken into consideration // for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming // pod labels will be ignored. The default value is empty. - // The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. - // Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. + // The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + // Also, mismatchLabelKeys cannot be set when labelSelector isn't set. // This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. // +listType=atomic // +optional @@ -3421,6 +3544,7 @@ message PodAntiAffinity { // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. // +optional + // +listType=atomic repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1; // The scheduler will prefer to schedule pods to nodes that satisfy @@ -3433,6 +3557,7 @@ message PodAntiAffinity { // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2; } @@ -3504,12 +3629,14 @@ message PodDNSConfig { // This will be appended to the base nameservers generated from DNSPolicy. // Duplicated nameservers will be removed. // +optional + // +listType=atomic repeated string nameservers = 1; // A list of DNS search domains for host-name lookup. // This will be appended to the base search paths generated from DNSPolicy. // Duplicated search paths will be removed. // +optional + // +listType=atomic repeated string searches = 2; // A list of DNS resolver options. @@ -3517,6 +3644,7 @@ message PodDNSConfig { // Duplicated entries will be removed. Resolution options given in Options // will override those that appear in the base DNSPolicy. // +optional + // +listType=atomic repeated PodDNSConfigOption options = 3; } @@ -3558,6 +3686,7 @@ message PodExecOptions { optional string container = 5; // Command is the remote command to execute. argv array. Not executed within a shell. + // +listType=atomic repeated string command = 6; } @@ -3652,6 +3781,7 @@ message PodPortForwardOptions { // List of ports to forward // Required when using WebSockets // +optional + // +listType=atomic repeated int32 ports = 1; } @@ -3760,6 +3890,7 @@ message PodSecurityContext { // even if they are not included in this list. // Note that this field cannot be set when spec.os.name is windows. // +optional + // +listType=atomic repeated int64 supplementalGroups = 4; // A special supplemental group that applies to all containers in a pod. @@ -3779,6 +3910,7 @@ message PodSecurityContext { // sysctls (by the container runtime) might fail to launch. // Note that this field cannot be set when spec.os.name is windows. // +optional + // +listType=atomic repeated Sysctl sysctls = 7; // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume @@ -3795,6 +3927,11 @@ message PodSecurityContext { // Note that this field cannot be set when spec.os.name is windows. // +optional optional SeccompProfile seccompProfile = 10; + + // appArmorProfile is the AppArmor options to use by the containers in this pod. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + optional AppArmorProfile appArmorProfile = 11; } // Describes the class of pods that should avoid this node. @@ -3812,6 +3949,8 @@ message PodSpec { // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys + // +listType=map + // +listMapKey=name repeated Volume volumes = 1; // List of initialization containers belonging to the pod. @@ -3829,6 +3968,8 @@ message PodSpec { // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated Container initContainers = 20; // List of containers belonging to the pod. @@ -3837,6 +3978,8 @@ message PodSpec { // Cannot be updated. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated Container containers = 2; // List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing @@ -3846,6 +3989,8 @@ message PodSpec { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated EphemeralContainer ephemeralContainers = 34; // Restart policy for all containers within the pod. @@ -3893,7 +4038,7 @@ message PodSpec { // +optional optional string serviceAccountName = 8; - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. + // DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. // Deprecated: Use serviceAccountName instead. // +k8s:conversion-gen=false // +optional @@ -3948,6 +4093,8 @@ message PodSpec { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated LocalObjectReference imagePullSecrets = 15; // Specifies the hostname of the Pod @@ -3971,13 +4118,16 @@ message PodSpec { // If specified, the pod's tolerations. // +optional + // +listType=atomic repeated Toleration tolerations = 22; // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts - // file if specified. This is only valid for non-hostNetwork pods. + // file if specified. // +optional // +patchMergeKey=ip // +patchStrategy=merge + // +listType=map + // +listMapKey=ip repeated HostAlias hostAliases = 23; // If specified, indicates the pod's priority. "system-node-critical" and @@ -4008,6 +4158,7 @@ message PodSpec { // all conditions specified in the readiness gates have status equal to "True" // More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates // +optional + // +listType=atomic repeated PodReadinessGate readinessGates = 28; // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used @@ -4069,6 +4220,7 @@ message PodSpec { // - spec.hostPID // - spec.hostIPC // - spec.hostUsers + // - spec.securityContext.appArmorProfile // - spec.securityContext.seLinuxOptions // - spec.securityContext.seccompProfile // - spec.securityContext.fsGroup @@ -4078,6 +4230,7 @@ message PodSpec { // - spec.securityContext.runAsUser // - spec.securityContext.runAsGroup // - spec.securityContext.supplementalGroups + // - spec.containers[*].securityContext.appArmorProfile // - spec.containers[*].securityContext.seLinuxOptions // - spec.containers[*].securityContext.seccompProfile // - spec.containers[*].securityContext.capabilities @@ -4109,13 +4262,10 @@ message PodSpec { // // SchedulingGates can only be set at pod creation time, and be removed only afterwards. // - // This is a beta feature enabled by the PodSchedulingReadiness feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=PodSchedulingReadiness // +optional repeated PodSchedulingGate schedulingGates = 38; @@ -4168,6 +4318,8 @@ message PodStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated PodCondition conditions = 2; // A human readable message indicating details about why the pod is in this condition. @@ -4216,6 +4368,8 @@ message PodStatus { // +optional // +patchStrategy=merge // +patchMergeKey=ip + // +listType=map + // +listMapKey=ip repeated PodIP podIPs = 12; // RFC 3339 date and time at which the object was acknowledged by the Kubelet. @@ -4227,11 +4381,13 @@ message PodStatus { // init container will have ready = true, the most recently started container will have // startTime set. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status + // +listType=atomic repeated ContainerStatus initContainerStatuses = 10; // The list has one entry per container in the manifest. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status // +optional + // +listType=atomic repeated ContainerStatus containerStatuses = 8; // The Quality of Service (QOS) classification assigned to the pod based on resource requirements @@ -4242,6 +4398,7 @@ message PodStatus { // Status for any ephemeral containers that have run in this pod. // +optional + // +listType=atomic repeated ContainerStatus ephemeralContainerStatuses = 13; // Status of resources resize desired for pod's containers. @@ -4459,6 +4616,7 @@ message ProbeHandler { message ProjectedVolumeSource { // sources is the list of volume projections // +optional + // +listType=atomic repeated VolumeProjection sources = 1; // defaultMode are the mode bits used to set permissions on created files by default. @@ -4508,6 +4666,7 @@ message QuobyteVolumeSource { message RBDPersistentVolumeSource { // monitors is a collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +listType=atomic repeated string monitors = 1; // image is the rados image name. @@ -4559,6 +4718,7 @@ message RBDPersistentVolumeSource { message RBDVolumeSource { // monitors is a collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +listType=atomic repeated string monitors = 1; // image is the rados image name. @@ -4733,6 +4893,8 @@ message ReplicationControllerStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated ReplicationControllerCondition conditions = 6; } @@ -4799,6 +4961,7 @@ message ResourceQuotaSpec { // A collection of filters that must match each object tracked by a quota. // If not specified, the quota matches all objects. // +optional + // +listType=atomic repeated string scopes = 2; // scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota @@ -4966,6 +5129,7 @@ message ScaleIOVolumeSource { message ScopeSelector { // A list of scope selector requirements by scope of the resources. // +optional + // +listType=atomic repeated ScopedResourceSelectorRequirement matchExpressions = 1; } @@ -4984,6 +5148,7 @@ message ScopedResourceSelectorRequirement { // the values array must be empty. // This array is replaced during a strategic merge patch. // +optional + // +listType=atomic repeated string values = 3; } @@ -5101,6 +5266,7 @@ message SecretProjection { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic repeated KeyToPath items = 2; // optional field specify whether the Secret or its key must be defined @@ -5140,6 +5306,7 @@ message SecretVolumeSource { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic repeated KeyToPath items = 2; // defaultMode is Optional: mode bits used to set permissions on created files by default. @@ -5244,6 +5411,12 @@ message SecurityContext { // Note that this field cannot be set when spec.os.name is windows. // +optional optional SeccompProfile seccompProfile = 11; + + // appArmorProfile is the AppArmor options to use by this container. If set, this profile + // overrides the pod's appArmorProfile. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + optional AppArmorProfile appArmorProfile = 12; } // SerializedReference is a reference to serialized object. @@ -5293,6 +5466,8 @@ message ServiceAccount { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated ObjectReference secrets = 2; // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images @@ -5300,6 +5475,7 @@ message ServiceAccount { // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod // +optional + // +listType=atomic repeated LocalObjectReference imagePullSecrets = 3; // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. @@ -5520,6 +5696,7 @@ message ServiceSpec { // at a node with this IP. A common example is external load-balancers // that are not part of the Kubernetes system. // +optional + // +listType=atomic repeated string externalIPs = 5; // Supports "ClientIP" and "None". Used to maintain session affinity. @@ -5545,6 +5722,7 @@ message ServiceSpec { // cloud-provider does not support the feature." // More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/ // +optional + // +listType=atomic repeated string loadBalancerSourceRanges = 9; // externalName is the external reference that discovery mechanisms will @@ -5660,6 +5838,17 @@ message ServiceSpec { // (possibly modified by topology and other features). // +optional optional string internalTrafficPolicy = 22; + + // TrafficDistribution offers a way to express preferences for how traffic is + // distributed to Service endpoints. Implementations can use this field as a + // hint, but are not required to guarantee strict adherence. If the field is + // not set, the implementation will apply its default routing strategy. If set + // to "PreferClose", implementations should prioritize endpoints that are + // topologically close (e.g., same zone). + // This is an alpha field and requires enabling ServiceTrafficDistribution feature. + // +featureGate=ServiceTrafficDistribution + // +optional + optional string trafficDistribution = 23; } // ServiceStatus represents the current status of a service. @@ -5838,6 +6027,7 @@ message TopologySelectorLabelRequirement { // An array of string values. One value must match the label to be selected. // Each entry in Values is ORed. + // +listType=atomic repeated string values = 2; } @@ -5850,6 +6040,7 @@ message TopologySelectorLabelRequirement { message TopologySelectorTerm { // A list of topology selector requirements by labels. // +optional + // +listType=atomic repeated TopologySelectorLabelRequirement matchLabelExpressions = 1; } @@ -5940,8 +6131,6 @@ message TopologySpreadConstraint { // In this situation, new pod with the same labelSelector cannot be scheduled, // because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, // it will violate MaxSkew. - // - // This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default). // +optional optional int32 minDomains = 5; @@ -6051,6 +6240,27 @@ message VolumeMount { // +optional optional bool readOnly = 2; + // RecursiveReadOnly specifies whether read-only mounts should be handled + // recursively. + // + // If ReadOnly is false, this field has no meaning and must be unspecified. + // + // If ReadOnly is true, and this field is set to Disabled, the mount is not made + // recursively read-only. If this field is set to IfPossible, the mount is made + // recursively read-only, if it is supported by the container runtime. If this + // field is set to Enabled, the mount is made recursively read-only if it is + // supported by the container runtime, otherwise the pod will not be started and + // an error will be generated to indicate the reason. + // + // If this field is set to IfPossible or Enabled, MountPropagation must be set to + // None (or be unspecified, which defaults to None). + // + // If this field is not specified, it is treated as an equivalent of Disabled. + // + // +featureGate=RecursiveReadOnlyMounts + // +optional + optional string recursiveReadOnly = 7; + // Path within the container at which the volume should be mounted. Must // not contain ':'. optional string mountPath = 3; @@ -6064,6 +6274,8 @@ message VolumeMount { // to container and the other way around. // When not set, MountPropagationNone is used. // This field is beta in 1.10. + // When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + // (which defaults to None). // +optional optional string mountPropagation = 5; @@ -6075,6 +6287,26 @@ message VolumeMount { optional string subPathExpr = 6; } +// VolumeMountStatus shows status of volume mounts. +message VolumeMountStatus { + // Name corresponds to the name of the original VolumeMount. + optional string name = 1; + + // MountPath corresponds to the original VolumeMount. + optional string mountPath = 2; + + // ReadOnly corresponds to the original VolumeMount. + // +optional + optional bool readOnly = 3; + + // RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). + // An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, + // depending on the mount result. + // +featureGate=RecursiveReadOnlyMounts + // +optional + optional string recursiveReadOnly = 4; +} + // VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. message VolumeNodeAffinity { // required specifies hard node constraints that must be met. diff --git a/pkg/k8s/vendor/k8s.io/api/core/v1/types.go b/pkg/k8s/vendor/k8s.io/api/core/v1/types.go index 61ba21bcad4..328df9a7b7d 100644 --- a/pkg/k8s/vendor/k8s.io/api/core/v1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/core/v1/types.go @@ -331,6 +331,7 @@ type PersistentVolumeSpec struct { // accessModes contains all ways the volume can be mounted. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes // +optional + // +listType=atomic AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,3,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` // claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. // Expected to be non-nil when bound. @@ -354,6 +355,7 @@ type PersistentVolumeSpec struct { // simply fail if one is invalid. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options // +optional + // +listType=atomic MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,7,opt,name=mountOptions"` // volumeMode defines if a volume is intended to be used with a formatted filesystem // or to remain in raw block state. Value of Filesystem is implied when not included in spec. @@ -486,6 +488,7 @@ type PersistentVolumeClaimSpec struct { // accessModes contains the desired access modes the volume should have. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional + // +listType=atomic AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` // selector is a label query over volumes to consider for binding. // +optional @@ -553,7 +556,7 @@ type PersistentVolumeClaimSpec struct { // If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be // set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource // exists. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass + // More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ // (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. // +featureGate=VolumeAttributesClass // +optional @@ -660,7 +663,7 @@ type PersistentVolumeClaimCondition struct { // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` // reason is a unique, this should be a short, machine understandable string that gives the reason - // for condition's last transition. If it reports "ResizeStarted" that means the underlying + // for condition's last transition. If it reports "Resizing" that means the underlying // persistent volume is being resized. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` @@ -677,15 +680,18 @@ type PersistentVolumeClaimStatus struct { // accessModes contains the actual access modes the volume backing the PVC has. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional + // +listType=atomic AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,2,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` // capacity represents the actual resources of the underlying volume. // +optional Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,3,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` // conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - // resized then the Condition will be set to 'ResizeStarted'. + // resized then the Condition will be set to 'Resizing'. // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []PersistentVolumeClaimCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` // allocatedResources tracks the resources allocated to a PVC including its capacity. // Key names follow standard Kubernetes label syntax. Valid values are either: @@ -921,6 +927,7 @@ type GlusterfsPersistentVolumeSource struct { type RBDVolumeSource struct { // monitors is a collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +listType=atomic CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` // image is the rados image name. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it @@ -965,6 +972,7 @@ type RBDVolumeSource struct { type RBDPersistentVolumeSource struct { // monitors is a collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +listType=atomic CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` // image is the rados image name. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it @@ -1059,6 +1067,7 @@ type CinderPersistentVolumeSource struct { type CephFSVolumeSource struct { // monitors is Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +listType=atomic Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / // +optional @@ -1099,6 +1108,7 @@ type SecretReference struct { type CephFSPersistentVolumeSource struct { // monitors is Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +listType=atomic Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / // +optional @@ -1341,6 +1351,7 @@ type SecretVolumeSource struct { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // defaultMode is Optional: mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. @@ -1376,6 +1387,7 @@ type SecretProjection struct { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // optional field specify whether the Secret or its key must be defined // +optional @@ -1429,6 +1441,7 @@ type ISCSIVolumeSource struct { // portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional + // +listType=atomic Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"` // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication // +optional @@ -1475,6 +1488,7 @@ type ISCSIPersistentVolumeSource struct { // portals is the iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional + // +listType=atomic Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"` // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication // +optional @@ -1498,6 +1512,7 @@ type ISCSIPersistentVolumeSource struct { type FCVolumeSource struct { // targetWWNs is Optional: FC target worldwide names (WWNs) // +optional + // +listType=atomic TargetWWNs []string `json:"targetWWNs,omitempty" protobuf:"bytes,1,rep,name=targetWWNs"` // lun is Optional: FC target lun number // +optional @@ -1515,6 +1530,7 @@ type FCVolumeSource struct { // wwids Optional: FC volume world wide identifiers (wwids) // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. // +optional + // +listType=atomic WWIDs []string `json:"wwids,omitempty" protobuf:"bytes,5,rep,name=wwids"` } @@ -1771,6 +1787,7 @@ type ConfigMapVolumeSource struct { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // defaultMode is optional: mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. @@ -1807,6 +1824,7 @@ type ConfigMapProjection struct { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // optional specify whether the ConfigMap or its keys must be defined // +optional @@ -1875,6 +1893,7 @@ type ClusterTrustBundleProjection struct { type ProjectedVolumeSource struct { // sources is the list of volume projections // +optional + // +listType=atomic Sources []VolumeProjection `json:"sources" protobuf:"bytes,1,rep,name=sources"` // defaultMode are the mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. @@ -2137,6 +2156,26 @@ type VolumeMount struct { // Defaults to false. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` + // RecursiveReadOnly specifies whether read-only mounts should be handled + // recursively. + // + // If ReadOnly is false, this field has no meaning and must be unspecified. + // + // If ReadOnly is true, and this field is set to Disabled, the mount is not made + // recursively read-only. If this field is set to IfPossible, the mount is made + // recursively read-only, if it is supported by the container runtime. If this + // field is set to Enabled, the mount is made recursively read-only if it is + // supported by the container runtime, otherwise the pod will not be started and + // an error will be generated to indicate the reason. + // + // If this field is set to IfPossible or Enabled, MountPropagation must be set to + // None (or be unspecified, which defaults to None). + // + // If this field is not specified, it is treated as an equivalent of Disabled. + // + // +featureGate=RecursiveReadOnlyMounts + // +optional + RecursiveReadOnly *RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty" protobuf:"bytes,7,opt,name=recursiveReadOnly,casttype=RecursiveReadOnlyMode"` // Path within the container at which the volume should be mounted. Must // not contain ':'. MountPath string `json:"mountPath" protobuf:"bytes,3,opt,name=mountPath"` @@ -2148,6 +2187,8 @@ type VolumeMount struct { // to container and the other way around. // When not set, MountPropagationNone is used. // This field is beta in 1.10. + // When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + // (which defaults to None). // +optional MountPropagation *MountPropagationMode `json:"mountPropagation,omitempty" protobuf:"bytes,5,opt,name=mountPropagation,casttype=MountPropagationMode"` // Expanded path within the volume from which the container's volume should be mounted. @@ -2184,6 +2225,18 @@ const ( MountPropagationBidirectional MountPropagationMode = "Bidirectional" ) +// RecursiveReadOnlyMode describes recursive-readonly mode. +type RecursiveReadOnlyMode string + +const ( + // RecursiveReadOnlyDisabled disables recursive-readonly mode. + RecursiveReadOnlyDisabled RecursiveReadOnlyMode = "Disabled" + // RecursiveReadOnlyIfPossible enables recursive-readonly mode if possible. + RecursiveReadOnlyIfPossible RecursiveReadOnlyMode = "IfPossible" + // RecursiveReadOnlyEnabled enables recursive-readonly mode, or raise an error. + RecursiveReadOnlyEnabled RecursiveReadOnlyMode = "Enabled" +) + // volumeDevice describes a mapping of a raw block device within a container. type VolumeDevice struct { // name must match the name of a persistentVolumeClaim in the pod @@ -2347,6 +2400,7 @@ type HTTPGetAction struct { Scheme URIScheme `json:"scheme,omitempty" protobuf:"bytes,4,opt,name=scheme,casttype=URIScheme"` // Custom headers to set in the request. HTTP allows repeated headers. // +optional + // +listType=atomic HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty" protobuf:"bytes,5,rep,name=httpHeaders"` } @@ -2393,6 +2447,7 @@ type ExecAction struct { // a shell, you need to explicitly call out to that shell. // Exit status of 0 is treated as live/healthy and non-zero is unhealthy. // +optional + // +listType=atomic Command []string `json:"command,omitempty" protobuf:"bytes,1,rep,name=command"` } @@ -2514,9 +2569,11 @@ type Capability string type Capabilities struct { // Added capabilities // +optional + // +listType=atomic Add []Capability `json:"add,omitempty" protobuf:"bytes,1,rep,name=add,casttype=Capability"` // Removed capabilities // +optional + // +listType=atomic Drop []Capability `json:"drop,omitempty" protobuf:"bytes,2,rep,name=drop,casttype=Capability"` } @@ -2602,6 +2659,7 @@ type Container struct { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` // Arguments to the entrypoint. // The container image's CMD is used if this is not provided. @@ -2612,6 +2670,7 @@ type Container struct { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"` // Container's working directory. // If not specified, the container runtime's default will be used, which @@ -2640,12 +2699,15 @@ type Container struct { // Values defined by an Env with a duplicate key will take precedence. // Cannot be updated. // +optional + // +listType=atomic EnvFrom []EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"` // List of environment variables to set in the container. // Cannot be updated. // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` // Compute Resources required by this container. // Cannot be updated. @@ -2680,10 +2742,14 @@ type Container struct { // +optional // +patchMergeKey=mountPath // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` // volumeDevices is the list of block devices to be used by the container. // +patchMergeKey=devicePath // +patchStrategy=merge + // +listType=map + // +listMapKey=devicePath // +optional VolumeDevices []VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath" protobuf:"bytes,21,rep,name=volumeDevices"` // Periodic probe of container liveness. @@ -2956,6 +3022,14 @@ type ContainerStatus struct { // +featureGate=InPlacePodVerticalScaling // +optional Resources *ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,11,opt,name=resources"` + // Status of volume mounts. + // +optional + // +patchMergeKey=mountPath + // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath + // +featureGate=RecursiveReadOnlyMounts + VolumeMounts []VolumeMountStatus `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,12,rep,name=volumeMounts"` } // PodPhase is a label for the condition of a pod at the current time. @@ -3065,6 +3139,23 @@ const ( PodResizeStatusInfeasible PodResizeStatus = "Infeasible" ) +// VolumeMountStatus shows status of volume mounts. +type VolumeMountStatus struct { + // Name corresponds to the name of the original VolumeMount. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // MountPath corresponds to the original VolumeMount. + MountPath string `json:"mountPath" protobuf:"bytes,2,opt,name=mountPath"` + // ReadOnly corresponds to the original VolumeMount. + // +optional + ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` + // RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). + // An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, + // depending on the mount result. + // +featureGate=RecursiveReadOnlyMounts + // +optional + RecursiveReadOnly *RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty" protobuf:"bytes,4,opt,name=recursiveReadOnly,casttype=RecursiveReadOnlyMode"` +} + // RestartPolicy describes how the container should be restarted. // Only one of the following restart policies may be specified. // If none of the following policies is specified, the default one @@ -3123,6 +3214,7 @@ const ( // +structType=atomic type NodeSelector struct { // Required. A list of node selector terms. The terms are ORed. + // +listType=atomic NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms" protobuf:"bytes,1,rep,name=nodeSelectorTerms"` } @@ -3133,9 +3225,11 @@ type NodeSelector struct { type NodeSelectorTerm struct { // A list of node selector requirements by node's labels. // +optional + // +listType=atomic MatchExpressions []NodeSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,1,rep,name=matchExpressions"` // A list of node selector requirements by node's fields. // +optional + // +listType=atomic MatchFields []NodeSelectorRequirement `json:"matchFields,omitempty" protobuf:"bytes,2,rep,name=matchFields"` } @@ -3153,6 +3247,7 @@ type NodeSelectorRequirement struct { // array must have a single element, which will be interpreted as an integer. // This array is replaced during a strategic merge patch. // +optional + // +listType=atomic Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` } @@ -3181,6 +3276,7 @@ type TopologySelectorTerm struct { // A list of topology selector requirements by labels. // +optional + // +listType=atomic MatchLabelExpressions []TopologySelectorLabelRequirement `json:"matchLabelExpressions,omitempty" protobuf:"bytes,1,rep,name=matchLabelExpressions"` } @@ -3191,6 +3287,7 @@ type TopologySelectorLabelRequirement struct { Key string `json:"key" protobuf:"bytes,1,opt,name=key"` // An array of string values. One value must match the label to be selected. // Each entry in Values is ORed. + // +listType=atomic Values []string `json:"values" protobuf:"bytes,2,rep,name=values"` } @@ -3228,6 +3325,7 @@ type PodAffinity struct { // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. // +optional + // +listType=atomic RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"` // The scheduler will prefer to schedule pods to nodes that satisfy // the affinity expressions specified by this field, but it may choose @@ -3239,6 +3337,7 @@ type PodAffinity struct { // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` } @@ -3263,6 +3362,7 @@ type PodAntiAffinity struct { // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. // +optional + // +listType=atomic RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"` // The scheduler will prefer to schedule pods to nodes that satisfy // the anti-affinity expressions specified by this field, but it may choose @@ -3274,6 +3374,7 @@ type PodAntiAffinity struct { // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` } @@ -3302,6 +3403,7 @@ type PodAffinityTerm struct { // and the ones selected by namespaceSelector. // null or empty namespaces list and null namespaceSelector means "this pod's namespace". // +optional + // +listType=atomic Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"` // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching // the labelSelector in the specified namespaces, where co-located is defined as running on a node @@ -3318,24 +3420,24 @@ type PodAffinityTerm struct { NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,4,opt,name=namespaceSelector"` // MatchLabelKeys is a set of pod label keys to select which pods will // be taken into consideration. The keys are used to lookup values from the - // incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` + // incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` // to select the group of existing pods which pods will be taken into consideration // for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming // pod labels will be ignored. The default value is empty. - // The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. - // Also, MatchLabelKeys cannot be set when LabelSelector isn't set. + // The same key is forbidden to exist in both matchLabelKeys and labelSelector. + // Also, matchLabelKeys cannot be set when labelSelector isn't set. // This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. // +listType=atomic // +optional MatchLabelKeys []string `json:"matchLabelKeys,omitempty" protobuf:"bytes,5,opt,name=matchLabelKeys"` // MismatchLabelKeys is a set of pod label keys to select which pods will // be taken into consideration. The keys are used to lookup values from the - // incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` + // incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` // to select the group of existing pods which pods will be taken into consideration // for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming // pod labels will be ignored. The default value is empty. - // The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. - // Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. + // The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + // Also, mismatchLabelKeys cannot be set when labelSelector isn't set. // This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. // +listType=atomic // +optional @@ -3370,6 +3472,7 @@ type NodeAffinity struct { // "weight" to the sum if the node matches the corresponding matchExpressions; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` } @@ -3475,6 +3578,8 @@ type PodSpec struct { // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys + // +listType=map + // +listMapKey=name Volumes []Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"` // List of initialization containers belonging to the pod. // Init containers are executed in order prior to containers being started. If any @@ -3491,6 +3596,8 @@ type PodSpec struct { // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name InitContainers []Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,20,rep,name=initContainers"` // List of containers belonging to the pod. // Containers cannot currently be added or removed. @@ -3498,6 +3605,8 @@ type PodSpec struct { // Cannot be updated. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Containers []Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"` // List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing // pod to perform user-initiated actions such as debugging. This list cannot be specified when @@ -3506,6 +3615,8 @@ type PodSpec struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name EphemeralContainers []EphemeralContainer `json:"ephemeralContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,34,rep,name=ephemeralContainers"` // Restart policy for all containers within the pod. // One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. @@ -3547,7 +3658,7 @@ type PodSpec struct { // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ // +optional ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,8,opt,name=serviceAccountName"` - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. + // DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. // Deprecated: Use serviceAccountName instead. // +k8s:conversion-gen=false // +optional @@ -3595,6 +3706,8 @@ type PodSpec struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"` // Specifies the hostname of the Pod // If not specified, the pod's hostname will be set to a system-defined value. @@ -3613,12 +3726,15 @@ type PodSpec struct { SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,19,opt,name=schedulerName"` // If specified, the pod's tolerations. // +optional + // +listType=atomic Tolerations []Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"` // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts - // file if specified. This is only valid for non-hostNetwork pods. + // file if specified. // +optional // +patchMergeKey=ip // +patchStrategy=merge + // +listType=map + // +listMapKey=ip HostAliases []HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"ip" protobuf:"bytes,23,rep,name=hostAliases"` // If specified, indicates the pod's priority. "system-node-critical" and // "system-cluster-critical" are two special keywords which indicate the @@ -3645,6 +3761,7 @@ type PodSpec struct { // all conditions specified in the readiness gates have status equal to "True" // More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates // +optional + // +listType=atomic ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" protobuf:"bytes,28,opt,name=readinessGates"` // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used // to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. @@ -3699,6 +3816,7 @@ type PodSpec struct { // - spec.hostPID // - spec.hostIPC // - spec.hostUsers + // - spec.securityContext.appArmorProfile // - spec.securityContext.seLinuxOptions // - spec.securityContext.seccompProfile // - spec.securityContext.fsGroup @@ -3708,6 +3826,7 @@ type PodSpec struct { // - spec.securityContext.runAsUser // - spec.securityContext.runAsGroup // - spec.securityContext.supplementalGroups + // - spec.containers[*].securityContext.appArmorProfile // - spec.containers[*].securityContext.seLinuxOptions // - spec.containers[*].securityContext.seccompProfile // - spec.containers[*].securityContext.capabilities @@ -3739,13 +3858,10 @@ type PodSpec struct { // // SchedulingGates can only be set at pod creation time, and be removed only afterwards. // - // This is a beta feature enabled by the PodSchedulingReadiness feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=PodSchedulingReadiness // +optional SchedulingGates []PodSchedulingGate `json:"schedulingGates,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,38,opt,name=schedulingGates"` // ResourceClaims defines which ResourceClaims must be allocated @@ -3952,8 +4068,6 @@ type TopologySpreadConstraint struct { // In this situation, new pod with the same labelSelector cannot be scheduled, // because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, // it will violate MaxSkew. - // - // This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default). // +optional MinDomains *int32 `json:"minDomains,omitempty" protobuf:"varint,5,opt,name=minDomains"` // NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector @@ -3999,8 +4113,10 @@ const ( // pod's hosts file. type HostAlias struct { // IP address of the host file entry. - IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"` + // +required + IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"` // Hostnames for the above IP address. + // +listType=atomic Hostnames []string `json:"hostnames,omitempty" protobuf:"bytes,2,rep,name=hostnames"` } @@ -4071,6 +4187,7 @@ type PodSecurityContext struct { // even if they are not included in this list. // Note that this field cannot be set when spec.os.name is windows. // +optional + // +listType=atomic SupplementalGroups []int64 `json:"supplementalGroups,omitempty" protobuf:"varint,4,rep,name=supplementalGroups"` // A special supplemental group that applies to all containers in a pod. // Some volume types allow the Kubelet to change the ownership of that volume @@ -4088,6 +4205,7 @@ type PodSecurityContext struct { // sysctls (by the container runtime) might fail to launch. // Note that this field cannot be set when spec.os.name is windows. // +optional + // +listType=atomic Sysctls []Sysctl `json:"sysctls,omitempty" protobuf:"bytes,7,rep,name=sysctls"` // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume // before being exposed inside Pod. This field will only apply to @@ -4102,6 +4220,10 @@ type PodSecurityContext struct { // Note that this field cannot be set when spec.os.name is windows. // +optional SeccompProfile *SeccompProfile `json:"seccompProfile,omitempty" protobuf:"bytes,10,opt,name=seccompProfile"` + // appArmorProfile is the AppArmor options to use by the containers in this pod. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + AppArmorProfile *AppArmorProfile `json:"appArmorProfile,omitempty" protobuf:"bytes,11,opt,name=appArmorProfile"` } // SeccompProfile defines a pod/container's seccomp profile settings. @@ -4138,6 +4260,38 @@ const ( SeccompProfileTypeLocalhost SeccompProfileType = "Localhost" ) +// AppArmorProfile defines a pod or container's AppArmor settings. +// +union +type AppArmorProfile struct { + // type indicates which kind of AppArmor profile will be applied. + // Valid options are: + // Localhost - a profile pre-loaded on the node. + // RuntimeDefault - the container runtime's default profile. + // Unconfined - no AppArmor enforcement. + // +unionDiscriminator + Type AppArmorProfileType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=AppArmorProfileType"` + + // localhostProfile indicates a profile loaded on the node that should be used. + // The profile must be preconfigured on the node to work. + // Must match the loaded name of the profile. + // Must be set if and only if type is "Localhost". + // +optional + LocalhostProfile *string `json:"localhostProfile,omitempty" protobuf:"bytes,2,opt,name=localhostProfile"` +} + +// +enum +type AppArmorProfileType string + +const ( + // AppArmorProfileTypeUnconfined indicates that no AppArmor profile should be enforced. + AppArmorProfileTypeUnconfined AppArmorProfileType = "Unconfined" + // AppArmorProfileTypeRuntimeDefault indicates that the container runtime's default AppArmor + // profile should be used. + AppArmorProfileTypeRuntimeDefault AppArmorProfileType = "RuntimeDefault" + // AppArmorProfileTypeLocalhost indicates that a profile pre-loaded on the node should be used. + AppArmorProfileTypeLocalhost AppArmorProfileType = "Localhost" +) + // PodQOSClass defines the supported qos classes of Pods. // +enum type PodQOSClass string @@ -4158,17 +4312,20 @@ type PodDNSConfig struct { // This will be appended to the base nameservers generated from DNSPolicy. // Duplicated nameservers will be removed. // +optional + // +listType=atomic Nameservers []string `json:"nameservers,omitempty" protobuf:"bytes,1,rep,name=nameservers"` // A list of DNS search domains for host-name lookup. // This will be appended to the base search paths generated from DNSPolicy. // Duplicated search paths will be removed. // +optional + // +listType=atomic Searches []string `json:"searches,omitempty" protobuf:"bytes,2,rep,name=searches"` // A list of DNS resolver options. // This will be merged with the base options generated from DNSPolicy. // Duplicated entries will be removed. Resolution options given in Options // will override those that appear in the base DNSPolicy. // +optional + // +listType=atomic Options []PodDNSConfigOption `json:"options,omitempty" protobuf:"bytes,3,rep,name=options"` } @@ -4212,6 +4369,7 @@ type EphemeralContainerCommon struct { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` // Arguments to the entrypoint. // The image's CMD is used if this is not provided. @@ -4222,6 +4380,7 @@ type EphemeralContainerCommon struct { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"` // Container's working directory. // If not specified, the container runtime's default will be used, which @@ -4244,12 +4403,15 @@ type EphemeralContainerCommon struct { // Values defined by an Env with a duplicate key will take precedence. // Cannot be updated. // +optional + // +listType=atomic EnvFrom []EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"` // List of environment variables to set in the container. // Cannot be updated. // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` // Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources // already allocated to the pod. @@ -4272,10 +4434,14 @@ type EphemeralContainerCommon struct { // +optional // +patchMergeKey=mountPath // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` // volumeDevices is the list of block devices to be used by the container. // +patchMergeKey=devicePath // +patchStrategy=merge + // +listType=map + // +listMapKey=devicePath // +optional VolumeDevices []VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath" protobuf:"bytes,21,rep,name=volumeDevices"` // Probes are not allowed for ephemeral containers. @@ -4401,6 +4567,8 @@ type PodStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []PodCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` // A human readable message indicating details about why the pod is in this condition. // +optional @@ -4446,6 +4614,8 @@ type PodStatus struct { // +optional // +patchStrategy=merge // +patchMergeKey=ip + // +listType=map + // +listMapKey=ip PodIPs []PodIP `json:"podIPs,omitempty" protobuf:"bytes,12,rep,name=podIPs" patchStrategy:"merge" patchMergeKey:"ip"` // RFC 3339 date and time at which the object was acknowledged by the Kubelet. @@ -4457,11 +4627,13 @@ type PodStatus struct { // init container will have ready = true, the most recently started container will have // startTime set. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status + // +listType=atomic InitContainerStatuses []ContainerStatus `json:"initContainerStatuses,omitempty" protobuf:"bytes,10,rep,name=initContainerStatuses"` // The list has one entry per container in the manifest. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status // +optional + // +listType=atomic ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty" protobuf:"bytes,8,rep,name=containerStatuses"` // The Quality of Service (QOS) classification assigned to the pod based on resource requirements // See PodQOSClass type for available QOS classes @@ -4470,6 +4642,7 @@ type PodStatus struct { QOSClass PodQOSClass `json:"qosClass,omitempty" protobuf:"bytes,9,rep,name=qosClass"` // Status for any ephemeral containers that have run in this pod. // +optional + // +listType=atomic EphemeralContainerStatuses []ContainerStatus `json:"ephemeralContainerStatuses,omitempty" protobuf:"bytes,13,rep,name=ephemeralContainerStatuses"` // Status of resources resize desired for pod's containers. @@ -4658,6 +4831,8 @@ type ReplicationControllerStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []ReplicationControllerCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } @@ -4829,6 +5004,18 @@ const ( ServiceExternalTrafficPolicyTypeCluster = ServiceExternalTrafficPolicyCluster ) +// These are valid values for the TrafficDistribution field of a Service. +const ( + // Indicates a preference for routing traffic to endpoints that are + // topologically proximate to the client. The interpretation of "topologically + // proximate" may vary across implementations and could encompass endpoints + // within the same node, rack, zone, or even region. Setting this value gives + // implementations permission to make different tradeoffs, e.g. optimizing for + // proximity rather than equal distribution of load. Users should not set this + // value if such tradeoffs are not acceptable. + ServiceTrafficDistributionPreferClose = "PreferClose" +) + // These are the valid conditions of a service. const ( // LoadBalancerPortsError represents the condition of the requested ports @@ -4859,6 +5046,7 @@ type LoadBalancerStatus struct { // Ingress is a list containing ingress points for the load-balancer. // Traffic intended for the service should be sent to these ingress points. // +optional + // +listType=atomic Ingress []LoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` } @@ -5024,6 +5212,7 @@ type ServiceSpec struct { // at a node with this IP. A common example is external load-balancers // that are not part of the Kubernetes system. // +optional + // +listType=atomic ExternalIPs []string `json:"externalIPs,omitempty" protobuf:"bytes,5,rep,name=externalIPs"` // Supports "ClientIP" and "None". Used to maintain session affinity. @@ -5049,6 +5238,7 @@ type ServiceSpec struct { // cloud-provider does not support the feature." // More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/ // +optional + // +listType=atomic LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"` // externalName is the external reference that discovery mechanisms will @@ -5170,6 +5360,17 @@ type ServiceSpec struct { // (possibly modified by topology and other features). // +optional InternalTrafficPolicy *ServiceInternalTrafficPolicy `json:"internalTrafficPolicy,omitempty" protobuf:"bytes,22,opt,name=internalTrafficPolicy"` + + // TrafficDistribution offers a way to express preferences for how traffic is + // distributed to Service endpoints. Implementations can use this field as a + // hint, but are not required to guarantee strict adherence. If the field is + // not set, the implementation will apply its default routing strategy. If set + // to "PreferClose", implementations should prioritize endpoints that are + // topologically close (e.g., same zone). + // This is an alpha field and requires enabling ServiceTrafficDistribution feature. + // +featureGate=ServiceTrafficDistribution + // +optional + TrafficDistribution *string `json:"trafficDistribution,omitempty" protobuf:"bytes,23,opt,name=trafficDistribution"` } // ServicePort contains information on service's port. @@ -5303,6 +5504,8 @@ type ServiceAccount struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Secrets []ObjectReference `json:"secrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=secrets"` // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images @@ -5310,6 +5513,7 @@ type ServiceAccount struct { // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod // +optional + // +listType=atomic ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" protobuf:"bytes,3,rep,name=imagePullSecrets"` // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. @@ -5364,6 +5568,7 @@ type Endpoints struct { // NotReadyAddresses in the same subset. // Sets of addresses and ports that comprise a service. // +optional + // +listType=atomic Subsets []EndpointSubset `json:"subsets,omitempty" protobuf:"bytes,2,rep,name=subsets"` } @@ -5384,14 +5589,17 @@ type EndpointSubset struct { // IP addresses which offer the related ports that are marked as ready. These endpoints // should be considered safe for load balancers and clients to utilize. // +optional + // +listType=atomic Addresses []EndpointAddress `json:"addresses,omitempty" protobuf:"bytes,1,rep,name=addresses"` // IP addresses which offer the related ports but are not currently marked as ready // because they have not yet finished starting, have recently failed a readiness check, // or have recently failed a liveness check. // +optional + // +listType=atomic NotReadyAddresses []EndpointAddress `json:"notReadyAddresses,omitempty" protobuf:"bytes,2,rep,name=notReadyAddresses"` // Port numbers available on the related IP addresses. // +optional + // +listType=atomic Ports []EndpointPort `json:"ports,omitempty" protobuf:"bytes,3,rep,name=ports"` } @@ -5476,6 +5684,7 @@ type NodeSpec struct { // each of IPv4 and IPv6. // +optional // +patchStrategy=merge + // +listType=set PodCIDRs []string `json:"podCIDRs,omitempty" protobuf:"bytes,7,opt,name=podCIDRs" patchStrategy:"merge"` // ID of the node assigned by the cloud provider in the format: :// @@ -5487,6 +5696,7 @@ type NodeSpec struct { Unschedulable bool `json:"unschedulable,omitempty" protobuf:"varint,4,opt,name=unschedulable"` // If specified, the node's taints. // +optional + // +listType=atomic Taints []Taint `json:"taints,omitempty" protobuf:"bytes,5,opt,name=taints"` // Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed. @@ -5562,6 +5772,26 @@ type NodeDaemonEndpoints struct { KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty" protobuf:"bytes,1,opt,name=kubeletEndpoint"` } +// NodeRuntimeHandlerFeatures is a set of runtime features. +type NodeRuntimeHandlerFeatures struct { + // RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts. + // +featureGate=RecursiveReadOnlyMounts + // +optional + RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty" protobuf:"varint,1,opt,name=recursiveReadOnlyMounts"` + // Reserved: UserNamespaces *bool (varint 2, for consistency with CRI API) +} + +// NodeRuntimeHandler is a set of runtime handler information. +type NodeRuntimeHandler struct { + // Runtime handler name. + // Empty for the default runtime handler. + // +optional + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // Supported features. + // +optional + Features *NodeRuntimeHandlerFeatures `json:"features,omitempty" protobuf:"bytes,2,opt,name=features"` +} + // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. type NodeSystemInfo struct { // MachineID reported by the node. For unique machine identification @@ -5657,6 +5887,8 @@ type NodeStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []NodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` // List of addresses reachable to the node. // Queried from cloud provider, if available. @@ -5671,6 +5903,8 @@ type NodeStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Addresses []NodeAddress `json:"addresses,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,5,rep,name=addresses"` // Endpoints of daemons running on the Node. // +optional @@ -5681,16 +5915,24 @@ type NodeStatus struct { NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty" protobuf:"bytes,7,opt,name=nodeInfo"` // List of container images on this node // +optional + // +listType=atomic Images []ContainerImage `json:"images,omitempty" protobuf:"bytes,8,rep,name=images"` // List of attachable volumes in use (mounted) by the node. // +optional + // +listType=atomic VolumesInUse []UniqueVolumeName `json:"volumesInUse,omitempty" protobuf:"bytes,9,rep,name=volumesInUse"` // List of volumes that are attached to the node. // +optional + // +listType=atomic VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty" protobuf:"bytes,10,rep,name=volumesAttached"` // Status of the config assigned to the node via the dynamic Kubelet config feature. // +optional Config *NodeConfigStatus `json:"config,omitempty" protobuf:"bytes,11,opt,name=config"` + // The available runtime handlers. + // +featureGate=RecursiveReadOnlyMounts + // +optional + // +listType=atomic + RuntimeHandlers []NodeRuntimeHandler `json:"runtimeHandlers,omitempty" protobuf:"bytes,12,rep,name=runtimeHandlers"` } type UniqueVolumeName string @@ -5711,6 +5953,7 @@ type AvoidPods struct { // Bounded-sized list of signatures of pods that should avoid this node, sorted // in timestamp order from oldest to newest. Size of the slice is unspecified. // +optional + // +listType=atomic PreferAvoidPods []PreferAvoidPodsEntry `json:"preferAvoidPods,omitempty" protobuf:"bytes,1,rep,name=preferAvoidPods"` } @@ -5742,6 +5985,7 @@ type ContainerImage struct { // Names by which this image is known. // e.g. ["kubernetes.example/hyperkube:v1.0.7", "cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7"] // +optional + // +listType=atomic Names []string `json:"names" protobuf:"bytes,1,rep,name=names"` // The size of the image in bytes. // +optional @@ -5764,8 +6008,7 @@ const ( type NodeConditionType string // These are valid but not exhaustive conditions of node. A cloud provider may set a condition not listed here. -// The built-in set of conditions are: -// NodeReachable, NodeLive, NodeReady, NodeSchedulable, NodeRunnable. +// Relevant events contain "NodeReady", "NodeNotReady", "NodeSchedulable", and "NodeNotSchedulable". const ( // NodeReady means kubelet is healthy and ready to accept pods. NodeReady NodeConditionType = "Ready" @@ -5867,7 +6110,6 @@ const ( // Volume size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024) ResourceStorage ResourceName = "storage" // Local ephemeral storage, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) - // The resource name for ResourceEphemeralStorage is alpha and it can change across releases. ResourceEphemeralStorage ResourceName = "ephemeral-storage" ) @@ -5937,6 +6179,7 @@ type NamespaceSpec struct { // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ // +optional + // +listType=atomic Finalizers []FinalizerName `json:"finalizers,omitempty" protobuf:"bytes,1,rep,name=finalizers,casttype=FinalizerName"` } @@ -5951,6 +6194,8 @@ type NamespaceStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []NamespaceCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` } @@ -6188,6 +6433,7 @@ type PodExecOptions struct { Container string `json:"container,omitempty" protobuf:"bytes,5,opt,name=container"` // Command is the remote command to execute. argv array. Not executed within a shell. + // +listType=atomic Command []string `json:"command" protobuf:"bytes,6,rep,name=command"` } @@ -6206,6 +6452,7 @@ type PodPortForwardOptions struct { // List of ports to forward // Required when using WebSockets // +optional + // +listType=atomic Ports []int32 `json:"ports,omitempty" protobuf:"varint,1,rep,name=ports"` } @@ -6309,9 +6556,15 @@ type ObjectReference struct { // +structType=atomic type LocalObjectReference struct { // Name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + // This field is effectively required, but due to backwards compatibility is + // allowed to be empty. Instances of this type with an empty value here are + // almost certainly wrong. // TODO: Add other useful fields. apiVersion, kind, uid? + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // +optional + // +default="" + // +kubebuilder:default="" + // TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` } @@ -6499,6 +6752,7 @@ type LimitRangeItem struct { // LimitRangeSpec defines a min/max usage limit for resources that match on kind. type LimitRangeSpec struct { // Limits is the list of LimitRangeItem objects that are enforced. + // +listType=atomic Limits []LimitRangeItem `json:"limits" protobuf:"bytes,1,rep,name=limits"` } @@ -6607,6 +6861,7 @@ type ResourceQuotaSpec struct { // A collection of filters that must match each object tracked by a quota. // If not specified, the quota matches all objects. // +optional + // +listType=atomic Scopes []ResourceQuotaScope `json:"scopes,omitempty" protobuf:"bytes,2,rep,name=scopes,casttype=ResourceQuotaScope"` // scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota // but expressed using ScopeSelectorOperator in combination with possible values. @@ -6621,6 +6876,7 @@ type ResourceQuotaSpec struct { type ScopeSelector struct { // A list of scope selector requirements by scope of the resources. // +optional + // +listType=atomic MatchExpressions []ScopedResourceSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,1,rep,name=matchExpressions"` } @@ -6637,6 +6893,7 @@ type ScopedResourceSelectorRequirement struct { // the values array must be empty. // This array is replaced during a strategic merge patch. // +optional + // +listType=atomic Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` } @@ -6936,6 +7193,8 @@ type ComponentStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []ComponentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` } @@ -6959,6 +7218,7 @@ type ComponentStatusList struct { type DownwardAPIVolumeSource struct { // Items is a list of downward API volume file // +optional + // +listType=atomic Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"` // Optional: mode bits to use on created files by default. Must be a // Optional: mode bits used to set permissions on created files by default. @@ -6980,7 +7240,7 @@ const ( type DownwardAPIVolumeFile struct { // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' Path string `json:"path" protobuf:"bytes,1,opt,name=path"` - // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + // Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. // +optional FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,2,opt,name=fieldRef"` // Selects a resource of the container: only resources limits and requests @@ -7003,6 +7263,7 @@ type DownwardAPIVolumeFile struct { type DownwardAPIProjection struct { // Items is a list of DownwardAPIVolume file // +optional + // +listType=atomic Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"` } @@ -7083,6 +7344,11 @@ type SecurityContext struct { // Note that this field cannot be set when spec.os.name is windows. // +optional SeccompProfile *SeccompProfile `json:"seccompProfile,omitempty" protobuf:"bytes,11,opt,name=seccompProfile"` + // appArmorProfile is the AppArmor options to use by this container. If set, this profile + // overrides the pod's appArmorProfile. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + AppArmorProfile *AppArmorProfile `json:"appArmorProfile,omitempty" protobuf:"bytes,12,opt,name=appArmorProfile"` } // +enum @@ -7178,13 +7444,6 @@ type Sysctl struct { Value string `json:"value" protobuf:"bytes,2,opt,name=value"` } -// NodeResources is an object for conveying resource information about a node. -// see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details. -type NodeResources struct { - // Capacity represents the available resources of a node - Capacity ResourceList `protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` -} - const ( // Enable stdin for remote command execution ExecStdinParam = "input" diff --git a/pkg/k8s/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/pkg/k8s/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index fd6f7dc61b9..c54f2a2fe50 100644 --- a/pkg/k8s/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/pkg/k8s/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -50,6 +50,16 @@ func (Affinity) SwaggerDoc() map[string]string { return map_Affinity } +var map_AppArmorProfile = map[string]string{ + "": "AppArmorProfile defines a pod or container's AppArmor settings.", + "type": "type indicates which kind of AppArmor profile will be applied. Valid options are:\n Localhost - a profile pre-loaded on the node.\n RuntimeDefault - the container runtime's default profile.\n Unconfined - no AppArmor enforcement.", + "localhostProfile": "localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is \"Localhost\".", +} + +func (AppArmorProfile) SwaggerDoc() map[string]string { + return map_AppArmorProfile +} + var map_AttachedVolume = map[string]string{ "": "AttachedVolume describes a volume attached to a node", "name": "Name of the attached volume", @@ -471,6 +481,7 @@ var map_ContainerStatus = map[string]string{ "started": "Started indicates whether the container has finished its postStart lifecycle hook and passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. In both cases, startup probes will run again. Is always true when no startupProbe is defined and container is running and has passed the postStart lifecycle hook. The null value must be treated the same as false.", "allocatedResources": "AllocatedResources represents the compute resources allocated for this container by the node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission and after successfully admitting desired pod resize.", "resources": "Resources represents the compute resource requests and limits that have been successfully enacted on the running container after it has been started or has been successfully resized.", + "volumeMounts": "Status of volume mounts.", } func (ContainerStatus) SwaggerDoc() map[string]string { @@ -498,7 +509,7 @@ func (DownwardAPIProjection) SwaggerDoc() map[string]string { var map_DownwardAPIVolumeFile = map[string]string{ "": "DownwardAPIVolumeFile represents information to create the file containing the pod field", "path": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", - "fieldRef": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", + "fieldRef": "Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported.", "resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", "mode": "Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", } @@ -1021,7 +1032,7 @@ func (LoadBalancerStatus) SwaggerDoc() map[string]string { var map_LocalObjectReference = map[string]string{ "": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", - "name": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "name": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", } func (LocalObjectReference) SwaggerDoc() map[string]string { @@ -1203,13 +1214,23 @@ func (NodeProxyOptions) SwaggerDoc() map[string]string { return map_NodeProxyOptions } -var map_NodeResources = map[string]string{ - "": "NodeResources is an object for conveying resource information about a node. see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details.", - "Capacity": "Capacity represents the available resources of a node", +var map_NodeRuntimeHandler = map[string]string{ + "": "NodeRuntimeHandler is a set of runtime handler information.", + "name": "Runtime handler name. Empty for the default runtime handler.", + "features": "Supported features.", +} + +func (NodeRuntimeHandler) SwaggerDoc() map[string]string { + return map_NodeRuntimeHandler } -func (NodeResources) SwaggerDoc() map[string]string { - return map_NodeResources +var map_NodeRuntimeHandlerFeatures = map[string]string{ + "": "NodeRuntimeHandlerFeatures is a set of runtime features.", + "recursiveReadOnlyMounts": "RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.", +} + +func (NodeRuntimeHandlerFeatures) SwaggerDoc() map[string]string { + return map_NodeRuntimeHandlerFeatures } var map_NodeSelector = map[string]string{ @@ -1270,6 +1291,7 @@ var map_NodeStatus = map[string]string{ "volumesInUse": "List of attachable volumes in use (mounted) by the node.", "volumesAttached": "List of volumes that are attached to the node.", "config": "Status of the config assigned to the node via the dynamic Kubelet config feature.", + "runtimeHandlers": "The available runtime handlers.", } func (NodeStatus) SwaggerDoc() map[string]string { @@ -1345,7 +1367,7 @@ var map_PersistentVolumeClaimCondition = map[string]string{ "": "PersistentVolumeClaimCondition contains details about state of pvc", "lastProbeTime": "lastProbeTime is the time we probed the condition.", "lastTransitionTime": "lastTransitionTime is the time the condition transitioned from one status to another.", - "reason": "reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.", + "reason": "reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"Resizing\" that means the underlying persistent volume is being resized.", "message": "message is the human-readable message indicating details about last transition.", } @@ -1373,7 +1395,7 @@ var map_PersistentVolumeClaimSpec = map[string]string{ "volumeMode": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", "dataSource": "dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.", "dataSourceRef": "dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While dataSource ignores disallowed values (dropping them), dataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n* While dataSource only allows local objects, dataSourceRef allows objects\n in any namespaces.\n(Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.", - "volumeAttributesClassName": "volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled.", + "volumeAttributesClassName": "volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled.", } func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string { @@ -1385,7 +1407,7 @@ var map_PersistentVolumeClaimStatus = map[string]string{ "phase": "phase represents the current phase of PersistentVolumeClaim.", "accessModes": "accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", "capacity": "capacity represents the actual resources of the underlying volume.", - "conditions": "conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.", + "conditions": "conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'Resizing'.", "allocatedResources": "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", "allocatedResourceStatuses": "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", "currentVolumeAttributesClassName": "currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim This is an alpha field and requires enabling VolumeAttributesClass feature.", @@ -1522,8 +1544,8 @@ var map_PodAffinityTerm = map[string]string{ "namespaces": "namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\".", "topologyKey": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", "namespaceSelector": "A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces.", - "matchLabelKeys": "MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.", - "mismatchLabelKeys": "MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.", + "matchLabelKeys": "MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.", + "mismatchLabelKeys": "MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.", } func (PodAffinityTerm) SwaggerDoc() map[string]string { @@ -1714,6 +1736,7 @@ var map_PodSecurityContext = map[string]string{ "sysctls": "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.", "fsGroupChangePolicy": "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used. Note that this field cannot be set when spec.os.name is windows.", "seccompProfile": "The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", + "appArmorProfile": "appArmorProfile is the AppArmor options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", } func (PodSecurityContext) SwaggerDoc() map[string]string { @@ -1741,7 +1764,7 @@ var map_PodSpec = map[string]string{ "dnsPolicy": "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", "nodeSelector": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", "serviceAccountName": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", - "serviceAccount": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", + "serviceAccount": "DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", "automountServiceAccountToken": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", "nodeName": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.", "hostNetwork": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", @@ -1755,7 +1778,7 @@ var map_PodSpec = map[string]string{ "affinity": "If specified, the pod's scheduling constraints", "schedulerName": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", "tolerations": "If specified, the pod's tolerations.", - "hostAliases": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.", + "hostAliases": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified.", "priorityClassName": "If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.", "priority": "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.", "dnsConfig": "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", @@ -1766,9 +1789,9 @@ var map_PodSpec = map[string]string{ "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md", "topologySpreadConstraints": "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.", "setHostnameAsFQDN": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", - "os": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", + "os": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.appArmorProfile - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.appArmorProfile - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", "hostUsers": "Use the host's user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature.", - "schedulingGates": "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod.\n\nSchedulingGates can only be set at pod creation time, and be removed only afterwards.\n\nThis is a beta feature enabled by the PodSchedulingReadiness feature gate.", + "schedulingGates": "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod.\n\nSchedulingGates can only be set at pod creation time, and be removed only afterwards.", "resourceClaims": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", } @@ -2283,6 +2306,7 @@ var map_SecurityContext = map[string]string{ "allowPrivilegeEscalation": "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.", "procMount": "procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.", "seccompProfile": "The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.", + "appArmorProfile": "appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows.", } func (SecurityContext) SwaggerDoc() map[string]string { @@ -2396,6 +2420,7 @@ var map_ServiceSpec = map[string]string{ "allocateLoadBalancerNodePorts": "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.", "loadBalancerClass": "loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.", "internalTrafficPolicy": "InternalTrafficPolicy describes how nodes distribute service traffic they receive on the ClusterIP. If set to \"Local\", the proxy will assume that pods only want to talk to endpoints of the service on the same node as the pod, dropping the traffic if there are no local endpoints. The default value, \"Cluster\", uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features).", + "trafficDistribution": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature.", } func (ServiceSpec) SwaggerDoc() map[string]string { @@ -2578,19 +2603,32 @@ func (VolumeDevice) SwaggerDoc() map[string]string { } var map_VolumeMount = map[string]string{ - "": "VolumeMount describes a mounting of a Volume within a container.", - "name": "This must match the Name of a Volume.", - "readOnly": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", - "mountPath": "Path within the container at which the volume should be mounted. Must not contain ':'.", - "subPath": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", - "mountPropagation": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.", - "subPathExpr": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.", + "": "VolumeMount describes a mounting of a Volume within a container.", + "name": "This must match the Name of a Volume.", + "readOnly": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", + "recursiveReadOnly": "RecursiveReadOnly specifies whether read-only mounts should be handled recursively.\n\nIf ReadOnly is false, this field has no meaning and must be unspecified.\n\nIf ReadOnly is true, and this field is set to Disabled, the mount is not made recursively read-only. If this field is set to IfPossible, the mount is made recursively read-only, if it is supported by the container runtime. If this field is set to Enabled, the mount is made recursively read-only if it is supported by the container runtime, otherwise the pod will not be started and an error will be generated to indicate the reason.\n\nIf this field is set to IfPossible or Enabled, MountPropagation must be set to None (or be unspecified, which defaults to None).\n\nIf this field is not specified, it is treated as an equivalent of Disabled.", + "mountPath": "Path within the container at which the volume should be mounted. Must not contain ':'.", + "subPath": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", + "mountPropagation": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified (which defaults to None).", + "subPathExpr": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.", } func (VolumeMount) SwaggerDoc() map[string]string { return map_VolumeMount } +var map_VolumeMountStatus = map[string]string{ + "": "VolumeMountStatus shows status of volume mounts.", + "name": "Name corresponds to the name of the original VolumeMount.", + "mountPath": "MountPath corresponds to the original VolumeMount.", + "readOnly": "ReadOnly corresponds to the original VolumeMount.", + "recursiveReadOnly": "RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, depending on the mount result.", +} + +func (VolumeMountStatus) SwaggerDoc() map[string]string { + return map_VolumeMountStatus +} + var map_VolumeNodeAffinity = map[string]string{ "": "VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.", "required": "required specifies hard node constraints that must be met.", diff --git a/pkg/k8s/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go b/pkg/k8s/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go index 45172e0e233..08e927848ec 100644 --- a/pkg/k8s/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go +++ b/pkg/k8s/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go @@ -74,6 +74,27 @@ func (in *Affinity) DeepCopy() *Affinity { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppArmorProfile) DeepCopyInto(out *AppArmorProfile) { + *out = *in + if in.LocalhostProfile != nil { + in, out := &in.LocalhostProfile, &out.LocalhostProfile + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppArmorProfile. +func (in *AppArmorProfile) DeepCopy() *AppArmorProfile { + if in == nil { + return nil + } + out := new(AppArmorProfile) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AttachedVolume) DeepCopyInto(out *AttachedVolume) { *out = *in @@ -1041,6 +1062,13 @@ func (in *ContainerStatus) DeepCopyInto(out *ContainerStatus) { *out = new(ResourceRequirements) (*in).DeepCopyInto(*out) } + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]VolumeMountStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -2726,24 +2754,43 @@ func (in *NodeProxyOptions) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeResources) DeepCopyInto(out *NodeResources) { +func (in *NodeRuntimeHandler) DeepCopyInto(out *NodeRuntimeHandler) { *out = *in - if in.Capacity != nil { - in, out := &in.Capacity, &out.Capacity - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } + if in.Features != nil { + in, out := &in.Features, &out.Features + *out = new(NodeRuntimeHandlerFeatures) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandler. +func (in *NodeRuntimeHandler) DeepCopy() *NodeRuntimeHandler { + if in == nil { + return nil + } + out := new(NodeRuntimeHandler) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeRuntimeHandlerFeatures) DeepCopyInto(out *NodeRuntimeHandlerFeatures) { + *out = *in + if in.RecursiveReadOnlyMounts != nil { + in, out := &in.RecursiveReadOnlyMounts, &out.RecursiveReadOnlyMounts + *out = new(bool) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResources. -func (in *NodeResources) DeepCopy() *NodeResources { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandlerFeatures. +func (in *NodeRuntimeHandlerFeatures) DeepCopy() *NodeRuntimeHandlerFeatures { if in == nil { return nil } - out := new(NodeResources) + out := new(NodeRuntimeHandlerFeatures) in.DeepCopyInto(out) return out } @@ -2908,6 +2955,13 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { *out = new(NodeConfigStatus) (*in).DeepCopyInto(*out) } + if in.RuntimeHandlers != nil { + in, out := &in.RuntimeHandlers, &out.RuntimeHandlers + *out = make([]NodeRuntimeHandler, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -4021,6 +4075,11 @@ func (in *PodSecurityContext) DeepCopyInto(out *PodSecurityContext) { *out = new(SeccompProfile) (*in).DeepCopyInto(*out) } + if in.AppArmorProfile != nil { + in, out := &in.AppArmorProfile, &out.AppArmorProfile + *out = new(AppArmorProfile) + (*in).DeepCopyInto(*out) + } return } @@ -5411,6 +5470,11 @@ func (in *SecurityContext) DeepCopyInto(out *SecurityContext) { *out = new(SeccompProfile) (*in).DeepCopyInto(*out) } + if in.AppArmorProfile != nil { + in, out := &in.AppArmorProfile, &out.AppArmorProfile + *out = new(AppArmorProfile) + (*in).DeepCopyInto(*out) + } return } @@ -5715,6 +5779,11 @@ func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { *out = new(ServiceInternalTrafficPolicy) **out = **in } + if in.TrafficDistribution != nil { + in, out := &in.TrafficDistribution, &out.TrafficDistribution + *out = new(string) + **out = **in + } return } @@ -6073,6 +6142,11 @@ func (in *VolumeDevice) DeepCopy() *VolumeDevice { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VolumeMount) DeepCopyInto(out *VolumeMount) { *out = *in + if in.RecursiveReadOnly != nil { + in, out := &in.RecursiveReadOnly, &out.RecursiveReadOnly + *out = new(RecursiveReadOnlyMode) + **out = **in + } if in.MountPropagation != nil { in, out := &in.MountPropagation, &out.MountPropagation *out = new(MountPropagationMode) @@ -6091,6 +6165,27 @@ func (in *VolumeMount) DeepCopy() *VolumeMount { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeMountStatus) DeepCopyInto(out *VolumeMountStatus) { + *out = *in + if in.RecursiveReadOnly != nil { + in, out := &in.RecursiveReadOnly, &out.RecursiveReadOnly + *out = new(RecursiveReadOnlyMode) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeMountStatus. +func (in *VolumeMountStatus) DeepCopy() *VolumeMountStatus { + if in == nil { + return nil + } + out := new(VolumeMountStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VolumeNodeAffinity) DeepCopyInto(out *VolumeNodeAffinity) { *out = *in diff --git a/pkg/k8s/vendor/k8s.io/api/discovery/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/discovery/v1/generated.pb.go index 79f2cc09d8d..5792481dc18 100644 --- a/pkg/k8s/vendor/k8s.io/api/discovery/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/discovery/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1/generated.proto +// source: k8s.io/api/discovery/v1/generated.proto package v1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Endpoint) Reset() { *m = Endpoint{} } func (*Endpoint) ProtoMessage() {} func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{0} + return fileDescriptor_2237b452324cf77e, []int{0} } func (m *Endpoint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_Endpoint proto.InternalMessageInfo func (m *EndpointConditions) Reset() { *m = EndpointConditions{} } func (*EndpointConditions) ProtoMessage() {} func (*EndpointConditions) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{1} + return fileDescriptor_2237b452324cf77e, []int{1} } func (m *EndpointConditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_EndpointConditions proto.InternalMessageInfo func (m *EndpointHints) Reset() { *m = EndpointHints{} } func (*EndpointHints) ProtoMessage() {} func (*EndpointHints) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{2} + return fileDescriptor_2237b452324cf77e, []int{2} } func (m *EndpointHints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_EndpointHints proto.InternalMessageInfo func (m *EndpointPort) Reset() { *m = EndpointPort{} } func (*EndpointPort) ProtoMessage() {} func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{3} + return fileDescriptor_2237b452324cf77e, []int{3} } func (m *EndpointPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_EndpointPort proto.InternalMessageInfo func (m *EndpointSlice) Reset() { *m = EndpointSlice{} } func (*EndpointSlice) ProtoMessage() {} func (*EndpointSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{4} + return fileDescriptor_2237b452324cf77e, []int{4} } func (m *EndpointSlice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_EndpointSlice proto.InternalMessageInfo func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} } func (*EndpointSliceList) ProtoMessage() {} func (*EndpointSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{5} + return fileDescriptor_2237b452324cf77e, []int{5} } func (m *EndpointSliceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +217,7 @@ var xxx_messageInfo_EndpointSliceList proto.InternalMessageInfo func (m *ForZone) Reset() { *m = ForZone{} } func (*ForZone) ProtoMessage() {} func (*ForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{6} + return fileDescriptor_2237b452324cf77e, []int{6} } func (m *ForZone) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -254,67 +254,66 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1/generated.proto", fileDescriptor_3a5d310fb1396ddf) -} - -var fileDescriptor_3a5d310fb1396ddf = []byte{ - // 893 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4d, 0x6f, 0xe3, 0x44, - 0x18, 0x8e, 0x9b, 0x86, 0xda, 0x93, 0x56, 0xec, 0x8e, 0x90, 0x1a, 0x05, 0x14, 0x87, 0xa0, 0x45, - 0x91, 0x2a, 0x6c, 0x5a, 0x21, 0xb4, 0x20, 0x21, 0x51, 0xb3, 0x65, 0x97, 0xaf, 0x52, 0xcd, 0xf6, - 0xb4, 0x42, 0x5a, 0x5c, 0xfb, 0xad, 0x63, 0xd2, 0xcc, 0x58, 0x33, 0x93, 0x48, 0xe1, 0xc4, 0x85, - 0x33, 0xfc, 0x22, 0x8e, 0xa8, 0xc7, 0xbd, 0xb1, 0x27, 0x8b, 0x9a, 0xbf, 0xc0, 0x69, 0x4f, 0x68, - 0xc6, 0x9f, 0x25, 0x8d, 0xb2, 0x37, 0xcf, 0x33, 0xcf, 0xf3, 0x7e, 0x3c, 0x33, 0xf3, 0x1a, 0x7d, - 0x3e, 0x7d, 0x28, 0x9c, 0x98, 0xb9, 0xd3, 0xf9, 0x05, 0x70, 0x0a, 0x12, 0x84, 0xbb, 0x00, 0x1a, - 0x32, 0xee, 0x16, 0x1b, 0x7e, 0x12, 0xbb, 0x61, 0x2c, 0x02, 0xb6, 0x00, 0xb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 0x30, 0xae, 0xb3, 0x81, 0xf1, 0x22, 0x1b, 0x18, 0x2f, 0xb3, - 0x81, 0xf1, 0x77, 0x36, 0x30, 0x7e, 0xff, 0x67, 0xd0, 0x7a, 0xb6, 0xbf, 0xe6, 0xa7, 0xfe, 0x5f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x2e, 0xd0, 0xcc, 0x2e, 0x07, 0x08, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/discovery/v1/generated.proto", fileDescriptor_2237b452324cf77e) +} + +var fileDescriptor_2237b452324cf77e = []byte{ + // 877 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4d, 0x6f, 0xdc, 0x44, + 0x18, 0x5e, 0x67, 0x63, 0x62, 0x8f, 0x13, 0xd1, 0x8e, 0x90, 0x62, 0x2d, 0xc8, 0x5e, 0x8c, 0x0a, + 0x2b, 0x45, 0x78, 0x49, 0x84, 0x50, 0x41, 0xe2, 0x10, 0xd3, 0xd0, 0xf2, 0x15, 0xa2, 0x69, 0x4e, + 0x15, 0x52, 0x71, 0xec, 0x37, 0x5e, 0x93, 0xd8, 0x63, 0x79, 0x26, 0x2b, 0x2d, 0x27, 0x2e, 0x9c, + 0xe1, 0x17, 0x71, 0x44, 0x39, 0xf6, 0x46, 0x4f, 0x16, 0x31, 0x7f, 0x81, 0x53, 0x4f, 0x68, 0xc6, + 0x9f, 0x61, 0xb3, 0xda, 0xde, 0x3c, 0xcf, 0x3c, 0xcf, 0xfb, 0xf1, 0xcc, 0xcc, 0x6b, 0xf4, 0xc1, + 0xc5, 0x43, 0xe6, 0xc6, 0x74, 0xea, 0x67, 0xf1, 0x34, 0x8c, 0x59, 0x40, 0xe7, 0x90, 0x2f, 0xa6, + 0xf3, 0xfd, 0x69, 0x04, 0x29, 0xe4, 0x3e, 0x87, 0xd0, 0xcd, 0x72, 0xca, 0x29, 0xde, 0xad, 0x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, 0x06, 0xcf, 0x76, 0x57, 0xfc, 0xd4, 0xff, + 0x0b, 0x00, 0x00, 0xff, 0xff, 0x76, 0x4b, 0x26, 0xe3, 0xee, 0x07, 0x00, 0x00, } func (m *Endpoint) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go index fcb9136e742..46935574bf6 100644 --- a/pkg/k8s/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1beta1/generated.proto +// source: k8s.io/api/discovery/v1beta1/generated.proto package v1beta1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Endpoint) Reset() { *m = Endpoint{} } func (*Endpoint) ProtoMessage() {} func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{0} + return fileDescriptor_6555bad15de200e0, []int{0} } func (m *Endpoint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_Endpoint proto.InternalMessageInfo func (m *EndpointConditions) Reset() { *m = EndpointConditions{} } func (*EndpointConditions) ProtoMessage() {} func (*EndpointConditions) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{1} + return fileDescriptor_6555bad15de200e0, []int{1} } func (m *EndpointConditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_EndpointConditions proto.InternalMessageInfo func (m *EndpointHints) Reset() { *m = EndpointHints{} } func (*EndpointHints) ProtoMessage() {} func (*EndpointHints) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{2} + return fileDescriptor_6555bad15de200e0, []int{2} } func (m *EndpointHints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_EndpointHints proto.InternalMessageInfo func (m *EndpointPort) Reset() { *m = EndpointPort{} } func (*EndpointPort) ProtoMessage() {} func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{3} + return fileDescriptor_6555bad15de200e0, []int{3} } func (m *EndpointPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_EndpointPort proto.InternalMessageInfo func (m *EndpointSlice) Reset() { *m = EndpointSlice{} } func (*EndpointSlice) ProtoMessage() {} func (*EndpointSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{4} + return fileDescriptor_6555bad15de200e0, []int{4} } func (m *EndpointSlice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_EndpointSlice proto.InternalMessageInfo func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} } func (*EndpointSliceList) ProtoMessage() {} func (*EndpointSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{5} + return fileDescriptor_6555bad15de200e0, []int{5} } func (m *EndpointSliceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +217,7 @@ var xxx_messageInfo_EndpointSliceList proto.InternalMessageInfo func (m *ForZone) Reset() { *m = ForZone{} } func (*ForZone) ProtoMessage() {} func (*ForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{6} + return fileDescriptor_6555bad15de200e0, []int{6} } func (m *ForZone) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -254,66 +254,65 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1beta1/generated.proto", fileDescriptor_ece80bbc872d519b) -} - -var fileDescriptor_ece80bbc872d519b = []byte{ - // 871 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0x8e, 0x9b, 0x86, 0xda, 0x93, 0x56, 0xec, 0x8e, 0x38, 0x44, 0xa5, 0xb2, 0x23, 0xa3, 0x45, - 0x11, 0x15, 0x36, 0xad, 0x56, 0x68, 0x05, 0xa7, 0x1a, 0x0a, 0x8b, 0xb4, 0xec, 0x56, 0xd3, 0x4a, - 0x48, 0x2b, 0x0e, 0x4c, 0xec, 0xa9, 0x63, 0xd2, 0xcc, 0x58, 0x33, 0x93, 0x48, 0xb9, 0xf1, 0x0f, - 0xe0, 0xb7, 0xf0, 0x17, 0x90, 0x50, 0x8f, 0x7b, 0xdc, 0x93, 0x45, 0xcd, 0xbf, 0xe8, 0x09, 0xcd, - 0x78, 0x6c, 0x27, 0x04, 0xba, 0xb9, 0x79, 0xbe, 0x79, 0xdf, 0xf7, 0xde, 0xfb, 0xde, 0xcc, 0x18, - 0x9c, 0x4f, 0x9f, 0x89, 0x20, 0x63, 0xe1, 0x74, 0x3e, 0x26, 0x9c, 0x12, 0x49, 0x44, 0xb8, 0x20, - 0x34, 0x61, 0x3c, 0x34, 0x1b, 0x38, 0xcf, 0xc2, 0x24, 0x13, 0x31, 0x5b, 0x10, 0xbe, 0x0c, 0x17, - 0x27, 0x63, 0x22, 0xf1, 0x49, 0x98, 0x12, 0x4a, 0x38, 0x96, 0x24, 0x09, 0x72, 0xce, 0x24, 0x83, - 0x47, 0x55, 0x74, 0x80, 0xf3, 0x2c, 0x68, 0xa2, 0x03, 0x13, 0x7d, 0xf8, 0x69, 0x9a, 0xc9, 0xc9, - 0x7c, 0x1c, 0xc4, 0x6c, 0x16, 0xa6, 0x2c, 0x65, 0xa1, 0x26, 0x8d, 0xe7, 0xd7, 0x7a, 0xa5, 0x17, - 0xfa, 0xab, 0x12, 0x3b, 0xf4, 0x57, 0x52, 0xc7, 0x8c, 0x93, 0x70, 0xb1, 0x91, 0xf0, 0xf0, 0x69, - 0x1b, 0x33, 0xc3, 0xf1, 0x24, 0xa3, 0xaa, 0xba, 0x7c, 0x9a, 0x2a, 0x40, 0x84, 0x33, 0x22, 0xf1, - 0x7f, 0xb1, 0xc2, 0xff, 0x63, 0xf1, 0x39, 0x95, 0xd9, 0x8c, 0x6c, 0x10, 0x3e, 0x7f, 0x17, 0x41, - 0xc4, 0x13, 0x32, 0xc3, 0xff, 0xe6, 0xf9, 0xbf, 0xef, 0x02, 0xfb, 0x9c, 0x26, 0x39, 0xcb, 0xa8, - 0x84, 0xc7, 0xc0, 0xc1, 0x49, 0xc2, 0x89, 0x10, 0x44, 0x0c, 0xac, 0x61, 0x77, 0xe4, 0x44, 0x07, - 0x65, 0xe1, 0x39, 0x67, 0x35, 0x88, 0xda, 0x7d, 0x98, 0x00, 0x10, 0x33, 0x9a, 0x64, 0x32, 0x63, - 0x54, 0x0c, 0x76, 0x86, 0xd6, 0xa8, 0x7f, 0xfa, 0x59, 0xf0, 0x90, 0xbd, 0x41, 0x9d, 0xe8, 0xab, - 0x86, 0x17, 0xc1, 0xdb, 0xc2, 0xeb, 0x94, 0x85, 0x07, 0x5a, 0x0c, 0xad, 0xe8, 0xc2, 0x11, 0xb0, - 0x27, 0x4c, 0x48, 0x8a, 0x67, 0x64, 0xd0, 0x1d, 0x5a, 0x23, 0x27, 0xda, 0x2f, 0x0b, 0xcf, 0x7e, - 0x6e, 0x30, 0xd4, 0xec, 0xc2, 0x0b, 0xe0, 0x48, 0xcc, 0x53, 0x22, 0x11, 0xb9, 0x1e, 0xec, 0xea, - 0x72, 0x3e, 0x5a, 0x2d, 0x47, 0x0d, 0x28, 0x58, 0x9c, 0x04, 0xaf, 0xc6, 0x3f, 0x93, 0x58, 0x05, - 0x11, 0x4e, 0x68, 0x4c, 0xaa, 0x0e, 0xaf, 0x6a, 0x26, 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xdd, 0x84, 0xe8, 0xb1, 0xc9, 0xe5, 0xd4, 0x88, 0x40, 0xad, 0x16, 0x7c, 0x05, - 0x7a, 0xca, 0x4d, 0x31, 0xe8, 0x6a, 0xd1, 0x4f, 0xb6, 0x13, 0x55, 0x63, 0x88, 0x0e, 0x8c, 0x70, - 0x4f, 0xad, 0x04, 0xaa, 0x74, 0xfc, 0x3f, 0x2c, 0xf0, 0x78, 0xcd, 0xe3, 0x17, 0x99, 0x90, 0xf0, - 0xc7, 0x0d, 0x9f, 0x83, 0xed, 0x7c, 0x56, 0x6c, 0xed, 0x72, 0x73, 0x40, 0x6b, 0x64, 0xc5, 0xe3, - 0x0b, 0xd0, 0xcb, 0x24, 0x99, 0xd5, 0xce, 0x6c, 0xf9, 0x46, 0xe8, 0xea, 0xda, 0x2e, 0xbe, 0x53, - 0x0a, 0xa8, 0x12, 0xf2, 0x8f, 0xc1, 0x9e, 0xb9, 0x08, 0x70, 0xb8, 0x76, 0xd8, 0xf7, 0x4d, 0xf8, - 0xca, 0x81, 0x8f, 0xa2, 0xdb, 0x3b, 0xb7, 0xf3, 0xe6, 0xce, 0xed, 0xbc, 0xbd, 0x73, 0x3b, 0xbf, - 0x94, 0xae, 0x75, 0x5b, 0xba, 0xd6, 0x9b, 0xd2, 0xb5, 0xde, 0x96, 0xae, 0xf5, 0x57, 0xe9, 0x5a, - 0xbf, 0xfd, 0xed, 0x76, 0x5e, 0x1f, 0x3d, 0xf4, 0xc3, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0xd2, - 0xeb, 0x52, 0x19, 0xe8, 0x07, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/discovery/v1beta1/generated.proto", fileDescriptor_6555bad15de200e0) +} + +var fileDescriptor_6555bad15de200e0 = []byte{ + // 857 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4f, 0x6f, 0xe4, 0x34, +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, 0x03, 0x3c, 0x5c, 0xf3, 0xf8, 0x39, + 0xe5, 0x02, 0xfe, 0xb0, 0xe1, 0xb3, 0xbf, 0x9d, 0xcf, 0x92, 0xad, 0x5c, 0x6e, 0x0f, 0x68, 0x83, + 0xf4, 0x3c, 0x3e, 0x07, 0x26, 0x15, 0x24, 0x6d, 0x9c, 0xd9, 0xf2, 0x8d, 0x50, 0xd5, 0x75, 0x5d, + 0x7c, 0x2b, 0x15, 0x50, 0x2d, 0xe4, 0x1d, 0x83, 0x3d, 0x7d, 0x11, 0xe0, 0x64, 0xed, 0xb0, 0xef, + 0xeb, 0xf0, 0xde, 0x81, 0x0f, 0xc3, 0xbb, 0x95, 0x33, 0x78, 0xbd, 0x72, 0x06, 0x6f, 0x56, 0xce, + 0xe0, 0xe7, 0xca, 0x31, 0xee, 0x2a, 0xc7, 0x78, 0x5d, 0x39, 0xc6, 0x9b, 0xca, 0x31, 0xfe, 0xac, + 0x1c, 0xe3, 0xd7, 0xbf, 0x9c, 0xc1, 0xab, 0xa3, 0xfb, 0x7e, 0xd8, 0x7f, 0x07, 0x00, 0x00, 0xff, + 0xff, 0x1c, 0xe6, 0x20, 0x06, 0xcf, 0x07, 0x00, 0x00, } func (m *Endpoint) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/events/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/events/v1/generated.pb.go index 2ec919a95aa..96a6047e860 100644 --- a/pkg/k8s/vendor/k8s.io/api/events/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/events/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/events/v1/generated.proto +// source: k8s.io/api/events/v1/generated.proto package v1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_ee2600587b650fac, []int{0} + return fileDescriptor_d3a3e1495c224e47, []int{0} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_Event proto.InternalMessageInfo func (m *EventList) Reset() { *m = EventList{} } func (*EventList) ProtoMessage() {} func (*EventList) Descriptor() ([]byte, []int) { - return fileDescriptor_ee2600587b650fac, []int{1} + return fileDescriptor_d3a3e1495c224e47, []int{1} } func (m *EventList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_EventList proto.InternalMessageInfo func (m *EventSeries) Reset() { *m = EventSeries{} } func (*EventSeries) ProtoMessage() {} func (*EventSeries) Descriptor() ([]byte, []int) { - return fileDescriptor_ee2600587b650fac, []int{2} + return fileDescriptor_d3a3e1495c224e47, []int{2} } func (m *EventSeries) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,60 +135,59 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/events/v1/generated.proto", fileDescriptor_ee2600587b650fac) + proto.RegisterFile("k8s.io/api/events/v1/generated.proto", fileDescriptor_d3a3e1495c224e47) } -var fileDescriptor_ee2600587b650fac = []byte{ - // 775 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0x77, 0x9b, 0xb4, 0x99, 0xec, 0x6e, 0xd3, 0xd9, 0x95, 0x3a, 0x74, 0x25, 0x27, 0x64, - 0x25, 0x14, 0x21, 0x61, 0xd3, 0x0a, 0x21, 0x84, 0x84, 0x44, 0xdd, 0x14, 0x54, 0xd4, 0x52, 0x69, - 0xda, 0x13, 0xe2, 0xd0, 0x89, 0xf3, 0xea, 0x9a, 0xc4, 0x33, 0xd6, 0xc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90, 0x6b, - 0xb2, 0xdd, 0xb4, 0xda, 0x65, 0x6f, 0x37, 0x97, 0xdc, 0xee, 0x3c, 0x4d, 0xd3, 0x79, 0x7c, 0xeb, - 0x4f, 0x0b, 0x65, 0x3f, 0xf5, 0xd3, 0x50, 0x69, 0xfc, 0xe3, 0xc2, 0x8e, 0x72, 0xd6, 0x6b, 0x24, - 0x65, 0x9b, 0x0d, 0x55, 0xcf, 0x9d, 0xb7, 0x26, 0x91, 0x99, 0xfd, 0xf4, 0x35, 0x2a, 0x87, 0x1a, - 0x22, 0x45, 0x9e, 0x35, 0x9f, 0xb7, 0x6b, 0x07, 0x6f, 0xff, 0x65, 0x79, 0x78, 0x2f, 0x73, 0x9d, - 0xf2, 0x49, 0xca, 0xa0, 0x19, 0xb1, 0xf5, 0x87, 0x85, 0x6a, 0x33, 0xcb, 0x05, 0xbf, 0x43, 0x65, - 0xdf, 0xb4, 0x6d, 0x99, 0xb6, 0xa7, 0xa4, 0xac, 0xd9, 0x2c, 0x87, 0x87, 0xa8, 0x3e, 0x60, 0x4a, - 0x9f, 0x77, 0x15, 0xc8, 0x11, 0xf4, 0xde, 0x67, 0x3b, 0x4e, 0xe7, 0xf5, 0x74, 0x4e, 0x90, 0x2e, - 0x58, 0x78, 0x5f, 0xde, 0x3d, 0xda, 0xa5, 0xfb, 0x47, 0xbb, 0xf4, 0xf0, 0x68, 0x97, 0x7e, 0x4e, - 0x6c, 0xeb, 0x2e, 0xb1, 0xad, 0xfb, 0xc4, 0xb6, 0x1e, 0x12, 0xdb, 0xfa, 0x2b, 0xb1, 0xad, 0xdf, - 0xfe, 0xb6, 0x4b, 0x3f, 0xbc, 0x59, 0xf6, 0x6f, 0xfa, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, - 0xc8, 0x73, 0x3d, 0x7d, 0x07, 0x00, 0x00, +var fileDescriptor_d3a3e1495c224e47 = []byte{ + // 759 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0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x79, 0x25, 0xf6, 0x53, 0x2a, 0xb6, 0x4e, 0x47, 0x01, 0x74, 0x9c, 0x83, 0x7f, 0x45, 0x05, 0x66, + 0x4b, 0x97, 0xfb, 0xa4, 0xa0, 0xd8, 0xab, 0x29, 0xbb, 0x70, 0xa0, 0xa2, 0x34, 0xcd, 0xc6, 0x38, + 0x01, 0x2c, 0xe4, 0x3e, 0x59, 0x7c, 0x8a, 0xa3, 0x2a, 0x4a, 0xd3, 0x2c, 0xbe, 0x40, 0x45, 0x01, + 0x0e, 0x13, 0x2d, 0xd7, 0x77, 0xc8, 0x92, 0xba, 0xb1, 0xdd, 0xe1, 0x1b, 0x8b, 0x67, 0x3a, 0x7b, + 0x61, 0x0a, 0x57, 0x20, 0xc0, 0xb7, 0x87, 0x1e, 0x81, 0xf6, 0xd9, 0x34, 0x13, 0xc2, 0xcf, 0xd0, + 0xa2, 0x80, 0x76, 0x3c, 0x63, 0xa4, 0x38, 0xbb, 0x66, 0x29, 0xea, 0x55, 0x16, 0x69, 0xc2, 0xa3, + 0x7d, 0x01, 0x5c, 0x45, 0x0b, 0x3e, 0x97, 0x40, 0x90, 0xea, 0x63, 0x39, 0xf5, 0x5d, 0x78, 0xce, + 0x25, 0x50, 0x95, 0x89, 0x11, 0xf2, 0x36, 0x00, 0x52, 0x7a, 0x8a, 0xb8, 0xb8, 0x0d, 0x80, 0xaa, + 0x0c, 0x06, 0x54, 0x6e, 0x41, 0x20, 0xc0, 0x8e, 0x15, 0xcf, 0x79, 0x47, 0xd8, 0x40, 0x96, 0x55, + 0x61, 0x95, 0x49, 0x85, 0x25, 0xc3, 0xa1, 0x60, 0x16, 0x49, 0xe5, 0xca, 0x8d, 0x11, 0x01, 0x3a, + 0x26, 0x89, 0xdf, 0x6a, 0x88, 0x64, 0xc1, 0xff, 0x5c, 0x11, 0xaa, 0x99, 0x0c, 0x25, 0xf3, 0x02, + 0xb2, 0xa2, 0xfc, 0x7e, 0x9b, 0x6d, 0xda, 0xd5, 0xa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48, 0xd7, + 0xde, 0x7d, 0xd6, 0x73, 0x2f, 0x36, 0x27, 0xfd, 0x9b, 0x7e, 0x09, 0x00, 0x00, 0xff, 0xff, 0x6f, + 0x4f, 0x7a, 0xe4, 0x64, 0x07, 0x00, 0x00, } func (m *Event) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/events/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/events/v1beta1/generated.pb.go index 701127ff945..5d7881e8c09 100644 --- a/pkg/k8s/vendor/k8s.io/api/events/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/events/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/events/v1beta1/generated.proto +// source: k8s.io/api/events/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_4f97f691c32a5ac8, []int{0} + return fileDescriptor_99027a32dee7673b, []int{0} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_Event proto.InternalMessageInfo func (m *EventList) Reset() { *m = EventList{} } func (*EventList) ProtoMessage() {} func (*EventList) Descriptor() ([]byte, []int) { - return fileDescriptor_4f97f691c32a5ac8, []int{1} + return fileDescriptor_99027a32dee7673b, []int{1} } func (m *EventList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_EventList proto.InternalMessageInfo func (m *EventSeries) Reset() { *m = EventSeries{} } func (*EventSeries) ProtoMessage() {} func (*EventSeries) Descriptor() ([]byte, []int) { - return fileDescriptor_4f97f691c32a5ac8, []int{2} + return fileDescriptor_99027a32dee7673b, []int{2} } func (m *EventSeries) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,60 +135,59 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/events/v1beta1/generated.proto", fileDescriptor_4f97f691c32a5ac8) + proto.RegisterFile("k8s.io/api/events/v1beta1/generated.proto", fileDescriptor_99027a32dee7673b) } -var fileDescriptor_4f97f691c32a5ac8 = []byte{ - // 779 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x6e, 0xdb, 0x46, - 0x10, 0xc6, 0xc5, 0xc4, 0x92, 0xad, 0x55, 0x12, 0xcb, 0x9b, 0x83, 0xd7, 0x2e, 0x40, 0x09, 0x0a, - 0x10, 0x08, 0x05, 0x4a, 0xd6, 0x41, 0x51, 0xf4, 0x56, 0x84, 0x91, 0x5b, 0x24, 0xb0, 0x1b, 0x60, - 0xe3, 0x53, 0xd1, 0x43, 0x56, 0xd4, 0x84, 0x66, 0x25, 0xee, 0x12, 0xbb, 0x2b, 0x01, 0xbe, 0xf5, - 0x52, 0xa0, 0xc7, 0x3e, 0x43, 0x6f, 0xbd, 0xf5, 0x31, 0x7c, 0xf4, 0xd1, 0x27, 0xa1, 0x66, 0x5f, - 0xa4, 0xe0, 0x72, 0x25, 0xca, 0xfa, 0x03, 0xab, 0xe8, 0x8d, 0x9c, 0xf9, 0xbe, 0xdf, 0xcc, 0x2e, - 0x47, 0x23, 0x14, 0x0c, 0xbf, 0x51, 0x5e, 0x2c, 0xfc, 0xe1, 0xb8, 0x0f, 0x92, 0x83, 0x06, 0xe5, - 0x4f, 0x80, 0x0f, 0x84, 0xf4, 0x6d, 0x82, 0xa5, 0xb1, 0x0f, 0x13, 0xe0, 0x5a, 0xf9, 0x93, 0x93, - 0x3e, 0x68, 0x76, 0xe2, 0x47, 0xc0, 0x41, 0x32, 0x0d, 0x03, 0x2f, 0x95, 0x42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b, - 0x06, 0xbf, 0x40, 0xd5, 0xd0, 0x9c, 0xdd, 0x31, 0x67, 0x9f, 0x9b, 0x8a, 0x13, 0x17, 0x39, 0x3c, - 0x46, 0xcd, 0x11, 0x53, 0xfa, 0x7d, 0x5f, 0x81, 0x9c, 0xc0, 0xe0, 0xff, 0xec, 0xc9, 0xf9, 0xd0, - 0x9e, 0x2d, 0x01, 0xe9, 0x4a, 0x89, 0xe0, 0xdb, 0xeb, 0x3b, 0xb7, 0x72, 0x73, 0xe7, 0x56, 0x6e, - 0xef, 0xdc, 0xca, 0x2f, 0x99, 0xeb, 0x5c, 0x67, 0xae, 0x73, 0x93, 0xb9, 0xce, 0x6d, 0xe6, 0x3a, - 0x7f, 0x67, 0xae, 0xf3, 0xfb, 0x3f, 0x6e, 0xe5, 0xc7, 0xa3, 0x8d, 0xff, 0xb0, 0xff, 0x06, 0x00, - 0x00, 0xff, 0xff, 0xae, 0x19, 0x45, 0xf5, 0x96, 0x07, 0x00, 0x00, +var fileDescriptor_99027a32dee7673b = []byte{ + // 764 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x4f, 0xdb, 0x48, + 0x14, 0xc7, 0x63, 0x20, 0x81, 0x4c, 0xf8, 0x11, 0x86, 0x03, 0x03, 0x2b, 0x39, 0x51, 0x90, 0x50, + 0x76, 0xa5, 0xb5, 0x17, 0xb4, 0x5a, 0xed, 0x6d, 0x85, 0x09, 0x5b, 0x81, 0xa0, 0x48, 0x03, 0xa7, + 0xaa, 0x07, 0x26, 0xce, 0xc3, 0xb8, 0xc4, 0x1e, 0x6b, 0x3c, 0x89, 0xc4, 0xad, 0x97, 0x4a, 0x3d, + 0xf6, 0x6f, 0xe8, 0xad, 0xb7, 0xfe, 0x19, 0x1c, 0x39, 0x72, 0x8a, 0x8a, 0xfb, 0x8f, 0x54, 0x1e, + 0x3b, 0x71, 0xc8, 0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0x62, 0xb7, 0x5a, 0x53, 0xe5, 0xb4, 0xf2, 0x52, 0x3f, 0x32, + 0xb4, 0xa4, 0x8e, 0x50, 0xde, 0x95, 0xe0, 0x85, 0x64, 0xae, 0x3a, 0x5f, 0x2f, 0xed, 0x57, 0x5f, + 0xda, 0x20, 0xd6, 0x4a, 0x0a, 0xcb, 0x1f, 0xc7, 0x36, 0x9a, 0xb8, 0x6b, 0x5f, 0x34, 0x54, 0x1a, + 0xda, 0x30, 0x78, 0x07, 0xe5, 0x6d, 0x75, 0x76, 0x4d, 0x9d, 0x7d, 0x60, 0x4a, 0x4e, 0x9c, 0xe4, + 0x70, 0x07, 0x95, 0xdb, 0x2c, 0x94, 0xe7, 0xcd, 0x10, 0x44, 0x17, 0x5a, 0xbf, 0xb2, 0x27, 0x07, + 0x43, 0x7b, 0x3a, 0x02, 0xa4, 0x63, 0x25, 0xac, 0xff, 0xee, 0x9f, 0xf4, 0xdc, 0xc3, 0x93, 0x9e, + 0x7b, 0x7c, 0xd2, 0x73, 0xef, 0x23, 0x5d, 0xbb, 0x8f, 0x74, 0xed, 0x21, 0xd2, 0xb5, 0xc7, 0x48, + 0xd7, 0xbe, 0x45, 0xba, 0xf6, 0xe9, 0xbb, 0x9e, 0x7b, 0xb3, 0x35, 0xf5, 0x1f, 0xf6, 0x47, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x2b, 0xc1, 0x64, 0x36, 0x7d, 0x07, 0x00, 0x00, } func (m *Event) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go index d967e381068..818486f39d6 100644 --- a/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/extensions/v1beta1/generated.proto +// source: k8s.io/api/extensions/v1beta1/generated.proto package v1beta1 @@ -52,7 +52,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *DaemonSet) Reset() { *m = DaemonSet{} } func (*DaemonSet) ProtoMessage() {} func (*DaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{0} + return fileDescriptor_90a532284de28347, []int{0} } func (m *DaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +80,7 @@ var xxx_messageInfo_DaemonSet proto.InternalMessageInfo func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } func (*DaemonSetCondition) ProtoMessage() {} func (*DaemonSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{1} + return fileDescriptor_90a532284de28347, []int{1} } func (m *DaemonSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,7 +108,7 @@ var xxx_messageInfo_DaemonSetCondition proto.InternalMessageInfo func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } func (*DaemonSetList) ProtoMessage() {} func (*DaemonSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{2} + return fileDescriptor_90a532284de28347, []int{2} } func (m *DaemonSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -136,7 +136,7 @@ var xxx_messageInfo_DaemonSetList proto.InternalMessageInfo func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } func (*DaemonSetSpec) ProtoMessage() {} func (*DaemonSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{3} + return fileDescriptor_90a532284de28347, []int{3} } func (m *DaemonSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +164,7 @@ var xxx_messageInfo_DaemonSetSpec proto.InternalMessageInfo func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} func (*DaemonSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{4} + return fileDescriptor_90a532284de28347, []int{4} } func (m *DaemonSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +192,7 @@ var xxx_messageInfo_DaemonSetStatus proto.InternalMessageInfo func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } func (*DaemonSetUpdateStrategy) ProtoMessage() {} func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{5} + return fileDescriptor_90a532284de28347, []int{5} } func (m *DaemonSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +220,7 @@ var xxx_messageInfo_DaemonSetUpdateStrategy proto.InternalMessageInfo func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{6} + return fileDescriptor_90a532284de28347, []int{6} } func (m *Deployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +248,7 @@ var xxx_messageInfo_Deployment proto.InternalMessageInfo func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } func (*DeploymentCondition) ProtoMessage() {} func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{7} + return fileDescriptor_90a532284de28347, []int{7} } func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +276,7 @@ var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo func (m *DeploymentList) Reset() { *m = DeploymentList{} } func (*DeploymentList) ProtoMessage() {} func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{8} + return fileDescriptor_90a532284de28347, []int{8} } func (m *DeploymentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -304,7 +304,7 @@ var xxx_messageInfo_DeploymentList proto.InternalMessageInfo func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} } func (*DeploymentRollback) ProtoMessage() {} func (*DeploymentRollback) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{9} + return fileDescriptor_90a532284de28347, []int{9} } func (m *DeploymentRollback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +332,7 @@ var xxx_messageInfo_DeploymentRollback proto.InternalMessageInfo func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } func (*DeploymentSpec) ProtoMessage() {} func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{10} + return fileDescriptor_90a532284de28347, []int{10} } func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +360,7 @@ var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } func (*DeploymentStatus) ProtoMessage() {} func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{11} + return fileDescriptor_90a532284de28347, []int{11} } func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,7 +388,7 @@ var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } func (*DeploymentStrategy) ProtoMessage() {} func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{12} + return fileDescriptor_90a532284de28347, []int{12} } func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +416,7 @@ var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } func (*HTTPIngressPath) ProtoMessage() {} func (*HTTPIngressPath) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{13} + return fileDescriptor_90a532284de28347, []int{13} } func (m *HTTPIngressPath) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,7 +444,7 @@ var xxx_messageInfo_HTTPIngressPath proto.InternalMessageInfo func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } func (*HTTPIngressRuleValue) ProtoMessage() {} func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{14} + return fileDescriptor_90a532284de28347, []int{14} } func (m *HTTPIngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,7 +472,7 @@ var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo func (m *IPBlock) Reset() { *m = IPBlock{} } func (*IPBlock) ProtoMessage() {} func (*IPBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{15} + return fileDescriptor_90a532284de28347, []int{15} } func (m *IPBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +500,7 @@ var xxx_messageInfo_IPBlock proto.InternalMessageInfo func (m *Ingress) Reset() { *m = Ingress{} } func (*Ingress) ProtoMessage() {} func (*Ingress) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{16} + return fileDescriptor_90a532284de28347, []int{16} } func (m *Ingress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +528,7 @@ var xxx_messageInfo_Ingress proto.InternalMessageInfo func (m *IngressBackend) Reset() { *m = IngressBackend{} } func (*IngressBackend) ProtoMessage() {} func (*IngressBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{17} + return fileDescriptor_90a532284de28347, []int{17} } func (m *IngressBackend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +556,7 @@ var xxx_messageInfo_IngressBackend proto.InternalMessageInfo func (m *IngressList) Reset() { *m = IngressList{} } func (*IngressList) ProtoMessage() {} func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{18} + return fileDescriptor_90a532284de28347, []int{18} } func (m *IngressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -584,7 +584,7 @@ var xxx_messageInfo_IngressList proto.InternalMessageInfo func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } func (*IngressLoadBalancerIngress) ProtoMessage() {} func (*IngressLoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{19} + return fileDescriptor_90a532284de28347, []int{19} } func (m *IngressLoadBalancerIngress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -612,7 +612,7 @@ var xxx_messageInfo_IngressLoadBalancerIngress proto.InternalMessageInfo func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } func (*IngressLoadBalancerStatus) ProtoMessage() {} func (*IngressLoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{20} + return fileDescriptor_90a532284de28347, []int{20} } func (m *IngressLoadBalancerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -640,7 +640,7 @@ var xxx_messageInfo_IngressLoadBalancerStatus proto.InternalMessageInfo func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } func (*IngressPortStatus) ProtoMessage() {} func (*IngressPortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{21} + return fileDescriptor_90a532284de28347, []int{21} } func (m *IngressPortStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +668,7 @@ var xxx_messageInfo_IngressPortStatus proto.InternalMessageInfo func (m *IngressRule) Reset() { *m = IngressRule{} } func (*IngressRule) ProtoMessage() {} func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{22} + return fileDescriptor_90a532284de28347, []int{22} } func (m *IngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +696,7 @@ var xxx_messageInfo_IngressRule proto.InternalMessageInfo func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } func (*IngressRuleValue) ProtoMessage() {} func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{23} + return fileDescriptor_90a532284de28347, []int{23} } func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,7 +724,7 @@ var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo func (m *IngressSpec) Reset() { *m = IngressSpec{} } func (*IngressSpec) ProtoMessage() {} func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{24} + return fileDescriptor_90a532284de28347, []int{24} } func (m *IngressSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -752,7 +752,7 @@ var xxx_messageInfo_IngressSpec proto.InternalMessageInfo func (m *IngressStatus) Reset() { *m = IngressStatus{} } func (*IngressStatus) ProtoMessage() {} func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{25} + return fileDescriptor_90a532284de28347, []int{25} } func (m *IngressStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -780,7 +780,7 @@ var xxx_messageInfo_IngressStatus proto.InternalMessageInfo func (m *IngressTLS) Reset() { *m = IngressTLS{} } func (*IngressTLS) ProtoMessage() {} func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{26} + return fileDescriptor_90a532284de28347, []int{26} } func (m *IngressTLS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -808,7 +808,7 @@ var xxx_messageInfo_IngressTLS proto.InternalMessageInfo func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } func (*NetworkPolicy) ProtoMessage() {} func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{27} + return fileDescriptor_90a532284de28347, []int{27} } func (m *NetworkPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -836,7 +836,7 @@ var xxx_messageInfo_NetworkPolicy proto.InternalMessageInfo func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } func (*NetworkPolicyEgressRule) ProtoMessage() {} func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{28} + return fileDescriptor_90a532284de28347, []int{28} } func (m *NetworkPolicyEgressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -864,7 +864,7 @@ var xxx_messageInfo_NetworkPolicyEgressRule proto.InternalMessageInfo func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } func (*NetworkPolicyIngressRule) ProtoMessage() {} func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{29} + return fileDescriptor_90a532284de28347, []int{29} } func (m *NetworkPolicyIngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -892,7 +892,7 @@ var xxx_messageInfo_NetworkPolicyIngressRule proto.InternalMessageInfo func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } func (*NetworkPolicyList) ProtoMessage() {} func (*NetworkPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{30} + return fileDescriptor_90a532284de28347, []int{30} } func (m *NetworkPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -920,7 +920,7 @@ var xxx_messageInfo_NetworkPolicyList proto.InternalMessageInfo func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } func (*NetworkPolicyPeer) ProtoMessage() {} func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{31} + return fileDescriptor_90a532284de28347, []int{31} } func (m *NetworkPolicyPeer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -948,7 +948,7 @@ var xxx_messageInfo_NetworkPolicyPeer proto.InternalMessageInfo func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } func (*NetworkPolicyPort) ProtoMessage() {} func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{32} + return fileDescriptor_90a532284de28347, []int{32} } func (m *NetworkPolicyPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -976,7 +976,7 @@ var xxx_messageInfo_NetworkPolicyPort proto.InternalMessageInfo func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } func (*NetworkPolicySpec) ProtoMessage() {} func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{33} + return fileDescriptor_90a532284de28347, []int{33} } func (m *NetworkPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1004,7 +1004,7 @@ var xxx_messageInfo_NetworkPolicySpec proto.InternalMessageInfo func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } func (*ReplicaSet) ProtoMessage() {} func (*ReplicaSet) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{34} + return fileDescriptor_90a532284de28347, []int{34} } func (m *ReplicaSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1032,7 +1032,7 @@ var xxx_messageInfo_ReplicaSet proto.InternalMessageInfo func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } func (*ReplicaSetCondition) ProtoMessage() {} func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{35} + return fileDescriptor_90a532284de28347, []int{35} } func (m *ReplicaSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1060,7 +1060,7 @@ var xxx_messageInfo_ReplicaSetCondition proto.InternalMessageInfo func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } func (*ReplicaSetList) ProtoMessage() {} func (*ReplicaSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{36} + return fileDescriptor_90a532284de28347, []int{36} } func (m *ReplicaSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1088,7 +1088,7 @@ var xxx_messageInfo_ReplicaSetList proto.InternalMessageInfo func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } func (*ReplicaSetSpec) ProtoMessage() {} func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{37} + return fileDescriptor_90a532284de28347, []int{37} } func (m *ReplicaSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1116,7 +1116,7 @@ var xxx_messageInfo_ReplicaSetSpec proto.InternalMessageInfo func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } func (*ReplicaSetStatus) ProtoMessage() {} func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{38} + return fileDescriptor_90a532284de28347, []int{38} } func (m *ReplicaSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1144,7 +1144,7 @@ var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } func (*RollbackConfig) ProtoMessage() {} func (*RollbackConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{39} + return fileDescriptor_90a532284de28347, []int{39} } func (m *RollbackConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1172,7 +1172,7 @@ var xxx_messageInfo_RollbackConfig proto.InternalMessageInfo func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } func (*RollingUpdateDaemonSet) ProtoMessage() {} func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{40} + return fileDescriptor_90a532284de28347, []int{40} } func (m *RollingUpdateDaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1200,7 +1200,7 @@ var xxx_messageInfo_RollingUpdateDaemonSet proto.InternalMessageInfo func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{41} + return fileDescriptor_90a532284de28347, []int{41} } func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1228,7 +1228,7 @@ var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{42} + return fileDescriptor_90a532284de28347, []int{42} } func (m *Scale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1256,7 +1256,7 @@ var xxx_messageInfo_Scale proto.InternalMessageInfo func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{43} + return fileDescriptor_90a532284de28347, []int{43} } func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1284,7 +1284,7 @@ var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{44} + return fileDescriptor_90a532284de28347, []int{44} } func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1360,190 +1360,189 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/extensions/v1beta1/generated.proto", fileDescriptor_cdc93917efc28165) + proto.RegisterFile("k8s.io/api/extensions/v1beta1/generated.proto", fileDescriptor_90a532284de28347) } -var fileDescriptor_cdc93917efc28165 = []byte{ - // 2858 bytes of a gzipped FileDescriptorProto +var fileDescriptor_90a532284de28347 = []byte{ + // 2842 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcd, 0x6f, 0x24, 0x47, 0x15, 0xdf, 0x9e, 0xf1, 0xd8, 0xe3, 0xe7, 0xb5, 0xbd, 0x5b, 0xeb, 0xac, 0x1d, 0x2f, 0xb1, 0xa3, - 0x46, 0x84, 0x4d, 0xd8, 0xcc, 0xb0, 0x9b, 0x64, 0xc9, 0x87, 0x94, 0xb0, 0xe3, 0xdd, 0x64, 0x9d, - 0xd8, 0xe3, 0x49, 0xcd, 0x38, 0x41, 0x11, 0x01, 0xda, 0x3d, 0xe5, 0x71, 0xc7, 0x3d, 0xdd, 0xa3, - 0xee, 0x1a, 0xb3, 0xbe, 0x81, 0xe0, 0x92, 0x13, 0x5c, 0x02, 0x1c, 0x91, 0x90, 0xb8, 0x72, 0xe5, - 0x10, 0x22, 0x10, 0x41, 0x5a, 0x21, 0x0e, 0x91, 0x38, 0x90, 0x93, 0x45, 0x9c, 0x13, 0xe2, 0x1f, - 0x40, 0x7b, 0x42, 0xf5, 0xd1, 0xd5, 0xdf, 0x76, 0x8f, 0xf1, 0x5a, 0x04, 0x71, 0x5a, 0x4f, 0xbd, - 0xf7, 0x7e, 0xf5, 0xaa, 0xea, 0xd5, 0x7b, 0xbf, 0xaa, 0xea, 0x85, 0x57, 0x77, 0x9f, 0xf7, 0x6b, - 0x96, 0x5b, 0xdf, 0x1d, 0x6e, 0x11, 0xcf, 0x21, 0x94, 0xf8, 0xf5, 0x3d, 0xe2, 0x74, 0x5d, 0xaf, - 0x2e, 0x05, 0xc6, 0xc0, 0xaa, 0x93, 0x7b, 0x94, 0x38, 0xbe, 0xe5, 0x3a, 0x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x7c, 0x59, 0xbe, 0x19, 0x18, 0x43, 0x9f, - 0x74, 0x79, 0x6e, 0xab, 0x86, 0xf9, 0xa6, 0xc5, 0x5b, 0xb1, 0x94, 0xa2, 0x77, 0x63, 0x21, 0x5b, - 0x3d, 0x49, 0xc8, 0xce, 0xe4, 0x87, 0x2b, 0xda, 0x84, 0xf9, 0x81, 0xe7, 0xf6, 0x3c, 0xe2, 0xfb, - 0xb7, 0x89, 0xd1, 0xb5, 0x2d, 0x87, 0x04, 0xf3, 0x23, 0x18, 0xd1, 0x95, 0xc3, 0x83, 0xe5, 0xf9, - 0x56, 0xb6, 0x0a, 0xce, 0xb3, 0xd5, 0xef, 0x8f, 0xc1, 0x85, 0x64, 0x05, 0xcc, 0x21, 0xa9, 0xda, - 0x89, 0x48, 0xea, 0xb5, 0xc8, 0x66, 0x10, 0x0c, 0x5e, 0xad, 0x7e, 0xc6, 0x86, 0xb8, 0x05, 0xb3, - 0x32, 0x1b, 0x04, 0x42, 0x49, 0xd3, 0xd5, 0xea, 0x6f, 0xc6, 0xc5, 0x38, 0xa9, 0x8f, 0x5e, 0x82, - 0x69, 0x8f, 0xf3, 0xee, 0x00, 0x40, 0x70, 0xd7, 0x47, 0x24, 0xc0, 0x34, 0x8e, 0x0a, 0x71, 0x5c, - 0x97, 0xf1, 0xd6, 0x90, 0x8e, 0x06, 0x00, 0x63, 0x71, 0xde, 0x7a, 0x2b, 0xa9, 0x80, 0xd3, 0x36, - 0x68, 0x1d, 0x2e, 0x0d, 0x9d, 0x34, 0x94, 0x08, 0xe5, 0x2b, 0x12, 0xea, 0xd2, 0x66, 0x5a, 0x05, - 0x67, 0xd9, 0xa1, 0xed, 0x18, 0x95, 0x1d, 0xe7, 0xe9, 0xf9, 0x46, 0xe1, 0x8d, 0x57, 0x98, 0xcb, - 0x66, 0xd0, 0xed, 0x6a, 0x51, 0xba, 0xad, 0xff, 0x41, 0x8b, 0x16, 0x21, 0x45, 0x81, 0x8f, 0xbb, - 0x65, 0x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0xb7, 0xe1, 0xdf, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x5f, 0xd8, 0x14, 0x50, 0xfb, 0x30, 0x00, 0x00, } func (m *DaemonSet) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/generated.proto b/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/generated.proto index 3f2549681ec..60effc8f711 100644 --- a/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/generated.proto @@ -176,6 +176,8 @@ message DaemonSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DaemonSetCondition conditions = 10; } @@ -343,6 +345,8 @@ message DeploymentStatus { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DeploymentCondition conditions = 6; // Count of hash collisions for the Deployment. The Deployment controller uses this @@ -406,6 +410,7 @@ message HTTPIngressPath { // or '#'. message HTTPIngressRuleValue { // A collection of paths that map requests to backends. + // +listType=atomic repeated HTTPIngressPath paths = 1; } @@ -422,6 +427,7 @@ message IPBlock { // Valid examples are "192.168.1.0/24" or "2001:db8::/64" // Except values will be rejected if they are outside the CIDR range // +optional + // +listType=atomic repeated string except = 2; } @@ -495,6 +501,7 @@ message IngressLoadBalancerIngress { message IngressLoadBalancerStatus { // Ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic repeated IngressLoadBalancerIngress ingress = 1; } @@ -602,11 +609,13 @@ message IngressSpec { // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. // +optional + // +listType=atomic 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 + // +listType=atomic repeated IngressRule rules = 3; } @@ -624,6 +633,7 @@ message IngressTLS { // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. // +optional + // +listType=atomic repeated string hosts = 1; // SecretName is the name of the secret used to terminate SSL traffic on 443. @@ -659,6 +669,7 @@ message NetworkPolicyEgressRule { // 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 + // +listType=atomic repeated NetworkPolicyPort ports = 1; // List of destinations for outgoing traffic of pods selected for this rule. @@ -667,6 +678,7 @@ message NetworkPolicyEgressRule { // 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 + // +listType=atomic repeated NetworkPolicyPeer to = 2; } @@ -679,6 +691,7 @@ message NetworkPolicyIngressRule { // 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 + // +listType=atomic repeated NetworkPolicyPort ports = 1; // List of sources which should be able to access the pods selected for this rule. @@ -687,6 +700,7 @@ message NetworkPolicyIngressRule { // 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 from list. // +optional + // +listType=atomic repeated NetworkPolicyPeer from = 2; } @@ -767,6 +781,7 @@ message NetworkPolicySpec { // 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 + // +listType=atomic repeated NetworkPolicyIngressRule ingress = 2; // List of egress rules to be applied to the selected pods. Outgoing traffic is @@ -777,6 +792,7 @@ message NetworkPolicySpec { // solely to ensure that the pods it selects are isolated by default). // This field is beta-level in 1.8 // +optional + // +listType=atomic repeated NetworkPolicyEgressRule egress = 3; // List of rule types that the NetworkPolicy relates to. @@ -790,6 +806,7 @@ message NetworkPolicySpec { // an Egress section and would otherwise default to just [ "Ingress" ]). // This field is beta-level in 1.8 // +optional + // +listType=atomic repeated string policyTypes = 4; } @@ -905,6 +922,8 @@ message ReplicaSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated ReplicaSetCondition conditions = 6; } diff --git a/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/types.go b/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/types.go index 70b349f654b..cc2deadac0a 100644 --- a/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/extensions/v1beta1/types.go @@ -270,6 +270,8 @@ type DeploymentStatus struct { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type 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 @@ -490,6 +492,8 @@ type DaemonSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` } @@ -652,11 +656,13 @@ type IngressSpec struct { // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. // +optional + // +listType=atomic 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 + // +listType=atomic Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // TODO: Add the ability to specify load-balancer IP through claims } @@ -668,6 +674,7 @@ type IngressTLS struct { // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. // +optional + // +listType=atomic 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. @@ -690,6 +697,7 @@ type IngressStatus struct { type IngressLoadBalancerStatus struct { // Ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic Ingress []IngressLoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` } @@ -797,6 +805,7 @@ type IngressRuleValue struct { // or '#'. type HTTPIngressRuleValue struct { // A collection of paths that map requests to backends. + // +listType=atomic 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. @@ -991,6 +1000,8 @@ type ReplicaSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } @@ -1076,6 +1087,7 @@ type NetworkPolicySpec struct { // 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 + // +listType=atomic 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 @@ -1086,6 +1098,7 @@ type NetworkPolicySpec struct { // solely to ensure that the pods it selects are isolated by default). // This field is beta-level in 1.8 // +optional + // +listType=atomic Egress []NetworkPolicyEgressRule `json:"egress,omitempty" protobuf:"bytes,3,rep,name=egress"` // List of rule types that the NetworkPolicy relates to. @@ -1099,6 +1112,7 @@ type NetworkPolicySpec struct { // an Egress section and would otherwise default to just [ "Ingress" ]). // This field is beta-level in 1.8 // +optional + // +listType=atomic PolicyTypes []PolicyType `json:"policyTypes,omitempty" protobuf:"bytes,4,rep,name=policyTypes,casttype=PolicyType"` } @@ -1111,6 +1125,7 @@ type NetworkPolicyIngressRule struct { // 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 + // +listType=atomic 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. @@ -1119,6 +1134,7 @@ type NetworkPolicyIngressRule struct { // 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 from list. // +optional + // +listType=atomic From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"` } @@ -1133,6 +1149,7 @@ type NetworkPolicyEgressRule struct { // 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 + // +listType=atomic Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"` // List of destinations for outgoing traffic of pods selected for this rule. @@ -1141,6 +1158,7 @@ type NetworkPolicyEgressRule struct { // 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 + // +listType=atomic To []NetworkPolicyPeer `json:"to,omitempty" protobuf:"bytes,2,rep,name=to"` } @@ -1178,6 +1196,7 @@ type IPBlock struct { // Valid examples are "192.168.1.0/24" or "2001:db8::/64" // Except values will be rejected if they are outside the CIDR range // +optional + // +listType=atomic Except []string `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"` } diff --git a/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1/generated.pb.go index c235ba10dee..b342445f71b 100644 --- a/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1/generated.proto +// source: k8s.io/api/flowcontrol/v1/generated.proto package v1 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{0} + return fileDescriptor_5d08a1401821035d, []int{0} } func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } func (*FlowDistinguisherMethod) ProtoMessage() {} func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{1} + return fileDescriptor_5d08a1401821035d, []int{1} } func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo func (m *FlowSchema) Reset() { *m = FlowSchema{} } func (*FlowSchema) ProtoMessage() {} func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{2} + return fileDescriptor_5d08a1401821035d, []int{2} } func (m *FlowSchema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_FlowSchema proto.InternalMessageInfo func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } func (*FlowSchemaCondition) ProtoMessage() {} func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{3} + return fileDescriptor_5d08a1401821035d, []int{3} } func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } func (*FlowSchemaList) ProtoMessage() {} func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{4} + return fileDescriptor_5d08a1401821035d, []int{4} } func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } func (*FlowSchemaSpec) ProtoMessage() {} func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{5} + return fileDescriptor_5d08a1401821035d, []int{5} } func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +214,7 @@ var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } func (*FlowSchemaStatus) ProtoMessage() {} func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{6} + return fileDescriptor_5d08a1401821035d, []int{6} } func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo func (m *GroupSubject) Reset() { *m = GroupSubject{} } func (*GroupSubject) ProtoMessage() {} func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{7} + return fileDescriptor_5d08a1401821035d, []int{7} } func (m *GroupSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +270,7 @@ var xxx_messageInfo_GroupSubject proto.InternalMessageInfo func (m *LimitResponse) Reset() { *m = LimitResponse{} } func (*LimitResponse) ProtoMessage() {} func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{8} + return fileDescriptor_5d08a1401821035d, []int{8} } func (m *LimitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,7 +298,7 @@ var xxx_messageInfo_LimitResponse proto.InternalMessageInfo func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{9} + return fileDescriptor_5d08a1401821035d, []int{9} } func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +326,7 @@ var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } func (*NonResourcePolicyRule) ProtoMessage() {} func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{10} + return fileDescriptor_5d08a1401821035d, []int{10} } func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,7 +354,7 @@ var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } func (*PolicyRulesWithSubjects) ProtoMessage() {} func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{11} + return fileDescriptor_5d08a1401821035d, []int{11} } func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -382,7 +382,7 @@ var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } func (*PriorityLevelConfiguration) ProtoMessage() {} func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{12} + return fileDescriptor_5d08a1401821035d, []int{12} } func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -410,7 +410,7 @@ var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } func (*PriorityLevelConfigurationCondition) ProtoMessage() {} func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{13} + return fileDescriptor_5d08a1401821035d, []int{13} } func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -438,7 +438,7 @@ var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInf func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } func (*PriorityLevelConfigurationList) ProtoMessage() {} func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{14} + return fileDescriptor_5d08a1401821035d, []int{14} } func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,7 +466,7 @@ var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } func (*PriorityLevelConfigurationReference) ProtoMessage() {} func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{15} + return fileDescriptor_5d08a1401821035d, []int{15} } func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -494,7 +494,7 @@ var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInf func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } func (*PriorityLevelConfigurationSpec) ProtoMessage() {} func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{16} + return fileDescriptor_5d08a1401821035d, []int{16} } func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,7 +522,7 @@ var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } func (*PriorityLevelConfigurationStatus) ProtoMessage() {} func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{17} + return fileDescriptor_5d08a1401821035d, []int{17} } func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -550,7 +550,7 @@ var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } func (*QueuingConfiguration) ProtoMessage() {} func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{18} + return fileDescriptor_5d08a1401821035d, []int{18} } func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +578,7 @@ var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } func (*ResourcePolicyRule) ProtoMessage() {} func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{19} + return fileDescriptor_5d08a1401821035d, []int{19} } func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -606,7 +606,7 @@ var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } func (*ServiceAccountSubject) ProtoMessage() {} func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{20} + return fileDescriptor_5d08a1401821035d, []int{20} } func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -634,7 +634,7 @@ var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{21} + return fileDescriptor_5d08a1401821035d, []int{21} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +662,7 @@ var xxx_messageInfo_Subject proto.InternalMessageInfo func (m *UserSubject) Reset() { *m = UserSubject{} } func (*UserSubject) ProtoMessage() {} func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{22} + return fileDescriptor_5d08a1401821035d, []int{22} } func (m *UserSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -714,111 +714,110 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1/generated.proto", fileDescriptor_f8a25df358697d27) -} - -var fileDescriptor_f8a25df358697d27 = []byte{ - // 1588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4b, 0x73, 0x1b, 0xc5, - 0x16, 0xb6, 0x64, 0xc9, 0xb6, 0x8e, 0x9f, 0x69, 0xc7, 0x65, 0xc5, 0xb9, 0x25, 0x39, 0x73, 0xeb, - 0xe6, 0x71, 0x43, 0xa4, 0xc4, 0x45, 0x20, 0xa9, 0x00, 0xa9, 0x4c, 0x12, 0xf2, 0xb2, 0x1d, 0xa7, - 0x95, 0x07, 0x15, 0xa8, 0x82, 0xd1, 0xa8, 0x2d, 0x4d, 0x2c, 0xcd, 0x0c, 0xdd, 0x33, 0x32, 0xa6, - 0x8a, 0x2a, 0x7e, 0x42, 0x56, 0x2c, 0x59, 0xc0, 0x3f, 0x60, 0x45, 0xc1, 0x86, 0x65, 0x76, 0x64, - 0x19, 0x58, 0xa8, 0x88, 0xf8, 0x0b, 0x2c, 0x20, 0x2b, 0xaa, 0x7b, 0x7a, 0x66, 0x34, 0x92, 0x66, - 0xac, 0xf2, 0x22, 0x6c, 0xd8, 0x79, 0xce, 0xf9, 0xce, 0x77, 0xba, 0x4f, 0x9f, 0x97, 0x0c, 0xea, - 0xce, 0x05, 0x56, 0x32, 0xac, 0xf2, 0x8e, 0x5b, 0x25, 0xd4, 0x24, 0x0e, 0x61, 0xe5, 0x36, 0x31, - 0x6b, 0x16, 0x2d, 0x4b, 0x85, 0x66, 0x1b, 0xe5, 0xed, 0xa6, 0xb5, 0xab, 0x5b, 0xa6, 0x43, 0xad, - 0x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73, 0x01, 0x17, 0x0e, 0x31, - 0x41, 0x6d, 0xa7, 0x63, 0x6b, 0xfb, 0xfb, 0x34, 0x4c, 0x86, 0xf4, 0x99, 0x1d, 0xc3, 0xac, 0x49, - 0xe6, 0xa3, 0x3e, 0xfa, 0x8e, 0x61, 0xd6, 0x5e, 0x75, 0x8a, 0xd3, 0x12, 0xc6, 0x3f, 0xb1, 0x00, - 0xa2, 0x6b, 0x90, 0x71, 0x19, 0xa1, 0xb2, 0x6a, 0x8f, 0x27, 0xe4, 0xf1, 0x03, 0x46, 0xa8, 0xbf, - 0x32, 0x4d, 0x71, 0x52, 0x2e, 0xc0, 0xc2, 0x1a, 0xdd, 0x84, 0x6c, 0x9d, 0xbf, 0x87, 0x2c, 0xcc, - 0x13, 0x09, 0x34, 0xbd, 0xbf, 0x3f, 0xbc, 0xc7, 0x17, 0x12, 0xec, 0x11, 0xa0, 0x26, 0xcc, 0xb1, - 0x48, 0xe0, 0xc4, 0x23, 0x25, 0xaf, 0x40, 0x43, 0x23, 0xad, 0xa2, 0x6e, 0xa7, 0x38, 0x17, 0x55, - 0xe1, 0x3e, 0x6e, 0xa5, 0x0c, 0xd3, 0x3d, 0xd7, 0xda, 0xbf, 0x8f, 0xaa, 0x97, 0x9f, 0xbd, 0x2c, - 0x8c, 0x3d, 0x7f, 0x59, 0x18, 0x7b, 0xf1, 0xb2, 0x30, 0xf6, 0x65, 0xb7, 0x90, 0x7a, 0xd6, 0x2d, - 0xa4, 0x9e, 0x77, 0x0b, 0xa9, 0x17, 0xdd, 0x42, 0xea, 0xb7, 0x6e, 0x21, 0xf5, 0xf4, 0xf7, 0xc2, - 0xd8, 0xe3, 0x23, 0xb1, 0xff, 0x13, 0xfd, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x0a, 0x3e, 0x83, - 0x48, 0x15, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/flowcontrol/v1/generated.proto", fileDescriptor_5d08a1401821035d) +} + +var fileDescriptor_5d08a1401821035d = []byte{ + // 1575 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4b, 0x6f, 0xdb, 0x56, + 0x16, 0x36, 0x65, 0xc9, 0xb6, 0x8e, 0x9f, 0xb9, 0x8e, 0x61, 0xc5, 0x19, 0x48, 0x0e, 0x07, 0x93, + 0xc7, 0x64, 0x42, 0x25, 0xc6, 0x64, 0x26, 0x41, 0x66, 0x26, 0x08, 0x93, 0x4c, 0x5e, 0xb6, 0xe3, + 0x5c, 0xe5, 0x51, 0xa4, 0x05, 0x5a, 0x9a, 0xba, 0x96, 0x18, 0x8b, 0x8f, 0xf2, 0x92, 0x72, 0x5d, + 0xa0, 0x40, 0x7f, 0x42, 0x56, 0x5d, 0x76, 0xd1, 0xfe, 0x83, 0xae, 0x8a, 0x76, 0xd3, 0x65, 0x76, + 0xcd, 0x32, 0xed, 0x42, 0x68, 0xd4, 0xbf, 0xd0, 0x45, 0x9b, 0x55, 0x71, 0x2f, 0x2f, 0x49, 0x51, + 0x12, 0x69, 0xc1, 0x8b, 0x74, 0xd3, 0x9d, 0x79, 0xce, 0x77, 0xbe, 0x73, 0xef, 0xb9, 0xe7, 0x25, + 0xc3, 0x99, 0xdd, 0x4b, 0x54, 0x31, 0xec, 0xaa, 0xe6, 0x18, 0xd5, 0x9d, 0x96, 0xbd, 0xa7, 0xdb, + 0x96, 0xe7, 0xda, 0xad, 0x6a, 0xfb, 0x42, 0xb5, 0x41, 0x2c, 0xe2, 0x6a, 0x1e, 0xa9, 0x2b, 0x8e, + 0x6b, 0x7b, 0x36, 0x3a, 0x16, 0x40, 0x15, 0xcd, 0x31, 0x94, 0x1e, 0xa8, 0xd2, 0xbe, 0xb0, 0x72, + 0xae, 0x61, 0x78, 0x4d, 0x7f, 0x5b, 0xd1, 0x6d, 0xb3, 0xda, 0xb0, 0x1b, 0x76, 0x95, 0x5b, 0x6c, + 0xfb, 0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xc4, 0x15, 0x55, 0x7b, 0x32, 0x23, 0x8f, 0x1f, + 0x51, 0xe2, 0x86, 0x2b, 0xd3, 0x14, 0x23, 0x65, 0x02, 0xcc, 0xad, 0xd1, 0x6d, 0x28, 0x34, 0xd8, + 0x7b, 0x88, 0xc2, 0x3c, 0x95, 0x41, 0xd3, 0xfb, 0xfb, 0x23, 0x78, 0x7c, 0x2e, 0xc1, 0x01, 0x01, + 0x6a, 0xc1, 0x1c, 0x4d, 0x04, 0x8e, 0x3f, 0x52, 0xf6, 0x0a, 0x34, 0x34, 0xd2, 0x2a, 0xea, 0x76, + 0x2a, 0x73, 0x49, 0x15, 0xee, 0xe3, 0x96, 0xab, 0x30, 0xdd, 0x73, 0xad, 0x83, 0xfb, 0xa8, 0x7a, + 0xf5, 0xc5, 0xeb, 0xf2, 0xd8, 0xcb, 0xd7, 0xe5, 0xb1, 0x57, 0xaf, 0xcb, 0x63, 0x9f, 0x76, 0xcb, + 0xd2, 0x8b, 0x6e, 0x59, 0x7a, 0xd9, 0x2d, 0x4b, 0xaf, 0xba, 0x65, 0xe9, 0xa7, 0x6e, 0x59, 0x7a, + 0xfe, 0x73, 0x79, 0xec, 0xe9, 0xb1, 0xd4, 0xff, 0x89, 0xfe, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x16, + 0x4e, 0x14, 0xcf, 0x2f, 0x15, 0x00, 0x00, } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go index 33f4b97e391..96e368f6fdb 100644 --- a/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta1/generated.proto +// source: k8s.io/api/flowcontrol/v1beta1/generated.proto package v1beta1 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{0} + return fileDescriptor_3a5cb22a034fcb2a, []int{0} } func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } func (*FlowDistinguisherMethod) ProtoMessage() {} func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{1} + return fileDescriptor_3a5cb22a034fcb2a, []int{1} } func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo func (m *FlowSchema) Reset() { *m = FlowSchema{} } func (*FlowSchema) ProtoMessage() {} func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{2} + return fileDescriptor_3a5cb22a034fcb2a, []int{2} } func (m *FlowSchema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_FlowSchema proto.InternalMessageInfo func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } func (*FlowSchemaCondition) ProtoMessage() {} func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{3} + return fileDescriptor_3a5cb22a034fcb2a, []int{3} } func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } func (*FlowSchemaList) ProtoMessage() {} func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{4} + return fileDescriptor_3a5cb22a034fcb2a, []int{4} } func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } func (*FlowSchemaSpec) ProtoMessage() {} func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{5} + return fileDescriptor_3a5cb22a034fcb2a, []int{5} } func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +214,7 @@ var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } func (*FlowSchemaStatus) ProtoMessage() {} func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{6} + return fileDescriptor_3a5cb22a034fcb2a, []int{6} } func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo func (m *GroupSubject) Reset() { *m = GroupSubject{} } func (*GroupSubject) ProtoMessage() {} func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{7} + return fileDescriptor_3a5cb22a034fcb2a, []int{7} } func (m *GroupSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +270,7 @@ var xxx_messageInfo_GroupSubject proto.InternalMessageInfo func (m *LimitResponse) Reset() { *m = LimitResponse{} } func (*LimitResponse) ProtoMessage() {} func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{8} + return fileDescriptor_3a5cb22a034fcb2a, []int{8} } func (m *LimitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,7 +298,7 @@ var xxx_messageInfo_LimitResponse proto.InternalMessageInfo func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{9} + return fileDescriptor_3a5cb22a034fcb2a, []int{9} } func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +326,7 @@ var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } func (*NonResourcePolicyRule) ProtoMessage() {} func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{10} + return fileDescriptor_3a5cb22a034fcb2a, []int{10} } func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,7 +354,7 @@ var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } func (*PolicyRulesWithSubjects) ProtoMessage() {} func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{11} + return fileDescriptor_3a5cb22a034fcb2a, []int{11} } func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -382,7 +382,7 @@ var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } func (*PriorityLevelConfiguration) ProtoMessage() {} func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{12} + return fileDescriptor_3a5cb22a034fcb2a, []int{12} } func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -410,7 +410,7 @@ var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } func (*PriorityLevelConfigurationCondition) ProtoMessage() {} func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{13} + return fileDescriptor_3a5cb22a034fcb2a, []int{13} } func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -438,7 +438,7 @@ var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInf func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } func (*PriorityLevelConfigurationList) ProtoMessage() {} func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{14} + return fileDescriptor_3a5cb22a034fcb2a, []int{14} } func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,7 +466,7 @@ var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } func (*PriorityLevelConfigurationReference) ProtoMessage() {} func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{15} + return fileDescriptor_3a5cb22a034fcb2a, []int{15} } func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -494,7 +494,7 @@ var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInf func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } func (*PriorityLevelConfigurationSpec) ProtoMessage() {} func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{16} + return fileDescriptor_3a5cb22a034fcb2a, []int{16} } func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,7 +522,7 @@ var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } func (*PriorityLevelConfigurationStatus) ProtoMessage() {} func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{17} + return fileDescriptor_3a5cb22a034fcb2a, []int{17} } func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -550,7 +550,7 @@ var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } func (*QueuingConfiguration) ProtoMessage() {} func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{18} + return fileDescriptor_3a5cb22a034fcb2a, []int{18} } func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +578,7 @@ var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } func (*ResourcePolicyRule) ProtoMessage() {} func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{19} + return fileDescriptor_3a5cb22a034fcb2a, []int{19} } func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -606,7 +606,7 @@ var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } func (*ServiceAccountSubject) ProtoMessage() {} func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{20} + return fileDescriptor_3a5cb22a034fcb2a, []int{20} } func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -634,7 +634,7 @@ var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{21} + return fileDescriptor_3a5cb22a034fcb2a, []int{21} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +662,7 @@ var xxx_messageInfo_Subject proto.InternalMessageInfo func (m *UserSubject) Reset() { *m = UserSubject{} } func (*UserSubject) ProtoMessage() {} func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{22} + return fileDescriptor_3a5cb22a034fcb2a, []int{22} } func (m *UserSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -714,112 +714,111 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta1/generated.proto", fileDescriptor_80171c2a4e3669de) + proto.RegisterFile("k8s.io/api/flowcontrol/v1beta1/generated.proto", fileDescriptor_3a5cb22a034fcb2a) } -var fileDescriptor_80171c2a4e3669de = []byte{ - // 1614 bytes of a gzipped FileDescriptorProto +var fileDescriptor_3a5cb22a034fcb2a = []byte{ + // 1599 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x73, 0xdb, 0xc4, 0x17, 0x8f, 0x1c, 0x3b, 0x89, 0x5f, 0x7e, 0x76, 0xd3, 0x4c, 0xfc, 0x4d, 0xbf, 0x63, 0xa7, 0x62, 0x86, 0x02, 0x6d, 0xe5, 0xb6, 0x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 0x6e, 0x3b, 0x35, 0xcb, - 0x3c, 0xc0, 0xdc, 0xe4, 0x13, 0xcb, 0xab, 0xee, 0xf8, 0xa2, 0x57, 0xb1, 0xe8, 0xad, 0x85, 0x0a, - 0x07, 0xa4, 0xea, 0x03, 0x58, 0xe8, 0x6e, 0x1a, 0xa8, 0x02, 0x60, 0xb6, 0xeb, 0x94, 0x0f, 0x08, - 0xee, 0xf6, 0xf5, 0xd1, 0xb3, 0x2a, 0xac, 0xf1, 0xa8, 0x5f, 0x86, 0x22, 0x86, 0x3b, 0xa8, 0xd5, - 0x53, 0x30, 0x73, 0x99, 0x3a, 0xbe, 0x2b, 0xcf, 0x88, 0x56, 0x21, 0x6d, 0x1b, 0xf5, 0x76, 0xf7, - 0x09, 0x3b, 0xe2, 0x96, 0x51, 0x27, 0x58, 0x68, 0xd4, 0xef, 0x14, 0x98, 0xdd, 0xb0, 0xea, 0x96, - 0x87, 0x09, 0x73, 0x1d, 0x9b, 0x11, 0x74, 0x2e, 0xd6, 0xb1, 0x8e, 0x76, 0x75, 0xac, 0x43, 0x31, - 0x70, 0x47, 0xaf, 0xfa, 0x14, 0x26, 0xef, 0xfb, 0xc4, 0xb7, 0xec, 0x8a, 0xec, 0xd7, 0x67, 0x93, - 0x2e, 0x78, 0x3d, 0x80, 0xc7, 0xb2, 0x4d, 0x9f, 0xe6, 0x2d, 0x40, 0x6a, 0x70, 0x9b, 0x51, 0xfd, - 0x27, 0x05, 0x47, 0x85, 0x63, 0x52, 0x1e, 0x32, 0x95, 0xef, 0x40, 0xce, 0x60, 0xcc, 0xa7, 0xa4, - 0x3c, 0x68, 0x2a, 0xaf, 0xca, 0xdb, 0xe4, 0xd6, 0x06, 0xe0, 0xf0, 0x40, 0x06, 0x74, 0x0f, 0x66, - 0x6b, 0x9d, 0x77, 0x97, 0xd7, 0x3c, 0x99, 0x74, 0xcd, 0x58, 0xc0, 0xf4, 0x25, 0x79, 0x82, 0x78, - 0xd0, 0x71, 0x9c, 0xba, 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0x45, - 0x58, 0x10, 0x76, 0x1b, 0xc4, 0xae, 0x78, 0x55, 0xf1, 0x22, 0x72, 0x35, 0x09, 0xa7, 0xce, 0xf5, - 0x2e, 0x3d, 0xee, 0xb1, 0x50, 0xff, 0x56, 0x00, 0x3d, 0xcb, 0x36, 0x71, 0x1c, 0xb2, 0x86, 0x6b, - 0x89, 0x15, 0x37, 0x28, 0xb4, 0xac, 0x3e, 0xdb, 0x6a, 0x16, 0xb2, 0x6b, 0xdb, 0x57, 0x02, 0x21, - 0x8e, 0xf4, 0x1c, 0xdc, 0x1e, 0xb4, 0xc1, 0x40, 0x95, 0xe0, 0xb6, 0x63, 0x86, 0x23, 0x3d, 0xba, - 0x00, 0x33, 0x66, 0xcd, 0x67, 0x1e, 0xa1, 0x3b, 0xa6, 0xe3, 0x12, 0xd1, 0x98, 0xa6, 0xf4, 0xc3, - 0xf2, 0x4e, 0x33, 0xeb, 0x1d, 0x3a, 0x1c, 0x43, 0x22, 0x0d, 0x80, 0x97, 0x15, 0x73, 0x0d, 0xee, - 0x27, 0x23, 0xfc, 0xcc, 0xf1, 0x07, 0xdb, 0x0a, 0xa5, 0xb8, 0x03, 0xa1, 0xde, 0x83, 0xa5, 0x1d, - 0x42, 0x1b, 0x96, 0x49, 0xd6, 0x4c, 0xd3, 0xf1, 0x6d, 0xaf, 0xbd, 0xac, 0x17, 0x21, 0x1b, 0xc2, - 0x64, 0xe5, 0x1d, 0x92, 0xfe, 0xb3, 0x21, 0x17, 0x8e, 0x30, 0x61, 0xa9, 0xa7, 0x06, 0x96, 0xfa, - 0x2f, 0x29, 0x98, 0x8c, 0xe8, 0xd3, 0x7b, 0x96, 0x5d, 0x96, 0xcc, 0x47, 0xda, 0xe8, 0xab, 0x96, - 0x5d, 0x7e, 0xda, 0x2c, 0x4c, 0x4b, 0x18, 0xff, 0xc4, 0x02, 0x88, 0xae, 0x40, 0xda, 0x67, 0x84, - 0xca, 0x22, 0x3e, 0x9e, 0x94, 0xcc, 0x37,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 0x2c, 0xfd, 0xde, 0x2e, 0x4b, 0x5f, 0xff, 0x51, 0x1e, 0xb9, 0x5d, 0x1e, 0xfc, 0xbf, + 0xd8, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x24, 0x42, 0x4c, 0x0f, 0xac, 0x15, 0x00, 0x00, } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go index 7f8ee085063..f646446df9d 100644 --- a/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta2/generated.proto +// source: k8s.io/api/flowcontrol/v1beta2/generated.proto package v1beta2 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{0} + return fileDescriptor_2e620af2eea53237, []int{0} } func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } func (*FlowDistinguisherMethod) ProtoMessage() {} func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{1} + return fileDescriptor_2e620af2eea53237, []int{1} } func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo func (m *FlowSchema) Reset() { *m = FlowSchema{} } func (*FlowSchema) ProtoMessage() {} func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{2} + return fileDescriptor_2e620af2eea53237, []int{2} } func (m *FlowSchema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_FlowSchema proto.InternalMessageInfo func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } func (*FlowSchemaCondition) ProtoMessage() {} func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{3} + return fileDescriptor_2e620af2eea53237, []int{3} } func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } func (*FlowSchemaList) ProtoMessage() {} func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{4} + return fileDescriptor_2e620af2eea53237, []int{4} } func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } func (*FlowSchemaSpec) ProtoMessage() {} func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{5} + return fileDescriptor_2e620af2eea53237, []int{5} } func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +214,7 @@ var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } func (*FlowSchemaStatus) ProtoMessage() {} func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{6} + return fileDescriptor_2e620af2eea53237, []int{6} } func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo func (m *GroupSubject) Reset() { *m = GroupSubject{} } func (*GroupSubject) ProtoMessage() {} func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{7} + return fileDescriptor_2e620af2eea53237, []int{7} } func (m *GroupSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +270,7 @@ var xxx_messageInfo_GroupSubject proto.InternalMessageInfo func (m *LimitResponse) Reset() { *m = LimitResponse{} } func (*LimitResponse) ProtoMessage() {} func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{8} + return fileDescriptor_2e620af2eea53237, []int{8} } func (m *LimitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,7 +298,7 @@ var xxx_messageInfo_LimitResponse proto.InternalMessageInfo func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{9} + return fileDescriptor_2e620af2eea53237, []int{9} } func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +326,7 @@ var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } func (*NonResourcePolicyRule) ProtoMessage() {} func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{10} + return fileDescriptor_2e620af2eea53237, []int{10} } func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,7 +354,7 @@ var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } func (*PolicyRulesWithSubjects) ProtoMessage() {} func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{11} + return fileDescriptor_2e620af2eea53237, []int{11} } func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -382,7 +382,7 @@ var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } func (*PriorityLevelConfiguration) ProtoMessage() {} func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{12} + return fileDescriptor_2e620af2eea53237, []int{12} } func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -410,7 +410,7 @@ var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } func (*PriorityLevelConfigurationCondition) ProtoMessage() {} func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{13} + return fileDescriptor_2e620af2eea53237, []int{13} } func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -438,7 +438,7 @@ var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInf func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } func (*PriorityLevelConfigurationList) ProtoMessage() {} func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{14} + return fileDescriptor_2e620af2eea53237, []int{14} } func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,7 +466,7 @@ var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } func (*PriorityLevelConfigurationReference) ProtoMessage() {} func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{15} + return fileDescriptor_2e620af2eea53237, []int{15} } func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -494,7 +494,7 @@ var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInf func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } func (*PriorityLevelConfigurationSpec) ProtoMessage() {} func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{16} + return fileDescriptor_2e620af2eea53237, []int{16} } func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,7 +522,7 @@ var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } func (*PriorityLevelConfigurationStatus) ProtoMessage() {} func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{17} + return fileDescriptor_2e620af2eea53237, []int{17} } func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -550,7 +550,7 @@ var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } func (*QueuingConfiguration) ProtoMessage() {} func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{18} + return fileDescriptor_2e620af2eea53237, []int{18} } func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +578,7 @@ var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } func (*ResourcePolicyRule) ProtoMessage() {} func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{19} + return fileDescriptor_2e620af2eea53237, []int{19} } func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -606,7 +606,7 @@ var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } func (*ServiceAccountSubject) ProtoMessage() {} func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{20} + return fileDescriptor_2e620af2eea53237, []int{20} } func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -634,7 +634,7 @@ var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{21} + return fileDescriptor_2e620af2eea53237, []int{21} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +662,7 @@ var xxx_messageInfo_Subject proto.InternalMessageInfo func (m *UserSubject) Reset() { *m = UserSubject{} } func (*UserSubject) ProtoMessage() {} func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{22} + return fileDescriptor_2e620af2eea53237, []int{22} } func (m *UserSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -714,113 +714,112 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta2/generated.proto", fileDescriptor_ed300aa8e672704e) -} - -var fileDescriptor_ed300aa8e672704e = []byte{ - // 1617 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4b, 0x73, 0x1b, 0xc5, - 0x16, 0xf6, 0xc8, 0x92, 0x6d, 0x1d, 0x3f, 0xd3, 0x8e, 0xcb, 0xba, 0xce, 0x2d, 0xc9, 0x99, 0x5b, - 0x75, 0x73, 0x2f, 0x49, 0x46, 0x89, 0x49, 0x48, 0x80, 0xe2, 0xe1, 0x71, 0x42, 0x08, 0xb1, 0x1d, - 0xa7, 0x9d, 0x40, 0x2a, 0xa4, 0x8a, 0x8c, 0x46, 0x6d, 0x69, 0x62, 0x69, 0x66, 0xd2, 0x3d, 0x23, - 0x63, 0xb2, 0xa1, 0xf8, 0x05, 0xac, 0x61, 0xc9, 0x82, 0x15, 0x1b, 0xb6, 0x2c, 0x58, 0x92, 0x62, - 0x95, 0x65, 0x56, 0x82, 0x88, 0x15, 0xff, 0x00, 0x52, 0x45, 0x15, 0xd5, 0x3d, 0xad, 0x19, 0x8d, - 0x5e, 0xa3, 0x4a, 0xaa, 0xb2, 0x62, 0xe7, 0x39, 0xe7, 0x3b, 0xdf, 0xe9, 0x3e, 0x7d, 0x5e, 0x32, - 0x5c, 0xd9, 0xbf, 0xc8, 0x34, 0xcb, 0x29, 0xee, 0xfb, 0x25, 0x42, 0x6d, 0xe2, 0x11, 0x56, 0x6c, - 0x10, 0xbb, 0xec, 0xd0, 0xa2, 0x54, 0x18, 0xae, 0x55, 0xdc, 0xab, 0x39, 0x07, 0xa6, 0x63, 0x7b, - 0xd4, 0xa9, 0x15, 0x1b, 0x67, 0x4b, 0xc4, 0x33, 0xd6, 0x8a, 0x15, 0x62, 0x13, 0x6a, 0x78, 0xa4, - 0xac, 0xb9, 0xd4, 0xf1, 0x1c, 0x94, 0x0f, 0xf0, 0x9a, 0xe1, 0x5a, 0x5a, 0x07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0xb0, 0xd4, 0x53, - 0x03, 0x4b, 0xfd, 0xa7, 0x14, 0x4c, 0x46, 0xf4, 0xe9, 0x7d, 0xcb, 0x2e, 0x4b, 0xe6, 0x63, 0x6d, - 0xf4, 0x35, 0xcb, 0x2e, 0x3f, 0x6b, 0x16, 0xa6, 0x25, 0x8c, 0x7f, 0x62, 0x01, 0x44, 0x57, 0x21, - 0xed, 0x33, 0x42, 0x65, 0x11, 0x9f, 0x4c, 0x4a, 0xe6, 0x5b, 0x8c, 0xd0, 0xf6, 0x7e, 0x35, 0xc5, - 0x99, 0xb9, 0x00, 0x0b, 0x0a, 0xb4, 0x05, 0x99, 0x0a, 0x7f, 0x14, 0x59, 0xa7, 0xa7, 0x92, 0xb8, - 0x3a, 0x7f, 0xc4, 0x04, 0x69, 0x20, 0x24, 0x38, 0x60, 0x41, 0x0f, 0x60, 0x8e, 0xc5, 0x42, 0x28, - 0x9e, 0x6b, 0x84, 0x7d, 0xa9, 0x6f, 0xe0, 0x75, 0xd4, 0x6a, 0x16, 0xe6, 0xe2, 0x2a, 0xdc, 0xe5, - 0x40, 0x2d, 0xc2, 0x74, 0xc7, 0x05, 0x93, 0xbb, 0xac, 0x7e, 0xe9, 0xd1, 0xd3, 0xfc, 0xd8, 0xe3, - 0xa7, 0xf9, 0xb1, 0x27, 0x4f, 0xf3, 0x63, 0x9f, 0xb7, 0xf2, 0xca, 0xa3, 0x56, 0x5e, 0x79, 0xdc, - 0xca, 0x2b, 0x4f, 0x5a, 0x79, 0xe5, 0xd7, 0x56, 0x5e, 0xf9, 0xf2, 0xb7, 0xfc, 0xd8, 0x9d, 0xfc, - 0xf0, 0xff, 0xc5, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x4d, 0x1e, 0x25, 0xc5, 0x15, 0x00, - 0x00, + proto.RegisterFile("k8s.io/api/flowcontrol/v1beta2/generated.proto", fileDescriptor_2e620af2eea53237) +} + +var fileDescriptor_2e620af2eea53237 = []byte{ + // 1602 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x73, 0xdb, 0xd4, + 0x16, 0x8f, 0x1c, 0x3b, 0x89, 0x4f, 0x3e, 0x7b, 0xd3, 0x4c, 0xfc, 0xd2, 0x37, 0x76, 0xaa, 0x37, + 0xf3, 0xfa, 0x1e, 0x6d, 0xe5, 0x36, 0xb4, 0xb4, 0xc0, 0xf0, 0x11, 0xa5, 0xa5, 0x94, 0x26, 0x69, + 0x7a, 0xd3, 0x42, 0xa7, 0x74, 0x86, 0x2a, 0xf2, 0x8d, 0xad, 0xc6, 0xfa, 0xa8, 0xae, 0x94, 0x10, + 0xba, 0x61, 0xf8, 0x0b, 0x58, 0xc3, 0x92, 0x05, 0x2b, 0x36, 0x6c, 0x59, 0xb0, 0xa4, 0xc3, 0xaa, + 0xcb, 0xae, 0x0c, 0x35, 0x2b, 0xfe, 0x03, 0xe8, 0x0c, 0x33, 0xcc, 0xbd, 0xba, 0x92, 0x2c, 0xdb, + 0xb2, 0x3c, 0xed, 0x4c, 0x57, 0xec, 0xa2, 0x73, 0x7f, 0xe7, 0x77, 0xee, 0x39, 0xf7, 0x7c, 0x39, + 0xa0, 0xec, 0x5d, 0xa4, 0x8a, 0x61, 0x57, 0x35, 0xc7, 0xa8, 0xee, 0x36, 0xed, 0x03, 0xdd, 0xb6, + 0x3c, 0xd7, 0x6e, 0x56, 0xf7, 0xcf, 0xee, 0x10, 0x4f, 0x5b, 0xa9, 0xd6, 0x89, 0x45, 0x5c, 0xcd, + 0x23, 0x35, 0xc5, 0x71, 0x6d, 0xcf, 0x46, 0xe5, 0x00, 0xaf, 0x68, 0x8e, 0xa1, 0x74, 0xe0, 0x15, + 0x81, 0x5f, 0x3a, 0x5d, 0x37, 0xbc, 0x86, 0xbf, 0xa3, 0xe8, 0xb6, 0x59, 0xad, 0xdb, 0x75, 0xbb, + 0xca, 0xd5, 0x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, 0xdf, 0x33, 0xac, 0x9a, 0x60, 0x3e, 0x16, + 0xa2, 0xaf, 0x19, 0x56, 0xed, 0x59, 0xab, 0x32, 0x29, 0x60, 0xec, 0x13, 0x73, 0x20, 0xba, 0x0a, + 0x79, 0x9f, 0x12, 0x57, 0x14, 0xf1, 0xc9, 0xac, 0x64, 0xbe, 0x45, 0x89, 0x1b, 0xee, 0x57, 0x13, + 0x8c, 0x99, 0x09, 0x30, 0xa7, 0x40, 0x1b, 0x50, 0xa8, 0xb3, 0x47, 0x11, 0x75, 0x7a, 0x2a, 0x8b, + 0xab, 0xf3, 0x47, 0x4c, 0x90, 0x06, 0x5c, 0x82, 0x03, 0x16, 0xf4, 0x00, 0x66, 0x68, 0x22, 0x84, + 0xfc, 0xb9, 0x86, 0xd8, 0x97, 0xfa, 0x06, 0x5e, 0x45, 0xed, 0x56, 0x65, 0x26, 0x79, 0x84, 0xbb, + 0x0c, 0xc8, 0x55, 0x98, 0xec, 0x70, 0x30, 0xbb, 0xcb, 0xaa, 0x97, 0x1e, 0x3d, 0x2d, 0x8f, 0x3c, + 0x7e, 0x5a, 0x1e, 0x79, 0xf2, 0xb4, 0x3c, 0xf2, 0x79, 0xbb, 0x2c, 0x3d, 0x6a, 0x97, 0xa5, 0xc7, + 0xed, 0xb2, 0xf4, 0xa4, 0x5d, 0x96, 0x7e, 0x6d, 0x97, 0xa5, 0x2f, 0x7f, 0x2b, 0x8f, 0xdc, 0x29, + 0x0f, 0xfe, 0x5f, 0xec, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe3, 0xd5, 0xd0, 0x62, 0xac, 0x15, + 0x00, 0x00, } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta3/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta3/generated.pb.go index c6598306d99..e0a3fc1e180 100644 --- a/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta3/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/flowcontrol/v1beta3/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta3/generated.proto +// source: k8s.io/api/flowcontrol/v1beta3/generated.proto package v1beta3 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{0} + return fileDescriptor_52ab6629c083d251, []int{0} } func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } func (*FlowDistinguisherMethod) ProtoMessage() {} func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{1} + return fileDescriptor_52ab6629c083d251, []int{1} } func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo func (m *FlowSchema) Reset() { *m = FlowSchema{} } func (*FlowSchema) ProtoMessage() {} func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{2} + return fileDescriptor_52ab6629c083d251, []int{2} } func (m *FlowSchema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_FlowSchema proto.InternalMessageInfo func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } func (*FlowSchemaCondition) ProtoMessage() {} func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{3} + return fileDescriptor_52ab6629c083d251, []int{3} } func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } func (*FlowSchemaList) ProtoMessage() {} func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{4} + return fileDescriptor_52ab6629c083d251, []int{4} } func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } func (*FlowSchemaSpec) ProtoMessage() {} func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{5} + return fileDescriptor_52ab6629c083d251, []int{5} } func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +214,7 @@ var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } func (*FlowSchemaStatus) ProtoMessage() {} func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{6} + return fileDescriptor_52ab6629c083d251, []int{6} } func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo func (m *GroupSubject) Reset() { *m = GroupSubject{} } func (*GroupSubject) ProtoMessage() {} func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{7} + return fileDescriptor_52ab6629c083d251, []int{7} } func (m *GroupSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +270,7 @@ var xxx_messageInfo_GroupSubject proto.InternalMessageInfo func (m *LimitResponse) Reset() { *m = LimitResponse{} } func (*LimitResponse) ProtoMessage() {} func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{8} + return fileDescriptor_52ab6629c083d251, []int{8} } func (m *LimitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,7 +298,7 @@ var xxx_messageInfo_LimitResponse proto.InternalMessageInfo func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{9} + return fileDescriptor_52ab6629c083d251, []int{9} } func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +326,7 @@ var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } func (*NonResourcePolicyRule) ProtoMessage() {} func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{10} + return fileDescriptor_52ab6629c083d251, []int{10} } func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,7 +354,7 @@ var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } func (*PolicyRulesWithSubjects) ProtoMessage() {} func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{11} + return fileDescriptor_52ab6629c083d251, []int{11} } func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -382,7 +382,7 @@ var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } func (*PriorityLevelConfiguration) ProtoMessage() {} func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{12} + return fileDescriptor_52ab6629c083d251, []int{12} } func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -410,7 +410,7 @@ var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } func (*PriorityLevelConfigurationCondition) ProtoMessage() {} func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{13} + return fileDescriptor_52ab6629c083d251, []int{13} } func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -438,7 +438,7 @@ var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInf func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } func (*PriorityLevelConfigurationList) ProtoMessage() {} func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{14} + return fileDescriptor_52ab6629c083d251, []int{14} } func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,7 +466,7 @@ var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } func (*PriorityLevelConfigurationReference) ProtoMessage() {} func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{15} + return fileDescriptor_52ab6629c083d251, []int{15} } func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -494,7 +494,7 @@ var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInf func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } func (*PriorityLevelConfigurationSpec) ProtoMessage() {} func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{16} + return fileDescriptor_52ab6629c083d251, []int{16} } func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,7 +522,7 @@ var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } func (*PriorityLevelConfigurationStatus) ProtoMessage() {} func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{17} + return fileDescriptor_52ab6629c083d251, []int{17} } func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -550,7 +550,7 @@ var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } func (*QueuingConfiguration) ProtoMessage() {} func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{18} + return fileDescriptor_52ab6629c083d251, []int{18} } func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +578,7 @@ var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } func (*ResourcePolicyRule) ProtoMessage() {} func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{19} + return fileDescriptor_52ab6629c083d251, []int{19} } func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -606,7 +606,7 @@ var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } func (*ServiceAccountSubject) ProtoMessage() {} func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{20} + return fileDescriptor_52ab6629c083d251, []int{20} } func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -634,7 +634,7 @@ var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{21} + return fileDescriptor_52ab6629c083d251, []int{21} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +662,7 @@ var xxx_messageInfo_Subject proto.InternalMessageInfo func (m *UserSubject) Reset() { *m = UserSubject{} } func (*UserSubject) ProtoMessage() {} func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{22} + return fileDescriptor_52ab6629c083d251, []int{22} } func (m *UserSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -714,112 +714,111 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta3/generated.proto", fileDescriptor_803504887082f044) -} - -var fileDescriptor_803504887082f044 = []byte{ - // 1604 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcb, 0x73, 0xdb, 0x54, - 0x17, 0x8f, 0x1c, 0x3b, 0x89, 0x4f, 0x9e, 0xbd, 0x69, 0x26, 0xfe, 0xd2, 0x6f, 0xec, 0x54, 0xdf, - 0xcc, 0x57, 0xa0, 0xad, 0xdc, 0x27, 0x2d, 0x30, 0x3c, 0xaa, 0xb4, 0x94, 0xd2, 0x24, 0x4d, 0x6f, - 0x5a, 0xe8, 0x94, 0xce, 0x50, 0x59, 0xbe, 0xb1, 0xd5, 0x58, 0x8f, 0xea, 0x4a, 0x0e, 0xa1, 0x1b, - 0x86, 0xbf, 0x80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 0x81, 0x18, 0x87, 0x7a, 0xf9, 0x27, 0x09, 0xe6, 0xe2, 0x3c, 0xad, 0x1b, 0xd4, 0x43, - 0xf7, 0x7a, 0x6a, 0x4f, 0x19, 0xed, 0x4e, 0xcc, 0x9b, 0x57, 0xde, 0x82, 0x08, 0x37, 0x15, 0x4a, - 0x3a, 0xea, 0xee, 0x06, 0xe4, 0x0c, 0x8f, 0x98, 0x2c, 0xeb, 0xe3, 0x5d, 0xe9, 0x4a, 0x29, 0x12, - 0x75, 0x56, 0xc0, 0xe6, 0xae, 0x31, 0x00, 0x1c, 0xe0, 0xc8, 0x7f, 0x8c, 0x77, 0xde, 0x80, 0xd5, - 0x23, 0xfa, 0x4e, 0x82, 0x15, 0x67, 0xe0, 0x80, 0x11, 0x97, 0x5a, 0x4b, 0x8b, 0x3c, 0x78, 0x44, - 0x61, 0xb2, 0x43, 0xd8, 0x5c, 0x21, 0xaa, 0x2c, 0x8e, 0xb4, 0x32, 0xc4, 0x78, 0xc8, 0x51, 0xd0, - 0x87, 0x80, 0x4c, 0xcd, 0x63, 0x19, 0xad, 0x6d, 0xb9, 0x44, 0x27, 0x55, 0x86, 0x2a, 0x86, 0x52, - 0x54, 0x1d, 0x1b, 0x3d, 0x16, 0xb8, 0x8f, 0x17, 0xfa, 0x52, 0x82, 0xc5, 0x6a, 0xef, 0x90, 0x11, - 0x75, 0x79, 0x61, 0x94, 0x44, 0xf7, 0x99, 0x51, 0xea, 0x72, 0xbb, 0x55, 0x5a, 0xec, 0xa3, 0xc0, - 0xfd, 0x82, 0xa1, 0x7b, 0x90, 0x73, 0xfd, 0x06, 0xa1, 0x85, 0x2c, 0x7f, 0xde, 0xd4, 0xa8, 0x5b, - 0x76, 0xc3, 0xd0, 0xf7, 0x31, 0x73, 0xf9, 0xd8, 0xf0, 0xea, 0xdb, 0x3e, 0x9f, 0x55, 0x34, 0x7e, - 0x6b, 0xae, 0xc2, 0x01, 0xa8, 0xfc, 0x08, 0x16, 0xba, 0x87, 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x7c, 0xa9, 0x6f, 0xe2, 0x55, 0xd4, 0x6e, 0x95, 0xe6, 0x92, - 0x2a, 0xdc, 0x15, 0x40, 0x2e, 0xc3, 0x74, 0xc7, 0x05, 0xd3, 0xa7, 0xac, 0x7a, 0xf9, 0xf1, 0xb3, - 0xe2, 0xd8, 0x93, 0x67, 0xc5, 0xb1, 0xa7, 0xcf, 0x8a, 0x63, 0x5f, 0xb4, 0x8b, 0xd2, 0xe3, 0x76, - 0x51, 0x7a, 0xd2, 0x2e, 0x4a, 0x4f, 0xdb, 0x45, 0xe9, 0xb7, 0x76, 0x51, 0xfa, 0xea, 0xf7, 0xe2, - 0xd8, 0xdd, 0xe2, 0xf0, 0xff, 0xc5, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xc5, 0x22, 0x46, - 0xc5, 0x15, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/flowcontrol/v1beta3/generated.proto", fileDescriptor_52ab6629c083d251) +} + +var fileDescriptor_52ab6629c083d251 = []byte{ + // 1589 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcb, 0x6f, 0xdc, 0x54, + 0x17, 0x8f, 0x27, 0x33, 0x49, 0xe6, 0xe4, 0xd9, 0x9b, 0x46, 0x99, 0x2f, 0xfd, 0x34, 0x93, 0xfa, + 0x93, 0xbe, 0x02, 0x6d, 0x3d, 0x7d, 0xd2, 0x02, 0xe2, 0x51, 0xa7, 0xa5, 0x94, 0x26, 0x69, 0x7a, + 0xd3, 0x42, 0x55, 0x2a, 0x51, 0xc7, 0x73, 0xe3, 0x71, 0x33, 0x7e, 0xd4, 0xd7, 0x4e, 0x08, 0xdd, + 0x20, 0xfe, 0x02, 0xd6, 0xb0, 0x64, 0xc1, 0x8a, 0x0d, 0x5b, 0x16, 0x2c, 0xa9, 0x58, 0x75, 0xd9, + 0xd5, 0x40, 0x87, 0x15, 0xff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d, + 0x97, 0xf0, 0xc1, 0x34, 0xa1, 0x1e, 0x16, 0x31, 0x4d, 0xad, 0xb4, 0x9d, 0xe1, 0x94, 0x26, 0x52, + 0x00, 0x58, 0x5b, 0x51, 0x57, 0x63, 0x7e, 0x0a, 0xdc, 0xcf, 0x0c, 0x7b, 0xb0, 0xf5, 0x58, 0x8a, + 0xdb, 0x34, 0xe4, 0x07, 0xb0, 0xb0, 0x49, 0xbc, 0x5d, 0x53, 0x27, 0x97, 0x74, 0xdd, 0x09, 0x6c, + 0x3f, 0x22, 0xeb, 0x55, 0x28, 0xc6, 0x6a, 0xa2, 0xf3, 0x0e, 0x09, 0xff, 0xc5, 0x18, 0x0b, 0x27, + 0x3a, 0x71, 0xab, 0xe7, 0xfa, 0xb6, 0xfa, 0xcf, 0x39, 0x18, 0x4f, 0xe0, 0xf3, 0x3b, 0xa6, 0x5d, + 0x13, 0xc8, 0x47, 0x22, 0xed, 0xeb, 0xa6, 0x5d, 0x7b, 0xde, 0xac, 0x4c, 0x0a, 0x35, 0xf6, 0x89, + 0xb9, 0x22, 0xba, 0x06, 0xf9, 0x80, 0x12, 0x4f, 0x34, 0xf1, 0xf1, 0xac, 0x62, 0xbe, 0x4d, 0x89, + 0x17, 0xf1, 0xab, 0x09, 0x86, 0xcc, 0x04, 0x98, 0x43, 0xa0, 0x35, 0x28, 0x18, 0xec, 0x51, 0x44, + 0x9f, 0x9e, 0xc8, 0xc2, 0x6a, 0xff, 0x11, 0x13, 0x96, 0x01, 0x97, 0xe0, 0x10, 0x05, 0x3d, 0x84, + 0x19, 0x9a, 0x4a, 0x21, 0x7f, 0xae, 0x21, 0xf8, 0x52, 0xcf, 0xc4, 0xab, 0xa8, 0xd5, 0xac, 0xcc, + 0xa4, 0x8f, 0x70, 0x87, 0x03, 0xb9, 0x0a, 0x93, 0x6d, 0x01, 0x66, 0x4f, 0x59, 0xf5, 0xf2, 0xe3, + 0x67, 0xe5, 0x91, 0x27, 0xcf, 0xca, 0x23, 0x4f, 0x9f, 0x95, 0x47, 0xbe, 0x68, 0x95, 0xa5, 0xc7, + 0xad, 0xb2, 0xf4, 0xa4, 0x55, 0x96, 0x9e, 0xb6, 0xca, 0xd2, 0x6f, 0xad, 0xb2, 0xf4, 0xd5, 0xef, + 0xe5, 0x91, 0xbb, 0xe5, 0xc1, 0xff, 0x8b, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0x03, 0x5d, 0xec, + 0x01, 0xac, 0x15, 0x00, 0x00, } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/networking/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/networking/v1/generated.pb.go index daeaea5dce7..7c023e6903f 100644 --- a/pkg/k8s/vendor/k8s.io/api/networking/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/networking/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/networking/v1/generated.proto +// source: k8s.io/api/networking/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } func (*HTTPIngressPath) ProtoMessage() {} func (*HTTPIngressPath) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{0} + return fileDescriptor_2c41434372fec1d7, []int{0} } func (m *HTTPIngressPath) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_HTTPIngressPath proto.InternalMessageInfo func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } func (*HTTPIngressRuleValue) ProtoMessage() {} func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{1} + return fileDescriptor_2c41434372fec1d7, []int{1} } func (m *HTTPIngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo func (m *IPBlock) Reset() { *m = IPBlock{} } func (*IPBlock) ProtoMessage() {} func (*IPBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{2} + return fileDescriptor_2c41434372fec1d7, []int{2} } func (m *IPBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_IPBlock proto.InternalMessageInfo func (m *Ingress) Reset() { *m = Ingress{} } func (*Ingress) ProtoMessage() {} func (*Ingress) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{3} + return fileDescriptor_2c41434372fec1d7, []int{3} } func (m *Ingress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_Ingress proto.InternalMessageInfo func (m *IngressBackend) Reset() { *m = IngressBackend{} } func (*IngressBackend) ProtoMessage() {} func (*IngressBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{4} + return fileDescriptor_2c41434372fec1d7, []int{4} } func (m *IngressBackend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_IngressBackend proto.InternalMessageInfo func (m *IngressClass) Reset() { *m = IngressClass{} } func (*IngressClass) ProtoMessage() {} func (*IngressClass) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{5} + return fileDescriptor_2c41434372fec1d7, []int{5} } func (m *IngressClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_IngressClass proto.InternalMessageInfo func (m *IngressClassList) Reset() { *m = IngressClassList{} } func (*IngressClassList) ProtoMessage() {} func (*IngressClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{6} + return fileDescriptor_2c41434372fec1d7, []int{6} } func (m *IngressClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_IngressClassList proto.InternalMessageInfo func (m *IngressClassParametersReference) Reset() { *m = IngressClassParametersReference{} } func (*IngressClassParametersReference) ProtoMessage() {} func (*IngressClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{7} + return fileDescriptor_2c41434372fec1d7, []int{7} } func (m *IngressClassParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_IngressClassParametersReference proto.InternalMessageInfo func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } func (*IngressClassSpec) ProtoMessage() {} func (*IngressClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{8} + return fileDescriptor_2c41434372fec1d7, []int{8} } func (m *IngressClassSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_IngressClassSpec proto.InternalMessageInfo func (m *IngressList) Reset() { *m = IngressList{} } func (*IngressList) ProtoMessage() {} func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{9} + return fileDescriptor_2c41434372fec1d7, []int{9} } func (m *IngressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_IngressList proto.InternalMessageInfo func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } func (*IngressLoadBalancerIngress) ProtoMessage() {} func (*IngressLoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{10} + return fileDescriptor_2c41434372fec1d7, []int{10} } func (m *IngressLoadBalancerIngress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_IngressLoadBalancerIngress proto.InternalMessageInfo func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } func (*IngressLoadBalancerStatus) ProtoMessage() {} func (*IngressLoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{11} + return fileDescriptor_2c41434372fec1d7, []int{11} } func (m *IngressLoadBalancerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_IngressLoadBalancerStatus proto.InternalMessageInfo func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } func (*IngressPortStatus) ProtoMessage() {} func (*IngressPortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{12} + return fileDescriptor_2c41434372fec1d7, []int{12} } func (m *IngressPortStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_IngressPortStatus proto.InternalMessageInfo func (m *IngressRule) Reset() { *m = IngressRule{} } func (*IngressRule) ProtoMessage() {} func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{13} + return fileDescriptor_2c41434372fec1d7, []int{13} } func (m *IngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_IngressRule proto.InternalMessageInfo func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } func (*IngressRuleValue) ProtoMessage() {} func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{14} + return fileDescriptor_2c41434372fec1d7, []int{14} } func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo func (m *IngressServiceBackend) Reset() { *m = IngressServiceBackend{} } func (*IngressServiceBackend) ProtoMessage() {} func (*IngressServiceBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{15} + return fileDescriptor_2c41434372fec1d7, []int{15} } func (m *IngressServiceBackend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_IngressServiceBackend proto.InternalMessageInfo func (m *IngressSpec) Reset() { *m = IngressSpec{} } func (*IngressSpec) ProtoMessage() {} func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{16} + return fileDescriptor_2c41434372fec1d7, []int{16} } func (m *IngressSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_IngressSpec proto.InternalMessageInfo func (m *IngressStatus) Reset() { *m = IngressStatus{} } func (*IngressStatus) ProtoMessage() {} func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{17} + return fileDescriptor_2c41434372fec1d7, []int{17} } func (m *IngressStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_IngressStatus proto.InternalMessageInfo func (m *IngressTLS) Reset() { *m = IngressTLS{} } func (*IngressTLS) ProtoMessage() {} func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{18} + return fileDescriptor_2c41434372fec1d7, []int{18} } func (m *IngressTLS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +583,7 @@ var xxx_messageInfo_IngressTLS proto.InternalMessageInfo func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } func (*NetworkPolicy) ProtoMessage() {} func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{19} + return fileDescriptor_2c41434372fec1d7, []int{19} } func (m *NetworkPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +611,7 @@ var xxx_messageInfo_NetworkPolicy proto.InternalMessageInfo func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } func (*NetworkPolicyEgressRule) ProtoMessage() {} func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{20} + return fileDescriptor_2c41434372fec1d7, []int{20} } func (m *NetworkPolicyEgressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +639,7 @@ var xxx_messageInfo_NetworkPolicyEgressRule proto.InternalMessageInfo func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } func (*NetworkPolicyIngressRule) ProtoMessage() {} func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{21} + return fileDescriptor_2c41434372fec1d7, []int{21} } func (m *NetworkPolicyIngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -667,7 +667,7 @@ var xxx_messageInfo_NetworkPolicyIngressRule proto.InternalMessageInfo func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } func (*NetworkPolicyList) ProtoMessage() {} func (*NetworkPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{22} + return fileDescriptor_2c41434372fec1d7, []int{22} } func (m *NetworkPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -695,7 +695,7 @@ var xxx_messageInfo_NetworkPolicyList proto.InternalMessageInfo func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } func (*NetworkPolicyPeer) ProtoMessage() {} func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{23} + return fileDescriptor_2c41434372fec1d7, []int{23} } func (m *NetworkPolicyPeer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -723,7 +723,7 @@ var xxx_messageInfo_NetworkPolicyPeer proto.InternalMessageInfo func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } func (*NetworkPolicyPort) ProtoMessage() {} func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{24} + return fileDescriptor_2c41434372fec1d7, []int{24} } func (m *NetworkPolicyPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -751,7 +751,7 @@ var xxx_messageInfo_NetworkPolicyPort proto.InternalMessageInfo func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } func (*NetworkPolicySpec) ProtoMessage() {} func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{25} + return fileDescriptor_2c41434372fec1d7, []int{25} } func (m *NetworkPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -779,7 +779,7 @@ var xxx_messageInfo_NetworkPolicySpec proto.InternalMessageInfo func (m *ServiceBackendPort) Reset() { *m = ServiceBackendPort{} } func (*ServiceBackendPort) ProtoMessage() {} func (*ServiceBackendPort) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{26} + return fileDescriptor_2c41434372fec1d7, []int{26} } func (m *ServiceBackendPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -835,116 +835,115 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/networking/v1/generated.proto", fileDescriptor_1c72867a70a7cc90) -} - -var fileDescriptor_1c72867a70a7cc90 = []byte{ - // 1671 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x6f, 0x1b, 0xd5, - 0x1a, 0xcf, 0x38, 0x71, 0xec, 0x1c, 0x27, 0x69, 0x72, 0x6e, 0xab, 0xeb, 0x9b, 0xab, 0x6b, 0xe7, - 0x8e, 0x68, 0x1b, 0x68, 0x6b, 0xd3, 0xb4, 0x42, 0xb0, 0x01, 0x3a, 0x69, 0x9a, 0x86, 0xa6, 0x8e, - 0x75, 0x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0xcb, 0x74, 0x64, 0x28, 0x11, 0x3e, 0xc4, 0x14, 0xbb, 0x16, 0x36, 0x16, 0x79, 0x96, - 0x23, 0x05, 0x81, 0x42, 0x30, 0x5e, 0x45, 0x8b, 0xca, 0x90, 0x2d, 0xc7, 0x3c, 0x91, 0x07, 0xdd, - 0x4b, 0x3c, 0xe8, 0x2b, 0x13, 0x03, 0x24, 0xec, 0x1a, 0xf7, 0xaa, 0xfa, 0x4f, 0x1a, 0x58, 0x89, - 0x0b, 0xee, 0xd9, 0x3e, 0x83, 0x1f, 0x0c, 0x39, 0x51, 0x9a, 0xce, 0x09, 0x7e, 0x5b, 0xb8, 0xb0, - 0xa2, 0x54, 0x65, 0x03, 0x4a, 0xcc, 0x81, 0x5b, 0x20, 0x6d, 0x33, 0xdc, 0xf1, 0x45, 0x89, 0xe4, - 0x36, 0xcf, 0x4d, 0xe7, 0x41, 0x54, 0x9d, 0xbb, 0xfc, 0x32, 0x92, 0x18, 0xfa, 0x1f, 0x1a, 0x28, - 0xc6, 0xc5, 0xaa, 0x26, 0x35, 0x3b, 0x98, 0x61, 0xea, 0x87, 0x8f, 0x07, 0x37, 0x40, 0xd6, 0xac, - 0xee, 0xee, 0x50, 0xd2, 0xf5, 0x82, 0xd2, 0xe5, 0xa6, 0x5d, 0x53, 0x34, 0x14, 0x72, 0x79, 0x81, - 0xb7, 0x6d, 0xd5, 0xa5, 0x62, 0x05, 0x7e, 0xcb, 0x76, 0x1b, 0x48, 0x70, 0xb8, 0x84, 0x6b, 0x76, - 0x82, 0xe6, 0x17, 0x4a, 0x54, 0xcc, 0x0e, 0x46, 0x82, 0x03, 0x8b, 0x20, 0xed, 0x5b, 0xc4, 0x93, - 0x19, 0xbc, 0x60, 0x2c, 0x70, 0x93, 0x6b, 0x9c, 0x80, 0x24, 0x1d, 0x5e, 0x00, 0x0b, 0x5c, 0xd0, - 0xf7, 0x4c, 0x0b, 0xe7, 0xd3, 0x42, 0x68, 0xa9, 0xdf, 0x2b, 0x2e, 0x54, 0x02, 0x22, 0x8a, 0xf8, - 0xfa, 0xb7, 0x03, 0xef, 0xc3, 0x9f, 0x0e, 0x6e, 0x02, 0x60, 0x11, 0x97, 0x51, 0xe2, 0x38, 0x38, - 0xe8, 0x46, 0x61, 0xd2, 0x6c, 0x85, 0x1c, 0x14, 0x93, 0x82, 0x36, 0x00, 0x5e, 0x18, 0x1b, 0x95, - 0x3c, 0x6f, 0x4c, 0x17, 0xfa, 0x11, 0x31, 0x35, 0x96, 0xb9, 0xaa, 0x18, 0x23, 0x06, 0xae, 0x7f, - 0xa7, 0x81, 0x9c, 0xba, 0x7f, 0x02, 0xe9, 0x74, 0x23, 0x99, 0x4e, 0xff, 0x9f, 0x3c, 0x5a, 0x46, - 0x67, 0xd2, 0x0f, 0x1a, 0x58, 0x0b, 0xac, 0x26, 0x66, 0xc3, 0x30, 0x1d, 0xd3, 0xb5, 0x30, 0x0d, - 0x3a, 0xf5, 0x1a, 0x48, 0xd9, 0x41, 0xfa, 0x00, 0x05, 0x90, 0xda, 0xad, 0xa2, 0x94, 0xed, 0xc1, - 0x8b, 0x20, 0xdb, 0x22, 0x3e, 0x13, 0x89, 0x21, 0x53, 0x27, 0x34, 0xf8, 0xa6, 0xa2, 0xa3, 0x50, - 0x02, 0x56, 0x41, 0xda, 0x23, 0x94, 0xf9, 0xf9, 0x39, 0x61, 0xf0, 0x85, 0x89, 0x06, 0x57, 0x09, - 0x65, 0xaa, 0x97, 0x46, 0x23, 0x8a, 0x23, 0x20, 0x09, 0xa4, 0x7f, 0x0a, 0xfe, 0x33, 0xc2, 0x72, - 0x79, 0x05, 0x7e, 0x0c, 0x32, 0xb6, 0x64, 0xaa, 0x89, 0x78, 0x75, 0xa2, 0xc2, 0x11, 0xfe, 0x47, - 0x83, 0x38, 0x18, 0xb8, 0x01, 0xaa, 0xfe, 0x8d, 0x06, 0x56, 0x87, 0x2c, 0x15, 0xbb, 0x04, 0xa1, - 0x4c, 0x44, 0x2c, 0x1d, 0x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0xa7, 0x1f, 0x0f, 0xe6, 0x85, 0x98, 0xa1, 0xf7, - 0x5e, 0x58, 0x5e, 0xfc, 0x4b, 0x65, 0xe3, 0xf8, 0xdc, 0xf8, 0x30, 0x5a, 0x2c, 0x65, 0xa6, 0x6f, - 0x4e, 0x99, 0xe9, 0xf1, 0x89, 0x36, 0x76, 0xad, 0x84, 0xef, 0x81, 0x79, 0x2c, 0xd1, 0xe5, 0x88, - 0xbc, 0x3c, 0x25, 0x7a, 0xd4, 0x56, 0xa3, 0x5f, 0x1e, 0x14, 0x4d, 0x01, 0xc2, 0xb7, 0x78, 0x94, - 0xb8, 0x2c, 0xff, 0xe0, 0x97, 0x7b, 0xf8, 0x82, 0xf1, 0x3f, 0xe9, 0x6c, 0x48, 0x3e, 0xe6, 0x1f, - 0x38, 0xe1, 0x11, 0xc5, 0x6f, 0xe8, 0x1f, 0x01, 0x38, 0xbc, 0xe4, 0x4c, 0xb1, 0x42, 0x9d, 0x03, - 0xf3, 0x6e, 0xb7, 0x73, 0x80, 0x65, 0x0d, 0xa5, 0x23, 0x03, 0x2b, 0x82, 0x8a, 0x14, 0xd7, 0x78, - 0xf3, 0xd1, 0xd3, 0xc2, 0xcc, 0xe3, 0xa7, 0x85, 0x99, 0x27, 0x4f, 0x0b, 0x33, 0x9f, 0xf7, 0x0b, - 0xda, 0xa3, 0x7e, 0x41, 0x7b, 0xdc, 0x2f, 0x68, 0x4f, 0xfa, 0x05, 0xed, 0xcf, 0x7e, 0x41, 0xfb, - 0xea, 0xaf, 0xc2, 0xcc, 0xfb, 0xf9, 0x71, 0xbf, 0x96, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xd4, - 0x46, 0x40, 0xf2, 0x61, 0x15, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/networking/v1/generated.proto", fileDescriptor_2c41434372fec1d7) +} + +var fileDescriptor_2c41434372fec1d7 = []byte{ + // 1652 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0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, 0xff, 0xff, 0x24, 0x03, 0xec, 0x04, + 0x48, 0x15, 0x00, 0x00, } func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/networking/v1/generated.proto b/pkg/k8s/vendor/k8s.io/api/networking/v1/generated.proto index b50dd491e0f..22a9085a54a 100644 --- a/pkg/k8s/vendor/k8s.io/api/networking/v1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/networking/v1/generated.proto @@ -84,6 +84,7 @@ message IPBlock { // Valid examples are "192.168.1.0/24" or "2001:db8::/64" // Except values will be rejected if they are outside the cidr range // +optional + // +listType=atomic repeated string except = 2; } @@ -225,6 +226,7 @@ message IngressLoadBalancerIngress { message IngressLoadBalancerStatus { // ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic repeated IngressLoadBalancerIngress ingress = 1; } @@ -396,6 +398,7 @@ message NetworkPolicyEgressRule { // 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 + // +listType=atomic repeated NetworkPolicyPort ports = 1; // to is a list of destinations for outgoing traffic of pods selected for this rule. @@ -404,6 +407,7 @@ message NetworkPolicyEgressRule { // 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 + // +listType=atomic repeated NetworkPolicyPeer to = 2; } @@ -416,6 +420,7 @@ message NetworkPolicyIngressRule { // 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 + // +listType=atomic repeated NetworkPolicyPort ports = 1; // from is a list of sources which should be able to access the pods selected for this rule. @@ -424,6 +429,7 @@ message NetworkPolicyIngressRule { // source). 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 from list. // +optional + // +listType=atomic repeated NetworkPolicyPeer from = 2; } @@ -505,6 +511,7 @@ message NetworkPolicySpec { // 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 + // +listType=atomic repeated NetworkPolicyIngressRule ingress = 2; // egress is a list of egress rules to be applied to the selected pods. Outgoing traffic @@ -515,6 +522,7 @@ message NetworkPolicySpec { // solely to ensure that the pods it selects are isolated by default). // This field is beta-level in 1.8 // +optional + // +listType=atomic repeated NetworkPolicyEgressRule egress = 3; // policyTypes is a list of rule types that the NetworkPolicy relates to. @@ -528,6 +536,7 @@ message NetworkPolicySpec { // an egress section and would otherwise default to just [ "Ingress" ]). // This field is beta-level in 1.8 // +optional + // +listType=atomic repeated string policyTypes = 4; } diff --git a/pkg/k8s/vendor/k8s.io/api/networking/v1/types.go b/pkg/k8s/vendor/k8s.io/api/networking/v1/types.go index a17e2cb5b39..8ee62918b0a 100644 --- a/pkg/k8s/vendor/k8s.io/api/networking/v1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/networking/v1/types.go @@ -74,6 +74,7 @@ type NetworkPolicySpec struct { // 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 + // +listType=atomic Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"` // egress is a list of egress rules to be applied to the selected pods. Outgoing traffic @@ -84,6 +85,7 @@ type NetworkPolicySpec struct { // solely to ensure that the pods it selects are isolated by default). // This field is beta-level in 1.8 // +optional + // +listType=atomic Egress []NetworkPolicyEgressRule `json:"egress,omitempty" protobuf:"bytes,3,rep,name=egress"` // policyTypes is a list of rule types that the NetworkPolicy relates to. @@ -97,6 +99,7 @@ type NetworkPolicySpec struct { // an egress section and would otherwise default to just [ "Ingress" ]). // This field is beta-level in 1.8 // +optional + // +listType=atomic PolicyTypes []PolicyType `json:"policyTypes,omitempty" protobuf:"bytes,4,rep,name=policyTypes,casttype=PolicyType"` } @@ -109,6 +112,7 @@ type NetworkPolicyIngressRule struct { // 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 + // +listType=atomic Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"` // from is a list of sources which should be able to access the pods selected for this rule. @@ -117,6 +121,7 @@ type NetworkPolicyIngressRule struct { // source). 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 from list. // +optional + // +listType=atomic From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"` } @@ -130,6 +135,7 @@ type NetworkPolicyEgressRule struct { // 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 + // +listType=atomic Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"` // to is a list of destinations for outgoing traffic of pods selected for this rule. @@ -138,6 +144,7 @@ type NetworkPolicyEgressRule struct { // 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 + // +listType=atomic To []NetworkPolicyPeer `json:"to,omitempty" protobuf:"bytes,2,rep,name=to"` } @@ -175,6 +182,7 @@ type IPBlock struct { // Valid examples are "192.168.1.0/24" or "2001:db8::/64" // Except values will be rejected if they are outside the cidr range // +optional + // +listType=atomic Except []string `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"` } @@ -329,6 +337,7 @@ type IngressStatus struct { type IngressLoadBalancerStatus struct { // ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic Ingress []IngressLoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` } diff --git a/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/generated.pb.go index 949ea513fe5..0d42034837f 100644 --- a/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/networking/v1alpha1/generated.proto +// source: k8s.io/api/networking/v1alpha1/generated.proto package v1alpha1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *IPAddress) Reset() { *m = IPAddress{} } func (*IPAddress) ProtoMessage() {} func (*IPAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{0} + return fileDescriptor_c1cb39e7b48ce50d, []int{0} } func (m *IPAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_IPAddress proto.InternalMessageInfo func (m *IPAddressList) Reset() { *m = IPAddressList{} } func (*IPAddressList) ProtoMessage() {} func (*IPAddressList) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{1} + return fileDescriptor_c1cb39e7b48ce50d, []int{1} } func (m *IPAddressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_IPAddressList proto.InternalMessageInfo func (m *IPAddressSpec) Reset() { *m = IPAddressSpec{} } func (*IPAddressSpec) ProtoMessage() {} func (*IPAddressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{2} + return fileDescriptor_c1cb39e7b48ce50d, []int{2} } func (m *IPAddressSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_IPAddressSpec proto.InternalMessageInfo func (m *ParentReference) Reset() { *m = ParentReference{} } func (*ParentReference) ProtoMessage() {} func (*ParentReference) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{3} + return fileDescriptor_c1cb39e7b48ce50d, []int{3} } func (m *ParentReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_ParentReference proto.InternalMessageInfo func (m *ServiceCIDR) Reset() { *m = ServiceCIDR{} } func (*ServiceCIDR) ProtoMessage() {} func (*ServiceCIDR) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{4} + return fileDescriptor_c1cb39e7b48ce50d, []int{4} } func (m *ServiceCIDR) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ServiceCIDR proto.InternalMessageInfo func (m *ServiceCIDRList) Reset() { *m = ServiceCIDRList{} } func (*ServiceCIDRList) ProtoMessage() {} func (*ServiceCIDRList) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{5} + return fileDescriptor_c1cb39e7b48ce50d, []int{5} } func (m *ServiceCIDRList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_ServiceCIDRList proto.InternalMessageInfo func (m *ServiceCIDRSpec) Reset() { *m = ServiceCIDRSpec{} } func (*ServiceCIDRSpec) ProtoMessage() {} func (*ServiceCIDRSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{6} + return fileDescriptor_c1cb39e7b48ce50d, []int{6} } func (m *ServiceCIDRSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_ServiceCIDRSpec proto.InternalMessageInfo func (m *ServiceCIDRStatus) Reset() { *m = ServiceCIDRStatus{} } func (*ServiceCIDRStatus) ProtoMessage() {} func (*ServiceCIDRStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{7} + return fileDescriptor_c1cb39e7b48ce50d, []int{7} } func (m *ServiceCIDRStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -280,52 +280,51 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/networking/v1alpha1/generated.proto", fileDescriptor_c1b7ac8d7d97acec) -} - -var fileDescriptor_c1b7ac8d7d97acec = []byte{ - // 648 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 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32, 0x9e, 0x6b, 0x62, 0x9d, 0x5c, 0xa5, 0xe2, 0x69, 0x24, 0x83, 0x10, 0xe6, 0x04, - 0xcf, 0x6f, 0x12, 0x08, 0x77, 0x08, 0x21, 0xbb, 0xac, 0xeb, 0xfe, 0x32, 0x90, 0xb9, 0x7b, 0xf0, - 0xd2, 0xf3, 0x38, 0x08, 0x61, 0xbd, 0x47, 0xcb, 0xaa, 0x23, 0x8f, 0x49, 0xd6, 0x32, 0x3a, 0xc6, - 0x46, 0xb3, 0xff, 0x14, 0x57, 0xe3, 0x28, 0x8d, 0x71, 0x32, 0xf2, 0x15, 0x20, 0xb0, 0x62, 0xe3, - 0x71, 0x0f, 0xef, 0x0f, 0x3e, 0x80, 0x2b, 0x5f, 0x83, 0x64, 0x8e, 0x75, 0x72, 0xde, 0xae, 0x65, - 0xe7, 0x6d, 0x54, 0x61, 0xb4, 0x74, 0xb5, 0xf6, 0x51, 0x5d, 0x24, 0xe0, 0xb6, 0x16, 0xb4, 0xfb, - 0x26, 0xbe, 0x7e, 0xd8, 0xb8, 0x6c, 0xed, 0x30, 0x01, 0xd7, 0xf9, 0xaf, 0xb0, 0xae, 0xab, 0x15, - 0xd5, 0x46, 0xdd, 0x9f, 0x06, 0x5a, 0x29, 0x59, 0xaf, 0x02, 0x21, 0xad, 0xa3, 0xb9, 0x10, 0xf8, - 0x76, 0x21, 0x94, 0x5a, 0x47, 0x78, 0x50, 0xec, 0xb3, 0x3c, 0x41, 0xa6, 0x02, 0xec, 0xa1, 0x46, - 0x20, 0x21, 0x14, 0xad, 0x85, 0xce, 0xe2, 0x46, 0xb3, 0xff, 0xe8, 0xd6, 0x09, 0x9c, 0x95, 0xc2, - 0xb5, 0xb1, 0xab, 0xf4, 0x34, 0xb7, 0xe9, 0x86, 0x53, 0xed, 0xab, 0x58, 0xd6, 0x11, 0x32, 0x13, - 0xc6, 0x21, 0x92, 0x14, 0x8e, 0x8b, 0xfe, 0xc9, 0x4d, 0x9b, 0x1c, 0x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0x2a, 0x0a, 0x9a, 0xe3, 0xdd, 0xcf, 0x68, 0x6d, 0x6e, 0x48, 0x96, 0x8b, 0x90, 0x1b, 0x47, 0x5e, - 0x20, 0x83, 0x38, 0xca, 0xa5, 0xb3, 0x07, 0x78, 0x4d, 0xf4, 0xad, 0x89, 0xae, 0xba, 0x1d, 0x25, - 0x24, 0xe8, 0x94, 0xad, 0xb3, 0x7d, 0x72, 0x61, 0xd7, 0x4e, 0x2f, 0xec, 0xda, 0xd9, 0x85, 0x5d, - 0xfb, 0x9a, 0xd9, 0xc6, 0x49, 0x66, 0x1b, 0xa7, 0x99, 0x6d, 0x9c, 0x65, 0xb6, 0xf1, 0x27, 0xb3, - 0x8d, 0x6f, 0x7f, 0xed, 0xda, 0x3b, 0xfb, 0xfa, 0xff, 0xcf, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x29, 0x82, 0x11, 0x57, 0xb9, 0x06, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/networking/v1alpha1/generated.proto", fileDescriptor_c1cb39e7b48ce50d) +} + +var fileDescriptor_c1cb39e7b48ce50d = []byte{ + // 634 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x4a, + 0x18, 0x8d, 0xdb, 0xa4, 0xaa, 0x27, 0xb7, 0xb7, 0xb7, 0x5e, 0x45, 0x5d, 0x38, 0x91, 0xef, 0xa6, + 0x08, 0x3a, 0x26, 0x11, 0x42, 0x6c, 0x71, 0x2b, 0xa1, 0x4a, 0xd0, 0x96, 0xe9, 0x0a, 0xd4, 0x05, + 0xd3, 0xc9, 0x57, 0x67, 0x08, 0xfe, 0xd1, 0xcc, 0x24, 0xc0, 0x8e, 0x47, 0xe0, 0x05, 0x78, 0x0e, + 0x56, 0x20, 0xb1, 0xeb, 0xb2, 0xcb, 0xae, 0x2a, 0x6a, 0x5e, 0x04, 0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 0xfe, 0x06, 0x00, 0x00, + 0xff, 0xff, 0xb1, 0xd0, 0x33, 0x02, 0xa0, 0x06, 0x00, 0x00, } func (m *IPAddress) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/generated.proto b/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/generated.proto index fb7971745d4..8914fffcf87 100644 --- a/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/generated.proto @@ -121,6 +121,7 @@ message ServiceCIDRSpec { // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. // This field is immutable. // +optional + // +listType=atomic repeated string cidrs = 1; } diff --git a/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/types.go b/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/types.go index 9d56ca193e6..bcdc33b4599 100644 --- a/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/networking/v1alpha1/types.go @@ -111,6 +111,7 @@ type ServiceCIDRSpec struct { // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. // This field is immutable. // +optional + // +listType=atomic CIDRs []string `json:"cidrs,omitempty" protobuf:"bytes,1,opt,name=cidrs"` } diff --git a/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/generated.pb.go index 6f298cd7811..13d4f53855c 100644 --- a/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/networking/v1beta1/generated.proto +// source: k8s.io/api/networking/v1beta1/generated.proto package v1beta1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } func (*HTTPIngressPath) ProtoMessage() {} func (*HTTPIngressPath) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{0} + return fileDescriptor_9497719c79c89d2d, []int{0} } func (m *HTTPIngressPath) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_HTTPIngressPath proto.InternalMessageInfo func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } func (*HTTPIngressRuleValue) ProtoMessage() {} func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{1} + return fileDescriptor_9497719c79c89d2d, []int{1} } func (m *HTTPIngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -104,7 +104,7 @@ var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo func (m *Ingress) Reset() { *m = Ingress{} } func (*Ingress) ProtoMessage() {} func (*Ingress) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{2} + return fileDescriptor_9497719c79c89d2d, []int{2} } func (m *Ingress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +132,7 @@ var xxx_messageInfo_Ingress proto.InternalMessageInfo func (m *IngressBackend) Reset() { *m = IngressBackend{} } func (*IngressBackend) ProtoMessage() {} func (*IngressBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{3} + return fileDescriptor_9497719c79c89d2d, []int{3} } func (m *IngressBackend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -160,7 +160,7 @@ var xxx_messageInfo_IngressBackend proto.InternalMessageInfo func (m *IngressClass) Reset() { *m = IngressClass{} } func (*IngressClass) ProtoMessage() {} func (*IngressClass) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{4} + return fileDescriptor_9497719c79c89d2d, []int{4} } func (m *IngressClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -188,7 +188,7 @@ var xxx_messageInfo_IngressClass proto.InternalMessageInfo func (m *IngressClassList) Reset() { *m = IngressClassList{} } func (*IngressClassList) ProtoMessage() {} func (*IngressClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{5} + return fileDescriptor_9497719c79c89d2d, []int{5} } func (m *IngressClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -216,7 +216,7 @@ var xxx_messageInfo_IngressClassList proto.InternalMessageInfo func (m *IngressClassParametersReference) Reset() { *m = IngressClassParametersReference{} } func (*IngressClassParametersReference) ProtoMessage() {} func (*IngressClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{6} + return fileDescriptor_9497719c79c89d2d, []int{6} } func (m *IngressClassParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -244,7 +244,7 @@ var xxx_messageInfo_IngressClassParametersReference proto.InternalMessageInfo func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } func (*IngressClassSpec) ProtoMessage() {} func (*IngressClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{7} + return fileDescriptor_9497719c79c89d2d, []int{7} } func (m *IngressClassSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,7 +272,7 @@ var xxx_messageInfo_IngressClassSpec proto.InternalMessageInfo func (m *IngressList) Reset() { *m = IngressList{} } func (*IngressList) ProtoMessage() {} func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{8} + return fileDescriptor_9497719c79c89d2d, []int{8} } func (m *IngressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -300,7 +300,7 @@ var xxx_messageInfo_IngressList proto.InternalMessageInfo func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } func (*IngressLoadBalancerIngress) ProtoMessage() {} func (*IngressLoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{9} + return fileDescriptor_9497719c79c89d2d, []int{9} } func (m *IngressLoadBalancerIngress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -328,7 +328,7 @@ var xxx_messageInfo_IngressLoadBalancerIngress proto.InternalMessageInfo func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } func (*IngressLoadBalancerStatus) ProtoMessage() {} func (*IngressLoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{10} + return fileDescriptor_9497719c79c89d2d, []int{10} } func (m *IngressLoadBalancerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -356,7 +356,7 @@ var xxx_messageInfo_IngressLoadBalancerStatus proto.InternalMessageInfo func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } func (*IngressPortStatus) ProtoMessage() {} func (*IngressPortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{11} + return fileDescriptor_9497719c79c89d2d, []int{11} } func (m *IngressPortStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,7 +384,7 @@ var xxx_messageInfo_IngressPortStatus proto.InternalMessageInfo func (m *IngressRule) Reset() { *m = IngressRule{} } func (*IngressRule) ProtoMessage() {} func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{12} + return fileDescriptor_9497719c79c89d2d, []int{12} } func (m *IngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -412,7 +412,7 @@ var xxx_messageInfo_IngressRule proto.InternalMessageInfo func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } func (*IngressRuleValue) ProtoMessage() {} func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{13} + return fileDescriptor_9497719c79c89d2d, []int{13} } func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -440,7 +440,7 @@ var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo func (m *IngressSpec) Reset() { *m = IngressSpec{} } func (*IngressSpec) ProtoMessage() {} func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{14} + return fileDescriptor_9497719c79c89d2d, []int{14} } func (m *IngressSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -468,7 +468,7 @@ var xxx_messageInfo_IngressSpec proto.InternalMessageInfo func (m *IngressStatus) Reset() { *m = IngressStatus{} } func (*IngressStatus) ProtoMessage() {} func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{15} + return fileDescriptor_9497719c79c89d2d, []int{15} } func (m *IngressStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -496,7 +496,7 @@ var xxx_messageInfo_IngressStatus proto.InternalMessageInfo func (m *IngressTLS) Reset() { *m = IngressTLS{} } func (*IngressTLS) ProtoMessage() {} func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{16} + return fileDescriptor_9497719c79c89d2d, []int{16} } func (m *IngressTLS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -542,89 +542,89 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/networking/v1beta1/generated.proto", fileDescriptor_5bea11de0ceb8f53) -} - -var fileDescriptor_5bea11de0ceb8f53 = []byte{ - // 1247 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcb, 0x6f, 0x1b, 0x45, - 0x18, 0xcf, 0xda, 0x71, 0xe3, 0x8c, 0xd3, 0x36, 0x0c, 0x3d, 0x98, 0xa0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xb0, 0xcc, 0x1f, 0x4b, 0x68, 0x45, 0x4b, 0xe1, 0xaf, 0x50, - 0x15, 0xea, 0xde, 0xa3, 0x92, 0xaa, 0x74, 0xd5, 0x76, 0xee, 0x16, 0x6c, 0x64, 0x65, 0xb0, 0xa2, - 0x61, 0x1f, 0x08, 0xc2, 0x02, 0x69, 0xeb, 0x64, 0xdb, 0x3a, 0xee, 0x7e, 0xcd, 0x5c, 0xf9, 0x11, - 0x93, 0xd4, 0xc1, 0xda, 0x0a, 0xca, 0x69, 0x24, 0x43, 0xc5, 0x87, 0x68, 0x59, 0x44, 0xcc, 0xd5, - 0x19, 0x7b, 0x63, 0xb1, 0x8c, 0xb5, 0x23, 0xe6, 0xe6, 0x85, 0x83, 0x2f, 0xa2, 0x50, 0x70, 0x07, - 0x5d, 0x11, 0x92, 0xca, 0x58, 0xa8, 0xb2, 0xd5, 0x76, 0x6e, 0x2f, 0x88, 0xa7, 0x74, 0x9c, 0x6b, - 0x1a, 0xf1, 0x4a, 0xf2, 0x4d, 0x34, 0x96, 0xf9, 0x43, 0x09, 0x5d, 0x9b, 0xac, 0x15, 0x7e, 0x13, - 0xd5, 0x04, 0xe3, 0x27, 0x9e, 0xcb, 0x8e, 0xe8, 0x88, 0xe9, 0x56, 0x7a, 0x59, 0xeb, 0xd7, 0xda, - 0x39, 0x8b, 0x14, 0xe5, 0x70, 0x3f, 0x53, 0x6b, 0x85, 0x5c, 0xea, 0xa0, 0x2f, 0x4e, 0x29, 0x74, - 0xb6, 0x95, 0x74, 0xb6, 0xb5, 0x1f, 0xc8, 0x63, 0xde, 0x96, 0xdc, 0x0b, 0xfa, 0x33, 0x86, 0x00, - 0x8c, 0x14, 0x91, 0xf1, 0x67, 0xa8, 0xca, 0x99, 0x08, 0x63, 0xee, 0x32, 0x9d, 0x8a, 0x89, 0x66, - 0x84, 0x15, 0x00, 0x65, 0x82, 0xbe, 0xed, 0x1d, 0x86, 0x2e, 0xf5, 0x93, 0xe2, 0x10, 0xf6, 0x90, - 0x71, 0x16, 0xb8, 0xcc, 0x59, 0x83, 0x86, 0x27, 0x1a, 0x82, 0x64, 0x60, 0x30, 0x50, 0x6b, 0x3a, - 0x17, 0xbb, 0x3e, 0x7d, 0x21, 0x2d, 0xf2, 0xf1, 0x44, 0x8b, 0xd8, 0x8b, 0x95, 0x54, 0x39, 0x77, - 0x51, 0x9f, 0x98, 0x7f, 0x1a, 0x68, 0xbd, 0x28, 0x78, 0xe8, 0x09, 0x89, 0xbf, 0x9c, 0x89, 0xc4, - 0x5a, 0x2c, 0x12, 0xd0, 0x56, 0x71, 0xac, 0x6b, 0x53, 0xd5, 0x94, 0x52, 0x88, 0xa2, 0x85, 0x2a, - 0x9e, 0x64, 0x23, 0x51, 0x2f, 0xa9, 0x59, 0xbd, 0x75, 0x89, 0x30, 0xf2, 0x41, 0xdd, 0x07, 0x04, - 0x92, 0x00, 0x99, 0x7f, 0x1b, 0xa8, 0x59, 0x14, 0x6b, 0x51, 0x4e, 0x47, 0x4c, 0x32, 0x2e, 0xb2, - 0x32, 0xe2, 0x2d, 0x54, 0xa5, 0xad, 0xfd, 0x0f, 0x79, 0x18, 0x47, 0xe9, 0xbe, 0x03, 0xff, 0xde, - 0xd3, 0x34, 0x92, 0x71, 0x61, 0x2b, 0x0e, 0x3d, 0xbd, 0xba, 0x0a, 0x5b, 0xf1, 0xc0, 0x0b, 0x7a, - 0x44, 0x71, 0x40, 0x22, 0x80, 0x66, 0x2f, 0x4f, 0x4a, 0xa8, 0x2e, 0x57, 0x1c, 0xdc, 0x44, 0x15, - 0xe1, 0x86, 0x11, 0xab, 0x2f, 0x2b, 0x91, 0x55, 0x70, 0xb9, 0x0d, 0x04, 0x92, 0xd0, 0xf1, 0x2d, - 0xb4, 0x0a, 0x82, 0x22, 0xa2, 0x2e, 0xab, 0x57, 0x94, 0xd0, 0xd5, 0xf1, 0x59, 0x73, 0xf5, 0x28, - 0x25, 0x92, 0x9c, 0x6f, 0xfe, 0x3a, 0x55, 0x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be, 0x04, 0x49, 0x70, 0xcc, 0xef, 0x0d, 0x74, 0x75, 0xe2, 0xa2, 0xc2, 0x1c, 0xad, - 0xf9, 0x85, 0xd9, 0xd1, 0x79, 0x78, 0x70, 0xf9, 0xa9, 0xd3, 0x43, 0x7f, 0x43, 0xdb, 0x5d, 0x2b, - 0xf2, 0xc8, 0x84, 0x0d, 0x93, 0x22, 0x94, 0x87, 0x0d, 0x73, 0x00, 0xcd, 0x9b, 0x0c, 0xbc, 0x9e, - 0x03, 0xe8, 0x69, 0x41, 0x12, 0x3a, 0x3c, 0x28, 0x82, 0xb9, 0x9c, 0xc9, 0xa3, 0x7c, 0x71, 0x65, - 0x0f, 0x4a, 0x3b, 0xe3, 0x90, 0x82, 0x94, 0xb3, 0x7b, 0x7a, 0xde, 0x58, 0x7a, 0x7c, 0xde, 0x58, - 0x7a, 0x72, 0xde, 0x58, 0xfa, 0x76, 0xdc, 0x30, 0x4e, 0xc7, 0x0d, 0xe3, 0xf1, 0xb8, 0x61, 0x3c, - 0x19, 0x37, 0x8c, 0x7f, 0xc6, 0x0d, 0xe3, 0xa7, 0x7f, 0x1b, 0x4b, 0x5f, 0xdc, 0x7c, 0xe6, 0x3f, - 0x7c, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x08, 0x04, 0x22, 0x31, 0x29, 0x0e, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/networking/v1beta1/generated.proto", fileDescriptor_9497719c79c89d2d) +} + +var fileDescriptor_9497719c79c89d2d = []byte{ + // 1234 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0x1b, 0xc5, + 0x1b, 0xcf, 0xda, 0x71, 0xe3, 0x8c, 0xd3, 0x34, 0xff, 0xf9, 0xe7, 0x60, 0x82, 0x6a, 0x47, 0x7b, + 0x40, 0x81, 0x36, 0xbb, 0x4d, 0x5a, 0x50, 0x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xd1, 0xa0, 0x07, 0x04, 0x61, 0x81, 0xb4, 0x75, 0xb6, 0x63, 0x9d, 0x9c, 0x7e, 0xc5, + 0x5c, 0xf9, 0x21, 0x93, 0xd4, 0xc1, 0xda, 0x0a, 0xca, 0x69, 0x24, 0x43, 0xc5, 0x47, 0x68, 0x51, + 0x44, 0xcc, 0xd5, 0x19, 0x7b, 0x63, 0xbe, 0x8c, 0xb5, 0x23, 0xe6, 0xe6, 0x85, 0x83, 0x2f, 0xa2, + 0x50, 0x70, 0x07, 0xdd, 0x10, 0x92, 0xca, 0x58, 0xa8, 0xb2, 0xd5, 0x76, 0xef, 0xce, 0x89, 0xa7, + 0x74, 0x9c, 0x55, 0x8d, 0x78, 0x23, 0xf9, 0x26, 0x1a, 0xcb, 0xfc, 0xbe, 0x84, 0x56, 0xc7, 0x6b, + 0x85, 0xdf, 0x44, 0x35, 0xc1, 0xf8, 0x99, 0xe7, 0xb2, 0x63, 0x3a, 0x64, 0xba, 0x95, 0xfe, 0xaf, + 0xf5, 0x6b, 0xed, 0x9c, 0x45, 0x8a, 0x72, 0xb8, 0x97, 0xa9, 0xb5, 0x42, 0x2e, 0x75, 0xd0, 0x57, + 0xa7, 0x14, 0x3a, 0xdb, 0x4a, 0x3a, 0xdb, 0x3a, 0x08, 0xe4, 0x09, 0x6f, 0x4b, 0xee, 0x05, 0xbd, + 0x29, 0x43, 0x00, 0x46, 0x8a, 0xc8, 0xf8, 0x53, 0x54, 0xe5, 0x4c, 0x84, 0x31, 0x77, 0x99, 0x4e, + 0xc5, 0x58, 0x33, 0xc2, 0x0a, 0x80, 0x32, 0x41, 0xdf, 0x76, 0x8f, 0x42, 0x97, 0xfa, 0x49, 0x71, + 0x08, 0x7b, 0xc4, 0x38, 0x0b, 0x5c, 0xe6, 0xac, 0x40, 0xc3, 0x13, 0x0d, 0x41, 0x32, 0x30, 0x18, + 0xa8, 0x15, 0x9d, 0x8b, 0x3d, 0x9f, 0xbe, 0x94, 0x16, 0xf9, 0x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, 0xd0, 0xaf, 0x6b, + 0xbb, 0x2b, 0x45, 0x1e, 0x19, 0xb3, 0x61, 0x52, 0x84, 0xf2, 0xb0, 0x61, 0x0e, 0xa0, 0x79, 0x93, + 0x81, 0xd7, 0x73, 0x00, 0x3d, 0x2d, 0x48, 0x42, 0x87, 0x07, 0x45, 0x30, 0x97, 0x33, 0x79, 0x9c, + 0x2f, 0xae, 0xec, 0x41, 0x69, 0x67, 0x1c, 0x52, 0x90, 0x72, 0xf6, 0xce, 0x2f, 0x1b, 0x0b, 0x4f, + 0x2e, 0x1b, 0x0b, 0x4f, 0x2f, 0x1b, 0x0b, 0xdf, 0x8c, 0x1a, 0xc6, 0xf9, 0xa8, 0x61, 0x3c, 0x19, + 0x35, 0x8c, 0xa7, 0xa3, 0x86, 0xf1, 0xf7, 0xa8, 0x61, 0xfc, 0xf8, 0x4f, 0x63, 0xe1, 0xf3, 0xdb, + 0xcf, 0xfd, 0x87, 0xef, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0xf6, 0xe9, 0x27, 0x10, 0x0e, + 0x00, 0x00, } func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/generated.proto b/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/generated.proto index 46bb7f66f22..f36df9ec194 100644 --- a/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/generated.proto @@ -69,6 +69,7 @@ message HTTPIngressPath { // or '#'. message HTTPIngressRuleValue { // paths is a collection of paths that map requests to backends. + // +listType=atomic repeated HTTPIngressPath paths = 1; } @@ -211,6 +212,7 @@ message IngressLoadBalancerIngress { message IngressLoadBalancerStatus { // ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic repeated IngressLoadBalancerIngress ingress = 1; } @@ -313,11 +315,13 @@ message IngressSpec { // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. // +optional + // +listType=atomic repeated IngressTLS tls = 2; // rules is 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 + // +listType=atomic repeated IngressRule rules = 3; } @@ -335,6 +339,7 @@ message IngressTLS { // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. // +optional + // +listType=atomic repeated string hosts = 1; // secretName is the name of the secret used to terminate TLS traffic on diff --git a/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/types.go b/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/types.go index 87cc91654b8..34dfe76aa3e 100644 --- a/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/networking/v1beta1/types.go @@ -97,11 +97,13 @@ type IngressSpec struct { // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. // +optional + // +listType=atomic TLS []IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"` // rules is 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 + // +listType=atomic Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // TODO: Add the ability to specify load-balancer IP through claims } @@ -113,6 +115,7 @@ type IngressTLS struct { // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. // +optional + // +listType=atomic Hosts []string `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"` // secretName is the name of the secret used to terminate TLS traffic on @@ -136,6 +139,7 @@ type IngressStatus struct { type IngressLoadBalancerStatus struct { // ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic Ingress []IngressLoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` } @@ -239,6 +243,7 @@ type IngressRuleValue struct { // or '#'. type HTTPIngressRuleValue struct { // paths is a collection of paths that map requests to backends. + // +listType=atomic 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. diff --git a/pkg/k8s/vendor/k8s.io/api/node/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/node/v1/generated.pb.go index 5355cbae7d1..4c304f55f9c 100644 --- a/pkg/k8s/vendor/k8s.io/api/node/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/node/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/node/v1/generated.proto +// source: k8s.io/api/node/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Overhead) Reset() { *m = Overhead{} } func (*Overhead) ProtoMessage() {} func (*Overhead) Descriptor() ([]byte, []int) { - return fileDescriptor_6ac9be560e26ae98, []int{0} + return fileDescriptor_9007436710e7565b, []int{0} } func (m *Overhead) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_Overhead proto.InternalMessageInfo func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } func (*RuntimeClass) ProtoMessage() {} func (*RuntimeClass) Descriptor() ([]byte, []int) { - return fileDescriptor_6ac9be560e26ae98, []int{1} + return fileDescriptor_9007436710e7565b, []int{1} } func (m *RuntimeClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_RuntimeClass proto.InternalMessageInfo func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } func (*RuntimeClassList) ProtoMessage() {} func (*RuntimeClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_6ac9be560e26ae98, []int{2} + return fileDescriptor_9007436710e7565b, []int{2} } func (m *RuntimeClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_RuntimeClassList proto.InternalMessageInfo func (m *Scheduling) Reset() { *m = Scheduling{} } func (*Scheduling) ProtoMessage() {} func (*Scheduling) Descriptor() ([]byte, []int) { - return fileDescriptor_6ac9be560e26ae98, []int{3} + return fileDescriptor_9007436710e7565b, []int{3} } func (m *Scheduling) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,53 +170,52 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/node/v1/generated.proto", fileDescriptor_6ac9be560e26ae98) + proto.RegisterFile("k8s.io/api/node/v1/generated.proto", fileDescriptor_9007436710e7565b) } -var fileDescriptor_6ac9be560e26ae98 = []byte{ - // 660 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x6f, 0xd3, 0x4a, - 0x10, 0xce, 0xa6, 0xaf, 0x6a, 0xba, 0x49, 0xdf, 0xeb, 0x5b, 0x7a, 0x88, 0x22, 0xe4, 0x44, 0x39, - 0x15, 0xa4, 0xae, 0xdb, 0x0a, 0xa1, 0x0a, 0x0e, 0x48, 0x86, 0x56, 0x20, 0x41, 0x01, 0x17, 0x2e, - 0x88, 0x03, 0x1b, 0x7b, 0x70, 0xdc, 0xc4, 0xde, 0x68, 0xbd, 0x8e, 0xc8, 0x0d, 0x71, 0x41, 0xe2, - 0xd4, 0xff, 0xc2, 0x81, 0xbf, 0x50, 0x71, 0xea, 0xb1, 0xa7, 0x96, 0x86, 0x7f, 0xc1, 0x09, 0xed, - 0xda, 0x4e, 0x5c, 0x1c, 0x42, 0xb9, 0x79, 0x67, 0xbf, 0xef, 0x9b, 0x99, 0x6f, 0x76, 0x8c, 0xef, - 0xf6, 0x76, 0x22, 0xea, 0x73, 0xb3, 0x17, 0x77, 0x40, 0x84, 0x20, 0x21, 0x32, 0x87, 0x10, 0xba, - 0x5c, 0x98, 0xe9, 0x05, 0x1b, 0xf8, 0x66, 0xc8, 0x5d, 0x30, 0x87, 0x5b, 0x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xa3, 0x57, 0x73, 0x4e, 0xb1, 0xb5, 0x6f, 0xab, - 0xd9, 0x63, 0xcc, 0x22, 0x39, 0xd7, 0x76, 0xf1, 0xa2, 0x2f, 0x21, 0x88, 0xea, 0x65, 0xfd, 0xc8, - 0x5b, 0xb3, 0xaa, 0xcf, 0x97, 0x64, 0xad, 0xa4, 0x62, 0x8b, 0x8f, 0x14, 0xcd, 0x4e, 0xd8, 0xed, - 0xa3, 0x32, 0xce, 0x35, 0x45, 0x0e, 0x71, 0x4d, 0x91, 0x0f, 0xa0, 0x0f, 0x8e, 0xe4, 0x22, 0xdd, - 0xa0, 0xcd, 0xf9, 0xd6, 0xd0, 0xfd, 0x1c, 0x25, 0xd9, 0xa3, 0xb5, 0x34, 0x59, 0x2d, 0x7f, 0x65, - 0x5f, 0xd2, 0x26, 0x2f, 0x71, 0x55, 0xf2, 0xbe, 0x5a, 0x65, 0x9f, 0x87, 0x59, 0x1f, 0x97, 0xa6, - 0xa0, 0x36, 0x49, 0xa5, 0x7a, 0x31, 0x81, 0x59, 0xd7, 0x52, 0xe1, 0xea, 0x34, 0x16, 0xd9, 0x79, - 0x9d, 0xc6, 0x3d, 0xfc, 0x7f, 0xa1, 0x9e, 0x19, 0x2b, 0xb3, 0x96, 0x5f, 0x99, 0xe5, 0xdc, 0x0a, - 0x58, 0x3b, 0xc7, 0x17, 0x46, 0xe9, 0xe4, 0xc2, 0x28, 0x9d, 0x5e, 0x18, 0xa5, 0xf7, 0x63, 0x03, - 0x1d, 0x8f, 0x0d, 0x74, 0x32, 0x36, 0xd0, 0xe9, 0xd8, 0x40, 0xdf, 0xc6, 0x06, 0x3a, 0xfa, 0x6e, - 0x94, 0x5e, 0x91, 0xe2, 0x5f, 0xfd, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x46, 0x77, 0x65, 0x3b, - 0x03, 0x06, 0x00, 0x00, +var fileDescriptor_9007436710e7565b = []byte{ + // 643 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8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8, 0x15, 0xac, 0x0b, 0x3e, 0x90, 0xab, 0xcc, 0x78, 0x90, 0xf7, 0x31, 0x35, + 0x05, 0xb9, 0x49, 0x32, 0xd5, 0xcb, 0x02, 0x66, 0xdd, 0xc8, 0x84, 0xeb, 0x93, 0x58, 0x64, 0xeb, + 0x3a, 0xad, 0xfb, 0xf0, 0x7a, 0xa9, 0x9e, 0x19, 0x2b, 0xb3, 0xa6, 0xaf, 0xcc, 0xb2, 0xb6, 0x02, + 0xd6, 0xce, 0xc9, 0xa5, 0x51, 0x39, 0xbd, 0x34, 0x2a, 0x67, 0x97, 0x46, 0xe5, 0x43, 0x62, 0x80, + 0x93, 0xc4, 0x00, 0xa7, 0x89, 0x01, 0xce, 0x12, 0x03, 0x7c, 0x4f, 0x0c, 0x70, 0xfc, 0xc3, 0xa8, + 0xbc, 0x46, 0xe5, 0xbf, 0xfa, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x3f, 0x9c, 0xd0, 0xea, + 0x05, 0x00, 0x00, } func (m *Overhead) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/node/v1alpha1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/node/v1alpha1/generated.pb.go index 9f876d4b44d..16ac696433f 100644 --- a/pkg/k8s/vendor/k8s.io/api/node/v1alpha1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/node/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/node/v1alpha1/generated.proto +// source: k8s.io/api/node/v1alpha1/generated.proto package v1alpha1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Overhead) Reset() { *m = Overhead{} } func (*Overhead) ProtoMessage() {} func (*Overhead) Descriptor() ([]byte, []int) { - return fileDescriptor_82a78945ab308218, []int{0} + return fileDescriptor_a8fee97bf5273e47, []int{0} } func (m *Overhead) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_Overhead proto.InternalMessageInfo func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } func (*RuntimeClass) ProtoMessage() {} func (*RuntimeClass) Descriptor() ([]byte, []int) { - return fileDescriptor_82a78945ab308218, []int{1} + return fileDescriptor_a8fee97bf5273e47, []int{1} } func (m *RuntimeClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_RuntimeClass proto.InternalMessageInfo func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } func (*RuntimeClassList) ProtoMessage() {} func (*RuntimeClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_82a78945ab308218, []int{2} + return fileDescriptor_a8fee97bf5273e47, []int{2} } func (m *RuntimeClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_RuntimeClassList proto.InternalMessageInfo func (m *RuntimeClassSpec) Reset() { *m = RuntimeClassSpec{} } func (*RuntimeClassSpec) ProtoMessage() {} func (*RuntimeClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_82a78945ab308218, []int{3} + return fileDescriptor_a8fee97bf5273e47, []int{3} } func (m *RuntimeClassSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_RuntimeClassSpec proto.InternalMessageInfo func (m *Scheduling) Reset() { *m = Scheduling{} } func (*Scheduling) ProtoMessage() {} func (*Scheduling) Descriptor() ([]byte, []int) { - return fileDescriptor_82a78945ab308218, []int{4} + return fileDescriptor_a8fee97bf5273e47, []int{4} } func (m *Scheduling) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -199,55 +199,54 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/node/v1alpha1/generated.proto", fileDescriptor_82a78945ab308218) + proto.RegisterFile("k8s.io/api/node/v1alpha1/generated.proto", fileDescriptor_a8fee97bf5273e47) } -var fileDescriptor_82a78945ab308218 = []byte{ - // 699 bytes of a gzipped FileDescriptorProto +var fileDescriptor_a8fee97bf5273e47 = []byte{ + // 683 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x3d, 0x6f, 0xd3, 0x4c, - 0x1c, 0xcf, 0xa5, 0xad, 0x94, 0x5e, 0xd2, 0xaa, 0x8f, 0x9f, 0xea, 0x51, 0x94, 0xc1, 0xa9, 0xac, - 0x47, 0xa8, 0x42, 0xea, 0x99, 0x56, 0xa8, 0xaa, 0x18, 0x8a, 0x30, 0x2f, 0x02, 0x51, 0x5a, 0x70, - 0xcb, 0x82, 0x18, 0xb8, 0xd8, 0x7f, 0x1c, 0x13, 0xdb, 0x67, 0xd9, 0xe7, 0x88, 0x6c, 0x88, 0x05, - 0x89, 0x89, 0x89, 0x6f, 0x03, 0x73, 0xc7, 0x4e, 0xa8, 0x53, 0x4b, 0xc3, 0x77, 0x60, 0x60, 0x42, - 0x67, 0x9f, 0x13, 0x27, 0x69, 0x68, 0xd8, 0x7c, 0x77, 0xbf, 0x97, 0xff, 0x6b, 0x82, 0xef, 0x74, - 0x76, 0x62, 0xe2, 0x32, 0xbd, 0x93, 0xb4, 0x20, 0x0a, 0x80, 0x43, 0xac, 0x77, 0x21, 0xb0, 0x59, - 0xa4, 0xcb, 0x07, 0x1a, 0xba, 0x7a, 0xc0, 0x6c, 0xd0, 0xbb, 0x9b, 0xd4, 0x0b, 0xdb, 0x74, 0x53, - 0x77, 0x20, 0x80, 0x88, 0x72, 0xb0, 0x49, 0x18, 0x31, 0xce, 0x94, 0x7a, 0x86, 0x24, 0x34, 0x74, - 0x89, 0x40, 0x92, 0x1c, 0xd9, 0xd8, 0x70, 0x5c, 0xde, 0x4e, 0x5a, 0xc4, 0x62, 0xbe,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5e, 0xd2, 0xaa, 0x8f, 0x9f, 0x0a, 0x45, 0x19, 0x9c, 0xca, 0x42, + 0x28, 0x42, 0xea, 0x99, 0x56, 0xa8, 0xaa, 0x18, 0x8a, 0x64, 0x5e, 0x04, 0xa2, 0xb4, 0x70, 0x2d, + 0x0b, 0x62, 0xe0, 0x6a, 0x1f, 0x8e, 0x89, 0xed, 0xb3, 0xec, 0x73, 0x44, 0x36, 0xc4, 0x82, 0xc4, + 0xc4, 0xc4, 0xb7, 0x81, 0xb9, 0x63, 0x27, 0xd4, 0xa9, 0xa5, 0xe1, 0x3b, 0x30, 0x30, 0xa1, 0xb3, + 0xcf, 0xc9, 0x25, 0x69, 0x68, 0xd8, 0x7c, 0x77, 0xbf, 0x97, 0xff, 0x6b, 0x02, 0x5b, 0x9d, 0xed, + 0x04, 0x79, 0xcc, 0x24, 0x91, 0x67, 0x86, 0xcc, 0xa1, 0x66, 0x77, 0x83, 0xf8, 0x51, 0x9b, 0x6c, + 0x98, 0x2e, 0x0d, 0x69, 0x4c, 0x38, 0x75, 0x50, 0x14, 0x33, 0xce, 0xb4, 0x7a, 0x8e, 0x44, 0x24, + 0xf2, 0x90, 0x40, 0xa2, 0x02, 0xd9, 0x58, 0x77, 0x3d, 0xde, 0x4e, 0x8f, 0x90, 0xcd, 0x02, 0xd3, + 0x65, 0x2e, 0x33, 0x33, 0xc2, 0x51, 0xfa, 0x26, 0x3b, 0x65, 0x87, 0xec, 0x2b, 0x17, 0x6a, 0x18, + 0x8a, 0xa5, 0xcd, 0x62, 0x61, 0x39, 0x6e, 0xd6, 0xb8, 0x3d, 0xc4, 0x04, 0xc4, 0x6e, 0x7b, 0x21, + 0x8d, 0x7b, 0x66, 0xd4, 0x71, 0x33, 0x52, 0x4c, 0x13, 0x96, 0xc6, 0x36, 0xfd, 0x27, 0x56, 0x62, + 0x06, 0x94, 0x93, 0xcb, 0xbc, 0xcc, 0x69, 0xac, 0x38, 0x0d, 0xb9, 0x17, 0x4c, 0xda, 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xcc, 0xf7, 0x7a, + 0x55, 0x16, 0xaa, 0xa6, 0x3e, 0xe1, 0x11, 0x07, 0xed, 0x05, 0xac, 0x72, 0xe6, 0x8b, 0x1f, 0x18, + 0x8f, 0x85, 0x45, 0x33, 0x75, 0xd5, 0x50, 0x6c, 0xb6, 0x98, 0x8a, 0xc3, 0x01, 0xcc, 0xfa, 0x5f, + 0x0a, 0x57, 0x87, 0x77, 0x09, 0x56, 0x75, 0x1a, 0x77, 0xe1, 0x7f, 0x13, 0xf1, 0x5c, 0xb2, 0xc2, + 0xab, 0xea, 0x0a, 0x2f, 0x2a, 0x2b, 0x69, 0xed, 0x1c, 0x5f, 0xe8, 0xa5, 0x93, 0x0b, 0xbd, 0x74, + 0x7a, 0xa1, 0x97, 0xde, 0xf7, 0x75, 0x70, 0xdc, 0xd7, 0xc1, 0x49, 0x5f, 0x07, 0xa7, 0x7d, 0x1d, + 0xfc, 0xe8, 0xeb, 0xe0, 0xf3, 0x4f, 0xbd, 0xf4, 0xb2, 0x3e, 0xed, 0x7f, 0xe7, 0x4f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xa7, 0x9b, 0x7f, 0x45, 0x92, 0x06, 0x00, 0x00, } func (m *Overhead) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/node/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/node/v1beta1/generated.pb.go index 8cd5a4cc359..537961c259a 100644 --- a/pkg/k8s/vendor/k8s.io/api/node/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/node/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/node/v1beta1/generated.proto +// source: k8s.io/api/node/v1beta1/generated.proto package v1beta1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Overhead) Reset() { *m = Overhead{} } func (*Overhead) ProtoMessage() {} func (*Overhead) Descriptor() ([]byte, []int) { - return fileDescriptor_f977b0dddc93b4ec, []int{0} + return fileDescriptor_73bb62abe8438af4, []int{0} } func (m *Overhead) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_Overhead proto.InternalMessageInfo func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } func (*RuntimeClass) ProtoMessage() {} func (*RuntimeClass) Descriptor() ([]byte, []int) { - return fileDescriptor_f977b0dddc93b4ec, []int{1} + return fileDescriptor_73bb62abe8438af4, []int{1} } func (m *RuntimeClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_RuntimeClass proto.InternalMessageInfo func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } func (*RuntimeClassList) ProtoMessage() {} func (*RuntimeClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_f977b0dddc93b4ec, []int{2} + return fileDescriptor_73bb62abe8438af4, []int{2} } func (m *RuntimeClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_RuntimeClassList proto.InternalMessageInfo func (m *Scheduling) Reset() { *m = Scheduling{} } func (*Scheduling) ProtoMessage() {} func (*Scheduling) Descriptor() ([]byte, []int) { - return fileDescriptor_f977b0dddc93b4ec, []int{3} + return fileDescriptor_73bb62abe8438af4, []int{3} } func (m *Scheduling) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,53 +170,52 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/node/v1beta1/generated.proto", fileDescriptor_f977b0dddc93b4ec) + proto.RegisterFile("k8s.io/api/node/v1beta1/generated.proto", fileDescriptor_73bb62abe8438af4) } -var fileDescriptor_f977b0dddc93b4ec = []byte{ - // 668 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbb, 0x6f, 0xd3, 0x40, - 0x18, 0xcf, 0xa5, 0x54, 0x4d, 0x2f, 0x29, 0x14, 0x53, 0xa9, 0x51, 0x06, 0xa7, 0x04, 0x21, 0x95, - 0xa1, 0x67, 0x5a, 0x01, 0xaa, 0x90, 0x10, 0xc8, 0x3c, 0xc4, 0xb3, 0x05, 0x17, 0x16, 0xc4, 0xc0, - 0xc5, 0xfe, 0x70, 0x4c, 0x62, 0x5f, 0x74, 0x3e, 0x47, 0x64, 0x43, 0x2c, 0x48, 0x4c, 0x2c, 0xfc, - 0x37, 0xb0, 0x77, 0xa3, 0x0b, 0x52, 0xa7, 0x96, 0x86, 0xff, 0x82, 0x09, 0x9d, 0x5f, 0xb9, 0x36, - 0x4d, 0x1b, 0x36, 0xdf, 0xdd, 0xef, 0x71, 0xdf, 0xef, 0xbb, 0xcf, 0xf8, 0x4e, 0x7b, 0x3d, 0x24, - 0x1e, 0x33, 0xda, 0x51, 0x13, 0x78, 0x00, 0x02, 0x42, 0xa3, 0x07, 0x81, 0xc3, 0xb8, 0x91, 0x1e, - 0xd0, 0xae, 0x67, 0x04, 0xcc, 0x01, 0xa3, 0xb7, 0xda, 0x04, 0x41, 0x57, 0x0d, 0x17, 0x02, 0xe0, - 0x54, 0x80, 0x43, 0xba, 0x9c, 0x09, 0xa6, 0x2d, 0x26, 0x40, 0x42, 0xbb, 0x1e, 0x91, 0x40, 0x92, - 0x02, 0x6b, 0x2b, 0xae, 0x27, 0x5a, 0x51, 0x93, 0xd8, 0xcc, 0x37, 0x5c, 0xe6, 0x32, 0x23, 0xc6, - 0x37, 0xa3, 0x77, 0xf1, 0x2a, 0x5e, 0xc4, 0x5f, 0x89, 0x4e, 0xad, 0xa1, 0x18, 0xda, 0x8c, 0x4b, - 0xc3, 0xa3, 0x5e, 0xb5, 0x6b, 0x43, 0x8c, 0x4f, 0xed, 0x96, 0x17, 0x00, 0xef, 0x1b, 0xdd, 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 0x5d, 0x9f, 0x20, 0x24, 0xb2, 0xa1, 0xf0, 0x92, - 0xd9, 0x5a, 0x48, 0x1d, 0x2b, 0xea, 0x91, 0x75, 0xc8, 0x40, 0x7b, 0x85, 0xcb, 0x82, 0x75, 0xe4, - 0x8c, 0x7b, 0x2c, 0xc8, 0x2a, 0xd2, 0x55, 0x3f, 0x39, 0x5d, 0x32, 0x9a, 0x97, 0x39, 0xcc, 0xbc, - 0x90, 0x0a, 0x97, 0x87, 0x7b, 0xa1, 0xa5, 0xea, 0xd4, 0x6e, 0xe3, 0xf3, 0x23, 0xf7, 0x39, 0x66, - 0x8c, 0x16, 0xd4, 0x31, 0x9a, 0x55, 0xc6, 0xc2, 0xbc, 0xb5, 0x7d, 0xa0, 0x17, 0x76, 0x0e, 0xf4, - 0xc2, 0xee, 0x81, 0x5e, 0xf8, 0x38, 0xd0, 0xd1, 0xf6, 0x40, 0x47, 0x3b, 0x03, 0x1d, 0xed, 0x0e, - 0x74, 0xf4, 0x7b, 0xa0, 0xa3, 0xaf, 0x7f, 0xf4, 0xc2, 0xeb, 0xc5, 0x31, 0x3f, 0xfe, 0x7f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x7a, 0xca, 0xe1, 0x7d, 0x2b, 0x06, 0x00, 0x00, +var fileDescriptor_73bb62abe8438af4 = []byte{ + // 654 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbb, 0x6f, 0x13, 0x31, + 0x18, 0x8f, 0x53, 0xaa, 0xa6, 0x4e, 0x0a, 0xc5, 0x54, 0x6a, 0x94, 0xe1, 0x52, 0x82, 0x10, 0x65, + 0xa8, 0x8f, 0x56, 0x80, 0x2a, 0x24, 0x84, 0x74, 0x3c, 0xc4, 0xb3, 0x85, 0x2b, 0x2c, 0x88, 0x01, + 0xe7, 0xce, 0x5c, 0x4c, 0x72, 0xe7, 0xe8, 0xce, 0x17, 0x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 0x6e, 0x6f, 0x1f, 0x18, 0x85, 0x9d, + 0x03, 0xa3, 0xb0, 0x7b, 0x60, 0x14, 0x3e, 0x0e, 0x0c, 0xb0, 0x3d, 0x30, 0xc0, 0xce, 0xc0, 0x00, + 0xbb, 0x03, 0x03, 0xfc, 0x1e, 0x18, 0xe0, 0xeb, 0x1f, 0xa3, 0xf0, 0x7a, 0x71, 0xcc, 0x1f, 0xff, + 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x67, 0x22, 0x03, 0x12, 0x06, 0x00, 0x00, } func (m *Overhead) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/policy/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/policy/v1/generated.pb.go index d7e467a9215..dd61b7266c4 100644 --- a/pkg/k8s/vendor/k8s.io/api/policy/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/policy/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/policy/v1/generated.proto +// source: k8s.io/api/policy/v1/generated.proto package v1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Eviction) Reset() { *m = Eviction{} } func (*Eviction) ProtoMessage() {} func (*Eviction) Descriptor() ([]byte, []int) { - return fileDescriptor_2d50488813b2d18e, []int{0} + return fileDescriptor_204bc6fa48ff56f7, []int{0} } func (m *Eviction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_Eviction proto.InternalMessageInfo func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } func (*PodDisruptionBudget) ProtoMessage() {} func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { - return fileDescriptor_2d50488813b2d18e, []int{1} + return fileDescriptor_204bc6fa48ff56f7, []int{1} } func (m *PodDisruptionBudget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_PodDisruptionBudget proto.InternalMessageInfo func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } func (*PodDisruptionBudgetList) ProtoMessage() {} func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { - return fileDescriptor_2d50488813b2d18e, []int{2} + return fileDescriptor_204bc6fa48ff56f7, []int{2} } func (m *PodDisruptionBudgetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_PodDisruptionBudgetList proto.InternalMessageInfo func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } func (*PodDisruptionBudgetSpec) ProtoMessage() {} func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2d50488813b2d18e, []int{3} + return fileDescriptor_204bc6fa48ff56f7, []int{3} } func (m *PodDisruptionBudgetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_PodDisruptionBudgetSpec proto.InternalMessageInfo func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (*PodDisruptionBudgetStatus) ProtoMessage() {} func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2d50488813b2d18e, []int{4} + return fileDescriptor_204bc6fa48ff56f7, []int{4} } func (m *PodDisruptionBudgetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -197,65 +197,64 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/policy/v1/generated.proto", fileDescriptor_2d50488813b2d18e) + proto.RegisterFile("k8s.io/api/policy/v1/generated.proto", fileDescriptor_204bc6fa48ff56f7) } -var fileDescriptor_2d50488813b2d18e = []byte{ - // 854 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00,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 0xa4, 0x06, - 0x69, 0xf9, 0xa0, 0x58, 0x49, 0xea, 0x96, 0xb5, 0x4e, 0x15, 0xc5, 0x81, 0xe2, 0x3e, 0xac, 0x08, - 0x3e, 0x7d, 0x9d, 0x40, 0x3a, 0x43, 0xf0, 0xd9, 0x8a, 0xee, 0xee, 0x3a, 0x5d, 0xac, 0xb8, 0x67, - 0xf1, 0x40, 0x49, 0x15, 0x5d, 0x15, 0x75, 0xfe, 0x34, 0xd0, 0xee, 0xc9, 0x98, 0x3b, 0x8a, 0x8b, - 0x00, 0xff, 0x80, 0x76, 0xd3, 0x2a, 0x5c, 0xa6, 0xd8, 0x81, 0x71, 0xcb, 0x38, 0xbc, 0x79, 0xe7, - 0x63, 0xb2, 0x68, 0xdc, 0x1c, 0x4a, 0xc2, 0xd1, 0x20, 0x35, 0x48, 0x92, 0x46, 0x93, 0xf1, 0x11, - 0xe9, 0xf5, 0x7f, 0x04, 0x47, 0x9d, 0x82, 0x62, 0x36, 0xbe, 0x98, 0xb6, 0x2b, 0xc9, 0xb4, 0x8d, - 0x16, 0x36, 0x3a, 0xa7, 0x62, 0x0f, 0x35, 0x5c, 0xf0, 0x40, 0x41, 0x2f, 0x4c, 0x33, 0xca, 0x83, - 0x2d, 0x9d, 0xe6, 0xee, 0x66, 0x69, 0xba, 0xcb, 0x52, 0xfb, 0xed, 0x64, 0xda, 0x6e, 0x14, 0x4c, - 0xb4, 0x08, 0xef, 0xfc, 0xba, 0x85, 0xde, 0x39, 0x13, 0x6e, 0x97, 0xcb, 0x28, 0xd6, 0x26, 0x3b, - 0x76, 0x07, 0xa0, 0xde, 0x40, 0x9d, 0x3d, 0xb4, 0x2d, 0x43, 0x70, 0xf2, 0xf2, 0x6e, 0x93, 0xb2, - 0xf5, 0x23, 0x25, 0xaf, 0x76, 0x1e, 0x82, 0x63, 0xd7, 0x73, 0xf4, 0x76, 0x7a, 0xa2, 0x1a, 0x84, - 0xbf, 0x41, 0x3b, 0x52, 0x31, 0x15, 0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 0x0e, 0x42, 0x8e, 0x08, 0x5c, 0x9e, 0xfd, 0x3a, 0xbc, 0xa5, 0x67, 0x60, 0x6d, 0x76, 0x85, 0x1e, - 0xce, 0x74, 0x8b, 0x6f, 0xf3, 0xdc, 0x24, 0xe9, 0x12, 0xb6, 0xe5, 0x21, 0xbc, 0x3a, 0x26, 0xbc, - 0x87, 0xaa, 0x23, 0x98, 0xe8, 0xf5, 0xb9, 0x41, 0xd3, 0x47, 0x7c, 0x1f, 0xd5, 0xc6, 0xcc, 0x8b, - 0x21, 0xbf, 0xca, 0x1f, 0x6d, 0xf6, 0x1e, 0x4f, 0xb8, 0x0f, 0x34, 0x13, 0xde, 0xdb, 0x3a, 0x36, - 0xec, 0x7b, 0x17, 0x97, 0x66, 0xe5, 0xe5, 0xa5, 0x59, 0x79, 0x75, 0x69, 0x56, 0x5e, 0x24, 0xa6, - 0x71, 0x91, 0x98, 0xc6, 0xcb, 0xc4, 0x34, 0x5e, 0x25, 0xa6, 0xf1, 0x57, 0x62, 0x1a, 0xbf, 0xfc, - 0x6d, 0x56, 0xbe, 0xdd, 0x2f, 0xfb, 0x1f, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0xd7, - 0x99, 0xdb, 0xf7, 0x08, 0x00, 0x00, +var fileDescriptor_204bc6fa48ff56f7 = []byte{ + // 840 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x8f, 0xdb, 0x44, + 0x18, 0xc7, 0xe3, 0xcd, 0x66, 0xd9, 0x4e, 0x93, 0x68, 0x19, 0x16, 0x58, 0x72, 0x70, 0xaa, 0x88, + 0xc3, 0x82, 0xd4, 0x31, 0xdb, 0x22, 0xb4, 0xea, 0x01, 0xb5, 0x6e, 0x56, 0x50, 0xd4, 0x25, 0xab, + 0xd9, 0x56, 0x48, 0x08, 0x24, 0x26, 0xf6, 0xd3, 0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 0x78, 0x6f, + 0xeb, 0xd8, 0xb0, 0xef, 0x5d, 0x5e, 0x99, 0x95, 0x97, 0x57, 0x66, 0xe5, 0xd5, 0x95, 0x59, 0x79, + 0x91, 0x98, 0xc6, 0x65, 0x62, 0x1a, 0x2f, 0x13, 0xd3, 0x78, 0x95, 0x98, 0xc6, 0x5f, 0x89, 0x69, + 0xfc, 0xf2, 0xb7, 0x59, 0xf9, 0x76, 0xbf, 0xec, 0x7f, 0xcc, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x0f, 0x42, 0xd2, 0x33, 0xde, 0x08, 0x00, 0x00, } func (m *Eviction) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/policy/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/policy/v1beta1/generated.pb.go index efba41b3fda..c3845e994e5 100644 --- a/pkg/k8s/vendor/k8s.io/api/policy/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/policy/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/policy/v1beta1/generated.proto +// source: k8s.io/api/policy/v1beta1/generated.proto package v1beta1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Eviction) Reset() { *m = Eviction{} } func (*Eviction) ProtoMessage() {} func (*Eviction) Descriptor() ([]byte, []int) { - return fileDescriptor_014060e454a820dc, []int{0} + return fileDescriptor_68b366237812cc96, []int{0} } func (m *Eviction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_Eviction proto.InternalMessageInfo func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } func (*PodDisruptionBudget) ProtoMessage() {} func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { - return fileDescriptor_014060e454a820dc, []int{1} + return fileDescriptor_68b366237812cc96, []int{1} } func (m *PodDisruptionBudget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_PodDisruptionBudget proto.InternalMessageInfo func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } func (*PodDisruptionBudgetList) ProtoMessage() {} func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { - return fileDescriptor_014060e454a820dc, []int{2} + return fileDescriptor_68b366237812cc96, []int{2} } func (m *PodDisruptionBudgetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_PodDisruptionBudgetList proto.InternalMessageInfo func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } func (*PodDisruptionBudgetSpec) ProtoMessage() {} func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_014060e454a820dc, []int{3} + return fileDescriptor_68b366237812cc96, []int{3} } func (m *PodDisruptionBudgetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_PodDisruptionBudgetSpec proto.InternalMessageInfo func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (*PodDisruptionBudgetStatus) ProtoMessage() {} func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_014060e454a820dc, []int{4} + return fileDescriptor_68b366237812cc96, []int{4} } func (m *PodDisruptionBudgetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -197,65 +197,64 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/policy/v1beta1/generated.proto", fileDescriptor_014060e454a820dc) + proto.RegisterFile("k8s.io/api/policy/v1beta1/generated.proto", fileDescriptor_68b366237812cc96) } -var fileDescriptor_014060e454a820dc = []byte{ - // 857 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0xc7, 0x45, 0xcb, 0x72, 0x9d, 0xad, 0x24, 0xb8, 0xdb, 0x2f, 0x5b, 0x07, 0x2a, 0xd0, 0x29, - 0x28, 0xd0, 0x65, 0x9d, 0x04, 0x85, 0xd1, 0x43, 0x9b, 0x30, 0x32, 0xd2, 0x14, 0x31, 0x6c, 0xac, - 0x9c, 0x4b, 0x91, 0x02, 0x5d, 0x91, 0x13, 0x69, 0x2b, 0x92, 0x4b, 0x70, 0x97, 0x6c, 0x74, 0xcb, - 0xa1, 0x0f, 0xd0, 0xf7, 0xe8, 0x83, 0xd4, 0x87, 0x1e, 0xd2, 0x5b, 0xd0, 0x83, 0x50, 0xb3, 0x6f, - 0xd1, 0x53, 0xc1, 0x25, 0xf5, 0x41, 0x7d, 0x34, 0x4a, 0x0e, 0xb9, 0x71, 0x67, 0xe6, 0xff, 0x1b, - 0xce, 0xc7, 0x52, 0x42, 0xf6, 0xe8, 0x44, 0x12, 0x2e, 0xac, 0x51, 0xdc, 0x87, 0x28, 0x00, 0x05, - 0xd2, 0x4a, 0x20, 0x70, 0x45, 0x64, 0x15, 0x0e, 0x16, 0x72, 0x2b, 0x14, 0x1e, 0x77, 0xc6, 0x56, - 0x72, 0xdc, 0x07, 0xc5, 0x8e, 0xad, 0x01, 0x04, 0x10, 0x31, 0x05, 0x2e, 0x09, 0x23, 0xa1, 0x04, - 0x3e, 0xca, 0x43, 0x09, 0x0b, 0x39, 0xc9, 0x43, 0x49, 0x11, 0xda, 0xfa, 0x7c, 0xc0, 0xd5, 0x30, - 0xee, 0x13, 0x47, 0xf8, 0xd6, 0x40, 0x0c, 0x84, 0xa5, 0x15, 0xfd, 0xf8, 0x99, 0x3e, 0xe9, 0x83, - 0x7e, 0xca, 0x49, 0xad, 0xbb, 0xf3, 0xa4, 0x3e, 0x73, 0x86, 0x3c, 0x80, 0x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d4, 0xf5, 0xd3, 0x05, 0x1f, - 0x2d, 0x45, 0x62, 0x07, 0x21, 0x47, 0x04, 0x2e, 0xcf, 0x7f, 0x32, 0xde, 0xd3, 0x83, 0xb0, 0xb6, - 0xbb, 0x48, 0x0f, 0xa6, 0xba, 0xf9, 0x07, 0x7b, 0x66, 0x92, 0x74, 0x01, 0xdb, 0xf2, 0x10, 0x5e, - 0x1d, 0x13, 0x3e, 0x40, 0xd5, 0x11, 0x8c, 0xf5, 0x12, 0xdd, 0xa0, 0xd9, 0x23, 0xbe, 0x87, 0x6a, - 0x09, 0xf3, 0x62, 0x28, 0x2e, 0xf4, 0x67, 0xdb, 0xbd, 0xc7, 0x25, 0xf7, 0x81, 0xe6, 0xc2, 0xaf, - 0x76, 0x4e, 0x0c, 0xfb, 0x9b, 0xab, 0x6b, 0xb3, 0xf2, 0xf2, 0xda, 0xac, 0xbc, 0xba, 0x36, 0x2b, - 0x2f, 0x52, 0xd3, 0xb8, 0x4a, 0x4d, 0xe3, 0x65, 0x6a, 0x1a, 0xaf, 0x52, 0xd3, 0xf8, 0x3b, 0x35, - 0x8d, 0x5f, 0xff, 0x31, 0x2b, 0xdf, 0x1f, 0x6d, 0xfc, 0x9b, 0xf3, 0x5f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x96, 0x9a, 0x3a, 0xb5, 0x1b, 0x09, 0x00, 0x00, +var fileDescriptor_68b366237812cc96 = []byte{ + // 843 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x8f, 0xdb, 0x44, + 0x18, 0xc7, 0xe3, 0xcd, 0x66, 0xd9, 0x0e, 0x49, 0xb4, 0x0c, 0x6f, 0xbb, 0x39, 0x38, 0x55, 0x4e, + 0x05, 0x89, 0x31, 0xdb, 0x56, 0x68, 0xc5, 0x01, 0x5a, 0x37, 0xab, 0x52, 0xd4, 0xd5, 0xae, 0x26, + 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 0x7f, 0xba, 0xdd, 0x39, 0x2e, 0x79, 0x00, 0x34, + 0x17, 0x7e, 0xb9, 0x73, 0x62, 0xd8, 0x5f, 0x5f, 0x5d, 0x9b, 0x95, 0x97, 0xd7, 0x66, 0xe5, 0xd5, + 0xb5, 0x59, 0x79, 0x91, 0x9a, 0xc6, 0x55, 0x6a, 0x1a, 0x2f, 0x53, 0xd3, 0x78, 0x95, 0x9a, 0xc6, + 0x5f, 0xa9, 0x69, 0xfc, 0xf2, 0xb7, 0x59, 0xf9, 0xee, 0x68, 0xe3, 0xdf, 0x9c, 0x7f, 0x03, 0x00, + 0x00, 0xff, 0xff, 0x3c, 0xbe, 0x15, 0xfb, 0x02, 0x09, 0x00, 0x00, } func (m *Eviction) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/rbac/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/rbac/v1/generated.pb.go index 4e466eb285a..112d18fb065 100644 --- a/pkg/k8s/vendor/k8s.io/api/rbac/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/rbac/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1/generated.proto +// source: k8s.io/api/rbac/v1/generated.proto package v1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AggregationRule) Reset() { *m = AggregationRule{} } func (*AggregationRule) ProtoMessage() {} func (*AggregationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{0} + return fileDescriptor_c8ba2e7dd472de66, []int{0} } func (m *AggregationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_AggregationRule proto.InternalMessageInfo func (m *ClusterRole) Reset() { *m = ClusterRole{} } func (*ClusterRole) ProtoMessage() {} func (*ClusterRole) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{1} + return fileDescriptor_c8ba2e7dd472de66, []int{1} } func (m *ClusterRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_ClusterRole proto.InternalMessageInfo func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } func (*ClusterRoleBinding) ProtoMessage() {} func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{2} + return fileDescriptor_c8ba2e7dd472de66, []int{2} } func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_ClusterRoleBinding proto.InternalMessageInfo func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } func (*ClusterRoleBindingList) ProtoMessage() {} func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{3} + return fileDescriptor_c8ba2e7dd472de66, []int{3} } func (m *ClusterRoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_ClusterRoleBindingList proto.InternalMessageInfo func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } func (*ClusterRoleList) ProtoMessage() {} func (*ClusterRoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{4} + return fileDescriptor_c8ba2e7dd472de66, []int{4} } func (m *ClusterRoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ClusterRoleList proto.InternalMessageInfo func (m *PolicyRule) Reset() { *m = PolicyRule{} } func (*PolicyRule) ProtoMessage() {} func (*PolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{5} + return fileDescriptor_c8ba2e7dd472de66, []int{5} } func (m *PolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_PolicyRule proto.InternalMessageInfo func (m *Role) Reset() { *m = Role{} } func (*Role) ProtoMessage() {} func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{6} + return fileDescriptor_c8ba2e7dd472de66, []int{6} } func (m *Role) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_Role proto.InternalMessageInfo func (m *RoleBinding) Reset() { *m = RoleBinding{} } func (*RoleBinding) ProtoMessage() {} func (*RoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{7} + return fileDescriptor_c8ba2e7dd472de66, []int{7} } func (m *RoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +271,7 @@ var xxx_messageInfo_RoleBinding proto.InternalMessageInfo func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } func (*RoleBindingList) ProtoMessage() {} func (*RoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{8} + return fileDescriptor_c8ba2e7dd472de66, []int{8} } func (m *RoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +299,7 @@ var xxx_messageInfo_RoleBindingList proto.InternalMessageInfo func (m *RoleList) Reset() { *m = RoleList{} } func (*RoleList) ProtoMessage() {} func (*RoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{9} + return fileDescriptor_c8ba2e7dd472de66, []int{9} } func (m *RoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +327,7 @@ var xxx_messageInfo_RoleList proto.InternalMessageInfo func (m *RoleRef) Reset() { *m = RoleRef{} } func (*RoleRef) ProtoMessage() {} func (*RoleRef) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{10} + return fileDescriptor_c8ba2e7dd472de66, []int{10} } func (m *RoleRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +355,7 @@ var xxx_messageInfo_RoleRef proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{11} + return fileDescriptor_c8ba2e7dd472de66, []int{11} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -396,62 +396,61 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1/generated.proto", fileDescriptor_979ffd7b30c07419) -} - -var fileDescriptor_979ffd7b30c07419 = []byte{ - // 809 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcf, 0x6b, 0xe3, 0x46, - 0x14, 0xf6, 0x38, 0x36, 0xb1, 0xc6, 0x35, 0x6e, 0xa6, 0xa1, 0x88, 0xb4, 0xc8, 0x41, 0x85, 0x12, - 0x68, 0x2b, 0x35, 0x69, 0x69, 0x03, 0x25, 0x87, 0x28, 0xa5, 0x25, 0x24, 0x4d, 0xc3, 0x84, 0xf6, - 0x50, 0x7a, 0xe8, 0x48, 0x9e, 0x28, 0x53, 0xeb, 0x17, 0x33, 0x92, 0x21, 0xf4, 0x52, 0x0a, 0x3d, - 0xec, 0x6d, 0x8f, 0xbb, 0x7f, 0xc1, 0x5e, 0x76, 0x8f, 0xfb, 0x17, 0xec, 0x25, 0xc7, 0x1c, 0x73, - 0x32, 0x1b, 0xed, 0x1f, 0xb2, 0x8b, 0x7e, 0x59, 0xfe, 0xa1, 0x6c, 0x7c, 0x32, 0x2c, 0x7b, 0xb2, - 0xe7, 0xbd, 0xef, 0x7d, 0xef, 0x9b, 0x4f, 0x7a, 0xcf, 0x86, 0x3f, 0x0c, 0x76, 0x85, 0xc6, 0x7c, - 0x7d, 0x10, 0x99, 0x94, 0x7b, 0x34, 0xa4, 0x42, 0x1f, 0x52, 0xaf, 0xef, 0x73, 0x3d, 0x4f, 0x90, - 0x80, 0xe9, 0xdc, 0x24, 0x96, 0x3e, 0xdc, 0xd6, 0x6d, 0xea, 0x51, 0x4e, 0x42, 0xda, 0xd7, 0x02, - 0xee, 0x87, 0x3e, 0x42, 0x19, 0x46, 0x23, 0x01, 0xd3, 0x12, 0x8c, 0x36, 0xdc, 0xde, 0xf8, 0xca, - 0x66, 0xe1, 0x45, 0x64, 0x6a, 0x96, 0xef, 0xea, 0xb6, 0x6f, 0xfb, 0x7a, 0x0a, 0x35, 0xa3, 0xf3, - 0xf4, 0x94, 0x1e, 0xd2, 0x6f, 0x19, 0xc5, 0xc6, 0xb7, 0x65, 0x1b, 0x97, 0x58, 0x17, 0xcc, 0xa3, - 0xfc, 0x52, 0x0f, 0x06, 0x76, 0x12, 0x10, 0xba, 0x4b, 0x43, 0x52, 0xd1, 0x78, 0x43, 0xbf, 0xab, - 0x8a, 0x47, 0x5e, 0xc8, 0x5c, 0x3a, 0x57, 0xf0, 0xdd, 0x7d, 0x05, 0xc2, 0xba, 0xa0, 0x2e, 0x99, - 0xad, 0x53, 0x1f, 0x03, 0xd8, 0xdd, 0xb7, 0x6d, 0x4e, 0x6d, 0x12, 0x32, 0xdf, 0xc3, 0x91, 0x43, - 0xd1, 0xff, 0x00, 0xae, 0x5b, 0x4e, 0x24, 0x42, 0xca, 0xb1, 0xef, 0xd0, 0x33, 0xea, 0x50, 0x2b, - 0xf4, 0xb9, 0x90, 0xc1, 0xe6, 0xca, 0x56, 0x7b, 0xe7, 0x1b, 0xad, 0x74, 0x65, 0xdc, 0x4b, 0x0b, - 0x06, 0x76, 0x12, 0x10, 0x5a, 0x72, 0x25, 0x6d, 0xb8, 0xad, 0x1d, 0x13, 0x93, 0x3a, 0x45, 0xad, - 0xf1, 0xe9, 0xd5, 0xa8, 0x57, 0x8b, 0x47, 0xbd, 0xf5, 0x83, 0x0a, 0x62, 0x5c, 0x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0x9d, 0x82, 0xab, 0x95, 0xfe, 0x03, 0x0b, 0xd7, - 0xd1, 0x97, 0xb0, 0x55, 0xcc, 0x74, 0xaa, 0x53, 0x2a, 0xfb, 0x16, 0x63, 0x8f, 0xc7, 0x08, 0xb4, - 0x09, 0x1b, 0x03, 0xe6, 0xf5, 0xe5, 0x7a, 0x8a, 0xfc, 0x20, 0x47, 0x36, 0x8e, 0x98, 0xd7, 0xc7, - 0x69, 0x26, 0x41, 0x78, 0xc4, 0xcd, 0x7e, 0x56, 0x27, 0x10, 0xc9, 0x34, 0xe3, 0x34, 0xa3, 0x3e, - 0x05, 0x70, 0x35, 0x7f, 0x7b, 0xc6, 0x7c, 0xe0, 0x4e, 0xbe, 0x49, 0x7d, 0xf5, 0x45, 0xf4, 0xbd, - 0xbd, 0x3b, 0xd2, 0xa1, 0x94, 0x7c, 0x8a, 0x80, 0x58, 0x54, 0x6e, 0xa4, 0xb0, 0xb5, 0x1c, 0x26, - 0x9d, 0x14, 0x09, 0x5c, 0x62, 0x8c, 0xdd, 0xab, 0x5b, 0xa5, 0x76, 0x7d, 0xab, 0xd4, 0x6e, 0x6e, - 0x95, 0xda, 0xbf, 0xb1, 0x02, 0xae, 0x62, 0x05, 0x5c, 0xc7, 0x0a, 0xb8, 0x89, 0x15, 0xf0, 0x32, - 0x56, 0xc0, 0xc3, 0x57, 0x4a, 0xed, 0x0f, 0x34, 0xff, 0x8f, 0xf5, 0x4d, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xec, 0x4f, 0xa6, 0x29, 0xdf, 0x0a, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/rbac/v1/generated.proto", fileDescriptor_c8ba2e7dd472de66) +} + +var fileDescriptor_c8ba2e7dd472de66 = []byte{ + // 790 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0x4d, 0x6f, 0xd3, 0x4a, + 0x14, 0xcd, 0xa4, 0x89, 0x1a, 0x4f, 0x5e, 0x94, 0xd7, 0x79, 0xd5, 0x93, 0xd5, 0xf7, 0xe4, 0x54, + 0x46, 0x42, 0x95, 0x00, 0x9b, 0x16, 0x04, 0xdd, 0x74, 0x51, 0x17, 0x81, 0xaa, 0x96, 0x52, 0x4d, + 0x05, 0x0b, 0xc4, 0x82, 0x89, 0x33, 0x75, 0x87, 0xf8, 0x4b, 0x1e, 0x3b, 0x52, 0xc5, 0x06, 0x21, + 0xb1, 0x60, 0xc7, 0x12, 0x7e, 0x01, 0x1b, 0x58, 0xf2, 0x0b, 0xd8, 0x74, 0xd9, 0x65, 0x57, 0x11, + 0x35, 0x3f, 0x04, 0xe4, 0xaf, 0x38, 0x1f, 0x2e, 0xcd, 0x2a, 0x12, 0x62, 0x95, 0xcc, 0xbd, 0xe7, + 0x9e, 0x7b, 0xe6, 0xd8, 0xf7, 0x26, 0x50, 0xee, 0xae, 0x73, 0x85, 0x39, 0x2a, 0x71, 0x99, 0xea, + 0xb5, 0x89, 0xae, 0xf6, 0x56, 0x55, 0x83, 0xda, 0xd4, 0x23, 0x3e, 0xed, 0x28, 0xae, 0xe7, 0xf8, + 0x0e, 0x42, 0x09, 0x46, 0x21, 0x2e, 0x53, 0x22, 0x8c, 0xd2, 0x5b, 0x5d, 0xba, 0x61, 0x30, 0xff, + 0x28, 0x68, 0x2b, 0xba, 0x63, 0xa9, 0x86, 0x63, 0x38, 0x6a, 0x0c, 0x6d, 0x07, 0x87, 0xf1, 0x29, + 0x3e, 0xc4, 0xdf, 0x12, 0x8a, 0xa5, 0xdb, 0x79, 0x1b, 0x8b, 0xe8, 0x47, 0xcc, 0xa6, 0xde, 0xb1, + 0xea, 0x76, 0x8d, 0x28, 0xc0, 0x55, 0x8b, 0xfa, 0xa4, 0xa0, 0xf1, 0x92, 0x7a, 0x51, 0x95, 0x17, + 0xd8, 0x3e, 0xb3, 0xe8, 0x44, 0xc1, 0x9d, 0xcb, 0x0a, 0xb8, 0x7e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xb2, 0x46, 0x63, 0x76, 0x87, 0xd9, 0xc6, 0x0c, 0x1c, 0xda, 0x86, 0x35, 0x1e, 0xc4, 0x89, + 0xcc, 0xa4, 0xff, 0x8a, 0x6e, 0x75, 0x90, 0x60, 0xb4, 0xbf, 0x53, 0xb2, 0x5a, 0x1a, 0xe0, 0x78, + 0x50, 0x8e, 0xee, 0xc3, 0x79, 0xcf, 0x31, 0x29, 0xa6, 0x87, 0xa9, 0x3f, 0x85, 0x4c, 0x38, 0x81, + 0x68, 0xcd, 0x94, 0x69, 0x3e, 0x0d, 0xe0, 0xac, 0x58, 0xfe, 0x0a, 0xe0, 0xbf, 0x93, 0x5e, 0xec, + 0x32, 0xee, 0xa3, 0x67, 0x13, 0x7e, 0x28, 0x53, 0xbe, 0xbc, 0x8c, 0x27, 0x6e, 0x0c, 0x2e, 0x90, + 0x45, 0x86, 0xbc, 0xd8, 0x81, 0x55, 0xe6, 0x53, 0x2b, 0x33, 0xe2, 0x6a, 0x91, 0xfc, 0x49, 0x61, + 0xf9, 0x5b, 0xb3, 0x1d, 0x15, 0xe3, 0x84, 0x43, 0xfe, 0x02, 0x60, 0x73, 0x08, 0x3c, 0x03, 0xf9, + 0xf7, 0x46, 0xe5, 0xb7, 0x2e, 0x93, 0x5f, 0xac, 0xfb, 0x07, 0x80, 0x30, 0x1f, 0x09, 0xd4, 0x82, + 0xd5, 0x1e, 0xf5, 0xda, 0xc9, 0xae, 0x10, 0x34, 0x21, 0xc2, 0x3f, 0x89, 0x02, 0x38, 0x89, 0xa3, + 0x6b, 0x50, 0x20, 0x2e, 0x7b, 0xe0, 0x39, 0x81, 0x9b, 0x74, 0x16, 0xb4, 0x46, 0xd8, 0x6f, 0x09, + 0x9b, 0xfb, 0xdb, 0x49, 0x10, 0xe7, 0xf9, 0x08, 0xec, 0x51, 0xee, 0x04, 0x9e, 0x4e, 0xb9, 0x38, + 0x97, 0x83, 0x71, 0x16, 0xc4, 0x79, 0x1e, 0xdd, 0x85, 0x8d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0xaf, + 0x42, 0x09, 0x9c, 0x84, 0x12, 0x38, 0x0d, 0x25, 0x70, 0x16, 0x4a, 0xe0, 0x5b, 0x28, 0x81, 0x77, + 0xdf, 0xa5, 0xd2, 0x53, 0x34, 0xf9, 0x8f, 0xf5, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x67, 0xff, + 0x5a, 0x4f, 0xc6, 0x0a, 0x00, 0x00, } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/rbac/v1/generated.proto b/pkg/k8s/vendor/k8s.io/api/rbac/v1/generated.proto index 13ff60ea718..62f5e558ba7 100644 --- a/pkg/k8s/vendor/k8s.io/api/rbac/v1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/rbac/v1/generated.proto @@ -33,6 +33,7 @@ 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 + // +listType=atomic repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1; } @@ -44,6 +45,7 @@ message ClusterRole { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic repeated PolicyRule rules = 2; // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. @@ -62,6 +64,7 @@ message ClusterRoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can only reference a ClusterRole in the global namespace. @@ -94,25 +97,30 @@ message ClusterRoleList { // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic repeated string apiGroups = 2; // Resources is a list of resources this rule applies to. '*' represents all resources. // +optional + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic repeated string nonResourceURLs = 5; } @@ -124,6 +132,7 @@ message Role { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic repeated PolicyRule rules = 2; } @@ -137,6 +146,7 @@ message RoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. diff --git a/pkg/k8s/vendor/k8s.io/api/rbac/v1/types.go b/pkg/k8s/vendor/k8s.io/api/rbac/v1/types.go index ce845d69b42..8bef1ac462b 100644 --- a/pkg/k8s/vendor/k8s.io/api/rbac/v1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/rbac/v1/types.go @@ -48,23 +48,28 @@ const ( // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"` // Resources is a list of resources this rule applies to. '*' represents all resources. // +optional + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,5,rep,name=nonResourceURLs"` } @@ -111,6 +116,7 @@ type Role struct { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` } @@ -128,6 +134,7 @@ type RoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. @@ -175,6 +182,7 @@ type ClusterRole struct { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic 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. @@ -189,6 +197,7 @@ 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 + // +listType=atomic ClusterRoleSelectors []metav1.LabelSelector `json:"clusterRoleSelectors,omitempty" protobuf:"bytes,1,rep,name=clusterRoleSelectors"` } @@ -206,6 +215,7 @@ type ClusterRoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can only reference a ClusterRole in the global namespace. diff --git a/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go index 5cce23ea124..ee3c7bfcc0c 100644 --- a/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1alpha1/generated.proto +// source: k8s.io/api/rbac/v1alpha1/generated.proto package v1alpha1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AggregationRule) Reset() { *m = AggregationRule{} } func (*AggregationRule) ProtoMessage() {} func (*AggregationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{0} + return fileDescriptor_758889dfd9a88fa6, []int{0} } func (m *AggregationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_AggregationRule proto.InternalMessageInfo func (m *ClusterRole) Reset() { *m = ClusterRole{} } func (*ClusterRole) ProtoMessage() {} func (*ClusterRole) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{1} + return fileDescriptor_758889dfd9a88fa6, []int{1} } func (m *ClusterRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_ClusterRole proto.InternalMessageInfo func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } func (*ClusterRoleBinding) ProtoMessage() {} func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{2} + return fileDescriptor_758889dfd9a88fa6, []int{2} } func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_ClusterRoleBinding proto.InternalMessageInfo func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } func (*ClusterRoleBindingList) ProtoMessage() {} func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{3} + return fileDescriptor_758889dfd9a88fa6, []int{3} } func (m *ClusterRoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_ClusterRoleBindingList proto.InternalMessageInfo func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } func (*ClusterRoleList) ProtoMessage() {} func (*ClusterRoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{4} + return fileDescriptor_758889dfd9a88fa6, []int{4} } func (m *ClusterRoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ClusterRoleList proto.InternalMessageInfo func (m *PolicyRule) Reset() { *m = PolicyRule{} } func (*PolicyRule) ProtoMessage() {} func (*PolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{5} + return fileDescriptor_758889dfd9a88fa6, []int{5} } func (m *PolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_PolicyRule proto.InternalMessageInfo func (m *Role) Reset() { *m = Role{} } func (*Role) ProtoMessage() {} func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{6} + return fileDescriptor_758889dfd9a88fa6, []int{6} } func (m *Role) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_Role proto.InternalMessageInfo func (m *RoleBinding) Reset() { *m = RoleBinding{} } func (*RoleBinding) ProtoMessage() {} func (*RoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{7} + return fileDescriptor_758889dfd9a88fa6, []int{7} } func (m *RoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +271,7 @@ var xxx_messageInfo_RoleBinding proto.InternalMessageInfo func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } func (*RoleBindingList) ProtoMessage() {} func (*RoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{8} + return fileDescriptor_758889dfd9a88fa6, []int{8} } func (m *RoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +299,7 @@ var xxx_messageInfo_RoleBindingList proto.InternalMessageInfo func (m *RoleList) Reset() { *m = RoleList{} } func (*RoleList) ProtoMessage() {} func (*RoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{9} + return fileDescriptor_758889dfd9a88fa6, []int{9} } func (m *RoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +327,7 @@ var xxx_messageInfo_RoleList proto.InternalMessageInfo func (m *RoleRef) Reset() { *m = RoleRef{} } func (*RoleRef) ProtoMessage() {} func (*RoleRef) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{10} + return fileDescriptor_758889dfd9a88fa6, []int{10} } func (m *RoleRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +355,7 @@ var xxx_messageInfo_RoleRef proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{11} + return fileDescriptor_758889dfd9a88fa6, []int{11} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -396,64 +396,63 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1alpha1/generated.proto", fileDescriptor_b59b0bd5e7cb9590) -} - -var fileDescriptor_b59b0bd5e7cb9590 = []byte{ - // 833 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xbf, 0x8f, 0xe3, 0x44, - 0x14, 0xce, 0x64, 0x13, 0x36, 0x99, 0x25, 0x0a, 0x37, 0x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0x45, 0x89, 0x38, 0x88, 0x98, 0x4f, 0xd7, 0x02, 0xde, 0xdd, 0x15, 0x20, 0x9d, 0x09, 0xf5, - 0xc9, 0x6a, 0x9c, 0xf1, 0x13, 0x80, 0xdd, 0xbe, 0xeb, 0x0a, 0xea, 0x92, 0x88, 0xf1, 0x00, 0xc7, - 0x1e, 0x45, 0xdf, 0x01, 0x78, 0xd7, 0xf1, 0x62, 0x19, 0x51, 0x81, 0xb9, 0x47, 0x1f, 0x51, 0x8f, - 0x3a, 0x11, 0x17, 0x52, 0x03, 0x67, 0x47, 0xf7, 0x4e, 0x2e, 0xde, 0x36, 0x4b, 0x6d, 0x16, 0xb9, - 0xcc, 0x70, 0xea, 0xa6, 0x06, 0x69, 0xa6, 0x2d, 0x99, 0xb3, 0x73, 0x73, 0x48, 0x46, 0xd4, 0x2b, - 0x62, 0xed, 0x97, 0xaf, 0xe7, 0xbd, 0x5a, 0x32, 0xef, 0xdd, 0x7d, 0xb0, 0x81, 0x18, 0x6f, 0x4c, - 0x67, 0xfc, 0x5c, 0x87, 0x27, 0x15, 0x38, 0xfa, 0x0a, 0xb6, 0x52, 0xf2, 0x31, 0x89, 0x88, 0x06, - 0xce, 0xc0, 0xbd, 0x93, 0x8b, 0xb7, 0xf6, 0x2b, 0xe5, 0xe1, 0xe8, 0x6b, 0xea, 0x44, 0x9f, 0xd2, - 0x88, 0xd8, 0x28, 0xaf, 0x03, 0x96, 0x36, 0xbc, 0x60, 0x45, 0x03, 0xd8, 0x14, 0xb1, 0x47, 0xa5, - 0x56, 0x57, 0x9d, 0xbe, 0x6a, 0x6e, 0x7b, 0x05, 0xe6, 0x15, 0xf7, 0x98, 0xf3, 0x34, 0x95, 0xcb, - 0xee, 0xe4, 0x94, 0xcd, 0xf4, 0x24, 0x71, 0xc6, 0x80, 0x26, 0xb0, 0x4b, 0x96, 0x75, 0xd5, 0x8e, - 0x54, 0xcd, 0xaf, 0x6f, 0x27, 0x5d, 0xb9, 0x08, 0xfb, 0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, 0xa8, 0xdd, 0x35, 0x20, 0x0b, 0xb6, 0xd3, 0x4f, 0x19, 0x12, 0x87, - 0x6a, 0x0d, 0x05, 0xbb, 0x93, 0xc3, 0xda, 0x97, 0x85, 0x03, 0x97, 0x18, 0xfb, 0xc3, 0xeb, 0x5b, - 0xbd, 0xf6, 0xec, 0x56, 0xaf, 0xdd, 0xdc, 0xea, 0xb5, 0x6f, 0x13, 0x1d, 0x5c, 0x27, 0x3a, 0x78, - 0x96, 0xe8, 0xe0, 0x26, 0xd1, 0xc1, 0x9f, 0x89, 0x0e, 0x7e, 0xf8, 0x4b, 0xaf, 0x7d, 0xa1, 0x6d, - 0xfb, 0x17, 0xfc, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x0e, 0xba, 0xc2, 0x39, 0x0b, 0x00, - 0x00, + proto.RegisterFile("k8s.io/api/rbac/v1alpha1/generated.proto", fileDescriptor_758889dfd9a88fa6) +} + +var fileDescriptor_758889dfd9a88fa6 = []byte{ + // 819 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xce, 0xa4, 0x09, 0x4d, 0x26, 0x44, 0xa1, 0x43, 0x85, 0xac, 0x0a, 0x39, 0xc5, 0x02, 0xa9, + 0x88, 0x62, 0xd3, 0x82, 0x80, 0x0b, 0x48, 0x75, 0x0f, 0x28, 0x10, 0xda, 0x32, 0x15, 0x3d, 0x20, + 0x0e, 0x4c, 0x9c, 0xa9, 0x33, 0xc4, 0xbf, 0xe4, 0xb1, 0x23, 0x55, 0x5c, 0xb8, 0x70, 0x45, 0x5c, + 0x38, 0x70, 0xe7, 0xca, 0x85, 0x3d, 0xee, 0x3f, 0xd0, 0xbd, 0xf5, 0xd8, 0x53, 0xb4, 0xf5, 0xfe, + 0x21, 0xbb, 0xf2, 0xd8, 0x8e, 0x9d, 0x5f, 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2c, 0xc3, 0xc6, 0xeb, 0x95, 0x52, 0x58, 0x29, 0xf1, 0x18, 0x6e, + 0x76, 0x97, 0xac, 0x3f, 0x86, 0xab, 0x97, 0xc8, 0x7f, 0x00, 0xd6, 0x36, 0xb4, 0x3d, 0x4e, 0xa7, + 0xcb, 0x96, 0x57, 0x94, 0xbd, 0xb8, 0xde, 0xdf, 0x60, 0x76, 0x03, 0xe8, 0x10, 0xd6, 0xb2, 0x89, + 0x17, 0xd5, 0xd6, 0xf3, 0xec, 0xd9, 0x52, 0xc0, 0x13, 0x04, 0xda, 0x87, 0x95, 0x21, 0x73, 0xfa, + 0x52, 0x59, 0x20, 0xdf, 0x4c, 0x91, 0x95, 0xef, 0x98, 0xd3, 0xc7, 0xc2, 0x13, 0x23, 0x1c, 0x62, + 0x27, 0x3f, 0xc9, 0x05, 0x44, 0x3c, 0xeb, 0x58, 0x78, 0x94, 0xff, 0x01, 0xdc, 0x4e, 0xdf, 0xd3, + 0x84, 0x0f, 0x2c, 0xe5, 0x3b, 0x86, 0x90, 0x78, 0xec, 0x8a, 0xfa, 0x9c, 0xb9, 0x4e, 0x9a, 0x77, + 0xf2, 0xd2, 0x4f, 0x2e, 0x3a, 0xa9, 0x07, 0x17, 0x50, 0xab, 0x6b, 0x40, 0x1a, 0xac, 0xc7, 0x9f, + 0xdc, 0x23, 0x06, 0x95, 0x2a, 0x02, 0xb6, 0x93, 0xc2, 0xea, 0x67, 0x99, 0x03, 0xe7, 0x18, 0xfd, + 0xeb, 0xdb, 0x07, 0xb9, 0x74, 0xf7, 0x20, 0x97, 0xee, 0x1f, 0xe4, 0xd2, 0xef, 0x91, 0x0c, 0x6e, + 0x23, 0x19, 0xdc, 0x45, 0x32, 0xb8, 0x8f, 0x64, 0xf0, 0x34, 0x92, 0xc1, 0x5f, 0xcf, 0xe4, 0xd2, + 0x4f, 0xd2, 0xb2, 0x7f, 0xc1, 0x2f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x02, 0x55, 0xe5, 0x20, + 0x0b, 0x00, 0x00, } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/generated.proto b/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/generated.proto index d5ceaa0e824..170e008a568 100644 --- a/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/generated.proto @@ -33,6 +33,7 @@ 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 + // +listType=atomic repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1; } @@ -45,6 +46,7 @@ message ClusterRole { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic repeated PolicyRule rules = 2; // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. @@ -64,6 +66,7 @@ message ClusterRoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can only reference a ClusterRole in the global namespace. @@ -97,25 +100,30 @@ message ClusterRoleList { // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic repeated string apiGroups = 3; // Resources is a list of resources this rule applies to. '*' represents all resources. // +optional + // +listType=atomic 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 + // +listType=atomic 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 // 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 + // +listType=atomic repeated string nonResourceURLs = 6; } @@ -128,6 +136,7 @@ message Role { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic repeated PolicyRule rules = 2; } @@ -142,6 +151,7 @@ message RoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. diff --git a/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/types.go b/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/types.go index e0e75b1503b..9a0a2197749 100644 --- a/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/rbac/v1alpha1/types.go @@ -48,23 +48,28 @@ const ( // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,3,rep,name=apiGroups"` // Resources is a list of resources this rule applies to. '*' represents all resources. // +optional + // +listType=atomic 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 + // +listType=atomic 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 // 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 + // +listType=atomic NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"` } @@ -111,6 +116,7 @@ type Role struct { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` } @@ -129,6 +135,7 @@ type RoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. @@ -178,6 +185,7 @@ type ClusterRole struct { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic 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. @@ -192,6 +200,7 @@ 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 + // +listType=atomic ClusterRoleSelectors []metav1.LabelSelector `json:"clusterRoleSelectors,omitempty" protobuf:"bytes,1,rep,name=clusterRoleSelectors"` } @@ -210,6 +219,7 @@ type ClusterRoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can only reference a ClusterRole in the global namespace. diff --git a/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go index ad6685591eb..9052d7e8dbb 100644 --- a/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1beta1/generated.proto +// source: k8s.io/api/rbac/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AggregationRule) Reset() { *m = AggregationRule{} } func (*AggregationRule) ProtoMessage() {} func (*AggregationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{0} + return fileDescriptor_c5bc2d145acd4e45, []int{0} } func (m *AggregationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_AggregationRule proto.InternalMessageInfo func (m *ClusterRole) Reset() { *m = ClusterRole{} } func (*ClusterRole) ProtoMessage() {} func (*ClusterRole) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{1} + return fileDescriptor_c5bc2d145acd4e45, []int{1} } func (m *ClusterRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_ClusterRole proto.InternalMessageInfo func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } func (*ClusterRoleBinding) ProtoMessage() {} func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{2} + return fileDescriptor_c5bc2d145acd4e45, []int{2} } func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_ClusterRoleBinding proto.InternalMessageInfo func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } func (*ClusterRoleBindingList) ProtoMessage() {} func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{3} + return fileDescriptor_c5bc2d145acd4e45, []int{3} } func (m *ClusterRoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_ClusterRoleBindingList proto.InternalMessageInfo func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } func (*ClusterRoleList) ProtoMessage() {} func (*ClusterRoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{4} + return fileDescriptor_c5bc2d145acd4e45, []int{4} } func (m *ClusterRoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ClusterRoleList proto.InternalMessageInfo func (m *PolicyRule) Reset() { *m = PolicyRule{} } func (*PolicyRule) ProtoMessage() {} func (*PolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{5} + return fileDescriptor_c5bc2d145acd4e45, []int{5} } func (m *PolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_PolicyRule proto.InternalMessageInfo func (m *Role) Reset() { *m = Role{} } func (*Role) ProtoMessage() {} func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{6} + return fileDescriptor_c5bc2d145acd4e45, []int{6} } func (m *Role) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_Role proto.InternalMessageInfo func (m *RoleBinding) Reset() { *m = RoleBinding{} } func (*RoleBinding) ProtoMessage() {} func (*RoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{7} + return fileDescriptor_c5bc2d145acd4e45, []int{7} } func (m *RoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +271,7 @@ var xxx_messageInfo_RoleBinding proto.InternalMessageInfo func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } func (*RoleBindingList) ProtoMessage() {} func (*RoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{8} + return fileDescriptor_c5bc2d145acd4e45, []int{8} } func (m *RoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +299,7 @@ var xxx_messageInfo_RoleBindingList proto.InternalMessageInfo func (m *RoleList) Reset() { *m = RoleList{} } func (*RoleList) ProtoMessage() {} func (*RoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{9} + return fileDescriptor_c5bc2d145acd4e45, []int{9} } func (m *RoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +327,7 @@ var xxx_messageInfo_RoleList proto.InternalMessageInfo func (m *RoleRef) Reset() { *m = RoleRef{} } func (*RoleRef) ProtoMessage() {} func (*RoleRef) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{10} + return fileDescriptor_c5bc2d145acd4e45, []int{10} } func (m *RoleRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +355,7 @@ var xxx_messageInfo_RoleRef proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{11} + return fileDescriptor_c5bc2d145acd4e45, []int{11} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -396,62 +396,61 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1beta1/generated.proto", fileDescriptor_99f6bec96facc83d) -} - -var fileDescriptor_99f6bec96facc83d = []byte{ - // 812 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xbd, 0x6f, 0x2b, 0x45, - 0x10, 0xf7, 0x3a, 0xb6, 0xe2, 0x5b, 0x63, 0x99, 0xb7, 0x3c, 0xf1, 0x4e, 0x11, 0x9c, 0x2d, 0x43, - 0x11, 0xe9, 0xc1, 0x1d, 0x79, 0x20, 0xa0, 0x89, 0x44, 0x8e, 0x02, 0xa2, 0x04, 0x13, 0x6d, 0x04, - 0x05, 0xa2, 0x60, 0xef, 0xbc, 0xb9, 0x2c, 0xbe, 0x2f, 0xed, 0xde, 0x59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xe0, 0x97, 0x7f, 0xb4, 0xda, 0x37, 0xcf, 0x2a, 0xfe, 0xf2, 0xfe, 0x17, - 0x00, 0x00, 0xff, 0xff, 0xf7, 0xdd, 0xcc, 0x2b, 0x25, 0x0b, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/rbac/v1beta1/generated.proto", fileDescriptor_c5bc2d145acd4e45) +} + +var fileDescriptor_c5bc2d145acd4e45 = []byte{ + // 800 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x3b, 0x6f, 0xe3, 0x46, + 0x10, 0xd6, 0xca, 0x12, 0x2c, 0xae, 0x22, 0x28, 0xde, 0x18, 0x31, 0x61, 0x24, 0x94, 0xa0, 0x04, + 0x88, 0x01, 0x27, 0x64, 0xec, 0x04, 0x49, 0x1a, 0x17, 0x66, 0x8a, 0xc4, 0xb0, 0xa3, 0x18, 0x6b, + 0x24, 0x45, 0x90, 0x22, 0x2b, 0x6a, 0x4d, 0x6f, 0xc4, 0x17, 0xb8, 0xa4, 0x00, 0x23, 0x4d, 0x9a, + 0xeb, 0xae, 0x38, 0xe0, 0xaa, 0x6b, 0xaf, 0xbe, 0xea, 0xca, 0xfb, 0x05, 0x2a, 0x5d, 0xba, 0x12, + 0xce, 0xbc, 0x1f, 0x72, 0x87, 0xe5, 0x43, 0xd4, 0x8b, 0xb6, 0x2a, 0x01, 0x07, 0x5c, 0x25, 0xed, + 0xcc, 0x37, 0xdf, 0xcc, 0x7c, 0xbb, 0x33, 0x12, 0xfc, 0x6a, 0xf0, 0x13, 0x57, 0x99, 0xab, 0x11, + 0x8f, 0x69, 0x7e, 0x8f, 0x18, 0xda, 0xf0, 0xa0, 0x47, 0x03, 0x72, 0xa0, 0x99, 0xd4, 0xa1, 0x3e, + 0x09, 0x68, 0x5f, 0xf5, 0x7c, 0x37, 0x70, 0xd1, 0x4e, 0x02, 0x54, 0x89, 0xc7, 0x54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47, 0x29, 0xb2, 0x72, 0xca, 0x9c, 0x3e, 0x8e, 0x3d, 0x02, 0xe1, 0x10, 0x3b, 0xf9, + 0x21, 0x9e, 0x42, 0x88, 0x31, 0xc7, 0xb1, 0x47, 0x68, 0xb5, 0x99, 0x3e, 0xa6, 0x09, 0x1f, 0x28, + 0xe4, 0x9b, 0xae, 0xaf, 0xbc, 0x4a, 0x7d, 0xf7, 0x67, 0x47, 0x1a, 0x94, 0xc4, 0x27, 0xf7, 0x88, + 0x41, 0xe5, 0x4a, 0x0c, 0xdb, 0x4a, 0x61, 0x52, 0x37, 0x73, 0xe0, 0x1c, 0xa3, 0x1f, 0x8d, 0xee, + 0x94, 0xd2, 0xcd, 0x9d, 0x52, 0xba, 0xbd, 0x53, 0x4a, 0xff, 0x47, 0x0a, 0x18, 0x45, 0x0a, 0xb8, + 0x89, 0x14, 0x70, 0x1b, 0x29, 0xe0, 0x75, 0xa4, 0x80, 0x27, 0x6f, 0x94, 0xd2, 0x5f, 0x3b, 0x05, + 0x7f, 0x79, 0xdf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x75, 0xfb, 0x5a, 0x79, 0x0c, 0x0b, 0x00, 0x00, } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/generated.proto b/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/generated.proto index f6b2f0dde1a..7dfc50d7eb6 100644 --- a/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/generated.proto @@ -33,6 +33,7 @@ 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 + // +listType=atomic repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1; } @@ -45,6 +46,7 @@ message ClusterRole { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic repeated PolicyRule rules = 2; // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. @@ -64,6 +66,7 @@ message ClusterRoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can only reference a ClusterRole in the global namespace. @@ -97,26 +100,31 @@ message ClusterRoleList { // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic repeated string nonResourceURLs = 5; } @@ -129,6 +137,7 @@ message Role { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic repeated PolicyRule rules = 2; } @@ -143,6 +152,7 @@ message RoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. diff --git a/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/types.go b/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/types.go index 4941cd2abce..f761f81a6f5 100644 --- a/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/rbac/v1beta1/types.go @@ -48,24 +48,29 @@ const ( // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,5,rep,name=nonResourceURLs"` } @@ -115,6 +120,7 @@ type Role struct { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` } @@ -137,6 +143,7 @@ type RoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. @@ -198,6 +205,7 @@ type ClusterRole struct { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic 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 @@ -211,6 +219,7 @@ 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 + // +listType=atomic ClusterRoleSelectors []metav1.LabelSelector `json:"clusterRoleSelectors,omitempty" protobuf:"bytes,1,rep,name=clusterRoleSelectors"` } @@ -233,6 +242,7 @@ type ClusterRoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can only reference a ClusterRole in the global namespace. diff --git a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/generated.pb.go index 2e8f9c724a5..6c6ba438e38 100644 --- a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/resource/v1alpha2/generated.proto +// source: k8s.io/api/resource/v1alpha2/generated.proto package v1alpha2 @@ -26,6 +26,7 @@ import ( proto "github.com/gogo/protobuf/proto" v1 "k8s.io/api/core/v1" + resource "k8s.io/apimachinery/pkg/api/resource" math "math" math_bits "math/bits" @@ -49,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AllocationResult) Reset() { *m = AllocationResult{} } func (*AllocationResult) ProtoMessage() {} func (*AllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{0} + return fileDescriptor_4312f5b44a31ec02, []int{0} } func (m *AllocationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,10 +75,346 @@ func (m *AllocationResult) XXX_DiscardUnknown() { var xxx_messageInfo_AllocationResult proto.InternalMessageInfo +func (m *AllocationResultModel) Reset() { *m = AllocationResultModel{} } +func (*AllocationResultModel) ProtoMessage() {} +func (*AllocationResultModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{1} +} +func (m *AllocationResultModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllocationResultModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *AllocationResultModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllocationResultModel.Merge(m, src) +} +func (m *AllocationResultModel) XXX_Size() int { + return m.Size() +} +func (m *AllocationResultModel) XXX_DiscardUnknown() { + xxx_messageInfo_AllocationResultModel.DiscardUnknown(m) +} + +var xxx_messageInfo_AllocationResultModel proto.InternalMessageInfo + +func (m *DriverAllocationResult) Reset() { *m = DriverAllocationResult{} } +func (*DriverAllocationResult) ProtoMessage() {} +func (*DriverAllocationResult) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{2} +} +func (m *DriverAllocationResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DriverAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DriverAllocationResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_DriverAllocationResult.Merge(m, src) +} +func (m *DriverAllocationResult) XXX_Size() int { + return m.Size() +} +func (m *DriverAllocationResult) XXX_DiscardUnknown() { + xxx_messageInfo_DriverAllocationResult.DiscardUnknown(m) +} + +var xxx_messageInfo_DriverAllocationResult proto.InternalMessageInfo + +func (m *DriverRequests) Reset() { *m = DriverRequests{} } +func (*DriverRequests) ProtoMessage() {} +func (*DriverRequests) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{3} +} +func (m *DriverRequests) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DriverRequests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DriverRequests) XXX_Merge(src proto.Message) { + xxx_messageInfo_DriverRequests.Merge(m, src) +} +func (m *DriverRequests) XXX_Size() int { + return m.Size() +} +func (m *DriverRequests) XXX_DiscardUnknown() { + xxx_messageInfo_DriverRequests.DiscardUnknown(m) +} + +var xxx_messageInfo_DriverRequests proto.InternalMessageInfo + +func (m *NamedResourcesAllocationResult) Reset() { *m = NamedResourcesAllocationResult{} } +func (*NamedResourcesAllocationResult) ProtoMessage() {} +func (*NamedResourcesAllocationResult) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{4} +} +func (m *NamedResourcesAllocationResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesAllocationResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesAllocationResult.Merge(m, src) +} +func (m *NamedResourcesAllocationResult) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesAllocationResult) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesAllocationResult.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesAllocationResult proto.InternalMessageInfo + +func (m *NamedResourcesAttribute) Reset() { *m = NamedResourcesAttribute{} } +func (*NamedResourcesAttribute) ProtoMessage() {} +func (*NamedResourcesAttribute) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{5} +} +func (m *NamedResourcesAttribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesAttribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesAttribute.Merge(m, src) +} +func (m *NamedResourcesAttribute) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesAttribute) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesAttribute.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesAttribute proto.InternalMessageInfo + +func (m *NamedResourcesAttributeValue) Reset() { *m = NamedResourcesAttributeValue{} } +func (*NamedResourcesAttributeValue) ProtoMessage() {} +func (*NamedResourcesAttributeValue) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{6} +} +func (m *NamedResourcesAttributeValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesAttributeValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesAttributeValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesAttributeValue.Merge(m, src) +} +func (m *NamedResourcesAttributeValue) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesAttributeValue) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesAttributeValue.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesAttributeValue proto.InternalMessageInfo + +func (m *NamedResourcesFilter) Reset() { *m = NamedResourcesFilter{} } +func (*NamedResourcesFilter) ProtoMessage() {} +func (*NamedResourcesFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{7} +} +func (m *NamedResourcesFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesFilter.Merge(m, src) +} +func (m *NamedResourcesFilter) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesFilter) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesFilter proto.InternalMessageInfo + +func (m *NamedResourcesInstance) Reset() { *m = NamedResourcesInstance{} } +func (*NamedResourcesInstance) ProtoMessage() {} +func (*NamedResourcesInstance) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{8} +} +func (m *NamedResourcesInstance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesInstance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesInstance) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesInstance.Merge(m, src) +} +func (m *NamedResourcesInstance) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesInstance) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesInstance.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesInstance proto.InternalMessageInfo + +func (m *NamedResourcesIntSlice) Reset() { *m = NamedResourcesIntSlice{} } +func (*NamedResourcesIntSlice) ProtoMessage() {} +func (*NamedResourcesIntSlice) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{9} +} +func (m *NamedResourcesIntSlice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesIntSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesIntSlice) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesIntSlice.Merge(m, src) +} +func (m *NamedResourcesIntSlice) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesIntSlice) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesIntSlice.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesIntSlice proto.InternalMessageInfo + +func (m *NamedResourcesRequest) Reset() { *m = NamedResourcesRequest{} } +func (*NamedResourcesRequest) ProtoMessage() {} +func (*NamedResourcesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{10} +} +func (m *NamedResourcesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesRequest.Merge(m, src) +} +func (m *NamedResourcesRequest) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesRequest proto.InternalMessageInfo + +func (m *NamedResourcesResources) Reset() { *m = NamedResourcesResources{} } +func (*NamedResourcesResources) ProtoMessage() {} +func (*NamedResourcesResources) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{11} +} +func (m *NamedResourcesResources) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesResources) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesResources.Merge(m, src) +} +func (m *NamedResourcesResources) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesResources) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesResources.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesResources proto.InternalMessageInfo + +func (m *NamedResourcesStringSlice) Reset() { *m = NamedResourcesStringSlice{} } +func (*NamedResourcesStringSlice) ProtoMessage() {} +func (*NamedResourcesStringSlice) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{12} +} +func (m *NamedResourcesStringSlice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesStringSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesStringSlice) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesStringSlice.Merge(m, src) +} +func (m *NamedResourcesStringSlice) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesStringSlice) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesStringSlice.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesStringSlice proto.InternalMessageInfo + func (m *PodSchedulingContext) Reset() { *m = PodSchedulingContext{} } func (*PodSchedulingContext) ProtoMessage() {} func (*PodSchedulingContext) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{1} + return fileDescriptor_4312f5b44a31ec02, []int{13} } func (m *PodSchedulingContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +442,7 @@ var xxx_messageInfo_PodSchedulingContext proto.InternalMessageInfo func (m *PodSchedulingContextList) Reset() { *m = PodSchedulingContextList{} } func (*PodSchedulingContextList) ProtoMessage() {} func (*PodSchedulingContextList) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{2} + return fileDescriptor_4312f5b44a31ec02, []int{14} } func (m *PodSchedulingContextList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +470,7 @@ var xxx_messageInfo_PodSchedulingContextList proto.InternalMessageInfo func (m *PodSchedulingContextSpec) Reset() { *m = PodSchedulingContextSpec{} } func (*PodSchedulingContextSpec) ProtoMessage() {} func (*PodSchedulingContextSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{3} + return fileDescriptor_4312f5b44a31ec02, []int{15} } func (m *PodSchedulingContextSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +498,7 @@ var xxx_messageInfo_PodSchedulingContextSpec proto.InternalMessageInfo func (m *PodSchedulingContextStatus) Reset() { *m = PodSchedulingContextStatus{} } func (*PodSchedulingContextStatus) ProtoMessage() {} func (*PodSchedulingContextStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{4} + return fileDescriptor_4312f5b44a31ec02, []int{16} } func (m *PodSchedulingContextStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +526,7 @@ var xxx_messageInfo_PodSchedulingContextStatus proto.InternalMessageInfo func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{5} + return fileDescriptor_4312f5b44a31ec02, []int{17} } func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +554,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } func (*ResourceClaimConsumerReference) ProtoMessage() {} func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{6} + return fileDescriptor_4312f5b44a31ec02, []int{18} } func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -245,7 +582,7 @@ var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } func (*ResourceClaimList) ProtoMessage() {} func (*ResourceClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{7} + return fileDescriptor_4312f5b44a31ec02, []int{19} } func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,10 +607,66 @@ func (m *ResourceClaimList) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo +func (m *ResourceClaimParameters) Reset() { *m = ResourceClaimParameters{} } +func (*ResourceClaimParameters) ProtoMessage() {} +func (*ResourceClaimParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{20} +} +func (m *ResourceClaimParameters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimParameters.Merge(m, src) +} +func (m *ResourceClaimParameters) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimParameters) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimParameters proto.InternalMessageInfo + +func (m *ResourceClaimParametersList) Reset() { *m = ResourceClaimParametersList{} } +func (*ResourceClaimParametersList) ProtoMessage() {} +func (*ResourceClaimParametersList) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{21} +} +func (m *ResourceClaimParametersList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimParametersList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimParametersList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimParametersList.Merge(m, src) +} +func (m *ResourceClaimParametersList) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimParametersList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimParametersList.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimParametersList proto.InternalMessageInfo + func (m *ResourceClaimParametersReference) Reset() { *m = ResourceClaimParametersReference{} } func (*ResourceClaimParametersReference) ProtoMessage() {} func (*ResourceClaimParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{8} + return fileDescriptor_4312f5b44a31ec02, []int{22} } func (m *ResourceClaimParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -301,7 +694,7 @@ var xxx_messageInfo_ResourceClaimParametersReference proto.InternalMessageInfo func (m *ResourceClaimSchedulingStatus) Reset() { *m = ResourceClaimSchedulingStatus{} } func (*ResourceClaimSchedulingStatus) ProtoMessage() {} func (*ResourceClaimSchedulingStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{9} + return fileDescriptor_4312f5b44a31ec02, []int{23} } func (m *ResourceClaimSchedulingStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -329,7 +722,7 @@ var xxx_messageInfo_ResourceClaimSchedulingStatus proto.InternalMessageInfo func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } func (*ResourceClaimSpec) ProtoMessage() {} func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{10} + return fileDescriptor_4312f5b44a31ec02, []int{24} } func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -357,7 +750,7 @@ var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } func (*ResourceClaimStatus) ProtoMessage() {} func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{11} + return fileDescriptor_4312f5b44a31ec02, []int{25} } func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -385,7 +778,7 @@ var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } func (*ResourceClaimTemplate) ProtoMessage() {} func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{12} + return fileDescriptor_4312f5b44a31ec02, []int{26} } func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -413,7 +806,7 @@ var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } func (*ResourceClaimTemplateList) ProtoMessage() {} func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{13} + return fileDescriptor_4312f5b44a31ec02, []int{27} } func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -441,7 +834,7 @@ var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } func (*ResourceClaimTemplateSpec) ProtoMessage() {} func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{14} + return fileDescriptor_4312f5b44a31ec02, []int{28} } func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -469,7 +862,7 @@ var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo func (m *ResourceClass) Reset() { *m = ResourceClass{} } func (*ResourceClass) ProtoMessage() {} func (*ResourceClass) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{15} + return fileDescriptor_4312f5b44a31ec02, []int{29} } func (m *ResourceClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -497,7 +890,7 @@ var xxx_messageInfo_ResourceClass proto.InternalMessageInfo func (m *ResourceClassList) Reset() { *m = ResourceClassList{} } func (*ResourceClassList) ProtoMessage() {} func (*ResourceClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{16} + return fileDescriptor_4312f5b44a31ec02, []int{30} } func (m *ResourceClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,15 +915,15 @@ func (m *ResourceClassList) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceClassList proto.InternalMessageInfo -func (m *ResourceClassParametersReference) Reset() { *m = ResourceClassParametersReference{} } -func (*ResourceClassParametersReference) ProtoMessage() {} -func (*ResourceClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{17} +func (m *ResourceClassParameters) Reset() { *m = ResourceClassParameters{} } +func (*ResourceClassParameters) ProtoMessage() {} +func (*ResourceClassParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{31} } -func (m *ResourceClassParametersReference) XXX_Unmarshal(b []byte) error { +func (m *ResourceClassParameters) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ResourceClassParametersReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ResourceClassParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -538,27 +931,27 @@ func (m *ResourceClassParametersReference) XXX_Marshal(b []byte, deterministic b } return b[:n], nil } -func (m *ResourceClassParametersReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClassParametersReference.Merge(m, src) +func (m *ResourceClassParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClassParameters.Merge(m, src) } -func (m *ResourceClassParametersReference) XXX_Size() int { +func (m *ResourceClassParameters) XXX_Size() int { return m.Size() } -func (m *ResourceClassParametersReference) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClassParametersReference.DiscardUnknown(m) +func (m *ResourceClassParameters) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClassParameters.DiscardUnknown(m) } -var xxx_messageInfo_ResourceClassParametersReference proto.InternalMessageInfo +var xxx_messageInfo_ResourceClassParameters proto.InternalMessageInfo -func (m *ResourceHandle) Reset() { *m = ResourceHandle{} } -func (*ResourceHandle) ProtoMessage() {} -func (*ResourceHandle) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{18} +func (m *ResourceClassParametersList) Reset() { *m = ResourceClassParametersList{} } +func (*ResourceClassParametersList) ProtoMessage() {} +func (*ResourceClassParametersList) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{32} } -func (m *ResourceHandle) XXX_Unmarshal(b []byte) error { +func (m *ResourceClassParametersList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ResourceHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ResourceClassParametersList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -566,28 +959,350 @@ func (m *ResourceHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro } return b[:n], nil } -func (m *ResourceHandle) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceHandle.Merge(m, src) +func (m *ResourceClassParametersList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClassParametersList.Merge(m, src) } -func (m *ResourceHandle) XXX_Size() int { +func (m *ResourceClassParametersList) XXX_Size() int { return m.Size() } -func (m *ResourceHandle) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceHandle.DiscardUnknown(m) +func (m *ResourceClassParametersList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClassParametersList.DiscardUnknown(m) } -var xxx_messageInfo_ResourceHandle proto.InternalMessageInfo +var xxx_messageInfo_ResourceClassParametersList proto.InternalMessageInfo -func init() { - proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha2.AllocationResult") - proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContext") - proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextList") - proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextSpec") - proto.RegisterType((*PodSchedulingContextStatus)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextStatus") - proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaim") - proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimConsumerReference") - proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimList") - proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersReference") +func (m *ResourceClassParametersReference) Reset() { *m = ResourceClassParametersReference{} } +func (*ResourceClassParametersReference) ProtoMessage() {} +func (*ResourceClassParametersReference) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{33} +} +func (m *ResourceClassParametersReference) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClassParametersReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClassParametersReference) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClassParametersReference.Merge(m, src) +} +func (m *ResourceClassParametersReference) XXX_Size() int { + return m.Size() +} +func (m *ResourceClassParametersReference) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClassParametersReference.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClassParametersReference proto.InternalMessageInfo + +func (m *ResourceFilter) Reset() { *m = ResourceFilter{} } +func (*ResourceFilter) ProtoMessage() {} +func (*ResourceFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{34} +} +func (m *ResourceFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceFilter.Merge(m, src) +} +func (m *ResourceFilter) XXX_Size() int { + return m.Size() +} +func (m *ResourceFilter) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceFilter proto.InternalMessageInfo + +func (m *ResourceFilterModel) Reset() { *m = ResourceFilterModel{} } +func (*ResourceFilterModel) ProtoMessage() {} +func (*ResourceFilterModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{35} +} +func (m *ResourceFilterModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceFilterModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceFilterModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceFilterModel.Merge(m, src) +} +func (m *ResourceFilterModel) XXX_Size() int { + return m.Size() +} +func (m *ResourceFilterModel) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceFilterModel.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceFilterModel proto.InternalMessageInfo + +func (m *ResourceHandle) Reset() { *m = ResourceHandle{} } +func (*ResourceHandle) ProtoMessage() {} +func (*ResourceHandle) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{36} +} +func (m *ResourceHandle) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceHandle) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceHandle.Merge(m, src) +} +func (m *ResourceHandle) XXX_Size() int { + return m.Size() +} +func (m *ResourceHandle) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceHandle.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceHandle proto.InternalMessageInfo + +func (m *ResourceModel) Reset() { *m = ResourceModel{} } +func (*ResourceModel) ProtoMessage() {} +func (*ResourceModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{37} +} +func (m *ResourceModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceModel.Merge(m, src) +} +func (m *ResourceModel) XXX_Size() int { + return m.Size() +} +func (m *ResourceModel) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceModel.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceModel proto.InternalMessageInfo + +func (m *ResourceRequest) Reset() { *m = ResourceRequest{} } +func (*ResourceRequest) ProtoMessage() {} +func (*ResourceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{38} +} +func (m *ResourceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceRequest.Merge(m, src) +} +func (m *ResourceRequest) XXX_Size() int { + return m.Size() +} +func (m *ResourceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceRequest proto.InternalMessageInfo + +func (m *ResourceRequestModel) Reset() { *m = ResourceRequestModel{} } +func (*ResourceRequestModel) ProtoMessage() {} +func (*ResourceRequestModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{39} +} +func (m *ResourceRequestModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceRequestModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceRequestModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceRequestModel.Merge(m, src) +} +func (m *ResourceRequestModel) XXX_Size() int { + return m.Size() +} +func (m *ResourceRequestModel) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceRequestModel.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceRequestModel proto.InternalMessageInfo + +func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } +func (*ResourceSlice) ProtoMessage() {} +func (*ResourceSlice) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{40} +} +func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceSlice) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceSlice.Merge(m, src) +} +func (m *ResourceSlice) XXX_Size() int { + return m.Size() +} +func (m *ResourceSlice) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceSlice.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo + +func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } +func (*ResourceSliceList) ProtoMessage() {} +func (*ResourceSliceList) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{41} +} +func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceSliceList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceSliceList.Merge(m, src) +} +func (m *ResourceSliceList) XXX_Size() int { + return m.Size() +} +func (m *ResourceSliceList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceSliceList.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo + +func (m *StructuredResourceHandle) Reset() { *m = StructuredResourceHandle{} } +func (*StructuredResourceHandle) ProtoMessage() {} +func (*StructuredResourceHandle) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{42} +} +func (m *StructuredResourceHandle) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StructuredResourceHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *StructuredResourceHandle) XXX_Merge(src proto.Message) { + xxx_messageInfo_StructuredResourceHandle.Merge(m, src) +} +func (m *StructuredResourceHandle) XXX_Size() int { + return m.Size() +} +func (m *StructuredResourceHandle) XXX_DiscardUnknown() { + xxx_messageInfo_StructuredResourceHandle.DiscardUnknown(m) +} + +var xxx_messageInfo_StructuredResourceHandle proto.InternalMessageInfo + +func (m *VendorParameters) Reset() { *m = VendorParameters{} } +func (*VendorParameters) ProtoMessage() {} +func (*VendorParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{43} +} +func (m *VendorParameters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VendorParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *VendorParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_VendorParameters.Merge(m, src) +} +func (m *VendorParameters) XXX_Size() int { + return m.Size() +} +func (m *VendorParameters) XXX_DiscardUnknown() { + xxx_messageInfo_VendorParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_VendorParameters proto.InternalMessageInfo + +func init() { + proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha2.AllocationResult") + proto.RegisterType((*AllocationResultModel)(nil), "k8s.io.api.resource.v1alpha2.AllocationResultModel") + proto.RegisterType((*DriverAllocationResult)(nil), "k8s.io.api.resource.v1alpha2.DriverAllocationResult") + proto.RegisterType((*DriverRequests)(nil), "k8s.io.api.resource.v1alpha2.DriverRequests") + proto.RegisterType((*NamedResourcesAllocationResult)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAllocationResult") + proto.RegisterType((*NamedResourcesAttribute)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAttribute") + proto.RegisterType((*NamedResourcesAttributeValue)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAttributeValue") + proto.RegisterType((*NamedResourcesFilter)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesFilter") + proto.RegisterType((*NamedResourcesInstance)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesInstance") + proto.RegisterType((*NamedResourcesIntSlice)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesIntSlice") + proto.RegisterType((*NamedResourcesRequest)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesRequest") + proto.RegisterType((*NamedResourcesResources)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesResources") + proto.RegisterType((*NamedResourcesStringSlice)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesStringSlice") + proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContext") + proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextList") + proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextSpec") + proto.RegisterType((*PodSchedulingContextStatus)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextStatus") + proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaim") + proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimConsumerReference") + proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimList") + proto.RegisterType((*ResourceClaimParameters)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParameters") + proto.RegisterType((*ResourceClaimParametersList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersList") + proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersReference") proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSchedulingStatus") proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSpec") proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimStatus") @@ -596,94 +1311,168 @@ func init() { proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplateSpec") proto.RegisterType((*ResourceClass)(nil), "k8s.io.api.resource.v1alpha2.ResourceClass") proto.RegisterType((*ResourceClassList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassList") + proto.RegisterType((*ResourceClassParameters)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParameters") + proto.RegisterType((*ResourceClassParametersList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParametersList") proto.RegisterType((*ResourceClassParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParametersReference") + proto.RegisterType((*ResourceFilter)(nil), "k8s.io.api.resource.v1alpha2.ResourceFilter") + proto.RegisterType((*ResourceFilterModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceFilterModel") proto.RegisterType((*ResourceHandle)(nil), "k8s.io.api.resource.v1alpha2.ResourceHandle") + proto.RegisterType((*ResourceModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceModel") + proto.RegisterType((*ResourceRequest)(nil), "k8s.io.api.resource.v1alpha2.ResourceRequest") + proto.RegisterType((*ResourceRequestModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceRequestModel") + proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1alpha2.ResourceSlice") + proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1alpha2.ResourceSliceList") + proto.RegisterType((*StructuredResourceHandle)(nil), "k8s.io.api.resource.v1alpha2.StructuredResourceHandle") + proto.RegisterType((*VendorParameters)(nil), "k8s.io.api.resource.v1alpha2.VendorParameters") } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/resource/v1alpha2/generated.proto", fileDescriptor_3add37bbd52889e0) -} - -var fileDescriptor_3add37bbd52889e0 = []byte{ - // 1233 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x6e, 0x95, 0x4c, 0x1a, 0x37, 0x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99, 0xa9, 0xf8, 0xf6, - 0xa0, 0xf4, 0xbf, 0xfc, 0xf6, 0xa0, 0xb4, 0xa4, 0x29, 0x7e, 0x91, 0xdf, 0x1e, 0x13, 0xf3, 0x3c, - 0xff, 0xb7, 0x07, 0xff, 0x94, 0xe6, 0x7f, 0x69, 0x48, 0xac, 0xf4, 0x0d, 0x99, 0x7d, 0x4a, 0xef, - 0xa5, 0x02, 0x3c, 0xc2, 0x68, 0xf7, 0x51, 0x5d, 0xfe, 0x0d, 0xe0, 0x58, 0x37, 0x5f, 0x0b, 0xd5, - 0x44, 0xe5, 0x0a, 0xae, 0xef, 0x10, 0x46, 0xb0, 0x90, 0x98, 0xe6, 0xe3, 0x67, 0xcd, 0x85, 0x27, - 0xcf, 0x9a, 0x0b, 0x4f, 0x9f, 0x35, 0x17, 0x1e, 0x0e, 0x9a, 0xca, 0xe3, 0x41, 0x53, 0x79, 0x32, - 0x68, 0x2a, 0x4f, 0x07, 0x4d, 0xe5, 0x8f, 0x41, 0x53, 0x79, 0xf4, 0x67, 0x73, 0xe1, 0xd3, 0x0b, - 0xd3, 0x7e, 0x31, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0x67, 0xe4, 0xf6, 0x18, 0x69, 0x12, 0x00, - 0x00, + proto.RegisterFile("k8s.io/api/resource/v1alpha2/generated.proto", fileDescriptor_4312f5b44a31ec02) +} + +var fileDescriptor_4312f5b44a31ec02 = []byte{ + // 2242 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x1a, 0x4d, 0x6c, 0x1c, 0x57, + 0xd9, 0xb3, 0xbb, 0x89, 0xd7, 0x9f, 0xed, 0xb5, 0x33, 0xb6, 0xe3, 0x4d, 0xea, 0xee, 0x6e, 0x47, + 0x20, 0x2c, 0x70, 0x76, 0x1b, 0xa7, 0x4d, 0xa3, 0x52, 0x90, 0x32, 0x71, 0x13, 0x2c, 0x9a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xff, 0xff, 0x2a, 0x94, 0xb7, 0xe5, 0x3f, 0x28, + 0x00, 0x00, } func (m *AllocationResult) Marshal() (dAtA []byte, err error) { @@ -743,7 +1532,7 @@ func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PodSchedulingContext) Marshal() (dAtA []byte, err error) { +func (m *AllocationResultModel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -753,28 +1542,53 @@ func (m *PodSchedulingContext) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PodSchedulingContext) MarshalTo(dAtA []byte) (int, error) { +func (m *AllocationResultModel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AllocationResultModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.NamedResources != nil { + { + size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x1a + return len(dAtA) - i, nil +} + +func (m *DriverAllocationResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DriverAllocationResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DriverAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.AllocationResultModel.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -784,7 +1598,7 @@ func (m *PodSchedulingContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.VendorRequestParameters.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -796,7 +1610,7 @@ func (m *PodSchedulingContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PodSchedulingContextList) Marshal() (dAtA []byte, err error) { +func (m *DriverRequests) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -806,20 +1620,20 @@ func (m *PodSchedulingContextList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PodSchedulingContextList) MarshalTo(dAtA []byte) (int, error) { +func (m *DriverRequests) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContextList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DriverRequests) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Requests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -827,11 +1641,11 @@ func (m *PodSchedulingContextList) MarshalToSizedBuffer(dAtA []byte) (int, error i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.VendorParameters.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -839,11 +1653,16 @@ func (m *PodSchedulingContextList) MarshalToSizedBuffer(dAtA []byte) (int, error i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x12 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *PodSchedulingContextSpec) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesAllocationResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -853,34 +1672,25 @@ func (m *PodSchedulingContextSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PodSchedulingContextSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesAllocationResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContextSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.PotentialNodes) > 0 { - for iNdEx := len(m.PotentialNodes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PotentialNodes[iNdEx]) - copy(dAtA[i:], m.PotentialNodes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.PotentialNodes[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.SelectedNode) - copy(dAtA[i:], m.SelectedNode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelectedNode))) + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *PodSchedulingContextStatus) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesAttribute) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -890,34 +1700,35 @@ func (m *PodSchedulingContextStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PodSchedulingContextStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesAttribute) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContextStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.ResourceClaims) > 0 { - for iNdEx := len(m.ResourceClaims) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceClaims[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + { + size, err := m.NamedResourcesAttributeValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaim) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesAttributeValue) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -927,50 +1738,85 @@ func (m *ResourceClaim) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaim) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesAttributeValue) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesAttributeValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.VersionValue != nil { + i -= len(*m.VersionValue) + copy(dAtA[i:], *m.VersionValue) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.VersionValue))) + i-- + dAtA[i] = 0x52 + } + if m.StringSliceValue != nil { + { + size, err := m.StringSliceValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.IntSliceValue != nil { + { + size, err := m.IntSliceValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.IntValue != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.IntValue)) + i-- + dAtA[i] = 0x38 + } + if m.QuantityValue != nil { + { + size, err := m.QuantityValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + if m.StringValue != nil { + i -= len(*m.StringValue) + copy(dAtA[i:], *m.StringValue) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.StringValue))) + i-- + dAtA[i] = 0x2a + } + if m.BoolValue != nil { + i-- + if *m.BoolValue { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesFilter) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -980,40 +1826,25 @@ func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimConsumerReference) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesFilter) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimConsumerReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i-- - dAtA[i] = 0x2a - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x22 - i -= len(m.Resource) - copy(dAtA[i:], m.Resource) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) - i-- - dAtA[i] = 0x1a - i -= len(m.APIGroup) - copy(dAtA[i:], m.APIGroup) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) + i -= len(m.Selector) + copy(dAtA[i:], m.Selector) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Selector))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesInstance) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1023,20 +1854,20 @@ func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimList) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesInstance) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesInstance) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1047,20 +1878,15 @@ func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimParametersReference) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesIntSlice) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1070,35 +1896,27 @@ func (m *ResourceClaimParametersReference) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimParametersReference) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesIntSlice) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimParametersReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesIntSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0x12 - i -= len(m.APIGroup) - copy(dAtA[i:], m.APIGroup) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) - i-- - dAtA[i] = 0xa + if len(m.Ints) > 0 { + for iNdEx := len(m.Ints) - 1; iNdEx >= 0; iNdEx-- { + i = encodeVarintGenerated(dAtA, i, uint64(m.Ints[iNdEx])) + i-- + dAtA[i] = 0x8 + } + } return len(dAtA) - i, nil } -func (m *ResourceClaimSchedulingStatus) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1108,34 +1926,25 @@ func (m *ResourceClaimSchedulingStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimSchedulingStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimSchedulingStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.UnsuitableNodes) > 0 { - for iNdEx := len(m.UnsuitableNodes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UnsuitableNodes[iNdEx]) - copy(dAtA[i:], m.UnsuitableNodes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UnsuitableNodes[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i -= len(m.Selector) + copy(dAtA[i:], m.Selector) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Selector))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesResources) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1145,42 +1954,34 @@ func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesResources) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.AllocationMode) - copy(dAtA[i:], m.AllocationMode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllocationMode))) - i-- - dAtA[i] = 0x1a - if m.ParametersRef != nil { - { - size, err := m.ParametersRef.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Instances) > 0 { + for iNdEx := len(m.Instances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Instances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x12 } - i -= len(m.ResourceClassName) - copy(dAtA[i:], m.ResourceClassName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceClassName))) - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesStringSlice) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1190,59 +1991,29 @@ func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesStringSlice) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesStringSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i-- - if m.DeallocationRequested { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - if len(m.ReservedFor) > 0 { - for iNdEx := len(m.ReservedFor) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ReservedFor[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + if len(m.Strings) > 0 { + for iNdEx := len(m.Strings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Strings[iNdEx]) + copy(dAtA[i:], m.Strings[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strings[iNdEx]))) i-- - dAtA[i] = 0x1a - } - } - if m.Allocation != nil { - { - size, err := m.Allocation.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x12 } - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error) { +func (m *PodSchedulingContext) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1252,16 +2023,26 @@ func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimTemplate) MarshalTo(dAtA []byte) (int, error) { +func (m *PodSchedulingContext) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PodSchedulingContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1285,7 +2066,7 @@ func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error) { +func (m *PodSchedulingContextList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1295,12 +2076,12 @@ func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimTemplateList) MarshalTo(dAtA []byte) (int, error) { +func (m *PodSchedulingContextList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PodSchedulingContextList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1332,7 +2113,7 @@ func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error) { +func (m *PodSchedulingContextSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1342,16 +2123,100 @@ func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimTemplateSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *PodSchedulingContextSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PodSchedulingContextSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PotentialNodes) > 0 { + for iNdEx := len(m.PotentialNodes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PotentialNodes[iNdEx]) + copy(dAtA[i:], m.PotentialNodes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.PotentialNodes[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.SelectedNode) + copy(dAtA[i:], m.SelectedNode) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelectedNode))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PodSchedulingContextStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PodSchedulingContextStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PodSchedulingContextStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ResourceClaims) > 0 { + for iNdEx := len(m.ResourceClaims) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ResourceClaims[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ResourceClaim) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaim) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1375,7 +2240,7 @@ func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *ResourceClass) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1385,31 +2250,131 @@ func (m *ResourceClass) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClass) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimConsumerReference) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimConsumerReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.SuitableNodes != nil { - { - size, err := m.SuitableNodes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + i -= len(m.UID) + copy(dAtA[i:], m.UID) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i-- + dAtA[i] = 0x2a + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x22 + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0x1a + i -= len(m.APIGroup) + copy(dAtA[i:], m.APIGroup) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x22 } - if m.ParametersRef != nil { + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DriverRequests) > 0 { + for iNdEx := len(m.DriverRequests) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DriverRequests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + i-- + if m.Shareable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + if m.GeneratedFrom != nil { { - size, err := m.ParametersRef.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.GeneratedFrom.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1417,13 +2382,8 @@ func (m *ResourceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) - i-- - dAtA[i] = 0x12 { size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1437,7 +2397,7 @@ func (m *ResourceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClassList) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimParametersList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1447,12 +2407,12 @@ func (m *ResourceClassList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClassList) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimParametersList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimParametersList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1484,7 +2444,7 @@ func (m *ResourceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClassParametersReference) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimParametersReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1494,21 +2454,16 @@ func (m *ResourceClassParametersReference) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClassParametersReference) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimParametersReference) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClassParametersReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimParametersReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x22 i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) @@ -1527,7 +2482,7 @@ func (m *ResourceClassParametersReference) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *ResourceHandle) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimSchedulingStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1537,626 +2492,5457 @@ func (m *ResourceHandle) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceHandle) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimSchedulingStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceHandle) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimSchedulingStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + if len(m.UnsuitableNodes) > 0 { + for iNdEx := len(m.UnsuitableNodes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UnsuitableNodes[iNdEx]) + copy(dAtA[i:], m.UnsuitableNodes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UnsuitableNodes[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *AllocationResult) Size() (n int) { - if m == nil { - return 0 - } + +func (m *ResourceClaimSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.ResourceHandles) > 0 { - for _, e := range m.ResourceHandles { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + i -= len(m.AllocationMode) + copy(dAtA[i:], m.AllocationMode) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllocationMode))) + i-- + dAtA[i] = 0x1a + if m.ParametersRef != nil { + { + size, err := m.ParametersRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - if m.AvailableOnNodes != nil { - l = m.AvailableOnNodes.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 2 - return n + i -= len(m.ResourceClassName) + copy(dAtA[i:], m.ResourceClassName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceClassName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *PodSchedulingContext) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - 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 + return dAtA[:n], nil } -func (m *PodSchedulingContextList) Size() (n int) { - if m == nil { - return 0 - } - 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 *ResourceClaimStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContextSpec) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SelectedNode) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.PotentialNodes) > 0 { - for _, s := range m.PotentialNodes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) + i-- + if m.DeallocationRequested { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + if len(m.ReservedFor) > 0 { + for iNdEx := len(m.ReservedFor) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ReservedFor[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } } - return n + if m.Allocation != nil { + { + size, err := m.Allocation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *PodSchedulingContextStatus) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ResourceClaimTemplate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.ResourceClaims) > 0 { - for _, e := range m.ResourceClaims { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClaim) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - 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 + return dAtA[:n], nil } -func (m *ResourceClaimConsumerReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.APIGroup) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Resource) - 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 *ResourceClaimTemplateList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimList) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClaimParametersReference) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - 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 + return dAtA[:n], nil } -func (m *ResourceClaimSchedulingStatus) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClaimTemplateSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.UnsuitableNodes) > 0 { - for _, s := range m.UnsuitableNodes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClaimSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ResourceClassName) - n += 1 + l + sovGenerated(uint64(l)) - if m.ParametersRef != nil { - l = m.ParametersRef.Size() - n += 1 + l + sovGenerated(uint64(l)) +func (m *ResourceClass) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - l = len(m.AllocationMode) - n += 1 + l + sovGenerated(uint64(l)) - return n + return dAtA[:n], nil } -func (m *ResourceClaimStatus) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClass) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - if m.Allocation != nil { - l = m.Allocation.Size() - n += 1 + l + sovGenerated(uint64(l)) + if m.StructuredParameters != nil { + i-- + if *m.StructuredParameters { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 } - if len(m.ReservedFor) > 0 { - for _, e := range m.ReservedFor { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + if m.SuitableNodes != nil { + { + size, err := m.SuitableNodes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 } - n += 2 - return n + if m.ParametersRef != nil { + { + size, err := m.ParametersRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClaimTemplate) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClassList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - 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 + return dAtA[:n], nil } -func (m *ResourceClaimTemplateList) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClassList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClaimTemplateSpec) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClassParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - 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 + return dAtA[:n], nil } -func (m *ResourceClass) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClassParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClassParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - if m.ParametersRef != nil { - l = m.ParametersRef.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Filters) > 0 { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Filters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } } - if m.SuitableNodes != nil { - l = m.SuitableNodes.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.VendorParameters) > 0 { + for iNdEx := len(m.VendorParameters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.VendorParameters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } - return n + if m.GeneratedFrom != nil { + { + size, err := m.GeneratedFrom.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClassList) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClassParametersList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ResourceClassParametersList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClassParametersList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClassParametersReference) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClassParametersReference) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ResourceClassParametersReference) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClassParametersReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - return n + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x22 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + i -= len(m.Kind) + copy(dAtA[i:], m.Kind) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i-- + dAtA[i] = 0x12 + i -= len(m.APIGroup) + copy(dAtA[i:], m.APIGroup) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceHandle) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ResourceFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Data) - n += 1 + l + sovGenerated(uint64(l)) - return n + { + size, err := m.ResourceFilterModel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 +func (m *ResourceFilterModel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + +func (m *ResourceFilterModel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (this *AllocationResult) String() string { - if this == nil { - return "nil" - } - repeatedStringForResourceHandles := "[]ResourceHandle{" - for _, f := range this.ResourceHandles { - repeatedStringForResourceHandles += strings.Replace(strings.Replace(f.String(), "ResourceHandle", "ResourceHandle", 1), `&`, ``, 1) + "," + +func (m *ResourceFilterModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NamedResources != nil { + { + size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - repeatedStringForResourceHandles += "}" - s := strings.Join([]string{`&AllocationResult{`, - `ResourceHandles:` + repeatedStringForResourceHandles + `,`, - `AvailableOnNodes:` + strings.Replace(fmt.Sprintf("%v", this.AvailableOnNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, - `Shareable:` + fmt.Sprintf("%v", this.Shareable) + `,`, - `}`, - }, "") - return s + return len(dAtA) - i, nil } -func (this *PodSchedulingContext) String() string { - if this == nil { - return "nil" + +func (m *ResourceHandle) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - s := strings.Join([]string{`&PodSchedulingContext{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSchedulingContextSpec", "PodSchedulingContextSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodSchedulingContextStatus", "PodSchedulingContextStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *PodSchedulingContextList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]PodSchedulingContext{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PodSchedulingContext", "PodSchedulingContext", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&PodSchedulingContextList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + +func (m *ResourceHandle) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (this *PodSchedulingContextSpec) String() string { - if this == nil { - return "nil" + +func (m *ResourceHandle) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.StructuredData != nil { + { + size, err := m.StructuredData.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } - s := strings.Join([]string{`&PodSchedulingContextSpec{`, - `SelectedNode:` + fmt.Sprintf("%v", this.SelectedNode) + `,`, - `PotentialNodes:` + fmt.Sprintf("%v", this.PotentialNodes) + `,`, - `}`, - }, "") - return s + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (this *PodSchedulingContextStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForResourceClaims := "[]ResourceClaimSchedulingStatus{" - for _, f := range this.ResourceClaims { - repeatedStringForResourceClaims += strings.Replace(strings.Replace(f.String(), "ResourceClaimSchedulingStatus", "ResourceClaimSchedulingStatus", 1), `&`, ``, 1) + "," + +func (m *ResourceModel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - repeatedStringForResourceClaims += "}" - s := strings.Join([]string{`&PodSchedulingContextStatus{`, - `ResourceClaims:` + repeatedStringForResourceClaims + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *ResourceClaim) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaim{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceClaimStatus", "ResourceClaimStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + +func (m *ResourceModel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (this *ResourceClaimConsumerReference) String() string { - if this == nil { - return "nil" + +func (m *ResourceModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NamedResources != nil { + { + size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - s := strings.Join([]string{`&ResourceClaimConsumerReference{`, - `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, - `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `}`, - }, "") - return s + return len(dAtA) - i, nil } -func (this *ResourceClaimList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ResourceClaim{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaim", "ResourceClaim", 1), `&`, ``, 1) + "," + +func (m *ResourceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceClaimList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *ResourceClaimParametersReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimParametersReference{`, - `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s + +func (m *ResourceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (this *ResourceClaimSchedulingStatus) String() string { - if this == nil { - return "nil" + +func (m *ResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ResourceRequestModel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - s := strings.Join([]string{`&ResourceClaimSchedulingStatus{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `UnsuitableNodes:` + fmt.Sprintf("%v", this.UnsuitableNodes) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimSpec) String() string { - if this == nil { - return "nil" + i-- + dAtA[i] = 0x12 + { + size, err := m.VendorParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - s := strings.Join([]string{`&ResourceClaimSpec{`, - `ResourceClassName:` + fmt.Sprintf("%v", this.ResourceClassName) + `,`, - `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClaimParametersReference", "ResourceClaimParametersReference", 1) + `,`, - `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`, - `}`, - }, "") - return s + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (this *ResourceClaimStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForReservedFor := "[]ResourceClaimConsumerReference{" - for _, f := range this.ReservedFor { - repeatedStringForReservedFor += strings.Replace(strings.Replace(f.String(), "ResourceClaimConsumerReference", "ResourceClaimConsumerReference", 1), `&`, ``, 1) + "," + +func (m *ResourceRequestModel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - repeatedStringForReservedFor += "}" - s := strings.Join([]string{`&ResourceClaimStatus{`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `Allocation:` + strings.Replace(this.Allocation.String(), "AllocationResult", "AllocationResult", 1) + `,`, - `ReservedFor:` + repeatedStringForReservedFor + `,`, - `DeallocationRequested:` + fmt.Sprintf("%v", this.DeallocationRequested) + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *ResourceClaimTemplate) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimTemplateSpec", "ResourceClaimTemplateSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + +func (m *ResourceRequestModel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (this *ResourceClaimTemplateList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ResourceClaimTemplate{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimTemplate", "ResourceClaimTemplate", 1), `&`, ``, 1) + "," + +func (m *ResourceRequestModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NamedResources != nil { + { + size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceClaimTemplateList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + return len(dAtA) - i, nil } -func (this *ResourceClaimTemplateSpec) String() string { - if this == nil { - return "nil" + +func (m *ResourceSlice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - s := strings.Join([]string{`&ResourceClaimTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *ResourceClass) String() string { - if this == nil { + +func (m *ResourceSlice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ResourceModel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0x1a + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceSliceList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceSliceList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StructuredResourceHandle) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StructuredResourceHandle) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StructuredResourceHandle) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x22 + { + size, err := m.VendorClaimParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.VendorClassParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *VendorParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VendorParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VendorParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AllocationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ResourceHandles) > 0 { + for _, e := range m.ResourceHandles { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.AvailableOnNodes != nil { + l = m.AvailableOnNodes.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 2 + return n +} + +func (m *AllocationResultModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NamedResources != nil { + l = m.NamedResources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *DriverAllocationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.VendorRequestParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.AllocationResultModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *DriverRequests) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.VendorParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Requests) > 0 { + for _, e := range m.Requests { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *NamedResourcesAllocationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *NamedResourcesAttribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = m.NamedResourcesAttributeValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *NamedResourcesAttributeValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BoolValue != nil { + n += 2 + } + if m.StringValue != nil { + l = len(*m.StringValue) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.QuantityValue != nil { + l = m.QuantityValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.IntValue != nil { + n += 1 + sovGenerated(uint64(*m.IntValue)) + } + if m.IntSliceValue != nil { + l = m.IntSliceValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.StringSliceValue != nil { + l = m.StringSliceValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.VersionValue != nil { + l = len(*m.VersionValue) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *NamedResourcesFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Selector) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *NamedResourcesInstance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *NamedResourcesIntSlice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Ints) > 0 { + for _, e := range m.Ints { + n += 1 + sovGenerated(uint64(e)) + } + } + return n +} + +func (m *NamedResourcesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Selector) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *NamedResourcesResources) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Instances) > 0 { + for _, e := range m.Instances { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *NamedResourcesStringSlice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Strings) > 0 { + for _, s := range m.Strings { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PodSchedulingContext) Size() (n int) { + if m == nil { + return 0 + } + 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 *PodSchedulingContextList) Size() (n int) { + if m == nil { + return 0 + } + 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 *PodSchedulingContextSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SelectedNode) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.PotentialNodes) > 0 { + for _, s := range m.PotentialNodes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PodSchedulingContextStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ResourceClaims) > 0 { + for _, e := range m.ResourceClaims { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ResourceClaim) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimConsumerReference) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.APIGroup) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Resource) + 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 *ResourceClaimList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.GeneratedFrom != nil { + l = m.GeneratedFrom.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 2 + if len(m.DriverRequests) > 0 { + for _, e := range m.DriverRequests { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ResourceClaimParametersList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimParametersReference) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimSchedulingStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.UnsuitableNodes) > 0 { + for _, s := range m.UnsuitableNodes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ResourceClaimSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ResourceClassName) + n += 1 + l + sovGenerated(uint64(l)) + if m.ParametersRef != nil { + l = m.ParametersRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.AllocationMode) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceClaimStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + if m.Allocation != nil { + l = m.Allocation.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.ReservedFor) > 0 { + for _, e := range m.ReservedFor { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + n += 2 + return n +} + +func (m *ResourceClaimTemplate) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimTemplateList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimTemplateSpec) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClass) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + if m.ParametersRef != nil { + l = m.ParametersRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.SuitableNodes != nil { + l = m.SuitableNodes.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.StructuredParameters != nil { + n += 2 + } + return n +} + +func (m *ResourceClassList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClassParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.GeneratedFrom != nil { + l = m.GeneratedFrom.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.VendorParameters) > 0 { + for _, e := range m.VendorParameters { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Filters) > 0 { + for _, e := range m.Filters { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ResourceClassParametersList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClassParametersReference) Size() (n int) { + if m == nil { + return 0 + } + 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)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.ResourceFilterModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceFilterModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NamedResources != nil { + l = m.NamedResources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ResourceHandle) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Data) + n += 1 + l + sovGenerated(uint64(l)) + if m.StructuredData != nil { + l = m.StructuredData.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ResourceModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NamedResources != nil { + l = m.NamedResources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ResourceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.VendorParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.ResourceRequestModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceRequestModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NamedResources != nil { + l = m.NamedResources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ResourceSlice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.NodeName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.ResourceModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceSliceList) Size() (n int) { + if m == nil { + return 0 + } + 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 *StructuredResourceHandle) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.VendorClassParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.VendorClaimParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.NodeName) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *VendorParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Parameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *AllocationResult) String() string { + if this == nil { + return "nil" + } + repeatedStringForResourceHandles := "[]ResourceHandle{" + for _, f := range this.ResourceHandles { + repeatedStringForResourceHandles += strings.Replace(strings.Replace(f.String(), "ResourceHandle", "ResourceHandle", 1), `&`, ``, 1) + "," + } + repeatedStringForResourceHandles += "}" + s := strings.Join([]string{`&AllocationResult{`, + `ResourceHandles:` + repeatedStringForResourceHandles + `,`, + `AvailableOnNodes:` + strings.Replace(fmt.Sprintf("%v", this.AvailableOnNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, + `Shareable:` + fmt.Sprintf("%v", this.Shareable) + `,`, + `}`, + }, "") + return s +} +func (this *AllocationResultModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllocationResultModel{`, + `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesAllocationResult", "NamedResourcesAllocationResult", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DriverAllocationResult) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DriverAllocationResult{`, + `VendorRequestParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorRequestParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `AllocationResultModel:` + strings.Replace(strings.Replace(this.AllocationResultModel.String(), "AllocationResultModel", "AllocationResultModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DriverRequests) String() string { + if this == nil { + return "nil" + } + repeatedStringForRequests := "[]ResourceRequest{" + for _, f := range this.Requests { + repeatedStringForRequests += strings.Replace(strings.Replace(f.String(), "ResourceRequest", "ResourceRequest", 1), `&`, ``, 1) + "," + } + repeatedStringForRequests += "}" + s := strings.Join([]string{`&DriverRequests{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `VendorParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `Requests:` + repeatedStringForRequests + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesAllocationResult) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesAllocationResult{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesAttribute) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesAttribute{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `NamedResourcesAttributeValue:` + strings.Replace(strings.Replace(this.NamedResourcesAttributeValue.String(), "NamedResourcesAttributeValue", "NamedResourcesAttributeValue", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesAttributeValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesAttributeValue{`, + `BoolValue:` + valueToStringGenerated(this.BoolValue) + `,`, + `StringValue:` + valueToStringGenerated(this.StringValue) + `,`, + `QuantityValue:` + strings.Replace(fmt.Sprintf("%v", this.QuantityValue), "Quantity", "resource.Quantity", 1) + `,`, + `IntValue:` + valueToStringGenerated(this.IntValue) + `,`, + `IntSliceValue:` + strings.Replace(this.IntSliceValue.String(), "NamedResourcesIntSlice", "NamedResourcesIntSlice", 1) + `,`, + `StringSliceValue:` + strings.Replace(this.StringSliceValue.String(), "NamedResourcesStringSlice", "NamedResourcesStringSlice", 1) + `,`, + `VersionValue:` + valueToStringGenerated(this.VersionValue) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesFilter) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesFilter{`, + `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesInstance) String() string { + if this == nil { + return "nil" + } + repeatedStringForAttributes := "[]NamedResourcesAttribute{" + for _, f := range this.Attributes { + repeatedStringForAttributes += strings.Replace(strings.Replace(f.String(), "NamedResourcesAttribute", "NamedResourcesAttribute", 1), `&`, ``, 1) + "," + } + repeatedStringForAttributes += "}" + s := strings.Join([]string{`&NamedResourcesInstance{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Attributes:` + repeatedStringForAttributes + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesIntSlice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesIntSlice{`, + `Ints:` + fmt.Sprintf("%v", this.Ints) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesRequest{`, + `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesResources) String() string { + if this == nil { + return "nil" + } + repeatedStringForInstances := "[]NamedResourcesInstance{" + for _, f := range this.Instances { + repeatedStringForInstances += strings.Replace(strings.Replace(f.String(), "NamedResourcesInstance", "NamedResourcesInstance", 1), `&`, ``, 1) + "," + } + repeatedStringForInstances += "}" + s := strings.Join([]string{`&NamedResourcesResources{`, + `Instances:` + repeatedStringForInstances + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesStringSlice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesStringSlice{`, + `Strings:` + fmt.Sprintf("%v", this.Strings) + `,`, + `}`, + }, "") + return s +} +func (this *PodSchedulingContext) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSchedulingContext{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSchedulingContextSpec", "PodSchedulingContextSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodSchedulingContextStatus", "PodSchedulingContextStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodSchedulingContextList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]PodSchedulingContext{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PodSchedulingContext", "PodSchedulingContext", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&PodSchedulingContextList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *PodSchedulingContextSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSchedulingContextSpec{`, + `SelectedNode:` + fmt.Sprintf("%v", this.SelectedNode) + `,`, + `PotentialNodes:` + fmt.Sprintf("%v", this.PotentialNodes) + `,`, + `}`, + }, "") + return s +} +func (this *PodSchedulingContextStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForResourceClaims := "[]ResourceClaimSchedulingStatus{" + for _, f := range this.ResourceClaims { + repeatedStringForResourceClaims += strings.Replace(strings.Replace(f.String(), "ResourceClaimSchedulingStatus", "ResourceClaimSchedulingStatus", 1), `&`, ``, 1) + "," + } + repeatedStringForResourceClaims += "}" + s := strings.Join([]string{`&PodSchedulingContextStatus{`, + `ResourceClaims:` + repeatedStringForResourceClaims + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaim) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaim{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceClaimStatus", "ResourceClaimStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimConsumerReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimConsumerReference{`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClaim{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaim", "ResourceClaim", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClaimList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimParameters) String() string { + if this == nil { + return "nil" + } + repeatedStringForDriverRequests := "[]DriverRequests{" + for _, f := range this.DriverRequests { + repeatedStringForDriverRequests += strings.Replace(strings.Replace(f.String(), "DriverRequests", "DriverRequests", 1), `&`, ``, 1) + "," + } + repeatedStringForDriverRequests += "}" + s := strings.Join([]string{`&ResourceClaimParameters{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `GeneratedFrom:` + strings.Replace(this.GeneratedFrom.String(), "ResourceClaimParametersReference", "ResourceClaimParametersReference", 1) + `,`, + `Shareable:` + fmt.Sprintf("%v", this.Shareable) + `,`, + `DriverRequests:` + repeatedStringForDriverRequests + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimParametersList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClaimParameters{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimParameters", "ResourceClaimParameters", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClaimParametersList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimParametersReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimParametersReference{`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimSchedulingStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimSchedulingStatus{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UnsuitableNodes:` + fmt.Sprintf("%v", this.UnsuitableNodes) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimSpec{`, + `ResourceClassName:` + fmt.Sprintf("%v", this.ResourceClassName) + `,`, + `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClaimParametersReference", "ResourceClaimParametersReference", 1) + `,`, + `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForReservedFor := "[]ResourceClaimConsumerReference{" + for _, f := range this.ReservedFor { + repeatedStringForReservedFor += strings.Replace(strings.Replace(f.String(), "ResourceClaimConsumerReference", "ResourceClaimConsumerReference", 1), `&`, ``, 1) + "," + } + repeatedStringForReservedFor += "}" + s := strings.Join([]string{`&ResourceClaimStatus{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `Allocation:` + strings.Replace(this.Allocation.String(), "AllocationResult", "AllocationResult", 1) + `,`, + `ReservedFor:` + repeatedStringForReservedFor + `,`, + `DeallocationRequested:` + fmt.Sprintf("%v", this.DeallocationRequested) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimTemplate) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimTemplate{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimTemplateSpec", "ResourceClaimTemplateSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimTemplateList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClaimTemplate{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimTemplate", "ResourceClaimTemplate", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClaimTemplateList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimTemplateSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimTemplateSpec{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClass) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClass{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClassParametersReference", "ResourceClassParametersReference", 1) + `,`, + `SuitableNodes:` + strings.Replace(fmt.Sprintf("%v", this.SuitableNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, + `StructuredParameters:` + valueToStringGenerated(this.StructuredParameters) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClassList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClass{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClass", "ResourceClass", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClassList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClassParameters) String() string { + if this == nil { + return "nil" + } + repeatedStringForVendorParameters := "[]VendorParameters{" + for _, f := range this.VendorParameters { + repeatedStringForVendorParameters += strings.Replace(strings.Replace(f.String(), "VendorParameters", "VendorParameters", 1), `&`, ``, 1) + "," + } + repeatedStringForVendorParameters += "}" + repeatedStringForFilters := "[]ResourceFilter{" + for _, f := range this.Filters { + repeatedStringForFilters += strings.Replace(strings.Replace(f.String(), "ResourceFilter", "ResourceFilter", 1), `&`, ``, 1) + "," + } + repeatedStringForFilters += "}" + s := strings.Join([]string{`&ResourceClassParameters{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `GeneratedFrom:` + strings.Replace(this.GeneratedFrom.String(), "ResourceClassParametersReference", "ResourceClassParametersReference", 1) + `,`, + `VendorParameters:` + repeatedStringForVendorParameters + `,`, + `Filters:` + repeatedStringForFilters + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClassParametersList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClassParameters{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClassParameters", "ResourceClassParameters", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClassParametersList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClassParametersReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClassParametersReference{`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceFilter) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceFilter{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `ResourceFilterModel:` + strings.Replace(strings.Replace(this.ResourceFilterModel.String(), "ResourceFilterModel", "ResourceFilterModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceFilterModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceFilterModel{`, + `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesFilter", "NamedResourcesFilter", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceHandle) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceHandle{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `StructuredData:` + strings.Replace(this.StructuredData.String(), "StructuredResourceHandle", "StructuredResourceHandle", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceModel{`, + `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesResources", "NamedResourcesResources", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceRequest{`, + `VendorParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `ResourceRequestModel:` + strings.Replace(strings.Replace(this.ResourceRequestModel.String(), "ResourceRequestModel", "ResourceRequestModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceRequestModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceRequestModel{`, + `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesRequest", "NamedResourcesRequest", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceSlice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceSlice{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `ResourceModel:` + strings.Replace(strings.Replace(this.ResourceModel.String(), "ResourceModel", "ResourceModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceSliceList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceSlice{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceSlice", "ResourceSlice", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceSliceList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *StructuredResourceHandle) String() string { + if this == nil { + return "nil" + } + repeatedStringForResults := "[]DriverAllocationResult{" + for _, f := range this.Results { + repeatedStringForResults += strings.Replace(strings.Replace(f.String(), "DriverAllocationResult", "DriverAllocationResult", 1), `&`, ``, 1) + "," + } + repeatedStringForResults += "}" + s := strings.Join([]string{`&StructuredResourceHandle{`, + `VendorClassParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorClassParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `VendorClaimParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorClaimParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, + `Results:` + repeatedStringForResults + `,`, + `}`, + }, "") + return s +} +func (this *VendorParameters) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VendorParameters{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { return "nil" } - s := strings.Join([]string{`&ResourceClass{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClassParametersReference", "ResourceClassParametersReference", 1) + `,`, - `SuitableNodes:` + strings.Replace(fmt.Sprintf("%v", this.SuitableNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, - `}`, - }, "") - return s + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *AllocationResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceHandles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceHandles = append(m.ResourceHandles, ResourceHandle{}) + if err := m.ResourceHandles[len(m.ResourceHandles)-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 AvailableOnNodes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AvailableOnNodes == nil { + m.AvailableOnNodes = &v1.NodeSelector{} + } + if err := m.AvailableOnNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Shareable", 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.Shareable = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllocationResultModel) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllocationResultModel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllocationResultModel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NamedResources == nil { + m.NamedResources = &NamedResourcesAllocationResult{} + } + if err := m.NamedResources.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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DriverAllocationResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DriverAllocationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DriverAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VendorRequestParameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VendorRequestParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocationResultModel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AllocationResultModel.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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DriverRequests) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DriverRequests: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DriverRequests: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VendorParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Requests = append(m.Requests, ResourceRequest{}) + if err := m.Requests[len(m.Requests)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesAllocationResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesAllocationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesAllocationResult: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesAttribute) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesAttribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesAttribute: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 NamedResourcesAttributeValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NamedResourcesAttributeValue.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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesAttributeValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesAttributeValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesAttributeValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", 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.BoolValue = &b + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.StringValue = &s + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuantityValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.QuantityValue == nil { + m.QuantityValue = &resource.Quantity{} + } + if err := m.QuantityValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IntValue", 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.IntValue = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IntSliceValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.IntSliceValue == nil { + m.IntSliceValue = &NamedResourcesIntSlice{} + } + if err := m.IntSliceValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringSliceValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringSliceValue == nil { + m.StringSliceValue = &NamedResourcesStringSlice{} + } + if err := m.StringSliceValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.VersionValue = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesFilter: 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 stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesInstance) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesInstance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesInstance: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, NamedResourcesAttribute{}) + if err := m.Attributes[len(m.Attributes)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesIntSlice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesIntSlice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesIntSlice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + 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.Ints = append(m.Ints, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Ints) == 0 { + m.Ints = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + 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.Ints = append(m.Ints, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Ints", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesRequest: 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 stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesResources) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Instances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Instances = append(m.Instances, NamedResourcesInstance{}) + if err := m.Instances[len(m.Instances)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesStringSlice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesStringSlice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesStringSlice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Strings = append(m.Strings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSchedulingContext: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSchedulingContext: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSchedulingContextList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSchedulingContextList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, PodSchedulingContext{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSchedulingContextSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSchedulingContextSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelectedNode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelectedNode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PotentialNodes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PotentialNodes = append(m.PotentialNodes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSchedulingContextStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSchedulingContextStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceClaims", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceClaims = append(m.ResourceClaims, ResourceClaimSchedulingStatus{}) + if err := m.ResourceClaims[len(m.ResourceClaims)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaim) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaim: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaim: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimConsumerReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimConsumerReference: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ResourceClaim{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimParameters) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimParameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimParameters: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 GeneratedFrom", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GeneratedFrom == nil { + m.GeneratedFrom = &ResourceClaimParametersReference{} + } + if err := m.GeneratedFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Shareable", 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.Shareable = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverRequests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverRequests = append(m.DriverRequests, DriverRequests{}) + if err := m.DriverRequests[len(m.DriverRequests)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimParametersList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimParametersList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimParametersList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ResourceClaimParameters{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (this *ResourceClassList) String() string { - if this == nil { - return "nil" +func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimParametersReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimParametersReference: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - repeatedStringForItems := "[]ResourceClass{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClass", "ResourceClass", 1), `&`, ``, 1) + "," + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimSchedulingStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimSchedulingStatus: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 UnsuitableNodes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnsuitableNodes = append(m.UnsuitableNodes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceClassList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClassParametersReference) String() string { - if this == nil { - return "nil" + + if iNdEx > l { + return io.ErrUnexpectedEOF } - s := strings.Join([]string{`&ResourceClassParametersReference{`, - `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `}`, - }, "") - return s + return nil } -func (this *ResourceHandle) String() string { - if this == nil { - return "nil" +func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceClassName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceClassName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParametersRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ParametersRef == nil { + m.ParametersRef = &ResourceClaimParametersReference{} + } + if err := m.ParametersRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllocationMode = AllocationMode(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - s := strings.Join([]string{`&ResourceHandle{`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } -func (m *AllocationResult) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2175,19 +7961,51 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { if b < 0x80 { break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceHandles", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Allocation", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2214,14 +8032,16 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceHandles = append(m.ResourceHandles, ResourceHandle{}) - if err := m.ResourceHandles[len(m.ResourceHandles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Allocation == nil { + m.Allocation = &AllocationResult{} + } + if err := m.Allocation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AvailableOnNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ReservedFor", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2248,16 +8068,14 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.AvailableOnNodes == nil { - m.AvailableOnNodes = &v1.NodeSelector{} - } - if err := m.AvailableOnNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ReservedFor = append(m.ReservedFor, ResourceClaimConsumerReference{}) + if err := m.ReservedFor[len(m.ReservedFor)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Shareable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeallocationRequested", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -2274,7 +8092,7 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { break } } - m.Shareable = bool(v != 0) + m.DeallocationRequested = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2296,7 +8114,7 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2319,10 +8137,10 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContext: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimTemplate: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContext: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimTemplate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2391,39 +8209,6 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { 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 < 0 { - return ErrInvalidLengthGenerated - } - 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:]) @@ -2445,7 +8230,7 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2468,10 +8253,10 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextList: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimTemplateList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimTemplateList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2536,7 +8321,7 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, PodSchedulingContext{}) + m.Items = append(m.Items, ResourceClaimTemplate{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2562,7 +8347,7 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2585,17 +8370,17 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextSpec: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimTemplateSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SelectedNode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2605,29 +8390,30 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.SelectedNode = string(dAtA[iNdEx:postIndex]) + 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 PotentialNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2637,23 +8423,24 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.PotentialNodes = append(m.PotentialNodes, string(dAtA[iNdEx:postIndex])) + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -2676,7 +8463,7 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { +func (m *ResourceClass) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2699,15 +8486,15 @@ func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextStatus: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClass: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClass: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceClaims", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2734,11 +8521,135 @@ func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceClaims = append(m.ResourceClaims, ResourceClaimSchedulingStatus{}) - if err := m.ResourceClaims[len(m.ResourceClaims)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + 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 DriverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParametersRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ParametersRef == nil { + m.ParametersRef = &ResourceClassParametersReference{} + } + if err := m.ParametersRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SuitableNodes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SuitableNodes == nil { + m.SuitableNodes = &v1.NodeSelector{} + } + if err := m.SuitableNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - iNdEx = postIndex + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StructuredParameters", 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.StructuredParameters = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2760,7 +8671,7 @@ func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaim) Unmarshal(dAtA []byte) error { +func (m *ResourceClassList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2783,15 +8694,15 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaim: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClassList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaim: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClassList: 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) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2818,46 +8729,13 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + 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 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2884,7 +8762,8 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, ResourceClass{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2909,7 +8788,7 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { +func (m *ResourceClassParameters) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2932,17 +8811,17 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimConsumerReference: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClassParameters: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimConsumerReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClassParameters: 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) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2952,29 +8831,30 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.APIGroup = string(dAtA[iNdEx:postIndex]) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GeneratedFrom", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2984,29 +8864,33 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Resource = string(dAtA[iNdEx:postIndex]) + if m.GeneratedFrom == nil { + m.GeneratedFrom = &ResourceClassParametersReference{} + } + if err := m.GeneratedFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3016,29 +8900,31 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.VendorParameters = append(m.VendorParameters, VendorParameters{}) + if err := m.VendorParameters[len(m.VendorParameters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 5: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3048,23 +8934,25 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + m.Filters = append(m.Filters, ResourceFilter{}) + if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3087,7 +8975,7 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { +func (m *ResourceClassParametersList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3110,10 +8998,10 @@ func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimList: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClassParametersList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClassParametersList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3178,7 +9066,7 @@ func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ResourceClaim{}) + m.Items = append(m.Items, ResourceClassParameters{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3204,7 +9092,7 @@ func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { +func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3227,10 +9115,10 @@ func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimParametersReference: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClassParametersReference: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimParametersReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClassParametersReference: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3329,6 +9217,38 @@ func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { } 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3350,7 +9270,7 @@ func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { +func (m *ResourceFilter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3373,15 +9293,15 @@ func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimSchedulingStatus: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimSchedulingStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceFilter: 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) + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3409,13 +9329,13 @@ func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.DriverName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnsuitableNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceFilterModel", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3425,23 +9345,24 @@ func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.UnsuitableNodes = append(m.UnsuitableNodes, string(dAtA[iNdEx:postIndex])) + if err := m.ResourceFilterModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3464,7 +9385,7 @@ func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { +func (m *ResourceFilterModel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3479,93 +9400,25 @@ func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceClassName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceClassName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParametersRef", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParametersRef == nil { - m.ParametersRef = &ResourceClaimParametersReference{} - } - if err := m.ParametersRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 3: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceFilterModel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceFilterModel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3575,23 +9428,27 @@ func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.AllocationMode = AllocationMode(dAtA[iNdEx:postIndex]) + if m.NamedResources == nil { + m.NamedResources = &NamedResourcesFilter{} + } + if err := m.NamedResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3614,7 +9471,7 @@ func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { +func (m *ResourceHandle) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3637,10 +9494,10 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimStatus: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceHandle: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceHandle: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3677,9 +9534,9 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Allocation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3689,31 +9546,27 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Allocation == nil { - m.Allocation = &AllocationResult{} - } - if err := m.Allocation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Data = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReservedFor", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StructuredData", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3740,31 +9593,13 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ReservedFor = append(m.ReservedFor, ResourceClaimConsumerReference{}) - if err := m.ReservedFor[len(m.ReservedFor)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.StructuredData == nil { + m.StructuredData = &StructuredResourceHandle{} + } + if err := m.StructuredData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeallocationRequested", 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.DeallocationRequested = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3786,7 +9621,7 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { +func (m *ResourceModel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3809,15 +9644,15 @@ func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimTemplate: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceModel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimTemplate: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceModel: 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) + return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3844,40 +9679,10 @@ func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + if m.NamedResources == nil { + m.NamedResources = &NamedResourcesResources{} } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.NamedResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3902,7 +9707,7 @@ func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { +func (m *ResourceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3925,15 +9730,15 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimTemplateList: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimTemplateList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceRequest: 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) + return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3960,13 +9765,13 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.VendorParameters.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) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceRequestModel", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3993,8 +9798,7 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ResourceClaimTemplate{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ResourceRequestModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4019,7 +9823,7 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { +func (m *ResourceRequestModel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4042,15 +9846,15 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimTemplateSpec: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceRequestModel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceRequestModel: 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) + return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4077,40 +9881,10 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + if m.NamedResources == nil { + m.NamedResources = &NamedResourcesRequest{} } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.NamedResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4135,7 +9909,7 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClass) Unmarshal(dAtA []byte) error { +func (m *ResourceSlice) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4158,10 +9932,10 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClass: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceSlice: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClass: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceSlice: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4199,7 +9973,7 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4227,13 +10001,13 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DriverName = string(dAtA[iNdEx:postIndex]) + m.NodeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParametersRef", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4243,31 +10017,27 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.ParametersRef == nil { - m.ParametersRef = &ResourceClassParametersReference{} - } - if err := m.ParametersRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.DriverName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuitableNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceModel", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4294,10 +10064,7 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SuitableNodes == nil { - m.SuitableNodes = &v1.NodeSelector{} - } - if err := m.SuitableNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ResourceModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4322,7 +10089,7 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClassList) Unmarshal(dAtA []byte) error { +func (m *ResourceSliceList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4345,10 +10112,10 @@ func (m *ResourceClassList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClassList: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceSliceList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClassList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceSliceList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4413,7 +10180,7 @@ func (m *ResourceClassList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ResourceClass{}) + m.Items = append(m.Items, ResourceSlice{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4439,7 +10206,7 @@ func (m *ResourceClassList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { +func (m *StructuredResourceHandle) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4462,17 +10229,17 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClassParametersReference: wiretype end group for non-group") + return fmt.Errorf("proto: StructuredResourceHandle: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClassParametersReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StructuredResourceHandle: 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) + return fmt.Errorf("proto: wrong wireType = %d for field VendorClassParameters", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4482,29 +10249,30 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.APIGroup = string(dAtA[iNdEx:postIndex]) + if err := m.VendorClassParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VendorClaimParameters", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4514,27 +10282,28 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Kind = string(dAtA[iNdEx:postIndex]) + if err := m.VendorClaimParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4562,13 +10331,13 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.NodeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4578,23 +10347,25 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.Results = append(m.Results, DriverAllocationResult{}) + if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -4617,7 +10388,7 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceHandle) Unmarshal(dAtA []byte) error { +func (m *VendorParameters) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4640,10 +10411,10 @@ func (m *ResourceHandle) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceHandle: wiretype end group for non-group") + return fmt.Errorf("proto: VendorParameters: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceHandle: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VendorParameters: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4680,9 +10451,9 @@ func (m *ResourceHandle) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4692,23 +10463,24 @@ func (m *ResourceHandle) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = string(dAtA[iNdEx:postIndex]) + if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/generated.proto b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/generated.proto index f7748f9a1a2..4a6a5bab6c5 100644 --- a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/generated.proto @@ -22,6 +22,7 @@ syntax = "proto2"; package k8s.io.api.resource.v1alpha2; 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"; @@ -63,6 +64,150 @@ message AllocationResult { optional bool shareable = 3; } +// AllocationResultModel must have one and only one field set. +message AllocationResultModel { + // NamedResources describes the allocation result when using the named resources model. + // + // +optional + optional NamedResourcesAllocationResult namedResources = 1; +} + +// DriverAllocationResult contains vendor parameters and the allocation result for +// one request. +message DriverAllocationResult { + // VendorRequestParameters are the per-request configuration parameters + // from the time that the claim was allocated. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorRequestParameters = 1; + + optional AllocationResultModel allocationResultModel = 2; +} + +// DriverRequests describes all resources that are needed from one particular driver. +message DriverRequests { + // DriverName is the name used by the DRA driver kubelet plugin. + optional string driverName = 1; + + // VendorParameters are arbitrary setup parameters for all requests of the + // claim. They are ignored while allocating the claim. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorParameters = 2; + + // Requests describes all resources that are needed from the driver. + // +listType=atomic + repeated ResourceRequest requests = 3; +} + +// NamedResourcesAllocationResult is used in AllocationResultModel. +message NamedResourcesAllocationResult { + // Name is the name of the selected resource instance. + optional string name = 1; +} + +// NamedResourcesAttribute is a combination of an attribute name and its value. +message NamedResourcesAttribute { + // Name is unique identifier among all resource instances managed by + // the driver on the node. It must be a DNS subdomain. + optional string name = 1; + + optional NamedResourcesAttributeValue attributeValue = 2; +} + +// NamedResourcesAttributeValue must have one and only one field set. +message NamedResourcesAttributeValue { + // QuantityValue is a quantity. + optional k8s.io.apimachinery.pkg.api.resource.Quantity quantity = 6; + + // BoolValue is a true/false value. + optional bool bool = 2; + + // IntValue is a 64-bit integer. + optional int64 int = 7; + + // IntSliceValue is an array of 64-bit integers. + optional NamedResourcesIntSlice intSlice = 8; + + // StringValue is a string. + optional string string = 5; + + // StringSliceValue is an array of strings. + optional NamedResourcesStringSlice stringSlice = 9; + + // VersionValue is a semantic version according to semver.org spec 2.0.0. + optional string version = 10; +} + +// NamedResourcesFilter is used in ResourceFilterModel. +message NamedResourcesFilter { + // Selector is a CEL expression which must evaluate to true if a + // resource instance is suitable. The language is as defined in + // https://kubernetes.io/docs/reference/using-api/cel/ + // + // In addition, for each type NamedResourcesin AttributeValue there is a map that + // resolves to the corresponding value of the instance under evaluation. + // For example: + // + // attributes.quantity["a"].isGreaterThan(quantity("0")) && + // attributes.stringslice["b"].isSorted() + optional string selector = 1; +} + +// NamedResourcesInstance represents one individual hardware instance that can be selected based +// on its attributes. +message NamedResourcesInstance { + // Name is unique identifier among all resource instances managed by + // the driver on the node. It must be a DNS subdomain. + optional string name = 1; + + // Attributes defines the attributes of this resource instance. + // The name of each attribute must be unique. + // + // +listType=atomic + // +optional + repeated NamedResourcesAttribute attributes = 2; +} + +// NamedResourcesIntSlice contains a slice of 64-bit integers. +message NamedResourcesIntSlice { + // Ints is the slice of 64-bit integers. + // + // +listType=atomic + repeated int64 ints = 1; +} + +// NamedResourcesRequest is used in ResourceRequestModel. +message NamedResourcesRequest { + // Selector is a CEL expression which must evaluate to true if a + // resource instance is suitable. The language is as defined in + // https://kubernetes.io/docs/reference/using-api/cel/ + // + // In addition, for each type NamedResourcesin AttributeValue there is a map that + // resolves to the corresponding value of the instance under evaluation. + // For example: + // + // attributes.quantity["a"].isGreaterThan(quantity("0")) && + // attributes.stringslice["b"].isSorted() + optional string selector = 1; +} + +// NamedResourcesResources is used in ResourceModel. +message NamedResourcesResources { + // The list of all individual resources instances currently available. + // + // +listType=atomic + repeated NamedResourcesInstance instances = 1; +} + +// NamedResourcesStringSlice contains a slice of strings. +message NamedResourcesStringSlice { + // Strings is the slice of strings. + // + // +listType=atomic + repeated string strings = 1; +} + // PodSchedulingContext objects hold information that is needed to schedule // a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation // mode. @@ -176,6 +321,45 @@ message ResourceClaimList { repeated ResourceClaim items = 2; } +// ResourceClaimParameters defines resource requests for a ResourceClaim in an +// in-tree format understood by Kubernetes. +message ResourceClaimParameters { + // Standard object metadata + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the claim parameters when the parameter reference of the claim refers + // to some unknown type. + // +optional + optional ResourceClaimParametersReference generatedFrom = 2; + + // Shareable indicates whether the allocated claim is meant to be shareable + // by multiple consumers at the same time. + // +optional + optional bool shareable = 3; + + // DriverRequests describes all resources that are needed for the + // allocated claim. A single claim may use resources coming from + // different drivers. For each driver, this array has at most one + // entry which then may have one or more per-driver requests. + // + // May be empty, in which case the claim can always be allocated. + // + // +listType=atomic + repeated DriverRequests driverRequests = 4; +} + +// ResourceClaimParametersList is a collection of ResourceClaimParameters. +message ResourceClaimParametersList { + // Standard list metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of node resource capacity objects. + repeated ResourceClaimParameters items = 2; +} + // ResourceClaimParametersReference contains enough information to let you // locate the parameters for a ResourceClaim. The object must be in the same // namespace as the ResourceClaim. @@ -257,6 +441,8 @@ message ResourceClaimStatus { // // +listType=map // +listMapKey=uid + // +patchStrategy=merge + // +patchMergeKey=uid // +optional repeated ResourceClaimConsumerReference reservedFor = 3; @@ -342,6 +528,11 @@ message ResourceClass { // Setting this field is optional. If null, all nodes are candidates. // +optional optional k8s.io.api.core.v1.NodeSelector suitableNodes = 4; + + // If and only if allocation of claims using this class is handled + // via structured parameters, then StructuredParameters must be set to true. + // +optional + optional bool structuredParameters = 5; } // ResourceClassList is a collection of classes. @@ -354,6 +545,43 @@ message ResourceClassList { repeated ResourceClass items = 2; } +// ResourceClassParameters defines resource requests for a ResourceClass in an +// in-tree format understood by Kubernetes. +message ResourceClassParameters { + // Standard object metadata + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the class parameters when the parameter reference of the class refers + // to some unknown type. + // +optional + optional ResourceClassParametersReference generatedFrom = 2; + + // VendorParameters are arbitrary setup parameters for all claims using + // this class. They are ignored while allocating the claim. There must + // not be more than one entry per driver. + // + // +listType=atomic + // +optional + repeated VendorParameters vendorParameters = 3; + + // Filters describes additional contraints that must be met when using the class. + // + // +listType=atomic + repeated ResourceFilter filters = 4; +} + +// ResourceClassParametersList is a collection of ResourceClassParameters. +message ResourceClassParametersList { + // Standard list metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of node resource capacity objects. + repeated ResourceClassParameters items = 2; +} + // ResourceClassParametersReference contains enough information to let you // locate the parameters for a ResourceClass. message ResourceClassParametersReference { @@ -377,6 +605,22 @@ message ResourceClassParametersReference { optional string namespace = 4; } +// ResourceFilter is a filter for resources from one particular driver. +message ResourceFilter { + // DriverName is the name used by the DRA driver kubelet plugin. + optional string driverName = 1; + + optional ResourceFilterModel resourceFilterModel = 2; +} + +// ResourceFilterModel must have one and only one field set. +message ResourceFilterModel { + // NamedResources describes a resource filter using the named resources model. + // + // +optional + optional NamedResourcesFilter namedResources = 1; +} + // ResourceHandle holds opaque resource data for processing by a specific kubelet plugin. message ResourceHandle { // DriverName specifies the name of the resource driver whose kubelet @@ -396,5 +640,110 @@ message ResourceHandle { // future, but not reduced. // +optional optional string data = 2; + + // If StructuredData is set, then it needs to be used instead of Data. + // + // +optional + optional StructuredResourceHandle structuredData = 5; +} + +// ResourceModel must have one and only one field set. +message ResourceModel { + // NamedResources describes available resources using the named resources model. + // + // +optional + optional NamedResourcesResources namedResources = 1; +} + +// ResourceRequest is a request for resources from one particular driver. +message ResourceRequest { + // VendorParameters are arbitrary setup parameters for the requested + // resource. They are ignored while allocating a claim. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorParameters = 1; + + optional ResourceRequestModel resourceRequestModel = 2; +} + +// ResourceRequestModel must have one and only one field set. +message ResourceRequestModel { + // NamedResources describes a request for resources with the named resources model. + // + // +optional + optional NamedResourcesRequest namedResources = 1; +} + +// ResourceSlice provides information about available +// resources on individual nodes. +message ResourceSlice { + // Standard object metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // NodeName identifies the node which provides the resources + // if they are local to a node. + // + // A field selector can be used to list only ResourceSlice + // objects with a certain node name. + // + // +optional + optional string nodeName = 2; + + // DriverName identifies the DRA driver providing the capacity information. + // A field selector can be used to list only ResourceSlice + // objects with a certain driver name. + optional string driverName = 3; + + optional ResourceModel resourceModel = 4; +} + +// ResourceSliceList is a collection of ResourceSlices. +message ResourceSliceList { + // Standard list metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of node resource capacity objects. + repeated ResourceSlice items = 2; +} + +// StructuredResourceHandle is the in-tree representation of the allocation result. +message StructuredResourceHandle { + // VendorClassParameters are the per-claim configuration parameters + // from the resource class at the time that the claim was allocated. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorClassParameters = 1; + + // VendorClaimParameters are the per-claim configuration parameters + // from the resource claim parameters at the time that the claim was + // allocated. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorClaimParameters = 2; + + // NodeName is the name of the node providing the necessary resources + // if the resources are local to a node. + // + // +optional + optional string nodeName = 4; + + // Results lists all allocated driver resources. + // + // +listType=atomic + repeated DriverAllocationResult results = 5; +} + +// VendorParameters are opaque parameters for one particular driver. +message VendorParameters { + // DriverName is the name used by the DRA driver kubelet plugin. + optional string driverName = 1; + + // Parameters can be arbitrary setup parameters. They are ignored while + // allocating a claim. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 2; } diff --git a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/namedresources.go b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/namedresources.go new file mode 100644 index 00000000000..b80c5c1432f --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/namedresources.go @@ -0,0 +1,127 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha2 + +import ( + "k8s.io/apimachinery/pkg/api/resource" +) + +// NamedResourcesResources is used in ResourceModel. +type NamedResourcesResources struct { + // The list of all individual resources instances currently available. + // + // +listType=atomic + Instances []NamedResourcesInstance `json:"instances" protobuf:"bytes,1,name=instances"` +} + +// NamedResourcesInstance represents one individual hardware instance that can be selected based +// on its attributes. +type NamedResourcesInstance struct { + // Name is unique identifier among all resource instances managed by + // the driver on the node. It must be a DNS subdomain. + Name string `json:"name" protobuf:"bytes,1,name=name"` + + // Attributes defines the attributes of this resource instance. + // The name of each attribute must be unique. + // + // +listType=atomic + // +optional + Attributes []NamedResourcesAttribute `json:"attributes,omitempty" protobuf:"bytes,2,opt,name=attributes"` +} + +// NamedResourcesAttribute is a combination of an attribute name and its value. +type NamedResourcesAttribute struct { + // Name is unique identifier among all resource instances managed by + // the driver on the node. It must be a DNS subdomain. + Name string `json:"name" protobuf:"bytes,1,name=name"` + + NamedResourcesAttributeValue `json:",inline" protobuf:"bytes,2,opt,name=attributeValue"` +} + +// The Go field names below have a Value suffix to avoid a conflict between the +// field "String" and the corresponding method. That method is required. +// The Kubernetes API is defined without that suffix to keep it more natural. + +// NamedResourcesAttributeValue must have one and only one field set. +type NamedResourcesAttributeValue struct { + // QuantityValue is a quantity. + QuantityValue *resource.Quantity `json:"quantity,omitempty" protobuf:"bytes,6,opt,name=quantity"` + // BoolValue is a true/false value. + BoolValue *bool `json:"bool,omitempty" protobuf:"bytes,2,opt,name=bool"` + // IntValue is a 64-bit integer. + IntValue *int64 `json:"int,omitempty" protobuf:"varint,7,opt,name=int"` + // IntSliceValue is an array of 64-bit integers. + IntSliceValue *NamedResourcesIntSlice `json:"intSlice,omitempty" protobuf:"varint,8,rep,name=intSlice"` + // StringValue is a string. + StringValue *string `json:"string,omitempty" protobuf:"bytes,5,opt,name=string"` + // StringSliceValue is an array of strings. + StringSliceValue *NamedResourcesStringSlice `json:"stringSlice,omitempty" protobuf:"bytes,9,rep,name=stringSlice"` + // VersionValue is a semantic version according to semver.org spec 2.0.0. + VersionValue *string `json:"version,omitempty" protobuf:"bytes,10,opt,name=version"` +} + +// NamedResourcesIntSlice contains a slice of 64-bit integers. +type NamedResourcesIntSlice struct { + // Ints is the slice of 64-bit integers. + // + // +listType=atomic + Ints []int64 `json:"ints" protobuf:"bytes,1,opt,name=ints"` +} + +// NamedResourcesStringSlice contains a slice of strings. +type NamedResourcesStringSlice struct { + // Strings is the slice of strings. + // + // +listType=atomic + Strings []string `json:"strings" protobuf:"bytes,1,opt,name=strings"` +} + +// NamedResourcesRequest is used in ResourceRequestModel. +type NamedResourcesRequest struct { + // Selector is a CEL expression which must evaluate to true if a + // resource instance is suitable. The language is as defined in + // https://kubernetes.io/docs/reference/using-api/cel/ + // + // In addition, for each type NamedResourcesin AttributeValue there is a map that + // resolves to the corresponding value of the instance under evaluation. + // For example: + // + // attributes.quantity["a"].isGreaterThan(quantity("0")) && + // attributes.stringslice["b"].isSorted() + Selector string `json:"selector" protobuf:"bytes,1,name=selector"` +} + +// NamedResourcesFilter is used in ResourceFilterModel. +type NamedResourcesFilter struct { + // Selector is a CEL expression which must evaluate to true if a + // resource instance is suitable. The language is as defined in + // https://kubernetes.io/docs/reference/using-api/cel/ + // + // In addition, for each type NamedResourcesin AttributeValue there is a map that + // resolves to the corresponding value of the instance under evaluation. + // For example: + // + // attributes.quantity["a"].isGreaterThan(quantity("0")) && + // attributes.stringslice["b"].isSorted() + Selector string `json:"selector" protobuf:"bytes,1,name=selector"` +} + +// NamedResourcesAllocationResult is used in AllocationResultModel. +type NamedResourcesAllocationResult struct { + // Name is the name of the selected resource instance. + Name string `json:"name" protobuf:"bytes,1,name=name"` +} diff --git a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/register.go b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/register.go index 6e0d7ceb988..893fb4c1e52 100644 --- a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/register.go +++ b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/register.go @@ -52,6 +52,12 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ResourceClaimTemplateList{}, &PodSchedulingContext{}, &PodSchedulingContextList{}, + &ResourceSlice{}, + &ResourceSliceList{}, + &ResourceClaimParameters{}, + &ResourceClaimParametersList{}, + &ResourceClassParameters{}, + &ResourceClassParametersList{}, ) // Add common types diff --git a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/types.go b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/types.go index a614ff9dc1b..9005144cf69 100644 --- a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/types.go +++ b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/types.go @@ -19,9 +19,16 @@ package v1alpha2 import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" ) +const ( + // Finalizer is the finalizer that gets set for claims + // which were allocated through a builtin controller. + Finalizer = "dra.k8s.io/delete-protection" +) + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 @@ -114,8 +121,10 @@ type ResourceClaimStatus struct { // // +listType=map // +listMapKey=uid + // +patchStrategy=merge + // +patchMergeKey=uid // +optional - ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,3,opt,name=reservedFor"` + ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,3,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"` // DeallocationRequested indicates that a ResourceClaim is to be // deallocated. @@ -190,11 +199,63 @@ type ResourceHandle struct { // future, but not reduced. // +optional Data string `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"` + + // If StructuredData is set, then it needs to be used instead of Data. + // + // +optional + StructuredData *StructuredResourceHandle `json:"structuredData,omitempty" protobuf:"bytes,5,opt,name=structuredData"` } // ResourceHandleDataMaxSize represents the maximum size of resourceHandle.data. const ResourceHandleDataMaxSize = 16 * 1024 +// StructuredResourceHandle is the in-tree representation of the allocation result. +type StructuredResourceHandle struct { + // VendorClassParameters are the per-claim configuration parameters + // from the resource class at the time that the claim was allocated. + // + // +optional + VendorClassParameters runtime.RawExtension `json:"vendorClassParameters,omitempty" protobuf:"bytes,1,opt,name=vendorClassParameters"` + + // VendorClaimParameters are the per-claim configuration parameters + // from the resource claim parameters at the time that the claim was + // allocated. + // + // +optional + VendorClaimParameters runtime.RawExtension `json:"vendorClaimParameters,omitempty" protobuf:"bytes,2,opt,name=vendorClaimParameters"` + + // NodeName is the name of the node providing the necessary resources + // if the resources are local to a node. + // + // +optional + NodeName string `json:"nodeName,omitempty" protobuf:"bytes,4,name=nodeName"` + + // Results lists all allocated driver resources. + // + // +listType=atomic + Results []DriverAllocationResult `json:"results" protobuf:"bytes,5,name=results"` +} + +// DriverAllocationResult contains vendor parameters and the allocation result for +// one request. +type DriverAllocationResult struct { + // VendorRequestParameters are the per-request configuration parameters + // from the time that the claim was allocated. + // + // +optional + VendorRequestParameters runtime.RawExtension `json:"vendorRequestParameters,omitempty" protobuf:"bytes,1,opt,name=vendorRequestParameters"` + + AllocationResultModel `json:",inline" protobuf:"bytes,2,name=allocationResultModel"` +} + +// AllocationResultModel must have one and only one field set. +type AllocationResultModel struct { + // NamedResources describes the allocation result when using the named resources model. + // + // +optional + NamedResources *NamedResourcesAllocationResult `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 @@ -345,6 +406,11 @@ type ResourceClass struct { // Setting this field is optional. If null, all nodes are candidates. // +optional SuitableNodes *v1.NodeSelector `json:"suitableNodes,omitempty" protobuf:"bytes,4,opt,name=suitableNodes"` + + // If and only if allocation of claims using this class is handled + // via structured parameters, then StructuredParameters must be set to true. + // +optional + StructuredParameters *bool `json:"structuredParameters,omitempty" protobuf:"bytes,5,opt,name=structuredParameters"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -460,3 +526,212 @@ type ResourceClaimTemplateList struct { // Items is the list of resource claim templates. Items []ResourceClaimTemplate `json:"items" protobuf:"bytes,2,rep,name=items"` } + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceSlice provides information about available +// resources on individual nodes. +type ResourceSlice struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // NodeName identifies the node which provides the resources + // if they are local to a node. + // + // A field selector can be used to list only ResourceSlice + // objects with a certain node name. + // + // +optional + NodeName string `json:"nodeName,omitempty" protobuf:"bytes,2,opt,name=nodeName"` + + // DriverName identifies the DRA driver providing the capacity information. + // A field selector can be used to list only ResourceSlice + // objects with a certain driver name. + DriverName string `json:"driverName" protobuf:"bytes,3,name=driverName"` + + ResourceModel `json:",inline" protobuf:"bytes,4,name=resourceModel"` +} + +// ResourceModel must have one and only one field set. +type ResourceModel struct { + // NamedResources describes available resources using the named resources model. + // + // +optional + NamedResources *NamedResourcesResources `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceSliceList is a collection of ResourceSlices. +type ResourceSliceList 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 node resource capacity objects. + Items []ResourceSlice `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClaimParameters defines resource requests for a ResourceClaim in an +// in-tree format understood by Kubernetes. +type ResourceClaimParameters struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the claim parameters when the parameter reference of the claim refers + // to some unknown type. + // +optional + GeneratedFrom *ResourceClaimParametersReference `json:"generatedFrom,omitempty" protobuf:"bytes,2,opt,name=generatedFrom"` + + // Shareable indicates whether the allocated claim is meant to be shareable + // by multiple consumers at the same time. + // +optional + Shareable bool `json:"shareable,omitempty" protobuf:"bytes,3,opt,name=shareable"` + + // DriverRequests describes all resources that are needed for the + // allocated claim. A single claim may use resources coming from + // different drivers. For each driver, this array has at most one + // entry which then may have one or more per-driver requests. + // + // May be empty, in which case the claim can always be allocated. + // + // +listType=atomic + DriverRequests []DriverRequests `json:"driverRequests,omitempty" protobuf:"bytes,4,opt,name=driverRequests"` +} + +// DriverRequests describes all resources that are needed from one particular driver. +type DriverRequests struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` + + // VendorParameters are arbitrary setup parameters for all requests of the + // claim. They are ignored while allocating the claim. + // + // +optional + VendorParameters runtime.RawExtension `json:"vendorParameters,omitempty" protobuf:"bytes,2,opt,name=vendorParameters"` + + // Requests describes all resources that are needed from the driver. + // +listType=atomic + Requests []ResourceRequest `json:"requests,omitempty" protobuf:"bytes,3,opt,name=requests"` +} + +// ResourceRequest is a request for resources from one particular driver. +type ResourceRequest struct { + // VendorParameters are arbitrary setup parameters for the requested + // resource. They are ignored while allocating a claim. + // + // +optional + VendorParameters runtime.RawExtension `json:"vendorParameters,omitempty" protobuf:"bytes,1,opt,name=vendorParameters"` + + ResourceRequestModel `json:",inline" protobuf:"bytes,2,name=resourceRequestModel"` +} + +// ResourceRequestModel must have one and only one field set. +type ResourceRequestModel struct { + // NamedResources describes a request for resources with the named resources model. + // + // +optional + NamedResources *NamedResourcesRequest `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClaimParametersList is a collection of ResourceClaimParameters. +type ResourceClaimParametersList 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 node resource capacity objects. + Items []ResourceClaimParameters `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClassParameters defines resource requests for a ResourceClass in an +// in-tree format understood by Kubernetes. +type ResourceClassParameters struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the class parameters when the parameter reference of the class refers + // to some unknown type. + // +optional + GeneratedFrom *ResourceClassParametersReference `json:"generatedFrom,omitempty" protobuf:"bytes,2,opt,name=generatedFrom"` + + // VendorParameters are arbitrary setup parameters for all claims using + // this class. They are ignored while allocating the claim. There must + // not be more than one entry per driver. + // + // +listType=atomic + // +optional + VendorParameters []VendorParameters `json:"vendorParameters,omitempty" protobuf:"bytes,3,opt,name=vendorParameters"` + + // Filters describes additional contraints that must be met when using the class. + // + // +listType=atomic + Filters []ResourceFilter `json:"filters,omitempty" protobuf:"bytes,4,opt,name=filters"` +} + +// ResourceFilter is a filter for resources from one particular driver. +type ResourceFilter struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` + + ResourceFilterModel `json:",inline" protobuf:"bytes,2,name=resourceFilterModel"` +} + +// ResourceFilterModel must have one and only one field set. +type ResourceFilterModel struct { + // NamedResources describes a resource filter using the named resources model. + // + // +optional + NamedResources *NamedResourcesFilter `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClassParametersList is a collection of ResourceClassParameters. +type ResourceClassParametersList 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 node resource capacity objects. + Items []ResourceClassParameters `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// VendorParameters are opaque parameters for one particular driver. +type VendorParameters struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` + + // Parameters can be arbitrary setup parameters. They are ignored while + // allocating a claim. + // + // +optional + Parameters runtime.RawExtension `json:"parameters,omitempty" protobuf:"bytes,2,opt,name=parameters"` +} diff --git a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go index 474be8c85ce..11f9ffbead2 100644 --- a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go +++ b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go @@ -38,6 +38,35 @@ func (AllocationResult) SwaggerDoc() map[string]string { return map_AllocationResult } +var map_AllocationResultModel = map[string]string{ + "": "AllocationResultModel must have one and only one field set.", + "namedResources": "NamedResources describes the allocation result when using the named resources model.", +} + +func (AllocationResultModel) SwaggerDoc() map[string]string { + return map_AllocationResultModel +} + +var map_DriverAllocationResult = map[string]string{ + "": "DriverAllocationResult contains vendor parameters and the allocation result for one request.", + "vendorRequestParameters": "VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated.", +} + +func (DriverAllocationResult) SwaggerDoc() map[string]string { + return map_DriverAllocationResult +} + +var map_DriverRequests = map[string]string{ + "": "DriverRequests describes all resources that are needed from one particular driver.", + "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", + "vendorParameters": "VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim.", + "requests": "Requests describes all resources that are needed from the driver.", +} + +func (DriverRequests) SwaggerDoc() map[string]string { + return map_DriverRequests +} + var map_PodSchedulingContext = map[string]string{ "": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "metadata": "Standard object metadata", @@ -111,6 +140,28 @@ func (ResourceClaimList) SwaggerDoc() map[string]string { return map_ResourceClaimList } +var map_ResourceClaimParameters = map[string]string{ + "": "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", + "metadata": "Standard object metadata", + "generatedFrom": "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the claim parameters when the parameter reference of the claim refers to some unknown type.", + "shareable": "Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time.", + "driverRequests": "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", +} + +func (ResourceClaimParameters) SwaggerDoc() map[string]string { + return map_ResourceClaimParameters +} + +var map_ResourceClaimParametersList = map[string]string{ + "": "ResourceClaimParametersList is a collection of ResourceClaimParameters.", + "metadata": "Standard list metadata", + "items": "Items is the list of node resource capacity objects.", +} + +func (ResourceClaimParametersList) SwaggerDoc() map[string]string { + return map_ResourceClaimParametersList +} + var map_ResourceClaimParametersReference = map[string]string{ "": "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.", "apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", @@ -186,11 +237,12 @@ func (ResourceClaimTemplateSpec) SwaggerDoc() map[string]string { } var map_ResourceClass = map[string]string{ - "": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", - "metadata": "Standard object metadata", - "driverName": "DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.\n\nResource drivers have a unique name in forward domain order (acme.example.com).", - "parametersRef": "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.", - "suitableNodes": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates.", + "": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "metadata": "Standard object metadata", + "driverName": "DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.\n\nResource drivers have a unique name in forward domain order (acme.example.com).", + "parametersRef": "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.", + "suitableNodes": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates.", + "structuredParameters": "If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true.", } func (ResourceClass) SwaggerDoc() map[string]string { @@ -207,6 +259,28 @@ func (ResourceClassList) SwaggerDoc() map[string]string { return map_ResourceClassList } +var map_ResourceClassParameters = map[string]string{ + "": "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", + "metadata": "Standard object metadata", + "generatedFrom": "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the class parameters when the parameter reference of the class refers to some unknown type.", + "vendorParameters": "VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver.", + "filters": "Filters describes additional contraints that must be met when using the class.", +} + +func (ResourceClassParameters) SwaggerDoc() map[string]string { + return map_ResourceClassParameters +} + +var map_ResourceClassParametersList = map[string]string{ + "": "ResourceClassParametersList is a collection of ResourceClassParameters.", + "metadata": "Standard list metadata", + "items": "Items is the list of node resource capacity objects.", +} + +func (ResourceClassParametersList) SwaggerDoc() map[string]string { + return map_ResourceClassParametersList +} + var map_ResourceClassParametersReference = map[string]string{ "": "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.", "apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", @@ -219,14 +293,103 @@ func (ResourceClassParametersReference) SwaggerDoc() map[string]string { return map_ResourceClassParametersReference } +var map_ResourceFilter = map[string]string{ + "": "ResourceFilter is a filter for resources from one particular driver.", + "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", +} + +func (ResourceFilter) SwaggerDoc() map[string]string { + return map_ResourceFilter +} + +var map_ResourceFilterModel = map[string]string{ + "": "ResourceFilterModel must have one and only one field set.", + "namedResources": "NamedResources describes a resource filter using the named resources model.", +} + +func (ResourceFilterModel) SwaggerDoc() map[string]string { + return map_ResourceFilterModel +} + var map_ResourceHandle = map[string]string{ - "": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", - "driverName": "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.", - "data": "Data contains the opaque data associated with this ResourceHandle. It is set by the controller component of the resource driver whose name matches the DriverName set in the ResourceClaimStatus this ResourceHandle is embedded in. It is set at allocation time and is intended for processing by the kubelet plugin whose name matches the DriverName set in this ResourceHandle.\n\nThe maximum size of this field is 16KiB. This may get increased in the future, but not reduced.", + "": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", + "driverName": "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.", + "data": "Data contains the opaque data associated with this ResourceHandle. It is set by the controller component of the resource driver whose name matches the DriverName set in the ResourceClaimStatus this ResourceHandle is embedded in. It is set at allocation time and is intended for processing by the kubelet plugin whose name matches the DriverName set in this ResourceHandle.\n\nThe maximum size of this field is 16KiB. This may get increased in the future, but not reduced.", + "structuredData": "If StructuredData is set, then it needs to be used instead of Data.", } func (ResourceHandle) SwaggerDoc() map[string]string { return map_ResourceHandle } +var map_ResourceModel = map[string]string{ + "": "ResourceModel must have one and only one field set.", + "namedResources": "NamedResources describes available resources using the named resources model.", +} + +func (ResourceModel) SwaggerDoc() map[string]string { + return map_ResourceModel +} + +var map_ResourceRequest = map[string]string{ + "": "ResourceRequest is a request for resources from one particular driver.", + "vendorParameters": "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim.", +} + +func (ResourceRequest) SwaggerDoc() map[string]string { + return map_ResourceRequest +} + +var map_ResourceRequestModel = map[string]string{ + "": "ResourceRequestModel must have one and only one field set.", + "namedResources": "NamedResources describes a request for resources with the named resources model.", +} + +func (ResourceRequestModel) SwaggerDoc() map[string]string { + return map_ResourceRequestModel +} + +var map_ResourceSlice = map[string]string{ + "": "ResourceSlice provides information about available resources on individual nodes.", + "metadata": "Standard object metadata", + "nodeName": "NodeName identifies the node which provides the resources if they are local to a node.\n\nA field selector can be used to list only ResourceSlice objects with a certain node name.", + "driverName": "DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.", +} + +func (ResourceSlice) SwaggerDoc() map[string]string { + return map_ResourceSlice +} + +var map_ResourceSliceList = map[string]string{ + "": "ResourceSliceList is a collection of ResourceSlices.", + "metadata": "Standard list metadata", + "items": "Items is the list of node resource capacity objects.", +} + +func (ResourceSliceList) SwaggerDoc() map[string]string { + return map_ResourceSliceList +} + +var map_StructuredResourceHandle = map[string]string{ + "": "StructuredResourceHandle is the in-tree representation of the allocation result.", + "vendorClassParameters": "VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated.", + "vendorClaimParameters": "VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated.", + "nodeName": "NodeName is the name of the node providing the necessary resources if the resources are local to a node.", + "results": "Results lists all allocated driver resources.", +} + +func (StructuredResourceHandle) SwaggerDoc() map[string]string { + return map_StructuredResourceHandle +} + +var map_VendorParameters = map[string]string{ + "": "VendorParameters are opaque parameters for one particular driver.", + "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", + "parameters": "Parameters can be arbitrary setup parameters. They are ignored while allocating a claim.", +} + +func (VendorParameters) SwaggerDoc() map[string]string { + return map_VendorParameters +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go index 89d521bf05a..52de8e1ad53 100644 --- a/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go +++ b/pkg/k8s/vendor/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go @@ -32,7 +32,9 @@ func (in *AllocationResult) DeepCopyInto(out *AllocationResult) { if in.ResourceHandles != nil { in, out := &in.ResourceHandles, &out.ResourceHandles *out = make([]ResourceHandle, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.AvailableOnNodes != nil { in, out := &in.AvailableOnNodes, &out.AvailableOnNodes @@ -52,6 +54,273 @@ func (in *AllocationResult) DeepCopy() *AllocationResult { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllocationResultModel) DeepCopyInto(out *AllocationResultModel) { + *out = *in + if in.NamedResources != nil { + in, out := &in.NamedResources, &out.NamedResources + *out = new(NamedResourcesAllocationResult) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResultModel. +func (in *AllocationResultModel) DeepCopy() *AllocationResultModel { + if in == nil { + return nil + } + out := new(AllocationResultModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DriverAllocationResult) DeepCopyInto(out *DriverAllocationResult) { + *out = *in + in.VendorRequestParameters.DeepCopyInto(&out.VendorRequestParameters) + in.AllocationResultModel.DeepCopyInto(&out.AllocationResultModel) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverAllocationResult. +func (in *DriverAllocationResult) DeepCopy() *DriverAllocationResult { + if in == nil { + return nil + } + out := new(DriverAllocationResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DriverRequests) DeepCopyInto(out *DriverRequests) { + *out = *in + in.VendorParameters.DeepCopyInto(&out.VendorParameters) + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]ResourceRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverRequests. +func (in *DriverRequests) DeepCopy() *DriverRequests { + if in == nil { + return nil + } + out := new(DriverRequests) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesAllocationResult) DeepCopyInto(out *NamedResourcesAllocationResult) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAllocationResult. +func (in *NamedResourcesAllocationResult) DeepCopy() *NamedResourcesAllocationResult { + if in == nil { + return nil + } + out := new(NamedResourcesAllocationResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesAttribute) DeepCopyInto(out *NamedResourcesAttribute) { + *out = *in + in.NamedResourcesAttributeValue.DeepCopyInto(&out.NamedResourcesAttributeValue) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAttribute. +func (in *NamedResourcesAttribute) DeepCopy() *NamedResourcesAttribute { + if in == nil { + return nil + } + out := new(NamedResourcesAttribute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesAttributeValue) DeepCopyInto(out *NamedResourcesAttributeValue) { + *out = *in + if in.QuantityValue != nil { + in, out := &in.QuantityValue, &out.QuantityValue + x := (*in).DeepCopy() + *out = &x + } + if in.BoolValue != nil { + in, out := &in.BoolValue, &out.BoolValue + *out = new(bool) + **out = **in + } + if in.IntValue != nil { + in, out := &in.IntValue, &out.IntValue + *out = new(int64) + **out = **in + } + if in.IntSliceValue != nil { + in, out := &in.IntSliceValue, &out.IntSliceValue + *out = new(NamedResourcesIntSlice) + (*in).DeepCopyInto(*out) + } + if in.StringValue != nil { + in, out := &in.StringValue, &out.StringValue + *out = new(string) + **out = **in + } + if in.StringSliceValue != nil { + in, out := &in.StringSliceValue, &out.StringSliceValue + *out = new(NamedResourcesStringSlice) + (*in).DeepCopyInto(*out) + } + if in.VersionValue != nil { + in, out := &in.VersionValue, &out.VersionValue + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAttributeValue. +func (in *NamedResourcesAttributeValue) DeepCopy() *NamedResourcesAttributeValue { + if in == nil { + return nil + } + out := new(NamedResourcesAttributeValue) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesFilter) DeepCopyInto(out *NamedResourcesFilter) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesFilter. +func (in *NamedResourcesFilter) DeepCopy() *NamedResourcesFilter { + if in == nil { + return nil + } + out := new(NamedResourcesFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesInstance) DeepCopyInto(out *NamedResourcesInstance) { + *out = *in + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make([]NamedResourcesAttribute, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesInstance. +func (in *NamedResourcesInstance) DeepCopy() *NamedResourcesInstance { + if in == nil { + return nil + } + out := new(NamedResourcesInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesIntSlice) DeepCopyInto(out *NamedResourcesIntSlice) { + *out = *in + if in.Ints != nil { + in, out := &in.Ints, &out.Ints + *out = make([]int64, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesIntSlice. +func (in *NamedResourcesIntSlice) DeepCopy() *NamedResourcesIntSlice { + if in == nil { + return nil + } + out := new(NamedResourcesIntSlice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesRequest) DeepCopyInto(out *NamedResourcesRequest) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesRequest. +func (in *NamedResourcesRequest) DeepCopy() *NamedResourcesRequest { + if in == nil { + return nil + } + out := new(NamedResourcesRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesResources) DeepCopyInto(out *NamedResourcesResources) { + *out = *in + if in.Instances != nil { + in, out := &in.Instances, &out.Instances + *out = make([]NamedResourcesInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesResources. +func (in *NamedResourcesResources) DeepCopy() *NamedResourcesResources { + if in == nil { + return nil + } + out := new(NamedResourcesResources) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesStringSlice) DeepCopyInto(out *NamedResourcesStringSlice) { + *out = *in + if in.Strings != nil { + in, out := &in.Strings, &out.Strings + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesStringSlice. +func (in *NamedResourcesStringSlice) DeepCopy() *NamedResourcesStringSlice { + if in == nil { + return nil + } + out := new(NamedResourcesStringSlice) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodSchedulingContext) DeepCopyInto(out *PodSchedulingContext) { *out = *in @@ -234,6 +503,77 @@ func (in *ResourceClaimList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimParameters) DeepCopyInto(out *ResourceClaimParameters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.GeneratedFrom != nil { + in, out := &in.GeneratedFrom, &out.GeneratedFrom + *out = new(ResourceClaimParametersReference) + **out = **in + } + if in.DriverRequests != nil { + in, out := &in.DriverRequests, &out.DriverRequests + *out = make([]DriverRequests, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParameters. +func (in *ResourceClaimParameters) DeepCopy() *ResourceClaimParameters { + if in == nil { + return nil + } + out := new(ResourceClaimParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaimParameters) 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 *ResourceClaimParametersList) DeepCopyInto(out *ResourceClaimParametersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceClaimParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParametersList. +func (in *ResourceClaimParametersList) DeepCopy() *ResourceClaimParametersList { + if in == nil { + return nil + } + out := new(ResourceClaimParametersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaimParametersList) 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 *ResourceClaimParametersReference) DeepCopyInto(out *ResourceClaimParametersReference) { *out = *in @@ -411,6 +751,11 @@ func (in *ResourceClass) DeepCopyInto(out *ResourceClass) { *out = new(v1.NodeSelector) (*in).DeepCopyInto(*out) } + if in.StructuredParameters != nil { + in, out := &in.StructuredParameters, &out.StructuredParameters + *out = new(bool) + **out = **in + } return } @@ -465,6 +810,84 @@ func (in *ResourceClassList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClassParameters) DeepCopyInto(out *ResourceClassParameters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.GeneratedFrom != nil { + in, out := &in.GeneratedFrom, &out.GeneratedFrom + *out = new(ResourceClassParametersReference) + **out = **in + } + if in.VendorParameters != nil { + in, out := &in.VendorParameters, &out.VendorParameters + *out = make([]VendorParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Filters != nil { + in, out := &in.Filters, &out.Filters + *out = make([]ResourceFilter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParameters. +func (in *ResourceClassParameters) DeepCopy() *ResourceClassParameters { + if in == nil { + return nil + } + out := new(ResourceClassParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClassParameters) 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 *ResourceClassParametersList) DeepCopyInto(out *ResourceClassParametersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceClassParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParametersList. +func (in *ResourceClassParametersList) DeepCopy() *ResourceClassParametersList { + if in == nil { + return nil + } + out := new(ResourceClassParametersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClassParametersList) 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 *ResourceClassParametersReference) DeepCopyInto(out *ResourceClassParametersReference) { *out = *in @@ -481,9 +904,52 @@ func (in *ResourceClassParametersReference) DeepCopy() *ResourceClassParametersR return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceFilter) DeepCopyInto(out *ResourceFilter) { + *out = *in + in.ResourceFilterModel.DeepCopyInto(&out.ResourceFilterModel) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilter. +func (in *ResourceFilter) DeepCopy() *ResourceFilter { + if in == nil { + return nil + } + out := new(ResourceFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceFilterModel) DeepCopyInto(out *ResourceFilterModel) { + *out = *in + if in.NamedResources != nil { + in, out := &in.NamedResources, &out.NamedResources + *out = new(NamedResourcesFilter) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilterModel. +func (in *ResourceFilterModel) DeepCopy() *ResourceFilterModel { + if in == nil { + return nil + } + out := new(ResourceFilterModel) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceHandle) DeepCopyInto(out *ResourceHandle) { *out = *in + if in.StructuredData != nil { + in, out := &in.StructuredData, &out.StructuredData + *out = new(StructuredResourceHandle) + (*in).DeepCopyInto(*out) + } return } @@ -496,3 +962,165 @@ func (in *ResourceHandle) DeepCopy() *ResourceHandle { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceModel) DeepCopyInto(out *ResourceModel) { + *out = *in + if in.NamedResources != nil { + in, out := &in.NamedResources, &out.NamedResources + *out = new(NamedResourcesResources) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceModel. +func (in *ResourceModel) DeepCopy() *ResourceModel { + if in == nil { + return nil + } + out := new(ResourceModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest) { + *out = *in + in.VendorParameters.DeepCopyInto(&out.VendorParameters) + in.ResourceRequestModel.DeepCopyInto(&out.ResourceRequestModel) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequest. +func (in *ResourceRequest) DeepCopy() *ResourceRequest { + if in == nil { + return nil + } + out := new(ResourceRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequestModel) DeepCopyInto(out *ResourceRequestModel) { + *out = *in + if in.NamedResources != nil { + in, out := &in.NamedResources, &out.NamedResources + *out = new(NamedResourcesRequest) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequestModel. +func (in *ResourceRequestModel) DeepCopy() *ResourceRequestModel { + if in == nil { + return nil + } + out := new(ResourceRequestModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceSlice) DeepCopyInto(out *ResourceSlice) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.ResourceModel.DeepCopyInto(&out.ResourceModel) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSlice. +func (in *ResourceSlice) DeepCopy() *ResourceSlice { + if in == nil { + return nil + } + out := new(ResourceSlice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceSlice) 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 *ResourceSliceList) DeepCopyInto(out *ResourceSliceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceSlice, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceList. +func (in *ResourceSliceList) DeepCopy() *ResourceSliceList { + if in == nil { + return nil + } + out := new(ResourceSliceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceSliceList) 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 *StructuredResourceHandle) DeepCopyInto(out *StructuredResourceHandle) { + *out = *in + in.VendorClassParameters.DeepCopyInto(&out.VendorClassParameters) + in.VendorClaimParameters.DeepCopyInto(&out.VendorClaimParameters) + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]DriverAllocationResult, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StructuredResourceHandle. +func (in *StructuredResourceHandle) DeepCopy() *StructuredResourceHandle { + if in == nil { + return nil + } + out := new(StructuredResourceHandle) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VendorParameters) DeepCopyInto(out *VendorParameters) { + *out = *in + in.Parameters.DeepCopyInto(&out.Parameters) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VendorParameters. +func (in *VendorParameters) DeepCopy() *VendorParameters { + if in == nil { + return nil + } + out := new(VendorParameters) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/k8s/vendor/k8s.io/api/scheduling/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/scheduling/v1/generated.pb.go index 373c901e6b6..6fef1a9379a 100644 --- a/pkg/k8s/vendor/k8s.io/api/scheduling/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/scheduling/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1/generated.proto +// source: k8s.io/api/scheduling/v1/generated.proto package v1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PriorityClass) Reset() { *m = PriorityClass{} } func (*PriorityClass) ProtoMessage() {} func (*PriorityClass) Descriptor() ([]byte, []int) { - return fileDescriptor_277b2f43b72fffd5, []int{0} + return fileDescriptor_3f12bd05064e996e, []int{0} } func (m *PriorityClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_PriorityClass proto.InternalMessageInfo func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } func (*PriorityClassList) ProtoMessage() {} func (*PriorityClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_277b2f43b72fffd5, []int{1} + return fileDescriptor_3f12bd05064e996e, []int{1} } func (m *PriorityClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,42 +107,41 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1/generated.proto", fileDescriptor_277b2f43b72fffd5) + proto.RegisterFile("k8s.io/api/scheduling/v1/generated.proto", fileDescriptor_3f12bd05064e996e) } -var fileDescriptor_277b2f43b72fffd5 = []byte{ - // 492 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x8b, 0xd3, 0x4e, - 0x18, 0xc7, 0x3b, 0xdd, 0x5f, 0xa1, 0xbf, 0x29, 0x85, 0x1a, 0x11, 0x42, 0x0f, 0x69, 0xe9, 0x1e, - 0xec, 0xc5, 0x19, 0xbb, 0xa8, 0x08, 0x0b, 0x82, 0x71, 0x41, 0x84, 0x15, 0x4b, 0x0e, 0x1e, 0xc4, - 0x83, 0x93, 0xe4, 0xd9, 0x74, 0x6c, 0x92, 0x09, 0x33, 0x93, 0x40, 0x6f, 0xbe, 0x04, 0xdf, 0x91, - 0xd7, 0x1e, 0xf7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x15, 0x90, - 0x9d, 0x9d, 0xd5, 0xbf, 0xe7, 0x4d, 0x41, 0x3b, 0x1b, 0x13, 0xfb, 0xc5, 0x72, 0x6d, 0x35, 0xae, - 0xd7, 0x56, 0xe3, 0x66, 0x6d, 0x35, 0xbe, 0xe4, 0x16, 0x5a, 0xe6, 0x16, 0xba, 0xce, 0x2d, 0x74, - 0x93, 0x5b, 0xe8, 0x7b, 0x6e, 0xa1, 0xaf, 0x3f, 0xac, 0xc6, 0x07, 0xf3, 0xd8, 0x9b, 0xfc, 0x1d, - 0x00, 0x00, 0xff, 0xff, 0xa9, 0x88, 0x2b, 0xa0, 0xc7, 0x03, 0x00, 0x00, +var fileDescriptor_3f12bd05064e996e = []byte{ + // 476 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x3f, 0x8f, 0xd3, 0x30, + 0x18, 0xc6, 0xe3, 0x1e, 0x91, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xea, 0xe0, 0x46, 0xbd, 0x81, + 0x2c, 0xd8, 0xf4, 0x04, 0x08, 0xe9, 0x24, 0x86, 0x70, 0x12, 0x42, 0x3a, 0x44, 0x95, 0x81, 0x01, + 0x31, 0xe0, 0xa6, 0x3e, 0xd7, 0x34, 0x89, 0x23, 0xdb, 0xa9, 0xd4, 0x8d, 0x8f, 0xc0, 0x37, 0x62, + 0xed, 0x78, 0xe3, 0x4d, 0x15, 0x0d, 0x1f, 0x81, 0x8d, 0x09, 0x25, 0x2d, 0x97, 0xfe, 0xb9, 0x0a, + 0xb6, 0xbc, 0xef, 0xfb, 0xfc, 0x1e, 0xdb, 0x4f, 0x6c, 0xe8, 0x4f, 0x5f, 0x6a, 0x2c, 0x24, 0xa1, + 0x99, 0x20, 0x3a, 0x9a, 0xb0, 0x71, 0x1e, 0x8b, 0x94, 0x93, 0xd9, 0x80, 0x70, 0x96, 0x32, 0x45, + 0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x8f, 0x8d, 0x7b, 0xe2, 0x01, 0xbf, 0x19, 0x3c, 0xda, + 0x88, 0xdb, 0x6f, 0xb6, 0x87, 0xe1, 0xae, 0xd6, 0x79, 0x0e, 0x5b, 0x63, 0xa6, 0x23, 0x25, 0x32, + 0x23, 0x64, 0xea, 0xde, 0xf3, 0x80, 0x7f, 0x3f, 0x78, 0xb8, 0x41, 0x5b, 0x17, 0xf5, 0x28, 0xdc, + 0xd6, 0x39, 0x1c, 0x76, 0x32, 0xc5, 0x58, 0x52, 0x55, 0x43, 0x19, 0x8b, 0x68, 0xee, 0xda, 0x15, + 0x7b, 0x5e, 0x2c, 0x7b, 0x9d, 0xe1, 0xde, 0xec, 0xf7, 0xb2, 0x77, 0x7a, 0x78, 0x03, 0xf0, 0xbe, + 0x2c, 0x3c, 0x30, 0xed, 0x7f, 0x07, 0xf0, 0xc1, 0x4e, 0xea, 0x97, 0x42, 0x1b, 0xe7, 0xd3, 0x41, + 0xf2, 0xf8, 0xff, 0x92, 0x2f, 0xe9, 0x2a, 0xf7, 0xce, 0xe6, 0x88, 0xcd, 0xbf, 0x9d, 0xad, 0xd4, + 0x2f, 0xa1, 0x2d, 0x0c, 0x4b, 0xb4, 0xdb, 0xf0, 0x4e, 0xfc, 0xd6, 0xd9, 0x63, 0x7c, 0xec, 0x15, + 0xe0, 0x9d, 0x9d, 0xd5, 0xbf, 0xe7, 0x6d, 0x49, 0x87, 0x6b, 0x93, 0xe0, 0xd5, 0x62, 0x85, 0xac, + 0xeb, 0x15, 0xb2, 0x6e, 0x56, 0xc8, 0xfa, 0x5a, 0x20, 0xb0, 0x28, 0x10, 0xb8, 0x2e, 0x10, 0xb8, + 0x29, 0x10, 0xf8, 0x51, 0x20, 0xf0, 0xed, 0x27, 0xb2, 0x3e, 0xba, 0xc7, 0xde, 0xe4, 0x9f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x9a, 0x3d, 0x5f, 0x2e, 0xae, 0x03, 0x00, 0x00, } func (m *PriorityClass) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go index d2c5d2f33f9..83e504b5a33 100644 --- a/pkg/k8s/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto +// source: k8s.io/api/scheduling/v1alpha1/generated.proto package v1alpha1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PriorityClass) Reset() { *m = PriorityClass{} } func (*PriorityClass) ProtoMessage() {} func (*PriorityClass) Descriptor() ([]byte, []int) { - return fileDescriptor_f033641dd0b95dce, []int{0} + return fileDescriptor_260442fbb28d876a, []int{0} } func (m *PriorityClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_PriorityClass proto.InternalMessageInfo func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } func (*PriorityClassList) ProtoMessage() {} func (*PriorityClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_f033641dd0b95dce, []int{1} + return fileDescriptor_260442fbb28d876a, []int{1} } func (m *PriorityClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,42 +107,41 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto", fileDescriptor_f033641dd0b95dce) + proto.RegisterFile("k8s.io/api/scheduling/v1alpha1/generated.proto", fileDescriptor_260442fbb28d876a) } -var fileDescriptor_f033641dd0b95dce = []byte{ - // 495 bytes of a gzipped FileDescriptorProto +var fileDescriptor_260442fbb28d876a = []byte{ + // 480 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x8f, 0xd3, 0x30, - 0x14, 0xc7, 0xeb, 0x1e, 0x95, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xea, 0xe0, 0x56, 0xbd, 0xa5, - 0xcb, 0xd9, 0xf4, 0x04, 0x08, 0xe9, 0xb6, 0x52, 0xe9, 0x84, 0x04, 0xa2, 0xca, 0xc0, 0x80, 0x18, - 0x70, 0xd3, 0x77, 0xa9, 0x69, 0x12, 0x47, 0xb6, 0x13, 0xa9, 0x1b, 0x1f, 0x81, 0x2f, 0x85, 0xd4, - 0xf1, 0xc6, 0x9b, 0x2a, 0x1a, 0x3e, 0x02, 0x1b, 0x13, 0x4a, 0x9a, 0xbb, 0xb4, 0x0d, 0x1c, 0x6c, - 0x79, 0xef, 0xfd, 0xfe, 0x7f, 0xdb, 0xff, 0xd8, 0xf8, 0x72, 0xf9, 0x52, 0x53, 0x21, 0xd9, 0x32, - 0x9e, 0x81, 0x0a, 0xc1, 0x80, 0x66, 0x09, 0x84, 0x73, 0xa9, 0x58, 0x31, 0xe0, 0x91, 0x60, 0xda, - 0x5d, 0xc0, 0x3c, 0xf6, 0x45, 0xe8, 0xb1, 0x64, 0xc4, 0xfd, 0x68, 0xc1, 0x47, 0xcc, 0x83, 0x10, - 0x14, 0x37, 0x30, 0xa7, 0x91, 0x92, 0x46, 0x5a, 0x64, 0xc7, 0x53, 0x1e, 0x09, 0x5a, 0xf2, 0xf4, - 0x96, 0xef, 0x9e, 0x79, 0xc2, 0x2c, 0xe2, 0x19, 0x75, 0x65, 0xc0, 0x3c, 0xe9, 0x49, 0x96, 0xcb, - 0x66, 0xf1, 0x55, 0x5e, 0xe5, 0x45, 0xfe, 0xb5, 0xb3, 0xeb, 0x0e, 0xf6, 0x96, 0x77, 0xa5, 0x02, - 0x96, 0x54, 0x96, 0xec, 0x3e, 0x2b,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0xe5, 0x8f, + 0x56, 0x1b, 0xd4, 0xb8, 0xda, 0xa0, 0xc6, 0xf5, 0x06, 0x35, 0xbe, 0xe6, 0x08, 0xac, 0x72, 0x04, + 0xae, 0x72, 0x04, 0xae, 0x73, 0x04, 0x7e, 0xe4, 0x08, 0x7c, 0xfb, 0x89, 0x1a, 0x1f, 0xd1, 0xdd, + 0xaf, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xfe, 0x45, 0x7e, 0xc6, 0x03, 0x00, 0x00, } func (m *PriorityClass) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go index 262caf7f1d6..68e8e90d1d9 100644 --- a/pkg/k8s/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1beta1/generated.proto +// source: k8s.io/api/scheduling/v1beta1/generated.proto package v1beta1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PriorityClass) Reset() { *m = PriorityClass{} } func (*PriorityClass) ProtoMessage() {} func (*PriorityClass) Descriptor() ([]byte, []int) { - return fileDescriptor_6cd406dede2d3f42, []int{0} + return fileDescriptor_9edc3acf997efcf2, []int{0} } func (m *PriorityClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_PriorityClass proto.InternalMessageInfo func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } func (*PriorityClassList) ProtoMessage() {} func (*PriorityClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_6cd406dede2d3f42, []int{1} + return fileDescriptor_9edc3acf997efcf2, []int{1} } func (m *PriorityClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,42 +107,41 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1beta1/generated.proto", fileDescriptor_6cd406dede2d3f42) + proto.RegisterFile("k8s.io/api/scheduling/v1beta1/generated.proto", fileDescriptor_9edc3acf997efcf2) } -var fileDescriptor_6cd406dede2d3f42 = []byte{ - // 497 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x8f, 0xd3, 0x3e, - 0x18, 0xc6, 0xeb, 0xde, 0xbf, 0x52, 0xff, 0xae, 0x2a, 0x95, 0x20, 0xa4, 0xa8, 0xd2, 0xa5, 0x55, - 0x6f, 0xe9, 0x00, 0x36, 0x3d, 0x01, 0x42, 0xba, 0xad, 0x77, 0x02, 0x21, 0x81, 0x28, 0x19, 0x18, - 0x10, 0x03, 0x4e, 0xf2, 0x5e, 0x6a, 0x9a, 0xc4, 0x91, 0xed, 0x44, 0xea, 0xc6, 0x47, 0xe0, 0x43, - 0x31, 0x74, 0xbc, 0xf1, 0xa6, 0x8a, 0x86, 0x8f, 0xc0, 0xc6, 0x84, 0x92, 0x86, 0x4b, 0xdb, 0xc0, - 0xc1, 0x96, 0xf7, 0x7d, 0x7f, 0xcf, 0x63, 0xfb, 0x89, 0x8d, 0x9f, 0x2d, 0x9e, 0x2a, 0xc2, 0x05, - 0x5d, 0x24, 0x0e, 0xc8, 0x08, 0x34, 0x28, 0x9a, 0x42, 0xe4, 0x09, 0x49, 0xcb, 0x01, 0x8b, 0x39, - 0x55, 0xee, 0x1c, 0xbc, 0x24, 0xe0, 0x91, 0x4f, 0xd3, 0x89, 0x03, 0x9a, 0x4d, 0xa8, 0x0f, 0x11, - 0x48, 0xa6, 0xc1, 0x23, 0xb1, 0x14, 0x5a, 0x18, 0xc7, 0x5b, 0x9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7, 0xf7, 0x4a, 0xb8, 0xfb, 0x7c, 0x77, 0x68, 0xef, 0xb3, 0xc6, 0x63, 0xdc, 0xf1, 0x40, 0xb9, - 0x92, 0xc7, 0x9a, 0x8b, 0xc8, 0xfc, 0x6f, 0x88, 0xc6, 0xff, 0x4f, 0xef, 0x96, 0xd2, 0xce, 0x45, - 0x35, 0xb2, 0x77, 0x39, 0xc3, 0xc7, 0xbd, 0x58, 0x02, 0x84, 0x45, 0x35, 0x13, 0x01, 0x77, 0x97, - 0x66, 0xab, 0xd0, 0x9e, 0x65, 0xeb, 0x41, 0x6f, 0x76, 0x30, 0xfb, 0xb1, 0x1e, 0x9c, 0xd4, 0x6f, - 0x00, 0x39, 0xc4, 0xec, 0x9a, 0xe9, 0xe8, 0x0b, 0xc2, 0x77, 0xf6, 0x52, 0x7f, 0xc9, 0x95, 0x36, - 0xde, 0xd7, 0x92, 0x27, 0xff, 0x96, 0x7c, 0xae, 0x2e, 0x72, 0xef, 0x95, 0x47, 0x6c, 0xff, 0xea, - 0xec, 0xa4, 0xfe, 0x06, 0xb7, 0xb8, 0x86, 0x50, 0x99, 0xcd, 0xe1, 0xd1, 0xb8, 0x73, 0x7a, 0x9f, - 0xdc, 0xfa, 0x14, 0xc8, 0xde, 0xf6, 0xaa, 0x7f, 0xf4, 0x22, 0xb7, 0xb0, 0xb7, 0x4e, 0xd3, 0xf3, - 0xd5, 0xc6, 0x6a, 0x5c, 0x6d, 0xac, 0xc6, 0xf5, 0xc6, 0x6a, 0x7c, 0xca, 0x2c, 0xb4, 0xca, 0x2c, - 0x74, 0x95, 0x59, 0xe8, 0x3a, 0xb3, 0xd0, 0xd7, 0xcc, 0x42, 0x9f, 0xbf, 0x59, 0x8d, 0x77, 0xc7, - 0xb7, 0x3e, 0xd1, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x6c, 0x56, 0x80, 0xdb, 0x03, 0x00, +var fileDescriptor_9edc3acf997efcf2 = []byte{ + // 481 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x8f, 0xd3, 0x30, + 0x18, 0x86, 0xe3, 0x1e, 0x91, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xaa, 0x74, 0x69, 0xd4, 0x5b, + 0x32, 0x70, 0x36, 0x3d, 0x01, 0x42, 0xba, 0x2d, 0x77, 0x12, 0x42, 0x02, 0x51, 0x32, 0x30, 0x20, + 0x06, 0x9c, 0xd4, 0x97, 0x9a, 0x26, 0x71, 0x64, 0x3b, 0x95, 0xba, 0xf1, 0x13, 0xf8, 0x51, 0x0c, + 0x1d, 0x6f, 0xbc, 0xa9, 0xa2, 0xe1, 0x27, 0xb0, 0x31, 0xa1, 0xa4, 0xe1, 0xd2, 0x36, 0x50, 0x6e, + 0xcb, 0xf7, 0x7d, 0xcf, 0xfb, 0xda, 0x7e, 0x63, 0xc3, 0xd3, 0xd9, 0x0b, 0x89, 0x18, 0xc7, 0x24, + 0x65, 0x58, 0x06, 0x53, 0x3a, 0xc9, 0x22, 0x96, 0x84, 0x78, 0x3e, 0xf2, 0xa9, 0x22, 0x23, 0x1c, + 0xd2, 0x84, 0x0a, 0xa2, 0xe8, 0x04, 0xa5, 0x82, 0x2b, 0x6e, 0x1c, 0x6f, 0x70, 0x44, 0x52, 0x86, + 0x6a, 0x1c, 0x55, 0x78, 0xff, 0x34, 0x64, 0x6a, 0x9a, 0xf9, 0x28, 0xe0, 0x31, 0x0e, 0x79, 0xc8, + 0x71, 0xa9, 0xf2, 0xb3, 0xab, 0xb2, 0x2a, 0x8b, 0xf2, 0x6b, 0xe3, 0xd6, 0x1f, 0x6e, 0x2d, 0x1e, + 0x70, 0x41, 0xf1, 0xbc, 0xb1, 0x62, 0xff, 0x69, 0xcd, 0xc4, 0x24, 0x98, 0xb2, 0x84, 0x8a, 0x05, + 0x4e, 0x67, 0x61, 0xd1, 0x90, 0x38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 0x7e, 0xad, 0x06, 0x27, + 0xcd, 0x1b, 0x80, 0xf6, 0x31, 0xaf, 0x61, 0x3a, 0xfc, 0x06, 0xe0, 0x83, 0x9d, 0xd4, 0x5f, 0x33, + 0xa9, 0x8c, 0x8f, 0x8d, 0xe4, 0xd1, 0xdd, 0x92, 0x2f, 0xd4, 0x65, 0xee, 0xbd, 0xea, 0x88, 0xed, + 0x3f, 0x9d, 0xad, 0xd4, 0xdf, 0x41, 0x9d, 0x29, 0x1a, 0x4b, 0xb3, 0x65, 0x1f, 0x39, 0x9d, 0xb3, + 0xc7, 0xe8, 0xe0, 0x53, 0x40, 0x3b, 0xdb, 0xab, 0xff, 0xd1, 0xab, 0xc2, 0xc2, 0xdb, 0x38, 0xb9, + 0x17, 0xcb, 0xb5, 0xa5, 0x5d, 0xaf, 0x2d, 0xed, 0x66, 0x6d, 0x69, 0x5f, 0x72, 0x0b, 0x2c, 0x73, + 0x0b, 0x5c, 0xe7, 0x16, 0xb8, 0xc9, 0x2d, 0xf0, 0x3d, 0xb7, 0xc0, 0xd7, 0x1f, 0x96, 0xf6, 0xe1, + 0xf8, 0xe0, 0x13, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x04, 0x2e, 0xb0, 0xce, 0xc2, 0x03, 0x00, 0x00, } diff --git a/pkg/k8s/vendor/k8s.io/api/storage/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/storage/v1/generated.pb.go index d36497432de..11c8c97c241 100644 --- a/pkg/k8s/vendor/k8s.io/api/storage/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/storage/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/storage/v1/generated.proto +// source: k8s.io/api/storage/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CSIDriver) Reset() { *m = CSIDriver{} } func (*CSIDriver) ProtoMessage() {} func (*CSIDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{0} + return fileDescriptor_662262cc70094b41, []int{0} } func (m *CSIDriver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_CSIDriver proto.InternalMessageInfo func (m *CSIDriverList) Reset() { *m = CSIDriverList{} } func (*CSIDriverList) ProtoMessage() {} func (*CSIDriverList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{1} + return fileDescriptor_662262cc70094b41, []int{1} } func (m *CSIDriverList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_CSIDriverList proto.InternalMessageInfo func (m *CSIDriverSpec) Reset() { *m = CSIDriverSpec{} } func (*CSIDriverSpec) ProtoMessage() {} func (*CSIDriverSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{2} + return fileDescriptor_662262cc70094b41, []int{2} } func (m *CSIDriverSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_CSIDriverSpec proto.InternalMessageInfo func (m *CSINode) Reset() { *m = CSINode{} } func (*CSINode) ProtoMessage() {} func (*CSINode) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{3} + return fileDescriptor_662262cc70094b41, []int{3} } func (m *CSINode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_CSINode proto.InternalMessageInfo func (m *CSINodeDriver) Reset() { *m = CSINodeDriver{} } func (*CSINodeDriver) ProtoMessage() {} func (*CSINodeDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{4} + return fileDescriptor_662262cc70094b41, []int{4} } func (m *CSINodeDriver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_CSINodeDriver proto.InternalMessageInfo func (m *CSINodeList) Reset() { *m = CSINodeList{} } func (*CSINodeList) ProtoMessage() {} func (*CSINodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{5} + return fileDescriptor_662262cc70094b41, []int{5} } func (m *CSINodeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_CSINodeList proto.InternalMessageInfo func (m *CSINodeSpec) Reset() { *m = CSINodeSpec{} } func (*CSINodeSpec) ProtoMessage() {} func (*CSINodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{6} + return fileDescriptor_662262cc70094b41, []int{6} } func (m *CSINodeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_CSINodeSpec proto.InternalMessageInfo func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } func (*CSIStorageCapacity) ProtoMessage() {} func (*CSIStorageCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{7} + return fileDescriptor_662262cc70094b41, []int{7} } func (m *CSIStorageCapacity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_CSIStorageCapacity proto.InternalMessageInfo func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } func (*CSIStorageCapacityList) ProtoMessage() {} func (*CSIStorageCapacityList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{8} + return fileDescriptor_662262cc70094b41, []int{8} } func (m *CSIStorageCapacityList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_CSIStorageCapacityList proto.InternalMessageInfo func (m *StorageClass) Reset() { *m = StorageClass{} } func (*StorageClass) ProtoMessage() {} func (*StorageClass) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{9} + return fileDescriptor_662262cc70094b41, []int{9} } func (m *StorageClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_StorageClass proto.InternalMessageInfo func (m *StorageClassList) Reset() { *m = StorageClassList{} } func (*StorageClassList) ProtoMessage() {} func (*StorageClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{10} + return fileDescriptor_662262cc70094b41, []int{10} } func (m *StorageClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_StorageClassList proto.InternalMessageInfo func (m *TokenRequest) Reset() { *m = TokenRequest{} } func (*TokenRequest) ProtoMessage() {} func (*TokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{11} + return fileDescriptor_662262cc70094b41, []int{11} } func (m *TokenRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_TokenRequest proto.InternalMessageInfo func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } func (*VolumeAttachment) ProtoMessage() {} func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{12} + return fileDescriptor_662262cc70094b41, []int{12} } func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } func (*VolumeAttachmentList) ProtoMessage() {} func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{13} + return fileDescriptor_662262cc70094b41, []int{13} } func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } func (*VolumeAttachmentSource) ProtoMessage() {} func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{14} + return fileDescriptor_662262cc70094b41, []int{14} } func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } func (*VolumeAttachmentSpec) ProtoMessage() {} func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{15} + return fileDescriptor_662262cc70094b41, []int{15} } func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } func (*VolumeAttachmentStatus) ProtoMessage() {} func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{16} + return fileDescriptor_662262cc70094b41, []int{16} } func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo func (m *VolumeError) Reset() { *m = VolumeError{} } func (*VolumeError) ProtoMessage() {} func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{17} + return fileDescriptor_662262cc70094b41, []int{17} } func (m *VolumeError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_VolumeError proto.InternalMessageInfo func (m *VolumeNodeResources) Reset() { *m = VolumeNodeResources{} } func (*VolumeNodeResources) ProtoMessage() {} func (*VolumeNodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{18} + return fileDescriptor_662262cc70094b41, []int{18} } func (m *VolumeNodeResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -605,116 +605,115 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/storage/v1/generated.proto", fileDescriptor_3b530c1983504d8d) -} - -var fileDescriptor_3b530c1983504d8d = []byte{ - // 1670 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x73, 0x1b, 0x4b, - 0x11, 0xf7, 0x5a, 0xf2, 0xd7, 0xc8, 0x8e, 0xed, 0xb1, 0xfd, 0x10, 0x3e, 0x48, 0xae, 0x7d, 0xaf, - 0xc0, 0xef, 0xc1, 0x5b, 0xbd, 0x38, 0x21, 0x95, 0x0a, 0x15, 0xaa, 0xbc, 0xb6, 0x42, 0x5c, 0x58, - 0xb6, 0x19, 0x99, 0x54, 0x8a, 0x02, 0x2a, 0xe3, 0xdd, 0xb1, 0x3c, 0xb1, 0xf6, 0x23, 0x3b, 0xb3, - 0xc2, 0xe2, 0x04, 0x17, 0x6e, 0x54, 0xc1, 0x95, 0xbf, 0x02, 0xaa, 0xe0, 0xc2, 0x91, 0x03, 0x15, - 0x6e, 0x29, 0x4e, 0x39, 0xa9, 0x88, 0x38, 0xc3, 0x91, 0x83, 0x4f, 0xaf, 0x66, 0x76, 0xa4, 0xfd, - 0xd0, 0xca, 0xb1, 0x2f, 0xba, 0x69, 0xa6, 0xbb, 0x7f, 0xdd, 0x33, 0xdd, 0xfd, 0x9b, 0x5e, 0x81, - 0x1f, 0x5c, 0x3e, 0x66, 0x06, 0xf5, 0x6a, 0x97, 0xe1, 0x19, 0x09, 0x5c, 0xc2, 0x09, 0xab, 0x75, - 0x88, 0x6b, 0x7b, 0x41, 0x4d, 0x09, 0xb0, 0x4f, 0x6b, 0x8c, 0x7b, 0x01, 0x6e, 0x91, 0x5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x0b, 0xf8, 0x12, 0xcc, 0x5b, 0x49, 0x02, - 0xfd, 0x48, 0xb1, 0x18, 0x83, 0x69, 0xc4, 0xf8, 0x71, 0x88, 0x5d, 0x4e, 0x79, 0xd7, 0x5c, 0x14, - 0x85, 0x32, 0x64, 0xda, 0x21, 0x1a, 0x64, 0x60, 0xd5, 0xc1, 0x57, 0xd4, 0x09, 0x9d, 0xa8, 0xa4, - 0x9b, 0xf4, 0x57, 0x44, 0xd2, 0xec, 0xdd, 0x5d, 0x48, 0x9a, 0x6b, 0x64, 0xc1, 0xd0, 0x28, 0xbe, - 0xfe, 0x0f, 0x0d, 0x7c, 0x32, 0x9a, 0xf8, 0x09, 0xb4, 0xc5, 0x51, 0xba, 0x2d, 0x3e, 0x1f, 0x5f, - 0xc0, 0x99, 0xd8, 0xc6, 0x74, 0xc8, 0xef, 0x66, 0xc1, 0x62, 0x32, 0x7d, 0x13, 0xa8, 0xdd, 0xef, - 0x81, 0x92, 0x1f, 0x78, 0x1d, 0xca, 0xa8, 0xe7, 0x92, 0x40, 0x31, 0xe1, 0x9a, 0x32, 0x29, 0x9d, - 0xc4, 0x22, 0x94, 0xd4, 0x83, 0x2d, 0x00, 0x7c, 0x1c, 0x60, 0x87, 0x70, 0xd1, 0xbf, 0x05, 0x79, - 0xfc, 0x07, 0x63, 0x8e, 0x9f, 0x3c, 0x91, 0x71, 0x32, 0xb4, 0xaa, 0xbb, 0x3c, 0xe8, 0xc6, 0xd1, - 0xc5, 0x02, 0x94, 0x80, 0x86, 0x97, 0x60, 0x29, 0x20, 0x56, 0x1b, 0x53, 0x47, 0xbd, 0xd9, 0x45, - 0x19, 0x61, 0x5d, 0x3c, 0xa0, 0x28, 0x29, 0xb8, 0xee, 0x55, 0xbf, 0x1a, 0x9d, 0xba, 0x8d, 0x13, - 0x12, 0x30, 0xca, 0x38, 0x71, 0x79, 0x54, 0x30, 0x29, 0x1b, 0x94, 0xc6, 0x16, 0x4c, 0xef, 0x88, - 0x27, 0xf0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 0xb2, 0xab, 0xf6, 0xd1, 0x50, 0x43, 0x0c, 0x80, - 0xe4, 0xca, 0xa7, 0x01, 0x16, 0x45, 0xd6, 0x24, 0x96, 0xe7, 0xda, 0x4c, 0xde, 0x50, 0x21, 0x62, - 0xc6, 0x7a, 0x56, 0x88, 0x46, 0xf5, 0xf5, 0x3f, 0x4e, 0x83, 0x95, 0xa8, 0x36, 0xa2, 0xd1, 0xdf, - 0x21, 0x2e, 0x9f, 0x00, 0xa9, 0x34, 0x52, 0x33, 0xdd, 0x77, 0x6e, 0x1c, 0x7a, 0xe2, 0xc0, 0xc6, - 0x0d, 0x77, 0xf0, 0x27, 0x60, 0x96, 0x71, 0xcc, 0x43, 0x26, 0x9f, 0xba, 0xd2, 0xce, 0x97, 0xb7, - 0x05, 0x94, 0x46, 0xf1, 0x5c, 0x17, 0xad, 0x91, 0x02, 0xd3, 0xff, 0xae, 0x81, 0xf5, 0xac, 0xc9, - 0x04, 0x2a, 0xec, 0x30, 0x5d, 0x61, 0xdf, 0xbe, 0xe5, 0x61, 0xc6, 0x7d, 0x01, 0x6a, 0xe0, 0x93, - 0x91, 0x73, 0xcb, 0x97, 0x54, 0xf0, 0x92, 0x9f, 0x61, 0xbf, 0xa3, 0x78, 0x22, 0x96, 0xbc, 0x74, - 0x92, 0x23, 0x47, 0xb9, 0x56, 0xf0, 0x35, 0x58, 0xa1, 0x6e, 0x9b, 0xba, 0x44, 0x3d, 0xbc, 0x71, - 0x7e, 0x73, 0xc9, 0x23, 0x8b, 0x2c, 0x93, 0xbb, 0x2e, 0xe6, 0x93, 0x83, 0x0c, 0x0a, 0x1a, 0xc1, - 0xd5, 0xff, 0x99, 0x93, 0x19, 0x39, 0x33, 0x8a, 0x16, 0x92, 0x3b, 0x24, 0x18, 0x69, 0x21, 0xb5, - 0x8f, 0x86, 0x1a, 0xb2, 0x6e, 0xe4, 0x55, 0xa8, 0x40, 0x6f, 0x5d, 0x37, 0xd2, 0x28, 0x51, 0x37, - 0x72, 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xfc, 0x17, 0x20, 0xda, 0x37, 0xbf, 0xff, 0xf6, - 0x43, 0x65, 0xea, 0xdd, 0x87, 0xca, 0xd4, 0xfb, 0x0f, 0x95, 0xa9, 0x5f, 0xf7, 0x2b, 0xda, 0xdb, - 0x7e, 0x45, 0x7b, 0xd7, 0xaf, 0x68, 0xef, 0xfb, 0x15, 0xed, 0xdf, 0xfd, 0x8a, 0xf6, 0xfb, 0xff, - 0x54, 0xa6, 0x7e, 0xba, 0x91, 0xfb, 0x77, 0xea, 0xd7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xf9, - 0xe3, 0xd5, 0x7f, 0x15, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/storage/v1/generated.proto", fileDescriptor_662262cc70094b41) +} + +var fileDescriptor_662262cc70094b41 = []byte{ + // 1655 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xbd, 0x6f, 0x1b, 0xc9, + 0x15, 0xd7, 0x8a, 0xd4, 0xd7, 0x50, 0xb2, 0xa4, 0x91, 0xe4, 0x30, 0x2a, 0x48, 0x61, 0xed, 0x24, + 0xb2, 0x13, 0x2f, 0x6d, 0xd9, 0x31, 0x0c, 0x07, 0x2e, 0xb4, 0x12, 0x1d, 0x0b, 0x11, 0x25, 0x65, + 0xa8, 0x18, 0x46, 0x90, 0x04, 0x1e, 0xed, 0x8e, 0xa8, 0xb1, 0xb8, 0x1f, 0xde, 0x19, 0x2a, 0x62, + 0xaa, 0xa4, 0x49, 0x17, 0x20, 0x69, 0xf3, 0x57, 0x24, 0x40, 0xd2, 0x5c, 0x79, 0xc5, 0xc1, 0xd7, + 0x19, 0x57, 0xb9, 0x22, 0xce, 0xbc, 0xfa, 0xae, 0xbc, 0x42, 0xd5, 0x61, 0x66, 0x87, 0xdc, 0x0f, + 0x2e, 0x65, 0xa9, 0x61, 0xc7, 0x99, 0xf7, 0xde, 0x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9, 0xd2, + 0xb7, 0xae, 0x50, 0xd3, 0x43, 0x9a, 0xf9, 0x6f, 0x1a, 0x98, 0x8d, 0x8f, 0x78, 0xf0, 0x17, 0x60, + 0x1a, 0xb7, 0x6c, 0x4a, 0x5c, 0xab, 0x37, 0x95, 0xf4, 0x03, 0xd9, 0x54, 0xfb, 0xa8, 0xaf, 0x21, + 0x06, 0x40, 0x72, 0xee, 0xd3, 0x00, 0x8b, 0x22, 0xab, 0x13, 0xcb, 0x73, 0x6d, 0x26, 0x6f, 0x28, + 0x17, 0x32, 0x63, 0x35, 0x2d, 0x44, 0x83, 0xfa, 0xfa, 0xbf, 0xc7, 0xc1, 0x42, 0x58, 0x1b, 0xe1, + 0xe8, 0xef, 0x10, 0x97, 0x8f, 0x80, 0x54, 0x6a, 0x89, 0x99, 0xee, 0xe7, 0x97, 0x0e, 0x3d, 0x51, + 0x60, 0xc3, 0x86, 0x3b, 0xf8, 0x3b, 0x30, 0xc9, 0x38, 0xe6, 0x2d, 0x26, 0x9f, 0xba, 0xc2, 0xc6, + 0xbd, 0xab, 0x02, 0x4a, 0xa3, 0x68, 0xae, 0x0b, 0xd7, 0x48, 0x81, 0xe9, 0x9f, 0x6b, 0x60, 0x39, + 0x6d, 0x32, 0x82, 0x0a, 0xdb, 0x4d, 0x56, 0xd8, 0xcf, 0xae, 0x78, 0x98, 0x61, 0x5f, 0x80, 0x1a, + 0xb8, 0x39, 0x70, 0x6e, 0xf9, 0x92, 0x0a, 0x5e, 0xf2, 0x53, 0xec, 0xb7, 0x17, 0x4d, 0xc4, 0x92, + 0x97, 0x0e, 0x32, 0xe4, 0x28, 0xd3, 0x0a, 0xbe, 0x01, 0x0b, 0xd4, 0x6d, 0x52, 0x97, 0xa8, 0x87, + 0x37, 0xca, 0x6f, 0x26, 0x79, 0xa4, 0x91, 0x65, 0x72, 0x97, 0xc5, 0x7c, 0xb2, 0x93, 0x42, 0x41, + 0x03, 0xb8, 0xfa, 0x97, 0x19, 0x99, 0x91,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0x43, 0xb5, + 0x70, 0x1b, 0xf5, 0xe4, 0xfa, 0x63, 0xb0, 0x94, 0xf1, 0x59, 0x09, 0xcb, 0x60, 0xc2, 0x92, 0x7f, + 0x06, 0x88, 0x80, 0x26, 0xcc, 0x19, 0xc1, 0x28, 0x5b, 0xf2, 0x5f, 0x80, 0x70, 0xdf, 0xfc, 0xd5, + 0xbb, 0x8f, 0xa5, 0xb1, 0xf7, 0x1f, 0x4b, 0x63, 0x1f, 0x3e, 0x96, 0xc6, 0xfe, 0xda, 0x2d, 0x69, + 0xef, 0xba, 0x25, 0xed, 0x7d, 0xb7, 0xa4, 0x7d, 0xe8, 0x96, 0xb4, 0xaf, 0xbb, 0x25, 0xed, 0x9f, + 0xdf, 0x94, 0xc6, 0x7e, 0xbf, 0x92, 0xf9, 0x77, 0xea, 0x0f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7a, + 0x55, 0x95, 0x9f, 0x66, 0x15, 0x00, 0x00, } func (m *CSIDriver) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/storage/v1/generated.proto b/pkg/k8s/vendor/k8s.io/api/storage/v1/generated.proto index b35f708c663..06bbe3d5cff 100644 --- a/pkg/k8s/vendor/k8s.io/api/storage/v1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/storage/v1/generated.proto @@ -103,7 +103,7 @@ message CSIDriverSpec { // deployed on such a cluster and the deployment determines which mode that is, for example // via a command line parameter of the driver. // - // This field is immutable. + // This field was immutable in Kubernetes < 1.29 and now is mutable. // // +optional optional bool podInfoOnMount = 2; @@ -150,7 +150,7 @@ message CSIDriverSpec { // permission of the volume before being mounted. // Refer to the specific FSGroupPolicy values for additional details. // - // This field is immutable. + // This field was immutable in Kubernetes < 1.29 and now is mutable. // // Defaults to ReadWriteOnceWithFSType, which will examine each volume // to determine if Kubernetes should modify ownership and permissions of the volume. @@ -261,6 +261,7 @@ message CSINodeDriver { // It is possible for different nodes to use different topology keys. // This can be empty if driver does not support topology. // +optional + // +listType=atomic repeated string topologyKeys = 3; // allocatable represents the volume resources of a node that are available for scheduling. @@ -286,6 +287,8 @@ message CSINodeSpec { // If all drivers in the list are uninstalled, this can become empty. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated CSINodeDriver drivers = 1; } @@ -378,8 +381,6 @@ message CSIStorageCapacityList { optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name repeated CSIStorageCapacity items = 2; } @@ -411,6 +412,7 @@ message StorageClass { // e.g. ["ro", "soft"]. Not validated - // mount of the PVs will simply fail if one is invalid. // +optional + // +listType=atomic repeated string mountOptions = 5; // allowVolumeExpansion shows whether the storage class allow volume expand. diff --git a/pkg/k8s/vendor/k8s.io/api/storage/v1/types.go b/pkg/k8s/vendor/k8s.io/api/storage/v1/types.go index 7d7b7664b89..a94c7f44c53 100644 --- a/pkg/k8s/vendor/k8s.io/api/storage/v1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/storage/v1/types.go @@ -56,6 +56,7 @@ type StorageClass struct { // e.g. ["ro", "soft"]. Not validated - // mount of the PVs will simply fail if one is invalid. // +optional + // +listType=atomic MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,5,opt,name=mountOptions"` // allowVolumeExpansion shows whether the storage class allow volume expand. @@ -306,7 +307,7 @@ type CSIDriverSpec struct { // deployed on such a cluster and the deployment determines which mode that is, for example // via a command line parameter of the driver. // - // This field is immutable. + // This field was immutable in Kubernetes < 1.29 and now is mutable. // // +optional PodInfoOnMount *bool `json:"podInfoOnMount,omitempty" protobuf:"bytes,2,opt,name=podInfoOnMount"` @@ -353,7 +354,7 @@ type CSIDriverSpec struct { // permission of the volume before being mounted. // Refer to the specific FSGroupPolicy values for additional details. // - // This field is immutable. + // This field was immutable in Kubernetes < 1.29 and now is mutable. // // Defaults to ReadWriteOnceWithFSType, which will examine each volume // to determine if Kubernetes should modify ownership and permissions of the volume. @@ -517,6 +518,8 @@ type CSINodeSpec struct { // If all drivers in the list are uninstalled, this can become empty. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Drivers []CSINodeDriver `json:"drivers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=drivers"` } @@ -549,6 +552,7 @@ type CSINodeDriver struct { // It is possible for different nodes to use different topology keys. // This can be empty if driver does not support topology. // +optional + // +listType=atomic TopologyKeys []string `json:"topologyKeys" protobuf:"bytes,3,rep,name=topologyKeys"` // allocatable represents the volume resources of a node that are available for scheduling. @@ -680,7 +684,5 @@ type CSIStorageCapacityList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name Items []CSIStorageCapacity `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/pkg/k8s/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go b/pkg/k8s/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go index 69ee6836107..89b1cbb2010 100644 --- a/pkg/k8s/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go +++ b/pkg/k8s/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go @@ -50,10 +50,10 @@ func (CSIDriverList) SwaggerDoc() map[string]string { var map_CSIDriverSpec = map[string]string{ "": "CSIDriverSpec is the specification of a CSIDriver.", "attachRequired": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable.", - "podInfoOnMount": "podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false.\n\nThe CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext.\n\nThe following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable.", + "podInfoOnMount": "podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false.\n\nThe CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext.\n\nThe following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field was immutable in Kubernetes < 1.29 and now is mutable.", "volumeLifecycleModes": "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism.\n\nThe other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume.\n\nFor more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.\n\nThis field is beta. This field is immutable.", "storageCapacity": "storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information, if set to true.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field was immutable in Kubernetes <= 1.22 and now is mutable.", - "fsGroupPolicy": "fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details.\n\nThis field is immutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", + "fsGroupPolicy": "fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details.\n\nThis field was immutable in Kubernetes < 1.29 and now is mutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", "tokenRequests": "tokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\": {\n \"token\": ,\n \"expirationTimestamp\": ,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.", "requiresRepublish": "requiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.", "seLinuxMount": "seLinuxMount specifies if the CSI driver supports \"-o context\" mount option.\n\nWhen \"true\", the CSI driver must ensure that all volumes provided by this CSI driver can be mounted separately with different `-o context` options. This is typical for storage backends that provide volumes as filesystems on block devices or as independent shared volumes. Kubernetes will call NodeStage / NodePublish with \"-o context=xyz\" mount option when mounting a ReadWriteOncePod volume used in Pod that has explicitly set SELinux context. In the future, it may be expanded to other volume AccessModes. In any case, Kubernetes will ensure that the volume is mounted only with a single SELinux context.\n\nWhen \"false\", Kubernetes won't pass any special SELinux mount options to the driver. This is typical for volumes that represent subdirectories of a bigger shared filesystem.\n\nDefault is \"false\".", diff --git a/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go index 2b15ec3feb0..86343b170a5 100644 --- a/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/storage/v1alpha1/generated.proto +// source: k8s.io/api/storage/v1alpha1/generated.proto package v1alpha1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } func (*CSIStorageCapacity) ProtoMessage() {} func (*CSIStorageCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{0} + return fileDescriptor_02e7952e43280c27, []int{0} } func (m *CSIStorageCapacity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_CSIStorageCapacity proto.InternalMessageInfo func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } func (*CSIStorageCapacityList) ProtoMessage() {} func (*CSIStorageCapacityList) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{1} + return fileDescriptor_02e7952e43280c27, []int{1} } func (m *CSIStorageCapacityList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_CSIStorageCapacityList proto.InternalMessageInfo func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } func (*VolumeAttachment) ProtoMessage() {} func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{2} + return fileDescriptor_02e7952e43280c27, []int{2} } func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } func (*VolumeAttachmentList) ProtoMessage() {} func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{3} + return fileDescriptor_02e7952e43280c27, []int{3} } func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } func (*VolumeAttachmentSource) ProtoMessage() {} func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{4} + return fileDescriptor_02e7952e43280c27, []int{4} } func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } func (*VolumeAttachmentSpec) ProtoMessage() {} func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{5} + return fileDescriptor_02e7952e43280c27, []int{5} } func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } func (*VolumeAttachmentStatus) ProtoMessage() {} func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{6} + return fileDescriptor_02e7952e43280c27, []int{6} } func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo func (m *VolumeAttributesClass) Reset() { *m = VolumeAttributesClass{} } func (*VolumeAttributesClass) ProtoMessage() {} func (*VolumeAttributesClass) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{7} + return fileDescriptor_02e7952e43280c27, []int{7} } func (m *VolumeAttributesClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_VolumeAttributesClass proto.InternalMessageInfo func (m *VolumeAttributesClassList) Reset() { *m = VolumeAttributesClassList{} } func (*VolumeAttributesClassList) ProtoMessage() {} func (*VolumeAttributesClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{8} + return fileDescriptor_02e7952e43280c27, []int{8} } func (m *VolumeAttributesClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_VolumeAttributesClassList proto.InternalMessageInfo func (m *VolumeError) Reset() { *m = VolumeError{} } func (*VolumeError) ProtoMessage() {} func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{9} + return fileDescriptor_02e7952e43280c27, []int{9} } func (m *VolumeError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -343,75 +343,75 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/storage/v1alpha1/generated.proto", fileDescriptor_10f856db1e670dc4) -} - -var fileDescriptor_10f856db1e670dc4 = []byte{ - // 1023 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcb, 0x6e, 0x23, 0x45, - 0x17, 0x4e, 0xe7, 0x32, 0xe3, 0xa9, 0xe4, 0xff, 0xc7, 0x53, 0xca, 0x0c, 0xc6, 0x23, 0xb5, 0x23, - 0xaf, 0x0c, 0x62, 0xba, 0x49, 0x40, 0x68, 0x84, 0xc4, 0xc2, 0x9d, 0x64, 0x11, 0x91, 0x84, 0xa1, - 0x1c, 0x01, 0x02, 0x16, 0x94, 0xdb, 0x07, 0xbb, 0x62, 0xf7, 0x45, 0x55, 0xd5, 0x16, 0x66, 0xc5, - 0x8a, 0x35, 0x3b, 0xde, 0x80, 0x67, 0xc9, 0x02, 0x89, 0xd1, 0xac, 0x66, 0x65, 0x91, 0x86, 0x67, - 0x60, 0xc1, 0x06, 0xd4, 0xd5, 0xe5, 0x76, 0xc7, 0x6d, 0x07, 0x27, 0x8b, 0xec, 0x5c, 0xe7, 0xf2, - 0x9d, 0xdb, 0x77, 0x4e, 0x27, 0xe8, 0xa0, 0xff, 0x5c, 0x58, 0x2c, 0xb0, 0xfb, 0x51, 0x1b, 0xb8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to.RegisterFile("k8s.io/api/storage/v1alpha1/generated.proto", fileDescriptor_02e7952e43280c27) +} + +var fileDescriptor_02e7952e43280c27 = []byte{ + // 1009 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x3d, 0x6f, 0x23, 0x45, + 0x18, 0xce, 0xda, 0xce, 0x9d, 0x6f, 0x1c, 0x38, 0xdf, 0xc8, 0x77, 0x18, 0x9f, 0xb4, 0x3e, 0xb9, + 0x32, 0x1f, 0x37, 0x4b, 0x02, 0x42, 0x27, 0x24, 0x0a, 0x6f, 0x92, 0x22, 0x22, 0x09, 0xc7, 0x38, + 0x02, 0x04, 0x14, 0x8c, 0xd7, 0x83, 0x3d, 0x89, 0xf7, 0x43, 0x33, 0xb3, 0x16, 0xa6, 0xa2, 0xa2, + 0xa6, 0xe3, 0x1f, 0xf0, 0x5b, 0x52, 0x20, 0x71, 0xba, 0xea, 0x2a, 0x8b, 0x2c, 0xfc, 0x06, 0x0a, + 0x1a, 0xd0, 0xce, 0x8e, 0xd7, 0x1b, 0xaf, 0x1d, 0x9c, 0x14, 0xe9, 0x3c, 0x33, 0xef, 0xfb, 0x3c, + 0xef, 0xc7, 0xf3, 0xbe, 0x9b, 0x80, 0x77, 0xce, 0x9e, 0x09, 0xc4, 0x7c, 0x8b, 0x04, 0xcc, 0x12, + 0xd2, 0xe7, 0x64, 0x40, 0xad, 0xf1, 0x36, 0x19, 0x05, 0x43, 0xb2, 0x6d, 0x0d, 0xa8, 0x47, 0x39, + 0x91, 0xb4, 0x8f, 0x02, 0xee, 0x4b, 0x1f, 0x3e, 0x4e, 0x8c, 0x11, 0x09, 0x18, 0xd2, 0xc6, 0x68, + 0x66, 0xdc, 0x78, 0x3a, 0x60, 0x72, 0x18, 0xf6, 0x90, 0xe3, 0xbb, 0xd6, 0xc0, 0x1f, 0xf8, 0x96, + 0xf2, 0xe9, 0x85, 0xdf, 0x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 0x38, 0x9a, 0x89, 0x35, 0x51, 0xd4, 0x27, 0x37, + 0x18, 0x12, 0xd4, 0xc9, 0xa1, 0xed, 0x7b, 0x92, 0x4f, 0xec, 0x86, 0x8e, 0x02, 0xe6, 0x0d, 0xf0, + 0x92, 0x10, 0xe0, 0x29, 0xa8, 0x24, 0xb7, 0xfb, 0x9c, 0xfb, 0x5c, 0x8f, 0x6d, 0x7b, 0x8d, 0x88, + 0x94, 0xbd, 0x6d, 0x46, 0xd3, 0x66, 0xa5, 0x33, 0x07, 0xf8, 0x67, 0xda, 0xac, 0x64, 0xde, 0x71, + 0x16, 0x3c, 0xe6, 0xea, 0xd3, 0x39, 0x57, 0xe9, 0x26, 0x5c, 0x7b, 0x74, 0x35, 0x57, 0x06, 0xbc, + 0xb1, 0x0f, 0xde, 0x58, 0x51, 0x22, 0x58, 0x05, 0xc5, 0x33, 0x3a, 0x49, 0x94, 0x88, 0xe3, 0x9f, + 0xb0, 0x06, 0x36, 0xc7, 0x64, 0x14, 0x26, 0x8a, 0xbb, 0x87, 0x93, 0xc3, 0x47, 0x85, 0x67, 0x46, + 0xeb, 0xaf, 0x02, 0x78, 0x98, 0x76, 0x80, 0xb3, 0x5e, 0x28, 0xa9, 0x50, 0x1f, 0xd6, 0x5b, 0xd8, + 0xd0, 0x3b, 0x00, 0xf4, 0x39, 0x1b, 0x53, 0xae, 0xd4, 0xaa, 0x42, 0x9b, 0x7b, 0xec, 0xa5, 0x2f, + 0x38, 0x63, 0x05, 0xc7, 0x00, 0x04, 0x84, 0x13, 0x97, 0x4a, 0xca, 0xe3, 0x25, 0x1c, 0xeb, 0xcb, + 0x5e, 0x4f, 0x5f, 0xd9, 0xec, 0xd0, 0xf3, 0x14, 0x24, 0x91, 0x55, 0xca, 0x3b, 0x7f, 0xc0, 0x19, + 0xa6, 0xc6, 0xc7, 0xe0, 0xfe, 0x82, 0xcb, 0xb5, 0xca, 0xfc, 0xd2, 0x00, 0x6f, 0x2e, 0x0d, 0xe4, + 0x16, 0xf6, 0xfb, 0x17, 0x97, 0xf7, 0xfb, 0xce, 0xf5, 0xab, 0xb5, 0x62, 0xc9, 0xff, 0x64, 0x80, + 0xac, 0x3e, 0xe1, 0x21, 0x28, 0xc5, 0x7f, 0xcf, 0xea, 0x14, 0xde, 0x5e, 0x2f, 0x85, 0x13, 0xe6, + 0xd2, 0xf9, 0xa7, 0x36, 0x3e, 0x61, 0x85, 0x02, 0xdf, 0x02, 0x77, 0x5d, 0x2a, 0x04, 0x19, 0xcc, + 0xa4, 0x71, 0x5f, 0x1b, 0xdd, 0x3d, 0x4a, 0xae, 0xf1, 0xec, 0xdd, 0xee, 0x9c, 0x5f, 0x98, 0x1b, + 0x2f, 0x2e, 0xcc, 0x8d, 0x57, 0x17, 0xe6, 0xc6, 0x8f, 0x91, 0x69, 0x9c, 0x47, 0xa6, 0xf1, 0x22, + 0x32, 0x8d, 0x57, 0x91, 0x69, 0xfc, 0x11, 0x99, 0xc6, 0xcf, 0x7f, 0x9a, 0x1b, 0x5f, 0x3d, 0xbe, + 0xe2, 0x3f, 0x98, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x19, 0x2c, 0xaa, 0xdf, 0x0c, 0x00, + 0x00, } func (m *CSIStorageCapacity) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/generated.proto b/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/generated.proto index 49e522be53c..93aefd933a1 100644 --- a/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/generated.proto @@ -119,8 +119,6 @@ message CSIStorageCapacityList { optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name repeated CSIStorageCapacity items = 2; } diff --git a/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/types.go b/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/types.go index 5957e480749..1fbf65f8190 100644 --- a/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/storage/v1alpha1/types.go @@ -247,8 +247,6 @@ type CSIStorageCapacityList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name Items []CSIStorageCapacity `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/generated.pb.go index 42ef65ca0fa..c503ec6511c 100644 --- a/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/storage/v1beta1/generated.proto +// source: k8s.io/api/storage/v1beta1/generated.proto package v1beta1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CSIDriver) Reset() { *m = CSIDriver{} } func (*CSIDriver) ProtoMessage() {} func (*CSIDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{0} + return fileDescriptor_73e4f72503e71065, []int{0} } func (m *CSIDriver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_CSIDriver proto.InternalMessageInfo func (m *CSIDriverList) Reset() { *m = CSIDriverList{} } func (*CSIDriverList) ProtoMessage() {} func (*CSIDriverList) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{1} + return fileDescriptor_73e4f72503e71065, []int{1} } func (m *CSIDriverList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_CSIDriverList proto.InternalMessageInfo func (m *CSIDriverSpec) Reset() { *m = CSIDriverSpec{} } func (*CSIDriverSpec) ProtoMessage() {} func (*CSIDriverSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{2} + return fileDescriptor_73e4f72503e71065, []int{2} } func (m *CSIDriverSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_CSIDriverSpec proto.InternalMessageInfo func (m *CSINode) Reset() { *m = CSINode{} } func (*CSINode) ProtoMessage() {} func (*CSINode) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{3} + return fileDescriptor_73e4f72503e71065, []int{3} } func (m *CSINode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_CSINode proto.InternalMessageInfo func (m *CSINodeDriver) Reset() { *m = CSINodeDriver{} } func (*CSINodeDriver) ProtoMessage() {} func (*CSINodeDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{4} + return fileDescriptor_73e4f72503e71065, []int{4} } func (m *CSINodeDriver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_CSINodeDriver proto.InternalMessageInfo func (m *CSINodeList) Reset() { *m = CSINodeList{} } func (*CSINodeList) ProtoMessage() {} func (*CSINodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{5} + return fileDescriptor_73e4f72503e71065, []int{5} } func (m *CSINodeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_CSINodeList proto.InternalMessageInfo func (m *CSINodeSpec) Reset() { *m = CSINodeSpec{} } func (*CSINodeSpec) ProtoMessage() {} func (*CSINodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{6} + return fileDescriptor_73e4f72503e71065, []int{6} } func (m *CSINodeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_CSINodeSpec proto.InternalMessageInfo func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } func (*CSIStorageCapacity) ProtoMessage() {} func (*CSIStorageCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{7} + return fileDescriptor_73e4f72503e71065, []int{7} } func (m *CSIStorageCapacity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_CSIStorageCapacity proto.InternalMessageInfo func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } func (*CSIStorageCapacityList) ProtoMessage() {} func (*CSIStorageCapacityList) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{8} + return fileDescriptor_73e4f72503e71065, []int{8} } func (m *CSIStorageCapacityList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_CSIStorageCapacityList proto.InternalMessageInfo func (m *StorageClass) Reset() { *m = StorageClass{} } func (*StorageClass) ProtoMessage() {} func (*StorageClass) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{9} + return fileDescriptor_73e4f72503e71065, []int{9} } func (m *StorageClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_StorageClass proto.InternalMessageInfo func (m *StorageClassList) Reset() { *m = StorageClassList{} } func (*StorageClassList) ProtoMessage() {} func (*StorageClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{10} + return fileDescriptor_73e4f72503e71065, []int{10} } func (m *StorageClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_StorageClassList proto.InternalMessageInfo func (m *TokenRequest) Reset() { *m = TokenRequest{} } func (*TokenRequest) ProtoMessage() {} func (*TokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{11} + return fileDescriptor_73e4f72503e71065, []int{11} } func (m *TokenRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_TokenRequest proto.InternalMessageInfo func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } func (*VolumeAttachment) ProtoMessage() {} func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{12} + return fileDescriptor_73e4f72503e71065, []int{12} } func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } func (*VolumeAttachmentList) ProtoMessage() {} func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{13} + return fileDescriptor_73e4f72503e71065, []int{13} } func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } func (*VolumeAttachmentSource) ProtoMessage() {} func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{14} + return fileDescriptor_73e4f72503e71065, []int{14} } func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } func (*VolumeAttachmentSpec) ProtoMessage() {} func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{15} + return fileDescriptor_73e4f72503e71065, []int{15} } func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } func (*VolumeAttachmentStatus) ProtoMessage() {} func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{16} + return fileDescriptor_73e4f72503e71065, []int{16} } func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo func (m *VolumeError) Reset() { *m = VolumeError{} } func (*VolumeError) ProtoMessage() {} func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{17} + return fileDescriptor_73e4f72503e71065, []int{17} } func (m *VolumeError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_VolumeError proto.InternalMessageInfo func (m *VolumeNodeResources) Reset() { *m = VolumeNodeResources{} } func (*VolumeNodeResources) ProtoMessage() {} func (*VolumeNodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{18} + return fileDescriptor_73e4f72503e71065, []int{18} } func (m *VolumeNodeResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -605,116 +605,115 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/storage/v1beta1/generated.proto", fileDescriptor_7d2980599fd0de80) -} - -var fileDescriptor_7d2980599fd0de80 = []byte{ - // 1672 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1b, 0x4d, - 0x19, 0xcf, 0xc6, 0xce, 0xd7, 0x38, 0x69, 0x92, 0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x47, 0x6a, - 0x22, 0x30, 0x63, 0xb9, 0xdf, 0xab, 0x14, 0xb6, 0x23, 0x1c, 0x14, 0x07, 0xad, 0xfe, 0x45, 0x03, - 0x05, 0x75, 0xeb, 0x09, 0xb4, 0xb0, 0x67, 0xc9, 0x16, 0xf6, 0x83, 0x2b, 0xc4, 0x6b, 0x4c, 0x03, - 0x33, 0x87, 0x6e, 0xcb, 0xee, 0x75, 0x04, 0xe6, 0x2c, 0x19, 0x34, 0x56, 0xd4, 0x24, 0xf4, 0x9d, - 0x2b, 0x40, 0xab, 0x0e, 0xb9, 0xac, 0x0c, 0xcc, 0x85, 0x67, 0x86, 0x06, 0x50, 0xd5, 0xaf, 0x73, - 0x00, 0xee, 0x34, 0xeb, 0xa9, 0xfe, 0x30, 0x81, 0xb4, 0xa6, 0x60, 0x51, 0x64, 0xce, 0x20, 0x37, - 0x54, 0x7a, 0xff, 0xe4, 0x8a, 0x91, 0xc0, 0x2d, 0xd2, 0x69, 0x92, 0x0e, 0x31, 0xb9, 0xeb, 0x87, - 0x49, 0x76, 0x10, 0x03, 0x43, 0x09, 0x68, 0xb8, 0x0b, 0x56, 0x06, 0xed, 0xae, 0x83, 0x19, 0x13, - 0xc9, 0x5d, 0xcc, 0xc9, 0x64, 0x2e, 0x2a, 0x17, 0x57, 0x9a, 0x29, 0x3e, 0xca, 0x68, 0xc0, 0x37, - 0x60, 0xde, 0x8c, 0x77, 0xd6, 0x4b, 0xd2, 0x46, 0x1f, 0x2c, 0x2c, 0xfa, 0xab, 0x00, 0x3b, 0x9c, - 0xf2, 0xae, 0xb1, 0x28, 0x52, 0x66, 0xd8, 0x82, 0x87, 0x68, 0x90, 0x81, 0x55, 0x1b, 0x9f, 0x53, - 0x3b, 0xb0, 0xc3, 0xe4, 0x6e, 0xd2, 0xdf, 0x10, 0xd9, 0x7f, 0xaf, 0x6f, 0x42, 0xb6, 0xbe, 0x46, - 0x1a, 0x0c, 0x65, 0xf1, 0xab, 0xff, 0xd2, 0x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x44, 0x0b, 0xed, 0xe3, 0x15, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/storage/v1beta1/generated.proto", fileDescriptor_73e4f72503e71065) +} + +var fileDescriptor_73e4f72503e71065 = []byte{ + // 1655 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4d, 0x6f, 0x1b, 0xc5, + 0x1b, 0xcf, 0xc6, 0xce, 0xdb, 0x38, 0x69, 0x92, 0x49, 0xda, 0xbf, 0xff, 0x3e, 0xd8, 0x91, 0x11, + 0x34, 0xad, 0xca, 0xba, 0x0d, 0xa5, 0xaa, 0x2a, 0x55, 0x22, 0x9b, 0x04, 0xea, 0x36, 0x4e, 0xd3, + 0x71, 0x54, 0x55, 0x15, 0x07, 0xc6, 0xeb, 0x89, 0x33, 0x8d, 0xf7, 0xa5, 0x3b, 0xe3, 0x10, 0x73, + 0x82, 0x0b, 0x67, 0xc4, 0x81, 0x4f, 0xc0, 0x57, 0x00, 0x09, 0x2e, 0x1c, 0xa9, 0x84, 0x84, 0x2a, + 0x2e, 0xf4, 0x64, 0x51, 0xf3, 0x11, 0x90, 0x38, 0x44, 0x1c, 0xd0, 0xcc, 0x8e, 0xbd, 0x6f, 0x76, + 0x93, 0x70, 0xf0, 0xcd, 0xf3, 0xbc, 0xfc, 0x9e, 0x67, 0xe6, 0x79, 0x5d, 0x83, 0xab, 0x87, 0xb7, + 0x99, 0x4e, 0x9d, 0x12, 0x76, 0x69, 0x89, 0x71, 0xc7, 0xc3, 0x0d, 0x52, 0x3a, 0xba, 0x51, 0x23, + 0x1c, 0xdf, 0x28, 0x35, 0x88, 0x4d, 0x3c, 0xcc, 0x49, 0x5d, 0x77, 0x3d, 0x87, 0x3b, 0x30, 0xe7, + 0xcb, 0xea, 0xd8, 0xa5, 0xba, 0x92, 0xd5, 0x95, 0x6c, 0xee, 0xdd, 0x06, 0xe5, 0x07, 0xad, 0x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xea, 0x8c, 0x51, 0xec, + 0x76, 0x0a, 0x73, 0x1f, 0x56, 0x43, 0x8c, 0x93, 0x38, 0x01, 0x45, 0x15, 0x21, 0x01, 0x73, 0xdc, + 0x39, 0x24, 0xb6, 0x78, 0x3a, 0xc2, 0x38, 0xcb, 0x4e, 0xca, 0x58, 0xae, 0xbe, 0x29, 0x96, 0x7b, + 0x21, 0x05, 0xe3, 0xa2, 0x0a, 0xe7, 0x5c, 0x98, 0xca, 0x50, 0x14, 0x15, 0x6e, 0x80, 0x45, 0xcf, + 0x0f, 0x0e, 0x43, 0xc4, 0x6d, 0xd5, 0x9a, 0x94, 0x1d, 0x64, 0xa7, 0xe4, 0x8d, 0x2f, 0x76, 0x3b, + 0x85, 0x45, 0x14, 0x67, 0xa2, 0xa4, 0x3c, 0xbc, 0x09, 0x66, 0x19, 0xd9, 0xa6, 0x76, 0xeb, 0xd8, + 0x8f, 0xe9, 0xb4, 0xd4, 0x5f, 0xe8, 0x76, 0x0a, 0xb3, 0xd5, 0xad, 0x80, 0x8e, 0x22, 0x52, 0xc5, + 0xef, 0x35, 0x30, 0xb5, 0x51, 0x2d, 0xef, 0x38, 0x75, 0x32, 0x82, 0x82, 0x2e, 0x47, 0x0a, 0xfa, + 0xf2, 0x29, 0x25, 0x21, 0x9c, 0x1a, 0x5a, 0xce, 0x7f, 0xf9, 0xe5, 0x2c, 0x64, 0x54, 0x3f, 0x5a, + 0x01, 0x69, 0x1b, 0x5b, 0x44, 0xba, 0x3e, 0x13, 0xe8, 0xec, 0x60, 0x8b, 0x20, 0xc9, 0x81, 0xef, + 0x80, 0x49, 0xdb, 0xa9, 0x93, 0xf2, 0xa6, 0x74, 0x60, 0xc6, 0xb8, 0xa0, 0x64, 0x26, 0x77, 0x24, + 0x15, 0x29, 0xae, 0x78, 0x4a, 0xee, 0xb8, 0x4e, 0xd3, 0x69, 0xb4, 0x1f, 0x90, 0x76, 0x2f, 0xb9, + 0xe5, 0x53, 0xee, 0x85, 0xe8, 0x28, 0x22, 0x05, 0x6b, 0x20, 0x83, 0x9b, 0x4d, 0xc7, 0xc4, 0x1c, + 0xd7, 0x9a, 0x44, 0x66, 0x6c, 0x66, 0xad, 0xf4, 0xa6, 0x3b, 0xfa, 0x15, 0x21, 0x8c, 0x23, 0x35, + 0x11, 0x98, 0x31, 0xdf, 0xed, 0x14, 0x32, 0xeb, 0x01, 0x0e, 0x0a, 0x83, 0x16, 0xbf, 0xd3, 0x40, + 0x46, 0xdd, 0x7a, 0x04, 0x2d, 0xec, 0x5e, 0xb4, 0x85, 0xbd, 0x75, 0x86, 0x78, 0x0d, 0x69, 0x60, + 0x66, 0xdf, 0x6d, 0xd9, 0xbd, 0xf6, 0xc0, 0x54, 0x5d, 0x06, 0x8d, 0x65, 0x35, 0x09, 0x7d, 0xe5, + 0x0c, 0xd0, 0xaa, 0x43, 0xce, 0x2b, 0x03, 0x53, 0xfe, 0x99, 0xa1, 0x1e, 0x54, 0xf1, 0xef, 0x14, + 0x80, 0x1b, 0xd5, 0x72, 0xac, 0x3f, 0x8c, 0x20, 0xad, 0x29, 0x98, 0x15, 0x99, 0xd3, 0xcb, 0x0d, + 0x95, 0xde, 0xef, 0x9d, 0x31, 0x12, 0xb8, 0x46, 0x9a, 0x55, 0xd2, 0x24, 0x26, 0x77, 0x3c, 0x3f, + 0xc9, 0x76, 0x42, 0x60, 0x28, 0x02, 0x0d, 0x37, 0xc1, 0x42, 0xaf, 0xdd, 0x35, 0x31, 0x63, 0x22, + 0xb9, 0xb3, 0x29, 0x99, 0xcc, 0x59, 0xe5, 0xe2, 0x42, 0x35, 0xc6, 0x47, 0x09, 0x0d, 0xf8, 0x04, + 0x4c, 0x9b, 0xe1, 0xce, 0x7a, 0x4a, 0xda, 0xe8, 0xbd, 0x85, 0x45, 0x7f, 0xd4, 0xc2, 0x36, 0xa7, + 0xbc, 0x6d, 0xcc, 0x8a, 0x94, 0xe9, 0xb7, 0xe0, 0x3e, 0x1a, 0x64, 0x60, 0xd1, 0xc2, 0xc7, 0xd4, + 0x6a, 0x59, 0x7e, 0x72, 0x57, 0xe9, 0x67, 0x44, 0xf6, 0xdf, 0xf3, 0x9b, 0x90, 0xad, 0xaf, 0x12, + 0x07, 0x43, 0x49, 0xfc, 0xe2, 0x2f, 0x1a, 0xb8, 0x94, 0x0c, 0xfc, 0x08, 0x0a, 0xa4, 0x1a, 0x2d, + 0x10, 0xfd, 0x94, 0x2c, 0x8e, 0x39, 0x38, 0xa4, 0x56, 0xbe, 0x9e, 0x04, 0xb3, 0xe1, 0x18, 0x8e, + 0x20, 0x81, 0xdf, 0x07, 0x19, 0xd7, 0x73, 0x8e, 0x28, 0xa3, 0x8e, 0x4d, 0x3c, 0xd5, 0x1d, 0x97, + 0x94, 0x4a, 0x66, 0x37, 0x60, 0xa1, 0xb0, 0x1c, 0x6c, 0x02, 0xe0, 0x62, 0x0f, 0x5b, 0x84, 0x8b, + 0x4a, 0x4e, 0xc9, 0x37, 0xb8, 0xfd, 0xa6, 0x37, 0x08, 0x5f, 0x4b, 0xdf, 0xed, 0xab, 0x6e, 0xd9, + 0xdc, 0x6b, 0x07, 0x2e, 0x06, 0x0c, 0x14, 0xc2, 0x87, 0x87, 0x60, 0xce, 0x23, 0x66, 0x13, 0x53, + 0x4b, 0x8d, 0xf5, 0xb4, 0x74, 0x73, 0x4b, 0x8c, 0x57, 0x14, 0x66, 0x9c, 0x74, 0x0a, 0xd7, 0x93, + 0x2b, 0xba, 0xbe, 0x4b, 0x3c, 0x46, 0x19, 0x27, 0x36, 0xf7, 0x53, 0x27, 0xa2, 0x83, 0xa2, 0xd8, + 0x62, 0x04, 0x58, 0x62, 0x40, 0x3e, 0x74, 0x39, 0x75, 0x6c, 0x96, 0x9d, 0x08, 0x46, 0x40, 0x25, + 0x44, 0x47, 0x11, 0x29, 0xb8, 0x0d, 0x96, 0x45, 0xb7, 0xfe, 0xd4, 0x37, 0xb0, 0x75, 0xec, 0x62, + 0x5b, 0x3c, 0x55, 0x76, 0x52, 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6e, 0x5e, 0xfb, 0xa3, 0x9b, 0xd7, 0xbe, + 0xfa, 0x33, 0x3f, 0xf6, 0x34, 0x37, 0xfc, 0xdf, 0xda, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x12, + 0x41, 0x18, 0xc9, 0xca, 0x15, 0x00, 0x00, } func (m *CSIDriver) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/generated.proto b/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/generated.proto index b99fd39e48a..f6e619d05da 100644 --- a/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/generated.proto @@ -127,6 +127,7 @@ message CSIDriverSpec { // This field is immutable. // // +optional + // +listType=atomic repeated string volumeLifecycleModes = 3; // storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage @@ -263,6 +264,7 @@ message CSINodeDriver { // It is possible for different nodes to use different topology keys. // This can be empty if driver does not support topology. // +optional + // +listType=atomic repeated string topologyKeys = 3; // allocatable represents the volume resources of a node that are available for scheduling. @@ -287,6 +289,8 @@ message CSINodeSpec { // If all drivers in the list are uninstalled, this can become empty. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated CSINodeDriver drivers = 1; } @@ -379,8 +383,6 @@ message CSIStorageCapacityList { optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name repeated CSIStorageCapacity items = 2; } @@ -412,6 +414,7 @@ message StorageClass { // e.g. ["ro", "soft"]. Not validated - // mount of the PVs will simply fail if one is invalid. // +optional + // +listType=atomic repeated string mountOptions = 5; // allowVolumeExpansion shows whether the storage class allow volume expand diff --git a/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/types.go b/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/types.go index 0f5ade3c138..9333a28b8d0 100644 --- a/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/types.go +++ b/pkg/k8s/vendor/k8s.io/api/storage/v1beta1/types.go @@ -59,6 +59,7 @@ type StorageClass struct { // e.g. ["ro", "soft"]. Not validated - // mount of the PVs will simply fail if one is invalid. // +optional + // +listType=atomic MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,5,opt,name=mountOptions"` // allowVolumeExpansion shows whether the storage class allow volume expand @@ -347,6 +348,7 @@ type CSIDriverSpec struct { // This field is immutable. // // +optional + // +listType=atomic VolumeLifecycleModes []VolumeLifecycleMode `json:"volumeLifecycleModes,omitempty" protobuf:"bytes,3,opt,name=volumeLifecycleModes"` // storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage @@ -535,6 +537,8 @@ type CSINodeSpec struct { // If all drivers in the list are uninstalled, this can become empty. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Drivers []CSINodeDriver `json:"drivers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=drivers"` } @@ -567,6 +571,7 @@ type CSINodeDriver struct { // It is possible for different nodes to use different topology keys. // This can be empty if driver does not support topology. // +optional + // +listType=atomic TopologyKeys []string `json:"topologyKeys" protobuf:"bytes,3,rep,name=topologyKeys"` // allocatable represents the volume resources of a node that are available for scheduling. @@ -707,7 +712,5 @@ type CSIStorageCapacityList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name Items []CSIStorageCapacity `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go new file mode 100644 index 00000000000..192f9ff3c3c --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go @@ -0,0 +1,23 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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:protobuf-gen=package +// +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true +// +groupName=storagemigration.k8s.io + +package v1alpha1 // import "k8s.io/api/storagemigration/v1alpha1" diff --git a/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/generated.pb.go b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/generated.pb.go new file mode 100644 index 00000000000..ed57f34b59e --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/generated.pb.go @@ -0,0 +1,1688 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/api/storagemigration/v1alpha1/generated.proto + +package v1alpha1 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + + k8s_io_api_core_v1 "k8s.io/api/core/v1" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } +func (*GroupVersionResource) ProtoMessage() {} +func (*GroupVersionResource) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{0} +} +func (m *GroupVersionResource) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupVersionResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GroupVersionResource) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupVersionResource.Merge(m, src) +} +func (m *GroupVersionResource) XXX_Size() int { + return m.Size() +} +func (m *GroupVersionResource) XXX_DiscardUnknown() { + xxx_messageInfo_GroupVersionResource.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupVersionResource proto.InternalMessageInfo + +func (m *MigrationCondition) Reset() { *m = MigrationCondition{} } +func (*MigrationCondition) ProtoMessage() {} +func (*MigrationCondition) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{1} +} +func (m *MigrationCondition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MigrationCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MigrationCondition) XXX_Merge(src proto.Message) { + xxx_messageInfo_MigrationCondition.Merge(m, src) +} +func (m *MigrationCondition) XXX_Size() int { + return m.Size() +} +func (m *MigrationCondition) XXX_DiscardUnknown() { + xxx_messageInfo_MigrationCondition.DiscardUnknown(m) +} + +var xxx_messageInfo_MigrationCondition proto.InternalMessageInfo + +func (m *StorageVersionMigration) Reset() { *m = StorageVersionMigration{} } +func (*StorageVersionMigration) ProtoMessage() {} +func (*StorageVersionMigration) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{2} +} +func (m *StorageVersionMigration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageVersionMigration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *StorageVersionMigration) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageVersionMigration.Merge(m, src) +} +func (m *StorageVersionMigration) XXX_Size() int { + return m.Size() +} +func (m *StorageVersionMigration) XXX_DiscardUnknown() { + xxx_messageInfo_StorageVersionMigration.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageVersionMigration proto.InternalMessageInfo + +func (m *StorageVersionMigrationList) Reset() { *m = StorageVersionMigrationList{} } +func (*StorageVersionMigrationList) ProtoMessage() {} +func (*StorageVersionMigrationList) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{3} +} +func (m *StorageVersionMigrationList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageVersionMigrationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *StorageVersionMigrationList) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageVersionMigrationList.Merge(m, src) +} +func (m *StorageVersionMigrationList) XXX_Size() int { + return m.Size() +} +func (m *StorageVersionMigrationList) XXX_DiscardUnknown() { + xxx_messageInfo_StorageVersionMigrationList.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageVersionMigrationList proto.InternalMessageInfo + +func (m *StorageVersionMigrationSpec) Reset() { *m = StorageVersionMigrationSpec{} } +func (*StorageVersionMigrationSpec) ProtoMessage() {} +func (*StorageVersionMigrationSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{4} +} +func (m *StorageVersionMigrationSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageVersionMigrationSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *StorageVersionMigrationSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageVersionMigrationSpec.Merge(m, src) +} +func (m *StorageVersionMigrationSpec) XXX_Size() int { + return m.Size() +} +func (m *StorageVersionMigrationSpec) XXX_DiscardUnknown() { + xxx_messageInfo_StorageVersionMigrationSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageVersionMigrationSpec proto.InternalMessageInfo + +func (m *StorageVersionMigrationStatus) Reset() { *m = StorageVersionMigrationStatus{} } +func (*StorageVersionMigrationStatus) ProtoMessage() {} +func (*StorageVersionMigrationStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{5} +} +func (m *StorageVersionMigrationStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageVersionMigrationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *StorageVersionMigrationStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageVersionMigrationStatus.Merge(m, src) +} +func (m *StorageVersionMigrationStatus) XXX_Size() int { + return m.Size() +} +func (m *StorageVersionMigrationStatus) XXX_DiscardUnknown() { + xxx_messageInfo_StorageVersionMigrationStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageVersionMigrationStatus proto.InternalMessageInfo + +func init() { + proto.RegisterType((*GroupVersionResource)(nil), "k8s.io.api.storagemigration.v1alpha1.GroupVersionResource") + proto.RegisterType((*MigrationCondition)(nil), "k8s.io.api.storagemigration.v1alpha1.MigrationCondition") + proto.RegisterType((*StorageVersionMigration)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigration") + proto.RegisterType((*StorageVersionMigrationList)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationList") + proto.RegisterType((*StorageVersionMigrationSpec)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationSpec") + proto.RegisterType((*StorageVersionMigrationStatus)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationStatus") +} + +func init() { + proto.RegisterFile("k8s.io/api/storagemigration/v1alpha1/generated.proto", fileDescriptor_0117377a57b172b9) +} + +var fileDescriptor_0117377a57b172b9 = []byte{ + // 719 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x4f, 0x13, 0x4f, + 0x14, 0xef, 0x42, 0x0b, 0x7c, 0xa7, 0x5f, 0xc0, 0x4c, 0x14, 0x1a, 0x8c, 0x5b, 0x53, 0x09, 0x41, + 0xa3, 0xb3, 0xd2, 0x10, 0x43, 0x30, 0x1e, 0x28, 0x07, 0xa3, 0x81, 0x98, 0x0c, 0xc8, 0xc1, 0x78, + 0x70, 0xba, 0x1d, 0xb7, 0x43, 0xd9, 0x9d, 0xcd, 0xce, 0x6c, 0x13, 0x6e, 0xfe, 0x09, 0x1e, 0xfc, + 0x93, 0x3c, 0x70, 0x31, 0xe1, 0xc8, 0xc5, 0x2a, 0xf5, 0xbf, 0xe0, 0x64, 0x66, 0x76, 0x76, 0xfb, + 0x8b, 0x62, 0x13, 0x6e, 0x3b, 0xef, 0xbd, 0xcf, 0x67, 0xde, 0x7b, 0x9f, 0x79, 0x6f, 0xc1, 0x66, + 0x6b, 0x4b, 0x20, 0xc6, 0x1d, 0x12, 0x32, 0x47, 0x48, 0x1e, 0x11, 0x8f, 0xfa, 0xcc, 0x8b, 0x88, + 0x64, 0x3c, 0x70, 0xda, 0x1b, 0xe4, 0x24, 0x6c, 0x92, 0x0d, 0xc7, 0xa3, 0x01, 0x8d, 0x88, 0xa4, + 0x0d, 0x14, 0x46, 0x5c, 0x72, 0xb8, 0x9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9a, 0x21, 0xc8, 0x1f, + 0x9e, 0x86, 0xf4, 0xaa, 0x53, 0x5e, 0x1a, 0x45, 0x28, 0x0f, 0xd6, 0x18, 0xb8, 0x07, 0x66, 0x84, + 0x24, 0x32, 0x16, 0x26, 0xd5, 0x4d, 0x83, 0x9e, 0x39, 0xd0, 0xd6, 0xab, 0x4e, 0xf9, 0x1a, 0x39, + 0x51, 0xc6, 0x94, 0x44, 0x61, 0xc3, 0x01, 0x8f, 0xc1, 0xc2, 0x09, 0x11, 0xf2, 0x7d, 0xd8, 0x20, + 0x92, 0x1e, 0x32, 0x3f, 0x29, 0xaa, 0x58, 0x7d, 0x82, 0x7a, 0x0f, 0x2d, 0x13, 0x02, 0x85, 0x2d, + 0x4f, 0x19, 0x04, 0x52, 0x7a, 0xa3, 0xf6, 0x06, 0x52, 0x88, 0xda, 0x92, 0xc9, 0x60, 0x61, 0x6f, + 0x80, 0x09, 0x0f, 0x31, 0xc3, 0x35, 0x30, 0x13, 0x51, 0x22, 0x78, 0x50, 0xca, 0xeb, 0xcc, 0x17, + 0xd2, 0xcc, 0xb1, 0xb6, 0x62, 0xe3, 0x55, 0x6a, 0xf8, 0x54, 0x08, 0xe2, 0xd1, 0x52, 0x61, 0x50, + 0x8d, 0xfd, 0xc4, 0x8c, 0x53, 0x7f, 0xe5, 0xc7, 0x14, 0x58, 0x3e, 0x48, 0xc6, 0xc0, 0x28, 0x95, + 0xf5, 0x0e, 0x7e, 0x02, 0x73, 0x2a, 0xcd, 0x06, 0x91, 0x44, 0x37, 0xba, 0x58, 0x7d, 0x3e, 0x59, + 0x51, 0xef, 0xea, 0xc7, 0xd4, 0x95, 0xfb, 0x54, 0x92, 0x1a, 0x34, 0x37, 0x83, 0x9e, 0x0d, 0x67, + 0xac, 0xd0, 0x05, 0x79, 0x11, 0x52, 0x57, 0x0b, 0x51, 0xac, 0xee, 0xa0, 0x49, 0x66, 0x13, 0x8d, + 0x49, 0xf7, 0x20, 0xa4, 0x6e, 0xed, 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d6, 0x59, 0xd7, 0xb6, 0xce, 0xbb, + 0xb6, 0x75, 0xd1, 0xb5, 0xad, 0xdf, 0x5d, 0xdb, 0xfa, 0xfa, 0xc7, 0xce, 0x7d, 0x58, 0x9d, 0xe4, + 0xb7, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x01, 0xc1, 0xb1, 0xd8, 0x5d, 0x07, 0x00, 0x00, +} + +func (m *GroupVersionResource) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupVersionResource) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupVersionResource) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0x1a + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + i -= len(m.Group) + copy(dAtA[i:], m.Group) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MigrationCondition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MigrationCondition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MigrationCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x2a + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x22 + { + size, err := m.LastUpdateTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0x12 + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StorageVersionMigration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageVersionMigration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageVersionMigration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StorageVersionMigrationList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageVersionMigrationList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageVersionMigrationList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StorageVersionMigrationSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageVersionMigrationSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageVersionMigrationSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.ContinueToken) + copy(dAtA[i:], m.ContinueToken) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContinueToken))) + i-- + dAtA[i] = 0x12 + { + size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StorageVersionMigrationStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageVersionMigrationStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageVersionMigrationStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x12 + if len(m.Conditions) > 0 { + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GroupVersionResource) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = 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)) + return n +} + +func (m *MigrationCondition) Size() (n int) { + if m == nil { + return 0 + } + 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.LastUpdateTime.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 *StorageVersionMigration) Size() (n int) { + if m == nil { + return 0 + } + 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 *StorageVersionMigrationList) Size() (n int) { + if m == nil { + return 0 + } + 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 *StorageVersionMigrationSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Resource.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ContinueToken) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *StorageVersionMigrationStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *GroupVersionResource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GroupVersionResource{`, + `Group:` + fmt.Sprintf("%v", this.Group) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `}`, + }, "") + return s +} +func (this *MigrationCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MigrationCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `LastUpdateTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastUpdateTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `}`, + }, "") + return s +} +func (this *StorageVersionMigration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StorageVersionMigration{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StorageVersionMigrationSpec", "StorageVersionMigrationSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StorageVersionMigrationStatus", "StorageVersionMigrationStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *StorageVersionMigrationList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]StorageVersionMigration{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "StorageVersionMigration", "StorageVersionMigration", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&StorageVersionMigrationList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *StorageVersionMigrationSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StorageVersionMigrationSpec{`, + `Resource:` + strings.Replace(strings.Replace(this.Resource.String(), "GroupVersionResource", "GroupVersionResource", 1), `&`, ``, 1) + `,`, + `ContinueToken:` + fmt.Sprintf("%v", this.ContinueToken) + `,`, + `}`, + }, "") + return s +} +func (this *StorageVersionMigrationStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForConditions := "[]MigrationCondition{" + for _, f := range this.Conditions { + repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "MigrationCondition", "MigrationCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForConditions += "}" + s := strings.Join([]string{`&StorageVersionMigrationStatus{`, + `Conditions:` + repeatedStringForConditions + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `}`, + }, "") + 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 *GroupVersionResource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupVersionResource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupVersionResource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MigrationCondition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MigrationCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MigrationCondition: 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = MigrationConditionType(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 < 0 { + return ErrInvalidLengthGenerated + } + 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 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastUpdateTime.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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageVersionMigration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageVersionMigration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageVersionMigration: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageVersionMigrationList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageVersionMigrationList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageVersionMigrationList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, StorageVersionMigration{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageVersionMigrationSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageVersionMigrationSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageVersionMigrationSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContinueToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContinueToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageVersionMigrationStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageVersionMigrationStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageVersionMigrationStatus: 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, MigrationCondition{}) + 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 ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 + depth := 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 + } + } + case 1: + iNdEx += 8 + 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 + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/generated.proto b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/generated.proto new file mode 100644 index 00000000000..fc8a3346e2e --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/generated.proto @@ -0,0 +1,127 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = "proto2"; + +package k8s.io.api.storagemigration.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"; + +// Package-wide variables from generator "generated". +option go_package = "k8s.io/api/storagemigration/v1alpha1"; + +// The names of the group, the version, and the resource. +message GroupVersionResource { + // The name of the group. + optional string group = 1; + + // The name of the version. + optional string version = 2; + + // The name of the resource. + optional string resource = 3; +} + +// Describes the state of a migration at a certain point. +message MigrationCondition { + // Type of the 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 + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 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; +} + +// StorageVersionMigration represents a migration of stored data to the latest +// storage version. +message StorageVersionMigration { + // Standard object metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the migration. + // +optional + optional StorageVersionMigrationSpec spec = 2; + + // Status of the migration. + // +optional + optional StorageVersionMigrationStatus status = 3; +} + +// StorageVersionMigrationList is a collection of storage version migrations. +message StorageVersionMigrationList { + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of StorageVersionMigration + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + repeated StorageVersionMigration items = 2; +} + +// Spec of the storage version migration. +message StorageVersionMigrationSpec { + // The resource that is being migrated. The migrator sends requests to + // the endpoint serving the resource. + // Immutable. + optional GroupVersionResource resource = 1; + + // The token used in the list options to get the next chunk of objects + // to migrate. When the .status.conditions indicates the migration is + // "Running", users can use this token to check the progress of the + // migration. + // +optional + optional string continueToken = 2; +} + +// Status of the storage version migration. +message StorageVersionMigrationStatus { + // The latest available observations of the migration's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + repeated MigrationCondition conditions = 1; + + // ResourceVersion to compare with the GC cache for performing the migration. + // This is the current resource version of given group, version and resource when + // kube-controller-manager first observes this StorageVersionMigration resource. + optional string resourceVersion = 2; +} + diff --git a/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/register.go b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/register.go new file mode 100644 index 00000000000..c9706050f12 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/register.go @@ -0,0 +1,58 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// GroupName is the group name use in this package +const GroupName = "storagemigration.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = 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, + &StorageVersionMigration{}, + &StorageVersionMigrationList{}, + ) + + // Add the watch version that applies + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/types.go b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/types.go new file mode 100644 index 00000000000..0f343d1e956 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/types.go @@ -0,0 +1,131 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 ( + corev1 "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 +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// StorageVersionMigration represents a migration of stored data to the latest +// storage version. +type StorageVersionMigration struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the migration. + // +optional + Spec StorageVersionMigrationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + // Status of the migration. + // +optional + Status StorageVersionMigrationStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// Spec of the storage version migration. +type StorageVersionMigrationSpec struct { + // The resource that is being migrated. The migrator sends requests to + // the endpoint serving the resource. + // Immutable. + Resource GroupVersionResource `json:"resource" protobuf:"bytes,1,opt,name=resource"` + // The token used in the list options to get the next chunk of objects + // to migrate. When the .status.conditions indicates the migration is + // "Running", users can use this token to check the progress of the + // migration. + // +optional + ContinueToken string `json:"continueToken,omitempty" protobuf:"bytes,2,opt,name=continueToken"` + // TODO: consider recording the storage version hash when the migration + // is created. It can avoid races. +} + +// The names of the group, the version, and the resource. +type GroupVersionResource struct { + // The name of the group. + Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` + // The name of the version. + Version string `json:"version,omitempty" protobuf:"bytes,2,opt,name=version"` + // The name of the resource. + Resource string `json:"resource,omitempty" protobuf:"bytes,3,opt,name=resource"` +} + +type MigrationConditionType string + +const ( + // Indicates that the migration is running. + MigrationRunning MigrationConditionType = "Running" + // Indicates that the migration has completed successfully. + MigrationSucceeded MigrationConditionType = "Succeeded" + // Indicates that the migration has failed. + MigrationFailed MigrationConditionType = "Failed" +) + +// Describes the state of a migration at a certain point. +type MigrationCondition struct { + // Type of the condition. + Type MigrationConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=MigrationConditionType"` + // Status of the condition, one of True, False, Unknown. + Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` + // The last time this condition was updated. + // +optional + LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,3,opt,name=lastUpdateTime"` + // 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"` +} + +// Status of the storage version migration. +type StorageVersionMigrationStatus struct { + // The latest available observations of the migration's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []MigrationCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` + // ResourceVersion to compare with the GC cache for performing the migration. + // This is the current resource version of given group, version and resource when + // kube-controller-manager first observes this StorageVersionMigration resource. + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// StorageVersionMigrationList is a collection of storage version migrations. +type StorageVersionMigrationList struct { + metav1.TypeMeta `json:",inline"` + + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Items is the list of StorageVersionMigration + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Items []StorageVersionMigration `json:"items" listType:"map" listMapKey:"type" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=items"` +} diff --git a/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/types_swagger_doc_generated.go b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/types_swagger_doc_generated.go new file mode 100644 index 00000000000..257d72a2363 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/types_swagger_doc_generated.go @@ -0,0 +1,95 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +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-codegen.sh + +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_GroupVersionResource = map[string]string{ + "": "The names of the group, the version, and the resource.", + "group": "The name of the group.", + "version": "The name of the version.", + "resource": "The name of the resource.", +} + +func (GroupVersionResource) SwaggerDoc() map[string]string { + return map_GroupVersionResource +} + +var map_MigrationCondition = map[string]string{ + "": "Describes the state of a migration at a certain point.", + "type": "Type of the condition.", + "status": "Status of the condition, one of True, False, Unknown.", + "lastUpdateTime": "The last time this condition was updated.", + "reason": "The reason for the condition's last transition.", + "message": "A human readable message indicating details about the transition.", +} + +func (MigrationCondition) SwaggerDoc() map[string]string { + return map_MigrationCondition +} + +var map_StorageVersionMigration = map[string]string{ + "": "StorageVersionMigration represents a migration of stored data to the latest storage version.", + "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the migration.", + "status": "Status of the migration.", +} + +func (StorageVersionMigration) SwaggerDoc() map[string]string { + return map_StorageVersionMigration +} + +var map_StorageVersionMigrationList = map[string]string{ + "": "StorageVersionMigrationList is a collection of storage version migrations.", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "Items is the list of StorageVersionMigration", +} + +func (StorageVersionMigrationList) SwaggerDoc() map[string]string { + return map_StorageVersionMigrationList +} + +var map_StorageVersionMigrationSpec = map[string]string{ + "": "Spec of the storage version migration.", + "resource": "The resource that is being migrated. The migrator sends requests to the endpoint serving the resource. Immutable.", + "continueToken": "The token used in the list options to get the next chunk of objects to migrate. When the .status.conditions indicates the migration is \"Running\", users can use this token to check the progress of the migration.", +} + +func (StorageVersionMigrationSpec) SwaggerDoc() map[string]string { + return map_StorageVersionMigrationSpec +} + +var map_StorageVersionMigrationStatus = map[string]string{ + "": "Status of the storage version migration.", + "conditions": "The latest available observations of the migration's current state.", + "resourceVersion": "ResourceVersion to compare with the GC cache for performing the migration. This is the current resource version of given group, version and resource when kube-controller-manager first observes this StorageVersionMigration resource.", +} + +func (StorageVersionMigrationStatus) SwaggerDoc() map[string]string { + return map_StorageVersionMigrationStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.deepcopy.go b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000000..9d35011d59c --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,160 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package 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 *GroupVersionResource) DeepCopyInto(out *GroupVersionResource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionResource. +func (in *GroupVersionResource) DeepCopy() *GroupVersionResource { + if in == nil { + return nil + } + out := new(GroupVersionResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MigrationCondition) DeepCopyInto(out *MigrationCondition) { + *out = *in + in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigrationCondition. +func (in *MigrationCondition) DeepCopy() *MigrationCondition { + if in == nil { + return nil + } + out := new(MigrationCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageVersionMigration) DeepCopyInto(out *StorageVersionMigration) { + *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 StorageVersionMigration. +func (in *StorageVersionMigration) DeepCopy() *StorageVersionMigration { + if in == nil { + return nil + } + out := new(StorageVersionMigration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageVersionMigration) 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 *StorageVersionMigrationList) DeepCopyInto(out *StorageVersionMigrationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageVersionMigration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationList. +func (in *StorageVersionMigrationList) DeepCopy() *StorageVersionMigrationList { + if in == nil { + return nil + } + out := new(StorageVersionMigrationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageVersionMigrationList) 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 *StorageVersionMigrationSpec) DeepCopyInto(out *StorageVersionMigrationSpec) { + *out = *in + out.Resource = in.Resource + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationSpec. +func (in *StorageVersionMigrationSpec) DeepCopy() *StorageVersionMigrationSpec { + if in == nil { + return nil + } + out := new(StorageVersionMigrationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageVersionMigrationStatus) DeepCopyInto(out *StorageVersionMigrationStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]MigrationCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationStatus. +func (in *StorageVersionMigrationStatus) DeepCopy() *StorageVersionMigrationStatus { + if in == nil { + return nil + } + out := new(StorageVersionMigrationStatus) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..acdb5743512 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,58 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1alpha1 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *StorageVersionMigration) APILifecycleIntroduced() (major, minor int) { + return 1, 30 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *StorageVersionMigration) APILifecycleDeprecated() (major, minor int) { + return 1, 33 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *StorageVersionMigration) APILifecycleRemoved() (major, minor int) { + return 1, 36 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *StorageVersionMigrationList) APILifecycleIntroduced() (major, minor int) { + return 1, 30 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *StorageVersionMigrationList) APILifecycleDeprecated() (major, minor int) { + return 1, 33 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *StorageVersionMigrationList) APILifecycleRemoved() (major, minor int) { + return 1, 36 +} diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go index b1c5f6f4c09..6556eda65d5 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go @@ -70,6 +70,12 @@ type CustomResourceDefinitionSpec struct { // Top-level and per-version columns are mutually exclusive. // +optional AdditionalPrinterColumns []CustomResourceColumnDefinition + // selectableFields specifies paths to fields that may be used as field selectors. + // A maximum of 8 selectable fields are allowed. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // Top-level and per-version columns are mutually exclusive. + // +optional + SelectableFields []SelectableField // `conversion` defines conversion settings for the CRD. Conversion *CustomResourceConversion @@ -207,6 +213,25 @@ type CustomResourceDefinitionVersion struct { // be explicitly set to null // +optional AdditionalPrinterColumns []CustomResourceColumnDefinition + + // selectableFields specifies paths to fields that may be used as field selectors. + // A maximum of 8 selectable fields are allowed. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // +optional + SelectableFields []SelectableField +} + +// SelectableField specifies the JSON path of a field that may be used with field selectors. +type SelectableField struct { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. + JSONPath string } // CustomResourceColumnDefinition specifies a column for server side printing. diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go index 4d29ff8235d..2ca72bb16b3 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go @@ -80,7 +80,7 @@ func Convert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefi out.Versions = []CustomResourceDefinitionVersion{{Name: in.Version, Served: true, Storage: true}} } - // If spec.{subresources,validation,additionalPrinterColumns} exists, move to versions + // If spec.{subresources,validation,additionalPrinterColumns,selectableFields} exists, move to versions if in.Subresources != nil { subresources := &CustomResourceSubresources{} if err := Convert_apiextensions_CustomResourceSubresources_To_v1_CustomResourceSubresources(in.Subresources, subresources, s); err != nil { @@ -110,6 +110,17 @@ func Convert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefi out.Versions[i].AdditionalPrinterColumns = additionalPrinterColumns } } + if in.SelectableFields != nil { + selectableFields := make([]SelectableField, len(in.SelectableFields)) + for i := range in.SelectableFields { + if err := Convert_apiextensions_SelectableField_To_v1_SelectableField(&in.SelectableFields[i], &selectableFields[i], s); err != nil { + return err + } + } + for i := range out.Versions { + out.Versions[i].SelectableFields = selectableFields + } + } return nil } @@ -125,13 +136,15 @@ func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefi // Copy versions[0] to version out.Version = out.Versions[0].Name - // If versions[*].{subresources,schema,additionalPrinterColumns} are identical, move to spec + // If versions[*].{subresources,schema,additionalPrinterColumns,selectableFields} are identical, move to spec subresources := out.Versions[0].Subresources subresourcesIdentical := true validation := out.Versions[0].Schema validationIdentical := true additionalPrinterColumns := out.Versions[0].AdditionalPrinterColumns additionalPrinterColumnsIdentical := true + selectableFields := out.Versions[0].SelectableFields + selectableFieldsIdentical := true // Detect if per-version fields are identical for _, v := range out.Versions { @@ -144,6 +157,9 @@ func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefi if additionalPrinterColumnsIdentical && !apiequality.Semantic.DeepEqual(v.AdditionalPrinterColumns, additionalPrinterColumns) { additionalPrinterColumnsIdentical = false } + if selectableFieldsIdentical && !apiequality.Semantic.DeepEqual(v.SelectableFields, selectableFields) { + selectableFieldsIdentical = false + } } // If they are, set the top-level fields and clear the per-version fields @@ -156,6 +172,9 @@ func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefi if additionalPrinterColumnsIdentical { out.AdditionalPrinterColumns = additionalPrinterColumns } + if selectableFieldsIdentical { + out.SelectableFields = selectableFields + } for i := range out.Versions { if subresourcesIdentical { out.Versions[i].Subresources = nil @@ -166,6 +185,9 @@ func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefi if additionalPrinterColumnsIdentical { out.Versions[i].AdditionalPrinterColumns = nil } + if selectableFieldsIdentical { + out.Versions[i].SelectableFields = nil + } } return nil diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go index 6c22a516985..8e081e4b1c5 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto +// source: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } func (*ConversionRequest) ProtoMessage() {} func (*ConversionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{0} + return fileDescriptor_c5e101a0235c8c62, []int{0} } func (m *ConversionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_ConversionRequest proto.InternalMessageInfo func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } func (*ConversionResponse) ProtoMessage() {} func (*ConversionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{1} + return fileDescriptor_c5e101a0235c8c62, []int{1} } func (m *ConversionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_ConversionResponse proto.InternalMessageInfo func (m *ConversionReview) Reset() { *m = ConversionReview{} } func (*ConversionReview) ProtoMessage() {} func (*ConversionReview) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{2} + return fileDescriptor_c5e101a0235c8c62, []int{2} } func (m *ConversionReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_ConversionReview proto.InternalMessageInfo func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } func (*CustomResourceColumnDefinition) ProtoMessage() {} func (*CustomResourceColumnDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{3} + return fileDescriptor_c5e101a0235c8c62, []int{3} } func (m *CustomResourceColumnDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_CustomResourceColumnDefinition proto.InternalMessageInfo func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } func (*CustomResourceConversion) ProtoMessage() {} func (*CustomResourceConversion) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{4} + return fileDescriptor_c5e101a0235c8c62, []int{4} } func (m *CustomResourceConversion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_CustomResourceConversion proto.InternalMessageInfo func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } func (*CustomResourceDefinition) ProtoMessage() {} func (*CustomResourceDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{5} + return fileDescriptor_c5e101a0235c8c62, []int{5} } func (m *CustomResourceDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_CustomResourceDefinition proto.InternalMessageInfo func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } func (*CustomResourceDefinitionCondition) ProtoMessage() {} func (*CustomResourceDefinitionCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{6} + return fileDescriptor_c5e101a0235c8c62, []int{6} } func (m *CustomResourceDefinitionCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_CustomResourceDefinitionCondition proto.InternalMessageInfo func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } func (*CustomResourceDefinitionList) ProtoMessage() {} func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{7} + return fileDescriptor_c5e101a0235c8c62, []int{7} } func (m *CustomResourceDefinitionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_CustomResourceDefinitionList proto.InternalMessageInfo func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } func (*CustomResourceDefinitionNames) ProtoMessage() {} func (*CustomResourceDefinitionNames) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{8} + return fileDescriptor_c5e101a0235c8c62, []int{8} } func (m *CustomResourceDefinitionNames) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_CustomResourceDefinitionNames proto.InternalMessageInfo func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } func (*CustomResourceDefinitionSpec) ProtoMessage() {} func (*CustomResourceDefinitionSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{9} + return fileDescriptor_c5e101a0235c8c62, []int{9} } func (m *CustomResourceDefinitionSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_CustomResourceDefinitionSpec proto.InternalMessageInfo func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } func (*CustomResourceDefinitionStatus) ProtoMessage() {} func (*CustomResourceDefinitionStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{10} + return fileDescriptor_c5e101a0235c8c62, []int{10} } func (m *CustomResourceDefinitionStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_CustomResourceDefinitionStatus proto.InternalMessageInfo func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } func (*CustomResourceDefinitionVersion) ProtoMessage() {} func (*CustomResourceDefinitionVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{11} + return fileDescriptor_c5e101a0235c8c62, []int{11} } func (m *CustomResourceDefinitionVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_CustomResourceDefinitionVersion proto.InternalMessageInfo func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } func (*CustomResourceSubresourceScale) ProtoMessage() {} func (*CustomResourceSubresourceScale) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{12} + return fileDescriptor_c5e101a0235c8c62, []int{12} } func (m *CustomResourceSubresourceScale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_CustomResourceSubresourceScale proto.InternalMessageInfo func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } func (*CustomResourceSubresourceStatus) ProtoMessage() {} func (*CustomResourceSubresourceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{13} + return fileDescriptor_c5e101a0235c8c62, []int{13} } func (m *CustomResourceSubresourceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_CustomResourceSubresourceStatus proto.InternalMessageInfo func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } func (*CustomResourceSubresources) ProtoMessage() {} func (*CustomResourceSubresources) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{14} + return fileDescriptor_c5e101a0235c8c62, []int{14} } func (m *CustomResourceSubresources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_CustomResourceSubresources proto.InternalMessageInfo func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } func (*CustomResourceValidation) ProtoMessage() {} func (*CustomResourceValidation) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{15} + return fileDescriptor_c5e101a0235c8c62, []int{15} } func (m *CustomResourceValidation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_CustomResourceValidation proto.InternalMessageInfo func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } func (*ExternalDocumentation) ProtoMessage() {} func (*ExternalDocumentation) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{16} + return fileDescriptor_c5e101a0235c8c62, []int{16} } func (m *ExternalDocumentation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_ExternalDocumentation proto.InternalMessageInfo func (m *JSON) Reset() { *m = JSON{} } func (*JSON) ProtoMessage() {} func (*JSON) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{17} + return fileDescriptor_c5e101a0235c8c62, []int{17} } func (m *JSON) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_JSON proto.InternalMessageInfo func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } func (*JSONSchemaProps) ProtoMessage() {} func (*JSONSchemaProps) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{18} + return fileDescriptor_c5e101a0235c8c62, []int{18} } func (m *JSONSchemaProps) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +583,7 @@ var xxx_messageInfo_JSONSchemaProps proto.InternalMessageInfo func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } func (*JSONSchemaPropsOrArray) ProtoMessage() {} func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{19} + return fileDescriptor_c5e101a0235c8c62, []int{19} } func (m *JSONSchemaPropsOrArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +611,7 @@ var xxx_messageInfo_JSONSchemaPropsOrArray proto.InternalMessageInfo func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } func (*JSONSchemaPropsOrBool) ProtoMessage() {} func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{20} + return fileDescriptor_c5e101a0235c8c62, []int{20} } func (m *JSONSchemaPropsOrBool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +639,7 @@ var xxx_messageInfo_JSONSchemaPropsOrBool proto.InternalMessageInfo func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} func (*JSONSchemaPropsOrStringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{21} + return fileDescriptor_c5e101a0235c8c62, []int{21} } func (m *JSONSchemaPropsOrStringArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -664,10 +664,38 @@ func (m *JSONSchemaPropsOrStringArray) XXX_DiscardUnknown() { var xxx_messageInfo_JSONSchemaPropsOrStringArray proto.InternalMessageInfo +func (m *SelectableField) Reset() { *m = SelectableField{} } +func (*SelectableField) ProtoMessage() {} +func (*SelectableField) Descriptor() ([]byte, []int) { + return fileDescriptor_c5e101a0235c8c62, []int{22} +} +func (m *SelectableField) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SelectableField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SelectableField) XXX_Merge(src proto.Message) { + xxx_messageInfo_SelectableField.Merge(m, src) +} +func (m *SelectableField) XXX_Size() int { + return m.Size() +} +func (m *SelectableField) XXX_DiscardUnknown() { + xxx_messageInfo_SelectableField.DiscardUnknown(m) +} + +var xxx_messageInfo_SelectableField proto.InternalMessageInfo + func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{22} + return fileDescriptor_c5e101a0235c8c62, []int{23} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -695,7 +723,7 @@ var xxx_messageInfo_ServiceReference proto.InternalMessageInfo func (m *ValidationRule) Reset() { *m = ValidationRule{} } func (*ValidationRule) ProtoMessage() {} func (*ValidationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{23} + return fileDescriptor_c5e101a0235c8c62, []int{24} } func (m *ValidationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -723,7 +751,7 @@ var xxx_messageInfo_ValidationRule proto.InternalMessageInfo func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{24} + return fileDescriptor_c5e101a0235c8c62, []int{25} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -751,7 +779,7 @@ var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo func (m *WebhookConversion) Reset() { *m = WebhookConversion{} } func (*WebhookConversion) ProtoMessage() {} func (*WebhookConversion) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{25} + return fileDescriptor_c5e101a0235c8c62, []int{26} } func (m *WebhookConversion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -803,6 +831,7 @@ func init() { proto.RegisterType((*JSONSchemaPropsOrArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray") proto.RegisterType((*JSONSchemaPropsOrBool)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool") proto.RegisterType((*JSONSchemaPropsOrStringArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrStringArray") + proto.RegisterType((*SelectableField)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.SelectableField") proto.RegisterType((*ServiceReference)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ServiceReference") proto.RegisterType((*ValidationRule)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ValidationRule") proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.WebhookClientConfig") @@ -810,208 +839,209 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto", fileDescriptor_f5a35c9667703937) -} - -var fileDescriptor_f5a35c9667703937 = []byte{ - // 3137 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xdf, 0x6f, 0x5c, 0x47, - 0xf5, 0xcf, 0x5d, 0x7b, 0xed, 0xf5, 0xd8, 0x89, 0xed, 0x49, 0xec, 0xef, 0x8d, 0x9b, 0x78, 0x9d, - 0xcd, 0xb7, 0xc1, 0x6d, 0xd3, 0x75, 0x1b, 0x5a, 0x1a, 0xca, 0x2f, 0x79, 0x6d, 0xa7, 0x75, 0x13, - 0xc7, 0xd6, 0x6c, 0x92, 0xba, 0x2d, 0xa2, 0xbd, 0xde, 0x3b, 0xbb, 0xbe, 0xf5, 0xfd, 0x95, 0x99, - 0x7b, 0xfd, 0x43, 0x02, 0xa9, 0x02, 0x55, 0x40, 0x25, 0x28, 0x0f, 0xa8, 0x3c, 0x21, 0x84, 0x50, - 0x1f, 0xe0, 0x01, 0xde, 0xe0, 0x5f, 0xe8, 0x0b, 0x52, 0x25, 0x24, 0x54, 0x09, 0x69, 0x45, 0x97, - 0x7f, 0x00, 0x09, 0x10, 0xc2, 0x0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0xe1, 0xaa, 0xa4, 0x23, 0x25, 0x01, 0xcb, - 0x00, 0xd0, 0xed, 0x80, 0x44, 0x1c, 0x83, 0x57, 0x38, 0x23, 0x95, 0x33, 0x2c, 0x23, 0x54, 0x15, - 0x15, 0x69, 0x12, 0xec, 0x20, 0xd9, 0x71, 0x7c, 0x5b, 0x2e, 0xb8, 0xda, 0xbb, 0x37, 0x1d, 0xdf, - 0x46, 0x9c, 0xc3, 0xf0, 0x5d, 0x87, 0x46, 0x8c, 0x22, 0x57, 0xbb, 0xcd, 0xe1, 0x5c, 0x52, 0x49, - 0x30, 0xfc, 0x1a, 0x4b, 0xb0, 0x01, 0x71, 0x30, 0x35, 0x87, 0x52, 0xfc, 0x25, 0x45, 0x45, 0x9a, - 0x44, 0xe9, 0x2f, 0x83, 0xbd, 0xe3, 0x83, 0x25, 0x10, 0x78, 0x19, 0xe4, 0x1b, 0x24, 0x88, 0x43, - 0xe9, 0x25, 0xe5, 0xed, 0x97, 0x18, 0x11, 0x09, 0x1e, 0xfc, 0x36, 0xc8, 0xfb, 0x72, 0xc2, 0x2c, - 0x82, 0x5e, 0xed, 0xff, 0x32, 0x73, 0x6f, 0xa5, 0xe8, 0xc2, 0x91, 0x02, 0x14, 0x3e, 0x07, 0xf2, - 0xb4, 0x16, 0x84, 0x58, 0x3a, 0x71, 0x36, 0x11, 0xaa, 0x32, 0xe2, 0x61, 0xb3, 0x78, 0x3a, 0x51, - 0xc7, 0x09, 0x48, 0x08, 0xc3, 0xef, 0x1b, 0xa0, 0x20, 0x8f, 0x0b, 0x6a, 0x0e, 0xf3, 0xf0, 0x7c, - 0xad, 0xff, 0x76, 0xcb, 0xb2, 0x37, 0x5d, 0x33, 0x49, 0xa0, 0x48, 0x81, 0xc3, 0xef, 0x1a, 0x00, - 0xd4, 0xd4, 0xd9, 0x65, 0x8e, 0x70, 0x1f, 0xf6, 0x6d, 0xab, 0x68, 0xa7, 0xa2, 0x08, 0x84, 0xb4, - 0x54, 0xd2, 0x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5f, 0xb5, 0x88, 0xef, 0xf8, 0x0d, 0xb3, - 0xc0, 0xcd, 0x9e, 0x66, 0xa7, 0xed, 0x72, 0x07, 0x17, 0x75, 0x19, 0x01, 0x77, 0xc1, 0x90, 0xb8, - 0x46, 0xf3, 0xbc, 0xd1, 0xc7, 0x1d, 0x77, 0xcf, 0x72, 0x1d, 0x9b, 0x43, 0x55, 0x00, 0x77, 0x0f, - 0x47, 0x41, 0x12, 0x0d, 0xbe, 0x67, 0x80, 0x31, 0x1a, 0x6f, 0x11, 0x29, 0x4d, 0x79, 0x56, 0x1f, - 0xbd, 0x76, 0xa7, 0x5f, 0xf0, 0x55, 0x4d, 0x77, 0x65, 0xa2, 0xd5, 0x2c, 0x8e, 0xe9, 0x14, 0xd4, - 0x86, 0x0d, 0x7f, 0x6f, 0x00, 0xd3, 0xb2, 0x45, 0xe8, 0x5b, 0xee, 0x06, 0x71, 0xfc, 0x08, 0x13, - 0x71, 0x21, 0x12, 0xc7, 0x47, 0x1f, 0x6b, 0xc5, 0xec, 0x3d, 0xab, 0x32, 0x27, 0x57, 0xda, 0x5c, - 0xec, 0x61, 0x01, 0xea, 0x69, 0x5b, 0xe9, 0xdf, 0x46, 0x36, 0xb5, 0x68, 0xb3, 0xac, 0xd6, 0x2c, - 0x17, 0xc3, 0x65, 0x30, 0xc1, 0xaa, 0x5f, 0x84, 0x43, 0xd7, 0xa9, 0x59, 0x94, 0xdf, 0x7e, 0x44, - 0x74, 0xab, 0x6b, 0x78, 0x35, 0xc3, 0x47, 0x1d, 0x23, 0xe0, 0x2b, 0x00, 0x8a, 0xb2, 0xb0, 0x4d, - 0x8f, 0xa8, 0x04, 0x54, 0x81, 0x57, 0xed, 0x90, 0x40, 0x5d, 0x46, 0xc1, 0x25, 0x30, 0xe9, 0x5a, - 0x5b, 0xd8, 0xad, 0x62, 0x17, 0xd7, 0xa2, 0x80, 0x70, 0x55, 0xe2, 0x7e, 0x38, 0xd5, 0x6a, 0x16, - 0x27, 0x6f,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x18, 0x60, 0xb2, 0xe3, 0x71, 0x14, 0xfc, 0x9e, 0x01, 0xc6, 0x6a, 0xda, - 0xf4, 0x64, 0x3e, 0x58, 0x3b, 0xfe, 0x03, 0x2c, 0x4d, 0xa9, 0x28, 0xa1, 0x74, 0x0a, 0x6a, 0x03, - 0x85, 0x9b, 0xc0, 0xac, 0x65, 0xde, 0x21, 0x66, 0xbe, 0x6c, 0x5e, 0x68, 0x35, 0x8b, 0xe6, 0x52, - 0x0f, 0x19, 0xd4, 0x73, 0x74, 0xe5, 0x5b, 0x1f, 0x7d, 0x3a, 0x7b, 0xea, 0xe3, 0x4f, 0x67, 0x4f, - 0x7d, 0xf2, 0xe9, 0xec, 0xa9, 0x77, 0x5a, 0xb3, 0xc6, 0x47, 0xad, 0x59, 0xe3, 0xe3, 0xd6, 0xac, - 0xf1, 0x49, 0x6b, 0xd6, 0xf8, 0x6b, 0x6b, 0xd6, 0xf8, 0xc9, 0xdf, 0x66, 0x4f, 0xbd, 0x7e, 0xfd, - 0xa8, 0xaf, 0x8f, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0x28, 0x77, 0xf5, 0x22, 0xd1, 0x2c, 0x00, - 0x00, + proto.RegisterFile("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto", fileDescriptor_c5e101a0235c8c62) +} + +var fileDescriptor_c5e101a0235c8c62 = []byte{ + // 3166 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xdb, 0x6f, 0x1b, 0xc7, + 0xd5, 0xf7, 0x52, 0x37, 0x6a, 0x24, 0x59, 0xd2, 0xd8, 0xd2, 0xb7, 0x56, 0x6c, 0x51, 0xa6, 0xbf, + 0xf8, 0x53, 0x12, 0x87, 0x4a, 0xf4, 0x25, 0x8d, 0x9b, 0x5e, 0x02, 0x51, 0x92, 0x13, 0xc5, 0x92, + 0x25, 0x0c, 0x6d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0x1f, 0x58, 0x63, 0x40, 0x48, 0xe0, 0x15, 0x3f, 0xca, 0x81, 0x4b, 0xdd, 0x86, 0xb0, + 0x3c, 0x4e, 0x99, 0xb3, 0x03, 0x37, 0x22, 0x96, 0x2b, 0x83, 0x4d, 0x39, 0x7b, 0x8b, 0x53, 0x91, + 0xe4, 0xb2, 0xdc, 0x49, 0x1d, 0xaf, 0x1e, 0xb9, 0x16, 0x91, 0x91, 0xa4, 0x26, 0x5c, 0x91, 0x74, + 0xa4, 0x24, 0x60, 0x09, 0x00, 0xba, 0xeb, 0x93, 0x90, 0x63, 0xf0, 0x0a, 0x67, 0xb8, 0x7c, 0x96, + 0x65, 0x84, 0x8a, 0xa2, 0x22, 0x4d, 0x82, 0x1d, 0x24, 0x7b, 0x8e, 0x67, 0xcb, 0x05, 0x57, 0x7b, + 0xf7, 0xa6, 0xe3, 0xd9, 0x88, 0x73, 0x18, 0xbe, 0xeb, 0xd0, 0x90, 0x51, 0xe4, 0x6a, 0xa7, 0x1c, + 0xce, 0x25, 0x95, 0x04, 0xc3, 0xaf, 0xb2, 0x04, 0xeb, 0x13, 0x07, 0x53, 0x73, 0x30, 0xc1, 0x5f, + 0x56, 0x54, 0xa4, 0x49, 0x14, 0xff, 0xdc, 0xdf, 0x3d, 0x3e, 0x58, 0x02, 0x81, 0x57, 0xc0, 0x40, + 0x9d, 0xf8, 0x51, 0x20, 0xbd, 0xa4, 0xbc, 0xfd, 0x32, 0x23, 0x22, 0xc1, 0x83, 0xdf, 0x02, 0x03, + 0x9e, 0x9c, 0x30, 0x8b, 0xa0, 0xd7, 0x7a, 0xbf, 0xcc, 0xdc, 0x5b, 0x09, 0xba, 0x70, 0xa4, 0x00, + 0x85, 0xcf, 0x81, 0x01, 0x5a, 0xf5, 0x03, 0x2c, 0x9d, 0x38, 0x1b, 0x0b, 0x55, 0x18, 0xf1, 0xb8, + 0x59, 0x18, 0x8b, 0xd5, 0x71, 0x02, 0x12, 0xc2, 0xf0, 0x7b, 0x06, 0xc8, 0xcb, 0xe3, 0x82, 0x9a, + 0x43, 0x3c, 0x3c, 0x5f, 0xef, 0xbd, 0xdd, 0xb2, 0xec, 0x4d, 0xd6, 0x4c, 0x12, 0x28, 0x52, 0xe0, + 0xf0, 0x3b, 0x06, 0x00, 0x55, 0x75, 0x76, 0x99, 0xc3, 0xdc, 0x87, 0x3d, 0xdb, 0x2a, 0xda, 0xa9, + 0x28, 0x02, 0x21, 0x29, 0x95, 0x34, 0x54, 0x58, 0x01, 0x53, 0x01, 0xc1, 0x5c, 0xf7, 0x1d, 0x6f, + 0xcf, 0xf3, 0x0f, 0xbc, 0x1b, 0x0e, 0x76, 0x6d, 0x6a, 0x82, 0x39, 0x63, 0x3e, 0x5f, 0xbe, 0x24, + 0xed, 0x9f, 0xda, 0xea, 0x24, 0x84, 0x3a, 0x8f, 0x2d, 0xbe, 0xd7, 0x97, 0xad, 0xb5, 0xb2, 0xe7, + 0x05, 0xfc, 0x40, 0x4c, 0x5e, 0xe4, 0x61, 0x6a, 0x1a, 0x7c, 0x21, 0xde, 0xec, 0xfd, 0x42, 0xa8, + 0x5c, 0x9f, 0x1c, 0xd2, 0x8a, 0x44, 0x91, 0x66, 0x02, 0xfc, 0x89, 0x01, 0xc6, 0xac, 0x6a, 0x15, + 0x07, 0x21, 0xb6, 0xc5, 0x36, 0xce, 0x9d, 0x6e, 0x54, 0x4f, 0x49, 0x83, 0xc6, 0x96, 0x74, 0x54, + 0x94, 0x36, 0x02, 0xbe, 0x08, 0xce, 0xd2, 0xd0, 0x27, 0xd8, 0x8e, 0x23, 0x48, 0x66, 0x17, 0xd8, + 0x6a, 0x16, 0xce, 0x56, 0x52, 0x1c, 0x94, 0x91, 0x2c, 0xb6, 0x06, 0x41, 0xe1, 0x01, 0x11, 0xfa, + 0x10, 0x45, 0xef, 0x55, 0x30, 0xc8, 0x67, 0x6a, 0x73, 0x87, 0xe4, 0xb5, 0xa3, 0x9e, 0x53, 0x91, + 0xe4, 0xb2, 0xe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xa8, 0xfe, + 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x1c, 0x7a, 0x10, 0x8b, 0x2d, 0x00, 0x00, } func (m *ConversionRequest) Marshal() (dAtA []byte, err error) { @@ -1618,6 +1648,20 @@ func (m *CustomResourceDefinitionVersion) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l + if len(m.SelectableFields) > 0 { + for iNdEx := len(m.SelectableFields) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SelectableFields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } if m.DeprecationWarning != nil { i -= len(*m.DeprecationWarning) copy(dAtA[i:], *m.DeprecationWarning) @@ -2570,6 +2614,34 @@ func (m *JSONSchemaPropsOrStringArray) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *SelectableField) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SelectableField) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SelectableField) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.JSONPath) + copy(dAtA[i:], m.JSONPath) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.JSONPath))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *ServiceReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3027,6 +3099,12 @@ func (m *CustomResourceDefinitionVersion) Size() (n int) { l = len(*m.DeprecationWarning) n += 1 + l + sovGenerated(uint64(l)) } + if len(m.SelectableFields) > 0 { + for _, e := range m.SelectableFields { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -3341,6 +3419,17 @@ func (m *JSONSchemaPropsOrStringArray) Size() (n int) { return n } +func (m *SelectableField) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.JSONPath) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *ServiceReference) Size() (n int) { if m == nil { return 0 @@ -3605,6 +3694,11 @@ func (this *CustomResourceDefinitionVersion) String() string { repeatedStringForAdditionalPrinterColumns += strings.Replace(strings.Replace(f.String(), "CustomResourceColumnDefinition", "CustomResourceColumnDefinition", 1), `&`, ``, 1) + "," } repeatedStringForAdditionalPrinterColumns += "}" + repeatedStringForSelectableFields := "[]SelectableField{" + for _, f := range this.SelectableFields { + repeatedStringForSelectableFields += strings.Replace(strings.Replace(f.String(), "SelectableField", "SelectableField", 1), `&`, ``, 1) + "," + } + repeatedStringForSelectableFields += "}" s := strings.Join([]string{`&CustomResourceDefinitionVersion{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Served:` + fmt.Sprintf("%v", this.Served) + `,`, @@ -3614,6 +3708,7 @@ func (this *CustomResourceDefinitionVersion) String() string { `AdditionalPrinterColumns:` + repeatedStringForAdditionalPrinterColumns + `,`, `Deprecated:` + fmt.Sprintf("%v", this.Deprecated) + `,`, `DeprecationWarning:` + valueToStringGenerated(this.DeprecationWarning) + `,`, + `SelectableFields:` + repeatedStringForSelectableFields + `,`, `}`, }, "") return s @@ -3837,6 +3932,16 @@ func (this *JSONSchemaPropsOrStringArray) String() string { }, "") return s } +func (this *SelectableField) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SelectableField{`, + `JSONPath:` + fmt.Sprintf("%v", this.JSONPath) + `,`, + `}`, + }, "") + return s +} func (this *ServiceReference) String() string { if this == nil { return "nil" @@ -6027,6 +6132,40 @@ func (m *CustomResourceDefinitionVersion) Unmarshal(dAtA []byte) error { s := string(dAtA[iNdEx:postIndex]) m.DeprecationWarning = &s iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelectableFields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelectableFields = append(m.SelectableFields, SelectableField{}) + if err := m.SelectableFields[len(m.SelectableFields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -8667,6 +8806,88 @@ func (m *JSONSchemaPropsOrStringArray) Unmarshal(dAtA []byte) error { } return nil } +func (m *SelectableField) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SelectableField: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SelectableField: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JSONPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JSONPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto index 3c39d63a5f2..2ad78822f8b 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto @@ -40,6 +40,7 @@ message ConversionRequest { optional string desiredAPIVersion = 2; // objects is the list of custom resource objects to be converted. + // +listType=atomic repeated k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3; } @@ -53,6 +54,7 @@ message ConversionResponse { // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. + // +listType=atomic repeated k8s.io.apimachinery.pkg.runtime.RawExtension convertedObjects = 2; // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if @@ -182,6 +184,7 @@ message CustomResourceDefinitionNames { // and used by clients to support invocations like `kubectl get `. // It must be all lowercase. // +optional + // +listType=atomic repeated string shortNames = 3; // kind is the serialized kind of the resource. It is normally CamelCase and singular. @@ -196,6 +199,7 @@ message CustomResourceDefinitionNames { // This is published in API discovery documents, and used by clients to support invocations like // `kubectl get all`. // +optional + // +listType=atomic repeated string categories = 6; } @@ -221,6 +225,7 @@ message CustomResourceDefinitionSpec { // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing // major version, then minor version. An example sorted list of versions: // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. + // +listType=atomic repeated CustomResourceDefinitionVersion versions = 7; // conversion defines conversion settings for the CRD. @@ -256,6 +261,7 @@ message CustomResourceDefinitionStatus { // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. // +optional + // +listType=atomic repeated string storedVersions = 3; } @@ -297,7 +303,17 @@ message CustomResourceDefinitionVersion { // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. // If no columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic repeated CustomResourceColumnDefinition additionalPrinterColumns = 6; + + // selectableFields specifies paths to fields that may be used as field selectors. + // A maximum of 8 selectable fields are allowed. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + repeated SelectableField selectableFields = 9; } // CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. @@ -439,20 +455,25 @@ message JSONSchemaProps { optional double multipleOf = 19; + // +listType=atomic repeated JSON enum = 20; optional int64 maxProperties = 21; optional int64 minProperties = 22; + // +listType=atomic repeated string required = 23; optional JSONSchemaPropsOrArray items = 24; + // +listType=atomic repeated JSONSchemaProps allOf = 25; + // +listType=atomic repeated JSONSchemaProps oneOf = 26; + // +listType=atomic repeated JSONSchemaProps anyOf = 27; optional JSONSchemaProps not = 28; @@ -518,6 +539,7 @@ message JSONSchemaProps { // to ensure those properties are present for all list items. // // +optional + // +listType=atomic repeated string xKubernetesListMapKeys = 41; // x-kubernetes-list-type annotates an array to further describe its topology. @@ -564,6 +586,7 @@ message JSONSchemaProps { message JSONSchemaPropsOrArray { optional JSONSchemaProps schema = 1; + // +listType=atomic repeated JSONSchemaProps jSONSchemas = 2; } @@ -579,9 +602,23 @@ message JSONSchemaPropsOrBool { message JSONSchemaPropsOrStringArray { optional JSONSchemaProps schema = 1; + // +listType=atomic repeated string property = 2; } +// SelectableField specifies the JSON path of a field that may be used with field selectors. +message SelectableField { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. + optional string jsonPath = 1; +} + // ServiceReference holds a reference to Service.legacy.k8s.io message ServiceReference { // namespace is the namespace of the service. @@ -787,6 +824,7 @@ message WebhookConversion { // are supported by API server, conversion will fail for the custom resource. // If a persisted Webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail. + // +listType=atomic repeated string conversionReviewVersions = 3; } diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go index 59ec0e372b8..e1d1e0be390 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go @@ -56,6 +56,7 @@ type CustomResourceDefinitionSpec struct { // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing // major version, then minor version. An example sorted list of versions: // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. + // +listType=atomic Versions []CustomResourceDefinitionVersion `json:"versions" protobuf:"bytes,7,rep,name=versions"` // conversion defines conversion settings for the CRD. @@ -96,6 +97,7 @@ type WebhookConversion struct { // are supported by API server, conversion will fail for the custom resource. // If a persisted Webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail. + // +listType=atomic ConversionReviewVersions []string `json:"conversionReviewVersions" protobuf:"bytes,3,rep,name=conversionReviewVersions"` } @@ -195,7 +197,30 @@ type CustomResourceDefinitionVersion struct { // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. // If no columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,6,rep,name=additionalPrinterColumns"` + + // selectableFields specifies paths to fields that may be used as field selectors. + // A maximum of 8 selectable fields are allowed. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,9,rep,name=selectableFields"` +} + +// SelectableField specifies the JSON path of a field that may be used with field selectors. +type SelectableField struct { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. + JSONPath string `json:"jsonPath" protobuf:"bytes,1,opt,name=jsonPath"` } // CustomResourceColumnDefinition specifies a column for server side printing. @@ -237,6 +262,7 @@ type CustomResourceDefinitionNames struct { // and used by clients to support invocations like `kubectl get `. // It must be all lowercase. // +optional + // +listType=atomic ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,3,opt,name=shortNames"` // kind is the serialized kind of the resource. It is normally CamelCase and singular. // Custom resource instances will use this value as the `kind` attribute in API calls. @@ -248,6 +274,7 @@ type CustomResourceDefinitionNames struct { // This is published in API discovery documents, and used by clients to support invocations like // `kubectl get all`. // +optional + // +listType=atomic Categories []string `json:"categories,omitempty" protobuf:"bytes,6,rep,name=categories"` } @@ -345,6 +372,7 @@ type CustomResourceDefinitionStatus struct { // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. // +optional + // +listType=atomic StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` } @@ -463,6 +491,7 @@ type ConversionRequest struct { // desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1" DesiredAPIVersion string `json:"desiredAPIVersion" protobuf:"bytes,2,name=desiredAPIVersion"` // objects is the list of custom resource objects to be converted. + // +listType=atomic Objects []runtime.RawExtension `json:"objects" protobuf:"bytes,3,rep,name=objects"` } @@ -475,6 +504,7 @@ type ConversionResponse struct { // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. + // +listType=atomic ConvertedObjects []runtime.RawExtension `json:"convertedObjects" protobuf:"bytes,2,rep,name=convertedObjects"` // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if // the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go index a81451ad6ef..5dbdf576b3e 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go @@ -76,25 +76,30 @@ type JSONSchemaProps struct { // default is a default value for undefined object fields. // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. // Defaulting requires spec.preserveUnknownFields to be false. - Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` - Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` - ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` - Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` - ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` - MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` - MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` - Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` - MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` - MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` - UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` - MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` - Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` - MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` - MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` - Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` - Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` - AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` - OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` + Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` + Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` + ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` + Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` + ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` + MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` + MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` + Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` + MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` + MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` + UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` + MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` + // +listType=atomic + Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` + MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` + MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` + // +listType=atomic + Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` + Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` + // +listType=atomic + AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` + // +listType=atomic + OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` + // +listType=atomic AnyOf []JSONSchemaProps `json:"anyOf,omitempty" protobuf:"bytes,27,rep,name=anyOf"` Not *JSONSchemaProps `json:"not,omitempty" protobuf:"bytes,28,opt,name=not"` Properties map[string]JSONSchemaProps `json:"properties,omitempty" protobuf:"bytes,29,rep,name=properties"` @@ -150,6 +155,7 @@ type JSONSchemaProps struct { // to ensure those properties are present for all list items. // // +optional + // +listType=atomic XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty" protobuf:"bytes,41,rep,name=xKubernetesListMapKeys"` // x-kubernetes-list-type annotates an array to further describe its topology. @@ -343,7 +349,8 @@ type JSONSchemaURL string // JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps // or an array of JSONSchemaProps. Mainly here for serialization purposes. type JSONSchemaPropsOrArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + // +listType=atomic JSONSchemas []JSONSchemaProps `protobuf:"bytes,2,rep,name=jSONSchemas"` } @@ -385,8 +392,9 @@ type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray // JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. type JSONSchemaPropsOrStringArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` - Property []string `protobuf:"bytes,2,rep,name=property"` + Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + // +listType=atomic + Property []string `protobuf:"bytes,2,rep,name=property"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go index 405021bf389..bb1d7e01429 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go @@ -192,6 +192,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*SelectableField)(nil), (*apiextensions.SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SelectableField_To_apiextensions_SelectableField(a.(*SelectableField), b.(*apiextensions.SelectableField), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.SelectableField)(nil), (*SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_SelectableField_To_v1_SelectableField(a.(*apiextensions.SelectableField), b.(*SelectableField), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ServiceReference)(nil), (*apiextensions.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_ServiceReference_To_apiextensions_ServiceReference(a.(*ServiceReference), b.(*apiextensions.ServiceReference), scope) }); err != nil { @@ -493,6 +503,7 @@ func autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResource out.Versions = nil } // WARNING: in.AdditionalPrinterColumns requires manual conversion: does not exist in peer-type + // WARNING: in.SelectableFields requires manual conversion: does not exist in peer-type if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) @@ -553,6 +564,7 @@ func autoConvert_v1_CustomResourceDefinitionVersion_To_apiextensions_CustomResou } out.Subresources = (*apiextensions.CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) out.AdditionalPrinterColumns = *(*[]apiextensions.CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]apiextensions.SelectableField)(unsafe.Pointer(&in.SelectableFields)) return nil } @@ -578,6 +590,7 @@ func autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1_CustomResou } out.Subresources = (*CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) out.AdditionalPrinterColumns = *(*[]CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]SelectableField)(unsafe.Pointer(&in.SelectableFields)) return nil } @@ -1225,6 +1238,26 @@ func Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1_JSONSchemaPropsOrS return autoConvert_apiextensions_JSONSchemaPropsOrStringArray_To_v1_JSONSchemaPropsOrStringArray(in, out, s) } +func autoConvert_v1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { + out.JSONPath = in.JSONPath + return nil +} + +// Convert_v1_SelectableField_To_apiextensions_SelectableField is an autogenerated conversion function. +func Convert_v1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { + return autoConvert_v1_SelectableField_To_apiextensions_SelectableField(in, out, s) +} + +func autoConvert_apiextensions_SelectableField_To_v1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { + out.JSONPath = in.JSONPath + return nil +} + +// Convert_apiextensions_SelectableField_To_v1_SelectableField is an autogenerated conversion function. +func Convert_apiextensions_SelectableField_To_v1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { + return autoConvert_apiextensions_SelectableField_To_v1_SelectableField(in, out, s) +} + func autoConvert_v1_ServiceReference_To_apiextensions_ServiceReference(in *ServiceReference, out *apiextensions.ServiceReference, s conversion.Scope) error { out.Namespace = in.Namespace out.Name = in.Name diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go index bc23fcd86ff..f85a0b0677d 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go @@ -329,6 +329,11 @@ func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefin *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } + if in.SelectableFields != nil { + in, out := &in.SelectableFields, &out.SelectableFields + *out = make([]SelectableField, len(*in)) + copy(*out, *in) + } return } @@ -585,6 +590,22 @@ func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelectableField) DeepCopyInto(out *SelectableField) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. +func (in *SelectableField) DeepCopy() *SelectableField { + if in == nil { + return nil + } + out := new(SelectableField) + 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 diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go index c81fa6bc31b..32e58324071 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto +// source: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto package v1beta1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } func (*ConversionRequest) ProtoMessage() {} func (*ConversionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{0} + return fileDescriptor_3623d6c0bd238430, []int{0} } func (m *ConversionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_ConversionRequest proto.InternalMessageInfo func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } func (*ConversionResponse) ProtoMessage() {} func (*ConversionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{1} + return fileDescriptor_3623d6c0bd238430, []int{1} } func (m *ConversionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_ConversionResponse proto.InternalMessageInfo func (m *ConversionReview) Reset() { *m = ConversionReview{} } func (*ConversionReview) ProtoMessage() {} func (*ConversionReview) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{2} + return fileDescriptor_3623d6c0bd238430, []int{2} } func (m *ConversionReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_ConversionReview proto.InternalMessageInfo func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } func (*CustomResourceColumnDefinition) ProtoMessage() {} func (*CustomResourceColumnDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{3} + return fileDescriptor_3623d6c0bd238430, []int{3} } func (m *CustomResourceColumnDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_CustomResourceColumnDefinition proto.InternalMessageInfo func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } func (*CustomResourceConversion) ProtoMessage() {} func (*CustomResourceConversion) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{4} + return fileDescriptor_3623d6c0bd238430, []int{4} } func (m *CustomResourceConversion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_CustomResourceConversion proto.InternalMessageInfo func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } func (*CustomResourceDefinition) ProtoMessage() {} func (*CustomResourceDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{5} + return fileDescriptor_3623d6c0bd238430, []int{5} } func (m *CustomResourceDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_CustomResourceDefinition proto.InternalMessageInfo func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } func (*CustomResourceDefinitionCondition) ProtoMessage() {} func (*CustomResourceDefinitionCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{6} + return fileDescriptor_3623d6c0bd238430, []int{6} } func (m *CustomResourceDefinitionCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_CustomResourceDefinitionCondition proto.InternalMessageInfo func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } func (*CustomResourceDefinitionList) ProtoMessage() {} func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{7} + return fileDescriptor_3623d6c0bd238430, []int{7} } func (m *CustomResourceDefinitionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_CustomResourceDefinitionList proto.InternalMessageInfo func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } func (*CustomResourceDefinitionNames) ProtoMessage() {} func (*CustomResourceDefinitionNames) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{8} + return fileDescriptor_3623d6c0bd238430, []int{8} } func (m *CustomResourceDefinitionNames) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_CustomResourceDefinitionNames proto.InternalMessageInfo func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } func (*CustomResourceDefinitionSpec) ProtoMessage() {} func (*CustomResourceDefinitionSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{9} + return fileDescriptor_3623d6c0bd238430, []int{9} } func (m *CustomResourceDefinitionSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_CustomResourceDefinitionSpec proto.InternalMessageInfo func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } func (*CustomResourceDefinitionStatus) ProtoMessage() {} func (*CustomResourceDefinitionStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{10} + return fileDescriptor_3623d6c0bd238430, []int{10} } func (m *CustomResourceDefinitionStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_CustomResourceDefinitionStatus proto.InternalMessageInfo func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } func (*CustomResourceDefinitionVersion) ProtoMessage() {} func (*CustomResourceDefinitionVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{11} + return fileDescriptor_3623d6c0bd238430, []int{11} } func (m *CustomResourceDefinitionVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_CustomResourceDefinitionVersion proto.InternalMessageInfo func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } func (*CustomResourceSubresourceScale) ProtoMessage() {} func (*CustomResourceSubresourceScale) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{12} + return fileDescriptor_3623d6c0bd238430, []int{12} } func (m *CustomResourceSubresourceScale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_CustomResourceSubresourceScale proto.InternalMessageInfo func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } func (*CustomResourceSubresourceStatus) ProtoMessage() {} func (*CustomResourceSubresourceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{13} + return fileDescriptor_3623d6c0bd238430, []int{13} } func (m *CustomResourceSubresourceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_CustomResourceSubresourceStatus proto.InternalMessageInfo func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } func (*CustomResourceSubresources) ProtoMessage() {} func (*CustomResourceSubresources) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{14} + return fileDescriptor_3623d6c0bd238430, []int{14} } func (m *CustomResourceSubresources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_CustomResourceSubresources proto.InternalMessageInfo func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } func (*CustomResourceValidation) ProtoMessage() {} func (*CustomResourceValidation) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{15} + return fileDescriptor_3623d6c0bd238430, []int{15} } func (m *CustomResourceValidation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_CustomResourceValidation proto.InternalMessageInfo func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } func (*ExternalDocumentation) ProtoMessage() {} func (*ExternalDocumentation) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{16} + return fileDescriptor_3623d6c0bd238430, []int{16} } func (m *ExternalDocumentation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_ExternalDocumentation proto.InternalMessageInfo func (m *JSON) Reset() { *m = JSON{} } func (*JSON) ProtoMessage() {} func (*JSON) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{17} + return fileDescriptor_3623d6c0bd238430, []int{17} } func (m *JSON) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_JSON proto.InternalMessageInfo func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } func (*JSONSchemaProps) ProtoMessage() {} func (*JSONSchemaProps) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{18} + return fileDescriptor_3623d6c0bd238430, []int{18} } func (m *JSONSchemaProps) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +583,7 @@ var xxx_messageInfo_JSONSchemaProps proto.InternalMessageInfo func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } func (*JSONSchemaPropsOrArray) ProtoMessage() {} func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{19} + return fileDescriptor_3623d6c0bd238430, []int{19} } func (m *JSONSchemaPropsOrArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +611,7 @@ var xxx_messageInfo_JSONSchemaPropsOrArray proto.InternalMessageInfo func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } func (*JSONSchemaPropsOrBool) ProtoMessage() {} func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{20} + return fileDescriptor_3623d6c0bd238430, []int{20} } func (m *JSONSchemaPropsOrBool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +639,7 @@ var xxx_messageInfo_JSONSchemaPropsOrBool proto.InternalMessageInfo func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} func (*JSONSchemaPropsOrStringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{21} + return fileDescriptor_3623d6c0bd238430, []int{21} } func (m *JSONSchemaPropsOrStringArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -664,10 +664,38 @@ func (m *JSONSchemaPropsOrStringArray) XXX_DiscardUnknown() { var xxx_messageInfo_JSONSchemaPropsOrStringArray proto.InternalMessageInfo +func (m *SelectableField) Reset() { *m = SelectableField{} } +func (*SelectableField) ProtoMessage() {} +func (*SelectableField) Descriptor() ([]byte, []int) { + return fileDescriptor_3623d6c0bd238430, []int{22} +} +func (m *SelectableField) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SelectableField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SelectableField) XXX_Merge(src proto.Message) { + xxx_messageInfo_SelectableField.Merge(m, src) +} +func (m *SelectableField) XXX_Size() int { + return m.Size() +} +func (m *SelectableField) XXX_DiscardUnknown() { + xxx_messageInfo_SelectableField.DiscardUnknown(m) +} + +var xxx_messageInfo_SelectableField proto.InternalMessageInfo + func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{22} + return fileDescriptor_3623d6c0bd238430, []int{23} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -695,7 +723,7 @@ var xxx_messageInfo_ServiceReference proto.InternalMessageInfo func (m *ValidationRule) Reset() { *m = ValidationRule{} } func (*ValidationRule) ProtoMessage() {} func (*ValidationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{23} + return fileDescriptor_3623d6c0bd238430, []int{24} } func (m *ValidationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -723,7 +751,7 @@ var xxx_messageInfo_ValidationRule proto.InternalMessageInfo func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{24} + return fileDescriptor_3623d6c0bd238430, []int{25} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -775,216 +803,219 @@ func init() { proto.RegisterType((*JSONSchemaPropsOrArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray") proto.RegisterType((*JSONSchemaPropsOrBool)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool") proto.RegisterType((*JSONSchemaPropsOrStringArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray") + proto.RegisterType((*SelectableField)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.SelectableField") proto.RegisterType((*ServiceReference)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ServiceReference") proto.RegisterType((*ValidationRule)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ValidationRule") proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.WebhookClientConfig") } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto", fileDescriptor_98a4cc6918394e53) -} - -var fileDescriptor_98a4cc6918394e53 = []byte{ - // 3170 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x73, 0x1c, 0x47, - 0xd9, 0xf7, 0xec, 0x6a, 0xa5, 0x55, 0x4b, 0xb6, 0xa4, 0xb6, 0xa5, 0x8c, 0x15, 0x47, 0x2b, 0xaf, - 0xdf, 0xf8, 0x55, 0x12, 0x67, 0x95, 0xf8, 0x4d, 0xde, 0xe4, 0xcd, 0x4b, 0x8a, 0xd2, 0x4a, 0x72, - 0x50, 0x62, 0x59, 0xa2, 0xd7, 0x76, 0x04, 0xf9, 0x1c, 0xed, 0xf4, 0xae, 0x27, 0x9a, 0x9d, 0x19, - 0x77, 0xcf, 0xac, 0xa4, 0x0a, 0x50, 0x7c, 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, 0x17, 0xb5, 0xab, 0x0e, 0x0d, 0xe1, 0xab, 0x5d, 0x1b, 0xa0, 0x74, 0x6f, - 0x4f, 0xc8, 0xb4, 0x79, 0xfa, 0xab, 0xe2, 0x17, 0x53, 0xb4, 0xe4, 0xff, 0x0a, 0xc8, 0x39, 0x21, - 0x6e, 0xc4, 0x67, 0xf7, 0xcb, 0x43, 0xca, 0xbd, 0xf2, 0x49, 0xe9, 0x43, 0x6e, 0x83, 0xa1, 0x21, - 0x01, 0x5a, 0xfc, 0x65, 0x06, 0x3c, 0xd4, 0x4f, 0x85, 0x1d, 0x28, 0x94, 0x45, 0x3c, 0x70, 0x23, - 0x62, 0xb9, 0x32, 0xe3, 0x54, 0xc4, 0xb7, 0x39, 0x15, 0x49, 0x2e, 0x2b, 0xf9, 0xd4, 0xf1, 0xea, - 0x91, 0x6b, 0x11, 0x99, 0x4e, 0xea, 0xa9, 0x2b, 0x92, 0x8e, 0x94, 0x04, 0x2c, 0x01, 0x40, 0x6f, - 0xf9, 0x24, 0xe4, 0x18, 0xb2, 0x7a, 0x9d, 0x62, 0x05, 0xa2, 0xa2, 0xa8, 0x48, 0x93, 0x60, 0x27, - 0xda, 0x9e, 0xe3, 0xd9, 0x72, 0xd5, 0xd5, 0x2e, 0x7e, 0xc9, 0xf1, 0x6c, 0xc4, 0x39, 0x0c, 0xdf, - 0x75, 0x68, 0xc8, 0x28, 0x72, 0xc9, 0x3b, 0xa2, 0xce, 0x25, 0x95, 0x04, 0xc3, 0xaf, 0xb2, 0xaa, - 0xef, 0x13, 0x07, 0x53, 0x73, 0x34, 0xc1, 0x5f, 0x55, 0x54, 0xa4, 0x49, 0x14, 0xff, 0x91, 0xef, - 0x9f, 0x24, 0xac, 0x94, 0xc0, 0x0b, 0x20, 0x57, 0x27, 0x7e, 0x14, 0xc8, 0x28, 0xa9, 0x68, 0xbf, - 0xc0, 0x88, 0x48, 0xf0, 0x58, 0x56, 0x36, 0x3b, 0xda, 0x54, 0x95, 0x95, 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x1d, 0xe7, 0x8d, 0x17, 0x40, 0x2e, 0x74, 0x42, 0x17, 0xf3, 0x83, - 0x4c, 0xbb, 0x46, 0x5d, 0x67, 0x44, 0x24, 0x78, 0xf0, 0x2d, 0x30, 0x66, 0xe3, 0x9a, 0x15, 0xb9, - 0x21, 0x3f, 0xb3, 0x26, 0x2e, 0xaf, 0x0e, 0x20, 0x85, 0xc4, 0x30, 0x78, 0x4d, 0xd8, 0x45, 0x31, - 0x00, 0x7c, 0x18, 0x8c, 0x35, 0xac, 0x03, 0xa7, 0x11, 0x35, 0x78, 0x83, 0x69, 0x08, 0xb1, 0x4d, - 0x41, 0x42, 0x31, 0x8f, 0x55, 0x46, 0x7c, 0x50, 0x75, 0x23, 0xea, 0x34, 0xb1, 0x64, 0xca, 0xe6, - 0x4f, 0x55, 0xc6, 0xf5, 0x14, 0x1f, 0x75, 0x69, 0x70, 0x30, 0xc7, 0xe3, 0xca, 0x13, 0x1a, 0x98, - 0x20, 0xa1, 0x98, 0xd7, 0x09, 0x26, 0xe5, 0x27, 0xfb, 0x81, 0x49, 0xe5, 0x2e, 0x0d, 0xf8, 0x18, - 0x18, 0x6f, 0x58, 0x07, 0x57, 0xb1, 0x57, 0x0f, 0x6f, 0x99, 0x27, 0x17, 0x8d, 0xa5, 0x6c, 0xf9, - 0x64, 0xbb, 0x55, 0x18, 0xdf, 0x8c, 0x89, 0x28, 0xe1, 0x73, 0x61, 0xc7, 0x93, 0xc2, 0xa7, 0x34, - 0xe1, 0x98, 0x88, 0x12, 0x3e, 0xeb, 0x5e, 0x02, 0x2b, 0x64, 0x9b, 0xcb, 0x9c, 0xea, 0xbc, 0xe6, - 0x6e, 0x0b, 0x32, 0x8a, 0xf9, 0x70, 0x09, 0xe4, 0x1b, 0xd6, 0x01, 0x1f, 0x49, 0x98, 0xd3, 0xdc, - 0x2c, 0x1f, 0x8c, 0x6f, 0x4a, 0x1a, 0x52, 0x5c, 0x2e, 0xe9, 0x78, 0x42, 0x72, 0x46, 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+ proto.RegisterFile("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto", fileDescriptor_3623d6c0bd238430) +} + +var fileDescriptor_3623d6c0bd238430 = []byte{ + // 3214 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0xcf, 0x73, 0x1c, 0x57, + 0xf1, 0xf7, 0xac, 0xb4, 0xd2, 0xaa, 0x25, 0x5b, 0xd2, 0xb3, 0xa5, 0x8c, 0x15, 0x47, 0x2b, 0xaf, + 0xbf, 0xf1, 0x57, 0x49, 0x9c, 0x55, 0xe2, 0x6f, 0xf2, 0x4d, 0x08, 0xa4, 0x52, 0x5a, 0x49, 0x0e, + 0x4a, 0x2c, 0x4b, 0xbc, 0xb5, 0x1d, 0x41, 0x7e, 0x8e, 0x76, 0x9e, 0xd6, 0x63, 0xcf, 0xce, 0x8c, + 0xe7, 0xcd, 0xac, 0xa4, 0x0a, 0x50, 0x40, 0x2a, 0x05, 0x45, 0x01, 0xa1, 0x48, 0x2e, 0x14, 0x70, + 0x08, 0x14, 0x17, 0x0e, 0x70, 0x80, 0x1b, 0xfc, 0x01, 0x39, 0xa6, 0x80, 0x43, 0x0e, 0xd4, 0x16, + 0x59, 0xfe, 0x05, 0x0a, 0xaa, 0x74, 0xa2, 0xde, 0x8f, 0x99, 0x79, 0x33, 0xbb, 0x6b, 0xbb, 0xa2, + 0xdd, 0xb8, 0xb8, 0x69, 0xbb, 0xfb, 0xf5, 0xa7, 0xa7, 0x5f, 0xbf, 0xee, 0x7e, 0x3d, 0x23, 0xd8, + 0xb8, 0xf5, 0x2c, 0x2d, 0x5b, 0xee, 0x92, 0xe1, 0x59, 0x64, 0x3f, 0x20, 0x0e, 0xb5, 0x5c, 0x87, + 0x3e, 0x6e, 0x78, 0x16, 0x25, 0x7e, 0x93, 0xf8, 0x4b, 0xde, 0xad, 0x3a, 0xe3, 0xd1, 0xb4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6, 0xc2, 0x06, 0x71, 0x02, 0x61, 0x68, 0x66, 0x3e, 0xa8, + 0xdd, 0xe3, 0x7c, 0xf0, 0x21, 0x18, 0x0a, 0x7d, 0x5b, 0x46, 0xf1, 0x78, 0x3c, 0xff, 0xc6, 0x97, + 0x31, 0xa3, 0x97, 0xce, 0xc2, 0x30, 0xb3, 0x13, 0x9d, 0x86, 0x21, 0xdf, 0xd8, 0xe3, 0x5a, 0x27, + 0x2a, 0xa3, 0x4c, 0x04, 0x1b, 0x7b, 0x98, 0xd1, 0x4a, 0x7f, 0x3d, 0x0b, 0x93, 0x99, 0x67, 0x41, + 0x73, 0x90, 0x8b, 0x87, 0xea, 0x20, 0x95, 0xe6, 0xd6, 0x57, 0x71, 0xce, 0x32, 0xd1, 0x33, 0x71, + 0x4d, 0x10, 0xa0, 0xc5, 0xb8, 0xc4, 0x71, 0x2a, 0xbb, 0xcd, 0x24, 0xea, 0x98, 0x21, 0x51, 0x3e, + 0x67, 0x36, 0x90, 0x5d, 0x79, 0x4a, 0x84, 0x0d, 0x64, 0x17, 0x33, 0xda, 0x67, 0x1d, 0x8e, 0x46, + 0xd3, 0xd9, 0xfc, 0x3d, 0x4c, 0x67, 0x47, 0xee, 0x38, 0x9d, 0x3d, 0x07, 0xf9, 0xc0, 0x0a, 0x6c, + 0xc2, 0xeb, 0xab, 0x72, 0xe9, 0xbc, 0xca, 0x88, 0x58, 0xf0, 0xd0, 0x4d, 0x18, 0x35, 0xc9, 0xae, + 0x11, 0xda, 0x01, 0x2f, 0xa5, 0xe3, 0x17, 0x57, 0xfa, 0x10, 0x42, 0x62, 0x74, 0xbe, 0x2a, 0xf4, + 0xe2, 0x08, 0x00, 0x3d, 0x0c, 0xa3, 0x0d, 0x63, 0xdf, 0x6a, 0x84, 0x0d, 0xde, 0xf7, 0x6a, 0x42, + 0x6c, 0x43, 0x90, 0x70, 0xc4, 0x63, 0x99, 0x91, 0xec, 0xd7, 0xec, 0x90, 0x5a, 0x4d, 0x22, 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0x30, 0xe9, 0x7a, 0xa2, 0x85, 0xde, 0xb4, 0xcd, 0x2a, 0xb1, 0x77, 0xf9, + 0x28, 0xb2, 0x10, 0xcd, 0x8b, 0x53, 0x2c, 0x9c, 0x95, 0x2d, 0xfd, 0x59, 0x83, 0x6e, 0xdf, 0x35, + 0xa2, 0xd3, 0x62, 0xee, 0xab, 0x0c, 0x53, 0xa3, 0x99, 0x2f, 0x6a, 0xc2, 0x28, 0x15, 0xb1, 0x22, + 0x0f, 0xc3, 0xe6, 0x91, 0xdf, 0xee, 0xa4, 0x23, 0x4f, 0x34, 0x9c, 0x11, 0x35, 0x02, 0x63, 0xe7, + 0xa1, 0x66, 0x54, 0x42, 0xc7, 0x94, 0xaf, 0x02, 0x26, 0xc4, 0x79, 0x58, 0x59, 0x16, 0x34, 0x1c, + 0x73, 0x2b, 0xb5, 0x8f, 0x3e, 0x9d, 0x3f, 0xf6, 0xf1, 0xa7, 0xf3, 0xc7, 0x3e, 0xf9, 0x74, 0xfe, + 0xd8, 0xb7, 0xda, 0xf3, 0xda, 0x47, 0xed, 0x79, 0xed, 0xe3, 0xf6, 0xbc, 0xf6, 0x49, 0x7b, 0x5e, + 0xfb, 0x7b, 0x7b, 0x5e, 0xfb, 0xf1, 0x3f, 0xe6, 0x8f, 0x7d, 0xed, 0xf9, 0x23, 0xfd, 0x2b, 0xc1, + 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xe3, 0x03, 0xa1, 0x8a, 0x30, 0x00, 0x00, } func (m *ConversionRequest) Marshal() (dAtA []byte, err error) { @@ -1467,6 +1498,20 @@ func (m *CustomResourceDefinitionSpec) MarshalToSizedBuffer(dAtA []byte) (int, e _ = i var l int _ = l + if len(m.SelectableFields) > 0 { + for iNdEx := len(m.SelectableFields) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SelectableFields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } if m.PreserveUnknownFields != nil { i-- if *m.PreserveUnknownFields { @@ -1645,6 +1690,20 @@ func (m *CustomResourceDefinitionVersion) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l + if len(m.SelectableFields) > 0 { + for iNdEx := len(m.SelectableFields) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SelectableFields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } if m.DeprecationWarning != nil { i -= len(*m.DeprecationWarning) copy(dAtA[i:], *m.DeprecationWarning) @@ -2597,6 +2656,34 @@ func (m *JSONSchemaPropsOrStringArray) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *SelectableField) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SelectableField) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SelectableField) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.JSONPath) + copy(dAtA[i:], m.JSONPath) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.JSONPath))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *ServiceReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2979,6 +3066,12 @@ func (m *CustomResourceDefinitionSpec) Size() (n int) { if m.PreserveUnknownFields != nil { n += 2 } + if len(m.SelectableFields) > 0 { + for _, e := range m.SelectableFields { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -3034,6 +3127,12 @@ func (m *CustomResourceDefinitionVersion) Size() (n int) { l = len(*m.DeprecationWarning) n += 1 + l + sovGenerated(uint64(l)) } + if len(m.SelectableFields) > 0 { + for _, e := range m.SelectableFields { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -3348,6 +3447,17 @@ func (m *JSONSchemaPropsOrStringArray) Size() (n int) { return n } +func (m *SelectableField) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.JSONPath) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *ServiceReference) Size() (n int) { if m == nil { return 0 @@ -3562,6 +3672,11 @@ func (this *CustomResourceDefinitionSpec) String() string { repeatedStringForAdditionalPrinterColumns += strings.Replace(strings.Replace(f.String(), "CustomResourceColumnDefinition", "CustomResourceColumnDefinition", 1), `&`, ``, 1) + "," } repeatedStringForAdditionalPrinterColumns += "}" + repeatedStringForSelectableFields := "[]SelectableField{" + for _, f := range this.SelectableFields { + repeatedStringForSelectableFields += strings.Replace(strings.Replace(f.String(), "SelectableField", "SelectableField", 1), `&`, ``, 1) + "," + } + repeatedStringForSelectableFields += "}" s := strings.Join([]string{`&CustomResourceDefinitionSpec{`, `Group:` + fmt.Sprintf("%v", this.Group) + `,`, `Version:` + fmt.Sprintf("%v", this.Version) + `,`, @@ -3573,6 +3688,7 @@ func (this *CustomResourceDefinitionSpec) String() string { `AdditionalPrinterColumns:` + repeatedStringForAdditionalPrinterColumns + `,`, `Conversion:` + strings.Replace(this.Conversion.String(), "CustomResourceConversion", "CustomResourceConversion", 1) + `,`, `PreserveUnknownFields:` + valueToStringGenerated(this.PreserveUnknownFields) + `,`, + `SelectableFields:` + repeatedStringForSelectableFields + `,`, `}`, }, "") return s @@ -3603,6 +3719,11 @@ func (this *CustomResourceDefinitionVersion) String() string { repeatedStringForAdditionalPrinterColumns += strings.Replace(strings.Replace(f.String(), "CustomResourceColumnDefinition", "CustomResourceColumnDefinition", 1), `&`, ``, 1) + "," } repeatedStringForAdditionalPrinterColumns += "}" + repeatedStringForSelectableFields := "[]SelectableField{" + for _, f := range this.SelectableFields { + repeatedStringForSelectableFields += strings.Replace(strings.Replace(f.String(), "SelectableField", "SelectableField", 1), `&`, ``, 1) + "," + } + repeatedStringForSelectableFields += "}" s := strings.Join([]string{`&CustomResourceDefinitionVersion{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Served:` + fmt.Sprintf("%v", this.Served) + `,`, @@ -3612,6 +3733,7 @@ func (this *CustomResourceDefinitionVersion) String() string { `AdditionalPrinterColumns:` + repeatedStringForAdditionalPrinterColumns + `,`, `Deprecated:` + fmt.Sprintf("%v", this.Deprecated) + `,`, `DeprecationWarning:` + valueToStringGenerated(this.DeprecationWarning) + `,`, + `SelectableFields:` + repeatedStringForSelectableFields + `,`, `}`, }, "") return s @@ -3835,6 +3957,16 @@ func (this *JSONSchemaPropsOrStringArray) String() string { }, "") return s } +func (this *SelectableField) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SelectableField{`, + `JSONPath:` + fmt.Sprintf("%v", this.JSONPath) + `,`, + `}`, + }, "") + return s +} func (this *ServiceReference) String() string { if this == nil { return "nil" @@ -5755,6 +5887,40 @@ func (m *CustomResourceDefinitionSpec) Unmarshal(dAtA []byte) error { } b := bool(v != 0) m.PreserveUnknownFields = &b + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelectableFields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelectableFields = append(m.SelectableFields, SelectableField{}) + if err := m.SelectableFields[len(m.SelectableFields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -6185,6 +6351,40 @@ func (m *CustomResourceDefinitionVersion) Unmarshal(dAtA []byte) error { s := string(dAtA[iNdEx:postIndex]) m.DeprecationWarning = &s iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelectableFields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelectableFields = append(m.SelectableFields, SelectableField{}) + if err := m.SelectableFields[len(m.SelectableFields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -8825,6 +9025,88 @@ func (m *JSONSchemaPropsOrStringArray) Unmarshal(dAtA []byte) error { } return nil } +func (m *SelectableField) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SelectableField: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SelectableField: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JSONPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JSONPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto index b8477322b70..62d7a33dcd1 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto @@ -40,6 +40,7 @@ message ConversionRequest { optional string desiredAPIVersion = 2; // objects is the list of custom resource objects to be converted. + // +listType=atomic repeated k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3; } @@ -53,6 +54,7 @@ message ConversionResponse { // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. + // +listType=atomic repeated k8s.io.apimachinery.pkg.runtime.RawExtension convertedObjects = 2; // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if @@ -125,6 +127,7 @@ message CustomResourceConversion { // include any versions known to the API Server, calls to the webhook will fail. // Defaults to `["v1beta1"]`. // +optional + // +listType=atomic repeated string conversionReviewVersions = 3; } @@ -194,6 +197,7 @@ message CustomResourceDefinitionNames { // and used by clients to support invocations like `kubectl get `. // It must be all lowercase. // +optional + // +listType=atomic repeated string shortNames = 3; // kind is the serialized kind of the resource. It is normally CamelCase and singular. @@ -208,6 +212,7 @@ message CustomResourceDefinitionNames { // This is published in API discovery documents, and used by clients to support invocations like // `kubectl get all`. // +optional + // +listType=atomic repeated string categories = 6; } @@ -256,6 +261,7 @@ message CustomResourceDefinitionSpec { // major version, then minor version. An example sorted list of versions: // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. // +optional + // +listType=atomic repeated CustomResourceDefinitionVersion versions = 7; // additionalPrinterColumns specifies additional columns returned in Table output. @@ -264,8 +270,17 @@ message CustomResourceDefinitionSpec { // Top-level and per-version columns are mutually exclusive. // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic repeated CustomResourceColumnDefinition additionalPrinterColumns = 8; + // selectableFields specifies paths to fields that may be used as field selectors. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + repeated SelectableField selectableFields = 11; + // conversion defines conversion settings for the CRD. // +optional optional CustomResourceConversion conversion = 9; @@ -302,6 +317,7 @@ message CustomResourceDefinitionStatus { // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. // +optional + // +listType=atomic repeated string storedVersions = 3; } @@ -349,7 +365,16 @@ message CustomResourceDefinitionVersion { // Per-version columns must not all be set to identical values (top-level columns should be used instead). // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic repeated CustomResourceColumnDefinition additionalPrinterColumns = 6; + + // selectableFields specifies paths to fields that may be used as field selectors. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + repeated SelectableField selectableFields = 9; } // CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. @@ -491,20 +516,25 @@ message JSONSchemaProps { optional double multipleOf = 19; + // +listType=atomic repeated JSON enum = 20; optional int64 maxProperties = 21; optional int64 minProperties = 22; + // +listType=atomic repeated string required = 23; optional JSONSchemaPropsOrArray items = 24; + // +listType=atomic repeated JSONSchemaProps allOf = 25; + // +listType=atomic repeated JSONSchemaProps oneOf = 26; + // +listType=atomic repeated JSONSchemaProps anyOf = 27; optional JSONSchemaProps not = 28; @@ -570,6 +600,7 @@ message JSONSchemaProps { // to ensure those properties are present for all list items. // // +optional + // +listType=atomic repeated string xKubernetesListMapKeys = 41; // x-kubernetes-list-type annotates an array to further describe its topology. @@ -616,6 +647,7 @@ message JSONSchemaProps { message JSONSchemaPropsOrArray { optional JSONSchemaProps schema = 1; + // +listType=atomic repeated JSONSchemaProps jSONSchemas = 2; } @@ -631,9 +663,23 @@ message JSONSchemaPropsOrBool { message JSONSchemaPropsOrStringArray { optional JSONSchemaProps schema = 1; + // +listType=atomic repeated string property = 2; } +// SelectableField specifies the JSON path of a field that may be used with field selectors. +message SelectableField { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. + optional string jsonPath = 1; +} + // ServiceReference holds a reference to Service.legacy.k8s.io message ServiceReference { // namespace is the namespace of the service. diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go index db445b10d2b..153f7233775 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go @@ -76,6 +76,7 @@ type CustomResourceDefinitionSpec struct { // major version, then minor version. An example sorted list of versions: // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. // +optional + // +listType=atomic Versions []CustomResourceDefinitionVersion `json:"versions,omitempty" protobuf:"bytes,7,rep,name=versions"` // additionalPrinterColumns specifies additional columns returned in Table output. // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. @@ -83,8 +84,17 @@ type CustomResourceDefinitionSpec struct { // Top-level and per-version columns are mutually exclusive. // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,8,rep,name=additionalPrinterColumns"` + // selectableFields specifies paths to fields that may be used as field selectors. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,11,rep,name=selectableFields"` + // conversion defines conversion settings for the CRD. // +optional Conversion *CustomResourceConversion `json:"conversion,omitempty" protobuf:"bytes,9,opt,name=conversion"` @@ -122,6 +132,7 @@ type CustomResourceConversion struct { // include any versions known to the API Server, calls to the webhook will fail. // Defaults to `["v1beta1"]`. // +optional + // +listType=atomic ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty" protobuf:"bytes,3,rep,name=conversionReviewVersions"` } @@ -227,7 +238,29 @@ type CustomResourceDefinitionVersion struct { // Per-version columns must not all be set to identical values (top-level columns should be used instead). // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,6,rep,name=additionalPrinterColumns"` + + // selectableFields specifies paths to fields that may be used as field selectors. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,9,rep,name=selectableFields"` +} + +// SelectableField specifies the JSON path of a field that may be used with field selectors. +type SelectableField struct { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. + JSONPath string `json:"jsonPath" protobuf:"bytes,1,opt,name=jsonPath"` } // CustomResourceColumnDefinition specifies a column for server side printing. @@ -269,6 +302,7 @@ type CustomResourceDefinitionNames struct { // and used by clients to support invocations like `kubectl get `. // It must be all lowercase. // +optional + // +listType=atomic ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,3,opt,name=shortNames"` // kind is the serialized kind of the resource. It is normally CamelCase and singular. // Custom resource instances will use this value as the `kind` attribute in API calls. @@ -280,6 +314,7 @@ type CustomResourceDefinitionNames struct { // This is published in API discovery documents, and used by clients to support invocations like // `kubectl get all`. // +optional + // +listType=atomic Categories []string `json:"categories,omitempty" protobuf:"bytes,6,rep,name=categories"` } @@ -377,6 +412,7 @@ type CustomResourceDefinitionStatus struct { // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. // +optional + // +listType=atomic StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` } @@ -509,6 +545,7 @@ type ConversionRequest struct { // desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1" DesiredAPIVersion string `json:"desiredAPIVersion" protobuf:"bytes,2,name=desiredAPIVersion"` // objects is the list of custom resource objects to be converted. + // +listType=atomic Objects []runtime.RawExtension `json:"objects" protobuf:"bytes,3,rep,name=objects"` } @@ -521,6 +558,7 @@ type ConversionResponse struct { // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. + // +listType=atomic ConvertedObjects []runtime.RawExtension `json:"convertedObjects" protobuf:"bytes,2,rep,name=convertedObjects"` // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if // the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go index 24c45bb04eb..86013e39f7c 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go @@ -76,25 +76,30 @@ type JSONSchemaProps struct { // default is a default value for undefined object fields. // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. // CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API. - Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` - Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` - ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` - Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` - ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` - MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` - MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` - Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` - MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` - MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` - UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` - MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` - Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` - MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` - MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` - Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` - Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` - AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` - OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` + Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` + Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` + ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` + Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` + ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` + MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` + MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` + Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` + MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` + MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` + UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` + MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` + // +listType=atomic + Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` + MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` + MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` + // +listType=atomic + Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` + Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` + // +listType=atomic + AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` + // +listType=atomic + OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` + // +listType=atomic AnyOf []JSONSchemaProps `json:"anyOf,omitempty" protobuf:"bytes,27,rep,name=anyOf"` Not *JSONSchemaProps `json:"not,omitempty" protobuf:"bytes,28,opt,name=not"` Properties map[string]JSONSchemaProps `json:"properties,omitempty" protobuf:"bytes,29,rep,name=properties"` @@ -150,6 +155,7 @@ type JSONSchemaProps struct { // to ensure those properties are present for all list items. // // +optional + // +listType=atomic XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty" protobuf:"bytes,41,rep,name=xKubernetesListMapKeys"` // x-kubernetes-list-type annotates an array to further describe its topology. @@ -343,7 +349,8 @@ type JSONSchemaURL string // JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps // or an array of JSONSchemaProps. Mainly here for serialization purposes. type JSONSchemaPropsOrArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + // +listType=atomic JSONSchemas []JSONSchemaProps `protobuf:"bytes,2,rep,name=jSONSchemas"` } @@ -385,8 +392,9 @@ type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray // JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. type JSONSchemaPropsOrStringArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` - Property []string `protobuf:"bytes,2,rep,name=property"` + Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + // +listType=atomic + Property []string `protobuf:"bytes,2,rep,name=property"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go index fa6e0ef24e7..d59274e8da6 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go @@ -212,6 +212,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*SelectableField)(nil), (*apiextensions.SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SelectableField_To_apiextensions_SelectableField(a.(*SelectableField), b.(*apiextensions.SelectableField), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.SelectableField)(nil), (*SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_SelectableField_To_v1beta1_SelectableField(a.(*apiextensions.SelectableField), b.(*SelectableField), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ServiceReference)(nil), (*apiextensions.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_ServiceReference_To_apiextensions_ServiceReference(a.(*ServiceReference), b.(*apiextensions.ServiceReference), scope) }); err != nil { @@ -491,6 +501,7 @@ func autoConvert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomRes out.Versions = nil } out.AdditionalPrinterColumns = *(*[]apiextensions.CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]apiextensions.SelectableField)(unsafe.Pointer(&in.SelectableFields)) if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(apiextensions.CustomResourceConversion) @@ -538,6 +549,7 @@ func autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomRes out.Versions = nil } out.AdditionalPrinterColumns = *(*[]CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]SelectableField)(unsafe.Pointer(&in.SelectableFields)) if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) @@ -601,6 +613,7 @@ func autoConvert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_Custom } out.Subresources = (*apiextensions.CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) out.AdditionalPrinterColumns = *(*[]apiextensions.CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]apiextensions.SelectableField)(unsafe.Pointer(&in.SelectableFields)) return nil } @@ -626,6 +639,7 @@ func autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_Custom } out.Subresources = (*CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) out.AdditionalPrinterColumns = *(*[]CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]SelectableField)(unsafe.Pointer(&in.SelectableFields)) return nil } @@ -1273,6 +1287,26 @@ func Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPro return autoConvert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPropsOrStringArray(in, out, s) } +func autoConvert_v1beta1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { + out.JSONPath = in.JSONPath + return nil +} + +// Convert_v1beta1_SelectableField_To_apiextensions_SelectableField is an autogenerated conversion function. +func Convert_v1beta1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { + return autoConvert_v1beta1_SelectableField_To_apiextensions_SelectableField(in, out, s) +} + +func autoConvert_apiextensions_SelectableField_To_v1beta1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { + out.JSONPath = in.JSONPath + return nil +} + +// Convert_apiextensions_SelectableField_To_v1beta1_SelectableField is an autogenerated conversion function. +func Convert_apiextensions_SelectableField_To_v1beta1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { + return autoConvert_apiextensions_SelectableField_To_v1beta1_SelectableField(in, out, s) +} + func autoConvert_v1beta1_ServiceReference_To_apiextensions_ServiceReference(in *ServiceReference, out *apiextensions.ServiceReference, s conversion.Scope) error { out.Namespace = in.Namespace out.Name = in.Name diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go index bb8ab06cb95..18740925c35 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go @@ -279,6 +279,11 @@ func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefiniti *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } + if in.SelectableFields != nil { + in, out := &in.SelectableFields, &out.SelectableFields + *out = make([]SelectableField, len(*in)) + copy(*out, *in) + } if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) @@ -354,6 +359,11 @@ func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefin *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } + if in.SelectableFields != nil { + in, out := &in.SelectableFields, &out.SelectableFields + *out = make([]SelectableField, len(*in)) + copy(*out, *in) + } return } @@ -610,6 +620,22 @@ func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelectableField) DeepCopyInto(out *SelectableField) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. +func (in *SelectableField) DeepCopy() *SelectableField { + if in == nil { + return nil + } + out := new(SelectableField) + 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 diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go index b5e5c35c550..3be35f30858 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go @@ -197,6 +197,11 @@ func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefiniti *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } + if in.SelectableFields != nil { + in, out := &in.SelectableFields, &out.SelectableFields + *out = make([]SelectableField, len(*in)) + copy(*out, *in) + } if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) @@ -272,6 +277,11 @@ func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefin *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } + if in.SelectableFields != nil { + in, out := &in.SelectableFields, &out.SelectableFields + *out = make([]SelectableField, len(*in)) + copy(*out, *in) + } return } @@ -507,6 +517,22 @@ func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelectableField) DeepCopyInto(out *SelectableField) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. +func (in *SelectableField) DeepCopy() *SelectableField { + if in == nil { + return nil + } + out := new(SelectableField) + 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 diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go index 1019b03e9dc..aaf2a139cfa 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go @@ -29,6 +29,7 @@ type CustomResourceDefinitionVersionApplyConfiguration struct { Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` + SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` } // CustomResourceDefinitionVersionApplyConfiguration constructs an declarative configuration of the CustomResourceDefinitionVersion type for use with @@ -105,3 +106,16 @@ func (b *CustomResourceDefinitionVersionApplyConfiguration) WithAdditionalPrinte } return b } + +// WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the SelectableFields field. +func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSelectableFields") + } + b.SelectableFields = append(b.SelectableFields, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go new file mode 100644 index 00000000000..876dfa71c77 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// SelectableFieldApplyConfiguration represents an declarative configuration of the SelectableField type for use +// with apply. +type SelectableFieldApplyConfiguration struct { + JSONPath *string `json:"jsonPath,omitempty"` +} + +// SelectableFieldApplyConfiguration constructs an declarative configuration of the SelectableField type for use with +// apply. +func SelectableField() *SelectableFieldApplyConfiguration { + return &SelectableFieldApplyConfiguration{} +} + +// WithJSONPath sets the JSONPath field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the JSONPath field is set to the value of the last call. +func (b *SelectableFieldApplyConfiguration) WithJSONPath(value string) *SelectableFieldApplyConfiguration { + b.JSONPath = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go index f8c2903757b..49f4e433c74 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go @@ -33,6 +33,7 @@ type CustomResourceDefinitionSpecApplyConfiguration struct { Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` Versions []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"` AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` + SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty"` } @@ -117,6 +118,19 @@ func (b *CustomResourceDefinitionSpecApplyConfiguration) WithAdditionalPrinterCo return b } +// WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the SelectableFields field. +func (b *CustomResourceDefinitionSpecApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSelectableFields") + } + b.SelectableFields = append(b.SelectableFields, *values[i]) + } + return b +} + // WithConversion sets the Conversion field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Conversion field is set to the value of the last call. diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go index 605a9f0a3fc..e110a1ec5bb 100644 --- a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go @@ -29,6 +29,7 @@ type CustomResourceDefinitionVersionApplyConfiguration struct { Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` + SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` } // CustomResourceDefinitionVersionApplyConfiguration constructs an declarative configuration of the CustomResourceDefinitionVersion type for use with @@ -105,3 +106,16 @@ func (b *CustomResourceDefinitionVersionApplyConfiguration) WithAdditionalPrinte } return b } + +// WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the SelectableFields field. +func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSelectableFields") + } + b.SelectableFields = append(b.SelectableFields, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go new file mode 100644 index 00000000000..8729d9586b6 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +// SelectableFieldApplyConfiguration represents an declarative configuration of the SelectableField type for use +// with apply. +type SelectableFieldApplyConfiguration struct { + JSONPath *string `json:"jsonPath,omitempty"` +} + +// SelectableFieldApplyConfiguration constructs an declarative configuration of the SelectableField type for use with +// apply. +func SelectableField() *SelectableFieldApplyConfiguration { + return &SelectableFieldApplyConfiguration{} +} + +// WithJSONPath sets the JSONPath field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the JSONPath field is set to the value of the last call. +func (b *SelectableFieldApplyConfiguration) WithJSONPath(value string) *SelectableFieldApplyConfiguration { + b.JSONPath = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go index 53a25d34490..c3a272168e8 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto +// source: k8s.io/apimachinery/pkg/api/resource/generated.proto package resource @@ -41,7 +41,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Quantity) Reset() { *m = Quantity{} } func (*Quantity) ProtoMessage() {} func (*Quantity) Descriptor() ([]byte, []int) { - return fileDescriptor_612bba87bd70906c, []int{0} + return fileDescriptor_7288c78ff45111e9, []int{0} } func (m *Quantity) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Quantity.Unmarshal(m, b) @@ -64,7 +64,7 @@ var xxx_messageInfo_Quantity proto.InternalMessageInfo func (m *QuantityValue) Reset() { *m = QuantityValue{} } func (*QuantityValue) ProtoMessage() {} func (*QuantityValue) Descriptor() ([]byte, []int) { - return fileDescriptor_612bba87bd70906c, []int{1} + return fileDescriptor_7288c78ff45111e9, []int{1} } func (m *QuantityValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuantityValue.Unmarshal(m, b) @@ -90,25 +90,24 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto", fileDescriptor_612bba87bd70906c) + proto.RegisterFile("k8s.io/apimachinery/pkg/api/resource/generated.proto", fileDescriptor_7288c78ff45111e9) } -var fileDescriptor_612bba87bd70906c = []byte{ - // 254 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0xcd, 0xb6, 0x28, 0xd6, - 0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2d, 0x49, 0x2d, 0xd6, 0x2f, 0x4b, - 0xcd, 0x4b, 0xc9, 0x2f, 0xd2, 0x87, 0x4a, 0x24, 0x16, 0x64, 0xe6, 0x26, 0x26, 0x67, 0x64, 0xe6, - 0xa5, 0x16, 0x55, 0xea, 0x17, 0x64, 0xa7, 0x83, 0x04, 0xf4, 0x8b, 0x52, 0x8b, 0xf3, 0x4b, 0x8b, - 0x92, 0x53, 0xf5, 0xd3, 0x53, 0xf3, 0x52, 0x8b, 0x12, 0x4b, 0x52, 0x53, 0xf4, 0x0a, 0x8a, 0xf2, - 0x4b, 0xf2, 0x85, 0x54, 0x20, 0xba, 0xf4, 0x90, 0x75, 0xe9, 0x15, 0x64, 0xa7, 0x83, 0x04, 0xf4, - 0x60, 0xba, 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, - 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x9a, 0x93, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x18, - 0xaa, 0x64, 0xc1, 0xc5, 0x11, 0x58, 0x9a, 0x98, 0x57, 0x92, 0x59, 0x52, 0x29, 0x24, 0xc6, 0xc5, - 0x56, 0x5c, 0x52, 0x94, 0x99, 0x97, 0x2e, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe5, 0x59, - 0x89, 0xcc, 0x58, 0x20, 0xcf, 0xd0, 0xb1, 0x50, 0x9e, 0x61, 0xc2, 0x42, 0x79, 0x86, 0x05, 0x0b, - 0xe5, 0x19, 0x1a, 0xee, 0x28, 0x30, 0x28, 0xd9, 0x72, 0xf1, 0xc2, 0x74, 0x86, 0x25, 0xe6, 0x94, - 0xa6, 0x92, 0xa6, 0xdd, 0xc9, 0xeb, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, - 0x94, 0x63, 0x68, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x37, - 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x43, 0x94, 0x0a, 0x31, 0x21, - 0x05, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x70, 0x98, 0xa3, 0x69, 0x01, 0x00, 0x00, +var fileDescriptor_7288c78ff45111e9 = []byte{ + // 234 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xc9, 0xb6, 0x28, 0xd6, + 0xcb, 0xcc, 0xd7, 0x4f, 0x2c, 0xc8, 0xcc, 0x4d, 0x4c, 0xce, 0xc8, 0xcc, 0x4b, 0x2d, 0xaa, 0xd4, + 0x2f, 0xc8, 0x4e, 0x07, 0x09, 0xe8, 0x17, 0xa5, 0x16, 0xe7, 0x97, 0x16, 0x25, 0xa7, 0xea, 0xa7, + 0xa7, 0xe6, 0xa5, 0x16, 0x25, 0x96, 0xa4, 0xa6, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xa9, + 0x40, 0x74, 0xe9, 0x21, 0xeb, 0xd2, 0x2b, 0xc8, 0x4e, 0x07, 0x09, 0xe8, 0xc1, 0x74, 0x49, 0xe9, + 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, + 0x83, 0x35, 0x27, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0x31, 0x54, 0xc9, 0x82, 0x8b, + 0x23, 0xb0, 0x34, 0x31, 0xaf, 0x24, 0xb3, 0xa4, 0x52, 0x48, 0x8c, 0x8b, 0xad, 0xb8, 0xa4, 0x28, + 0x33, 0x2f, 0x5d, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xca, 0xb3, 0x12, 0x99, 0xb1, 0x40, + 0x9e, 0xa1, 0x63, 0xa1, 0x3c, 0xc3, 0x84, 0x85, 0xf2, 0x0c, 0x0b, 0x16, 0xca, 0x33, 0x34, 0xdc, + 0x51, 0x60, 0x50, 0xb2, 0xe5, 0xe2, 0x85, 0xe9, 0x0c, 0x4b, 0xcc, 0x29, 0x4d, 0x25, 0x4d, 0xbb, + 0x93, 0xd7, 0x89, 0x87, 0x72, 0x0c, 0x17, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xd0, 0xf0, + 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x6f, 0x3c, 0x92, 0x63, 0x7c, + 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x28, 0x15, 0x62, 0x42, 0x0a, 0x10, 0x00, 0x00, + 0xff, 0xff, 0x50, 0x91, 0xd0, 0x9c, 0x50, 0x01, 0x00, 0x00, } diff --git a/vendor/k8s.io/component-base/config/OWNERS b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS similarity index 84% rename from vendor/k8s.io/component-base/config/OWNERS rename to pkg/k8s/vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS index 7243d3cc82a..40237324761 100644 --- a/vendor/k8s.io/component-base/config/OWNERS +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS @@ -9,5 +9,3 @@ reviewers: - api-reviewers labels: - kind/api-change - - sig/api-machinery - - sig/scheduling diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 1a641e7c122..75b88890f6f 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +// source: k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto package v1 @@ -52,7 +52,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *APIGroup) Reset() { *m = APIGroup{} } func (*APIGroup) ProtoMessage() {} func (*APIGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{0} + return fileDescriptor_a8431b6e0aeeb761, []int{0} } func (m *APIGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +80,7 @@ var xxx_messageInfo_APIGroup proto.InternalMessageInfo func (m *APIGroupList) Reset() { *m = APIGroupList{} } func (*APIGroupList) ProtoMessage() {} func (*APIGroupList) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{1} + return fileDescriptor_a8431b6e0aeeb761, []int{1} } func (m *APIGroupList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,7 +108,7 @@ var xxx_messageInfo_APIGroupList proto.InternalMessageInfo func (m *APIResource) Reset() { *m = APIResource{} } func (*APIResource) ProtoMessage() {} func (*APIResource) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{2} + return fileDescriptor_a8431b6e0aeeb761, []int{2} } func (m *APIResource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -136,7 +136,7 @@ var xxx_messageInfo_APIResource proto.InternalMessageInfo func (m *APIResourceList) Reset() { *m = APIResourceList{} } func (*APIResourceList) ProtoMessage() {} func (*APIResourceList) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{3} + return fileDescriptor_a8431b6e0aeeb761, []int{3} } func (m *APIResourceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +164,7 @@ var xxx_messageInfo_APIResourceList proto.InternalMessageInfo func (m *APIVersions) Reset() { *m = APIVersions{} } func (*APIVersions) ProtoMessage() {} func (*APIVersions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{4} + return fileDescriptor_a8431b6e0aeeb761, []int{4} } func (m *APIVersions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +192,7 @@ var xxx_messageInfo_APIVersions proto.InternalMessageInfo func (m *ApplyOptions) Reset() { *m = ApplyOptions{} } func (*ApplyOptions) ProtoMessage() {} func (*ApplyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{5} + return fileDescriptor_a8431b6e0aeeb761, []int{5} } func (m *ApplyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +220,7 @@ var xxx_messageInfo_ApplyOptions proto.InternalMessageInfo func (m *Condition) Reset() { *m = Condition{} } func (*Condition) ProtoMessage() {} func (*Condition) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{6} + return fileDescriptor_a8431b6e0aeeb761, []int{6} } func (m *Condition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +248,7 @@ var xxx_messageInfo_Condition proto.InternalMessageInfo func (m *CreateOptions) Reset() { *m = CreateOptions{} } func (*CreateOptions) ProtoMessage() {} func (*CreateOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{7} + return fileDescriptor_a8431b6e0aeeb761, []int{7} } func (m *CreateOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +276,7 @@ var xxx_messageInfo_CreateOptions proto.InternalMessageInfo func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } func (*DeleteOptions) ProtoMessage() {} func (*DeleteOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{8} + return fileDescriptor_a8431b6e0aeeb761, []int{8} } func (m *DeleteOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -304,7 +304,7 @@ var xxx_messageInfo_DeleteOptions proto.InternalMessageInfo func (m *Duration) Reset() { *m = Duration{} } func (*Duration) ProtoMessage() {} func (*Duration) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{9} + return fileDescriptor_a8431b6e0aeeb761, []int{9} } func (m *Duration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +332,7 @@ var xxx_messageInfo_Duration proto.InternalMessageInfo func (m *FieldsV1) Reset() { *m = FieldsV1{} } func (*FieldsV1) ProtoMessage() {} func (*FieldsV1) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{10} + return fileDescriptor_a8431b6e0aeeb761, []int{10} } func (m *FieldsV1) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +360,7 @@ var xxx_messageInfo_FieldsV1 proto.InternalMessageInfo func (m *GetOptions) Reset() { *m = GetOptions{} } func (*GetOptions) ProtoMessage() {} func (*GetOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{11} + return fileDescriptor_a8431b6e0aeeb761, []int{11} } func (m *GetOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,7 +388,7 @@ var xxx_messageInfo_GetOptions proto.InternalMessageInfo func (m *GroupKind) Reset() { *m = GroupKind{} } func (*GroupKind) ProtoMessage() {} func (*GroupKind) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{12} + return fileDescriptor_a8431b6e0aeeb761, []int{12} } func (m *GroupKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +416,7 @@ var xxx_messageInfo_GroupKind proto.InternalMessageInfo func (m *GroupResource) Reset() { *m = GroupResource{} } func (*GroupResource) ProtoMessage() {} func (*GroupResource) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{13} + return fileDescriptor_a8431b6e0aeeb761, []int{13} } func (m *GroupResource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,7 +444,7 @@ var xxx_messageInfo_GroupResource proto.InternalMessageInfo func (m *GroupVersion) Reset() { *m = GroupVersion{} } func (*GroupVersion) ProtoMessage() {} func (*GroupVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{14} + return fileDescriptor_a8431b6e0aeeb761, []int{14} } func (m *GroupVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,7 +472,7 @@ var xxx_messageInfo_GroupVersion proto.InternalMessageInfo func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} } func (*GroupVersionForDiscovery) ProtoMessage() {} func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{15} + return fileDescriptor_a8431b6e0aeeb761, []int{15} } func (m *GroupVersionForDiscovery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +500,7 @@ var xxx_messageInfo_GroupVersionForDiscovery proto.InternalMessageInfo func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } func (*GroupVersionKind) ProtoMessage() {} func (*GroupVersionKind) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{16} + return fileDescriptor_a8431b6e0aeeb761, []int{16} } func (m *GroupVersionKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +528,7 @@ var xxx_messageInfo_GroupVersionKind proto.InternalMessageInfo func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } func (*GroupVersionResource) ProtoMessage() {} func (*GroupVersionResource) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{17} + return fileDescriptor_a8431b6e0aeeb761, []int{17} } func (m *GroupVersionResource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +556,7 @@ var xxx_messageInfo_GroupVersionResource proto.InternalMessageInfo func (m *LabelSelector) Reset() { *m = LabelSelector{} } func (*LabelSelector) ProtoMessage() {} func (*LabelSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{18} + return fileDescriptor_a8431b6e0aeeb761, []int{18} } func (m *LabelSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -584,7 +584,7 @@ var xxx_messageInfo_LabelSelector proto.InternalMessageInfo func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } func (*LabelSelectorRequirement) ProtoMessage() {} func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{19} + return fileDescriptor_a8431b6e0aeeb761, []int{19} } func (m *LabelSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -612,7 +612,7 @@ var xxx_messageInfo_LabelSelectorRequirement proto.InternalMessageInfo func (m *List) Reset() { *m = List{} } func (*List) ProtoMessage() {} func (*List) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{20} + return fileDescriptor_a8431b6e0aeeb761, []int{20} } func (m *List) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -640,7 +640,7 @@ var xxx_messageInfo_List proto.InternalMessageInfo func (m *ListMeta) Reset() { *m = ListMeta{} } func (*ListMeta) ProtoMessage() {} func (*ListMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{21} + return fileDescriptor_a8431b6e0aeeb761, []int{21} } func (m *ListMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +668,7 @@ var xxx_messageInfo_ListMeta proto.InternalMessageInfo func (m *ListOptions) Reset() { *m = ListOptions{} } func (*ListOptions) ProtoMessage() {} func (*ListOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{22} + return fileDescriptor_a8431b6e0aeeb761, []int{22} } func (m *ListOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +696,7 @@ var xxx_messageInfo_ListOptions proto.InternalMessageInfo func (m *ManagedFieldsEntry) Reset() { *m = ManagedFieldsEntry{} } func (*ManagedFieldsEntry) ProtoMessage() {} func (*ManagedFieldsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{23} + return fileDescriptor_a8431b6e0aeeb761, []int{23} } func (m *ManagedFieldsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,7 +724,7 @@ var xxx_messageInfo_ManagedFieldsEntry proto.InternalMessageInfo func (m *MicroTime) Reset() { *m = MicroTime{} } func (*MicroTime) ProtoMessage() {} func (*MicroTime) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{24} + return fileDescriptor_a8431b6e0aeeb761, []int{24} } func (m *MicroTime) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MicroTime.Unmarshal(m, b) @@ -747,7 +747,7 @@ var xxx_messageInfo_MicroTime proto.InternalMessageInfo func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } func (*ObjectMeta) ProtoMessage() {} func (*ObjectMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{25} + return fileDescriptor_a8431b6e0aeeb761, []int{25} } func (m *ObjectMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -775,7 +775,7 @@ var xxx_messageInfo_ObjectMeta proto.InternalMessageInfo func (m *OwnerReference) Reset() { *m = OwnerReference{} } func (*OwnerReference) ProtoMessage() {} func (*OwnerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{26} + return fileDescriptor_a8431b6e0aeeb761, []int{26} } func (m *OwnerReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -803,7 +803,7 @@ var xxx_messageInfo_OwnerReference proto.InternalMessageInfo func (m *PartialObjectMetadata) Reset() { *m = PartialObjectMetadata{} } func (*PartialObjectMetadata) ProtoMessage() {} func (*PartialObjectMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{27} + return fileDescriptor_a8431b6e0aeeb761, []int{27} } func (m *PartialObjectMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -831,7 +831,7 @@ var xxx_messageInfo_PartialObjectMetadata proto.InternalMessageInfo func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } func (*PartialObjectMetadataList) ProtoMessage() {} func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{28} + return fileDescriptor_a8431b6e0aeeb761, []int{28} } func (m *PartialObjectMetadataList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -859,7 +859,7 @@ var xxx_messageInfo_PartialObjectMetadataList proto.InternalMessageInfo func (m *Patch) Reset() { *m = Patch{} } func (*Patch) ProtoMessage() {} func (*Patch) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{29} + return fileDescriptor_a8431b6e0aeeb761, []int{29} } func (m *Patch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -887,7 +887,7 @@ var xxx_messageInfo_Patch proto.InternalMessageInfo func (m *PatchOptions) Reset() { *m = PatchOptions{} } func (*PatchOptions) ProtoMessage() {} func (*PatchOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{30} + return fileDescriptor_a8431b6e0aeeb761, []int{30} } func (m *PatchOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -915,7 +915,7 @@ var xxx_messageInfo_PatchOptions proto.InternalMessageInfo func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} func (*Preconditions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{31} + return fileDescriptor_a8431b6e0aeeb761, []int{31} } func (m *Preconditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -943,7 +943,7 @@ var xxx_messageInfo_Preconditions proto.InternalMessageInfo func (m *RootPaths) Reset() { *m = RootPaths{} } func (*RootPaths) ProtoMessage() {} func (*RootPaths) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{32} + return fileDescriptor_a8431b6e0aeeb761, []int{32} } func (m *RootPaths) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -971,7 +971,7 @@ var xxx_messageInfo_RootPaths proto.InternalMessageInfo func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } func (*ServerAddressByClientCIDR) ProtoMessage() {} func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{33} + return fileDescriptor_a8431b6e0aeeb761, []int{33} } func (m *ServerAddressByClientCIDR) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -999,7 +999,7 @@ var xxx_messageInfo_ServerAddressByClientCIDR proto.InternalMessageInfo func (m *Status) Reset() { *m = Status{} } func (*Status) ProtoMessage() {} func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{34} + return fileDescriptor_a8431b6e0aeeb761, []int{34} } func (m *Status) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1027,7 +1027,7 @@ var xxx_messageInfo_Status proto.InternalMessageInfo func (m *StatusCause) Reset() { *m = StatusCause{} } func (*StatusCause) ProtoMessage() {} func (*StatusCause) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{35} + return fileDescriptor_a8431b6e0aeeb761, []int{35} } func (m *StatusCause) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1055,7 +1055,7 @@ var xxx_messageInfo_StatusCause proto.InternalMessageInfo func (m *StatusDetails) Reset() { *m = StatusDetails{} } func (*StatusDetails) ProtoMessage() {} func (*StatusDetails) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{36} + return fileDescriptor_a8431b6e0aeeb761, []int{36} } func (m *StatusDetails) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1083,7 +1083,7 @@ var xxx_messageInfo_StatusDetails proto.InternalMessageInfo func (m *TableOptions) Reset() { *m = TableOptions{} } func (*TableOptions) ProtoMessage() {} func (*TableOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{37} + return fileDescriptor_a8431b6e0aeeb761, []int{37} } func (m *TableOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1111,7 +1111,7 @@ var xxx_messageInfo_TableOptions proto.InternalMessageInfo func (m *Time) Reset() { *m = Time{} } func (*Time) ProtoMessage() {} func (*Time) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{38} + return fileDescriptor_a8431b6e0aeeb761, []int{38} } func (m *Time) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Time.Unmarshal(m, b) @@ -1134,7 +1134,7 @@ var xxx_messageInfo_Time proto.InternalMessageInfo func (m *Timestamp) Reset() { *m = Timestamp{} } func (*Timestamp) ProtoMessage() {} func (*Timestamp) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{39} + return fileDescriptor_a8431b6e0aeeb761, []int{39} } func (m *Timestamp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1162,7 +1162,7 @@ var xxx_messageInfo_Timestamp proto.InternalMessageInfo func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (*TypeMeta) ProtoMessage() {} func (*TypeMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{40} + return fileDescriptor_a8431b6e0aeeb761, []int{40} } func (m *TypeMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1190,7 +1190,7 @@ var xxx_messageInfo_TypeMeta proto.InternalMessageInfo func (m *UpdateOptions) Reset() { *m = UpdateOptions{} } func (*UpdateOptions) ProtoMessage() {} func (*UpdateOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{41} + return fileDescriptor_a8431b6e0aeeb761, []int{41} } func (m *UpdateOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1218,7 +1218,7 @@ var xxx_messageInfo_UpdateOptions proto.InternalMessageInfo func (m *Verbs) Reset() { *m = Verbs{} } func (*Verbs) ProtoMessage() {} func (*Verbs) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{42} + return fileDescriptor_a8431b6e0aeeb761, []int{42} } func (m *Verbs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1246,7 +1246,7 @@ var xxx_messageInfo_Verbs proto.InternalMessageInfo func (m *WatchEvent) Reset() { *m = WatchEvent{} } func (*WatchEvent) ProtoMessage() {} func (*WatchEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{43} + return fileDescriptor_a8431b6e0aeeb761, []int{43} } func (m *WatchEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1322,11 +1322,11 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto", fileDescriptor_cf52fa777ced5367) + proto.RegisterFile("k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto", fileDescriptor_a8431b6e0aeeb761) } -var fileDescriptor_cf52fa777ced5367 = []byte{ - // 2867 bytes of a gzipped FileDescriptorProto +var fileDescriptor_a8431b6e0aeeb761 = []byte{ + // 2853 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x1a, 0x4b, 0x6f, 0x24, 0x47, 0xd9, 0x3d, 0x0f, 0x7b, 0xe6, 0x9b, 0x19, 0x3f, 0x6a, 0xbd, 0x30, 0x6b, 0x84, 0xc7, 0xe9, 0x44, 0xd1, 0x06, 0x92, 0x71, 0x76, 0x09, 0xd1, 0x66, 0x43, 0x02, 0x1e, 0xcf, 0x7a, 0xe3, 0x64, 0x1d, @@ -1334,179 +1334,178 @@ var fileDescriptor_cf52fa777ced5367 = []byte{ 0xbc, 0x19, 0x38, 0x90, 0x03, 0x08, 0x90, 0x50, 0x14, 0x6e, 0x9c, 0x50, 0x22, 0xf8, 0x01, 0x88, 0x13, 0x77, 0x90, 0xc8, 0x31, 0x88, 0x4b, 0x24, 0xd0, 0x28, 0x31, 0x07, 0x8e, 0x88, 0xab, 0x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c, 0xf3, 0x37, 0x06, - 0x54, 0x27, 0x19, 0x82, 0xbe, 0xa8, 0x09, 0x6a, 0x94, 0x94, 0x55, 0xd9, 0x57, 0x48, 0x5f, 0x4a, - 0xbd, 0x01, 0x05, 0xbf, 0xcb, 0x73, 0x0a, 0x9f, 0xaa, 0x53, 0x7f, 0x22, 0x3c, 0xc9, 0x5d, 0x05, - 0x3f, 0x1b, 0xd4, 0x2e, 0x26, 0xc4, 0x87, 0x08, 0x1c, 0xb1, 0xf2, 0x48, 0x2d, 0xec, 0xe1, 0xaf, - 0x47, 0x14, 0xa9, 0xef, 0x0a, 0x08, 0x56, 0x18, 0xf3, 0xf7, 0x06, 0xe4, 0x44, 0x42, 0xfe, 0x3a, - 0x14, 0xf8, 0xfe, 0xd9, 0x56, 0x60, 0x09, 0xbb, 0x52, 0x97, 0x82, 0x9c, 0x7b, 0x87, 0x04, 0x56, - 0xec, 0x6d, 0x21, 0x04, 0x47, 0x12, 0x11, 0x86, 0xbc, 0x13, 0x90, 0x4e, 0x78, 0x90, 0x4f, 0x4d, - 0x14, 0xad, 0x1a, 0x11, 0x75, 0x6c, 0xdd, 0xbb, 0xf1, 0x56, 0x40, 0x3c, 0x7e, 0x18, 0xf1, 0xd5, - 0xd8, 0xe6, 0x32, 0xb0, 0x14, 0x65, 0xfe, 0xcb, 0x80, 0x48, 0x15, 0x77, 0x7e, 0x46, 0xdc, 0xc3, - 0x5b, 0x8e, 0x77, 0xac, 0xb6, 0x35, 0x32, 0x67, 0x5f, 0xc1, 0x71, 0x44, 0x31, 0xee, 0x79, 0xc8, - 0x4c, 0xf7, 0x3c, 0x70, 0x85, 0x2d, 0xdf, 0x0b, 0x1c, 0xaf, 0x37, 0x72, 0xdb, 0x36, 0x15, 0x1c, - 0x47, 0x14, 0x3c, 0x11, 0xa1, 0xa4, 0x63, 0x39, 0x9e, 0xe3, 0xb5, 0xf9, 0x22, 0x36, 0xfd, 0x9e, - 0x17, 0x88, 0x17, 0x59, 0x25, 0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x4e, 0xe0, 0x58, 0xee, 0x8d, 0x13, 0x91, 0x55, 0x96, 0xc4, 0x41, 0x5c, 0xe4, 0x29, 0xe1, + 0xfe, 0x30, 0x12, 0x8f, 0xd2, 0x9b, 0x7f, 0xce, 0x02, 0x92, 0x09, 0xbb, 0x2d, 0x93, 0x32, 0x19, + 0x17, 0x79, 0x59, 0xa1, 0x12, 0x7e, 0x63, 0xa8, 0xac, 0x50, 0xb9, 0x7e, 0x88, 0x47, 0x3b, 0x50, + 0x94, 0xf1, 0x29, 0xbe, 0x73, 0xeb, 0x8a, 0xb8, 0xb8, 0x1b, 0x22, 0xce, 0x06, 0xb5, 0x95, 0x84, + 0x9a, 0x08, 0x23, 0x4a, 0xbe, 0x58, 0x02, 0xba, 0x0a, 0x60, 0x75, 0x1d, 0xbd, 0xe9, 0x57, 0x8c, + 0x5b, 0x3f, 0x71, 0xf9, 0x8e, 0x35, 0x2a, 0xf4, 0x12, 0xe4, 0x82, 0x4f, 0x57, 0x96, 0x15, 0x44, + 0xd5, 0xc9, 0x8b, 0x30, 0x21, 0x81, 0x6b, 0x17, 0x97, 0x82, 0x71, 0xb3, 0x54, 0x45, 0x15, 0x69, + 0xdf, 0x8a, 0x30, 0x58, 0xa3, 0x42, 0xdf, 0x82, 0xc2, 0xa1, 0xca, 0x67, 0xc5, 0xe9, 0xa6, 0x8e, + 0xb3, 0x61, 0x16, 0x2c, 0xfb, 0x0e, 0xe1, 0x17, 0x8e, 0xa4, 0xa1, 0xaf, 0x42, 0x89, 0xf5, 0x0e, + 0xa2, 0x14, 0x40, 0xba, 0x44, 0xf4, 0xde, 0xee, 0xc7, 0x28, 0xac, 0xd3, 0x99, 0x6f, 0x42, 0x71, + 0xc7, 0x69, 0x51, 0x5f, 0x14, 0x92, 0x4f, 0xc0, 0x1c, 0x4b, 0x54, 0x49, 0xd1, 0x49, 0x86, 0xae, + 0x1a, 0xe2, 0xb9, 0x8f, 0x7a, 0x96, 0xe7, 0xcb, 0x5a, 0x28,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x6a, 0x7c, 0x70, 0xba, 0x6a, + 0x7c, 0x78, 0xba, 0x6a, 0x7c, 0x74, 0xba, 0x6a, 0x7c, 0x7c, 0xba, 0x6a, 0xbc, 0xfb, 0xf7, 0xd5, + 0x99, 0xd7, 0x1e, 0x4b, 0xf3, 0x07, 0xbf, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x82, 0xff, + 0xd4, 0x07, 0x28, 0x00, 0x00, } func (m *APIGroup) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index a2cd8015fb5..2b95700f720 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -34,6 +34,7 @@ message APIGroup { optional string name = 1; // versions are the versions supported in this group. + // +listType=atomic repeated GroupVersionForDiscovery versions = 2; // preferredVersion is the version preferred by the API server, which @@ -49,6 +50,7 @@ message APIGroup { // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. // +optional + // +listType=atomic repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 4; } @@ -56,6 +58,7 @@ message APIGroup { // /apis. message APIGroupList { // groups is a list of APIGroup. + // +listType=atomic repeated APIGroup groups = 1; } @@ -88,9 +91,11 @@ message APIResource { optional Verbs verbs = 4; // shortNames is a list of suggested short names of the resource. + // +listType=atomic repeated string shortNames = 5; // categories is a list of the grouped resources this resource belongs to (e.g. 'all') + // +listType=atomic repeated string categories = 7; // The hash value of the storage version, the version this resource is @@ -112,6 +117,7 @@ message APIResourceList { optional string groupVersion = 1; // resources contains the name of the resources and if they are namespaced. + // +listType=atomic repeated APIResource resources = 2; } @@ -122,6 +128,7 @@ message APIResourceList { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message APIVersions { // versions are the api versions that are available. + // +listType=atomic repeated string versions = 1; // a map of client CIDR to server address that is serving this group. @@ -131,6 +138,7 @@ message APIVersions { // The server returns only those CIDRs that it thinks that the client can match. // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + // +listType=atomic repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 2; } @@ -145,6 +153,7 @@ message ApplyOptions { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic repeated string dryRun = 1; // Force is going to "force" Apply requests. It means user will @@ -235,6 +244,7 @@ message CreateOptions { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic repeated string dryRun = 1; // fieldManager is a name associated with the actor or entity @@ -303,6 +313,7 @@ message DeleteOptions { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic repeated string dryRun = 5; } @@ -418,6 +429,7 @@ message LabelSelector { // matchExpressions is a list of label selector requirements. The requirements are ANDed. // +optional + // +listType=atomic repeated LabelSelectorRequirement matchExpressions = 2; } @@ -436,6 +448,7 @@ message LabelSelectorRequirement { // the values array must be empty. This array is replaced during a strategic // merge patch. // +optional + // +listType=atomic repeated string values = 3; } @@ -788,6 +801,8 @@ message ObjectMeta { // +optional // +patchMergeKey=uid // +patchStrategy=merge + // +listType=map + // +listMapKey=uid repeated OwnerReference ownerReferences = 13; // Must be empty before the object is deleted from the registry. Each entry @@ -805,6 +820,7 @@ message ObjectMeta { // are not vulnerable to ordering changes in the list. // +optional // +patchStrategy=merge + // +listType=set repeated string finalizers = 14; // ManagedFields maps workflow-id and version to the set of fields @@ -816,6 +832,7 @@ message ObjectMeta { // workflow used when modifying the object. // // +optional + // +listType=atomic repeated ManagedFieldsEntry managedFields = 17; } @@ -890,6 +907,7 @@ message PatchOptions { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic repeated string dryRun = 1; // Force is going to "force" Apply requests. It means user will @@ -943,6 +961,7 @@ message Preconditions { // For example: "/healthz", "/apis". message RootPaths { // paths are the paths available at root. + // +listType=atomic repeated string paths = 1; } @@ -985,6 +1004,7 @@ message Status { // is not guaranteed to conform to any schema except that defined by // the reason type. // +optional + // +listType=atomic optional StatusDetails details = 5; // Suggested HTTP return code for this status, 0 if not set. @@ -1049,6 +1069,7 @@ message StatusDetails { // The Causes array includes more details associated with the StatusReason // failure. Not all StatusReasons may provide detailed causes. // +optional + // +listType=atomic repeated StatusCause causes = 4; // If specified, the time in seconds before the operation should be retried. Some errors may indicate @@ -1135,6 +1156,7 @@ message UpdateOptions { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic repeated string dryRun = 1; // fieldManager is a name associated with the actor or entity diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 8a8ff701899..9695ba50b4d 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -236,6 +236,8 @@ type ObjectMeta struct { // +optional // +patchMergeKey=uid // +patchStrategy=merge + // +listType=map + // +listMapKey=uid OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` // Must be empty before the object is deleted from the registry. Each entry @@ -253,6 +255,7 @@ type ObjectMeta struct { // are not vulnerable to ordering changes in the list. // +optional // +patchStrategy=merge + // +listType=set Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` // Tombstone: ClusterName was a legacy field that was always cleared by @@ -268,6 +271,7 @@ type ObjectMeta struct { // workflow used when modifying the object. // // +optional + // +listType=atomic ManagedFields []ManagedFieldsEntry `json:"managedFields,omitempty" protobuf:"bytes,17,rep,name=managedFields"` } @@ -428,6 +432,15 @@ type ListOptions struct { SendInitialEvents *bool `json:"sendInitialEvents,omitempty" protobuf:"varint,11,opt,name=sendInitialEvents"` } +const ( + // InitialEventsAnnotationKey the name of the key + // under which an annotation marking the end of + // a watchlist stream is stored. + // + // The annotation is added to a "Bookmark" event. + InitialEventsAnnotationKey = "k8s.io/initial-events-end" +) + // resourceVersionMatch specifies how the resourceVersion parameter is applied. resourceVersionMatch // may only be set if resourceVersion is also set. // @@ -531,6 +544,7 @@ type DeleteOptions struct { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,5,rep,name=dryRun"` } @@ -556,6 +570,7 @@ type CreateOptions struct { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` // +k8s:deprecated=includeUninitialized,protobuf=2 @@ -600,6 +615,7 @@ type PatchOptions struct { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` // Force is going to "force" Apply requests. It means user will @@ -651,6 +667,7 @@ type ApplyOptions struct { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` // Force is going to "force" Apply requests. It means user will @@ -683,6 +700,7 @@ type UpdateOptions struct { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` // fieldManager is a name associated with the actor or entity @@ -751,6 +769,7 @@ type Status struct { // is not guaranteed to conform to any schema except that defined by // the reason type. // +optional + // +listType=atomic Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"` // Suggested HTTP return code for this status, 0 if not set. // +optional @@ -784,6 +803,7 @@ type StatusDetails struct { // The Causes array includes more details associated with the StatusReason // failure. Not all StatusReasons may provide detailed causes. // +optional + // +listType=atomic Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"` // If specified, the time in seconds before the operation should be retried. Some errors may indicate // the client must take an alternate action - for those errors this field may indicate how long to wait @@ -1047,6 +1067,7 @@ type List struct { type APIVersions struct { TypeMeta `json:",inline"` // versions are the api versions that are available. + // +listType=atomic Versions []string `json:"versions" protobuf:"bytes,1,rep,name=versions"` // a map of client CIDR to server address that is serving this group. // This is to help clients reach servers in the most network-efficient way possible. @@ -1055,6 +1076,7 @@ type APIVersions struct { // The server returns only those CIDRs that it thinks that the client can match. // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + // +listType=atomic ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,2,rep,name=serverAddressByClientCIDRs"` } @@ -1065,6 +1087,7 @@ type APIVersions struct { type APIGroupList struct { TypeMeta `json:",inline"` // groups is a list of APIGroup. + // +listType=atomic Groups []APIGroup `json:"groups" protobuf:"bytes,1,rep,name=groups"` } @@ -1077,6 +1100,7 @@ type APIGroup struct { // name is the name of the group. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // versions are the versions supported in this group. + // +listType=atomic Versions []GroupVersionForDiscovery `json:"versions" protobuf:"bytes,2,rep,name=versions"` // preferredVersion is the version preferred by the API server, which // probably is the storage version. @@ -1090,6 +1114,7 @@ type APIGroup struct { // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. // +optional + // +listType=atomic ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs,omitempty" protobuf:"bytes,4,rep,name=serverAddressByClientCIDRs"` } @@ -1134,8 +1159,10 @@ type APIResource struct { // update, patch, delete, deletecollection, and proxy) Verbs Verbs `json:"verbs" protobuf:"bytes,4,opt,name=verbs"` // shortNames is a list of suggested short names of the resource. + // +listType=atomic ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,5,rep,name=shortNames"` // categories is a list of the grouped resources this resource belongs to (e.g. 'all') + // +listType=atomic Categories []string `json:"categories,omitempty" protobuf:"bytes,7,rep,name=categories"` // The hash value of the storage version, the version this resource is // converted to when written to the data store. Value must be treated @@ -1168,6 +1195,7 @@ type APIResourceList struct { // groupVersion is the group and version this APIResourceList is for. GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"` // resources contains the name of the resources and if they are namespaced. + // +listType=atomic APIResources []APIResource `json:"resources" protobuf:"bytes,2,rep,name=resources"` } @@ -1175,6 +1203,7 @@ type APIResourceList struct { // For example: "/healthz", "/apis". type RootPaths struct { // paths are the paths available at root. + // +listType=atomic Paths []string `json:"paths" protobuf:"bytes,1,rep,name=paths"` } @@ -1218,6 +1247,7 @@ type LabelSelector struct { MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` // matchExpressions is a list of label selector requirements. The requirements are ANDed. // +optional + // +listType=atomic MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` } @@ -1234,6 +1264,7 @@ type LabelSelectorRequirement struct { // the values array must be empty. This array is replaced during a strategic // merge patch. // +optional + // +listType=atomic Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` } @@ -1335,8 +1366,10 @@ type Table struct { // columnDefinitions describes each column in the returned items array. The number of cells per row // will always match the number of column definitions. + // +listType=atomic ColumnDefinitions []TableColumnDefinition `json:"columnDefinitions"` // rows is the list of items in the table. + // +listType=atomic Rows []TableRow `json:"rows"` } @@ -1369,12 +1402,14 @@ type TableRow struct { // cells will be as wide as the column definitions array and may contain strings, numbers (float64 or // int64), booleans, simple maps, lists, or null. See the type field of the column definition for a // more detailed description. + // +listType=atomic Cells []interface{} `json:"cells"` // conditions describe additional status of a row that are relevant for a human user. These conditions // apply to the row, not to the object, and will be specific to table output. The only defined // condition type is 'Completed', for a row that indicates a resource that has run to completion and // can be given less visual priority. // +optional + // +listType=atomic 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 diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go index a2abc67c151..819d936fe5b 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto +// source: k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } func (*PartialObjectMetadataList) ProtoMessage() {} func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) { - return fileDescriptor_90ec10f86b91f9a8, []int{0} + return fileDescriptor_39237a8d8061b52f, []int{0} } func (m *PartialObjectMetadataList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,31 +77,30 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto", fileDescriptor_90ec10f86b91f9a8) + proto.RegisterFile("k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto", fileDescriptor_39237a8d8061b52f) } -var fileDescriptor_90ec10f86b91f9a8 = []byte{ - // 317 bytes of a gzipped FileDescriptorProto +var fileDescriptor_39237a8d8061b52f = []byte{ + // 303 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x4b, 0xf3, 0x30, 0x1c, 0xc6, 0x9b, 0xf7, 0x65, 0x30, 0x3a, 0x04, 0xd9, 0x69, 0xee, 0x90, 0x0d, 0x4f, 0xdb, 0xc1, - 0x84, 0x0d, 0x11, 0xc1, 0xdb, 0x6e, 0x82, 0x32, 0xd9, 0x51, 0x3c, 0x98, 0x76, 0x7f, 0xbb, 0x58, - 0xd3, 0x94, 0xe4, 0xdf, 0x81, 0x37, 0x3f, 0x82, 0x1f, 0x6b, 0xc7, 0x1d, 0x07, 0xc2, 0x70, 0xf5, - 0x8b, 0x48, 0xda, 0x2a, 0x32, 0x14, 0x7a, 0xeb, 0xf3, 0x94, 0xdf, 0x2f, 0x4f, 0x20, 0xfe, 0x2c, - 0x3e, 0xb7, 0x4c, 0x6a, 0x1e, 0x67, 0x01, 0x98, 0x04, 0x10, 0x2c, 0x5f, 0x42, 0x32, 0xd7, 0x86, - 0x57, 0x3f, 0x44, 0x2a, 0x95, 0x08, 0x17, 0x32, 0x01, 0xf3, 0xcc, 0xd3, 0x38, 0x72, 0x85, 0xe5, - 0x0a, 0x50, 0xf0, 0xe5, 0x28, 0x00, 0x14, 0x23, 0x1e, 0x41, 0x02, 0x46, 0x20, 0xcc, 0x59, 0x6a, - 0x34, 0xea, 0xf6, 0xb0, 0x44, 0xd9, 0x4f, 0x94, 0xa5, 0x71, 0xe4, 0x0a, 0xcb, 0x1c, 0xca, 0x2a, - 0xb4, 0x7b, 0x12, 0x49, 0x5c, 0x64, 0x01, 0x0b, 0xb5, 0xe2, 0x91, 0x8e, 0x34, 0x2f, 0x0c, 0x41, - 0xf6, 0x50, 0xa4, 0x22, 0x14, 0x5f, 0xa5, 0xb9, 0x7b, 0x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7d, 0x4f, 0xeb, 0xc2, 0x19, 0x17, 0x95, + 0x78, 0x36, 0xcf, 0x0b, 0xec, 0xad, 0x0b, 0xec, 0x6d, 0x0a, 0xec, 0xbd, 0x58, 0x8c, 0x72, 0x8b, + 0xd1, 0xda, 0x62, 0xb4, 0xb1, 0x18, 0xbd, 0x5b, 0x8c, 0x5e, 0x3f, 0xb0, 0x77, 0x33, 0x6e, 0xfc, + 0x0d, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x0f, 0xd7, 0x36, 0x32, 0x02, 0x00, 0x00, } func (m *PartialObjectMetadataList) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go index ec677a7d962..2e40e140aec 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto +// source: k8s.io/apimachinery/pkg/runtime/generated.proto package runtime @@ -45,7 +45,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *RawExtension) Reset() { *m = RawExtension{} } func (*RawExtension) ProtoMessage() {} func (*RawExtension) Descriptor() ([]byte, []int) { - return fileDescriptor_9d3c45d7f546725c, []int{0} + return fileDescriptor_2e0e4b920403a48c, []int{0} } func (m *RawExtension) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -73,7 +73,7 @@ var xxx_messageInfo_RawExtension proto.InternalMessageInfo func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (*TypeMeta) ProtoMessage() {} func (*TypeMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_9d3c45d7f546725c, []int{1} + return fileDescriptor_2e0e4b920403a48c, []int{1} } func (m *TypeMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -101,7 +101,7 @@ var xxx_messageInfo_TypeMeta proto.InternalMessageInfo func (m *Unknown) Reset() { *m = Unknown{} } func (*Unknown) ProtoMessage() {} func (*Unknown) Descriptor() ([]byte, []int) { - return fileDescriptor_9d3c45d7f546725c, []int{2} + return fileDescriptor_2e0e4b920403a48c, []int{2} } func (m *Unknown) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,35 +133,34 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto", fileDescriptor_9d3c45d7f546725c) -} - -var fileDescriptor_9d3c45d7f546725c = []byte{ - // 380 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0xaa, 0x13, 0x31, - 0x14, 0xc6, 0x27, 0xb7, 0x85, 0x7b, 0x4d, 0x0b, 0x57, 0xe2, 0xc2, 0xd1, 0x45, 0xe6, 0xd2, 0x95, - 0x77, 0x61, 0x02, 0x17, 0x04, 0xb7, 0x9d, 0x52, 0x50, 0x44, 0x90, 0xe0, 0x1f, 0x70, 0x65, 0x3a, - 0x13, 0xa7, 0x61, 0xe8, 0xc9, 0x90, 0x66, 0x1c, 0xbb, 0xf3, 0x11, 0x7c, 0xac, 0x2e, 0xbb, 0xec, - 0xaa, 0xd8, 0xf1, 0x21, 0xdc, 0x4a, 0xd3, 0xb4, 0x56, 0x5d, 0x74, 0x97, 0x73, 0xbe, 0xef, 0xf7, - 0x9d, 0x73, 0x20, 0xf8, 0x45, 0xf9, 0x7c, 0xce, 0xb4, 0xe1, 0x65, 0x3d, 0x51, 0x16, 0x94, 0x53, - 0x73, 0xfe, 0x45, 0x41, 0x6e, 0x2c, 0x0f, 0x82, 0xac, 0xf4, 0x4c, 0x66, 0x53, 0x0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 0x67, 0x06, 0x9c, 0x02, 0x37, 0x86, 0xcc, 0xe4, 0x1a, 0x8a, 0xb8, 0xe3, 0x97, - 0x7d, 0x18, 0xf2, 0xae, 0x47, 0x7f, 0xcb, 0xe2, 0x5f, 0x3f, 0x79, 0x86, 0x7b, 0xa1, 0xb5, 0x1b, - 0x1d, 0x77, 0x3d, 0xfe, 0x20, 0xe0, 0xbd, 0xd1, 0x1f, 0x49, 0x9c, 0xfa, 0xd2, 0xf1, 0x72, 0x4b, - 0xa3, 0xd5, 0x96, 0x46, 0xeb, 0x2d, 0x8d, 0xbe, 0xb5, 0x14, 0x2d, 0x5b, 0x8a, 0x56, 0x2d, 0x45, - 0xeb, 0x96, 0xa2, 0x1f, 0x2d, 0x45, 0xdf, 0x7f, 0xd2, 0xe8, 0x63, 0x72, 0xe6, 0xb7, 0xfc, 0x0e, - 0x00, 0x00, 0xff, 0xff, 0x1f, 0x32, 0xd5, 0x68, 0x68, 0x02, 0x00, 0x00, + proto.RegisterFile("k8s.io/apimachinery/pkg/runtime/generated.proto", fileDescriptor_2e0e4b920403a48c) +} + +var fileDescriptor_2e0e4b920403a48c = []byte{ + // 365 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0x6b, 0x22, 0x31, + 0x18, 0xc6, 0x27, 0x2a, 0xe8, 0x46, 0xc1, 0x25, 0x7b, 0xd8, 0xd9, 0x3d, 0x64, 0xc4, 0xd3, 0x7a, + 0xd8, 0x0c, 0x08, 0x85, 0x5e, 0x1d, 0xf1, 0x50, 0x4a, 0xa1, 0x84, 0xfe, 0x81, 0x9e, 0x1a, 0x67, + 0xd2, 0x31, 0x0c, 0x26, 0xc3, 0x18, 0x99, 0x7a, 0xeb, 0x47, 0xe8, 0xc7, 0xf2, 0xe8, 0xd1, 0x93, + 0xd4, 0xe9, 0x87, 0xe8, 0xb5, 0x18, 0xa3, 0xb5, 0x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x8e, + 0xdc, 0x4e, 0x76, 0xeb, 0x05, 0x3f, 0x6d, 0xf8, 0x7e, 0x61, 0xba, 0x0f, 0xdb, 0x5d, 0x58, 0xfa, + 0x7e, 0x21, 0xea, 0xc1, 0x66, 0xa8, 0xa4, 0xe6, 0x52, 0x0f, 0x64, 0xa8, 0x22, 0x21, 0x63, 0xb7, + 0x6c, 0x96, 0xfd, 0x6d, 0xf3, 0x9a, 0xfd, 0xcf, 0x32, 0xfd, 0xea, 0x47, 0x27, 0xb0, 0x6e, 0x5b, + 0x9b, 0xd1, 0x6e, 0xc5, 0xe0, 0xbf, 0x2c, 0x5e, 0xef, 0x7f, 0x48, 0xf4, 0xd0, 0x17, 0x0c, 0xe6, + 0x6b, 0xec, 0x2c, 0xd6, 0xd8, 0x59, 0xae, 0xb1, 0xf3, 0x54, 0x60, 0x30, 0x2f, 0x30, 0x58, 0x14, + 0x18, 0x2c, 0x0b, 0x0c, 0x5e, 0x0a, 0x0c, 0x9e, 0x5f, 0xb1, 0x73, 0xe7, 0x1d, 0xf9, 0x2d, 0xef, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x9b, 0x09, 0xb3, 0x4f, 0x02, 0x00, 0x00, } func (m *RawExtension) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/helper.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/helper.go index f46a24cc6c3..cc0a77bba6f 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/helper.go +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/helper.go @@ -236,10 +236,14 @@ func (e WithVersionEncoder) Encode(obj Object, stream io.Writer) error { gvk = preferredGVK } } - kind.SetGroupVersionKind(gvk) - err = e.Encoder.Encode(obj, stream) - kind.SetGroupVersionKind(oldGVK) - return err + + // The gvk only needs to be set if not already as desired. + if gvk != oldGVK { + kind.SetGroupVersionKind(gvk) + defer kind.SetGroupVersionKind(oldGVK) + } + + return e.Encoder.Encode(obj, stream) } // WithoutVersionDecoder clears the group version kind of a deserialized object. diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go index 46b1e787bde..7a26d2798ed 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto +// source: k8s.io/apimachinery/pkg/runtime/schema/generated.proto package schema @@ -39,21 +39,20 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto", fileDescriptor_0462724132518e0d) + proto.RegisterFile("k8s.io/apimachinery/pkg/runtime/schema/generated.proto", fileDescriptor_25f8f0eed21c6089) } -var fileDescriptor_0462724132518e0d = []byte{ - // 186 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xce, 0xad, 0x8e, 0xc3, 0x30, - 0x0c, 0xc0, 0xf1, 0x84, 0x1e, 0x3c, 0x78, 0xc0, 0xb0, 0xec, 0x62, 0x7a, 0xf8, 0xf0, 0xa4, 0xf1, - 0xb1, 0xb4, 0xf5, 0xd2, 0x28, 0xca, 0x87, 0xd2, 0x64, 0xd2, 0xd8, 0x1e, 0x61, 0x8f, 0x55, 0x58, - 0x58, 0xb8, 0x66, 0x2f, 0x32, 0x29, 0x2d, 0x18, 0x1c, 0xf3, 0x5f, 0xd6, 0xcf, 0xf2, 0xd7, 0xd1, - 0xfc, 0x8d, 0x42, 0x7b, 0x34, 0xb9, 0xa5, 0xe8, 0x28, 0xd1, 0x88, 0x17, 0x72, 0xbd, 0x8f, 0xb8, - 0x2f, 0x64, 0xd0, 0x56, 0x76, 0x83, 0x76, 0x14, 0xaf, 0x18, 0x8c, 0xc2, 0x98, 0x5d, 0xd2, 0x96, - 0x70, 0xec, 0x06, 0xb2, 0x12, 0x15, 0x39, 0x8a, 0x32, 0x51, 0x2f, 0x42, 0xf4, 0xc9, 0x7f, 0x37, - 0x9b, 0x13, 0xef, 0x4e, 0x04, 0xa3, 0xc4, 0xee, 0xc4, 0xe6, 0x7e, 0x7e, 0x95, 0x4e, 0x43, 0x6e, - 0x45, 0xe7, 0x2d, 0x2a, 0xaf, 0x3c, 0x56, 0xde, 0xe6, 0x73, 0xad, 0x1a, 0x75, 0xda, 0xce, 0xfe, - 0x1f, 0xa6, 0x15, 0xd8, 0xbc, 0x02, 0x5b, 0x56, 0x60, 0xb7, 0x02, 0x7c, 0x2a, 0xc0, 0xe7, 0x02, - 0x7c, 0x29, 0xc0, 0x1f, 0x05, 0xf8, 0xfd, 0x09, 0xec, 0xd4, 0x7c, 0xf6, 0xf4, 0x2b, 0x00, 0x00, - 0xff, 0xff, 0x12, 0xb4, 0xae, 0x48, 0xf6, 0x00, 0x00, 0x00, +var fileDescriptor_25f8f0eed21c6089 = []byte{ + // 170 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xce, 0xa1, 0x0e, 0xc2, 0x30, + 0x10, 0xc6, 0xf1, 0xd6, 0x22, 0x91, 0x88, 0x93, 0x73, 0xdc, 0x39, 0x82, 0x46, 0xf3, 0x04, 0xb8, + 0x6e, 0x94, 0xae, 0x59, 0xba, 0x6b, 0xba, 0x4e, 0xe0, 0x78, 0x04, 0x1e, 0x6b, 0x72, 0x72, 0x92, + 0x95, 0x17, 0x21, 0x69, 0x11, 0x48, 0xdc, 0xfd, 0xc5, 0xef, 0xf2, 0x6d, 0x0e, 0xdd, 0x71, 0x40, + 0xcb, 0xa4, 0xbc, 0x75, 0xaa, 0x69, 0x6d, 0xaf, 0xc3, 0x9d, 0x7c, 0x67, 0x28, 0x8c, 0x7d, 0xb4, + 0x4e, 0xd3, 0xd0, 0xb4, 0xda, 0x29, 0x32, 0xba, 0xd7, 0x41, 0x45, 0x7d, 0x45, 0x1f, 0x38, 0xf2, + 0xb6, 0x2a, 0x0e, 0x7f, 0x1d, 0xfa, 0xce, 0xe0, 0xd7, 0x61, 0x71, 0xbb, 0xbd, 0xb1, 0xb1, 0x1d, + 0x6b, 0x6c, 0xd8, 0x91, 0x61, 0xc3, 0x94, 0x79, 0x3d, 0xde, 0x72, 0xe5, 0xc8, 0x57, 0x79, 0x7b, + 0x3a, 0x4f, 0x2b, 0x88, 0x79, 0x05, 0xb1, 0xac, 0x20, 0x1e, 0x09, 0xe4, 0x94, 0x40, 0xce, 0x09, + 0xe4, 0x92, 0x40, 0xbe, 0x12, 0xc8, 0xe7, 0x1b, 0xc4, 0xa5, 0xfa, 0x6f, 0xf4, 0x27, 0x00, 0x00, + 0xff, 0xff, 0x97, 0xb8, 0x4d, 0x1f, 0xdd, 0x00, 0x00, 0x00, } diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go index 8f9ced93fb6..1f2877399fc 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto +// source: k8s.io/apimachinery/pkg/util/intstr/generated.proto package intstr @@ -43,7 +43,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *IntOrString) Reset() { *m = IntOrString{} } func (*IntOrString) ProtoMessage() {} func (*IntOrString) Descriptor() ([]byte, []int) { - return fileDescriptor_94e046ae3ce6121c, []int{0} + return fileDescriptor_771bacc35a5ec189, []int{0} } func (m *IntOrString) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -73,30 +73,29 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto", fileDescriptor_94e046ae3ce6121c) + proto.RegisterFile("k8s.io/apimachinery/pkg/util/intstr/generated.proto", fileDescriptor_771bacc35a5ec189) } -var fileDescriptor_94e046ae3ce6121c = []byte{ - // 292 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xb1, 0x4a, 0x03, 0x31, - 0x1c, 0xc6, 0x13, 0x5b, 0x8b, 0x9e, 0xe0, 0x50, 0x1c, 0x8a, 0x43, 0x7a, 0x58, 0x90, 0x5b, 0x4c, - 0x56, 0x71, 0xec, 0x56, 0x10, 0x84, 0x56, 0x1c, 0xdc, 0xee, 0xda, 0x98, 0x86, 0x6b, 0x93, 0x90, - 0xfb, 0x9f, 0x70, 0x5b, 0x1f, 0x41, 0x37, 0x47, 0x1f, 0xe7, 0xc6, 0x8e, 0x1d, 0xa4, 0x78, 0xf1, - 0x2d, 0x9c, 0xe4, 0x72, 0x07, 0x3a, 0x3a, 0x25, 0xdf, 0xf7, 0xfd, 0x7e, 0x19, 0x12, 0xdc, 0xa6, - 0xd7, 0x19, 0x95, 0x9a, 0xa5, 0x79, 0xc2, 0xad, 0xe2, 0xc0, 0x33, 0xf6, 0xcc, 0xd5, 0x42, 0x5b, - 0xd6, 0x0e, 0xb1, 0x91, 0xeb, 0x78, 0xbe, 0x94, 0x8a, 0xdb, 0x82, 0x99, 0x54, 0xb0, 0x1c, 0xe4, - 0x8a, 0x49, 0x05, 0x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te{ + // 277 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xce, 0xb6, 0x28, 0xd6, + 0xcb, 0xcc, 0xd7, 0x4f, 0x2c, 0xc8, 0xcc, 0x4d, 0x4c, 0xce, 0xc8, 0xcc, 0x4b, 0x2d, 0xaa, 0xd4, + 0x2f, 0xc8, 0x4e, 0xd7, 0x2f, 0x2d, 0xc9, 0xcc, 0xd1, 0xcf, 0xcc, 0x2b, 0x29, 0x2e, 0x29, 0xd2, + 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, + 0x52, 0x86, 0x68, 0xd2, 0x43, 0xd6, 0xa4, 0x57, 0x90, 0x9d, 0xae, 0x07, 0xd2, 0xa4, 0x07, 0xd1, + 0x24, 0xa5, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, + 0x9e, 0xaf, 0x0f, 0xd6, 0x9b, 0x54, 0x9a, 0x06, 0xe6, 0x81, 0x39, 0x60, 0x16, 0xc4, 0x4c, 0xa5, + 0x89, 0x8c, 0x5c, 0xdc, 0x9e, 0x79, 0x25, 0xfe, 0x45, 0xc1, 0x25, 0x45, 0x99, 0x79, 0xe9, 0x42, + 0x1a, 0x5c, 0x2c, 0x25, 0x95, 0x05, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x4e, 0x22, 0x27, + 0xee, 0xc9, 0x33, 0x3c, 0xba, 0x27, 0xcf, 0x12, 0x52, 0x59, 0x90, 0xfa, 0x0b, 0x4a, 0x07, 0x81, + 0x55, 0x08, 0xa9, 0x71, 0xb1, 0x65, 0xe6, 0x95, 0x84, 0x25, 0xe6, 0x48, 0x30, 0x29, 0x30, 0x6a, + 0xb0, 0x3a, 0xf1, 0x41, 0xd5, 0xb2, 0x79, 0x82, 0x45, 0x83, 0xa0, 0xb2, 0x20, 0x75, 0xc5, 0x25, + 0x45, 0x20, 0x75, 0xcc, 0x0a, 0x8c, 0x1a, 0x9c, 0x08, 0x75, 0xc1, 0x60, 0xd1, 0x20, 0xa8, 0xac, + 0x15, 0xc7, 0x8c, 0x05, 0xf2, 0x0c, 0x0d, 0x77, 0x14, 0x18, 0x9c, 0x3c, 0x4f, 0x3c, 0x94, 0x63, + 0xb8, 0xf0, 0x50, 0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, + 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, + 0xcb, 0x31, 0x44, 0x29, 0x13, 0x11, 0x84, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0xa1, 0x0b, + 0x1e, 0x68, 0x01, 0x00, 0x00, } func (m *IntOrString) Marshal() (dAtA []byte, err error) { diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml index 66e849f23fb..a7f2d54fdf7 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml @@ -120,7 +120,7 @@ status: type: PIDPressure - lastHeartbeatTime: "2019-09-20T19:32:50Z" lastTransitionTime: "2019-07-09T16:17:49Z" - message: kubelet is posting ready status. AppArmor enabled + message: kubelet is posting ready status reason: KubeletReady status: "True" type: Ready diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go index 194883390cf..fd281bdb88c 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package sets has generic set and specified sets. Generic set will // replace specified ones over time. And specific ones are deprecated. -package sets +package sets // import "k8s.io/apimachinery/pkg/util/sets" diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go deleted file mode 100644 index 443dac62eb3..00000000000 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package sets - -// ordered is a constraint that permits any ordered type: any type -// that supports the operators < <= >= >. -// If future releases of Go add new ordered types, -// this constraint will be modified to include them. -type ordered interface { - integer | float | ~string -} - -// integer is a constraint that permits any integer type. -// If future releases of Go add new predeclared integer types, -// this constraint will be modified to include them. -type integer interface { - signed | unsigned -} - -// float is a constraint that permits any floating-point type. -// If future releases of Go add new predeclared floating-point types, -// this constraint will be modified to include them. -type float interface { - ~float32 | ~float64 -} - -// signed is a constraint that permits any signed integer type. -// If future releases of Go add new predeclared signed integer types, -// this constraint will be modified to include them. -type signed interface { - ~int | ~int8 | ~int16 | ~int32 | ~int64 -} - -// unsigned is a constraint that permits any unsigned integer type. -// If future releases of Go add new predeclared unsigned integer types, -// this constraint will be modified to include them. -type unsigned interface { - ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr -} diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/set.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/set.go index d50526f4262..b76129a1ca2 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/set.go +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/sets/set.go @@ -17,6 +17,7 @@ limitations under the License. package sets import ( + "cmp" "sort" ) @@ -37,7 +38,7 @@ func New[T comparable](items ...T) Set[T] { // KeySet creates a Set from a keys of a map[comparable](? extends interface{}). // If the value passed in is not actually a map, this will panic. func KeySet[T comparable, V any](theMap map[T]V) Set[T] { - ret := Set[T]{} + ret := make(Set[T], len(theMap)) for keyValue := range theMap { ret.Insert(keyValue) } @@ -193,7 +194,7 @@ func (s1 Set[T]) Equal(s2 Set[T]) bool { return len(s1) == len(s2) && s1.IsSuperset(s2) } -type sortableSliceOfGeneric[T ordered] []T +type sortableSliceOfGeneric[T cmp.Ordered] []T func (g sortableSliceOfGeneric[T]) Len() int { return len(g) } func (g sortableSliceOfGeneric[T]) Less(i, j int) bool { return less[T](g[i], g[j]) } @@ -203,7 +204,7 @@ func (g sortableSliceOfGeneric[T]) Swap(i, j int) { g[i], g[j] = g[j], g[i] // // This is a separate function and not a method because not all types supported // by Generic are ordered and only those can be sorted. -func List[T ordered](s Set[T]) []T { +func List[T cmp.Ordered](s Set[T]) []T { res := make(sortableSliceOfGeneric[T], 0, len(s)) for key := range s { res = append(res, key) @@ -236,6 +237,6 @@ func (s Set[T]) Len() int { return len(s) } -func less[T ordered](lhs, rhs T) bool { +func less[T cmp.Ordered](lhs, rhs T) bool { return lhs < rhs } diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS new file mode 100644 index 00000000000..40237324761 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS @@ -0,0 +1,11 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +# Disable inheritance as this is an api owners file +options: + no_parent_owners: true +approvers: + - api-approvers +reviewers: + - api-reviewers +labels: + - kind/api-change diff --git a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go index 0b8a6cb354a..b32644902b0 100644 --- a/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go +++ b/pkg/k8s/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go @@ -19,10 +19,9 @@ package validation import ( "fmt" "math" - "net" "regexp" - "strconv" "strings" + "unicode" "k8s.io/apimachinery/pkg/util/validation/field" netutils "k8s.io/utils/net" @@ -352,11 +351,12 @@ func IsValidPortName(port string) []string { } // IsValidIP tests that the argument is a valid IP address. -func IsValidIP(value string) []string { +func IsValidIP(fldPath *field.Path, value string) field.ErrorList { + var allErrors field.ErrorList if netutils.ParseIPSloppy(value) == nil { - return []string{"must be a valid IP address, (e.g. 10.9.8.7 or 2001:db8::ffff)"} + allErrors = append(allErrors, field.Invalid(fldPath, value, "must be a valid IP address, (e.g. 10.9.8.7 or 2001:db8::ffff)")) } - return nil + return allErrors } // IsValidIPv4Address tests that the argument is a valid IPv4 address. @@ -379,6 +379,16 @@ func IsValidIPv6Address(fldPath *field.Path, value string) field.ErrorList { return allErrors } +// IsValidCIDR tests that the argument is a valid CIDR value. +func IsValidCIDR(fldPath *field.Path, value string) field.ErrorList { + var allErrors field.ErrorList + _, _, err := netutils.ParseCIDRSloppy(value) + if err != nil { + allErrors = append(allErrors, field.Invalid(fldPath, value, "must be a valid CIDR value, (e.g. 10.9.8.0/24 or 2001:db8::/64)")) + } + return allErrors +} + const percentFmt string = "[0-9]+%" const percentErrMsg string = "a valid percent string must be a numeric string followed by an ending '%'" @@ -409,6 +419,9 @@ func IsHTTPHeaderName(value string) []string { const envVarNameFmt = "[-._a-zA-Z][-._a-zA-Z0-9]*" const envVarNameFmtErrMsg string = "a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit" +// TODO(hirazawaui): Rename this when the RelaxedEnvironmentVariableValidation gate is removed. +const relaxedEnvVarNameFmtErrMsg string = "a valid environment variable name must consist only of printable ASCII characters other than '='" + var envVarNameRegexp = regexp.MustCompile("^" + envVarNameFmt + "$") // IsEnvVarName tests if a string is a valid environment variable name. @@ -422,6 +435,24 @@ func IsEnvVarName(value string) []string { return errs } +// IsRelaxedEnvVarName tests if a string is a valid environment variable name. +func IsRelaxedEnvVarName(value string) []string { + var errs []string + + if len(value) == 0 { + errs = append(errs, "environment variable name "+EmptyError()) + } + + for _, r := range value { + if r > unicode.MaxASCII || !unicode.IsPrint(r) || r == '=' { + errs = append(errs, relaxedEnvVarNameFmtErrMsg) + break + } + } + + return errs +} + const configMapKeyFmt = `[-._a-zA-Z0-9]+` const configMapKeyErrMsg string = "a valid config key must consist of alphanumeric characters, '-', '_' or '.'" @@ -493,18 +524,3 @@ func hasChDirPrefix(value string) []string { } return errs } - -// IsValidSocketAddr checks that string represents a valid socket address -// as defined in RFC 789. (e.g 0.0.0.0:10254 or [::]:10254)) -func IsValidSocketAddr(value string) []string { - var errs []string - ip, port, err := net.SplitHostPort(value) - if err != nil { - errs = append(errs, "must be a valid socket address format, (e.g. 0.0.0.0:10254 or [::]:10254)") - return errs - } - portInt, _ := strconv.Atoi(port) - errs = append(errs, IsValidPortNum(portInt)...) - errs = append(errs, IsValidIP(ip)...) - return errs -} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go new file mode 100644 index 00000000000..64422c1df41 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// AuditAnnotationApplyConfiguration represents an declarative configuration of the AuditAnnotation type for use +// with apply. +type AuditAnnotationApplyConfiguration struct { + Key *string `json:"key,omitempty"` + ValueExpression *string `json:"valueExpression,omitempty"` +} + +// AuditAnnotationApplyConfiguration constructs an declarative configuration of the AuditAnnotation type for use with +// apply. +func AuditAnnotation() *AuditAnnotationApplyConfiguration { + return &AuditAnnotationApplyConfiguration{} +} + +// WithKey sets the Key field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Key field is set to the value of the last call. +func (b *AuditAnnotationApplyConfiguration) WithKey(value string) *AuditAnnotationApplyConfiguration { + b.Key = &value + return b +} + +// WithValueExpression sets the ValueExpression field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ValueExpression field is set to the value of the last call. +func (b *AuditAnnotationApplyConfiguration) WithValueExpression(value string) *AuditAnnotationApplyConfiguration { + b.ValueExpression = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go new file mode 100644 index 00000000000..38b7475cc4d --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ExpressionWarningApplyConfiguration represents an declarative configuration of the ExpressionWarning type for use +// with apply. +type ExpressionWarningApplyConfiguration struct { + FieldRef *string `json:"fieldRef,omitempty"` + Warning *string `json:"warning,omitempty"` +} + +// ExpressionWarningApplyConfiguration constructs an declarative configuration of the ExpressionWarning type for use with +// apply. +func ExpressionWarning() *ExpressionWarningApplyConfiguration { + return &ExpressionWarningApplyConfiguration{} +} + +// WithFieldRef sets the FieldRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FieldRef field is set to the value of the last call. +func (b *ExpressionWarningApplyConfiguration) WithFieldRef(value string) *ExpressionWarningApplyConfiguration { + b.FieldRef = &value + return b +} + +// WithWarning sets the Warning field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Warning field is set to the value of the last call. +func (b *ExpressionWarningApplyConfiguration) WithWarning(value string) *ExpressionWarningApplyConfiguration { + b.Warning = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go new file mode 100644 index 00000000000..d8e98289473 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MatchResourcesApplyConfiguration represents an declarative configuration of the MatchResources type for use +// with apply. +type MatchResourcesApplyConfiguration struct { + NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` + ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"` + ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"` + MatchPolicy *apiadmissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"` +} + +// MatchResourcesApplyConfiguration constructs an declarative configuration of the MatchResources type for use with +// apply. +func MatchResources() *MatchResourcesApplyConfiguration { + return &MatchResourcesApplyConfiguration{} +} + +// WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamespaceSelector field is set to the value of the last call. +func (b *MatchResourcesApplyConfiguration) WithNamespaceSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration { + b.NamespaceSelector = value + return b +} + +// WithObjectSelector sets the ObjectSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObjectSelector field is set to the value of the last call. +func (b *MatchResourcesApplyConfiguration) WithObjectSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration { + b.ObjectSelector = value + return b +} + +// WithResourceRules adds the given value to the ResourceRules field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ResourceRules field. +func (b *MatchResourcesApplyConfiguration) WithResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithResourceRules") + } + b.ResourceRules = append(b.ResourceRules, *values[i]) + } + return b +} + +// WithExcludeResourceRules adds the given value to the ExcludeResourceRules field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ExcludeResourceRules field. +func (b *MatchResourcesApplyConfiguration) WithExcludeResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithExcludeResourceRules") + } + b.ExcludeResourceRules = append(b.ExcludeResourceRules, *values[i]) + } + return b +} + +// WithMatchPolicy sets the MatchPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MatchPolicy field is set to the value of the last call. +func (b *MatchResourcesApplyConfiguration) WithMatchPolicy(value apiadmissionregistrationv1.MatchPolicyType) *MatchResourcesApplyConfiguration { + b.MatchPolicy = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go new file mode 100644 index 00000000000..be8d5206cb0 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go @@ -0,0 +1,94 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" +) + +// NamedRuleWithOperationsApplyConfiguration represents an declarative configuration of the NamedRuleWithOperations type for use +// with apply. +type NamedRuleWithOperationsApplyConfiguration struct { + ResourceNames []string `json:"resourceNames,omitempty"` + RuleWithOperationsApplyConfiguration `json:",inline"` +} + +// NamedRuleWithOperationsApplyConfiguration constructs an declarative configuration of the NamedRuleWithOperations type for use with +// apply. +func NamedRuleWithOperations() *NamedRuleWithOperationsApplyConfiguration { + return &NamedRuleWithOperationsApplyConfiguration{} +} + +// WithResourceNames adds the given value to the ResourceNames field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ResourceNames field. +func (b *NamedRuleWithOperationsApplyConfiguration) WithResourceNames(values ...string) *NamedRuleWithOperationsApplyConfiguration { + for i := range values { + b.ResourceNames = append(b.ResourceNames, values[i]) + } + return b +} + +// WithOperations adds the given value to the Operations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Operations field. +func (b *NamedRuleWithOperationsApplyConfiguration) WithOperations(values ...admissionregistrationv1.OperationType) *NamedRuleWithOperationsApplyConfiguration { + for i := range values { + b.Operations = append(b.Operations, values[i]) + } + return b +} + +// WithAPIGroups adds the given value to the APIGroups field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the APIGroups field. +func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIGroups(values ...string) *NamedRuleWithOperationsApplyConfiguration { + for i := range values { + b.APIGroups = append(b.APIGroups, values[i]) + } + return b +} + +// WithAPIVersions adds the given value to the APIVersions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the APIVersions field. +func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIVersions(values ...string) *NamedRuleWithOperationsApplyConfiguration { + for i := range values { + b.APIVersions = append(b.APIVersions, values[i]) + } + return b +} + +// WithResources adds the given value to the Resources field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Resources field. +func (b *NamedRuleWithOperationsApplyConfiguration) WithResources(values ...string) *NamedRuleWithOperationsApplyConfiguration { + for i := range values { + b.Resources = append(b.Resources, values[i]) + } + return b +} + +// WithScope sets the Scope field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Scope field is set to the value of the last call. +func (b *NamedRuleWithOperationsApplyConfiguration) WithScope(value admissionregistrationv1.ScopeType) *NamedRuleWithOperationsApplyConfiguration { + b.Scope = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go new file mode 100644 index 00000000000..b77a30cf913 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ParamKindApplyConfiguration represents an declarative configuration of the ParamKind type for use +// with apply. +type ParamKindApplyConfiguration struct { + APIVersion *string `json:"apiVersion,omitempty"` + Kind *string `json:"kind,omitempty"` +} + +// ParamKindApplyConfiguration constructs an declarative configuration of the ParamKind type for use with +// apply. +func ParamKind() *ParamKindApplyConfiguration { + return &ParamKindApplyConfiguration{} +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ParamKindApplyConfiguration) WithAPIVersion(value string) *ParamKindApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ParamKindApplyConfiguration) WithKind(value string) *ParamKindApplyConfiguration { + b.Kind = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go new file mode 100644 index 00000000000..b52becda5ec --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go @@ -0,0 +1,71 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ParamRefApplyConfiguration represents an declarative configuration of the ParamRef type for use +// with apply. +type ParamRefApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + ParameterNotFoundAction *admissionregistrationv1.ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty"` +} + +// ParamRefApplyConfiguration constructs an declarative configuration of the ParamRef type for use with +// apply. +func ParamRef() *ParamRefApplyConfiguration { + return &ParamRefApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ParamRefApplyConfiguration) WithName(value string) *ParamRefApplyConfiguration { + b.Name = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ParamRefApplyConfiguration) WithNamespace(value string) *ParamRefApplyConfiguration { + b.Namespace = &value + return b +} + +// WithSelector sets the Selector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Selector field is set to the value of the last call. +func (b *ParamRefApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *ParamRefApplyConfiguration { + b.Selector = value + return b +} + +// WithParameterNotFoundAction sets the ParameterNotFoundAction field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ParameterNotFoundAction field is set to the value of the last call. +func (b *ParamRefApplyConfiguration) WithParameterNotFoundAction(value admissionregistrationv1.ParameterNotFoundActionType) *ParamRefApplyConfiguration { + b.ParameterNotFoundAction = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go new file mode 100644 index 00000000000..8621ce71ec7 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go @@ -0,0 +1,44 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// TypeCheckingApplyConfiguration represents an declarative configuration of the TypeChecking type for use +// with apply. +type TypeCheckingApplyConfiguration struct { + ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"` +} + +// TypeCheckingApplyConfiguration constructs an declarative configuration of the TypeChecking type for use with +// apply. +func TypeChecking() *TypeCheckingApplyConfiguration { + return &TypeCheckingApplyConfiguration{} +} + +// WithExpressionWarnings adds the given value to the ExpressionWarnings field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ExpressionWarnings field. +func (b *TypeCheckingApplyConfiguration) WithExpressionWarnings(values ...*ExpressionWarningApplyConfiguration) *TypeCheckingApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithExpressionWarnings") + } + b.ExpressionWarnings = append(b.ExpressionWarnings, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go new file mode 100644 index 00000000000..fc96a8bdc67 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go @@ -0,0 +1,256 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ValidatingAdmissionPolicyApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicy type for use +// with apply. +type ValidatingAdmissionPolicyApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` + Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"` +} + +// ValidatingAdmissionPolicy constructs an declarative configuration of the ValidatingAdmissionPolicy type for use with +// apply. +func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfiguration { + b := &ValidatingAdmissionPolicyApplyConfiguration{} + b.WithName(name) + b.WithKind("ValidatingAdmissionPolicy") + b.WithAPIVersion("admissionregistration.k8s.io/v1") + return b +} + +// ExtractValidatingAdmissionPolicy extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicy. If no managedFields are found in validatingAdmissionPolicy for fieldManager, a +// ValidatingAdmissionPolicyApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// validatingAdmissionPolicy must be a unmodified ValidatingAdmissionPolicy API object that was retrieved from the Kubernetes API. +// ExtractValidatingAdmissionPolicy provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractValidatingAdmissionPolicy(validatingAdmissionPolicy *apiadmissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { + return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "") +} + +// ExtractValidatingAdmissionPolicyStatus is the same as ExtractValidatingAdmissionPolicy except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractValidatingAdmissionPolicyStatus(validatingAdmissionPolicy *apiadmissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { + return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "status") +} + +func extractValidatingAdmissionPolicy(validatingAdmissionPolicy *apiadmissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { + b := &ValidatingAdmissionPolicyApplyConfiguration{} + err := managedfields.ExtractInto(validatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(validatingAdmissionPolicy.Name) + + b.WithKind("ValidatingAdmissionPolicy") + b.WithAPIVersion("admissionregistration.k8s.io/v1") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ValidatingAdmissionPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicySpecApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithStatus(value *ValidatingAdmissionPolicyStatusApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go new file mode 100644 index 00000000000..5bc41a0f521 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go @@ -0,0 +1,247 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ValidatingAdmissionPolicyBindingApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBinding type for use +// with apply. +type ValidatingAdmissionPolicyBindingApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` +} + +// ValidatingAdmissionPolicyBinding constructs an declarative configuration of the ValidatingAdmissionPolicyBinding type for use with +// apply. +func ValidatingAdmissionPolicyBinding(name string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b := &ValidatingAdmissionPolicyBindingApplyConfiguration{} + b.WithName(name) + b.WithKind("ValidatingAdmissionPolicyBinding") + b.WithAPIVersion("admissionregistration.k8s.io/v1") + return b +} + +// ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a +// ValidatingAdmissionPolicyBindingApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. +// ExtractValidatingAdmissionPolicyBinding provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { + return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "") +} + +// ExtractValidatingAdmissionPolicyBindingStatus is the same as ExtractValidatingAdmissionPolicyBinding except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractValidatingAdmissionPolicyBindingStatus(validatingAdmissionPolicyBinding *apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { + return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "status") +} + +func extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { + b := &ValidatingAdmissionPolicyBindingApplyConfiguration{} + err := managedfields.ExtractInto(validatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(validatingAdmissionPolicyBinding.Name) + + b.WithKind("ValidatingAdmissionPolicyBinding") + b.WithAPIVersion("admissionregistration.k8s.io/v1") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.Spec = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go new file mode 100644 index 00000000000..da6ecbe371c --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go @@ -0,0 +1,72 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" +) + +// ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use +// with apply. +type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct { + PolicyName *string `json:"policyName,omitempty"` + ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` + MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"` + ValidationActions []admissionregistrationv1.ValidationAction `json:"validationActions,omitempty"` +} + +// ValidatingAdmissionPolicyBindingSpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use with +// apply. +func ValidatingAdmissionPolicyBindingSpec() *ValidatingAdmissionPolicyBindingSpecApplyConfiguration { + return &ValidatingAdmissionPolicyBindingSpecApplyConfiguration{} +} + +// WithPolicyName sets the PolicyName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PolicyName field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration { + b.PolicyName = &value + return b +} + +// WithParamRef sets the ParamRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ParamRef field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration { + b.ParamRef = value + return b +} + +// WithMatchResources sets the MatchResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MatchResources field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration { + b.MatchResources = value + return b +} + +// WithValidationActions adds the given value to the ValidationActions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ValidationActions field. +func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithValidationActions(values ...admissionregistrationv1.ValidationAction) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration { + for i := range values { + b.ValidationActions = append(b.ValidationActions, values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go new file mode 100644 index 00000000000..eb930b9b1cd --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go @@ -0,0 +1,117 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" +) + +// ValidatingAdmissionPolicySpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicySpec type for use +// with apply. +type ValidatingAdmissionPolicySpecApplyConfiguration struct { + ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` + MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` + Validations []ValidationApplyConfiguration `json:"validations,omitempty"` + FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"` + AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"` + MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` + Variables []VariableApplyConfiguration `json:"variables,omitempty"` +} + +// ValidatingAdmissionPolicySpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicySpec type for use with +// apply. +func ValidatingAdmissionPolicySpec() *ValidatingAdmissionPolicySpecApplyConfiguration { + return &ValidatingAdmissionPolicySpecApplyConfiguration{} +} + +// WithParamKind sets the ParamKind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ParamKind field is set to the value of the last call. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithParamKind(value *ParamKindApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + b.ParamKind = value + return b +} + +// WithMatchConstraints sets the MatchConstraints field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MatchConstraints field is set to the value of the last call. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + b.MatchConstraints = value + return b +} + +// WithValidations adds the given value to the Validations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Validations field. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithValidations(values ...*ValidationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithValidations") + } + b.Validations = append(b.Validations, *values[i]) + } + return b +} + +// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FailurePolicy field is set to the value of the last call. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1.FailurePolicyType) *ValidatingAdmissionPolicySpecApplyConfiguration { + b.FailurePolicy = &value + return b +} + +// WithAuditAnnotations adds the given value to the AuditAnnotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AuditAnnotations field. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithAuditAnnotations(values ...*AuditAnnotationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAuditAnnotations") + } + b.AuditAnnotations = append(b.AuditAnnotations, *values[i]) + } + return b +} + +// WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the MatchConditions field. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithMatchConditions") + } + b.MatchConditions = append(b.MatchConditions, *values[i]) + } + return b +} + +// WithVariables adds the given value to the Variables field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Variables field. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithVariables(values ...*VariableApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithVariables") + } + b.Variables = append(b.Variables, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go new file mode 100644 index 00000000000..25cd67f08d8 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go @@ -0,0 +1,66 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ValidatingAdmissionPolicyStatusApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyStatus type for use +// with apply. +type ValidatingAdmissionPolicyStatusApplyConfiguration struct { + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"` + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// ValidatingAdmissionPolicyStatusApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyStatus type for use with +// apply. +func ValidatingAdmissionPolicyStatus() *ValidatingAdmissionPolicyStatusApplyConfiguration { + return &ValidatingAdmissionPolicyStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithObservedGeneration(value int64) *ValidatingAdmissionPolicyStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithTypeChecking sets the TypeChecking field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TypeChecking field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithTypeChecking(value *TypeCheckingApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration { + b.TypeChecking = value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go new file mode 100644 index 00000000000..ac29d143621 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go @@ -0,0 +1,70 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ValidationApplyConfiguration represents an declarative configuration of the Validation type for use +// with apply. +type ValidationApplyConfiguration struct { + Expression *string `json:"expression,omitempty"` + Message *string `json:"message,omitempty"` + Reason *v1.StatusReason `json:"reason,omitempty"` + MessageExpression *string `json:"messageExpression,omitempty"` +} + +// ValidationApplyConfiguration constructs an declarative configuration of the Validation type for use with +// apply. +func Validation() *ValidationApplyConfiguration { + return &ValidationApplyConfiguration{} +} + +// WithExpression sets the Expression field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Expression field is set to the value of the last call. +func (b *ValidationApplyConfiguration) WithExpression(value string) *ValidationApplyConfiguration { + b.Expression = &value + return b +} + +// WithMessage sets the Message field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Message field is set to the value of the last call. +func (b *ValidationApplyConfiguration) WithMessage(value string) *ValidationApplyConfiguration { + b.Message = &value + return b +} + +// WithReason sets the Reason field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Reason field is set to the value of the last call. +func (b *ValidationApplyConfiguration) WithReason(value v1.StatusReason) *ValidationApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessageExpression sets the MessageExpression field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MessageExpression field is set to the value of the last call. +func (b *ValidationApplyConfiguration) WithMessageExpression(value string) *ValidationApplyConfiguration { + b.MessageExpression = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go new file mode 100644 index 00000000000..d55f29a38bb --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// VariableApplyConfiguration represents an declarative configuration of the Variable type for use +// with apply. +type VariableApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Expression *string `json:"expression,omitempty"` +} + +// VariableApplyConfiguration constructs an declarative configuration of the Variable type for use with +// apply. +func Variable() *VariableApplyConfiguration { + return &VariableApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *VariableApplyConfiguration) WithName(value string) *VariableApplyConfiguration { + b.Name = &value + return b +} + +// WithExpression sets the Expression field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Expression field is set to the value of the last call. +func (b *VariableApplyConfiguration) WithExpression(value string) *VariableApplyConfiguration { + b.Expression = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go index 3d46a3ecf9b..bbcff71c860 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go @@ -31,6 +31,7 @@ type JobSpecApplyConfiguration struct { Completions *int32 `json:"completions,omitempty"` ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` PodFailurePolicy *PodFailurePolicyApplyConfiguration `json:"podFailurePolicy,omitempty"` + SuccessPolicy *SuccessPolicyApplyConfiguration `json:"successPolicy,omitempty"` BackoffLimit *int32 `json:"backoffLimit,omitempty"` BackoffLimitPerIndex *int32 `json:"backoffLimitPerIndex,omitempty"` MaxFailedIndexes *int32 `json:"maxFailedIndexes,omitempty"` @@ -41,6 +42,7 @@ type JobSpecApplyConfiguration struct { CompletionMode *batchv1.CompletionMode `json:"completionMode,omitempty"` Suspend *bool `json:"suspend,omitempty"` PodReplacementPolicy *batchv1.PodReplacementPolicy `json:"podReplacementPolicy,omitempty"` + ManagedBy *string `json:"managedBy,omitempty"` } // JobSpecApplyConfiguration constructs an declarative configuration of the JobSpec type for use with @@ -81,6 +83,14 @@ func (b *JobSpecApplyConfiguration) WithPodFailurePolicy(value *PodFailurePolicy return b } +// WithSuccessPolicy sets the SuccessPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SuccessPolicy field is set to the value of the last call. +func (b *JobSpecApplyConfiguration) WithSuccessPolicy(value *SuccessPolicyApplyConfiguration) *JobSpecApplyConfiguration { + b.SuccessPolicy = value + return b +} + // WithBackoffLimit sets the BackoffLimit field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the BackoffLimit field is set to the value of the last call. @@ -160,3 +170,11 @@ func (b *JobSpecApplyConfiguration) WithPodReplacementPolicy(value batchv1.PodRe b.PodReplacementPolicy = &value return b } + +// WithManagedBy sets the ManagedBy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ManagedBy field is set to the value of the last call. +func (b *JobSpecApplyConfiguration) WithManagedBy(value string) *JobSpecApplyConfiguration { + b.ManagedBy = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go new file mode 100644 index 00000000000..327aa1f5a4b --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go @@ -0,0 +1,44 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// SuccessPolicyApplyConfiguration represents an declarative configuration of the SuccessPolicy type for use +// with apply. +type SuccessPolicyApplyConfiguration struct { + Rules []SuccessPolicyRuleApplyConfiguration `json:"rules,omitempty"` +} + +// SuccessPolicyApplyConfiguration constructs an declarative configuration of the SuccessPolicy type for use with +// apply. +func SuccessPolicy() *SuccessPolicyApplyConfiguration { + return &SuccessPolicyApplyConfiguration{} +} + +// WithRules adds the given value to the Rules field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Rules field. +func (b *SuccessPolicyApplyConfiguration) WithRules(values ...*SuccessPolicyRuleApplyConfiguration) *SuccessPolicyApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithRules") + } + b.Rules = append(b.Rules, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go new file mode 100644 index 00000000000..4c862e6821e --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// SuccessPolicyRuleApplyConfiguration represents an declarative configuration of the SuccessPolicyRule type for use +// with apply. +type SuccessPolicyRuleApplyConfiguration struct { + SucceededIndexes *string `json:"succeededIndexes,omitempty"` + SucceededCount *int32 `json:"succeededCount,omitempty"` +} + +// SuccessPolicyRuleApplyConfiguration constructs an declarative configuration of the SuccessPolicyRule type for use with +// apply. +func SuccessPolicyRule() *SuccessPolicyRuleApplyConfiguration { + return &SuccessPolicyRuleApplyConfiguration{} +} + +// WithSucceededIndexes sets the SucceededIndexes field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SucceededIndexes field is set to the value of the last call. +func (b *SuccessPolicyRuleApplyConfiguration) WithSucceededIndexes(value string) *SuccessPolicyRuleApplyConfiguration { + b.SucceededIndexes = &value + return b +} + +// WithSucceededCount sets the SucceededCount field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SucceededCount field is set to the value of the last call. +func (b *SuccessPolicyRuleApplyConfiguration) WithSucceededCount(value int32) *SuccessPolicyRuleApplyConfiguration { + b.SucceededCount = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go new file mode 100644 index 00000000000..7f3c22afa1b --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/core/v1" +) + +// AppArmorProfileApplyConfiguration represents an declarative configuration of the AppArmorProfile type for use +// with apply. +type AppArmorProfileApplyConfiguration struct { + Type *v1.AppArmorProfileType `json:"type,omitempty"` + LocalhostProfile *string `json:"localhostProfile,omitempty"` +} + +// AppArmorProfileApplyConfiguration constructs an declarative configuration of the AppArmorProfile type for use with +// apply. +func AppArmorProfile() *AppArmorProfileApplyConfiguration { + return &AppArmorProfileApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *AppArmorProfileApplyConfiguration) WithType(value v1.AppArmorProfileType) *AppArmorProfileApplyConfiguration { + b.Type = &value + return b +} + +// WithLocalhostProfile sets the LocalhostProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LocalhostProfile field is set to the value of the last call. +func (b *AppArmorProfileApplyConfiguration) WithLocalhostProfile(value string) *AppArmorProfileApplyConfiguration { + b.LocalhostProfile = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go index 2b98c4658f2..e3f774bbb3d 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go @@ -36,6 +36,7 @@ type ContainerStatusApplyConfiguration struct { Started *bool `json:"started,omitempty"` AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"` Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` + VolumeMounts []VolumeMountStatusApplyConfiguration `json:"volumeMounts,omitempty"` } // ContainerStatusApplyConfiguration constructs an declarative configuration of the ContainerStatus type for use with @@ -131,3 +132,16 @@ func (b *ContainerStatusApplyConfiguration) WithResources(value *ResourceRequire b.Resources = value return b } + +// WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the VolumeMounts field. +func (b *ContainerStatusApplyConfiguration) WithVolumeMounts(values ...*VolumeMountStatusApplyConfiguration) *ContainerStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithVolumeMounts") + } + b.VolumeMounts = append(b.VolumeMounts, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go new file mode 100644 index 00000000000..9ada0a18efd --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// NodeRuntimeHandlerApplyConfiguration represents an declarative configuration of the NodeRuntimeHandler type for use +// with apply. +type NodeRuntimeHandlerApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Features *NodeRuntimeHandlerFeaturesApplyConfiguration `json:"features,omitempty"` +} + +// NodeRuntimeHandlerApplyConfiguration constructs an declarative configuration of the NodeRuntimeHandler type for use with +// apply. +func NodeRuntimeHandler() *NodeRuntimeHandlerApplyConfiguration { + return &NodeRuntimeHandlerApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NodeRuntimeHandlerApplyConfiguration) WithName(value string) *NodeRuntimeHandlerApplyConfiguration { + b.Name = &value + return b +} + +// WithFeatures sets the Features field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Features field is set to the value of the last call. +func (b *NodeRuntimeHandlerApplyConfiguration) WithFeatures(value *NodeRuntimeHandlerFeaturesApplyConfiguration) *NodeRuntimeHandlerApplyConfiguration { + b.Features = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go new file mode 100644 index 00000000000..a3e3a52e887 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// NodeRuntimeHandlerFeaturesApplyConfiguration represents an declarative configuration of the NodeRuntimeHandlerFeatures type for use +// with apply. +type NodeRuntimeHandlerFeaturesApplyConfiguration struct { + RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty"` +} + +// NodeRuntimeHandlerFeaturesApplyConfiguration constructs an declarative configuration of the NodeRuntimeHandlerFeatures type for use with +// apply. +func NodeRuntimeHandlerFeatures() *NodeRuntimeHandlerFeaturesApplyConfiguration { + return &NodeRuntimeHandlerFeaturesApplyConfiguration{} +} + +// WithRecursiveReadOnlyMounts sets the RecursiveReadOnlyMounts field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RecursiveReadOnlyMounts field is set to the value of the last call. +func (b *NodeRuntimeHandlerFeaturesApplyConfiguration) WithRecursiveReadOnlyMounts(value bool) *NodeRuntimeHandlerFeaturesApplyConfiguration { + b.RecursiveReadOnlyMounts = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go index aa3603f4fc0..a4a30a26853 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go @@ -36,6 +36,7 @@ type NodeStatusApplyConfiguration struct { VolumesInUse []v1.UniqueVolumeName `json:"volumesInUse,omitempty"` VolumesAttached []AttachedVolumeApplyConfiguration `json:"volumesAttached,omitempty"` Config *NodeConfigStatusApplyConfiguration `json:"config,omitempty"` + RuntimeHandlers []NodeRuntimeHandlerApplyConfiguration `json:"runtimeHandlers,omitempty"` } // NodeStatusApplyConfiguration constructs an declarative configuration of the NodeStatus type for use with @@ -153,3 +154,16 @@ func (b *NodeStatusApplyConfiguration) WithConfig(value *NodeConfigStatusApplyCo b.Config = value return b } + +// WithRuntimeHandlers adds the given value to the RuntimeHandlers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the RuntimeHandlers field. +func (b *NodeStatusApplyConfiguration) WithRuntimeHandlers(values ...*NodeRuntimeHandlerApplyConfiguration) *NodeStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithRuntimeHandlers") + } + b.RuntimeHandlers = append(b.RuntimeHandlers, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go index 6db09aa32f1..6b340294ebc 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go @@ -35,6 +35,7 @@ type PodSecurityContextApplyConfiguration struct { Sysctls []SysctlApplyConfiguration `json:"sysctls,omitempty"` FSGroupChangePolicy *corev1.PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty"` SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"` + AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"` } // PodSecurityContextApplyConfiguration constructs an declarative configuration of the PodSecurityContext type for use with @@ -129,3 +130,11 @@ func (b *PodSecurityContextApplyConfiguration) WithSeccompProfile(value *Seccomp b.SeccompProfile = value return b } + +// WithAppArmorProfile sets the AppArmorProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AppArmorProfile field is set to the value of the last call. +func (b *PodSecurityContextApplyConfiguration) WithAppArmorProfile(value *AppArmorProfileApplyConfiguration) *PodSecurityContextApplyConfiguration { + b.AppArmorProfile = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go index 8f01537eb37..4146b765daa 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go @@ -36,6 +36,7 @@ type SecurityContextApplyConfiguration struct { AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"` ProcMount *corev1.ProcMountType `json:"procMount,omitempty"` SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"` + AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"` } // SecurityContextApplyConfiguration constructs an declarative configuration of the SecurityContext type for use with @@ -131,3 +132,11 @@ func (b *SecurityContextApplyConfiguration) WithSeccompProfile(value *SeccompPro b.SeccompProfile = value return b } + +// WithAppArmorProfile sets the AppArmorProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AppArmorProfile field is set to the value of the last call. +func (b *SecurityContextApplyConfiguration) WithAppArmorProfile(value *AppArmorProfileApplyConfiguration) *SecurityContextApplyConfiguration { + b.AppArmorProfile = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go index 493af6fb3c1..5cfbcb700fe 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go @@ -44,6 +44,7 @@ type ServiceSpecApplyConfiguration struct { AllocateLoadBalancerNodePorts *bool `json:"allocateLoadBalancerNodePorts,omitempty"` LoadBalancerClass *string `json:"loadBalancerClass,omitempty"` InternalTrafficPolicy *corev1.ServiceInternalTrafficPolicy `json:"internalTrafficPolicy,omitempty"` + TrafficDistribution *string `json:"trafficDistribution,omitempty"` } // ServiceSpecApplyConfiguration constructs an declarative configuration of the ServiceSpec type for use with @@ -222,3 +223,11 @@ func (b *ServiceSpecApplyConfiguration) WithInternalTrafficPolicy(value corev1.S b.InternalTrafficPolicy = &value return b } + +// WithTrafficDistribution sets the TrafficDistribution field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TrafficDistribution field is set to the value of the last call. +func (b *ServiceSpecApplyConfiguration) WithTrafficDistribution(value string) *ServiceSpecApplyConfiguration { + b.TrafficDistribution = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go index b0bec9ffed9..358658350e8 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go @@ -25,12 +25,13 @@ import ( // VolumeMountApplyConfiguration represents an declarative configuration of the VolumeMount type for use // with apply. type VolumeMountApplyConfiguration struct { - Name *string `json:"name,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - MountPath *string `json:"mountPath,omitempty"` - SubPath *string `json:"subPath,omitempty"` - MountPropagation *v1.MountPropagationMode `json:"mountPropagation,omitempty"` - SubPathExpr *string `json:"subPathExpr,omitempty"` + Name *string `json:"name,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + RecursiveReadOnly *v1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"` + MountPath *string `json:"mountPath,omitempty"` + SubPath *string `json:"subPath,omitempty"` + MountPropagation *v1.MountPropagationMode `json:"mountPropagation,omitempty"` + SubPathExpr *string `json:"subPathExpr,omitempty"` } // VolumeMountApplyConfiguration constructs an declarative configuration of the VolumeMount type for use with @@ -55,6 +56,14 @@ func (b *VolumeMountApplyConfiguration) WithReadOnly(value bool) *VolumeMountApp return b } +// WithRecursiveReadOnly sets the RecursiveReadOnly field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RecursiveReadOnly field is set to the value of the last call. +func (b *VolumeMountApplyConfiguration) WithRecursiveReadOnly(value v1.RecursiveReadOnlyMode) *VolumeMountApplyConfiguration { + b.RecursiveReadOnly = &value + return b +} + // WithMountPath sets the MountPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MountPath field is set to the value of the last call. diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go new file mode 100644 index 00000000000..c3d187fdfac --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go @@ -0,0 +1,70 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/core/v1" +) + +// VolumeMountStatusApplyConfiguration represents an declarative configuration of the VolumeMountStatus type for use +// with apply. +type VolumeMountStatusApplyConfiguration struct { + Name *string `json:"name,omitempty"` + MountPath *string `json:"mountPath,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + RecursiveReadOnly *v1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"` +} + +// VolumeMountStatusApplyConfiguration constructs an declarative configuration of the VolumeMountStatus type for use with +// apply. +func VolumeMountStatus() *VolumeMountStatusApplyConfiguration { + return &VolumeMountStatusApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *VolumeMountStatusApplyConfiguration) WithName(value string) *VolumeMountStatusApplyConfiguration { + b.Name = &value + return b +} + +// WithMountPath sets the MountPath field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MountPath field is set to the value of the last call. +func (b *VolumeMountStatusApplyConfiguration) WithMountPath(value string) *VolumeMountStatusApplyConfiguration { + b.MountPath = &value + return b +} + +// WithReadOnly sets the ReadOnly field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ReadOnly field is set to the value of the last call. +func (b *VolumeMountStatusApplyConfiguration) WithReadOnly(value bool) *VolumeMountStatusApplyConfiguration { + b.ReadOnly = &value + return b +} + +// WithRecursiveReadOnly sets the RecursiveReadOnly field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RecursiveReadOnly field is set to the value of the last call. +func (b *VolumeMountStatusApplyConfiguration) WithRecursiveReadOnly(value v1.RecursiveReadOnlyMode) *VolumeMountStatusApplyConfiguration { + b.RecursiveReadOnly = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go index 2ceb262217d..47bfb44e0c3 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -39,6 +39,28 @@ func Parser() *typed.Parser { var parserOnce sync.Once var parser *typed.Parser var schemaYAML = typed.YAMLObject(`types: +- name: io.k8s.api.admissionregistration.v1.AuditAnnotation + map: + fields: + - name: key + type: + scalar: string + default: "" + - name: valueExpression + type: + scalar: string + default: "" +- name: io.k8s.api.admissionregistration.v1.ExpressionWarning + map: + fields: + - name: fieldRef + type: + scalar: string + default: "" + - name: warning + type: + scalar: string + default: "" - name: io.k8s.api.admissionregistration.v1.MatchCondition map: fields: @@ -50,6 +72,31 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" +- name: io.k8s.api.admissionregistration.v1.MatchResources + map: + fields: + - name: excludeResourceRules + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.NamedRuleWithOperations + elementRelationship: atomic + - name: matchPolicy + type: + scalar: string + - name: namespaceSelector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: objectSelector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: resourceRules + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.NamedRuleWithOperations + elementRelationship: atomic + elementRelationship: atomic - name: io.k8s.api.admissionregistration.v1.MutatingWebhook map: fields: @@ -123,6 +170,69 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - name +- name: io.k8s.api.admissionregistration.v1.NamedRuleWithOperations + map: + fields: + - name: apiGroups + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: apiVersions + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: operations + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: resourceNames + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: resources + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: scope + type: + scalar: string + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1.ParamKind + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1.ParamRef + map: + fields: + - name: name + type: + scalar: string + - name: namespace + type: + scalar: string + - name: parameterNotFoundAction + type: + scalar: string + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + elementRelationship: atomic - name: io.k8s.api.admissionregistration.v1.RuleWithOperations map: fields: @@ -170,6 +280,128 @@ var schemaYAML = typed.YAMLObject(`types: - name: port type: scalar: numeric +- name: io.k8s.api.admissionregistration.v1.TypeChecking + map: + fields: + - name: expressionWarnings + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.ExpressionWarning + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicySpec + default: {} + - name: status + type: + namedType: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyStatus + default: {} +- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec + default: {} +- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec + map: + fields: + - name: matchResources + type: + namedType: io.k8s.api.admissionregistration.v1.MatchResources + - name: paramRef + type: + namedType: io.k8s.api.admissionregistration.v1.ParamRef + - name: policyName + type: + scalar: string + - name: validationActions + type: + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicySpec + map: + fields: + - name: auditAnnotations + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.AuditAnnotation + elementRelationship: atomic + - name: failurePolicy + type: + scalar: string + - name: matchConditions + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.MatchCondition + elementRelationship: associative + keys: + - name + - name: matchConstraints + type: + namedType: io.k8s.api.admissionregistration.v1.MatchResources + - name: paramKind + type: + namedType: io.k8s.api.admissionregistration.v1.ParamKind + - name: validations + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.Validation + elementRelationship: atomic + - name: variables + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.Variable + elementRelationship: associative + keys: + - name +- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: observedGeneration + type: + scalar: numeric + - name: typeChecking + type: + namedType: io.k8s.api.admissionregistration.v1.TypeChecking - name: io.k8s.api.admissionregistration.v1.ValidatingWebhook map: fields: @@ -240,6 +472,34 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - name +- name: io.k8s.api.admissionregistration.v1.Validation + map: + fields: + - name: expression + type: + scalar: string + default: "" + - name: message + type: + scalar: string + - name: messageExpression + type: + scalar: string + - name: reason + type: + scalar: string +- name: io.k8s.api.admissionregistration.v1.Variable + map: + fields: + - name: expression + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + elementRelationship: atomic - name: io.k8s.api.admissionregistration.v1.WebhookClientConfig map: fields: @@ -3599,6 +3859,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: completions type: scalar: numeric + - name: managedBy + type: + scalar: string - name: manualSelector type: scalar: boolean @@ -3617,6 +3880,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: successPolicy + type: + namedType: io.k8s.api.batch.v1.SuccessPolicy - name: suspend type: scalar: boolean @@ -3729,6 +3995,24 @@ var schemaYAML = typed.YAMLObject(`types: elementType: namedType: io.k8s.api.batch.v1.PodFailurePolicyOnPodConditionsPattern elementRelationship: atomic +- name: io.k8s.api.batch.v1.SuccessPolicy + map: + fields: + - name: rules + type: + list: + elementType: + namedType: io.k8s.api.batch.v1.SuccessPolicyRule + elementRelationship: atomic +- name: io.k8s.api.batch.v1.SuccessPolicyRule + map: + fields: + - name: succeededCount + type: + scalar: numeric + - name: succeededIndexes + type: + scalar: string - name: io.k8s.api.batch.v1.UncountedTerminatedPods map: fields: @@ -4138,6 +4422,21 @@ var schemaYAML = typed.YAMLObject(`types: - name: podAntiAffinity type: namedType: io.k8s.api.core.v1.PodAntiAffinity +- name: io.k8s.api.core.v1.AppArmorProfile + map: + fields: + - name: localhostProfile + type: + scalar: string + - name: type + type: + scalar: string + default: "" + unions: + - discriminator: type + fields: + - fieldName: localhostProfile + discriminatorValue: LocalhostProfile - name: io.k8s.api.core.v1.AttachedVolume map: fields: @@ -4460,6 +4759,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -4473,6 +4773,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -4510,6 +4811,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -4528,6 +4830,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -4781,6 +5084,14 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.core.v1.ContainerState default: {} + - name: volumeMounts + type: + list: + elementType: + namedType: io.k8s.api.core.v1.VolumeMountStatus + elementRelationship: associative + keys: + - mountPath - name: io.k8s.api.core.v1.DaemonEndpoint map: fields: @@ -5343,6 +5654,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: ip type: scalar: string + default: "" - name: io.k8s.api.core.v1.HostIP map: fields: @@ -5572,6 +5884,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" elementRelationship: atomic - name: io.k8s.api.core.v1.LocalVolumeSource map: @@ -5766,6 +6079,22 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.core.v1.DaemonEndpoint default: {} +- name: io.k8s.api.core.v1.NodeRuntimeHandler + map: + fields: + - name: features + type: + namedType: io.k8s.api.core.v1.NodeRuntimeHandlerFeatures + - name: name + type: + scalar: string + default: "" +- name: io.k8s.api.core.v1.NodeRuntimeHandlerFeatures + map: + fields: + - name: recursiveReadOnlyMounts + type: + scalar: boolean - name: io.k8s.api.core.v1.NodeSelector map: fields: @@ -5888,6 +6217,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: phase type: scalar: string + - name: runtimeHandlers + type: + list: + elementType: + namedType: io.k8s.api.core.v1.NodeRuntimeHandler + elementRelationship: atomic - name: volumesAttached type: list: @@ -6457,6 +6792,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.core.v1.PodSecurityContext map: fields: + - name: appArmorProfile + type: + namedType: io.k8s.api.core.v1.AppArmorProfile - name: fsGroup type: scalar: numeric @@ -7285,6 +7623,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -7298,6 +7637,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -7314,6 +7654,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -7351,6 +7692,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: allowPrivilegeEscalation type: scalar: boolean + - name: appArmorProfile + type: + namedType: io.k8s.api.core.v1.AppArmorProfile - name: capabilities type: namedType: io.k8s.api.core.v1.Capabilities @@ -7546,6 +7890,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: sessionAffinityConfig type: namedType: io.k8s.api.core.v1.SessionAffinityConfig + - name: trafficDistribution + type: + scalar: string - name: type type: scalar: string @@ -7860,17 +8207,40 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string - default: "" -- name: io.k8s.api.core.v1.VolumeMount + default: "" +- name: io.k8s.api.core.v1.VolumeMount + map: + fields: + - name: mountPath + type: + scalar: string + default: "" + - name: mountPropagation + type: + scalar: string + - name: name + type: + scalar: string + default: "" + - name: readOnly + type: + scalar: boolean + - name: recursiveReadOnly + type: + scalar: string + - name: subPath + type: + scalar: string + - name: subPathExpr + type: + scalar: string +- name: io.k8s.api.core.v1.VolumeMountStatus map: fields: - name: mountPath type: scalar: string default: "" - - name: mountPropagation - type: - scalar: string - name: name type: scalar: string @@ -7878,10 +8248,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: readOnly type: scalar: boolean - - name: subPath - type: - scalar: string - - name: subPathExpr + - name: recursiveReadOnly type: scalar: string - name: io.k8s.api.core.v1.VolumeNodeAffinity @@ -11658,6 +12025,119 @@ var schemaYAML = typed.YAMLObject(`types: - name: shareable type: scalar: boolean +- name: io.k8s.api.resource.v1alpha2.DriverAllocationResult + map: + fields: + - name: namedResources + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult + - name: vendorRequestParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.DriverRequests + map: + fields: + - name: driverName + type: + scalar: string + - name: requests + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.ResourceRequest + elementRelationship: atomic + - name: vendorParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult + map: + fields: + - name: name + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha2.NamedResourcesAttribute + map: + fields: + - name: bool + type: + scalar: boolean + - name: int + type: + scalar: numeric + - name: intSlice + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice + - name: name + type: + scalar: string + default: "" + - name: quantity + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: string + type: + scalar: string + - name: stringSlice + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice + - name: version + type: + scalar: string +- name: io.k8s.api.resource.v1alpha2.NamedResourcesFilter + map: + fields: + - name: selector + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha2.NamedResourcesInstance + map: + fields: + - name: attributes + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesAttribute + elementRelationship: atomic + - name: name + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice + map: + fields: + - name: ints + type: + list: + elementType: + scalar: numeric + elementRelationship: atomic +- name: io.k8s.api.resource.v1alpha2.NamedResourcesRequest + map: + fields: + - name: selector + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha2.NamedResourcesResources + map: + fields: + - name: instances + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesInstance + elementRelationship: atomic +- name: io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice + map: + fields: + - name: strings + type: + list: + elementType: + scalar: string + elementRelationship: atomic - name: io.k8s.api.resource.v1alpha2.PodSchedulingContext map: fields: @@ -11741,6 +12221,31 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" +- name: io.k8s.api.resource.v1alpha2.ResourceClaimParameters + map: + fields: + - name: apiVersion + type: + scalar: string + - name: driverRequests + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.DriverRequests + elementRelationship: atomic + - name: generatedFrom + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: shareable + type: + scalar: boolean - name: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference map: fields: @@ -11848,9 +12353,40 @@ var schemaYAML = typed.YAMLObject(`types: - name: parametersRef type: namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference + - name: structuredParameters + type: + scalar: boolean - name: suitableNodes type: namedType: io.k8s.api.core.v1.NodeSelector +- name: io.k8s.api.resource.v1alpha2.ResourceClassParameters + map: + fields: + - name: apiVersion + type: + scalar: string + - name: filters + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.ResourceFilter + elementRelationship: atomic + - name: generatedFrom + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: vendorParameters + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.VendorParameters + elementRelationship: atomic - name: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference map: fields: @@ -11868,6 +12404,15 @@ var schemaYAML = typed.YAMLObject(`types: - name: namespace type: scalar: string +- name: io.k8s.api.resource.v1alpha2.ResourceFilter + map: + fields: + - name: driverName + type: + scalar: string + - name: namedResources + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesFilter - name: io.k8s.api.resource.v1alpha2.ResourceHandle map: fields: @@ -11877,6 +12422,68 @@ var schemaYAML = typed.YAMLObject(`types: - name: driverName type: scalar: string + - name: structuredData + type: + namedType: io.k8s.api.resource.v1alpha2.StructuredResourceHandle +- name: io.k8s.api.resource.v1alpha2.ResourceRequest + map: + fields: + - name: namedResources + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesRequest + - name: vendorParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.ResourceSlice + map: + fields: + - name: apiVersion + type: + scalar: string + - name: driverName + type: + scalar: string + default: "" + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: namedResources + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesResources + - name: nodeName + type: + scalar: string +- name: io.k8s.api.resource.v1alpha2.StructuredResourceHandle + map: + fields: + - name: nodeName + type: + scalar: string + - name: results + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.DriverAllocationResult + elementRelationship: atomic + - name: vendorClaimParameters + type: + namedType: __untyped_atomic_ + - name: vendorClassParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.VendorParameters + map: + fields: + - name: driverName + type: + scalar: string + - name: parameters + type: + namedType: __untyped_atomic_ - name: io.k8s.api.scheduling.v1.PriorityClass map: fields: @@ -12585,6 +13192,83 @@ var schemaYAML = typed.YAMLObject(`types: - name: count type: scalar: numeric +- name: io.k8s.api.storagemigration.v1alpha1.GroupVersionResource + map: + fields: + - name: group + type: + scalar: string + - name: resource + type: + scalar: string + - name: version + type: + scalar: string +- name: io.k8s.api.storagemigration.v1alpha1.MigrationCondition + map: + fields: + - name: lastUpdateTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: message + type: + scalar: string + - name: reason + type: + scalar: string + - name: status + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec + default: {} + - name: status + type: + namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus + default: {} +- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec + map: + fields: + - name: continueToken + type: + scalar: string + - name: resource + type: + namedType: io.k8s.api.storagemigration.v1alpha1.GroupVersionResource + default: {} +- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.api.storagemigration.v1alpha1.MigrationCondition + elementRelationship: associative + keys: + - type + - name: resourceVersion + type: + scalar: string - name: io.k8s.apimachinery.pkg.api.resource.Quantity scalar: untyped - name: io.k8s.apimachinery.pkg.apis.meta.v1.Condition diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresultmodel.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresultmodel.go new file mode 100644 index 00000000000..0c8be0e6aa3 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresultmodel.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// AllocationResultModelApplyConfiguration represents an declarative configuration of the AllocationResultModel type for use +// with apply. +type AllocationResultModelApplyConfiguration struct { + NamedResources *NamedResourcesAllocationResultApplyConfiguration `json:"namedResources,omitempty"` +} + +// AllocationResultModelApplyConfiguration constructs an declarative configuration of the AllocationResultModel type for use with +// apply. +func AllocationResultModel() *AllocationResultModelApplyConfiguration { + return &AllocationResultModelApplyConfiguration{} +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *AllocationResultModelApplyConfiguration) WithNamedResources(value *NamedResourcesAllocationResultApplyConfiguration) *AllocationResultModelApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go new file mode 100644 index 00000000000..a1f082fad7b --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DriverAllocationResultApplyConfiguration represents an declarative configuration of the DriverAllocationResult type for use +// with apply. +type DriverAllocationResultApplyConfiguration struct { + VendorRequestParameters *runtime.RawExtension `json:"vendorRequestParameters,omitempty"` + AllocationResultModelApplyConfiguration `json:",inline"` +} + +// DriverAllocationResultApplyConfiguration constructs an declarative configuration of the DriverAllocationResult type for use with +// apply. +func DriverAllocationResult() *DriverAllocationResultApplyConfiguration { + return &DriverAllocationResultApplyConfiguration{} +} + +// WithVendorRequestParameters sets the VendorRequestParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorRequestParameters field is set to the value of the last call. +func (b *DriverAllocationResultApplyConfiguration) WithVendorRequestParameters(value runtime.RawExtension) *DriverAllocationResultApplyConfiguration { + b.VendorRequestParameters = &value + return b +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *DriverAllocationResultApplyConfiguration) WithNamedResources(value *NamedResourcesAllocationResultApplyConfiguration) *DriverAllocationResultApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go new file mode 100644 index 00000000000..8052915784a --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go @@ -0,0 +1,66 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DriverRequestsApplyConfiguration represents an declarative configuration of the DriverRequests type for use +// with apply. +type DriverRequestsApplyConfiguration struct { + DriverName *string `json:"driverName,omitempty"` + VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"` + Requests []ResourceRequestApplyConfiguration `json:"requests,omitempty"` +} + +// DriverRequestsApplyConfiguration constructs an declarative configuration of the DriverRequests type for use with +// apply. +func DriverRequests() *DriverRequestsApplyConfiguration { + return &DriverRequestsApplyConfiguration{} +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *DriverRequestsApplyConfiguration) WithDriverName(value string) *DriverRequestsApplyConfiguration { + b.DriverName = &value + return b +} + +// WithVendorParameters sets the VendorParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorParameters field is set to the value of the last call. +func (b *DriverRequestsApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *DriverRequestsApplyConfiguration { + b.VendorParameters = &value + return b +} + +// WithRequests adds the given value to the Requests field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Requests field. +func (b *DriverRequestsApplyConfiguration) WithRequests(values ...*ResourceRequestApplyConfiguration) *DriverRequestsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithRequests") + } + b.Requests = append(b.Requests, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesallocationresult.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesallocationresult.go new file mode 100644 index 00000000000..311edbac800 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesallocationresult.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesAllocationResultApplyConfiguration represents an declarative configuration of the NamedResourcesAllocationResult type for use +// with apply. +type NamedResourcesAllocationResultApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// NamedResourcesAllocationResultApplyConfiguration constructs an declarative configuration of the NamedResourcesAllocationResult type for use with +// apply. +func NamedResourcesAllocationResult() *NamedResourcesAllocationResultApplyConfiguration { + return &NamedResourcesAllocationResultApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NamedResourcesAllocationResultApplyConfiguration) WithName(value string) *NamedResourcesAllocationResultApplyConfiguration { + b.Name = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattribute.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattribute.go new file mode 100644 index 00000000000..d9545d054f3 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattribute.go @@ -0,0 +1,100 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resource "k8s.io/apimachinery/pkg/api/resource" +) + +// NamedResourcesAttributeApplyConfiguration represents an declarative configuration of the NamedResourcesAttribute type for use +// with apply. +type NamedResourcesAttributeApplyConfiguration struct { + Name *string `json:"name,omitempty"` + NamedResourcesAttributeValueApplyConfiguration `json:",inline"` +} + +// NamedResourcesAttributeApplyConfiguration constructs an declarative configuration of the NamedResourcesAttribute type for use with +// apply. +func NamedResourcesAttribute() *NamedResourcesAttributeApplyConfiguration { + return &NamedResourcesAttributeApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithName(value string) *NamedResourcesAttributeApplyConfiguration { + b.Name = &value + return b +} + +// WithQuantityValue sets the QuantityValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the QuantityValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithQuantityValue(value resource.Quantity) *NamedResourcesAttributeApplyConfiguration { + b.QuantityValue = &value + return b +} + +// WithBoolValue sets the BoolValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BoolValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithBoolValue(value bool) *NamedResourcesAttributeApplyConfiguration { + b.BoolValue = &value + return b +} + +// WithIntValue sets the IntValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IntValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithIntValue(value int64) *NamedResourcesAttributeApplyConfiguration { + b.IntValue = &value + return b +} + +// WithIntSliceValue sets the IntSliceValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IntSliceValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithIntSliceValue(value *NamedResourcesIntSliceApplyConfiguration) *NamedResourcesAttributeApplyConfiguration { + b.IntSliceValue = value + return b +} + +// WithStringValue sets the StringValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StringValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithStringValue(value string) *NamedResourcesAttributeApplyConfiguration { + b.StringValue = &value + return b +} + +// WithStringSliceValue sets the StringSliceValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StringSliceValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithStringSliceValue(value *NamedResourcesStringSliceApplyConfiguration) *NamedResourcesAttributeApplyConfiguration { + b.StringSliceValue = value + return b +} + +// WithVersionValue sets the VersionValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VersionValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithVersionValue(value string) *NamedResourcesAttributeApplyConfiguration { + b.VersionValue = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattributevalue.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattributevalue.go new file mode 100644 index 00000000000..e0b19650a92 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattributevalue.go @@ -0,0 +1,97 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resource "k8s.io/apimachinery/pkg/api/resource" +) + +// NamedResourcesAttributeValueApplyConfiguration represents an declarative configuration of the NamedResourcesAttributeValue type for use +// with apply. +type NamedResourcesAttributeValueApplyConfiguration struct { + QuantityValue *resource.Quantity `json:"quantity,omitempty"` + BoolValue *bool `json:"bool,omitempty"` + IntValue *int64 `json:"int,omitempty"` + IntSliceValue *NamedResourcesIntSliceApplyConfiguration `json:"intSlice,omitempty"` + StringValue *string `json:"string,omitempty"` + StringSliceValue *NamedResourcesStringSliceApplyConfiguration `json:"stringSlice,omitempty"` + VersionValue *string `json:"version,omitempty"` +} + +// NamedResourcesAttributeValueApplyConfiguration constructs an declarative configuration of the NamedResourcesAttributeValue type for use with +// apply. +func NamedResourcesAttributeValue() *NamedResourcesAttributeValueApplyConfiguration { + return &NamedResourcesAttributeValueApplyConfiguration{} +} + +// WithQuantityValue sets the QuantityValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the QuantityValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithQuantityValue(value resource.Quantity) *NamedResourcesAttributeValueApplyConfiguration { + b.QuantityValue = &value + return b +} + +// WithBoolValue sets the BoolValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BoolValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithBoolValue(value bool) *NamedResourcesAttributeValueApplyConfiguration { + b.BoolValue = &value + return b +} + +// WithIntValue sets the IntValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IntValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithIntValue(value int64) *NamedResourcesAttributeValueApplyConfiguration { + b.IntValue = &value + return b +} + +// WithIntSliceValue sets the IntSliceValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IntSliceValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithIntSliceValue(value *NamedResourcesIntSliceApplyConfiguration) *NamedResourcesAttributeValueApplyConfiguration { + b.IntSliceValue = value + return b +} + +// WithStringValue sets the StringValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StringValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithStringValue(value string) *NamedResourcesAttributeValueApplyConfiguration { + b.StringValue = &value + return b +} + +// WithStringSliceValue sets the StringSliceValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StringSliceValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithStringSliceValue(value *NamedResourcesStringSliceApplyConfiguration) *NamedResourcesAttributeValueApplyConfiguration { + b.StringSliceValue = value + return b +} + +// WithVersionValue sets the VersionValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VersionValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithVersionValue(value string) *NamedResourcesAttributeValueApplyConfiguration { + b.VersionValue = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesfilter.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesfilter.go new file mode 100644 index 00000000000..e483d8622fa --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesfilter.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesFilterApplyConfiguration represents an declarative configuration of the NamedResourcesFilter type for use +// with apply. +type NamedResourcesFilterApplyConfiguration struct { + Selector *string `json:"selector,omitempty"` +} + +// NamedResourcesFilterApplyConfiguration constructs an declarative configuration of the NamedResourcesFilter type for use with +// apply. +func NamedResourcesFilter() *NamedResourcesFilterApplyConfiguration { + return &NamedResourcesFilterApplyConfiguration{} +} + +// WithSelector sets the Selector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Selector field is set to the value of the last call. +func (b *NamedResourcesFilterApplyConfiguration) WithSelector(value string) *NamedResourcesFilterApplyConfiguration { + b.Selector = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesinstance.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesinstance.go new file mode 100644 index 00000000000..4f01372e4c9 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesinstance.go @@ -0,0 +1,53 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesInstanceApplyConfiguration represents an declarative configuration of the NamedResourcesInstance type for use +// with apply. +type NamedResourcesInstanceApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Attributes []NamedResourcesAttributeApplyConfiguration `json:"attributes,omitempty"` +} + +// NamedResourcesInstanceApplyConfiguration constructs an declarative configuration of the NamedResourcesInstance type for use with +// apply. +func NamedResourcesInstance() *NamedResourcesInstanceApplyConfiguration { + return &NamedResourcesInstanceApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NamedResourcesInstanceApplyConfiguration) WithName(value string) *NamedResourcesInstanceApplyConfiguration { + b.Name = &value + return b +} + +// WithAttributes adds the given value to the Attributes field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Attributes field. +func (b *NamedResourcesInstanceApplyConfiguration) WithAttributes(values ...*NamedResourcesAttributeApplyConfiguration) *NamedResourcesInstanceApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAttributes") + } + b.Attributes = append(b.Attributes, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesintslice.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesintslice.go new file mode 100644 index 00000000000..ea00bffe516 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesintslice.go @@ -0,0 +1,41 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesIntSliceApplyConfiguration represents an declarative configuration of the NamedResourcesIntSlice type for use +// with apply. +type NamedResourcesIntSliceApplyConfiguration struct { + Ints []int64 `json:"ints,omitempty"` +} + +// NamedResourcesIntSliceApplyConfiguration constructs an declarative configuration of the NamedResourcesIntSlice type for use with +// apply. +func NamedResourcesIntSlice() *NamedResourcesIntSliceApplyConfiguration { + return &NamedResourcesIntSliceApplyConfiguration{} +} + +// WithInts adds the given value to the Ints field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Ints field. +func (b *NamedResourcesIntSliceApplyConfiguration) WithInts(values ...int64) *NamedResourcesIntSliceApplyConfiguration { + for i := range values { + b.Ints = append(b.Ints, values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesrequest.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesrequest.go new file mode 100644 index 00000000000..5adfd84ee54 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesrequest.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesRequestApplyConfiguration represents an declarative configuration of the NamedResourcesRequest type for use +// with apply. +type NamedResourcesRequestApplyConfiguration struct { + Selector *string `json:"selector,omitempty"` +} + +// NamedResourcesRequestApplyConfiguration constructs an declarative configuration of the NamedResourcesRequest type for use with +// apply. +func NamedResourcesRequest() *NamedResourcesRequestApplyConfiguration { + return &NamedResourcesRequestApplyConfiguration{} +} + +// WithSelector sets the Selector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Selector field is set to the value of the last call. +func (b *NamedResourcesRequestApplyConfiguration) WithSelector(value string) *NamedResourcesRequestApplyConfiguration { + b.Selector = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesresources.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesresources.go new file mode 100644 index 00000000000..f01ff8699aa --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesresources.go @@ -0,0 +1,44 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesResourcesApplyConfiguration represents an declarative configuration of the NamedResourcesResources type for use +// with apply. +type NamedResourcesResourcesApplyConfiguration struct { + Instances []NamedResourcesInstanceApplyConfiguration `json:"instances,omitempty"` +} + +// NamedResourcesResourcesApplyConfiguration constructs an declarative configuration of the NamedResourcesResources type for use with +// apply. +func NamedResourcesResources() *NamedResourcesResourcesApplyConfiguration { + return &NamedResourcesResourcesApplyConfiguration{} +} + +// WithInstances adds the given value to the Instances field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Instances field. +func (b *NamedResourcesResourcesApplyConfiguration) WithInstances(values ...*NamedResourcesInstanceApplyConfiguration) *NamedResourcesResourcesApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithInstances") + } + b.Instances = append(b.Instances, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesstringslice.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesstringslice.go new file mode 100644 index 00000000000..1e938735469 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesstringslice.go @@ -0,0 +1,41 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesStringSliceApplyConfiguration represents an declarative configuration of the NamedResourcesStringSlice type for use +// with apply. +type NamedResourcesStringSliceApplyConfiguration struct { + Strings []string `json:"strings,omitempty"` +} + +// NamedResourcesStringSliceApplyConfiguration constructs an declarative configuration of the NamedResourcesStringSlice type for use with +// apply. +func NamedResourcesStringSlice() *NamedResourcesStringSliceApplyConfiguration { + return &NamedResourcesStringSliceApplyConfiguration{} +} + +// WithStrings adds the given value to the Strings field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Strings field. +func (b *NamedResourcesStringSliceApplyConfiguration) WithStrings(values ...string) *NamedResourcesStringSliceApplyConfiguration { + for i := range values { + b.Strings = append(b.Strings, values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 00000000000..ea13570e335 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,272 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ResourceClaimParametersApplyConfiguration represents an declarative configuration of the ResourceClaimParameters type for use +// with apply. +type ResourceClaimParametersApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + GeneratedFrom *ResourceClaimParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"` + Shareable *bool `json:"shareable,omitempty"` + DriverRequests []DriverRequestsApplyConfiguration `json:"driverRequests,omitempty"` +} + +// ResourceClaimParameters constructs an declarative configuration of the ResourceClaimParameters type for use with +// apply. +func ResourceClaimParameters(name, namespace string) *ResourceClaimParametersApplyConfiguration { + b := &ResourceClaimParametersApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("ResourceClaimParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b +} + +// ExtractResourceClaimParameters extracts the applied configuration owned by fieldManager from +// resourceClaimParameters. If no managedFields are found in resourceClaimParameters for fieldManager, a +// ResourceClaimParametersApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// resourceClaimParameters must be a unmodified ResourceClaimParameters API object that was retrieved from the Kubernetes API. +// ExtractResourceClaimParameters provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractResourceClaimParameters(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { + return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "") +} + +// ExtractResourceClaimParametersStatus is the same as ExtractResourceClaimParameters except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractResourceClaimParametersStatus(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { + return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "status") +} + +func extractResourceClaimParameters(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string, subresource string) (*ResourceClaimParametersApplyConfiguration, error) { + b := &ResourceClaimParametersApplyConfiguration{} + err := managedfields.ExtractInto(resourceClaimParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClaimParameters"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(resourceClaimParameters.Name) + b.WithNamespace(resourceClaimParameters.Namespace) + + b.WithKind("ResourceClaimParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithKind(value string) *ResourceClaimParametersApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClaimParametersApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithName(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithGenerateName(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithNamespace(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithUID(value types.UID) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithGeneration(value int64) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ResourceClaimParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ResourceClaimParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ResourceClaimParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ResourceClaimParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ResourceClaimParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithGeneratedFrom sets the GeneratedFrom field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GeneratedFrom field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClaimParametersReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration { + b.GeneratedFrom = value + return b +} + +// WithShareable sets the Shareable field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Shareable field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithShareable(value bool) *ResourceClaimParametersApplyConfiguration { + b.Shareable = &value + return b +} + +// WithDriverRequests adds the given value to the DriverRequests field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the DriverRequests field. +func (b *ResourceClaimParametersApplyConfiguration) WithDriverRequests(values ...*DriverRequestsApplyConfiguration) *ResourceClaimParametersApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithDriverRequests") + } + b.DriverRequests = append(b.DriverRequests, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go index 724c9e88e00..364fda9d006 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go @@ -36,6 +36,7 @@ type ResourceClassApplyConfiguration struct { DriverName *string `json:"driverName,omitempty"` ParametersRef *ResourceClassParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"` SuitableNodes *corev1.NodeSelectorApplyConfiguration `json:"suitableNodes,omitempty"` + StructuredParameters *bool `json:"structuredParameters,omitempty"` } // ResourceClass constructs an declarative configuration of the ResourceClass type for use with @@ -264,3 +265,11 @@ func (b *ResourceClassApplyConfiguration) WithSuitableNodes(value *corev1.NodeSe b.SuitableNodes = value return b } + +// WithStructuredParameters sets the StructuredParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StructuredParameters field is set to the value of the last call. +func (b *ResourceClassApplyConfiguration) WithStructuredParameters(value bool) *ResourceClassApplyConfiguration { + b.StructuredParameters = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 00000000000..028d0d612d9 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,277 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ResourceClassParametersApplyConfiguration represents an declarative configuration of the ResourceClassParameters type for use +// with apply. +type ResourceClassParametersApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + GeneratedFrom *ResourceClassParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"` + VendorParameters []VendorParametersApplyConfiguration `json:"vendorParameters,omitempty"` + Filters []ResourceFilterApplyConfiguration `json:"filters,omitempty"` +} + +// ResourceClassParameters constructs an declarative configuration of the ResourceClassParameters type for use with +// apply. +func ResourceClassParameters(name, namespace string) *ResourceClassParametersApplyConfiguration { + b := &ResourceClassParametersApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("ResourceClassParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b +} + +// ExtractResourceClassParameters extracts the applied configuration owned by fieldManager from +// resourceClassParameters. If no managedFields are found in resourceClassParameters for fieldManager, a +// ResourceClassParametersApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// resourceClassParameters must be a unmodified ResourceClassParameters API object that was retrieved from the Kubernetes API. +// ExtractResourceClassParameters provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractResourceClassParameters(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { + return extractResourceClassParameters(resourceClassParameters, fieldManager, "") +} + +// ExtractResourceClassParametersStatus is the same as ExtractResourceClassParameters except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractResourceClassParametersStatus(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { + return extractResourceClassParameters(resourceClassParameters, fieldManager, "status") +} + +func extractResourceClassParameters(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string, subresource string) (*ResourceClassParametersApplyConfiguration, error) { + b := &ResourceClassParametersApplyConfiguration{} + err := managedfields.ExtractInto(resourceClassParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClassParameters"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(resourceClassParameters.Name) + b.WithNamespace(resourceClassParameters.Namespace) + + b.WithKind("ResourceClassParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithKind(value string) *ResourceClassParametersApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClassParametersApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithName(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithGenerateName(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithNamespace(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithUID(value types.UID) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithGeneration(value int64) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ResourceClassParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ResourceClassParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ResourceClassParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ResourceClassParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ResourceClassParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithGeneratedFrom sets the GeneratedFrom field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GeneratedFrom field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClassParametersReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration { + b.GeneratedFrom = value + return b +} + +// WithVendorParameters adds the given value to the VendorParameters field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the VendorParameters field. +func (b *ResourceClassParametersApplyConfiguration) WithVendorParameters(values ...*VendorParametersApplyConfiguration) *ResourceClassParametersApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithVendorParameters") + } + b.VendorParameters = append(b.VendorParameters, *values[i]) + } + return b +} + +// WithFilters adds the given value to the Filters field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Filters field. +func (b *ResourceClassParametersApplyConfiguration) WithFilters(values ...*ResourceFilterApplyConfiguration) *ResourceClassParametersApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithFilters") + } + b.Filters = append(b.Filters, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go new file mode 100644 index 00000000000..15371b44a92 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// ResourceFilterApplyConfiguration represents an declarative configuration of the ResourceFilter type for use +// with apply. +type ResourceFilterApplyConfiguration struct { + DriverName *string `json:"driverName,omitempty"` + ResourceFilterModelApplyConfiguration `json:",inline"` +} + +// ResourceFilterApplyConfiguration constructs an declarative configuration of the ResourceFilter type for use with +// apply. +func ResourceFilter() *ResourceFilterApplyConfiguration { + return &ResourceFilterApplyConfiguration{} +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *ResourceFilterApplyConfiguration) WithDriverName(value string) *ResourceFilterApplyConfiguration { + b.DriverName = &value + return b +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceFilterApplyConfiguration) WithNamedResources(value *NamedResourcesFilterApplyConfiguration) *ResourceFilterApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefiltermodel.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefiltermodel.go new file mode 100644 index 00000000000..4f8d138f71f --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefiltermodel.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// ResourceFilterModelApplyConfiguration represents an declarative configuration of the ResourceFilterModel type for use +// with apply. +type ResourceFilterModelApplyConfiguration struct { + NamedResources *NamedResourcesFilterApplyConfiguration `json:"namedResources,omitempty"` +} + +// ResourceFilterModelApplyConfiguration constructs an declarative configuration of the ResourceFilterModel type for use with +// apply. +func ResourceFilterModel() *ResourceFilterModelApplyConfiguration { + return &ResourceFilterModelApplyConfiguration{} +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceFilterModelApplyConfiguration) WithNamedResources(value *NamedResourcesFilterApplyConfiguration) *ResourceFilterModelApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go index 028cbaa1a7e..b4f3da735d0 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go @@ -21,8 +21,9 @@ package v1alpha2 // ResourceHandleApplyConfiguration represents an declarative configuration of the ResourceHandle type for use // with apply. type ResourceHandleApplyConfiguration struct { - DriverName *string `json:"driverName,omitempty"` - Data *string `json:"data,omitempty"` + DriverName *string `json:"driverName,omitempty"` + Data *string `json:"data,omitempty"` + StructuredData *StructuredResourceHandleApplyConfiguration `json:"structuredData,omitempty"` } // ResourceHandleApplyConfiguration constructs an declarative configuration of the ResourceHandle type for use with @@ -46,3 +47,11 @@ func (b *ResourceHandleApplyConfiguration) WithData(value string) *ResourceHandl b.Data = &value return b } + +// WithStructuredData sets the StructuredData field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StructuredData field is set to the value of the last call. +func (b *ResourceHandleApplyConfiguration) WithStructuredData(value *StructuredResourceHandleApplyConfiguration) *ResourceHandleApplyConfiguration { + b.StructuredData = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcemodel.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcemodel.go new file mode 100644 index 00000000000..8ad7bdf2306 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcemodel.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// ResourceModelApplyConfiguration represents an declarative configuration of the ResourceModel type for use +// with apply. +type ResourceModelApplyConfiguration struct { + NamedResources *NamedResourcesResourcesApplyConfiguration `json:"namedResources,omitempty"` +} + +// ResourceModelApplyConfiguration constructs an declarative configuration of the ResourceModel type for use with +// apply. +func ResourceModel() *ResourceModelApplyConfiguration { + return &ResourceModelApplyConfiguration{} +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceModelApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *ResourceModelApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go new file mode 100644 index 00000000000..0243d06f894 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// ResourceRequestApplyConfiguration represents an declarative configuration of the ResourceRequest type for use +// with apply. +type ResourceRequestApplyConfiguration struct { + VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"` + ResourceRequestModelApplyConfiguration `json:",inline"` +} + +// ResourceRequestApplyConfiguration constructs an declarative configuration of the ResourceRequest type for use with +// apply. +func ResourceRequest() *ResourceRequestApplyConfiguration { + return &ResourceRequestApplyConfiguration{} +} + +// WithVendorParameters sets the VendorParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorParameters field is set to the value of the last call. +func (b *ResourceRequestApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *ResourceRequestApplyConfiguration { + b.VendorParameters = &value + return b +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceRequestApplyConfiguration) WithNamedResources(value *NamedResourcesRequestApplyConfiguration) *ResourceRequestApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequestmodel.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequestmodel.go new file mode 100644 index 00000000000..35bd1d88fea --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequestmodel.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// ResourceRequestModelApplyConfiguration represents an declarative configuration of the ResourceRequestModel type for use +// with apply. +type ResourceRequestModelApplyConfiguration struct { + NamedResources *NamedResourcesRequestApplyConfiguration `json:"namedResources,omitempty"` +} + +// ResourceRequestModelApplyConfiguration constructs an declarative configuration of the ResourceRequestModel type for use with +// apply. +func ResourceRequestModel() *ResourceRequestModelApplyConfiguration { + return &ResourceRequestModelApplyConfiguration{} +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceRequestModelApplyConfiguration) WithNamedResources(value *NamedResourcesRequestApplyConfiguration) *ResourceRequestModelApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceslice.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceslice.go new file mode 100644 index 00000000000..ff737ce672e --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceslice.go @@ -0,0 +1,265 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ResourceSliceApplyConfiguration represents an declarative configuration of the ResourceSlice type for use +// with apply. +type ResourceSliceApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + NodeName *string `json:"nodeName,omitempty"` + DriverName *string `json:"driverName,omitempty"` + ResourceModelApplyConfiguration `json:",inline"` +} + +// ResourceSlice constructs an declarative configuration of the ResourceSlice type for use with +// apply. +func ResourceSlice(name string) *ResourceSliceApplyConfiguration { + b := &ResourceSliceApplyConfiguration{} + b.WithName(name) + b.WithKind("ResourceSlice") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b +} + +// ExtractResourceSlice extracts the applied configuration owned by fieldManager from +// resourceSlice. If no managedFields are found in resourceSlice for fieldManager, a +// ResourceSliceApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// resourceSlice must be a unmodified ResourceSlice API object that was retrieved from the Kubernetes API. +// ExtractResourceSlice provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractResourceSlice(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) { + return extractResourceSlice(resourceSlice, fieldManager, "") +} + +// ExtractResourceSliceStatus is the same as ExtractResourceSlice except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractResourceSliceStatus(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) { + return extractResourceSlice(resourceSlice, fieldManager, "status") +} + +func extractResourceSlice(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string, subresource string) (*ResourceSliceApplyConfiguration, error) { + b := &ResourceSliceApplyConfiguration{} + err := managedfields.ExtractInto(resourceSlice, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceSlice"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(resourceSlice.Name) + + b.WithKind("ResourceSlice") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithKind(value string) *ResourceSliceApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithAPIVersion(value string) *ResourceSliceApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithName(value string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithGenerateName(value string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithNamespace(value string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithUID(value types.UID) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithResourceVersion(value string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithGeneration(value int64) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ResourceSliceApplyConfiguration) WithLabels(entries map[string]string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ResourceSliceApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ResourceSliceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ResourceSliceApplyConfiguration) WithFinalizers(values ...string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ResourceSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithNodeName sets the NodeName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeName field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithNodeName(value string) *ResourceSliceApplyConfiguration { + b.NodeName = &value + return b +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithDriverName(value string) *ResourceSliceApplyConfiguration { + b.DriverName = &value + return b +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *ResourceSliceApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go new file mode 100644 index 00000000000..e6efcbfef3c --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go @@ -0,0 +1,75 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// StructuredResourceHandleApplyConfiguration represents an declarative configuration of the StructuredResourceHandle type for use +// with apply. +type StructuredResourceHandleApplyConfiguration struct { + VendorClassParameters *runtime.RawExtension `json:"vendorClassParameters,omitempty"` + VendorClaimParameters *runtime.RawExtension `json:"vendorClaimParameters,omitempty"` + NodeName *string `json:"nodeName,omitempty"` + Results []DriverAllocationResultApplyConfiguration `json:"results,omitempty"` +} + +// StructuredResourceHandleApplyConfiguration constructs an declarative configuration of the StructuredResourceHandle type for use with +// apply. +func StructuredResourceHandle() *StructuredResourceHandleApplyConfiguration { + return &StructuredResourceHandleApplyConfiguration{} +} + +// WithVendorClassParameters sets the VendorClassParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorClassParameters field is set to the value of the last call. +func (b *StructuredResourceHandleApplyConfiguration) WithVendorClassParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration { + b.VendorClassParameters = &value + return b +} + +// WithVendorClaimParameters sets the VendorClaimParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorClaimParameters field is set to the value of the last call. +func (b *StructuredResourceHandleApplyConfiguration) WithVendorClaimParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration { + b.VendorClaimParameters = &value + return b +} + +// WithNodeName sets the NodeName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeName field is set to the value of the last call. +func (b *StructuredResourceHandleApplyConfiguration) WithNodeName(value string) *StructuredResourceHandleApplyConfiguration { + b.NodeName = &value + return b +} + +// WithResults adds the given value to the Results field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Results field. +func (b *StructuredResourceHandleApplyConfiguration) WithResults(values ...*DriverAllocationResultApplyConfiguration) *StructuredResourceHandleApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithResults") + } + b.Results = append(b.Results, *values[i]) + } + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go new file mode 100644 index 00000000000..f7a8ff9ecef --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// VendorParametersApplyConfiguration represents an declarative configuration of the VendorParameters type for use +// with apply. +type VendorParametersApplyConfiguration struct { + DriverName *string `json:"driverName,omitempty"` + Parameters *runtime.RawExtension `json:"parameters,omitempty"` +} + +// VendorParametersApplyConfiguration constructs an declarative configuration of the VendorParameters type for use with +// apply. +func VendorParameters() *VendorParametersApplyConfiguration { + return &VendorParametersApplyConfiguration{} +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *VendorParametersApplyConfiguration) WithDriverName(value string) *VendorParametersApplyConfiguration { + b.DriverName = &value + return b +} + +// WithParameters sets the Parameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Parameters field is set to the value of the last call. +func (b *VendorParametersApplyConfiguration) WithParameters(value runtime.RawExtension) *VendorParametersApplyConfiguration { + b.Parameters = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/groupversionresource.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/groupversionresource.go new file mode 100644 index 00000000000..c733ac5c04b --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/groupversionresource.go @@ -0,0 +1,57 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// GroupVersionResourceApplyConfiguration represents an declarative configuration of the GroupVersionResource type for use +// with apply. +type GroupVersionResourceApplyConfiguration struct { + Group *string `json:"group,omitempty"` + Version *string `json:"version,omitempty"` + Resource *string `json:"resource,omitempty"` +} + +// GroupVersionResourceApplyConfiguration constructs an declarative configuration of the GroupVersionResource type for use with +// apply. +func GroupVersionResource() *GroupVersionResourceApplyConfiguration { + return &GroupVersionResourceApplyConfiguration{} +} + +// WithGroup sets the Group field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Group field is set to the value of the last call. +func (b *GroupVersionResourceApplyConfiguration) WithGroup(value string) *GroupVersionResourceApplyConfiguration { + b.Group = &value + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *GroupVersionResourceApplyConfiguration) WithVersion(value string) *GroupVersionResourceApplyConfiguration { + b.Version = &value + return b +} + +// WithResource sets the Resource field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resource field is set to the value of the last call. +func (b *GroupVersionResourceApplyConfiguration) WithResource(value string) *GroupVersionResourceApplyConfiguration { + b.Resource = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/migrationcondition.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/migrationcondition.go new file mode 100644 index 00000000000..d0f863446ee --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/migrationcondition.go @@ -0,0 +1,81 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" + v1alpha1 "k8s.io/api/storagemigration/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// MigrationConditionApplyConfiguration represents an declarative configuration of the MigrationCondition type for use +// with apply. +type MigrationConditionApplyConfiguration struct { + Type *v1alpha1.MigrationConditionType `json:"type,omitempty"` + Status *v1.ConditionStatus `json:"status,omitempty"` + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` +} + +// MigrationConditionApplyConfiguration constructs an declarative configuration of the MigrationCondition type for use with +// apply. +func MigrationCondition() *MigrationConditionApplyConfiguration { + return &MigrationConditionApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *MigrationConditionApplyConfiguration) WithType(value v1alpha1.MigrationConditionType) *MigrationConditionApplyConfiguration { + b.Type = &value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *MigrationConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *MigrationConditionApplyConfiguration { + b.Status = &value + return b +} + +// WithLastUpdateTime sets the LastUpdateTime field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastUpdateTime field is set to the value of the last call. +func (b *MigrationConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *MigrationConditionApplyConfiguration { + b.LastUpdateTime = &value + return b +} + +// WithReason sets the Reason field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Reason field is set to the value of the last call. +func (b *MigrationConditionApplyConfiguration) WithReason(value string) *MigrationConditionApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessage sets the Message field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Message field is set to the value of the last call. +func (b *MigrationConditionApplyConfiguration) WithMessage(value string) *MigrationConditionApplyConfiguration { + b.Message = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigration.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigration.go new file mode 100644 index 00000000000..cc57b2b1268 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigration.go @@ -0,0 +1,256 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// StorageVersionMigrationApplyConfiguration represents an declarative configuration of the StorageVersionMigration type for use +// with apply. +type StorageVersionMigrationApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *StorageVersionMigrationSpecApplyConfiguration `json:"spec,omitempty"` + Status *StorageVersionMigrationStatusApplyConfiguration `json:"status,omitempty"` +} + +// StorageVersionMigration constructs an declarative configuration of the StorageVersionMigration type for use with +// apply. +func StorageVersionMigration(name string) *StorageVersionMigrationApplyConfiguration { + b := &StorageVersionMigrationApplyConfiguration{} + b.WithName(name) + b.WithKind("StorageVersionMigration") + b.WithAPIVersion("storagemigration.k8s.io/v1alpha1") + return b +} + +// ExtractStorageVersionMigration extracts the applied configuration owned by fieldManager from +// storageVersionMigration. If no managedFields are found in storageVersionMigration for fieldManager, a +// StorageVersionMigrationApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// storageVersionMigration must be a unmodified StorageVersionMigration API object that was retrieved from the Kubernetes API. +// ExtractStorageVersionMigration provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractStorageVersionMigration(storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) { + return extractStorageVersionMigration(storageVersionMigration, fieldManager, "") +} + +// ExtractStorageVersionMigrationStatus is the same as ExtractStorageVersionMigration except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractStorageVersionMigrationStatus(storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) { + return extractStorageVersionMigration(storageVersionMigration, fieldManager, "status") +} + +func extractStorageVersionMigration(storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string, subresource string) (*StorageVersionMigrationApplyConfiguration, error) { + b := &StorageVersionMigrationApplyConfiguration{} + err := managedfields.ExtractInto(storageVersionMigration, internal.Parser().Type("io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(storageVersionMigration.Name) + + b.WithKind("StorageVersionMigration") + b.WithAPIVersion("storagemigration.k8s.io/v1alpha1") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithKind(value string) *StorageVersionMigrationApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithAPIVersion(value string) *StorageVersionMigrationApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithName(value string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithGenerateName(value string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithNamespace(value string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithUID(value types.UID) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithResourceVersion(value string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithGeneration(value int64) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *StorageVersionMigrationApplyConfiguration) WithLabels(entries map[string]string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *StorageVersionMigrationApplyConfiguration) WithAnnotations(entries map[string]string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *StorageVersionMigrationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *StorageVersionMigrationApplyConfiguration) WithFinalizers(values ...string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *StorageVersionMigrationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithSpec(value *StorageVersionMigrationSpecApplyConfiguration) *StorageVersionMigrationApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithStatus(value *StorageVersionMigrationStatusApplyConfiguration) *StorageVersionMigrationApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationspec.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationspec.go new file mode 100644 index 00000000000..6c7c5b2645f --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationspec.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// StorageVersionMigrationSpecApplyConfiguration represents an declarative configuration of the StorageVersionMigrationSpec type for use +// with apply. +type StorageVersionMigrationSpecApplyConfiguration struct { + Resource *GroupVersionResourceApplyConfiguration `json:"resource,omitempty"` + ContinueToken *string `json:"continueToken,omitempty"` +} + +// StorageVersionMigrationSpecApplyConfiguration constructs an declarative configuration of the StorageVersionMigrationSpec type for use with +// apply. +func StorageVersionMigrationSpec() *StorageVersionMigrationSpecApplyConfiguration { + return &StorageVersionMigrationSpecApplyConfiguration{} +} + +// WithResource sets the Resource field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resource field is set to the value of the last call. +func (b *StorageVersionMigrationSpecApplyConfiguration) WithResource(value *GroupVersionResourceApplyConfiguration) *StorageVersionMigrationSpecApplyConfiguration { + b.Resource = value + return b +} + +// WithContinueToken sets the ContinueToken field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ContinueToken field is set to the value of the last call. +func (b *StorageVersionMigrationSpecApplyConfiguration) WithContinueToken(value string) *StorageVersionMigrationSpecApplyConfiguration { + b.ContinueToken = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationstatus.go b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationstatus.go new file mode 100644 index 00000000000..b8d397548a5 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationstatus.go @@ -0,0 +1,53 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// StorageVersionMigrationStatusApplyConfiguration represents an declarative configuration of the StorageVersionMigrationStatus type for use +// with apply. +type StorageVersionMigrationStatusApplyConfiguration struct { + Conditions []MigrationConditionApplyConfiguration `json:"conditions,omitempty"` + ResourceVersion *string `json:"resourceVersion,omitempty"` +} + +// StorageVersionMigrationStatusApplyConfiguration constructs an declarative configuration of the StorageVersionMigrationStatus type for use with +// apply. +func StorageVersionMigrationStatus() *StorageVersionMigrationStatusApplyConfiguration { + return &StorageVersionMigrationStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *StorageVersionMigrationStatusApplyConfiguration) WithConditions(values ...*MigrationConditionApplyConfiguration) *StorageVersionMigrationStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *StorageVersionMigrationStatusApplyConfiguration) WithResourceVersion(value string) *StorageVersionMigrationStatusApplyConfiguration { + b.ResourceVersion = &value + return b +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/discovery/aggregated_discovery.go b/pkg/k8s/vendor/k8s.io/client-go/discovery/aggregated_discovery.go index f72c42051b9..f5eaaedab3a 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/discovery/aggregated_discovery.go +++ b/pkg/k8s/vendor/k8s.io/client-go/discovery/aggregated_discovery.go @@ -19,7 +19,8 @@ package discovery import ( "fmt" - apidiscovery "k8s.io/api/apidiscovery/v2beta1" + apidiscovery "k8s.io/api/apidiscovery/v2" + apidiscoveryv2beta1 "k8s.io/api/apidiscovery/v2beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -154,3 +155,124 @@ func convertAPISubresource(parent metav1.APIResource, in apidiscovery.APISubreso result.Verbs = in.Verbs return result, nil } + +// Please note the functions below will be removed in v1.33. They facilitate conversion +// between the deprecated type apidiscoveryv2beta1.APIGroupDiscoveryList. + +// SplitGroupsAndResourcesV2Beta1 transforms "aggregated" discovery top-level structure into +// the previous "unaggregated" discovery groups and resources. +// Deprecated: Please use SplitGroupsAndResources +func SplitGroupsAndResourcesV2Beta1(aggregatedGroups apidiscoveryv2beta1.APIGroupDiscoveryList) ( + *metav1.APIGroupList, + map[schema.GroupVersion]*metav1.APIResourceList, + map[schema.GroupVersion]error) { + // Aggregated group list will contain the entirety of discovery, including + // groups, versions, and resources. GroupVersions marked "stale" are failed. + groups := []*metav1.APIGroup{} + failedGVs := map[schema.GroupVersion]error{} + resourcesByGV := map[schema.GroupVersion]*metav1.APIResourceList{} + for _, aggGroup := range aggregatedGroups.Items { + group, resources, failed := convertAPIGroupv2beta1(aggGroup) + groups = append(groups, group) + for gv, resourceList := range resources { + resourcesByGV[gv] = resourceList + } + for gv, err := range failed { + failedGVs[gv] = err + } + } + // Transform slice of groups to group list before returning. + groupList := &metav1.APIGroupList{} + groupList.Groups = make([]metav1.APIGroup, 0, len(groups)) + for _, group := range groups { + groupList.Groups = append(groupList.Groups, *group) + } + return groupList, resourcesByGV, failedGVs +} + +// convertAPIGroupv2beta1 tranforms an "aggregated" APIGroupDiscovery to an "legacy" APIGroup, +// also returning the map of APIResourceList for resources within GroupVersions. +func convertAPIGroupv2beta1(g apidiscoveryv2beta1.APIGroupDiscovery) ( + *metav1.APIGroup, + map[schema.GroupVersion]*metav1.APIResourceList, + map[schema.GroupVersion]error) { + // Iterate through versions to convert to group and resources. + group := &metav1.APIGroup{} + gvResources := map[schema.GroupVersion]*metav1.APIResourceList{} + failedGVs := map[schema.GroupVersion]error{} + group.Name = g.ObjectMeta.Name + for _, v := range g.Versions { + gv := schema.GroupVersion{Group: g.Name, Version: v.Version} + if v.Freshness == apidiscoveryv2beta1.DiscoveryFreshnessStale { + failedGVs[gv] = StaleGroupVersionError{gv: gv} + continue + } + version := metav1.GroupVersionForDiscovery{} + version.GroupVersion = gv.String() + version.Version = v.Version + group.Versions = append(group.Versions, version) + // PreferredVersion is first non-stale Version + if group.PreferredVersion == (metav1.GroupVersionForDiscovery{}) { + group.PreferredVersion = version + } + resourceList := &metav1.APIResourceList{} + resourceList.GroupVersion = gv.String() + for _, r := range v.Resources { + resource, err := convertAPIResourcev2beta1(r) + if err == nil { + resourceList.APIResources = append(resourceList.APIResources, resource) + } + // Subresources field in new format get transformed into full APIResources. + // It is possible a partial result with an error was returned to be used + // as the parent resource for the subresource. + for _, subresource := range r.Subresources { + sr, err := convertAPISubresourcev2beta1(resource, subresource) + if err == nil { + resourceList.APIResources = append(resourceList.APIResources, sr) + } + } + } + gvResources[gv] = resourceList + } + return group, gvResources, failedGVs +} + +// convertAPIResource tranforms a APIResourceDiscovery to an APIResource. We are +// resilient to missing GVK, since this resource might be the parent resource +// for a subresource. If the parent is missing a GVK, it is not returned in +// discovery, and the subresource MUST have the GVK. +func convertAPIResourcev2beta1(in apidiscoveryv2beta1.APIResourceDiscovery) (metav1.APIResource, error) { + result := metav1.APIResource{ + Name: in.Resource, + SingularName: in.SingularResource, + Namespaced: in.Scope == apidiscoveryv2beta1.ScopeNamespace, + Verbs: in.Verbs, + ShortNames: in.ShortNames, + Categories: in.Categories, + } + // Can return partial result with error, which can be the parent for a + // subresource. Do not add this result to the returned discovery resources. + if in.ResponseKind == nil || (*in.ResponseKind) == emptyKind { + return result, fmt.Errorf("discovery resource %s missing GVK", in.Resource) + } + result.Group = in.ResponseKind.Group + result.Version = in.ResponseKind.Version + result.Kind = in.ResponseKind.Kind + return result, nil +} + +// convertAPISubresource tranforms a APISubresourceDiscovery to an APIResource. +func convertAPISubresourcev2beta1(parent metav1.APIResource, in apidiscoveryv2beta1.APISubresourceDiscovery) (metav1.APIResource, error) { + result := metav1.APIResource{} + if in.ResponseKind == nil || (*in.ResponseKind) == emptyKind { + return result, fmt.Errorf("subresource %s/%s missing GVK", parent.Name, in.Subresource) + } + result.Name = fmt.Sprintf("%s/%s", parent.Name, in.Subresource) + result.SingularName = parent.SingularName + result.Namespaced = parent.Namespaced + result.Group = in.ResponseKind.Group + result.Version = in.ResponseKind.Version + result.Kind = in.ResponseKind.Kind + result.Verbs = in.Verbs + return result, nil +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/discovery/discovery_client.go b/pkg/k8s/vendor/k8s.io/client-go/discovery/discovery_client.go index df0e0f9974e..ef14fee5f09 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/discovery/discovery_client.go +++ b/pkg/k8s/vendor/k8s.io/client-go/discovery/discovery_client.go @@ -33,7 +33,8 @@ import ( "github.com/golang/protobuf/proto" openapi_v2 "github.com/google/gnostic-models/openapiv2" - apidiscovery "k8s.io/api/apidiscovery/v2beta1" + apidiscoveryv2 "k8s.io/api/apidiscovery/v2" + apidiscoveryv2beta1 "k8s.io/api/apidiscovery/v2beta1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -64,12 +65,14 @@ const ( // MUST be ordered (g, v, as) for server in "Accept" header (BUT we are resilient // to ordering when comparing returned values in "Content-Type" header). AcceptV2Beta1 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList" + AcceptV2 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList" // Prioritize aggregated discovery by placing first in the order of discovery accept types. - acceptDiscoveryFormats = AcceptV2Beta1 + "," + AcceptV1 + acceptDiscoveryFormats = AcceptV2 + "," + AcceptV2Beta1 + "," + AcceptV1 ) // Aggregated discovery content-type GVK. var v2Beta1GVK = schema.GroupVersionKind{Group: "apidiscovery.k8s.io", Version: "v2beta1", Kind: "APIGroupDiscoveryList"} +var v2GVK = schema.GroupVersionKind{Group: "apidiscovery.k8s.io", Version: "v2", Kind: "APIGroupDiscoveryList"} // DiscoveryInterface holds the methods that discover server-supported API groups, // versions and resources. @@ -265,13 +268,20 @@ func (d *DiscoveryClient) downloadLegacy() ( var resourcesByGV map[schema.GroupVersion]*metav1.APIResourceList // Based on the content-type server responded with: aggregated or unaggregated. - if isGVK, _ := ContentTypeIsGVK(responseContentType, v2Beta1GVK); isGVK { - var aggregatedDiscovery apidiscovery.APIGroupDiscoveryList + if isGVK, _ := ContentTypeIsGVK(responseContentType, v2GVK); isGVK { + var aggregatedDiscovery apidiscoveryv2.APIGroupDiscoveryList err = json.Unmarshal(body, &aggregatedDiscovery) if err != nil { return nil, nil, nil, err } apiGroupList, resourcesByGV, failedGVs = SplitGroupsAndResources(aggregatedDiscovery) + } else if isGVK, _ := ContentTypeIsGVK(responseContentType, v2Beta1GVK); isGVK { + var aggregatedDiscovery apidiscoveryv2beta1.APIGroupDiscoveryList + err = json.Unmarshal(body, &aggregatedDiscovery) + if err != nil { + return nil, nil, nil, err + } + apiGroupList, resourcesByGV, failedGVs = SplitGroupsAndResourcesV2Beta1(aggregatedDiscovery) } else { // Default is unaggregated discovery v1. var v metav1.APIVersions @@ -317,13 +327,20 @@ func (d *DiscoveryClient) downloadAPIs() ( failedGVs := map[schema.GroupVersion]error{} var resourcesByGV map[schema.GroupVersion]*metav1.APIResourceList // Based on the content-type server responded with: aggregated or unaggregated. - if isGVK, _ := ContentTypeIsGVK(responseContentType, v2Beta1GVK); isGVK { - var aggregatedDiscovery apidiscovery.APIGroupDiscoveryList + if isGVK, _ := ContentTypeIsGVK(responseContentType, v2GVK); isGVK { + var aggregatedDiscovery apidiscoveryv2.APIGroupDiscoveryList err = json.Unmarshal(body, &aggregatedDiscovery) if err != nil { return nil, nil, nil, err } apiGroupList, resourcesByGV, failedGVs = SplitGroupsAndResources(aggregatedDiscovery) + } else if isGVK, _ := ContentTypeIsGVK(responseContentType, v2Beta1GVK); isGVK { + var aggregatedDiscovery apidiscoveryv2beta1.APIGroupDiscoveryList + err = json.Unmarshal(body, &aggregatedDiscovery) + if err != nil { + return nil, nil, nil, err + } + apiGroupList, resourcesByGV, failedGVs = SplitGroupsAndResourcesV2Beta1(aggregatedDiscovery) } else { // Default is unaggregated discovery v1. err = json.Unmarshal(body, apiGroupList) diff --git a/pkg/k8s/vendor/k8s.io/client-go/features/envvar.go b/pkg/k8s/vendor/k8s.io/client-go/features/envvar.go new file mode 100644 index 00000000000..f9edfdf0d91 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/features/envvar.go @@ -0,0 +1,138 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 ( + "fmt" + "os" + "strconv" + "sync" + "sync/atomic" + + "k8s.io/apimachinery/pkg/util/naming" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/klog/v2" +) + +// internalPackages are packages that ignored when creating a name for featureGates. These packages are in the common +// call chains, so they'd be unhelpful as names. +var internalPackages = []string{"k8s.io/client-go/features/envvar.go"} + +var _ Gates = &envVarFeatureGates{} + +// newEnvVarFeatureGates creates a feature gate that allows for registration +// of features and checking if the features are enabled. +// +// On the first call to Enabled, the effective state of all known features is loaded from +// environment variables. The environment variable read for a given feature is formed by +// concatenating the prefix "KUBE_FEATURE_" with the feature's name. +// +// For example, if you have a feature named "MyFeature" +// setting an environmental variable "KUBE_FEATURE_MyFeature" +// will allow you to configure the state of that feature. +// +// Please note that environmental variables can only be set to the boolean value. +// Incorrect values will be ignored and logged. +func newEnvVarFeatureGates(features map[Feature]FeatureSpec) *envVarFeatureGates { + known := map[Feature]FeatureSpec{} + for name, spec := range features { + known[name] = spec + } + + fg := &envVarFeatureGates{ + callSiteName: naming.GetNameFromCallsite(internalPackages...), + known: known, + } + fg.enabled.Store(map[Feature]bool{}) + + return fg +} + +// envVarFeatureGates implements Gates and allows for feature registration. +type envVarFeatureGates struct { + // callSiteName holds the name of the file + // that created this instance + callSiteName string + + // readEnvVarsOnce guards reading environmental variables + readEnvVarsOnce sync.Once + + // known holds known feature gates + known map[Feature]FeatureSpec + + // enabled holds a map[Feature]bool + // with values explicitly set via env var + enabled atomic.Value + + // readEnvVars holds the boolean value which + // indicates whether readEnvVarsOnce has been called. + readEnvVars atomic.Bool +} + +// Enabled returns true if the key is enabled. If the key is not known, this call will panic. +func (f *envVarFeatureGates) Enabled(key Feature) bool { + if v, ok := f.getEnabledMapFromEnvVar()[key]; ok { + return v + } + if v, ok := f.known[key]; ok { + return v.Default + } + panic(fmt.Errorf("feature %q is not registered in FeatureGates %q", key, f.callSiteName)) +} + +// getEnabledMapFromEnvVar will fill the enabled map on the first call. +// This is the only time a known feature can be set to a value +// read from the corresponding environmental variable. +func (f *envVarFeatureGates) getEnabledMapFromEnvVar() map[Feature]bool { + f.readEnvVarsOnce.Do(func() { + featureGatesState := map[Feature]bool{} + for feature, featureSpec := range f.known { + featureState, featureStateSet := os.LookupEnv(fmt.Sprintf("KUBE_FEATURE_%s", feature)) + if !featureStateSet { + continue + } + boolVal, boolErr := strconv.ParseBool(featureState) + switch { + case boolErr != nil: + utilruntime.HandleError(fmt.Errorf("cannot set feature gate %q to %q, due to %v", feature, featureState, boolErr)) + case featureSpec.LockToDefault: + if boolVal != featureSpec.Default { + utilruntime.HandleError(fmt.Errorf("cannot set feature gate %q to %q, feature is locked to %v", feature, featureState, featureSpec.Default)) + break + } + featureGatesState[feature] = featureSpec.Default + default: + featureGatesState[feature] = boolVal + } + } + f.enabled.Store(featureGatesState) + f.readEnvVars.Store(true) + + for feature, featureSpec := range f.known { + if featureState, ok := featureGatesState[feature]; ok { + klog.V(1).InfoS("Feature gate updated state", "feature", feature, "enabled", featureState) + continue + } + klog.V(1).InfoS("Feature gate default state", "feature", feature, "enabled", featureSpec.Default) + } + }) + return f.enabled.Load().(map[Feature]bool) +} + +func (f *envVarFeatureGates) hasAlreadyReadEnvVar() bool { + return f.readEnvVars.Load() +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/features/features.go b/pkg/k8s/vendor/k8s.io/client-go/features/features.go new file mode 100644 index 00000000000..afb67f509eb --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/features/features.go @@ -0,0 +1,143 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 ( + "errors" + + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "sync/atomic" +) + +// NOTE: types Feature, FeatureSpec, prerelease (and its values) +// were duplicated from the component-base repository +// +// for more information please refer to https://docs.google.com/document/d/1g9BGCRw-7ucUxO6OtCWbb3lfzUGA_uU9178wLdXAIfs + +const ( + // Values for PreRelease. + Alpha = prerelease("ALPHA") + Beta = prerelease("BETA") + GA = prerelease("") + + // Deprecated + Deprecated = prerelease("DEPRECATED") +) + +type prerelease string + +type Feature string + +type FeatureSpec struct { + // Default is the default enablement state for the feature + Default bool + // LockToDefault indicates that the feature is locked to its default and cannot be changed + LockToDefault bool + // PreRelease indicates the maturity level of the feature + PreRelease prerelease +} + +// Gates indicates whether a given feature is enabled or not. +type Gates interface { + // Enabled returns true if the key is enabled. + Enabled(key Feature) bool +} + +// Registry represents an external feature gates registry. +type Registry interface { + // Add adds existing feature gates to the provided registry. + // + // As of today, this method is used by AddFeaturesToExistingFeatureGates and + // ReplaceFeatureGates to take control of the features exposed by this library. + Add(map[Feature]FeatureSpec) error +} + +// FeatureGates returns the feature gates exposed by this library. +// +// By default, only the default features gates will be returned. +// The default implementation allows controlling the features +// via environmental variables. +// For example, if you have a feature named "MyFeature" +// setting an environmental variable "KUBE_FEATURE_MyFeature" +// will allow you to configure the state of that feature. +// +// Please note that the actual set of the feature gates +// might be overwritten by calling ReplaceFeatureGates method. +func FeatureGates() Gates { + return featureGates.Load().(*featureGatesWrapper).Gates +} + +// AddFeaturesToExistingFeatureGates adds the default feature gates to the provided registry. +// Usually this function is combined with ReplaceFeatureGates to take control of the +// features exposed by this library. +func AddFeaturesToExistingFeatureGates(registry Registry) error { + return registry.Add(defaultKubernetesFeatureGates) +} + +// ReplaceFeatureGates overwrites the default implementation of the feature gates +// used by this library. +// +// Useful for binaries that would like to have full control of the features +// exposed by this library, such as allowing consumers of a binary +// to interact with the features via a command line flag. +// +// For example: +// +// // first, register client-go's features to your registry. +// clientgofeaturegate.AddFeaturesToExistingFeatureGates(utilfeature.DefaultMutableFeatureGate) +// // then replace client-go's feature gates implementation with your implementation +// clientgofeaturegate.ReplaceFeatureGates(utilfeature.DefaultMutableFeatureGate) +func ReplaceFeatureGates(newFeatureGates Gates) { + if replaceFeatureGatesWithWarningIndicator(newFeatureGates) { + utilruntime.HandleError(errors.New("the default feature gates implementation has already been used and now it's being overwritten. This might lead to unexpected behaviour. Check your initialization order")) + } +} + +func replaceFeatureGatesWithWarningIndicator(newFeatureGates Gates) bool { + shouldProduceWarning := false + + if defaultFeatureGates, ok := FeatureGates().(*envVarFeatureGates); ok { + if defaultFeatureGates.hasAlreadyReadEnvVar() { + shouldProduceWarning = true + } + } + wrappedFeatureGates := &featureGatesWrapper{newFeatureGates} + featureGates.Store(wrappedFeatureGates) + + return shouldProduceWarning +} + +func init() { + envVarGates := newEnvVarFeatureGates(defaultKubernetesFeatureGates) + + wrappedFeatureGates := &featureGatesWrapper{envVarGates} + featureGates.Store(wrappedFeatureGates) +} + +// featureGatesWrapper a thin wrapper to satisfy featureGates variable (atomic.Value). +// That is, all calls to Store for a given Value must use values of the same concrete type. +type featureGatesWrapper struct { + Gates +} + +var ( + // featureGates is a shared global FeatureGates. + // + // Top-level commands/options setup that needs to modify this feature gates + // should use AddFeaturesToExistingFeatureGates followed by ReplaceFeatureGates. + featureGates = &atomic.Value{} +) diff --git a/pkg/k8s/vendor/k8s.io/client-go/features/known_features.go b/pkg/k8s/vendor/k8s.io/client-go/features/known_features.go new file mode 100644 index 00000000000..0c972a46fd5 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/features/known_features.go @@ -0,0 +1,54 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 + +const ( + // Every feature gate should add method here following this template: + // + // // owner: @username + // // alpha: v1.4 + // MyFeature featuregate.Feature = "MyFeature" + // + // Feature gates should be listed in alphabetical, case-sensitive + // (upper before any lower case character) order. This reduces the risk + // of code conflicts because changes are more likely to be scattered + // across the file. + + // owner: @p0lyn0mial + // beta: v1.30 + // + // Allow the client to get a stream of individual items instead of chunking from the server. + // + // NOTE: + // The feature is disabled in Beta by default because + // it will only be turned on for selected control plane component(s). + WatchListClient Feature = "WatchListClient" + + // owner: @nilekhc + // alpha: v1.30 + InformerResourceVersion Feature = "InformerResourceVersion" +) + +// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys. +// +// To add a new feature, define a key for it above and add it here. +// After registering with the binary, the features are, by default, controllable using environment variables. +// For more details, please see envVarFeatureGates implementation. +var defaultKubernetesFeatureGates = map[Feature]FeatureSpec{ + WatchListClient: {Default: false, PreRelease: Beta}, + InformerResourceVersion: {Default: false, PreRelease: Alpha}, +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/clientset.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/clientset.go index a0095d086fd..eaa206ff65d 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/clientset.go +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/clientset.go @@ -74,6 +74,7 @@ import ( 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" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" ) @@ -131,6 +132,7 @@ type Interface interface { StorageV1beta1() storagev1beta1.StorageV1beta1Interface StorageV1() storagev1.StorageV1Interface StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface + StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface } // Clientset contains the clients for groups. @@ -187,6 +189,7 @@ type Clientset struct { storageV1beta1 *storagev1beta1.StorageV1beta1Client storageV1 *storagev1.StorageV1Client storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client + storagemigrationV1alpha1 *storagemigrationv1alpha1.StoragemigrationV1alpha1Client } // AdmissionregistrationV1 retrieves the AdmissionregistrationV1Client @@ -444,6 +447,11 @@ func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { return c.storageV1alpha1 } +// StoragemigrationV1alpha1 retrieves the StoragemigrationV1alpha1Client +func (c *Clientset) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + return c.storagemigrationV1alpha1 +} + // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -692,6 +700,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } + cs.storagemigrationV1alpha1, err = storagemigrationv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -764,6 +776,7 @@ func New(c rest.Interface) *Clientset { cs.storageV1beta1 = storagev1beta1.New(c) cs.storageV1 = storagev1.New(c) cs.storageV1alpha1 = storagev1alpha1.New(c) + cs.storagemigrationV1alpha1 = storagemigrationv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/doc.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/doc.go index 9cef4242f2f..e052f81b852 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/doc.go +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package kubernetes holds packages which implement a clientset for Kubernetes // APIs. -package kubernetes +package kubernetes // import "k8s.io/client-go/kubernetes" diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/scheme/register.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/scheme/register.go index f44055fbfc7..8ebfb7cea56 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/scheme/register.go +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/scheme/register.go @@ -70,6 +70,7 @@ import ( storagev1 "k8s.io/api/storage/v1" storagev1alpha1 "k8s.io/api/storage/v1alpha1" storagev1beta1 "k8s.io/api/storage/v1beta1" + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -132,6 +133,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ storagev1beta1.AddToScheme, storagev1.AddToScheme, storagev1alpha1.AddToScheme, + storagemigrationv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go index 10848bed17a..a81b2b68292 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go @@ -29,6 +29,8 @@ import ( type AdmissionregistrationV1Interface interface { RESTClient() rest.Interface MutatingWebhookConfigurationsGetter + ValidatingAdmissionPoliciesGetter + ValidatingAdmissionPolicyBindingsGetter ValidatingWebhookConfigurationsGetter } @@ -41,6 +43,14 @@ func (c *AdmissionregistrationV1Client) MutatingWebhookConfigurations() Mutating return newMutatingWebhookConfigurations(c) } +func (c *AdmissionregistrationV1Client) ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInterface { + return newValidatingAdmissionPolicies(c) +} + +func (c *AdmissionregistrationV1Client) ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInterface { + return newValidatingAdmissionPolicyBindings(c) +} + func (c *AdmissionregistrationV1Client) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface { return newValidatingWebhookConfigurations(c) } diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/generated_expansion.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/generated_expansion.go index a5b062e37fd..d81e1c87fcd 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/generated_expansion.go +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/generated_expansion.go @@ -20,4 +20,8 @@ package v1 type MutatingWebhookConfigurationExpansion interface{} +type ValidatingAdmissionPolicyExpansion interface{} + +type ValidatingAdmissionPolicyBindingExpansion interface{} + type ValidatingWebhookConfigurationExpansion interface{} diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go new file mode 100644 index 00000000000..0b0b05acd41 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go @@ -0,0 +1,243 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ValidatingAdmissionPoliciesGetter has a method to return a ValidatingAdmissionPolicyInterface. +// A group's client should implement this interface. +type ValidatingAdmissionPoliciesGetter interface { + ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInterface +} + +// ValidatingAdmissionPolicyInterface has methods to work with ValidatingAdmissionPolicy resources. +type ValidatingAdmissionPolicyInterface interface { + Create(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.CreateOptions) (*v1.ValidatingAdmissionPolicy, error) + Update(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (*v1.ValidatingAdmissionPolicy, error) + UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (*v1.ValidatingAdmissionPolicy, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ValidatingAdmissionPolicy, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingAdmissionPolicyList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicy, err error) + Apply(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicy, err error) + ApplyStatus(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicy, err error) + ValidatingAdmissionPolicyExpansion +} + +// validatingAdmissionPolicies implements ValidatingAdmissionPolicyInterface +type validatingAdmissionPolicies struct { + client rest.Interface +} + +// newValidatingAdmissionPolicies returns a ValidatingAdmissionPolicies +func newValidatingAdmissionPolicies(c *AdmissionregistrationV1Client) *validatingAdmissionPolicies { + return &validatingAdmissionPolicies{ + client: c.RESTClient(), + } +} + +// Get takes name of the validatingAdmissionPolicy, and returns the corresponding validatingAdmissionPolicy object, and an error if there is any. +func (c *validatingAdmissionPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Get(). + Resource("validatingadmissionpolicies"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors. +func (c *validatingAdmissionPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ValidatingAdmissionPolicyList{} + err = c.client.Get(). + Resource("validatingadmissionpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicies. +func (c *validatingAdmissionPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("validatingadmissionpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a validatingAdmissionPolicy and creates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any. +func (c *validatingAdmissionPolicies) Create(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.CreateOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Post(). + Resource("validatingadmissionpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(validatingAdmissionPolicy). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a validatingAdmissionPolicy and updates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any. +func (c *validatingAdmissionPolicies) Update(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Put(). + Resource("validatingadmissionpolicies"). + Name(validatingAdmissionPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(validatingAdmissionPolicy). + Do(ctx). + 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 *validatingAdmissionPolicies) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Put(). + Resource("validatingadmissionpolicies"). + Name(validatingAdmissionPolicy.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(validatingAdmissionPolicy). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the validatingAdmissionPolicy and deletes it. Returns an error if one occurs. +func (c *validatingAdmissionPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("validatingadmissionpolicies"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *validatingAdmissionPolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("validatingadmissionpolicies"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched validatingAdmissionPolicy. +func (c *validatingAdmissionPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicy, err error) { + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Patch(pt). + Resource("validatingadmissionpolicies"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied validatingAdmissionPolicy. +func (c *validatingAdmissionPolicies) Apply(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + if validatingAdmissionPolicy == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(validatingAdmissionPolicy) + if err != nil { + return nil, err + } + name := validatingAdmissionPolicy.Name + if name == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply") + } + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Patch(types.ApplyPatchType). + Resource("validatingadmissionpolicies"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *validatingAdmissionPolicies) ApplyStatus(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + if validatingAdmissionPolicy == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(validatingAdmissionPolicy) + if err != nil { + return nil, err + } + + name := validatingAdmissionPolicy.Name + if name == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply") + } + + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Patch(types.ApplyPatchType). + Resource("validatingadmissionpolicies"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go new file mode 100644 index 00000000000..83a8ef163d2 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go @@ -0,0 +1,197 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ValidatingAdmissionPolicyBindingsGetter has a method to return a ValidatingAdmissionPolicyBindingInterface. +// A group's client should implement this interface. +type ValidatingAdmissionPolicyBindingsGetter interface { + ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInterface +} + +// ValidatingAdmissionPolicyBindingInterface has methods to work with ValidatingAdmissionPolicyBinding resources. +type ValidatingAdmissionPolicyBindingInterface interface { + Create(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.CreateOptions) (*v1.ValidatingAdmissionPolicyBinding, error) + Update(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.UpdateOptions) (*v1.ValidatingAdmissionPolicyBinding, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ValidatingAdmissionPolicyBinding, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingAdmissionPolicyBindingList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicyBinding, err error) + Apply(ctx context.Context, validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBindingApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) + ValidatingAdmissionPolicyBindingExpansion +} + +// validatingAdmissionPolicyBindings implements ValidatingAdmissionPolicyBindingInterface +type validatingAdmissionPolicyBindings struct { + client rest.Interface +} + +// newValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindings +func newValidatingAdmissionPolicyBindings(c *AdmissionregistrationV1Client) *validatingAdmissionPolicyBindings { + return &validatingAdmissionPolicyBindings{ + client: c.RESTClient(), + } +} + +// Get takes name of the validatingAdmissionPolicyBinding, and returns the corresponding validatingAdmissionPolicyBinding object, and an error if there is any. +func (c *validatingAdmissionPolicyBindings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + result = &v1.ValidatingAdmissionPolicyBinding{} + err = c.client.Get(). + Resource("validatingadmissionpolicybindings"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors. +func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyBindingList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ValidatingAdmissionPolicyBindingList{} + err = c.client.Get(). + Resource("validatingadmissionpolicybindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicyBindings. +func (c *validatingAdmissionPolicyBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("validatingadmissionpolicybindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a validatingAdmissionPolicyBinding and creates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any. +func (c *validatingAdmissionPolicyBindings) Create(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.CreateOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + result = &v1.ValidatingAdmissionPolicyBinding{} + err = c.client.Post(). + Resource("validatingadmissionpolicybindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(validatingAdmissionPolicyBinding). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a validatingAdmissionPolicyBinding and updates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any. +func (c *validatingAdmissionPolicyBindings) Update(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.UpdateOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + result = &v1.ValidatingAdmissionPolicyBinding{} + err = c.client.Put(). + Resource("validatingadmissionpolicybindings"). + Name(validatingAdmissionPolicyBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(validatingAdmissionPolicyBinding). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the validatingAdmissionPolicyBinding and deletes it. Returns an error if one occurs. +func (c *validatingAdmissionPolicyBindings) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("validatingadmissionpolicybindings"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *validatingAdmissionPolicyBindings) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("validatingadmissionpolicybindings"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched validatingAdmissionPolicyBinding. +func (c *validatingAdmissionPolicyBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + result = &v1.ValidatingAdmissionPolicyBinding{} + err = c.client.Patch(pt). + Resource("validatingadmissionpolicybindings"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied validatingAdmissionPolicyBinding. +func (c *validatingAdmissionPolicyBindings) Apply(ctx context.Context, validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBindingApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + if validatingAdmissionPolicyBinding == nil { + return nil, fmt.Errorf("validatingAdmissionPolicyBinding provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(validatingAdmissionPolicyBinding) + if err != nil { + return nil, err + } + name := validatingAdmissionPolicyBinding.Name + if name == nil { + return nil, fmt.Errorf("validatingAdmissionPolicyBinding.Name must be provided to Apply") + } + result = &v1.ValidatingAdmissionPolicyBinding{} + err = c.client.Patch(types.ApplyPatchType). + Resource("validatingadmissionpolicybindings"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go index 2c02e9ce74e..d11410bb9b9 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go @@ -22,6 +22,12 @@ type PodSchedulingContextExpansion interface{} type ResourceClaimExpansion interface{} +type ResourceClaimParametersExpansion interface{} + type ResourceClaimTemplateExpansion interface{} type ResourceClassExpansion interface{} + +type ResourceClassParametersExpansion interface{} + +type ResourceSliceExpansion interface{} diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go index d5795fd6286..8e258b3e1ca 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go @@ -30,8 +30,11 @@ type ResourceV1alpha2Interface interface { RESTClient() rest.Interface PodSchedulingContextsGetter ResourceClaimsGetter + ResourceClaimParametersGetter ResourceClaimTemplatesGetter ResourceClassesGetter + ResourceClassParametersGetter + ResourceSlicesGetter } // ResourceV1alpha2Client is used to interact with features provided by the resource.k8s.io group. @@ -47,6 +50,10 @@ func (c *ResourceV1alpha2Client) ResourceClaims(namespace string) ResourceClaimI return newResourceClaims(c, namespace) } +func (c *ResourceV1alpha2Client) ResourceClaimParameters(namespace string) ResourceClaimParametersInterface { + return newResourceClaimParameters(c, namespace) +} + func (c *ResourceV1alpha2Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface { return newResourceClaimTemplates(c, namespace) } @@ -55,6 +62,14 @@ func (c *ResourceV1alpha2Client) ResourceClasses() ResourceClassInterface { return newResourceClasses(c) } +func (c *ResourceV1alpha2Client) ResourceClassParameters(namespace string) ResourceClassParametersInterface { + return newResourceClassParameters(c, namespace) +} + +func (c *ResourceV1alpha2Client) ResourceSlices() ResourceSliceInterface { + return newResourceSlices(c) +} + // NewForConfig creates a new ResourceV1alpha2Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 00000000000..d08afcb611b --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,208 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ResourceClaimParametersGetter has a method to return a ResourceClaimParametersInterface. +// A group's client should implement this interface. +type ResourceClaimParametersGetter interface { + ResourceClaimParameters(namespace string) ResourceClaimParametersInterface +} + +// ResourceClaimParametersInterface has methods to work with ResourceClaimParameters resources. +type ResourceClaimParametersInterface interface { + Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (*v1alpha2.ResourceClaimParameters, error) + Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (*v1alpha2.ResourceClaimParameters, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClaimParameters, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClaimParametersList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) + Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) + ResourceClaimParametersExpansion +} + +// resourceClaimParameters implements ResourceClaimParametersInterface +type resourceClaimParameters struct { + client rest.Interface + ns string +} + +// newResourceClaimParameters returns a ResourceClaimParameters +func newResourceClaimParameters(c *ResourceV1alpha2Client, namespace string) *resourceClaimParameters { + return &resourceClaimParameters{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the resourceClaimParameters, and returns the corresponding resourceClaimParameters object, and an error if there is any. +func (c *resourceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors. +func (c *resourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimParametersList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha2.ResourceClaimParametersList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested resourceClaimParameters. +func (c *resourceClaimParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a resourceClaimParameters and creates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. +func (c *resourceClaimParameters) Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Post(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClaimParameters). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a resourceClaimParameters and updates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. +func (c *resourceClaimParameters) Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Put(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(resourceClaimParameters.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClaimParameters). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the resourceClaimParameters and deletes it. Returns an error if one occurs. +func (c *resourceClaimParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *resourceClaimParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched resourceClaimParameters. +func (c *resourceClaimParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimParameters. +func (c *resourceClaimParameters) Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + if resourceClaimParameters == nil { + return nil, fmt.Errorf("resourceClaimParameters provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(resourceClaimParameters) + if err != nil { + return nil, err + } + name := resourceClaimParameters.Name + if name == nil { + return nil, fmt.Errorf("resourceClaimParameters.Name must be provided to Apply") + } + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 00000000000..8ac9be0784a --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,208 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ResourceClassParametersGetter has a method to return a ResourceClassParametersInterface. +// A group's client should implement this interface. +type ResourceClassParametersGetter interface { + ResourceClassParameters(namespace string) ResourceClassParametersInterface +} + +// ResourceClassParametersInterface has methods to work with ResourceClassParameters resources. +type ResourceClassParametersInterface interface { + Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (*v1alpha2.ResourceClassParameters, error) + Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (*v1alpha2.ResourceClassParameters, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClassParameters, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClassParametersList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) + Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) + ResourceClassParametersExpansion +} + +// resourceClassParameters implements ResourceClassParametersInterface +type resourceClassParameters struct { + client rest.Interface + ns string +} + +// newResourceClassParameters returns a ResourceClassParameters +func newResourceClassParameters(c *ResourceV1alpha2Client, namespace string) *resourceClassParameters { + return &resourceClassParameters{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the resourceClassParameters, and returns the corresponding resourceClassParameters object, and an error if there is any. +func (c *resourceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors. +func (c *resourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassParametersList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha2.ResourceClassParametersList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested resourceClassParameters. +func (c *resourceClassParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a resourceClassParameters and creates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. +func (c *resourceClassParameters) Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Post(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClassParameters). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a resourceClassParameters and updates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. +func (c *resourceClassParameters) Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Put(). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(resourceClassParameters.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClassParameters). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the resourceClassParameters and deletes it. Returns an error if one occurs. +func (c *resourceClassParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *resourceClassParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched resourceClassParameters. +func (c *resourceClassParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClassParameters. +func (c *resourceClassParameters) Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) { + if resourceClassParameters == nil { + return nil, fmt.Errorf("resourceClassParameters provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(resourceClassParameters) + if err != nil { + return nil, err + } + name := resourceClassParameters.Name + if name == nil { + return nil, fmt.Errorf("resourceClassParameters.Name must be provided to Apply") + } + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go new file mode 100644 index 00000000000..302f370d525 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go @@ -0,0 +1,197 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ResourceSlicesGetter has a method to return a ResourceSliceInterface. +// A group's client should implement this interface. +type ResourceSlicesGetter interface { + ResourceSlices() ResourceSliceInterface +} + +// ResourceSliceInterface has methods to work with ResourceSlice resources. +type ResourceSliceInterface interface { + Create(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.CreateOptions) (*v1alpha2.ResourceSlice, error) + Update(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.UpdateOptions) (*v1alpha2.ResourceSlice, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceSlice, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceSliceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceSlice, err error) + Apply(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceSlice, err error) + ResourceSliceExpansion +} + +// resourceSlices implements ResourceSliceInterface +type resourceSlices struct { + client rest.Interface +} + +// newResourceSlices returns a ResourceSlices +func newResourceSlices(c *ResourceV1alpha2Client) *resourceSlices { + return &resourceSlices{ + client: c.RESTClient(), + } +} + +// Get takes name of the resourceSlice, and returns the corresponding resourceSlice object, and an error if there is any. +func (c *resourceSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceSlice, err error) { + result = &v1alpha2.ResourceSlice{} + err = c.client.Get(). + Resource("resourceslices"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ResourceSlices that match those selectors. +func (c *resourceSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceSliceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha2.ResourceSliceList{} + err = c.client.Get(). + Resource("resourceslices"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested resourceSlices. +func (c *resourceSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("resourceslices"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a resourceSlice and creates it. Returns the server's representation of the resourceSlice, and an error, if there is any. +func (c *resourceSlices) Create(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.CreateOptions) (result *v1alpha2.ResourceSlice, err error) { + result = &v1alpha2.ResourceSlice{} + err = c.client.Post(). + Resource("resourceslices"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceSlice). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a resourceSlice and updates it. Returns the server's representation of the resourceSlice, and an error, if there is any. +func (c *resourceSlices) Update(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.UpdateOptions) (result *v1alpha2.ResourceSlice, err error) { + result = &v1alpha2.ResourceSlice{} + err = c.client.Put(). + Resource("resourceslices"). + Name(resourceSlice.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceSlice). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the resourceSlice and deletes it. Returns an error if one occurs. +func (c *resourceSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("resourceslices"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *resourceSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("resourceslices"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched resourceSlice. +func (c *resourceSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceSlice, err error) { + result = &v1alpha2.ResourceSlice{} + err = c.client.Patch(pt). + Resource("resourceslices"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceSlice. +func (c *resourceSlices) Apply(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceSlice, err error) { + if resourceSlice == nil { + return nil, fmt.Errorf("resourceSlice provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(resourceSlice) + if err != nil { + return nil, err + } + name := resourceSlice.Name + if name == nil { + return nil, fmt.Errorf("resourceSlice.Name must be provided to Apply") + } + result = &v1alpha2.ResourceSlice{} + err = c.client.Patch(types.ApplyPatchType). + Resource("resourceslices"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/gengo/examples/set-gen/sets/doc.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/doc.go similarity index 81% rename from vendor/k8s.io/gengo/examples/set-gen/sets/doc.go rename to pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/doc.go index b152a0bf00f..df51baa4d4c 100644 --- a/vendor/k8s.io/gengo/examples/set-gen/sets/doc.go +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by set-gen. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. -// Package sets has auto-generated set types. -package sets +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/doc.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go similarity index 89% rename from vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/doc.go rename to pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go index 16f44399065..89220c3ce98 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/doc.go +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go @@ -16,5 +16,6 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -// Package fake has the automatically generated clients. -package fake +package v1alpha1 + +type StorageVersionMigrationExpansion interface{} diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storagemigration_client.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storagemigration_client.go new file mode 100644 index 00000000000..613e4535598 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storagemigration_client.go @@ -0,0 +1,107 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "k8s.io/api/storagemigration/v1alpha1" + "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +type StoragemigrationV1alpha1Interface interface { + RESTClient() rest.Interface + StorageVersionMigrationsGetter +} + +// StoragemigrationV1alpha1Client is used to interact with features provided by the storagemigration.k8s.io group. +type StoragemigrationV1alpha1Client struct { + restClient rest.Interface +} + +func (c *StoragemigrationV1alpha1Client) StorageVersionMigrations() StorageVersionMigrationInterface { + return newStorageVersionMigrations(c) +} + +// NewForConfig creates a new StoragemigrationV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*StoragemigrationV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new StoragemigrationV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*StoragemigrationV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &StoragemigrationV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new StoragemigrationV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *StoragemigrationV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new StoragemigrationV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *StoragemigrationV1alpha1Client { + return &StoragemigrationV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *StoragemigrationV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go new file mode 100644 index 00000000000..be66a5b9463 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go @@ -0,0 +1,243 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "k8s.io/api/storagemigration/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + storagemigrationv1alpha1 "k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// StorageVersionMigrationsGetter has a method to return a StorageVersionMigrationInterface. +// A group's client should implement this interface. +type StorageVersionMigrationsGetter interface { + StorageVersionMigrations() StorageVersionMigrationInterface +} + +// StorageVersionMigrationInterface has methods to work with StorageVersionMigration resources. +type StorageVersionMigrationInterface interface { + Create(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.CreateOptions) (*v1alpha1.StorageVersionMigration, error) + Update(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (*v1alpha1.StorageVersionMigration, error) + UpdateStatus(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (*v1alpha1.StorageVersionMigration, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.StorageVersionMigration, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.StorageVersionMigrationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageVersionMigration, err error) + Apply(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersionMigration, err error) + ApplyStatus(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersionMigration, err error) + StorageVersionMigrationExpansion +} + +// storageVersionMigrations implements StorageVersionMigrationInterface +type storageVersionMigrations struct { + client rest.Interface +} + +// newStorageVersionMigrations returns a StorageVersionMigrations +func newStorageVersionMigrations(c *StoragemigrationV1alpha1Client) *storageVersionMigrations { + return &storageVersionMigrations{ + client: c.RESTClient(), + } +} + +// Get takes name of the storageVersionMigration, and returns the corresponding storageVersionMigration object, and an error if there is any. +func (c *storageVersionMigrations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StorageVersionMigration, err error) { + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Get(). + Resource("storageversionmigrations"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of StorageVersionMigrations that match those selectors. +func (c *storageVersionMigrations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionMigrationList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.StorageVersionMigrationList{} + err = c.client.Get(). + Resource("storageversionmigrations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested storageVersionMigrations. +func (c *storageVersionMigrations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("storageversionmigrations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a storageVersionMigration and creates it. Returns the server's representation of the storageVersionMigration, and an error, if there is any. +func (c *storageVersionMigrations) Create(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.CreateOptions) (result *v1alpha1.StorageVersionMigration, err error) { + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Post(). + Resource("storageversionmigrations"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(storageVersionMigration). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a storageVersionMigration and updates it. Returns the server's representation of the storageVersionMigration, and an error, if there is any. +func (c *storageVersionMigrations) Update(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (result *v1alpha1.StorageVersionMigration, err error) { + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Put(). + Resource("storageversionmigrations"). + Name(storageVersionMigration.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(storageVersionMigration). + Do(ctx). + 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 *storageVersionMigrations) UpdateStatus(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (result *v1alpha1.StorageVersionMigration, err error) { + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Put(). + Resource("storageversionmigrations"). + Name(storageVersionMigration.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(storageVersionMigration). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the storageVersionMigration and deletes it. Returns an error if one occurs. +func (c *storageVersionMigrations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("storageversionmigrations"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *storageVersionMigrations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("storageversionmigrations"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched storageVersionMigration. +func (c *storageVersionMigrations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageVersionMigration, err error) { + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Patch(pt). + Resource("storageversionmigrations"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied storageVersionMigration. +func (c *storageVersionMigrations) Apply(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersionMigration, err error) { + if storageVersionMigration == nil { + return nil, fmt.Errorf("storageVersionMigration provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(storageVersionMigration) + if err != nil { + return nil, err + } + name := storageVersionMigration.Name + if name == nil { + return nil, fmt.Errorf("storageVersionMigration.Name must be provided to Apply") + } + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Patch(types.ApplyPatchType). + Resource("storageversionmigrations"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *storageVersionMigrations) ApplyStatus(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersionMigration, err error) { + if storageVersionMigration == nil { + return nil, fmt.Errorf("storageVersionMigration provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(storageVersionMigration) + if err != nil { + return nil, err + } + + name := storageVersionMigration.Name + if name == nil { + return nil, fmt.Errorf("storageVersionMigration.Name must be provided to Apply") + } + + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Patch(types.ApplyPatchType). + Resource("storageversionmigrations"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/k8s/vendor/k8s.io/client-go/tools/cache/controller.go b/pkg/k8s/vendor/k8s.io/client-go/tools/cache/controller.go index 8a1104bde80..ee19a5af95c 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/tools/cache/controller.go +++ b/pkg/k8s/vendor/k8s.io/client-go/tools/cache/controller.go @@ -336,6 +336,16 @@ func DeletionHandlingMetaNamespaceKeyFunc(obj interface{}) (string, error) { return MetaNamespaceKeyFunc(obj) } +// DeletionHandlingObjectToName checks for +// DeletedFinalStateUnknown objects before calling +// ObjectToName. +func DeletionHandlingObjectToName(obj interface{}) (ObjectName, error) { + if d, ok := obj.(DeletedFinalStateUnknown); ok { + return ParseObjectName(d.Key) + } + return ObjectToName(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 diff --git a/pkg/k8s/vendor/k8s.io/client-go/tools/cache/index.go b/pkg/k8s/vendor/k8s.io/client-go/tools/cache/index.go index b78d3086b8c..c5819fb6f86 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/tools/cache/index.go +++ b/pkg/k8s/vendor/k8s.io/client-go/tools/cache/index.go @@ -50,8 +50,7 @@ type Indexer interface { // GetIndexers 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 adds more indexers to this store. This supports adding indexes after the store already has items. AddIndexers(newIndexers Indexers) error } diff --git a/pkg/k8s/vendor/k8s.io/client-go/tools/cache/reflector.go b/pkg/k8s/vendor/k8s.io/client-go/tools/cache/reflector.go index c1ea13de574..f733e244ccc 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/tools/cache/reflector.go +++ b/pkg/k8s/vendor/k8s.io/client-go/tools/cache/reflector.go @@ -43,6 +43,7 @@ import ( "k8s.io/klog/v2" "k8s.io/utils/clock" "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "k8s.io/utils/trace" ) @@ -107,7 +108,9 @@ type Reflector struct { // might result in an increased memory consumption of the APIServer. // // See https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/3157-watch-list#design-details - UseWatchList bool + // + // TODO(#115478): Consider making reflector.UseWatchList a private field. Since we implemented "api streaming" on the etcd storage layer it should work. + UseWatchList *bool } // ResourceVersionUpdater is an interface that allows store implementation to @@ -237,8 +240,12 @@ func NewReflectorWithOptions(lw ListerWatcher, expectedType interface{}, store S r.expectedGVK = getExpectedGVKFromObject(expectedType) } - if s := os.Getenv("ENABLE_CLIENT_GO_WATCH_LIST_ALPHA"); len(s) > 0 { - r.UseWatchList = true + // don't overwrite UseWatchList if already set + // because the higher layers (e.g. storage/cacher) disabled it on purpose + if r.UseWatchList == nil { + if s := os.Getenv("ENABLE_CLIENT_GO_WATCH_LIST_ALPHA"); len(s) > 0 { + r.UseWatchList = ptr.To(true) + } } return r @@ -325,9 +332,10 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { klog.V(3).Infof("Listing and watching %v from %s", r.typeDescription, r.name) var err error var w watch.Interface - fallbackToList := !r.UseWatchList + useWatchList := ptr.Deref(r.UseWatchList, false) + fallbackToList := !useWatchList - if r.UseWatchList { + if useWatchList { w, err = r.watchList(stopCh) if w == nil && err == nil { // stopCh was closed diff --git a/pkg/k8s/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/pkg/k8s/vendor/k8s.io/client-go/tools/cache/shared_informer.go index b3f37431d5c..c805030bd73 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/tools/cache/shared_informer.go +++ b/pkg/k8s/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -31,6 +31,8 @@ import ( "k8s.io/utils/clock" "k8s.io/klog/v2" + + clientgofeaturegate "k8s.io/client-go/features" ) // SharedInformer provides eventually consistent linkage of its @@ -409,6 +411,10 @@ func (v *dummyController) HasSynced() bool { } func (v *dummyController) LastSyncResourceVersion() string { + if clientgofeaturegate.FeatureGates().Enabled(clientgofeaturegate.InformerResourceVersion) { + return v.informer.LastSyncResourceVersion() + } + return "" } @@ -540,8 +546,8 @@ func (s *sharedIndexInformer) AddIndexers(indexers Indexers) error { s.startedLock.Lock() defer s.startedLock.Unlock() - if s.started { - return fmt.Errorf("informer has already started") + if s.stopped { + return fmt.Errorf("indexer was not added because it has stopped already") } return s.indexer.AddIndexers(indexers) diff --git a/pkg/k8s/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go b/pkg/k8s/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go index 145e93ee535..7a4df0e1bae 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go +++ b/pkg/k8s/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go @@ -52,8 +52,7 @@ type ThreadSafeStore interface { ByIndex(indexName, indexedValue 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 adds more indexers to this store. This supports adding indexes after the store already has items. AddIndexers(newIndexers Indexers) error // Resync is a no-op and is deprecated Resync() error @@ -135,50 +134,66 @@ func (i *storeIndex) addIndexers(newIndexers Indexers) error { return nil } -// updateIndices modifies the objects location in the managed indexes: +// updateSingleIndex modifies the objects location in the named index: // - for create you must provide only the newObj // - for update you must provide both the oldObj and the newObj // - for delete you must provide only the oldObj -// updateIndices must be called from a function that already has a lock on the cache -func (i *storeIndex) updateIndices(oldObj interface{}, newObj interface{}, key string) { +// updateSingleIndex must be called from a function that already has a lock on the cache +func (i *storeIndex) updateSingleIndex(name string, oldObj interface{}, newObj interface{}, key string) { var oldIndexValues, indexValues []string - var err error - for name, indexFunc := range i.indexers { - if oldObj != nil { - oldIndexValues, err = indexFunc(oldObj) - } else { - oldIndexValues = oldIndexValues[:0] - } + indexFunc, ok := i.indexers[name] + if !ok { + // Should never happen. Caller is responsible for ensuring this exists, and should call with lock + // held to avoid any races. + panic(fmt.Errorf("indexer %q does not exist", name)) + } + if oldObj != nil { + var err error + oldIndexValues, err = indexFunc(oldObj) if err != nil { panic(fmt.Errorf("unable to calculate an index entry for key %q on index %q: %v", key, name, err)) } + } else { + oldIndexValues = oldIndexValues[:0] + } - if newObj != nil { - indexValues, err = indexFunc(newObj) - } else { - indexValues = indexValues[:0] - } + if newObj != nil { + var err error + 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)) } + } else { + indexValues = indexValues[:0] + } - index := i.indices[name] - if index == nil { - index = Index{} - i.indices[name] = index - } + index := i.indices[name] + if index == nil { + index = Index{} + i.indices[name] = index + } - if len(indexValues) == 1 && len(oldIndexValues) == 1 && indexValues[0] == oldIndexValues[0] { - // We optimize for the most common case where indexFunc returns a single value which has not been changed - continue - } + if len(indexValues) == 1 && len(oldIndexValues) == 1 && indexValues[0] == oldIndexValues[0] { + // We optimize for the most common case where indexFunc returns a single value which has not been changed + return + } - for _, value := range oldIndexValues { - i.deleteKeyFromIndex(key, value, index) - } - for _, value := range indexValues { - i.addKeyToIndex(key, value, index) - } + for _, value := range oldIndexValues { + i.deleteKeyFromIndex(key, value, index) + } + for _, value := range indexValues { + i.addKeyToIndex(key, value, index) + } +} + +// updateIndices modifies the objects location in the managed indexes: +// - for create you must provide only the newObj +// - for update you must provide both the oldObj and the newObj +// - for delete you must provide only the oldObj +// updateIndices must be called from a function that already has a lock on the cache +func (i *storeIndex) updateIndices(oldObj interface{}, newObj interface{}, key string) { + for name := range i.indexers { + i.updateSingleIndex(name, oldObj, newObj, key) } } @@ -339,11 +354,18 @@ 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") + if err := c.index.addIndexers(newIndexers); err != nil { + return err + } + + // If there are already items, index them + for key, item := range c.items { + for name := range newIndexers { + c.index.updateSingleIndex(name, nil, item, key) + } } - return c.index.addIndexers(newIndexers) + return nil } func (c *threadSafeMap) Resync() error { diff --git a/pkg/k8s/vendor/k8s.io/client-go/tools/clientcmd/api/doc.go b/pkg/k8s/vendor/k8s.io/client-go/tools/clientcmd/api/doc.go index 5871575a669..fd913a30832 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/tools/clientcmd/api/doc.go +++ b/pkg/k8s/vendor/k8s.io/client-go/tools/clientcmd/api/doc.go @@ -16,4 +16,4 @@ limitations under the License. // +k8s:deepcopy-gen=package -package api +package api // import "k8s.io/client-go/tools/clientcmd/api" diff --git a/pkg/k8s/vendor/k8s.io/client-go/util/flowcontrol/backoff.go b/pkg/k8s/vendor/k8s.io/client-go/util/flowcontrol/backoff.go index 3ef88dbdb89..82e4c4c4089 100644 --- a/pkg/k8s/vendor/k8s.io/client-go/util/flowcontrol/backoff.go +++ b/pkg/k8s/vendor/k8s.io/client-go/util/flowcontrol/backoff.go @@ -23,7 +23,6 @@ import ( "k8s.io/utils/clock" testingclock "k8s.io/utils/clock/testing" - "k8s.io/utils/integer" ) type backoffEntry struct { @@ -100,7 +99,7 @@ func (p *Backoff) Next(id string, eventTime time.Time) { } else { delay := entry.backoff * 2 // exponential delay += p.jitter(entry.backoff) // add some jitter to the delay - entry.backoff = time.Duration(integer.Int64Min(int64(delay), int64(p.maxDuration))) + entry.backoff = min(delay, p.maxDuration) } entry.lastUpdate = p.Clock.Now() } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/README.md b/pkg/k8s/vendor/k8s.io/code-generator/README.md index 122868a5c63..b0055265ec3 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/README.md +++ b/pkg/k8s/vendor/k8s.io/code-generator/README.md @@ -14,6 +14,10 @@ These code-generators can be used - The example [sample controller](https://github.com/kubernetes/sample-controller) shows a code example of a controller that uses the clients, listers and informers generated by this library. - The article [Kubernetes Deep Dive: Code Generation for CustomResources](https://cloud.redhat.com/blog/kubernetes-deep-dive-code-generation-customresources/) gives a step by step instruction on how to use this library. +## Usage + +The examples above are dated. The current recommended script to use is [kube_codegen.sh](kube_codegen.sh). + ## Compatibility HEAD of this repo will match HEAD of k8s.io/apiserver, k8s.io/apimachinery, and k8s.io/client-go. diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/args.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/args.go index 78f364841f2..36aa7a3710f 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/args.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/args.go @@ -18,17 +18,18 @@ package args import ( "fmt" - "path" "github.com/spf13/pflag" - "k8s.io/gengo/args" - "k8s.io/gengo/types" - - codegenutil "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/v2/types" ) -// CustomArgs is a wrapper for arguments to applyconfiguration-gen. -type CustomArgs struct { +// Args is a wrapper for arguments to applyconfiguration-gen. +type Args struct { + OutputDir string // must be a directory path + OutputPkg string // must be a Go import-path + + GoHeaderFile string + // ExternalApplyConfigurations provides the locations of externally generated // apply configuration types for types referenced by the go structs provided as input. // Locations are provided as a comma separated list of .: @@ -44,38 +45,44 @@ type CustomArgs struct { OpenAPISchemaFilePath string } -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{ +// New returns default arguments for the generator. +func New() *Args { + return &Args{ ExternalApplyConfigurations: map[types.Name]string{ - // Always include TypeMeta and ObjectMeta. They are sufficient for the vast majority of use cases. - {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "TypeMeta"}: "k8s.io/client-go/applyconfigurations/meta/v1", - {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ObjectMeta"}: "k8s.io/client-go/applyconfigurations/meta/v1", - {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "OwnerReference"}: "k8s.io/client-go/applyconfigurations/meta/v1", + // Always include the applyconfigurations we've generated in client-go. They are sufficient for the vast majority of use cases. + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "Condition"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "DeleteOptions"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "LabelSelector"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "LabelSelectorRequirement"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ManagedFieldsEntry"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ObjectMeta"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "OwnerReference"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "TypeMeta"}: "k8s.io/client-go/applyconfigurations/meta/v1", }, } - genericArgs.CustomArgs = customArgs - - if pkg := codegenutil.CurrentPackage(); len(pkg) != 0 { - genericArgs.OutputPackagePath = path.Join(pkg, "pkg/client/applyconfigurations") - } - - return genericArgs, customArgs } -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet, inputBase string) { - pflag.Var(NewExternalApplyConfigurationValue(&ca.ExternalApplyConfigurations, nil), "external-applyconfigurations", +func (args *Args) AddFlags(fs *pflag.FlagSet, inputBase string) { + fs.StringVar(&args.OutputDir, "output-dir", "", + "the base directory under which to generate results") + fs.StringVar(&args.OutputPkg, "output-pkg", args.OutputPkg, + "the Go import-path of the generated results") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") + fs.Var(NewExternalApplyConfigurationValue(&args.ExternalApplyConfigurations, nil), "external-applyconfigurations", "list of comma separated external apply configurations locations in .: form."+ "For example: k8s.io/api/apps/v1.Deployment:k8s.io/client-go/applyconfigurations/apps/v1") - pflag.StringVar(&ca.OpenAPISchemaFilePath, "openapi-schema", "", + fs.StringVar(&args.OpenAPISchemaFilePath, "openapi-schema", "", "path to the openapi schema containing all the types that apply configurations will be generated for") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - if len(genericArgs.OutputPackagePath) == 0 { - return fmt.Errorf("output package cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputDir) == 0 { + return fmt.Errorf("--output-dir must be specified") + } + if len(args.OutputPkg) == 0 { + return fmt.Errorf("--output-pkg must be specified") } return nil } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/externaltypes.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/externaltypes.go index 0785fbea0e3..fd9b6098992 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/externaltypes.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/externaltypes.go @@ -23,7 +23,7 @@ import ( "fmt" "strings" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" ) type externalApplyConfigurationValue struct { diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go index 8e02bb233bc..ee4743aa279 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go @@ -18,11 +18,12 @@ package generators import ( "io" + "path" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" "k8s.io/code-generator/cmd/client-gen/generators/util" @@ -31,14 +32,15 @@ import ( // applyConfigurationGenerator produces apply configurations for a given GroupVersion and type. type applyConfigurationGenerator struct { - generator.DefaultGen - outputPackage string - localPackage types.Name - groupVersion clientgentypes.GroupVersion - applyConfig applyConfig - imports namer.ImportTracker - refGraph refGraph - openAPIType *string // if absent, extraction function cannot be generated + generator.GoGenerator + // outPkgBase is the base package, under which the "internal" and GV-specific subdirs live + outPkgBase string // must be a Go import-path + localPkg string + groupVersion clientgentypes.GroupVersion + applyConfig applyConfig + imports namer.ImportTracker + refGraph refGraph + openAPIType *string // if absent, extraction function cannot be generated } var _ generator.Generator = &applyConfigurationGenerator{} @@ -49,7 +51,7 @@ func (g *applyConfigurationGenerator) Filter(_ *generator.Context, t *types.Type func (g *applyConfigurationGenerator) Namers(*generator.Context) namer.NameSystems { return namer.NameSystems{ - "raw": namer.NewRawNamer(g.localPackage.Package, g.imports), + "raw": namer.NewRawNamer(g.localPkg, g.imports), "singularKind": namer.NewPublicNamer(0), } } @@ -90,7 +92,7 @@ func (g *applyConfigurationGenerator) GenerateType(c *generator.Context, t *type Tags: genclientTags(t), APIVersion: g.groupVersion.ToAPIVersion(), ExtractInto: extractInto, - ParserFunc: types.Ref(g.outputPackage+"/internal", "Parser"), + ParserFunc: types.Ref(path.Join(g.outPkgBase, "internal"), "Parser"), OpenAPIType: g.openAPIType, } @@ -334,7 +336,7 @@ func (b *$.ApplyConfig.ApplyConfiguration|public$) ensure$.MemberType.Elem|publi var clientgenTypeConstructorNamespaced = ` // $.ApplyConfig.Type|public$ constructs an declarative configuration of the $.ApplyConfig.Type|public$ type for use with -// apply. +// apply. func $.ApplyConfig.Type|public$(name, namespace string) *$.ApplyConfig.ApplyConfiguration|public$ { b := &$.ApplyConfig.ApplyConfiguration|public${} b.WithName(name) diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go index 2871b9d7f5e..abd65010007 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go @@ -23,14 +23,14 @@ import ( "k8s.io/kube-openapi/pkg/schemaconv" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // utilGenerator generates the ForKind() utility function. type internalGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker typeModels *typeModels diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/jsontagutil.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/jsontagutil.go index 2a643290bb9..c11d05deef7 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/jsontagutil.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/jsontagutil.go @@ -20,7 +20,7 @@ import ( "reflect" "strings" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" ) // TODO: This implements the same functionality as https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go#L236 diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go index 00d119dd65c..00ca1a99bfb 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go @@ -23,7 +23,7 @@ import ( "strings" openapiv2 "github.com/google/gnostic-models/openapiv2" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" utilproto "k8s.io/kube-openapi/pkg/util/proto" "k8s.io/kube-openapi/pkg/validation/spec" ) diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/refgraph.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/refgraph.go index d1f95112796..8b46755298c 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/refgraph.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/refgraph.go @@ -17,7 +17,7 @@ limitations under the License. package generators import ( - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" ) @@ -171,9 +171,5 @@ func requiresApplyConfiguration(t *types.Type) bool { hasJSONTaggedMembers = true } } - if !hasJSONTaggedMembers { - return false - } - - return true + return hasJSONTaggedMembers } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/packages.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go similarity index 64% rename from pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/packages.go rename to pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go index bfeffda593d..debab90e115 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/packages.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go @@ -23,13 +23,13 @@ import ( "sort" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" - applygenargs "k8s.io/code-generator/cmd/applyconfiguration-gen/args" + "k8s.io/code-generator/cmd/applyconfiguration-gen/args" "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" ) @@ -54,32 +54,29 @@ func DefaultNameSystem() string { return "public" } -// Packages makes the client package definition. -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +// GetTargets makes the client target definition. +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, "", gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - pkgTypes := packageTypesForInputDirs(context, arguments.InputDirs, arguments.OutputPackagePath) - customArgs := arguments.CustomArgs.(*applygenargs.CustomArgs) - initialTypes := customArgs.ExternalApplyConfigurations + pkgTypes := packageTypesForInputs(context, args.OutputPkg) + initialTypes := args.ExternalApplyConfigurations refs := refGraphForReachableTypes(context.Universe, pkgTypes, initialTypes) - typeModels, err := newTypeModels(customArgs.OpenAPISchemaFilePath, pkgTypes) + typeModels, err := newTypeModels(args.OpenAPISchemaFilePath, pkgTypes) if err != nil { - klog.Fatalf("Failed build type models from typeModels %s: %v", customArgs.OpenAPISchemaFilePath, err) + klog.Fatalf("Failed build type models from typeModels %s: %v", args.OpenAPISchemaFilePath, err) } groupVersions := make(map[string]clientgentypes.GroupVersions) groupGoNames := make(map[string]string) applyConfigsForGroupVersion := make(map[clientgentypes.GroupVersion][]applyConfig) - var packageList generator.Packages + var targetList []generator.Target for pkg, p := range pkgTypes { gv := groupVersion(p) - pkgType := types.Name{Name: gv.Group.PackageName(), Package: pkg} - var toGenerate []applyConfig for _, t := range p.Types { // If we don't have an ObjectMeta field, we lack the information required to make the Apply or ApplyStatus call @@ -101,8 +98,17 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat } sort.Sort(applyConfigSort(toGenerate)) + // Apparently we allow the groupName to be overridden in a way that it + // no longer maps to a Go package by name. So we have to figure out + // the offset of this particular output package (pkg) from the base + // output package (args.OutputPkg). + pkgSubdir := strings.TrimPrefix(pkg, args.OutputPkg+"/") + // generate the apply configurations - packageList = append(packageList, generatorForApplyConfigurationsPackage(arguments.OutputPackagePath, boilerplate, pkgType, gv, toGenerate, refs, typeModels)) + targetList = append(targetList, + targetForApplyConfigurationsPackage( + args.OutputDir, args.OutputPkg, pkgSubdir, + boilerplate, gv, toGenerate, refs, typeModels)) // group all the generated apply configurations by gv so ForKind() can be generated groupPackageName := gv.Group.NonEmpty() @@ -124,11 +130,15 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat } // generate ForKind() utility function - packageList = append(packageList, generatorForUtils(arguments.OutputPackagePath, boilerplate, groupVersions, applyConfigsForGroupVersion, groupGoNames)) + targetList = append(targetList, + targetForUtils(args.OutputDir, args.OutputPkg, + boilerplate, groupVersions, applyConfigsForGroupVersion, groupGoNames)) // generate internal embedded schema, required for generated Extract functions - packageList = append(packageList, generatorForInternal(filepath.Join(arguments.OutputPackagePath, "internal"), boilerplate, typeModels)) + targetList = append(targetList, + targetForInternal(args.OutputDir, args.OutputPkg, + boilerplate, typeModels)) - return packageList + return targetList } func friendlyName(name string) string { @@ -146,18 +156,19 @@ func friendlyName(name string) string { func typeName(t *types.Type) string { typePackage := t.Name.Package - if strings.Contains(typePackage, "/vendor/") { - typePackage = typePackage[strings.Index(typePackage, "/vendor/")+len("/vendor/"):] - } return fmt.Sprintf("%s.%s", typePackage, t.Name.Name) } -func generatorForApplyConfigurationsPackage(outputPackagePath string, boilerplate []byte, packageName types.Name, gv clientgentypes.GroupVersion, typesToGenerate []applyConfig, refs refGraph, models *typeModels) *generator.DefaultPackage { - return &generator.DefaultPackage{ - PackageName: gv.Version.PackageName(), - PackagePath: packageName.Package, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { +func targetForApplyConfigurationsPackage(outputDirBase, outputPkgBase, pkgSubdir string, boilerplate []byte, gv clientgentypes.GroupVersion, typesToGenerate []applyConfig, refs refGraph, models *typeModels) generator.Target { + outputDir := filepath.Join(outputDirBase, pkgSubdir) + outputPkg := path.Join(outputPkgBase, pkgSubdir) + + return &generator.SimpleTarget{ + PkgName: gv.Version.PackageName(), + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { for _, toGenerate := range typesToGenerate { var openAPIType *string gvk := gvk{ @@ -170,16 +181,16 @@ func generatorForApplyConfigurationsPackage(outputPackagePath string, boilerplat } generators = append(generators, &applyConfigurationGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: strings.ToLower(toGenerate.Type.Name.Name), + GoGenerator: generator.GoGenerator{ + OutputFilename: strings.ToLower(toGenerate.Type.Name.Name) + ".go", }, - outputPackage: outputPackagePath, - localPackage: packageName, - groupVersion: gv, - applyConfig: toGenerate, - imports: generator.NewImportTracker(), - refGraph: refs, - openAPIType: openAPIType, + outPkgBase: outputPkgBase, + localPkg: outputPkg, + groupVersion: gv, + applyConfig: toGenerate, + imports: generator.NewImportTracker(), + refGraph: refs, + openAPIType: openAPIType, }) } return generators @@ -187,17 +198,18 @@ func generatorForApplyConfigurationsPackage(outputPackagePath string, boilerplat } } -func generatorForUtils(outPackagePath string, boilerplate []byte, groupVersions map[string]clientgentypes.GroupVersions, applyConfigsForGroupVersion map[clientgentypes.GroupVersion][]applyConfig, groupGoNames map[string]string) *generator.DefaultPackage { - return &generator.DefaultPackage{ - PackageName: filepath.Base(outPackagePath), - PackagePath: outPackagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { +func targetForUtils(outputDirBase, outputPkgBase string, boilerplate []byte, groupVersions map[string]clientgentypes.GroupVersions, applyConfigsForGroupVersion map[clientgentypes.GroupVersion][]applyConfig, groupGoNames map[string]string) generator.Target { + return &generator.SimpleTarget{ + PkgName: path.Base(outputPkgBase), + PkgPath: outputPkgBase, + PkgDir: outputDirBase, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &utilGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "utils", + GoGenerator: generator.GoGenerator{ + OutputFilename: "utils.go", }, - outputPackage: outPackagePath, + outputPackage: outputPkgBase, imports: generator.NewImportTracker(), groupVersions: groupVersions, typesForGroupVersion: applyConfigsForGroupVersion, @@ -208,17 +220,20 @@ func generatorForUtils(outPackagePath string, boilerplate []byte, groupVersions } } -func generatorForInternal(outPackagePath string, boilerplate []byte, models *typeModels) *generator.DefaultPackage { - return &generator.DefaultPackage{ - PackageName: filepath.Base(outPackagePath), - PackagePath: outPackagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { +func targetForInternal(outputDirBase, outputPkgBase string, boilerplate []byte, models *typeModels) generator.Target { + outputDir := filepath.Join(outputDirBase, "internal") + outputPkg := path.Join(outputPkgBase, "internal") + return &generator.SimpleTarget{ + PkgName: path.Base(outputPkg), + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &internalGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "internal", + GoGenerator: generator.GoGenerator{ + OutputFilename: "internal.go", }, - outputPackage: outPackagePath, + outputPackage: outputPkgBase, imports: generator.NewImportTracker(), typeModels: models, }) @@ -229,15 +244,15 @@ func generatorForInternal(outPackagePath string, boilerplate []byte, models *typ func goName(gv clientgentypes.GroupVersion, p *types.Package) string { goName := namer.IC(strings.Split(gv.Group.NonEmpty(), ".")[0]) - if override := types.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { goName = namer.IC(override[0]) } return goName } -func packageTypesForInputDirs(context *generator.Context, inputDirs []string, outputPath string) map[string]*types.Package { +func packageTypesForInputs(context *generator.Context, outPkgBase string) map[string]*types.Package { pkgTypes := map[string]*types.Package{} - for _, inputDir := range inputDirs { + for _, inputDir := range context.Inputs { p := context.Universe.Package(inputDir) internal := isInternalPackage(p) if internal { @@ -249,7 +264,7 @@ func packageTypesForInputDirs(context *generator.Context, inputDirs []string, ou // For example, if openshift/api/cloudnetwork/v1 contains an apigroup cloud.network.openshift.io, the client-gen // builds a package called cloudnetwork/v1 to contain it. This change makes the applyconfiguration-gen use the same. _, gvPackageString := util.ParsePathGroupVersion(p.Path) - pkg := filepath.Join(outputPath, strings.ToLower(gvPackageString)) + pkg := path.Join(outPkgBase, strings.ToLower(gvPackageString)) pkgTypes[pkg] = p } return pkgTypes @@ -263,7 +278,7 @@ func groupVersion(p *types.Package) (gv clientgentypes.GroupVersion) { // If there's a comment of the form "// +groupName=somegroup" or // "// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as the name of the // group when generating. - if override := types.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { gv.Group = clientgentypes.Group(override[0]) } return gv diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go index 66578ae0489..1e7718f4782 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go @@ -16,7 +16,7 @@ limitations under the License. package generators -import "k8s.io/gengo/types" +import "k8s.io/gengo/v2/types" var ( applyConfiguration = types.Ref("k8s.io/apimachinery/pkg/runtime", "ApplyConfiguration") diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/util.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/util.go index 258293afea5..4d4333d755a 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/util.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/util.go @@ -23,14 +23,14 @@ import ( clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // utilGenerator generates the ForKind() utility function. type utilGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker groupVersions map[string]clientgentypes.GroupVersions diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/main.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/main.go index b4e264042aa..f6b03f8877b 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/main.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/main.go @@ -14,39 +14,45 @@ See the License for the specific language governing permissions and limitations under the License. */ -// typebuilder-gen is a tool for auto-generating apply builder functions. +// applyconfiguration-gen is a tool for auto-generating apply builder functions. package main import ( "flag" "github.com/spf13/pflag" - "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/applyconfiguration-gen/args" + "k8s.io/code-generator/cmd/applyconfiguration-gen/args" "k8s.io/code-generator/cmd/applyconfiguration-gen/generators" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/klog/v2" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine, "k8s.io/kubernetes/pkg/apis") // TODO: move this input path out of applyconfiguration-gen + args := args.New() + args.AddFlags(pflag.CommandLine, "k8s.io/kubernetes/pkg/apis") // TODO: move this input path out of applyconfiguration-gen if err := flag.Set("logtostderr", "true"); err != nil { klog.Fatalf("Error: %v", err) } pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( + if err := gengo.Execute( generators.NameSystems(), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go index 4460ad26a25..e0914e69d2f 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go @@ -18,19 +18,22 @@ package args import ( "fmt" - "path" "github.com/spf13/pflag" - "k8s.io/gengo/args" "k8s.io/code-generator/cmd/client-gen/types" - codegenutil "k8s.io/code-generator/pkg/util" ) -var DefaultInputDirs = []string{} +type Args struct { + // The directory for the generated results. + OutputDir string + + // The Go import-path of the generated results. + OutputPkg string + + // The boilerplate header for Go files. + GoHeaderFile string -// CustomArgs is a wrapper for arguments to client-gen. -type CustomArgs struct { // A sorted list of group versions to generate. For each of them the package path is found // in GroupVersionToInputPath. Groups []types.GroupVersions @@ -53,69 +56,75 @@ type CustomArgs struct { // For example 'Endpoints:Endpoints', otherwise the pluralizer will generate 'Endpointes'. PluralExceptions []string - // ApplyConfigurationPackage is the package of apply builders generated by typebuilder-gen. + // ApplyConfigurationPackage is the package of apply builders generated by + // applyconfiguration-gen. // If non-empty, Apply functions are generated for each type and reference the apply builders. // If empty (""), Apply functions are not generated. ApplyConfigurationPackage string } -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{ +func New() *Args { + return &Args{ ClientsetName: "internalclientset", ClientsetAPIPath: "/apis", ClientsetOnly: false, FakeClient: true, - PluralExceptions: []string{"Endpoints:Endpoints"}, ApplyConfigurationPackage: "", } - genericArgs.CustomArgs = customArgs - genericArgs.InputDirs = DefaultInputDirs - - if pkg := codegenutil.CurrentPackage(); len(pkg) != 0 { - genericArgs.OutputPackagePath = path.Join(pkg, "pkg/client/clientset") - } - - return genericArgs, customArgs } -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet, inputBase string) { - gvsBuilder := NewGroupVersionsBuilder(&ca.Groups) - pflag.Var(NewGVPackagesValue(gvsBuilder, nil), "input", "group/versions that client-gen will generate clients for. At most one version per group is allowed. Specified in the format \"group1/version1,group2/version2...\".") - pflag.Var(NewGVTypesValue(&ca.IncludedTypesOverrides, []string{}), "included-types-overrides", "list of group/version/type for which client should be generated. By default, client is generated for all types which have genclient in types.go. This overrides that. For each groupVersion in this list, only the types mentioned here will be included. The default check of genclient will be used for other group versions.") - pflag.Var(NewInputBasePathValue(gvsBuilder, inputBase), "input-base", "base path to look for the api group.") - pflag.StringVarP(&ca.ClientsetName, "clientset-name", "n", ca.ClientsetName, "the name of the generated clientset package.") - pflag.StringVarP(&ca.ClientsetAPIPath, "clientset-api-path", "", ca.ClientsetAPIPath, "the value of default API HTTP path, starting with / and without trailing /.") - pflag.BoolVar(&ca.ClientsetOnly, "clientset-only", ca.ClientsetOnly, "when set, client-gen only generates the clientset shell, without generating the individual typed clients") - pflag.BoolVar(&ca.FakeClient, "fake-clientset", ca.FakeClient, "when set, client-gen will generate the fake clientset that can be used in tests") - - fs.StringSliceVar(&ca.PluralExceptions, "plural-exceptions", ca.PluralExceptions, "list of comma separated plural exception definitions in Type:PluralizedType form") - fs.StringVar(&ca.ApplyConfigurationPackage, "apply-configuration-package", ca.ApplyConfigurationPackage, "optional package of apply configurations, generated by applyconfiguration-gen, that are required to generate Apply functions for each type in the clientset. By default Apply functions are not generated.") +func (args *Args) AddFlags(fs *pflag.FlagSet, inputBase string) { + gvsBuilder := NewGroupVersionsBuilder(&args.Groups) + fs.StringVar(&args.OutputDir, "output-dir", "", + "the base directory under which to generate results") + fs.StringVar(&args.OutputPkg, "output-pkg", args.OutputPkg, + "the Go import-path of the generated results") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") + fs.Var(NewGVPackagesValue(gvsBuilder, nil), "input", + "group/versions that client-gen will generate clients for. At most one version per group is allowed. Specified in the format \"group1/version1,group2/version2...\".") + fs.Var(NewGVTypesValue(&args.IncludedTypesOverrides, []string{}), "included-types-overrides", + "list of group/version/type for which client should be generated. By default, client is generated for all types which have genclient in types.go. This overrides that. For each groupVersion in this list, only the types mentioned here will be included. The default check of genclient will be used for other group versions.") + fs.Var(NewInputBasePathValue(gvsBuilder, inputBase), "input-base", + "base path to look for the api group.") + fs.StringVarP(&args.ClientsetName, "clientset-name", "n", args.ClientsetName, + "the name of the generated clientset package.") + fs.StringVarP(&args.ClientsetAPIPath, "clientset-api-path", "", args.ClientsetAPIPath, + "the value of default API HTTP path, starting with / and without trailing /.") + fs.BoolVar(&args.ClientsetOnly, "clientset-only", args.ClientsetOnly, + "when set, client-gen only generates the clientset shell, without generating the individual typed clients") + fs.BoolVar(&args.FakeClient, "fake-clientset", args.FakeClient, + "when set, client-gen will generate the fake clientset that can be used in tests") + fs.StringSliceVar(&args.PluralExceptions, "plural-exceptions", args.PluralExceptions, + "list of comma separated plural exception definitions in Type:PluralizedType form") + fs.StringVar(&args.ApplyConfigurationPackage, "apply-configuration-package", args.ApplyConfigurationPackage, + "optional package of apply configurations, generated by applyconfiguration-gen, that are required to generate Apply functions for each type in the clientset. By default Apply functions are not generated.") // support old flags - fs.SetNormalizeFunc(mapFlagName("clientset-path", "output-package", fs.GetNormalizeFunc())) + fs.SetNormalizeFunc(mapFlagName("clientset-path", "output-pkg", fs.GetNormalizeFunc())) } -func Validate(genericArgs *args.GeneratorArgs) error { - customArgs := genericArgs.CustomArgs.(*CustomArgs) - - if len(genericArgs.OutputPackagePath) == 0 { - return fmt.Errorf("output package cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputDir) == 0 { + return fmt.Errorf("--output-dir must be specified") + } + if len(args.OutputPkg) == 0 { + return fmt.Errorf("--output-pkg must be specified") } - if len(customArgs.ClientsetName) == 0 { - return fmt.Errorf("clientset name cannot be empty") + if len(args.ClientsetName) == 0 { + return fmt.Errorf("--clientset-name must be specified") } - if len(customArgs.ClientsetAPIPath) == 0 { - return fmt.Errorf("clientset API path cannot be empty") + if len(args.ClientsetAPIPath) == 0 { + return fmt.Errorf("--clientset-api-path cannot be empty") } return nil } // GroupVersionPackages returns a map from GroupVersion to the package with the types.go. -func (ca *CustomArgs) GroupVersionPackages() map[types.GroupVersion]string { +func (args *Args) GroupVersionPackages() map[types.GroupVersion]string { res := map[types.GroupVersion]string{} - for _, pkg := range ca.Groups { + for _, pkg := range args.Groups { for _, v := range pkg.Versions { res[types.GroupVersion{Group: pkg.Group, Version: v.Version}] = v.Package } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages.go index 50d29a95be1..f5e7f4063aa 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages.go @@ -129,7 +129,9 @@ func (p *groupVersionsBuilder) update() error { versionPkg := types.PackageVersion{Package: path.Join(p.importBasePath, pth, gv.Group.NonEmpty(), gv.Version.String()), Version: gv.Version} if group, ok := seenGroups[gv.Group]; ok { - seenGroups[gv.Group].Versions = append(group.Versions, versionPkg) + vers := group.Versions + vers = append(vers, versionPkg) + seenGroups[gv.Group].Versions = vers } else { seenGroups[gv.Group] = &types.GroupVersions{ PackageName: gv.Group.NonEmpty(), diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go index ef4466d8005..84193f91503 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go @@ -18,21 +18,21 @@ limitations under the License. package generators import ( + "fmt" + "path" "path/filepath" "strings" - clientgenargs "k8s.io/code-generator/cmd/client-gen/args" + "k8s.io/code-generator/cmd/client-gen/args" "k8s.io/code-generator/cmd/client-gen/generators/fake" "k8s.io/code-generator/cmd/client-gen/generators/scheme" "k8s.io/code-generator/cmd/client-gen/generators/util" - "k8s.io/code-generator/cmd/client-gen/path" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" codegennamer "k8s.io/code-generator/pkg/namer" - genutil "k8s.io/code-generator/pkg/util" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) @@ -128,31 +128,35 @@ func DefaultNameSystem() string { return "public" } -func packageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clientsetPackage string, groupPackageName string, groupGoName string, apiPath string, srcTreePath string, inputPackage string, applyBuilderPackage string, boilerplate []byte) generator.Package { - groupVersionClientPackage := filepath.Join(clientsetPackage, "typed", strings.ToLower(groupPackageName), strings.ToLower(gv.Version.NonEmpty())) - return &generator.DefaultPackage{ - PackageName: strings.ToLower(gv.Version.NonEmpty()), - PackagePath: groupVersionClientPackage, - HeaderText: boilerplate, - PackageDocumentation: []byte("// This package has the automatically generated typed clients.\n"), - // GeneratorFunc returns a list of generators. Each generator makes a +func targetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clientsetDir, clientsetPkg string, groupPkgName string, groupGoName string, apiPath string, inputPkg string, applyBuilderPkg string, boilerplate []byte) generator.Target { + subdir := []string{"typed", strings.ToLower(groupPkgName), strings.ToLower(gv.Version.NonEmpty())} + gvDir := filepath.Join(clientsetDir, filepath.Join(subdir...)) + gvPkg := path.Join(clientsetPkg, path.Join(subdir...)) + + return &generator.SimpleTarget{ + PkgName: strings.ToLower(gv.Version.NonEmpty()), + PkgPath: gvPkg, + PkgDir: gvDir, + HeaderComment: boilerplate, + PkgDocComment: []byte("// This package has the automatically generated typed clients.\n"), + // GeneratorsFunc returns a list of generators. Each generator makes a // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = []generator.Generator{ // Always generate a "doc.go" file. - generator.DefaultGen{OptionalName: "doc"}, + generator.GoGenerator{OutputFilename: "doc.go"}, } // Since we want a file per type that we generate a client for, we // have to provide a function for this. for _, t := range typeList { generators = append(generators, &genClientForType{ - DefaultGen: generator.DefaultGen{ - OptionalName: strings.ToLower(c.Namers["private"].Name(t)), + GoGenerator: generator.GoGenerator{ + OutputFilename: strings.ToLower(c.Namers["private"].Name(t)) + ".go", }, - outputPackage: groupVersionClientPackage, - inputPackage: inputPackage, - clientsetPackage: clientsetPackage, - applyConfigurationPackage: applyBuilderPackage, + outputPackage: gvPkg, + inputPackage: inputPkg, + clientsetPackage: clientsetPkg, + applyConfigurationPackage: applyBuilderPkg, group: gv.Group.NonEmpty(), version: gv.Version.String(), groupGoName: groupGoName, @@ -162,12 +166,12 @@ func packageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, cli } generators = append(generators, &genGroup{ - DefaultGen: generator.DefaultGen{ - OptionalName: groupPackageName + "_client", + GoGenerator: generator.GoGenerator{ + OutputFilename: groupPkgName + "_client.go", }, - outputPackage: groupVersionClientPackage, - inputPackage: inputPackage, - clientsetPackage: clientsetPackage, + outputPackage: gvPkg, + inputPackage: inputPkg, + clientsetPackage: clientsetPkg, group: gv.Group.NonEmpty(), version: gv.Version.String(), groupGoName: groupGoName, @@ -176,11 +180,11 @@ func packageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, cli imports: generator.NewImportTracker(), }) - expansionFileName := "generated_expansion" + expansionFileName := "generated_expansion.go" generators = append(generators, &genExpansion{ - groupPackagePath: filepath.Join(srcTreePath, groupVersionClientPackage), - DefaultGen: generator.DefaultGen{ - OptionalName: expansionFileName, + groupPackagePath: gvDir, + GoGenerator: generator.GoGenerator{ + OutputFilename: expansionFileName, }, types: typeList, }) @@ -193,23 +197,23 @@ func packageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, cli } } -func packageForClientset(customArgs *clientgenargs.CustomArgs, clientsetPackage string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Package { - return &generator.DefaultPackage{ - PackageName: customArgs.ClientsetName, - PackagePath: clientsetPackage, - HeaderText: boilerplate, - // GeneratorFunc returns a list of generators. Each generator generates a +func targetForClientset(args *args.Args, clientsetDir, clientsetPkg string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Target { + return &generator.SimpleTarget{ + PkgName: args.ClientsetName, + PkgPath: clientsetPkg, + PkgDir: clientsetDir, + HeaderComment: boilerplate, + // GeneratorsFunc returns a list of generators. Each generator generates a // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = []generator.Generator{ &genClientset{ - DefaultGen: generator.DefaultGen{ - OptionalName: "clientset", + GoGenerator: generator.GoGenerator{ + OutputFilename: "clientset.go", }, - groups: customArgs.Groups, + groups: args.Groups, groupGoNames: groupGoNames, - clientsetPackage: clientsetPackage, - outputPackage: customArgs.ClientsetName, + clientsetPackage: clientsetPkg, imports: generator.NewImportTracker(), }, } @@ -218,13 +222,14 @@ func packageForClientset(customArgs *clientgenargs.CustomArgs, clientsetPackage } } -func packageForScheme(customArgs *clientgenargs.CustomArgs, clientsetPackage string, srcTreePath string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Package { - schemePackage := filepath.Join(clientsetPackage, "scheme") +func targetForScheme(args *args.Args, clientsetDir, clientsetPkg string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Target { + schemeDir := filepath.Join(clientsetDir, "scheme") + schemePkg := path.Join(clientsetPkg, "scheme") // create runtime.Registry for internal client because it has to know about group versions internalClient := false NextGroup: - for _, group := range customArgs.Groups { + for _, group := range args.Groups { for _, v := range group.Versions { if v.String() == "" { internalClient = true @@ -233,26 +238,27 @@ NextGroup: } } - return &generator.DefaultPackage{ - PackageName: "scheme", - PackagePath: schemePackage, - HeaderText: boilerplate, - PackageDocumentation: []byte("// This package contains the scheme of the automatically generated clientset.\n"), - // GeneratorFunc returns a list of generators. Each generator generates a + return &generator.SimpleTarget{ + PkgName: "scheme", + PkgPath: schemePkg, + PkgDir: schemeDir, + HeaderComment: boilerplate, + PkgDocComment: []byte("// This package contains the scheme of the automatically generated clientset.\n"), + // GeneratorsFunc returns a list of generators. Each generator generates a // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = []generator.Generator{ // Always generate a "doc.go" file. - generator.DefaultGen{OptionalName: "doc"}, + generator.GoGenerator{OutputFilename: "doc.go"}, &scheme.GenScheme{ - DefaultGen: generator.DefaultGen{ - OptionalName: "register", + GoGenerator: generator.GoGenerator{ + OutputFilename: "register.go", }, - InputPackages: customArgs.GroupVersionPackages(), - OutputPackage: schemePackage, - OutputPath: filepath.Join(srcTreePath, schemePackage), - Groups: customArgs.Groups, + InputPackages: args.GroupVersionPackages(), + OutputPkg: schemePkg, + OutputPath: schemeDir, + Groups: args.Groups, GroupGoNames: groupGoNames, ImportTracker: generator.NewImportTracker(), CreateRegistry: internalClient, @@ -268,12 +274,12 @@ NextGroup: // first field (somegroup) as the name of the group in Go code, e.g. as the func name in a clientset. // // If the first field of the groupName is not unique within the clientset, use "// +groupName=unique -func applyGroupOverrides(universe types.Universe, customArgs *clientgenargs.CustomArgs) { +func applyGroupOverrides(universe types.Universe, args *args.Args) { // Create a map from "old GV" to "new GV" so we know what changes we need to make. changes := make(map[clientgentypes.GroupVersion]clientgentypes.GroupVersion) - for gv, inputDir := range customArgs.GroupVersionPackages() { - p := universe.Package(genutil.Vendorless(inputDir)) - if override := types.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { + for gv, inputDir := range args.GroupVersionPackages() { + p := universe.Package(inputDir) + if override := gengo.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { newGV := clientgentypes.GroupVersion{ Group: clientgentypes.Group(override[0]), Version: gv.Version, @@ -282,9 +288,9 @@ func applyGroupOverrides(universe types.Universe, customArgs *clientgenargs.Cust } } - // Modify customArgs.Groups based on the groupName overrides. - newGroups := make([]clientgentypes.GroupVersions, 0, len(customArgs.Groups)) - for _, gvs := range customArgs.Groups { + // Modify args.Groups based on the groupName overrides. + newGroups := make([]clientgentypes.GroupVersions, 0, len(args.Groups)) + for _, gvs := range args.Groups { gv := clientgentypes.GroupVersion{ Group: gvs.Group, Version: gvs.Versions[0].Version, // we only need a version, and the first will do @@ -302,37 +308,64 @@ func applyGroupOverrides(universe types.Universe, customArgs *clientgenargs.Cust newGroups = append(newGroups, gvs) } } - customArgs.Groups = newGroups + args.Groups = newGroups } -// Packages makes the client package definition. -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +// Because we try to assemble inputs from an input-base and a set of +// group-version arguments, sometimes that comes in as a filesystem path. This +// function rewrites them all as their canonical Go import-paths. +// +// TODO: Change this tool to just take inputs as Go "patterns" like every other +// gengo tool, then extract GVs from those. +func sanitizePackagePaths(context *generator.Context, args *args.Args) error { + for i := range args.Groups { + pkg := &args.Groups[i] + for j := range pkg.Versions { + ver := &pkg.Versions[j] + input := ver.Package + p := context.Universe[input] + if p == nil || p.Name == "" { + pkgs, err := context.FindPackages(input) + if err != nil { + return fmt.Errorf("can't find input package %q: %w", input, err) + } + p = context.Universe[pkgs[0]] + if p == nil { + return fmt.Errorf("can't find input package %q in universe", input) + } + ver.Package = p.Path + } + } + } + return nil +} + +// GetTargets makes the client target definition. +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, "", gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - customArgs, ok := arguments.CustomArgs.(*clientgenargs.CustomArgs) - if !ok { - klog.Fatalf("cannot convert arguments.CustomArgs to clientgenargs.CustomArgs") - } - includedTypesOverrides := customArgs.IncludedTypesOverrides + includedTypesOverrides := args.IncludedTypesOverrides - applyGroupOverrides(context.Universe, customArgs) + if err := sanitizePackagePaths(context, args); err != nil { + klog.Fatalf("cannot sanitize inputs: %v", err) + } + applyGroupOverrides(context.Universe, args) gvToTypes := map[clientgentypes.GroupVersion][]*types.Type{} groupGoNames := make(map[clientgentypes.GroupVersion]string) - for gv, inputDir := range customArgs.GroupVersionPackages() { - p := context.Universe.Package(path.Vendorless(inputDir)) + for gv, inputDir := range args.GroupVersionPackages() { + p := context.Universe.Package(inputDir) // If there's a comment of the form "// +groupGoName=SomeUniqueShortName", use that as // the Go group identifier in CamelCase. It defaults groupGoNames[gv] = namer.IC(strings.Split(gv.Group.NonEmpty(), ".")[0]) - if override := types.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { groupGoNames[gv] = namer.IC(override[0]) } - // Package are indexed with the vendor prefix stripped for n, t := range p.Types { // filter out types which are not included in user specified overrides. typesOverride, ok := includedTypesOverrides[gv] @@ -361,33 +394,43 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat } } - var packageList []generator.Package - clientsetPackage := filepath.Join(arguments.OutputPackagePath, customArgs.ClientsetName) + clientsetDir := filepath.Join(args.OutputDir, args.ClientsetName) + clientsetPkg := path.Join(args.OutputPkg, args.ClientsetName) + + var targetList []generator.Target - packageList = append(packageList, packageForClientset(customArgs, clientsetPackage, groupGoNames, boilerplate)) - packageList = append(packageList, packageForScheme(customArgs, clientsetPackage, arguments.OutputBase, groupGoNames, boilerplate)) - if customArgs.FakeClient { - packageList = append(packageList, fake.PackageForClientset(customArgs, clientsetPackage, groupGoNames, boilerplate)) + targetList = append(targetList, + targetForClientset(args, clientsetDir, clientsetPkg, groupGoNames, boilerplate)) + targetList = append(targetList, + targetForScheme(args, clientsetDir, clientsetPkg, groupGoNames, boilerplate)) + if args.FakeClient { + targetList = append(targetList, + fake.TargetForClientset(args, clientsetDir, clientsetPkg, groupGoNames, boilerplate)) } // If --clientset-only=true, we don't regenerate the individual typed clients. - if customArgs.ClientsetOnly { - return generator.Packages(packageList) + if args.ClientsetOnly { + return []generator.Target(targetList) } orderer := namer.Orderer{Namer: namer.NewPrivateNamer(0)} - gvPackages := customArgs.GroupVersionPackages() - for _, group := range customArgs.Groups { + gvPackages := args.GroupVersionPackages() + for _, group := range args.Groups { for _, version := range group.Versions { gv := clientgentypes.GroupVersion{Group: group.Group, Version: version.Version} types := gvToTypes[gv] inputPath := gvPackages[gv] - packageList = append(packageList, packageForGroup(gv, orderer.OrderTypes(types), clientsetPackage, group.PackageName, groupGoNames[gv], customArgs.ClientsetAPIPath, arguments.OutputBase, inputPath, customArgs.ApplyConfigurationPackage, boilerplate)) - if customArgs.FakeClient { - packageList = append(packageList, fake.PackageForGroup(gv, orderer.OrderTypes(types), clientsetPackage, group.PackageName, groupGoNames[gv], inputPath, customArgs.ApplyConfigurationPackage, boilerplate)) + targetList = append(targetList, + targetForGroup( + gv, orderer.OrderTypes(types), clientsetDir, clientsetPkg, + group.PackageName, groupGoNames[gv], args.ClientsetAPIPath, + inputPath, args.ApplyConfigurationPackage, boilerplate)) + if args.FakeClient { + targetList = append(targetList, + fake.TargetForGroup(gv, orderer.OrderTypes(types), clientsetDir, clientsetPkg, group.PackageName, groupGoNames[gv], inputPath, args.ApplyConfigurationPackage, boilerplate)) } } } - return generator.Packages(packageList) + return targetList } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go index 1794909148f..47b90ed570f 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go @@ -17,45 +17,48 @@ limitations under the License. package fake import ( + "path" "path/filepath" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/types" - clientgenargs "k8s.io/code-generator/cmd/client-gen/args" + "k8s.io/code-generator/cmd/client-gen/args" scheme "k8s.io/code-generator/cmd/client-gen/generators/scheme" "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" ) -func PackageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clientsetPackage string, groupPackageName string, groupGoName string, inputPackage string, applyBuilderPackage string, boilerplate []byte) generator.Package { - outputPackage := filepath.Join(clientsetPackage, "typed", strings.ToLower(groupPackageName), strings.ToLower(gv.Version.NonEmpty()), "fake") +func TargetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clientsetDir, clientsetPkg string, groupPkgName string, groupGoName string, inputPkg string, applyBuilderPackage string, boilerplate []byte) generator.Target { // TODO: should make this a function, called by here and in client-generator.go - realClientPackage := filepath.Join(clientsetPackage, "typed", strings.ToLower(groupPackageName), strings.ToLower(gv.Version.NonEmpty())) - return &generator.DefaultPackage{ - PackageName: "fake", - PackagePath: outputPackage, - HeaderText: boilerplate, - PackageDocumentation: []byte( - `// Package fake has the automatically generated clients. -`), - // GeneratorFunc returns a list of generators. Each generator makes a + subdir := []string{"typed", strings.ToLower(groupPkgName), strings.ToLower(gv.Version.NonEmpty())} + outputDir := filepath.Join(clientsetDir, filepath.Join(subdir...), "fake") + outputPkg := path.Join(clientsetPkg, path.Join(subdir...), "fake") + realClientPkg := path.Join(clientsetPkg, path.Join(subdir...)) + + return &generator.SimpleTarget{ + PkgName: "fake", + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + PkgDocComment: []byte("// Package fake has the automatically generated clients.\n"), + // GeneratorsFunc returns a list of generators. Each generator makes a // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = []generator.Generator{ // Always generate a "doc.go" file. - generator.DefaultGen{OptionalName: "doc"}, + generator.GoGenerator{OutputFilename: "doc.go"}, } // Since we want a file per type that we generate a client for, we // have to provide a function for this. for _, t := range typeList { generators = append(generators, &genFakeForType{ - DefaultGen: generator.DefaultGen{ - OptionalName: "fake_" + strings.ToLower(c.Namers["private"].Name(t)), + GoGenerator: generator.GoGenerator{ + OutputFilename: "fake_" + strings.ToLower(c.Namers["private"].Name(t)) + ".go", }, - outputPackage: outputPackage, - inputPackage: inputPackage, + outputPackage: outputPkg, + inputPackage: inputPkg, group: gv.Group.NonEmpty(), version: gv.Version.String(), groupGoName: groupGoName, @@ -66,11 +69,11 @@ func PackageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, cli } generators = append(generators, &genFakeForGroup{ - DefaultGen: generator.DefaultGen{ - OptionalName: "fake_" + groupPackageName + "_client", + GoGenerator: generator.GoGenerator{ + OutputFilename: "fake_" + groupPkgName + "_client.go", }, - outputPackage: outputPackage, - realClientPackage: realClientPackage, + outputPackage: outputPkg, + realClientPackage: realClientPkg, group: gv.Group.NonEmpty(), version: gv.Version.String(), groupGoName: groupGoName, @@ -85,41 +88,39 @@ func PackageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, cli } } -func PackageForClientset(customArgs *clientgenargs.CustomArgs, clientsetPackage string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Package { - return &generator.DefaultPackage{ +func TargetForClientset(args *args.Args, clientsetDir, clientsetPkg string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Target { + return &generator.SimpleTarget{ // TODO: we'll generate fake clientset for different release in the future. // Package name and path are hard coded for now. - PackageName: "fake", - PackagePath: filepath.Join(clientsetPackage, "fake"), - HeaderText: boilerplate, - PackageDocumentation: []byte( - `// This package has the automatically generated fake clientset. -`), - // GeneratorFunc returns a list of generators. Each generator generates a + PkgName: "fake", + PkgPath: path.Join(clientsetPkg, "fake"), + PkgDir: filepath.Join(clientsetDir, "fake"), + HeaderComment: boilerplate, + PkgDocComment: []byte("// This package has the automatically generated fake clientset.\n"), + // GeneratorsFunc returns a list of generators. Each generator generates a // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = []generator.Generator{ // Always generate a "doc.go" file. - generator.DefaultGen{OptionalName: "doc"}, + generator.GoGenerator{OutputFilename: "doc.go"}, &genClientset{ - DefaultGen: generator.DefaultGen{ - OptionalName: "clientset_generated", + GoGenerator: generator.GoGenerator{ + OutputFilename: "clientset_generated.go", }, - groups: customArgs.Groups, + groups: args.Groups, groupGoNames: groupGoNames, - fakeClientsetPackage: clientsetPackage, - outputPackage: "fake", + fakeClientsetPackage: clientsetPkg, imports: generator.NewImportTracker(), - realClientsetPackage: clientsetPackage, + realClientsetPackage: clientsetPkg, }, &scheme.GenScheme{ - DefaultGen: generator.DefaultGen{ - OptionalName: "register", + GoGenerator: generator.GoGenerator{ + OutputFilename: "register.go", }, - InputPackages: customArgs.GroupVersionPackages(), - OutputPackage: clientsetPackage, - Groups: customArgs.Groups, + InputPackages: args.GroupVersionPackages(), + OutputPkg: clientsetPkg, + Groups: args.Groups, GroupGoNames: groupGoNames, ImportTracker: generator.NewImportTracker(), PrivateScheme: true, diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go index cd731cb9d66..0e3051114e7 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go @@ -19,33 +19,32 @@ package fake import ( "fmt" "io" - "path/filepath" + "path" "strings" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // genClientset generates a package for a clientset. type genClientset struct { - generator.DefaultGen + generator.GoGenerator groups []clientgentypes.GroupVersions groupGoNames map[clientgentypes.GroupVersion]string - fakeClientsetPackage string - outputPackage string + fakeClientsetPackage string // must be a Go import-path imports namer.ImportTracker clientsetGenerated bool // the import path of the generated real clientset. - realClientsetPackage string + realClientsetPackage string // must be a Go import-path } var _ generator.Generator = &genClientset{} func (g *genClientset) Namers(c *generator.Context) namer.NameSystems { return namer.NameSystems{ - "raw": namer.NewRawNamer(g.outputPackage, g.imports), + "raw": namer.NewRawNamer(g.fakeClientsetPackage, g.imports), } } @@ -60,8 +59,8 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) for _, group := range g.groups { for _, version := range group.Versions { - groupClientPackage := filepath.Join(g.fakeClientsetPackage, "typed", strings.ToLower(group.PackageName), strings.ToLower(version.NonEmpty())) - fakeGroupClientPackage := filepath.Join(groupClientPackage, "fake") + groupClientPackage := path.Join(g.fakeClientsetPackage, "typed", strings.ToLower(group.PackageName), strings.ToLower(version.NonEmpty())) + fakeGroupClientPackage := path.Join(groupClientPackage, "fake") groupAlias := strings.ToLower(g.groupGoNames[clientgentypes.GroupVersion{Group: group.Group, Version: version.Version}]) imports = append(imports, fmt.Sprintf("%s%s \"%s\"", groupAlias, strings.ToLower(version.NonEmpty()), groupClientPackage)) diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go index 8f4d5785ef9..d9c9b8bac42 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go @@ -19,21 +19,21 @@ package fake import ( "fmt" "io" - "path/filepath" + "path" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" ) // genFakeForGroup produces a file for a group client, e.g. ExtensionsClient for the extension group. type genFakeForGroup struct { - generator.DefaultGen - outputPackage string - realClientPackage string + generator.GoGenerator + outputPackage string // must be a Go import-path + realClientPackage string // must be a Go import-path group string version string groupGoName string @@ -64,7 +64,7 @@ func (g *genFakeForGroup) Namers(c *generator.Context) namer.NameSystems { func (g *genFakeForGroup) Imports(c *generator.Context) (imports []string) { imports = g.imports.ImportLines() if len(g.types) != 0 { - imports = append(imports, fmt.Sprintf("%s \"%s\"", strings.ToLower(filepath.Base(g.realClientPackage)), g.realClientPackage)) + imports = append(imports, fmt.Sprintf("%s \"%s\"", strings.ToLower(path.Base(g.realClientPackage)), g.realClientPackage)) } return imports } @@ -90,7 +90,7 @@ func (g *genFakeForGroup) GenerateType(c *generator.Context, t *types.Type, w io "type": t, "GroupGoName": g.groupGoName, "Version": namer.IC(g.version), - "realClientPackage": strings.ToLower(filepath.Base(g.realClientPackage)), + "realClientPackage": strings.ToLower(path.Base(g.realClientPackage)), } if tags.NonNamespaced { sw.Do(getterImplNonNamespaced, wrapper) diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go index 28b829cc139..6b032fd99c2 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go @@ -18,21 +18,20 @@ package fake import ( "io" - gopath "path" - "path/filepath" + "path" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" ) // genFakeForType produces a file for each top-level type. type genFakeForType struct { - generator.DefaultGen - outputPackage string + generator.GoGenerator + outputPackage string // Must be a Go import-path group string version string groupGoName string @@ -87,7 +86,7 @@ func hasObjectMeta(t *types.Type) bool { // GenerateType makes the body of a file implementing the individual typed client for type t. func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { sw := generator.NewSnippetWriter(w, c, "$", "$") - pkg := filepath.Base(t.Name.Package) + pkg := path.Base(t.Name.Package) tags, err := util.ParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) if err != nil { return err @@ -153,7 +152,7 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. if generateApply { // Generated apply builder type references required for generated Apply function _, gvString := util.ParsePathGroupVersion(g.inputPackage) - m["inputApplyConfig"] = types.Ref(gopath.Join(g.applyConfigurationPackage, gvString), t.Name.Name+"ApplyConfiguration") + m["inputApplyConfig"] = types.Ref(path.Join(g.applyConfigurationPackage, gvString), t.Name.Name+"ApplyConfiguration") } if tags.NonNamespaced { @@ -237,7 +236,7 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. m["resultType"] = &resultType m["subresourcePath"] = e.SubResourcePath if e.HasVerb("apply") { - m["inputApplyConfig"] = types.Ref(gopath.Join(g.applyConfigurationPackage, inputGVString), inputType.Name.Name+"ApplyConfiguration") + m["inputApplyConfig"] = types.Ref(path.Join(g.applyConfigurationPackage, inputGVString), inputType.Name.Name+"ApplyConfiguration") } if e.HasVerb("get") { @@ -300,7 +299,9 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. // TODO: Make the verbs in templates parametrized so the strings.Replace() is // not needed. func adjustTemplate(name, verbType, template string) string { - return strings.Replace(template, " "+strings.Title(verbType), " "+name, -1) + //nolint:staticcheck + // TODO: convert this to use golang.org/x/text/cases + return strings.ReplaceAll(template, " "+strings.Title(verbType), " "+name) } // template for the struct that implements the type's interface diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go index 6bf1ca37f88..0c043cee9e8 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go @@ -19,22 +19,21 @@ package generators import ( "fmt" "io" - "path/filepath" + "path" "strings" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // genClientset generates a package for a clientset. type genClientset struct { - generator.DefaultGen + generator.GoGenerator groups []clientgentypes.GroupVersions groupGoNames map[clientgentypes.GroupVersion]string - clientsetPackage string - outputPackage string + clientsetPackage string // must be a Go import-path imports namer.ImportTracker clientsetGenerated bool } @@ -43,7 +42,7 @@ var _ generator.Generator = &genClientset{} func (g *genClientset) Namers(c *generator.Context) namer.NameSystems { return namer.NameSystems{ - "raw": namer.NewRawNamer(g.outputPackage, g.imports), + "raw": namer.NewRawNamer(g.clientsetPackage, g.imports), } } @@ -58,7 +57,7 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) for _, group := range g.groups { for _, version := range group.Versions { - typedClientPath := filepath.Join(g.clientsetPackage, "typed", strings.ToLower(group.PackageName), strings.ToLower(version.NonEmpty())) + typedClientPath := path.Join(g.clientsetPackage, "typed", strings.ToLower(group.PackageName), strings.ToLower(version.NonEmpty())) groupAlias := strings.ToLower(g.groupGoNames[clientgentypes.GroupVersion{Group: group.Group, Version: version.Version}]) imports = append(imports, fmt.Sprintf("%s%s \"%s\"", groupAlias, strings.ToLower(version.NonEmpty()), typedClientPath)) } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_expansion.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_expansion.go index f47c079e02f..5971cc5bcd2 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_expansion.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_expansion.go @@ -22,13 +22,13 @@ import ( "path/filepath" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/types" ) // genExpansion produces a file for a group client, e.g. ExtensionsClient for the extension group. type genExpansion struct { - generator.DefaultGen + generator.GoGenerator groupPackagePath string // types in a group types []*types.Type diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go index 30284990037..2a7ac1e9a49 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go @@ -18,19 +18,19 @@ package generators import ( "io" - "path/filepath" + "path" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" - "k8s.io/code-generator/cmd/client-gen/path" ) // genGroup produces a file for a group client, e.g. ExtensionsClient for the extension group. type genGroup struct { - generator.DefaultGen + generator.GoGenerator outputPackage string group string version string @@ -40,7 +40,7 @@ type genGroup struct { types []*types.Type imports namer.ImportTracker inputPackage string - clientsetPackage string + clientsetPackage string // must be a Go import-path // If the genGroup has been called. This generator should only execute once. called bool } @@ -64,7 +64,7 @@ func (g *genGroup) Namers(c *generator.Context) namer.NameSystems { func (g *genGroup) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) - imports = append(imports, filepath.Join(g.clientsetPackage, "scheme")) + imports = append(imports, path.Join(g.clientsetPackage, "scheme")) return } @@ -83,8 +83,8 @@ func (g *genGroup) GenerateType(c *generator.Context, t *types.Type, w io.Writer groupName = "" } // allow user to define a group name that's different from the one parsed from the directory. - p := c.Universe.Package(path.Vendorless(g.inputPackage)) - if override := types.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { + p := c.Universe.Package(g.inputPackage) + if override := gengo.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { groupName = override[0] } @@ -104,7 +104,7 @@ func (g *genGroup) GenerateType(c *generator.Context, t *types.Type, w io.Writer "RESTHTTPClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "HTTPClientFor"}), "restRESTClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientFor"}), "restRESTClientForConfigAndClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientForConfigAndClient"}), - "SchemeGroupVersion": c.Universe.Variable(types.Name{Package: path.Vendorless(g.inputPackage), Name: "SchemeGroupVersion"}), + "SchemeGroupVersion": c.Universe.Variable(types.Name{Package: g.inputPackage, Name: "SchemeGroupVersion"}), } sw.Do(groupInterfaceTemplate, m) sw.Do(groupClientTemplate, m) diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go index fe63dd19895..e65b86cbd0f 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go @@ -19,23 +19,22 @@ package generators import ( "io" "path" - "path/filepath" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" ) // genClientForType produces a file for each top-level type. type genClientForType struct { - generator.DefaultGen - outputPackage string + generator.GoGenerator + outputPackage string // must be a Go import-path inputPackage string - clientsetPackage string - applyConfigurationPackage string + clientsetPackage string // must be a Go import-path + applyConfigurationPackage string // must be a Go import-path group string version string groupGoName string @@ -81,7 +80,7 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i defaultVerbTemplates := buildDefaultVerbTemplates(generateApply) subresourceDefaultVerbTemplates := buildSubresourceDefaultVerbTemplates(generateApply) sw := generator.NewSnippetWriter(w, c, "$", "$") - pkg := filepath.Base(t.Name.Package) + pkg := path.Base(t.Name.Package) tags, err := util.ParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) if err != nil { return err @@ -120,8 +119,12 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i } var updatedVerbtemplate string if _, exists := subresourceDefaultVerbTemplates[e.VerbType]; e.IsSubresource() && exists { + //nolint:staticcheck + // TODO: convert this to use golang.org/x/text/cases updatedVerbtemplate = e.VerbName + "(" + strings.TrimPrefix(subresourceDefaultVerbTemplates[e.VerbType], strings.Title(e.VerbType)+"(") } else { + //nolint:staticcheck + // TODO: convert this to use golang.org/x/text/cases updatedVerbtemplate = e.VerbName + "(" + strings.TrimPrefix(defaultVerbTemplates[e.VerbType], strings.Title(e.VerbType)+"(") } extendedMethod := extendedInterfaceMethod{ @@ -167,7 +170,7 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "ApplyPatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "ApplyPatchType"}), "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}), "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), - "schemeParameterCodec": c.Universe.Variable(types.Name{Package: filepath.Join(g.clientsetPackage, "scheme"), Name: "ParameterCodec"}), + "schemeParameterCodec": c.Universe.Variable(types.Name{Package: path.Join(g.clientsetPackage, "scheme"), Name: "ParameterCodec"}), "jsonMarshal": c.Universe.Type(types.Name{Package: "encoding/json", Name: "Marshal"}), } @@ -345,7 +348,9 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i // TODO: Make the verbs in templates parametrized so the strings.Replace() is // not needed. func adjustTemplate(name, verbType, template string) string { - return strings.Replace(template, " "+strings.Title(verbType), " "+name, -1) + //nolint:staticcheck + // TODO: convert this to use golang.org/x/text/cases + return strings.ReplaceAll(template, " "+strings.Title(verbType), " "+name) } func generateInterface(defaultVerbTemplates map[string]string, tags util.Tags) string { diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go index a87d7571eb6..7229055799f 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go @@ -20,24 +20,24 @@ import ( "fmt" "io" "os" + "path" "path/filepath" "strings" - "k8s.io/code-generator/cmd/client-gen/path" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // GenScheme produces a package for a clientset with the scheme, codecs and parameter codecs. type GenScheme struct { - generator.DefaultGen - OutputPackage string + generator.GoGenerator + OutputPkg string // Must be a Go import-path + OutputPath string // optional Groups []clientgentypes.GroupVersions GroupGoNames map[clientgentypes.GroupVersion]string InputPackages map[clientgentypes.GroupVersion]string - OutputPath string ImportTracker namer.ImportTracker PrivateScheme bool CreateRegistry bool @@ -46,7 +46,7 @@ type GenScheme struct { func (g *GenScheme) Namers(c *generator.Context) namer.NameSystems { return namer.NameSystems{ - "raw": namer.NewRawNamer(g.OutputPackage, g.ImportTracker), + "raw": namer.NewRawNamer(g.OutputPkg, g.ImportTracker), } } @@ -66,14 +66,14 @@ func (g *GenScheme) Imports(c *generator.Context) (imports []string) { if g.CreateRegistry { // import the install package for internal clientsets instead of the type package with register.go if version.Version != "" { - packagePath = filepath.Dir(packagePath) + packagePath = path.Dir(packagePath) } - packagePath = filepath.Join(packagePath, "install") + packagePath = path.Join(packagePath, "install") - imports = append(imports, fmt.Sprintf("%s \"%s\"", groupAlias, path.Vendorless(packagePath))) + imports = append(imports, fmt.Sprintf("%s \"%s\"", groupAlias, packagePath)) break } else { - imports = append(imports, fmt.Sprintf("%s%s \"%s\"", groupAlias, strings.ToLower(version.Version.NonEmpty()), path.Vendorless(packagePath))) + imports = append(imports, fmt.Sprintf("%s%s \"%s\"", groupAlias, strings.ToLower(version.Version.NonEmpty()), packagePath)) } } } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags.go index e74de077629..5218dfad3b1 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags.go @@ -21,7 +21,7 @@ import ( "fmt" "strings" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" ) var supportedTags = []string{ @@ -192,7 +192,7 @@ func MustParseClientGenTags(lines []string) Tags { // tags are provided. func ParseClientGenTags(lines []string) (Tags, error) { ret := Tags{} - values := types.ExtractCommentTags("+", lines) + values := gengo.ExtractCommentTags("+", lines) var value []string value, ret.GenerateClient = values["genclient"] // Check the old format and error when used to avoid generating client when //+genclient=false diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/main.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/main.go index 64a1274dfc0..09866e93c36 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/main.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/main.go @@ -23,40 +23,44 @@ import ( "github.com/spf13/pflag" "k8s.io/klog/v2" - generatorargs "k8s.io/code-generator/cmd/client-gen/args" + "k8s.io/code-generator/cmd/client-gen/args" "k8s.io/code-generator/cmd/client-gen/generators" "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() + args := args.New() - // Override defaults. - // TODO: move this out of client-gen - genericArgs.OutputPackagePath = "k8s.io/kubernetes/pkg/client/clientset_generated/" - - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine, "k8s.io/kubernetes/pkg/apis") // TODO: move this input path out of client-gen + args.AddFlags(pflag.CommandLine, "k8s.io/kubernetes/pkg/apis") // TODO: move this input path out of client-gen flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() // add group version package as input dirs for gengo - for _, pkg := range customArgs.Groups { + inputPkgs := []string{} + for _, pkg := range args.Groups { for _, v := range pkg.Versions { - genericArgs.InputDirs = append(genericArgs.InputDirs, v.Package) + inputPkgs = append(inputPkgs, v.Package) } } - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } - if err := genericArgs.Execute( - generators.NameSystems(util.PluralExceptionListToMapOrDie(customArgs.PluralExceptions)), + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + + if err := gengo.Execute( + generators.NameSystems(util.PluralExceptionListToMapOrDie(args.PluralExceptions)), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + inputPkgs, ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/path/path.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/path/path.go deleted file mode 100644 index 19b269bdf28..00000000000 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/path/path.go +++ /dev/null @@ -1,31 +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 path - -import "strings" - -// Vendorless removes the longest match of "*/vendor/" from the front of p. -// It is useful if a package locates in vendor/, e.g., -// k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1, because gengo -// indexes the package with its import path, e.g., -// k8s.io/apimachinery/pkg/apis/meta/v1, -func Vendorless(p string) string { - if pos := strings.LastIndex(p, "/vendor/"); pos != -1 { - return p[pos+len("/vendor/"):] - } - return p -} diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/types/helpers.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/types/helpers.go index 59f2fd4449b..c84a7753177 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/types/helpers.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/client-gen/types/helpers.go @@ -22,7 +22,7 @@ import ( "sort" "strings" - "k8s.io/gengo/namer" + "k8s.io/gengo/v2/namer" ) // ToGroupVersion turns "group/version" string into a GroupVersion struct. It reports error @@ -116,6 +116,6 @@ func ToGroupInstallPackages(groups []GroupVersions, groupGoNames map[GroupVersio } // NormalizeGroupVersion calls normalizes the GroupVersion. -//func NormalizeGroupVersion(gv GroupVersion) GroupVersion { -// return GroupVersion{Group: gv.Group.NonEmpty(), Version: gv.Version, NonEmptyVersion: normalization.Version(gv.Version)} -//} +// func NormalizeGroupVersion(gv GroupVersion) GroupVersion { +// return GroupVersion{Group: gv.Group.NonEmpty(), Version: gv.Version, NonEmptyVersion: normalization.Version(gv.Version)} +// } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go index c69280b1063..cc61c48d49f 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go @@ -20,7 +20,6 @@ import ( "fmt" "github.com/spf13/pflag" - "k8s.io/gengo/args" ) // DefaultBasePeerDirs are the peer-dirs nearly everybody will use, i.e. those coming from @@ -31,8 +30,10 @@ var DefaultBasePeerDirs = []string{ "k8s.io/apimachinery/pkg/runtime", } -// CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs struct { +type Args struct { + // The filename of the generated results. + OutputFile string + // Base peer dirs which nearly everybody will use, i.e. outside of Kubernetes core. Peer dirs // are declared to make the generator pick up manually written conversion funcs from external // packages. @@ -52,39 +53,40 @@ type CustomArgs struct { // (within the allowed uses of unsafe) and is equivalent to a proposed Golang change to // allow structs that are identical to be assigned to each other. SkipUnsafe bool + + // GoHeaderFile is the path to a boilerplate header file for generated + // code. + GoHeaderFile string } -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{ +// New returns default arguments for the generator. +func New() *Args { + return &Args{ BasePeerDirs: DefaultBasePeerDirs, SkipUnsafe: false, } - genericArgs.CustomArgs = customArgs - genericArgs.OutputFileBaseName = "conversion_generated" - return genericArgs, customArgs } // AddFlags add the generator flags to the flag set. -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { - pflag.CommandLine.StringSliceVar(&ca.BasePeerDirs, "base-peer-dirs", ca.BasePeerDirs, +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputFile, "output-file", "generated.conversion.go", + "the name of the file to be generated") + fs.StringSliceVar(&args.BasePeerDirs, "base-peer-dirs", args.BasePeerDirs, "Comma-separated list of apimachinery import paths which are considered, after tag-specified peers, for conversions. Only change these if you have very good reasons.") - pflag.CommandLine.StringSliceVar(&ca.ExtraPeerDirs, "extra-peer-dirs", ca.ExtraPeerDirs, + fs.StringSliceVar(&args.ExtraPeerDirs, "extra-peer-dirs", args.ExtraPeerDirs, "Application specific comma-separated list of import paths which are considered, after tag-specified peers and base-peer-dirs, for conversions.") - pflag.CommandLine.StringSliceVar(&ca.ExtraDirs, "extra-dirs", ca.ExtraDirs, + fs.StringSliceVar(&args.ExtraDirs, "extra-dirs", args.ExtraDirs, "Application specific comma-separated list of import paths which are loaded and considered for callable conversions, but are not considered peers for conversion.") - pflag.CommandLine.BoolVar(&ca.SkipUnsafe, "skip-unsafe", ca.SkipUnsafe, + fs.BoolVar(&args.SkipUnsafe, "skip-unsafe", args.SkipUnsafe, "If true, will not generate code using unsafe pointer conversions; resulting code may be slower.") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - _ = genericArgs.CustomArgs.(*CustomArgs) - - if len(genericArgs.OutputFileBaseName) == 0 { - return fmt.Errorf("output file base name cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputFile) == 0 { + return fmt.Errorf("--output-file must be specified") } - return nil } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go index 5b7347971f1..f58130af255 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go @@ -20,20 +20,17 @@ import ( "bytes" "fmt" "io" - "path/filepath" + "path" "reflect" "sort" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - + "k8s.io/code-generator/cmd/conversion-gen/args" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" - - conversionargs "k8s.io/code-generator/cmd/conversion-gen/args" - genutil "k8s.io/code-generator/pkg/util" ) // These are the comment tags that carry parameters for conversion generation. @@ -52,24 +49,24 @@ const ( ) func extractTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[tagName] + return gengo.ExtractCommentTags("+", comments)[tagName] } func extractExplicitFromTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[explicitFromTagName] + return gengo.ExtractCommentTags("+", comments)[explicitFromTagName] } func extractExternalTypesTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[externalTypesTagName] + return gengo.ExtractCommentTags("+", comments)[externalTypesTagName] } func isCopyOnly(comments []string) bool { - values := types.ExtractCommentTags("+", comments)["k8s:conversion-fn"] + values := gengo.ExtractCommentTags("+", comments)["k8s:conversion-fn"] return len(values) == 1 && values[0] == "copy-only" } func isDrop(comments []string) bool { - values := types.ExtractCommentTags("+", comments)["k8s:conversion-fn"] + values := gengo.ExtractCommentTags("+", comments)["k8s:conversion-fn"] return len(values) == 1 && values[0] == "drop" } @@ -136,7 +133,7 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package klog.Warning("Skipping nil package passed to getManualConversionFunctions") return } - klog.V(5).Infof("Scanning for conversion functions in %v", pkg.Name) + klog.V(3).Infof("Scanning for conversion functions in %v", pkg.Path) scopeName := types.Ref(conversionPackagePath, "Scope").Name errorName := types.Ref("", "error").Name @@ -152,27 +149,27 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package klog.Errorf("Function without signature: %#v", f) continue } - klog.V(8).Infof("Considering function %s", f.Name) + klog.V(6).Infof("Considering function %s", f.Name) signature := f.Underlying.Signature // Check whether the function is conversion function. // Note that all of them have signature: // func Convert_inType_To_outType(inType, outType, conversion.Scope) error if signature.Receiver != nil { - klog.V(8).Infof("%s has a receiver", f.Name) + klog.V(6).Infof("%s has a receiver", f.Name) continue } if len(signature.Parameters) != 3 || signature.Parameters[2].Name != scopeName { - klog.V(8).Infof("%s has wrong parameters", f.Name) + klog.V(6).Infof("%s has wrong parameters", f.Name) continue } if len(signature.Results) != 1 || signature.Results[0].Name != errorName { - klog.V(8).Infof("%s has wrong results", f.Name) + klog.V(6).Infof("%s has wrong results", f.Name) continue } inType := signature.Parameters[0] outType := signature.Parameters[1] if inType.Kind != types.Pointer || outType.Kind != types.Pointer { - klog.V(8).Infof("%s has wrong parameter types", f.Name) + klog.V(6).Infof("%s has wrong parameter types", f.Name) continue } // Now check if the name satisfies the convention. @@ -180,7 +177,7 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package args := argsFromType(inType.Elem, outType.Elem) sw.Do("Convert_$.inType|public$_To_$.outType|public$", args) if f.Name.Name == buffer.String() { - klog.V(4).Infof("Found conversion function %s", f.Name) + klog.V(2).Infof("Found conversion function %s", f.Name) key := conversionPair{inType.Elem, outType.Elem} // We might scan the same package twice, and that's OK. if v, ok := manualMap[key]; ok && v != nil && v.Name.Package != pkg.Path { @@ -192,20 +189,19 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package if strings.HasPrefix(f.Name.Name, "Convert_") { klog.Errorf("Rename function %s %s -> %s to match expected conversion signature", f.Name.Package, f.Name.Name, buffer.String()) } - klog.V(8).Infof("%s has wrong name", f.Name) + klog.V(3).Infof("%s has wrong name", f.Name) } buffer.Reset() } } -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - packages := generator.Packages{} - header := append([]byte(fmt.Sprintf("// +build !%s\n\n", arguments.GeneratedBuildTag)), boilerplate...) + targets := []generator.Target{} // Accumulate pre-existing conversion functions. // TODO: This is too ad-hoc. We need a better way. @@ -219,131 +215,122 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // have non-trivial conversion memoryEquivalentTypes := equalMemoryTypes{} - // We are generating conversions only for packages that are explicitly - // passed as InputDir. - processed := map[string]bool{} + // First load other "input" packages. We do this as a single call because + // it is MUCH faster. + filteredInputs := make([]string, 0, len(context.Inputs)) + otherPkgs := make([]string, 0, len(context.Inputs)) + pkgToPeers := map[string][]string{} + pkgToExternal := map[string]string{} for _, i := range context.Inputs { - // skip duplicates - if processed[i] { - continue - } - processed[i] = true + klog.V(3).Infof("pre-processing pkg %q", i) - klog.V(5).Infof("considering pkg %q", i) pkg := context.Universe[i] - // typesPkg is where the versioned types are defined. Sometimes it is - // different from pkg. For example, kubernetes core/v1 types are defined - // in vendor/k8s.io/api/core/v1, while pkg is at pkg/api/v1. - typesPkg := pkg - if pkg == nil { - // If the input had no Go files, for example. - continue - } - - // Add conversion and defaulting functions. - getManualConversionFunctions(context, pkg, manualConversions) // Only generate conversions for packages which explicitly request it // by specifying one or more "+k8s:conversion-gen=" // in their doc.go file. peerPkgs := extractTag(pkg.Comments) - if peerPkgs != nil { - klog.V(5).Infof(" tags: %q", peerPkgs) - if len(peerPkgs) == 1 && peerPkgs[0] == "false" { - // If a single +k8s:conversion-gen=false tag is defined, we still want - // the generator to fire for this package for explicit conversions, but - // we are clearing the peerPkgs to not generate any standard conversions. - peerPkgs = nil - } - } else { - klog.V(5).Infof(" no tag") + if peerPkgs == nil { + klog.V(3).Infof(" no tag") continue } - skipUnsafe := false - extraDirs := []string{} - if customArgs, ok := arguments.CustomArgs.(*conversionargs.CustomArgs); ok { - if len(peerPkgs) > 0 { - peerPkgs = append(peerPkgs, customArgs.BasePeerDirs...) - peerPkgs = append(peerPkgs, customArgs.ExtraPeerDirs...) - } - extraDirs = customArgs.ExtraDirs - skipUnsafe = customArgs.SkipUnsafe + klog.V(3).Infof(" tags: %q", peerPkgs) + if len(peerPkgs) == 1 && peerPkgs[0] == "false" { + // If a single +k8s:conversion-gen=false tag is defined, we still want + // the generator to fire for this package for explicit conversions, but + // we are clearing the peerPkgs to not generate any standard conversions. + peerPkgs = nil + } else { + // Save peers for each input + pkgToPeers[i] = peerPkgs } + otherPkgs = append(otherPkgs, peerPkgs...) + // Keep this one for further processing. + filteredInputs = append(filteredInputs, i) - // if the external types are not in the same package where the conversion functions to be generated + // if the external types are not in the same package where the + // conversion functions to be generated externalTypesValues := extractExternalTypesTag(pkg.Comments) if externalTypesValues != nil { if len(externalTypesValues) != 1 { klog.Fatalf(" expect only one value for %q tag, got: %q", externalTypesTagName, externalTypesValues) } externalTypes := externalTypesValues[0] - klog.V(5).Infof(" external types tags: %q", externalTypes) - var err error - typesPkg, err = context.AddDirectory(externalTypes) - if err != nil { - klog.Fatalf("cannot import package %s", externalTypes) - } - // update context.Order to the latest context.Universe - orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)} - context.Order = orderer.OrderUniverse(context.Universe) + klog.V(3).Infof(" external types tags: %q", externalTypes) + otherPkgs = append(otherPkgs, externalTypes) + pkgToExternal[i] = externalTypes + } else { + pkgToExternal[i] = i } + } - // if the source path is within a /vendor/ directory (for example, - // k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1), allow - // generation to output to the proper relative path (under vendor). - // Otherwise, the generator will create the file in the wrong location - // in the output directory. - // TODO: build a more fundamental concept in gengo for dealing with modifications - // to vendored packages. - for i := range peerPkgs { - peerPkgs[i] = genutil.Vendorless(peerPkgs[i]) + // Make sure explicit peer-packages are added. + peers := args.BasePeerDirs + peers = append(peers, args.ExtraPeerDirs...) + if expanded, err := context.FindPackages(peers...); err != nil { + klog.Fatalf("cannot find peer packages: %v", err) + } else { + otherPkgs = append(otherPkgs, expanded...) + // for each pkg, add these extras, too + for k := range pkgToPeers { + pkgToPeers[k] = append(pkgToPeers[k], expanded...) } - for i := range extraDirs { - extraDirs[i] = genutil.Vendorless(extraDirs[i]) + } + + if len(otherPkgs) > 0 { + if _, err := context.LoadPackages(otherPkgs...); err != nil { + klog.Fatalf("cannot load packages: %v", err) } + } + // update context.Order to the latest context.Universe + orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)} + context.Order = orderer.OrderUniverse(context.Universe) - // Make sure our peer-packages are added and fully parsed. - for _, pp := range append(peerPkgs, extraDirs...) { - context.AddDir(pp) - p := context.Universe[pp] - if nil == p { - klog.Fatalf("failed to find pkg: %s", pp) - } - getManualConversionFunctions(context, p, manualConversions) + // Look for conversion functions in the peer-packages. + for _, pp := range otherPkgs { + p := context.Universe[pp] + if p == nil { + klog.Fatalf("failed to find pkg: %s", pp) } + getManualConversionFunctions(context, p, manualConversions) + } + + // We are generating conversions only for packages that are explicitly + // passed as InputDir. + for _, i := range filteredInputs { + klog.V(3).Infof("considering pkg %q", i) + pkg := context.Universe[i] + // typesPkg is where the versioned types are defined. Sometimes it is + // different from pkg. For example, kubernetes core/v1 types are defined + // in k8s.io/api/core/v1, while pkg is at pkg/api/v1. + typesPkg := pkg + + // Add conversion and defaulting functions. + getManualConversionFunctions(context, pkg, manualConversions) + + // Find the right input pkg, which might not be this one. + externalTypes := pkgToExternal[i] + typesPkg = context.Universe[externalTypes] unsafeEquality := TypesEqual(memoryEquivalentTypes) - if skipUnsafe { + if args.SkipUnsafe { unsafeEquality = noEquality{} } - path := pkg.Path - // if the source path is within a /vendor/ directory (for example, - // k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1), allow - // generation to output to the proper relative path (under vendor). - // Otherwise, the generator will create the file in the wrong location - // in the output directory. - // TODO: build a more fundamental concept in gengo for dealing with modifications - // to vendored packages. - if strings.HasPrefix(pkg.SourcePath, arguments.OutputBase) { - expandedPath := strings.TrimPrefix(pkg.SourcePath, arguments.OutputBase) - if strings.Contains(expandedPath, "/vendor/") { - path = expandedPath - } - } - packages = append(packages, - &generator.DefaultPackage{ - PackageName: filepath.Base(pkg.Path), - PackagePath: path, - HeaderText: header, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - return []generator.Generator{ - NewGenConversion(arguments.OutputFileBaseName, typesPkg.Path, pkg.Path, manualConversions, peerPkgs, unsafeEquality), - } - }, + targets = append(targets, + &generator.SimpleTarget{ + PkgName: path.Base(pkg.Path), + PkgPath: pkg.Path, + PkgDir: pkg.Dir, // output pkg is the same as the input + HeaderComment: boilerplate, FilterFunc: func(c *generator.Context, t *types.Type) bool { return t.Name.Package == typesPkg.Path }, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { + return []generator.Generator{ + NewGenConversion(args.OutputFile, typesPkg.Path, pkg.Path, manualConversions, pkgToPeers[pkg.Path], unsafeEquality), + } + }, }) } @@ -351,14 +338,14 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // from being a candidate for unsafe conversion for k, v := range manualConversions { if isCopyOnly(v.CommentLines) { - klog.V(5).Infof("Conversion function %s will not block memory copy because it is copy-only", v.Name) + klog.V(4).Infof("Conversion function %s will not block memory copy because it is copy-only", v.Name) continue } // this type should be excluded from all equivalence, because the converter must be called. memoryEquivalentTypes.Skip(k.inType, k.outType) } - return packages + return targets } type equalMemoryTypes map[conversionPair]bool @@ -466,7 +453,7 @@ type TypesEqual interface { // genConversion produces a file with a autogenerated conversions. type genConversion struct { - generator.DefaultGen + generator.GoGenerator // the package that contains the types that conversion func are going to be // generated for typesPackage string @@ -482,10 +469,10 @@ type genConversion struct { useUnsafe TypesEqual } -func NewGenConversion(sanitizedName, typesPackage, outputPackage string, manualConversions conversionFuncMap, peerPkgs []string, useUnsafe TypesEqual) generator.Generator { +func NewGenConversion(outputFilename, typesPackage, outputPackage string, manualConversions conversionFuncMap, peerPkgs []string, useUnsafe TypesEqual) generator.Generator { return &genConversion{ - DefaultGen: generator.DefaultGen{ - OptionalName: sanitizedName, + GoGenerator: generator.GoGenerator{ + OutputFilename: outputFilename, }, typesPackage: typesPackage, outputPackage: outputPackage, @@ -538,7 +525,7 @@ func (g *genConversion) convertibleOnlyWithinPackage(inType, outType *types.Type if tagvals[0] != "false" { klog.Fatalf("Type %v: unsupported %s value: %q", t, tagName, tagvals[0]) } - klog.V(5).Infof("type %v requests no conversion generation, skipping", t) + klog.V(2).Infof("type %v requests no conversion generation, skipping", t) return false } // TODO: Consider generating functions for other kinds too. @@ -553,7 +540,8 @@ func (g *genConversion) convertibleOnlyWithinPackage(inType, outType *types.Type } func getExplicitFromTypes(t *types.Type) []types.Name { - comments := append(t.SecondClosestCommentLines, t.CommentLines...) + comments := t.SecondClosestCommentLines + comments = append(comments, t.CommentLines...) paths := extractExplicitFromTag(comments) result := []types.Name{} for _, path := range paths { @@ -638,7 +626,7 @@ func (g *genConversion) preexists(inType, outType *types.Type) (*types.Type, boo } func (g *genConversion) Init(c *generator.Context, w io.Writer) error { - klogV := klog.V(5) + klogV := klog.V(6) if klogV.Enabled() { if m, ok := g.useUnsafe.(equalMemoryTypes); ok { var result []string @@ -694,10 +682,7 @@ func (g *genConversion) Init(c *generator.Context, w io.Writer) error { } // sort by name of the conversion function sort.Slice(pairs, func(i, j int) bool { - if g.manualConversions[pairs[i]].Name.Name < g.manualConversions[pairs[j]].Name.Name { - return true - } - return false + return g.manualConversions[pairs[i]].Name.Name < g.manualConversions[pairs[j]].Name.Name }) for _, pair := range pairs { args := argsFromType(pair.inType, pair.outType).With("Scope", types.Ref(conversionPackagePath, "Scope")).With("fn", g.manualConversions[pair]) @@ -731,7 +716,7 @@ func (g *genConversion) GenerateType(c *generator.Context, t *types.Type, w io.W } switch { case inType.Name.Package == "net/url" && inType.Name.Name == "Values": - g.generateFromUrlValues(inType, t, sw) + g.generateFromURLValues(inType, t, sw) default: klog.Errorf("Not supported input type: %#v", inType.Name) } @@ -771,7 +756,7 @@ func (g *genConversion) generateConversion(inType, outType *types.Type, sw *gene // at any nesting level. This makes the autogenerator easy to understand, and // the compiler shouldn't care. func (g *genConversion) generateFor(inType, outType *types.Type, sw *generator.SnippetWriter) { - klog.V(5).Infof("generating %v -> %v", inType, outType) + klog.V(4).Infof("generating %v -> %v", inType, outType) var f func(*types.Type, *types.Type, *generator.SnippetWriter) switch inType.Kind { @@ -948,7 +933,7 @@ func (g *genConversion) doStruct(inType, outType *types.Type, sw *generator.Snip sw.Do("}\n", nil) continue } - klog.V(5).Infof("Skipped function %s because it is copy-only and we can use direct assignment", function.Name) + klog.V(2).Infof("Skipped function %s because it is copy-only and we can use direct assignment", function.Name) } // If we can't auto-convert, punt before we emit any code. @@ -1087,7 +1072,7 @@ func (g *genConversion) doUnknown(inType, outType *types.Type, sw *generator.Sni sw.Do("// FIXME: Type $.|raw$ is unsupported.\n", inType) } -func (g *genConversion) generateFromUrlValues(inType, outType *types.Type, sw *generator.SnippetWriter) { +func (g *genConversion) generateFromURLValues(inType, outType *types.Type, sw *generator.SnippetWriter) { args := generator.Args{ "inType": inType, "outType": outType, diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go index 5a461d27090..cd52a9b9643 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go @@ -102,36 +102,34 @@ import ( generatorargs "k8s.io/code-generator/cmd/conversion-gen/args" "k8s.io/code-generator/cmd/conversion-gen/generators" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() + args := generatorargs.New() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - // k8s.io/apimachinery/pkg/runtime contains a number of manual conversions, - // that we need to generate conversions. - // Packages being dependencies of explicitly requested packages are only - // partially scanned - only types explicitly used are being traversed. - // Not used functions or types are omitted. - // Adding this explicitly to InputDirs ensures that the package is fully - // scanned and all functions are parsed and processed. - genericArgs.InputDirs = append(genericArgs.InputDirs, "k8s.io/apimachinery/pkg/runtime") - - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( + if err := gengo.Execute( generators.NameSystems(), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/deepcopy-gen/args/args.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/deepcopy-gen/args/args.go index 789713012ad..f5207a980e3 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/deepcopy-gen/args/args.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/deepcopy-gen/args/args.go @@ -20,35 +20,33 @@ import ( "fmt" "github.com/spf13/pflag" - "k8s.io/gengo/args" - "k8s.io/gengo/examples/deepcopy-gen/generators" ) -// CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs generators.CustomArgs +type Args struct { + OutputFile string + BoundingDirs []string // Only deal with types rooted under these dirs. + GoHeaderFile string +} -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{} - genericArgs.CustomArgs = (*generators.CustomArgs)(customArgs) // convert to upstream type to make type-casts work there - genericArgs.OutputFileBaseName = "deepcopy_generated" - return genericArgs, customArgs +// New returns default arguments for the generator. +func New() *Args { + return &Args{} } // AddFlags add the generator flags to the flag set. -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { - pflag.CommandLine.StringSliceVar(&ca.BoundingDirs, "bounding-dirs", ca.BoundingDirs, +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputFile, "output-file", "generated.deepcopy.go", + "the name of the file to be generated") + fs.StringSliceVar(&args.BoundingDirs, "bounding-dirs", args.BoundingDirs, "Comma-separated list of import paths which bound the types for which deep-copies will be generated.") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - _ = genericArgs.CustomArgs.(*generators.CustomArgs) - - if len(genericArgs.OutputFileBaseName) == 0 { - return fmt.Errorf("output file base name cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputFile) == 0 { + return fmt.Errorf("--output-file must be specified") } - return nil } diff --git a/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go similarity index 86% rename from vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go rename to pkg/k8s/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go index 170f6d7f162..c6047aacae0 100644 --- a/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go @@ -19,25 +19,18 @@ package generators import ( "fmt" "io" - "path/filepath" + "path" "sort" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/examples/set-gen/sets" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - + "k8s.io/code-generator/cmd/deepcopy-gen/args" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) -// CustomArgs is used tby the go2idl framework to pass args specific to this -// generator. -type CustomArgs struct { - BoundingDirs []string // Only deal with types rooted under these dirs. -} - // This is the comment tag that carries parameters for deep-copy generation. const ( tagEnabledName = "k8s:deepcopy-gen" @@ -60,7 +53,7 @@ func extractEnabledTypeTag(t *types.Type) *enabledTagValue { } func extractEnabledTag(comments []string) *enabledTagValue { - tagVals := types.ExtractCommentTags("+", comments)[tagEnabledName] + tagVals := gengo.ExtractCommentTags("+", comments)[tagEnabledName] if tagVals == nil { // No match for the tag. return nil @@ -125,35 +118,28 @@ func DefaultNameSystem() string { return "public" } -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - inputs := sets.NewString(context.Inputs...) - packages := generator.Packages{} - header := append([]byte(fmt.Sprintf("//go:build !%s\n// +build !%s\n\n", arguments.GeneratedBuildTag, arguments.GeneratedBuildTag)), boilerplate...) - boundingDirs := []string{} - if customArgs, ok := arguments.CustomArgs.(*CustomArgs); ok { - if customArgs.BoundingDirs == nil { - customArgs.BoundingDirs = context.Inputs - } - for i := range customArgs.BoundingDirs { - // Strip any trailing slashes - they are not exactly "correct" but - // this is friendlier. - boundingDirs = append(boundingDirs, strings.TrimRight(customArgs.BoundingDirs[i], "/")) - } + if args.BoundingDirs == nil { + args.BoundingDirs = context.Inputs } + for i := range args.BoundingDirs { + // Strip any trailing slashes - they are not exactly "correct" but + // this is friendlier. + boundingDirs = append(boundingDirs, strings.TrimRight(args.BoundingDirs[i], "/")) + } + + targets := []generator.Target{} + + for _, i := range context.Inputs { + klog.V(3).Infof("Considering pkg %q", i) - for i := range inputs { - klog.V(5).Infof("Considering pkg %q", i) pkg := context.Universe[i] - if pkg == nil { - // If the input had no Go files, for example. - continue - } ptag := extractEnabledTag(pkg.Comments) ptagValue := "" @@ -164,9 +150,9 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat klog.Fatalf("Package %v: unsupported %s value: %q", i, tagEnabledName, ptagValue) } ptagRegister = ptag.register - klog.V(5).Infof(" tag.value: %q, tag.register: %t", ptagValue, ptagRegister) + klog.V(3).Infof(" tag.value: %q, tag.register: %t", ptagValue, ptagRegister) } else { - klog.V(5).Infof(" no tag") + klog.V(3).Infof(" no tag") } // If the pkg-scoped tag says to generate, we can skip scanning types. @@ -177,10 +163,10 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // can be copied. var uncopyable []string for _, t := range pkg.Types { - klog.V(5).Infof(" considering type %q", t.Name.String()) + klog.V(3).Infof(" considering type %q", t.Name.String()) ttag := extractEnabledTypeTag(t) if ttag != nil && ttag.value == "true" { - klog.V(5).Infof(" tag=true") + klog.V(3).Infof(" tag=true") if !copyableType(t) { uncopyable = append(uncopyable, fmt.Sprintf("%v", t)) } else { @@ -196,42 +182,29 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat if pkgNeedsGeneration { klog.V(3).Infof("Package %q needs generation", i) - path := pkg.Path - // if the source path is within a /vendor/ directory (for example, - // k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1), allow - // generation to output to the proper relative path (under vendor). - // Otherwise, the generator will create the file in the wrong location - // in the output directory. - // TODO: build a more fundamental concept in gengo for dealing with modifications - // to vendored packages. - if strings.HasPrefix(pkg.SourcePath, arguments.OutputBase) { - expandedPath := strings.TrimPrefix(pkg.SourcePath, arguments.OutputBase) - if strings.Contains(expandedPath, "/vendor/") { - path = expandedPath - } - } - packages = append(packages, - &generator.DefaultPackage{ - PackageName: strings.Split(filepath.Base(pkg.Path), ".")[0], - PackagePath: path, - HeaderText: header, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - return []generator.Generator{ - NewGenDeepCopy(arguments.OutputFileBaseName, pkg.Path, boundingDirs, (ptagValue == tagValuePackage), ptagRegister), - } - }, + targets = append(targets, + &generator.SimpleTarget{ + PkgName: strings.Split(path.Base(pkg.Path), ".")[0], + PkgPath: pkg.Path, + PkgDir: pkg.Dir, // output pkg is the same as the input + HeaderComment: boilerplate, FilterFunc: func(c *generator.Context, t *types.Type) bool { return t.Name.Package == pkg.Path }, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { + return []generator.Generator{ + NewGenDeepCopy(args.OutputFile, pkg.Path, boundingDirs, (ptagValue == tagValuePackage), ptagRegister), + } + }, }) } } - return packages + return targets } // genDeepCopy produces a file with autogenerated deep-copy functions. type genDeepCopy struct { - generator.DefaultGen + generator.GoGenerator targetPackage string boundingDirs []string allTypes bool @@ -240,10 +213,10 @@ type genDeepCopy struct { typesForInit []*types.Type } -func NewGenDeepCopy(sanitizedName, targetPackage string, boundingDirs []string, allTypes, registerTypes bool) generator.Generator { +func NewGenDeepCopy(outputFilename, targetPackage string, boundingDirs []string, allTypes, registerTypes bool) generator.Generator { return &genDeepCopy{ - DefaultGen: generator.DefaultGen{ - OptionalName: sanitizedName, + GoGenerator: generator.GoGenerator{ + OutputFilename: outputFilename, }, targetPackage: targetPackage, boundingDirs: boundingDirs, @@ -274,32 +247,24 @@ func (g *genDeepCopy) Filter(c *generator.Context, t *types.Type) bool { return false } if !copyableType(t) { - klog.V(2).Infof("Type %v is not copyable", t) + klog.V(3).Infof("Type %v is not copyable", t) return false } - klog.V(4).Infof("Type %v is copyable", t) + klog.V(3).Infof("Type %v is copyable", t) g.typesForInit = append(g.typesForInit, t) return true } -func (g *genDeepCopy) copyableAndInBounds(t *types.Type) bool { - if !copyableType(t) { - return false - } - // Only packages within the restricted range can be processed. - if !isRootedUnder(t.Name.Package, g.boundingDirs) { - return false - } - return true -} - // deepCopyMethod returns the signature of a DeepCopy() method, nil or an error // if the type does not match. This allows more efficient deep copy // implementations to be defined by the type's author. The correct signature // for a type T is: -// func (t T) DeepCopy() T +// +// func (t T) DeepCopy() T +// // or: -// func (t *T) DeepCopy() *T +// +// func (t *T) DeepCopy() *T func deepCopyMethod(t *types.Type) (*types.Signature, error) { f, found := t.Methods["DeepCopy"] if !found { @@ -346,9 +311,12 @@ func deepCopyMethodOrDie(t *types.Type) *types.Signature { // if the type is wrong. DeepCopyInto allows more efficient deep copy // implementations to be defined by the type's author. The correct signature // for a type T is: -// func (t T) DeepCopyInto(t *T) +// +// func (t T) DeepCopyInto(t *T) +// // or: -// func (t *T) DeepCopyInto(t *T) +// +// func (t *T) DeepCopyInto(t *T) func deepCopyIntoMethod(t *types.Type) (*types.Signature, error) { f, found := t.Methods["DeepCopyInto"] if !found { @@ -388,18 +356,6 @@ func deepCopyIntoMethodOrDie(t *types.Type) *types.Signature { return ret } -func isRootedUnder(pkg string, roots []string) bool { - // Add trailing / to avoid false matches, e.g. foo/bar vs foo/barn. This - // assumes that bounding dirs do not have trailing slashes. - pkg = pkg + "/" - for _, root := range roots { - if strings.HasPrefix(pkg, root+"/") { - return true - } - } - return false -} - func copyableType(t *types.Type) bool { // If the type opts out of copy-generation, stop. ttag := extractEnabledTypeTag(t) @@ -481,12 +437,12 @@ func (g *genDeepCopy) needsGeneration(t *types.Type) bool { } if g.allTypes && tv == "false" { // The whole package is being generated, but this type has opted out. - klog.V(5).Infof("Not generating for type %v because type opted out", t) + klog.V(2).Infof("Not generating for type %v because type opted out", t) return false } if !g.allTypes && tv != "true" { // The whole package is NOT being generated, and this type has NOT opted in. - klog.V(5).Infof("Not generating for type %v because type did not opt in", t) + klog.V(2).Infof("Not generating for type %v because type did not opt in", t) return false } return true @@ -495,7 +451,7 @@ func (g *genDeepCopy) needsGeneration(t *types.Type) bool { func extractInterfacesTag(t *types.Type) []string { var result []string comments := append(append([]string{}, t.SecondClosestCommentLines...), t.CommentLines...) - values := types.ExtractCommentTags("+", comments)[interfacesTagName] + values := gengo.ExtractCommentTags("+", comments)[interfacesTagName] for _, v := range values { if len(v) == 0 { continue @@ -513,7 +469,7 @@ func extractInterfacesTag(t *types.Type) []string { func extractNonPointerInterfaces(t *types.Type) (bool, error) { comments := append(append([]string{}, t.SecondClosestCommentLines...), t.CommentLines...) - values := types.ExtractCommentTags("+", comments)[interfacesNonPointerTagName] + values := gengo.ExtractCommentTags("+", comments)[interfacesNonPointerTagName] if len(values) == 0 { return false, nil } @@ -536,7 +492,8 @@ func (g *genDeepCopy) deepCopyableInterfacesInner(c *generator.Context, t *types var ts []*types.Type for _, intf := range intfs { t := types.ParseFullyQualifiedName(intf) - err := c.AddDir(t.Package) + klog.V(3).Infof("Loading package for interface %v", intf) + _, err := c.LoadPackages(t.Package) if err != nil { return nil, err } @@ -592,7 +549,7 @@ func (g *genDeepCopy) GenerateType(c *generator.Context, t *types.Type, w io.Wri if !g.needsGeneration(t) { return nil } - klog.V(5).Infof("Generating deepcopy function for type %v", t) + klog.V(2).Infof("Generating deepcopy functions for type %v", t) sw := generator.NewSnippetWriter(w, c, "$", "$") args := argsFromType(t) @@ -893,7 +850,7 @@ func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) { sw.Do(fmt.Sprintf("out.$.name$ = in.$.name$.DeepCopy%s()\n", uft.Name.Name), args) sw.Do("}\n", nil) default: - klog.Fatalf("Hit an unsupported type %v for %v, from %v", uft, ft, t) + klog.Fatalf("Hit an unsupported type '%v' for '%v', from %v.%v", uft, ft, t, m.Name) } } } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go index 5622c1a1beb..aaa3155a010 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go @@ -16,14 +16,24 @@ limitations under the License. // deepcopy-gen is a tool for auto-generating DeepCopy functions. // -// Given a list of input directories, it will generate functions that -// efficiently perform a full deep-copy of each type. For any type that -// offers a `.DeepCopy()` method, it will simply call that. Otherwise it will -// use standard value assignment whenever possible. If that is not possible it -// will try to call its own generated copy function for the type, if the type is -// within the allowed root packages. Failing that, it will fall back on -// `conversion.Cloner.DeepCopy(val)` to make the copy. The resulting file will -// be stored in the same directory as the processed source package. +// Given a list of input directories, it will generate DeepCopy and +// DeepCopyInto methods that efficiently perform a full deep-copy of each type. +// If these methods already exist (are predefined by the developer), they are +// used instead of generating new ones. Generated code will use standard value +// assignment whenever possible. If that is not possible it will try to call +// its own generated copy function for the type. Failing that, it will fall +// back on `conversion.Cloner.DeepCopy(val)` to make the copy. The resulting +// file will be stored in the same directory as the processed source package. +// +// If interfaces are referenced in types, it is expected that corresponding +// DeepCopyInterfaceName methods exist, e.g. DeepCopyObject for runtime.Object. +// These can be predefined by the developer or generated through tags, see +// below. They must be added to the interfaces themselves manually, e.g. +// +// type Object interface { +// ... +// DeepCopyObject() Object +// } // // Generation is governed by comment tags in the source. Any package may // request DeepCopy generation by including a comment in the file-comments of @@ -32,48 +42,67 @@ limitations under the License. // // +k8s:deepcopy-gen=package // // DeepCopy functions can be generated for individual types, rather than the -// entire package by specifying a comment on the type definion of the form: +// entire package by specifying a comment on the type definition of the form: // // // +k8s:deepcopy-gen=true // // When generating for a whole package, individual types may opt out of -// DeepCopy generation by specifying a comment on the of the form: +// DeepCopy generation by specifying a comment on the type definition of the +// form: // // // +k8s:deepcopy-gen=false // -// Note that registration is a whole-package option, and is not available for -// individual types. +// Additional DeepCopyInterfaceName methods can be generated by specifying a +// comment on the type definition of the form: +// +// // +k8s:deepcopy-gen:interfaces=k8s.io/kubernetes/runtime.Object,k8s.io/kubernetes/runtime.List +// +// This leads to the generation of DeepCopyObject and DeepCopyList with the given +// interfaces as return types. We say that the tagged type implements deepcopy for the +// interfaces. +// +// The deepcopy funcs for interfaces using "+k8s:deepcopy-gen:interfaces" use the pointer +// of the type as receiver. For those special cases where the non-pointer object should +// implement the interface, this can be done with: +// +// // +k8s:deepcopy-gen:nonpointer-interfaces=true package main import ( "flag" "github.com/spf13/pflag" - "k8s.io/gengo/examples/deepcopy-gen/generators" + "k8s.io/code-generator/cmd/deepcopy-gen/args" + "k8s.io/code-generator/cmd/deepcopy-gen/generators" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/deepcopy-gen/args" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() + args := args.New() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( + if err := gengo.Execute( generators.NameSystems(), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go index 3c5a042c7ca..52a9d1c67d0 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go @@ -20,34 +20,33 @@ import ( "fmt" "github.com/spf13/pflag" - "k8s.io/gengo/args" - "k8s.io/gengo/examples/defaulter-gen/generators" ) -// CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs generators.CustomArgs +type Args struct { + OutputFile string + ExtraPeerDirs []string // Always consider these as last-ditch possibilities for conversions. + GoHeaderFile string +} -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{} - genericArgs.CustomArgs = (*generators.CustomArgs)(customArgs) // convert to upstream type to make type-casts work there - genericArgs.OutputFileBaseName = "zz_generated.defaults" - return genericArgs, customArgs +// New returns default arguments for the generator. +func New() *Args { + return &Args{} } // AddFlags add the generator flags to the flag set. -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { - pflag.CommandLine.StringSliceVar(&ca.ExtraPeerDirs, "extra-peer-dirs", ca.ExtraPeerDirs, +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputFile, "output-file", "generated.defaults.go", + "the name of the file to be generated") + fs.StringSliceVar(&args.ExtraPeerDirs, "extra-peer-dirs", args.ExtraPeerDirs, "Comma-separated list of import paths which are considered, after tag-specified peers, for conversions.") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - _ = genericArgs.CustomArgs.(*generators.CustomArgs) - - if len(genericArgs.OutputFileBaseName) == 0 { - return fmt.Errorf("output file base name cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputFile) == 0 { + return fmt.Errorf("--output-file must be specified") } return nil diff --git a/vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go similarity index 87% rename from vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go rename to pkg/k8s/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go index e9ed41de36d..64b9ff29998 100644 --- a/vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go @@ -21,26 +21,20 @@ import ( "encoding/json" "fmt" "io" - "path/filepath" + "path" "reflect" "regexp" "strconv" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - + "k8s.io/code-generator/cmd/defaulter-gen/args" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) -// CustomArgs is used tby the go2idl framework to pass args specific to this -// generator. -type CustomArgs struct { - ExtraPeerDirs []string // Always consider these as last-ditch possibilities for conversions. -} - var typeZeroValue = map[string]interface{}{ "uint": 0., "uint8": 0., @@ -71,19 +65,19 @@ const inputTagName = "k8s:defaulter-gen-input" const defaultTagName = "default" func extractDefaultTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[defaultTagName] + return gengo.ExtractCommentTags("+", comments)[defaultTagName] } func extractTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[tagName] + return gengo.ExtractCommentTags("+", comments)[tagName] } func extractInputTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[inputTagName] + return gengo.ExtractCommentTags("+", comments)[inputTagName] } func checkTag(comments []string, require ...string) bool { - values := types.ExtractCommentTags("+", comments)[tagName] + values := gengo.ExtractCommentTags("+", comments)[tagName] if len(require) == 0 { return len(values) == 1 && values[0] == "" } @@ -227,14 +221,13 @@ func getManualDefaultingFunctions(context *generator.Context, pkg *types.Package } } -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - packages := generator.Packages{} - header := append([]byte(fmt.Sprintf("// +build !%s\n\n", arguments.GeneratedBuildTag)), boilerplate...) + targets := []generator.Target{} // Accumulate pre-existing default functions. // TODO: This is too ad-hoc. We need a better way. @@ -243,36 +236,77 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat buffer := &bytes.Buffer{} sw := generator.NewSnippetWriter(buffer, context, "$", "$") - // We are generating defaults only for packages that are explicitly - // passed as InputDir. + // First load other "input" packages. We do this as a single call because + // it is MUCH faster. + inputPkgs := make([]string, 0, len(context.Inputs)) + pkgToInput := map[string]string{} for _, i := range context.Inputs { klog.V(5).Infof("considering pkg %q", i) + pkg := context.Universe[i] - if pkg == nil { - // If the input had no Go files, for example. - continue + + // if the types are not in the same package where the defaulter functions to be generated + inputTags := extractInputTag(pkg.Comments) + if len(inputTags) > 1 { + panic(fmt.Sprintf("there may only be one input tag, got %#v", inputTags)) + } + if len(inputTags) == 1 { + inputPath := inputTags[0] + if strings.HasPrefix(inputPath, "./") || strings.HasPrefix(inputPath, "../") { + // this is a relative dir, which will not work under gomodules. + // join with the local package path, but warn + klog.Warningf("relative path %s=%s will not work under gomodule mode; use full package path (as used by 'import') instead", inputTagName, inputPath) + inputPath = path.Join(pkg.Path, inputTags[0]) + } + + klog.V(5).Infof(" input pkg %v", inputPath) + inputPkgs = append(inputPkgs, inputPath) + pkgToInput[i] = inputPath + } else { + pkgToInput[i] = i + } + } + + // Make sure explicit peer-packages are added. + var peerPkgs []string + for _, pkg := range args.ExtraPeerDirs { + // In case someone specifies a peer as a path into vendor, convert + // it to its "real" package path. + if i := strings.Index(pkg, "/vendor/"); i != -1 { + pkg = pkg[i+len("/vendor/"):] + } + peerPkgs = append(peerPkgs, pkg) + } + if expanded, err := context.FindPackages(peerPkgs...); err != nil { + klog.Fatalf("cannot find peer packages: %v", err) + } else { + peerPkgs = expanded // now in fully canonical form + } + inputPkgs = append(inputPkgs, peerPkgs...) + + if len(inputPkgs) > 0 { + if _, err := context.LoadPackages(inputPkgs...); err != nil { + klog.Fatalf("cannot load packages: %v", err) } + } + // update context.Order to the latest context.Universe + orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)} + context.Order = orderer.OrderUniverse(context.Universe) + + for _, i := range context.Inputs { + pkg := context.Universe[i] + // typesPkg is where the types that needs defaulter are defined. // Sometimes it is different from pkg. For example, kubernetes core/v1 - // types are defined in vendor/k8s.io/api/core/v1, while pkg is at - // pkg/api/v1. + // types are defined in k8s.io/api/core/v1, while the pkg which holds + // defaulter code is at k/k/pkg/api/v1. typesPkg := pkg // Add defaulting functions. getManualDefaultingFunctions(context, pkg, existingDefaulters) - var peerPkgs []string - if customArgs, ok := arguments.CustomArgs.(*CustomArgs); ok { - for _, pkg := range customArgs.ExtraPeerDirs { - if i := strings.Index(pkg, "/vendor/"); i != -1 { - pkg = pkg[i+len("/vendor/"):] - } - peerPkgs = append(peerPkgs, pkg) - } - } - // Make sure our peer-packages are added and fully parsed. + // Also look for defaulting functions in peer-packages. for _, pp := range peerPkgs { - context.AddDir(pp) getManualDefaultingFunctions(context, context.Universe[pp], existingDefaulters) } @@ -312,30 +346,9 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat return false } - // if the types are not in the same package where the defaulter functions to be generated - inputTags := extractInputTag(pkg.Comments) - if len(inputTags) > 1 { - panic(fmt.Sprintf("there could only be one input tag, got %#v", inputTags)) - } - if len(inputTags) == 1 { - var err error - - inputPath := inputTags[0] - if strings.HasPrefix(inputPath, "./") || strings.HasPrefix(inputPath, "../") { - // this is a relative dir, which will not work under gomodules. - // join with the local package path, but warn - klog.Warningf("relative path %s=%s will not work under gomodule mode; use full package path (as used by 'import') instead", inputTagName, inputPath) - inputPath = filepath.Join(pkg.Path, inputTags[0]) - } - - typesPkg, err = context.AddDirectory(inputPath) - if err != nil { - klog.Fatalf("cannot import package %s", inputPath) - } - // update context.Order to the latest context.Universe - orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)} - context.Order = orderer.OrderUniverse(context.Universe) - } + // Find the right input pkg, which might not be this one. + inputPath := pkgToInput[i] + typesPkg = context.Universe[inputPath] newDefaulters := defaulterFuncMap{} for _, t := range typesPkg.Types { @@ -394,37 +407,25 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat klog.V(5).Infof("no defaulters in package %s", pkg.Name) } - path := pkg.Path - // if the source path is within a /vendor/ directory (for example, - // k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1), allow - // generation to output to the proper relative path (under vendor). - // Otherwise, the generator will create the file in the wrong location - // in the output directory. - // TODO: build a more fundamental concept in gengo for dealing with modifications - // to vendored packages. - if strings.HasPrefix(pkg.SourcePath, arguments.OutputBase) { - expandedPath := strings.TrimPrefix(pkg.SourcePath, arguments.OutputBase) - if strings.Contains(expandedPath, "/vendor/") { - path = expandedPath - } - } + targets = append(targets, + &generator.SimpleTarget{ + PkgName: path.Base(pkg.Path), + PkgPath: pkg.Path, + PkgDir: pkg.Dir, // output pkg is the same as the input + HeaderComment: boilerplate, - packages = append(packages, - &generator.DefaultPackage{ - PackageName: filepath.Base(pkg.Path), - PackagePath: path, - HeaderText: header, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - return []generator.Generator{ - NewGenDefaulter(arguments.OutputFileBaseName, typesPkg.Path, pkg.Path, existingDefaulters, newDefaulters, peerPkgs), - } - }, FilterFunc: func(c *generator.Context, t *types.Type) bool { return t.Name.Package == typesPkg.Path }, + + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { + return []generator.Generator{ + NewGenDefaulter(args.OutputFile, typesPkg.Path, pkg.Path, existingDefaulters, newDefaulters, peerPkgs), + } + }, }) } - return packages + return targets } // callTreeForType contains fields necessary to build a tree for types. @@ -513,39 +514,16 @@ func getNestedDefault(t *types.Type) string { return "" } -func mustEnforceDefault(t *types.Type, depth int, omitEmpty bool) (interface{}, error) { - if depth > 0 { - return nil, nil - } - switch t.Kind { - case types.Pointer, types.Map, types.Slice, types.Array, types.Interface: - return nil, nil - case types.Struct: - return map[string]interface{}{}, nil - case types.Builtin: - if !omitEmpty { - if zero, ok := typeZeroValue[t.String()]; ok { - return zero, nil - } else { - return nil, fmt.Errorf("please add type %v to typeZeroValue struct", t) - } - } - return nil, nil - default: - return nil, fmt.Errorf("not sure how to enforce default for %v", t.Kind) - } -} - var refRE = regexp.MustCompile(`^ref\((?P[^"]+)\)$`) var refREIdentIndex = refRE.SubexpIndex("reference") -// ParseSymbolReference looks for strings that match one of the following: +// parseSymbolReference looks for strings that match one of the following: // - ref(Ident) // - ref(pkgpath.Ident) // If the input string matches either of these, it will return the (optional) // pkgpath, the Ident, and true. Otherwise it will return empty strings and // false. -func ParseSymbolReference(s, sourcePackage string) (types.Name, bool) { +func parseSymbolReference(s, sourcePackage string) (types.Name, bool) { matches := refRE.FindStringSubmatch(s) if len(matches) < refREIdentIndex || matches[refREIdentIndex] == "" { return types.Name{}, false @@ -578,26 +556,19 @@ func populateDefaultValue(node *callNode, t *types.Type, tags string, commentLin } var symbolReference types.Name var defaultValue interface{} - if id, ok := ParseSymbolReference(defaultString, commentPackage); ok { + if id, ok := parseSymbolReference(defaultString, commentPackage); ok { symbolReference = id defaultString = "" } else if err := json.Unmarshal([]byte(defaultString), &defaultValue); err != nil { klog.Fatalf("Failed to unmarshal default: %v", err) } - omitEmpty := strings.Contains(reflect.StructTag(tags).Get("json"), "omitempty") - if enforced, err := mustEnforceDefault(baseT, depth, omitEmpty); err != nil { - klog.Fatal(err) - } else if enforced != nil { - if defaultValue != nil { - if reflect.DeepEqual(defaultValue, enforced) { - // If the default value annotation matches the default value for the type, - // do not generate any defaulting function - return node - } else { - enforcedJSON, _ := json.Marshal(enforced) - klog.Fatalf("Invalid default value (%#v) for non-pointer/non-omitempty. If specified, must be: %v", defaultValue, string(enforcedJSON)) - } + if defaultValue != nil { + zero := typeZeroValue[t.String()] + if reflect.DeepEqual(defaultValue, zero) { + // If the default value annotation matches the default value for the type, + // do not generate any defaulting function + return node } } @@ -632,7 +603,7 @@ func (c *callTreeForType) build(t *types.Type, root bool) *callNode { parent.elem = true } - defaults, _ := c.existingDefaulters[t] + defaults := c.existingDefaulters[t] newDefaults, generated := c.newDefaulters[t] switch { case !root && generated && newDefaults.object != nil: @@ -725,7 +696,7 @@ func (c *callTreeForType) build(t *types.Type, root bool) *callNode { } } if len(parent.children) == 0 && len(parent.call) == 0 { - //klog.V(6).Infof("decided type %s needs no generation", t.Name) + // klog.V(6).Infof("decided type %s needs no generation", t.Name) return nil } return parent @@ -738,7 +709,7 @@ const ( // genDefaulter produces a file with a autogenerated conversions. type genDefaulter struct { - generator.DefaultGen + generator.GoGenerator typesPackage string outputPackage string peerPackages []string @@ -748,10 +719,10 @@ type genDefaulter struct { typesForInit []*types.Type } -func NewGenDefaulter(sanitizedName, typesPackage, outputPackage string, existingDefaulters, newDefaulters defaulterFuncMap, peerPkgs []string) generator.Generator { +func NewGenDefaulter(outputFilename, typesPackage, outputPackage string, existingDefaulters, newDefaulters defaulterFuncMap, peerPkgs []string) generator.Generator { return &genDefaulter{ - DefaultGen: generator.DefaultGen{ - OptionalName: sanitizedName, + GoGenerator: generator.GoGenerator{ + OutputFilename: outputFilename, }, typesPackage: typesPackage, outputPackage: outputPackage, @@ -1015,7 +986,7 @@ func (n *callNode) writeCalls(varName string, isVarPointer bool, sw *generator.S func getTypeZeroValue(t string) (interface{}, error) { defaultZero, ok := typeZeroValue[t] if !ok { - return nil, fmt.Errorf("Cannot find zero value for type %v in typeZeroValue", t) + return nil, fmt.Errorf("cannot find zero value for type %v in typeZeroValue", t) } // To generate the code for empty string, they must be quoted @@ -1230,13 +1201,13 @@ func (path callPath) String() string { } case p.index: if len(parts) > 0 { - parts[last] = parts[last] + "[i]" + parts[last] += "[i]" } else { parts = append(parts, "[i]") } case p.key: if len(parts) > 0 { - parts[last] = parts[last] + "[key]" + parts[last] += "[key]" } else { parts = append(parts, "[key]") } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go index 23d5d3271bb..d57ca0666cd 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go @@ -45,31 +45,37 @@ import ( "flag" "github.com/spf13/pflag" - "k8s.io/gengo/examples/defaulter-gen/generators" + "k8s.io/code-generator/cmd/defaulter-gen/args" + "k8s.io/code-generator/cmd/defaulter-gen/generators" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/defaulter-gen/args" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() + args := args.New() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( + if err := gengo.Execute( generators.NameSystems(), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go index ff267e2610e..ca21c76c344 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go @@ -22,7 +22,6 @@ import ( "bytes" "fmt" "log" - "os" "os/exec" "path/filepath" "sort" @@ -30,19 +29,18 @@ import ( flag "github.com/spf13/pflag" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/parser" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/parser" + "k8s.io/gengo/v2/types" ) type Generator struct { - Common args.GeneratorArgs + GoHeaderFile string APIMachineryPackages string Packages string - OutputBase string - VendorOutputBase string + OutputDir string ProtoImport []string Conditional string Clean bool @@ -50,24 +48,12 @@ type Generator struct { KeepGogoproto bool SkipGeneratedRewrite bool DropEmbeddedFields string - TrimPathPrefix string } func New() *Generator { - sourceTree := args.DefaultSourceTree() - common := args.GeneratorArgs{ - OutputBase: sourceTree, - } - defaultProtoImport := filepath.Join(sourceTree, "k8s.io", "kubernetes", "vendor", "github.com", "gogo", "protobuf", "protobuf") - cwd, err := os.Getwd() - if err != nil { - log.Fatalf("Cannot get current directory.") - } + defaultSourceTree := "." return &Generator{ - Common: common, - OutputBase: sourceTree, - VendorOutputBase: filepath.Join(cwd, "vendor"), - ProtoImport: []string{defaultProtoImport}, + OutputDir: defaultSourceTree, APIMachineryPackages: strings.Join([]string{ `+k8s.io/apimachinery/pkg/util/intstr`, `+k8s.io/apimachinery/pkg/api/resource`, @@ -83,74 +69,56 @@ func New() *Generator { } func (g *Generator) BindFlags(flag *flag.FlagSet) { - flag.StringVarP(&g.Common.GoHeaderFilePath, "go-header-file", "h", g.Common.GoHeaderFilePath, "File containing boilerplate header text. The string YEAR will be replaced with the current 4-digit year.") - flag.BoolVar(&g.Common.VerifyOnly, "verify-only", g.Common.VerifyOnly, "If true, only verify existing output, do not write anything.") + flag.StringVarP(&g.GoHeaderFile, "go-header-file", "h", "", "File containing boilerplate header text. The string YEAR will be replaced with the current 4-digit year.") flag.StringVarP(&g.Packages, "packages", "p", g.Packages, "comma-separated list of directories to get input types from. Directories prefixed with '-' are not generated, directories prefixed with '+' only create types with explicit IDL instructions.") flag.StringVar(&g.APIMachineryPackages, "apimachinery-packages", g.APIMachineryPackages, "comma-separated list of directories to get apimachinery input types from which are needed by any API. Directories prefixed with '-' are not generated, directories prefixed with '+' only create types with explicit IDL instructions.") - flag.StringVarP(&g.OutputBase, "output-base", "o", g.OutputBase, "Output base; defaults to $GOPATH/src/") - flag.StringVar(&g.VendorOutputBase, "vendor-output-base", g.VendorOutputBase, "The vendor/ directory to look for packages in; defaults to $PWD/vendor/.") - flag.StringSliceVar(&g.ProtoImport, "proto-import", g.ProtoImport, "The search path for the core protobuf .protos, required; defaults $GOPATH/src/k8s.io/kubernetes/vendor/github.com/gogo/protobuf/protobuf.") + flag.StringVar(&g.OutputDir, "output-dir", g.OutputDir, "The base directory under which to generate results.") + flag.StringSliceVar(&g.ProtoImport, "proto-import", g.ProtoImport, "A search path for imported protobufs (may be repeated).") flag.StringVar(&g.Conditional, "conditional", g.Conditional, "An optional Golang build tag condition to add to the generated Go code") flag.BoolVar(&g.Clean, "clean", g.Clean, "If true, remove all generated files for the specified Packages.") flag.BoolVar(&g.OnlyIDL, "only-idl", g.OnlyIDL, "If true, only generate the IDL for each package.") flag.BoolVar(&g.KeepGogoproto, "keep-gogoproto", g.KeepGogoproto, "If true, the generated IDL will contain gogoprotobuf extensions which are normally removed") flag.BoolVar(&g.SkipGeneratedRewrite, "skip-generated-rewrite", g.SkipGeneratedRewrite, "If true, skip fixing up the generated.pb.go file (debugging only).") flag.StringVar(&g.DropEmbeddedFields, "drop-embedded-fields", g.DropEmbeddedFields, "Comma-delimited list of embedded Go types to omit from generated protobufs") - flag.StringVar(&g.TrimPathPrefix, "trim-path-prefix", g.TrimPathPrefix, "If set, trim the specified prefix from --output-package when generating files.") } +// This roughly models gengo/v2.Execute. func Run(g *Generator) { - if g.Common.VerifyOnly { - g.OnlyIDL = true - g.Clean = false - } - - b := parser.New() - b.AddBuildTags("proto") - - omitTypes := map[types.Name]struct{}{} - for _, t := range strings.Split(g.DropEmbeddedFields, ",") { - name := types.Name{} - if i := strings.LastIndex(t, "."); i != -1 { - name.Package, name.Name = t[:i], t[i+1:] - } else { - name.Name = t - } - if len(name.Name) == 0 { - log.Fatalf("--drop-embedded-types requires names in the form of [GOPACKAGE.]TYPENAME: %v", t) - } - omitTypes[name] = struct{}{} - } - - boilerplate, err := g.Common.LoadGoBoilerplate() - if err != nil { - log.Fatalf("Failed loading boilerplate (consider using the go-header-file flag): %v", err) - } + // Roughly models gengo/v2.newBuilder. - protobufNames := NewProtobufNamer() - outputPackages := generator.Packages{} - nonOutputPackages := map[string]struct{}{} + p := parser.NewWithOptions(parser.Options{BuildTags: []string{"proto"}}) - var packages []string + var allInputs []string if len(g.APIMachineryPackages) != 0 { - packages = append(packages, strings.Split(g.APIMachineryPackages, ",")...) + allInputs = append(allInputs, strings.Split(g.APIMachineryPackages, ",")...) } if len(g.Packages) != 0 { - packages = append(packages, strings.Split(g.Packages, ",")...) + allInputs = append(allInputs, strings.Split(g.Packages, ",")...) } - if len(packages) == 0 { + if len(allInputs) == 0 { log.Fatalf("Both apimachinery-packages and packages are empty. At least one package must be specified.") } - for _, d := range packages { - generateAllTypes, outputPackage := true, true + // Build up a list of packages to load from all the inputs. Track the + // special modifiers for each. NOTE: This does not support pkg/... syntax. + type modifier struct { + allTypes bool + output bool + name string + } + inputModifiers := map[string]modifier{} + packages := make([]string, 0, len(allInputs)) + + for _, d := range allInputs { + modifier := modifier{allTypes: true, output: true} + switch { case strings.HasPrefix(d, "+"): d = d[1:] - generateAllTypes = false + modifier.allTypes = false case strings.HasPrefix(d, "-"): d = d[1:] - outputPackage = false + modifier.output = false } name := protoSafePackage(d) parts := strings.SplitN(d, "=", 2) @@ -158,41 +126,21 @@ func Run(g *Generator) { d = parts[0] name = parts[1] } - p := newProtobufPackage(d, name, generateAllTypes, omitTypes) - header := append([]byte{}, boilerplate...) - header = append(header, p.HeaderText...) - p.HeaderText = header - protobufNames.Add(p) - if outputPackage { - outputPackages = append(outputPackages, p) - } else { - nonOutputPackages[name] = struct{}{} - } - } + modifier.name = name - if !g.Common.VerifyOnly { - for _, p := range outputPackages { - if err := p.(*protobufPackage).Clean(g.OutputBase); err != nil { - log.Fatalf("Unable to clean package %s: %v", p.Name(), err) - } - } - } - - if g.Clean { - return + packages = append(packages, d) + inputModifiers[d] = modifier } - for _, p := range protobufNames.List() { - if err := b.AddDir(p.Path()); err != nil { - log.Fatalf("Unable to add directory %q: %v", p.Path(), err) - } + // Load all the packages at once. + if err := p.LoadPackages(packages...); err != nil { + log.Fatalf("Unable to load packages: %v", err) } c, err := generator.NewContext( - b, + p, namer.NameSystems{ "public": namer.NewPublicNamer(3), - "proto": protobufNames, }, "public", ) @@ -200,9 +148,62 @@ func Run(g *Generator) { log.Fatalf("Failed making a context: %v", err) } - c.Verify = g.Common.VerifyOnly c.FileTypes["protoidl"] = NewProtoFile() - c.TrimPathPrefix = g.TrimPathPrefix + + // Roughly models gengo/v2.Execute calling the + // tool-provided Targets() callback. + + boilerplate, err := gengo.GoBoilerplate(g.GoHeaderFile, "", "") + if err != nil { + log.Fatalf("Failed loading boilerplate (consider using the go-header-file flag): %v", err) + } + + omitTypes := map[types.Name]struct{}{} + for _, t := range strings.Split(g.DropEmbeddedFields, ",") { + name := types.Name{} + if i := strings.LastIndex(t, "."); i != -1 { + name.Package, name.Name = t[:i], t[i+1:] + } else { + name.Name = t + } + if len(name.Name) == 0 { + log.Fatalf("--drop-embedded-types requires names in the form of [GOPACKAGE.]TYPENAME: %v", t) + } + omitTypes[name] = struct{}{} + } + + protobufNames := NewProtobufNamer() + outputPackages := []generator.Target{} + nonOutputPackages := map[string]struct{}{} + + for _, input := range c.Inputs { + mod, found := inputModifiers[input] + if !found { + log.Fatalf("BUG: can't find input modifiers for %q", input) + } + pkg := c.Universe[input] + protopkg := newProtobufPackage(pkg.Path, pkg.Dir, mod.name, mod.allTypes, omitTypes) + header := append([]byte{}, boilerplate...) + header = append(header, protopkg.HeaderComment...) + protopkg.HeaderComment = header + protobufNames.Add(protopkg) + if mod.output { + outputPackages = append(outputPackages, protopkg) + } else { + nonOutputPackages[mod.name] = struct{}{} + } + } + c.Namers["proto"] = protobufNames + + for _, p := range outputPackages { + if err := p.(*protobufPackage).Clean(); err != nil { + log.Fatalf("Unable to clean package %s: %v", p.Name(), err) + } + } + + if g.Clean { + return + } // order package by imports, importees first deps := deps(c, protobufNames.packages) @@ -216,28 +217,20 @@ func Run(g *Generator) { } sort.Sort(positionOrder{topologicalPos, protobufNames.packages}) - var vendoredOutputPackages, localOutputPackages generator.Packages + var localOutputPackages []generator.Target for _, p := range protobufNames.packages { if _, ok := nonOutputPackages[p.Name()]; ok { // if we're not outputting the package, don't include it in either package list continue } - p.Vendored = strings.Contains(c.Universe[p.PackagePath].SourcePath, "/vendor/") - if p.Vendored { - vendoredOutputPackages = append(vendoredOutputPackages, p) - } else { - localOutputPackages = append(localOutputPackages, p) - } + localOutputPackages = append(localOutputPackages, p) } if err := protobufNames.AssignTypesToPackages(c); err != nil { log.Fatalf("Failed to identify Common types: %v", err) } - if err := c.ExecutePackages(g.VendorOutputBase, vendoredOutputPackages); err != nil { - log.Fatalf("Failed executing vendor generator: %v", err) - } - if err := c.ExecutePackages(g.OutputBase, localOutputPackages); err != nil { + if err := c.ExecuteTargets(localOutputPackages); err != nil { log.Fatalf("Failed executing local generator: %v", err) } @@ -249,13 +242,24 @@ func Run(g *Generator) { log.Fatalf("Unable to find 'protoc': %v", err) } - searchArgs := []string{"-I", ".", "-I", g.OutputBase} + searchArgs := []string{"-I", ".", "-I", g.OutputDir} if len(g.ProtoImport) != 0 { for _, s := range g.ProtoImport { searchArgs = append(searchArgs, "-I", s) } } - args := append(searchArgs, fmt.Sprintf("--gogo_out=%s", g.OutputBase)) + // Despite docs saying that `--gogo_out=paths=source_relative:.` will + // output the .pb.go file to the same directory as the .proto file, it + // doesn't. Given example.com/foo/bar.proto (found in one of the -I paths + // above), the output becomes + // $output_base/example.com/foo/example.com/foo/bar.pb.go - basically + // useless. Users should set the output-dir to a single dir under which + // all the packages in question live (e.g. staging/src in kubernetes). + // Alternately, we could generate into a temp path and then move the + // resulting file back to the input dir, but that seems brittle in other + // ways. + args := searchArgs + args = append(args, fmt.Sprintf("--gogo_out=%s", g.OutputDir)) buf := &bytes.Buffer{} if len(g.Conditional) > 0 { @@ -266,28 +270,8 @@ func Run(g *Generator) { for _, outputPackage := range outputPackages { p := outputPackage.(*protobufPackage) - path := filepath.Join(g.OutputBase, p.ImportPath()) - outputPath := filepath.Join(g.OutputBase, p.OutputPath()) - if p.Vendored { - path = filepath.Join(g.VendorOutputBase, p.ImportPath()) - outputPath = filepath.Join(g.VendorOutputBase, p.OutputPath()) - } - - // When working outside of GOPATH, we typically won't want to generate the - // full path for a package. For example, if our current project's root/base - // package is github.com/foo/bar, outDir=., p.Path()=github.com/foo/bar/generated, - // then we really want to be writing files to ./generated, not ./github.com/foo/bar/generated. - // The following will trim a path prefix (github.com/foo/bar) from p.Path() to arrive at - // a relative path that works with projects not in GOPATH. - if g.TrimPathPrefix != "" { - separator := string(filepath.Separator) - if !strings.HasSuffix(g.TrimPathPrefix, separator) { - g.TrimPathPrefix += separator - } - - path = strings.TrimPrefix(path, g.TrimPathPrefix) - outputPath = strings.TrimPrefix(outputPath, g.TrimPathPrefix) - } + path := filepath.Join(g.OutputDir, p.ImportPath()) + outputPath := filepath.Join(g.OutputDir, p.OutputPath()) // generate the gogoprotobuf protoc cmd := exec.Command("protoc", append(args, path)...) @@ -295,7 +279,7 @@ func Run(g *Generator) { if err != nil { log.Println(strings.Join(cmd.Args, " ")) log.Println(string(out)) - log.Fatalf("Unable to generate protoc on %s: %v", p.PackageName, err) + log.Fatalf("Unable to run protoc on %s: %v", p.Name(), err) } if g.SkipGeneratedRewrite { @@ -316,7 +300,7 @@ func Run(g *Generator) { } if err != nil { log.Println(strings.Join(cmd.Args, " ")) - log.Fatalf("Unable to rewrite imports for %s: %v", p.PackageName, err) + log.Fatalf("Unable to rewrite imports for %s: %v", p.Name(), err) } // format and simplify the generated file @@ -327,7 +311,7 @@ func Run(g *Generator) { } if err != nil { log.Println(strings.Join(cmd.Args, " ")) - log.Fatalf("Unable to apply gofmt for %s: %v", p.PackageName, err) + log.Fatalf("Unable to apply gofmt for %s: %v", p.Name(), err) } } @@ -341,10 +325,7 @@ func Run(g *Generator) { p := outputPackage.(*protobufPackage) p.OmitGogo = true } - if err := c.ExecutePackages(g.VendorOutputBase, vendoredOutputPackages); err != nil { - log.Fatalf("Failed executing vendor generator: %v", err) - } - if err := c.ExecutePackages(g.OutputBase, localOutputPackages); err != nil { + if err := c.ExecuteTargets(localOutputPackages); err != nil { log.Fatalf("Failed executing local generator: %v", err) } } @@ -356,10 +337,7 @@ func Run(g *Generator) { continue } - pattern := filepath.Join(g.OutputBase, p.PackagePath, "*.go") - if p.Vendored { - pattern = filepath.Join(g.VendorOutputBase, p.PackagePath, "*.go") - } + pattern := filepath.Join(g.OutputDir, p.Path(), "*.go") files, err := filepath.Glob(pattern) if err != nil { log.Fatalf("Can't glob pattern %q: %v", pattern, err) @@ -379,13 +357,13 @@ func Run(g *Generator) { func deps(c *generator.Context, pkgs []*protobufPackage) map[string][]string { ret := map[string][]string{} for _, p := range pkgs { - pkg, ok := c.Universe[p.PackagePath] + pkg, ok := c.Universe[p.Path()] if !ok { - log.Fatalf("Unrecognized package: %s", p.PackagePath) + log.Fatalf("Unrecognized package: %s", p.Path()) } for _, d := range pkg.Imports { - ret[p.PackagePath] = append(ret[p.PackagePath], d.Path) + ret[p.Path()] = append(ret[p.Path()], d.Path) } } return ret @@ -414,9 +392,9 @@ func importOrder(deps map[string][]string) ([]string, error) { if len(remainingNodes) > 0 { return nil, fmt.Errorf("cycle: remaining nodes: %#v, remaining edges: %#v", remainingNodes, graph) } - //for _, n := range sorted { - // fmt.Println("topological order", n) - //} + // for _, n := range sorted { + // fmt.Println("topological order", n) + // } return sorted, nil } @@ -470,11 +448,9 @@ func (o positionOrder) Len() int { } func (o positionOrder) Less(i, j int) bool { - return o.pos[o.elements[i].PackagePath] < o.pos[o.elements[j].PackagePath] + return o.pos[o.elements[i].Path()] < o.pos[o.elements[j].Path()] } func (o positionOrder) Swap(i, j int) { - x := o.elements[i] - o.elements[i] = o.elements[j] - o.elements[j] = x + o.elements[i], o.elements[j] = o.elements[j], o.elements[i] } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go index c480a8a62ea..0fc653dda1c 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go @@ -25,16 +25,18 @@ import ( "strconv" "strings" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" - - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" ) // genProtoIDL produces a .proto IDL. type genProtoIDL struct { - generator.DefaultGen + // This base type is close enough to what we need, if we redefine some + // methods. + generator.GoGenerator localPackage types.Name localGoPackage types.Name imports namer.ImportTracker @@ -63,8 +65,11 @@ func (g *genProtoIDL) PackageVars(c *generator.Context) []string { fmt.Sprintf("option go_package = %q;", g.localGoPackage.Package), } } -func (g *genProtoIDL) Filename() string { return g.OptionalName + ".proto" } + +func (g *genProtoIDL) Filename() string { return g.OutputFilename + ".proto" } + func (g *genProtoIDL) FileType() string { return "protoidl" } + func (g *genProtoIDL) Namers(c *generator.Context) namer.NameSystems { return namer.NameSystems{ // The local namer returns the correct protobuf name for a proto type @@ -75,7 +80,7 @@ func (g *genProtoIDL) Namers(c *generator.Context) namer.NameSystems { // Filter ignores types that are identified as not exportable. func (g *genProtoIDL) Filter(c *generator.Context, t *types.Type) bool { - tagVals := types.ExtractCommentTags("+", t.CommentLines)["protobuf"] + tagVals := gengo.ExtractCommentTags("+", t.CommentLines)["protobuf"] if tagVals != nil { if tagVals[0] == "false" { // Type specified "false". @@ -224,9 +229,8 @@ func (p protobufLocator) GoTypeForName(name types.Name) *types.Type { // ProtoTypeFor locates a Protobuf type for the provided Go type (if possible). func (p protobufLocator) ProtoTypeFor(t *types.Type) (*types.Type, error) { - switch { // we've already converted the type, or it's a map - case t.Kind == types.Protobuf || t.Kind == types.Map: + if t.Kind == types.Protobuf || t.Kind == types.Map { p.tracker.AddType(t) return t, nil } @@ -304,7 +308,7 @@ func (b bodyGen) doStruct(sw *generator.SnippetWriter) error { var alias *types.Type var fields []protoField options := []string{} - allOptions := types.ExtractCommentTags("+", b.t.CommentLines) + allOptions := gengo.ExtractCommentTags("+", b.t.CommentLines) for k, v := range allOptions { switch { case strings.HasPrefix(k, "protobuf.options."): @@ -554,11 +558,11 @@ func protobufTagToField(tag string, field *protoField, m types.Member, t *types. // protobuf:"bytes,3,opt,name=Id,customtype=github.com/gogo/protobuf/test.Uuid" parts := strings.Split(tag, ",") if len(parts) < 3 { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, not enough segments\n", m.Name, t.Name) + return fmt.Errorf("member %q of %q malformed 'protobuf' tag, not enough segments", m.Name, t.Name) } protoTag, err := strconv.Atoi(parts[1]) if err != nil { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, field ID is %q which is not an integer: %v\n", m.Name, t.Name, parts[1], err) + return fmt.Errorf("member %q of %q malformed 'protobuf' tag, field ID is %q which is not an integer: %w", m.Name, t.Name, parts[1], err) } field.Tag = protoTag @@ -579,7 +583,7 @@ func protobufTagToField(tag string, field *protoField, m types.Member, t *types. name = types.Name{ Name: parts[0][last+1:], Package: prefix, - Path: strings.Replace(prefix, ".", "/", -1), + Path: strings.ReplaceAll(prefix, ".", "/"), } } else { name = types.Name{ @@ -598,7 +602,7 @@ func protobufTagToField(tag string, field *protoField, m types.Member, t *types. for i, extra := range parts[3:] { parts := strings.SplitN(extra, "=", 2) if len(parts) != 2 { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, tag %d should be key=value, got %q\n", m.Name, t.Name, i+4, extra) + return fmt.Errorf("member %q of %q malformed 'protobuf' tag, tag %d should be key=value, got %q", m.Name, t.Name, i+4, extra) } switch parts[0] { case "name": diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go index 08a991b1554..0031c9bd831 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go @@ -17,8 +17,8 @@ limitations under the License. package protobuf import ( - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) type ImportTracker struct { diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go index e3b21c6703f..54806384739 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go @@ -21,9 +21,9 @@ import ( "reflect" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) type localNamer struct { @@ -41,7 +41,8 @@ func (n localNamer) Name(t *types.Type) string { } type protobufNamer struct { - packages []*protobufPackage + packages []*protobufPackage + // The key here is a Go import-path. packagesByPath map[string]*protobufPackage } @@ -58,17 +59,9 @@ func (n *protobufNamer) Name(t *types.Type) string { return t.Name.String() } -func (n *protobufNamer) List() []generator.Package { - packages := make([]generator.Package, 0, len(n.packages)) - for i := range n.packages { - packages = append(packages, n.packages[i]) - } - return packages -} - func (n *protobufNamer) Add(p *protobufPackage) { - if _, ok := n.packagesByPath[p.PackagePath]; !ok { - n.packagesByPath[p.PackagePath] = p + if _, ok := n.packagesByPath[p.Path()]; !ok { + n.packagesByPath[p.Path()] = p n.packages = append(n.packages, p) } } @@ -77,7 +70,7 @@ func (n *protobufNamer) GoNameToProtoName(name types.Name) types.Name { if p, ok := n.packagesByPath[name.Package]; ok { return types.Name{ Name: name.Name, - Package: p.PackageName, + Package: p.Name(), Path: p.ImportPath(), } } @@ -85,7 +78,7 @@ func (n *protobufNamer) GoNameToProtoName(name types.Name) types.Name { if _, ok := p.FilterTypes[name]; ok { return types.Name{ Name: name.Name, - Package: p.PackageName, + Package: p.Name(), Path: p.ImportPath(), } } @@ -94,8 +87,8 @@ func (n *protobufNamer) GoNameToProtoName(name types.Name) types.Name { } func protoSafePackage(name string) string { - pkg := strings.Replace(name, "/", ".", -1) - return strings.Replace(pkg, "-", "_", -1) + pkg := strings.ReplaceAll(name, "/", ".") + return strings.ReplaceAll(pkg, "-", "_") } type typeNameSet map[types.Name]*protobufPackage @@ -116,7 +109,7 @@ func assignGoTypeToProtoPackage(p *protobufPackage, t *types.Type, local, global } return } - if t.Name.Package == p.PackagePath { + if t.Name.Package == p.Path() { // Associate types only to their own package global[t.Name] = p } @@ -182,7 +175,7 @@ func (n *protobufNamer) AssignTypesToPackages(c *generator.Context) error { optional := make(map[types.Name]struct{}) p.Imports = NewImportTracker(p.ProtoTypeName()) for _, t := range c.Order { - if t.Name.Package != p.PackagePath { + if t.Name.Package != p.Path() { continue } if !isTypeApplicableToProtobuf(t) { diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go index bed4c3e3061..b31a7c4dd79 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go @@ -25,41 +25,31 @@ import ( "reflect" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/types" ) -func newProtobufPackage(packagePath, packageName string, generateAll bool, omitFieldTypes map[types.Name]struct{}) *protobufPackage { +func newProtobufPackage(packagePath, packageDir, packageName string, generateAll bool, omitFieldTypes map[types.Name]struct{}) *protobufPackage { pkg := &protobufPackage{ - DefaultPackage: generator.DefaultPackage{ + SimpleTarget: generator.SimpleTarget{ // The protobuf package name (foo.bar.baz) - PackageName: packageName, - // A path segment relative to the GOPATH root (foo/bar/baz) - PackagePath: packagePath, - HeaderText: []byte( - ` -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -`), - PackageDocumentation: []byte(fmt.Sprintf( - `// Package %s is an autogenerated protobuf IDL. -`, packageName)), + PkgName: packageName, + PkgPath: packagePath, + PkgDir: packageDir, + HeaderComment: []byte("// This file was autogenerated by go-to-protobuf. Do not edit it manually!\n\n"), + PkgDocComment: []byte(fmt.Sprintf("// Package %s is an autogenerated protobuf IDL.\n", packageName)), }, GenerateAll: generateAll, OmitFieldTypes: omitFieldTypes, } pkg.FilterFunc = pkg.filterFunc - pkg.GeneratorFunc = pkg.generatorFunc + pkg.GeneratorsFunc = pkg.generatorsFunc return pkg } // protobufPackage contains the protobuf implementation of Package. type protobufPackage struct { - generator.DefaultPackage - - // If true, this package has been vendored into our source tree and thus can - // only be generated by changing the vendor tree. - Vendored bool + generator.SimpleTarget // If true, generate protobuf serializations for all public types. // If false, only generate protobuf serializations for structs that @@ -89,9 +79,9 @@ type protobufPackage struct { Imports *ImportTracker } -func (p *protobufPackage) Clean(outputBase string) error { +func (p *protobufPackage) Clean() error { for _, s := range []string{p.ImportPath(), p.OutputPath()} { - if err := os.Remove(filepath.Join(outputBase, s)); err != nil && !os.IsNotExist(err) { + if err := os.Remove(filepath.Join(p.Dir(), filepath.Base(s))); err != nil && !os.IsNotExist(err) { return err } } @@ -179,17 +169,17 @@ func (p *protobufPackage) ExtractGeneratedType(t *ast.TypeSpec) bool { return true } -func (p *protobufPackage) generatorFunc(c *generator.Context) []generator.Generator { +func (p *protobufPackage) generatorsFunc(c *generator.Context) []generator.Generator { generators := []generator.Generator{} p.Imports.AddNullable() generators = append(generators, &genProtoIDL{ - DefaultGen: generator.DefaultGen{ - OptionalName: "generated", + GoGenerator: generator.GoGenerator{ + OutputFilename: "generated", // the extension is added later }, - localPackage: types.Name{Package: p.PackageName, Path: p.PackagePath}, - localGoPackage: types.Name{Package: p.PackagePath, Name: p.GoPackageName()}, + localPackage: types.Name{Package: p.Name(), Path: p.Path()}, + localGoPackage: types.Name{Package: p.Path(), Name: p.GoPackageName()}, imports: p.Imports, generateAll: p.GenerateAll, omitGogo: p.OmitGogo, @@ -199,17 +189,17 @@ func (p *protobufPackage) generatorFunc(c *generator.Context) []generator.Genera } func (p *protobufPackage) GoPackageName() string { - return filepath.Base(p.PackagePath) + return filepath.Base(p.Path()) } func (p *protobufPackage) ImportPath() string { - return filepath.Join(p.PackagePath, "generated.proto") + return filepath.Join(p.Path(), "generated.proto") } func (p *protobufPackage) OutputPath() string { - return filepath.Join(p.PackagePath, "generated.pb.go") + return filepath.Join(p.Path(), "generated.pb.go") } var ( - _ = generator.Package(&protobufPackage{}) + _ = generator.Target(&protobufPackage{}) ) diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go index c4cf66e7447..32f9e0da274 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go @@ -111,8 +111,7 @@ func RewriteGeneratedGogoProtobufFile(name string, extractFn ExtractFunc, option // TODO: move into upstream gogo-protobuf once https://github.com/gogo/protobuf/issues/181 // has agreement func rewriteOptionalMethods(decl ast.Decl, isOptional OptionalFunc) { - switch t := decl.(type) { - case *ast.FuncDecl: + if t, ok := decl.(*ast.FuncDecl); ok { ident, ptr, ok := receiver(t) if !ok { return @@ -150,8 +149,7 @@ type optionalAssignmentVisitor struct { // Visit walks the provided node, transforming field initializations of the form // m.Field = &OptionalType{} -> m.Field = OptionalType{} func (v optionalAssignmentVisitor) Visit(n ast.Node) ast.Visitor { - switch t := n.(type) { - case *ast.AssignStmt: + if t, ok := n.(*ast.AssignStmt); ok { if len(t.Lhs) == 1 && len(t.Rhs) == 1 { if !isFieldSelector(t.Lhs[0], "m", "") { return nil @@ -195,13 +193,11 @@ func (v *optionalItemsVisitor) Visit(n ast.Node) ast.Visitor { t.Lhs[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} } } - switch rhs := t.Rhs[0].(type) { - case *ast.CallExpr: + if rhs, ok := t.Rhs[0].(*ast.CallExpr); ok { if ident, ok := rhs.Fun.(*ast.Ident); ok && ident.Name == "append" { ast.Walk(v, rhs) if len(rhs.Args) > 0 { - switch arg := rhs.Args[0].(type) { - case *ast.Ident: + if arg, ok := rhs.Args[0].(*ast.Ident); ok { if arg.Name == "m" { rhs.Args[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} } @@ -212,8 +208,7 @@ func (v *optionalItemsVisitor) Visit(n ast.Node) ast.Visitor { } } case *ast.IfStmt: - switch cond := t.Cond.(type) { - case *ast.BinaryExpr: + if cond, ok := t.Cond.(*ast.BinaryExpr); ok { if cond.Op == token.EQL { if isFieldSelector(cond.X, "m", "Items") && isIdent(cond.Y, "nil") { cond.X = &ast.StarExpr{X: &ast.Ident{Name: "m"}} @@ -225,8 +220,7 @@ func (v *optionalItemsVisitor) Visit(n ast.Node) ast.Visitor { // if err := m[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { // return err // } - switch s := t.Init.(type) { - case *ast.AssignStmt: + if s, ok := t.Init.(*ast.AssignStmt); ok { if call, ok := s.Rhs[0].(*ast.CallExpr); ok { if sel, ok := call.Fun.(*ast.SelectorExpr); ok { if x, ok := sel.X.(*ast.IndexExpr); ok { @@ -302,15 +296,13 @@ func receiver(f *ast.FuncDecl) (ident *ast.Ident, pointer bool, ok bool) { // dropExistingTypeDeclarations removes any type declaration for which extractFn returns true. The function // returns true if the entire declaration should be dropped. func dropExistingTypeDeclarations(decl ast.Decl, extractFn ExtractFunc) bool { - switch t := decl.(type) { - case *ast.GenDecl: + if t, ok := decl.(*ast.GenDecl); ok { if t.Tok != token.TYPE { return false } specs := []ast.Spec{} for _, s := range t.Specs { - switch spec := s.(type) { - case *ast.TypeSpec: + if spec, ok := s.(*ast.TypeSpec); ok { if extractFn(spec) { continue } @@ -329,15 +321,13 @@ func dropExistingTypeDeclarations(decl ast.Decl, extractFn ExtractFunc) bool { // to prevent generation from being able to define side-effects. The function returns true // if the entire declaration should be dropped. func dropEmptyImportDeclarations(decl ast.Decl) bool { - switch t := decl.(type) { - case *ast.GenDecl: + if t, ok := decl.(*ast.GenDecl); ok { if t.Tok != token.IMPORT { return false } specs := []ast.Spec{} for _, s := range t.Specs { - switch spec := s.(type) { - case *ast.ImportSpec: + if spec, ok := s.(*ast.ImportSpec); ok { if spec.Name != nil && spec.Name.Name == "_" { continue } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go index 6cfa37886b4..44ca07d1a84 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go @@ -17,7 +17,7 @@ limitations under the License. package protobuf import ( - "k8s.io/gengo/types" + "k8s.io/gengo/v2" "k8s.io/klog/v2" ) @@ -25,7 +25,7 @@ import ( // it exists, the value is boolean. If the tag did not exist, it returns // false. func extractBoolTagOrDie(key string, lines []string) bool { - val, err := types.ExtractSingleBoolCommentTag("+", key, false, lines) + val, err := gengo.ExtractSingleBoolCommentTag("+", key, false, lines) if err != nil { klog.Fatal(err) } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore b/pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore deleted file mode 100644 index a5c47b66f83..00000000000 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore +++ /dev/null @@ -1 +0,0 @@ -import-boss diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/README.md b/pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/README.md deleted file mode 100644 index 88dc010ef68..00000000000 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/README.md +++ /dev/null @@ -1,97 +0,0 @@ -## Purpose - -- `import-boss` enforces import restrictions against all pull requests submitted to the [k/k](https://github.com/kubernetes/kubernetes) repository. There are a number of `.import-restrictions` files that in the [k/k](https://github.com/kubernetes/kubernetes) repository, all of which are defined in `YAML` (or `JSON`) format. - -## How does it work? - -- When a directory is verified, `import-boss` looks for a file called `.import-restrictions`. If this file is not found, `import-boss` will go up to the parent directory until it finds this `.import-restrictions` file. - -- Adding `.import-restrictions` files does not add them to CI runs. They need to be explicitly added to `hack/verify-import-boss.sh`. Once an `.import-restrictions` file is added, all of the sub-packages of this file's directory are added as well. - -### What are Rules? - -- If an `.import-restrictions` file is found, then all imports of the package are checked against each `rule` in the file. A `rule` consists of three parts: - - A `SelectorRegexp`, to select the import paths that the rule applies to. - - A list of `AllowedPrefixes` - - A list of `ForbiddenPrefixes` - -- An import is allowed if it matches at least one allowed prefix and does not match any forbidden prefixes. An example `.import-restrictions` file looks like this: - -```json -{ - "Rules": [ - { - "SelectorRegexp": "k8s[.]io", - "AllowedPrefixes": [ - "k8s.io/gengo/examples", - "k8s.io/kubernetes/third_party" - ], - "ForbiddenPrefixes": [ - "k8s.io/kubernetes/pkg/third_party/deprecated" - ] - }, - { - "SelectorRegexp": "^unsafe$", - "AllowedPrefixes": [ - ], - "ForbiddenPrefixes": [ - "" - ] - } - ] -} -``` -- Take note of `"SelectorRegexp": "k8s[.]io"` in the first block. This specifies that we are applying these rules to the `"k8s.io"` import path. -- The second block explicitly matches the "unsafe" package, and forbids it ("" is a prefix of everything). - -### What are Inverse Rules? - -- In contrast to non-inverse rules, which are defined in importing packages, inverse rules are defined in imported packages. - -- Inverse rules allow for fine-grained import restrictions for "private packages" where we don't want to spread use inside of [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes). - -- If an `.import-restrictions` file is found, then all imports of the package are checked against each `inverse rule` in the file. This check will continue, climbing up the directory tree, until a match is found and accepted. - -- Inverse rules also have a boolean `transitive` option. When this option is true, the import rule is also applied to `transitive` imports. - - `transitive` imports are dependencies not directly depended on by the code, but are needed to run the application. Use this option if you want to apply restrictions to those indirect dependencies. - -```yaml -rules: - - selectorRegexp: k8s[.]io - allowedPrefixes: - - k8s.io/gengo/examples - - k8s.io/kubernetes/third_party - forbiddenPrefixes: - - k8s.io/kubernetes/pkg/third_party/deprecated - - selectorRegexp: ^unsafe$ - forbiddenPrefixes: - - "" -inverseRules: - - selectorRegexp: k8s[.]io - allowedPrefixes: - - k8s.io/same-repo - - k8s.io/kubernetes/pkg/legacy - forbiddenPrefixes: - - k8s.io/kubernetes/pkg/legacy/subpkg - - selectorRegexp: k8s[.]io - transitive: true - forbiddenPrefixes: - - k8s.io/kubernetes/cmd/kubelet - - k8s.io/kubernetes/cmd/kubectl -``` - -## How do I run import-boss within the k/k repo? - -- In order to include _test.go files, make sure to pass in the `include-test-files` flag: - ```sh - hack/verify-import-boss.sh --include-test-files=true - ``` - -- To include other directories, pass in a directory or directories using the `input-dirs` flag: - ```sh - hack/verify-import-boss.sh --input-dirs="k8s.io/kubernetes/test/e2e/framework/..." - ``` - -## Reference - -- [import-boss](https://github.com/kubernetes/gengo/tree/master/examples/import-boss) \ No newline at end of file diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/main.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/main.go deleted file mode 100644 index 34373c54117..00000000000 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/import-boss/main.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. -*/ - -// import-boss enforces import restrictions in a given repository. -package main - -import ( - "os" - - "github.com/spf13/pflag" - "k8s.io/gengo/args" - "k8s.io/gengo/examples/import-boss/generators" - - "k8s.io/klog/v2" -) - -func main() { - klog.InitFlags(nil) - arguments := args.Default() - - pflag.CommandLine.BoolVar(&arguments.IncludeTestFiles, "include-test-files", false, "If true, include *_test.go files.") - - if err := arguments.Execute( - generators.NameSystems(), - generators.DefaultNameSystem(), - generators.Packages, - ); err != nil { - klog.Errorf("Error: %v", err) - os.Exit(1) - } - klog.V(2).Info("Completed successfully.") -} diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go index ffd073a86b4..8052578c543 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go @@ -18,18 +18,18 @@ package args import ( "fmt" - "path" "github.com/spf13/pflag" - codegenutil "k8s.io/code-generator/pkg/util" - "k8s.io/gengo/args" ) -// CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs struct { - VersionedClientSetPackage string - InternalClientSetPackage string - ListersPackage string +// Args is used by the gengo framework to pass args specific to this generator. +type Args struct { + OutputDir string // must be a directory path + OutputPkg string // must be a Go import-path + GoHeaderFile string + VersionedClientSetPackage string // must be a Go import-path + InternalClientSetPackage string // must be a Go import-path + ListersPackage string // must be a Go import-path SingleDirectory bool // PluralExceptions define a list of pluralizer exceptions in Type:PluralType format. @@ -37,47 +37,46 @@ type CustomArgs struct { PluralExceptions []string } -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{ - SingleDirectory: false, - PluralExceptions: []string{"Endpoints:Endpoints"}, +// New returns default arguments for the generator. +func New() *Args { + return &Args{ + SingleDirectory: false, } - genericArgs.CustomArgs = customArgs - - if pkg := codegenutil.CurrentPackage(); len(pkg) != 0 { - genericArgs.OutputPackagePath = path.Join(pkg, "pkg/client/informers") - customArgs.VersionedClientSetPackage = path.Join(pkg, "pkg/client/clientset/versioned") - customArgs.InternalClientSetPackage = path.Join(pkg, "pkg/client/clientset/internalversion") - customArgs.ListersPackage = path.Join(pkg, "pkg/client/listers") - } - - return genericArgs, customArgs } // AddFlags add the generator flags to the flag set. -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { - fs.StringVar(&ca.InternalClientSetPackage, "internal-clientset-package", ca.InternalClientSetPackage, "the full package name for the internal clientset to use") - fs.StringVar(&ca.VersionedClientSetPackage, "versioned-clientset-package", ca.VersionedClientSetPackage, "the full package name for the versioned clientset to use") - fs.StringVar(&ca.ListersPackage, "listers-package", ca.ListersPackage, "the full package name for the listers to use") - fs.BoolVar(&ca.SingleDirectory, "single-directory", ca.SingleDirectory, "if true, omit the intermediate \"internalversion\" and \"externalversions\" subdirectories") - fs.StringSliceVar(&ca.PluralExceptions, "plural-exceptions", ca.PluralExceptions, "list of comma separated plural exception definitions in Type:PluralizedType format") +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputDir, "output-dir", "", + "the base directory under which to generate results") + fs.StringVar(&args.OutputPkg, "output-pkg", args.OutputPkg, + "the Go import-path of the generated results") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") + fs.StringVar(&args.InternalClientSetPackage, "internal-clientset-package", args.InternalClientSetPackage, + "the Go import-path of the internal clientset to use") + fs.StringVar(&args.VersionedClientSetPackage, "versioned-clientset-package", args.VersionedClientSetPackage, + "the Go import-path of the versioned clientset to use") + fs.StringVar(&args.ListersPackage, "listers-package", args.ListersPackage, + "the Go import-path of the listers to use") + fs.BoolVar(&args.SingleDirectory, "single-directory", args.SingleDirectory, + "if true, omit the intermediate \"internalversion\" and \"externalversions\" subdirectories") + fs.StringSliceVar(&args.PluralExceptions, "plural-exceptions", args.PluralExceptions, + "list of comma separated plural exception definitions in Type:PluralizedType format") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - customArgs := genericArgs.CustomArgs.(*CustomArgs) - - if len(genericArgs.OutputPackagePath) == 0 { - return fmt.Errorf("output package cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputDir) == 0 { + return fmt.Errorf("--output-dir must be specified") } - if len(customArgs.VersionedClientSetPackage) == 0 { - return fmt.Errorf("versioned clientset package cannot be empty") + if len(args.OutputPkg) == 0 { + return fmt.Errorf("--output-pkg must be specified") } - if len(customArgs.ListersPackage) == 0 { - return fmt.Errorf("listers package cannot be empty") + if len(args.VersionedClientSetPackage) == 0 { + return fmt.Errorf("--versioned-clientset-package must be specified") + } + if len(args.ListersPackage) == 0 { + return fmt.Errorf("--listers-package must be specified") } - return nil } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go index 4875393913b..ee69aac35d9 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go @@ -21,9 +21,9 @@ import ( "path" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) @@ -31,7 +31,7 @@ import ( // factoryGenerator produces a file of listers for a given GroupVersion and // type. type factoryGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker groupVersions map[string]clientgentypes.GroupVersions diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go index 70826ebaad5..278f8ed915c 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go @@ -19,9 +19,9 @@ package generators import ( "io" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) @@ -29,7 +29,7 @@ import ( // factoryInterfaceGenerator produces a file of interfaces used to break a dependency cycle for // informer registration type factoryInterfaceGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker clientSetPackage string diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go index a5a42953d22..d8e8873aab6 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go @@ -23,14 +23,14 @@ import ( clientgentypes "k8s.io/code-generator/cmd/client-gen/types" codegennamer "k8s.io/code-generator/pkg/namer" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // genericGenerator generates the generic informer. type genericGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker groupVersions map[string]clientgentypes.GroupVersions diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/groupinterface.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/groupinterface.go index 0bba93c4b2e..5342e25d97e 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/groupinterface.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/groupinterface.go @@ -18,18 +18,18 @@ package generators import ( "io" - "path/filepath" + "path" "strings" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // groupInterfaceGenerator generates the per-group interface file. type groupInterfaceGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker groupVersions clientgentypes.GroupVersions @@ -70,7 +70,7 @@ func (g *groupInterfaceGenerator) GenerateType(c *generator.Context, t *types.Ty versions := make([]versionData, 0, len(g.groupVersions.Versions)) for _, version := range g.groupVersions.Versions { gv := clientgentypes.GroupVersion{Group: g.groupVersions.Group, Version: version.Version} - versionPackage := filepath.Join(g.outputPackage, strings.ToLower(gv.Version.NonEmpty())) + versionPackage := path.Join(g.outputPackage, strings.ToLower(gv.Version.NonEmpty())) iface := c.Universe.Type(types.Name{Package: versionPackage, Name: "Interface"}) versions = append(versions, versionData{ Name: namer.IC(version.Version.NonEmpty()), diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go index da00e6e61fe..9d786ea07d6 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go @@ -21,9 +21,9 @@ import ( "io" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" @@ -34,7 +34,7 @@ import ( // informerGenerator produces a file of listers for a given GroupVersion and // type. type informerGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string groupPkgName string groupVersion clientgentypes.GroupVersion diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go similarity index 56% rename from vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go rename to pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go index dd2c9cceb93..65dc89d0385 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go @@ -22,16 +22,15 @@ import ( "path/filepath" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - "k8s.io/klog/v2" - "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - informergenargs "k8s.io/code-generator/cmd/informer-gen/args" + "k8s.io/code-generator/cmd/informer-gen/args" genutil "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" + "k8s.io/klog/v2" ) // NameSystems returns the name system used by the generators in this package. @@ -85,37 +84,34 @@ func isInternal(m types.Member) bool { return !strings.Contains(m.Tags, "json") } -func packageForInternalInterfaces(base string) string { - return filepath.Join(base, "internalinterfaces") -} +const subdirForInternalInterfaces = "internalinterfaces" -// Packages makes the client package definition. -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +// GetTargets makes the client target definition. +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, "", gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - customArgs, ok := arguments.CustomArgs.(*informergenargs.CustomArgs) - if !ok { - klog.Fatalf("Wrong CustomArgs type: %T", arguments.CustomArgs) + internalVersionOutputDir := args.OutputDir + internalVersionOutputPkg := args.OutputPkg + externalVersionOutputDir := args.OutputDir + externalVersionOutputPkg := args.OutputPkg + if !args.SingleDirectory { + internalVersionOutputDir = filepath.Join(internalVersionOutputDir, "internalversion") + internalVersionOutputPkg = path.Join(internalVersionOutputPkg, "internalversion") + externalVersionOutputDir = filepath.Join(externalVersionOutputDir, "externalversions") + externalVersionOutputPkg = path.Join(externalVersionOutputPkg, "externalversions") } - internalVersionPackagePath := filepath.Join(arguments.OutputPackagePath) - externalVersionPackagePath := filepath.Join(arguments.OutputPackagePath) - if !customArgs.SingleDirectory { - internalVersionPackagePath = filepath.Join(arguments.OutputPackagePath, "internalversion") - externalVersionPackagePath = filepath.Join(arguments.OutputPackagePath, "externalversions") - } - - var packageList generator.Packages + var targetList []generator.Target typesForGroupVersion := make(map[clientgentypes.GroupVersion][]*types.Type) externalGroupVersions := make(map[string]clientgentypes.GroupVersions) internalGroupVersions := make(map[string]clientgentypes.GroupVersions) groupGoNames := make(map[string]string) - for _, inputDir := range arguments.InputDirs { - p := context.Universe.Package(genutil.Vendorless(inputDir)) + for _, inputPkg := range context.Inputs { + p := context.Universe.Package(inputPkg) objectMeta, internal, err := objectMetaForPackage(p) if err != nil { @@ -148,14 +144,14 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // If there's a comment of the form "// +groupName=somegroup" or // "// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as the name of the // group when generating. - if override := types.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { gv.Group = clientgentypes.Group(override[0]) } // If there's a comment of the form "// +groupGoName=SomeUniqueShortName", use that as // the Go group identifier in CamelCase. It defaults groupGoNames[groupPackageName] = namer.IC(strings.Split(gv.Group.NonEmpty(), ".")[0]) - if override := types.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { groupGoNames[groupPackageName] = namer.IC(override[0]) } @@ -191,57 +187,80 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat typesToGenerate = orderer.OrderTypes(typesToGenerate) if internal { - packageList = append(packageList, versionPackage(internalVersionPackagePath, groupPackageName, gv, groupGoNames[groupPackageName], boilerplate, typesToGenerate, customArgs.InternalClientSetPackage, customArgs.ListersPackage)) + targetList = append(targetList, + versionTarget( + internalVersionOutputDir, internalVersionOutputPkg, + groupPackageName, gv, groupGoNames[groupPackageName], + boilerplate, typesToGenerate, + args.InternalClientSetPackage, args.ListersPackage)) } else { - packageList = append(packageList, versionPackage(externalVersionPackagePath, groupPackageName, gv, groupGoNames[groupPackageName], boilerplate, typesToGenerate, customArgs.VersionedClientSetPackage, customArgs.ListersPackage)) + targetList = append(targetList, + versionTarget( + externalVersionOutputDir, externalVersionOutputPkg, + groupPackageName, gv, groupGoNames[groupPackageName], + boilerplate, typesToGenerate, + args.VersionedClientSetPackage, args.ListersPackage)) } } if len(externalGroupVersions) != 0 { - packageList = append(packageList, factoryInterfacePackage(externalVersionPackagePath, boilerplate, customArgs.VersionedClientSetPackage)) - packageList = append(packageList, factoryPackage(externalVersionPackagePath, boilerplate, groupGoNames, genutil.PluralExceptionListToMapOrDie(customArgs.PluralExceptions), externalGroupVersions, - customArgs.VersionedClientSetPackage, - typesForGroupVersion)) + targetList = append(targetList, + factoryInterfaceTarget( + externalVersionOutputDir, externalVersionOutputPkg, + boilerplate, args.VersionedClientSetPackage)) + targetList = append(targetList, + factoryTarget( + externalVersionOutputDir, externalVersionOutputPkg, + boilerplate, groupGoNames, genutil.PluralExceptionListToMapOrDie(args.PluralExceptions), + externalGroupVersions, args.VersionedClientSetPackage, typesForGroupVersion)) for _, gvs := range externalGroupVersions { - packageList = append(packageList, groupPackage(externalVersionPackagePath, gvs, boilerplate)) + targetList = append(targetList, + groupTarget(externalVersionOutputDir, externalVersionOutputPkg, gvs, boilerplate)) } } if len(internalGroupVersions) != 0 { - packageList = append(packageList, factoryInterfacePackage(internalVersionPackagePath, boilerplate, customArgs.InternalClientSetPackage)) - packageList = append(packageList, factoryPackage(internalVersionPackagePath, boilerplate, groupGoNames, genutil.PluralExceptionListToMapOrDie(customArgs.PluralExceptions), internalGroupVersions, customArgs.InternalClientSetPackage, typesForGroupVersion)) + targetList = append(targetList, + factoryInterfaceTarget(internalVersionOutputDir, internalVersionOutputPkg, boilerplate, args.InternalClientSetPackage)) + targetList = append(targetList, + factoryTarget( + internalVersionOutputDir, internalVersionOutputPkg, + boilerplate, groupGoNames, genutil.PluralExceptionListToMapOrDie(args.PluralExceptions), + internalGroupVersions, args.InternalClientSetPackage, typesForGroupVersion)) for _, gvs := range internalGroupVersions { - packageList = append(packageList, groupPackage(internalVersionPackagePath, gvs, boilerplate)) + targetList = append(targetList, + groupTarget(internalVersionOutputDir, internalVersionOutputPkg, gvs, boilerplate)) } } - return packageList + return targetList } -func factoryPackage(basePackage string, boilerplate []byte, groupGoNames, pluralExceptions map[string]string, groupVersions map[string]clientgentypes.GroupVersions, clientSetPackage string, - typesForGroupVersion map[clientgentypes.GroupVersion][]*types.Type) generator.Package { - return &generator.DefaultPackage{ - PackageName: filepath.Base(basePackage), - PackagePath: basePackage, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { +func factoryTarget(outputDirBase, outputPkgBase string, boilerplate []byte, groupGoNames, pluralExceptions map[string]string, groupVersions map[string]clientgentypes.GroupVersions, clientSetPackage string, + typesForGroupVersion map[clientgentypes.GroupVersion][]*types.Type) generator.Target { + return &generator.SimpleTarget{ + PkgName: path.Base(outputDirBase), + PkgPath: outputPkgBase, + PkgDir: outputDirBase, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &factoryGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "factory", + GoGenerator: generator.GoGenerator{ + OutputFilename: "factory.go", }, - outputPackage: basePackage, + outputPackage: outputPkgBase, imports: generator.NewImportTracker(), groupVersions: groupVersions, clientSetPackage: clientSetPackage, - internalInterfacesPackage: packageForInternalInterfaces(basePackage), + internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), gvGoNames: groupGoNames, }) generators = append(generators, &genericGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "generic", + GoGenerator: generator.GoGenerator{ + OutputFilename: "generic.go", }, - outputPackage: basePackage, + outputPackage: outputPkgBase, imports: generator.NewImportTracker(), groupVersions: groupVersions, pluralExceptions: pluralExceptions, @@ -254,19 +273,21 @@ func factoryPackage(basePackage string, boilerplate []byte, groupGoNames, plural } } -func factoryInterfacePackage(basePackage string, boilerplate []byte, clientSetPackage string) generator.Package { - packagePath := packageForInternalInterfaces(basePackage) +func factoryInterfaceTarget(outputDirBase, outputPkgBase string, boilerplate []byte, clientSetPackage string) generator.Target { + outputDir := filepath.Join(outputDirBase, subdirForInternalInterfaces) + outputPkg := path.Join(outputPkgBase, subdirForInternalInterfaces) - return &generator.DefaultPackage{ - PackageName: filepath.Base(packagePath), - PackagePath: packagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + return &generator.SimpleTarget{ + PkgName: path.Base(outputDir), + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &factoryInterfaceGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "factory_interfaces", + GoGenerator: generator.GoGenerator{ + OutputFilename: "factory_interfaces.go", }, - outputPackage: packagePath, + outputPackage: outputPkg, imports: generator.NewImportTracker(), clientSetPackage: clientSetPackage, }) @@ -276,23 +297,25 @@ func factoryInterfacePackage(basePackage string, boilerplate []byte, clientSetPa } } -func groupPackage(basePackage string, groupVersions clientgentypes.GroupVersions, boilerplate []byte) generator.Package { - packagePath := filepath.Join(basePackage, groupVersions.PackageName) +func groupTarget(outputDirBase, outputPackageBase string, groupVersions clientgentypes.GroupVersions, boilerplate []byte) generator.Target { + outputDir := filepath.Join(outputDirBase, groupVersions.PackageName) + outputPkg := path.Join(outputPackageBase, groupVersions.PackageName) groupPkgName := strings.Split(string(groupVersions.PackageName), ".")[0] - return &generator.DefaultPackage{ - PackageName: groupPkgName, - PackagePath: packagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + return &generator.SimpleTarget{ + PkgName: groupPkgName, + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &groupInterfaceGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "interface", + GoGenerator: generator.GoGenerator{ + OutputFilename: "interface.go", }, - outputPackage: packagePath, + outputPackage: outputPkg, groupVersions: groupVersions, imports: generator.NewImportTracker(), - internalInterfacesPackage: packageForInternalInterfaces(basePackage), + internalInterfacesPackage: path.Join(outputPackageBase, subdirForInternalInterfaces), }) return generators }, @@ -303,30 +326,33 @@ func groupPackage(basePackage string, groupVersions clientgentypes.GroupVersions } } -func versionPackage(basePackage string, groupPkgName string, gv clientgentypes.GroupVersion, groupGoName string, boilerplate []byte, typesToGenerate []*types.Type, clientSetPackage, listersPackage string) generator.Package { - packagePath := filepath.Join(basePackage, groupPkgName, strings.ToLower(gv.Version.NonEmpty())) - - return &generator.DefaultPackage{ - PackageName: strings.ToLower(gv.Version.NonEmpty()), - PackagePath: packagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { +func versionTarget(outputDirBase, outputPkgBase string, groupPkgName string, gv clientgentypes.GroupVersion, groupGoName string, boilerplate []byte, typesToGenerate []*types.Type, clientSetPackage, listersPackage string) generator.Target { + subdir := []string{groupPkgName, strings.ToLower(gv.Version.NonEmpty())} + outputDir := filepath.Join(outputDirBase, filepath.Join(subdir...)) + outputPkg := path.Join(outputPkgBase, path.Join(subdir...)) + + return &generator.SimpleTarget{ + PkgName: strings.ToLower(gv.Version.NonEmpty()), + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &versionInterfaceGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "interface", + GoGenerator: generator.GoGenerator{ + OutputFilename: "interface.go", }, - outputPackage: packagePath, + outputPackage: outputPkg, imports: generator.NewImportTracker(), types: typesToGenerate, - internalInterfacesPackage: packageForInternalInterfaces(basePackage), + internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), }) for _, t := range typesToGenerate { generators = append(generators, &informerGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: strings.ToLower(t.Name.Name), + GoGenerator: generator.GoGenerator{ + OutputFilename: strings.ToLower(t.Name.Name) + ".go", }, - outputPackage: packagePath, + outputPackage: outputPkg, groupPkgName: groupPkgName, groupVersion: gv, groupGoName: groupGoName, @@ -334,7 +360,7 @@ func versionPackage(basePackage string, groupPkgName string, gv clientgentypes.G imports: generator.NewImportTracker(), clientSetPackage: clientSetPackage, listersPackage: listersPackage, - internalInterfacesPackage: packageForInternalInterfaces(basePackage), + internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), }) } return generators diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go index fc1f7786f66..4ca511ea4ed 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go @@ -16,7 +16,7 @@ limitations under the License. package generators -import "k8s.io/gengo/types" +import "k8s.io/gengo/v2/types" var ( apiScheme = types.Name{Package: "k8s.io/kubernetes/pkg/api/legacyscheme", Name: "Scheme"} diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go index 3b51f8dc826..5f9a0c218d6 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go @@ -19,16 +19,16 @@ package generators import ( "io" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" ) // versionInterfaceGenerator generates the per-version interface file. type versionInterfaceGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker types []*types.Type diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/main.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/main.go index 1247c35b37a..b0fc48517bf 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/main.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/main.go @@ -20,39 +20,38 @@ import ( "flag" "github.com/spf13/pflag" + "k8s.io/code-generator/cmd/informer-gen/args" "k8s.io/code-generator/cmd/informer-gen/generators" "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/informer-gen/args" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() - - // Override defaults. - // TODO: move out of informer-gen - genericArgs.OutputPackagePath = "k8s.io/kubernetes/pkg/client/informers/informers_generated" - customArgs.VersionedClientSetPackage = "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - customArgs.InternalClientSetPackage = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - customArgs.ListersPackage = "k8s.io/kubernetes/pkg/client/listers" + args := args.New() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( - generators.NameSystems(util.PluralExceptionListToMapOrDie(customArgs.PluralExceptions)), + if err := gengo.Execute( + generators.NameSystems(util.PluralExceptionListToMapOrDie(args.PluralExceptions)), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go index 170334505ab..e6b9e00ab92 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go @@ -18,47 +18,45 @@ package args import ( "fmt" - "path" "github.com/spf13/pflag" - codegenutil "k8s.io/code-generator/pkg/util" - "k8s.io/gengo/args" ) -// CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs struct { +// Args is used by the gengo framework to pass args specific to this generator. +type Args struct { + OutputDir string // must be a directory path + OutputPkg string // must be a Go import-path + GoHeaderFile string + // PluralExceptions specify list of exceptions used when pluralizing certain types. // For example 'Endpoints:Endpoints', otherwise the pluralizer will generate 'Endpointes'. PluralExceptions []string } -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{ - PluralExceptions: []string{"Endpoints:Endpoints"}, - } - genericArgs.CustomArgs = customArgs - - if pkg := codegenutil.CurrentPackage(); len(pkg) != 0 { - genericArgs.OutputPackagePath = path.Join(pkg, "pkg/client/listers") - } - - return genericArgs, customArgs +// New returns default arguments for the generator. +func New() *Args { + return &Args{} } // AddFlags add the generator flags to the flag set. -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { - fs.StringSliceVar(&ca.PluralExceptions, "plural-exceptions", ca.PluralExceptions, "list of comma separated plural exception definitions in Type:PluralizedType format") +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputDir, "output-dir", "", + "the base directory under which to generate results") + fs.StringVar(&args.OutputPkg, "output-pkg", "", + "the base Go import-path under which to generate results") + fs.StringSliceVar(&args.PluralExceptions, "plural-exceptions", args.PluralExceptions, + "list of comma separated plural exception definitions in Type:PluralizedType format") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - _ = genericArgs.CustomArgs.(*CustomArgs) - - if len(genericArgs.OutputPackagePath) == 0 { - return fmt.Errorf("output package cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputDir) == 0 { + return fmt.Errorf("--output-dir must be specified") + } + if len(args.OutputPkg) == 0 { + return fmt.Errorf("--output-pkg must be specified") } - return nil } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/generators/expansion.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/generators/expansion.go index dd45d7749c7..4755f2ed1e6 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/generators/expansion.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/generators/expansion.go @@ -22,17 +22,18 @@ import ( "path/filepath" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/types" + "k8s.io/klog/v2" "k8s.io/code-generator/cmd/client-gen/generators/util" ) // expansionGenerator produces a file for a expansion interfaces. type expansionGenerator struct { - generator.DefaultGen - packagePath string - types []*types.Type + generator.GoGenerator + outputPath string + types []*types.Type } // We only want to call GenerateType() once per group. @@ -44,11 +45,16 @@ func (g *expansionGenerator) GenerateType(c *generator.Context, t *types.Type, w sw := generator.NewSnippetWriter(w, c, "$", "$") for _, t := range g.types { tags := util.MustParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) - if _, err := os.Stat(filepath.Join(g.packagePath, strings.ToLower(t.Name.Name+"_expansion.go"))); os.IsNotExist(err) { + manualFile := filepath.Join(g.outputPath, strings.ToLower(t.Name.Name+"_expansion.go")) + if _, err := os.Stat(manualFile); err == nil { + klog.V(4).Infof("file %q exists, not generating", manualFile) + } else if os.IsNotExist(err) { sw.Do(expansionInterfaceTemplate, t) if !tags.NonNamespaced { sw.Do(namespacedExpansionInterfaceTemplate, t) } + } else { + return err } } return sw.Error() diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go index 8ada4946903..ce1f9eac713 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go @@ -19,17 +19,17 @@ package generators import ( "fmt" "io" + "path" "path/filepath" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - + "k8s.io/code-generator/cmd/lister-gen/args" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) @@ -59,16 +59,16 @@ func DefaultNameSystem() string { return "public" } -// Packages makes the client package definition. -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +// GetTargets makes the client target definition. +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, "", gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - var packageList generator.Packages - for _, inputDir := range arguments.InputDirs { - p := context.Universe.Package(inputDir) + var targetList []generator.Target + for _, inputPkg := range context.Inputs { + p := context.Universe.Package(inputPkg) objectMeta, internal, err := objectMetaForPackage(p) if err != nil { @@ -101,7 +101,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // If there's a comment of the form "// +groupName=somegroup" or // "// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as the name of the // group when generating. - if override := types.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { gv.Group = clientgentypes.Group(strings.SplitN(override[0], ".", 2)[0]) } @@ -119,26 +119,33 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat orderer := namer.Orderer{Namer: namer.NewPrivateNamer(0)} typesToGenerate = orderer.OrderTypes(typesToGenerate) - packagePath := filepath.Join(arguments.OutputPackagePath, groupPackageName, strings.ToLower(gv.Version.NonEmpty())) - packageList = append(packageList, &generator.DefaultPackage{ - PackageName: strings.ToLower(gv.Version.NonEmpty()), - PackagePath: packagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + subdir := []string{groupPackageName, strings.ToLower(gv.Version.NonEmpty())} + outputDir := filepath.Join(args.OutputDir, filepath.Join(subdir...)) + outputPkg := path.Join(args.OutputPkg, path.Join(subdir...)) + targetList = append(targetList, &generator.SimpleTarget{ + PkgName: strings.ToLower(gv.Version.NonEmpty()), + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + FilterFunc: func(c *generator.Context, t *types.Type) bool { + tags := util.MustParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) + return tags.GenerateClient && tags.HasVerb("list") && tags.HasVerb("get") + }, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &expansionGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "expansion_generated", + GoGenerator: generator.GoGenerator{ + OutputFilename: "expansion_generated.go", }, - packagePath: filepath.Join(arguments.OutputBase, packagePath), - types: typesToGenerate, + outputPath: outputDir, + types: typesToGenerate, }) for _, t := range typesToGenerate { generators = append(generators, &listerGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: strings.ToLower(t.Name.Name), + GoGenerator: generator.GoGenerator{ + OutputFilename: strings.ToLower(t.Name.Name) + ".go", }, - outputPackage: arguments.OutputPackagePath, + outputPackage: outputPkg, groupVersion: gv, internalGVPkg: internalGVPkg, typeToGenerate: t, @@ -148,14 +155,10 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat } return generators }, - FilterFunc: func(c *generator.Context, t *types.Type) bool { - tags := util.MustParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) - return tags.GenerateClient && tags.HasVerb("list") && tags.HasVerb("get") - }, }) } - return packageList + return targetList } // objectMetaForPackage returns the type of ObjectMeta used by package p. @@ -187,7 +190,7 @@ func isInternal(m types.Member) bool { // listerGenerator produces a file of listers for a given GroupVersion and // type. type listerGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string groupVersion clientgentypes.GroupVersion internalGVPkg string @@ -233,25 +236,25 @@ func (g *listerGenerator) GenerateType(c *generator.Context, t *types.Type, w io } if tags.NonNamespaced { - sw.Do(typeListerInterface_NonNamespaced, m) + sw.Do(typeListerInterfaceNonNamespaced, m) } else { sw.Do(typeListerInterface, m) } sw.Do(typeListerStruct, m) sw.Do(typeListerConstructor, m) - sw.Do(typeLister_List, m) + sw.Do(typeListerList, m) if tags.NonNamespaced { - sw.Do(typeLister_NonNamespacedGet, m) + sw.Do(typeListerNonNamespacedGet, m) return sw.Error() } - sw.Do(typeLister_NamespaceLister, m) + sw.Do(typeListerNamespaceLister, m) sw.Do(namespaceListerInterface, m) sw.Do(namespaceListerStruct, m) - sw.Do(namespaceLister_List, m) - sw.Do(namespaceLister_Get, m) + sw.Do(namespaceListerList, m) + sw.Do(namespaceListerGet, m) return sw.Error() } @@ -269,7 +272,7 @@ type $.type|public$Lister interface { } ` -var typeListerInterface_NonNamespaced = ` +var typeListerInterfaceNonNamespaced = ` // $.type|public$Lister helps list $.type|publicPlural$. // All objects returned here must be treated as read-only. type $.type|public$Lister interface { @@ -297,7 +300,7 @@ func New$.type|public$Lister(indexer cache.Indexer) $.type|public$Lister { } ` -var typeLister_List = ` +var typeListerList = ` // List lists all $.type|publicPlural$ in the indexer. func (s *$.type|private$Lister) List(selector labels.Selector) (ret []*$.type|raw$, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { @@ -307,14 +310,14 @@ func (s *$.type|private$Lister) List(selector labels.Selector) (ret []*$.type|ra } ` -var typeLister_NamespaceLister = ` +var typeListerNamespaceLister = ` // $.type|publicPlural$ returns an object that can list and get $.type|publicPlural$. func (s *$.type|private$Lister) $.type|publicPlural$(namespace string) $.type|public$NamespaceLister { return $.type|private$NamespaceLister{indexer: s.indexer, namespace: namespace} } ` -var typeLister_NonNamespacedGet = ` +var typeListerNonNamespacedGet = ` // Get retrieves the $.type|public$ from the index for a given name. func (s *$.type|private$Lister) Get(name string) (*$.type|raw$, error) { obj, exists, err := s.indexer.GetByKey(name) @@ -351,7 +354,7 @@ type $.type|private$NamespaceLister struct { } ` -var namespaceLister_List = ` +var namespaceListerList = ` // List lists all $.type|publicPlural$ in the indexer for a given namespace. func (s $.type|private$NamespaceLister) List(selector labels.Selector) (ret []*$.type|raw$, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { @@ -361,7 +364,7 @@ func (s $.type|private$NamespaceLister) List(selector labels.Selector) (ret []*$ } ` -var namespaceLister_Get = ` +var namespaceListerGet = ` // Get retrieves the $.type|public$ from the indexer for a given namespace and name. func (s $.type|private$NamespaceLister) Get(name string) (*$.type|raw$, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/main.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/main.go index a7d7b610878..8dde18bab98 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/main.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/lister-gen/main.go @@ -20,36 +20,38 @@ import ( "flag" "github.com/spf13/pflag" + "k8s.io/code-generator/cmd/lister-gen/args" "k8s.io/code-generator/cmd/lister-gen/generators" "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/lister-gen/args" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() - - // Override defaults. - // TODO: move this out of lister-gen - genericArgs.OutputPackagePath = "k8s.io/kubernetes/pkg/client/listers" + args := args.New() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( - generators.NameSystems(util.PluralExceptionListToMapOrDie(customArgs.PluralExceptions)), + if err := gengo.Execute( + generators.NameSystems(util.PluralExceptionListToMapOrDie(args.PluralExceptions)), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/openapi-gen/main.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/openapi-gen/main.go deleted file mode 100644 index c446e80b8a0..00000000000 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/openapi-gen/main.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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 generates openAPI definition file to be used in open API spec generation on API servers. To generate -// definition for a specific type or package add "+k8s:openapi-gen=true" tag to the type/package comment lines. To -// exclude a type from a tagged package, add "+k8s:openapi-gen=false" tag to the type comment lines. - -package main - -import ( - "flag" - "log" - - generatorargs "k8s.io/kube-openapi/cmd/openapi-gen/args" - "k8s.io/kube-openapi/pkg/generators" - - "github.com/spf13/pflag" - - "k8s.io/klog/v2" -) - -func main() { - klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() - - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) - flag.Set("logtostderr", "true") - pflag.CommandLine.AddGoFlagSet(flag.CommandLine) - pflag.Parse() - - if err := generatorargs.Validate(genericArgs); err != nil { - log.Fatalf("Arguments validation error: %v", err) - } - - // Generates the code for the OpenAPIDefinitions. - if err := genericArgs.Execute( - generators.NameSystems(), - generators.DefaultNameSystem(), - generators.Packages, - ); err != nil { - log.Fatalf("OpenAPI code generation error: %v", err) - } -} diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/args/args.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/args/args.go index 2e3ab084e20..cc1fdafc83d 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/args/args.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/args/args.go @@ -19,19 +19,30 @@ package args import ( "fmt" - "k8s.io/gengo/args" + "github.com/spf13/pflag" ) -// NewDefaults returns default arguments for the generator. -func NewDefaults() *args.GeneratorArgs { - genericArgs := args.Default().WithoutDefaultFlagParsing() - genericArgs.OutputFileBaseName = "zz_generated.register" - return genericArgs +type Args struct { + OutputFile string + GoHeaderFile string +} + +// New returns default arguments for the generator. +func New() *Args { + return &Args{} +} + +// AddFlags add the generator flags to the flag set. +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputFile, "output-file", "generated.register.go", + "the name of the file to be generated") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - if len(genericArgs.OutputFileBaseName) == 0 { +func (args *Args) Validate() error { + if len(args.OutputFile) == 0 { return fmt.Errorf("output file base name cannot be empty") } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/generators/register_external.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/generators/register_external.go index c831c575d6d..7eb7793e408 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/generators/register_external.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/generators/register_external.go @@ -21,13 +21,13 @@ import ( "sort" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) type registerExternalGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string gv clientgentypes.GroupVersion typesToGenerate []*types.Type @@ -91,7 +91,7 @@ var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder localSchemeBuilder = &SchemeBuilder - // Depreciated: use Install instead + // Deprecated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme ) diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/generators/packages.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go similarity index 74% rename from pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/generators/packages.go rename to pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go index fa8e3f1c356..d2998261c8d 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/generators/packages.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go @@ -25,10 +25,11 @@ import ( "k8s.io/klog/v2" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/code-generator/cmd/register-gen/args" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // NameSystems returns the name system used by the generators in this package. @@ -42,29 +43,29 @@ func DefaultNameSystem() string { return "public" } -// Packages makes packages to generate. -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +// GetTargets makes targets to generate. +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - packages := generator.Packages{} - for _, inputDir := range arguments.InputDirs { - pkg := context.Universe.Package(inputDir) + targets := []generator.Target{} + for _, input := range context.Inputs { + pkg := context.Universe.Package(input) internal, err := isInternal(pkg) if err != nil { - klog.V(5).Infof("skipping the generation of %s file, due to err %v", arguments.OutputFileBaseName, err) + klog.V(5).Infof("skipping the generation of %s file, due to err %v", args.OutputFile, err) continue } if internal { - klog.V(5).Infof("skipping the generation of %s file because %s package contains internal types, note that internal types don't have \"json\" tags", arguments.OutputFileBaseName, pkg.Name) + klog.V(5).Infof("skipping the generation of %s file because %s package contains internal types, note that internal types don't have \"json\" tags", args.OutputFile, pkg.Name) continue } registerFileName := "register.go" - searchPath := path.Join(args.DefaultSourceTree(), inputDir, registerFileName) + searchPath := path.Join(pkg.Dir, registerFileName) if _, err := os.Stat(path.Join(searchPath)); err == nil { - klog.V(5).Infof("skipping the generation of %s file because %s already exists in the path %s", arguments.OutputFileBaseName, registerFileName, searchPath) + klog.V(5).Infof("skipping the generation of %s file because %s already exists in the path %s", args.OutputFile, registerFileName, searchPath) continue } else if err != nil && !os.IsNotExist(err) { klog.Fatalf("an error %v has occurred while checking if %s exists", err, registerFileName) @@ -82,7 +83,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // if there is a comment of the form "// +groupName=somegroup" or "// +groupName=somegroup.foo.bar.io", // extract the fully qualified API group name from it and overwrite the group inferred from the package path - if override := types.ExtractCommentTags("+", pkg.Comments)["groupName"]; override != nil { + if override := gengo.ExtractCommentTags("+", pkg.Comments)["groupName"]; override != nil { groupName := override[0] klog.V(5).Infof("overriding the group name with = %s", groupName) gv.Group = clientgentypes.Group(groupName) @@ -99,16 +100,17 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat } } - packages = append(packages, - &generator.DefaultPackage{ - PackageName: pkg.Name, - PackagePath: pkg.Path, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + targets = append(targets, + &generator.SimpleTarget{ + PkgName: pkg.Name, + PkgPath: pkg.Path, // output to same pkg as input + PkgDir: pkg.Dir, // output to same pkg as input + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { return []generator.Generator{ ®isterExternalGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: arguments.OutputFileBaseName, + GoGenerator: generator.GoGenerator{ + OutputFilename: args.OutputFile, }, gv: gv, typesToGenerate: typesToRegister, @@ -120,7 +122,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat }) } - return packages + return targets } // isInternal determines whether the given package diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/main.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/main.go index dc29144481b..ac28f87fb72 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/main.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/cmd/register-gen/main.go @@ -20,28 +20,35 @@ import ( "flag" "github.com/spf13/pflag" - "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/register-gen/args" + "k8s.io/code-generator/cmd/register-gen/args" "k8s.io/code-generator/cmd/register-gen/generators" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/klog/v2" ) func main() { klog.InitFlags(nil) - genericArgs := generatorargs.NewDefaults() - genericArgs.AddFlags(pflag.CommandLine) + args := args.New() + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } - if err := genericArgs.Execute( + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + + if err := gengo.Execute( generators.NameSystems(), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/set-gen/.gitignore b/pkg/k8s/vendor/k8s.io/code-generator/cmd/set-gen/.gitignore deleted file mode 100644 index ffe6458c963..00000000000 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/set-gen/.gitignore +++ /dev/null @@ -1 +0,0 @@ -set-gen diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/set-gen/main.go b/pkg/k8s/vendor/k8s.io/code-generator/cmd/set-gen/main.go deleted file mode 100644 index 0968ce762b9..00000000000 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/set-gen/main.go +++ /dev/null @@ -1,53 +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. -*/ - -// set-gen is an example usage of gengo. -// -// Structs in the input directories with the below line in their comments will -// have sets generated for them. -// // +genset -// -// Any builtin type referenced anywhere in the input directories will have a -// set generated for it. -package main - -import ( - "os" - - "k8s.io/gengo/args" - "k8s.io/gengo/examples/set-gen/generators" - - "k8s.io/klog/v2" -) - -func main() { - klog.InitFlags(nil) - arguments := args.Default() - - // Override defaults. - arguments.InputDirs = []string{"k8s.io/kubernetes/pkg/util/sets/types"} - arguments.OutputPackagePath = "k8s.io/apimachinery/pkg/util/sets" - - if err := arguments.Execute( - generators.NameSystems(), - generators.DefaultNameSystem(), - generators.Packages, - ); err != nil { - klog.Errorf("Error: %v", err) - os.Exit(1) - } - klog.V(2).Info("Completed successfully.") -} diff --git a/pkg/k8s/vendor/k8s.io/code-generator/generate-groups.sh b/pkg/k8s/vendor/k8s.io/code-generator/generate-groups.sh index a21d2184f0b..65b0abda5a6 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/generate-groups.sh +++ b/pkg/k8s/vendor/k8s.io/code-generator/generate-groups.sh @@ -14,53 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -o errexit -set -o nounset -set -o pipefail - -# generate-groups generates everything for a project with external types only, e.g. a project based -# on CustomResourceDefinitions. - -if [ "$#" -lt 4 ] || [ "${1}" == "--help" ]; then - cat < ... - - the generators comma separated to run (deepcopy,defaulter,applyconfiguration,client,lister,informer). - the output package name (e.g. github.com/example/project/pkg/generated). - the external types dir (e.g. github.com/example/api or github.com/example/project/pkg/apis). - the groups and their versions in the format "groupA:v1,v2 groupB:v1 groupC:v2", relative - to . - ... arbitrary flags passed to all generator binaries. - - -Example: - $(basename "$0") \ - deepcopy,client \ - github.com/example/project/pkg/client \ - github.com/example/project/pkg/apis \ - "foo:v1 bar:v1alpha1,v1beta1" -EOF - exit 0 -fi - -GENS="$1" -OUTPUT_PKG="$2" -APIS_PKG="$3" -GROUPS_WITH_VERSIONS="$4" -shift 4 - -echo "WARNING: $(basename "$0") is deprecated." -echo "WARNING: Please use k8s.io/code-generator/kube_codegen.sh instead." +echo "ERROR: $(basename "$0") has been removed." +echo "ERROR: Please use k8s.io/code-generator/kube_codegen.sh instead." echo - -if [ "${GENS}" = "all" ] || grep -qw "all" <<<"${GENS}"; then - ALL="applyconfiguration,client,deepcopy,informer,lister" - echo "WARNING: Specifying \"all\" as a generator is deprecated." - echo "WARNING: Please list the specific generators needed." - echo "WARNING: \"all\" is now an alias for \"${ALL}\"; new code generators WILL NOT be added to this set" - echo - GENS="${ALL}" -fi - -INT_APIS_PKG="" -exec "$(dirname "${BASH_SOURCE[0]}")/generate-internal-groups.sh" "${GENS}" "${OUTPUT_PKG}" "${INT_APIS_PKG}" "${APIS_PKG}" "${GROUPS_WITH_VERSIONS}" "$@" +exit 1 diff --git a/pkg/k8s/vendor/k8s.io/code-generator/generate-internal-groups.sh b/pkg/k8s/vendor/k8s.io/code-generator/generate-internal-groups.sh index 415b0b67c64..65b0abda5a6 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/generate-internal-groups.sh +++ b/pkg/k8s/vendor/k8s.io/code-generator/generate-internal-groups.sh @@ -14,281 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -o errexit -set -o nounset -set -o pipefail - -# generate-internal-groups generates everything for a project with internal types, e.g. an -# user-provided API server based on k8s.io/apiserver. - -if [ "$#" -lt 5 ] || [ "${1}" == "--help" ]; then - cat < ... - - the generators comma separated to run (applyconfiguration,client,conversion,deepcopy,defaulter,informer,lister,openapi). - the output package name (e.g. github.com/example/project/pkg/generated). - the internal types dir (e.g. github.com/example/project/pkg/apis) or "" if none. - the external types dir (e.g. github.com/example/project/pkg/apis or githubcom/example/apis). - the groups and their versions in the format "groupA:v1,v2 groupB:v1 groupC:v2", relative - to . - ... arbitrary flags passed to all generator binaries. - -Example: - $(basename "$0") \ - deepcopy,defaulter,conversion \ - github.com/example/project/pkg/client \ - github.com/example/project/pkg/apis \ - github.com/example/project/apis \ - "foo:v1 bar:v1alpha1,v1beta1" -EOF - exit 0 -fi - -GENS="$1" -OUTPUT_PKG="$2" -INT_APIS_PKG="$3" -EXT_APIS_PKG="$4" -GROUPS_WITH_VERSIONS="$5" -shift 5 - -echo "WARNING: $(basename "$0") is deprecated." -echo "WARNING: Please use k8s.io/code-generator/kube_codegen.sh instead." +echo "ERROR: $(basename "$0") has been removed." +echo "ERROR: Please use k8s.io/code-generator/kube_codegen.sh instead." echo - -# If verification only is requested, avoid deleting files -verify_only="" -for ((i = 1; i <= $#; i++)); do - if [ "${!i}" = --verify-only ]; then verify_only=1; fi -done - -if [ "${GENS}" = "all" ] || grep -qw "all" <<<"${GENS}"; then - ALL="client,conversion,deepcopy,defaulter,informer,lister,openapi" - echo "WARNING: Specifying \"all\" as a generator is deprecated." - echo "WARNING: Please list the specific generators needed." - echo "WARNING: \"all\" is now an alias for \"${ALL}\"; new code generators WILL NOT be added to this set" - echo - GENS="${ALL}" -fi - -( - # To support running this script from anywhere, first cd into this directory, - # and then install with forced module mode on and fully qualified name. - cd "$(dirname "${0}")" - BINS=( - applyconfiguration-gen - client-gen - conversion-gen - deepcopy-gen - defaulter-gen - informer-gen - lister-gen - openapi-gen - ) - # Compile all the tools at once - it's slightly faster but also just simpler. - # shellcheck disable=2046 # printf word-splitting is intentional - GO111MODULE=on go install $(printf "k8s.io/code-generator/cmd/%s " "${BINS[@]}") -) - -# Go installs the above commands to get installed in $GOBIN if defined, and $GOPATH/bin otherwise: -GOBIN="$(go env GOBIN)" -gobin="${GOBIN:-$(go env GOPATH)/bin}" - -function git_find() { - # Similar to find but faster and easier to understand. We want to include - # modified and untracked files because this might be running against code - # which is not tracked by git yet. - git ls-files -cmo --exclude-standard "$@" -} - -function git_grep() { - # We want to include modified and untracked files because this might be - # running against code which is not tracked by git yet. - git grep --untracked "$@" -} -function codegen::join() { local IFS="$1"; shift; echo "$*"; } - -# enumerate group versions -ALL_FQ_APIS=() # e.g. k8s.io/kubernetes/pkg/apis/apps k8s.io/api/apps/v1 -EXT_FQ_APIS=() # e.g. k8s.io/api/apps/v1 -GROUP_VERSIONS=() # e.g. apps/v1 -for GVs in ${GROUPS_WITH_VERSIONS}; do - IFS=: read -r G Vs <<<"${GVs}" - - if [ -n "${INT_APIS_PKG}" ]; then - ALL_FQ_APIS+=("${INT_APIS_PKG}/${G}") - fi - - # enumerate versions - for V in ${Vs//,/ }; do - ALL_FQ_APIS+=("${EXT_APIS_PKG}/${G}/${V}") - EXT_FQ_APIS+=("${EXT_APIS_PKG}/${G}/${V}") - GROUP_VERSIONS+=("${G}/${V}") - done -done - -CLIENTSET_PKG="${CLIENTSET_PKG_NAME:-clientset}" -CLIENTSET_NAME="${CLIENTSET_NAME_VERSIONED:-versioned}" - -if grep -qw "deepcopy" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - for dir in $(GO111MODULE=on go list -f '{{.Dir}}' "${ALL_FQ_APIS[@]}"); do - pushd "${dir}" >/dev/null - git_find -z ':(glob)**'/zz_generated.deepcopy.go | xargs -0 rm -f - popd >/dev/null - done - fi - - echo "Generating deepcopy funcs" - "${gobin}/deepcopy-gen" \ - --input-dirs "$(codegen::join , "${ALL_FQ_APIS[@]}")" \ - -O zz_generated.deepcopy \ - "$@" -fi - -if grep -qw "defaulter" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - for dir in $(GO111MODULE=on go list -f '{{.Dir}}' "${ALL_FQ_APIS[@]}"); do - pushd "${dir}" >/dev/null - git_find -z ':(glob)**'/zz_generated.defaults.go | xargs -0 rm -f - popd >/dev/null - done - fi - - echo "Generating defaulters" - "${gobin}/defaulter-gen" \ - --input-dirs "$(codegen::join , "${EXT_FQ_APIS[@]}")" \ - -O zz_generated.defaults \ - "$@" -fi - -if grep -qw "conversion" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - for dir in $(GO111MODULE=on go list -f '{{.Dir}}' "${ALL_FQ_APIS[@]}"); do - pushd "${dir}" >/dev/null - git_find -z ':(glob)**'/zz_generated.conversion.go | xargs -0 rm -f - popd >/dev/null - done - fi - - echo "Generating conversions" - "${gobin}/conversion-gen" \ - --input-dirs "$(codegen::join , "${ALL_FQ_APIS[@]}")" \ - -O zz_generated.conversion \ - "$@" -fi - -if grep -qw "applyconfiguration" <<<"${GENS}"; then - APPLY_CONFIGURATION_PACKAGE="${OUTPUT_PKG}/${APPLYCONFIGURATION_PKG_NAME:-applyconfiguration}" - - if [ ! "$verify_only" ]; then - # Nuke existing files - root="$(GO111MODULE=on go list -f '{{.Dir}}' "${APPLY_CONFIGURATION_PACKAGE}" 2>/dev/null || true)" - if [ -n "${root}" ]; then - pushd "${root}" >/dev/null - git_grep -l --null \ - -e '^// Code generated by applyconfiguration-gen. DO NOT EDIT.$' \ - ':(glob)**/*.go' \ - | xargs -0 rm -f - popd >/dev/null - fi - fi - - echo "Generating apply configuration for ${GROUPS_WITH_VERSIONS} at ${APPLY_CONFIGURATION_PACKAGE}" - "${gobin}/applyconfiguration-gen" \ - --input-dirs "$(codegen::join , "${EXT_FQ_APIS[@]}")" \ - --output-package "${APPLY_CONFIGURATION_PACKAGE}" \ - "$@" -fi - -if grep -qw "client" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - root="$(GO111MODULE=on go list -f '{{.Dir}}' "${OUTPUT_PKG}/${CLIENTSET_PKG}/${CLIENTSET_NAME}" 2>/dev/null || true)" - if [ -n "${root}" ]; then - pushd "${root}" >/dev/null - git_grep -l --null \ - -e '^// Code generated by client-gen. DO NOT EDIT.$' \ - ':(glob)**/*.go' \ - | xargs -0 rm -f - popd >/dev/null - fi - fi - - echo "Generating clientset for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/${CLIENTSET_PKG}" - "${gobin}/client-gen" \ - --clientset-name "${CLIENTSET_NAME}" \ - --input-base "" \ - --input "$(codegen::join , "${EXT_FQ_APIS[@]}")" \ - --output-package "${OUTPUT_PKG}/${CLIENTSET_PKG}" \ - --apply-configuration-package "${APPLY_CONFIGURATION_PACKAGE:-}" \ - "$@" -fi - -if grep -qw "lister" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - for gv in "${GROUP_VERSIONS[@]}"; do - root="$(GO111MODULE=on go list -f '{{.Dir}}' "${OUTPUT_PKG}/listers/${gv}" 2>/dev/null || true)" - if [ -n "${root}" ]; then - pushd "${root}" >/dev/null - git_grep -l --null \ - -e '^// Code generated by lister-gen. DO NOT EDIT.$' \ - ':(glob)**/*.go' \ - | xargs -0 rm -f - popd >/dev/null - fi - done - fi - - echo "Generating listers for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/listers" - "${gobin}/lister-gen" \ - --input-dirs "$(codegen::join , "${EXT_FQ_APIS[@]}")" \ - --output-package "${OUTPUT_PKG}/listers" \ - "$@" -fi - -if grep -qw "informer" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - root="$(GO111MODULE=on go list -f '{{.Dir}}' "${OUTPUT_PKG}/informers/externalversions" 2>/dev/null || true)" - if [ -n "${root}" ]; then - pushd "${root}" >/dev/null - git_grep -l --null \ - -e '^// Code generated by informer-gen. DO NOT EDIT.$' \ - ':(glob)**/*.go' \ - | xargs -0 rm -f - popd >/dev/null - fi - fi - - echo "Generating informers for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/informers" - "${gobin}/informer-gen" \ - --input-dirs "$(codegen::join , "${EXT_FQ_APIS[@]}")" \ - --versioned-clientset-package "${OUTPUT_PKG}/${CLIENTSET_PKG}/${CLIENTSET_NAME}" \ - --listers-package "${OUTPUT_PKG}/listers" \ - --output-package "${OUTPUT_PKG}/informers" \ - "$@" -fi - -if grep -qw "openapi" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - for dir in $(GO111MODULE=on go list -f '{{.Dir}}' "${FQ_APIS[@]}"); do - pushd "${dir}" >/dev/null - git_find -z ':(glob)**'/zz_generated.openapi.go | xargs -0 rm -f - popd >/dev/null - done - fi - - echo "Generating OpenAPI definitions for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/openapi" - declare -a OPENAPI_EXTRA_PACKAGES - "${gobin}/openapi-gen" \ - --input-dirs "$(codegen::join , "${EXT_FQ_APIS[@]}" "${OPENAPI_EXTRA_PACKAGES[@]+"${OPENAPI_EXTRA_PACKAGES[@]}"}")" \ - --input-dirs "k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/version" \ - --output-package "${OUTPUT_PKG}/openapi" \ - -O zz_generated.openapi \ - "$@" -fi +exit 1 diff --git a/pkg/k8s/vendor/k8s.io/code-generator/kube_codegen.sh b/pkg/k8s/vendor/k8s.io/code-generator/kube_codegen.sh index 6ded2048368..6ca83a6c5d3 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/kube_codegen.sh +++ b/pkg/k8s/vendor/k8s.io/code-generator/kube_codegen.sh @@ -17,35 +17,43 @@ # This presents several functions for packages which want to use kubernetes # code-generation tools. +# These functions insist that your input IDL (commented go) files be located in +# go packages following the pattern $input_pkg_root/$something_sans_slash/$api_version . +# Those $something_sans_slash will be propagated into the output directory structure. + set -o errexit set -o nounset set -o pipefail KUBE_CODEGEN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" -function kube::codegen::internal::git_find() { - # Similar to find but faster and easier to understand. We want to include - # modified and untracked files because this might be running against code - # which is not tracked by git yet. - git ls-files -cmo --exclude-standard "$@" +function kube::codegen::internal::findz() { + # We use `find` rather than `git ls-files` because sometimes external + # projects use this across repos. This is an imperfect wrapper of find, + # but good enough for this script. + find "$@" -print0 } -function kube::codegen::internal::git_grep() { - # We want to include modified and untracked files because this might be - # running against code which is not tracked by git yet. - git grep --untracked "$@" +function kube::codegen::internal::grep() { + # We use `grep` rather than `git grep` because sometimes external projects + # use this across repos. + grep "$@" \ + --exclude-dir .git \ + --exclude-dir _output \ + --exclude-dir vendor } # Generate tagged helper code: conversions, deepcopy, and defaults # -# Args: -# --input-pkg-root -# The root package under which to search for files which request code to be -# generated. This must be Go package syntax, e.g. "k8s.io/foo/bar". +# USAGE: kube::codegen::gen_helpers [FLAGS] +# +# +# The root directory under which to search for Go files which request code to +# be generated. This must be a local path, not a Go package. +# +# See note at the top about package structure below that. # -# --output-base -# The root directory under which to emit code. The concatenation of -# + must be valid. +# FLAGS: # # --boilerplate # An optional override for the header file to insert into generated files. @@ -55,22 +63,13 @@ function kube::codegen::internal::git_grep() { # directories to consider during conversion generation. # function kube::codegen::gen_helpers() { - local in_pkg_root="" - local out_base="" # gengo needs the output dir must be $out_base/$out_pkg_root + local in_dir="" local boilerplate="${KUBE_CODEGEN_ROOT}/hack/boilerplate.go.txt" local v="${KUBE_VERBOSE:-0}" local extra_peers=() while [ "$#" -gt 0 ]; do case "$1" in - "--input-pkg-root") - in_pkg_root="$2" - shift 2 - ;; - "--output-base") - out_base="$2" - shift 2 - ;; "--boilerplate") boilerplate="$2" shift 2 @@ -80,18 +79,22 @@ function kube::codegen::gen_helpers() { shift 2 ;; *) - echo "unknown argument: $1" >&2 - return 1 + if [[ "$1" =~ ^-- ]]; then + echo "unknown argument: $1" >&2 + return 1 + fi + if [ -n "$in_dir" ]; then + echo "too many arguments: $1 (already have $in_dir)" >&2 + return 1 + fi + in_dir="$1" + shift ;; esac done - if [ -z "${in_pkg_root}" ]; then - echo "--input-pkg-root is required" >&2 - return 1 - fi - if [ -z "${out_base}" ]; then - echo "--output-base is required" >&2 + if [ -z "${in_dir}" ]; then + echo "input-dir argument is required" >&2 return 1 fi @@ -110,136 +113,125 @@ function kube::codegen::gen_helpers() { # Go installs in $GOBIN if defined, and $GOPATH/bin otherwise gobin="${GOBIN:-$(go env GOPATH)/bin}" - # These tools all assume out-dir == in-dir. - root="${out_base}/${in_pkg_root}" - mkdir -p "${root}" - root="$(cd "${root}" && pwd -P)" - # Deepcopy # local input_pkgs=() - while read -r file; do - dir="$(dirname "${file}")" + while read -r dir; do pkg="$(cd "${dir}" && GO111MODULE=on go list -find .)" input_pkgs+=("${pkg}") done < <( - ( kube::codegen::internal::git_grep -l \ + ( kube::codegen::internal::grep -l --null \ -e '+k8s:deepcopy-gen=' \ - ":(glob)${root}"/'**/*.go' \ + -r "${in_dir}" \ + --include '*.go' \ || true \ - ) | LC_ALL=C sort -u + ) | while read -r -d $'\0' F; do dirname "${F}"; done \ + | LC_ALL=C sort -u ) if [ "${#input_pkgs[@]}" != 0 ]; then echo "Generating deepcopy code for ${#input_pkgs[@]} targets" - kube::codegen::internal::git_find -z \ - ":(glob)${root}"/'**/zz_generated.deepcopy.go' \ + kube::codegen::internal::findz \ + "${in_dir}" \ + -type f \ + -name zz_generated.deepcopy.go \ | xargs -0 rm -f - local input_args=() - for arg in "${input_pkgs[@]}"; do - input_args+=("--input-dirs" "$arg") - done "${gobin}/deepcopy-gen" \ -v "${v}" \ - -O zz_generated.deepcopy \ + --output-file zz_generated.deepcopy.go \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - "${input_args[@]}" + "${input_pkgs[@]}" fi # Defaults # local input_pkgs=() - while read -r file; do - dir="$(dirname "${file}")" + while read -r dir; do pkg="$(cd "${dir}" && GO111MODULE=on go list -find .)" input_pkgs+=("${pkg}") done < <( - ( kube::codegen::internal::git_grep -l \ + ( kube::codegen::internal::grep -l --null \ -e '+k8s:defaulter-gen=' \ - ":(glob)${root}"/'**/*.go' \ + -r "${in_dir}" \ + --include '*.go' \ || true \ - ) | LC_ALL=C sort -u + ) | while read -r -d $'\0' F; do dirname "${F}"; done \ + | LC_ALL=C sort -u ) if [ "${#input_pkgs[@]}" != 0 ]; then echo "Generating defaulter code for ${#input_pkgs[@]} targets" - kube::codegen::internal::git_find -z \ - ":(glob)${root}"/'**/zz_generated.defaults.go' \ + kube::codegen::internal::findz \ + "${in_dir}" \ + -type f \ + -name zz_generated.defaults.go \ | xargs -0 rm -f - local input_args=() - for arg in "${input_pkgs[@]}"; do - input_args+=("--input-dirs" "$arg") - done "${gobin}/defaulter-gen" \ -v "${v}" \ - -O zz_generated.defaults \ + --output-file zz_generated.defaults.go \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - "${input_args[@]}" + "${input_pkgs[@]}" fi # Conversions # local input_pkgs=() - while read -r file; do - dir="$(dirname "${file}")" + while read -r dir; do pkg="$(cd "${dir}" && GO111MODULE=on go list -find .)" input_pkgs+=("${pkg}") done < <( - ( kube::codegen::internal::git_grep -l \ + ( kube::codegen::internal::grep -l --null \ -e '+k8s:conversion-gen=' \ - ":(glob)${root}"/'**/*.go' \ + -r "${in_dir}" \ + --include '*.go' \ || true \ - ) | LC_ALL=C sort -u + ) | while read -r -d $'\0' F; do dirname "${F}"; done \ + | LC_ALL=C sort -u ) if [ "${#input_pkgs[@]}" != 0 ]; then echo "Generating conversion code for ${#input_pkgs[@]} targets" - kube::codegen::internal::git_find -z \ - ":(glob)${root}"/'**/zz_generated.conversion.go' \ + kube::codegen::internal::findz \ + "${in_dir}" \ + -type f \ + -name zz_generated.conversion.go \ | xargs -0 rm -f - local input_args=() - for arg in "${input_pkgs[@]}"; do - input_args+=("--input-dirs" "$arg") - done local extra_peer_args=() for arg in "${extra_peers[@]:+"${extra_peers[@]}"}"; do extra_peer_args+=("--extra-peer-dirs" "$arg") done "${gobin}/conversion-gen" \ -v "${v}" \ - -O zz_generated.conversion \ + --output-file zz_generated.conversion.go \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ "${extra_peer_args[@]:+"${extra_peer_args[@]}"}" \ - "${input_args[@]}" + "${input_pkgs[@]}" fi } # Generate openapi code # -# Args: -# --input-pkg-root -# The root package under which to search for files which request openapi to -# be generated. This must be Go package syntax, e.g. "k8s.io/foo/bar". +# USAGE: kube::codegen::gen_openapi [FLAGS] +# +# +# The root directory under which to search for Go files which request openapi +# to be generated. This must be a local path, not a Go package. +# +# See note at the top about package structure below that. # -# --output-pkg-root -# The root package under which generated directories and files -# will be placed. This must be go package syntax, e.g. "k8s.io/foo/bar". +# FLAGS: # -# --output-base -# The root directory under which to emit code. The concatenation of -# + must be valid. +# --output-dir +# The directory into which to emit code. # -# --openapi-name -# An optional override for the leaf name of the generated directory. +# --output-pkg +# The Go package path (import path) of the --output-dir. # # --extra-pkgs # An optional list of additional packages to be imported during openapi @@ -258,10 +250,9 @@ function kube::codegen::gen_helpers() { # An optional override for the header file to insert into generated files. # function kube::codegen::gen_openapi() { - local in_pkg_root="" - local out_pkg_root="" - local out_base="" # gengo needs the output dir must be $out_base/$out_pkg_root - local openapi_subdir="openapi" + local in_dir="" + local out_dir="" + local out_pkg="" local extra_pkgs=() local report="/dev/null" local update_report="" @@ -270,20 +261,12 @@ function kube::codegen::gen_openapi() { while [ "$#" -gt 0 ]; do case "$1" in - "--input-pkg-root") - in_pkg_root="$2" + "--output-dir") + out_dir="$2" shift 2 ;; - "--output-pkg-root") - out_pkg_root="$2" - shift 2 - ;; - "--output-base") - out_base="$2" - shift 2 - ;; - "--openapi-name") - openapi_subdir="$2" + "--output-pkg") + out_pkg="$2" shift 2 ;; "--extra-pkgs") @@ -303,22 +286,30 @@ function kube::codegen::gen_openapi() { shift 2 ;; *) - echo "unknown argument: $1" >&2 - return 1 + if [[ "$1" =~ ^-- ]]; then + echo "unknown argument: $1" >&2 + return 1 + fi + if [ -n "$in_dir" ]; then + echo "too many arguments: $1 (already have $in_dir)" >&2 + return 1 + fi + in_dir="$1" + shift ;; esac done - if [ -z "${in_pkg_root}" ]; then - echo "--input-pkg-root is required" >&2 + if [ -z "${in_dir}" ]; then + echo "input-dir argument is required" >&2 return 1 fi - if [ -z "${out_pkg_root}" ]; then - echo "--output-pkg-root is required" >&2 + if [ -z "${out_dir}" ]; then + echo "--output-dir is required" >&2 return 1 fi - if [ -z "${out_base}" ]; then - echo "--output-base is required" >&2 + if [ -z "${out_pkg}" ]; then + echo "--output-pkg is required" >&2 return 1 fi @@ -336,51 +327,45 @@ function kube::codegen::gen_openapi() { openapi-gen ) # shellcheck disable=2046 # printf word-splitting is intentional - GO111MODULE=on go install $(printf "k8s.io/code-generator/cmd/%s " "${BINS[@]}") + GO111MODULE=on go install $(printf "k8s.io/kube-openapi/cmd/%s " "${BINS[@]}") ) # Go installs in $GOBIN if defined, and $GOPATH/bin otherwise gobin="${GOBIN:-$(go env GOPATH)/bin}" - # These tools all assume out-dir == in-dir. - root="${out_base}/${in_pkg_root}" - mkdir -p "${root}" - root="$(cd "${root}" && pwd -P)" - local input_pkgs=( "${extra_pkgs[@]:+"${extra_pkgs[@]}"}") - while read -r file; do - dir="$(dirname "${file}")" + while read -r dir; do pkg="$(cd "${dir}" && GO111MODULE=on go list -find .)" input_pkgs+=("${pkg}") done < <( - ( kube::codegen::internal::git_grep -l \ + ( kube::codegen::internal::grep -l --null \ -e '+k8s:openapi-gen=' \ - ":(glob)${root}"/'**/*.go' \ + -r "${in_dir}" \ + --include '*.go' \ || true \ - ) | LC_ALL=C sort -u + ) | while read -r -d $'\0' F; do dirname "${F}"; done \ + | LC_ALL=C sort -u ) if [ "${#input_pkgs[@]}" != 0 ]; then echo "Generating openapi code for ${#input_pkgs[@]} targets" - kube::codegen::internal::git_find -z \ - ":(glob)${root}"/'**/zz_generated.openapi.go' \ + kube::codegen::internal::findz \ + "${in_dir}" \ + -type f \ + -name zz_generated.openapi.go \ | xargs -0 rm -f - local inputs=() - for arg in "${input_pkgs[@]}"; do - inputs+=("--input-dirs" "$arg") - done "${gobin}/openapi-gen" \ -v "${v}" \ - -O zz_generated.openapi \ + --output-file zz_generated.openapi.go \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - --output-package "${out_pkg_root}/${openapi_subdir}" \ + --output-dir "${out_dir}" \ + --output-pkg "${out_pkg}" \ --report-filename "${new_report}" \ - --input-dirs "k8s.io/apimachinery/pkg/apis/meta/v1" \ - --input-dirs "k8s.io/apimachinery/pkg/runtime" \ - --input-dirs "k8s.io/apimachinery/pkg/version" \ - "${inputs[@]}" + "k8s.io/apimachinery/pkg/apis/meta/v1" \ + "k8s.io/apimachinery/pkg/runtime" \ + "k8s.io/apimachinery/pkg/version" \ + "${input_pkgs[@]}" fi touch "${report}" # in case it doesn't exist yet @@ -394,19 +379,27 @@ function kube::codegen::gen_openapi() { # Generate client code # -# Args: -# --input-pkg-root -# The root package under which to search for types.go files which request -# clients to be generated. This must be Go package syntax, e.g. -# "k8s.io/foo/bar". +# USAGE: kube::codegen::gen_client [FLAGS] +# +# +# The root package under which to search for Go files which request clients +# to be generated. This must be a local path, not a Go package. +# +# See note at the top about package structure below that. +# +# FLAGS: +# --one-input-api +# A specific API (a directory) under the input-dir for which to generate a +# client. If this is not set, clients for all APIs under the input-dir +# will be generated (under the --output-pkg). # -# --output-pkg-root -# The root package into which generated directories and files will be -# placed. This must be Go package syntax, e.g. "k8s.io/foo/bar". +# --output-dir +# The root directory under which to emit code. Each aspect of client +# generation will make one or more subdirectories. # -# --output-base -# The root directory under which to emit code. The concatenation of -# + must be valid. +# --output-pkg +# The Go package path (import path) of the --output-dir. Each aspect of +# client generation will make one or more sub-packages. # # --boilerplate # An optional override for the header file to insert into generated files. @@ -424,6 +417,10 @@ function kube::codegen::gen_openapi() { # --applyconfig-name # An optional override for the leaf name of the generated "applyconfiguration" directory. # +# --applyconfig-externals +# An optional list of comma separated external apply configurations locations +# in .: form. +# # --with-watch # Enables generation of listers and informers for APIs which support WATCH. # @@ -433,32 +430,39 @@ function kube::codegen::gen_openapi() { # --informers-name # An optional override for the leaf name of the generated "informers" directory. # +# --plural-exceptions +# An optional list of comma separated plural exception definitions in Type:PluralizedType form. +# function kube::codegen::gen_client() { - local in_pkg_root="" - local out_pkg_root="" - local out_base="" # gengo needs the output dir must be $out_base/$out_pkg_root + local in_dir="" + local one_input_api="" + local out_dir="" + local out_pkg="" local clientset_subdir="clientset" local clientset_versioned_name="versioned" local applyconfig="false" local applyconfig_subdir="applyconfiguration" + local applyconfig_external="" + local applyconfig_openapi_schema="" local watchable="false" local listers_subdir="listers" local informers_subdir="informers" local boilerplate="${KUBE_CODEGEN_ROOT}/hack/boilerplate.go.txt" + local plural_exceptions="" local v="${KUBE_VERBOSE:-0}" while [ "$#" -gt 0 ]; do case "$1" in - "--input-pkg-root") - in_pkg_root="$2" + "--one-input-api") + one_input_api="/$2" shift 2 ;; - "--output-pkg-root") - out_pkg_root="$2" + "--output-dir") + out_dir="$2" shift 2 ;; - "--output-base") - out_base="$2" + "--output-pkg") + out_pkg="$2" shift 2 ;; "--boilerplate") @@ -481,6 +485,14 @@ function kube::codegen::gen_client() { applyconfig_subdir="$2" shift 2 ;; + "--applyconfig-externals") + applyconfig_external="$2" + shift 2 + ;; + "--applyconfig-openapi-schema") + applyconfig_openapi_schema="$2" + shift 2 + ;; "--with-watch") watchable="true" shift @@ -493,26 +505,39 @@ function kube::codegen::gen_client() { informers_subdir="$2" shift 2 ;; + "--plural-exceptions") + plural_exceptions="$2" + shift 2 + ;; *) - echo "unknown argument: $1" >&2 - return 1 + if [[ "$1" =~ ^-- ]]; then + echo "unknown argument: $1" >&2 + return 1 + fi + if [ -n "$in_dir" ]; then + echo "too many arguments: $1 (already have $in_dir)" >&2 + return 1 + fi + in_dir="$1" + shift ;; esac done - if [ -z "${in_pkg_root}" ]; then - echo "--input-pkg-root is required" >&2 + if [ -z "${in_dir}" ]; then + echo "input-dir argument is required" >&2 return 1 fi - if [ -z "${out_pkg_root}" ]; then - echo "--output-pkg-root is required" >&2 + if [ -z "${out_dir}" ]; then + echo "--output-dir is required" >&2 return 1 fi - if [ -z "${out_base}" ]; then - echo "--output-base is required" >&2 - return 1 + if [ -z "${out_pkg}" ]; then + echo "--output-pkg is required" >&2 fi + mkdir -p "${out_dir}" + ( # To support running this from anywhere, first cd into this directory, # and then install with forced module mode on and fully qualified name. @@ -529,17 +554,9 @@ function kube::codegen::gen_client() { # Go installs in $GOBIN if defined, and $GOPATH/bin otherwise gobin="${GOBIN:-$(go env GOPATH)/bin}" - in_root="${out_base}/${in_pkg_root}" - mkdir -p "${in_root}" - in_root="$(cd "${in_root}" && pwd -P)" - out_root="${out_base}/${out_pkg_root}" - mkdir -p "${out_root}" - out_root="$(cd "${out_root}" && pwd -P)" - local group_versions=() local input_pkgs=() - while read -r file; do - dir="$(dirname "${file}")" + while read -r dir; do pkg="$(cd "${dir}" && GO111MODULE=on go list -find .)" leaf="$(basename "${dir}")" if grep -E -q '^v[0-9]+((alpha|beta)[0-9]+)?$' <<< "${leaf}"; then @@ -550,11 +567,13 @@ function kube::codegen::gen_client() { group_versions+=("${leaf2}/${leaf}") fi done < <( - ( kube::codegen::internal::git_grep -l \ + ( kube::codegen::internal::grep -l --null \ -e '+genclient' \ - ":(glob)${in_root}"/'**/types.go' \ + -r "${in_dir}${one_input_api}" \ + --include '*.go' \ || true \ - ) | LC_ALL=C sort -u + ) | while read -r -d $'\0' F; do dirname "${F}"; done \ + | LC_ALL=C sort -u ) if [ "${#group_versions[@]}" == 0 ]; then @@ -563,33 +582,33 @@ function kube::codegen::gen_client() { applyconfig_pkg="" # set this for later use, iff enabled if [ "${applyconfig}" == "true" ]; then - applyconfig_pkg="${out_pkg_root}/${applyconfig_subdir}" + applyconfig_pkg="${out_pkg}/${applyconfig_subdir}" echo "Generating applyconfig code for ${#input_pkgs[@]} targets" - ( kube::codegen::internal::git_grep -l --null \ + ( kube::codegen::internal::grep -l --null \ -e '^// Code generated by applyconfiguration-gen. DO NOT EDIT.$' \ - ":(glob)${out_root}/${applyconfig_subdir}"/'**/*.go' \ + -r "${out_dir}/${applyconfig_subdir}" \ + --include '*.go' \ || true \ ) | xargs -0 rm -f - local inputs=() - for arg in "${input_pkgs[@]}"; do - inputs+=("--input-dirs" "$arg") - done "${gobin}/applyconfiguration-gen" \ -v "${v}" \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - --output-package "${out_pkg_root}/${applyconfig_subdir}" \ - "${inputs[@]}" + --output-dir "${out_dir}/${applyconfig_subdir}" \ + --output-pkg "${applyconfig_pkg}" \ + --external-applyconfigurations "${applyconfig_external}" \ + --openapi-schema "${applyconfig_openapi_schema}" \ + "${input_pkgs[@]}" fi echo "Generating client code for ${#group_versions[@]} targets" - ( kube::codegen::internal::git_grep -l --null \ + ( kube::codegen::internal::grep -l --null \ -e '^// Code generated by client-gen. DO NOT EDIT.$' \ - ":(glob)${out_root}/${clientset_subdir}"/'**/*.go' \ + -r "${out_dir}/${clientset_subdir}" \ + --include '*.go' \ || true \ ) | xargs -0 rm -f @@ -597,55 +616,52 @@ function kube::codegen::gen_client() { for arg in "${group_versions[@]}"; do inputs+=("--input" "$arg") done - "${gobin}/client-gen" \ + "${gobin}/client-gen" \ -v "${v}" \ --go-header-file "${boilerplate}" \ + --output-dir "${out_dir}/${clientset_subdir}" \ + --output-pkg "${out_pkg}/${clientset_subdir}" \ --clientset-name "${clientset_versioned_name}" \ - --input-base "${in_pkg_root}" \ - --output-base "${out_base}" \ - --output-package "${out_pkg_root}/${clientset_subdir}" \ --apply-configuration-package "${applyconfig_pkg}" \ + --input-base "$(cd "${in_dir}" && pwd -P)" `# must be absolute path or Go import path"` \ + --plural-exceptions "${plural_exceptions}" \ "${inputs[@]}" if [ "${watchable}" == "true" ]; then echo "Generating lister code for ${#input_pkgs[@]} targets" - ( kube::codegen::internal::git_grep -l --null \ + ( kube::codegen::internal::grep -l --null \ -e '^// Code generated by lister-gen. DO NOT EDIT.$' \ - ":(glob)${out_root}/${listers_subdir}"/'**/*.go' \ + -r "${out_dir}/${listers_subdir}" \ + --include '*.go' \ || true \ ) | xargs -0 rm -f - local inputs=() - for arg in "${input_pkgs[@]}"; do - inputs+=("--input-dirs" "$arg") - done "${gobin}/lister-gen" \ -v "${v}" \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - --output-package "${out_pkg_root}/${listers_subdir}" \ - "${inputs[@]}" + --output-dir "${out_dir}/${listers_subdir}" \ + --output-pkg "${out_pkg}/${listers_subdir}" \ + --plural-exceptions "${plural_exceptions}" \ + "${input_pkgs[@]}" echo "Generating informer code for ${#input_pkgs[@]} targets" - ( kube::codegen::internal::git_grep -l --null \ + ( kube::codegen::internal::grep -l --null \ -e '^// Code generated by informer-gen. DO NOT EDIT.$' \ - ":(glob)${out_root}/${informers_subdir}"/'**/*.go' \ + -r "${out_dir}/${informers_subdir}" \ + --include '*.go' \ || true \ ) | xargs -0 rm -f - local inputs=() - for arg in "${input_pkgs[@]}"; do - inputs+=("--input-dirs" "$arg") - done "${gobin}/informer-gen" \ -v "${v}" \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - --output-package "${out_pkg_root}/${informers_subdir}" \ - --versioned-clientset-package "${out_pkg_root}/${clientset_subdir}/${clientset_versioned_name}" \ - --listers-package "${out_pkg_root}/${listers_subdir}" \ - "${inputs[@]}" + --output-dir "${out_dir}/${informers_subdir}" \ + --output-pkg "${out_pkg}/${informers_subdir}" \ + --versioned-clientset-package "${out_pkg}/${clientset_subdir}/${clientset_versioned_name}" \ + --listers-package "${out_pkg}/${listers_subdir}" \ + --plural-exceptions "${plural_exceptions}" \ + "${input_pkgs[@]}" fi } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/pkg/namer/tag-override.go b/pkg/k8s/vendor/k8s.io/code-generator/pkg/namer/tag-override.go index fd8c3a8553c..59ee489f0f7 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/pkg/namer/tag-override.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/pkg/namer/tag-override.go @@ -17,8 +17,9 @@ limitations under the License. package namer import ( - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // TagOverrideNamer is a namer which pulls names from a given tag, if specified, @@ -49,7 +50,7 @@ func NewTagOverrideNamer(tagName string, fallback namer.Namer) namer.Namer { // extractTag gets the comment-tags for the key. If the tag did not exist, it // returns the empty string. func extractTag(key string, lines []string) string { - val, present := types.ExtractCommentTags("+", lines)[key] + val, present := gengo.ExtractCommentTags("+", lines)[key] if !present || len(val) < 1 { return "" } diff --git a/pkg/k8s/vendor/k8s.io/code-generator/pkg/util/build.go b/pkg/k8s/vendor/k8s.io/code-generator/pkg/util/build.go deleted file mode 100644 index 53f93afe349..00000000000 --- a/pkg/k8s/vendor/k8s.io/code-generator/pkg/util/build.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 util - -import ( - gobuild "go/build" - "path/filepath" - "strings" -) - -// CurrentPackage returns the go package of the current directory, or "" if it cannot -// be derived from the GOPATH. -func CurrentPackage() string { - for _, root := range gobuild.Default.SrcDirs() { - if pkg, ok := hasSubdir(root, "."); ok { - return pkg - } - } - return "" -} - -func hasSubdir(root, dir string) (rel string, ok bool) { - // ensure a tailing separator to properly compare on word-boundaries - const sep = string(filepath.Separator) - root = filepath.Clean(root) - if !strings.HasSuffix(root, sep) { - root += sep - } - - // check whether root dir starts with root - dir = filepath.Clean(dir) - if !strings.HasPrefix(dir, root) { - return "", false - } - - // cut off root - return filepath.ToSlash(dir[len(root):]), true -} - -// Vendorless trims vendor prefix from a package path to make it canonical -func Vendorless(p string) string { - if pos := strings.LastIndex(p, "/vendor/"); pos != -1 { - return p[pos+len("/vendor/"):] - } - return p -} diff --git a/pkg/k8s/vendor/k8s.io/code-generator/tools.go b/pkg/k8s/vendor/k8s.io/code-generator/tools.go index 90b942b0703..d0e2c7764f2 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/tools.go +++ b/pkg/k8s/vendor/k8s.io/code-generator/tools.go @@ -28,10 +28,7 @@ import ( _ "k8s.io/code-generator/cmd/deepcopy-gen" _ "k8s.io/code-generator/cmd/defaulter-gen" _ "k8s.io/code-generator/cmd/go-to-protobuf" - _ "k8s.io/code-generator/cmd/import-boss" _ "k8s.io/code-generator/cmd/informer-gen" _ "k8s.io/code-generator/cmd/lister-gen" - _ "k8s.io/code-generator/cmd/openapi-gen" _ "k8s.io/code-generator/cmd/register-gen" - _ "k8s.io/code-generator/cmd/set-gen" ) diff --git a/pkg/k8s/vendor/k8s.io/gengo/args/args.go b/pkg/k8s/vendor/k8s.io/gengo/args/args.go deleted file mode 100644 index b81ceb93afb..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/args/args.go +++ /dev/null @@ -1,199 +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 args has common command-line flags for generation programs. -package args - -import ( - "bytes" - goflag "flag" - "fmt" - "io/ioutil" - "os" - "path" - "path/filepath" - "strconv" - "strings" - "time" - - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/parser" - - "github.com/spf13/pflag" -) - -// Default returns a defaulted GeneratorArgs. You may change the defaults -// before calling AddFlags. -func Default() *GeneratorArgs { - return &GeneratorArgs{ - OutputBase: DefaultSourceTree(), - GoHeaderFilePath: filepath.Join(DefaultSourceTree(), "k8s.io/gengo/boilerplate/boilerplate.go.txt"), - GeneratedBuildTag: "ignore_autogenerated", - GeneratedByCommentTemplate: "// Code generated by GENERATOR_NAME. DO NOT EDIT.", - defaultCommandLineFlags: true, - } -} - -// GeneratorArgs has arguments that are passed to generators. -type GeneratorArgs struct { - // Which directories to parse. - InputDirs []string - - // Source tree to write results to. - OutputBase string - - // Package path within the source tree. - OutputPackagePath string - - // Output file name. - OutputFileBaseName string - - // Where to get copyright header text. - GoHeaderFilePath string - - // If GeneratedByCommentTemplate is set, generate a "Code generated by" comment - // below the bloilerplate, of the format defined by this string. - // Any instances of "GENERATOR_NAME" will be replaced with the name of the code generator. - GeneratedByCommentTemplate string - - // If true, only verify, don't write anything. - VerifyOnly bool - - // If true, include *_test.go files - IncludeTestFiles bool - - // GeneratedBuildTag is the tag used to identify code generated by execution - // of this type. Each generator should use a different tag, and different - // groups of generators (external API that depends on Kube generations) should - // keep tags distinct as well. - GeneratedBuildTag string - - // Any custom arguments go here - CustomArgs interface{} - - // If specified, trim the prefix from OutputPackagePath before writing files. - TrimPathPrefix string - - // Whether to use default command line flags - defaultCommandLineFlags bool -} - -// WithoutDefaultFlagParsing disables implicit addition of command line flags and parsing. -func (g *GeneratorArgs) WithoutDefaultFlagParsing() *GeneratorArgs { - g.defaultCommandLineFlags = false - return g -} - -func (g *GeneratorArgs) AddFlags(fs *pflag.FlagSet) { - fs.StringSliceVarP(&g.InputDirs, "input-dirs", "i", g.InputDirs, "Comma-separated list of import paths to get input types from.") - fs.StringVarP(&g.OutputBase, "output-base", "o", g.OutputBase, "Output base; defaults to $GOPATH/src/ or ./ if $GOPATH is not set.") - fs.StringVarP(&g.OutputPackagePath, "output-package", "p", g.OutputPackagePath, "Base package path.") - fs.StringVarP(&g.OutputFileBaseName, "output-file-base", "O", g.OutputFileBaseName, "Base name (without .go suffix) for output files.") - fs.StringVarP(&g.GoHeaderFilePath, "go-header-file", "h", g.GoHeaderFilePath, "File containing boilerplate header text. The string YEAR will be replaced with the current 4-digit year.") - fs.BoolVar(&g.VerifyOnly, "verify-only", g.VerifyOnly, "If true, only verify existing output, do not write anything.") - fs.StringVar(&g.GeneratedBuildTag, "build-tag", g.GeneratedBuildTag, "A Go build tag to use to identify files generated by this command. Should be unique.") - fs.StringVar(&g.TrimPathPrefix, "trim-path-prefix", g.TrimPathPrefix, "If set, trim the specified prefix from --output-package when generating files.") -} - -// LoadGoBoilerplate loads the boilerplate file passed to --go-header-file. -func (g *GeneratorArgs) LoadGoBoilerplate() ([]byte, error) { - b, err := ioutil.ReadFile(g.GoHeaderFilePath) - if err != nil { - return nil, err - } - b = bytes.Replace(b, []byte("YEAR"), []byte(strconv.Itoa(time.Now().UTC().Year())), -1) - - if g.GeneratedByCommentTemplate != "" { - if len(b) != 0 { - b = append(b, byte('\n')) - } - generatorName := path.Base(os.Args[0]) - generatedByComment := strings.Replace(g.GeneratedByCommentTemplate, "GENERATOR_NAME", generatorName, -1) - s := fmt.Sprintf("%s\n\n", generatedByComment) - b = append(b, []byte(s)...) - } - return b, nil -} - -// NewBuilder makes a new parser.Builder and populates it with the input -// directories. -func (g *GeneratorArgs) NewBuilder() (*parser.Builder, error) { - b := parser.New() - - // flag for including *_test.go - b.IncludeTestFiles = g.IncludeTestFiles - - // Ignore all auto-generated files. - b.AddBuildTags(g.GeneratedBuildTag) - - for _, d := range g.InputDirs { - var err error - if strings.HasSuffix(d, "/...") { - err = b.AddDirRecursive(strings.TrimSuffix(d, "/...")) - } else { - err = b.AddDir(d) - } - if err != nil { - return nil, fmt.Errorf("unable to add directory %q: %v", d, err) - } - } - return b, nil -} - -// DefaultSourceTree returns the /src directory of the first entry in $GOPATH. -// If $GOPATH is empty, it returns "./". Useful as a default output location. -func DefaultSourceTree() string { - paths := strings.Split(os.Getenv("GOPATH"), string(filepath.ListSeparator)) - if len(paths) > 0 && len(paths[0]) > 0 { - return filepath.Join(paths[0], "src") - } - return "./" -} - -// Execute implements main(). -// If you don't need any non-default behavior, use as: -// args.Default().Execute(...) -func (g *GeneratorArgs) Execute(nameSystems namer.NameSystems, defaultSystem string, pkgs func(*generator.Context, *GeneratorArgs) generator.Packages) error { - if g.defaultCommandLineFlags { - g.AddFlags(pflag.CommandLine) - pflag.CommandLine.AddGoFlagSet(goflag.CommandLine) - pflag.Parse() - } - - b, err := g.NewBuilder() - if err != nil { - return fmt.Errorf("Failed making a parser: %v", err) - } - - // pass through the flag on whether to include *_test.go files - b.IncludeTestFiles = g.IncludeTestFiles - - c, err := generator.NewContext(b, nameSystems, defaultSystem) - if err != nil { - return fmt.Errorf("Failed making a context: %v", err) - } - - c.TrimPathPrefix = g.TrimPathPrefix - - c.Verify = g.VerifyOnly - packages := pkgs(c, g) - if err := c.ExecutePackages(g.OutputBase, packages); err != nil { - return fmt.Errorf("Failed executing generator: %v", err) - } - - return nil -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/examples/import-boss/generators/import_restrict.go b/pkg/k8s/vendor/k8s.io/gengo/examples/import-boss/generators/import_restrict.go deleted file mode 100644 index d7eb20b8596..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/examples/import-boss/generators/import_restrict.go +++ /dev/null @@ -1,443 +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 generators has the generators for the import-boss utility. -package generators - -import ( - "encoding/json" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "regexp" - "sort" - "strings" - - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - "sigs.k8s.io/yaml" - - "k8s.io/klog/v2" -) - -const ( - goModFile = "go.mod" - importBossFileType = "import-boss" -) - -// NameSystems returns the name system used by the generators in this package. -func NameSystems() namer.NameSystems { - return namer.NameSystems{ - "raw": namer.NewRawNamer("", nil), - } -} - -// DefaultNameSystem returns the default name system for ordering the types to be -// processed by the generators in this package. -func DefaultNameSystem() string { - return "raw" -} - -// Packages makes the import-boss package definition. -func Packages(c *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - pkgs := generator.Packages{} - c.FileTypes = map[string]generator.FileType{ - importBossFileType: importRuleFile{c}, - } - - for _, p := range c.Universe { - if !inputIncludes(arguments.InputDirs, p) { - // Don't run on e.g. third party dependencies. - continue - } - savedPackage := p - pkgs = append(pkgs, &generator.DefaultPackage{ - PackageName: p.Name, - PackagePath: p.Path, - Source: p.SourcePath, - // GeneratorFunc returns a list of generators. Each generator makes a - // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - return []generator.Generator{&importRules{ - myPackage: savedPackage, - }} - }, - FilterFunc: func(c *generator.Context, t *types.Type) bool { - return false - }, - }) - } - - return pkgs -} - -// inputIncludes returns true if the given package is a (sub) package of one of -// the InputDirs. -func inputIncludes(inputs []string, p *types.Package) bool { - // TODO: This does not handle conversion of local paths (./foo) into - // canonical packages (github.com/example/project/foo). - for _, input := range inputs { - // Normalize paths - input := strings.TrimSuffix(input, "/") - input = strings.TrimPrefix(input, "./vendor/") - seek := strings.TrimSuffix(p.Path, "/") - - if input == seek { - return true - } - if strings.HasSuffix(input, "...") { - input = strings.TrimSuffix(input, "...") - if strings.HasPrefix(seek+"/", input) { - return true - } - } - } - return false -} - -// A single import restriction rule. -type Rule struct { - // All import paths that match this regexp... - SelectorRegexp string - // ... must have one of these prefixes ... - AllowedPrefixes []string - // ... and must not have one of these prefixes. - ForbiddenPrefixes []string -} - -type InverseRule struct { - Rule - // True if the rule is to be applied to transitive imports. - Transitive bool -} - -type fileFormat struct { - CurrentImports []string - - Rules []Rule - InverseRules []InverseRule - - path string -} - -func readFile(path string) (*fileFormat, error) { - currentBytes, err := ioutil.ReadFile(path) - if err != nil { - return nil, fmt.Errorf("couldn't read %v: %v", path, err) - } - - var current fileFormat - err = yaml.Unmarshal(currentBytes, ¤t) - if err != nil { - return nil, fmt.Errorf("couldn't unmarshal %v: %v", path, err) - } - current.path = path - return ¤t, nil -} - -func writeFile(path string, ff *fileFormat) error { - raw, err := json.MarshalIndent(ff, "", "\t") - if err != nil { - return fmt.Errorf("couldn't format data for file %v.\n%#v", path, ff) - } - f, err := os.Create(path) - if err != nil { - return fmt.Errorf("couldn't open %v for writing: %v", path, err) - } - defer f.Close() - _, err = f.Write(raw) - return err -} - -// This does the actual checking, since it knows the literal destination file. -type importRuleFile struct { - context *generator.Context -} - -func (irf importRuleFile) AssembleFile(f *generator.File, path string) error { - return irf.VerifyFile(f, path) -} - -// TODO: make a flag to enable this, or expose this information in some other way. -func (importRuleFile) listEntireImportTree(f *generator.File, path string) error { - // If the file exists, populate its current imports. This is mostly to help - // humans figure out what they need to fix. - if _, err := os.Stat(path); err != nil { - // Ignore packages which haven't opted in by adding an .import-restrictions file. - return nil - } - - current, err := readFile(path) - if err != nil { - return err - } - - current.CurrentImports = []string{} - for v := range f.Imports { - current.CurrentImports = append(current.CurrentImports, v) - } - sort.Strings(current.CurrentImports) - - return writeFile(path, current) -} - -// removeLastDir removes the last directory, but leaves the file name -// unchanged. It returns the new path and the removed directory. So: -// "a/b/c/file" -> ("a/b/file", "c") -func removeLastDir(path string) (newPath, removedDir string) { - dir, file := filepath.Split(path) - dir = strings.TrimSuffix(dir, string(filepath.Separator)) - return filepath.Join(filepath.Dir(dir), file), filepath.Base(dir) -} - -// isGoModRoot checks if a directory is the root directory for a package -// by checking for the existence of a 'go.mod' file in that directory. -func isGoModRoot(path string) bool { - _, err := os.Stat(filepath.Join(filepath.Dir(path), goModFile)) - return err == nil -} - -// recursiveRead collects all '.import-restriction' files, between the current directory, -// and the package root when Go modules are enabled, or $GOPATH/src when they are not. -func recursiveRead(path string) ([]*fileFormat, error) { - restrictionFiles := make([]*fileFormat, 0) - - for { - if _, err := os.Stat(path); err == nil { - rules, err := readFile(path) - if err != nil { - return nil, err - } - - restrictionFiles = append(restrictionFiles, rules) - } - - nextPath, removedDir := removeLastDir(path) - if nextPath == path || isGoModRoot(path) || removedDir == "src" { - break - } - - path = nextPath - } - - return restrictionFiles, nil -} - -func (irf importRuleFile) VerifyFile(f *generator.File, path string) error { - restrictionFiles, err := recursiveRead(filepath.Join(f.PackageSourcePath, f.Name)) - if err != nil { - return fmt.Errorf("error finding rules file: %v", err) - } - - if err := irf.verifyRules(restrictionFiles, f); err != nil { - return err - } - - return irf.verifyInverseRules(restrictionFiles, f) -} - -func (irf importRuleFile) verifyRules(restrictionFiles []*fileFormat, f *generator.File) error { - selectors := make([][]*regexp.Regexp, len(restrictionFiles)) - for i, restrictionFile := range restrictionFiles { - for _, r := range restrictionFile.Rules { - re, err := regexp.Compile(r.SelectorRegexp) - if err != nil { - return fmt.Errorf("regexp `%s` in file %q doesn't compile: %v", r.SelectorRegexp, restrictionFile.path, err) - } - - selectors[i] = append(selectors[i], re) - } - } - - forbiddenImports := map[string]string{} - allowedMismatchedImports := []string{} - - for v := range f.Imports { - explicitlyAllowed := false - - NextRestrictionFiles: - for i, rules := range restrictionFiles { - for j, r := range rules.Rules { - matching := selectors[i][j].MatchString(v) - klog.V(5).Infof("Checking %v matches %v: %v\n", r.SelectorRegexp, v, matching) - if !matching { - continue - } - for _, forbidden := range r.ForbiddenPrefixes { - klog.V(4).Infof("Checking %v against %v\n", v, forbidden) - if strings.HasPrefix(v, forbidden) { - forbiddenImports[v] = forbidden - } - } - for _, allowed := range r.AllowedPrefixes { - klog.V(4).Infof("Checking %v against %v\n", v, allowed) - if strings.HasPrefix(v, allowed) { - explicitlyAllowed = true - break - } - } - - if !explicitlyAllowed { - allowedMismatchedImports = append(allowedMismatchedImports, v) - } else { - klog.V(2).Infof("%v importing %v allowed by %v\n", f.PackagePath, v, restrictionFiles[i].path) - break NextRestrictionFiles - } - } - } - } - - if len(forbiddenImports) > 0 || len(allowedMismatchedImports) > 0 { - var errorBuilder strings.Builder - for i, f := range forbiddenImports { - fmt.Fprintf(&errorBuilder, "import %v has forbidden prefix %v\n", i, f) - } - if len(allowedMismatchedImports) > 0 { - sort.Sort(sort.StringSlice(allowedMismatchedImports)) - fmt.Fprintf(&errorBuilder, "the following imports did not match any allowed prefix:\n") - for _, i := range allowedMismatchedImports { - fmt.Fprintf(&errorBuilder, " %v\n", i) - } - } - return errors.New(errorBuilder.String()) - } - - return nil -} - -// verifyInverseRules checks that all packages that import a package are allowed to import it. -func (irf importRuleFile) verifyInverseRules(restrictionFiles []*fileFormat, f *generator.File) error { - // compile all Selector regex in all restriction files - selectors := make([][]*regexp.Regexp, len(restrictionFiles)) - for i, restrictionFile := range restrictionFiles { - for _, r := range restrictionFile.InverseRules { - re, err := regexp.Compile(r.SelectorRegexp) - if err != nil { - return fmt.Errorf("regexp `%s` in file %q doesn't compile: %v", r.SelectorRegexp, restrictionFile.path, err) - } - - selectors[i] = append(selectors[i], re) - } - } - - directImport := map[string]bool{} - for _, imp := range irf.context.IncomingImports()[f.PackagePath] { - directImport[imp] = true - } - - forbiddenImports := map[string]string{} - allowedMismatchedImports := []string{} - - for _, v := range irf.context.TransitiveIncomingImports()[f.PackagePath] { - explicitlyAllowed := false - - NextRestrictionFiles: - for i, rules := range restrictionFiles { - for j, r := range rules.InverseRules { - if !r.Transitive && !directImport[v] { - continue - } - - re := selectors[i][j] - matching := re.MatchString(v) - klog.V(4).Infof("Checking %v matches %v (importing %v: %v\n", r.SelectorRegexp, v, f.PackagePath, matching) - if !matching { - continue - } - for _, forbidden := range r.ForbiddenPrefixes { - klog.V(4).Infof("Checking %v against %v\n", v, forbidden) - if strings.HasPrefix(v, forbidden) { - forbiddenImports[v] = forbidden - } - } - for _, allowed := range r.AllowedPrefixes { - klog.V(4).Infof("Checking %v against %v\n", v, allowed) - if strings.HasPrefix(v, allowed) { - explicitlyAllowed = true - break - } - } - if !explicitlyAllowed { - allowedMismatchedImports = append(allowedMismatchedImports, v) - } else { - klog.V(2).Infof("%v importing %v allowed by %v\n", v, f.PackagePath, restrictionFiles[i].path) - break NextRestrictionFiles - } - } - } - } - - if len(forbiddenImports) > 0 || len(allowedMismatchedImports) > 0 { - var errorBuilder strings.Builder - for i, f := range forbiddenImports { - fmt.Fprintf(&errorBuilder, "(inverse): import %v has forbidden prefix %v\n", i, f) - } - if len(allowedMismatchedImports) > 0 { - sort.Sort(sort.StringSlice(allowedMismatchedImports)) - fmt.Fprintf(&errorBuilder, "(inverse): the following imports did not match any allowed prefix:\n") - for _, i := range allowedMismatchedImports { - fmt.Fprintf(&errorBuilder, " %v\n", i) - } - } - return errors.New(errorBuilder.String()) - } - - return nil -} - -// importRules produces a file with a set for a single type. -type importRules struct { - myPackage *types.Package - imports namer.ImportTracker -} - -var ( - _ = generator.Generator(&importRules{}) - _ = generator.FileType(importRuleFile{}) -) - -func (r *importRules) Name() string { return "import rules" } -func (r *importRules) Filter(*generator.Context, *types.Type) bool { return false } -func (r *importRules) Namers(*generator.Context) namer.NameSystems { return nil } -func (r *importRules) PackageVars(*generator.Context) []string { return []string{} } -func (r *importRules) PackageConsts(*generator.Context) []string { return []string{} } -func (r *importRules) GenerateType(*generator.Context, *types.Type, io.Writer) error { return nil } -func (r *importRules) Filename() string { return ".import-restrictions" } -func (r *importRules) FileType() string { return importBossFileType } -func (r *importRules) Init(c *generator.Context, w io.Writer) error { return nil } -func (r *importRules) Finalize(*generator.Context, io.Writer) error { return nil } - -func dfsImports(dest *[]string, seen map[string]bool, p *types.Package) { - for _, p2 := range p.Imports { - if seen[p2.Path] { - continue - } - seen[p2.Path] = true - dfsImports(dest, seen, p2) - *dest = append(*dest, p2.Path) - } -} - -func (r *importRules) Imports(*generator.Context) []string { - all := []string{} - dfsImports(&all, map[string]bool{}, r.myPackage) - return all -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/generators/sets.go b/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/generators/sets.go deleted file mode 100644 index e89f5ad7616..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/generators/sets.go +++ /dev/null @@ -1,378 +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 generators has the generators for the set-gen utility. -package generators - -import ( - "io" - - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - - "k8s.io/klog/v2" -) - -// NameSystems returns the name system used by the generators in this package. -func NameSystems() namer.NameSystems { - return namer.NameSystems{ - "public": namer.NewPublicNamer(0), - "private": namer.NewPrivateNamer(0), - "raw": namer.NewRawNamer("", nil), - } -} - -// DefaultNameSystem returns the default name system for ordering the types to be -// processed by the generators in this package. -func DefaultNameSystem() string { - return "public" -} - -// Packages makes the sets package definition. -func Packages(_ *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() - if err != nil { - klog.Fatalf("Failed loading boilerplate: %v", err) - } - - return generator.Packages{&generator.DefaultPackage{ - PackageName: "sets", - PackagePath: arguments.OutputPackagePath, - HeaderText: boilerplate, - PackageDocumentation: []byte( - `// Package sets has auto-generated set types. -`), - // GeneratorFunc returns a list of generators. Each generator makes a - // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - generators = []generator.Generator{ - // Always generate a "doc.go" file. - generator.DefaultGen{OptionalName: "doc"}, - // Make a separate file for the Empty type, since it's shared by every type. - generator.DefaultGen{ - OptionalName: "empty", - OptionalBody: []byte(emptyTypeDecl), - }, - } - // Since we want a file per type that we generate a set for, we - // have to provide a function for this. - for _, t := range c.Order { - generators = append(generators, &genSet{ - DefaultGen: generator.DefaultGen{ - // Use the privatized version of the - // type name as the file name. - // - // TODO: make a namer that converts - // camelCase to '-' separation for file - // names? - OptionalName: c.Namers["private"].Name(t), - }, - outputPackage: arguments.OutputPackagePath, - typeToMatch: t, - imports: generator.NewImportTracker(), - }) - } - return generators - }, - FilterFunc: func(c *generator.Context, t *types.Type) bool { - // It would be reasonable to filter by the type's package here. - // It might be necessary if your input directory has a big - // import graph. - switch t.Kind { - case types.Map, types.Slice, types.Pointer: - // These types can't be keys in a map. - return false - case types.Builtin: - return true - case types.Struct: - // Only some structs can be keys in a map. This is triggered by the line - // // +genset - // or - // // +genset=true - return extractBoolTagOrDie("genset", t.CommentLines) == true - } - return false - }, - }} -} - -// genSet produces a file with a set for a single type. -type genSet struct { - generator.DefaultGen - outputPackage string - typeToMatch *types.Type - imports namer.ImportTracker -} - -// Filter ignores all but one type because we're making a single file per type. -func (g *genSet) Filter(c *generator.Context, t *types.Type) bool { return t == g.typeToMatch } - -func (g *genSet) Namers(c *generator.Context) namer.NameSystems { - return namer.NameSystems{ - "raw": namer.NewRawNamer(g.outputPackage, g.imports), - } -} - -func (g *genSet) Imports(c *generator.Context) (imports []string) { - return append(g.imports.ImportLines(), "reflect", "sort") -} - -// args constructs arguments for templates. Usage: -// g.args(t, "key1", value1, "key2", value2, ...) -// -// 't' is loaded with the key 'type'. -// -// We could use t directly as the argument, but doing it this way makes it easy -// to mix in additional parameters. This feature is not used in this set -// generator, but is present as an example. -func (g *genSet) args(t *types.Type, kv ...interface{}) interface{} { - m := map[interface{}]interface{}{"type": t} - for i := 0; i < len(kv)/2; i++ { - m[kv[i*2]] = kv[i*2+1] - } - return m -} - -// GenerateType makes the body of a file implementing a set for type t. -func (g *genSet) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { - sw := generator.NewSnippetWriter(w, c, "$", "$") - sw.Do(setCode, g.args(t)) - sw.Do("func less$.type|public$(lhs, rhs $.type|raw$) bool {\n", g.args(t)) - g.lessBody(sw, t) - sw.Do("}\n", g.args(t)) - return sw.Error() -} - -func (g *genSet) lessBody(sw *generator.SnippetWriter, t *types.Type) { - // TODO: make this recursive, handle pointers and multiple nested structs... - switch t.Kind { - case types.Struct: - for _, m := range types.FlattenMembers(t.Members) { - sw.Do("if lhs.$.Name$ < rhs.$.Name$ { return true }\n", m) - sw.Do("if lhs.$.Name$ > rhs.$.Name$ { return false }\n", m) - } - sw.Do("return false\n", nil) - default: - sw.Do("return lhs < rhs\n", nil) - } -} - -// written to the "empty.go" file. -var emptyTypeDecl = ` -// Empty is public since it is used by some internal API objects for conversions between external -// string arrays and internal sets, and conversion logic requires public types today. -type Empty struct{} -` - -// Written for every type. If you've never used text/template before: -// $.type$ refers to the source type; |public means to -// call the function giving the public name, |raw the raw type name. -var setCode = `// sets.$.type|public$ is a set of $.type|raw$s, implemented via map[$.type|raw$]struct{} for minimal memory consumption. -type $.type|public$ map[$.type|raw$]Empty - -// New$.type|public$ creates a $.type|public$ from a list of values. -func New$.type|public$(items ...$.type|raw$) $.type|public$ { - ss := make($.type|public$, len(items)) - ss.Insert(items...) - return ss -} - -// $.type|public$KeySet creates a $.type|public$ from a keys of a map[$.type|raw$](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func $.type|public$KeySet(theMap interface{}) $.type|public$ { - v := reflect.ValueOf(theMap) - ret := $.type|public${} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().($.type|raw$)) - } - return ret -} - -// Insert adds items to the set. -func (s $.type|public$) Insert(items ...$.type|raw$) $.type|public$ { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s $.type|public$) Delete(items ...$.type|raw$) $.type|public$ { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s $.type|public$) Has(item $.type|raw$) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s $.type|public$) HasAll(items ...$.type|raw$) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s $.type|public$) HasAny(items ...$.type|raw$) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Clone returns a new set which is a copy of the current set. -func (s $.type|public$) Clone() $.type|public$ { - result := make($.type|public$, len(s)) - for key := range s { - result.Insert(key) - } - return result -} - -// Difference returns a set of objects that are not in s2. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s1 $.type|public$) Difference(s2 $.type|public$) $.type|public$ { - result := New$.type|public$() - for key := range s1 { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.SymmetricDifference(s2) = {a3, a4, a5} -// s2.SymmetricDifference(s1) = {a3, a4, a5} -func (s1 $.type|public$) SymmetricDifference(s2 $.type|public$) $.type|public$ { - return s1.Difference(s2).Union(s2.Difference(s1)) -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 $.type|public$) Union(s2 $.type|public$) $.type|public$ { - result := s1.Clone() - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 $.type|public$) Intersection(s2 $.type|public$) $.type|public$ { - var walk, other $.type|public$ - result := New$.type|public$() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 $.type|public$) IsSuperset(s2 $.type|public$) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 $.type|public$) Equal(s2 $.type|public$) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOf$.type|public$ []$.type|raw$ - -func (s sortableSliceOf$.type|public$) Len() int { return len(s) } -func (s sortableSliceOf$.type|public$) Less(i, j int) bool { return less$.type|public$(s[i], s[j]) } -func (s sortableSliceOf$.type|public$) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted $.type|raw$ slice. -func (s $.type|public$) List() []$.type|raw$ { - res := make(sortableSliceOf$.type|public$, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []$.type|raw$(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s $.type|public$) UnsortedList() []$.type|raw$ { - res :=make([]$.type|raw$, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s $.type|public$) PopAny() ($.type|raw$, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue $.type|raw$ - return zeroValue, false -} - -// Len returns the size of the set. -func (s $.type|public$) Len() int { - return len(s) -} - -` diff --git a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/byte.go b/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/byte.go deleted file mode 100644 index e9660c2f3a9..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/byte.go +++ /dev/null @@ -1,221 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Byte is a set of bytes, implemented via map[byte]struct{} for minimal memory consumption. -type Byte map[byte]Empty - -// NewByte creates a Byte from a list of values. -func NewByte(items ...byte) Byte { - ss := make(Byte, len(items)) - ss.Insert(items...) - return ss -} - -// ByteKeySet creates a Byte from a keys of a map[byte](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func ByteKeySet(theMap interface{}) Byte { - v := reflect.ValueOf(theMap) - ret := Byte{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(byte)) - } - return ret -} - -// Insert adds items to the set. -func (s Byte) Insert(items ...byte) Byte { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Byte) Delete(items ...byte) Byte { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Byte) Has(item byte) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Byte) HasAll(items ...byte) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Byte) HasAny(items ...byte) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Clone returns a new set which is a copy of the current set. -func (s Byte) Clone() Byte { - result := make(Byte, len(s)) - for key := range s { - result.Insert(key) - } - return result -} - -// Difference returns a set of objects that are not in s2. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s1 Byte) Difference(s2 Byte) Byte { - result := NewByte() - for key := range s1 { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.SymmetricDifference(s2) = {a3, a4, a5} -// s2.SymmetricDifference(s1) = {a3, a4, a5} -func (s1 Byte) SymmetricDifference(s2 Byte) Byte { - return s1.Difference(s2).Union(s2.Difference(s1)) -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Byte) Union(s2 Byte) Byte { - result := s1.Clone() - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Byte) Intersection(s2 Byte) Byte { - var walk, other Byte - result := NewByte() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Byte) IsSuperset(s2 Byte) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Byte) Equal(s2 Byte) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfByte []byte - -func (s sortableSliceOfByte) Len() int { return len(s) } -func (s sortableSliceOfByte) Less(i, j int) bool { return lessByte(s[i], s[j]) } -func (s sortableSliceOfByte) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted byte slice. -func (s Byte) List() []byte { - res := make(sortableSliceOfByte, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []byte(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Byte) UnsortedList() []byte { - res := make([]byte, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Byte) PopAny() (byte, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue byte - return zeroValue, false -} - -// Len returns the size of the set. -func (s Byte) Len() int { - return len(s) -} - -func lessByte(lhs, rhs byte) bool { - return lhs < rhs -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/int.go b/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/int.go deleted file mode 100644 index f614f06e1f9..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/int.go +++ /dev/null @@ -1,221 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Int is a set of ints, implemented via map[int]struct{} for minimal memory consumption. -type Int map[int]Empty - -// NewInt creates a Int from a list of values. -func NewInt(items ...int) Int { - ss := make(Int, len(items)) - ss.Insert(items...) - return ss -} - -// IntKeySet creates a Int from a keys of a map[int](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func IntKeySet(theMap interface{}) Int { - v := reflect.ValueOf(theMap) - ret := Int{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(int)) - } - return ret -} - -// Insert adds items to the set. -func (s Int) Insert(items ...int) Int { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Int) Delete(items ...int) Int { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Int) Has(item int) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Int) HasAll(items ...int) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Int) HasAny(items ...int) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Clone returns a new set which is a copy of the current set. -func (s Int) Clone() Int { - result := make(Int, len(s)) - for key := range s { - result.Insert(key) - } - return result -} - -// Difference returns a set of objects that are not in s2. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s1 Int) Difference(s2 Int) Int { - result := NewInt() - for key := range s1 { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.SymmetricDifference(s2) = {a3, a4, a5} -// s2.SymmetricDifference(s1) = {a3, a4, a5} -func (s1 Int) SymmetricDifference(s2 Int) Int { - return s1.Difference(s2).Union(s2.Difference(s1)) -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Int) Union(s2 Int) Int { - result := s1.Clone() - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Int) Intersection(s2 Int) Int { - var walk, other Int - result := NewInt() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Int) IsSuperset(s2 Int) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Int) Equal(s2 Int) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfInt []int - -func (s sortableSliceOfInt) Len() int { return len(s) } -func (s sortableSliceOfInt) Less(i, j int) bool { return lessInt(s[i], s[j]) } -func (s sortableSliceOfInt) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted int slice. -func (s Int) List() []int { - res := make(sortableSliceOfInt, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []int(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Int) UnsortedList() []int { - res := make([]int, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Int) PopAny() (int, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue int - return zeroValue, false -} - -// Len returns the size of the set. -func (s Int) Len() int { - return len(s) -} - -func lessInt(lhs, rhs int) bool { - return lhs < rhs -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/int64.go b/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/int64.go deleted file mode 100644 index 995d99bd90d..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/int64.go +++ /dev/null @@ -1,221 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Int64 is a set of int64s, implemented via map[int64]struct{} for minimal memory consumption. -type Int64 map[int64]Empty - -// NewInt64 creates a Int64 from a list of values. -func NewInt64(items ...int64) Int64 { - ss := make(Int64, len(items)) - ss.Insert(items...) - return ss -} - -// Int64KeySet creates a Int64 from a keys of a map[int64](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func Int64KeySet(theMap interface{}) Int64 { - v := reflect.ValueOf(theMap) - ret := Int64{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(int64)) - } - return ret -} - -// Insert adds items to the set. -func (s Int64) Insert(items ...int64) Int64 { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Int64) Delete(items ...int64) Int64 { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Int64) Has(item int64) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Int64) HasAll(items ...int64) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Int64) HasAny(items ...int64) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Clone returns a new set which is a copy of the current set. -func (s Int64) Clone() Int64 { - result := make(Int64, len(s)) - for key := range s { - result.Insert(key) - } - return result -} - -// Difference returns a set of objects that are not in s2. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s1 Int64) Difference(s2 Int64) Int64 { - result := NewInt64() - for key := range s1 { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.SymmetricDifference(s2) = {a3, a4, a5} -// s2.SymmetricDifference(s1) = {a3, a4, a5} -func (s1 Int64) SymmetricDifference(s2 Int64) Int64 { - return s1.Difference(s2).Union(s2.Difference(s1)) -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Int64) Union(s2 Int64) Int64 { - result := s1.Clone() - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Int64) Intersection(s2 Int64) Int64 { - var walk, other Int64 - result := NewInt64() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Int64) IsSuperset(s2 Int64) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Int64) Equal(s2 Int64) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfInt64 []int64 - -func (s sortableSliceOfInt64) Len() int { return len(s) } -func (s sortableSliceOfInt64) Less(i, j int) bool { return lessInt64(s[i], s[j]) } -func (s sortableSliceOfInt64) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted int64 slice. -func (s Int64) List() []int64 { - res := make(sortableSliceOfInt64, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []int64(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Int64) UnsortedList() []int64 { - res := make([]int64, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Int64) PopAny() (int64, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue int64 - return zeroValue, false -} - -// Len returns the size of the set. -func (s Int64) Len() int { - return len(s) -} - -func lessInt64(lhs, rhs int64) bool { - return lhs < rhs -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/string.go b/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/string.go deleted file mode 100644 index 4a4a92fd21f..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/string.go +++ /dev/null @@ -1,221 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption. -type String map[string]Empty - -// NewString creates a String from a list of values. -func NewString(items ...string) String { - ss := make(String, len(items)) - ss.Insert(items...) - return ss -} - -// StringKeySet creates a String from a keys of a map[string](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func StringKeySet(theMap interface{}) String { - v := reflect.ValueOf(theMap) - ret := String{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(string)) - } - return ret -} - -// Insert adds items to the set. -func (s String) Insert(items ...string) String { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s String) Delete(items ...string) String { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s String) Has(item string) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s String) HasAll(items ...string) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s String) HasAny(items ...string) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Clone returns a new set which is a copy of the current set. -func (s String) Clone() String { - result := make(String, len(s)) - for key := range s { - result.Insert(key) - } - return result -} - -// Difference returns a set of objects that are not in s2. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s1 String) Difference(s2 String) String { - result := NewString() - for key := range s1 { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.SymmetricDifference(s2) = {a3, a4, a5} -// s2.SymmetricDifference(s1) = {a3, a4, a5} -func (s1 String) SymmetricDifference(s2 String) String { - return s1.Difference(s2).Union(s2.Difference(s1)) -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 String) Union(s2 String) String { - result := s1.Clone() - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 String) Intersection(s2 String) String { - var walk, other String - result := NewString() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 String) IsSuperset(s2 String) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 String) Equal(s2 String) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfString []string - -func (s sortableSliceOfString) Len() int { return len(s) } -func (s sortableSliceOfString) Less(i, j int) bool { return lessString(s[i], s[j]) } -func (s sortableSliceOfString) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted string slice. -func (s String) List() []string { - res := make(sortableSliceOfString, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []string(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s String) UnsortedList() []string { - res := make([]string, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s String) PopAny() (string, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue string - return zeroValue, false -} - -// Len returns the size of the set. -func (s String) Len() int { - return len(s) -} - -func lessString(lhs, rhs string) bool { - return lhs < rhs -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/generator/default_generator.go b/pkg/k8s/vendor/k8s.io/gengo/generator/default_generator.go deleted file mode 100644 index f9476682148..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/generator/default_generator.go +++ /dev/null @@ -1,62 +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 generator - -import ( - "io" - - "k8s.io/gengo/namer" - "k8s.io/gengo/types" -) - -const ( - GolangFileType = "golang" -) - -// DefaultGen implements a do-nothing Generator. -// -// It can be used to implement static content files. -type DefaultGen struct { - // OptionalName, if present, will be used for the generator's name, and - // the filename (with ".go" appended). - OptionalName string - - // OptionalBody, if present, will be used as the return from the "Init" - // method. This causes it to be static content for the entire file if - // no other generator touches the file. - OptionalBody []byte -} - -func (d DefaultGen) Name() string { return d.OptionalName } -func (d DefaultGen) Filter(*Context, *types.Type) bool { return true } -func (d DefaultGen) Namers(*Context) namer.NameSystems { return nil } -func (d DefaultGen) Imports(*Context) []string { return []string{} } -func (d DefaultGen) PackageVars(*Context) []string { return []string{} } -func (d DefaultGen) PackageConsts(*Context) []string { return []string{} } -func (d DefaultGen) GenerateType(*Context, *types.Type, io.Writer) error { return nil } -func (d DefaultGen) Filename() string { return d.OptionalName + ".go" } -func (d DefaultGen) FileType() string { return GolangFileType } -func (d DefaultGen) Finalize(*Context, io.Writer) error { return nil } - -func (d DefaultGen) Init(c *Context, w io.Writer) error { - _, err := w.Write(d.OptionalBody) - return err -} - -var ( - _ = Generator(DefaultGen{}) -) diff --git a/pkg/k8s/vendor/k8s.io/gengo/generator/default_package.go b/pkg/k8s/vendor/k8s.io/gengo/generator/default_package.go deleted file mode 100644 index dcf0883235d..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/generator/default_package.go +++ /dev/null @@ -1,75 +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 generator - -import ( - "k8s.io/gengo/types" -) - -// DefaultPackage contains a default implementation of Package. -type DefaultPackage struct { - // Short name of package, used in the "package xxxx" line. - PackageName string - // Import path of the package, and the location on disk of the package. - PackagePath string - // The location of the package on disk. - Source string - - // Emitted at the top of every file. - HeaderText []byte - - // Emitted only for a "doc.go" file; appended to the HeaderText for - // that file. - PackageDocumentation []byte - - // If non-nil, will be called on "Generators"; otherwise, the static - // list will be used. So you should set only one of these two fields. - GeneratorFunc func(*Context) []Generator - GeneratorList []Generator - - // Optional; filters the types exposed to the generators. - FilterFunc func(*Context, *types.Type) bool -} - -func (d *DefaultPackage) Name() string { return d.PackageName } -func (d *DefaultPackage) Path() string { return d.PackagePath } -func (d *DefaultPackage) SourcePath() string { return d.Source } - -func (d *DefaultPackage) Filter(c *Context, t *types.Type) bool { - if d.FilterFunc != nil { - return d.FilterFunc(c, t) - } - return true -} - -func (d *DefaultPackage) Generators(c *Context) []Generator { - if d.GeneratorFunc != nil { - return d.GeneratorFunc(c) - } - return d.GeneratorList -} - -func (d *DefaultPackage) Header(filename string) []byte { - if filename == "doc.go" { - return append(d.HeaderText, d.PackageDocumentation...) - } - return d.HeaderText -} - -var ( - _ = Package(&DefaultPackage{}) -) diff --git a/pkg/k8s/vendor/k8s.io/gengo/generator/generator.go b/pkg/k8s/vendor/k8s.io/gengo/generator/generator.go deleted file mode 100644 index 5614ae3b322..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/generator/generator.go +++ /dev/null @@ -1,259 +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 generator - -import ( - "bytes" - "io" - - "k8s.io/gengo/namer" - "k8s.io/gengo/parser" - "k8s.io/gengo/types" -) - -// Package contains the contract for generating a package. -type Package interface { - // Name returns the package short name. - Name() string - // Path returns the package import path. - Path() string - // SourcePath returns the location of the package on disk. - SourcePath() string - - // Filter should return true if this package cares about this type. - // Otherwise, this type will be omitted from the type ordering for - // this package. - Filter(*Context, *types.Type) bool - - // Header should return a header for the file, including comment markers. - // Useful for copyright notices and doc strings. Include an - // autogeneration notice! Do not include the "package x" line. - Header(filename string) []byte - - // Generators returns the list of generators for this package. It is - // allowed for more than one generator to write to the same file. - // A Context is passed in case the list of generators depends on the - // input types. - Generators(*Context) []Generator -} - -type File struct { - Name string - FileType string - PackageName string - Header []byte - PackagePath string - PackageSourcePath string - Imports map[string]struct{} - Vars bytes.Buffer - Consts bytes.Buffer - Body bytes.Buffer -} - -type FileType interface { - AssembleFile(f *File, path string) error - VerifyFile(f *File, path string) error -} - -// Packages is a list of packages to generate. -type Packages []Package - -// Generator is the contract for anything that wants to do auto-generation. -// It's expected that the io.Writers passed to the below functions will be -// ErrorTrackers; this allows implementations to not check for io errors, -// making more readable code. -// -// The call order for the functions that take a Context is: -// 1. Filter() // Subsequent calls see only types that pass this. -// 2. Namers() // Subsequent calls see the namers provided by this. -// 3. PackageVars() -// 4. PackageConsts() -// 5. Init() -// 6. GenerateType() // Called N times, once per type in the context's Order. -// 7. Imports() -// -// You may have multiple generators for the same file. -type Generator interface { - // The name of this generator. Will be included in generated comments. - Name() string - - // Filter should return true if this generator cares about this type. - // (otherwise, GenerateType will not be called.) - // - // Filter is called before any of the generator's other functions; - // subsequent calls will get a context with only the types that passed - // this filter. - Filter(*Context, *types.Type) bool - - // If this generator needs special namers, return them here. These will - // override the original namers in the context if there is a collision. - // You may return nil if you don't need special names. These names will - // be available in the context passed to the rest of the generator's - // functions. - // - // A use case for this is to return a namer that tracks imports. - Namers(*Context) namer.NameSystems - - // Init should write an init function, and any other content that's not - // generated per-type. (It's not intended for generator specific - // initialization! Do that when your Package constructs the - // Generators.) - Init(*Context, io.Writer) error - - // Finalize should write finish up functions, and any other content that's not - // generated per-type. - Finalize(*Context, io.Writer) error - - // PackageVars should emit an array of variable lines. They will be - // placed in a var ( ... ) block. There's no need to include a leading - // \t or trailing \n. - PackageVars(*Context) []string - - // PackageConsts should emit an array of constant lines. They will be - // placed in a const ( ... ) block. There's no need to include a leading - // \t or trailing \n. - PackageConsts(*Context) []string - - // GenerateType should emit the code for a particular type. - GenerateType(*Context, *types.Type, io.Writer) error - - // Imports should return a list of necessary imports. They will be - // formatted correctly. You do not need to include quotation marks, - // return only the package name; alternatively, you can also return - // imports in the format `name "path/to/pkg"`. Imports will be called - // after Init, PackageVars, PackageConsts, and GenerateType, to allow - // you to keep track of what imports you actually need. - Imports(*Context) []string - - // Preferred file name of this generator, not including a path. It is - // allowed for multiple generators to use the same filename, but it's - // up to you to make sure they don't have colliding import names. - // TODO: provide per-file import tracking, removing the requirement - // that generators coordinate.. - Filename() string - - // A registered file type in the context to generate this file with. If - // the FileType is not found in the context, execution will stop. - FileType() string -} - -// Context is global context for individual generators to consume. -type Context struct { - // A map from the naming system to the names for that system. E.g., you - // might have public names and several private naming systems. - Namers namer.NameSystems - - // All the types, in case you want to look up something. - Universe types.Universe - - // Incoming imports, i.e. packages importing the given package. - incomingImports map[string][]string - - // Incoming transitive imports, i.e. the transitive closure of IncomingImports - incomingTransitiveImports map[string][]string - - // All the user-specified packages. This is after recursive expansion. - Inputs []string - - // The canonical ordering of the types (will be filtered by both the - // Package's and Generator's Filter methods). - Order []*types.Type - - // A set of types this context can process. If this is empty or nil, - // the default "golang" filetype will be provided. - FileTypes map[string]FileType - - // If true, Execute* calls will just verify that the existing output is - // correct. (You may set this after calling NewContext.) - Verify bool - - // Allows generators to add packages at runtime. - builder *parser.Builder - - // If specified, trim the prefix from a package's path before writing files. - TrimPathPrefix string -} - -// NewContext generates a context from the given builder, naming systems, and -// the naming system you wish to construct the canonical ordering from. -func NewContext(b *parser.Builder, nameSystems namer.NameSystems, canonicalOrderName string) (*Context, error) { - universe, err := b.FindTypes() - if err != nil { - return nil, err - } - - c := &Context{ - Namers: namer.NameSystems{}, - Universe: universe, - Inputs: b.FindPackages(), - FileTypes: map[string]FileType{ - GolangFileType: NewGolangFile(), - }, - builder: b, - } - - for name, systemNamer := range nameSystems { - c.Namers[name] = systemNamer - if name == canonicalOrderName { - orderer := namer.Orderer{Namer: systemNamer} - c.Order = orderer.OrderUniverse(universe) - } - } - return c, nil -} - -// IncomingImports returns the incoming imports for each package. The map is lazily computed. -func (ctxt *Context) IncomingImports() map[string][]string { - if ctxt.incomingImports == nil { - incoming := map[string][]string{} - for _, pkg := range ctxt.Universe { - for imp := range pkg.Imports { - incoming[imp] = append(incoming[imp], pkg.Path) - } - } - ctxt.incomingImports = incoming - } - return ctxt.incomingImports -} - -// TransitiveIncomingImports returns the transitive closure of the incoming imports for each package. -// The map is lazily computed. -func (ctxt *Context) TransitiveIncomingImports() map[string][]string { - if ctxt.incomingTransitiveImports == nil { - ctxt.incomingTransitiveImports = transitiveClosure(ctxt.IncomingImports()) - } - return ctxt.incomingTransitiveImports -} - -// AddDir adds a Go package to the context. The specified path must be a single -// go package import path. GOPATH, GOROOT, and the location of your go binary -// (`which go`) will all be searched, in the normal Go fashion. -// Deprecated. Please use AddDirectory. -func (ctxt *Context) AddDir(path string) error { - ctxt.incomingImports = nil - ctxt.incomingTransitiveImports = nil - return ctxt.builder.AddDirTo(path, &ctxt.Universe) -} - -// AddDirectory adds a Go package to the context. The specified path must be a -// single go package import path. GOPATH, GOROOT, and the location of your go -// binary (`which go`) will all be searched, in the normal Go fashion. -func (ctxt *Context) AddDirectory(path string) (*types.Package, error) { - ctxt.incomingImports = nil - ctxt.incomingTransitiveImports = nil - return ctxt.builder.AddDirectoryTo(path, &ctxt.Universe) -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/generator/snippet_writer.go b/pkg/k8s/vendor/k8s.io/gengo/generator/snippet_writer.go deleted file mode 100644 index 590775ff228..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/generator/snippet_writer.go +++ /dev/null @@ -1,154 +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 generator - -import ( - "fmt" - "io" - "runtime" - "text/template" -) - -// SnippetWriter is an attempt to make the template library usable. -// Methods are chainable, and you don't have to check Error() until you're all -// done. -type SnippetWriter struct { - w io.Writer - context *Context - // Left & right delimiters. text/template defaults to "{{" and "}}" - // which is totally unusable for go code based templates. - left, right string - funcMap template.FuncMap - err error -} - -// w is the destination; left and right are the delimiters; @ and $ are both -// reasonable choices. -// -// c is used to make a function for every naming system, to which you can pass -// a type and get the corresponding name. -func NewSnippetWriter(w io.Writer, c *Context, left, right string) *SnippetWriter { - sw := &SnippetWriter{ - w: w, - context: c, - left: left, - right: right, - funcMap: template.FuncMap{}, - } - for name, namer := range c.Namers { - sw.funcMap[name] = namer.Name - } - return sw -} - -// Do parses format and runs args through it. You can have arbitrary logic in -// the format (see the text/template documentation), but consider running many -// short templates with ordinary go logic in between--this may be more -// readable. Do is chainable. Any error causes every other call to do to be -// ignored, and the error will be returned by Error(). So you can check it just -// once, at the end of your function. -// -// 'args' can be quite literally anything; read the text/template documentation -// for details. Maps and structs work particularly nicely. Conveniently, the -// types package is designed to have structs that are easily referencable from -// the template language. -// -// Example: -// -// sw := generator.NewSnippetWriter(outBuffer, context, "$", "$") -// sw.Do(`The public type name is: $.type|public$`, map[string]interface{}{"type": t}) -// return sw.Error() -// -// Where: -// * "$" starts a template directive -// * "." references the entire thing passed as args -// * "type" therefore sees a map and looks up the key "type" -// * "|" means "pass the thing on the left to the thing on the right" -// * "public" is the name of a naming system, so the SnippetWriter has given -// the template a function called "public" that takes a *types.Type and -// returns the naming system's name. E.g., if the type is "string" this might -// return "String". -// * the second "$" ends the template directive. -// -// The map is actually not necessary. The below does the same thing: -// -// sw.Do(`The public type name is: $.|public$`, t) -// -// You may or may not find it more readable to use the map with a descriptive -// key, but if you want to pass more than one arg, the map or a custom struct -// becomes a requirement. You can do arbitrary logic inside these templates, -// but you should consider doing the logic in go and stitching them together -// for the sake of your readers. -// -// TODO: Change Do() to optionally take a list of pairs of parameters (key, value) -// and have it construct a combined map with that and args. -func (s *SnippetWriter) Do(format string, args interface{}) *SnippetWriter { - if s.err != nil { - return s - } - // Name the template by source file:line so it can be found when - // there's an error. - _, file, line, _ := runtime.Caller(1) - tmpl, err := template. - New(fmt.Sprintf("%s:%d", file, line)). - Delims(s.left, s.right). - Funcs(s.funcMap). - Parse(format) - if err != nil { - s.err = err - return s - } - err = tmpl.Execute(s.w, args) - if err != nil { - s.err = err - } - return s -} - -// Args exists to make it convenient to construct arguments for -// SnippetWriter.Do. -type Args map[interface{}]interface{} - -// With makes a copy of a and adds the given key, value pair. -func (a Args) With(key, value interface{}) Args { - a2 := Args{key: value} - for k, v := range a { - a2[k] = v - } - return a2 -} - -// WithArgs makes a copy of a and adds the given arguments. -func (a Args) WithArgs(rhs Args) Args { - a2 := Args{} - for k, v := range rhs { - a2[k] = v - } - for k, v := range a { - a2[k] = v - } - return a2 -} - -func (s *SnippetWriter) Out() io.Writer { - return s.w -} - -// Error returns any encountered error. -func (s *SnippetWriter) Error() error { - return s.err -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/generator/transitive_closure.go b/pkg/k8s/vendor/k8s.io/gengo/generator/transitive_closure.go deleted file mode 100644 index 385a49fce31..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/generator/transitive_closure.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package generator - -import "sort" - -type edge struct { - from string - to string -} - -func transitiveClosure(in map[string][]string) map[string][]string { - adj := make(map[edge]bool) - imports := make(map[string]struct{}) - for from, tos := range in { - for _, to := range tos { - adj[edge{from, to}] = true - imports[to] = struct{}{} - } - } - - // Warshal's algorithm - for k := range in { - for i := range in { - if !adj[edge{i, k}] { - continue - } - for j := range imports { - if adj[edge{i, j}] { - continue - } - if adj[edge{k, j}] { - adj[edge{i, j}] = true - } - } - } - } - - out := make(map[string][]string, len(in)) - for i := range in { - for j := range imports { - if adj[edge{i, j}] { - out[i] = append(out[i], j) - } - } - - sort.Strings(out[i]) - } - - return out -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/namer/doc.go b/pkg/k8s/vendor/k8s.io/gengo/namer/doc.go deleted file mode 100644 index 8a44ea99597..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/namer/doc.go +++ /dev/null @@ -1,31 +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 namer has support for making different type naming systems. -// -// This is because sometimes you want to refer to the literal type, sometimes -// you want to make a name for the thing you're generating, and you want to -// make the name based on the type. For example, if you have `type foo string`, -// you want to be able to generate something like `func FooPrinter(f *foo) { -// Print(string(*f)) }`; that is, you want to refer to a public name, a literal -// name, and the underlying literal name. -// -// This package supports the idea of a "Namer" and a set of "NameSystems" to -// support these use cases. -// -// Additionally, a "RawNamer" can optionally keep track of what needs to be -// imported. -package namer // import "k8s.io/gengo/namer" diff --git a/pkg/k8s/vendor/k8s.io/gengo/namer/plural_namer.go b/pkg/k8s/vendor/k8s.io/gengo/namer/plural_namer.go deleted file mode 100644 index 0e3ebbf262a..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/namer/plural_namer.go +++ /dev/null @@ -1,120 +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 namer - -import ( - "strings" - - "k8s.io/gengo/types" -) - -var consonants = "bcdfghjklmnpqrstvwxyz" - -type pluralNamer struct { - // key is the case-sensitive type name, value is the case-insensitive - // intended output. - exceptions map[string]string - finalize func(string) string -} - -// NewPublicPluralNamer returns a namer that returns the plural form of the input -// type's name, starting with a uppercase letter. -func NewPublicPluralNamer(exceptions map[string]string) *pluralNamer { - return &pluralNamer{exceptions, IC} -} - -// NewPrivatePluralNamer returns a namer that returns the plural form of the input -// type's name, starting with a lowercase letter. -func NewPrivatePluralNamer(exceptions map[string]string) *pluralNamer { - return &pluralNamer{exceptions, IL} -} - -// NewAllLowercasePluralNamer returns a namer that returns the plural form of the input -// type's name, with all letters in lowercase. -func NewAllLowercasePluralNamer(exceptions map[string]string) *pluralNamer { - return &pluralNamer{exceptions, strings.ToLower} -} - -// Name returns the plural form of the type's name. If the type's name is found -// in the exceptions map, the map value is returned. -func (r *pluralNamer) Name(t *types.Type) string { - singular := t.Name.Name - var plural string - var ok bool - if plural, ok = r.exceptions[singular]; ok { - return r.finalize(plural) - } - if len(singular) < 2 { - return r.finalize(singular) - } - - switch rune(singular[len(singular)-1]) { - case 's', 'x', 'z': - plural = esPlural(singular) - case 'y': - sl := rune(singular[len(singular)-2]) - if isConsonant(sl) { - plural = iesPlural(singular) - } else { - plural = sPlural(singular) - } - case 'h': - sl := rune(singular[len(singular)-2]) - if sl == 'c' || sl == 's' { - plural = esPlural(singular) - } else { - plural = sPlural(singular) - } - case 'e': - sl := rune(singular[len(singular)-2]) - if sl == 'f' { - plural = vesPlural(singular[:len(singular)-1]) - } else { - plural = sPlural(singular) - } - case 'f': - plural = vesPlural(singular) - default: - plural = sPlural(singular) - } - return r.finalize(plural) -} - -func iesPlural(singular string) string { - return singular[:len(singular)-1] + "ies" -} - -func vesPlural(singular string) string { - return singular[:len(singular)-1] + "ves" -} - -func esPlural(singular string) string { - return singular + "es" -} - -func sPlural(singular string) string { - return singular + "s" -} - -func isConsonant(char rune) bool { - for _, c := range consonants { - if char == c { - return true - } - } - return false -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/parser/doc.go b/pkg/k8s/vendor/k8s.io/gengo/parser/doc.go deleted file mode 100644 index 8231b6d4320..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/parser/doc.go +++ /dev/null @@ -1,19 +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 parser provides code to parse go files, type-check them, extract the -// types. -package parser // import "k8s.io/gengo/parser" diff --git a/pkg/k8s/vendor/k8s.io/gengo/parser/parse.go b/pkg/k8s/vendor/k8s.io/gengo/parser/parse.go deleted file mode 100644 index bbd719295e6..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/parser/parse.go +++ /dev/null @@ -1,925 +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 parser - -import ( - "fmt" - "go/ast" - "go/build" - "go/constant" - "go/parser" - "go/token" - tc "go/types" - "io/ioutil" - "os" - "os/exec" - "path" - "path/filepath" - "regexp" - "sort" - "strings" - - "k8s.io/gengo/types" - "k8s.io/klog/v2" -) - -// This clarifies when a pkg path has been canonicalized. -type importPathString string - -// Builder lets you add all the go files in all the packages that you care -// about, then constructs the type source data. -type Builder struct { - context *build.Context - - // If true, include *_test.go - IncludeTestFiles bool - - // Map of package names to more canonical information about the package. - // This might hold the same value for multiple names, e.g. if someone - // referenced ./pkg/name or in the case of vendoring, which canonicalizes - // differently that what humans would type. - // - // This must only be accessed via getLoadedBuildPackage and setLoadedBuildPackage - buildPackages map[importPathString]*build.Package - - fset *token.FileSet - // map of package path to list of parsed files - parsed map[importPathString][]parsedFile - // map of package path to absolute path (to prevent overlap) - absPaths map[importPathString]string - - // Set by typeCheckPackage(), used by importPackage() and friends. - typeCheckedPackages map[importPathString]*tc.Package - - // Map of package path to whether the user requested it or it was from - // an import. - userRequested map[importPathString]bool - - // All comments from everywhere in every parsed file. - endLineToCommentGroup map[fileLine]*ast.CommentGroup - - // map of package to list of packages it imports. - importGraph map[importPathString]map[string]struct{} -} - -// parsedFile is for tracking files with name -type parsedFile struct { - name string - file *ast.File -} - -// key type for finding comments. -type fileLine struct { - file string - line int -} - -// New constructs a new builder. -func New() *Builder { - c := build.Default - if c.GOROOT == "" { - if p, err := exec.Command("which", "go").CombinedOutput(); err == nil { - // The returned string will have some/path/bin/go, so remove the last two elements. - c.GOROOT = filepath.Dir(filepath.Dir(strings.Trim(string(p), "\n"))) - } else { - klog.Warningf("Warning: $GOROOT not set, and unable to run `which go` to find it: %v\n", err) - } - } - // Force this to off, since we don't properly parse CGo. All symbols must - // have non-CGo equivalents. - c.CgoEnabled = false - return &Builder{ - context: &c, - buildPackages: map[importPathString]*build.Package{}, - typeCheckedPackages: map[importPathString]*tc.Package{}, - fset: token.NewFileSet(), - parsed: map[importPathString][]parsedFile{}, - absPaths: map[importPathString]string{}, - userRequested: map[importPathString]bool{}, - endLineToCommentGroup: map[fileLine]*ast.CommentGroup{}, - importGraph: map[importPathString]map[string]struct{}{}, - } -} - -// AddBuildTags adds the specified build tags to the parse context. -func (b *Builder) AddBuildTags(tags ...string) { - b.context.BuildTags = append(b.context.BuildTags, tags...) -} - -func (b *Builder) getLoadedBuildPackage(importPath string) (*build.Package, bool) { - canonicalized := canonicalizeImportPath(importPath) - if string(canonicalized) != importPath { - klog.V(5).Infof("getLoadedBuildPackage: %s normalized to %s", importPath, canonicalized) - } - buildPkg, ok := b.buildPackages[canonicalized] - return buildPkg, ok -} -func (b *Builder) setLoadedBuildPackage(importPath string, buildPkg *build.Package) { - canonicalizedImportPath := canonicalizeImportPath(importPath) - if string(canonicalizedImportPath) != importPath { - klog.V(5).Infof("setLoadedBuildPackage: importPath %s normalized to %s", importPath, canonicalizedImportPath) - } - - canonicalizedBuildPkgImportPath := canonicalizeImportPath(buildPkg.ImportPath) - if string(canonicalizedBuildPkgImportPath) != buildPkg.ImportPath { - klog.V(5).Infof("setLoadedBuildPackage: buildPkg.ImportPath %s normalized to %s", buildPkg.ImportPath, canonicalizedBuildPkgImportPath) - } - - if canonicalizedImportPath != canonicalizedBuildPkgImportPath { - klog.V(5).Infof("setLoadedBuildPackage: normalized importPath (%s) differs from buildPkg.ImportPath (%s)", canonicalizedImportPath, canonicalizedBuildPkgImportPath) - } - b.buildPackages[canonicalizedImportPath] = buildPkg - b.buildPackages[canonicalizedBuildPkgImportPath] = buildPkg -} - -// Get package information from the go/build package. Automatically excludes -// e.g. test files and files for other platforms-- there is quite a bit of -// logic of that nature in the build package. -func (b *Builder) importBuildPackage(dir string) (*build.Package, error) { - if buildPkg, ok := b.getLoadedBuildPackage(dir); ok { - return buildPkg, nil - } - // This validates the `package foo // github.com/bar/foo` comments. - buildPkg, err := b.importWithMode(dir, build.ImportComment) - if err != nil { - if _, ok := err.(*build.NoGoError); !ok { - return nil, fmt.Errorf("unable to import %q: %v", dir, err) - } - } - if buildPkg == nil { - // Might be an empty directory. Try to just find the dir. - buildPkg, err = b.importWithMode(dir, build.FindOnly) - if err != nil { - return nil, err - } - } - - // Remember it under the user-provided name. - klog.V(5).Infof("saving buildPackage %s", dir) - b.setLoadedBuildPackage(dir, buildPkg) - - return buildPkg, nil -} - -// AddFileForTest adds a file to the set, without verifying that the provided -// pkg actually exists on disk. The pkg must be of the form "canonical/pkg/path" -// and the path must be the absolute path to the file. Because this bypasses -// the normal recursive finding of package dependencies (on disk), test should -// sort their test files topologically first, so all deps are resolved by the -// time we need them. -func (b *Builder) AddFileForTest(pkg string, path string, src []byte) error { - if err := b.addFile(importPathString(pkg), path, src, true); err != nil { - return err - } - if _, err := b.typeCheckPackage(importPathString(pkg), true); err != nil { - return err - } - return nil -} - -// addFile adds a file to the set. The pkgPath must be of the form -// "canonical/pkg/path" and the path must be the absolute path to the file. A -// flag indicates whether this file was user-requested or just from following -// the import graph. -func (b *Builder) addFile(pkgPath importPathString, path string, src []byte, userRequested bool) error { - for _, p := range b.parsed[pkgPath] { - if path == p.name { - klog.V(5).Infof("addFile %s %s already parsed, skipping", pkgPath, path) - return nil - } - } - klog.V(6).Infof("addFile %s %s", pkgPath, path) - p, err := parser.ParseFile(b.fset, path, src, parser.DeclarationErrors|parser.ParseComments) - if err != nil { - return err - } - - // This is redundant with addDir, but some tests call AddFileForTest, which - // call into here without calling addDir. - b.userRequested[pkgPath] = userRequested || b.userRequested[pkgPath] - - b.parsed[pkgPath] = append(b.parsed[pkgPath], parsedFile{path, p}) - for _, c := range p.Comments { - position := b.fset.Position(c.End()) - b.endLineToCommentGroup[fileLine{position.Filename, position.Line}] = c - } - - // We have to get the packages from this specific file, in case the - // user added individual files instead of entire directories. - if b.importGraph[pkgPath] == nil { - b.importGraph[pkgPath] = map[string]struct{}{} - } - for _, im := range p.Imports { - importedPath := strings.Trim(im.Path.Value, `"`) - b.importGraph[pkgPath][importedPath] = struct{}{} - } - return nil -} - -// AddDir adds an entire directory, scanning it for go files. 'dir' should have -// a single go package in it. GOPATH, GOROOT, and the location of your go -// binary (`which go`) will all be searched if dir doesn't literally resolve. -func (b *Builder) AddDir(dir string) error { - _, err := b.importPackage(dir, true) - return err -} - -// AddDirRecursive is just like AddDir, but it also recursively adds -// subdirectories; it returns an error only if the path couldn't be resolved; -// any directories recursed into without go source are ignored. -func (b *Builder) AddDirRecursive(dir string) error { - // Add the root. - if _, err := b.importPackage(dir, true); err != nil { - klog.Warningf("Ignoring directory %v: %v", dir, err) - } - - // filepath.Walk does not follow symlinks. We therefore evaluate symlinks and use that with - // filepath.Walk. - buildPkg, ok := b.getLoadedBuildPackage(dir) - if !ok { - return fmt.Errorf("no loaded build package for %s", dir) - } - realPath, err := filepath.EvalSymlinks(buildPkg.Dir) - if err != nil { - return err - } - - fn := func(filePath string, info os.FileInfo, err error) error { - if info != nil && info.IsDir() { - rel := filepath.ToSlash(strings.TrimPrefix(filePath, realPath)) - if rel != "" { - // Make a pkg path. - buildPkg, ok := b.getLoadedBuildPackage(dir) - if !ok { - return fmt.Errorf("no loaded build package for %s", dir) - } - pkg := path.Join(string(canonicalizeImportPath(buildPkg.ImportPath)), rel) - - // Add it. - if _, err := b.importPackage(pkg, true); err != nil { - klog.Warningf("Ignoring child directory %v: %v", pkg, err) - } - } - } - return nil - } - if err := filepath.Walk(realPath, fn); err != nil { - return err - } - return nil -} - -// AddDirTo adds an entire directory to a given Universe. Unlike AddDir, this -// processes the package immediately, which makes it safe to use from within a -// generator (rather than just at init time. 'dir' must be a single go package. -// GOPATH, GOROOT, and the location of your go binary (`which go`) will all be -// searched if dir doesn't literally resolve. -// Deprecated. Please use AddDirectoryTo. -func (b *Builder) AddDirTo(dir string, u *types.Universe) error { - // We want all types from this package, as if they were directly added - // by the user. They WERE added by the user, in effect. - if _, err := b.importPackage(dir, true); err != nil { - return err - } - pkg, ok := b.getLoadedBuildPackage(dir) - if !ok { - return fmt.Errorf("no such package: %q", dir) - } - return b.findTypesIn(canonicalizeImportPath(pkg.ImportPath), u) -} - -// AddDirectoryTo adds an entire directory to a given Universe. Unlike AddDir, -// this processes the package immediately, which makes it safe to use from -// within a generator (rather than just at init time. 'dir' must be a single go -// package. GOPATH, GOROOT, and the location of your go binary (`which go`) -// will all be searched if dir doesn't literally resolve. -func (b *Builder) AddDirectoryTo(dir string, u *types.Universe) (*types.Package, error) { - // We want all types from this package, as if they were directly added - // by the user. They WERE added by the user, in effect. - if _, err := b.importPackage(dir, true); err != nil { - return nil, err - } - pkg, ok := b.getLoadedBuildPackage(dir) - if !ok || pkg == nil { - return nil, fmt.Errorf("no such package: %q", dir) - } - path := canonicalizeImportPath(pkg.ImportPath) - if err := b.findTypesIn(path, u); err != nil { - return nil, err - } - return u.Package(string(path)), nil -} - -// The implementation of AddDir. A flag indicates whether this directory was -// user-requested or just from following the import graph. -func (b *Builder) addDir(dir string, userRequested bool) error { - klog.V(5).Infof("addDir %s", dir) - buildPkg, err := b.importBuildPackage(dir) - if err != nil { - return err - } - canonicalPackage := canonicalizeImportPath(buildPkg.ImportPath) - pkgPath := canonicalPackage - if dir != string(canonicalPackage) { - klog.V(5).Infof("addDir %s, canonical path is %s", dir, pkgPath) - } - - // Sanity check the pkg dir has not changed. - if prev, found := b.absPaths[pkgPath]; found { - if buildPkg.Dir != prev { - return fmt.Errorf("package %q (%s) previously resolved to %s", pkgPath, buildPkg.Dir, prev) - } - } else { - b.absPaths[pkgPath] = buildPkg.Dir - } - - files := []string{} - files = append(files, buildPkg.GoFiles...) - if b.IncludeTestFiles { - files = append(files, buildPkg.TestGoFiles...) - } - - for _, file := range files { - if !strings.HasSuffix(file, ".go") { - continue - } - absPath := filepath.Join(buildPkg.Dir, file) - data, err := ioutil.ReadFile(absPath) - if err != nil { - return fmt.Errorf("while loading %q: %v", absPath, err) - } - err = b.addFile(pkgPath, absPath, data, userRequested) - if err != nil { - return fmt.Errorf("while parsing %q: %v", absPath, err) - } - } - return nil -} - -// regexErrPackageNotFound helps test the expected error for not finding a package. -var regexErrPackageNotFound = regexp.MustCompile(`^unable to import ".*?":.*`) - -func isErrPackageNotFound(err error) bool { - return regexErrPackageNotFound.MatchString(err.Error()) -} - -// importPackage is a function that will be called by the type check package when it -// needs to import a go package. 'path' is the import path. -func (b *Builder) importPackage(dir string, userRequested bool) (*tc.Package, error) { - klog.V(5).Infof("importPackage %s", dir) - - var pkgPath = importPathString(dir) - - // Get the canonical path if we can. - if buildPkg, _ := b.getLoadedBuildPackage(dir); buildPkg != nil { - canonicalPackage := canonicalizeImportPath(buildPkg.ImportPath) - klog.V(5).Infof("importPackage %s, canonical path is %s", dir, canonicalPackage) - pkgPath = canonicalPackage - } - - // If we have not seen this before, process it now. - ignoreError := false - if _, found := b.parsed[pkgPath]; !found { - // Ignore errors in paths that we're importing solely because - // they're referenced by other packages. - ignoreError = true - - // Add it. - if err := b.addDir(dir, userRequested); err != nil { - if isErrPackageNotFound(err) { - klog.V(6).Info(err) - return nil, nil - } - - return nil, err - } - - // Get the canonical path now that it has been added. - if buildPkg, _ := b.getLoadedBuildPackage(dir); buildPkg != nil { - canonicalPackage := canonicalizeImportPath(buildPkg.ImportPath) - klog.V(5).Infof("importPackage %s, canonical path is %s", dir, canonicalPackage) - pkgPath = canonicalPackage - } - } - - // If it was previously known, just check that the user-requestedness hasn't - // changed. - b.userRequested[pkgPath] = userRequested || b.userRequested[pkgPath] - - // Run the type checker. We may end up doing this to pkgs that are already - // done, or are in the queue to be done later, but it will short-circuit, - // and we can't miss pkgs that are only depended on. - pkg, err := b.typeCheckPackage(pkgPath, !ignoreError) - if err != nil { - switch { - case ignoreError && pkg != nil: - klog.V(4).Infof("type checking encountered some issues in %q, but ignoring.\n", pkgPath) - case !ignoreError && pkg != nil: - klog.V(3).Infof("type checking encountered some errors in %q\n", pkgPath) - return nil, err - default: - return nil, err - } - } - - return pkg, nil -} - -type importAdapter struct { - b *Builder -} - -func (a importAdapter) Import(path string) (*tc.Package, error) { - return a.b.importPackage(path, false) -} - -// typeCheckPackage will attempt to return the package even if there are some -// errors, so you may check whether the package is nil or not even if you get -// an error. -func (b *Builder) typeCheckPackage(pkgPath importPathString, logErr bool) (*tc.Package, error) { - klog.V(5).Infof("typeCheckPackage %s", pkgPath) - if pkg, ok := b.typeCheckedPackages[pkgPath]; ok { - if pkg != nil { - klog.V(6).Infof("typeCheckPackage %s already done", pkgPath) - return pkg, nil - } - // We store a nil right before starting work on a package. So - // if we get here and it's present and nil, that means there's - // another invocation of this function on the call stack - // already processing this package. - return nil, fmt.Errorf("circular dependency for %q", pkgPath) - } - parsedFiles, ok := b.parsed[pkgPath] - if !ok { - return nil, fmt.Errorf("No files for pkg %q", pkgPath) - } - files := make([]*ast.File, len(parsedFiles)) - for i := range parsedFiles { - files[i] = parsedFiles[i].file - } - b.typeCheckedPackages[pkgPath] = nil - c := tc.Config{ - IgnoreFuncBodies: true, - // Note that importAdapter can call b.importPackage which calls this - // method. So there can't be cycles in the import graph. - Importer: importAdapter{b}, - Error: func(err error) { - if logErr { - klog.V(2).Infof("type checker: %v\n", err) - } else { - klog.V(3).Infof("type checker: %v\n", err) - } - }, - } - pkg, err := c.Check(string(pkgPath), b.fset, files, nil) - b.typeCheckedPackages[pkgPath] = pkg // record the result whether or not there was an error - return pkg, err -} - -// FindPackages fetches a list of the user-imported packages. -// Note that you need to call b.FindTypes() first. -func (b *Builder) FindPackages() []string { - // Iterate packages in a predictable order. - pkgPaths := []string{} - for k := range b.typeCheckedPackages { - pkgPaths = append(pkgPaths, string(k)) - } - sort.Strings(pkgPaths) - - result := []string{} - for _, pkgPath := range pkgPaths { - if b.userRequested[importPathString(pkgPath)] { - // Since walkType is recursive, all types that are in packages that - // were directly mentioned will be included. We don't need to - // include all types in all transitive packages, though. - result = append(result, pkgPath) - } - } - return result -} - -// FindTypes finalizes the package imports, and searches through all the -// packages for types. -func (b *Builder) FindTypes() (types.Universe, error) { - // Take a snapshot of pkgs to iterate, since this will recursively mutate - // b.parsed. Iterate in a predictable order. - pkgPaths := []string{} - for pkgPath := range b.parsed { - pkgPaths = append(pkgPaths, string(pkgPath)) - } - sort.Strings(pkgPaths) - - u := types.Universe{} - for _, pkgPath := range pkgPaths { - if err := b.findTypesIn(importPathString(pkgPath), &u); err != nil { - return nil, err - } - } - return u, nil -} - -// addCommentsToType takes any accumulated comment lines prior to obj and -// attaches them to the type t. -func (b *Builder) addCommentsToType(obj tc.Object, t *types.Type) { - c1 := b.priorCommentLines(obj.Pos(), 1) - // c1.Text() is safe if c1 is nil - t.CommentLines = splitLines(c1.Text()) - if c1 == nil { - t.SecondClosestCommentLines = splitLines(b.priorCommentLines(obj.Pos(), 2).Text()) - } else { - t.SecondClosestCommentLines = splitLines(b.priorCommentLines(c1.List[0].Slash, 2).Text()) - } -} - -// findTypesIn finalizes the package import and searches through the package -// for types. -func (b *Builder) findTypesIn(pkgPath importPathString, u *types.Universe) error { - klog.V(5).Infof("findTypesIn %s", pkgPath) - pkg := b.typeCheckedPackages[pkgPath] - if pkg == nil { - return fmt.Errorf("findTypesIn(%s): package is not known", pkgPath) - } - if !b.userRequested[pkgPath] { - // Since walkType is recursive, all types that the - // packages they asked for depend on will be included. - // But we don't need to include all types in all - // *packages* they depend on. - klog.V(5).Infof("findTypesIn %s: package is not user requested", pkgPath) - return nil - } - - // We're keeping this package. This call will create the record. - u.Package(string(pkgPath)).Name = pkg.Name() - u.Package(string(pkgPath)).Path = pkg.Path() - u.Package(string(pkgPath)).SourcePath = b.absPaths[pkgPath] - - for _, f := range b.parsed[pkgPath] { - if _, fileName := filepath.Split(f.name); fileName == "doc.go" { - tp := u.Package(string(pkgPath)) - // findTypesIn might be called multiple times. Clean up tp.Comments - // to avoid repeatedly fill same comments to it. - tp.Comments = []string{} - for i := range f.file.Comments { - tp.Comments = append(tp.Comments, splitLines(f.file.Comments[i].Text())...) - } - if f.file.Doc != nil { - tp.DocComments = splitLines(f.file.Doc.Text()) - } - } - } - - s := pkg.Scope() - for _, n := range s.Names() { - obj := s.Lookup(n) - tn, ok := obj.(*tc.TypeName) - if ok { - t := b.walkType(*u, nil, tn.Type()) - b.addCommentsToType(obj, t) - } - tf, ok := obj.(*tc.Func) - // We only care about functions, not concrete/abstract methods. - if ok && tf.Type() != nil && tf.Type().(*tc.Signature).Recv() == nil { - t := b.addFunction(*u, nil, tf) - b.addCommentsToType(obj, t) - } - tv, ok := obj.(*tc.Var) - if ok && !tv.IsField() { - t := b.addVariable(*u, nil, tv) - b.addCommentsToType(obj, t) - } - tconst, ok := obj.(*tc.Const) - if ok { - t := b.addConstant(*u, nil, tconst) - b.addCommentsToType(obj, t) - } - } - - importedPkgs := []string{} - for k := range b.importGraph[pkgPath] { - importedPkgs = append(importedPkgs, string(k)) - } - sort.Strings(importedPkgs) - for _, p := range importedPkgs { - u.AddImports(string(pkgPath), p) - } - return nil -} - -func (b *Builder) importWithMode(dir string, mode build.ImportMode) (*build.Package, error) { - // This is a bit of a hack. The srcDir argument to Import() should - // properly be the dir of the file which depends on the package to be - // imported, so that vendoring can work properly and local paths can - // resolve. We assume that there is only one level of vendoring, and that - // the CWD is inside the GOPATH, so this should be safe. Nobody should be - // using local (relative) paths except on the CLI, so CWD is also - // sufficient. - cwd, err := os.Getwd() - if err != nil { - return nil, fmt.Errorf("unable to get current directory: %v", err) - } - - // normalize to drop /vendor/ if present - dir = string(canonicalizeImportPath(dir)) - - buildPkg, err := b.context.Import(filepath.ToSlash(dir), cwd, mode) - if err != nil { - return nil, err - } - return buildPkg, nil -} - -// if there's a comment on the line `lines` before pos, return its text, otherwise "". -func (b *Builder) priorCommentLines(pos token.Pos, lines int) *ast.CommentGroup { - position := b.fset.Position(pos) - key := fileLine{position.Filename, position.Line - lines} - return b.endLineToCommentGroup[key] -} - -func splitLines(str string) []string { - return strings.Split(strings.TrimRight(str, "\n"), "\n") -} - -func tcFuncNameToName(in string) types.Name { - name := strings.TrimPrefix(in, "func ") - nameParts := strings.Split(name, "(") - return tcNameToName(nameParts[0]) -} - -func tcVarNameToName(in string) types.Name { - nameParts := strings.Split(in, " ") - // nameParts[0] is "var". - // nameParts[2:] is the type of the variable, we ignore it for now. - return tcNameToName(nameParts[1]) -} - -func tcNameToName(in string) types.Name { - // Detect anonymous type names. (These may have '.' characters because - // embedded types may have packages, so we detect them specially.) - if strings.HasPrefix(in, "struct{") || - strings.HasPrefix(in, "<-chan") || - strings.HasPrefix(in, "chan<-") || - strings.HasPrefix(in, "chan ") || - strings.HasPrefix(in, "func(") || - strings.HasPrefix(in, "func (") || - strings.HasPrefix(in, "*") || - strings.HasPrefix(in, "map[") || - strings.HasPrefix(in, "[") { - return types.Name{Name: in} - } - - // Otherwise, if there are '.' characters present, the name has a - // package path in front. - nameParts := strings.Split(in, ".") - name := types.Name{Name: in} - if n := len(nameParts); n >= 2 { - // The final "." is the name of the type--previous ones must - // have been in the package path. - name.Package, name.Name = strings.Join(nameParts[:n-1], "."), nameParts[n-1] - } - return name -} - -func (b *Builder) convertSignature(u types.Universe, t *tc.Signature) *types.Signature { - signature := &types.Signature{} - for i := 0; i < t.Params().Len(); i++ { - signature.Parameters = append(signature.Parameters, b.walkType(u, nil, t.Params().At(i).Type())) - signature.ParameterNames = append(signature.ParameterNames, t.Params().At(i).Name()) - } - for i := 0; i < t.Results().Len(); i++ { - signature.Results = append(signature.Results, b.walkType(u, nil, t.Results().At(i).Type())) - signature.ResultNames = append(signature.ResultNames, t.Results().At(i).Name()) - } - if r := t.Recv(); r != nil { - signature.Receiver = b.walkType(u, nil, r.Type()) - } - signature.Variadic = t.Variadic() - return signature -} - -// walkType adds the type, and any necessary child types. -func (b *Builder) walkType(u types.Universe, useName *types.Name, in tc.Type) *types.Type { - // Most of the cases are underlying types of the named type. - name := tcNameToName(in.String()) - if useName != nil { - name = *useName - } - - switch t := in.(type) { - case *tc.Struct: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Struct - for i := 0; i < t.NumFields(); i++ { - f := t.Field(i) - m := types.Member{ - Name: f.Name(), - Embedded: f.Anonymous(), - Tags: t.Tag(i), - Type: b.walkType(u, nil, f.Type()), - CommentLines: splitLines(b.priorCommentLines(f.Pos(), 1).Text()), - } - out.Members = append(out.Members, m) - } - return out - case *tc.Map: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Map - out.Elem = b.walkType(u, nil, t.Elem()) - out.Key = b.walkType(u, nil, t.Key()) - return out - case *tc.Pointer: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Pointer - out.Elem = b.walkType(u, nil, t.Elem()) - return out - case *tc.Slice: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Slice - out.Elem = b.walkType(u, nil, t.Elem()) - return out - case *tc.Array: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Array - out.Elem = b.walkType(u, nil, t.Elem()) - out.Len = in.(*tc.Array).Len() - return out - case *tc.Chan: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Chan - out.Elem = b.walkType(u, nil, t.Elem()) - // TODO: need to store direction, otherwise raw type name - // cannot be properly written. - return out - case *tc.Basic: - out := u.Type(types.Name{ - Package: "", - Name: t.Name(), - }) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Unsupported - return out - case *tc.Signature: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Func - out.Signature = b.convertSignature(u, t) - return out - case *tc.Interface: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Interface - t.Complete() - for i := 0; i < t.NumMethods(); i++ { - if out.Methods == nil { - out.Methods = map[string]*types.Type{} - } - method := t.Method(i) - name := tcNameToName(method.String()) - mt := b.walkType(u, &name, method.Type()) - mt.CommentLines = splitLines(b.priorCommentLines(method.Pos(), 1).Text()) - out.Methods[method.Name()] = mt - } - return out - case *tc.Named: - var out *types.Type - switch t.Underlying().(type) { - case *tc.Named, *tc.Basic, *tc.Map, *tc.Slice: - name := tcNameToName(t.String()) - out = u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Alias - out.Underlying = b.walkType(u, nil, t.Underlying()) - default: - // tc package makes everything "named" with an - // underlying anonymous type--we remove that annoying - // "feature" for users. This flattens those types - // together. - name := tcNameToName(t.String()) - if out := u.Type(name); out.Kind != types.Unknown { - return out // short circuit if we've already made this. - } - out = b.walkType(u, &name, t.Underlying()) - } - // If the underlying type didn't already add methods, add them. - // (Interface types will have already added methods.) - if len(out.Methods) == 0 { - for i := 0; i < t.NumMethods(); i++ { - if out.Methods == nil { - out.Methods = map[string]*types.Type{} - } - method := t.Method(i) - name := tcNameToName(method.String()) - mt := b.walkType(u, &name, method.Type()) - mt.CommentLines = splitLines(b.priorCommentLines(method.Pos(), 1).Text()) - out.Methods[method.Name()] = mt - } - } - return out - default: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Unsupported - klog.Warningf("Making unsupported type entry %q for: %#v\n", out, t) - return out - } -} - -func (b *Builder) addFunction(u types.Universe, useName *types.Name, in *tc.Func) *types.Type { - name := tcFuncNameToName(in.String()) - if useName != nil { - name = *useName - } - out := u.Function(name) - out.Kind = types.DeclarationOf - out.Underlying = b.walkType(u, nil, in.Type()) - return out -} - -func (b *Builder) addVariable(u types.Universe, useName *types.Name, in *tc.Var) *types.Type { - name := tcVarNameToName(in.String()) - if useName != nil { - name = *useName - } - out := u.Variable(name) - out.Kind = types.DeclarationOf - out.Underlying = b.walkType(u, nil, in.Type()) - return out -} - -func (b *Builder) addConstant(u types.Universe, useName *types.Name, in *tc.Const) *types.Type { - name := tcVarNameToName(in.String()) - if useName != nil { - name = *useName - } - out := u.Constant(name) - out.Kind = types.DeclarationOf - out.Underlying = b.walkType(u, nil, in.Type()) - - var constval string - - // For strings, we use `StringVal()` to get the un-truncated, - // un-quoted string. For other values, `.String()` is preferable to - // get something relatively human readable (especially since for - // floating point types, `ExactString()` will generate numeric - // expressions using `big.(*Float).Text()`. - switch in.Val().Kind() { - case constant.String: - constval = constant.StringVal(in.Val()) - default: - constval = in.Val().String() - } - - out.ConstValue = &constval - return out -} - -// canonicalizeImportPath takes an import path and returns the actual package. -// It doesn't support nested vendoring. -func canonicalizeImportPath(importPath string) importPathString { - if !strings.Contains(importPath, "/vendor/") { - return importPathString(importPath) - } - - return importPathString(importPath[strings.Index(importPath, "/vendor/")+len("/vendor/"):]) -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/types/doc.go b/pkg/k8s/vendor/k8s.io/gengo/types/doc.go deleted file mode 100644 index 74a969a763a..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/types/doc.go +++ /dev/null @@ -1,19 +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 types contains go type information, packaged in a way that makes -// auto-generation convenient, whether by template or straight go functions. -package types // import "k8s.io/gengo/types" diff --git a/pkg/k8s/vendor/k8s.io/gengo/types/flatten.go b/pkg/k8s/vendor/k8s.io/gengo/types/flatten.go deleted file mode 100644 index 585014e8ba0..00000000000 --- a/pkg/k8s/vendor/k8s.io/gengo/types/flatten.go +++ /dev/null @@ -1,57 +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 types - -// FlattenMembers recursively takes any embedded members and puts them in the -// top level, correctly hiding them if the top level hides them. There must not -// be a cycle-- that implies infinite members. -// -// This is useful for e.g. computing all the valid keys in a json struct, -// properly considering any configuration of embedded structs. -func FlattenMembers(m []Member) []Member { - embedded := []Member{} - normal := []Member{} - type nameInfo struct { - top bool - i int - } - names := map[string]nameInfo{} - for i := range m { - if m[i].Embedded && m[i].Type.Kind == Struct { - embedded = append(embedded, m[i]) - } else { - normal = append(normal, m[i]) - names[m[i].Name] = nameInfo{true, len(normal) - 1} - } - } - for i := range embedded { - for _, e := range FlattenMembers(embedded[i].Type.Members) { - if info, found := names[e.Name]; found { - if info.top { - continue - } - if n := normal[info.i]; n.Name == e.Name && n.Type == e.Type { - continue - } - panic("conflicting members") - } - normal = append(normal, e) - names[e.Name] = nameInfo{false, len(normal) - 1} - } - } - return normal -} diff --git a/pkg/k8s/vendor/k8s.io/gengo/LICENSE b/pkg/k8s/vendor/k8s.io/gengo/v2/LICENSE similarity index 100% rename from pkg/k8s/vendor/k8s.io/gengo/LICENSE rename to pkg/k8s/vendor/k8s.io/gengo/v2/LICENSE diff --git a/pkg/k8s/vendor/k8s.io/gengo/v2/README.md b/pkg/k8s/vendor/k8s.io/gengo/v2/README.md new file mode 100644 index 00000000000..79d1070d15f --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/README.md @@ -0,0 +1,53 @@ +[![GoDoc Widget]][GoDoc] [![GoReport]][GoReportStatus] + +[GoDoc]: https://godoc.org/k8s.io/gengo +[GoDoc Widget]: https://godoc.org/k8s.io/gengo?status.svg +[GoReport]: https://goreportcard.com/badge/github.com/kubernetes/gengo +[GoReportStatus]: https://goreportcard.com/report/github.com/kubernetes/gengo + +# Gengo: a framework for building simple code generators + +This repo is used by Kubernetes to build some codegen tooling. It is not +intended to be general-purpose and makes some assumptions that may not hold +outside of Kubernetes. + +In the past this repo was partially supported for external use (outside of the +Kubernetes project overall), but that is no longer true. We may change the API +in incompatible ways, without warning. + +If you are not building something that is part of Kubernetes, DO NOT DEPEND ON +THIS REPO. + +## New usage within Kubernetes + +Gengo is a very opinionated framework. It is primarily aimed at generating Go +code derived from types defined in other Go code, but it is possible to use it +for other things (e.g. proto files). Net new tools should consider using +`golang.org/x/tools/go/packages` directly. Gengo can serve as an example of +how to do that. + +If you still decide you want to use gengo, see the +[simple examples](./examples) in this repo or the more extensive tools in the +Kubernetes [code-generator](https://github.com/kubernetes/code-generator/) +repo. + +## Overview + +Gengo is used to build tools (generally a tool is a binary). Each tool +describes some number of `Targets`. A target is a single output package, which +may be the same as the inputs (if the tool generates code alongside the inputs) +or different. Each `Target` describes some number of `Generators`. A +generator is responsible for emitting a single file into the target directory. + +Gengo helps the tool to load and process input packages, e.g. extracting type +information and associating comments. Each target will be offered every known +type, and can filter that down to the set of types it cares about. Each +generator will be offered the result of the target's filtering, and can filter +the set of types further. Finally, the generator will be called to emit code +for all of the remaining types. + +The `tracer` example in this repo can be used to examine all of the hooks. + +## Contributing + +Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute. diff --git a/pkg/k8s/vendor/k8s.io/gengo/types/comments.go b/pkg/k8s/vendor/k8s.io/gengo/v2/comments.go similarity index 86% rename from pkg/k8s/vendor/k8s.io/gengo/types/comments.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/comments.go index 8150c383875..ba49c432be7 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/types/comments.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/comments.go @@ -14,9 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package types contains go type information, packaged in a way that makes -// auto-generation convenient, whether by template or straight go functions. -package types +package gengo import ( "fmt" @@ -25,7 +23,7 @@ import ( // ExtractCommentTags parses comments for lines of the form: // -// 'marker' + "key=value". +// 'marker' + "key=value". // // Values are optional; "" is the default. A tag can be specified more than // one time and all values are returned. If the resulting map has an entry for @@ -33,12 +31,15 @@ import ( // // Example: if you pass "+" for 'marker', and the following lines are in // the comments: -// +foo=value1 -// +bar -// +foo=value2 -// +baz="qux" +// +// +foo=value1 +// +bar +// +foo=value2 +// +baz="qux" +// // Then this function will return: -// map[string][]string{"foo":{"value1, "value2"}, "bar": {""}, "baz": {"qux"}} +// +// map[string][]string{"foo":{"value1, "value2"}, "bar": {""}, "baz": {"qux"}} func ExtractCommentTags(marker string, lines []string) map[string][]string { out := map[string][]string{} for _, line := range lines { @@ -62,7 +63,7 @@ func ExtractCommentTags(marker string, lines []string) map[string][]string { // ExtractSingleBoolCommentTag parses comments for lines of the form: // -// 'marker' + "key=value1" +// 'marker' + "key=value1" // // If the tag is not found, the default value is returned. Values are asserted // to be boolean ("true" or "false"), and any other value will cause an error diff --git a/pkg/k8s/vendor/k8s.io/gengo/v2/execute.go b/pkg/k8s/vendor/k8s.io/gengo/v2/execute.go new file mode 100644 index 00000000000..c4aba2b1134 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/execute.go @@ -0,0 +1,98 @@ +/* +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 gengo is a code-generation framework. +package gengo + +import ( + "bytes" + "fmt" + "os" + "path/filepath" + "strconv" + "strings" + "time" + + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/parser" +) + +// StdBuildTag is a suggested build-tag which tools can use both as an argument +// to GoBoilerplate and to Execute. +const StdBuildTag = "ignore_autogenerated" + +// StdGeneratedBy is a suggested "generated by" line which tools can use as an +// argument to GoBoilerplate. +const StdGeneratedBy = "// Code generated by GENERATOR_NAME. DO NOT EDIT." + +// GoBoilerplate returns the Go file header: +// - an optional build tag (negative, set it to ignore generated code) +// - an optional boilerplate file +// - an optional "generated by" comment +func GoBoilerplate(headerFile, buildTag, generatedBy string) ([]byte, error) { + buf := bytes.Buffer{} + + if buildTag != "" { + buf.WriteString( + fmt.Sprintf("//go:build !%s\n// +build !%s\n\n", buildTag, buildTag)) + } + + if headerFile != "" { + b, err := os.ReadFile(headerFile) + if err != nil { + return nil, err + } + b = bytes.ReplaceAll(b, []byte("YEAR"), []byte(strconv.Itoa(time.Now().UTC().Year()))) + buf.Write(b) + buf.WriteByte('\n') + } + + if generatedBy != "" { + generatorName := filepath.Base(os.Args[0]) + // Strip the extension from the name to normalize output between *nix and Windows. + generatorName = generatorName[:len(generatorName)-len(filepath.Ext(generatorName))] + generatedByComment := strings.ReplaceAll(generatedBy, "GENERATOR_NAME", generatorName) + buf.WriteString(fmt.Sprintf("%s\n\n", generatedByComment)) + } + + return buf.Bytes(), nil +} + +// Execute implements most of a tool's main loop. +func Execute(nameSystems namer.NameSystems, defaultSystem string, getTargets func(*generator.Context) []generator.Target, buildTag string, patterns []string) error { + var buildTags []string + if buildTag != "" { + buildTags = append(buildTags, buildTag) + } + + p := parser.NewWithOptions(parser.Options{BuildTags: buildTags}) + if err := p.LoadPackages(patterns...); err != nil { + return fmt.Errorf("failed making a parser: %v", err) + } + + c, err := generator.NewContext(p, nameSystems, defaultSystem) + if err != nil { + return fmt.Errorf("failed making a context: %v", err) + } + + targets := getTargets(c) + if err := c.ExecuteTargets(targets); err != nil { + return fmt.Errorf("failed executing generator: %v", err) + } + + return nil +} diff --git a/pkg/k8s/vendor/k8s.io/gengo/generator/doc.go b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/doc.go similarity index 96% rename from pkg/k8s/vendor/k8s.io/gengo/generator/doc.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/generator/doc.go index d8e12534a44..ef0031cd6b6 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/generator/doc.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/doc.go @@ -28,4 +28,4 @@ limitations under the License. // package. Additionally, all naming systems in the Context will be added as // functions to the parsed template, so that they can be called directly from // your templates! -package generator // import "k8s.io/gengo/generator" +package generator // import "k8s.io/gengo/v2/generator" diff --git a/pkg/k8s/vendor/k8s.io/gengo/generator/error_tracker.go b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/error_tracker.go similarity index 100% rename from pkg/k8s/vendor/k8s.io/gengo/generator/error_tracker.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/generator/error_tracker.go diff --git a/pkg/k8s/vendor/k8s.io/gengo/generator/execute.go b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/execute.go similarity index 54% rename from pkg/k8s/vendor/k8s.io/gengo/generator/execute.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/generator/execute.go index f096741bc86..02b4c3318a6 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/generator/execute.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/execute.go @@ -18,42 +18,31 @@ package generator import ( "bytes" + "errors" "fmt" "io" - "io/ioutil" "os" "path/filepath" "strings" "golang.org/x/tools/imports" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) -func errs2strings(errors []error) []string { - strs := make([]string, len(errors)) - for i := range errors { - strs[i] = errors[i].Error() - } - return strs -} +// ExecuteTargets runs the generators for the provided targets. +func (c *Context) ExecuteTargets(targets []Target) error { + klog.V(5).Infof("ExecuteTargets: %d targets", len(targets)) -// ExecutePackages runs the generators for every package in 'packages'. 'outDir' -// is the base directory in which to place all the generated packages; it -// should be a physical path on disk, not an import path. e.g.: -// /path/to/home/path/to/gopath/src/ -// Each package has its import path already, this will be appended to 'outDir'. -func (c *Context) ExecutePackages(outDir string, packages Packages) error { - var errors []error - for _, p := range packages { - if err := c.ExecutePackage(outDir, p); err != nil { - errors = append(errors, err) + var errs []error + for _, tgt := range targets { + if err := c.ExecuteTarget(tgt); err != nil { + errs = append(errs, err) } } - if len(errors) > 0 { - return fmt.Errorf("some packages had errors:\n%v\n", strings.Join(errs2strings(errors), "\n")) + if len(errs) > 0 { + return fmt.Errorf("some targets had errors: %w", errors.Join(errs...)) } return nil } @@ -65,6 +54,7 @@ type DefaultFileType struct { func (ft DefaultFileType) AssembleFile(f *File, pathname string) error { klog.V(5).Infof("Assembling file %q", pathname) + destFile, err := os.Create(pathname) if err != nil { return err @@ -78,7 +68,7 @@ func (ft DefaultFileType) AssembleFile(f *File, pathname string) error { return et.Error() } if formatted, err := ft.Format(b.Bytes()); err != nil { - err = fmt.Errorf("unable to format file %q (%v).", pathname, err) + err = fmt.Errorf("unable to format file %q (%v)", pathname, err) // Write the file anyway, so they can see what's going wrong and fix the generator. if _, err2 := destFile.Write(b.Bytes()); err2 != nil { return err2 @@ -90,42 +80,7 @@ func (ft DefaultFileType) AssembleFile(f *File, pathname string) error { } } -func (ft DefaultFileType) VerifyFile(f *File, pathname string) error { - klog.V(5).Infof("Verifying file %q", pathname) - friendlyName := filepath.Join(f.PackageName, f.Name) - b := &bytes.Buffer{} - et := NewErrorTracker(b) - ft.Assemble(et, f) - if et.Error() != nil { - return et.Error() - } - formatted, err := ft.Format(b.Bytes()) - if err != nil { - return fmt.Errorf("unable to format the output for %q: %v", friendlyName, err) - } - existing, err := ioutil.ReadFile(pathname) - if err != nil { - return fmt.Errorf("unable to read file %q for comparison: %v", friendlyName, err) - } - if bytes.Compare(formatted, existing) == 0 { - return nil - } - // Be nice and find the first place where they differ - i := 0 - for i < len(formatted) && i < len(existing) && formatted[i] == existing[i] { - i++ - } - eDiff, fDiff := existing[i:], formatted[i:] - if len(eDiff) > 100 { - eDiff = eDiff[:100] - } - if len(fDiff) > 100 { - fDiff = fDiff[:100] - } - return fmt.Errorf("output for %q differs; first existing/expected diff: \n %q\n %q", friendlyName, string(eDiff), string(fDiff)) -} - -func assembleGolangFile(w io.Writer, f *File) { +func assembleGoFile(w io.Writer, f *File) { w.Write(f.Header) fmt.Fprintf(w, "package %v\n\n", f.PackageName) @@ -162,10 +117,10 @@ func importsWrapper(src []byte) ([]byte, error) { return imports.Process("", src, nil) } -func NewGolangFile() *DefaultFileType { +func NewGoFile() *DefaultFileType { return &DefaultFileType{ Format: importsWrapper, - Assemble: assembleGolangFile, + Assemble: assembleGoFile, } } @@ -208,33 +163,23 @@ func (c *Context) addNameSystems(namers namer.NameSystems) *Context { return &c2 } -// ExecutePackage executes a single package. 'outDir' is the base directory in -// which to place the package; it should be a physical path on disk, not an -// import path. e.g.: '/path/to/home/path/to/gopath/src/' The package knows its -// import path already, this will be appended to 'outDir'. -func (c *Context) ExecutePackage(outDir string, p Package) error { - path := filepath.Join(outDir, p.Path()) +// ExecuteTarget runs the generators for a single target. +func (c *Context) ExecuteTarget(tgt Target) error { + tgtDir := tgt.Dir() + if tgtDir == "" { + return fmt.Errorf("no directory for target %s", tgt.Path()) + } + klog.V(5).Infof("Executing target %q (%q)", tgt.Name(), tgtDir) - // When working outside of GOPATH, we typically won't want to generate the - // full path for a package. For example, if our current project's root/base - // package is github.com/foo/bar, outDir=., p.Path()=github.com/foo/bar/generated, - // then we really want to be writing files to ./generated, not ./github.com/foo/bar/generated. - // The following will trim a path prefix (github.com/foo/bar) from p.Path() to arrive at - // a relative path that works with projects not in GOPATH. - if c.TrimPathPrefix != "" { - separator := string(filepath.Separator) - if !strings.HasSuffix(c.TrimPathPrefix, separator) { - c.TrimPathPrefix += separator - } + // Filter out any types the *package* doesn't care about. + packageContext := c.filteredBy(tgt.Filter) - path = strings.TrimPrefix(path, c.TrimPathPrefix) + if err := os.MkdirAll(tgtDir, 0755); err != nil { + return err } - klog.V(5).Infof("Processing package %q, disk location %q", p.Name(), path) - // Filter out any types the *package* doesn't care about. - packageContext := c.filteredBy(p.Filter) - os.MkdirAll(path, 0755) + files := map[string]*File{} - for _, g := range p.Generators(packageContext) { + for _, g := range tgt.Generators(packageContext) { // Filter out types the *generator* doesn't care about. genContext := packageContext.filteredBy(g.Filter) // Now add any extra name systems defined by this generator @@ -248,19 +193,17 @@ func (c *Context) ExecutePackage(outDir string, p Package) error { if f == nil { // This is the first generator to reference this file, so start it. f = &File{ - Name: g.Filename(), - FileType: fileType, - PackageName: p.Name(), - PackagePath: p.Path(), - PackageSourcePath: p.SourcePath(), - Header: p.Header(g.Filename()), - Imports: map[string]struct{}{}, + Name: g.Filename(), + FileType: fileType, + PackageName: tgt.Name(), + PackagePath: tgt.Path(), + PackageDir: tgt.Dir(), + Header: tgt.Header(g.Filename()), + Imports: map[string]struct{}{}, } files[f.Name] = f - } else { - if f.FileType != g.FileType() { - return fmt.Errorf("file %q already has type %q, but generator %q wants to use type %q", f.Name, f.FileType, g.Name(), g.FileType()) - } + } else if f.FileType != g.FileType() { + return fmt.Errorf("file %q already has type %q, but generator %q wants to use type %q", f.Name, f.FileType, g.Name(), g.FileType()) } if vars := g.PackageVars(genContext); len(vars) > 0 { @@ -289,25 +232,19 @@ func (c *Context) ExecutePackage(outDir string, p Package) error { } } - var errors []error + var errs []error for _, f := range files { - finalPath := filepath.Join(path, f.Name) + finalPath := filepath.Join(tgtDir, f.Name) assembler, ok := c.FileTypes[f.FileType] if !ok { return fmt.Errorf("the file type %q registered for file %q does not exist in the context", f.FileType, f.Name) } - var err error - if c.Verify { - err = assembler.VerifyFile(f, finalPath) - } else { - err = assembler.AssembleFile(f, finalPath) - } - if err != nil { - errors = append(errors, err) + if err := assembler.AssembleFile(f, finalPath); err != nil { + errs = append(errs, err) } } - if len(errors) > 0 { - return fmt.Errorf("errors in package %q:\n%v\n", p.Path(), strings.Join(errs2strings(errors), "\n")) + if len(errs) > 0 { + return fmt.Errorf("errors in target %q: %w", tgt.Path(), errors.Join(errs...)) } return nil } diff --git a/vendor/k8s.io/gengo/generator/generator.go b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/generator.go similarity index 63% rename from vendor/k8s.io/gengo/generator/generator.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/generator/generator.go index 5614ae3b322..7dfb1b2beca 100644 --- a/vendor/k8s.io/gengo/generator/generator.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/generator.go @@ -20,19 +20,22 @@ import ( "bytes" "io" - "k8s.io/gengo/namer" - "k8s.io/gengo/parser" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/parser" + "k8s.io/gengo/v2/types" ) -// Package contains the contract for generating a package. -type Package interface { - // Name returns the package short name. +// Target describes a Go package into which code will be generated. A single +// Target may have many Generators, each of which emits one file. +type Target interface { + // Name returns the package short name (as in `package foo`). Name() string - // Path returns the package import path. + // Path returns the package import path (as in `import "example.com/foo"`). Path() string - // SourcePath returns the location of the package on disk. - SourcePath() string + // Dir returns the location of the resulting package on disk. This may be + // the same directory as an input package (when generating code in-place) + // or a different directory entirely. + Dir() string // Filter should return true if this package cares about this type. // Otherwise, this type will be omitted from the type ordering for @@ -52,26 +55,22 @@ type Package interface { } type File struct { - Name string - FileType string - PackageName string - Header []byte - PackagePath string - PackageSourcePath string - Imports map[string]struct{} - Vars bytes.Buffer - Consts bytes.Buffer - Body bytes.Buffer + Name string + FileType string + PackageName string + Header []byte + PackagePath string + PackageDir string + Imports map[string]struct{} + Vars bytes.Buffer + Consts bytes.Buffer + Body bytes.Buffer } type FileType interface { AssembleFile(f *File, path string) error - VerifyFile(f *File, path string) error } -// Packages is a list of packages to generate. -type Packages []Package - // Generator is the contract for anything that wants to do auto-generation. // It's expected that the io.Writers passed to the below functions will be // ErrorTrackers; this allows implementations to not check for io errors, @@ -110,7 +109,7 @@ type Generator interface { // Init should write an init function, and any other content that's not // generated per-type. (It's not intended for generator specific - // initialization! Do that when your Package constructs the + // initialization! Do that when your Target constructs the // Generators.) Init(*Context, io.Writer) error @@ -160,38 +159,25 @@ type Context struct { // All the types, in case you want to look up something. Universe types.Universe - // Incoming imports, i.e. packages importing the given package. - incomingImports map[string][]string - - // Incoming transitive imports, i.e. the transitive closure of IncomingImports - incomingTransitiveImports map[string][]string - // All the user-specified packages. This is after recursive expansion. Inputs []string // The canonical ordering of the types (will be filtered by both the - // Package's and Generator's Filter methods). + // Target's and Generator's Filter methods). Order []*types.Type // A set of types this context can process. If this is empty or nil, - // the default "golang" filetype will be provided. + // the default "go" filetype will be provided. FileTypes map[string]FileType - // If true, Execute* calls will just verify that the existing output is - // correct. (You may set this after calling NewContext.) - Verify bool - // Allows generators to add packages at runtime. - builder *parser.Builder - - // If specified, trim the prefix from a package's path before writing files. - TrimPathPrefix string + parser *parser.Parser } -// NewContext generates a context from the given builder, naming systems, and +// NewContext generates a context from the given parser, naming systems, and // the naming system you wish to construct the canonical ordering from. -func NewContext(b *parser.Builder, nameSystems namer.NameSystems, canonicalOrderName string) (*Context, error) { - universe, err := b.FindTypes() +func NewContext(p *parser.Parser, nameSystems namer.NameSystems, canonicalOrderName string) (*Context, error) { + universe, err := p.NewUniverse() if err != nil { return nil, err } @@ -199,11 +185,11 @@ func NewContext(b *parser.Builder, nameSystems namer.NameSystems, canonicalOrder c := &Context{ Namers: namer.NameSystems{}, Universe: universe, - Inputs: b.FindPackages(), + Inputs: p.UserRequestedPackages(), FileTypes: map[string]FileType{ - GolangFileType: NewGolangFile(), + GoFileType: NewGoFile(), }, - builder: b, + parser: p, } for name, systemNamer := range nameSystems { @@ -216,44 +202,13 @@ func NewContext(b *parser.Builder, nameSystems namer.NameSystems, canonicalOrder return c, nil } -// IncomingImports returns the incoming imports for each package. The map is lazily computed. -func (ctxt *Context) IncomingImports() map[string][]string { - if ctxt.incomingImports == nil { - incoming := map[string][]string{} - for _, pkg := range ctxt.Universe { - for imp := range pkg.Imports { - incoming[imp] = append(incoming[imp], pkg.Path) - } - } - ctxt.incomingImports = incoming - } - return ctxt.incomingImports -} - -// TransitiveIncomingImports returns the transitive closure of the incoming imports for each package. -// The map is lazily computed. -func (ctxt *Context) TransitiveIncomingImports() map[string][]string { - if ctxt.incomingTransitiveImports == nil { - ctxt.incomingTransitiveImports = transitiveClosure(ctxt.IncomingImports()) - } - return ctxt.incomingTransitiveImports -} - -// AddDir adds a Go package to the context. The specified path must be a single -// go package import path. GOPATH, GOROOT, and the location of your go binary -// (`which go`) will all be searched, in the normal Go fashion. -// Deprecated. Please use AddDirectory. -func (ctxt *Context) AddDir(path string) error { - ctxt.incomingImports = nil - ctxt.incomingTransitiveImports = nil - return ctxt.builder.AddDirTo(path, &ctxt.Universe) +// LoadPackages adds Go packages to the context. +func (c *Context) LoadPackages(patterns ...string) ([]*types.Package, error) { + return c.parser.LoadPackagesTo(&c.Universe, patterns...) } -// AddDirectory adds a Go package to the context. The specified path must be a -// single go package import path. GOPATH, GOROOT, and the location of your go -// binary (`which go`) will all be searched, in the normal Go fashion. -func (ctxt *Context) AddDirectory(path string) (*types.Package, error) { - ctxt.incomingImports = nil - ctxt.incomingTransitiveImports = nil - return ctxt.builder.AddDirectoryTo(path, &ctxt.Universe) +// FindPackages expands Go package patterns into a list of package import +// paths, akin to `go list -find`. +func (c *Context) FindPackages(patterns ...string) ([]string, error) { + return c.parser.FindPackages(patterns...) } diff --git a/pkg/k8s/vendor/k8s.io/gengo/v2/generator/go_generator.go b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/go_generator.go new file mode 100644 index 00000000000..14d2148b999 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/go_generator.go @@ -0,0 +1,61 @@ +/* +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 generator + +import ( + "io" + + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" +) + +const ( + GoFileType = "go" +) + +// GoGenerator implements a do-nothing Generator for Go files. It can be +// used as a base for custom Generators, which embed it and then define the +// methods they need to specialize. +type GoGenerator struct { + // OutputFilename is used as the Generator's name, and filename. + OutputFilename string + + // Body, if present, will be used as the return from the "Init" method. + // This causes it to be static content for the entire file if no other + // generator touches the file. + OptionalBody []byte +} + +func (gg GoGenerator) Name() string { return gg.OutputFilename } +func (gg GoGenerator) Filter(*Context, *types.Type) bool { return true } +func (gg GoGenerator) Namers(*Context) namer.NameSystems { return nil } +func (gg GoGenerator) Imports(*Context) []string { return []string{} } +func (gg GoGenerator) PackageVars(*Context) []string { return []string{} } +func (gg GoGenerator) PackageConsts(*Context) []string { return []string{} } +func (gg GoGenerator) GenerateType(*Context, *types.Type, io.Writer) error { return nil } +func (gg GoGenerator) Filename() string { return gg.OutputFilename } +func (gg GoGenerator) FileType() string { return GoFileType } +func (gg GoGenerator) Finalize(*Context, io.Writer) error { return nil } + +func (gg GoGenerator) Init(c *Context, w io.Writer) error { + _, err := w.Write(gg.OptionalBody) + return err +} + +var ( + _ = Generator(GoGenerator{}) +) diff --git a/pkg/k8s/vendor/k8s.io/gengo/generator/import_tracker.go b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/import_tracker.go similarity index 88% rename from pkg/k8s/vendor/k8s.io/gengo/generator/import_tracker.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/generator/import_tracker.go index 99525c40ba0..70b86cf56b2 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/generator/import_tracker.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/import_tracker.go @@ -22,8 +22,8 @@ import ( "k8s.io/klog/v2" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // NewImportTrackerForPackage creates a new import tracker which is aware @@ -45,7 +45,7 @@ import ( func NewImportTrackerForPackage(local string, typesToAdd ...*types.Type) *namer.DefaultImportTracker { tracker := namer.NewDefaultImportTracker(types.Name{Package: local}) tracker.IsInvalidType = func(*types.Type) bool { return false } - tracker.LocalName = func(name types.Name) string { return golangTrackerLocalName(&tracker, name) } + tracker.LocalName = func(name types.Name) string { return goTrackerLocalName(&tracker, name) } tracker.PrintImport = func(path, name string) string { return name + " \"" + path + "\"" } tracker.AddTypes(typesToAdd...) @@ -56,7 +56,7 @@ func NewImportTracker(typesToAdd ...*types.Type) *namer.DefaultImportTracker { return NewImportTrackerForPackage("", typesToAdd...) } -func golangTrackerLocalName(tracker namer.ImportTracker, t types.Name) string { +func goTrackerLocalName(tracker namer.ImportTracker, t types.Name) string { path := t.Package // Using backslashes in package names causes gengo to produce Go code which @@ -69,11 +69,11 @@ func golangTrackerLocalName(tracker namer.ImportTracker, t types.Name) string { for n := len(dirs) - 1; n >= 0; n-- { // follow kube convention of not having anything between directory names name := strings.Join(dirs[n:], "") - name = strings.Replace(name, "_", "", -1) + name = strings.ReplaceAll(name, "_", "") // These characters commonly appear in import paths for go // packages, but aren't legal go names. So we'll sanitize. - name = strings.Replace(name, ".", "", -1) - name = strings.Replace(name, "-", "", -1) + name = strings.ReplaceAll(name, ".", "") + name = strings.ReplaceAll(name, "-", "") if _, found := tracker.PathOf(name); found { // This name collides with some other package continue diff --git a/pkg/k8s/vendor/k8s.io/gengo/v2/generator/simple_target.go b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/simple_target.go new file mode 100644 index 00000000000..34df8245dae --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/simple_target.go @@ -0,0 +1,77 @@ +/* +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 generator + +import ( + "k8s.io/gengo/v2/types" +) + +// SimpleTarget is implements Target in terms of static configuration. +// The package name, path, and dir are required to be non-empty. +type SimpleTarget struct { + // PkgName is the name of the resulting package (as in "package xxxx"). + // Required. + PkgName string + // PkgPath is the canonical Go import-path of the resulting package (as in + // "import example.com/xxxx/yyyy"). Required. + PkgPath string + // PkgDir is the location of the resulting package on disk (which may not + // exist yet). It may be absolute or relative to CWD. Required. + PkgDir string + + // HeaderComment is emitted at the top of every output file. Optional. + HeaderComment []byte + + // PkgDocComment is emitted after the header comment for a "doc.go" file. + // Optional. + PkgDocComment []byte + + // FilterFunc will be called to implement Target.Filter. Optional. + FilterFunc func(*Context, *types.Type) bool + + // GeneratorsFunc will be called to implement Target.Generators. Optional. + GeneratorsFunc func(*Context) []Generator +} + +func (st SimpleTarget) Name() string { return st.PkgName } +func (st SimpleTarget) Path() string { return st.PkgPath } +func (st SimpleTarget) Dir() string { return st.PkgDir } + +func (st SimpleTarget) Filter(c *Context, t *types.Type) bool { + if st.FilterFunc != nil { + return st.FilterFunc(c, t) + } + return true +} + +func (st SimpleTarget) Generators(c *Context) []Generator { + if st.GeneratorsFunc != nil { + return st.GeneratorsFunc(c) + } + return nil +} + +func (st SimpleTarget) Header(filename string) []byte { + if filename == "doc.go" { + return append(st.HeaderComment, st.PkgDocComment...) + } + return st.HeaderComment +} + +var ( + _ = Target(SimpleTarget{}) +) diff --git a/vendor/k8s.io/gengo/generator/snippet_writer.go b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/snippet_writer.go similarity index 88% rename from vendor/k8s.io/gengo/generator/snippet_writer.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/generator/snippet_writer.go index 590775ff228..7f4610c00f7 100644 --- a/vendor/k8s.io/gengo/generator/snippet_writer.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/generator/snippet_writer.go @@ -74,15 +74,15 @@ func NewSnippetWriter(w io.Writer, c *Context, left, right string) *SnippetWrite // return sw.Error() // // Where: -// * "$" starts a template directive -// * "." references the entire thing passed as args -// * "type" therefore sees a map and looks up the key "type" -// * "|" means "pass the thing on the left to the thing on the right" -// * "public" is the name of a naming system, so the SnippetWriter has given -// the template a function called "public" that takes a *types.Type and -// returns the naming system's name. E.g., if the type is "string" this might -// return "String". -// * the second "$" ends the template directive. +// - "$" starts a template directive +// - "." references the entire thing passed as args +// - "type" therefore sees a map and looks up the key "type" +// - "|" means "pass the thing on the left to the thing on the right" +// - "public" is the name of a naming system, so the SnippetWriter has given +// the template a function called "public" that takes a *types.Type and +// returns the naming system's name. E.g., if the type is "string" this might +// return "String". +// - the second "$" ends the template directive. // // The map is actually not necessary. The below does the same thing: // diff --git a/vendor/k8s.io/gengo/namer/doc.go b/pkg/k8s/vendor/k8s.io/gengo/v2/namer/doc.go similarity index 96% rename from vendor/k8s.io/gengo/namer/doc.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/namer/doc.go index 8a44ea99597..76309ebb007 100644 --- a/vendor/k8s.io/gengo/namer/doc.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/namer/doc.go @@ -28,4 +28,4 @@ limitations under the License. // // Additionally, a "RawNamer" can optionally keep track of what needs to be // imported. -package namer // import "k8s.io/gengo/namer" +package namer // import "k8s.io/gengo/v2/namer" diff --git a/pkg/k8s/vendor/k8s.io/gengo/namer/import_tracker.go b/pkg/k8s/vendor/k8s.io/gengo/v2/namer/import_tracker.go similarity index 98% rename from pkg/k8s/vendor/k8s.io/gengo/namer/import_tracker.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/namer/import_tracker.go index 2bf1d503f94..f8c5a9411dd 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/namer/import_tracker.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/namer/import_tracker.go @@ -19,7 +19,7 @@ package namer import ( "sort" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" ) // ImportTracker may be passed to a namer.RawNamer, to track the imports needed @@ -99,7 +99,7 @@ func (tracker *DefaultImportTracker) ImportLines() []string { for path := range tracker.pathToName { importPaths = append(importPaths, path) } - sort.Sort(sort.StringSlice(importPaths)) + sort.Strings(importPaths) out := []string{} for _, path := range importPaths { out = append(out, tracker.PrintImport(path, tracker.pathToName[path])) diff --git a/pkg/k8s/vendor/k8s.io/gengo/namer/namer.go b/pkg/k8s/vendor/k8s.io/gengo/v2/namer/namer.go similarity index 99% rename from pkg/k8s/vendor/k8s.io/gengo/namer/namer.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/namer/namer.go index a0f1a24abe9..e82fe66adcf 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/namer/namer.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/namer/namer.go @@ -22,7 +22,7 @@ import ( "strconv" "strings" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" ) const ( diff --git a/pkg/k8s/vendor/k8s.io/gengo/namer/order.go b/pkg/k8s/vendor/k8s.io/gengo/v2/namer/order.go similarity index 98% rename from pkg/k8s/vendor/k8s.io/gengo/namer/order.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/namer/order.go index fd89be9b083..e676f0115df 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/namer/order.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/namer/order.go @@ -19,7 +19,7 @@ package namer import ( "sort" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" ) // Orderer produces an ordering of types given a Namer. diff --git a/vendor/k8s.io/gengo/namer/plural_namer.go b/pkg/k8s/vendor/k8s.io/gengo/v2/namer/plural_namer.go similarity index 99% rename from vendor/k8s.io/gengo/namer/plural_namer.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/namer/plural_namer.go index 0e3ebbf262a..6bded6a043a 100644 --- a/vendor/k8s.io/gengo/namer/plural_namer.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/namer/plural_namer.go @@ -19,7 +19,7 @@ package namer import ( "strings" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" ) var consonants = "bcdfghjklmnpqrstvwxyz" diff --git a/vendor/k8s.io/gengo/parser/doc.go b/pkg/k8s/vendor/k8s.io/gengo/v2/parser/doc.go similarity index 92% rename from vendor/k8s.io/gengo/parser/doc.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/parser/doc.go index 8231b6d4320..8dc84facf85 100644 --- a/vendor/k8s.io/gengo/parser/doc.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/parser/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package parser provides code to parse go files, type-check them, extract the // types. -package parser // import "k8s.io/gengo/parser" +package parser // import "k8s.io/gengo/v2/parser" diff --git a/pkg/k8s/vendor/k8s.io/gengo/v2/parser/parse.go b/pkg/k8s/vendor/k8s.io/gengo/v2/parser/parse.go new file mode 100644 index 00000000000..a5993d16393 --- /dev/null +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/parser/parse.go @@ -0,0 +1,821 @@ +/* +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 parser + +import ( + "errors" + "fmt" + "go/ast" + "go/constant" + "go/token" + gotypes "go/types" + "path/filepath" + "sort" + "strings" + "time" + + "golang.org/x/tools/go/packages" + "k8s.io/gengo/v2/types" + "k8s.io/klog/v2" +) + +// Parser lets you add all the go files in all the packages that you care +// about, then constructs the type source data. +type Parser struct { + // Map of package paths to definitions. These keys should be canonical + // Go import paths (example.com/foo/bar) and not local paths (./foo/bar). + goPkgs map[string]*packages.Package + + // Keep track of which packages were directly requested (as opposed to + // those which are transitively loaded). + userRequested map[string]bool + + // Keep track of which packages have already been scanned for types. + fullyProcessed map[string]bool + + // Build tags to set when loading packages. + buildTags []string + + // Tracks accumulated parsed files, so we can do position lookups later. + fset *token.FileSet + + // All comments from everywhere in every parsed file. This map is keyed by + // the file-line on which the comment block ends, which makes it easy to + // look up comments which immediately precede a given obect (e.g. a type or + // function definition), which is what we almost always want. We need this + // because Go's own ast package does a very poor job of handling comments. + endLineToCommentGroup map[fileLine]*ast.CommentGroup +} + +// key type for finding comments. +type fileLine struct { + file string + line int +} + +// New constructs a new Parser. +func New() *Parser { + return NewWithOptions(Options{}) +} + +func NewWithOptions(opts Options) *Parser { + return &Parser{ + goPkgs: map[string]*packages.Package{}, + userRequested: map[string]bool{}, + fullyProcessed: map[string]bool{}, + fset: token.NewFileSet(), + endLineToCommentGroup: map[fileLine]*ast.CommentGroup{}, + buildTags: opts.BuildTags, + } +} + +// Options holds optional settings for the Parser. +type Options struct { + // BuildTags is a list of optional tags to be specified when loading + // packages. + BuildTags []string +} + +// FindPackages expands the provided patterns into a list of Go import-paths, +// much like `go list -find`. +func (p *Parser) FindPackages(patterns ...string) ([]string, error) { + return p.findPackages(nil, patterns...) +} + +// baseCfg is an optional (may be nil) config which might be injected by tests. +func (p *Parser) findPackages(baseCfg *packages.Config, patterns ...string) ([]string, error) { + toFind := make([]string, 0, len(patterns)) + results := make([]string, 0, len(patterns)) + for _, pat := range patterns { + if pkg := p.goPkgs[pat]; pkg != nil { + results = append(results, pkg.PkgPath) + } else { + toFind = append(toFind, pat) + } + } + if len(toFind) == 0 { + return results, nil + } + + cfg := packages.Config{ + Mode: packages.NeedName | packages.NeedFiles, + BuildFlags: []string{"-tags", strings.Join(p.buildTags, ",")}, + Tests: false, + } + if baseCfg != nil { + // This is to support tests, e.g. to inject a fake GOPATH or CWD. + cfg.Dir = baseCfg.Dir + cfg.Env = baseCfg.Env + } + + pkgs, err := packages.Load(&cfg, toFind...) + if err != nil { + return nil, fmt.Errorf("error loading packages: %w", err) + } + var allErrs []error + for _, pkg := range pkgs { + results = append(results, pkg.PkgPath) + + // pkg.Errors is not a slice of `error`, but concrete types. We have + // to iteratively convert each one into `error`. + var errs []error + for _, e := range pkg.Errors { + errs = append(errs, e) + } + if len(errs) > 0 { + allErrs = append(allErrs, fmt.Errorf("error(s) in %q:\n%w", pkg.PkgPath, errors.Join(errs...))) + } + } + if len(allErrs) != 0 { + return nil, errors.Join(allErrs...) + } + return results, nil +} + +// LoadPackages loads and parses the specified Go packages. Specifically +// named packages (without a trailing "/...") which do not exist or have no Go +// files are an error. +func (p *Parser) LoadPackages(patterns ...string) error { + _, err := p.loadPackages(patterns...) + return err +} + +// LoadPackagesWithConfigForTesting loads and parses the specified Go packages with the +// specified packages.Config as a starting point. This is for testing, and +// only the .Dir and .Env fields of the Config will be considered. +func (p *Parser) LoadPackagesWithConfigForTesting(cfg *packages.Config, patterns ...string) error { + _, err := p.loadPackagesWithConfig(cfg, patterns...) + return err +} + +// LoadPackagesTo loads and parses the specified Go packages, and inserts them +// into the specified Universe. It returns the packages which match the +// patterns, but loads all packages and their imports, recursively, into the +// universe. See NewUniverse for more. +func (p *Parser) LoadPackagesTo(u *types.Universe, patterns ...string) ([]*types.Package, error) { + // Load Packages. + pkgs, err := p.loadPackages(patterns...) + if err != nil { + return nil, err + } + + // Load types in all packages (it will internally filter). + if err := p.addPkgsToUniverse(pkgs, u); err != nil { + return nil, err + } + + // Return the results as gengo types.Packages. + ret := make([]*types.Package, 0, len(pkgs)) + for _, pkg := range pkgs { + ret = append(ret, u.Package(pkg.PkgPath)) + } + + return ret, nil +} + +func (p *Parser) loadPackages(patterns ...string) ([]*packages.Package, error) { + return p.loadPackagesWithConfig(nil, patterns...) +} + +// baseCfg is an optional (may be nil) config which might be injected by tests. +func (p *Parser) loadPackagesWithConfig(baseCfg *packages.Config, patterns ...string) ([]*packages.Package, error) { + klog.V(5).Infof("loadPackages %q", patterns) + + // Loading packages is slow - only do ones we know we have not already done + // (e.g. if a tool calls LoadPackages itself). + existingPkgs, netNewPkgs, err := p.alreadyLoaded(baseCfg, patterns...) + if err != nil { + return nil, err + } + if vlog := klog.V(5); vlog.Enabled() { + if len(existingPkgs) > 0 { + keys := make([]string, 0, len(existingPkgs)) + for _, p := range existingPkgs { + keys = append(keys, p.PkgPath) + } + vlog.Infof(" already have: %q", keys) + } + if len(netNewPkgs) > 0 { + vlog.Infof(" to be loaded: %q", netNewPkgs) + } + } + + // If these were not user-requested before, they are now. + for _, pkg := range existingPkgs { + if !p.userRequested[pkg.PkgPath] { + p.userRequested[pkg.PkgPath] = true + } + } + for _, pkg := range netNewPkgs { + if !p.userRequested[pkg] { + p.userRequested[pkg] = true + } + } + + if len(netNewPkgs) == 0 { + return existingPkgs, nil + } + + cfg := packages.Config{ + Mode: packages.NeedName | + packages.NeedFiles | packages.NeedImports | packages.NeedDeps | + packages.NeedModule | packages.NeedTypes | packages.NeedSyntax, + BuildFlags: []string{"-tags", strings.Join(p.buildTags, ",")}, + Fset: p.fset, + Tests: false, + } + if baseCfg != nil { + // This is to support tests, e.g. to inject a fake GOPATH or CWD. + cfg.Dir = baseCfg.Dir + cfg.Env = baseCfg.Env + } + + tBefore := time.Now() + pkgs, err := packages.Load(&cfg, netNewPkgs...) + if err != nil { + return nil, fmt.Errorf("error loading packages: %w", err) + } + klog.V(5).Infof(" loaded %d pkg(s) in %v", len(pkgs), time.Since(tBefore)) + + // Handle any errors. + collectErrors := func(pkg *packages.Package) error { + var errs []error + for _, e := range pkg.Errors { + if e.Kind == packages.ListError || e.Kind == packages.ParseError { + errs = append(errs, e) + } + } + if len(errs) > 0 { + return fmt.Errorf("error(s) in %q:\n%w", pkg.PkgPath, errors.Join(errs...)) + } + return nil + } + if err := forEachPackageRecursive(pkgs, collectErrors); err != nil { + return nil, err + } + + // Finish integrating packages into our state. + absorbPkg := func(pkg *packages.Package) error { + p.goPkgs[pkg.PkgPath] = pkg + + for _, f := range pkg.Syntax { + for _, c := range f.Comments { + // We need to do this on _every_ pkg, not just user-requested + // ones, because some generators look at tags in other + // packages. + // + // TODO: It would be nice if we only did this on user-requested + // packages. The problem is that we don't always know which + // other packages will need this information, and even when we + // do we may have already loaded the package (as a transitive + // dep) and might have stored pointers into it. Doing a + // thorough "reload" without invalidating all those pointers is + // a problem for another day. + position := p.fset.Position(c.End()) // Fset is synchronized + p.endLineToCommentGroup[fileLine{position.Filename, position.Line}] = c + } + } + + return nil + } + if err := forEachPackageRecursive(pkgs, absorbPkg); err != nil { + return nil, err + } + + return append(existingPkgs, pkgs...), nil +} + +// alreadyLoaded figures out which of the specified patterns have already been loaded +// and which have not, and returns those respectively. +// baseCfg is an optional (may be nil) config which might be injected by tests. +func (p *Parser) alreadyLoaded(baseCfg *packages.Config, patterns ...string) ([]*packages.Package, []string, error) { + existingPkgs := make([]*packages.Package, 0, len(patterns)) + netNewPkgs := make([]string, 0, len(patterns)) + + // Expand and canonicalize the requested patterns. This should be fast. + if pkgPaths, err := p.findPackages(baseCfg, patterns...); err != nil { + return nil, nil, err + } else { + for _, pkgPath := range pkgPaths { + if pkg := p.goPkgs[pkgPath]; pkg != nil { + existingPkgs = append(existingPkgs, pkg) + } else { + netNewPkgs = append(netNewPkgs, pkgPath) + } + } + } + return existingPkgs, netNewPkgs, nil +} + +// forEachPackageRecursive will run the provided function on all of the specified +// packages, and on their imports recursively. Errors are accumulated and +// returned as via errors.Join. +func forEachPackageRecursive(pkgs []*packages.Package, fn func(pkg *packages.Package) error) error { + seen := map[string]bool{} // PkgPaths we have already visited + var errs []error + for _, pkg := range pkgs { + errs = append(errs, recursePackage(pkg, fn, seen)...) + } + if len(errs) > 0 { + return errors.Join(errs...) + } + return nil +} + +func recursePackage(pkg *packages.Package, fn func(pkg *packages.Package) error, seen map[string]bool) []error { + if seen[pkg.PkgPath] { + return nil + } + var errs []error + seen[pkg.PkgPath] = true + if err := fn(pkg); err != nil { + errs = append(errs, err) + } + for _, imp := range pkg.Imports { + errs = append(errs, recursePackage(imp, fn, seen)...) + } + return errs +} + +// UserRequestedPackages fetches a list of the user-imported packages. +func (p *Parser) UserRequestedPackages() []string { + // Iterate packages in a predictable order. + pkgPaths := make([]string, 0, len(p.userRequested)) + for k := range p.userRequested { + pkgPaths = append(pkgPaths, string(k)) + } + sort.Strings(pkgPaths) + return pkgPaths +} + +// NewUniverse finalizes the loaded packages, searches through them for types +// and produces a new Universe. The returned Universe has one types.Package +// entry for each Go package that has been loaded, including all of their +// dependencies, recursively. It also has one entry, whose key is "", which +// represents "builtin" types. +func (p *Parser) NewUniverse() (types.Universe, error) { + u := types.Universe{} + + pkgs := []*packages.Package{} + for _, path := range p.UserRequestedPackages() { + pkgs = append(pkgs, p.goPkgs[path]) + } + if err := p.addPkgsToUniverse(pkgs, &u); err != nil { + return nil, err + } + + return u, nil +} + +// addCommentsToType takes any accumulated comment lines prior to obj and +// attaches them to the type t. +func (p *Parser) addCommentsToType(obj gotypes.Object, t *types.Type) { + t.CommentLines = p.docComment(obj.Pos()) + t.SecondClosestCommentLines = p.priorDetachedComment(obj.Pos()) +} + +// packageDir tries to figure out the directory of the specified package. +func packageDir(pkg *packages.Package) (string, error) { + // Sometimes Module is present but has no Dir, e.g. when it is vendored. + if pkg.Module != nil && pkg.Module.Dir != "" { + // NOTE: this will not work if tests are loaded, because Go mutates the + // Package.PkgPath. + subdir := strings.TrimPrefix(pkg.PkgPath, pkg.Module.Path) + return filepath.Join(pkg.Module.Dir, subdir), nil + } + if len(pkg.GoFiles) > 0 { + return filepath.Dir(pkg.GoFiles[0]), nil + } + if len(pkg.IgnoredFiles) > 0 { + return filepath.Dir(pkg.IgnoredFiles[0]), nil + } + return "", fmt.Errorf("can't find package dir for %q - no module info and no Go files", pkg.PkgPath) +} + +// addPkgsToUniverse adds the packages, and all of their deps, recursively, to +// the universe and (if needed) searches through them for types. +func (p *Parser) addPkgsToUniverse(pkgs []*packages.Package, u *types.Universe) error { + addOne := func(pkg *packages.Package) error { + if err := p.addPkgToUniverse(pkg, u); err != nil { + return err + } + return nil + } + if err := forEachPackageRecursive(pkgs, addOne); err != nil { + return err + } + return nil +} + +// addPkgToUniverse adds one package to the universe and (if needed) searches +// through it for types. +func (p *Parser) addPkgToUniverse(pkg *packages.Package, u *types.Universe) error { + pkgPath := pkg.PkgPath + if p.fullyProcessed[pkgPath] { + return nil + } + + // This will get-or-create the Package. + gengoPkg := u.Package(pkgPath) + + if gengoPkg.Dir == "" { + // We're keeping this package, though we might not fully process it. + if vlog := klog.V(5); vlog.Enabled() { + why := "user-requested" + if !p.userRequested[pkgPath] { + why = "dependency" + } + vlog.Infof("addPkgToUniverse %q (%s)", pkgPath, why) + } + + absPath := "" + if dir, err := packageDir(pkg); err != nil { + return err + } else { + absPath = dir + } + + gengoPkg.Path = pkg.PkgPath + gengoPkg.Dir = absPath + } + + // If the package was not user-requested, we can stop here. + if !p.userRequested[pkgPath] { + return nil + } + + // Mark it as done, so we don't ever re-process it. + p.fullyProcessed[pkgPath] = true + gengoPkg.Name = pkg.Name + + // For historical reasons we treat files named "doc.go" specially. + // TODO: It would be nice to not do this and instead treat package + // doc-comments as the "global" config place. This would require changing + // most generators and input files. + for _, f := range pkg.Syntax { + // This gets the filename for the ast.File. Iterating pkg.GoFiles is + // documented as unreliable. + pos := p.fset.Position(f.FileStart) + if filepath.Base(pos.Filename) == "doc.go" { + gengoPkg.Comments = []string{} + for i := range f.Comments { + gengoPkg.Comments = append(gengoPkg.Comments, splitLines(f.Comments[i].Text())...) + } + if f.Doc != nil { + gengoPkg.DocComments = splitLines(f.Doc.Text()) + } + } + } + + // Walk all the types, recursively and save them for later access. + s := pkg.Types.Scope() + for _, n := range s.Names() { + switch obj := s.Lookup(n).(type) { + case *gotypes.TypeName: + t := p.walkType(*u, nil, obj.Type()) + p.addCommentsToType(obj, t) + case *gotypes.Func: + // We only care about functions, not concrete/abstract methods. + if obj.Type() != nil && obj.Type().(*gotypes.Signature).Recv() == nil { + t := p.addFunction(*u, nil, obj) + p.addCommentsToType(obj, t) + } + case *gotypes.Var: + if !obj.IsField() { + t := p.addVariable(*u, nil, obj) + p.addCommentsToType(obj, t) + } + case *gotypes.Const: + t := p.addConstant(*u, nil, obj) + p.addCommentsToType(obj, t) + default: + klog.Infof("addPkgToUniverse %q: unhandled object of type %T: %v", pkgPath, obj, obj) + } + } + + // Add all of this package's imports. + importedPkgs := []string{} + for _, imp := range pkg.Imports { + if err := p.addPkgToUniverse(imp, u); err != nil { + return err + } + importedPkgs = append(importedPkgs, imp.PkgPath) + } + sort.Strings(importedPkgs) + u.AddImports(pkg.PkgPath, importedPkgs...) + + return nil +} + +// If the specified position has a "doc comment", return that. +func (p *Parser) docComment(pos token.Pos) []string { + // An object's doc comment always ends on the line before the object's own + // declaration. + c1 := p.priorCommentLines(pos, 1) + return splitLines(c1.Text()) // safe even if c1 is nil +} + +// If there is a detached (not immediately before a declaration) comment, +// return that. +func (p *Parser) priorDetachedComment(pos token.Pos) []string { + // An object's doc comment always ends on the line before the object's own + // declaration. + c1 := p.priorCommentLines(pos, 1) + + // Using a literal "2" here is brittle in theory (it means literally 2 + // lines), but in practice Go code is gofmt'ed (which elides repeated blank + // lines), so it works. + var c2 *ast.CommentGroup + if c1 == nil { + c2 = p.priorCommentLines(pos, 2) + } else { + c2 = p.priorCommentLines(c1.List[0].Slash, 2) + } + return splitLines(c2.Text()) // safe even if c1 is nil +} + +// If there's a comment block which ends nlines before pos, return it. +func (p *Parser) priorCommentLines(pos token.Pos, lines int) *ast.CommentGroup { + position := p.fset.Position(pos) + key := fileLine{position.Filename, position.Line - lines} + return p.endLineToCommentGroup[key] +} + +func splitLines(str string) []string { + return strings.Split(strings.TrimRight(str, "\n"), "\n") +} + +func goFuncNameToName(in string) types.Name { + name := strings.TrimPrefix(in, "func ") + nameParts := strings.Split(name, "(") + return goNameToName(nameParts[0]) +} + +func goVarNameToName(in string) types.Name { + nameParts := strings.Split(in, " ") + // nameParts[0] is "var". + // nameParts[2:] is the type of the variable, we ignore it for now. + return goNameToName(nameParts[1]) +} + +func goNameToName(in string) types.Name { + // Detect anonymous type names. (These may have '.' characters because + // embedded types may have packages, so we detect them specially.) + if strings.HasPrefix(in, "struct{") || + strings.HasPrefix(in, "<-chan") || + strings.HasPrefix(in, "chan<-") || + strings.HasPrefix(in, "chan ") || + strings.HasPrefix(in, "func(") || + strings.HasPrefix(in, "func (") || + strings.HasPrefix(in, "*") || + strings.HasPrefix(in, "map[") || + strings.HasPrefix(in, "[") { + return types.Name{Name: in} + } + + // Otherwise, if there are '.' characters present, the name has a + // package path in front. + nameParts := strings.Split(in, ".") + name := types.Name{Name: in} + if n := len(nameParts); n >= 2 { + // The final "." is the name of the type--previous ones must + // have been in the package path. + name.Package, name.Name = strings.Join(nameParts[:n-1], "."), nameParts[n-1] + } + return name +} + +func (p *Parser) convertSignature(u types.Universe, t *gotypes.Signature) *types.Signature { + signature := &types.Signature{} + for i := 0; i < t.Params().Len(); i++ { + signature.Parameters = append(signature.Parameters, p.walkType(u, nil, t.Params().At(i).Type())) + signature.ParameterNames = append(signature.ParameterNames, t.Params().At(i).Name()) + } + for i := 0; i < t.Results().Len(); i++ { + signature.Results = append(signature.Results, p.walkType(u, nil, t.Results().At(i).Type())) + signature.ResultNames = append(signature.ResultNames, t.Results().At(i).Name()) + } + if r := t.Recv(); r != nil { + signature.Receiver = p.walkType(u, nil, r.Type()) + } + signature.Variadic = t.Variadic() + return signature +} + +// walkType adds the type, and any necessary child types. +func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type) *types.Type { + // Most of the cases are underlying types of the named type. + name := goNameToName(in.String()) + if useName != nil { + name = *useName + } + + switch t := in.(type) { + case *gotypes.Struct: + out := u.Type(name) + if out.Kind != types.Unknown { + return out + } + out.Kind = types.Struct + for i := 0; i < t.NumFields(); i++ { + f := t.Field(i) + m := types.Member{ + Name: f.Name(), + Embedded: f.Anonymous(), + Tags: t.Tag(i), + Type: p.walkType(u, nil, f.Type()), + CommentLines: p.docComment(f.Pos()), + } + out.Members = append(out.Members, m) + } + return out + case *gotypes.Map: + out := u.Type(name) + if out.Kind != types.Unknown { + return out + } + out.Kind = types.Map + out.Elem = p.walkType(u, nil, t.Elem()) + out.Key = p.walkType(u, nil, t.Key()) + return out + case *gotypes.Pointer: + out := u.Type(name) + if out.Kind != types.Unknown { + return out + } + out.Kind = types.Pointer + out.Elem = p.walkType(u, nil, t.Elem()) + return out + case *gotypes.Slice: + out := u.Type(name) + if out.Kind != types.Unknown { + return out + } + out.Kind = types.Slice + out.Elem = p.walkType(u, nil, t.Elem()) + return out + case *gotypes.Array: + out := u.Type(name) + if out.Kind != types.Unknown { + return out + } + out.Kind = types.Array + out.Elem = p.walkType(u, nil, t.Elem()) + out.Len = in.(*gotypes.Array).Len() + return out + case *gotypes.Chan: + out := u.Type(name) + if out.Kind != types.Unknown { + return out + } + out.Kind = types.Chan + out.Elem = p.walkType(u, nil, t.Elem()) + // TODO: need to store direction, otherwise raw type name + // cannot be properly written. + return out + case *gotypes.Basic: + out := u.Type(types.Name{ + Package: "", // This is a magic package name in the Universe. + Name: t.Name(), + }) + if out.Kind != types.Unknown { + return out + } + out.Kind = types.Unsupported + return out + case *gotypes.Signature: + out := u.Type(name) + if out.Kind != types.Unknown { + return out + } + out.Kind = types.Func + out.Signature = p.convertSignature(u, t) + return out + case *gotypes.Interface: + out := u.Type(name) + if out.Kind != types.Unknown { + return out + } + out.Kind = types.Interface + t.Complete() + for i := 0; i < t.NumMethods(); i++ { + if out.Methods == nil { + out.Methods = map[string]*types.Type{} + } + method := t.Method(i) + name := goNameToName(method.String()) + mt := p.walkType(u, &name, method.Type()) + mt.CommentLines = p.docComment(method.Pos()) + out.Methods[method.Name()] = mt + } + return out + case *gotypes.Named: + var out *types.Type + switch t.Underlying().(type) { + case *gotypes.Named, *gotypes.Basic, *gotypes.Map, *gotypes.Slice: + name := goNameToName(t.String()) + out = u.Type(name) + if out.Kind != types.Unknown { + return out + } + out.Kind = types.Alias + out.Underlying = p.walkType(u, nil, t.Underlying()) + default: + // gotypes package makes everything "named" with an + // underlying anonymous type--we remove that annoying + // "feature" for users. This flattens those types + // together. + name := goNameToName(t.String()) + if out := u.Type(name); out.Kind != types.Unknown { + return out // short circuit if we've already made this. + } + out = p.walkType(u, &name, t.Underlying()) + } + // If the underlying type didn't already add methods, add them. + // (Interface types will have already added methods.) + if len(out.Methods) == 0 { + for i := 0; i < t.NumMethods(); i++ { + if out.Methods == nil { + out.Methods = map[string]*types.Type{} + } + method := t.Method(i) + name := goNameToName(method.String()) + mt := p.walkType(u, &name, method.Type()) + mt.CommentLines = p.docComment(method.Pos()) + out.Methods[method.Name()] = mt + } + } + return out + default: + out := u.Type(name) + if out.Kind != types.Unknown { + return out + } + out.Kind = types.Unsupported + klog.Warningf("Making unsupported type entry %q for: %#v\n", out, t) + return out + } +} + +func (p *Parser) addFunction(u types.Universe, useName *types.Name, in *gotypes.Func) *types.Type { + name := goFuncNameToName(in.String()) + if useName != nil { + name = *useName + } + out := u.Function(name) + out.Kind = types.DeclarationOf + out.Underlying = p.walkType(u, nil, in.Type()) + return out +} + +func (p *Parser) addVariable(u types.Universe, useName *types.Name, in *gotypes.Var) *types.Type { + name := goVarNameToName(in.String()) + if useName != nil { + name = *useName + } + out := u.Variable(name) + out.Kind = types.DeclarationOf + out.Underlying = p.walkType(u, nil, in.Type()) + return out +} + +func (p *Parser) addConstant(u types.Universe, useName *types.Name, in *gotypes.Const) *types.Type { + name := goVarNameToName(in.String()) + if useName != nil { + name = *useName + } + out := u.Constant(name) + out.Kind = types.DeclarationOf + out.Underlying = p.walkType(u, nil, in.Type()) + + var constval string + + // For strings, we use `StringVal()` to get the un-truncated, + // un-quoted string. For other values, `.String()` is preferable to + // get something relatively human readable (especially since for + // floating point types, `ExactString()` will generate numeric + // expressions using `big.(*Float).Text()`. + switch in.Val().Kind() { + case constant.String: + constval = constant.StringVal(in.Val()) + default: + constval = in.Val().String() + } + + out.ConstValue = &constval + return out +} diff --git a/vendor/k8s.io/gengo/types/doc.go b/pkg/k8s/vendor/k8s.io/gengo/v2/types/doc.go similarity index 93% rename from vendor/k8s.io/gengo/types/doc.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/types/doc.go index 74a969a763a..23acb879ce7 100644 --- a/vendor/k8s.io/gengo/types/doc.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/types/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package types contains go type information, packaged in a way that makes // auto-generation convenient, whether by template or straight go functions. -package types // import "k8s.io/gengo/types" +package types // import "k8s.io/gengo/v2/types" diff --git a/pkg/k8s/vendor/k8s.io/gengo/types/types.go b/pkg/k8s/vendor/k8s.io/gengo/v2/types/types.go similarity index 98% rename from pkg/k8s/vendor/k8s.io/gengo/types/types.go rename to pkg/k8s/vendor/k8s.io/gengo/v2/types/types.go index 77650255acd..e9c8319c656 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/types/types.go +++ b/pkg/k8s/vendor/k8s.io/gengo/v2/types/types.go @@ -108,14 +108,13 @@ const ( // templates (for example). But it is strongly encouraged for code to build by // using the provided functions. type Package struct { - // Canonical name of this package-- its path. + // Canonical import-path of this package. Path string - // The location this package was loaded from - SourcePath string + // The location (on disk) of this package. + Dir string - // Short name of this package; the name that appears in the - // 'package x' line. + // Short name of this package, as in the 'package x' line. Name string // The comment right above the package declaration in doc.go, if any. @@ -359,6 +358,9 @@ type Type struct { // String returns the name of the type. func (t *Type) String() string { + if t == nil { + return "" // makes tests easier + } return t.Name.String() } diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go b/pkg/k8s/vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go deleted file mode 100644 index 19783370e99..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go +++ /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. -*/ - -package args - -import ( - "fmt" - "path/filepath" - - "github.com/spf13/pflag" - "k8s.io/gengo/args" -) - -// CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs struct { - // ReportFilename is added to CustomArgs for specifying name of report file used - // by API linter. If specified, API rule violations will be printed to report file. - // Otherwise default value "-" will be used which indicates stdout. - ReportFilename string -} - -// NewDefaults returns default arguments for the generator. Returning the arguments instead -// of using default flag parsing allows registering custom arguments afterwards -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - // Default() sets a couple of flag default values for example the boilerplate. - // WithoutDefaultFlagParsing() disables implicit addition of command line flags and parsing, - // which allows registering custom arguments afterwards - genericArgs := args.Default().WithoutDefaultFlagParsing() - genericArgs.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), "k8s.io/kube-openapi/boilerplate/boilerplate.go.txt") - - customArgs := &CustomArgs{} - genericArgs.CustomArgs = customArgs - - // Default value for report filename is "-", which stands for stdout - customArgs.ReportFilename = "-" - // Default value for output file base name - genericArgs.OutputFileBaseName = "openapi_generated" - - return genericArgs, customArgs -} - -// AddFlags add the generator flags to the flag set. -func (c *CustomArgs) AddFlags(fs *pflag.FlagSet) { - fs.StringVarP(&c.ReportFilename, "report-filename", "r", c.ReportFilename, "Name of report file used by API linter to print API violations. Default \"-\" stands for standard output. NOTE that if valid filename other than \"-\" is specified, API linter won't return error on detected API violations. This allows further check of existing API violations without stopping the OpenAPI generation toolchain.") -} - -// Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - c, ok := genericArgs.CustomArgs.(*CustomArgs) - if !ok { - return fmt.Errorf("input arguments don't contain valid custom arguments") - } - if len(c.ReportFilename) == 0 { - return fmt.Errorf("report filename cannot be empty. specify a valid filename or use \"-\" for stdout") - } - if len(genericArgs.OutputFileBaseName) == 0 { - return fmt.Errorf("output file base name cannot be empty") - } - if len(genericArgs.OutputPackagePath) == 0 { - return fmt.Errorf("output package cannot be empty") - } - return nil -} diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/README.md b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/README.md deleted file mode 100644 index 72b4e5fb439..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# Generate OpenAPI definitions - -- To generate definition for a specific type or package add "+k8s:openapi-gen=true" tag to the type/package comment lines. -- To exclude a type or a member from a tagged package/type, add "+k8s:openapi-gen=false" tag to the comment lines. - -# OpenAPI Extensions - -OpenAPI spec can have extensions on types. To define one or more extensions on a type or its member -add `+k8s:openapi-gen=x-kubernetes-$NAME:$VALUE` to the comment lines before type/member. A type/member can -have multiple extensions. The rest of the line in the comment will be used as $VALUE so there is no need to -escape or quote the value string. Extensions can be used to pass more information to client generators or -documentation generators. For example a type might have a friendly name to be displayed in documentation or -being used in a client's fluent interface. - -# Custom OpenAPI type definitions - -Custom types which otherwise don't map directly to OpenAPI can override their -OpenAPI definition by implementing a function named "OpenAPIDefinition" with -the following signature: - -```go - import openapi "k8s.io/kube-openapi/pkg/common" - - // ... - - type Time struct { - time.Time - } - - func (_ Time) OpenAPIDefinition() openapi.OpenAPIDefinition { - return openapi.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "date-time", - }, - }, - } - } -``` - -Alternatively, the type can avoid the "openapi" import by defining the following -methods. The following example produces the same OpenAPI definition as the -example above: - -```go - func (_ Time) OpenAPISchemaType() []string { return []string{"string"} } - func (_ Time) OpenAPISchemaFormat() string { return "date-time" } -``` diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go deleted file mode 100644 index 2763cf8847b..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go +++ /dev/null @@ -1,219 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package generators - -import ( - "bytes" - "fmt" - "io" - "os" - "sort" - - "k8s.io/kube-openapi/pkg/generators/rules" - - "k8s.io/gengo/generator" - "k8s.io/gengo/types" - "k8s.io/klog/v2" -) - -const apiViolationFileType = "api-violation" - -type apiViolationFile struct { - // Since our file actually is unrelated to the package structure, use a - // path that hasn't been mangled by the framework. - unmangledPath string -} - -func (a apiViolationFile) AssembleFile(f *generator.File, path string) error { - path = a.unmangledPath - klog.V(2).Infof("Assembling file %q", path) - if path == "-" { - _, err := io.Copy(os.Stdout, &f.Body) - return err - } - - output, err := os.Create(path) - if err != nil { - return err - } - defer output.Close() - _, err = io.Copy(output, &f.Body) - return err -} - -func (a apiViolationFile) VerifyFile(f *generator.File, path string) error { - if path == "-" { - // Nothing to verify against. - return nil - } - path = a.unmangledPath - - formatted := f.Body.Bytes() - existing, err := os.ReadFile(path) - if err != nil { - return fmt.Errorf("unable to read file %q for comparison: %v", path, err) - } - if bytes.Compare(formatted, existing) == 0 { - return nil - } - - // Be nice and find the first place where they differ - // (Copied from gengo's default file type) - i := 0 - for i < len(formatted) && i < len(existing) && formatted[i] == existing[i] { - i++ - } - eDiff, fDiff := existing[i:], formatted[i:] - if len(eDiff) > 100 { - eDiff = eDiff[:100] - } - if len(fDiff) > 100 { - fDiff = fDiff[:100] - } - return fmt.Errorf("output for %q differs; first existing/expected diff: \n %q\n %q", path, string(eDiff), string(fDiff)) -} - -func newAPIViolationGen() *apiViolationGen { - return &apiViolationGen{ - linter: newAPILinter(), - } -} - -type apiViolationGen struct { - generator.DefaultGen - - linter *apiLinter -} - -func (v *apiViolationGen) FileType() string { return apiViolationFileType } -func (v *apiViolationGen) Filename() string { - return "this file is ignored by the file assembler" -} - -func (v *apiViolationGen) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { - klog.V(5).Infof("validating API rules for type %v", t) - if err := v.linter.validate(t); err != nil { - return err - } - return nil -} - -// Finalize prints the API rule violations to report file (if specified from -// arguments) or stdout (default) -func (v *apiViolationGen) Finalize(c *generator.Context, w io.Writer) error { - // NOTE: we don't return error here because we assume that the report file will - // get evaluated afterwards to determine if error should be raised. For example, - // you can have make rules that compare the report file with existing known - // violations (whitelist) and determine no error if no change is detected. - v.linter.report(w) - return nil -} - -// apiLinter is the framework hosting multiple API rules and recording API rule -// violations -type apiLinter struct { - // API rules that implement APIRule interface and output API rule violations - rules []APIRule - violations []apiViolation -} - -// newAPILinter creates an apiLinter object with API rules in package rules. Please -// add APIRule here when new API rule is implemented. -func newAPILinter() *apiLinter { - return &apiLinter{ - rules: []APIRule{ - &rules.NamesMatch{}, - &rules.OmitEmptyMatchCase{}, - &rules.ListTypeMissing{}, - }, - } -} - -// apiViolation uniquely identifies single API rule violation -type apiViolation struct { - // Name of rule from APIRule.Name() - rule string - - packageName string - typeName string - - // Optional: name of field that violates API rule. Empty fieldName implies that - // the entire type violates the rule. - field string -} - -// apiViolations implements sort.Interface for []apiViolation based on the fields: rule, -// packageName, typeName and field. -type apiViolations []apiViolation - -func (a apiViolations) Len() int { return len(a) } -func (a apiViolations) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a apiViolations) Less(i, j int) bool { - if a[i].rule != a[j].rule { - return a[i].rule < a[j].rule - } - if a[i].packageName != a[j].packageName { - return a[i].packageName < a[j].packageName - } - if a[i].typeName != a[j].typeName { - return a[i].typeName < a[j].typeName - } - return a[i].field < a[j].field -} - -// APIRule is the interface for validating API rule on Go types -type APIRule interface { - // Validate evaluates API rule on type t and returns a list of field names in - // the type that violate the rule. Empty field name [""] implies the entire - // type violates the rule. - Validate(t *types.Type) ([]string, error) - - // Name returns the name of APIRule - Name() string -} - -// validate runs all API rules on type t and records any API rule violation -func (l *apiLinter) validate(t *types.Type) error { - for _, r := range l.rules { - klog.V(5).Infof("validating API rule %v for type %v", r.Name(), t) - fields, err := r.Validate(t) - if err != nil { - return err - } - for _, field := range fields { - l.violations = append(l.violations, apiViolation{ - rule: r.Name(), - packageName: t.Name.Package, - typeName: t.Name.Name, - field: field, - }) - } - } - return nil -} - -// report prints any API rule violation to writer w and returns error if violation exists -func (l *apiLinter) report(w io.Writer) error { - sort.Sort(apiViolations(l.violations)) - for _, v := range l.violations { - fmt.Fprintf(w, "API rule violation: %s,%s,%s,%s\n", v.rule, v.packageName, v.typeName, v.field) - } - if len(l.violations) > 0 { - return fmt.Errorf("API rule violations exist") - } - return nil -} diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/config.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/config.go deleted file mode 100644 index d728f2a32ac..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/config.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package generators - -import ( - "fmt" - "path/filepath" - - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - "k8s.io/klog/v2" - - generatorargs "k8s.io/kube-openapi/cmd/openapi-gen/args" -) - -type identityNamer struct{} - -func (_ identityNamer) Name(t *types.Type) string { - return t.Name.String() -} - -var _ namer.Namer = identityNamer{} - -// NameSystems returns the name system used by the generators in this package. -func NameSystems() namer.NameSystems { - return namer.NameSystems{ - "raw": namer.NewRawNamer("", nil), - "sorting_namer": identityNamer{}, - } -} - -// DefaultNameSystem returns the default name system for ordering the types to be -// processed by the generators in this package. -func DefaultNameSystem() string { - return "sorting_namer" -} - -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() - if err != nil { - klog.Fatalf("Failed loading boilerplate: %v", err) - } - header := append([]byte(fmt.Sprintf("// +build !%s\n\n", arguments.GeneratedBuildTag)), boilerplate...) - header = append(header, []byte( - ` -// This file was autogenerated by openapi-gen. Do not edit it manually! - -`)...) - - reportPath := "-" - if customArgs, ok := arguments.CustomArgs.(*generatorargs.CustomArgs); ok { - reportPath = customArgs.ReportFilename - } - context.FileTypes[apiViolationFileType] = apiViolationFile{ - unmangledPath: reportPath, - } - - return generator.Packages{ - &generator.DefaultPackage{ - PackageName: filepath.Base(arguments.OutputPackagePath), - PackagePath: arguments.OutputPackagePath, - HeaderText: header, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - return []generator.Generator{ - newOpenAPIGen( - arguments.OutputFileBaseName, - arguments.OutputPackagePath, - ), - newAPIViolationGen(), - } - }, - FilterFunc: apiTypeFilterFunc, - }, - } -} diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/enum.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/enum.go deleted file mode 100644 index 292a3c762ae..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/enum.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package generators - -import ( - "fmt" - "regexp" - "sort" - "strings" - - "k8s.io/gengo/generator" - "k8s.io/gengo/types" -) - -const tagEnumType = "enum" -const enumTypeDescriptionHeader = "Possible enum values:" - -type enumValue struct { - Name string - Value string - Comment string -} - -type enumType struct { - Name types.Name - Values []*enumValue -} - -// enumMap is a map from the name to the matching enum type. -type enumMap map[types.Name]*enumType - -type enumContext struct { - enumTypes enumMap -} - -func newEnumContext(c *generator.Context) *enumContext { - return &enumContext{enumTypes: parseEnums(c)} -} - -// EnumType checks and finds the enumType for a given type. -// If the given type is a known enum type, returns the enumType, true -// Otherwise, returns nil, false -func (ec *enumContext) EnumType(t *types.Type) (enum *enumType, isEnum bool) { - // if t is a pointer, use its underlying type instead - if t.Kind == types.Pointer { - t = t.Elem - } - enum, ok := ec.enumTypes[t.Name] - return enum, ok -} - -// ValueStrings returns all possible values of the enum type as strings -// the results are sorted and quoted as Go literals. -func (et *enumType) ValueStrings() []string { - var values []string - for _, value := range et.Values { - // use "%q" format to generate a Go literal of the string const value - values = append(values, fmt.Sprintf("%q", value.Value)) - } - sort.Strings(values) - return values -} - -// DescriptionLines returns a description of the enum in this format: -// -// Possible enum values: -// - `"value1"` description 1 -// - `"value2"` description 2 -func (et *enumType) DescriptionLines() []string { - if len(et.Values) == 0 { - return nil - } - var lines []string - for _, value := range et.Values { - lines = append(lines, value.Description()) - } - sort.Strings(lines) - // Prepend an empty string to initiate a new paragraph. - return append([]string{"", enumTypeDescriptionHeader}, lines...) -} - -func parseEnums(c *generator.Context) enumMap { - // First, find the builtin "string" type - stringType := c.Universe.Type(types.Name{Name: "string"}) - - // find all enum types. - enumTypes := make(enumMap) - for _, p := range c.Universe { - for _, t := range p.Types { - if isEnumType(stringType, t) { - if _, ok := enumTypes[t.Name]; !ok { - enumTypes[t.Name] = &enumType{ - Name: t.Name, - } - } - } - } - } - - // find all enum values from constants, and try to match each with its type. - for _, p := range c.Universe { - for _, c := range p.Constants { - enumType := c.Underlying - if _, ok := enumTypes[enumType.Name]; ok { - value := &enumValue{ - Name: c.Name.Name, - Value: *c.ConstValue, - Comment: strings.Join(c.CommentLines, " "), - } - enumTypes[enumType.Name].appendValue(value) - } - } - } - - return enumTypes -} - -func (et *enumType) appendValue(value *enumValue) { - et.Values = append(et.Values, value) -} - -// Description returns the description line for the enumValue -// with the format: -// - `"FooValue"` is the Foo value -func (ev *enumValue) Description() string { - comment := strings.TrimSpace(ev.Comment) - // The comment should starts with the type name, trim it first. - comment = strings.TrimPrefix(comment, ev.Name) - // Trim the possible space after previous step. - comment = strings.TrimSpace(comment) - // The comment may be multiline, cascade all consecutive whitespaces. - comment = whitespaceRegex.ReplaceAllString(comment, " ") - return fmt.Sprintf(" - `%q` %s", ev.Value, comment) -} - -// isEnumType checks if a given type is an enum by the definition -// An enum type should be an alias of string and has tag '+enum' in its comment. -// Additionally, pass the type of builtin 'string' to check against. -func isEnumType(stringType *types.Type, t *types.Type) bool { - return t.Kind == types.Alias && t.Underlying == stringType && hasEnumTag(t) -} - -func hasEnumTag(t *types.Type) bool { - return types.ExtractCommentTags("+", t.CommentLines)[tagEnumType] != nil -} - -// whitespaceRegex is the regex for consecutive whitespaces. -var whitespaceRegex = regexp.MustCompile(`\s+`) diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/extension.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/extension.go deleted file mode 100644 index e37d93ef733..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/extension.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package generators - -import ( - "fmt" - "sort" - "strings" - - "k8s.io/gengo/examples/set-gen/sets" - "k8s.io/gengo/types" -) - -const extensionPrefix = "x-kubernetes-" - -// extensionAttributes encapsulates common traits for particular extensions. -type extensionAttributes struct { - xName string - kind types.Kind - allowedValues sets.String - enforceArray bool -} - -// Extension tag to openapi extension attributes -var tagToExtension = map[string]extensionAttributes{ - "patchMergeKey": { - xName: "x-kubernetes-patch-merge-key", - kind: types.Slice, - }, - "patchStrategy": { - xName: "x-kubernetes-patch-strategy", - kind: types.Slice, - allowedValues: sets.NewString("merge", "retainKeys"), - }, - "listMapKey": { - xName: "x-kubernetes-list-map-keys", - kind: types.Slice, - enforceArray: true, - }, - "listType": { - xName: "x-kubernetes-list-type", - kind: types.Slice, - allowedValues: sets.NewString("atomic", "set", "map"), - }, - "mapType": { - xName: "x-kubernetes-map-type", - kind: types.Map, - allowedValues: sets.NewString("atomic", "granular"), - }, - "structType": { - xName: "x-kubernetes-map-type", - kind: types.Struct, - allowedValues: sets.NewString("atomic", "granular"), - }, - "validations": { - xName: "x-kubernetes-validations", - kind: types.Slice, - }, -} - -// Extension encapsulates information necessary to generate an OpenAPI extension. -type extension struct { - idlTag string // Example: listType - xName string // Example: x-kubernetes-list-type - values []string // Example: [atomic] -} - -func (e extension) hasAllowedValues() bool { - return tagToExtension[e.idlTag].allowedValues.Len() > 0 -} - -func (e extension) allowedValues() sets.String { - return tagToExtension[e.idlTag].allowedValues -} - -func (e extension) hasKind() bool { - return len(tagToExtension[e.idlTag].kind) > 0 -} - -func (e extension) kind() types.Kind { - return tagToExtension[e.idlTag].kind -} - -func (e extension) validateAllowedValues() error { - // allowedValues not set means no restrictions on values. - if !e.hasAllowedValues() { - return nil - } - // Check for missing value. - if len(e.values) == 0 { - return fmt.Errorf("%s needs a value, none given.", e.idlTag) - } - // For each extension value, validate that it is allowed. - allowedValues := e.allowedValues() - if !allowedValues.HasAll(e.values...) { - return fmt.Errorf("%v not allowed for %s. Allowed values: %v", - e.values, e.idlTag, allowedValues.List()) - } - return nil -} - -func (e extension) validateType(kind types.Kind) error { - // If this extension class has no kind, then don't validate the type. - if !e.hasKind() { - return nil - } - if kind != e.kind() { - return fmt.Errorf("tag %s on type %v; only allowed on type %v", - e.idlTag, kind, e.kind()) - } - return nil -} - -func (e extension) hasMultipleValues() bool { - return len(e.values) > 1 -} - -func (e extension) isAlwaysArrayFormat() bool { - return tagToExtension[e.idlTag].enforceArray -} - -// Returns sorted list of map keys. Needed for deterministic testing. -func sortedMapKeys(m map[string][]string) []string { - keys := make([]string, len(m)) - i := 0 - for k := range m { - keys[i] = k - i++ - } - sort.Strings(keys) - return keys -} - -// Parses comments to return openapi extensions. Returns a list of -// extensions which parsed correctly, as well as a list of the -// parse errors. Validating extensions is performed separately. -// NOTE: Non-empty errors does not mean extensions is empty. -func parseExtensions(comments []string) ([]extension, []error) { - extensions := []extension{} - errors := []error{} - // First, generate extensions from "+k8s:openapi-gen=x-kubernetes-*" annotations. - values := getOpenAPITagValue(comments) - for _, val := range values { - // Example: x-kubernetes-member-tag:member_test - if strings.HasPrefix(val, extensionPrefix) { - parts := strings.SplitN(val, ":", 2) - if len(parts) != 2 { - errors = append(errors, fmt.Errorf("invalid extension value: %v", val)) - continue - } - e := extension{ - idlTag: tagName, // Example: k8s:openapi-gen - xName: parts[0], // Example: x-kubernetes-member-tag - values: []string{parts[1]}, // Example: member_test - } - extensions = append(extensions, e) - } - } - // Next, generate extensions from "idlTags" (e.g. +listType) - tagValues := types.ExtractCommentTags("+", comments) - for _, idlTag := range sortedMapKeys(tagValues) { - xAttrs, exists := tagToExtension[idlTag] - if !exists { - continue - } - values := tagValues[idlTag] - e := extension{ - idlTag: idlTag, // listType - xName: xAttrs.xName, // x-kubernetes-list-type - values: values, // [atomic] - } - extensions = append(extensions, e) - } - return extensions, errors -} - -func validateMemberExtensions(extensions []extension, m *types.Member) []error { - errors := []error{} - for _, e := range extensions { - if err := e.validateAllowedValues(); err != nil { - errors = append(errors, err) - } - if err := e.validateType(m.Type.Kind); err != nil { - errors = append(errors, err) - } - } - return errors -} diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/markers.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/markers.go deleted file mode 100644 index 9294728ced1..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/markers.go +++ /dev/null @@ -1,345 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package generators - -import ( - "encoding/json" - "errors" - "fmt" - "regexp" - "strconv" - "strings" - - defaultergen "k8s.io/gengo/examples/defaulter-gen/generators" - "k8s.io/gengo/types" - openapi "k8s.io/kube-openapi/pkg/common" - "k8s.io/kube-openapi/pkg/validation/spec" -) - -// CommentTags represents the parsed comment tags for a given type. These types are then used to generate schema validations. -type CommentTags struct { - spec.SchemaProps - - // Future markers can all be parsed into this centralized struct... - // Optional bool `json:"optional,omitempty"` - // Default any `json:"default,omitempty"` -} - -// validates the parameters in a CommentTags instance. Returns any errors encountered. -func (c CommentTags) Validate() error { - - var err error - - if c.MinLength != nil && *c.MinLength < 0 { - err = errors.Join(err, fmt.Errorf("minLength cannot be negative")) - } - if c.MaxLength != nil && *c.MaxLength < 0 { - err = errors.Join(err, fmt.Errorf("maxLength cannot be negative")) - } - if c.MinItems != nil && *c.MinItems < 0 { - err = errors.Join(err, fmt.Errorf("minItems cannot be negative")) - } - if c.MaxItems != nil && *c.MaxItems < 0 { - err = errors.Join(err, fmt.Errorf("maxItems cannot be negative")) - } - if c.MinProperties != nil && *c.MinProperties < 0 { - err = errors.Join(err, fmt.Errorf("minProperties cannot be negative")) - } - if c.MaxProperties != nil && *c.MaxProperties < 0 { - err = errors.Join(err, fmt.Errorf("maxProperties cannot be negative")) - } - if c.Minimum != nil && c.Maximum != nil && *c.Minimum > *c.Maximum { - err = errors.Join(err, fmt.Errorf("minimum %f is greater than maximum %f", *c.Minimum, *c.Maximum)) - } - if (c.ExclusiveMinimum || c.ExclusiveMaximum) && c.Minimum != nil && c.Maximum != nil && *c.Minimum == *c.Maximum { - err = errors.Join(err, fmt.Errorf("exclusiveMinimum/Maximum cannot be set when minimum == maximum")) - } - if c.MinLength != nil && c.MaxLength != nil && *c.MinLength > *c.MaxLength { - err = errors.Join(err, fmt.Errorf("minLength %d is greater than maxLength %d", *c.MinLength, *c.MaxLength)) - } - if c.MinItems != nil && c.MaxItems != nil && *c.MinItems > *c.MaxItems { - err = errors.Join(err, fmt.Errorf("minItems %d is greater than maxItems %d", *c.MinItems, *c.MaxItems)) - } - if c.MinProperties != nil && c.MaxProperties != nil && *c.MinProperties > *c.MaxProperties { - err = errors.Join(err, fmt.Errorf("minProperties %d is greater than maxProperties %d", *c.MinProperties, *c.MaxProperties)) - } - if c.Pattern != "" { - _, e := regexp.Compile(c.Pattern) - if e != nil { - err = errors.Join(err, fmt.Errorf("invalid pattern %q: %v", c.Pattern, e)) - } - } - if c.MultipleOf != nil && *c.MultipleOf == 0 { - err = errors.Join(err, fmt.Errorf("multipleOf cannot be 0")) - } - - return err -} - -// Performs type-specific validation for CommentTags porameters. Accepts a Type instance and returns any errors encountered during validation. -func (c CommentTags) ValidateType(t *types.Type) error { - var err error - - resolvedType := resolveAliasAndPtrType(t) - typeString, _ := openapi.OpenAPITypeFormat(resolvedType.String()) // will be empty for complicated types - isNoValidate := resolvedType.Kind == types.Interface || resolvedType.Kind == types.Struct - - if !isNoValidate { - - isArray := resolvedType.Kind == types.Slice || resolvedType.Kind == types.Array - isMap := resolvedType.Kind == types.Map - isString := typeString == "string" - isInt := typeString == "integer" - isFloat := typeString == "number" - - if c.MaxItems != nil && !isArray { - err = errors.Join(err, fmt.Errorf("maxItems can only be used on array types")) - } - if c.MinItems != nil && !isArray { - err = errors.Join(err, fmt.Errorf("minItems can only be used on array types")) - } - if c.UniqueItems && !isArray { - err = errors.Join(err, fmt.Errorf("uniqueItems can only be used on array types")) - } - if c.MaxProperties != nil && !isMap { - err = errors.Join(err, fmt.Errorf("maxProperties can only be used on map types")) - } - if c.MinProperties != nil && !isMap { - err = errors.Join(err, fmt.Errorf("minProperties can only be used on map types")) - } - if c.MinLength != nil && !isString { - err = errors.Join(err, fmt.Errorf("minLength can only be used on string types")) - } - if c.MaxLength != nil && !isString { - err = errors.Join(err, fmt.Errorf("maxLength can only be used on string types")) - } - if c.Pattern != "" && !isString { - err = errors.Join(err, fmt.Errorf("pattern can only be used on string types")) - } - if c.Minimum != nil && !isInt && !isFloat { - err = errors.Join(err, fmt.Errorf("minimum can only be used on numeric types")) - } - if c.Maximum != nil && !isInt && !isFloat { - err = errors.Join(err, fmt.Errorf("maximum can only be used on numeric types")) - } - if c.MultipleOf != nil && !isInt && !isFloat { - err = errors.Join(err, fmt.Errorf("multipleOf can only be used on numeric types")) - } - if c.ExclusiveMinimum && !isInt && !isFloat { - err = errors.Join(err, fmt.Errorf("exclusiveMinimum can only be used on numeric types")) - } - if c.ExclusiveMaximum && !isInt && !isFloat { - err = errors.Join(err, fmt.Errorf("exclusiveMaximum can only be used on numeric types")) - } - } - - return err -} - -// Parses the given comments into a CommentTags type. Validates the parsed comment tags, and returns the result. -// Accepts an optional type to validate against, and a prefix to filter out markers not related to validation. -// Accepts a prefix to filter out markers not related to validation. -// Returns any errors encountered while parsing or validating the comment tags. -func ParseCommentTags(t *types.Type, comments []string, prefix string) (CommentTags, error) { - - markers, err := parseMarkers(comments, prefix) - if err != nil { - return CommentTags{}, fmt.Errorf("failed to parse marker comments: %w", err) - } - nested, err := nestMarkers(markers) - if err != nil { - return CommentTags{}, fmt.Errorf("invalid marker comments: %w", err) - } - - // Parse the map into a CommentTags type by marshalling and unmarshalling - // as JSON in leiu of an unstructured converter. - out, err := json.Marshal(nested) - if err != nil { - return CommentTags{}, fmt.Errorf("failed to marshal marker comments: %w", err) - } - - var commentTags CommentTags - if err = json.Unmarshal(out, &commentTags); err != nil { - return CommentTags{}, fmt.Errorf("failed to unmarshal marker comments: %w", err) - } - - // Validate the parsed comment tags - validationErrors := commentTags.Validate() - - if t != nil { - validationErrors = errors.Join(validationErrors, commentTags.ValidateType(t)) - } - - if validationErrors != nil { - return CommentTags{}, fmt.Errorf("invalid marker comments: %w", validationErrors) - } - - return commentTags, nil -} - -// Extracts and parses the given marker comments into a map of key -> value. -// Accepts a prefix to filter out markers not related to validation. -// The prefix is removed from the key in the returned map. -// Empty keys and invalid values will return errors, refs are currently unsupported and will be skipped. -func parseMarkers(markerComments []string, prefix string) (map[string]any, error) { - markers := types.ExtractCommentTags("+", markerComments) - - // Parse the values as JSON - result := map[string]any{} - for key, value := range markers { - if !strings.HasPrefix(key, prefix) { - // we only care about validation markers for now - continue - } - - newKey := strings.TrimPrefix(key, prefix) - - // Skip ref markers - if len(value) == 1 { - _, ok := defaultergen.ParseSymbolReference(value[0], "") - if ok { - continue - } - } - if len(newKey) == 0 { - return nil, fmt.Errorf("cannot have empty key for marker comment") - } else if len(value) == 0 || (len(value) == 1 && len(value[0]) == 0) { - // Empty value means key is implicitly a bool - result[newKey] = true - continue - } - - newVal := []any{} - for _, v := range value { - var unmarshalled interface{} - err := json.Unmarshal([]byte(v), &unmarshalled) - if err != nil { - return nil, fmt.Errorf("invalid value for key %v: %w", key, err) - } - - newVal = append(newVal, unmarshalled) - } - - if len(newVal) == 1 { - result[newKey] = newVal[0] - } else { - result[newKey] = newVal - } - } - return result, nil -} - -// Converts a map of: -// -// "a:b:c": 1 -// "a:b:d": 2 -// "a:e": 3 -// "f": 4 -// -// Into: -// -// map[string]any{ -// "a": map[string]any{ -// "b": map[string]any{ -// "c": 1, -// "d": 2, -// }, -// "e": 3, -// }, -// "f": 4, -// } -// -// Returns a list of joined errors for any invalid keys. See putNestedValue for more details. -func nestMarkers(markers map[string]any) (map[string]any, error) { - nested := make(map[string]any) - var errs []error - for key, value := range markers { - var err error - keys := strings.Split(key, ":") - nested, err = putNestedValue(nested, keys, value) - if err != nil { - errs = append(errs, err) - } - } - - if len(errs) > 0 { - return nil, errors.Join(errs...) - } - - return nested, nil -} - -// Recursively puts a value into the given keypath, creating intermediate maps -// and slices as needed. If a key is of the form `foo[bar]`, then bar will be -// treated as an index into the array foo. If bar is not a valid integer, putNestedValue returns an error. -func putNestedValue(m map[string]any, k []string, v any) (map[string]any, error) { - if len(k) == 0 { - return m, nil - } - - key := k[0] - rest := k[1:] - - if idxIdx := strings.Index(key, "["); idxIdx > -1 { - key := key[:idxIdx] - index, err := strconv.Atoi(strings.Split(key[idxIdx+1:], "]")[0]) - if err != nil { - // Ignore key - return nil, fmt.Errorf("expected integer index in key %v, got %v", key, key[idxIdx+1:]) - } - - var arrayDestination []any - if existing, ok := m[key]; !ok { - arrayDestination = make([]any, index+1) - } else { - // Ensure array is big enough - arrayDestination = append(existing.([]any), make([]any, index-len(existing.([]any))+1)...) - } - - m[key] = arrayDestination - if arrayDestination[index] == nil { - // Doesn't exist case - destination := make(map[string]any) - arrayDestination[index] = destination - return putNestedValue(destination, rest, v) - } else if dst, ok := arrayDestination[index].(map[string]any); ok { - // Already exists case, correct type - return putNestedValue(dst, rest, v) - } - - // Already exists, incorrect type. Error - // This can happen if you referred to this field without the [] in - // a past comment - return m, nil - } else if len(rest) == 0 { - // Base case. Single key. Just set into destination - m[key] = v - return m, nil - } - - if existing, ok := m[key]; !ok { - destination := make(map[string]any) - m[key] = destination - return putNestedValue(destination, rest, v) - } else if destination, ok := existing.(map[string]any); ok { - return putNestedValue(destination, rest, v) - } else { - // Error case. Existing isn't of correct type. Can happen if prior comment - // referred to value as an error - return nil, fmt.Errorf("expected map[string]any at key %v, got %T", key, existing) - } -} diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go deleted file mode 100644 index 9980a15d4b3..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go +++ /dev/null @@ -1,968 +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 generators - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "path/filepath" - "reflect" - "sort" - "strings" - - defaultergen "k8s.io/gengo/examples/defaulter-gen/generators" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - openapi "k8s.io/kube-openapi/pkg/common" - "k8s.io/kube-openapi/pkg/validation/spec" - - "k8s.io/klog/v2" -) - -// This is the comment tag that carries parameters for open API generation. -const tagName = "k8s:openapi-gen" -const markerPrefix = "k8s:validation:" -const tagOptional = "optional" -const tagDefault = "default" - -// Known values for the tag. -const ( - tagValueTrue = "true" - tagValueFalse = "false" -) - -// Used for temporary validation of patch struct tags. -// TODO: Remove patch struct tag validation because they we are now consuming OpenAPI on server. -var tempPatchTags = [...]string{ - "patchMergeKey", - "patchStrategy", -} - -func getOpenAPITagValue(comments []string) []string { - return types.ExtractCommentTags("+", comments)[tagName] -} - -func getSingleTagsValue(comments []string, tag string) (string, error) { - tags, ok := types.ExtractCommentTags("+", comments)[tag] - if !ok || len(tags) == 0 { - return "", nil - } - if len(tags) > 1 { - return "", fmt.Errorf("multiple values are not allowed for tag %s", tag) - } - return tags[0], nil -} - -func hasOpenAPITagValue(comments []string, value string) bool { - tagValues := getOpenAPITagValue(comments) - for _, val := range tagValues { - if val == value { - return true - } - } - return false -} - -// hasOptionalTag returns true if the member has +optional in its comments or -// omitempty in its json tags. -func hasOptionalTag(m *types.Member) bool { - hasOptionalCommentTag := types.ExtractCommentTags( - "+", m.CommentLines)[tagOptional] != nil - hasOptionalJsonTag := strings.Contains( - reflect.StructTag(m.Tags).Get("json"), "omitempty") - return hasOptionalCommentTag || hasOptionalJsonTag -} - -func apiTypeFilterFunc(c *generator.Context, t *types.Type) bool { - // There is a conflict between this codegen and codecgen, we should avoid types generated for codecgen - if strings.HasPrefix(t.Name.Name, "codecSelfer") { - return false - } - pkg := c.Universe.Package(t.Name.Package) - if hasOpenAPITagValue(pkg.Comments, tagValueTrue) { - return !hasOpenAPITagValue(t.CommentLines, tagValueFalse) - } - if hasOpenAPITagValue(t.CommentLines, tagValueTrue) { - return true - } - return false -} - -const ( - specPackagePath = "k8s.io/kube-openapi/pkg/validation/spec" - openAPICommonPackagePath = "k8s.io/kube-openapi/pkg/common" -) - -// openApiGen produces a file with auto-generated OpenAPI functions. -type openAPIGen struct { - generator.DefaultGen - // TargetPackage is the package that will get GetOpenAPIDefinitions function returns all open API definitions. - targetPackage string - imports namer.ImportTracker -} - -func newOpenAPIGen(sanitizedName string, targetPackage string) generator.Generator { - return &openAPIGen{ - DefaultGen: generator.DefaultGen{ - OptionalName: sanitizedName, - }, - imports: generator.NewImportTrackerForPackage(targetPackage), - targetPackage: targetPackage, - } -} - -const nameTmpl = "schema_$.type|private$" - -func (g *openAPIGen) Namers(c *generator.Context) namer.NameSystems { - // Have the raw namer for this file track what it imports. - return namer.NameSystems{ - "raw": namer.NewRawNamer(g.targetPackage, g.imports), - "private": &namer.NameStrategy{ - Join: func(pre string, in []string, post string) string { - return strings.Join(in, "_") - }, - PrependPackageNames: 4, // enough to fully qualify from k8s.io/api/... - }, - } -} - -func (g *openAPIGen) isOtherPackage(pkg string) bool { - if pkg == g.targetPackage { - return false - } - if strings.HasSuffix(pkg, "\""+g.targetPackage+"\"") { - return false - } - return true -} - -func (g *openAPIGen) Imports(c *generator.Context) []string { - importLines := []string{} - for _, singleImport := range g.imports.ImportLines() { - importLines = append(importLines, singleImport) - } - return importLines -} - -func argsFromType(t *types.Type) generator.Args { - return generator.Args{ - "type": t, - "ReferenceCallback": types.Ref(openAPICommonPackagePath, "ReferenceCallback"), - "OpenAPIDefinition": types.Ref(openAPICommonPackagePath, "OpenAPIDefinition"), - "SpecSchemaType": types.Ref(specPackagePath, "Schema"), - } -} - -func (g *openAPIGen) Init(c *generator.Context, w io.Writer) error { - sw := generator.NewSnippetWriter(w, c, "$", "$") - sw.Do("func GetOpenAPIDefinitions(ref $.ReferenceCallback|raw$) map[string]$.OpenAPIDefinition|raw$ {\n", argsFromType(nil)) - sw.Do("return map[string]$.OpenAPIDefinition|raw${\n", argsFromType(nil)) - - for _, t := range c.Order { - err := newOpenAPITypeWriter(sw, c).generateCall(t) - if err != nil { - return err - } - } - - sw.Do("}\n", nil) - sw.Do("}\n\n", nil) - - return sw.Error() -} - -func (g *openAPIGen) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { - klog.V(5).Infof("generating for type %v", t) - sw := generator.NewSnippetWriter(w, c, "$", "$") - err := newOpenAPITypeWriter(sw, c).generate(t) - if err != nil { - return err - } - return sw.Error() -} - -func getJsonTags(m *types.Member) []string { - jsonTag := reflect.StructTag(m.Tags).Get("json") - if jsonTag == "" { - return []string{} - } - return strings.Split(jsonTag, ",") -} - -func getReferableName(m *types.Member) string { - jsonTags := getJsonTags(m) - if len(jsonTags) > 0 { - if jsonTags[0] == "-" { - return "" - } else { - return jsonTags[0] - } - } else { - return m.Name - } -} - -func shouldInlineMembers(m *types.Member) bool { - jsonTags := getJsonTags(m) - return len(jsonTags) > 1 && jsonTags[1] == "inline" -} - -type openAPITypeWriter struct { - *generator.SnippetWriter - context *generator.Context - refTypes map[string]*types.Type - enumContext *enumContext - GetDefinitionInterface *types.Type -} - -func newOpenAPITypeWriter(sw *generator.SnippetWriter, c *generator.Context) openAPITypeWriter { - return openAPITypeWriter{ - SnippetWriter: sw, - context: c, - refTypes: map[string]*types.Type{}, - enumContext: newEnumContext(c), - } -} - -func methodReturnsValue(mt *types.Type, pkg, name string) bool { - if len(mt.Signature.Parameters) != 0 || len(mt.Signature.Results) != 1 { - return false - } - r := mt.Signature.Results[0] - return r.Name.Name == name && r.Name.Package == pkg -} - -func hasOpenAPIV3DefinitionMethod(t *types.Type) bool { - for mn, mt := range t.Methods { - if mn != "OpenAPIV3Definition" { - continue - } - return methodReturnsValue(mt, openAPICommonPackagePath, "OpenAPIDefinition") - } - return false -} - -func hasOpenAPIDefinitionMethod(t *types.Type) bool { - for mn, mt := range t.Methods { - if mn != "OpenAPIDefinition" { - continue - } - return methodReturnsValue(mt, openAPICommonPackagePath, "OpenAPIDefinition") - } - return false -} - -func hasOpenAPIDefinitionMethods(t *types.Type) bool { - var hasSchemaTypeMethod, hasOpenAPISchemaFormat bool - for mn, mt := range t.Methods { - switch mn { - case "OpenAPISchemaType": - hasSchemaTypeMethod = methodReturnsValue(mt, "", "[]string") - case "OpenAPISchemaFormat": - hasOpenAPISchemaFormat = methodReturnsValue(mt, "", "string") - } - } - return hasSchemaTypeMethod && hasOpenAPISchemaFormat -} - -func hasOpenAPIV3OneOfMethod(t *types.Type) bool { - for mn, mt := range t.Methods { - if mn != "OpenAPIV3OneOfTypes" { - continue - } - return methodReturnsValue(mt, "", "[]string") - } - return false -} - -// typeShortName returns short package name (e.g. the name x appears in package x definition) dot type name. -func typeShortName(t *types.Type) string { - return filepath.Base(t.Name.Package) + "." + t.Name.Name -} - -func (g openAPITypeWriter) generateMembers(t *types.Type, required []string) ([]string, error) { - var err error - for t.Kind == types.Pointer { // fast-forward to effective type containing members - t = t.Elem - } - for _, m := range t.Members { - if hasOpenAPITagValue(m.CommentLines, tagValueFalse) { - continue - } - if shouldInlineMembers(&m) { - required, err = g.generateMembers(m.Type, required) - if err != nil { - return required, err - } - continue - } - name := getReferableName(&m) - if name == "" { - continue - } - if !hasOptionalTag(&m) { - required = append(required, name) - } - if err = g.generateProperty(&m, t); err != nil { - klog.Errorf("Error when generating: %v, %v\n", name, m) - return required, err - } - } - return required, nil -} - -func (g openAPITypeWriter) generateCall(t *types.Type) error { - // Only generate for struct type and ignore the rest - switch t.Kind { - case types.Struct: - args := argsFromType(t) - g.Do("\"$.$\": ", t.Name) - - hasV2Definition := hasOpenAPIDefinitionMethod(t) - hasV2DefinitionTypeAndFormat := hasOpenAPIDefinitionMethods(t) - hasV3Definition := hasOpenAPIV3DefinitionMethod(t) - - switch { - case hasV2DefinitionTypeAndFormat: - g.Do(nameTmpl+"(ref),\n", args) - case hasV2Definition && hasV3Definition: - g.Do("common.EmbedOpenAPIDefinitionIntoV2Extension($.type|raw${}.OpenAPIV3Definition(), $.type|raw${}.OpenAPIDefinition()),\n", args) - case hasV2Definition: - g.Do("$.type|raw${}.OpenAPIDefinition(),\n", args) - case hasV3Definition: - g.Do("$.type|raw${}.OpenAPIV3Definition(),\n", args) - default: - g.Do(nameTmpl+"(ref),\n", args) - } - } - return g.Error() -} - -func (g openAPITypeWriter) generateValueValidations(vs *spec.SchemaProps) error { - - if vs == nil { - return nil - } - args := generator.Args{ - "ptrTo": &types.Type{ - Name: types.Name{ - Package: "k8s.io/utils/ptr", - Name: "To", - }}, - "spec": vs, - } - if vs.Minimum != nil { - g.Do("Minimum: $.ptrTo|raw$[float64]($.spec.Minimum$),\n", args) - } - if vs.Maximum != nil { - g.Do("Maximum: $.ptrTo|raw$[float64]($.spec.Maximum$),\n", args) - } - if vs.ExclusiveMinimum { - g.Do("ExclusiveMinimum: true,\n", args) - } - if vs.ExclusiveMaximum { - g.Do("ExclusiveMaximum: true,\n", args) - } - if vs.MinLength != nil { - g.Do("MinLength: $.ptrTo|raw$[int64]($.spec.MinLength$),\n", args) - } - if vs.MaxLength != nil { - g.Do("MaxLength: $.ptrTo|raw$[int64]($.spec.MaxLength$),\n", args) - } - - if vs.MinProperties != nil { - g.Do("MinProperties: $.ptrTo|raw$[int64]($.spec.MinProperties$),\n", args) - } - if vs.MaxProperties != nil { - g.Do("MaxProperties: $.ptrTo|raw$[int64]($.spec.MaxProperties$),\n", args) - } - if len(vs.Pattern) > 0 { - p, err := json.Marshal(vs.Pattern) - if err != nil { - return err - } - g.Do("Pattern: $.$,\n", string(p)) - } - if vs.MultipleOf != nil { - g.Do("MultipleOf: $.ptrTo|raw$[float64]($.spec.MultipleOf$),\n", args) - } - if vs.MinItems != nil { - g.Do("MinItems: $.ptrTo|raw$[int64]($.spec.MinItems$),\n", args) - } - if vs.MaxItems != nil { - g.Do("MaxItems: $.ptrTo|raw$[int64]($.spec.MaxItems$),\n", args) - } - if vs.UniqueItems { - g.Do("UniqueItems: true,\n", nil) - } - return nil -} - -func (g openAPITypeWriter) generate(t *types.Type) error { - // Only generate for struct type and ignore the rest - switch t.Kind { - case types.Struct: - overrides, err := ParseCommentTags(t, t.CommentLines, markerPrefix) - if err != nil { - return err - } - - hasV2Definition := hasOpenAPIDefinitionMethod(t) - hasV2DefinitionTypeAndFormat := hasOpenAPIDefinitionMethods(t) - hasV3OneOfTypes := hasOpenAPIV3OneOfMethod(t) - hasV3Definition := hasOpenAPIV3DefinitionMethod(t) - - if hasV2Definition || (hasV3Definition && !hasV2DefinitionTypeAndFormat) { - // already invoked directly - return nil - } - - args := argsFromType(t) - g.Do("func "+nameTmpl+"(ref $.ReferenceCallback|raw$) $.OpenAPIDefinition|raw$ {\n", args) - switch { - case hasV2DefinitionTypeAndFormat && hasV3Definition: - g.Do("return common.EmbedOpenAPIDefinitionIntoV2Extension($.type|raw${}.OpenAPIV3Definition(), $.OpenAPIDefinition|raw${\n"+ - "Schema: spec.Schema{\n"+ - "SchemaProps: spec.SchemaProps{\n", args) - g.generateDescription(t.CommentLines) - g.Do("Type:$.type|raw${}.OpenAPISchemaType(),\n"+ - "Format:$.type|raw${}.OpenAPISchemaFormat(),\n", args) - err = g.generateValueValidations(&overrides.SchemaProps) - if err != nil { - return err - } - g.Do("},\n"+ - "},\n"+ - "})\n}\n\n", args) - return nil - case hasV2DefinitionTypeAndFormat && hasV3OneOfTypes: - // generate v3 def. - g.Do("return common.EmbedOpenAPIDefinitionIntoV2Extension($.OpenAPIDefinition|raw${\n"+ - "Schema: spec.Schema{\n"+ - "SchemaProps: spec.SchemaProps{\n", args) - g.generateDescription(t.CommentLines) - g.Do("OneOf:common.GenerateOpenAPIV3OneOfSchema($.type|raw${}.OpenAPIV3OneOfTypes()),\n"+ - "Format:$.type|raw${}.OpenAPISchemaFormat(),\n", args) - err = g.generateValueValidations(&overrides.SchemaProps) - if err != nil { - return err - } - g.Do( - "},\n"+ - "},\n"+ - "},", args) - // generate v2 def. - g.Do("$.OpenAPIDefinition|raw${\n"+ - "Schema: spec.Schema{\n"+ - "SchemaProps: spec.SchemaProps{\n", args) - g.generateDescription(t.CommentLines) - g.Do("Type:$.type|raw${}.OpenAPISchemaType(),\n"+ - "Format:$.type|raw${}.OpenAPISchemaFormat(),\n", args) - err = g.generateValueValidations(&overrides.SchemaProps) - if err != nil { - return err - } - g.Do("},\n"+ - "},\n"+ - "})\n}\n\n", args) - return nil - case hasV2DefinitionTypeAndFormat: - g.Do("return $.OpenAPIDefinition|raw${\n"+ - "Schema: spec.Schema{\n"+ - "SchemaProps: spec.SchemaProps{\n", args) - g.generateDescription(t.CommentLines) - g.Do("Type:$.type|raw${}.OpenAPISchemaType(),\n"+ - "Format:$.type|raw${}.OpenAPISchemaFormat(),\n", args) - err = g.generateValueValidations(&overrides.SchemaProps) - if err != nil { - return err - } - g.Do("},\n"+ - "},\n"+ - "}\n}\n\n", args) - return nil - case hasV3OneOfTypes: - // having v3 oneOf types without custom v2 type or format does not make sense. - return fmt.Errorf("type %q has v3 one of types but not v2 type or format", t.Name) - } - - g.Do("return $.OpenAPIDefinition|raw${\nSchema: spec.Schema{\nSchemaProps: spec.SchemaProps{\n", args) - g.generateDescription(t.CommentLines) - g.Do("Type: []string{\"object\"},\n", nil) - err = g.generateValueValidations(&overrides.SchemaProps) - if err != nil { - return err - } - - // write members into a temporary buffer, in order to postpone writing out the Properties field. We only do - // that if it is not empty. - propertiesBuf := bytes.Buffer{} - bsw := g - bsw.SnippetWriter = generator.NewSnippetWriter(&propertiesBuf, g.context, "$", "$") - required, err := bsw.generateMembers(t, []string{}) - if err != nil { - return err - } - if propertiesBuf.Len() > 0 { - g.Do("Properties: map[string]$.SpecSchemaType|raw${\n", args) - g.Do(strings.Replace(propertiesBuf.String(), "$", "$\"$\"$", -1), nil) // escape $ (used as delimiter of the templates) - g.Do("},\n", nil) - } - - if len(required) > 0 { - g.Do("Required: []string{\"$.$\"},\n", strings.Join(required, "\",\"")) - } - g.Do("},\n", nil) - if err := g.generateStructExtensions(t); err != nil { - return err - } - g.Do("},\n", nil) - - // Map order is undefined, sort them or we may get a different file generated each time. - keys := []string{} - for k := range g.refTypes { - keys = append(keys, k) - } - sort.Strings(keys) - deps := []string{} - for _, k := range keys { - v := g.refTypes[k] - if t, _ := openapi.OpenAPITypeFormat(v.String()); t != "" { - // This is a known type, we do not need a reference to it - // Will eliminate special case of time.Time - continue - } - deps = append(deps, k) - } - if len(deps) > 0 { - g.Do("Dependencies: []string{\n", args) - for _, k := range deps { - g.Do("\"$.$\",", k) - } - g.Do("},\n", nil) - } - g.Do("}\n}\n\n", nil) - } - return nil -} - -func (g openAPITypeWriter) generateStructExtensions(t *types.Type) error { - extensions, errors := parseExtensions(t.CommentLines) - // Initially, we will only log struct extension errors. - if len(errors) > 0 { - for _, e := range errors { - klog.Errorf("[%s]: %s\n", t.String(), e) - } - } - unions, errors := parseUnions(t) - if len(errors) > 0 { - for _, e := range errors { - klog.Errorf("[%s]: %s\n", t.String(), e) - } - } - - // TODO(seans3): Validate struct extensions here. - g.emitExtensions(extensions, unions) - return nil -} - -func (g openAPITypeWriter) generateMemberExtensions(m *types.Member, parent *types.Type) error { - extensions, parseErrors := parseExtensions(m.CommentLines) - validationErrors := validateMemberExtensions(extensions, m) - errors := append(parseErrors, validationErrors...) - // Initially, we will only log member extension errors. - if len(errors) > 0 { - errorPrefix := fmt.Sprintf("[%s] %s:", parent.String(), m.String()) - for _, e := range errors { - klog.V(2).Infof("%s %s\n", errorPrefix, e) - } - } - g.emitExtensions(extensions, nil) - return nil -} - -func (g openAPITypeWriter) emitExtensions(extensions []extension, unions []union) { - // If any extensions exist, then emit code to create them. - if len(extensions) == 0 && len(unions) == 0 { - return - } - g.Do("VendorExtensible: spec.VendorExtensible{\nExtensions: spec.Extensions{\n", nil) - for _, extension := range extensions { - g.Do("\"$.$\": ", extension.xName) - if extension.hasMultipleValues() || extension.isAlwaysArrayFormat() { - g.Do("[]interface{}{\n", nil) - } - for _, value := range extension.values { - g.Do("\"$.$\",\n", value) - } - if extension.hasMultipleValues() || extension.isAlwaysArrayFormat() { - g.Do("},\n", nil) - } - } - if len(unions) > 0 { - g.Do("\"x-kubernetes-unions\": []interface{}{\n", nil) - for _, u := range unions { - u.emit(g) - } - g.Do("},\n", nil) - } - g.Do("},\n},\n", nil) -} - -// TODO(#44005): Move this validation outside of this generator (probably to policy verifier) -func (g openAPITypeWriter) validatePatchTags(m *types.Member, parent *types.Type) error { - // TODO: Remove patch struct tag validation because they we are now consuming OpenAPI on server. - for _, tagKey := range tempPatchTags { - structTagValue := reflect.StructTag(m.Tags).Get(tagKey) - commentTagValue, err := getSingleTagsValue(m.CommentLines, tagKey) - if err != nil { - return err - } - if structTagValue != commentTagValue { - return fmt.Errorf("Tags in comment and struct should match for member (%s) of (%s)", - m.Name, parent.Name.String()) - } - } - return nil -} - -func defaultFromComments(comments []string, commentPath string, t *types.Type) (interface{}, *types.Name, error) { - var tag string - - for { - var err error - tag, err = getSingleTagsValue(comments, tagDefault) - if err != nil { - return nil, nil, err - } - - if t == nil || len(tag) > 0 { - break - } - - comments = t.CommentLines - commentPath = t.Name.Package - switch t.Kind { - case types.Pointer: - t = t.Elem - case types.Alias: - t = t.Underlying - default: - t = nil - } - } - - if tag == "" { - return nil, nil, nil - } - - var i interface{} - if id, ok := defaultergen.ParseSymbolReference(tag, commentPath); ok { - klog.Errorf("%v, %v", id, commentPath) - return nil, &id, nil - } else if err := json.Unmarshal([]byte(tag), &i); err != nil { - return nil, nil, fmt.Errorf("failed to unmarshal default: %v", err) - } - return i, nil, nil -} - -func implementsCustomUnmarshalling(t *types.Type) bool { - switch t.Kind { - case types.Pointer: - unmarshaller, isUnmarshaller := t.Elem.Methods["UnmarshalJSON"] - return isUnmarshaller && unmarshaller.Signature.Receiver.Kind == types.Pointer - case types.Struct: - _, isUnmarshaller := t.Methods["UnmarshalJSON"] - return isUnmarshaller - default: - return false - } -} - -func mustEnforceDefault(t *types.Type, omitEmpty bool) (interface{}, error) { - // Treat types with custom unmarshalling as a value - // (Can be alias, struct, or pointer) - if implementsCustomUnmarshalling(t) { - // Since Go JSON deserializer always feeds `null` when present - // to structs with custom UnmarshalJSON, the zero value for - // these structs is also null. - // - // In general, Kubernetes API types with custom marshalling should - // marshal their empty values to `null`. - return nil, nil - } - - switch t.Kind { - case types.Alias: - return mustEnforceDefault(t.Underlying, omitEmpty) - case types.Pointer, types.Map, types.Slice, types.Array, types.Interface: - return nil, nil - case types.Struct: - if len(t.Members) == 1 && t.Members[0].Embedded { - // Treat a struct with a single embedded member the same as an alias - return mustEnforceDefault(t.Members[0].Type, omitEmpty) - } - - return map[string]interface{}{}, nil - case types.Builtin: - if !omitEmpty { - if zero, ok := openapi.OpenAPIZeroValue(t.String()); ok { - return zero, nil - } else { - return nil, fmt.Errorf("please add type %v to getOpenAPITypeFormat function", t) - } - } - return nil, nil - default: - return nil, fmt.Errorf("not sure how to enforce default for %v", t.Kind) - } -} - -func (g openAPITypeWriter) generateDefault(comments []string, t *types.Type, omitEmpty bool, commentOwningType *types.Type) error { - def, ref, err := defaultFromComments(comments, commentOwningType.Name.Package, t) - if err != nil { - return err - } - if enforced, err := mustEnforceDefault(t, omitEmpty); err != nil { - return err - } else if enforced != nil { - if def == nil { - def = enforced - } else if !reflect.DeepEqual(def, enforced) { - enforcedJson, _ := json.Marshal(enforced) - return fmt.Errorf("invalid default value (%#v) for non-pointer/non-omitempty. If specified, must be: %v", def, string(enforcedJson)) - } - } - if def != nil { - g.Do("Default: $.$,\n", fmt.Sprintf("%#v", def)) - } else if ref != nil { - g.Do("Default: $.|raw$,\n", &types.Type{Name: *ref}) - } - return nil -} - -func (g openAPITypeWriter) generateDescription(CommentLines []string) { - var buffer bytes.Buffer - delPrevChar := func() { - if buffer.Len() > 0 { - buffer.Truncate(buffer.Len() - 1) // Delete the last " " or "\n" - } - } - - for _, line := range CommentLines { - // Ignore all lines after --- - if line == "---" { - break - } - line = strings.TrimRight(line, " ") - leading := strings.TrimLeft(line, " ") - switch { - case len(line) == 0: // Keep paragraphs - delPrevChar() - buffer.WriteString("\n\n") - case strings.HasPrefix(leading, "TODO"): // Ignore one line TODOs - case strings.HasPrefix(leading, "+"): // Ignore instructions to go2idl - default: - if strings.HasPrefix(line, " ") || strings.HasPrefix(line, "\t") { - delPrevChar() - line = "\n" + line + "\n" // Replace it with newline. This is useful when we have a line with: "Example:\n\tJSON-something..." - } else { - line += " " - } - buffer.WriteString(line) - } - } - - postDoc := strings.TrimLeft(buffer.String(), "\n") - postDoc = strings.TrimRight(postDoc, "\n") - postDoc = strings.Replace(postDoc, "\\\"", "\"", -1) // replace user's \" to " - postDoc = strings.Replace(postDoc, "\"", "\\\"", -1) // Escape " - postDoc = strings.Replace(postDoc, "\n", "\\n", -1) - postDoc = strings.Replace(postDoc, "\t", "\\t", -1) - postDoc = strings.Trim(postDoc, " ") - if postDoc != "" { - g.Do("Description: \"$.$\",\n", postDoc) - } -} - -func (g openAPITypeWriter) generateProperty(m *types.Member, parent *types.Type) error { - name := getReferableName(m) - if name == "" { - return nil - } - if err := g.validatePatchTags(m, parent); err != nil { - return err - } - g.Do("\"$.$\": {\n", name) - if err := g.generateMemberExtensions(m, parent); err != nil { - return err - } - g.Do("SchemaProps: spec.SchemaProps{\n", nil) - var extraComments []string - if enumType, isEnum := g.enumContext.EnumType(m.Type); isEnum { - extraComments = enumType.DescriptionLines() - } - g.generateDescription(append(m.CommentLines, extraComments...)) - jsonTags := getJsonTags(m) - if len(jsonTags) > 1 && jsonTags[1] == "string" { - g.generateSimpleProperty("string", "") - g.Do("},\n},\n", nil) - return nil - } - omitEmpty := strings.Contains(reflect.StructTag(m.Tags).Get("json"), "omitempty") - if err := g.generateDefault(m.CommentLines, m.Type, omitEmpty, parent); err != nil { - return fmt.Errorf("failed to generate default in %v: %v: %v", parent, m.Name, err) - } - overrides, err := ParseCommentTags(m.Type, m.CommentLines, markerPrefix) - if err != nil { - return err - } - err = g.generateValueValidations(&overrides.SchemaProps) - if err != nil { - return err - } - t := resolveAliasAndPtrType(m.Type) - // If we can get a openAPI type and format for this type, we consider it to be simple property - typeString, format := openapi.OpenAPITypeFormat(t.String()) - if typeString != "" { - g.generateSimpleProperty(typeString, format) - if enumType, isEnum := g.enumContext.EnumType(m.Type); isEnum { - // original type is an enum, add "Enum: " and the values - g.Do("Enum: []interface{}{$.$},\n", strings.Join(enumType.ValueStrings(), ", ")) - } - g.Do("},\n},\n", nil) - return nil - } - switch t.Kind { - case types.Builtin: - return fmt.Errorf("please add type %v to getOpenAPITypeFormat function", t) - case types.Map: - if err := g.generateMapProperty(t); err != nil { - return fmt.Errorf("failed to generate map property in %v: %v: %v", parent, m.Name, err) - } - case types.Slice, types.Array: - if err := g.generateSliceProperty(t); err != nil { - return fmt.Errorf("failed to generate slice property in %v: %v: %v", parent, m.Name, err) - } - case types.Struct, types.Interface: - g.generateReferenceProperty(t) - default: - return fmt.Errorf("cannot generate spec for type %v", t) - } - g.Do("},\n},\n", nil) - return g.Error() -} - -func (g openAPITypeWriter) generateSimpleProperty(typeString, format string) { - g.Do("Type: []string{\"$.$\"},\n", typeString) - g.Do("Format: \"$.$\",\n", format) -} - -func (g openAPITypeWriter) generateReferenceProperty(t *types.Type) { - g.refTypes[t.Name.String()] = t - g.Do("Ref: ref(\"$.$\"),\n", t.Name.String()) -} - -func resolveAliasAndPtrType(t *types.Type) *types.Type { - var prev *types.Type - for prev != t { - prev = t - if t.Kind == types.Alias { - t = t.Underlying - } - if t.Kind == types.Pointer { - t = t.Elem - } - } - return t -} - -func (g openAPITypeWriter) generateMapProperty(t *types.Type) error { - keyType := resolveAliasAndPtrType(t.Key) - elemType := resolveAliasAndPtrType(t.Elem) - - // According to OpenAPI examples, only map from string is supported - if keyType.Name.Name != "string" { - return fmt.Errorf("map with non-string keys are not supported by OpenAPI in %v", t) - } - - g.Do("Type: []string{\"object\"},\n", nil) - g.Do("AdditionalProperties: &spec.SchemaOrBool{\nAllows: true,\nSchema: &spec.Schema{\nSchemaProps: spec.SchemaProps{\n", nil) - if err := g.generateDefault(t.Elem.CommentLines, t.Elem, false, t.Elem); err != nil { - return err - } - typeString, format := openapi.OpenAPITypeFormat(elemType.String()) - if typeString != "" { - g.generateSimpleProperty(typeString, format) - g.Do("},\n},\n},\n", nil) - return nil - } - switch elemType.Kind { - case types.Builtin: - return fmt.Errorf("please add type %v to getOpenAPITypeFormat function", elemType) - case types.Struct: - g.generateReferenceProperty(elemType) - case types.Slice, types.Array: - if err := g.generateSliceProperty(elemType); err != nil { - return err - } - case types.Map: - if err := g.generateMapProperty(elemType); err != nil { - return err - } - default: - return fmt.Errorf("map Element kind %v is not supported in %v", elemType.Kind, t.Name) - } - g.Do("},\n},\n},\n", nil) - return nil -} - -func (g openAPITypeWriter) generateSliceProperty(t *types.Type) error { - elemType := resolveAliasAndPtrType(t.Elem) - g.Do("Type: []string{\"array\"},\n", nil) - g.Do("Items: &spec.SchemaOrArray{\nSchema: &spec.Schema{\nSchemaProps: spec.SchemaProps{\n", nil) - if err := g.generateDefault(t.Elem.CommentLines, t.Elem, false, t.Elem); err != nil { - return err - } - typeString, format := openapi.OpenAPITypeFormat(elemType.String()) - if typeString != "" { - g.generateSimpleProperty(typeString, format) - g.Do("},\n},\n},\n", nil) - return nil - } - switch elemType.Kind { - case types.Builtin: - return fmt.Errorf("please add type %v to getOpenAPITypeFormat function", elemType) - case types.Struct: - g.generateReferenceProperty(elemType) - case types.Slice, types.Array: - if err := g.generateSliceProperty(elemType); err != nil { - return err - } - case types.Map: - if err := g.generateMapProperty(elemType); err != nil { - return err - } - default: - return fmt.Errorf("slice Element kind %v is not supported in %v", elemType.Kind, t) - } - g.Do("},\n},\n},\n", nil) - return nil -} diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/OWNERS b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/OWNERS deleted file mode 100644 index 235bc545b88..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -reviewers: -- roycaihw -approvers: -- roycaihw diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/doc.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/doc.go deleted file mode 100644 index 384a44dca07..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/doc.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. -*/ - -// Package rules contains API rules that are enforced in OpenAPI spec generation -// as part of the machinery. Files under this package implement APIRule interface -// which evaluates Go type and produces list of API rule violations. -// -// Implementations of APIRule should be added to API linter under openAPIGen code- -// generator to get integrated in the generation process. -package rules diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/idl_tag.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/idl_tag.go deleted file mode 100644 index 0abe0aa0729..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/idl_tag.go +++ /dev/null @@ -1,54 +0,0 @@ -package rules - -import ( - "k8s.io/gengo/types" -) - -const ListTypeIDLTag = "listType" - -// ListTypeMissing implements APIRule interface. -// A list type is required for inlined list. -type ListTypeMissing struct{} - -// Name returns the name of APIRule -func (l *ListTypeMissing) Name() string { - return "list_type_missing" -} - -// Validate evaluates API rule on type t and returns a list of field names in -// the type that violate the rule. Empty field name [""] implies the entire -// type violates the rule. -func (l *ListTypeMissing) Validate(t *types.Type) ([]string, error) { - fields := make([]string, 0) - - switch t.Kind { - case types.Struct: - for _, m := range t.Members { - hasListType := types.ExtractCommentTags("+", m.CommentLines)[ListTypeIDLTag] != nil - - if m.Name == "Items" && m.Type.Kind == types.Slice && hasNamedMember(t, "ListMeta") { - if hasListType { - fields = append(fields, m.Name) - } - continue - } - - // All slice fields must have a list-type tag except []byte - if m.Type.Kind == types.Slice && m.Type.Elem != types.Byte && !hasListType { - fields = append(fields, m.Name) - continue - } - } - } - - return fields, nil -} - -func hasNamedMember(t *types.Type, name string) bool { - for _, m := range t.Members { - if m.Name == name { - return true - } - } - return false -} diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go deleted file mode 100644 index 53e870c1a63..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package rules - -import ( - "reflect" - "strings" - - "k8s.io/kube-openapi/pkg/util/sets" - - "k8s.io/gengo/types" -) - -var ( - // Blacklist of JSON tags that should skip match evaluation - jsonTagBlacklist = sets.NewString( - // Omitted field is ignored by the package - "-", - ) - - // Blacklist of JSON names that should skip match evaluation - jsonNameBlacklist = sets.NewString( - // Empty name is used for inline struct field (e.g. metav1.TypeMeta) - "", - // Special case for object and list meta - "metadata", - ) - - // List of substrings that aren't allowed in Go name and JSON name - disallowedNameSubstrings = sets.NewString( - // Underscore is not allowed in either name - "_", - // Dash is not allowed in either name. Note that since dash is a valid JSON tag, this should be checked - // after JSON tag blacklist check. - "-", - ) -) - -/* -NamesMatch implements APIRule interface. -Go field names must be CamelCase. JSON field names must be camelCase. Other than capitalization of the -initial letter, the two should almost always match. No underscores nor dashes in either. -This rule verifies the convention "Other than capitalization of the initial letter, the two should almost always match." -Examples (also in unit test): - - Go name | JSON name | match - podSpec false - PodSpec podSpec true - PodSpec PodSpec false - podSpec podSpec false - PodSpec spec false - Spec podSpec false - JSONSpec jsonSpec true - JSONSpec jsonspec false - HTTPJSONSpec httpJSONSpec true - -NOTE: this validator cannot tell two sequential all-capital words from one word, therefore the case below -is also considered matched. - - HTTPJSONSpec httpjsonSpec true - -NOTE: JSON names in jsonNameBlacklist should skip evaluation - - true - podSpec true - podSpec - true - podSpec metadata true -*/ -type NamesMatch struct{} - -// Name returns the name of APIRule -func (n *NamesMatch) Name() string { - return "names_match" -} - -// Validate evaluates API rule on type t and returns a list of field names in -// the type that violate the rule. Empty field name [""] implies the entire -// type violates the rule. -func (n *NamesMatch) Validate(t *types.Type) ([]string, error) { - fields := make([]string, 0) - - // Only validate struct type and ignore the rest - switch t.Kind { - case types.Struct: - for _, m := range t.Members { - goName := m.Name - jsonTag, ok := reflect.StructTag(m.Tags).Lookup("json") - // Distinguish empty JSON tag and missing JSON tag. Empty JSON tag / name is - // allowed (in JSON name blacklist) but missing JSON tag is invalid. - if !ok { - fields = append(fields, goName) - continue - } - if jsonTagBlacklist.Has(jsonTag) { - continue - } - jsonName := strings.Split(jsonTag, ",")[0] - if !namesMatch(goName, jsonName) { - fields = append(fields, goName) - } - } - } - return fields, nil -} - -// namesMatch evaluates if goName and jsonName match the API rule -// TODO: Use an off-the-shelf CamelCase solution instead of implementing this logic. The following existing -// -// packages have been tried out: -// github.com/markbates/inflect -// github.com/segmentio/go-camelcase -// github.com/iancoleman/strcase -// github.com/fatih/camelcase -// Please see https://github.com/kubernetes/kube-openapi/pull/83#issuecomment-400842314 for more details -// about why they don't satisfy our need. What we need can be a function that detects an acronym at the -// beginning of a string. -func namesMatch(goName, jsonName string) bool { - if jsonNameBlacklist.Has(jsonName) { - return true - } - if !isAllowedName(goName) || !isAllowedName(jsonName) { - return false - } - if !strings.EqualFold(goName, jsonName) { - return false - } - // Go field names must be CamelCase. JSON field names must be camelCase. - if !isCapital(goName[0]) || isCapital(jsonName[0]) { - return false - } - for i := 0; i < len(goName); i++ { - if goName[i] == jsonName[i] { - // goName[0:i-1] is uppercase and jsonName[0:i-1] is lowercase, goName[i:] - // and jsonName[i:] should match; - // goName[i] should be lowercase if i is equal to 1, e.g.: - // goName | jsonName - // PodSpec podSpec - // or uppercase if i is greater than 1, e.g.: - // goname | jsonName - // JSONSpec jsonSpec - // This is to rule out cases like: - // goname | jsonName - // JSONSpec jsonspec - return goName[i:] == jsonName[i:] && (i == 1 || isCapital(goName[i])) - } - } - return true -} - -// isCapital returns true if one character is capital -func isCapital(b byte) bool { - return b >= 'A' && b <= 'Z' -} - -// isAllowedName checks the list of disallowedNameSubstrings and returns true if name doesn't contain -// any disallowed substring. -func isAllowedName(name string) bool { - for _, substr := range disallowedNameSubstrings.UnsortedList() { - if strings.Contains(name, substr) { - return false - } - } - return true -} diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/omitempty_match_case.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/omitempty_match_case.go deleted file mode 100644 index dd37ad8a578..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/rules/omitempty_match_case.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package rules - -import ( - "reflect" - "strings" - - "k8s.io/gengo/types" -) - -// OmitEmptyMatchCase implements APIRule interface. -// "omitempty" must appear verbatim (no case variants). -type OmitEmptyMatchCase struct{} - -func (n *OmitEmptyMatchCase) Name() string { - return "omitempty_match_case" -} - -func (n *OmitEmptyMatchCase) Validate(t *types.Type) ([]string, error) { - fields := make([]string, 0) - - // Only validate struct type and ignore the rest - switch t.Kind { - case types.Struct: - for _, m := range t.Members { - goName := m.Name - jsonTag, ok := reflect.StructTag(m.Tags).Lookup("json") - if !ok { - continue - } - - parts := strings.Split(jsonTag, ",") - if len(parts) < 2 { - // no tags other than name - continue - } - if parts[0] == "-" { - // not serialized - continue - } - for _, part := range parts[1:] { - if strings.EqualFold(part, "omitempty") && part != "omitempty" { - fields = append(fields, goName) - } - } - } - } - return fields, nil -} diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/union.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/union.go deleted file mode 100644 index a0281fe4706..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/generators/union.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 generators - -import ( - "fmt" - "sort" - - "k8s.io/gengo/types" -) - -const tagUnionMember = "union" -const tagUnionDeprecated = "unionDeprecated" -const tagUnionDiscriminator = "unionDiscriminator" - -type union struct { - discriminator string - fieldsToDiscriminated map[string]string -} - -// emit prints the union, can be called on a nil union (emits nothing) -func (u *union) emit(g openAPITypeWriter) { - if u == nil { - return - } - g.Do("map[string]interface{}{\n", nil) - if u.discriminator != "" { - g.Do("\"discriminator\": \"$.$\",\n", u.discriminator) - } - g.Do("\"fields-to-discriminateBy\": map[string]interface{}{\n", nil) - keys := []string{} - for field := range u.fieldsToDiscriminated { - keys = append(keys, field) - } - sort.Strings(keys) - for _, field := range keys { - g.Do("\"$.$\": ", field) - g.Do("\"$.$\",\n", u.fieldsToDiscriminated[field]) - } - g.Do("},\n", nil) - g.Do("},\n", nil) -} - -// Sets the discriminator if it's not set yet, otherwise return an error -func (u *union) setDiscriminator(value string) []error { - errors := []error{} - if u.discriminator != "" { - errors = append(errors, fmt.Errorf("at least two discriminators found: %v and %v", value, u.discriminator)) - } - u.discriminator = value - return errors -} - -// Add a new member to the union -func (u *union) addMember(jsonName, variableName string) { - if _, ok := u.fieldsToDiscriminated[jsonName]; ok { - panic(fmt.Errorf("same field (%v) found multiple times", jsonName)) - } - u.fieldsToDiscriminated[jsonName] = variableName -} - -// Makes sure that the union is valid, specifically looking for re-used discriminated -func (u *union) isValid() []error { - errors := []error{} - // Case 1: discriminator but no fields - if u.discriminator != "" && len(u.fieldsToDiscriminated) == 0 { - errors = append(errors, fmt.Errorf("discriminator set with no fields in union")) - } - // Case 2: two fields have the same discriminated value - discriminated := map[string]struct{}{} - for _, d := range u.fieldsToDiscriminated { - if _, ok := discriminated[d]; ok { - errors = append(errors, fmt.Errorf("discriminated value is used twice: %v", d)) - } - discriminated[d] = struct{}{} - } - // Case 3: a field is both discriminator AND part of the union - if u.discriminator != "" { - if _, ok := u.fieldsToDiscriminated[u.discriminator]; ok { - errors = append(errors, fmt.Errorf("%v can't be both discriminator and part of the union", u.discriminator)) - } - } - return errors -} - -// Find unions either directly on the members (or inlined members, not -// going across types) or on the type itself, or on embedded types. -func parseUnions(t *types.Type) ([]union, []error) { - errors := []error{} - unions := []union{} - su, err := parseUnionStruct(t) - if su != nil { - unions = append(unions, *su) - } - errors = append(errors, err...) - eu, err := parseEmbeddedUnion(t) - unions = append(unions, eu...) - errors = append(errors, err...) - mu, err := parseUnionMembers(t) - if mu != nil { - unions = append(unions, *mu) - } - errors = append(errors, err...) - return unions, errors -} - -// Find unions in embedded types, unions shouldn't go across types. -func parseEmbeddedUnion(t *types.Type) ([]union, []error) { - errors := []error{} - unions := []union{} - for _, m := range t.Members { - if hasOpenAPITagValue(m.CommentLines, tagValueFalse) { - continue - } - if !shouldInlineMembers(&m) { - continue - } - u, err := parseUnions(m.Type) - unions = append(unions, u...) - errors = append(errors, err...) - } - return unions, errors -} - -// Look for union tag on a struct, and then include all the fields -// (except the discriminator if there is one). The struct shouldn't have -// embedded types. -func parseUnionStruct(t *types.Type) (*union, []error) { - errors := []error{} - if types.ExtractCommentTags("+", t.CommentLines)[tagUnionMember] == nil { - return nil, nil - } - - u := &union{fieldsToDiscriminated: map[string]string{}} - - for _, m := range t.Members { - jsonName := getReferableName(&m) - if jsonName == "" { - continue - } - if shouldInlineMembers(&m) { - errors = append(errors, fmt.Errorf("union structures can't have embedded fields: %v.%v", t.Name, m.Name)) - continue - } - if types.ExtractCommentTags("+", m.CommentLines)[tagUnionDeprecated] != nil { - errors = append(errors, fmt.Errorf("union struct can't have unionDeprecated members: %v.%v", t.Name, m.Name)) - continue - } - if types.ExtractCommentTags("+", m.CommentLines)[tagUnionDiscriminator] != nil { - errors = append(errors, u.setDiscriminator(jsonName)...) - } else { - if !hasOptionalTag(&m) { - errors = append(errors, fmt.Errorf("union members must be optional: %v.%v", t.Name, m.Name)) - } - u.addMember(jsonName, m.Name) - } - } - - return u, errors -} - -// Find unions specifically on members. -func parseUnionMembers(t *types.Type) (*union, []error) { - errors := []error{} - u := &union{fieldsToDiscriminated: map[string]string{}} - - for _, m := range t.Members { - jsonName := getReferableName(&m) - if jsonName == "" { - continue - } - if shouldInlineMembers(&m) { - continue - } - if types.ExtractCommentTags("+", m.CommentLines)[tagUnionDiscriminator] != nil { - errors = append(errors, u.setDiscriminator(jsonName)...) - } - if types.ExtractCommentTags("+", m.CommentLines)[tagUnionMember] != nil { - errors = append(errors, fmt.Errorf("union tag is not accepted on struct members: %v.%v", t.Name, m.Name)) - continue - } - if types.ExtractCommentTags("+", m.CommentLines)[tagUnionDeprecated] != nil { - if !hasOptionalTag(&m) { - errors = append(errors, fmt.Errorf("union members must be optional: %v.%v", t.Name, m.Name)) - } - u.addMember(jsonName, m.Name) - } - } - if len(u.fieldsToDiscriminated) == 0 { - return nil, nil - } - return u, append(errors, u.isValid()...) -} diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/util/sets/empty.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/util/sets/empty.go deleted file mode 100644 index 13303ea8900..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/util/sets/empty.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -// NOTE: This file is copied from k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/sets/empty.go -// because in Kubernetes we don't allowed vendor code to import staging code. See -// https://github.com/kubernetes/kube-openapi/pull/90 for more details. - -package sets - -// Empty is public since it is used by some internal API objects for conversions between external -// string arrays and internal sets, and conversion logic requires public types today. -type Empty struct{} diff --git a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/util/sets/string.go b/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/util/sets/string.go deleted file mode 100644 index 53f2bc12aae..00000000000 --- a/pkg/k8s/vendor/k8s.io/kube-openapi/pkg/util/sets/string.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -// NOTE: This file is copied from k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/sets/string.go -// because in Kubernetes we don't allowed vendor code to import staging code. See -// https://github.com/kubernetes/kube-openapi/pull/90 for more details. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption. -type String map[string]Empty - -// NewString creates a String from a list of values. -func NewString(items ...string) String { - ss := String{} - ss.Insert(items...) - return ss -} - -// StringKeySet creates a String from a keys of a map[string](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func StringKeySet(theMap interface{}) String { - v := reflect.ValueOf(theMap) - ret := String{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(string)) - } - return ret -} - -// Insert adds items to the set. -func (s String) Insert(items ...string) { - for _, item := range items { - s[item] = Empty{} - } -} - -// Delete removes all items from the set. -func (s String) Delete(items ...string) { - for _, item := range items { - delete(s, item) - } -} - -// Has returns true if and only if item is contained in the set. -func (s String) Has(item string) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s String) HasAll(items ...string) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s String) HasAny(items ...string) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s String) Difference(s2 String) String { - result := NewString() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 String) Union(s2 String) String { - result := NewString() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 String) Intersection(s2 String) String { - var walk, other String - result := NewString() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 String) IsSuperset(s2 String) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 String) Equal(s2 String) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfString []string - -func (s sortableSliceOfString) Len() int { return len(s) } -func (s sortableSliceOfString) Less(i, j int) bool { return lessString(s[i], s[j]) } -func (s sortableSliceOfString) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted string slice. -func (s String) List() []string { - res := make(sortableSliceOfString, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []string(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s String) UnsortedList() []string { - res := make([]string, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s String) PopAny() (string, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue string - return zeroValue, false -} - -// Len returns the size of the set. -func (s String) Len() int { - return len(s) -} - -func lessString(lhs, rhs string) bool { - return lhs < rhs -} diff --git a/pkg/k8s/vendor/k8s.io/utils/integer/integer.go b/pkg/k8s/vendor/k8s.io/utils/integer/integer.go deleted file mode 100644 index e0811e8344c..00000000000 --- a/pkg/k8s/vendor/k8s.io/utils/integer/integer.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 integer - -import "math" - -// IntMax returns the maximum of the params -func IntMax(a, b int) int { - if b > a { - return b - } - return a -} - -// IntMin returns the minimum of the params -func IntMin(a, b int) int { - if b < a { - return b - } - return a -} - -// Int32Max returns the maximum of the params -func Int32Max(a, b int32) int32 { - if b > a { - return b - } - return a -} - -// Int32Min returns the minimum of the params -func Int32Min(a, b int32) int32 { - if b < a { - return b - } - return a -} - -// Int64Max returns the maximum of the params -func Int64Max(a, b int64) int64 { - if b > a { - return b - } - return a -} - -// Int64Min returns the minimum of the params -func Int64Min(a, b int64) int64 { - if b < a { - return b - } - return a -} - -// RoundToInt32 rounds floats into integer numbers. -// Deprecated: use math.Round() and a cast directly. -func RoundToInt32(a float64) int32 { - return int32(math.Round(a)) -} diff --git a/pkg/k8s/vendor/k8s.io/utils/trace/trace.go b/pkg/k8s/vendor/k8s.io/utils/trace/trace.go index 187eb5d8c5e..559aebb59a5 100644 --- a/pkg/k8s/vendor/k8s.io/utils/trace/trace.go +++ b/pkg/k8s/vendor/k8s.io/utils/trace/trace.go @@ -192,7 +192,7 @@ func (t *Trace) Log() { t.endTime = &endTime t.lock.Unlock() // an explicit logging request should dump all the steps out at the higher level - if t.parentTrace == nil { // We don't start logging until Log or LogIfLong is called on the root trace + if t.parentTrace == nil && klogV(2) { // We don't start logging until Log or LogIfLong is called on the root trace t.logTrace() } } diff --git a/pkg/k8s/vendor/modules.txt b/pkg/k8s/vendor/modules.txt index 391e24fd3b1..af4512ac9b2 100644 --- a/pkg/k8s/vendor/modules.txt +++ b/pkg/k8s/vendor/modules.txt @@ -1,8 +1,8 @@ # github.com/blang/semver/v4 v4.0.0 ## explicit; go 1.14 github.com/blang/semver/v4 -# github.com/cilium/cilium v1.15.7 -## explicit; go 1.21.0 +# github.com/cilium/cilium v1.16.1 +## explicit; go 1.22.0 github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1 github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/selection @@ -13,28 +13,28 @@ github.com/cilium/cilium/pkg/versioncheck # github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc ## explicit github.com/davecgh/go-spew/spew -# github.com/emicklei/go-restful/v3 v3.11.2 +# github.com/emicklei/go-restful/v3 v3.12.0 ## explicit; go 1.13 github.com/emicklei/go-restful/v3 github.com/emicklei/go-restful/v3/log -# github.com/evanphx/json-patch v5.7.0+incompatible +# github.com/evanphx/json-patch v5.9.0+incompatible ## explicit github.com/evanphx/json-patch -# github.com/fatih/color v1.16.0 +# github.com/fatih/color v1.17.0 ## explicit; go 1.17 github.com/fatih/color # github.com/go-logr/logr v1.4.1 ## explicit; go 1.18 github.com/go-logr/logr -# github.com/go-openapi/jsonpointer v0.20.2 -## explicit; go 1.19 +# github.com/go-openapi/jsonpointer v0.21.0 +## explicit; go 1.20 github.com/go-openapi/jsonpointer -# github.com/go-openapi/jsonreference v0.20.4 -## explicit; go 1.19 +# github.com/go-openapi/jsonreference v0.21.0 +## explicit; go 1.20 github.com/go-openapi/jsonreference github.com/go-openapi/jsonreference/internal -# github.com/go-openapi/swag v0.22.7 -## explicit; go 1.19 +# github.com/go-openapi/swag v0.23.0 +## explicit; go 1.20 github.com/go-openapi/swag # github.com/gobuffalo/flect v1.0.2 ## explicit; go 1.16 @@ -113,24 +113,24 @@ github.com/sasha-s/go-deadlock ## explicit; go 1.13 github.com/sirupsen/logrus github.com/sirupsen/logrus/hooks/syslog -# github.com/spf13/cobra v1.8.0 +# github.com/spf13/cobra v1.8.1 ## explicit; go 1.15 github.com/spf13/cobra -# github.com/spf13/pflag v1.0.5 +# github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace ## explicit; go 1.12 github.com/spf13/pflag -# golang.org/x/mod v0.14.0 +# golang.org/x/mod v0.18.0 ## explicit; go 1.18 golang.org/x/mod/internal/lazyregexp golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.23.0 +# golang.org/x/net v0.26.0 ## explicit; go 1.18 golang.org/x/net/http/httpguts golang.org/x/net/http2 golang.org/x/net/http2/hpack golang.org/x/net/idna -# golang.org/x/oauth2 v0.16.0 +# golang.org/x/oauth2 v0.19.0 ## explicit; go 1.18 golang.org/x/oauth2 golang.org/x/oauth2/internal @@ -138,15 +138,15 @@ golang.org/x/oauth2/internal ## explicit; go 1.18 golang.org/x/sync/errgroup golang.org/x/sync/semaphore -# golang.org/x/sys v0.18.0 +# golang.org/x/sys v0.21.0 ## explicit; go 1.18 golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/term v0.18.0 +# golang.org/x/term v0.21.0 ## explicit; go 1.18 golang.org/x/term -# golang.org/x/text v0.14.0 +# golang.org/x/text v0.16.0 ## explicit; go 1.18 golang.org/x/text/secure/bidirule golang.org/x/text/transform @@ -155,46 +155,38 @@ golang.org/x/text/unicode/norm # golang.org/x/time v0.5.0 ## explicit; go 1.18 golang.org/x/time/rate -# golang.org/x/tools v0.16.1 -## explicit; go 1.18 +# golang.org/x/tools v0.22.0 +## explicit; go 1.19 golang.org/x/tools/go/ast/astutil golang.org/x/tools/go/gcexportdata golang.org/x/tools/go/internal/packagesdriver golang.org/x/tools/go/packages golang.org/x/tools/go/types/objectpath golang.org/x/tools/imports +golang.org/x/tools/internal/aliases golang.org/x/tools/internal/event golang.org/x/tools/internal/event/core golang.org/x/tools/internal/event/keys golang.org/x/tools/internal/event/label -golang.org/x/tools/internal/event/tag golang.org/x/tools/internal/gcimporter golang.org/x/tools/internal/gocommand golang.org/x/tools/internal/gopathwalk golang.org/x/tools/internal/imports golang.org/x/tools/internal/packagesinternal golang.org/x/tools/internal/pkgbits +golang.org/x/tools/internal/stdlib golang.org/x/tools/internal/tokeninternal -golang.org/x/tools/internal/typeparams golang.org/x/tools/internal/typesinternal golang.org/x/tools/internal/versions -# google.golang.org/appengine v1.6.8 -## explicit; go 1.11 -google.golang.org/appengine/internal -google.golang.org/appengine/internal/base -google.golang.org/appengine/internal/datastore -google.golang.org/appengine/internal/log -google.golang.org/appengine/internal/remote_api -google.golang.org/appengine/internal/urlfetch -google.golang.org/appengine/urlfetch -# google.golang.org/protobuf v1.33.0 -## explicit; go 1.17 +# google.golang.org/protobuf v1.34.2 +## explicit; go 1.20 google.golang.org/protobuf/encoding/prototext google.golang.org/protobuf/encoding/protowire google.golang.org/protobuf/internal/descfmt google.golang.org/protobuf/internal/descopts google.golang.org/protobuf/internal/detrand google.golang.org/protobuf/internal/editiondefaults +google.golang.org/protobuf/internal/editionssupport google.golang.org/protobuf/internal/encoding/defval google.golang.org/protobuf/internal/encoding/messageset google.golang.org/protobuf/internal/encoding/tag @@ -230,11 +222,12 @@ gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# k8s.io/api v0.29.8 -## explicit; go 1.21 +# k8s.io/api v0.30.2 +## explicit; go 1.22.0 k8s.io/api/admissionregistration/v1 k8s.io/api/admissionregistration/v1alpha1 k8s.io/api/admissionregistration/v1beta1 +k8s.io/api/apidiscovery/v2 k8s.io/api/apidiscovery/v2beta1 k8s.io/api/apiserverinternal/v1alpha1 k8s.io/api/apps/v1 @@ -284,8 +277,9 @@ k8s.io/api/scheduling/v1beta1 k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 -# k8s.io/apiextensions-apiserver v0.29.8 -## explicit; go 1.21 +k8s.io/api/storagemigration/v1alpha1 +# k8s.io/apiextensions-apiserver v0.30.2 +## explicit; go 1.22.0 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1 @@ -295,8 +289,8 @@ k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 -# k8s.io/apimachinery v0.29.8 -## explicit; go 1.21 +# k8s.io/apimachinery v0.30.2 +## explicit; go 1.22.0 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors k8s.io/apimachinery/pkg/api/meta @@ -344,8 +338,8 @@ k8s.io/apimachinery/pkg/version k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/client-go v0.29.8 -## explicit; go 1.21 +# k8s.io/client-go v0.30.2 +## explicit; go 1.22.0 k8s.io/client-go/applyconfigurations/admissionregistration/v1 k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1 k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1 @@ -394,8 +388,10 @@ k8s.io/client-go/applyconfigurations/scheduling/v1beta1 k8s.io/client-go/applyconfigurations/storage/v1 k8s.io/client-go/applyconfigurations/storage/v1alpha1 k8s.io/client-go/applyconfigurations/storage/v1beta1 +k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1 k8s.io/client-go/discovery k8s.io/client-go/discovery/fake +k8s.io/client-go/features k8s.io/client-go/kubernetes k8s.io/client-go/kubernetes/scheme k8s.io/client-go/kubernetes/typed/admissionregistration/v1 @@ -449,6 +445,7 @@ k8s.io/client-go/kubernetes/typed/scheduling/v1beta1 k8s.io/client-go/kubernetes/typed/storage/v1 k8s.io/client-go/kubernetes/typed/storage/v1alpha1 k8s.io/client-go/kubernetes/typed/storage/v1beta1 +k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1 k8s.io/client-go/openapi k8s.io/client-go/pkg/apis/clientauthentication k8s.io/client-go/pkg/apis/clientauthentication/install @@ -471,8 +468,8 @@ k8s.io/client-go/util/connrotation k8s.io/client-go/util/flowcontrol k8s.io/client-go/util/keyutil k8s.io/client-go/util/workqueue -# k8s.io/code-generator v0.29.8 -## explicit; go 1.21 +# k8s.io/code-generator v0.30.2 +## explicit; go 1.22.0 k8s.io/code-generator k8s.io/code-generator/cmd/applyconfiguration-gen k8s.io/code-generator/cmd/applyconfiguration-gen/args @@ -483,45 +480,38 @@ k8s.io/code-generator/cmd/client-gen/generators k8s.io/code-generator/cmd/client-gen/generators/fake k8s.io/code-generator/cmd/client-gen/generators/scheme k8s.io/code-generator/cmd/client-gen/generators/util -k8s.io/code-generator/cmd/client-gen/path k8s.io/code-generator/cmd/client-gen/types k8s.io/code-generator/cmd/conversion-gen k8s.io/code-generator/cmd/conversion-gen/args k8s.io/code-generator/cmd/conversion-gen/generators k8s.io/code-generator/cmd/deepcopy-gen k8s.io/code-generator/cmd/deepcopy-gen/args +k8s.io/code-generator/cmd/deepcopy-gen/generators k8s.io/code-generator/cmd/defaulter-gen k8s.io/code-generator/cmd/defaulter-gen/args +k8s.io/code-generator/cmd/defaulter-gen/generators k8s.io/code-generator/cmd/go-to-protobuf k8s.io/code-generator/cmd/go-to-protobuf/protobuf -k8s.io/code-generator/cmd/import-boss k8s.io/code-generator/cmd/informer-gen k8s.io/code-generator/cmd/informer-gen/args k8s.io/code-generator/cmd/informer-gen/generators k8s.io/code-generator/cmd/lister-gen k8s.io/code-generator/cmd/lister-gen/args k8s.io/code-generator/cmd/lister-gen/generators -k8s.io/code-generator/cmd/openapi-gen k8s.io/code-generator/cmd/register-gen k8s.io/code-generator/cmd/register-gen/args k8s.io/code-generator/cmd/register-gen/generators -k8s.io/code-generator/cmd/set-gen k8s.io/code-generator/pkg/namer k8s.io/code-generator/pkg/util k8s.io/code-generator/third_party/forked/golang/reflect -# k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 -## explicit; go 1.13 -k8s.io/gengo/args -k8s.io/gengo/examples/deepcopy-gen/generators -k8s.io/gengo/examples/defaulter-gen/generators -k8s.io/gengo/examples/import-boss/generators -k8s.io/gengo/examples/set-gen/generators -k8s.io/gengo/examples/set-gen/sets -k8s.io/gengo/generator -k8s.io/gengo/namer -k8s.io/gengo/parser -k8s.io/gengo/types -# k8s.io/klog/v2 v2.120.0 +# k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 +## explicit; go 1.20 +k8s.io/gengo/v2 +k8s.io/gengo/v2/generator +k8s.io/gengo/v2/namer +k8s.io/gengo/v2/parser +k8s.io/gengo/v2/types +# k8s.io/klog/v2 v2.120.1 ## explicit; go 1.18 k8s.io/klog/v2 k8s.io/klog/v2/internal/buffer @@ -530,34 +520,29 @@ k8s.io/klog/v2/internal/dbg k8s.io/klog/v2/internal/serialize k8s.io/klog/v2/internal/severity k8s.io/klog/v2/internal/sloghandler -# k8s.io/kube-openapi v0.0.0-20240105020646-a37d4de58910 -## explicit; go 1.21 -k8s.io/kube-openapi/cmd/openapi-gen/args +# k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108 +## explicit; go 1.20 k8s.io/kube-openapi/pkg/cached k8s.io/kube-openapi/pkg/common -k8s.io/kube-openapi/pkg/generators -k8s.io/kube-openapi/pkg/generators/rules k8s.io/kube-openapi/pkg/handler3 k8s.io/kube-openapi/pkg/internal k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json k8s.io/kube-openapi/pkg/schemaconv k8s.io/kube-openapi/pkg/spec3 k8s.io/kube-openapi/pkg/util/proto -k8s.io/kube-openapi/pkg/util/sets k8s.io/kube-openapi/pkg/validation/spec -# k8s.io/utils v0.0.0-20240102154912-e7106e64919e +# k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 ## explicit; go 1.18 k8s.io/utils/buffer k8s.io/utils/clock k8s.io/utils/clock/testing -k8s.io/utils/integer k8s.io/utils/internal/third_party/forked/golang/net k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/ptr k8s.io/utils/strings/slices k8s.io/utils/trace -# sigs.k8s.io/controller-tools v0.14.0 => github.com/cilium/controller-tools v0.8.0-1 +# sigs.k8s.io/controller-tools v0.15.0 => github.com/cilium/controller-tools v0.8.0-2 ## explicit; go 1.17 sigs.k8s.io/controller-tools/cmd/controller-gen sigs.k8s.io/controller-tools/pkg/crd @@ -589,4 +574,4 @@ sigs.k8s.io/structured-merge-diff/v4/value sigs.k8s.io/yaml sigs.k8s.io/yaml/goyaml.v2 # go.universe.tf/metallb => github.com/cilium/metallb v0.1.1-0.20220829170633-5d7dfb1129f7 -# sigs.k8s.io/controller-tools => github.com/cilium/controller-tools v0.8.0-1 +# sigs.k8s.io/controller-tools => github.com/cilium/controller-tools v0.8.0-2 diff --git a/pkg/k8s/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go b/pkg/k8s/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go index 2fba83e95af..946f21834af 100644 --- a/pkg/k8s/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go +++ b/pkg/k8s/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go @@ -67,6 +67,7 @@ var ValidationMarkers = mustMakeAllWithPrefix("kubebuilder:validation", markers. XPreserveUnknownFields{}, XEmbeddedResource{}, XIntOrString{}, + XValidation{}, ) // FieldOnlyMarkers list field-specific validation markers (i.e. those markers that don't make @@ -256,6 +257,17 @@ type XIntOrString struct{} // to be used only as a last resort. type Schemaless struct{} +// +controllertools:marker:generateHelp:category="CRD validation" +// XValidation marks a field as requiring a value for which a given +// expression evaluates to true. +// +// This marker may be repeated to specify multiple expressions, all of +// which must evaluate to true. +type XValidation struct { + Rule string + Message string `marker:",optional"` +} + func (m Maximum) ApplyToSchema(schema *apiext.JSONSchemaProps) error { if schema.Type != "integer" { return fmt.Errorf("must apply maximum to an integer") @@ -433,3 +445,11 @@ func (m XIntOrString) ApplyToSchema(schema *apiext.JSONSchemaProps) error { } func (m XIntOrString) ApplyFirst() {} + +func (m XValidation) ApplyToSchema(schema *apiext.JSONSchemaProps) error { + schema.XValidations = append(schema.XValidations, apiext.ValidationRule{ + Rule: m.Rule, + Message: m.Message, + }) + return nil +} diff --git a/pkg/k8s/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/zz_generated.markerhelp.go b/pkg/k8s/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/zz_generated.markerhelp.go index 03d663601e3..9a007e792d5 100644 --- a/pkg/k8s/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/zz_generated.markerhelp.go +++ b/pkg/k8s/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/zz_generated.markerhelp.go @@ -467,3 +467,23 @@ func (XPreserveUnknownFields) Help() *markers.DefinitionHelp { FieldHelp: map[string]markers.DetailedHelp{}, } } + +func (XValidation) Help() *markers.DefinitionHelp { + return &markers.DefinitionHelp{ + Category: "CRD validation", + DetailedHelp: markers.DetailedHelp{ + Summary: "marks a field as requiring a value for which a given expression evaluates to true. ", + Details: "This marker may be repeated to specify multiple expressions, all of which must evaluate to true.", + }, + FieldHelp: map[string]markers.DetailedHelp{ + "Rule": { + Summary: "", + Details: "", + }, + "Message": { + Summary: "", + Details: "", + }, + }, + } +} diff --git a/vendor/cel.dev/expr/.bazelversion b/vendor/cel.dev/expr/.bazelversion deleted file mode 100644 index 579c9d21e7d..00000000000 --- a/vendor/cel.dev/expr/.bazelversion +++ /dev/null @@ -1,2 +0,0 @@ -6.4.0 -# Keep this pinned version in parity with cel-go diff --git a/vendor/cel.dev/expr/.gitattributes b/vendor/cel.dev/expr/.gitattributes deleted file mode 100644 index 3de1ec213ae..00000000000 --- a/vendor/cel.dev/expr/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -*.pb.go linguist-generated=true -*.pb.go -diff -merge diff --git a/vendor/cel.dev/expr/.gitignore b/vendor/cel.dev/expr/.gitignore deleted file mode 100644 index ac51a054d2d..00000000000 --- a/vendor/cel.dev/expr/.gitignore +++ /dev/null @@ -1 +0,0 @@ -bazel-* diff --git a/vendor/cel.dev/expr/BUILD.bazel b/vendor/cel.dev/expr/BUILD.bazel deleted file mode 100644 index f631b6df06d..00000000000 --- a/vendor/cel.dev/expr/BUILD.bazel +++ /dev/null @@ -1,3 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) # Apache 2.0 diff --git a/vendor/cel.dev/expr/CODE_OF_CONDUCT.md b/vendor/cel.dev/expr/CODE_OF_CONDUCT.md deleted file mode 100644 index 59908e2d8e8..00000000000 --- a/vendor/cel.dev/expr/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,25 +0,0 @@ -# Contributor Code of Conduct -## Version 0.1.1 (adapted from 0.3b-angular) - -As contributors and maintainers of the Common Expression Language -(CEL) project, we pledge to respect everyone who contributes by -posting issues, updating documentation, submitting pull requests, -providing feedback in comments, and any other activities. - -Communication through any of CEL's channels (GitHub, Gitter, IRC, -mailing lists, Google+, Twitter, etc.) must be constructive and never -resort to personal attacks, trolling, public or private harassment, -insults, or other unprofessional conduct. - -We promise to extend courtesy and respect to everyone involved in this -project regardless of gender, gender identity, sexual orientation, -disability, age, race, ethnicity, religion, or level of experience. We -expect anyone contributing to the project to do the same. - -If any member of the community violates this code of conduct, the -maintainers of the CEL project may take action, removing issues, -comments, and PRs or blocking accounts as deemed appropriate. - -If you are subject to or witness unacceptable behavior, or have any -other concerns, please email us at -[cel-conduct@google.com](mailto:cel-conduct@google.com). diff --git a/vendor/cel.dev/expr/CONTRIBUTING.md b/vendor/cel.dev/expr/CONTRIBUTING.md deleted file mode 100644 index 8f5fd5c31fd..00000000000 --- a/vendor/cel.dev/expr/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# How to Contribute - -We'd love to accept your patches and contributions to this project. There are a -few guidelines you need to follow. - -## Contributor License Agreement - -Contributions to this project must be accompanied by a Contributor License -Agreement. You (or your employer) retain the copyright to your contribution, -this simply gives us permission to use and redistribute your contributions as -part of the project. Head over to to see -your current agreements on file or to sign a new one. - -You generally only need to submit a CLA once, so if you've already submitted one -(even if it was for a different project), you probably don't need to do it -again. - -## Code reviews - -All submissions, including submissions by project members, require review. We -use GitHub pull requests for this purpose. Consult -[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more -information on using pull requests. - -## What to expect from maintainers - -Expect maintainers to respond to new issues or pull requests within a week. -For outstanding and ongoing issues and particularly for long-running -pull requests, expect the maintainers to review within a week of a -contributor asking for a new review. There is no commitment to resolution -- -merging or closing a pull request, or fixing or closing an issue -- because some -issues will require more discussion than others. diff --git a/vendor/cel.dev/expr/GOVERNANCE.md b/vendor/cel.dev/expr/GOVERNANCE.md deleted file mode 100644 index 0a525bc17de..00000000000 --- a/vendor/cel.dev/expr/GOVERNANCE.md +++ /dev/null @@ -1,43 +0,0 @@ -# Project Governance - -This document defines the governance process for the CEL language. CEL is -Google-developed, but openly governed. Major contributors to the CEL -specification and its corresponding implementations constitute the CEL -Language Council. New members may be added by a unanimous vote of the -Council. - -The MAINTAINERS.md file lists the members of the CEL Language Council, and -unofficially indicates the "areas of expertise" of each member with respect -to the publicly available CEL repos. - -## Code Changes - -Code changes must follow the standard pull request (PR) model documented in the -CONTRIBUTING.md for each CEL repo. All fixes and features must be reviewed by a -maintainer. The maintainer reserves the right to request that any feature -request (FR) or PR be reviewed by the language council. - -## Syntax and Semantic Changes - -Syntactic and semantic changes must be reviewed by the CEL Language Council. -Maintainers may also request language council review at their discretion. - -The review process is as follows: - -- Create a Feature Request in the CEL-Spec repo. The feature description will - serve as an abstract for the detailed design document. -- Co-develop a design document with the Language Council. -- Once the proposer gives the design document approval, the document will be - linked to the FR in the CEL-Spec repo and opened for comments to members of - the cel-lang-discuss@googlegroups.com. -- The Language Council will review the design doc at the next council meeting - (once every three weeks) and the council decision included in the document. - -If the proposal is approved, the spec will be updated by a maintainer (if -applicable) and a rationale will be included in the CEL-Spec wiki to ensure -future developers may follow CEL's growth and direction over time. - -Approved proposals may be implemented by the proposer or by the maintainers as -the parties see fit. At the discretion of the maintainer, changes from the -approved design are permitted during implementation if they improve the user -experience and clarity of the feature. diff --git a/vendor/cel.dev/expr/LICENSE b/vendor/cel.dev/expr/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/vendor/cel.dev/expr/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/cel.dev/expr/MAINTAINERS.md b/vendor/cel.dev/expr/MAINTAINERS.md deleted file mode 100644 index 1ed2eb8ab35..00000000000 --- a/vendor/cel.dev/expr/MAINTAINERS.md +++ /dev/null @@ -1,13 +0,0 @@ -# CEL Language Council - -| Name | Company | Area of Expertise | -|-----------------|--------------|-------------------| -| Alfred Fuller | Facebook | cel-cpp, cel-spec | -| Jim Larson | Google | cel-go, cel-spec | -| Matthais Blume | Google | cel-spec | -| Tristan Swadell | Google | cel-go, cel-spec | - -## Emeritus - -* Sanjay Ghemawat (Google) -* Wolfgang Grieskamp (Facebook) diff --git a/vendor/cel.dev/expr/README.md b/vendor/cel.dev/expr/README.md deleted file mode 100644 index 2da1e7f2fa2..00000000000 --- a/vendor/cel.dev/expr/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# Common Expression Language - -The Common Expression Language (CEL) implements common semantics for expression -evaluation, enabling different applications to more easily interoperate. - -Key Applications - -* Security policy: organizations have complex infrastructure and need common - tooling to reason about the system as a whole -* Protocols: expressions are a useful data type and require interoperability - across programming languages and platforms. - - -Guiding philosophy: - -1. Keep it small & fast. - * CEL evaluates in linear time, is mutation free, and not Turing-complete. - This limitation is a feature of the language design, which allows the - implementation to evaluate orders of magnitude faster than equivalently - sandboxed JavaScript. -2. Make it extensible. - * CEL is designed to be embedded in applications, and allows for - extensibility via its context which allows for functions and data to be - provided by the software that embeds it. -3. Developer-friendly. - * The language is approachable to developers. The initial spec was based - on the experience of developing Firebase Rules and usability testing - many prior iterations. - * The library itself and accompanying toolings should be easy to adopt by - teams that seek to integrate CEL into their platforms. - -The required components of a system that supports CEL are: - -* The textual representation of an expression as written by a developer. It is - of similar syntax to expressions in C/C++/Java/JavaScript -* A binary representation of an expression. It is an abstract syntax tree - (AST). -* A compiler library that converts the textual representation to the binary - representation. This can be done ahead of time (in the control plane) or - just before evaluation (in the data plane). -* A context containing one or more typed variables, often protobuf messages. - Most use-cases will use `attribute_context.proto` -* An evaluator library that takes the binary format in the context and - produces a result, usually a Boolean. - -Example of boolean conditions and object construction: - -``` c -// Condition -account.balance >= transaction.withdrawal - || (account.overdraftProtection - && account.overdraftLimit >= transaction.withdrawal - account.balance) - -// Object construction -common.GeoPoint{ latitude: 10.0, longitude: -5.5 } -``` - -For more detail, see: - -* [Introduction](doc/intro.md) -* [Language Definition](doc/langdef.md) - -Released under the [Apache License](LICENSE). - -Disclaimer: This is not an official Google product. diff --git a/vendor/cel.dev/expr/WORKSPACE b/vendor/cel.dev/expr/WORKSPACE deleted file mode 100644 index bb4c469adbb..00000000000 --- a/vendor/cel.dev/expr/WORKSPACE +++ /dev/null @@ -1,145 +0,0 @@ -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "io_bazel_rules_go", - sha256 = "099a9fb96a376ccbbb7d291ed4ecbdfd42f6bc822ab77ae6f1b5cb9e914e94fa", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.35.0/rules_go-v0.35.0.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.35.0/rules_go-v0.35.0.zip", - ], -) - -http_archive( - name = "bazel_gazelle", - sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz", - ], -) - -http_archive( - name = "rules_proto", - sha256 = "e017528fd1c91c5a33f15493e3a398181a9e821a804eb7ff5acdd1d2d6c2b18d", - strip_prefix = "rules_proto-4.0.0-3.20.0", - urls = [ - "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0-3.20.0.tar.gz", - ], -) - -# googleapis as of 05/26/2023 -http_archive( - name = "com_google_googleapis", - strip_prefix = "googleapis-07c27163ac591955d736f3057b1619ece66f5b99", - sha256 = "bd8e735d881fb829751ecb1a77038dda4a8d274c45490cb9fcf004583ee10571", - urls = [ - "https://github.com/googleapis/googleapis/archive/07c27163ac591955d736f3057b1619ece66f5b99.tar.gz", - ], -) - -# protobuf -http_archive( - name = "com_google_protobuf", - sha256 = "8242327e5df8c80ba49e4165250b8f79a76bd11765facefaaecfca7747dc8da2", - strip_prefix = "protobuf-3.21.5", - urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.5.zip"], -) - -# googletest -http_archive( - name = "com_google_googletest", - urls = ["https://github.com/google/googletest/archive/master.zip"], - strip_prefix = "googletest-master", -) - -# gflags -http_archive( - name = "com_github_gflags_gflags", - sha256 = "6e16c8bc91b1310a44f3965e616383dbda48f83e8c1eaa2370a215057b00cabe", - strip_prefix = "gflags-77592648e3f3be87d6c7123eb81cbad75f9aef5a", - urls = [ - "https://mirror.bazel.build/github.com/gflags/gflags/archive/77592648e3f3be87d6c7123eb81cbad75f9aef5a.tar.gz", - "https://github.com/gflags/gflags/archive/77592648e3f3be87d6c7123eb81cbad75f9aef5a.tar.gz", - ], -) - -# glog -http_archive( - name = "com_google_glog", - sha256 = "1ee310e5d0a19b9d584a855000434bb724aa744745d5b8ab1855c85bff8a8e21", - strip_prefix = "glog-028d37889a1e80e8a07da1b8945ac706259e5fd8", - urls = [ - "https://mirror.bazel.build/github.com/google/glog/archive/028d37889a1e80e8a07da1b8945ac706259e5fd8.tar.gz", - "https://github.com/google/glog/archive/028d37889a1e80e8a07da1b8945ac706259e5fd8.tar.gz", - ], -) - -# absl -http_archive( - name = "com_google_absl", - strip_prefix = "abseil-cpp-master", - urls = ["https://github.com/abseil/abseil-cpp/archive/master.zip"], -) - -load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains") -load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository") -load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language") -load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") -load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") - -switched_rules_by_language( - name = "com_google_googleapis_imports", - cc = True, -) - -# Do *not* call *_dependencies(), etc, yet. See comment at the end. - -# Generated Google APIs protos for Golang -# Generated Google APIs protos for Golang 05/25/2023 -go_repository( - name = "org_golang_google_genproto_googleapis_api", - build_file_proto_mode = "disable_global", - importpath = "google.golang.org/genproto/googleapis/api", - sum = "h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ=", - version = "v0.0.0-20230525234035-dd9d682886f9", -) - -# Generated Google APIs protos for Golang 05/25/2023 -go_repository( - name = "org_golang_google_genproto_googleapis_rpc", - build_file_proto_mode = "disable_global", - importpath = "google.golang.org/genproto/googleapis/rpc", - sum = "h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM=", - version = "v0.0.0-20230525234030-28d5490b6b19", -) - -# gRPC deps -go_repository( - name = "org_golang_google_grpc", - build_file_proto_mode = "disable_global", - importpath = "google.golang.org/grpc", - tag = "v1.49.0", -) - -go_repository( - name = "org_golang_x_net", - importpath = "golang.org/x/net", - sum = "h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=", - version = "v0.0.0-20190311183353-d8887717615a", -) - -go_repository( - name = "org_golang_x_text", - importpath = "golang.org/x/text", - sum = "h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=", - version = "v0.3.2", -) - -# Run the dependencies at the end. These will silently try to import some -# of the above repositories but at different versions, so ours must come first. -go_rules_dependencies() -go_register_toolchains(version = "1.19.1") -gazelle_dependencies() -rules_proto_dependencies() -rules_proto_toolchains() -protobuf_deps() diff --git a/vendor/cel.dev/expr/checked.pb.go b/vendor/cel.dev/expr/checked.pb.go deleted file mode 100644 index bb225c8ab3e..00000000000 --- a/vendor/cel.dev/expr/checked.pb.go +++ /dev/null @@ -1,1432 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.5 -// source: cel/expr/checked.proto - -package expr - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Type_PrimitiveType int32 - -const ( - Type_PRIMITIVE_TYPE_UNSPECIFIED Type_PrimitiveType = 0 - Type_BOOL Type_PrimitiveType = 1 - Type_INT64 Type_PrimitiveType = 2 - Type_UINT64 Type_PrimitiveType = 3 - Type_DOUBLE Type_PrimitiveType = 4 - Type_STRING Type_PrimitiveType = 5 - Type_BYTES Type_PrimitiveType = 6 -) - -// Enum value maps for Type_PrimitiveType. -var ( - Type_PrimitiveType_name = map[int32]string{ - 0: "PRIMITIVE_TYPE_UNSPECIFIED", - 1: "BOOL", - 2: "INT64", - 3: "UINT64", - 4: "DOUBLE", - 5: "STRING", - 6: "BYTES", - } - Type_PrimitiveType_value = map[string]int32{ - "PRIMITIVE_TYPE_UNSPECIFIED": 0, - "BOOL": 1, - "INT64": 2, - "UINT64": 3, - "DOUBLE": 4, - "STRING": 5, - "BYTES": 6, - } -) - -func (x Type_PrimitiveType) Enum() *Type_PrimitiveType { - p := new(Type_PrimitiveType) - *p = x - return p -} - -func (x Type_PrimitiveType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Type_PrimitiveType) Descriptor() protoreflect.EnumDescriptor { - return file_cel_expr_checked_proto_enumTypes[0].Descriptor() -} - -func (Type_PrimitiveType) Type() protoreflect.EnumType { - return &file_cel_expr_checked_proto_enumTypes[0] -} - -func (x Type_PrimitiveType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Type_PrimitiveType.Descriptor instead. -func (Type_PrimitiveType) EnumDescriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{1, 0} -} - -type Type_WellKnownType int32 - -const ( - Type_WELL_KNOWN_TYPE_UNSPECIFIED Type_WellKnownType = 0 - Type_ANY Type_WellKnownType = 1 - Type_TIMESTAMP Type_WellKnownType = 2 - Type_DURATION Type_WellKnownType = 3 -) - -// Enum value maps for Type_WellKnownType. -var ( - Type_WellKnownType_name = map[int32]string{ - 0: "WELL_KNOWN_TYPE_UNSPECIFIED", - 1: "ANY", - 2: "TIMESTAMP", - 3: "DURATION", - } - Type_WellKnownType_value = map[string]int32{ - "WELL_KNOWN_TYPE_UNSPECIFIED": 0, - "ANY": 1, - "TIMESTAMP": 2, - "DURATION": 3, - } -) - -func (x Type_WellKnownType) Enum() *Type_WellKnownType { - p := new(Type_WellKnownType) - *p = x - return p -} - -func (x Type_WellKnownType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Type_WellKnownType) Descriptor() protoreflect.EnumDescriptor { - return file_cel_expr_checked_proto_enumTypes[1].Descriptor() -} - -func (Type_WellKnownType) Type() protoreflect.EnumType { - return &file_cel_expr_checked_proto_enumTypes[1] -} - -func (x Type_WellKnownType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Type_WellKnownType.Descriptor instead. -func (Type_WellKnownType) EnumDescriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{1, 1} -} - -type CheckedExpr struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ReferenceMap map[int64]*Reference `protobuf:"bytes,2,rep,name=reference_map,json=referenceMap,proto3" json:"reference_map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - TypeMap map[int64]*Type `protobuf:"bytes,3,rep,name=type_map,json=typeMap,proto3" json:"type_map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - SourceInfo *SourceInfo `protobuf:"bytes,5,opt,name=source_info,json=sourceInfo,proto3" json:"source_info,omitempty"` - ExprVersion string `protobuf:"bytes,6,opt,name=expr_version,json=exprVersion,proto3" json:"expr_version,omitempty"` - Expr *Expr `protobuf:"bytes,4,opt,name=expr,proto3" json:"expr,omitempty"` -} - -func (x *CheckedExpr) Reset() { - *x = CheckedExpr{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_checked_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckedExpr) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckedExpr) ProtoMessage() {} - -func (x *CheckedExpr) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_checked_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckedExpr.ProtoReflect.Descriptor instead. -func (*CheckedExpr) Descriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{0} -} - -func (x *CheckedExpr) GetReferenceMap() map[int64]*Reference { - if x != nil { - return x.ReferenceMap - } - return nil -} - -func (x *CheckedExpr) GetTypeMap() map[int64]*Type { - if x != nil { - return x.TypeMap - } - return nil -} - -func (x *CheckedExpr) GetSourceInfo() *SourceInfo { - if x != nil { - return x.SourceInfo - } - return nil -} - -func (x *CheckedExpr) GetExprVersion() string { - if x != nil { - return x.ExprVersion - } - return "" -} - -func (x *CheckedExpr) GetExpr() *Expr { - if x != nil { - return x.Expr - } - return nil -} - -type Type struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to TypeKind: - // - // *Type_Dyn - // *Type_Null - // *Type_Primitive - // *Type_Wrapper - // *Type_WellKnown - // *Type_ListType_ - // *Type_MapType_ - // *Type_Function - // *Type_MessageType - // *Type_TypeParam - // *Type_Type - // *Type_Error - // *Type_AbstractType_ - TypeKind isType_TypeKind `protobuf_oneof:"type_kind"` -} - -func (x *Type) Reset() { - *x = Type{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_checked_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Type) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Type) ProtoMessage() {} - -func (x *Type) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_checked_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Type.ProtoReflect.Descriptor instead. -func (*Type) Descriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{1} -} - -func (m *Type) GetTypeKind() isType_TypeKind { - if m != nil { - return m.TypeKind - } - return nil -} - -func (x *Type) GetDyn() *emptypb.Empty { - if x, ok := x.GetTypeKind().(*Type_Dyn); ok { - return x.Dyn - } - return nil -} - -func (x *Type) GetNull() structpb.NullValue { - if x, ok := x.GetTypeKind().(*Type_Null); ok { - return x.Null - } - return structpb.NullValue(0) -} - -func (x *Type) GetPrimitive() Type_PrimitiveType { - if x, ok := x.GetTypeKind().(*Type_Primitive); ok { - return x.Primitive - } - return Type_PRIMITIVE_TYPE_UNSPECIFIED -} - -func (x *Type) GetWrapper() Type_PrimitiveType { - if x, ok := x.GetTypeKind().(*Type_Wrapper); ok { - return x.Wrapper - } - return Type_PRIMITIVE_TYPE_UNSPECIFIED -} - -func (x *Type) GetWellKnown() Type_WellKnownType { - if x, ok := x.GetTypeKind().(*Type_WellKnown); ok { - return x.WellKnown - } - return Type_WELL_KNOWN_TYPE_UNSPECIFIED -} - -func (x *Type) GetListType() *Type_ListType { - if x, ok := x.GetTypeKind().(*Type_ListType_); ok { - return x.ListType - } - return nil -} - -func (x *Type) GetMapType() *Type_MapType { - if x, ok := x.GetTypeKind().(*Type_MapType_); ok { - return x.MapType - } - return nil -} - -func (x *Type) GetFunction() *Type_FunctionType { - if x, ok := x.GetTypeKind().(*Type_Function); ok { - return x.Function - } - return nil -} - -func (x *Type) GetMessageType() string { - if x, ok := x.GetTypeKind().(*Type_MessageType); ok { - return x.MessageType - } - return "" -} - -func (x *Type) GetTypeParam() string { - if x, ok := x.GetTypeKind().(*Type_TypeParam); ok { - return x.TypeParam - } - return "" -} - -func (x *Type) GetType() *Type { - if x, ok := x.GetTypeKind().(*Type_Type); ok { - return x.Type - } - return nil -} - -func (x *Type) GetError() *emptypb.Empty { - if x, ok := x.GetTypeKind().(*Type_Error); ok { - return x.Error - } - return nil -} - -func (x *Type) GetAbstractType() *Type_AbstractType { - if x, ok := x.GetTypeKind().(*Type_AbstractType_); ok { - return x.AbstractType - } - return nil -} - -type isType_TypeKind interface { - isType_TypeKind() -} - -type Type_Dyn struct { - Dyn *emptypb.Empty `protobuf:"bytes,1,opt,name=dyn,proto3,oneof"` -} - -type Type_Null struct { - Null structpb.NullValue `protobuf:"varint,2,opt,name=null,proto3,enum=google.protobuf.NullValue,oneof"` -} - -type Type_Primitive struct { - Primitive Type_PrimitiveType `protobuf:"varint,3,opt,name=primitive,proto3,enum=cel.expr.Type_PrimitiveType,oneof"` -} - -type Type_Wrapper struct { - Wrapper Type_PrimitiveType `protobuf:"varint,4,opt,name=wrapper,proto3,enum=cel.expr.Type_PrimitiveType,oneof"` -} - -type Type_WellKnown struct { - WellKnown Type_WellKnownType `protobuf:"varint,5,opt,name=well_known,json=wellKnown,proto3,enum=cel.expr.Type_WellKnownType,oneof"` -} - -type Type_ListType_ struct { - ListType *Type_ListType `protobuf:"bytes,6,opt,name=list_type,json=listType,proto3,oneof"` -} - -type Type_MapType_ struct { - MapType *Type_MapType `protobuf:"bytes,7,opt,name=map_type,json=mapType,proto3,oneof"` -} - -type Type_Function struct { - Function *Type_FunctionType `protobuf:"bytes,8,opt,name=function,proto3,oneof"` -} - -type Type_MessageType struct { - MessageType string `protobuf:"bytes,9,opt,name=message_type,json=messageType,proto3,oneof"` -} - -type Type_TypeParam struct { - TypeParam string `protobuf:"bytes,10,opt,name=type_param,json=typeParam,proto3,oneof"` -} - -type Type_Type struct { - Type *Type `protobuf:"bytes,11,opt,name=type,proto3,oneof"` -} - -type Type_Error struct { - Error *emptypb.Empty `protobuf:"bytes,12,opt,name=error,proto3,oneof"` -} - -type Type_AbstractType_ struct { - AbstractType *Type_AbstractType `protobuf:"bytes,14,opt,name=abstract_type,json=abstractType,proto3,oneof"` -} - -func (*Type_Dyn) isType_TypeKind() {} - -func (*Type_Null) isType_TypeKind() {} - -func (*Type_Primitive) isType_TypeKind() {} - -func (*Type_Wrapper) isType_TypeKind() {} - -func (*Type_WellKnown) isType_TypeKind() {} - -func (*Type_ListType_) isType_TypeKind() {} - -func (*Type_MapType_) isType_TypeKind() {} - -func (*Type_Function) isType_TypeKind() {} - -func (*Type_MessageType) isType_TypeKind() {} - -func (*Type_TypeParam) isType_TypeKind() {} - -func (*Type_Type) isType_TypeKind() {} - -func (*Type_Error) isType_TypeKind() {} - -func (*Type_AbstractType_) isType_TypeKind() {} - -type Decl struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to DeclKind: - // - // *Decl_Ident - // *Decl_Function - DeclKind isDecl_DeclKind `protobuf_oneof:"decl_kind"` -} - -func (x *Decl) Reset() { - *x = Decl{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_checked_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Decl) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Decl) ProtoMessage() {} - -func (x *Decl) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_checked_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Decl.ProtoReflect.Descriptor instead. -func (*Decl) Descriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{2} -} - -func (x *Decl) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *Decl) GetDeclKind() isDecl_DeclKind { - if m != nil { - return m.DeclKind - } - return nil -} - -func (x *Decl) GetIdent() *Decl_IdentDecl { - if x, ok := x.GetDeclKind().(*Decl_Ident); ok { - return x.Ident - } - return nil -} - -func (x *Decl) GetFunction() *Decl_FunctionDecl { - if x, ok := x.GetDeclKind().(*Decl_Function); ok { - return x.Function - } - return nil -} - -type isDecl_DeclKind interface { - isDecl_DeclKind() -} - -type Decl_Ident struct { - Ident *Decl_IdentDecl `protobuf:"bytes,2,opt,name=ident,proto3,oneof"` -} - -type Decl_Function struct { - Function *Decl_FunctionDecl `protobuf:"bytes,3,opt,name=function,proto3,oneof"` -} - -func (*Decl_Ident) isDecl_DeclKind() {} - -func (*Decl_Function) isDecl_DeclKind() {} - -type Reference struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - OverloadId []string `protobuf:"bytes,3,rep,name=overload_id,json=overloadId,proto3" json:"overload_id,omitempty"` - Value *Constant `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Reference) Reset() { - *x = Reference{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_checked_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Reference) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Reference) ProtoMessage() {} - -func (x *Reference) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_checked_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Reference.ProtoReflect.Descriptor instead. -func (*Reference) Descriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{3} -} - -func (x *Reference) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Reference) GetOverloadId() []string { - if x != nil { - return x.OverloadId - } - return nil -} - -func (x *Reference) GetValue() *Constant { - if x != nil { - return x.Value - } - return nil -} - -type Type_ListType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ElemType *Type `protobuf:"bytes,1,opt,name=elem_type,json=elemType,proto3" json:"elem_type,omitempty"` -} - -func (x *Type_ListType) Reset() { - *x = Type_ListType{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_checked_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Type_ListType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Type_ListType) ProtoMessage() {} - -func (x *Type_ListType) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_checked_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Type_ListType.ProtoReflect.Descriptor instead. -func (*Type_ListType) Descriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *Type_ListType) GetElemType() *Type { - if x != nil { - return x.ElemType - } - return nil -} - -type Type_MapType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - KeyType *Type `protobuf:"bytes,1,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` - ValueType *Type `protobuf:"bytes,2,opt,name=value_type,json=valueType,proto3" json:"value_type,omitempty"` -} - -func (x *Type_MapType) Reset() { - *x = Type_MapType{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_checked_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Type_MapType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Type_MapType) ProtoMessage() {} - -func (x *Type_MapType) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_checked_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Type_MapType.ProtoReflect.Descriptor instead. -func (*Type_MapType) Descriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{1, 1} -} - -func (x *Type_MapType) GetKeyType() *Type { - if x != nil { - return x.KeyType - } - return nil -} - -func (x *Type_MapType) GetValueType() *Type { - if x != nil { - return x.ValueType - } - return nil -} - -type Type_FunctionType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResultType *Type `protobuf:"bytes,1,opt,name=result_type,json=resultType,proto3" json:"result_type,omitempty"` - ArgTypes []*Type `protobuf:"bytes,2,rep,name=arg_types,json=argTypes,proto3" json:"arg_types,omitempty"` -} - -func (x *Type_FunctionType) Reset() { - *x = Type_FunctionType{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_checked_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Type_FunctionType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Type_FunctionType) ProtoMessage() {} - -func (x *Type_FunctionType) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_checked_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Type_FunctionType.ProtoReflect.Descriptor instead. -func (*Type_FunctionType) Descriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{1, 2} -} - -func (x *Type_FunctionType) GetResultType() *Type { - if x != nil { - return x.ResultType - } - return nil -} - -func (x *Type_FunctionType) GetArgTypes() []*Type { - if x != nil { - return x.ArgTypes - } - return nil -} - -type Type_AbstractType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - ParameterTypes []*Type `protobuf:"bytes,2,rep,name=parameter_types,json=parameterTypes,proto3" json:"parameter_types,omitempty"` -} - -func (x *Type_AbstractType) Reset() { - *x = Type_AbstractType{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_checked_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Type_AbstractType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Type_AbstractType) ProtoMessage() {} - -func (x *Type_AbstractType) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_checked_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Type_AbstractType.ProtoReflect.Descriptor instead. -func (*Type_AbstractType) Descriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{1, 3} -} - -func (x *Type_AbstractType) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Type_AbstractType) GetParameterTypes() []*Type { - if x != nil { - return x.ParameterTypes - } - return nil -} - -type Decl_IdentDecl struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type *Type `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Value *Constant `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Doc string `protobuf:"bytes,3,opt,name=doc,proto3" json:"doc,omitempty"` -} - -func (x *Decl_IdentDecl) Reset() { - *x = Decl_IdentDecl{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_checked_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Decl_IdentDecl) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Decl_IdentDecl) ProtoMessage() {} - -func (x *Decl_IdentDecl) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_checked_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Decl_IdentDecl.ProtoReflect.Descriptor instead. -func (*Decl_IdentDecl) Descriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *Decl_IdentDecl) GetType() *Type { - if x != nil { - return x.Type - } - return nil -} - -func (x *Decl_IdentDecl) GetValue() *Constant { - if x != nil { - return x.Value - } - return nil -} - -func (x *Decl_IdentDecl) GetDoc() string { - if x != nil { - return x.Doc - } - return "" -} - -type Decl_FunctionDecl struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Overloads []*Decl_FunctionDecl_Overload `protobuf:"bytes,1,rep,name=overloads,proto3" json:"overloads,omitempty"` -} - -func (x *Decl_FunctionDecl) Reset() { - *x = Decl_FunctionDecl{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_checked_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Decl_FunctionDecl) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Decl_FunctionDecl) ProtoMessage() {} - -func (x *Decl_FunctionDecl) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_checked_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Decl_FunctionDecl.ProtoReflect.Descriptor instead. -func (*Decl_FunctionDecl) Descriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{2, 1} -} - -func (x *Decl_FunctionDecl) GetOverloads() []*Decl_FunctionDecl_Overload { - if x != nil { - return x.Overloads - } - return nil -} - -type Decl_FunctionDecl_Overload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OverloadId string `protobuf:"bytes,1,opt,name=overload_id,json=overloadId,proto3" json:"overload_id,omitempty"` - Params []*Type `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` - TypeParams []string `protobuf:"bytes,3,rep,name=type_params,json=typeParams,proto3" json:"type_params,omitempty"` - ResultType *Type `protobuf:"bytes,4,opt,name=result_type,json=resultType,proto3" json:"result_type,omitempty"` - IsInstanceFunction bool `protobuf:"varint,5,opt,name=is_instance_function,json=isInstanceFunction,proto3" json:"is_instance_function,omitempty"` - Doc string `protobuf:"bytes,6,opt,name=doc,proto3" json:"doc,omitempty"` -} - -func (x *Decl_FunctionDecl_Overload) Reset() { - *x = Decl_FunctionDecl_Overload{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_checked_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Decl_FunctionDecl_Overload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Decl_FunctionDecl_Overload) ProtoMessage() {} - -func (x *Decl_FunctionDecl_Overload) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_checked_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Decl_FunctionDecl_Overload.ProtoReflect.Descriptor instead. -func (*Decl_FunctionDecl_Overload) Descriptor() ([]byte, []int) { - return file_cel_expr_checked_proto_rawDescGZIP(), []int{2, 1, 0} -} - -func (x *Decl_FunctionDecl_Overload) GetOverloadId() string { - if x != nil { - return x.OverloadId - } - return "" -} - -func (x *Decl_FunctionDecl_Overload) GetParams() []*Type { - if x != nil { - return x.Params - } - return nil -} - -func (x *Decl_FunctionDecl_Overload) GetTypeParams() []string { - if x != nil { - return x.TypeParams - } - return nil -} - -func (x *Decl_FunctionDecl_Overload) GetResultType() *Type { - if x != nil { - return x.ResultType - } - return nil -} - -func (x *Decl_FunctionDecl_Overload) GetIsInstanceFunction() bool { - if x != nil { - return x.IsInstanceFunction - } - return false -} - -func (x *Decl_FunctionDecl_Overload) GetDoc() string { - if x != nil { - return x.Doc - } - return "" -} - -var File_cel_expr_checked_proto protoreflect.FileDescriptor - -var file_cel_expr_checked_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, - 0x70, 0x72, 0x1a, 0x15, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x73, 0x79, 0x6e, - 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x03, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, - 0x45, 0x78, 0x70, 0x72, 0x12, 0x4c, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x65, - 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, - 0x70, 0x72, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4d, - 0x61, 0x70, 0x12, 0x3d, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x4d, 0x61, - 0x70, 0x12, 0x35, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, - 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x72, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x65, 0x78, 0x70, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x04, 0x65, - 0x78, 0x70, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, - 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x1a, - 0x54, 0x0a, 0x11, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, - 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4a, 0x0a, 0x0c, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, - 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0xe6, 0x09, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x64, 0x79, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, - 0x00, 0x52, 0x03, 0x64, 0x79, 0x6e, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6d, - 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x65, - 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6d, - 0x69, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x70, 0x72, 0x69, - 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, - 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, - 0x12, 0x3d, 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, - 0x54, 0x79, 0x70, 0x65, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x77, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x12, - 0x36, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, - 0x70, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6c, - 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x65, 0x6c, 0x2e, - 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, - 0x65, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x08, - 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x46, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x66, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0a, - 0x74, 0x79, 0x70, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x09, 0x74, 0x79, 0x70, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x24, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, - 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x0d, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x65, 0x6c, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x41, 0x62, 0x73, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x37, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x09, 0x65, 0x6c, 0x65, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, - 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x1a, 0x63, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x6b, - 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x6b, - 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x6c, 0x0a, 0x0c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, - 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x61, 0x72, 0x67, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x1a, 0x5b, 0x0a, 0x0c, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x52, 0x49, 0x4d, 0x49, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, - 0x4e, 0x54, 0x36, 0x34, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, - 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x04, 0x12, 0x0a, - 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x59, - 0x54, 0x45, 0x53, 0x10, 0x06, 0x22, 0x56, 0x0a, 0x0d, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, - 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x02, 0x12, - 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x42, 0x0b, 0x0a, - 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xc2, 0x04, 0x0a, 0x04, 0x44, - 0x65, 0x63, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, - 0x72, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x63, 0x6c, - 0x48, 0x00, 0x52, 0x05, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x08, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x65, - 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x2e, 0x46, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x63, 0x6c, 0x48, 0x00, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6b, 0x0a, 0x09, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x63, - 0x6c, 0x12, 0x22, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, - 0x63, 0x1a, 0xbe, 0x02, 0x0a, 0x0c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, - 0x63, 0x6c, 0x12, 0x42, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, - 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, - 0x63, 0x6c, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x09, 0x6f, 0x76, 0x65, - 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x1a, 0xe9, 0x01, 0x0a, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x6c, - 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, - 0x61, 0x64, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x0a, 0x0b, - 0x74, 0x79, 0x70, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x74, 0x79, 0x70, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2f, 0x0a, - 0x0b, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, - 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x75, - 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x73, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, - 0x6f, 0x63, 0x42, 0x0b, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x6c, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x22, - 0x6a, 0x0a, 0x09, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x49, - 0x64, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x2c, 0x0a, 0x0c, 0x64, - 0x65, 0x76, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x42, 0x09, 0x44, 0x65, 0x63, - 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0c, 0x63, 0x65, 0x6c, 0x2e, 0x64, 0x65, - 0x76, 0x2f, 0x65, 0x78, 0x70, 0x72, 0xf8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_cel_expr_checked_proto_rawDescOnce sync.Once - file_cel_expr_checked_proto_rawDescData = file_cel_expr_checked_proto_rawDesc -) - -func file_cel_expr_checked_proto_rawDescGZIP() []byte { - file_cel_expr_checked_proto_rawDescOnce.Do(func() { - file_cel_expr_checked_proto_rawDescData = protoimpl.X.CompressGZIP(file_cel_expr_checked_proto_rawDescData) - }) - return file_cel_expr_checked_proto_rawDescData -} - -var file_cel_expr_checked_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_cel_expr_checked_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_cel_expr_checked_proto_goTypes = []interface{}{ - (Type_PrimitiveType)(0), // 0: cel.expr.Type.PrimitiveType - (Type_WellKnownType)(0), // 1: cel.expr.Type.WellKnownType - (*CheckedExpr)(nil), // 2: cel.expr.CheckedExpr - (*Type)(nil), // 3: cel.expr.Type - (*Decl)(nil), // 4: cel.expr.Decl - (*Reference)(nil), // 5: cel.expr.Reference - nil, // 6: cel.expr.CheckedExpr.ReferenceMapEntry - nil, // 7: cel.expr.CheckedExpr.TypeMapEntry - (*Type_ListType)(nil), // 8: cel.expr.Type.ListType - (*Type_MapType)(nil), // 9: cel.expr.Type.MapType - (*Type_FunctionType)(nil), // 10: cel.expr.Type.FunctionType - (*Type_AbstractType)(nil), // 11: cel.expr.Type.AbstractType - (*Decl_IdentDecl)(nil), // 12: cel.expr.Decl.IdentDecl - (*Decl_FunctionDecl)(nil), // 13: cel.expr.Decl.FunctionDecl - (*Decl_FunctionDecl_Overload)(nil), // 14: cel.expr.Decl.FunctionDecl.Overload - (*SourceInfo)(nil), // 15: cel.expr.SourceInfo - (*Expr)(nil), // 16: cel.expr.Expr - (*emptypb.Empty)(nil), // 17: google.protobuf.Empty - (structpb.NullValue)(0), // 18: google.protobuf.NullValue - (*Constant)(nil), // 19: cel.expr.Constant -} -var file_cel_expr_checked_proto_depIdxs = []int32{ - 6, // 0: cel.expr.CheckedExpr.reference_map:type_name -> cel.expr.CheckedExpr.ReferenceMapEntry - 7, // 1: cel.expr.CheckedExpr.type_map:type_name -> cel.expr.CheckedExpr.TypeMapEntry - 15, // 2: cel.expr.CheckedExpr.source_info:type_name -> cel.expr.SourceInfo - 16, // 3: cel.expr.CheckedExpr.expr:type_name -> cel.expr.Expr - 17, // 4: cel.expr.Type.dyn:type_name -> google.protobuf.Empty - 18, // 5: cel.expr.Type.null:type_name -> google.protobuf.NullValue - 0, // 6: cel.expr.Type.primitive:type_name -> cel.expr.Type.PrimitiveType - 0, // 7: cel.expr.Type.wrapper:type_name -> cel.expr.Type.PrimitiveType - 1, // 8: cel.expr.Type.well_known:type_name -> cel.expr.Type.WellKnownType - 8, // 9: cel.expr.Type.list_type:type_name -> cel.expr.Type.ListType - 9, // 10: cel.expr.Type.map_type:type_name -> cel.expr.Type.MapType - 10, // 11: cel.expr.Type.function:type_name -> cel.expr.Type.FunctionType - 3, // 12: cel.expr.Type.type:type_name -> cel.expr.Type - 17, // 13: cel.expr.Type.error:type_name -> google.protobuf.Empty - 11, // 14: cel.expr.Type.abstract_type:type_name -> cel.expr.Type.AbstractType - 12, // 15: cel.expr.Decl.ident:type_name -> cel.expr.Decl.IdentDecl - 13, // 16: cel.expr.Decl.function:type_name -> cel.expr.Decl.FunctionDecl - 19, // 17: cel.expr.Reference.value:type_name -> cel.expr.Constant - 5, // 18: cel.expr.CheckedExpr.ReferenceMapEntry.value:type_name -> cel.expr.Reference - 3, // 19: cel.expr.CheckedExpr.TypeMapEntry.value:type_name -> cel.expr.Type - 3, // 20: cel.expr.Type.ListType.elem_type:type_name -> cel.expr.Type - 3, // 21: cel.expr.Type.MapType.key_type:type_name -> cel.expr.Type - 3, // 22: cel.expr.Type.MapType.value_type:type_name -> cel.expr.Type - 3, // 23: cel.expr.Type.FunctionType.result_type:type_name -> cel.expr.Type - 3, // 24: cel.expr.Type.FunctionType.arg_types:type_name -> cel.expr.Type - 3, // 25: cel.expr.Type.AbstractType.parameter_types:type_name -> cel.expr.Type - 3, // 26: cel.expr.Decl.IdentDecl.type:type_name -> cel.expr.Type - 19, // 27: cel.expr.Decl.IdentDecl.value:type_name -> cel.expr.Constant - 14, // 28: cel.expr.Decl.FunctionDecl.overloads:type_name -> cel.expr.Decl.FunctionDecl.Overload - 3, // 29: cel.expr.Decl.FunctionDecl.Overload.params:type_name -> cel.expr.Type - 3, // 30: cel.expr.Decl.FunctionDecl.Overload.result_type:type_name -> cel.expr.Type - 31, // [31:31] is the sub-list for method output_type - 31, // [31:31] is the sub-list for method input_type - 31, // [31:31] is the sub-list for extension type_name - 31, // [31:31] is the sub-list for extension extendee - 0, // [0:31] is the sub-list for field type_name -} - -func init() { file_cel_expr_checked_proto_init() } -func file_cel_expr_checked_proto_init() { - if File_cel_expr_checked_proto != nil { - return - } - file_cel_expr_syntax_proto_init() - if !protoimpl.UnsafeEnabled { - file_cel_expr_checked_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckedExpr); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_checked_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Type); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_checked_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Decl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_checked_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Reference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_checked_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Type_ListType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_checked_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Type_MapType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_checked_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Type_FunctionType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_checked_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Type_AbstractType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_checked_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Decl_IdentDecl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_checked_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Decl_FunctionDecl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_checked_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Decl_FunctionDecl_Overload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cel_expr_checked_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Type_Dyn)(nil), - (*Type_Null)(nil), - (*Type_Primitive)(nil), - (*Type_Wrapper)(nil), - (*Type_WellKnown)(nil), - (*Type_ListType_)(nil), - (*Type_MapType_)(nil), - (*Type_Function)(nil), - (*Type_MessageType)(nil), - (*Type_TypeParam)(nil), - (*Type_Type)(nil), - (*Type_Error)(nil), - (*Type_AbstractType_)(nil), - } - file_cel_expr_checked_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Decl_Ident)(nil), - (*Decl_Function)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cel_expr_checked_proto_rawDesc, - NumEnums: 2, - NumMessages: 13, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cel_expr_checked_proto_goTypes, - DependencyIndexes: file_cel_expr_checked_proto_depIdxs, - EnumInfos: file_cel_expr_checked_proto_enumTypes, - MessageInfos: file_cel_expr_checked_proto_msgTypes, - }.Build() - File_cel_expr_checked_proto = out.File - file_cel_expr_checked_proto_rawDesc = nil - file_cel_expr_checked_proto_goTypes = nil - file_cel_expr_checked_proto_depIdxs = nil -} diff --git a/vendor/cel.dev/expr/cloudbuild.yaml b/vendor/cel.dev/expr/cloudbuild.yaml deleted file mode 100644 index 8a8ea3763f6..00000000000 --- a/vendor/cel.dev/expr/cloudbuild.yaml +++ /dev/null @@ -1,9 +0,0 @@ -steps: -- name: 'gcr.io/cloud-builders/bazel:6.4.0' - entrypoint: bazel - args: ['test', '--test_output=errors', '...'] - id: bazel-test - waitFor: ['-'] -timeout: 15m -options: - machineType: 'N1_HIGHCPU_32' diff --git a/vendor/cel.dev/expr/eval.pb.go b/vendor/cel.dev/expr/eval.pb.go deleted file mode 100644 index 8f651f9cc6a..00000000000 --- a/vendor/cel.dev/expr/eval.pb.go +++ /dev/null @@ -1,490 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.5 -// source: cel/expr/eval.proto - -package expr - -import ( - status "google.golang.org/genproto/googleapis/rpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type EvalState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Values []*ExprValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` - Results []*EvalState_Result `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"` -} - -func (x *EvalState) Reset() { - *x = EvalState{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_eval_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EvalState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EvalState) ProtoMessage() {} - -func (x *EvalState) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_eval_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EvalState.ProtoReflect.Descriptor instead. -func (*EvalState) Descriptor() ([]byte, []int) { - return file_cel_expr_eval_proto_rawDescGZIP(), []int{0} -} - -func (x *EvalState) GetValues() []*ExprValue { - if x != nil { - return x.Values - } - return nil -} - -func (x *EvalState) GetResults() []*EvalState_Result { - if x != nil { - return x.Results - } - return nil -} - -type ExprValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Kind: - // - // *ExprValue_Value - // *ExprValue_Error - // *ExprValue_Unknown - Kind isExprValue_Kind `protobuf_oneof:"kind"` -} - -func (x *ExprValue) Reset() { - *x = ExprValue{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_eval_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExprValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExprValue) ProtoMessage() {} - -func (x *ExprValue) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_eval_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExprValue.ProtoReflect.Descriptor instead. -func (*ExprValue) Descriptor() ([]byte, []int) { - return file_cel_expr_eval_proto_rawDescGZIP(), []int{1} -} - -func (m *ExprValue) GetKind() isExprValue_Kind { - if m != nil { - return m.Kind - } - return nil -} - -func (x *ExprValue) GetValue() *Value { - if x, ok := x.GetKind().(*ExprValue_Value); ok { - return x.Value - } - return nil -} - -func (x *ExprValue) GetError() *ErrorSet { - if x, ok := x.GetKind().(*ExprValue_Error); ok { - return x.Error - } - return nil -} - -func (x *ExprValue) GetUnknown() *UnknownSet { - if x, ok := x.GetKind().(*ExprValue_Unknown); ok { - return x.Unknown - } - return nil -} - -type isExprValue_Kind interface { - isExprValue_Kind() -} - -type ExprValue_Value struct { - Value *Value `protobuf:"bytes,1,opt,name=value,proto3,oneof"` -} - -type ExprValue_Error struct { - Error *ErrorSet `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -type ExprValue_Unknown struct { - Unknown *UnknownSet `protobuf:"bytes,3,opt,name=unknown,proto3,oneof"` -} - -func (*ExprValue_Value) isExprValue_Kind() {} - -func (*ExprValue_Error) isExprValue_Kind() {} - -func (*ExprValue_Unknown) isExprValue_Kind() {} - -type ErrorSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Errors []*status.Status `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` -} - -func (x *ErrorSet) Reset() { - *x = ErrorSet{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_eval_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrorSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrorSet) ProtoMessage() {} - -func (x *ErrorSet) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_eval_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrorSet.ProtoReflect.Descriptor instead. -func (*ErrorSet) Descriptor() ([]byte, []int) { - return file_cel_expr_eval_proto_rawDescGZIP(), []int{2} -} - -func (x *ErrorSet) GetErrors() []*status.Status { - if x != nil { - return x.Errors - } - return nil -} - -type UnknownSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exprs []int64 `protobuf:"varint,1,rep,packed,name=exprs,proto3" json:"exprs,omitempty"` -} - -func (x *UnknownSet) Reset() { - *x = UnknownSet{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_eval_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnknownSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnknownSet) ProtoMessage() {} - -func (x *UnknownSet) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_eval_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UnknownSet.ProtoReflect.Descriptor instead. -func (*UnknownSet) Descriptor() ([]byte, []int) { - return file_cel_expr_eval_proto_rawDescGZIP(), []int{3} -} - -func (x *UnknownSet) GetExprs() []int64 { - if x != nil { - return x.Exprs - } - return nil -} - -type EvalState_Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Expr int64 `protobuf:"varint,1,opt,name=expr,proto3" json:"expr,omitempty"` - Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *EvalState_Result) Reset() { - *x = EvalState_Result{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_eval_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EvalState_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EvalState_Result) ProtoMessage() {} - -func (x *EvalState_Result) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_eval_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EvalState_Result.ProtoReflect.Descriptor instead. -func (*EvalState_Result) Descriptor() ([]byte, []int) { - return file_cel_expr_eval_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *EvalState_Result) GetExpr() int64 { - if x != nil { - return x.Expr - } - return 0 -} - -func (x *EvalState_Result) GetValue() int64 { - if x != nil { - return x.Value - } - return 0 -} - -var File_cel_expr_eval_proto protoreflect.FileDescriptor - -var file_cel_expr_eval_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x1a, - 0x14, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, - 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, - 0x01, 0x0a, 0x09, 0x45, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, - 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x65, 0x6c, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, - 0x32, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x78, 0x70, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x09, 0x45, 0x78, 0x70, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x65, 0x6c, 0x2e, - 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, - 0x70, 0x72, 0x2e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, - 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x22, 0x36, 0x0a, 0x08, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x06, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x22, 0x0a, 0x0a, 0x55, 0x6e, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x70, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x65, 0x78, 0x70, 0x72, 0x73, 0x42, 0x2c, 0x0a, 0x0c, - 0x64, 0x65, 0x76, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x42, 0x09, 0x45, 0x76, - 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0c, 0x63, 0x65, 0x6c, 0x2e, 0x64, - 0x65, 0x76, 0x2f, 0x65, 0x78, 0x70, 0x72, 0xf8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_cel_expr_eval_proto_rawDescOnce sync.Once - file_cel_expr_eval_proto_rawDescData = file_cel_expr_eval_proto_rawDesc -) - -func file_cel_expr_eval_proto_rawDescGZIP() []byte { - file_cel_expr_eval_proto_rawDescOnce.Do(func() { - file_cel_expr_eval_proto_rawDescData = protoimpl.X.CompressGZIP(file_cel_expr_eval_proto_rawDescData) - }) - return file_cel_expr_eval_proto_rawDescData -} - -var file_cel_expr_eval_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_cel_expr_eval_proto_goTypes = []interface{}{ - (*EvalState)(nil), // 0: cel.expr.EvalState - (*ExprValue)(nil), // 1: cel.expr.ExprValue - (*ErrorSet)(nil), // 2: cel.expr.ErrorSet - (*UnknownSet)(nil), // 3: cel.expr.UnknownSet - (*EvalState_Result)(nil), // 4: cel.expr.EvalState.Result - (*Value)(nil), // 5: cel.expr.Value - (*status.Status)(nil), // 6: google.rpc.Status -} -var file_cel_expr_eval_proto_depIdxs = []int32{ - 1, // 0: cel.expr.EvalState.values:type_name -> cel.expr.ExprValue - 4, // 1: cel.expr.EvalState.results:type_name -> cel.expr.EvalState.Result - 5, // 2: cel.expr.ExprValue.value:type_name -> cel.expr.Value - 2, // 3: cel.expr.ExprValue.error:type_name -> cel.expr.ErrorSet - 3, // 4: cel.expr.ExprValue.unknown:type_name -> cel.expr.UnknownSet - 6, // 5: cel.expr.ErrorSet.errors:type_name -> google.rpc.Status - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_cel_expr_eval_proto_init() } -func file_cel_expr_eval_proto_init() { - if File_cel_expr_eval_proto != nil { - return - } - file_cel_expr_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_cel_expr_eval_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvalState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_eval_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExprValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_eval_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrorSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_eval_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnknownSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_eval_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvalState_Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cel_expr_eval_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*ExprValue_Value)(nil), - (*ExprValue_Error)(nil), - (*ExprValue_Unknown)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cel_expr_eval_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cel_expr_eval_proto_goTypes, - DependencyIndexes: file_cel_expr_eval_proto_depIdxs, - MessageInfos: file_cel_expr_eval_proto_msgTypes, - }.Build() - File_cel_expr_eval_proto = out.File - file_cel_expr_eval_proto_rawDesc = nil - file_cel_expr_eval_proto_goTypes = nil - file_cel_expr_eval_proto_depIdxs = nil -} diff --git a/vendor/cel.dev/expr/explain.pb.go b/vendor/cel.dev/expr/explain.pb.go deleted file mode 100644 index 79fd5443b96..00000000000 --- a/vendor/cel.dev/expr/explain.pb.go +++ /dev/null @@ -1,236 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.5 -// source: cel/expr/explain.proto - -package expr - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Deprecated: Do not use. -type Explain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` - ExprSteps []*Explain_ExprStep `protobuf:"bytes,2,rep,name=expr_steps,json=exprSteps,proto3" json:"expr_steps,omitempty"` -} - -func (x *Explain) Reset() { - *x = Explain{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_explain_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Explain) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Explain) ProtoMessage() {} - -func (x *Explain) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_explain_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Explain.ProtoReflect.Descriptor instead. -func (*Explain) Descriptor() ([]byte, []int) { - return file_cel_expr_explain_proto_rawDescGZIP(), []int{0} -} - -func (x *Explain) GetValues() []*Value { - if x != nil { - return x.Values - } - return nil -} - -func (x *Explain) GetExprSteps() []*Explain_ExprStep { - if x != nil { - return x.ExprSteps - } - return nil -} - -type Explain_ExprStep struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - ValueIndex int32 `protobuf:"varint,2,opt,name=value_index,json=valueIndex,proto3" json:"value_index,omitempty"` -} - -func (x *Explain_ExprStep) Reset() { - *x = Explain_ExprStep{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_explain_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Explain_ExprStep) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Explain_ExprStep) ProtoMessage() {} - -func (x *Explain_ExprStep) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_explain_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Explain_ExprStep.ProtoReflect.Descriptor instead. -func (*Explain_ExprStep) Descriptor() ([]byte, []int) { - return file_cel_expr_explain_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Explain_ExprStep) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Explain_ExprStep) GetValueIndex() int32 { - if x != nil { - return x.ValueIndex - } - return 0 -} - -var File_cel_expr_explain_proto protoreflect.FileDescriptor - -var file_cel_expr_explain_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x65, 0x78, 0x70, 0x6c, 0x61, - 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, - 0x70, 0x72, 0x1a, 0x14, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x01, 0x0a, 0x07, 0x45, 0x78, 0x70, - 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x39, 0x0a, - 0x0a, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, - 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x53, 0x74, 0x65, 0x70, 0x52, 0x09, 0x65, - 0x78, 0x70, 0x72, 0x53, 0x74, 0x65, 0x70, 0x73, 0x1a, 0x3b, 0x0a, 0x08, 0x45, 0x78, 0x70, 0x72, - 0x53, 0x74, 0x65, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x02, 0x18, 0x01, 0x42, 0x2f, 0x0a, 0x0c, 0x64, 0x65, 0x76, - 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x42, 0x0c, 0x45, 0x78, 0x70, 0x6c, 0x61, - 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0c, 0x63, 0x65, 0x6c, 0x2e, 0x64, - 0x65, 0x76, 0x2f, 0x65, 0x78, 0x70, 0x72, 0xf8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_cel_expr_explain_proto_rawDescOnce sync.Once - file_cel_expr_explain_proto_rawDescData = file_cel_expr_explain_proto_rawDesc -) - -func file_cel_expr_explain_proto_rawDescGZIP() []byte { - file_cel_expr_explain_proto_rawDescOnce.Do(func() { - file_cel_expr_explain_proto_rawDescData = protoimpl.X.CompressGZIP(file_cel_expr_explain_proto_rawDescData) - }) - return file_cel_expr_explain_proto_rawDescData -} - -var file_cel_expr_explain_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cel_expr_explain_proto_goTypes = []interface{}{ - (*Explain)(nil), // 0: cel.expr.Explain - (*Explain_ExprStep)(nil), // 1: cel.expr.Explain.ExprStep - (*Value)(nil), // 2: cel.expr.Value -} -var file_cel_expr_explain_proto_depIdxs = []int32{ - 2, // 0: cel.expr.Explain.values:type_name -> cel.expr.Value - 1, // 1: cel.expr.Explain.expr_steps:type_name -> cel.expr.Explain.ExprStep - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cel_expr_explain_proto_init() } -func file_cel_expr_explain_proto_init() { - if File_cel_expr_explain_proto != nil { - return - } - file_cel_expr_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_cel_expr_explain_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Explain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_explain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Explain_ExprStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cel_expr_explain_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cel_expr_explain_proto_goTypes, - DependencyIndexes: file_cel_expr_explain_proto_depIdxs, - MessageInfos: file_cel_expr_explain_proto_msgTypes, - }.Build() - File_cel_expr_explain_proto = out.File - file_cel_expr_explain_proto_rawDesc = nil - file_cel_expr_explain_proto_goTypes = nil - file_cel_expr_explain_proto_depIdxs = nil -} diff --git a/vendor/cel.dev/expr/regen_go_proto.sh b/vendor/cel.dev/expr/regen_go_proto.sh deleted file mode 100644 index abf2f9788ea..00000000000 --- a/vendor/cel.dev/expr/regen_go_proto.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -bazel build //proto/test/... -files=($(bazel aquery 'kind(proto, //proto/...)' | grep Outputs | grep "[.]pb[.]go" | sed 's/Outputs: \[//' | sed 's/\]//' | tr "," "\n")) -for src in ${files[@]}; -do - dst=$(echo $src | sed 's/\(.*\%\/github.com\/google\/cel-spec\/\(.*\)\)/\2/') - echo "copying $dst" - $(cp $src $dst) -done diff --git a/vendor/cel.dev/expr/regen_go_proto_canonical_protos.sh b/vendor/cel.dev/expr/regen_go_proto_canonical_protos.sh deleted file mode 100644 index 9a13479e401..00000000000 --- a/vendor/cel.dev/expr/regen_go_proto_canonical_protos.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -bazel build //proto/cel/expr:all - -rm -vf ./*.pb.go - -files=( $(bazel cquery //proto/cel/expr:expr_go_proto --output=starlark --starlark:expr="'\n'.join([f.path for f in target.output_groups.go_generated_srcs.to_list()])") ) -for src in "${files[@]}"; -do - cp -v "${src}" ./ -done diff --git a/vendor/cel.dev/expr/syntax.pb.go b/vendor/cel.dev/expr/syntax.pb.go deleted file mode 100644 index 48a952872e8..00000000000 --- a/vendor/cel.dev/expr/syntax.pb.go +++ /dev/null @@ -1,1633 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.5 -// source: cel/expr/syntax.proto - -package expr - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - structpb "google.golang.org/protobuf/types/known/structpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type SourceInfo_Extension_Component int32 - -const ( - SourceInfo_Extension_COMPONENT_UNSPECIFIED SourceInfo_Extension_Component = 0 - SourceInfo_Extension_COMPONENT_PARSER SourceInfo_Extension_Component = 1 - SourceInfo_Extension_COMPONENT_TYPE_CHECKER SourceInfo_Extension_Component = 2 - SourceInfo_Extension_COMPONENT_RUNTIME SourceInfo_Extension_Component = 3 -) - -// Enum value maps for SourceInfo_Extension_Component. -var ( - SourceInfo_Extension_Component_name = map[int32]string{ - 0: "COMPONENT_UNSPECIFIED", - 1: "COMPONENT_PARSER", - 2: "COMPONENT_TYPE_CHECKER", - 3: "COMPONENT_RUNTIME", - } - SourceInfo_Extension_Component_value = map[string]int32{ - "COMPONENT_UNSPECIFIED": 0, - "COMPONENT_PARSER": 1, - "COMPONENT_TYPE_CHECKER": 2, - "COMPONENT_RUNTIME": 3, - } -) - -func (x SourceInfo_Extension_Component) Enum() *SourceInfo_Extension_Component { - p := new(SourceInfo_Extension_Component) - *p = x - return p -} - -func (x SourceInfo_Extension_Component) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SourceInfo_Extension_Component) Descriptor() protoreflect.EnumDescriptor { - return file_cel_expr_syntax_proto_enumTypes[0].Descriptor() -} - -func (SourceInfo_Extension_Component) Type() protoreflect.EnumType { - return &file_cel_expr_syntax_proto_enumTypes[0] -} - -func (x SourceInfo_Extension_Component) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SourceInfo_Extension_Component.Descriptor instead. -func (SourceInfo_Extension_Component) EnumDescriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{3, 2, 0} -} - -type ParsedExpr struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Expr *Expr `protobuf:"bytes,2,opt,name=expr,proto3" json:"expr,omitempty"` - SourceInfo *SourceInfo `protobuf:"bytes,3,opt,name=source_info,json=sourceInfo,proto3" json:"source_info,omitempty"` -} - -func (x *ParsedExpr) Reset() { - *x = ParsedExpr{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParsedExpr) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParsedExpr) ProtoMessage() {} - -func (x *ParsedExpr) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ParsedExpr.ProtoReflect.Descriptor instead. -func (*ParsedExpr) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{0} -} - -func (x *ParsedExpr) GetExpr() *Expr { - if x != nil { - return x.Expr - } - return nil -} - -func (x *ParsedExpr) GetSourceInfo() *SourceInfo { - if x != nil { - return x.SourceInfo - } - return nil -} - -type Expr struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - // Types that are assignable to ExprKind: - // - // *Expr_ConstExpr - // *Expr_IdentExpr - // *Expr_SelectExpr - // *Expr_CallExpr - // *Expr_ListExpr - // *Expr_StructExpr - // *Expr_ComprehensionExpr - ExprKind isExpr_ExprKind `protobuf_oneof:"expr_kind"` -} - -func (x *Expr) Reset() { - *x = Expr{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Expr) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Expr) ProtoMessage() {} - -func (x *Expr) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Expr.ProtoReflect.Descriptor instead. -func (*Expr) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{1} -} - -func (x *Expr) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (m *Expr) GetExprKind() isExpr_ExprKind { - if m != nil { - return m.ExprKind - } - return nil -} - -func (x *Expr) GetConstExpr() *Constant { - if x, ok := x.GetExprKind().(*Expr_ConstExpr); ok { - return x.ConstExpr - } - return nil -} - -func (x *Expr) GetIdentExpr() *Expr_Ident { - if x, ok := x.GetExprKind().(*Expr_IdentExpr); ok { - return x.IdentExpr - } - return nil -} - -func (x *Expr) GetSelectExpr() *Expr_Select { - if x, ok := x.GetExprKind().(*Expr_SelectExpr); ok { - return x.SelectExpr - } - return nil -} - -func (x *Expr) GetCallExpr() *Expr_Call { - if x, ok := x.GetExprKind().(*Expr_CallExpr); ok { - return x.CallExpr - } - return nil -} - -func (x *Expr) GetListExpr() *Expr_CreateList { - if x, ok := x.GetExprKind().(*Expr_ListExpr); ok { - return x.ListExpr - } - return nil -} - -func (x *Expr) GetStructExpr() *Expr_CreateStruct { - if x, ok := x.GetExprKind().(*Expr_StructExpr); ok { - return x.StructExpr - } - return nil -} - -func (x *Expr) GetComprehensionExpr() *Expr_Comprehension { - if x, ok := x.GetExprKind().(*Expr_ComprehensionExpr); ok { - return x.ComprehensionExpr - } - return nil -} - -type isExpr_ExprKind interface { - isExpr_ExprKind() -} - -type Expr_ConstExpr struct { - ConstExpr *Constant `protobuf:"bytes,3,opt,name=const_expr,json=constExpr,proto3,oneof"` -} - -type Expr_IdentExpr struct { - IdentExpr *Expr_Ident `protobuf:"bytes,4,opt,name=ident_expr,json=identExpr,proto3,oneof"` -} - -type Expr_SelectExpr struct { - SelectExpr *Expr_Select `protobuf:"bytes,5,opt,name=select_expr,json=selectExpr,proto3,oneof"` -} - -type Expr_CallExpr struct { - CallExpr *Expr_Call `protobuf:"bytes,6,opt,name=call_expr,json=callExpr,proto3,oneof"` -} - -type Expr_ListExpr struct { - ListExpr *Expr_CreateList `protobuf:"bytes,7,opt,name=list_expr,json=listExpr,proto3,oneof"` -} - -type Expr_StructExpr struct { - StructExpr *Expr_CreateStruct `protobuf:"bytes,8,opt,name=struct_expr,json=structExpr,proto3,oneof"` -} - -type Expr_ComprehensionExpr struct { - ComprehensionExpr *Expr_Comprehension `protobuf:"bytes,9,opt,name=comprehension_expr,json=comprehensionExpr,proto3,oneof"` -} - -func (*Expr_ConstExpr) isExpr_ExprKind() {} - -func (*Expr_IdentExpr) isExpr_ExprKind() {} - -func (*Expr_SelectExpr) isExpr_ExprKind() {} - -func (*Expr_CallExpr) isExpr_ExprKind() {} - -func (*Expr_ListExpr) isExpr_ExprKind() {} - -func (*Expr_StructExpr) isExpr_ExprKind() {} - -func (*Expr_ComprehensionExpr) isExpr_ExprKind() {} - -type Constant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ConstantKind: - // - // *Constant_NullValue - // *Constant_BoolValue - // *Constant_Int64Value - // *Constant_Uint64Value - // *Constant_DoubleValue - // *Constant_StringValue - // *Constant_BytesValue - // *Constant_DurationValue - // *Constant_TimestampValue - ConstantKind isConstant_ConstantKind `protobuf_oneof:"constant_kind"` -} - -func (x *Constant) Reset() { - *x = Constant{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Constant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Constant) ProtoMessage() {} - -func (x *Constant) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Constant.ProtoReflect.Descriptor instead. -func (*Constant) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{2} -} - -func (m *Constant) GetConstantKind() isConstant_ConstantKind { - if m != nil { - return m.ConstantKind - } - return nil -} - -func (x *Constant) GetNullValue() structpb.NullValue { - if x, ok := x.GetConstantKind().(*Constant_NullValue); ok { - return x.NullValue - } - return structpb.NullValue(0) -} - -func (x *Constant) GetBoolValue() bool { - if x, ok := x.GetConstantKind().(*Constant_BoolValue); ok { - return x.BoolValue - } - return false -} - -func (x *Constant) GetInt64Value() int64 { - if x, ok := x.GetConstantKind().(*Constant_Int64Value); ok { - return x.Int64Value - } - return 0 -} - -func (x *Constant) GetUint64Value() uint64 { - if x, ok := x.GetConstantKind().(*Constant_Uint64Value); ok { - return x.Uint64Value - } - return 0 -} - -func (x *Constant) GetDoubleValue() float64 { - if x, ok := x.GetConstantKind().(*Constant_DoubleValue); ok { - return x.DoubleValue - } - return 0 -} - -func (x *Constant) GetStringValue() string { - if x, ok := x.GetConstantKind().(*Constant_StringValue); ok { - return x.StringValue - } - return "" -} - -func (x *Constant) GetBytesValue() []byte { - if x, ok := x.GetConstantKind().(*Constant_BytesValue); ok { - return x.BytesValue - } - return nil -} - -// Deprecated: Do not use. -func (x *Constant) GetDurationValue() *durationpb.Duration { - if x, ok := x.GetConstantKind().(*Constant_DurationValue); ok { - return x.DurationValue - } - return nil -} - -// Deprecated: Do not use. -func (x *Constant) GetTimestampValue() *timestamppb.Timestamp { - if x, ok := x.GetConstantKind().(*Constant_TimestampValue); ok { - return x.TimestampValue - } - return nil -} - -type isConstant_ConstantKind interface { - isConstant_ConstantKind() -} - -type Constant_NullValue struct { - NullValue structpb.NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"` -} - -type Constant_BoolValue struct { - BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"` -} - -type Constant_Int64Value struct { - Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3,oneof"` -} - -type Constant_Uint64Value struct { - Uint64Value uint64 `protobuf:"varint,4,opt,name=uint64_value,json=uint64Value,proto3,oneof"` -} - -type Constant_DoubleValue struct { - DoubleValue float64 `protobuf:"fixed64,5,opt,name=double_value,json=doubleValue,proto3,oneof"` -} - -type Constant_StringValue struct { - StringValue string `protobuf:"bytes,6,opt,name=string_value,json=stringValue,proto3,oneof"` -} - -type Constant_BytesValue struct { - BytesValue []byte `protobuf:"bytes,7,opt,name=bytes_value,json=bytesValue,proto3,oneof"` -} - -type Constant_DurationValue struct { - // Deprecated: Do not use. - DurationValue *durationpb.Duration `protobuf:"bytes,8,opt,name=duration_value,json=durationValue,proto3,oneof"` -} - -type Constant_TimestampValue struct { - // Deprecated: Do not use. - TimestampValue *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=timestamp_value,json=timestampValue,proto3,oneof"` -} - -func (*Constant_NullValue) isConstant_ConstantKind() {} - -func (*Constant_BoolValue) isConstant_ConstantKind() {} - -func (*Constant_Int64Value) isConstant_ConstantKind() {} - -func (*Constant_Uint64Value) isConstant_ConstantKind() {} - -func (*Constant_DoubleValue) isConstant_ConstantKind() {} - -func (*Constant_StringValue) isConstant_ConstantKind() {} - -func (*Constant_BytesValue) isConstant_ConstantKind() {} - -func (*Constant_DurationValue) isConstant_ConstantKind() {} - -func (*Constant_TimestampValue) isConstant_ConstantKind() {} - -type SourceInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SyntaxVersion string `protobuf:"bytes,1,opt,name=syntax_version,json=syntaxVersion,proto3" json:"syntax_version,omitempty"` - Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` - LineOffsets []int32 `protobuf:"varint,3,rep,packed,name=line_offsets,json=lineOffsets,proto3" json:"line_offsets,omitempty"` - Positions map[int64]int32 `protobuf:"bytes,4,rep,name=positions,proto3" json:"positions,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MacroCalls map[int64]*Expr `protobuf:"bytes,5,rep,name=macro_calls,json=macroCalls,proto3" json:"macro_calls,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Extensions []*SourceInfo_Extension `protobuf:"bytes,6,rep,name=extensions,proto3" json:"extensions,omitempty"` -} - -func (x *SourceInfo) Reset() { - *x = SourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SourceInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SourceInfo) ProtoMessage() {} - -func (x *SourceInfo) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SourceInfo.ProtoReflect.Descriptor instead. -func (*SourceInfo) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{3} -} - -func (x *SourceInfo) GetSyntaxVersion() string { - if x != nil { - return x.SyntaxVersion - } - return "" -} - -func (x *SourceInfo) GetLocation() string { - if x != nil { - return x.Location - } - return "" -} - -func (x *SourceInfo) GetLineOffsets() []int32 { - if x != nil { - return x.LineOffsets - } - return nil -} - -func (x *SourceInfo) GetPositions() map[int64]int32 { - if x != nil { - return x.Positions - } - return nil -} - -func (x *SourceInfo) GetMacroCalls() map[int64]*Expr { - if x != nil { - return x.MacroCalls - } - return nil -} - -func (x *SourceInfo) GetExtensions() []*SourceInfo_Extension { - if x != nil { - return x.Extensions - } - return nil -} - -type Expr_Ident struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Expr_Ident) Reset() { - *x = Expr_Ident{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Expr_Ident) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Expr_Ident) ProtoMessage() {} - -func (x *Expr_Ident) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Expr_Ident.ProtoReflect.Descriptor instead. -func (*Expr_Ident) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *Expr_Ident) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type Expr_Select struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Operand *Expr `protobuf:"bytes,1,opt,name=operand,proto3" json:"operand,omitempty"` - Field string `protobuf:"bytes,2,opt,name=field,proto3" json:"field,omitempty"` - TestOnly bool `protobuf:"varint,3,opt,name=test_only,json=testOnly,proto3" json:"test_only,omitempty"` -} - -func (x *Expr_Select) Reset() { - *x = Expr_Select{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Expr_Select) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Expr_Select) ProtoMessage() {} - -func (x *Expr_Select) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Expr_Select.ProtoReflect.Descriptor instead. -func (*Expr_Select) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{1, 1} -} - -func (x *Expr_Select) GetOperand() *Expr { - if x != nil { - return x.Operand - } - return nil -} - -func (x *Expr_Select) GetField() string { - if x != nil { - return x.Field - } - return "" -} - -func (x *Expr_Select) GetTestOnly() bool { - if x != nil { - return x.TestOnly - } - return false -} - -type Expr_Call struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Target *Expr `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` - Function string `protobuf:"bytes,2,opt,name=function,proto3" json:"function,omitempty"` - Args []*Expr `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` -} - -func (x *Expr_Call) Reset() { - *x = Expr_Call{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Expr_Call) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Expr_Call) ProtoMessage() {} - -func (x *Expr_Call) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Expr_Call.ProtoReflect.Descriptor instead. -func (*Expr_Call) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{1, 2} -} - -func (x *Expr_Call) GetTarget() *Expr { - if x != nil { - return x.Target - } - return nil -} - -func (x *Expr_Call) GetFunction() string { - if x != nil { - return x.Function - } - return "" -} - -func (x *Expr_Call) GetArgs() []*Expr { - if x != nil { - return x.Args - } - return nil -} - -type Expr_CreateList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Elements []*Expr `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"` - OptionalIndices []int32 `protobuf:"varint,2,rep,packed,name=optional_indices,json=optionalIndices,proto3" json:"optional_indices,omitempty"` -} - -func (x *Expr_CreateList) Reset() { - *x = Expr_CreateList{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Expr_CreateList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Expr_CreateList) ProtoMessage() {} - -func (x *Expr_CreateList) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Expr_CreateList.ProtoReflect.Descriptor instead. -func (*Expr_CreateList) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{1, 3} -} - -func (x *Expr_CreateList) GetElements() []*Expr { - if x != nil { - return x.Elements - } - return nil -} - -func (x *Expr_CreateList) GetOptionalIndices() []int32 { - if x != nil { - return x.OptionalIndices - } - return nil -} - -type Expr_CreateStruct struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MessageName string `protobuf:"bytes,1,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"` - Entries []*Expr_CreateStruct_Entry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"` -} - -func (x *Expr_CreateStruct) Reset() { - *x = Expr_CreateStruct{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Expr_CreateStruct) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Expr_CreateStruct) ProtoMessage() {} - -func (x *Expr_CreateStruct) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Expr_CreateStruct.ProtoReflect.Descriptor instead. -func (*Expr_CreateStruct) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{1, 4} -} - -func (x *Expr_CreateStruct) GetMessageName() string { - if x != nil { - return x.MessageName - } - return "" -} - -func (x *Expr_CreateStruct) GetEntries() []*Expr_CreateStruct_Entry { - if x != nil { - return x.Entries - } - return nil -} - -type Expr_Comprehension struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IterVar string `protobuf:"bytes,1,opt,name=iter_var,json=iterVar,proto3" json:"iter_var,omitempty"` - IterRange *Expr `protobuf:"bytes,2,opt,name=iter_range,json=iterRange,proto3" json:"iter_range,omitempty"` - AccuVar string `protobuf:"bytes,3,opt,name=accu_var,json=accuVar,proto3" json:"accu_var,omitempty"` - AccuInit *Expr `protobuf:"bytes,4,opt,name=accu_init,json=accuInit,proto3" json:"accu_init,omitempty"` - LoopCondition *Expr `protobuf:"bytes,5,opt,name=loop_condition,json=loopCondition,proto3" json:"loop_condition,omitempty"` - LoopStep *Expr `protobuf:"bytes,6,opt,name=loop_step,json=loopStep,proto3" json:"loop_step,omitempty"` - Result *Expr `protobuf:"bytes,7,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *Expr_Comprehension) Reset() { - *x = Expr_Comprehension{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Expr_Comprehension) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Expr_Comprehension) ProtoMessage() {} - -func (x *Expr_Comprehension) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Expr_Comprehension.ProtoReflect.Descriptor instead. -func (*Expr_Comprehension) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{1, 5} -} - -func (x *Expr_Comprehension) GetIterVar() string { - if x != nil { - return x.IterVar - } - return "" -} - -func (x *Expr_Comprehension) GetIterRange() *Expr { - if x != nil { - return x.IterRange - } - return nil -} - -func (x *Expr_Comprehension) GetAccuVar() string { - if x != nil { - return x.AccuVar - } - return "" -} - -func (x *Expr_Comprehension) GetAccuInit() *Expr { - if x != nil { - return x.AccuInit - } - return nil -} - -func (x *Expr_Comprehension) GetLoopCondition() *Expr { - if x != nil { - return x.LoopCondition - } - return nil -} - -func (x *Expr_Comprehension) GetLoopStep() *Expr { - if x != nil { - return x.LoopStep - } - return nil -} - -func (x *Expr_Comprehension) GetResult() *Expr { - if x != nil { - return x.Result - } - return nil -} - -type Expr_CreateStruct_Entry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // Types that are assignable to KeyKind: - // - // *Expr_CreateStruct_Entry_FieldKey - // *Expr_CreateStruct_Entry_MapKey - KeyKind isExpr_CreateStruct_Entry_KeyKind `protobuf_oneof:"key_kind"` - Value *Expr `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` - OptionalEntry bool `protobuf:"varint,5,opt,name=optional_entry,json=optionalEntry,proto3" json:"optional_entry,omitempty"` -} - -func (x *Expr_CreateStruct_Entry) Reset() { - *x = Expr_CreateStruct_Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Expr_CreateStruct_Entry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Expr_CreateStruct_Entry) ProtoMessage() {} - -func (x *Expr_CreateStruct_Entry) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Expr_CreateStruct_Entry.ProtoReflect.Descriptor instead. -func (*Expr_CreateStruct_Entry) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{1, 4, 0} -} - -func (x *Expr_CreateStruct_Entry) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (m *Expr_CreateStruct_Entry) GetKeyKind() isExpr_CreateStruct_Entry_KeyKind { - if m != nil { - return m.KeyKind - } - return nil -} - -func (x *Expr_CreateStruct_Entry) GetFieldKey() string { - if x, ok := x.GetKeyKind().(*Expr_CreateStruct_Entry_FieldKey); ok { - return x.FieldKey - } - return "" -} - -func (x *Expr_CreateStruct_Entry) GetMapKey() *Expr { - if x, ok := x.GetKeyKind().(*Expr_CreateStruct_Entry_MapKey); ok { - return x.MapKey - } - return nil -} - -func (x *Expr_CreateStruct_Entry) GetValue() *Expr { - if x != nil { - return x.Value - } - return nil -} - -func (x *Expr_CreateStruct_Entry) GetOptionalEntry() bool { - if x != nil { - return x.OptionalEntry - } - return false -} - -type isExpr_CreateStruct_Entry_KeyKind interface { - isExpr_CreateStruct_Entry_KeyKind() -} - -type Expr_CreateStruct_Entry_FieldKey struct { - FieldKey string `protobuf:"bytes,2,opt,name=field_key,json=fieldKey,proto3,oneof"` -} - -type Expr_CreateStruct_Entry_MapKey struct { - MapKey *Expr `protobuf:"bytes,3,opt,name=map_key,json=mapKey,proto3,oneof"` -} - -func (*Expr_CreateStruct_Entry_FieldKey) isExpr_CreateStruct_Entry_KeyKind() {} - -func (*Expr_CreateStruct_Entry_MapKey) isExpr_CreateStruct_Entry_KeyKind() {} - -type SourceInfo_Extension struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - AffectedComponents []SourceInfo_Extension_Component `protobuf:"varint,2,rep,packed,name=affected_components,json=affectedComponents,proto3,enum=cel.expr.SourceInfo_Extension_Component" json:"affected_components,omitempty"` - Version *SourceInfo_Extension_Version `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *SourceInfo_Extension) Reset() { - *x = SourceInfo_Extension{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SourceInfo_Extension) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SourceInfo_Extension) ProtoMessage() {} - -func (x *SourceInfo_Extension) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SourceInfo_Extension.ProtoReflect.Descriptor instead. -func (*SourceInfo_Extension) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{3, 2} -} - -func (x *SourceInfo_Extension) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *SourceInfo_Extension) GetAffectedComponents() []SourceInfo_Extension_Component { - if x != nil { - return x.AffectedComponents - } - return nil -} - -func (x *SourceInfo_Extension) GetVersion() *SourceInfo_Extension_Version { - if x != nil { - return x.Version - } - return nil -} - -type SourceInfo_Extension_Version struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Major int64 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"` - Minor int64 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"` -} - -func (x *SourceInfo_Extension_Version) Reset() { - *x = SourceInfo_Extension_Version{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_syntax_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SourceInfo_Extension_Version) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SourceInfo_Extension_Version) ProtoMessage() {} - -func (x *SourceInfo_Extension_Version) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_syntax_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SourceInfo_Extension_Version.ProtoReflect.Descriptor instead. -func (*SourceInfo_Extension_Version) Descriptor() ([]byte, []int) { - return file_cel_expr_syntax_proto_rawDescGZIP(), []int{3, 2, 0} -} - -func (x *SourceInfo_Extension_Version) GetMajor() int64 { - if x != nil { - return x.Major - } - return 0 -} - -func (x *SourceInfo_Extension_Version) GetMinor() int64 { - if x != nil { - return x.Minor - } - return 0 -} - -var File_cel_expr_syntax_proto protoreflect.FileDescriptor - -var file_cel_expr_syntax_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, - 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, - 0x72, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x67, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x22, - 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, - 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x04, 0x65, 0x78, - 0x70, 0x72, 0x12, 0x35, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, - 0x70, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xfd, 0x0a, 0x0a, 0x04, 0x45, 0x78, - 0x70, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x33, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, - 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x09, 0x63, 0x6f, - 0x6e, 0x73, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x35, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x65, - 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x2e, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x09, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x38, - 0x0a, 0x0b, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, - 0x78, 0x70, 0x72, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x32, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, - 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x65, - 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x2e, 0x43, 0x61, 0x6c, 0x6c, - 0x48, 0x00, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x12, 0x38, 0x0a, 0x09, - 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x69, - 0x73, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x3e, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x65, - 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x45, 0x78, 0x70, 0x72, 0x12, 0x4d, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, - 0x68, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, - 0x70, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x45, 0x78, 0x70, 0x72, 0x1a, 0x1b, 0x0a, 0x05, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x1a, 0x65, 0x0a, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x28, 0x0a, 0x07, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x07, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x1a, 0x6e, 0x0a, 0x04, 0x43, 0x61, 0x6c, - 0x6c, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, - 0x72, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, - 0x78, 0x70, 0x72, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x1a, 0x63, 0x0a, 0x0a, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, - 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, - 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x1a, 0xab, - 0x02, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, - 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, - 0x78, 0x70, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, - 0xba, 0x01, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x09, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, - 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x61, 0x70, - 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, - 0x70, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x42, 0x0a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x1a, 0xad, 0x02, 0x0a, - 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, - 0x0a, 0x08, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x69, 0x74, 0x65, 0x72, 0x56, 0x61, 0x72, 0x12, 0x2d, 0x0a, 0x0a, 0x69, 0x74, 0x65, - 0x72, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x09, 0x69, - 0x74, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x75, - 0x5f, 0x76, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x75, - 0x56, 0x61, 0x72, 0x12, 0x2b, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x75, 0x5f, 0x69, 0x6e, 0x69, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, - 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x08, 0x61, 0x63, 0x63, 0x75, 0x49, 0x6e, 0x69, 0x74, - 0x12, 0x35, 0x0a, 0x0e, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, - 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0d, 0x6c, 0x6f, 0x6f, 0x70, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x09, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x08, 0x6c, 0x6f, 0x6f, 0x70, - 0x53, 0x74, 0x65, 0x70, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, - 0x45, 0x78, 0x70, 0x72, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0b, 0x0a, 0x09, - 0x65, 0x78, 0x70, 0x72, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xc1, 0x03, 0x0a, 0x08, 0x43, 0x6f, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4e, 0x75, 0x6c, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x74, - 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, - 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, - 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x46, 0x0a, 0x0e, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x18, 0x01, - 0x48, 0x00, 0x52, 0x0d, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x49, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0x0a, 0x0d, - 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xac, 0x06, - 0x0a, 0x0a, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0e, - 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x21, 0x0a, 0x0c, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, - 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x5f, 0x63, - 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x65, 0x6c, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x2e, 0x4d, 0x61, 0x63, 0x72, 0x6f, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0a, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x3e, 0x0a, 0x0a, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4d, 0x0a, 0x0f, 0x4d, 0x61, - 0x63, 0x72, 0x6f, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xe0, 0x02, 0x0a, 0x09, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x59, 0x0a, 0x13, 0x61, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x12, - 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x35, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x22, 0x6f, 0x0a, 0x09, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4d, 0x50, - 0x4f, 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x4e, 0x45, 0x4e, 0x54, - 0x5f, 0x50, 0x41, 0x52, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4d, - 0x50, 0x4f, 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, - 0x4b, 0x45, 0x52, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x4e, 0x45, - 0x4e, 0x54, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x42, 0x2e, 0x0a, 0x0c, - 0x64, 0x65, 0x76, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x42, 0x0b, 0x53, 0x79, - 0x6e, 0x74, 0x61, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0c, 0x63, 0x65, 0x6c, - 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, 0x70, 0x72, 0xf8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cel_expr_syntax_proto_rawDescOnce sync.Once - file_cel_expr_syntax_proto_rawDescData = file_cel_expr_syntax_proto_rawDesc -) - -func file_cel_expr_syntax_proto_rawDescGZIP() []byte { - file_cel_expr_syntax_proto_rawDescOnce.Do(func() { - file_cel_expr_syntax_proto_rawDescData = protoimpl.X.CompressGZIP(file_cel_expr_syntax_proto_rawDescData) - }) - return file_cel_expr_syntax_proto_rawDescData -} - -var file_cel_expr_syntax_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cel_expr_syntax_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_cel_expr_syntax_proto_goTypes = []interface{}{ - (SourceInfo_Extension_Component)(0), // 0: cel.expr.SourceInfo.Extension.Component - (*ParsedExpr)(nil), // 1: cel.expr.ParsedExpr - (*Expr)(nil), // 2: cel.expr.Expr - (*Constant)(nil), // 3: cel.expr.Constant - (*SourceInfo)(nil), // 4: cel.expr.SourceInfo - (*Expr_Ident)(nil), // 5: cel.expr.Expr.Ident - (*Expr_Select)(nil), // 6: cel.expr.Expr.Select - (*Expr_Call)(nil), // 7: cel.expr.Expr.Call - (*Expr_CreateList)(nil), // 8: cel.expr.Expr.CreateList - (*Expr_CreateStruct)(nil), // 9: cel.expr.Expr.CreateStruct - (*Expr_Comprehension)(nil), // 10: cel.expr.Expr.Comprehension - (*Expr_CreateStruct_Entry)(nil), // 11: cel.expr.Expr.CreateStruct.Entry - nil, // 12: cel.expr.SourceInfo.PositionsEntry - nil, // 13: cel.expr.SourceInfo.MacroCallsEntry - (*SourceInfo_Extension)(nil), // 14: cel.expr.SourceInfo.Extension - (*SourceInfo_Extension_Version)(nil), // 15: cel.expr.SourceInfo.Extension.Version - (structpb.NullValue)(0), // 16: google.protobuf.NullValue - (*durationpb.Duration)(nil), // 17: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp -} -var file_cel_expr_syntax_proto_depIdxs = []int32{ - 2, // 0: cel.expr.ParsedExpr.expr:type_name -> cel.expr.Expr - 4, // 1: cel.expr.ParsedExpr.source_info:type_name -> cel.expr.SourceInfo - 3, // 2: cel.expr.Expr.const_expr:type_name -> cel.expr.Constant - 5, // 3: cel.expr.Expr.ident_expr:type_name -> cel.expr.Expr.Ident - 6, // 4: cel.expr.Expr.select_expr:type_name -> cel.expr.Expr.Select - 7, // 5: cel.expr.Expr.call_expr:type_name -> cel.expr.Expr.Call - 8, // 6: cel.expr.Expr.list_expr:type_name -> cel.expr.Expr.CreateList - 9, // 7: cel.expr.Expr.struct_expr:type_name -> cel.expr.Expr.CreateStruct - 10, // 8: cel.expr.Expr.comprehension_expr:type_name -> cel.expr.Expr.Comprehension - 16, // 9: cel.expr.Constant.null_value:type_name -> google.protobuf.NullValue - 17, // 10: cel.expr.Constant.duration_value:type_name -> google.protobuf.Duration - 18, // 11: cel.expr.Constant.timestamp_value:type_name -> google.protobuf.Timestamp - 12, // 12: cel.expr.SourceInfo.positions:type_name -> cel.expr.SourceInfo.PositionsEntry - 13, // 13: cel.expr.SourceInfo.macro_calls:type_name -> cel.expr.SourceInfo.MacroCallsEntry - 14, // 14: cel.expr.SourceInfo.extensions:type_name -> cel.expr.SourceInfo.Extension - 2, // 15: cel.expr.Expr.Select.operand:type_name -> cel.expr.Expr - 2, // 16: cel.expr.Expr.Call.target:type_name -> cel.expr.Expr - 2, // 17: cel.expr.Expr.Call.args:type_name -> cel.expr.Expr - 2, // 18: cel.expr.Expr.CreateList.elements:type_name -> cel.expr.Expr - 11, // 19: cel.expr.Expr.CreateStruct.entries:type_name -> cel.expr.Expr.CreateStruct.Entry - 2, // 20: cel.expr.Expr.Comprehension.iter_range:type_name -> cel.expr.Expr - 2, // 21: cel.expr.Expr.Comprehension.accu_init:type_name -> cel.expr.Expr - 2, // 22: cel.expr.Expr.Comprehension.loop_condition:type_name -> cel.expr.Expr - 2, // 23: cel.expr.Expr.Comprehension.loop_step:type_name -> cel.expr.Expr - 2, // 24: cel.expr.Expr.Comprehension.result:type_name -> cel.expr.Expr - 2, // 25: cel.expr.Expr.CreateStruct.Entry.map_key:type_name -> cel.expr.Expr - 2, // 26: cel.expr.Expr.CreateStruct.Entry.value:type_name -> cel.expr.Expr - 2, // 27: cel.expr.SourceInfo.MacroCallsEntry.value:type_name -> cel.expr.Expr - 0, // 28: cel.expr.SourceInfo.Extension.affected_components:type_name -> cel.expr.SourceInfo.Extension.Component - 15, // 29: cel.expr.SourceInfo.Extension.version:type_name -> cel.expr.SourceInfo.Extension.Version - 30, // [30:30] is the sub-list for method output_type - 30, // [30:30] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name -} - -func init() { file_cel_expr_syntax_proto_init() } -func file_cel_expr_syntax_proto_init() { - if File_cel_expr_syntax_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cel_expr_syntax_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParsedExpr); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Expr); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Constant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Expr_Ident); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Expr_Select); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Expr_Call); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Expr_CreateList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Expr_CreateStruct); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Expr_Comprehension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Expr_CreateStruct_Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SourceInfo_Extension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_syntax_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SourceInfo_Extension_Version); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cel_expr_syntax_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Expr_ConstExpr)(nil), - (*Expr_IdentExpr)(nil), - (*Expr_SelectExpr)(nil), - (*Expr_CallExpr)(nil), - (*Expr_ListExpr)(nil), - (*Expr_StructExpr)(nil), - (*Expr_ComprehensionExpr)(nil), - } - file_cel_expr_syntax_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Constant_NullValue)(nil), - (*Constant_BoolValue)(nil), - (*Constant_Int64Value)(nil), - (*Constant_Uint64Value)(nil), - (*Constant_DoubleValue)(nil), - (*Constant_StringValue)(nil), - (*Constant_BytesValue)(nil), - (*Constant_DurationValue)(nil), - (*Constant_TimestampValue)(nil), - } - file_cel_expr_syntax_proto_msgTypes[10].OneofWrappers = []interface{}{ - (*Expr_CreateStruct_Entry_FieldKey)(nil), - (*Expr_CreateStruct_Entry_MapKey)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cel_expr_syntax_proto_rawDesc, - NumEnums: 1, - NumMessages: 15, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cel_expr_syntax_proto_goTypes, - DependencyIndexes: file_cel_expr_syntax_proto_depIdxs, - EnumInfos: file_cel_expr_syntax_proto_enumTypes, - MessageInfos: file_cel_expr_syntax_proto_msgTypes, - }.Build() - File_cel_expr_syntax_proto = out.File - file_cel_expr_syntax_proto_rawDesc = nil - file_cel_expr_syntax_proto_goTypes = nil - file_cel_expr_syntax_proto_depIdxs = nil -} diff --git a/vendor/cel.dev/expr/value.pb.go b/vendor/cel.dev/expr/value.pb.go deleted file mode 100644 index e5e29228c2c..00000000000 --- a/vendor/cel.dev/expr/value.pb.go +++ /dev/null @@ -1,653 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.5 -// source: cel/expr/value.proto - -package expr - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Kind: - // - // *Value_NullValue - // *Value_BoolValue - // *Value_Int64Value - // *Value_Uint64Value - // *Value_DoubleValue - // *Value_StringValue - // *Value_BytesValue - // *Value_EnumValue - // *Value_ObjectValue - // *Value_MapValue - // *Value_ListValue - // *Value_TypeValue - Kind isValue_Kind `protobuf_oneof:"kind"` -} - -func (x *Value) Reset() { - *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_value_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Value) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Value) ProtoMessage() {} - -func (x *Value) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_value_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Value.ProtoReflect.Descriptor instead. -func (*Value) Descriptor() ([]byte, []int) { - return file_cel_expr_value_proto_rawDescGZIP(), []int{0} -} - -func (m *Value) GetKind() isValue_Kind { - if m != nil { - return m.Kind - } - return nil -} - -func (x *Value) GetNullValue() structpb.NullValue { - if x, ok := x.GetKind().(*Value_NullValue); ok { - return x.NullValue - } - return structpb.NullValue(0) -} - -func (x *Value) GetBoolValue() bool { - if x, ok := x.GetKind().(*Value_BoolValue); ok { - return x.BoolValue - } - return false -} - -func (x *Value) GetInt64Value() int64 { - if x, ok := x.GetKind().(*Value_Int64Value); ok { - return x.Int64Value - } - return 0 -} - -func (x *Value) GetUint64Value() uint64 { - if x, ok := x.GetKind().(*Value_Uint64Value); ok { - return x.Uint64Value - } - return 0 -} - -func (x *Value) GetDoubleValue() float64 { - if x, ok := x.GetKind().(*Value_DoubleValue); ok { - return x.DoubleValue - } - return 0 -} - -func (x *Value) GetStringValue() string { - if x, ok := x.GetKind().(*Value_StringValue); ok { - return x.StringValue - } - return "" -} - -func (x *Value) GetBytesValue() []byte { - if x, ok := x.GetKind().(*Value_BytesValue); ok { - return x.BytesValue - } - return nil -} - -func (x *Value) GetEnumValue() *EnumValue { - if x, ok := x.GetKind().(*Value_EnumValue); ok { - return x.EnumValue - } - return nil -} - -func (x *Value) GetObjectValue() *anypb.Any { - if x, ok := x.GetKind().(*Value_ObjectValue); ok { - return x.ObjectValue - } - return nil -} - -func (x *Value) GetMapValue() *MapValue { - if x, ok := x.GetKind().(*Value_MapValue); ok { - return x.MapValue - } - return nil -} - -func (x *Value) GetListValue() *ListValue { - if x, ok := x.GetKind().(*Value_ListValue); ok { - return x.ListValue - } - return nil -} - -func (x *Value) GetTypeValue() string { - if x, ok := x.GetKind().(*Value_TypeValue); ok { - return x.TypeValue - } - return "" -} - -type isValue_Kind interface { - isValue_Kind() -} - -type Value_NullValue struct { - NullValue structpb.NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"` -} - -type Value_BoolValue struct { - BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"` -} - -type Value_Int64Value struct { - Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3,oneof"` -} - -type Value_Uint64Value struct { - Uint64Value uint64 `protobuf:"varint,4,opt,name=uint64_value,json=uint64Value,proto3,oneof"` -} - -type Value_DoubleValue struct { - DoubleValue float64 `protobuf:"fixed64,5,opt,name=double_value,json=doubleValue,proto3,oneof"` -} - -type Value_StringValue struct { - StringValue string `protobuf:"bytes,6,opt,name=string_value,json=stringValue,proto3,oneof"` -} - -type Value_BytesValue struct { - BytesValue []byte `protobuf:"bytes,7,opt,name=bytes_value,json=bytesValue,proto3,oneof"` -} - -type Value_EnumValue struct { - EnumValue *EnumValue `protobuf:"bytes,9,opt,name=enum_value,json=enumValue,proto3,oneof"` -} - -type Value_ObjectValue struct { - ObjectValue *anypb.Any `protobuf:"bytes,10,opt,name=object_value,json=objectValue,proto3,oneof"` -} - -type Value_MapValue struct { - MapValue *MapValue `protobuf:"bytes,11,opt,name=map_value,json=mapValue,proto3,oneof"` -} - -type Value_ListValue struct { - ListValue *ListValue `protobuf:"bytes,12,opt,name=list_value,json=listValue,proto3,oneof"` -} - -type Value_TypeValue struct { - TypeValue string `protobuf:"bytes,15,opt,name=type_value,json=typeValue,proto3,oneof"` -} - -func (*Value_NullValue) isValue_Kind() {} - -func (*Value_BoolValue) isValue_Kind() {} - -func (*Value_Int64Value) isValue_Kind() {} - -func (*Value_Uint64Value) isValue_Kind() {} - -func (*Value_DoubleValue) isValue_Kind() {} - -func (*Value_StringValue) isValue_Kind() {} - -func (*Value_BytesValue) isValue_Kind() {} - -func (*Value_EnumValue) isValue_Kind() {} - -func (*Value_ObjectValue) isValue_Kind() {} - -func (*Value_MapValue) isValue_Kind() {} - -func (*Value_ListValue) isValue_Kind() {} - -func (*Value_TypeValue) isValue_Kind() {} - -type EnumValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *EnumValue) Reset() { - *x = EnumValue{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_value_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnumValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnumValue) ProtoMessage() {} - -func (x *EnumValue) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_value_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnumValue.ProtoReflect.Descriptor instead. -func (*EnumValue) Descriptor() ([]byte, []int) { - return file_cel_expr_value_proto_rawDescGZIP(), []int{1} -} - -func (x *EnumValue) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *EnumValue) GetValue() int32 { - if x != nil { - return x.Value - } - return 0 -} - -type ListValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` -} - -func (x *ListValue) Reset() { - *x = ListValue{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_value_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListValue) ProtoMessage() {} - -func (x *ListValue) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_value_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListValue.ProtoReflect.Descriptor instead. -func (*ListValue) Descriptor() ([]byte, []int) { - return file_cel_expr_value_proto_rawDescGZIP(), []int{2} -} - -func (x *ListValue) GetValues() []*Value { - if x != nil { - return x.Values - } - return nil -} - -type MapValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Entries []*MapValue_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` -} - -func (x *MapValue) Reset() { - *x = MapValue{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_value_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MapValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MapValue) ProtoMessage() {} - -func (x *MapValue) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_value_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MapValue.ProtoReflect.Descriptor instead. -func (*MapValue) Descriptor() ([]byte, []int) { - return file_cel_expr_value_proto_rawDescGZIP(), []int{3} -} - -func (x *MapValue) GetEntries() []*MapValue_Entry { - if x != nil { - return x.Entries - } - return nil -} - -type MapValue_Entry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key *Value `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value *Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *MapValue_Entry) Reset() { - *x = MapValue_Entry{} - if protoimpl.UnsafeEnabled { - mi := &file_cel_expr_value_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MapValue_Entry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MapValue_Entry) ProtoMessage() {} - -func (x *MapValue_Entry) ProtoReflect() protoreflect.Message { - mi := &file_cel_expr_value_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MapValue_Entry.ProtoReflect.Descriptor instead. -func (*MapValue_Entry) Descriptor() ([]byte, []int) { - return file_cel_expr_value_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *MapValue_Entry) GetKey() *Value { - if x != nil { - return x.Key - } - return nil -} - -func (x *MapValue_Entry) GetValue() *Value { - if x != nil { - return x.Value - } - return nil -} - -var File_cel_expr_value_proto protoreflect.FileDescriptor - -var file_cel_expr_value_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x04, 0x0a, 0x05, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, - 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x48, - 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, - 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x65, 0x6c, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, - 0x00, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x0c, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x65, 0x6c, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, - 0x52, 0x08, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x6c, 0x69, - 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x1f, 0x0a, 0x0a, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x74, 0x79, 0x70, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x35, 0x0a, 0x09, 0x45, 0x6e, 0x75, - 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x34, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, - 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, - 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x51, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x21, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x2d, 0x0a, 0x0c, 0x64, 0x65, - 0x76, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x42, 0x0a, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0c, 0x63, 0x65, 0x6c, 0x2e, 0x64, 0x65, - 0x76, 0x2f, 0x65, 0x78, 0x70, 0x72, 0xf8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_cel_expr_value_proto_rawDescOnce sync.Once - file_cel_expr_value_proto_rawDescData = file_cel_expr_value_proto_rawDesc -) - -func file_cel_expr_value_proto_rawDescGZIP() []byte { - file_cel_expr_value_proto_rawDescOnce.Do(func() { - file_cel_expr_value_proto_rawDescData = protoimpl.X.CompressGZIP(file_cel_expr_value_proto_rawDescData) - }) - return file_cel_expr_value_proto_rawDescData -} - -var file_cel_expr_value_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_cel_expr_value_proto_goTypes = []interface{}{ - (*Value)(nil), // 0: cel.expr.Value - (*EnumValue)(nil), // 1: cel.expr.EnumValue - (*ListValue)(nil), // 2: cel.expr.ListValue - (*MapValue)(nil), // 3: cel.expr.MapValue - (*MapValue_Entry)(nil), // 4: cel.expr.MapValue.Entry - (structpb.NullValue)(0), // 5: google.protobuf.NullValue - (*anypb.Any)(nil), // 6: google.protobuf.Any -} -var file_cel_expr_value_proto_depIdxs = []int32{ - 5, // 0: cel.expr.Value.null_value:type_name -> google.protobuf.NullValue - 1, // 1: cel.expr.Value.enum_value:type_name -> cel.expr.EnumValue - 6, // 2: cel.expr.Value.object_value:type_name -> google.protobuf.Any - 3, // 3: cel.expr.Value.map_value:type_name -> cel.expr.MapValue - 2, // 4: cel.expr.Value.list_value:type_name -> cel.expr.ListValue - 0, // 5: cel.expr.ListValue.values:type_name -> cel.expr.Value - 4, // 6: cel.expr.MapValue.entries:type_name -> cel.expr.MapValue.Entry - 0, // 7: cel.expr.MapValue.Entry.key:type_name -> cel.expr.Value - 0, // 8: cel.expr.MapValue.Entry.value:type_name -> cel.expr.Value - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_cel_expr_value_proto_init() } -func file_cel_expr_value_proto_init() { - if File_cel_expr_value_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cel_expr_value_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_value_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnumValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_value_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_value_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MapValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cel_expr_value_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MapValue_Entry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cel_expr_value_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Value_NullValue)(nil), - (*Value_BoolValue)(nil), - (*Value_Int64Value)(nil), - (*Value_Uint64Value)(nil), - (*Value_DoubleValue)(nil), - (*Value_StringValue)(nil), - (*Value_BytesValue)(nil), - (*Value_EnumValue)(nil), - (*Value_ObjectValue)(nil), - (*Value_MapValue)(nil), - (*Value_ListValue)(nil), - (*Value_TypeValue)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cel_expr_value_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cel_expr_value_proto_goTypes, - DependencyIndexes: file_cel_expr_value_proto_depIdxs, - MessageInfos: file_cel_expr_value_proto_msgTypes, - }.Build() - File_cel_expr_value_proto = out.File - file_cel_expr_value_proto_rawDesc = nil - file_cel_expr_value_proto_goTypes = nil - file_cel_expr_value_proto_depIdxs = nil -} diff --git a/vendor/github.com/Azure/go-ansiterm/SECURITY.md b/vendor/github.com/Azure/go-ansiterm/SECURITY.md new file mode 100644 index 00000000000..e138ec5d6a7 --- /dev/null +++ b/vendor/github.com/Azure/go-ansiterm/SECURITY.md @@ -0,0 +1,41 @@ + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). + + diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/LICENSE b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/LICENSE deleted file mode 100644 index 52cf18e425e..00000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright 2021 The ANTLR Project - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. 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. - - 3. Neither the name of the copyright holder 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 HOLDER 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/antlr/antlr4/runtime/Go/antlr/v4/antlrdoc.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/antlrdoc.go deleted file mode 100644 index ab51212676f..00000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/antlrdoc.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Package antlr implements the Go version of the ANTLR 4 runtime. - -# The ANTLR Tool - -ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, -or translating structured text or binary files. It's widely used to build languages, tools, and frameworks. -From a grammar, ANTLR generates a parser that can build parse trees and also generates a listener interface -(or visitor) that makes it easy to respond to the recognition of phrases of interest. - -# Code Generation - -ANTLR supports the generation of code in a number of [target languages], and the generated code is supported by a -runtime library, written specifically to support the generated code in the target language. This library is the -runtime for the Go target. - -To generate code for the go target, it is generally recommended to place the source grammar files in a package of -their own, and use the `.sh` script method of generating code, using the go generate directive. In that same directory -it is usual, though not required, to place the antlr tool that should be used to generate the code. That does mean -that the antlr tool JAR file will be checked in to your source code control though, so you are free to use any other -way of specifying the version of the ANTLR tool to use, such as aliasing in `.zshrc` or equivalent, or a profile in -your IDE, or configuration in your CI system. - -Here is a general template for an ANTLR based recognizer in Go: - - . - ├── myproject - ├── parser - │ ├── mygrammar.g4 - │ ├── antlr-4.12.0-complete.jar - │ ├── error_listeners.go - │ ├── generate.go - │ ├── generate.sh - ├── go.mod - ├── go.sum - ├── main.go - └── main_test.go - -Make sure that the package statement in your grammar file(s) reflects the go package they exist in. -The generate.go file then looks like this: - - package parser - - //go:generate ./generate.sh - -And the generate.sh file will look similar to this: - - #!/bin/sh - - alias antlr4='java -Xmx500M -cp "./antlr4-4.12.0-complete.jar:$CLASSPATH" org.antlr.v4.Tool' - antlr4 -Dlanguage=Go -no-visitor -package parser *.g4 - -depending on whether you want visitors or listeners or any other ANTLR options. - -From the command line at the root of your package “myproject” you can then simply issue the command: - - go generate ./... - -# Copyright Notice - -Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. - -Use of this file is governed by the BSD 3-clause license, which can be found in the [LICENSE.txt] file in the project root. - -[target languages]: https://github.com/antlr/antlr4/tree/master/runtime -[LICENSE.txt]: https://github.com/antlr/antlr4/blob/master/LICENSE.txt -*/ -package antlr diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_config.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_config.go deleted file mode 100644 index 7619fa172ed..00000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_config.go +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" -) - -// ATNConfig is a tuple: (ATN state, predicted alt, syntactic, semantic -// context). The syntactic context is a graph-structured stack node whose -// path(s) to the root is the rule invocation(s) chain used to arrive at the -// state. The semantic context is the tree of semantic predicates encountered -// before reaching an ATN state. -type ATNConfig interface { - Equals(o Collectable[ATNConfig]) bool - Hash() int - - GetState() ATNState - GetAlt() int - GetSemanticContext() SemanticContext - - GetContext() PredictionContext - SetContext(PredictionContext) - - GetReachesIntoOuterContext() int - SetReachesIntoOuterContext(int) - - String() string - - getPrecedenceFilterSuppressed() bool - setPrecedenceFilterSuppressed(bool) -} - -type BaseATNConfig struct { - precedenceFilterSuppressed bool - state ATNState - alt int - context PredictionContext - semanticContext SemanticContext - reachesIntoOuterContext int -} - -func NewBaseATNConfig7(old *BaseATNConfig) ATNConfig { // TODO: Dup - return &BaseATNConfig{ - state: old.state, - alt: old.alt, - context: old.context, - semanticContext: old.semanticContext, - reachesIntoOuterContext: old.reachesIntoOuterContext, - } -} - -func NewBaseATNConfig6(state ATNState, alt int, context PredictionContext) *BaseATNConfig { - return NewBaseATNConfig5(state, alt, context, SemanticContextNone) -} - -func NewBaseATNConfig5(state ATNState, alt int, context PredictionContext, semanticContext SemanticContext) *BaseATNConfig { - if semanticContext == nil { - panic("semanticContext cannot be nil") // TODO: Necessary? - } - - return &BaseATNConfig{state: state, alt: alt, context: context, semanticContext: semanticContext} -} - -func NewBaseATNConfig4(c ATNConfig, state ATNState) *BaseATNConfig { - return NewBaseATNConfig(c, state, c.GetContext(), c.GetSemanticContext()) -} - -func NewBaseATNConfig3(c ATNConfig, state ATNState, semanticContext SemanticContext) *BaseATNConfig { - return NewBaseATNConfig(c, state, c.GetContext(), semanticContext) -} - -func NewBaseATNConfig2(c ATNConfig, semanticContext SemanticContext) *BaseATNConfig { - return NewBaseATNConfig(c, c.GetState(), c.GetContext(), semanticContext) -} - -func NewBaseATNConfig1(c ATNConfig, state ATNState, context PredictionContext) *BaseATNConfig { - return NewBaseATNConfig(c, state, context, c.GetSemanticContext()) -} - -func NewBaseATNConfig(c ATNConfig, state ATNState, context PredictionContext, semanticContext SemanticContext) *BaseATNConfig { - if semanticContext == nil { - panic("semanticContext cannot be nil") - } - - return &BaseATNConfig{ - state: state, - alt: c.GetAlt(), - context: context, - semanticContext: semanticContext, - reachesIntoOuterContext: c.GetReachesIntoOuterContext(), - precedenceFilterSuppressed: c.getPrecedenceFilterSuppressed(), - } -} - -func (b *BaseATNConfig) getPrecedenceFilterSuppressed() bool { - return b.precedenceFilterSuppressed -} - -func (b *BaseATNConfig) setPrecedenceFilterSuppressed(v bool) { - b.precedenceFilterSuppressed = v -} - -func (b *BaseATNConfig) GetState() ATNState { - return b.state -} - -func (b *BaseATNConfig) GetAlt() int { - return b.alt -} - -func (b *BaseATNConfig) SetContext(v PredictionContext) { - b.context = v -} -func (b *BaseATNConfig) GetContext() PredictionContext { - return b.context -} - -func (b *BaseATNConfig) GetSemanticContext() SemanticContext { - return b.semanticContext -} - -func (b *BaseATNConfig) GetReachesIntoOuterContext() int { - return b.reachesIntoOuterContext -} - -func (b *BaseATNConfig) SetReachesIntoOuterContext(v int) { - b.reachesIntoOuterContext = v -} - -// Equals is the default comparison function for an ATNConfig when no specialist implementation is required -// for a collection. -// -// An ATN configuration is equal to another if both have the same state, they -// predict the same alternative, and syntactic/semantic contexts are the same. -func (b *BaseATNConfig) Equals(o Collectable[ATNConfig]) bool { - if b == o { - return true - } else if o == nil { - return false - } - - var other, ok = o.(*BaseATNConfig) - - if !ok { - return false - } - - var equal bool - - if b.context == nil { - equal = other.context == nil - } else { - equal = b.context.Equals(other.context) - } - - var ( - nums = b.state.GetStateNumber() == other.state.GetStateNumber() - alts = b.alt == other.alt - cons = b.semanticContext.Equals(other.semanticContext) - sups = b.precedenceFilterSuppressed == other.precedenceFilterSuppressed - ) - - return nums && alts && cons && sups && equal -} - -// Hash is the default hash function for BaseATNConfig, when no specialist hash function -// is required for a collection -func (b *BaseATNConfig) Hash() int { - var c int - if b.context != nil { - c = b.context.Hash() - } - - h := murmurInit(7) - h = murmurUpdate(h, b.state.GetStateNumber()) - h = murmurUpdate(h, b.alt) - h = murmurUpdate(h, c) - h = murmurUpdate(h, b.semanticContext.Hash()) - return murmurFinish(h, 4) -} - -func (b *BaseATNConfig) String() string { - var s1, s2, s3 string - - if b.context != nil { - s1 = ",[" + fmt.Sprint(b.context) + "]" - } - - if b.semanticContext != SemanticContextNone { - s2 = "," + fmt.Sprint(b.semanticContext) - } - - if b.reachesIntoOuterContext > 0 { - s3 = ",up=" + fmt.Sprint(b.reachesIntoOuterContext) - } - - return fmt.Sprintf("(%v,%v%v%v%v)", b.state, b.alt, s1, s2, s3) -} - -type LexerATNConfig struct { - *BaseATNConfig - lexerActionExecutor *LexerActionExecutor - passedThroughNonGreedyDecision bool -} - -func NewLexerATNConfig6(state ATNState, alt int, context PredictionContext) *LexerATNConfig { - return &LexerATNConfig{BaseATNConfig: NewBaseATNConfig5(state, alt, context, SemanticContextNone)} -} - -func NewLexerATNConfig5(state ATNState, alt int, context PredictionContext, lexerActionExecutor *LexerActionExecutor) *LexerATNConfig { - return &LexerATNConfig{ - BaseATNConfig: NewBaseATNConfig5(state, alt, context, SemanticContextNone), - lexerActionExecutor: lexerActionExecutor, - } -} - -func NewLexerATNConfig4(c *LexerATNConfig, state ATNState) *LexerATNConfig { - return &LexerATNConfig{ - BaseATNConfig: NewBaseATNConfig(c, state, c.GetContext(), c.GetSemanticContext()), - lexerActionExecutor: c.lexerActionExecutor, - passedThroughNonGreedyDecision: checkNonGreedyDecision(c, state), - } -} - -func NewLexerATNConfig3(c *LexerATNConfig, state ATNState, lexerActionExecutor *LexerActionExecutor) *LexerATNConfig { - return &LexerATNConfig{ - BaseATNConfig: NewBaseATNConfig(c, state, c.GetContext(), c.GetSemanticContext()), - lexerActionExecutor: lexerActionExecutor, - passedThroughNonGreedyDecision: checkNonGreedyDecision(c, state), - } -} - -func NewLexerATNConfig2(c *LexerATNConfig, state ATNState, context PredictionContext) *LexerATNConfig { - return &LexerATNConfig{ - BaseATNConfig: NewBaseATNConfig(c, state, context, c.GetSemanticContext()), - lexerActionExecutor: c.lexerActionExecutor, - passedThroughNonGreedyDecision: checkNonGreedyDecision(c, state), - } -} - -func NewLexerATNConfig1(state ATNState, alt int, context PredictionContext) *LexerATNConfig { - return &LexerATNConfig{BaseATNConfig: NewBaseATNConfig5(state, alt, context, SemanticContextNone)} -} - -// Hash is the default hash function for LexerATNConfig objects, it can be used directly or via -// the default comparator [ObjEqComparator]. -func (l *LexerATNConfig) Hash() int { - var f int - if l.passedThroughNonGreedyDecision { - f = 1 - } else { - f = 0 - } - h := murmurInit(7) - h = murmurUpdate(h, l.state.GetStateNumber()) - h = murmurUpdate(h, l.alt) - h = murmurUpdate(h, l.context.Hash()) - h = murmurUpdate(h, l.semanticContext.Hash()) - h = murmurUpdate(h, f) - h = murmurUpdate(h, l.lexerActionExecutor.Hash()) - h = murmurFinish(h, 6) - return h -} - -// Equals is the default comparison function for LexerATNConfig objects, it can be used directly or via -// the default comparator [ObjEqComparator]. -func (l *LexerATNConfig) Equals(other Collectable[ATNConfig]) bool { - if l == other { - return true - } - var othert, ok = other.(*LexerATNConfig) - - if l == other { - return true - } else if !ok { - return false - } else if l.passedThroughNonGreedyDecision != othert.passedThroughNonGreedyDecision { - return false - } - - var b bool - - if l.lexerActionExecutor != nil { - b = !l.lexerActionExecutor.Equals(othert.lexerActionExecutor) - } else { - b = othert.lexerActionExecutor != nil - } - - if b { - return false - } - - return l.BaseATNConfig.Equals(othert.BaseATNConfig) -} - -func checkNonGreedyDecision(source *LexerATNConfig, target ATNState) bool { - var ds, ok = target.(DecisionState) - - return source.passedThroughNonGreedyDecision || (ok && ds.getNonGreedy()) -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_config_set.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_config_set.go deleted file mode 100644 index 43e9b33f3bd..00000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_config_set.go +++ /dev/null @@ -1,441 +0,0 @@ -// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" -) - -type ATNConfigSet interface { - Hash() int - Equals(o Collectable[ATNConfig]) bool - Add(ATNConfig, *DoubleDict) bool - AddAll([]ATNConfig) bool - - GetStates() *JStore[ATNState, Comparator[ATNState]] - GetPredicates() []SemanticContext - GetItems() []ATNConfig - - OptimizeConfigs(interpreter *BaseATNSimulator) - - Length() int - IsEmpty() bool - Contains(ATNConfig) bool - ContainsFast(ATNConfig) bool - Clear() - String() string - - HasSemanticContext() bool - SetHasSemanticContext(v bool) - - ReadOnly() bool - SetReadOnly(bool) - - GetConflictingAlts() *BitSet - SetConflictingAlts(*BitSet) - - Alts() *BitSet - - FullContext() bool - - GetUniqueAlt() int - SetUniqueAlt(int) - - GetDipsIntoOuterContext() bool - SetDipsIntoOuterContext(bool) -} - -// BaseATNConfigSet is a specialized set of ATNConfig that tracks information -// about its elements and can combine similar configurations using a -// graph-structured stack. -type BaseATNConfigSet struct { - cachedHash int - - // configLookup is used to determine whether two BaseATNConfigSets are equal. We - // need all configurations with the same (s, i, _, semctx) to be equal. A key - // effectively doubles the number of objects associated with ATNConfigs. All - // keys are hashed by (s, i, _, pi), not including the context. Wiped out when - // read-only because a set becomes a DFA state. - configLookup *JStore[ATNConfig, Comparator[ATNConfig]] - - // configs is the added elements. - configs []ATNConfig - - // TODO: These fields make me pretty uncomfortable, but it is nice to pack up - // info together because it saves recomputation. Can we track conflicts as they - // are added to save scanning configs later? - conflictingAlts *BitSet - - // dipsIntoOuterContext is used by parsers and lexers. In a lexer, it indicates - // we hit a pred while computing a closure operation. Do not make a DFA state - // from the BaseATNConfigSet in this case. TODO: How is this used by parsers? - dipsIntoOuterContext bool - - // fullCtx is whether it is part of a full context LL prediction. Used to - // determine how to merge $. It is a wildcard with SLL, but not for an LL - // context merge. - fullCtx bool - - // Used in parser and lexer. In lexer, it indicates we hit a pred - // while computing a closure operation. Don't make a DFA state from a. - hasSemanticContext bool - - // readOnly is whether it is read-only. Do not - // allow any code to manipulate the set if true because DFA states will point at - // sets and those must not change. It not, protect other fields; conflictingAlts - // in particular, which is assigned after readOnly. - readOnly bool - - // TODO: These fields make me pretty uncomfortable, but it is nice to pack up - // info together because it saves recomputation. Can we track conflicts as they - // are added to save scanning configs later? - uniqueAlt int -} - -func (b *BaseATNConfigSet) Alts() *BitSet { - alts := NewBitSet() - for _, it := range b.configs { - alts.add(it.GetAlt()) - } - return alts -} - -func NewBaseATNConfigSet(fullCtx bool) *BaseATNConfigSet { - return &BaseATNConfigSet{ - cachedHash: -1, - configLookup: NewJStore[ATNConfig, Comparator[ATNConfig]](aConfCompInst), - fullCtx: fullCtx, - } -} - -// Add merges contexts with existing configs for (s, i, pi, _), where s is the -// ATNConfig.state, i is the ATNConfig.alt, and pi is the -// ATNConfig.semanticContext. We use (s,i,pi) as the key. Updates -// dipsIntoOuterContext and hasSemanticContext when necessary. -func (b *BaseATNConfigSet) Add(config ATNConfig, mergeCache *DoubleDict) bool { - if b.readOnly { - panic("set is read-only") - } - - if config.GetSemanticContext() != SemanticContextNone { - b.hasSemanticContext = true - } - - if config.GetReachesIntoOuterContext() > 0 { - b.dipsIntoOuterContext = true - } - - existing, present := b.configLookup.Put(config) - - // The config was not already in the set - // - if !present { - b.cachedHash = -1 - b.configs = append(b.configs, config) // Track order here - return true - } - - // Merge a previous (s, i, pi, _) with it and save the result - rootIsWildcard := !b.fullCtx - merged := merge(existing.GetContext(), config.GetContext(), rootIsWildcard, mergeCache) - - // No need to check for existing.context because config.context is in the cache, - // since the only way to create new graphs is the "call rule" and here. We cache - // at both places. - existing.SetReachesIntoOuterContext(intMax(existing.GetReachesIntoOuterContext(), config.GetReachesIntoOuterContext())) - - // Preserve the precedence filter suppression during the merge - if config.getPrecedenceFilterSuppressed() { - existing.setPrecedenceFilterSuppressed(true) - } - - // Replace the context because there is no need to do alt mapping - existing.SetContext(merged) - - return true -} - -func (b *BaseATNConfigSet) GetStates() *JStore[ATNState, Comparator[ATNState]] { - - // states uses the standard comparator provided by the ATNState instance - // - states := NewJStore[ATNState, Comparator[ATNState]](aStateEqInst) - - for i := 0; i < len(b.configs); i++ { - states.Put(b.configs[i].GetState()) - } - - return states -} - -func (b *BaseATNConfigSet) HasSemanticContext() bool { - return b.hasSemanticContext -} - -func (b *BaseATNConfigSet) SetHasSemanticContext(v bool) { - b.hasSemanticContext = v -} - -func (b *BaseATNConfigSet) GetPredicates() []SemanticContext { - preds := make([]SemanticContext, 0) - - for i := 0; i < len(b.configs); i++ { - c := b.configs[i].GetSemanticContext() - - if c != SemanticContextNone { - preds = append(preds, c) - } - } - - return preds -} - -func (b *BaseATNConfigSet) GetItems() []ATNConfig { - return b.configs -} - -func (b *BaseATNConfigSet) OptimizeConfigs(interpreter *BaseATNSimulator) { - if b.readOnly { - panic("set is read-only") - } - - if b.configLookup.Len() == 0 { - return - } - - for i := 0; i < len(b.configs); i++ { - config := b.configs[i] - - config.SetContext(interpreter.getCachedContext(config.GetContext())) - } -} - -func (b *BaseATNConfigSet) AddAll(coll []ATNConfig) bool { - for i := 0; i < len(coll); i++ { - b.Add(coll[i], nil) - } - - return false -} - -// Compare is a hack function just to verify that adding DFAstares to the known -// set works, so long as comparison of ATNConfigSet s works. For that to work, we -// need to make sure that the set of ATNConfigs in two sets are equivalent. We can't -// know the order, so we do this inefficient hack. If this proves the point, then -// we can change the config set to a better structure. -func (b *BaseATNConfigSet) Compare(bs *BaseATNConfigSet) bool { - if len(b.configs) != len(bs.configs) { - return false - } - - for _, c := range b.configs { - found := false - for _, c2 := range bs.configs { - if c.Equals(c2) { - found = true - break - } - } - - if !found { - return false - } - - } - return true -} - -func (b *BaseATNConfigSet) Equals(other Collectable[ATNConfig]) bool { - if b == other { - return true - } else if _, ok := other.(*BaseATNConfigSet); !ok { - return false - } - - other2 := other.(*BaseATNConfigSet) - - return b.configs != nil && - b.fullCtx == other2.fullCtx && - b.uniqueAlt == other2.uniqueAlt && - b.conflictingAlts == other2.conflictingAlts && - b.hasSemanticContext == other2.hasSemanticContext && - b.dipsIntoOuterContext == other2.dipsIntoOuterContext && - b.Compare(other2) -} - -func (b *BaseATNConfigSet) Hash() int { - if b.readOnly { - if b.cachedHash == -1 { - b.cachedHash = b.hashCodeConfigs() - } - - return b.cachedHash - } - - return b.hashCodeConfigs() -} - -func (b *BaseATNConfigSet) hashCodeConfigs() int { - h := 1 - for _, config := range b.configs { - h = 31*h + config.Hash() - } - return h -} - -func (b *BaseATNConfigSet) Length() int { - return len(b.configs) -} - -func (b *BaseATNConfigSet) IsEmpty() bool { - return len(b.configs) == 0 -} - -func (b *BaseATNConfigSet) Contains(item ATNConfig) bool { - if b.configLookup == nil { - panic("not implemented for read-only sets") - } - - return b.configLookup.Contains(item) -} - -func (b *BaseATNConfigSet) ContainsFast(item ATNConfig) bool { - if b.configLookup == nil { - panic("not implemented for read-only sets") - } - - return b.configLookup.Contains(item) // TODO: containsFast is not implemented for Set -} - -func (b *BaseATNConfigSet) Clear() { - if b.readOnly { - panic("set is read-only") - } - - b.configs = make([]ATNConfig, 0) - b.cachedHash = -1 - b.configLookup = NewJStore[ATNConfig, Comparator[ATNConfig]](atnConfCompInst) -} - -func (b *BaseATNConfigSet) FullContext() bool { - return b.fullCtx -} - -func (b *BaseATNConfigSet) GetDipsIntoOuterContext() bool { - return b.dipsIntoOuterContext -} - -func (b *BaseATNConfigSet) SetDipsIntoOuterContext(v bool) { - b.dipsIntoOuterContext = v -} - -func (b *BaseATNConfigSet) GetUniqueAlt() int { - return b.uniqueAlt -} - -func (b *BaseATNConfigSet) SetUniqueAlt(v int) { - b.uniqueAlt = v -} - -func (b *BaseATNConfigSet) GetConflictingAlts() *BitSet { - return b.conflictingAlts -} - -func (b *BaseATNConfigSet) SetConflictingAlts(v *BitSet) { - b.conflictingAlts = v -} - -func (b *BaseATNConfigSet) ReadOnly() bool { - return b.readOnly -} - -func (b *BaseATNConfigSet) SetReadOnly(readOnly bool) { - b.readOnly = readOnly - - if readOnly { - b.configLookup = nil // Read only, so no need for the lookup cache - } -} - -func (b *BaseATNConfigSet) String() string { - s := "[" - - for i, c := range b.configs { - s += c.String() - - if i != len(b.configs)-1 { - s += ", " - } - } - - s += "]" - - if b.hasSemanticContext { - s += ",hasSemanticContext=" + fmt.Sprint(b.hasSemanticContext) - } - - if b.uniqueAlt != ATNInvalidAltNumber { - s += ",uniqueAlt=" + fmt.Sprint(b.uniqueAlt) - } - - if b.conflictingAlts != nil { - s += ",conflictingAlts=" + b.conflictingAlts.String() - } - - if b.dipsIntoOuterContext { - s += ",dipsIntoOuterContext" - } - - return s -} - -type OrderedATNConfigSet struct { - *BaseATNConfigSet -} - -func NewOrderedATNConfigSet() *OrderedATNConfigSet { - b := NewBaseATNConfigSet(false) - - // This set uses the standard Hash() and Equals() from ATNConfig - b.configLookup = NewJStore[ATNConfig, Comparator[ATNConfig]](aConfEqInst) - - return &OrderedATNConfigSet{BaseATNConfigSet: b} -} - -func hashATNConfig(i interface{}) int { - o := i.(ATNConfig) - hash := 7 - hash = 31*hash + o.GetState().GetStateNumber() - hash = 31*hash + o.GetAlt() - hash = 31*hash + o.GetSemanticContext().Hash() - return hash -} - -func equalATNConfigs(a, b interface{}) bool { - if a == nil || b == nil { - return false - } - - if a == b { - return true - } - - var ai, ok = a.(ATNConfig) - var bi, ok1 = b.(ATNConfig) - - if !ok || !ok1 { - return false - } - - if ai.GetState().GetStateNumber() != bi.GetState().GetStateNumber() { - return false - } - - if ai.GetAlt() != bi.GetAlt() { - return false - } - - return ai.GetSemanticContext().Equals(bi.GetSemanticContext()) -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/input_stream.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/input_stream.go deleted file mode 100644 index a8b889cedb9..00000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/input_stream.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -type InputStream struct { - name string - index int - data []rune - size int -} - -func NewInputStream(data string) *InputStream { - - is := new(InputStream) - - is.name = "" - is.index = 0 - is.data = []rune(data) - is.size = len(is.data) // number of runes - - return is -} - -func (is *InputStream) reset() { - is.index = 0 -} - -func (is *InputStream) Consume() { - if is.index >= is.size { - // assert is.LA(1) == TokenEOF - panic("cannot consume EOF") - } - is.index++ -} - -func (is *InputStream) LA(offset int) int { - - if offset == 0 { - return 0 // nil - } - if offset < 0 { - offset++ // e.g., translate LA(-1) to use offset=0 - } - pos := is.index + offset - 1 - - if pos < 0 || pos >= is.size { // invalid - return TokenEOF - } - - return int(is.data[pos]) -} - -func (is *InputStream) LT(offset int) int { - return is.LA(offset) -} - -func (is *InputStream) Index() int { - return is.index -} - -func (is *InputStream) Size() int { - return is.size -} - -// mark/release do nothing we have entire buffer -func (is *InputStream) Mark() int { - return -1 -} - -func (is *InputStream) Release(marker int) { -} - -func (is *InputStream) Seek(index int) { - if index <= is.index { - is.index = index // just jump don't update stream state (line,...) - return - } - // seek forward - is.index = intMin(index, is.size) -} - -func (is *InputStream) GetText(start int, stop int) string { - if stop >= is.size { - stop = is.size - 1 - } - if start >= is.size { - return "" - } - - return string(is.data[start : stop+1]) -} - -func (is *InputStream) GetTextFromTokens(start, stop Token) string { - if start != nil && stop != nil { - return is.GetTextFromInterval(NewInterval(start.GetTokenIndex(), stop.GetTokenIndex())) - } - - return "" -} - -func (is *InputStream) GetTextFromInterval(i *Interval) string { - return is.GetText(i.Start, i.Stop) -} - -func (*InputStream) GetSourceName() string { - return "Obtained from string" -} - -func (is *InputStream) String() string { - return string(is.data) -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/jcollect.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/jcollect.go deleted file mode 100644 index e5a74f0c6c4..00000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/jcollect.go +++ /dev/null @@ -1,198 +0,0 @@ -package antlr - -// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -import ( - "sort" -) - -// Collectable is an interface that a struct should implement if it is to be -// usable as a key in these collections. -type Collectable[T any] interface { - Hash() int - Equals(other Collectable[T]) bool -} - -type Comparator[T any] interface { - Hash1(o T) int - Equals2(T, T) bool -} - -// JStore implements a container that allows the use of a struct to calculate the key -// for a collection of values akin to map. This is not meant to be a full-blown HashMap but just -// serve the needs of the ANTLR Go runtime. -// -// For ease of porting the logic of the runtime from the master target (Java), this collection -// operates in a similar way to Java, in that it can use any struct that supplies a Hash() and Equals() -// function as the key. The values are stored in a standard go map which internally is a form of hashmap -// itself, the key for the go map is the hash supplied by the key object. The collection is able to deal with -// hash conflicts by using a simple slice of values associated with the hash code indexed bucket. That isn't -// particularly efficient, but it is simple, and it works. As this is specifically for the ANTLR runtime, and -// we understand the requirements, then this is fine - this is not a general purpose collection. -type JStore[T any, C Comparator[T]] struct { - store map[int][]T - len int - comparator Comparator[T] -} - -func NewJStore[T any, C Comparator[T]](comparator Comparator[T]) *JStore[T, C] { - - if comparator == nil { - panic("comparator cannot be nil") - } - - s := &JStore[T, C]{ - store: make(map[int][]T, 1), - comparator: comparator, - } - return s -} - -// Put will store given value in the collection. Note that the key for storage is generated from -// the value itself - this is specifically because that is what ANTLR needs - this would not be useful -// as any kind of general collection. -// -// If the key has a hash conflict, then the value will be added to the slice of values associated with the -// hash, unless the value is already in the slice, in which case the existing value is returned. Value equivalence is -// tested by calling the equals() method on the key. -// -// # If the given value is already present in the store, then the existing value is returned as v and exists is set to true -// -// If the given value is not present in the store, then the value is added to the store and returned as v and exists is set to false. -func (s *JStore[T, C]) Put(value T) (v T, exists bool) { //nolint:ireturn - - kh := s.comparator.Hash1(value) - - for _, v1 := range s.store[kh] { - if s.comparator.Equals2(value, v1) { - return v1, true - } - } - s.store[kh] = append(s.store[kh], value) - s.len++ - return value, false -} - -// Get will return the value associated with the key - the type of the key is the same type as the value -// which would not generally be useful, but this is a specific thing for ANTLR where the key is -// generated using the object we are going to store. -func (s *JStore[T, C]) Get(key T) (T, bool) { //nolint:ireturn - - kh := s.comparator.Hash1(key) - - for _, v := range s.store[kh] { - if s.comparator.Equals2(key, v) { - return v, true - } - } - return key, false -} - -// Contains returns true if the given key is present in the store -func (s *JStore[T, C]) Contains(key T) bool { //nolint:ireturn - - _, present := s.Get(key) - return present -} - -func (s *JStore[T, C]) SortedSlice(less func(i, j T) bool) []T { - vs := make([]T, 0, len(s.store)) - for _, v := range s.store { - vs = append(vs, v...) - } - sort.Slice(vs, func(i, j int) bool { - return less(vs[i], vs[j]) - }) - - return vs -} - -func (s *JStore[T, C]) Each(f func(T) bool) { - for _, e := range s.store { - for _, v := range e { - f(v) - } - } -} - -func (s *JStore[T, C]) Len() int { - return s.len -} - -func (s *JStore[T, C]) Values() []T { - vs := make([]T, 0, len(s.store)) - for _, e := range s.store { - for _, v := range e { - vs = append(vs, v) - } - } - return vs -} - -type entry[K, V any] struct { - key K - val V -} - -type JMap[K, V any, C Comparator[K]] struct { - store map[int][]*entry[K, V] - len int - comparator Comparator[K] -} - -func NewJMap[K, V any, C Comparator[K]](comparator Comparator[K]) *JMap[K, V, C] { - return &JMap[K, V, C]{ - store: make(map[int][]*entry[K, V], 1), - comparator: comparator, - } -} - -func (m *JMap[K, V, C]) Put(key K, val V) { - kh := m.comparator.Hash1(key) - - m.store[kh] = append(m.store[kh], &entry[K, V]{key, val}) - m.len++ -} - -func (m *JMap[K, V, C]) Values() []V { - vs := make([]V, 0, len(m.store)) - for _, e := range m.store { - for _, v := range e { - vs = append(vs, v.val) - } - } - return vs -} - -func (m *JMap[K, V, C]) Get(key K) (V, bool) { - - var none V - kh := m.comparator.Hash1(key) - for _, e := range m.store[kh] { - if m.comparator.Equals2(e.key, key) { - return e.val, true - } - } - return none, false -} - -func (m *JMap[K, V, C]) Len() int { - return len(m.store) -} - -func (m *JMap[K, V, C]) Delete(key K) { - kh := m.comparator.Hash1(key) - for i, e := range m.store[kh] { - if m.comparator.Equals2(e.key, key) { - m.store[kh] = append(m.store[kh][:i], m.store[kh][i+1:]...) - m.len-- - return - } - } -} - -func (m *JMap[K, V, C]) Clear() { - m.store = make(map[int][]*entry[K, V]) -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/prediction_context.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/prediction_context.go deleted file mode 100644 index ba62af36108..00000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/prediction_context.go +++ /dev/null @@ -1,806 +0,0 @@ -// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" - "golang.org/x/exp/slices" - "strconv" -) - -// Represents {@code $} in local context prediction, which means wildcard. -// {@code//+x =//}. -// / -const ( - BasePredictionContextEmptyReturnState = 0x7FFFFFFF -) - -// Represents {@code $} in an array in full context mode, when {@code $} -// doesn't mean wildcard: {@code $ + x = [$,x]}. Here, -// {@code $} = {@link //EmptyReturnState}. -// / - -var ( - BasePredictionContextglobalNodeCount = 1 - BasePredictionContextid = BasePredictionContextglobalNodeCount -) - -type PredictionContext interface { - Hash() int - Equals(interface{}) bool - GetParent(int) PredictionContext - getReturnState(int) int - length() int - isEmpty() bool - hasEmptyPath() bool - String() string -} - -type BasePredictionContext struct { - cachedHash int -} - -func NewBasePredictionContext(cachedHash int) *BasePredictionContext { - pc := new(BasePredictionContext) - pc.cachedHash = cachedHash - - return pc -} - -func (b *BasePredictionContext) isEmpty() bool { - return false -} - -func calculateHash(parent PredictionContext, returnState int) int { - h := murmurInit(1) - h = murmurUpdate(h, parent.Hash()) - h = murmurUpdate(h, returnState) - return murmurFinish(h, 2) -} - -var _emptyPredictionContextHash int - -func init() { - _emptyPredictionContextHash = murmurInit(1) - _emptyPredictionContextHash = murmurFinish(_emptyPredictionContextHash, 0) -} - -func calculateEmptyHash() int { - return _emptyPredictionContextHash -} - -// Used to cache {@link BasePredictionContext} objects. Its used for the shared -// context cash associated with contexts in DFA states. This cache -// can be used for both lexers and parsers. - -type PredictionContextCache struct { - cache map[PredictionContext]PredictionContext -} - -func NewPredictionContextCache() *PredictionContextCache { - t := new(PredictionContextCache) - t.cache = make(map[PredictionContext]PredictionContext) - return t -} - -// Add a context to the cache and return it. If the context already exists, -// return that one instead and do not add a Newcontext to the cache. -// Protect shared cache from unsafe thread access. -func (p *PredictionContextCache) add(ctx PredictionContext) PredictionContext { - if ctx == BasePredictionContextEMPTY { - return BasePredictionContextEMPTY - } - existing := p.cache[ctx] - if existing != nil { - return existing - } - p.cache[ctx] = ctx - return ctx -} - -func (p *PredictionContextCache) Get(ctx PredictionContext) PredictionContext { - return p.cache[ctx] -} - -func (p *PredictionContextCache) length() int { - return len(p.cache) -} - -type SingletonPredictionContext interface { - PredictionContext -} - -type BaseSingletonPredictionContext struct { - *BasePredictionContext - - parentCtx PredictionContext - returnState int -} - -func NewBaseSingletonPredictionContext(parent PredictionContext, returnState int) *BaseSingletonPredictionContext { - var cachedHash int - if parent != nil { - cachedHash = calculateHash(parent, returnState) - } else { - cachedHash = calculateEmptyHash() - } - - s := new(BaseSingletonPredictionContext) - s.BasePredictionContext = NewBasePredictionContext(cachedHash) - - s.parentCtx = parent - s.returnState = returnState - - return s -} - -func SingletonBasePredictionContextCreate(parent PredictionContext, returnState int) PredictionContext { - if returnState == BasePredictionContextEmptyReturnState && parent == nil { - // someone can pass in the bits of an array ctx that mean $ - return BasePredictionContextEMPTY - } - - return NewBaseSingletonPredictionContext(parent, returnState) -} - -func (b *BaseSingletonPredictionContext) length() int { - return 1 -} - -func (b *BaseSingletonPredictionContext) GetParent(index int) PredictionContext { - return b.parentCtx -} - -func (b *BaseSingletonPredictionContext) getReturnState(index int) int { - return b.returnState -} - -func (b *BaseSingletonPredictionContext) hasEmptyPath() bool { - return b.returnState == BasePredictionContextEmptyReturnState -} - -func (b *BaseSingletonPredictionContext) Hash() int { - return b.cachedHash -} - -func (b *BaseSingletonPredictionContext) Equals(other interface{}) bool { - if b == other { - return true - } - if _, ok := other.(*BaseSingletonPredictionContext); !ok { - return false - } - - otherP := other.(*BaseSingletonPredictionContext) - - if b.returnState != otherP.getReturnState(0) { - return false - } - if b.parentCtx == nil { - return otherP.parentCtx == nil - } - - return b.parentCtx.Equals(otherP.parentCtx) -} - -func (b *BaseSingletonPredictionContext) String() string { - var up string - - if b.parentCtx == nil { - up = "" - } else { - up = b.parentCtx.String() - } - - if len(up) == 0 { - if b.returnState == BasePredictionContextEmptyReturnState { - return "$" - } - - return strconv.Itoa(b.returnState) - } - - return strconv.Itoa(b.returnState) + " " + up -} - -var BasePredictionContextEMPTY = NewEmptyPredictionContext() - -type EmptyPredictionContext struct { - *BaseSingletonPredictionContext -} - -func NewEmptyPredictionContext() *EmptyPredictionContext { - - p := new(EmptyPredictionContext) - - p.BaseSingletonPredictionContext = NewBaseSingletonPredictionContext(nil, BasePredictionContextEmptyReturnState) - p.cachedHash = calculateEmptyHash() - return p -} - -func (e *EmptyPredictionContext) isEmpty() bool { - return true -} - -func (e *EmptyPredictionContext) GetParent(index int) PredictionContext { - return nil -} - -func (e *EmptyPredictionContext) getReturnState(index int) int { - return e.returnState -} - -func (e *EmptyPredictionContext) Hash() int { - return e.cachedHash -} - -func (e *EmptyPredictionContext) Equals(other interface{}) bool { - return e == other -} - -func (e *EmptyPredictionContext) String() string { - return "$" -} - -type ArrayPredictionContext struct { - *BasePredictionContext - - parents []PredictionContext - returnStates []int -} - -func NewArrayPredictionContext(parents []PredictionContext, returnStates []int) *ArrayPredictionContext { - // Parent can be nil only if full ctx mode and we make an array - // from {@link //EMPTY} and non-empty. We merge {@link //EMPTY} by using - // nil parent and - // returnState == {@link //EmptyReturnState}. - hash := murmurInit(1) - - for _, parent := range parents { - hash = murmurUpdate(hash, parent.Hash()) - } - - for _, returnState := range returnStates { - hash = murmurUpdate(hash, returnState) - } - - hash = murmurFinish(hash, len(parents)<<1) - - c := new(ArrayPredictionContext) - c.BasePredictionContext = NewBasePredictionContext(hash) - - c.parents = parents - c.returnStates = returnStates - - return c -} - -func (a *ArrayPredictionContext) GetReturnStates() []int { - return a.returnStates -} - -func (a *ArrayPredictionContext) hasEmptyPath() bool { - return a.getReturnState(a.length()-1) == BasePredictionContextEmptyReturnState -} - -func (a *ArrayPredictionContext) isEmpty() bool { - // since EmptyReturnState can only appear in the last position, we - // don't need to verify that size==1 - return a.returnStates[0] == BasePredictionContextEmptyReturnState -} - -func (a *ArrayPredictionContext) length() int { - return len(a.returnStates) -} - -func (a *ArrayPredictionContext) GetParent(index int) PredictionContext { - return a.parents[index] -} - -func (a *ArrayPredictionContext) getReturnState(index int) int { - return a.returnStates[index] -} - -// Equals is the default comparison function for ArrayPredictionContext when no specialized -// implementation is needed for a collection -func (a *ArrayPredictionContext) Equals(o interface{}) bool { - if a == o { - return true - } - other, ok := o.(*ArrayPredictionContext) - if !ok { - return false - } - if a.cachedHash != other.Hash() { - return false // can't be same if hash is different - } - - // Must compare the actual array elements and not just the array address - // - return slices.Equal(a.returnStates, other.returnStates) && - slices.EqualFunc(a.parents, other.parents, func(x, y PredictionContext) bool { - return x.Equals(y) - }) -} - -// Hash is the default hash function for ArrayPredictionContext when no specialized -// implementation is needed for a collection -func (a *ArrayPredictionContext) Hash() int { - return a.BasePredictionContext.cachedHash -} - -func (a *ArrayPredictionContext) String() string { - if a.isEmpty() { - return "[]" - } - - s := "[" - for i := 0; i < len(a.returnStates); i++ { - if i > 0 { - s = s + ", " - } - if a.returnStates[i] == BasePredictionContextEmptyReturnState { - s = s + "$" - continue - } - s = s + strconv.Itoa(a.returnStates[i]) - if a.parents[i] != nil { - s = s + " " + a.parents[i].String() - } else { - s = s + "nil" - } - } - - return s + "]" -} - -// Convert a {@link RuleContext} tree to a {@link BasePredictionContext} graph. -// Return {@link //EMPTY} if {@code outerContext} is empty or nil. -// / -func predictionContextFromRuleContext(a *ATN, outerContext RuleContext) PredictionContext { - if outerContext == nil { - outerContext = ParserRuleContextEmpty - } - // if we are in RuleContext of start rule, s, then BasePredictionContext - // is EMPTY. Nobody called us. (if we are empty, return empty) - if outerContext.GetParent() == nil || outerContext == ParserRuleContextEmpty { - return BasePredictionContextEMPTY - } - // If we have a parent, convert it to a BasePredictionContext graph - parent := predictionContextFromRuleContext(a, outerContext.GetParent().(RuleContext)) - state := a.states[outerContext.GetInvokingState()] - transition := state.GetTransitions()[0] - - return SingletonBasePredictionContextCreate(parent, transition.(*RuleTransition).followState.GetStateNumber()) -} - -func merge(a, b PredictionContext, rootIsWildcard bool, mergeCache *DoubleDict) PredictionContext { - - // Share same graph if both same - // - if a == b || a.Equals(b) { - return a - } - - // In Java, EmptyPredictionContext inherits from SingletonPredictionContext, and so the test - // in java for SingletonPredictionContext will succeed and a new ArrayPredictionContext will be created - // from it. - // In go, EmptyPredictionContext does not equate to SingletonPredictionContext and so that conversion - // will fail. We need to test for both Empty and Singleton and create an ArrayPredictionContext from - // either of them. - - ac, ok1 := a.(*BaseSingletonPredictionContext) - bc, ok2 := b.(*BaseSingletonPredictionContext) - - if ok1 && ok2 { - return mergeSingletons(ac, bc, rootIsWildcard, mergeCache) - } - // At least one of a or b is array - // If one is $ and rootIsWildcard, return $ as// wildcard - if rootIsWildcard { - if _, ok := a.(*EmptyPredictionContext); ok { - return a - } - if _, ok := b.(*EmptyPredictionContext); ok { - return b - } - } - - // Convert Singleton or Empty so both are arrays to normalize - We should not use the existing parameters - // here. - // - // TODO: I think that maybe the Prediction Context structs should be redone as there is a chance we will see this mess again - maybe redo the logic here - - var arp, arb *ArrayPredictionContext - var ok bool - if arp, ok = a.(*ArrayPredictionContext); ok { - } else if _, ok = a.(*BaseSingletonPredictionContext); ok { - arp = NewArrayPredictionContext([]PredictionContext{a.GetParent(0)}, []int{a.getReturnState(0)}) - } else if _, ok = a.(*EmptyPredictionContext); ok { - arp = NewArrayPredictionContext([]PredictionContext{}, []int{}) - } - - if arb, ok = b.(*ArrayPredictionContext); ok { - } else if _, ok = b.(*BaseSingletonPredictionContext); ok { - arb = NewArrayPredictionContext([]PredictionContext{b.GetParent(0)}, []int{b.getReturnState(0)}) - } else if _, ok = b.(*EmptyPredictionContext); ok { - arb = NewArrayPredictionContext([]PredictionContext{}, []int{}) - } - - // Both arp and arb - return mergeArrays(arp, arb, rootIsWildcard, mergeCache) -} - -// Merge two {@link SingletonBasePredictionContext} instances. -// -//

Stack tops equal, parents merge is same return left graph.
-//

-// -//

Same stack top, parents differ merge parents giving array node, then -// remainders of those graphs. A Newroot node is created to point to the -// merged parents.
-//

-// -//

Different stack tops pointing to same parent. Make array node for the -// root where both element in the root point to the same (original) -// parent.
-//

-// -//

Different stack tops pointing to different parents. Make array node for -// the root where each element points to the corresponding original -// parent.
-//

-// -// @param a the first {@link SingletonBasePredictionContext} -// @param b the second {@link SingletonBasePredictionContext} -// @param rootIsWildcard {@code true} if this is a local-context merge, -// otherwise false to indicate a full-context merge -// @param mergeCache -// / -func mergeSingletons(a, b *BaseSingletonPredictionContext, rootIsWildcard bool, mergeCache *DoubleDict) PredictionContext { - if mergeCache != nil { - previous := mergeCache.Get(a.Hash(), b.Hash()) - if previous != nil { - return previous.(PredictionContext) - } - previous = mergeCache.Get(b.Hash(), a.Hash()) - if previous != nil { - return previous.(PredictionContext) - } - } - - rootMerge := mergeRoot(a, b, rootIsWildcard) - if rootMerge != nil { - if mergeCache != nil { - mergeCache.set(a.Hash(), b.Hash(), rootMerge) - } - return rootMerge - } - if a.returnState == b.returnState { - parent := merge(a.parentCtx, b.parentCtx, rootIsWildcard, mergeCache) - // if parent is same as existing a or b parent or reduced to a parent, - // return it - if parent == a.parentCtx { - return a // ax + bx = ax, if a=b - } - if parent == b.parentCtx { - return b // ax + bx = bx, if a=b - } - // else: ax + ay = a'[x,y] - // merge parents x and y, giving array node with x,y then remainders - // of those graphs. dup a, a' points at merged array - // Newjoined parent so create Newsingleton pointing to it, a' - spc := SingletonBasePredictionContextCreate(parent, a.returnState) - if mergeCache != nil { - mergeCache.set(a.Hash(), b.Hash(), spc) - } - return spc - } - // a != b payloads differ - // see if we can collapse parents due to $+x parents if local ctx - var singleParent PredictionContext - if a == b || (a.parentCtx != nil && a.parentCtx == b.parentCtx) { // ax + - // bx = - // [a,b]x - singleParent = a.parentCtx - } - if singleParent != nil { // parents are same - // sort payloads and use same parent - payloads := []int{a.returnState, b.returnState} - if a.returnState > b.returnState { - payloads[0] = b.returnState - payloads[1] = a.returnState - } - parents := []PredictionContext{singleParent, singleParent} - apc := NewArrayPredictionContext(parents, payloads) - if mergeCache != nil { - mergeCache.set(a.Hash(), b.Hash(), apc) - } - return apc - } - // parents differ and can't merge them. Just pack together - // into array can't merge. - // ax + by = [ax,by] - payloads := []int{a.returnState, b.returnState} - parents := []PredictionContext{a.parentCtx, b.parentCtx} - if a.returnState > b.returnState { // sort by payload - payloads[0] = b.returnState - payloads[1] = a.returnState - parents = []PredictionContext{b.parentCtx, a.parentCtx} - } - apc := NewArrayPredictionContext(parents, payloads) - if mergeCache != nil { - mergeCache.set(a.Hash(), b.Hash(), apc) - } - return apc -} - -// Handle case where at least one of {@code a} or {@code b} is -// {@link //EMPTY}. In the following diagrams, the symbol {@code $} is used -// to represent {@link //EMPTY}. -// -//

Local-Context Merges

-// -//

These local-context merge operations are used when {@code rootIsWildcard} -// is true.

-// -//

{@link //EMPTY} is superset of any graph return {@link //EMPTY}.
-//

-// -//

{@link //EMPTY} and anything is {@code //EMPTY}, so merged parent is -// {@code //EMPTY} return left graph.
-//

-// -//

Special case of last merge if local context.
-//

-// -//

Full-Context Merges

-// -//

These full-context merge operations are used when {@code rootIsWildcard} -// is false.

-// -//

-// -//

Must keep all contexts {@link //EMPTY} in array is a special value (and -// nil parent).
-//

-// -//

-// -// @param a the first {@link SingletonBasePredictionContext} -// @param b the second {@link SingletonBasePredictionContext} -// @param rootIsWildcard {@code true} if this is a local-context merge, -// otherwise false to indicate a full-context merge -// / -func mergeRoot(a, b SingletonPredictionContext, rootIsWildcard bool) PredictionContext { - if rootIsWildcard { - if a == BasePredictionContextEMPTY { - return BasePredictionContextEMPTY // // + b =// - } - if b == BasePredictionContextEMPTY { - return BasePredictionContextEMPTY // a +// =// - } - } else { - if a == BasePredictionContextEMPTY && b == BasePredictionContextEMPTY { - return BasePredictionContextEMPTY // $ + $ = $ - } else if a == BasePredictionContextEMPTY { // $ + x = [$,x] - payloads := []int{b.getReturnState(-1), BasePredictionContextEmptyReturnState} - parents := []PredictionContext{b.GetParent(-1), nil} - return NewArrayPredictionContext(parents, payloads) - } else if b == BasePredictionContextEMPTY { // x + $ = [$,x] ($ is always first if present) - payloads := []int{a.getReturnState(-1), BasePredictionContextEmptyReturnState} - parents := []PredictionContext{a.GetParent(-1), nil} - return NewArrayPredictionContext(parents, payloads) - } - } - return nil -} - -// Merge two {@link ArrayBasePredictionContext} instances. -// -//

Different tops, different parents.
-//

-// -//

Shared top, same parents.
-//

-// -//

Shared top, different parents.
-//

-// -//

Shared top, all shared parents.
-//

-// -//

Equal tops, merge parents and reduce top to -// {@link SingletonBasePredictionContext}.
-//

-// / -func mergeArrays(a, b *ArrayPredictionContext, rootIsWildcard bool, mergeCache *DoubleDict) PredictionContext { - if mergeCache != nil { - previous := mergeCache.Get(a.Hash(), b.Hash()) - if previous != nil { - if ParserATNSimulatorTraceATNSim { - fmt.Println("mergeArrays a=" + a.String() + ",b=" + b.String() + " -> previous") - } - return previous.(PredictionContext) - } - previous = mergeCache.Get(b.Hash(), a.Hash()) - if previous != nil { - if ParserATNSimulatorTraceATNSim { - fmt.Println("mergeArrays a=" + a.String() + ",b=" + b.String() + " -> previous") - } - return previous.(PredictionContext) - } - } - // merge sorted payloads a + b => M - i := 0 // walks a - j := 0 // walks b - k := 0 // walks target M array - - mergedReturnStates := make([]int, len(a.returnStates)+len(b.returnStates)) - mergedParents := make([]PredictionContext, len(a.returnStates)+len(b.returnStates)) - // walk and merge to yield mergedParents, mergedReturnStates - for i < len(a.returnStates) && j < len(b.returnStates) { - aParent := a.parents[i] - bParent := b.parents[j] - if a.returnStates[i] == b.returnStates[j] { - // same payload (stack tops are equal), must yield merged singleton - payload := a.returnStates[i] - // $+$ = $ - bothDollars := payload == BasePredictionContextEmptyReturnState && aParent == nil && bParent == nil - axAX := aParent != nil && bParent != nil && aParent == bParent // ax+ax - // -> - // ax - if bothDollars || axAX { - mergedParents[k] = aParent // choose left - mergedReturnStates[k] = payload - } else { // ax+ay -> a'[x,y] - mergedParent := merge(aParent, bParent, rootIsWildcard, mergeCache) - mergedParents[k] = mergedParent - mergedReturnStates[k] = payload - } - i++ // hop over left one as usual - j++ // but also Skip one in right side since we merge - } else if a.returnStates[i] < b.returnStates[j] { // copy a[i] to M - mergedParents[k] = aParent - mergedReturnStates[k] = a.returnStates[i] - i++ - } else { // b > a, copy b[j] to M - mergedParents[k] = bParent - mergedReturnStates[k] = b.returnStates[j] - j++ - } - k++ - } - // copy over any payloads remaining in either array - if i < len(a.returnStates) { - for p := i; p < len(a.returnStates); p++ { - mergedParents[k] = a.parents[p] - mergedReturnStates[k] = a.returnStates[p] - k++ - } - } else { - for p := j; p < len(b.returnStates); p++ { - mergedParents[k] = b.parents[p] - mergedReturnStates[k] = b.returnStates[p] - k++ - } - } - // trim merged if we combined a few that had same stack tops - if k < len(mergedParents) { // write index < last position trim - if k == 1 { // for just one merged element, return singleton top - pc := SingletonBasePredictionContextCreate(mergedParents[0], mergedReturnStates[0]) - if mergeCache != nil { - mergeCache.set(a.Hash(), b.Hash(), pc) - } - return pc - } - mergedParents = mergedParents[0:k] - mergedReturnStates = mergedReturnStates[0:k] - } - - M := NewArrayPredictionContext(mergedParents, mergedReturnStates) - - // if we created same array as a or b, return that instead - // TODO: track whether this is possible above during merge sort for speed - // TODO: In go, I do not think we can just do M == xx as M is a brand new allocation. This could be causing allocation problems - if M == a { - if mergeCache != nil { - mergeCache.set(a.Hash(), b.Hash(), a) - } - if ParserATNSimulatorTraceATNSim { - fmt.Println("mergeArrays a=" + a.String() + ",b=" + b.String() + " -> a") - } - return a - } - if M == b { - if mergeCache != nil { - mergeCache.set(a.Hash(), b.Hash(), b) - } - if ParserATNSimulatorTraceATNSim { - fmt.Println("mergeArrays a=" + a.String() + ",b=" + b.String() + " -> b") - } - return b - } - combineCommonParents(mergedParents) - - if mergeCache != nil { - mergeCache.set(a.Hash(), b.Hash(), M) - } - if ParserATNSimulatorTraceATNSim { - fmt.Println("mergeArrays a=" + a.String() + ",b=" + b.String() + " -> " + M.String()) - } - return M -} - -// Make pass over all M {@code parents} merge any {@code equals()} -// ones. -// / -func combineCommonParents(parents []PredictionContext) { - uniqueParents := make(map[PredictionContext]PredictionContext) - - for p := 0; p < len(parents); p++ { - parent := parents[p] - if uniqueParents[parent] == nil { - uniqueParents[parent] = parent - } - } - for q := 0; q < len(parents); q++ { - parents[q] = uniqueParents[parents[q]] - } -} - -func getCachedBasePredictionContext(context PredictionContext, contextCache *PredictionContextCache, visited map[PredictionContext]PredictionContext) PredictionContext { - - if context.isEmpty() { - return context - } - existing := visited[context] - if existing != nil { - return existing - } - existing = contextCache.Get(context) - if existing != nil { - visited[context] = existing - return existing - } - changed := false - parents := make([]PredictionContext, context.length()) - for i := 0; i < len(parents); i++ { - parent := getCachedBasePredictionContext(context.GetParent(i), contextCache, visited) - if changed || parent != context.GetParent(i) { - if !changed { - parents = make([]PredictionContext, context.length()) - for j := 0; j < context.length(); j++ { - parents[j] = context.GetParent(j) - } - changed = true - } - parents[i] = parent - } - } - if !changed { - contextCache.add(context) - visited[context] = context - return context - } - var updated PredictionContext - if len(parents) == 0 { - updated = BasePredictionContextEMPTY - } else if len(parents) == 1 { - updated = SingletonBasePredictionContextCreate(parents[0], context.getReturnState(0)) - } else { - updated = NewArrayPredictionContext(parents, context.(*ArrayPredictionContext).GetReturnStates()) - } - contextCache.add(updated) - visited[updated] = updated - visited[context] = updated - - return updated -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/prediction_mode.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/prediction_mode.go deleted file mode 100644 index 7b9b72fab1e..00000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/prediction_mode.go +++ /dev/null @@ -1,529 +0,0 @@ -// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -// This enumeration defines the prediction modes available in ANTLR 4 along with -// utility methods for analyzing configuration sets for conflicts and/or -// ambiguities. - -const ( - // - // The SLL(*) prediction mode. This prediction mode ignores the current - // parser context when making predictions. This is the fastest prediction - // mode, and provides correct results for many grammars. This prediction - // mode is more powerful than the prediction mode provided by ANTLR 3, but - // may result in syntax errors for grammar and input combinations which are - // not SLL. - // - //

- // When using this prediction mode, the parser will either return a correct - // parse tree (i.e. the same parse tree that would be returned with the - // {@link //LL} prediction mode), or it will Report a syntax error. If a - // syntax error is encountered when using the {@link //SLL} prediction mode, - // it may be due to either an actual syntax error in the input or indicate - // that the particular combination of grammar and input requires the more - // powerful {@link //LL} prediction abilities to complete successfully.

- // - //

- // This prediction mode does not provide any guarantees for prediction - // behavior for syntactically-incorrect inputs.

- // - PredictionModeSLL = 0 - // - // The LL(*) prediction mode. This prediction mode allows the current parser - // context to be used for resolving SLL conflicts that occur during - // prediction. This is the fastest prediction mode that guarantees correct - // parse results for all combinations of grammars with syntactically correct - // inputs. - // - //

- // When using this prediction mode, the parser will make correct decisions - // for all syntactically-correct grammar and input combinations. However, in - // cases where the grammar is truly ambiguous this prediction mode might not - // Report a precise answer for exactly which alternatives are - // ambiguous.

- // - //

- // This prediction mode does not provide any guarantees for prediction - // behavior for syntactically-incorrect inputs.

- // - PredictionModeLL = 1 - // - // The LL(*) prediction mode with exact ambiguity detection. In addition to - // the correctness guarantees provided by the {@link //LL} prediction mode, - // this prediction mode instructs the prediction algorithm to determine the - // complete and exact set of ambiguous alternatives for every ambiguous - // decision encountered while parsing. - // - //

- // This prediction mode may be used for diagnosing ambiguities during - // grammar development. Due to the performance overhead of calculating sets - // of ambiguous alternatives, this prediction mode should be avoided when - // the exact results are not necessary.

- // - //

- // This prediction mode does not provide any guarantees for prediction - // behavior for syntactically-incorrect inputs.

- // - PredictionModeLLExactAmbigDetection = 2 -) - -// Computes the SLL prediction termination condition. -// -//

-// This method computes the SLL prediction termination condition for both of -// the following cases.

-// -//
    -//
  • The usual SLL+LL fallback upon SLL conflict
  • -//
  • Pure SLL without LL fallback
  • -//
-// -//

COMBINED SLL+LL PARSING

-// -//

When LL-fallback is enabled upon SLL conflict, correct predictions are -// ensured regardless of how the termination condition is computed by this -// method. Due to the substantially higher cost of LL prediction, the -// prediction should only fall back to LL when the additional lookahead -// cannot lead to a unique SLL prediction.

-// -//

Assuming combined SLL+LL parsing, an SLL configuration set with only -// conflicting subsets should fall back to full LL, even if the -// configuration sets don't resolve to the same alternative (e.g. -// {@code {1,2}} and {@code {3,4}}. If there is at least one non-conflicting -// configuration, SLL could continue with the hopes that more lookahead will -// resolve via one of those non-conflicting configurations.

-// -//

Here's the prediction termination rule them: SLL (for SLL+LL parsing) -// stops when it sees only conflicting configuration subsets. In contrast, -// full LL keeps going when there is uncertainty.

-// -//

HEURISTIC

-// -//

As a heuristic, we stop prediction when we see any conflicting subset -// unless we see a state that only has one alternative associated with it. -// The single-alt-state thing lets prediction continue upon rules like -// (otherwise, it would admit defeat too soon):

-// -//

{@code [12|1|[], 6|2|[], 12|2|[]]. s : (ID | ID ID?) ” }

-// -//

When the ATN simulation reaches the state before {@code ”}, it has a -// DFA state that looks like: {@code [12|1|[], 6|2|[], 12|2|[]]}. Naturally -// {@code 12|1|[]} and {@code 12|2|[]} conflict, but we cannot stop -// processing this node because alternative to has another way to continue, -// via {@code [6|2|[]]}.

-// -//

It also let's us continue for this rule:

-// -//

{@code [1|1|[], 1|2|[], 8|3|[]] a : A | A | A B }

-// -//

After Matching input A, we reach the stop state for rule A, state 1. -// State 8 is the state right before B. Clearly alternatives 1 and 2 -// conflict and no amount of further lookahead will separate the two. -// However, alternative 3 will be able to continue and so we do not stop -// working on this state. In the previous example, we're concerned with -// states associated with the conflicting alternatives. Here alt 3 is not -// associated with the conflicting configs, but since we can continue -// looking for input reasonably, don't declare the state done.

-// -//

PURE SLL PARSING

-// -//

To handle pure SLL parsing, all we have to do is make sure that we -// combine stack contexts for configurations that differ only by semantic -// predicate. From there, we can do the usual SLL termination heuristic.

-// -//

PREDICATES IN SLL+LL PARSING

-// -//

SLL decisions don't evaluate predicates until after they reach DFA stop -// states because they need to create the DFA cache that works in all -// semantic situations. In contrast, full LL evaluates predicates collected -// during start state computation so it can ignore predicates thereafter. -// This means that SLL termination detection can totally ignore semantic -// predicates.

-// -//

Implementation-wise, {@link ATNConfigSet} combines stack contexts but not -// semantic predicate contexts so we might see two configurations like the -// following.

-// -//

{@code (s, 1, x, {}), (s, 1, x', {p})}

-// -//

Before testing these configurations against others, we have to merge -// {@code x} and {@code x'} (without modifying the existing configurations). -// For example, we test {@code (x+x')==x”} when looking for conflicts in -// the following configurations.

-// -//

{@code (s, 1, x, {}), (s, 1, x', {p}), (s, 2, x”, {})}

-// -//

If the configuration set has predicates (as indicated by -// {@link ATNConfigSet//hasSemanticContext}), this algorithm makes a copy of -// the configurations to strip out all of the predicates so that a standard -// {@link ATNConfigSet} will merge everything ignoring predicates.

-func PredictionModehasSLLConflictTerminatingPrediction(mode int, configs ATNConfigSet) bool { - // Configs in rule stop states indicate reaching the end of the decision - // rule (local context) or end of start rule (full context). If all - // configs meet this condition, then none of the configurations is able - // to Match additional input so we terminate prediction. - // - if PredictionModeallConfigsInRuleStopStates(configs) { - return true - } - // pure SLL mode parsing - if mode == PredictionModeSLL { - // Don't bother with combining configs from different semantic - // contexts if we can fail over to full LL costs more time - // since we'll often fail over anyway. - if configs.HasSemanticContext() { - // dup configs, tossing out semantic predicates - dup := NewBaseATNConfigSet(false) - for _, c := range configs.GetItems() { - - // NewBaseATNConfig({semanticContext:}, c) - c = NewBaseATNConfig2(c, SemanticContextNone) - dup.Add(c, nil) - } - configs = dup - } - // now we have combined contexts for configs with dissimilar preds - } - // pure SLL or combined SLL+LL mode parsing - altsets := PredictionModegetConflictingAltSubsets(configs) - return PredictionModehasConflictingAltSet(altsets) && !PredictionModehasStateAssociatedWithOneAlt(configs) -} - -// Checks if any configuration in {@code configs} is in a -// {@link RuleStopState}. Configurations meeting this condition have reached -// the end of the decision rule (local context) or end of start rule (full -// context). -// -// @param configs the configuration set to test -// @return {@code true} if any configuration in {@code configs} is in a -// {@link RuleStopState}, otherwise {@code false} -func PredictionModehasConfigInRuleStopState(configs ATNConfigSet) bool { - for _, c := range configs.GetItems() { - if _, ok := c.GetState().(*RuleStopState); ok { - return true - } - } - return false -} - -// Checks if all configurations in {@code configs} are in a -// {@link RuleStopState}. Configurations meeting this condition have reached -// the end of the decision rule (local context) or end of start rule (full -// context). -// -// @param configs the configuration set to test -// @return {@code true} if all configurations in {@code configs} are in a -// {@link RuleStopState}, otherwise {@code false} -func PredictionModeallConfigsInRuleStopStates(configs ATNConfigSet) bool { - - for _, c := range configs.GetItems() { - if _, ok := c.GetState().(*RuleStopState); !ok { - return false - } - } - return true -} - -// Full LL prediction termination. -// -//

Can we stop looking ahead during ATN simulation or is there some -// uncertainty as to which alternative we will ultimately pick, after -// consuming more input? Even if there are partial conflicts, we might know -// that everything is going to resolve to the same minimum alternative. That -// means we can stop since no more lookahead will change that fact. On the -// other hand, there might be multiple conflicts that resolve to different -// minimums. That means we need more look ahead to decide which of those -// alternatives we should predict.

-// -//

The basic idea is to split the set of configurations {@code C}, into -// conflicting subsets {@code (s, _, ctx, _)} and singleton subsets with -// non-conflicting configurations. Two configurations conflict if they have -// identical {@link ATNConfig//state} and {@link ATNConfig//context} values -// but different {@link ATNConfig//alt} value, e.g. {@code (s, i, ctx, _)} -// and {@code (s, j, ctx, _)} for {@code i!=j}.

-// -//

Reduce these configuration subsets to the set of possible alternatives. -// You can compute the alternative subsets in one pass as follows:

-// -//

{@code A_s,ctx = {i | (s, i, ctx, _)}} for each configuration in -// {@code C} holding {@code s} and {@code ctx} fixed.

-// -//

Or in pseudo-code, for each configuration {@code c} in {@code C}:

-// -//
-// map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not
-// alt and not pred
-// 
-// -//

The values in {@code map} are the set of {@code A_s,ctx} sets.

-// -//

If {@code |A_s,ctx|=1} then there is no conflict associated with -// {@code s} and {@code ctx}.

-// -//

Reduce the subsets to singletons by choosing a minimum of each subset. If -// the union of these alternative subsets is a singleton, then no amount of -// more lookahead will help us. We will always pick that alternative. If, -// however, there is more than one alternative, then we are uncertain which -// alternative to predict and must continue looking for resolution. We may -// or may not discover an ambiguity in the future, even if there are no -// conflicting subsets this round.

-// -//

The biggest sin is to terminate early because it means we've made a -// decision but were uncertain as to the eventual outcome. We haven't used -// enough lookahead. On the other hand, announcing a conflict too late is no -// big deal you will still have the conflict. It's just inefficient. It -// might even look until the end of file.

-// -//

No special consideration for semantic predicates is required because -// predicates are evaluated on-the-fly for full LL prediction, ensuring that -// no configuration contains a semantic context during the termination -// check.

-// -//

CONFLICTING CONFIGS

-// -//

Two configurations {@code (s, i, x)} and {@code (s, j, x')}, conflict -// when {@code i!=j} but {@code x=x'}. Because we merge all -// {@code (s, i, _)} configurations together, that means that there are at -// most {@code n} configurations associated with state {@code s} for -// {@code n} possible alternatives in the decision. The merged stacks -// complicate the comparison of configuration contexts {@code x} and -// {@code x'}. Sam checks to see if one is a subset of the other by calling -// merge and checking to see if the merged result is either {@code x} or -// {@code x'}. If the {@code x} associated with lowest alternative {@code i} -// is the superset, then {@code i} is the only possible prediction since the -// others resolve to {@code min(i)} as well. However, if {@code x} is -// associated with {@code j>i} then at least one stack configuration for -// {@code j} is not in conflict with alternative {@code i}. The algorithm -// should keep going, looking for more lookahead due to the uncertainty.

-// -//

For simplicity, I'm doing a equality check between {@code x} and -// {@code x'} that lets the algorithm continue to consume lookahead longer -// than necessary. The reason I like the equality is of course the -// simplicity but also because that is the test you need to detect the -// alternatives that are actually in conflict.

-// -//

CONTINUE/STOP RULE

-// -//

Continue if union of resolved alternative sets from non-conflicting and -// conflicting alternative subsets has more than one alternative. We are -// uncertain about which alternative to predict.

-// -//

The complete set of alternatives, {@code [i for (_,i,_)]}, tells us which -// alternatives are still in the running for the amount of input we've -// consumed at this point. The conflicting sets let us to strip away -// configurations that won't lead to more states because we resolve -// conflicts to the configuration with a minimum alternate for the -// conflicting set.

-// -//

CASES

-// -//
    -// -//
  • no conflicts and more than 1 alternative in set => continue
  • -// -//
  • {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s, 3, z)}, -// {@code (s', 1, y)}, {@code (s', 2, y)} yields non-conflicting set -// {@code {3}} U conflicting sets {@code min({1,2})} U {@code min({1,2})} = -// {@code {1,3}} => continue -//
  • -// -//
  • {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 1, y)}, -// {@code (s', 2, y)}, {@code (s”, 1, z)} yields non-conflicting set -// {@code {1}} U conflicting sets {@code min({1,2})} U {@code min({1,2})} = -// {@code {1}} => stop and predict 1
  • -// -//
  • {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 1, y)}, -// {@code (s', 2, y)} yields conflicting, reduced sets {@code {1}} U -// {@code {1}} = {@code {1}} => stop and predict 1, can announce -// ambiguity {@code {1,2}}
  • -// -//
  • {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 2, y)}, -// {@code (s', 3, y)} yields conflicting, reduced sets {@code {1}} U -// {@code {2}} = {@code {1,2}} => continue
  • -// -//
  • {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 3, y)}, -// {@code (s', 4, y)} yields conflicting, reduced sets {@code {1}} U -// {@code {3}} = {@code {1,3}} => continue
  • -// -//
-// -//

EXACT AMBIGUITY DETECTION

-// -//

If all states Report the same conflicting set of alternatives, then we -// know we have the exact ambiguity set.

-// -//

|A_i|>1 and -// A_i = A_j for all i, j.

-// -//

In other words, we continue examining lookahead until all {@code A_i} -// have more than one alternative and all {@code A_i} are the same. If -// {@code A={{1,2}, {1,3}}}, then regular LL prediction would terminate -// because the resolved set is {@code {1}}. To determine what the real -// ambiguity is, we have to know whether the ambiguity is between one and -// two or one and three so we keep going. We can only stop prediction when -// we need exact ambiguity detection when the sets look like -// {@code A={{1,2}}} or {@code {{1,2},{1,2}}}, etc...

-func PredictionModeresolvesToJustOneViableAlt(altsets []*BitSet) int { - return PredictionModegetSingleViableAlt(altsets) -} - -// Determines if every alternative subset in {@code altsets} contains more -// than one alternative. -// -// @param altsets a collection of alternative subsets -// @return {@code true} if every {@link BitSet} in {@code altsets} has -// {@link BitSet//cardinality cardinality} > 1, otherwise {@code false} -func PredictionModeallSubsetsConflict(altsets []*BitSet) bool { - return !PredictionModehasNonConflictingAltSet(altsets) -} - -// Determines if any single alternative subset in {@code altsets} contains -// exactly one alternative. -// -// @param altsets a collection of alternative subsets -// @return {@code true} if {@code altsets} contains a {@link BitSet} with -// {@link BitSet//cardinality cardinality} 1, otherwise {@code false} -func PredictionModehasNonConflictingAltSet(altsets []*BitSet) bool { - for i := 0; i < len(altsets); i++ { - alts := altsets[i] - if alts.length() == 1 { - return true - } - } - return false -} - -// Determines if any single alternative subset in {@code altsets} contains -// more than one alternative. -// -// @param altsets a collection of alternative subsets -// @return {@code true} if {@code altsets} contains a {@link BitSet} with -// {@link BitSet//cardinality cardinality} > 1, otherwise {@code false} -func PredictionModehasConflictingAltSet(altsets []*BitSet) bool { - for i := 0; i < len(altsets); i++ { - alts := altsets[i] - if alts.length() > 1 { - return true - } - } - return false -} - -// Determines if every alternative subset in {@code altsets} is equivalent. -// -// @param altsets a collection of alternative subsets -// @return {@code true} if every member of {@code altsets} is equal to the -// others, otherwise {@code false} -func PredictionModeallSubsetsEqual(altsets []*BitSet) bool { - var first *BitSet - - for i := 0; i < len(altsets); i++ { - alts := altsets[i] - if first == nil { - first = alts - } else if alts != first { - return false - } - } - - return true -} - -// Returns the unique alternative predicted by all alternative subsets in -// {@code altsets}. If no such alternative exists, this method returns -// {@link ATN//INVALID_ALT_NUMBER}. -// -// @param altsets a collection of alternative subsets -func PredictionModegetUniqueAlt(altsets []*BitSet) int { - all := PredictionModeGetAlts(altsets) - if all.length() == 1 { - return all.minValue() - } - - return ATNInvalidAltNumber -} - -// Gets the complete set of represented alternatives for a collection of -// alternative subsets. This method returns the union of each {@link BitSet} -// in {@code altsets}. -// -// @param altsets a collection of alternative subsets -// @return the set of represented alternatives in {@code altsets} -func PredictionModeGetAlts(altsets []*BitSet) *BitSet { - all := NewBitSet() - for _, alts := range altsets { - all.or(alts) - } - return all -} - -// PredictionModegetConflictingAltSubsets gets the conflicting alt subsets from a configuration set. -// For each configuration {@code c} in {@code configs}: -// -//
-// map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not
-// alt and not pred
-// 
-func PredictionModegetConflictingAltSubsets(configs ATNConfigSet) []*BitSet { - configToAlts := NewJMap[ATNConfig, *BitSet, *ATNAltConfigComparator[ATNConfig]](atnAltCfgEqInst) - - for _, c := range configs.GetItems() { - - alts, ok := configToAlts.Get(c) - if !ok { - alts = NewBitSet() - configToAlts.Put(c, alts) - } - alts.add(c.GetAlt()) - } - - return configToAlts.Values() -} - -// PredictionModeGetStateToAltMap gets a map from state to alt subset from a configuration set. For each -// configuration {@code c} in {@code configs}: -// -//
-// map[c.{@link ATNConfig//state state}] U= c.{@link ATNConfig//alt alt}
-// 
-func PredictionModeGetStateToAltMap(configs ATNConfigSet) *AltDict { - m := NewAltDict() - - for _, c := range configs.GetItems() { - alts := m.Get(c.GetState().String()) - if alts == nil { - alts = NewBitSet() - m.put(c.GetState().String(), alts) - } - alts.(*BitSet).add(c.GetAlt()) - } - return m -} - -func PredictionModehasStateAssociatedWithOneAlt(configs ATNConfigSet) bool { - values := PredictionModeGetStateToAltMap(configs).values() - for i := 0; i < len(values); i++ { - if values[i].(*BitSet).length() == 1 { - return true - } - } - return false -} - -func PredictionModegetSingleViableAlt(altsets []*BitSet) int { - result := ATNInvalidAltNumber - - for i := 0; i < len(altsets); i++ { - alts := altsets[i] - minAlt := alts.minValue() - if result == ATNInvalidAltNumber { - result = minAlt - } else if result != minAlt { // more than 1 viable alt - return ATNInvalidAltNumber - } - } - return result -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/rule_context.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/rule_context.go deleted file mode 100644 index 210699ba234..00000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/rule_context.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -// A rule context is a record of a single rule invocation. It knows -// which context invoked it, if any. If there is no parent context, then -// naturally the invoking state is not valid. The parent link -// provides a chain upwards from the current rule invocation to the root -// of the invocation tree, forming a stack. We actually carry no -// information about the rule associated with b context (except -// when parsing). We keep only the state number of the invoking state from -// the ATN submachine that invoked b. Contrast b with the s -// pointer inside ParserRuleContext that tracks the current state -// being "executed" for the current rule. -// -// The parent contexts are useful for computing lookahead sets and -// getting error information. -// -// These objects are used during parsing and prediction. -// For the special case of parsers, we use the subclass -// ParserRuleContext. -// -// @see ParserRuleContext -// - -type RuleContext interface { - RuleNode - - GetInvokingState() int - SetInvokingState(int) - - GetRuleIndex() int - IsEmpty() bool - - GetAltNumber() int - SetAltNumber(altNumber int) - - String([]string, RuleContext) string -} - -type BaseRuleContext struct { - parentCtx RuleContext - invokingState int - RuleIndex int -} - -func NewBaseRuleContext(parent RuleContext, invokingState int) *BaseRuleContext { - - rn := new(BaseRuleContext) - - // What context invoked b rule? - rn.parentCtx = parent - - // What state invoked the rule associated with b context? - // The "return address" is the followState of invokingState - // If parent is nil, b should be -1. - if parent == nil { - rn.invokingState = -1 - } else { - rn.invokingState = invokingState - } - - return rn -} - -func (b *BaseRuleContext) GetBaseRuleContext() *BaseRuleContext { - return b -} - -func (b *BaseRuleContext) SetParent(v Tree) { - if v == nil { - b.parentCtx = nil - } else { - b.parentCtx = v.(RuleContext) - } -} - -func (b *BaseRuleContext) GetInvokingState() int { - return b.invokingState -} - -func (b *BaseRuleContext) SetInvokingState(t int) { - b.invokingState = t -} - -func (b *BaseRuleContext) GetRuleIndex() int { - return b.RuleIndex -} - -func (b *BaseRuleContext) GetAltNumber() int { - return ATNInvalidAltNumber -} - -func (b *BaseRuleContext) SetAltNumber(altNumber int) {} - -// A context is empty if there is no invoking state meaning nobody call -// current context. -func (b *BaseRuleContext) IsEmpty() bool { - return b.invokingState == -1 -} - -// Return the combined text of all child nodes. This method only considers -// tokens which have been added to the parse tree. -//

-// Since tokens on hidden channels (e.g. whitespace or comments) are not -// added to the parse trees, they will not appear in the output of b -// method. -// - -func (b *BaseRuleContext) GetParent() Tree { - return b.parentCtx -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/utils_set.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/utils_set.go deleted file mode 100644 index c9bd6751e3a..00000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/utils_set.go +++ /dev/null @@ -1,235 +0,0 @@ -package antlr - -import "math" - -const ( - _initalCapacity = 16 - _initalBucketCapacity = 8 - _loadFactor = 0.75 -) - -type Set interface { - Add(value interface{}) (added interface{}) - Len() int - Get(value interface{}) (found interface{}) - Contains(value interface{}) bool - Values() []interface{} - Each(f func(interface{}) bool) -} - -type array2DHashSet struct { - buckets [][]Collectable[any] - hashcodeFunction func(interface{}) int - equalsFunction func(Collectable[any], Collectable[any]) bool - - n int // How many elements in set - threshold int // when to expand - - currentPrime int // jump by 4 primes each expand or whatever - initialBucketCapacity int -} - -func (as *array2DHashSet) Each(f func(interface{}) bool) { - if as.Len() < 1 { - return - } - - for _, bucket := range as.buckets { - for _, o := range bucket { - if o == nil { - break - } - if !f(o) { - return - } - } - } -} - -func (as *array2DHashSet) Values() []interface{} { - if as.Len() < 1 { - return nil - } - - values := make([]interface{}, 0, as.Len()) - as.Each(func(i interface{}) bool { - values = append(values, i) - return true - }) - return values -} - -func (as *array2DHashSet) Contains(value Collectable[any]) bool { - return as.Get(value) != nil -} - -func (as *array2DHashSet) Add(value Collectable[any]) interface{} { - if as.n > as.threshold { - as.expand() - } - return as.innerAdd(value) -} - -func (as *array2DHashSet) expand() { - old := as.buckets - - as.currentPrime += 4 - - var ( - newCapacity = len(as.buckets) << 1 - newTable = as.createBuckets(newCapacity) - newBucketLengths = make([]int, len(newTable)) - ) - - as.buckets = newTable - as.threshold = int(float64(newCapacity) * _loadFactor) - - for _, bucket := range old { - if bucket == nil { - continue - } - - for _, o := range bucket { - if o == nil { - break - } - - b := as.getBuckets(o) - bucketLength := newBucketLengths[b] - var newBucket []Collectable[any] - if bucketLength == 0 { - // new bucket - newBucket = as.createBucket(as.initialBucketCapacity) - newTable[b] = newBucket - } else { - newBucket = newTable[b] - if bucketLength == len(newBucket) { - // expand - newBucketCopy := make([]Collectable[any], len(newBucket)<<1) - copy(newBucketCopy[:bucketLength], newBucket) - newBucket = newBucketCopy - newTable[b] = newBucket - } - } - - newBucket[bucketLength] = o - newBucketLengths[b]++ - } - } -} - -func (as *array2DHashSet) Len() int { - return as.n -} - -func (as *array2DHashSet) Get(o Collectable[any]) interface{} { - if o == nil { - return nil - } - - b := as.getBuckets(o) - bucket := as.buckets[b] - if bucket == nil { // no bucket - return nil - } - - for _, e := range bucket { - if e == nil { - return nil // empty slot; not there - } - if as.equalsFunction(e, o) { - return e - } - } - - return nil -} - -func (as *array2DHashSet) innerAdd(o Collectable[any]) interface{} { - b := as.getBuckets(o) - - bucket := as.buckets[b] - - // new bucket - if bucket == nil { - bucket = as.createBucket(as.initialBucketCapacity) - bucket[0] = o - - as.buckets[b] = bucket - as.n++ - return o - } - - // look for it in bucket - for i := 0; i < len(bucket); i++ { - existing := bucket[i] - if existing == nil { // empty slot; not there, add. - bucket[i] = o - as.n++ - return o - } - - if as.equalsFunction(existing, o) { // found existing, quit - return existing - } - } - - // full bucket, expand and add to end - oldLength := len(bucket) - bucketCopy := make([]Collectable[any], oldLength<<1) - copy(bucketCopy[:oldLength], bucket) - bucket = bucketCopy - as.buckets[b] = bucket - bucket[oldLength] = o - as.n++ - return o -} - -func (as *array2DHashSet) getBuckets(value Collectable[any]) int { - hash := as.hashcodeFunction(value) - return hash & (len(as.buckets) - 1) -} - -func (as *array2DHashSet) createBuckets(cap int) [][]Collectable[any] { - return make([][]Collectable[any], cap) -} - -func (as *array2DHashSet) createBucket(cap int) []Collectable[any] { - return make([]Collectable[any], cap) -} - -func newArray2DHashSetWithCap( - hashcodeFunction func(interface{}) int, - equalsFunction func(Collectable[any], Collectable[any]) bool, - initCap int, - initBucketCap int, -) *array2DHashSet { - if hashcodeFunction == nil { - hashcodeFunction = standardHashFunction - } - - if equalsFunction == nil { - equalsFunction = standardEqualsFunction - } - - ret := &array2DHashSet{ - hashcodeFunction: hashcodeFunction, - equalsFunction: equalsFunction, - - n: 0, - threshold: int(math.Floor(_initalCapacity * _loadFactor)), - - currentPrime: 1, - initialBucketCapacity: initBucketCap, - } - - ret.buckets = ret.createBuckets(initCap) - return ret -} - -func newArray2DHashSet( - hashcodeFunction func(interface{}) int, - equalsFunction func(Collectable[any], Collectable[any]) bool, -) *array2DHashSet { - return newArray2DHashSetWithCap(hashcodeFunction, equalsFunction, _initalCapacity, _initalBucketCapacity) -} diff --git a/vendor/github.com/antlr4-go/antlr/v4/.gitignore b/vendor/github.com/antlr4-go/antlr/v4/.gitignore new file mode 100644 index 00000000000..38ea34ff513 --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/.gitignore @@ -0,0 +1,18 @@ +### Go template + +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + + +# Go workspace file +go.work + +# No Goland stuff in this repo +.idea diff --git a/vendor/github.com/antlr4-go/antlr/v4/LICENSE b/vendor/github.com/antlr4-go/antlr/v4/LICENSE new file mode 100644 index 00000000000..a22292eb5ae --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012-2023 The ANTLR Project. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. 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. + +3. Neither name of copyright holders 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 REGENTS 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/antlr4-go/antlr/v4/README.md b/vendor/github.com/antlr4-go/antlr/v4/README.md new file mode 100644 index 00000000000..03e5b83eb1b --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/README.md @@ -0,0 +1,54 @@ +[![Go Report Card](https://goreportcard.com/badge/github.com/antlr4-go/antlr?style=flat-square)](https://goreportcard.com/report/github.com/antlr4-go/antlr) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/github.com/antlr4-go/antlr)](https://pkg.go.dev/github.com/antlr4-go/antlr) +[![Release](https://img.shields.io/github/v/release/antlr4-go/antlr?sort=semver&style=flat-square)](https://github.com/antlr4-go/antlr/releases/latest) +[![Release](https://img.shields.io/github/go-mod/go-version/antlr4-go/antlr?style=flat-square)](https://github.com/antlr4-go/antlr/releases/latest) +[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg?style=flat-square)](https://github.com/antlr4-go/antlr/commit-activity) +[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) +[![GitHub stars](https://img.shields.io/github/stars/antlr4-go/antlr?style=flat-square&label=Star&maxAge=2592000)](https://GitHub.com/Naereen/StrapDown.js/stargazers/) +# ANTLR4 Go Runtime Module Repo + +IMPORTANT: Please submit PRs via a clone of the https://github.com/antlr/antlr4 repo, and not here. + + - Do not submit PRs or any change requests to this repo + - This repo is read only and is updated by the ANTLR team to create a new release of the Go Runtime for ANTLR + - This repo contains the Go runtime that your generated projects should import + +## Introduction + +This repo contains the official modules for the Go Runtime for ANTLR. It is a copy of the runtime maintained +at: https://github.com/antlr/antlr4/tree/master/runtime/Go/antlr and is automatically updated by the ANTLR team to create +the official Go runtime release only. No development work is carried out in this repo and PRs are not accepted here. + +The dev branch of this repo is kept in sync with the dev branch of the main ANTLR repo and is updated periodically. + +### Why? + +The `go get` command is unable to retrieve the Go runtime when it is embedded so +deeply in the main repo. A `go get` against the `antlr/antlr4` repo, while retrieving the correct source code for the runtime, +does not correctly resolve tags and will create a reference in your `go.mod` file that is unclear, will not upgrade smoothly and +causes confusion. + +For instance, the current Go runtime release, which is tagged with v4.13.0 in `antlr/antlr4` is retrieved by go get as: + +```sh +require ( + github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230219212500-1f9a474cc2dc +) +``` + +Where you would expect to see: + +```sh +require ( + github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.13.0 +) +``` + +The decision was taken to create a separate org in a separate repo to hold the official Go runtime for ANTLR and +from whence users can expect `go get` to behave as expected. + + +# Documentation +Please read the official documentation at: https://github.com/antlr/antlr4/blob/master/doc/index.md for tips on +migrating existing projects to use the new module location and for information on how to use the Go runtime in +general. diff --git a/vendor/github.com/antlr4-go/antlr/v4/antlrdoc.go b/vendor/github.com/antlr4-go/antlr/v4/antlrdoc.go new file mode 100644 index 00000000000..3bb4fd7c4e0 --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/antlrdoc.go @@ -0,0 +1,102 @@ +/* +Package antlr implements the Go version of the ANTLR 4 runtime. + +# The ANTLR Tool + +ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, +or translating structured text or binary files. It's widely used to build languages, tools, and frameworks. +From a grammar, ANTLR generates a parser that can build parse trees and also generates a listener interface +(or visitor) that makes it easy to respond to the recognition of phrases of interest. + +# Go Runtime + +At version 4.11.x and prior, the Go runtime was not properly versioned for go modules. After this point, the runtime +source code to be imported was held in the `runtime/Go/antlr/v4` directory, and the go.mod file was updated to reflect the version of +ANTLR4 that it is compatible with (I.E. uses the /v4 path). + +However, this was found to be problematic, as it meant that with the runtime embedded so far underneath the root +of the repo, the `go get` and related commands could not properly resolve the location of the go runtime source code. +This meant that the reference to the runtime in your `go.mod` file would refer to the correct source code, but would not +list the release tag such as @4.12.0 - this was confusing, to say the least. + +As of 4.12.1, the runtime is now available as a go module in its own repo, and can be imported as `github.com/antlr4-go/antlr` +(the go get command should also be used with this path). See the main documentation for the ANTLR4 project for more information, +which is available at [ANTLR docs]. The documentation for using the Go runtime is available at [Go runtime docs]. + +This means that if you are using the source code without modules, you should also use the source code in the [new repo]. +Though we highly recommend that you use go modules, as they are now idiomatic for Go. + +I am aware that this change will prove Hyrum's Law, but am prepared to live with it for the common good. + +Go runtime author: [Jim Idle] jimi@idle.ws + +# Code Generation + +ANTLR supports the generation of code in a number of [target languages], and the generated code is supported by a +runtime library, written specifically to support the generated code in the target language. This library is the +runtime for the Go target. + +To generate code for the go target, it is generally recommended to place the source grammar files in a package of +their own, and use the `.sh` script method of generating code, using the go generate directive. In that same directory +it is usual, though not required, to place the antlr tool that should be used to generate the code. That does mean +that the antlr tool JAR file will be checked in to your source code control though, so you are, of course, free to use any other +way of specifying the version of the ANTLR tool to use, such as aliasing in `.zshrc` or equivalent, or a profile in +your IDE, or configuration in your CI system. Checking in the jar does mean that it is easy to reproduce the build as +it was at any point in its history. + +Here is a general/recommended template for an ANTLR based recognizer in Go: + + . + ├── parser + │ ├── mygrammar.g4 + │ ├── antlr-4.12.1-complete.jar + │ ├── generate.go + │ └── generate.sh + ├── parsing - generated code goes here + │ └── error_listeners.go + ├── go.mod + ├── go.sum + ├── main.go + └── main_test.go + +Make sure that the package statement in your grammar file(s) reflects the go package the generated code will exist in. + +The generate.go file then looks like this: + + package parser + + //go:generate ./generate.sh + +And the generate.sh file will look similar to this: + + #!/bin/sh + + alias antlr4='java -Xmx500M -cp "./antlr4-4.12.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool' + antlr4 -Dlanguage=Go -no-visitor -package parsing *.g4 + +depending on whether you want visitors or listeners or any other ANTLR options. Not that another option here +is to generate the code into a + +From the command line at the root of your source package (location of go.mo)d) you can then simply issue the command: + + go generate ./... + +Which will generate the code for the parser, and place it in the parsing package. You can then use the generated code +by importing the parsing package. + +There are no hard and fast rules on this. It is just a recommendation. You can generate the code in any way and to anywhere you like. + +# Copyright Notice + +Copyright (c) 2012-2023 The ANTLR Project. All rights reserved. + +Use of this file is governed by the BSD 3-clause license, which can be found in the [LICENSE.txt] file in the project root. + +[target languages]: https://github.com/antlr/antlr4/tree/master/runtime +[LICENSE.txt]: https://github.com/antlr/antlr4/blob/master/LICENSE.txt +[ANTLR docs]: https://github.com/antlr/antlr4/blob/master/doc/index.md +[new repo]: https://github.com/antlr4-go/antlr +[Jim Idle]: https://github.com/jimidle +[Go runtime docs]: https://github.com/antlr/antlr4/blob/master/doc/go-target.md +*/ +package antlr diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn.go b/vendor/github.com/antlr4-go/antlr/v4/atn.go similarity index 94% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn.go rename to vendor/github.com/antlr4-go/antlr/v4/atn.go index 98010d2e6e6..cdeefed2478 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn.go +++ b/vendor/github.com/antlr4-go/antlr/v4/atn.go @@ -20,10 +20,11 @@ var ATNInvalidAltNumber int // [ALL(*)]: https://www.antlr.org/papers/allstar-techreport.pdf // [Recursive Transition Network]: https://en.wikipedia.org/wiki/Recursive_transition_network type ATN struct { - // DecisionToState is the decision points for all rules, subrules, optional - // blocks, ()+, ()*, etc. Each subrule/rule is a decision point, and we must track them so we + + // DecisionToState is the decision points for all rules, sub-rules, optional + // blocks, ()+, ()*, etc. Each sub-rule/rule is a decision point, and we must track them, so we // can go back later and build DFA predictors for them. This includes - // all the rules, subrules, optional blocks, ()+, ()* etc... + // all the rules, sub-rules, optional blocks, ()+, ()* etc... DecisionToState []DecisionState // grammarType is the ATN type and is used for deserializing ATNs from strings. @@ -51,6 +52,8 @@ type ATN struct { // specified, and otherwise is nil. ruleToTokenType []int + // ATNStates is a list of all states in the ATN, ordered by state number. + // states []ATNState mu sync.Mutex diff --git a/vendor/github.com/antlr4-go/antlr/v4/atn_config.go b/vendor/github.com/antlr4-go/antlr/v4/atn_config.go new file mode 100644 index 00000000000..a83f25d3492 --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/atn_config.go @@ -0,0 +1,335 @@ +// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. +// Use of this file is governed by the BSD 3-clause license that +// can be found in the LICENSE.txt file in the project root. + +package antlr + +import ( + "fmt" +) + +const ( + lexerConfig = iota // Indicates that this ATNConfig is for a lexer + parserConfig // Indicates that this ATNConfig is for a parser +) + +// ATNConfig is a tuple: (ATN state, predicted alt, syntactic, semantic +// context). The syntactic context is a graph-structured stack node whose +// path(s) to the root is the rule invocation(s) chain used to arrive in the +// state. The semantic context is the tree of semantic predicates encountered +// before reaching an ATN state. +type ATNConfig struct { + precedenceFilterSuppressed bool + state ATNState + alt int + context *PredictionContext + semanticContext SemanticContext + reachesIntoOuterContext int + cType int // lexerConfig or parserConfig + lexerActionExecutor *LexerActionExecutor + passedThroughNonGreedyDecision bool +} + +// NewATNConfig6 creates a new ATNConfig instance given a state, alt and context only +func NewATNConfig6(state ATNState, alt int, context *PredictionContext) *ATNConfig { + return NewATNConfig5(state, alt, context, SemanticContextNone) +} + +// NewATNConfig5 creates a new ATNConfig instance given a state, alt, context and semantic context +func NewATNConfig5(state ATNState, alt int, context *PredictionContext, semanticContext SemanticContext) *ATNConfig { + if semanticContext == nil { + panic("semanticContext cannot be nil") // TODO: Necessary? + } + + pac := &ATNConfig{} + pac.state = state + pac.alt = alt + pac.context = context + pac.semanticContext = semanticContext + pac.cType = parserConfig + return pac +} + +// NewATNConfig4 creates a new ATNConfig instance given an existing config, and a state only +func NewATNConfig4(c *ATNConfig, state ATNState) *ATNConfig { + return NewATNConfig(c, state, c.GetContext(), c.GetSemanticContext()) +} + +// NewATNConfig3 creates a new ATNConfig instance given an existing config, a state and a semantic context +func NewATNConfig3(c *ATNConfig, state ATNState, semanticContext SemanticContext) *ATNConfig { + return NewATNConfig(c, state, c.GetContext(), semanticContext) +} + +// NewATNConfig2 creates a new ATNConfig instance given an existing config, and a context only +func NewATNConfig2(c *ATNConfig, semanticContext SemanticContext) *ATNConfig { + return NewATNConfig(c, c.GetState(), c.GetContext(), semanticContext) +} + +// NewATNConfig1 creates a new ATNConfig instance given an existing config, a state, and a context only +func NewATNConfig1(c *ATNConfig, state ATNState, context *PredictionContext) *ATNConfig { + return NewATNConfig(c, state, context, c.GetSemanticContext()) +} + +// NewATNConfig creates a new ATNConfig instance given an existing config, a state, a context and a semantic context, other 'constructors' +// are just wrappers around this one. +func NewATNConfig(c *ATNConfig, state ATNState, context *PredictionContext, semanticContext SemanticContext) *ATNConfig { + if semanticContext == nil { + panic("semanticContext cannot be nil") // TODO: Remove this - probably put here for some bug that is now fixed + } + b := &ATNConfig{} + b.InitATNConfig(c, state, c.GetAlt(), context, semanticContext) + b.cType = parserConfig + return b +} + +func (a *ATNConfig) InitATNConfig(c *ATNConfig, state ATNState, alt int, context *PredictionContext, semanticContext SemanticContext) { + + a.state = state + a.alt = alt + a.context = context + a.semanticContext = semanticContext + a.reachesIntoOuterContext = c.GetReachesIntoOuterContext() + a.precedenceFilterSuppressed = c.getPrecedenceFilterSuppressed() +} + +func (a *ATNConfig) getPrecedenceFilterSuppressed() bool { + return a.precedenceFilterSuppressed +} + +func (a *ATNConfig) setPrecedenceFilterSuppressed(v bool) { + a.precedenceFilterSuppressed = v +} + +// GetState returns the ATN state associated with this configuration +func (a *ATNConfig) GetState() ATNState { + return a.state +} + +// GetAlt returns the alternative associated with this configuration +func (a *ATNConfig) GetAlt() int { + return a.alt +} + +// SetContext sets the rule invocation stack associated with this configuration +func (a *ATNConfig) SetContext(v *PredictionContext) { + a.context = v +} + +// GetContext returns the rule invocation stack associated with this configuration +func (a *ATNConfig) GetContext() *PredictionContext { + return a.context +} + +// GetSemanticContext returns the semantic context associated with this configuration +func (a *ATNConfig) GetSemanticContext() SemanticContext { + return a.semanticContext +} + +// GetReachesIntoOuterContext returns the count of references to an outer context from this configuration +func (a *ATNConfig) GetReachesIntoOuterContext() int { + return a.reachesIntoOuterContext +} + +// SetReachesIntoOuterContext sets the count of references to an outer context from this configuration +func (a *ATNConfig) SetReachesIntoOuterContext(v int) { + a.reachesIntoOuterContext = v +} + +// Equals is the default comparison function for an ATNConfig when no specialist implementation is required +// for a collection. +// +// An ATN configuration is equal to another if both have the same state, they +// predict the same alternative, and syntactic/semantic contexts are the same. +func (a *ATNConfig) Equals(o Collectable[*ATNConfig]) bool { + switch a.cType { + case lexerConfig: + return a.LEquals(o) + case parserConfig: + return a.PEquals(o) + default: + panic("Invalid ATNConfig type") + } +} + +// PEquals is the default comparison function for a Parser ATNConfig when no specialist implementation is required +// for a collection. +// +// An ATN configuration is equal to another if both have the same state, they +// predict the same alternative, and syntactic/semantic contexts are the same. +func (a *ATNConfig) PEquals(o Collectable[*ATNConfig]) bool { + var other, ok = o.(*ATNConfig) + + if !ok { + return false + } + if a == other { + return true + } else if other == nil { + return false + } + + var equal bool + + if a.context == nil { + equal = other.context == nil + } else { + equal = a.context.Equals(other.context) + } + + var ( + nums = a.state.GetStateNumber() == other.state.GetStateNumber() + alts = a.alt == other.alt + cons = a.semanticContext.Equals(other.semanticContext) + sups = a.precedenceFilterSuppressed == other.precedenceFilterSuppressed + ) + + return nums && alts && cons && sups && equal +} + +// Hash is the default hash function for a parser ATNConfig, when no specialist hash function +// is required for a collection +func (a *ATNConfig) Hash() int { + switch a.cType { + case lexerConfig: + return a.LHash() + case parserConfig: + return a.PHash() + default: + panic("Invalid ATNConfig type") + } +} + +// PHash is the default hash function for a parser ATNConfig, when no specialist hash function +// is required for a collection +func (a *ATNConfig) PHash() int { + var c int + if a.context != nil { + c = a.context.Hash() + } + + h := murmurInit(7) + h = murmurUpdate(h, a.state.GetStateNumber()) + h = murmurUpdate(h, a.alt) + h = murmurUpdate(h, c) + h = murmurUpdate(h, a.semanticContext.Hash()) + return murmurFinish(h, 4) +} + +// String returns a string representation of the ATNConfig, usually used for debugging purposes +func (a *ATNConfig) String() string { + var s1, s2, s3 string + + if a.context != nil { + s1 = ",[" + fmt.Sprint(a.context) + "]" + } + + if a.semanticContext != SemanticContextNone { + s2 = "," + fmt.Sprint(a.semanticContext) + } + + if a.reachesIntoOuterContext > 0 { + s3 = ",up=" + fmt.Sprint(a.reachesIntoOuterContext) + } + + return fmt.Sprintf("(%v,%v%v%v%v)", a.state, a.alt, s1, s2, s3) +} + +func NewLexerATNConfig6(state ATNState, alt int, context *PredictionContext) *ATNConfig { + lac := &ATNConfig{} + lac.state = state + lac.alt = alt + lac.context = context + lac.semanticContext = SemanticContextNone + lac.cType = lexerConfig + return lac +} + +func NewLexerATNConfig4(c *ATNConfig, state ATNState) *ATNConfig { + lac := &ATNConfig{} + lac.lexerActionExecutor = c.lexerActionExecutor + lac.passedThroughNonGreedyDecision = checkNonGreedyDecision(c, state) + lac.InitATNConfig(c, state, c.GetAlt(), c.GetContext(), c.GetSemanticContext()) + lac.cType = lexerConfig + return lac +} + +func NewLexerATNConfig3(c *ATNConfig, state ATNState, lexerActionExecutor *LexerActionExecutor) *ATNConfig { + lac := &ATNConfig{} + lac.lexerActionExecutor = lexerActionExecutor + lac.passedThroughNonGreedyDecision = checkNonGreedyDecision(c, state) + lac.InitATNConfig(c, state, c.GetAlt(), c.GetContext(), c.GetSemanticContext()) + lac.cType = lexerConfig + return lac +} + +func NewLexerATNConfig2(c *ATNConfig, state ATNState, context *PredictionContext) *ATNConfig { + lac := &ATNConfig{} + lac.lexerActionExecutor = c.lexerActionExecutor + lac.passedThroughNonGreedyDecision = checkNonGreedyDecision(c, state) + lac.InitATNConfig(c, state, c.GetAlt(), context, c.GetSemanticContext()) + lac.cType = lexerConfig + return lac +} + +//goland:noinspection GoUnusedExportedFunction +func NewLexerATNConfig1(state ATNState, alt int, context *PredictionContext) *ATNConfig { + lac := &ATNConfig{} + lac.state = state + lac.alt = alt + lac.context = context + lac.semanticContext = SemanticContextNone + lac.cType = lexerConfig + return lac +} + +// LHash is the default hash function for Lexer ATNConfig objects, it can be used directly or via +// the default comparator [ObjEqComparator]. +func (a *ATNConfig) LHash() int { + var f int + if a.passedThroughNonGreedyDecision { + f = 1 + } else { + f = 0 + } + h := murmurInit(7) + h = murmurUpdate(h, a.state.GetStateNumber()) + h = murmurUpdate(h, a.alt) + h = murmurUpdate(h, a.context.Hash()) + h = murmurUpdate(h, a.semanticContext.Hash()) + h = murmurUpdate(h, f) + h = murmurUpdate(h, a.lexerActionExecutor.Hash()) + h = murmurFinish(h, 6) + return h +} + +// LEquals is the default comparison function for Lexer ATNConfig objects, it can be used directly or via +// the default comparator [ObjEqComparator]. +func (a *ATNConfig) LEquals(other Collectable[*ATNConfig]) bool { + var otherT, ok = other.(*ATNConfig) + if !ok { + return false + } else if a == otherT { + return true + } else if a.passedThroughNonGreedyDecision != otherT.passedThroughNonGreedyDecision { + return false + } + + switch { + case a.lexerActionExecutor == nil && otherT.lexerActionExecutor == nil: + return true + case a.lexerActionExecutor != nil && otherT.lexerActionExecutor != nil: + if !a.lexerActionExecutor.Equals(otherT.lexerActionExecutor) { + return false + } + default: + return false // One but not both, are nil + } + + return a.PEquals(otherT) +} + +func checkNonGreedyDecision(source *ATNConfig, target ATNState) bool { + var ds, ok = target.(DecisionState) + + return source.passedThroughNonGreedyDecision || (ok && ds.getNonGreedy()) +} diff --git a/vendor/github.com/antlr4-go/antlr/v4/atn_config_set.go b/vendor/github.com/antlr4-go/antlr/v4/atn_config_set.go new file mode 100644 index 00000000000..52dbaf8064f --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/atn_config_set.go @@ -0,0 +1,301 @@ +// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. +// Use of this file is governed by the BSD 3-clause license that +// can be found in the LICENSE.txt file in the project root. + +package antlr + +import ( + "fmt" +) + +// ATNConfigSet is a specialized set of ATNConfig that tracks information +// about its elements and can combine similar configurations using a +// graph-structured stack. +type ATNConfigSet struct { + cachedHash int + + // configLookup is used to determine whether two ATNConfigSets are equal. We + // need all configurations with the same (s, i, _, semctx) to be equal. A key + // effectively doubles the number of objects associated with ATNConfigs. All + // keys are hashed by (s, i, _, pi), not including the context. Wiped out when + // read-only because a set becomes a DFA state. + configLookup *JStore[*ATNConfig, Comparator[*ATNConfig]] + + // configs is the added elements that did not match an existing key in configLookup + configs []*ATNConfig + + // TODO: These fields make me pretty uncomfortable, but it is nice to pack up + // info together because it saves re-computation. Can we track conflicts as they + // are added to save scanning configs later? + conflictingAlts *BitSet + + // dipsIntoOuterContext is used by parsers and lexers. In a lexer, it indicates + // we hit a pred while computing a closure operation. Do not make a DFA state + // from the ATNConfigSet in this case. TODO: How is this used by parsers? + dipsIntoOuterContext bool + + // fullCtx is whether it is part of a full context LL prediction. Used to + // determine how to merge $. It is a wildcard with SLL, but not for an LL + // context merge. + fullCtx bool + + // Used in parser and lexer. In lexer, it indicates we hit a pred + // while computing a closure operation. Don't make a DFA state from this set. + hasSemanticContext bool + + // readOnly is whether it is read-only. Do not + // allow any code to manipulate the set if true because DFA states will point at + // sets and those must not change. It not, protect other fields; conflictingAlts + // in particular, which is assigned after readOnly. + readOnly bool + + // TODO: These fields make me pretty uncomfortable, but it is nice to pack up + // info together because it saves re-computation. Can we track conflicts as they + // are added to save scanning configs later? + uniqueAlt int +} + +// Alts returns the combined set of alts for all the configurations in this set. +func (b *ATNConfigSet) Alts() *BitSet { + alts := NewBitSet() + for _, it := range b.configs { + alts.add(it.GetAlt()) + } + return alts +} + +// NewATNConfigSet creates a new ATNConfigSet instance. +func NewATNConfigSet(fullCtx bool) *ATNConfigSet { + return &ATNConfigSet{ + cachedHash: -1, + configLookup: NewJStore[*ATNConfig, Comparator[*ATNConfig]](aConfCompInst, ATNConfigLookupCollection, "NewATNConfigSet()"), + fullCtx: fullCtx, + } +} + +// Add merges contexts with existing configs for (s, i, pi, _), +// where 's' is the ATNConfig.state, 'i' is the ATNConfig.alt, and +// 'pi' is the [ATNConfig].semanticContext. +// +// We use (s,i,pi) as the key. +// Updates dipsIntoOuterContext and hasSemanticContext when necessary. +func (b *ATNConfigSet) Add(config *ATNConfig, mergeCache *JPCMap) bool { + if b.readOnly { + panic("set is read-only") + } + + if config.GetSemanticContext() != SemanticContextNone { + b.hasSemanticContext = true + } + + if config.GetReachesIntoOuterContext() > 0 { + b.dipsIntoOuterContext = true + } + + existing, present := b.configLookup.Put(config) + + // The config was not already in the set + // + if !present { + b.cachedHash = -1 + b.configs = append(b.configs, config) // Track order here + return true + } + + // Merge a previous (s, i, pi, _) with it and save the result + rootIsWildcard := !b.fullCtx + merged := merge(existing.GetContext(), config.GetContext(), rootIsWildcard, mergeCache) + + // No need to check for existing.context because config.context is in the cache, + // since the only way to create new graphs is the "call rule" and here. We cache + // at both places. + existing.SetReachesIntoOuterContext(intMax(existing.GetReachesIntoOuterContext(), config.GetReachesIntoOuterContext())) + + // Preserve the precedence filter suppression during the merge + if config.getPrecedenceFilterSuppressed() { + existing.setPrecedenceFilterSuppressed(true) + } + + // Replace the context because there is no need to do alt mapping + existing.SetContext(merged) + + return true +} + +// GetStates returns the set of states represented by all configurations in this config set +func (b *ATNConfigSet) GetStates() *JStore[ATNState, Comparator[ATNState]] { + + // states uses the standard comparator and Hash() provided by the ATNState instance + // + states := NewJStore[ATNState, Comparator[ATNState]](aStateEqInst, ATNStateCollection, "ATNConfigSet.GetStates()") + + for i := 0; i < len(b.configs); i++ { + states.Put(b.configs[i].GetState()) + } + + return states +} + +func (b *ATNConfigSet) GetPredicates() []SemanticContext { + predicates := make([]SemanticContext, 0) + + for i := 0; i < len(b.configs); i++ { + c := b.configs[i].GetSemanticContext() + + if c != SemanticContextNone { + predicates = append(predicates, c) + } + } + + return predicates +} + +func (b *ATNConfigSet) OptimizeConfigs(interpreter *BaseATNSimulator) { + if b.readOnly { + panic("set is read-only") + } + + // Empty indicate no optimization is possible + if b.configLookup == nil || b.configLookup.Len() == 0 { + return + } + + for i := 0; i < len(b.configs); i++ { + config := b.configs[i] + config.SetContext(interpreter.getCachedContext(config.GetContext())) + } +} + +func (b *ATNConfigSet) AddAll(coll []*ATNConfig) bool { + for i := 0; i < len(coll); i++ { + b.Add(coll[i], nil) + } + + return false +} + +// Compare The configs are only equal if they are in the same order and their Equals function returns true. +// Java uses ArrayList.equals(), which requires the same order. +func (b *ATNConfigSet) Compare(bs *ATNConfigSet) bool { + if len(b.configs) != len(bs.configs) { + return false + } + for i := 0; i < len(b.configs); i++ { + if !b.configs[i].Equals(bs.configs[i]) { + return false + } + } + + return true +} + +func (b *ATNConfigSet) Equals(other Collectable[ATNConfig]) bool { + if b == other { + return true + } else if _, ok := other.(*ATNConfigSet); !ok { + return false + } + + other2 := other.(*ATNConfigSet) + var eca bool + switch { + case b.conflictingAlts == nil && other2.conflictingAlts == nil: + eca = true + case b.conflictingAlts != nil && other2.conflictingAlts != nil: + eca = b.conflictingAlts.equals(other2.conflictingAlts) + } + return b.configs != nil && + b.fullCtx == other2.fullCtx && + b.uniqueAlt == other2.uniqueAlt && + eca && + b.hasSemanticContext == other2.hasSemanticContext && + b.dipsIntoOuterContext == other2.dipsIntoOuterContext && + b.Compare(other2) +} + +func (b *ATNConfigSet) Hash() int { + if b.readOnly { + if b.cachedHash == -1 { + b.cachedHash = b.hashCodeConfigs() + } + + return b.cachedHash + } + + return b.hashCodeConfigs() +} + +func (b *ATNConfigSet) hashCodeConfigs() int { + h := 1 + for _, config := range b.configs { + h = 31*h + config.Hash() + } + return h +} + +func (b *ATNConfigSet) Contains(item *ATNConfig) bool { + if b.readOnly { + panic("not implemented for read-only sets") + } + if b.configLookup == nil { + return false + } + return b.configLookup.Contains(item) +} + +func (b *ATNConfigSet) ContainsFast(item *ATNConfig) bool { + return b.Contains(item) +} + +func (b *ATNConfigSet) Clear() { + if b.readOnly { + panic("set is read-only") + } + b.configs = make([]*ATNConfig, 0) + b.cachedHash = -1 + b.configLookup = NewJStore[*ATNConfig, Comparator[*ATNConfig]](aConfCompInst, ATNConfigLookupCollection, "NewATNConfigSet()") +} + +func (b *ATNConfigSet) String() string { + + s := "[" + + for i, c := range b.configs { + s += c.String() + + if i != len(b.configs)-1 { + s += ", " + } + } + + s += "]" + + if b.hasSemanticContext { + s += ",hasSemanticContext=" + fmt.Sprint(b.hasSemanticContext) + } + + if b.uniqueAlt != ATNInvalidAltNumber { + s += ",uniqueAlt=" + fmt.Sprint(b.uniqueAlt) + } + + if b.conflictingAlts != nil { + s += ",conflictingAlts=" + b.conflictingAlts.String() + } + + if b.dipsIntoOuterContext { + s += ",dipsIntoOuterContext" + } + + return s +} + +// NewOrderedATNConfigSet creates a config set with a slightly different Hash/Equal pair +// for use in lexers. +func NewOrderedATNConfigSet() *ATNConfigSet { + return &ATNConfigSet{ + cachedHash: -1, + // This set uses the standard Hash() and Equals() from ATNConfig + configLookup: NewJStore[*ATNConfig, Comparator[*ATNConfig]](aConfEqInst, ATNConfigCollection, "ATNConfigSet.NewOrderedATNConfigSet()"), + fullCtx: false, + } +} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_deserialization_options.go b/vendor/github.com/antlr4-go/antlr/v4/atn_deserialization_options.go similarity index 86% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_deserialization_options.go rename to vendor/github.com/antlr4-go/antlr/v4/atn_deserialization_options.go index 3c975ec7bfd..bdb30b36229 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_deserialization_options.go +++ b/vendor/github.com/antlr4-go/antlr/v4/atn_deserialization_options.go @@ -20,7 +20,7 @@ func (opts *ATNDeserializationOptions) ReadOnly() bool { func (opts *ATNDeserializationOptions) SetReadOnly(readOnly bool) { if opts.readOnly { - panic(errors.New("Cannot mutate read only ATNDeserializationOptions")) + panic(errors.New("cannot mutate read only ATNDeserializationOptions")) } opts.readOnly = readOnly } @@ -31,7 +31,7 @@ func (opts *ATNDeserializationOptions) VerifyATN() bool { func (opts *ATNDeserializationOptions) SetVerifyATN(verifyATN bool) { if opts.readOnly { - panic(errors.New("Cannot mutate read only ATNDeserializationOptions")) + panic(errors.New("cannot mutate read only ATNDeserializationOptions")) } opts.verifyATN = verifyATN } @@ -42,11 +42,12 @@ func (opts *ATNDeserializationOptions) GenerateRuleBypassTransitions() bool { func (opts *ATNDeserializationOptions) SetGenerateRuleBypassTransitions(generateRuleBypassTransitions bool) { if opts.readOnly { - panic(errors.New("Cannot mutate read only ATNDeserializationOptions")) + panic(errors.New("cannot mutate read only ATNDeserializationOptions")) } opts.generateRuleBypassTransitions = generateRuleBypassTransitions } +//goland:noinspection GoUnusedExportedFunction func DefaultATNDeserializationOptions() *ATNDeserializationOptions { return NewATNDeserializationOptions(&defaultATNDeserializationOptions) } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_deserializer.go b/vendor/github.com/antlr4-go/antlr/v4/atn_deserializer.go similarity index 97% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_deserializer.go rename to vendor/github.com/antlr4-go/antlr/v4/atn_deserializer.go index 3888856b4b6..2dcb9ae11b6 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_deserializer.go +++ b/vendor/github.com/antlr4-go/antlr/v4/atn_deserializer.go @@ -35,6 +35,7 @@ func NewATNDeserializer(options *ATNDeserializationOptions) *ATNDeserializer { return &ATNDeserializer{options: options} } +//goland:noinspection GoUnusedFunction func stringInSlice(a string, list []string) int { for i, b := range list { if b == a { @@ -193,7 +194,7 @@ func (a *ATNDeserializer) readModes(atn *ATN) { } } -func (a *ATNDeserializer) readSets(atn *ATN, sets []*IntervalSet) []*IntervalSet { +func (a *ATNDeserializer) readSets(_ *ATN, sets []*IntervalSet) []*IntervalSet { m := a.readInt() // Preallocate the needed capacity. @@ -350,7 +351,7 @@ func (a *ATNDeserializer) generateRuleBypassTransition(atn *ATN, idx int) { bypassStart.endState = bypassStop - atn.defineDecisionState(bypassStart.BaseDecisionState) + atn.defineDecisionState(&bypassStart.BaseDecisionState) bypassStop.startState = bypassStart @@ -450,7 +451,7 @@ func (a *ATNDeserializer) markPrecedenceDecisions(atn *ATN) { continue } - // We analyze the ATN to determine if a ATN decision state is the + // We analyze the [ATN] to determine if an ATN decision state is the // decision for the closure block that determines whether a // precedence rule should continue or complete. if atn.ruleToStartState[state.GetRuleIndex()].isPrecedenceRule { @@ -553,7 +554,7 @@ func (a *ATNDeserializer) readInt() int { return int(v) // data is 32 bits but int is at least that big } -func (a *ATNDeserializer) edgeFactory(atn *ATN, typeIndex, src, trg, arg1, arg2, arg3 int, sets []*IntervalSet) Transition { +func (a *ATNDeserializer) edgeFactory(atn *ATN, typeIndex, _, trg, arg1, arg2, arg3 int, sets []*IntervalSet) Transition { target := atn.states[trg] switch typeIndex { diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_simulator.go b/vendor/github.com/antlr4-go/antlr/v4/atn_simulator.go similarity index 66% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_simulator.go rename to vendor/github.com/antlr4-go/antlr/v4/atn_simulator.go index 41529115fa6..afe6c9f809a 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_simulator.go +++ b/vendor/github.com/antlr4-go/antlr/v4/atn_simulator.go @@ -4,7 +4,7 @@ package antlr -var ATNSimulatorError = NewDFAState(0x7FFFFFFF, NewBaseATNConfigSet(false)) +var ATNSimulatorError = NewDFAState(0x7FFFFFFF, NewATNConfigSet(false)) type IATNSimulator interface { SharedContextCache() *PredictionContextCache @@ -18,22 +18,13 @@ type BaseATNSimulator struct { decisionToDFA []*DFA } -func NewBaseATNSimulator(atn *ATN, sharedContextCache *PredictionContextCache) *BaseATNSimulator { - b := new(BaseATNSimulator) - - b.atn = atn - b.sharedContextCache = sharedContextCache - - return b -} - -func (b *BaseATNSimulator) getCachedContext(context PredictionContext) PredictionContext { +func (b *BaseATNSimulator) getCachedContext(context *PredictionContext) *PredictionContext { if b.sharedContextCache == nil { return context } - visited := make(map[PredictionContext]PredictionContext) - + //visited := NewJMap[*PredictionContext, *PredictionContext, Comparator[*PredictionContext]](pContextEqInst, PredictionVisitedCollection, "Visit map in getCachedContext()") + visited := NewVisitRecord() return getCachedBasePredictionContext(context, b.sharedContextCache, visited) } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_state.go b/vendor/github.com/antlr4-go/antlr/v4/atn_state.go similarity index 65% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_state.go rename to vendor/github.com/antlr4-go/antlr/v4/atn_state.go index 1f2a56bc311..2ae5807cdb8 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_state.go +++ b/vendor/github.com/antlr4-go/antlr/v4/atn_state.go @@ -4,7 +4,11 @@ package antlr -import "strconv" +import ( + "fmt" + "os" + "strconv" +) // Constants for serialization. const ( @@ -25,6 +29,7 @@ const ( ATNStateInvalidStateNumber = -1 ) +//goland:noinspection GoUnusedGlobalVariable var ATNStateInitialNumTransitions = 4 type ATNState interface { @@ -73,7 +78,7 @@ type BaseATNState struct { transitions []Transition } -func NewBaseATNState() *BaseATNState { +func NewATNState() *BaseATNState { return &BaseATNState{stateNumber: ATNStateInvalidStateNumber, stateType: ATNStateInvalidType} } @@ -148,27 +153,46 @@ func (as *BaseATNState) AddTransition(trans Transition, index int) { if len(as.transitions) == 0 { as.epsilonOnlyTransitions = trans.getIsEpsilon() } else if as.epsilonOnlyTransitions != trans.getIsEpsilon() { + _, _ = fmt.Fprintf(os.Stdin, "ATN state %d has both epsilon and non-epsilon transitions.\n", as.stateNumber) as.epsilonOnlyTransitions = false } + // TODO: Check code for already present compared to the Java equivalent + //alreadyPresent := false + //for _, t := range as.transitions { + // if t.getTarget().GetStateNumber() == trans.getTarget().GetStateNumber() { + // if t.getLabel() != nil && trans.getLabel() != nil && trans.getLabel().Equals(t.getLabel()) { + // alreadyPresent = true + // break + // } + // } else if t.getIsEpsilon() && trans.getIsEpsilon() { + // alreadyPresent = true + // break + // } + //} + //if !alreadyPresent { if index == -1 { as.transitions = append(as.transitions, trans) } else { as.transitions = append(as.transitions[:index], append([]Transition{trans}, as.transitions[index:]...)...) // TODO: as.transitions.splice(index, 1, trans) } + //} else { + // _, _ = fmt.Fprintf(os.Stderr, "Transition already present in state %d\n", as.stateNumber) + //} } type BasicState struct { - *BaseATNState + BaseATNState } func NewBasicState() *BasicState { - b := NewBaseATNState() - - b.stateType = ATNStateBasic - - return &BasicState{BaseATNState: b} + return &BasicState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateBasic, + }, + } } type DecisionState interface { @@ -182,13 +206,19 @@ type DecisionState interface { } type BaseDecisionState struct { - *BaseATNState + BaseATNState decision int nonGreedy bool } func NewBaseDecisionState() *BaseDecisionState { - return &BaseDecisionState{BaseATNState: NewBaseATNState(), decision: -1} + return &BaseDecisionState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateBasic, + }, + decision: -1, + } } func (s *BaseDecisionState) getDecision() int { @@ -216,12 +246,20 @@ type BlockStartState interface { // BaseBlockStartState is the start of a regular (...) block. type BaseBlockStartState struct { - *BaseDecisionState + BaseDecisionState endState *BlockEndState } func NewBlockStartState() *BaseBlockStartState { - return &BaseBlockStartState{BaseDecisionState: NewBaseDecisionState()} + return &BaseBlockStartState{ + BaseDecisionState: BaseDecisionState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateBasic, + }, + decision: -1, + }, + } } func (s *BaseBlockStartState) getEndState() *BlockEndState { @@ -233,31 +271,38 @@ func (s *BaseBlockStartState) setEndState(b *BlockEndState) { } type BasicBlockStartState struct { - *BaseBlockStartState + BaseBlockStartState } func NewBasicBlockStartState() *BasicBlockStartState { - b := NewBlockStartState() - - b.stateType = ATNStateBlockStart - - return &BasicBlockStartState{BaseBlockStartState: b} + return &BasicBlockStartState{ + BaseBlockStartState: BaseBlockStartState{ + BaseDecisionState: BaseDecisionState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateBlockStart, + }, + }, + }, + } } var _ BlockStartState = &BasicBlockStartState{} // BlockEndState is a terminal node of a simple (a|b|c) block. type BlockEndState struct { - *BaseATNState + BaseATNState startState ATNState } func NewBlockEndState() *BlockEndState { - b := NewBaseATNState() - - b.stateType = ATNStateBlockEnd - - return &BlockEndState{BaseATNState: b} + return &BlockEndState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateBlockEnd, + }, + startState: nil, + } } // RuleStopState is the last node in the ATN for a rule, unless that rule is the @@ -265,43 +310,48 @@ func NewBlockEndState() *BlockEndState { // encode references to all calls to this rule to compute FOLLOW sets for error // handling. type RuleStopState struct { - *BaseATNState + BaseATNState } func NewRuleStopState() *RuleStopState { - b := NewBaseATNState() - - b.stateType = ATNStateRuleStop - - return &RuleStopState{BaseATNState: b} + return &RuleStopState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateRuleStop, + }, + } } type RuleStartState struct { - *BaseATNState + BaseATNState stopState ATNState isPrecedenceRule bool } func NewRuleStartState() *RuleStartState { - b := NewBaseATNState() - - b.stateType = ATNStateRuleStart - - return &RuleStartState{BaseATNState: b} + return &RuleStartState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateRuleStart, + }, + } } // PlusLoopbackState is a decision state for A+ and (A|B)+. It has two // transitions: one to the loop back to start of the block, and one to exit. type PlusLoopbackState struct { - *BaseDecisionState + BaseDecisionState } func NewPlusLoopbackState() *PlusLoopbackState { - b := NewBaseDecisionState() - - b.stateType = ATNStatePlusLoopBack - - return &PlusLoopbackState{BaseDecisionState: b} + return &PlusLoopbackState{ + BaseDecisionState: BaseDecisionState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStatePlusLoopBack, + }, + }, + } } // PlusBlockStartState is the start of a (A|B|...)+ loop. Technically it is a @@ -309,85 +359,103 @@ func NewPlusLoopbackState() *PlusLoopbackState { // it is included for completeness. In reality, PlusLoopbackState is the real // decision-making node for A+. type PlusBlockStartState struct { - *BaseBlockStartState + BaseBlockStartState loopBackState ATNState } func NewPlusBlockStartState() *PlusBlockStartState { - b := NewBlockStartState() - - b.stateType = ATNStatePlusBlockStart - - return &PlusBlockStartState{BaseBlockStartState: b} + return &PlusBlockStartState{ + BaseBlockStartState: BaseBlockStartState{ + BaseDecisionState: BaseDecisionState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStatePlusBlockStart, + }, + }, + }, + } } var _ BlockStartState = &PlusBlockStartState{} // StarBlockStartState is the block that begins a closure loop. type StarBlockStartState struct { - *BaseBlockStartState + BaseBlockStartState } func NewStarBlockStartState() *StarBlockStartState { - b := NewBlockStartState() - - b.stateType = ATNStateStarBlockStart - - return &StarBlockStartState{BaseBlockStartState: b} + return &StarBlockStartState{ + BaseBlockStartState: BaseBlockStartState{ + BaseDecisionState: BaseDecisionState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateStarBlockStart, + }, + }, + }, + } } var _ BlockStartState = &StarBlockStartState{} type StarLoopbackState struct { - *BaseATNState + BaseATNState } func NewStarLoopbackState() *StarLoopbackState { - b := NewBaseATNState() - - b.stateType = ATNStateStarLoopBack - - return &StarLoopbackState{BaseATNState: b} + return &StarLoopbackState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateStarLoopBack, + }, + } } type StarLoopEntryState struct { - *BaseDecisionState + BaseDecisionState loopBackState ATNState precedenceRuleDecision bool } func NewStarLoopEntryState() *StarLoopEntryState { - b := NewBaseDecisionState() - - b.stateType = ATNStateStarLoopEntry - // False precedenceRuleDecision indicates whether s state can benefit from a precedence DFA during SLL decision making. - return &StarLoopEntryState{BaseDecisionState: b} + return &StarLoopEntryState{ + BaseDecisionState: BaseDecisionState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateStarLoopEntry, + }, + }, + } } // LoopEndState marks the end of a * or + loop. type LoopEndState struct { - *BaseATNState + BaseATNState loopBackState ATNState } func NewLoopEndState() *LoopEndState { - b := NewBaseATNState() - - b.stateType = ATNStateLoopEnd - - return &LoopEndState{BaseATNState: b} + return &LoopEndState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateLoopEnd, + }, + } } // TokensStartState is the Tokens rule start state linking to each lexer rule start state. type TokensStartState struct { - *BaseDecisionState + BaseDecisionState } func NewTokensStartState() *TokensStartState { - b := NewBaseDecisionState() - - b.stateType = ATNStateTokenStart - - return &TokensStartState{BaseDecisionState: b} + return &TokensStartState{ + BaseDecisionState: BaseDecisionState{ + BaseATNState: BaseATNState{ + stateNumber: ATNStateInvalidStateNumber, + stateType: ATNStateTokenStart, + }, + }, + } } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_type.go b/vendor/github.com/antlr4-go/antlr/v4/atn_type.go similarity index 100% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/atn_type.go rename to vendor/github.com/antlr4-go/antlr/v4/atn_type.go diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/char_stream.go b/vendor/github.com/antlr4-go/antlr/v4/char_stream.go similarity index 89% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/char_stream.go rename to vendor/github.com/antlr4-go/antlr/v4/char_stream.go index c33f0adb5e1..bd8127b6b54 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/char_stream.go +++ b/vendor/github.com/antlr4-go/antlr/v4/char_stream.go @@ -8,5 +8,5 @@ type CharStream interface { IntStream GetText(int, int) string GetTextFromTokens(start, end Token) string - GetTextFromInterval(*Interval) string + GetTextFromInterval(Interval) string } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/common_token_factory.go b/vendor/github.com/antlr4-go/antlr/v4/common_token_factory.go similarity index 100% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/common_token_factory.go rename to vendor/github.com/antlr4-go/antlr/v4/common_token_factory.go diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/common_token_stream.go b/vendor/github.com/antlr4-go/antlr/v4/common_token_stream.go similarity index 88% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/common_token_stream.go rename to vendor/github.com/antlr4-go/antlr/v4/common_token_stream.go index c6c9485a20a..b75da9df08e 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/common_token_stream.go +++ b/vendor/github.com/antlr4-go/antlr/v4/common_token_stream.go @@ -28,22 +28,24 @@ type CommonTokenStream struct { // trivial with bt field. fetchedEOF bool - // index indexs into tokens of the current token (next token to consume). + // index into [tokens] of the current token (next token to consume). // tokens[p] should be LT(1). It is set to -1 when the stream is first // constructed or when SetTokenSource is called, indicating that the first token // has not yet been fetched from the token source. For additional information, - // see the documentation of IntStream for a description of initializing methods. + // see the documentation of [IntStream] for a description of initializing methods. index int - // tokenSource is the TokenSource from which tokens for the bt stream are + // tokenSource is the [TokenSource] from which tokens for the bt stream are // fetched. tokenSource TokenSource - // tokens is all tokens fetched from the token source. The list is considered a + // tokens contains all tokens fetched from the token source. The list is considered a // complete view of the input once fetchedEOF is set to true. tokens []Token } +// NewCommonTokenStream creates a new CommonTokenStream instance using the supplied lexer to produce +// tokens and will pull tokens from the given lexer channel. func NewCommonTokenStream(lexer Lexer, channel int) *CommonTokenStream { return &CommonTokenStream{ channel: channel, @@ -53,6 +55,7 @@ func NewCommonTokenStream(lexer Lexer, channel int) *CommonTokenStream { } } +// GetAllTokens returns all tokens currently pulled from the token source. func (c *CommonTokenStream) GetAllTokens() []Token { return c.tokens } @@ -61,9 +64,11 @@ func (c *CommonTokenStream) Mark() int { return 0 } -func (c *CommonTokenStream) Release(marker int) {} +func (c *CommonTokenStream) Release(_ int) {} -func (c *CommonTokenStream) reset() { +func (c *CommonTokenStream) Reset() { + c.fetchedEOF = false + c.tokens = make([]Token, 0) c.Seek(0) } @@ -107,7 +112,7 @@ func (c *CommonTokenStream) Consume() { // Sync makes sure index i in tokens has a token and returns true if a token is // located at index i and otherwise false. func (c *CommonTokenStream) Sync(i int) bool { - n := i - len(c.tokens) + 1 // TODO: How many more elements do we need? + n := i - len(c.tokens) + 1 // How many more elements do we need? if n > 0 { fetched := c.fetch(n) @@ -193,12 +198,13 @@ func (c *CommonTokenStream) SetTokenSource(tokenSource TokenSource) { c.tokenSource = tokenSource c.tokens = make([]Token, 0) c.index = -1 + c.fetchedEOF = false } // NextTokenOnChannel returns the index of the next token on channel given a // starting index. Returns i if tokens[i] is on channel. Returns -1 if there are -// no tokens on channel between i and EOF. -func (c *CommonTokenStream) NextTokenOnChannel(i, channel int) int { +// no tokens on channel between 'i' and [TokenEOF]. +func (c *CommonTokenStream) NextTokenOnChannel(i, _ int) int { c.Sync(i) if i >= len(c.tokens) { @@ -244,7 +250,7 @@ func (c *CommonTokenStream) GetHiddenTokensToRight(tokenIndex, channel int) []To nextOnChannel := c.NextTokenOnChannel(tokenIndex+1, LexerDefaultTokenChannel) from := tokenIndex + 1 - // If no onchannel to the right, then nextOnChannel == -1, so set to to last token + // If no onChannel to the right, then nextOnChannel == -1, so set 'to' to the last token var to int if nextOnChannel == -1 { @@ -314,7 +320,8 @@ func (c *CommonTokenStream) Index() int { } func (c *CommonTokenStream) GetAllText() string { - return c.GetTextFromInterval(nil) + c.Fill() + return c.GetTextFromInterval(NewInterval(0, len(c.tokens)-1)) } func (c *CommonTokenStream) GetTextFromTokens(start, end Token) string { @@ -329,15 +336,9 @@ func (c *CommonTokenStream) GetTextFromRuleContext(interval RuleContext) string return c.GetTextFromInterval(interval.GetSourceInterval()) } -func (c *CommonTokenStream) GetTextFromInterval(interval *Interval) string { +func (c *CommonTokenStream) GetTextFromInterval(interval Interval) string { c.lazyInit() - - if interval == nil { - c.Fill() - interval = NewInterval(0, len(c.tokens)-1) - } else { - c.Sync(interval.Stop) - } + c.Sync(interval.Stop) start := interval.Start stop := interval.Stop diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/comparators.go b/vendor/github.com/antlr4-go/antlr/v4/comparators.go similarity index 82% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/comparators.go rename to vendor/github.com/antlr4-go/antlr/v4/comparators.go index 9ea3200536a..7467e9b43db 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/comparators.go +++ b/vendor/github.com/antlr4-go/antlr/v4/comparators.go @@ -18,17 +18,20 @@ package antlr // type safety and avoid having to implement this for every type that we want to perform comparison on. // // This comparator works by using the standard Hash() and Equals() methods of the type T that is being compared. Which -// allows us to use it in any collection instance that does nto require a special hash or equals implementation. +// allows us to use it in any collection instance that does not require a special hash or equals implementation. type ObjEqComparator[T Collectable[T]] struct{} var ( - aStateEqInst = &ObjEqComparator[ATNState]{} - aConfEqInst = &ObjEqComparator[ATNConfig]{} - aConfCompInst = &ATNConfigComparator[ATNConfig]{} - atnConfCompInst = &BaseATNConfigComparator[ATNConfig]{} + aStateEqInst = &ObjEqComparator[ATNState]{} + aConfEqInst = &ObjEqComparator[*ATNConfig]{} + + // aConfCompInst is the comparator used for the ATNConfigSet for the configLookup cache + aConfCompInst = &ATNConfigComparator[*ATNConfig]{} + atnConfCompInst = &BaseATNConfigComparator[*ATNConfig]{} dfaStateEqInst = &ObjEqComparator[*DFAState]{} semctxEqInst = &ObjEqComparator[SemanticContext]{} - atnAltCfgEqInst = &ATNAltConfigComparator[ATNConfig]{} + atnAltCfgEqInst = &ATNAltConfigComparator[*ATNConfig]{} + pContextEqInst = &ObjEqComparator[*PredictionContext]{} ) // Equals2 delegates to the Equals() method of type T @@ -44,14 +47,14 @@ func (c *ObjEqComparator[T]) Hash1(o T) int { type SemCComparator[T Collectable[T]] struct{} -// ATNConfigComparator is used as the compartor for the configLookup field of an ATNConfigSet +// ATNConfigComparator is used as the comparator for the configLookup field of an ATNConfigSet // and has a custom Equals() and Hash() implementation, because equality is not based on the // standard Hash() and Equals() methods of the ATNConfig type. type ATNConfigComparator[T Collectable[T]] struct { } // Equals2 is a custom comparator for ATNConfigs specifically for configLookup -func (c *ATNConfigComparator[T]) Equals2(o1, o2 ATNConfig) bool { +func (c *ATNConfigComparator[T]) Equals2(o1, o2 *ATNConfig) bool { // Same pointer, must be equal, even if both nil // @@ -72,7 +75,8 @@ func (c *ATNConfigComparator[T]) Equals2(o1, o2 ATNConfig) bool { } // Hash1 is custom hash implementation for ATNConfigs specifically for configLookup -func (c *ATNConfigComparator[T]) Hash1(o ATNConfig) int { +func (c *ATNConfigComparator[T]) Hash1(o *ATNConfig) int { + hash := 7 hash = 31*hash + o.GetState().GetStateNumber() hash = 31*hash + o.GetAlt() @@ -85,7 +89,7 @@ type ATNAltConfigComparator[T Collectable[T]] struct { } // Equals2 is a custom comparator for ATNConfigs specifically for configLookup -func (c *ATNAltConfigComparator[T]) Equals2(o1, o2 ATNConfig) bool { +func (c *ATNAltConfigComparator[T]) Equals2(o1, o2 *ATNConfig) bool { // Same pointer, must be equal, even if both nil // @@ -105,21 +109,21 @@ func (c *ATNAltConfigComparator[T]) Equals2(o1, o2 ATNConfig) bool { } // Hash1 is custom hash implementation for ATNConfigs specifically for configLookup -func (c *ATNAltConfigComparator[T]) Hash1(o ATNConfig) int { +func (c *ATNAltConfigComparator[T]) Hash1(o *ATNConfig) int { h := murmurInit(7) h = murmurUpdate(h, o.GetState().GetStateNumber()) h = murmurUpdate(h, o.GetContext().Hash()) return murmurFinish(h, 2) } -// BaseATNConfigComparator is used as the comparator for the configLookup field of a BaseATNConfigSet +// BaseATNConfigComparator is used as the comparator for the configLookup field of a ATNConfigSet // and has a custom Equals() and Hash() implementation, because equality is not based on the // standard Hash() and Equals() methods of the ATNConfig type. type BaseATNConfigComparator[T Collectable[T]] struct { } // Equals2 is a custom comparator for ATNConfigs specifically for baseATNConfigSet -func (c *BaseATNConfigComparator[T]) Equals2(o1, o2 ATNConfig) bool { +func (c *BaseATNConfigComparator[T]) Equals2(o1, o2 *ATNConfig) bool { // Same pointer, must be equal, even if both nil // @@ -141,7 +145,6 @@ func (c *BaseATNConfigComparator[T]) Equals2(o1, o2 ATNConfig) bool { // Hash1 is custom hash implementation for ATNConfigs specifically for configLookup, but in fact just // delegates to the standard Hash() method of the ATNConfig type. -func (c *BaseATNConfigComparator[T]) Hash1(o ATNConfig) int { - +func (c *BaseATNConfigComparator[T]) Hash1(o *ATNConfig) int { return o.Hash() } diff --git a/vendor/github.com/antlr4-go/antlr/v4/configuration.go b/vendor/github.com/antlr4-go/antlr/v4/configuration.go new file mode 100644 index 00000000000..c2b724514d4 --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/configuration.go @@ -0,0 +1,214 @@ +package antlr + +type runtimeConfiguration struct { + statsTraceStacks bool + lexerATNSimulatorDebug bool + lexerATNSimulatorDFADebug bool + parserATNSimulatorDebug bool + parserATNSimulatorTraceATNSim bool + parserATNSimulatorDFADebug bool + parserATNSimulatorRetryDebug bool + lRLoopEntryBranchOpt bool + memoryManager bool +} + +// Global runtime configuration +var runtimeConfig = runtimeConfiguration{ + lRLoopEntryBranchOpt: true, +} + +type runtimeOption func(*runtimeConfiguration) error + +// ConfigureRuntime allows the runtime to be configured globally setting things like trace and statistics options. +// It uses the functional options pattern for go. This is a package global function as it operates on the runtime +// configuration regardless of the instantiation of anything higher up such as a parser or lexer. Generally this is +// used for debugging/tracing/statistics options, which are usually used by the runtime maintainers (or rather the +// only maintainer). However, it is possible that you might want to use this to set a global option concerning the +// memory allocation type used by the runtime such as sync.Pool or not. +// +// The options are applied in the order they are passed in, so the last option will override any previous options. +// +// For example, if you want to turn on the collection create point stack flag to true, you can do: +// +// antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(true)) +// +// If you want to turn it off, you can do: +// +// antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(false)) +func ConfigureRuntime(options ...runtimeOption) error { + for _, option := range options { + err := option(&runtimeConfig) + if err != nil { + return err + } + } + return nil +} + +// WithStatsTraceStacks sets the global flag indicating whether to collect stack traces at the create-point of +// certain structs, such as collections, or the use point of certain methods such as Put(). +// Because this can be expensive, it is turned off by default. However, it +// can be useful to track down exactly where memory is being created and used. +// +// Use: +// +// antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(true)) +// +// You can turn it off at any time using: +// +// antlr.ConfigureRuntime(antlr.WithStatsTraceStacks(false)) +func WithStatsTraceStacks(trace bool) runtimeOption { + return func(config *runtimeConfiguration) error { + config.statsTraceStacks = trace + return nil + } +} + +// WithLexerATNSimulatorDebug sets the global flag indicating whether to log debug information from the lexer [ATN] +// simulator. This is useful for debugging lexer issues by comparing the output with the Java runtime. Only useful +// to the runtime maintainers. +// +// Use: +// +// antlr.ConfigureRuntime(antlr.WithLexerATNSimulatorDebug(true)) +// +// You can turn it off at any time using: +// +// antlr.ConfigureRuntime(antlr.WithLexerATNSimulatorDebug(false)) +func WithLexerATNSimulatorDebug(debug bool) runtimeOption { + return func(config *runtimeConfiguration) error { + config.lexerATNSimulatorDebug = debug + return nil + } +} + +// WithLexerATNSimulatorDFADebug sets the global flag indicating whether to log debug information from the lexer [ATN] [DFA] +// simulator. This is useful for debugging lexer issues by comparing the output with the Java runtime. Only useful +// to the runtime maintainers. +// +// Use: +// +// antlr.ConfigureRuntime(antlr.WithLexerATNSimulatorDFADebug(true)) +// +// You can turn it off at any time using: +// +// antlr.ConfigureRuntime(antlr.WithLexerATNSimulatorDFADebug(false)) +func WithLexerATNSimulatorDFADebug(debug bool) runtimeOption { + return func(config *runtimeConfiguration) error { + config.lexerATNSimulatorDFADebug = debug + return nil + } +} + +// WithParserATNSimulatorDebug sets the global flag indicating whether to log debug information from the parser [ATN] +// simulator. This is useful for debugging parser issues by comparing the output with the Java runtime. Only useful +// to the runtime maintainers. +// +// Use: +// +// antlr.ConfigureRuntime(antlr.WithParserATNSimulatorDebug(true)) +// +// You can turn it off at any time using: +// +// antlr.ConfigureRuntime(antlr.WithParserATNSimulatorDebug(false)) +func WithParserATNSimulatorDebug(debug bool) runtimeOption { + return func(config *runtimeConfiguration) error { + config.parserATNSimulatorDebug = debug + return nil + } +} + +// WithParserATNSimulatorTraceATNSim sets the global flag indicating whether to log trace information from the parser [ATN] simulator +// [DFA]. This is useful for debugging parser issues by comparing the output with the Java runtime. Only useful +// to the runtime maintainers. +// +// Use: +// +// antlr.ConfigureRuntime(antlr.WithParserATNSimulatorTraceATNSim(true)) +// +// You can turn it off at any time using: +// +// antlr.ConfigureRuntime(antlr.WithParserATNSimulatorTraceATNSim(false)) +func WithParserATNSimulatorTraceATNSim(trace bool) runtimeOption { + return func(config *runtimeConfiguration) error { + config.parserATNSimulatorTraceATNSim = trace + return nil + } +} + +// WithParserATNSimulatorDFADebug sets the global flag indicating whether to log debug information from the parser [ATN] [DFA] +// simulator. This is useful for debugging parser issues by comparing the output with the Java runtime. Only useful +// to the runtime maintainers. +// +// Use: +// +// antlr.ConfigureRuntime(antlr.WithParserATNSimulatorDFADebug(true)) +// +// You can turn it off at any time using: +// +// antlr.ConfigureRuntime(antlr.WithParserATNSimulatorDFADebug(false)) +func WithParserATNSimulatorDFADebug(debug bool) runtimeOption { + return func(config *runtimeConfiguration) error { + config.parserATNSimulatorDFADebug = debug + return nil + } +} + +// WithParserATNSimulatorRetryDebug sets the global flag indicating whether to log debug information from the parser [ATN] [DFA] +// simulator when retrying a decision. This is useful for debugging parser issues by comparing the output with the Java runtime. +// Only useful to the runtime maintainers. +// +// Use: +// +// antlr.ConfigureRuntime(antlr.WithParserATNSimulatorRetryDebug(true)) +// +// You can turn it off at any time using: +// +// antlr.ConfigureRuntime(antlr.WithParserATNSimulatorRetryDebug(false)) +func WithParserATNSimulatorRetryDebug(debug bool) runtimeOption { + return func(config *runtimeConfiguration) error { + config.parserATNSimulatorRetryDebug = debug + return nil + } +} + +// WithLRLoopEntryBranchOpt sets the global flag indicating whether let recursive loop operations should be +// optimized or not. This is useful for debugging parser issues by comparing the output with the Java runtime. +// It turns off the functionality of [canDropLoopEntryEdgeInLeftRecursiveRule] in [ParserATNSimulator]. +// +// Note that default is to use this optimization. +// +// Use: +// +// antlr.ConfigureRuntime(antlr.WithLRLoopEntryBranchOpt(true)) +// +// You can turn it off at any time using: +// +// antlr.ConfigureRuntime(antlr.WithLRLoopEntryBranchOpt(false)) +func WithLRLoopEntryBranchOpt(off bool) runtimeOption { + return func(config *runtimeConfiguration) error { + config.lRLoopEntryBranchOpt = off + return nil + } +} + +// WithMemoryManager sets the global flag indicating whether to use the memory manager or not. This is useful +// for poorly constructed grammars that create a lot of garbage. It turns on the functionality of [memoryManager], which +// will intercept garbage collection and cause available memory to be reused. At the end of the day, this is no substitute +// for fixing your grammar by ridding yourself of extreme ambiguity. BUt if you are just trying to reuse an opensource +// grammar, this may help make it more practical. +// +// Note that default is to use normal Go memory allocation and not pool memory. +// +// Use: +// +// antlr.ConfigureRuntime(antlr.WithMemoryManager(true)) +// +// Note that if you turn this on, you should probably leave it on. You should use only one memory strategy or the other +// and should remember to nil out any references to the parser or lexer when you are done with them. +func WithMemoryManager(use bool) runtimeOption { + return func(config *runtimeConfiguration) error { + config.memoryManager = use + return nil + } +} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/dfa.go b/vendor/github.com/antlr4-go/antlr/v4/dfa.go similarity index 76% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/dfa.go rename to vendor/github.com/antlr4-go/antlr/v4/dfa.go index bfd43e1f731..6b63eb1589b 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/dfa.go +++ b/vendor/github.com/antlr4-go/antlr/v4/dfa.go @@ -4,6 +4,8 @@ package antlr +// DFA represents the Deterministic Finite Automaton used by the recognizer, including all the states it can +// reach and the transitions between them. type DFA struct { // atnStartState is the ATN state in which this was created atnStartState DecisionState @@ -12,10 +14,9 @@ type DFA struct { // states is all the DFA states. Use Map to get the old state back; Set can only // indicate whether it is there. Go maps implement key hash collisions and so on and are very - // good, but the DFAState is an object and can't be used directly as the key as it can in say JAva + // good, but the DFAState is an object and can't be used directly as the key as it can in say Java // amd C#, whereby if the hashcode is the same for two objects, then Equals() is called against them - // to see if they really are the same object. - // + // to see if they really are the same object. Hence, we have our own map storage. // states *JStore[*DFAState, *ObjEqComparator[*DFAState]] @@ -32,11 +33,11 @@ func NewDFA(atnStartState DecisionState, decision int) *DFA { dfa := &DFA{ atnStartState: atnStartState, decision: decision, - states: NewJStore[*DFAState, *ObjEqComparator[*DFAState]](dfaStateEqInst), + states: nil, // Lazy initialize } if s, ok := atnStartState.(*StarLoopEntryState); ok && s.precedenceRuleDecision { dfa.precedenceDfa = true - dfa.s0 = NewDFAState(-1, NewBaseATNConfigSet(false)) + dfa.s0 = NewDFAState(-1, NewATNConfigSet(false)) dfa.s0.isAcceptState = false dfa.s0.requiresFullContext = false } @@ -95,12 +96,11 @@ func (d *DFA) getPrecedenceDfa() bool { // true or nil otherwise, and d.precedenceDfa is updated. func (d *DFA) setPrecedenceDfa(precedenceDfa bool) { if d.getPrecedenceDfa() != precedenceDfa { - d.states = NewJStore[*DFAState, *ObjEqComparator[*DFAState]](dfaStateEqInst) + d.states = nil // Lazy initialize d.numstates = 0 if precedenceDfa { - precedenceState := NewDFAState(-1, NewBaseATNConfigSet(false)) - + precedenceState := NewDFAState(-1, NewATNConfigSet(false)) precedenceState.setEdges(make([]*DFAState, 0)) precedenceState.isAcceptState = false precedenceState.requiresFullContext = false @@ -113,6 +113,31 @@ func (d *DFA) setPrecedenceDfa(precedenceDfa bool) { } } +// Len returns the number of states in d. We use this instead of accessing states directly so that we can implement lazy +// instantiation of the states JMap. +func (d *DFA) Len() int { + if d.states == nil { + return 0 + } + return d.states.Len() +} + +// Get returns a state that matches s if it is present in the DFA state set. We defer to this +// function instead of accessing states directly so that we can implement lazy instantiation of the states JMap. +func (d *DFA) Get(s *DFAState) (*DFAState, bool) { + if d.states == nil { + return nil, false + } + return d.states.Get(s) +} + +func (d *DFA) Put(s *DFAState) (*DFAState, bool) { + if d.states == nil { + d.states = NewJStore[*DFAState, *ObjEqComparator[*DFAState]](dfaStateEqInst, DFAStateCollection, "DFA via DFA.Put") + } + return d.states.Put(s) +} + func (d *DFA) getS0() *DFAState { return d.s0 } @@ -121,9 +146,11 @@ func (d *DFA) setS0(s *DFAState) { d.s0 = s } -// sortedStates returns the states in d sorted by their state number. +// sortedStates returns the states in d sorted by their state number, or an empty set if d.states is nil. func (d *DFA) sortedStates() []*DFAState { - + if d.states == nil { + return []*DFAState{} + } vs := d.states.SortedSlice(func(i, j *DFAState) bool { return i.stateNumber < j.stateNumber }) diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/dfa_serializer.go b/vendor/github.com/antlr4-go/antlr/v4/dfa_serializer.go similarity index 97% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/dfa_serializer.go rename to vendor/github.com/antlr4-go/antlr/v4/dfa_serializer.go index 84d0a31e536..0e11009899c 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/dfa_serializer.go +++ b/vendor/github.com/antlr4-go/antlr/v4/dfa_serializer.go @@ -10,7 +10,7 @@ import ( "strings" ) -// DFASerializer is a DFA walker that knows how to dump them to serialized +// DFASerializer is a DFA walker that knows how to dump the DFA states to serialized // strings. type DFASerializer struct { dfa *DFA diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/dfa_state.go b/vendor/github.com/antlr4-go/antlr/v4/dfa_state.go similarity index 81% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/dfa_state.go rename to vendor/github.com/antlr4-go/antlr/v4/dfa_state.go index c90dec55c86..6541430745f 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/dfa_state.go +++ b/vendor/github.com/antlr4-go/antlr/v4/dfa_state.go @@ -22,30 +22,31 @@ func (p *PredPrediction) String() string { return "(" + fmt.Sprint(p.pred) + ", " + fmt.Sprint(p.alt) + ")" } -// DFAState represents a set of possible ATN configurations. As Aho, Sethi, +// DFAState represents a set of possible [ATN] configurations. As Aho, Sethi, // Ullman p. 117 says: "The DFA uses its state to keep track of all possible // states the ATN can be in after reading each input symbol. That is to say, -// after reading input a1a2..an, the DFA is in a state that represents the +// after reading input a1, a2,..an, the DFA is in a state that represents the // subset T of the states of the ATN that are reachable from the ATN's start -// state along some path labeled a1a2..an." In conventional NFA-to-DFA -// conversion, therefore, the subset T would be a bitset representing the set of -// states the ATN could be in. We need to track the alt predicted by each state +// state along some path labeled a1a2..an." +// +// In conventional NFA-to-DFA conversion, therefore, the subset T would be a bitset representing the set of +// states the [ATN] could be in. We need to track the alt predicted by each state // as well, however. More importantly, we need to maintain a stack of states, // tracking the closure operations as they jump from rule to rule, emulating // rule invocations (method calls). I have to add a stack to simulate the proper // lookahead sequences for the underlying LL grammar from which the ATN was // derived. // -// I use a set of ATNConfig objects, not simple states. An ATNConfig is both a -// state (ala normal conversion) and a RuleContext describing the chain of rules +// I use a set of [ATNConfig] objects, not simple states. An [ATNConfig] is both a +// state (ala normal conversion) and a [RuleContext] describing the chain of rules // (if any) followed to arrive at that state. // -// A DFAState may have multiple references to a particular state, but with -// different ATN contexts (with same or different alts) meaning that state was +// A [DFAState] may have multiple references to a particular state, but with +// different [ATN] contexts (with same or different alts) meaning that state was // reached via a different set of rule invocations. type DFAState struct { stateNumber int - configs ATNConfigSet + configs *ATNConfigSet // edges elements point to the target of the symbol. Shift up by 1 so (-1) // Token.EOF maps to the first element. @@ -53,7 +54,7 @@ type DFAState struct { isAcceptState bool - // prediction is the ttype we match or alt we predict if the state is accept. + // prediction is the 'ttype' we match or alt we predict if the state is 'accept'. // Set to ATN.INVALID_ALT_NUMBER when predicates != nil or // requiresFullContext. prediction int @@ -81,9 +82,9 @@ type DFAState struct { predicates []*PredPrediction } -func NewDFAState(stateNumber int, configs ATNConfigSet) *DFAState { +func NewDFAState(stateNumber int, configs *ATNConfigSet) *DFAState { if configs == nil { - configs = NewBaseATNConfigSet(false) + configs = NewATNConfigSet(false) } return &DFAState{configs: configs, stateNumber: stateNumber} @@ -94,7 +95,7 @@ func (d *DFAState) GetAltSet() []int { var alts []int if d.configs != nil { - for _, c := range d.configs.GetItems() { + for _, c := range d.configs.configs { alts = append(alts, c.GetAlt()) } } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/diagnostic_error_listener.go b/vendor/github.com/antlr4-go/antlr/v4/diagnostic_error_listener.go similarity index 92% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/diagnostic_error_listener.go rename to vendor/github.com/antlr4-go/antlr/v4/diagnostic_error_listener.go index c55bcc19b2c..bd2cd8bc3a8 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/diagnostic_error_listener.go +++ b/vendor/github.com/antlr4-go/antlr/v4/diagnostic_error_listener.go @@ -33,6 +33,7 @@ type DiagnosticErrorListener struct { exactOnly bool } +//goland:noinspection GoUnusedExportedFunction func NewDiagnosticErrorListener(exactOnly bool) *DiagnosticErrorListener { n := new(DiagnosticErrorListener) @@ -42,7 +43,7 @@ func NewDiagnosticErrorListener(exactOnly bool) *DiagnosticErrorListener { return n } -func (d *DiagnosticErrorListener) ReportAmbiguity(recognizer Parser, dfa *DFA, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs ATNConfigSet) { +func (d *DiagnosticErrorListener) ReportAmbiguity(recognizer Parser, dfa *DFA, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs *ATNConfigSet) { if d.exactOnly && !exact { return } @@ -55,7 +56,7 @@ func (d *DiagnosticErrorListener) ReportAmbiguity(recognizer Parser, dfa *DFA, s recognizer.NotifyErrorListeners(msg, nil, nil) } -func (d *DiagnosticErrorListener) ReportAttemptingFullContext(recognizer Parser, dfa *DFA, startIndex, stopIndex int, conflictingAlts *BitSet, configs ATNConfigSet) { +func (d *DiagnosticErrorListener) ReportAttemptingFullContext(recognizer Parser, dfa *DFA, startIndex, stopIndex int, _ *BitSet, _ *ATNConfigSet) { msg := "reportAttemptingFullContext d=" + d.getDecisionDescription(recognizer, dfa) + @@ -64,7 +65,7 @@ func (d *DiagnosticErrorListener) ReportAttemptingFullContext(recognizer Parser, recognizer.NotifyErrorListeners(msg, nil, nil) } -func (d *DiagnosticErrorListener) ReportContextSensitivity(recognizer Parser, dfa *DFA, startIndex, stopIndex, prediction int, configs ATNConfigSet) { +func (d *DiagnosticErrorListener) ReportContextSensitivity(recognizer Parser, dfa *DFA, startIndex, stopIndex, _ int, _ *ATNConfigSet) { msg := "reportContextSensitivity d=" + d.getDecisionDescription(recognizer, dfa) + ", input='" + @@ -96,12 +97,12 @@ func (d *DiagnosticErrorListener) getDecisionDescription(recognizer Parser, dfa // @param configs The conflicting or ambiguous configuration set. // @return Returns {@code ReportedAlts} if it is not {@code nil}, otherwise // returns the set of alternatives represented in {@code configs}. -func (d *DiagnosticErrorListener) getConflictingAlts(ReportedAlts *BitSet, set ATNConfigSet) *BitSet { +func (d *DiagnosticErrorListener) getConflictingAlts(ReportedAlts *BitSet, set *ATNConfigSet) *BitSet { if ReportedAlts != nil { return ReportedAlts } result := NewBitSet() - for _, c := range set.GetItems() { + for _, c := range set.configs { result.add(c.GetAlt()) } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/error_listener.go b/vendor/github.com/antlr4-go/antlr/v4/error_listener.go similarity index 62% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/error_listener.go rename to vendor/github.com/antlr4-go/antlr/v4/error_listener.go index f679f0dcd5e..21a0216434e 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/error_listener.go +++ b/vendor/github.com/antlr4-go/antlr/v4/error_listener.go @@ -16,28 +16,29 @@ import ( type ErrorListener interface { SyntaxError(recognizer Recognizer, offendingSymbol interface{}, line, column int, msg string, e RecognitionException) - ReportAmbiguity(recognizer Parser, dfa *DFA, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs ATNConfigSet) - ReportAttemptingFullContext(recognizer Parser, dfa *DFA, startIndex, stopIndex int, conflictingAlts *BitSet, configs ATNConfigSet) - ReportContextSensitivity(recognizer Parser, dfa *DFA, startIndex, stopIndex, prediction int, configs ATNConfigSet) + ReportAmbiguity(recognizer Parser, dfa *DFA, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs *ATNConfigSet) + ReportAttemptingFullContext(recognizer Parser, dfa *DFA, startIndex, stopIndex int, conflictingAlts *BitSet, configs *ATNConfigSet) + ReportContextSensitivity(recognizer Parser, dfa *DFA, startIndex, stopIndex, prediction int, configs *ATNConfigSet) } type DefaultErrorListener struct { } +//goland:noinspection GoUnusedExportedFunction func NewDefaultErrorListener() *DefaultErrorListener { return new(DefaultErrorListener) } -func (d *DefaultErrorListener) SyntaxError(recognizer Recognizer, offendingSymbol interface{}, line, column int, msg string, e RecognitionException) { +func (d *DefaultErrorListener) SyntaxError(_ Recognizer, _ interface{}, _, _ int, _ string, _ RecognitionException) { } -func (d *DefaultErrorListener) ReportAmbiguity(recognizer Parser, dfa *DFA, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs ATNConfigSet) { +func (d *DefaultErrorListener) ReportAmbiguity(_ Parser, _ *DFA, _, _ int, _ bool, _ *BitSet, _ *ATNConfigSet) { } -func (d *DefaultErrorListener) ReportAttemptingFullContext(recognizer Parser, dfa *DFA, startIndex, stopIndex int, conflictingAlts *BitSet, configs ATNConfigSet) { +func (d *DefaultErrorListener) ReportAttemptingFullContext(_ Parser, _ *DFA, _, _ int, _ *BitSet, _ *ATNConfigSet) { } -func (d *DefaultErrorListener) ReportContextSensitivity(recognizer Parser, dfa *DFA, startIndex, stopIndex, prediction int, configs ATNConfigSet) { +func (d *DefaultErrorListener) ReportContextSensitivity(_ Parser, _ *DFA, _, _, _ int, _ *ATNConfigSet) { } type ConsoleErrorListener struct { @@ -48,21 +49,16 @@ func NewConsoleErrorListener() *ConsoleErrorListener { return new(ConsoleErrorListener) } -// Provides a default instance of {@link ConsoleErrorListener}. +// ConsoleErrorListenerINSTANCE provides a default instance of {@link ConsoleErrorListener}. var ConsoleErrorListenerINSTANCE = NewConsoleErrorListener() -// {@inheritDoc} +// SyntaxError prints messages to System.err containing the +// values of line, charPositionInLine, and msg using +// the following format: // -//

-// This implementation prints messages to {@link System//err} containing the -// values of {@code line}, {@code charPositionInLine}, and {@code msg} using -// the following format.

-// -//
-// line line:charPositionInLine msg
-// 
-func (c *ConsoleErrorListener) SyntaxError(recognizer Recognizer, offendingSymbol interface{}, line, column int, msg string, e RecognitionException) { - fmt.Fprintln(os.Stderr, "line "+strconv.Itoa(line)+":"+strconv.Itoa(column)+" "+msg) +// line : +func (c *ConsoleErrorListener) SyntaxError(_ Recognizer, _ interface{}, line, column int, msg string, _ RecognitionException) { + _, _ = fmt.Fprintln(os.Stderr, "line "+strconv.Itoa(line)+":"+strconv.Itoa(column)+" "+msg) } type ProxyErrorListener struct { @@ -85,19 +81,19 @@ func (p *ProxyErrorListener) SyntaxError(recognizer Recognizer, offendingSymbol } } -func (p *ProxyErrorListener) ReportAmbiguity(recognizer Parser, dfa *DFA, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs ATNConfigSet) { +func (p *ProxyErrorListener) ReportAmbiguity(recognizer Parser, dfa *DFA, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs *ATNConfigSet) { for _, d := range p.delegates { d.ReportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) } } -func (p *ProxyErrorListener) ReportAttemptingFullContext(recognizer Parser, dfa *DFA, startIndex, stopIndex int, conflictingAlts *BitSet, configs ATNConfigSet) { +func (p *ProxyErrorListener) ReportAttemptingFullContext(recognizer Parser, dfa *DFA, startIndex, stopIndex int, conflictingAlts *BitSet, configs *ATNConfigSet) { for _, d := range p.delegates { d.ReportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) } } -func (p *ProxyErrorListener) ReportContextSensitivity(recognizer Parser, dfa *DFA, startIndex, stopIndex, prediction int, configs ATNConfigSet) { +func (p *ProxyErrorListener) ReportContextSensitivity(recognizer Parser, dfa *DFA, startIndex, stopIndex, prediction int, configs *ATNConfigSet) { for _, d := range p.delegates { d.ReportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs) } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/error_strategy.go b/vendor/github.com/antlr4-go/antlr/v4/error_strategy.go similarity index 58% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/error_strategy.go rename to vendor/github.com/antlr4-go/antlr/v4/error_strategy.go index 5c0a637ba4a..9db2be1c748 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/error_strategy.go +++ b/vendor/github.com/antlr4-go/antlr/v4/error_strategy.go @@ -21,8 +21,8 @@ type ErrorStrategy interface { ReportMatch(Parser) } -// This is the default implementation of {@link ANTLRErrorStrategy} used for -// error Reporting and recovery in ANTLR parsers. +// DefaultErrorStrategy is the default implementation of ANTLRErrorStrategy used for +// error reporting and recovery in ANTLR parsers. type DefaultErrorStrategy struct { errorRecoveryMode bool lastErrorIndex int @@ -46,7 +46,7 @@ func NewDefaultErrorStrategy() *DefaultErrorStrategy { // The index into the input stream where the last error occurred. // This is used to prevent infinite loops where an error is found // but no token is consumed during recovery...another error is found, - // ad nauseum. This is a failsafe mechanism to guarantee that at least + // ad nauseam. This is a failsafe mechanism to guarantee that at least // one token/tree node is consumed for two errors. // d.lastErrorIndex = -1 @@ -62,50 +62,37 @@ func (d *DefaultErrorStrategy) reset(recognizer Parser) { // This method is called to enter error recovery mode when a recognition // exception is Reported. -// -// @param recognizer the parser instance -func (d *DefaultErrorStrategy) beginErrorCondition(recognizer Parser) { +func (d *DefaultErrorStrategy) beginErrorCondition(_ Parser) { d.errorRecoveryMode = true } -func (d *DefaultErrorStrategy) InErrorRecoveryMode(recognizer Parser) bool { +func (d *DefaultErrorStrategy) InErrorRecoveryMode(_ Parser) bool { return d.errorRecoveryMode } // This method is called to leave error recovery mode after recovering from // a recognition exception. -// -// @param recognizer -func (d *DefaultErrorStrategy) endErrorCondition(recognizer Parser) { +func (d *DefaultErrorStrategy) endErrorCondition(_ Parser) { d.errorRecoveryMode = false d.lastErrorStates = nil d.lastErrorIndex = -1 } -// {@inheritDoc} -// -//

The default implementation simply calls {@link //endErrorCondition}.

+// ReportMatch is the default implementation of error matching and simply calls endErrorCondition. func (d *DefaultErrorStrategy) ReportMatch(recognizer Parser) { d.endErrorCondition(recognizer) } -// {@inheritDoc} -// -//

The default implementation returns immediately if the handler is already -// in error recovery mode. Otherwise, it calls {@link //beginErrorCondition} -// and dispatches the Reporting task based on the runtime type of {@code e} -// according to the following table.

-// -//
    -//
  • {@link NoViableAltException}: Dispatches the call to -// {@link //ReportNoViableAlternative}
  • -//
  • {@link InputMisMatchException}: Dispatches the call to -// {@link //ReportInputMisMatch}
  • -//
  • {@link FailedPredicateException}: Dispatches the call to -// {@link //ReportFailedPredicate}
  • -//
  • All other types: calls {@link Parser//NotifyErrorListeners} to Report -// the exception
  • -//
+// ReportError is the default implementation of error reporting. +// It returns immediately if the handler is already +// in error recovery mode. Otherwise, it calls [beginErrorCondition] +// and dispatches the Reporting task based on the runtime type of e +// according to the following table. +// +// [NoViableAltException] : Dispatches the call to [ReportNoViableAlternative] +// [InputMisMatchException] : Dispatches the call to [ReportInputMisMatch] +// [FailedPredicateException] : Dispatches the call to [ReportFailedPredicate] +// All other types : Calls [NotifyErrorListeners] to Report the exception func (d *DefaultErrorStrategy) ReportError(recognizer Parser, e RecognitionException) { // if we've already Reported an error and have not Matched a token // yet successfully, don't Report any errors. @@ -128,12 +115,10 @@ func (d *DefaultErrorStrategy) ReportError(recognizer Parser, e RecognitionExcep } } -// {@inheritDoc} -// -//

The default implementation reSynchronizes the parser by consuming tokens -// until we find one in the reSynchronization set--loosely the set of tokens -// that can follow the current rule.

-func (d *DefaultErrorStrategy) Recover(recognizer Parser, e RecognitionException) { +// Recover is the default recovery implementation. +// It reSynchronizes the parser by consuming tokens until we find one in the reSynchronization set - +// loosely the set of tokens that can follow the current rule. +func (d *DefaultErrorStrategy) Recover(recognizer Parser, _ RecognitionException) { if d.lastErrorIndex == recognizer.GetInputStream().Index() && d.lastErrorStates != nil && d.lastErrorStates.contains(recognizer.GetState()) { @@ -148,54 +133,58 @@ func (d *DefaultErrorStrategy) Recover(recognizer Parser, e RecognitionException d.lastErrorStates = NewIntervalSet() } d.lastErrorStates.addOne(recognizer.GetState()) - followSet := d.getErrorRecoverySet(recognizer) + followSet := d.GetErrorRecoverySet(recognizer) d.consumeUntil(recognizer, followSet) } -// The default implementation of {@link ANTLRErrorStrategy//Sync} makes sure -// that the current lookahead symbol is consistent with what were expecting -// at d point in the ATN. You can call d anytime but ANTLR only -// generates code to check before subrules/loops and each iteration. +// Sync is the default implementation of error strategy synchronization. +// +// This Sync makes sure that the current lookahead symbol is consistent with what were expecting +// at this point in the [ATN]. You can call this anytime but ANTLR only +// generates code to check before sub-rules/loops and each iteration. // -//

Implements Jim Idle's magic Sync mechanism in closures and optional -// subrules. E.g.,

+// Implements [Jim Idle]'s magic Sync mechanism in closures and optional +// sub-rules. E.g.: // -//
-// a : Sync ( stuff Sync )*
-// Sync : {consume to what can follow Sync}
-// 
+// a : Sync ( stuff Sync )* +// Sync : {consume to what can follow Sync} // -// At the start of a sub rule upon error, {@link //Sync} performs single +// At the start of a sub-rule upon error, Sync performs single // token deletion, if possible. If it can't do that, it bails on the current // rule and uses the default error recovery, which consumes until the // reSynchronization set of the current rule. // -//

If the sub rule is optional ({@code (...)?}, {@code (...)*}, or block -// with an empty alternative), then the expected set includes what follows -// the subrule.

+// If the sub-rule is optional +// +// ({@code (...)?}, {@code (...)*}, // -//

During loop iteration, it consumes until it sees a token that can start a -// sub rule or what follows loop. Yes, that is pretty aggressive. We opt to -// stay in the loop as long as possible.

+// or a block with an empty alternative), then the expected set includes what follows +// the sub-rule. // -//

ORIGINS

+// During loop iteration, it consumes until it sees a token that can start a +// sub-rule or what follows loop. Yes, that is pretty aggressive. We opt to +// stay in the loop as long as possible. // -//

Previous versions of ANTLR did a poor job of their recovery within loops. +// # Origins +// +// Previous versions of ANTLR did a poor job of their recovery within loops. // A single mismatch token or missing token would force the parser to bail -// out of the entire rules surrounding the loop. So, for rule

+// out of the entire rules surrounding the loop. So, for rule: // -//
-// classfunc : 'class' ID '{' member* '}'
-// 
+// classfunc : 'class' ID '{' member* '}' // // input with an extra token between members would force the parser to // consume until it found the next class definition rather than the next // member definition of the current class. // -//

This functionality cost a little bit of effort because the parser has to -// compare token set at the start of the loop and at each iteration. If for -// some reason speed is suffering for you, you can turn off d -// functionality by simply overriding d method as a blank { }.

+// This functionality cost a bit of effort because the parser has to +// compare the token set at the start of the loop and at each iteration. If for +// some reason speed is suffering for you, you can turn off this +// functionality by simply overriding this method as empty: +// +// { } +// +// [Jim Idle]: https://github.com/jimidle func (d *DefaultErrorStrategy) Sync(recognizer Parser) { // If already recovering, don't try to Sync if d.InErrorRecoveryMode(recognizer) { @@ -217,25 +206,21 @@ func (d *DefaultErrorStrategy) Sync(recognizer Parser) { if d.SingleTokenDeletion(recognizer) != nil { return } - panic(NewInputMisMatchException(recognizer)) + recognizer.SetError(NewInputMisMatchException(recognizer)) case ATNStatePlusLoopBack, ATNStateStarLoopBack: d.ReportUnwantedToken(recognizer) expecting := NewIntervalSet() expecting.addSet(recognizer.GetExpectedTokens()) - whatFollowsLoopIterationOrRule := expecting.addSet(d.getErrorRecoverySet(recognizer)) + whatFollowsLoopIterationOrRule := expecting.addSet(d.GetErrorRecoverySet(recognizer)) d.consumeUntil(recognizer, whatFollowsLoopIterationOrRule) default: // do nothing if we can't identify the exact kind of ATN state } } -// This is called by {@link //ReportError} when the exception is a -// {@link NoViableAltException}. -// -// @see //ReportError +// ReportNoViableAlternative is called by [ReportError] when the exception is a [NoViableAltException]. // -// @param recognizer the parser instance -// @param e the recognition exception +// See also [ReportError] func (d *DefaultErrorStrategy) ReportNoViableAlternative(recognizer Parser, e *NoViableAltException) { tokens := recognizer.GetTokenStream() var input string @@ -252,48 +237,38 @@ func (d *DefaultErrorStrategy) ReportNoViableAlternative(recognizer Parser, e *N recognizer.NotifyErrorListeners(msg, e.offendingToken, e) } -// This is called by {@link //ReportError} when the exception is an -// {@link InputMisMatchException}. +// ReportInputMisMatch is called by [ReportError] when the exception is an [InputMisMatchException] // -// @see //ReportError -// -// @param recognizer the parser instance -// @param e the recognition exception -func (this *DefaultErrorStrategy) ReportInputMisMatch(recognizer Parser, e *InputMisMatchException) { - msg := "mismatched input " + this.GetTokenErrorDisplay(e.offendingToken) + +// See also: [ReportError] +func (d *DefaultErrorStrategy) ReportInputMisMatch(recognizer Parser, e *InputMisMatchException) { + msg := "mismatched input " + d.GetTokenErrorDisplay(e.offendingToken) + " expecting " + e.getExpectedTokens().StringVerbose(recognizer.GetLiteralNames(), recognizer.GetSymbolicNames(), false) recognizer.NotifyErrorListeners(msg, e.offendingToken, e) } -// This is called by {@link //ReportError} when the exception is a -// {@link FailedPredicateException}. -// -// @see //ReportError +// ReportFailedPredicate is called by [ReportError] when the exception is a [FailedPredicateException]. // -// @param recognizer the parser instance -// @param e the recognition exception +// See also: [ReportError] func (d *DefaultErrorStrategy) ReportFailedPredicate(recognizer Parser, e *FailedPredicateException) { ruleName := recognizer.GetRuleNames()[recognizer.GetParserRuleContext().GetRuleIndex()] msg := "rule " + ruleName + " " + e.message recognizer.NotifyErrorListeners(msg, e.offendingToken, e) } -// This method is called to Report a syntax error which requires the removal +// ReportUnwantedToken is called to report a syntax error that requires the removal // of a token from the input stream. At the time d method is called, the -// erroneous symbol is current {@code LT(1)} symbol and has not yet been -// removed from the input stream. When d method returns, -// {@code recognizer} is in error recovery mode. +// erroneous symbol is the current LT(1) symbol and has not yet been +// removed from the input stream. When this method returns, +// recognizer is in error recovery mode. // -//

This method is called when {@link //singleTokenDeletion} identifies +// This method is called when singleTokenDeletion identifies // single-token deletion as a viable recovery strategy for a mismatched -// input error.

+// input error. // -//

The default implementation simply returns if the handler is already in -// error recovery mode. Otherwise, it calls {@link //beginErrorCondition} to +// The default implementation simply returns if the handler is already in +// error recovery mode. Otherwise, it calls beginErrorCondition to // enter error recovery mode, followed by calling -// {@link Parser//NotifyErrorListeners}.

-// -// @param recognizer the parser instance +// [NotifyErrorListeners] func (d *DefaultErrorStrategy) ReportUnwantedToken(recognizer Parser) { if d.InErrorRecoveryMode(recognizer) { return @@ -307,21 +282,18 @@ func (d *DefaultErrorStrategy) ReportUnwantedToken(recognizer Parser) { recognizer.NotifyErrorListeners(msg, t, nil) } -// This method is called to Report a syntax error which requires the -// insertion of a missing token into the input stream. At the time d -// method is called, the missing token has not yet been inserted. When d -// method returns, {@code recognizer} is in error recovery mode. +// ReportMissingToken is called to report a syntax error which requires the +// insertion of a missing token into the input stream. At the time this +// method is called, the missing token has not yet been inserted. When this +// method returns, recognizer is in error recovery mode. // -//

This method is called when {@link //singleTokenInsertion} identifies +// This method is called when singleTokenInsertion identifies // single-token insertion as a viable recovery strategy for a mismatched -// input error.

+// input error. // -//

The default implementation simply returns if the handler is already in -// error recovery mode. Otherwise, it calls {@link //beginErrorCondition} to -// enter error recovery mode, followed by calling -// {@link Parser//NotifyErrorListeners}.

-// -// @param recognizer the parser instance +// The default implementation simply returns if the handler is already in +// error recovery mode. Otherwise, it calls beginErrorCondition to +// enter error recovery mode, followed by calling [NotifyErrorListeners] func (d *DefaultErrorStrategy) ReportMissingToken(recognizer Parser) { if d.InErrorRecoveryMode(recognizer) { return @@ -334,54 +306,48 @@ func (d *DefaultErrorStrategy) ReportMissingToken(recognizer Parser) { recognizer.NotifyErrorListeners(msg, t, nil) } -//

The default implementation attempts to recover from the mismatched input +// The RecoverInline default implementation attempts to recover from the mismatched input // by using single token insertion and deletion as described below. If the -// recovery attempt fails, d method panics an -// {@link InputMisMatchException}.

+// recovery attempt fails, this method panics with [InputMisMatchException}. +// TODO: Not sure that panic() is the right thing to do here - JI // -//

EXTRA TOKEN (single token deletion)

+// # EXTRA TOKEN (single token deletion) // -//

{@code LA(1)} is not what we are looking for. If {@code LA(2)} has the -// right token, however, then assume {@code LA(1)} is some extra spurious +// LA(1) is not what we are looking for. If LA(2) has the +// right token, however, then assume LA(1) is some extra spurious // token and delete it. Then consume and return the next token (which was -// the {@code LA(2)} token) as the successful result of the Match operation.

+// the LA(2) token) as the successful result of the Match operation. // -//

This recovery strategy is implemented by {@link -// //singleTokenDeletion}.

+// # This recovery strategy is implemented by singleTokenDeletion // -//

MISSING TOKEN (single token insertion)

+// # MISSING TOKEN (single token insertion) // -//

If current token (at {@code LA(1)}) is consistent with what could come -// after the expected {@code LA(1)} token, then assume the token is missing -// and use the parser's {@link TokenFactory} to create it on the fly. The -// "insertion" is performed by returning the created token as the successful -// result of the Match operation.

+// If current token -at LA(1) - is consistent with what could come +// after the expected LA(1) token, then assume the token is missing +// and use the parser's [TokenFactory] to create it on the fly. The +// “insertion” is performed by returning the created token as the successful +// result of the Match operation. // -//

This recovery strategy is implemented by {@link -// //singleTokenInsertion}.

+// This recovery strategy is implemented by [SingleTokenInsertion]. // -//

EXAMPLE

+// # Example // -//

For example, Input {@code i=(3} is clearly missing the {@code ')'}. When -// the parser returns from the nested call to {@code expr}, it will have -// call chain:

+// For example, Input i=(3 is clearly missing the ')'. When +// the parser returns from the nested call to expr, it will have +// call the chain: // -//
-// stat &rarr expr &rarr atom
-// 
+// stat → expr → atom // -// and it will be trying to Match the {@code ')'} at d point in the +// and it will be trying to Match the ')' at this point in the // derivation: // -//
-// => ID '=' '(' INT ')' ('+' atom)* ”
-// ^
-// 
+// : ID '=' '(' INT ')' ('+' atom)* ';' +// ^ // -// The attempt to Match {@code ')'} will fail when it sees {@code ”} and -// call {@link //recoverInline}. To recover, it sees that {@code LA(1)==”} -// is in the set of tokens that can follow the {@code ')'} token reference -// in rule {@code atom}. It can assume that you forgot the {@code ')'}. +// The attempt to [Match] ')' will fail when it sees ';' and +// call [RecoverInline]. To recover, it sees that LA(1)==';' +// is in the set of tokens that can follow the ')' token reference +// in rule atom. It can assume that you forgot the ')'. func (d *DefaultErrorStrategy) RecoverInline(recognizer Parser) Token { // SINGLE TOKEN DELETION MatchedSymbol := d.SingleTokenDeletion(recognizer) @@ -396,24 +362,24 @@ func (d *DefaultErrorStrategy) RecoverInline(recognizer Parser) Token { return d.GetMissingSymbol(recognizer) } // even that didn't work must panic the exception - panic(NewInputMisMatchException(recognizer)) + recognizer.SetError(NewInputMisMatchException(recognizer)) + return nil } -// This method implements the single-token insertion inline error recovery -// strategy. It is called by {@link //recoverInline} if the single-token +// SingleTokenInsertion implements the single-token insertion inline error recovery +// strategy. It is called by [RecoverInline] if the single-token // deletion strategy fails to recover from the mismatched input. If this // method returns {@code true}, {@code recognizer} will be in error recovery // mode. // -//

This method determines whether or not single-token insertion is viable by -// checking if the {@code LA(1)} input symbol could be successfully Matched -// if it were instead the {@code LA(2)} symbol. If d method returns +// This method determines whether single-token insertion is viable by +// checking if the LA(1) input symbol could be successfully Matched +// if it were instead the LA(2) symbol. If this method returns // {@code true}, the caller is responsible for creating and inserting a -// token with the correct type to produce d behavior.

+// token with the correct type to produce this behavior.

// -// @param recognizer the parser instance -// @return {@code true} if single-token insertion is a viable recovery -// strategy for the current mismatched input, otherwise {@code false} +// This func returns true if single-token insertion is a viable recovery +// strategy for the current mismatched input. func (d *DefaultErrorStrategy) SingleTokenInsertion(recognizer Parser) bool { currentSymbolType := recognizer.GetTokenStream().LA(1) // if current token is consistent with what could come after current @@ -431,23 +397,21 @@ func (d *DefaultErrorStrategy) SingleTokenInsertion(recognizer Parser) bool { return false } -// This method implements the single-token deletion inline error recovery -// strategy. It is called by {@link //recoverInline} to attempt to recover +// SingleTokenDeletion implements the single-token deletion inline error recovery +// strategy. It is called by [RecoverInline] to attempt to recover // from mismatched input. If this method returns nil, the parser and error // handler state will not have changed. If this method returns non-nil, -// {@code recognizer} will not be in error recovery mode since the +// recognizer will not be in error recovery mode since the // returned token was a successful Match. // -//

If the single-token deletion is successful, d method calls -// {@link //ReportUnwantedToken} to Report the error, followed by -// {@link Parser//consume} to actually "delete" the extraneous token. Then, -// before returning {@link //ReportMatch} is called to signal a successful -// Match.

+// If the single-token deletion is successful, this method calls +// [ReportUnwantedToken] to Report the error, followed by +// [Consume] to actually “delete” the extraneous token. Then, +// before returning, [ReportMatch] is called to signal a successful +// Match. // -// @param recognizer the parser instance -// @return the successfully Matched {@link Token} instance if single-token -// deletion successfully recovers from the mismatched input, otherwise -// {@code nil} +// The func returns the successfully Matched [Token] instance if single-token +// deletion successfully recovers from the mismatched input, otherwise nil. func (d *DefaultErrorStrategy) SingleTokenDeletion(recognizer Parser) Token { NextTokenType := recognizer.GetTokenStream().LA(2) expecting := d.GetExpectedTokens(recognizer) @@ -467,24 +431,28 @@ func (d *DefaultErrorStrategy) SingleTokenDeletion(recognizer Parser) Token { return nil } -// Conjure up a missing token during error recovery. +// GetMissingSymbol conjures up a missing token during error recovery. // // The recognizer attempts to recover from single missing // symbols. But, actions might refer to that missing symbol. -// For example, x=ID {f($x)}. The action clearly assumes +// For example: +// +// x=ID {f($x)}. +// +// The action clearly assumes // that there has been an identifier Matched previously and that // $x points at that token. If that token is missing, but // the next token in the stream is what we want we assume that -// d token is missing and we keep going. Because we +// this token is missing, and we keep going. Because we // have to return some token to replace the missing token, // we have to conjure one up. This method gives the user control // over the tokens returned for missing tokens. Mostly, // you will want to create something special for identifier // tokens. For literals such as '{' and ',', the default // action in the parser or tree parser works. It simply creates -// a CommonToken of the appropriate type. The text will be the token. -// If you change what tokens must be created by the lexer, -// override d method to create the appropriate tokens. +// a [CommonToken] of the appropriate type. The text will be the token name. +// If you need to change which tokens must be created by the lexer, +// override this method to create the appropriate tokens. func (d *DefaultErrorStrategy) GetMissingSymbol(recognizer Parser) Token { currentSymbol := recognizer.GetCurrentToken() expecting := d.GetExpectedTokens(recognizer) @@ -498,7 +466,7 @@ func (d *DefaultErrorStrategy) GetMissingSymbol(recognizer Parser) Token { if expectedTokenType > 0 && expectedTokenType < len(ln) { tokenText = "" } else { - tokenText = "" // TODO matches the JS impl + tokenText = "" // TODO: matches the JS impl } } current := currentSymbol @@ -516,13 +484,13 @@ func (d *DefaultErrorStrategy) GetExpectedTokens(recognizer Parser) *IntervalSet return recognizer.GetExpectedTokens() } -// How should a token be displayed in an error message? The default -// is to display just the text, but during development you might -// want to have a lot of information spit out. Override in that case -// to use t.String() (which, for CommonToken, dumps everything about +// GetTokenErrorDisplay determines how a token should be displayed in an error message. +// The default is to display just the text, but during development you might +// want to have a lot of information spit out. Override this func in that case +// to use t.String() (which, for [CommonToken], dumps everything about // the token). This is better than forcing you to override a method in // your token objects because you don't have to go modify your lexer -// so that it creates a NewJava type. +// so that it creates a new type. func (d *DefaultErrorStrategy) GetTokenErrorDisplay(t Token) string { if t == nil { return "" @@ -545,52 +513,57 @@ func (d *DefaultErrorStrategy) escapeWSAndQuote(s string) string { return "'" + s + "'" } -// Compute the error recovery set for the current rule. During +// GetErrorRecoverySet computes the error recovery set for the current rule. During // rule invocation, the parser pushes the set of tokens that can -// follow that rule reference on the stack d amounts to +// follow that rule reference on the stack. This amounts to // computing FIRST of what follows the rule reference in the // enclosing rule. See LinearApproximator.FIRST(). +// // This local follow set only includes tokens // from within the rule i.e., the FIRST computation done by // ANTLR stops at the end of a rule. // -// # EXAMPLE +// # Example // // When you find a "no viable alt exception", the input is not // consistent with any of the alternatives for rule r. The best // thing to do is to consume tokens until you see something that -// can legally follow a call to r//or* any rule that called r. +// can legally follow a call to r or any rule that called r. // You don't want the exact set of viable next tokens because the // input might just be missing a token--you might consume the // rest of the input looking for one of the missing tokens. // -// Consider grammar: +// Consider the grammar: +// +// a : '[' b ']' +// | '(' b ')' +// ; // -// a : '[' b ']' -// | '(' b ')' +// b : c '^' INT +// ; // -// b : c '^' INT -// c : ID -// | INT +// c : ID +// | INT +// ; // // At each rule invocation, the set of tokens that could follow // that rule is pushed on a stack. Here are the various // context-sensitive follow sets: // -// FOLLOW(b1_in_a) = FIRST(']') = ']' -// FOLLOW(b2_in_a) = FIRST(')') = ')' -// FOLLOW(c_in_b) = FIRST('^') = '^' +// FOLLOW(b1_in_a) = FIRST(']') = ']' +// FOLLOW(b2_in_a) = FIRST(')') = ')' +// FOLLOW(c_in_b) = FIRST('^') = '^' // -// Upon erroneous input "[]", the call chain is +// Upon erroneous input “[]”, the call chain is // -// a -> b -> c +// a → b → c // // and, hence, the follow context stack is: // -// depth follow set start of rule execution -// 0 a (from main()) -// 1 ']' b -// 2 '^' c +// Depth Follow set Start of rule execution +// 0 a (from main()) +// 1 ']' b +// 2 '^' c // // Notice that ')' is not included, because b would have to have // been called from a different context in rule a for ')' to be @@ -598,11 +571,14 @@ func (d *DefaultErrorStrategy) escapeWSAndQuote(s string) string { // // For error recovery, we cannot consider FOLLOW(c) // (context-sensitive or otherwise). We need the combined set of -// all context-sensitive FOLLOW sets--the set of all tokens that +// all context-sensitive FOLLOW sets - the set of all tokens that // could follow any reference in the call chain. We need to // reSync to one of those tokens. Note that FOLLOW(c)='^' and if // we reSync'd to that token, we'd consume until EOF. We need to -// Sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}. +// Sync to context-sensitive FOLLOWs for a, b, and c: +// +// {']','^'} +// // In this case, for input "[]", LA(1) is ']' and in the set, so we would // not consume anything. After printing an error, rule c would // return normally. Rule b would not find the required '^' though. @@ -620,22 +596,19 @@ func (d *DefaultErrorStrategy) escapeWSAndQuote(s string) string { // // ANTLR's error recovery mechanism is based upon original ideas: // -// "Algorithms + Data Structures = Programs" by Niklaus Wirth -// -// and -// -// "A note on error recovery in recursive descent parsers": -// http://portal.acm.org/citation.cfm?id=947902.947905 +// [Algorithms + Data Structures = Programs] by Niklaus Wirth and +// [A note on error recovery in recursive descent parsers]. // -// Later, Josef Grosch had some good ideas: +// Later, Josef Grosch had some good ideas in [Efficient and Comfortable Error Recovery in Recursive Descent +// Parsers] // -// "Efficient and Comfortable Error Recovery in Recursive Descent -// Parsers": -// ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip +// Like Grosch I implement context-sensitive FOLLOW sets that are combined at run-time upon error to avoid overhead +// during parsing. Later, the runtime Sync was improved for loops/sub-rules see [Sync] docs // -// Like Grosch I implement context-sensitive FOLLOW sets that are combined -// at run-time upon error to avoid overhead during parsing. -func (d *DefaultErrorStrategy) getErrorRecoverySet(recognizer Parser) *IntervalSet { +// [A note on error recovery in recursive descent parsers]: http://portal.acm.org/citation.cfm?id=947902.947905 +// [Algorithms + Data Structures = Programs]: https://t.ly/5QzgE +// [Efficient and Comfortable Error Recovery in Recursive Descent Parsers]: ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip +func (d *DefaultErrorStrategy) GetErrorRecoverySet(recognizer Parser) *IntervalSet { atn := recognizer.GetInterpreter().atn ctx := recognizer.GetParserRuleContext() recoverSet := NewIntervalSet() @@ -660,40 +633,36 @@ func (d *DefaultErrorStrategy) consumeUntil(recognizer Parser, set *IntervalSet) } } -// -// This implementation of {@link ANTLRErrorStrategy} responds to syntax errors +// The BailErrorStrategy implementation of ANTLRErrorStrategy responds to syntax errors // by immediately canceling the parse operation with a -// {@link ParseCancellationException}. The implementation ensures that the -// {@link ParserRuleContext//exception} field is set for all parse tree nodes +// [ParseCancellationException]. The implementation ensures that the +// [ParserRuleContext//exception] field is set for all parse tree nodes // that were not completed prior to encountering the error. // -//

-// This error strategy is useful in the following scenarios.

+// This error strategy is useful in the following scenarios. // -//
    -//
  • Two-stage parsing: This error strategy allows the first -// stage of two-stage parsing to immediately terminate if an error is -// encountered, and immediately fall back to the second stage. In addition to -// avoiding wasted work by attempting to recover from errors here, the empty -// implementation of {@link BailErrorStrategy//Sync} improves the performance of -// the first stage.
  • -//
  • Silent validation: When syntax errors are not being -// Reported or logged, and the parse result is simply ignored if errors occur, -// the {@link BailErrorStrategy} avoids wasting work on recovering from errors -// when the result will be ignored either way.
  • -//
+// - Two-stage parsing: This error strategy allows the first +// stage of two-stage parsing to immediately terminate if an error is +// encountered, and immediately fall back to the second stage. In addition to +// avoiding wasted work by attempting to recover from errors here, the empty +// implementation of [BailErrorStrategy.Sync] improves the performance of +// the first stage. // -//

-// {@code myparser.setErrorHandler(NewBailErrorStrategy())}

+// - Silent validation: When syntax errors are not being +// Reported or logged, and the parse result is simply ignored if errors occur, +// the [BailErrorStrategy] avoids wasting work on recovering from errors +// when the result will be ignored either way. // -// @see Parser//setErrorHandler(ANTLRErrorStrategy) - +// myparser.SetErrorHandler(NewBailErrorStrategy()) +// +// See also: [Parser.SetErrorHandler(ANTLRErrorStrategy)] type BailErrorStrategy struct { *DefaultErrorStrategy } var _ ErrorStrategy = &BailErrorStrategy{} +//goland:noinspection GoUnusedExportedFunction func NewBailErrorStrategy() *BailErrorStrategy { b := new(BailErrorStrategy) @@ -703,10 +672,10 @@ func NewBailErrorStrategy() *BailErrorStrategy { return b } -// Instead of recovering from exception {@code e}, re-panic it wrapped -// in a {@link ParseCancellationException} so it is not caught by the -// rule func catches. Use {@link Exception//getCause()} to get the -// original {@link RecognitionException}. +// Recover Instead of recovering from exception e, re-panic it wrapped +// in a [ParseCancellationException] so it is not caught by the +// rule func catches. Use Exception.GetCause() to get the +// original [RecognitionException]. func (b *BailErrorStrategy) Recover(recognizer Parser, e RecognitionException) { context := recognizer.GetParserRuleContext() for context != nil { @@ -717,10 +686,10 @@ func (b *BailErrorStrategy) Recover(recognizer Parser, e RecognitionException) { context = nil } } - panic(NewParseCancellationException()) // TODO we don't emit e properly + recognizer.SetError(NewParseCancellationException()) // TODO: we don't emit e properly } -// Make sure we don't attempt to recover inline if the parser +// RecoverInline makes sure we don't attempt to recover inline if the parser // successfully recovers, it won't panic an exception. func (b *BailErrorStrategy) RecoverInline(recognizer Parser) Token { b.Recover(recognizer, NewInputMisMatchException(recognizer)) @@ -728,7 +697,6 @@ func (b *BailErrorStrategy) RecoverInline(recognizer Parser) Token { return nil } -// Make sure we don't attempt to recover from problems in subrules.// -func (b *BailErrorStrategy) Sync(recognizer Parser) { - // pass +// Sync makes sure we don't attempt to recover from problems in sub-rules. +func (b *BailErrorStrategy) Sync(_ Parser) { } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/errors.go b/vendor/github.com/antlr4-go/antlr/v4/errors.go similarity index 73% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/errors.go rename to vendor/github.com/antlr4-go/antlr/v4/errors.go index 3954c137829..8f0f2f601fd 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/errors.go +++ b/vendor/github.com/antlr4-go/antlr/v4/errors.go @@ -35,7 +35,7 @@ func NewBaseRecognitionException(message string, recognizer Recognizer, input In // } else { // stack := NewError().stack // } - // TODO may be able to use - "runtime" func Stack(buf []byte, all bool) int + // TODO: may be able to use - "runtime" func Stack(buf []byte, all bool) int t := new(BaseRecognitionException) @@ -43,15 +43,17 @@ func NewBaseRecognitionException(message string, recognizer Recognizer, input In t.recognizer = recognizer t.input = input t.ctx = ctx - // The current {@link Token} when an error occurred. Since not all streams + + // The current Token when an error occurred. Since not all streams // support accessing symbols by index, we have to track the {@link Token} // instance itself. + // t.offendingToken = nil + // Get the ATN state number the parser was in at the time the error - // occurred. For {@link NoViableAltException} and - // {@link LexerNoViableAltException} exceptions, this is the - // {@link DecisionState} number. For others, it is the state whose outgoing - // edge we couldn't Match. + // occurred. For NoViableAltException and LexerNoViableAltException exceptions, this is the + // DecisionState number. For others, it is the state whose outgoing edge we couldn't Match. + // t.offendingState = -1 if t.recognizer != nil { t.offendingState = t.recognizer.GetState() @@ -74,15 +76,15 @@ func (b *BaseRecognitionException) GetInputStream() IntStream { //

If the state number is not known, b method returns -1.

-// Gets the set of input symbols which could potentially follow the -// previously Matched symbol at the time b exception was panicn. +// getExpectedTokens gets the set of input symbols which could potentially follow the +// previously Matched symbol at the time this exception was raised. // -//

If the set of expected tokens is not known and could not be computed, -// b method returns {@code nil}.

+// If the set of expected tokens is not known and could not be computed, +// this method returns nil. // -// @return The set of token types that could potentially follow the current -// state in the ATN, or {@code nil} if the information is not available. -// / +// The func returns the set of token types that could potentially follow the current +// state in the {ATN}, or nil if the information is not available. + func (b *BaseRecognitionException) getExpectedTokens() *IntervalSet { if b.recognizer != nil { return b.recognizer.GetATN().getExpectedTokens(b.offendingState, b.ctx) @@ -99,10 +101,10 @@ type LexerNoViableAltException struct { *BaseRecognitionException startIndex int - deadEndConfigs ATNConfigSet + deadEndConfigs *ATNConfigSet } -func NewLexerNoViableAltException(lexer Lexer, input CharStream, startIndex int, deadEndConfigs ATNConfigSet) *LexerNoViableAltException { +func NewLexerNoViableAltException(lexer Lexer, input CharStream, startIndex int, deadEndConfigs *ATNConfigSet) *LexerNoViableAltException { l := new(LexerNoViableAltException) @@ -128,14 +130,16 @@ type NoViableAltException struct { startToken Token offendingToken Token ctx ParserRuleContext - deadEndConfigs ATNConfigSet + deadEndConfigs *ATNConfigSet } -// Indicates that the parser could not decide which of two or more paths +// NewNoViableAltException creates an exception indicating that the parser could not decide which of two or more paths // to take based upon the remaining input. It tracks the starting token // of the offending input and also knows where the parser was -// in the various paths when the error. Reported by ReportNoViableAlternative() -func NewNoViableAltException(recognizer Parser, input TokenStream, startToken Token, offendingToken Token, deadEndConfigs ATNConfigSet, ctx ParserRuleContext) *NoViableAltException { +// in the various paths when the error. +// +// Reported by [ReportNoViableAlternative] +func NewNoViableAltException(recognizer Parser, input TokenStream, startToken Token, offendingToken Token, deadEndConfigs *ATNConfigSet, ctx ParserRuleContext) *NoViableAltException { if ctx == nil { ctx = recognizer.GetParserRuleContext() @@ -157,12 +161,14 @@ func NewNoViableAltException(recognizer Parser, input TokenStream, startToken To n.BaseRecognitionException = NewBaseRecognitionException("", recognizer, input, ctx) // Which configurations did we try at input.Index() that couldn't Match - // input.LT(1)?// + // input.LT(1) n.deadEndConfigs = deadEndConfigs + // The token object at the start index the input stream might - // not be buffering tokens so get a reference to it. (At the - // time the error occurred, of course the stream needs to keep a - // buffer all of the tokens but later we might not have access to those.) + // not be buffering tokens so get a reference to it. + // + // At the time the error occurred, of course the stream needs to keep a + // buffer of all the tokens, but later we might not have access to those. n.startToken = startToken n.offendingToken = offendingToken @@ -173,7 +179,7 @@ type InputMisMatchException struct { *BaseRecognitionException } -// This signifies any kind of mismatched input exceptions such as +// NewInputMisMatchException creates an exception that signifies any kind of mismatched input exceptions such as // when the current input does not Match the expected token. func NewInputMisMatchException(recognizer Parser) *InputMisMatchException { @@ -186,11 +192,10 @@ func NewInputMisMatchException(recognizer Parser) *InputMisMatchException { } -// A semantic predicate failed during validation. Validation of predicates +// FailedPredicateException indicates that a semantic predicate failed during validation. Validation of predicates // occurs when normally parsing the alternative just like Matching a token. // Disambiguating predicate evaluation occurs when we test a predicate during // prediction. - type FailedPredicateException struct { *BaseRecognitionException @@ -199,6 +204,7 @@ type FailedPredicateException struct { predicate string } +//goland:noinspection GoUnusedExportedFunction func NewFailedPredicateException(recognizer Parser, predicate string, message string) *FailedPredicateException { f := new(FailedPredicateException) @@ -231,6 +237,21 @@ func (f *FailedPredicateException) formatMessage(predicate, message string) stri type ParseCancellationException struct { } +func (p ParseCancellationException) GetOffendingToken() Token { + //TODO implement me + panic("implement me") +} + +func (p ParseCancellationException) GetMessage() string { + //TODO implement me + panic("implement me") +} + +func (p ParseCancellationException) GetInputStream() IntStream { + //TODO implement me + panic("implement me") +} + func NewParseCancellationException() *ParseCancellationException { // Error.call(this) // Error.captureStackTrace(this, ParseCancellationException) diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/file_stream.go b/vendor/github.com/antlr4-go/antlr/v4/file_stream.go similarity index 52% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/file_stream.go rename to vendor/github.com/antlr4-go/antlr/v4/file_stream.go index bd6ad5efe3d..5f65f809be5 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/file_stream.go +++ b/vendor/github.com/antlr4-go/antlr/v4/file_stream.go @@ -5,8 +5,7 @@ package antlr import ( - "bytes" - "io" + "bufio" "os" ) @@ -14,34 +13,53 @@ import ( // when you construct the object. type FileStream struct { - *InputStream - + InputStream filename string } +//goland:noinspection GoUnusedExportedFunction func NewFileStream(fileName string) (*FileStream, error) { - buf := bytes.NewBuffer(nil) - f, err := os.Open(fileName) if err != nil { return nil, err } - defer f.Close() - _, err = io.Copy(buf, f) + + defer func(f *os.File) { + errF := f.Close() + if errF != nil { + } + }(f) + + reader := bufio.NewReader(f) + fInfo, err := f.Stat() if err != nil { return nil, err } - fs := new(FileStream) - - fs.filename = fileName - s := string(buf.Bytes()) + fs := &FileStream{ + InputStream: InputStream{ + index: 0, + name: fileName, + }, + filename: fileName, + } - fs.InputStream = NewInputStream(s) + // Pre-build the buffer and read runes efficiently + // + fs.data = make([]rune, 0, fInfo.Size()) + for { + r, _, err := reader.ReadRune() + if err != nil { + break + } + fs.data = append(fs.data, r) + } + fs.size = len(fs.data) // Size in runes + // All done. + // return fs, nil - } func (f *FileStream) GetSourceName() string { diff --git a/vendor/github.com/antlr4-go/antlr/v4/input_stream.go b/vendor/github.com/antlr4-go/antlr/v4/input_stream.go new file mode 100644 index 00000000000..b737fe85fbd --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/input_stream.go @@ -0,0 +1,157 @@ +// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. +// Use of this file is governed by the BSD 3-clause license that +// can be found in the LICENSE.txt file in the project root. + +package antlr + +import ( + "bufio" + "io" +) + +type InputStream struct { + name string + index int + data []rune + size int +} + +// NewIoStream creates a new input stream from the given io.Reader reader. +// Note that the reader is read completely into memory and so it must actually +// have a stopping point - you cannot pass in a reader on an open-ended source such +// as a socket for instance. +func NewIoStream(reader io.Reader) *InputStream { + + rReader := bufio.NewReader(reader) + + is := &InputStream{ + name: "", + index: 0, + } + + // Pre-build the buffer and read runes reasonably efficiently given that + // we don't exactly know how big the input is. + // + is.data = make([]rune, 0, 512) + for { + r, _, err := rReader.ReadRune() + if err != nil { + break + } + is.data = append(is.data, r) + } + is.size = len(is.data) // number of runes + return is +} + +// NewInputStream creates a new input stream from the given string +func NewInputStream(data string) *InputStream { + + is := &InputStream{ + name: "", + index: 0, + data: []rune(data), // This is actually the most efficient way + } + is.size = len(is.data) // number of runes, but we could also use len(data), which is efficient too + return is +} + +func (is *InputStream) reset() { + is.index = 0 +} + +// Consume moves the input pointer to the next character in the input stream +func (is *InputStream) Consume() { + if is.index >= is.size { + // assert is.LA(1) == TokenEOF + panic("cannot consume EOF") + } + is.index++ +} + +// LA returns the character at the given offset from the start of the input stream +func (is *InputStream) LA(offset int) int { + + if offset == 0 { + return 0 // nil + } + if offset < 0 { + offset++ // e.g., translate LA(-1) to use offset=0 + } + pos := is.index + offset - 1 + + if pos < 0 || pos >= is.size { // invalid + return TokenEOF + } + + return int(is.data[pos]) +} + +// LT returns the character at the given offset from the start of the input stream +func (is *InputStream) LT(offset int) int { + return is.LA(offset) +} + +// Index returns the current offset in to the input stream +func (is *InputStream) Index() int { + return is.index +} + +// Size returns the total number of characters in the input stream +func (is *InputStream) Size() int { + return is.size +} + +// Mark does nothing here as we have entire buffer +func (is *InputStream) Mark() int { + return -1 +} + +// Release does nothing here as we have entire buffer +func (is *InputStream) Release(_ int) { +} + +// Seek the input point to the provided index offset +func (is *InputStream) Seek(index int) { + if index <= is.index { + is.index = index // just jump don't update stream state (line,...) + return + } + // seek forward + is.index = intMin(index, is.size) +} + +// GetText returns the text from the input stream from the start to the stop index +func (is *InputStream) GetText(start int, stop int) string { + if stop >= is.size { + stop = is.size - 1 + } + if start >= is.size { + return "" + } + + return string(is.data[start : stop+1]) +} + +// GetTextFromTokens returns the text from the input stream from the first character of the start token to the last +// character of the stop token +func (is *InputStream) GetTextFromTokens(start, stop Token) string { + if start != nil && stop != nil { + return is.GetTextFromInterval(NewInterval(start.GetTokenIndex(), stop.GetTokenIndex())) + } + + return "" +} + +func (is *InputStream) GetTextFromInterval(i Interval) string { + return is.GetText(i.Start, i.Stop) +} + +func (*InputStream) GetSourceName() string { + return "" +} + +// String returns the entire input stream as a string +func (is *InputStream) String() string { + return string(is.data) +} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/int_stream.go b/vendor/github.com/antlr4-go/antlr/v4/int_stream.go similarity index 100% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/int_stream.go rename to vendor/github.com/antlr4-go/antlr/v4/int_stream.go diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/interval_set.go b/vendor/github.com/antlr4-go/antlr/v4/interval_set.go similarity index 82% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/interval_set.go rename to vendor/github.com/antlr4-go/antlr/v4/interval_set.go index c1e155e8180..cc5066067a2 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/interval_set.go +++ b/vendor/github.com/antlr4-go/antlr/v4/interval_set.go @@ -14,20 +14,21 @@ type Interval struct { Stop int } -/* stop is not included! */ -func NewInterval(start, stop int) *Interval { - i := new(Interval) - - i.Start = start - i.Stop = stop - return i +// NewInterval creates a new interval with the given start and stop values. +func NewInterval(start, stop int) Interval { + return Interval{ + Start: start, + Stop: stop, + } } -func (i *Interval) Contains(item int) bool { +// Contains returns true if the given item is contained within the interval. +func (i Interval) Contains(item int) bool { return item >= i.Start && item < i.Stop } -func (i *Interval) String() string { +// String generates a string representation of the interval. +func (i Interval) String() string { if i.Start == i.Stop-1 { return strconv.Itoa(i.Start) } @@ -35,15 +36,18 @@ func (i *Interval) String() string { return strconv.Itoa(i.Start) + ".." + strconv.Itoa(i.Stop-1) } -func (i *Interval) length() int { +// Length returns the length of the interval. +func (i Interval) Length() int { return i.Stop - i.Start } +// IntervalSet represents a collection of [Intervals], which may be read-only. type IntervalSet struct { - intervals []*Interval + intervals []Interval readOnly bool } +// NewIntervalSet creates a new empty, writable, interval set. func NewIntervalSet() *IntervalSet { i := new(IntervalSet) @@ -54,6 +58,20 @@ func NewIntervalSet() *IntervalSet { return i } +func (i *IntervalSet) Equals(other *IntervalSet) bool { + if len(i.intervals) != len(other.intervals) { + return false + } + + for k, v := range i.intervals { + if v.Start != other.intervals[k].Start || v.Stop != other.intervals[k].Stop { + return false + } + } + + return true +} + func (i *IntervalSet) first() int { if len(i.intervals) == 0 { return TokenInvalidType @@ -70,16 +88,16 @@ func (i *IntervalSet) addRange(l, h int) { i.addInterval(NewInterval(l, h+1)) } -func (i *IntervalSet) addInterval(v *Interval) { +func (i *IntervalSet) addInterval(v Interval) { if i.intervals == nil { - i.intervals = make([]*Interval, 0) + i.intervals = make([]Interval, 0) i.intervals = append(i.intervals, v) } else { // find insert pos for k, interval := range i.intervals { // distinct range -> insert if v.Stop < interval.Start { - i.intervals = append(i.intervals[0:k], append([]*Interval{v}, i.intervals[k:]...)...) + i.intervals = append(i.intervals[0:k], append([]Interval{v}, i.intervals[k:]...)...) return } else if v.Stop == interval.Start { i.intervals[k].Start = v.Start @@ -139,16 +157,16 @@ func (i *IntervalSet) contains(item int) bool { } func (i *IntervalSet) length() int { - len := 0 + iLen := 0 for _, v := range i.intervals { - len += v.length() + iLen += v.Length() } - return len + return iLen } -func (i *IntervalSet) removeRange(v *Interval) { +func (i *IntervalSet) removeRange(v Interval) { if v.Start == v.Stop-1 { i.removeOne(v.Start) } else if i.intervals != nil { @@ -162,7 +180,7 @@ func (i *IntervalSet) removeRange(v *Interval) { i.intervals[k] = NewInterval(ni.Start, v.Start) x := NewInterval(v.Stop, ni.Stop) // i.intervals.splice(k, 0, x) - i.intervals = append(i.intervals[0:k], append([]*Interval{x}, i.intervals[k:]...)...) + i.intervals = append(i.intervals[0:k], append([]Interval{x}, i.intervals[k:]...)...) return } else if v.Start <= ni.Start && v.Stop >= ni.Stop { // i.intervals.splice(k, 1) @@ -199,7 +217,7 @@ func (i *IntervalSet) removeOne(v int) { x := NewInterval(ki.Start, v) ki.Start = v + 1 // i.intervals.splice(k, 0, x) - i.intervals = append(i.intervals[0:k], append([]*Interval{x}, i.intervals[k:]...)...) + i.intervals = append(i.intervals[0:k], append([]Interval{x}, i.intervals[k:]...)...) return } } @@ -223,7 +241,7 @@ func (i *IntervalSet) StringVerbose(literalNames []string, symbolicNames []strin return i.toIndexString() } -func (i *IntervalSet) GetIntervals() []*Interval { +func (i *IntervalSet) GetIntervals() []Interval { return i.intervals } diff --git a/vendor/github.com/antlr4-go/antlr/v4/jcollect.go b/vendor/github.com/antlr4-go/antlr/v4/jcollect.go new file mode 100644 index 00000000000..ceccd96d258 --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/jcollect.go @@ -0,0 +1,685 @@ +package antlr + +// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. +// Use of this file is governed by the BSD 3-clause license that +// can be found in the LICENSE.txt file in the project root. + +import ( + "container/list" + "runtime/debug" + "sort" + "sync" +) + +// Collectable is an interface that a struct should implement if it is to be +// usable as a key in these collections. +type Collectable[T any] interface { + Hash() int + Equals(other Collectable[T]) bool +} + +type Comparator[T any] interface { + Hash1(o T) int + Equals2(T, T) bool +} + +type CollectionSource int +type CollectionDescriptor struct { + SybolicName string + Description string +} + +const ( + UnknownCollection CollectionSource = iota + ATNConfigLookupCollection + ATNStateCollection + DFAStateCollection + ATNConfigCollection + PredictionContextCollection + SemanticContextCollection + ClosureBusyCollection + PredictionVisitedCollection + MergeCacheCollection + PredictionContextCacheCollection + AltSetCollection + ReachSetCollection +) + +var CollectionDescriptors = map[CollectionSource]CollectionDescriptor{ + UnknownCollection: { + SybolicName: "UnknownCollection", + Description: "Unknown collection type. Only used if the target author thought it was an unimportant collection.", + }, + ATNConfigCollection: { + SybolicName: "ATNConfigCollection", + Description: "ATNConfig collection. Used to store the ATNConfigs for a particular state in the ATN." + + "For instance, it is used to store the results of the closure() operation in the ATN.", + }, + ATNConfigLookupCollection: { + SybolicName: "ATNConfigLookupCollection", + Description: "ATNConfigLookup collection. Used to store the ATNConfigs for a particular state in the ATN." + + "This is used to prevent duplicating equivalent states in an ATNConfigurationSet.", + }, + ATNStateCollection: { + SybolicName: "ATNStateCollection", + Description: "ATNState collection. This is used to store the states of the ATN.", + }, + DFAStateCollection: { + SybolicName: "DFAStateCollection", + Description: "DFAState collection. This is used to store the states of the DFA.", + }, + PredictionContextCollection: { + SybolicName: "PredictionContextCollection", + Description: "PredictionContext collection. This is used to store the prediction contexts of the ATN and cache computes.", + }, + SemanticContextCollection: { + SybolicName: "SemanticContextCollection", + Description: "SemanticContext collection. This is used to store the semantic contexts of the ATN.", + }, + ClosureBusyCollection: { + SybolicName: "ClosureBusyCollection", + Description: "ClosureBusy collection. This is used to check and prevent infinite recursion right recursive rules." + + "It stores ATNConfigs that are currently being processed in the closure() operation.", + }, + PredictionVisitedCollection: { + SybolicName: "PredictionVisitedCollection", + Description: "A map that records whether we have visited a particular context when searching through cached entries.", + }, + MergeCacheCollection: { + SybolicName: "MergeCacheCollection", + Description: "A map that records whether we have already merged two particular contexts and can save effort by not repeating it.", + }, + PredictionContextCacheCollection: { + SybolicName: "PredictionContextCacheCollection", + Description: "A map that records whether we have already created a particular context and can save effort by not computing it again.", + }, + AltSetCollection: { + SybolicName: "AltSetCollection", + Description: "Used to eliminate duplicate alternatives in an ATN config set.", + }, + ReachSetCollection: { + SybolicName: "ReachSetCollection", + Description: "Used as merge cache to prevent us needing to compute the merge of two states if we have already done it.", + }, +} + +// JStore implements a container that allows the use of a struct to calculate the key +// for a collection of values akin to map. This is not meant to be a full-blown HashMap but just +// serve the needs of the ANTLR Go runtime. +// +// For ease of porting the logic of the runtime from the master target (Java), this collection +// operates in a similar way to Java, in that it can use any struct that supplies a Hash() and Equals() +// function as the key. The values are stored in a standard go map which internally is a form of hashmap +// itself, the key for the go map is the hash supplied by the key object. The collection is able to deal with +// hash conflicts by using a simple slice of values associated with the hash code indexed bucket. That isn't +// particularly efficient, but it is simple, and it works. As this is specifically for the ANTLR runtime, and +// we understand the requirements, then this is fine - this is not a general purpose collection. +type JStore[T any, C Comparator[T]] struct { + store map[int][]T + len int + comparator Comparator[T] + stats *JStatRec +} + +func NewJStore[T any, C Comparator[T]](comparator Comparator[T], cType CollectionSource, desc string) *JStore[T, C] { + + if comparator == nil { + panic("comparator cannot be nil") + } + + s := &JStore[T, C]{ + store: make(map[int][]T, 1), + comparator: comparator, + } + if collectStats { + s.stats = &JStatRec{ + Source: cType, + Description: desc, + } + + // Track where we created it from if we are being asked to do so + if runtimeConfig.statsTraceStacks { + s.stats.CreateStack = debug.Stack() + } + Statistics.AddJStatRec(s.stats) + } + return s +} + +// Put will store given value in the collection. Note that the key for storage is generated from +// the value itself - this is specifically because that is what ANTLR needs - this would not be useful +// as any kind of general collection. +// +// If the key has a hash conflict, then the value will be added to the slice of values associated with the +// hash, unless the value is already in the slice, in which case the existing value is returned. Value equivalence is +// tested by calling the equals() method on the key. +// +// # If the given value is already present in the store, then the existing value is returned as v and exists is set to true +// +// If the given value is not present in the store, then the value is added to the store and returned as v and exists is set to false. +func (s *JStore[T, C]) Put(value T) (v T, exists bool) { + + if collectStats { + s.stats.Puts++ + } + kh := s.comparator.Hash1(value) + + var hClash bool + for _, v1 := range s.store[kh] { + hClash = true + if s.comparator.Equals2(value, v1) { + if collectStats { + s.stats.PutHits++ + s.stats.PutHashConflicts++ + } + return v1, true + } + if collectStats { + s.stats.PutMisses++ + } + } + if collectStats && hClash { + s.stats.PutHashConflicts++ + } + s.store[kh] = append(s.store[kh], value) + + if collectStats { + if len(s.store[kh]) > s.stats.MaxSlotSize { + s.stats.MaxSlotSize = len(s.store[kh]) + } + } + s.len++ + if collectStats { + s.stats.CurSize = s.len + if s.len > s.stats.MaxSize { + s.stats.MaxSize = s.len + } + } + return value, false +} + +// Get will return the value associated with the key - the type of the key is the same type as the value +// which would not generally be useful, but this is a specific thing for ANTLR where the key is +// generated using the object we are going to store. +func (s *JStore[T, C]) Get(key T) (T, bool) { + if collectStats { + s.stats.Gets++ + } + kh := s.comparator.Hash1(key) + var hClash bool + for _, v := range s.store[kh] { + hClash = true + if s.comparator.Equals2(key, v) { + if collectStats { + s.stats.GetHits++ + s.stats.GetHashConflicts++ + } + return v, true + } + if collectStats { + s.stats.GetMisses++ + } + } + if collectStats { + if hClash { + s.stats.GetHashConflicts++ + } + s.stats.GetNoEnt++ + } + return key, false +} + +// Contains returns true if the given key is present in the store +func (s *JStore[T, C]) Contains(key T) bool { + _, present := s.Get(key) + return present +} + +func (s *JStore[T, C]) SortedSlice(less func(i, j T) bool) []T { + vs := make([]T, 0, len(s.store)) + for _, v := range s.store { + vs = append(vs, v...) + } + sort.Slice(vs, func(i, j int) bool { + return less(vs[i], vs[j]) + }) + + return vs +} + +func (s *JStore[T, C]) Each(f func(T) bool) { + for _, e := range s.store { + for _, v := range e { + f(v) + } + } +} + +func (s *JStore[T, C]) Len() int { + return s.len +} + +func (s *JStore[T, C]) Values() []T { + vs := make([]T, 0, len(s.store)) + for _, e := range s.store { + vs = append(vs, e...) + } + return vs +} + +type entry[K, V any] struct { + key K + val V +} + +type JMap[K, V any, C Comparator[K]] struct { + store map[int][]*entry[K, V] + len int + comparator Comparator[K] + stats *JStatRec +} + +func NewJMap[K, V any, C Comparator[K]](comparator Comparator[K], cType CollectionSource, desc string) *JMap[K, V, C] { + m := &JMap[K, V, C]{ + store: make(map[int][]*entry[K, V], 1), + comparator: comparator, + } + if collectStats { + m.stats = &JStatRec{ + Source: cType, + Description: desc, + } + // Track where we created it from if we are being asked to do so + if runtimeConfig.statsTraceStacks { + m.stats.CreateStack = debug.Stack() + } + Statistics.AddJStatRec(m.stats) + } + return m +} + +func (m *JMap[K, V, C]) Put(key K, val V) (V, bool) { + if collectStats { + m.stats.Puts++ + } + kh := m.comparator.Hash1(key) + + var hClash bool + for _, e := range m.store[kh] { + hClash = true + if m.comparator.Equals2(e.key, key) { + if collectStats { + m.stats.PutHits++ + m.stats.PutHashConflicts++ + } + return e.val, true + } + if collectStats { + m.stats.PutMisses++ + } + } + if collectStats { + if hClash { + m.stats.PutHashConflicts++ + } + } + m.store[kh] = append(m.store[kh], &entry[K, V]{key, val}) + if collectStats { + if len(m.store[kh]) > m.stats.MaxSlotSize { + m.stats.MaxSlotSize = len(m.store[kh]) + } + } + m.len++ + if collectStats { + m.stats.CurSize = m.len + if m.len > m.stats.MaxSize { + m.stats.MaxSize = m.len + } + } + return val, false +} + +func (m *JMap[K, V, C]) Values() []V { + vs := make([]V, 0, len(m.store)) + for _, e := range m.store { + for _, v := range e { + vs = append(vs, v.val) + } + } + return vs +} + +func (m *JMap[K, V, C]) Get(key K) (V, bool) { + if collectStats { + m.stats.Gets++ + } + var none V + kh := m.comparator.Hash1(key) + var hClash bool + for _, e := range m.store[kh] { + hClash = true + if m.comparator.Equals2(e.key, key) { + if collectStats { + m.stats.GetHits++ + m.stats.GetHashConflicts++ + } + return e.val, true + } + if collectStats { + m.stats.GetMisses++ + } + } + if collectStats { + if hClash { + m.stats.GetHashConflicts++ + } + m.stats.GetNoEnt++ + } + return none, false +} + +func (m *JMap[K, V, C]) Len() int { + return m.len +} + +func (m *JMap[K, V, C]) Delete(key K) { + kh := m.comparator.Hash1(key) + for i, e := range m.store[kh] { + if m.comparator.Equals2(e.key, key) { + m.store[kh] = append(m.store[kh][:i], m.store[kh][i+1:]...) + m.len-- + return + } + } +} + +func (m *JMap[K, V, C]) Clear() { + m.store = make(map[int][]*entry[K, V]) +} + +type JPCMap struct { + store *JMap[*PredictionContext, *JMap[*PredictionContext, *PredictionContext, *ObjEqComparator[*PredictionContext]], *ObjEqComparator[*PredictionContext]] + size int + stats *JStatRec +} + +func NewJPCMap(cType CollectionSource, desc string) *JPCMap { + m := &JPCMap{ + store: NewJMap[*PredictionContext, *JMap[*PredictionContext, *PredictionContext, *ObjEqComparator[*PredictionContext]], *ObjEqComparator[*PredictionContext]](pContextEqInst, cType, desc), + } + if collectStats { + m.stats = &JStatRec{ + Source: cType, + Description: desc, + } + // Track where we created it from if we are being asked to do so + if runtimeConfig.statsTraceStacks { + m.stats.CreateStack = debug.Stack() + } + Statistics.AddJStatRec(m.stats) + } + return m +} + +func (pcm *JPCMap) Get(k1, k2 *PredictionContext) (*PredictionContext, bool) { + if collectStats { + pcm.stats.Gets++ + } + // Do we have a map stored by k1? + // + m2, present := pcm.store.Get(k1) + if present { + if collectStats { + pcm.stats.GetHits++ + } + // We found a map of values corresponding to k1, so now we need to look up k2 in that map + // + return m2.Get(k2) + } + if collectStats { + pcm.stats.GetMisses++ + } + return nil, false +} + +func (pcm *JPCMap) Put(k1, k2, v *PredictionContext) { + + if collectStats { + pcm.stats.Puts++ + } + // First does a map already exist for k1? + // + if m2, present := pcm.store.Get(k1); present { + if collectStats { + pcm.stats.PutHits++ + } + _, present = m2.Put(k2, v) + if !present { + pcm.size++ + if collectStats { + pcm.stats.CurSize = pcm.size + if pcm.size > pcm.stats.MaxSize { + pcm.stats.MaxSize = pcm.size + } + } + } + } else { + // No map found for k1, so we create it, add in our value, then store is + // + if collectStats { + pcm.stats.PutMisses++ + m2 = NewJMap[*PredictionContext, *PredictionContext, *ObjEqComparator[*PredictionContext]](pContextEqInst, pcm.stats.Source, pcm.stats.Description+" map entry") + } else { + m2 = NewJMap[*PredictionContext, *PredictionContext, *ObjEqComparator[*PredictionContext]](pContextEqInst, PredictionContextCacheCollection, "map entry") + } + + m2.Put(k2, v) + pcm.store.Put(k1, m2) + pcm.size++ + } +} + +type JPCMap2 struct { + store map[int][]JPCEntry + size int + stats *JStatRec +} + +type JPCEntry struct { + k1, k2, v *PredictionContext +} + +func NewJPCMap2(cType CollectionSource, desc string) *JPCMap2 { + m := &JPCMap2{ + store: make(map[int][]JPCEntry, 1000), + } + if collectStats { + m.stats = &JStatRec{ + Source: cType, + Description: desc, + } + // Track where we created it from if we are being asked to do so + if runtimeConfig.statsTraceStacks { + m.stats.CreateStack = debug.Stack() + } + Statistics.AddJStatRec(m.stats) + } + return m +} + +func dHash(k1, k2 *PredictionContext) int { + return k1.cachedHash*31 + k2.cachedHash +} + +func (pcm *JPCMap2) Get(k1, k2 *PredictionContext) (*PredictionContext, bool) { + if collectStats { + pcm.stats.Gets++ + } + + h := dHash(k1, k2) + var hClash bool + for _, e := range pcm.store[h] { + hClash = true + if e.k1.Equals(k1) && e.k2.Equals(k2) { + if collectStats { + pcm.stats.GetHits++ + pcm.stats.GetHashConflicts++ + } + return e.v, true + } + if collectStats { + pcm.stats.GetMisses++ + } + } + if collectStats { + if hClash { + pcm.stats.GetHashConflicts++ + } + pcm.stats.GetNoEnt++ + } + return nil, false +} + +func (pcm *JPCMap2) Put(k1, k2, v *PredictionContext) (*PredictionContext, bool) { + if collectStats { + pcm.stats.Puts++ + } + h := dHash(k1, k2) + var hClash bool + for _, e := range pcm.store[h] { + hClash = true + if e.k1.Equals(k1) && e.k2.Equals(k2) { + if collectStats { + pcm.stats.PutHits++ + pcm.stats.PutHashConflicts++ + } + return e.v, true + } + if collectStats { + pcm.stats.PutMisses++ + } + } + if collectStats { + if hClash { + pcm.stats.PutHashConflicts++ + } + } + pcm.store[h] = append(pcm.store[h], JPCEntry{k1, k2, v}) + pcm.size++ + if collectStats { + pcm.stats.CurSize = pcm.size + if pcm.size > pcm.stats.MaxSize { + pcm.stats.MaxSize = pcm.size + } + } + return nil, false +} + +type VisitEntry struct { + k *PredictionContext + v *PredictionContext +} +type VisitRecord struct { + store map[*PredictionContext]*PredictionContext + len int + stats *JStatRec +} + +type VisitList struct { + cache *list.List + lock sync.RWMutex +} + +var visitListPool = VisitList{ + cache: list.New(), + lock: sync.RWMutex{}, +} + +// NewVisitRecord returns a new VisitRecord instance from the pool if available. +// Note that this "map" uses a pointer as a key because we are emulating the behavior of +// IdentityHashMap in Java, which uses the `==` operator to compare whether the keys are equal, +// which means is the key the same reference to an object rather than is it .equals() to another +// object. +func NewVisitRecord() *VisitRecord { + visitListPool.lock.Lock() + el := visitListPool.cache.Front() + defer visitListPool.lock.Unlock() + var vr *VisitRecord + if el == nil { + vr = &VisitRecord{ + store: make(map[*PredictionContext]*PredictionContext), + } + if collectStats { + vr.stats = &JStatRec{ + Source: PredictionContextCacheCollection, + Description: "VisitRecord", + } + // Track where we created it from if we are being asked to do so + if runtimeConfig.statsTraceStacks { + vr.stats.CreateStack = debug.Stack() + } + } + } else { + vr = el.Value.(*VisitRecord) + visitListPool.cache.Remove(el) + vr.store = make(map[*PredictionContext]*PredictionContext) + } + if collectStats { + Statistics.AddJStatRec(vr.stats) + } + return vr +} + +func (vr *VisitRecord) Release() { + vr.len = 0 + vr.store = nil + if collectStats { + vr.stats.MaxSize = 0 + vr.stats.CurSize = 0 + vr.stats.Gets = 0 + vr.stats.GetHits = 0 + vr.stats.GetMisses = 0 + vr.stats.GetHashConflicts = 0 + vr.stats.GetNoEnt = 0 + vr.stats.Puts = 0 + vr.stats.PutHits = 0 + vr.stats.PutMisses = 0 + vr.stats.PutHashConflicts = 0 + vr.stats.MaxSlotSize = 0 + } + visitListPool.lock.Lock() + visitListPool.cache.PushBack(vr) + visitListPool.lock.Unlock() +} + +func (vr *VisitRecord) Get(k *PredictionContext) (*PredictionContext, bool) { + if collectStats { + vr.stats.Gets++ + } + v := vr.store[k] + if v != nil { + if collectStats { + vr.stats.GetHits++ + } + return v, true + } + if collectStats { + vr.stats.GetNoEnt++ + } + return nil, false +} + +func (vr *VisitRecord) Put(k, v *PredictionContext) (*PredictionContext, bool) { + if collectStats { + vr.stats.Puts++ + } + vr.store[k] = v + vr.len++ + if collectStats { + vr.stats.CurSize = vr.len + if vr.len > vr.stats.MaxSize { + vr.stats.MaxSize = vr.len + } + } + return v, false +} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer.go b/vendor/github.com/antlr4-go/antlr/v4/lexer.go similarity index 78% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer.go rename to vendor/github.com/antlr4-go/antlr/v4/lexer.go index 6533f051645..3c7896a9183 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer.go +++ b/vendor/github.com/antlr4-go/antlr/v4/lexer.go @@ -69,7 +69,7 @@ func NewBaseLexer(input CharStream) *BaseLexer { // create a single token. NextToken will return l object after // Matching lexer rule(s). If you subclass to allow multiple token // emissions, then set l to the last token to be Matched or - // something nonnil so that the auto token emit mechanism will not + // something non nil so that the auto token emit mechanism will not // emit another token. lexer.token = nil @@ -111,6 +111,7 @@ const ( LexerSkip = -3 ) +//goland:noinspection GoUnusedConst const ( LexerDefaultTokenChannel = TokenDefaultChannel LexerHidden = TokenHiddenChannel @@ -118,7 +119,7 @@ const ( LexerMaxCharValue = 0x10FFFF ) -func (b *BaseLexer) reset() { +func (b *BaseLexer) Reset() { // wack Lexer state variables if b.input != nil { b.input.Seek(0) // rewind the input @@ -176,7 +177,7 @@ func (b *BaseLexer) safeMatch() (ret int) { return b.Interpreter.Match(b.input, b.mode) } -// Return a token from l source i.e., Match a token on the char stream. +// NextToken returns a token from the lexer input source i.e., Match a token on the source char stream. func (b *BaseLexer) NextToken() Token { if b.input == nil { panic("NextToken requires a non-nil input stream.") @@ -205,9 +206,8 @@ func (b *BaseLexer) NextToken() Token { continueOuter := false for { b.thetype = TokenInvalidType - ttype := LexerSkip - ttype = b.safeMatch() + ttype := b.safeMatch() if b.input.LA(1) == TokenEOF { b.hitEOF = true @@ -234,12 +234,11 @@ func (b *BaseLexer) NextToken() Token { } } -// Instruct the lexer to Skip creating a token for current lexer rule -// and look for another token. NextToken() knows to keep looking when -// a lexer rule finishes with token set to SKIPTOKEN. Recall that +// Skip instructs the lexer to Skip creating a token for current lexer rule +// and look for another token. [NextToken] knows to keep looking when +// a lexer rule finishes with token set to [SKIPTOKEN]. Recall that // if token==nil at end of any token rule, it creates one for you // and emits it. -// / func (b *BaseLexer) Skip() { b.thetype = LexerSkip } @@ -248,23 +247,29 @@ func (b *BaseLexer) More() { b.thetype = LexerMore } +// SetMode changes the lexer to a new mode. The lexer will use this mode from hereon in and the rules for that mode +// will be in force. func (b *BaseLexer) SetMode(m int) { b.mode = m } +// PushMode saves the current lexer mode so that it can be restored later. See [PopMode], then sets the +// current lexer mode to the supplied mode m. func (b *BaseLexer) PushMode(m int) { - if LexerATNSimulatorDebug { + if runtimeConfig.lexerATNSimulatorDebug { fmt.Println("pushMode " + strconv.Itoa(m)) } b.modeStack.Push(b.mode) b.mode = m } +// PopMode restores the lexer mode saved by a call to [PushMode]. It is a panic error if there is no saved mode to +// return to. func (b *BaseLexer) PopMode() int { if len(b.modeStack) == 0 { panic("Empty Stack") } - if LexerATNSimulatorDebug { + if runtimeConfig.lexerATNSimulatorDebug { fmt.Println("popMode back to " + fmt.Sprint(b.modeStack[0:len(b.modeStack)-1])) } i, _ := b.modeStack.Pop() @@ -280,7 +285,7 @@ func (b *BaseLexer) inputStream() CharStream { func (b *BaseLexer) SetInputStream(input CharStream) { b.input = nil b.tokenFactorySourcePair = &TokenSourceCharStreamPair{b, b.input} - b.reset() + b.Reset() b.input = input b.tokenFactorySourcePair = &TokenSourceCharStreamPair{b, b.input} } @@ -289,20 +294,19 @@ func (b *BaseLexer) GetTokenSourceCharStreamPair() *TokenSourceCharStreamPair { return b.tokenFactorySourcePair } -// By default does not support multiple emits per NextToken invocation -// for efficiency reasons. Subclass and override l method, NextToken, -// and GetToken (to push tokens into a list and pull from that list -// rather than a single variable as l implementation does). -// / +// EmitToken by default does not support multiple emits per [NextToken] invocation +// for efficiency reasons. Subclass and override this func, [NextToken], +// and [GetToken] (to push tokens into a list and pull from that list +// rather than a single variable as this implementation does). func (b *BaseLexer) EmitToken(token Token) { b.token = token } -// The standard method called to automatically emit a token at the +// Emit is the standard method called to automatically emit a token at the // outermost lexical rule. The token object should point into the // char buffer start..stop. If there is a text override in 'text', -// use that to set the token's text. Override l method to emit -// custom Token objects or provide a Newfactory. +// use that to set the token's text. Override this method to emit +// custom [Token] objects or provide a new factory. // / func (b *BaseLexer) Emit() Token { t := b.factory.Create(b.tokenFactorySourcePair, b.thetype, b.text, b.channel, b.TokenStartCharIndex, b.GetCharIndex()-1, b.TokenStartLine, b.TokenStartColumn) @@ -310,6 +314,7 @@ func (b *BaseLexer) Emit() Token { return t } +// EmitEOF emits an EOF token. By default, this is the last token emitted func (b *BaseLexer) EmitEOF() Token { cpos := b.GetCharPositionInLine() lpos := b.GetLine() @@ -318,6 +323,7 @@ func (b *BaseLexer) EmitEOF() Token { return eof } +// GetCharPositionInLine returns the current position in the current line as far as the lexer is concerned. func (b *BaseLexer) GetCharPositionInLine() int { return b.Interpreter.GetCharPositionInLine() } @@ -334,13 +340,12 @@ func (b *BaseLexer) SetType(t int) { b.thetype = t } -// What is the index of the current character of lookahead?/// +// GetCharIndex returns the index of the current character of lookahead func (b *BaseLexer) GetCharIndex() int { return b.input.Index() } -// Return the text Matched so far for the current token or any text override. -// Set the complete text of l token it wipes any previous changes to the text. +// GetText returns the text Matched so far for the current token or any text override. func (b *BaseLexer) GetText() string { if b.text != "" { return b.text @@ -349,17 +354,20 @@ func (b *BaseLexer) GetText() string { return b.Interpreter.GetText(b.input) } +// SetText sets the complete text of this token; it wipes any previous changes to the text. func (b *BaseLexer) SetText(text string) { b.text = text } +// GetATN returns the ATN used by the lexer. func (b *BaseLexer) GetATN() *ATN { return b.Interpreter.ATN() } -// Return a list of all Token objects in input char stream. -// Forces load of all tokens. Does not include EOF token. -// / +// GetAllTokens returns a list of all [Token] objects in input char stream. +// Forces a load of all tokens that can be made from the input char stream. +// +// Does not include EOF token. func (b *BaseLexer) GetAllTokens() []Token { vl := b.Virt tokens := make([]Token, 0) @@ -398,11 +406,13 @@ func (b *BaseLexer) getCharErrorDisplay(c rune) string { return "'" + b.getErrorDisplayForChar(c) + "'" } -// Lexers can normally Match any char in it's vocabulary after Matching -// a token, so do the easy thing and just kill a character and hope +// Recover can normally Match any char in its vocabulary after Matching +// a token, so here we do the easy thing and just kill a character and hope // it all works out. You can instead use the rule invocation stack // to do sophisticated error recovery if you are in a fragment rule. -// / +// +// In general, lexers should not need to recover and should have rules that cover any eventuality, such as +// a character that makes no sense to the recognizer. func (b *BaseLexer) Recover(re RecognitionException) { if b.input.LA(1) != TokenEOF { if _, ok := re.(*LexerNoViableAltException); ok { diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer_action.go b/vendor/github.com/antlr4-go/antlr/v4/lexer_action.go similarity index 78% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer_action.go rename to vendor/github.com/antlr4-go/antlr/v4/lexer_action.go index 111656c2952..eaa7393e06f 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer_action.go +++ b/vendor/github.com/antlr4-go/antlr/v4/lexer_action.go @@ -7,14 +7,29 @@ package antlr import "strconv" const ( - LexerActionTypeChannel = 0 //The type of a {@link LexerChannelAction} action. - LexerActionTypeCustom = 1 //The type of a {@link LexerCustomAction} action. - LexerActionTypeMode = 2 //The type of a {@link LexerModeAction} action. - LexerActionTypeMore = 3 //The type of a {@link LexerMoreAction} action. - LexerActionTypePopMode = 4 //The type of a {@link LexerPopModeAction} action. - LexerActionTypePushMode = 5 //The type of a {@link LexerPushModeAction} action. - LexerActionTypeSkip = 6 //The type of a {@link LexerSkipAction} action. - LexerActionTypeType = 7 //The type of a {@link LexerTypeAction} action. + // LexerActionTypeChannel represents a [LexerChannelAction] action. + LexerActionTypeChannel = 0 + + // LexerActionTypeCustom represents a [LexerCustomAction] action. + LexerActionTypeCustom = 1 + + // LexerActionTypeMode represents a [LexerModeAction] action. + LexerActionTypeMode = 2 + + // LexerActionTypeMore represents a [LexerMoreAction] action. + LexerActionTypeMore = 3 + + // LexerActionTypePopMode represents a [LexerPopModeAction] action. + LexerActionTypePopMode = 4 + + // LexerActionTypePushMode represents a [LexerPushModeAction] action. + LexerActionTypePushMode = 5 + + // LexerActionTypeSkip represents a [LexerSkipAction] action. + LexerActionTypeSkip = 6 + + // LexerActionTypeType represents a [LexerTypeAction] action. + LexerActionTypeType = 7 ) type LexerAction interface { @@ -39,7 +54,7 @@ func NewBaseLexerAction(action int) *BaseLexerAction { return la } -func (b *BaseLexerAction) execute(lexer Lexer) { +func (b *BaseLexerAction) execute(_ Lexer) { panic("Not implemented") } @@ -52,17 +67,19 @@ func (b *BaseLexerAction) getIsPositionDependent() bool { } func (b *BaseLexerAction) Hash() int { - return b.actionType + h := murmurInit(0) + h = murmurUpdate(h, b.actionType) + return murmurFinish(h, 1) } func (b *BaseLexerAction) Equals(other LexerAction) bool { - return b == other + return b.actionType == other.getActionType() } -// Implements the {@code Skip} lexer action by calling {@link Lexer//Skip}. +// LexerSkipAction implements the [BaseLexerAction.Skip] lexer action by calling [Lexer.Skip]. // -//

The {@code Skip} command does not have any parameters, so l action is -// implemented as a singleton instance exposed by {@link //INSTANCE}.

+// The Skip command does not have any parameters, so this action is +// implemented as a singleton instance exposed by the [LexerSkipActionINSTANCE]. type LexerSkipAction struct { *BaseLexerAction } @@ -73,17 +90,22 @@ func NewLexerSkipAction() *LexerSkipAction { return la } -// Provides a singleton instance of l parameterless lexer action. +// LexerSkipActionINSTANCE provides a singleton instance of this parameterless lexer action. var LexerSkipActionINSTANCE = NewLexerSkipAction() func (l *LexerSkipAction) execute(lexer Lexer) { lexer.Skip() } +// String returns a string representation of the current [LexerSkipAction]. func (l *LexerSkipAction) String() string { return "skip" } +func (b *LexerSkipAction) Equals(other LexerAction) bool { + return other.getActionType() == LexerActionTypeSkip +} + // Implements the {@code type} lexer action by calling {@link Lexer//setType} // // with the assigned type. @@ -125,11 +147,10 @@ func (l *LexerTypeAction) String() string { return "actionType(" + strconv.Itoa(l.thetype) + ")" } -// Implements the {@code pushMode} lexer action by calling -// {@link Lexer//pushMode} with the assigned mode. +// LexerPushModeAction implements the pushMode lexer action by calling +// [Lexer.pushMode] with the assigned mode. type LexerPushModeAction struct { *BaseLexerAction - mode int } @@ -169,10 +190,10 @@ func (l *LexerPushModeAction) String() string { return "pushMode(" + strconv.Itoa(l.mode) + ")" } -// Implements the {@code popMode} lexer action by calling {@link Lexer//popMode}. +// LexerPopModeAction implements the popMode lexer action by calling [Lexer.popMode]. // -//

The {@code popMode} command does not have any parameters, so l action is -// implemented as a singleton instance exposed by {@link //INSTANCE}.

+// The popMode command does not have any parameters, so this action is +// implemented as a singleton instance exposed by [LexerPopModeActionINSTANCE] type LexerPopModeAction struct { *BaseLexerAction } @@ -224,11 +245,10 @@ func (l *LexerMoreAction) String() string { return "more" } -// Implements the {@code mode} lexer action by calling {@link Lexer//mode} with +// LexerModeAction implements the mode lexer action by calling [Lexer.mode] with // the assigned mode. type LexerModeAction struct { *BaseLexerAction - mode int } @@ -322,16 +342,19 @@ func (l *LexerCustomAction) Equals(other LexerAction) bool { } } -// Implements the {@code channel} lexer action by calling -// {@link Lexer//setChannel} with the assigned channel. -// Constructs a New{@code channel} action with the specified channel value. -// @param channel The channel value to pass to {@link Lexer//setChannel}. +// LexerChannelAction implements the channel lexer action by calling +// [Lexer.setChannel] with the assigned channel. +// +// Constructs a new channel action with the specified channel value. type LexerChannelAction struct { *BaseLexerAction - channel int } +// NewLexerChannelAction creates a channel lexer action by calling +// [Lexer.setChannel] with the assigned channel. +// +// Constructs a new channel action with the specified channel value. func NewLexerChannelAction(channel int) *LexerChannelAction { l := new(LexerChannelAction) l.BaseLexerAction = NewBaseLexerAction(LexerActionTypeChannel) @@ -375,25 +398,22 @@ func (l *LexerChannelAction) String() string { // lexer actions, see {@link LexerActionExecutor//append} and // {@link LexerActionExecutor//fixOffsetBeforeMatch}.

-// Constructs a Newindexed custom action by associating a character offset -// with a {@link LexerAction}. -// -//

Note: This class is only required for lexer actions for which -// {@link LexerAction//isPositionDependent} returns {@code true}.

-// -// @param offset The offset into the input {@link CharStream}, relative to -// the token start index, at which the specified lexer action should be -// executed. -// @param action The lexer action to execute at a particular offset in the -// input {@link CharStream}. type LexerIndexedCustomAction struct { *BaseLexerAction - offset int lexerAction LexerAction isPositionDependent bool } +// NewLexerIndexedCustomAction constructs a new indexed custom action by associating a character offset +// with a [LexerAction]. +// +// Note: This class is only required for lexer actions for which +// [LexerAction.isPositionDependent] returns true. +// +// The offset points into the input [CharStream], relative to +// the token start index, at which the specified lexerAction should be +// executed. func NewLexerIndexedCustomAction(offset int, lexerAction LexerAction) *LexerIndexedCustomAction { l := new(LexerIndexedCustomAction) diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer_action_executor.go b/vendor/github.com/antlr4-go/antlr/v4/lexer_action_executor.go similarity index 70% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer_action_executor.go rename to vendor/github.com/antlr4-go/antlr/v4/lexer_action_executor.go index be1ba7a7e30..dfc28c32b30 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer_action_executor.go +++ b/vendor/github.com/antlr4-go/antlr/v4/lexer_action_executor.go @@ -29,28 +29,20 @@ func NewLexerActionExecutor(lexerActions []LexerAction) *LexerActionExecutor { l.lexerActions = lexerActions // Caches the result of {@link //hashCode} since the hash code is an element - // of the performance-critical {@link LexerATNConfig//hashCode} operation. - l.cachedHash = murmurInit(57) + // of the performance-critical {@link ATNConfig//hashCode} operation. + l.cachedHash = murmurInit(0) for _, a := range lexerActions { l.cachedHash = murmurUpdate(l.cachedHash, a.Hash()) } + l.cachedHash = murmurFinish(l.cachedHash, len(lexerActions)) return l } -// Creates a {@link LexerActionExecutor} which executes the actions for -// the input {@code lexerActionExecutor} followed by a specified -// {@code lexerAction}. -// -// @param lexerActionExecutor The executor for actions already traversed by -// the lexer while Matching a token within a particular -// {@link LexerATNConfig}. If this is {@code nil}, the method behaves as -// though it were an empty executor. -// @param lexerAction The lexer action to execute after the actions -// specified in {@code lexerActionExecutor}. -// -// @return A {@link LexerActionExecutor} for executing the combine actions -// of {@code lexerActionExecutor} and {@code lexerAction}. +// LexerActionExecutorappend creates a [LexerActionExecutor] which executes the actions for +// the input [LexerActionExecutor] followed by a specified +// [LexerAction]. +// TODO: This does not match the Java code func LexerActionExecutorappend(lexerActionExecutor *LexerActionExecutor, lexerAction LexerAction) *LexerActionExecutor { if lexerActionExecutor == nil { return NewLexerActionExecutor([]LexerAction{lexerAction}) @@ -59,47 +51,42 @@ func LexerActionExecutorappend(lexerActionExecutor *LexerActionExecutor, lexerAc return NewLexerActionExecutor(append(lexerActionExecutor.lexerActions, lexerAction)) } -// Creates a {@link LexerActionExecutor} which encodes the current offset +// fixOffsetBeforeMatch creates a [LexerActionExecutor] which encodes the current offset // for position-dependent lexer actions. // -//

Normally, when the executor encounters lexer actions where -// {@link LexerAction//isPositionDependent} returns {@code true}, it calls -// {@link IntStream//seek} on the input {@link CharStream} to set the input -// position to the end of the current token. This behavior provides -// for efficient DFA representation of lexer actions which appear at the end +// Normally, when the executor encounters lexer actions where +// [LexerAction.isPositionDependent] returns true, it calls +// [IntStream.Seek] on the input [CharStream] to set the input +// position to the end of the current token. This behavior provides +// for efficient [DFA] representation of lexer actions which appear at the end // of a lexer rule, even when the lexer rule Matches a variable number of -// characters.

+// characters. // -//

Prior to traversing a Match transition in the ATN, the current offset +// Prior to traversing a Match transition in the [ATN], the current offset // from the token start index is assigned to all position-dependent lexer // actions which have not already been assigned a fixed offset. By storing -// the offsets relative to the token start index, the DFA representation of +// the offsets relative to the token start index, the [DFA] representation of // lexer actions which appear in the middle of tokens remains efficient due -// to sharing among tokens of the same length, regardless of their absolute -// position in the input stream.

+// to sharing among tokens of the same Length, regardless of their absolute +// position in the input stream. // -//

If the current executor already has offsets assigned to all -// position-dependent lexer actions, the method returns {@code this}.

+// If the current executor already has offsets assigned to all +// position-dependent lexer actions, the method returns this instance. // -// @param offset The current offset to assign to all position-dependent +// The offset is assigned to all position-dependent // lexer actions which do not already have offsets assigned. // -// @return A {@link LexerActionExecutor} which stores input stream offsets +// The func returns a [LexerActionExecutor] that stores input stream offsets // for all position-dependent lexer actions. -// / func (l *LexerActionExecutor) fixOffsetBeforeMatch(offset int) *LexerActionExecutor { var updatedLexerActions []LexerAction for i := 0; i < len(l.lexerActions); i++ { _, ok := l.lexerActions[i].(*LexerIndexedCustomAction) if l.lexerActions[i].getIsPositionDependent() && !ok { if updatedLexerActions == nil { - updatedLexerActions = make([]LexerAction, 0) - - for _, a := range l.lexerActions { - updatedLexerActions = append(updatedLexerActions, a) - } + updatedLexerActions = make([]LexerAction, 0, len(l.lexerActions)) + updatedLexerActions = append(updatedLexerActions, l.lexerActions...) } - updatedLexerActions[i] = NewLexerIndexedCustomAction(offset, l.lexerActions[i]) } } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer_atn_simulator.go b/vendor/github.com/antlr4-go/antlr/v4/lexer_atn_simulator.go similarity index 80% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer_atn_simulator.go rename to vendor/github.com/antlr4-go/antlr/v4/lexer_atn_simulator.go index c573b752100..fe938b0259a 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/lexer_atn_simulator.go +++ b/vendor/github.com/antlr4-go/antlr/v4/lexer_atn_simulator.go @@ -10,10 +10,8 @@ import ( "strings" ) +//goland:noinspection GoUnusedGlobalVariable var ( - LexerATNSimulatorDebug = false - LexerATNSimulatorDFADebug = false - LexerATNSimulatorMinDFAEdge = 0 LexerATNSimulatorMaxDFAEdge = 127 // forces unicode to stay in ATN @@ -32,11 +30,11 @@ type ILexerATNSimulator interface { } type LexerATNSimulator struct { - *BaseATNSimulator + BaseATNSimulator recog Lexer predictionMode int - mergeCache DoubleDict + mergeCache *JPCMap2 startIndex int Line int CharPositionInLine int @@ -46,27 +44,35 @@ type LexerATNSimulator struct { } func NewLexerATNSimulator(recog Lexer, atn *ATN, decisionToDFA []*DFA, sharedContextCache *PredictionContextCache) *LexerATNSimulator { - l := new(LexerATNSimulator) - - l.BaseATNSimulator = NewBaseATNSimulator(atn, sharedContextCache) + l := &LexerATNSimulator{ + BaseATNSimulator: BaseATNSimulator{ + atn: atn, + sharedContextCache: sharedContextCache, + }, + } l.decisionToDFA = decisionToDFA l.recog = recog + // The current token's starting index into the character stream. // Shared across DFA to ATN simulation in case the ATN fails and the // DFA did not have a previous accept state. In l case, we use the // ATN-generated exception object. l.startIndex = -1 - // line number 1..n within the input/// + + // line number 1..n within the input l.Line = 1 + // The index of the character relative to the beginning of the line - // 0..n-1/// + // 0..n-1 l.CharPositionInLine = 0 + l.mode = LexerDefaultMode + // Used during DFA/ATN exec to record the most recent accept configuration // info l.prevAccept = NewSimState() - // done + return l } @@ -114,7 +120,7 @@ func (l *LexerATNSimulator) reset() { func (l *LexerATNSimulator) MatchATN(input CharStream) int { startState := l.atn.modeToStartState[l.mode] - if LexerATNSimulatorDebug { + if runtimeConfig.lexerATNSimulatorDebug { fmt.Println("MatchATN mode " + strconv.Itoa(l.mode) + " start: " + startState.String()) } oldMode := l.mode @@ -126,7 +132,7 @@ func (l *LexerATNSimulator) MatchATN(input CharStream) int { predict := l.execATN(input, next) - if LexerATNSimulatorDebug { + if runtimeConfig.lexerATNSimulatorDebug { fmt.Println("DFA after MatchATN: " + l.decisionToDFA[oldMode].ToLexerString()) } return predict @@ -134,18 +140,18 @@ func (l *LexerATNSimulator) MatchATN(input CharStream) int { func (l *LexerATNSimulator) execATN(input CharStream, ds0 *DFAState) int { - if LexerATNSimulatorDebug { + if runtimeConfig.lexerATNSimulatorDebug { fmt.Println("start state closure=" + ds0.configs.String()) } if ds0.isAcceptState { - // allow zero-length tokens + // allow zero-Length tokens l.captureSimState(l.prevAccept, input, ds0) } t := input.LA(1) s := ds0 // s is current/from DFA state for { // while more work - if LexerATNSimulatorDebug { + if runtimeConfig.lexerATNSimulatorDebug { fmt.Println("execATN loop starting closure: " + s.configs.String()) } @@ -188,7 +194,7 @@ func (l *LexerATNSimulator) execATN(input CharStream, ds0 *DFAState) int { } } t = input.LA(1) - s = target // flip current DFA target becomes Newsrc/from state + s = target // flip current DFA target becomes new src/from state } return l.failOrAccept(l.prevAccept, input, s.configs, t) @@ -214,43 +220,39 @@ func (l *LexerATNSimulator) getExistingTargetState(s *DFAState, t int) *DFAState return nil } target := s.getIthEdge(t - LexerATNSimulatorMinDFAEdge) - if LexerATNSimulatorDebug && target != nil { + if runtimeConfig.lexerATNSimulatorDebug && target != nil { fmt.Println("reuse state " + strconv.Itoa(s.stateNumber) + " edge to " + strconv.Itoa(target.stateNumber)) } return target } -// Compute a target state for an edge in the DFA, and attempt to add the -// computed state and corresponding edge to the DFA. +// computeTargetState computes a target state for an edge in the [DFA], and attempt to add the +// computed state and corresponding edge to the [DFA]. // -// @param input The input stream -// @param s The current DFA state -// @param t The next input symbol -// -// @return The computed target DFA state for the given input symbol -// {@code t}. If {@code t} does not lead to a valid DFA state, l method -// returns {@link //ERROR}. +// The func returns the computed target [DFA] state for the given input symbol t. +// If this does not lead to a valid [DFA] state, this method +// returns ATNSimulatorError. func (l *LexerATNSimulator) computeTargetState(input CharStream, s *DFAState, t int) *DFAState { reach := NewOrderedATNConfigSet() // if we don't find an existing DFA state // Fill reach starting from closure, following t transitions - l.getReachableConfigSet(input, s.configs, reach.BaseATNConfigSet, t) + l.getReachableConfigSet(input, s.configs, reach, t) if len(reach.configs) == 0 { // we got nowhere on t from s if !reach.hasSemanticContext { // we got nowhere on t, don't panic out l knowledge it'd - // cause a failover from DFA later. + // cause a fail-over from DFA later. l.addDFAEdge(s, t, ATNSimulatorError, nil) } // stop when we can't Match any more char return ATNSimulatorError } // Add an edge from s to target DFA found/created for reach - return l.addDFAEdge(s, t, nil, reach.BaseATNConfigSet) + return l.addDFAEdge(s, t, nil, reach) } -func (l *LexerATNSimulator) failOrAccept(prevAccept *SimState, input CharStream, reach ATNConfigSet, t int) int { +func (l *LexerATNSimulator) failOrAccept(prevAccept *SimState, input CharStream, reach *ATNConfigSet, t int) int { if l.prevAccept.dfaState != nil { lexerActionExecutor := prevAccept.dfaState.lexerActionExecutor l.accept(input, lexerActionExecutor, l.startIndex, prevAccept.index, prevAccept.line, prevAccept.column) @@ -265,34 +267,35 @@ func (l *LexerATNSimulator) failOrAccept(prevAccept *SimState, input CharStream, panic(NewLexerNoViableAltException(l.recog, input, l.startIndex, reach)) } -// Given a starting configuration set, figure out all ATN configurations -// we can reach upon input {@code t}. Parameter {@code reach} is a return -// parameter. -func (l *LexerATNSimulator) getReachableConfigSet(input CharStream, closure ATNConfigSet, reach ATNConfigSet, t int) { +// getReachableConfigSet when given a starting configuration set, figures out all [ATN] configurations +// we can reach upon input t. +// +// Parameter reach is a return parameter. +func (l *LexerATNSimulator) getReachableConfigSet(input CharStream, closure *ATNConfigSet, reach *ATNConfigSet, t int) { // l is used to Skip processing for configs which have a lower priority - // than a config that already reached an accept state for the same rule + // than a runtimeConfig that already reached an accept state for the same rule SkipAlt := ATNInvalidAltNumber - for _, cfg := range closure.GetItems() { - currentAltReachedAcceptState := (cfg.GetAlt() == SkipAlt) - if currentAltReachedAcceptState && cfg.(*LexerATNConfig).passedThroughNonGreedyDecision { + for _, cfg := range closure.configs { + currentAltReachedAcceptState := cfg.GetAlt() == SkipAlt + if currentAltReachedAcceptState && cfg.passedThroughNonGreedyDecision { continue } - if LexerATNSimulatorDebug { + if runtimeConfig.lexerATNSimulatorDebug { - fmt.Printf("testing %s at %s\n", l.GetTokenName(t), cfg.String()) // l.recog, true)) + fmt.Printf("testing %s at %s\n", l.GetTokenName(t), cfg.String()) } for _, trans := range cfg.GetState().GetTransitions() { target := l.getReachableTarget(trans, t) if target != nil { - lexerActionExecutor := cfg.(*LexerATNConfig).lexerActionExecutor + lexerActionExecutor := cfg.lexerActionExecutor if lexerActionExecutor != nil { lexerActionExecutor = lexerActionExecutor.fixOffsetBeforeMatch(input.Index() - l.startIndex) } - treatEOFAsEpsilon := (t == TokenEOF) - config := NewLexerATNConfig3(cfg.(*LexerATNConfig), target, lexerActionExecutor) + treatEOFAsEpsilon := t == TokenEOF + config := NewLexerATNConfig3(cfg, target, lexerActionExecutor) if l.closure(input, config, reach, currentAltReachedAcceptState, true, treatEOFAsEpsilon) { // any remaining configs for l alt have a lower priority @@ -305,7 +308,7 @@ func (l *LexerATNSimulator) getReachableConfigSet(input CharStream, closure ATNC } func (l *LexerATNSimulator) accept(input CharStream, lexerActionExecutor *LexerActionExecutor, startIndex, index, line, charPos int) { - if LexerATNSimulatorDebug { + if runtimeConfig.lexerATNSimulatorDebug { fmt.Printf("ACTION %v\n", lexerActionExecutor) } // seek to after last char in token @@ -325,7 +328,7 @@ func (l *LexerATNSimulator) getReachableTarget(trans Transition, t int) ATNState return nil } -func (l *LexerATNSimulator) computeStartState(input CharStream, p ATNState) *OrderedATNConfigSet { +func (l *LexerATNSimulator) computeStartState(input CharStream, p ATNState) *ATNConfigSet { configs := NewOrderedATNConfigSet() for i := 0; i < len(p.GetTransitions()); i++ { target := p.GetTransitions()[i].getTarget() @@ -336,25 +339,24 @@ func (l *LexerATNSimulator) computeStartState(input CharStream, p ATNState) *Ord return configs } -// Since the alternatives within any lexer decision are ordered by -// preference, l method stops pursuing the closure as soon as an accept +// closure since the alternatives within any lexer decision are ordered by +// preference, this method stops pursuing the closure as soon as an accept // state is reached. After the first accept state is reached by depth-first -// search from {@code config}, all other (potentially reachable) states for -// l rule would have a lower priority. +// search from runtimeConfig, all other (potentially reachable) states for +// this rule would have a lower priority. // -// @return {@code true} if an accept state is reached, otherwise -// {@code false}. -func (l *LexerATNSimulator) closure(input CharStream, config *LexerATNConfig, configs ATNConfigSet, +// The func returns true if an accept state is reached. +func (l *LexerATNSimulator) closure(input CharStream, config *ATNConfig, configs *ATNConfigSet, currentAltReachedAcceptState, speculative, treatEOFAsEpsilon bool) bool { - if LexerATNSimulatorDebug { - fmt.Println("closure(" + config.String() + ")") // config.String(l.recog, true) + ")") + if runtimeConfig.lexerATNSimulatorDebug { + fmt.Println("closure(" + config.String() + ")") } _, ok := config.state.(*RuleStopState) if ok { - if LexerATNSimulatorDebug { + if runtimeConfig.lexerATNSimulatorDebug { if l.recog != nil { fmt.Printf("closure at %s rule stop %s\n", l.recog.GetRuleNames()[config.state.GetRuleIndex()], config) } else { @@ -401,10 +403,10 @@ func (l *LexerATNSimulator) closure(input CharStream, config *LexerATNConfig, co } // side-effect: can alter configs.hasSemanticContext -func (l *LexerATNSimulator) getEpsilonTarget(input CharStream, config *LexerATNConfig, trans Transition, - configs ATNConfigSet, speculative, treatEOFAsEpsilon bool) *LexerATNConfig { +func (l *LexerATNSimulator) getEpsilonTarget(input CharStream, config *ATNConfig, trans Transition, + configs *ATNConfigSet, speculative, treatEOFAsEpsilon bool) *ATNConfig { - var cfg *LexerATNConfig + var cfg *ATNConfig if trans.getSerializationType() == TransitionRULE { @@ -435,10 +437,10 @@ func (l *LexerATNSimulator) getEpsilonTarget(input CharStream, config *LexerATNC pt := trans.(*PredicateTransition) - if LexerATNSimulatorDebug { + if runtimeConfig.lexerATNSimulatorDebug { fmt.Println("EVAL rule " + strconv.Itoa(trans.(*PredicateTransition).ruleIndex) + ":" + strconv.Itoa(pt.predIndex)) } - configs.SetHasSemanticContext(true) + configs.hasSemanticContext = true if l.evaluatePredicate(input, pt.ruleIndex, pt.predIndex, speculative) { cfg = NewLexerATNConfig4(config, trans.getTarget()) } @@ -449,7 +451,7 @@ func (l *LexerATNSimulator) getEpsilonTarget(input CharStream, config *LexerATNC // TODO: if the entry rule is invoked recursively, some // actions may be executed during the recursive call. The // problem can appear when hasEmptyPath() is true but - // isEmpty() is false. In l case, the config needs to be + // isEmpty() is false. In this case, the config needs to be // split into two contexts - one with just the empty path // and another with everything but the empty path. // Unfortunately, the current algorithm does not allow @@ -476,26 +478,18 @@ func (l *LexerATNSimulator) getEpsilonTarget(input CharStream, config *LexerATNC return cfg } -// Evaluate a predicate specified in the lexer. +// evaluatePredicate eEvaluates a predicate specified in the lexer. // -//

If {@code speculative} is {@code true}, l method was called before -// {@link //consume} for the Matched character. This method should call -// {@link //consume} before evaluating the predicate to ensure position -// sensitive values, including {@link Lexer//GetText}, {@link Lexer//GetLine}, -// and {@link Lexer//getcolumn}, properly reflect the current -// lexer state. This method should restore {@code input} and the simulator -// to the original state before returning (i.e. undo the actions made by the -// call to {@link //consume}.

+// If speculative is true, this method was called before +// [consume] for the Matched character. This method should call +// [consume] before evaluating the predicate to ensure position +// sensitive values, including [GetText], [GetLine], +// and [GetColumn], properly reflect the current +// lexer state. This method should restore input and the simulator +// to the original state before returning, i.e. undo the actions made by the +// call to [Consume]. // -// @param input The input stream. -// @param ruleIndex The rule containing the predicate. -// @param predIndex The index of the predicate within the rule. -// @param speculative {@code true} if the current index in {@code input} is -// one character before the predicate's location. -// -// @return {@code true} if the specified predicate evaluates to -// {@code true}. -// / +// The func returns true if the specified predicate evaluates to true. func (l *LexerATNSimulator) evaluatePredicate(input CharStream, ruleIndex, predIndex int, speculative bool) bool { // assume true if no recognizer was provided if l.recog == nil { @@ -527,7 +521,7 @@ func (l *LexerATNSimulator) captureSimState(settings *SimState, input CharStream settings.dfaState = dfaState } -func (l *LexerATNSimulator) addDFAEdge(from *DFAState, tk int, to *DFAState, cfgs ATNConfigSet) *DFAState { +func (l *LexerATNSimulator) addDFAEdge(from *DFAState, tk int, to *DFAState, cfgs *ATNConfigSet) *DFAState { if to == nil && cfgs != nil { // leading to l call, ATNConfigSet.hasSemanticContext is used as a // marker indicating dynamic predicate evaluation makes l edge @@ -539,10 +533,9 @@ func (l *LexerATNSimulator) addDFAEdge(from *DFAState, tk int, to *DFAState, cfg // TJP notes: next time through the DFA, we see a pred again and eval. // If that gets us to a previously created (but dangling) DFA // state, we can continue in pure DFA mode from there. - // / - suppressEdge := cfgs.HasSemanticContext() - cfgs.SetHasSemanticContext(false) - + // + suppressEdge := cfgs.hasSemanticContext + cfgs.hasSemanticContext = false to = l.addDFAState(cfgs, true) if suppressEdge { @@ -554,7 +547,7 @@ func (l *LexerATNSimulator) addDFAEdge(from *DFAState, tk int, to *DFAState, cfg // Only track edges within the DFA bounds return to } - if LexerATNSimulatorDebug { + if runtimeConfig.lexerATNSimulatorDebug { fmt.Println("EDGE " + from.String() + " -> " + to.String() + " upon " + strconv.Itoa(tk)) } l.atn.edgeMu.Lock() @@ -572,13 +565,12 @@ func (l *LexerATNSimulator) addDFAEdge(from *DFAState, tk int, to *DFAState, cfg // configurations already. This method also detects the first // configuration containing an ATN rule stop state. Later, when // traversing the DFA, we will know which rule to accept. -func (l *LexerATNSimulator) addDFAState(configs ATNConfigSet, suppressEdge bool) *DFAState { +func (l *LexerATNSimulator) addDFAState(configs *ATNConfigSet, suppressEdge bool) *DFAState { proposed := NewDFAState(-1, configs) - var firstConfigWithRuleStopState ATNConfig - - for _, cfg := range configs.GetItems() { + var firstConfigWithRuleStopState *ATNConfig + for _, cfg := range configs.configs { _, ok := cfg.GetState().(*RuleStopState) if ok { @@ -588,14 +580,14 @@ func (l *LexerATNSimulator) addDFAState(configs ATNConfigSet, suppressEdge bool) } if firstConfigWithRuleStopState != nil { proposed.isAcceptState = true - proposed.lexerActionExecutor = firstConfigWithRuleStopState.(*LexerATNConfig).lexerActionExecutor + proposed.lexerActionExecutor = firstConfigWithRuleStopState.lexerActionExecutor proposed.setPrediction(l.atn.ruleToTokenType[firstConfigWithRuleStopState.GetState().GetRuleIndex()]) } dfa := l.decisionToDFA[l.mode] l.atn.stateMu.Lock() defer l.atn.stateMu.Unlock() - existing, present := dfa.states.Get(proposed) + existing, present := dfa.Get(proposed) if present { // This state was already present, so just return it. @@ -605,10 +597,11 @@ func (l *LexerATNSimulator) addDFAState(configs ATNConfigSet, suppressEdge bool) // We need to add the new state // - proposed.stateNumber = dfa.states.Len() - configs.SetReadOnly(true) + proposed.stateNumber = dfa.Len() + configs.readOnly = true + configs.configLookup = nil // Not needed now proposed.configs = configs - dfa.states.Put(proposed) + dfa.Put(proposed) } if !suppressEdge { dfa.setS0(proposed) @@ -620,7 +613,7 @@ func (l *LexerATNSimulator) getDFA(mode int) *DFA { return l.decisionToDFA[mode] } -// Get the text Matched so far for the current token. +// GetText returns the text [Match]ed so far for the current token. func (l *LexerATNSimulator) GetText(input CharStream) string { // index is first lookahead char, don't include. return input.GetTextFromInterval(NewInterval(l.startIndex, input.Index()-1)) diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/ll1_analyzer.go b/vendor/github.com/antlr4-go/antlr/v4/ll1_analyzer.go similarity index 73% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/ll1_analyzer.go rename to vendor/github.com/antlr4-go/antlr/v4/ll1_analyzer.go index 76689615a6d..4955ac876f9 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/ll1_analyzer.go +++ b/vendor/github.com/antlr4-go/antlr/v4/ll1_analyzer.go @@ -14,11 +14,11 @@ func NewLL1Analyzer(atn *ATN) *LL1Analyzer { return la } -// - Special value added to the lookahead sets to indicate that we hit -// a predicate during analysis if {@code seeThruPreds==false}. -// -// / const ( + // LL1AnalyzerHitPred is a special value added to the lookahead sets to indicate that we hit + // a predicate during analysis if + // + // seeThruPreds==false LL1AnalyzerHitPred = TokenInvalidType ) @@ -38,11 +38,12 @@ func (la *LL1Analyzer) getDecisionLookahead(s ATNState) []*IntervalSet { count := len(s.GetTransitions()) look := make([]*IntervalSet, count) for alt := 0; alt < count; alt++ { + look[alt] = NewIntervalSet() - lookBusy := NewJStore[ATNConfig, Comparator[ATNConfig]](aConfEqInst) - seeThruPreds := false // fail to get lookahead upon pred - la.look1(s.GetTransitions()[alt].getTarget(), nil, BasePredictionContextEMPTY, look[alt], lookBusy, NewBitSet(), seeThruPreds, false) - // Wipe out lookahead for la alternative if we found nothing + lookBusy := NewJStore[*ATNConfig, Comparator[*ATNConfig]](aConfEqInst, ClosureBusyCollection, "LL1Analyzer.getDecisionLookahead for lookBusy") + la.look1(s.GetTransitions()[alt].getTarget(), nil, BasePredictionContextEMPTY, look[alt], lookBusy, NewBitSet(), false, false) + + // Wipe out lookahead for la alternative if we found nothing, // or we had a predicate when we !seeThruPreds if look[alt].length() == 0 || look[alt].contains(LL1AnalyzerHitPred) { look[alt] = nil @@ -51,32 +52,31 @@ func (la *LL1Analyzer) getDecisionLookahead(s ATNState) []*IntervalSet { return look } -// * -// Compute set of tokens that can follow {@code s} in the ATN in the -// specified {@code ctx}. +// Look computes the set of tokens that can follow s in the [ATN] in the +// specified ctx. // -//

If {@code ctx} is {@code nil} and the end of the rule containing -// {@code s} is reached, {@link Token//EPSILON} is added to the result set. -// If {@code ctx} is not {@code nil} and the end of the outermost rule is -// reached, {@link Token//EOF} is added to the result set.

+// If ctx is nil and the end of the rule containing +// s is reached, [EPSILON] is added to the result set. // -// @param s the ATN state -// @param stopState the ATN state to stop at. This can be a -// {@link BlockEndState} to detect epsilon paths through a closure. -// @param ctx the complete parser context, or {@code nil} if the context +// If ctx is not nil and the end of the outermost rule is +// reached, [EOF] is added to the result set. +// +// Parameter s the ATN state, and stopState is the ATN state to stop at. This can be a +// [BlockEndState] to detect epsilon paths through a closure. +// +// Parameter ctx is the complete parser context, or nil if the context // should be ignored // -// @return The set of tokens that can follow {@code s} in the ATN in the -// specified {@code ctx}. -// / +// The func returns the set of tokens that can follow s in the [ATN] in the +// specified ctx. func (la *LL1Analyzer) Look(s, stopState ATNState, ctx RuleContext) *IntervalSet { r := NewIntervalSet() - seeThruPreds := true // ignore preds get all lookahead - var lookContext PredictionContext + var lookContext *PredictionContext if ctx != nil { lookContext = predictionContextFromRuleContext(s.GetATN(), ctx) } - la.look1(s, stopState, lookContext, r, NewJStore[ATNConfig, Comparator[ATNConfig]](aConfEqInst), NewBitSet(), seeThruPreds, true) + la.look1(s, stopState, lookContext, r, NewJStore[*ATNConfig, Comparator[*ATNConfig]](aConfEqInst, ClosureBusyCollection, "LL1Analyzer.Look for la.look1()"), + NewBitSet(), true, true) return r } @@ -110,16 +110,17 @@ func (la *LL1Analyzer) Look(s, stopState ATNState, ctx RuleContext) *IntervalSet // outermost context is reached. This parameter has no effect if {@code ctx} // is {@code nil}. -func (la *LL1Analyzer) look2(s, stopState ATNState, ctx PredictionContext, look *IntervalSet, lookBusy *JStore[ATNConfig, Comparator[ATNConfig]], calledRuleStack *BitSet, seeThruPreds, addEOF bool, i int) { +func (la *LL1Analyzer) look2(_, stopState ATNState, ctx *PredictionContext, look *IntervalSet, lookBusy *JStore[*ATNConfig, Comparator[*ATNConfig]], + calledRuleStack *BitSet, seeThruPreds, addEOF bool, i int) { returnState := la.atn.states[ctx.getReturnState(i)] la.look1(returnState, stopState, ctx.GetParent(i), look, lookBusy, calledRuleStack, seeThruPreds, addEOF) } -func (la *LL1Analyzer) look1(s, stopState ATNState, ctx PredictionContext, look *IntervalSet, lookBusy *JStore[ATNConfig, Comparator[ATNConfig]], calledRuleStack *BitSet, seeThruPreds, addEOF bool) { +func (la *LL1Analyzer) look1(s, stopState ATNState, ctx *PredictionContext, look *IntervalSet, lookBusy *JStore[*ATNConfig, Comparator[*ATNConfig]], calledRuleStack *BitSet, seeThruPreds, addEOF bool) { - c := NewBaseATNConfig6(s, 0, ctx) + c := NewATNConfig6(s, 0, ctx) if lookBusy.Contains(c) { return @@ -151,7 +152,7 @@ func (la *LL1Analyzer) look1(s, stopState ATNState, ctx PredictionContext, look return } - if ctx != BasePredictionContextEMPTY { + if ctx.pcType != PredictionContextEmpty { removed := calledRuleStack.contains(s.GetRuleIndex()) defer func() { if removed { @@ -202,7 +203,8 @@ func (la *LL1Analyzer) look1(s, stopState ATNState, ctx PredictionContext, look } } -func (la *LL1Analyzer) look3(stopState ATNState, ctx PredictionContext, look *IntervalSet, lookBusy *JStore[ATNConfig, Comparator[ATNConfig]], calledRuleStack *BitSet, seeThruPreds, addEOF bool, t1 *RuleTransition) { +func (la *LL1Analyzer) look3(stopState ATNState, ctx *PredictionContext, look *IntervalSet, lookBusy *JStore[*ATNConfig, Comparator[*ATNConfig]], + calledRuleStack *BitSet, seeThruPreds, addEOF bool, t1 *RuleTransition) { newContext := SingletonBasePredictionContextCreate(ctx, t1.followState.GetStateNumber()) diff --git a/vendor/github.com/antlr4-go/antlr/v4/nostatistics.go b/vendor/github.com/antlr4-go/antlr/v4/nostatistics.go new file mode 100644 index 00000000000..923c7b52c47 --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/nostatistics.go @@ -0,0 +1,47 @@ +//go:build !antlr.stats + +package antlr + +// This file is compiled when the build configuration antlr.stats is not enabled. +// which then allows the compiler to optimize out all the code that is not used. +const collectStats = false + +// goRunStats is a dummy struct used when build configuration antlr.stats is not enabled. +type goRunStats struct { +} + +var Statistics = &goRunStats{} + +func (s *goRunStats) AddJStatRec(_ *JStatRec) { + // Do nothing - compiler will optimize this out (hopefully) +} + +func (s *goRunStats) CollectionAnomalies() { + // Do nothing - compiler will optimize this out (hopefully) +} + +func (s *goRunStats) Reset() { + // Do nothing - compiler will optimize this out (hopefully) +} + +func (s *goRunStats) Report(dir string, prefix string) error { + // Do nothing - compiler will optimize this out (hopefully) + return nil +} + +func (s *goRunStats) Analyze() { + // Do nothing - compiler will optimize this out (hopefully) +} + +type statsOption func(*goRunStats) error + +func (s *goRunStats) Configure(options ...statsOption) error { + // Do nothing - compiler will optimize this out (hopefully) + return nil +} + +func WithTopN(topN int) statsOption { + return func(s *goRunStats) error { + return nil + } +} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/parser.go b/vendor/github.com/antlr4-go/antlr/v4/parser.go similarity index 80% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/parser.go rename to vendor/github.com/antlr4-go/antlr/v4/parser.go index d26bf063920..fb57ac15db7 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/parser.go +++ b/vendor/github.com/antlr4-go/antlr/v4/parser.go @@ -48,8 +48,10 @@ type BaseParser struct { _SyntaxErrors int } -// p.is all the parsing support code essentially most of it is error -// recovery stuff.// +// NewBaseParser contains all the parsing support code to embed in parsers. Essentially most of it is error +// recovery stuff. +// +//goland:noinspection GoUnusedExportedFunction func NewBaseParser(input TokenStream) *BaseParser { p := new(BaseParser) @@ -58,39 +60,46 @@ func NewBaseParser(input TokenStream) *BaseParser { // The input stream. p.input = nil + // The error handling strategy for the parser. The default value is a new // instance of {@link DefaultErrorStrategy}. p.errHandler = NewDefaultErrorStrategy() p.precedenceStack = make([]int, 0) p.precedenceStack.Push(0) - // The {@link ParserRuleContext} object for the currently executing rule. + + // The ParserRuleContext object for the currently executing rule. // p.is always non-nil during the parsing process. p.ctx = nil - // Specifies whether or not the parser should construct a parse tree during + + // Specifies whether the parser should construct a parse tree during // the parsing process. The default value is {@code true}. p.BuildParseTrees = true - // When {@link //setTrace}{@code (true)} is called, a reference to the - // {@link TraceListener} is stored here so it can be easily removed in a - // later call to {@link //setTrace}{@code (false)}. The listener itself is + + // When setTrace(true) is called, a reference to the + // TraceListener is stored here, so it can be easily removed in a + // later call to setTrace(false). The listener itself is // implemented as a parser listener so p.field is not directly used by // other parser methods. p.tracer = nil - // The list of {@link ParseTreeListener} listeners registered to receive + + // The list of ParseTreeListener listeners registered to receive // events during the parse. p.parseListeners = nil + // The number of syntax errors Reported during parsing. p.value is - // incremented each time {@link //NotifyErrorListeners} is called. + // incremented each time NotifyErrorListeners is called. p._SyntaxErrors = 0 p.SetInputStream(input) return p } -// p.field maps from the serialized ATN string to the deserialized {@link -// ATN} with +// This field maps from the serialized ATN string to the deserialized [ATN] with // bypass alternatives. // -// @see ATNDeserializationOptions//isGenerateRuleBypassTransitions() +// [ATNDeserializationOptions.isGenerateRuleBypassTransitions] +// +//goland:noinspection GoUnusedGlobalVariable var bypassAltsAtnCache = make(map[string]int) // reset the parser's state// @@ -143,10 +152,13 @@ func (p *BaseParser) Match(ttype int) Token { p.Consume() } else { t = p.errHandler.RecoverInline(p) + if p.HasError() { + return nil + } if p.BuildParseTrees && t.GetTokenIndex() == -1 { - // we must have conjured up a Newtoken during single token - // insertion - // if it's not the current symbol + + // we must have conjured up a new token during single token + // insertion if it's not the current symbol p.ctx.AddErrorNode(t) } } @@ -178,9 +190,8 @@ func (p *BaseParser) MatchWildcard() Token { } else { t = p.errHandler.RecoverInline(p) if p.BuildParseTrees && t.GetTokenIndex() == -1 { - // we must have conjured up a Newtoken during single token - // insertion - // if it's not the current symbol + // we must have conjured up a new token during single token + // insertion if it's not the current symbol p.ctx.AddErrorNode(t) } } @@ -202,33 +213,27 @@ func (p *BaseParser) GetParseListeners() []ParseTreeListener { return p.parseListeners } -// Registers {@code listener} to receive events during the parsing process. +// AddParseListener registers listener to receive events during the parsing process. // -//

To support output-preserving grammar transformations (including but not +// To support output-preserving grammar transformations (including but not // limited to left-recursion removal, automated left-factoring, and // optimized code generation), calls to listener methods during the parse // may differ substantially from calls made by -// {@link ParseTreeWalker//DEFAULT} used after the parse is complete. In +// [ParseTreeWalker.DEFAULT] used after the parse is complete. In // particular, rule entry and exit events may occur in a different order // during the parse than after the parser. In addition, calls to certain -// rule entry methods may be omitted.

-// -//

With the following specific exceptions, calls to listener events are -// deterministic, i.e. for identical input the calls to listener -// methods will be the same.

-// -//
    -//
  • Alterations to the grammar used to generate code may change the -// behavior of the listener calls.
  • -//
  • Alterations to the command line options passed to ANTLR 4 when -// generating the parser may change the behavior of the listener calls.
  • -//
  • Changing the version of the ANTLR Tool used to generate the parser -// may change the behavior of the listener calls.
  • -//
+// rule entry methods may be omitted. // -// @param listener the listener to add +// With the following specific exceptions, calls to listener events are +// deterministic, i.e. for identical input the calls to listener +// methods will be the same. // -// @panics nilPointerException if {@code} listener is {@code nil} +// - Alterations to the grammar used to generate code may change the +// behavior of the listener calls. +// - Alterations to the command line options passed to ANTLR 4 when +// generating the parser may change the behavior of the listener calls. +// - Changing the version of the ANTLR Tool used to generate the parser +// may change the behavior of the listener calls. func (p *BaseParser) AddParseListener(listener ParseTreeListener) { if listener == nil { panic("listener") @@ -239,11 +244,10 @@ func (p *BaseParser) AddParseListener(listener ParseTreeListener) { p.parseListeners = append(p.parseListeners, listener) } -// Remove {@code listener} from the list of parse listeners. +// RemoveParseListener removes listener from the list of parse listeners. // -//

If {@code listener} is {@code nil} or has not been added as a parse -// listener, p.method does nothing.

-// @param listener the listener to remove +// If listener is nil or has not been added as a parse +// listener, this func does nothing. func (p *BaseParser) RemoveParseListener(listener ParseTreeListener) { if p.parseListeners != nil { @@ -274,7 +278,7 @@ func (p *BaseParser) removeParseListeners() { p.parseListeners = nil } -// Notify any parse listeners of an enter rule event. +// TriggerEnterRuleEvent notifies all parse listeners of an enter rule event. func (p *BaseParser) TriggerEnterRuleEvent() { if p.parseListeners != nil { ctx := p.ctx @@ -285,9 +289,7 @@ func (p *BaseParser) TriggerEnterRuleEvent() { } } -// Notify any parse listeners of an exit rule event. -// -// @see //addParseListener +// TriggerExitRuleEvent notifies any parse listeners of an exit rule event. func (p *BaseParser) TriggerExitRuleEvent() { if p.parseListeners != nil { // reverse order walk of listeners @@ -314,19 +316,16 @@ func (p *BaseParser) GetTokenFactory() TokenFactory { return p.input.GetTokenSource().GetTokenFactory() } -// Tell our token source and error strategy about a Newway to create tokens.// +// setTokenFactory is used to tell our token source and error strategy about a new way to create tokens. func (p *BaseParser) setTokenFactory(factory TokenFactory) { p.input.GetTokenSource().setTokenFactory(factory) } -// The ATN with bypass alternatives is expensive to create so we create it +// GetATNWithBypassAlts - the ATN with bypass alternatives is expensive to create, so we create it // lazily. -// -// @panics UnsupportedOperationException if the current parser does not -// implement the {@link //getSerializedATN()} method. func (p *BaseParser) GetATNWithBypassAlts() { - // TODO + // TODO - Implement this? panic("Not implemented!") // serializedAtn := p.getSerializedATN() @@ -354,6 +353,7 @@ func (p *BaseParser) GetATNWithBypassAlts() { // String id = m.Get("ID") // +//goland:noinspection GoUnusedParameter func (p *BaseParser) compileParseTreePattern(pattern, patternRuleIndex, lexer Lexer) { panic("NewParseTreePatternMatcher not implemented!") @@ -386,14 +386,16 @@ func (p *BaseParser) GetTokenStream() TokenStream { return p.input } -// Set the token stream and reset the parser.// +// SetTokenStream installs input as the token stream and resets the parser. func (p *BaseParser) SetTokenStream(input TokenStream) { p.input = nil p.reset() p.input = input } -// Match needs to return the current input symbol, which gets put +// GetCurrentToken returns the current token at LT(1). +// +// [Match] needs to return the current input symbol, which gets put // into the label for the associated token ref e.g., x=ID. func (p *BaseParser) GetCurrentToken() Token { return p.input.LT(1) @@ -446,7 +448,7 @@ func (p *BaseParser) addContextToParseTree() { } } -func (p *BaseParser) EnterRule(localctx ParserRuleContext, state, ruleIndex int) { +func (p *BaseParser) EnterRule(localctx ParserRuleContext, state, _ int) { p.SetState(state) p.ctx = localctx p.ctx.SetStart(p.input.LT(1)) @@ -474,7 +476,7 @@ func (p *BaseParser) ExitRule() { func (p *BaseParser) EnterOuterAlt(localctx ParserRuleContext, altNum int) { localctx.SetAltNumber(altNum) - // if we have Newlocalctx, make sure we replace existing ctx + // if we have a new localctx, make sure we replace existing ctx // that is previous child of parse tree if p.BuildParseTrees && p.ctx != localctx { if p.ctx.GetParent() != nil { @@ -498,7 +500,7 @@ func (p *BaseParser) GetPrecedence() int { return p.precedenceStack[len(p.precedenceStack)-1] } -func (p *BaseParser) EnterRecursionRule(localctx ParserRuleContext, state, ruleIndex, precedence int) { +func (p *BaseParser) EnterRecursionRule(localctx ParserRuleContext, state, _, precedence int) { p.SetState(state) p.precedenceStack.Push(precedence) p.ctx = localctx @@ -512,7 +514,7 @@ func (p *BaseParser) EnterRecursionRule(localctx ParserRuleContext, state, ruleI // // Like {@link //EnterRule} but for recursive rules. -func (p *BaseParser) PushNewRecursionContext(localctx ParserRuleContext, state, ruleIndex int) { +func (p *BaseParser) PushNewRecursionContext(localctx ParserRuleContext, state, _ int) { previous := p.ctx previous.SetParent(localctx) previous.SetInvokingState(state) @@ -530,7 +532,7 @@ func (p *BaseParser) PushNewRecursionContext(localctx ParserRuleContext, state, } func (p *BaseParser) UnrollRecursionContexts(parentCtx ParserRuleContext) { - p.precedenceStack.Pop() + _, _ = p.precedenceStack.Pop() p.ctx.SetStop(p.input.LT(-1)) retCtx := p.ctx // save current ctx (return value) // unroll so ctx is as it was before call to recursive method @@ -561,29 +563,22 @@ func (p *BaseParser) GetInvokingContext(ruleIndex int) ParserRuleContext { return nil } -func (p *BaseParser) Precpred(localctx RuleContext, precedence int) bool { +func (p *BaseParser) Precpred(_ RuleContext, precedence int) bool { return precedence >= p.precedenceStack[len(p.precedenceStack)-1] } +//goland:noinspection GoUnusedParameter func (p *BaseParser) inContext(context ParserRuleContext) bool { // TODO: useful in parser? return false } -// -// Checks whether or not {@code symbol} can follow the current state in the -// ATN. The behavior of p.method is equivalent to the following, but is +// IsExpectedToken checks whether symbol can follow the current state in the +// {ATN}. The behavior of p.method is equivalent to the following, but is // implemented such that the complete context-sensitive follow set does not // need to be explicitly constructed. // -//
-// return getExpectedTokens().contains(symbol)
-// 
-// -// @param symbol the symbol type to check -// @return {@code true} if {@code symbol} can follow the current state in -// the ATN, otherwise {@code false}. - +// return getExpectedTokens().contains(symbol) func (p *BaseParser) IsExpectedToken(symbol int) bool { atn := p.Interpreter.atn ctx := p.ctx @@ -611,11 +606,9 @@ func (p *BaseParser) IsExpectedToken(symbol int) bool { return false } -// Computes the set of input symbols which could follow the current parser -// state and context, as given by {@link //GetState} and {@link //GetContext}, +// GetExpectedTokens and returns the set of input symbols which could follow the current parser +// state and context, as given by [GetState] and [GetContext], // respectively. -// -// @see ATN//getExpectedTokens(int, RuleContext) func (p *BaseParser) GetExpectedTokens() *IntervalSet { return p.Interpreter.atn.getExpectedTokens(p.state, p.ctx) } @@ -626,7 +619,7 @@ func (p *BaseParser) GetExpectedTokensWithinCurrentRule() *IntervalSet { return atn.NextTokens(s, nil) } -// Get a rule's index (i.e., {@code RULE_ruleName} field) or -1 if not found.// +// GetRuleIndex get a rule's index (i.e., RULE_ruleName field) or -1 if not found. func (p *BaseParser) GetRuleIndex(ruleName string) int { var ruleIndex, ok = p.GetRuleIndexMap()[ruleName] if ok { @@ -636,13 +629,10 @@ func (p *BaseParser) GetRuleIndex(ruleName string) int { return -1 } -// Return List<String> of the rule names in your parser instance +// GetRuleInvocationStack returns a list of the rule names in your parser instance // leading up to a call to the current rule. You could override if // you want more details such as the file/line info of where // in the ATN a rule is invoked. -// -// this very useful for error messages. - func (p *BaseParser) GetRuleInvocationStack(c ParserRuleContext) []string { if c == nil { c = p.ctx @@ -668,16 +658,16 @@ func (p *BaseParser) GetRuleInvocationStack(c ParserRuleContext) []string { return stack } -// For debugging and other purposes.// +// GetDFAStrings returns a list of all DFA states used for debugging purposes func (p *BaseParser) GetDFAStrings() string { return fmt.Sprint(p.Interpreter.decisionToDFA) } -// For debugging and other purposes.// +// DumpDFA prints the whole of the DFA for debugging func (p *BaseParser) DumpDFA() { seenOne := false for _, dfa := range p.Interpreter.decisionToDFA { - if dfa.states.Len() > 0 { + if dfa.Len() > 0 { if seenOne { fmt.Println() } @@ -692,8 +682,10 @@ func (p *BaseParser) GetSourceName() string { return p.GrammarFileName } -// During a parse is sometimes useful to listen in on the rule entry and exit -// events as well as token Matches. p.is for quick and dirty debugging. +// SetTrace installs a trace listener for the parse. +// +// During a parse it is sometimes useful to listen in on the rule entry and exit +// events as well as token Matches. This is for quick and dirty debugging. func (p *BaseParser) SetTrace(trace *TraceListener) { if trace == nil { p.RemoveParseListener(p.tracer) diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/parser_atn_simulator.go b/vendor/github.com/antlr4-go/antlr/v4/parser_atn_simulator.go similarity index 64% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/parser_atn_simulator.go rename to vendor/github.com/antlr4-go/antlr/v4/parser_atn_simulator.go index 8bcc46a0d99..ae2869692a6 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/parser_atn_simulator.go +++ b/vendor/github.com/antlr4-go/antlr/v4/parser_atn_simulator.go @@ -10,31 +10,51 @@ import ( "strings" ) -var ( - ParserATNSimulatorDebug = false - ParserATNSimulatorTraceATNSim = false - ParserATNSimulatorDFADebug = false - ParserATNSimulatorRetryDebug = false - TurnOffLRLoopEntryBranchOpt = false -) +var () + +// ClosureBusy is a store of ATNConfigs and is a tiny abstraction layer over +// a standard JStore so that we can use Lazy instantiation of the JStore, mostly +// to avoid polluting the stats module with a ton of JStore instances with nothing in them. +type ClosureBusy struct { + bMap *JStore[*ATNConfig, Comparator[*ATNConfig]] + desc string +} + +// NewClosureBusy creates a new ClosureBusy instance used to avoid infinite recursion for right-recursive rules +func NewClosureBusy(desc string) *ClosureBusy { + return &ClosureBusy{ + desc: desc, + } +} + +func (c *ClosureBusy) Put(config *ATNConfig) (*ATNConfig, bool) { + if c.bMap == nil { + c.bMap = NewJStore[*ATNConfig, Comparator[*ATNConfig]](aConfEqInst, ClosureBusyCollection, c.desc) + } + return c.bMap.Put(config) +} type ParserATNSimulator struct { - *BaseATNSimulator + BaseATNSimulator parser Parser predictionMode int input TokenStream startIndex int dfa *DFA - mergeCache *DoubleDict + mergeCache *JPCMap outerContext ParserRuleContext } +//goland:noinspection GoUnusedExportedFunction func NewParserATNSimulator(parser Parser, atn *ATN, decisionToDFA []*DFA, sharedContextCache *PredictionContextCache) *ParserATNSimulator { - p := new(ParserATNSimulator) - - p.BaseATNSimulator = NewBaseATNSimulator(atn, sharedContextCache) + p := &ParserATNSimulator{ + BaseATNSimulator: BaseATNSimulator{ + atn: atn, + sharedContextCache: sharedContextCache, + }, + } p.parser = parser p.decisionToDFA = decisionToDFA @@ -46,12 +66,12 @@ func NewParserATNSimulator(parser Parser, atn *ATN, decisionToDFA []*DFA, shared p.outerContext = nil p.dfa = nil // Each prediction operation uses a cache for merge of prediction contexts. - // Don't keep around as it wastes huge amounts of memory. DoubleKeyMap - // isn't Synchronized but we're ok since two threads shouldn't reuse same - // parser/atnsim object because it can only handle one input at a time. - // This maps graphs a and b to merged result c. (a,b)&rarrc. We can avoid - // the merge if we ever see a and b again. Note that (b,a)&rarrc should - // also be examined during cache lookup. + // Don't keep around as it wastes huge amounts of memory. [JPCMap] + // isn't Synchronized, but we're ok since two threads shouldn't reuse same + // parser/atn-simulator object because it can only handle one input at a time. + // This maps graphs a and b to merged result c. (a,b) -> c. We can avoid + // the merge if we ever see a and b again. Note that (b,a) -> c should + // also be examined during cache lookup. // p.mergeCache = nil @@ -69,14 +89,14 @@ func (p *ParserATNSimulator) SetPredictionMode(v int) { func (p *ParserATNSimulator) reset() { } -func (p *ParserATNSimulator) AdaptivePredict(input TokenStream, decision int, outerContext ParserRuleContext) int { - if ParserATNSimulatorDebug || ParserATNSimulatorTraceATNSim { +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) AdaptivePredict(parser *BaseParser, input TokenStream, decision int, outerContext ParserRuleContext) int { + if runtimeConfig.parserATNSimulatorDebug || runtimeConfig.parserATNSimulatorTraceATNSim { fmt.Println("adaptivePredict decision " + strconv.Itoa(decision) + " exec LA(1)==" + p.getLookaheadName(input) + " line " + strconv.Itoa(input.LT(1).GetLine()) + ":" + strconv.Itoa(input.LT(1).GetColumn())) } - p.input = input p.startIndex = input.Index() p.outerContext = outerContext @@ -88,7 +108,15 @@ func (p *ParserATNSimulator) AdaptivePredict(input TokenStream, decision int, ou defer func() { p.dfa = nil - p.mergeCache = nil // wack cache after each prediction + p.mergeCache = nil // whack cache after each prediction + // Do not attempt to run a GC now that we're done with the cache as makes the + // GC overhead terrible for badly formed grammars and has little effect on well formed + // grammars. + // I have made some extra effort to try and reduce memory pressure by reusing allocations when + // possible. However, it can only have a limited effect. The real solution is to encourage grammar + // authors to think more carefully about their grammar and to use the new antlr.stats tag to inspect + // what is happening at runtime, along with using the error listener to report ambiguities. + input.Seek(index) input.Release(m) }() @@ -113,7 +141,7 @@ func (p *ParserATNSimulator) AdaptivePredict(input TokenStream, decision int, ou if outerContext == nil { outerContext = ParserRuleContextEmpty } - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("predictATN decision " + strconv.Itoa(dfa.decision) + " exec LA(1)==" + p.getLookaheadName(input) + ", outerContext=" + outerContext.String(p.parser.GetRuleNames(), nil)) @@ -142,47 +170,52 @@ func (p *ParserATNSimulator) AdaptivePredict(input TokenStream, decision int, ou p.atn.stateMu.Unlock() } - alt := p.execATN(dfa, s0, input, index, outerContext) - if ParserATNSimulatorDebug { + alt, re := p.execATN(dfa, s0, input, index, outerContext) + parser.SetError(re) + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("DFA after predictATN: " + dfa.String(p.parser.GetLiteralNames(), nil)) } return alt } -// Performs ATN simulation to compute a predicted alternative based -// upon the remaining input, but also updates the DFA cache to avoid -// having to traverse the ATN again for the same input sequence. - +// execATN performs ATN simulation to compute a predicted alternative based +// upon the remaining input, but also updates the DFA cache to avoid +// having to traverse the ATN again for the same input sequence. +// // There are some key conditions we're looking for after computing a new // set of ATN configs (proposed DFA state): -// if the set is empty, there is no viable alternative for current symbol -// does the state uniquely predict an alternative? -// does the state have a conflict that would prevent us from -// putting it on the work list? - +// +// - If the set is empty, there is no viable alternative for current symbol +// - Does the state uniquely predict an alternative? +// - Does the state have a conflict that would prevent us from +// putting it on the work list? +// // We also have some key operations to do: -// add an edge from previous DFA state to potentially NewDFA state, D, -// upon current symbol but only if adding to work list, which means in all -// cases except no viable alternative (and possibly non-greedy decisions?) -// collecting predicates and adding semantic context to DFA accept states -// adding rule context to context-sensitive DFA accept states -// consuming an input symbol -// Reporting a conflict -// Reporting an ambiguity -// Reporting a context sensitivity -// Reporting insufficient predicates - -// cover these cases: // -// dead end -// single alt -// single alt + preds -// conflict -// conflict + preds -func (p *ParserATNSimulator) execATN(dfa *DFA, s0 *DFAState, input TokenStream, startIndex int, outerContext ParserRuleContext) int { - - if ParserATNSimulatorDebug || ParserATNSimulatorTraceATNSim { +// - Add an edge from previous DFA state to potentially NewDFA state, D, +// - Upon current symbol but only if adding to work list, which means in all +// cases except no viable alternative (and possibly non-greedy decisions?) +// - Collecting predicates and adding semantic context to DFA accept states +// - adding rule context to context-sensitive DFA accept states +// - Consuming an input symbol +// - Reporting a conflict +// - Reporting an ambiguity +// - Reporting a context sensitivity +// - Reporting insufficient predicates +// +// Cover these cases: +// +// - dead end +// - single alt +// - single alt + predicates +// - conflict +// - conflict + predicates +// +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) execATN(dfa *DFA, s0 *DFAState, input TokenStream, startIndex int, outerContext ParserRuleContext) (int, RecognitionException) { + + if runtimeConfig.parserATNSimulatorDebug || runtimeConfig.parserATNSimulatorTraceATNSim { fmt.Println("execATN decision " + strconv.Itoa(dfa.decision) + ", DFA state " + s0.String() + ", LA(1)==" + p.getLookaheadName(input) + @@ -191,7 +224,7 @@ func (p *ParserATNSimulator) execATN(dfa *DFA, s0 *DFAState, input TokenStream, previousD := s0 - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("s0 = " + s0.String()) } t := input.LA(1) @@ -214,17 +247,17 @@ func (p *ParserATNSimulator) execATN(dfa *DFA, s0 *DFAState, input TokenStream, input.Seek(startIndex) alt := p.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previousD.configs, outerContext) if alt != ATNInvalidAltNumber { - return alt + return alt, nil } - - panic(e) + p.parser.SetError(e) + return ATNInvalidAltNumber, e } if D.requiresFullContext && p.predictionMode != PredictionModeSLL { // IF PREDS, MIGHT RESOLVE TO SINGLE ALT => SLL (or syntax error) - conflictingAlts := D.configs.GetConflictingAlts() + conflictingAlts := D.configs.conflictingAlts if D.predicates != nil { - if ParserATNSimulatorDebug { - fmt.Println("DFA state has preds in DFA sim LL failover") + if runtimeConfig.parserATNSimulatorDebug { + fmt.Println("DFA state has preds in DFA sim LL fail-over") } conflictIndex := input.Index() if conflictIndex != startIndex { @@ -232,10 +265,10 @@ func (p *ParserATNSimulator) execATN(dfa *DFA, s0 *DFAState, input TokenStream, } conflictingAlts = p.evalSemanticContext(D.predicates, outerContext, true) if conflictingAlts.length() == 1 { - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("Full LL avoided") } - return conflictingAlts.minValue() + return conflictingAlts.minValue(), nil } if conflictIndex != startIndex { // restore the index so Reporting the fallback to full @@ -243,18 +276,18 @@ func (p *ParserATNSimulator) execATN(dfa *DFA, s0 *DFAState, input TokenStream, input.Seek(conflictIndex) } } - if ParserATNSimulatorDFADebug { + if runtimeConfig.parserATNSimulatorDFADebug { fmt.Println("ctx sensitive state " + outerContext.String(nil, nil) + " in " + D.String()) } fullCtx := true s0Closure := p.computeStartState(dfa.atnStartState, outerContext, fullCtx) p.ReportAttemptingFullContext(dfa, conflictingAlts, D.configs, startIndex, input.Index()) - alt := p.execATNWithFullContext(dfa, D, s0Closure, input, startIndex, outerContext) - return alt + alt, re := p.execATNWithFullContext(dfa, D, s0Closure, input, startIndex, outerContext) + return alt, re } if D.isAcceptState { if D.predicates == nil { - return D.prediction + return D.prediction, nil } stopIndex := input.Index() input.Seek(startIndex) @@ -262,13 +295,13 @@ func (p *ParserATNSimulator) execATN(dfa *DFA, s0 *DFAState, input TokenStream, switch alts.length() { case 0: - panic(p.noViableAlt(input, outerContext, D.configs, startIndex)) + return ATNInvalidAltNumber, p.noViableAlt(input, outerContext, D.configs, startIndex) case 1: - return alts.minValue() + return alts.minValue(), nil default: // Report ambiguity after predicate evaluation to make sure the correct set of ambig alts is Reported. p.ReportAmbiguity(dfa, D, startIndex, stopIndex, false, alts, D.configs) - return alts.minValue() + return alts.minValue(), nil } } previousD = D @@ -314,7 +347,8 @@ func (p *ParserATNSimulator) getExistingTargetState(previousD *DFAState, t int) // @return The computed target DFA state for the given input symbol // {@code t}. If {@code t} does not lead to a valid DFA state, p method // returns {@link //ERROR}. - +// +//goland:noinspection GoBoolExpressions func (p *ParserATNSimulator) computeTargetState(dfa *DFA, previousD *DFAState, t int) *DFAState { reach := p.computeReachSet(previousD.configs, t, false) @@ -322,12 +356,12 @@ func (p *ParserATNSimulator) computeTargetState(dfa *DFA, previousD *DFAState, t p.addDFAEdge(dfa, previousD, t, ATNSimulatorError) return ATNSimulatorError } - // create Newtarget state we'll add to DFA after it's complete + // create new target state we'll add to DFA after it's complete D := NewDFAState(-1, reach) predictedAlt := p.getUniqueAlt(reach) - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { altSubSets := PredictionModegetConflictingAltSubsets(reach) fmt.Println("SLL altSubSets=" + fmt.Sprint(altSubSets) + ", previous=" + previousD.configs.String() + @@ -340,17 +374,17 @@ func (p *ParserATNSimulator) computeTargetState(dfa *DFA, previousD *DFAState, t if predictedAlt != ATNInvalidAltNumber { // NO CONFLICT, UNIQUELY PREDICTED ALT D.isAcceptState = true - D.configs.SetUniqueAlt(predictedAlt) + D.configs.uniqueAlt = predictedAlt D.setPrediction(predictedAlt) } else if PredictionModehasSLLConflictTerminatingPrediction(p.predictionMode, reach) { // MORE THAN ONE VIABLE ALTERNATIVE - D.configs.SetConflictingAlts(p.getConflictingAlts(reach)) + D.configs.conflictingAlts = p.getConflictingAlts(reach) D.requiresFullContext = true // in SLL-only mode, we will stop at p state and return the minimum alt D.isAcceptState = true - D.setPrediction(D.configs.GetConflictingAlts().minValue()) + D.setPrediction(D.configs.conflictingAlts.minValue()) } - if D.isAcceptState && D.configs.HasSemanticContext() { + if D.isAcceptState && D.configs.hasSemanticContext { p.predicateDFAState(D, p.atn.getDecisionState(dfa.decision)) if D.predicates != nil { D.setPrediction(ATNInvalidAltNumber) @@ -381,15 +415,17 @@ func (p *ParserATNSimulator) predicateDFAState(dfaState *DFAState, decisionState } // comes back with reach.uniqueAlt set to a valid alt -func (p *ParserATNSimulator) execATNWithFullContext(dfa *DFA, D *DFAState, s0 ATNConfigSet, input TokenStream, startIndex int, outerContext ParserRuleContext) int { +// +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) execATNWithFullContext(dfa *DFA, D *DFAState, s0 *ATNConfigSet, input TokenStream, startIndex int, outerContext ParserRuleContext) (int, RecognitionException) { - if ParserATNSimulatorDebug || ParserATNSimulatorTraceATNSim { + if runtimeConfig.parserATNSimulatorDebug || runtimeConfig.parserATNSimulatorTraceATNSim { fmt.Println("execATNWithFullContext " + s0.String()) } fullCtx := true foundExactAmbig := false - var reach ATNConfigSet + var reach *ATNConfigSet previous := s0 input.Seek(startIndex) t := input.LA(1) @@ -407,25 +443,23 @@ func (p *ParserATNSimulator) execATNWithFullContext(dfa *DFA, D *DFAState, s0 AT // ATN states in SLL implies LL will also get nowhere. // If conflict in states that dip out, choose min since we // will get error no matter what. - e := p.noViableAlt(input, outerContext, previous, startIndex) input.Seek(startIndex) alt := p.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previous, outerContext) if alt != ATNInvalidAltNumber { - return alt + return alt, nil } - - panic(e) + return alt, p.noViableAlt(input, outerContext, previous, startIndex) } altSubSets := PredictionModegetConflictingAltSubsets(reach) - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("LL altSubSets=" + fmt.Sprint(altSubSets) + ", predict=" + strconv.Itoa(PredictionModegetUniqueAlt(altSubSets)) + ", resolvesToJustOneViableAlt=" + fmt.Sprint(PredictionModeresolvesToJustOneViableAlt(altSubSets))) } - reach.SetUniqueAlt(p.getUniqueAlt(reach)) + reach.uniqueAlt = p.getUniqueAlt(reach) // unique prediction? - if reach.GetUniqueAlt() != ATNInvalidAltNumber { - predictedAlt = reach.GetUniqueAlt() + if reach.uniqueAlt != ATNInvalidAltNumber { + predictedAlt = reach.uniqueAlt break } if p.predictionMode != PredictionModeLLExactAmbigDetection { @@ -454,9 +488,9 @@ func (p *ParserATNSimulator) execATNWithFullContext(dfa *DFA, D *DFAState, s0 AT // If the configuration set uniquely predicts an alternative, // without conflict, then we know that it's a full LL decision // not SLL. - if reach.GetUniqueAlt() != ATNInvalidAltNumber { + if reach.uniqueAlt != ATNInvalidAltNumber { p.ReportContextSensitivity(dfa, predictedAlt, reach, startIndex, input.Index()) - return predictedAlt + return predictedAlt, nil } // We do not check predicates here because we have checked them // on-the-fly when doing full context prediction. @@ -469,10 +503,10 @@ func (p *ParserATNSimulator) execATNWithFullContext(dfa *DFA, D *DFAState, s0 AT // // For example, we might know that we have conflicting configurations. // But, that does not mean that there is no way forward without a - // conflict. It's possible to have nonconflicting alt subsets as in: - + // conflict. It's possible to have non-conflicting alt subsets as in: + // // altSubSets=[{1, 2}, {1, 2}, {1}, {1, 2}] - + // // from // // [(17,1,[5 $]), (13,1,[5 10 $]), (21,1,[5 10 $]), (11,1,[$]), @@ -487,14 +521,15 @@ func (p *ParserATNSimulator) execATNWithFullContext(dfa *DFA, D *DFAState, s0 AT p.ReportAmbiguity(dfa, D, startIndex, input.Index(), foundExactAmbig, reach.Alts(), reach) - return predictedAlt + return predictedAlt, nil } -func (p *ParserATNSimulator) computeReachSet(closure ATNConfigSet, t int, fullCtx bool) ATNConfigSet { +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) computeReachSet(closure *ATNConfigSet, t int, fullCtx bool) *ATNConfigSet { if p.mergeCache == nil { - p.mergeCache = NewDoubleDict() + p.mergeCache = NewJPCMap(ReachSetCollection, "Merge cache for computeReachSet()") } - intermediate := NewBaseATNConfigSet(fullCtx) + intermediate := NewATNConfigSet(fullCtx) // Configurations already in a rule stop state indicate reaching the end // of the decision rule (local context) or end of the start rule (full @@ -506,18 +541,18 @@ func (p *ParserATNSimulator) computeReachSet(closure ATNConfigSet, t int, fullCt // ensure that the alternative Matching the longest overall sequence is // chosen when multiple such configurations can Match the input. - var skippedStopStates []*BaseATNConfig + var skippedStopStates []*ATNConfig // First figure out where we can reach on input t - for _, c := range closure.GetItems() { - if ParserATNSimulatorDebug { + for _, c := range closure.configs { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("testing " + p.GetTokenName(t) + " at " + c.String()) } if _, ok := c.GetState().(*RuleStopState); ok { if fullCtx || t == TokenEOF { - skippedStopStates = append(skippedStopStates, c.(*BaseATNConfig)) - if ParserATNSimulatorDebug { + skippedStopStates = append(skippedStopStates, c) + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("added " + c.String() + " to SkippedStopStates") } } @@ -527,9 +562,9 @@ func (p *ParserATNSimulator) computeReachSet(closure ATNConfigSet, t int, fullCt for _, trans := range c.GetState().GetTransitions() { target := p.getReachableTarget(trans, t) if target != nil { - cfg := NewBaseATNConfig4(c, target) + cfg := NewATNConfig4(c, target) intermediate.Add(cfg, p.mergeCache) - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("added " + cfg.String() + " to intermediate") } } @@ -537,7 +572,7 @@ func (p *ParserATNSimulator) computeReachSet(closure ATNConfigSet, t int, fullCt } // Now figure out where the reach operation can take us... - var reach ATNConfigSet + var reach *ATNConfigSet // This block optimizes the reach operation for intermediate sets which // trivially indicate a termination state for the overall @@ -565,8 +600,8 @@ func (p *ParserATNSimulator) computeReachSet(closure ATNConfigSet, t int, fullCt // operation on the intermediate set to compute its initial value. // if reach == nil { - reach = NewBaseATNConfigSet(fullCtx) - closureBusy := NewJStore[ATNConfig, Comparator[ATNConfig]](aConfEqInst) + reach = NewATNConfigSet(fullCtx) + closureBusy := NewClosureBusy("ParserATNSimulator.computeReachSet() make a closureBusy") treatEOFAsEpsilon := t == TokenEOF amount := len(intermediate.configs) for k := 0; k < amount; k++ { @@ -588,10 +623,10 @@ func (p *ParserATNSimulator) computeReachSet(closure ATNConfigSet, t int, fullCt // // This is handled before the configurations in SkippedStopStates, // because any configurations potentially added from that list are - // already guaranteed to meet p condition whether or not it's + // already guaranteed to meet this condition whether it's // required. // - reach = p.removeAllConfigsNotInRuleStopState(reach, reach == intermediate) + reach = p.removeAllConfigsNotInRuleStopState(reach, reach.Equals(intermediate)) } // If SkippedStopStates!=nil, then it contains at least one // configuration. For full-context reach operations, these @@ -607,41 +642,40 @@ func (p *ParserATNSimulator) computeReachSet(closure ATNConfigSet, t int, fullCt } } - if ParserATNSimulatorTraceATNSim { + if runtimeConfig.parserATNSimulatorTraceATNSim { fmt.Println("computeReachSet " + closure.String() + " -> " + reach.String()) } - if len(reach.GetItems()) == 0 { + if len(reach.configs) == 0 { return nil } return reach } -// Return a configuration set containing only the configurations from -// {@code configs} which are in a {@link RuleStopState}. If all -// configurations in {@code configs} are already in a rule stop state, p -// method simply returns {@code configs}. +// removeAllConfigsNotInRuleStopState returns a configuration set containing only the configurations from +// configs which are in a [RuleStopState]. If all +// configurations in configs are already in a rule stop state, this +// method simply returns configs. // -//

When {@code lookToEndOfRule} is true, p method uses -// {@link ATN//NextTokens} for each configuration in {@code configs} which is +// When lookToEndOfRule is true, this method uses +// [ATN].[NextTokens] for each configuration in configs which is // not already in a rule stop state to see if a rule stop state is reachable -// from the configuration via epsilon-only transitions.

+// from the configuration via epsilon-only transitions. // -// @param configs the configuration set to update -// @param lookToEndOfRule when true, p method checks for rule stop states +// When lookToEndOfRule is true, this method checks for rule stop states // reachable by epsilon-only transitions from each configuration in -// {@code configs}. +// configs. // -// @return {@code configs} if all configurations in {@code configs} are in a -// rule stop state, otherwise return a Newconfiguration set containing only -// the configurations from {@code configs} which are in a rule stop state -func (p *ParserATNSimulator) removeAllConfigsNotInRuleStopState(configs ATNConfigSet, lookToEndOfRule bool) ATNConfigSet { +// The func returns configs if all configurations in configs are in a +// rule stop state, otherwise it returns a new configuration set containing only +// the configurations from configs which are in a rule stop state +func (p *ParserATNSimulator) removeAllConfigsNotInRuleStopState(configs *ATNConfigSet, lookToEndOfRule bool) *ATNConfigSet { if PredictionModeallConfigsInRuleStopStates(configs) { return configs } - result := NewBaseATNConfigSet(configs.FullContext()) - for _, config := range configs.GetItems() { + result := NewATNConfigSet(configs.fullCtx) + for _, config := range configs.configs { if _, ok := config.GetState().(*RuleStopState); ok { result.Add(config, p.mergeCache) continue @@ -650,91 +684,81 @@ func (p *ParserATNSimulator) removeAllConfigsNotInRuleStopState(configs ATNConfi NextTokens := p.atn.NextTokens(config.GetState(), nil) if NextTokens.contains(TokenEpsilon) { endOfRuleState := p.atn.ruleToStopState[config.GetState().GetRuleIndex()] - result.Add(NewBaseATNConfig4(config, endOfRuleState), p.mergeCache) + result.Add(NewATNConfig4(config, endOfRuleState), p.mergeCache) } } } return result } -func (p *ParserATNSimulator) computeStartState(a ATNState, ctx RuleContext, fullCtx bool) ATNConfigSet { +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) computeStartState(a ATNState, ctx RuleContext, fullCtx bool) *ATNConfigSet { // always at least the implicit call to start rule initialContext := predictionContextFromRuleContext(p.atn, ctx) - configs := NewBaseATNConfigSet(fullCtx) - if ParserATNSimulatorDebug || ParserATNSimulatorTraceATNSim { + configs := NewATNConfigSet(fullCtx) + if runtimeConfig.parserATNSimulatorDebug || runtimeConfig.parserATNSimulatorTraceATNSim { fmt.Println("computeStartState from ATN state " + a.String() + " initialContext=" + initialContext.String()) } for i := 0; i < len(a.GetTransitions()); i++ { target := a.GetTransitions()[i].getTarget() - c := NewBaseATNConfig6(target, i+1, initialContext) - closureBusy := NewJStore[ATNConfig, Comparator[ATNConfig]](atnConfCompInst) + c := NewATNConfig6(target, i+1, initialContext) + closureBusy := NewClosureBusy("ParserATNSimulator.computeStartState() make a closureBusy") p.closure(c, configs, closureBusy, true, fullCtx, false) } return configs } -// This method transforms the start state computed by -// {@link //computeStartState} to the special start state used by a -// precedence DFA for a particular precedence value. The transformation +// applyPrecedenceFilter transforms the start state computed by +// [computeStartState] to the special start state used by a +// precedence [DFA] for a particular precedence value. The transformation // process applies the following changes to the start state's configuration // set. // -//
    -//
  1. Evaluate the precedence predicates for each configuration using -// {@link SemanticContext//evalPrecedence}.
  2. -//
  3. Remove all configurations which predict an alternative greater than -// 1, for which another configuration that predicts alternative 1 is in the -// same ATN state with the same prediction context. This transformation is -// valid for the following reasons: -//
      -//
    • The closure block cannot contain any epsilon transitions which bypass -// the body of the closure, so all states reachable via alternative 1 are -// part of the precedence alternatives of the transformed left-recursive -// rule.
    • -//
    • The "primary" portion of a left recursive rule cannot contain an -// epsilon transition, so the only way an alternative other than 1 can exist -// in a state that is also reachable via alternative 1 is by nesting calls -// to the left-recursive rule, with the outer calls not being at the -// preferred precedence level.
    • -//
    -//
  4. -//
+// 1. Evaluate the precedence predicates for each configuration using +// [SemanticContext].evalPrecedence. +// 2. Remove all configurations which predict an alternative greater than +// 1, for which another configuration that predicts alternative 1 is in the +// same ATN state with the same prediction context. +// +// Transformation 2 is valid for the following reasons: +// +// - The closure block cannot contain any epsilon transitions which bypass +// the body of the closure, so all states reachable via alternative 1 are +// part of the precedence alternatives of the transformed left-recursive +// rule. +// - The "primary" portion of a left recursive rule cannot contain an +// epsilon transition, so the only way an alternative other than 1 can exist +// in a state that is also reachable via alternative 1 is by nesting calls +// to the left-recursive rule, with the outer calls not being at the +// preferred precedence level. +// +// The prediction context must be considered by this filter to address +// situations like the following: +// +// grammar TA +// prog: statement* EOF +// statement: letterA | statement letterA 'b' +// letterA: 'a' // -//

-// The prediction context must be considered by p filter to address -// situations like the following. -//

-// -//
-// grammar TA
-// prog: statement* EOF
-// statement: letterA | statement letterA 'b'
-// letterA: 'a'
-// 
-//
-//

-// If the above grammar, the ATN state immediately before the token -// reference {@code 'a'} in {@code letterA} is reachable from the left edge +// In the above grammar, the [ATN] state immediately before the token +// reference 'a' in letterA is reachable from the left edge // of both the primary and closure blocks of the left-recursive rule -// {@code statement}. The prediction context associated with each of these +// statement. The prediction context associated with each of these // configurations distinguishes between them, and prevents the alternative -// which stepped out to {@code prog} (and then back in to {@code statement} +// which stepped out to prog, and then back in to statement // from being eliminated by the filter. -//

// -// @param configs The configuration set computed by -// {@link //computeStartState} as the start state for the DFA. -// @return The transformed configuration set representing the start state -// for a precedence DFA at a particular precedence level (determined by -// calling {@link Parser//getPrecedence}). -func (p *ParserATNSimulator) applyPrecedenceFilter(configs ATNConfigSet) ATNConfigSet { +// The func returns the transformed configuration set representing the start state +// for a precedence [DFA] at a particular precedence level (determined by +// calling [Parser].getPrecedence). +func (p *ParserATNSimulator) applyPrecedenceFilter(configs *ATNConfigSet) *ATNConfigSet { - statesFromAlt1 := make(map[int]PredictionContext) - configSet := NewBaseATNConfigSet(configs.FullContext()) + statesFromAlt1 := make(map[int]*PredictionContext) + configSet := NewATNConfigSet(configs.fullCtx) - for _, config := range configs.GetItems() { + for _, config := range configs.configs { // handle alt 1 first if config.GetAlt() != 1 { continue @@ -746,12 +770,12 @@ func (p *ParserATNSimulator) applyPrecedenceFilter(configs ATNConfigSet) ATNConf } statesFromAlt1[config.GetState().GetStateNumber()] = config.GetContext() if updatedContext != config.GetSemanticContext() { - configSet.Add(NewBaseATNConfig2(config, updatedContext), p.mergeCache) + configSet.Add(NewATNConfig2(config, updatedContext), p.mergeCache) } else { configSet.Add(config, p.mergeCache) } } - for _, config := range configs.GetItems() { + for _, config := range configs.configs { if config.GetAlt() == 1 { // already handled @@ -780,10 +804,11 @@ func (p *ParserATNSimulator) getReachableTarget(trans Transition, ttype int) ATN return nil } -func (p *ParserATNSimulator) getPredsForAmbigAlts(ambigAlts *BitSet, configs ATNConfigSet, nalts int) []SemanticContext { +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) getPredsForAmbigAlts(ambigAlts *BitSet, configs *ATNConfigSet, nalts int) []SemanticContext { altToPred := make([]SemanticContext, nalts+1) - for _, c := range configs.GetItems() { + for _, c := range configs.configs { if ambigAlts.contains(c.GetAlt()) { altToPred[c.GetAlt()] = SemanticContextorContext(altToPred[c.GetAlt()], c.GetSemanticContext()) } @@ -797,11 +822,11 @@ func (p *ParserATNSimulator) getPredsForAmbigAlts(ambigAlts *BitSet, configs ATN nPredAlts++ } } - // nonambig alts are nil in altToPred + // unambiguous alts are nil in altToPred if nPredAlts == 0 { altToPred = nil } - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("getPredsForAmbigAlts result " + fmt.Sprint(altToPred)) } return altToPred @@ -812,7 +837,7 @@ func (p *ParserATNSimulator) getPredicatePredictions(ambigAlts *BitSet, altToPre containsPredicate := false for i := 1; i < len(altToPred); i++ { pred := altToPred[i] - // unpredicated is indicated by SemanticContextNONE + // un-predicated is indicated by SemanticContextNONE if ambigAlts != nil && ambigAlts.contains(i) { pairs = append(pairs, NewPredPrediction(pred, i)) } @@ -826,51 +851,42 @@ func (p *ParserATNSimulator) getPredicatePredictions(ambigAlts *BitSet, altToPre return pairs } -// This method is used to improve the localization of error messages by -// choosing an alternative rather than panicing a -// {@link NoViableAltException} in particular prediction scenarios where the -// {@link //ERROR} state was reached during ATN simulation. +// getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule is used to improve the localization of error messages by +// choosing an alternative rather than panic a NoViableAltException in particular prediction scenarios where the +// Error state was reached during [ATN] simulation. // -//

-// The default implementation of p method uses the following -// algorithm to identify an ATN configuration which successfully parsed the +// The default implementation of this method uses the following +// algorithm to identify an [ATN] configuration which successfully parsed the // decision entry rule. Choosing such an alternative ensures that the -// {@link ParserRuleContext} returned by the calling rule will be complete +// [ParserRuleContext] returned by the calling rule will be complete // and valid, and the syntax error will be Reported later at a more -// localized location.

+// localized location. // -//
    -//
  • If a syntactically valid path or paths reach the end of the decision rule and -// they are semantically valid if predicated, return the min associated alt.
  • -//
  • Else, if a semantically invalid but syntactically valid path exist -// or paths exist, return the minimum associated alt. -//
  • -//
  • Otherwise, return {@link ATN//INVALID_ALT_NUMBER}.
  • -//
+// - If a syntactically valid path or paths reach the end of the decision rule, and +// they are semantically valid if predicated, return the min associated alt. +// - Else, if a semantically invalid but syntactically valid path exist +// or paths exist, return the minimum associated alt. +// - Otherwise, return [ATNInvalidAltNumber]. // -//

// In some scenarios, the algorithm described above could predict an -// alternative which will result in a {@link FailedPredicateException} in -// the parser. Specifically, p could occur if the only configuration +// alternative which will result in a [FailedPredicateException] in +// the parser. Specifically, this could occur if the only configuration // capable of successfully parsing to the end of the decision rule is -// blocked by a semantic predicate. By choosing p alternative within -// {@link //AdaptivePredict} instead of panicing a -// {@link NoViableAltException}, the resulting -// {@link FailedPredicateException} in the parser will identify the specific +// blocked by a semantic predicate. By choosing this alternative within +// [AdaptivePredict] instead of panic a [NoViableAltException], the resulting +// [FailedPredicateException] in the parser will identify the specific // predicate which is preventing the parser from successfully parsing the // decision rule, which helps developers identify and correct logic errors // in semantic predicates. -//

// -// @param configs The ATN configurations which were valid immediately before -// the {@link //ERROR} state was reached -// @param outerContext The is the \gamma_0 initial parser context from the paper +// pass in the configs holding ATN configurations which were valid immediately before +// the ERROR state was reached, outerContext as the initial parser context from the paper // or the parser stack at the instant before prediction commences. // -// @return The value to return from {@link //AdaptivePredict}, or -// {@link ATN//INVALID_ALT_NUMBER} if a suitable alternative was not -// identified and {@link //AdaptivePredict} should Report an error instead. -func (p *ParserATNSimulator) getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(configs ATNConfigSet, outerContext ParserRuleContext) int { +// Teh func returns the value to return from [AdaptivePredict], or +// [ATNInvalidAltNumber] if a suitable alternative was not +// identified and [AdaptivePredict] should report an error instead. +func (p *ParserATNSimulator) getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(configs *ATNConfigSet, outerContext ParserRuleContext) int { cfgs := p.splitAccordingToSemanticValidity(configs, outerContext) semValidConfigs := cfgs[0] semInvalidConfigs := cfgs[1] @@ -879,7 +895,7 @@ func (p *ParserATNSimulator) getSynValidOrSemInvalidAltThatFinishedDecisionEntry return alt } // Is there a syntactically valid path with a failed pred? - if len(semInvalidConfigs.GetItems()) > 0 { + if len(semInvalidConfigs.configs) > 0 { alt = p.GetAltThatFinishedDecisionEntryRule(semInvalidConfigs) if alt != ATNInvalidAltNumber { // syntactically viable path exists return alt @@ -888,10 +904,10 @@ func (p *ParserATNSimulator) getSynValidOrSemInvalidAltThatFinishedDecisionEntry return ATNInvalidAltNumber } -func (p *ParserATNSimulator) GetAltThatFinishedDecisionEntryRule(configs ATNConfigSet) int { +func (p *ParserATNSimulator) GetAltThatFinishedDecisionEntryRule(configs *ATNConfigSet) int { alts := NewIntervalSet() - for _, c := range configs.GetItems() { + for _, c := range configs.configs { _, ok := c.GetState().(*RuleStopState) if c.GetReachesIntoOuterContext() > 0 || (ok && c.GetContext().hasEmptyPath()) { @@ -915,14 +931,14 @@ func (p *ParserATNSimulator) GetAltThatFinishedDecisionEntryRule(configs ATNConf // prediction, which is where predicates need to evaluate. type ATNConfigSetPair struct { - item0, item1 ATNConfigSet + item0, item1 *ATNConfigSet } -func (p *ParserATNSimulator) splitAccordingToSemanticValidity(configs ATNConfigSet, outerContext ParserRuleContext) []ATNConfigSet { - succeeded := NewBaseATNConfigSet(configs.FullContext()) - failed := NewBaseATNConfigSet(configs.FullContext()) +func (p *ParserATNSimulator) splitAccordingToSemanticValidity(configs *ATNConfigSet, outerContext ParserRuleContext) []*ATNConfigSet { + succeeded := NewATNConfigSet(configs.fullCtx) + failed := NewATNConfigSet(configs.fullCtx) - for _, c := range configs.GetItems() { + for _, c := range configs.configs { if c.GetSemanticContext() != SemanticContextNone { predicateEvaluationResult := c.GetSemanticContext().evaluate(p.parser, outerContext) if predicateEvaluationResult { @@ -934,15 +950,16 @@ func (p *ParserATNSimulator) splitAccordingToSemanticValidity(configs ATNConfigS succeeded.Add(c, nil) } } - return []ATNConfigSet{succeeded, failed} + return []*ATNConfigSet{succeeded, failed} } -// Look through a list of predicate/alt pairs, returning alts for the +// evalSemanticContext looks through a list of predicate/alt pairs, returning alts for the +// pairs that win. A [SemanticContextNone] predicate indicates an alt containing an +// un-predicated runtimeConfig which behaves as "always true." If !complete +// then we stop at the first predicate that evaluates to true. This +// includes pairs with nil predicates. // -// pairs that win. A {@code NONE} predicate indicates an alt containing an -// unpredicated config which behaves as "always true." If !complete -// then we stop at the first predicate that evaluates to true. This -// includes pairs with nil predicates. +//goland:noinspection GoBoolExpressions func (p *ParserATNSimulator) evalSemanticContext(predPredictions []*PredPrediction, outerContext ParserRuleContext, complete bool) *BitSet { predictions := NewBitSet() for i := 0; i < len(predPredictions); i++ { @@ -956,11 +973,11 @@ func (p *ParserATNSimulator) evalSemanticContext(predPredictions []*PredPredicti } predicateEvaluationResult := pair.pred.evaluate(p.parser, outerContext) - if ParserATNSimulatorDebug || ParserATNSimulatorDFADebug { + if runtimeConfig.parserATNSimulatorDebug || runtimeConfig.parserATNSimulatorDFADebug { fmt.Println("eval pred " + pair.String() + "=" + fmt.Sprint(predicateEvaluationResult)) } if predicateEvaluationResult { - if ParserATNSimulatorDebug || ParserATNSimulatorDFADebug { + if runtimeConfig.parserATNSimulatorDebug || runtimeConfig.parserATNSimulatorDFADebug { fmt.Println("PREDICT " + fmt.Sprint(pair.alt)) } predictions.add(pair.alt) @@ -972,19 +989,82 @@ func (p *ParserATNSimulator) evalSemanticContext(predPredictions []*PredPredicti return predictions } -func (p *ParserATNSimulator) closure(config ATNConfig, configs ATNConfigSet, closureBusy *JStore[ATNConfig, Comparator[ATNConfig]], collectPredicates, fullCtx, treatEOFAsEpsilon bool) { +func (p *ParserATNSimulator) closure(config *ATNConfig, configs *ATNConfigSet, closureBusy *ClosureBusy, collectPredicates, fullCtx, treatEOFAsEpsilon bool) { initialDepth := 0 p.closureCheckingStopState(config, configs, closureBusy, collectPredicates, fullCtx, initialDepth, treatEOFAsEpsilon) } -func (p *ParserATNSimulator) closureCheckingStopState(config ATNConfig, configs ATNConfigSet, closureBusy *JStore[ATNConfig, Comparator[ATNConfig]], collectPredicates, fullCtx bool, depth int, treatEOFAsEpsilon bool) { - if ParserATNSimulatorTraceATNSim { +func (p *ParserATNSimulator) closureCheckingStopState(config *ATNConfig, configs *ATNConfigSet, closureBusy *ClosureBusy, collectPredicates, fullCtx bool, depth int, treatEOFAsEpsilon bool) { + if runtimeConfig.parserATNSimulatorTraceATNSim { fmt.Println("closure(" + config.String() + ")") - //fmt.Println("configs(" + configs.String() + ")") - if config.GetReachesIntoOuterContext() > 50 { - panic("problem") + } + + var stack []*ATNConfig + visited := make(map[*ATNConfig]bool) + + stack = append(stack, config) + + for len(stack) > 0 { + currConfig := stack[len(stack)-1] + stack = stack[:len(stack)-1] + + if _, ok := visited[currConfig]; ok { + continue + } + visited[currConfig] = true + + if _, ok := currConfig.GetState().(*RuleStopState); ok { + // We hit rule end. If we have context info, use it + // run thru all possible stack tops in ctx + if !currConfig.GetContext().isEmpty() { + for i := 0; i < currConfig.GetContext().length(); i++ { + if currConfig.GetContext().getReturnState(i) == BasePredictionContextEmptyReturnState { + if fullCtx { + nb := NewATNConfig1(currConfig, currConfig.GetState(), BasePredictionContextEMPTY) + configs.Add(nb, p.mergeCache) + continue + } else { + // we have no context info, just chase follow links (if greedy) + if runtimeConfig.parserATNSimulatorDebug { + fmt.Println("FALLING off rule " + p.getRuleName(currConfig.GetState().GetRuleIndex())) + } + p.closureWork(currConfig, configs, closureBusy, collectPredicates, fullCtx, depth, treatEOFAsEpsilon) + } + continue + } + returnState := p.atn.states[currConfig.GetContext().getReturnState(i)] + newContext := currConfig.GetContext().GetParent(i) // "pop" return state + + c := NewATNConfig5(returnState, currConfig.GetAlt(), newContext, currConfig.GetSemanticContext()) + // While we have context to pop back from, we may have + // gotten that context AFTER having falling off a rule. + // Make sure we track that we are now out of context. + c.SetReachesIntoOuterContext(currConfig.GetReachesIntoOuterContext()) + + stack = append(stack, c) + } + continue + } else if fullCtx { + // reached end of start rule + configs.Add(currConfig, p.mergeCache) + continue + } else { + // else if we have no context info, just chase follow links (if greedy) + if runtimeConfig.parserATNSimulatorDebug { + fmt.Println("FALLING off rule " + p.getRuleName(currConfig.GetState().GetRuleIndex())) + } + } } + + p.closureWork(currConfig, configs, closureBusy, collectPredicates, fullCtx, depth, treatEOFAsEpsilon) + } +} + +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) closureCheckingStopStateRecursive(config *ATNConfig, configs *ATNConfigSet, closureBusy *ClosureBusy, collectPredicates, fullCtx bool, depth int, treatEOFAsEpsilon bool) { + if runtimeConfig.parserATNSimulatorTraceATNSim { + fmt.Println("closure(" + config.String() + ")") } if _, ok := config.GetState().(*RuleStopState); ok { @@ -994,11 +1074,12 @@ func (p *ParserATNSimulator) closureCheckingStopState(config ATNConfig, configs for i := 0; i < config.GetContext().length(); i++ { if config.GetContext().getReturnState(i) == BasePredictionContextEmptyReturnState { if fullCtx { - configs.Add(NewBaseATNConfig1(config, config.GetState(), BasePredictionContextEMPTY), p.mergeCache) + nb := NewATNConfig1(config, config.GetState(), BasePredictionContextEMPTY) + configs.Add(nb, p.mergeCache) continue } else { // we have no context info, just chase follow links (if greedy) - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("FALLING off rule " + p.getRuleName(config.GetState().GetRuleIndex())) } p.closureWork(config, configs, closureBusy, collectPredicates, fullCtx, depth, treatEOFAsEpsilon) @@ -1008,7 +1089,7 @@ func (p *ParserATNSimulator) closureCheckingStopState(config ATNConfig, configs returnState := p.atn.states[config.GetContext().getReturnState(i)] newContext := config.GetContext().GetParent(i) // "pop" return state - c := NewBaseATNConfig5(returnState, config.GetAlt(), newContext, config.GetSemanticContext()) + c := NewATNConfig5(returnState, config.GetAlt(), newContext, config.GetSemanticContext()) // While we have context to pop back from, we may have // gotten that context AFTER having falling off a rule. // Make sure we track that we are now out of context. @@ -1022,7 +1103,7 @@ func (p *ParserATNSimulator) closureCheckingStopState(config ATNConfig, configs return } else { // else if we have no context info, just chase follow links (if greedy) - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("FALLING off rule " + p.getRuleName(config.GetState().GetRuleIndex())) } } @@ -1030,8 +1111,10 @@ func (p *ParserATNSimulator) closureCheckingStopState(config ATNConfig, configs p.closureWork(config, configs, closureBusy, collectPredicates, fullCtx, depth, treatEOFAsEpsilon) } -// Do the actual work of walking epsilon edges// -func (p *ParserATNSimulator) closureWork(config ATNConfig, configs ATNConfigSet, closureBusy *JStore[ATNConfig, Comparator[ATNConfig]], collectPredicates, fullCtx bool, depth int, treatEOFAsEpsilon bool) { +// Do the actual work of walking epsilon edges +// +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) closureWork(config *ATNConfig, configs *ATNConfigSet, closureBusy *ClosureBusy, collectPredicates, fullCtx bool, depth int, treatEOFAsEpsilon bool) { state := config.GetState() // optimization if !state.GetEpsilonOnlyTransitions() { @@ -1048,7 +1131,7 @@ func (p *ParserATNSimulator) closureWork(config ATNConfig, configs ATNConfigSet, _, ok := t.(*ActionTransition) continueCollecting := collectPredicates && !ok c := p.getEpsilonTarget(config, t, continueCollecting, depth == 0, fullCtx, treatEOFAsEpsilon) - if ci, ok := c.(*BaseATNConfig); ok && ci != nil { + if c != nil { newDepth := depth if _, ok := config.GetState().(*RuleStopState); ok { @@ -1056,7 +1139,7 @@ func (p *ParserATNSimulator) closureWork(config ATNConfig, configs ATNConfigSet, // We can't get here if incoming config was rule stop and we had context // track how far we dip into outer context. Might // come in handy and we avoid evaluating context dependent - // preds if p is > 0. + // preds if this is > 0. if p.dfa != nil && p.dfa.getPrecedenceDfa() { if t.(*EpsilonTransition).outermostPrecedenceReturn == p.dfa.atnStartState.GetRuleIndex() { @@ -1072,9 +1155,9 @@ func (p *ParserATNSimulator) closureWork(config ATNConfig, configs ATNConfigSet, continue } - configs.SetDipsIntoOuterContext(true) // TODO: can remove? only care when we add to set per middle of p method + configs.dipsIntoOuterContext = true // TODO: can remove? only care when we add to set per middle of this method newDepth-- - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("dips into outer ctx: " + c.String()) } } else { @@ -1098,8 +1181,9 @@ func (p *ParserATNSimulator) closureWork(config ATNConfig, configs ATNConfigSet, } } -func (p *ParserATNSimulator) canDropLoopEntryEdgeInLeftRecursiveRule(config ATNConfig) bool { - if TurnOffLRLoopEntryBranchOpt { +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) canDropLoopEntryEdgeInLeftRecursiveRule(config *ATNConfig) bool { + if !runtimeConfig.lRLoopEntryBranchOpt { return false } @@ -1196,7 +1280,7 @@ func (p *ParserATNSimulator) getRuleName(index int) string { return sb.String() } -func (p *ParserATNSimulator) getEpsilonTarget(config ATNConfig, t Transition, collectPredicates, inContext, fullCtx, treatEOFAsEpsilon bool) ATNConfig { +func (p *ParserATNSimulator) getEpsilonTarget(config *ATNConfig, t Transition, collectPredicates, inContext, fullCtx, treatEOFAsEpsilon bool) *ATNConfig { switch t.getSerializationType() { case TransitionRULE: @@ -1208,13 +1292,13 @@ func (p *ParserATNSimulator) getEpsilonTarget(config ATNConfig, t Transition, co case TransitionACTION: return p.actionTransition(config, t.(*ActionTransition)) case TransitionEPSILON: - return NewBaseATNConfig4(config, t.getTarget()) + return NewATNConfig4(config, t.getTarget()) case TransitionATOM, TransitionRANGE, TransitionSET: // EOF transitions act like epsilon transitions after the first EOF // transition is traversed if treatEOFAsEpsilon { if t.Matches(TokenEOF, 0, 1) { - return NewBaseATNConfig4(config, t.getTarget()) + return NewATNConfig4(config, t.getTarget()) } } return nil @@ -1223,60 +1307,63 @@ func (p *ParserATNSimulator) getEpsilonTarget(config ATNConfig, t Transition, co } } -func (p *ParserATNSimulator) actionTransition(config ATNConfig, t *ActionTransition) *BaseATNConfig { - if ParserATNSimulatorDebug { +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) actionTransition(config *ATNConfig, t *ActionTransition) *ATNConfig { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("ACTION edge " + strconv.Itoa(t.ruleIndex) + ":" + strconv.Itoa(t.actionIndex)) } - return NewBaseATNConfig4(config, t.getTarget()) + return NewATNConfig4(config, t.getTarget()) } -func (p *ParserATNSimulator) precedenceTransition(config ATNConfig, - pt *PrecedencePredicateTransition, collectPredicates, inContext, fullCtx bool) *BaseATNConfig { +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) precedenceTransition(config *ATNConfig, + pt *PrecedencePredicateTransition, collectPredicates, inContext, fullCtx bool) *ATNConfig { - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("PRED (collectPredicates=" + fmt.Sprint(collectPredicates) + ") " + strconv.Itoa(pt.precedence) + ">=_p, ctx dependent=true") if p.parser != nil { fmt.Println("context surrounding pred is " + fmt.Sprint(p.parser.GetRuleInvocationStack(nil))) } } - var c *BaseATNConfig + var c *ATNConfig if collectPredicates && inContext { if fullCtx { // In full context mode, we can evaluate predicates on-the-fly // during closure, which dramatically reduces the size of - // the config sets. It also obviates the need to test predicates + // the runtimeConfig sets. It also obviates the need to test predicates // later during conflict resolution. currentPosition := p.input.Index() p.input.Seek(p.startIndex) predSucceeds := pt.getPredicate().evaluate(p.parser, p.outerContext) p.input.Seek(currentPosition) if predSucceeds { - c = NewBaseATNConfig4(config, pt.getTarget()) // no pred context + c = NewATNConfig4(config, pt.getTarget()) // no pred context } } else { newSemCtx := SemanticContextandContext(config.GetSemanticContext(), pt.getPredicate()) - c = NewBaseATNConfig3(config, pt.getTarget(), newSemCtx) + c = NewATNConfig3(config, pt.getTarget(), newSemCtx) } } else { - c = NewBaseATNConfig4(config, pt.getTarget()) + c = NewATNConfig4(config, pt.getTarget()) } - if ParserATNSimulatorDebug { - fmt.Println("config from pred transition=" + c.String()) + if runtimeConfig.parserATNSimulatorDebug { + fmt.Println("runtimeConfig from pred transition=" + c.String()) } return c } -func (p *ParserATNSimulator) predTransition(config ATNConfig, pt *PredicateTransition, collectPredicates, inContext, fullCtx bool) *BaseATNConfig { +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) predTransition(config *ATNConfig, pt *PredicateTransition, collectPredicates, inContext, fullCtx bool) *ATNConfig { - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("PRED (collectPredicates=" + fmt.Sprint(collectPredicates) + ") " + strconv.Itoa(pt.ruleIndex) + ":" + strconv.Itoa(pt.predIndex) + ", ctx dependent=" + fmt.Sprint(pt.isCtxDependent)) if p.parser != nil { fmt.Println("context surrounding pred is " + fmt.Sprint(p.parser.GetRuleInvocationStack(nil))) } } - var c *BaseATNConfig + var c *ATNConfig if collectPredicates && (!pt.isCtxDependent || inContext) { if fullCtx { // In full context mode, we can evaluate predicates on-the-fly @@ -1288,78 +1375,92 @@ func (p *ParserATNSimulator) predTransition(config ATNConfig, pt *PredicateTrans predSucceeds := pt.getPredicate().evaluate(p.parser, p.outerContext) p.input.Seek(currentPosition) if predSucceeds { - c = NewBaseATNConfig4(config, pt.getTarget()) // no pred context + c = NewATNConfig4(config, pt.getTarget()) // no pred context } } else { newSemCtx := SemanticContextandContext(config.GetSemanticContext(), pt.getPredicate()) - c = NewBaseATNConfig3(config, pt.getTarget(), newSemCtx) + c = NewATNConfig3(config, pt.getTarget(), newSemCtx) } } else { - c = NewBaseATNConfig4(config, pt.getTarget()) + c = NewATNConfig4(config, pt.getTarget()) } - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("config from pred transition=" + c.String()) } return c } -func (p *ParserATNSimulator) ruleTransition(config ATNConfig, t *RuleTransition) *BaseATNConfig { - if ParserATNSimulatorDebug { +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) ruleTransition(config *ATNConfig, t *RuleTransition) *ATNConfig { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("CALL rule " + p.getRuleName(t.getTarget().GetRuleIndex()) + ", ctx=" + config.GetContext().String()) } returnState := t.followState newContext := SingletonBasePredictionContextCreate(config.GetContext(), returnState.GetStateNumber()) - return NewBaseATNConfig1(config, t.getTarget(), newContext) + return NewATNConfig1(config, t.getTarget(), newContext) } -func (p *ParserATNSimulator) getConflictingAlts(configs ATNConfigSet) *BitSet { +func (p *ParserATNSimulator) getConflictingAlts(configs *ATNConfigSet) *BitSet { altsets := PredictionModegetConflictingAltSubsets(configs) return PredictionModeGetAlts(altsets) } -// Sam pointed out a problem with the previous definition, v3, of +// getConflictingAltsOrUniqueAlt Sam pointed out a problem with the previous definition, v3, of // ambiguous states. If we have another state associated with conflicting // alternatives, we should keep going. For example, the following grammar // -// s : (ID | ID ID?) '' +// s : (ID | ID ID?) ; +// +// When the [ATN] simulation reaches the state before ;, it has a [DFA] +// state that looks like: +// +// [12|1|[], 6|2|[], 12|2|[]]. +// +// Naturally +// +// 12|1|[] and 12|2|[] +// +// conflict, but we cannot stop processing this node +// because alternative to has another way to continue, via +// +// [6|2|[]]. // -// When the ATN simulation reaches the state before '', it has a DFA -// state that looks like: [12|1|[], 6|2|[], 12|2|[]]. Naturally -// 12|1|[] and 12|2|[] conflict, but we cannot stop processing p node -// because alternative to has another way to continue, via [6|2|[]]. // The key is that we have a single state that has config's only associated // with a single alternative, 2, and crucially the state transitions // among the configurations are all non-epsilon transitions. That means // we don't consider any conflicts that include alternative 2. So, we // ignore the conflict between alts 1 and 2. We ignore a set of // conflicting alts when there is an intersection with an alternative -// associated with a single alt state in the state&rarrconfig-list map. +// associated with a single alt state in the state config-list map. // // It's also the case that we might have two conflicting configurations but -// also a 3rd nonconflicting configuration for a different alternative: -// [1|1|[], 1|2|[], 8|3|[]]. This can come about from grammar: +// also a 3rd non-conflicting configuration for a different alternative: +// +// [1|1|[], 1|2|[], 8|3|[]]. +// +// This can come about from grammar: // -// a : A | A | A B +// a : A | A | A B // // After Matching input A, we reach the stop state for rule A, state 1. // State 8 is the state right before B. Clearly alternatives 1 and 2 // conflict and no amount of further lookahead will separate the two. -// However, alternative 3 will be able to continue and so we do not -// stop working on p state. In the previous example, we're concerned +// However, alternative 3 will be able to continue, so we do not +// stop working on this state. +// +// In the previous example, we're concerned // with states associated with the conflicting alternatives. Here alt // 3 is not associated with the conflicting configs, but since we can continue // looking for input reasonably, I don't declare the state done. We // ignore a set of conflicting alts when we have an alternative // that we still need to pursue. -// - -func (p *ParserATNSimulator) getConflictingAltsOrUniqueAlt(configs ATNConfigSet) *BitSet { +func (p *ParserATNSimulator) getConflictingAltsOrUniqueAlt(configs *ATNConfigSet) *BitSet { var conflictingAlts *BitSet - if configs.GetUniqueAlt() != ATNInvalidAltNumber { + if configs.uniqueAlt != ATNInvalidAltNumber { conflictingAlts = NewBitSet() - conflictingAlts.add(configs.GetUniqueAlt()) + conflictingAlts.add(configs.uniqueAlt) } else { - conflictingAlts = configs.GetConflictingAlts() + conflictingAlts = configs.conflictingAlts } return conflictingAlts } @@ -1384,11 +1485,10 @@ func (p *ParserATNSimulator) getLookaheadName(input TokenStream) string { return p.GetTokenName(input.LA(1)) } -// Used for debugging in AdaptivePredict around execATN but I cut -// -// it out for clarity now that alg. works well. We can leave p -// "dead" code for a bit. -func (p *ParserATNSimulator) dumpDeadEndConfigs(nvae *NoViableAltException) { +// Used for debugging in [AdaptivePredict] around [execATN], but I cut +// it out for clarity now that alg. works well. We can leave this +// "dead" code for a bit. +func (p *ParserATNSimulator) dumpDeadEndConfigs(_ *NoViableAltException) { panic("Not implemented") @@ -1418,13 +1518,13 @@ func (p *ParserATNSimulator) dumpDeadEndConfigs(nvae *NoViableAltException) { // } } -func (p *ParserATNSimulator) noViableAlt(input TokenStream, outerContext ParserRuleContext, configs ATNConfigSet, startIndex int) *NoViableAltException { +func (p *ParserATNSimulator) noViableAlt(input TokenStream, outerContext ParserRuleContext, configs *ATNConfigSet, startIndex int) *NoViableAltException { return NewNoViableAltException(p.parser, input, input.Get(startIndex), input.LT(1), configs, outerContext) } -func (p *ParserATNSimulator) getUniqueAlt(configs ATNConfigSet) int { +func (p *ParserATNSimulator) getUniqueAlt(configs *ATNConfigSet) int { alt := ATNInvalidAltNumber - for _, c := range configs.GetItems() { + for _, c := range configs.configs { if alt == ATNInvalidAltNumber { alt = c.GetAlt() // found first alt } else if c.GetAlt() != alt { @@ -1452,8 +1552,10 @@ func (p *ParserATNSimulator) getUniqueAlt(configs ATNConfigSet) int { // @return If {@code to} is {@code nil}, p method returns {@code nil} // otherwise p method returns the result of calling {@link //addDFAState} // on {@code to} +// +//goland:noinspection GoBoolExpressions func (p *ParserATNSimulator) addDFAEdge(dfa *DFA, from *DFAState, t int, to *DFAState) *DFAState { - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { fmt.Println("EDGE " + from.String() + " -> " + to.String() + " upon " + p.GetTokenName(t)) } if to == nil { @@ -1472,7 +1574,7 @@ func (p *ParserATNSimulator) addDFAEdge(dfa *DFA, from *DFAState, t int, to *DFA from.setIthEdge(t+1, to) // connect p.atn.edgeMu.Unlock() - if ParserATNSimulatorDebug { + if runtimeConfig.parserATNSimulatorDebug { var names []string if p.parser != nil { names = p.parser.GetLiteralNames() @@ -1483,48 +1585,49 @@ func (p *ParserATNSimulator) addDFAEdge(dfa *DFA, from *DFAState, t int, to *DFA return to } -// Add state {@code D} to the DFA if it is not already present, and return -// the actual instance stored in the DFA. If a state equivalent to {@code D} -// is already in the DFA, the existing state is returned. Otherwise p -// method returns {@code D} after adding it to the DFA. +// addDFAState adds state D to the [DFA] if it is not already present, and returns +// the actual instance stored in the [DFA]. If a state equivalent to D +// is already in the [DFA], the existing state is returned. Otherwise, this +// method returns D after adding it to the [DFA]. // -//

If {@code D} is {@link //ERROR}, p method returns {@link //ERROR} and -// does not change the DFA.

+// If D is [ATNSimulatorError], this method returns [ATNSimulatorError] and +// does not change the DFA. // -// @param dfa The dfa -// @param D The DFA state to add -// @return The state stored in the DFA. This will be either the existing -// state if {@code D} is already in the DFA, or {@code D} itself if the -// state was not already present. +//goland:noinspection GoBoolExpressions func (p *ParserATNSimulator) addDFAState(dfa *DFA, d *DFAState) *DFAState { if d == ATNSimulatorError { return d } - existing, present := dfa.states.Get(d) + + existing, present := dfa.Get(d) if present { - if ParserATNSimulatorTraceATNSim { + if runtimeConfig.parserATNSimulatorTraceATNSim { fmt.Print("addDFAState " + d.String() + " exists") } return existing } - // The state was not present, so update it with configs + // The state will be added if not already there or we will be given back the existing state struct + // if it is present. // - d.stateNumber = dfa.states.Len() - if !d.configs.ReadOnly() { - d.configs.OptimizeConfigs(p.BaseATNSimulator) - d.configs.SetReadOnly(true) + d.stateNumber = dfa.Len() + if !d.configs.readOnly { + d.configs.OptimizeConfigs(&p.BaseATNSimulator) + d.configs.readOnly = true + d.configs.configLookup = nil } - dfa.states.Put(d) - if ParserATNSimulatorTraceATNSim { + dfa.Put(d) + + if runtimeConfig.parserATNSimulatorTraceATNSim { fmt.Println("addDFAState new " + d.String()) } return d } -func (p *ParserATNSimulator) ReportAttemptingFullContext(dfa *DFA, conflictingAlts *BitSet, configs ATNConfigSet, startIndex, stopIndex int) { - if ParserATNSimulatorDebug || ParserATNSimulatorRetryDebug { +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) ReportAttemptingFullContext(dfa *DFA, conflictingAlts *BitSet, configs *ATNConfigSet, startIndex, stopIndex int) { + if runtimeConfig.parserATNSimulatorDebug || runtimeConfig.parserATNSimulatorRetryDebug { interval := NewInterval(startIndex, stopIndex+1) fmt.Println("ReportAttemptingFullContext decision=" + strconv.Itoa(dfa.decision) + ":" + configs.String() + ", input=" + p.parser.GetTokenStream().GetTextFromInterval(interval)) @@ -1534,8 +1637,9 @@ func (p *ParserATNSimulator) ReportAttemptingFullContext(dfa *DFA, conflictingAl } } -func (p *ParserATNSimulator) ReportContextSensitivity(dfa *DFA, prediction int, configs ATNConfigSet, startIndex, stopIndex int) { - if ParserATNSimulatorDebug || ParserATNSimulatorRetryDebug { +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) ReportContextSensitivity(dfa *DFA, prediction int, configs *ATNConfigSet, startIndex, stopIndex int) { + if runtimeConfig.parserATNSimulatorDebug || runtimeConfig.parserATNSimulatorRetryDebug { interval := NewInterval(startIndex, stopIndex+1) fmt.Println("ReportContextSensitivity decision=" + strconv.Itoa(dfa.decision) + ":" + configs.String() + ", input=" + p.parser.GetTokenStream().GetTextFromInterval(interval)) @@ -1545,10 +1649,15 @@ func (p *ParserATNSimulator) ReportContextSensitivity(dfa *DFA, prediction int, } } -// If context sensitive parsing, we know it's ambiguity not conflict// -func (p *ParserATNSimulator) ReportAmbiguity(dfa *DFA, D *DFAState, startIndex, stopIndex int, - exact bool, ambigAlts *BitSet, configs ATNConfigSet) { - if ParserATNSimulatorDebug || ParserATNSimulatorRetryDebug { +// ReportAmbiguity reports and ambiguity in the parse, which shows that the parser will explore a different route. +// +// If context-sensitive parsing, we know it's an ambiguity not a conflict or error, but we can report it to the developer +// so that they can see that this is happening and can take action if they want to. +// +//goland:noinspection GoBoolExpressions +func (p *ParserATNSimulator) ReportAmbiguity(dfa *DFA, _ *DFAState, startIndex, stopIndex int, + exact bool, ambigAlts *BitSet, configs *ATNConfigSet) { + if runtimeConfig.parserATNSimulatorDebug || runtimeConfig.parserATNSimulatorRetryDebug { interval := NewInterval(startIndex, stopIndex+1) fmt.Println("ReportAmbiguity " + ambigAlts.String() + ":" + configs.String() + ", input=" + p.parser.GetTokenStream().GetTextFromInterval(interval)) diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/parser_rule_context.go b/vendor/github.com/antlr4-go/antlr/v4/parser_rule_context.go similarity index 77% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/parser_rule_context.go rename to vendor/github.com/antlr4-go/antlr/v4/parser_rule_context.go index 1c8cee74795..c249bc1385c 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/parser_rule_context.go +++ b/vendor/github.com/antlr4-go/antlr/v4/parser_rule_context.go @@ -31,7 +31,9 @@ type ParserRuleContext interface { } type BaseParserRuleContext struct { - *BaseRuleContext + parentCtx RuleContext + invokingState int + RuleIndex int start, stop Token exception RecognitionException @@ -40,8 +42,22 @@ type BaseParserRuleContext struct { func NewBaseParserRuleContext(parent ParserRuleContext, invokingStateNumber int) *BaseParserRuleContext { prc := new(BaseParserRuleContext) + InitBaseParserRuleContext(prc, parent, invokingStateNumber) + return prc +} + +func InitBaseParserRuleContext(prc *BaseParserRuleContext, parent ParserRuleContext, invokingStateNumber int) { + // What context invoked b rule? + prc.parentCtx = parent - prc.BaseRuleContext = NewBaseRuleContext(parent, invokingStateNumber) + // What state invoked the rule associated with b context? + // The "return address" is the followState of invokingState + // If parent is nil, b should be -1. + if parent == nil { + prc.invokingState = -1 + } else { + prc.invokingState = invokingStateNumber + } prc.RuleIndex = -1 // * If we are debugging or building a parse tree for a Visitor, @@ -56,8 +72,6 @@ func NewBaseParserRuleContext(parent ParserRuleContext, invokingStateNumber int) // The exception that forced prc rule to return. If the rule successfully // completed, prc is {@code nil}. prc.exception = nil - - return prc } func (prc *BaseParserRuleContext) SetException(e RecognitionException) { @@ -90,14 +104,15 @@ func (prc *BaseParserRuleContext) GetText() string { return s } -// Double dispatch methods for listeners -func (prc *BaseParserRuleContext) EnterRule(listener ParseTreeListener) { +// EnterRule is called when any rule is entered. +func (prc *BaseParserRuleContext) EnterRule(_ ParseTreeListener) { } -func (prc *BaseParserRuleContext) ExitRule(listener ParseTreeListener) { +// ExitRule is called when any rule is exited. +func (prc *BaseParserRuleContext) ExitRule(_ ParseTreeListener) { } -// * Does not set parent link other add methods do that/// +// * Does not set parent link other add methods do that func (prc *BaseParserRuleContext) addTerminalNodeChild(child TerminalNode) TerminalNode { if prc.children == nil { prc.children = make([]Tree, 0) @@ -120,10 +135,9 @@ func (prc *BaseParserRuleContext) AddChild(child RuleContext) RuleContext { return child } -// * Used by EnterOuterAlt to toss out a RuleContext previously added as -// we entered a rule. If we have // label, we will need to remove -// generic ruleContext object. -// / +// RemoveLastChild is used by [EnterOuterAlt] to toss out a [RuleContext] previously added as +// we entered a rule. If we have a label, we will need to remove +// the generic ruleContext object. func (prc *BaseParserRuleContext) RemoveLastChild() { if prc.children != nil && len(prc.children) > 0 { prc.children = prc.children[0 : len(prc.children)-1] @@ -293,7 +307,7 @@ func (prc *BaseParserRuleContext) GetChildCount() int { return len(prc.children) } -func (prc *BaseParserRuleContext) GetSourceInterval() *Interval { +func (prc *BaseParserRuleContext) GetSourceInterval() Interval { if prc.start == nil || prc.stop == nil { return TreeInvalidInterval } @@ -340,6 +354,50 @@ func (prc *BaseParserRuleContext) String(ruleNames []string, stop RuleContext) s return s } +func (prc *BaseParserRuleContext) SetParent(v Tree) { + if v == nil { + prc.parentCtx = nil + } else { + prc.parentCtx = v.(RuleContext) + } +} + +func (prc *BaseParserRuleContext) GetInvokingState() int { + return prc.invokingState +} + +func (prc *BaseParserRuleContext) SetInvokingState(t int) { + prc.invokingState = t +} + +func (prc *BaseParserRuleContext) GetRuleIndex() int { + return prc.RuleIndex +} + +func (prc *BaseParserRuleContext) GetAltNumber() int { + return ATNInvalidAltNumber +} + +func (prc *BaseParserRuleContext) SetAltNumber(_ int) {} + +// IsEmpty returns true if the context of b is empty. +// +// A context is empty if there is no invoking state, meaning nobody calls +// current context. +func (prc *BaseParserRuleContext) IsEmpty() bool { + return prc.invokingState == -1 +} + +// GetParent returns the combined text of all child nodes. This method only considers +// tokens which have been added to the parse tree. +// +// Since tokens on hidden channels (e.g. whitespace or comments) are not +// added to the parse trees, they will not appear in the output of this +// method. +func (prc *BaseParserRuleContext) GetParent() Tree { + return prc.parentCtx +} + var ParserRuleContextEmpty = NewBaseParserRuleContext(nil, -1) type InterpreterRuleContext interface { @@ -350,6 +408,7 @@ type BaseInterpreterRuleContext struct { *BaseParserRuleContext } +//goland:noinspection GoUnusedExportedFunction func NewBaseInterpreterRuleContext(parent BaseInterpreterRuleContext, invokingStateNumber, ruleIndex int) *BaseInterpreterRuleContext { prc := new(BaseInterpreterRuleContext) diff --git a/vendor/github.com/antlr4-go/antlr/v4/prediction_context.go b/vendor/github.com/antlr4-go/antlr/v4/prediction_context.go new file mode 100644 index 00000000000..c1b80cc1f0f --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/prediction_context.go @@ -0,0 +1,727 @@ +// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. +// Use of this file is governed by the BSD 3-clause license that +// can be found in the LICENSE.txt file in the project root. + +package antlr + +import ( + "fmt" + "golang.org/x/exp/slices" + "strconv" +) + +var _emptyPredictionContextHash int + +func init() { + _emptyPredictionContextHash = murmurInit(1) + _emptyPredictionContextHash = murmurFinish(_emptyPredictionContextHash, 0) +} + +func calculateEmptyHash() int { + return _emptyPredictionContextHash +} + +const ( + // BasePredictionContextEmptyReturnState represents {@code $} in an array in full context mode, $ + // doesn't mean wildcard: + // + // $ + x = [$,x] + // + // Here, + // + // $ = EmptyReturnState + BasePredictionContextEmptyReturnState = 0x7FFFFFFF +) + +// TODO: JI These are meant to be atomics - this does not seem to match the Java runtime here +// +//goland:noinspection GoUnusedGlobalVariable +var ( + BasePredictionContextglobalNodeCount = 1 + BasePredictionContextid = BasePredictionContextglobalNodeCount +) + +const ( + PredictionContextEmpty = iota + PredictionContextSingleton + PredictionContextArray +) + +// PredictionContext is a go idiomatic implementation of PredictionContext that does not rty to +// emulate inheritance from Java, and can be used without an interface definition. An interface +// is not required because no user code will ever need to implement this interface. +type PredictionContext struct { + cachedHash int + pcType int + parentCtx *PredictionContext + returnState int + parents []*PredictionContext + returnStates []int +} + +func NewEmptyPredictionContext() *PredictionContext { + nep := &PredictionContext{} + nep.cachedHash = calculateEmptyHash() + nep.pcType = PredictionContextEmpty + nep.returnState = BasePredictionContextEmptyReturnState + return nep +} + +func NewBaseSingletonPredictionContext(parent *PredictionContext, returnState int) *PredictionContext { + pc := &PredictionContext{} + pc.pcType = PredictionContextSingleton + pc.returnState = returnState + pc.parentCtx = parent + if parent != nil { + pc.cachedHash = calculateHash(parent, returnState) + } else { + pc.cachedHash = calculateEmptyHash() + } + return pc +} + +func SingletonBasePredictionContextCreate(parent *PredictionContext, returnState int) *PredictionContext { + if returnState == BasePredictionContextEmptyReturnState && parent == nil { + // someone can pass in the bits of an array ctx that mean $ + return BasePredictionContextEMPTY + } + return NewBaseSingletonPredictionContext(parent, returnState) +} + +func NewArrayPredictionContext(parents []*PredictionContext, returnStates []int) *PredictionContext { + // Parent can be nil only if full ctx mode and we make an array + // from {@link //EMPTY} and non-empty. We merge {@link //EMPTY} by using + // nil parent and + // returnState == {@link //EmptyReturnState}. + hash := murmurInit(1) + for _, parent := range parents { + hash = murmurUpdate(hash, parent.Hash()) + } + for _, returnState := range returnStates { + hash = murmurUpdate(hash, returnState) + } + hash = murmurFinish(hash, len(parents)<<1) + + nec := &PredictionContext{} + nec.cachedHash = hash + nec.pcType = PredictionContextArray + nec.parents = parents + nec.returnStates = returnStates + return nec +} + +func (p *PredictionContext) Hash() int { + return p.cachedHash +} + +func (p *PredictionContext) Equals(other Collectable[*PredictionContext]) bool { + switch p.pcType { + case PredictionContextEmpty: + otherP := other.(*PredictionContext) + return other == nil || otherP == nil || otherP.isEmpty() + case PredictionContextSingleton: + return p.SingletonEquals(other) + case PredictionContextArray: + return p.ArrayEquals(other) + } + return false +} + +func (p *PredictionContext) ArrayEquals(o Collectable[*PredictionContext]) bool { + if o == nil { + return false + } + other := o.(*PredictionContext) + if other == nil || other.pcType != PredictionContextArray { + return false + } + if p.cachedHash != other.Hash() { + return false // can't be same if hash is different + } + + // Must compare the actual array elements and not just the array address + // + return slices.Equal(p.returnStates, other.returnStates) && + slices.EqualFunc(p.parents, other.parents, func(x, y *PredictionContext) bool { + return x.Equals(y) + }) +} + +func (p *PredictionContext) SingletonEquals(other Collectable[*PredictionContext]) bool { + if other == nil { + return false + } + otherP := other.(*PredictionContext) + if otherP == nil { + return false + } + + if p.cachedHash != otherP.Hash() { + return false // Can't be same if hash is different + } + + if p.returnState != otherP.getReturnState(0) { + return false + } + + // Both parents must be nil if one is + if p.parentCtx == nil { + return otherP.parentCtx == nil + } + + return p.parentCtx.Equals(otherP.parentCtx) +} + +func (p *PredictionContext) GetParent(i int) *PredictionContext { + switch p.pcType { + case PredictionContextEmpty: + return nil + case PredictionContextSingleton: + return p.parentCtx + case PredictionContextArray: + return p.parents[i] + } + return nil +} + +func (p *PredictionContext) getReturnState(i int) int { + switch p.pcType { + case PredictionContextArray: + return p.returnStates[i] + default: + return p.returnState + } +} + +func (p *PredictionContext) GetReturnStates() []int { + switch p.pcType { + case PredictionContextArray: + return p.returnStates + default: + return []int{p.returnState} + } +} + +func (p *PredictionContext) length() int { + switch p.pcType { + case PredictionContextArray: + return len(p.returnStates) + default: + return 1 + } +} + +func (p *PredictionContext) hasEmptyPath() bool { + switch p.pcType { + case PredictionContextSingleton: + return p.returnState == BasePredictionContextEmptyReturnState + } + return p.getReturnState(p.length()-1) == BasePredictionContextEmptyReturnState +} + +func (p *PredictionContext) String() string { + switch p.pcType { + case PredictionContextEmpty: + return "$" + case PredictionContextSingleton: + var up string + + if p.parentCtx == nil { + up = "" + } else { + up = p.parentCtx.String() + } + + if len(up) == 0 { + if p.returnState == BasePredictionContextEmptyReturnState { + return "$" + } + + return strconv.Itoa(p.returnState) + } + + return strconv.Itoa(p.returnState) + " " + up + case PredictionContextArray: + if p.isEmpty() { + return "[]" + } + + s := "[" + for i := 0; i < len(p.returnStates); i++ { + if i > 0 { + s = s + ", " + } + if p.returnStates[i] == BasePredictionContextEmptyReturnState { + s = s + "$" + continue + } + s = s + strconv.Itoa(p.returnStates[i]) + if !p.parents[i].isEmpty() { + s = s + " " + p.parents[i].String() + } else { + s = s + "nil" + } + } + return s + "]" + + default: + return "unknown" + } +} + +func (p *PredictionContext) isEmpty() bool { + switch p.pcType { + case PredictionContextEmpty: + return true + case PredictionContextArray: + // since EmptyReturnState can only appear in the last position, we + // don't need to verify that size==1 + return p.returnStates[0] == BasePredictionContextEmptyReturnState + default: + return false + } +} + +func (p *PredictionContext) Type() int { + return p.pcType +} + +func calculateHash(parent *PredictionContext, returnState int) int { + h := murmurInit(1) + h = murmurUpdate(h, parent.Hash()) + h = murmurUpdate(h, returnState) + return murmurFinish(h, 2) +} + +// Convert a {@link RuleContext} tree to a {@link BasePredictionContext} graph. +// Return {@link //EMPTY} if {@code outerContext} is empty or nil. +// / +func predictionContextFromRuleContext(a *ATN, outerContext RuleContext) *PredictionContext { + if outerContext == nil { + outerContext = ParserRuleContextEmpty + } + // if we are in RuleContext of start rule, s, then BasePredictionContext + // is EMPTY. Nobody called us. (if we are empty, return empty) + if outerContext.GetParent() == nil || outerContext == ParserRuleContextEmpty { + return BasePredictionContextEMPTY + } + // If we have a parent, convert it to a BasePredictionContext graph + parent := predictionContextFromRuleContext(a, outerContext.GetParent().(RuleContext)) + state := a.states[outerContext.GetInvokingState()] + transition := state.GetTransitions()[0] + + return SingletonBasePredictionContextCreate(parent, transition.(*RuleTransition).followState.GetStateNumber()) +} + +func merge(a, b *PredictionContext, rootIsWildcard bool, mergeCache *JPCMap) *PredictionContext { + + // Share same graph if both same + // + if a == b || a.Equals(b) { + return a + } + + if a.pcType == PredictionContextSingleton && b.pcType == PredictionContextSingleton { + return mergeSingletons(a, b, rootIsWildcard, mergeCache) + } + // At least one of a or b is array + // If one is $ and rootIsWildcard, return $ as wildcard + if rootIsWildcard { + if a.isEmpty() { + return a + } + if b.isEmpty() { + return b + } + } + + // Convert either Singleton or Empty to arrays, so that we can merge them + // + ara := convertToArray(a) + arb := convertToArray(b) + return mergeArrays(ara, arb, rootIsWildcard, mergeCache) +} + +func convertToArray(pc *PredictionContext) *PredictionContext { + switch pc.Type() { + case PredictionContextEmpty: + return NewArrayPredictionContext([]*PredictionContext{}, []int{}) + case PredictionContextSingleton: + return NewArrayPredictionContext([]*PredictionContext{pc.GetParent(0)}, []int{pc.getReturnState(0)}) + default: + // Already an array + } + return pc +} + +// mergeSingletons merges two Singleton [PredictionContext] instances. +// +// Stack tops equal, parents merge is same return left graph. +//

+// +//

Same stack top, parents differ merge parents giving array node, then +// remainders of those graphs. A new root node is created to point to the +// merged parents.
+//

+// +//

Different stack tops pointing to same parent. Make array node for the +// root where both element in the root point to the same (original) +// parent.
+//

+// +//

Different stack tops pointing to different parents. Make array node for +// the root where each element points to the corresponding original +// parent.
+//

+// +// @param a the first {@link SingletonBasePredictionContext} +// @param b the second {@link SingletonBasePredictionContext} +// @param rootIsWildcard {@code true} if this is a local-context merge, +// otherwise false to indicate a full-context merge +// @param mergeCache +// / +func mergeSingletons(a, b *PredictionContext, rootIsWildcard bool, mergeCache *JPCMap) *PredictionContext { + if mergeCache != nil { + previous, present := mergeCache.Get(a, b) + if present { + return previous + } + previous, present = mergeCache.Get(b, a) + if present { + return previous + } + } + + rootMerge := mergeRoot(a, b, rootIsWildcard) + if rootMerge != nil { + if mergeCache != nil { + mergeCache.Put(a, b, rootMerge) + } + return rootMerge + } + if a.returnState == b.returnState { + parent := merge(a.parentCtx, b.parentCtx, rootIsWildcard, mergeCache) + // if parent is same as existing a or b parent or reduced to a parent, + // return it + if parent.Equals(a.parentCtx) { + return a // ax + bx = ax, if a=b + } + if parent.Equals(b.parentCtx) { + return b // ax + bx = bx, if a=b + } + // else: ax + ay = a'[x,y] + // merge parents x and y, giving array node with x,y then remainders + // of those graphs. dup a, a' points at merged array. + // New joined parent so create a new singleton pointing to it, a' + spc := SingletonBasePredictionContextCreate(parent, a.returnState) + if mergeCache != nil { + mergeCache.Put(a, b, spc) + } + return spc + } + // a != b payloads differ + // see if we can collapse parents due to $+x parents if local ctx + var singleParent *PredictionContext + if a.Equals(b) || (a.parentCtx != nil && a.parentCtx.Equals(b.parentCtx)) { // ax + + // bx = + // [a,b]x + singleParent = a.parentCtx + } + if singleParent != nil { // parents are same + // sort payloads and use same parent + payloads := []int{a.returnState, b.returnState} + if a.returnState > b.returnState { + payloads[0] = b.returnState + payloads[1] = a.returnState + } + parents := []*PredictionContext{singleParent, singleParent} + apc := NewArrayPredictionContext(parents, payloads) + if mergeCache != nil { + mergeCache.Put(a, b, apc) + } + return apc + } + // parents differ and can't merge them. Just pack together + // into array can't merge. + // ax + by = [ax,by] + payloads := []int{a.returnState, b.returnState} + parents := []*PredictionContext{a.parentCtx, b.parentCtx} + if a.returnState > b.returnState { // sort by payload + payloads[0] = b.returnState + payloads[1] = a.returnState + parents = []*PredictionContext{b.parentCtx, a.parentCtx} + } + apc := NewArrayPredictionContext(parents, payloads) + if mergeCache != nil { + mergeCache.Put(a, b, apc) + } + return apc +} + +// Handle case where at least one of {@code a} or {@code b} is +// {@link //EMPTY}. In the following diagrams, the symbol {@code $} is used +// to represent {@link //EMPTY}. +// +//

Local-Context Merges

+// +//

These local-context merge operations are used when {@code rootIsWildcard} +// is true.

+// +//

{@link //EMPTY} is superset of any graph return {@link //EMPTY}.
+//

+// +//

{@link //EMPTY} and anything is {@code //EMPTY}, so merged parent is +// {@code //EMPTY} return left graph.
+//

+// +//

Special case of last merge if local context.
+//

+// +//

Full-Context Merges

+// +//

These full-context merge operations are used when {@code rootIsWildcard} +// is false.

+// +//

+// +//

Must keep all contexts {@link //EMPTY} in array is a special value (and +// nil parent).
+//

+// +//

+// +// @param a the first {@link SingletonBasePredictionContext} +// @param b the second {@link SingletonBasePredictionContext} +// @param rootIsWildcard {@code true} if this is a local-context merge, +// otherwise false to indicate a full-context merge +// / +func mergeRoot(a, b *PredictionContext, rootIsWildcard bool) *PredictionContext { + if rootIsWildcard { + if a.pcType == PredictionContextEmpty { + return BasePredictionContextEMPTY // // + b =// + } + if b.pcType == PredictionContextEmpty { + return BasePredictionContextEMPTY // a +// =// + } + } else { + if a.isEmpty() && b.isEmpty() { + return BasePredictionContextEMPTY // $ + $ = $ + } else if a.isEmpty() { // $ + x = [$,x] + payloads := []int{b.getReturnState(-1), BasePredictionContextEmptyReturnState} + parents := []*PredictionContext{b.GetParent(-1), nil} + return NewArrayPredictionContext(parents, payloads) + } else if b.isEmpty() { // x + $ = [$,x] ($ is always first if present) + payloads := []int{a.getReturnState(-1), BasePredictionContextEmptyReturnState} + parents := []*PredictionContext{a.GetParent(-1), nil} + return NewArrayPredictionContext(parents, payloads) + } + } + return nil +} + +// Merge two {@link ArrayBasePredictionContext} instances. +// +//

Different tops, different parents.
+//

+// +//

Shared top, same parents.
+//

+// +//

Shared top, different parents.
+//

+// +//

Shared top, all shared parents.
+//

+// +//

Equal tops, merge parents and reduce top to +// {@link SingletonBasePredictionContext}.
+//

+// +//goland:noinspection GoBoolExpressions +func mergeArrays(a, b *PredictionContext, rootIsWildcard bool, mergeCache *JPCMap) *PredictionContext { + if mergeCache != nil { + previous, present := mergeCache.Get(a, b) + if present { + if runtimeConfig.parserATNSimulatorTraceATNSim { + fmt.Println("mergeArrays a=" + a.String() + ",b=" + b.String() + " -> previous") + } + return previous + } + previous, present = mergeCache.Get(b, a) + if present { + if runtimeConfig.parserATNSimulatorTraceATNSim { + fmt.Println("mergeArrays a=" + a.String() + ",b=" + b.String() + " -> previous") + } + return previous + } + } + // merge sorted payloads a + b => M + i := 0 // walks a + j := 0 // walks b + k := 0 // walks target M array + + mergedReturnStates := make([]int, len(a.returnStates)+len(b.returnStates)) + mergedParents := make([]*PredictionContext, len(a.returnStates)+len(b.returnStates)) + // walk and merge to yield mergedParents, mergedReturnStates + for i < len(a.returnStates) && j < len(b.returnStates) { + aParent := a.parents[i] + bParent := b.parents[j] + if a.returnStates[i] == b.returnStates[j] { + // same payload (stack tops are equal), must yield merged singleton + payload := a.returnStates[i] + // $+$ = $ + bothDollars := payload == BasePredictionContextEmptyReturnState && aParent == nil && bParent == nil + axAX := aParent != nil && bParent != nil && aParent.Equals(bParent) // ax+ax + // -> + // ax + if bothDollars || axAX { + mergedParents[k] = aParent // choose left + mergedReturnStates[k] = payload + } else { // ax+ay -> a'[x,y] + mergedParent := merge(aParent, bParent, rootIsWildcard, mergeCache) + mergedParents[k] = mergedParent + mergedReturnStates[k] = payload + } + i++ // hop over left one as usual + j++ // but also Skip one in right side since we merge + } else if a.returnStates[i] < b.returnStates[j] { // copy a[i] to M + mergedParents[k] = aParent + mergedReturnStates[k] = a.returnStates[i] + i++ + } else { // b > a, copy b[j] to M + mergedParents[k] = bParent + mergedReturnStates[k] = b.returnStates[j] + j++ + } + k++ + } + // copy over any payloads remaining in either array + if i < len(a.returnStates) { + for p := i; p < len(a.returnStates); p++ { + mergedParents[k] = a.parents[p] + mergedReturnStates[k] = a.returnStates[p] + k++ + } + } else { + for p := j; p < len(b.returnStates); p++ { + mergedParents[k] = b.parents[p] + mergedReturnStates[k] = b.returnStates[p] + k++ + } + } + // trim merged if we combined a few that had same stack tops + if k < len(mergedParents) { // write index < last position trim + if k == 1 { // for just one merged element, return singleton top + pc := SingletonBasePredictionContextCreate(mergedParents[0], mergedReturnStates[0]) + if mergeCache != nil { + mergeCache.Put(a, b, pc) + } + return pc + } + mergedParents = mergedParents[0:k] + mergedReturnStates = mergedReturnStates[0:k] + } + + M := NewArrayPredictionContext(mergedParents, mergedReturnStates) + + // if we created same array as a or b, return that instead + // TODO: JI track whether this is possible above during merge sort for speed and possibly avoid an allocation + if M.Equals(a) { + if mergeCache != nil { + mergeCache.Put(a, b, a) + } + if runtimeConfig.parserATNSimulatorTraceATNSim { + fmt.Println("mergeArrays a=" + a.String() + ",b=" + b.String() + " -> a") + } + return a + } + if M.Equals(b) { + if mergeCache != nil { + mergeCache.Put(a, b, b) + } + if runtimeConfig.parserATNSimulatorTraceATNSim { + fmt.Println("mergeArrays a=" + a.String() + ",b=" + b.String() + " -> b") + } + return b + } + combineCommonParents(&mergedParents) + + if mergeCache != nil { + mergeCache.Put(a, b, M) + } + if runtimeConfig.parserATNSimulatorTraceATNSim { + fmt.Println("mergeArrays a=" + a.String() + ",b=" + b.String() + " -> " + M.String()) + } + return M +} + +// Make pass over all M parents and merge any Equals() ones. +// Note that we pass a pointer to the slice as we want to modify it in place. +// +//goland:noinspection GoUnusedFunction +func combineCommonParents(parents *[]*PredictionContext) { + uniqueParents := NewJStore[*PredictionContext, Comparator[*PredictionContext]](pContextEqInst, PredictionContextCollection, "combineCommonParents for PredictionContext") + + for p := 0; p < len(*parents); p++ { + parent := (*parents)[p] + _, _ = uniqueParents.Put(parent) + } + for q := 0; q < len(*parents); q++ { + pc, _ := uniqueParents.Get((*parents)[q]) + (*parents)[q] = pc + } +} + +func getCachedBasePredictionContext(context *PredictionContext, contextCache *PredictionContextCache, visited *VisitRecord) *PredictionContext { + if context.isEmpty() { + return context + } + existing, present := visited.Get(context) + if present { + return existing + } + + existing, present = contextCache.Get(context) + if present { + visited.Put(context, existing) + return existing + } + changed := false + parents := make([]*PredictionContext, context.length()) + for i := 0; i < len(parents); i++ { + parent := getCachedBasePredictionContext(context.GetParent(i), contextCache, visited) + if changed || !parent.Equals(context.GetParent(i)) { + if !changed { + parents = make([]*PredictionContext, context.length()) + for j := 0; j < context.length(); j++ { + parents[j] = context.GetParent(j) + } + changed = true + } + parents[i] = parent + } + } + if !changed { + contextCache.add(context) + visited.Put(context, context) + return context + } + var updated *PredictionContext + if len(parents) == 0 { + updated = BasePredictionContextEMPTY + } else if len(parents) == 1 { + updated = SingletonBasePredictionContextCreate(parents[0], context.getReturnState(0)) + } else { + updated = NewArrayPredictionContext(parents, context.GetReturnStates()) + } + contextCache.add(updated) + visited.Put(updated, updated) + visited.Put(context, updated) + + return updated +} diff --git a/vendor/github.com/antlr4-go/antlr/v4/prediction_context_cache.go b/vendor/github.com/antlr4-go/antlr/v4/prediction_context_cache.go new file mode 100644 index 00000000000..25dfb11e8ff --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/prediction_context_cache.go @@ -0,0 +1,48 @@ +package antlr + +var BasePredictionContextEMPTY = &PredictionContext{ + cachedHash: calculateEmptyHash(), + pcType: PredictionContextEmpty, + returnState: BasePredictionContextEmptyReturnState, +} + +// PredictionContextCache is Used to cache [PredictionContext] objects. It is used for the shared +// context cash associated with contexts in DFA states. This cache +// can be used for both lexers and parsers. +type PredictionContextCache struct { + cache *JMap[*PredictionContext, *PredictionContext, Comparator[*PredictionContext]] +} + +func NewPredictionContextCache() *PredictionContextCache { + return &PredictionContextCache{ + cache: NewJMap[*PredictionContext, *PredictionContext, Comparator[*PredictionContext]](pContextEqInst, PredictionContextCacheCollection, "NewPredictionContextCache()"), + } +} + +// Add a context to the cache and return it. If the context already exists, +// return that one instead and do not add a new context to the cache. +// Protect shared cache from unsafe thread access. +func (p *PredictionContextCache) add(ctx *PredictionContext) *PredictionContext { + if ctx.isEmpty() { + return BasePredictionContextEMPTY + } + + // Put will return the existing entry if it is present (note this is done via Equals, not whether it is + // the same pointer), otherwise it will add the new entry and return that. + // + existing, present := p.cache.Get(ctx) + if present { + return existing + } + p.cache.Put(ctx, ctx) + return ctx +} + +func (p *PredictionContextCache) Get(ctx *PredictionContext) (*PredictionContext, bool) { + pc, exists := p.cache.Get(ctx) + return pc, exists +} + +func (p *PredictionContextCache) length() int { + return p.cache.Len() +} diff --git a/vendor/github.com/antlr4-go/antlr/v4/prediction_mode.go b/vendor/github.com/antlr4-go/antlr/v4/prediction_mode.go new file mode 100644 index 00000000000..3f85a6a520b --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/prediction_mode.go @@ -0,0 +1,536 @@ +// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. +// Use of this file is governed by the BSD 3-clause license that +// can be found in the LICENSE.txt file in the project root. + +package antlr + +// This enumeration defines the prediction modes available in ANTLR 4 along with +// utility methods for analyzing configuration sets for conflicts and/or +// ambiguities. + +const ( + // PredictionModeSLL represents the SLL(*) prediction mode. + // This prediction mode ignores the current + // parser context when making predictions. This is the fastest prediction + // mode, and provides correct results for many grammars. This prediction + // mode is more powerful than the prediction mode provided by ANTLR 3, but + // may result in syntax errors for grammar and input combinations which are + // not SLL. + // + // When using this prediction mode, the parser will either return a correct + // parse tree (i.e. the same parse tree that would be returned with the + // [PredictionModeLL] prediction mode), or it will Report a syntax error. If a + // syntax error is encountered when using the SLL prediction mode, + // it may be due to either an actual syntax error in the input or indicate + // that the particular combination of grammar and input requires the more + // powerful LL prediction abilities to complete successfully. + // + // This prediction mode does not provide any guarantees for prediction + // behavior for syntactically-incorrect inputs. + // + PredictionModeSLL = 0 + + // PredictionModeLL represents the LL(*) prediction mode. + // This prediction mode allows the current parser + // context to be used for resolving SLL conflicts that occur during + // prediction. This is the fastest prediction mode that guarantees correct + // parse results for all combinations of grammars with syntactically correct + // inputs. + // + // When using this prediction mode, the parser will make correct decisions + // for all syntactically-correct grammar and input combinations. However, in + // cases where the grammar is truly ambiguous this prediction mode might not + // report a precise answer for exactly which alternatives are + // ambiguous. + // + // This prediction mode does not provide any guarantees for prediction + // behavior for syntactically-incorrect inputs. + // + PredictionModeLL = 1 + + // PredictionModeLLExactAmbigDetection represents the LL(*) prediction mode + // with exact ambiguity detection. + // + // In addition to the correctness guarantees provided by the [PredictionModeLL] prediction mode, + // this prediction mode instructs the prediction algorithm to determine the + // complete and exact set of ambiguous alternatives for every ambiguous + // decision encountered while parsing. + // + // This prediction mode may be used for diagnosing ambiguities during + // grammar development. Due to the performance overhead of calculating sets + // of ambiguous alternatives, this prediction mode should be avoided when + // the exact results are not necessary. + // + // This prediction mode does not provide any guarantees for prediction + // behavior for syntactically-incorrect inputs. + // + PredictionModeLLExactAmbigDetection = 2 +) + +// PredictionModehasSLLConflictTerminatingPrediction computes the SLL prediction termination condition. +// +// This method computes the SLL prediction termination condition for both of +// the following cases: +// +// - The usual SLL+LL fallback upon SLL conflict +// - Pure SLL without LL fallback +// +// # Combined SLL+LL Parsing +// +// When LL-fallback is enabled upon SLL conflict, correct predictions are +// ensured regardless of how the termination condition is computed by this +// method. Due to the substantially higher cost of LL prediction, the +// prediction should only fall back to LL when the additional lookahead +// cannot lead to a unique SLL prediction. +// +// Assuming combined SLL+LL parsing, an SLL configuration set with only +// conflicting subsets should fall back to full LL, even if the +// configuration sets don't resolve to the same alternative, e.g. +// +// {1,2} and {3,4} +// +// If there is at least one non-conflicting +// configuration, SLL could continue with the hopes that more lookahead will +// resolve via one of those non-conflicting configurations. +// +// Here's the prediction termination rule them: SLL (for SLL+LL parsing) +// stops when it sees only conflicting configuration subsets. In contrast, +// full LL keeps going when there is uncertainty. +// +// # Heuristic +// +// As a heuristic, we stop prediction when we see any conflicting subset +// unless we see a state that only has one alternative associated with it. +// The single-alt-state thing lets prediction continue upon rules like +// (otherwise, it would admit defeat too soon): +// +// [12|1|[], 6|2|[], 12|2|[]]. s : (ID | ID ID?) ; +// +// When the [ATN] simulation reaches the state before ';', it has a +// [DFA] state that looks like: +// +// [12|1|[], 6|2|[], 12|2|[]] +// +// Naturally +// +// 12|1|[] and 12|2|[] +// +// conflict, but we cannot stop processing this node because alternative to has another way to continue, +// via +// +// [6|2|[]] +// +// It also let's us continue for this rule: +// +// [1|1|[], 1|2|[], 8|3|[]] a : A | A | A B ; +// +// After Matching input A, we reach the stop state for rule A, state 1. +// State 8 is the state immediately before B. Clearly alternatives 1 and 2 +// conflict and no amount of further lookahead will separate the two. +// However, alternative 3 will be able to continue, and so we do not stop +// working on this state. In the previous example, we're concerned with +// states associated with the conflicting alternatives. Here alt 3 is not +// associated with the conflicting configs, but since we can continue +// looking for input reasonably, don't declare the state done. +// +// # Pure SLL Parsing +// +// To handle pure SLL parsing, all we have to do is make sure that we +// combine stack contexts for configurations that differ only by semantic +// predicate. From there, we can do the usual SLL termination heuristic. +// +// # Predicates in SLL+LL Parsing +// +// SLL decisions don't evaluate predicates until after they reach [DFA] stop +// states because they need to create the [DFA] cache that works in all +// semantic situations. In contrast, full LL evaluates predicates collected +// during start state computation, so it can ignore predicates thereafter. +// This means that SLL termination detection can totally ignore semantic +// predicates. +// +// Implementation-wise, [ATNConfigSet] combines stack contexts but not +// semantic predicate contexts, so we might see two configurations like the +// following: +// +// (s, 1, x, {}), (s, 1, x', {p}) +// +// Before testing these configurations against others, we have to merge +// x and x' (without modifying the existing configurations). +// For example, we test (x+x')==x” when looking for conflicts in +// the following configurations: +// +// (s, 1, x, {}), (s, 1, x', {p}), (s, 2, x”, {}) +// +// If the configuration set has predicates (as indicated by +// [ATNConfigSet.hasSemanticContext]), this algorithm makes a copy of +// the configurations to strip out all the predicates so that a standard +// [ATNConfigSet] will merge everything ignoring predicates. +func PredictionModehasSLLConflictTerminatingPrediction(mode int, configs *ATNConfigSet) bool { + + // Configs in rule stop states indicate reaching the end of the decision + // rule (local context) or end of start rule (full context). If all + // configs meet this condition, then none of the configurations is able + // to Match additional input, so we terminate prediction. + // + if PredictionModeallConfigsInRuleStopStates(configs) { + return true + } + + // pure SLL mode parsing + if mode == PredictionModeSLL { + // Don't bother with combining configs from different semantic + // contexts if we can fail over to full LL costs more time + // since we'll often fail over anyway. + if configs.hasSemanticContext { + // dup configs, tossing out semantic predicates + dup := NewATNConfigSet(false) + for _, c := range configs.configs { + + // NewATNConfig({semanticContext:}, c) + c = NewATNConfig2(c, SemanticContextNone) + dup.Add(c, nil) + } + configs = dup + } + // now we have combined contexts for configs with dissimilar predicates + } + // pure SLL or combined SLL+LL mode parsing + altsets := PredictionModegetConflictingAltSubsets(configs) + return PredictionModehasConflictingAltSet(altsets) && !PredictionModehasStateAssociatedWithOneAlt(configs) +} + +// PredictionModehasConfigInRuleStopState checks if any configuration in the given configs is in a +// [RuleStopState]. Configurations meeting this condition have reached +// the end of the decision rule (local context) or end of start rule (full +// context). +// +// The func returns true if any configuration in the supplied configs is in a [RuleStopState] +func PredictionModehasConfigInRuleStopState(configs *ATNConfigSet) bool { + for _, c := range configs.configs { + if _, ok := c.GetState().(*RuleStopState); ok { + return true + } + } + return false +} + +// PredictionModeallConfigsInRuleStopStates checks if all configurations in configs are in a +// [RuleStopState]. Configurations meeting this condition have reached +// the end of the decision rule (local context) or end of start rule (full +// context). +// +// the func returns true if all configurations in configs are in a +// [RuleStopState] +func PredictionModeallConfigsInRuleStopStates(configs *ATNConfigSet) bool { + + for _, c := range configs.configs { + if _, ok := c.GetState().(*RuleStopState); !ok { + return false + } + } + return true +} + +// PredictionModeresolvesToJustOneViableAlt checks full LL prediction termination. +// +// Can we stop looking ahead during [ATN] simulation or is there some +// uncertainty as to which alternative we will ultimately pick, after +// consuming more input? Even if there are partial conflicts, we might know +// that everything is going to resolve to the same minimum alternative. That +// means we can stop since no more lookahead will change that fact. On the +// other hand, there might be multiple conflicts that resolve to different +// minimums. That means we need more look ahead to decide which of those +// alternatives we should predict. +// +// The basic idea is to split the set of configurations 'C', into +// conflicting subsets (s, _, ctx, _) and singleton subsets with +// non-conflicting configurations. Two configurations conflict if they have +// identical [ATNConfig].state and [ATNConfig].context values +// but a different [ATNConfig].alt value, e.g. +// +// (s, i, ctx, _) +// +// and +// +// (s, j, ctx, _) ; for i != j +// +// Reduce these configuration subsets to the set of possible alternatives. +// You can compute the alternative subsets in one pass as follows: +// +// A_s,ctx = {i | (s, i, ctx, _)} +// +// for each configuration in C holding s and ctx fixed. +// +// Or in pseudo-code: +// +// for each configuration c in C: +// map[c] U = c.ATNConfig.alt alt // map hash/equals uses s and x, not alt and not pred +// +// The values in map are the set of +// +// A_s,ctx +// +// sets. +// +// If +// +// |A_s,ctx| = 1 +// +// then there is no conflict associated with s and ctx. +// +// Reduce the subsets to singletons by choosing a minimum of each subset. If +// the union of these alternative subsets is a singleton, then no amount of +// further lookahead will help us. We will always pick that alternative. If, +// however, there is more than one alternative, then we are uncertain which +// alternative to predict and must continue looking for resolution. We may +// or may not discover an ambiguity in the future, even if there are no +// conflicting subsets this round. +// +// The biggest sin is to terminate early because it means we've made a +// decision but were uncertain as to the eventual outcome. We haven't used +// enough lookahead. On the other hand, announcing a conflict too late is no +// big deal; you will still have the conflict. It's just inefficient. It +// might even look until the end of file. +// +// No special consideration for semantic predicates is required because +// predicates are evaluated on-the-fly for full LL prediction, ensuring that +// no configuration contains a semantic context during the termination +// check. +// +// # Conflicting Configs +// +// Two configurations: +// +// (s, i, x) and (s, j, x') +// +// conflict when i != j but x = x'. Because we merge all +// (s, i, _) configurations together, that means that there are at +// most n configurations associated with state s for +// n possible alternatives in the decision. The merged stacks +// complicate the comparison of configuration contexts x and x'. +// +// Sam checks to see if one is a subset of the other by calling +// merge and checking to see if the merged result is either x or x'. +// If the x associated with lowest alternative i +// is the superset, then i is the only possible prediction since the +// others resolve to min(i) as well. However, if x is +// associated with j > i then at least one stack configuration for +// j is not in conflict with alternative i. The algorithm +// should keep going, looking for more lookahead due to the uncertainty. +// +// For simplicity, I'm doing an equality check between x and +// x', which lets the algorithm continue to consume lookahead longer +// than necessary. The reason I like the equality is of course the +// simplicity but also because that is the test you need to detect the +// alternatives that are actually in conflict. +// +// # Continue/Stop Rule +// +// Continue if the union of resolved alternative sets from non-conflicting and +// conflicting alternative subsets has more than one alternative. We are +// uncertain about which alternative to predict. +// +// The complete set of alternatives, +// +// [i for (_, i, _)] +// +// tells us which alternatives are still in the running for the amount of input we've +// consumed at this point. The conflicting sets let us to strip away +// configurations that won't lead to more states because we resolve +// conflicts to the configuration with a minimum alternate for the +// conflicting set. +// +// Cases +// +// - no conflicts and more than 1 alternative in set => continue +// - (s, 1, x), (s, 2, x), (s, 3, z), (s', 1, y), (s', 2, y) yields non-conflicting set +// {3} ∪ conflicting sets min({1,2}) ∪ min({1,2}) = {1,3} => continue +// - (s, 1, x), (s, 2, x), (s', 1, y), (s', 2, y), (s”, 1, z) yields non-conflicting set +// {1} ∪ conflicting sets min({1,2}) ∪ min({1,2}) = {1} => stop and predict 1 +// - (s, 1, x), (s, 2, x), (s', 1, y), (s', 2, y) yields conflicting, reduced sets +// {1} ∪ {1} = {1} => stop and predict 1, can announce ambiguity {1,2} +// - (s, 1, x), (s, 2, x), (s', 2, y), (s', 3, y) yields conflicting, reduced sets +// {1} ∪ {2} = {1,2} => continue +// - (s, 1, x), (s, 2, x), (s', 2, y), (s', 3, y) yields conflicting, reduced sets +// {1} ∪ {2} = {1,2} => continue +// - (s, 1, x), (s, 2, x), (s', 3, y), (s', 4, y) yields conflicting, reduced sets +// {1} ∪ {3} = {1,3} => continue +// +// # Exact Ambiguity Detection +// +// If all states report the same conflicting set of alternatives, then we +// know we have the exact ambiguity set: +// +// |A_i| > 1 +// +// and +// +// A_i = A_j ; for all i, j +// +// In other words, we continue examining lookahead until all A_i +// have more than one alternative and all A_i are the same. If +// +// A={{1,2}, {1,3}} +// +// then regular LL prediction would terminate because the resolved set is {1}. +// To determine what the real ambiguity is, we have to know whether the ambiguity is between one and +// two or one and three so we keep going. We can only stop prediction when +// we need exact ambiguity detection when the sets look like: +// +// A={{1,2}} +// +// or +// +// {{1,2},{1,2}}, etc... +func PredictionModeresolvesToJustOneViableAlt(altsets []*BitSet) int { + return PredictionModegetSingleViableAlt(altsets) +} + +// PredictionModeallSubsetsConflict determines if every alternative subset in altsets contains more +// than one alternative. +// +// The func returns true if every [BitSet] in altsets has +// [BitSet].cardinality cardinality > 1 +func PredictionModeallSubsetsConflict(altsets []*BitSet) bool { + return !PredictionModehasNonConflictingAltSet(altsets) +} + +// PredictionModehasNonConflictingAltSet determines if any single alternative subset in altsets contains +// exactly one alternative. +// +// The func returns true if altsets contains at least one [BitSet] with +// [BitSet].cardinality cardinality 1 +func PredictionModehasNonConflictingAltSet(altsets []*BitSet) bool { + for i := 0; i < len(altsets); i++ { + alts := altsets[i] + if alts.length() == 1 { + return true + } + } + return false +} + +// PredictionModehasConflictingAltSet determines if any single alternative subset in altsets contains +// more than one alternative. +// +// The func returns true if altsets contains a [BitSet] with +// [BitSet].cardinality cardinality > 1, otherwise false +func PredictionModehasConflictingAltSet(altsets []*BitSet) bool { + for i := 0; i < len(altsets); i++ { + alts := altsets[i] + if alts.length() > 1 { + return true + } + } + return false +} + +// PredictionModeallSubsetsEqual determines if every alternative subset in altsets is equivalent. +// +// The func returns true if every member of altsets is equal to the others. +func PredictionModeallSubsetsEqual(altsets []*BitSet) bool { + var first *BitSet + + for i := 0; i < len(altsets); i++ { + alts := altsets[i] + if first == nil { + first = alts + } else if alts != first { + return false + } + } + + return true +} + +// PredictionModegetUniqueAlt returns the unique alternative predicted by all alternative subsets in +// altsets. If no such alternative exists, this method returns +// [ATNInvalidAltNumber]. +// +// @param altsets a collection of alternative subsets +func PredictionModegetUniqueAlt(altsets []*BitSet) int { + all := PredictionModeGetAlts(altsets) + if all.length() == 1 { + return all.minValue() + } + + return ATNInvalidAltNumber +} + +// PredictionModeGetAlts returns the complete set of represented alternatives for a collection of +// alternative subsets. This method returns the union of each [BitSet] +// in altsets, being the set of represented alternatives in altsets. +func PredictionModeGetAlts(altsets []*BitSet) *BitSet { + all := NewBitSet() + for _, alts := range altsets { + all.or(alts) + } + return all +} + +// PredictionModegetConflictingAltSubsets gets the conflicting alt subsets from a configuration set. +// +// for each configuration c in configs: +// map[c] U= c.ATNConfig.alt // map hash/equals uses s and x, not alt and not pred +func PredictionModegetConflictingAltSubsets(configs *ATNConfigSet) []*BitSet { + configToAlts := NewJMap[*ATNConfig, *BitSet, *ATNAltConfigComparator[*ATNConfig]](atnAltCfgEqInst, AltSetCollection, "PredictionModegetConflictingAltSubsets()") + + for _, c := range configs.configs { + + alts, ok := configToAlts.Get(c) + if !ok { + alts = NewBitSet() + configToAlts.Put(c, alts) + } + alts.add(c.GetAlt()) + } + + return configToAlts.Values() +} + +// PredictionModeGetStateToAltMap gets a map from state to alt subset from a configuration set. +// +// for each configuration c in configs: +// map[c.ATNConfig.state] U= c.ATNConfig.alt} +func PredictionModeGetStateToAltMap(configs *ATNConfigSet) *AltDict { + m := NewAltDict() + + for _, c := range configs.configs { + alts := m.Get(c.GetState().String()) + if alts == nil { + alts = NewBitSet() + m.put(c.GetState().String(), alts) + } + alts.(*BitSet).add(c.GetAlt()) + } + return m +} + +func PredictionModehasStateAssociatedWithOneAlt(configs *ATNConfigSet) bool { + values := PredictionModeGetStateToAltMap(configs).values() + for i := 0; i < len(values); i++ { + if values[i].(*BitSet).length() == 1 { + return true + } + } + return false +} + +// PredictionModegetSingleViableAlt gets the single alternative predicted by all alternative subsets in altsets +// if there is one. +// +// TODO: JI - Review this code - it does not seem to do the same thing as the Java code - maybe because [BitSet] is not like the Java utils BitSet +func PredictionModegetSingleViableAlt(altsets []*BitSet) int { + result := ATNInvalidAltNumber + + for i := 0; i < len(altsets); i++ { + alts := altsets[i] + minAlt := alts.minValue() + if result == ATNInvalidAltNumber { + result = minAlt + } else if result != minAlt { // more than 1 viable alt + return ATNInvalidAltNumber + } + } + return result +} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/recognizer.go b/vendor/github.com/antlr4-go/antlr/v4/recognizer.go similarity index 70% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/recognizer.go rename to vendor/github.com/antlr4-go/antlr/v4/recognizer.go index bfe542d0914..2e0b504fb3d 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/recognizer.go +++ b/vendor/github.com/antlr4-go/antlr/v4/recognizer.go @@ -26,6 +26,9 @@ type Recognizer interface { RemoveErrorListeners() GetATN() *ATN GetErrorListenerDispatch() ErrorListener + HasError() bool + GetError() RecognitionException + SetError(RecognitionException) } type BaseRecognizer struct { @@ -36,6 +39,7 @@ type BaseRecognizer struct { LiteralNames []string SymbolicNames []string GrammarFileName string + SynErr RecognitionException } func NewBaseRecognizer() *BaseRecognizer { @@ -45,7 +49,10 @@ func NewBaseRecognizer() *BaseRecognizer { return rec } +//goland:noinspection GoUnusedGlobalVariable var tokenTypeMapCache = make(map[string]int) + +//goland:noinspection GoUnusedGlobalVariable var ruleIndexMapCache = make(map[string]int) func (b *BaseRecognizer) checkVersion(toolVersion string) { @@ -55,7 +62,19 @@ func (b *BaseRecognizer) checkVersion(toolVersion string) { } } -func (b *BaseRecognizer) Action(context RuleContext, ruleIndex, actionIndex int) { +func (b *BaseRecognizer) SetError(err RecognitionException) { + b.SynErr = err +} + +func (b *BaseRecognizer) HasError() bool { + return b.SynErr != nil +} + +func (b *BaseRecognizer) GetError() RecognitionException { + return b.SynErr +} + +func (b *BaseRecognizer) Action(_ RuleContext, _, _ int) { panic("action not implemented on Recognizer!") } @@ -105,9 +124,11 @@ func (b *BaseRecognizer) SetState(v int) { // return result //} -// Get a map from rule names to rule indexes. +// GetRuleIndexMap Get a map from rule names to rule indexes. // -//

Used for XPath and tree pattern compilation.

+// Used for XPath and tree pattern compilation. +// +// TODO: JI This is not yet implemented in the Go runtime. Maybe not needed. func (b *BaseRecognizer) GetRuleIndexMap() map[string]int { panic("Method not defined!") @@ -124,7 +145,8 @@ func (b *BaseRecognizer) GetRuleIndexMap() map[string]int { // return result } -func (b *BaseRecognizer) GetTokenType(tokenName string) int { +// GetTokenType get the token type based upon its name +func (b *BaseRecognizer) GetTokenType(_ string) int { panic("Method not defined!") // var ttype = b.GetTokenTypeMap()[tokenName] // if (ttype !=nil) { @@ -162,26 +184,27 @@ func (b *BaseRecognizer) GetTokenType(tokenName string) int { // } //} -// What is the error header, normally line/character position information?// +// GetErrorHeader returns the error header, normally line/character position information. +// +// Can be overridden in sub structs embedding BaseRecognizer. func (b *BaseRecognizer) GetErrorHeader(e RecognitionException) string { line := e.GetOffendingToken().GetLine() column := e.GetOffendingToken().GetColumn() return "line " + strconv.Itoa(line) + ":" + strconv.Itoa(column) } -// How should a token be displayed in an error message? The default +// GetTokenErrorDisplay shows how a token should be displayed in an error message. // -// is to display just the text, but during development you might -// want to have a lot of information spit out. Override in that case -// to use t.String() (which, for CommonToken, dumps everything about -// the token). This is better than forcing you to override a method in -// your token objects because you don't have to go modify your lexer -// so that it creates a NewJava type. +// The default is to display just the text, but during development you might +// want to have a lot of information spit out. Override in that case +// to use t.String() (which, for CommonToken, dumps everything about +// the token). This is better than forcing you to override a method in +// your token objects because you don't have to go modify your lexer +// so that it creates a NewJava type. // -// @deprecated This method is not called by the ANTLR 4 Runtime. Specific -// implementations of {@link ANTLRErrorStrategy} may provide a similar -// feature when necessary. For example, see -// {@link DefaultErrorStrategy//GetTokenErrorDisplay}. +// Deprecated: This method is not called by the ANTLR 4 Runtime. Specific +// implementations of [ANTLRErrorStrategy] may provide a similar +// feature when necessary. For example, see [DefaultErrorStrategy].GetTokenErrorDisplay() func (b *BaseRecognizer) GetTokenErrorDisplay(t Token) string { if t == nil { return "" @@ -205,12 +228,14 @@ func (b *BaseRecognizer) GetErrorListenerDispatch() ErrorListener { return NewProxyErrorListener(b.listeners) } -// subclass needs to override these if there are sempreds or actions -// that the ATN interp needs to execute -func (b *BaseRecognizer) Sempred(localctx RuleContext, ruleIndex int, actionIndex int) bool { +// Sempred embedding structs need to override this if there are sempreds or actions +// that the ATN interpreter needs to execute +func (b *BaseRecognizer) Sempred(_ RuleContext, _ int, _ int) bool { return true } -func (b *BaseRecognizer) Precpred(localctx RuleContext, precedence int) bool { +// Precpred embedding structs need to override this if there are preceding predicates +// that the ATN interpreter needs to execute +func (b *BaseRecognizer) Precpred(_ RuleContext, _ int) bool { return true } diff --git a/vendor/github.com/antlr4-go/antlr/v4/rule_context.go b/vendor/github.com/antlr4-go/antlr/v4/rule_context.go new file mode 100644 index 00000000000..f2ad04793e1 --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/rule_context.go @@ -0,0 +1,40 @@ +// Copyright (c) 2012-2022 The ANTLR Project. All rights reserved. +// Use of this file is governed by the BSD 3-clause license that +// can be found in the LICENSE.txt file in the project root. + +package antlr + +// RuleContext is a record of a single rule invocation. It knows +// which context invoked it, if any. If there is no parent context, then +// naturally the invoking state is not valid. The parent link +// provides a chain upwards from the current rule invocation to the root +// of the invocation tree, forming a stack. +// +// We actually carry no information about the rule associated with this context (except +// when parsing). We keep only the state number of the invoking state from +// the [ATN] submachine that invoked this. Contrast this with the s +// pointer inside [ParserRuleContext] that tracks the current state +// being "executed" for the current rule. +// +// The parent contexts are useful for computing lookahead sets and +// getting error information. +// +// These objects are used during parsing and prediction. +// For the special case of parsers, we use the struct +// [ParserRuleContext], which embeds a RuleContext. +// +// @see ParserRuleContext +type RuleContext interface { + RuleNode + + GetInvokingState() int + SetInvokingState(int) + + GetRuleIndex() int + IsEmpty() bool + + GetAltNumber() int + SetAltNumber(altNumber int) + + String([]string, RuleContext) string +} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/semantic_context.go b/vendor/github.com/antlr4-go/antlr/v4/semantic_context.go similarity index 92% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/semantic_context.go rename to vendor/github.com/antlr4-go/antlr/v4/semantic_context.go index a702e99def7..68cb9061eb6 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/semantic_context.go +++ b/vendor/github.com/antlr4-go/antlr/v4/semantic_context.go @@ -9,14 +9,13 @@ import ( "strconv" ) -// A tree structure used to record the semantic context in which -// an ATN configuration is valid. It's either a single predicate, -// a conjunction {@code p1&&p2}, or a sum of products {@code p1||p2}. +// SemanticContext is a tree structure used to record the semantic context in which // -//

I have scoped the {@link AND}, {@link OR}, and {@link Predicate} subclasses of -// {@link SemanticContext} within the scope of this outer class.

+// an ATN configuration is valid. It's either a single predicate, +// a conjunction p1 && p2, or a sum of products p1 || p2. // - +// I have scoped the AND, OR, and Predicate subclasses of +// [SemanticContext] within the scope of this outer ``class'' type SemanticContext interface { Equals(other Collectable[SemanticContext]) bool Hash() int @@ -80,7 +79,7 @@ func NewPredicate(ruleIndex, predIndex int, isCtxDependent bool) *Predicate { var SemanticContextNone = NewPredicate(-1, -1, false) -func (p *Predicate) evalPrecedence(parser Recognizer, outerContext RuleContext) SemanticContext { +func (p *Predicate) evalPrecedence(_ Recognizer, _ RuleContext) SemanticContext { return p } @@ -198,7 +197,7 @@ type AND struct { func NewAND(a, b SemanticContext) *AND { - operands := NewJStore[SemanticContext, Comparator[SemanticContext]](semctxEqInst) + operands := NewJStore[SemanticContext, Comparator[SemanticContext]](semctxEqInst, SemanticContextCollection, "NewAND() operands") if aa, ok := a.(*AND); ok { for _, o := range aa.opnds { operands.Put(o) @@ -230,9 +229,7 @@ func NewAND(a, b SemanticContext) *AND { vs := operands.Values() opnds := make([]SemanticContext, len(vs)) - for i, v := range vs { - opnds[i] = v.(SemanticContext) - } + copy(opnds, vs) and := new(AND) and.opnds = opnds @@ -316,12 +313,12 @@ func (a *AND) Hash() int { return murmurFinish(h, len(a.opnds)) } -func (a *OR) Hash() int { - h := murmurInit(41) // Init with a value different from AND - for _, op := range a.opnds { +func (o *OR) Hash() int { + h := murmurInit(41) // Init with o value different from AND + for _, op := range o.opnds { h = murmurUpdate(h, op.Hash()) } - return murmurFinish(h, len(a.opnds)) + return murmurFinish(h, len(o.opnds)) } func (a *AND) String() string { @@ -349,7 +346,7 @@ type OR struct { func NewOR(a, b SemanticContext) *OR { - operands := NewJStore[SemanticContext, Comparator[SemanticContext]](semctxEqInst) + operands := NewJStore[SemanticContext, Comparator[SemanticContext]](semctxEqInst, SemanticContextCollection, "NewOR() operands") if aa, ok := a.(*OR); ok { for _, o := range aa.opnds { operands.Put(o) @@ -382,9 +379,7 @@ func NewOR(a, b SemanticContext) *OR { vs := operands.Values() opnds := make([]SemanticContext, len(vs)) - for i, v := range vs { - opnds[i] = v.(SemanticContext) - } + copy(opnds, vs) o := new(OR) o.opnds = opnds diff --git a/vendor/github.com/antlr4-go/antlr/v4/statistics.go b/vendor/github.com/antlr4-go/antlr/v4/statistics.go new file mode 100644 index 00000000000..70c0673a0f6 --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/statistics.go @@ -0,0 +1,281 @@ +//go:build antlr.stats + +package antlr + +import ( + "fmt" + "log" + "os" + "path/filepath" + "sort" + "strconv" + "sync" +) + +// This file allows the user to collect statistics about the runtime of the ANTLR runtime. It is not enabled by default +// and so incurs no time penalty. To enable it, you must build the runtime with the antlr.stats build tag. +// + +// Tells various components to collect statistics - because it is only true when this file is included, it will +// allow the compiler to completely eliminate all the code that is only used when collecting statistics. +const collectStats = true + +// goRunStats is a collection of all the various data the ANTLR runtime has collected about a particular run. +// It is exported so that it can be used by others to look for things that are not already looked for in the +// runtime statistics. +type goRunStats struct { + + // jStats is a slice of all the [JStatRec] records that have been created, which is one for EVERY collection created + // during a run. It is exported so that it can be used by others to look for things that are not already looked for + // within this package. + // + jStats []*JStatRec + jStatsLock sync.RWMutex + topN int + topNByMax []*JStatRec + topNByUsed []*JStatRec + unusedCollections map[CollectionSource]int + counts map[CollectionSource]int +} + +const ( + collectionsFile = "collections" +) + +var ( + Statistics = &goRunStats{ + topN: 10, + } +) + +type statsOption func(*goRunStats) error + +// Configure allows the statistics system to be configured as the user wants and override the defaults +func (s *goRunStats) Configure(options ...statsOption) error { + for _, option := range options { + err := option(s) + if err != nil { + return err + } + } + return nil +} + +// WithTopN sets the number of things to list in the report when we are concerned with the top N things. +// +// For example, if you want to see the top 20 collections by size, you can do: +// +// antlr.Statistics.Configure(antlr.WithTopN(20)) +func WithTopN(topN int) statsOption { + return func(s *goRunStats) error { + s.topN = topN + return nil + } +} + +// Analyze looks through all the statistical records and computes all the outputs that might be useful to the user. +// +// The function gathers and analyzes a number of statistics about any particular run of +// an ANTLR generated recognizer. In the vast majority of cases, the statistics are only +// useful to maintainers of ANTLR itself, but they can be useful to users as well. They may be +// especially useful in tracking down bugs or performance problems when an ANTLR user could +// supply the output from this package, but cannot supply the grammar file(s) they are using, even +// privately to the maintainers. +// +// The statistics are gathered by the runtime itself, and are not gathered by the parser or lexer, but the user +// must call this function their selves to analyze the statistics. This is because none of the infrastructure is +// extant unless the calling program is built with the antlr.stats tag like so: +// +// go build -tags antlr.stats . +// +// When a program is built with the antlr.stats tag, the Statistics object is created and available outside +// the package. The user can then call the [Statistics.Analyze] function to analyze the statistics and then call the +// [Statistics.Report] function to report the statistics. +// +// Please forward any questions about this package to the ANTLR discussion groups on GitHub or send to them to +// me [Jim Idle] directly at jimi@idle.ws +// +// [Jim Idle]: https:://github.com/jim-idle +func (s *goRunStats) Analyze() { + + // Look for anything that looks strange and record it in our local maps etc for the report to present it + // + s.CollectionAnomalies() + s.TopNCollections() +} + +// TopNCollections looks through all the statistical records and gathers the top ten collections by size. +func (s *goRunStats) TopNCollections() { + + // Let's sort the stat records by MaxSize + // + sort.Slice(s.jStats, func(i, j int) bool { + return s.jStats[i].MaxSize > s.jStats[j].MaxSize + }) + + for i := 0; i < len(s.jStats) && i < s.topN; i++ { + s.topNByMax = append(s.topNByMax, s.jStats[i]) + } + + // Sort by the number of times used + // + sort.Slice(s.jStats, func(i, j int) bool { + return s.jStats[i].Gets+s.jStats[i].Puts > s.jStats[j].Gets+s.jStats[j].Puts + }) + for i := 0; i < len(s.jStats) && i < s.topN; i++ { + s.topNByUsed = append(s.topNByUsed, s.jStats[i]) + } +} + +// Report dumps a markdown formatted report of all the statistics collected during a run to the given dir output +// path, which should represent a directory. Generated files will be prefixed with the given prefix and will be +// given a type name such as `anomalies` and a time stamp such as `2021-09-01T12:34:56` and a .md suffix. +func (s *goRunStats) Report(dir string, prefix string) error { + + isDir, err := isDirectory(dir) + switch { + case err != nil: + return err + case !isDir: + return fmt.Errorf("output directory `%s` is not a directory", dir) + } + s.reportCollections(dir, prefix) + + // Clean out any old data in case the user forgets + // + s.Reset() + return nil +} + +func (s *goRunStats) Reset() { + s.jStats = nil + s.topNByUsed = nil + s.topNByMax = nil +} + +func (s *goRunStats) reportCollections(dir, prefix string) { + cname := filepath.Join(dir, ".asciidoctor") + // If the file doesn't exist, create it, or append to the file + f, err := os.OpenFile(cname, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + log.Fatal(err) + } + _, _ = f.WriteString(`// .asciidoctorconfig +++++ + +++++`) + _ = f.Close() + + fname := filepath.Join(dir, prefix+"_"+"_"+collectionsFile+"_"+".adoc") + // If the file doesn't exist, create it, or append to the file + f, err = os.OpenFile(fname, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + log.Fatal(err) + } + defer func(f *os.File) { + err := f.Close() + if err != nil { + log.Fatal(err) + } + }(f) + _, _ = f.WriteString("= Collections for " + prefix + "\n\n") + + _, _ = f.WriteString("== Summary\n") + + if s.unusedCollections != nil { + _, _ = f.WriteString("=== Unused Collections\n") + _, _ = f.WriteString("Unused collections incur a penalty for allocation that makes them a candidate for either\n") + _, _ = f.WriteString(" removal or optimization. If you are using a collection that is not used, you should\n") + _, _ = f.WriteString(" consider removing it. If you are using a collection that is used, but not very often,\n") + _, _ = f.WriteString(" you should consider using lazy initialization to defer the allocation until it is\n") + _, _ = f.WriteString(" actually needed.\n\n") + + _, _ = f.WriteString("\n.Unused collections\n") + _, _ = f.WriteString(`[cols="<3,>1"]` + "\n\n") + _, _ = f.WriteString("|===\n") + _, _ = f.WriteString("| Type | Count\n") + + for k, v := range s.unusedCollections { + _, _ = f.WriteString("| " + CollectionDescriptors[k].SybolicName + " | " + strconv.Itoa(v) + "\n") + } + f.WriteString("|===\n\n") + } + + _, _ = f.WriteString("\n.Summary of Collections\n") + _, _ = f.WriteString(`[cols="<3,>1"]` + "\n\n") + _, _ = f.WriteString("|===\n") + _, _ = f.WriteString("| Type | Count\n") + for k, v := range s.counts { + _, _ = f.WriteString("| " + CollectionDescriptors[k].SybolicName + " | " + strconv.Itoa(v) + "\n") + } + _, _ = f.WriteString("| Total | " + strconv.Itoa(len(s.jStats)) + "\n") + _, _ = f.WriteString("|===\n\n") + + _, _ = f.WriteString("\n.Summary of Top " + strconv.Itoa(s.topN) + " Collections by MaxSize\n") + _, _ = f.WriteString(`[cols="<1,<3,>1,>1,>1,>1"]` + "\n\n") + _, _ = f.WriteString("|===\n") + _, _ = f.WriteString("| Source | Description | MaxSize | EndSize | Puts | Gets\n") + for _, c := range s.topNByMax { + _, _ = f.WriteString("| " + CollectionDescriptors[c.Source].SybolicName + "\n") + _, _ = f.WriteString("| " + c.Description + "\n") + _, _ = f.WriteString("| " + strconv.Itoa(c.MaxSize) + "\n") + _, _ = f.WriteString("| " + strconv.Itoa(c.CurSize) + "\n") + _, _ = f.WriteString("| " + strconv.Itoa(c.Puts) + "\n") + _, _ = f.WriteString("| " + strconv.Itoa(c.Gets) + "\n") + _, _ = f.WriteString("\n") + } + _, _ = f.WriteString("|===\n\n") + + _, _ = f.WriteString("\n.Summary of Top " + strconv.Itoa(s.topN) + " Collections by Access\n") + _, _ = f.WriteString(`[cols="<1,<3,>1,>1,>1,>1,>1"]` + "\n\n") + _, _ = f.WriteString("|===\n") + _, _ = f.WriteString("| Source | Description | MaxSize | EndSize | Puts | Gets | P+G\n") + for _, c := range s.topNByUsed { + _, _ = f.WriteString("| " + CollectionDescriptors[c.Source].SybolicName + "\n") + _, _ = f.WriteString("| " + c.Description + "\n") + _, _ = f.WriteString("| " + strconv.Itoa(c.MaxSize) + "\n") + _, _ = f.WriteString("| " + strconv.Itoa(c.CurSize) + "\n") + _, _ = f.WriteString("| " + strconv.Itoa(c.Puts) + "\n") + _, _ = f.WriteString("| " + strconv.Itoa(c.Gets) + "\n") + _, _ = f.WriteString("| " + strconv.Itoa(c.Gets+c.Puts) + "\n") + _, _ = f.WriteString("\n") + } + _, _ = f.WriteString("|===\n\n") +} + +// AddJStatRec adds a [JStatRec] record to the [goRunStats] collection when build runtimeConfig antlr.stats is enabled. +func (s *goRunStats) AddJStatRec(rec *JStatRec) { + s.jStatsLock.Lock() + defer s.jStatsLock.Unlock() + s.jStats = append(s.jStats, rec) +} + +// CollectionAnomalies looks through all the statistical records and gathers any anomalies that have been found. +func (s *goRunStats) CollectionAnomalies() { + s.jStatsLock.RLock() + defer s.jStatsLock.RUnlock() + s.counts = make(map[CollectionSource]int, len(s.jStats)) + for _, c := range s.jStats { + + // Accumlate raw counts + // + s.counts[c.Source]++ + + // Look for allocated but unused collections and count them + if c.MaxSize == 0 && c.Puts == 0 { + if s.unusedCollections == nil { + s.unusedCollections = make(map[CollectionSource]int) + } + s.unusedCollections[c.Source]++ + } + if c.MaxSize > 6000 { + fmt.Println("Collection ", c.Description, "accumulated a max size of ", c.MaxSize, " - this is probably too large and indicates a poorly formed grammar") + } + } + +} diff --git a/vendor/github.com/antlr4-go/antlr/v4/stats_data.go b/vendor/github.com/antlr4-go/antlr/v4/stats_data.go new file mode 100644 index 00000000000..4d9eb94e5fa --- /dev/null +++ b/vendor/github.com/antlr4-go/antlr/v4/stats_data.go @@ -0,0 +1,23 @@ +package antlr + +// A JStatRec is a record of a particular use of a [JStore], [JMap] or JPCMap] collection. Typically, it will be +// used to look for unused collections that wre allocated anyway, problems with hash bucket clashes, and anomalies +// such as huge numbers of Gets with no entries found GetNoEnt. You can refer to the CollectionAnomalies() function +// for ideas on what can be gleaned from these statistics about collections. +type JStatRec struct { + Source CollectionSource + MaxSize int + CurSize int + Gets int + GetHits int + GetMisses int + GetHashConflicts int + GetNoEnt int + Puts int + PutHits int + PutMisses int + PutHashConflicts int + MaxSlotSize int + Description string + CreateStack []byte +} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/token.go b/vendor/github.com/antlr4-go/antlr/v4/token.go similarity index 86% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/token.go rename to vendor/github.com/antlr4-go/antlr/v4/token.go index f73b06bc6a0..9670efb829e 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/token.go +++ b/vendor/github.com/antlr4-go/antlr/v4/token.go @@ -35,6 +35,8 @@ type Token interface { GetTokenSource() TokenSource GetInputStream() CharStream + + String() string } type BaseToken struct { @@ -53,7 +55,7 @@ type BaseToken struct { const ( TokenInvalidType = 0 - // During lookahead operations, this "token" signifies we hit rule end ATN state + // TokenEpsilon - during lookahead operations, this "token" signifies we hit the rule end [ATN] state // and did not follow it despite needing to. TokenEpsilon = -2 @@ -61,15 +63,16 @@ const ( TokenEOF = -1 - // All tokens go to the parser (unless Skip() is called in that rule) + // TokenDefaultChannel is the default channel upon which tokens are sent to the parser. + // + // All tokens go to the parser (unless [Skip] is called in the lexer rule) // on a particular "channel". The parser tunes to a particular channel // so that whitespace etc... can go to the parser on a "hidden" channel. - TokenDefaultChannel = 0 - // Anything on different channel than DEFAULT_CHANNEL is not parsed - // by parser. - + // TokenHiddenChannel defines the normal hidden channel - the parser wil not see tokens that are not on [TokenDefaultChannel]. + // + // Anything on a different channel than TokenDefaultChannel is not parsed by parser. TokenHiddenChannel = 1 ) @@ -118,21 +121,22 @@ func (b *BaseToken) GetInputStream() CharStream { } type CommonToken struct { - *BaseToken + BaseToken } func NewCommonToken(source *TokenSourceCharStreamPair, tokenType, channel, start, stop int) *CommonToken { - t := new(CommonToken) - - t.BaseToken = new(BaseToken) + t := &CommonToken{ + BaseToken: BaseToken{ + source: source, + tokenType: tokenType, + channel: channel, + start: start, + stop: stop, + tokenIndex: -1, + }, + } - t.source = source - t.tokenType = tokenType - t.channel = channel - t.start = start - t.stop = stop - t.tokenIndex = -1 if t.source.tokenSource != nil { t.line = source.tokenSource.GetLine() t.column = source.tokenSource.GetCharPositionInLine() diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/token_source.go b/vendor/github.com/antlr4-go/antlr/v4/token_source.go similarity index 100% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/token_source.go rename to vendor/github.com/antlr4-go/antlr/v4/token_source.go diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/token_stream.go b/vendor/github.com/antlr4-go/antlr/v4/token_stream.go similarity index 90% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/token_stream.go rename to vendor/github.com/antlr4-go/antlr/v4/token_stream.go index 1527d43f608..bf4ff6633e8 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/token_stream.go +++ b/vendor/github.com/antlr4-go/antlr/v4/token_stream.go @@ -8,13 +8,14 @@ type TokenStream interface { IntStream LT(k int) Token + Reset() Get(index int) Token GetTokenSource() TokenSource SetTokenSource(TokenSource) GetAllText() string - GetTextFromInterval(*Interval) string + GetTextFromInterval(Interval) string GetTextFromRuleContext(RuleContext) string GetTextFromTokens(Token, Token) string } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/tokenstream_rewriter.go b/vendor/github.com/antlr4-go/antlr/v4/tokenstream_rewriter.go similarity index 73% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/tokenstream_rewriter.go rename to vendor/github.com/antlr4-go/antlr/v4/tokenstream_rewriter.go index b3e38af3445..ccf59b465c5 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/tokenstream_rewriter.go +++ b/vendor/github.com/antlr4-go/antlr/v4/tokenstream_rewriter.go @@ -86,14 +86,15 @@ import ( // first example shows.

const ( - Default_Program_Name = "default" - Program_Init_Size = 100 - Min_Token_Index = 0 + DefaultProgramName = "default" + ProgramInitSize = 100 + MinTokenIndex = 0 ) // Define the rewrite operation hierarchy type RewriteOperation interface { + // Execute the rewrite operation by possibly adding to the buffer. // Return the index of the next token to operate on. Execute(buffer *bytes.Buffer) int @@ -112,19 +113,19 @@ type RewriteOperation interface { type BaseRewriteOperation struct { //Current index of rewrites list - instruction_index int + instructionIndex int //Token buffer index index int //Substitution text text string //Actual operation name - op_name string + opName string //Pointer to token steam tokens TokenStream } func (op *BaseRewriteOperation) GetInstructionIndex() int { - return op.instruction_index + return op.instructionIndex } func (op *BaseRewriteOperation) GetIndex() int { @@ -136,7 +137,7 @@ func (op *BaseRewriteOperation) GetText() string { } func (op *BaseRewriteOperation) GetOpName() string { - return op.op_name + return op.opName } func (op *BaseRewriteOperation) GetTokens() TokenStream { @@ -144,7 +145,7 @@ func (op *BaseRewriteOperation) GetTokens() TokenStream { } func (op *BaseRewriteOperation) SetInstructionIndex(val int) { - op.instruction_index = val + op.instructionIndex = val } func (op *BaseRewriteOperation) SetIndex(val int) { @@ -156,20 +157,20 @@ func (op *BaseRewriteOperation) SetText(val string) { } func (op *BaseRewriteOperation) SetOpName(val string) { - op.op_name = val + op.opName = val } func (op *BaseRewriteOperation) SetTokens(val TokenStream) { op.tokens = val } -func (op *BaseRewriteOperation) Execute(buffer *bytes.Buffer) int { +func (op *BaseRewriteOperation) Execute(_ *bytes.Buffer) int { return op.index } func (op *BaseRewriteOperation) String() string { return fmt.Sprintf("<%s@%d:\"%s\">", - op.op_name, + op.opName, op.tokens.Get(op.GetIndex()), op.text, ) @@ -182,10 +183,10 @@ type InsertBeforeOp struct { func NewInsertBeforeOp(index int, text string, stream TokenStream) *InsertBeforeOp { return &InsertBeforeOp{BaseRewriteOperation: BaseRewriteOperation{ - index: index, - text: text, - op_name: "InsertBeforeOp", - tokens: stream, + index: index, + text: text, + opName: "InsertBeforeOp", + tokens: stream, }} } @@ -201,20 +202,21 @@ func (op *InsertBeforeOp) String() string { return op.BaseRewriteOperation.String() } -// Distinguish between insert after/before to do the "insert afters" -// first and then the "insert befores" at same index. Implementation -// of "insert after" is "insert before index+1". - +// InsertAfterOp distinguishes between insert after/before to do the "insert after" instructions +// first and then the "insert before" instructions at same index. Implementation +// of "insert after" is "insert before index+1". type InsertAfterOp struct { BaseRewriteOperation } func NewInsertAfterOp(index int, text string, stream TokenStream) *InsertAfterOp { - return &InsertAfterOp{BaseRewriteOperation: BaseRewriteOperation{ - index: index + 1, - text: text, - tokens: stream, - }} + return &InsertAfterOp{ + BaseRewriteOperation: BaseRewriteOperation{ + index: index + 1, + text: text, + tokens: stream, + }, + } } func (op *InsertAfterOp) Execute(buffer *bytes.Buffer) int { @@ -229,7 +231,7 @@ func (op *InsertAfterOp) String() string { return op.BaseRewriteOperation.String() } -// I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp +// ReplaceOp tries to replace range from x..y with (y-x)+1 ReplaceOp // instructions. type ReplaceOp struct { BaseRewriteOperation @@ -239,10 +241,10 @@ type ReplaceOp struct { func NewReplaceOp(from, to int, text string, stream TokenStream) *ReplaceOp { return &ReplaceOp{ BaseRewriteOperation: BaseRewriteOperation{ - index: from, - text: text, - op_name: "ReplaceOp", - tokens: stream, + index: from, + text: text, + opName: "ReplaceOp", + tokens: stream, }, LastIndex: to, } @@ -270,17 +272,17 @@ type TokenStreamRewriter struct { // You may have multiple, named streams of rewrite operations. // I'm calling these things "programs." // Maps String (name) → rewrite (List) - programs map[string][]RewriteOperation - last_rewrite_token_indexes map[string]int + programs map[string][]RewriteOperation + lastRewriteTokenIndexes map[string]int } func NewTokenStreamRewriter(tokens TokenStream) *TokenStreamRewriter { return &TokenStreamRewriter{ tokens: tokens, programs: map[string][]RewriteOperation{ - Default_Program_Name: make([]RewriteOperation, 0, Program_Init_Size), + DefaultProgramName: make([]RewriteOperation, 0, ProgramInitSize), }, - last_rewrite_token_indexes: map[string]int{}, + lastRewriteTokenIndexes: map[string]int{}, } } @@ -291,110 +293,110 @@ func (tsr *TokenStreamRewriter) GetTokenStream() TokenStream { // Rollback the instruction stream for a program so that // the indicated instruction (via instructionIndex) is no // longer in the stream. UNTESTED! -func (tsr *TokenStreamRewriter) Rollback(program_name string, instruction_index int) { - is, ok := tsr.programs[program_name] +func (tsr *TokenStreamRewriter) Rollback(programName string, instructionIndex int) { + is, ok := tsr.programs[programName] if ok { - tsr.programs[program_name] = is[Min_Token_Index:instruction_index] + tsr.programs[programName] = is[MinTokenIndex:instructionIndex] } } -func (tsr *TokenStreamRewriter) RollbackDefault(instruction_index int) { - tsr.Rollback(Default_Program_Name, instruction_index) +func (tsr *TokenStreamRewriter) RollbackDefault(instructionIndex int) { + tsr.Rollback(DefaultProgramName, instructionIndex) } -// Reset the program so that no instructions exist -func (tsr *TokenStreamRewriter) DeleteProgram(program_name string) { - tsr.Rollback(program_name, Min_Token_Index) //TODO: double test on that cause lower bound is not included +// DeleteProgram Reset the program so that no instructions exist +func (tsr *TokenStreamRewriter) DeleteProgram(programName string) { + tsr.Rollback(programName, MinTokenIndex) //TODO: double test on that cause lower bound is not included } func (tsr *TokenStreamRewriter) DeleteProgramDefault() { - tsr.DeleteProgram(Default_Program_Name) + tsr.DeleteProgram(DefaultProgramName) } -func (tsr *TokenStreamRewriter) InsertAfter(program_name string, index int, text string) { +func (tsr *TokenStreamRewriter) InsertAfter(programName string, index int, text string) { // to insert after, just insert before next index (even if past end) var op RewriteOperation = NewInsertAfterOp(index, text, tsr.tokens) - rewrites := tsr.GetProgram(program_name) + rewrites := tsr.GetProgram(programName) op.SetInstructionIndex(len(rewrites)) - tsr.AddToProgram(program_name, op) + tsr.AddToProgram(programName, op) } func (tsr *TokenStreamRewriter) InsertAfterDefault(index int, text string) { - tsr.InsertAfter(Default_Program_Name, index, text) + tsr.InsertAfter(DefaultProgramName, index, text) } -func (tsr *TokenStreamRewriter) InsertAfterToken(program_name string, token Token, text string) { - tsr.InsertAfter(program_name, token.GetTokenIndex(), text) +func (tsr *TokenStreamRewriter) InsertAfterToken(programName string, token Token, text string) { + tsr.InsertAfter(programName, token.GetTokenIndex(), text) } -func (tsr *TokenStreamRewriter) InsertBefore(program_name string, index int, text string) { +func (tsr *TokenStreamRewriter) InsertBefore(programName string, index int, text string) { var op RewriteOperation = NewInsertBeforeOp(index, text, tsr.tokens) - rewrites := tsr.GetProgram(program_name) + rewrites := tsr.GetProgram(programName) op.SetInstructionIndex(len(rewrites)) - tsr.AddToProgram(program_name, op) + tsr.AddToProgram(programName, op) } func (tsr *TokenStreamRewriter) InsertBeforeDefault(index int, text string) { - tsr.InsertBefore(Default_Program_Name, index, text) + tsr.InsertBefore(DefaultProgramName, index, text) } -func (tsr *TokenStreamRewriter) InsertBeforeToken(program_name string, token Token, text string) { - tsr.InsertBefore(program_name, token.GetTokenIndex(), text) +func (tsr *TokenStreamRewriter) InsertBeforeToken(programName string, token Token, text string) { + tsr.InsertBefore(programName, token.GetTokenIndex(), text) } -func (tsr *TokenStreamRewriter) Replace(program_name string, from, to int, text string) { +func (tsr *TokenStreamRewriter) Replace(programName string, from, to int, text string) { if from > to || from < 0 || to < 0 || to >= tsr.tokens.Size() { panic(fmt.Sprintf("replace: range invalid: %d..%d(size=%d)", from, to, tsr.tokens.Size())) } var op RewriteOperation = NewReplaceOp(from, to, text, tsr.tokens) - rewrites := tsr.GetProgram(program_name) + rewrites := tsr.GetProgram(programName) op.SetInstructionIndex(len(rewrites)) - tsr.AddToProgram(program_name, op) + tsr.AddToProgram(programName, op) } func (tsr *TokenStreamRewriter) ReplaceDefault(from, to int, text string) { - tsr.Replace(Default_Program_Name, from, to, text) + tsr.Replace(DefaultProgramName, from, to, text) } func (tsr *TokenStreamRewriter) ReplaceDefaultPos(index int, text string) { tsr.ReplaceDefault(index, index, text) } -func (tsr *TokenStreamRewriter) ReplaceToken(program_name string, from, to Token, text string) { - tsr.Replace(program_name, from.GetTokenIndex(), to.GetTokenIndex(), text) +func (tsr *TokenStreamRewriter) ReplaceToken(programName string, from, to Token, text string) { + tsr.Replace(programName, from.GetTokenIndex(), to.GetTokenIndex(), text) } func (tsr *TokenStreamRewriter) ReplaceTokenDefault(from, to Token, text string) { - tsr.ReplaceToken(Default_Program_Name, from, to, text) + tsr.ReplaceToken(DefaultProgramName, from, to, text) } func (tsr *TokenStreamRewriter) ReplaceTokenDefaultPos(index Token, text string) { tsr.ReplaceTokenDefault(index, index, text) } -func (tsr *TokenStreamRewriter) Delete(program_name string, from, to int) { - tsr.Replace(program_name, from, to, "") +func (tsr *TokenStreamRewriter) Delete(programName string, from, to int) { + tsr.Replace(programName, from, to, "") } func (tsr *TokenStreamRewriter) DeleteDefault(from, to int) { - tsr.Delete(Default_Program_Name, from, to) + tsr.Delete(DefaultProgramName, from, to) } func (tsr *TokenStreamRewriter) DeleteDefaultPos(index int) { tsr.DeleteDefault(index, index) } -func (tsr *TokenStreamRewriter) DeleteToken(program_name string, from, to Token) { - tsr.ReplaceToken(program_name, from, to, "") +func (tsr *TokenStreamRewriter) DeleteToken(programName string, from, to Token) { + tsr.ReplaceToken(programName, from, to, "") } func (tsr *TokenStreamRewriter) DeleteTokenDefault(from, to Token) { - tsr.DeleteToken(Default_Program_Name, from, to) + tsr.DeleteToken(DefaultProgramName, from, to) } -func (tsr *TokenStreamRewriter) GetLastRewriteTokenIndex(program_name string) int { - i, ok := tsr.last_rewrite_token_indexes[program_name] +func (tsr *TokenStreamRewriter) GetLastRewriteTokenIndex(programName string) int { + i, ok := tsr.lastRewriteTokenIndexes[programName] if !ok { return -1 } @@ -402,15 +404,15 @@ func (tsr *TokenStreamRewriter) GetLastRewriteTokenIndex(program_name string) in } func (tsr *TokenStreamRewriter) GetLastRewriteTokenIndexDefault() int { - return tsr.GetLastRewriteTokenIndex(Default_Program_Name) + return tsr.GetLastRewriteTokenIndex(DefaultProgramName) } -func (tsr *TokenStreamRewriter) SetLastRewriteTokenIndex(program_name string, i int) { - tsr.last_rewrite_token_indexes[program_name] = i +func (tsr *TokenStreamRewriter) SetLastRewriteTokenIndex(programName string, i int) { + tsr.lastRewriteTokenIndexes[programName] = i } func (tsr *TokenStreamRewriter) InitializeProgram(name string) []RewriteOperation { - is := make([]RewriteOperation, 0, Program_Init_Size) + is := make([]RewriteOperation, 0, ProgramInitSize) tsr.programs[name] = is return is } @@ -429,24 +431,24 @@ func (tsr *TokenStreamRewriter) GetProgram(name string) []RewriteOperation { return is } -// Return the text from the original tokens altered per the +// GetTextDefault returns the text from the original tokens altered per the // instructions given to this rewriter. func (tsr *TokenStreamRewriter) GetTextDefault() string { return tsr.GetText( - Default_Program_Name, + DefaultProgramName, NewInterval(0, tsr.tokens.Size()-1)) } -// Return the text from the original tokens altered per the +// GetText returns the text from the original tokens altered per the // instructions given to this rewriter. -func (tsr *TokenStreamRewriter) GetText(program_name string, interval *Interval) string { - rewrites := tsr.programs[program_name] +func (tsr *TokenStreamRewriter) GetText(programName string, interval Interval) string { + rewrites := tsr.programs[programName] start := interval.Start stop := interval.Stop // ensure start/end are in range stop = min(stop, tsr.tokens.Size()-1) start = max(start, 0) - if rewrites == nil || len(rewrites) == 0 { + if len(rewrites) == 0 { return tsr.tokens.GetTextFromInterval(interval) // no instructions to execute } buf := bytes.Buffer{} @@ -482,11 +484,13 @@ func (tsr *TokenStreamRewriter) GetText(program_name string, interval *Interval) return buf.String() } -// We need to combine operations and report invalid operations (like -// overlapping replaces that are not completed nested). Inserts to -// same index need to be combined etc... Here are the cases: +// reduceToSingleOperationPerIndex combines operations and report invalid operations (like +// overlapping replaces that are not completed nested). Inserts to +// same index need to be combined etc... +// +// Here are the cases: // -// I.i.u I.j.v leave alone, nonoverlapping +// I.i.u I.j.v leave alone, non-overlapping // I.i.u I.i.v combine: Iivu // // R.i-j.u R.x-y.v | i-j in x-y delete first R @@ -498,38 +502,38 @@ func (tsr *TokenStreamRewriter) GetText(program_name string, interval *Interval) // D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) // // I.i.u R.x-y.v | i in (x+1)-y delete I (since insert before -// we're not deleting i) -// I.i.u R.x-y.v | i not in (x+1)-y leave alone, nonoverlapping +// we're not deleting i) +// I.i.u R.x-y.v | i not in (x+1)-y leave alone, non-overlapping // R.x-y.v I.i.u | i in x-y ERROR // R.x-y.v I.x.u R.x-y.uv (combine, delete I) -// R.x-y.v I.i.u | i not in x-y leave alone, nonoverlapping +// R.x-y.v I.i.u | i not in x-y leave alone, non-overlapping // // I.i.u = insert u before op @ index i // R.x-y.u = replace x-y indexed tokens with u // -// First we need to examine replaces. For any replace op: +// First we need to examine replaces. For any replace op: // -// 1. wipe out any insertions before op within that range. -// 2. Drop any replace op before that is contained completely within -// that range. -// 3. Throw exception upon boundary overlap with any previous replace. +// 1. wipe out any insertions before op within that range. +// 2. Drop any replace op before that is contained completely within +// that range. +// 3. Throw exception upon boundary overlap with any previous replace. // -// Then we can deal with inserts: +// Then we can deal with inserts: // -// 1. for any inserts to same index, combine even if not adjacent. -// 2. for any prior replace with same left boundary, combine this -// insert with replace and delete this replace. -// 3. throw exception if index in same range as previous replace +// 1. for any inserts to same index, combine even if not adjacent. +// 2. for any prior replace with same left boundary, combine this +// insert with replace and delete this 'replace'. +// 3. throw exception if index in same range as previous replace // -// Don't actually delete; make op null in list. Easier to walk list. -// Later we can throw as we add to index → op map. +// Don't actually delete; make op null in list. Easier to walk list. +// Later we can throw as we add to index → op map. // -// Note that I.2 R.2-2 will wipe out I.2 even though, technically, the -// inserted stuff would be before the replace range. But, if you -// add tokens in front of a method body '{' and then delete the method -// body, I think the stuff before the '{' you added should disappear too. +// Note that I.2 R.2-2 will wipe out I.2 even though, technically, the +// inserted stuff would be before the 'replace' range. But, if you +// add tokens in front of a method body '{' and then delete the method +// body, I think the stuff before the '{' you added should disappear too. // -// Return a map from token index to operation. +// The func returns a map from token index to operation. func reduceToSingleOperationPerIndex(rewrites []RewriteOperation) map[int]RewriteOperation { // WALK REPLACES for i := 0; i < len(rewrites); i++ { @@ -547,7 +551,7 @@ func reduceToSingleOperationPerIndex(rewrites []RewriteOperation) map[int]Rewrit if iop.index == rop.index { // E.g., insert before 2, delete 2..2; update replace // text to include insert before, kill insert - rewrites[iop.instruction_index] = nil + rewrites[iop.instructionIndex] = nil if rop.text != "" { rop.text = iop.text + rop.text } else { @@ -555,7 +559,7 @@ func reduceToSingleOperationPerIndex(rewrites []RewriteOperation) map[int]Rewrit } } else if iop.index > rop.index && iop.index <= rop.LastIndex { // delete insert as it's a no-op. - rewrites[iop.instruction_index] = nil + rewrites[iop.instructionIndex] = nil } } } @@ -564,7 +568,7 @@ func reduceToSingleOperationPerIndex(rewrites []RewriteOperation) map[int]Rewrit if prevop, ok := rewrites[j].(*ReplaceOp); ok { if prevop.index >= rop.index && prevop.LastIndex <= rop.LastIndex { // delete replace as it's a no-op. - rewrites[prevop.instruction_index] = nil + rewrites[prevop.instructionIndex] = nil continue } // throw exception unless disjoint or identical @@ -572,10 +576,9 @@ func reduceToSingleOperationPerIndex(rewrites []RewriteOperation) map[int]Rewrit // Delete special case of replace (text==null): // D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) if prevop.text == "" && rop.text == "" && !disjoint { - rewrites[prevop.instruction_index] = nil + rewrites[prevop.instructionIndex] = nil rop.index = min(prevop.index, rop.index) rop.LastIndex = max(prevop.LastIndex, rop.LastIndex) - println("new rop" + rop.String()) //TODO: remove console write, taken from Java version } else if !disjoint { panic("replace op boundaries of " + rop.String() + " overlap with previous " + prevop.String()) } @@ -607,7 +610,7 @@ func reduceToSingleOperationPerIndex(rewrites []RewriteOperation) map[int]Rewrit if prevIop, ok := rewrites[j].(*InsertBeforeOp); ok { if prevIop.index == iop.GetIndex() { iop.SetText(iop.GetText() + prevIop.text) - rewrites[prevIop.instruction_index] = nil + rewrites[prevIop.instructionIndex] = nil } } } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/trace_listener.go b/vendor/github.com/antlr4-go/antlr/v4/trace_listener.go similarity index 100% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/trace_listener.go rename to vendor/github.com/antlr4-go/antlr/v4/trace_listener.go diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/transition.go b/vendor/github.com/antlr4-go/antlr/v4/transition.go similarity index 67% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/transition.go rename to vendor/github.com/antlr4-go/antlr/v4/transition.go index 36be4f73310..313b0fc127f 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/transition.go +++ b/vendor/github.com/antlr4-go/antlr/v4/transition.go @@ -72,7 +72,7 @@ func (t *BaseTransition) getSerializationType() int { return t.serializationType } -func (t *BaseTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { +func (t *BaseTransition) Matches(_, _, _ int) bool { panic("Not implemented") } @@ -89,6 +89,7 @@ const ( TransitionPRECEDENCE = 10 ) +//goland:noinspection GoUnusedGlobalVariable var TransitionserializationNames = []string{ "INVALID", "EPSILON", @@ -127,19 +128,22 @@ var TransitionserializationNames = []string{ // TransitionPRECEDENCE //} +// AtomTransition // TODO: make all transitions sets? no, should remove set edges type AtomTransition struct { - *BaseTransition + BaseTransition } func NewAtomTransition(target ATNState, intervalSet int) *AtomTransition { - - t := new(AtomTransition) - t.BaseTransition = NewBaseTransition(target) - - t.label = intervalSet // The token type or character value or, signifies special intervalSet. + t := &AtomTransition{ + BaseTransition: BaseTransition{ + target: target, + serializationType: TransitionATOM, + label: intervalSet, + isEpsilon: false, + }, + } t.intervalSet = t.makeLabel() - t.serializationType = TransitionATOM return t } @@ -150,7 +154,7 @@ func (t *AtomTransition) makeLabel() *IntervalSet { return s } -func (t *AtomTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { +func (t *AtomTransition) Matches(symbol, _, _ int) bool { return t.label == symbol } @@ -159,48 +163,45 @@ func (t *AtomTransition) String() string { } type RuleTransition struct { - *BaseTransition - + BaseTransition followState ATNState ruleIndex, precedence int } func NewRuleTransition(ruleStart ATNState, ruleIndex, precedence int, followState ATNState) *RuleTransition { - - t := new(RuleTransition) - t.BaseTransition = NewBaseTransition(ruleStart) - - t.ruleIndex = ruleIndex - t.precedence = precedence - t.followState = followState - t.serializationType = TransitionRULE - t.isEpsilon = true - - return t + return &RuleTransition{ + BaseTransition: BaseTransition{ + target: ruleStart, + isEpsilon: true, + serializationType: TransitionRULE, + }, + ruleIndex: ruleIndex, + precedence: precedence, + followState: followState, + } } -func (t *RuleTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { +func (t *RuleTransition) Matches(_, _, _ int) bool { return false } type EpsilonTransition struct { - *BaseTransition - + BaseTransition outermostPrecedenceReturn int } func NewEpsilonTransition(target ATNState, outermostPrecedenceReturn int) *EpsilonTransition { - - t := new(EpsilonTransition) - t.BaseTransition = NewBaseTransition(target) - - t.serializationType = TransitionEPSILON - t.isEpsilon = true - t.outermostPrecedenceReturn = outermostPrecedenceReturn - return t + return &EpsilonTransition{ + BaseTransition: BaseTransition{ + target: target, + serializationType: TransitionEPSILON, + isEpsilon: true, + }, + outermostPrecedenceReturn: outermostPrecedenceReturn, + } } -func (t *EpsilonTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { +func (t *EpsilonTransition) Matches(_, _, _ int) bool { return false } @@ -209,19 +210,20 @@ func (t *EpsilonTransition) String() string { } type RangeTransition struct { - *BaseTransition - + BaseTransition start, stop int } func NewRangeTransition(target ATNState, start, stop int) *RangeTransition { - - t := new(RangeTransition) - t.BaseTransition = NewBaseTransition(target) - - t.serializationType = TransitionRANGE - t.start = start - t.stop = stop + t := &RangeTransition{ + BaseTransition: BaseTransition{ + target: target, + serializationType: TransitionRANGE, + isEpsilon: false, + }, + start: start, + stop: stop, + } t.intervalSet = t.makeLabel() return t } @@ -232,7 +234,7 @@ func (t *RangeTransition) makeLabel() *IntervalSet { return s } -func (t *RangeTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { +func (t *RangeTransition) Matches(symbol, _, _ int) bool { return symbol >= t.start && symbol <= t.stop } @@ -252,40 +254,41 @@ type AbstractPredicateTransition interface { } type BaseAbstractPredicateTransition struct { - *BaseTransition + BaseTransition } func NewBasePredicateTransition(target ATNState) *BaseAbstractPredicateTransition { - - t := new(BaseAbstractPredicateTransition) - t.BaseTransition = NewBaseTransition(target) - - return t + return &BaseAbstractPredicateTransition{ + BaseTransition: BaseTransition{ + target: target, + }, + } } func (a *BaseAbstractPredicateTransition) IAbstractPredicateTransitionFoo() {} type PredicateTransition struct { - *BaseAbstractPredicateTransition - + BaseAbstractPredicateTransition isCtxDependent bool ruleIndex, predIndex int } func NewPredicateTransition(target ATNState, ruleIndex, predIndex int, isCtxDependent bool) *PredicateTransition { - - t := new(PredicateTransition) - t.BaseAbstractPredicateTransition = NewBasePredicateTransition(target) - - t.serializationType = TransitionPREDICATE - t.ruleIndex = ruleIndex - t.predIndex = predIndex - t.isCtxDependent = isCtxDependent // e.g., $i ref in pred - t.isEpsilon = true - return t + return &PredicateTransition{ + BaseAbstractPredicateTransition: BaseAbstractPredicateTransition{ + BaseTransition: BaseTransition{ + target: target, + serializationType: TransitionPREDICATE, + isEpsilon: true, + }, + }, + isCtxDependent: isCtxDependent, + ruleIndex: ruleIndex, + predIndex: predIndex, + } } -func (t *PredicateTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { +func (t *PredicateTransition) Matches(_, _, _ int) bool { return false } @@ -298,26 +301,25 @@ func (t *PredicateTransition) String() string { } type ActionTransition struct { - *BaseTransition - + BaseTransition isCtxDependent bool ruleIndex, actionIndex, predIndex int } func NewActionTransition(target ATNState, ruleIndex, actionIndex int, isCtxDependent bool) *ActionTransition { - - t := new(ActionTransition) - t.BaseTransition = NewBaseTransition(target) - - t.serializationType = TransitionACTION - t.ruleIndex = ruleIndex - t.actionIndex = actionIndex - t.isCtxDependent = isCtxDependent // e.g., $i ref in pred - t.isEpsilon = true - return t + return &ActionTransition{ + BaseTransition: BaseTransition{ + target: target, + serializationType: TransitionACTION, + isEpsilon: true, + }, + isCtxDependent: isCtxDependent, + ruleIndex: ruleIndex, + actionIndex: actionIndex, + } } -func (t *ActionTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { +func (t *ActionTransition) Matches(_, _, _ int) bool { return false } @@ -326,26 +328,27 @@ func (t *ActionTransition) String() string { } type SetTransition struct { - *BaseTransition + BaseTransition } func NewSetTransition(target ATNState, set *IntervalSet) *SetTransition { + t := &SetTransition{ + BaseTransition: BaseTransition{ + target: target, + serializationType: TransitionSET, + }, + } - t := new(SetTransition) - t.BaseTransition = NewBaseTransition(target) - - t.serializationType = TransitionSET if set != nil { t.intervalSet = set } else { t.intervalSet = NewIntervalSet() t.intervalSet.addOne(TokenInvalidType) } - return t } -func (t *SetTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { +func (t *SetTransition) Matches(symbol, _, _ int) bool { return t.intervalSet.contains(symbol) } @@ -354,16 +357,24 @@ func (t *SetTransition) String() string { } type NotSetTransition struct { - *SetTransition + SetTransition } func NewNotSetTransition(target ATNState, set *IntervalSet) *NotSetTransition { - - t := new(NotSetTransition) - - t.SetTransition = NewSetTransition(target, set) - - t.serializationType = TransitionNOTSET + t := &NotSetTransition{ + SetTransition: SetTransition{ + BaseTransition: BaseTransition{ + target: target, + serializationType: TransitionNOTSET, + }, + }, + } + if set != nil { + t.intervalSet = set + } else { + t.intervalSet = NewIntervalSet() + t.intervalSet.addOne(TokenInvalidType) + } return t } @@ -377,16 +388,16 @@ func (t *NotSetTransition) String() string { } type WildcardTransition struct { - *BaseTransition + BaseTransition } func NewWildcardTransition(target ATNState) *WildcardTransition { - - t := new(WildcardTransition) - t.BaseTransition = NewBaseTransition(target) - - t.serializationType = TransitionWILDCARD - return t + return &WildcardTransition{ + BaseTransition: BaseTransition{ + target: target, + serializationType: TransitionWILDCARD, + }, + } } func (t *WildcardTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { @@ -398,24 +409,24 @@ func (t *WildcardTransition) String() string { } type PrecedencePredicateTransition struct { - *BaseAbstractPredicateTransition - + BaseAbstractPredicateTransition precedence int } func NewPrecedencePredicateTransition(target ATNState, precedence int) *PrecedencePredicateTransition { - - t := new(PrecedencePredicateTransition) - t.BaseAbstractPredicateTransition = NewBasePredicateTransition(target) - - t.serializationType = TransitionPRECEDENCE - t.precedence = precedence - t.isEpsilon = true - - return t + return &PrecedencePredicateTransition{ + BaseAbstractPredicateTransition: BaseAbstractPredicateTransition{ + BaseTransition: BaseTransition{ + target: target, + serializationType: TransitionPRECEDENCE, + isEpsilon: true, + }, + }, + precedence: precedence, + } } -func (t *PrecedencePredicateTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { +func (t *PrecedencePredicateTransition) Matches(_, _, _ int) bool { return false } diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/tree.go b/vendor/github.com/antlr4-go/antlr/v4/tree.go similarity index 62% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/tree.go rename to vendor/github.com/antlr4-go/antlr/v4/tree.go index 85b4f137b5a..c288420fb20 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/tree.go +++ b/vendor/github.com/antlr4-go/antlr/v4/tree.go @@ -21,29 +21,23 @@ type Tree interface { type SyntaxTree interface { Tree - - GetSourceInterval() *Interval + GetSourceInterval() Interval } type ParseTree interface { SyntaxTree - Accept(Visitor ParseTreeVisitor) interface{} GetText() string - ToStringTree([]string, Recognizer) string } type RuleNode interface { ParseTree - GetRuleContext() RuleContext - GetBaseRuleContext() *BaseRuleContext } type TerminalNode interface { ParseTree - GetSymbol() Token } @@ -64,12 +58,12 @@ type BaseParseTreeVisitor struct{} var _ ParseTreeVisitor = &BaseParseTreeVisitor{} -func (v *BaseParseTreeVisitor) Visit(tree ParseTree) interface{} { return tree.Accept(v) } -func (v *BaseParseTreeVisitor) VisitChildren(node RuleNode) interface{} { return nil } -func (v *BaseParseTreeVisitor) VisitTerminal(node TerminalNode) interface{} { return nil } -func (v *BaseParseTreeVisitor) VisitErrorNode(node ErrorNode) interface{} { return nil } +func (v *BaseParseTreeVisitor) Visit(tree ParseTree) interface{} { return tree.Accept(v) } +func (v *BaseParseTreeVisitor) VisitChildren(_ RuleNode) interface{} { return nil } +func (v *BaseParseTreeVisitor) VisitTerminal(_ TerminalNode) interface{} { return nil } +func (v *BaseParseTreeVisitor) VisitErrorNode(_ ErrorNode) interface{} { return nil } -// TODO +// TODO: Implement this? //func (this ParseTreeVisitor) Visit(ctx) { // if (Utils.isArray(ctx)) { // self := this @@ -101,15 +95,14 @@ type BaseParseTreeListener struct{} var _ ParseTreeListener = &BaseParseTreeListener{} -func (l *BaseParseTreeListener) VisitTerminal(node TerminalNode) {} -func (l *BaseParseTreeListener) VisitErrorNode(node ErrorNode) {} -func (l *BaseParseTreeListener) EnterEveryRule(ctx ParserRuleContext) {} -func (l *BaseParseTreeListener) ExitEveryRule(ctx ParserRuleContext) {} +func (l *BaseParseTreeListener) VisitTerminal(_ TerminalNode) {} +func (l *BaseParseTreeListener) VisitErrorNode(_ ErrorNode) {} +func (l *BaseParseTreeListener) EnterEveryRule(_ ParserRuleContext) {} +func (l *BaseParseTreeListener) ExitEveryRule(_ ParserRuleContext) {} type TerminalNodeImpl struct { parentCtx RuleContext - - symbol Token + symbol Token } var _ TerminalNode = &TerminalNodeImpl{} @@ -123,7 +116,7 @@ func NewTerminalNodeImpl(symbol Token) *TerminalNodeImpl { return tn } -func (t *TerminalNodeImpl) GetChild(i int) Tree { +func (t *TerminalNodeImpl) GetChild(_ int) Tree { return nil } @@ -131,7 +124,7 @@ func (t *TerminalNodeImpl) GetChildren() []Tree { return nil } -func (t *TerminalNodeImpl) SetChildren(tree []Tree) { +func (t *TerminalNodeImpl) SetChildren(_ []Tree) { panic("Cannot set children on terminal node") } @@ -151,7 +144,7 @@ func (t *TerminalNodeImpl) GetPayload() interface{} { return t.symbol } -func (t *TerminalNodeImpl) GetSourceInterval() *Interval { +func (t *TerminalNodeImpl) GetSourceInterval() Interval { if t.symbol == nil { return TreeInvalidInterval } @@ -179,7 +172,7 @@ func (t *TerminalNodeImpl) String() string { return t.symbol.GetText() } -func (t *TerminalNodeImpl) ToStringTree(s []string, r Recognizer) string { +func (t *TerminalNodeImpl) ToStringTree(_ []string, _ Recognizer) string { return t.String() } @@ -214,10 +207,9 @@ func NewParseTreeWalker() *ParseTreeWalker { return new(ParseTreeWalker) } -// Performs a walk on the given parse tree starting at the root and going down recursively -// with depth-first search. On each node, EnterRule is called before -// recursively walking down into child nodes, then -// ExitRule is called after the recursive call to wind up. +// Walk performs a walk on the given parse tree starting at the root and going down recursively +// with depth-first search. On each node, [EnterRule] is called before +// recursively walking down into child nodes, then [ExitRule] is called after the recursive call to wind up. func (p *ParseTreeWalker) Walk(listener ParseTreeListener, t Tree) { switch tt := t.(type) { case ErrorNode: @@ -234,7 +226,7 @@ func (p *ParseTreeWalker) Walk(listener ParseTreeListener, t Tree) { } } -// Enters a grammar rule by first triggering the generic event {@link ParseTreeListener//EnterEveryRule} +// EnterRule enters a grammar rule by first triggering the generic event [ParseTreeListener].[EnterEveryRule] // then by triggering the event specific to the given parse tree node func (p *ParseTreeWalker) EnterRule(listener ParseTreeListener, r RuleNode) { ctx := r.GetRuleContext().(ParserRuleContext) @@ -242,12 +234,71 @@ func (p *ParseTreeWalker) EnterRule(listener ParseTreeListener, r RuleNode) { ctx.EnterRule(listener) } -// Exits a grammar rule by first triggering the event specific to the given parse tree node -// then by triggering the generic event {@link ParseTreeListener//ExitEveryRule} +// ExitRule exits a grammar rule by first triggering the event specific to the given parse tree node +// then by triggering the generic event [ParseTreeListener].ExitEveryRule func (p *ParseTreeWalker) ExitRule(listener ParseTreeListener, r RuleNode) { ctx := r.GetRuleContext().(ParserRuleContext) ctx.ExitRule(listener) listener.ExitEveryRule(ctx) } +//goland:noinspection GoUnusedGlobalVariable var ParseTreeWalkerDefault = NewParseTreeWalker() + +type IterativeParseTreeWalker struct { + *ParseTreeWalker +} + +//goland:noinspection GoUnusedExportedFunction +func NewIterativeParseTreeWalker() *IterativeParseTreeWalker { + return new(IterativeParseTreeWalker) +} + +func (i *IterativeParseTreeWalker) Walk(listener ParseTreeListener, t Tree) { + var stack []Tree + var indexStack []int + currentNode := t + currentIndex := 0 + + for currentNode != nil { + // pre-order visit + switch tt := currentNode.(type) { + case ErrorNode: + listener.VisitErrorNode(tt) + case TerminalNode: + listener.VisitTerminal(tt) + default: + i.EnterRule(listener, currentNode.(RuleNode)) + } + // Move down to first child, if exists + if currentNode.GetChildCount() > 0 { + stack = append(stack, currentNode) + indexStack = append(indexStack, currentIndex) + currentIndex = 0 + currentNode = currentNode.GetChild(0) + continue + } + + for { + // post-order visit + if ruleNode, ok := currentNode.(RuleNode); ok { + i.ExitRule(listener, ruleNode) + } + // No parent, so no siblings + if len(stack) == 0 { + currentNode = nil + currentIndex = 0 + break + } + // Move to next sibling if possible + currentIndex++ + if stack[len(stack)-1].GetChildCount() > currentIndex { + currentNode = stack[len(stack)-1].GetChild(currentIndex) + break + } + // No next, sibling, so move up + currentNode, stack = stack[len(stack)-1], stack[:len(stack)-1] + currentIndex, indexStack = indexStack[len(indexStack)-1], indexStack[:len(indexStack)-1] + } + } +} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/trees.go b/vendor/github.com/antlr4-go/antlr/v4/trees.go similarity index 81% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/trees.go rename to vendor/github.com/antlr4-go/antlr/v4/trees.go index d7dbb032282..f44c05d8111 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/trees.go +++ b/vendor/github.com/antlr4-go/antlr/v4/trees.go @@ -8,10 +8,8 @@ import "fmt" /** A set of utility routines useful for all kinds of ANTLR trees. */ -// Print out a whole tree in LISP form. {@link //getNodeText} is used on the -// -// node payloads to get the text for the nodes. Detect -// parse trees and extract data appropriately. +// TreesStringTree prints out a whole tree in LISP form. [getNodeText] is used on the +// node payloads to get the text for the nodes. Detects parse trees and extracts data appropriately. func TreesStringTree(tree Tree, ruleNames []string, recog Recognizer) string { if recog != nil { @@ -32,7 +30,7 @@ func TreesStringTree(tree Tree, ruleNames []string, recog Recognizer) string { } for i := 1; i < c; i++ { s = TreesStringTree(tree.GetChild(i), ruleNames, nil) - res += (" " + s) + res += " " + s } res += ")" return res @@ -62,7 +60,7 @@ func TreesGetNodeText(t Tree, ruleNames []string, recog Parser) string { } } - // no recog for rule names + // no recognition for rule names payload := t.GetPayload() if p2, ok := payload.(Token); ok { return p2.GetText() @@ -71,7 +69,9 @@ func TreesGetNodeText(t Tree, ruleNames []string, recog Parser) string { return fmt.Sprint(t.GetPayload()) } -// Return ordered list of all children of this node +// TreesGetChildren returns am ordered list of all children of this node +// +//goland:noinspection GoUnusedExportedFunction func TreesGetChildren(t Tree) []Tree { list := make([]Tree, 0) for i := 0; i < t.GetChildCount(); i++ { @@ -80,9 +80,10 @@ func TreesGetChildren(t Tree) []Tree { return list } -// Return a list of all ancestors of this node. The first node of +// TreesgetAncestors returns a list of all ancestors of this node. The first node of list is the root +// and the last node is the parent of this node. // -// list is the root and the last is the parent of this node. +//goland:noinspection GoUnusedExportedFunction func TreesgetAncestors(t Tree) []Tree { ancestors := make([]Tree, 0) t = t.GetParent() @@ -94,10 +95,12 @@ func TreesgetAncestors(t Tree) []Tree { return ancestors } +//goland:noinspection GoUnusedExportedFunction func TreesFindAllTokenNodes(t ParseTree, ttype int) []ParseTree { return TreesfindAllNodes(t, ttype, true) } +//goland:noinspection GoUnusedExportedFunction func TreesfindAllRuleNodes(t ParseTree, ruleIndex int) []ParseTree { return TreesfindAllNodes(t, ruleIndex, false) } @@ -129,6 +132,7 @@ func treesFindAllNodes(t ParseTree, index int, findTokens bool, nodes *[]ParseTr } } +//goland:noinspection GoUnusedExportedFunction func TreesDescendants(t ParseTree) []ParseTree { nodes := []ParseTree{t} for i := 0; i < t.GetChildCount(); i++ { diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/utils.go b/vendor/github.com/antlr4-go/antlr/v4/utils.go similarity index 85% rename from vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/utils.go rename to vendor/github.com/antlr4-go/antlr/v4/utils.go index 9fad5d916bc..733d7df9dc7 100644 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/v4/utils.go +++ b/vendor/github.com/antlr4-go/antlr/v4/utils.go @@ -9,8 +9,10 @@ import ( "errors" "fmt" "math/bits" + "os" "strconv" "strings" + "syscall" ) func intMin(a, b int) int { @@ -31,7 +33,7 @@ func intMax(a, b int) int { type IntStack []int -var ErrEmptyStack = errors.New("Stack is empty") +var ErrEmptyStack = errors.New("stack is empty") func (s *IntStack) Pop() (int, error) { l := len(*s) - 1 @@ -47,33 +49,13 @@ func (s *IntStack) Push(e int) { *s = append(*s, e) } -type comparable interface { - Equals(other Collectable[any]) bool -} - -func standardEqualsFunction(a Collectable[any], b Collectable[any]) bool { - - return a.Equals(b) -} - -func standardHashFunction(a interface{}) int { - if h, ok := a.(hasher); ok { - return h.Hash() - } - - panic("Not Hasher") -} - -type hasher interface { - Hash() int -} - const bitsPerWord = 64 func indexForBit(bit int) int { return bit / bitsPerWord } +//goland:noinspection GoUnusedExportedFunction,GoUnusedFunction func wordForBit(data []uint64, bit int) uint64 { idx := indexForBit(bit) if idx >= len(data) { @@ -94,6 +76,8 @@ type BitSet struct { data []uint64 } +// NewBitSet creates a new bitwise set +// TODO: See if we can replace with the standard library's BitSet func NewBitSet() *BitSet { return &BitSet{} } @@ -123,7 +107,7 @@ func (b *BitSet) or(set *BitSet) { setLen := set.minLen() maxLen := intMax(bLen, setLen) if maxLen > len(b.data) { - // Increase the size of len(b.data) to repesent the bits in both sets. + // Increase the size of len(b.data) to represent the bits in both sets. data := make([]uint64, maxLen) copy(data, b.data) b.data = data @@ -246,37 +230,6 @@ func (a *AltDict) values() []interface{} { return vs } -type DoubleDict struct { - data map[int]map[int]interface{} -} - -func NewDoubleDict() *DoubleDict { - dd := new(DoubleDict) - dd.data = make(map[int]map[int]interface{}) - return dd -} - -func (d *DoubleDict) Get(a, b int) interface{} { - data := d.data[a] - - if data == nil { - return nil - } - - return data[b] -} - -func (d *DoubleDict) set(a, b int, o interface{}) { - data := d.data[a] - - if data == nil { - data = make(map[int]interface{}) - d.data[a] = data - } - - data[b] = o -} - func EscapeWhitespace(s string, escapeSpaces bool) string { s = strings.Replace(s, "\t", "\\t", -1) @@ -288,6 +241,7 @@ func EscapeWhitespace(s string, escapeSpaces bool) string { return s } +//goland:noinspection GoUnusedExportedFunction func TerminalNodeToStringArray(sa []TerminalNode) []string { st := make([]string, len(sa)) @@ -298,6 +252,7 @@ func TerminalNodeToStringArray(sa []TerminalNode) []string { return st } +//goland:noinspection GoUnusedExportedFunction func PrintArrayJavaStyle(sa []string) string { var buffer bytes.Buffer @@ -350,3 +305,24 @@ func murmurFinish(h int, numberOfWords int) int { return int(hash) } + +func isDirectory(dir string) (bool, error) { + fileInfo, err := os.Stat(dir) + if err != nil { + switch { + case errors.Is(err, syscall.ENOENT): + // The given directory does not exist, so we will try to create it + // + err = os.MkdirAll(dir, 0755) + if err != nil { + return false, err + } + + return true, nil + case err != nil: + return false, err + default: + } + } + return fileInfo.IsDir(), err +} diff --git a/vendor/github.com/armon/go-metrics/.gitignore b/vendor/github.com/armon/go-metrics/.gitignore deleted file mode 100644 index e5750f5720e..00000000000 --- a/vendor/github.com/armon/go-metrics/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe - -/metrics.out - -.idea diff --git a/vendor/github.com/armon/go-metrics/.travis.yml b/vendor/github.com/armon/go-metrics/.travis.yml deleted file mode 100644 index 87d230c8d78..00000000000 --- a/vendor/github.com/armon/go-metrics/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go - -go: - - "1.x" - -env: - - GO111MODULE=on - -install: - - go get ./... - -script: - - go test ./... diff --git a/vendor/github.com/armon/go-metrics/LICENSE b/vendor/github.com/armon/go-metrics/LICENSE deleted file mode 100644 index 106569e542b..00000000000 --- a/vendor/github.com/armon/go-metrics/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Armon Dadgar - -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/armon/go-metrics/README.md b/vendor/github.com/armon/go-metrics/README.md deleted file mode 100644 index aa73348c08d..00000000000 --- a/vendor/github.com/armon/go-metrics/README.md +++ /dev/null @@ -1,91 +0,0 @@ -go-metrics -========== - -This library provides a `metrics` package which can be used to instrument code, -expose application metrics, and profile runtime performance in a flexible manner. - -Current API: [![GoDoc](https://godoc.org/github.com/armon/go-metrics?status.svg)](https://godoc.org/github.com/armon/go-metrics) - -Sinks ------ - -The `metrics` package makes use of a `MetricSink` interface to support delivery -to any type of backend. Currently the following sinks are provided: - -* StatsiteSink : Sinks to a [statsite](https://github.com/armon/statsite/) instance (TCP) -* StatsdSink: Sinks to a [StatsD](https://github.com/etsy/statsd/) / statsite instance (UDP) -* PrometheusSink: Sinks to a [Prometheus](http://prometheus.io/) metrics endpoint (exposed via HTTP for scrapes) -* InmemSink : Provides in-memory aggregation, can be used to export stats -* FanoutSink : Sinks to multiple sinks. Enables writing to multiple statsite instances for example. -* BlackholeSink : Sinks to nowhere - -In addition to the sinks, the `InmemSignal` can be used to catch a signal, -and dump a formatted output of recent metrics. For example, when a process gets -a SIGUSR1, it can dump to stderr recent performance metrics for debugging. - -Labels ------- - -Most metrics do have an equivalent ending with `WithLabels`, such methods -allow to push metrics with labels and use some features of underlying Sinks -(ex: translated into Prometheus labels). - -Since some of these labels may increase greatly cardinality of metrics, the -library allow to filter labels using a blacklist/whitelist filtering system -which is global to all metrics. - -* If `Config.AllowedLabels` is not nil, then only labels specified in this value will be sent to underlying Sink, otherwise, all labels are sent by default. -* If `Config.BlockedLabels` is not nil, any label specified in this value will not be sent to underlying Sinks. - -By default, both `Config.AllowedLabels` and `Config.BlockedLabels` are nil, meaning that -no tags are filetered at all, but it allow to a user to globally block some tags with high -cardinality at application level. - -Examples --------- - -Here is an example of using the package: - -```go -func SlowMethod() { - // Profiling the runtime of a method - defer metrics.MeasureSince([]string{"SlowMethod"}, time.Now()) -} - -// Configure a statsite sink as the global metrics sink -sink, _ := metrics.NewStatsiteSink("statsite:8125") -metrics.NewGlobal(metrics.DefaultConfig("service-name"), sink) - -// Emit a Key/Value pair -metrics.EmitKey([]string{"questions", "meaning of life"}, 42) -``` - -Here is an example of setting up a signal handler: - -```go -// Setup the inmem sink and signal handler -inm := metrics.NewInmemSink(10*time.Second, time.Minute) -sig := metrics.DefaultInmemSignal(inm) -metrics.NewGlobal(metrics.DefaultConfig("service-name"), inm) - -// Run some code -inm.SetGauge([]string{"foo"}, 42) -inm.EmitKey([]string{"bar"}, 30) - -inm.IncrCounter([]string{"baz"}, 42) -inm.IncrCounter([]string{"baz"}, 1) -inm.IncrCounter([]string{"baz"}, 80) - -inm.AddSample([]string{"method", "wow"}, 42) -inm.AddSample([]string{"method", "wow"}, 100) -inm.AddSample([]string{"method", "wow"}, 22) - -.... -``` - -When a signal comes in, output like the following will be dumped to stderr: - - [2014-01-28 14:57:33.04 -0800 PST][G] 'foo': 42.000 - [2014-01-28 14:57:33.04 -0800 PST][P] 'bar': 30.000 - [2014-01-28 14:57:33.04 -0800 PST][C] 'baz': Count: 3 Min: 1.000 Mean: 41.000 Max: 80.000 Stddev: 39.509 - [2014-01-28 14:57:33.04 -0800 PST][S] 'method.wow': Count: 3 Min: 22.000 Mean: 54.667 Max: 100.000 Stddev: 40.513 \ No newline at end of file diff --git a/vendor/github.com/armon/go-metrics/const_unix.go b/vendor/github.com/armon/go-metrics/const_unix.go deleted file mode 100644 index 31098dd57e5..00000000000 --- a/vendor/github.com/armon/go-metrics/const_unix.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build !windows - -package metrics - -import ( - "syscall" -) - -const ( - // DefaultSignal is used with DefaultInmemSignal - DefaultSignal = syscall.SIGUSR1 -) diff --git a/vendor/github.com/armon/go-metrics/const_windows.go b/vendor/github.com/armon/go-metrics/const_windows.go deleted file mode 100644 index 38136af3e42..00000000000 --- a/vendor/github.com/armon/go-metrics/const_windows.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build windows - -package metrics - -import ( - "syscall" -) - -const ( - // DefaultSignal is used with DefaultInmemSignal - // Windows has no SIGUSR1, use SIGBREAK - DefaultSignal = syscall.Signal(21) -) diff --git a/vendor/github.com/armon/go-metrics/inmem.go b/vendor/github.com/armon/go-metrics/inmem.go deleted file mode 100644 index 7c427aca979..00000000000 --- a/vendor/github.com/armon/go-metrics/inmem.go +++ /dev/null @@ -1,339 +0,0 @@ -package metrics - -import ( - "bytes" - "fmt" - "math" - "net/url" - "strings" - "sync" - "time" -) - -var spaceReplacer = strings.NewReplacer(" ", "_") - -// InmemSink provides a MetricSink that does in-memory aggregation -// without sending metrics over a network. It can be embedded within -// an application to provide profiling information. -type InmemSink struct { - // How long is each aggregation interval - interval time.Duration - - // Retain controls how many metrics interval we keep - retain time.Duration - - // maxIntervals is the maximum length of intervals. - // It is retain / interval. - maxIntervals int - - // intervals is a slice of the retained intervals - intervals []*IntervalMetrics - intervalLock sync.RWMutex - - rateDenom float64 -} - -// IntervalMetrics stores the aggregated metrics -// for a specific interval -type IntervalMetrics struct { - sync.RWMutex - - // The start time of the interval - Interval time.Time - - // Gauges maps the key to the last set value - Gauges map[string]GaugeValue - - // Points maps the string to the list of emitted values - // from EmitKey - Points map[string][]float32 - - // Counters maps the string key to a sum of the counter - // values - Counters map[string]SampledValue - - // Samples maps the key to an AggregateSample, - // which has the rolled up view of a sample - Samples map[string]SampledValue - - // done is closed when this interval has ended, and a new IntervalMetrics - // has been created to receive any future metrics. - done chan struct{} -} - -// NewIntervalMetrics creates a new IntervalMetrics for a given interval -func NewIntervalMetrics(intv time.Time) *IntervalMetrics { - return &IntervalMetrics{ - Interval: intv, - Gauges: make(map[string]GaugeValue), - Points: make(map[string][]float32), - Counters: make(map[string]SampledValue), - Samples: make(map[string]SampledValue), - done: make(chan struct{}), - } -} - -// AggregateSample is used to hold aggregate metrics -// about a sample -type AggregateSample struct { - Count int // The count of emitted pairs - Rate float64 // The values rate per time unit (usually 1 second) - Sum float64 // The sum of values - SumSq float64 `json:"-"` // The sum of squared values - Min float64 // Minimum value - Max float64 // Maximum value - LastUpdated time.Time `json:"-"` // When value was last updated -} - -// Computes a Stddev of the values -func (a *AggregateSample) Stddev() float64 { - num := (float64(a.Count) * a.SumSq) - math.Pow(a.Sum, 2) - div := float64(a.Count * (a.Count - 1)) - if div == 0 { - return 0 - } - return math.Sqrt(num / div) -} - -// Computes a mean of the values -func (a *AggregateSample) Mean() float64 { - if a.Count == 0 { - return 0 - } - return a.Sum / float64(a.Count) -} - -// Ingest is used to update a sample -func (a *AggregateSample) Ingest(v float64, rateDenom float64) { - a.Count++ - a.Sum += v - a.SumSq += (v * v) - if v < a.Min || a.Count == 1 { - a.Min = v - } - if v > a.Max || a.Count == 1 { - a.Max = v - } - a.Rate = float64(a.Sum) / rateDenom - a.LastUpdated = time.Now() -} - -func (a *AggregateSample) String() string { - if a.Count == 0 { - return "Count: 0" - } else if a.Stddev() == 0 { - return fmt.Sprintf("Count: %d Sum: %0.3f LastUpdated: %s", a.Count, a.Sum, a.LastUpdated) - } else { - return fmt.Sprintf("Count: %d Min: %0.3f Mean: %0.3f Max: %0.3f Stddev: %0.3f Sum: %0.3f LastUpdated: %s", - a.Count, a.Min, a.Mean(), a.Max, a.Stddev(), a.Sum, a.LastUpdated) - } -} - -// NewInmemSinkFromURL creates an InmemSink from a URL. It is used -// (and tested) from NewMetricSinkFromURL. -func NewInmemSinkFromURL(u *url.URL) (MetricSink, error) { - params := u.Query() - - interval, err := time.ParseDuration(params.Get("interval")) - if err != nil { - return nil, fmt.Errorf("Bad 'interval' param: %s", err) - } - - retain, err := time.ParseDuration(params.Get("retain")) - if err != nil { - return nil, fmt.Errorf("Bad 'retain' param: %s", err) - } - - return NewInmemSink(interval, retain), nil -} - -// NewInmemSink is used to construct a new in-memory sink. -// Uses an aggregation interval and maximum retention period. -func NewInmemSink(interval, retain time.Duration) *InmemSink { - rateTimeUnit := time.Second - i := &InmemSink{ - interval: interval, - retain: retain, - maxIntervals: int(retain / interval), - rateDenom: float64(interval.Nanoseconds()) / float64(rateTimeUnit.Nanoseconds()), - } - i.intervals = make([]*IntervalMetrics, 0, i.maxIntervals) - return i -} - -func (i *InmemSink) SetGauge(key []string, val float32) { - i.SetGaugeWithLabels(key, val, nil) -} - -func (i *InmemSink) SetGaugeWithLabels(key []string, val float32, labels []Label) { - k, name := i.flattenKeyLabels(key, labels) - intv := i.getInterval() - - intv.Lock() - defer intv.Unlock() - intv.Gauges[k] = GaugeValue{Name: name, Value: val, Labels: labels} -} - -func (i *InmemSink) EmitKey(key []string, val float32) { - k := i.flattenKey(key) - intv := i.getInterval() - - intv.Lock() - defer intv.Unlock() - vals := intv.Points[k] - intv.Points[k] = append(vals, val) -} - -func (i *InmemSink) IncrCounter(key []string, val float32) { - i.IncrCounterWithLabels(key, val, nil) -} - -func (i *InmemSink) IncrCounterWithLabels(key []string, val float32, labels []Label) { - k, name := i.flattenKeyLabels(key, labels) - intv := i.getInterval() - - intv.Lock() - defer intv.Unlock() - - agg, ok := intv.Counters[k] - if !ok { - agg = SampledValue{ - Name: name, - AggregateSample: &AggregateSample{}, - Labels: labels, - } - intv.Counters[k] = agg - } - agg.Ingest(float64(val), i.rateDenom) -} - -func (i *InmemSink) AddSample(key []string, val float32) { - i.AddSampleWithLabels(key, val, nil) -} - -func (i *InmemSink) AddSampleWithLabels(key []string, val float32, labels []Label) { - k, name := i.flattenKeyLabels(key, labels) - intv := i.getInterval() - - intv.Lock() - defer intv.Unlock() - - agg, ok := intv.Samples[k] - if !ok { - agg = SampledValue{ - Name: name, - AggregateSample: &AggregateSample{}, - Labels: labels, - } - intv.Samples[k] = agg - } - agg.Ingest(float64(val), i.rateDenom) -} - -// Data is used to retrieve all the aggregated metrics -// Intervals may be in use, and a read lock should be acquired -func (i *InmemSink) Data() []*IntervalMetrics { - // Get the current interval, forces creation - i.getInterval() - - i.intervalLock.RLock() - defer i.intervalLock.RUnlock() - - n := len(i.intervals) - intervals := make([]*IntervalMetrics, n) - - copy(intervals[:n-1], i.intervals[:n-1]) - current := i.intervals[n-1] - - // make its own copy for current interval - intervals[n-1] = &IntervalMetrics{} - copyCurrent := intervals[n-1] - current.RLock() - *copyCurrent = *current - // RWMutex is not safe to copy, so create a new instance on the copy - copyCurrent.RWMutex = sync.RWMutex{} - - copyCurrent.Gauges = make(map[string]GaugeValue, len(current.Gauges)) - for k, v := range current.Gauges { - copyCurrent.Gauges[k] = v - } - // saved values will be not change, just copy its link - copyCurrent.Points = make(map[string][]float32, len(current.Points)) - for k, v := range current.Points { - copyCurrent.Points[k] = v - } - copyCurrent.Counters = make(map[string]SampledValue, len(current.Counters)) - for k, v := range current.Counters { - copyCurrent.Counters[k] = v.deepCopy() - } - copyCurrent.Samples = make(map[string]SampledValue, len(current.Samples)) - for k, v := range current.Samples { - copyCurrent.Samples[k] = v.deepCopy() - } - current.RUnlock() - - return intervals -} - -// getInterval returns the current interval. A new interval is created if no -// previous interval exists, or if the current time is beyond the window for the -// current interval. -func (i *InmemSink) getInterval() *IntervalMetrics { - intv := time.Now().Truncate(i.interval) - - // Attempt to return the existing interval first, because it only requires - // a read lock. - i.intervalLock.RLock() - n := len(i.intervals) - if n > 0 && i.intervals[n-1].Interval == intv { - defer i.intervalLock.RUnlock() - return i.intervals[n-1] - } - i.intervalLock.RUnlock() - - i.intervalLock.Lock() - defer i.intervalLock.Unlock() - - // Re-check for an existing interval now that the lock is re-acquired. - n = len(i.intervals) - if n > 0 && i.intervals[n-1].Interval == intv { - return i.intervals[n-1] - } - - current := NewIntervalMetrics(intv) - i.intervals = append(i.intervals, current) - if n > 0 { - close(i.intervals[n-1].done) - } - - n++ - // Prune old intervals if the count exceeds the max. - if n >= i.maxIntervals { - copy(i.intervals[0:], i.intervals[n-i.maxIntervals:]) - i.intervals = i.intervals[:i.maxIntervals] - } - return current -} - -// Flattens the key for formatting, removes spaces -func (i *InmemSink) flattenKey(parts []string) string { - buf := &bytes.Buffer{} - - joined := strings.Join(parts, ".") - - spaceReplacer.WriteString(buf, joined) - - return buf.String() -} - -// Flattens the key for formatting along with its labels, removes spaces -func (i *InmemSink) flattenKeyLabels(parts []string, labels []Label) (string, string) { - key := i.flattenKey(parts) - buf := bytes.NewBufferString(key) - - for _, label := range labels { - spaceReplacer.WriteString(buf, fmt.Sprintf(";%s=%s", label.Name, label.Value)) - } - - return buf.String(), key -} diff --git a/vendor/github.com/armon/go-metrics/inmem_endpoint.go b/vendor/github.com/armon/go-metrics/inmem_endpoint.go deleted file mode 100644 index 24eefa96389..00000000000 --- a/vendor/github.com/armon/go-metrics/inmem_endpoint.go +++ /dev/null @@ -1,162 +0,0 @@ -package metrics - -import ( - "context" - "fmt" - "net/http" - "sort" - "time" -) - -// MetricsSummary holds a roll-up of metrics info for a given interval -type MetricsSummary struct { - Timestamp string - Gauges []GaugeValue - Points []PointValue - Counters []SampledValue - Samples []SampledValue -} - -type GaugeValue struct { - Name string - Hash string `json:"-"` - Value float32 - - Labels []Label `json:"-"` - DisplayLabels map[string]string `json:"Labels"` -} - -type PointValue struct { - Name string - Points []float32 -} - -type SampledValue struct { - Name string - Hash string `json:"-"` - *AggregateSample - Mean float64 - Stddev float64 - - Labels []Label `json:"-"` - DisplayLabels map[string]string `json:"Labels"` -} - -// deepCopy allocates a new instance of AggregateSample -func (source *SampledValue) deepCopy() SampledValue { - dest := *source - if source.AggregateSample != nil { - dest.AggregateSample = &AggregateSample{} - *dest.AggregateSample = *source.AggregateSample - } - return dest -} - -// DisplayMetrics returns a summary of the metrics from the most recent finished interval. -func (i *InmemSink) DisplayMetrics(resp http.ResponseWriter, req *http.Request) (interface{}, error) { - data := i.Data() - - var interval *IntervalMetrics - n := len(data) - switch { - case n == 0: - return nil, fmt.Errorf("no metric intervals have been initialized yet") - case n == 1: - // Show the current interval if it's all we have - interval = data[0] - default: - // Show the most recent finished interval if we have one - interval = data[n-2] - } - - return newMetricSummaryFromInterval(interval), nil -} - -func newMetricSummaryFromInterval(interval *IntervalMetrics) MetricsSummary { - interval.RLock() - defer interval.RUnlock() - - summary := MetricsSummary{ - Timestamp: interval.Interval.Round(time.Second).UTC().String(), - Gauges: make([]GaugeValue, 0, len(interval.Gauges)), - Points: make([]PointValue, 0, len(interval.Points)), - } - - // Format and sort the output of each metric type, so it gets displayed in a - // deterministic order. - for name, points := range interval.Points { - summary.Points = append(summary.Points, PointValue{name, points}) - } - sort.Slice(summary.Points, func(i, j int) bool { - return summary.Points[i].Name < summary.Points[j].Name - }) - - for hash, value := range interval.Gauges { - value.Hash = hash - value.DisplayLabels = make(map[string]string) - for _, label := range value.Labels { - value.DisplayLabels[label.Name] = label.Value - } - value.Labels = nil - - summary.Gauges = append(summary.Gauges, value) - } - sort.Slice(summary.Gauges, func(i, j int) bool { - return summary.Gauges[i].Hash < summary.Gauges[j].Hash - }) - - summary.Counters = formatSamples(interval.Counters) - summary.Samples = formatSamples(interval.Samples) - - return summary -} - -func formatSamples(source map[string]SampledValue) []SampledValue { - output := make([]SampledValue, 0, len(source)) - for hash, sample := range source { - displayLabels := make(map[string]string) - for _, label := range sample.Labels { - displayLabels[label.Name] = label.Value - } - - output = append(output, SampledValue{ - Name: sample.Name, - Hash: hash, - AggregateSample: sample.AggregateSample, - Mean: sample.AggregateSample.Mean(), - Stddev: sample.AggregateSample.Stddev(), - DisplayLabels: displayLabels, - }) - } - sort.Slice(output, func(i, j int) bool { - return output[i].Hash < output[j].Hash - }) - - return output -} - -type Encoder interface { - Encode(interface{}) error -} - -// Stream writes metrics using encoder.Encode each time an interval ends. Runs -// until the request context is cancelled, or the encoder returns an error. -// The caller is responsible for logging any errors from encoder. -func (i *InmemSink) Stream(ctx context.Context, encoder Encoder) { - interval := i.getInterval() - - for { - select { - case <-interval.done: - summary := newMetricSummaryFromInterval(interval) - if err := encoder.Encode(summary); err != nil { - return - } - - // update interval to the next one - interval = i.getInterval() - case <-ctx.Done(): - return - } - } -} diff --git a/vendor/github.com/armon/go-metrics/inmem_signal.go b/vendor/github.com/armon/go-metrics/inmem_signal.go deleted file mode 100644 index 0937f4aedf7..00000000000 --- a/vendor/github.com/armon/go-metrics/inmem_signal.go +++ /dev/null @@ -1,117 +0,0 @@ -package metrics - -import ( - "bytes" - "fmt" - "io" - "os" - "os/signal" - "strings" - "sync" - "syscall" -) - -// InmemSignal is used to listen for a given signal, and when received, -// to dump the current metrics from the InmemSink to an io.Writer -type InmemSignal struct { - signal syscall.Signal - inm *InmemSink - w io.Writer - sigCh chan os.Signal - - stop bool - stopCh chan struct{} - stopLock sync.Mutex -} - -// NewInmemSignal creates a new InmemSignal which listens for a given signal, -// and dumps the current metrics out to a writer -func NewInmemSignal(inmem *InmemSink, sig syscall.Signal, w io.Writer) *InmemSignal { - i := &InmemSignal{ - signal: sig, - inm: inmem, - w: w, - sigCh: make(chan os.Signal, 1), - stopCh: make(chan struct{}), - } - signal.Notify(i.sigCh, sig) - go i.run() - return i -} - -// DefaultInmemSignal returns a new InmemSignal that responds to SIGUSR1 -// and writes output to stderr. Windows uses SIGBREAK -func DefaultInmemSignal(inmem *InmemSink) *InmemSignal { - return NewInmemSignal(inmem, DefaultSignal, os.Stderr) -} - -// Stop is used to stop the InmemSignal from listening -func (i *InmemSignal) Stop() { - i.stopLock.Lock() - defer i.stopLock.Unlock() - - if i.stop { - return - } - i.stop = true - close(i.stopCh) - signal.Stop(i.sigCh) -} - -// run is a long running routine that handles signals -func (i *InmemSignal) run() { - for { - select { - case <-i.sigCh: - i.dumpStats() - case <-i.stopCh: - return - } - } -} - -// dumpStats is used to dump the data to output writer -func (i *InmemSignal) dumpStats() { - buf := bytes.NewBuffer(nil) - - data := i.inm.Data() - // Skip the last period which is still being aggregated - for j := 0; j < len(data)-1; j++ { - intv := data[j] - intv.RLock() - for _, val := range intv.Gauges { - name := i.flattenLabels(val.Name, val.Labels) - fmt.Fprintf(buf, "[%v][G] '%s': %0.3f\n", intv.Interval, name, val.Value) - } - for name, vals := range intv.Points { - for _, val := range vals { - fmt.Fprintf(buf, "[%v][P] '%s': %0.3f\n", intv.Interval, name, val) - } - } - for _, agg := range intv.Counters { - name := i.flattenLabels(agg.Name, agg.Labels) - fmt.Fprintf(buf, "[%v][C] '%s': %s\n", intv.Interval, name, agg.AggregateSample) - } - for _, agg := range intv.Samples { - name := i.flattenLabels(agg.Name, agg.Labels) - fmt.Fprintf(buf, "[%v][S] '%s': %s\n", intv.Interval, name, agg.AggregateSample) - } - intv.RUnlock() - } - - // Write out the bytes - i.w.Write(buf.Bytes()) -} - -// Flattens the key for formatting along with its labels, removes spaces -func (i *InmemSignal) flattenLabels(name string, labels []Label) string { - buf := bytes.NewBufferString(name) - replacer := strings.NewReplacer(" ", "_", ":", "_") - - for _, label := range labels { - replacer.WriteString(buf, ".") - replacer.WriteString(buf, label.Value) - } - - return buf.String() -} diff --git a/vendor/github.com/armon/go-metrics/metrics.go b/vendor/github.com/armon/go-metrics/metrics.go deleted file mode 100644 index 36642a42937..00000000000 --- a/vendor/github.com/armon/go-metrics/metrics.go +++ /dev/null @@ -1,299 +0,0 @@ -package metrics - -import ( - "runtime" - "strings" - "time" - - iradix "github.com/hashicorp/go-immutable-radix" -) - -type Label struct { - Name string - Value string -} - -func (m *Metrics) SetGauge(key []string, val float32) { - m.SetGaugeWithLabels(key, val, nil) -} - -func (m *Metrics) SetGaugeWithLabels(key []string, val float32, labels []Label) { - if m.HostName != "" { - if m.EnableHostnameLabel { - labels = append(labels, Label{"host", m.HostName}) - } else if m.EnableHostname { - key = insert(0, m.HostName, key) - } - } - if m.EnableTypePrefix { - key = insert(0, "gauge", key) - } - if m.ServiceName != "" { - if m.EnableServiceLabel { - labels = append(labels, Label{"service", m.ServiceName}) - } else { - key = insert(0, m.ServiceName, key) - } - } - allowed, labelsFiltered := m.allowMetric(key, labels) - if !allowed { - return - } - m.sink.SetGaugeWithLabels(key, val, labelsFiltered) -} - -func (m *Metrics) EmitKey(key []string, val float32) { - if m.EnableTypePrefix { - key = insert(0, "kv", key) - } - if m.ServiceName != "" { - key = insert(0, m.ServiceName, key) - } - allowed, _ := m.allowMetric(key, nil) - if !allowed { - return - } - m.sink.EmitKey(key, val) -} - -func (m *Metrics) IncrCounter(key []string, val float32) { - m.IncrCounterWithLabels(key, val, nil) -} - -func (m *Metrics) IncrCounterWithLabels(key []string, val float32, labels []Label) { - if m.HostName != "" && m.EnableHostnameLabel { - labels = append(labels, Label{"host", m.HostName}) - } - if m.EnableTypePrefix { - key = insert(0, "counter", key) - } - if m.ServiceName != "" { - if m.EnableServiceLabel { - labels = append(labels, Label{"service", m.ServiceName}) - } else { - key = insert(0, m.ServiceName, key) - } - } - allowed, labelsFiltered := m.allowMetric(key, labels) - if !allowed { - return - } - m.sink.IncrCounterWithLabels(key, val, labelsFiltered) -} - -func (m *Metrics) AddSample(key []string, val float32) { - m.AddSampleWithLabels(key, val, nil) -} - -func (m *Metrics) AddSampleWithLabels(key []string, val float32, labels []Label) { - if m.HostName != "" && m.EnableHostnameLabel { - labels = append(labels, Label{"host", m.HostName}) - } - if m.EnableTypePrefix { - key = insert(0, "sample", key) - } - if m.ServiceName != "" { - if m.EnableServiceLabel { - labels = append(labels, Label{"service", m.ServiceName}) - } else { - key = insert(0, m.ServiceName, key) - } - } - allowed, labelsFiltered := m.allowMetric(key, labels) - if !allowed { - return - } - m.sink.AddSampleWithLabels(key, val, labelsFiltered) -} - -func (m *Metrics) MeasureSince(key []string, start time.Time) { - m.MeasureSinceWithLabels(key, start, nil) -} - -func (m *Metrics) MeasureSinceWithLabels(key []string, start time.Time, labels []Label) { - if m.HostName != "" && m.EnableHostnameLabel { - labels = append(labels, Label{"host", m.HostName}) - } - if m.EnableTypePrefix { - key = insert(0, "timer", key) - } - if m.ServiceName != "" { - if m.EnableServiceLabel { - labels = append(labels, Label{"service", m.ServiceName}) - } else { - key = insert(0, m.ServiceName, key) - } - } - allowed, labelsFiltered := m.allowMetric(key, labels) - if !allowed { - return - } - now := time.Now() - elapsed := now.Sub(start) - msec := float32(elapsed.Nanoseconds()) / float32(m.TimerGranularity) - m.sink.AddSampleWithLabels(key, msec, labelsFiltered) -} - -// UpdateFilter overwrites the existing filter with the given rules. -func (m *Metrics) UpdateFilter(allow, block []string) { - m.UpdateFilterAndLabels(allow, block, m.AllowedLabels, m.BlockedLabels) -} - -// UpdateFilterAndLabels overwrites the existing filter with the given rules. -func (m *Metrics) UpdateFilterAndLabels(allow, block, allowedLabels, blockedLabels []string) { - m.filterLock.Lock() - defer m.filterLock.Unlock() - - m.AllowedPrefixes = allow - m.BlockedPrefixes = block - - if allowedLabels == nil { - // Having a white list means we take only elements from it - m.allowedLabels = nil - } else { - m.allowedLabels = make(map[string]bool) - for _, v := range allowedLabels { - m.allowedLabels[v] = true - } - } - m.blockedLabels = make(map[string]bool) - for _, v := range blockedLabels { - m.blockedLabels[v] = true - } - m.AllowedLabels = allowedLabels - m.BlockedLabels = blockedLabels - - m.filter = iradix.New() - for _, prefix := range m.AllowedPrefixes { - m.filter, _, _ = m.filter.Insert([]byte(prefix), true) - } - for _, prefix := range m.BlockedPrefixes { - m.filter, _, _ = m.filter.Insert([]byte(prefix), false) - } -} - -func (m *Metrics) Shutdown() { - if ss, ok := m.sink.(ShutdownSink); ok { - ss.Shutdown() - } -} - -// labelIsAllowed return true if a should be included in metric -// the caller should lock m.filterLock while calling this method -func (m *Metrics) labelIsAllowed(label *Label) bool { - labelName := (*label).Name - if m.blockedLabels != nil { - _, ok := m.blockedLabels[labelName] - if ok { - // If present, let's remove this label - return false - } - } - if m.allowedLabels != nil { - _, ok := m.allowedLabels[labelName] - return ok - } - // Allow by default - return true -} - -// filterLabels return only allowed labels -// the caller should lock m.filterLock while calling this method -func (m *Metrics) filterLabels(labels []Label) []Label { - if labels == nil { - return nil - } - toReturn := []Label{} - for _, label := range labels { - if m.labelIsAllowed(&label) { - toReturn = append(toReturn, label) - } - } - return toReturn -} - -// Returns whether the metric should be allowed based on configured prefix filters -// Also return the applicable labels -func (m *Metrics) allowMetric(key []string, labels []Label) (bool, []Label) { - m.filterLock.RLock() - defer m.filterLock.RUnlock() - - if m.filter == nil || m.filter.Len() == 0 { - return m.Config.FilterDefault, m.filterLabels(labels) - } - - _, allowed, ok := m.filter.Root().LongestPrefix([]byte(strings.Join(key, "."))) - if !ok { - return m.Config.FilterDefault, m.filterLabels(labels) - } - - return allowed.(bool), m.filterLabels(labels) -} - -// Periodically collects runtime stats to publish -func (m *Metrics) collectStats() { - for { - time.Sleep(m.ProfileInterval) - m.EmitRuntimeStats() - } -} - -// Emits various runtime statsitics -func (m *Metrics) EmitRuntimeStats() { - // Export number of Goroutines - numRoutines := runtime.NumGoroutine() - m.SetGauge([]string{"runtime", "num_goroutines"}, float32(numRoutines)) - - // Export memory stats - var stats runtime.MemStats - runtime.ReadMemStats(&stats) - m.SetGauge([]string{"runtime", "alloc_bytes"}, float32(stats.Alloc)) - m.SetGauge([]string{"runtime", "sys_bytes"}, float32(stats.Sys)) - m.SetGauge([]string{"runtime", "malloc_count"}, float32(stats.Mallocs)) - m.SetGauge([]string{"runtime", "free_count"}, float32(stats.Frees)) - m.SetGauge([]string{"runtime", "heap_objects"}, float32(stats.HeapObjects)) - m.SetGauge([]string{"runtime", "total_gc_pause_ns"}, float32(stats.PauseTotalNs)) - m.SetGauge([]string{"runtime", "total_gc_runs"}, float32(stats.NumGC)) - - // Export info about the last few GC runs - num := stats.NumGC - - // Handle wrap around - if num < m.lastNumGC { - m.lastNumGC = 0 - } - - // Ensure we don't scan more than 256 - if num-m.lastNumGC >= 256 { - m.lastNumGC = num - 255 - } - - for i := m.lastNumGC; i < num; i++ { - pause := stats.PauseNs[i%256] - m.AddSample([]string{"runtime", "gc_pause_ns"}, float32(pause)) - } - m.lastNumGC = num -} - -// Creates a new slice with the provided string value as the first element -// and the provided slice values as the remaining values. -// Ordering of the values in the provided input slice is kept in tact in the output slice. -func insert(i int, v string, s []string) []string { - // Allocate new slice to avoid modifying the input slice - newS := make([]string, len(s)+1) - - // Copy s[0, i-1] into newS - for j := 0; j < i; j++ { - newS[j] = s[j] - } - - // Insert provided element at index i - newS[i] = v - - // Copy s[i, len(s)-1] into newS starting at newS[i+1] - for j := i; j < len(s); j++ { - newS[j+1] = s[j] - } - - return newS -} diff --git a/vendor/github.com/armon/go-metrics/sink.go b/vendor/github.com/armon/go-metrics/sink.go deleted file mode 100644 index 6f4108ff405..00000000000 --- a/vendor/github.com/armon/go-metrics/sink.go +++ /dev/null @@ -1,132 +0,0 @@ -package metrics - -import ( - "fmt" - "net/url" -) - -// The MetricSink interface is used to transmit metrics information -// to an external system -type MetricSink interface { - // A Gauge should retain the last value it is set to - SetGauge(key []string, val float32) - SetGaugeWithLabels(key []string, val float32, labels []Label) - - // Should emit a Key/Value pair for each call - EmitKey(key []string, val float32) - - // Counters should accumulate values - IncrCounter(key []string, val float32) - IncrCounterWithLabels(key []string, val float32, labels []Label) - - // Samples are for timing information, where quantiles are used - AddSample(key []string, val float32) - AddSampleWithLabels(key []string, val float32, labels []Label) -} - -type ShutdownSink interface { - MetricSink - - // Shutdown the metric sink, flush metrics to storage, and cleanup resources. - // Called immediately prior to application exit. Implementations must block - // until metrics are flushed to storage. - Shutdown() -} - -// BlackholeSink is used to just blackhole messages -type BlackholeSink struct{} - -func (*BlackholeSink) SetGauge(key []string, val float32) {} -func (*BlackholeSink) SetGaugeWithLabels(key []string, val float32, labels []Label) {} -func (*BlackholeSink) EmitKey(key []string, val float32) {} -func (*BlackholeSink) IncrCounter(key []string, val float32) {} -func (*BlackholeSink) IncrCounterWithLabels(key []string, val float32, labels []Label) {} -func (*BlackholeSink) AddSample(key []string, val float32) {} -func (*BlackholeSink) AddSampleWithLabels(key []string, val float32, labels []Label) {} - -// FanoutSink is used to sink to fanout values to multiple sinks -type FanoutSink []MetricSink - -func (fh FanoutSink) SetGauge(key []string, val float32) { - fh.SetGaugeWithLabels(key, val, nil) -} - -func (fh FanoutSink) SetGaugeWithLabels(key []string, val float32, labels []Label) { - for _, s := range fh { - s.SetGaugeWithLabels(key, val, labels) - } -} - -func (fh FanoutSink) EmitKey(key []string, val float32) { - for _, s := range fh { - s.EmitKey(key, val) - } -} - -func (fh FanoutSink) IncrCounter(key []string, val float32) { - fh.IncrCounterWithLabels(key, val, nil) -} - -func (fh FanoutSink) IncrCounterWithLabels(key []string, val float32, labels []Label) { - for _, s := range fh { - s.IncrCounterWithLabels(key, val, labels) - } -} - -func (fh FanoutSink) AddSample(key []string, val float32) { - fh.AddSampleWithLabels(key, val, nil) -} - -func (fh FanoutSink) AddSampleWithLabels(key []string, val float32, labels []Label) { - for _, s := range fh { - s.AddSampleWithLabels(key, val, labels) - } -} - -func (fh FanoutSink) Shutdown() { - for _, s := range fh { - if ss, ok := s.(ShutdownSink); ok { - ss.Shutdown() - } - } -} - -// sinkURLFactoryFunc is an generic interface around the *SinkFromURL() function provided -// by each sink type -type sinkURLFactoryFunc func(*url.URL) (MetricSink, error) - -// sinkRegistry supports the generic NewMetricSink function by mapping URL -// schemes to metric sink factory functions -var sinkRegistry = map[string]sinkURLFactoryFunc{ - "statsd": NewStatsdSinkFromURL, - "statsite": NewStatsiteSinkFromURL, - "inmem": NewInmemSinkFromURL, -} - -// NewMetricSinkFromURL allows a generic URL input to configure any of the -// supported sinks. The scheme of the URL identifies the type of the sink, the -// and query parameters are used to set options. -// -// "statsd://" - Initializes a StatsdSink. The host and port are passed through -// as the "addr" of the sink -// -// "statsite://" - Initializes a StatsiteSink. The host and port become the -// "addr" of the sink -// -// "inmem://" - Initializes an InmemSink. The host and port are ignored. The -// "interval" and "duration" query parameters must be specified with valid -// durations, see NewInmemSink for details. -func NewMetricSinkFromURL(urlStr string) (MetricSink, error) { - u, err := url.Parse(urlStr) - if err != nil { - return nil, err - } - - sinkURLFactoryFunc := sinkRegistry[u.Scheme] - if sinkURLFactoryFunc == nil { - return nil, fmt.Errorf( - "cannot create metric sink, unrecognized sink name: %q", u.Scheme) - } - - return sinkURLFactoryFunc(u) -} diff --git a/vendor/github.com/armon/go-metrics/start.go b/vendor/github.com/armon/go-metrics/start.go deleted file mode 100644 index 38976f8dc93..00000000000 --- a/vendor/github.com/armon/go-metrics/start.go +++ /dev/null @@ -1,158 +0,0 @@ -package metrics - -import ( - "os" - "sync" - "sync/atomic" - "time" - - iradix "github.com/hashicorp/go-immutable-radix" -) - -// Config is used to configure metrics settings -type Config struct { - ServiceName string // Prefixed with keys to separate services - HostName string // Hostname to use. If not provided and EnableHostname, it will be os.Hostname - EnableHostname bool // Enable prefixing gauge values with hostname - EnableHostnameLabel bool // Enable adding hostname to labels - EnableServiceLabel bool // Enable adding service to labels - EnableRuntimeMetrics bool // Enables profiling of runtime metrics (GC, Goroutines, Memory) - EnableTypePrefix bool // Prefixes key with a type ("counter", "gauge", "timer") - TimerGranularity time.Duration // Granularity of timers. - ProfileInterval time.Duration // Interval to profile runtime metrics - - AllowedPrefixes []string // A list of metric prefixes to allow, with '.' as the separator - BlockedPrefixes []string // A list of metric prefixes to block, with '.' as the separator - AllowedLabels []string // A list of metric labels to allow, with '.' as the separator - BlockedLabels []string // A list of metric labels to block, with '.' as the separator - FilterDefault bool // Whether to allow metrics by default -} - -// Metrics represents an instance of a metrics sink that can -// be used to emit -type Metrics struct { - Config - lastNumGC uint32 - sink MetricSink - filter *iradix.Tree - allowedLabels map[string]bool - blockedLabels map[string]bool - filterLock sync.RWMutex // Lock filters and allowedLabels/blockedLabels access -} - -// Shared global metrics instance -var globalMetrics atomic.Value // *Metrics - -func init() { - // Initialize to a blackhole sink to avoid errors - globalMetrics.Store(&Metrics{sink: &BlackholeSink{}}) -} - -// Default returns the shared global metrics instance. -func Default() *Metrics { - return globalMetrics.Load().(*Metrics) -} - -// DefaultConfig provides a sane default configuration -func DefaultConfig(serviceName string) *Config { - c := &Config{ - ServiceName: serviceName, // Use client provided service - HostName: "", - EnableHostname: true, // Enable hostname prefix - EnableRuntimeMetrics: true, // Enable runtime profiling - EnableTypePrefix: false, // Disable type prefix - TimerGranularity: time.Millisecond, // Timers are in milliseconds - ProfileInterval: time.Second, // Poll runtime every second - FilterDefault: true, // Don't filter metrics by default - } - - // Try to get the hostname - name, _ := os.Hostname() - c.HostName = name - return c -} - -// New is used to create a new instance of Metrics -func New(conf *Config, sink MetricSink) (*Metrics, error) { - met := &Metrics{} - met.Config = *conf - met.sink = sink - met.UpdateFilterAndLabels(conf.AllowedPrefixes, conf.BlockedPrefixes, conf.AllowedLabels, conf.BlockedLabels) - - // Start the runtime collector - if conf.EnableRuntimeMetrics { - go met.collectStats() - } - return met, nil -} - -// NewGlobal is the same as New, but it assigns the metrics object to be -// used globally as well as returning it. -func NewGlobal(conf *Config, sink MetricSink) (*Metrics, error) { - metrics, err := New(conf, sink) - if err == nil { - globalMetrics.Store(metrics) - } - return metrics, err -} - -// Proxy all the methods to the globalMetrics instance -func SetGauge(key []string, val float32) { - globalMetrics.Load().(*Metrics).SetGauge(key, val) -} - -func SetGaugeWithLabels(key []string, val float32, labels []Label) { - globalMetrics.Load().(*Metrics).SetGaugeWithLabels(key, val, labels) -} - -func EmitKey(key []string, val float32) { - globalMetrics.Load().(*Metrics).EmitKey(key, val) -} - -func IncrCounter(key []string, val float32) { - globalMetrics.Load().(*Metrics).IncrCounter(key, val) -} - -func IncrCounterWithLabels(key []string, val float32, labels []Label) { - globalMetrics.Load().(*Metrics).IncrCounterWithLabels(key, val, labels) -} - -func AddSample(key []string, val float32) { - globalMetrics.Load().(*Metrics).AddSample(key, val) -} - -func AddSampleWithLabels(key []string, val float32, labels []Label) { - globalMetrics.Load().(*Metrics).AddSampleWithLabels(key, val, labels) -} - -func MeasureSince(key []string, start time.Time) { - globalMetrics.Load().(*Metrics).MeasureSince(key, start) -} - -func MeasureSinceWithLabels(key []string, start time.Time, labels []Label) { - globalMetrics.Load().(*Metrics).MeasureSinceWithLabels(key, start, labels) -} - -func UpdateFilter(allow, block []string) { - globalMetrics.Load().(*Metrics).UpdateFilter(allow, block) -} - -// UpdateFilterAndLabels set allow/block prefixes of metrics while allowedLabels -// and blockedLabels - when not nil - allow filtering of labels in order to -// block/allow globally labels (especially useful when having large number of -// values for a given label). See README.md for more information about usage. -func UpdateFilterAndLabels(allow, block, allowedLabels, blockedLabels []string) { - globalMetrics.Load().(*Metrics).UpdateFilterAndLabels(allow, block, allowedLabels, blockedLabels) -} - -// Shutdown disables metric collection, then blocks while attempting to flush metrics to storage. -// WARNING: Not all MetricSink backends support this functionality, and calling this will cause them to leak resources. -// This is intended for use immediately prior to application exit. -func Shutdown() { - m := globalMetrics.Load().(*Metrics) - // Swap whatever MetricSink is currently active with a BlackholeSink. Callers must not have a - // reason to expect that calls to the library will successfully collect metrics after Shutdown - // has been called. - globalMetrics.Store(&Metrics{sink: &BlackholeSink{}}) - m.Shutdown() -} diff --git a/vendor/github.com/armon/go-metrics/statsd.go b/vendor/github.com/armon/go-metrics/statsd.go deleted file mode 100644 index 1bfffce46e2..00000000000 --- a/vendor/github.com/armon/go-metrics/statsd.go +++ /dev/null @@ -1,184 +0,0 @@ -package metrics - -import ( - "bytes" - "fmt" - "log" - "net" - "net/url" - "strings" - "time" -) - -const ( - // statsdMaxLen is the maximum size of a packet - // to send to statsd - statsdMaxLen = 1400 -) - -// StatsdSink provides a MetricSink that can be used -// with a statsite or statsd metrics server. It uses -// only UDP packets, while StatsiteSink uses TCP. -type StatsdSink struct { - addr string - metricQueue chan string -} - -// NewStatsdSinkFromURL creates an StatsdSink from a URL. It is used -// (and tested) from NewMetricSinkFromURL. -func NewStatsdSinkFromURL(u *url.URL) (MetricSink, error) { - return NewStatsdSink(u.Host) -} - -// NewStatsdSink is used to create a new StatsdSink -func NewStatsdSink(addr string) (*StatsdSink, error) { - s := &StatsdSink{ - addr: addr, - metricQueue: make(chan string, 4096), - } - go s.flushMetrics() - return s, nil -} - -// Close is used to stop flushing to statsd -func (s *StatsdSink) Shutdown() { - close(s.metricQueue) -} - -func (s *StatsdSink) SetGauge(key []string, val float32) { - flatKey := s.flattenKey(key) - s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val)) -} - -func (s *StatsdSink) SetGaugeWithLabels(key []string, val float32, labels []Label) { - flatKey := s.flattenKeyLabels(key, labels) - s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val)) -} - -func (s *StatsdSink) EmitKey(key []string, val float32) { - flatKey := s.flattenKey(key) - s.pushMetric(fmt.Sprintf("%s:%f|kv\n", flatKey, val)) -} - -func (s *StatsdSink) IncrCounter(key []string, val float32) { - flatKey := s.flattenKey(key) - s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val)) -} - -func (s *StatsdSink) IncrCounterWithLabels(key []string, val float32, labels []Label) { - flatKey := s.flattenKeyLabels(key, labels) - s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val)) -} - -func (s *StatsdSink) AddSample(key []string, val float32) { - flatKey := s.flattenKey(key) - s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val)) -} - -func (s *StatsdSink) AddSampleWithLabels(key []string, val float32, labels []Label) { - flatKey := s.flattenKeyLabels(key, labels) - s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val)) -} - -// Flattens the key for formatting, removes spaces -func (s *StatsdSink) flattenKey(parts []string) string { - joined := strings.Join(parts, ".") - return strings.Map(func(r rune) rune { - switch r { - case ':': - fallthrough - case ' ': - return '_' - default: - return r - } - }, joined) -} - -// Flattens the key along with labels for formatting, removes spaces -func (s *StatsdSink) flattenKeyLabels(parts []string, labels []Label) string { - for _, label := range labels { - parts = append(parts, label.Value) - } - return s.flattenKey(parts) -} - -// Does a non-blocking push to the metrics queue -func (s *StatsdSink) pushMetric(m string) { - select { - case s.metricQueue <- m: - default: - } -} - -// Flushes metrics -func (s *StatsdSink) flushMetrics() { - var sock net.Conn - var err error - var wait <-chan time.Time - ticker := time.NewTicker(flushInterval) - defer ticker.Stop() - -CONNECT: - // Create a buffer - buf := bytes.NewBuffer(nil) - - // Attempt to connect - sock, err = net.Dial("udp", s.addr) - if err != nil { - log.Printf("[ERR] Error connecting to statsd! Err: %s", err) - goto WAIT - } - - for { - select { - case metric, ok := <-s.metricQueue: - // Get a metric from the queue - if !ok { - goto QUIT - } - - // Check if this would overflow the packet size - if len(metric)+buf.Len() > statsdMaxLen { - _, err := sock.Write(buf.Bytes()) - buf.Reset() - if err != nil { - log.Printf("[ERR] Error writing to statsd! Err: %s", err) - goto WAIT - } - } - - // Append to the buffer - buf.WriteString(metric) - - case <-ticker.C: - if buf.Len() == 0 { - continue - } - - _, err := sock.Write(buf.Bytes()) - buf.Reset() - if err != nil { - log.Printf("[ERR] Error flushing to statsd! Err: %s", err) - goto WAIT - } - } - } - -WAIT: - // Wait for a while - wait = time.After(time.Duration(5) * time.Second) - for { - select { - // Dequeue the messages to avoid backlog - case _, ok := <-s.metricQueue: - if !ok { - goto QUIT - } - case <-wait: - goto CONNECT - } - } -QUIT: - s.metricQueue = nil -} diff --git a/vendor/github.com/armon/go-metrics/statsite.go b/vendor/github.com/armon/go-metrics/statsite.go deleted file mode 100644 index 6c0d284d2dd..00000000000 --- a/vendor/github.com/armon/go-metrics/statsite.go +++ /dev/null @@ -1,172 +0,0 @@ -package metrics - -import ( - "bufio" - "fmt" - "log" - "net" - "net/url" - "strings" - "time" -) - -const ( - // We force flush the statsite metrics after this period of - // inactivity. Prevents stats from getting stuck in a buffer - // forever. - flushInterval = 100 * time.Millisecond -) - -// NewStatsiteSinkFromURL creates an StatsiteSink from a URL. It is used -// (and tested) from NewMetricSinkFromURL. -func NewStatsiteSinkFromURL(u *url.URL) (MetricSink, error) { - return NewStatsiteSink(u.Host) -} - -// StatsiteSink provides a MetricSink that can be used with a -// statsite metrics server -type StatsiteSink struct { - addr string - metricQueue chan string -} - -// NewStatsiteSink is used to create a new StatsiteSink -func NewStatsiteSink(addr string) (*StatsiteSink, error) { - s := &StatsiteSink{ - addr: addr, - metricQueue: make(chan string, 4096), - } - go s.flushMetrics() - return s, nil -} - -// Close is used to stop flushing to statsite -func (s *StatsiteSink) Shutdown() { - close(s.metricQueue) -} - -func (s *StatsiteSink) SetGauge(key []string, val float32) { - flatKey := s.flattenKey(key) - s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val)) -} - -func (s *StatsiteSink) SetGaugeWithLabels(key []string, val float32, labels []Label) { - flatKey := s.flattenKeyLabels(key, labels) - s.pushMetric(fmt.Sprintf("%s:%f|g\n", flatKey, val)) -} - -func (s *StatsiteSink) EmitKey(key []string, val float32) { - flatKey := s.flattenKey(key) - s.pushMetric(fmt.Sprintf("%s:%f|kv\n", flatKey, val)) -} - -func (s *StatsiteSink) IncrCounter(key []string, val float32) { - flatKey := s.flattenKey(key) - s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val)) -} - -func (s *StatsiteSink) IncrCounterWithLabels(key []string, val float32, labels []Label) { - flatKey := s.flattenKeyLabels(key, labels) - s.pushMetric(fmt.Sprintf("%s:%f|c\n", flatKey, val)) -} - -func (s *StatsiteSink) AddSample(key []string, val float32) { - flatKey := s.flattenKey(key) - s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val)) -} - -func (s *StatsiteSink) AddSampleWithLabels(key []string, val float32, labels []Label) { - flatKey := s.flattenKeyLabels(key, labels) - s.pushMetric(fmt.Sprintf("%s:%f|ms\n", flatKey, val)) -} - -// Flattens the key for formatting, removes spaces -func (s *StatsiteSink) flattenKey(parts []string) string { - joined := strings.Join(parts, ".") - return strings.Map(func(r rune) rune { - switch r { - case ':': - fallthrough - case ' ': - return '_' - default: - return r - } - }, joined) -} - -// Flattens the key along with labels for formatting, removes spaces -func (s *StatsiteSink) flattenKeyLabels(parts []string, labels []Label) string { - for _, label := range labels { - parts = append(parts, label.Value) - } - return s.flattenKey(parts) -} - -// Does a non-blocking push to the metrics queue -func (s *StatsiteSink) pushMetric(m string) { - select { - case s.metricQueue <- m: - default: - } -} - -// Flushes metrics -func (s *StatsiteSink) flushMetrics() { - var sock net.Conn - var err error - var wait <-chan time.Time - var buffered *bufio.Writer - ticker := time.NewTicker(flushInterval) - defer ticker.Stop() - -CONNECT: - // Attempt to connect - sock, err = net.Dial("tcp", s.addr) - if err != nil { - log.Printf("[ERR] Error connecting to statsite! Err: %s", err) - goto WAIT - } - - // Create a buffered writer - buffered = bufio.NewWriter(sock) - - for { - select { - case metric, ok := <-s.metricQueue: - // Get a metric from the queue - if !ok { - goto QUIT - } - - // Try to send to statsite - _, err := buffered.Write([]byte(metric)) - if err != nil { - log.Printf("[ERR] Error writing to statsite! Err: %s", err) - goto WAIT - } - case <-ticker.C: - if err := buffered.Flush(); err != nil { - log.Printf("[ERR] Error flushing to statsite! Err: %s", err) - goto WAIT - } - } - } - -WAIT: - // Wait for a while - wait = time.After(time.Duration(5) * time.Second) - for { - select { - // Dequeue the messages to avoid backlog - case _, ok := <-s.metricQueue: - if !ok { - goto QUIT - } - case <-wait: - goto CONNECT - } - } -QUIT: - s.metricQueue = nil -} diff --git a/vendor/github.com/cilium/cilium/AUTHORS b/vendor/github.com/cilium/cilium/AUTHORS index 1151dec93cf..603eb8efc40 100644 --- a/vendor/github.com/cilium/cilium/AUTHORS +++ b/vendor/github.com/cilium/cilium/AUTHORS @@ -1,6 +1,7 @@ The following people, in alphabetical order, have either authored or signed off on commits in the Cilium repository: +a5r0n a5r0n@users.noreply.github.com Aaron Ecay aaron.ecay@sky.uk Àbéjídé Àyodélé abejideayodele@gmail.com Abirdcfly fp544037857@gmail.com @@ -20,7 +21,7 @@ Alban Crequy alban@kinvolk.io Aleksander Mistewicz amistewicz@google.com Aleksei Zakharov zakharov.a.g@yandex.ru Alexander Alemayhu alexander@alemayhu.com -Alexander Berger alex-berger@users.noreply.github.com +Alexander Berger alex-berger@gmx.ch Alexander Block ablock84@gmail.com Alexandre Perrin alex@isovalent.com Alexei Starovoitov alexei.starovoitov@gmail.com @@ -29,6 +30,8 @@ Alex Katsman alexkats@google.com Alex Romanov alex@romanov.ws Alex Szakaly alex.szakaly@gmail.com Alex Waring alex.waring@starlingbank.com +Alkama Hasan gl3118@myamu.ac.in +Alois Petutschnig alois@petutschnig.net Amey Bhide amey@covalent.io Amir Kheirkhahan amir.kheirkhahan@dbschenker.com amitmavgupta 115551423+amitmavgupta@users.noreply.github.com @@ -42,6 +45,7 @@ Andrei Kvapil kvapss@gmail.com André Martins andre@cilium.io Andrew Bulford andrew.bulford@form3.tech Andrew Holt andrew.holt@utmost.co +Andrew Li hui0787411@163.com Andrew Sauber 2046750+asauber@users.noreply.github.com Andrew Sy Kim kim.andrewsy@gmail.com Andrew Titmuss iandrewt@icloud.com @@ -66,8 +70,10 @@ Anton Ippolitov anton.ippolitov@datadoghq.com Antoni Zawodny zawodny@google.com Anton Protopopov aspsk@isovalent.com Anton Tykhyy atykhyy@gmail.com +Anubhab Majumdar anmajumdar@microsoft.com Anurag Aggarwal anurag.aggarwal@flipkart.com Archana Shinde archana.m.shinde@intel.com +Archer Wu archerwu9425@icloud.com Ardika Bagus me@ardikabs.com Arika Chen eaglesora@gmail.com Arnaud Meukam ameukam@gmail.com @@ -83,11 +89,13 @@ Ashwin Paranjpe ashwin@covalent.io Assiya Khuzyakhmetova assiya.khuzyakhmetova@nu.edu.kz Atkins Chang atkinschang@gmail.com Augustas Berneckas a.berneckas@gmail.com +Aurelien Benoist aurelien.benoist@sony.com Austin Cawley-Edwards austin.cawley@gmail.com AwesomePatrol AwesomePatrol@users.noreply.github.com ayesha khaliq ayeshakhaliqrana@gmail.com Ayush Dwivedi ayush.dwivedi@accuknox.com bakito github@bakito.ch +Barış Ekin Yıldırım 101638632+beyildirim@users.noreply.github.com Barun Acharya barun1024@gmail.com Basit Mustafa basit.mustafa@gmail.com Beatriz Martínez beatriz@isovalent.com @@ -105,7 +113,9 @@ Bolun Zhao blzhao@google.com Boran Car boran.car@gmail.com Boris Petrovic carnerito.b@gmail.com Brad Whitfield bradswhitfield@gmail.com +Brandon Ewing brandon.ewing@imc.com Brandon McNama brandonmcnama@outlook.com +Brian Payne payne.in.the.brian@gmail.com Brian Topping brian@coglative.com Bruno Miguel Custódio brunomcustodio@gmail.com Bryan Stenson bryan.stenson@okta.com @@ -116,12 +126,15 @@ Canh Ngo canhnt@gmail.com Carlos Andrés Rocha rchalumeau@magicleap.com Carlos Castro carlos.castro@jumo.world Carson Anderson carson.anderson@goteleport.com +Carson Yang yangchuansheng33@gmail.com Casey Callendrello cdc@isovalent.com +cdtzabra 22188574+cdtzabra@users.noreply.github.com Cezary Zawadka czawadka@google.com Chance Zibolski chance.zibolski@gmail.com Changyu Wang changyuwang@tencent.com Charles-Edouard Brétéché charled.breteche@gmail.com Charles-Henri Guérin charles-henri.guerin@zenika.com +Charles Uneze charlesniklaus@gmail.com chaunceyjiang chaunceyjiang@gmail.com Chen Kang kongchen28@gmail.com chentanjun tanjunchen20@gmail.com @@ -137,9 +150,11 @@ Christine Chen christine.chen@datadoghq.com Christine Kim xtineskim@gmail.com Christopher Biscardi chris@christopherbiscardi.com Christopher Schmidt fakod666@gmail.com +Christoph Puhl cpu@isovalent.com Chris Werner Rau cwrau@cwrau.info ChrsMark chrismarkou92@gmail.com Cilium Imagebot noreply@cilium.io +Cilium Release Bot noreply@cilium.io Cintia Sanchez Garcia cynthiasg@icloud.com CJ Virtucio cjv287@gmail.com Claudia J. Kang claudiajkang@gmail.com @@ -157,9 +172,11 @@ Cyril Scetbon cscetbon@gmail.com czybjtu smartczy@outlook.com Dale Ragan dale.ragan@sap.com Dalton Hubble dghubble@gmail.com +Damian Sawicki dsawicki@google.com Dan Everton deverton@godaddy.com Daneyon Hansen daneyon.hansen@solo.io Đặng Minh Dũng dungdm93@live.com +Daniel Bodky daniel.bodky@netways.de Daniel Borkmann daniel@iogearbox.net Daniel Dao dqminh89@gmail.com Daniel Finneran dan@thebsdbox.co.uk @@ -178,7 +195,7 @@ David Bimmler david.bimmler@isovalent.com David Birks davidebirks@gmail.com David Bouchare david.bouchare@datadoghq.com David Calvert david@0xdc.me -David Chen davidchen94@outlook.com +David Cheng david.cheng@shopline.com David Donchez donch@dailymotion.com David Korczynski david@adalogics.com David Leadbeater dgl@dgl.cx @@ -194,6 +211,7 @@ Denis GERMAIN dgermain@deezer.com Denis Khachyan khachyanda.gmail.com Derek Gaffney 17263955+gaffneyd4@users.noreply.github.com Deshi Xiao xiaods@gmail.com +deterclosed fliter@outlook.com Devarshi Sathiya devarshisathiya5@gmail.com Dharma Bellamkonda dharma.bellamkonda@gmail.com Didier Durand durand.didier@gmail.com @@ -232,6 +250,7 @@ Eohyung Lee liquidnuker@gmail.com Eric Bailey e.bailey@sportradar.com Eric Ferreira ericarlos23@gmail.com Eric Hausig 16280871+ehausig@users.noreply.github.com +Eric Mountain eric.mountain@datadoghq.com Eric M. Yanulis eric@eyanulis.net Eric Ripa eric@ripa.io Erik Chang erik.chang@nordstrom.com @@ -244,6 +263,7 @@ Fankaixi Li fankaixi.li@bytedance.com Federico Hernandez f@ederi.co Felix Färjsjö felix.farjsjo@gmail.com fengshunli 1171313930@qq.com +ferenets ferenets@nebius.com Fernand Galiana fernand.galiana@gmail.com Feroz Salam feroz.salam@isovalent.com FeynmanZhou pengfeizhou@yunify.com @@ -265,6 +285,7 @@ Gaurav Yadav gaurav.dev.iiitm@gmail.com Gavin McNair gavin.mcnair@kaluza.com George Gaál gb12335@gmail.com George Kontridze gkontridze@plaid.com +Gerald Pape gerald@giantswarm.io Geyslan G. Bem geyslan@gmail.com GH action ghabot@does.not.exist.cilium.org Gianluca Arbezzano gianarb92@gmail.com @@ -274,12 +295,12 @@ Glen Yu glen.yu@gmail.com Glib Smaga code@gsmaga.com Gobinath Krishnamoorthy gobinathk@google.com Gowtham Sundara gowtham.sundara@rapyuta-robotics.com -gray greyschwinger@gmail.com -Gray Lian gray.liang@isovalent.com +Gray Liang gray.liang@isovalent.com +guangwu guoguangwug@gmail.com Guilherme Oki guilherme.oki@wildlifestudios.com Guilherme Souza 101073+guilhermef@users.noreply.github.com Gunju Kim gjkim042@gmail.com -guoguangwu guoguangwu@magic-shield.com +hacktivist123 akintayoshedrack@gmail.com Haitao Li lihaitao@gmail.com Haiyue Wang haiyue.wang@intel.com Hang Yan hang.yan@hotmail.com @@ -289,38 +310,46 @@ Hao Zhang hao.zhang.am.i@gmail.com Harsh Modi harshmodi@google.com harsimran pabla hpabla@isovalent.com Hart Hoover hart.hoover@gmail.com +Hector Monsalve hmonsalv@gmail.com Heiko Rothe me@heikorothe.com Hemanth Malla hemanth.malla@datadoghq.com Hemslo Wang hemslo.wang@gmail.com +Hong Chen hong.chen.7219@gmail.com Hrittik hrittikcom@gmail.com Huagong Wang wanghuagong@kylinos.cn huangxuesen huangxuesen@kuaishou.com Hui Kong hui.kong@qunar.com +Hunter Gregory 42728408+huntergregory@users.noreply.github.com Hunter Massey hmassey@tradestation.com Husni Alhamdani dhanielluis@gmail.com +Huweicai i@huweicai.com hxysayhi 51870525+hxysayhi@users.noreply.github.com Ian Vernon ian@cilium.io Ifeanyi Ubah ify1992@yahoo.com Iiqbal2000 iqbalhafizh2000@gmail.com +Ilia Chernov cherno8.ilya@gmail.com Ilya Dmitrichenko errordeveloper@gmail.com Ilya Shaisultanov ilya.shaisultanov@gmail.com Ioannis Androulidakis androulidakis.ioannis@gmail.com +Isala Piyarisi mail@isala.me ishuar ishansharma887@gmail.com Ivan Makarychev i.makarychev@tinkoff.ru Ivar Lazzaro ivarlazzaro@gmail.com Jack-R-lantern tjdfkr2421@gmail.com +Jacob Henner henner@arcesium.com Jacopo Nardiello jnardiello@users.noreply.github.com Jaff Cheng jaff.cheng.sh@gmail.com Jaime Caamaño Ruiz jcaamano@suse.com +James Bodkin james.bodkin@amphora.net James Brookes jbrookes@confluent.io James Laverack james@isovalent.com James McShane james.mcshane@superorbital.io Jan-Erik Rediger janerik@fnordig.de Jan Jansen jan.jansen@gdata.de Jan Mraz strudelpi@pm.me +janvi01 janvibajo1@gmail.com Jarno Rajahalme jarno@isovalent.com Jason Aliyetti jaliyetti@gmail.com -JBodkin-Amphora james.bodkin@amphora.net Jean Raby jean@raby.sh Jed Salazar jedsalazar@gmail.com Jef Spaleta jspaleta@gmail.com @@ -333,7 +362,9 @@ Jian Zeng anonymousknight96@gmail.com JieJhih Jhang jiejhihjhang@gmail.com jignyasamishra iamjignyasa@gmail.com Jim Angel jimangel@google.com.com +Jimmy Song rootsongjc@gmail.com Jim Ntosas ntosas@gmail.com +Jingyuan Liang jingyuanliang@google.com JinLin Fu withlin@apache.org Jiong Wang jiong.wang@netronome.com jiuker 2818723467@qq.com @@ -348,15 +379,18 @@ Johannes Liebermann johanan.liebermann@gmail.com John Fastabend john.fastabend@gmail.com John Gardiner Myers jgmyers@proofpoint.com John Howard howardjohn@google.com +John Karoyannis karoyannis@yahoo.com John Watson johnw@planetscale.com John Zheng johnzhengaz@gmail.com Jomen Xiao jomenxiao@gmail.com Jonathan Davies jpds@protonmail.com Jonathan Grahl jonathan@keyholders.io Jones Shi shilei@hotstone.com.cn +Jonny jonny@linkpool.io Jooho Lee jhlee@si-analytics.ai Jorik Jonker jorik.jonker@eu.equinix.com Joseph-Irving joseph.irving500@gmail.com +Joseph Ligier joseph.ligier@accenture.com Joseph Sheng jiajun.sheng@microfocus.com Joseph Stevens thejosephstevens@gmail.com Joshua Roppo joshroppo@gmail.com @@ -384,6 +418,7 @@ Kenshin Chen smwyzi@qq.com kerthcet kerthcet@gmail.com Kevin Burke kevin@burke.dev Kevin Holditch 82885135+kevholditch-f3@users.noreply.github.com +Kevin Reeuwijk kevin.reeuwijk@spectrocloud.com Kiran Bondalapati kiran@bondalapati.com Kir Kolyshkin kolyshkin@gmail.com Koichiro Den den@klaipeden.com @@ -394,8 +429,10 @@ Laurent Bernaille laurent.bernaille@datadoghq.com Lawrence Gadban lawrence.gadban@solo.io ldelossa louis.delos@gmail.com Lehner Florian dev@der-flo.net +Leiw steven.l.wang@linux.intel.com Leonard Cohnen lc@edgeless.systems leonliao xiaobo.liao@gmail.com +Liam Parker liamchat500@gmail.com Liang Zhou zhoul110@chinatelecom.cn Li Chengyuan chengyuanli@hotmail.com Li Chun lichun823@gmail.com @@ -409,13 +446,15 @@ Livingstone S E livingstone.s.e@gmail.com Li Yiheng lyhutopi@gmail.com Liz Rice liz@lizrice.com log1cb0mb nabeelnrana@gmail.com +Loïc Blot nerzhul@users.noreply.github.com LongHui Li longhui.li@woqutech.com loomkoom 29258685+loomkoom@users.noreply.github.com Lorenz Bauer lmb@isovalent.com Lorenzo Fundaró lorenzofundaro@gmail.com -Louis DeLosSantos louis@isovalent.com +Louis DeLosSantos louis.delos@isovalent.com lou-lan loulan@loulan.me Lucas Leblow lucasleblow@mailbox.org +Lucas Rattz lucas.rattz@syself.com lucming 2876757716@qq.com Ludovic Ortega ludovic.ortega@adminafk.fr Lukas Stehlik stehlik.lukas@gmail.com @@ -427,6 +466,7 @@ Madhu Challa madhu@cilium.io Madhusudan.C.S madhusudancs@gmail.com Mahadev Panchal mahadev.panchal@benisontech.com MaiReo sawako.saki@gmail.com +Mais mai.saleh@siemens.com Maksym Lushpenko iviakciivi@gmail.com Manali Bhutiyani manali@covalent.io Mandar U Jog mjog@google.com @@ -440,7 +480,9 @@ Marco Aurelio Caldas Miranda 17923899+macmiranda@users.noreply.github Marco Hofstetter marco.hofstetter@isovalent.com Marco Iorio marco.iorio@isovalent.com Marco Kilchhofer mkilchhofer@users.noreply.github.com +Marc 'risson' Schmitt marc.schmitt@risson.space Marc Stulz m@footek.ch +Marc Suñé marc.sune@isovalent.com Marek Chodor mchodor@google.com Marga Manterola marga@isovalent.com Marino Wijay 45947861+distributethe6ix@users.noreply.github.com @@ -448,8 +490,8 @@ Mario Constanti mario@constanti.de Marius Gerling marius.gerling@uniberg.com Mark deVilliers markdevilliers@gmail.com Mark Pashmfouroush mark@isovalent.com -Mark St John markstjohn@google.com Markus Blaschke mblaschke82@gmail.com +Markus Nilsson markus.nilsson@yubico.com Martin Charles martincharles07@gmail.com Martin Koppehel martin.koppehel@st.ovgu.de Martin Odstrcilik martin.odstrcilik@gmail.com @@ -465,6 +507,7 @@ Matt Anderson matanderson@equinix.com Matthew Fenwick mfenwick100@gmail.com Matthew Gumport me@gum.pt Matthieu Antoine matthieu.antoine@jumo.world +Matthieu MOREL matthieu.morel35@gmail.com Matt Layher mdlayher@gmail.com Matyáš Kroupa kroupa.matyas@gmail.com Mauricio Vásquez mauricio@kinvolk.io @@ -474,6 +517,7 @@ Maximilian Bischoff maximilian.bischoff@inovex.de Maximilian Mack max@mack.io Maxim Mikityanskiy maxim@isovalent.com Max Körbächer 16919345+mkorbi@users.noreply.github.com +MeherRushi sudharushi0@gmail.com Melissa Peiffer mbp83@nau.edu Michael Aspinwall maspinwall@google.com Michael Fischer fiscmi@amazon.com @@ -493,6 +537,7 @@ Michi Mutsuzaki michi@isovalent.com Mike Fedosin mfedosin@gmail.com MikeLing sabergeass@gmail.com Mike Mwanje mwanjemike767@gmail.com +Misha Bragin bangvalo@gmail.com Mitch Hulscher mitch.hulscher@lib.io Moh Ahmed moh.ahmed@cengn.ca Mohammad Yosefpor 47300215+m-yosefpor@users.noreply.github.com @@ -500,6 +545,9 @@ Mohit Marathe mohitmarathe23@gmail.com Moritz Eckert m1gh7ym0@gmail.com Moritz Johner beller.moritz@googlemail.com Moshe Immerman moshe.immerman@vitalitygroup.com +mrproliu 741550557@qq.com +mvtab mvtabilitas@protonmail.com +naoki-take naoki-take@cybozu.co.jp Natalia Reka Ivanko natalia@isovalent.com Nate Sweet nathanjsweet@pm.me Nate Taylor ntaylor1781@gmail.com @@ -514,7 +562,7 @@ Neil Seward neil.seward@elasticpath.com Neil Wilson neil@aldur.co.uk Neutrollized glen.yu@gmail.com Nick M 4718+rkage@users.noreply.github.com -Nick Young nick@isovalent.com +Nick Young ynick@cisco.com Niclas Mietz solidnerd@users.noreply.github.com Nico Berlee nico.berlee@on2it.net Nicolas Busseneau nicolas@isovalent.com @@ -522,7 +570,7 @@ Nico Vibert nicolas.vibert@isovalent.com Nikhil Jha nikhiljha@users.noreply.github.com Nikhil Sharma nikhilsharma230303@gmail.com Nikolay Aleksandrov nikolay@isovalent.com -Nikolay Nikolaev nicknickolaev@gmail.com +Nikolay Nikolaev nikolay.nikolaev@isovalent.com Nirmoy Das ndas@suse.de Nishant Burte nburte@google.com Nitish Malhotra nitishm@microsoft.com @@ -540,7 +588,10 @@ Oliver Ni oliver.ni@gmail.com Oliver Wang a0924100192@gmail.com Omar Aloraini ooraini.dev@gmail.com Ondrej Blazek ondrej.blazek@firma.seznam.cz +Ondrej Sika ondrej@ondrejsika.com +Oshan Galwaduge oshan304@gmail.com Osthues osthues.matthias@gmail.com +Ovidiu Tirla otirla@google.com Pablo Ruiz pablo.ruiz@gmail.com Paco Xu paco.xu@daocloud.io Parth Patel parth.psu@gmail.com @@ -553,6 +604,7 @@ Pat Riehecky riehecky@fnal.gov Patrik Cyvoct patrik@ptrk.io Paul Bailey spacepants@users.noreply.github.com Paul Chaignon paul.chaignon@gmail.com +Paulo Castello da Costa pcastello@google.com Paulo Gomes pjbgf@linux.com Pavel Pavlov 40396270+PavelPavlov46@users.noreply.github.com Paweł Prażak pawelprazak@users.noreply.github.com @@ -561,6 +613,7 @@ pengbinbin1 pengbiny@163.com Pengfei Song pengfei.song@daocloud.io Peter Jausovec peter.jausovec@solo.io Peter Slovak slovak.peto@gmail.com +Petr Baloun petr.baloun@firma.seznam.cz Philippe Lafoucrière philippe.lafoucriere@gmail.com Philipp Gniewosz philipp.gniewosz@daimlertruck.com Philip Schmid phisch@cisco.com @@ -591,22 +644,27 @@ Ray Bejjani ray.bejjani@gmail.com Raymond de Jong raymond.dejong@isovalent.com Reilly Brogan reilly@reillybrogan.com Rei Shimizu Shikugawa@gmail.com +Remi Gelinas mail@remigelin.as Rémy Léone rleone@scaleway.com Renat Tuktarov yandzeek@gmail.com Renaud Gaubert renaud@openai.com Rene Luria rene@luria.ch René Veenhuis re.veenhuis@gmail.com Rene Zbinden rene.zbinden@postfinance.ch +renyunkang rykren1998@gmail.com Richard Lavoie richard.lavoie@logmein.com Richard Tweed RichardoC@users.noreply.github.com Ricky Ho horicky78@gmail.com Rio Kierkels riokierkels@gmail.com +Robin Elfrink robin@15augustus.nl Robin Gögge r.goegge@isovalent.com Robin Hahling robin.hahling@gw-computing.net +Rob Scott robertjscott@google.com Rocky Chen 40374064+rockc2020@users.noreply.github.com Rodrigo Chacon rochacon@gmail.com Romain Lenglet rlenglet@google.com Roman Ptitcyn romanspb@yahoo.com +Romuald Zdebskiy zdebskiy@hotmail.com Ronald van Zantvoort the.loeki@gmail.com Ross Guarino rssguar@gmail.com Rui Gu rui@covalent.io @@ -647,12 +705,14 @@ Shantanu Deshpande shantanud106@gmail.com Shunpoco tkngsnsk313320@gmail.com Sigurd Spieckermann sigurd.spieckermann@gmail.com Simone Sciarrati s.sciarrati@gmail.com +Simon Felding 45149055+simonfelding@users.noreply.github.com Simon Pasquier spasquier@mirantis.com sknop 118932232+sknop-cgn@users.noreply.github.com Smaine Kahlouch smainklh@gmail.com soggiest nicholas@isovalent.com spacewander spacewanderlzx@gmail.com Stacy Kim stacy.kim@ucla.edu +Stefan Zwanenburg stefan@zwanenburg.info Stephen Martin lockwood@opperline.com Steve Gargan sgargan@qualtrics.com Steven Ceuppens steven.ceuppens@icloud.com @@ -670,6 +730,7 @@ Sugang Li sugangli@google.com Sven Haardiek sven.haardiek@uni-muenster.de Swaminathan Vasudevan svasudevan@suse.com Taeung Song treeze.taeung@gmail.com +Taizeng Wu wutaizeng@gmail.com Takayoshi Nishida takayoshi.nishida@gmail.com Tamilmani tamanoha@microsoft.com Tam Mach tam.mach@cilium.io @@ -700,6 +761,7 @@ Tommo Cowling 952241+tlcowling@users.noreply.github.co Tomoki Sugiura tomoki-sugiura@cybozu.co.jp Tomoya Fujita Tomoya.Fujita@sony.com Tom Payne twpayne@gmail.com +Toni Tauro toni.tauro@adfinis.com Tony Lambiris tony@criticalstack.com Tony Lu tonylu@linux.alibaba.com Tony Norlin tony.norlin@localdomain.se @@ -709,6 +771,7 @@ Travis Glenn Hansen travisghansen@yahoo.com Trevor Roberts Jr Trevor.Roberts.Jr@gmail.com Trevor Tao trevor.tao@arm.com Umesh Keerthy B S umesh.freelance@gmail.com +Umesh Keerthy umesh.freelance@gmail.com usiegl00 50933431+usiegl00@users.noreply.github.com Vadim Ponomarev velizarx@gmail.com vakr vakr@microsoft.com @@ -716,11 +779,12 @@ Valas Valancius valas@google.com Vance Li vanceli@tencent.com Vigneshwaren Sunder vickymailed@gmail.com viktor-kurchenko viktor.kurchenko@isovalent.com +Viktor Kurchenko viktor.kurchenko@isovalent.com Viktor Kuzmin kvaster@gmail.com Viktor Oreshkin imselfish@stek29.rocks Ville Ojamo bluikko@users.noreply.github.com Vincent Li vincent.mc.li@gmail.com -Vipul Singh vipul21sept@gmail.com +Vipul Singh singhvipul@microsoft.com Vishal Choudhary sendtovishalchoudhary@gmail.com Vishnu Soman K vishnusomank05@gmail.com Vlad Artamonov 742047+vladdy@users.noreply.github.com @@ -731,12 +795,14 @@ Vlad Ungureanu vladu@palantir.com Wang Dong xdragon007@gmail.com Wang Li wangli09@kuaishou.com Wang Zhen lazybetrayer@gmail.com +Wanlin Du wanlindu@google.com Wayne Haber whaber@gitlab.com Wazir Ahmed wazir@accuknox.com Weilong Cui cuiwl@google.com Wei Yang wei.yang@daocloud.io Weizhou Lan weizhou.lan@daocloud.io Wenhu Wang wang15691700816@gmail.com +wenlxie xwlpt@126.com Wenxian Li wofanli@gmail.com Will Daly widaly@microsoft.com Will Deuschle wdeuschle@palantir.com @@ -749,13 +815,13 @@ Xiaoyang Zhu zhuxiaoyang1996@gmail.com XiaozhiD-web chuanzhi.dai@daocloud.io Xin Li xin.li@daocloud.io Xinyuan Zhang zhangxinyuan@google.com -xyz-li hui0787411@163.com yanggang gang.yang@daocloud.io yanhongchang yanhongchang@100tal.com Yash Shetty yashshetty@google.com Ye Sijun junnplus@gmail.com Yiannis Yiakoumis yiannis@selfienetworks.com Yingnan Zhang 342144303@qq.com +yogesh1801 yogeshsingla481@gmail.com Yongkun Gui ygui@google.com Yosh de Vos yosh@elzorro.nl youhonglian honglian.you@daocloud.io @@ -766,6 +832,7 @@ Yugo Kobayashi kobdotsh@gmail.com yulng wei.yang@daocloud.io Yurii Dzobak yurii.dzobak@lotusflare.com Yurii Komar Subreptivus@gmail.com +Yusho Yamaguchi yusho.yamaguchi@sony.com Yusuke Suzuki yusuke.suzuki@isovalent.com Yutaro Hayakawa yutaro.hayakawa@isovalent.com Yves Blusseau yves.blusseau@acoss.fr diff --git a/vendor/github.com/cilium/cilium/api/v1/client/bgp/bgp_client.go b/vendor/github.com/cilium/cilium/api/v1/client/bgp/bgp_client.go deleted file mode 100644 index e7ee6fb081f..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/bgp/bgp_client.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package bgp - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new bgp API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for bgp API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetBgpPeers(params *GetBgpPeersParams, opts ...ClientOption) (*GetBgpPeersOK, error) - - GetBgpRoutePolicies(params *GetBgpRoutePoliciesParams, opts ...ClientOption) (*GetBgpRoutePoliciesOK, error) - - GetBgpRoutes(params *GetBgpRoutesParams, opts ...ClientOption) (*GetBgpRoutesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GetBgpPeers lists operational state of b g p peers - - Retrieves current operational state of BGP peers created by - -Cilium BGP virtual router. This includes session state, uptime, -information per address family, etc. -*/ -func (a *Client) GetBgpPeers(params *GetBgpPeersParams, opts ...ClientOption) (*GetBgpPeersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBgpPeersParams() - } - op := &runtime.ClientOperation{ - ID: "GetBgpPeers", - Method: "GET", - PathPattern: "/bgp/peers", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetBgpPeersReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetBgpPeersOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetBgpPeers: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetBgpRoutePolicies lists b g p route policies configured in b g p control plane - -Retrieves route policies from BGP Control Plane. -*/ -func (a *Client) GetBgpRoutePolicies(params *GetBgpRoutePoliciesParams, opts ...ClientOption) (*GetBgpRoutePoliciesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBgpRoutePoliciesParams() - } - op := &runtime.ClientOperation{ - ID: "GetBgpRoutePolicies", - Method: "GET", - PathPattern: "/bgp/route-policies", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetBgpRoutePoliciesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetBgpRoutePoliciesOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetBgpRoutePolicies: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetBgpRoutes lists b g p routes from b g p control plane r i b - -Retrieves routes from BGP Control Plane RIB filtered by parameters you specify -*/ -func (a *Client) GetBgpRoutes(params *GetBgpRoutesParams, opts ...ClientOption) (*GetBgpRoutesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetBgpRoutesParams() - } - op := &runtime.ClientOperation{ - ID: "GetBgpRoutes", - Method: "GET", - PathPattern: "/bgp/routes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetBgpRoutesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetBgpRoutesOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetBgpRoutes: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_peers_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_peers_parameters.go deleted file mode 100644 index 9b4fb3d7cb6..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_peers_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package bgp - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetBgpPeersParams creates a new GetBgpPeersParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetBgpPeersParams() *GetBgpPeersParams { - return &GetBgpPeersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBgpPeersParamsWithTimeout creates a new GetBgpPeersParams object -// with the ability to set a timeout on a request. -func NewGetBgpPeersParamsWithTimeout(timeout time.Duration) *GetBgpPeersParams { - return &GetBgpPeersParams{ - timeout: timeout, - } -} - -// NewGetBgpPeersParamsWithContext creates a new GetBgpPeersParams object -// with the ability to set a context for a request. -func NewGetBgpPeersParamsWithContext(ctx context.Context) *GetBgpPeersParams { - return &GetBgpPeersParams{ - Context: ctx, - } -} - -// NewGetBgpPeersParamsWithHTTPClient creates a new GetBgpPeersParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBgpPeersParamsWithHTTPClient(client *http.Client) *GetBgpPeersParams { - return &GetBgpPeersParams{ - HTTPClient: client, - } -} - -/* -GetBgpPeersParams contains all the parameters to send to the API endpoint - - for the get bgp peers operation. - - Typically these are written to a http.Request. -*/ -type GetBgpPeersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get bgp peers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBgpPeersParams) WithDefaults() *GetBgpPeersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get bgp peers params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBgpPeersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get bgp peers params -func (o *GetBgpPeersParams) WithTimeout(timeout time.Duration) *GetBgpPeersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get bgp peers params -func (o *GetBgpPeersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get bgp peers params -func (o *GetBgpPeersParams) WithContext(ctx context.Context) *GetBgpPeersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get bgp peers params -func (o *GetBgpPeersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get bgp peers params -func (o *GetBgpPeersParams) WithHTTPClient(client *http.Client) *GetBgpPeersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get bgp peers params -func (o *GetBgpPeersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBgpPeersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_peers_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_peers_responses.go deleted file mode 100644 index a1ed8d93ca8..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_peers_responses.go +++ /dev/null @@ -1,233 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package bgp - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetBgpPeersReader is a Reader for the GetBgpPeers structure. -type GetBgpPeersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBgpPeersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBgpPeersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 500: - result := NewGetBgpPeersInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 501: - result := NewGetBgpPeersDisabled() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetBgpPeersOK creates a GetBgpPeersOK with default headers values -func NewGetBgpPeersOK() *GetBgpPeersOK { - return &GetBgpPeersOK{} -} - -/* -GetBgpPeersOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBgpPeersOK struct { - Payload []*models.BgpPeer -} - -// IsSuccess returns true when this get bgp peers o k response has a 2xx status code -func (o *GetBgpPeersOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get bgp peers o k response has a 3xx status code -func (o *GetBgpPeersOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get bgp peers o k response has a 4xx status code -func (o *GetBgpPeersOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get bgp peers o k response has a 5xx status code -func (o *GetBgpPeersOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get bgp peers o k response a status code equal to that given -func (o *GetBgpPeersOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetBgpPeersOK) Error() string { - return fmt.Sprintf("[GET /bgp/peers][%d] getBgpPeersOK %+v", 200, o.Payload) -} - -func (o *GetBgpPeersOK) String() string { - return fmt.Sprintf("[GET /bgp/peers][%d] getBgpPeersOK %+v", 200, o.Payload) -} - -func (o *GetBgpPeersOK) GetPayload() []*models.BgpPeer { - return o.Payload -} - -func (o *GetBgpPeersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBgpPeersInternalServerError creates a GetBgpPeersInternalServerError with default headers values -func NewGetBgpPeersInternalServerError() *GetBgpPeersInternalServerError { - return &GetBgpPeersInternalServerError{} -} - -/* -GetBgpPeersInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetBgpPeersInternalServerError struct { - Payload models.Error -} - -// IsSuccess returns true when this get bgp peers internal server error response has a 2xx status code -func (o *GetBgpPeersInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get bgp peers internal server error response has a 3xx status code -func (o *GetBgpPeersInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get bgp peers internal server error response has a 4xx status code -func (o *GetBgpPeersInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get bgp peers internal server error response has a 5xx status code -func (o *GetBgpPeersInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get bgp peers internal server error response a status code equal to that given -func (o *GetBgpPeersInternalServerError) IsCode(code int) bool { - return code == 500 -} - -func (o *GetBgpPeersInternalServerError) Error() string { - return fmt.Sprintf("[GET /bgp/peers][%d] getBgpPeersInternalServerError %+v", 500, o.Payload) -} - -func (o *GetBgpPeersInternalServerError) String() string { - return fmt.Sprintf("[GET /bgp/peers][%d] getBgpPeersInternalServerError %+v", 500, o.Payload) -} - -func (o *GetBgpPeersInternalServerError) GetPayload() models.Error { - return o.Payload -} - -func (o *GetBgpPeersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBgpPeersDisabled creates a GetBgpPeersDisabled with default headers values -func NewGetBgpPeersDisabled() *GetBgpPeersDisabled { - return &GetBgpPeersDisabled{} -} - -/* -GetBgpPeersDisabled describes a response with status code 501, with default header values. - -BGP Control Plane disabled -*/ -type GetBgpPeersDisabled struct { - Payload models.Error -} - -// IsSuccess returns true when this get bgp peers disabled response has a 2xx status code -func (o *GetBgpPeersDisabled) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get bgp peers disabled response has a 3xx status code -func (o *GetBgpPeersDisabled) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get bgp peers disabled response has a 4xx status code -func (o *GetBgpPeersDisabled) IsClientError() bool { - return false -} - -// IsServerError returns true when this get bgp peers disabled response has a 5xx status code -func (o *GetBgpPeersDisabled) IsServerError() bool { - return true -} - -// IsCode returns true when this get bgp peers disabled response a status code equal to that given -func (o *GetBgpPeersDisabled) IsCode(code int) bool { - return code == 501 -} - -func (o *GetBgpPeersDisabled) Error() string { - return fmt.Sprintf("[GET /bgp/peers][%d] getBgpPeersDisabled %+v", 501, o.Payload) -} - -func (o *GetBgpPeersDisabled) String() string { - return fmt.Sprintf("[GET /bgp/peers][%d] getBgpPeersDisabled %+v", 501, o.Payload) -} - -func (o *GetBgpPeersDisabled) GetPayload() models.Error { - return o.Payload -} - -func (o *GetBgpPeersDisabled) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_route_policies_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_route_policies_parameters.go deleted file mode 100644 index db2421c1a4f..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_route_policies_parameters.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package bgp - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetBgpRoutePoliciesParams creates a new GetBgpRoutePoliciesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetBgpRoutePoliciesParams() *GetBgpRoutePoliciesParams { - return &GetBgpRoutePoliciesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBgpRoutePoliciesParamsWithTimeout creates a new GetBgpRoutePoliciesParams object -// with the ability to set a timeout on a request. -func NewGetBgpRoutePoliciesParamsWithTimeout(timeout time.Duration) *GetBgpRoutePoliciesParams { - return &GetBgpRoutePoliciesParams{ - timeout: timeout, - } -} - -// NewGetBgpRoutePoliciesParamsWithContext creates a new GetBgpRoutePoliciesParams object -// with the ability to set a context for a request. -func NewGetBgpRoutePoliciesParamsWithContext(ctx context.Context) *GetBgpRoutePoliciesParams { - return &GetBgpRoutePoliciesParams{ - Context: ctx, - } -} - -// NewGetBgpRoutePoliciesParamsWithHTTPClient creates a new GetBgpRoutePoliciesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBgpRoutePoliciesParamsWithHTTPClient(client *http.Client) *GetBgpRoutePoliciesParams { - return &GetBgpRoutePoliciesParams{ - HTTPClient: client, - } -} - -/* -GetBgpRoutePoliciesParams contains all the parameters to send to the API endpoint - - for the get bgp route policies operation. - - Typically these are written to a http.Request. -*/ -type GetBgpRoutePoliciesParams struct { - - /* RouterAsn. - - Autonomous System Number (ASN) identifying a BGP virtual router instance. - If not specified, all virtual router instances are selected. - - */ - RouterAsn *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get bgp route policies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBgpRoutePoliciesParams) WithDefaults() *GetBgpRoutePoliciesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get bgp route policies params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBgpRoutePoliciesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get bgp route policies params -func (o *GetBgpRoutePoliciesParams) WithTimeout(timeout time.Duration) *GetBgpRoutePoliciesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get bgp route policies params -func (o *GetBgpRoutePoliciesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get bgp route policies params -func (o *GetBgpRoutePoliciesParams) WithContext(ctx context.Context) *GetBgpRoutePoliciesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get bgp route policies params -func (o *GetBgpRoutePoliciesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get bgp route policies params -func (o *GetBgpRoutePoliciesParams) WithHTTPClient(client *http.Client) *GetBgpRoutePoliciesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get bgp route policies params -func (o *GetBgpRoutePoliciesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithRouterAsn adds the routerAsn to the get bgp route policies params -func (o *GetBgpRoutePoliciesParams) WithRouterAsn(routerAsn *int64) *GetBgpRoutePoliciesParams { - o.SetRouterAsn(routerAsn) - return o -} - -// SetRouterAsn adds the routerAsn to the get bgp route policies params -func (o *GetBgpRoutePoliciesParams) SetRouterAsn(routerAsn *int64) { - o.RouterAsn = routerAsn -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBgpRoutePoliciesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.RouterAsn != nil { - - // query param router_asn - var qrRouterAsn int64 - - if o.RouterAsn != nil { - qrRouterAsn = *o.RouterAsn - } - qRouterAsn := swag.FormatInt64(qrRouterAsn) - if qRouterAsn != "" { - - if err := r.SetQueryParam("router_asn", qRouterAsn); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_route_policies_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_route_policies_responses.go deleted file mode 100644 index fe25bc9d637..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_route_policies_responses.go +++ /dev/null @@ -1,233 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package bgp - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetBgpRoutePoliciesReader is a Reader for the GetBgpRoutePolicies structure. -type GetBgpRoutePoliciesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBgpRoutePoliciesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBgpRoutePoliciesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 500: - result := NewGetBgpRoutePoliciesInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 501: - result := NewGetBgpRoutePoliciesDisabled() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetBgpRoutePoliciesOK creates a GetBgpRoutePoliciesOK with default headers values -func NewGetBgpRoutePoliciesOK() *GetBgpRoutePoliciesOK { - return &GetBgpRoutePoliciesOK{} -} - -/* -GetBgpRoutePoliciesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBgpRoutePoliciesOK struct { - Payload []*models.BgpRoutePolicy -} - -// IsSuccess returns true when this get bgp route policies o k response has a 2xx status code -func (o *GetBgpRoutePoliciesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get bgp route policies o k response has a 3xx status code -func (o *GetBgpRoutePoliciesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get bgp route policies o k response has a 4xx status code -func (o *GetBgpRoutePoliciesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get bgp route policies o k response has a 5xx status code -func (o *GetBgpRoutePoliciesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get bgp route policies o k response a status code equal to that given -func (o *GetBgpRoutePoliciesOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetBgpRoutePoliciesOK) Error() string { - return fmt.Sprintf("[GET /bgp/route-policies][%d] getBgpRoutePoliciesOK %+v", 200, o.Payload) -} - -func (o *GetBgpRoutePoliciesOK) String() string { - return fmt.Sprintf("[GET /bgp/route-policies][%d] getBgpRoutePoliciesOK %+v", 200, o.Payload) -} - -func (o *GetBgpRoutePoliciesOK) GetPayload() []*models.BgpRoutePolicy { - return o.Payload -} - -func (o *GetBgpRoutePoliciesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBgpRoutePoliciesInternalServerError creates a GetBgpRoutePoliciesInternalServerError with default headers values -func NewGetBgpRoutePoliciesInternalServerError() *GetBgpRoutePoliciesInternalServerError { - return &GetBgpRoutePoliciesInternalServerError{} -} - -/* -GetBgpRoutePoliciesInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetBgpRoutePoliciesInternalServerError struct { - Payload models.Error -} - -// IsSuccess returns true when this get bgp route policies internal server error response has a 2xx status code -func (o *GetBgpRoutePoliciesInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get bgp route policies internal server error response has a 3xx status code -func (o *GetBgpRoutePoliciesInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get bgp route policies internal server error response has a 4xx status code -func (o *GetBgpRoutePoliciesInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get bgp route policies internal server error response has a 5xx status code -func (o *GetBgpRoutePoliciesInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get bgp route policies internal server error response a status code equal to that given -func (o *GetBgpRoutePoliciesInternalServerError) IsCode(code int) bool { - return code == 500 -} - -func (o *GetBgpRoutePoliciesInternalServerError) Error() string { - return fmt.Sprintf("[GET /bgp/route-policies][%d] getBgpRoutePoliciesInternalServerError %+v", 500, o.Payload) -} - -func (o *GetBgpRoutePoliciesInternalServerError) String() string { - return fmt.Sprintf("[GET /bgp/route-policies][%d] getBgpRoutePoliciesInternalServerError %+v", 500, o.Payload) -} - -func (o *GetBgpRoutePoliciesInternalServerError) GetPayload() models.Error { - return o.Payload -} - -func (o *GetBgpRoutePoliciesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBgpRoutePoliciesDisabled creates a GetBgpRoutePoliciesDisabled with default headers values -func NewGetBgpRoutePoliciesDisabled() *GetBgpRoutePoliciesDisabled { - return &GetBgpRoutePoliciesDisabled{} -} - -/* -GetBgpRoutePoliciesDisabled describes a response with status code 501, with default header values. - -BGP Control Plane disabled -*/ -type GetBgpRoutePoliciesDisabled struct { - Payload models.Error -} - -// IsSuccess returns true when this get bgp route policies disabled response has a 2xx status code -func (o *GetBgpRoutePoliciesDisabled) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get bgp route policies disabled response has a 3xx status code -func (o *GetBgpRoutePoliciesDisabled) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get bgp route policies disabled response has a 4xx status code -func (o *GetBgpRoutePoliciesDisabled) IsClientError() bool { - return false -} - -// IsServerError returns true when this get bgp route policies disabled response has a 5xx status code -func (o *GetBgpRoutePoliciesDisabled) IsServerError() bool { - return true -} - -// IsCode returns true when this get bgp route policies disabled response a status code equal to that given -func (o *GetBgpRoutePoliciesDisabled) IsCode(code int) bool { - return code == 501 -} - -func (o *GetBgpRoutePoliciesDisabled) Error() string { - return fmt.Sprintf("[GET /bgp/route-policies][%d] getBgpRoutePoliciesDisabled %+v", 501, o.Payload) -} - -func (o *GetBgpRoutePoliciesDisabled) String() string { - return fmt.Sprintf("[GET /bgp/route-policies][%d] getBgpRoutePoliciesDisabled %+v", 501, o.Payload) -} - -func (o *GetBgpRoutePoliciesDisabled) GetPayload() models.Error { - return o.Payload -} - -func (o *GetBgpRoutePoliciesDisabled) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_routes_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_routes_parameters.go deleted file mode 100644 index 9fa279b03df..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_routes_parameters.go +++ /dev/null @@ -1,286 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package bgp - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetBgpRoutesParams creates a new GetBgpRoutesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetBgpRoutesParams() *GetBgpRoutesParams { - return &GetBgpRoutesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetBgpRoutesParamsWithTimeout creates a new GetBgpRoutesParams object -// with the ability to set a timeout on a request. -func NewGetBgpRoutesParamsWithTimeout(timeout time.Duration) *GetBgpRoutesParams { - return &GetBgpRoutesParams{ - timeout: timeout, - } -} - -// NewGetBgpRoutesParamsWithContext creates a new GetBgpRoutesParams object -// with the ability to set a context for a request. -func NewGetBgpRoutesParamsWithContext(ctx context.Context) *GetBgpRoutesParams { - return &GetBgpRoutesParams{ - Context: ctx, - } -} - -// NewGetBgpRoutesParamsWithHTTPClient creates a new GetBgpRoutesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetBgpRoutesParamsWithHTTPClient(client *http.Client) *GetBgpRoutesParams { - return &GetBgpRoutesParams{ - HTTPClient: client, - } -} - -/* -GetBgpRoutesParams contains all the parameters to send to the API endpoint - - for the get bgp routes operation. - - Typically these are written to a http.Request. -*/ -type GetBgpRoutesParams struct { - - /* Afi. - - Address Family Indicator (AFI) of a BGP route - */ - Afi string - - /* Neighbor. - - IP address specifying a BGP neighbor. - Has to be specified only when table type is adj-rib-in or adj-rib-out. - - */ - Neighbor *string - - /* RouterAsn. - - Autonomous System Number (ASN) identifying a BGP virtual router instance. - If not specified, all virtual router instances are selected. - - */ - RouterAsn *int64 - - /* Safi. - - Subsequent Address Family Indicator (SAFI) of a BGP route - */ - Safi string - - /* TableType. - - BGP Routing Information Base (RIB) table type - */ - TableType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get bgp routes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBgpRoutesParams) WithDefaults() *GetBgpRoutesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get bgp routes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetBgpRoutesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get bgp routes params -func (o *GetBgpRoutesParams) WithTimeout(timeout time.Duration) *GetBgpRoutesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get bgp routes params -func (o *GetBgpRoutesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get bgp routes params -func (o *GetBgpRoutesParams) WithContext(ctx context.Context) *GetBgpRoutesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get bgp routes params -func (o *GetBgpRoutesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get bgp routes params -func (o *GetBgpRoutesParams) WithHTTPClient(client *http.Client) *GetBgpRoutesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get bgp routes params -func (o *GetBgpRoutesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAfi adds the afi to the get bgp routes params -func (o *GetBgpRoutesParams) WithAfi(afi string) *GetBgpRoutesParams { - o.SetAfi(afi) - return o -} - -// SetAfi adds the afi to the get bgp routes params -func (o *GetBgpRoutesParams) SetAfi(afi string) { - o.Afi = afi -} - -// WithNeighbor adds the neighbor to the get bgp routes params -func (o *GetBgpRoutesParams) WithNeighbor(neighbor *string) *GetBgpRoutesParams { - o.SetNeighbor(neighbor) - return o -} - -// SetNeighbor adds the neighbor to the get bgp routes params -func (o *GetBgpRoutesParams) SetNeighbor(neighbor *string) { - o.Neighbor = neighbor -} - -// WithRouterAsn adds the routerAsn to the get bgp routes params -func (o *GetBgpRoutesParams) WithRouterAsn(routerAsn *int64) *GetBgpRoutesParams { - o.SetRouterAsn(routerAsn) - return o -} - -// SetRouterAsn adds the routerAsn to the get bgp routes params -func (o *GetBgpRoutesParams) SetRouterAsn(routerAsn *int64) { - o.RouterAsn = routerAsn -} - -// WithSafi adds the safi to the get bgp routes params -func (o *GetBgpRoutesParams) WithSafi(safi string) *GetBgpRoutesParams { - o.SetSafi(safi) - return o -} - -// SetSafi adds the safi to the get bgp routes params -func (o *GetBgpRoutesParams) SetSafi(safi string) { - o.Safi = safi -} - -// WithTableType adds the tableType to the get bgp routes params -func (o *GetBgpRoutesParams) WithTableType(tableType string) *GetBgpRoutesParams { - o.SetTableType(tableType) - return o -} - -// SetTableType adds the tableType to the get bgp routes params -func (o *GetBgpRoutesParams) SetTableType(tableType string) { - o.TableType = tableType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetBgpRoutesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param afi - qrAfi := o.Afi - qAfi := qrAfi - if qAfi != "" { - - if err := r.SetQueryParam("afi", qAfi); err != nil { - return err - } - } - - if o.Neighbor != nil { - - // query param neighbor - var qrNeighbor string - - if o.Neighbor != nil { - qrNeighbor = *o.Neighbor - } - qNeighbor := qrNeighbor - if qNeighbor != "" { - - if err := r.SetQueryParam("neighbor", qNeighbor); err != nil { - return err - } - } - } - - if o.RouterAsn != nil { - - // query param router_asn - var qrRouterAsn int64 - - if o.RouterAsn != nil { - qrRouterAsn = *o.RouterAsn - } - qRouterAsn := swag.FormatInt64(qrRouterAsn) - if qRouterAsn != "" { - - if err := r.SetQueryParam("router_asn", qRouterAsn); err != nil { - return err - } - } - } - - // query param safi - qrSafi := o.Safi - qSafi := qrSafi - if qSafi != "" { - - if err := r.SetQueryParam("safi", qSafi); err != nil { - return err - } - } - - // query param table_type - qrTableType := o.TableType - qTableType := qrTableType - if qTableType != "" { - - if err := r.SetQueryParam("table_type", qTableType); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_routes_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_routes_responses.go deleted file mode 100644 index f7211a46793..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/bgp/get_bgp_routes_responses.go +++ /dev/null @@ -1,233 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package bgp - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetBgpRoutesReader is a Reader for the GetBgpRoutes structure. -type GetBgpRoutesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetBgpRoutesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetBgpRoutesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 500: - result := NewGetBgpRoutesInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 501: - result := NewGetBgpRoutesDisabled() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetBgpRoutesOK creates a GetBgpRoutesOK with default headers values -func NewGetBgpRoutesOK() *GetBgpRoutesOK { - return &GetBgpRoutesOK{} -} - -/* -GetBgpRoutesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetBgpRoutesOK struct { - Payload []*models.BgpRoute -} - -// IsSuccess returns true when this get bgp routes o k response has a 2xx status code -func (o *GetBgpRoutesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get bgp routes o k response has a 3xx status code -func (o *GetBgpRoutesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get bgp routes o k response has a 4xx status code -func (o *GetBgpRoutesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get bgp routes o k response has a 5xx status code -func (o *GetBgpRoutesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get bgp routes o k response a status code equal to that given -func (o *GetBgpRoutesOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetBgpRoutesOK) Error() string { - return fmt.Sprintf("[GET /bgp/routes][%d] getBgpRoutesOK %+v", 200, o.Payload) -} - -func (o *GetBgpRoutesOK) String() string { - return fmt.Sprintf("[GET /bgp/routes][%d] getBgpRoutesOK %+v", 200, o.Payload) -} - -func (o *GetBgpRoutesOK) GetPayload() []*models.BgpRoute { - return o.Payload -} - -func (o *GetBgpRoutesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBgpRoutesInternalServerError creates a GetBgpRoutesInternalServerError with default headers values -func NewGetBgpRoutesInternalServerError() *GetBgpRoutesInternalServerError { - return &GetBgpRoutesInternalServerError{} -} - -/* -GetBgpRoutesInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type GetBgpRoutesInternalServerError struct { - Payload models.Error -} - -// IsSuccess returns true when this get bgp routes internal server error response has a 2xx status code -func (o *GetBgpRoutesInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get bgp routes internal server error response has a 3xx status code -func (o *GetBgpRoutesInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get bgp routes internal server error response has a 4xx status code -func (o *GetBgpRoutesInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get bgp routes internal server error response has a 5xx status code -func (o *GetBgpRoutesInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get bgp routes internal server error response a status code equal to that given -func (o *GetBgpRoutesInternalServerError) IsCode(code int) bool { - return code == 500 -} - -func (o *GetBgpRoutesInternalServerError) Error() string { - return fmt.Sprintf("[GET /bgp/routes][%d] getBgpRoutesInternalServerError %+v", 500, o.Payload) -} - -func (o *GetBgpRoutesInternalServerError) String() string { - return fmt.Sprintf("[GET /bgp/routes][%d] getBgpRoutesInternalServerError %+v", 500, o.Payload) -} - -func (o *GetBgpRoutesInternalServerError) GetPayload() models.Error { - return o.Payload -} - -func (o *GetBgpRoutesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetBgpRoutesDisabled creates a GetBgpRoutesDisabled with default headers values -func NewGetBgpRoutesDisabled() *GetBgpRoutesDisabled { - return &GetBgpRoutesDisabled{} -} - -/* -GetBgpRoutesDisabled describes a response with status code 501, with default header values. - -BGP Control Plane disabled -*/ -type GetBgpRoutesDisabled struct { - Payload models.Error -} - -// IsSuccess returns true when this get bgp routes disabled response has a 2xx status code -func (o *GetBgpRoutesDisabled) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get bgp routes disabled response has a 3xx status code -func (o *GetBgpRoutesDisabled) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get bgp routes disabled response has a 4xx status code -func (o *GetBgpRoutesDisabled) IsClientError() bool { - return false -} - -// IsServerError returns true when this get bgp routes disabled response has a 5xx status code -func (o *GetBgpRoutesDisabled) IsServerError() bool { - return true -} - -// IsCode returns true when this get bgp routes disabled response a status code equal to that given -func (o *GetBgpRoutesDisabled) IsCode(code int) bool { - return code == 501 -} - -func (o *GetBgpRoutesDisabled) Error() string { - return fmt.Sprintf("[GET /bgp/routes][%d] getBgpRoutesDisabled %+v", 501, o.Payload) -} - -func (o *GetBgpRoutesDisabled) String() string { - return fmt.Sprintf("[GET /bgp/routes][%d] getBgpRoutesDisabled %+v", 501, o.Payload) -} - -func (o *GetBgpRoutesDisabled) GetPayload() models.Error { - return o.Payload -} - -func (o *GetBgpRoutesDisabled) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/cilium_api_client.go b/vendor/github.com/cilium/cilium/api/v1/client/cilium_api_client.go deleted file mode 100644 index 109454afa9a..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/cilium_api_client.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package client - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/client/bgp" - "github.com/cilium/cilium/api/v1/client/daemon" - "github.com/cilium/cilium/api/v1/client/endpoint" - "github.com/cilium/cilium/api/v1/client/ipam" - "github.com/cilium/cilium/api/v1/client/metrics" - "github.com/cilium/cilium/api/v1/client/policy" - "github.com/cilium/cilium/api/v1/client/prefilter" - "github.com/cilium/cilium/api/v1/client/recorder" - "github.com/cilium/cilium/api/v1/client/service" - "github.com/cilium/cilium/api/v1/client/statedb" -) - -// Default cilium API HTTP client. -var Default = NewHTTPClient(nil) - -const ( - // DefaultHost is the default Host - // found in Meta (info) section of spec file - DefaultHost string = "localhost" - // DefaultBasePath is the default BasePath - // found in Meta (info) section of spec file - DefaultBasePath string = "/v1" -) - -// DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http"} - -// NewHTTPClient creates a new cilium API HTTP client. -func NewHTTPClient(formats strfmt.Registry) *CiliumAPI { - return NewHTTPClientWithConfig(formats, nil) -} - -// NewHTTPClientWithConfig creates a new cilium API HTTP client, -// using a customizable transport config. -func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *CiliumAPI { - // ensure nullable parameters have default - if cfg == nil { - cfg = DefaultTransportConfig() - } - - // create transport and client - transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) - return New(transport, formats) -} - -// New creates a new cilium API client -func New(transport runtime.ClientTransport, formats strfmt.Registry) *CiliumAPI { - // ensure nullable parameters have default - if formats == nil { - formats = strfmt.Default - } - - cli := new(CiliumAPI) - cli.Transport = transport - cli.Bgp = bgp.New(transport, formats) - cli.Daemon = daemon.New(transport, formats) - cli.Endpoint = endpoint.New(transport, formats) - cli.Ipam = ipam.New(transport, formats) - cli.Metrics = metrics.New(transport, formats) - cli.Policy = policy.New(transport, formats) - cli.Prefilter = prefilter.New(transport, formats) - cli.Recorder = recorder.New(transport, formats) - cli.Service = service.New(transport, formats) - cli.Statedb = statedb.New(transport, formats) - return cli -} - -// DefaultTransportConfig creates a TransportConfig with the -// default settings taken from the meta section of the spec file. -func DefaultTransportConfig() *TransportConfig { - return &TransportConfig{ - Host: DefaultHost, - BasePath: DefaultBasePath, - Schemes: DefaultSchemes, - } -} - -// TransportConfig contains the transport related info, -// found in the meta section of the spec file. -type TransportConfig struct { - Host string - BasePath string - Schemes []string -} - -// WithHost overrides the default host, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithHost(host string) *TransportConfig { - cfg.Host = host - return cfg -} - -// WithBasePath overrides the default basePath, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { - cfg.BasePath = basePath - return cfg -} - -// WithSchemes overrides the default schemes, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { - cfg.Schemes = schemes - return cfg -} - -// CiliumAPI is a client for cilium API -type CiliumAPI struct { - Bgp bgp.ClientService - - Daemon daemon.ClientService - - Endpoint endpoint.ClientService - - Ipam ipam.ClientService - - Metrics metrics.ClientService - - Policy policy.ClientService - - Prefilter prefilter.ClientService - - Recorder recorder.ClientService - - Service service.ClientService - - Statedb statedb.ClientService - - Transport runtime.ClientTransport -} - -// SetTransport changes the transport on the client and all its subresources -func (c *CiliumAPI) SetTransport(transport runtime.ClientTransport) { - c.Transport = transport - c.Bgp.SetTransport(transport) - c.Daemon.SetTransport(transport) - c.Endpoint.SetTransport(transport) - c.Ipam.SetTransport(transport) - c.Metrics.SetTransport(transport) - c.Policy.SetTransport(transport) - c.Prefilter.SetTransport(transport) - c.Recorder.SetTransport(transport) - c.Service.SetTransport(transport) - c.Statedb.SetTransport(transport) -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/daemon_client.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/daemon_client.go deleted file mode 100644 index 650a1cf3818..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/daemon_client.go +++ /dev/null @@ -1,501 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new daemon API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for daemon API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetCgroupDumpMetadata(params *GetCgroupDumpMetadataParams, opts ...ClientOption) (*GetCgroupDumpMetadataOK, error) - - GetClusterNodes(params *GetClusterNodesParams, opts ...ClientOption) (*GetClusterNodesOK, error) - - GetConfig(params *GetConfigParams, opts ...ClientOption) (*GetConfigOK, error) - - GetDebuginfo(params *GetDebuginfoParams, opts ...ClientOption) (*GetDebuginfoOK, error) - - GetHealth(params *GetHealthParams, opts ...ClientOption) (*GetHealthOK, error) - - GetHealthz(params *GetHealthzParams, opts ...ClientOption) (*GetHealthzOK, error) - - GetMap(params *GetMapParams, opts ...ClientOption) (*GetMapOK, error) - - GetMapName(params *GetMapNameParams, opts ...ClientOption) (*GetMapNameOK, error) - - GetMapNameEvents(params *GetMapNameEventsParams, writer io.Writer, opts ...ClientOption) (*GetMapNameEventsOK, error) - - GetNodeIds(params *GetNodeIdsParams, opts ...ClientOption) (*GetNodeIdsOK, error) - - PatchConfig(params *PatchConfigParams, opts ...ClientOption) (*PatchConfigOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetCgroupDumpMetadata retrieves cgroup metadata for all pods -*/ -func (a *Client) GetCgroupDumpMetadata(params *GetCgroupDumpMetadataParams, opts ...ClientOption) (*GetCgroupDumpMetadataOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetCgroupDumpMetadataParams() - } - op := &runtime.ClientOperation{ - ID: "GetCgroupDumpMetadata", - Method: "GET", - PathPattern: "/cgroup-dump-metadata", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetCgroupDumpMetadataReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetCgroupDumpMetadataOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetCgroupDumpMetadata: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetClusterNodes gets nodes information stored in the cilium agent -*/ -func (a *Client) GetClusterNodes(params *GetClusterNodesParams, opts ...ClientOption) (*GetClusterNodesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterNodesParams() - } - op := &runtime.ClientOperation{ - ID: "GetClusterNodes", - Method: "GET", - PathPattern: "/cluster/nodes", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterNodesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterNodesOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetClusterNodes: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetConfig gets configuration of cilium daemon - -Returns the configuration of the Cilium daemon. -*/ -func (a *Client) GetConfig(params *GetConfigParams, opts ...ClientOption) (*GetConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetConfig", - Method: "GET", - PathPattern: "/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetConfigReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetConfigOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetDebuginfo retrieves information about the agent and environment for debugging -*/ -func (a *Client) GetDebuginfo(params *GetDebuginfoParams, opts ...ClientOption) (*GetDebuginfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDebuginfoParams() - } - op := &runtime.ClientOperation{ - ID: "GetDebuginfo", - Method: "GET", - PathPattern: "/debuginfo", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetDebuginfoReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetDebuginfoOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetDebuginfo: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetHealth gets modules health of cilium daemon - -Returns modules health and status information of the Cilium daemon. -*/ -func (a *Client) GetHealth(params *GetHealthParams, opts ...ClientOption) (*GetHealthOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetHealthParams() - } - op := &runtime.ClientOperation{ - ID: "GetHealth", - Method: "GET", - PathPattern: "/health", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetHealthReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetHealthOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetHealth: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - GetHealthz gets health of cilium daemon - - Returns health and status information of the Cilium daemon and related - -components such as the local container runtime, connected datastore, -Kubernetes integration and Hubble. -*/ -func (a *Client) GetHealthz(params *GetHealthzParams, opts ...ClientOption) (*GetHealthzOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetHealthzParams() - } - op := &runtime.ClientOperation{ - ID: "GetHealthz", - Method: "GET", - PathPattern: "/healthz", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetHealthzReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetHealthzOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetHealthz: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetMap lists all open maps -*/ -func (a *Client) GetMap(params *GetMapParams, opts ...ClientOption) (*GetMapOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetMapParams() - } - op := &runtime.ClientOperation{ - ID: "GetMap", - Method: "GET", - PathPattern: "/map", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetMapReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetMapOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetMap: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetMapName retrieves contents of b p f map -*/ -func (a *Client) GetMapName(params *GetMapNameParams, opts ...ClientOption) (*GetMapNameOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetMapNameParams() - } - op := &runtime.ClientOperation{ - ID: "GetMapName", - Method: "GET", - PathPattern: "/map/{name}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetMapNameReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetMapNameOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetMapName: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetMapNameEvents retrieves the recent event logs associated with this endpoint -*/ -func (a *Client) GetMapNameEvents(params *GetMapNameEventsParams, writer io.Writer, opts ...ClientOption) (*GetMapNameEventsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetMapNameEventsParams() - } - op := &runtime.ClientOperation{ - ID: "GetMapNameEvents", - Method: "GET", - PathPattern: "/map/{name}/events", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetMapNameEventsReader{formats: a.formats, writer: writer}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetMapNameEventsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetMapNameEvents: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - GetNodeIds lists information about known node i ds - - Retrieves a list of node IDs allocated by the agent and their - -associated node IP addresses. -*/ -func (a *Client) GetNodeIds(params *GetNodeIdsParams, opts ...ClientOption) (*GetNodeIdsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetNodeIdsParams() - } - op := &runtime.ClientOperation{ - ID: "GetNodeIds", - Method: "GET", - PathPattern: "/node/ids", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetNodeIdsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetNodeIdsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetNodeIds: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - PatchConfig modifies daemon configuration - - Updates the daemon configuration by applying the provided - -ConfigurationMap and regenerates & recompiles all required datapath -components. -*/ -func (a *Client) PatchConfig(params *PatchConfigParams, opts ...ClientOption) (*PatchConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPatchConfigParams() - } - op := &runtime.ClientOperation{ - ID: "PatchConfig", - Method: "PATCH", - PathPattern: "/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PatchConfigReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PatchConfigOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for PatchConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cgroup_dump_metadata_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cgroup_dump_metadata_parameters.go deleted file mode 100644 index 70b51046cf3..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cgroup_dump_metadata_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetCgroupDumpMetadataParams creates a new GetCgroupDumpMetadataParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetCgroupDumpMetadataParams() *GetCgroupDumpMetadataParams { - return &GetCgroupDumpMetadataParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetCgroupDumpMetadataParamsWithTimeout creates a new GetCgroupDumpMetadataParams object -// with the ability to set a timeout on a request. -func NewGetCgroupDumpMetadataParamsWithTimeout(timeout time.Duration) *GetCgroupDumpMetadataParams { - return &GetCgroupDumpMetadataParams{ - timeout: timeout, - } -} - -// NewGetCgroupDumpMetadataParamsWithContext creates a new GetCgroupDumpMetadataParams object -// with the ability to set a context for a request. -func NewGetCgroupDumpMetadataParamsWithContext(ctx context.Context) *GetCgroupDumpMetadataParams { - return &GetCgroupDumpMetadataParams{ - Context: ctx, - } -} - -// NewGetCgroupDumpMetadataParamsWithHTTPClient creates a new GetCgroupDumpMetadataParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetCgroupDumpMetadataParamsWithHTTPClient(client *http.Client) *GetCgroupDumpMetadataParams { - return &GetCgroupDumpMetadataParams{ - HTTPClient: client, - } -} - -/* -GetCgroupDumpMetadataParams contains all the parameters to send to the API endpoint - - for the get cgroup dump metadata operation. - - Typically these are written to a http.Request. -*/ -type GetCgroupDumpMetadataParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cgroup dump metadata params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCgroupDumpMetadataParams) WithDefaults() *GetCgroupDumpMetadataParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cgroup dump metadata params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetCgroupDumpMetadataParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cgroup dump metadata params -func (o *GetCgroupDumpMetadataParams) WithTimeout(timeout time.Duration) *GetCgroupDumpMetadataParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cgroup dump metadata params -func (o *GetCgroupDumpMetadataParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cgroup dump metadata params -func (o *GetCgroupDumpMetadataParams) WithContext(ctx context.Context) *GetCgroupDumpMetadataParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cgroup dump metadata params -func (o *GetCgroupDumpMetadataParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cgroup dump metadata params -func (o *GetCgroupDumpMetadataParams) WithHTTPClient(client *http.Client) *GetCgroupDumpMetadataParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cgroup dump metadata params -func (o *GetCgroupDumpMetadataParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetCgroupDumpMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cgroup_dump_metadata_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cgroup_dump_metadata_responses.go deleted file mode 100644 index 3c16b36970d..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cgroup_dump_metadata_responses.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetCgroupDumpMetadataReader is a Reader for the GetCgroupDumpMetadata structure. -type GetCgroupDumpMetadataReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetCgroupDumpMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetCgroupDumpMetadataOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 500: - result := NewGetCgroupDumpMetadataFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetCgroupDumpMetadataOK creates a GetCgroupDumpMetadataOK with default headers values -func NewGetCgroupDumpMetadataOK() *GetCgroupDumpMetadataOK { - return &GetCgroupDumpMetadataOK{} -} - -/* -GetCgroupDumpMetadataOK describes a response with status code 200, with default header values. - -Success -*/ -type GetCgroupDumpMetadataOK struct { - Payload *models.CgroupDumpMetadata -} - -// IsSuccess returns true when this get cgroup dump metadata o k response has a 2xx status code -func (o *GetCgroupDumpMetadataOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cgroup dump metadata o k response has a 3xx status code -func (o *GetCgroupDumpMetadataOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cgroup dump metadata o k response has a 4xx status code -func (o *GetCgroupDumpMetadataOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cgroup dump metadata o k response has a 5xx status code -func (o *GetCgroupDumpMetadataOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cgroup dump metadata o k response a status code equal to that given -func (o *GetCgroupDumpMetadataOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetCgroupDumpMetadataOK) Error() string { - return fmt.Sprintf("[GET /cgroup-dump-metadata][%d] getCgroupDumpMetadataOK %+v", 200, o.Payload) -} - -func (o *GetCgroupDumpMetadataOK) String() string { - return fmt.Sprintf("[GET /cgroup-dump-metadata][%d] getCgroupDumpMetadataOK %+v", 200, o.Payload) -} - -func (o *GetCgroupDumpMetadataOK) GetPayload() *models.CgroupDumpMetadata { - return o.Payload -} - -func (o *GetCgroupDumpMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CgroupDumpMetadata) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetCgroupDumpMetadataFailure creates a GetCgroupDumpMetadataFailure with default headers values -func NewGetCgroupDumpMetadataFailure() *GetCgroupDumpMetadataFailure { - return &GetCgroupDumpMetadataFailure{} -} - -/* -GetCgroupDumpMetadataFailure describes a response with status code 500, with default header values. - -CgroupDumpMetadata get failed -*/ -type GetCgroupDumpMetadataFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this get cgroup dump metadata failure response has a 2xx status code -func (o *GetCgroupDumpMetadataFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get cgroup dump metadata failure response has a 3xx status code -func (o *GetCgroupDumpMetadataFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cgroup dump metadata failure response has a 4xx status code -func (o *GetCgroupDumpMetadataFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cgroup dump metadata failure response has a 5xx status code -func (o *GetCgroupDumpMetadataFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this get cgroup dump metadata failure response a status code equal to that given -func (o *GetCgroupDumpMetadataFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *GetCgroupDumpMetadataFailure) Error() string { - return fmt.Sprintf("[GET /cgroup-dump-metadata][%d] getCgroupDumpMetadataFailure %+v", 500, o.Payload) -} - -func (o *GetCgroupDumpMetadataFailure) String() string { - return fmt.Sprintf("[GET /cgroup-dump-metadata][%d] getCgroupDumpMetadataFailure %+v", 500, o.Payload) -} - -func (o *GetCgroupDumpMetadataFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *GetCgroupDumpMetadataFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cluster_nodes_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cluster_nodes_parameters.go deleted file mode 100644 index f999621957b..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cluster_nodes_parameters.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetClusterNodesParams creates a new GetClusterNodesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetClusterNodesParams() *GetClusterNodesParams { - return &GetClusterNodesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterNodesParamsWithTimeout creates a new GetClusterNodesParams object -// with the ability to set a timeout on a request. -func NewGetClusterNodesParamsWithTimeout(timeout time.Duration) *GetClusterNodesParams { - return &GetClusterNodesParams{ - timeout: timeout, - } -} - -// NewGetClusterNodesParamsWithContext creates a new GetClusterNodesParams object -// with the ability to set a context for a request. -func NewGetClusterNodesParamsWithContext(ctx context.Context) *GetClusterNodesParams { - return &GetClusterNodesParams{ - Context: ctx, - } -} - -// NewGetClusterNodesParamsWithHTTPClient creates a new GetClusterNodesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetClusterNodesParamsWithHTTPClient(client *http.Client) *GetClusterNodesParams { - return &GetClusterNodesParams{ - HTTPClient: client, - } -} - -/* -GetClusterNodesParams contains all the parameters to send to the API endpoint - - for the get cluster nodes operation. - - Typically these are written to a http.Request. -*/ -type GetClusterNodesParams struct { - - /* ClientID. - - Client UUID should be used when the client wants to request - a diff of nodes added and / or removed since the last time - that client has made a request. - - */ - ClientID *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get cluster nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterNodesParams) WithDefaults() *GetClusterNodesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get cluster nodes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetClusterNodesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get cluster nodes params -func (o *GetClusterNodesParams) WithTimeout(timeout time.Duration) *GetClusterNodesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster nodes params -func (o *GetClusterNodesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster nodes params -func (o *GetClusterNodesParams) WithContext(ctx context.Context) *GetClusterNodesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster nodes params -func (o *GetClusterNodesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster nodes params -func (o *GetClusterNodesParams) WithHTTPClient(client *http.Client) *GetClusterNodesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster nodes params -func (o *GetClusterNodesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClientID adds the clientID to the get cluster nodes params -func (o *GetClusterNodesParams) WithClientID(clientID *int64) *GetClusterNodesParams { - o.SetClientID(clientID) - return o -} - -// SetClientID adds the clientId to the get cluster nodes params -func (o *GetClusterNodesParams) SetClientID(clientID *int64) { - o.ClientID = clientID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.ClientID != nil { - - // header param client-id - if err := r.SetHeaderParam("client-id", swag.FormatInt64(*o.ClientID)); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cluster_nodes_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cluster_nodes_responses.go deleted file mode 100644 index 2f767bbf532..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_cluster_nodes_responses.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetClusterNodesReader is a Reader for the GetClusterNodes structure. -type GetClusterNodesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterNodesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterNodesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetClusterNodesOK creates a GetClusterNodesOK with default headers values -func NewGetClusterNodesOK() *GetClusterNodesOK { - return &GetClusterNodesOK{} -} - -/* -GetClusterNodesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetClusterNodesOK struct { - Payload *models.ClusterNodeStatus -} - -// IsSuccess returns true when this get cluster nodes o k response has a 2xx status code -func (o *GetClusterNodesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get cluster nodes o k response has a 3xx status code -func (o *GetClusterNodesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get cluster nodes o k response has a 4xx status code -func (o *GetClusterNodesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get cluster nodes o k response has a 5xx status code -func (o *GetClusterNodesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get cluster nodes o k response a status code equal to that given -func (o *GetClusterNodesOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetClusterNodesOK) Error() string { - return fmt.Sprintf("[GET /cluster/nodes][%d] getClusterNodesOK %+v", 200, o.Payload) -} - -func (o *GetClusterNodesOK) String() string { - return fmt.Sprintf("[GET /cluster/nodes][%d] getClusterNodesOK %+v", 200, o.Payload) -} - -func (o *GetClusterNodesOK) GetPayload() *models.ClusterNodeStatus { - return o.Payload -} - -func (o *GetClusterNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ClusterNodeStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_config_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_config_parameters.go deleted file mode 100644 index e741bd356e6..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_config_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetConfigParams creates a new GetConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetConfigParams() *GetConfigParams { - return &GetConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetConfigParamsWithTimeout creates a new GetConfigParams object -// with the ability to set a timeout on a request. -func NewGetConfigParamsWithTimeout(timeout time.Duration) *GetConfigParams { - return &GetConfigParams{ - timeout: timeout, - } -} - -// NewGetConfigParamsWithContext creates a new GetConfigParams object -// with the ability to set a context for a request. -func NewGetConfigParamsWithContext(ctx context.Context) *GetConfigParams { - return &GetConfigParams{ - Context: ctx, - } -} - -// NewGetConfigParamsWithHTTPClient creates a new GetConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetConfigParamsWithHTTPClient(client *http.Client) *GetConfigParams { - return &GetConfigParams{ - HTTPClient: client, - } -} - -/* -GetConfigParams contains all the parameters to send to the API endpoint - - for the get config operation. - - Typically these are written to a http.Request. -*/ -type GetConfigParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetConfigParams) WithDefaults() *GetConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get config params -func (o *GetConfigParams) WithTimeout(timeout time.Duration) *GetConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get config params -func (o *GetConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get config params -func (o *GetConfigParams) WithContext(ctx context.Context) *GetConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get config params -func (o *GetConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get config params -func (o *GetConfigParams) WithHTTPClient(client *http.Client) *GetConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get config params -func (o *GetConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_config_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_config_responses.go deleted file mode 100644 index 10da9ace524..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_config_responses.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetConfigReader is a Reader for the GetConfig structure. -type GetConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetConfigOK creates a GetConfigOK with default headers values -func NewGetConfigOK() *GetConfigOK { - return &GetConfigOK{} -} - -/* -GetConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetConfigOK struct { - Payload *models.DaemonConfiguration -} - -// IsSuccess returns true when this get config o k response has a 2xx status code -func (o *GetConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get config o k response has a 3xx status code -func (o *GetConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get config o k response has a 4xx status code -func (o *GetConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get config o k response has a 5xx status code -func (o *GetConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get config o k response a status code equal to that given -func (o *GetConfigOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetConfigOK) Error() string { - return fmt.Sprintf("[GET /config][%d] getConfigOK %+v", 200, o.Payload) -} - -func (o *GetConfigOK) String() string { - return fmt.Sprintf("[GET /config][%d] getConfigOK %+v", 200, o.Payload) -} - -func (o *GetConfigOK) GetPayload() *models.DaemonConfiguration { - return o.Payload -} - -func (o *GetConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DaemonConfiguration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_debuginfo_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_debuginfo_parameters.go deleted file mode 100644 index 28eed7d3acf..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_debuginfo_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetDebuginfoParams creates a new GetDebuginfoParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetDebuginfoParams() *GetDebuginfoParams { - return &GetDebuginfoParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDebuginfoParamsWithTimeout creates a new GetDebuginfoParams object -// with the ability to set a timeout on a request. -func NewGetDebuginfoParamsWithTimeout(timeout time.Duration) *GetDebuginfoParams { - return &GetDebuginfoParams{ - timeout: timeout, - } -} - -// NewGetDebuginfoParamsWithContext creates a new GetDebuginfoParams object -// with the ability to set a context for a request. -func NewGetDebuginfoParamsWithContext(ctx context.Context) *GetDebuginfoParams { - return &GetDebuginfoParams{ - Context: ctx, - } -} - -// NewGetDebuginfoParamsWithHTTPClient creates a new GetDebuginfoParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDebuginfoParamsWithHTTPClient(client *http.Client) *GetDebuginfoParams { - return &GetDebuginfoParams{ - HTTPClient: client, - } -} - -/* -GetDebuginfoParams contains all the parameters to send to the API endpoint - - for the get debuginfo operation. - - Typically these are written to a http.Request. -*/ -type GetDebuginfoParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get debuginfo params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDebuginfoParams) WithDefaults() *GetDebuginfoParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get debuginfo params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDebuginfoParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get debuginfo params -func (o *GetDebuginfoParams) WithTimeout(timeout time.Duration) *GetDebuginfoParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get debuginfo params -func (o *GetDebuginfoParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get debuginfo params -func (o *GetDebuginfoParams) WithContext(ctx context.Context) *GetDebuginfoParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get debuginfo params -func (o *GetDebuginfoParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get debuginfo params -func (o *GetDebuginfoParams) WithHTTPClient(client *http.Client) *GetDebuginfoParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get debuginfo params -func (o *GetDebuginfoParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDebuginfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_debuginfo_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_debuginfo_responses.go deleted file mode 100644 index a7fa07a3164..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_debuginfo_responses.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetDebuginfoReader is a Reader for the GetDebuginfo structure. -type GetDebuginfoReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDebuginfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDebuginfoOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 500: - result := NewGetDebuginfoFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetDebuginfoOK creates a GetDebuginfoOK with default headers values -func NewGetDebuginfoOK() *GetDebuginfoOK { - return &GetDebuginfoOK{} -} - -/* -GetDebuginfoOK describes a response with status code 200, with default header values. - -Success -*/ -type GetDebuginfoOK struct { - Payload *models.DebugInfo -} - -// IsSuccess returns true when this get debuginfo o k response has a 2xx status code -func (o *GetDebuginfoOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get debuginfo o k response has a 3xx status code -func (o *GetDebuginfoOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get debuginfo o k response has a 4xx status code -func (o *GetDebuginfoOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get debuginfo o k response has a 5xx status code -func (o *GetDebuginfoOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get debuginfo o k response a status code equal to that given -func (o *GetDebuginfoOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetDebuginfoOK) Error() string { - return fmt.Sprintf("[GET /debuginfo][%d] getDebuginfoOK %+v", 200, o.Payload) -} - -func (o *GetDebuginfoOK) String() string { - return fmt.Sprintf("[GET /debuginfo][%d] getDebuginfoOK %+v", 200, o.Payload) -} - -func (o *GetDebuginfoOK) GetPayload() *models.DebugInfo { - return o.Payload -} - -func (o *GetDebuginfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DebugInfo) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDebuginfoFailure creates a GetDebuginfoFailure with default headers values -func NewGetDebuginfoFailure() *GetDebuginfoFailure { - return &GetDebuginfoFailure{} -} - -/* -GetDebuginfoFailure describes a response with status code 500, with default header values. - -DebugInfo get failed -*/ -type GetDebuginfoFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this get debuginfo failure response has a 2xx status code -func (o *GetDebuginfoFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get debuginfo failure response has a 3xx status code -func (o *GetDebuginfoFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get debuginfo failure response has a 4xx status code -func (o *GetDebuginfoFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this get debuginfo failure response has a 5xx status code -func (o *GetDebuginfoFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this get debuginfo failure response a status code equal to that given -func (o *GetDebuginfoFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *GetDebuginfoFailure) Error() string { - return fmt.Sprintf("[GET /debuginfo][%d] getDebuginfoFailure %+v", 500, o.Payload) -} - -func (o *GetDebuginfoFailure) String() string { - return fmt.Sprintf("[GET /debuginfo][%d] getDebuginfoFailure %+v", 500, o.Payload) -} - -func (o *GetDebuginfoFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *GetDebuginfoFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_health_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_health_parameters.go deleted file mode 100644 index dba3522587b..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_health_parameters.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetHealthParams creates a new GetHealthParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetHealthParams() *GetHealthParams { - return &GetHealthParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetHealthParamsWithTimeout creates a new GetHealthParams object -// with the ability to set a timeout on a request. -func NewGetHealthParamsWithTimeout(timeout time.Duration) *GetHealthParams { - return &GetHealthParams{ - timeout: timeout, - } -} - -// NewGetHealthParamsWithContext creates a new GetHealthParams object -// with the ability to set a context for a request. -func NewGetHealthParamsWithContext(ctx context.Context) *GetHealthParams { - return &GetHealthParams{ - Context: ctx, - } -} - -// NewGetHealthParamsWithHTTPClient creates a new GetHealthParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetHealthParamsWithHTTPClient(client *http.Client) *GetHealthParams { - return &GetHealthParams{ - HTTPClient: client, - } -} - -/* -GetHealthParams contains all the parameters to send to the API endpoint - - for the get health operation. - - Typically these are written to a http.Request. -*/ -type GetHealthParams struct { - - /* Brief. - - Brief is a brief representation of the Cilium status. - - */ - Brief *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get health params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetHealthParams) WithDefaults() *GetHealthParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get health params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetHealthParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get health params -func (o *GetHealthParams) WithTimeout(timeout time.Duration) *GetHealthParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get health params -func (o *GetHealthParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get health params -func (o *GetHealthParams) WithContext(ctx context.Context) *GetHealthParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get health params -func (o *GetHealthParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get health params -func (o *GetHealthParams) WithHTTPClient(client *http.Client) *GetHealthParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get health params -func (o *GetHealthParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBrief adds the brief to the get health params -func (o *GetHealthParams) WithBrief(brief *bool) *GetHealthParams { - o.SetBrief(brief) - return o -} - -// SetBrief adds the brief to the get health params -func (o *GetHealthParams) SetBrief(brief *bool) { - o.Brief = brief -} - -// WriteToRequest writes these params to a swagger request -func (o *GetHealthParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Brief != nil { - - // header param brief - if err := r.SetHeaderParam("brief", swag.FormatBool(*o.Brief)); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_health_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_health_responses.go deleted file mode 100644 index 17a878fa165..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_health_responses.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetHealthReader is a Reader for the GetHealth structure. -type GetHealthReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetHealthReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetHealthOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetHealthOK creates a GetHealthOK with default headers values -func NewGetHealthOK() *GetHealthOK { - return &GetHealthOK{} -} - -/* -GetHealthOK describes a response with status code 200, with default header values. - -Success -*/ -type GetHealthOK struct { - Payload *models.ModulesHealth -} - -// IsSuccess returns true when this get health o k response has a 2xx status code -func (o *GetHealthOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get health o k response has a 3xx status code -func (o *GetHealthOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get health o k response has a 4xx status code -func (o *GetHealthOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get health o k response has a 5xx status code -func (o *GetHealthOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get health o k response a status code equal to that given -func (o *GetHealthOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetHealthOK) Error() string { - return fmt.Sprintf("[GET /health][%d] getHealthOK %+v", 200, o.Payload) -} - -func (o *GetHealthOK) String() string { - return fmt.Sprintf("[GET /health][%d] getHealthOK %+v", 200, o.Payload) -} - -func (o *GetHealthOK) GetPayload() *models.ModulesHealth { - return o.Payload -} - -func (o *GetHealthOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ModulesHealth) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_healthz_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_healthz_parameters.go deleted file mode 100644 index 235c69da351..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_healthz_parameters.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetHealthzParams creates a new GetHealthzParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetHealthzParams() *GetHealthzParams { - return &GetHealthzParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetHealthzParamsWithTimeout creates a new GetHealthzParams object -// with the ability to set a timeout on a request. -func NewGetHealthzParamsWithTimeout(timeout time.Duration) *GetHealthzParams { - return &GetHealthzParams{ - timeout: timeout, - } -} - -// NewGetHealthzParamsWithContext creates a new GetHealthzParams object -// with the ability to set a context for a request. -func NewGetHealthzParamsWithContext(ctx context.Context) *GetHealthzParams { - return &GetHealthzParams{ - Context: ctx, - } -} - -// NewGetHealthzParamsWithHTTPClient creates a new GetHealthzParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetHealthzParamsWithHTTPClient(client *http.Client) *GetHealthzParams { - return &GetHealthzParams{ - HTTPClient: client, - } -} - -/* -GetHealthzParams contains all the parameters to send to the API endpoint - - for the get healthz operation. - - Typically these are written to a http.Request. -*/ -type GetHealthzParams struct { - - /* Brief. - - Brief will return a brief representation of the Cilium status. - - */ - Brief *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get healthz params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetHealthzParams) WithDefaults() *GetHealthzParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get healthz params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetHealthzParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get healthz params -func (o *GetHealthzParams) WithTimeout(timeout time.Duration) *GetHealthzParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get healthz params -func (o *GetHealthzParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get healthz params -func (o *GetHealthzParams) WithContext(ctx context.Context) *GetHealthzParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get healthz params -func (o *GetHealthzParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get healthz params -func (o *GetHealthzParams) WithHTTPClient(client *http.Client) *GetHealthzParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get healthz params -func (o *GetHealthzParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBrief adds the brief to the get healthz params -func (o *GetHealthzParams) WithBrief(brief *bool) *GetHealthzParams { - o.SetBrief(brief) - return o -} - -// SetBrief adds the brief to the get healthz params -func (o *GetHealthzParams) SetBrief(brief *bool) { - o.Brief = brief -} - -// WriteToRequest writes these params to a swagger request -func (o *GetHealthzParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Brief != nil { - - // header param brief - if err := r.SetHeaderParam("brief", swag.FormatBool(*o.Brief)); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_healthz_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_healthz_responses.go deleted file mode 100644 index c3b73feea0d..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_healthz_responses.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetHealthzReader is a Reader for the GetHealthz structure. -type GetHealthzReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetHealthzReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetHealthzOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetHealthzOK creates a GetHealthzOK with default headers values -func NewGetHealthzOK() *GetHealthzOK { - return &GetHealthzOK{} -} - -/* -GetHealthzOK describes a response with status code 200, with default header values. - -Success -*/ -type GetHealthzOK struct { - Payload *models.StatusResponse -} - -// IsSuccess returns true when this get healthz o k response has a 2xx status code -func (o *GetHealthzOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get healthz o k response has a 3xx status code -func (o *GetHealthzOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get healthz o k response has a 4xx status code -func (o *GetHealthzOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get healthz o k response has a 5xx status code -func (o *GetHealthzOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get healthz o k response a status code equal to that given -func (o *GetHealthzOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetHealthzOK) Error() string { - return fmt.Sprintf("[GET /healthz][%d] getHealthzOK %+v", 200, o.Payload) -} - -func (o *GetHealthzOK) String() string { - return fmt.Sprintf("[GET /healthz][%d] getHealthzOK %+v", 200, o.Payload) -} - -func (o *GetHealthzOK) GetPayload() *models.StatusResponse { - return o.Payload -} - -func (o *GetHealthzOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.StatusResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_events_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_events_parameters.go deleted file mode 100644 index 41520f50767..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_events_parameters.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetMapNameEventsParams creates a new GetMapNameEventsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetMapNameEventsParams() *GetMapNameEventsParams { - return &GetMapNameEventsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetMapNameEventsParamsWithTimeout creates a new GetMapNameEventsParams object -// with the ability to set a timeout on a request. -func NewGetMapNameEventsParamsWithTimeout(timeout time.Duration) *GetMapNameEventsParams { - return &GetMapNameEventsParams{ - timeout: timeout, - } -} - -// NewGetMapNameEventsParamsWithContext creates a new GetMapNameEventsParams object -// with the ability to set a context for a request. -func NewGetMapNameEventsParamsWithContext(ctx context.Context) *GetMapNameEventsParams { - return &GetMapNameEventsParams{ - Context: ctx, - } -} - -// NewGetMapNameEventsParamsWithHTTPClient creates a new GetMapNameEventsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetMapNameEventsParamsWithHTTPClient(client *http.Client) *GetMapNameEventsParams { - return &GetMapNameEventsParams{ - HTTPClient: client, - } -} - -/* -GetMapNameEventsParams contains all the parameters to send to the API endpoint - - for the get map name events operation. - - Typically these are written to a http.Request. -*/ -type GetMapNameEventsParams struct { - - /* Follow. - - Whether to follow streamed requests - */ - Follow *bool - - /* Name. - - Name of map - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get map name events params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapNameEventsParams) WithDefaults() *GetMapNameEventsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get map name events params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapNameEventsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get map name events params -func (o *GetMapNameEventsParams) WithTimeout(timeout time.Duration) *GetMapNameEventsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get map name events params -func (o *GetMapNameEventsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get map name events params -func (o *GetMapNameEventsParams) WithContext(ctx context.Context) *GetMapNameEventsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get map name events params -func (o *GetMapNameEventsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get map name events params -func (o *GetMapNameEventsParams) WithHTTPClient(client *http.Client) *GetMapNameEventsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get map name events params -func (o *GetMapNameEventsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFollow adds the follow to the get map name events params -func (o *GetMapNameEventsParams) WithFollow(follow *bool) *GetMapNameEventsParams { - o.SetFollow(follow) - return o -} - -// SetFollow adds the follow to the get map name events params -func (o *GetMapNameEventsParams) SetFollow(follow *bool) { - o.Follow = follow -} - -// WithName adds the name to the get map name events params -func (o *GetMapNameEventsParams) WithName(name string) *GetMapNameEventsParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get map name events params -func (o *GetMapNameEventsParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *GetMapNameEventsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Follow != nil { - - // query param follow - var qrFollow bool - - if o.Follow != nil { - qrFollow = *o.Follow - } - qFollow := swag.FormatBool(qrFollow) - if qFollow != "" { - - if err := r.SetQueryParam("follow", qFollow); err != nil { - return err - } - } - } - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_events_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_events_responses.go deleted file mode 100644 index 6dc187478a4..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_events_responses.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// GetMapNameEventsReader is a Reader for the GetMapNameEvents structure. -type GetMapNameEventsReader struct { - formats strfmt.Registry - writer io.Writer -} - -// ReadResponse reads a server response into the received o. -func (o *GetMapNameEventsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetMapNameEventsOK(o.writer) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetMapNameEventsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetMapNameEventsOK creates a GetMapNameEventsOK with default headers values -func NewGetMapNameEventsOK(writer io.Writer) *GetMapNameEventsOK { - return &GetMapNameEventsOK{ - - Payload: writer, - } -} - -/* -GetMapNameEventsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetMapNameEventsOK struct { - Payload io.Writer -} - -// IsSuccess returns true when this get map name events o k response has a 2xx status code -func (o *GetMapNameEventsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get map name events o k response has a 3xx status code -func (o *GetMapNameEventsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get map name events o k response has a 4xx status code -func (o *GetMapNameEventsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get map name events o k response has a 5xx status code -func (o *GetMapNameEventsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get map name events o k response a status code equal to that given -func (o *GetMapNameEventsOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetMapNameEventsOK) Error() string { - return fmt.Sprintf("[GET /map/{name}/events][%d] getMapNameEventsOK %+v", 200, o.Payload) -} - -func (o *GetMapNameEventsOK) String() string { - return fmt.Sprintf("[GET /map/{name}/events][%d] getMapNameEventsOK %+v", 200, o.Payload) -} - -func (o *GetMapNameEventsOK) GetPayload() io.Writer { - return o.Payload -} - -func (o *GetMapNameEventsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetMapNameEventsNotFound creates a GetMapNameEventsNotFound with default headers values -func NewGetMapNameEventsNotFound() *GetMapNameEventsNotFound { - return &GetMapNameEventsNotFound{} -} - -/* -GetMapNameEventsNotFound describes a response with status code 404, with default header values. - -Map not found -*/ -type GetMapNameEventsNotFound struct { -} - -// IsSuccess returns true when this get map name events not found response has a 2xx status code -func (o *GetMapNameEventsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get map name events not found response has a 3xx status code -func (o *GetMapNameEventsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get map name events not found response has a 4xx status code -func (o *GetMapNameEventsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get map name events not found response has a 5xx status code -func (o *GetMapNameEventsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get map name events not found response a status code equal to that given -func (o *GetMapNameEventsNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetMapNameEventsNotFound) Error() string { - return fmt.Sprintf("[GET /map/{name}/events][%d] getMapNameEventsNotFound ", 404) -} - -func (o *GetMapNameEventsNotFound) String() string { - return fmt.Sprintf("[GET /map/{name}/events][%d] getMapNameEventsNotFound ", 404) -} - -func (o *GetMapNameEventsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_parameters.go deleted file mode 100644 index 9465ac2bbde..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetMapNameParams creates a new GetMapNameParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetMapNameParams() *GetMapNameParams { - return &GetMapNameParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetMapNameParamsWithTimeout creates a new GetMapNameParams object -// with the ability to set a timeout on a request. -func NewGetMapNameParamsWithTimeout(timeout time.Duration) *GetMapNameParams { - return &GetMapNameParams{ - timeout: timeout, - } -} - -// NewGetMapNameParamsWithContext creates a new GetMapNameParams object -// with the ability to set a context for a request. -func NewGetMapNameParamsWithContext(ctx context.Context) *GetMapNameParams { - return &GetMapNameParams{ - Context: ctx, - } -} - -// NewGetMapNameParamsWithHTTPClient creates a new GetMapNameParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetMapNameParamsWithHTTPClient(client *http.Client) *GetMapNameParams { - return &GetMapNameParams{ - HTTPClient: client, - } -} - -/* -GetMapNameParams contains all the parameters to send to the API endpoint - - for the get map name operation. - - Typically these are written to a http.Request. -*/ -type GetMapNameParams struct { - - /* Name. - - Name of map - */ - Name string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get map name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapNameParams) WithDefaults() *GetMapNameParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get map name params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapNameParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get map name params -func (o *GetMapNameParams) WithTimeout(timeout time.Duration) *GetMapNameParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get map name params -func (o *GetMapNameParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get map name params -func (o *GetMapNameParams) WithContext(ctx context.Context) *GetMapNameParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get map name params -func (o *GetMapNameParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get map name params -func (o *GetMapNameParams) WithHTTPClient(client *http.Client) *GetMapNameParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get map name params -func (o *GetMapNameParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithName adds the name to the get map name params -func (o *GetMapNameParams) WithName(name string) *GetMapNameParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get map name params -func (o *GetMapNameParams) SetName(name string) { - o.Name = name -} - -// WriteToRequest writes these params to a swagger request -func (o *GetMapNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param name - if err := r.SetPathParam("name", o.Name); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_responses.go deleted file mode 100644 index f03de4ce30e..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_name_responses.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetMapNameReader is a Reader for the GetMapName structure. -type GetMapNameReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetMapNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetMapNameOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetMapNameNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetMapNameOK creates a GetMapNameOK with default headers values -func NewGetMapNameOK() *GetMapNameOK { - return &GetMapNameOK{} -} - -/* -GetMapNameOK describes a response with status code 200, with default header values. - -Success -*/ -type GetMapNameOK struct { - Payload *models.BPFMap -} - -// IsSuccess returns true when this get map name o k response has a 2xx status code -func (o *GetMapNameOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get map name o k response has a 3xx status code -func (o *GetMapNameOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get map name o k response has a 4xx status code -func (o *GetMapNameOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get map name o k response has a 5xx status code -func (o *GetMapNameOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get map name o k response a status code equal to that given -func (o *GetMapNameOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetMapNameOK) Error() string { - return fmt.Sprintf("[GET /map/{name}][%d] getMapNameOK %+v", 200, o.Payload) -} - -func (o *GetMapNameOK) String() string { - return fmt.Sprintf("[GET /map/{name}][%d] getMapNameOK %+v", 200, o.Payload) -} - -func (o *GetMapNameOK) GetPayload() *models.BPFMap { - return o.Payload -} - -func (o *GetMapNameOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BPFMap) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetMapNameNotFound creates a GetMapNameNotFound with default headers values -func NewGetMapNameNotFound() *GetMapNameNotFound { - return &GetMapNameNotFound{} -} - -/* -GetMapNameNotFound describes a response with status code 404, with default header values. - -Map not found -*/ -type GetMapNameNotFound struct { -} - -// IsSuccess returns true when this get map name not found response has a 2xx status code -func (o *GetMapNameNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get map name not found response has a 3xx status code -func (o *GetMapNameNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get map name not found response has a 4xx status code -func (o *GetMapNameNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get map name not found response has a 5xx status code -func (o *GetMapNameNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get map name not found response a status code equal to that given -func (o *GetMapNameNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetMapNameNotFound) Error() string { - return fmt.Sprintf("[GET /map/{name}][%d] getMapNameNotFound ", 404) -} - -func (o *GetMapNameNotFound) String() string { - return fmt.Sprintf("[GET /map/{name}][%d] getMapNameNotFound ", 404) -} - -func (o *GetMapNameNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_parameters.go deleted file mode 100644 index 05cca29d797..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetMapParams creates a new GetMapParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetMapParams() *GetMapParams { - return &GetMapParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetMapParamsWithTimeout creates a new GetMapParams object -// with the ability to set a timeout on a request. -func NewGetMapParamsWithTimeout(timeout time.Duration) *GetMapParams { - return &GetMapParams{ - timeout: timeout, - } -} - -// NewGetMapParamsWithContext creates a new GetMapParams object -// with the ability to set a context for a request. -func NewGetMapParamsWithContext(ctx context.Context) *GetMapParams { - return &GetMapParams{ - Context: ctx, - } -} - -// NewGetMapParamsWithHTTPClient creates a new GetMapParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetMapParamsWithHTTPClient(client *http.Client) *GetMapParams { - return &GetMapParams{ - HTTPClient: client, - } -} - -/* -GetMapParams contains all the parameters to send to the API endpoint - - for the get map operation. - - Typically these are written to a http.Request. -*/ -type GetMapParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get map params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapParams) WithDefaults() *GetMapParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get map params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMapParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get map params -func (o *GetMapParams) WithTimeout(timeout time.Duration) *GetMapParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get map params -func (o *GetMapParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get map params -func (o *GetMapParams) WithContext(ctx context.Context) *GetMapParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get map params -func (o *GetMapParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get map params -func (o *GetMapParams) WithHTTPClient(client *http.Client) *GetMapParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get map params -func (o *GetMapParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetMapParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_responses.go deleted file mode 100644 index dae2f2cf52e..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_map_responses.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetMapReader is a Reader for the GetMap structure. -type GetMapReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetMapReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetMapOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetMapOK creates a GetMapOK with default headers values -func NewGetMapOK() *GetMapOK { - return &GetMapOK{} -} - -/* -GetMapOK describes a response with status code 200, with default header values. - -Success -*/ -type GetMapOK struct { - Payload *models.BPFMapList -} - -// IsSuccess returns true when this get map o k response has a 2xx status code -func (o *GetMapOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get map o k response has a 3xx status code -func (o *GetMapOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get map o k response has a 4xx status code -func (o *GetMapOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get map o k response has a 5xx status code -func (o *GetMapOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get map o k response a status code equal to that given -func (o *GetMapOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetMapOK) Error() string { - return fmt.Sprintf("[GET /map][%d] getMapOK %+v", 200, o.Payload) -} - -func (o *GetMapOK) String() string { - return fmt.Sprintf("[GET /map][%d] getMapOK %+v", 200, o.Payload) -} - -func (o *GetMapOK) GetPayload() *models.BPFMapList { - return o.Payload -} - -func (o *GetMapOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BPFMapList) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_node_ids_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_node_ids_parameters.go deleted file mode 100644 index 19fce1163e0..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_node_ids_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetNodeIdsParams creates a new GetNodeIdsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetNodeIdsParams() *GetNodeIdsParams { - return &GetNodeIdsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetNodeIdsParamsWithTimeout creates a new GetNodeIdsParams object -// with the ability to set a timeout on a request. -func NewGetNodeIdsParamsWithTimeout(timeout time.Duration) *GetNodeIdsParams { - return &GetNodeIdsParams{ - timeout: timeout, - } -} - -// NewGetNodeIdsParamsWithContext creates a new GetNodeIdsParams object -// with the ability to set a context for a request. -func NewGetNodeIdsParamsWithContext(ctx context.Context) *GetNodeIdsParams { - return &GetNodeIdsParams{ - Context: ctx, - } -} - -// NewGetNodeIdsParamsWithHTTPClient creates a new GetNodeIdsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetNodeIdsParamsWithHTTPClient(client *http.Client) *GetNodeIdsParams { - return &GetNodeIdsParams{ - HTTPClient: client, - } -} - -/* -GetNodeIdsParams contains all the parameters to send to the API endpoint - - for the get node ids operation. - - Typically these are written to a http.Request. -*/ -type GetNodeIdsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get node ids params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeIdsParams) WithDefaults() *GetNodeIdsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get node ids params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetNodeIdsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get node ids params -func (o *GetNodeIdsParams) WithTimeout(timeout time.Duration) *GetNodeIdsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get node ids params -func (o *GetNodeIdsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get node ids params -func (o *GetNodeIdsParams) WithContext(ctx context.Context) *GetNodeIdsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get node ids params -func (o *GetNodeIdsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get node ids params -func (o *GetNodeIdsParams) WithHTTPClient(client *http.Client) *GetNodeIdsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get node ids params -func (o *GetNodeIdsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetNodeIdsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_node_ids_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_node_ids_responses.go deleted file mode 100644 index 1b4131485af..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/get_node_ids_responses.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetNodeIdsReader is a Reader for the GetNodeIds structure. -type GetNodeIdsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetNodeIdsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetNodeIdsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetNodeIdsOK creates a GetNodeIdsOK with default headers values -func NewGetNodeIdsOK() *GetNodeIdsOK { - return &GetNodeIdsOK{} -} - -/* -GetNodeIdsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetNodeIdsOK struct { - Payload []*models.NodeID -} - -// IsSuccess returns true when this get node ids o k response has a 2xx status code -func (o *GetNodeIdsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get node ids o k response has a 3xx status code -func (o *GetNodeIdsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get node ids o k response has a 4xx status code -func (o *GetNodeIdsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get node ids o k response has a 5xx status code -func (o *GetNodeIdsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get node ids o k response a status code equal to that given -func (o *GetNodeIdsOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetNodeIdsOK) Error() string { - return fmt.Sprintf("[GET /node/ids][%d] getNodeIdsOK %+v", 200, o.Payload) -} - -func (o *GetNodeIdsOK) String() string { - return fmt.Sprintf("[GET /node/ids][%d] getNodeIdsOK %+v", 200, o.Payload) -} - -func (o *GetNodeIdsOK) GetPayload() []*models.NodeID { - return o.Payload -} - -func (o *GetNodeIdsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/patch_config_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/patch_config_parameters.go deleted file mode 100644 index a95be301c70..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/patch_config_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewPatchConfigParams creates a new PatchConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPatchConfigParams() *PatchConfigParams { - return &PatchConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPatchConfigParamsWithTimeout creates a new PatchConfigParams object -// with the ability to set a timeout on a request. -func NewPatchConfigParamsWithTimeout(timeout time.Duration) *PatchConfigParams { - return &PatchConfigParams{ - timeout: timeout, - } -} - -// NewPatchConfigParamsWithContext creates a new PatchConfigParams object -// with the ability to set a context for a request. -func NewPatchConfigParamsWithContext(ctx context.Context) *PatchConfigParams { - return &PatchConfigParams{ - Context: ctx, - } -} - -// NewPatchConfigParamsWithHTTPClient creates a new PatchConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewPatchConfigParamsWithHTTPClient(client *http.Client) *PatchConfigParams { - return &PatchConfigParams{ - HTTPClient: client, - } -} - -/* -PatchConfigParams contains all the parameters to send to the API endpoint - - for the patch config operation. - - Typically these are written to a http.Request. -*/ -type PatchConfigParams struct { - - // Configuration. - Configuration *models.DaemonConfigurationSpec - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the patch config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchConfigParams) WithDefaults() *PatchConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the patch config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the patch config params -func (o *PatchConfigParams) WithTimeout(timeout time.Duration) *PatchConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the patch config params -func (o *PatchConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the patch config params -func (o *PatchConfigParams) WithContext(ctx context.Context) *PatchConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the patch config params -func (o *PatchConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the patch config params -func (o *PatchConfigParams) WithHTTPClient(client *http.Client) *PatchConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the patch config params -func (o *PatchConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithConfiguration adds the configuration to the patch config params -func (o *PatchConfigParams) WithConfiguration(configuration *models.DaemonConfigurationSpec) *PatchConfigParams { - o.SetConfiguration(configuration) - return o -} - -// SetConfiguration adds the configuration to the patch config params -func (o *PatchConfigParams) SetConfiguration(configuration *models.DaemonConfigurationSpec) { - o.Configuration = configuration -} - -// WriteToRequest writes these params to a swagger request -func (o *PatchConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Configuration != nil { - if err := r.SetBodyParam(o.Configuration); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/daemon/patch_config_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/daemon/patch_config_responses.go deleted file mode 100644 index 87397f6750a..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/daemon/patch_config_responses.go +++ /dev/null @@ -1,280 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package daemon - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// PatchConfigReader is a Reader for the PatchConfig structure. -type PatchConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PatchConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPatchConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewPatchConfigBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewPatchConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPatchConfigFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPatchConfigOK creates a PatchConfigOK with default headers values -func NewPatchConfigOK() *PatchConfigOK { - return &PatchConfigOK{} -} - -/* -PatchConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type PatchConfigOK struct { -} - -// IsSuccess returns true when this patch config o k response has a 2xx status code -func (o *PatchConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this patch config o k response has a 3xx status code -func (o *PatchConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch config o k response has a 4xx status code -func (o *PatchConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch config o k response has a 5xx status code -func (o *PatchConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this patch config o k response a status code equal to that given -func (o *PatchConfigOK) IsCode(code int) bool { - return code == 200 -} - -func (o *PatchConfigOK) Error() string { - return fmt.Sprintf("[PATCH /config][%d] patchConfigOK ", 200) -} - -func (o *PatchConfigOK) String() string { - return fmt.Sprintf("[PATCH /config][%d] patchConfigOK ", 200) -} - -func (o *PatchConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchConfigBadRequest creates a PatchConfigBadRequest with default headers values -func NewPatchConfigBadRequest() *PatchConfigBadRequest { - return &PatchConfigBadRequest{} -} - -/* -PatchConfigBadRequest describes a response with status code 400, with default header values. - -Bad configuration parameters -*/ -type PatchConfigBadRequest struct { - Payload models.Error -} - -// IsSuccess returns true when this patch config bad request response has a 2xx status code -func (o *PatchConfigBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch config bad request response has a 3xx status code -func (o *PatchConfigBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch config bad request response has a 4xx status code -func (o *PatchConfigBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch config bad request response has a 5xx status code -func (o *PatchConfigBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this patch config bad request response a status code equal to that given -func (o *PatchConfigBadRequest) IsCode(code int) bool { - return code == 400 -} - -func (o *PatchConfigBadRequest) Error() string { - return fmt.Sprintf("[PATCH /config][%d] patchConfigBadRequest %+v", 400, o.Payload) -} - -func (o *PatchConfigBadRequest) String() string { - return fmt.Sprintf("[PATCH /config][%d] patchConfigBadRequest %+v", 400, o.Payload) -} - -func (o *PatchConfigBadRequest) GetPayload() models.Error { - return o.Payload -} - -func (o *PatchConfigBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPatchConfigForbidden creates a PatchConfigForbidden with default headers values -func NewPatchConfigForbidden() *PatchConfigForbidden { - return &PatchConfigForbidden{} -} - -/* -PatchConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PatchConfigForbidden struct { -} - -// IsSuccess returns true when this patch config forbidden response has a 2xx status code -func (o *PatchConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch config forbidden response has a 3xx status code -func (o *PatchConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch config forbidden response has a 4xx status code -func (o *PatchConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch config forbidden response has a 5xx status code -func (o *PatchConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this patch config forbidden response a status code equal to that given -func (o *PatchConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PatchConfigForbidden) Error() string { - return fmt.Sprintf("[PATCH /config][%d] patchConfigForbidden ", 403) -} - -func (o *PatchConfigForbidden) String() string { - return fmt.Sprintf("[PATCH /config][%d] patchConfigForbidden ", 403) -} - -func (o *PatchConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchConfigFailure creates a PatchConfigFailure with default headers values -func NewPatchConfigFailure() *PatchConfigFailure { - return &PatchConfigFailure{} -} - -/* -PatchConfigFailure describes a response with status code 500, with default header values. - -Recompilation failed -*/ -type PatchConfigFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this patch config failure response has a 2xx status code -func (o *PatchConfigFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch config failure response has a 3xx status code -func (o *PatchConfigFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch config failure response has a 4xx status code -func (o *PatchConfigFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch config failure response has a 5xx status code -func (o *PatchConfigFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this patch config failure response a status code equal to that given -func (o *PatchConfigFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *PatchConfigFailure) Error() string { - return fmt.Sprintf("[PATCH /config][%d] patchConfigFailure %+v", 500, o.Payload) -} - -func (o *PatchConfigFailure) String() string { - return fmt.Sprintf("[PATCH /config][%d] patchConfigFailure %+v", 500, o.Payload) -} - -func (o *PatchConfigFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *PatchConfigFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_id_parameters.go deleted file mode 100644 index 28d2c623756..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_id_parameters.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteEndpointIDParams creates a new DeleteEndpointIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteEndpointIDParams() *DeleteEndpointIDParams { - return &DeleteEndpointIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteEndpointIDParamsWithTimeout creates a new DeleteEndpointIDParams object -// with the ability to set a timeout on a request. -func NewDeleteEndpointIDParamsWithTimeout(timeout time.Duration) *DeleteEndpointIDParams { - return &DeleteEndpointIDParams{ - timeout: timeout, - } -} - -// NewDeleteEndpointIDParamsWithContext creates a new DeleteEndpointIDParams object -// with the ability to set a context for a request. -func NewDeleteEndpointIDParamsWithContext(ctx context.Context) *DeleteEndpointIDParams { - return &DeleteEndpointIDParams{ - Context: ctx, - } -} - -// NewDeleteEndpointIDParamsWithHTTPClient creates a new DeleteEndpointIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteEndpointIDParamsWithHTTPClient(client *http.Client) *DeleteEndpointIDParams { - return &DeleteEndpointIDParams{ - HTTPClient: client, - } -} - -/* -DeleteEndpointIDParams contains all the parameters to send to the API endpoint - - for the delete endpoint ID operation. - - Typically these are written to a http.Request. -*/ -type DeleteEndpointIDParams struct { - - /* ID. - - String describing an endpoint with the format ``[prefix:]id``. If no prefix - is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints - will be addressable by all endpoint ID prefixes with the exception of the - local Cilium UUID which is assigned to all endpoints. - - Supported endpoint id prefixes: - - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 - - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 - - cni-attachment-id: CNI attachment ID, e.g. cni-attachment-id:22222:eth0 - - container-id: Container runtime ID, e.g. container-id:22222 (deprecated, may not be unique) - - container-name: Container name, e.g. container-name:foobar (deprecated, may not be unique) - - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar (deprecated, may not be unique) - - cep-name: cep name for this container if K8s is enabled, e.g. pod-name:default:foobar-net1 - - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete endpoint ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteEndpointIDParams) WithDefaults() *DeleteEndpointIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete endpoint ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteEndpointIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete endpoint ID params -func (o *DeleteEndpointIDParams) WithTimeout(timeout time.Duration) *DeleteEndpointIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete endpoint ID params -func (o *DeleteEndpointIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete endpoint ID params -func (o *DeleteEndpointIDParams) WithContext(ctx context.Context) *DeleteEndpointIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete endpoint ID params -func (o *DeleteEndpointIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete endpoint ID params -func (o *DeleteEndpointIDParams) WithHTTPClient(client *http.Client) *DeleteEndpointIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete endpoint ID params -func (o *DeleteEndpointIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete endpoint ID params -func (o *DeleteEndpointIDParams) WithID(id string) *DeleteEndpointIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete endpoint ID params -func (o *DeleteEndpointIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteEndpointIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_id_responses.go deleted file mode 100644 index b99123fecbc..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_id_responses.go +++ /dev/null @@ -1,396 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// DeleteEndpointIDReader is a Reader for the DeleteEndpointID structure. -type DeleteEndpointIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteEndpointIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteEndpointIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 206: - result := NewDeleteEndpointIDErrors() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteEndpointIDInvalid() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeleteEndpointIDForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteEndpointIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewDeleteEndpointIDTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteEndpointIDOK creates a DeleteEndpointIDOK with default headers values -func NewDeleteEndpointIDOK() *DeleteEndpointIDOK { - return &DeleteEndpointIDOK{} -} - -/* -DeleteEndpointIDOK describes a response with status code 200, with default header values. - -Success -*/ -type DeleteEndpointIDOK struct { -} - -// IsSuccess returns true when this delete endpoint Id o k response has a 2xx status code -func (o *DeleteEndpointIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete endpoint Id o k response has a 3xx status code -func (o *DeleteEndpointIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete endpoint Id o k response has a 4xx status code -func (o *DeleteEndpointIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete endpoint Id o k response has a 5xx status code -func (o *DeleteEndpointIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete endpoint Id o k response a status code equal to that given -func (o *DeleteEndpointIDOK) IsCode(code int) bool { - return code == 200 -} - -func (o *DeleteEndpointIDOK) Error() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdOK ", 200) -} - -func (o *DeleteEndpointIDOK) String() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdOK ", 200) -} - -func (o *DeleteEndpointIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteEndpointIDErrors creates a DeleteEndpointIDErrors with default headers values -func NewDeleteEndpointIDErrors() *DeleteEndpointIDErrors { - return &DeleteEndpointIDErrors{} -} - -/* -DeleteEndpointIDErrors describes a response with status code 206, with default header values. - -Deleted with a number of errors encountered -*/ -type DeleteEndpointIDErrors struct { - Payload int64 -} - -// IsSuccess returns true when this delete endpoint Id errors response has a 2xx status code -func (o *DeleteEndpointIDErrors) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete endpoint Id errors response has a 3xx status code -func (o *DeleteEndpointIDErrors) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete endpoint Id errors response has a 4xx status code -func (o *DeleteEndpointIDErrors) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete endpoint Id errors response has a 5xx status code -func (o *DeleteEndpointIDErrors) IsServerError() bool { - return false -} - -// IsCode returns true when this delete endpoint Id errors response a status code equal to that given -func (o *DeleteEndpointIDErrors) IsCode(code int) bool { - return code == 206 -} - -func (o *DeleteEndpointIDErrors) Error() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdErrors %+v", 206, o.Payload) -} - -func (o *DeleteEndpointIDErrors) String() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdErrors %+v", 206, o.Payload) -} - -func (o *DeleteEndpointIDErrors) GetPayload() int64 { - return o.Payload -} - -func (o *DeleteEndpointIDErrors) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteEndpointIDInvalid creates a DeleteEndpointIDInvalid with default headers values -func NewDeleteEndpointIDInvalid() *DeleteEndpointIDInvalid { - return &DeleteEndpointIDInvalid{} -} - -/* - DeleteEndpointIDInvalid describes a response with status code 400, with default header values. - - Invalid endpoint ID format for specified type. Details in error - -message -*/ -type DeleteEndpointIDInvalid struct { - Payload models.Error -} - -// IsSuccess returns true when this delete endpoint Id invalid response has a 2xx status code -func (o *DeleteEndpointIDInvalid) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete endpoint Id invalid response has a 3xx status code -func (o *DeleteEndpointIDInvalid) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete endpoint Id invalid response has a 4xx status code -func (o *DeleteEndpointIDInvalid) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete endpoint Id invalid response has a 5xx status code -func (o *DeleteEndpointIDInvalid) IsServerError() bool { - return false -} - -// IsCode returns true when this delete endpoint Id invalid response a status code equal to that given -func (o *DeleteEndpointIDInvalid) IsCode(code int) bool { - return code == 400 -} - -func (o *DeleteEndpointIDInvalid) Error() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdInvalid %+v", 400, o.Payload) -} - -func (o *DeleteEndpointIDInvalid) String() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdInvalid %+v", 400, o.Payload) -} - -func (o *DeleteEndpointIDInvalid) GetPayload() models.Error { - return o.Payload -} - -func (o *DeleteEndpointIDInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteEndpointIDForbidden creates a DeleteEndpointIDForbidden with default headers values -func NewDeleteEndpointIDForbidden() *DeleteEndpointIDForbidden { - return &DeleteEndpointIDForbidden{} -} - -/* -DeleteEndpointIDForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeleteEndpointIDForbidden struct { -} - -// IsSuccess returns true when this delete endpoint Id forbidden response has a 2xx status code -func (o *DeleteEndpointIDForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete endpoint Id forbidden response has a 3xx status code -func (o *DeleteEndpointIDForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete endpoint Id forbidden response has a 4xx status code -func (o *DeleteEndpointIDForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete endpoint Id forbidden response has a 5xx status code -func (o *DeleteEndpointIDForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete endpoint Id forbidden response a status code equal to that given -func (o *DeleteEndpointIDForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *DeleteEndpointIDForbidden) Error() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdForbidden ", 403) -} - -func (o *DeleteEndpointIDForbidden) String() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdForbidden ", 403) -} - -func (o *DeleteEndpointIDForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteEndpointIDNotFound creates a DeleteEndpointIDNotFound with default headers values -func NewDeleteEndpointIDNotFound() *DeleteEndpointIDNotFound { - return &DeleteEndpointIDNotFound{} -} - -/* -DeleteEndpointIDNotFound describes a response with status code 404, with default header values. - -Endpoint not found -*/ -type DeleteEndpointIDNotFound struct { -} - -// IsSuccess returns true when this delete endpoint Id not found response has a 2xx status code -func (o *DeleteEndpointIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete endpoint Id not found response has a 3xx status code -func (o *DeleteEndpointIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete endpoint Id not found response has a 4xx status code -func (o *DeleteEndpointIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete endpoint Id not found response has a 5xx status code -func (o *DeleteEndpointIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete endpoint Id not found response a status code equal to that given -func (o *DeleteEndpointIDNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *DeleteEndpointIDNotFound) Error() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdNotFound ", 404) -} - -func (o *DeleteEndpointIDNotFound) String() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdNotFound ", 404) -} - -func (o *DeleteEndpointIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteEndpointIDTooManyRequests creates a DeleteEndpointIDTooManyRequests with default headers values -func NewDeleteEndpointIDTooManyRequests() *DeleteEndpointIDTooManyRequests { - return &DeleteEndpointIDTooManyRequests{} -} - -/* -DeleteEndpointIDTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type DeleteEndpointIDTooManyRequests struct { -} - -// IsSuccess returns true when this delete endpoint Id too many requests response has a 2xx status code -func (o *DeleteEndpointIDTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete endpoint Id too many requests response has a 3xx status code -func (o *DeleteEndpointIDTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete endpoint Id too many requests response has a 4xx status code -func (o *DeleteEndpointIDTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete endpoint Id too many requests response has a 5xx status code -func (o *DeleteEndpointIDTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this delete endpoint Id too many requests response a status code equal to that given -func (o *DeleteEndpointIDTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *DeleteEndpointIDTooManyRequests) Error() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdTooManyRequests ", 429) -} - -func (o *DeleteEndpointIDTooManyRequests) String() string { - return fmt.Sprintf("[DELETE /endpoint/{id}][%d] deleteEndpointIdTooManyRequests ", 429) -} - -func (o *DeleteEndpointIDTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_parameters.go deleted file mode 100644 index 8d28629fed5..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewDeleteEndpointParams creates a new DeleteEndpointParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteEndpointParams() *DeleteEndpointParams { - return &DeleteEndpointParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteEndpointParamsWithTimeout creates a new DeleteEndpointParams object -// with the ability to set a timeout on a request. -func NewDeleteEndpointParamsWithTimeout(timeout time.Duration) *DeleteEndpointParams { - return &DeleteEndpointParams{ - timeout: timeout, - } -} - -// NewDeleteEndpointParamsWithContext creates a new DeleteEndpointParams object -// with the ability to set a context for a request. -func NewDeleteEndpointParamsWithContext(ctx context.Context) *DeleteEndpointParams { - return &DeleteEndpointParams{ - Context: ctx, - } -} - -// NewDeleteEndpointParamsWithHTTPClient creates a new DeleteEndpointParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteEndpointParamsWithHTTPClient(client *http.Client) *DeleteEndpointParams { - return &DeleteEndpointParams{ - HTTPClient: client, - } -} - -/* -DeleteEndpointParams contains all the parameters to send to the API endpoint - - for the delete endpoint operation. - - Typically these are written to a http.Request. -*/ -type DeleteEndpointParams struct { - - // Endpoint. - Endpoint *models.EndpointBatchDeleteRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete endpoint params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteEndpointParams) WithDefaults() *DeleteEndpointParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete endpoint params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteEndpointParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete endpoint params -func (o *DeleteEndpointParams) WithTimeout(timeout time.Duration) *DeleteEndpointParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete endpoint params -func (o *DeleteEndpointParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete endpoint params -func (o *DeleteEndpointParams) WithContext(ctx context.Context) *DeleteEndpointParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete endpoint params -func (o *DeleteEndpointParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete endpoint params -func (o *DeleteEndpointParams) WithHTTPClient(client *http.Client) *DeleteEndpointParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete endpoint params -func (o *DeleteEndpointParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndpoint adds the endpoint to the delete endpoint params -func (o *DeleteEndpointParams) WithEndpoint(endpoint *models.EndpointBatchDeleteRequest) *DeleteEndpointParams { - o.SetEndpoint(endpoint) - return o -} - -// SetEndpoint adds the endpoint to the delete endpoint params -func (o *DeleteEndpointParams) SetEndpoint(endpoint *models.EndpointBatchDeleteRequest) { - o.Endpoint = endpoint -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteEndpointParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Endpoint != nil { - if err := r.SetBodyParam(o.Endpoint); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_responses.go deleted file mode 100644 index 36842a86c8a..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/delete_endpoint_responses.go +++ /dev/null @@ -1,325 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// DeleteEndpointReader is a Reader for the DeleteEndpoint structure. -type DeleteEndpointReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteEndpointReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteEndpointOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 206: - result := NewDeleteEndpointErrors() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteEndpointInvalid() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteEndpointNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewDeleteEndpointTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteEndpointOK creates a DeleteEndpointOK with default headers values -func NewDeleteEndpointOK() *DeleteEndpointOK { - return &DeleteEndpointOK{} -} - -/* -DeleteEndpointOK describes a response with status code 200, with default header values. - -Success -*/ -type DeleteEndpointOK struct { -} - -// IsSuccess returns true when this delete endpoint o k response has a 2xx status code -func (o *DeleteEndpointOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete endpoint o k response has a 3xx status code -func (o *DeleteEndpointOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete endpoint o k response has a 4xx status code -func (o *DeleteEndpointOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete endpoint o k response has a 5xx status code -func (o *DeleteEndpointOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete endpoint o k response a status code equal to that given -func (o *DeleteEndpointOK) IsCode(code int) bool { - return code == 200 -} - -func (o *DeleteEndpointOK) Error() string { - return fmt.Sprintf("[DELETE /endpoint][%d] deleteEndpointOK ", 200) -} - -func (o *DeleteEndpointOK) String() string { - return fmt.Sprintf("[DELETE /endpoint][%d] deleteEndpointOK ", 200) -} - -func (o *DeleteEndpointOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteEndpointErrors creates a DeleteEndpointErrors with default headers values -func NewDeleteEndpointErrors() *DeleteEndpointErrors { - return &DeleteEndpointErrors{} -} - -/* -DeleteEndpointErrors describes a response with status code 206, with default header values. - -Deleted with a number of errors encountered -*/ -type DeleteEndpointErrors struct { - Payload int64 -} - -// IsSuccess returns true when this delete endpoint errors response has a 2xx status code -func (o *DeleteEndpointErrors) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete endpoint errors response has a 3xx status code -func (o *DeleteEndpointErrors) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete endpoint errors response has a 4xx status code -func (o *DeleteEndpointErrors) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete endpoint errors response has a 5xx status code -func (o *DeleteEndpointErrors) IsServerError() bool { - return false -} - -// IsCode returns true when this delete endpoint errors response a status code equal to that given -func (o *DeleteEndpointErrors) IsCode(code int) bool { - return code == 206 -} - -func (o *DeleteEndpointErrors) Error() string { - return fmt.Sprintf("[DELETE /endpoint][%d] deleteEndpointErrors %+v", 206, o.Payload) -} - -func (o *DeleteEndpointErrors) String() string { - return fmt.Sprintf("[DELETE /endpoint][%d] deleteEndpointErrors %+v", 206, o.Payload) -} - -func (o *DeleteEndpointErrors) GetPayload() int64 { - return o.Payload -} - -func (o *DeleteEndpointErrors) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteEndpointInvalid creates a DeleteEndpointInvalid with default headers values -func NewDeleteEndpointInvalid() *DeleteEndpointInvalid { - return &DeleteEndpointInvalid{} -} - -/* -DeleteEndpointInvalid describes a response with status code 400, with default header values. - -Invalid endpoint delete request -*/ -type DeleteEndpointInvalid struct { -} - -// IsSuccess returns true when this delete endpoint invalid response has a 2xx status code -func (o *DeleteEndpointInvalid) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete endpoint invalid response has a 3xx status code -func (o *DeleteEndpointInvalid) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete endpoint invalid response has a 4xx status code -func (o *DeleteEndpointInvalid) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete endpoint invalid response has a 5xx status code -func (o *DeleteEndpointInvalid) IsServerError() bool { - return false -} - -// IsCode returns true when this delete endpoint invalid response a status code equal to that given -func (o *DeleteEndpointInvalid) IsCode(code int) bool { - return code == 400 -} - -func (o *DeleteEndpointInvalid) Error() string { - return fmt.Sprintf("[DELETE /endpoint][%d] deleteEndpointInvalid ", 400) -} - -func (o *DeleteEndpointInvalid) String() string { - return fmt.Sprintf("[DELETE /endpoint][%d] deleteEndpointInvalid ", 400) -} - -func (o *DeleteEndpointInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteEndpointNotFound creates a DeleteEndpointNotFound with default headers values -func NewDeleteEndpointNotFound() *DeleteEndpointNotFound { - return &DeleteEndpointNotFound{} -} - -/* -DeleteEndpointNotFound describes a response with status code 404, with default header values. - -No endpoints with provided parameters found -*/ -type DeleteEndpointNotFound struct { -} - -// IsSuccess returns true when this delete endpoint not found response has a 2xx status code -func (o *DeleteEndpointNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete endpoint not found response has a 3xx status code -func (o *DeleteEndpointNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete endpoint not found response has a 4xx status code -func (o *DeleteEndpointNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete endpoint not found response has a 5xx status code -func (o *DeleteEndpointNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete endpoint not found response a status code equal to that given -func (o *DeleteEndpointNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *DeleteEndpointNotFound) Error() string { - return fmt.Sprintf("[DELETE /endpoint][%d] deleteEndpointNotFound ", 404) -} - -func (o *DeleteEndpointNotFound) String() string { - return fmt.Sprintf("[DELETE /endpoint][%d] deleteEndpointNotFound ", 404) -} - -func (o *DeleteEndpointNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteEndpointTooManyRequests creates a DeleteEndpointTooManyRequests with default headers values -func NewDeleteEndpointTooManyRequests() *DeleteEndpointTooManyRequests { - return &DeleteEndpointTooManyRequests{} -} - -/* -DeleteEndpointTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type DeleteEndpointTooManyRequests struct { -} - -// IsSuccess returns true when this delete endpoint too many requests response has a 2xx status code -func (o *DeleteEndpointTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete endpoint too many requests response has a 3xx status code -func (o *DeleteEndpointTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete endpoint too many requests response has a 4xx status code -func (o *DeleteEndpointTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete endpoint too many requests response has a 5xx status code -func (o *DeleteEndpointTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this delete endpoint too many requests response a status code equal to that given -func (o *DeleteEndpointTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *DeleteEndpointTooManyRequests) Error() string { - return fmt.Sprintf("[DELETE /endpoint][%d] deleteEndpointTooManyRequests ", 429) -} - -func (o *DeleteEndpointTooManyRequests) String() string { - return fmt.Sprintf("[DELETE /endpoint][%d] deleteEndpointTooManyRequests ", 429) -} - -func (o *DeleteEndpointTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/endpoint_client.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/endpoint_client.go deleted file mode 100644 index 72f7b68eab3..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/endpoint_client.go +++ /dev/null @@ -1,555 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new endpoint API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for endpoint API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeleteEndpoint(params *DeleteEndpointParams, opts ...ClientOption) (*DeleteEndpointOK, *DeleteEndpointErrors, error) - - DeleteEndpointID(params *DeleteEndpointIDParams, opts ...ClientOption) (*DeleteEndpointIDOK, *DeleteEndpointIDErrors, error) - - GetEndpoint(params *GetEndpointParams, opts ...ClientOption) (*GetEndpointOK, error) - - GetEndpointID(params *GetEndpointIDParams, opts ...ClientOption) (*GetEndpointIDOK, error) - - GetEndpointIDConfig(params *GetEndpointIDConfigParams, opts ...ClientOption) (*GetEndpointIDConfigOK, error) - - GetEndpointIDHealthz(params *GetEndpointIDHealthzParams, opts ...ClientOption) (*GetEndpointIDHealthzOK, error) - - GetEndpointIDLabels(params *GetEndpointIDLabelsParams, opts ...ClientOption) (*GetEndpointIDLabelsOK, error) - - GetEndpointIDLog(params *GetEndpointIDLogParams, opts ...ClientOption) (*GetEndpointIDLogOK, error) - - PatchEndpointID(params *PatchEndpointIDParams, opts ...ClientOption) (*PatchEndpointIDOK, error) - - PatchEndpointIDConfig(params *PatchEndpointIDConfigParams, opts ...ClientOption) (*PatchEndpointIDConfigOK, error) - - PatchEndpointIDLabels(params *PatchEndpointIDLabelsParams, opts ...ClientOption) (*PatchEndpointIDLabelsOK, error) - - PutEndpointID(params *PutEndpointIDParams, opts ...ClientOption) (*PutEndpointIDCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeleteEndpoint deletes a list of endpoints - -Deletes a list of endpoints that have endpoints matching the provided properties -*/ -func (a *Client) DeleteEndpoint(params *DeleteEndpointParams, opts ...ClientOption) (*DeleteEndpointOK, *DeleteEndpointErrors, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteEndpointParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteEndpoint", - Method: "DELETE", - PathPattern: "/endpoint", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteEndpointReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, nil, err - } - switch value := result.(type) { - case *DeleteEndpointOK: - return value, nil, nil - case *DeleteEndpointErrors: - return nil, value, nil - } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for endpoint: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - DeleteEndpointID deletes endpoint - - Deletes the endpoint specified by the ID. Deletion is imminent and - -atomic, if the deletion request is valid and the endpoint exists, -deletion will occur even if errors are encountered in the process. If -errors have been encountered, the code 202 will be returned, otherwise -200 on success. - -All resources associated with the endpoint will be freed and the -workload represented by the endpoint will be disconnected.It will no -longer be able to initiate or receive communications of any sort. -*/ -func (a *Client) DeleteEndpointID(params *DeleteEndpointIDParams, opts ...ClientOption) (*DeleteEndpointIDOK, *DeleteEndpointIDErrors, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteEndpointIDParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteEndpointID", - Method: "DELETE", - PathPattern: "/endpoint/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteEndpointIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, nil, err - } - switch value := result.(type) { - case *DeleteEndpointIDOK: - return value, nil, nil - case *DeleteEndpointIDErrors: - return nil, value, nil - } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for endpoint: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetEndpoint retrieves a list of endpoints that have metadata matching the provided parameters - -Retrieves a list of endpoints that have metadata matching the provided parameters, or all endpoints if no parameters provided. -*/ -func (a *Client) GetEndpoint(params *GetEndpointParams, opts ...ClientOption) (*GetEndpointOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEndpointParams() - } - op := &runtime.ClientOperation{ - ID: "GetEndpoint", - Method: "GET", - PathPattern: "/endpoint", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetEndpointReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetEndpointOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetEndpoint: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetEndpointID gets endpoint by endpoint ID - -Returns endpoint information -*/ -func (a *Client) GetEndpointID(params *GetEndpointIDParams, opts ...ClientOption) (*GetEndpointIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEndpointIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetEndpointID", - Method: "GET", - PathPattern: "/endpoint/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetEndpointIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetEndpointIDOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetEndpointID: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetEndpointIDConfig retrieves endpoint configuration - -Retrieves the configuration of the specified endpoint. -*/ -func (a *Client) GetEndpointIDConfig(params *GetEndpointIDConfigParams, opts ...ClientOption) (*GetEndpointIDConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEndpointIDConfigParams() - } - op := &runtime.ClientOperation{ - ID: "GetEndpointIDConfig", - Method: "GET", - PathPattern: "/endpoint/{id}/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetEndpointIDConfigReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetEndpointIDConfigOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetEndpointIDConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetEndpointIDHealthz retrieves the status logs associated with this endpoint -*/ -func (a *Client) GetEndpointIDHealthz(params *GetEndpointIDHealthzParams, opts ...ClientOption) (*GetEndpointIDHealthzOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEndpointIDHealthzParams() - } - op := &runtime.ClientOperation{ - ID: "GetEndpointIDHealthz", - Method: "GET", - PathPattern: "/endpoint/{id}/healthz", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetEndpointIDHealthzReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetEndpointIDHealthzOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetEndpointIDHealthz: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetEndpointIDLabels retrieves the list of labels associated with an endpoint -*/ -func (a *Client) GetEndpointIDLabels(params *GetEndpointIDLabelsParams, opts ...ClientOption) (*GetEndpointIDLabelsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEndpointIDLabelsParams() - } - op := &runtime.ClientOperation{ - ID: "GetEndpointIDLabels", - Method: "GET", - PathPattern: "/endpoint/{id}/labels", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetEndpointIDLabelsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetEndpointIDLabelsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetEndpointIDLabels: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetEndpointIDLog retrieves the status logs associated with this endpoint -*/ -func (a *Client) GetEndpointIDLog(params *GetEndpointIDLogParams, opts ...ClientOption) (*GetEndpointIDLogOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetEndpointIDLogParams() - } - op := &runtime.ClientOperation{ - ID: "GetEndpointIDLog", - Method: "GET", - PathPattern: "/endpoint/{id}/log", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetEndpointIDLogReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetEndpointIDLogOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetEndpointIDLog: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -PatchEndpointID modifies existing endpoint - -Applies the endpoint change request to an existing endpoint -*/ -func (a *Client) PatchEndpointID(params *PatchEndpointIDParams, opts ...ClientOption) (*PatchEndpointIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPatchEndpointIDParams() - } - op := &runtime.ClientOperation{ - ID: "PatchEndpointID", - Method: "PATCH", - PathPattern: "/endpoint/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PatchEndpointIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PatchEndpointIDOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for PatchEndpointID: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - PatchEndpointIDConfig modifies mutable endpoint configuration - - Update the configuration of an existing endpoint and regenerates & - -recompiles the corresponding programs automatically. -*/ -func (a *Client) PatchEndpointIDConfig(params *PatchEndpointIDConfigParams, opts ...ClientOption) (*PatchEndpointIDConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPatchEndpointIDConfigParams() - } - op := &runtime.ClientOperation{ - ID: "PatchEndpointIDConfig", - Method: "PATCH", - PathPattern: "/endpoint/{id}/config", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PatchEndpointIDConfigReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PatchEndpointIDConfigOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for PatchEndpointIDConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - PatchEndpointIDLabels sets label configuration of endpoint - - Sets labels associated with an endpoint. These can be user provided or - -derived from the orchestration system. -*/ -func (a *Client) PatchEndpointIDLabels(params *PatchEndpointIDLabelsParams, opts ...ClientOption) (*PatchEndpointIDLabelsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPatchEndpointIDLabelsParams() - } - op := &runtime.ClientOperation{ - ID: "PatchEndpointIDLabels", - Method: "PATCH", - PathPattern: "/endpoint/{id}/labels", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PatchEndpointIDLabelsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PatchEndpointIDLabelsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for PatchEndpointIDLabels: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -PutEndpointID creates endpoint - -Creates a new endpoint -*/ -func (a *Client) PutEndpointID(params *PutEndpointIDParams, opts ...ClientOption) (*PutEndpointIDCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPutEndpointIDParams() - } - op := &runtime.ClientOperation{ - ID: "PutEndpointID", - Method: "PUT", - PathPattern: "/endpoint/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PutEndpointIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PutEndpointIDCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for PutEndpointID: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_config_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_config_parameters.go deleted file mode 100644 index 971bf69f06c..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_config_parameters.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetEndpointIDConfigParams creates a new GetEndpointIDConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetEndpointIDConfigParams() *GetEndpointIDConfigParams { - return &GetEndpointIDConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetEndpointIDConfigParamsWithTimeout creates a new GetEndpointIDConfigParams object -// with the ability to set a timeout on a request. -func NewGetEndpointIDConfigParamsWithTimeout(timeout time.Duration) *GetEndpointIDConfigParams { - return &GetEndpointIDConfigParams{ - timeout: timeout, - } -} - -// NewGetEndpointIDConfigParamsWithContext creates a new GetEndpointIDConfigParams object -// with the ability to set a context for a request. -func NewGetEndpointIDConfigParamsWithContext(ctx context.Context) *GetEndpointIDConfigParams { - return &GetEndpointIDConfigParams{ - Context: ctx, - } -} - -// NewGetEndpointIDConfigParamsWithHTTPClient creates a new GetEndpointIDConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetEndpointIDConfigParamsWithHTTPClient(client *http.Client) *GetEndpointIDConfigParams { - return &GetEndpointIDConfigParams{ - HTTPClient: client, - } -} - -/* -GetEndpointIDConfigParams contains all the parameters to send to the API endpoint - - for the get endpoint ID config operation. - - Typically these are written to a http.Request. -*/ -type GetEndpointIDConfigParams struct { - - /* ID. - - String describing an endpoint with the format ``[prefix:]id``. If no prefix - is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints - will be addressable by all endpoint ID prefixes with the exception of the - local Cilium UUID which is assigned to all endpoints. - - Supported endpoint id prefixes: - - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 - - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 - - cni-attachment-id: CNI attachment ID, e.g. cni-attachment-id:22222:eth0 - - container-id: Container runtime ID, e.g. container-id:22222 (deprecated, may not be unique) - - container-name: Container name, e.g. container-name:foobar (deprecated, may not be unique) - - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar (deprecated, may not be unique) - - cep-name: cep name for this container if K8s is enabled, e.g. pod-name:default:foobar-net1 - - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get endpoint ID config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointIDConfigParams) WithDefaults() *GetEndpointIDConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get endpoint ID config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointIDConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get endpoint ID config params -func (o *GetEndpointIDConfigParams) WithTimeout(timeout time.Duration) *GetEndpointIDConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get endpoint ID config params -func (o *GetEndpointIDConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get endpoint ID config params -func (o *GetEndpointIDConfigParams) WithContext(ctx context.Context) *GetEndpointIDConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get endpoint ID config params -func (o *GetEndpointIDConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get endpoint ID config params -func (o *GetEndpointIDConfigParams) WithHTTPClient(client *http.Client) *GetEndpointIDConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get endpoint ID config params -func (o *GetEndpointIDConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get endpoint ID config params -func (o *GetEndpointIDConfigParams) WithID(id string) *GetEndpointIDConfigParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get endpoint ID config params -func (o *GetEndpointIDConfigParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetEndpointIDConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_config_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_config_responses.go deleted file mode 100644 index e16cdfbf56e..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_config_responses.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetEndpointIDConfigReader is a Reader for the GetEndpointIDConfig structure. -type GetEndpointIDConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEndpointIDConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEndpointIDConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetEndpointIDConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewGetEndpointIDConfigTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetEndpointIDConfigOK creates a GetEndpointIDConfigOK with default headers values -func NewGetEndpointIDConfigOK() *GetEndpointIDConfigOK { - return &GetEndpointIDConfigOK{} -} - -/* -GetEndpointIDConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type GetEndpointIDConfigOK struct { - Payload *models.EndpointConfigurationStatus -} - -// IsSuccess returns true when this get endpoint Id config o k response has a 2xx status code -func (o *GetEndpointIDConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get endpoint Id config o k response has a 3xx status code -func (o *GetEndpointIDConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id config o k response has a 4xx status code -func (o *GetEndpointIDConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get endpoint Id config o k response has a 5xx status code -func (o *GetEndpointIDConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id config o k response a status code equal to that given -func (o *GetEndpointIDConfigOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetEndpointIDConfigOK) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/config][%d] getEndpointIdConfigOK %+v", 200, o.Payload) -} - -func (o *GetEndpointIDConfigOK) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/config][%d] getEndpointIdConfigOK %+v", 200, o.Payload) -} - -func (o *GetEndpointIDConfigOK) GetPayload() *models.EndpointConfigurationStatus { - return o.Payload -} - -func (o *GetEndpointIDConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.EndpointConfigurationStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetEndpointIDConfigNotFound creates a GetEndpointIDConfigNotFound with default headers values -func NewGetEndpointIDConfigNotFound() *GetEndpointIDConfigNotFound { - return &GetEndpointIDConfigNotFound{} -} - -/* -GetEndpointIDConfigNotFound describes a response with status code 404, with default header values. - -Endpoint not found -*/ -type GetEndpointIDConfigNotFound struct { -} - -// IsSuccess returns true when this get endpoint Id config not found response has a 2xx status code -func (o *GetEndpointIDConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id config not found response has a 3xx status code -func (o *GetEndpointIDConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id config not found response has a 4xx status code -func (o *GetEndpointIDConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id config not found response has a 5xx status code -func (o *GetEndpointIDConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id config not found response a status code equal to that given -func (o *GetEndpointIDConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetEndpointIDConfigNotFound) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/config][%d] getEndpointIdConfigNotFound ", 404) -} - -func (o *GetEndpointIDConfigNotFound) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/config][%d] getEndpointIdConfigNotFound ", 404) -} - -func (o *GetEndpointIDConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetEndpointIDConfigTooManyRequests creates a GetEndpointIDConfigTooManyRequests with default headers values -func NewGetEndpointIDConfigTooManyRequests() *GetEndpointIDConfigTooManyRequests { - return &GetEndpointIDConfigTooManyRequests{} -} - -/* -GetEndpointIDConfigTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type GetEndpointIDConfigTooManyRequests struct { -} - -// IsSuccess returns true when this get endpoint Id config too many requests response has a 2xx status code -func (o *GetEndpointIDConfigTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id config too many requests response has a 3xx status code -func (o *GetEndpointIDConfigTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id config too many requests response has a 4xx status code -func (o *GetEndpointIDConfigTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id config too many requests response has a 5xx status code -func (o *GetEndpointIDConfigTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id config too many requests response a status code equal to that given -func (o *GetEndpointIDConfigTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *GetEndpointIDConfigTooManyRequests) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/config][%d] getEndpointIdConfigTooManyRequests ", 429) -} - -func (o *GetEndpointIDConfigTooManyRequests) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/config][%d] getEndpointIdConfigTooManyRequests ", 429) -} - -func (o *GetEndpointIDConfigTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_healthz_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_healthz_parameters.go deleted file mode 100644 index b211692ce62..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_healthz_parameters.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetEndpointIDHealthzParams creates a new GetEndpointIDHealthzParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetEndpointIDHealthzParams() *GetEndpointIDHealthzParams { - return &GetEndpointIDHealthzParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetEndpointIDHealthzParamsWithTimeout creates a new GetEndpointIDHealthzParams object -// with the ability to set a timeout on a request. -func NewGetEndpointIDHealthzParamsWithTimeout(timeout time.Duration) *GetEndpointIDHealthzParams { - return &GetEndpointIDHealthzParams{ - timeout: timeout, - } -} - -// NewGetEndpointIDHealthzParamsWithContext creates a new GetEndpointIDHealthzParams object -// with the ability to set a context for a request. -func NewGetEndpointIDHealthzParamsWithContext(ctx context.Context) *GetEndpointIDHealthzParams { - return &GetEndpointIDHealthzParams{ - Context: ctx, - } -} - -// NewGetEndpointIDHealthzParamsWithHTTPClient creates a new GetEndpointIDHealthzParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetEndpointIDHealthzParamsWithHTTPClient(client *http.Client) *GetEndpointIDHealthzParams { - return &GetEndpointIDHealthzParams{ - HTTPClient: client, - } -} - -/* -GetEndpointIDHealthzParams contains all the parameters to send to the API endpoint - - for the get endpoint ID healthz operation. - - Typically these are written to a http.Request. -*/ -type GetEndpointIDHealthzParams struct { - - /* ID. - - String describing an endpoint with the format ``[prefix:]id``. If no prefix - is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints - will be addressable by all endpoint ID prefixes with the exception of the - local Cilium UUID which is assigned to all endpoints. - - Supported endpoint id prefixes: - - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 - - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 - - cni-attachment-id: CNI attachment ID, e.g. cni-attachment-id:22222:eth0 - - container-id: Container runtime ID, e.g. container-id:22222 (deprecated, may not be unique) - - container-name: Container name, e.g. container-name:foobar (deprecated, may not be unique) - - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar (deprecated, may not be unique) - - cep-name: cep name for this container if K8s is enabled, e.g. pod-name:default:foobar-net1 - - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get endpoint ID healthz params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointIDHealthzParams) WithDefaults() *GetEndpointIDHealthzParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get endpoint ID healthz params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointIDHealthzParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get endpoint ID healthz params -func (o *GetEndpointIDHealthzParams) WithTimeout(timeout time.Duration) *GetEndpointIDHealthzParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get endpoint ID healthz params -func (o *GetEndpointIDHealthzParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get endpoint ID healthz params -func (o *GetEndpointIDHealthzParams) WithContext(ctx context.Context) *GetEndpointIDHealthzParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get endpoint ID healthz params -func (o *GetEndpointIDHealthzParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get endpoint ID healthz params -func (o *GetEndpointIDHealthzParams) WithHTTPClient(client *http.Client) *GetEndpointIDHealthzParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get endpoint ID healthz params -func (o *GetEndpointIDHealthzParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get endpoint ID healthz params -func (o *GetEndpointIDHealthzParams) WithID(id string) *GetEndpointIDHealthzParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get endpoint ID healthz params -func (o *GetEndpointIDHealthzParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetEndpointIDHealthzParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_healthz_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_healthz_responses.go deleted file mode 100644 index a7e976534c4..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_healthz_responses.go +++ /dev/null @@ -1,272 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetEndpointIDHealthzReader is a Reader for the GetEndpointIDHealthz structure. -type GetEndpointIDHealthzReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEndpointIDHealthzReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEndpointIDHealthzOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetEndpointIDHealthzInvalid() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetEndpointIDHealthzNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewGetEndpointIDHealthzTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetEndpointIDHealthzOK creates a GetEndpointIDHealthzOK with default headers values -func NewGetEndpointIDHealthzOK() *GetEndpointIDHealthzOK { - return &GetEndpointIDHealthzOK{} -} - -/* -GetEndpointIDHealthzOK describes a response with status code 200, with default header values. - -Success -*/ -type GetEndpointIDHealthzOK struct { - Payload *models.EndpointHealth -} - -// IsSuccess returns true when this get endpoint Id healthz o k response has a 2xx status code -func (o *GetEndpointIDHealthzOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get endpoint Id healthz o k response has a 3xx status code -func (o *GetEndpointIDHealthzOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id healthz o k response has a 4xx status code -func (o *GetEndpointIDHealthzOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get endpoint Id healthz o k response has a 5xx status code -func (o *GetEndpointIDHealthzOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id healthz o k response a status code equal to that given -func (o *GetEndpointIDHealthzOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetEndpointIDHealthzOK) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/healthz][%d] getEndpointIdHealthzOK %+v", 200, o.Payload) -} - -func (o *GetEndpointIDHealthzOK) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/healthz][%d] getEndpointIdHealthzOK %+v", 200, o.Payload) -} - -func (o *GetEndpointIDHealthzOK) GetPayload() *models.EndpointHealth { - return o.Payload -} - -func (o *GetEndpointIDHealthzOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.EndpointHealth) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetEndpointIDHealthzInvalid creates a GetEndpointIDHealthzInvalid with default headers values -func NewGetEndpointIDHealthzInvalid() *GetEndpointIDHealthzInvalid { - return &GetEndpointIDHealthzInvalid{} -} - -/* -GetEndpointIDHealthzInvalid describes a response with status code 400, with default header values. - -Invalid identity provided -*/ -type GetEndpointIDHealthzInvalid struct { -} - -// IsSuccess returns true when this get endpoint Id healthz invalid response has a 2xx status code -func (o *GetEndpointIDHealthzInvalid) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id healthz invalid response has a 3xx status code -func (o *GetEndpointIDHealthzInvalid) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id healthz invalid response has a 4xx status code -func (o *GetEndpointIDHealthzInvalid) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id healthz invalid response has a 5xx status code -func (o *GetEndpointIDHealthzInvalid) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id healthz invalid response a status code equal to that given -func (o *GetEndpointIDHealthzInvalid) IsCode(code int) bool { - return code == 400 -} - -func (o *GetEndpointIDHealthzInvalid) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/healthz][%d] getEndpointIdHealthzInvalid ", 400) -} - -func (o *GetEndpointIDHealthzInvalid) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/healthz][%d] getEndpointIdHealthzInvalid ", 400) -} - -func (o *GetEndpointIDHealthzInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetEndpointIDHealthzNotFound creates a GetEndpointIDHealthzNotFound with default headers values -func NewGetEndpointIDHealthzNotFound() *GetEndpointIDHealthzNotFound { - return &GetEndpointIDHealthzNotFound{} -} - -/* -GetEndpointIDHealthzNotFound describes a response with status code 404, with default header values. - -Endpoint not found -*/ -type GetEndpointIDHealthzNotFound struct { -} - -// IsSuccess returns true when this get endpoint Id healthz not found response has a 2xx status code -func (o *GetEndpointIDHealthzNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id healthz not found response has a 3xx status code -func (o *GetEndpointIDHealthzNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id healthz not found response has a 4xx status code -func (o *GetEndpointIDHealthzNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id healthz not found response has a 5xx status code -func (o *GetEndpointIDHealthzNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id healthz not found response a status code equal to that given -func (o *GetEndpointIDHealthzNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetEndpointIDHealthzNotFound) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/healthz][%d] getEndpointIdHealthzNotFound ", 404) -} - -func (o *GetEndpointIDHealthzNotFound) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/healthz][%d] getEndpointIdHealthzNotFound ", 404) -} - -func (o *GetEndpointIDHealthzNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetEndpointIDHealthzTooManyRequests creates a GetEndpointIDHealthzTooManyRequests with default headers values -func NewGetEndpointIDHealthzTooManyRequests() *GetEndpointIDHealthzTooManyRequests { - return &GetEndpointIDHealthzTooManyRequests{} -} - -/* -GetEndpointIDHealthzTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type GetEndpointIDHealthzTooManyRequests struct { -} - -// IsSuccess returns true when this get endpoint Id healthz too many requests response has a 2xx status code -func (o *GetEndpointIDHealthzTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id healthz too many requests response has a 3xx status code -func (o *GetEndpointIDHealthzTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id healthz too many requests response has a 4xx status code -func (o *GetEndpointIDHealthzTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id healthz too many requests response has a 5xx status code -func (o *GetEndpointIDHealthzTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id healthz too many requests response a status code equal to that given -func (o *GetEndpointIDHealthzTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *GetEndpointIDHealthzTooManyRequests) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/healthz][%d] getEndpointIdHealthzTooManyRequests ", 429) -} - -func (o *GetEndpointIDHealthzTooManyRequests) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/healthz][%d] getEndpointIdHealthzTooManyRequests ", 429) -} - -func (o *GetEndpointIDHealthzTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_labels_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_labels_parameters.go deleted file mode 100644 index 27dc404abda..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_labels_parameters.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetEndpointIDLabelsParams creates a new GetEndpointIDLabelsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetEndpointIDLabelsParams() *GetEndpointIDLabelsParams { - return &GetEndpointIDLabelsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetEndpointIDLabelsParamsWithTimeout creates a new GetEndpointIDLabelsParams object -// with the ability to set a timeout on a request. -func NewGetEndpointIDLabelsParamsWithTimeout(timeout time.Duration) *GetEndpointIDLabelsParams { - return &GetEndpointIDLabelsParams{ - timeout: timeout, - } -} - -// NewGetEndpointIDLabelsParamsWithContext creates a new GetEndpointIDLabelsParams object -// with the ability to set a context for a request. -func NewGetEndpointIDLabelsParamsWithContext(ctx context.Context) *GetEndpointIDLabelsParams { - return &GetEndpointIDLabelsParams{ - Context: ctx, - } -} - -// NewGetEndpointIDLabelsParamsWithHTTPClient creates a new GetEndpointIDLabelsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetEndpointIDLabelsParamsWithHTTPClient(client *http.Client) *GetEndpointIDLabelsParams { - return &GetEndpointIDLabelsParams{ - HTTPClient: client, - } -} - -/* -GetEndpointIDLabelsParams contains all the parameters to send to the API endpoint - - for the get endpoint ID labels operation. - - Typically these are written to a http.Request. -*/ -type GetEndpointIDLabelsParams struct { - - /* ID. - - String describing an endpoint with the format ``[prefix:]id``. If no prefix - is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints - will be addressable by all endpoint ID prefixes with the exception of the - local Cilium UUID which is assigned to all endpoints. - - Supported endpoint id prefixes: - - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 - - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 - - cni-attachment-id: CNI attachment ID, e.g. cni-attachment-id:22222:eth0 - - container-id: Container runtime ID, e.g. container-id:22222 (deprecated, may not be unique) - - container-name: Container name, e.g. container-name:foobar (deprecated, may not be unique) - - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar (deprecated, may not be unique) - - cep-name: cep name for this container if K8s is enabled, e.g. pod-name:default:foobar-net1 - - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get endpoint ID labels params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointIDLabelsParams) WithDefaults() *GetEndpointIDLabelsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get endpoint ID labels params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointIDLabelsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get endpoint ID labels params -func (o *GetEndpointIDLabelsParams) WithTimeout(timeout time.Duration) *GetEndpointIDLabelsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get endpoint ID labels params -func (o *GetEndpointIDLabelsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get endpoint ID labels params -func (o *GetEndpointIDLabelsParams) WithContext(ctx context.Context) *GetEndpointIDLabelsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get endpoint ID labels params -func (o *GetEndpointIDLabelsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get endpoint ID labels params -func (o *GetEndpointIDLabelsParams) WithHTTPClient(client *http.Client) *GetEndpointIDLabelsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get endpoint ID labels params -func (o *GetEndpointIDLabelsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get endpoint ID labels params -func (o *GetEndpointIDLabelsParams) WithID(id string) *GetEndpointIDLabelsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get endpoint ID labels params -func (o *GetEndpointIDLabelsParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetEndpointIDLabelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_labels_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_labels_responses.go deleted file mode 100644 index 3f4e5138d9f..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_labels_responses.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetEndpointIDLabelsReader is a Reader for the GetEndpointIDLabels structure. -type GetEndpointIDLabelsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEndpointIDLabelsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEndpointIDLabelsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetEndpointIDLabelsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewGetEndpointIDLabelsTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetEndpointIDLabelsOK creates a GetEndpointIDLabelsOK with default headers values -func NewGetEndpointIDLabelsOK() *GetEndpointIDLabelsOK { - return &GetEndpointIDLabelsOK{} -} - -/* -GetEndpointIDLabelsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetEndpointIDLabelsOK struct { - Payload *models.LabelConfiguration -} - -// IsSuccess returns true when this get endpoint Id labels o k response has a 2xx status code -func (o *GetEndpointIDLabelsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get endpoint Id labels o k response has a 3xx status code -func (o *GetEndpointIDLabelsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id labels o k response has a 4xx status code -func (o *GetEndpointIDLabelsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get endpoint Id labels o k response has a 5xx status code -func (o *GetEndpointIDLabelsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id labels o k response a status code equal to that given -func (o *GetEndpointIDLabelsOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetEndpointIDLabelsOK) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/labels][%d] getEndpointIdLabelsOK %+v", 200, o.Payload) -} - -func (o *GetEndpointIDLabelsOK) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/labels][%d] getEndpointIdLabelsOK %+v", 200, o.Payload) -} - -func (o *GetEndpointIDLabelsOK) GetPayload() *models.LabelConfiguration { - return o.Payload -} - -func (o *GetEndpointIDLabelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.LabelConfiguration) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetEndpointIDLabelsNotFound creates a GetEndpointIDLabelsNotFound with default headers values -func NewGetEndpointIDLabelsNotFound() *GetEndpointIDLabelsNotFound { - return &GetEndpointIDLabelsNotFound{} -} - -/* -GetEndpointIDLabelsNotFound describes a response with status code 404, with default header values. - -Endpoint not found -*/ -type GetEndpointIDLabelsNotFound struct { -} - -// IsSuccess returns true when this get endpoint Id labels not found response has a 2xx status code -func (o *GetEndpointIDLabelsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id labels not found response has a 3xx status code -func (o *GetEndpointIDLabelsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id labels not found response has a 4xx status code -func (o *GetEndpointIDLabelsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id labels not found response has a 5xx status code -func (o *GetEndpointIDLabelsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id labels not found response a status code equal to that given -func (o *GetEndpointIDLabelsNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetEndpointIDLabelsNotFound) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/labels][%d] getEndpointIdLabelsNotFound ", 404) -} - -func (o *GetEndpointIDLabelsNotFound) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/labels][%d] getEndpointIdLabelsNotFound ", 404) -} - -func (o *GetEndpointIDLabelsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetEndpointIDLabelsTooManyRequests creates a GetEndpointIDLabelsTooManyRequests with default headers values -func NewGetEndpointIDLabelsTooManyRequests() *GetEndpointIDLabelsTooManyRequests { - return &GetEndpointIDLabelsTooManyRequests{} -} - -/* -GetEndpointIDLabelsTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type GetEndpointIDLabelsTooManyRequests struct { -} - -// IsSuccess returns true when this get endpoint Id labels too many requests response has a 2xx status code -func (o *GetEndpointIDLabelsTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id labels too many requests response has a 3xx status code -func (o *GetEndpointIDLabelsTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id labels too many requests response has a 4xx status code -func (o *GetEndpointIDLabelsTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id labels too many requests response has a 5xx status code -func (o *GetEndpointIDLabelsTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id labels too many requests response a status code equal to that given -func (o *GetEndpointIDLabelsTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *GetEndpointIDLabelsTooManyRequests) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/labels][%d] getEndpointIdLabelsTooManyRequests ", 429) -} - -func (o *GetEndpointIDLabelsTooManyRequests) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/labels][%d] getEndpointIdLabelsTooManyRequests ", 429) -} - -func (o *GetEndpointIDLabelsTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_log_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_log_parameters.go deleted file mode 100644 index f93b295ca9c..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_log_parameters.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetEndpointIDLogParams creates a new GetEndpointIDLogParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetEndpointIDLogParams() *GetEndpointIDLogParams { - return &GetEndpointIDLogParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetEndpointIDLogParamsWithTimeout creates a new GetEndpointIDLogParams object -// with the ability to set a timeout on a request. -func NewGetEndpointIDLogParamsWithTimeout(timeout time.Duration) *GetEndpointIDLogParams { - return &GetEndpointIDLogParams{ - timeout: timeout, - } -} - -// NewGetEndpointIDLogParamsWithContext creates a new GetEndpointIDLogParams object -// with the ability to set a context for a request. -func NewGetEndpointIDLogParamsWithContext(ctx context.Context) *GetEndpointIDLogParams { - return &GetEndpointIDLogParams{ - Context: ctx, - } -} - -// NewGetEndpointIDLogParamsWithHTTPClient creates a new GetEndpointIDLogParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetEndpointIDLogParamsWithHTTPClient(client *http.Client) *GetEndpointIDLogParams { - return &GetEndpointIDLogParams{ - HTTPClient: client, - } -} - -/* -GetEndpointIDLogParams contains all the parameters to send to the API endpoint - - for the get endpoint ID log operation. - - Typically these are written to a http.Request. -*/ -type GetEndpointIDLogParams struct { - - /* ID. - - String describing an endpoint with the format ``[prefix:]id``. If no prefix - is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints - will be addressable by all endpoint ID prefixes with the exception of the - local Cilium UUID which is assigned to all endpoints. - - Supported endpoint id prefixes: - - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 - - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 - - cni-attachment-id: CNI attachment ID, e.g. cni-attachment-id:22222:eth0 - - container-id: Container runtime ID, e.g. container-id:22222 (deprecated, may not be unique) - - container-name: Container name, e.g. container-name:foobar (deprecated, may not be unique) - - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar (deprecated, may not be unique) - - cep-name: cep name for this container if K8s is enabled, e.g. pod-name:default:foobar-net1 - - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get endpoint ID log params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointIDLogParams) WithDefaults() *GetEndpointIDLogParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get endpoint ID log params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointIDLogParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get endpoint ID log params -func (o *GetEndpointIDLogParams) WithTimeout(timeout time.Duration) *GetEndpointIDLogParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get endpoint ID log params -func (o *GetEndpointIDLogParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get endpoint ID log params -func (o *GetEndpointIDLogParams) WithContext(ctx context.Context) *GetEndpointIDLogParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get endpoint ID log params -func (o *GetEndpointIDLogParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get endpoint ID log params -func (o *GetEndpointIDLogParams) WithHTTPClient(client *http.Client) *GetEndpointIDLogParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get endpoint ID log params -func (o *GetEndpointIDLogParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get endpoint ID log params -func (o *GetEndpointIDLogParams) WithID(id string) *GetEndpointIDLogParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get endpoint ID log params -func (o *GetEndpointIDLogParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetEndpointIDLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_log_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_log_responses.go deleted file mode 100644 index db7227d1ddc..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_log_responses.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetEndpointIDLogReader is a Reader for the GetEndpointIDLog structure. -type GetEndpointIDLogReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEndpointIDLogReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEndpointIDLogOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetEndpointIDLogInvalid() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetEndpointIDLogNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewGetEndpointIDLogTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetEndpointIDLogOK creates a GetEndpointIDLogOK with default headers values -func NewGetEndpointIDLogOK() *GetEndpointIDLogOK { - return &GetEndpointIDLogOK{} -} - -/* -GetEndpointIDLogOK describes a response with status code 200, with default header values. - -Success -*/ -type GetEndpointIDLogOK struct { - Payload models.EndpointStatusLog -} - -// IsSuccess returns true when this get endpoint Id log o k response has a 2xx status code -func (o *GetEndpointIDLogOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get endpoint Id log o k response has a 3xx status code -func (o *GetEndpointIDLogOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id log o k response has a 4xx status code -func (o *GetEndpointIDLogOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get endpoint Id log o k response has a 5xx status code -func (o *GetEndpointIDLogOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id log o k response a status code equal to that given -func (o *GetEndpointIDLogOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetEndpointIDLogOK) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/log][%d] getEndpointIdLogOK %+v", 200, o.Payload) -} - -func (o *GetEndpointIDLogOK) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/log][%d] getEndpointIdLogOK %+v", 200, o.Payload) -} - -func (o *GetEndpointIDLogOK) GetPayload() models.EndpointStatusLog { - return o.Payload -} - -func (o *GetEndpointIDLogOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetEndpointIDLogInvalid creates a GetEndpointIDLogInvalid with default headers values -func NewGetEndpointIDLogInvalid() *GetEndpointIDLogInvalid { - return &GetEndpointIDLogInvalid{} -} - -/* -GetEndpointIDLogInvalid describes a response with status code 400, with default header values. - -Invalid identity provided -*/ -type GetEndpointIDLogInvalid struct { -} - -// IsSuccess returns true when this get endpoint Id log invalid response has a 2xx status code -func (o *GetEndpointIDLogInvalid) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id log invalid response has a 3xx status code -func (o *GetEndpointIDLogInvalid) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id log invalid response has a 4xx status code -func (o *GetEndpointIDLogInvalid) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id log invalid response has a 5xx status code -func (o *GetEndpointIDLogInvalid) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id log invalid response a status code equal to that given -func (o *GetEndpointIDLogInvalid) IsCode(code int) bool { - return code == 400 -} - -func (o *GetEndpointIDLogInvalid) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/log][%d] getEndpointIdLogInvalid ", 400) -} - -func (o *GetEndpointIDLogInvalid) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/log][%d] getEndpointIdLogInvalid ", 400) -} - -func (o *GetEndpointIDLogInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetEndpointIDLogNotFound creates a GetEndpointIDLogNotFound with default headers values -func NewGetEndpointIDLogNotFound() *GetEndpointIDLogNotFound { - return &GetEndpointIDLogNotFound{} -} - -/* -GetEndpointIDLogNotFound describes a response with status code 404, with default header values. - -Endpoint not found -*/ -type GetEndpointIDLogNotFound struct { -} - -// IsSuccess returns true when this get endpoint Id log not found response has a 2xx status code -func (o *GetEndpointIDLogNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id log not found response has a 3xx status code -func (o *GetEndpointIDLogNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id log not found response has a 4xx status code -func (o *GetEndpointIDLogNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id log not found response has a 5xx status code -func (o *GetEndpointIDLogNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id log not found response a status code equal to that given -func (o *GetEndpointIDLogNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetEndpointIDLogNotFound) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/log][%d] getEndpointIdLogNotFound ", 404) -} - -func (o *GetEndpointIDLogNotFound) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/log][%d] getEndpointIdLogNotFound ", 404) -} - -func (o *GetEndpointIDLogNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetEndpointIDLogTooManyRequests creates a GetEndpointIDLogTooManyRequests with default headers values -func NewGetEndpointIDLogTooManyRequests() *GetEndpointIDLogTooManyRequests { - return &GetEndpointIDLogTooManyRequests{} -} - -/* -GetEndpointIDLogTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type GetEndpointIDLogTooManyRequests struct { -} - -// IsSuccess returns true when this get endpoint Id log too many requests response has a 2xx status code -func (o *GetEndpointIDLogTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id log too many requests response has a 3xx status code -func (o *GetEndpointIDLogTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id log too many requests response has a 4xx status code -func (o *GetEndpointIDLogTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id log too many requests response has a 5xx status code -func (o *GetEndpointIDLogTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id log too many requests response a status code equal to that given -func (o *GetEndpointIDLogTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *GetEndpointIDLogTooManyRequests) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}/log][%d] getEndpointIdLogTooManyRequests ", 429) -} - -func (o *GetEndpointIDLogTooManyRequests) String() string { - return fmt.Sprintf("[GET /endpoint/{id}/log][%d] getEndpointIdLogTooManyRequests ", 429) -} - -func (o *GetEndpointIDLogTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_parameters.go deleted file mode 100644 index 4bad76a970b..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_parameters.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetEndpointIDParams creates a new GetEndpointIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetEndpointIDParams() *GetEndpointIDParams { - return &GetEndpointIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetEndpointIDParamsWithTimeout creates a new GetEndpointIDParams object -// with the ability to set a timeout on a request. -func NewGetEndpointIDParamsWithTimeout(timeout time.Duration) *GetEndpointIDParams { - return &GetEndpointIDParams{ - timeout: timeout, - } -} - -// NewGetEndpointIDParamsWithContext creates a new GetEndpointIDParams object -// with the ability to set a context for a request. -func NewGetEndpointIDParamsWithContext(ctx context.Context) *GetEndpointIDParams { - return &GetEndpointIDParams{ - Context: ctx, - } -} - -// NewGetEndpointIDParamsWithHTTPClient creates a new GetEndpointIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetEndpointIDParamsWithHTTPClient(client *http.Client) *GetEndpointIDParams { - return &GetEndpointIDParams{ - HTTPClient: client, - } -} - -/* -GetEndpointIDParams contains all the parameters to send to the API endpoint - - for the get endpoint ID operation. - - Typically these are written to a http.Request. -*/ -type GetEndpointIDParams struct { - - /* ID. - - String describing an endpoint with the format ``[prefix:]id``. If no prefix - is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints - will be addressable by all endpoint ID prefixes with the exception of the - local Cilium UUID which is assigned to all endpoints. - - Supported endpoint id prefixes: - - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 - - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 - - cni-attachment-id: CNI attachment ID, e.g. cni-attachment-id:22222:eth0 - - container-id: Container runtime ID, e.g. container-id:22222 (deprecated, may not be unique) - - container-name: Container name, e.g. container-name:foobar (deprecated, may not be unique) - - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar (deprecated, may not be unique) - - cep-name: cep name for this container if K8s is enabled, e.g. pod-name:default:foobar-net1 - - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get endpoint ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointIDParams) WithDefaults() *GetEndpointIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get endpoint ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get endpoint ID params -func (o *GetEndpointIDParams) WithTimeout(timeout time.Duration) *GetEndpointIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get endpoint ID params -func (o *GetEndpointIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get endpoint ID params -func (o *GetEndpointIDParams) WithContext(ctx context.Context) *GetEndpointIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get endpoint ID params -func (o *GetEndpointIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get endpoint ID params -func (o *GetEndpointIDParams) WithHTTPClient(client *http.Client) *GetEndpointIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get endpoint ID params -func (o *GetEndpointIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get endpoint ID params -func (o *GetEndpointIDParams) WithID(id string) *GetEndpointIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get endpoint ID params -func (o *GetEndpointIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetEndpointIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_responses.go deleted file mode 100644 index 4d07e3aa4da..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_id_responses.go +++ /dev/null @@ -1,282 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetEndpointIDReader is a Reader for the GetEndpointID structure. -type GetEndpointIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEndpointIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEndpointIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetEndpointIDInvalid() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetEndpointIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewGetEndpointIDTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetEndpointIDOK creates a GetEndpointIDOK with default headers values -func NewGetEndpointIDOK() *GetEndpointIDOK { - return &GetEndpointIDOK{} -} - -/* -GetEndpointIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetEndpointIDOK struct { - Payload *models.Endpoint -} - -// IsSuccess returns true when this get endpoint Id o k response has a 2xx status code -func (o *GetEndpointIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get endpoint Id o k response has a 3xx status code -func (o *GetEndpointIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id o k response has a 4xx status code -func (o *GetEndpointIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get endpoint Id o k response has a 5xx status code -func (o *GetEndpointIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id o k response a status code equal to that given -func (o *GetEndpointIDOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetEndpointIDOK) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}][%d] getEndpointIdOK %+v", 200, o.Payload) -} - -func (o *GetEndpointIDOK) String() string { - return fmt.Sprintf("[GET /endpoint/{id}][%d] getEndpointIdOK %+v", 200, o.Payload) -} - -func (o *GetEndpointIDOK) GetPayload() *models.Endpoint { - return o.Payload -} - -func (o *GetEndpointIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Endpoint) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetEndpointIDInvalid creates a GetEndpointIDInvalid with default headers values -func NewGetEndpointIDInvalid() *GetEndpointIDInvalid { - return &GetEndpointIDInvalid{} -} - -/* -GetEndpointIDInvalid describes a response with status code 400, with default header values. - -Invalid endpoint ID format for specified type -*/ -type GetEndpointIDInvalid struct { - Payload models.Error -} - -// IsSuccess returns true when this get endpoint Id invalid response has a 2xx status code -func (o *GetEndpointIDInvalid) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id invalid response has a 3xx status code -func (o *GetEndpointIDInvalid) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id invalid response has a 4xx status code -func (o *GetEndpointIDInvalid) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id invalid response has a 5xx status code -func (o *GetEndpointIDInvalid) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id invalid response a status code equal to that given -func (o *GetEndpointIDInvalid) IsCode(code int) bool { - return code == 400 -} - -func (o *GetEndpointIDInvalid) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}][%d] getEndpointIdInvalid %+v", 400, o.Payload) -} - -func (o *GetEndpointIDInvalid) String() string { - return fmt.Sprintf("[GET /endpoint/{id}][%d] getEndpointIdInvalid %+v", 400, o.Payload) -} - -func (o *GetEndpointIDInvalid) GetPayload() models.Error { - return o.Payload -} - -func (o *GetEndpointIDInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetEndpointIDNotFound creates a GetEndpointIDNotFound with default headers values -func NewGetEndpointIDNotFound() *GetEndpointIDNotFound { - return &GetEndpointIDNotFound{} -} - -/* -GetEndpointIDNotFound describes a response with status code 404, with default header values. - -Endpoint not found -*/ -type GetEndpointIDNotFound struct { -} - -// IsSuccess returns true when this get endpoint Id not found response has a 2xx status code -func (o *GetEndpointIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id not found response has a 3xx status code -func (o *GetEndpointIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id not found response has a 4xx status code -func (o *GetEndpointIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id not found response has a 5xx status code -func (o *GetEndpointIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id not found response a status code equal to that given -func (o *GetEndpointIDNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetEndpointIDNotFound) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}][%d] getEndpointIdNotFound ", 404) -} - -func (o *GetEndpointIDNotFound) String() string { - return fmt.Sprintf("[GET /endpoint/{id}][%d] getEndpointIdNotFound ", 404) -} - -func (o *GetEndpointIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetEndpointIDTooManyRequests creates a GetEndpointIDTooManyRequests with default headers values -func NewGetEndpointIDTooManyRequests() *GetEndpointIDTooManyRequests { - return &GetEndpointIDTooManyRequests{} -} - -/* -GetEndpointIDTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type GetEndpointIDTooManyRequests struct { -} - -// IsSuccess returns true when this get endpoint Id too many requests response has a 2xx status code -func (o *GetEndpointIDTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint Id too many requests response has a 3xx status code -func (o *GetEndpointIDTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint Id too many requests response has a 4xx status code -func (o *GetEndpointIDTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint Id too many requests response has a 5xx status code -func (o *GetEndpointIDTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint Id too many requests response a status code equal to that given -func (o *GetEndpointIDTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *GetEndpointIDTooManyRequests) Error() string { - return fmt.Sprintf("[GET /endpoint/{id}][%d] getEndpointIdTooManyRequests ", 429) -} - -func (o *GetEndpointIDTooManyRequests) String() string { - return fmt.Sprintf("[GET /endpoint/{id}][%d] getEndpointIdTooManyRequests ", 429) -} - -func (o *GetEndpointIDTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_parameters.go deleted file mode 100644 index fa20da9d3e8..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_parameters.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewGetEndpointParams creates a new GetEndpointParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetEndpointParams() *GetEndpointParams { - return &GetEndpointParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetEndpointParamsWithTimeout creates a new GetEndpointParams object -// with the ability to set a timeout on a request. -func NewGetEndpointParamsWithTimeout(timeout time.Duration) *GetEndpointParams { - return &GetEndpointParams{ - timeout: timeout, - } -} - -// NewGetEndpointParamsWithContext creates a new GetEndpointParams object -// with the ability to set a context for a request. -func NewGetEndpointParamsWithContext(ctx context.Context) *GetEndpointParams { - return &GetEndpointParams{ - Context: ctx, - } -} - -// NewGetEndpointParamsWithHTTPClient creates a new GetEndpointParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetEndpointParamsWithHTTPClient(client *http.Client) *GetEndpointParams { - return &GetEndpointParams{ - HTTPClient: client, - } -} - -/* -GetEndpointParams contains all the parameters to send to the API endpoint - - for the get endpoint operation. - - Typically these are written to a http.Request. -*/ -type GetEndpointParams struct { - - /* Labels. - - List of labels - - */ - Labels models.Labels - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get endpoint params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointParams) WithDefaults() *GetEndpointParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get endpoint params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetEndpointParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get endpoint params -func (o *GetEndpointParams) WithTimeout(timeout time.Duration) *GetEndpointParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get endpoint params -func (o *GetEndpointParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get endpoint params -func (o *GetEndpointParams) WithContext(ctx context.Context) *GetEndpointParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get endpoint params -func (o *GetEndpointParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get endpoint params -func (o *GetEndpointParams) WithHTTPClient(client *http.Client) *GetEndpointParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get endpoint params -func (o *GetEndpointParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLabels adds the labels to the get endpoint params -func (o *GetEndpointParams) WithLabels(labels models.Labels) *GetEndpointParams { - o.SetLabels(labels) - return o -} - -// SetLabels adds the labels to the get endpoint params -func (o *GetEndpointParams) SetLabels(labels models.Labels) { - o.Labels = labels -} - -// WriteToRequest writes these params to a swagger request -func (o *GetEndpointParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Labels != nil { - if err := r.SetBodyParam(o.Labels); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_responses.go deleted file mode 100644 index 5193537ea81..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/get_endpoint_responses.go +++ /dev/null @@ -1,213 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetEndpointReader is a Reader for the GetEndpoint structure. -type GetEndpointReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetEndpointReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetEndpointOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetEndpointNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewGetEndpointTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetEndpointOK creates a GetEndpointOK with default headers values -func NewGetEndpointOK() *GetEndpointOK { - return &GetEndpointOK{} -} - -/* -GetEndpointOK describes a response with status code 200, with default header values. - -Success -*/ -type GetEndpointOK struct { - Payload []*models.Endpoint -} - -// IsSuccess returns true when this get endpoint o k response has a 2xx status code -func (o *GetEndpointOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get endpoint o k response has a 3xx status code -func (o *GetEndpointOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint o k response has a 4xx status code -func (o *GetEndpointOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get endpoint o k response has a 5xx status code -func (o *GetEndpointOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint o k response a status code equal to that given -func (o *GetEndpointOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetEndpointOK) Error() string { - return fmt.Sprintf("[GET /endpoint][%d] getEndpointOK %+v", 200, o.Payload) -} - -func (o *GetEndpointOK) String() string { - return fmt.Sprintf("[GET /endpoint][%d] getEndpointOK %+v", 200, o.Payload) -} - -func (o *GetEndpointOK) GetPayload() []*models.Endpoint { - return o.Payload -} - -func (o *GetEndpointOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetEndpointNotFound creates a GetEndpointNotFound with default headers values -func NewGetEndpointNotFound() *GetEndpointNotFound { - return &GetEndpointNotFound{} -} - -/* -GetEndpointNotFound describes a response with status code 404, with default header values. - -Endpoints with provided parameters not found -*/ -type GetEndpointNotFound struct { -} - -// IsSuccess returns true when this get endpoint not found response has a 2xx status code -func (o *GetEndpointNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint not found response has a 3xx status code -func (o *GetEndpointNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint not found response has a 4xx status code -func (o *GetEndpointNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint not found response has a 5xx status code -func (o *GetEndpointNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint not found response a status code equal to that given -func (o *GetEndpointNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetEndpointNotFound) Error() string { - return fmt.Sprintf("[GET /endpoint][%d] getEndpointNotFound ", 404) -} - -func (o *GetEndpointNotFound) String() string { - return fmt.Sprintf("[GET /endpoint][%d] getEndpointNotFound ", 404) -} - -func (o *GetEndpointNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetEndpointTooManyRequests creates a GetEndpointTooManyRequests with default headers values -func NewGetEndpointTooManyRequests() *GetEndpointTooManyRequests { - return &GetEndpointTooManyRequests{} -} - -/* -GetEndpointTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type GetEndpointTooManyRequests struct { -} - -// IsSuccess returns true when this get endpoint too many requests response has a 2xx status code -func (o *GetEndpointTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get endpoint too many requests response has a 3xx status code -func (o *GetEndpointTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get endpoint too many requests response has a 4xx status code -func (o *GetEndpointTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this get endpoint too many requests response has a 5xx status code -func (o *GetEndpointTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this get endpoint too many requests response a status code equal to that given -func (o *GetEndpointTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *GetEndpointTooManyRequests) Error() string { - return fmt.Sprintf("[GET /endpoint][%d] getEndpointTooManyRequests ", 429) -} - -func (o *GetEndpointTooManyRequests) String() string { - return fmt.Sprintf("[GET /endpoint][%d] getEndpointTooManyRequests ", 429) -} - -func (o *GetEndpointTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_config_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_config_parameters.go deleted file mode 100644 index 9ecd8ef8a1c..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_config_parameters.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewPatchEndpointIDConfigParams creates a new PatchEndpointIDConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPatchEndpointIDConfigParams() *PatchEndpointIDConfigParams { - return &PatchEndpointIDConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPatchEndpointIDConfigParamsWithTimeout creates a new PatchEndpointIDConfigParams object -// with the ability to set a timeout on a request. -func NewPatchEndpointIDConfigParamsWithTimeout(timeout time.Duration) *PatchEndpointIDConfigParams { - return &PatchEndpointIDConfigParams{ - timeout: timeout, - } -} - -// NewPatchEndpointIDConfigParamsWithContext creates a new PatchEndpointIDConfigParams object -// with the ability to set a context for a request. -func NewPatchEndpointIDConfigParamsWithContext(ctx context.Context) *PatchEndpointIDConfigParams { - return &PatchEndpointIDConfigParams{ - Context: ctx, - } -} - -// NewPatchEndpointIDConfigParamsWithHTTPClient creates a new PatchEndpointIDConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewPatchEndpointIDConfigParamsWithHTTPClient(client *http.Client) *PatchEndpointIDConfigParams { - return &PatchEndpointIDConfigParams{ - HTTPClient: client, - } -} - -/* -PatchEndpointIDConfigParams contains all the parameters to send to the API endpoint - - for the patch endpoint ID config operation. - - Typically these are written to a http.Request. -*/ -type PatchEndpointIDConfigParams struct { - - // EndpointConfiguration. - EndpointConfiguration *models.EndpointConfigurationSpec - - /* ID. - - String describing an endpoint with the format ``[prefix:]id``. If no prefix - is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints - will be addressable by all endpoint ID prefixes with the exception of the - local Cilium UUID which is assigned to all endpoints. - - Supported endpoint id prefixes: - - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 - - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 - - cni-attachment-id: CNI attachment ID, e.g. cni-attachment-id:22222:eth0 - - container-id: Container runtime ID, e.g. container-id:22222 (deprecated, may not be unique) - - container-name: Container name, e.g. container-name:foobar (deprecated, may not be unique) - - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar (deprecated, may not be unique) - - cep-name: cep name for this container if K8s is enabled, e.g. pod-name:default:foobar-net1 - - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the patch endpoint ID config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchEndpointIDConfigParams) WithDefaults() *PatchEndpointIDConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the patch endpoint ID config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchEndpointIDConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the patch endpoint ID config params -func (o *PatchEndpointIDConfigParams) WithTimeout(timeout time.Duration) *PatchEndpointIDConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the patch endpoint ID config params -func (o *PatchEndpointIDConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the patch endpoint ID config params -func (o *PatchEndpointIDConfigParams) WithContext(ctx context.Context) *PatchEndpointIDConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the patch endpoint ID config params -func (o *PatchEndpointIDConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the patch endpoint ID config params -func (o *PatchEndpointIDConfigParams) WithHTTPClient(client *http.Client) *PatchEndpointIDConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the patch endpoint ID config params -func (o *PatchEndpointIDConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndpointConfiguration adds the endpointConfiguration to the patch endpoint ID config params -func (o *PatchEndpointIDConfigParams) WithEndpointConfiguration(endpointConfiguration *models.EndpointConfigurationSpec) *PatchEndpointIDConfigParams { - o.SetEndpointConfiguration(endpointConfiguration) - return o -} - -// SetEndpointConfiguration adds the endpointConfiguration to the patch endpoint ID config params -func (o *PatchEndpointIDConfigParams) SetEndpointConfiguration(endpointConfiguration *models.EndpointConfigurationSpec) { - o.EndpointConfiguration = endpointConfiguration -} - -// WithID adds the id to the patch endpoint ID config params -func (o *PatchEndpointIDConfigParams) WithID(id string) *PatchEndpointIDConfigParams { - o.SetID(id) - return o -} - -// SetID adds the id to the patch endpoint ID config params -func (o *PatchEndpointIDConfigParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PatchEndpointIDConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.EndpointConfiguration != nil { - if err := r.SetBodyParam(o.EndpointConfiguration); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_config_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_config_responses.go deleted file mode 100644 index fc2c4883a5f..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_config_responses.go +++ /dev/null @@ -1,384 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// PatchEndpointIDConfigReader is a Reader for the PatchEndpointIDConfig structure. -type PatchEndpointIDConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PatchEndpointIDConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPatchEndpointIDConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewPatchEndpointIDConfigInvalid() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewPatchEndpointIDConfigForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewPatchEndpointIDConfigNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewPatchEndpointIDConfigTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPatchEndpointIDConfigFailed() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPatchEndpointIDConfigOK creates a PatchEndpointIDConfigOK with default headers values -func NewPatchEndpointIDConfigOK() *PatchEndpointIDConfigOK { - return &PatchEndpointIDConfigOK{} -} - -/* -PatchEndpointIDConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type PatchEndpointIDConfigOK struct { -} - -// IsSuccess returns true when this patch endpoint Id config o k response has a 2xx status code -func (o *PatchEndpointIDConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this patch endpoint Id config o k response has a 3xx status code -func (o *PatchEndpointIDConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id config o k response has a 4xx status code -func (o *PatchEndpointIDConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch endpoint Id config o k response has a 5xx status code -func (o *PatchEndpointIDConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id config o k response a status code equal to that given -func (o *PatchEndpointIDConfigOK) IsCode(code int) bool { - return code == 200 -} - -func (o *PatchEndpointIDConfigOK) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigOK ", 200) -} - -func (o *PatchEndpointIDConfigOK) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigOK ", 200) -} - -func (o *PatchEndpointIDConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDConfigInvalid creates a PatchEndpointIDConfigInvalid with default headers values -func NewPatchEndpointIDConfigInvalid() *PatchEndpointIDConfigInvalid { - return &PatchEndpointIDConfigInvalid{} -} - -/* -PatchEndpointIDConfigInvalid describes a response with status code 400, with default header values. - -Invalid configuration request -*/ -type PatchEndpointIDConfigInvalid struct { -} - -// IsSuccess returns true when this patch endpoint Id config invalid response has a 2xx status code -func (o *PatchEndpointIDConfigInvalid) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id config invalid response has a 3xx status code -func (o *PatchEndpointIDConfigInvalid) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id config invalid response has a 4xx status code -func (o *PatchEndpointIDConfigInvalid) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch endpoint Id config invalid response has a 5xx status code -func (o *PatchEndpointIDConfigInvalid) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id config invalid response a status code equal to that given -func (o *PatchEndpointIDConfigInvalid) IsCode(code int) bool { - return code == 400 -} - -func (o *PatchEndpointIDConfigInvalid) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigInvalid ", 400) -} - -func (o *PatchEndpointIDConfigInvalid) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigInvalid ", 400) -} - -func (o *PatchEndpointIDConfigInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDConfigForbidden creates a PatchEndpointIDConfigForbidden with default headers values -func NewPatchEndpointIDConfigForbidden() *PatchEndpointIDConfigForbidden { - return &PatchEndpointIDConfigForbidden{} -} - -/* -PatchEndpointIDConfigForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PatchEndpointIDConfigForbidden struct { -} - -// IsSuccess returns true when this patch endpoint Id config forbidden response has a 2xx status code -func (o *PatchEndpointIDConfigForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id config forbidden response has a 3xx status code -func (o *PatchEndpointIDConfigForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id config forbidden response has a 4xx status code -func (o *PatchEndpointIDConfigForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch endpoint Id config forbidden response has a 5xx status code -func (o *PatchEndpointIDConfigForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id config forbidden response a status code equal to that given -func (o *PatchEndpointIDConfigForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PatchEndpointIDConfigForbidden) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigForbidden ", 403) -} - -func (o *PatchEndpointIDConfigForbidden) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigForbidden ", 403) -} - -func (o *PatchEndpointIDConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDConfigNotFound creates a PatchEndpointIDConfigNotFound with default headers values -func NewPatchEndpointIDConfigNotFound() *PatchEndpointIDConfigNotFound { - return &PatchEndpointIDConfigNotFound{} -} - -/* -PatchEndpointIDConfigNotFound describes a response with status code 404, with default header values. - -Endpoint not found -*/ -type PatchEndpointIDConfigNotFound struct { -} - -// IsSuccess returns true when this patch endpoint Id config not found response has a 2xx status code -func (o *PatchEndpointIDConfigNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id config not found response has a 3xx status code -func (o *PatchEndpointIDConfigNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id config not found response has a 4xx status code -func (o *PatchEndpointIDConfigNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch endpoint Id config not found response has a 5xx status code -func (o *PatchEndpointIDConfigNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id config not found response a status code equal to that given -func (o *PatchEndpointIDConfigNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *PatchEndpointIDConfigNotFound) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigNotFound ", 404) -} - -func (o *PatchEndpointIDConfigNotFound) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigNotFound ", 404) -} - -func (o *PatchEndpointIDConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDConfigTooManyRequests creates a PatchEndpointIDConfigTooManyRequests with default headers values -func NewPatchEndpointIDConfigTooManyRequests() *PatchEndpointIDConfigTooManyRequests { - return &PatchEndpointIDConfigTooManyRequests{} -} - -/* -PatchEndpointIDConfigTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type PatchEndpointIDConfigTooManyRequests struct { -} - -// IsSuccess returns true when this patch endpoint Id config too many requests response has a 2xx status code -func (o *PatchEndpointIDConfigTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id config too many requests response has a 3xx status code -func (o *PatchEndpointIDConfigTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id config too many requests response has a 4xx status code -func (o *PatchEndpointIDConfigTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch endpoint Id config too many requests response has a 5xx status code -func (o *PatchEndpointIDConfigTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id config too many requests response a status code equal to that given -func (o *PatchEndpointIDConfigTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *PatchEndpointIDConfigTooManyRequests) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigTooManyRequests ", 429) -} - -func (o *PatchEndpointIDConfigTooManyRequests) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigTooManyRequests ", 429) -} - -func (o *PatchEndpointIDConfigTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDConfigFailed creates a PatchEndpointIDConfigFailed with default headers values -func NewPatchEndpointIDConfigFailed() *PatchEndpointIDConfigFailed { - return &PatchEndpointIDConfigFailed{} -} - -/* -PatchEndpointIDConfigFailed describes a response with status code 500, with default header values. - -Update failed. Details in message. -*/ -type PatchEndpointIDConfigFailed struct { - Payload models.Error -} - -// IsSuccess returns true when this patch endpoint Id config failed response has a 2xx status code -func (o *PatchEndpointIDConfigFailed) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id config failed response has a 3xx status code -func (o *PatchEndpointIDConfigFailed) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id config failed response has a 4xx status code -func (o *PatchEndpointIDConfigFailed) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch endpoint Id config failed response has a 5xx status code -func (o *PatchEndpointIDConfigFailed) IsServerError() bool { - return true -} - -// IsCode returns true when this patch endpoint Id config failed response a status code equal to that given -func (o *PatchEndpointIDConfigFailed) IsCode(code int) bool { - return code == 500 -} - -func (o *PatchEndpointIDConfigFailed) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigFailed %+v", 500, o.Payload) -} - -func (o *PatchEndpointIDConfigFailed) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/config][%d] patchEndpointIdConfigFailed %+v", 500, o.Payload) -} - -func (o *PatchEndpointIDConfigFailed) GetPayload() models.Error { - return o.Payload -} - -func (o *PatchEndpointIDConfigFailed) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_labels_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_labels_parameters.go deleted file mode 100644 index 8091565f55e..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_labels_parameters.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewPatchEndpointIDLabelsParams creates a new PatchEndpointIDLabelsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPatchEndpointIDLabelsParams() *PatchEndpointIDLabelsParams { - return &PatchEndpointIDLabelsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPatchEndpointIDLabelsParamsWithTimeout creates a new PatchEndpointIDLabelsParams object -// with the ability to set a timeout on a request. -func NewPatchEndpointIDLabelsParamsWithTimeout(timeout time.Duration) *PatchEndpointIDLabelsParams { - return &PatchEndpointIDLabelsParams{ - timeout: timeout, - } -} - -// NewPatchEndpointIDLabelsParamsWithContext creates a new PatchEndpointIDLabelsParams object -// with the ability to set a context for a request. -func NewPatchEndpointIDLabelsParamsWithContext(ctx context.Context) *PatchEndpointIDLabelsParams { - return &PatchEndpointIDLabelsParams{ - Context: ctx, - } -} - -// NewPatchEndpointIDLabelsParamsWithHTTPClient creates a new PatchEndpointIDLabelsParams object -// with the ability to set a custom HTTPClient for a request. -func NewPatchEndpointIDLabelsParamsWithHTTPClient(client *http.Client) *PatchEndpointIDLabelsParams { - return &PatchEndpointIDLabelsParams{ - HTTPClient: client, - } -} - -/* -PatchEndpointIDLabelsParams contains all the parameters to send to the API endpoint - - for the patch endpoint ID labels operation. - - Typically these are written to a http.Request. -*/ -type PatchEndpointIDLabelsParams struct { - - // Configuration. - Configuration *models.LabelConfigurationSpec - - /* ID. - - String describing an endpoint with the format ``[prefix:]id``. If no prefix - is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints - will be addressable by all endpoint ID prefixes with the exception of the - local Cilium UUID which is assigned to all endpoints. - - Supported endpoint id prefixes: - - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 - - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 - - cni-attachment-id: CNI attachment ID, e.g. cni-attachment-id:22222:eth0 - - container-id: Container runtime ID, e.g. container-id:22222 (deprecated, may not be unique) - - container-name: Container name, e.g. container-name:foobar (deprecated, may not be unique) - - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar (deprecated, may not be unique) - - cep-name: cep name for this container if K8s is enabled, e.g. pod-name:default:foobar-net1 - - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the patch endpoint ID labels params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchEndpointIDLabelsParams) WithDefaults() *PatchEndpointIDLabelsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the patch endpoint ID labels params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchEndpointIDLabelsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the patch endpoint ID labels params -func (o *PatchEndpointIDLabelsParams) WithTimeout(timeout time.Duration) *PatchEndpointIDLabelsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the patch endpoint ID labels params -func (o *PatchEndpointIDLabelsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the patch endpoint ID labels params -func (o *PatchEndpointIDLabelsParams) WithContext(ctx context.Context) *PatchEndpointIDLabelsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the patch endpoint ID labels params -func (o *PatchEndpointIDLabelsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the patch endpoint ID labels params -func (o *PatchEndpointIDLabelsParams) WithHTTPClient(client *http.Client) *PatchEndpointIDLabelsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the patch endpoint ID labels params -func (o *PatchEndpointIDLabelsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithConfiguration adds the configuration to the patch endpoint ID labels params -func (o *PatchEndpointIDLabelsParams) WithConfiguration(configuration *models.LabelConfigurationSpec) *PatchEndpointIDLabelsParams { - o.SetConfiguration(configuration) - return o -} - -// SetConfiguration adds the configuration to the patch endpoint ID labels params -func (o *PatchEndpointIDLabelsParams) SetConfiguration(configuration *models.LabelConfigurationSpec) { - o.Configuration = configuration -} - -// WithID adds the id to the patch endpoint ID labels params -func (o *PatchEndpointIDLabelsParams) WithID(id string) *PatchEndpointIDLabelsParams { - o.SetID(id) - return o -} - -// SetID adds the id to the patch endpoint ID labels params -func (o *PatchEndpointIDLabelsParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PatchEndpointIDLabelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Configuration != nil { - if err := r.SetBodyParam(o.Configuration); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_labels_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_labels_responses.go deleted file mode 100644 index d16eec5c36f..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_labels_responses.go +++ /dev/null @@ -1,327 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// PatchEndpointIDLabelsReader is a Reader for the PatchEndpointIDLabels structure. -type PatchEndpointIDLabelsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PatchEndpointIDLabelsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPatchEndpointIDLabelsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 403: - result := NewPatchEndpointIDLabelsForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewPatchEndpointIDLabelsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewPatchEndpointIDLabelsTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPatchEndpointIDLabelsUpdateFailed() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPatchEndpointIDLabelsOK creates a PatchEndpointIDLabelsOK with default headers values -func NewPatchEndpointIDLabelsOK() *PatchEndpointIDLabelsOK { - return &PatchEndpointIDLabelsOK{} -} - -/* -PatchEndpointIDLabelsOK describes a response with status code 200, with default header values. - -Success -*/ -type PatchEndpointIDLabelsOK struct { -} - -// IsSuccess returns true when this patch endpoint Id labels o k response has a 2xx status code -func (o *PatchEndpointIDLabelsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this patch endpoint Id labels o k response has a 3xx status code -func (o *PatchEndpointIDLabelsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id labels o k response has a 4xx status code -func (o *PatchEndpointIDLabelsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch endpoint Id labels o k response has a 5xx status code -func (o *PatchEndpointIDLabelsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id labels o k response a status code equal to that given -func (o *PatchEndpointIDLabelsOK) IsCode(code int) bool { - return code == 200 -} - -func (o *PatchEndpointIDLabelsOK) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/labels][%d] patchEndpointIdLabelsOK ", 200) -} - -func (o *PatchEndpointIDLabelsOK) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/labels][%d] patchEndpointIdLabelsOK ", 200) -} - -func (o *PatchEndpointIDLabelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDLabelsForbidden creates a PatchEndpointIDLabelsForbidden with default headers values -func NewPatchEndpointIDLabelsForbidden() *PatchEndpointIDLabelsForbidden { - return &PatchEndpointIDLabelsForbidden{} -} - -/* -PatchEndpointIDLabelsForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PatchEndpointIDLabelsForbidden struct { -} - -// IsSuccess returns true when this patch endpoint Id labels forbidden response has a 2xx status code -func (o *PatchEndpointIDLabelsForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id labels forbidden response has a 3xx status code -func (o *PatchEndpointIDLabelsForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id labels forbidden response has a 4xx status code -func (o *PatchEndpointIDLabelsForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch endpoint Id labels forbidden response has a 5xx status code -func (o *PatchEndpointIDLabelsForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id labels forbidden response a status code equal to that given -func (o *PatchEndpointIDLabelsForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PatchEndpointIDLabelsForbidden) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/labels][%d] patchEndpointIdLabelsForbidden ", 403) -} - -func (o *PatchEndpointIDLabelsForbidden) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/labels][%d] patchEndpointIdLabelsForbidden ", 403) -} - -func (o *PatchEndpointIDLabelsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDLabelsNotFound creates a PatchEndpointIDLabelsNotFound with default headers values -func NewPatchEndpointIDLabelsNotFound() *PatchEndpointIDLabelsNotFound { - return &PatchEndpointIDLabelsNotFound{} -} - -/* -PatchEndpointIDLabelsNotFound describes a response with status code 404, with default header values. - -Endpoint not found -*/ -type PatchEndpointIDLabelsNotFound struct { -} - -// IsSuccess returns true when this patch endpoint Id labels not found response has a 2xx status code -func (o *PatchEndpointIDLabelsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id labels not found response has a 3xx status code -func (o *PatchEndpointIDLabelsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id labels not found response has a 4xx status code -func (o *PatchEndpointIDLabelsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch endpoint Id labels not found response has a 5xx status code -func (o *PatchEndpointIDLabelsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id labels not found response a status code equal to that given -func (o *PatchEndpointIDLabelsNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *PatchEndpointIDLabelsNotFound) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/labels][%d] patchEndpointIdLabelsNotFound ", 404) -} - -func (o *PatchEndpointIDLabelsNotFound) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/labels][%d] patchEndpointIdLabelsNotFound ", 404) -} - -func (o *PatchEndpointIDLabelsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDLabelsTooManyRequests creates a PatchEndpointIDLabelsTooManyRequests with default headers values -func NewPatchEndpointIDLabelsTooManyRequests() *PatchEndpointIDLabelsTooManyRequests { - return &PatchEndpointIDLabelsTooManyRequests{} -} - -/* -PatchEndpointIDLabelsTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type PatchEndpointIDLabelsTooManyRequests struct { -} - -// IsSuccess returns true when this patch endpoint Id labels too many requests response has a 2xx status code -func (o *PatchEndpointIDLabelsTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id labels too many requests response has a 3xx status code -func (o *PatchEndpointIDLabelsTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id labels too many requests response has a 4xx status code -func (o *PatchEndpointIDLabelsTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch endpoint Id labels too many requests response has a 5xx status code -func (o *PatchEndpointIDLabelsTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id labels too many requests response a status code equal to that given -func (o *PatchEndpointIDLabelsTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *PatchEndpointIDLabelsTooManyRequests) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/labels][%d] patchEndpointIdLabelsTooManyRequests ", 429) -} - -func (o *PatchEndpointIDLabelsTooManyRequests) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/labels][%d] patchEndpointIdLabelsTooManyRequests ", 429) -} - -func (o *PatchEndpointIDLabelsTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDLabelsUpdateFailed creates a PatchEndpointIDLabelsUpdateFailed with default headers values -func NewPatchEndpointIDLabelsUpdateFailed() *PatchEndpointIDLabelsUpdateFailed { - return &PatchEndpointIDLabelsUpdateFailed{} -} - -/* -PatchEndpointIDLabelsUpdateFailed describes a response with status code 500, with default header values. - -Error while updating labels -*/ -type PatchEndpointIDLabelsUpdateFailed struct { - Payload models.Error -} - -// IsSuccess returns true when this patch endpoint Id labels update failed response has a 2xx status code -func (o *PatchEndpointIDLabelsUpdateFailed) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id labels update failed response has a 3xx status code -func (o *PatchEndpointIDLabelsUpdateFailed) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id labels update failed response has a 4xx status code -func (o *PatchEndpointIDLabelsUpdateFailed) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch endpoint Id labels update failed response has a 5xx status code -func (o *PatchEndpointIDLabelsUpdateFailed) IsServerError() bool { - return true -} - -// IsCode returns true when this patch endpoint Id labels update failed response a status code equal to that given -func (o *PatchEndpointIDLabelsUpdateFailed) IsCode(code int) bool { - return code == 500 -} - -func (o *PatchEndpointIDLabelsUpdateFailed) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/labels][%d] patchEndpointIdLabelsUpdateFailed %+v", 500, o.Payload) -} - -func (o *PatchEndpointIDLabelsUpdateFailed) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}/labels][%d] patchEndpointIdLabelsUpdateFailed %+v", 500, o.Payload) -} - -func (o *PatchEndpointIDLabelsUpdateFailed) GetPayload() models.Error { - return o.Payload -} - -func (o *PatchEndpointIDLabelsUpdateFailed) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_parameters.go deleted file mode 100644 index f718d198235..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_parameters.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewPatchEndpointIDParams creates a new PatchEndpointIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPatchEndpointIDParams() *PatchEndpointIDParams { - return &PatchEndpointIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPatchEndpointIDParamsWithTimeout creates a new PatchEndpointIDParams object -// with the ability to set a timeout on a request. -func NewPatchEndpointIDParamsWithTimeout(timeout time.Duration) *PatchEndpointIDParams { - return &PatchEndpointIDParams{ - timeout: timeout, - } -} - -// NewPatchEndpointIDParamsWithContext creates a new PatchEndpointIDParams object -// with the ability to set a context for a request. -func NewPatchEndpointIDParamsWithContext(ctx context.Context) *PatchEndpointIDParams { - return &PatchEndpointIDParams{ - Context: ctx, - } -} - -// NewPatchEndpointIDParamsWithHTTPClient creates a new PatchEndpointIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewPatchEndpointIDParamsWithHTTPClient(client *http.Client) *PatchEndpointIDParams { - return &PatchEndpointIDParams{ - HTTPClient: client, - } -} - -/* -PatchEndpointIDParams contains all the parameters to send to the API endpoint - - for the patch endpoint ID operation. - - Typically these are written to a http.Request. -*/ -type PatchEndpointIDParams struct { - - // Endpoint. - Endpoint *models.EndpointChangeRequest - - /* ID. - - String describing an endpoint with the format ``[prefix:]id``. If no prefix - is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints - will be addressable by all endpoint ID prefixes with the exception of the - local Cilium UUID which is assigned to all endpoints. - - Supported endpoint id prefixes: - - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 - - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 - - cni-attachment-id: CNI attachment ID, e.g. cni-attachment-id:22222:eth0 - - container-id: Container runtime ID, e.g. container-id:22222 (deprecated, may not be unique) - - container-name: Container name, e.g. container-name:foobar (deprecated, may not be unique) - - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar (deprecated, may not be unique) - - cep-name: cep name for this container if K8s is enabled, e.g. pod-name:default:foobar-net1 - - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the patch endpoint ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchEndpointIDParams) WithDefaults() *PatchEndpointIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the patch endpoint ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchEndpointIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the patch endpoint ID params -func (o *PatchEndpointIDParams) WithTimeout(timeout time.Duration) *PatchEndpointIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the patch endpoint ID params -func (o *PatchEndpointIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the patch endpoint ID params -func (o *PatchEndpointIDParams) WithContext(ctx context.Context) *PatchEndpointIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the patch endpoint ID params -func (o *PatchEndpointIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the patch endpoint ID params -func (o *PatchEndpointIDParams) WithHTTPClient(client *http.Client) *PatchEndpointIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the patch endpoint ID params -func (o *PatchEndpointIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndpoint adds the endpoint to the patch endpoint ID params -func (o *PatchEndpointIDParams) WithEndpoint(endpoint *models.EndpointChangeRequest) *PatchEndpointIDParams { - o.SetEndpoint(endpoint) - return o -} - -// SetEndpoint adds the endpoint to the patch endpoint ID params -func (o *PatchEndpointIDParams) SetEndpoint(endpoint *models.EndpointChangeRequest) { - o.Endpoint = endpoint -} - -// WithID adds the id to the patch endpoint ID params -func (o *PatchEndpointIDParams) WithID(id string) *PatchEndpointIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the patch endpoint ID params -func (o *PatchEndpointIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PatchEndpointIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Endpoint != nil { - if err := r.SetBodyParam(o.Endpoint); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_responses.go deleted file mode 100644 index 7b28de272a1..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/patch_endpoint_id_responses.go +++ /dev/null @@ -1,394 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// PatchEndpointIDReader is a Reader for the PatchEndpointID structure. -type PatchEndpointIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PatchEndpointIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPatchEndpointIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewPatchEndpointIDInvalid() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewPatchEndpointIDForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewPatchEndpointIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewPatchEndpointIDTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPatchEndpointIDFailed() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPatchEndpointIDOK creates a PatchEndpointIDOK with default headers values -func NewPatchEndpointIDOK() *PatchEndpointIDOK { - return &PatchEndpointIDOK{} -} - -/* -PatchEndpointIDOK describes a response with status code 200, with default header values. - -Success -*/ -type PatchEndpointIDOK struct { -} - -// IsSuccess returns true when this patch endpoint Id o k response has a 2xx status code -func (o *PatchEndpointIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this patch endpoint Id o k response has a 3xx status code -func (o *PatchEndpointIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id o k response has a 4xx status code -func (o *PatchEndpointIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch endpoint Id o k response has a 5xx status code -func (o *PatchEndpointIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id o k response a status code equal to that given -func (o *PatchEndpointIDOK) IsCode(code int) bool { - return code == 200 -} - -func (o *PatchEndpointIDOK) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdOK ", 200) -} - -func (o *PatchEndpointIDOK) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdOK ", 200) -} - -func (o *PatchEndpointIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDInvalid creates a PatchEndpointIDInvalid with default headers values -func NewPatchEndpointIDInvalid() *PatchEndpointIDInvalid { - return &PatchEndpointIDInvalid{} -} - -/* -PatchEndpointIDInvalid describes a response with status code 400, with default header values. - -Invalid modify endpoint request -*/ -type PatchEndpointIDInvalid struct { - Payload models.Error -} - -// IsSuccess returns true when this patch endpoint Id invalid response has a 2xx status code -func (o *PatchEndpointIDInvalid) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id invalid response has a 3xx status code -func (o *PatchEndpointIDInvalid) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id invalid response has a 4xx status code -func (o *PatchEndpointIDInvalid) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch endpoint Id invalid response has a 5xx status code -func (o *PatchEndpointIDInvalid) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id invalid response a status code equal to that given -func (o *PatchEndpointIDInvalid) IsCode(code int) bool { - return code == 400 -} - -func (o *PatchEndpointIDInvalid) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdInvalid %+v", 400, o.Payload) -} - -func (o *PatchEndpointIDInvalid) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdInvalid %+v", 400, o.Payload) -} - -func (o *PatchEndpointIDInvalid) GetPayload() models.Error { - return o.Payload -} - -func (o *PatchEndpointIDInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPatchEndpointIDForbidden creates a PatchEndpointIDForbidden with default headers values -func NewPatchEndpointIDForbidden() *PatchEndpointIDForbidden { - return &PatchEndpointIDForbidden{} -} - -/* -PatchEndpointIDForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PatchEndpointIDForbidden struct { -} - -// IsSuccess returns true when this patch endpoint Id forbidden response has a 2xx status code -func (o *PatchEndpointIDForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id forbidden response has a 3xx status code -func (o *PatchEndpointIDForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id forbidden response has a 4xx status code -func (o *PatchEndpointIDForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch endpoint Id forbidden response has a 5xx status code -func (o *PatchEndpointIDForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id forbidden response a status code equal to that given -func (o *PatchEndpointIDForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PatchEndpointIDForbidden) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdForbidden ", 403) -} - -func (o *PatchEndpointIDForbidden) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdForbidden ", 403) -} - -func (o *PatchEndpointIDForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDNotFound creates a PatchEndpointIDNotFound with default headers values -func NewPatchEndpointIDNotFound() *PatchEndpointIDNotFound { - return &PatchEndpointIDNotFound{} -} - -/* -PatchEndpointIDNotFound describes a response with status code 404, with default header values. - -Endpoint does not exist -*/ -type PatchEndpointIDNotFound struct { -} - -// IsSuccess returns true when this patch endpoint Id not found response has a 2xx status code -func (o *PatchEndpointIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id not found response has a 3xx status code -func (o *PatchEndpointIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id not found response has a 4xx status code -func (o *PatchEndpointIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch endpoint Id not found response has a 5xx status code -func (o *PatchEndpointIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id not found response a status code equal to that given -func (o *PatchEndpointIDNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *PatchEndpointIDNotFound) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdNotFound ", 404) -} - -func (o *PatchEndpointIDNotFound) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdNotFound ", 404) -} - -func (o *PatchEndpointIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDTooManyRequests creates a PatchEndpointIDTooManyRequests with default headers values -func NewPatchEndpointIDTooManyRequests() *PatchEndpointIDTooManyRequests { - return &PatchEndpointIDTooManyRequests{} -} - -/* -PatchEndpointIDTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type PatchEndpointIDTooManyRequests struct { -} - -// IsSuccess returns true when this patch endpoint Id too many requests response has a 2xx status code -func (o *PatchEndpointIDTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id too many requests response has a 3xx status code -func (o *PatchEndpointIDTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id too many requests response has a 4xx status code -func (o *PatchEndpointIDTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch endpoint Id too many requests response has a 5xx status code -func (o *PatchEndpointIDTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this patch endpoint Id too many requests response a status code equal to that given -func (o *PatchEndpointIDTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *PatchEndpointIDTooManyRequests) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdTooManyRequests ", 429) -} - -func (o *PatchEndpointIDTooManyRequests) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdTooManyRequests ", 429) -} - -func (o *PatchEndpointIDTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchEndpointIDFailed creates a PatchEndpointIDFailed with default headers values -func NewPatchEndpointIDFailed() *PatchEndpointIDFailed { - return &PatchEndpointIDFailed{} -} - -/* -PatchEndpointIDFailed describes a response with status code 500, with default header values. - -Endpoint update failed -*/ -type PatchEndpointIDFailed struct { - Payload models.Error -} - -// IsSuccess returns true when this patch endpoint Id failed response has a 2xx status code -func (o *PatchEndpointIDFailed) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch endpoint Id failed response has a 3xx status code -func (o *PatchEndpointIDFailed) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch endpoint Id failed response has a 4xx status code -func (o *PatchEndpointIDFailed) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch endpoint Id failed response has a 5xx status code -func (o *PatchEndpointIDFailed) IsServerError() bool { - return true -} - -// IsCode returns true when this patch endpoint Id failed response a status code equal to that given -func (o *PatchEndpointIDFailed) IsCode(code int) bool { - return code == 500 -} - -func (o *PatchEndpointIDFailed) Error() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdFailed %+v", 500, o.Payload) -} - -func (o *PatchEndpointIDFailed) String() string { - return fmt.Sprintf("[PATCH /endpoint/{id}][%d] patchEndpointIdFailed %+v", 500, o.Payload) -} - -func (o *PatchEndpointIDFailed) GetPayload() models.Error { - return o.Payload -} - -func (o *PatchEndpointIDFailed) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/put_endpoint_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/put_endpoint_id_parameters.go deleted file mode 100644 index a7342cba0b9..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/put_endpoint_id_parameters.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewPutEndpointIDParams creates a new PutEndpointIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPutEndpointIDParams() *PutEndpointIDParams { - return &PutEndpointIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPutEndpointIDParamsWithTimeout creates a new PutEndpointIDParams object -// with the ability to set a timeout on a request. -func NewPutEndpointIDParamsWithTimeout(timeout time.Duration) *PutEndpointIDParams { - return &PutEndpointIDParams{ - timeout: timeout, - } -} - -// NewPutEndpointIDParamsWithContext creates a new PutEndpointIDParams object -// with the ability to set a context for a request. -func NewPutEndpointIDParamsWithContext(ctx context.Context) *PutEndpointIDParams { - return &PutEndpointIDParams{ - Context: ctx, - } -} - -// NewPutEndpointIDParamsWithHTTPClient creates a new PutEndpointIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewPutEndpointIDParamsWithHTTPClient(client *http.Client) *PutEndpointIDParams { - return &PutEndpointIDParams{ - HTTPClient: client, - } -} - -/* -PutEndpointIDParams contains all the parameters to send to the API endpoint - - for the put endpoint ID operation. - - Typically these are written to a http.Request. -*/ -type PutEndpointIDParams struct { - - // Endpoint. - Endpoint *models.EndpointChangeRequest - - /* ID. - - String describing an endpoint with the format ``[prefix:]id``. If no prefix - is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints - will be addressable by all endpoint ID prefixes with the exception of the - local Cilium UUID which is assigned to all endpoints. - - Supported endpoint id prefixes: - - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 - - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 - - cni-attachment-id: CNI attachment ID, e.g. cni-attachment-id:22222:eth0 - - container-id: Container runtime ID, e.g. container-id:22222 (deprecated, may not be unique) - - container-name: Container name, e.g. container-name:foobar (deprecated, may not be unique) - - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar (deprecated, may not be unique) - - cep-name: cep name for this container if K8s is enabled, e.g. pod-name:default:foobar-net1 - - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the put endpoint ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutEndpointIDParams) WithDefaults() *PutEndpointIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the put endpoint ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutEndpointIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the put endpoint ID params -func (o *PutEndpointIDParams) WithTimeout(timeout time.Duration) *PutEndpointIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the put endpoint ID params -func (o *PutEndpointIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the put endpoint ID params -func (o *PutEndpointIDParams) WithContext(ctx context.Context) *PutEndpointIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the put endpoint ID params -func (o *PutEndpointIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the put endpoint ID params -func (o *PutEndpointIDParams) WithHTTPClient(client *http.Client) *PutEndpointIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the put endpoint ID params -func (o *PutEndpointIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithEndpoint adds the endpoint to the put endpoint ID params -func (o *PutEndpointIDParams) WithEndpoint(endpoint *models.EndpointChangeRequest) *PutEndpointIDParams { - o.SetEndpoint(endpoint) - return o -} - -// SetEndpoint adds the endpoint to the put endpoint ID params -func (o *PutEndpointIDParams) SetEndpoint(endpoint *models.EndpointChangeRequest) { - o.Endpoint = endpoint -} - -// WithID adds the id to the put endpoint ID params -func (o *PutEndpointIDParams) WithID(id string) *PutEndpointIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the put endpoint ID params -func (o *PutEndpointIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PutEndpointIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Endpoint != nil { - if err := r.SetBodyParam(o.Endpoint); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/put_endpoint_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/endpoint/put_endpoint_id_responses.go deleted file mode 100644 index 97147e563dc..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/endpoint/put_endpoint_id_responses.go +++ /dev/null @@ -1,394 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package endpoint - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// PutEndpointIDReader is a Reader for the PutEndpointID structure. -type PutEndpointIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PutEndpointIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewPutEndpointIDCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewPutEndpointIDInvalid() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewPutEndpointIDForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 409: - result := NewPutEndpointIDExists() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 429: - result := NewPutEndpointIDTooManyRequests() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPutEndpointIDFailed() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPutEndpointIDCreated creates a PutEndpointIDCreated with default headers values -func NewPutEndpointIDCreated() *PutEndpointIDCreated { - return &PutEndpointIDCreated{} -} - -/* -PutEndpointIDCreated describes a response with status code 201, with default header values. - -Created -*/ -type PutEndpointIDCreated struct { -} - -// IsSuccess returns true when this put endpoint Id created response has a 2xx status code -func (o *PutEndpointIDCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this put endpoint Id created response has a 3xx status code -func (o *PutEndpointIDCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put endpoint Id created response has a 4xx status code -func (o *PutEndpointIDCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this put endpoint Id created response has a 5xx status code -func (o *PutEndpointIDCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this put endpoint Id created response a status code equal to that given -func (o *PutEndpointIDCreated) IsCode(code int) bool { - return code == 201 -} - -func (o *PutEndpointIDCreated) Error() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdCreated ", 201) -} - -func (o *PutEndpointIDCreated) String() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdCreated ", 201) -} - -func (o *PutEndpointIDCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutEndpointIDInvalid creates a PutEndpointIDInvalid with default headers values -func NewPutEndpointIDInvalid() *PutEndpointIDInvalid { - return &PutEndpointIDInvalid{} -} - -/* -PutEndpointIDInvalid describes a response with status code 400, with default header values. - -Invalid endpoint in request -*/ -type PutEndpointIDInvalid struct { - Payload models.Error -} - -// IsSuccess returns true when this put endpoint Id invalid response has a 2xx status code -func (o *PutEndpointIDInvalid) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put endpoint Id invalid response has a 3xx status code -func (o *PutEndpointIDInvalid) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put endpoint Id invalid response has a 4xx status code -func (o *PutEndpointIDInvalid) IsClientError() bool { - return true -} - -// IsServerError returns true when this put endpoint Id invalid response has a 5xx status code -func (o *PutEndpointIDInvalid) IsServerError() bool { - return false -} - -// IsCode returns true when this put endpoint Id invalid response a status code equal to that given -func (o *PutEndpointIDInvalid) IsCode(code int) bool { - return code == 400 -} - -func (o *PutEndpointIDInvalid) Error() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdInvalid %+v", 400, o.Payload) -} - -func (o *PutEndpointIDInvalid) String() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdInvalid %+v", 400, o.Payload) -} - -func (o *PutEndpointIDInvalid) GetPayload() models.Error { - return o.Payload -} - -func (o *PutEndpointIDInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPutEndpointIDForbidden creates a PutEndpointIDForbidden with default headers values -func NewPutEndpointIDForbidden() *PutEndpointIDForbidden { - return &PutEndpointIDForbidden{} -} - -/* -PutEndpointIDForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PutEndpointIDForbidden struct { -} - -// IsSuccess returns true when this put endpoint Id forbidden response has a 2xx status code -func (o *PutEndpointIDForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put endpoint Id forbidden response has a 3xx status code -func (o *PutEndpointIDForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put endpoint Id forbidden response has a 4xx status code -func (o *PutEndpointIDForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this put endpoint Id forbidden response has a 5xx status code -func (o *PutEndpointIDForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this put endpoint Id forbidden response a status code equal to that given -func (o *PutEndpointIDForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PutEndpointIDForbidden) Error() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdForbidden ", 403) -} - -func (o *PutEndpointIDForbidden) String() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdForbidden ", 403) -} - -func (o *PutEndpointIDForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutEndpointIDExists creates a PutEndpointIDExists with default headers values -func NewPutEndpointIDExists() *PutEndpointIDExists { - return &PutEndpointIDExists{} -} - -/* -PutEndpointIDExists describes a response with status code 409, with default header values. - -Endpoint already exists -*/ -type PutEndpointIDExists struct { -} - -// IsSuccess returns true when this put endpoint Id exists response has a 2xx status code -func (o *PutEndpointIDExists) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put endpoint Id exists response has a 3xx status code -func (o *PutEndpointIDExists) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put endpoint Id exists response has a 4xx status code -func (o *PutEndpointIDExists) IsClientError() bool { - return true -} - -// IsServerError returns true when this put endpoint Id exists response has a 5xx status code -func (o *PutEndpointIDExists) IsServerError() bool { - return false -} - -// IsCode returns true when this put endpoint Id exists response a status code equal to that given -func (o *PutEndpointIDExists) IsCode(code int) bool { - return code == 409 -} - -func (o *PutEndpointIDExists) Error() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdExists ", 409) -} - -func (o *PutEndpointIDExists) String() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdExists ", 409) -} - -func (o *PutEndpointIDExists) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutEndpointIDTooManyRequests creates a PutEndpointIDTooManyRequests with default headers values -func NewPutEndpointIDTooManyRequests() *PutEndpointIDTooManyRequests { - return &PutEndpointIDTooManyRequests{} -} - -/* -PutEndpointIDTooManyRequests describes a response with status code 429, with default header values. - -Rate-limiting too many requests in the given time frame -*/ -type PutEndpointIDTooManyRequests struct { -} - -// IsSuccess returns true when this put endpoint Id too many requests response has a 2xx status code -func (o *PutEndpointIDTooManyRequests) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put endpoint Id too many requests response has a 3xx status code -func (o *PutEndpointIDTooManyRequests) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put endpoint Id too many requests response has a 4xx status code -func (o *PutEndpointIDTooManyRequests) IsClientError() bool { - return true -} - -// IsServerError returns true when this put endpoint Id too many requests response has a 5xx status code -func (o *PutEndpointIDTooManyRequests) IsServerError() bool { - return false -} - -// IsCode returns true when this put endpoint Id too many requests response a status code equal to that given -func (o *PutEndpointIDTooManyRequests) IsCode(code int) bool { - return code == 429 -} - -func (o *PutEndpointIDTooManyRequests) Error() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdTooManyRequests ", 429) -} - -func (o *PutEndpointIDTooManyRequests) String() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdTooManyRequests ", 429) -} - -func (o *PutEndpointIDTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutEndpointIDFailed creates a PutEndpointIDFailed with default headers values -func NewPutEndpointIDFailed() *PutEndpointIDFailed { - return &PutEndpointIDFailed{} -} - -/* -PutEndpointIDFailed describes a response with status code 500, with default header values. - -Endpoint creation failed -*/ -type PutEndpointIDFailed struct { - Payload models.Error -} - -// IsSuccess returns true when this put endpoint Id failed response has a 2xx status code -func (o *PutEndpointIDFailed) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put endpoint Id failed response has a 3xx status code -func (o *PutEndpointIDFailed) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put endpoint Id failed response has a 4xx status code -func (o *PutEndpointIDFailed) IsClientError() bool { - return false -} - -// IsServerError returns true when this put endpoint Id failed response has a 5xx status code -func (o *PutEndpointIDFailed) IsServerError() bool { - return true -} - -// IsCode returns true when this put endpoint Id failed response a status code equal to that given -func (o *PutEndpointIDFailed) IsCode(code int) bool { - return code == 500 -} - -func (o *PutEndpointIDFailed) Error() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdFailed %+v", 500, o.Payload) -} - -func (o *PutEndpointIDFailed) String() string { - return fmt.Sprintf("[PUT /endpoint/{id}][%d] putEndpointIdFailed %+v", 500, o.Payload) -} - -func (o *PutEndpointIDFailed) GetPayload() models.Error { - return o.Payload -} - -func (o *PutEndpointIDFailed) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/ipam/delete_ipam_ip_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/ipam/delete_ipam_ip_parameters.go deleted file mode 100644 index 73cc82d5191..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/ipam/delete_ipam_ip_parameters.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package ipam - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteIpamIPParams creates a new DeleteIpamIPParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteIpamIPParams() *DeleteIpamIPParams { - return &DeleteIpamIPParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteIpamIPParamsWithTimeout creates a new DeleteIpamIPParams object -// with the ability to set a timeout on a request. -func NewDeleteIpamIPParamsWithTimeout(timeout time.Duration) *DeleteIpamIPParams { - return &DeleteIpamIPParams{ - timeout: timeout, - } -} - -// NewDeleteIpamIPParamsWithContext creates a new DeleteIpamIPParams object -// with the ability to set a context for a request. -func NewDeleteIpamIPParamsWithContext(ctx context.Context) *DeleteIpamIPParams { - return &DeleteIpamIPParams{ - Context: ctx, - } -} - -// NewDeleteIpamIPParamsWithHTTPClient creates a new DeleteIpamIPParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteIpamIPParamsWithHTTPClient(client *http.Client) *DeleteIpamIPParams { - return &DeleteIpamIPParams{ - HTTPClient: client, - } -} - -/* -DeleteIpamIPParams contains all the parameters to send to the API endpoint - - for the delete ipam IP operation. - - Typically these are written to a http.Request. -*/ -type DeleteIpamIPParams struct { - - /* IP. - - IP address - */ - IP string - - // Pool. - Pool *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete ipam IP params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteIpamIPParams) WithDefaults() *DeleteIpamIPParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete ipam IP params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteIpamIPParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete ipam IP params -func (o *DeleteIpamIPParams) WithTimeout(timeout time.Duration) *DeleteIpamIPParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete ipam IP params -func (o *DeleteIpamIPParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete ipam IP params -func (o *DeleteIpamIPParams) WithContext(ctx context.Context) *DeleteIpamIPParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete ipam IP params -func (o *DeleteIpamIPParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete ipam IP params -func (o *DeleteIpamIPParams) WithHTTPClient(client *http.Client) *DeleteIpamIPParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete ipam IP params -func (o *DeleteIpamIPParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIP adds the ip to the delete ipam IP params -func (o *DeleteIpamIPParams) WithIP(ip string) *DeleteIpamIPParams { - o.SetIP(ip) - return o -} - -// SetIP adds the ip to the delete ipam IP params -func (o *DeleteIpamIPParams) SetIP(ip string) { - o.IP = ip -} - -// WithPool adds the pool to the delete ipam IP params -func (o *DeleteIpamIPParams) WithPool(pool *string) *DeleteIpamIPParams { - o.SetPool(pool) - return o -} - -// SetPool adds the pool to the delete ipam IP params -func (o *DeleteIpamIPParams) SetPool(pool *string) { - o.Pool = pool -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteIpamIPParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param ip - if err := r.SetPathParam("ip", o.IP); err != nil { - return err - } - - if o.Pool != nil { - - // query param pool - var qrPool string - - if o.Pool != nil { - qrPool = *o.Pool - } - qPool := qrPool - if qPool != "" { - - if err := r.SetQueryParam("pool", qPool); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/ipam/delete_ipam_ip_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/ipam/delete_ipam_ip_responses.go deleted file mode 100644 index ae095b6799a..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/ipam/delete_ipam_ip_responses.go +++ /dev/null @@ -1,384 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package ipam - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// DeleteIpamIPReader is a Reader for the DeleteIpamIP structure. -type DeleteIpamIPReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteIpamIPReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteIpamIPOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteIpamIPInvalid() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeleteIpamIPForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteIpamIPNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeleteIpamIPFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 501: - result := NewDeleteIpamIPDisabled() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteIpamIPOK creates a DeleteIpamIPOK with default headers values -func NewDeleteIpamIPOK() *DeleteIpamIPOK { - return &DeleteIpamIPOK{} -} - -/* -DeleteIpamIPOK describes a response with status code 200, with default header values. - -Success -*/ -type DeleteIpamIPOK struct { -} - -// IsSuccess returns true when this delete ipam Ip o k response has a 2xx status code -func (o *DeleteIpamIPOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete ipam Ip o k response has a 3xx status code -func (o *DeleteIpamIPOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete ipam Ip o k response has a 4xx status code -func (o *DeleteIpamIPOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete ipam Ip o k response has a 5xx status code -func (o *DeleteIpamIPOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete ipam Ip o k response a status code equal to that given -func (o *DeleteIpamIPOK) IsCode(code int) bool { - return code == 200 -} - -func (o *DeleteIpamIPOK) Error() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpOK ", 200) -} - -func (o *DeleteIpamIPOK) String() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpOK ", 200) -} - -func (o *DeleteIpamIPOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteIpamIPInvalid creates a DeleteIpamIPInvalid with default headers values -func NewDeleteIpamIPInvalid() *DeleteIpamIPInvalid { - return &DeleteIpamIPInvalid{} -} - -/* -DeleteIpamIPInvalid describes a response with status code 400, with default header values. - -Invalid IP address -*/ -type DeleteIpamIPInvalid struct { -} - -// IsSuccess returns true when this delete ipam Ip invalid response has a 2xx status code -func (o *DeleteIpamIPInvalid) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete ipam Ip invalid response has a 3xx status code -func (o *DeleteIpamIPInvalid) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete ipam Ip invalid response has a 4xx status code -func (o *DeleteIpamIPInvalid) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete ipam Ip invalid response has a 5xx status code -func (o *DeleteIpamIPInvalid) IsServerError() bool { - return false -} - -// IsCode returns true when this delete ipam Ip invalid response a status code equal to that given -func (o *DeleteIpamIPInvalid) IsCode(code int) bool { - return code == 400 -} - -func (o *DeleteIpamIPInvalid) Error() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpInvalid ", 400) -} - -func (o *DeleteIpamIPInvalid) String() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpInvalid ", 400) -} - -func (o *DeleteIpamIPInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteIpamIPForbidden creates a DeleteIpamIPForbidden with default headers values -func NewDeleteIpamIPForbidden() *DeleteIpamIPForbidden { - return &DeleteIpamIPForbidden{} -} - -/* -DeleteIpamIPForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeleteIpamIPForbidden struct { -} - -// IsSuccess returns true when this delete ipam Ip forbidden response has a 2xx status code -func (o *DeleteIpamIPForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete ipam Ip forbidden response has a 3xx status code -func (o *DeleteIpamIPForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete ipam Ip forbidden response has a 4xx status code -func (o *DeleteIpamIPForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete ipam Ip forbidden response has a 5xx status code -func (o *DeleteIpamIPForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete ipam Ip forbidden response a status code equal to that given -func (o *DeleteIpamIPForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *DeleteIpamIPForbidden) Error() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpForbidden ", 403) -} - -func (o *DeleteIpamIPForbidden) String() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpForbidden ", 403) -} - -func (o *DeleteIpamIPForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteIpamIPNotFound creates a DeleteIpamIPNotFound with default headers values -func NewDeleteIpamIPNotFound() *DeleteIpamIPNotFound { - return &DeleteIpamIPNotFound{} -} - -/* -DeleteIpamIPNotFound describes a response with status code 404, with default header values. - -IP address not found -*/ -type DeleteIpamIPNotFound struct { -} - -// IsSuccess returns true when this delete ipam Ip not found response has a 2xx status code -func (o *DeleteIpamIPNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete ipam Ip not found response has a 3xx status code -func (o *DeleteIpamIPNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete ipam Ip not found response has a 4xx status code -func (o *DeleteIpamIPNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete ipam Ip not found response has a 5xx status code -func (o *DeleteIpamIPNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete ipam Ip not found response a status code equal to that given -func (o *DeleteIpamIPNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *DeleteIpamIPNotFound) Error() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpNotFound ", 404) -} - -func (o *DeleteIpamIPNotFound) String() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpNotFound ", 404) -} - -func (o *DeleteIpamIPNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteIpamIPFailure creates a DeleteIpamIPFailure with default headers values -func NewDeleteIpamIPFailure() *DeleteIpamIPFailure { - return &DeleteIpamIPFailure{} -} - -/* -DeleteIpamIPFailure describes a response with status code 500, with default header values. - -Address release failure -*/ -type DeleteIpamIPFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this delete ipam Ip failure response has a 2xx status code -func (o *DeleteIpamIPFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete ipam Ip failure response has a 3xx status code -func (o *DeleteIpamIPFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete ipam Ip failure response has a 4xx status code -func (o *DeleteIpamIPFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete ipam Ip failure response has a 5xx status code -func (o *DeleteIpamIPFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this delete ipam Ip failure response a status code equal to that given -func (o *DeleteIpamIPFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *DeleteIpamIPFailure) Error() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpFailure %+v", 500, o.Payload) -} - -func (o *DeleteIpamIPFailure) String() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpFailure %+v", 500, o.Payload) -} - -func (o *DeleteIpamIPFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *DeleteIpamIPFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteIpamIPDisabled creates a DeleteIpamIPDisabled with default headers values -func NewDeleteIpamIPDisabled() *DeleteIpamIPDisabled { - return &DeleteIpamIPDisabled{} -} - -/* -DeleteIpamIPDisabled describes a response with status code 501, with default header values. - -Allocation for address family disabled -*/ -type DeleteIpamIPDisabled struct { -} - -// IsSuccess returns true when this delete ipam Ip disabled response has a 2xx status code -func (o *DeleteIpamIPDisabled) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete ipam Ip disabled response has a 3xx status code -func (o *DeleteIpamIPDisabled) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete ipam Ip disabled response has a 4xx status code -func (o *DeleteIpamIPDisabled) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete ipam Ip disabled response has a 5xx status code -func (o *DeleteIpamIPDisabled) IsServerError() bool { - return true -} - -// IsCode returns true when this delete ipam Ip disabled response a status code equal to that given -func (o *DeleteIpamIPDisabled) IsCode(code int) bool { - return code == 501 -} - -func (o *DeleteIpamIPDisabled) Error() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpDisabled ", 501) -} - -func (o *DeleteIpamIPDisabled) String() string { - return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpamIpDisabled ", 501) -} - -func (o *DeleteIpamIPDisabled) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/ipam/ipam_client.go b/vendor/github.com/cilium/cilium/api/v1/client/ipam/ipam_client.go deleted file mode 100644 index bff4193d66a..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/ipam/ipam_client.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package ipam - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new ipam API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for ipam API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeleteIpamIP(params *DeleteIpamIPParams, opts ...ClientOption) (*DeleteIpamIPOK, error) - - PostIpam(params *PostIpamParams, opts ...ClientOption) (*PostIpamCreated, error) - - PostIpamIP(params *PostIpamIPParams, opts ...ClientOption) (*PostIpamIPOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeleteIpamIP releases an allocated IP address -*/ -func (a *Client) DeleteIpamIP(params *DeleteIpamIPParams, opts ...ClientOption) (*DeleteIpamIPOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteIpamIPParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteIpamIP", - Method: "DELETE", - PathPattern: "/ipam/{ip}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteIpamIPReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteIpamIPOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for DeleteIpamIP: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -PostIpam allocates an IP address -*/ -func (a *Client) PostIpam(params *PostIpamParams, opts ...ClientOption) (*PostIpamCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPostIpamParams() - } - op := &runtime.ClientOperation{ - ID: "PostIpam", - Method: "POST", - PathPattern: "/ipam", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PostIpamReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PostIpamCreated) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for PostIpam: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -PostIpamIP allocates an IP address -*/ -func (a *Client) PostIpamIP(params *PostIpamIPParams, opts ...ClientOption) (*PostIpamIPOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPostIpamIPParams() - } - op := &runtime.ClientOperation{ - ID: "PostIpamIP", - Method: "POST", - PathPattern: "/ipam/{ip}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PostIpamIPReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PostIpamIPOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for PostIpamIP: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_ip_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_ip_parameters.go deleted file mode 100644 index 6dbf02985ef..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_ip_parameters.go +++ /dev/null @@ -1,216 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package ipam - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewPostIpamIPParams creates a new PostIpamIPParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPostIpamIPParams() *PostIpamIPParams { - return &PostIpamIPParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPostIpamIPParamsWithTimeout creates a new PostIpamIPParams object -// with the ability to set a timeout on a request. -func NewPostIpamIPParamsWithTimeout(timeout time.Duration) *PostIpamIPParams { - return &PostIpamIPParams{ - timeout: timeout, - } -} - -// NewPostIpamIPParamsWithContext creates a new PostIpamIPParams object -// with the ability to set a context for a request. -func NewPostIpamIPParamsWithContext(ctx context.Context) *PostIpamIPParams { - return &PostIpamIPParams{ - Context: ctx, - } -} - -// NewPostIpamIPParamsWithHTTPClient creates a new PostIpamIPParams object -// with the ability to set a custom HTTPClient for a request. -func NewPostIpamIPParamsWithHTTPClient(client *http.Client) *PostIpamIPParams { - return &PostIpamIPParams{ - HTTPClient: client, - } -} - -/* -PostIpamIPParams contains all the parameters to send to the API endpoint - - for the post ipam IP operation. - - Typically these are written to a http.Request. -*/ -type PostIpamIPParams struct { - - /* IP. - - IP address - */ - IP string - - // Owner. - Owner *string - - // Pool. - Pool *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the post ipam IP params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PostIpamIPParams) WithDefaults() *PostIpamIPParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the post ipam IP params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PostIpamIPParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the post ipam IP params -func (o *PostIpamIPParams) WithTimeout(timeout time.Duration) *PostIpamIPParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the post ipam IP params -func (o *PostIpamIPParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the post ipam IP params -func (o *PostIpamIPParams) WithContext(ctx context.Context) *PostIpamIPParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the post ipam IP params -func (o *PostIpamIPParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the post ipam IP params -func (o *PostIpamIPParams) WithHTTPClient(client *http.Client) *PostIpamIPParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the post ipam IP params -func (o *PostIpamIPParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIP adds the ip to the post ipam IP params -func (o *PostIpamIPParams) WithIP(ip string) *PostIpamIPParams { - o.SetIP(ip) - return o -} - -// SetIP adds the ip to the post ipam IP params -func (o *PostIpamIPParams) SetIP(ip string) { - o.IP = ip -} - -// WithOwner adds the owner to the post ipam IP params -func (o *PostIpamIPParams) WithOwner(owner *string) *PostIpamIPParams { - o.SetOwner(owner) - return o -} - -// SetOwner adds the owner to the post ipam IP params -func (o *PostIpamIPParams) SetOwner(owner *string) { - o.Owner = owner -} - -// WithPool adds the pool to the post ipam IP params -func (o *PostIpamIPParams) WithPool(pool *string) *PostIpamIPParams { - o.SetPool(pool) - return o -} - -// SetPool adds the pool to the post ipam IP params -func (o *PostIpamIPParams) SetPool(pool *string) { - o.Pool = pool -} - -// WriteToRequest writes these params to a swagger request -func (o *PostIpamIPParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param ip - if err := r.SetPathParam("ip", o.IP); err != nil { - return err - } - - if o.Owner != nil { - - // query param owner - var qrOwner string - - if o.Owner != nil { - qrOwner = *o.Owner - } - qOwner := qrOwner - if qOwner != "" { - - if err := r.SetQueryParam("owner", qOwner); err != nil { - return err - } - } - } - - if o.Pool != nil { - - // query param pool - var qrPool string - - if o.Pool != nil { - qrPool = *o.Pool - } - qPool := qrPool - if qPool != "" { - - if err := r.SetQueryParam("pool", qPool); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_ip_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_ip_responses.go deleted file mode 100644 index 1c8cff834f1..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_ip_responses.go +++ /dev/null @@ -1,384 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package ipam - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// PostIpamIPReader is a Reader for the PostIpamIP structure. -type PostIpamIPReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PostIpamIPReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPostIpamIPOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewPostIpamIPInvalid() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewPostIpamIPForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 409: - result := NewPostIpamIPExists() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPostIpamIPFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 501: - result := NewPostIpamIPDisabled() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPostIpamIPOK creates a PostIpamIPOK with default headers values -func NewPostIpamIPOK() *PostIpamIPOK { - return &PostIpamIPOK{} -} - -/* -PostIpamIPOK describes a response with status code 200, with default header values. - -Success -*/ -type PostIpamIPOK struct { -} - -// IsSuccess returns true when this post ipam Ip o k response has a 2xx status code -func (o *PostIpamIPOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this post ipam Ip o k response has a 3xx status code -func (o *PostIpamIPOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post ipam Ip o k response has a 4xx status code -func (o *PostIpamIPOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this post ipam Ip o k response has a 5xx status code -func (o *PostIpamIPOK) IsServerError() bool { - return false -} - -// IsCode returns true when this post ipam Ip o k response a status code equal to that given -func (o *PostIpamIPOK) IsCode(code int) bool { - return code == 200 -} - -func (o *PostIpamIPOK) Error() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpOK ", 200) -} - -func (o *PostIpamIPOK) String() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpOK ", 200) -} - -func (o *PostIpamIPOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPostIpamIPInvalid creates a PostIpamIPInvalid with default headers values -func NewPostIpamIPInvalid() *PostIpamIPInvalid { - return &PostIpamIPInvalid{} -} - -/* -PostIpamIPInvalid describes a response with status code 400, with default header values. - -Invalid IP address -*/ -type PostIpamIPInvalid struct { -} - -// IsSuccess returns true when this post ipam Ip invalid response has a 2xx status code -func (o *PostIpamIPInvalid) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this post ipam Ip invalid response has a 3xx status code -func (o *PostIpamIPInvalid) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post ipam Ip invalid response has a 4xx status code -func (o *PostIpamIPInvalid) IsClientError() bool { - return true -} - -// IsServerError returns true when this post ipam Ip invalid response has a 5xx status code -func (o *PostIpamIPInvalid) IsServerError() bool { - return false -} - -// IsCode returns true when this post ipam Ip invalid response a status code equal to that given -func (o *PostIpamIPInvalid) IsCode(code int) bool { - return code == 400 -} - -func (o *PostIpamIPInvalid) Error() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpInvalid ", 400) -} - -func (o *PostIpamIPInvalid) String() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpInvalid ", 400) -} - -func (o *PostIpamIPInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPostIpamIPForbidden creates a PostIpamIPForbidden with default headers values -func NewPostIpamIPForbidden() *PostIpamIPForbidden { - return &PostIpamIPForbidden{} -} - -/* -PostIpamIPForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PostIpamIPForbidden struct { -} - -// IsSuccess returns true when this post ipam Ip forbidden response has a 2xx status code -func (o *PostIpamIPForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this post ipam Ip forbidden response has a 3xx status code -func (o *PostIpamIPForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post ipam Ip forbidden response has a 4xx status code -func (o *PostIpamIPForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this post ipam Ip forbidden response has a 5xx status code -func (o *PostIpamIPForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this post ipam Ip forbidden response a status code equal to that given -func (o *PostIpamIPForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PostIpamIPForbidden) Error() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpForbidden ", 403) -} - -func (o *PostIpamIPForbidden) String() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpForbidden ", 403) -} - -func (o *PostIpamIPForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPostIpamIPExists creates a PostIpamIPExists with default headers values -func NewPostIpamIPExists() *PostIpamIPExists { - return &PostIpamIPExists{} -} - -/* -PostIpamIPExists describes a response with status code 409, with default header values. - -IP already allocated -*/ -type PostIpamIPExists struct { -} - -// IsSuccess returns true when this post ipam Ip exists response has a 2xx status code -func (o *PostIpamIPExists) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this post ipam Ip exists response has a 3xx status code -func (o *PostIpamIPExists) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post ipam Ip exists response has a 4xx status code -func (o *PostIpamIPExists) IsClientError() bool { - return true -} - -// IsServerError returns true when this post ipam Ip exists response has a 5xx status code -func (o *PostIpamIPExists) IsServerError() bool { - return false -} - -// IsCode returns true when this post ipam Ip exists response a status code equal to that given -func (o *PostIpamIPExists) IsCode(code int) bool { - return code == 409 -} - -func (o *PostIpamIPExists) Error() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpExists ", 409) -} - -func (o *PostIpamIPExists) String() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpExists ", 409) -} - -func (o *PostIpamIPExists) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPostIpamIPFailure creates a PostIpamIPFailure with default headers values -func NewPostIpamIPFailure() *PostIpamIPFailure { - return &PostIpamIPFailure{} -} - -/* -PostIpamIPFailure describes a response with status code 500, with default header values. - -IP allocation failure. Details in message. -*/ -type PostIpamIPFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this post ipam Ip failure response has a 2xx status code -func (o *PostIpamIPFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this post ipam Ip failure response has a 3xx status code -func (o *PostIpamIPFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post ipam Ip failure response has a 4xx status code -func (o *PostIpamIPFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this post ipam Ip failure response has a 5xx status code -func (o *PostIpamIPFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this post ipam Ip failure response a status code equal to that given -func (o *PostIpamIPFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *PostIpamIPFailure) Error() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpFailure %+v", 500, o.Payload) -} - -func (o *PostIpamIPFailure) String() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpFailure %+v", 500, o.Payload) -} - -func (o *PostIpamIPFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *PostIpamIPFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPostIpamIPDisabled creates a PostIpamIPDisabled with default headers values -func NewPostIpamIPDisabled() *PostIpamIPDisabled { - return &PostIpamIPDisabled{} -} - -/* -PostIpamIPDisabled describes a response with status code 501, with default header values. - -Allocation for address family disabled -*/ -type PostIpamIPDisabled struct { -} - -// IsSuccess returns true when this post ipam Ip disabled response has a 2xx status code -func (o *PostIpamIPDisabled) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this post ipam Ip disabled response has a 3xx status code -func (o *PostIpamIPDisabled) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post ipam Ip disabled response has a 4xx status code -func (o *PostIpamIPDisabled) IsClientError() bool { - return false -} - -// IsServerError returns true when this post ipam Ip disabled response has a 5xx status code -func (o *PostIpamIPDisabled) IsServerError() bool { - return true -} - -// IsCode returns true when this post ipam Ip disabled response a status code equal to that given -func (o *PostIpamIPDisabled) IsCode(code int) bool { - return code == 501 -} - -func (o *PostIpamIPDisabled) Error() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpDisabled ", 501) -} - -func (o *PostIpamIPDisabled) String() string { - return fmt.Sprintf("[POST /ipam/{ip}][%d] postIpamIpDisabled ", 501) -} - -func (o *PostIpamIPDisabled) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_parameters.go deleted file mode 100644 index 8e2075849a9..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_parameters.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package ipam - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewPostIpamParams creates a new PostIpamParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPostIpamParams() *PostIpamParams { - return &PostIpamParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPostIpamParamsWithTimeout creates a new PostIpamParams object -// with the ability to set a timeout on a request. -func NewPostIpamParamsWithTimeout(timeout time.Duration) *PostIpamParams { - return &PostIpamParams{ - timeout: timeout, - } -} - -// NewPostIpamParamsWithContext creates a new PostIpamParams object -// with the ability to set a context for a request. -func NewPostIpamParamsWithContext(ctx context.Context) *PostIpamParams { - return &PostIpamParams{ - Context: ctx, - } -} - -// NewPostIpamParamsWithHTTPClient creates a new PostIpamParams object -// with the ability to set a custom HTTPClient for a request. -func NewPostIpamParamsWithHTTPClient(client *http.Client) *PostIpamParams { - return &PostIpamParams{ - HTTPClient: client, - } -} - -/* -PostIpamParams contains all the parameters to send to the API endpoint - - for the post ipam operation. - - Typically these are written to a http.Request. -*/ -type PostIpamParams struct { - - // Expiration. - Expiration *bool - - // Family. - Family *string - - // Owner. - Owner *string - - // Pool. - Pool *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the post ipam params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PostIpamParams) WithDefaults() *PostIpamParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the post ipam params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PostIpamParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the post ipam params -func (o *PostIpamParams) WithTimeout(timeout time.Duration) *PostIpamParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the post ipam params -func (o *PostIpamParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the post ipam params -func (o *PostIpamParams) WithContext(ctx context.Context) *PostIpamParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the post ipam params -func (o *PostIpamParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the post ipam params -func (o *PostIpamParams) WithHTTPClient(client *http.Client) *PostIpamParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the post ipam params -func (o *PostIpamParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithExpiration adds the expiration to the post ipam params -func (o *PostIpamParams) WithExpiration(expiration *bool) *PostIpamParams { - o.SetExpiration(expiration) - return o -} - -// SetExpiration adds the expiration to the post ipam params -func (o *PostIpamParams) SetExpiration(expiration *bool) { - o.Expiration = expiration -} - -// WithFamily adds the family to the post ipam params -func (o *PostIpamParams) WithFamily(family *string) *PostIpamParams { - o.SetFamily(family) - return o -} - -// SetFamily adds the family to the post ipam params -func (o *PostIpamParams) SetFamily(family *string) { - o.Family = family -} - -// WithOwner adds the owner to the post ipam params -func (o *PostIpamParams) WithOwner(owner *string) *PostIpamParams { - o.SetOwner(owner) - return o -} - -// SetOwner adds the owner to the post ipam params -func (o *PostIpamParams) SetOwner(owner *string) { - o.Owner = owner -} - -// WithPool adds the pool to the post ipam params -func (o *PostIpamParams) WithPool(pool *string) *PostIpamParams { - o.SetPool(pool) - return o -} - -// SetPool adds the pool to the post ipam params -func (o *PostIpamParams) SetPool(pool *string) { - o.Pool = pool -} - -// WriteToRequest writes these params to a swagger request -func (o *PostIpamParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Expiration != nil { - - // header param expiration - if err := r.SetHeaderParam("expiration", swag.FormatBool(*o.Expiration)); err != nil { - return err - } - } - - if o.Family != nil { - - // query param family - var qrFamily string - - if o.Family != nil { - qrFamily = *o.Family - } - qFamily := qrFamily - if qFamily != "" { - - if err := r.SetQueryParam("family", qFamily); err != nil { - return err - } - } - } - - if o.Owner != nil { - - // query param owner - var qrOwner string - - if o.Owner != nil { - qrOwner = *o.Owner - } - qOwner := qrOwner - if qOwner != "" { - - if err := r.SetQueryParam("owner", qOwner); err != nil { - return err - } - } - } - - if o.Pool != nil { - - // query param pool - var qrPool string - - if o.Pool != nil { - qrPool = *o.Pool - } - qPool := qrPool - if qPool != "" { - - if err := r.SetQueryParam("pool", qPool); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_responses.go deleted file mode 100644 index 2f13cc29458..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/ipam/post_ipam_responses.go +++ /dev/null @@ -1,225 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package ipam - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// PostIpamReader is a Reader for the PostIpam structure. -type PostIpamReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PostIpamReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewPostIpamCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 403: - result := NewPostIpamForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 502: - result := NewPostIpamFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPostIpamCreated creates a PostIpamCreated with default headers values -func NewPostIpamCreated() *PostIpamCreated { - return &PostIpamCreated{} -} - -/* -PostIpamCreated describes a response with status code 201, with default header values. - -Success -*/ -type PostIpamCreated struct { - Payload *models.IPAMResponse -} - -// IsSuccess returns true when this post ipam created response has a 2xx status code -func (o *PostIpamCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this post ipam created response has a 3xx status code -func (o *PostIpamCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post ipam created response has a 4xx status code -func (o *PostIpamCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this post ipam created response has a 5xx status code -func (o *PostIpamCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this post ipam created response a status code equal to that given -func (o *PostIpamCreated) IsCode(code int) bool { - return code == 201 -} - -func (o *PostIpamCreated) Error() string { - return fmt.Sprintf("[POST /ipam][%d] postIpamCreated %+v", 201, o.Payload) -} - -func (o *PostIpamCreated) String() string { - return fmt.Sprintf("[POST /ipam][%d] postIpamCreated %+v", 201, o.Payload) -} - -func (o *PostIpamCreated) GetPayload() *models.IPAMResponse { - return o.Payload -} - -func (o *PostIpamCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.IPAMResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPostIpamForbidden creates a PostIpamForbidden with default headers values -func NewPostIpamForbidden() *PostIpamForbidden { - return &PostIpamForbidden{} -} - -/* -PostIpamForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PostIpamForbidden struct { -} - -// IsSuccess returns true when this post ipam forbidden response has a 2xx status code -func (o *PostIpamForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this post ipam forbidden response has a 3xx status code -func (o *PostIpamForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post ipam forbidden response has a 4xx status code -func (o *PostIpamForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this post ipam forbidden response has a 5xx status code -func (o *PostIpamForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this post ipam forbidden response a status code equal to that given -func (o *PostIpamForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PostIpamForbidden) Error() string { - return fmt.Sprintf("[POST /ipam][%d] postIpamForbidden ", 403) -} - -func (o *PostIpamForbidden) String() string { - return fmt.Sprintf("[POST /ipam][%d] postIpamForbidden ", 403) -} - -func (o *PostIpamForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPostIpamFailure creates a PostIpamFailure with default headers values -func NewPostIpamFailure() *PostIpamFailure { - return &PostIpamFailure{} -} - -/* -PostIpamFailure describes a response with status code 502, with default header values. - -Allocation failure -*/ -type PostIpamFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this post ipam failure response has a 2xx status code -func (o *PostIpamFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this post ipam failure response has a 3xx status code -func (o *PostIpamFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this post ipam failure response has a 4xx status code -func (o *PostIpamFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this post ipam failure response has a 5xx status code -func (o *PostIpamFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this post ipam failure response a status code equal to that given -func (o *PostIpamFailure) IsCode(code int) bool { - return code == 502 -} - -func (o *PostIpamFailure) Error() string { - return fmt.Sprintf("[POST /ipam][%d] postIpamFailure %+v", 502, o.Payload) -} - -func (o *PostIpamFailure) String() string { - return fmt.Sprintf("[POST /ipam][%d] postIpamFailure %+v", 502, o.Payload) -} - -func (o *PostIpamFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *PostIpamFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/metrics/get_metrics_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/metrics/get_metrics_parameters.go deleted file mode 100644 index 7dd482af5be..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/metrics/get_metrics_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package metrics - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetMetricsParams creates a new GetMetricsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetMetricsParams() *GetMetricsParams { - return &GetMetricsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetMetricsParamsWithTimeout creates a new GetMetricsParams object -// with the ability to set a timeout on a request. -func NewGetMetricsParamsWithTimeout(timeout time.Duration) *GetMetricsParams { - return &GetMetricsParams{ - timeout: timeout, - } -} - -// NewGetMetricsParamsWithContext creates a new GetMetricsParams object -// with the ability to set a context for a request. -func NewGetMetricsParamsWithContext(ctx context.Context) *GetMetricsParams { - return &GetMetricsParams{ - Context: ctx, - } -} - -// NewGetMetricsParamsWithHTTPClient creates a new GetMetricsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetMetricsParamsWithHTTPClient(client *http.Client) *GetMetricsParams { - return &GetMetricsParams{ - HTTPClient: client, - } -} - -/* -GetMetricsParams contains all the parameters to send to the API endpoint - - for the get metrics operation. - - Typically these are written to a http.Request. -*/ -type GetMetricsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get metrics params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMetricsParams) WithDefaults() *GetMetricsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get metrics params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetMetricsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get metrics params -func (o *GetMetricsParams) WithTimeout(timeout time.Duration) *GetMetricsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get metrics params -func (o *GetMetricsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get metrics params -func (o *GetMetricsParams) WithContext(ctx context.Context) *GetMetricsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get metrics params -func (o *GetMetricsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get metrics params -func (o *GetMetricsParams) WithHTTPClient(client *http.Client) *GetMetricsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get metrics params -func (o *GetMetricsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/metrics/get_metrics_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/metrics/get_metrics_responses.go deleted file mode 100644 index 766782c92a4..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/metrics/get_metrics_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package metrics - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetMetricsReader is a Reader for the GetMetrics structure. -type GetMetricsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetMetricsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 500: - result := NewGetMetricsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetMetricsOK creates a GetMetricsOK with default headers values -func NewGetMetricsOK() *GetMetricsOK { - return &GetMetricsOK{} -} - -/* -GetMetricsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetMetricsOK struct { - Payload []*models.Metric -} - -// IsSuccess returns true when this get metrics o k response has a 2xx status code -func (o *GetMetricsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get metrics o k response has a 3xx status code -func (o *GetMetricsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get metrics o k response has a 4xx status code -func (o *GetMetricsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get metrics o k response has a 5xx status code -func (o *GetMetricsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get metrics o k response a status code equal to that given -func (o *GetMetricsOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetMetricsOK) Error() string { - return fmt.Sprintf("[GET /metrics/][%d] getMetricsOK %+v", 200, o.Payload) -} - -func (o *GetMetricsOK) String() string { - return fmt.Sprintf("[GET /metrics/][%d] getMetricsOK %+v", 200, o.Payload) -} - -func (o *GetMetricsOK) GetPayload() []*models.Metric { - return o.Payload -} - -func (o *GetMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetMetricsInternalServerError creates a GetMetricsInternalServerError with default headers values -func NewGetMetricsInternalServerError() *GetMetricsInternalServerError { - return &GetMetricsInternalServerError{} -} - -/* -GetMetricsInternalServerError describes a response with status code 500, with default header values. - -Metrics cannot be retrieved -*/ -type GetMetricsInternalServerError struct { -} - -// IsSuccess returns true when this get metrics internal server error response has a 2xx status code -func (o *GetMetricsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get metrics internal server error response has a 3xx status code -func (o *GetMetricsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get metrics internal server error response has a 4xx status code -func (o *GetMetricsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this get metrics internal server error response has a 5xx status code -func (o *GetMetricsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this get metrics internal server error response a status code equal to that given -func (o *GetMetricsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -func (o *GetMetricsInternalServerError) Error() string { - return fmt.Sprintf("[GET /metrics/][%d] getMetricsInternalServerError ", 500) -} - -func (o *GetMetricsInternalServerError) String() string { - return fmt.Sprintf("[GET /metrics/][%d] getMetricsInternalServerError ", 500) -} - -func (o *GetMetricsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/metrics/metrics_client.go b/vendor/github.com/cilium/cilium/api/v1/client/metrics/metrics_client.go deleted file mode 100644 index d51858ef4bf..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/metrics/metrics_client.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package metrics - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new metrics API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for metrics API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetMetrics(params *GetMetricsParams, opts ...ClientOption) (*GetMetricsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetMetrics retrieves cilium metrics -*/ -func (a *Client) GetMetrics(params *GetMetricsParams, opts ...ClientOption) (*GetMetricsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetMetricsParams() - } - op := &runtime.ClientOperation{ - ID: "GetMetrics", - Method: "GET", - PathPattern: "/metrics/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetMetricsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetMetricsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetMetrics: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_fqdn_cache_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_fqdn_cache_parameters.go deleted file mode 100644 index c53a2f7cfe9..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_fqdn_cache_parameters.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteFqdnCacheParams creates a new DeleteFqdnCacheParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteFqdnCacheParams() *DeleteFqdnCacheParams { - return &DeleteFqdnCacheParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteFqdnCacheParamsWithTimeout creates a new DeleteFqdnCacheParams object -// with the ability to set a timeout on a request. -func NewDeleteFqdnCacheParamsWithTimeout(timeout time.Duration) *DeleteFqdnCacheParams { - return &DeleteFqdnCacheParams{ - timeout: timeout, - } -} - -// NewDeleteFqdnCacheParamsWithContext creates a new DeleteFqdnCacheParams object -// with the ability to set a context for a request. -func NewDeleteFqdnCacheParamsWithContext(ctx context.Context) *DeleteFqdnCacheParams { - return &DeleteFqdnCacheParams{ - Context: ctx, - } -} - -// NewDeleteFqdnCacheParamsWithHTTPClient creates a new DeleteFqdnCacheParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteFqdnCacheParamsWithHTTPClient(client *http.Client) *DeleteFqdnCacheParams { - return &DeleteFqdnCacheParams{ - HTTPClient: client, - } -} - -/* -DeleteFqdnCacheParams contains all the parameters to send to the API endpoint - - for the delete fqdn cache operation. - - Typically these are written to a http.Request. -*/ -type DeleteFqdnCacheParams struct { - - /* Matchpattern. - - A toFQDNs compatible matchPattern expression - */ - Matchpattern *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete fqdn cache params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteFqdnCacheParams) WithDefaults() *DeleteFqdnCacheParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete fqdn cache params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteFqdnCacheParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete fqdn cache params -func (o *DeleteFqdnCacheParams) WithTimeout(timeout time.Duration) *DeleteFqdnCacheParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete fqdn cache params -func (o *DeleteFqdnCacheParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete fqdn cache params -func (o *DeleteFqdnCacheParams) WithContext(ctx context.Context) *DeleteFqdnCacheParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete fqdn cache params -func (o *DeleteFqdnCacheParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete fqdn cache params -func (o *DeleteFqdnCacheParams) WithHTTPClient(client *http.Client) *DeleteFqdnCacheParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete fqdn cache params -func (o *DeleteFqdnCacheParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithMatchpattern adds the matchpattern to the delete fqdn cache params -func (o *DeleteFqdnCacheParams) WithMatchpattern(matchpattern *string) *DeleteFqdnCacheParams { - o.SetMatchpattern(matchpattern) - return o -} - -// SetMatchpattern adds the matchpattern to the delete fqdn cache params -func (o *DeleteFqdnCacheParams) SetMatchpattern(matchpattern *string) { - o.Matchpattern = matchpattern -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteFqdnCacheParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Matchpattern != nil { - - // query param matchpattern - var qrMatchpattern string - - if o.Matchpattern != nil { - qrMatchpattern = *o.Matchpattern - } - qMatchpattern := qrMatchpattern - if qMatchpattern != "" { - - if err := r.SetQueryParam("matchpattern", qMatchpattern); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_fqdn_cache_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_fqdn_cache_responses.go deleted file mode 100644 index 10def651e0e..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_fqdn_cache_responses.go +++ /dev/null @@ -1,213 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// DeleteFqdnCacheReader is a Reader for the DeleteFqdnCache structure. -type DeleteFqdnCacheReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteFqdnCacheReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteFqdnCacheOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteFqdnCacheBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeleteFqdnCacheForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteFqdnCacheOK creates a DeleteFqdnCacheOK with default headers values -func NewDeleteFqdnCacheOK() *DeleteFqdnCacheOK { - return &DeleteFqdnCacheOK{} -} - -/* -DeleteFqdnCacheOK describes a response with status code 200, with default header values. - -Success -*/ -type DeleteFqdnCacheOK struct { -} - -// IsSuccess returns true when this delete fqdn cache o k response has a 2xx status code -func (o *DeleteFqdnCacheOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete fqdn cache o k response has a 3xx status code -func (o *DeleteFqdnCacheOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete fqdn cache o k response has a 4xx status code -func (o *DeleteFqdnCacheOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete fqdn cache o k response has a 5xx status code -func (o *DeleteFqdnCacheOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete fqdn cache o k response a status code equal to that given -func (o *DeleteFqdnCacheOK) IsCode(code int) bool { - return code == 200 -} - -func (o *DeleteFqdnCacheOK) Error() string { - return fmt.Sprintf("[DELETE /fqdn/cache][%d] deleteFqdnCacheOK ", 200) -} - -func (o *DeleteFqdnCacheOK) String() string { - return fmt.Sprintf("[DELETE /fqdn/cache][%d] deleteFqdnCacheOK ", 200) -} - -func (o *DeleteFqdnCacheOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteFqdnCacheBadRequest creates a DeleteFqdnCacheBadRequest with default headers values -func NewDeleteFqdnCacheBadRequest() *DeleteFqdnCacheBadRequest { - return &DeleteFqdnCacheBadRequest{} -} - -/* -DeleteFqdnCacheBadRequest describes a response with status code 400, with default header values. - -Invalid request (error parsing parameters) -*/ -type DeleteFqdnCacheBadRequest struct { - Payload models.Error -} - -// IsSuccess returns true when this delete fqdn cache bad request response has a 2xx status code -func (o *DeleteFqdnCacheBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete fqdn cache bad request response has a 3xx status code -func (o *DeleteFqdnCacheBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete fqdn cache bad request response has a 4xx status code -func (o *DeleteFqdnCacheBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete fqdn cache bad request response has a 5xx status code -func (o *DeleteFqdnCacheBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this delete fqdn cache bad request response a status code equal to that given -func (o *DeleteFqdnCacheBadRequest) IsCode(code int) bool { - return code == 400 -} - -func (o *DeleteFqdnCacheBadRequest) Error() string { - return fmt.Sprintf("[DELETE /fqdn/cache][%d] deleteFqdnCacheBadRequest %+v", 400, o.Payload) -} - -func (o *DeleteFqdnCacheBadRequest) String() string { - return fmt.Sprintf("[DELETE /fqdn/cache][%d] deleteFqdnCacheBadRequest %+v", 400, o.Payload) -} - -func (o *DeleteFqdnCacheBadRequest) GetPayload() models.Error { - return o.Payload -} - -func (o *DeleteFqdnCacheBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteFqdnCacheForbidden creates a DeleteFqdnCacheForbidden with default headers values -func NewDeleteFqdnCacheForbidden() *DeleteFqdnCacheForbidden { - return &DeleteFqdnCacheForbidden{} -} - -/* -DeleteFqdnCacheForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeleteFqdnCacheForbidden struct { -} - -// IsSuccess returns true when this delete fqdn cache forbidden response has a 2xx status code -func (o *DeleteFqdnCacheForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete fqdn cache forbidden response has a 3xx status code -func (o *DeleteFqdnCacheForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete fqdn cache forbidden response has a 4xx status code -func (o *DeleteFqdnCacheForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete fqdn cache forbidden response has a 5xx status code -func (o *DeleteFqdnCacheForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete fqdn cache forbidden response a status code equal to that given -func (o *DeleteFqdnCacheForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *DeleteFqdnCacheForbidden) Error() string { - return fmt.Sprintf("[DELETE /fqdn/cache][%d] deleteFqdnCacheForbidden ", 403) -} - -func (o *DeleteFqdnCacheForbidden) String() string { - return fmt.Sprintf("[DELETE /fqdn/cache][%d] deleteFqdnCacheForbidden ", 403) -} - -func (o *DeleteFqdnCacheForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_policy_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_policy_parameters.go deleted file mode 100644 index 437ef67af03..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_policy_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewDeletePolicyParams creates a new DeletePolicyParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeletePolicyParams() *DeletePolicyParams { - return &DeletePolicyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeletePolicyParamsWithTimeout creates a new DeletePolicyParams object -// with the ability to set a timeout on a request. -func NewDeletePolicyParamsWithTimeout(timeout time.Duration) *DeletePolicyParams { - return &DeletePolicyParams{ - timeout: timeout, - } -} - -// NewDeletePolicyParamsWithContext creates a new DeletePolicyParams object -// with the ability to set a context for a request. -func NewDeletePolicyParamsWithContext(ctx context.Context) *DeletePolicyParams { - return &DeletePolicyParams{ - Context: ctx, - } -} - -// NewDeletePolicyParamsWithHTTPClient creates a new DeletePolicyParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeletePolicyParamsWithHTTPClient(client *http.Client) *DeletePolicyParams { - return &DeletePolicyParams{ - HTTPClient: client, - } -} - -/* -DeletePolicyParams contains all the parameters to send to the API endpoint - - for the delete policy operation. - - Typically these are written to a http.Request. -*/ -type DeletePolicyParams struct { - - // Labels. - Labels models.Labels - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeletePolicyParams) WithDefaults() *DeletePolicyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeletePolicyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete policy params -func (o *DeletePolicyParams) WithTimeout(timeout time.Duration) *DeletePolicyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete policy params -func (o *DeletePolicyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete policy params -func (o *DeletePolicyParams) WithContext(ctx context.Context) *DeletePolicyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete policy params -func (o *DeletePolicyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete policy params -func (o *DeletePolicyParams) WithHTTPClient(client *http.Client) *DeletePolicyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete policy params -func (o *DeletePolicyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLabels adds the labels to the delete policy params -func (o *DeletePolicyParams) WithLabels(labels models.Labels) *DeletePolicyParams { - o.SetLabels(labels) - return o -} - -// SetLabels adds the labels to the delete policy params -func (o *DeletePolicyParams) SetLabels(labels models.Labels) { - o.Labels = labels -} - -// WriteToRequest writes these params to a swagger request -func (o *DeletePolicyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Labels != nil { - if err := r.SetBodyParam(o.Labels); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_policy_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_policy_responses.go deleted file mode 100644 index 538a831e3bc..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/delete_policy_responses.go +++ /dev/null @@ -1,349 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// DeletePolicyReader is a Reader for the DeletePolicy structure. -type DeletePolicyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeletePolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeletePolicyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeletePolicyInvalid() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewDeletePolicyForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeletePolicyNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeletePolicyFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeletePolicyOK creates a DeletePolicyOK with default headers values -func NewDeletePolicyOK() *DeletePolicyOK { - return &DeletePolicyOK{} -} - -/* -DeletePolicyOK describes a response with status code 200, with default header values. - -Success -*/ -type DeletePolicyOK struct { - Payload *models.Policy -} - -// IsSuccess returns true when this delete policy o k response has a 2xx status code -func (o *DeletePolicyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete policy o k response has a 3xx status code -func (o *DeletePolicyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete policy o k response has a 4xx status code -func (o *DeletePolicyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete policy o k response has a 5xx status code -func (o *DeletePolicyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete policy o k response a status code equal to that given -func (o *DeletePolicyOK) IsCode(code int) bool { - return code == 200 -} - -func (o *DeletePolicyOK) Error() string { - return fmt.Sprintf("[DELETE /policy][%d] deletePolicyOK %+v", 200, o.Payload) -} - -func (o *DeletePolicyOK) String() string { - return fmt.Sprintf("[DELETE /policy][%d] deletePolicyOK %+v", 200, o.Payload) -} - -func (o *DeletePolicyOK) GetPayload() *models.Policy { - return o.Payload -} - -func (o *DeletePolicyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Policy) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeletePolicyInvalid creates a DeletePolicyInvalid with default headers values -func NewDeletePolicyInvalid() *DeletePolicyInvalid { - return &DeletePolicyInvalid{} -} - -/* -DeletePolicyInvalid describes a response with status code 400, with default header values. - -Invalid request -*/ -type DeletePolicyInvalid struct { - Payload models.Error -} - -// IsSuccess returns true when this delete policy invalid response has a 2xx status code -func (o *DeletePolicyInvalid) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete policy invalid response has a 3xx status code -func (o *DeletePolicyInvalid) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete policy invalid response has a 4xx status code -func (o *DeletePolicyInvalid) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete policy invalid response has a 5xx status code -func (o *DeletePolicyInvalid) IsServerError() bool { - return false -} - -// IsCode returns true when this delete policy invalid response a status code equal to that given -func (o *DeletePolicyInvalid) IsCode(code int) bool { - return code == 400 -} - -func (o *DeletePolicyInvalid) Error() string { - return fmt.Sprintf("[DELETE /policy][%d] deletePolicyInvalid %+v", 400, o.Payload) -} - -func (o *DeletePolicyInvalid) String() string { - return fmt.Sprintf("[DELETE /policy][%d] deletePolicyInvalid %+v", 400, o.Payload) -} - -func (o *DeletePolicyInvalid) GetPayload() models.Error { - return o.Payload -} - -func (o *DeletePolicyInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeletePolicyForbidden creates a DeletePolicyForbidden with default headers values -func NewDeletePolicyForbidden() *DeletePolicyForbidden { - return &DeletePolicyForbidden{} -} - -/* -DeletePolicyForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeletePolicyForbidden struct { -} - -// IsSuccess returns true when this delete policy forbidden response has a 2xx status code -func (o *DeletePolicyForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete policy forbidden response has a 3xx status code -func (o *DeletePolicyForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete policy forbidden response has a 4xx status code -func (o *DeletePolicyForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete policy forbidden response has a 5xx status code -func (o *DeletePolicyForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete policy forbidden response a status code equal to that given -func (o *DeletePolicyForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *DeletePolicyForbidden) Error() string { - return fmt.Sprintf("[DELETE /policy][%d] deletePolicyForbidden ", 403) -} - -func (o *DeletePolicyForbidden) String() string { - return fmt.Sprintf("[DELETE /policy][%d] deletePolicyForbidden ", 403) -} - -func (o *DeletePolicyForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeletePolicyNotFound creates a DeletePolicyNotFound with default headers values -func NewDeletePolicyNotFound() *DeletePolicyNotFound { - return &DeletePolicyNotFound{} -} - -/* -DeletePolicyNotFound describes a response with status code 404, with default header values. - -Policy not found -*/ -type DeletePolicyNotFound struct { -} - -// IsSuccess returns true when this delete policy not found response has a 2xx status code -func (o *DeletePolicyNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete policy not found response has a 3xx status code -func (o *DeletePolicyNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete policy not found response has a 4xx status code -func (o *DeletePolicyNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete policy not found response has a 5xx status code -func (o *DeletePolicyNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete policy not found response a status code equal to that given -func (o *DeletePolicyNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *DeletePolicyNotFound) Error() string { - return fmt.Sprintf("[DELETE /policy][%d] deletePolicyNotFound ", 404) -} - -func (o *DeletePolicyNotFound) String() string { - return fmt.Sprintf("[DELETE /policy][%d] deletePolicyNotFound ", 404) -} - -func (o *DeletePolicyNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeletePolicyFailure creates a DeletePolicyFailure with default headers values -func NewDeletePolicyFailure() *DeletePolicyFailure { - return &DeletePolicyFailure{} -} - -/* -DeletePolicyFailure describes a response with status code 500, with default header values. - -Error while deleting policy -*/ -type DeletePolicyFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this delete policy failure response has a 2xx status code -func (o *DeletePolicyFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete policy failure response has a 3xx status code -func (o *DeletePolicyFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete policy failure response has a 4xx status code -func (o *DeletePolicyFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete policy failure response has a 5xx status code -func (o *DeletePolicyFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this delete policy failure response a status code equal to that given -func (o *DeletePolicyFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *DeletePolicyFailure) Error() string { - return fmt.Sprintf("[DELETE /policy][%d] deletePolicyFailure %+v", 500, o.Payload) -} - -func (o *DeletePolicyFailure) String() string { - return fmt.Sprintf("[DELETE /policy][%d] deletePolicyFailure %+v", 500, o.Payload) -} - -func (o *DeletePolicyFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *DeletePolicyFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_id_parameters.go deleted file mode 100644 index e4da10fcaec..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_id_parameters.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetFqdnCacheIDParams creates a new GetFqdnCacheIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetFqdnCacheIDParams() *GetFqdnCacheIDParams { - return &GetFqdnCacheIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFqdnCacheIDParamsWithTimeout creates a new GetFqdnCacheIDParams object -// with the ability to set a timeout on a request. -func NewGetFqdnCacheIDParamsWithTimeout(timeout time.Duration) *GetFqdnCacheIDParams { - return &GetFqdnCacheIDParams{ - timeout: timeout, - } -} - -// NewGetFqdnCacheIDParamsWithContext creates a new GetFqdnCacheIDParams object -// with the ability to set a context for a request. -func NewGetFqdnCacheIDParamsWithContext(ctx context.Context) *GetFqdnCacheIDParams { - return &GetFqdnCacheIDParams{ - Context: ctx, - } -} - -// NewGetFqdnCacheIDParamsWithHTTPClient creates a new GetFqdnCacheIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFqdnCacheIDParamsWithHTTPClient(client *http.Client) *GetFqdnCacheIDParams { - return &GetFqdnCacheIDParams{ - HTTPClient: client, - } -} - -/* -GetFqdnCacheIDParams contains all the parameters to send to the API endpoint - - for the get fqdn cache ID operation. - - Typically these are written to a http.Request. -*/ -type GetFqdnCacheIDParams struct { - - /* Cidr. - - A CIDR range of IPs - */ - Cidr *string - - /* ID. - - String describing an endpoint with the format ``[prefix:]id``. If no prefix - is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints - will be addressable by all endpoint ID prefixes with the exception of the - local Cilium UUID which is assigned to all endpoints. - - Supported endpoint id prefixes: - - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 - - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 - - cni-attachment-id: CNI attachment ID, e.g. cni-attachment-id:22222:eth0 - - container-id: Container runtime ID, e.g. container-id:22222 (deprecated, may not be unique) - - container-name: Container name, e.g. container-name:foobar (deprecated, may not be unique) - - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar (deprecated, may not be unique) - - cep-name: cep name for this container if K8s is enabled, e.g. pod-name:default:foobar-net1 - - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 - - */ - ID string - - /* Matchpattern. - - A toFQDNs compatible matchPattern expression - */ - Matchpattern *string - - /* Source. - - Source from which FQDN entries come from - */ - Source *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get fqdn cache ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFqdnCacheIDParams) WithDefaults() *GetFqdnCacheIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get fqdn cache ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFqdnCacheIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) WithTimeout(timeout time.Duration) *GetFqdnCacheIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) WithContext(ctx context.Context) *GetFqdnCacheIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) WithHTTPClient(client *http.Client) *GetFqdnCacheIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCidr adds the cidr to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) WithCidr(cidr *string) *GetFqdnCacheIDParams { - o.SetCidr(cidr) - return o -} - -// SetCidr adds the cidr to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) SetCidr(cidr *string) { - o.Cidr = cidr -} - -// WithID adds the id to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) WithID(id string) *GetFqdnCacheIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) SetID(id string) { - o.ID = id -} - -// WithMatchpattern adds the matchpattern to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) WithMatchpattern(matchpattern *string) *GetFqdnCacheIDParams { - o.SetMatchpattern(matchpattern) - return o -} - -// SetMatchpattern adds the matchpattern to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) SetMatchpattern(matchpattern *string) { - o.Matchpattern = matchpattern -} - -// WithSource adds the source to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) WithSource(source *string) *GetFqdnCacheIDParams { - o.SetSource(source) - return o -} - -// SetSource adds the source to the get fqdn cache ID params -func (o *GetFqdnCacheIDParams) SetSource(source *string) { - o.Source = source -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFqdnCacheIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cidr != nil { - - // query param cidr - var qrCidr string - - if o.Cidr != nil { - qrCidr = *o.Cidr - } - qCidr := qrCidr - if qCidr != "" { - - if err := r.SetQueryParam("cidr", qCidr); err != nil { - return err - } - } - } - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if o.Matchpattern != nil { - - // query param matchpattern - var qrMatchpattern string - - if o.Matchpattern != nil { - qrMatchpattern = *o.Matchpattern - } - qMatchpattern := qrMatchpattern - if qMatchpattern != "" { - - if err := r.SetQueryParam("matchpattern", qMatchpattern); err != nil { - return err - } - } - } - - if o.Source != nil { - - // query param source - var qrSource string - - if o.Source != nil { - qrSource = *o.Source - } - qSource := qrSource - if qSource != "" { - - if err := r.SetQueryParam("source", qSource); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_id_responses.go deleted file mode 100644 index 7d429752396..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_id_responses.go +++ /dev/null @@ -1,223 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetFqdnCacheIDReader is a Reader for the GetFqdnCacheID structure. -type GetFqdnCacheIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFqdnCacheIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFqdnCacheIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetFqdnCacheIDBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetFqdnCacheIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetFqdnCacheIDOK creates a GetFqdnCacheIDOK with default headers values -func NewGetFqdnCacheIDOK() *GetFqdnCacheIDOK { - return &GetFqdnCacheIDOK{} -} - -/* -GetFqdnCacheIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFqdnCacheIDOK struct { - Payload []*models.DNSLookup -} - -// IsSuccess returns true when this get fqdn cache Id o k response has a 2xx status code -func (o *GetFqdnCacheIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get fqdn cache Id o k response has a 3xx status code -func (o *GetFqdnCacheIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get fqdn cache Id o k response has a 4xx status code -func (o *GetFqdnCacheIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get fqdn cache Id o k response has a 5xx status code -func (o *GetFqdnCacheIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get fqdn cache Id o k response a status code equal to that given -func (o *GetFqdnCacheIDOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetFqdnCacheIDOK) Error() string { - return fmt.Sprintf("[GET /fqdn/cache/{id}][%d] getFqdnCacheIdOK %+v", 200, o.Payload) -} - -func (o *GetFqdnCacheIDOK) String() string { - return fmt.Sprintf("[GET /fqdn/cache/{id}][%d] getFqdnCacheIdOK %+v", 200, o.Payload) -} - -func (o *GetFqdnCacheIDOK) GetPayload() []*models.DNSLookup { - return o.Payload -} - -func (o *GetFqdnCacheIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFqdnCacheIDBadRequest creates a GetFqdnCacheIDBadRequest with default headers values -func NewGetFqdnCacheIDBadRequest() *GetFqdnCacheIDBadRequest { - return &GetFqdnCacheIDBadRequest{} -} - -/* -GetFqdnCacheIDBadRequest describes a response with status code 400, with default header values. - -Invalid request (error parsing parameters) -*/ -type GetFqdnCacheIDBadRequest struct { - Payload models.Error -} - -// IsSuccess returns true when this get fqdn cache Id bad request response has a 2xx status code -func (o *GetFqdnCacheIDBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get fqdn cache Id bad request response has a 3xx status code -func (o *GetFqdnCacheIDBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get fqdn cache Id bad request response has a 4xx status code -func (o *GetFqdnCacheIDBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get fqdn cache Id bad request response has a 5xx status code -func (o *GetFqdnCacheIDBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get fqdn cache Id bad request response a status code equal to that given -func (o *GetFqdnCacheIDBadRequest) IsCode(code int) bool { - return code == 400 -} - -func (o *GetFqdnCacheIDBadRequest) Error() string { - return fmt.Sprintf("[GET /fqdn/cache/{id}][%d] getFqdnCacheIdBadRequest %+v", 400, o.Payload) -} - -func (o *GetFqdnCacheIDBadRequest) String() string { - return fmt.Sprintf("[GET /fqdn/cache/{id}][%d] getFqdnCacheIdBadRequest %+v", 400, o.Payload) -} - -func (o *GetFqdnCacheIDBadRequest) GetPayload() models.Error { - return o.Payload -} - -func (o *GetFqdnCacheIDBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFqdnCacheIDNotFound creates a GetFqdnCacheIDNotFound with default headers values -func NewGetFqdnCacheIDNotFound() *GetFqdnCacheIDNotFound { - return &GetFqdnCacheIDNotFound{} -} - -/* -GetFqdnCacheIDNotFound describes a response with status code 404, with default header values. - -No DNS data with provided parameters found -*/ -type GetFqdnCacheIDNotFound struct { -} - -// IsSuccess returns true when this get fqdn cache Id not found response has a 2xx status code -func (o *GetFqdnCacheIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get fqdn cache Id not found response has a 3xx status code -func (o *GetFqdnCacheIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get fqdn cache Id not found response has a 4xx status code -func (o *GetFqdnCacheIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get fqdn cache Id not found response has a 5xx status code -func (o *GetFqdnCacheIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get fqdn cache Id not found response a status code equal to that given -func (o *GetFqdnCacheIDNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetFqdnCacheIDNotFound) Error() string { - return fmt.Sprintf("[GET /fqdn/cache/{id}][%d] getFqdnCacheIdNotFound ", 404) -} - -func (o *GetFqdnCacheIDNotFound) String() string { - return fmt.Sprintf("[GET /fqdn/cache/{id}][%d] getFqdnCacheIdNotFound ", 404) -} - -func (o *GetFqdnCacheIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_parameters.go deleted file mode 100644 index d6eb10e1103..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_parameters.go +++ /dev/null @@ -1,234 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetFqdnCacheParams creates a new GetFqdnCacheParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetFqdnCacheParams() *GetFqdnCacheParams { - return &GetFqdnCacheParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFqdnCacheParamsWithTimeout creates a new GetFqdnCacheParams object -// with the ability to set a timeout on a request. -func NewGetFqdnCacheParamsWithTimeout(timeout time.Duration) *GetFqdnCacheParams { - return &GetFqdnCacheParams{ - timeout: timeout, - } -} - -// NewGetFqdnCacheParamsWithContext creates a new GetFqdnCacheParams object -// with the ability to set a context for a request. -func NewGetFqdnCacheParamsWithContext(ctx context.Context) *GetFqdnCacheParams { - return &GetFqdnCacheParams{ - Context: ctx, - } -} - -// NewGetFqdnCacheParamsWithHTTPClient creates a new GetFqdnCacheParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFqdnCacheParamsWithHTTPClient(client *http.Client) *GetFqdnCacheParams { - return &GetFqdnCacheParams{ - HTTPClient: client, - } -} - -/* -GetFqdnCacheParams contains all the parameters to send to the API endpoint - - for the get fqdn cache operation. - - Typically these are written to a http.Request. -*/ -type GetFqdnCacheParams struct { - - /* Cidr. - - A CIDR range of IPs - */ - Cidr *string - - /* Matchpattern. - - A toFQDNs compatible matchPattern expression - */ - Matchpattern *string - - /* Source. - - Source from which FQDN entries come from - */ - Source *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get fqdn cache params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFqdnCacheParams) WithDefaults() *GetFqdnCacheParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get fqdn cache params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFqdnCacheParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get fqdn cache params -func (o *GetFqdnCacheParams) WithTimeout(timeout time.Duration) *GetFqdnCacheParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get fqdn cache params -func (o *GetFqdnCacheParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get fqdn cache params -func (o *GetFqdnCacheParams) WithContext(ctx context.Context) *GetFqdnCacheParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get fqdn cache params -func (o *GetFqdnCacheParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get fqdn cache params -func (o *GetFqdnCacheParams) WithHTTPClient(client *http.Client) *GetFqdnCacheParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get fqdn cache params -func (o *GetFqdnCacheParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCidr adds the cidr to the get fqdn cache params -func (o *GetFqdnCacheParams) WithCidr(cidr *string) *GetFqdnCacheParams { - o.SetCidr(cidr) - return o -} - -// SetCidr adds the cidr to the get fqdn cache params -func (o *GetFqdnCacheParams) SetCidr(cidr *string) { - o.Cidr = cidr -} - -// WithMatchpattern adds the matchpattern to the get fqdn cache params -func (o *GetFqdnCacheParams) WithMatchpattern(matchpattern *string) *GetFqdnCacheParams { - o.SetMatchpattern(matchpattern) - return o -} - -// SetMatchpattern adds the matchpattern to the get fqdn cache params -func (o *GetFqdnCacheParams) SetMatchpattern(matchpattern *string) { - o.Matchpattern = matchpattern -} - -// WithSource adds the source to the get fqdn cache params -func (o *GetFqdnCacheParams) WithSource(source *string) *GetFqdnCacheParams { - o.SetSource(source) - return o -} - -// SetSource adds the source to the get fqdn cache params -func (o *GetFqdnCacheParams) SetSource(source *string) { - o.Source = source -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFqdnCacheParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cidr != nil { - - // query param cidr - var qrCidr string - - if o.Cidr != nil { - qrCidr = *o.Cidr - } - qCidr := qrCidr - if qCidr != "" { - - if err := r.SetQueryParam("cidr", qCidr); err != nil { - return err - } - } - } - - if o.Matchpattern != nil { - - // query param matchpattern - var qrMatchpattern string - - if o.Matchpattern != nil { - qrMatchpattern = *o.Matchpattern - } - qMatchpattern := qrMatchpattern - if qMatchpattern != "" { - - if err := r.SetQueryParam("matchpattern", qMatchpattern); err != nil { - return err - } - } - } - - if o.Source != nil { - - // query param source - var qrSource string - - if o.Source != nil { - qrSource = *o.Source - } - qSource := qrSource - if qSource != "" { - - if err := r.SetQueryParam("source", qSource); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_responses.go deleted file mode 100644 index 775a0fc2012..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_cache_responses.go +++ /dev/null @@ -1,223 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetFqdnCacheReader is a Reader for the GetFqdnCache structure. -type GetFqdnCacheReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFqdnCacheReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFqdnCacheOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetFqdnCacheBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetFqdnCacheNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetFqdnCacheOK creates a GetFqdnCacheOK with default headers values -func NewGetFqdnCacheOK() *GetFqdnCacheOK { - return &GetFqdnCacheOK{} -} - -/* -GetFqdnCacheOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFqdnCacheOK struct { - Payload []*models.DNSLookup -} - -// IsSuccess returns true when this get fqdn cache o k response has a 2xx status code -func (o *GetFqdnCacheOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get fqdn cache o k response has a 3xx status code -func (o *GetFqdnCacheOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get fqdn cache o k response has a 4xx status code -func (o *GetFqdnCacheOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get fqdn cache o k response has a 5xx status code -func (o *GetFqdnCacheOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get fqdn cache o k response a status code equal to that given -func (o *GetFqdnCacheOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetFqdnCacheOK) Error() string { - return fmt.Sprintf("[GET /fqdn/cache][%d] getFqdnCacheOK %+v", 200, o.Payload) -} - -func (o *GetFqdnCacheOK) String() string { - return fmt.Sprintf("[GET /fqdn/cache][%d] getFqdnCacheOK %+v", 200, o.Payload) -} - -func (o *GetFqdnCacheOK) GetPayload() []*models.DNSLookup { - return o.Payload -} - -func (o *GetFqdnCacheOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFqdnCacheBadRequest creates a GetFqdnCacheBadRequest with default headers values -func NewGetFqdnCacheBadRequest() *GetFqdnCacheBadRequest { - return &GetFqdnCacheBadRequest{} -} - -/* -GetFqdnCacheBadRequest describes a response with status code 400, with default header values. - -Invalid request (error parsing parameters) -*/ -type GetFqdnCacheBadRequest struct { - Payload models.Error -} - -// IsSuccess returns true when this get fqdn cache bad request response has a 2xx status code -func (o *GetFqdnCacheBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get fqdn cache bad request response has a 3xx status code -func (o *GetFqdnCacheBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get fqdn cache bad request response has a 4xx status code -func (o *GetFqdnCacheBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get fqdn cache bad request response has a 5xx status code -func (o *GetFqdnCacheBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get fqdn cache bad request response a status code equal to that given -func (o *GetFqdnCacheBadRequest) IsCode(code int) bool { - return code == 400 -} - -func (o *GetFqdnCacheBadRequest) Error() string { - return fmt.Sprintf("[GET /fqdn/cache][%d] getFqdnCacheBadRequest %+v", 400, o.Payload) -} - -func (o *GetFqdnCacheBadRequest) String() string { - return fmt.Sprintf("[GET /fqdn/cache][%d] getFqdnCacheBadRequest %+v", 400, o.Payload) -} - -func (o *GetFqdnCacheBadRequest) GetPayload() models.Error { - return o.Payload -} - -func (o *GetFqdnCacheBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFqdnCacheNotFound creates a GetFqdnCacheNotFound with default headers values -func NewGetFqdnCacheNotFound() *GetFqdnCacheNotFound { - return &GetFqdnCacheNotFound{} -} - -/* -GetFqdnCacheNotFound describes a response with status code 404, with default header values. - -No DNS data with provided parameters found -*/ -type GetFqdnCacheNotFound struct { -} - -// IsSuccess returns true when this get fqdn cache not found response has a 2xx status code -func (o *GetFqdnCacheNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get fqdn cache not found response has a 3xx status code -func (o *GetFqdnCacheNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get fqdn cache not found response has a 4xx status code -func (o *GetFqdnCacheNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get fqdn cache not found response has a 5xx status code -func (o *GetFqdnCacheNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get fqdn cache not found response a status code equal to that given -func (o *GetFqdnCacheNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetFqdnCacheNotFound) Error() string { - return fmt.Sprintf("[GET /fqdn/cache][%d] getFqdnCacheNotFound ", 404) -} - -func (o *GetFqdnCacheNotFound) String() string { - return fmt.Sprintf("[GET /fqdn/cache][%d] getFqdnCacheNotFound ", 404) -} - -func (o *GetFqdnCacheNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_names_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_names_parameters.go deleted file mode 100644 index 1b6743281d8..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_names_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetFqdnNamesParams creates a new GetFqdnNamesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetFqdnNamesParams() *GetFqdnNamesParams { - return &GetFqdnNamesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetFqdnNamesParamsWithTimeout creates a new GetFqdnNamesParams object -// with the ability to set a timeout on a request. -func NewGetFqdnNamesParamsWithTimeout(timeout time.Duration) *GetFqdnNamesParams { - return &GetFqdnNamesParams{ - timeout: timeout, - } -} - -// NewGetFqdnNamesParamsWithContext creates a new GetFqdnNamesParams object -// with the ability to set a context for a request. -func NewGetFqdnNamesParamsWithContext(ctx context.Context) *GetFqdnNamesParams { - return &GetFqdnNamesParams{ - Context: ctx, - } -} - -// NewGetFqdnNamesParamsWithHTTPClient creates a new GetFqdnNamesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetFqdnNamesParamsWithHTTPClient(client *http.Client) *GetFqdnNamesParams { - return &GetFqdnNamesParams{ - HTTPClient: client, - } -} - -/* -GetFqdnNamesParams contains all the parameters to send to the API endpoint - - for the get fqdn names operation. - - Typically these are written to a http.Request. -*/ -type GetFqdnNamesParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get fqdn names params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFqdnNamesParams) WithDefaults() *GetFqdnNamesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get fqdn names params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetFqdnNamesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get fqdn names params -func (o *GetFqdnNamesParams) WithTimeout(timeout time.Duration) *GetFqdnNamesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get fqdn names params -func (o *GetFqdnNamesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get fqdn names params -func (o *GetFqdnNamesParams) WithContext(ctx context.Context) *GetFqdnNamesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get fqdn names params -func (o *GetFqdnNamesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get fqdn names params -func (o *GetFqdnNamesParams) WithHTTPClient(client *http.Client) *GetFqdnNamesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get fqdn names params -func (o *GetFqdnNamesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetFqdnNamesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_names_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_names_responses.go deleted file mode 100644 index b2b160db667..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_fqdn_names_responses.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetFqdnNamesReader is a Reader for the GetFqdnNames structure. -type GetFqdnNamesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetFqdnNamesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetFqdnNamesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetFqdnNamesBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetFqdnNamesOK creates a GetFqdnNamesOK with default headers values -func NewGetFqdnNamesOK() *GetFqdnNamesOK { - return &GetFqdnNamesOK{} -} - -/* -GetFqdnNamesOK describes a response with status code 200, with default header values. - -Success -*/ -type GetFqdnNamesOK struct { - Payload *models.NameManager -} - -// IsSuccess returns true when this get fqdn names o k response has a 2xx status code -func (o *GetFqdnNamesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get fqdn names o k response has a 3xx status code -func (o *GetFqdnNamesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get fqdn names o k response has a 4xx status code -func (o *GetFqdnNamesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get fqdn names o k response has a 5xx status code -func (o *GetFqdnNamesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get fqdn names o k response a status code equal to that given -func (o *GetFqdnNamesOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetFqdnNamesOK) Error() string { - return fmt.Sprintf("[GET /fqdn/names][%d] getFqdnNamesOK %+v", 200, o.Payload) -} - -func (o *GetFqdnNamesOK) String() string { - return fmt.Sprintf("[GET /fqdn/names][%d] getFqdnNamesOK %+v", 200, o.Payload) -} - -func (o *GetFqdnNamesOK) GetPayload() *models.NameManager { - return o.Payload -} - -func (o *GetFqdnNamesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NameManager) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetFqdnNamesBadRequest creates a GetFqdnNamesBadRequest with default headers values -func NewGetFqdnNamesBadRequest() *GetFqdnNamesBadRequest { - return &GetFqdnNamesBadRequest{} -} - -/* -GetFqdnNamesBadRequest describes a response with status code 400, with default header values. - -Invalid request (error parsing parameters) -*/ -type GetFqdnNamesBadRequest struct { - Payload models.Error -} - -// IsSuccess returns true when this get fqdn names bad request response has a 2xx status code -func (o *GetFqdnNamesBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get fqdn names bad request response has a 3xx status code -func (o *GetFqdnNamesBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get fqdn names bad request response has a 4xx status code -func (o *GetFqdnNamesBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get fqdn names bad request response has a 5xx status code -func (o *GetFqdnNamesBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get fqdn names bad request response a status code equal to that given -func (o *GetFqdnNamesBadRequest) IsCode(code int) bool { - return code == 400 -} - -func (o *GetFqdnNamesBadRequest) Error() string { - return fmt.Sprintf("[GET /fqdn/names][%d] getFqdnNamesBadRequest %+v", 400, o.Payload) -} - -func (o *GetFqdnNamesBadRequest) String() string { - return fmt.Sprintf("[GET /fqdn/names][%d] getFqdnNamesBadRequest %+v", 400, o.Payload) -} - -func (o *GetFqdnNamesBadRequest) GetPayload() models.Error { - return o.Payload -} - -func (o *GetFqdnNamesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_endpoints_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_endpoints_parameters.go deleted file mode 100644 index 6a218282999..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_endpoints_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetIdentityEndpointsParams creates a new GetIdentityEndpointsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetIdentityEndpointsParams() *GetIdentityEndpointsParams { - return &GetIdentityEndpointsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIdentityEndpointsParamsWithTimeout creates a new GetIdentityEndpointsParams object -// with the ability to set a timeout on a request. -func NewGetIdentityEndpointsParamsWithTimeout(timeout time.Duration) *GetIdentityEndpointsParams { - return &GetIdentityEndpointsParams{ - timeout: timeout, - } -} - -// NewGetIdentityEndpointsParamsWithContext creates a new GetIdentityEndpointsParams object -// with the ability to set a context for a request. -func NewGetIdentityEndpointsParamsWithContext(ctx context.Context) *GetIdentityEndpointsParams { - return &GetIdentityEndpointsParams{ - Context: ctx, - } -} - -// NewGetIdentityEndpointsParamsWithHTTPClient creates a new GetIdentityEndpointsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIdentityEndpointsParamsWithHTTPClient(client *http.Client) *GetIdentityEndpointsParams { - return &GetIdentityEndpointsParams{ - HTTPClient: client, - } -} - -/* -GetIdentityEndpointsParams contains all the parameters to send to the API endpoint - - for the get identity endpoints operation. - - Typically these are written to a http.Request. -*/ -type GetIdentityEndpointsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get identity endpoints params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdentityEndpointsParams) WithDefaults() *GetIdentityEndpointsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get identity endpoints params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdentityEndpointsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get identity endpoints params -func (o *GetIdentityEndpointsParams) WithTimeout(timeout time.Duration) *GetIdentityEndpointsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get identity endpoints params -func (o *GetIdentityEndpointsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get identity endpoints params -func (o *GetIdentityEndpointsParams) WithContext(ctx context.Context) *GetIdentityEndpointsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get identity endpoints params -func (o *GetIdentityEndpointsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get identity endpoints params -func (o *GetIdentityEndpointsParams) WithHTTPClient(client *http.Client) *GetIdentityEndpointsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get identity endpoints params -func (o *GetIdentityEndpointsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIdentityEndpointsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_endpoints_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_endpoints_responses.go deleted file mode 100644 index 0608766c8db..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_endpoints_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetIdentityEndpointsReader is a Reader for the GetIdentityEndpoints structure. -type GetIdentityEndpointsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIdentityEndpointsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIdentityEndpointsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetIdentityEndpointsNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetIdentityEndpointsOK creates a GetIdentityEndpointsOK with default headers values -func NewGetIdentityEndpointsOK() *GetIdentityEndpointsOK { - return &GetIdentityEndpointsOK{} -} - -/* -GetIdentityEndpointsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIdentityEndpointsOK struct { - Payload []*models.IdentityEndpoints -} - -// IsSuccess returns true when this get identity endpoints o k response has a 2xx status code -func (o *GetIdentityEndpointsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get identity endpoints o k response has a 3xx status code -func (o *GetIdentityEndpointsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity endpoints o k response has a 4xx status code -func (o *GetIdentityEndpointsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get identity endpoints o k response has a 5xx status code -func (o *GetIdentityEndpointsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get identity endpoints o k response a status code equal to that given -func (o *GetIdentityEndpointsOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetIdentityEndpointsOK) Error() string { - return fmt.Sprintf("[GET /identity/endpoints][%d] getIdentityEndpointsOK %+v", 200, o.Payload) -} - -func (o *GetIdentityEndpointsOK) String() string { - return fmt.Sprintf("[GET /identity/endpoints][%d] getIdentityEndpointsOK %+v", 200, o.Payload) -} - -func (o *GetIdentityEndpointsOK) GetPayload() []*models.IdentityEndpoints { - return o.Payload -} - -func (o *GetIdentityEndpointsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIdentityEndpointsNotFound creates a GetIdentityEndpointsNotFound with default headers values -func NewGetIdentityEndpointsNotFound() *GetIdentityEndpointsNotFound { - return &GetIdentityEndpointsNotFound{} -} - -/* -GetIdentityEndpointsNotFound describes a response with status code 404, with default header values. - -Set of identities which are being used by local endpoints could not be found. -*/ -type GetIdentityEndpointsNotFound struct { -} - -// IsSuccess returns true when this get identity endpoints not found response has a 2xx status code -func (o *GetIdentityEndpointsNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get identity endpoints not found response has a 3xx status code -func (o *GetIdentityEndpointsNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity endpoints not found response has a 4xx status code -func (o *GetIdentityEndpointsNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get identity endpoints not found response has a 5xx status code -func (o *GetIdentityEndpointsNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get identity endpoints not found response a status code equal to that given -func (o *GetIdentityEndpointsNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetIdentityEndpointsNotFound) Error() string { - return fmt.Sprintf("[GET /identity/endpoints][%d] getIdentityEndpointsNotFound ", 404) -} - -func (o *GetIdentityEndpointsNotFound) String() string { - return fmt.Sprintf("[GET /identity/endpoints][%d] getIdentityEndpointsNotFound ", 404) -} - -func (o *GetIdentityEndpointsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_id_parameters.go deleted file mode 100644 index f17fa665118..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_id_parameters.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetIdentityIDParams creates a new GetIdentityIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetIdentityIDParams() *GetIdentityIDParams { - return &GetIdentityIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIdentityIDParamsWithTimeout creates a new GetIdentityIDParams object -// with the ability to set a timeout on a request. -func NewGetIdentityIDParamsWithTimeout(timeout time.Duration) *GetIdentityIDParams { - return &GetIdentityIDParams{ - timeout: timeout, - } -} - -// NewGetIdentityIDParamsWithContext creates a new GetIdentityIDParams object -// with the ability to set a context for a request. -func NewGetIdentityIDParamsWithContext(ctx context.Context) *GetIdentityIDParams { - return &GetIdentityIDParams{ - Context: ctx, - } -} - -// NewGetIdentityIDParamsWithHTTPClient creates a new GetIdentityIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIdentityIDParamsWithHTTPClient(client *http.Client) *GetIdentityIDParams { - return &GetIdentityIDParams{ - HTTPClient: client, - } -} - -/* -GetIdentityIDParams contains all the parameters to send to the API endpoint - - for the get identity ID operation. - - Typically these are written to a http.Request. -*/ -type GetIdentityIDParams struct { - - /* ID. - - Cluster wide unique identifier of a security identity. - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get identity ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdentityIDParams) WithDefaults() *GetIdentityIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get identity ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdentityIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get identity ID params -func (o *GetIdentityIDParams) WithTimeout(timeout time.Duration) *GetIdentityIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get identity ID params -func (o *GetIdentityIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get identity ID params -func (o *GetIdentityIDParams) WithContext(ctx context.Context) *GetIdentityIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get identity ID params -func (o *GetIdentityIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get identity ID params -func (o *GetIdentityIDParams) WithHTTPClient(client *http.Client) *GetIdentityIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get identity ID params -func (o *GetIdentityIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get identity ID params -func (o *GetIdentityIDParams) WithID(id string) *GetIdentityIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get identity ID params -func (o *GetIdentityIDParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIdentityIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_id_responses.go deleted file mode 100644 index c6d55d0cac5..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_id_responses.go +++ /dev/null @@ -1,349 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetIdentityIDReader is a Reader for the GetIdentityID structure. -type GetIdentityIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIdentityIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIdentityIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetIdentityIDBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetIdentityIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 520: - result := NewGetIdentityIDUnreachable() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 521: - result := NewGetIdentityIDInvalidStorageFormat() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetIdentityIDOK creates a GetIdentityIDOK with default headers values -func NewGetIdentityIDOK() *GetIdentityIDOK { - return &GetIdentityIDOK{} -} - -/* -GetIdentityIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIdentityIDOK struct { - Payload *models.Identity -} - -// IsSuccess returns true when this get identity Id o k response has a 2xx status code -func (o *GetIdentityIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get identity Id o k response has a 3xx status code -func (o *GetIdentityIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity Id o k response has a 4xx status code -func (o *GetIdentityIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get identity Id o k response has a 5xx status code -func (o *GetIdentityIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get identity Id o k response a status code equal to that given -func (o *GetIdentityIDOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetIdentityIDOK) Error() string { - return fmt.Sprintf("[GET /identity/{id}][%d] getIdentityIdOK %+v", 200, o.Payload) -} - -func (o *GetIdentityIDOK) String() string { - return fmt.Sprintf("[GET /identity/{id}][%d] getIdentityIdOK %+v", 200, o.Payload) -} - -func (o *GetIdentityIDOK) GetPayload() *models.Identity { - return o.Payload -} - -func (o *GetIdentityIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Identity) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIdentityIDBadRequest creates a GetIdentityIDBadRequest with default headers values -func NewGetIdentityIDBadRequest() *GetIdentityIDBadRequest { - return &GetIdentityIDBadRequest{} -} - -/* -GetIdentityIDBadRequest describes a response with status code 400, with default header values. - -Invalid identity provided -*/ -type GetIdentityIDBadRequest struct { -} - -// IsSuccess returns true when this get identity Id bad request response has a 2xx status code -func (o *GetIdentityIDBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get identity Id bad request response has a 3xx status code -func (o *GetIdentityIDBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity Id bad request response has a 4xx status code -func (o *GetIdentityIDBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get identity Id bad request response has a 5xx status code -func (o *GetIdentityIDBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get identity Id bad request response a status code equal to that given -func (o *GetIdentityIDBadRequest) IsCode(code int) bool { - return code == 400 -} - -func (o *GetIdentityIDBadRequest) Error() string { - return fmt.Sprintf("[GET /identity/{id}][%d] getIdentityIdBadRequest ", 400) -} - -func (o *GetIdentityIDBadRequest) String() string { - return fmt.Sprintf("[GET /identity/{id}][%d] getIdentityIdBadRequest ", 400) -} - -func (o *GetIdentityIDBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetIdentityIDNotFound creates a GetIdentityIDNotFound with default headers values -func NewGetIdentityIDNotFound() *GetIdentityIDNotFound { - return &GetIdentityIDNotFound{} -} - -/* -GetIdentityIDNotFound describes a response with status code 404, with default header values. - -Identity not found -*/ -type GetIdentityIDNotFound struct { -} - -// IsSuccess returns true when this get identity Id not found response has a 2xx status code -func (o *GetIdentityIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get identity Id not found response has a 3xx status code -func (o *GetIdentityIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity Id not found response has a 4xx status code -func (o *GetIdentityIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get identity Id not found response has a 5xx status code -func (o *GetIdentityIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get identity Id not found response a status code equal to that given -func (o *GetIdentityIDNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetIdentityIDNotFound) Error() string { - return fmt.Sprintf("[GET /identity/{id}][%d] getIdentityIdNotFound ", 404) -} - -func (o *GetIdentityIDNotFound) String() string { - return fmt.Sprintf("[GET /identity/{id}][%d] getIdentityIdNotFound ", 404) -} - -func (o *GetIdentityIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetIdentityIDUnreachable creates a GetIdentityIDUnreachable with default headers values -func NewGetIdentityIDUnreachable() *GetIdentityIDUnreachable { - return &GetIdentityIDUnreachable{} -} - -/* -GetIdentityIDUnreachable describes a response with status code 520, with default header values. - -Identity storage unreachable. Likely a network problem. -*/ -type GetIdentityIDUnreachable struct { - Payload models.Error -} - -// IsSuccess returns true when this get identity Id unreachable response has a 2xx status code -func (o *GetIdentityIDUnreachable) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get identity Id unreachable response has a 3xx status code -func (o *GetIdentityIDUnreachable) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity Id unreachable response has a 4xx status code -func (o *GetIdentityIDUnreachable) IsClientError() bool { - return false -} - -// IsServerError returns true when this get identity Id unreachable response has a 5xx status code -func (o *GetIdentityIDUnreachable) IsServerError() bool { - return true -} - -// IsCode returns true when this get identity Id unreachable response a status code equal to that given -func (o *GetIdentityIDUnreachable) IsCode(code int) bool { - return code == 520 -} - -func (o *GetIdentityIDUnreachable) Error() string { - return fmt.Sprintf("[GET /identity/{id}][%d] getIdentityIdUnreachable %+v", 520, o.Payload) -} - -func (o *GetIdentityIDUnreachable) String() string { - return fmt.Sprintf("[GET /identity/{id}][%d] getIdentityIdUnreachable %+v", 520, o.Payload) -} - -func (o *GetIdentityIDUnreachable) GetPayload() models.Error { - return o.Payload -} - -func (o *GetIdentityIDUnreachable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIdentityIDInvalidStorageFormat creates a GetIdentityIDInvalidStorageFormat with default headers values -func NewGetIdentityIDInvalidStorageFormat() *GetIdentityIDInvalidStorageFormat { - return &GetIdentityIDInvalidStorageFormat{} -} - -/* -GetIdentityIDInvalidStorageFormat describes a response with status code 521, with default header values. - -Invalid identity format in storage -*/ -type GetIdentityIDInvalidStorageFormat struct { - Payload models.Error -} - -// IsSuccess returns true when this get identity Id invalid storage format response has a 2xx status code -func (o *GetIdentityIDInvalidStorageFormat) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get identity Id invalid storage format response has a 3xx status code -func (o *GetIdentityIDInvalidStorageFormat) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity Id invalid storage format response has a 4xx status code -func (o *GetIdentityIDInvalidStorageFormat) IsClientError() bool { - return false -} - -// IsServerError returns true when this get identity Id invalid storage format response has a 5xx status code -func (o *GetIdentityIDInvalidStorageFormat) IsServerError() bool { - return true -} - -// IsCode returns true when this get identity Id invalid storage format response a status code equal to that given -func (o *GetIdentityIDInvalidStorageFormat) IsCode(code int) bool { - return code == 521 -} - -func (o *GetIdentityIDInvalidStorageFormat) Error() string { - return fmt.Sprintf("[GET /identity/{id}][%d] getIdentityIdInvalidStorageFormat %+v", 521, o.Payload) -} - -func (o *GetIdentityIDInvalidStorageFormat) String() string { - return fmt.Sprintf("[GET /identity/{id}][%d] getIdentityIdInvalidStorageFormat %+v", 521, o.Payload) -} - -func (o *GetIdentityIDInvalidStorageFormat) GetPayload() models.Error { - return o.Payload -} - -func (o *GetIdentityIDInvalidStorageFormat) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_parameters.go deleted file mode 100644 index a5a0fe29822..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_parameters.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewGetIdentityParams creates a new GetIdentityParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetIdentityParams() *GetIdentityParams { - return &GetIdentityParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIdentityParamsWithTimeout creates a new GetIdentityParams object -// with the ability to set a timeout on a request. -func NewGetIdentityParamsWithTimeout(timeout time.Duration) *GetIdentityParams { - return &GetIdentityParams{ - timeout: timeout, - } -} - -// NewGetIdentityParamsWithContext creates a new GetIdentityParams object -// with the ability to set a context for a request. -func NewGetIdentityParamsWithContext(ctx context.Context) *GetIdentityParams { - return &GetIdentityParams{ - Context: ctx, - } -} - -// NewGetIdentityParamsWithHTTPClient creates a new GetIdentityParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIdentityParamsWithHTTPClient(client *http.Client) *GetIdentityParams { - return &GetIdentityParams{ - HTTPClient: client, - } -} - -/* -GetIdentityParams contains all the parameters to send to the API endpoint - - for the get identity operation. - - Typically these are written to a http.Request. -*/ -type GetIdentityParams struct { - - /* Labels. - - List of labels - - */ - Labels models.Labels - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get identity params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdentityParams) WithDefaults() *GetIdentityParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get identity params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIdentityParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get identity params -func (o *GetIdentityParams) WithTimeout(timeout time.Duration) *GetIdentityParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get identity params -func (o *GetIdentityParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get identity params -func (o *GetIdentityParams) WithContext(ctx context.Context) *GetIdentityParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get identity params -func (o *GetIdentityParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get identity params -func (o *GetIdentityParams) WithHTTPClient(client *http.Client) *GetIdentityParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get identity params -func (o *GetIdentityParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLabels adds the labels to the get identity params -func (o *GetIdentityParams) WithLabels(labels models.Labels) *GetIdentityParams { - o.SetLabels(labels) - return o -} - -// SetLabels adds the labels to the get identity params -func (o *GetIdentityParams) SetLabels(labels models.Labels) { - o.Labels = labels -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIdentityParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Labels != nil { - if err := r.SetBodyParam(o.Labels); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_responses.go deleted file mode 100644 index 64ea45296df..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_identity_responses.go +++ /dev/null @@ -1,290 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetIdentityReader is a Reader for the GetIdentity structure. -type GetIdentityReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIdentityReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIdentityOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetIdentityNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 520: - result := NewGetIdentityUnreachable() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 521: - result := NewGetIdentityInvalidStorageFormat() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetIdentityOK creates a GetIdentityOK with default headers values -func NewGetIdentityOK() *GetIdentityOK { - return &GetIdentityOK{} -} - -/* -GetIdentityOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIdentityOK struct { - Payload []*models.Identity -} - -// IsSuccess returns true when this get identity o k response has a 2xx status code -func (o *GetIdentityOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get identity o k response has a 3xx status code -func (o *GetIdentityOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity o k response has a 4xx status code -func (o *GetIdentityOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get identity o k response has a 5xx status code -func (o *GetIdentityOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get identity o k response a status code equal to that given -func (o *GetIdentityOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetIdentityOK) Error() string { - return fmt.Sprintf("[GET /identity][%d] getIdentityOK %+v", 200, o.Payload) -} - -func (o *GetIdentityOK) String() string { - return fmt.Sprintf("[GET /identity][%d] getIdentityOK %+v", 200, o.Payload) -} - -func (o *GetIdentityOK) GetPayload() []*models.Identity { - return o.Payload -} - -func (o *GetIdentityOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIdentityNotFound creates a GetIdentityNotFound with default headers values -func NewGetIdentityNotFound() *GetIdentityNotFound { - return &GetIdentityNotFound{} -} - -/* -GetIdentityNotFound describes a response with status code 404, with default header values. - -Identities with provided parameters not found -*/ -type GetIdentityNotFound struct { -} - -// IsSuccess returns true when this get identity not found response has a 2xx status code -func (o *GetIdentityNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get identity not found response has a 3xx status code -func (o *GetIdentityNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity not found response has a 4xx status code -func (o *GetIdentityNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get identity not found response has a 5xx status code -func (o *GetIdentityNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get identity not found response a status code equal to that given -func (o *GetIdentityNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetIdentityNotFound) Error() string { - return fmt.Sprintf("[GET /identity][%d] getIdentityNotFound ", 404) -} - -func (o *GetIdentityNotFound) String() string { - return fmt.Sprintf("[GET /identity][%d] getIdentityNotFound ", 404) -} - -func (o *GetIdentityNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewGetIdentityUnreachable creates a GetIdentityUnreachable with default headers values -func NewGetIdentityUnreachable() *GetIdentityUnreachable { - return &GetIdentityUnreachable{} -} - -/* -GetIdentityUnreachable describes a response with status code 520, with default header values. - -Identity storage unreachable. Likely a network problem. -*/ -type GetIdentityUnreachable struct { - Payload models.Error -} - -// IsSuccess returns true when this get identity unreachable response has a 2xx status code -func (o *GetIdentityUnreachable) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get identity unreachable response has a 3xx status code -func (o *GetIdentityUnreachable) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity unreachable response has a 4xx status code -func (o *GetIdentityUnreachable) IsClientError() bool { - return false -} - -// IsServerError returns true when this get identity unreachable response has a 5xx status code -func (o *GetIdentityUnreachable) IsServerError() bool { - return true -} - -// IsCode returns true when this get identity unreachable response a status code equal to that given -func (o *GetIdentityUnreachable) IsCode(code int) bool { - return code == 520 -} - -func (o *GetIdentityUnreachable) Error() string { - return fmt.Sprintf("[GET /identity][%d] getIdentityUnreachable %+v", 520, o.Payload) -} - -func (o *GetIdentityUnreachable) String() string { - return fmt.Sprintf("[GET /identity][%d] getIdentityUnreachable %+v", 520, o.Payload) -} - -func (o *GetIdentityUnreachable) GetPayload() models.Error { - return o.Payload -} - -func (o *GetIdentityUnreachable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIdentityInvalidStorageFormat creates a GetIdentityInvalidStorageFormat with default headers values -func NewGetIdentityInvalidStorageFormat() *GetIdentityInvalidStorageFormat { - return &GetIdentityInvalidStorageFormat{} -} - -/* -GetIdentityInvalidStorageFormat describes a response with status code 521, with default header values. - -Invalid identity format in storage -*/ -type GetIdentityInvalidStorageFormat struct { - Payload models.Error -} - -// IsSuccess returns true when this get identity invalid storage format response has a 2xx status code -func (o *GetIdentityInvalidStorageFormat) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get identity invalid storage format response has a 3xx status code -func (o *GetIdentityInvalidStorageFormat) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get identity invalid storage format response has a 4xx status code -func (o *GetIdentityInvalidStorageFormat) IsClientError() bool { - return false -} - -// IsServerError returns true when this get identity invalid storage format response has a 5xx status code -func (o *GetIdentityInvalidStorageFormat) IsServerError() bool { - return true -} - -// IsCode returns true when this get identity invalid storage format response a status code equal to that given -func (o *GetIdentityInvalidStorageFormat) IsCode(code int) bool { - return code == 521 -} - -func (o *GetIdentityInvalidStorageFormat) Error() string { - return fmt.Sprintf("[GET /identity][%d] getIdentityInvalidStorageFormat %+v", 521, o.Payload) -} - -func (o *GetIdentityInvalidStorageFormat) String() string { - return fmt.Sprintf("[GET /identity][%d] getIdentityInvalidStorageFormat %+v", 521, o.Payload) -} - -func (o *GetIdentityInvalidStorageFormat) GetPayload() models.Error { - return o.Payload -} - -func (o *GetIdentityInvalidStorageFormat) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_ip_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_ip_parameters.go deleted file mode 100644 index 2f7c23112a2..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_ip_parameters.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetIPParams creates a new GetIPParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetIPParams() *GetIPParams { - return &GetIPParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetIPParamsWithTimeout creates a new GetIPParams object -// with the ability to set a timeout on a request. -func NewGetIPParamsWithTimeout(timeout time.Duration) *GetIPParams { - return &GetIPParams{ - timeout: timeout, - } -} - -// NewGetIPParamsWithContext creates a new GetIPParams object -// with the ability to set a context for a request. -func NewGetIPParamsWithContext(ctx context.Context) *GetIPParams { - return &GetIPParams{ - Context: ctx, - } -} - -// NewGetIPParamsWithHTTPClient creates a new GetIPParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetIPParamsWithHTTPClient(client *http.Client) *GetIPParams { - return &GetIPParams{ - HTTPClient: client, - } -} - -/* -GetIPParams contains all the parameters to send to the API endpoint - - for the get IP operation. - - Typically these are written to a http.Request. -*/ -type GetIPParams struct { - - /* Cidr. - - A CIDR range of IPs - */ - Cidr *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get IP params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIPParams) WithDefaults() *GetIPParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get IP params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetIPParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get IP params -func (o *GetIPParams) WithTimeout(timeout time.Duration) *GetIPParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get IP params -func (o *GetIPParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get IP params -func (o *GetIPParams) WithContext(ctx context.Context) *GetIPParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get IP params -func (o *GetIPParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get IP params -func (o *GetIPParams) WithHTTPClient(client *http.Client) *GetIPParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get IP params -func (o *GetIPParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCidr adds the cidr to the get IP params -func (o *GetIPParams) WithCidr(cidr *string) *GetIPParams { - o.SetCidr(cidr) - return o -} - -// SetCidr adds the cidr to the get IP params -func (o *GetIPParams) SetCidr(cidr *string) { - o.Cidr = cidr -} - -// WriteToRequest writes these params to a swagger request -func (o *GetIPParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cidr != nil { - - // query param cidr - var qrCidr string - - if o.Cidr != nil { - qrCidr = *o.Cidr - } - qCidr := qrCidr - if qCidr != "" { - - if err := r.SetQueryParam("cidr", qCidr); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_ip_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_ip_responses.go deleted file mode 100644 index 37db9ccd25f..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_ip_responses.go +++ /dev/null @@ -1,223 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetIPReader is a Reader for the GetIP structure. -type GetIPReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetIPReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetIPOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetIPBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetIPNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetIPOK creates a GetIPOK with default headers values -func NewGetIPOK() *GetIPOK { - return &GetIPOK{} -} - -/* -GetIPOK describes a response with status code 200, with default header values. - -Success -*/ -type GetIPOK struct { - Payload []*models.IPListEntry -} - -// IsSuccess returns true when this get Ip o k response has a 2xx status code -func (o *GetIPOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get Ip o k response has a 3xx status code -func (o *GetIPOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get Ip o k response has a 4xx status code -func (o *GetIPOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get Ip o k response has a 5xx status code -func (o *GetIPOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get Ip o k response a status code equal to that given -func (o *GetIPOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetIPOK) Error() string { - return fmt.Sprintf("[GET /ip][%d] getIpOK %+v", 200, o.Payload) -} - -func (o *GetIPOK) String() string { - return fmt.Sprintf("[GET /ip][%d] getIpOK %+v", 200, o.Payload) -} - -func (o *GetIPOK) GetPayload() []*models.IPListEntry { - return o.Payload -} - -func (o *GetIPOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIPBadRequest creates a GetIPBadRequest with default headers values -func NewGetIPBadRequest() *GetIPBadRequest { - return &GetIPBadRequest{} -} - -/* -GetIPBadRequest describes a response with status code 400, with default header values. - -Invalid request (error parsing parameters) -*/ -type GetIPBadRequest struct { - Payload models.Error -} - -// IsSuccess returns true when this get Ip bad request response has a 2xx status code -func (o *GetIPBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get Ip bad request response has a 3xx status code -func (o *GetIPBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get Ip bad request response has a 4xx status code -func (o *GetIPBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get Ip bad request response has a 5xx status code -func (o *GetIPBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get Ip bad request response a status code equal to that given -func (o *GetIPBadRequest) IsCode(code int) bool { - return code == 400 -} - -func (o *GetIPBadRequest) Error() string { - return fmt.Sprintf("[GET /ip][%d] getIpBadRequest %+v", 400, o.Payload) -} - -func (o *GetIPBadRequest) String() string { - return fmt.Sprintf("[GET /ip][%d] getIpBadRequest %+v", 400, o.Payload) -} - -func (o *GetIPBadRequest) GetPayload() models.Error { - return o.Payload -} - -func (o *GetIPBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetIPNotFound creates a GetIPNotFound with default headers values -func NewGetIPNotFound() *GetIPNotFound { - return &GetIPNotFound{} -} - -/* -GetIPNotFound describes a response with status code 404, with default header values. - -No IP cache entries with provided parameters found -*/ -type GetIPNotFound struct { -} - -// IsSuccess returns true when this get Ip not found response has a 2xx status code -func (o *GetIPNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get Ip not found response has a 3xx status code -func (o *GetIPNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get Ip not found response has a 4xx status code -func (o *GetIPNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get Ip not found response has a 5xx status code -func (o *GetIPNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get Ip not found response a status code equal to that given -func (o *GetIPNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetIPNotFound) Error() string { - return fmt.Sprintf("[GET /ip][%d] getIpNotFound ", 404) -} - -func (o *GetIPNotFound) String() string { - return fmt.Sprintf("[GET /ip][%d] getIpNotFound ", 404) -} - -func (o *GetIPNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_parameters.go deleted file mode 100644 index 33c66c92aae..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_parameters.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewGetPolicyParams creates a new GetPolicyParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetPolicyParams() *GetPolicyParams { - return &GetPolicyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPolicyParamsWithTimeout creates a new GetPolicyParams object -// with the ability to set a timeout on a request. -func NewGetPolicyParamsWithTimeout(timeout time.Duration) *GetPolicyParams { - return &GetPolicyParams{ - timeout: timeout, - } -} - -// NewGetPolicyParamsWithContext creates a new GetPolicyParams object -// with the ability to set a context for a request. -func NewGetPolicyParamsWithContext(ctx context.Context) *GetPolicyParams { - return &GetPolicyParams{ - Context: ctx, - } -} - -// NewGetPolicyParamsWithHTTPClient creates a new GetPolicyParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPolicyParamsWithHTTPClient(client *http.Client) *GetPolicyParams { - return &GetPolicyParams{ - HTTPClient: client, - } -} - -/* -GetPolicyParams contains all the parameters to send to the API endpoint - - for the get policy operation. - - Typically these are written to a http.Request. -*/ -type GetPolicyParams struct { - - // Labels. - Labels models.Labels - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPolicyParams) WithDefaults() *GetPolicyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPolicyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get policy params -func (o *GetPolicyParams) WithTimeout(timeout time.Duration) *GetPolicyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get policy params -func (o *GetPolicyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get policy params -func (o *GetPolicyParams) WithContext(ctx context.Context) *GetPolicyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get policy params -func (o *GetPolicyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get policy params -func (o *GetPolicyParams) WithHTTPClient(client *http.Client) *GetPolicyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get policy params -func (o *GetPolicyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLabels adds the labels to the get policy params -func (o *GetPolicyParams) WithLabels(labels models.Labels) *GetPolicyParams { - o.SetLabels(labels) - return o -} - -// SetLabels adds the labels to the get policy params -func (o *GetPolicyParams) SetLabels(labels models.Labels) { - o.Labels = labels -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPolicyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Labels != nil { - if err := r.SetBodyParam(o.Labels); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_responses.go deleted file mode 100644 index cba45439de2..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_responses.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetPolicyReader is a Reader for the GetPolicy structure. -type GetPolicyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPolicyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetPolicyNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetPolicyOK creates a GetPolicyOK with default headers values -func NewGetPolicyOK() *GetPolicyOK { - return &GetPolicyOK{} -} - -/* -GetPolicyOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPolicyOK struct { - Payload *models.Policy -} - -// IsSuccess returns true when this get policy o k response has a 2xx status code -func (o *GetPolicyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get policy o k response has a 3xx status code -func (o *GetPolicyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get policy o k response has a 4xx status code -func (o *GetPolicyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get policy o k response has a 5xx status code -func (o *GetPolicyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get policy o k response a status code equal to that given -func (o *GetPolicyOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetPolicyOK) Error() string { - return fmt.Sprintf("[GET /policy][%d] getPolicyOK %+v", 200, o.Payload) -} - -func (o *GetPolicyOK) String() string { - return fmt.Sprintf("[GET /policy][%d] getPolicyOK %+v", 200, o.Payload) -} - -func (o *GetPolicyOK) GetPayload() *models.Policy { - return o.Payload -} - -func (o *GetPolicyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Policy) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPolicyNotFound creates a GetPolicyNotFound with default headers values -func NewGetPolicyNotFound() *GetPolicyNotFound { - return &GetPolicyNotFound{} -} - -/* -GetPolicyNotFound describes a response with status code 404, with default header values. - -No policy rules found -*/ -type GetPolicyNotFound struct { -} - -// IsSuccess returns true when this get policy not found response has a 2xx status code -func (o *GetPolicyNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get policy not found response has a 3xx status code -func (o *GetPolicyNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get policy not found response has a 4xx status code -func (o *GetPolicyNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get policy not found response has a 5xx status code -func (o *GetPolicyNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get policy not found response a status code equal to that given -func (o *GetPolicyNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetPolicyNotFound) Error() string { - return fmt.Sprintf("[GET /policy][%d] getPolicyNotFound ", 404) -} - -func (o *GetPolicyNotFound) String() string { - return fmt.Sprintf("[GET /policy][%d] getPolicyNotFound ", 404) -} - -func (o *GetPolicyNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_selectors_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_selectors_parameters.go deleted file mode 100644 index 388f81f593a..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_selectors_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetPolicySelectorsParams creates a new GetPolicySelectorsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetPolicySelectorsParams() *GetPolicySelectorsParams { - return &GetPolicySelectorsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPolicySelectorsParamsWithTimeout creates a new GetPolicySelectorsParams object -// with the ability to set a timeout on a request. -func NewGetPolicySelectorsParamsWithTimeout(timeout time.Duration) *GetPolicySelectorsParams { - return &GetPolicySelectorsParams{ - timeout: timeout, - } -} - -// NewGetPolicySelectorsParamsWithContext creates a new GetPolicySelectorsParams object -// with the ability to set a context for a request. -func NewGetPolicySelectorsParamsWithContext(ctx context.Context) *GetPolicySelectorsParams { - return &GetPolicySelectorsParams{ - Context: ctx, - } -} - -// NewGetPolicySelectorsParamsWithHTTPClient creates a new GetPolicySelectorsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPolicySelectorsParamsWithHTTPClient(client *http.Client) *GetPolicySelectorsParams { - return &GetPolicySelectorsParams{ - HTTPClient: client, - } -} - -/* -GetPolicySelectorsParams contains all the parameters to send to the API endpoint - - for the get policy selectors operation. - - Typically these are written to a http.Request. -*/ -type GetPolicySelectorsParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get policy selectors params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPolicySelectorsParams) WithDefaults() *GetPolicySelectorsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get policy selectors params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPolicySelectorsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get policy selectors params -func (o *GetPolicySelectorsParams) WithTimeout(timeout time.Duration) *GetPolicySelectorsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get policy selectors params -func (o *GetPolicySelectorsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get policy selectors params -func (o *GetPolicySelectorsParams) WithContext(ctx context.Context) *GetPolicySelectorsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get policy selectors params -func (o *GetPolicySelectorsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get policy selectors params -func (o *GetPolicySelectorsParams) WithHTTPClient(client *http.Client) *GetPolicySelectorsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get policy selectors params -func (o *GetPolicySelectorsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPolicySelectorsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_selectors_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_selectors_responses.go deleted file mode 100644 index a1cbec4a325..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/get_policy_selectors_responses.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetPolicySelectorsReader is a Reader for the GetPolicySelectors structure. -type GetPolicySelectorsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPolicySelectorsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPolicySelectorsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetPolicySelectorsOK creates a GetPolicySelectorsOK with default headers values -func NewGetPolicySelectorsOK() *GetPolicySelectorsOK { - return &GetPolicySelectorsOK{} -} - -/* -GetPolicySelectorsOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPolicySelectorsOK struct { - Payload models.SelectorCache -} - -// IsSuccess returns true when this get policy selectors o k response has a 2xx status code -func (o *GetPolicySelectorsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get policy selectors o k response has a 3xx status code -func (o *GetPolicySelectorsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get policy selectors o k response has a 4xx status code -func (o *GetPolicySelectorsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get policy selectors o k response has a 5xx status code -func (o *GetPolicySelectorsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get policy selectors o k response a status code equal to that given -func (o *GetPolicySelectorsOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetPolicySelectorsOK) Error() string { - return fmt.Sprintf("[GET /policy/selectors][%d] getPolicySelectorsOK %+v", 200, o.Payload) -} - -func (o *GetPolicySelectorsOK) String() string { - return fmt.Sprintf("[GET /policy/selectors][%d] getPolicySelectorsOK %+v", 200, o.Payload) -} - -func (o *GetPolicySelectorsOK) GetPayload() models.SelectorCache { - return o.Payload -} - -func (o *GetPolicySelectorsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/policy_client.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/policy_client.go deleted file mode 100644 index c7292703455..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/policy_client.go +++ /dev/null @@ -1,548 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new policy API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for policy API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeleteFqdnCache(params *DeleteFqdnCacheParams, opts ...ClientOption) (*DeleteFqdnCacheOK, error) - - DeletePolicy(params *DeletePolicyParams, opts ...ClientOption) (*DeletePolicyOK, error) - - GetFqdnCache(params *GetFqdnCacheParams, opts ...ClientOption) (*GetFqdnCacheOK, error) - - GetFqdnCacheID(params *GetFqdnCacheIDParams, opts ...ClientOption) (*GetFqdnCacheIDOK, error) - - GetFqdnNames(params *GetFqdnNamesParams, opts ...ClientOption) (*GetFqdnNamesOK, error) - - GetIP(params *GetIPParams, opts ...ClientOption) (*GetIPOK, error) - - GetIdentity(params *GetIdentityParams, opts ...ClientOption) (*GetIdentityOK, error) - - GetIdentityEndpoints(params *GetIdentityEndpointsParams, opts ...ClientOption) (*GetIdentityEndpointsOK, error) - - GetIdentityID(params *GetIdentityIDParams, opts ...ClientOption) (*GetIdentityIDOK, error) - - GetPolicy(params *GetPolicyParams, opts ...ClientOption) (*GetPolicyOK, error) - - GetPolicySelectors(params *GetPolicySelectorsParams, opts ...ClientOption) (*GetPolicySelectorsOK, error) - - PutPolicy(params *PutPolicyParams, opts ...ClientOption) (*PutPolicyOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - DeleteFqdnCache deletes matching DNS lookups from the policy generation cache - - Deletes matching DNS lookups from the cache, optionally restricted by - -DNS name. The removed IP data will no longer be used in generated -policies. -*/ -func (a *Client) DeleteFqdnCache(params *DeleteFqdnCacheParams, opts ...ClientOption) (*DeleteFqdnCacheOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteFqdnCacheParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteFqdnCache", - Method: "DELETE", - PathPattern: "/fqdn/cache", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteFqdnCacheReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteFqdnCacheOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for DeleteFqdnCache: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -DeletePolicy deletes a policy sub tree -*/ -func (a *Client) DeletePolicy(params *DeletePolicyParams, opts ...ClientOption) (*DeletePolicyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeletePolicyParams() - } - op := &runtime.ClientOperation{ - ID: "DeletePolicy", - Method: "DELETE", - PathPattern: "/policy", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeletePolicyReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeletePolicyOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for DeletePolicy: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - GetFqdnCache retrieves the list of DNS lookups intercepted from all endpoints - - Retrieves the list of DNS lookups intercepted from endpoints, - -optionally filtered by DNS name, CIDR IP range or source. -*/ -func (a *Client) GetFqdnCache(params *GetFqdnCacheParams, opts ...ClientOption) (*GetFqdnCacheOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFqdnCacheParams() - } - op := &runtime.ClientOperation{ - ID: "GetFqdnCache", - Method: "GET", - PathPattern: "/fqdn/cache", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetFqdnCacheReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetFqdnCacheOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetFqdnCache: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - GetFqdnCacheID retrieves the list of DNS lookups intercepted from an endpoint - - Retrieves the list of DNS lookups intercepted from the specific endpoint, - -optionally filtered by endpoint id, DNS name, CIDR IP range or source. -*/ -func (a *Client) GetFqdnCacheID(params *GetFqdnCacheIDParams, opts ...ClientOption) (*GetFqdnCacheIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFqdnCacheIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetFqdnCacheID", - Method: "GET", - PathPattern: "/fqdn/cache/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetFqdnCacheIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetFqdnCacheIDOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetFqdnCacheID: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - GetFqdnNames lists internal DNS selector representations - - Retrieves the list of DNS-related fields (names to poll, selectors and - -their corresponding regexes). -*/ -func (a *Client) GetFqdnNames(params *GetFqdnNamesParams, opts ...ClientOption) (*GetFqdnNamesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetFqdnNamesParams() - } - op := &runtime.ClientOperation{ - ID: "GetFqdnNames", - Method: "GET", - PathPattern: "/fqdn/names", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetFqdnNamesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetFqdnNamesOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetFqdnNames: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - GetIP lists information about known IP addresses - - Retrieves a list of IPs with known associated information such as - -their identities, host addresses, Kubernetes pod names, etc. -The list can optionally filtered by a CIDR IP range. -*/ -func (a *Client) GetIP(params *GetIPParams, opts ...ClientOption) (*GetIPOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIPParams() - } - op := &runtime.ClientOperation{ - ID: "GetIP", - Method: "GET", - PathPattern: "/ip", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetIPReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetIPOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetIP: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetIdentity retrieves a list of identities that have metadata matching the provided parameters - -Retrieves a list of identities that have metadata matching the provided parameters, or all identities if no parameters are provided. -*/ -func (a *Client) GetIdentity(params *GetIdentityParams, opts ...ClientOption) (*GetIdentityOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIdentityParams() - } - op := &runtime.ClientOperation{ - ID: "GetIdentity", - Method: "GET", - PathPattern: "/identity", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetIdentityReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetIdentityOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetIdentity: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetIdentityEndpoints retrieves identities which are being used by local endpoints -*/ -func (a *Client) GetIdentityEndpoints(params *GetIdentityEndpointsParams, opts ...ClientOption) (*GetIdentityEndpointsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIdentityEndpointsParams() - } - op := &runtime.ClientOperation{ - ID: "GetIdentityEndpoints", - Method: "GET", - PathPattern: "/identity/endpoints", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetIdentityEndpointsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetIdentityEndpointsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetIdentityEndpoints: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetIdentityID retrieves identity -*/ -func (a *Client) GetIdentityID(params *GetIdentityIDParams, opts ...ClientOption) (*GetIdentityIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetIdentityIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetIdentityID", - Method: "GET", - PathPattern: "/identity/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetIdentityIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetIdentityIDOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetIdentityID: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetPolicy retrieves entire policy tree - -Returns the entire policy tree with all children. -*/ -func (a *Client) GetPolicy(params *GetPolicyParams, opts ...ClientOption) (*GetPolicyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPolicyParams() - } - op := &runtime.ClientOperation{ - ID: "GetPolicy", - Method: "GET", - PathPattern: "/policy", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetPolicyReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetPolicyOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetPolicy: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetPolicySelectors sees what selectors match which identities -*/ -func (a *Client) GetPolicySelectors(params *GetPolicySelectorsParams, opts ...ClientOption) (*GetPolicySelectorsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPolicySelectorsParams() - } - op := &runtime.ClientOperation{ - ID: "GetPolicySelectors", - Method: "GET", - PathPattern: "/policy/selectors", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetPolicySelectorsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetPolicySelectorsOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetPolicySelectors: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -PutPolicy creates or update a policy sub tree -*/ -func (a *Client) PutPolicy(params *PutPolicyParams, opts ...ClientOption) (*PutPolicyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPutPolicyParams() - } - op := &runtime.ClientOperation{ - ID: "PutPolicy", - Method: "PUT", - PathPattern: "/policy", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PutPolicyReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PutPolicyOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for PutPolicy: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/put_policy_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/put_policy_parameters.go deleted file mode 100644 index ef09ec7960a..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/put_policy_parameters.go +++ /dev/null @@ -1,232 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewPutPolicyParams creates a new PutPolicyParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPutPolicyParams() *PutPolicyParams { - return &PutPolicyParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPutPolicyParamsWithTimeout creates a new PutPolicyParams object -// with the ability to set a timeout on a request. -func NewPutPolicyParamsWithTimeout(timeout time.Duration) *PutPolicyParams { - return &PutPolicyParams{ - timeout: timeout, - } -} - -// NewPutPolicyParamsWithContext creates a new PutPolicyParams object -// with the ability to set a context for a request. -func NewPutPolicyParamsWithContext(ctx context.Context) *PutPolicyParams { - return &PutPolicyParams{ - Context: ctx, - } -} - -// NewPutPolicyParamsWithHTTPClient creates a new PutPolicyParams object -// with the ability to set a custom HTTPClient for a request. -func NewPutPolicyParamsWithHTTPClient(client *http.Client) *PutPolicyParams { - return &PutPolicyParams{ - HTTPClient: client, - } -} - -/* -PutPolicyParams contains all the parameters to send to the API endpoint - - for the put policy operation. - - Typically these are written to a http.Request. -*/ -type PutPolicyParams struct { - - /* Policy. - - Policy rules - */ - Policy string - - /* Replace. - - If true, indicates that existing rules with identical labels should be replaced. - */ - Replace *bool - - /* ReplaceWithLabels. - - If present, indicates that existing rules with the given labels should be deleted. - */ - ReplaceWithLabels []string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the put policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutPolicyParams) WithDefaults() *PutPolicyParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the put policy params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutPolicyParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the put policy params -func (o *PutPolicyParams) WithTimeout(timeout time.Duration) *PutPolicyParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the put policy params -func (o *PutPolicyParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the put policy params -func (o *PutPolicyParams) WithContext(ctx context.Context) *PutPolicyParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the put policy params -func (o *PutPolicyParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the put policy params -func (o *PutPolicyParams) WithHTTPClient(client *http.Client) *PutPolicyParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the put policy params -func (o *PutPolicyParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithPolicy adds the policy to the put policy params -func (o *PutPolicyParams) WithPolicy(policy string) *PutPolicyParams { - o.SetPolicy(policy) - return o -} - -// SetPolicy adds the policy to the put policy params -func (o *PutPolicyParams) SetPolicy(policy string) { - o.Policy = policy -} - -// WithReplace adds the replace to the put policy params -func (o *PutPolicyParams) WithReplace(replace *bool) *PutPolicyParams { - o.SetReplace(replace) - return o -} - -// SetReplace adds the replace to the put policy params -func (o *PutPolicyParams) SetReplace(replace *bool) { - o.Replace = replace -} - -// WithReplaceWithLabels adds the replaceWithLabels to the put policy params -func (o *PutPolicyParams) WithReplaceWithLabels(replaceWithLabels []string) *PutPolicyParams { - o.SetReplaceWithLabels(replaceWithLabels) - return o -} - -// SetReplaceWithLabels adds the replaceWithLabels to the put policy params -func (o *PutPolicyParams) SetReplaceWithLabels(replaceWithLabels []string) { - o.ReplaceWithLabels = replaceWithLabels -} - -// WriteToRequest writes these params to a swagger request -func (o *PutPolicyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Policy); err != nil { - return err - } - - if o.Replace != nil { - - // query param replace - var qrReplace bool - - if o.Replace != nil { - qrReplace = *o.Replace - } - qReplace := swag.FormatBool(qrReplace) - if qReplace != "" { - - if err := r.SetQueryParam("replace", qReplace); err != nil { - return err - } - } - } - - if o.ReplaceWithLabels != nil { - - // binding items for replace-with-labels - joinedReplaceWithLabels := o.bindParamReplaceWithLabels(reg) - - // query array param replace-with-labels - if err := r.SetQueryParam("replace-with-labels", joinedReplaceWithLabels...); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindParamPutPolicy binds the parameter replace-with-labels -func (o *PutPolicyParams) bindParamReplaceWithLabels(formats strfmt.Registry) []string { - replaceWithLabelsIR := o.ReplaceWithLabels - - var replaceWithLabelsIC []string - for _, replaceWithLabelsIIR := range replaceWithLabelsIR { // explode []string - - replaceWithLabelsIIV := replaceWithLabelsIIR // string as string - replaceWithLabelsIC = append(replaceWithLabelsIC, replaceWithLabelsIIV) - } - - // items.CollectionFormat: "" - replaceWithLabelsIS := swag.JoinByFormat(replaceWithLabelsIC, "") - - return replaceWithLabelsIS -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/policy/put_policy_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/policy/put_policy_responses.go deleted file mode 100644 index f1104c418a8..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/policy/put_policy_responses.go +++ /dev/null @@ -1,359 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package policy - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// PutPolicyReader is a Reader for the PutPolicy structure. -type PutPolicyReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PutPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPutPolicyOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewPutPolicyInvalidPolicy() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewPutPolicyForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 460: - result := NewPutPolicyInvalidPath() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPutPolicyFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPutPolicyOK creates a PutPolicyOK with default headers values -func NewPutPolicyOK() *PutPolicyOK { - return &PutPolicyOK{} -} - -/* -PutPolicyOK describes a response with status code 200, with default header values. - -Success -*/ -type PutPolicyOK struct { - Payload *models.Policy -} - -// IsSuccess returns true when this put policy o k response has a 2xx status code -func (o *PutPolicyOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this put policy o k response has a 3xx status code -func (o *PutPolicyOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put policy o k response has a 4xx status code -func (o *PutPolicyOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this put policy o k response has a 5xx status code -func (o *PutPolicyOK) IsServerError() bool { - return false -} - -// IsCode returns true when this put policy o k response a status code equal to that given -func (o *PutPolicyOK) IsCode(code int) bool { - return code == 200 -} - -func (o *PutPolicyOK) Error() string { - return fmt.Sprintf("[PUT /policy][%d] putPolicyOK %+v", 200, o.Payload) -} - -func (o *PutPolicyOK) String() string { - return fmt.Sprintf("[PUT /policy][%d] putPolicyOK %+v", 200, o.Payload) -} - -func (o *PutPolicyOK) GetPayload() *models.Policy { - return o.Payload -} - -func (o *PutPolicyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Policy) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPutPolicyInvalidPolicy creates a PutPolicyInvalidPolicy with default headers values -func NewPutPolicyInvalidPolicy() *PutPolicyInvalidPolicy { - return &PutPolicyInvalidPolicy{} -} - -/* -PutPolicyInvalidPolicy describes a response with status code 400, with default header values. - -Invalid policy -*/ -type PutPolicyInvalidPolicy struct { - Payload models.Error -} - -// IsSuccess returns true when this put policy invalid policy response has a 2xx status code -func (o *PutPolicyInvalidPolicy) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put policy invalid policy response has a 3xx status code -func (o *PutPolicyInvalidPolicy) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put policy invalid policy response has a 4xx status code -func (o *PutPolicyInvalidPolicy) IsClientError() bool { - return true -} - -// IsServerError returns true when this put policy invalid policy response has a 5xx status code -func (o *PutPolicyInvalidPolicy) IsServerError() bool { - return false -} - -// IsCode returns true when this put policy invalid policy response a status code equal to that given -func (o *PutPolicyInvalidPolicy) IsCode(code int) bool { - return code == 400 -} - -func (o *PutPolicyInvalidPolicy) Error() string { - return fmt.Sprintf("[PUT /policy][%d] putPolicyInvalidPolicy %+v", 400, o.Payload) -} - -func (o *PutPolicyInvalidPolicy) String() string { - return fmt.Sprintf("[PUT /policy][%d] putPolicyInvalidPolicy %+v", 400, o.Payload) -} - -func (o *PutPolicyInvalidPolicy) GetPayload() models.Error { - return o.Payload -} - -func (o *PutPolicyInvalidPolicy) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPutPolicyForbidden creates a PutPolicyForbidden with default headers values -func NewPutPolicyForbidden() *PutPolicyForbidden { - return &PutPolicyForbidden{} -} - -/* -PutPolicyForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PutPolicyForbidden struct { -} - -// IsSuccess returns true when this put policy forbidden response has a 2xx status code -func (o *PutPolicyForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put policy forbidden response has a 3xx status code -func (o *PutPolicyForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put policy forbidden response has a 4xx status code -func (o *PutPolicyForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this put policy forbidden response has a 5xx status code -func (o *PutPolicyForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this put policy forbidden response a status code equal to that given -func (o *PutPolicyForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PutPolicyForbidden) Error() string { - return fmt.Sprintf("[PUT /policy][%d] putPolicyForbidden ", 403) -} - -func (o *PutPolicyForbidden) String() string { - return fmt.Sprintf("[PUT /policy][%d] putPolicyForbidden ", 403) -} - -func (o *PutPolicyForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutPolicyInvalidPath creates a PutPolicyInvalidPath with default headers values -func NewPutPolicyInvalidPath() *PutPolicyInvalidPath { - return &PutPolicyInvalidPath{} -} - -/* -PutPolicyInvalidPath describes a response with status code 460, with default header values. - -Invalid path -*/ -type PutPolicyInvalidPath struct { - Payload models.Error -} - -// IsSuccess returns true when this put policy invalid path response has a 2xx status code -func (o *PutPolicyInvalidPath) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put policy invalid path response has a 3xx status code -func (o *PutPolicyInvalidPath) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put policy invalid path response has a 4xx status code -func (o *PutPolicyInvalidPath) IsClientError() bool { - return true -} - -// IsServerError returns true when this put policy invalid path response has a 5xx status code -func (o *PutPolicyInvalidPath) IsServerError() bool { - return false -} - -// IsCode returns true when this put policy invalid path response a status code equal to that given -func (o *PutPolicyInvalidPath) IsCode(code int) bool { - return code == 460 -} - -func (o *PutPolicyInvalidPath) Error() string { - return fmt.Sprintf("[PUT /policy][%d] putPolicyInvalidPath %+v", 460, o.Payload) -} - -func (o *PutPolicyInvalidPath) String() string { - return fmt.Sprintf("[PUT /policy][%d] putPolicyInvalidPath %+v", 460, o.Payload) -} - -func (o *PutPolicyInvalidPath) GetPayload() models.Error { - return o.Payload -} - -func (o *PutPolicyInvalidPath) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPutPolicyFailure creates a PutPolicyFailure with default headers values -func NewPutPolicyFailure() *PutPolicyFailure { - return &PutPolicyFailure{} -} - -/* -PutPolicyFailure describes a response with status code 500, with default header values. - -Policy import failed -*/ -type PutPolicyFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this put policy failure response has a 2xx status code -func (o *PutPolicyFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put policy failure response has a 3xx status code -func (o *PutPolicyFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put policy failure response has a 4xx status code -func (o *PutPolicyFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this put policy failure response has a 5xx status code -func (o *PutPolicyFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this put policy failure response a status code equal to that given -func (o *PutPolicyFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *PutPolicyFailure) Error() string { - return fmt.Sprintf("[PUT /policy][%d] putPolicyFailure %+v", 500, o.Payload) -} - -func (o *PutPolicyFailure) String() string { - return fmt.Sprintf("[PUT /policy][%d] putPolicyFailure %+v", 500, o.Payload) -} - -func (o *PutPolicyFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *PutPolicyFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/delete_prefilter_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/prefilter/delete_prefilter_parameters.go deleted file mode 100644 index 889f2d2e933..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/delete_prefilter_parameters.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package prefilter - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewDeletePrefilterParams creates a new DeletePrefilterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeletePrefilterParams() *DeletePrefilterParams { - return &DeletePrefilterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeletePrefilterParamsWithTimeout creates a new DeletePrefilterParams object -// with the ability to set a timeout on a request. -func NewDeletePrefilterParamsWithTimeout(timeout time.Duration) *DeletePrefilterParams { - return &DeletePrefilterParams{ - timeout: timeout, - } -} - -// NewDeletePrefilterParamsWithContext creates a new DeletePrefilterParams object -// with the ability to set a context for a request. -func NewDeletePrefilterParamsWithContext(ctx context.Context) *DeletePrefilterParams { - return &DeletePrefilterParams{ - Context: ctx, - } -} - -// NewDeletePrefilterParamsWithHTTPClient creates a new DeletePrefilterParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeletePrefilterParamsWithHTTPClient(client *http.Client) *DeletePrefilterParams { - return &DeletePrefilterParams{ - HTTPClient: client, - } -} - -/* -DeletePrefilterParams contains all the parameters to send to the API endpoint - - for the delete prefilter operation. - - Typically these are written to a http.Request. -*/ -type DeletePrefilterParams struct { - - /* PrefilterSpec. - - List of CIDR ranges for filter table - */ - PrefilterSpec *models.PrefilterSpec - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete prefilter params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeletePrefilterParams) WithDefaults() *DeletePrefilterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete prefilter params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeletePrefilterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete prefilter params -func (o *DeletePrefilterParams) WithTimeout(timeout time.Duration) *DeletePrefilterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete prefilter params -func (o *DeletePrefilterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete prefilter params -func (o *DeletePrefilterParams) WithContext(ctx context.Context) *DeletePrefilterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete prefilter params -func (o *DeletePrefilterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete prefilter params -func (o *DeletePrefilterParams) WithHTTPClient(client *http.Client) *DeletePrefilterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete prefilter params -func (o *DeletePrefilterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithPrefilterSpec adds the prefilterSpec to the delete prefilter params -func (o *DeletePrefilterParams) WithPrefilterSpec(prefilterSpec *models.PrefilterSpec) *DeletePrefilterParams { - o.SetPrefilterSpec(prefilterSpec) - return o -} - -// SetPrefilterSpec adds the prefilterSpec to the delete prefilter params -func (o *DeletePrefilterParams) SetPrefilterSpec(prefilterSpec *models.PrefilterSpec) { - o.PrefilterSpec = prefilterSpec -} - -// WriteToRequest writes these params to a swagger request -func (o *DeletePrefilterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.PrefilterSpec != nil { - if err := r.SetBodyParam(o.PrefilterSpec); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/delete_prefilter_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/prefilter/delete_prefilter_responses.go deleted file mode 100644 index 0d5aea637de..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/delete_prefilter_responses.go +++ /dev/null @@ -1,292 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package prefilter - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// DeletePrefilterReader is a Reader for the DeletePrefilter structure. -type DeletePrefilterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeletePrefilterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeletePrefilterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 403: - result := NewDeletePrefilterForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 461: - result := NewDeletePrefilterInvalidCIDR() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeletePrefilterFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeletePrefilterOK creates a DeletePrefilterOK with default headers values -func NewDeletePrefilterOK() *DeletePrefilterOK { - return &DeletePrefilterOK{} -} - -/* -DeletePrefilterOK describes a response with status code 200, with default header values. - -Deleted -*/ -type DeletePrefilterOK struct { - Payload *models.Prefilter -} - -// IsSuccess returns true when this delete prefilter o k response has a 2xx status code -func (o *DeletePrefilterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete prefilter o k response has a 3xx status code -func (o *DeletePrefilterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete prefilter o k response has a 4xx status code -func (o *DeletePrefilterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete prefilter o k response has a 5xx status code -func (o *DeletePrefilterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete prefilter o k response a status code equal to that given -func (o *DeletePrefilterOK) IsCode(code int) bool { - return code == 200 -} - -func (o *DeletePrefilterOK) Error() string { - return fmt.Sprintf("[DELETE /prefilter][%d] deletePrefilterOK %+v", 200, o.Payload) -} - -func (o *DeletePrefilterOK) String() string { - return fmt.Sprintf("[DELETE /prefilter][%d] deletePrefilterOK %+v", 200, o.Payload) -} - -func (o *DeletePrefilterOK) GetPayload() *models.Prefilter { - return o.Payload -} - -func (o *DeletePrefilterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Prefilter) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeletePrefilterForbidden creates a DeletePrefilterForbidden with default headers values -func NewDeletePrefilterForbidden() *DeletePrefilterForbidden { - return &DeletePrefilterForbidden{} -} - -/* -DeletePrefilterForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeletePrefilterForbidden struct { -} - -// IsSuccess returns true when this delete prefilter forbidden response has a 2xx status code -func (o *DeletePrefilterForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete prefilter forbidden response has a 3xx status code -func (o *DeletePrefilterForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete prefilter forbidden response has a 4xx status code -func (o *DeletePrefilterForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete prefilter forbidden response has a 5xx status code -func (o *DeletePrefilterForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete prefilter forbidden response a status code equal to that given -func (o *DeletePrefilterForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *DeletePrefilterForbidden) Error() string { - return fmt.Sprintf("[DELETE /prefilter][%d] deletePrefilterForbidden ", 403) -} - -func (o *DeletePrefilterForbidden) String() string { - return fmt.Sprintf("[DELETE /prefilter][%d] deletePrefilterForbidden ", 403) -} - -func (o *DeletePrefilterForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeletePrefilterInvalidCIDR creates a DeletePrefilterInvalidCIDR with default headers values -func NewDeletePrefilterInvalidCIDR() *DeletePrefilterInvalidCIDR { - return &DeletePrefilterInvalidCIDR{} -} - -/* -DeletePrefilterInvalidCIDR describes a response with status code 461, with default header values. - -Invalid CIDR prefix -*/ -type DeletePrefilterInvalidCIDR struct { - Payload models.Error -} - -// IsSuccess returns true when this delete prefilter invalid c Id r response has a 2xx status code -func (o *DeletePrefilterInvalidCIDR) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete prefilter invalid c Id r response has a 3xx status code -func (o *DeletePrefilterInvalidCIDR) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete prefilter invalid c Id r response has a 4xx status code -func (o *DeletePrefilterInvalidCIDR) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete prefilter invalid c Id r response has a 5xx status code -func (o *DeletePrefilterInvalidCIDR) IsServerError() bool { - return false -} - -// IsCode returns true when this delete prefilter invalid c Id r response a status code equal to that given -func (o *DeletePrefilterInvalidCIDR) IsCode(code int) bool { - return code == 461 -} - -func (o *DeletePrefilterInvalidCIDR) Error() string { - return fmt.Sprintf("[DELETE /prefilter][%d] deletePrefilterInvalidCIdR %+v", 461, o.Payload) -} - -func (o *DeletePrefilterInvalidCIDR) String() string { - return fmt.Sprintf("[DELETE /prefilter][%d] deletePrefilterInvalidCIdR %+v", 461, o.Payload) -} - -func (o *DeletePrefilterInvalidCIDR) GetPayload() models.Error { - return o.Payload -} - -func (o *DeletePrefilterInvalidCIDR) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeletePrefilterFailure creates a DeletePrefilterFailure with default headers values -func NewDeletePrefilterFailure() *DeletePrefilterFailure { - return &DeletePrefilterFailure{} -} - -/* -DeletePrefilterFailure describes a response with status code 500, with default header values. - -Prefilter delete failed -*/ -type DeletePrefilterFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this delete prefilter failure response has a 2xx status code -func (o *DeletePrefilterFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete prefilter failure response has a 3xx status code -func (o *DeletePrefilterFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete prefilter failure response has a 4xx status code -func (o *DeletePrefilterFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete prefilter failure response has a 5xx status code -func (o *DeletePrefilterFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this delete prefilter failure response a status code equal to that given -func (o *DeletePrefilterFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *DeletePrefilterFailure) Error() string { - return fmt.Sprintf("[DELETE /prefilter][%d] deletePrefilterFailure %+v", 500, o.Payload) -} - -func (o *DeletePrefilterFailure) String() string { - return fmt.Sprintf("[DELETE /prefilter][%d] deletePrefilterFailure %+v", 500, o.Payload) -} - -func (o *DeletePrefilterFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *DeletePrefilterFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/get_prefilter_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/prefilter/get_prefilter_parameters.go deleted file mode 100644 index 40c5e7bfa6f..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/get_prefilter_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package prefilter - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetPrefilterParams creates a new GetPrefilterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetPrefilterParams() *GetPrefilterParams { - return &GetPrefilterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPrefilterParamsWithTimeout creates a new GetPrefilterParams object -// with the ability to set a timeout on a request. -func NewGetPrefilterParamsWithTimeout(timeout time.Duration) *GetPrefilterParams { - return &GetPrefilterParams{ - timeout: timeout, - } -} - -// NewGetPrefilterParamsWithContext creates a new GetPrefilterParams object -// with the ability to set a context for a request. -func NewGetPrefilterParamsWithContext(ctx context.Context) *GetPrefilterParams { - return &GetPrefilterParams{ - Context: ctx, - } -} - -// NewGetPrefilterParamsWithHTTPClient creates a new GetPrefilterParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPrefilterParamsWithHTTPClient(client *http.Client) *GetPrefilterParams { - return &GetPrefilterParams{ - HTTPClient: client, - } -} - -/* -GetPrefilterParams contains all the parameters to send to the API endpoint - - for the get prefilter operation. - - Typically these are written to a http.Request. -*/ -type GetPrefilterParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get prefilter params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPrefilterParams) WithDefaults() *GetPrefilterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get prefilter params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPrefilterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get prefilter params -func (o *GetPrefilterParams) WithTimeout(timeout time.Duration) *GetPrefilterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get prefilter params -func (o *GetPrefilterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get prefilter params -func (o *GetPrefilterParams) WithContext(ctx context.Context) *GetPrefilterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get prefilter params -func (o *GetPrefilterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get prefilter params -func (o *GetPrefilterParams) WithHTTPClient(client *http.Client) *GetPrefilterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get prefilter params -func (o *GetPrefilterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPrefilterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/get_prefilter_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/prefilter/get_prefilter_responses.go deleted file mode 100644 index 63e051e3acd..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/get_prefilter_responses.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package prefilter - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetPrefilterReader is a Reader for the GetPrefilter structure. -type GetPrefilterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPrefilterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPrefilterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 500: - result := NewGetPrefilterFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetPrefilterOK creates a GetPrefilterOK with default headers values -func NewGetPrefilterOK() *GetPrefilterOK { - return &GetPrefilterOK{} -} - -/* -GetPrefilterOK describes a response with status code 200, with default header values. - -Success -*/ -type GetPrefilterOK struct { - Payload *models.Prefilter -} - -// IsSuccess returns true when this get prefilter o k response has a 2xx status code -func (o *GetPrefilterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get prefilter o k response has a 3xx status code -func (o *GetPrefilterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get prefilter o k response has a 4xx status code -func (o *GetPrefilterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get prefilter o k response has a 5xx status code -func (o *GetPrefilterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get prefilter o k response a status code equal to that given -func (o *GetPrefilterOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetPrefilterOK) Error() string { - return fmt.Sprintf("[GET /prefilter][%d] getPrefilterOK %+v", 200, o.Payload) -} - -func (o *GetPrefilterOK) String() string { - return fmt.Sprintf("[GET /prefilter][%d] getPrefilterOK %+v", 200, o.Payload) -} - -func (o *GetPrefilterOK) GetPayload() *models.Prefilter { - return o.Payload -} - -func (o *GetPrefilterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Prefilter) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPrefilterFailure creates a GetPrefilterFailure with default headers values -func NewGetPrefilterFailure() *GetPrefilterFailure { - return &GetPrefilterFailure{} -} - -/* -GetPrefilterFailure describes a response with status code 500, with default header values. - -Prefilter get failed -*/ -type GetPrefilterFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this get prefilter failure response has a 2xx status code -func (o *GetPrefilterFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get prefilter failure response has a 3xx status code -func (o *GetPrefilterFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get prefilter failure response has a 4xx status code -func (o *GetPrefilterFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this get prefilter failure response has a 5xx status code -func (o *GetPrefilterFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this get prefilter failure response a status code equal to that given -func (o *GetPrefilterFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *GetPrefilterFailure) Error() string { - return fmt.Sprintf("[GET /prefilter][%d] getPrefilterFailure %+v", 500, o.Payload) -} - -func (o *GetPrefilterFailure) String() string { - return fmt.Sprintf("[GET /prefilter][%d] getPrefilterFailure %+v", 500, o.Payload) -} - -func (o *GetPrefilterFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *GetPrefilterFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/patch_prefilter_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/prefilter/patch_prefilter_parameters.go deleted file mode 100644 index 14e6a56cfb6..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/patch_prefilter_parameters.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package prefilter - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewPatchPrefilterParams creates a new PatchPrefilterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPatchPrefilterParams() *PatchPrefilterParams { - return &PatchPrefilterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPatchPrefilterParamsWithTimeout creates a new PatchPrefilterParams object -// with the ability to set a timeout on a request. -func NewPatchPrefilterParamsWithTimeout(timeout time.Duration) *PatchPrefilterParams { - return &PatchPrefilterParams{ - timeout: timeout, - } -} - -// NewPatchPrefilterParamsWithContext creates a new PatchPrefilterParams object -// with the ability to set a context for a request. -func NewPatchPrefilterParamsWithContext(ctx context.Context) *PatchPrefilterParams { - return &PatchPrefilterParams{ - Context: ctx, - } -} - -// NewPatchPrefilterParamsWithHTTPClient creates a new PatchPrefilterParams object -// with the ability to set a custom HTTPClient for a request. -func NewPatchPrefilterParamsWithHTTPClient(client *http.Client) *PatchPrefilterParams { - return &PatchPrefilterParams{ - HTTPClient: client, - } -} - -/* -PatchPrefilterParams contains all the parameters to send to the API endpoint - - for the patch prefilter operation. - - Typically these are written to a http.Request. -*/ -type PatchPrefilterParams struct { - - /* PrefilterSpec. - - List of CIDR ranges for filter table - */ - PrefilterSpec *models.PrefilterSpec - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the patch prefilter params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchPrefilterParams) WithDefaults() *PatchPrefilterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the patch prefilter params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PatchPrefilterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the patch prefilter params -func (o *PatchPrefilterParams) WithTimeout(timeout time.Duration) *PatchPrefilterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the patch prefilter params -func (o *PatchPrefilterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the patch prefilter params -func (o *PatchPrefilterParams) WithContext(ctx context.Context) *PatchPrefilterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the patch prefilter params -func (o *PatchPrefilterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the patch prefilter params -func (o *PatchPrefilterParams) WithHTTPClient(client *http.Client) *PatchPrefilterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the patch prefilter params -func (o *PatchPrefilterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithPrefilterSpec adds the prefilterSpec to the patch prefilter params -func (o *PatchPrefilterParams) WithPrefilterSpec(prefilterSpec *models.PrefilterSpec) *PatchPrefilterParams { - o.SetPrefilterSpec(prefilterSpec) - return o -} - -// SetPrefilterSpec adds the prefilterSpec to the patch prefilter params -func (o *PatchPrefilterParams) SetPrefilterSpec(prefilterSpec *models.PrefilterSpec) { - o.PrefilterSpec = prefilterSpec -} - -// WriteToRequest writes these params to a swagger request -func (o *PatchPrefilterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.PrefilterSpec != nil { - if err := r.SetBodyParam(o.PrefilterSpec); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/patch_prefilter_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/prefilter/patch_prefilter_responses.go deleted file mode 100644 index 56db490a658..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/patch_prefilter_responses.go +++ /dev/null @@ -1,292 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package prefilter - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// PatchPrefilterReader is a Reader for the PatchPrefilter structure. -type PatchPrefilterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PatchPrefilterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPatchPrefilterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 403: - result := NewPatchPrefilterForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 461: - result := NewPatchPrefilterInvalidCIDR() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPatchPrefilterFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPatchPrefilterOK creates a PatchPrefilterOK with default headers values -func NewPatchPrefilterOK() *PatchPrefilterOK { - return &PatchPrefilterOK{} -} - -/* -PatchPrefilterOK describes a response with status code 200, with default header values. - -Updated -*/ -type PatchPrefilterOK struct { - Payload *models.Prefilter -} - -// IsSuccess returns true when this patch prefilter o k response has a 2xx status code -func (o *PatchPrefilterOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this patch prefilter o k response has a 3xx status code -func (o *PatchPrefilterOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch prefilter o k response has a 4xx status code -func (o *PatchPrefilterOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch prefilter o k response has a 5xx status code -func (o *PatchPrefilterOK) IsServerError() bool { - return false -} - -// IsCode returns true when this patch prefilter o k response a status code equal to that given -func (o *PatchPrefilterOK) IsCode(code int) bool { - return code == 200 -} - -func (o *PatchPrefilterOK) Error() string { - return fmt.Sprintf("[PATCH /prefilter][%d] patchPrefilterOK %+v", 200, o.Payload) -} - -func (o *PatchPrefilterOK) String() string { - return fmt.Sprintf("[PATCH /prefilter][%d] patchPrefilterOK %+v", 200, o.Payload) -} - -func (o *PatchPrefilterOK) GetPayload() *models.Prefilter { - return o.Payload -} - -func (o *PatchPrefilterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Prefilter) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPatchPrefilterForbidden creates a PatchPrefilterForbidden with default headers values -func NewPatchPrefilterForbidden() *PatchPrefilterForbidden { - return &PatchPrefilterForbidden{} -} - -/* -PatchPrefilterForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PatchPrefilterForbidden struct { -} - -// IsSuccess returns true when this patch prefilter forbidden response has a 2xx status code -func (o *PatchPrefilterForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch prefilter forbidden response has a 3xx status code -func (o *PatchPrefilterForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch prefilter forbidden response has a 4xx status code -func (o *PatchPrefilterForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch prefilter forbidden response has a 5xx status code -func (o *PatchPrefilterForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this patch prefilter forbidden response a status code equal to that given -func (o *PatchPrefilterForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PatchPrefilterForbidden) Error() string { - return fmt.Sprintf("[PATCH /prefilter][%d] patchPrefilterForbidden ", 403) -} - -func (o *PatchPrefilterForbidden) String() string { - return fmt.Sprintf("[PATCH /prefilter][%d] patchPrefilterForbidden ", 403) -} - -func (o *PatchPrefilterForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPatchPrefilterInvalidCIDR creates a PatchPrefilterInvalidCIDR with default headers values -func NewPatchPrefilterInvalidCIDR() *PatchPrefilterInvalidCIDR { - return &PatchPrefilterInvalidCIDR{} -} - -/* -PatchPrefilterInvalidCIDR describes a response with status code 461, with default header values. - -Invalid CIDR prefix -*/ -type PatchPrefilterInvalidCIDR struct { - Payload models.Error -} - -// IsSuccess returns true when this patch prefilter invalid c Id r response has a 2xx status code -func (o *PatchPrefilterInvalidCIDR) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch prefilter invalid c Id r response has a 3xx status code -func (o *PatchPrefilterInvalidCIDR) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch prefilter invalid c Id r response has a 4xx status code -func (o *PatchPrefilterInvalidCIDR) IsClientError() bool { - return true -} - -// IsServerError returns true when this patch prefilter invalid c Id r response has a 5xx status code -func (o *PatchPrefilterInvalidCIDR) IsServerError() bool { - return false -} - -// IsCode returns true when this patch prefilter invalid c Id r response a status code equal to that given -func (o *PatchPrefilterInvalidCIDR) IsCode(code int) bool { - return code == 461 -} - -func (o *PatchPrefilterInvalidCIDR) Error() string { - return fmt.Sprintf("[PATCH /prefilter][%d] patchPrefilterInvalidCIdR %+v", 461, o.Payload) -} - -func (o *PatchPrefilterInvalidCIDR) String() string { - return fmt.Sprintf("[PATCH /prefilter][%d] patchPrefilterInvalidCIdR %+v", 461, o.Payload) -} - -func (o *PatchPrefilterInvalidCIDR) GetPayload() models.Error { - return o.Payload -} - -func (o *PatchPrefilterInvalidCIDR) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPatchPrefilterFailure creates a PatchPrefilterFailure with default headers values -func NewPatchPrefilterFailure() *PatchPrefilterFailure { - return &PatchPrefilterFailure{} -} - -/* -PatchPrefilterFailure describes a response with status code 500, with default header values. - -Prefilter update failed -*/ -type PatchPrefilterFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this patch prefilter failure response has a 2xx status code -func (o *PatchPrefilterFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this patch prefilter failure response has a 3xx status code -func (o *PatchPrefilterFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this patch prefilter failure response has a 4xx status code -func (o *PatchPrefilterFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this patch prefilter failure response has a 5xx status code -func (o *PatchPrefilterFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this patch prefilter failure response a status code equal to that given -func (o *PatchPrefilterFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *PatchPrefilterFailure) Error() string { - return fmt.Sprintf("[PATCH /prefilter][%d] patchPrefilterFailure %+v", 500, o.Payload) -} - -func (o *PatchPrefilterFailure) String() string { - return fmt.Sprintf("[PATCH /prefilter][%d] patchPrefilterFailure %+v", 500, o.Payload) -} - -func (o *PatchPrefilterFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *PatchPrefilterFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/prefilter_client.go b/vendor/github.com/cilium/cilium/api/v1/client/prefilter/prefilter_client.go deleted file mode 100644 index c577a739a34..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/prefilter/prefilter_client.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package prefilter - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new prefilter API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for prefilter API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeletePrefilter(params *DeletePrefilterParams, opts ...ClientOption) (*DeletePrefilterOK, error) - - GetPrefilter(params *GetPrefilterParams, opts ...ClientOption) (*GetPrefilterOK, error) - - PatchPrefilter(params *PatchPrefilterParams, opts ...ClientOption) (*PatchPrefilterOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeletePrefilter deletes list of c ID rs -*/ -func (a *Client) DeletePrefilter(params *DeletePrefilterParams, opts ...ClientOption) (*DeletePrefilterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeletePrefilterParams() - } - op := &runtime.ClientOperation{ - ID: "DeletePrefilter", - Method: "DELETE", - PathPattern: "/prefilter", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeletePrefilterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeletePrefilterOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for DeletePrefilter: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetPrefilter retrieves list of c ID rs -*/ -func (a *Client) GetPrefilter(params *GetPrefilterParams, opts ...ClientOption) (*GetPrefilterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPrefilterParams() - } - op := &runtime.ClientOperation{ - ID: "GetPrefilter", - Method: "GET", - PathPattern: "/prefilter", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetPrefilterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetPrefilterOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetPrefilter: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -PatchPrefilter updates list of c ID rs -*/ -func (a *Client) PatchPrefilter(params *PatchPrefilterParams, opts ...ClientOption) (*PatchPrefilterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPatchPrefilterParams() - } - op := &runtime.ClientOperation{ - ID: "PatchPrefilter", - Method: "PATCH", - PathPattern: "/prefilter", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PatchPrefilterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PatchPrefilterOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for PatchPrefilter: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/recorder/delete_recorder_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/recorder/delete_recorder_id_parameters.go deleted file mode 100644 index 6a9a3f36236..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/recorder/delete_recorder_id_parameters.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package recorder - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewDeleteRecorderIDParams creates a new DeleteRecorderIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteRecorderIDParams() *DeleteRecorderIDParams { - return &DeleteRecorderIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteRecorderIDParamsWithTimeout creates a new DeleteRecorderIDParams object -// with the ability to set a timeout on a request. -func NewDeleteRecorderIDParamsWithTimeout(timeout time.Duration) *DeleteRecorderIDParams { - return &DeleteRecorderIDParams{ - timeout: timeout, - } -} - -// NewDeleteRecorderIDParamsWithContext creates a new DeleteRecorderIDParams object -// with the ability to set a context for a request. -func NewDeleteRecorderIDParamsWithContext(ctx context.Context) *DeleteRecorderIDParams { - return &DeleteRecorderIDParams{ - Context: ctx, - } -} - -// NewDeleteRecorderIDParamsWithHTTPClient creates a new DeleteRecorderIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteRecorderIDParamsWithHTTPClient(client *http.Client) *DeleteRecorderIDParams { - return &DeleteRecorderIDParams{ - HTTPClient: client, - } -} - -/* -DeleteRecorderIDParams contains all the parameters to send to the API endpoint - - for the delete recorder ID operation. - - Typically these are written to a http.Request. -*/ -type DeleteRecorderIDParams struct { - - /* ID. - - ID of recorder - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete recorder ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRecorderIDParams) WithDefaults() *DeleteRecorderIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete recorder ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteRecorderIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete recorder ID params -func (o *DeleteRecorderIDParams) WithTimeout(timeout time.Duration) *DeleteRecorderIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete recorder ID params -func (o *DeleteRecorderIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete recorder ID params -func (o *DeleteRecorderIDParams) WithContext(ctx context.Context) *DeleteRecorderIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete recorder ID params -func (o *DeleteRecorderIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete recorder ID params -func (o *DeleteRecorderIDParams) WithHTTPClient(client *http.Client) *DeleteRecorderIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete recorder ID params -func (o *DeleteRecorderIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete recorder ID params -func (o *DeleteRecorderIDParams) WithID(id int64) *DeleteRecorderIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete recorder ID params -func (o *DeleteRecorderIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteRecorderIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/recorder/delete_recorder_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/recorder/delete_recorder_id_responses.go deleted file mode 100644 index cf7ab77a239..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/recorder/delete_recorder_id_responses.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package recorder - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// DeleteRecorderIDReader is a Reader for the DeleteRecorderID structure. -type DeleteRecorderIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteRecorderIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteRecorderIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 403: - result := NewDeleteRecorderIDForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteRecorderIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeleteRecorderIDFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteRecorderIDOK creates a DeleteRecorderIDOK with default headers values -func NewDeleteRecorderIDOK() *DeleteRecorderIDOK { - return &DeleteRecorderIDOK{} -} - -/* -DeleteRecorderIDOK describes a response with status code 200, with default header values. - -Success -*/ -type DeleteRecorderIDOK struct { -} - -// IsSuccess returns true when this delete recorder Id o k response has a 2xx status code -func (o *DeleteRecorderIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete recorder Id o k response has a 3xx status code -func (o *DeleteRecorderIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete recorder Id o k response has a 4xx status code -func (o *DeleteRecorderIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete recorder Id o k response has a 5xx status code -func (o *DeleteRecorderIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete recorder Id o k response a status code equal to that given -func (o *DeleteRecorderIDOK) IsCode(code int) bool { - return code == 200 -} - -func (o *DeleteRecorderIDOK) Error() string { - return fmt.Sprintf("[DELETE /recorder/{id}][%d] deleteRecorderIdOK ", 200) -} - -func (o *DeleteRecorderIDOK) String() string { - return fmt.Sprintf("[DELETE /recorder/{id}][%d] deleteRecorderIdOK ", 200) -} - -func (o *DeleteRecorderIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteRecorderIDForbidden creates a DeleteRecorderIDForbidden with default headers values -func NewDeleteRecorderIDForbidden() *DeleteRecorderIDForbidden { - return &DeleteRecorderIDForbidden{} -} - -/* -DeleteRecorderIDForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeleteRecorderIDForbidden struct { -} - -// IsSuccess returns true when this delete recorder Id forbidden response has a 2xx status code -func (o *DeleteRecorderIDForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete recorder Id forbidden response has a 3xx status code -func (o *DeleteRecorderIDForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete recorder Id forbidden response has a 4xx status code -func (o *DeleteRecorderIDForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete recorder Id forbidden response has a 5xx status code -func (o *DeleteRecorderIDForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete recorder Id forbidden response a status code equal to that given -func (o *DeleteRecorderIDForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *DeleteRecorderIDForbidden) Error() string { - return fmt.Sprintf("[DELETE /recorder/{id}][%d] deleteRecorderIdForbidden ", 403) -} - -func (o *DeleteRecorderIDForbidden) String() string { - return fmt.Sprintf("[DELETE /recorder/{id}][%d] deleteRecorderIdForbidden ", 403) -} - -func (o *DeleteRecorderIDForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteRecorderIDNotFound creates a DeleteRecorderIDNotFound with default headers values -func NewDeleteRecorderIDNotFound() *DeleteRecorderIDNotFound { - return &DeleteRecorderIDNotFound{} -} - -/* -DeleteRecorderIDNotFound describes a response with status code 404, with default header values. - -Recorder not found -*/ -type DeleteRecorderIDNotFound struct { -} - -// IsSuccess returns true when this delete recorder Id not found response has a 2xx status code -func (o *DeleteRecorderIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete recorder Id not found response has a 3xx status code -func (o *DeleteRecorderIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete recorder Id not found response has a 4xx status code -func (o *DeleteRecorderIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete recorder Id not found response has a 5xx status code -func (o *DeleteRecorderIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete recorder Id not found response a status code equal to that given -func (o *DeleteRecorderIDNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *DeleteRecorderIDNotFound) Error() string { - return fmt.Sprintf("[DELETE /recorder/{id}][%d] deleteRecorderIdNotFound ", 404) -} - -func (o *DeleteRecorderIDNotFound) String() string { - return fmt.Sprintf("[DELETE /recorder/{id}][%d] deleteRecorderIdNotFound ", 404) -} - -func (o *DeleteRecorderIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteRecorderIDFailure creates a DeleteRecorderIDFailure with default headers values -func NewDeleteRecorderIDFailure() *DeleteRecorderIDFailure { - return &DeleteRecorderIDFailure{} -} - -/* -DeleteRecorderIDFailure describes a response with status code 500, with default header values. - -Recorder deletion failed -*/ -type DeleteRecorderIDFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this delete recorder Id failure response has a 2xx status code -func (o *DeleteRecorderIDFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete recorder Id failure response has a 3xx status code -func (o *DeleteRecorderIDFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete recorder Id failure response has a 4xx status code -func (o *DeleteRecorderIDFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete recorder Id failure response has a 5xx status code -func (o *DeleteRecorderIDFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this delete recorder Id failure response a status code equal to that given -func (o *DeleteRecorderIDFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *DeleteRecorderIDFailure) Error() string { - return fmt.Sprintf("[DELETE /recorder/{id}][%d] deleteRecorderIdFailure %+v", 500, o.Payload) -} - -func (o *DeleteRecorderIDFailure) String() string { - return fmt.Sprintf("[DELETE /recorder/{id}][%d] deleteRecorderIdFailure %+v", 500, o.Payload) -} - -func (o *DeleteRecorderIDFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *DeleteRecorderIDFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_id_parameters.go deleted file mode 100644 index 4aae52c7d6a..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_id_parameters.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package recorder - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetRecorderIDParams creates a new GetRecorderIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetRecorderIDParams() *GetRecorderIDParams { - return &GetRecorderIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRecorderIDParamsWithTimeout creates a new GetRecorderIDParams object -// with the ability to set a timeout on a request. -func NewGetRecorderIDParamsWithTimeout(timeout time.Duration) *GetRecorderIDParams { - return &GetRecorderIDParams{ - timeout: timeout, - } -} - -// NewGetRecorderIDParamsWithContext creates a new GetRecorderIDParams object -// with the ability to set a context for a request. -func NewGetRecorderIDParamsWithContext(ctx context.Context) *GetRecorderIDParams { - return &GetRecorderIDParams{ - Context: ctx, - } -} - -// NewGetRecorderIDParamsWithHTTPClient creates a new GetRecorderIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRecorderIDParamsWithHTTPClient(client *http.Client) *GetRecorderIDParams { - return &GetRecorderIDParams{ - HTTPClient: client, - } -} - -/* -GetRecorderIDParams contains all the parameters to send to the API endpoint - - for the get recorder ID operation. - - Typically these are written to a http.Request. -*/ -type GetRecorderIDParams struct { - - /* ID. - - ID of recorder - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get recorder ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecorderIDParams) WithDefaults() *GetRecorderIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get recorder ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecorderIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get recorder ID params -func (o *GetRecorderIDParams) WithTimeout(timeout time.Duration) *GetRecorderIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get recorder ID params -func (o *GetRecorderIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get recorder ID params -func (o *GetRecorderIDParams) WithContext(ctx context.Context) *GetRecorderIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get recorder ID params -func (o *GetRecorderIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get recorder ID params -func (o *GetRecorderIDParams) WithHTTPClient(client *http.Client) *GetRecorderIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get recorder ID params -func (o *GetRecorderIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get recorder ID params -func (o *GetRecorderIDParams) WithID(id int64) *GetRecorderIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get recorder ID params -func (o *GetRecorderIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRecorderIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_id_responses.go deleted file mode 100644 index 07f4e60cdcc..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_id_responses.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package recorder - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetRecorderIDReader is a Reader for the GetRecorderID structure. -type GetRecorderIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRecorderIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRecorderIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetRecorderIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetRecorderIDOK creates a GetRecorderIDOK with default headers values -func NewGetRecorderIDOK() *GetRecorderIDOK { - return &GetRecorderIDOK{} -} - -/* -GetRecorderIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRecorderIDOK struct { - Payload *models.Recorder -} - -// IsSuccess returns true when this get recorder Id o k response has a 2xx status code -func (o *GetRecorderIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get recorder Id o k response has a 3xx status code -func (o *GetRecorderIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get recorder Id o k response has a 4xx status code -func (o *GetRecorderIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get recorder Id o k response has a 5xx status code -func (o *GetRecorderIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get recorder Id o k response a status code equal to that given -func (o *GetRecorderIDOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetRecorderIDOK) Error() string { - return fmt.Sprintf("[GET /recorder/{id}][%d] getRecorderIdOK %+v", 200, o.Payload) -} - -func (o *GetRecorderIDOK) String() string { - return fmt.Sprintf("[GET /recorder/{id}][%d] getRecorderIdOK %+v", 200, o.Payload) -} - -func (o *GetRecorderIDOK) GetPayload() *models.Recorder { - return o.Payload -} - -func (o *GetRecorderIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Recorder) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRecorderIDNotFound creates a GetRecorderIDNotFound with default headers values -func NewGetRecorderIDNotFound() *GetRecorderIDNotFound { - return &GetRecorderIDNotFound{} -} - -/* -GetRecorderIDNotFound describes a response with status code 404, with default header values. - -Recorder not found -*/ -type GetRecorderIDNotFound struct { -} - -// IsSuccess returns true when this get recorder Id not found response has a 2xx status code -func (o *GetRecorderIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get recorder Id not found response has a 3xx status code -func (o *GetRecorderIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get recorder Id not found response has a 4xx status code -func (o *GetRecorderIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get recorder Id not found response has a 5xx status code -func (o *GetRecorderIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get recorder Id not found response a status code equal to that given -func (o *GetRecorderIDNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetRecorderIDNotFound) Error() string { - return fmt.Sprintf("[GET /recorder/{id}][%d] getRecorderIdNotFound ", 404) -} - -func (o *GetRecorderIDNotFound) String() string { - return fmt.Sprintf("[GET /recorder/{id}][%d] getRecorderIdNotFound ", 404) -} - -func (o *GetRecorderIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_masks_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_masks_parameters.go deleted file mode 100644 index 4dd487344e8..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_masks_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package recorder - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetRecorderMasksParams creates a new GetRecorderMasksParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetRecorderMasksParams() *GetRecorderMasksParams { - return &GetRecorderMasksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRecorderMasksParamsWithTimeout creates a new GetRecorderMasksParams object -// with the ability to set a timeout on a request. -func NewGetRecorderMasksParamsWithTimeout(timeout time.Duration) *GetRecorderMasksParams { - return &GetRecorderMasksParams{ - timeout: timeout, - } -} - -// NewGetRecorderMasksParamsWithContext creates a new GetRecorderMasksParams object -// with the ability to set a context for a request. -func NewGetRecorderMasksParamsWithContext(ctx context.Context) *GetRecorderMasksParams { - return &GetRecorderMasksParams{ - Context: ctx, - } -} - -// NewGetRecorderMasksParamsWithHTTPClient creates a new GetRecorderMasksParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRecorderMasksParamsWithHTTPClient(client *http.Client) *GetRecorderMasksParams { - return &GetRecorderMasksParams{ - HTTPClient: client, - } -} - -/* -GetRecorderMasksParams contains all the parameters to send to the API endpoint - - for the get recorder masks operation. - - Typically these are written to a http.Request. -*/ -type GetRecorderMasksParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get recorder masks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecorderMasksParams) WithDefaults() *GetRecorderMasksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get recorder masks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecorderMasksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get recorder masks params -func (o *GetRecorderMasksParams) WithTimeout(timeout time.Duration) *GetRecorderMasksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get recorder masks params -func (o *GetRecorderMasksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get recorder masks params -func (o *GetRecorderMasksParams) WithContext(ctx context.Context) *GetRecorderMasksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get recorder masks params -func (o *GetRecorderMasksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get recorder masks params -func (o *GetRecorderMasksParams) WithHTTPClient(client *http.Client) *GetRecorderMasksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get recorder masks params -func (o *GetRecorderMasksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRecorderMasksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_masks_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_masks_responses.go deleted file mode 100644 index 06b8555968a..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_masks_responses.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package recorder - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetRecorderMasksReader is a Reader for the GetRecorderMasks structure. -type GetRecorderMasksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRecorderMasksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRecorderMasksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetRecorderMasksOK creates a GetRecorderMasksOK with default headers values -func NewGetRecorderMasksOK() *GetRecorderMasksOK { - return &GetRecorderMasksOK{} -} - -/* -GetRecorderMasksOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRecorderMasksOK struct { - Payload []*models.RecorderMask -} - -// IsSuccess returns true when this get recorder masks o k response has a 2xx status code -func (o *GetRecorderMasksOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get recorder masks o k response has a 3xx status code -func (o *GetRecorderMasksOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get recorder masks o k response has a 4xx status code -func (o *GetRecorderMasksOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get recorder masks o k response has a 5xx status code -func (o *GetRecorderMasksOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get recorder masks o k response a status code equal to that given -func (o *GetRecorderMasksOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetRecorderMasksOK) Error() string { - return fmt.Sprintf("[GET /recorder/masks][%d] getRecorderMasksOK %+v", 200, o.Payload) -} - -func (o *GetRecorderMasksOK) String() string { - return fmt.Sprintf("[GET /recorder/masks][%d] getRecorderMasksOK %+v", 200, o.Payload) -} - -func (o *GetRecorderMasksOK) GetPayload() []*models.RecorderMask { - return o.Payload -} - -func (o *GetRecorderMasksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_parameters.go deleted file mode 100644 index d7ff113b299..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package recorder - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetRecorderParams creates a new GetRecorderParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetRecorderParams() *GetRecorderParams { - return &GetRecorderParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetRecorderParamsWithTimeout creates a new GetRecorderParams object -// with the ability to set a timeout on a request. -func NewGetRecorderParamsWithTimeout(timeout time.Duration) *GetRecorderParams { - return &GetRecorderParams{ - timeout: timeout, - } -} - -// NewGetRecorderParamsWithContext creates a new GetRecorderParams object -// with the ability to set a context for a request. -func NewGetRecorderParamsWithContext(ctx context.Context) *GetRecorderParams { - return &GetRecorderParams{ - Context: ctx, - } -} - -// NewGetRecorderParamsWithHTTPClient creates a new GetRecorderParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetRecorderParamsWithHTTPClient(client *http.Client) *GetRecorderParams { - return &GetRecorderParams{ - HTTPClient: client, - } -} - -/* -GetRecorderParams contains all the parameters to send to the API endpoint - - for the get recorder operation. - - Typically these are written to a http.Request. -*/ -type GetRecorderParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get recorder params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecorderParams) WithDefaults() *GetRecorderParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get recorder params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetRecorderParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get recorder params -func (o *GetRecorderParams) WithTimeout(timeout time.Duration) *GetRecorderParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get recorder params -func (o *GetRecorderParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get recorder params -func (o *GetRecorderParams) WithContext(ctx context.Context) *GetRecorderParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get recorder params -func (o *GetRecorderParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get recorder params -func (o *GetRecorderParams) WithHTTPClient(client *http.Client) *GetRecorderParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get recorder params -func (o *GetRecorderParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRecorderParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_responses.go deleted file mode 100644 index f45762c3087..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/recorder/get_recorder_responses.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package recorder - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetRecorderReader is a Reader for the GetRecorder structure. -type GetRecorderReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRecorderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetRecorderOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetRecorderOK creates a GetRecorderOK with default headers values -func NewGetRecorderOK() *GetRecorderOK { - return &GetRecorderOK{} -} - -/* -GetRecorderOK describes a response with status code 200, with default header values. - -Success -*/ -type GetRecorderOK struct { - Payload []*models.Recorder -} - -// IsSuccess returns true when this get recorder o k response has a 2xx status code -func (o *GetRecorderOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get recorder o k response has a 3xx status code -func (o *GetRecorderOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get recorder o k response has a 4xx status code -func (o *GetRecorderOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get recorder o k response has a 5xx status code -func (o *GetRecorderOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get recorder o k response a status code equal to that given -func (o *GetRecorderOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetRecorderOK) Error() string { - return fmt.Sprintf("[GET /recorder][%d] getRecorderOK %+v", 200, o.Payload) -} - -func (o *GetRecorderOK) String() string { - return fmt.Sprintf("[GET /recorder][%d] getRecorderOK %+v", 200, o.Payload) -} - -func (o *GetRecorderOK) GetPayload() []*models.Recorder { - return o.Payload -} - -func (o *GetRecorderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/recorder/put_recorder_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/recorder/put_recorder_id_parameters.go deleted file mode 100644 index 3515d3c76de..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/recorder/put_recorder_id_parameters.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package recorder - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewPutRecorderIDParams creates a new PutRecorderIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPutRecorderIDParams() *PutRecorderIDParams { - return &PutRecorderIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPutRecorderIDParamsWithTimeout creates a new PutRecorderIDParams object -// with the ability to set a timeout on a request. -func NewPutRecorderIDParamsWithTimeout(timeout time.Duration) *PutRecorderIDParams { - return &PutRecorderIDParams{ - timeout: timeout, - } -} - -// NewPutRecorderIDParamsWithContext creates a new PutRecorderIDParams object -// with the ability to set a context for a request. -func NewPutRecorderIDParamsWithContext(ctx context.Context) *PutRecorderIDParams { - return &PutRecorderIDParams{ - Context: ctx, - } -} - -// NewPutRecorderIDParamsWithHTTPClient creates a new PutRecorderIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewPutRecorderIDParamsWithHTTPClient(client *http.Client) *PutRecorderIDParams { - return &PutRecorderIDParams{ - HTTPClient: client, - } -} - -/* -PutRecorderIDParams contains all the parameters to send to the API endpoint - - for the put recorder ID operation. - - Typically these are written to a http.Request. -*/ -type PutRecorderIDParams struct { - - /* Config. - - Recorder configuration - */ - Config *models.RecorderSpec - - /* ID. - - ID of recorder - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the put recorder ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutRecorderIDParams) WithDefaults() *PutRecorderIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the put recorder ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutRecorderIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the put recorder ID params -func (o *PutRecorderIDParams) WithTimeout(timeout time.Duration) *PutRecorderIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the put recorder ID params -func (o *PutRecorderIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the put recorder ID params -func (o *PutRecorderIDParams) WithContext(ctx context.Context) *PutRecorderIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the put recorder ID params -func (o *PutRecorderIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the put recorder ID params -func (o *PutRecorderIDParams) WithHTTPClient(client *http.Client) *PutRecorderIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the put recorder ID params -func (o *PutRecorderIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithConfig adds the config to the put recorder ID params -func (o *PutRecorderIDParams) WithConfig(config *models.RecorderSpec) *PutRecorderIDParams { - o.SetConfig(config) - return o -} - -// SetConfig adds the config to the put recorder ID params -func (o *PutRecorderIDParams) SetConfig(config *models.RecorderSpec) { - o.Config = config -} - -// WithID adds the id to the put recorder ID params -func (o *PutRecorderIDParams) WithID(id int64) *PutRecorderIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the put recorder ID params -func (o *PutRecorderIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PutRecorderIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Config != nil { - if err := r.SetBodyParam(o.Config); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/recorder/put_recorder_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/recorder/put_recorder_id_responses.go deleted file mode 100644 index 996c87026d8..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/recorder/put_recorder_id_responses.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package recorder - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// PutRecorderIDReader is a Reader for the PutRecorderID structure. -type PutRecorderIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PutRecorderIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPutRecorderIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 201: - result := NewPutRecorderIDCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 403: - result := NewPutRecorderIDForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPutRecorderIDFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPutRecorderIDOK creates a PutRecorderIDOK with default headers values -func NewPutRecorderIDOK() *PutRecorderIDOK { - return &PutRecorderIDOK{} -} - -/* -PutRecorderIDOK describes a response with status code 200, with default header values. - -Updated -*/ -type PutRecorderIDOK struct { -} - -// IsSuccess returns true when this put recorder Id o k response has a 2xx status code -func (o *PutRecorderIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this put recorder Id o k response has a 3xx status code -func (o *PutRecorderIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put recorder Id o k response has a 4xx status code -func (o *PutRecorderIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this put recorder Id o k response has a 5xx status code -func (o *PutRecorderIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this put recorder Id o k response a status code equal to that given -func (o *PutRecorderIDOK) IsCode(code int) bool { - return code == 200 -} - -func (o *PutRecorderIDOK) Error() string { - return fmt.Sprintf("[PUT /recorder/{id}][%d] putRecorderIdOK ", 200) -} - -func (o *PutRecorderIDOK) String() string { - return fmt.Sprintf("[PUT /recorder/{id}][%d] putRecorderIdOK ", 200) -} - -func (o *PutRecorderIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutRecorderIDCreated creates a PutRecorderIDCreated with default headers values -func NewPutRecorderIDCreated() *PutRecorderIDCreated { - return &PutRecorderIDCreated{} -} - -/* -PutRecorderIDCreated describes a response with status code 201, with default header values. - -Created -*/ -type PutRecorderIDCreated struct { -} - -// IsSuccess returns true when this put recorder Id created response has a 2xx status code -func (o *PutRecorderIDCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this put recorder Id created response has a 3xx status code -func (o *PutRecorderIDCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put recorder Id created response has a 4xx status code -func (o *PutRecorderIDCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this put recorder Id created response has a 5xx status code -func (o *PutRecorderIDCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this put recorder Id created response a status code equal to that given -func (o *PutRecorderIDCreated) IsCode(code int) bool { - return code == 201 -} - -func (o *PutRecorderIDCreated) Error() string { - return fmt.Sprintf("[PUT /recorder/{id}][%d] putRecorderIdCreated ", 201) -} - -func (o *PutRecorderIDCreated) String() string { - return fmt.Sprintf("[PUT /recorder/{id}][%d] putRecorderIdCreated ", 201) -} - -func (o *PutRecorderIDCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutRecorderIDForbidden creates a PutRecorderIDForbidden with default headers values -func NewPutRecorderIDForbidden() *PutRecorderIDForbidden { - return &PutRecorderIDForbidden{} -} - -/* -PutRecorderIDForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PutRecorderIDForbidden struct { -} - -// IsSuccess returns true when this put recorder Id forbidden response has a 2xx status code -func (o *PutRecorderIDForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put recorder Id forbidden response has a 3xx status code -func (o *PutRecorderIDForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put recorder Id forbidden response has a 4xx status code -func (o *PutRecorderIDForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this put recorder Id forbidden response has a 5xx status code -func (o *PutRecorderIDForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this put recorder Id forbidden response a status code equal to that given -func (o *PutRecorderIDForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PutRecorderIDForbidden) Error() string { - return fmt.Sprintf("[PUT /recorder/{id}][%d] putRecorderIdForbidden ", 403) -} - -func (o *PutRecorderIDForbidden) String() string { - return fmt.Sprintf("[PUT /recorder/{id}][%d] putRecorderIdForbidden ", 403) -} - -func (o *PutRecorderIDForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutRecorderIDFailure creates a PutRecorderIDFailure with default headers values -func NewPutRecorderIDFailure() *PutRecorderIDFailure { - return &PutRecorderIDFailure{} -} - -/* -PutRecorderIDFailure describes a response with status code 500, with default header values. - -Error while creating recorder -*/ -type PutRecorderIDFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this put recorder Id failure response has a 2xx status code -func (o *PutRecorderIDFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put recorder Id failure response has a 3xx status code -func (o *PutRecorderIDFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put recorder Id failure response has a 4xx status code -func (o *PutRecorderIDFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this put recorder Id failure response has a 5xx status code -func (o *PutRecorderIDFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this put recorder Id failure response a status code equal to that given -func (o *PutRecorderIDFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *PutRecorderIDFailure) Error() string { - return fmt.Sprintf("[PUT /recorder/{id}][%d] putRecorderIdFailure %+v", 500, o.Payload) -} - -func (o *PutRecorderIDFailure) String() string { - return fmt.Sprintf("[PUT /recorder/{id}][%d] putRecorderIdFailure %+v", 500, o.Payload) -} - -func (o *PutRecorderIDFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *PutRecorderIDFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/recorder/recorder_client.go b/vendor/github.com/cilium/cilium/api/v1/client/recorder/recorder_client.go deleted file mode 100644 index 883e304be3a..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/recorder/recorder_client.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package recorder - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new recorder API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for recorder API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeleteRecorderID(params *DeleteRecorderIDParams, opts ...ClientOption) (*DeleteRecorderIDOK, error) - - GetRecorder(params *GetRecorderParams, opts ...ClientOption) (*GetRecorderOK, error) - - GetRecorderID(params *GetRecorderIDParams, opts ...ClientOption) (*GetRecorderIDOK, error) - - GetRecorderMasks(params *GetRecorderMasksParams, opts ...ClientOption) (*GetRecorderMasksOK, error) - - PutRecorderID(params *PutRecorderIDParams, opts ...ClientOption) (*PutRecorderIDOK, *PutRecorderIDCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeleteRecorderID deletes a recorder -*/ -func (a *Client) DeleteRecorderID(params *DeleteRecorderIDParams, opts ...ClientOption) (*DeleteRecorderIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteRecorderIDParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteRecorderID", - Method: "DELETE", - PathPattern: "/recorder/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteRecorderIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteRecorderIDOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for DeleteRecorderID: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetRecorder retrieves list of all recorders -*/ -func (a *Client) GetRecorder(params *GetRecorderParams, opts ...ClientOption) (*GetRecorderOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRecorderParams() - } - op := &runtime.ClientOperation{ - ID: "GetRecorder", - Method: "GET", - PathPattern: "/recorder", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetRecorderReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetRecorderOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetRecorder: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetRecorderID retrieves configuration of a recorder -*/ -func (a *Client) GetRecorderID(params *GetRecorderIDParams, opts ...ClientOption) (*GetRecorderIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRecorderIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetRecorderID", - Method: "GET", - PathPattern: "/recorder/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetRecorderIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetRecorderIDOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetRecorderID: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetRecorderMasks retrieves list of all recorder masks -*/ -func (a *Client) GetRecorderMasks(params *GetRecorderMasksParams, opts ...ClientOption) (*GetRecorderMasksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetRecorderMasksParams() - } - op := &runtime.ClientOperation{ - ID: "GetRecorderMasks", - Method: "GET", - PathPattern: "/recorder/masks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetRecorderMasksReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetRecorderMasksOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetRecorderMasks: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -PutRecorderID creates or update recorder -*/ -func (a *Client) PutRecorderID(params *PutRecorderIDParams, opts ...ClientOption) (*PutRecorderIDOK, *PutRecorderIDCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPutRecorderIDParams() - } - op := &runtime.ClientOperation{ - ID: "PutRecorderID", - Method: "PUT", - PathPattern: "/recorder/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PutRecorderIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, nil, err - } - switch value := result.(type) { - case *PutRecorderIDOK: - return value, nil, nil - case *PutRecorderIDCreated: - return nil, value, nil - } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for recorder: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/service/delete_service_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/service/delete_service_id_parameters.go deleted file mode 100644 index a464423c886..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/service/delete_service_id_parameters.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewDeleteServiceIDParams creates a new DeleteServiceIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteServiceIDParams() *DeleteServiceIDParams { - return &DeleteServiceIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteServiceIDParamsWithTimeout creates a new DeleteServiceIDParams object -// with the ability to set a timeout on a request. -func NewDeleteServiceIDParamsWithTimeout(timeout time.Duration) *DeleteServiceIDParams { - return &DeleteServiceIDParams{ - timeout: timeout, - } -} - -// NewDeleteServiceIDParamsWithContext creates a new DeleteServiceIDParams object -// with the ability to set a context for a request. -func NewDeleteServiceIDParamsWithContext(ctx context.Context) *DeleteServiceIDParams { - return &DeleteServiceIDParams{ - Context: ctx, - } -} - -// NewDeleteServiceIDParamsWithHTTPClient creates a new DeleteServiceIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteServiceIDParamsWithHTTPClient(client *http.Client) *DeleteServiceIDParams { - return &DeleteServiceIDParams{ - HTTPClient: client, - } -} - -/* -DeleteServiceIDParams contains all the parameters to send to the API endpoint - - for the delete service ID operation. - - Typically these are written to a http.Request. -*/ -type DeleteServiceIDParams struct { - - /* ID. - - ID of service - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete service ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteServiceIDParams) WithDefaults() *DeleteServiceIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete service ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteServiceIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete service ID params -func (o *DeleteServiceIDParams) WithTimeout(timeout time.Duration) *DeleteServiceIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete service ID params -func (o *DeleteServiceIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete service ID params -func (o *DeleteServiceIDParams) WithContext(ctx context.Context) *DeleteServiceIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete service ID params -func (o *DeleteServiceIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete service ID params -func (o *DeleteServiceIDParams) WithHTTPClient(client *http.Client) *DeleteServiceIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete service ID params -func (o *DeleteServiceIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete service ID params -func (o *DeleteServiceIDParams) WithID(id int64) *DeleteServiceIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete service ID params -func (o *DeleteServiceIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteServiceIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/service/delete_service_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/service/delete_service_id_responses.go deleted file mode 100644 index 21926d9c478..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/service/delete_service_id_responses.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// DeleteServiceIDReader is a Reader for the DeleteServiceID structure. -type DeleteServiceIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteServiceIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteServiceIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 403: - result := NewDeleteServiceIDForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteServiceIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeleteServiceIDFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewDeleteServiceIDOK creates a DeleteServiceIDOK with default headers values -func NewDeleteServiceIDOK() *DeleteServiceIDOK { - return &DeleteServiceIDOK{} -} - -/* -DeleteServiceIDOK describes a response with status code 200, with default header values. - -Success -*/ -type DeleteServiceIDOK struct { -} - -// IsSuccess returns true when this delete service Id o k response has a 2xx status code -func (o *DeleteServiceIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete service Id o k response has a 3xx status code -func (o *DeleteServiceIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete service Id o k response has a 4xx status code -func (o *DeleteServiceIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete service Id o k response has a 5xx status code -func (o *DeleteServiceIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete service Id o k response a status code equal to that given -func (o *DeleteServiceIDOK) IsCode(code int) bool { - return code == 200 -} - -func (o *DeleteServiceIDOK) Error() string { - return fmt.Sprintf("[DELETE /service/{id}][%d] deleteServiceIdOK ", 200) -} - -func (o *DeleteServiceIDOK) String() string { - return fmt.Sprintf("[DELETE /service/{id}][%d] deleteServiceIdOK ", 200) -} - -func (o *DeleteServiceIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteServiceIDForbidden creates a DeleteServiceIDForbidden with default headers values -func NewDeleteServiceIDForbidden() *DeleteServiceIDForbidden { - return &DeleteServiceIDForbidden{} -} - -/* -DeleteServiceIDForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type DeleteServiceIDForbidden struct { -} - -// IsSuccess returns true when this delete service Id forbidden response has a 2xx status code -func (o *DeleteServiceIDForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete service Id forbidden response has a 3xx status code -func (o *DeleteServiceIDForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete service Id forbidden response has a 4xx status code -func (o *DeleteServiceIDForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete service Id forbidden response has a 5xx status code -func (o *DeleteServiceIDForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this delete service Id forbidden response a status code equal to that given -func (o *DeleteServiceIDForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *DeleteServiceIDForbidden) Error() string { - return fmt.Sprintf("[DELETE /service/{id}][%d] deleteServiceIdForbidden ", 403) -} - -func (o *DeleteServiceIDForbidden) String() string { - return fmt.Sprintf("[DELETE /service/{id}][%d] deleteServiceIdForbidden ", 403) -} - -func (o *DeleteServiceIDForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteServiceIDNotFound creates a DeleteServiceIDNotFound with default headers values -func NewDeleteServiceIDNotFound() *DeleteServiceIDNotFound { - return &DeleteServiceIDNotFound{} -} - -/* -DeleteServiceIDNotFound describes a response with status code 404, with default header values. - -Service not found -*/ -type DeleteServiceIDNotFound struct { -} - -// IsSuccess returns true when this delete service Id not found response has a 2xx status code -func (o *DeleteServiceIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete service Id not found response has a 3xx status code -func (o *DeleteServiceIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete service Id not found response has a 4xx status code -func (o *DeleteServiceIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete service Id not found response has a 5xx status code -func (o *DeleteServiceIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete service Id not found response a status code equal to that given -func (o *DeleteServiceIDNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *DeleteServiceIDNotFound) Error() string { - return fmt.Sprintf("[DELETE /service/{id}][%d] deleteServiceIdNotFound ", 404) -} - -func (o *DeleteServiceIDNotFound) String() string { - return fmt.Sprintf("[DELETE /service/{id}][%d] deleteServiceIdNotFound ", 404) -} - -func (o *DeleteServiceIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteServiceIDFailure creates a DeleteServiceIDFailure with default headers values -func NewDeleteServiceIDFailure() *DeleteServiceIDFailure { - return &DeleteServiceIDFailure{} -} - -/* -DeleteServiceIDFailure describes a response with status code 500, with default header values. - -Service deletion failed -*/ -type DeleteServiceIDFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this delete service Id failure response has a 2xx status code -func (o *DeleteServiceIDFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete service Id failure response has a 3xx status code -func (o *DeleteServiceIDFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete service Id failure response has a 4xx status code -func (o *DeleteServiceIDFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete service Id failure response has a 5xx status code -func (o *DeleteServiceIDFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this delete service Id failure response a status code equal to that given -func (o *DeleteServiceIDFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *DeleteServiceIDFailure) Error() string { - return fmt.Sprintf("[DELETE /service/{id}][%d] deleteServiceIdFailure %+v", 500, o.Payload) -} - -func (o *DeleteServiceIDFailure) String() string { - return fmt.Sprintf("[DELETE /service/{id}][%d] deleteServiceIdFailure %+v", 500, o.Payload) -} - -func (o *DeleteServiceIDFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *DeleteServiceIDFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/service/get_lrp_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/service/get_lrp_parameters.go deleted file mode 100644 index beb277ecd1f..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/service/get_lrp_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetLrpParams creates a new GetLrpParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetLrpParams() *GetLrpParams { - return &GetLrpParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetLrpParamsWithTimeout creates a new GetLrpParams object -// with the ability to set a timeout on a request. -func NewGetLrpParamsWithTimeout(timeout time.Duration) *GetLrpParams { - return &GetLrpParams{ - timeout: timeout, - } -} - -// NewGetLrpParamsWithContext creates a new GetLrpParams object -// with the ability to set a context for a request. -func NewGetLrpParamsWithContext(ctx context.Context) *GetLrpParams { - return &GetLrpParams{ - Context: ctx, - } -} - -// NewGetLrpParamsWithHTTPClient creates a new GetLrpParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetLrpParamsWithHTTPClient(client *http.Client) *GetLrpParams { - return &GetLrpParams{ - HTTPClient: client, - } -} - -/* -GetLrpParams contains all the parameters to send to the API endpoint - - for the get lrp operation. - - Typically these are written to a http.Request. -*/ -type GetLrpParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get lrp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLrpParams) WithDefaults() *GetLrpParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get lrp params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLrpParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get lrp params -func (o *GetLrpParams) WithTimeout(timeout time.Duration) *GetLrpParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get lrp params -func (o *GetLrpParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get lrp params -func (o *GetLrpParams) WithContext(ctx context.Context) *GetLrpParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get lrp params -func (o *GetLrpParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get lrp params -func (o *GetLrpParams) WithHTTPClient(client *http.Client) *GetLrpParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get lrp params -func (o *GetLrpParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetLrpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/service/get_lrp_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/service/get_lrp_responses.go deleted file mode 100644 index ac5974ce51f..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/service/get_lrp_responses.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetLrpReader is a Reader for the GetLrp structure. -type GetLrpReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetLrpReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetLrpOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetLrpOK creates a GetLrpOK with default headers values -func NewGetLrpOK() *GetLrpOK { - return &GetLrpOK{} -} - -/* -GetLrpOK describes a response with status code 200, with default header values. - -Success -*/ -type GetLrpOK struct { - Payload []*models.LRPSpec -} - -// IsSuccess returns true when this get lrp o k response has a 2xx status code -func (o *GetLrpOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get lrp o k response has a 3xx status code -func (o *GetLrpOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get lrp o k response has a 4xx status code -func (o *GetLrpOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get lrp o k response has a 5xx status code -func (o *GetLrpOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get lrp o k response a status code equal to that given -func (o *GetLrpOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetLrpOK) Error() string { - return fmt.Sprintf("[GET /lrp][%d] getLrpOK %+v", 200, o.Payload) -} - -func (o *GetLrpOK) String() string { - return fmt.Sprintf("[GET /lrp][%d] getLrpOK %+v", 200, o.Payload) -} - -func (o *GetLrpOK) GetPayload() []*models.LRPSpec { - return o.Payload -} - -func (o *GetLrpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_id_parameters.go deleted file mode 100644 index dac152aae70..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_id_parameters.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetServiceIDParams creates a new GetServiceIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetServiceIDParams() *GetServiceIDParams { - return &GetServiceIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetServiceIDParamsWithTimeout creates a new GetServiceIDParams object -// with the ability to set a timeout on a request. -func NewGetServiceIDParamsWithTimeout(timeout time.Duration) *GetServiceIDParams { - return &GetServiceIDParams{ - timeout: timeout, - } -} - -// NewGetServiceIDParamsWithContext creates a new GetServiceIDParams object -// with the ability to set a context for a request. -func NewGetServiceIDParamsWithContext(ctx context.Context) *GetServiceIDParams { - return &GetServiceIDParams{ - Context: ctx, - } -} - -// NewGetServiceIDParamsWithHTTPClient creates a new GetServiceIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetServiceIDParamsWithHTTPClient(client *http.Client) *GetServiceIDParams { - return &GetServiceIDParams{ - HTTPClient: client, - } -} - -/* -GetServiceIDParams contains all the parameters to send to the API endpoint - - for the get service ID operation. - - Typically these are written to a http.Request. -*/ -type GetServiceIDParams struct { - - /* ID. - - ID of service - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get service ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetServiceIDParams) WithDefaults() *GetServiceIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get service ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetServiceIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get service ID params -func (o *GetServiceIDParams) WithTimeout(timeout time.Duration) *GetServiceIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get service ID params -func (o *GetServiceIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get service ID params -func (o *GetServiceIDParams) WithContext(ctx context.Context) *GetServiceIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get service ID params -func (o *GetServiceIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get service ID params -func (o *GetServiceIDParams) WithHTTPClient(client *http.Client) *GetServiceIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get service ID params -func (o *GetServiceIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get service ID params -func (o *GetServiceIDParams) WithID(id int64) *GetServiceIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get service ID params -func (o *GetServiceIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetServiceIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_id_responses.go deleted file mode 100644 index 4b198ced9d4..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_id_responses.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetServiceIDReader is a Reader for the GetServiceID structure. -type GetServiceIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetServiceIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetServiceIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewGetServiceIDNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetServiceIDOK creates a GetServiceIDOK with default headers values -func NewGetServiceIDOK() *GetServiceIDOK { - return &GetServiceIDOK{} -} - -/* -GetServiceIDOK describes a response with status code 200, with default header values. - -Success -*/ -type GetServiceIDOK struct { - Payload *models.Service -} - -// IsSuccess returns true when this get service Id o k response has a 2xx status code -func (o *GetServiceIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get service Id o k response has a 3xx status code -func (o *GetServiceIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get service Id o k response has a 4xx status code -func (o *GetServiceIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get service Id o k response has a 5xx status code -func (o *GetServiceIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get service Id o k response a status code equal to that given -func (o *GetServiceIDOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetServiceIDOK) Error() string { - return fmt.Sprintf("[GET /service/{id}][%d] getServiceIdOK %+v", 200, o.Payload) -} - -func (o *GetServiceIDOK) String() string { - return fmt.Sprintf("[GET /service/{id}][%d] getServiceIdOK %+v", 200, o.Payload) -} - -func (o *GetServiceIDOK) GetPayload() *models.Service { - return o.Payload -} - -func (o *GetServiceIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Service) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetServiceIDNotFound creates a GetServiceIDNotFound with default headers values -func NewGetServiceIDNotFound() *GetServiceIDNotFound { - return &GetServiceIDNotFound{} -} - -/* -GetServiceIDNotFound describes a response with status code 404, with default header values. - -Service not found -*/ -type GetServiceIDNotFound struct { -} - -// IsSuccess returns true when this get service Id not found response has a 2xx status code -func (o *GetServiceIDNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get service Id not found response has a 3xx status code -func (o *GetServiceIDNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get service Id not found response has a 4xx status code -func (o *GetServiceIDNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get service Id not found response has a 5xx status code -func (o *GetServiceIDNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get service Id not found response a status code equal to that given -func (o *GetServiceIDNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetServiceIDNotFound) Error() string { - return fmt.Sprintf("[GET /service/{id}][%d] getServiceIdNotFound ", 404) -} - -func (o *GetServiceIDNotFound) String() string { - return fmt.Sprintf("[GET /service/{id}][%d] getServiceIdNotFound ", 404) -} - -func (o *GetServiceIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_parameters.go deleted file mode 100644 index ff7dfcb846d..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetServiceParams creates a new GetServiceParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetServiceParams() *GetServiceParams { - return &GetServiceParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetServiceParamsWithTimeout creates a new GetServiceParams object -// with the ability to set a timeout on a request. -func NewGetServiceParamsWithTimeout(timeout time.Duration) *GetServiceParams { - return &GetServiceParams{ - timeout: timeout, - } -} - -// NewGetServiceParamsWithContext creates a new GetServiceParams object -// with the ability to set a context for a request. -func NewGetServiceParamsWithContext(ctx context.Context) *GetServiceParams { - return &GetServiceParams{ - Context: ctx, - } -} - -// NewGetServiceParamsWithHTTPClient creates a new GetServiceParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetServiceParamsWithHTTPClient(client *http.Client) *GetServiceParams { - return &GetServiceParams{ - HTTPClient: client, - } -} - -/* -GetServiceParams contains all the parameters to send to the API endpoint - - for the get service operation. - - Typically these are written to a http.Request. -*/ -type GetServiceParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get service params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetServiceParams) WithDefaults() *GetServiceParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get service params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetServiceParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get service params -func (o *GetServiceParams) WithTimeout(timeout time.Duration) *GetServiceParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get service params -func (o *GetServiceParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get service params -func (o *GetServiceParams) WithContext(ctx context.Context) *GetServiceParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get service params -func (o *GetServiceParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get service params -func (o *GetServiceParams) WithHTTPClient(client *http.Client) *GetServiceParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get service params -func (o *GetServiceParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_responses.go deleted file mode 100644 index dbf75ba847d..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/service/get_service_responses.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetServiceReader is a Reader for the GetService structure. -type GetServiceReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetServiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetServiceOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetServiceOK creates a GetServiceOK with default headers values -func NewGetServiceOK() *GetServiceOK { - return &GetServiceOK{} -} - -/* -GetServiceOK describes a response with status code 200, with default header values. - -Success -*/ -type GetServiceOK struct { - Payload []*models.Service -} - -// IsSuccess returns true when this get service o k response has a 2xx status code -func (o *GetServiceOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get service o k response has a 3xx status code -func (o *GetServiceOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get service o k response has a 4xx status code -func (o *GetServiceOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get service o k response has a 5xx status code -func (o *GetServiceOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get service o k response a status code equal to that given -func (o *GetServiceOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetServiceOK) Error() string { - return fmt.Sprintf("[GET /service][%d] getServiceOK %+v", 200, o.Payload) -} - -func (o *GetServiceOK) String() string { - return fmt.Sprintf("[GET /service][%d] getServiceOK %+v", 200, o.Payload) -} - -func (o *GetServiceOK) GetPayload() []*models.Service { - return o.Payload -} - -func (o *GetServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/service/put_service_id_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/service/put_service_id_parameters.go deleted file mode 100644 index b1877e4b7a4..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/service/put_service_id_parameters.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "github.com/cilium/cilium/api/v1/models" -) - -// NewPutServiceIDParams creates a new PutServiceIDParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPutServiceIDParams() *PutServiceIDParams { - return &PutServiceIDParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPutServiceIDParamsWithTimeout creates a new PutServiceIDParams object -// with the ability to set a timeout on a request. -func NewPutServiceIDParamsWithTimeout(timeout time.Duration) *PutServiceIDParams { - return &PutServiceIDParams{ - timeout: timeout, - } -} - -// NewPutServiceIDParamsWithContext creates a new PutServiceIDParams object -// with the ability to set a context for a request. -func NewPutServiceIDParamsWithContext(ctx context.Context) *PutServiceIDParams { - return &PutServiceIDParams{ - Context: ctx, - } -} - -// NewPutServiceIDParamsWithHTTPClient creates a new PutServiceIDParams object -// with the ability to set a custom HTTPClient for a request. -func NewPutServiceIDParamsWithHTTPClient(client *http.Client) *PutServiceIDParams { - return &PutServiceIDParams{ - HTTPClient: client, - } -} - -/* -PutServiceIDParams contains all the parameters to send to the API endpoint - - for the put service ID operation. - - Typically these are written to a http.Request. -*/ -type PutServiceIDParams struct { - - /* Config. - - Service configuration - */ - Config *models.ServiceSpec - - /* ID. - - ID of service - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the put service ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutServiceIDParams) WithDefaults() *PutServiceIDParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the put service ID params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutServiceIDParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the put service ID params -func (o *PutServiceIDParams) WithTimeout(timeout time.Duration) *PutServiceIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the put service ID params -func (o *PutServiceIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the put service ID params -func (o *PutServiceIDParams) WithContext(ctx context.Context) *PutServiceIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the put service ID params -func (o *PutServiceIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the put service ID params -func (o *PutServiceIDParams) WithHTTPClient(client *http.Client) *PutServiceIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the put service ID params -func (o *PutServiceIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithConfig adds the config to the put service ID params -func (o *PutServiceIDParams) WithConfig(config *models.ServiceSpec) *PutServiceIDParams { - o.SetConfig(config) - return o -} - -// SetConfig adds the config to the put service ID params -func (o *PutServiceIDParams) SetConfig(config *models.ServiceSpec) { - o.Config = config -} - -// WithID adds the id to the put service ID params -func (o *PutServiceIDParams) WithID(id int64) *PutServiceIDParams { - o.SetID(id) - return o -} - -// SetID adds the id to the put service ID params -func (o *PutServiceIDParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PutServiceIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Config != nil { - if err := r.SetBodyParam(o.Config); err != nil { - return err - } - } - - // path param id - if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/service/put_service_id_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/service/put_service_id_responses.go deleted file mode 100644 index af85fa32a60..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/service/put_service_id_responses.go +++ /dev/null @@ -1,471 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// PutServiceIDReader is a Reader for the PutServiceID structure. -type PutServiceIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PutServiceIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPutServiceIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 201: - result := NewPutServiceIDCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 403: - result := NewPutServiceIDForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 460: - result := NewPutServiceIDInvalidFrontend() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 461: - result := NewPutServiceIDInvalidBackend() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPutServiceIDFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 501: - result := NewPutServiceIDUpdateBackendFailure() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPutServiceIDOK creates a PutServiceIDOK with default headers values -func NewPutServiceIDOK() *PutServiceIDOK { - return &PutServiceIDOK{} -} - -/* -PutServiceIDOK describes a response with status code 200, with default header values. - -Updated -*/ -type PutServiceIDOK struct { -} - -// IsSuccess returns true when this put service Id o k response has a 2xx status code -func (o *PutServiceIDOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this put service Id o k response has a 3xx status code -func (o *PutServiceIDOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put service Id o k response has a 4xx status code -func (o *PutServiceIDOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this put service Id o k response has a 5xx status code -func (o *PutServiceIDOK) IsServerError() bool { - return false -} - -// IsCode returns true when this put service Id o k response a status code equal to that given -func (o *PutServiceIDOK) IsCode(code int) bool { - return code == 200 -} - -func (o *PutServiceIDOK) Error() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdOK ", 200) -} - -func (o *PutServiceIDOK) String() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdOK ", 200) -} - -func (o *PutServiceIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutServiceIDCreated creates a PutServiceIDCreated with default headers values -func NewPutServiceIDCreated() *PutServiceIDCreated { - return &PutServiceIDCreated{} -} - -/* -PutServiceIDCreated describes a response with status code 201, with default header values. - -Created -*/ -type PutServiceIDCreated struct { -} - -// IsSuccess returns true when this put service Id created response has a 2xx status code -func (o *PutServiceIDCreated) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this put service Id created response has a 3xx status code -func (o *PutServiceIDCreated) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put service Id created response has a 4xx status code -func (o *PutServiceIDCreated) IsClientError() bool { - return false -} - -// IsServerError returns true when this put service Id created response has a 5xx status code -func (o *PutServiceIDCreated) IsServerError() bool { - return false -} - -// IsCode returns true when this put service Id created response a status code equal to that given -func (o *PutServiceIDCreated) IsCode(code int) bool { - return code == 201 -} - -func (o *PutServiceIDCreated) Error() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdCreated ", 201) -} - -func (o *PutServiceIDCreated) String() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdCreated ", 201) -} - -func (o *PutServiceIDCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutServiceIDForbidden creates a PutServiceIDForbidden with default headers values -func NewPutServiceIDForbidden() *PutServiceIDForbidden { - return &PutServiceIDForbidden{} -} - -/* -PutServiceIDForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PutServiceIDForbidden struct { -} - -// IsSuccess returns true when this put service Id forbidden response has a 2xx status code -func (o *PutServiceIDForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put service Id forbidden response has a 3xx status code -func (o *PutServiceIDForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put service Id forbidden response has a 4xx status code -func (o *PutServiceIDForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this put service Id forbidden response has a 5xx status code -func (o *PutServiceIDForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this put service Id forbidden response a status code equal to that given -func (o *PutServiceIDForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PutServiceIDForbidden) Error() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdForbidden ", 403) -} - -func (o *PutServiceIDForbidden) String() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdForbidden ", 403) -} - -func (o *PutServiceIDForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutServiceIDInvalidFrontend creates a PutServiceIDInvalidFrontend with default headers values -func NewPutServiceIDInvalidFrontend() *PutServiceIDInvalidFrontend { - return &PutServiceIDInvalidFrontend{} -} - -/* -PutServiceIDInvalidFrontend describes a response with status code 460, with default header values. - -Invalid frontend in service configuration -*/ -type PutServiceIDInvalidFrontend struct { - Payload models.Error -} - -// IsSuccess returns true when this put service Id invalid frontend response has a 2xx status code -func (o *PutServiceIDInvalidFrontend) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put service Id invalid frontend response has a 3xx status code -func (o *PutServiceIDInvalidFrontend) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put service Id invalid frontend response has a 4xx status code -func (o *PutServiceIDInvalidFrontend) IsClientError() bool { - return true -} - -// IsServerError returns true when this put service Id invalid frontend response has a 5xx status code -func (o *PutServiceIDInvalidFrontend) IsServerError() bool { - return false -} - -// IsCode returns true when this put service Id invalid frontend response a status code equal to that given -func (o *PutServiceIDInvalidFrontend) IsCode(code int) bool { - return code == 460 -} - -func (o *PutServiceIDInvalidFrontend) Error() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdInvalidFrontend %+v", 460, o.Payload) -} - -func (o *PutServiceIDInvalidFrontend) String() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdInvalidFrontend %+v", 460, o.Payload) -} - -func (o *PutServiceIDInvalidFrontend) GetPayload() models.Error { - return o.Payload -} - -func (o *PutServiceIDInvalidFrontend) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPutServiceIDInvalidBackend creates a PutServiceIDInvalidBackend with default headers values -func NewPutServiceIDInvalidBackend() *PutServiceIDInvalidBackend { - return &PutServiceIDInvalidBackend{} -} - -/* -PutServiceIDInvalidBackend describes a response with status code 461, with default header values. - -Invalid backend in service configuration -*/ -type PutServiceIDInvalidBackend struct { - Payload models.Error -} - -// IsSuccess returns true when this put service Id invalid backend response has a 2xx status code -func (o *PutServiceIDInvalidBackend) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put service Id invalid backend response has a 3xx status code -func (o *PutServiceIDInvalidBackend) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put service Id invalid backend response has a 4xx status code -func (o *PutServiceIDInvalidBackend) IsClientError() bool { - return true -} - -// IsServerError returns true when this put service Id invalid backend response has a 5xx status code -func (o *PutServiceIDInvalidBackend) IsServerError() bool { - return false -} - -// IsCode returns true when this put service Id invalid backend response a status code equal to that given -func (o *PutServiceIDInvalidBackend) IsCode(code int) bool { - return code == 461 -} - -func (o *PutServiceIDInvalidBackend) Error() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdInvalidBackend %+v", 461, o.Payload) -} - -func (o *PutServiceIDInvalidBackend) String() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdInvalidBackend %+v", 461, o.Payload) -} - -func (o *PutServiceIDInvalidBackend) GetPayload() models.Error { - return o.Payload -} - -func (o *PutServiceIDInvalidBackend) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPutServiceIDFailure creates a PutServiceIDFailure with default headers values -func NewPutServiceIDFailure() *PutServiceIDFailure { - return &PutServiceIDFailure{} -} - -/* -PutServiceIDFailure describes a response with status code 500, with default header values. - -Error while creating service -*/ -type PutServiceIDFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this put service Id failure response has a 2xx status code -func (o *PutServiceIDFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put service Id failure response has a 3xx status code -func (o *PutServiceIDFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put service Id failure response has a 4xx status code -func (o *PutServiceIDFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this put service Id failure response has a 5xx status code -func (o *PutServiceIDFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this put service Id failure response a status code equal to that given -func (o *PutServiceIDFailure) IsCode(code int) bool { - return code == 500 -} - -func (o *PutServiceIDFailure) Error() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdFailure %+v", 500, o.Payload) -} - -func (o *PutServiceIDFailure) String() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdFailure %+v", 500, o.Payload) -} - -func (o *PutServiceIDFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *PutServiceIDFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPutServiceIDUpdateBackendFailure creates a PutServiceIDUpdateBackendFailure with default headers values -func NewPutServiceIDUpdateBackendFailure() *PutServiceIDUpdateBackendFailure { - return &PutServiceIDUpdateBackendFailure{} -} - -/* -PutServiceIDUpdateBackendFailure describes a response with status code 501, with default header values. - -Error while updating backend states -*/ -type PutServiceIDUpdateBackendFailure struct { - Payload models.Error -} - -// IsSuccess returns true when this put service Id update backend failure response has a 2xx status code -func (o *PutServiceIDUpdateBackendFailure) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put service Id update backend failure response has a 3xx status code -func (o *PutServiceIDUpdateBackendFailure) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put service Id update backend failure response has a 4xx status code -func (o *PutServiceIDUpdateBackendFailure) IsClientError() bool { - return false -} - -// IsServerError returns true when this put service Id update backend failure response has a 5xx status code -func (o *PutServiceIDUpdateBackendFailure) IsServerError() bool { - return true -} - -// IsCode returns true when this put service Id update backend failure response a status code equal to that given -func (o *PutServiceIDUpdateBackendFailure) IsCode(code int) bool { - return code == 501 -} - -func (o *PutServiceIDUpdateBackendFailure) Error() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdUpdateBackendFailure %+v", 501, o.Payload) -} - -func (o *PutServiceIDUpdateBackendFailure) String() string { - return fmt.Sprintf("[PUT /service/{id}][%d] putServiceIdUpdateBackendFailure %+v", 501, o.Payload) -} - -func (o *PutServiceIDUpdateBackendFailure) GetPayload() models.Error { - return o.Payload -} - -func (o *PutServiceIDUpdateBackendFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/service/service_client.go b/vendor/github.com/cilium/cilium/api/v1/client/service/service_client.go deleted file mode 100644 index 332799a98b8..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/service/service_client.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for service API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeleteServiceID(params *DeleteServiceIDParams, opts ...ClientOption) (*DeleteServiceIDOK, error) - - GetLrp(params *GetLrpParams, opts ...ClientOption) (*GetLrpOK, error) - - GetService(params *GetServiceParams, opts ...ClientOption) (*GetServiceOK, error) - - GetServiceID(params *GetServiceIDParams, opts ...ClientOption) (*GetServiceIDOK, error) - - PutServiceID(params *PutServiceIDParams, opts ...ClientOption) (*PutServiceIDOK, *PutServiceIDCreated, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeleteServiceID deletes a service -*/ -func (a *Client) DeleteServiceID(params *DeleteServiceIDParams, opts ...ClientOption) (*DeleteServiceIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteServiceIDParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteServiceID", - Method: "DELETE", - PathPattern: "/service/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteServiceIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteServiceIDOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for DeleteServiceID: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetLrp retrieves list of all local redirect policies -*/ -func (a *Client) GetLrp(params *GetLrpParams, opts ...ClientOption) (*GetLrpOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetLrpParams() - } - op := &runtime.ClientOperation{ - ID: "GetLrp", - Method: "GET", - PathPattern: "/lrp", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetLrpReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetLrpOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetLrp: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetService retrieves list of all services -*/ -func (a *Client) GetService(params *GetServiceParams, opts ...ClientOption) (*GetServiceOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetServiceParams() - } - op := &runtime.ClientOperation{ - ID: "GetService", - Method: "GET", - PathPattern: "/service", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetServiceReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetServiceOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetService: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetServiceID retrieves configuration of a service -*/ -func (a *Client) GetServiceID(params *GetServiceIDParams, opts ...ClientOption) (*GetServiceIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetServiceIDParams() - } - op := &runtime.ClientOperation{ - ID: "GetServiceID", - Method: "GET", - PathPattern: "/service/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetServiceIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetServiceIDOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetServiceID: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -PutServiceID creates or update service -*/ -func (a *Client) PutServiceID(params *PutServiceIDParams, opts ...ClientOption) (*PutServiceIDOK, *PutServiceIDCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPutServiceIDParams() - } - op := &runtime.ClientOperation{ - ID: "PutServiceID", - Method: "PUT", - PathPattern: "/service/{id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PutServiceIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, nil, err - } - switch value := result.(type) { - case *PutServiceIDOK: - return value, nil, nil - case *PutServiceIDCreated: - return nil, value, nil - } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for service: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_dump_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_dump_parameters.go deleted file mode 100644 index fe1c3ff1a37..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_dump_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package statedb - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetStatedbDumpParams creates a new GetStatedbDumpParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetStatedbDumpParams() *GetStatedbDumpParams { - return &GetStatedbDumpParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetStatedbDumpParamsWithTimeout creates a new GetStatedbDumpParams object -// with the ability to set a timeout on a request. -func NewGetStatedbDumpParamsWithTimeout(timeout time.Duration) *GetStatedbDumpParams { - return &GetStatedbDumpParams{ - timeout: timeout, - } -} - -// NewGetStatedbDumpParamsWithContext creates a new GetStatedbDumpParams object -// with the ability to set a context for a request. -func NewGetStatedbDumpParamsWithContext(ctx context.Context) *GetStatedbDumpParams { - return &GetStatedbDumpParams{ - Context: ctx, - } -} - -// NewGetStatedbDumpParamsWithHTTPClient creates a new GetStatedbDumpParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetStatedbDumpParamsWithHTTPClient(client *http.Client) *GetStatedbDumpParams { - return &GetStatedbDumpParams{ - HTTPClient: client, - } -} - -/* -GetStatedbDumpParams contains all the parameters to send to the API endpoint - - for the get statedb dump operation. - - Typically these are written to a http.Request. -*/ -type GetStatedbDumpParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get statedb dump params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStatedbDumpParams) WithDefaults() *GetStatedbDumpParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get statedb dump params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStatedbDumpParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get statedb dump params -func (o *GetStatedbDumpParams) WithTimeout(timeout time.Duration) *GetStatedbDumpParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get statedb dump params -func (o *GetStatedbDumpParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get statedb dump params -func (o *GetStatedbDumpParams) WithContext(ctx context.Context) *GetStatedbDumpParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get statedb dump params -func (o *GetStatedbDumpParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get statedb dump params -func (o *GetStatedbDumpParams) WithHTTPClient(client *http.Client) *GetStatedbDumpParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get statedb dump params -func (o *GetStatedbDumpParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetStatedbDumpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_dump_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_dump_responses.go deleted file mode 100644 index 3577f9c3b73..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_dump_responses.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package statedb - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// GetStatedbDumpReader is a Reader for the GetStatedbDump structure. -type GetStatedbDumpReader struct { - formats strfmt.Registry - writer io.Writer -} - -// ReadResponse reads a server response into the received o. -func (o *GetStatedbDumpReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetStatedbDumpOK(o.writer) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetStatedbDumpOK creates a GetStatedbDumpOK with default headers values -func NewGetStatedbDumpOK(writer io.Writer) *GetStatedbDumpOK { - return &GetStatedbDumpOK{ - - Payload: writer, - } -} - -/* -GetStatedbDumpOK describes a response with status code 200, with default header values. - -Success -*/ -type GetStatedbDumpOK struct { - Payload io.Writer -} - -// IsSuccess returns true when this get statedb dump o k response has a 2xx status code -func (o *GetStatedbDumpOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get statedb dump o k response has a 3xx status code -func (o *GetStatedbDumpOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get statedb dump o k response has a 4xx status code -func (o *GetStatedbDumpOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get statedb dump o k response has a 5xx status code -func (o *GetStatedbDumpOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get statedb dump o k response a status code equal to that given -func (o *GetStatedbDumpOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetStatedbDumpOK) Error() string { - return fmt.Sprintf("[GET /statedb/dump][%d] getStatedbDumpOK %+v", 200, o.Payload) -} - -func (o *GetStatedbDumpOK) String() string { - return fmt.Sprintf("[GET /statedb/dump][%d] getStatedbDumpOK %+v", 200, o.Payload) -} - -func (o *GetStatedbDumpOK) GetPayload() io.Writer { - return o.Payload -} - -func (o *GetStatedbDumpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_query_table_parameters.go b/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_query_table_parameters.go deleted file mode 100644 index b936411eaa9..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_query_table_parameters.go +++ /dev/null @@ -1,236 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package statedb - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetStatedbQueryTableParams creates a new GetStatedbQueryTableParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetStatedbQueryTableParams() *GetStatedbQueryTableParams { - return &GetStatedbQueryTableParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetStatedbQueryTableParamsWithTimeout creates a new GetStatedbQueryTableParams object -// with the ability to set a timeout on a request. -func NewGetStatedbQueryTableParamsWithTimeout(timeout time.Duration) *GetStatedbQueryTableParams { - return &GetStatedbQueryTableParams{ - timeout: timeout, - } -} - -// NewGetStatedbQueryTableParamsWithContext creates a new GetStatedbQueryTableParams object -// with the ability to set a context for a request. -func NewGetStatedbQueryTableParamsWithContext(ctx context.Context) *GetStatedbQueryTableParams { - return &GetStatedbQueryTableParams{ - Context: ctx, - } -} - -// NewGetStatedbQueryTableParamsWithHTTPClient creates a new GetStatedbQueryTableParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetStatedbQueryTableParamsWithHTTPClient(client *http.Client) *GetStatedbQueryTableParams { - return &GetStatedbQueryTableParams{ - HTTPClient: client, - } -} - -/* -GetStatedbQueryTableParams contains all the parameters to send to the API endpoint - - for the get statedb query table operation. - - Typically these are written to a http.Request. -*/ -type GetStatedbQueryTableParams struct { - - /* Index. - - StateDB index name - */ - Index string - - /* Key. - - Query key (base64 encoded) - */ - Key string - - /* Lowerbound. - - If true perform a LowerBound search - */ - Lowerbound bool - - /* Table. - - StateDB table name - */ - Table string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get statedb query table params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStatedbQueryTableParams) WithDefaults() *GetStatedbQueryTableParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get statedb query table params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStatedbQueryTableParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get statedb query table params -func (o *GetStatedbQueryTableParams) WithTimeout(timeout time.Duration) *GetStatedbQueryTableParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get statedb query table params -func (o *GetStatedbQueryTableParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get statedb query table params -func (o *GetStatedbQueryTableParams) WithContext(ctx context.Context) *GetStatedbQueryTableParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get statedb query table params -func (o *GetStatedbQueryTableParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get statedb query table params -func (o *GetStatedbQueryTableParams) WithHTTPClient(client *http.Client) *GetStatedbQueryTableParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get statedb query table params -func (o *GetStatedbQueryTableParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithIndex adds the index to the get statedb query table params -func (o *GetStatedbQueryTableParams) WithIndex(index string) *GetStatedbQueryTableParams { - o.SetIndex(index) - return o -} - -// SetIndex adds the index to the get statedb query table params -func (o *GetStatedbQueryTableParams) SetIndex(index string) { - o.Index = index -} - -// WithKey adds the key to the get statedb query table params -func (o *GetStatedbQueryTableParams) WithKey(key string) *GetStatedbQueryTableParams { - o.SetKey(key) - return o -} - -// SetKey adds the key to the get statedb query table params -func (o *GetStatedbQueryTableParams) SetKey(key string) { - o.Key = key -} - -// WithLowerbound adds the lowerbound to the get statedb query table params -func (o *GetStatedbQueryTableParams) WithLowerbound(lowerbound bool) *GetStatedbQueryTableParams { - o.SetLowerbound(lowerbound) - return o -} - -// SetLowerbound adds the lowerbound to the get statedb query table params -func (o *GetStatedbQueryTableParams) SetLowerbound(lowerbound bool) { - o.Lowerbound = lowerbound -} - -// WithTable adds the table to the get statedb query table params -func (o *GetStatedbQueryTableParams) WithTable(table string) *GetStatedbQueryTableParams { - o.SetTable(table) - return o -} - -// SetTable adds the table to the get statedb query table params -func (o *GetStatedbQueryTableParams) SetTable(table string) { - o.Table = table -} - -// WriteToRequest writes these params to a swagger request -func (o *GetStatedbQueryTableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // query param index - qrIndex := o.Index - qIndex := qrIndex - if qIndex != "" { - - if err := r.SetQueryParam("index", qIndex); err != nil { - return err - } - } - - // query param key - qrKey := o.Key - qKey := qrKey - if qKey != "" { - - if err := r.SetQueryParam("key", qKey); err != nil { - return err - } - } - - // query param lowerbound - qrLowerbound := o.Lowerbound - qLowerbound := swag.FormatBool(qrLowerbound) - if qLowerbound != "" { - - if err := r.SetQueryParam("lowerbound", qLowerbound); err != nil { - return err - } - } - - // path param table - if err := r.SetPathParam("table", o.Table); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_query_table_responses.go b/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_query_table_responses.go deleted file mode 100644 index 74bfe66f7f8..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/statedb/get_statedb_query_table_responses.go +++ /dev/null @@ -1,227 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package statedb - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/models" -) - -// GetStatedbQueryTableReader is a Reader for the GetStatedbQueryTable structure. -type GetStatedbQueryTableReader struct { - formats strfmt.Registry - writer io.Writer -} - -// ReadResponse reads a server response into the received o. -func (o *GetStatedbQueryTableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetStatedbQueryTableOK(o.writer) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewGetStatedbQueryTableBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewGetStatedbQueryTableNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetStatedbQueryTableOK creates a GetStatedbQueryTableOK with default headers values -func NewGetStatedbQueryTableOK(writer io.Writer) *GetStatedbQueryTableOK { - return &GetStatedbQueryTableOK{ - - Payload: writer, - } -} - -/* -GetStatedbQueryTableOK describes a response with status code 200, with default header values. - -Success -*/ -type GetStatedbQueryTableOK struct { - Payload io.Writer -} - -// IsSuccess returns true when this get statedb query table o k response has a 2xx status code -func (o *GetStatedbQueryTableOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get statedb query table o k response has a 3xx status code -func (o *GetStatedbQueryTableOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get statedb query table o k response has a 4xx status code -func (o *GetStatedbQueryTableOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get statedb query table o k response has a 5xx status code -func (o *GetStatedbQueryTableOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get statedb query table o k response a status code equal to that given -func (o *GetStatedbQueryTableOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetStatedbQueryTableOK) Error() string { - return fmt.Sprintf("[GET /statedb/query/{table}][%d] getStatedbQueryTableOK %+v", 200, o.Payload) -} - -func (o *GetStatedbQueryTableOK) String() string { - return fmt.Sprintf("[GET /statedb/query/{table}][%d] getStatedbQueryTableOK %+v", 200, o.Payload) -} - -func (o *GetStatedbQueryTableOK) GetPayload() io.Writer { - return o.Payload -} - -func (o *GetStatedbQueryTableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetStatedbQueryTableBadRequest creates a GetStatedbQueryTableBadRequest with default headers values -func NewGetStatedbQueryTableBadRequest() *GetStatedbQueryTableBadRequest { - return &GetStatedbQueryTableBadRequest{} -} - -/* -GetStatedbQueryTableBadRequest describes a response with status code 400, with default header values. - -Invalid parameters -*/ -type GetStatedbQueryTableBadRequest struct { - Payload models.Error -} - -// IsSuccess returns true when this get statedb query table bad request response has a 2xx status code -func (o *GetStatedbQueryTableBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get statedb query table bad request response has a 3xx status code -func (o *GetStatedbQueryTableBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get statedb query table bad request response has a 4xx status code -func (o *GetStatedbQueryTableBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this get statedb query table bad request response has a 5xx status code -func (o *GetStatedbQueryTableBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this get statedb query table bad request response a status code equal to that given -func (o *GetStatedbQueryTableBadRequest) IsCode(code int) bool { - return code == 400 -} - -func (o *GetStatedbQueryTableBadRequest) Error() string { - return fmt.Sprintf("[GET /statedb/query/{table}][%d] getStatedbQueryTableBadRequest %+v", 400, o.Payload) -} - -func (o *GetStatedbQueryTableBadRequest) String() string { - return fmt.Sprintf("[GET /statedb/query/{table}][%d] getStatedbQueryTableBadRequest %+v", 400, o.Payload) -} - -func (o *GetStatedbQueryTableBadRequest) GetPayload() models.Error { - return o.Payload -} - -func (o *GetStatedbQueryTableBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetStatedbQueryTableNotFound creates a GetStatedbQueryTableNotFound with default headers values -func NewGetStatedbQueryTableNotFound() *GetStatedbQueryTableNotFound { - return &GetStatedbQueryTableNotFound{} -} - -/* -GetStatedbQueryTableNotFound describes a response with status code 404, with default header values. - -Table or Index not found -*/ -type GetStatedbQueryTableNotFound struct { -} - -// IsSuccess returns true when this get statedb query table not found response has a 2xx status code -func (o *GetStatedbQueryTableNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get statedb query table not found response has a 3xx status code -func (o *GetStatedbQueryTableNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get statedb query table not found response has a 4xx status code -func (o *GetStatedbQueryTableNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this get statedb query table not found response has a 5xx status code -func (o *GetStatedbQueryTableNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this get statedb query table not found response a status code equal to that given -func (o *GetStatedbQueryTableNotFound) IsCode(code int) bool { - return code == 404 -} - -func (o *GetStatedbQueryTableNotFound) Error() string { - return fmt.Sprintf("[GET /statedb/query/{table}][%d] getStatedbQueryTableNotFound ", 404) -} - -func (o *GetStatedbQueryTableNotFound) String() string { - return fmt.Sprintf("[GET /statedb/query/{table}][%d] getStatedbQueryTableNotFound ", 404) -} - -func (o *GetStatedbQueryTableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/client/statedb/statedb_client.go b/vendor/github.com/cilium/cilium/api/v1/client/statedb/statedb_client.go deleted file mode 100644 index 4009fff8ed9..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/client/statedb/statedb_client.go +++ /dev/null @@ -1,123 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package statedb - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new statedb API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for statedb API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetStatedbDump(params *GetStatedbDumpParams, writer io.Writer, opts ...ClientOption) (*GetStatedbDumpOK, error) - - GetStatedbQueryTable(params *GetStatedbQueryTableParams, writer io.Writer, opts ...ClientOption) (*GetStatedbQueryTableOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetStatedbDump dumps state d b contents -*/ -func (a *Client) GetStatedbDump(params *GetStatedbDumpParams, writer io.Writer, opts ...ClientOption) (*GetStatedbDumpOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetStatedbDumpParams() - } - op := &runtime.ClientOperation{ - ID: "GetStatedbDump", - Method: "GET", - PathPattern: "/statedb/dump", - ProducesMediaTypes: []string{"application/octet-stream"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetStatedbDumpReader{formats: a.formats, writer: writer}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetStatedbDumpOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetStatedbDump: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* -GetStatedbQueryTable performs a query against a state d b table -*/ -func (a *Client) GetStatedbQueryTable(params *GetStatedbQueryTableParams, writer io.Writer, opts ...ClientOption) (*GetStatedbQueryTableOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetStatedbQueryTableParams() - } - op := &runtime.ClientOperation{ - ID: "GetStatedbQueryTable", - Method: "GET", - PathPattern: "/statedb/query/{table}", - ProducesMediaTypes: []string{"application/octet-stream"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetStatedbQueryTableReader{formats: a.formats, writer: writer}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetStatedbQueryTableOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetStatedbQueryTable: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/flow/README.md b/vendor/github.com/cilium/cilium/api/v1/flow/README.md index f96ebd64f14..3e818d3b870 100644 --- a/vendor/github.com/cilium/cilium/api/v1/flow/README.md +++ b/vendor/github.com/cilium/cilium/api/v1/flow/README.md @@ -16,6 +16,7 @@ - [EventTypeFilter](#flow-EventTypeFilter) - [Flow](#flow-Flow) - [FlowFilter](#flow-FlowFilter) + - [FlowFilter.Experimental](#flow-FlowFilter-Experimental) - [HTTP](#flow-HTTP) - [HTTPHeader](#flow-HTTPHeader) - [ICMPv4](#flow-ICMPv4) @@ -54,6 +55,7 @@ - [LostEventSource](#flow-LostEventSource) - [SocketTranslationPoint](#flow-SocketTranslationPoint) - [TraceObservationPoint](#flow-TraceObservationPoint) + - [TraceReason](#flow-TraceReason) - [TrafficDirection](#flow-TrafficDirection) - [Verdict](#flow-Verdict) @@ -177,6 +179,7 @@ DNS flow. This is basically directly mapped from Cilium's [LogRecordDNS](htt | ----- | ---- | ----- | ----------- | | ID | [uint32](#uint32) | | | | identity | [uint32](#uint32) | | | +| cluster_name | [string](#string) | | | | namespace | [string](#string) | | | | labels | [string](#string) | repeated | labels in `foo=bar` format. | | pod_name | [string](#string) | | | @@ -276,6 +279,7 @@ EventTypeFilter is a filter describing a particular event type. | destination | [Endpoint](#flow-Endpoint) | | | | Type | [FlowType](#flow-FlowType) | | | | node_name | [string](#string) | | NodeName is the name of the node from which this Flow was captured. | +| node_labels | [string](#string) | repeated | node labels in `foo=bar` format. | | source_names | [string](#string) | repeated | all names the source IP can have. | | destination_names | [string](#string) | repeated | all names the destination IP can have. | | l7 | [Layer7](#flow-Layer7) | | L7 information. This field is set if and only if FlowType is L7. | @@ -286,6 +290,7 @@ EventTypeFilter is a filter describing a particular event type. | traffic_direction | [TrafficDirection](#flow-TrafficDirection) | | traffic_direction of the connection, e.g. ingress or egress | | policy_match_type | [uint32](#uint32) | | policy_match_type is only applicable to the cilium event type PolicyVerdict https://github.com/cilium/cilium/blob/e831859b5cc336c6d964a6d35bbd34d1840e21b9/pkg/monitor/datapath_policy.go#L50 | | trace_observation_point | [TraceObservationPoint](#flow-TraceObservationPoint) | | Only applicable to cilium trace notifications, blank for other types. | +| trace_reason | [TraceReason](#flow-TraceReason) | | Cilium datapath trace reason info. | | drop_reason_desc | [DropReason](#flow-DropReason) | | only applicable to Verdict = DROPPED. | | is_reply | [google.protobuf.BoolValue](#google-protobuf-BoolValue) | | is_reply indicates that this was a packet (L4) or message (L7) in the reply direction. May be absent (in which case it is unknown whether it is a reply or not). | | debug_capture_point | [DebugCapturePoint](#flow-DebugCapturePoint) | | Only applicable to cilium debug capture events, blank for other types | @@ -299,6 +304,8 @@ EventTypeFilter is a filter describing a particular event type. | extensions | [google.protobuf.Any](#google-protobuf-Any) | | extensions can be used to add arbitrary additional metadata to flows. This can be used to extend functionality for other Hubble compatible APIs, or experiment with new functionality without needing to change the public API. | | egress_allowed_by | [Policy](#flow-Policy) | repeated | The CiliumNetworkPolicies allowing the egress of the flow. | | ingress_allowed_by | [Policy](#flow-Policy) | repeated | The CiliumNetworkPolicies allowing the ingress of the flow. | +| egress_denied_by | [Policy](#flow-Policy) | repeated | The CiliumNetworkPolicies denying the egress of the flow. | +| ingress_denied_by | [Policy](#flow-Policy) | repeated | The CiliumNetworkPolicies denying the ingress of the flow. | @@ -316,6 +323,7 @@ multiple fields are set, then all fields must match for the filter to match. | ----- | ---- | ----- | ----------- | | uuid | [string](#string) | repeated | uuid filters by a list of flow uuids. | | source_ip | [string](#string) | repeated | source_ip filters by a list of source ips. Each of the source ips can be specified as an exact match (e.g. "1.1.1.1") or as a CIDR range (e.g. "1.1.1.0/24"). | +| source_ip_xlated | [string](#string) | repeated | source_ip_xlated filters by a list IPs. Each of the IPs can be specified as an exact match (e.g. "1.1.1.1") or as a CIDR range (e.g. "1.1.1.0/24"). | | source_pod | [string](#string) | repeated | source_pod filters by a list of source pod name prefixes, optionally within a given namespace (e.g. "xwing", "kube-system/coredns-"). The pod name can be omitted to only filter by namespace (e.g. "kube-system/") or the namespace can be omitted to filter for pods in any namespace (e.g. "/xwing") | | source_fqdn | [string](#string) | repeated | source_fqdn filters by a list of source fully qualified domain names | | source_label | [string](#string) | repeated | source_labels filters on a list of source label selectors. Selectors support the full Kubernetes label selector syntax. | @@ -329,6 +337,8 @@ multiple fields are set, then all fields must match for the filter to match. | destination_workload | [Workload](#flow-Workload) | repeated | destination_workload filters by a list of destination workload. | | traffic_direction | [TrafficDirection](#flow-TrafficDirection) | repeated | traffic_direction filters flow by direction of the connection, e.g. ingress or egress. | | verdict | [Verdict](#flow-Verdict) | repeated | only return Flows that were classified with a particular verdict. | +| drop_reason_desc | [DropReason](#flow-DropReason) | repeated | only applicable to Verdict = DROPPED (e.g. "POLICY_DENIED", "UNSUPPORTED_L3_PROTOCOL") | +| interface | [NetworkInterface](#flow-NetworkInterface) | repeated | interface is the network interface on which this flow was observed. | | event_type | [EventTypeFilter](#flow-EventTypeFilter) | repeated | event_type is the list of event types to filter on | | http_status_code | [string](#string) | repeated | http_status_code is a list of string prefixes (e.g. "4+", "404", "5+") to filter on the HTTP status code | | protocol | [string](#string) | repeated | protocol filters flows by L4 or L7 protocol, e.g. (e.g. "tcp", "http") | @@ -344,8 +354,26 @@ multiple fields are set, then all fields must match for the filter to match. | http_header | [HTTPHeader](#flow-HTTPHeader) | repeated | http_header is a list of key:value pairs to filter on the HTTP headers. | | tcp_flags | [TCPFlags](#flow-TCPFlags) | repeated | tcp_flags filters flows based on TCP header flags | | node_name | [string](#string) | repeated | node_name is a list of patterns to filter on the node name, e.g. "k8s*", "test-cluster/*.domain.com", "cluster-name/" etc. | +| node_labels | [string](#string) | repeated | node_labels filters on a list of node label selectors. Selectors support the full Kubernetes label selector syntax. | | ip_version | [IPVersion](#flow-IPVersion) | repeated | filter based on IP version (ipv4 or ipv6) | | trace_id | [string](#string) | repeated | trace_id filters flows by trace ID | +| experimental | [FlowFilter.Experimental](#flow-FlowFilter-Experimental) | | experimental contains filters that are not stable yet. Support for experimental features is always optional and subject to change. | + + + + + + + + +### FlowFilter.Experimental +Experimental contains filters that are not stable yet. Support for +experimental features is always optional and subject to change. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| cel_expression | [string](#string) | repeated | cel_expression takes a common expression language (CEL) expression returning a boolean to determine if the filter matched or not. You can use the `_flow` variable to access fields on the flow using the flow.Flow protobuf field names. See https://github.com/google/cel-spec/blob/v0.14.0/doc/intro.md#introduction for more details on CEL and accessing the protobuf fields in CEL. Using CEL has performance cost compared to other filters, so prefer using non-CEL filters when possible, and try to specify CEL filters last in the list of FlowFilters. | @@ -428,6 +456,7 @@ L7 information for HTTP flows. It corresponds to Cilium's [accesslog.LogReco | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | source | [string](#string) | | | +| source_xlated | [string](#string) | | source_xlated is the post translation source IP when the flow was SNATed (and in that case source is the the original source IP). | | destination | [string](#string) | | | | ipVersion | [IPVersion](#flow-IPVersion) | | | | encrypted | [bool](#bool) | | This field indicates whether the TraceReasonEncryptMask is set or not. https://github.com/cilium/cilium/blob/ba0ed147bd5bb342f67b1794c2ad13c6e99d5236/pkg/monitor/datapath_trace.go#L27 | @@ -1116,6 +1145,25 @@ This mirrors enum xlate_point in bpf/lib/trace_sock.h + + +### TraceReason + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| TRACE_REASON_UNKNOWN | 0 | | +| NEW | 1 | | +| ESTABLISHED | 2 | | +| REPLY | 3 | | +| RELATED | 4 | | +| REOPENED | 5 | | +| SRV6_ENCAP | 6 | | +| SRV6_DECAP | 7 | | +| ENCRYPT_OVERLAY | 8 | | + + + ### TrafficDirection diff --git a/vendor/github.com/cilium/cilium/api/v1/flow/flow.pb.go b/vendor/github.com/cilium/cilium/api/v1/flow/flow.pb.go index ebed0110ed5..efb503c6dff 100644 --- a/vendor/github.com/cilium/cilium/api/v1/flow/flow.pb.go +++ b/vendor/github.com/cilium/cilium/api/v1/flow/flow.pb.go @@ -3,8 +3,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.0 +// protoc-gen-go v1.34.2 +// protoc v5.27.3 // source: flow/flow.proto package flow @@ -232,6 +232,74 @@ func (TraceObservationPoint) EnumDescriptor() ([]byte, []int) { return file_flow_flow_proto_rawDescGZIP(), []int{2} } +type TraceReason int32 + +const ( + TraceReason_TRACE_REASON_UNKNOWN TraceReason = 0 + TraceReason_NEW TraceReason = 1 + TraceReason_ESTABLISHED TraceReason = 2 + TraceReason_REPLY TraceReason = 3 + TraceReason_RELATED TraceReason = 4 + // Deprecated: Marked as deprecated in flow/flow.proto. + TraceReason_REOPENED TraceReason = 5 + TraceReason_SRV6_ENCAP TraceReason = 6 + TraceReason_SRV6_DECAP TraceReason = 7 + TraceReason_ENCRYPT_OVERLAY TraceReason = 8 +) + +// Enum value maps for TraceReason. +var ( + TraceReason_name = map[int32]string{ + 0: "TRACE_REASON_UNKNOWN", + 1: "NEW", + 2: "ESTABLISHED", + 3: "REPLY", + 4: "RELATED", + 5: "REOPENED", + 6: "SRV6_ENCAP", + 7: "SRV6_DECAP", + 8: "ENCRYPT_OVERLAY", + } + TraceReason_value = map[string]int32{ + "TRACE_REASON_UNKNOWN": 0, + "NEW": 1, + "ESTABLISHED": 2, + "REPLY": 3, + "RELATED": 4, + "REOPENED": 5, + "SRV6_ENCAP": 6, + "SRV6_DECAP": 7, + "ENCRYPT_OVERLAY": 8, + } +) + +func (x TraceReason) Enum() *TraceReason { + p := new(TraceReason) + *p = x + return p +} + +func (x TraceReason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TraceReason) Descriptor() protoreflect.EnumDescriptor { + return file_flow_flow_proto_enumTypes[3].Descriptor() +} + +func (TraceReason) Type() protoreflect.EnumType { + return &file_flow_flow_proto_enumTypes[3] +} + +func (x TraceReason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TraceReason.Descriptor instead. +func (TraceReason) EnumDescriptor() ([]byte, []int) { + return file_flow_flow_proto_rawDescGZIP(), []int{3} +} + // This enum corresponds to Cilium's L7 accesslog [FlowType](https://github.com/cilium/cilium/blob/728c79e427438ab6f8d9375b62fccd6fed4ace3a/pkg/proxy/accesslog/record.go#L26): type L7FlowType int32 @@ -269,11 +337,11 @@ func (x L7FlowType) String() string { } func (L7FlowType) Descriptor() protoreflect.EnumDescriptor { - return file_flow_flow_proto_enumTypes[3].Descriptor() + return file_flow_flow_proto_enumTypes[4].Descriptor() } func (L7FlowType) Type() protoreflect.EnumType { - return &file_flow_flow_proto_enumTypes[3] + return &file_flow_flow_proto_enumTypes[4] } func (x L7FlowType) Number() protoreflect.EnumNumber { @@ -282,7 +350,7 @@ func (x L7FlowType) Number() protoreflect.EnumNumber { // Deprecated: Use L7FlowType.Descriptor instead. func (L7FlowType) EnumDescriptor() ([]byte, []int) { - return file_flow_flow_proto_rawDescGZIP(), []int{3} + return file_flow_flow_proto_rawDescGZIP(), []int{4} } type IPVersion int32 @@ -318,11 +386,11 @@ func (x IPVersion) String() string { } func (IPVersion) Descriptor() protoreflect.EnumDescriptor { - return file_flow_flow_proto_enumTypes[4].Descriptor() + return file_flow_flow_proto_enumTypes[5].Descriptor() } func (IPVersion) Type() protoreflect.EnumType { - return &file_flow_flow_proto_enumTypes[4] + return &file_flow_flow_proto_enumTypes[5] } func (x IPVersion) Number() protoreflect.EnumNumber { @@ -331,7 +399,7 @@ func (x IPVersion) Number() protoreflect.EnumNumber { // Deprecated: Use IPVersion.Descriptor instead. func (IPVersion) EnumDescriptor() ([]byte, []int) { - return file_flow_flow_proto_rawDescGZIP(), []int{4} + return file_flow_flow_proto_rawDescGZIP(), []int{5} } type Verdict int32 @@ -396,11 +464,11 @@ func (x Verdict) String() string { } func (Verdict) Descriptor() protoreflect.EnumDescriptor { - return file_flow_flow_proto_enumTypes[5].Descriptor() + return file_flow_flow_proto_enumTypes[6].Descriptor() } func (Verdict) Type() protoreflect.EnumType { - return &file_flow_flow_proto_enumTypes[5] + return &file_flow_flow_proto_enumTypes[6] } func (x Verdict) Number() protoreflect.EnumNumber { @@ -409,7 +477,7 @@ func (x Verdict) Number() protoreflect.EnumNumber { // Deprecated: Use Verdict.Descriptor instead. func (Verdict) EnumDescriptor() ([]byte, []int) { - return file_flow_flow_proto_rawDescGZIP(), []int{5} + return file_flow_flow_proto_rawDescGZIP(), []int{6} } // These values are shared with pkg/monitor/api/drop.go and bpf/lib/common.h. @@ -421,28 +489,35 @@ const ( // non-drop reasons DropReason_DROP_REASON_UNKNOWN DropReason = 0 // drop reasons - DropReason_INVALID_SOURCE_MAC DropReason = 130 - DropReason_INVALID_DESTINATION_MAC DropReason = 131 - DropReason_INVALID_SOURCE_IP DropReason = 132 - DropReason_POLICY_DENIED DropReason = 133 - DropReason_INVALID_PACKET_DROPPED DropReason = 134 - DropReason_CT_TRUNCATED_OR_INVALID_HEADER DropReason = 135 - DropReason_CT_MISSING_TCP_ACK_FLAG DropReason = 136 - DropReason_CT_UNKNOWN_L4_PROTOCOL DropReason = 137 - DropReason_CT_CANNOT_CREATE_ENTRY_FROM_PACKET DropReason = 138 - DropReason_UNSUPPORTED_L3_PROTOCOL DropReason = 139 - DropReason_MISSED_TAIL_CALL DropReason = 140 - DropReason_ERROR_WRITING_TO_PACKET DropReason = 141 - DropReason_UNKNOWN_L4_PROTOCOL DropReason = 142 - DropReason_UNKNOWN_ICMPV4_CODE DropReason = 143 - DropReason_UNKNOWN_ICMPV4_TYPE DropReason = 144 - DropReason_UNKNOWN_ICMPV6_CODE DropReason = 145 - DropReason_UNKNOWN_ICMPV6_TYPE DropReason = 146 - DropReason_ERROR_RETRIEVING_TUNNEL_KEY DropReason = 147 - DropReason_ERROR_RETRIEVING_TUNNEL_OPTIONS DropReason = 148 - DropReason_INVALID_GENEVE_OPTION DropReason = 149 - DropReason_UNKNOWN_L3_TARGET_ADDRESS DropReason = 150 - DropReason_STALE_OR_UNROUTABLE_IP DropReason = 151 + // + // Deprecated: Marked as deprecated in flow/flow.proto. + DropReason_INVALID_SOURCE_MAC DropReason = 130 + // Deprecated: Marked as deprecated in flow/flow.proto. + DropReason_INVALID_DESTINATION_MAC DropReason = 131 + DropReason_INVALID_SOURCE_IP DropReason = 132 + DropReason_POLICY_DENIED DropReason = 133 + DropReason_INVALID_PACKET_DROPPED DropReason = 134 + DropReason_CT_TRUNCATED_OR_INVALID_HEADER DropReason = 135 + DropReason_CT_MISSING_TCP_ACK_FLAG DropReason = 136 + DropReason_CT_UNKNOWN_L4_PROTOCOL DropReason = 137 + // Deprecated: Marked as deprecated in flow/flow.proto. + DropReason_CT_CANNOT_CREATE_ENTRY_FROM_PACKET DropReason = 138 + DropReason_UNSUPPORTED_L3_PROTOCOL DropReason = 139 + DropReason_MISSED_TAIL_CALL DropReason = 140 + DropReason_ERROR_WRITING_TO_PACKET DropReason = 141 + DropReason_UNKNOWN_L4_PROTOCOL DropReason = 142 + DropReason_UNKNOWN_ICMPV4_CODE DropReason = 143 + DropReason_UNKNOWN_ICMPV4_TYPE DropReason = 144 + DropReason_UNKNOWN_ICMPV6_CODE DropReason = 145 + DropReason_UNKNOWN_ICMPV6_TYPE DropReason = 146 + DropReason_ERROR_RETRIEVING_TUNNEL_KEY DropReason = 147 + // Deprecated: Marked as deprecated in flow/flow.proto. + DropReason_ERROR_RETRIEVING_TUNNEL_OPTIONS DropReason = 148 + // Deprecated: Marked as deprecated in flow/flow.proto. + DropReason_INVALID_GENEVE_OPTION DropReason = 149 + DropReason_UNKNOWN_L3_TARGET_ADDRESS DropReason = 150 + DropReason_STALE_OR_UNROUTABLE_IP DropReason = 151 + // Deprecated: Marked as deprecated in flow/flow.proto. DropReason_NO_MATCHING_LOCAL_CONTAINER_FOUND DropReason = 152 DropReason_ERROR_WHILE_CORRECTING_L3_CHECKSUM DropReason = 153 DropReason_ERROR_WHILE_CORRECTING_L4_CHECKSUM DropReason = 154 @@ -476,22 +551,23 @@ const ( DropReason_INVALID_VNI DropReason = 183 DropReason_INVALID_TC_BUFFER DropReason = 184 DropReason_NO_SID DropReason = 185 - DropReason_MISSING_SRV6_STATE DropReason = 186 - DropReason_NAT46 DropReason = 187 - DropReason_NAT64 DropReason = 188 - DropReason_AUTH_REQUIRED DropReason = 189 - DropReason_CT_NO_MAP_FOUND DropReason = 190 - DropReason_SNAT_NO_MAP_FOUND DropReason = 191 - DropReason_INVALID_CLUSTER_ID DropReason = 192 - DropReason_UNSUPPORTED_PROTOCOL_FOR_DSR_ENCAP DropReason = 193 - DropReason_NO_EGRESS_GATEWAY DropReason = 194 - DropReason_UNENCRYPTED_TRAFFIC DropReason = 195 - DropReason_TTL_EXCEEDED DropReason = 196 - DropReason_NO_NODE_ID DropReason = 197 - DropReason_DROP_RATE_LIMITED DropReason = 198 - DropReason_IGMP_HANDLED DropReason = 199 - DropReason_IGMP_SUBSCRIBED DropReason = 200 - DropReason_MULTICAST_HANDLED DropReason = 201 + // Deprecated: Marked as deprecated in flow/flow.proto. + DropReason_MISSING_SRV6_STATE DropReason = 186 + DropReason_NAT46 DropReason = 187 + DropReason_NAT64 DropReason = 188 + DropReason_AUTH_REQUIRED DropReason = 189 + DropReason_CT_NO_MAP_FOUND DropReason = 190 + DropReason_SNAT_NO_MAP_FOUND DropReason = 191 + DropReason_INVALID_CLUSTER_ID DropReason = 192 + DropReason_UNSUPPORTED_PROTOCOL_FOR_DSR_ENCAP DropReason = 193 + DropReason_NO_EGRESS_GATEWAY DropReason = 194 + DropReason_UNENCRYPTED_TRAFFIC DropReason = 195 + DropReason_TTL_EXCEEDED DropReason = 196 + DropReason_NO_NODE_ID DropReason = 197 + DropReason_DROP_RATE_LIMITED DropReason = 198 + DropReason_IGMP_HANDLED DropReason = 199 + DropReason_IGMP_SUBSCRIBED DropReason = 200 + DropReason_MULTICAST_HANDLED DropReason = 201 // A BPF program wants to tail call into bpf_host, but the host datapath // hasn't been loaded yet. DropReason_DROP_HOST_NOT_READY DropReason = 202 @@ -667,11 +743,11 @@ func (x DropReason) String() string { } func (DropReason) Descriptor() protoreflect.EnumDescriptor { - return file_flow_flow_proto_enumTypes[6].Descriptor() + return file_flow_flow_proto_enumTypes[7].Descriptor() } func (DropReason) Type() protoreflect.EnumType { - return &file_flow_flow_proto_enumTypes[6] + return &file_flow_flow_proto_enumTypes[7] } func (x DropReason) Number() protoreflect.EnumNumber { @@ -680,7 +756,7 @@ func (x DropReason) Number() protoreflect.EnumNumber { // Deprecated: Use DropReason.Descriptor instead. func (DropReason) EnumDescriptor() ([]byte, []int) { - return file_flow_flow_proto_rawDescGZIP(), []int{6} + return file_flow_flow_proto_rawDescGZIP(), []int{7} } type TrafficDirection int32 @@ -716,11 +792,11 @@ func (x TrafficDirection) String() string { } func (TrafficDirection) Descriptor() protoreflect.EnumDescriptor { - return file_flow_flow_proto_enumTypes[7].Descriptor() + return file_flow_flow_proto_enumTypes[8].Descriptor() } func (TrafficDirection) Type() protoreflect.EnumType { - return &file_flow_flow_proto_enumTypes[7] + return &file_flow_flow_proto_enumTypes[8] } func (x TrafficDirection) Number() protoreflect.EnumNumber { @@ -729,7 +805,7 @@ func (x TrafficDirection) Number() protoreflect.EnumNumber { // Deprecated: Use TrafficDirection.Descriptor instead. func (TrafficDirection) EnumDescriptor() ([]byte, []int) { - return file_flow_flow_proto_rawDescGZIP(), []int{7} + return file_flow_flow_proto_rawDescGZIP(), []int{8} } // These values are shared with pkg/monitor/api/datapath_debug.go and bpf/lib/dbg.h. @@ -784,11 +860,11 @@ func (x DebugCapturePoint) String() string { } func (DebugCapturePoint) Descriptor() protoreflect.EnumDescriptor { - return file_flow_flow_proto_enumTypes[8].Descriptor() + return file_flow_flow_proto_enumTypes[9].Descriptor() } func (DebugCapturePoint) Type() protoreflect.EnumType { - return &file_flow_flow_proto_enumTypes[8] + return &file_flow_flow_proto_enumTypes[9] } func (x DebugCapturePoint) Number() protoreflect.EnumNumber { @@ -797,7 +873,7 @@ func (x DebugCapturePoint) Number() protoreflect.EnumNumber { // Deprecated: Use DebugCapturePoint.Descriptor instead. func (DebugCapturePoint) EnumDescriptor() ([]byte, []int) { - return file_flow_flow_proto_rawDescGZIP(), []int{8} + return file_flow_flow_proto_rawDescGZIP(), []int{9} } // EventType are constants are based on the ones from . @@ -836,11 +912,11 @@ func (x EventType) String() string { } func (EventType) Descriptor() protoreflect.EnumDescriptor { - return file_flow_flow_proto_enumTypes[9].Descriptor() + return file_flow_flow_proto_enumTypes[10].Descriptor() } func (EventType) Type() protoreflect.EnumType { - return &file_flow_flow_proto_enumTypes[9] + return &file_flow_flow_proto_enumTypes[10] } func (x EventType) Number() protoreflect.EnumNumber { @@ -849,7 +925,7 @@ func (x EventType) Number() protoreflect.EnumNumber { // Deprecated: Use EventType.Descriptor instead. func (EventType) EnumDescriptor() ([]byte, []int) { - return file_flow_flow_proto_rawDescGZIP(), []int{9} + return file_flow_flow_proto_rawDescGZIP(), []int{10} } type LostEventSource int32 @@ -896,11 +972,11 @@ func (x LostEventSource) String() string { } func (LostEventSource) Descriptor() protoreflect.EnumDescriptor { - return file_flow_flow_proto_enumTypes[10].Descriptor() + return file_flow_flow_proto_enumTypes[11].Descriptor() } func (LostEventSource) Type() protoreflect.EnumType { - return &file_flow_flow_proto_enumTypes[10] + return &file_flow_flow_proto_enumTypes[11] } func (x LostEventSource) Number() protoreflect.EnumNumber { @@ -909,7 +985,7 @@ func (x LostEventSource) Number() protoreflect.EnumNumber { // Deprecated: Use LostEventSource.Descriptor instead. func (LostEventSource) EnumDescriptor() ([]byte, []int) { - return file_flow_flow_proto_rawDescGZIP(), []int{10} + return file_flow_flow_proto_rawDescGZIP(), []int{11} } // AgentEventType is the type of agent event. These values are shared with type @@ -974,11 +1050,11 @@ func (x AgentEventType) String() string { } func (AgentEventType) Descriptor() protoreflect.EnumDescriptor { - return file_flow_flow_proto_enumTypes[11].Descriptor() + return file_flow_flow_proto_enumTypes[12].Descriptor() } func (AgentEventType) Type() protoreflect.EnumType { - return &file_flow_flow_proto_enumTypes[11] + return &file_flow_flow_proto_enumTypes[12] } func (x AgentEventType) Number() protoreflect.EnumNumber { @@ -987,7 +1063,7 @@ func (x AgentEventType) Number() protoreflect.EnumNumber { // Deprecated: Use AgentEventType.Descriptor instead. func (AgentEventType) EnumDescriptor() ([]byte, []int) { - return file_flow_flow_proto_rawDescGZIP(), []int{11} + return file_flow_flow_proto_rawDescGZIP(), []int{12} } // This mirrors enum xlate_point in bpf/lib/trace_sock.h @@ -1030,11 +1106,11 @@ func (x SocketTranslationPoint) String() string { } func (SocketTranslationPoint) Descriptor() protoreflect.EnumDescriptor { - return file_flow_flow_proto_enumTypes[12].Descriptor() + return file_flow_flow_proto_enumTypes[13].Descriptor() } func (SocketTranslationPoint) Type() protoreflect.EnumType { - return &file_flow_flow_proto_enumTypes[12] + return &file_flow_flow_proto_enumTypes[13] } func (x SocketTranslationPoint) Number() protoreflect.EnumNumber { @@ -1043,7 +1119,7 @@ func (x SocketTranslationPoint) Number() protoreflect.EnumNumber { // Deprecated: Use SocketTranslationPoint.Descriptor instead. func (SocketTranslationPoint) EnumDescriptor() ([]byte, []int) { - return file_flow_flow_proto_rawDescGZIP(), []int{12} + return file_flow_flow_proto_rawDescGZIP(), []int{13} } // These values are shared with pkg/monitor/api/datapath_debug.go and bpf/lib/dbg.h. @@ -1272,11 +1348,11 @@ func (x DebugEventType) String() string { } func (DebugEventType) Descriptor() protoreflect.EnumDescriptor { - return file_flow_flow_proto_enumTypes[13].Descriptor() + return file_flow_flow_proto_enumTypes[14].Descriptor() } func (DebugEventType) Type() protoreflect.EnumType { - return &file_flow_flow_proto_enumTypes[13] + return &file_flow_flow_proto_enumTypes[14] } func (x DebugEventType) Number() protoreflect.EnumNumber { @@ -1285,7 +1361,7 @@ func (x DebugEventType) Number() protoreflect.EnumNumber { // Deprecated: Use DebugEventType.Descriptor instead. func (DebugEventType) EnumDescriptor() ([]byte, []int) { - return file_flow_flow_proto_rawDescGZIP(), []int{13} + return file_flow_flow_proto_rawDescGZIP(), []int{14} } type Flow struct { @@ -1316,6 +1392,8 @@ type Flow struct { Type FlowType `protobuf:"varint,10,opt,name=Type,proto3,enum=flow.FlowType" json:"Type,omitempty"` // NodeName is the name of the node from which this Flow was captured. NodeName string `protobuf:"bytes,11,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` + // node labels in `foo=bar` format. + NodeLabels []string `protobuf:"bytes,37,rep,name=node_labels,json=nodeLabels,proto3" json:"node_labels,omitempty"` // all names the source IP can have. SourceNames []string `protobuf:"bytes,13,rep,name=source_names,json=sourceNames,proto3" json:"source_names,omitempty"` // all names the destination IP can have. @@ -1341,6 +1419,8 @@ type Flow struct { PolicyMatchType uint32 `protobuf:"varint,23,opt,name=policy_match_type,json=policyMatchType,proto3" json:"policy_match_type,omitempty"` // Only applicable to cilium trace notifications, blank for other types. TraceObservationPoint TraceObservationPoint `protobuf:"varint,24,opt,name=trace_observation_point,json=traceObservationPoint,proto3,enum=flow.TraceObservationPoint" json:"trace_observation_point,omitempty"` + // Cilium datapath trace reason info. + TraceReason TraceReason `protobuf:"varint,36,opt,name=trace_reason,json=traceReason,proto3,enum=flow.TraceReason" json:"trace_reason,omitempty"` // only applicable to Verdict = DROPPED. DropReasonDesc DropReason `protobuf:"varint,25,opt,name=drop_reason_desc,json=dropReasonDesc,proto3,enum=flow.DropReason" json:"drop_reason_desc,omitempty"` // is_reply indicates that this was a packet (L4) or message (L7) in the @@ -1379,6 +1459,10 @@ type Flow struct { EgressAllowedBy []*Policy `protobuf:"bytes,21001,rep,name=egress_allowed_by,json=egressAllowedBy,proto3" json:"egress_allowed_by,omitempty"` // The CiliumNetworkPolicies allowing the ingress of the flow. IngressAllowedBy []*Policy `protobuf:"bytes,21002,rep,name=ingress_allowed_by,json=ingressAllowedBy,proto3" json:"ingress_allowed_by,omitempty"` + // The CiliumNetworkPolicies denying the egress of the flow. + EgressDeniedBy []*Policy `protobuf:"bytes,21004,rep,name=egress_denied_by,json=egressDeniedBy,proto3" json:"egress_denied_by,omitempty"` + // The CiliumNetworkPolicies denying the ingress of the flow. + IngressDeniedBy []*Policy `protobuf:"bytes,21005,rep,name=ingress_denied_by,json=ingressDeniedBy,proto3" json:"ingress_denied_by,omitempty"` } func (x *Flow) Reset() { @@ -1498,6 +1582,13 @@ func (x *Flow) GetNodeName() string { return "" } +func (x *Flow) GetNodeLabels() []string { + if x != nil { + return x.NodeLabels + } + return nil +} + func (x *Flow) GetSourceNames() []string { if x != nil { return x.SourceNames @@ -1569,6 +1660,13 @@ func (x *Flow) GetTraceObservationPoint() TraceObservationPoint { return TraceObservationPoint_UNKNOWN_POINT } +func (x *Flow) GetTraceReason() TraceReason { + if x != nil { + return x.TraceReason + } + return TraceReason_TRACE_REASON_UNKNOWN +} + func (x *Flow) GetDropReasonDesc() DropReason { if x != nil { return x.DropReasonDesc @@ -1661,6 +1759,20 @@ func (x *Flow) GetIngressAllowedBy() []*Policy { return nil } +func (x *Flow) GetEgressDeniedBy() []*Policy { + if x != nil { + return x.EgressDeniedBy + } + return nil +} + +func (x *Flow) GetIngressDeniedBy() []*Policy { + if x != nil { + return x.IngressDeniedBy + } + return nil +} + type Layer4 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2006,9 +2118,10 @@ type Endpoint struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ID uint32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - Identity uint32 `protobuf:"varint,2,opt,name=identity,proto3" json:"identity,omitempty"` - Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + ID uint32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + Identity uint32 `protobuf:"varint,2,opt,name=identity,proto3" json:"identity,omitempty"` + ClusterName string `protobuf:"bytes,7,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` // labels in `foo=bar` format. Labels []string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"` PodName string `protobuf:"bytes,5,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` @@ -2061,6 +2174,13 @@ func (x *Endpoint) GetIdentity() uint32 { return 0 } +func (x *Endpoint) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + func (x *Endpoint) GetNamespace() string { if x != nil { return x.Namespace @@ -2212,9 +2332,12 @@ type IP struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` - IpVersion IPVersion `protobuf:"varint,3,opt,name=ipVersion,proto3,enum=flow.IPVersion" json:"ipVersion,omitempty"` + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + // source_xlated is the post translation source IP when the flow was SNATed + // (and in that case source is the the original source IP). + SourceXlated string `protobuf:"bytes,5,opt,name=source_xlated,json=sourceXlated,proto3" json:"source_xlated,omitempty"` + Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + IpVersion IPVersion `protobuf:"varint,3,opt,name=ipVersion,proto3,enum=flow.IPVersion" json:"ipVersion,omitempty"` // This field indicates whether the TraceReasonEncryptMask is set or not. // https://github.com/cilium/cilium/blob/ba0ed147bd5bb342f67b1794c2ad13c6e99d5236/pkg/monitor/datapath_trace.go#L27 Encrypted bool `protobuf:"varint,4,opt,name=encrypted,proto3" json:"encrypted,omitempty"` @@ -2259,6 +2382,13 @@ func (x *IP) GetSource() string { return "" } +func (x *IP) GetSourceXlated() string { + if x != nil { + return x.SourceXlated + } + return "" +} + func (x *IP) GetDestination() string { if x != nil { return x.Destination @@ -2882,6 +3012,10 @@ type FlowFilter struct { // specified as an exact match (e.g. "1.1.1.1") or as a CIDR range (e.g. // "1.1.1.0/24"). SourceIp []string `protobuf:"bytes,1,rep,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` + // source_ip_xlated filters by a list IPs. Each of the IPs can be specified + // as an exact match (e.g. "1.1.1.1") or as a CIDR range (e.g. + // "1.1.1.0/24"). + SourceIpXlated []string `protobuf:"bytes,34,rep,name=source_ip_xlated,json=sourceIpXlated,proto3" json:"source_ip_xlated,omitempty"` // source_pod filters by a list of source pod name prefixes, optionally // within a given namespace (e.g. "xwing", "kube-system/coredns-"). // The pod name can be omitted to only filter by namespace @@ -2917,6 +3051,10 @@ type FlowFilter struct { TrafficDirection []TrafficDirection `protobuf:"varint,30,rep,packed,name=traffic_direction,json=trafficDirection,proto3,enum=flow.TrafficDirection" json:"traffic_direction,omitempty"` // only return Flows that were classified with a particular verdict. Verdict []Verdict `protobuf:"varint,5,rep,packed,name=verdict,proto3,enum=flow.Verdict" json:"verdict,omitempty"` + // only applicable to Verdict = DROPPED (e.g. "POLICY_DENIED", "UNSUPPORTED_L3_PROTOCOL") + DropReasonDesc []DropReason `protobuf:"varint,33,rep,packed,name=drop_reason_desc,json=dropReasonDesc,proto3,enum=flow.DropReason" json:"drop_reason_desc,omitempty"` + // interface is the network interface on which this flow was observed. + Interface []*NetworkInterface `protobuf:"bytes,35,rep,name=interface,proto3" json:"interface,omitempty"` // event_type is the list of event types to filter on EventType []*EventTypeFilter `protobuf:"bytes,6,rep,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` // http_status_code is a list of string prefixes (e.g. "4+", "404", "5+") @@ -2950,10 +3088,16 @@ type FlowFilter struct { // node_name is a list of patterns to filter on the node name, e.g. "k8s*", // "test-cluster/*.domain.com", "cluster-name/" etc. NodeName []string `protobuf:"bytes,24,rep,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` + // node_labels filters on a list of node label selectors. Selectors support + // the full Kubernetes label selector syntax. + NodeLabels []string `protobuf:"bytes,36,rep,name=node_labels,json=nodeLabels,proto3" json:"node_labels,omitempty"` // filter based on IP version (ipv4 or ipv6) IpVersion []IPVersion `protobuf:"varint,25,rep,packed,name=ip_version,json=ipVersion,proto3,enum=flow.IPVersion" json:"ip_version,omitempty"` // trace_id filters flows by trace ID TraceId []string `protobuf:"bytes,28,rep,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + // experimental contains filters that are not stable yet. Support for + // experimental features is always optional and subject to change. + Experimental *FlowFilter_Experimental `protobuf:"bytes,999,opt,name=experimental,proto3" json:"experimental,omitempty"` } func (x *FlowFilter) Reset() { @@ -3002,6 +3146,13 @@ func (x *FlowFilter) GetSourceIp() []string { return nil } +func (x *FlowFilter) GetSourceIpXlated() []string { + if x != nil { + return x.SourceIpXlated + } + return nil +} + func (x *FlowFilter) GetSourcePod() []string { if x != nil { return x.SourcePod @@ -3093,6 +3244,20 @@ func (x *FlowFilter) GetVerdict() []Verdict { return nil } +func (x *FlowFilter) GetDropReasonDesc() []DropReason { + if x != nil { + return x.DropReasonDesc + } + return nil +} + +func (x *FlowFilter) GetInterface() []*NetworkInterface { + if x != nil { + return x.Interface + } + return nil +} + func (x *FlowFilter) GetEventType() []*EventTypeFilter { if x != nil { return x.EventType @@ -3198,6 +3363,13 @@ func (x *FlowFilter) GetNodeName() []string { return nil } +func (x *FlowFilter) GetNodeLabels() []string { + if x != nil { + return x.NodeLabels + } + return nil +} + func (x *FlowFilter) GetIpVersion() []IPVersion { if x != nil { return x.IpVersion @@ -3212,6 +3384,13 @@ func (x *FlowFilter) GetTraceId() []string { return nil } +func (x *FlowFilter) GetExperimental() *FlowFilter_Experimental { + if x != nil { + return x.Experimental + } + return nil +} + // DNS flow. This is basically directly mapped from Cilium's [LogRecordDNS](https://github.com/cilium/cilium/blob/04f3889d627774f79e56d14ddbc165b3169e2d01/pkg/proxy/accesslog/record.go#L264): type DNS struct { state protoimpl.MessageState @@ -4630,6 +4809,64 @@ func (x *DebugEvent) GetCpu() *wrapperspb.Int32Value { return nil } +// Experimental contains filters that are not stable yet. Support for +// experimental features is always optional and subject to change. +type FlowFilter_Experimental struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // cel_expression takes a common expression language (CEL) expression + // returning a boolean to determine if the filter matched or not. + // You can use the `_flow` variable to access fields on the flow using + // the flow.Flow protobuf field names. + // See https://github.com/google/cel-spec/blob/v0.14.0/doc/intro.md#introduction + // for more details on CEL and accessing the protobuf fields in CEL. + // Using CEL has performance cost compared to other filters, so prefer + // using non-CEL filters when possible, and try to specify CEL filters + // last in the list of FlowFilters. + CelExpression []string `protobuf:"bytes,1,rep,name=cel_expression,json=celExpression,proto3" json:"cel_expression,omitempty"` +} + +func (x *FlowFilter_Experimental) Reset() { + *x = FlowFilter_Experimental{} + if protoimpl.UnsafeEnabled { + mi := &file_flow_flow_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlowFilter_Experimental) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlowFilter_Experimental) ProtoMessage() {} + +func (x *FlowFilter_Experimental) ProtoReflect() protoreflect.Message { + mi := &file_flow_flow_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlowFilter_Experimental.ProtoReflect.Descriptor instead. +func (*FlowFilter_Experimental) Descriptor() ([]byte, []int) { + return file_flow_flow_proto_rawDescGZIP(), []int{18, 0} +} + +func (x *FlowFilter_Experimental) GetCelExpression() []string { + if x != nil { + return x.CelExpression + } + return nil +} + var File_flow_flow_proto protoreflect.FileDescriptor var file_flow_flow_proto_rawDesc = []byte{ @@ -4640,7 +4877,7 @@ var file_flow_flow_proto_rawDesc = []byte{ 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x0c, 0x0a, 0x04, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x2e, 0x0a, 0x04, + 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x0e, 0x0a, 0x04, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, @@ -4668,117 +4905,132 @@ var file_flow_flow_proto_rawDesc = []byte{ 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2b, 0x0a, - 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x02, 0x6c, 0x37, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x4c, 0x61, - 0x79, 0x65, 0x72, 0x37, 0x52, 0x02, 0x6c, 0x37, 0x12, 0x18, 0x0a, 0x05, 0x72, 0x65, 0x70, 0x6c, - 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x72, 0x65, 0x70, - 0x6c, 0x79, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x69, - 0x6c, 0x69, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, - 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, - 0x0a, 0x11, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x53, 0x0a, 0x17, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1b, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x4f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x15, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x10, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x72, 0x65, 0x61, - 0x73, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, - 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x52, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, - 0x12, 0x35, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x1a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, - 0x69, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x47, 0x0a, 0x13, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x5f, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x1b, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x44, 0x65, 0x62, 0x75, - 0x67, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x11, 0x64, - 0x65, 0x62, 0x75, 0x67, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, - 0x12, 0x34, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x1c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x09, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x37, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x52, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x46, - 0x0a, 0x10, 0x73, 0x6f, 0x63, 0x6b, 0x5f, 0x78, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x58, 0x6c, 0x61, 0x74, - 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x5f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x07, 0x53, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x79, 0x18, 0xa0, 0x8d, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x07, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xf0, 0x93, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x3a, 0x0a, 0x11, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x89, 0xa4, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0f, 0x65, 0x67, 0x72, - 0x65, 0x73, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x79, 0x12, 0x3c, 0x0a, 0x12, - 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, - 0x62, 0x79, 0x18, 0x8a, 0xa4, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x10, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x79, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, - 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, - 0x10, 0x13, 0x22, 0xc4, 0x01, 0x0a, 0x06, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x34, 0x12, 0x1d, 0x0a, - 0x03, 0x54, 0x43, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x54, 0x43, 0x50, 0x48, 0x00, 0x52, 0x03, 0x54, 0x43, 0x50, 0x12, 0x1d, 0x0a, 0x03, - 0x55, 0x44, 0x50, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x55, 0x44, 0x50, 0x48, 0x00, 0x52, 0x03, 0x55, 0x44, 0x50, 0x12, 0x26, 0x0a, 0x06, 0x49, - 0x43, 0x4d, 0x50, 0x76, 0x34, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x49, 0x43, 0x4d, 0x50, 0x76, 0x34, 0x48, 0x00, 0x52, 0x06, 0x49, 0x43, 0x4d, - 0x50, 0x76, 0x34, 0x12, 0x26, 0x0a, 0x06, 0x49, 0x43, 0x4d, 0x50, 0x76, 0x36, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x49, 0x43, 0x4d, 0x50, 0x76, - 0x36, 0x48, 0x00, 0x52, 0x06, 0x49, 0x43, 0x4d, 0x50, 0x76, 0x36, 0x12, 0x20, 0x0a, 0x04, 0x53, - 0x43, 0x54, 0x50, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x53, 0x43, 0x54, 0x50, 0x48, 0x00, 0x52, 0x04, 0x53, 0x43, 0x54, 0x50, 0x42, 0x0a, 0x0a, - 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0xbd, 0x01, 0x0a, 0x06, 0x4c, 0x61, - 0x79, 0x65, 0x72, 0x37, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x4c, 0x37, 0x46, 0x6c, 0x6f, 0x77, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, - 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, - 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4e, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x64, 0x6e, 0x73, - 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x44, 0x4e, - 0x53, 0x48, 0x00, 0x52, 0x03, 0x64, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, - 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x48, 0x54, - 0x54, 0x50, 0x48, 0x00, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x23, 0x0a, 0x05, 0x6b, 0x61, - 0x66, 0x6b, 0x61, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x48, 0x00, 0x52, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x42, - 0x08, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x39, 0x0a, 0x0c, 0x54, 0x72, 0x61, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x22, 0x28, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0xb5, - 0x01, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x25, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2b, + 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x02, 0x6c, + 0x37, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x4c, + 0x61, 0x79, 0x65, 0x72, 0x37, 0x52, 0x02, 0x6c, 0x37, 0x12, 0x18, 0x0a, 0x05, 0x72, 0x65, 0x70, + 0x6c, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x72, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, + 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x0e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x3e, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x12, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x43, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x53, 0x0a, 0x17, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1b, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x15, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x0b, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x10, 0x64, + 0x72, 0x6f, 0x70, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x18, + 0x19, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x44, 0x72, 0x6f, + 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x72, 0x65, + 0x70, 0x6c, 0x79, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x47, + 0x0a, 0x13, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x5f, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x11, 0x64, 0x65, 0x62, 0x75, 0x67, 0x43, 0x61, 0x70, 0x74, 0x75, + 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x1d, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x37, 0x0a, 0x0d, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x1e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x46, 0x0a, 0x10, 0x73, 0x6f, 0x63, 0x6b, 0x5f, 0x78, 0x6c, + 0x61, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1c, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0e, 0x73, + 0x6f, 0x63, 0x6b, 0x58, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x0a, + 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x20, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6f, 0x6b, + 0x69, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, + 0x21, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x63, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, + 0x1e, 0x0a, 0x07, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0xa0, 0x8d, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x36, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xf0, 0x93, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x11, 0x65, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x89, 0xa4, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x0f, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x42, 0x79, 0x12, 0x3c, 0x0a, 0x12, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x8a, 0xa4, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x10, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, + 0x79, 0x12, 0x38, 0x0a, 0x10, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x6e, 0x69, + 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x8c, 0xa4, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x65, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x42, 0x79, 0x12, 0x3a, 0x0a, 0x11, 0x69, + 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x79, + 0x18, 0x8d, 0xa4, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x44, + 0x65, 0x6e, 0x69, 0x65, 0x64, 0x42, 0x79, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, + 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, + 0xc4, 0x01, 0x0a, 0x06, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x34, 0x12, 0x1d, 0x0a, 0x03, 0x54, 0x43, + 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x54, + 0x43, 0x50, 0x48, 0x00, 0x52, 0x03, 0x54, 0x43, 0x50, 0x12, 0x1d, 0x0a, 0x03, 0x55, 0x44, 0x50, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x55, 0x44, + 0x50, 0x48, 0x00, 0x52, 0x03, 0x55, 0x44, 0x50, 0x12, 0x26, 0x0a, 0x06, 0x49, 0x43, 0x4d, 0x50, + 0x76, 0x34, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x49, 0x43, 0x4d, 0x50, 0x76, 0x34, 0x48, 0x00, 0x52, 0x06, 0x49, 0x43, 0x4d, 0x50, 0x76, 0x34, + 0x12, 0x26, 0x0a, 0x06, 0x49, 0x43, 0x4d, 0x50, 0x76, 0x36, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x49, 0x43, 0x4d, 0x50, 0x76, 0x36, 0x48, 0x00, + 0x52, 0x06, 0x49, 0x43, 0x4d, 0x50, 0x76, 0x36, 0x12, 0x20, 0x0a, 0x04, 0x53, 0x43, 0x54, 0x50, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x43, + 0x54, 0x50, 0x48, 0x00, 0x52, 0x04, 0x53, 0x43, 0x54, 0x50, 0x42, 0x0a, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0xbd, 0x01, 0x0a, 0x06, 0x4c, 0x61, 0x79, 0x65, 0x72, + 0x37, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x10, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x4c, 0x37, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, 0x74, 0x65, 0x6e, + 0x63, 0x79, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6c, 0x61, 0x74, + 0x65, 0x6e, 0x63, 0x79, 0x4e, 0x73, 0x12, 0x1d, 0x0a, 0x03, 0x64, 0x6e, 0x73, 0x18, 0x64, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x44, 0x4e, 0x53, 0x48, 0x00, + 0x52, 0x03, 0x64, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x65, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, + 0x00, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x23, 0x0a, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, + 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x4b, 0x61, + 0x66, 0x6b, 0x61, 0x48, 0x00, 0x52, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x42, 0x08, 0x0a, 0x06, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x39, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x22, 0x28, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0xd8, 0x01, 0x0a, 0x08, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x19, 0x0a, @@ -4797,364 +5049,396 @@ var file_flow_flow_proto_rawDesc = []byte{ 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x54, 0x43, 0x50, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, - 0x61, 0x67, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x02, 0x49, 0x50, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, + 0x61, 0x67, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x02, 0x49, 0x50, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x09, 0x69, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x49, - 0x50, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x69, 0x70, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x22, 0x44, 0x0a, 0x08, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xaa, 0x01, 0x0a, 0x08, 0x54, 0x43, 0x50, 0x46, - 0x6c, 0x61, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x46, 0x49, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x03, 0x46, 0x49, 0x4e, 0x12, 0x10, 0x0a, 0x03, 0x53, 0x59, 0x4e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x03, 0x53, 0x59, 0x4e, 0x12, 0x10, 0x0a, 0x03, 0x52, 0x53, 0x54, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x52, 0x53, 0x54, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x53, - 0x48, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x50, 0x53, 0x48, 0x12, 0x10, 0x0a, 0x03, - 0x41, 0x43, 0x4b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x41, 0x43, 0x4b, 0x12, 0x10, - 0x0a, 0x03, 0x55, 0x52, 0x47, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x55, 0x52, 0x47, - 0x12, 0x10, 0x0a, 0x03, 0x45, 0x43, 0x45, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x45, - 0x43, 0x45, 0x12, 0x10, 0x0a, 0x03, 0x43, 0x57, 0x52, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x03, 0x43, 0x57, 0x52, 0x12, 0x0e, 0x0a, 0x02, 0x4e, 0x53, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x02, 0x4e, 0x53, 0x22, 0x51, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x12, 0x1f, 0x0a, 0x0b, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x52, 0x0a, 0x04, 0x53, 0x43, 0x54, 0x50, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, - 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x30, 0x0a, 0x06, 0x49, - 0x43, 0x4d, 0x50, 0x76, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x30, 0x0a, - 0x06, 0x49, 0x43, 0x4d, 0x50, 0x76, 0x36, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, - 0x6e, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0x66, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x73, 0x75, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x73, 0x75, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x73, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x22, 0x40, 0x0a, 0x0f, 0x43, 0x69, 0x6c, 0x69, 0x75, - 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, - 0x0a, 0x08, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x07, 0x73, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x22, 0x82, 0x0a, 0x0a, 0x0a, 0x46, 0x6c, - 0x6f, 0x77, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, - 0x18, 0x1d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x66, 0x71, 0x64, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x71, 0x64, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x25, 0x0a, 0x0e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x10, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x77, 0x6f, - 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0e, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x25, 0x0a, 0x0e, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x70, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x64, 0x12, 0x29, 0x0a, 0x10, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x71, 0x64, 0x6e, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x46, 0x71, 0x64, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x11, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x1b, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, - 0x6f, 0x61, 0x64, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x43, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x66, - 0x66, 0x69, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1e, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x72, 0x61, - 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, - 0x07, 0x76, 0x65, 0x72, 0x64, 0x69, 0x63, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0d, - 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x56, 0x65, 0x72, 0x64, 0x69, 0x63, 0x74, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x64, 0x69, 0x63, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x68, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, - 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x08, 0x52, 0x05, 0x72, - 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6e, 0x73, 0x5f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x18, 0x12, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6e, 0x73, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x0a, - 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x15, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1b, - 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x16, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, - 0x74, 0x74, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x31, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x68, - 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x09, 0x74, 0x63, 0x70, - 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x54, 0x43, 0x50, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x08, 0x74, 0x63, - 0x70, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x18, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x49, - 0x50, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x69, 0x70, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x1c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0xce, - 0x01, 0x0a, 0x03, 0x44, 0x4e, 0x53, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x69, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x70, 0x73, 0x12, 0x10, - 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x74, 0x74, 0x6c, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x63, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x6f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x71, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x71, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x72, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x72, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, - 0x34, 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x2a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x05, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x12, 0x1d, - 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, - 0x0a, 0x07, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x61, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, - 0x6f, 0x70, 0x69, 0x63, 0x22, 0x3b, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x4c, 0x6f, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, - 0x2d, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x15, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x4c, 0x6f, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, - 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x6c, 0x6f, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x4c, 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x03, 0x63, 0x70, 0x75, 0x22, 0xf6, 0x04, 0x0a, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x33, - 0x0a, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x75, 0x6e, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x48, 0x00, 0x52, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x45, - 0x0a, 0x0d, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, - 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x13, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x18, 0x67, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x12, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, - 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x68, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x69, 0x70, 0x63, 0x61, 0x63, 0x68, - 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x69, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x49, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x69, 0x70, 0x63, - 0x61, 0x63, 0x68, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x0e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x18, 0x6a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, - 0x73, 0x65, 0x72, 0x74, 0x12, 0x48, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x78, 0x6c, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x58, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x09, 0x69, 0x70, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x49, 0x50, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x69, + 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x22, 0x44, 0x0a, 0x08, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xaa, 0x01, 0x0a, + 0x08, 0x54, 0x43, 0x50, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x46, 0x49, 0x4e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x46, 0x49, 0x4e, 0x12, 0x10, 0x0a, 0x03, 0x53, + 0x59, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x53, 0x59, 0x4e, 0x12, 0x10, 0x0a, + 0x03, 0x52, 0x53, 0x54, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x52, 0x53, 0x54, 0x12, + 0x10, 0x0a, 0x03, 0x50, 0x53, 0x48, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x50, 0x53, + 0x48, 0x12, 0x10, 0x0a, 0x03, 0x41, 0x43, 0x4b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, + 0x41, 0x43, 0x4b, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x52, 0x47, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x03, 0x55, 0x52, 0x47, 0x12, 0x10, 0x0a, 0x03, 0x45, 0x43, 0x45, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x03, 0x45, 0x43, 0x45, 0x12, 0x10, 0x0a, 0x03, 0x43, 0x57, 0x52, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x43, 0x57, 0x52, 0x12, 0x0e, 0x0a, 0x02, 0x4e, 0x53, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x4e, 0x53, 0x22, 0x51, 0x0a, 0x03, 0x55, 0x44, 0x50, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, + 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x52, 0x0a, 0x04, + 0x53, 0x43, 0x54, 0x50, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, + 0x22, 0x30, 0x0a, 0x06, 0x49, 0x43, 0x4d, 0x50, 0x76, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x22, 0x30, 0x0a, 0x06, 0x49, 0x43, 0x4d, 0x50, 0x76, 0x36, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x22, 0x6e, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x22, 0x40, 0x0a, 0x0f, + 0x43, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x22, 0xba, + 0x0c, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x77, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, + 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x28, + 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x5f, 0x78, 0x6c, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x49, 0x70, 0x58, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x66, 0x71, 0x64, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x46, 0x71, 0x64, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x10, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x37, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x77, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x70, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x70, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x71, 0x64, 0x6e, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x46, 0x71, 0x64, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0b, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x11, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x1b, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x43, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x66, 0x66, + 0x69, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1e, 0x20, 0x03, + 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, + 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x64, 0x69, 0x63, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0d, 0x2e, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x56, 0x65, 0x72, 0x64, 0x69, 0x63, 0x74, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x64, 0x69, 0x63, 0x74, 0x12, 0x3a, 0x0a, 0x10, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0e, 0x32, + 0x10, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x52, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x44, 0x65, 0x73, + 0x63, 0x12, 0x34, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x23, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x09, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, + 0x10, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x68, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x50, 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x08, 0x52, 0x05, + 0x72, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6e, 0x73, 0x5f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x18, 0x12, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6e, 0x73, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1f, + 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x15, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x16, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x08, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x68, 0x74, 0x74, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x31, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, + 0x68, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x09, 0x74, 0x63, + 0x70, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x54, 0x43, 0x50, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x08, 0x74, + 0x63, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x18, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x24, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x2e, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x49, 0x50, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x69, 0x70, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x42, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, + 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x46, + 0x6c, 0x6f, 0x77, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, + 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x61, 0x6c, 0x1a, 0x35, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x61, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x65, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x65, + 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xce, 0x01, 0x0a, 0x03, + 0x44, 0x4e, 0x53, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x70, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x70, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, + 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x16, 0x0a, + 0x06, 0x63, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x63, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x71, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x71, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x72, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x72, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x34, 0x0a, 0x0a, + 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x2a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x48, 0x54, + 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x05, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, + 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x61, + 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x70, + 0x69, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x63, 0x6f, + 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x22, 0x3b, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x91, + 0x01, 0x0a, 0x09, 0x4c, 0x6f, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x4c, 0x6f, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, + 0x75, 0x6d, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x6c, 0x6f, 0x73, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, + 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x63, + 0x70, 0x75, 0x22, 0xf6, 0x04, 0x0a, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x14, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x75, + 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x6e, + 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, - 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x0e, - 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, - 0x0a, 0x11, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, - 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x42, 0x0a, 0x10, 0x54, - 0x69, 0x6d, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, - 0x6d, 0x0a, 0x18, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, - 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x1d, 0x0a, 0x0a, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x59, - 0x0a, 0x19, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x4e, - 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x93, 0x01, 0x0a, 0x1a, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, + 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x45, 0x0a, 0x0d, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x66, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x52, 0x0a, 0x13, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x72, + 0x65, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x65, 0x67, 0x65, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x12, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x69, 0x70, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x69, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x49, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x69, 0x70, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, + 0x73, 0x65, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x73, 0x65, 0x72, + 0x74, 0x12, 0x48, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x6e, + 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, 0x11, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x42, 0x0a, 0x10, 0x54, 0x69, 0x6d, 0x65, + 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x04, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x6d, 0x0a, 0x18, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, + 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x59, 0x0a, 0x19, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, - 0x99, 0x02, 0x0a, 0x13, 0x49, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x0c, 0x6f, 0x6c, 0x64, 0x5f, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x6f, 0x6c, 0x64, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, - 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, - 0x70, 0x12, 0x1e, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x70, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x49, - 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x4b, - 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, 0x1d, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x22, 0x9a, 0x03, 0x0a, 0x19, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x73, 0x65, - 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4e, - 0x0a, 0x10, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x52, 0x0f, 0x66, - 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x50, - 0x0a, 0x11, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4e, 0x6f, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x52, 0x10, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x0d, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, - 0x78, 0x74, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x2c, 0x0a, 0x12, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, 0x6e, 0x74, - 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2b, 0x0a, - 0x19, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3c, 0x0a, 0x10, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xef, 0x02, 0x0a, 0x0a, 0x44, 0x65, 0x62, - 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x44, 0x65, 0x62, - 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x30, 0x0a, 0x04, 0x61, - 0x72, 0x67, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x61, 0x72, 0x67, 0x31, 0x12, 0x30, 0x0a, - 0x04, 0x61, 0x72, 0x67, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x61, 0x72, 0x67, 0x32, 0x12, - 0x30, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x61, 0x72, 0x67, - 0x33, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x63, - 0x70, 0x75, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x63, 0x70, 0x75, 0x2a, 0x39, 0x0a, 0x08, 0x46, 0x6c, - 0x6f, 0x77, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x33, 0x5f, 0x4c, - 0x34, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x37, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x53, - 0x4f, 0x43, 0x4b, 0x10, 0x03, 0x2a, 0x39, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x53, 0x50, 0x49, 0x52, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x45, - 0x53, 0x54, 0x5f, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x02, - 0x2a, 0xea, 0x01, 0x0a, 0x15, 0x54, 0x72, 0x61, 0x63, 0x65, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, - 0x08, 0x54, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x54, - 0x4f, 0x5f, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x4f, 0x5f, 0x53, - 0x54, 0x41, 0x43, 0x4b, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x4f, 0x5f, 0x4f, 0x56, 0x45, - 0x52, 0x4c, 0x41, 0x59, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x4f, 0x5f, 0x45, 0x4e, 0x44, - 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x52, 0x4f, 0x4d, 0x5f, - 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x52, - 0x4f, 0x4d, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x52, - 0x4f, 0x4d, 0x5f, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x52, 0x4f, - 0x4d, 0x5f, 0x53, 0x54, 0x41, 0x43, 0x4b, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x52, 0x4f, - 0x4d, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x4c, 0x41, 0x59, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x46, - 0x52, 0x4f, 0x4d, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x10, 0x0a, 0x12, 0x0e, 0x0a, - 0x0a, 0x54, 0x4f, 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x10, 0x0b, 0x2a, 0x48, 0x0a, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x93, 0x01, 0x0a, 0x1a, 0x45, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x99, 0x02, 0x0a, + 0x13, 0x49, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x0c, 0x6f, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x6f, 0x6c, 0x64, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x70, 0x12, 0x1e, + 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x49, 0x70, 0x12, 0x1f, + 0x0a, 0x0b, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x4b, 0x65, 0x79, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, 0x1d, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x9a, 0x03, + 0x0a, 0x19, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x10, 0x66, + 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x52, 0x0f, 0x66, 0x72, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x50, 0x0a, 0x11, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x52, 0x10, 0x62, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x29, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x74, + 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2c, + 0x0a, 0x12, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, 0x78, 0x74, 0x54, + 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2c, 0x0a, 0x12, + 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x54, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x63, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2b, 0x0a, 0x19, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3c, 0x0a, 0x10, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xef, 0x02, 0x0a, 0x0a, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x26, + 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x30, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x31, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x61, 0x72, 0x67, 0x31, 0x12, 0x30, 0x0a, 0x04, 0x61, 0x72, + 0x67, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x61, 0x72, 0x67, 0x32, 0x12, 0x30, 0x0a, 0x04, + 0x61, 0x72, 0x67, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x61, 0x72, 0x67, 0x33, 0x12, 0x18, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x03, 0x63, 0x70, 0x75, 0x2a, 0x39, 0x0a, 0x08, 0x46, 0x6c, 0x6f, 0x77, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x33, 0x5f, 0x4c, 0x34, 0x10, 0x01, + 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x37, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x4f, 0x43, 0x4b, + 0x10, 0x03, 0x2a, 0x39, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, + 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x53, 0x50, 0x49, 0x52, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x45, 0x53, 0x54, 0x5f, + 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x02, 0x2a, 0xea, 0x01, + 0x0a, 0x15, 0x54, 0x72, 0x61, 0x63, 0x65, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x4f, + 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4f, 0x5f, 0x48, + 0x4f, 0x53, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x4f, 0x5f, 0x53, 0x54, 0x41, 0x43, + 0x4b, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x4f, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x4c, 0x41, + 0x59, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x4f, 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, + 0x4e, 0x54, 0x10, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x4e, 0x44, + 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x52, 0x4f, 0x4d, 0x5f, + 0x50, 0x52, 0x4f, 0x58, 0x59, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x52, 0x4f, 0x4d, 0x5f, + 0x48, 0x4f, 0x53, 0x54, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x53, + 0x54, 0x41, 0x43, 0x4b, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x4f, + 0x56, 0x45, 0x52, 0x4c, 0x41, 0x59, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x52, 0x4f, 0x4d, + 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x4f, + 0x5f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x10, 0x0b, 0x2a, 0xa0, 0x01, 0x0a, 0x0b, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x52, + 0x41, 0x43, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10, 0x01, 0x12, 0x0f, 0x0a, + 0x0b, 0x45, 0x53, 0x54, 0x41, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x09, + 0x0a, 0x05, 0x52, 0x45, 0x50, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x4c, + 0x41, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x08, 0x52, 0x45, 0x4f, 0x50, 0x45, 0x4e, + 0x45, 0x44, 0x10, 0x05, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x52, 0x56, 0x36, + 0x5f, 0x45, 0x4e, 0x43, 0x41, 0x50, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x52, 0x56, 0x36, + 0x5f, 0x44, 0x45, 0x43, 0x41, 0x50, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x4e, 0x43, 0x52, + 0x59, 0x50, 0x54, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x4c, 0x41, 0x59, 0x10, 0x08, 0x2a, 0x48, 0x0a, 0x0a, 0x4c, 0x37, 0x46, 0x6c, 0x6f, 0x77, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4c, 0x37, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, @@ -5170,316 +5454,318 @@ var file_flow_flow_proto_rawDesc = []byte{ 0x12, 0x09, 0x0a, 0x05, 0x41, 0x55, 0x44, 0x49, 0x54, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x52, 0x41, 0x43, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x4c, 0x41, 0x54, 0x45, 0x44, 0x10, 0x07, 0x2a, 0xfb, 0x10, 0x0a, 0x0a, 0x44, 0x72, 0x6f, 0x70, + 0x4c, 0x41, 0x54, 0x45, 0x44, 0x10, 0x07, 0x2a, 0x97, 0x11, 0x0a, 0x0a, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x52, 0x4f, 0x50, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x17, 0x0a, 0x12, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, - 0x45, 0x5f, 0x4d, 0x41, 0x43, 0x10, 0x82, 0x01, 0x12, 0x1c, 0x0a, 0x17, 0x49, 0x4e, 0x56, 0x41, - 0x4c, 0x49, 0x44, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x49, 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x4d, 0x41, 0x43, 0x10, 0x83, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x50, 0x10, 0x84, 0x01, 0x12, 0x12, - 0x0a, 0x0d, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, - 0x85, 0x01, 0x12, 0x1b, 0x0a, 0x16, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x50, 0x41, - 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x44, 0x52, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x86, 0x01, 0x12, - 0x23, 0x0a, 0x1e, 0x43, 0x54, 0x5f, 0x54, 0x52, 0x55, 0x4e, 0x43, 0x41, 0x54, 0x45, 0x44, 0x5f, - 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, - 0x52, 0x10, 0x87, 0x01, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x54, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, - 0x4e, 0x47, 0x5f, 0x54, 0x43, 0x50, 0x5f, 0x41, 0x43, 0x4b, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, - 0x88, 0x01, 0x12, 0x1b, 0x0a, 0x16, 0x43, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x5f, 0x4c, 0x34, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x89, 0x01, 0x12, - 0x27, 0x0a, 0x22, 0x43, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x52, 0x45, - 0x41, 0x54, 0x45, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x8a, 0x01, 0x12, 0x1c, 0x0a, 0x17, 0x55, 0x4e, 0x53, 0x55, - 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x4c, 0x33, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, - 0x43, 0x4f, 0x4c, 0x10, 0x8b, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x49, 0x53, 0x53, 0x45, 0x44, - 0x5f, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x41, 0x4c, 0x4c, 0x10, 0x8c, 0x01, 0x12, 0x1c, 0x0a, - 0x17, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x54, - 0x4f, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x8d, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4c, 0x34, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, - 0x4f, 0x4c, 0x10, 0x8e, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x5f, 0x49, 0x43, 0x4d, 0x50, 0x56, 0x34, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x8f, 0x01, 0x12, + 0x1b, 0x0a, 0x12, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, + 0x45, 0x5f, 0x4d, 0x41, 0x43, 0x10, 0x82, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x20, 0x0a, 0x17, + 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x49, 0x4e, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x43, 0x10, 0x83, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x16, + 0x0a, 0x11, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, + 0x5f, 0x49, 0x50, 0x10, 0x84, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, + 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x85, 0x01, 0x12, 0x1b, 0x0a, 0x16, 0x49, 0x4e, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x44, 0x52, 0x4f, + 0x50, 0x50, 0x45, 0x44, 0x10, 0x86, 0x01, 0x12, 0x23, 0x0a, 0x1e, 0x43, 0x54, 0x5f, 0x54, 0x52, + 0x55, 0x4e, 0x43, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, + 0x49, 0x44, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x87, 0x01, 0x12, 0x1c, 0x0a, 0x17, + 0x43, 0x54, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x43, 0x50, 0x5f, 0x41, + 0x43, 0x4b, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x10, 0x88, 0x01, 0x12, 0x1b, 0x0a, 0x16, 0x43, 0x54, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4c, 0x34, 0x5f, 0x50, 0x52, 0x4f, 0x54, + 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x89, 0x01, 0x12, 0x2b, 0x0a, 0x22, 0x43, 0x54, 0x5f, 0x43, 0x41, + 0x4e, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x4e, 0x54, 0x52, + 0x59, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x8a, 0x01, + 0x1a, 0x02, 0x08, 0x01, 0x12, 0x1c, 0x0a, 0x17, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, + 0x54, 0x45, 0x44, 0x5f, 0x4c, 0x33, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, + 0x8b, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x49, 0x53, 0x53, 0x45, 0x44, 0x5f, 0x54, 0x41, 0x49, + 0x4c, 0x5f, 0x43, 0x41, 0x4c, 0x4c, 0x10, 0x8c, 0x01, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x4f, 0x5f, 0x50, 0x41, + 0x43, 0x4b, 0x45, 0x54, 0x10, 0x8d, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x5f, 0x4c, 0x34, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x8e, + 0x01, 0x12, 0x18, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x49, 0x43, 0x4d, + 0x50, 0x56, 0x34, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x8f, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x49, 0x43, 0x4d, 0x50, 0x56, 0x34, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x10, 0x90, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x5f, 0x49, 0x43, 0x4d, 0x50, 0x56, 0x36, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x91, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x49, 0x43, 0x4d, 0x50, 0x56, - 0x34, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x90, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x49, 0x43, 0x4d, 0x50, 0x56, 0x36, 0x5f, 0x43, 0x4f, 0x44, 0x45, - 0x10, 0x91, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x49, - 0x43, 0x4d, 0x50, 0x56, 0x36, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x92, 0x01, 0x12, 0x20, 0x0a, - 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x49, 0x45, 0x56, 0x49, 0x4e, - 0x47, 0x5f, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x93, 0x01, 0x12, - 0x24, 0x0a, 0x1f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x49, 0x45, 0x56, - 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, - 0x4e, 0x53, 0x10, 0x94, 0x01, 0x12, 0x1a, 0x0a, 0x15, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, + 0x36, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x92, 0x01, 0x12, 0x20, 0x0a, 0x1b, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x49, 0x45, 0x56, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x55, + 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x93, 0x01, 0x12, 0x28, 0x0a, 0x1f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x49, 0x45, 0x56, 0x49, 0x4e, 0x47, 0x5f, + 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x94, + 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x1e, 0x0a, 0x15, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x56, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x95, - 0x01, 0x12, 0x1e, 0x0a, 0x19, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4c, 0x33, 0x5f, - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x10, 0x96, - 0x01, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x54, 0x41, 0x4c, 0x45, 0x5f, 0x4f, 0x52, 0x5f, 0x55, 0x4e, - 0x52, 0x4f, 0x55, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x49, 0x50, 0x10, 0x97, 0x01, 0x12, 0x26, - 0x0a, 0x21, 0x4e, 0x4f, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x4f, - 0x43, 0x41, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x4f, - 0x55, 0x4e, 0x44, 0x10, 0x98, 0x01, 0x12, 0x27, 0x0a, 0x22, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x57, 0x48, 0x49, 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4e, 0x47, - 0x5f, 0x4c, 0x33, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x53, 0x55, 0x4d, 0x10, 0x99, 0x01, 0x12, - 0x27, 0x0a, 0x22, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x57, 0x48, 0x49, 0x4c, 0x45, 0x5f, 0x43, - 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x34, 0x5f, 0x43, 0x48, 0x45, - 0x43, 0x4b, 0x53, 0x55, 0x4d, 0x10, 0x9a, 0x01, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x54, 0x5f, 0x4d, - 0x41, 0x50, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, - 0x4c, 0x45, 0x44, 0x10, 0x9b, 0x01, 0x12, 0x22, 0x0a, 0x1d, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x5f, 0x49, 0x50, 0x56, 0x36, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, - 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x9c, 0x01, 0x12, 0x23, 0x0a, 0x1e, 0x49, 0x50, - 0x5f, 0x46, 0x52, 0x41, 0x47, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, - 0x4f, 0x54, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x9d, 0x01, 0x12, - 0x1e, 0x0a, 0x19, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, - 0x4e, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x9e, 0x01, 0x12, - 0x28, 0x0a, 0x23, 0x4e, 0x4f, 0x5f, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x4f, 0x52, 0x5f, - 0x45, 0x4e, 0x43, 0x41, 0x50, 0x53, 0x55, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, - 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0xa0, 0x01, 0x12, 0x23, 0x0a, 0x1e, 0x46, 0x41, 0x49, - 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x4f, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x5f, 0x49, 0x4e, - 0x54, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x4d, 0x41, 0x50, 0x10, 0xa1, 0x01, 0x12, 0x2b, - 0x0a, 0x26, 0x52, 0x45, 0x41, 0x43, 0x48, 0x45, 0x44, 0x5f, 0x45, 0x44, 0x54, 0x5f, 0x52, 0x41, - 0x54, 0x45, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x52, 0x4f, 0x50, - 0x5f, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x4f, 0x4e, 0x10, 0xa2, 0x01, 0x12, 0x26, 0x0a, 0x21, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x10, 0xa3, 0x01, 0x12, 0x1e, 0x0a, 0x19, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x48, 0x4f, 0x53, - 0x54, 0x5f, 0x49, 0x53, 0x5f, 0x55, 0x4e, 0x52, 0x45, 0x41, 0x43, 0x48, 0x41, 0x42, 0x4c, 0x45, - 0x10, 0xa4, 0x01, 0x12, 0x3a, 0x0a, 0x35, 0x4e, 0x4f, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, - 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, - 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x50, 0x45, 0x52, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x50, 0x4f, 0x4c, - 0x49, 0x43, 0x59, 0x5f, 0x44, 0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0xa5, 0x01, 0x12, - 0x1c, 0x0a, 0x17, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x4c, - 0x32, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0xa6, 0x01, 0x12, 0x22, 0x0a, - 0x1d, 0x4e, 0x4f, 0x5f, 0x4d, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x4f, 0x52, 0x5f, - 0x4e, 0x41, 0x54, 0x5f, 0x4d, 0x41, 0x53, 0x51, 0x55, 0x45, 0x52, 0x41, 0x44, 0x45, 0x10, 0xa7, - 0x01, 0x12, 0x2c, 0x0a, 0x27, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, - 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x4e, 0x41, - 0x54, 0x5f, 0x4d, 0x41, 0x53, 0x51, 0x55, 0x45, 0x52, 0x41, 0x44, 0x45, 0x10, 0xa8, 0x01, 0x12, - 0x16, 0x0a, 0x11, 0x46, 0x49, 0x42, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x45, 0x44, 0x10, 0xa9, 0x01, 0x12, 0x28, 0x0a, 0x23, 0x45, 0x4e, 0x43, 0x41, 0x50, - 0x53, 0x55, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x46, 0x46, 0x49, 0x43, - 0x5f, 0x49, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x48, 0x49, 0x42, 0x49, 0x54, 0x45, 0x44, 0x10, 0xaa, - 0x01, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x49, 0x44, 0x45, - 0x4e, 0x54, 0x49, 0x54, 0x59, 0x10, 0xab, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x10, 0xac, 0x01, 0x12, 0x13, 0x0a, - 0x0e, 0x4e, 0x41, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x4e, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, - 0xad, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x49, 0x53, 0x5f, 0x41, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, - 0x45, 0x52, 0x49, 0x50, 0x10, 0xae, 0x01, 0x12, 0x2e, 0x0a, 0x29, 0x46, 0x49, 0x52, 0x53, 0x54, - 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x43, 0x41, 0x4c, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x47, 0x52, 0x41, - 0x4d, 0x5f, 0x46, 0x52, 0x41, 0x47, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, - 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xaf, 0x01, 0x12, 0x1d, 0x0a, 0x18, 0x46, 0x4f, 0x52, 0x42, 0x49, - 0x44, 0x44, 0x45, 0x4e, 0x5f, 0x49, 0x43, 0x4d, 0x50, 0x56, 0x36, 0x5f, 0x4d, 0x45, 0x53, 0x53, - 0x41, 0x47, 0x45, 0x10, 0xb0, 0x01, 0x12, 0x21, 0x0a, 0x1c, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, - 0x5f, 0x42, 0x59, 0x5f, 0x4c, 0x42, 0x5f, 0x53, 0x52, 0x43, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, - 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0xb1, 0x01, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x4f, 0x43, - 0x4b, 0x45, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, - 0x44, 0x10, 0xb2, 0x01, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x4f, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, - 0x53, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0xb3, 0x01, 0x12, - 0x31, 0x0a, 0x2c, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, - 0x45, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, - 0xb4, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x45, 0x4e, - 0x59, 0x10, 0xb5, 0x01, 0x12, 0x12, 0x0a, 0x0d, 0x56, 0x4c, 0x41, 0x4e, 0x5f, 0x46, 0x49, 0x4c, - 0x54, 0x45, 0x52, 0x45, 0x44, 0x10, 0xb6, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x49, 0x4e, 0x56, 0x41, - 0x4c, 0x49, 0x44, 0x5f, 0x56, 0x4e, 0x49, 0x10, 0xb7, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x54, 0x43, 0x5f, 0x42, 0x55, 0x46, 0x46, 0x45, 0x52, 0x10, - 0xb8, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x10, 0xb9, 0x01, 0x12, - 0x17, 0x0a, 0x12, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x52, 0x56, 0x36, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xba, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x4e, 0x41, 0x54, 0x34, - 0x36, 0x10, 0xbb, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x4e, 0x41, 0x54, 0x36, 0x34, 0x10, 0xbc, 0x01, - 0x12, 0x12, 0x0a, 0x0d, 0x41, 0x55, 0x54, 0x48, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, - 0x44, 0x10, 0xbd, 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x43, 0x54, 0x5f, 0x4e, 0x4f, 0x5f, 0x4d, 0x41, - 0x50, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xbe, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x4e, - 0x41, 0x54, 0x5f, 0x4e, 0x4f, 0x5f, 0x4d, 0x41, 0x50, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, - 0xbf, 0x01, 0x12, 0x17, 0x0a, 0x12, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x43, 0x4c, - 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x44, 0x10, 0xc0, 0x01, 0x12, 0x27, 0x0a, 0x22, 0x55, - 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, - 0x43, 0x4f, 0x4c, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x44, 0x53, 0x52, 0x5f, 0x45, 0x4e, 0x43, 0x41, - 0x50, 0x10, 0xc1, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x4e, 0x4f, 0x5f, 0x45, 0x47, 0x52, 0x45, 0x53, - 0x53, 0x5f, 0x47, 0x41, 0x54, 0x45, 0x57, 0x41, 0x59, 0x10, 0xc2, 0x01, 0x12, 0x18, 0x0a, 0x13, - 0x55, 0x4e, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x46, - 0x46, 0x49, 0x43, 0x10, 0xc3, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x54, 0x4c, 0x5f, 0x45, 0x58, - 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0xc4, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x4e, 0x4f, 0x5f, - 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x44, 0x10, 0xc5, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x44, 0x52, - 0x4f, 0x50, 0x5f, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, - 0xc6, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x49, 0x47, 0x4d, 0x50, 0x5f, 0x48, 0x41, 0x4e, 0x44, 0x4c, - 0x45, 0x44, 0x10, 0xc7, 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x49, 0x47, 0x4d, 0x50, 0x5f, 0x53, 0x55, - 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x44, 0x10, 0xc8, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x4d, - 0x55, 0x4c, 0x54, 0x49, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x44, - 0x10, 0xc9, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x44, 0x52, 0x4f, 0x50, 0x5f, 0x48, 0x4f, 0x53, 0x54, - 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0xca, 0x01, 0x12, 0x16, 0x0a, - 0x11, 0x44, 0x52, 0x4f, 0x50, 0x5f, 0x45, 0x50, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x41, - 0x44, 0x59, 0x10, 0xcb, 0x01, 0x2a, 0x4a, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x52, 0x41, - 0x46, 0x46, 0x49, 0x43, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x47, 0x52, - 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, - 0x02, 0x2a, 0x8d, 0x02, 0x0a, 0x11, 0x44, 0x65, 0x62, 0x75, 0x67, 0x43, 0x61, 0x70, 0x74, 0x75, - 0x72, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x42, 0x47, 0x5f, 0x43, - 0x41, 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, - 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x59, 0x10, 0x04, - 0x12, 0x17, 0x0a, 0x13, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, - 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x4c, 0x42, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x42, 0x47, - 0x5f, 0x43, 0x41, 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x41, 0x46, 0x54, 0x45, 0x52, 0x5f, 0x56, - 0x34, 0x36, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, 0x50, 0x54, - 0x55, 0x52, 0x45, 0x5f, 0x41, 0x46, 0x54, 0x45, 0x52, 0x5f, 0x56, 0x36, 0x34, 0x10, 0x07, 0x12, - 0x19, 0x0a, 0x15, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x50, - 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x50, 0x52, 0x45, 0x10, 0x08, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x42, - 0x47, 0x5f, 0x43, 0x41, 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, - 0x50, 0x4f, 0x53, 0x54, 0x10, 0x09, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, - 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x53, 0x4e, 0x41, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x10, 0x0a, + 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x1e, 0x0a, 0x19, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x5f, 0x4c, 0x33, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, + 0x53, 0x53, 0x10, 0x96, 0x01, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x54, 0x41, 0x4c, 0x45, 0x5f, 0x4f, + 0x52, 0x5f, 0x55, 0x4e, 0x52, 0x4f, 0x55, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x49, 0x50, 0x10, + 0x97, 0x01, 0x12, 0x2a, 0x0a, 0x21, 0x4e, 0x4f, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, + 0x47, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, + 0x52, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x98, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x27, + 0x0a, 0x22, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x57, 0x48, 0x49, 0x4c, 0x45, 0x5f, 0x43, 0x4f, + 0x52, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x33, 0x5f, 0x43, 0x48, 0x45, 0x43, + 0x4b, 0x53, 0x55, 0x4d, 0x10, 0x99, 0x01, 0x12, 0x27, 0x0a, 0x22, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x57, 0x48, 0x49, 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4e, + 0x47, 0x5f, 0x4c, 0x34, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x53, 0x55, 0x4d, 0x10, 0x9a, 0x01, + 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x50, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x9b, 0x01, 0x12, 0x22, + 0x0a, 0x1d, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x49, 0x50, 0x56, 0x36, 0x5f, 0x45, + 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, + 0x9c, 0x01, 0x12, 0x23, 0x0a, 0x1e, 0x49, 0x50, 0x5f, 0x46, 0x52, 0x41, 0x47, 0x4d, 0x45, 0x4e, + 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, + 0x52, 0x54, 0x45, 0x44, 0x10, 0x9d, 0x01, 0x12, 0x1e, 0x0a, 0x19, 0x53, 0x45, 0x52, 0x56, 0x49, + 0x43, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, + 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x9e, 0x01, 0x12, 0x28, 0x0a, 0x23, 0x4e, 0x4f, 0x5f, 0x54, 0x55, + 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x43, 0x41, 0x50, 0x53, 0x55, 0x4c, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0xa0, + 0x01, 0x12, 0x23, 0x0a, 0x1e, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x4f, 0x5f, 0x49, + 0x4e, 0x53, 0x45, 0x52, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, + 0x4d, 0x41, 0x50, 0x10, 0xa1, 0x01, 0x12, 0x2b, 0x0a, 0x26, 0x52, 0x45, 0x41, 0x43, 0x48, 0x45, + 0x44, 0x5f, 0x45, 0x44, 0x54, 0x5f, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, + 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x52, 0x4f, 0x50, 0x5f, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x4f, 0x4e, + 0x10, 0xa2, 0x01, 0x12, 0x26, 0x0a, 0x21, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x43, + 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x4b, 0x49, + 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xa3, 0x01, 0x12, 0x1e, 0x0a, 0x19, 0x4c, + 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x48, 0x4f, 0x53, 0x54, 0x5f, 0x49, 0x53, 0x5f, 0x55, 0x4e, 0x52, + 0x45, 0x41, 0x43, 0x48, 0x41, 0x42, 0x4c, 0x45, 0x10, 0xa4, 0x01, 0x12, 0x3a, 0x0a, 0x35, 0x4e, + 0x4f, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x50, 0x45, 0x52, + 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x45, 0x43, 0x49, + 0x53, 0x49, 0x4f, 0x4e, 0x10, 0xa5, 0x01, 0x12, 0x1c, 0x0a, 0x17, 0x55, 0x4e, 0x53, 0x55, 0x50, + 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x4c, 0x32, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, + 0x4f, 0x4c, 0x10, 0xa6, 0x01, 0x12, 0x22, 0x0a, 0x1d, 0x4e, 0x4f, 0x5f, 0x4d, 0x41, 0x50, 0x50, + 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x4e, 0x41, 0x54, 0x5f, 0x4d, 0x41, 0x53, 0x51, + 0x55, 0x45, 0x52, 0x41, 0x44, 0x45, 0x10, 0xa7, 0x01, 0x12, 0x2c, 0x0a, 0x27, 0x55, 0x4e, 0x53, + 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, + 0x4c, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x4e, 0x41, 0x54, 0x5f, 0x4d, 0x41, 0x53, 0x51, 0x55, 0x45, + 0x52, 0x41, 0x44, 0x45, 0x10, 0xa8, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x46, 0x49, 0x42, 0x5f, 0x4c, + 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0xa9, 0x01, 0x12, + 0x28, 0x0a, 0x23, 0x45, 0x4e, 0x43, 0x41, 0x50, 0x53, 0x55, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x52, 0x41, 0x46, 0x46, 0x49, 0x43, 0x5f, 0x49, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x48, + 0x49, 0x42, 0x49, 0x54, 0x45, 0x44, 0x10, 0xaa, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x4e, 0x56, + 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x10, 0xab, 0x01, + 0x12, 0x13, 0x0a, 0x0e, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x45, 0x4e, 0x44, + 0x45, 0x52, 0x10, 0xac, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x4e, 0x41, 0x54, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x4e, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0xad, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x49, 0x53, + 0x5f, 0x41, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x49, 0x50, 0x10, 0xae, 0x01, 0x12, + 0x2e, 0x0a, 0x29, 0x46, 0x49, 0x52, 0x53, 0x54, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x43, 0x41, 0x4c, + 0x5f, 0x44, 0x41, 0x54, 0x41, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x46, 0x52, 0x41, 0x47, 0x4d, 0x45, + 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xaf, 0x01, 0x12, + 0x1d, 0x0a, 0x18, 0x46, 0x4f, 0x52, 0x42, 0x49, 0x44, 0x44, 0x45, 0x4e, 0x5f, 0x49, 0x43, 0x4d, + 0x50, 0x56, 0x36, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0xb0, 0x01, 0x12, 0x21, + 0x0a, 0x1c, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x5f, 0x42, 0x59, 0x5f, 0x4c, 0x42, 0x5f, 0x53, + 0x52, 0x43, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0xb1, + 0x01, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x4f, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, + 0x55, 0x50, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0xb2, 0x01, 0x12, 0x19, 0x0a, 0x14, + 0x53, 0x4f, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x10, 0xb3, 0x01, 0x12, 0x31, 0x0a, 0x2c, 0x50, 0x52, 0x4f, 0x58, 0x59, + 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x50, + 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0xb4, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x50, 0x4f, + 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x45, 0x4e, 0x59, 0x10, 0xb5, 0x01, 0x12, 0x12, 0x0a, 0x0d, + 0x56, 0x4c, 0x41, 0x4e, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x45, 0x44, 0x10, 0xb6, 0x01, + 0x12, 0x10, 0x0a, 0x0b, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x56, 0x4e, 0x49, 0x10, + 0xb7, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x54, 0x43, + 0x5f, 0x42, 0x55, 0x46, 0x46, 0x45, 0x52, 0x10, 0xb8, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4e, 0x4f, + 0x5f, 0x53, 0x49, 0x44, 0x10, 0xb9, 0x01, 0x12, 0x1b, 0x0a, 0x12, 0x4d, 0x49, 0x53, 0x53, 0x49, + 0x4e, 0x47, 0x5f, 0x53, 0x52, 0x56, 0x36, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0xba, 0x01, + 0x1a, 0x02, 0x08, 0x01, 0x12, 0x0a, 0x0a, 0x05, 0x4e, 0x41, 0x54, 0x34, 0x36, 0x10, 0xbb, 0x01, + 0x12, 0x0a, 0x0a, 0x05, 0x4e, 0x41, 0x54, 0x36, 0x34, 0x10, 0xbc, 0x01, 0x12, 0x12, 0x0a, 0x0d, + 0x41, 0x55, 0x54, 0x48, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0xbd, 0x01, + 0x12, 0x14, 0x0a, 0x0f, 0x43, 0x54, 0x5f, 0x4e, 0x4f, 0x5f, 0x4d, 0x41, 0x50, 0x5f, 0x46, 0x4f, + 0x55, 0x4e, 0x44, 0x10, 0xbe, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x4e, 0x41, 0x54, 0x5f, 0x4e, + 0x4f, 0x5f, 0x4d, 0x41, 0x50, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xbf, 0x01, 0x12, 0x17, + 0x0a, 0x12, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, + 0x52, 0x5f, 0x49, 0x44, 0x10, 0xc0, 0x01, 0x12, 0x27, 0x0a, 0x22, 0x55, 0x4e, 0x53, 0x55, 0x50, + 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, + 0x46, 0x4f, 0x52, 0x5f, 0x44, 0x53, 0x52, 0x5f, 0x45, 0x4e, 0x43, 0x41, 0x50, 0x10, 0xc1, 0x01, + 0x12, 0x16, 0x0a, 0x11, 0x4e, 0x4f, 0x5f, 0x45, 0x47, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x47, 0x41, + 0x54, 0x45, 0x57, 0x41, 0x59, 0x10, 0xc2, 0x01, 0x12, 0x18, 0x0a, 0x13, 0x55, 0x4e, 0x45, 0x4e, + 0x43, 0x52, 0x59, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x46, 0x46, 0x49, 0x43, 0x10, + 0xc3, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x54, 0x4c, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, + 0x45, 0x44, 0x10, 0xc4, 0x01, 0x12, 0x0f, 0x0a, 0x0a, 0x4e, 0x4f, 0x5f, 0x4e, 0x4f, 0x44, 0x45, + 0x5f, 0x49, 0x44, 0x10, 0xc5, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x44, 0x52, 0x4f, 0x50, 0x5f, 0x52, + 0x41, 0x54, 0x45, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0xc6, 0x01, 0x12, 0x11, + 0x0a, 0x0c, 0x49, 0x47, 0x4d, 0x50, 0x5f, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x44, 0x10, 0xc7, + 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x49, 0x47, 0x4d, 0x50, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, + 0x49, 0x42, 0x45, 0x44, 0x10, 0xc8, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x4d, 0x55, 0x4c, 0x54, 0x49, + 0x43, 0x41, 0x53, 0x54, 0x5f, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x44, 0x10, 0xc9, 0x01, 0x12, + 0x18, 0x0a, 0x13, 0x44, 0x52, 0x4f, 0x50, 0x5f, 0x48, 0x4f, 0x53, 0x54, 0x5f, 0x4e, 0x4f, 0x54, + 0x5f, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0xca, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x44, 0x52, 0x4f, + 0x50, 0x5f, 0x45, 0x50, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0xcb, + 0x01, 0x2a, 0x4a, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x52, 0x41, 0x46, 0x46, 0x49, 0x43, + 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x02, 0x2a, 0x8d, 0x02, + 0x0a, 0x11, 0x44, 0x65, 0x62, 0x75, 0x67, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, 0x50, 0x54, 0x55, + 0x52, 0x45, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, 0x50, 0x54, 0x55, 0x52, + 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x59, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, + 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x46, 0x52, 0x4f, 0x4d, + 0x5f, 0x4c, 0x42, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, 0x50, + 0x54, 0x55, 0x52, 0x45, 0x5f, 0x41, 0x46, 0x54, 0x45, 0x52, 0x5f, 0x56, 0x34, 0x36, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, - 0x53, 0x4e, 0x41, 0x54, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x0b, 0x22, 0x04, 0x08, 0x01, 0x10, - 0x03, 0x2a, 0x39, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, - 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x6f, 0x73, 0x74, 0x10, 0x02, 0x2a, 0x7f, 0x0a, 0x0f, - 0x4c, 0x6f, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x1d, 0x0a, 0x19, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4c, 0x4f, 0x53, 0x54, 0x5f, - 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x00, 0x12, 0x1a, - 0x0a, 0x16, 0x50, 0x45, 0x52, 0x46, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x49, 0x4e, - 0x47, 0x5f, 0x42, 0x55, 0x46, 0x46, 0x45, 0x52, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x42, - 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x53, 0x5f, 0x51, 0x55, - 0x45, 0x55, 0x45, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x55, 0x42, 0x42, 0x4c, 0x45, 0x5f, - 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x42, 0x55, 0x46, 0x46, 0x45, 0x52, 0x10, 0x03, 0x2a, 0xae, 0x02, - 0x0a, 0x0e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x17, 0x0a, 0x13, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x47, 0x45, - 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, - 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, - 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, - 0x45, 0x44, 0x10, 0x04, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, - 0x5f, 0x52, 0x45, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, - 0x45, 0x53, 0x53, 0x10, 0x05, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, - 0x54, 0x5f, 0x52, 0x45, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, - 0x4c, 0x55, 0x52, 0x45, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, - 0x4e, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, - 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, - 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x50, 0x43, 0x41, 0x43, 0x48, 0x45, 0x5f, 0x55, 0x50, - 0x53, 0x45, 0x52, 0x54, 0x45, 0x44, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x50, 0x43, 0x41, - 0x43, 0x48, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x14, 0x0a, - 0x10, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x53, 0x45, 0x52, 0x54, 0x45, - 0x44, 0x10, 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x44, - 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x0c, 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x2a, 0xd8, - 0x01, 0x0a, 0x16, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x4f, 0x43, - 0x4b, 0x5f, 0x58, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, 0x53, 0x4f, 0x43, 0x4b, 0x5f, - 0x58, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x5f, - 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x57, 0x44, 0x10, 0x01, 0x12, - 0x27, 0x0a, 0x23, 0x53, 0x4f, 0x43, 0x4b, 0x5f, 0x58, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, - 0x49, 0x4e, 0x54, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x46, 0x57, 0x44, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x53, 0x4f, 0x43, 0x4b, - 0x5f, 0x58, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x45, - 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x56, 0x10, 0x03, - 0x12, 0x27, 0x0a, 0x23, 0x53, 0x4f, 0x43, 0x4b, 0x5f, 0x58, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x50, - 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x56, 0x10, 0x04, 0x2a, 0x81, 0x0d, 0x0a, 0x0e, 0x44, 0x65, - 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, - 0x44, 0x42, 0x47, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x42, 0x47, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, - 0x49, 0x43, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x4f, 0x43, 0x41, - 0x4c, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x59, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, - 0x44, 0x42, 0x47, 0x5f, 0x45, 0x4e, 0x43, 0x41, 0x50, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x44, - 0x42, 0x47, 0x5f, 0x4c, 0x58, 0x43, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x15, - 0x0a, 0x11, 0x44, 0x42, 0x47, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x45, 0x4e, - 0x49, 0x45, 0x44, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, - 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x42, 0x47, 0x5f, - 0x43, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x56, 0x10, 0x07, 0x12, - 0x10, 0x0a, 0x0c, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, - 0x08, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, - 0x54, 0x45, 0x44, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, - 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x32, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x42, - 0x47, 0x5f, 0x49, 0x43, 0x4d, 0x50, 0x36, 0x5f, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x10, 0x0b, - 0x12, 0x15, 0x0a, 0x11, 0x44, 0x42, 0x47, 0x5f, 0x49, 0x43, 0x4d, 0x50, 0x36, 0x5f, 0x52, 0x45, - 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x0c, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x42, 0x47, 0x5f, 0x49, - 0x43, 0x4d, 0x50, 0x36, 0x5f, 0x4e, 0x53, 0x10, 0x0d, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x42, 0x47, - 0x5f, 0x49, 0x43, 0x4d, 0x50, 0x36, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, - 0x45, 0x44, 0x45, 0x44, 0x10, 0x0e, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, - 0x5f, 0x56, 0x45, 0x52, 0x44, 0x49, 0x43, 0x54, 0x10, 0x0f, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x42, - 0x47, 0x5f, 0x44, 0x45, 0x43, 0x41, 0x50, 0x10, 0x10, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x42, 0x47, - 0x5f, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x4d, 0x41, 0x50, 0x10, 0x11, 0x12, 0x11, 0x0a, 0x0d, 0x44, - 0x42, 0x47, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x54, 0x10, 0x12, 0x12, 0x0f, - 0x0a, 0x0b, 0x44, 0x42, 0x47, 0x5f, 0x54, 0x4f, 0x5f, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x13, 0x12, - 0x10, 0x0a, 0x0c, 0x44, 0x42, 0x47, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x54, 0x41, 0x43, 0x4b, 0x10, - 0x14, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x42, 0x47, 0x5f, 0x50, 0x4b, 0x54, 0x5f, 0x48, 0x41, 0x53, - 0x48, 0x10, 0x15, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x4c, - 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x46, 0x52, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x44, 0x10, 0x16, - 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, - 0x55, 0x50, 0x5f, 0x46, 0x52, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, - 0x10, 0x17, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x4c, 0x4f, - 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x4f, - 0x54, 0x10, 0x18, 0x12, 0x27, 0x0a, 0x23, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x4c, - 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x4c, - 0x4f, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x19, 0x12, 0x27, 0x0a, 0x23, - 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x42, - 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x56, 0x32, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x10, 0x1a, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, - 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, - 0x46, 0x41, 0x49, 0x4c, 0x10, 0x1b, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, - 0x36, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x53, 0x45, 0x5f, 0x4e, 0x41, 0x54, 0x5f, 0x4c, 0x4f, - 0x4f, 0x4b, 0x55, 0x50, 0x10, 0x1c, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, - 0x36, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x53, 0x45, 0x5f, 0x4e, 0x41, 0x54, 0x10, 0x1d, 0x12, - 0x1b, 0x0a, 0x17, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, - 0x50, 0x5f, 0x46, 0x52, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x44, 0x10, 0x1e, 0x12, 0x20, 0x0a, 0x1c, - 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x46, - 0x52, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x1f, 0x12, 0x1f, - 0x0a, 0x1b, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, - 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x10, 0x20, 0x12, - 0x27, 0x0a, 0x23, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, + 0x41, 0x46, 0x54, 0x45, 0x52, 0x5f, 0x56, 0x36, 0x34, 0x10, 0x07, 0x12, 0x19, 0x0a, 0x15, 0x44, + 0x42, 0x47, 0x5f, 0x43, 0x41, 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, + 0x5f, 0x50, 0x52, 0x45, 0x10, 0x08, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, + 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x50, 0x4f, 0x53, 0x54, + 0x10, 0x09, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, 0x50, 0x54, 0x55, 0x52, + 0x45, 0x5f, 0x53, 0x4e, 0x41, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x10, 0x0a, 0x12, 0x19, 0x0a, 0x15, + 0x44, 0x42, 0x47, 0x5f, 0x43, 0x41, 0x50, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x53, 0x4e, 0x41, 0x54, + 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x0b, 0x22, 0x04, 0x08, 0x01, 0x10, 0x03, 0x2a, 0x39, 0x0a, + 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x4c, 0x6f, 0x73, 0x74, 0x10, 0x02, 0x2a, 0x7f, 0x0a, 0x0f, 0x4c, 0x6f, 0x73, 0x74, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4c, 0x4f, 0x53, 0x54, 0x5f, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x45, + 0x52, 0x46, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x42, 0x55, + 0x46, 0x46, 0x45, 0x52, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, + 0x45, 0x52, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x53, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x10, + 0x02, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x55, 0x42, 0x42, 0x4c, 0x45, 0x5f, 0x52, 0x49, 0x4e, 0x47, + 0x5f, 0x42, 0x55, 0x46, 0x46, 0x45, 0x52, 0x10, 0x03, 0x2a, 0xae, 0x02, 0x0a, 0x0e, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, + 0x41, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x53, + 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x4f, 0x4c, 0x49, + 0x43, 0x59, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, + 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x04, + 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x47, + 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, + 0x05, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x52, 0x45, + 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x44, 0x50, + 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x08, 0x12, 0x14, + 0x0a, 0x10, 0x49, 0x50, 0x43, 0x41, 0x43, 0x48, 0x45, 0x5f, 0x55, 0x50, 0x53, 0x45, 0x52, 0x54, + 0x45, 0x44, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x50, 0x43, 0x41, 0x43, 0x48, 0x45, 0x5f, + 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x52, + 0x56, 0x49, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x53, 0x45, 0x52, 0x54, 0x45, 0x44, 0x10, 0x0b, 0x12, + 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, + 0x45, 0x44, 0x10, 0x0c, 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x2a, 0xd8, 0x01, 0x0a, 0x16, 0x53, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x4f, 0x43, 0x4b, 0x5f, 0x58, 0x4c, + 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, 0x53, 0x4f, 0x43, 0x4b, 0x5f, 0x58, 0x4c, 0x41, 0x54, + 0x45, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x5f, 0x44, 0x49, 0x52, 0x45, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x57, 0x44, 0x10, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x53, + 0x4f, 0x43, 0x4b, 0x5f, 0x58, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, + 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, + 0x57, 0x44, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x53, 0x4f, 0x43, 0x4b, 0x5f, 0x58, 0x4c, 0x41, + 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x5f, 0x44, 0x49, 0x52, + 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x56, 0x10, 0x03, 0x12, 0x27, 0x0a, 0x23, + 0x53, 0x4f, 0x43, 0x4b, 0x5f, 0x58, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, + 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x52, 0x45, 0x56, 0x10, 0x04, 0x2a, 0x81, 0x0d, 0x0a, 0x0e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x42, 0x47, 0x5f, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x0f, 0x0a, 0x0b, 0x44, 0x42, 0x47, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x49, 0x43, 0x10, 0x01, + 0x12, 0x16, 0x0a, 0x12, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x44, 0x45, + 0x4c, 0x49, 0x56, 0x45, 0x52, 0x59, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x42, 0x47, 0x5f, + 0x45, 0x4e, 0x43, 0x41, 0x50, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x42, 0x47, 0x5f, 0x4c, + 0x58, 0x43, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x42, + 0x47, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, + 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, + 0x55, 0x50, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x4c, + 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x52, 0x45, 0x56, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x44, + 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x08, 0x12, 0x12, 0x0a, + 0x0e, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, + 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x45, 0x44, 0x32, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x42, 0x47, 0x5f, 0x49, 0x43, + 0x4d, 0x50, 0x36, 0x5f, 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x10, 0x0b, 0x12, 0x15, 0x0a, 0x11, + 0x44, 0x42, 0x47, 0x5f, 0x49, 0x43, 0x4d, 0x50, 0x36, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, + 0x54, 0x10, 0x0c, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x42, 0x47, 0x5f, 0x49, 0x43, 0x4d, 0x50, 0x36, + 0x5f, 0x4e, 0x53, 0x10, 0x0d, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x42, 0x47, 0x5f, 0x49, 0x43, 0x4d, + 0x50, 0x36, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, + 0x10, 0x0e, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x56, 0x45, 0x52, + 0x44, 0x49, 0x43, 0x54, 0x10, 0x0f, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x42, 0x47, 0x5f, 0x44, 0x45, + 0x43, 0x41, 0x50, 0x10, 0x10, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x42, 0x47, 0x5f, 0x50, 0x4f, 0x52, + 0x54, 0x5f, 0x4d, 0x41, 0x50, 0x10, 0x11, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x42, 0x47, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x52, 0x45, 0x54, 0x10, 0x12, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x42, + 0x47, 0x5f, 0x54, 0x4f, 0x5f, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x13, 0x12, 0x10, 0x0a, 0x0c, 0x44, + 0x42, 0x47, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x54, 0x41, 0x43, 0x4b, 0x10, 0x14, 0x12, 0x10, 0x0a, + 0x0c, 0x44, 0x42, 0x47, 0x5f, 0x50, 0x4b, 0x54, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x15, 0x12, + 0x1b, 0x0a, 0x17, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, + 0x50, 0x5f, 0x46, 0x52, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x44, 0x10, 0x16, 0x12, 0x20, 0x0a, 0x1c, + 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x46, + 0x52, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x17, 0x12, 0x1f, + 0x0a, 0x1b, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, + 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x10, 0x18, 0x12, + 0x27, 0x0a, 0x23, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x53, - 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x21, 0x12, 0x27, 0x0a, 0x23, 0x44, 0x42, 0x47, 0x5f, - 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, + 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x19, 0x12, 0x27, 0x0a, 0x23, 0x44, 0x42, 0x47, 0x5f, + 0x4c, 0x42, 0x36, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x56, 0x32, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x10, - 0x22, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, + 0x1a, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, - 0x10, 0x23, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x52, 0x45, + 0x10, 0x1b, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x53, 0x45, 0x5f, 0x4e, 0x41, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, - 0x10, 0x24, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x52, 0x45, - 0x56, 0x45, 0x52, 0x53, 0x45, 0x5f, 0x4e, 0x41, 0x54, 0x10, 0x25, 0x12, 0x19, 0x0a, 0x15, 0x44, - 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x42, 0x41, 0x43, 0x4b, 0x5f, - 0x53, 0x4e, 0x41, 0x54, 0x10, 0x26, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, - 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x53, 0x4e, 0x41, 0x54, 0x5f, - 0x52, 0x45, 0x56, 0x10, 0x27, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, - 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x34, 0x10, 0x28, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x42, 0x47, - 0x5f, 0x52, 0x52, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, - 0x5f, 0x53, 0x45, 0x4c, 0x10, 0x29, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x42, 0x47, 0x5f, 0x52, 0x45, - 0x56, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x10, 0x2a, - 0x12, 0x17, 0x0a, 0x13, 0x44, 0x42, 0x47, 0x5f, 0x52, 0x45, 0x56, 0x5f, 0x50, 0x52, 0x4f, 0x58, - 0x59, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x2b, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x42, 0x47, - 0x5f, 0x52, 0x45, 0x56, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, - 0x45, 0x10, 0x2c, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x34, 0x5f, 0x50, 0x4f, - 0x4c, 0x49, 0x43, 0x59, 0x10, 0x2d, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x42, 0x47, 0x5f, 0x4e, 0x45, - 0x54, 0x44, 0x45, 0x56, 0x5f, 0x49, 0x4e, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x10, - 0x2e, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x42, 0x47, 0x5f, 0x4e, 0x45, 0x54, 0x44, 0x45, 0x56, 0x5f, - 0x45, 0x4e, 0x43, 0x41, 0x50, 0x34, 0x10, 0x2f, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x42, 0x47, 0x5f, - 0x43, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x34, 0x5f, 0x31, 0x10, 0x30, 0x12, 0x14, - 0x0a, 0x10, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x34, - 0x5f, 0x32, 0x10, 0x31, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x43, - 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x34, 0x10, 0x32, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x42, 0x47, - 0x5f, 0x43, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x36, 0x5f, 0x31, 0x10, 0x33, 0x12, - 0x14, 0x0a, 0x10, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, - 0x36, 0x5f, 0x32, 0x10, 0x34, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, - 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x36, 0x10, 0x35, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x42, - 0x47, 0x5f, 0x53, 0x4b, 0x49, 0x50, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x10, 0x36, 0x12, 0x11, - 0x0a, 0x0d, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x34, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, - 0x37, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x42, 0x47, 0x5f, 0x49, 0x50, 0x5f, 0x49, 0x44, 0x5f, 0x4d, - 0x41, 0x50, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x34, 0x10, 0x38, 0x12, 0x19, 0x0a, 0x15, - 0x44, 0x42, 0x47, 0x5f, 0x49, 0x50, 0x5f, 0x49, 0x44, 0x5f, 0x4d, 0x41, 0x50, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x45, 0x44, 0x36, 0x10, 0x39, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x42, 0x47, 0x5f, 0x49, - 0x50, 0x5f, 0x49, 0x44, 0x5f, 0x4d, 0x41, 0x50, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, - 0x34, 0x10, 0x3a, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x42, 0x47, 0x5f, 0x49, 0x50, 0x5f, 0x49, 0x44, - 0x5f, 0x4d, 0x41, 0x50, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x36, 0x10, 0x3b, 0x12, - 0x13, 0x0a, 0x0f, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x4c, 0x45, 0x5f, - 0x43, 0x54, 0x10, 0x3c, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x42, 0x47, 0x5f, 0x49, 0x4e, 0x48, 0x45, - 0x52, 0x49, 0x54, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x10, 0x3d, 0x12, 0x12, - 0x0a, 0x0e, 0x44, 0x42, 0x47, 0x5f, 0x53, 0x4b, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x34, - 0x10, 0x3e, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x42, 0x47, 0x5f, 0x53, 0x4b, 0x5f, 0x4c, 0x4f, 0x4f, - 0x4b, 0x55, 0x50, 0x36, 0x10, 0x3f, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x42, 0x47, 0x5f, 0x53, 0x4b, - 0x5f, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x40, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x42, 0x47, - 0x5f, 0x4c, 0x37, 0x5f, 0x4c, 0x42, 0x10, 0x41, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x42, 0x47, 0x5f, - 0x53, 0x4b, 0x49, 0x50, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x42, 0x42, 0x26, 0x5a, - 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x69, 0x6c, 0x69, - 0x75, 0x6d, 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x10, 0x1c, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x36, 0x5f, 0x52, 0x45, + 0x56, 0x45, 0x52, 0x53, 0x45, 0x5f, 0x4e, 0x41, 0x54, 0x10, 0x1d, 0x12, 0x1b, 0x0a, 0x17, 0x44, + 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x46, 0x52, + 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x44, 0x10, 0x1e, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x42, 0x47, 0x5f, + 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x46, 0x52, 0x4f, 0x4e, 0x54, + 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x1f, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x42, + 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x42, 0x41, 0x43, + 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x10, 0x20, 0x12, 0x27, 0x0a, 0x23, 0x44, + 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x42, 0x41, + 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, + 0x53, 0x53, 0x10, 0x21, 0x12, 0x27, 0x0a, 0x23, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, + 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, + 0x4c, 0x4f, 0x54, 0x5f, 0x56, 0x32, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x22, 0x12, 0x1f, 0x0a, + 0x1b, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x5f, + 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x23, 0x12, 0x1e, + 0x0a, 0x1a, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x53, + 0x45, 0x5f, 0x4e, 0x41, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x10, 0x24, 0x12, 0x17, + 0x0a, 0x13, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x53, + 0x45, 0x5f, 0x4e, 0x41, 0x54, 0x10, 0x25, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x42, 0x47, 0x5f, 0x4c, + 0x42, 0x34, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x53, 0x4e, 0x41, 0x54, + 0x10, 0x26, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x34, 0x5f, 0x4c, 0x4f, + 0x4f, 0x50, 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x53, 0x4e, 0x41, 0x54, 0x5f, 0x52, 0x45, 0x56, 0x10, + 0x27, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, + 0x55, 0x50, 0x34, 0x10, 0x28, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x42, 0x47, 0x5f, 0x52, 0x52, 0x5f, + 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x4c, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4c, + 0x10, 0x29, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x42, 0x47, 0x5f, 0x52, 0x45, 0x56, 0x5f, 0x50, 0x52, + 0x4f, 0x58, 0x59, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x10, 0x2a, 0x12, 0x17, 0x0a, 0x13, + 0x44, 0x42, 0x47, 0x5f, 0x52, 0x45, 0x56, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x46, 0x4f, + 0x55, 0x4e, 0x44, 0x10, 0x2b, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x42, 0x47, 0x5f, 0x52, 0x45, 0x56, + 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x2c, 0x12, + 0x11, 0x0a, 0x0d, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x34, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, + 0x10, 0x2d, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x42, 0x47, 0x5f, 0x4e, 0x45, 0x54, 0x44, 0x45, 0x56, + 0x5f, 0x49, 0x4e, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x10, 0x2e, 0x12, 0x15, 0x0a, + 0x11, 0x44, 0x42, 0x47, 0x5f, 0x4e, 0x45, 0x54, 0x44, 0x45, 0x56, 0x5f, 0x45, 0x4e, 0x43, 0x41, + 0x50, 0x34, 0x10, 0x2f, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x4c, + 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x34, 0x5f, 0x31, 0x10, 0x30, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x42, + 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x34, 0x5f, 0x32, 0x10, 0x31, + 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x45, 0x44, 0x34, 0x10, 0x32, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, + 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x36, 0x5f, 0x31, 0x10, 0x33, 0x12, 0x14, 0x0a, 0x10, 0x44, + 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x36, 0x5f, 0x32, 0x10, + 0x34, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x42, 0x47, 0x5f, 0x43, 0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x45, 0x44, 0x36, 0x10, 0x35, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x42, 0x47, 0x5f, 0x53, 0x4b, + 0x49, 0x50, 0x5f, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x10, 0x36, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x42, + 0x47, 0x5f, 0x4c, 0x34, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x37, 0x12, 0x19, 0x0a, + 0x15, 0x44, 0x42, 0x47, 0x5f, 0x49, 0x50, 0x5f, 0x49, 0x44, 0x5f, 0x4d, 0x41, 0x50, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x34, 0x10, 0x38, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x42, 0x47, 0x5f, + 0x49, 0x50, 0x5f, 0x49, 0x44, 0x5f, 0x4d, 0x41, 0x50, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x36, 0x10, 0x39, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x42, 0x47, 0x5f, 0x49, 0x50, 0x5f, 0x49, 0x44, + 0x5f, 0x4d, 0x41, 0x50, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x34, 0x10, 0x3a, 0x12, + 0x1a, 0x0a, 0x16, 0x44, 0x42, 0x47, 0x5f, 0x49, 0x50, 0x5f, 0x49, 0x44, 0x5f, 0x4d, 0x41, 0x50, + 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x36, 0x10, 0x3b, 0x12, 0x13, 0x0a, 0x0f, 0x44, + 0x42, 0x47, 0x5f, 0x4c, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x4c, 0x45, 0x5f, 0x43, 0x54, 0x10, 0x3c, + 0x12, 0x18, 0x0a, 0x14, 0x44, 0x42, 0x47, 0x5f, 0x49, 0x4e, 0x48, 0x45, 0x52, 0x49, 0x54, 0x5f, + 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x10, 0x3d, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x42, + 0x47, 0x5f, 0x53, 0x4b, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x34, 0x10, 0x3e, 0x12, 0x12, + 0x0a, 0x0e, 0x44, 0x42, 0x47, 0x5f, 0x53, 0x4b, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x55, 0x50, 0x36, + 0x10, 0x3f, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x42, 0x47, 0x5f, 0x53, 0x4b, 0x5f, 0x41, 0x53, 0x53, + 0x49, 0x47, 0x4e, 0x10, 0x40, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x42, 0x47, 0x5f, 0x4c, 0x37, 0x5f, + 0x4c, 0x42, 0x10, 0x41, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x42, 0x47, 0x5f, 0x53, 0x4b, 0x49, 0x50, + 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x42, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x63, + 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x6c, 0x6f, + 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5494,140 +5780,148 @@ func file_flow_flow_proto_rawDescGZIP() []byte { return file_flow_flow_proto_rawDescData } -var file_flow_flow_proto_enumTypes = make([]protoimpl.EnumInfo, 14) -var file_flow_flow_proto_msgTypes = make([]protoimpl.MessageInfo, 37) -var file_flow_flow_proto_goTypes = []interface{}{ +var file_flow_flow_proto_enumTypes = make([]protoimpl.EnumInfo, 15) +var file_flow_flow_proto_msgTypes = make([]protoimpl.MessageInfo, 38) +var file_flow_flow_proto_goTypes = []any{ (FlowType)(0), // 0: flow.FlowType (AuthType)(0), // 1: flow.AuthType (TraceObservationPoint)(0), // 2: flow.TraceObservationPoint - (L7FlowType)(0), // 3: flow.L7FlowType - (IPVersion)(0), // 4: flow.IPVersion - (Verdict)(0), // 5: flow.Verdict - (DropReason)(0), // 6: flow.DropReason - (TrafficDirection)(0), // 7: flow.TrafficDirection - (DebugCapturePoint)(0), // 8: flow.DebugCapturePoint - (EventType)(0), // 9: flow.EventType - (LostEventSource)(0), // 10: flow.LostEventSource - (AgentEventType)(0), // 11: flow.AgentEventType - (SocketTranslationPoint)(0), // 12: flow.SocketTranslationPoint - (DebugEventType)(0), // 13: flow.DebugEventType - (*Flow)(nil), // 14: flow.Flow - (*Layer4)(nil), // 15: flow.Layer4 - (*Layer7)(nil), // 16: flow.Layer7 - (*TraceContext)(nil), // 17: flow.TraceContext - (*TraceParent)(nil), // 18: flow.TraceParent - (*Endpoint)(nil), // 19: flow.Endpoint - (*Workload)(nil), // 20: flow.Workload - (*TCP)(nil), // 21: flow.TCP - (*IP)(nil), // 22: flow.IP - (*Ethernet)(nil), // 23: flow.Ethernet - (*TCPFlags)(nil), // 24: flow.TCPFlags - (*UDP)(nil), // 25: flow.UDP - (*SCTP)(nil), // 26: flow.SCTP - (*ICMPv4)(nil), // 27: flow.ICMPv4 - (*ICMPv6)(nil), // 28: flow.ICMPv6 - (*Policy)(nil), // 29: flow.Policy - (*EventTypeFilter)(nil), // 30: flow.EventTypeFilter - (*CiliumEventType)(nil), // 31: flow.CiliumEventType - (*FlowFilter)(nil), // 32: flow.FlowFilter - (*DNS)(nil), // 33: flow.DNS - (*HTTPHeader)(nil), // 34: flow.HTTPHeader - (*HTTP)(nil), // 35: flow.HTTP - (*Kafka)(nil), // 36: flow.Kafka - (*Service)(nil), // 37: flow.Service - (*LostEvent)(nil), // 38: flow.LostEvent - (*AgentEvent)(nil), // 39: flow.AgentEvent - (*AgentEventUnknown)(nil), // 40: flow.AgentEventUnknown - (*TimeNotification)(nil), // 41: flow.TimeNotification - (*PolicyUpdateNotification)(nil), // 42: flow.PolicyUpdateNotification - (*EndpointRegenNotification)(nil), // 43: flow.EndpointRegenNotification - (*EndpointUpdateNotification)(nil), // 44: flow.EndpointUpdateNotification - (*IPCacheNotification)(nil), // 45: flow.IPCacheNotification - (*ServiceUpsertNotificationAddr)(nil), // 46: flow.ServiceUpsertNotificationAddr - (*ServiceUpsertNotification)(nil), // 47: flow.ServiceUpsertNotification - (*ServiceDeleteNotification)(nil), // 48: flow.ServiceDeleteNotification - (*NetworkInterface)(nil), // 49: flow.NetworkInterface - (*DebugEvent)(nil), // 50: flow.DebugEvent - (*timestamppb.Timestamp)(nil), // 51: google.protobuf.Timestamp - (*wrapperspb.BoolValue)(nil), // 52: google.protobuf.BoolValue - (*anypb.Any)(nil), // 53: google.protobuf.Any - (*wrapperspb.Int32Value)(nil), // 54: google.protobuf.Int32Value - (*wrapperspb.UInt32Value)(nil), // 55: google.protobuf.UInt32Value + (TraceReason)(0), // 3: flow.TraceReason + (L7FlowType)(0), // 4: flow.L7FlowType + (IPVersion)(0), // 5: flow.IPVersion + (Verdict)(0), // 6: flow.Verdict + (DropReason)(0), // 7: flow.DropReason + (TrafficDirection)(0), // 8: flow.TrafficDirection + (DebugCapturePoint)(0), // 9: flow.DebugCapturePoint + (EventType)(0), // 10: flow.EventType + (LostEventSource)(0), // 11: flow.LostEventSource + (AgentEventType)(0), // 12: flow.AgentEventType + (SocketTranslationPoint)(0), // 13: flow.SocketTranslationPoint + (DebugEventType)(0), // 14: flow.DebugEventType + (*Flow)(nil), // 15: flow.Flow + (*Layer4)(nil), // 16: flow.Layer4 + (*Layer7)(nil), // 17: flow.Layer7 + (*TraceContext)(nil), // 18: flow.TraceContext + (*TraceParent)(nil), // 19: flow.TraceParent + (*Endpoint)(nil), // 20: flow.Endpoint + (*Workload)(nil), // 21: flow.Workload + (*TCP)(nil), // 22: flow.TCP + (*IP)(nil), // 23: flow.IP + (*Ethernet)(nil), // 24: flow.Ethernet + (*TCPFlags)(nil), // 25: flow.TCPFlags + (*UDP)(nil), // 26: flow.UDP + (*SCTP)(nil), // 27: flow.SCTP + (*ICMPv4)(nil), // 28: flow.ICMPv4 + (*ICMPv6)(nil), // 29: flow.ICMPv6 + (*Policy)(nil), // 30: flow.Policy + (*EventTypeFilter)(nil), // 31: flow.EventTypeFilter + (*CiliumEventType)(nil), // 32: flow.CiliumEventType + (*FlowFilter)(nil), // 33: flow.FlowFilter + (*DNS)(nil), // 34: flow.DNS + (*HTTPHeader)(nil), // 35: flow.HTTPHeader + (*HTTP)(nil), // 36: flow.HTTP + (*Kafka)(nil), // 37: flow.Kafka + (*Service)(nil), // 38: flow.Service + (*LostEvent)(nil), // 39: flow.LostEvent + (*AgentEvent)(nil), // 40: flow.AgentEvent + (*AgentEventUnknown)(nil), // 41: flow.AgentEventUnknown + (*TimeNotification)(nil), // 42: flow.TimeNotification + (*PolicyUpdateNotification)(nil), // 43: flow.PolicyUpdateNotification + (*EndpointRegenNotification)(nil), // 44: flow.EndpointRegenNotification + (*EndpointUpdateNotification)(nil), // 45: flow.EndpointUpdateNotification + (*IPCacheNotification)(nil), // 46: flow.IPCacheNotification + (*ServiceUpsertNotificationAddr)(nil), // 47: flow.ServiceUpsertNotificationAddr + (*ServiceUpsertNotification)(nil), // 48: flow.ServiceUpsertNotification + (*ServiceDeleteNotification)(nil), // 49: flow.ServiceDeleteNotification + (*NetworkInterface)(nil), // 50: flow.NetworkInterface + (*DebugEvent)(nil), // 51: flow.DebugEvent + (*FlowFilter_Experimental)(nil), // 52: flow.FlowFilter.Experimental + (*timestamppb.Timestamp)(nil), // 53: google.protobuf.Timestamp + (*wrapperspb.BoolValue)(nil), // 54: google.protobuf.BoolValue + (*anypb.Any)(nil), // 55: google.protobuf.Any + (*wrapperspb.Int32Value)(nil), // 56: google.protobuf.Int32Value + (*wrapperspb.UInt32Value)(nil), // 57: google.protobuf.UInt32Value } var file_flow_flow_proto_depIdxs = []int32{ - 51, // 0: flow.Flow.time:type_name -> google.protobuf.Timestamp - 5, // 1: flow.Flow.verdict:type_name -> flow.Verdict + 53, // 0: flow.Flow.time:type_name -> google.protobuf.Timestamp + 6, // 1: flow.Flow.verdict:type_name -> flow.Verdict 1, // 2: flow.Flow.auth_type:type_name -> flow.AuthType - 23, // 3: flow.Flow.ethernet:type_name -> flow.Ethernet - 22, // 4: flow.Flow.IP:type_name -> flow.IP - 15, // 5: flow.Flow.l4:type_name -> flow.Layer4 - 19, // 6: flow.Flow.source:type_name -> flow.Endpoint - 19, // 7: flow.Flow.destination:type_name -> flow.Endpoint + 24, // 3: flow.Flow.ethernet:type_name -> flow.Ethernet + 23, // 4: flow.Flow.IP:type_name -> flow.IP + 16, // 5: flow.Flow.l4:type_name -> flow.Layer4 + 20, // 6: flow.Flow.source:type_name -> flow.Endpoint + 20, // 7: flow.Flow.destination:type_name -> flow.Endpoint 0, // 8: flow.Flow.Type:type_name -> flow.FlowType - 16, // 9: flow.Flow.l7:type_name -> flow.Layer7 - 31, // 10: flow.Flow.event_type:type_name -> flow.CiliumEventType - 37, // 11: flow.Flow.source_service:type_name -> flow.Service - 37, // 12: flow.Flow.destination_service:type_name -> flow.Service - 7, // 13: flow.Flow.traffic_direction:type_name -> flow.TrafficDirection + 17, // 9: flow.Flow.l7:type_name -> flow.Layer7 + 32, // 10: flow.Flow.event_type:type_name -> flow.CiliumEventType + 38, // 11: flow.Flow.source_service:type_name -> flow.Service + 38, // 12: flow.Flow.destination_service:type_name -> flow.Service + 8, // 13: flow.Flow.traffic_direction:type_name -> flow.TrafficDirection 2, // 14: flow.Flow.trace_observation_point:type_name -> flow.TraceObservationPoint - 6, // 15: flow.Flow.drop_reason_desc:type_name -> flow.DropReason - 52, // 16: flow.Flow.is_reply:type_name -> google.protobuf.BoolValue - 8, // 17: flow.Flow.debug_capture_point:type_name -> flow.DebugCapturePoint - 49, // 18: flow.Flow.interface:type_name -> flow.NetworkInterface - 17, // 19: flow.Flow.trace_context:type_name -> flow.TraceContext - 12, // 20: flow.Flow.sock_xlate_point:type_name -> flow.SocketTranslationPoint - 53, // 21: flow.Flow.extensions:type_name -> google.protobuf.Any - 29, // 22: flow.Flow.egress_allowed_by:type_name -> flow.Policy - 29, // 23: flow.Flow.ingress_allowed_by:type_name -> flow.Policy - 21, // 24: flow.Layer4.TCP:type_name -> flow.TCP - 25, // 25: flow.Layer4.UDP:type_name -> flow.UDP - 27, // 26: flow.Layer4.ICMPv4:type_name -> flow.ICMPv4 - 28, // 27: flow.Layer4.ICMPv6:type_name -> flow.ICMPv6 - 26, // 28: flow.Layer4.SCTP:type_name -> flow.SCTP - 3, // 29: flow.Layer7.type:type_name -> flow.L7FlowType - 33, // 30: flow.Layer7.dns:type_name -> flow.DNS - 35, // 31: flow.Layer7.http:type_name -> flow.HTTP - 36, // 32: flow.Layer7.kafka:type_name -> flow.Kafka - 18, // 33: flow.TraceContext.parent:type_name -> flow.TraceParent - 20, // 34: flow.Endpoint.workloads:type_name -> flow.Workload - 24, // 35: flow.TCP.flags:type_name -> flow.TCPFlags - 4, // 36: flow.IP.ipVersion:type_name -> flow.IPVersion - 20, // 37: flow.FlowFilter.source_workload:type_name -> flow.Workload - 20, // 38: flow.FlowFilter.destination_workload:type_name -> flow.Workload - 7, // 39: flow.FlowFilter.traffic_direction:type_name -> flow.TrafficDirection - 5, // 40: flow.FlowFilter.verdict:type_name -> flow.Verdict - 30, // 41: flow.FlowFilter.event_type:type_name -> flow.EventTypeFilter - 34, // 42: flow.FlowFilter.http_header:type_name -> flow.HTTPHeader - 24, // 43: flow.FlowFilter.tcp_flags:type_name -> flow.TCPFlags - 4, // 44: flow.FlowFilter.ip_version:type_name -> flow.IPVersion - 34, // 45: flow.HTTP.headers:type_name -> flow.HTTPHeader - 10, // 46: flow.LostEvent.source:type_name -> flow.LostEventSource - 54, // 47: flow.LostEvent.cpu:type_name -> google.protobuf.Int32Value - 11, // 48: flow.AgentEvent.type:type_name -> flow.AgentEventType - 40, // 49: flow.AgentEvent.unknown:type_name -> flow.AgentEventUnknown - 41, // 50: flow.AgentEvent.agent_start:type_name -> flow.TimeNotification - 42, // 51: flow.AgentEvent.policy_update:type_name -> flow.PolicyUpdateNotification - 43, // 52: flow.AgentEvent.endpoint_regenerate:type_name -> flow.EndpointRegenNotification - 44, // 53: flow.AgentEvent.endpoint_update:type_name -> flow.EndpointUpdateNotification - 45, // 54: flow.AgentEvent.ipcache_update:type_name -> flow.IPCacheNotification - 47, // 55: flow.AgentEvent.service_upsert:type_name -> flow.ServiceUpsertNotification - 48, // 56: flow.AgentEvent.service_delete:type_name -> flow.ServiceDeleteNotification - 51, // 57: flow.TimeNotification.time:type_name -> google.protobuf.Timestamp - 55, // 58: flow.IPCacheNotification.old_identity:type_name -> google.protobuf.UInt32Value - 46, // 59: flow.ServiceUpsertNotification.frontend_address:type_name -> flow.ServiceUpsertNotificationAddr - 46, // 60: flow.ServiceUpsertNotification.backend_addresses:type_name -> flow.ServiceUpsertNotificationAddr - 13, // 61: flow.DebugEvent.type:type_name -> flow.DebugEventType - 19, // 62: flow.DebugEvent.source:type_name -> flow.Endpoint - 55, // 63: flow.DebugEvent.hash:type_name -> google.protobuf.UInt32Value - 55, // 64: flow.DebugEvent.arg1:type_name -> google.protobuf.UInt32Value - 55, // 65: flow.DebugEvent.arg2:type_name -> google.protobuf.UInt32Value - 55, // 66: flow.DebugEvent.arg3:type_name -> google.protobuf.UInt32Value - 54, // 67: flow.DebugEvent.cpu:type_name -> google.protobuf.Int32Value - 68, // [68:68] is the sub-list for method output_type - 68, // [68:68] is the sub-list for method input_type - 68, // [68:68] is the sub-list for extension type_name - 68, // [68:68] is the sub-list for extension extendee - 0, // [0:68] is the sub-list for field type_name + 3, // 15: flow.Flow.trace_reason:type_name -> flow.TraceReason + 7, // 16: flow.Flow.drop_reason_desc:type_name -> flow.DropReason + 54, // 17: flow.Flow.is_reply:type_name -> google.protobuf.BoolValue + 9, // 18: flow.Flow.debug_capture_point:type_name -> flow.DebugCapturePoint + 50, // 19: flow.Flow.interface:type_name -> flow.NetworkInterface + 18, // 20: flow.Flow.trace_context:type_name -> flow.TraceContext + 13, // 21: flow.Flow.sock_xlate_point:type_name -> flow.SocketTranslationPoint + 55, // 22: flow.Flow.extensions:type_name -> google.protobuf.Any + 30, // 23: flow.Flow.egress_allowed_by:type_name -> flow.Policy + 30, // 24: flow.Flow.ingress_allowed_by:type_name -> flow.Policy + 30, // 25: flow.Flow.egress_denied_by:type_name -> flow.Policy + 30, // 26: flow.Flow.ingress_denied_by:type_name -> flow.Policy + 22, // 27: flow.Layer4.TCP:type_name -> flow.TCP + 26, // 28: flow.Layer4.UDP:type_name -> flow.UDP + 28, // 29: flow.Layer4.ICMPv4:type_name -> flow.ICMPv4 + 29, // 30: flow.Layer4.ICMPv6:type_name -> flow.ICMPv6 + 27, // 31: flow.Layer4.SCTP:type_name -> flow.SCTP + 4, // 32: flow.Layer7.type:type_name -> flow.L7FlowType + 34, // 33: flow.Layer7.dns:type_name -> flow.DNS + 36, // 34: flow.Layer7.http:type_name -> flow.HTTP + 37, // 35: flow.Layer7.kafka:type_name -> flow.Kafka + 19, // 36: flow.TraceContext.parent:type_name -> flow.TraceParent + 21, // 37: flow.Endpoint.workloads:type_name -> flow.Workload + 25, // 38: flow.TCP.flags:type_name -> flow.TCPFlags + 5, // 39: flow.IP.ipVersion:type_name -> flow.IPVersion + 21, // 40: flow.FlowFilter.source_workload:type_name -> flow.Workload + 21, // 41: flow.FlowFilter.destination_workload:type_name -> flow.Workload + 8, // 42: flow.FlowFilter.traffic_direction:type_name -> flow.TrafficDirection + 6, // 43: flow.FlowFilter.verdict:type_name -> flow.Verdict + 7, // 44: flow.FlowFilter.drop_reason_desc:type_name -> flow.DropReason + 50, // 45: flow.FlowFilter.interface:type_name -> flow.NetworkInterface + 31, // 46: flow.FlowFilter.event_type:type_name -> flow.EventTypeFilter + 35, // 47: flow.FlowFilter.http_header:type_name -> flow.HTTPHeader + 25, // 48: flow.FlowFilter.tcp_flags:type_name -> flow.TCPFlags + 5, // 49: flow.FlowFilter.ip_version:type_name -> flow.IPVersion + 52, // 50: flow.FlowFilter.experimental:type_name -> flow.FlowFilter.Experimental + 35, // 51: flow.HTTP.headers:type_name -> flow.HTTPHeader + 11, // 52: flow.LostEvent.source:type_name -> flow.LostEventSource + 56, // 53: flow.LostEvent.cpu:type_name -> google.protobuf.Int32Value + 12, // 54: flow.AgentEvent.type:type_name -> flow.AgentEventType + 41, // 55: flow.AgentEvent.unknown:type_name -> flow.AgentEventUnknown + 42, // 56: flow.AgentEvent.agent_start:type_name -> flow.TimeNotification + 43, // 57: flow.AgentEvent.policy_update:type_name -> flow.PolicyUpdateNotification + 44, // 58: flow.AgentEvent.endpoint_regenerate:type_name -> flow.EndpointRegenNotification + 45, // 59: flow.AgentEvent.endpoint_update:type_name -> flow.EndpointUpdateNotification + 46, // 60: flow.AgentEvent.ipcache_update:type_name -> flow.IPCacheNotification + 48, // 61: flow.AgentEvent.service_upsert:type_name -> flow.ServiceUpsertNotification + 49, // 62: flow.AgentEvent.service_delete:type_name -> flow.ServiceDeleteNotification + 53, // 63: flow.TimeNotification.time:type_name -> google.protobuf.Timestamp + 57, // 64: flow.IPCacheNotification.old_identity:type_name -> google.protobuf.UInt32Value + 47, // 65: flow.ServiceUpsertNotification.frontend_address:type_name -> flow.ServiceUpsertNotificationAddr + 47, // 66: flow.ServiceUpsertNotification.backend_addresses:type_name -> flow.ServiceUpsertNotificationAddr + 14, // 67: flow.DebugEvent.type:type_name -> flow.DebugEventType + 20, // 68: flow.DebugEvent.source:type_name -> flow.Endpoint + 57, // 69: flow.DebugEvent.hash:type_name -> google.protobuf.UInt32Value + 57, // 70: flow.DebugEvent.arg1:type_name -> google.protobuf.UInt32Value + 57, // 71: flow.DebugEvent.arg2:type_name -> google.protobuf.UInt32Value + 57, // 72: flow.DebugEvent.arg3:type_name -> google.protobuf.UInt32Value + 56, // 73: flow.DebugEvent.cpu:type_name -> google.protobuf.Int32Value + 74, // [74:74] is the sub-list for method output_type + 74, // [74:74] is the sub-list for method input_type + 74, // [74:74] is the sub-list for extension type_name + 74, // [74:74] is the sub-list for extension extendee + 0, // [0:74] is the sub-list for field type_name } func init() { file_flow_flow_proto_init() } @@ -5636,7 +5930,7 @@ func file_flow_flow_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_flow_flow_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Flow); i { case 0: return &v.state @@ -5648,7 +5942,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Layer4); i { case 0: return &v.state @@ -5660,7 +5954,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Layer7); i { case 0: return &v.state @@ -5672,7 +5966,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*TraceContext); i { case 0: return &v.state @@ -5684,7 +5978,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*TraceParent); i { case 0: return &v.state @@ -5696,7 +5990,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Endpoint); i { case 0: return &v.state @@ -5708,7 +6002,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Workload); i { case 0: return &v.state @@ -5720,7 +6014,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*TCP); i { case 0: return &v.state @@ -5732,7 +6026,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*IP); i { case 0: return &v.state @@ -5744,7 +6038,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*Ethernet); i { case 0: return &v.state @@ -5756,7 +6050,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*TCPFlags); i { case 0: return &v.state @@ -5768,7 +6062,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*UDP); i { case 0: return &v.state @@ -5780,7 +6074,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*SCTP); i { case 0: return &v.state @@ -5792,7 +6086,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*ICMPv4); i { case 0: return &v.state @@ -5804,7 +6098,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*ICMPv6); i { case 0: return &v.state @@ -5816,7 +6110,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*Policy); i { case 0: return &v.state @@ -5828,7 +6122,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*EventTypeFilter); i { case 0: return &v.state @@ -5840,7 +6134,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*CiliumEventType); i { case 0: return &v.state @@ -5852,7 +6146,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*FlowFilter); i { case 0: return &v.state @@ -5864,7 +6158,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*DNS); i { case 0: return &v.state @@ -5876,7 +6170,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*HTTPHeader); i { case 0: return &v.state @@ -5888,7 +6182,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*HTTP); i { case 0: return &v.state @@ -5900,7 +6194,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*Kafka); i { case 0: return &v.state @@ -5912,7 +6206,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*Service); i { case 0: return &v.state @@ -5924,7 +6218,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*LostEvent); i { case 0: return &v.state @@ -5936,7 +6230,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*AgentEvent); i { case 0: return &v.state @@ -5948,7 +6242,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*AgentEventUnknown); i { case 0: return &v.state @@ -5960,7 +6254,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*TimeNotification); i { case 0: return &v.state @@ -5972,7 +6266,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*PolicyUpdateNotification); i { case 0: return &v.state @@ -5984,7 +6278,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*EndpointRegenNotification); i { case 0: return &v.state @@ -5996,7 +6290,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*EndpointUpdateNotification); i { case 0: return &v.state @@ -6008,7 +6302,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*IPCacheNotification); i { case 0: return &v.state @@ -6020,7 +6314,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*ServiceUpsertNotificationAddr); i { case 0: return &v.state @@ -6032,7 +6326,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[33].Exporter = func(v any, i int) any { switch v := v.(*ServiceUpsertNotification); i { case 0: return &v.state @@ -6044,7 +6338,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[34].Exporter = func(v any, i int) any { switch v := v.(*ServiceDeleteNotification); i { case 0: return &v.state @@ -6056,7 +6350,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[35].Exporter = func(v any, i int) any { switch v := v.(*NetworkInterface); i { case 0: return &v.state @@ -6068,7 +6362,7 @@ func file_flow_flow_proto_init() { return nil } } - file_flow_flow_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_flow_flow_proto_msgTypes[36].Exporter = func(v any, i int) any { switch v := v.(*DebugEvent); i { case 0: return &v.state @@ -6080,20 +6374,32 @@ func file_flow_flow_proto_init() { return nil } } + file_flow_flow_proto_msgTypes[37].Exporter = func(v any, i int) any { + switch v := v.(*FlowFilter_Experimental); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - file_flow_flow_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_flow_flow_proto_msgTypes[1].OneofWrappers = []any{ (*Layer4_TCP)(nil), (*Layer4_UDP)(nil), (*Layer4_ICMPv4)(nil), (*Layer4_ICMPv6)(nil), (*Layer4_SCTP)(nil), } - file_flow_flow_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_flow_flow_proto_msgTypes[2].OneofWrappers = []any{ (*Layer7_Dns)(nil), (*Layer7_Http)(nil), (*Layer7_Kafka)(nil), } - file_flow_flow_proto_msgTypes[25].OneofWrappers = []interface{}{ + file_flow_flow_proto_msgTypes[25].OneofWrappers = []any{ (*AgentEvent_Unknown)(nil), (*AgentEvent_AgentStart)(nil), (*AgentEvent_PolicyUpdate)(nil), @@ -6108,8 +6414,8 @@ func file_flow_flow_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_flow_flow_proto_rawDesc, - NumEnums: 14, - NumMessages: 37, + NumEnums: 15, + NumMessages: 38, NumExtensions: 0, NumServices: 0, }, diff --git a/vendor/github.com/cilium/cilium/api/v1/flow/flow.pb.json.go b/vendor/github.com/cilium/cilium/api/v1/flow/flow.pb.json.go index 09a8e88acb9..3ce01d7ba15 100644 --- a/vendor/github.com/cilium/cilium/api/v1/flow/flow.pb.json.go +++ b/vendor/github.com/cilium/cilium/api/v1/flow/flow.pb.json.go @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Hubble + // Code generated by protoc-gen-go-json. DO NOT EDIT. // source: flow/flow.proto @@ -10,591 +13,455 @@ import ( // MarshalJSON implements json.Marshaler func (msg *Flow) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *Flow) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *Layer4) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *Layer4) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *Layer7) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *Layer7) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *TraceContext) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *TraceContext) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *TraceParent) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *TraceParent) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *Endpoint) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *Endpoint) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *Workload) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *Workload) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *TCP) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *TCP) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *IP) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *IP) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *Ethernet) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *Ethernet) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *TCPFlags) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *TCPFlags) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *UDP) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *UDP) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *SCTP) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *SCTP) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *ICMPv4) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *ICMPv4) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *ICMPv6) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *ICMPv6) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *Policy) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *Policy) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *EventTypeFilter) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *EventTypeFilter) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *CiliumEventType) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *CiliumEventType) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *FlowFilter) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *FlowFilter) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) +} + +// MarshalJSON implements json.Marshaler +func (msg *FlowFilter_Experimental) MarshalJSON() ([]byte, error) { + return protojson.MarshalOptions{ + UseProtoNames: true, + }.Marshal(msg) +} + +// UnmarshalJSON implements json.Unmarshaler +func (msg *FlowFilter_Experimental) UnmarshalJSON(b []byte) error { + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *DNS) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *DNS) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *HTTPHeader) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *HTTPHeader) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *HTTP) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *HTTP) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *Kafka) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *Kafka) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *Service) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *Service) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *LostEvent) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *LostEvent) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *AgentEvent) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *AgentEvent) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *AgentEventUnknown) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *AgentEventUnknown) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *TimeNotification) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *TimeNotification) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *PolicyUpdateNotification) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *PolicyUpdateNotification) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *EndpointRegenNotification) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *EndpointRegenNotification) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *EndpointUpdateNotification) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *EndpointUpdateNotification) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *IPCacheNotification) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *IPCacheNotification) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *ServiceUpsertNotificationAddr) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *ServiceUpsertNotificationAddr) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *ServiceUpsertNotification) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *ServiceUpsertNotification) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *ServiceDeleteNotification) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *ServiceDeleteNotification) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *NetworkInterface) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *NetworkInterface) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } // MarshalJSON implements json.Marshaler func (msg *DebugEvent) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{ - UseEnumNumbers: false, - EmitUnpopulated: false, - UseProtoNames: true, + UseProtoNames: true, }.Marshal(msg) } // UnmarshalJSON implements json.Unmarshaler func (msg *DebugEvent) UnmarshalJSON(b []byte) error { - return protojson.UnmarshalOptions{ - DiscardUnknown: false, - }.Unmarshal(b, msg) + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } diff --git a/vendor/github.com/cilium/cilium/api/v1/flow/flow.proto b/vendor/github.com/cilium/cilium/api/v1/flow/flow.proto index aa04ad9f3cb..608011dfdf6 100644 --- a/vendor/github.com/cilium/cilium/api/v1/flow/flow.proto +++ b/vendor/github.com/cilium/cilium/api/v1/flow/flow.proto @@ -42,6 +42,8 @@ message Flow { // NodeName is the name of the node from which this Flow was captured. string node_name = 11; + // node labels in `foo=bar` format. + repeated string node_labels = 37; reserved 12; // removed, do not use @@ -77,6 +79,8 @@ message Flow { // Only applicable to cilium trace notifications, blank for other types. TraceObservationPoint trace_observation_point = 24; + // Cilium datapath trace reason info. + TraceReason trace_reason = 36; // only applicable to Verdict = DROPPED. DropReason drop_reason_desc = 25; @@ -125,6 +129,11 @@ message Flow { repeated Policy egress_allowed_by = 21001; // The CiliumNetworkPolicies allowing the ingress of the flow. repeated Policy ingress_allowed_by = 21002; + + // The CiliumNetworkPolicies denying the egress of the flow. + repeated Policy egress_denied_by = 21004; + // The CiliumNetworkPolicies denying the ingress of the flow. + repeated Policy ingress_denied_by = 21005; } enum FlowType { @@ -183,6 +192,18 @@ enum TraceObservationPoint { TO_NETWORK = 11; } +enum TraceReason { + TRACE_REASON_UNKNOWN = 0; + NEW = 1; + ESTABLISHED = 2; + REPLY = 3; + RELATED = 4; + REOPENED = 5 [deprecated=true]; + SRV6_ENCAP = 6; + SRV6_DECAP = 7; + ENCRYPT_OVERLAY = 8; +} + message Layer4 { oneof protocol { TCP TCP = 1; @@ -233,6 +254,7 @@ message TraceParent { message Endpoint { uint32 ID = 1; uint32 identity = 2; + string cluster_name = 7; string namespace = 3; // labels in `foo=bar` format. repeated string labels = 4; @@ -253,6 +275,9 @@ message TCP { message IP { string source = 1; + // source_xlated is the post translation source IP when the flow was SNATed + // (and in that case source is the the original source IP). + string source_xlated = 5; string destination = 2; IPVersion ipVersion = 3; // This field indicates whether the TraceReasonEncryptMask is set or not. @@ -335,15 +360,15 @@ enum DropReason { // non-drop reasons DROP_REASON_UNKNOWN = 0; // drop reasons - INVALID_SOURCE_MAC = 130; - INVALID_DESTINATION_MAC = 131; + INVALID_SOURCE_MAC = 130 [deprecated = true]; + INVALID_DESTINATION_MAC = 131 [deprecated = true]; INVALID_SOURCE_IP = 132; POLICY_DENIED = 133; INVALID_PACKET_DROPPED = 134; CT_TRUNCATED_OR_INVALID_HEADER = 135; CT_MISSING_TCP_ACK_FLAG = 136; CT_UNKNOWN_L4_PROTOCOL = 137; - CT_CANNOT_CREATE_ENTRY_FROM_PACKET = 138; + CT_CANNOT_CREATE_ENTRY_FROM_PACKET = 138 [deprecated = true]; UNSUPPORTED_L3_PROTOCOL = 139; MISSED_TAIL_CALL = 140; ERROR_WRITING_TO_PACKET = 141; @@ -353,11 +378,11 @@ enum DropReason { UNKNOWN_ICMPV6_CODE = 145; UNKNOWN_ICMPV6_TYPE = 146; ERROR_RETRIEVING_TUNNEL_KEY = 147; - ERROR_RETRIEVING_TUNNEL_OPTIONS = 148; - INVALID_GENEVE_OPTION = 149; + ERROR_RETRIEVING_TUNNEL_OPTIONS = 148 [deprecated = true]; + INVALID_GENEVE_OPTION = 149 [deprecated = true]; UNKNOWN_L3_TARGET_ADDRESS = 150; STALE_OR_UNROUTABLE_IP = 151; - NO_MATCHING_LOCAL_CONTAINER_FOUND = 152; + NO_MATCHING_LOCAL_CONTAINER_FOUND = 152 [deprecated = true]; ERROR_WHILE_CORRECTING_L3_CHECKSUM = 153; ERROR_WHILE_CORRECTING_L4_CHECKSUM = 154; CT_MAP_INSERTION_FAILED = 155; @@ -390,7 +415,7 @@ enum DropReason { INVALID_VNI = 183; INVALID_TC_BUFFER = 184; NO_SID = 185; - MISSING_SRV6_STATE = 186; + MISSING_SRV6_STATE = 186 [deprecated = true]; NAT46 = 187; NAT64 = 188; AUTH_REQUIRED = 189; @@ -477,6 +502,10 @@ message FlowFilter { // specified as an exact match (e.g. "1.1.1.1") or as a CIDR range (e.g. // "1.1.1.0/24"). repeated string source_ip = 1; + // source_ip_xlated filters by a list IPs. Each of the IPs can be specified + // as an exact match (e.g. "1.1.1.1") or as a CIDR range (e.g. + // "1.1.1.0/24"). + repeated string source_ip_xlated = 34; // source_pod filters by a list of source pod name prefixes, optionally // within a given namespace (e.g. "xwing", "kube-system/coredns-"). // The pod name can be omitted to only filter by namespace @@ -512,9 +541,12 @@ message FlowFilter { // traffic_direction filters flow by direction of the connection, e.g. // ingress or egress. repeated TrafficDirection traffic_direction = 30; - // only return Flows that were classified with a particular verdict. repeated Verdict verdict = 5; + // only applicable to Verdict = DROPPED (e.g. "POLICY_DENIED", "UNSUPPORTED_L3_PROTOCOL") + repeated DropReason drop_reason_desc = 33; + // interface is the network interface on which this flow was observed. + repeated NetworkInterface interface = 35; // event_type is the list of event types to filter on repeated EventTypeFilter event_type = 6; // http_status_code is a list of string prefixes (e.g. "4+", "404", "5+") @@ -553,12 +585,33 @@ message FlowFilter { // node_name is a list of patterns to filter on the node name, e.g. "k8s*", // "test-cluster/*.domain.com", "cluster-name/" etc. repeated string node_name = 24; + // node_labels filters on a list of node label selectors. Selectors support + // the full Kubernetes label selector syntax. + repeated string node_labels = 36; // filter based on IP version (ipv4 or ipv6) repeated IPVersion ip_version = 25; // trace_id filters flows by trace ID repeated string trace_id = 28; + + // Experimental contains filters that are not stable yet. Support for + // experimental features is always optional and subject to change. + message Experimental { + // cel_expression takes a common expression language (CEL) expression + // returning a boolean to determine if the filter matched or not. + // You can use the `_flow` variable to access fields on the flow using + // the flow.Flow protobuf field names. + // See https://github.com/google/cel-spec/blob/v0.14.0/doc/intro.md#introduction + // for more details on CEL and accessing the protobuf fields in CEL. + // Using CEL has performance cost compared to other filters, so prefer + // using non-CEL filters when possible, and try to specify CEL filters + // last in the list of FlowFilters. + repeated string cel_expression = 1; + } + // experimental contains filters that are not stable yet. Support for + // experimental features is always optional and subject to change. + Experimental experimental = 999; } // EventType are constants are based on the ones from . @@ -599,7 +652,7 @@ message HTTPHeader { string value = 2; } -// L7 information for HTTP flows. It corresponds to Cilium's [accesslog.LogRecordHTTP](https://github.com/cilium/cilium/blob/728c79e427438ab6f8d9375b62fccd6fed4ace3a/pkg/proxy/accesslog/record.go#L206) type. +// L7 information for HTTP flows. It corresponds to Cilium's [accesslog.LogRecordHTTP](https://github.com/cilium/cilium/blob/728c79e427438ab6f8d9375b62fccd6fed4ace3a/pkg/proxy/accesslog/record.go#L206) type. message HTTP { uint32 code = 1; string method = 2; diff --git a/vendor/github.com/cilium/cilium/api/v1/health/client/cilium_health_api_client.go b/vendor/github.com/cilium/cilium/api/v1/health/client/cilium_health_api_client.go deleted file mode 100644 index b6887e63d8c..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/client/cilium_health_api_client.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package client - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/health/client/connectivity" - "github.com/cilium/cilium/api/v1/health/client/restapi" -) - -// Default cilium health API HTTP client. -var Default = NewHTTPClient(nil) - -const ( - // DefaultHost is the default Host - // found in Meta (info) section of spec file - DefaultHost string = "localhost" - // DefaultBasePath is the default BasePath - // found in Meta (info) section of spec file - DefaultBasePath string = "/v1beta" -) - -// DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http"} - -// NewHTTPClient creates a new cilium health API HTTP client. -func NewHTTPClient(formats strfmt.Registry) *CiliumHealthAPI { - return NewHTTPClientWithConfig(formats, nil) -} - -// NewHTTPClientWithConfig creates a new cilium health API HTTP client, -// using a customizable transport config. -func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *CiliumHealthAPI { - // ensure nullable parameters have default - if cfg == nil { - cfg = DefaultTransportConfig() - } - - // create transport and client - transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) - return New(transport, formats) -} - -// New creates a new cilium health API client -func New(transport runtime.ClientTransport, formats strfmt.Registry) *CiliumHealthAPI { - // ensure nullable parameters have default - if formats == nil { - formats = strfmt.Default - } - - cli := new(CiliumHealthAPI) - cli.Transport = transport - cli.Connectivity = connectivity.New(transport, formats) - cli.Restapi = restapi.New(transport, formats) - return cli -} - -// DefaultTransportConfig creates a TransportConfig with the -// default settings taken from the meta section of the spec file. -func DefaultTransportConfig() *TransportConfig { - return &TransportConfig{ - Host: DefaultHost, - BasePath: DefaultBasePath, - Schemes: DefaultSchemes, - } -} - -// TransportConfig contains the transport related info, -// found in the meta section of the spec file. -type TransportConfig struct { - Host string - BasePath string - Schemes []string -} - -// WithHost overrides the default host, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithHost(host string) *TransportConfig { - cfg.Host = host - return cfg -} - -// WithBasePath overrides the default basePath, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { - cfg.BasePath = basePath - return cfg -} - -// WithSchemes overrides the default schemes, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { - cfg.Schemes = schemes - return cfg -} - -// CiliumHealthAPI is a client for cilium health API -type CiliumHealthAPI struct { - Connectivity connectivity.ClientService - - Restapi restapi.ClientService - - Transport runtime.ClientTransport -} - -// SetTransport changes the transport on the client and all its subresources -func (c *CiliumHealthAPI) SetTransport(transport runtime.ClientTransport) { - c.Transport = transport - c.Connectivity.SetTransport(transport) - c.Restapi.SetTransport(transport) -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/connectivity_client.go b/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/connectivity_client.go deleted file mode 100644 index b8918f4b2b7..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/connectivity_client.go +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package connectivity - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new connectivity API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for connectivity API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetStatus(params *GetStatusParams, opts ...ClientOption) (*GetStatusOK, error) - - PutStatusProbe(params *PutStatusProbeParams, opts ...ClientOption) (*PutStatusProbeOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GetStatus gets connectivity status of the cilium cluster - - Returns the connectivity status to all other cilium-health instances - -using interval-based probing. -*/ -func (a *Client) GetStatus(params *GetStatusParams, opts ...ClientOption) (*GetStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetStatusParams() - } - op := &runtime.ClientOperation{ - ID: "GetStatus", - Method: "GET", - PathPattern: "/status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetStatusReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetStatusOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetStatus: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - PutStatusProbe runs synchronous connectivity probe to determine status of the cilium cluster - - Runs a synchronous probe to all other cilium-health instances and - -returns the connectivity status. -*/ -func (a *Client) PutStatusProbe(params *PutStatusProbeParams, opts ...ClientOption) (*PutStatusProbeOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPutStatusProbeParams() - } - op := &runtime.ClientOperation{ - ID: "PutStatusProbe", - Method: "PUT", - PathPattern: "/status/probe", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PutStatusProbeReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PutStatusProbeOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for PutStatusProbe: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/get_status_parameters.go b/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/get_status_parameters.go deleted file mode 100644 index bf0cf91388d..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/get_status_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package connectivity - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetStatusParams creates a new GetStatusParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetStatusParams() *GetStatusParams { - return &GetStatusParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetStatusParamsWithTimeout creates a new GetStatusParams object -// with the ability to set a timeout on a request. -func NewGetStatusParamsWithTimeout(timeout time.Duration) *GetStatusParams { - return &GetStatusParams{ - timeout: timeout, - } -} - -// NewGetStatusParamsWithContext creates a new GetStatusParams object -// with the ability to set a context for a request. -func NewGetStatusParamsWithContext(ctx context.Context) *GetStatusParams { - return &GetStatusParams{ - Context: ctx, - } -} - -// NewGetStatusParamsWithHTTPClient creates a new GetStatusParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetStatusParamsWithHTTPClient(client *http.Client) *GetStatusParams { - return &GetStatusParams{ - HTTPClient: client, - } -} - -/* -GetStatusParams contains all the parameters to send to the API endpoint - - for the get status operation. - - Typically these are written to a http.Request. -*/ -type GetStatusParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStatusParams) WithDefaults() *GetStatusParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get status params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetStatusParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get status params -func (o *GetStatusParams) WithTimeout(timeout time.Duration) *GetStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get status params -func (o *GetStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get status params -func (o *GetStatusParams) WithContext(ctx context.Context) *GetStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get status params -func (o *GetStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get status params -func (o *GetStatusParams) WithHTTPClient(client *http.Client) *GetStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get status params -func (o *GetStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/get_status_responses.go b/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/get_status_responses.go deleted file mode 100644 index cf977a0df59..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/get_status_responses.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package connectivity - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/health/models" -) - -// GetStatusReader is a Reader for the GetStatus structure. -type GetStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetStatusOK creates a GetStatusOK with default headers values -func NewGetStatusOK() *GetStatusOK { - return &GetStatusOK{} -} - -/* -GetStatusOK describes a response with status code 200, with default header values. - -Success -*/ -type GetStatusOK struct { - Payload *models.HealthStatusResponse -} - -// IsSuccess returns true when this get status o k response has a 2xx status code -func (o *GetStatusOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get status o k response has a 3xx status code -func (o *GetStatusOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get status o k response has a 4xx status code -func (o *GetStatusOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get status o k response has a 5xx status code -func (o *GetStatusOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get status o k response a status code equal to that given -func (o *GetStatusOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetStatusOK) Error() string { - return fmt.Sprintf("[GET /status][%d] getStatusOK %+v", 200, o.Payload) -} - -func (o *GetStatusOK) String() string { - return fmt.Sprintf("[GET /status][%d] getStatusOK %+v", 200, o.Payload) -} - -func (o *GetStatusOK) GetPayload() *models.HealthStatusResponse { - return o.Payload -} - -func (o *GetStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HealthStatusResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/put_status_probe_parameters.go b/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/put_status_probe_parameters.go deleted file mode 100644 index 8708a9a2ad6..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/put_status_probe_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package connectivity - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewPutStatusProbeParams creates a new PutStatusProbeParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPutStatusProbeParams() *PutStatusProbeParams { - return &PutStatusProbeParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPutStatusProbeParamsWithTimeout creates a new PutStatusProbeParams object -// with the ability to set a timeout on a request. -func NewPutStatusProbeParamsWithTimeout(timeout time.Duration) *PutStatusProbeParams { - return &PutStatusProbeParams{ - timeout: timeout, - } -} - -// NewPutStatusProbeParamsWithContext creates a new PutStatusProbeParams object -// with the ability to set a context for a request. -func NewPutStatusProbeParamsWithContext(ctx context.Context) *PutStatusProbeParams { - return &PutStatusProbeParams{ - Context: ctx, - } -} - -// NewPutStatusProbeParamsWithHTTPClient creates a new PutStatusProbeParams object -// with the ability to set a custom HTTPClient for a request. -func NewPutStatusProbeParamsWithHTTPClient(client *http.Client) *PutStatusProbeParams { - return &PutStatusProbeParams{ - HTTPClient: client, - } -} - -/* -PutStatusProbeParams contains all the parameters to send to the API endpoint - - for the put status probe operation. - - Typically these are written to a http.Request. -*/ -type PutStatusProbeParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the put status probe params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutStatusProbeParams) WithDefaults() *PutStatusProbeParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the put status probe params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PutStatusProbeParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the put status probe params -func (o *PutStatusProbeParams) WithTimeout(timeout time.Duration) *PutStatusProbeParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the put status probe params -func (o *PutStatusProbeParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the put status probe params -func (o *PutStatusProbeParams) WithContext(ctx context.Context) *PutStatusProbeParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the put status probe params -func (o *PutStatusProbeParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the put status probe params -func (o *PutStatusProbeParams) WithHTTPClient(client *http.Client) *PutStatusProbeParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the put status probe params -func (o *PutStatusProbeParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *PutStatusProbeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/put_status_probe_responses.go b/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/put_status_probe_responses.go deleted file mode 100644 index 68d6dadbd35..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/client/connectivity/put_status_probe_responses.go +++ /dev/null @@ -1,225 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package connectivity - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/health/models" -) - -// PutStatusProbeReader is a Reader for the PutStatusProbe structure. -type PutStatusProbeReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PutStatusProbeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPutStatusProbeOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 403: - result := NewPutStatusProbeForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPutStatusProbeFailed() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPutStatusProbeOK creates a PutStatusProbeOK with default headers values -func NewPutStatusProbeOK() *PutStatusProbeOK { - return &PutStatusProbeOK{} -} - -/* -PutStatusProbeOK describes a response with status code 200, with default header values. - -Success -*/ -type PutStatusProbeOK struct { - Payload *models.HealthStatusResponse -} - -// IsSuccess returns true when this put status probe o k response has a 2xx status code -func (o *PutStatusProbeOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this put status probe o k response has a 3xx status code -func (o *PutStatusProbeOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put status probe o k response has a 4xx status code -func (o *PutStatusProbeOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this put status probe o k response has a 5xx status code -func (o *PutStatusProbeOK) IsServerError() bool { - return false -} - -// IsCode returns true when this put status probe o k response a status code equal to that given -func (o *PutStatusProbeOK) IsCode(code int) bool { - return code == 200 -} - -func (o *PutStatusProbeOK) Error() string { - return fmt.Sprintf("[PUT /status/probe][%d] putStatusProbeOK %+v", 200, o.Payload) -} - -func (o *PutStatusProbeOK) String() string { - return fmt.Sprintf("[PUT /status/probe][%d] putStatusProbeOK %+v", 200, o.Payload) -} - -func (o *PutStatusProbeOK) GetPayload() *models.HealthStatusResponse { - return o.Payload -} - -func (o *PutStatusProbeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HealthStatusResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPutStatusProbeForbidden creates a PutStatusProbeForbidden with default headers values -func NewPutStatusProbeForbidden() *PutStatusProbeForbidden { - return &PutStatusProbeForbidden{} -} - -/* -PutStatusProbeForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PutStatusProbeForbidden struct { -} - -// IsSuccess returns true when this put status probe forbidden response has a 2xx status code -func (o *PutStatusProbeForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put status probe forbidden response has a 3xx status code -func (o *PutStatusProbeForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put status probe forbidden response has a 4xx status code -func (o *PutStatusProbeForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this put status probe forbidden response has a 5xx status code -func (o *PutStatusProbeForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this put status probe forbidden response a status code equal to that given -func (o *PutStatusProbeForbidden) IsCode(code int) bool { - return code == 403 -} - -func (o *PutStatusProbeForbidden) Error() string { - return fmt.Sprintf("[PUT /status/probe][%d] putStatusProbeForbidden ", 403) -} - -func (o *PutStatusProbeForbidden) String() string { - return fmt.Sprintf("[PUT /status/probe][%d] putStatusProbeForbidden ", 403) -} - -func (o *PutStatusProbeForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutStatusProbeFailed creates a PutStatusProbeFailed with default headers values -func NewPutStatusProbeFailed() *PutStatusProbeFailed { - return &PutStatusProbeFailed{} -} - -/* -PutStatusProbeFailed describes a response with status code 500, with default header values. - -Internal error occurred while conducting connectivity probe -*/ -type PutStatusProbeFailed struct { - Payload models.Error -} - -// IsSuccess returns true when this put status probe failed response has a 2xx status code -func (o *PutStatusProbeFailed) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this put status probe failed response has a 3xx status code -func (o *PutStatusProbeFailed) IsRedirect() bool { - return false -} - -// IsClientError returns true when this put status probe failed response has a 4xx status code -func (o *PutStatusProbeFailed) IsClientError() bool { - return false -} - -// IsServerError returns true when this put status probe failed response has a 5xx status code -func (o *PutStatusProbeFailed) IsServerError() bool { - return true -} - -// IsCode returns true when this put status probe failed response a status code equal to that given -func (o *PutStatusProbeFailed) IsCode(code int) bool { - return code == 500 -} - -func (o *PutStatusProbeFailed) Error() string { - return fmt.Sprintf("[PUT /status/probe][%d] putStatusProbeFailed %+v", 500, o.Payload) -} - -func (o *PutStatusProbeFailed) String() string { - return fmt.Sprintf("[PUT /status/probe][%d] putStatusProbeFailed %+v", 500, o.Payload) -} - -func (o *PutStatusProbeFailed) GetPayload() models.Error { - return o.Payload -} - -func (o *PutStatusProbeFailed) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/client/restapi/get_healthz_parameters.go b/vendor/github.com/cilium/cilium/api/v1/health/client/restapi/get_healthz_parameters.go deleted file mode 100644 index 3eb0ce8c892..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/client/restapi/get_healthz_parameters.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package restapi - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetHealthzParams creates a new GetHealthzParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetHealthzParams() *GetHealthzParams { - return &GetHealthzParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetHealthzParamsWithTimeout creates a new GetHealthzParams object -// with the ability to set a timeout on a request. -func NewGetHealthzParamsWithTimeout(timeout time.Duration) *GetHealthzParams { - return &GetHealthzParams{ - timeout: timeout, - } -} - -// NewGetHealthzParamsWithContext creates a new GetHealthzParams object -// with the ability to set a context for a request. -func NewGetHealthzParamsWithContext(ctx context.Context) *GetHealthzParams { - return &GetHealthzParams{ - Context: ctx, - } -} - -// NewGetHealthzParamsWithHTTPClient creates a new GetHealthzParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetHealthzParamsWithHTTPClient(client *http.Client) *GetHealthzParams { - return &GetHealthzParams{ - HTTPClient: client, - } -} - -/* -GetHealthzParams contains all the parameters to send to the API endpoint - - for the get healthz operation. - - Typically these are written to a http.Request. -*/ -type GetHealthzParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get healthz params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetHealthzParams) WithDefaults() *GetHealthzParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get healthz params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetHealthzParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get healthz params -func (o *GetHealthzParams) WithTimeout(timeout time.Duration) *GetHealthzParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get healthz params -func (o *GetHealthzParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get healthz params -func (o *GetHealthzParams) WithContext(ctx context.Context) *GetHealthzParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get healthz params -func (o *GetHealthzParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get healthz params -func (o *GetHealthzParams) WithHTTPClient(client *http.Client) *GetHealthzParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get healthz params -func (o *GetHealthzParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetHealthzParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/client/restapi/get_healthz_responses.go b/vendor/github.com/cilium/cilium/api/v1/health/client/restapi/get_healthz_responses.go deleted file mode 100644 index c30a2118614..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/client/restapi/get_healthz_responses.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package restapi - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cilium/cilium/api/v1/health/models" -) - -// GetHealthzReader is a Reader for the GetHealthz structure. -type GetHealthzReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetHealthzReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetHealthzOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 500: - result := NewGetHealthzFailed() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewGetHealthzOK creates a GetHealthzOK with default headers values -func NewGetHealthzOK() *GetHealthzOK { - return &GetHealthzOK{} -} - -/* -GetHealthzOK describes a response with status code 200, with default header values. - -Success -*/ -type GetHealthzOK struct { - Payload *models.HealthResponse -} - -// IsSuccess returns true when this get healthz o k response has a 2xx status code -func (o *GetHealthzOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this get healthz o k response has a 3xx status code -func (o *GetHealthzOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get healthz o k response has a 4xx status code -func (o *GetHealthzOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this get healthz o k response has a 5xx status code -func (o *GetHealthzOK) IsServerError() bool { - return false -} - -// IsCode returns true when this get healthz o k response a status code equal to that given -func (o *GetHealthzOK) IsCode(code int) bool { - return code == 200 -} - -func (o *GetHealthzOK) Error() string { - return fmt.Sprintf("[GET /healthz][%d] getHealthzOK %+v", 200, o.Payload) -} - -func (o *GetHealthzOK) String() string { - return fmt.Sprintf("[GET /healthz][%d] getHealthzOK %+v", 200, o.Payload) -} - -func (o *GetHealthzOK) GetPayload() *models.HealthResponse { - return o.Payload -} - -func (o *GetHealthzOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.HealthResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetHealthzFailed creates a GetHealthzFailed with default headers values -func NewGetHealthzFailed() *GetHealthzFailed { - return &GetHealthzFailed{} -} - -/* -GetHealthzFailed describes a response with status code 500, with default header values. - -Failed to contact local Cilium daemon -*/ -type GetHealthzFailed struct { - Payload models.Error -} - -// IsSuccess returns true when this get healthz failed response has a 2xx status code -func (o *GetHealthzFailed) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this get healthz failed response has a 3xx status code -func (o *GetHealthzFailed) IsRedirect() bool { - return false -} - -// IsClientError returns true when this get healthz failed response has a 4xx status code -func (o *GetHealthzFailed) IsClientError() bool { - return false -} - -// IsServerError returns true when this get healthz failed response has a 5xx status code -func (o *GetHealthzFailed) IsServerError() bool { - return true -} - -// IsCode returns true when this get healthz failed response a status code equal to that given -func (o *GetHealthzFailed) IsCode(code int) bool { - return code == 500 -} - -func (o *GetHealthzFailed) Error() string { - return fmt.Sprintf("[GET /healthz][%d] getHealthzFailed %+v", 500, o.Payload) -} - -func (o *GetHealthzFailed) String() string { - return fmt.Sprintf("[GET /healthz][%d] getHealthzFailed %+v", 500, o.Payload) -} - -func (o *GetHealthzFailed) GetPayload() models.Error { - return o.Payload -} - -func (o *GetHealthzFailed) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/client/restapi/restapi_client.go b/vendor/github.com/cilium/cilium/api/v1/health/client/restapi/restapi_client.go deleted file mode 100644 index 6e5b1614a68..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/client/restapi/restapi_client.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package restapi - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new restapi API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for restapi API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetHealthz(params *GetHealthzParams, opts ...ClientOption) (*GetHealthzOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - GetHealthz gets health of cilium node - - Returns health and status information of the local node including - -load and uptime, as well as the status of related components including -the Cilium daemon. -*/ -func (a *Client) GetHealthz(params *GetHealthzParams, opts ...ClientOption) (*GetHealthzOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetHealthzParams() - } - op := &runtime.ClientOperation{ - ID: "GetHealthz", - Method: "GET", - PathPattern: "/healthz", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetHealthzReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetHealthzOK) - if ok { - return success, nil - } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for GetHealthz: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/models/connectivity_status.go b/vendor/github.com/cilium/cilium/api/v1/health/models/connectivity_status.go deleted file mode 100644 index 123e3b416f4..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/models/connectivity_status.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ConnectivityStatus Connectivity status of a path -// -// swagger:model ConnectivityStatus -type ConnectivityStatus struct { - - // Round trip time to node in nanoseconds - Latency int64 `json:"latency,omitempty"` - - // Human readable status/error/warning message - Status string `json:"status,omitempty"` -} - -// Validate validates this connectivity status -func (m *ConnectivityStatus) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this connectivity status based on context it is used -func (m *ConnectivityStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ConnectivityStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConnectivityStatus) UnmarshalBinary(b []byte) error { - var res ConnectivityStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/models/endpoint_status.go b/vendor/github.com/cilium/cilium/api/v1/health/models/endpoint_status.go deleted file mode 100644 index 4b8c9daa2ab..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/models/endpoint_status.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// EndpointStatus Connectivity status to host cilium-health endpoints via different paths -// -// swagger:model EndpointStatus -type EndpointStatus struct { - - // primary address - PrimaryAddress *PathStatus `json:"primary-address,omitempty"` - - // secondary addresses - SecondaryAddresses []*PathStatus `json:"secondary-addresses"` -} - -// Validate validates this endpoint status -func (m *EndpointStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrimaryAddress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecondaryAddresses(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EndpointStatus) validatePrimaryAddress(formats strfmt.Registry) error { - if swag.IsZero(m.PrimaryAddress) { // not required - return nil - } - - if m.PrimaryAddress != nil { - if err := m.PrimaryAddress.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primary-address") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primary-address") - } - return err - } - } - - return nil -} - -func (m *EndpointStatus) validateSecondaryAddresses(formats strfmt.Registry) error { - if swag.IsZero(m.SecondaryAddresses) { // not required - return nil - } - - for i := 0; i < len(m.SecondaryAddresses); i++ { - if swag.IsZero(m.SecondaryAddresses[i]) { // not required - continue - } - - if m.SecondaryAddresses[i] != nil { - if err := m.SecondaryAddresses[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondary-addresses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondary-addresses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this endpoint status based on the context it is used -func (m *EndpointStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePrimaryAddress(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecondaryAddresses(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *EndpointStatus) contextValidatePrimaryAddress(ctx context.Context, formats strfmt.Registry) error { - - if m.PrimaryAddress != nil { - if err := m.PrimaryAddress.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primary-address") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primary-address") - } - return err - } - } - - return nil -} - -func (m *EndpointStatus) contextValidateSecondaryAddresses(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SecondaryAddresses); i++ { - - if m.SecondaryAddresses[i] != nil { - if err := m.SecondaryAddresses[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondary-addresses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondary-addresses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *EndpointStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *EndpointStatus) UnmarshalBinary(b []byte) error { - var res EndpointStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/models/error.go b/vendor/github.com/cilium/cilium/api/v1/health/models/error.go deleted file mode 100644 index 83eccc8608d..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/models/error.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" -) - -// Error error -// -// swagger:model error -type Error string - -// Validate validates this error -func (m Error) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this error based on context it is used -func (m Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/models/health_response.go b/vendor/github.com/cilium/cilium/api/v1/health/models/health_response.go deleted file mode 100644 index d74c7044e80..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/models/health_response.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - ciliumModels "github.com/cilium/cilium/api/v1/models" - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HealthResponse Health and status information of local node -// -// swagger:model HealthResponse -type HealthResponse struct { - - // Status of Cilium daemon - Cilium ciliumModels.StatusResponse `json:"cilium,omitempty"` - - // System load on node - SystemLoad *LoadResponse `json:"system-load,omitempty"` - - // Uptime of cilium-health instance - Uptime string `json:"uptime,omitempty"` -} - -// Validate validates this health response -func (m *HealthResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCilium(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemLoad(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HealthResponse) validateCilium(formats strfmt.Registry) error { - if swag.IsZero(m.Cilium) { // not required - return nil - } - - if err := m.Cilium.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cilium") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cilium") - } - return err - } - - return nil -} - -func (m *HealthResponse) validateSystemLoad(formats strfmt.Registry) error { - if swag.IsZero(m.SystemLoad) { // not required - return nil - } - - if m.SystemLoad != nil { - if err := m.SystemLoad.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("system-load") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("system-load") - } - return err - } - } - - return nil -} - -// ContextValidate validate this health response based on the context it is used -func (m *HealthResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCilium(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSystemLoad(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HealthResponse) contextValidateCilium(ctx context.Context, formats strfmt.Registry) error { - - if err := m.Cilium.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cilium") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cilium") - } - return err - } - - return nil -} - -func (m *HealthResponse) contextValidateSystemLoad(ctx context.Context, formats strfmt.Registry) error { - - if m.SystemLoad != nil { - if err := m.SystemLoad.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("system-load") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("system-load") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HealthResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HealthResponse) UnmarshalBinary(b []byte) error { - var res HealthResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/models/health_status_response.go b/vendor/github.com/cilium/cilium/api/v1/health/models/health_status_response.go deleted file mode 100644 index 9f4a29d783f..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/models/health_status_response.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HealthStatusResponse Connectivity status to other daemons -// -// swagger:model HealthStatusResponse -type HealthStatusResponse struct { - - // Description of the local node - Local *SelfStatus `json:"local,omitempty"` - - // Connectivity status to each other node - Nodes []*NodeStatus `json:"nodes"` - - // timestamp - Timestamp string `json:"timestamp,omitempty"` -} - -// Validate validates this health status response -func (m *HealthStatusResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLocal(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HealthStatusResponse) validateLocal(formats strfmt.Registry) error { - if swag.IsZero(m.Local) { // not required - return nil - } - - if m.Local != nil { - if err := m.Local.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("local") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("local") - } - return err - } - } - - return nil -} - -func (m *HealthStatusResponse) validateNodes(formats strfmt.Registry) error { - if swag.IsZero(m.Nodes) { // not required - return nil - } - - for i := 0; i < len(m.Nodes); i++ { - if swag.IsZero(m.Nodes[i]) { // not required - continue - } - - if m.Nodes[i] != nil { - if err := m.Nodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this health status response based on the context it is used -func (m *HealthStatusResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLocal(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HealthStatusResponse) contextValidateLocal(ctx context.Context, formats strfmt.Registry) error { - - if m.Local != nil { - if err := m.Local.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("local") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("local") - } - return err - } - } - - return nil -} - -func (m *HealthStatusResponse) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Nodes); i++ { - - if m.Nodes[i] != nil { - if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HealthStatusResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HealthStatusResponse) UnmarshalBinary(b []byte) error { - var res HealthStatusResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/models/host_status.go b/vendor/github.com/cilium/cilium/api/v1/health/models/host_status.go deleted file mode 100644 index da114cf19ad..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/models/host_status.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// HostStatus Connectivity status to host cilium-health instance via different paths, -// probing via all known IP addresses -// -// swagger:model HostStatus -type HostStatus struct { - - // primary address - PrimaryAddress *PathStatus `json:"primary-address,omitempty"` - - // secondary addresses - SecondaryAddresses []*PathStatus `json:"secondary-addresses"` -} - -// Validate validates this host status -func (m *HostStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePrimaryAddress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSecondaryAddresses(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HostStatus) validatePrimaryAddress(formats strfmt.Registry) error { - if swag.IsZero(m.PrimaryAddress) { // not required - return nil - } - - if m.PrimaryAddress != nil { - if err := m.PrimaryAddress.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primary-address") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primary-address") - } - return err - } - } - - return nil -} - -func (m *HostStatus) validateSecondaryAddresses(formats strfmt.Registry) error { - if swag.IsZero(m.SecondaryAddresses) { // not required - return nil - } - - for i := 0; i < len(m.SecondaryAddresses); i++ { - if swag.IsZero(m.SecondaryAddresses[i]) { // not required - continue - } - - if m.SecondaryAddresses[i] != nil { - if err := m.SecondaryAddresses[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondary-addresses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondary-addresses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this host status based on the context it is used -func (m *HostStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePrimaryAddress(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSecondaryAddresses(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HostStatus) contextValidatePrimaryAddress(ctx context.Context, formats strfmt.Registry) error { - - if m.PrimaryAddress != nil { - if err := m.PrimaryAddress.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("primary-address") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("primary-address") - } - return err - } - } - - return nil -} - -func (m *HostStatus) contextValidateSecondaryAddresses(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SecondaryAddresses); i++ { - - if m.SecondaryAddresses[i] != nil { - if err := m.SecondaryAddresses[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("secondary-addresses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("secondary-addresses" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HostStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostStatus) UnmarshalBinary(b []byte) error { - var res HostStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/models/load_response.go b/vendor/github.com/cilium/cilium/api/v1/health/models/load_response.go deleted file mode 100644 index d0ceddba7b8..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/models/load_response.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// LoadResponse System load on node -// -// swagger:model LoadResponse -type LoadResponse struct { - - // Load average over the past 15 minutes - Last15min string `json:"last15min,omitempty"` - - // Load average over the past minute - Last1min string `json:"last1min,omitempty"` - - // Load average over the past 5 minutes - Last5min string `json:"last5min,omitempty"` -} - -// Validate validates this load response -func (m *LoadResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this load response based on context it is used -func (m *LoadResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *LoadResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *LoadResponse) UnmarshalBinary(b []byte) error { - var res LoadResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/models/node_status.go b/vendor/github.com/cilium/cilium/api/v1/health/models/node_status.go deleted file mode 100644 index 1bbd9953386..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/models/node_status.go +++ /dev/null @@ -1,204 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NodeStatus Connectivity status of a remote cilium-health instance -// -// swagger:model NodeStatus -type NodeStatus struct { - - // DEPRECATED: Please use the health-endpoint field instead, which - // supports reporting the status of different addresses for the endpoint - // - Endpoint *PathStatus `json:"endpoint,omitempty"` - - // Connectivity status to simulated endpoint on the node - HealthEndpoint *EndpointStatus `json:"health-endpoint,omitempty"` - - // Connectivity status to cilium-health instance on node IP - Host *HostStatus `json:"host,omitempty"` - - // Identifying name for the node - Name string `json:"name,omitempty"` -} - -// Validate validates this node status -func (m *NodeStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndpoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHealthEndpoint(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHost(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeStatus) validateEndpoint(formats strfmt.Registry) error { - if swag.IsZero(m.Endpoint) { // not required - return nil - } - - if m.Endpoint != nil { - if err := m.Endpoint.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpoint") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpoint") - } - return err - } - } - - return nil -} - -func (m *NodeStatus) validateHealthEndpoint(formats strfmt.Registry) error { - if swag.IsZero(m.HealthEndpoint) { // not required - return nil - } - - if m.HealthEndpoint != nil { - if err := m.HealthEndpoint.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("health-endpoint") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("health-endpoint") - } - return err - } - } - - return nil -} - -func (m *NodeStatus) validateHost(formats strfmt.Registry) error { - if swag.IsZero(m.Host) { // not required - return nil - } - - if m.Host != nil { - if err := m.Host.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -// ContextValidate validate this node status based on the context it is used -func (m *NodeStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHealthEndpoint(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHost(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NodeStatus) contextValidateEndpoint(ctx context.Context, formats strfmt.Registry) error { - - if m.Endpoint != nil { - if err := m.Endpoint.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endpoint") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endpoint") - } - return err - } - } - - return nil -} - -func (m *NodeStatus) contextValidateHealthEndpoint(ctx context.Context, formats strfmt.Registry) error { - - if m.HealthEndpoint != nil { - if err := m.HealthEndpoint.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("health-endpoint") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("health-endpoint") - } - return err - } - } - - return nil -} - -func (m *NodeStatus) contextValidateHost(ctx context.Context, formats strfmt.Registry) error { - - if m.Host != nil { - if err := m.Host.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NodeStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NodeStatus) UnmarshalBinary(b []byte) error { - var res NodeStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/models/path_status.go b/vendor/github.com/cilium/cilium/api/v1/health/models/path_status.go deleted file mode 100644 index 3a8669f3c63..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/models/path_status.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PathStatus Connectivity status via different paths, for example using different -// policies or service redirection -// -// swagger:model PathStatus -type PathStatus struct { - - // Connectivity status without policy applied - HTTP *ConnectivityStatus `json:"http,omitempty"` - - // Basic ping connectivity status to node IP - Icmp *ConnectivityStatus `json:"icmp,omitempty"` - - // IP address queried for the connectivity status - IP string `json:"ip,omitempty"` -} - -// Validate validates this path status -func (m *PathStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHTTP(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIcmp(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PathStatus) validateHTTP(formats strfmt.Registry) error { - if swag.IsZero(m.HTTP) { // not required - return nil - } - - if m.HTTP != nil { - if err := m.HTTP.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("http") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("http") - } - return err - } - } - - return nil -} - -func (m *PathStatus) validateIcmp(formats strfmt.Registry) error { - if swag.IsZero(m.Icmp) { // not required - return nil - } - - if m.Icmp != nil { - if err := m.Icmp.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("icmp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("icmp") - } - return err - } - } - - return nil -} - -// ContextValidate validate this path status based on the context it is used -func (m *PathStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHTTP(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIcmp(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *PathStatus) contextValidateHTTP(ctx context.Context, formats strfmt.Registry) error { - - if m.HTTP != nil { - if err := m.HTTP.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("http") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("http") - } - return err - } - } - - return nil -} - -func (m *PathStatus) contextValidateIcmp(ctx context.Context, formats strfmt.Registry) error { - - if m.Icmp != nil { - if err := m.Icmp.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("icmp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("icmp") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *PathStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PathStatus) UnmarshalBinary(b []byte) error { - var res PathStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/health/models/self_status.go b/vendor/github.com/cilium/cilium/api/v1/health/models/self_status.go deleted file mode 100644 index 0f860936715..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/health/models/self_status.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SelfStatus Description of the cilium-health node -// -// swagger:model SelfStatus -type SelfStatus struct { - - // Name associated with this node - Name string `json:"name,omitempty"` -} - -// Validate validates this self status -func (m *SelfStatus) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this self status based on context it is used -func (m *SelfStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SelfStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SelfStatus) UnmarshalBinary(b []byte) error { - var res SelfStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/models/attach_mode.go b/vendor/github.com/cilium/cilium/api/v1/models/attach_mode.go new file mode 100644 index 00000000000..d5ba71588cd --- /dev/null +++ b/vendor/github.com/cilium/cilium/api/v1/models/attach_mode.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright Authors of Cilium +// SPDX-License-Identifier: Apache-2.0 + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// AttachMode Core datapath attachment mode +// +// swagger:model AttachMode +type AttachMode string + +func NewAttachMode(value AttachMode) *AttachMode { + return &value +} + +// Pointer returns a pointer to a freshly-allocated AttachMode. +func (m AttachMode) Pointer() *AttachMode { + return &m +} + +const ( + + // AttachModeTc captures enum value "tc" + AttachModeTc AttachMode = "tc" + + // AttachModeTcx captures enum value "tcx" + AttachModeTcx AttachMode = "tcx" +) + +// for schema +var attachModeEnum []interface{} + +func init() { + var res []AttachMode + if err := json.Unmarshal([]byte(`["tc","tcx"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + attachModeEnum = append(attachModeEnum, v) + } +} + +func (m AttachMode) validateAttachModeEnum(path, location string, value AttachMode) error { + if err := validate.EnumCase(path, location, value, attachModeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this attach mode +func (m AttachMode) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateAttachModeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this attach mode based on context it is used +func (m AttachMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map.go b/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map.go index 2d3366ebac7..3516aa913b1 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map.go @@ -88,6 +88,11 @@ func (m *BPFMap) contextValidateCache(ctx context.Context, formats strfmt.Regist for i := 0; i < len(m.Cache); i++ { if m.Cache[i] != nil { + + if swag.IsZero(m.Cache[i]) { // not required + return nil + } + if err := m.Cache[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cache" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map_list.go b/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map_list.go index a42c67b80fc..f916187f6e8 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map_list.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map_list.go @@ -85,6 +85,11 @@ func (m *BPFMapList) contextValidateMaps(ctx context.Context, formats strfmt.Reg for i := 0; i < len(m.Maps); i++ { if m.Maps[i] != nil { + + if swag.IsZero(m.Maps[i]) { // not required + return nil + } + if err := m.Maps[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("maps" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map_status.go b/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map_status.go index f48508e90c1..a5c0813701b 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/b_p_f_map_status.go @@ -90,6 +90,11 @@ func (m *BPFMapStatus) contextValidateMaps(ctx context.Context, formats strfmt.R for i := 0; i < len(m.Maps); i++ { if m.Maps[i] != nil { + + if swag.IsZero(m.Maps[i]) { // not required + return nil + } + if err := m.Maps[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("maps" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/backend_address.go b/vendor/github.com/cilium/cilium/api/v1/models/backend_address.go index 3f17b81f491..678d83c50e5 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/backend_address.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/backend_address.go @@ -43,6 +43,9 @@ type BackendAddress struct { // Backend weight Weight *uint16 `json:"weight,omitempty"` + + // Optional name of the zone in which this backend runs + Zone string `json:"zone,omitempty"` } // Validate validates this backend address diff --git a/vendor/github.com/cilium/cilium/api/v1/models/bgp_path.go b/vendor/github.com/cilium/cilium/api/v1/models/bgp_path.go index 6a8f49befc9..2ac2c194015 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/bgp_path.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/bgp_path.go @@ -152,6 +152,11 @@ func (m *BgpPath) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *BgpPath) contextValidateFamily(ctx context.Context, formats strfmt.Registry) error { if m.Family != nil { + + if swag.IsZero(m.Family) { // not required + return nil + } + if err := m.Family.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("family") @@ -168,6 +173,11 @@ func (m *BgpPath) contextValidateFamily(ctx context.Context, formats strfmt.Regi func (m *BgpPath) contextValidateNlri(ctx context.Context, formats strfmt.Registry) error { if m.Nlri != nil { + + if swag.IsZero(m.Nlri) { // not required + return nil + } + if err := m.Nlri.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("nlri") @@ -186,6 +196,11 @@ func (m *BgpPath) contextValidatePathAttributes(ctx context.Context, formats str for i := 0; i < len(m.PathAttributes); i++ { if m.PathAttributes[i] != nil { + + if swag.IsZero(m.PathAttributes[i]) { // not required + return nil + } + if err := m.PathAttributes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("path-attributes" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/bgp_peer.go b/vendor/github.com/cilium/cilium/api/v1/models/bgp_peer.go index 59a63154ca4..0604c75c725 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/bgp_peer.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/bgp_peer.go @@ -191,6 +191,11 @@ func (m *BgpPeer) contextValidateFamilies(ctx context.Context, formats strfmt.Re for i := 0; i < len(m.Families); i++ { if m.Families[i] != nil { + + if swag.IsZero(m.Families[i]) { // not required + return nil + } + if err := m.Families[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("families" + "." + strconv.Itoa(i)) @@ -209,6 +214,11 @@ func (m *BgpPeer) contextValidateFamilies(ctx context.Context, formats strfmt.Re func (m *BgpPeer) contextValidateGracefulRestart(ctx context.Context, formats strfmt.Registry) error { if m.GracefulRestart != nil { + + if swag.IsZero(m.GracefulRestart) { // not required + return nil + } + if err := m.GracefulRestart.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("graceful-restart") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/bgp_route.go b/vendor/github.com/cilium/cilium/api/v1/models/bgp_route.go index 0c301f815f4..f054267549c 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/bgp_route.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/bgp_route.go @@ -94,6 +94,11 @@ func (m *BgpRoute) contextValidatePaths(ctx context.Context, formats strfmt.Regi for i := 0; i < len(m.Paths); i++ { if m.Paths[i] != nil { + + if swag.IsZero(m.Paths[i]) { // not required + return nil + } + if err := m.Paths[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("paths" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/bgp_route_policy.go b/vendor/github.com/cilium/cilium/api/v1/models/bgp_route_policy.go index d5d484d10c9..756d9c33524 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/bgp_route_policy.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/bgp_route_policy.go @@ -143,6 +143,11 @@ func (m *BgpRoutePolicy) contextValidateStatements(ctx context.Context, formats for i := 0; i < len(m.Statements); i++ { if m.Statements[i] != nil { + + if swag.IsZero(m.Statements[i]) { // not required + return nil + } + if err := m.Statements[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("statements" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/bgp_route_policy_statement.go b/vendor/github.com/cilium/cilium/api/v1/models/bgp_route_policy_statement.go index 09cdbd47e97..00f0c0678ed 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/bgp_route_policy_statement.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/bgp_route_policy_statement.go @@ -152,6 +152,11 @@ func (m *BgpRoutePolicyStatement) contextValidateMatchPrefixes(ctx context.Conte for i := 0; i < len(m.MatchPrefixes); i++ { if m.MatchPrefixes[i] != nil { + + if swag.IsZero(m.MatchPrefixes[i]) { // not required + return nil + } + if err := m.MatchPrefixes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("match-prefixes" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/c_id_r_policy.go b/vendor/github.com/cilium/cilium/api/v1/models/c_id_r_policy.go index 20befd1a05e..b98e611a6a4 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/c_id_r_policy.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/c_id_r_policy.go @@ -124,6 +124,11 @@ func (m *CIDRPolicy) contextValidateEgress(ctx context.Context, formats strfmt.R for i := 0; i < len(m.Egress); i++ { if m.Egress[i] != nil { + + if swag.IsZero(m.Egress[i]) { // not required + return nil + } + if err := m.Egress[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("egress" + "." + strconv.Itoa(i)) @@ -144,6 +149,11 @@ func (m *CIDRPolicy) contextValidateIngress(ctx context.Context, formats strfmt. for i := 0; i < len(m.Ingress); i++ { if m.Ingress[i] != nil { + + if swag.IsZero(m.Ingress[i]) { // not required + return nil + } + if err := m.Ingress[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ingress" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/cgroup_dump_metadata.go b/vendor/github.com/cilium/cilium/api/v1/models/cgroup_dump_metadata.go index 535eb54231f..c4e34a976da 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/cgroup_dump_metadata.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/cgroup_dump_metadata.go @@ -85,6 +85,11 @@ func (m *CgroupDumpMetadata) contextValidatePodMetadatas(ctx context.Context, fo for i := 0; i < len(m.PodMetadatas); i++ { if m.PodMetadatas[i] != nil { + + if swag.IsZero(m.PodMetadatas[i]) { // not required + return nil + } + if err := m.PodMetadatas[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pod-metadatas" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/cgroup_pod_metadata.go b/vendor/github.com/cilium/cilium/api/v1/models/cgroup_pod_metadata.go index 74fb793657f..13011e88a69 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/cgroup_pod_metadata.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/cgroup_pod_metadata.go @@ -94,6 +94,11 @@ func (m *CgroupPodMetadata) contextValidateContainers(ctx context.Context, forma for i := 0; i < len(m.Containers); i++ { if m.Containers[i] != nil { + + if swag.IsZero(m.Containers[i]) { // not required + return nil + } + if err := m.Containers[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("containers" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/cluster_mesh_status.go b/vendor/github.com/cilium/cilium/api/v1/models/cluster_mesh_status.go index c95c006350a..3835bbbf566 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/cluster_mesh_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/cluster_mesh_status.go @@ -90,6 +90,11 @@ func (m *ClusterMeshStatus) contextValidateClusters(ctx context.Context, formats for i := 0; i < len(m.Clusters); i++ { if m.Clusters[i] != nil { + + if swag.IsZero(m.Clusters[i]) { // not required + return nil + } + if err := m.Clusters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/cluster_node_status.go b/vendor/github.com/cilium/cilium/api/v1/models/cluster_node_status.go index 810c8a340d4..6824ddb1969 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/cluster_node_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/cluster_node_status.go @@ -128,6 +128,11 @@ func (m *ClusterNodeStatus) contextValidateNodesAdded(ctx context.Context, forma for i := 0; i < len(m.NodesAdded); i++ { if m.NodesAdded[i] != nil { + + if swag.IsZero(m.NodesAdded[i]) { // not required + return nil + } + if err := m.NodesAdded[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("nodes-added" + "." + strconv.Itoa(i)) @@ -148,6 +153,11 @@ func (m *ClusterNodeStatus) contextValidateNodesRemoved(ctx context.Context, for for i := 0; i < len(m.NodesRemoved); i++ { if m.NodesRemoved[i] != nil { + + if swag.IsZero(m.NodesRemoved[i]) { // not required + return nil + } + if err := m.NodesRemoved[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("nodes-removed" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/cluster_nodes_response.go b/vendor/github.com/cilium/cilium/api/v1/models/cluster_nodes_response.go index 7acf26fab04..232abceb395 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/cluster_nodes_response.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/cluster_nodes_response.go @@ -88,6 +88,11 @@ func (m *ClusterNodesResponse) contextValidateNodes(ctx context.Context, formats for i := 0; i < len(m.Nodes); i++ { if m.Nodes[i] != nil { + + if swag.IsZero(m.Nodes[i]) { // not required + return nil + } + if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/cluster_status.go b/vendor/github.com/cilium/cilium/api/v1/models/cluster_status.go index edac3d81104..6f1ca97cff6 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/cluster_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/cluster_status.go @@ -118,6 +118,11 @@ func (m *ClusterStatus) ContextValidate(ctx context.Context, formats strfmt.Regi func (m *ClusterStatus) contextValidateCiliumHealth(ctx context.Context, formats strfmt.Registry) error { if m.CiliumHealth != nil { + + if swag.IsZero(m.CiliumHealth) { // not required + return nil + } + if err := m.CiliumHealth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ciliumHealth") @@ -136,6 +141,11 @@ func (m *ClusterStatus) contextValidateNodes(ctx context.Context, formats strfmt for i := 0; i < len(m.Nodes); i++ { if m.Nodes[i] != nil { + + if swag.IsZero(m.Nodes[i]) { // not required + return nil + } + if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/controller_status.go b/vendor/github.com/cilium/cilium/api/v1/models/controller_status.go index 565da6f4a8f..2b591bd3e43 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/controller_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/controller_status.go @@ -131,6 +131,11 @@ func (m *ControllerStatus) ContextValidate(ctx context.Context, formats strfmt.R func (m *ControllerStatus) contextValidateConfiguration(ctx context.Context, formats strfmt.Registry) error { if m.Configuration != nil { + + if swag.IsZero(m.Configuration) { // not required + return nil + } + if err := m.Configuration.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("configuration") @@ -147,6 +152,11 @@ func (m *ControllerStatus) contextValidateConfiguration(ctx context.Context, for func (m *ControllerStatus) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/controller_statuses.go b/vendor/github.com/cilium/cilium/api/v1/models/controller_statuses.go index cd482b70e40..3b02a21622f 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/controller_statuses.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/controller_statuses.go @@ -57,6 +57,11 @@ func (m ControllerStatuses) ContextValidate(ctx context.Context, formats strfmt. for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration.go b/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration.go index 5c004dcf586..b7e5cf19599 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration.go @@ -108,6 +108,11 @@ func (m *DaemonConfiguration) ContextValidate(ctx context.Context, formats strfm func (m *DaemonConfiguration) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { if m.Spec != nil { + + if swag.IsZero(m.Spec) { // not required + return nil + } + if err := m.Spec.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("spec") @@ -124,6 +129,11 @@ func (m *DaemonConfiguration) contextValidateSpec(ctx context.Context, formats s func (m *DaemonConfiguration) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration_spec.go b/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration_spec.go index d44a5481b52..1cd8b1e9b66 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration_spec.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration_spec.go @@ -129,6 +129,10 @@ func (m *DaemonConfigurationSpec) ContextValidate(ctx context.Context, formats s func (m *DaemonConfigurationSpec) contextValidateOptions(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Options) { // not required + return nil + } + if err := m.Options.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("options") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration_status.go b/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration_status.go index 64daed2b0f4..942c4092881 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/daemon_configuration_status.go @@ -50,6 +50,9 @@ type DaemonConfigurationStatus struct { // Configured compatibility mode for --egress-multi-home-ip-rule-compat EgressMultiHomeIPRuleCompat bool `json:"egress-multi-home-ip-rule-compat,omitempty"` + // Enable route MTU for pod netns when CNI chaining is used + EnableRouteMTUForCNIChaining bool `json:"enableRouteMTUForCNIChaining,omitempty"` + // Immutable configuration (read-only) Immutable ConfigurationMap `json:"immutable,omitempty"` @@ -294,6 +297,11 @@ func (m *DaemonConfigurationStatus) ContextValidate(ctx context.Context, formats func (m *DaemonConfigurationStatus) contextValidateAddressing(ctx context.Context, formats strfmt.Registry) error { if m.Addressing != nil { + + if swag.IsZero(m.Addressing) { // not required + return nil + } + if err := m.Addressing.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("addressing") @@ -309,6 +317,10 @@ func (m *DaemonConfigurationStatus) contextValidateAddressing(ctx context.Contex func (m *DaemonConfigurationStatus) contextValidateDatapathMode(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.DatapathMode) { // not required + return nil + } + if err := m.DatapathMode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("datapathMode") @@ -323,6 +335,10 @@ func (m *DaemonConfigurationStatus) contextValidateDatapathMode(ctx context.Cont func (m *DaemonConfigurationStatus) contextValidateImmutable(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Immutable) { // not required + return nil + } + if err := m.Immutable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("immutable") @@ -338,6 +354,11 @@ func (m *DaemonConfigurationStatus) contextValidateImmutable(ctx context.Context func (m *DaemonConfigurationStatus) contextValidateKvstoreConfiguration(ctx context.Context, formats strfmt.Registry) error { if m.KvstoreConfiguration != nil { + + if swag.IsZero(m.KvstoreConfiguration) { // not required + return nil + } + if err := m.KvstoreConfiguration.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("kvstoreConfiguration") @@ -354,6 +375,11 @@ func (m *DaemonConfigurationStatus) contextValidateKvstoreConfiguration(ctx cont func (m *DaemonConfigurationStatus) contextValidateMasqueradeProtocols(ctx context.Context, formats strfmt.Registry) error { if m.MasqueradeProtocols != nil { + + if swag.IsZero(m.MasqueradeProtocols) { // not required + return nil + } + if err := m.MasqueradeProtocols.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("masqueradeProtocols") @@ -370,6 +396,11 @@ func (m *DaemonConfigurationStatus) contextValidateMasqueradeProtocols(ctx conte func (m *DaemonConfigurationStatus) contextValidateNodeMonitor(ctx context.Context, formats strfmt.Registry) error { if m.NodeMonitor != nil { + + if swag.IsZero(m.NodeMonitor) { // not required + return nil + } + if err := m.NodeMonitor.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("nodeMonitor") @@ -386,6 +417,11 @@ func (m *DaemonConfigurationStatus) contextValidateNodeMonitor(ctx context.Conte func (m *DaemonConfigurationStatus) contextValidateRealized(ctx context.Context, formats strfmt.Registry) error { if m.Realized != nil { + + if swag.IsZero(m.Realized) { // not required + return nil + } + if err := m.Realized.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("realized") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/datapath_mode.go b/vendor/github.com/cilium/cilium/api/v1/models/datapath_mode.go index 7bb094dac78..a5ac8e87c42 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/datapath_mode.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/datapath_mode.go @@ -35,6 +35,12 @@ const ( // DatapathModeVeth captures enum value "veth" DatapathModeVeth DatapathMode = "veth" + + // DatapathModeNetkit captures enum value "netkit" + DatapathModeNetkit DatapathMode = "netkit" + + // DatapathModeNetkitDashL2 captures enum value "netkit-l2" + DatapathModeNetkitDashL2 DatapathMode = "netkit-l2" ) // for schema @@ -42,7 +48,7 @@ var datapathModeEnum []interface{} func init() { var res []DatapathMode - if err := json.Unmarshal([]byte(`["veth"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["veth","netkit","netkit-l2"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/vendor/github.com/cilium/cilium/api/v1/models/debug_info.go b/vendor/github.com/cilium/cilium/api/v1/models/debug_info.go index db539d021d6..0504e09c6e5 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/debug_info.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/debug_info.go @@ -228,6 +228,11 @@ func (m *DebugInfo) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *DebugInfo) contextValidateCiliumStatus(ctx context.Context, formats strfmt.Registry) error { if m.CiliumStatus != nil { + + if swag.IsZero(m.CiliumStatus) { // not required + return nil + } + if err := m.CiliumStatus.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cilium-status") @@ -244,6 +249,11 @@ func (m *DebugInfo) contextValidateCiliumStatus(ctx context.Context, formats str func (m *DebugInfo) contextValidateEncryption(ctx context.Context, formats strfmt.Registry) error { if m.Encryption != nil { + + if swag.IsZero(m.Encryption) { // not required + return nil + } + if err := m.Encryption.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("encryption") @@ -262,6 +272,11 @@ func (m *DebugInfo) contextValidateEndpointList(ctx context.Context, formats str for i := 0; i < len(m.EndpointList); i++ { if m.EndpointList[i] != nil { + + if swag.IsZero(m.EndpointList[i]) { // not required + return nil + } + if err := m.EndpointList[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("endpoint-list" + "." + strconv.Itoa(i)) @@ -280,6 +295,11 @@ func (m *DebugInfo) contextValidateEndpointList(ctx context.Context, formats str func (m *DebugInfo) contextValidatePolicy(ctx context.Context, formats strfmt.Registry) error { if m.Policy != nil { + + if swag.IsZero(m.Policy) { // not required + return nil + } + if err := m.Policy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("policy") @@ -298,6 +318,11 @@ func (m *DebugInfo) contextValidateServiceList(ctx context.Context, formats strf for i := 0; i < len(m.ServiceList); i++ { if m.ServiceList[i] != nil { + + if swag.IsZero(m.ServiceList[i]) { // not required + return nil + } + if err := m.ServiceList[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("service-list" + "." + strconv.Itoa(i)) @@ -390,6 +415,11 @@ func (m *DebugInfoEncryption) ContextValidate(ctx context.Context, formats strfm func (m *DebugInfoEncryption) contextValidateWireguard(ctx context.Context, formats strfmt.Registry) error { if m.Wireguard != nil { + + if swag.IsZero(m.Wireguard) { // not required + return nil + } + if err := m.Wireguard.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("encryption" + "." + "wireguard") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/encryption_status.go b/vendor/github.com/cilium/cilium/api/v1/models/encryption_status.go index 0cf25f3b8d2..1a4fb0b25af 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/encryption_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/encryption_status.go @@ -165,6 +165,11 @@ func (m *EncryptionStatus) ContextValidate(ctx context.Context, formats strfmt.R func (m *EncryptionStatus) contextValidateIpsec(ctx context.Context, formats strfmt.Registry) error { if m.Ipsec != nil { + + if swag.IsZero(m.Ipsec) { // not required + return nil + } + if err := m.Ipsec.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipsec") @@ -181,6 +186,11 @@ func (m *EncryptionStatus) contextValidateIpsec(ctx context.Context, formats str func (m *EncryptionStatus) contextValidateWireguard(ctx context.Context, formats strfmt.Registry) error { if m.Wireguard != nil { + + if swag.IsZero(m.Wireguard) { // not required + return nil + } + if err := m.Wireguard.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("wireguard") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/endpoint.go b/vendor/github.com/cilium/cilium/api/v1/models/endpoint.go index 47737332142..cb9a7e943e1 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/endpoint.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/endpoint.go @@ -108,6 +108,11 @@ func (m *Endpoint) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Endpoint) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { if m.Spec != nil { + + if swag.IsZero(m.Spec) { // not required + return nil + } + if err := m.Spec.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("spec") @@ -124,6 +129,11 @@ func (m *Endpoint) contextValidateSpec(ctx context.Context, formats strfmt.Regis func (m *Endpoint) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_change_request.go b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_change_request.go index d59e7f3a164..47f52efbeca 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_change_request.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_change_request.go @@ -76,12 +76,18 @@ type EndpointChangeRequest struct { // MAC address Mac string `json:"mac,omitempty"` + // Network namespace cookie + NetnsCookie string `json:"netns-cookie,omitempty"` + // Process ID of the workload belonging to this endpoint Pid int64 `json:"pid,omitempty"` // Whether policy enforcement is enabled or not PolicyEnabled bool `json:"policy-enabled,omitempty"` + // Properties is used to store information about the endpoint at creation. Useful for tests. + Properties map[string]interface{} `json:"properties,omitempty"` + // Current state of endpoint // Required: true State *EndpointState `json:"state"` @@ -225,6 +231,11 @@ func (m *EndpointChangeRequest) ContextValidate(ctx context.Context, formats str func (m *EndpointChangeRequest) contextValidateAddressing(ctx context.Context, formats strfmt.Registry) error { if m.Addressing != nil { + + if swag.IsZero(m.Addressing) { // not required + return nil + } + if err := m.Addressing.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("addressing") @@ -241,6 +252,11 @@ func (m *EndpointChangeRequest) contextValidateAddressing(ctx context.Context, f func (m *EndpointChangeRequest) contextValidateDatapathConfiguration(ctx context.Context, formats strfmt.Registry) error { if m.DatapathConfiguration != nil { + + if swag.IsZero(m.DatapathConfiguration) { // not required + return nil + } + if err := m.DatapathConfiguration.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("datapath-configuration") @@ -271,6 +287,7 @@ func (m *EndpointChangeRequest) contextValidateLabels(ctx context.Context, forma func (m *EndpointChangeRequest) contextValidateState(ctx context.Context, formats strfmt.Registry) error { if m.State != nil { + if err := m.State.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("state") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_configuration_spec.go b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_configuration_spec.go index 6c6a75c9c90..2032d7f26fe 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_configuration_spec.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_configuration_spec.go @@ -105,6 +105,11 @@ func (m *EndpointConfigurationSpec) ContextValidate(ctx context.Context, formats func (m *EndpointConfigurationSpec) contextValidateLabelConfiguration(ctx context.Context, formats strfmt.Registry) error { if m.LabelConfiguration != nil { + + if swag.IsZero(m.LabelConfiguration) { // not required + return nil + } + if err := m.LabelConfiguration.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("label-configuration") @@ -120,6 +125,10 @@ func (m *EndpointConfigurationSpec) contextValidateLabelConfiguration(ctx contex func (m *EndpointConfigurationSpec) contextValidateOptions(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Options) { // not required + return nil + } + if err := m.Options.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("options") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_configuration_status.go b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_configuration_status.go index de4a9e83014..36b077465a2 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_configuration_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_configuration_status.go @@ -132,6 +132,10 @@ func (m *EndpointConfigurationStatus) ContextValidate(ctx context.Context, forma func (m *EndpointConfigurationStatus) contextValidateError(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Error) { // not required + return nil + } + if err := m.Error.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("error") @@ -146,6 +150,10 @@ func (m *EndpointConfigurationStatus) contextValidateError(ctx context.Context, func (m *EndpointConfigurationStatus) contextValidateImmutable(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Immutable) { // not required + return nil + } + if err := m.Immutable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("immutable") @@ -161,6 +169,11 @@ func (m *EndpointConfigurationStatus) contextValidateImmutable(ctx context.Conte func (m *EndpointConfigurationStatus) contextValidateRealized(ctx context.Context, formats strfmt.Registry) error { if m.Realized != nil { + + if swag.IsZero(m.Realized) { // not required + return nil + } + if err := m.Realized.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("realized") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_health.go b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_health.go index 1aa10adbd6b..8eda1e5dfd1 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_health.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_health.go @@ -133,6 +133,10 @@ func (m *EndpointHealth) ContextValidate(ctx context.Context, formats strfmt.Reg func (m *EndpointHealth) contextValidateBpf(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Bpf) { // not required + return nil + } + if err := m.Bpf.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("bpf") @@ -147,6 +151,10 @@ func (m *EndpointHealth) contextValidateBpf(ctx context.Context, formats strfmt. func (m *EndpointHealth) contextValidateOverallHealth(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.OverallHealth) { // not required + return nil + } + if err := m.OverallHealth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("overallHealth") @@ -161,6 +169,10 @@ func (m *EndpointHealth) contextValidateOverallHealth(ctx context.Context, forma func (m *EndpointHealth) contextValidatePolicy(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Policy) { // not required + return nil + } + if err := m.Policy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("policy") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_networking.go b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_networking.go index 893edd30199..1335ab47f05 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_networking.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_networking.go @@ -130,6 +130,11 @@ func (m *EndpointNetworking) contextValidateAddressing(ctx context.Context, form for i := 0; i < len(m.Addressing); i++ { if m.Addressing[i] != nil { + + if swag.IsZero(m.Addressing[i]) { // not required + return nil + } + if err := m.Addressing[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("addressing" + "." + strconv.Itoa(i)) @@ -148,6 +153,11 @@ func (m *EndpointNetworking) contextValidateAddressing(ctx context.Context, form func (m *EndpointNetworking) contextValidateHostAddressing(ctx context.Context, formats strfmt.Registry) error { if m.HostAddressing != nil { + + if swag.IsZero(m.HostAddressing) { // not required + return nil + } + if err := m.HostAddressing.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("host-addressing") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_policy.go b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_policy.go index 53e36f97294..5f6150600aa 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_policy.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_policy.go @@ -160,6 +160,11 @@ func (m *EndpointPolicy) ContextValidate(ctx context.Context, formats strfmt.Reg func (m *EndpointPolicy) contextValidateCidrPolicy(ctx context.Context, formats strfmt.Registry) error { if m.CidrPolicy != nil { + + if swag.IsZero(m.CidrPolicy) { // not required + return nil + } + if err := m.CidrPolicy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cidr-policy") @@ -176,6 +181,11 @@ func (m *EndpointPolicy) contextValidateCidrPolicy(ctx context.Context, formats func (m *EndpointPolicy) contextValidateL4(ctx context.Context, formats strfmt.Registry) error { if m.L4 != nil { + + if swag.IsZero(m.L4) { // not required + return nil + } + if err := m.L4.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("l4") @@ -191,6 +201,10 @@ func (m *EndpointPolicy) contextValidateL4(ctx context.Context, formats strfmt.R func (m *EndpointPolicy) contextValidatePolicyEnabled(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.PolicyEnabled) { // not required + return nil + } + if err := m.PolicyEnabled.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("policy-enabled") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_policy_status.go b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_policy_status.go index 70341a30ede..d4a8b179af0 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_policy_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_policy_status.go @@ -148,6 +148,11 @@ func (m *EndpointPolicyStatus) contextValidateProxyStatistics(ctx context.Contex for i := 0; i < len(m.ProxyStatistics); i++ { if m.ProxyStatistics[i] != nil { + + if swag.IsZero(m.ProxyStatistics[i]) { // not required + return nil + } + if err := m.ProxyStatistics[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("proxy-statistics" + "." + strconv.Itoa(i)) @@ -166,6 +171,11 @@ func (m *EndpointPolicyStatus) contextValidateProxyStatistics(ctx context.Contex func (m *EndpointPolicyStatus) contextValidateRealized(ctx context.Context, formats strfmt.Registry) error { if m.Realized != nil { + + if swag.IsZero(m.Realized) { // not required + return nil + } + if err := m.Realized.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("realized") @@ -182,6 +192,11 @@ func (m *EndpointPolicyStatus) contextValidateRealized(ctx context.Context, form func (m *EndpointPolicyStatus) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { if m.Spec != nil { + + if swag.IsZero(m.Spec) { // not required + return nil + } + if err := m.Spec.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("spec") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status.go b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status.go index 546a7f24456..8ff62e19ae0 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status.go @@ -390,6 +390,11 @@ func (m *EndpointStatus) contextValidateControllers(ctx context.Context, formats func (m *EndpointStatus) contextValidateExternalIdentifiers(ctx context.Context, formats strfmt.Registry) error { if m.ExternalIdentifiers != nil { + + if swag.IsZero(m.ExternalIdentifiers) { // not required + return nil + } + if err := m.ExternalIdentifiers.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("external-identifiers") @@ -406,6 +411,11 @@ func (m *EndpointStatus) contextValidateExternalIdentifiers(ctx context.Context, func (m *EndpointStatus) contextValidateHealth(ctx context.Context, formats strfmt.Registry) error { if m.Health != nil { + + if swag.IsZero(m.Health) { // not required + return nil + } + if err := m.Health.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("health") @@ -422,6 +432,11 @@ func (m *EndpointStatus) contextValidateHealth(ctx context.Context, formats strf func (m *EndpointStatus) contextValidateIdentity(ctx context.Context, formats strfmt.Registry) error { if m.Identity != nil { + + if swag.IsZero(m.Identity) { // not required + return nil + } + if err := m.Identity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("identity") @@ -438,6 +453,11 @@ func (m *EndpointStatus) contextValidateIdentity(ctx context.Context, formats st func (m *EndpointStatus) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { if m.Labels != nil { + + if swag.IsZero(m.Labels) { // not required + return nil + } + if err := m.Labels.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("labels") @@ -482,6 +502,11 @@ func (m *EndpointStatus) contextValidateNamedPorts(ctx context.Context, formats func (m *EndpointStatus) contextValidateNetworking(ctx context.Context, formats strfmt.Registry) error { if m.Networking != nil { + + if swag.IsZero(m.Networking) { // not required + return nil + } + if err := m.Networking.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("networking") @@ -498,6 +523,11 @@ func (m *EndpointStatus) contextValidateNetworking(ctx context.Context, formats func (m *EndpointStatus) contextValidatePolicy(ctx context.Context, formats strfmt.Registry) error { if m.Policy != nil { + + if swag.IsZero(m.Policy) { // not required + return nil + } + if err := m.Policy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("policy") @@ -514,6 +544,11 @@ func (m *EndpointStatus) contextValidatePolicy(ctx context.Context, formats strf func (m *EndpointStatus) contextValidateRealized(ctx context.Context, formats strfmt.Registry) error { if m.Realized != nil { + + if swag.IsZero(m.Realized) { // not required + return nil + } + if err := m.Realized.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("realized") @@ -530,6 +565,7 @@ func (m *EndpointStatus) contextValidateRealized(ctx context.Context, formats st func (m *EndpointStatus) contextValidateState(ctx context.Context, formats strfmt.Registry) error { if m.State != nil { + if err := m.State.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("state") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status_change.go b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status_change.go index e347f288964..783f39dcb30 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status_change.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status_change.go @@ -132,6 +132,10 @@ func (m *EndpointStatusChange) ContextValidate(ctx context.Context, formats strf func (m *EndpointStatusChange) contextValidateState(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.State) { // not required + return nil + } + if err := m.State.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("state") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status_log.go b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status_log.go index de32548bd6d..a6ba5d38c53 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status_log.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/endpoint_status_log.go @@ -57,6 +57,11 @@ func (m EndpointStatusLog) ContextValidate(ctx context.Context, formats strfmt.R for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/frontend_mapping.go b/vendor/github.com/cilium/cilium/api/v1/models/frontend_mapping.go index ac26d0c4449..7bab4735a47 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/frontend_mapping.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/frontend_mapping.go @@ -115,6 +115,11 @@ func (m *FrontendMapping) contextValidateBackends(ctx context.Context, formats s for i := 0; i < len(m.Backends); i++ { if m.Backends[i] != nil { + + if swag.IsZero(m.Backends[i]) { // not required + return nil + } + if err := m.Backends[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("backends" + "." + strconv.Itoa(i)) @@ -133,6 +138,11 @@ func (m *FrontendMapping) contextValidateBackends(ctx context.Context, formats s func (m *FrontendMapping) contextValidateFrontendAddress(ctx context.Context, formats strfmt.Registry) error { if m.FrontendAddress != nil { + + if swag.IsZero(m.FrontendAddress) { // not required + return nil + } + if err := m.FrontendAddress.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("frontend-address") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/host_routing.go b/vendor/github.com/cilium/cilium/api/v1/models/host_routing.go deleted file mode 100644 index d80958e1ef6..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/models/host_routing.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HostRouting Status of host routing -// -// +k8s:deepcopy-gen=true -// -// swagger:model HostRouting -type HostRouting struct { - - // Datapath routing mode - // Enum: [BPF Legacy] - Mode string `json:"mode,omitempty"` -} - -// Validate validates this host routing -func (m *HostRouting) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var hostRoutingTypeModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["BPF","Legacy"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - hostRoutingTypeModePropEnum = append(hostRoutingTypeModePropEnum, v) - } -} - -const ( - - // HostRoutingModeBPF captures enum value "BPF" - HostRoutingModeBPF string = "BPF" - - // HostRoutingModeLegacy captures enum value "Legacy" - HostRoutingModeLegacy string = "Legacy" -) - -// prop value enum -func (m *HostRouting) validateModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, hostRoutingTypeModePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *HostRouting) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required - return nil - } - - // value enum - if err := m.validateModeEnum("mode", "body", m.Mode); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this host routing based on context it is used -func (m *HostRouting) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *HostRouting) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostRouting) UnmarshalBinary(b []byte) error { - var res HostRouting - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/models/hubble_status.go b/vendor/github.com/cilium/cilium/api/v1/models/hubble_status.go index 49754f9995a..065c3e2d1bc 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/hubble_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/hubble_status.go @@ -168,6 +168,11 @@ func (m *HubbleStatus) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *HubbleStatus) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { if m.Metrics != nil { + + if swag.IsZero(m.Metrics) { // not required + return nil + } + if err := m.Metrics.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("metrics") @@ -184,6 +189,11 @@ func (m *HubbleStatus) contextValidateMetrics(ctx context.Context, formats strfm func (m *HubbleStatus) contextValidateObserver(ctx context.Context, formats strfmt.Registry) error { if m.Observer != nil { + + if swag.IsZero(m.Observer) { // not required + return nil + } + if err := m.Observer.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("observer") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/identity_endpoints.go b/vendor/github.com/cilium/cilium/api/v1/models/identity_endpoints.go index 438f443ff8f..1a2a94b33b8 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/identity_endpoints.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/identity_endpoints.go @@ -78,6 +78,11 @@ func (m *IdentityEndpoints) ContextValidate(ctx context.Context, formats strfmt. func (m *IdentityEndpoints) contextValidateIdentity(ctx context.Context, formats strfmt.Registry) error { if m.Identity != nil { + + if swag.IsZero(m.Identity) { // not required + return nil + } + if err := m.Identity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("identity") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/ip_a_m_response.go b/vendor/github.com/cilium/cilium/api/v1/models/ip_a_m_response.go index bf08751d56c..25c729cac7c 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/ip_a_m_response.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/ip_a_m_response.go @@ -170,6 +170,7 @@ func (m *IPAMResponse) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *IPAMResponse) contextValidateAddress(ctx context.Context, formats strfmt.Registry) error { if m.Address != nil { + if err := m.Address.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("address") @@ -186,6 +187,7 @@ func (m *IPAMResponse) contextValidateAddress(ctx context.Context, formats strfm func (m *IPAMResponse) contextValidateHostAddressing(ctx context.Context, formats strfmt.Registry) error { if m.HostAddressing != nil { + if err := m.HostAddressing.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("host-addressing") @@ -202,6 +204,11 @@ func (m *IPAMResponse) contextValidateHostAddressing(ctx context.Context, format func (m *IPAMResponse) contextValidateIPV4(ctx context.Context, formats strfmt.Registry) error { if m.IPV4 != nil { + + if swag.IsZero(m.IPV4) { // not required + return nil + } + if err := m.IPV4.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipv4") @@ -218,6 +225,11 @@ func (m *IPAMResponse) contextValidateIPV4(ctx context.Context, formats strfmt.R func (m *IPAMResponse) contextValidateIPV6(ctx context.Context, formats strfmt.Registry) error { if m.IPV6 != nil { + + if swag.IsZero(m.IPV6) { // not required + return nil + } + if err := m.IPV6.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipv6") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/ip_a_m_status.go b/vendor/github.com/cilium/cilium/api/v1/models/ip_a_m_status.go index 0ae76cf6a01..a50f03c718f 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/ip_a_m_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/ip_a_m_status.go @@ -85,6 +85,10 @@ func (m *IPAMStatus) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *IPAMStatus) contextValidateAllocations(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Allocations) { // not required + return nil + } + if err := m.Allocations.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("allocations") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/ip_list_entry.go b/vendor/github.com/cilium/cilium/api/v1/models/ip_list_entry.go index 55def940ffe..df8a2009cf7 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/ip_list_entry.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/ip_list_entry.go @@ -116,6 +116,11 @@ func (m *IPListEntry) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *IPListEntry) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { if m.Metadata != nil { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("metadata") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/kube_proxy_replacement.go b/vendor/github.com/cilium/cilium/api/v1/models/kube_proxy_replacement.go index c3e9561a55e..0af3b6134e0 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/kube_proxy_replacement.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/kube_proxy_replacement.go @@ -41,7 +41,7 @@ type KubeProxyReplacement struct { Features *KubeProxyReplacementFeatures `json:"features,omitempty"` // mode - // Enum: [Disabled Strict Probe Partial True False] + // Enum: [True False] Mode string `json:"mode,omitempty"` } @@ -116,7 +116,7 @@ var kubeProxyReplacementTypeModePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Disabled","Strict","Probe","Partial","True","False"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["True","False"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -126,18 +126,6 @@ func init() { const ( - // KubeProxyReplacementModeDisabled captures enum value "Disabled" - KubeProxyReplacementModeDisabled string = "Disabled" - - // KubeProxyReplacementModeStrict captures enum value "Strict" - KubeProxyReplacementModeStrict string = "Strict" - - // KubeProxyReplacementModeProbe captures enum value "Probe" - KubeProxyReplacementModeProbe string = "Probe" - - // KubeProxyReplacementModePartial captures enum value "Partial" - KubeProxyReplacementModePartial string = "Partial" - // KubeProxyReplacementModeTrue captures enum value "True" KubeProxyReplacementModeTrue string = "True" @@ -189,6 +177,11 @@ func (m *KubeProxyReplacement) contextValidateDeviceList(ctx context.Context, fo for i := 0; i < len(m.DeviceList); i++ { if m.DeviceList[i] != nil { + + if swag.IsZero(m.DeviceList[i]) { // not required + return nil + } + if err := m.DeviceList[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("deviceList" + "." + strconv.Itoa(i)) @@ -207,6 +200,11 @@ func (m *KubeProxyReplacement) contextValidateDeviceList(ctx context.Context, fo func (m *KubeProxyReplacement) contextValidateFeatures(ctx context.Context, formats strfmt.Registry) error { if m.Features != nil { + + if swag.IsZero(m.Features) { // not required + return nil + } + if err := m.Features.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features") @@ -586,6 +584,11 @@ func (m *KubeProxyReplacementFeatures) ContextValidate(ctx context.Context, form func (m *KubeProxyReplacementFeatures) contextValidateExternalIPs(ctx context.Context, formats strfmt.Registry) error { if m.ExternalIPs != nil { + + if swag.IsZero(m.ExternalIPs) { // not required + return nil + } + if err := m.ExternalIPs.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features" + "." + "externalIPs") @@ -602,6 +605,11 @@ func (m *KubeProxyReplacementFeatures) contextValidateExternalIPs(ctx context.Co func (m *KubeProxyReplacementFeatures) contextValidateGracefulTermination(ctx context.Context, formats strfmt.Registry) error { if m.GracefulTermination != nil { + + if swag.IsZero(m.GracefulTermination) { // not required + return nil + } + if err := m.GracefulTermination.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features" + "." + "gracefulTermination") @@ -618,6 +626,11 @@ func (m *KubeProxyReplacementFeatures) contextValidateGracefulTermination(ctx co func (m *KubeProxyReplacementFeatures) contextValidateHostPort(ctx context.Context, formats strfmt.Registry) error { if m.HostPort != nil { + + if swag.IsZero(m.HostPort) { // not required + return nil + } + if err := m.HostPort.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features" + "." + "hostPort") @@ -634,6 +647,11 @@ func (m *KubeProxyReplacementFeatures) contextValidateHostPort(ctx context.Conte func (m *KubeProxyReplacementFeatures) contextValidateHostReachableServices(ctx context.Context, formats strfmt.Registry) error { if m.HostReachableServices != nil { + + if swag.IsZero(m.HostReachableServices) { // not required + return nil + } + if err := m.HostReachableServices.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features" + "." + "hostReachableServices") @@ -650,6 +668,11 @@ func (m *KubeProxyReplacementFeatures) contextValidateHostReachableServices(ctx func (m *KubeProxyReplacementFeatures) contextValidateNat46X64(ctx context.Context, formats strfmt.Registry) error { if m.Nat46X64 != nil { + + if swag.IsZero(m.Nat46X64) { // not required + return nil + } + if err := m.Nat46X64.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features" + "." + "nat46X64") @@ -666,6 +689,11 @@ func (m *KubeProxyReplacementFeatures) contextValidateNat46X64(ctx context.Conte func (m *KubeProxyReplacementFeatures) contextValidateNodePort(ctx context.Context, formats strfmt.Registry) error { if m.NodePort != nil { + + if swag.IsZero(m.NodePort) { // not required + return nil + } + if err := m.NodePort.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features" + "." + "nodePort") @@ -682,6 +710,11 @@ func (m *KubeProxyReplacementFeatures) contextValidateNodePort(ctx context.Conte func (m *KubeProxyReplacementFeatures) contextValidateSessionAffinity(ctx context.Context, formats strfmt.Registry) error { if m.SessionAffinity != nil { + + if swag.IsZero(m.SessionAffinity) { // not required + return nil + } + if err := m.SessionAffinity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features" + "." + "sessionAffinity") @@ -698,6 +731,11 @@ func (m *KubeProxyReplacementFeatures) contextValidateSessionAffinity(ctx contex func (m *KubeProxyReplacementFeatures) contextValidateSocketLB(ctx context.Context, formats strfmt.Registry) error { if m.SocketLB != nil { + + if swag.IsZero(m.SocketLB) { // not required + return nil + } + if err := m.SocketLB.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features" + "." + "socketLB") @@ -714,6 +752,11 @@ func (m *KubeProxyReplacementFeatures) contextValidateSocketLB(ctx context.Conte func (m *KubeProxyReplacementFeatures) contextValidateSocketLBTracing(ctx context.Context, formats strfmt.Registry) error { if m.SocketLBTracing != nil { + + if swag.IsZero(m.SocketLBTracing) { // not required + return nil + } + if err := m.SocketLBTracing.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features" + "." + "socketLBTracing") @@ -998,6 +1041,11 @@ func (m *KubeProxyReplacementFeaturesNat46X64) ContextValidate(ctx context.Conte func (m *KubeProxyReplacementFeaturesNat46X64) contextValidateGateway(ctx context.Context, formats strfmt.Registry) error { if m.Gateway != nil { + + if swag.IsZero(m.Gateway) { // not required + return nil + } + if err := m.Gateway.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features" + "." + "nat46X64" + "." + "gateway") @@ -1014,6 +1062,11 @@ func (m *KubeProxyReplacementFeaturesNat46X64) contextValidateGateway(ctx contex func (m *KubeProxyReplacementFeaturesNat46X64) contextValidateService(ctx context.Context, formats strfmt.Registry) error { if m.Service != nil { + + if swag.IsZero(m.Service) { // not required + return nil + } + if err := m.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("features" + "." + "nat46X64" + "." + "service") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/l4_policy.go b/vendor/github.com/cilium/cilium/api/v1/models/l4_policy.go index 12b837d84a8..b6c4c198b19 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/l4_policy.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/l4_policy.go @@ -124,6 +124,11 @@ func (m *L4Policy) contextValidateEgress(ctx context.Context, formats strfmt.Reg for i := 0; i < len(m.Egress); i++ { if m.Egress[i] != nil { + + if swag.IsZero(m.Egress[i]) { // not required + return nil + } + if err := m.Egress[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("egress" + "." + strconv.Itoa(i)) @@ -144,6 +149,11 @@ func (m *L4Policy) contextValidateIngress(ctx context.Context, formats strfmt.Re for i := 0; i < len(m.Ingress); i++ { if m.Ingress[i] != nil { + + if swag.IsZero(m.Ingress[i]) { // not required + return nil + } + if err := m.Ingress[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ingress" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/l_r_p_backend.go b/vendor/github.com/cilium/cilium/api/v1/models/l_r_p_backend.go index 3e844fefa28..5603f5191d5 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/l_r_p_backend.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/l_r_p_backend.go @@ -78,6 +78,11 @@ func (m *LRPBackend) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *LRPBackend) contextValidateBackendAddress(ctx context.Context, formats strfmt.Registry) error { if m.BackendAddress != nil { + + if swag.IsZero(m.BackendAddress) { // not required + return nil + } + if err := m.BackendAddress.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("backend-address") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/l_r_p_spec.go b/vendor/github.com/cilium/cilium/api/v1/models/l_r_p_spec.go index 8d658103421..99a5387c46d 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/l_r_p_spec.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/l_r_p_spec.go @@ -103,6 +103,11 @@ func (m *LRPSpec) contextValidateFrontendMappings(ctx context.Context, formats s for i := 0; i < len(m.FrontendMappings); i++ { if m.FrontendMappings[i] != nil { + + if swag.IsZero(m.FrontendMappings[i]) { // not required + return nil + } + if err := m.FrontendMappings[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("frontend-mappings" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/label_array.go b/vendor/github.com/cilium/cilium/api/v1/models/label_array.go index ca052c05f06..120753fdcb1 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/label_array.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/label_array.go @@ -57,6 +57,11 @@ func (m LabelArray) ContextValidate(ctx context.Context, formats strfmt.Registry for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/label_configuration.go b/vendor/github.com/cilium/cilium/api/v1/models/label_configuration.go index 7ca55a22332..f90386596ac 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/label_configuration.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/label_configuration.go @@ -105,6 +105,11 @@ func (m *LabelConfiguration) ContextValidate(ctx context.Context, formats strfmt func (m *LabelConfiguration) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { if m.Spec != nil { + + if swag.IsZero(m.Spec) { // not required + return nil + } + if err := m.Spec.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("spec") @@ -121,6 +126,11 @@ func (m *LabelConfiguration) contextValidateSpec(ctx context.Context, formats st func (m *LabelConfiguration) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/label_configuration_status.go b/vendor/github.com/cilium/cilium/api/v1/models/label_configuration_status.go index b89fb4df09c..07a199787fd 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/label_configuration_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/label_configuration_status.go @@ -187,6 +187,11 @@ func (m *LabelConfigurationStatus) contextValidateDisabled(ctx context.Context, func (m *LabelConfigurationStatus) contextValidateRealized(ctx context.Context, formats strfmt.Registry) error { if m.Realized != nil { + + if swag.IsZero(m.Realized) { // not required + return nil + } + if err := m.Realized.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("realized") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/masquerading.go b/vendor/github.com/cilium/cilium/api/v1/models/masquerading.go index 80395c5b2b4..def5d725819 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/masquerading.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/masquerading.go @@ -147,6 +147,11 @@ func (m *Masquerading) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *Masquerading) contextValidateEnabledProtocols(ctx context.Context, formats strfmt.Registry) error { if m.EnabledProtocols != nil { + + if swag.IsZero(m.EnabledProtocols) { // not required + return nil + } + if err := m.EnabledProtocols.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("enabledProtocols") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/module_health.go b/vendor/github.com/cilium/cilium/api/v1/models/module_health.go deleted file mode 100644 index 7fd6ad30e1d..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/models/module_health.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ModuleHealth Report module health status -// -// swagger:model ModuleHealth -type ModuleHealth struct { - - // Time at which the last OK check occurred - LastOk string `json:"last-ok,omitempty"` - - // Time of last health update - LastUpdated string `json:"last-updated,omitempty"` - - // Describes the health status level - Level string `json:"level,omitempty"` - - // Reports the associated health message - Message string `json:"message,omitempty"` - - // Describes the module identitier - ModuleID string `json:"module-id,omitempty"` -} - -// Validate validates this module health -func (m *ModuleHealth) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this module health based on context it is used -func (m *ModuleHealth) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ModuleHealth) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ModuleHealth) UnmarshalBinary(b []byte) error { - var res ModuleHealth - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/models/modules_health.go b/vendor/github.com/cilium/cilium/api/v1/models/modules_health.go deleted file mode 100644 index de7d224a1b1..00000000000 --- a/vendor/github.com/cilium/cilium/api/v1/models/modules_health.go +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright Authors of Cilium -// SPDX-License-Identifier: Apache-2.0 - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ModulesHealth Reports health status of agent's modules -// -// swagger:model ModulesHealth -type ModulesHealth struct { - - // List out modules health status - Modules []*ModuleHealth `json:"modules"` -} - -// Validate validates this modules health -func (m *ModulesHealth) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateModules(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ModulesHealth) validateModules(formats strfmt.Registry) error { - if swag.IsZero(m.Modules) { // not required - return nil - } - - for i := 0; i < len(m.Modules); i++ { - if swag.IsZero(m.Modules[i]) { // not required - continue - } - - if m.Modules[i] != nil { - if err := m.Modules[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("modules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("modules" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this modules health based on the context it is used -func (m *ModulesHealth) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateModules(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ModulesHealth) contextValidateModules(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Modules); i++ { - - if m.Modules[i] != nil { - if err := m.Modules[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("modules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("modules" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ModulesHealth) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ModulesHealth) UnmarshalBinary(b []byte) error { - var res ModulesHealth - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/cilium/cilium/api/v1/models/name_manager.go b/vendor/github.com/cilium/cilium/api/v1/models/name_manager.go index 3140d01d134..0a1fbfb34da 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/name_manager.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/name_manager.go @@ -88,6 +88,11 @@ func (m *NameManager) contextValidateFQDNPolicySelectors(ctx context.Context, fo for i := 0; i < len(m.FQDNPolicySelectors); i++ { if m.FQDNPolicySelectors[i] != nil { + + if swag.IsZero(m.FQDNPolicySelectors[i]) { // not required + return nil + } + if err := m.FQDNPolicySelectors[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("FQDNPolicySelectors" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/named_ports.go b/vendor/github.com/cilium/cilium/api/v1/models/named_ports.go index 89df87409bb..7a22f0f08eb 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/named_ports.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/named_ports.go @@ -61,6 +61,11 @@ func (m NamedPorts) ContextValidate(ctx context.Context, formats strfmt.Registry for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/node_addressing.go b/vendor/github.com/cilium/cilium/api/v1/models/node_addressing.go index 1dc57a4edef..5c10e4e92ac 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/node_addressing.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/node_addressing.go @@ -107,6 +107,11 @@ func (m *NodeAddressing) ContextValidate(ctx context.Context, formats strfmt.Reg func (m *NodeAddressing) contextValidateIPV4(ctx context.Context, formats strfmt.Registry) error { if m.IPV4 != nil { + + if swag.IsZero(m.IPV4) { // not required + return nil + } + if err := m.IPV4.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipv4") @@ -123,6 +128,11 @@ func (m *NodeAddressing) contextValidateIPV4(ctx context.Context, formats strfmt func (m *NodeAddressing) contextValidateIPV6(ctx context.Context, formats strfmt.Registry) error { if m.IPV6 != nil { + + if swag.IsZero(m.IPV6) { // not required + return nil + } + if err := m.IPV6.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipv6") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/node_element.go b/vendor/github.com/cilium/cilium/api/v1/models/node_element.go index 7f0ce2c6bed..c4ccfb7e7ac 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/node_element.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/node_element.go @@ -183,6 +183,11 @@ func (m *NodeElement) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *NodeElement) contextValidateHealthEndpointAddress(ctx context.Context, formats strfmt.Registry) error { if m.HealthEndpointAddress != nil { + + if swag.IsZero(m.HealthEndpointAddress) { // not required + return nil + } + if err := m.HealthEndpointAddress.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("health-endpoint-address") @@ -199,6 +204,11 @@ func (m *NodeElement) contextValidateHealthEndpointAddress(ctx context.Context, func (m *NodeElement) contextValidateIngressAddress(ctx context.Context, formats strfmt.Registry) error { if m.IngressAddress != nil { + + if swag.IsZero(m.IngressAddress) { // not required + return nil + } + if err := m.IngressAddress.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ingress-address") @@ -215,6 +225,11 @@ func (m *NodeElement) contextValidateIngressAddress(ctx context.Context, formats func (m *NodeElement) contextValidatePrimaryAddress(ctx context.Context, formats strfmt.Registry) error { if m.PrimaryAddress != nil { + + if swag.IsZero(m.PrimaryAddress) { // not required + return nil + } + if err := m.PrimaryAddress.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary-address") @@ -233,6 +248,11 @@ func (m *NodeElement) contextValidateSecondaryAddresses(ctx context.Context, for for i := 0; i < len(m.SecondaryAddresses); i++ { if m.SecondaryAddresses[i] != nil { + + if swag.IsZero(m.SecondaryAddresses[i]) { // not required + return nil + } + if err := m.SecondaryAddresses[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("secondary-addresses" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/prefilter.go b/vendor/github.com/cilium/cilium/api/v1/models/prefilter.go index dac7fbcbacc..6488a18c557 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/prefilter.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/prefilter.go @@ -105,6 +105,11 @@ func (m *Prefilter) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *Prefilter) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { if m.Spec != nil { + + if swag.IsZero(m.Spec) { // not required + return nil + } + if err := m.Spec.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("spec") @@ -121,6 +126,11 @@ func (m *Prefilter) contextValidateSpec(ctx context.Context, formats strfmt.Regi func (m *Prefilter) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/prefilter_status.go b/vendor/github.com/cilium/cilium/api/v1/models/prefilter_status.go index 1f285a343d7..b64c33e63b1 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/prefilter_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/prefilter_status.go @@ -75,6 +75,11 @@ func (m *PrefilterStatus) ContextValidate(ctx context.Context, formats strfmt.Re func (m *PrefilterStatus) contextValidateRealized(ctx context.Context, formats strfmt.Registry) error { if m.Realized != nil { + + if swag.IsZero(m.Realized) { // not required + return nil + } + if err := m.Realized.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("realized") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/proxy_statistics.go b/vendor/github.com/cilium/cilium/api/v1/models/proxy_statistics.go index 98dc9d17ef3..bd5b1119b47 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/proxy_statistics.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/proxy_statistics.go @@ -138,6 +138,11 @@ func (m *ProxyStatistics) ContextValidate(ctx context.Context, formats strfmt.Re func (m *ProxyStatistics) contextValidateStatistics(ctx context.Context, formats strfmt.Registry) error { if m.Statistics != nil { + + if swag.IsZero(m.Statistics) { // not required + return nil + } + if err := m.Statistics.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("statistics") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/proxy_status.go b/vendor/github.com/cilium/cilium/api/v1/models/proxy_status.go index d3283687d1f..3f37688f44c 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/proxy_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/proxy_status.go @@ -151,6 +151,11 @@ func (m *ProxyStatus) contextValidateRedirects(ctx context.Context, formats strf for i := 0; i < len(m.Redirects); i++ { if m.Redirects[i] != nil { + + if swag.IsZero(m.Redirects[i]) { // not required + return nil + } + if err := m.Redirects[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("redirects" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/recorder.go b/vendor/github.com/cilium/cilium/api/v1/models/recorder.go index 36d41dc0ce3..4656e9856cf 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/recorder.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/recorder.go @@ -105,6 +105,11 @@ func (m *Recorder) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Recorder) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { if m.Spec != nil { + + if swag.IsZero(m.Spec) { // not required + return nil + } + if err := m.Spec.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("spec") @@ -121,6 +126,11 @@ func (m *Recorder) contextValidateSpec(ctx context.Context, formats strfmt.Regis func (m *Recorder) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/recorder_mask.go b/vendor/github.com/cilium/cilium/api/v1/models/recorder_mask.go index dec0cd20ba0..b98d74a95e9 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/recorder_mask.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/recorder_mask.go @@ -75,6 +75,11 @@ func (m *RecorderMask) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *RecorderMask) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/recorder_mask_status.go b/vendor/github.com/cilium/cilium/api/v1/models/recorder_mask_status.go index e79be59f137..1ad4f7422ab 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/recorder_mask_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/recorder_mask_status.go @@ -75,6 +75,11 @@ func (m *RecorderMaskStatus) ContextValidate(ctx context.Context, formats strfmt func (m *RecorderMaskStatus) contextValidateRealized(ctx context.Context, formats strfmt.Registry) error { if m.Realized != nil { + + if swag.IsZero(m.Realized) { // not required + return nil + } + if err := m.Realized.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("realized") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/recorder_spec.go b/vendor/github.com/cilium/cilium/api/v1/models/recorder_spec.go index 362ee50e2a8..95eb7aead94 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/recorder_spec.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/recorder_spec.go @@ -108,6 +108,11 @@ func (m *RecorderSpec) contextValidateFilters(ctx context.Context, formats strfm for i := 0; i < len(m.Filters); i++ { if m.Filters[i] != nil { + + if swag.IsZero(m.Filters[i]) { // not required + return nil + } + if err := m.Filters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("filters" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/recorder_status.go b/vendor/github.com/cilium/cilium/api/v1/models/recorder_status.go index 5476b606fd7..38749325c72 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/recorder_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/recorder_status.go @@ -75,6 +75,11 @@ func (m *RecorderStatus) ContextValidate(ctx context.Context, formats strfmt.Reg func (m *RecorderStatus) contextValidateRealized(ctx context.Context, formats strfmt.Registry) error { if m.Realized != nil { + + if swag.IsZero(m.Realized) { // not required + return nil + } + if err := m.Realized.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("realized") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/remote_cluster.go b/vendor/github.com/cilium/cilium/api/v1/models/remote_cluster.go index a8d8c2be952..ca73d65567f 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/remote_cluster.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/remote_cluster.go @@ -155,6 +155,11 @@ func (m *RemoteCluster) ContextValidate(ctx context.Context, formats strfmt.Regi func (m *RemoteCluster) contextValidateConfig(ctx context.Context, formats strfmt.Registry) error { if m.Config != nil { + + if swag.IsZero(m.Config) { // not required + return nil + } + if err := m.Config.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("config") @@ -171,6 +176,11 @@ func (m *RemoteCluster) contextValidateConfig(ctx context.Context, formats strfm func (m *RemoteCluster) contextValidateSynced(ctx context.Context, formats strfmt.Registry) error { if m.Synced != nil { + + if swag.IsZero(m.Synced) { // not required + return nil + } + if err := m.Synced.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("synced") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/request_response_statistics.go b/vendor/github.com/cilium/cilium/api/v1/models/request_response_statistics.go index 8b3a5574eb4..f6d5b96bde7 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/request_response_statistics.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/request_response_statistics.go @@ -107,6 +107,11 @@ func (m *RequestResponseStatistics) ContextValidate(ctx context.Context, formats func (m *RequestResponseStatistics) contextValidateRequests(ctx context.Context, formats strfmt.Registry) error { if m.Requests != nil { + + if swag.IsZero(m.Requests) { // not required + return nil + } + if err := m.Requests.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("requests") @@ -123,6 +128,11 @@ func (m *RequestResponseStatistics) contextValidateRequests(ctx context.Context, func (m *RequestResponseStatistics) contextValidateResponses(ctx context.Context, formats strfmt.Registry) error { if m.Responses != nil { + + if swag.IsZero(m.Responses) { // not required + return nil + } + if err := m.Responses.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("responses") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/routing.go b/vendor/github.com/cilium/cilium/api/v1/models/routing.go new file mode 100644 index 00000000000..9d5709b0a1c --- /dev/null +++ b/vendor/github.com/cilium/cilium/api/v1/models/routing.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright Authors of Cilium +// SPDX-License-Identifier: Apache-2.0 + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Routing Status of routing +// +// +k8s:deepcopy-gen=true +// +// swagger:model Routing +type Routing struct { + + // Datapath routing mode for cross-cluster connectivity + // Enum: [Native Tunnel] + InterHostRoutingMode string `json:"inter-host-routing-mode,omitempty"` + + // Datapath routing mode for connectivity within the host + // Enum: [BPF Legacy] + IntraHostRoutingMode string `json:"intra-host-routing-mode,omitempty"` + + // Tunnel protocol in use for cross-cluster connectivity + TunnelProtocol string `json:"tunnel-protocol,omitempty"` +} + +// Validate validates this routing +func (m *Routing) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInterHostRoutingMode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIntraHostRoutingMode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var routingTypeInterHostRoutingModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Native","Tunnel"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + routingTypeInterHostRoutingModePropEnum = append(routingTypeInterHostRoutingModePropEnum, v) + } +} + +const ( + + // RoutingInterHostRoutingModeNative captures enum value "Native" + RoutingInterHostRoutingModeNative string = "Native" + + // RoutingInterHostRoutingModeTunnel captures enum value "Tunnel" + RoutingInterHostRoutingModeTunnel string = "Tunnel" +) + +// prop value enum +func (m *Routing) validateInterHostRoutingModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, routingTypeInterHostRoutingModePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Routing) validateInterHostRoutingMode(formats strfmt.Registry) error { + if swag.IsZero(m.InterHostRoutingMode) { // not required + return nil + } + + // value enum + if err := m.validateInterHostRoutingModeEnum("inter-host-routing-mode", "body", m.InterHostRoutingMode); err != nil { + return err + } + + return nil +} + +var routingTypeIntraHostRoutingModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["BPF","Legacy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + routingTypeIntraHostRoutingModePropEnum = append(routingTypeIntraHostRoutingModePropEnum, v) + } +} + +const ( + + // RoutingIntraHostRoutingModeBPF captures enum value "BPF" + RoutingIntraHostRoutingModeBPF string = "BPF" + + // RoutingIntraHostRoutingModeLegacy captures enum value "Legacy" + RoutingIntraHostRoutingModeLegacy string = "Legacy" +) + +// prop value enum +func (m *Routing) validateIntraHostRoutingModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, routingTypeIntraHostRoutingModePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Routing) validateIntraHostRoutingMode(formats strfmt.Registry) error { + if swag.IsZero(m.IntraHostRoutingMode) { // not required + return nil + } + + // value enum + if err := m.validateIntraHostRoutingModeEnum("intra-host-routing-mode", "body", m.IntraHostRoutingMode); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this routing based on context it is used +func (m *Routing) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Routing) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Routing) UnmarshalBinary(b []byte) error { + var res Routing + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/cilium/cilium/api/v1/models/selector_cache.go b/vendor/github.com/cilium/cilium/api/v1/models/selector_cache.go index 3f941871e5b..0fd85f207cf 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/selector_cache.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/selector_cache.go @@ -57,6 +57,11 @@ func (m SelectorCache) ContextValidate(ctx context.Context, formats strfmt.Regis for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/service.go b/vendor/github.com/cilium/cilium/api/v1/models/service.go index cef8a924a4f..8c38db3fbc7 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/service.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/service.go @@ -105,6 +105,11 @@ func (m *Service) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Service) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { if m.Spec != nil { + + if swag.IsZero(m.Spec) { // not required + return nil + } + if err := m.Spec.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("spec") @@ -121,6 +126,11 @@ func (m *Service) contextValidateSpec(ctx context.Context, formats strfmt.Regist func (m *Service) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/service_spec.go b/vendor/github.com/cilium/cilium/api/v1/models/service_spec.go index eae7726a6a2..a7b761aed97 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/service_spec.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/service_spec.go @@ -157,6 +157,11 @@ func (m *ServiceSpec) contextValidateBackendAddresses(ctx context.Context, forma for i := 0; i < len(m.BackendAddresses); i++ { if m.BackendAddresses[i] != nil { + + if swag.IsZero(m.BackendAddresses[i]) { // not required + return nil + } + if err := m.BackendAddresses[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("backend-addresses" + "." + strconv.Itoa(i)) @@ -175,6 +180,11 @@ func (m *ServiceSpec) contextValidateBackendAddresses(ctx context.Context, forma func (m *ServiceSpec) contextValidateFlags(ctx context.Context, formats strfmt.Registry) error { if m.Flags != nil { + + if swag.IsZero(m.Flags) { // not required + return nil + } + if err := m.Flags.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("flags") @@ -191,6 +201,7 @@ func (m *ServiceSpec) contextValidateFlags(ctx context.Context, formats strfmt.R func (m *ServiceSpec) contextValidateFrontendAddress(ctx context.Context, formats strfmt.Registry) error { if m.FrontendAddress != nil { + if err := m.FrontendAddress.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("frontend-address") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/service_status.go b/vendor/github.com/cilium/cilium/api/v1/models/service_status.go index c9bc87b196c..32c65f32d55 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/service_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/service_status.go @@ -75,6 +75,11 @@ func (m *ServiceStatus) ContextValidate(ctx context.Context, formats strfmt.Regi func (m *ServiceStatus) contextValidateRealized(ctx context.Context, formats strfmt.Registry) error { if m.Realized != nil { + + if swag.IsZero(m.Realized) { // not required + return nil + } + if err := m.Realized.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("realized") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/status_response.go b/vendor/github.com/cilium/cilium/api/v1/models/status_response.go index 52b18d92f3f..beb6bd96944 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/status_response.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/status_response.go @@ -24,6 +24,9 @@ import ( // swagger:model StatusResponse type StatusResponse struct { + // Status of core datapath attachment mode + AttachMode AttachMode `json:"attach-mode,omitempty"` + // Status of Mutual Authentication certificate provider AuthCertificateProvider *Status `json:"auth-certificate-provider,omitempty"` @@ -63,15 +66,15 @@ type StatusResponse struct { // Status of all endpoint controllers Controllers ControllerStatuses `json:"controllers,omitempty"` + // Status of datapath mode + DatapathMode DatapathMode `json:"datapath-mode,omitempty"` + // Status of transparent encryption Encryption *EncryptionStatus `json:"encryption,omitempty"` // Status of the host firewall HostFirewall *HostFirewall `json:"host-firewall,omitempty"` - // Status of host routing - HostRouting *HostRouting `json:"host-routing,omitempty"` - // Status of Hubble server Hubble *HubbleStatus `json:"hubble,omitempty"` @@ -105,6 +108,9 @@ type StatusResponse struct { // Status of proxy Proxy *ProxyStatus `json:"proxy,omitempty"` + // Status of routing + Routing *Routing `json:"routing,omitempty"` + // Status of SRv6 Srv6 *Srv6 `json:"srv6,omitempty"` @@ -116,6 +122,10 @@ type StatusResponse struct { func (m *StatusResponse) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAttachMode(formats); err != nil { + res = append(res, err) + } + if err := m.validateAuthCertificateProvider(formats); err != nil { res = append(res, err) } @@ -160,15 +170,15 @@ func (m *StatusResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateEncryption(formats); err != nil { + if err := m.validateDatapathMode(formats); err != nil { res = append(res, err) } - if err := m.validateHostFirewall(formats); err != nil { + if err := m.validateEncryption(formats); err != nil { res = append(res, err) } - if err := m.validateHostRouting(formats); err != nil { + if err := m.validateHostFirewall(formats); err != nil { res = append(res, err) } @@ -216,6 +226,10 @@ func (m *StatusResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateRouting(formats); err != nil { + res = append(res, err) + } + if err := m.validateSrv6(formats); err != nil { res = append(res, err) } @@ -230,6 +244,23 @@ func (m *StatusResponse) Validate(formats strfmt.Registry) error { return nil } +func (m *StatusResponse) validateAttachMode(formats strfmt.Registry) error { + if swag.IsZero(m.AttachMode) { // not required + return nil + } + + if err := m.AttachMode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attach-mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attach-mode") + } + return err + } + + return nil +} + func (m *StatusResponse) validateAuthCertificateProvider(formats strfmt.Registry) error { if swag.IsZero(m.AuthCertificateProvider) { // not required return nil @@ -437,6 +468,23 @@ func (m *StatusResponse) validateControllers(formats strfmt.Registry) error { return nil } +func (m *StatusResponse) validateDatapathMode(formats strfmt.Registry) error { + if swag.IsZero(m.DatapathMode) { // not required + return nil + } + + if err := m.DatapathMode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("datapath-mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("datapath-mode") + } + return err + } + + return nil +} + func (m *StatusResponse) validateEncryption(formats strfmt.Registry) error { if swag.IsZero(m.Encryption) { // not required return nil @@ -475,25 +523,6 @@ func (m *StatusResponse) validateHostFirewall(formats strfmt.Registry) error { return nil } -func (m *StatusResponse) validateHostRouting(formats strfmt.Registry) error { - if swag.IsZero(m.HostRouting) { // not required - return nil - } - - if m.HostRouting != nil { - if err := m.HostRouting.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host-routing") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host-routing") - } - return err - } - } - - return nil -} - func (m *StatusResponse) validateHubble(formats strfmt.Registry) error { if swag.IsZero(m.Hubble) { // not required return nil @@ -703,6 +732,25 @@ func (m *StatusResponse) validateProxy(formats strfmt.Registry) error { return nil } +func (m *StatusResponse) validateRouting(formats strfmt.Registry) error { + if swag.IsZero(m.Routing) { // not required + return nil + } + + if m.Routing != nil { + if err := m.Routing.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("routing") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("routing") + } + return err + } + } + + return nil +} + func (m *StatusResponse) validateSrv6(formats strfmt.Registry) error { if swag.IsZero(m.Srv6) { // not required return nil @@ -742,6 +790,10 @@ func (m *StatusResponse) validateStale(formats strfmt.Registry) error { func (m *StatusResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAttachMode(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateAuthCertificateProvider(ctx, formats); err != nil { res = append(res, err) } @@ -786,15 +838,15 @@ func (m *StatusResponse) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } - if err := m.contextValidateEncryption(ctx, formats); err != nil { + if err := m.contextValidateDatapathMode(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateHostFirewall(ctx, formats); err != nil { + if err := m.contextValidateEncryption(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateHostRouting(ctx, formats); err != nil { + if err := m.contextValidateHostFirewall(ctx, formats); err != nil { res = append(res, err) } @@ -842,6 +894,10 @@ func (m *StatusResponse) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := m.contextValidateRouting(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateSrv6(ctx, formats); err != nil { res = append(res, err) } @@ -852,9 +908,32 @@ func (m *StatusResponse) ContextValidate(ctx context.Context, formats strfmt.Reg return nil } +func (m *StatusResponse) contextValidateAttachMode(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.AttachMode) { // not required + return nil + } + + if err := m.AttachMode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attach-mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attach-mode") + } + return err + } + + return nil +} + func (m *StatusResponse) contextValidateAuthCertificateProvider(ctx context.Context, formats strfmt.Registry) error { if m.AuthCertificateProvider != nil { + + if swag.IsZero(m.AuthCertificateProvider) { // not required + return nil + } + if err := m.AuthCertificateProvider.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("auth-certificate-provider") @@ -871,6 +950,11 @@ func (m *StatusResponse) contextValidateAuthCertificateProvider(ctx context.Cont func (m *StatusResponse) contextValidateBandwidthManager(ctx context.Context, formats strfmt.Registry) error { if m.BandwidthManager != nil { + + if swag.IsZero(m.BandwidthManager) { // not required + return nil + } + if err := m.BandwidthManager.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("bandwidth-manager") @@ -887,6 +971,11 @@ func (m *StatusResponse) contextValidateBandwidthManager(ctx context.Context, fo func (m *StatusResponse) contextValidateBpfMaps(ctx context.Context, formats strfmt.Registry) error { if m.BpfMaps != nil { + + if swag.IsZero(m.BpfMaps) { // not required + return nil + } + if err := m.BpfMaps.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("bpf-maps") @@ -903,6 +992,11 @@ func (m *StatusResponse) contextValidateBpfMaps(ctx context.Context, formats str func (m *StatusResponse) contextValidateCilium(ctx context.Context, formats strfmt.Registry) error { if m.Cilium != nil { + + if swag.IsZero(m.Cilium) { // not required + return nil + } + if err := m.Cilium.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cilium") @@ -919,6 +1013,11 @@ func (m *StatusResponse) contextValidateCilium(ctx context.Context, formats strf func (m *StatusResponse) contextValidateClockSource(ctx context.Context, formats strfmt.Registry) error { if m.ClockSource != nil { + + if swag.IsZero(m.ClockSource) { // not required + return nil + } + if err := m.ClockSource.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("clock-source") @@ -935,6 +1034,11 @@ func (m *StatusResponse) contextValidateClockSource(ctx context.Context, formats func (m *StatusResponse) contextValidateCluster(ctx context.Context, formats strfmt.Registry) error { if m.Cluster != nil { + + if swag.IsZero(m.Cluster) { // not required + return nil + } + if err := m.Cluster.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cluster") @@ -951,6 +1055,11 @@ func (m *StatusResponse) contextValidateCluster(ctx context.Context, formats str func (m *StatusResponse) contextValidateClusterMesh(ctx context.Context, formats strfmt.Registry) error { if m.ClusterMesh != nil { + + if swag.IsZero(m.ClusterMesh) { // not required + return nil + } + if err := m.ClusterMesh.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cluster-mesh") @@ -967,6 +1076,11 @@ func (m *StatusResponse) contextValidateClusterMesh(ctx context.Context, formats func (m *StatusResponse) contextValidateCniChaining(ctx context.Context, formats strfmt.Registry) error { if m.CniChaining != nil { + + if swag.IsZero(m.CniChaining) { // not required + return nil + } + if err := m.CniChaining.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cni-chaining") @@ -983,6 +1097,11 @@ func (m *StatusResponse) contextValidateCniChaining(ctx context.Context, formats func (m *StatusResponse) contextValidateCniFile(ctx context.Context, formats strfmt.Registry) error { if m.CniFile != nil { + + if swag.IsZero(m.CniFile) { // not required + return nil + } + if err := m.CniFile.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cni-file") @@ -999,6 +1118,11 @@ func (m *StatusResponse) contextValidateCniFile(ctx context.Context, formats str func (m *StatusResponse) contextValidateContainerRuntime(ctx context.Context, formats strfmt.Registry) error { if m.ContainerRuntime != nil { + + if swag.IsZero(m.ContainerRuntime) { // not required + return nil + } + if err := m.ContainerRuntime.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("container-runtime") @@ -1026,9 +1150,32 @@ func (m *StatusResponse) contextValidateControllers(ctx context.Context, formats return nil } +func (m *StatusResponse) contextValidateDatapathMode(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.DatapathMode) { // not required + return nil + } + + if err := m.DatapathMode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("datapath-mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("datapath-mode") + } + return err + } + + return nil +} + func (m *StatusResponse) contextValidateEncryption(ctx context.Context, formats strfmt.Registry) error { if m.Encryption != nil { + + if swag.IsZero(m.Encryption) { // not required + return nil + } + if err := m.Encryption.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("encryption") @@ -1045,6 +1192,11 @@ func (m *StatusResponse) contextValidateEncryption(ctx context.Context, formats func (m *StatusResponse) contextValidateHostFirewall(ctx context.Context, formats strfmt.Registry) error { if m.HostFirewall != nil { + + if swag.IsZero(m.HostFirewall) { // not required + return nil + } + if err := m.HostFirewall.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("host-firewall") @@ -1058,25 +1210,14 @@ func (m *StatusResponse) contextValidateHostFirewall(ctx context.Context, format return nil } -func (m *StatusResponse) contextValidateHostRouting(ctx context.Context, formats strfmt.Registry) error { - - if m.HostRouting != nil { - if err := m.HostRouting.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("host-routing") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("host-routing") - } - return err - } - } - - return nil -} - func (m *StatusResponse) contextValidateHubble(ctx context.Context, formats strfmt.Registry) error { if m.Hubble != nil { + + if swag.IsZero(m.Hubble) { // not required + return nil + } + if err := m.Hubble.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("hubble") @@ -1093,6 +1234,11 @@ func (m *StatusResponse) contextValidateHubble(ctx context.Context, formats strf func (m *StatusResponse) contextValidateIdentityRange(ctx context.Context, formats strfmt.Registry) error { if m.IdentityRange != nil { + + if swag.IsZero(m.IdentityRange) { // not required + return nil + } + if err := m.IdentityRange.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("identity-range") @@ -1109,6 +1255,11 @@ func (m *StatusResponse) contextValidateIdentityRange(ctx context.Context, forma func (m *StatusResponse) contextValidateIpam(ctx context.Context, formats strfmt.Registry) error { if m.Ipam != nil { + + if swag.IsZero(m.Ipam) { // not required + return nil + } + if err := m.Ipam.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipam") @@ -1125,6 +1276,11 @@ func (m *StatusResponse) contextValidateIpam(ctx context.Context, formats strfmt func (m *StatusResponse) contextValidateIPV4BigTCP(ctx context.Context, formats strfmt.Registry) error { if m.IPV4BigTCP != nil { + + if swag.IsZero(m.IPV4BigTCP) { // not required + return nil + } + if err := m.IPV4BigTCP.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipv4-big-tcp") @@ -1141,6 +1297,11 @@ func (m *StatusResponse) contextValidateIPV4BigTCP(ctx context.Context, formats func (m *StatusResponse) contextValidateIPV6BigTCP(ctx context.Context, formats strfmt.Registry) error { if m.IPV6BigTCP != nil { + + if swag.IsZero(m.IPV6BigTCP) { // not required + return nil + } + if err := m.IPV6BigTCP.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipv6-big-tcp") @@ -1157,6 +1318,11 @@ func (m *StatusResponse) contextValidateIPV6BigTCP(ctx context.Context, formats func (m *StatusResponse) contextValidateKubeProxyReplacement(ctx context.Context, formats strfmt.Registry) error { if m.KubeProxyReplacement != nil { + + if swag.IsZero(m.KubeProxyReplacement) { // not required + return nil + } + if err := m.KubeProxyReplacement.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("kube-proxy-replacement") @@ -1173,6 +1339,11 @@ func (m *StatusResponse) contextValidateKubeProxyReplacement(ctx context.Context func (m *StatusResponse) contextValidateKubernetes(ctx context.Context, formats strfmt.Registry) error { if m.Kubernetes != nil { + + if swag.IsZero(m.Kubernetes) { // not required + return nil + } + if err := m.Kubernetes.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("kubernetes") @@ -1189,6 +1360,11 @@ func (m *StatusResponse) contextValidateKubernetes(ctx context.Context, formats func (m *StatusResponse) contextValidateKvstore(ctx context.Context, formats strfmt.Registry) error { if m.Kvstore != nil { + + if swag.IsZero(m.Kvstore) { // not required + return nil + } + if err := m.Kvstore.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("kvstore") @@ -1205,6 +1381,11 @@ func (m *StatusResponse) contextValidateKvstore(ctx context.Context, formats str func (m *StatusResponse) contextValidateMasquerading(ctx context.Context, formats strfmt.Registry) error { if m.Masquerading != nil { + + if swag.IsZero(m.Masquerading) { // not required + return nil + } + if err := m.Masquerading.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("masquerading") @@ -1221,6 +1402,11 @@ func (m *StatusResponse) contextValidateMasquerading(ctx context.Context, format func (m *StatusResponse) contextValidateNodeMonitor(ctx context.Context, formats strfmt.Registry) error { if m.NodeMonitor != nil { + + if swag.IsZero(m.NodeMonitor) { // not required + return nil + } + if err := m.NodeMonitor.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("nodeMonitor") @@ -1237,6 +1423,11 @@ func (m *StatusResponse) contextValidateNodeMonitor(ctx context.Context, formats func (m *StatusResponse) contextValidateProxy(ctx context.Context, formats strfmt.Registry) error { if m.Proxy != nil { + + if swag.IsZero(m.Proxy) { // not required + return nil + } + if err := m.Proxy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("proxy") @@ -1250,9 +1441,35 @@ func (m *StatusResponse) contextValidateProxy(ctx context.Context, formats strfm return nil } +func (m *StatusResponse) contextValidateRouting(ctx context.Context, formats strfmt.Registry) error { + + if m.Routing != nil { + + if swag.IsZero(m.Routing) { // not required + return nil + } + + if err := m.Routing.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("routing") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("routing") + } + return err + } + } + + return nil +} + func (m *StatusResponse) contextValidateSrv6(ctx context.Context, formats strfmt.Registry) error { if m.Srv6 != nil { + + if swag.IsZero(m.Srv6) { // not required + return nil + } + if err := m.Srv6.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("srv6") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/trace_selector.go b/vendor/github.com/cilium/cilium/api/v1/models/trace_selector.go index 6ecd3603260..4c1b514f528 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/trace_selector.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/trace_selector.go @@ -109,6 +109,11 @@ func (m *TraceSelector) ContextValidate(ctx context.Context, formats strfmt.Regi func (m *TraceSelector) contextValidateFrom(ctx context.Context, formats strfmt.Registry) error { if m.From != nil { + + if swag.IsZero(m.From) { // not required + return nil + } + if err := m.From.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("from") @@ -125,6 +130,11 @@ func (m *TraceSelector) contextValidateFrom(ctx context.Context, formats strfmt. func (m *TraceSelector) contextValidateTo(ctx context.Context, formats strfmt.Registry) error { if m.To != nil { + + if swag.IsZero(m.To) { // not required + return nil + } + if err := m.To.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("to") diff --git a/vendor/github.com/cilium/cilium/api/v1/models/trace_to.go b/vendor/github.com/cilium/cilium/api/v1/models/trace_to.go index 6455e21073c..e1dcc453f63 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/trace_to.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/trace_to.go @@ -115,6 +115,11 @@ func (m *TraceTo) contextValidateDports(ctx context.Context, formats strfmt.Regi for i := 0; i < len(m.Dports); i++ { if m.Dports[i] != nil { + + if swag.IsZero(m.Dports[i]) { // not required + return nil + } + if err := m.Dports[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dports" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/wireguard_interface.go b/vendor/github.com/cilium/cilium/api/v1/models/wireguard_interface.go index d78acc53d07..0325eba0a97 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/wireguard_interface.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/wireguard_interface.go @@ -99,6 +99,11 @@ func (m *WireguardInterface) contextValidatePeers(ctx context.Context, formats s for i := 0; i < len(m.Peers); i++ { if m.Peers[i] != nil { + + if swag.IsZero(m.Peers[i]) { // not required + return nil + } + if err := m.Peers[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("peers" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/wireguard_status.go b/vendor/github.com/cilium/cilium/api/v1/models/wireguard_status.go index 041a2d33612..753ad1754e3 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/wireguard_status.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/wireguard_status.go @@ -90,6 +90,11 @@ func (m *WireguardStatus) contextValidateInterfaces(ctx context.Context, formats for i := 0; i < len(m.Interfaces); i++ { if m.Interfaces[i] != nil { + + if swag.IsZero(m.Interfaces[i]) { // not required + return nil + } + if err := m.Interfaces[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/cilium/cilium/api/v1/models/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/api/v1/models/zz_generated.deepcopy.go index 9dcd6fd914b..59666f70848 100644 --- a/vendor/github.com/cilium/cilium/api/v1/models/zz_generated.deepcopy.go +++ b/vendor/github.com/cilium/cilium/api/v1/models/zz_generated.deepcopy.go @@ -409,22 +409,6 @@ func (in *HostFirewall) DeepCopy() *HostFirewall { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HostRouting) DeepCopyInto(out *HostRouting) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostRouting. -func (in *HostRouting) DeepCopy() *HostRouting { - if in == nil { - return nil - } - out := new(HostRouting) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HubbleStatus) DeepCopyInto(out *HubbleStatus) { *out = *in @@ -1247,6 +1231,22 @@ func (in *RequestResponseStatistics) DeepCopy() *RequestResponseStatistics { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Routing) DeepCopyInto(out *Routing) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Routing. +func (in *Routing) DeepCopy() *Routing { + if in == nil { + return nil + } + out := new(Routing) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Srv6) DeepCopyInto(out *Srv6) { *out = *in @@ -1337,11 +1337,6 @@ func (in *StatusResponse) DeepCopyInto(out *StatusResponse) { *out = new(HostFirewall) (*in).DeepCopyInto(*out) } - if in.HostRouting != nil { - in, out := &in.HostRouting, &out.HostRouting - *out = new(HostRouting) - **out = **in - } if in.Hubble != nil { in, out := &in.Hubble, &out.Hubble *out = new(HubbleStatus) @@ -1397,6 +1392,11 @@ func (in *StatusResponse) DeepCopyInto(out *StatusResponse) { *out = new(ProxyStatus) (*in).DeepCopyInto(*out) } + if in.Routing != nil { + in, out := &in.Routing, &out.Routing + *out = new(Routing) + **out = **in + } if in.Srv6 != nil { in, out := &in.Srv6, &out.Srv6 *out = new(Srv6) diff --git a/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/doc.go b/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/doc.go deleted file mode 100644 index a4d5ab3b9c5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:deepcopy-gen=package -// +deepequal-gen=package - -// Package types provides Alibaba Cloud specific types -package types diff --git a/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/types.go b/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/types.go deleted file mode 100644 index b579758133d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/types.go +++ /dev/null @@ -1,203 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "github.com/cilium/cilium/pkg/ipam/types" -) - -// Spec is the ENI specification of a node. This specification is considered -// by the cilium-operator to act as an IPAM operator and makes ENI IPs available -// via the IPAMSpec section. -// -// The ENI specification can either be provided explicitly by the user or the -// cilium-agent running on the node can be instructed to create the CiliumNode -// custom resource along with an ENI specification when the node registers -// itself to the Kubernetes cluster. -type Spec struct { - // InstanceType is the ECS instance type, e.g. "ecs.g6.2xlarge" - // - // +kubebuilder:validation:Optional - InstanceType string `json:"instance-type,omitempty"` - - // AvailabilityZone is the availability zone to use when allocating - // ENIs. - // - // +kubebuilder:validation:Optional - AvailabilityZone string `json:"availability-zone,omitempty"` - - // VPCID is the VPC ID to use when allocating ENIs. - // - // +kubebuilder:validation:Optional - VPCID string `json:"vpc-id,omitempty"` - - // CIDRBlock is vpc ipv4 CIDR - // - // +kubebuilder:validation:Optional - CIDRBlock string `json:"cidr-block,omitempty"` - - // VSwitches is the ID of vSwitch available for ENI - // - // +kubebuilder:validation:Optional - VSwitches []string `json:"vswitches,omitempty"` - - // VSwitchTags is the list of tags to use when evaluating which - // vSwitch to use for the ENI. - // - // +kubebuilder:validation:Optional - VSwitchTags map[string]string `json:"vswitch-tags,omitempty"` - - // SecurityGroups is the list of security groups to attach to any ENI - // that is created and attached to the instance. - // - // +kubebuilder:validation:Optional - SecurityGroups []string `json:"security-groups,omitempty"` - - // SecurityGroupTags is the list of tags to use when evaluating which - // security groups to use for the ENI. - // - // +kubebuilder:validation:Optional - SecurityGroupTags map[string]string `json:"security-group-tags,omitempty"` -} - -const ( - // ENITypePrimary is the type for ENI - ENITypePrimary string = "Primary" - // ENITypeSecondary is the type for ENI - ENITypeSecondary string = "Secondary" -) - -// ENI represents an AlibabaCloud Elastic Network Interface -type ENI struct { - // NetworkInterfaceID is the ENI id - // - // +optional - NetworkInterfaceID string `json:"network-interface-id,omitempty"` - - // MACAddress is the mac address of the ENI - // - // +optional - MACAddress string `json:"mac-address,omitempty"` - - // Type is the ENI type Primary or Secondary - // - // +optional - Type string `json:"type,omitempty"` - - // InstanceID is the InstanceID using this ENI - // - // +optional - InstanceID string `json:"instance-id,omitempty"` - - // SecurityGroupIDs is the security group ids used by this ENI - // - // +optional - SecurityGroupIDs []string `json:"security-groupids,omitempty"` - - // VPC is the vpc to which the ENI belongs - // - // +optional - VPC VPC `json:"vpc,omitempty"` - - // ZoneID is the zone to which the ENI belongs - // - // +optional - ZoneID string `json:"zone-id,omitempty"` - - // VSwitch is the vSwitch the ENI is using - // - // +optional - VSwitch VSwitch `json:"vswitch,omitempty"` - - // PrimaryIPAddress is the primary IP on ENI - // - // +optional - PrimaryIPAddress string `json:"primary-ip-address,omitempty"` - - // PrivateIPSets is the list of all IPs on the ENI, including PrimaryIPAddress - // - // +optional - PrivateIPSets []PrivateIPSet `json:"private-ipsets,omitempty"` - - // Tags is the tags on this ENI - // - // +optional - Tags map[string]string `json:"tags,omitempty"` -} - -func (e *ENI) DeepCopyInterface() types.Interface { - return e.DeepCopy() -} - -// InterfaceID returns the identifier of the interface -func (e *ENI) InterfaceID() string { - return e.NetworkInterfaceID -} - -// ForeachAddress iterates over all addresses and calls fn -func (e *ENI) ForeachAddress(id string, fn types.AddressIterator) error { - for _, address := range e.PrivateIPSets { - if address.Primary { - continue - } - if err := fn(id, e.NetworkInterfaceID, address.PrivateIpAddress, "", address); err != nil { - return err - } - } - - return nil -} - -// ENIStatus is the status of ENI addressing of the node -type ENIStatus struct { - // ENIs is the list of ENIs on the node - // - // +optional - ENIs map[string]ENI `json:"enis,omitempty"` -} - -// PrivateIPSet is a nested struct in ecs response -type PrivateIPSet struct { - PrivateIpAddress string `json:"private-ip-address,omitempty"` - Primary bool `json:"primary,omitempty" ` -} - -type VPC struct { - // VPCID is the vpc to which the ENI belongs - // - // +optional - VPCID string `json:"vpc-id,omitempty"` - - // CIDRBlock is the VPC IPv4 CIDR - // - // +optional - CIDRBlock string `json:"cidr,omitempty"` - - // IPv6CIDRBlock is the VPC IPv6 CIDR - // - // +optional - IPv6CIDRBlock string `json:"ipv6-cidr,omitempty"` - - // SecondaryCIDRs is the list of Secondary CIDRs associated with the VPC - // - // +optional - SecondaryCIDRs []string `json:"secondary-cidrs,omitempty"` -} - -type VSwitch struct { - // VSwitchID is the vSwitch to which the ENI belongs - // - // +optional - VSwitchID string `json:"vswitch-id,omitempty"` - - // CIDRBlock is the vSwitch IPv4 CIDR - // - // +optional - CIDRBlock string `json:"cidr,omitempty"` - - // IPv6CIDRBlock is the vSwitch IPv6 CIDR - // - // +optional - IPv6CIDRBlock string `json:"ipv6-cidr,omitempty"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/zz_generated.deepcopy.go deleted file mode 100644 index 309101578cc..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/zz_generated.deepcopy.go +++ /dev/null @@ -1,160 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package types - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ENI) DeepCopyInto(out *ENI) { - *out = *in - if in.SecurityGroupIDs != nil { - in, out := &in.SecurityGroupIDs, &out.SecurityGroupIDs - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.VPC.DeepCopyInto(&out.VPC) - out.VSwitch = in.VSwitch - if in.PrivateIPSets != nil { - in, out := &in.PrivateIPSets, &out.PrivateIPSets - *out = make([]PrivateIPSet, len(*in)) - copy(*out, *in) - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *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 ENI. -func (in *ENI) DeepCopy() *ENI { - if in == nil { - return nil - } - out := new(ENI) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ENIStatus) DeepCopyInto(out *ENIStatus) { - *out = *in - if in.ENIs != nil { - in, out := &in.ENIs, &out.ENIs - *out = make(map[string]ENI, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ENIStatus. -func (in *ENIStatus) DeepCopy() *ENIStatus { - if in == nil { - return nil - } - out := new(ENIStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateIPSet) DeepCopyInto(out *PrivateIPSet) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateIPSet. -func (in *PrivateIPSet) DeepCopy() *PrivateIPSet { - if in == nil { - return nil - } - out := new(PrivateIPSet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Spec) DeepCopyInto(out *Spec) { - *out = *in - if in.VSwitches != nil { - in, out := &in.VSwitches, &out.VSwitches - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.VSwitchTags != nil { - in, out := &in.VSwitchTags, &out.VSwitchTags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.SecurityGroups != nil { - in, out := &in.SecurityGroups, &out.SecurityGroups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecurityGroupTags != nil { - in, out := &in.SecurityGroupTags, &out.SecurityGroupTags - *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 Spec. -func (in *Spec) DeepCopy() *Spec { - if in == nil { - return nil - } - out := new(Spec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VPC) DeepCopyInto(out *VPC) { - *out = *in - if in.SecondaryCIDRs != nil { - in, out := &in.SecondaryCIDRs, &out.SecondaryCIDRs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VPC. -func (in *VPC) DeepCopy() *VPC { - if in == nil { - return nil - } - out := new(VPC) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSwitch) DeepCopyInto(out *VSwitch) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSwitch. -func (in *VSwitch) DeepCopy() *VSwitch { - if in == nil { - return nil - } - out := new(VSwitch) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/zz_generated.deepequal.go deleted file mode 100644 index 55fea351a12..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/alibabacloud/eni/types/zz_generated.deepequal.go +++ /dev/null @@ -1,302 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package types - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ENI) DeepEqual(other *ENI) bool { - if other == nil { - return false - } - - if in.NetworkInterfaceID != other.NetworkInterfaceID { - return false - } - if in.MACAddress != other.MACAddress { - return false - } - if in.Type != other.Type { - return false - } - if in.InstanceID != other.InstanceID { - return false - } - if ((in.SecurityGroupIDs != nil) && (other.SecurityGroupIDs != nil)) || ((in.SecurityGroupIDs == nil) != (other.SecurityGroupIDs == nil)) { - in, other := &in.SecurityGroupIDs, &other.SecurityGroupIDs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if !in.VPC.DeepEqual(&other.VPC) { - return false - } - - if in.ZoneID != other.ZoneID { - return false - } - if in.VSwitch != other.VSwitch { - return false - } - - if in.PrimaryIPAddress != other.PrimaryIPAddress { - return false - } - if ((in.PrivateIPSets != nil) && (other.PrivateIPSets != nil)) || ((in.PrivateIPSets == nil) != (other.PrivateIPSets == nil)) { - in, other := &in.PrivateIPSets, &other.PrivateIPSets - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Tags != nil) && (other.Tags != nil)) || ((in.Tags == nil) != (other.Tags == nil)) { - in, other := &in.Tags, &other.Tags - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ENIStatus) DeepEqual(other *ENIStatus) bool { - if other == nil { - return false - } - - if ((in.ENIs != nil) && (other.ENIs != nil)) || ((in.ENIs == nil) != (other.ENIs == nil)) { - in, other := &in.ENIs, &other.ENIs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if !inValue.DeepEqual(&otherValue) { - return false - } - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PrivateIPSet) DeepEqual(other *PrivateIPSet) bool { - if other == nil { - return false - } - - if in.PrivateIpAddress != other.PrivateIpAddress { - return false - } - if in.Primary != other.Primary { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Spec) DeepEqual(other *Spec) bool { - if other == nil { - return false - } - - if in.InstanceType != other.InstanceType { - return false - } - if in.AvailabilityZone != other.AvailabilityZone { - return false - } - if in.VPCID != other.VPCID { - return false - } - if in.CIDRBlock != other.CIDRBlock { - return false - } - if ((in.VSwitches != nil) && (other.VSwitches != nil)) || ((in.VSwitches == nil) != (other.VSwitches == nil)) { - in, other := &in.VSwitches, &other.VSwitches - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if ((in.VSwitchTags != nil) && (other.VSwitchTags != nil)) || ((in.VSwitchTags == nil) != (other.VSwitchTags == nil)) { - in, other := &in.VSwitchTags, &other.VSwitchTags - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - if ((in.SecurityGroups != nil) && (other.SecurityGroups != nil)) || ((in.SecurityGroups == nil) != (other.SecurityGroups == nil)) { - in, other := &in.SecurityGroups, &other.SecurityGroups - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if ((in.SecurityGroupTags != nil) && (other.SecurityGroupTags != nil)) || ((in.SecurityGroupTags == nil) != (other.SecurityGroupTags == nil)) { - in, other := &in.SecurityGroupTags, &other.SecurityGroupTags - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *VPC) DeepEqual(other *VPC) bool { - if other == nil { - return false - } - - if in.VPCID != other.VPCID { - return false - } - if in.CIDRBlock != other.CIDRBlock { - return false - } - if in.IPv6CIDRBlock != other.IPv6CIDRBlock { - return false - } - if ((in.SecondaryCIDRs != nil) && (other.SecondaryCIDRs != nil)) || ((in.SecondaryCIDRs == nil) != (other.SecondaryCIDRs == nil)) { - in, other := &in.SecondaryCIDRs, &other.SecondaryCIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *VSwitch) DeepEqual(other *VSwitch) bool { - if other == nil { - return false - } - - if in.VSwitchID != other.VSwitchID { - return false - } - if in.CIDRBlock != other.CIDRBlock { - return false - } - if in.IPv6CIDRBlock != other.IPv6CIDRBlock { - return false - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/allocator/allocator.go b/vendor/github.com/cilium/cilium/pkg/allocator/allocator.go deleted file mode 100644 index 2792a310867..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/allocator/allocator.go +++ /dev/null @@ -1,1069 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package allocator - -import ( - "context" - "errors" - "fmt" - - "github.com/google/uuid" - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/backoff" - "github.com/cilium/cilium/pkg/idpool" - "github.com/cilium/cilium/pkg/inctimer" - "github.com/cilium/cilium/pkg/kvstore" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/rate" - "github.com/cilium/cilium/pkg/time" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "allocator") -) - -const ( - // maxAllocAttempts is the number of attempted allocation requests - // performed before failing. - maxAllocAttempts = 16 -) - -// Allocator is a distributed ID allocator backed by a KVstore. It maps -// arbitrary keys to identifiers. Multiple users on different cluster nodes can -// in parallel request the ID for keys and are guaranteed to retrieve the same -// ID for an identical key. -// -// While the details of how keys are stored is delegated to Backend -// implementations, some expectations exist. See pkg/kvstore/allocator for -// details about the kvstore implementation. -// -// A node takes a reference to an identity when it is in-use on that node, and -// the identity remains in-use if there is any node reference to it. When an -// identity no longer has any node references, it may be garbage collected. No -// guarantees are made at that point and the numeric identity may be reused. -// Note that the numeric IDs are selected locally and verified with the Backend. -// -// Lookup ID by key: -// 1. Return ID from local cache updated by watcher (no Backend interactions) -// 2. Do ListPrefix() on slave key excluding node suffix, return the first -// result that matches the exact prefix. -// -// Lookup key by ID: -// 1. Return key from local cache updated by watcher (no Backend interactions) -// 2. Do Get() on master key, return result -// -// Allocate: -// 1. Check local key cache, increment, and return if key is already in use -// locally (no Backend interactions) -// 2. Check local cache updated by watcher, if... -// -// ... match found: -// -// 2.1 Create a new slave key. This operation is potentially racy as the master -// key can be removed in the meantime. -// - etcd: Create is made conditional on existence of master key -// - consul: locking -// -// ... match not found: -// -// 2.1 Select new unused id from local cache -// 2.2 Create a new master key with the condition that it may not exist -// 2.3 Create a new slave key -// -// 1.1. If found, increment and return (no Backend interactions) -// 2. Lookup ID by key in local cache or via first slave key found in Backend -// -// Release: -// 1. Reduce local reference count until last use (no Backend interactions) -// 2. Delete slave key (basePath/value/key1/node1) -// This automatically guarantees that when the last node has released the -// key, the key is no longer found by Get() -// 3. If the node goes down, all slave keys of that node are removed after -// the TTL expires (auto release). -type Allocator struct { - // events is a channel which will receive AllocatorEvent as IDs are - // added, modified or removed from the allocator - events AllocatorEventSendChan - - // keyType is an instance of the type to be used as allocator key. - keyType AllocatorKey - - // min is the lower limit when allocating IDs. The allocator will never - // allocate an ID lesser than this value. - min idpool.ID - - // max is the upper limit when allocating IDs. The allocator will never - // allocate an ID greater than this value. - max idpool.ID - - // prefixMask if set, will be ORed to all selected IDs prior to - // allocation - prefixMask idpool.ID - - // localKeys contains all keys including their reference count for keys - // which have been allocated and are in local use - localKeys *localKeys - - // suffix is the suffix attached to keys which must be node specific, - // this is typical set to the node's IP address - suffix string - - // backoffTemplate is the backoff configuration while allocating - backoffTemplate backoff.Exponential - - // slaveKeysMutex protects the concurrent access of the slave key by this - // agent. - slaveKeysMutex lock.Mutex - - // mainCache is the main cache, representing the allocator contents of - // the primary kvstore connection - mainCache cache - - // remoteCachesMutex protects accesse to remoteCaches - remoteCachesMutex lock.RWMutex - - // remoteCaches is the list of additional remote caches being watched - // in addition to the main cache - remoteCaches map[string]*RemoteCache - - // stopGC is the channel used to stop the garbage collector - stopGC chan struct{} - - // initialListDone is a channel that is closed when the initial - // synchronization has completed - initialListDone waitChan - - // idPool maintains a pool of available ids for allocation. - idPool *idpool.IDPool - - // enableMasterKeyProtection if true, causes master keys that are still in - // local use to be automatically re-created - enableMasterKeyProtection bool - - // disableGC disables the garbage collector - disableGC bool - - // disableAutostart prevents starting the allocator when it is initialized - disableAutostart bool - - // backend is the upstream, shared, backend to which we syncronize local - // information - backend Backend -} - -// AllocatorOption is the base type for allocator options -type AllocatorOption func(*Allocator) - -// NewAllocatorForGC returns an allocator that can be used to run RunGC() -// -// The allocator can be configured by passing in additional options: -// - WithMin(id) - minimum ID to allocate (default: 1) -// - WithMax(id) - maximum ID to allocate (default max(uint64)) -func NewAllocatorForGC(backend Backend, opts ...AllocatorOption) *Allocator { - a := &Allocator{ - backend: backend, - min: idpool.ID(1), - max: idpool.ID(^uint64(0)), - } - - for _, fn := range opts { - fn(a) - } - - return a -} - -type GCStats struct { - // Alive is the number of identities alive - Alive int - - // Deleted is the number of identities deleted - Deleted int -} - -// Backend represents clients to remote ID allocation systems, such as KV -// Stores. These are used to coordinate key->ID allocation between cilium -// nodes. -type Backend interface { - // DeleteAllKeys will delete all keys. It is used in tests. - DeleteAllKeys(ctx context.Context) - - // Encode encodes a key string as required to conform to the key - // restrictions of the backend - Encode(string) string - - // AllocateID creates a new key->ID association. This is expected to be a - // create-only operation, and the ID may be allocated by another node. An - // error in that case is not expected to be fatal. The actual ID is obtained - // by Allocator from the local idPool, which is updated with used-IDs as the - // Backend makes calls to the handler in ListAndWatch. - // The implementation of the backend might return an AllocatorKey that is - // a copy of 'key' with an internal reference of the backend key or, if it - // doesn't use the internal reference of the backend key it simply returns - // 'key'. In case of an error the returned 'AllocatorKey' should be nil. - AllocateID(ctx context.Context, id idpool.ID, key AllocatorKey) (AllocatorKey, error) - - // AllocateIDIfLocked behaves like AllocateID but when lock is non-nil the - // operation proceeds only if it is still valid. - // The implementation of the backend might return an AllocatorKey that is - // a copy of 'key' with an internal reference of the backend key or, if it - // doesn't use the internal reference of the backend key it simply returns - // 'key'. In case of an error the returned 'AllocatorKey' should be nil. - AllocateIDIfLocked(ctx context.Context, id idpool.ID, key AllocatorKey, lock kvstore.KVLocker) (AllocatorKey, error) - - // AcquireReference records that this node is using this key->ID mapping. - // This is distinct from any reference counting within this agent; only one - // reference exists for this node for any number of managed endpoints using - // it. - // The semantics of cleaning up stale references is delegated to the Backend - // implementation. RunGC may need to be invoked. - // This can race, and so lock can be provided (via a Lock call, below). - AcquireReference(ctx context.Context, id idpool.ID, key AllocatorKey, lock kvstore.KVLocker) error - - // Release releases the use of an ID associated with the provided key. It - // does not guard against concurrent calls to - // releases.Release(ctx context.Context, key AllocatorKey) (err error) - Release(ctx context.Context, id idpool.ID, key AllocatorKey) (err error) - - // UpdateKey refreshes the record that this node is using this key -> id - // mapping. When reliablyMissing is set it will also recreate missing master or - // slave keys. - UpdateKey(ctx context.Context, id idpool.ID, key AllocatorKey, reliablyMissing bool) error - - // UpdateKeyIfLocked behaves like UpdateKey but when lock is non-nil the operation proceeds only if it is still valid. - UpdateKeyIfLocked(ctx context.Context, id idpool.ID, key AllocatorKey, reliablyMissing bool, lock kvstore.KVLocker) error - - // Get returns the allocated ID for this key as seen by the Backend. This may - // have been created by other agents. - Get(ctx context.Context, key AllocatorKey) (idpool.ID, error) - - // GetIfLocked behaves like Get, but but when lock is non-nil the - // operation proceeds only if it is still valid. - GetIfLocked(ctx context.Context, key AllocatorKey, lock kvstore.KVLocker) (idpool.ID, error) - - // GetByID returns the key associated with this ID, as seen by the Backend. - // This may have been created by other agents. - GetByID(ctx context.Context, id idpool.ID) (AllocatorKey, error) - - // Lock provides an opaque lock object that can be used, later, to ensure - // that the key has not changed since the lock was created. This can be done - // with GetIfLocked. - Lock(ctx context.Context, key AllocatorKey) (kvstore.KVLocker, error) - - // ListAndWatch begins synchronizing the local Backend instance with its - // remote. - ListAndWatch(ctx context.Context, handler CacheMutations, stopChan chan struct{}) - - // RunGC reaps stale or unused identities within the Backend and makes them - // available for reuse. It is used by the cilium-operator and is not invoked - // by cilium-agent. - // Note: not all Backend implemenations rely on this, such as the kvstore - // backends, and may use leases to expire keys. - RunGC(ctx context.Context, rateLimit *rate.Limiter, staleKeysPrevRound map[string]uint64, minID idpool.ID, maxID idpool.ID) (map[string]uint64, *GCStats, error) - - // RunLocksGC reaps stale or unused locks within the Backend. It is used by - // the cilium-operator and is not invoked by cilium-agent. Returns - // a map of locks currently being held in the KVStore including the ones - // that failed to be GCed. - // Note: not all Backend implementations rely on this, such as the kvstore - // backends, and may use leases to expire keys. - RunLocksGC(ctx context.Context, staleKeysPrevRound map[string]kvstore.Value) (map[string]kvstore.Value, error) - - // Status returns a human-readable status of the Backend. - Status() (string, error) -} - -// NewAllocator creates a new Allocator. Any type can be used as key as long as -// the type implements the AllocatorKey interface. A variable of the type has -// to be passed into NewAllocator() to make the type known. The specified base -// path is used to prefix all keys in the kvstore. The provided path must be -// unique. -// -// The allocator can be configured by passing in additional options: -// - WithEvents() - enable Events channel -// - WithMin(id) - minimum ID to allocate (default: 1) -// - WithMax(id) - maximum ID to allocate (default max(uint64)) -// -// After creation, IDs can be allocated with Allocate() and released with -// Release() -func NewAllocator(typ AllocatorKey, backend Backend, opts ...AllocatorOption) (*Allocator, error) { - a := &Allocator{ - keyType: typ, - backend: backend, - min: idpool.ID(1), - max: idpool.ID(^uint64(0)), - localKeys: newLocalKeys(), - stopGC: make(chan struct{}), - suffix: uuid.New().String()[:10], - remoteCaches: map[string]*RemoteCache{}, - backoffTemplate: backoff.Exponential{ - Min: time.Duration(20) * time.Millisecond, - Factor: 2.0, - }, - } - - for _, fn := range opts { - fn(a) - } - - a.mainCache = newCache(a) - - if a.suffix == "" { - return nil, errors.New("allocator suffix is and unlikely unique") - } - - if a.min < 1 { - return nil, errors.New("minimum ID must be >= 1") - } - - if a.max <= a.min { - return nil, fmt.Errorf("maximum ID must be greater than minimum ID: configured max %v, min %v", a.max, a.min) - } - - a.idPool = idpool.NewIDPool(a.min, a.max) - - if !a.disableAutostart { - a.start() - } - - return a, nil -} - -func (a *Allocator) start() { - a.initialListDone = a.mainCache.start() - if !a.disableGC { - go func() { - select { - case <-a.initialListDone: - case <-time.After(option.Config.AllocatorListTimeout): - log.Fatalf("Timeout while waiting for initial allocator state") - } - a.startLocalKeySync() - }() - } -} - -// WithBackend sets this allocator to use backend. It is expected to be used at -// initialization. -func WithBackend(backend Backend) AllocatorOption { - return func(a *Allocator) { - a.backend = backend - } -} - -// WithEvents enables receiving of events. -// -// CAUTION: When using this function. The provided channel must be continuously -// read while NewAllocator() is being called to ensure that the channel does -// not block indefinitely while NewAllocator() emits events on it while -// populating the initial cache. -func WithEvents(events AllocatorEventSendChan) AllocatorOption { - return func(a *Allocator) { a.events = events } -} - -// WithMin sets the minimum identifier to be allocated -func WithMin(id idpool.ID) AllocatorOption { - return func(a *Allocator) { a.min = id } -} - -// WithMax sets the maximum identifier to be allocated -func WithMax(id idpool.ID) AllocatorOption { - return func(a *Allocator) { a.max = id } -} - -// WithPrefixMask sets the prefix used for all ID allocations. If set, the mask -// will be ORed to all selected IDs prior to allocation. It is the -// responsibility of the caller to ensure that the mask is not conflicting with -// min..max. -func WithPrefixMask(mask idpool.ID) AllocatorOption { - return func(a *Allocator) { a.prefixMask = mask } -} - -// WithMasterKeyProtection will watch for delete events on master keys and -// re-created them if local usage suggests that the key is still in use -func WithMasterKeyProtection() AllocatorOption { - return func(a *Allocator) { a.enableMasterKeyProtection = true } -} - -// WithoutGC disables the use of the garbage collector -func WithoutGC() AllocatorOption { - return func(a *Allocator) { a.disableGC = true } -} - -// WithoutAutostart prevents starting the allocator when it is initialized -func WithoutAutostart() AllocatorOption { - return func(a *Allocator) { a.disableAutostart = true } -} - -// GetEvents returns the events channel given to the allocator when -// constructed. -// Note: This channel is not owned by the allocator! -func (a *Allocator) GetEvents() AllocatorEventSendChan { - return a.events -} - -// Delete deletes an allocator and stops the garbage collector -func (a *Allocator) Delete() { - close(a.stopGC) - a.mainCache.stop() -} - -// WaitForInitialSync waits until the initial sync is complete -func (a *Allocator) WaitForInitialSync(ctx context.Context) error { - select { - case <-a.initialListDone: - case <-ctx.Done(): - return fmt.Errorf("identity sync was cancelled: %w", ctx.Err()) - } - - return nil -} - -// RangeFunc is the function called by RangeCache -type RangeFunc func(idpool.ID, AllocatorKey) - -// ForeachCache iterates over the allocator cache and calls RangeFunc on each -// cached entry -func (a *Allocator) ForeachCache(cb RangeFunc) { - a.mainCache.foreach(cb) - - a.remoteCachesMutex.RLock() - for _, rc := range a.remoteCaches { - rc.cache.foreach(cb) - } - a.remoteCachesMutex.RUnlock() -} - -// selectAvailableID selects an available ID. -// Returns a triple of the selected ID ORed with prefixMask, the ID string and -// the originally selected ID. -func (a *Allocator) selectAvailableID() (idpool.ID, string, idpool.ID) { - if id := a.idPool.LeaseAvailableID(); id != idpool.NoID { - unmaskedID := id - id |= a.prefixMask - return id, id.String(), unmaskedID - } - - return 0, "", 0 -} - -// AllocatorKey is the interface to implement in order for a type to be used as -// key for the allocator. The key's data is assumed to be a collection of -// pkg/label.Label, and the functions reflect this somewhat. -type AllocatorKey interface { - fmt.Stringer - - // GetKey returns the canonical string representation of the key - GetKey() string - - // PutKey stores the information in v into the key. This is the inverse - // operation to GetKey - PutKey(v string) AllocatorKey - - // GetAsMap returns the key as a collection of "labels" with a key and value. - // This is the inverse operation to PutKeyFromMap. - GetAsMap() map[string]string - - // PutKeyFromMap stores the labels in v into the key to be used later. This - // is the inverse operation to GetAsMap. - PutKeyFromMap(v map[string]string) AllocatorKey - - // PutValue puts metadata inside the global identity for the given 'key' with - // the given 'value'. - PutValue(key any, value any) AllocatorKey - - // Value returns the value stored in the metadata map. - Value(key any) any -} - -func (a *Allocator) encodeKey(key AllocatorKey) string { - return a.backend.Encode(key.GetKey()) -} - -// Return values: -// 1. allocated ID -// 2. whether the ID is newly allocated from kvstore -// 3. whether this is the first owner that holds a reference to the key in -// localkeys store -// 4. error in case of failure -func (a *Allocator) lockedAllocate(ctx context.Context, key AllocatorKey) (idpool.ID, bool, bool, error) { - var firstUse bool - - kvstore.Trace("Allocating key in kvstore", nil, logrus.Fields{fieldKey: key}) - - k := a.encodeKey(key) - lock, err := a.backend.Lock(ctx, key) - if err != nil { - return 0, false, false, err - } - - defer lock.Unlock(context.Background()) - - // fetch first key that matches /value/ while ignoring the - // node suffix - value, err := a.GetIfLocked(ctx, key, lock) - if err != nil { - return 0, false, false, err - } - - kvstore.Trace("kvstore state is: ", nil, logrus.Fields{fieldID: value}) - - a.slaveKeysMutex.Lock() - defer a.slaveKeysMutex.Unlock() - - // We shouldn't assume the fact the master key does not exist in the kvstore - // that localKeys does not have it. The KVStore might have lost all of its - // data but the local agent still holds a reference for the given master key. - if value == 0 { - value = a.localKeys.lookupKey(k) - if value != 0 { - // re-create master key - if err := a.backend.UpdateKeyIfLocked(ctx, value, key, true, lock); err != nil { - return 0, false, false, fmt.Errorf("unable to re-create missing master key '%s': %s while allocating ID: %w", key, value, err) - } - } - } else { - _, firstUse, err = a.localKeys.allocate(k, key, value) - if err != nil { - return 0, false, false, fmt.Errorf("unable to reserve local key '%s': %w", k, err) - } - - if firstUse { - log.WithField(fieldKey, k).Debug("Reserved new local key") - } else { - log.WithField(fieldKey, k).Debug("Reusing existing local key") - } - } - - if value != 0 { - log.WithField(fieldKey, k).Info("Reusing existing global key") - - if err = a.backend.AcquireReference(ctx, value, key, lock); err != nil { - a.localKeys.release(k) - return 0, false, false, fmt.Errorf("unable to create secondary key '%s': %w", k, err) - } - - // mark the key as verified in the local cache - if err := a.localKeys.verify(k); err != nil { - log.WithError(err).Error("BUG: Unable to verify local key") - } - - return value, false, firstUse, nil - } - - log.WithField(fieldKey, k).Debug("Allocating new master ID") - id, strID, unmaskedID := a.selectAvailableID() - if id == 0 { - return 0, false, false, fmt.Errorf("no more available IDs in configured space") - } - - kvstore.Trace("Selected available key ID", nil, logrus.Fields{fieldID: id}) - - releaseKeyAndID := func() { - a.localKeys.release(k) - a.idPool.Release(unmaskedID) // This returns this ID to be re-used for other keys - } - - oldID, firstUse, err := a.localKeys.allocate(k, key, id) - if err != nil { - a.idPool.Release(unmaskedID) - return 0, false, false, fmt.Errorf("unable to reserve local key '%s': %w", k, err) - } - - // Another local writer beat us to allocating an ID for the same key, - // start over - if id != oldID { - releaseKeyAndID() - return 0, false, false, fmt.Errorf("another writer has allocated key %s", k) - } - - // Check that this key has not been allocated in the cluster during our - // operation here - value, err = a.GetNoCache(ctx, key) - if err != nil { - releaseKeyAndID() - return 0, false, false, err - } - if value != 0 { - releaseKeyAndID() - return 0, false, false, fmt.Errorf("Found master key after proceeding with new allocation for %s", k) - } - - // Assigned to 'key' from 'key2' since in case of an error, we don't replace - // the original 'key' variable with 'nil'. - key2 := key - key, err = a.backend.AllocateIDIfLocked(ctx, id, key2, lock) - if err != nil { - // Creation failed. Another agent most likely beat us to allocting this - // ID, retry. - releaseKeyAndID() - return 0, false, false, fmt.Errorf("unable to allocate ID %s for key %s: %w", strID, key2, err) - } - - // Notify pool that leased ID is now in-use. - a.idPool.Use(unmaskedID) - - if err = a.backend.AcquireReference(ctx, id, key, lock); err != nil { - // We will leak the master key here as the key has already been - // exposed and may be in use by other nodes. The garbage - // collector will release it again. - releaseKeyAndID() - return 0, false, false, fmt.Errorf("secondary key creation failed '%s': %w", k, err) - } - - // mark the key as verified in the local cache - if err := a.localKeys.verify(k); err != nil { - log.WithError(err).Error("BUG: Unable to verify local key") - } - - log.WithField(fieldKey, k).Info("Allocated new global key") - - return id, true, firstUse, nil -} - -// Allocate will retrieve the ID for the provided key. If no ID has been -// allocated for this key yet, a key will be allocated. If allocation fails, -// most likely due to a parallel allocation of the same ID by another user, -// allocation is re-attempted for maxAllocAttempts times. -// -// Return values: -// 1. allocated ID -// 2. whether the ID is newly allocated from kvstore -// 3. whether this is the first owner that holds a reference to the key in -// localkeys store -// 4. error in case of failure -func (a *Allocator) Allocate(ctx context.Context, key AllocatorKey) (idpool.ID, bool, bool, error) { - var ( - err error - value idpool.ID - isNew bool - firstUse bool - k = a.encodeKey(key) - ) - - log.WithField(fieldKey, key).Debug("Allocating key") - - select { - case <-a.initialListDone: - case <-ctx.Done(): - return 0, false, false, fmt.Errorf("allocation was cancelled while waiting for initial key list to be received: %w", ctx.Err()) - } - - kvstore.Trace("Allocating from kvstore", nil, logrus.Fields{fieldKey: key}) - - // make a copy of the template and customize it - boff := a.backoffTemplate - boff.Name = key.String() - - for attempt := 0; attempt < maxAllocAttempts; attempt++ { - // Check our list of local keys already in use and increment the - // refcnt. The returned key must be released afterwards. No kvstore - // operation was performed for this allocation. - // We also do this on every loop as a different Allocate call might have - // allocated the key while we are attempting to allocate in this - // execution thread. It does not hurt to check if localKeys contains a - // reference for the key that we are attempting to allocate. - if val := a.localKeys.use(k); val != idpool.NoID { - kvstore.Trace("Reusing local id", nil, logrus.Fields{fieldID: val, fieldKey: key}) - a.mainCache.insert(key, val) - return val, false, false, nil - } - - // FIXME: Add non-locking variant - value, isNew, firstUse, err = a.lockedAllocate(ctx, key) - if err == nil { - a.mainCache.insert(key, value) - log.WithField(fieldKey, key).WithField(fieldID, value).Debug("Allocated key") - return value, isNew, firstUse, nil - } - - scopedLog := log.WithFields(logrus.Fields{ - fieldKey: key, - logfields.Attempt: attempt, - }) - - select { - case <-ctx.Done(): - scopedLog.WithError(ctx.Err()).Warning("Ongoing key allocation has been cancelled") - return 0, false, false, fmt.Errorf("key allocation cancelled: %w", ctx.Err()) - default: - scopedLog.WithError(err).Warning("Key allocation attempt failed") - } - - kvstore.Trace("Allocation attempt failed", err, logrus.Fields{fieldKey: key, logfields.Attempt: attempt}) - - if waitErr := boff.Wait(ctx); waitErr != nil { - return 0, false, false, waitErr - } - } - - return 0, false, false, err -} - -// GetIfLocked returns the ID which is allocated to a key. Returns an ID of NoID if no ID -// has been allocated to this key yet if the client is still holding the given -// lock. -func (a *Allocator) GetIfLocked(ctx context.Context, key AllocatorKey, lock kvstore.KVLocker) (idpool.ID, error) { - if id := a.mainCache.get(a.encodeKey(key)); id != idpool.NoID { - return id, nil - } - - return a.backend.GetIfLocked(ctx, key, lock) -} - -// Get returns the ID which is allocated to a key. Returns an ID of NoID if no ID -// has been allocated to this key yet. -func (a *Allocator) Get(ctx context.Context, key AllocatorKey) (idpool.ID, error) { - if id := a.mainCache.get(a.encodeKey(key)); id != idpool.NoID { - return id, nil - } - - return a.GetNoCache(ctx, key) -} - -// GetNoCache returns the ID which is allocated to a key in the kvstore, -// bypassing the local copy of allocated keys. -func (a *Allocator) GetNoCache(ctx context.Context, key AllocatorKey) (idpool.ID, error) { - return a.backend.Get(ctx, key) -} - -// GetByID returns the key associated with an ID. Returns nil if no key is -// associated with the ID. -func (a *Allocator) GetByID(ctx context.Context, id idpool.ID) (AllocatorKey, error) { - if key := a.mainCache.getByID(id); key != nil { - return key, nil - } - - return a.backend.GetByID(ctx, id) -} - -// GetIncludeRemoteCaches returns the ID which is allocated to a key. Includes the -// caches of watched remote kvstores in the query. Returns an ID of NoID if no -// ID has been allocated in any remote kvstore to this key yet. -func (a *Allocator) GetIncludeRemoteCaches(ctx context.Context, key AllocatorKey) (idpool.ID, error) { - encoded := a.encodeKey(key) - - // check main cache first - if id := a.mainCache.get(encoded); id != idpool.NoID { - return id, nil - } - - // check remote caches - a.remoteCachesMutex.RLock() - for _, rc := range a.remoteCaches { - if id := rc.cache.get(encoded); id != idpool.NoID { - a.remoteCachesMutex.RUnlock() - return id, nil - } - } - a.remoteCachesMutex.RUnlock() - - // check main backend - if id, err := a.backend.Get(ctx, key); id != idpool.NoID || err != nil { - return id, err - } - - // we skip checking remote backends explicitly here, to avoid - // accidentally overloading them in case of lookups for invalid identities - - return idpool.NoID, nil -} - -// GetByIDIncludeRemoteCaches returns the key associated with an ID. Includes -// the caches of watched remote kvstores in the query. -// Returns nil if no key is associated with the ID. -func (a *Allocator) GetByIDIncludeRemoteCaches(ctx context.Context, id idpool.ID) (AllocatorKey, error) { - // check main cache first - if key := a.mainCache.getByID(id); key != nil { - return key, nil - } - - // check remote caches - a.remoteCachesMutex.RLock() - for _, rc := range a.remoteCaches { - if key := rc.cache.getByID(id); key != nil { - a.remoteCachesMutex.RUnlock() - return key, nil - } - } - a.remoteCachesMutex.RUnlock() - - // check main backend - if key, err := a.backend.GetByID(ctx, id); key != nil || err != nil { - return key, err - } - - // we skip checking remote backends explicitly here, to avoid - // accidentally overloading them in case of lookups for invalid identities - - return nil, nil -} - -// Release releases the use of an ID associated with the provided key. After -// the last user has released the ID, the key is removed in the KVstore and -// the returned lastUse value is true. -func (a *Allocator) Release(ctx context.Context, key AllocatorKey) (lastUse bool, err error) { - log.WithField(fieldKey, key).Info("Releasing key") - - select { - case <-a.initialListDone: - case <-ctx.Done(): - return false, fmt.Errorf("release was cancelled while waiting for initial key list to be received: %w", ctx.Err()) - } - - k := a.encodeKey(key) - - a.slaveKeysMutex.Lock() - defer a.slaveKeysMutex.Unlock() - - // release the key locally, if it was the last use, remove the node - // specific value key to remove the global reference mark - var id idpool.ID - lastUse, id, err = a.localKeys.release(k) - if err != nil { - return lastUse, err - } - if lastUse { - // Since in CRD mode we don't have a way to map which identity is being - // used by a node, we need to also pass the ID to the release function. - // This allows the CRD store to find the right identity by its ID and - // remove the node reference on that identity. - a.backend.Release(ctx, id, key) - } - - return lastUse, err -} - -// RunGC scans the kvstore for unused master keys and removes them -func (a *Allocator) RunGC(rateLimit *rate.Limiter, staleKeysPrevRound map[string]uint64) (map[string]uint64, *GCStats, error) { - return a.backend.RunGC(context.TODO(), rateLimit, staleKeysPrevRound, a.min, a.max) -} - -// RunLocksGC scans the kvstore for stale locks and removes them -func (a *Allocator) RunLocksGC(ctx context.Context, staleLocksPrevRound map[string]kvstore.Value) (map[string]kvstore.Value, error) { - return a.backend.RunLocksGC(ctx, staleLocksPrevRound) -} - -// DeleteAllKeys will delete all keys. It is expected to be used in tests. -func (a *Allocator) DeleteAllKeys() { - a.backend.DeleteAllKeys(context.TODO()) -} - -// syncLocalKeys checks the kvstore and verifies that a master key exists for -// all locally used allocations. This will restore master keys if deleted for -// some reason. -func (a *Allocator) syncLocalKeys() error { - // Create a local copy of all local allocations to not require to hold - // any locks while performing kvstore operations. Local use can - // disappear while we perform the sync but that is fine as worst case, - // a master key is created for a slave key that no longer exists. The - // garbage collector will remove it again. - ids := a.localKeys.getVerifiedIDs() - - for id, value := range ids { - if err := a.backend.UpdateKey(context.TODO(), id, value, false); err != nil { - log.WithError(err).WithFields(logrus.Fields{ - fieldKey: value, - fieldID: id, - }).Warning("Unable to sync key") - } - } - - return nil -} - -func (a *Allocator) startLocalKeySync() { - go func(a *Allocator) { - kvTimer, kvTimerDone := inctimer.New() - defer kvTimerDone() - for { - if err := a.syncLocalKeys(); err != nil { - log.WithError(err).Warning("Unable to run local key sync routine") - } - - select { - case <-a.stopGC: - log.Debug("Stopped master key sync routine") - return - case <-kvTimer.After(option.Config.KVstorePeriodicSync): - } - } - }(a) -} - -// AllocatorEventChan is a channel to receive allocator events on -type AllocatorEventChan chan AllocatorEvent - -// Send- and receive-only versions of the above. -type AllocatorEventRecvChan = <-chan AllocatorEvent -type AllocatorEventSendChan = chan<- AllocatorEvent - -// AllocatorEvent is an event sent over AllocatorEventChan -type AllocatorEvent struct { - // Typ is the type of event (create / modify / delete) - Typ kvstore.EventType - - // ID is the allocated ID - ID idpool.ID - - // Key is the key associated with the ID - Key AllocatorKey -} - -// RemoteCache represents the cache content of an additional kvstore managing -// identities. The contents are not directly accessible but will be merged into -// the ForeachCache() function. -type RemoteCache struct { - name string - - allocator *Allocator - cache *cache - - watchFunc func(ctx context.Context, remote *RemoteCache, onSync func(context.Context)) -} - -func (a *Allocator) NewRemoteCache(remoteName string, remoteAlloc *Allocator) *RemoteCache { - return &RemoteCache{ - name: remoteName, - allocator: remoteAlloc, - cache: &remoteAlloc.mainCache, - - watchFunc: a.WatchRemoteKVStore, - } -} - -// WatchRemoteKVStore starts watching an allocator base prefix the kvstore -// represents by the provided backend. A local cache of all identities of that -// kvstore will be maintained in the RemoteCache structure returned and will -// start being reported in the identities returned by the ForeachCache() -// function. RemoteName should be unique per logical "remote". -func (a *Allocator) WatchRemoteKVStore(ctx context.Context, rc *RemoteCache, onSync func(context.Context)) { - scopedLog := log.WithField(logfields.ClusterName, rc.name) - scopedLog.Info("Starting remote kvstore watcher") - - rc.allocator.start() - - select { - case <-ctx.Done(): - scopedLog.Debug("Context canceled before remote kvstore watcher synchronization completed: stale identities will now be drained") - rc.close() - - a.remoteCachesMutex.RLock() - old := a.remoteCaches[rc.name] - a.remoteCachesMutex.RUnlock() - - if old != nil { - old.cache.mutex.RLock() - defer old.cache.mutex.RUnlock() - } - - // Drain all entries that might have been received until now, and that - // are not present in the current cache (if any). This ensures we do not - // leak any stale identity, and at the same time we do not invalidate the - // current state. - rc.cache.drainIf(func(id idpool.ID) bool { - if old == nil { - return true - } - - _, ok := old.cache.nextCache[id] - return !ok - }) - return - - case <-rc.cache.listDone: - scopedLog.Info("Remote kvstore watcher successfully synchronized and registered") - } - - a.remoteCachesMutex.Lock() - old := a.remoteCaches[rc.name] - a.remoteCaches[rc.name] = rc - a.remoteCachesMutex.Unlock() - - if old != nil { - // In case of reconnection, let's emit a deletion event for all stale identities - // that are no longer present in the kvstore. We take the lock of the new cache - // to ensure that we observe a stable state during this process (i.e., no keys - // are added/removed in the meanwhile). - scopedLog.Debug("Another kvstore watcher was already registered: deleting stale identities") - rc.cache.mutex.RLock() - old.cache.drainIf(func(id idpool.ID) bool { - _, ok := rc.cache.nextCache[id] - return !ok - }) - rc.cache.mutex.RUnlock() - } - - // Execute the on-sync callback handler. - onSync(ctx) - - <-ctx.Done() - rc.close() - scopedLog.Info("Stopped remote kvstore watcher") -} - -// RemoveRemoteKVStore removes any reference to a remote allocator / kvstore, emitting -// a deletion event for all previously known identities. -func (a *Allocator) RemoveRemoteKVStore(remoteName string) { - a.remoteCachesMutex.Lock() - old := a.remoteCaches[remoteName] - delete(a.remoteCaches, remoteName) - a.remoteCachesMutex.Unlock() - - if old != nil { - old.cache.drain() - log.WithField(logfields.ClusterName, remoteName).Info("Remote kvstore watcher unregistered") - } -} - -// Watch starts watching the remote kvstore and synchronize the identities in -// the local cache. It blocks until the context is closed. -func (rc *RemoteCache) Watch(ctx context.Context, onSync func(context.Context)) { - rc.watchFunc(ctx, rc, onSync) -} - -// NumEntries returns the number of entries in the remote cache -func (rc *RemoteCache) NumEntries() int { - if rc == nil { - return 0 - } - - return rc.cache.numEntries() -} - -// Synced returns whether the initial list of entries has been retrieved from -// the kvstore, and new events are currently being watched. -func (rc *RemoteCache) Synced() bool { - if rc == nil { - return false - } - - select { - case <-rc.cache.stopChan: - return false - default: - select { - case <-rc.cache.listDone: - return true - default: - return false - } - } -} - -// close stops watching for identities in the kvstore associated with the -// remote cache. -func (rc *RemoteCache) close() { - rc.cache.allocator.Delete() -} - -// Observe the identity changes. Conforms to stream.Observable. -// Replays the current state of the cache when subscribing. -func (a *Allocator) Observe(ctx context.Context, next func(AllocatorChange), complete func(error)) { - a.mainCache.Observe(ctx, next, complete) -} diff --git a/vendor/github.com/cilium/cilium/pkg/allocator/cache.go b/vendor/github.com/cilium/cilium/pkg/allocator/cache.go deleted file mode 100644 index 774aca1eebf..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/allocator/cache.go +++ /dev/null @@ -1,381 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package allocator - -import ( - "context" - "sync" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/controller" - "github.com/cilium/cilium/pkg/idpool" - "github.com/cilium/cilium/pkg/kvstore" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/stream" - "github.com/cilium/cilium/pkg/time" -) - -// backendOpTimeout is the time allowed for operations sent to backends in -// response to events such as create/modify/delete. -const backendOpTimeout = 10 * time.Second - -// idMap provides mapping from ID to an AllocatorKey -type idMap map[idpool.ID]AllocatorKey - -// keyMap provides mapping from AllocatorKey to ID -type keyMap map[string]idpool.ID - -type cache struct { - controllers *controller.Manager - - allocator *Allocator - - stopChan chan struct{} - - // mutex protects all cache data structures - mutex lock.RWMutex - - // cache is a local cache of all IDs allocated in the kvstore. It is - // being maintained by watching for kvstore events and can thus lag - // behind. - cache idMap - - // keyCache shadows cache and allows access by key - keyCache keyMap - - // nextCache is the cache is constantly being filled by startWatch(), - // when startWatch has successfully performed the initial fill using - // ListPrefix, the cache above will be pointed to nextCache. If the - // startWatch() fails to perform the initial list, then the cache is - // never pointed to nextCache. This guarantees that a valid cache is - // kept at all times. - nextCache idMap - - // nextKeyCache follows the same logic as nextCache but for keyCache - nextKeyCache keyMap - - listDone waitChan - - // stopWatchWg is a wait group that gets conditions added when a - // watcher is started with the conditions marked as done when the - // watcher has exited - stopWatchWg sync.WaitGroup - - changeSrc stream.Observable[AllocatorChange] - emitChange func(AllocatorChange) - completeChangeSrc func(error) -} - -func newCache(a *Allocator) (c cache) { - c = cache{ - allocator: a, - cache: idMap{}, - keyCache: keyMap{}, - stopChan: make(chan struct{}), - controllers: controller.NewManager(), - } - c.changeSrc, c.emitChange, c.completeChangeSrc = stream.Multicast[AllocatorChange]() - return -} - -type waitChan chan struct{} - -// CacheMutations are the operations given to a Backend's ListAndWatch command. -// They are called on changes to identities. -type CacheMutations interface { - // OnListDone is called when the initial full-sync is complete. - OnListDone() - - // OnAdd is called when a new key->ID appears. - OnAdd(id idpool.ID, key AllocatorKey) - - // OnModify is called when a key->ID mapping is modified. This may happen - // when leases are updated, and does not mean the actual mapping had changed. - OnModify(id idpool.ID, key AllocatorKey) - - // OnDelete is called when a key->ID mapping is removed. This may trigger - // master-key protection, if enabled, where the local allocator will recreate - // the key->ID association is recreated because the local node is still using - // it. - OnDelete(id idpool.ID, key AllocatorKey) -} - -func (c *cache) sendEvent(typ kvstore.EventType, id idpool.ID, key AllocatorKey) { - if events := c.allocator.events; events != nil { - events <- AllocatorEvent{Typ: typ, ID: id, Key: key} - } -} - -func (c *cache) OnListDone() { - c.mutex.Lock() - // nextCache is valid, point the live cache to it - c.cache = c.nextCache - c.keyCache = c.nextKeyCache - c.mutex.Unlock() - - log.Debug("Initial list of identities received") - - // report that the list operation has - // been completed and the allocator is - // ready to use - close(c.listDone) -} - -func (c *cache) OnAdd(id idpool.ID, key AllocatorKey) { - c.mutex.Lock() - defer c.mutex.Unlock() - - c.nextCache[id] = key - if key != nil { - c.nextKeyCache[c.allocator.encodeKey(key)] = id - } - c.allocator.idPool.Remove(id) - - c.emitChange(AllocatorChange{Kind: AllocatorChangeUpsert, ID: id, Key: key}) - - c.sendEvent(kvstore.EventTypeCreate, id, key) -} - -func (c *cache) OnModify(id idpool.ID, key AllocatorKey) { - c.mutex.Lock() - defer c.mutex.Unlock() - - if k, ok := c.nextCache[id]; ok { - delete(c.nextKeyCache, c.allocator.encodeKey(k)) - } - - c.nextCache[id] = key - if key != nil { - c.nextKeyCache[c.allocator.encodeKey(key)] = id - } - - c.emitChange(AllocatorChange{Kind: AllocatorChangeUpsert, ID: id, Key: key}) - - c.sendEvent(kvstore.EventTypeModify, id, key) -} - -func (c *cache) OnDelete(id idpool.ID, key AllocatorKey) { - c.mutex.Lock() - defer c.mutex.Unlock() - - c.onDeleteLocked(id, key, true) -} - -const syncIdentityControllerGroup = "sync-identity" - -func syncControllerName(id idpool.ID) string { - return syncIdentityControllerGroup + "-" + id.String() -} - -// no max interval by default, exposed as a variable for testing. -var masterKeyRecreateMaxInterval = time.Duration(0) - -var syncIdentityGroup = controller.NewGroup(syncIdentityControllerGroup) - -// onDeleteLocked must be called while holding c.Mutex for writing -func (c *cache) onDeleteLocked(id idpool.ID, key AllocatorKey, recreateMissingLocalKeys bool) { - a := c.allocator - if a.enableMasterKeyProtection && recreateMissingLocalKeys { - if value := a.localKeys.lookupID(id); value != nil { - c.controllers.UpdateController(syncControllerName(id), controller.ControllerParams{ - Context: context.Background(), - MaxRetryInterval: masterKeyRecreateMaxInterval, - Group: syncIdentityGroup, - DoFunc: func(ctx context.Context) error { - c.mutex.Lock() - defer c.mutex.Unlock() - // For each attempt, check if this ciliumidentity is still a candidate for recreation. - // It's possible that since the last iteration that this agent has legitimately deleted - // the key, in which case we can stop trying to recreate it. - if value := c.allocator.localKeys.lookupID(id); value == nil { - return nil - } - - ctx, cancel := context.WithTimeout(ctx, backendOpTimeout) - defer cancel() - - // Each iteration will attempt to grab the key reference, if that succeeds - // then this completes (i.e. the key exists). - // Otherwise we will attempt to create the key, this process repeats until - // the key is created. - if err := a.backend.UpdateKey(ctx, id, value, true); err != nil { - log.WithField("id", id).WithError(err).Error("OnDelete MasterKeyProtection update for key") - return err - } - log.WithField("id", id).Info("OnDelete MasterKeyProtection update succeeded") - return nil - }, - }) - - return - } - } - - if k, ok := c.nextCache[id]; ok && k != nil { - delete(c.nextKeyCache, c.allocator.encodeKey(k)) - } - - delete(c.nextCache, id) - a.idPool.Insert(id) - - c.emitChange(AllocatorChange{Kind: AllocatorChangeDelete, ID: id, Key: key}) - - c.sendEvent(kvstore.EventTypeDelete, id, key) -} - -// start requests a LIST operation from the kvstore and starts watching the -// prefix in a go subroutine. -func (c *cache) start() waitChan { - c.listDone = make(waitChan) - - c.mutex.Lock() - - // start with a fresh nextCache - c.nextCache = idMap{} - c.nextKeyCache = keyMap{} - c.mutex.Unlock() - - c.stopWatchWg.Add(1) - - go func() { - c.allocator.backend.ListAndWatch(context.TODO(), c, c.stopChan) - c.stopWatchWg.Done() - }() - - return c.listDone -} - -func (c *cache) stop() { - close(c.stopChan) - c.stopWatchWg.Wait() - // Drain/stop any remaining sync identity controllers. - // Backend watch is now stopped, any running controllers attempting to - // sync identities will complete and stop (possibly in a unresolved state). - c.controllers.RemoveAllAndWait() - c.completeChangeSrc(nil) -} - -// drain emits a deletion event for all known IDs. It must be called after the -// cache has been stopped, to ensure that no new events can be received afterwards. -func (c *cache) drain() { - // Make sure we wait until the watch loop has been properly stopped. - c.stopWatchWg.Wait() - - c.mutex.Lock() - for id, key := range c.nextCache { - c.onDeleteLocked(id, key, false) - } - c.mutex.Unlock() -} - -// drainIf emits a deletion event for all known IDs that are stale according to -// the isStale function. It must be called after the cache has been stopped, to -// ensure that no new events can be received afterwards. -func (c *cache) drainIf(isStale func(id idpool.ID) bool) { - // Make sure we wait until the watch loop has been properly stopped, otherwise - // new IDs might be added afterwards we complete the draining process. - c.stopWatchWg.Wait() - - c.mutex.Lock() - for id, key := range c.nextCache { - if isStale(id) { - c.onDeleteLocked(id, key, false) - log.WithFields(logrus.Fields{fieldID: id, fieldKey: key}). - Debug("Stale identity deleted") - } - } - c.mutex.Unlock() -} - -func (c *cache) get(key string) idpool.ID { - c.mutex.RLock() - if id, ok := c.keyCache[key]; ok { - c.mutex.RUnlock() - return id - } - c.mutex.RUnlock() - - return idpool.NoID -} - -func (c *cache) getByID(id idpool.ID) AllocatorKey { - c.mutex.RLock() - if v, ok := c.cache[id]; ok { - c.mutex.RUnlock() - return v - } - c.mutex.RUnlock() - - return nil -} - -func (c *cache) foreach(cb RangeFunc) { - c.mutex.RLock() - for k, v := range c.cache { - cb(k, v) - } - c.mutex.RUnlock() -} - -func (c *cache) insert(key AllocatorKey, val idpool.ID) { - c.mutex.Lock() - c.nextCache[val] = key - c.nextKeyCache[c.allocator.encodeKey(key)] = val - c.mutex.Unlock() -} - -func (c *cache) numEntries() int { - c.mutex.RLock() - defer c.mutex.RUnlock() - return len(c.nextCache) -} - -type AllocatorChangeKind string - -const ( - AllocatorChangeSync AllocatorChangeKind = "sync" - AllocatorChangeUpsert AllocatorChangeKind = "upsert" - AllocatorChangeDelete AllocatorChangeKind = "delete" -) - -type AllocatorChange struct { - Kind AllocatorChangeKind - ID idpool.ID - Key AllocatorKey -} - -// Observe the allocator changes. Conforms to stream.Observable. -// Replays the current state of the cache when subscribing. -func (c *cache) Observe(ctx context.Context, next func(AllocatorChange), complete func(error)) { - // This short-lived go routine serves the purpose of replaying the current state of the cache before starting - // to observe the actual source changeSrc. ChangeSrc is backed by a stream.FuncObservable, that will start its own - // go routine. Therefore, the current go routine will stop and free the lock on the mutex after the registration. - go func() { - // Wait until initial listing has completed before - // replaying the state. - select { - case <-c.listDone: - case <-ctx.Done(): - complete(ctx.Err()) - return - } - - c.mutex.RLock() - defer c.mutex.RUnlock() - - for id, key := range c.cache { - next(AllocatorChange{Kind: AllocatorChangeUpsert, ID: id, Key: key}) - } - - // Emit a sync event to inform the subscriber that it has received a consistent - // initial state. - next(AllocatorChange{Kind: AllocatorChangeSync}) - - // And subscribe to new events. Since we held the read-lock there won't be any - // missed or duplicate events. - c.changeSrc.Observe(ctx, next, complete) - }() - -} diff --git a/vendor/github.com/cilium/cilium/pkg/allocator/doc.go b/vendor/github.com/cilium/cilium/pkg/allocator/doc.go deleted file mode 100644 index 26c9a9aad10..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/allocator/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package allocator provides a kvstore based ID allocator -package allocator diff --git a/vendor/github.com/cilium/cilium/pkg/allocator/localkeys.go b/vendor/github.com/cilium/cilium/pkg/allocator/localkeys.go deleted file mode 100644 index 48820d7366b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/allocator/localkeys.go +++ /dev/null @@ -1,156 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package allocator - -import ( - "fmt" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/idpool" - "github.com/cilium/cilium/pkg/kvstore" - "github.com/cilium/cilium/pkg/lock" -) - -type localKey struct { - val idpool.ID - key AllocatorKey - refcnt uint64 - - // verified is true when the key has been synced with the kvstore - verified bool -} - -// localKeys is a map of keys in use locally. Keys can be used multiple times. -// A refcnt is managed to know when a key is no longer in use -type localKeys struct { - lock.RWMutex - keys map[string]*localKey - ids map[idpool.ID]*localKey -} - -func newLocalKeys() *localKeys { - return &localKeys{ - keys: map[string]*localKey{}, - ids: map[idpool.ID]*localKey{}, - } -} - -// allocate creates an entry for key in localKeys if needed and increments the -// refcnt. The value associated with the key must match the local cache or an -// error is returned -func (lk *localKeys) allocate(keyString string, key AllocatorKey, val idpool.ID) (idpool.ID, bool, error) { - lk.Lock() - defer lk.Unlock() - - var firstUse bool - - if k, ok := lk.keys[keyString]; ok { - if val != k.val { - return idpool.NoID, firstUse, fmt.Errorf("local key already allocated with different value (%s != %s)", val, k.val) - } - - k.refcnt++ - kvstore.Trace("Incremented local key refcnt", nil, logrus.Fields{fieldKey: keyString, fieldID: val, fieldRefCnt: k.refcnt}) - return k.val, firstUse, nil - } - - firstUse = true - k := &localKey{key: key, val: val, refcnt: 1} - lk.keys[keyString] = k - lk.ids[val] = k - kvstore.Trace("New local key", nil, logrus.Fields{fieldKey: keyString, fieldID: val, fieldRefCnt: 1}) - return val, firstUse, nil -} - -func (lk *localKeys) verify(key string) error { - lk.Lock() - defer lk.Unlock() - - if k, ok := lk.keys[key]; ok { - k.verified = true - kvstore.Trace("Local key verified", nil, logrus.Fields{fieldKey: key}) - return nil - } - - return fmt.Errorf("key %s not found", key) -} - -// lookupKey returns the idpool.ID of the key is present in the map of keys. -// if it isn't present, returns idpool.NoID -func (lk *localKeys) lookupKey(key string) idpool.ID { - lk.RLock() - defer lk.RUnlock() - - if k, ok := lk.keys[key]; ok { - return k.val - } - - return idpool.NoID -} - -// lookupID returns the key for a given ID or an empty string -func (lk *localKeys) lookupID(id idpool.ID) AllocatorKey { - lk.RLock() - defer lk.RUnlock() - - if k, ok := lk.ids[id]; ok { - return k.key - } - - return nil -} - -// use increments the refcnt of the key and returns its value -func (lk *localKeys) use(key string) idpool.ID { - lk.Lock() - defer lk.Unlock() - - if k, ok := lk.keys[key]; ok { - // unverified keys behave as if they do not exist - if !k.verified { - return idpool.NoID - } - - k.refcnt++ - kvstore.Trace("Incremented local key refcnt", nil, logrus.Fields{fieldKey: key, fieldID: k.val, fieldRefCnt: k.refcnt}) - return k.val - } - - return idpool.NoID -} - -// release releases the refcnt of a key. It returns the ID associated with the -// given key. When the last reference was released, the key is deleted and the -// returned lastUse value is true. -func (lk *localKeys) release(key string) (lastUse bool, id idpool.ID, err error) { - lk.Lock() - defer lk.Unlock() - if k, ok := lk.keys[key]; ok { - k.refcnt-- - kvstore.Trace("Decremented local key refcnt", nil, logrus.Fields{fieldKey: key, fieldID: k.val, fieldRefCnt: k.refcnt}) - if k.refcnt == 0 { - delete(lk.keys, key) - delete(lk.ids, k.val) - return true, k.val, nil - } - - return false, k.val, nil - } - - return false, idpool.NoID, fmt.Errorf("unable to find key in local cache") -} - -func (lk *localKeys) getVerifiedIDs() map[idpool.ID]AllocatorKey { - ids := map[idpool.ID]AllocatorKey{} - lk.RLock() - for id, localKey := range lk.ids { - if localKey.verified { - ids[id] = localKey.key - } - } - lk.RUnlock() - - return ids -} diff --git a/vendor/github.com/cilium/cilium/pkg/allocator/logfields.go b/vendor/github.com/cilium/cilium/pkg/allocator/logfields.go deleted file mode 100644 index 59df5540580..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/allocator/logfields.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package allocator - -const ( - fieldID = "id" - fieldKey = "key" - fieldRefCnt = "refcnt" -) diff --git a/vendor/github.com/cilium/cilium/pkg/annotation/k8s.go b/vendor/github.com/cilium/cilium/pkg/annotation/k8s.go deleted file mode 100644 index 87242d8a937..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/annotation/k8s.go +++ /dev/null @@ -1,159 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package annotation - -import ( - "regexp" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -const ( - // Prefix is the common prefix for all annotations - Prefix = "io.cilium" - - // ConfigPrefix is the common prefix for configuration related annotations. - ConfigPrefix = "config.cilium.io" - - // IngressPrefix is the common prefix for ingress related annotations. - IngressPrefix = "ingress.cilium.io" - - // NetworkPrefix is the common prefix for network related annotations. - NetworkPrefix = "network.cilium.io" - - // PolicyPrefix is the common prefix for policy related annotations. - PolicyPrefix = "policy.cilium.io" - - // ServicePrefix is the common prefix for service related annotations. - ServicePrefix = "service.cilium.io" - - // IPAMPrefix is the common prefix for IPAM related annotations. - IPAMPrefix = "ipam.cilium.io" - - // PolicyName / PolicyNameAlias is an optional annotation to the NetworkPolicy - // resource which specifies the name of the policy node to which all - // rules should be applied to. - PolicyName = PolicyPrefix + "/name" - PolicyNameAlias = Prefix + ".name" - - // V4CIDRName / V4CIDRNameAlias is the annotation name used to store the IPv4 - // pod CIDR in the node's annotations. - V4CIDRName = NetworkPrefix + "/ipv4-pod-cidr" - V4CIDRNameAlias = Prefix + ".network.ipv4-pod-cidr" - // V6CIDRName / V6CIDRNameAlias is the annotation name used to store the IPv6 - // pod CIDR in the node's annotations. - V6CIDRName = NetworkPrefix + "/ipv6-pod-cidr" - V6CIDRNameAlias = Prefix + ".network.ipv6-pod-cidr" - - // V4HealthName / V4HealthNameAlias is the annotation name used to store the - // IPv4 address of the cilium-health endpoint in the node's annotations. - V4HealthName = NetworkPrefix + "/ipv4-health-ip" - V4HealthNameAlias = Prefix + ".network.ipv4-health-ip" - // V6HealthName / V6HealthNameAlias is the annotation name used to store the - // IPv6 address of the cilium-health endpoint in the node's annotations. - V6HealthName = NetworkPrefix + "/ipv6-health-ip" - V6HealthNameAlias = Prefix + ".network.ipv6-health-ip" - - // V4IngressName / V4IngressNameAlias is the annotation name used to store - // the IPv4 address of the Ingress listener in the node's annotations. - V4IngressName = NetworkPrefix + "/ipv4-Ingress-ip" - V4IngressNameAlias = Prefix + ".network.ipv4-Ingress-ip" - // V6IngressName / V6IngressNameAlias is the annotation name used to store - // the IPv6 address of the Ingress listener in the node's annotations. - V6IngressName = NetworkPrefix + "/ipv6-Ingress-ip" - V6IngressNameAlias = Prefix + ".network.ipv6-Ingress-ip" - - // CiliumHostIP / CiliumHostIPAlias is the annotation name used to store the - // IPv4 address of the cilium host interface in the node's annotations. - CiliumHostIP = NetworkPrefix + "/ipv4-cilium-host" - CiliumHostIPAlias = Prefix + ".network.ipv4-cilium-host" - - // CiliumHostIPv6 / CiliumHostIPv6Alias is the annotation name used to store - // the IPv6 address of the cilium host interface in the node's annotation. - CiliumHostIPv6 = NetworkPrefix + "/ipv6-cilium-host" - CiliumHostIPv6Alias = Prefix + ".network.ipv6-cilium-host" - - // CiliumEncryptionKey / CiliumEncryptionKeyAlias is the annotation name used to - // store the encryption key of the cilium host interface in the node's annotation. - CiliumEncryptionKey = NetworkPrefix + "/encryption-key" - CiliumEncryptionKeyAlias = Prefix + ".network.encryption-key" - - // GlobalService / GlobalServiceAlias if set to true, marks a service to - // become a global service. - GlobalService = ServicePrefix + "/global" - GlobalServiceAlias = Prefix + "/global-service" - - // SharedService / SharedServiceAlias if set to false, prevents a service - // from being shared, the default is true if GlobalService is set, otherwise - // false. Setting the annotation SharedService to false while setting - // GlobalService to true allows to expose remote endpoints without - // sharing local endpoints. - SharedService = ServicePrefix + "/shared" - SharedServiceAlias = Prefix + "/shared-service" - - // ServiceAffinity / ServiceAffinityAlias annotations determines the - // preferred endpoint destination. - // Allowed values: - // - local - // preferred endpoints from local cluster if available - // - remote - // preferred endpoints from remote cluster if available - // - none (default) - // no preference. Default behavior if this annotation does not exist - ServiceAffinity = ServicePrefix + "/affinity" - ServiceAffinityAlias = Prefix + "/service-affinity" - - // ProxyVisibility / ProxyVisibilityAlias is the annotation name used to - // indicate whether proxy visibility should be enabled for a given pod (i.e., - // all traffic for the pod is redirected to the proxy for the given port / - // protocol in the annotation - ProxyVisibility = PolicyPrefix + "/proxy-visibility" - ProxyVisibilityAlias = Prefix + ".proxy-visibility" - - // NoTrack / NoTrackAlias is the annotation name used to store the port and - // protocol that we should bypass kernel conntrack for a given pod. This - // applies for both TCP and UDP connection. Current use case is NodeLocalDNS. - NoTrack = PolicyPrefix + "/no-track-port" - NoTrackAlias = Prefix + ".no-track-port" - - // WireguardPubKey / WireguardPubKeyAlias is the annotation name used to store - // the WireGuard public key in the CiliumNode CRD that we need to use to encrypt - // traffic to that node. - WireguardPubKey = NetworkPrefix + "/wg-pub-key" - WireguardPubKeyAlias = Prefix + ".network.wg-pub-key" - - // BGPVRouterAnnoPrefix is the prefix used for all Virtual Router annotations - // Its just a prefix, because the ASN of the Router is part of the annotation itself - BGPVRouterAnnoPrefix = "cilium.io/bgp-virtual-router." - - // IPAMPoolKey is the annotation name used to store the IPAM pool name from - // which workloads should allocate their IP from - IPAMPoolKey = IPAMPrefix + "/ip-pool" - - // IPAMIPv4PoolKey is the annotation name used to store the IPAM IPv4 pool name from - // which workloads should allocate their IP from - IPAMIPv4PoolKey = IPAMPrefix + "/ipv4-pool" - - // IPAMIPv6PoolKey is the annotation name used to store the IPAM IPv6 pool name from - // which workloads should allocate their IP from - IPAMIPv6PoolKey = IPAMPrefix + "/ipv6-pool" -) - -var ( - // CiliumPrefixRegex is a regex matching Cilium specific annotations. - CiliumPrefixRegex = regexp.MustCompile(`^([A-Za-z0-9]+\.)*cilium.io/`) -) - -// Get returns the annotation value associated with the given key, or any of -// the additional aliases if not found. -func Get(obj metav1.Object, key string, aliases ...string) (value string, ok bool) { - keys := append([]string{key}, aliases...) - for _, k := range keys { - if value, ok = obj.GetAnnotations()[k]; ok { - return value, ok - } - } - - return "", false -} diff --git a/vendor/github.com/cilium/cilium/pkg/api/apidisable.go b/vendor/github.com/cilium/cilium/pkg/api/apidisable.go deleted file mode 100644 index ef3ed5d42e2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/api/apidisable.go +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/logging/logfields" -) - -type AdminDisableHandler struct { - name string -} - -func NewAdminDisableHandler(name string) *AdminDisableHandler { - return &AdminDisableHandler{ - name: name, - } -} - -func (a *AdminDisableHandler) ServeHTTP(wr http.ResponseWriter, req *http.Request) { - wr.WriteHeader(http.StatusForbidden) - log.WithFields(logrus.Fields{ - logfields.Endpoint: a.name, - }).Info("Denied API request on administratively disabled API endpoint") - _, _ = wr.Write([]byte("This API is administratively disabled. Contact your administrator for more details.")) -} - -// DisableAPIs configures the API middleware for all of the paths in the -// provided PathSet such that those APIs will be administratively disabled at -// runtime. -func DisableAPIs(paths PathSet, addMiddleware func(method, path string, builder middleware.Builder)) { - for k, pm := range paths { - addMiddleware(pm.Method, pm.Path, func(_ http.Handler) http.Handler { - return NewAdminDisableHandler(k) - }) - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/api/apierror.go b/vendor/github.com/cilium/cilium/pkg/api/apierror.go deleted file mode 100644 index 7ee425a22fe..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/api/apierror.go +++ /dev/null @@ -1,66 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "fmt" - "net/http" - - "github.com/go-openapi/runtime" - - "github.com/cilium/cilium/api/v1/models" -) - -// APIError is the error representation for the API. -type APIError struct { - code int - msg string -} - -// New creates a API error from the code, msg and extra arguments. -func New(code int, msg string, args ...interface{}) *APIError { - if code <= 0 { - code = 500 - } - - if len(args) > 0 { - return &APIError{code: code, msg: fmt.Sprintf(msg, args...)} - } - return &APIError{code: code, msg: msg} -} - -// GetCode returns the code for the API Error. -func (a *APIError) GetCode() int { - return a.code -} - -// Error creates a new API error from the code and error. -func Error(code int, err error) *APIError { - if err == nil { - err = fmt.Errorf("Error pointer was nil") - } - - return New(code, err.Error()) -} - -// Error returns the API error message. -func (a *APIError) Error() string { - return a.msg -} - -// GetModel returns model error. -func (a *APIError) GetModel() *models.Error { - m := models.Error(a.msg) - return &m -} - -// WriteResponse to the client. -func (a *APIError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - rw.WriteHeader(a.code) - m := a.GetModel() - if err := producer.Produce(rw, m); err != nil { - panic(err) - } - -} diff --git a/vendor/github.com/cilium/cilium/pkg/api/apipanic.go b/vendor/github.com/cilium/cilium/pkg/api/apipanic.go deleted file mode 100644 index 38481b26d23..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/api/apipanic.go +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "net/http" - "os" - "runtime/debug" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/logging" -) - -// APIPanicHandler recovers from API panics and logs encountered panics -type APIPanicHandler struct { - Next http.Handler -} - -// ServeHTTP implements the http.Handler interface. -// It recovers from panics of all next handlers and logs them -func (h *APIPanicHandler) ServeHTTP(wr http.ResponseWriter, req *http.Request) { - defer func() { - if r := recover(); r != nil { - fields := logrus.Fields{ - "panic_message": r, - "url": req.URL.String(), - "method": req.Method, - "client": req.RemoteAddr, - } - log.WithFields(fields).Warn("Cilium API handler panicked") - if logging.DefaultLogger.IsLevelEnabled(logrus.DebugLevel) { - os.Stdout.Write(debug.Stack()) - } - wr.WriteHeader(http.StatusInternalServerError) - if _, err := wr.Write([]byte("Internal error occurred, check Cilium logs for details.")); err != nil { - log.WithError(err).Debug("Failed to write API response") - } - } - }() - h.Next.ServeHTTP(wr, req) -} diff --git a/vendor/github.com/cilium/cilium/pkg/api/config.go b/vendor/github.com/cilium/cilium/pkg/api/config.go deleted file mode 100644 index 1087927ce49..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/api/config.go +++ /dev/null @@ -1,137 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "fmt" - "strings" - - "github.com/go-openapi/loads" - "github.com/go-openapi/spec" -) - -var ( - ErrUnknownWildcard = fmt.Errorf("Unsupported API wildcard") - ErrUnknownFlag = fmt.Errorf("Unknown API flag") -) - -func pascalize(in string) string { - if len(in) < 2 { - return strings.ToUpper(in) - } - switch in { - case "bgp": - return "BGP" - case "id": - return "ID" - case "ip": - return "IP" - case "ipam": - return "IPAM" - case "lrp": - return "LRP" - } - return strings.ToUpper(in[0:1]) + strings.ToLower(in[1:]) -} - -func pathToFlagSuffix(path string) string { - result := "" - path = strings.TrimPrefix(path, "/") - for _, hunk := range strings.Split(path, "/") { - // TODO: Maybe we can just rename the /cgroup-dump-metadata API to /cgroups to avoid this loop? - for _, word := range strings.Split(hunk, "-") { - trimmed := strings.Trim(word, "{}") - result = result + pascalize(trimmed) - } - } - - return result -} - -func parseSpecPaths(paths *spec.Paths) PathSet { - results := make(PathSet) - - for path, item := range paths.Paths { - suffix := pathToFlagSuffix(path) - ops := map[string]*spec.Operation{ - "Delete": item.Delete, - "Get": item.Get, - "Patch": item.Patch, - "Post": item.Post, - "Put": item.Put, - } - for prefix, op := range ops { - if op != nil { - flag := prefix + suffix - results[flag] = Endpoint{ - Method: strings.ToUpper(prefix), - Path: path, - Description: op.Description, - } - } - } - } - - return PathSet(results) -} - -func generateDeniedAPIEndpoints(allPaths PathSet, allowed []string) (PathSet, error) { - // default to "deny all", then allow specified APIs by flag - denied := allPaths - - var wildcardPrefixes []string - for _, opt := range allowed { - switch strings.Index(opt, "*") { - case -1: // No wildcard - break - case len(opt) - 1: // suffix - prefix := strings.TrimSuffix(opt, "*") - if len(prefix) == 0 { // Full opt "*", ie allow all - return PathSet{}, nil - } - wildcardPrefixes = append(wildcardPrefixes, prefix) - continue - default: - return nil, fmt.Errorf("%w: %q", ErrUnknownWildcard, opt) - } - if _, ok := denied[opt]; ok { - delete(denied, opt) - } else { - return nil, fmt.Errorf("%w: %q", ErrUnknownFlag, opt) - } - } - - for _, prefix := range wildcardPrefixes { - for f := range denied { - if strings.HasPrefix(f, prefix) { - delete(denied, f) - } - } - } - return denied, nil -} - -// Endpoint is an API Endpoint for a parsed API specification. -type Endpoint struct { - Method string - Path string - Description string -} - -// PathSet is a set of APIs in the form of a map of canonical pascalized flag -// name to MethodPath, for example: -// "GetEndpointID": {"GET", "/endpoint/{id}"} -type PathSet map[string]Endpoint - -func NewPathSet(spec *loads.Document) PathSet { - return parseSpecPaths(spec.Spec().Paths) -} - -// AllowedFlagsToDeniedPaths parses the input API specification and the provided -// commandline flags, and returns the PathSet that should be administratively -// disabled using a subsequent call to DisableAPIs(). -func AllowedFlagsToDeniedPaths(spec *loads.Document, allowed []string) (PathSet, error) { - paths := parseSpecPaths(spec.Spec().Paths) - return generateDeniedAPIEndpoints(paths, allowed) -} diff --git a/vendor/github.com/cilium/cilium/pkg/api/const.go b/vendor/github.com/cilium/cilium/pkg/api/const.go deleted file mode 100644 index 356c6ddb39c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/api/const.go +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "os" - "time" -) - -const ( - // CiliumGroupName is the cilium's unix group name. - CiliumGroupName = "cilium" - // SocketFileMode is the default file mode for the sockets. - SocketFileMode os.FileMode = 0660 - // ClientTimeout specifies timeout to be used by clients - ClientTimeout = 90 * time.Second -) diff --git a/vendor/github.com/cilium/cilium/pkg/api/doc.go b/vendor/github.com/cilium/cilium/pkg/api/doc.go deleted file mode 100644 index 83b4b5bfbd0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/api/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package api provides the Cilium useful helpers for the external API -package api diff --git a/vendor/github.com/cilium/cilium/pkg/api/socket.go b/vendor/github.com/cilium/cilium/pkg/api/socket.go deleted file mode 100644 index 6af237a1e23..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/api/socket.go +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "fmt" - "os" - "os/user" - "strconv" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var log = logging.DefaultLogger.WithField(logfields.LogSubsys, "api") - -// getGroupIDByName returns the group ID for the given grpName. -func getGroupIDByName(grpName string) (int, error) { - group, err := user.LookupGroup(grpName) - if err != nil { - return -1, err - } - return strconv.Atoi(group.Gid) -} - -// SetDefaultPermissions sets the given socket's group to `CiliumGroupName` and -// mode to `SocketFileMode`. -func SetDefaultPermissions(socketPath string) error { - gid, err := getGroupIDByName(CiliumGroupName) - if err != nil { - log.WithError(err).WithFields(logrus.Fields{ - logfields.Path: socketPath, - "group": CiliumGroupName, - }).Debug("Group not found") - } else { - if err := os.Chown(socketPath, 0, gid); err != nil { - return fmt.Errorf("failed while setting up %s's group ID"+ - " in %q: %s", CiliumGroupName, socketPath, err) - } - } - if err := os.Chmod(socketPath, SocketFileMode); err != nil { - return fmt.Errorf("failed while setting up file permissions in %q: %w", - socketPath, err) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/aws/eni/types/doc.go b/vendor/github.com/cilium/cilium/pkg/aws/eni/types/doc.go deleted file mode 100644 index 0b0cb83f7ff..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/aws/eni/types/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:deepcopy-gen=package -// +deepequal-gen=package - -package types diff --git a/vendor/github.com/cilium/cilium/pkg/aws/eni/types/types.go b/vendor/github.com/cilium/cilium/pkg/aws/eni/types/types.go deleted file mode 100644 index c2cba6c384a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/aws/eni/types/types.go +++ /dev/null @@ -1,274 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "github.com/cilium/cilium/pkg/ipam/types" -) - -// ENISpec is the ENI specification of a node. This specification is considered -// by the cilium-operator to act as an IPAM operator and makes ENI IPs available -// via the IPAMSpec section. -// -// The ENI specification can either be provided explicitly by the user or the -// cilium agent running on the node can be instructed to create the CiliumNode -// custom resource along with an ENI specification when the node registers -// itself to the Kubernetes cluster. -type ENISpec struct { - // InstanceID is the AWS InstanceId of the node. The InstanceID is used - // to retrieve AWS metadata for the node. - // - // OBSOLETE: This field is obsolete, please use Spec.InstanceID - // - // +kubebuilder:validation:Optional - InstanceID string `json:"instance-id,omitempty"` - - // InstanceType is the AWS EC2 instance type, e.g. "m5.large" - // - // +kubebuilder:validation:Optional - InstanceType string `json:"instance-type,omitempty"` - - // MinAllocate is the minimum number of IPs that must be allocated when - // the node is first bootstrapped. It defines the minimum base socket - // of addresses that must be available. After reaching this watermark, - // the PreAllocate and MaxAboveWatermark logic takes over to continue - // allocating IPs. - // - // OBSOLETE: This field is obsolete, please use Spec.IPAM.MinAllocate - // - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Optional - MinAllocate int `json:"min-allocate,omitempty"` - - // PreAllocate defines the number of IP addresses that must be - // available for allocation in the IPAMspec. It defines the buffer of - // addresses available immediately without requiring cilium-operator to - // get involved. - // - // OBSOLETE: This field is obsolete, please use Spec.IPAM.PreAllocate - // - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Optional - PreAllocate int `json:"pre-allocate,omitempty"` - - // MaxAboveWatermark is the maximum number of addresses to allocate - // beyond the addresses needed to reach the PreAllocate watermark. - // Going above the watermark can help reduce the number of API calls to - // allocate IPs, e.g. when a new ENI is allocated, as many secondary - // IPs as possible are allocated. Limiting the amount can help reduce - // waste of IPs. - // - // OBSOLETE: This field is obsolete, please use Spec.IPAM.MaxAboveWatermark - // - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Optional - MaxAboveWatermark int `json:"max-above-watermark,omitempty"` - - // FirstInterfaceIndex is the index of the first ENI to use for IP - // allocation, e.g. if the node has eth0, eth1, eth2 and - // FirstInterfaceIndex is set to 1, then only eth1 and eth2 will be - // used for IP allocation, eth0 will be ignored for PodIP allocation. - // - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Optional - FirstInterfaceIndex *int `json:"first-interface-index,omitempty"` - - // SecurityGroups is the list of security groups to attach to any ENI - // that is created and attached to the instance. - // - // +kubebuilder:validation:Optional - SecurityGroups []string `json:"security-groups,omitempty"` - - // SecurityGroupTags is the list of tags to use when evaliating what - // AWS security groups to use for the ENI. - // - // +kubebuilder:validation:Optional - SecurityGroupTags map[string]string `json:"security-group-tags,omitempty"` - - // SubnetIDs is the list of subnet ids to use when evaluating what AWS - // subnets to use for ENI and IP allocation. - // - // +kubebuilder:validation:Optional - SubnetIDs []string `json:"subnet-ids,omitempty"` - - // SubnetTags is the list of tags to use when evaluating what AWS - // subnets to use for ENI and IP allocation. - // - // +kubebuilder:validation:Optional - SubnetTags map[string]string `json:"subnet-tags,omitempty"` - - // NodeSubnetID is the subnet of the primary ENI the instance was brought up - // with. It is used as a sensible default subnet to create ENIs in. - // - // +kubebuilder:validation:Optional - NodeSubnetID string `json:"node-subnet-id,omitempty"` - - // VpcID is the VPC ID to use when allocating ENIs. - // - // +kubebuilder:validation:Optional - VpcID string `json:"vpc-id,omitempty"` - - // AvailabilityZone is the availability zone to use when allocating - // ENIs. - // - // +kubebuilder:validation:Optional - AvailabilityZone string `json:"availability-zone,omitempty"` - - // ExcludeInterfaceTags is the list of tags to use when excluding ENIs for - // Cilium IP allocation. Any interface matching this set of tags will not - // be managed by Cilium. - // - // +kubebuilder:validation:Optional - ExcludeInterfaceTags map[string]string `json:"exclude-interface-tags,omitempty"` - - // DeleteOnTermination defines that the ENI should be deleted when the - // associated instance is terminated. If the parameter is not set the - // default behavior is to delete the ENI on instance termination. - // - // +kubebuilder:validation:Optional - DeleteOnTermination *bool `json:"delete-on-termination,omitempty"` - - // UsePrimaryAddress determines whether an ENI's primary address - // should be available for allocations on the node - // - // +kubebuilder:validation:Optional - UsePrimaryAddress *bool `json:"use-primary-address,omitempty"` - - // DisablePrefixDelegation determines whether ENI prefix delegation should be - // disabled on this node. - // - // +kubebuilder:validation:Optional - DisablePrefixDelegation *bool `json:"disable-prefix-delegation,omitempty"` -} - -// ENI represents an AWS Elastic Network Interface -// -// More details: -// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html -type ENI struct { - // ID is the ENI ID - // - // +optional - ID string `json:"id,omitempty"` - - // IP is the primary IP of the ENI - // - // +optional - IP string `json:"ip,omitempty"` - - // MAC is the mac address of the ENI - // - // +optional - MAC string `json:"mac,omitempty"` - - // AvailabilityZone is the availability zone of the ENI - // - // +optional - AvailabilityZone string `json:"availability-zone,omitempty"` - - // Description is the description field of the ENI - // - // +optional - Description string `json:"description,omitempty"` - - // Number is the interface index, it used in combination with - // FirstInterfaceIndex - // - // +optional - Number int `json:"number,omitempty"` - - // Subnet is the subnet the ENI is associated with - // - // +optional - Subnet AwsSubnet `json:"subnet,omitempty"` - - // VPC is the VPC information to which the ENI is attached to - // - // +optional - VPC AwsVPC `json:"vpc,omitempty"` - - // Addresses is the list of all secondary IPs associated with the ENI - // - // +optional - Addresses []string `json:"addresses,omitempty"` - - // Prefixes is the list of all /28 prefixes associated with the ENI - // - // +optional - Prefixes []string `json:"prefixes,omitempty"` - - // SecurityGroups are the security groups associated with the ENI - SecurityGroups []string `json:"security-groups,omitempty"` - - // Tags is the set of tags of the ENI. Used to detect ENIs which should - // not be managed by Cilium - // - // +optional - Tags map[string]string `json:"tags,omitempty"` -} - -func (e *ENI) DeepCopyInterface() types.Interface { - return e.DeepCopy() -} - -// InterfaceID returns the identifier of the interface -func (e *ENI) InterfaceID() string { - return e.ID -} - -// ForeachAddress iterates over all addresses and calls fn -func (e *ENI) ForeachAddress(id string, fn types.AddressIterator) error { - for _, address := range e.Addresses { - if err := fn(id, e.ID, address, "", address); err != nil { - return err - } - } - - return nil -} - -// IsExcludedBySpec returns true if the ENI is excluded by the provided spec and -// therefore should not be managed by Cilium. -func (e *ENI) IsExcludedBySpec(spec ENISpec) bool { - if spec.FirstInterfaceIndex != nil && e.Number < *spec.FirstInterfaceIndex { - return true - } - - if len(spec.ExcludeInterfaceTags) > 0 { - if types.Tags(e.Tags).Match(spec.ExcludeInterfaceTags) { - return true - } - } - - return false -} - -// ENIStatus is the status of ENI addressing of the node -type ENIStatus struct { - // ENIs is the list of ENIs on the node - // - // +optional - ENIs map[string]ENI `json:"enis,omitempty"` -} - -// AwsSubnet stores information regarding an AWS subnet -type AwsSubnet struct { - // ID is the ID of the subnet - ID string `json:"id,omitempty"` - - // CIDR is the CIDR range associated with the subnet - CIDR string `json:"cidr,omitempty"` -} - -// AwsVPC stores information regarding an AWS VPC -type AwsVPC struct { - /// ID is the ID of a VPC - ID string `json:"id,omitempty"` - - // PrimaryCIDR is the primary CIDR of the VPC - PrimaryCIDR string `json:"primary-cidr,omitempty"` - - // CIDRs is the list of CIDR ranges associated with the VPC - CIDRs []string `json:"cidrs,omitempty"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/aws/eni/types/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/aws/eni/types/zz_generated.deepcopy.go deleted file mode 100644 index a5011d397be..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/aws/eni/types/zz_generated.deepcopy.go +++ /dev/null @@ -1,176 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package types - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AwsSubnet) DeepCopyInto(out *AwsSubnet) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AwsSubnet. -func (in *AwsSubnet) DeepCopy() *AwsSubnet { - if in == nil { - return nil - } - out := new(AwsSubnet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AwsVPC) DeepCopyInto(out *AwsVPC) { - *out = *in - if in.CIDRs != nil { - in, out := &in.CIDRs, &out.CIDRs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AwsVPC. -func (in *AwsVPC) DeepCopy() *AwsVPC { - if in == nil { - return nil - } - out := new(AwsVPC) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ENI) DeepCopyInto(out *ENI) { - *out = *in - out.Subnet = in.Subnet - in.VPC.DeepCopyInto(&out.VPC) - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Prefixes != nil { - in, out := &in.Prefixes, &out.Prefixes - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecurityGroups != nil { - in, out := &in.SecurityGroups, &out.SecurityGroups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *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 ENI. -func (in *ENI) DeepCopy() *ENI { - if in == nil { - return nil - } - out := new(ENI) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ENISpec) DeepCopyInto(out *ENISpec) { - *out = *in - if in.FirstInterfaceIndex != nil { - in, out := &in.FirstInterfaceIndex, &out.FirstInterfaceIndex - *out = new(int) - **out = **in - } - if in.SecurityGroups != nil { - in, out := &in.SecurityGroups, &out.SecurityGroups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecurityGroupTags != nil { - in, out := &in.SecurityGroupTags, &out.SecurityGroupTags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.SubnetIDs != nil { - in, out := &in.SubnetIDs, &out.SubnetIDs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SubnetTags != nil { - in, out := &in.SubnetTags, &out.SubnetTags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ExcludeInterfaceTags != nil { - in, out := &in.ExcludeInterfaceTags, &out.ExcludeInterfaceTags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.DeleteOnTermination != nil { - in, out := &in.DeleteOnTermination, &out.DeleteOnTermination - *out = new(bool) - **out = **in - } - if in.UsePrimaryAddress != nil { - in, out := &in.UsePrimaryAddress, &out.UsePrimaryAddress - *out = new(bool) - **out = **in - } - if in.DisablePrefixDelegation != nil { - in, out := &in.DisablePrefixDelegation, &out.DisablePrefixDelegation - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ENISpec. -func (in *ENISpec) DeepCopy() *ENISpec { - if in == nil { - return nil - } - out := new(ENISpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ENIStatus) DeepCopyInto(out *ENIStatus) { - *out = *in - if in.ENIs != nil { - in, out := &in.ENIs, &out.ENIs - *out = make(map[string]ENI, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ENIStatus. -func (in *ENIStatus) DeepCopy() *ENIStatus { - if in == nil { - return nil - } - out := new(ENIStatus) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/cilium/cilium/pkg/aws/eni/types/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/aws/eni/types/zz_generated.deepequal.go deleted file mode 100644 index 4c1c93fc0e0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/aws/eni/types/zz_generated.deepequal.go +++ /dev/null @@ -1,361 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package types - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AwsSubnet) DeepEqual(other *AwsSubnet) bool { - if other == nil { - return false - } - - if in.ID != other.ID { - return false - } - if in.CIDR != other.CIDR { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AwsVPC) DeepEqual(other *AwsVPC) bool { - if other == nil { - return false - } - - if in.ID != other.ID { - return false - } - if in.PrimaryCIDR != other.PrimaryCIDR { - return false - } - if ((in.CIDRs != nil) && (other.CIDRs != nil)) || ((in.CIDRs == nil) != (other.CIDRs == nil)) { - in, other := &in.CIDRs, &other.CIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ENI) DeepEqual(other *ENI) bool { - if other == nil { - return false - } - - if in.ID != other.ID { - return false - } - if in.IP != other.IP { - return false - } - if in.MAC != other.MAC { - return false - } - if in.AvailabilityZone != other.AvailabilityZone { - return false - } - if in.Description != other.Description { - return false - } - if in.Number != other.Number { - return false - } - if in.Subnet != other.Subnet { - return false - } - - if !in.VPC.DeepEqual(&other.VPC) { - return false - } - - if ((in.Addresses != nil) && (other.Addresses != nil)) || ((in.Addresses == nil) != (other.Addresses == nil)) { - in, other := &in.Addresses, &other.Addresses - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if ((in.Prefixes != nil) && (other.Prefixes != nil)) || ((in.Prefixes == nil) != (other.Prefixes == nil)) { - in, other := &in.Prefixes, &other.Prefixes - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if ((in.SecurityGroups != nil) && (other.SecurityGroups != nil)) || ((in.SecurityGroups == nil) != (other.SecurityGroups == nil)) { - in, other := &in.SecurityGroups, &other.SecurityGroups - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if ((in.Tags != nil) && (other.Tags != nil)) || ((in.Tags == nil) != (other.Tags == nil)) { - in, other := &in.Tags, &other.Tags - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ENISpec) DeepEqual(other *ENISpec) bool { - if other == nil { - return false - } - - if in.InstanceID != other.InstanceID { - return false - } - if in.InstanceType != other.InstanceType { - return false - } - if in.MinAllocate != other.MinAllocate { - return false - } - if in.PreAllocate != other.PreAllocate { - return false - } - if in.MaxAboveWatermark != other.MaxAboveWatermark { - return false - } - if (in.FirstInterfaceIndex == nil) != (other.FirstInterfaceIndex == nil) { - return false - } else if in.FirstInterfaceIndex != nil { - if *in.FirstInterfaceIndex != *other.FirstInterfaceIndex { - return false - } - } - - if ((in.SecurityGroups != nil) && (other.SecurityGroups != nil)) || ((in.SecurityGroups == nil) != (other.SecurityGroups == nil)) { - in, other := &in.SecurityGroups, &other.SecurityGroups - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if ((in.SecurityGroupTags != nil) && (other.SecurityGroupTags != nil)) || ((in.SecurityGroupTags == nil) != (other.SecurityGroupTags == nil)) { - in, other := &in.SecurityGroupTags, &other.SecurityGroupTags - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - if ((in.SubnetIDs != nil) && (other.SubnetIDs != nil)) || ((in.SubnetIDs == nil) != (other.SubnetIDs == nil)) { - in, other := &in.SubnetIDs, &other.SubnetIDs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if ((in.SubnetTags != nil) && (other.SubnetTags != nil)) || ((in.SubnetTags == nil) != (other.SubnetTags == nil)) { - in, other := &in.SubnetTags, &other.SubnetTags - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - if in.NodeSubnetID != other.NodeSubnetID { - return false - } - if in.VpcID != other.VpcID { - return false - } - if in.AvailabilityZone != other.AvailabilityZone { - return false - } - if ((in.ExcludeInterfaceTags != nil) && (other.ExcludeInterfaceTags != nil)) || ((in.ExcludeInterfaceTags == nil) != (other.ExcludeInterfaceTags == nil)) { - in, other := &in.ExcludeInterfaceTags, &other.ExcludeInterfaceTags - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - if (in.DeleteOnTermination == nil) != (other.DeleteOnTermination == nil) { - return false - } else if in.DeleteOnTermination != nil { - if *in.DeleteOnTermination != *other.DeleteOnTermination { - return false - } - } - - if (in.UsePrimaryAddress == nil) != (other.UsePrimaryAddress == nil) { - return false - } else if in.UsePrimaryAddress != nil { - if *in.UsePrimaryAddress != *other.UsePrimaryAddress { - return false - } - } - - if (in.DisablePrefixDelegation == nil) != (other.DisablePrefixDelegation == nil) { - return false - } else if in.DisablePrefixDelegation != nil { - if *in.DisablePrefixDelegation != *other.DisablePrefixDelegation { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ENIStatus) DeepEqual(other *ENIStatus) bool { - if other == nil { - return false - } - - if ((in.ENIs != nil) && (other.ENIs != nil)) || ((in.ENIs == nil) != (other.ENIs == nil)) { - in, other := &in.ENIs, &other.ENIs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if !inValue.DeepEqual(&otherValue) { - return false - } - } - } - } - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/azure/types/doc.go b/vendor/github.com/cilium/cilium/pkg/azure/types/doc.go deleted file mode 100644 index 6d56b146b29..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/azure/types/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +deepequal-gen=package - -// +groupName=azure -package types diff --git a/vendor/github.com/cilium/cilium/pkg/azure/types/types.go b/vendor/github.com/cilium/cilium/pkg/azure/types/types.go deleted file mode 100644 index ba7419a24bf..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/azure/types/types.go +++ /dev/null @@ -1,194 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "strings" - - "github.com/cilium/cilium/pkg/ipam/types" -) - -const ( - // ProviderPrefix is the prefix used to indicate that a k8s ProviderID - // represents an Azure resource - ProviderPrefix = "azure://" - - // InterfaceAddressLimit is the maximum number of addresses on an interface - // - // - // For more information: - // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits?toc=%2fazure%2fvirtual-network%2ftoc.json#networking-limits - InterfaceAddressLimit = 256 - - // StateSucceeded is the address state for a successfully provisioned address - StateSucceeded = "succeeded" -) - -// AzureSpec is the Azure specification of a node running via the Azure IPAM -// -// The Azure specification can either be provided explicitly by the user or the -// cilium agent running on the node can be instructed to create the CiliumNode -// custom resource along with an Azure specification when the node registers -// itself to the Kubernetes cluster. -// This struct is embedded into v2.CiliumNode -// -// +k8s:deepcopy-gen=true -type AzureSpec struct { - // InterfaceName is the name of the interface the cilium-operator - // will use to allocate all the IPs on - // - // +kubebuilder:validation:Optional - InterfaceName string `json:"interface-name,omitempty"` -} - -// AzureStatus is the status of Azure addressing of the node. -// This struct is embedded into v2.CiliumNode -// -// +k8s:deepcopy-gen=true -type AzureStatus struct { - // Interfaces is the list of interfaces on the node - // - // +optional - Interfaces []AzureInterface `json:"interfaces,omitempty"` -} - -// AzureAddress is an IP address assigned to an AzureInterface -type AzureAddress struct { - // IP is the ip address of the address - IP string `json:"ip,omitempty"` - - // Subnet is the subnet the address belongs to - Subnet string `json:"subnet,omitempty"` - - // State is the provisioning state of the address - State string `json:"state,omitempty"` -} - -// AzureInterface represents an Azure Interface -// -// +k8s:deepcopy-gen=true -type AzureInterface struct { - // ID is the identifier - // - // +optional - ID string `json:"id,omitempty"` - - // Name is the name of the interface - // - // +optional - Name string `json:"name,omitempty"` - - // MAC is the mac address - // - // +optional - MAC string `json:"mac,omitempty"` - - // State is the provisioning state - // - // +optional - State string `json:"state,omitempty"` - - // Addresses is the list of all IPs associated with the interface, - // including all secondary addresses - // - // +optional - Addresses []AzureAddress `json:"addresses,omitempty"` - - // SecurityGroup is the security group associated with the interface - SecurityGroup string `json:"security-group,omitempty"` - - // GatewayIP is the interface's subnet's default route - // - // OBSOLETE: This field is obsolete, please use Gateway field instead. - // - // +optional - GatewayIP string `json:"GatewayIP"` - - // Gateway is the interface's subnet's default route - // - // +optional - Gateway string `json:"gateway"` - - // CIDR is the range that the interface belongs to. - // - // +optional - CIDR string `json:"cidr,omitempty"` - - // vmssName is the name of the virtual machine scale set. This field is - // set by extractIDs() - vmssName string `json:"-"` - - // vmID is the ID of the virtual machine - vmID string `json:"-"` - - // resourceGroup is the resource group the interface belongs to - resourceGroup string `json:"-"` -} - -func (a *AzureInterface) DeepCopyInterface() types.Interface { - return a.DeepCopy() -} - -// SetID sets the Azure interface ID, as well as extracting other fields from -// the ID itself. -func (a *AzureInterface) SetID(id string) { - a.ID = id - a.extractIDs() -} - -// InterfaceID returns the identifier of the interface -func (a *AzureInterface) InterfaceID() string { - return a.ID -} - -func (a *AzureInterface) extractIDs() { - switch { - // Interface from a VMSS instance: - // //subscriptions/xxx/resourceGroups/yyy/providers/Microsoft.Compute/virtualMachineScaleSets/ssss/virtualMachines/vvv/networkInterfaces/iii - case strings.Contains(a.ID, "virtualMachineScaleSets"): - segs := strings.Split(a.ID, "/") - if len(segs) >= 5 { - a.resourceGroup = segs[4] - } - if len(segs) >= 9 { - a.vmssName = segs[8] - } - if len(segs) >= 11 { - a.vmID = segs[10] - } - // Interface from a standalone instance: - // //subscriptions/xxx/resourceGroups/yyy/providers/Microsoft.Network/networkInterfaces/iii - case strings.Contains(a.ID, "/Microsoft.Network/"): - segs := strings.Split(a.ID, "/") - if len(segs) >= 5 { - a.resourceGroup = segs[4] - } - } -} - -// GetResourceGroup returns the resource group the interface belongs to -func (a *AzureInterface) GetResourceGroup() string { - return a.resourceGroup -} - -// GetVMScaleSetName returns the VM scale set name the interface belongs to -func (a *AzureInterface) GetVMScaleSetName() string { - return a.vmssName -} - -// GetVMID returns the VM ID the interface belongs to -func (a *AzureInterface) GetVMID() string { - return a.vmID -} - -// ForeachAddress iterates over all addresses and calls fn -func (a *AzureInterface) ForeachAddress(id string, fn types.AddressIterator) error { - for _, address := range a.Addresses { - if err := fn(id, a.ID, address.IP, address.Subnet, address); err != nil { - return err - } - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/azure/types/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/azure/types/zz_generated.deepcopy.go deleted file mode 100644 index ad51b4527a2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/azure/types/zz_generated.deepcopy.go +++ /dev/null @@ -1,69 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package types - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureInterface) DeepCopyInto(out *AzureInterface) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]AzureAddress, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureInterface. -func (in *AzureInterface) DeepCopy() *AzureInterface { - if in == nil { - return nil - } - out := new(AzureInterface) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureSpec) DeepCopyInto(out *AzureSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureSpec. -func (in *AzureSpec) DeepCopy() *AzureSpec { - if in == nil { - return nil - } - out := new(AzureSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStatus) DeepCopyInto(out *AzureStatus) { - *out = *in - if in.Interfaces != nil { - in, out := &in.Interfaces, &out.Interfaces - *out = make([]AzureInterface, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStatus. -func (in *AzureStatus) DeepCopy() *AzureStatus { - if in == nil { - return nil - } - out := new(AzureStatus) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/cilium/cilium/pkg/azure/types/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/azure/types/zz_generated.deepequal.go deleted file mode 100644 index 8761f194951..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/azure/types/zz_generated.deepequal.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package types - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AzureAddress) DeepEqual(other *AzureAddress) bool { - if other == nil { - return false - } - - if in.IP != other.IP { - return false - } - if in.Subnet != other.Subnet { - return false - } - if in.State != other.State { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AzureInterface) DeepEqual(other *AzureInterface) bool { - if other == nil { - return false - } - - if in.ID != other.ID { - return false - } - if in.Name != other.Name { - return false - } - if in.MAC != other.MAC { - return false - } - if in.State != other.State { - return false - } - if ((in.Addresses != nil) && (other.Addresses != nil)) || ((in.Addresses == nil) != (other.Addresses == nil)) { - in, other := &in.Addresses, &other.Addresses - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if in.SecurityGroup != other.SecurityGroup { - return false - } - if in.GatewayIP != other.GatewayIP { - return false - } - if in.Gateway != other.Gateway { - return false - } - if in.CIDR != other.CIDR { - return false - } - if in.vmssName != other.vmssName { - return false - } - if in.vmID != other.vmID { - return false - } - if in.resourceGroup != other.resourceGroup { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AzureSpec) DeepEqual(other *AzureSpec) bool { - if other == nil { - return false - } - - if in.InterfaceName != other.InterfaceName { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AzureStatus) DeepEqual(other *AzureStatus) bool { - if other == nil { - return false - } - - if ((in.Interfaces != nil) && (other.Interfaces != nil)) || ((in.Interfaces == nil) != (other.Interfaces == nil)) { - in, other := &in.Interfaces, &other.Interfaces - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/backoff/backoff.go b/vendor/github.com/cilium/cilium/pkg/backoff/backoff.go deleted file mode 100644 index 3ddada53096..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/backoff/backoff.go +++ /dev/null @@ -1,203 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package backoff - -import ( - "context" - "fmt" - "math" - - "github.com/google/uuid" - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/rand" - "github.com/cilium/cilium/pkg/time" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "backoff") - - randGen = rand.NewSafeRand(time.Now().UnixNano()) -) - -// NodeManager is the interface required to implement cluster size dependent -// intervals -type NodeManager interface { - ClusterSizeDependantInterval(baseInterval time.Duration) time.Duration -} - -// nodeManager is a wrapper to enable using a plain function as NodeManager to implement -// cluster size dependent intervals -type nodeManager struct { - clusterSizeDependantInterval func(baseInterval time.Duration) time.Duration -} - -// NewNodeManager returns a new NodeManager implementing cluster size dependent intervals -// based on the given function. If the function is nil, then no tuning is performed. -func NewNodeManager(clusterSizeDependantInterval func(baseInterval time.Duration) time.Duration) NodeManager { - return &nodeManager{clusterSizeDependantInterval: clusterSizeDependantInterval} -} - -func (n *nodeManager) ClusterSizeDependantInterval(baseInterval time.Duration) time.Duration { - if n.clusterSizeDependantInterval == nil { - return baseInterval - } - - return n.clusterSizeDependantInterval(baseInterval) -} - -// Exponential implements an exponential backoff -type Exponential struct { - // Min is the minimal backoff time, if unspecified, 1 second will be - // used - Min time.Duration - - // Max is the maximum backoff time, if unspecified, no maximum time is - // applied - Max time.Duration - - // Factor is the factor the backoff time grows exponentially, if - // unspecified, a factor of 2.0 will be used - Factor float64 - - // Jitter, when enabled, adds random jitter to the interval - Jitter bool - - // NodeManager enables the use of cluster size dependent backoff - // intervals, i.e. the larger the cluster, the longer the backoff - // interval - NodeManager NodeManager - - // Name is a free form string describing the operation subject to the - // backoff, if unspecified, a UUID is generated. This string is used - // for logging purposes. - Name string - - // ResetAfter will reset the exponential back-off if no attempt is made for the amount of time specified here. - // Needs to be larger than the Max duration, otherwise it will be ignored to avoid accidental resets. - // If unspecified, no reset is performed. - ResetAfter time.Duration - - lastBackoffStart time.Time - - attempt int -} - -// CalculateDuration calculates the backoff duration based on minimum base -// interval, exponential factor, jitter and number of failures. -func CalculateDuration(min, max time.Duration, factor float64, jitter bool, failures int) time.Duration { - minFloat := float64(min) - maxFloat := float64(max) - - t := minFloat * math.Pow(factor, float64(failures)) - if max != time.Duration(0) && t > maxFloat { - t = maxFloat - } - - if jitter { - t = randGen.Float64()*(t-minFloat) + minFloat - } - - return time.Duration(t) -} - -// ClusterSizeDependantInterval returns a time.Duration that is dependent on -// the cluster size, i.e. the number of nodes that have been discovered. This -// can be used to control sync intervals of shared or centralized resources to -// avoid overloading these resources as the cluster grows. -// -// Example sync interval with baseInterval = 1 * time.Minute -// -// nodes | sync interval -// ------+----------------- -// 1 | 41.588830833s -// 2 | 1m05.916737320s -// 4 | 1m36.566274746s -// 8 | 2m11.833474640s -// 16 | 2m49.992800643s -// 32 | 3m29.790453687s -// 64 | 4m10.463236193s -// 128 | 4m51.588744261s -// 256 | 5m32.944565093s -// 512 | 6m14.416550710s -// 1024 | 6m55.946873494s -// 2048 | 7m37.506428894s -// 4096 | 8m19.080616652s -// 8192 | 9m00.662124608s -// 16384 | 9m42.247293667s -func ClusterSizeDependantInterval(baseInterval time.Duration, numNodes int) time.Duration { - // no nodes are being managed, no work will be performed, return - // baseInterval to check again in a reasonable timeframe - if numNodes == 0 { - return baseInterval - } - - waitNanoseconds := float64(baseInterval.Nanoseconds()) * math.Log1p(float64(numNodes)) - return time.Duration(int64(waitNanoseconds)) -} - -// Reset backoff attempt counter -func (b *Exponential) Reset() { - b.attempt = 0 -} - -// Wait waits for the required time using an exponential backoff -func (b *Exponential) Wait(ctx context.Context) error { - if resetDuration := b.ResetAfter; resetDuration != time.Duration(0) && resetDuration > b.Max { - if !b.lastBackoffStart.IsZero() { - if time.Since(b.lastBackoffStart) > resetDuration { - b.Reset() - } - } - } - - b.lastBackoffStart = time.Now() - b.attempt++ - t := b.Duration(b.attempt) - - log.WithFields(logrus.Fields{ - "time": t, - "attempt": b.attempt, - "name": b.Name, - }).Debug("Sleeping with exponential backoff") - - select { - case <-ctx.Done(): - return fmt.Errorf("exponential backoff cancelled via context: %w", ctx.Err()) - case <-time.After(t): - } - - return nil -} - -// Duration returns the wait duration for the nth attempt -func (b *Exponential) Duration(attempt int) time.Duration { - if b.Name == "" { - b.Name = uuid.New().String() - } - - min := time.Duration(1) * time.Second - if b.Min != time.Duration(0) { - min = b.Min - } - - factor := float64(2) - if b.Factor != float64(0) { - factor = b.Factor - } - - t := CalculateDuration(min, b.Max, factor, b.Jitter, attempt) - - if b.NodeManager != nil { - t = b.NodeManager.ClusterSizeDependantInterval(t) - } - - if b.Max != time.Duration(0) && t > b.Max { - t = b.Max - } - - return t -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/bpf.go b/vendor/github.com/cilium/cilium/pkg/bpf/bpf.go deleted file mode 100644 index eec94868aa7..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/bpf.go +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package bpf - -import ( - "sync/atomic" - - "github.com/cilium/ebpf" - - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "bpf") - - preAllocateMapSetting uint32 = BPF_F_NO_PREALLOC -) - -const ( - // Flags for BPF_MAP_CREATE. Must match values from linux/bpf.h - BPF_F_NO_PREALLOC = 1 << 0 -) - -// EnableMapPreAllocation enables BPF map pre-allocation on map types that -// support it. This does not take effect on existing map although some map -// types could be recreated later when objCheck() runs. -func EnableMapPreAllocation() { - atomic.StoreUint32(&preAllocateMapSetting, 0) -} - -// DisableMapPreAllocation disables BPF map pre-allocation as a default -// setting. Some map types enforces pre-alloc strategy so this does not -// take effect in that case. Also note that this does not take effect on -// existing map although could be recreated later when objCheck() runs. -func DisableMapPreAllocation() { - atomic.StoreUint32(&preAllocateMapSetting, BPF_F_NO_PREALLOC) -} - -// GetPreAllocateMapFlags returns the map flags for map which use conditional -// pre-allocation. -func GetPreAllocateMapFlags(t ebpf.MapType) uint32 { - switch t { - // LPM Tries don't support preallocation. - case ebpf.LPMTrie: - return BPF_F_NO_PREALLOC - // Support disabling preallocation for these map types. - case ebpf.Hash, ebpf.PerCPUHash, ebpf.HashOfMaps: - return atomic.LoadUint32(&preAllocateMapSetting) - } - - return 0 -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/bpf_linux.go b/vendor/github.com/cilium/cilium/pkg/bpf/bpf_linux.go deleted file mode 100644 index bc689ecdf4f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/bpf_linux.go +++ /dev/null @@ -1,168 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build linux - -package bpf - -import ( - "errors" - "fmt" - "os" - "path" - - "github.com/cilium/ebpf" - "github.com/sirupsen/logrus" - "golang.org/x/sys/unix" - - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/spanstat" -) - -// createMap wraps a call to ebpf.NewMapWithOptions while measuring syscall duration. -func createMap(spec *ebpf.MapSpec, opts *ebpf.MapOptions) (*ebpf.Map, error) { - if opts == nil { - opts = &ebpf.MapOptions{} - } - - var duration *spanstat.SpanStat - if metrics.BPFSyscallDuration.IsEnabled() { - duration = spanstat.Start() - } - - m, err := ebpf.NewMapWithOptions(spec, *opts) - - if metrics.BPFSyscallDuration.IsEnabled() { - metrics.BPFSyscallDuration.WithLabelValues(metricOpCreate, metrics.Error2Outcome(err)).Observe(duration.End(err == nil).Total().Seconds()) - } - - return m, err -} - -func objCheck(m *ebpf.Map, path string, mapType ebpf.MapType, keySize, valueSize, maxEntries, flags uint32) bool { - scopedLog := log.WithField(logfields.Path, path) - mismatch := false - - if m.Type() != mapType { - scopedLog.WithFields(logrus.Fields{ - "old": m.Type(), - "new": mapType, - }).Warning("Map type mismatch for BPF map") - mismatch = true - } - - if m.KeySize() != keySize { - scopedLog.WithFields(logrus.Fields{ - "old": m.KeySize(), - "new": keySize, - }).Warning("Key-size mismatch for BPF map") - mismatch = true - } - - if m.ValueSize() != valueSize { - scopedLog.WithFields(logrus.Fields{ - "old": m.ValueSize(), - "new": valueSize, - }).Warning("Value-size mismatch for BPF map") - mismatch = true - } - - if m.MaxEntries() != maxEntries { - scopedLog.WithFields(logrus.Fields{ - "old": m.MaxEntries(), - "new": maxEntries, - }).Warning("Max entries mismatch for BPF map") - mismatch = true - } - if m.Flags() != flags { - scopedLog.WithFields(logrus.Fields{ - "old": m.Flags(), - "new": flags, - }).Warning("Flags mismatch for BPF map") - mismatch = true - } - - if mismatch { - if m.Type() == ebpf.ProgramArray { - return false - } - - scopedLog.Warning("Removing map to allow for property upgrade (expect map data loss)") - - // Kernel still holds map reference count via attached prog. - // Only exception is prog array, but that is already resolved - // differently. - os.Remove(path) - return true - } - - return false -} - -// OpenOrCreateMap attempts to load the pinned map at "pinDir/" if -// the spec is marked as Pinned. Any parent directories of pinDir are -// automatically created. Any pinned maps incompatible with the given spec are -// removed and recreated. -// -// If spec.Pinned is 0, a new Map is always created. -func OpenOrCreateMap(spec *ebpf.MapSpec, pinDir string) (*ebpf.Map, error) { - var opts ebpf.MapOptions - if spec.Pinning != 0 { - if pinDir == "" { - return nil, errors.New("cannot pin map to empty pinDir") - } - if spec.Name == "" { - return nil, errors.New("cannot load unnamed map from pin") - } - - if err := MkdirBPF(pinDir); err != nil { - return nil, fmt.Errorf("creating map base pinning directory: %w", err) - } - - opts.PinPath = pinDir - } - - m, err := createMap(spec, &opts) - if errors.Is(err, ebpf.ErrMapIncompatible) { - // Found incompatible map. Open the pin again to find out why. - m, err := ebpf.LoadPinnedMap(path.Join(pinDir, spec.Name), nil) - if err != nil { - return nil, fmt.Errorf("open pin of incompatible map: %w", err) - } - defer m.Close() - - log.WithField(logfields.Path, path.Join(pinDir, spec.Name)). - WithFields(logrus.Fields{ - "old": fmt.Sprintf("Type:%s KeySize:%d ValueSize:%d MaxEntries:%d Flags:%d", - m.Type(), m.KeySize(), m.ValueSize(), m.MaxEntries(), m.Flags()), - "new": fmt.Sprintf("Type:%s KeySize:%d ValueSize:%d MaxEntries:%d Flags:%d", - spec.Type, spec.KeySize, spec.ValueSize, spec.MaxEntries, spec.Flags), - }).Info("Unpinning map with incompatible properties") - - // Existing map incompatible with spec. Unpin so it can be recreated. - if err := m.Unpin(); err != nil { - return nil, err - } - - return createMap(spec, &opts) - } - - return m, err -} - -// GetMtime returns monotonic time that can be used to compare -// values with ktime_get_ns() BPF helper, e.g. needed to check -// the timeout in sec for BPF entries. We return the raw nsec, -// although that is not quite usable for comparison. Go has -// runtime.nanotime() but doesn't expose it as API. -func GetMtime() (uint64, error) { - var ts unix.Timespec - - err := unix.ClockGettime(unix.CLOCK_MONOTONIC, &ts) - if err != nil { - return 0, fmt.Errorf("Unable get time: %w", err) - } - - return uint64(unix.TimespecToNsec(ts)), nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/bpffs_linux.go b/vendor/github.com/cilium/cilium/pkg/bpf/bpffs_linux.go deleted file mode 100644 index 1a94dde4199..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/bpffs_linux.go +++ /dev/null @@ -1,301 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build linux - -package bpf - -import ( - "errors" - "fmt" - "os" - "path/filepath" - "sync" - - "golang.org/x/sys/unix" - - "github.com/cilium/cilium/pkg/components" - "github.com/cilium/cilium/pkg/defaults" - "github.com/cilium/cilium/pkg/mountinfo" -) - -var ( - // Path to where bpffs is mounted - bpffsRoot = defaults.BPFFSRoot - - // Set to true on first get request to detect misorder - lockedDown = false - once sync.Once - readMountInfo sync.Once - mountInfoPrefix string -) - -func lockDown() { - lockedDown = true -} - -func setBPFFSRoot(path string) { - if lockedDown { - panic("setBPFFSRoot() call after bpffsRoot was read") - } - bpffsRoot = path -} - -func BPFFSRoot() string { - once.Do(lockDown) - return bpffsRoot -} - -// TCGlobalsPath returns the absolute path to /tc/globals, used for -// legacy map pin paths. -func TCGlobalsPath() string { - once.Do(lockDown) - return filepath.Join(bpffsRoot, defaults.TCGlobalsPath) -} - -// CiliumPath returns the bpffs path to be used for Cilium object pins. -func CiliumPath() string { - once.Do(lockDown) - return filepath.Join(bpffsRoot, "cilium") -} - -// MkdirBPF wraps [os.MkdirAll] with the right permission bits for bpffs. -// Use this for ensuring the existence of directories on bpffs. -func MkdirBPF(path string) error { - return os.MkdirAll(path, 0755) -} - -// Remove path ignoring ErrNotExist. -func Remove(path string) error { - err := os.RemoveAll(path) - if err != nil && !errors.Is(err, os.ErrNotExist) { - return fmt.Errorf("removing bpffs directory at %s: %w", path, err) - } - return err -} - -func tcPathFromMountInfo(name string) string { - readMountInfo.Do(func() { - mountInfos, err := mountinfo.GetMountInfo() - if err != nil { - log.WithError(err).Fatal("Could not get mount info for map root lookup") - } - - for _, mountInfo := range mountInfos { - if mountInfo.FilesystemType == "bpf" { - mountInfoPrefix = filepath.Join(mountInfo.MountPoint, defaults.TCGlobalsPath) - return - } - } - - log.Fatal("Could not find BPF map root") - }) - - return filepath.Join(mountInfoPrefix, name) -} - -// MapPath returns a path for a BPF map with a given name. -func MapPath(name string) string { - if components.IsCiliumAgent() { - once.Do(lockDown) - return filepath.Join(TCGlobalsPath(), name) - } - return tcPathFromMountInfo(name) -} - -// LocalMapName returns the name for a BPF map that is local to the specified ID. -func LocalMapName(name string, id uint16) string { - return fmt.Sprintf("%s%05d", name, id) -} - -// LocalMapPath returns the path for a BPF map that is local to the specified ID. -func LocalMapPath(name string, id uint16) string { - return MapPath(LocalMapName(name, id)) -} - -var ( - mountOnce sync.Once -) - -// mountFS mounts the BPFFS filesystem into the desired mapRoot directory. -func mountFS(printWarning bool) error { - if printWarning { - log.Warning("================================= WARNING ==========================================") - log.Warning("BPF filesystem is not mounted. This will lead to network disruption when Cilium pods") - log.Warning("are restarted. Ensure that the BPF filesystem is mounted in the host.") - log.Warning("https://docs.cilium.io/en/stable/operations/system_requirements/#mounted-ebpf-filesystem") - log.Warning("====================================================================================") - } - - log.Infof("Mounting BPF filesystem at %s", bpffsRoot) - - mapRootStat, err := os.Stat(bpffsRoot) - if err != nil { - if os.IsNotExist(err) { - if err := MkdirBPF(bpffsRoot); err != nil { - return fmt.Errorf("unable to create bpf mount directory: %w", err) - } - } else { - return fmt.Errorf("failed to stat the mount path %s: %w", bpffsRoot, err) - - } - } else if !mapRootStat.IsDir() { - return fmt.Errorf("%s is a file which is not a directory", bpffsRoot) - } - - if err := unix.Mount(bpffsRoot, bpffsRoot, "bpf", 0, ""); err != nil { - return fmt.Errorf("failed to mount %s: %w", bpffsRoot, err) - } - return nil -} - -// hasMultipleMounts checks whether the current mapRoot has only one mount. -func hasMultipleMounts() (bool, error) { - num := 0 - - mountInfos, err := mountinfo.GetMountInfo() - if err != nil { - return false, err - } - - for _, mountInfo := range mountInfos { - if mountInfo.Root == "/" && mountInfo.MountPoint == bpffsRoot { - num++ - } - } - - return num > 1, nil -} - -// checkOrMountCustomLocation tries to check or mount the BPF filesystem in the -// given path. -func checkOrMountCustomLocation(bpfRoot string) error { - setBPFFSRoot(bpfRoot) - - // Check whether the custom location has a BPFFS mount. - mounted, bpffsInstance, err := mountinfo.IsMountFS(mountinfo.FilesystemTypeBPFFS, bpfRoot) - if err != nil { - return err - } - - // If the custom location has no mount, let's mount BPFFS there. - if !mounted { - setBPFFSRoot(bpfRoot) - if err := mountFS(true); err != nil { - return err - } - - return nil - } - - // If the custom location already has a mount with some other filesystem than - // BPFFS, return the error. - if !bpffsInstance { - return fmt.Errorf("mount in the custom directory %s has a different filesystem than BPFFS", bpfRoot) - } - - log.Infof("Detected mounted BPF filesystem at %s", bpffsRoot) - - return nil -} - -// checkOrMountDefaultLocations tries to check or mount the BPF filesystem in -// standard locations, which are: -// - /sys/fs/bpf -// - /run/cilium/bpffs -// There is a procedure of determining which directory is going to be used: -// 1. Checking whether BPFFS filesystem is mounted in /sys/fs/bpf. -// 2. If there is no mount, then mount BPFFS in /sys/fs/bpf and finish there. -// 3. If there is a BPFFS mount, finish there. -// 4. If there is a mount, but with the other filesystem, then it means that most -// probably Cilium is running inside container which has mounted /sys/fs/bpf -// from host, but host doesn't have proper BPFFS mount, so that mount is just -// the empty directory. In that case, mount BPFFS under /run/cilium/bpffs. -func checkOrMountDefaultLocations() error { - // Check whether /sys/fs/bpf has a BPFFS mount. - mounted, bpffsInstance, err := mountinfo.IsMountFS(mountinfo.FilesystemTypeBPFFS, bpffsRoot) - if err != nil { - return err - } - - // If /sys/fs/bpf is not mounted at all, we should mount - // BPFFS there. - if !mounted { - if err := mountFS(false); err != nil { - return err - } - - return nil - } - - if !bpffsInstance { - // If /sys/fs/bpf has a mount but with some other filesystem - // than BPFFS, it means that Cilium is running inside container - // and /sys/fs/bpf is not mounted on host. We should mount BPFFS - // in /run/cilium/bpffs automatically. This will allow operation - // of Cilium but will result in unmounting of the filesystem - // when the pod is restarted. This in turn will cause resources - // such as the connection tracking table of the BPF programs to - // be released which will cause all connections into local - // containers to be dropped. User is going to be warned. - log.Warnf("BPF filesystem is going to be mounted automatically "+ - "in %s. However, it probably means that Cilium is running "+ - "inside container and BPFFS is not mounted on the host. "+ - "for more information, see: https://cilium.link/err-bpf-mount", - defaults.BPFFSRootFallback, - ) - setBPFFSRoot(defaults.BPFFSRootFallback) - - cMounted, cBpffsInstance, err := mountinfo.IsMountFS(mountinfo.FilesystemTypeBPFFS, bpffsRoot) - if err != nil { - return err - } - if !cMounted { - if err := mountFS(false); err != nil { - return err - } - } else if !cBpffsInstance { - log.Fatalf("%s is mounted but has a different filesystem than BPFFS", defaults.BPFFSRootFallback) - } - } - - log.Infof("Detected mounted BPF filesystem at %s", bpffsRoot) - - return nil -} - -func checkOrMountFS(bpfRoot string) error { - if bpfRoot == "" { - if err := checkOrMountDefaultLocations(); err != nil { - return err - } - } else { - if err := checkOrMountCustomLocation(bpfRoot); err != nil { - return err - } - } - - multipleMounts, err := hasMultipleMounts() - if err != nil { - return err - } - if multipleMounts { - return fmt.Errorf("multiple mount points detected at %s", bpffsRoot) - } - - return nil -} - -// CheckOrMountFS checks or mounts the BPF filesystem and then -// opens/creates/deletes all maps which have previously been scheduled to be -// opened/created/deleted. -// -// If printWarning is set, will print a warning if bpffs has not previously been -// mounted. -func CheckOrMountFS(bpfRoot string) { - mountOnce.Do(func() { - if err := checkOrMountFS(bpfRoot); err != nil { - log.WithError(err).Fatal("Unable to mount BPF filesystem") - } - }) -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/bpffs_migrate.go b/vendor/github.com/cilium/cilium/pkg/bpf/bpffs_migrate.go deleted file mode 100644 index 99a8e49c042..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/bpffs_migrate.go +++ /dev/null @@ -1,185 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package bpf - -import ( - "errors" - "fmt" - "os" - "path/filepath" - "strings" - - "github.com/cilium/ebpf" - "github.com/sirupsen/logrus" - "golang.org/x/sys/unix" - - "github.com/cilium/cilium/pkg/logging/logfields" -) - -const bpffsPending = ":pending" - -// StartBPFFSMigration the map migration process for a given ELF's maps. -// When a new ELF contains a map definition that differs from its existing (pinned) -// counterpart, re-pin it to its current path suffixed by ':pending'. -// A map's type, key size, value size, flags and max entries are compared to the given spec. -// -// Takes a bpffsPath explicitly since it does not necessarily execute within -// the same runtime as the agent. It is imported from a Cilium cmd that takes -// its bpffs path from an env. -func StartBPFFSMigration(bpffsPath string, coll *ebpf.CollectionSpec) error { - if coll == nil { - return errors.New("can't migrate a nil CollectionSpec") - } - - for name, spec := range coll.Maps { - // Skip map specs without the pinning flag. Also takes care of skipping .data, - // .rodata and .bss. - if spec.Pinning == 0 { - continue - } - - // Re-pin the map with ':pending' suffix if incoming spec differs from - // the currently-pinned map. - if err := RepinMap(bpffsPath, name, spec); err != nil { - return err - } - } - - return nil -} - -// FinalizeBPFFSMigration finalizes the migration of an ELF's maps. -// If revert is true, any pending maps are re-pinned back to their original -// locations. If revert is false, any pending maps are unpinned (deleted). -// -// Takes a bpffsPath explicitly since it does not necessarily execute within -// the same runtime as the agent. It is imported from a Cilium cmd that takes -// its bpffs path from an env. -func FinalizeBPFFSMigration(bpffsPath string, coll *ebpf.CollectionSpec, revert bool) error { - if coll == nil { - return errors.New("can't migrate a nil CollectionSpec") - } - - for name, spec := range coll.Maps { - // Skip map specs without the pinning flag. Also takes care of skipping .data, - // .rodata and .bss. - // Don't unpin existing maps if their new versions are missing the pinning flag. - if spec.Pinning == 0 { - continue - } - - if err := FinalizeMap(bpffsPath, name, revert); err != nil { - return err - } - } - - return nil -} - -// RepinMap opens a map from bpffs by its pin in '/tc/globals/', -// compares its properties against the incoming spec and re-pins it to -// ':pending' if any of its properties differ. -func RepinMap(bpffsPath string, name string, spec *ebpf.MapSpec) error { - file := filepath.Join(bpffsPath, name) - pinned, err := ebpf.LoadPinnedMap(file, nil) - - // Given map was not pinned, nothing to do. - if errors.Is(err, unix.ENOENT) { - return nil - } - - if err != nil { - return fmt.Errorf("map not found at path %s: %w", name, err) - } - defer pinned.Close() - - if pinned.Type() == spec.Type && - pinned.KeySize() == spec.KeySize && - pinned.ValueSize() == spec.ValueSize && - pinned.Flags() == spec.Flags && - pinned.MaxEntries() == spec.MaxEntries { - // cilium_calls_xdp is shared between XDP interfaces and should only be - // migrated if the existing map is incompatible. - if spec.Name == "cilium_calls_xdp" { - return nil - } - // Maps prefixed with cilium_calls_ should never be reused by subsequent ELF - // loads and should be migrated unconditionally. - if !strings.HasPrefix(spec.Name, "cilium_calls_") { - return nil - } - } - - dest := file + bpffsPending - - log.WithFields(logrus.Fields{ - logfields.BPFMapName: name, - logfields.BPFMapPath: file, - }).Infof("Re-pinning map with '%s' suffix", bpffsPending) - - if err := os.Remove(dest); err == nil { - log.WithFields(logrus.Fields{ - logfields.BPFMapName: name, - logfields.BPFMapPath: dest, - }).Info("Removed pending pinned map, did the agent die unexpectedly?") - } - - // Atomically re-pin the map to its new path. - if err := pinned.Pin(dest); err != nil { - return err - } - - return nil -} - -// FinalizeMap opens the ':pending' Map pin of the given named Map from bpffs. -// If the given map is not found in bpffs, returns nil. -// If revert is true, the map will be re-pinned back to its initial locations. -// If revert is false, the map will be unpinned. -func FinalizeMap(bpffsPath, name string, revert bool) error { - // Attempt to open a 'pending' Map pin. - file := filepath.Join(bpffsPath, name+bpffsPending) - pending, err := ebpf.LoadPinnedMap(file, nil) - - // Given map was not pending recreation, nothing to do. - if errors.Is(err, unix.ENOENT) { - return nil - } - - if err != nil { - return fmt.Errorf("unable to open pinned map at path %s: %w", name, err) - } - - // Pending Map was found on bpffs and needs to be reverted. - if revert { - dest := filepath.Join(bpffsPath, name) - log.WithFields(logrus.Fields{ - logfields.BPFMapPath: dest, - logfields.BPFMapName: name, - }).Infof("Repinning without '%s' suffix after failed migration", bpffsPending) - - if err := os.Remove(dest); err == nil { - log.WithFields(logrus.Fields{ - logfields.BPFMapName: name, - logfields.BPFMapPath: dest, - }).Warn("Removed new pinned map after failed migration") - } - - // Atomically re-pin the map to its original path. - if err := pending.Pin(dest); err != nil { - return err - } - - return nil - } - - log.WithFields(logrus.Fields{ - logfields.BPFMapPath: file, - logfields.BPFMapName: name, - }).Info("Unpinning map after successful recreation") - - // Pending Map found on bpffs and its replacement was successfully loaded. - // Unpin the old map since it no longer needs to be interacted with from userspace. - return pending.Unpin() -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/bpfmap.go b/vendor/github.com/cilium/cilium/pkg/bpf/bpfmap.go deleted file mode 100644 index 61a0b89f240..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/bpfmap.go +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package bpf - -import "github.com/cilium/cilium/pkg/hive/cell" - -// BpfMap defines the base interface every BPF map needs to implement. -// -// Its main purpose is to register a BPF map via value group `bpf-maps`. See [MapOut]. -type BpfMap interface{} - -// MapOut ensures that maps are created before the datapath loader -// is invoked. -type MapOut[T any] struct { - cell.Out - - Map T - BpfMap BpfMap `group:"bpf-maps"` -} - -func NewMapOut[T any](m T) MapOut[T] { - return MapOut[T]{Map: m, BpfMap: m} -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/collection.go b/vendor/github.com/cilium/cilium/pkg/bpf/collection.go deleted file mode 100644 index 55450a515e8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/collection.go +++ /dev/null @@ -1,466 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package bpf - -import ( - "encoding/binary" - "errors" - "fmt" - "strings" - - "github.com/cilium/ebpf" - "github.com/cilium/ebpf/asm" - "github.com/cilium/ebpf/btf" - - "github.com/cilium/cilium/pkg/maps/callsmap" -) - -const globalDataMap = ".rodata.config" - -// LoadCollectionSpec loads the eBPF ELF at the given path and parses it into -// a CollectionSpec. This spec is only a blueprint of the contents of the ELF -// and does not represent any live resources that have been loaded into the -// kernel. -// -// This is a wrapper around ebpf.LoadCollectionSpec that parses legacy iproute2 -// bpf_elf_map definitions (only used for prog_arrays at the time of writing) -// and assigns tail calls annotated with `__section_tail` macros to their -// intended maps and slots. -func LoadCollectionSpec(path string) (*ebpf.CollectionSpec, error) { - spec, err := ebpf.LoadCollectionSpec(path) - if err != nil { - return nil, err - } - - if err := removeUnreachableTailcalls(spec); err != nil { - return nil, err - } - - if err := iproute2Compat(spec); err != nil { - return nil, err - } - - if err := classifyProgramTypes(spec); err != nil { - return nil, err - } - - return spec, nil -} - -func removeUnreachableTailcalls(spec *ebpf.CollectionSpec) error { - type TailCall struct { - referenced bool - visited bool - spec *ebpf.ProgramSpec - } - - entrypoints := make([]*ebpf.ProgramSpec, 0) - tailcalls := make(map[uint32]*TailCall) - - const ( - // Corresponds to CILIUM_MAP_CALLS. - cilium_calls_map = 2 - ) - - for _, prog := range spec.Programs { - var id, slot uint32 - // Consider any program that doesn't follow the tailcall naming convention - // x/y to be an entrypoint. - // Any program that does follow the x/y naming convention but not part - // of the cilium_calls map is also considered an entrypoint. - if _, err := fmt.Sscanf(prog.SectionName, "%d/%v", &id, &slot); err != nil || id != cilium_calls_map { - entrypoints = append(entrypoints, prog) - continue - } - - if tailcalls[slot] != nil { - return fmt.Errorf("duplicate tail call index %d", slot) - } - - tailcalls[slot] = &TailCall{ - spec: prog, - } - } - - // Discover all tailcalls that are reachable from the given program. - visit := func(prog *ebpf.ProgramSpec, tailcalls map[uint32]*TailCall) error { - // We look back from any tailcall, so we expect there to always be 3 instructions ahead of any tail call instr. - for i := 3; i < len(prog.Instructions); i++ { - // The `tail_call_static` C function is always used to call tail calls when - // the map index is known at compile time. - // Due to inline ASM this generates the following instructions: - // Mov R1, Rx - // Mov R2, - // Mov R3, - // call tail_call - - // Find the tail call instruction. - inst := prog.Instructions[i] - if !inst.IsBuiltinCall() || inst.Constant != int64(asm.FnTailCall) { - continue - } - - // Check that the previous instruction is a mov of the tail call index. - movIdx := prog.Instructions[i-1] - if movIdx.OpCode.ALUOp() != asm.Mov || movIdx.Dst != asm.R3 { - continue - } - - // Check that the instruction before that is the load of the tail call map. - movR2 := prog.Instructions[i-2] - if movR2.OpCode != asm.LoadImmOp(asm.DWord) || movR2.Src != asm.PseudoMapFD { - continue - } - - ref := movR2.Reference() - - // Ignore static tail calls made to maps that are not the calls map - if !strings.Contains(ref, callsmap.MapName) || strings.Contains(ref, callsmap.CustomCallsMapName) { - log.Debugf("program '%s'/'%s', found tail call at %d, reference '%s', not a calls map, skipping", - prog.SectionName, prog.Name, i, ref) - continue - } - - tc := tailcalls[uint32(movIdx.Constant)] - if tc == nil { - return fmt.Errorf( - "program '%s'/'%s' executes tail call to unknown index '%d' at %d, potential missed tailcall", - prog.SectionName, - prog.Name, - movIdx.Constant, - i, - ) - } - - tc.referenced = true - } - - return nil - } - - // Discover all tailcalls that are reachable from the entrypoints. - for _, prog := range entrypoints { - if err := visit(prog, tailcalls); err != nil { - return err - } - } - - // Keep visiting tailcalls until no more are discovered. -reset: - for _, tailcall := range tailcalls { - // If a tailcall is referenced by an entrypoint or another tailcall we should visit it - if tailcall.referenced && !tailcall.visited { - if err := visit(tailcall.spec, tailcalls); err != nil { - return err - } - tailcall.visited = true - - // Visiting this tail call might have caused tail calls earlier in the list to become referenced, but this - // loop already skipped them. So reset the loop. If we already visited a tailcall we will ignore them anyway. - goto reset - } - } - - // Remove all tailcalls that are not referenced. - for _, tailcall := range tailcalls { - if !tailcall.referenced { - log.Debugf("section '%s' / prog '%s', unreferenced, deleting", tailcall.spec.SectionName, tailcall.spec.Name) - delete(spec.Programs, tailcall.spec.Name) - } - } - - return nil -} - -// iproute2Compat parses the Extra field of each MapSpec in the CollectionSpec. -// This extra portion is present in legacy bpf_elf_map definitions and must be -// handled before the map can be loaded into the kernel. -// -// It parses the ELF section name of each ProgramSpec to extract any map/slot -// mappings for prog arrays used as tail call maps. The spec's programs are then -// inserted into the appropriate map and slot. -// -// TODO(timo): Remove when bpf_elf_map map definitions are no longer used after -// moving away from iproute2+libbpf. -func iproute2Compat(spec *ebpf.CollectionSpec) error { - // Parse legacy iproute2 u32 id and pinning fields. - maps := make(map[uint32]*ebpf.MapSpec) - for _, m := range spec.Maps { - if m.Extra != nil && m.Extra.Len() > 0 { - tail := struct { - ID uint32 - Pinning uint32 - _ uint64 // inner_id + inner_idx - }{} - if err := binary.Read(m.Extra, spec.ByteOrder, &tail); err != nil { - return fmt.Errorf("reading iproute2 map definition: %w", err) - } - - if tail.Pinning > 0 { - m.Pinning = ebpf.PinByName - } - - // Index maps by their iproute2 .id if any, so X/Y ELF section names can - // be matched against them. - if tail.ID != 0 { - if m2 := maps[tail.ID]; m2 != nil { - return fmt.Errorf("maps %s and %s have duplicate iproute2 map ID %d", m.Name, m2.Name, tail.ID) - } - maps[tail.ID] = m - } - } - } - - for n, p := range spec.Programs { - // Parse the program's section name to determine which prog array and slot it - // needs to be inserted into. For example, a section name of '2/14' means to - // insert into the map with the .id field of 2 at index 14. - // Uses %v to automatically detect slot's mathematical base, since they can - // appear either in dec or hex, e.g. 1/0x0515. - var id, slot uint32 - if _, err := fmt.Sscanf(p.SectionName, "%d/%v", &id, &slot); err == nil { - // Assign the prog name and slot to the map with the iproute2 .id obtained - // from the program's section name. The lib will load the ProgramSpecs - // and insert the corresponding Programs into the prog array at load time. - m := maps[id] - if m == nil { - return fmt.Errorf("no map with iproute2 map .id %d", id) - } - m.Contents = append(maps[id].Contents, ebpf.MapKV{Key: slot, Value: n}) - } - } - - return nil -} - -// LoadCollection loads the given spec into the kernel with the specified opts. -// -// The value given in ProgramOptions.LogSize is used as the starting point for -// sizing the verifier's log buffer and defaults to 4MiB. On each retry, the -// log buffer quadruples in size, for a total of 5 attempts. If that proves -// insufficient, a truncated ebpf.VerifierError is returned. -// -// Any maps marked as pinned in the spec are automatically loaded from the path -// given in opts.Maps.PinPath and will be used instead of creating new ones. -// MapSpecs that differ (type/key/value/max/flags) from their pinned versions -// will result in an ebpf.ErrMapIncompatible here and the map must be removed -// before loading the CollectionSpec. -func LoadCollection(spec *ebpf.CollectionSpec, opts ebpf.CollectionOptions) (*ebpf.Collection, error) { - if spec == nil { - return nil, errors.New("can't load nil CollectionSpec") - } - - // Copy spec so the modifications below don't affect the input parameter, - // allowing the spec to be safely re-used by the caller. - spec = spec.Copy() - - if err := inlineGlobalData(spec); err != nil { - return nil, fmt.Errorf("inlining global data: %w", err) - } - - // Set initial size of verifier log buffer. - // - // Up until kernel 5.1, the maximum log size is (2^24)-1. In 5.2, this was - // increased to (2^30)-1 by 7a9f5c65abcc ("bpf: increase verifier log limit"). - // - // The default value of (2^22)-1 was chosen to be large enough to fit the log - // of most Cilium programs, while falling just within the 5.1 maximum size in - // one of the steps of the multiplication loop below. Without the -1, it would - // overshoot the cap to 2^24, making e.g. verifier tests unable to load the - // program if the previous size (2^22) was too small to fit the log. - if opts.Programs.LogSize == 0 { - opts.Programs.LogSize = 4_194_303 - } - - attempt := 1 - for { - coll, err := ebpf.NewCollectionWithOptions(spec, opts) - if err == nil { - return coll, nil - } - - // Bump LogSize and retry if there's a truncated VerifierError. - var ve *ebpf.VerifierError - if errors.As(err, &ve) && ve.Truncated { - if attempt >= 5 { - return nil, fmt.Errorf("%d-byte truncated verifier log after %d attempts: %w", opts.Programs.LogSize, attempt, err) - } - - // Retry with non-zero log level to avoid retrying with log disabled. - if opts.Programs.LogLevel == 0 { - opts.Programs.LogLevel = ebpf.LogLevelBranch - } - - opts.Programs.LogSize *= 4 - - attempt++ - - continue - } - - // Not a truncated VerifierError. - return nil, err - } -} - -// classifyProgramTypes sets the type of ProgramSpecs which the library cannot -// automatically classify due to them being in unrecognized ELF sections. Only -// programs of type UnspecifiedProgram are modified. -// -// Cilium uses the iproute2 X/Y section name convention for assigning programs -// to prog array slots, which is also not supported. -// -// TODO(timo): When iproute2 is no longer used for any loading, tail call progs -// can receive proper prefixes. -func classifyProgramTypes(spec *ebpf.CollectionSpec) error { - var t ebpf.ProgramType - for name, p := range spec.Programs { - // If the loader was able to classify a program, go with the verdict. - if p.Type != ebpf.UnspecifiedProgram { - t = p.Type - break - } - - // Assign a program type based on the first recognized function name. - switch name { - // bpf_xdp.c - case "cil_xdp_entry": - t = ebpf.XDP - case - // bpf_lxc.c - "cil_from_container", "cil_to_container", - // bpf_host.c - "cil_from_netdev", "cil_from_host", "cil_to_netdev", "cil_to_host", - // bpf_network.c - "cil_from_network", - // bpf_overlay.c - "cil_to_overlay", "cil_from_overlay": - t = ebpf.SchedCLS - default: - continue - } - - break - } - - for _, p := range spec.Programs { - if p.Type == ebpf.UnspecifiedProgram { - p.Type = t - } - } - - if t == ebpf.UnspecifiedProgram { - return errors.New("unable to classify program types") - } - - return nil -} - -// inlineGlobalData replaces all map loads from a global data section with -// immediate dword loads, effectively performing those map lookups in the -// loader. This is done for compatibility with kernels that don't support -// global data maps yet. -// -// This code interacts with the DECLARE_CONFIG macro in the BPF C code base. -func inlineGlobalData(spec *ebpf.CollectionSpec) error { - vars, err := globalData(spec) - if err != nil { - return err - } - if vars == nil { - // No static data, nothing to replace. - return nil - } - - for _, prog := range spec.Programs { - for i, ins := range prog.Instructions { - if !ins.IsLoadFromMap() || ins.Src != asm.PseudoMapValue { - continue - } - - if ins.Reference() != globalDataMap { - return fmt.Errorf("global constants must be in %s, but found reference to %s", globalDataMap, ins.Reference()) - } - - // Get the offset of the read within the target map, - // stored in the 32 most-significant bits of Constant. - // Equivalent to Instruction.mapOffset(). - off := uint32(uint64(ins.Constant) >> 32) - - // Look up the value of the variable stored at the Datasec offset pointed - // at by the instruction. - value, ok := vars[off] - if !ok { - return fmt.Errorf("no global constant found in %s at offset %d", globalDataMap, off) - } - - imm := spec.ByteOrder.Uint64(value) - - // Replace the map load with an immediate load. Must be a dword load - // to match the instruction width of a map load. - r := asm.LoadImm(ins.Dst, int64(imm), asm.DWord) - - // Preserve metadata of the original instruction. Otherwise, a program's - // first instruction could be stripped of its func_info or Symbol - // (function start) annotations. - r.Metadata = ins.Metadata - - prog.Instructions[i] = r - } - } - - return nil -} - -type varOffsets map[uint32][]byte - -// globalData gets the contents of the first entry in the global data map -// and removes it from the spec to prevent it from being created in the kernel. -func globalData(spec *ebpf.CollectionSpec) (varOffsets, error) { - dm := spec.Maps[globalDataMap] - if dm == nil { - return nil, nil - } - - if dl := len(dm.Contents); dl != 1 { - return nil, fmt.Errorf("expected one key in %s, found %d", globalDataMap, dl) - } - - ds, ok := dm.Value.(*btf.Datasec) - if !ok { - return nil, fmt.Errorf("no BTF datasec found for %s", globalDataMap) - } - - data, ok := (dm.Contents[0].Value).([]byte) - if !ok { - return nil, fmt.Errorf("expected %s value to be a byte slice, got: %T", - globalDataMap, dm.Contents[0].Value) - } - - // Slice up the binary contents of the global data map according to the - // variables described in its Datasec. - out := make(varOffsets) - for _, vsi := range ds.Vars { - if vsi.Size > 8 { - return nil, fmt.Errorf("variables larger than 8 bytes are not supported (got %d)", vsi.Size) - } - - if _, ok := out[vsi.Offset]; ok { - return nil, fmt.Errorf("duplicate VarSecInfo for offset %d", vsi.Offset) - } - - // Allocate a fixed slice of 8 bytes so it can be used to store in an imm64 - // instruction later using ByteOrder.Uint64(). - v := make([]byte, 8) - copy(v, data[vsi.Offset:vsi.Offset+vsi.Size]) - - // Emit the variable's value by its offset in the datasec. - out[vsi.Offset] = v - } - - // Remove the map definition to skip loading it into the kernel. - delete(spec.Maps, globalDataMap) - - return out, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/doc.go b/vendor/github.com/cilium/cilium/pkg/bpf/doc.go deleted file mode 100644 index 74ab2e56983..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package bpf provides functions that allow golang programs to interact with -// bpf maps. -// +groupName=pkg -package bpf diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/endpoint.go b/vendor/github.com/cilium/cilium/pkg/bpf/endpoint.go deleted file mode 100644 index 3c73fa3bf94..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/endpoint.go +++ /dev/null @@ -1,71 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package bpf - -import ( - "fmt" - "net" - - cmtypes "github.com/cilium/cilium/pkg/clustermesh/types" - ippkg "github.com/cilium/cilium/pkg/ip" - "github.com/cilium/cilium/pkg/types" -) - -// Must be in sync with ENDPOINT_KEY_* in -const ( - EndpointKeyIPv4 uint8 = 1 - EndpointKeyIPv6 uint8 = 2 -) - -// EndpointKey represents the key value of the endpoints BPF map -// -// Must be in sync with struct endpoint_key in -type EndpointKey struct { - // represents both IPv6 and IPv4 (in the lowest four bytes) - IP types.IPv6 `align:"$union0"` - Family uint8 `align:"family"` - Key uint8 `align:"key"` - ClusterID uint16 `align:"cluster_id"` -} - -// NewEndpointKey returns an EndpointKey based on the provided IP address. The -// address family is automatically detected. -func NewEndpointKey(ip net.IP, clusterID uint16) EndpointKey { - result := EndpointKey{} - - if ip4 := ip.To4(); ip4 != nil { - result.Family = EndpointKeyIPv4 - copy(result.IP[:], ip4) - } else { - result.Family = EndpointKeyIPv6 - copy(result.IP[:], ip) - } - result.Key = 0 - result.ClusterID = clusterID - - return result -} - -// ToIP converts the EndpointKey into a net.IP structure. -func (k EndpointKey) ToIP() net.IP { - switch k.Family { - case EndpointKeyIPv4: - return k.IP[:4] - case EndpointKeyIPv6: - return k.IP[:] - } - return nil -} - -// String provides a string representation of the EndpointKey. -func (k EndpointKey) String() string { - if ip := k.ToIP(); ip != nil { - addrCluster := cmtypes.AddrClusterFrom( - ippkg.MustAddrFromIP(ip), - uint32(k.ClusterID), - ) - return addrCluster.String() + ":" + fmt.Sprintf("%d", k.Key) - } - return "nil" -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/events.go b/vendor/github.com/cilium/cilium/pkg/bpf/events.go deleted file mode 100644 index 73e217df8d9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/events.go +++ /dev/null @@ -1,286 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package bpf - -import ( - "context" - "fmt" - "sync" - "sync/atomic" - - "github.com/cilium/cilium/pkg/container" - "github.com/cilium/cilium/pkg/controller" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/time" -) - -// Action describes an action for map buffer events. -type Action uint8 - -const ( - // MapUpdate describes a map.Update event. - MapUpdate Action = iota - // MapDelete describes a map.Delete event. - MapDelete - // MapDeleteAll describes a map.DeleteAll event which is aggregated into a single event - // to minimize memory and subscription buffer usage. - MapDeleteAll -) - -var bpfEventBufferGCControllerGroup = controller.NewGroup("bpf-event-buffer-gc") - -// String returns a string representation of an Action. -func (e Action) String() string { - switch e { - case MapUpdate: - return "update" - case MapDelete: - return "delete" - case MapDeleteAll: - return "delete-all" - default: - return "unknown" - } -} - -// Event contains data about a bpf operation event. -type Event struct { - Timestamp time.Time - action Action - cacheEntry -} - -// GetAction returns the event action string. -func (e *Event) GetAction() string { - return e.action.String() -} - -// GetKey returns the string representation of a event key. -func (e Event) GetKey() string { - if e.cacheEntry.Key == nil { - return "" - } - return e.cacheEntry.Key.String() -} - -// GetValue returns the string representation of a event value. -// Nil values (such as with deletes) are returned as a canonical -// string representation. -func (e Event) GetValue() string { - if e.cacheEntry.Value == nil { - return "" - } - return e.cacheEntry.Value.String() -} - -// GetLastError returns the last error for an event. -func (e Event) GetLastError() error { - return e.cacheEntry.LastError -} - -// GetDesiredAction returns the desired action enum for an event. -func (e Event) GetDesiredAction() DesiredAction { - return e.cacheEntry.DesiredAction -} - -func (m *Map) initEventsBuffer(maxSize int, eventsTTL time.Duration) { - b := &eventsBuffer{ - buffer: container.NewRingBuffer(maxSize), - eventTTL: eventsTTL, - } - if b.eventTTL > 0 { - m.scopedLogger().Debug("starting bpf map event buffer GC controller") - mapControllers.UpdateController( - fmt.Sprintf("bpf-event-buffer-gc-%s", m.name), - controller.ControllerParams{ - Group: bpfEventBufferGCControllerGroup, - DoFunc: func(_ context.Context) error { - m.scopedLogger().Debugf("clearing bpf map events older than %s", b.eventTTL) - b.buffer.Compact(func(e interface{}) bool { - event, ok := e.(*Event) - if !ok { - log.WithError(wrongObjTypeErr(e)).Error("Failed to compact the event buffer") - return false - } - return time.Since(event.Timestamp) < b.eventTTL - }) - return nil - }, - RunInterval: b.eventTTL, - }, - ) - } - m.events = b -} - -// eventsBuffer stores a buffer of events for auditing and debugging -// purposes. -type eventsBuffer struct { - buffer *container.RingBuffer - eventTTL time.Duration - subsLock lock.RWMutex - subscriptions []*Handle -} - -// Handle allows for handling event streams safely outside of this package. -// The key design consideration for event streaming is that it is non-blocking. -// The eventsBuffer takes care of closing handles when their consumer is not reading -// off the buffer (or is not reading off it fast enough). -type Handle struct { - c chan *Event - closed atomic.Bool - closer *sync.Once - err error -} - -// Returns read only channel for Handle subscription events. Channel should be closed with -// handle.Close() function. -func (h *Handle) C() <-chan *Event { - return h.c // return read only channel to prevent closing outside of Close(...). -} - -// Close allows for safaley closing of a handle. -func (h *Handle) Close() { - h.close(nil) -} - -func (h *Handle) close(err error) { - h.closer.Do(func() { - close(h.c) - h.err = err - h.closed.Store(true) - }) -} - -func (h *Handle) isClosed() bool { - return h.closed.Load() -} - -func (h *Handle) isFull() bool { - return len(h.c) >= cap(h.c) -} - -// This configures how big buffers are for channels used for streaming events from -// eventsBuffer. -// -// To prevent blocking bpf.Map operations, subscribed events are buffered per client handle. -// How fast subscribers will need to proceess events will depend on the event throughput. -// In this case, our throughput will be expected to be not above 100 events a second. -// Therefore the consumer will have 10ms to process each event. The channel is also -// given a constant buffer size in the case where events arrive at once (i.e. all 100 events -// arriving at the top of the second). -// -// NOTE: Although using timers/timed-contexts seems like an obvious choice for this use case, -// the timer.After implementation actually uses a large amount of memory. To reduce memory spikes -// in high throughput cases, we instead just use a sufficiently buffered channel. -const ( - eventSubChanBufferSize = 32 - maxConcurrentEventSubs = 32 -) - -func (eb *eventsBuffer) hasSubCapacity() bool { - eb.subsLock.RLock() - defer eb.subsLock.RUnlock() - return len(eb.subscriptions) <= maxConcurrentEventSubs -} - -func (eb *eventsBuffer) dumpAndSubscribe(callback EventCallbackFunc, follow bool) (*Handle, error) { - if follow && !eb.hasSubCapacity() { - return nil, fmt.Errorf("exceeded max number of concurrent map event subscriptions %d", maxConcurrentEventSubs) - } - - if callback != nil { - eb.dumpWithCallback(callback) - } - - if !follow { - return nil, nil - } - - h := &Handle{ - c: make(chan *Event, eventSubChanBufferSize), - closer: &sync.Once{}, - } - - eb.subsLock.Lock() - defer eb.subsLock.Unlock() - eb.subscriptions = append(eb.subscriptions, h) - return h, nil -} - -// DumpAndSubscribe dumps existing buffer, if callback is not nil. Followed by creating a -// subscription to the maps events buffer and returning the handle. -// These actions are done together so as to prevent possible missed events between the handoff -// of the callback and sub handle creation. -func (m *Map) DumpAndSubscribe(callback EventCallbackFunc, follow bool) (*Handle, error) { - // note: we have to hold rlock for the duration of this to prevent missed events between dump and sub. - // dumpAndSubscribe maintains its own write-lock for updating subscribers. - m.lock.RLock() - defer m.lock.RUnlock() - if !m.eventsBufferEnabled { - return nil, fmt.Errorf("map events not enabled for map %q", m.name) - } - return m.events.dumpAndSubscribe(callback, follow) -} - -func (m *Map) IsEventsEnabled() bool { - return m.eventsBufferEnabled -} - -func (eb *eventsBuffer) add(e *Event) { - eb.buffer.Add(e) - var activeSubs []*Handle - activeSubsLock := &lock.Mutex{} - wg := &sync.WaitGroup{} - for i, sub := range eb.subscriptions { - if sub.isClosed() { // sub will be removed. - continue - } - wg.Add(1) - go func(sub *Handle, i int) { - defer wg.Done() - if sub.isFull() { - err := fmt.Errorf("timed out waiting to send sub map event") - log.WithError(err).Warnf("subscription channel buffer %d was full, closing subscription", i) - sub.close(err) - } else { - sub.c <- e - activeSubsLock.Lock() - activeSubs = append(activeSubs, sub) - activeSubsLock.Unlock() - } - }(sub, i) - } - wg.Wait() - eb.subsLock.Lock() - defer eb.subsLock.Unlock() - eb.subscriptions = activeSubs -} - -func wrongObjTypeErr(i any) error { - return fmt.Errorf("BUG: wrong object type in event ring buffer: %T", i) -} - -func (eb *eventsBuffer) eventIsValid(e interface{}) bool { - event, ok := e.(*Event) - if !ok { - log.WithError(wrongObjTypeErr(e)).Error("Could not dump contents of events buffer") - return false - } - return eb.eventTTL == 0 || time.Since(event.Timestamp) <= eb.eventTTL -} - -// EventCallbackFunc is used to dump events from a event buffer. -type EventCallbackFunc func(*Event) - -func (eb *eventsBuffer) dumpWithCallback(callback EventCallbackFunc) { - eb.buffer.IterateValid(eb.eventIsValid, func(e interface{}) { - event, ok := e.(*Event) - if !ok { - log.WithError(wrongObjTypeErr(e)).Error("Could not dump contents of events buffer") - return - } - callback(event) - }) -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/link.go b/vendor/github.com/cilium/cilium/pkg/bpf/link.go deleted file mode 100644 index 7749b4618a6..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/link.go +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package bpf - -import ( - "fmt" - - "github.com/cilium/ebpf" - "github.com/cilium/ebpf/link" -) - -// UpdateLink loads a pinned bpf_link at the given pin path and updates its -// program. -// -// Returns [os.ErrNotExist] if the pin is not found. -// -// Updating the link can fail if it is defunct (the hook it points to no longer -// exists). -func UpdateLink(pin string, prog *ebpf.Program) error { - l, err := link.LoadPinnedLink(pin, &ebpf.LoadPinOptions{}) - if err != nil { - return fmt.Errorf("opening pinned link %s: %w", pin, err) - } - defer l.Close() - - if err = l.Update(prog); err != nil { - return fmt.Errorf("updating link %s: %w", pin, err) - } - return nil -} - -// DetachLink loads and unpins a bpf_link at the given pin path. -// -// Returns [os.ErrNotExist] if the pin is not found. -func UnpinLink(pin string) error { - l, err := link.LoadPinnedLink(pin, &ebpf.LoadPinOptions{}) - if err != nil { - return fmt.Errorf("opening pinned link %s: %w", pin, err) - } - defer l.Close() - - if err := l.Unpin(); err != nil { - return fmt.Errorf("unpinning link %s: %w", pin, err) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/map.go b/vendor/github.com/cilium/cilium/pkg/bpf/map.go deleted file mode 100644 index 6d59883c4f9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/map.go +++ /dev/null @@ -1,77 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package bpf - -import ( - "regexp" - - "github.com/cilium/cilium/pkg/controller" - "github.com/cilium/cilium/pkg/time" -) - -const ( - // maxSyncErrors is the maximum consecutive errors syncing before the - // controller bails out - maxSyncErrors = 512 - - // errorResolverSchedulerMinInterval is the minimum interval for the - // error resolver to be scheduled. This minimum interval ensures not to - // overschedule if a large number of updates fail in a row. - errorResolverSchedulerMinInterval = 5 * time.Second - - // errorResolverSchedulerDelay is the delay to update the controller - // after determination that a run is needed. The delay allows to - // schedule the resolver after series of updates have failed. - errorResolverSchedulerDelay = 200 * time.Millisecond -) - -var ( - mapControllers = controller.NewManager() -) - -// DesiredAction is the action to be performed on the BPF map -type DesiredAction uint8 - -const ( - // OK indicates that to further action is required and the entry is in - // sync - OK DesiredAction = iota - - // Insert indicates that the entry needs to be created or updated - Insert - - // Delete indicates that the entry needs to be deleted - Delete -) - -func (d DesiredAction) String() string { - switch d { - case OK: - return "sync" - case Insert: - return "to-be-inserted" - case Delete: - return "to-be-deleted" - default: - return "unknown" - } -} - -var commonNameRegexps = []*regexp.Regexp{ - regexp.MustCompile(`^(cilium_)(.+)_reserved_[0-9]+$`), - regexp.MustCompile(`^(cilium_)(.+)_netdev_ns_[0-9]+$`), - regexp.MustCompile(`^(cilium_)(.+)_overlay_[0-9]+$`), - regexp.MustCompile(`^(cilium_)(.+)_[0-9]+$`), - regexp.MustCompile(`^(cilium_)(.+)+$`), -} - -func extractCommonName(name string) string { - for _, r := range commonNameRegexps { - if replaced := r.ReplaceAllString(name, `$2`); replaced != name { - return replaced - } - } - - return name -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/map_linux.go b/vendor/github.com/cilium/cilium/pkg/bpf/map_linux.go deleted file mode 100644 index 4e44e61c393..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/map_linux.go +++ /dev/null @@ -1,1206 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build linux - -package bpf - -import ( - "context" - "errors" - "fmt" - "io/fs" - "os" - "path" - "reflect" - "strings" - - "github.com/cilium/ebpf" - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/controller" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/spanstat" - "github.com/cilium/cilium/pkg/time" -) - -var ( - // ErrMaxLookup is returned when the maximum number of map element lookups has - // been reached. - ErrMaxLookup = errors.New("maximum number of lookups reached") - - bpfMapSyncControllerGroup = controller.NewGroup("bpf-map-sync") -) - -type MapKey interface { - fmt.Stringer - - // New must return a pointer to a new MapKey. - New() MapKey -} - -type MapValue interface { - fmt.Stringer - - // New must return a pointer to a new MapValue. - New() MapValue -} - -type cacheEntry struct { - Key MapKey - Value MapValue - - DesiredAction DesiredAction - LastError error -} - -type Map struct { - m *ebpf.Map - // spec will be nil after the map has been created - spec *ebpf.MapSpec - - key MapKey - value MapValue - - name string - path string - lock lock.RWMutex - - // cachedCommonName is the common portion of the name excluding any - // endpoint ID - cachedCommonName string - - // enableSync is true when synchronization retries have been enabled. - enableSync bool - - // withValueCache is true when map cache has been enabled - withValueCache bool - - // cache as key/value entries when map cache is enabled or as key-only when - // pressure metric is enabled - cache map[string]*cacheEntry - - // errorResolverLastScheduled is the timestamp when the error resolver - // was last scheduled - errorResolverLastScheduled time.Time - - // outstandingErrors states whether there are outstanding errors, occurred while - // syncing an entry with the kernel, that need to be resolved. This variable exists - // to avoid iterating over the full cache to check if reconciliation is necessary, - // but it is possible that it gets out of sync if an error is automatically - // resolved while performing a subsequent Update/Delete operation on the same key. - outstandingErrors bool - - // pressureGauge is a metric that tracks the pressure on this map - pressureGauge *metrics.GaugeWithThreshold - - // is true when events buffer is enabled. - eventsBufferEnabled bool - - // contains optional event buffer which stores last n bpf map events. - events *eventsBuffer - - // group is the metric group name for this map, it classifies maps of the same - // type that share the same metric group. - group string -} - -func (m *Map) Type() ebpf.MapType { - if m.m != nil { - return m.m.Type() - } - if m.spec != nil { - return m.spec.Type - } - return ebpf.UnspecifiedMap -} - -func (m *Map) KeySize() uint32 { - if m.m != nil { - return m.m.KeySize() - } - if m.spec != nil { - return m.spec.KeySize - } - return 0 -} - -func (m *Map) ValueSize() uint32 { - if m.m != nil { - return m.m.ValueSize() - } - if m.spec != nil { - return m.spec.ValueSize - } - return 0 -} - -func (m *Map) MaxEntries() uint32 { - if m.m != nil { - return m.m.MaxEntries() - } - if m.spec != nil { - return m.spec.MaxEntries - } - return 0 -} - -func (m *Map) Flags() uint32 { - if m.m != nil { - return m.m.Flags() - } - if m.spec != nil { - return m.spec.Flags - } - return 0 -} - -func (m *Map) updateMetrics() { - if m.group == "" { - return - } - metrics.UpdateMapCapacity(m.group, m.MaxEntries()) -} - -// NewMap creates a new Map instance - object representing a BPF map -func NewMap(name string, mapType ebpf.MapType, mapKey MapKey, mapValue MapValue, - maxEntries int, flags uint32) *Map { - - keySize := reflect.TypeOf(mapKey).Elem().Size() - valueSize := reflect.TypeOf(mapValue).Elem().Size() - - return &Map{ - spec: &ebpf.MapSpec{ - Type: mapType, - Name: path.Base(name), - KeySize: uint32(keySize), - ValueSize: uint32(valueSize), - MaxEntries: uint32(maxEntries), - Flags: flags, - }, - name: path.Base(name), - key: mapKey, - value: mapValue, - group: name, - } -} - -// NewMap creates a new Map instance - object representing a BPF map -func NewMapWithInnerSpec(name string, mapType ebpf.MapType, mapKey MapKey, mapValue MapValue, - maxEntries int, flags uint32, innerSpec *ebpf.MapSpec) *Map { - - keySize := reflect.TypeOf(mapKey).Elem().Size() - valueSize := reflect.TypeOf(mapValue).Elem().Size() - - return &Map{ - spec: &ebpf.MapSpec{ - Type: mapType, - Name: path.Base(name), - KeySize: uint32(keySize), - ValueSize: uint32(valueSize), - MaxEntries: uint32(maxEntries), - Flags: flags, - InnerMap: innerSpec, - }, - name: path.Base(name), - key: mapKey, - value: mapValue, - } -} - -func (m *Map) commonName() string { - if m.cachedCommonName != "" { - return m.cachedCommonName - } - - m.cachedCommonName = extractCommonName(m.name) - return m.cachedCommonName -} - -func (m *Map) NonPrefixedName() string { - return strings.TrimPrefix(m.name, metrics.Namespace+"_") -} - -// scheduleErrorResolver schedules a periodic resolver controller that scans -// all BPF map caches for unresolved errors and attempts to resolve them. On -// error of resolution, the controller is-rescheduled in an expedited manner -// with an exponential back-off. -// -// m.lock must be held for writing -func (m *Map) scheduleErrorResolver() { - m.outstandingErrors = true - - if time.Since(m.errorResolverLastScheduled) <= errorResolverSchedulerMinInterval { - return - } - - m.errorResolverLastScheduled = time.Now() - - go func() { - time.Sleep(errorResolverSchedulerDelay) - mapControllers.UpdateController(m.controllerName(), - controller.ControllerParams{ - Group: bpfMapSyncControllerGroup, - DoFunc: m.resolveErrors, - RunInterval: errorResolverSchedulerMinInterval, - }, - ) - }() - -} - -// WithCache enables use of a cache. This will store all entries inserted from -// user space in a local cache (map) and will indicate the status of each -// individual entry. -func (m *Map) WithCache() *Map { - if m.cache == nil { - m.cache = map[string]*cacheEntry{} - } - m.withValueCache = true - m.enableSync = true - return m -} - -// WithEvents enables use of the event buffer, if the buffer is enabled. -// This stores all map events (i.e. add/update/delete) in a bounded event buffer. -// If eventTTL is not zero, than events that are older than the TTL -// will periodically be removed from the buffer. -// Enabling events will use aprox proportional to 100MB for every million capacity -// in maxSize. -// -// TODO: The IPCache map have many periodic update events added by a controller for entries such as the 0.0.0.0/0 range. -// These fill the event buffer with possibly unnecessary events. -// We should either provide an option to aggregate these events, ignore hem from the ipcache event buffer or store them in a separate buffer. -func (m *Map) WithEvents(c option.BPFEventBufferConfig) *Map { - if !c.Enabled { - return m - } - m.scopedLogger().WithFields(logrus.Fields{ - "size": c.MaxSize, - "ttl": c.TTL, - }).Debug("enabling events buffer") - m.eventsBufferEnabled = true - m.initEventsBuffer(c.MaxSize, c.TTL) - return m -} - -func (m *Map) WithGroupName(group string) *Map { - m.group = group - return m -} - -// WithPressureMetricThreshold enables the tracking of a metric that measures -// the pressure of this map. This metric is only reported if over the -// threshold. -func (m *Map) WithPressureMetricThreshold(threshold float64) *Map { - // When pressure metric is enabled, we keep track of map keys in cache - if m.cache == nil { - m.cache = map[string]*cacheEntry{} - } - - m.pressureGauge = metrics.NewBPFMapPressureGauge(m.NonPrefixedName(), threshold) - - return m -} - -// WithPressureMetric enables tracking and reporting of this map pressure with -// threshold 0. -func (m *Map) WithPressureMetric() *Map { - return m.WithPressureMetricThreshold(0.0) -} - -// UpdatePressureMetricWithSize updates map pressure metric using the given map size. -func (m *Map) UpdatePressureMetricWithSize(size int32) { - if m.pressureGauge == nil { - return - } - - // Do a lazy check of MetricsConfig as it is not available at map static - // initialization. - if !metrics.BPFMapPressure { - if !m.withValueCache { - m.cache = nil - } - m.pressureGauge = nil - return - } - - pvalue := float64(size) / float64(m.MaxEntries()) - m.pressureGauge.Set(pvalue) -} - -func (m *Map) updatePressureMetric() { - // Skipping pressure metric gauge updates for LRU map as the cache size - // does not accurately represent the actual map sie. - if m.spec != nil && m.spec.Type == ebpf.LRUHash { - return - } - m.UpdatePressureMetricWithSize(int32(len(m.cache))) -} - -func (m *Map) FD() int { - return m.m.FD() -} - -// Name returns the basename of this map. -func (m *Map) Name() string { - return m.name -} - -// Path returns the path to this map on the filesystem. -func (m *Map) Path() (string, error) { - if err := m.setPathIfUnset(); err != nil { - return "", err - } - - return m.path, nil -} - -// Unpin attempts to unpin (remove) the map from the filesystem. -func (m *Map) Unpin() error { - path, err := m.Path() - if err != nil { - return err - } - - return os.RemoveAll(path) -} - -// UnpinIfExists tries to unpin (remove) the map only if it exists. -func (m *Map) UnpinIfExists() error { - found, err := m.exist() - if err != nil { - return err - } - - if !found { - return nil - } - - return m.Unpin() -} - -func (m *Map) controllerName() string { - return fmt.Sprintf("bpf-map-sync-%s", m.name) -} - -// OpenMap opens the map at pinPath. -func OpenMap(pinPath string, key MapKey, value MapValue) (*Map, error) { - if !path.IsAbs(pinPath) { - return nil, fmt.Errorf("pinPath must be absolute: %s", pinPath) - } - - em, err := ebpf.LoadPinnedMap(pinPath, nil) - if err != nil { - return nil, err - } - - m := &Map{ - m: em, - name: path.Base(pinPath), - path: pinPath, - key: key, - value: value, - } - - m.updateMetrics() - registerMap(pinPath, m) - - return m, nil -} - -func (m *Map) setPathIfUnset() error { - if m.path == "" { - if m.name == "" { - return fmt.Errorf("either path or name must be set") - } - - m.path = MapPath(m.name) - } - - return nil -} - -// Recreate removes any pin at the Map's pin path, recreates and re-pins it. -func (m *Map) Recreate() error { - m.lock.Lock() - defer m.lock.Unlock() - - if m.m != nil { - return fmt.Errorf("map already open: %s", m.name) - } - - if err := m.setPathIfUnset(); err != nil { - return err - } - - if err := os.Remove(m.path); err != nil && !errors.Is(err, fs.ErrNotExist) { - return fmt.Errorf("removing pinned map %s: %w", m.name, err) - } - - m.scopedLogger().Infof("Removed map pin at %s, recreating and re-pinning map %s", m.path, m.name) - - return m.openOrCreate(true) -} - -// OpenOrCreate attempts to open the Map, or if it does not yet exist, create -// the Map. If the existing map's attributes such as map type, key/value size, -// capacity, etc. do not match the Map's attributes, then the map will be -// deleted and reopened without any attempt to retain its previous contents. -// If the map is marked as non-persistent, it will always be recreated. -// -// Returns whether the map was deleted and recreated, or an optional error. -func (m *Map) OpenOrCreate() error { - m.lock.Lock() - defer m.lock.Unlock() - - return m.openOrCreate(true) -} - -// CreateUnpinned creates the map without pinning it to the file system. -// -// TODO(tb): Remove this when all map creation takes MapSpec. -func (m *Map) CreateUnpinned() error { - m.lock.Lock() - defer m.lock.Unlock() - - return m.openOrCreate(false) -} - -// Create is similar to OpenOrCreate, but closes the map after creating or -// opening it. -func (m *Map) Create() error { - if err := m.OpenOrCreate(); err != nil { - return err - } - return m.Close() -} - -func (m *Map) openOrCreate(pin bool) error { - if m.m != nil { - return nil - } - - if m.spec == nil { - return fmt.Errorf("attempted to create map %s without MapSpec", m.name) - } - - if err := m.setPathIfUnset(); err != nil { - return err - } - - m.spec.Flags |= GetPreAllocateMapFlags(m.spec.Type) - - if m.spec.InnerMap != nil { - m.spec.InnerMap.Flags |= GetPreAllocateMapFlags(m.spec.InnerMap.Type) - } - - if pin { - m.spec.Pinning = ebpf.PinByName - } - - em, err := OpenOrCreateMap(m.spec, path.Dir(m.path)) - if err != nil { - return err - } - - m.updateMetrics() - registerMap(m.path, m) - - // Consume the MapSpec. - m.spec = nil - - // Retain the Map. - m.m = em - - return nil -} - -// Open opens the BPF map. All calls to Open() are serialized due to acquiring -// m.lock -func (m *Map) Open() error { - m.lock.Lock() - defer m.lock.Unlock() - - return m.open() -} - -// open opens the BPF map. It is identical to Open() but should be used when -// m.lock is already held. open() may only be used if m.lock is held for -// writing. -func (m *Map) open() error { - if m.m != nil { - return nil - } - - if err := m.setPathIfUnset(); err != nil { - return err - } - - em, err := ebpf.LoadPinnedMap(m.path, nil) - if err != nil { - return fmt.Errorf("loading pinned map %s: %w", m.path, err) - } - - m.updateMetrics() - registerMap(m.path, m) - - m.m = em - - return nil -} - -func (m *Map) Close() error { - m.lock.Lock() - defer m.lock.Unlock() - - if m.enableSync { - mapControllers.RemoveController(m.controllerName()) - } - - if m.m != nil { - m.m.Close() - m.m = nil - } - - unregisterMap(m.path, m) - - return nil -} - -func (m *Map) NextKey(key, nextKeyOut interface{}) error { - var duration *spanstat.SpanStat - if metrics.BPFSyscallDuration.IsEnabled() { - duration = spanstat.Start() - } - - err := m.m.NextKey(key, nextKeyOut) - - if metrics.BPFSyscallDuration.IsEnabled() { - metrics.BPFSyscallDuration.WithLabelValues(metricOpGetNextKey, metrics.Error2Outcome(err)).Observe(duration.End(err == nil).Total().Seconds()) - } - - return err -} - -type DumpCallback func(key MapKey, value MapValue) - -// DumpWithCallback iterates over the Map and calls the given DumpCallback for -// each map entry. With the current implementation, it is safe for callbacks to -// retain the values received, as they are guaranteed to be new instances. -// -// TODO(tb): This package currently doesn't support dumping per-cpu maps, as -// ReadValueSize is always set to the size of a single value. -func (m *Map) DumpWithCallback(cb DumpCallback) error { - if cb == nil { - return errors.New("empty callback") - } - - if err := m.Open(); err != nil { - return err - } - - m.lock.RLock() - defer m.lock.RUnlock() - - // Don't need deep copies here, only fresh pointers. - mk := m.key.New() - mv := m.value.New() - - i := m.m.Iterate() - for i.Next(mk, mv) { - cb(mk, mv) - - mk = m.key.New() - mv = m.value.New() - } - - return i.Err() -} - -// DumpWithCallbackIfExists is similar to DumpWithCallback, but returns earlier -// if the given map does not exist. -func (m *Map) DumpWithCallbackIfExists(cb DumpCallback) error { - found, err := m.exist() - if err != nil { - return err - } - - if found { - return m.DumpWithCallback(cb) - } - - return nil -} - -// DumpReliablyWithCallback is similar to DumpWithCallback, but performs -// additional tracking of the current and recently seen keys, so that if an -// element is removed from the underlying kernel map during the dump, the dump -// can continue from a recently seen key rather than restarting from scratch. -// In addition, it caps the maximum number of map entry iterations at 4 times -// the maximum map size. If this limit is reached, ErrMaxLookup is returned. -// -// The caller must provide a callback for handling each entry, and a stats -// object initialized via a call to NewDumpStats(). -func (m *Map) DumpReliablyWithCallback(cb DumpCallback, stats *DumpStats) error { - if cb == nil { - return errors.New("empty callback") - } - - if stats == nil { - return errors.New("stats is nil") - } - - var ( - prevKey = m.key.New() - currentKey = m.key.New() - nextKey = m.key.New() - value = m.value.New() - - prevKeyValid = false - ) - - stats.start() - defer stats.finish() - - if err := m.Open(); err != nil { - return err - } - - // Get the first map key. - if err := m.NextKey(nil, currentKey); err != nil { - stats.Lookup = 1 - if errors.Is(err, ebpf.ErrKeyNotExist) { - // Empty map, nothing to iterate. - stats.Completed = true - return nil - } - } - - // maxLookup is an upper bound limit to prevent backtracking forever - // when iterating over the map's elements (the map might be concurrently - // updated while being iterated) - maxLookup := stats.MaxEntries * 4 - - // This loop stops when all elements have been iterated (Map.NextKey() returns - // ErrKeyNotExist) OR, in order to avoid hanging if - // the map is continuously updated, when maxLookup has been reached - for stats.Lookup = 1; stats.Lookup <= maxLookup; stats.Lookup++ { - // currentKey was set by the first m.NextKey() above. We know it existed in - // the map, but it may have been deleted by a concurrent map operation. - // - // If currentKey is no longer in the map, nextKey may be the first key in - // the map again. Continue with nextKey only if we still find currentKey in - // the Lookup() after the call to m.NextKey(), this way we know nextKey is - // NOT the first key in the map and iteration hasn't reset. - nextKeyErr := m.NextKey(currentKey, nextKey) - - if err := m.m.Lookup(currentKey, value); err != nil { - stats.LookupFailed++ - // Restarting from a invalid key starts the iteration again from the beginning. - // If we have a previously found key, try to restart from there instead - if prevKeyValid { - currentKey = prevKey - // Restart from a given previous key only once, otherwise if the prevKey is - // concurrently deleted we might loop forever trying to look it up. - prevKeyValid = false - stats.KeyFallback++ - } else { - // Depending on exactly when currentKey was deleted from the - // map, nextKey may be the actual key element after the deleted - // one, or the first element in the map. - currentKey = nextKey - // To avoid having nextKey and currentKey pointing at the same memory - // we allocate a new key for nextKey. Without this currentKey and nextKey - // would be the same pointer value and would get double iterated on the next - // iterations m.NextKey(...) call. - nextKey = m.key.New() - stats.Interrupted++ - } - continue - } - - cb(currentKey, value) - - if nextKeyErr != nil { - if errors.Is(nextKeyErr, ebpf.ErrKeyNotExist) { - stats.Completed = true - return nil // end of map, we're done iterating - } - return nextKeyErr - } - - // Prepare keys to move to the next iteration. - prevKey = currentKey - currentKey = nextKey - nextKey = m.key.New() - prevKeyValid = true - } - - return ErrMaxLookup -} - -// Dump returns the map (type map[string][]string) which contains all -// data stored in BPF map. -func (m *Map) Dump(hash map[string][]string) error { - callback := func(key MapKey, value MapValue) { - // No need to deep copy since we are creating strings. - hash[key.String()] = append(hash[key.String()], value.String()) - } - - if err := m.DumpWithCallback(callback); err != nil { - return err - } - - return nil -} - -// DumpIfExists dumps the contents of the map into hash via Dump() if the map -// file exists -func (m *Map) DumpIfExists(hash map[string][]string) error { - found, err := m.exist() - if err != nil { - return err - } - - if found { - return m.Dump(hash) - } - - return nil -} - -func (m *Map) Lookup(key MapKey) (MapValue, error) { - if err := m.Open(); err != nil { - return nil, err - } - - m.lock.RLock() - defer m.lock.RUnlock() - - var duration *spanstat.SpanStat - if metrics.BPFSyscallDuration.IsEnabled() { - duration = spanstat.Start() - } - - value := m.value.New() - err := m.m.Lookup(key, value) - - if metrics.BPFSyscallDuration.IsEnabled() { - metrics.BPFSyscallDuration.WithLabelValues(metricOpLookup, metrics.Error2Outcome(err)).Observe(duration.End(err == nil).Total().Seconds()) - } - - if err != nil { - return nil, err - } - - return value, nil -} - -func (m *Map) Update(key MapKey, value MapValue) error { - var err error - - m.lock.Lock() - defer m.lock.Unlock() - - defer func() { - desiredAction := OK - if err != nil { - desiredAction = Insert - } - entry := &cacheEntry{ - Key: key, - Value: value, - DesiredAction: desiredAction, - LastError: err, - } - m.addToEventsLocked(MapUpdate, *entry) - - if m.cache == nil { - return - } - - if m.withValueCache { - if err != nil { - m.scheduleErrorResolver() - } - m.cache[key.String()] = &cacheEntry{ - Key: key, - Value: value, - DesiredAction: desiredAction, - LastError: err, - } - m.updatePressureMetric() - } else if err == nil { - m.cache[key.String()] = nil - m.updatePressureMetric() - } - }() - - if err = m.open(); err != nil { - return err - } - - err = m.m.Update(key, value, ebpf.UpdateAny) - - if metrics.BPFMapOps.IsEnabled() { - metrics.BPFMapOps.WithLabelValues(m.commonName(), metricOpUpdate, metrics.Error2Outcome(err)).Inc() - } - - if err != nil { - return fmt.Errorf("update map %s: %w", m.Name(), err) - } - - return nil -} - -// deleteMapEvent is run at every delete map event. -// If cache is enabled, it will update the cache to reflect the delete. -// As well, if event buffer is enabled, it adds a new event to the buffer. -func (m *Map) deleteMapEvent(key MapKey, err error) { - m.addToEventsLocked(MapDelete, cacheEntry{ - Key: key, - DesiredAction: Delete, - LastError: err, - }) - m.deleteCacheEntry(key, err) -} - -func (m *Map) deleteAllMapEvent() { - m.addToEventsLocked(MapDeleteAll, cacheEntry{}) -} - -// deleteCacheEntry evaluates the specified error, if nil the map key is -// removed from the cache to indicate successful deletion. If non-nil, the map -// key entry in the cache is updated to indicate deletion failure with the -// specified error. -// -// Caller must hold m.lock for writing -func (m *Map) deleteCacheEntry(key MapKey, err error) { - if m.cache == nil { - return - } - - k := key.String() - if err == nil { - delete(m.cache, k) - } else if !m.withValueCache { - return - } else { - entry, ok := m.cache[k] - if !ok { - m.cache[k] = &cacheEntry{ - Key: key, - } - entry = m.cache[k] - } - - entry.DesiredAction = Delete - entry.LastError = err - m.scheduleErrorResolver() - } -} - -// delete deletes the map entry corresponding to the given key. If ignoreMissing -// is set to true and the entry was not found, the error metric is not -// incremented for missing entries and nil error is returned. -func (m *Map) delete(key MapKey, ignoreMissing bool) (_ bool, err error) { - defer func() { - m.deleteMapEvent(key, err) - if err != nil { - m.updatePressureMetric() - } - }() - - if err = m.open(); err != nil { - return false, err - } - - var duration *spanstat.SpanStat - if metrics.BPFSyscallDuration.IsEnabled() { - duration = spanstat.Start() - } - - err = m.m.Delete(key) - - if metrics.BPFSyscallDuration.IsEnabled() { - metrics.BPFSyscallDuration.WithLabelValues(metricOpDelete, metrics.Error2Outcome(err)).Observe(duration.End(err == nil).Total().Seconds()) - } - - if errors.Is(err, ebpf.ErrKeyNotExist) && ignoreMissing { - // Error and metrics handling is skipped in case ignoreMissing is set and - // the map key did not exist. This removes false positives in the delete - // metrics and skips the deferred cleanup of nonexistent entries. This - // situation occurs at least in the context of cleanup of NAT mappings from - // CT GC. - return false, nil - } - - if metrics.BPFMapOps.IsEnabled() { - // err can be nil or any error other than ebpf.ErrKeyNotExist. - metrics.BPFMapOps.WithLabelValues(m.commonName(), metricOpDelete, metrics.Error2Outcome(err)).Inc() - } - - if err != nil { - return false, fmt.Errorf("unable to delete element %s from map %s: %w", key, m.name, err) - } - - return true, nil -} - -// SilentDelete deletes the map entry corresponding to the given key. -// If a map entry is not found this returns (false, nil). -func (m *Map) SilentDelete(key MapKey) (deleted bool, err error) { - m.lock.Lock() - defer m.lock.Unlock() - - return m.delete(key, true) -} - -// Delete deletes the map entry corresponding to the given key. -func (m *Map) Delete(key MapKey) error { - m.lock.Lock() - defer m.lock.Unlock() - - _, err := m.delete(key, false) - return err -} - -// scopedLogger returns a logger scoped for the map. m.lock must be held. -func (m *Map) scopedLogger() *logrus.Entry { - return log.WithFields(logrus.Fields{logfields.Path: m.path, "name": m.name}) -} - -// DeleteAll deletes all entries of a map by traversing the map and deleting individual -// entries. Note that if entries are added while the taversal is in progress, -// such entries may survive the deletion process. -func (m *Map) DeleteAll() error { - m.lock.Lock() - defer m.lock.Unlock() - defer m.updatePressureMetric() - scopedLog := m.scopedLogger() - scopedLog.Debug("deleting all entries in map") - - if m.withValueCache { - // Mark all entries for deletion, upon successful deletion, - // entries will be removed or the LastError will be updated - for _, entry := range m.cache { - entry.DesiredAction = Delete - entry.LastError = fmt.Errorf("deletion pending") - } - } - - if err := m.open(); err != nil { - return err - } - - mk := m.key.New() - mv := make([]byte, m.ValueSize()) - - defer m.deleteAllMapEvent() - - i := m.m.Iterate() - for i.Next(mk, &mv) { - err := m.m.Delete(mk) - - m.deleteCacheEntry(mk, err) - - if err != nil { - return err - } - } - - err := i.Err() - if err != nil { - scopedLog.WithError(err).Warningf("Unable to correlate iteration key %v with cache entry. Inconsistent cache.", mk) - } - - return err -} - -// GetModel returns a BPF map in the representation served via the API -func (m *Map) GetModel() *models.BPFMap { - m.lock.RLock() - defer m.lock.RUnlock() - - mapModel := &models.BPFMap{ - Path: m.path, - } - - if m.withValueCache { - mapModel.Cache = make([]*models.BPFMapEntry, len(m.cache)) - i := 0 - for k, entry := range m.cache { - model := &models.BPFMapEntry{ - Key: k, - DesiredAction: entry.DesiredAction.String(), - } - - if entry.LastError != nil { - model.LastError = entry.LastError.Error() - } - - if entry.Value != nil { - model.Value = entry.Value.String() - } - mapModel.Cache[i] = model - i++ - } - } - - return mapModel -} - -func (m *Map) addToEventsLocked(action Action, entry cacheEntry) { - if !m.eventsBufferEnabled { - return - } - m.events.add(&Event{ - action: action, - Timestamp: time.Now(), - cacheEntry: entry, - }) -} - -// resolveErrors is schedule by scheduleErrorResolver() and runs periodically. -// It resolves up to maxSyncErrors discrepancies between cache and BPF map in -// the kernel. -func (m *Map) resolveErrors(ctx context.Context) error { - started := time.Now() - - m.lock.Lock() - defer m.lock.Unlock() - - if m.cache == nil { - return nil - } - - if !m.outstandingErrors { - return nil - } - - outstanding := 0 - for _, e := range m.cache { - switch e.DesiredAction { - case Insert, Delete: - outstanding++ - } - } - - // Errors appear to have already been resolved. This can happen if a subsequent - // Update/Delete operation acting on the same key succeeded. - if outstanding == 0 { - m.outstandingErrors = false - return nil - } - - if err := m.open(); err != nil { - return err - } - - scopedLogger := m.scopedLogger() - scopedLogger.WithField("remaining", outstanding). - Debug("Starting periodic BPF map error resolver") - - resolved := 0 - scanned := 0 - nerr := 0 - for k, e := range m.cache { - scanned++ - - switch e.DesiredAction { - case OK: - case Insert: - // Call into ebpf-go's Map.Update() directly, don't go through the cache. - err := m.m.Update(e.Key, e.Value, ebpf.UpdateAny) - if metrics.BPFMapOps.IsEnabled() { - metrics.BPFMapOps.WithLabelValues(m.commonName(), metricOpUpdate, metrics.Error2Outcome(err)).Inc() - } - if err == nil { - e.DesiredAction = OK - e.LastError = nil - resolved++ - outstanding-- - } else { - e.LastError = err - nerr++ - } - m.cache[k] = e - m.addToEventsLocked(MapUpdate, *e) - case Delete: - // Holding lock, issue direct delete on map. - err := m.m.Delete(e.Key) - if metrics.BPFMapOps.IsEnabled() { - metrics.BPFMapOps.WithLabelValues(m.commonName(), metricOpDelete, metrics.Error2Outcome(err)).Inc() - } - if err == nil || errors.Is(err, ebpf.ErrKeyNotExist) { - delete(m.cache, k) - resolved++ - outstanding-- - } else { - e.LastError = err - nerr++ - m.cache[k] = e - } - - m.addToEventsLocked(MapDelete, *e) - } - - // bail out if maximum errors are reached to relax the map lock - if nerr > maxSyncErrors { - break - } - } - - m.updatePressureMetric() - - scopedLogger.WithFields(logrus.Fields{ - "remaining": outstanding, - "resolved": resolved, - "scanned": scanned, - "duration": time.Since(started), - }).Debug("BPF map error resolver completed") - - m.outstandingErrors = outstanding > 0 - if m.outstandingErrors { - return fmt.Errorf("%d map sync errors", outstanding) - } - - return nil -} - -// CheckAndUpgrade checks the received map's properties (for the map currently -// loaded into the kernel) against the desired properties, and if they do not -// match, deletes the map. -// -// Returns true if the map was upgraded. -func (m *Map) CheckAndUpgrade(desired *Map) bool { - flags := desired.Flags() | GetPreAllocateMapFlags(desired.Type()) - - return objCheck( - m.m, - m.path, - desired.Type(), - desired.KeySize(), - desired.ValueSize(), - desired.MaxEntries(), - flags, - ) -} - -func (m *Map) exist() (bool, error) { - path, err := m.Path() - if err != nil { - return false, err - } - - if _, err := os.Stat(path); err == nil { - return true, nil - } - - return false, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/map_register_linux.go b/vendor/github.com/cilium/cilium/pkg/bpf/map_register_linux.go deleted file mode 100644 index d0b8e3cafa2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/map_register_linux.go +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build linux - -package bpf - -import ( - "path" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/lock" -) - -var ( - mutex lock.RWMutex - mapRegister = map[string]*Map{} -) - -func registerMap(path string, m *Map) { - mutex.Lock() - mapRegister[path] = m - mutex.Unlock() - - log.WithField("path", path).Debug("Registered BPF map") -} - -func unregisterMap(path string, m *Map) { - mutex.Lock() - delete(mapRegister, path) - mutex.Unlock() - - log.WithField("path", path).Debug("Unregistered BPF map") -} - -// GetMap returns the registered map with the given name or absolute path -func GetMap(name string) *Map { - mutex.RLock() - defer mutex.RUnlock() - - if !path.IsAbs(name) { - name = MapPath(name) - } - - return mapRegister[name] -} - -// GetOpenMaps returns a slice of all open BPF maps. This is identical to -// calling GetMap() on all open maps. -func GetOpenMaps() []*models.BPFMap { - // create a copy of mapRegister so we can unlock the mutex again as - // locking Map.lock inside of the mutex is not permitted - mutex.RLock() - maps := make([]*Map, 0, len(mapRegister)) - for _, m := range mapRegister { - maps = append(maps, m) - } - mutex.RUnlock() - - mapList := make([]*models.BPFMap, len(maps)) - - i := 0 - for _, m := range maps { - mapList[i] = m.GetModel() - i++ - } - - return mapList -} diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/metrics.go b/vendor/github.com/cilium/cilium/pkg/bpf/metrics.go deleted file mode 100644 index da5e600af8f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/metrics.go +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package bpf - -const ( - metricOpCreate = "create" - metricOpUpdate = "update" - metricOpLookup = "lookup" - metricOpDelete = "delete" - metricOpGetNextKey = "getNextKey" -) diff --git a/vendor/github.com/cilium/cilium/pkg/bpf/stats_linux.go b/vendor/github.com/cilium/cilium/pkg/bpf/stats_linux.go deleted file mode 100644 index e6749b360c6..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/bpf/stats_linux.go +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build linux - -package bpf - -import ( - "github.com/cilium/cilium/pkg/time" -) - -// DumpStats tracks statistics over the dump of a map. -type DumpStats struct { - // Started is the timestamp when the gc run was started. - Started time.Time - - // Finished is the timestamp when the gc run completed. - Finished time.Time - - // Lookup is the number of key lookups performed. - Lookup uint32 - - // LookupFailed is the number of key lookups that failed. - LookupFailed uint32 - - // PrevKeyUnavailable is the number of times the previous key was not - // available. - PrevKeyUnavailable uint32 - - // KeyFallback is the number of times the current key became invalid - // while traversing and we had to fall back to the previous key. - KeyFallback uint32 - - // MaxEntries is the maximum number of entries in the gc table. - MaxEntries uint32 - - // Interrupted is the number of times the gc run was interrupted and - // had to start from scratch. - Interrupted uint32 - - // Completed is true when the gc run has been completed. - Completed bool -} - -// NewDumpStats returns a new stats structure for collecting dump statistics. -func NewDumpStats(m *Map) *DumpStats { - return &DumpStats{ - MaxEntries: m.MaxEntries(), - } -} - -// start starts the dump. -func (d *DumpStats) start() { - d.Started = time.Now() -} - -// finish finishes the dump. -func (d *DumpStats) finish() { - d.Finished = time.Now() -} - -// Duration returns the duration of the dump. -func (d *DumpStats) Duration() time.Duration { - return d.Finished.Sub(d.Started) -} diff --git a/vendor/github.com/cilium/cilium/pkg/byteorder/byteorder.go b/vendor/github.com/cilium/cilium/pkg/byteorder/byteorder.go deleted file mode 100644 index caa855d2149..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/byteorder/byteorder.go +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package byteorder - -import ( - "net" - "net/netip" -) - -// NetIPv4ToHost32 converts an net.IP to a uint32 in host byte order. ip -// must be a IPv4 address, otherwise the function will panic. -func NetIPv4ToHost32(ip net.IP) uint32 { - ipv4 := ip.To4() - _ = ipv4[3] // Assert length of ipv4. - return Native.Uint32(ipv4) -} - -func NetIPAddrToHost32(ip netip.Addr) uint32 { - ipv4 := ip.As4() - return Native.Uint32(ipv4[:]) -} diff --git a/vendor/github.com/cilium/cilium/pkg/byteorder/byteorder_bigendian.go b/vendor/github.com/cilium/cilium/pkg/byteorder/byteorder_bigendian.go deleted file mode 100644 index 7b0873f82d3..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/byteorder/byteorder_bigendian.go +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build armbe || arm64be || mips || mips64 || ppc64 - -package byteorder - -import "encoding/binary" - -var Native binary.ByteOrder = binary.BigEndian - -func HostToNetwork16(u uint16) uint16 { return u } -func HostToNetwork32(u uint32) uint32 { return u } -func HostToNetwork64(u uint64) uint64 { return u } -func NetworkToHost16(u uint16) uint16 { return u } -func NetworkToHost32(u uint32) uint32 { return u } -func NetworkToHost64(u uint64) uint64 { return u } diff --git a/vendor/github.com/cilium/cilium/pkg/byteorder/byteorder_littleendian.go b/vendor/github.com/cilium/cilium/pkg/byteorder/byteorder_littleendian.go deleted file mode 100644 index 0fffee1b247..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/byteorder/byteorder_littleendian.go +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build 386 || amd64 || arm || arm64 || mips64le || ppc64le || riscv64 || wasm - -package byteorder - -import ( - "encoding/binary" - "math/bits" -) - -var Native binary.ByteOrder = binary.LittleEndian - -func HostToNetwork16(u uint16) uint16 { return bits.ReverseBytes16(u) } -func HostToNetwork32(u uint32) uint32 { return bits.ReverseBytes32(u) } -func HostToNetwork64(u uint64) uint64 { return bits.ReverseBytes64(u) } -func NetworkToHost16(u uint16) uint16 { return bits.ReverseBytes16(u) } -func NetworkToHost32(u uint32) uint32 { return bits.ReverseBytes32(u) } -func NetworkToHost64(u uint64) uint64 { return bits.ReverseBytes64(u) } diff --git a/vendor/github.com/cilium/cilium/pkg/byteorder/doc.go b/vendor/github.com/cilium/cilium/pkg/byteorder/doc.go deleted file mode 100644 index 1c2497c7589..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/byteorder/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package byteorder provides functions to convert from and to network byte order. -package byteorder diff --git a/vendor/github.com/cilium/cilium/pkg/client/client.go b/vendor/github.com/cilium/cilium/pkg/client/client.go deleted file mode 100644 index c24b9d9e60d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/client/client.go +++ /dev/null @@ -1,822 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "context" - "errors" - "fmt" - "io" - "net" - "net/http" - "net/url" - "os" - "sort" - "strings" - "text/tabwriter" - "time" - - runtime_client "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - clientapi "github.com/cilium/cilium/api/v1/client" - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/defaults" -) - -type Client struct { - clientapi.CiliumAPI -} - -// DefaultSockPath returns default UNIX domain socket path or -// path set using CILIUM_SOCK env variable -func DefaultSockPath() string { - // Check if environment variable points to socket - e := os.Getenv(defaults.SockPathEnv) - if e == "" { - // If unset, fall back to default value - e = defaults.SockPath - } - return "unix://" + e - -} - -func configureTransport(tr *http.Transport, proto, addr string) *http.Transport { - if tr == nil { - tr = &http.Transport{} - } - - if proto == "unix" { - // No need for compression in local communications. - tr.DisableCompression = true - tr.DialContext = func(_ context.Context, _, _ string) (net.Conn, error) { - return net.Dial(proto, addr) - } - } else { - tr.Proxy = http.ProxyFromEnvironment - tr.DialContext = (&net.Dialer{}).DialContext - } - - return tr -} - -// NewDefaultClient creates a client with default parameters connecting to UNIX domain socket. -func NewDefaultClient() (*Client, error) { - return NewClient("") -} - -// NewDefaultClientWithTimeout creates a client with default parameters connecting to UNIX -// domain socket and waits for cilium-agent availability. -func NewDefaultClientWithTimeout(timeout time.Duration) (*Client, error) { - timeoutAfter := time.After(timeout) - var c *Client - var err error - for { - select { - case <-timeoutAfter: - return nil, fmt.Errorf("failed to create cilium agent client after %f seconds timeout: %w", timeout.Seconds(), err) - default: - } - - c, err = NewDefaultClient() - if err != nil { - time.Sleep(500 * time.Millisecond) - continue - } - - for { - select { - case <-timeoutAfter: - return nil, fmt.Errorf("failed to create cilium agent client after %f seconds timeout: %w", timeout.Seconds(), err) - default: - } - // This is an API call that we do to the cilium-agent to check - // if it is up and running. - _, err = c.Daemon.GetConfig(nil) - if err != nil { - time.Sleep(500 * time.Millisecond) - continue - } - return c, nil - } - } -} - -// NewClient creates a client for the given `host`. -// If host is nil then use SockPath provided by CILIUM_SOCK -// or the cilium default SockPath -func NewClient(host string) (*Client, error) { - clientTrans, err := NewRuntime(WithHost(host)) - return &Client{*clientapi.New(clientTrans, strfmt.Default)}, err -} - -type runtimeOptions struct { - host string - basePath string -} - -func WithHost(host string) func(options *runtimeOptions) { - return func(options *runtimeOptions) { - options.host = host - } -} - -func WithBasePath(basePath string) func(options *runtimeOptions) { - return func(options *runtimeOptions) { - options.basePath = basePath - } -} - -func NewRuntime(opts ...func(options *runtimeOptions)) (*runtime_client.Runtime, error) { - r := runtimeOptions{} - for _, opt := range opts { - opt(&r) - } - - host := r.host - if host == "" { - host = DefaultSockPath() - } - basePath := r.basePath - if basePath == "" { - basePath = clientapi.DefaultBasePath - } - - tmp := strings.SplitN(host, "://", 2) - if len(tmp) != 2 { - return nil, fmt.Errorf("invalid host format '%s'", host) - } - - hostHeader := tmp[1] - - switch tmp[0] { - case "tcp": - if _, err := url.Parse("tcp://" + tmp[1]); err != nil { - return nil, err - } - host = "http://" + tmp[1] - case "unix": - host = tmp[1] - // For local communication (unix domain sockets), the hostname is not used. Leave - // Host header empty because otherwise it would be rejected by net/http client-side - // sanitization, see https://go.dev/issue/60374. - hostHeader = "localhost" - } - - transport := configureTransport(nil, tmp[0], host) - httpClient := &http.Client{Transport: transport} - clientTrans := runtime_client.NewWithClient(hostHeader, basePath, - clientapi.DefaultSchemes, httpClient) - return clientTrans, nil -} - -// Hint tries to improve the error message displayed to the user. -func Hint(err error) error { - if err == nil { - return err - } - - if errors.Is(err, context.DeadlineExceeded) { - return fmt.Errorf("Cilium API client timeout exceeded") - } - - e, _ := url.PathUnescape(err.Error()) - if strings.Contains(err.Error(), defaults.SockPath) { - return fmt.Errorf("%s\nIs the agent running?", e) - } - return fmt.Errorf("%s", e) -} - -func timeSince(since time.Time) string { - out := "never" - if !since.IsZero() { - t := time.Since(since) - out = t.Truncate(time.Second).String() + " ago" - } - - return out -} - -func stateUnhealthy(state string) bool { - return state == models.StatusStateWarning || - state == models.StatusStateFailure -} - -func statusUnhealthy(s *models.Status) bool { - if s != nil { - return stateUnhealthy(s.State) - } - return false -} - -// FormatStatusResponseBrief writes a one-line status to the writer. If -// everything ok, this is "ok", otherwise a message of the form "error in ..." -func FormatStatusResponseBrief(w io.Writer, sr *models.StatusResponse) { - msg := "" - - switch { - case statusUnhealthy(sr.Kvstore): - msg = fmt.Sprintf("kvstore: %s", sr.Kvstore.Msg) - case statusUnhealthy(sr.ContainerRuntime): - msg = fmt.Sprintf("container runtime: %s", sr.ContainerRuntime.Msg) - case sr.Kubernetes != nil && stateUnhealthy(sr.Kubernetes.State): - msg = fmt.Sprintf("kubernetes: %s", sr.Kubernetes.Msg) - case statusUnhealthy(sr.Cilium): - msg = fmt.Sprintf("cilium: %s", sr.Cilium.Msg) - case sr.Cluster != nil && statusUnhealthy(sr.Cluster.CiliumHealth): - msg = fmt.Sprintf("cilium-health: %s", sr.Cluster.CiliumHealth.Msg) - } - - // Only bother looking at controller failures if everything else is ok - if msg == "" { - for _, ctrl := range sr.Controllers { - if ctrl.Status == nil { - continue - } - if ctrl.Status.LastFailureMsg != "" { - msg = fmt.Sprintf("controller %s: %s", - ctrl.Name, ctrl.Status.LastFailureMsg) - break - } - } - } - - if msg == "" { - fmt.Fprintf(w, "OK\n") - } else { - fmt.Fprintf(w, "error in %s\n", msg) - } -} - -func clusterReadiness(cluster *models.RemoteCluster) string { - if !cluster.Ready { - return "not-ready" - } - return "ready" -} - -func NumReadyClusters(clusters []*models.RemoteCluster) int { - numReady := 0 - for _, cluster := range clusters { - if cluster.Ready { - numReady++ - } - } - return numReady -} - -type StatusDetails struct { - // AllAddress causes all addresses to be printed by FormatStatusResponse. - AllAddresses bool - // AllControllers causes all controllers to be printed by FormatStatusResponse. - AllControllers bool - // AllNodes causes all nodes to be printed by FormatStatusResponse. - AllNodes bool - // AllRedirects causes all redirects to be printed by FormatStatusResponse. - AllRedirects bool - // AllClusters causes all clusters to be printed by FormatStatusResponse. - AllClusters bool - // BPFMapDetails causes BPF map details to be printed by FormatStatusResponse. - BPFMapDetails bool - // KubeProxyReplacementDetails causes BPF kube-proxy details to be printed by FormatStatusResponse. - KubeProxyReplacementDetails bool - // ClockSourceDetails causes BPF time-keeping internals to be printed by FormatStatusResponse. - ClockSourceDetails bool -} - -var ( - // StatusAllDetails causes no additional status details to be printed by - // FormatStatusResponse. - StatusNoDetails = StatusDetails{} - // StatusAllDetails causes all status details to be printed by FormatStatusResponse. - StatusAllDetails = StatusDetails{ - AllAddresses: true, - AllControllers: true, - AllNodes: true, - AllRedirects: true, - AllClusters: true, - BPFMapDetails: true, - KubeProxyReplacementDetails: true, - ClockSourceDetails: true, - } -) - -// FormatStatusResponse writes a StatusResponse as a string to the writer. The bit mask sd controls -// whether a additional details are printed about a certain aspect of the status. In case there are -// errors, some details may be printed regardless of the value of sd. -func FormatStatusResponse(w io.Writer, sr *models.StatusResponse, sd StatusDetails) { - if sr.Kvstore != nil { - fmt.Fprintf(w, "KVStore:\t%s\t%s\n", sr.Kvstore.State, sr.Kvstore.Msg) - } - if sr.ContainerRuntime != nil { - fmt.Fprintf(w, "ContainerRuntime:\t%s\t%s\n", - sr.ContainerRuntime.State, sr.ContainerRuntime.Msg) - } - - kubeProxyDevices := "" - if sr.Kubernetes != nil { - fmt.Fprintf(w, "Kubernetes:\t%s\t%s\n", sr.Kubernetes.State, sr.Kubernetes.Msg) - if sr.Kubernetes.State != models.K8sStatusStateDisabled { - sort.Strings(sr.Kubernetes.K8sAPIVersions) - fmt.Fprintf(w, "Kubernetes APIs:\t[\"%s\"]\n", strings.Join(sr.Kubernetes.K8sAPIVersions, "\", \"")) - } - - } - if sr.KubeProxyReplacement != nil { - devices := "" - if sr.KubeProxyReplacement.Mode != models.KubeProxyReplacementModeDisabled { - for i, dev := range sr.KubeProxyReplacement.DeviceList { - kubeProxyDevices += fmt.Sprintf("%s %s", dev.Name, strings.Join(dev.IP, " ")) - if dev.Name == sr.KubeProxyReplacement.DirectRoutingDevice { - kubeProxyDevices += " (Direct Routing)" - } - if i+1 != len(sr.KubeProxyReplacement.Devices) { - kubeProxyDevices += ", " - } - } - if len(sr.KubeProxyReplacement.DeviceList) > 0 { - devices = "[" + kubeProxyDevices + "]" - } - } - fmt.Fprintf(w, "KubeProxyReplacement:\t%s\t%s\n", - sr.KubeProxyReplacement.Mode, devices) - } - if sr.HostFirewall != nil { - fmt.Fprintf(w, "Host firewall:\t%s", sr.HostFirewall.Mode) - if sr.HostFirewall.Mode != models.HostFirewallModeDisabled { - fmt.Fprintf(w, "\t[%s]", strings.Join(sr.HostFirewall.Devices, ", ")) - } - fmt.Fprintf(w, "\n") - } - - if sr.Srv6 != nil { - var fields []string - - status := "Disabled" - fields = append(fields, status) - - if sr.Srv6.Enabled { - fields[0] = "Enabled" - fields = append(fields, fmt.Sprintf("[encap-mode: %s]", sr.Srv6.Srv6EncapMode)) - } - - fmt.Fprintf(w, "SRv6:\t%s\n", strings.Join(fields, "\t")) - } - - if sr.CniChaining != nil { - fmt.Fprintf(w, "CNI Chaining:\t%s\n", sr.CniChaining.Mode) - } - - if sr.CniFile != nil { - fmt.Fprintf(w, "CNI Config file:\t%s\n", sr.CniFile.Msg) - } - - if sr.Cilium != nil { - fmt.Fprintf(w, "Cilium:\t%s %s\n", sr.Cilium.State, sr.Cilium.Msg) - } - - if sr.Stale != nil { - sortedProbes := make([]string, 0, len(sr.Stale)) - for probe := range sr.Stale { - sortedProbes = append(sortedProbes, probe) - } - sort.Strings(sortedProbes) - - stalesStr := make([]string, 0, len(sr.Stale)) - for _, probe := range sortedProbes { - stalesStr = append(stalesStr, fmt.Sprintf("%q since %s", probe, sr.Stale[probe])) - } - - fmt.Fprintf(w, "Stale status:\t%s\n", strings.Join(stalesStr, ", ")) - } - - if nm := sr.NodeMonitor; nm != nil { - fmt.Fprintf(w, "NodeMonitor:\tListening for events on %d CPUs with %dx%d of shared memory\n", - nm.Cpus, nm.Npages, nm.Pagesize) - if nm.Lost != 0 || nm.Unknown != 0 { - fmt.Fprintf(w, "\t%d events lost, %d unknown notifications\n", nm.Lost, nm.Unknown) - } - } else { - fmt.Fprintf(w, "NodeMonitor:\tDisabled\n") - } - - if sr.Cluster != nil { - if sr.Cluster.CiliumHealth != nil { - ch := sr.Cluster.CiliumHealth - fmt.Fprintf(w, "Cilium health daemon:\t%s\t%s\n", ch.State, ch.Msg) - } - } - - if sr.Ipam != nil { - fmt.Fprintf(w, "IPAM:\t%s\n", sr.Ipam.Status) - if sd.AllAddresses { - fmt.Fprintf(w, "Allocated addresses:\n") - out := make([]string, 0, len(sr.Ipam.Allocations)) - for ip, owner := range sr.Ipam.Allocations { - out = append(out, fmt.Sprintf(" %s (%s)", ip, owner)) - } - sort.Strings(out) - for _, line := range out { - fmt.Fprintln(w, line) - } - } - } - - if sr.ClusterMesh != nil { - fmt.Fprintf(w, "ClusterMesh:\t%d/%d remote clusters ready, %d global-services\n", - NumReadyClusters(sr.ClusterMesh.Clusters), len(sr.ClusterMesh.Clusters), sr.ClusterMesh.NumGlobalServices) - - verbosity := RemoteClustersStatusNotReadyOnly - if sd.AllClusters { - verbosity = RemoteClustersStatusVerbose - } - - FormatStatusResponseRemoteClusters(w, sr.ClusterMesh.Clusters, verbosity) - } - - if sr.IPV4BigTCP != nil { - status := "Disabled" - if sr.IPV4BigTCP.Enabled { - max := fmt.Sprintf("[%d]", sr.IPV4BigTCP.MaxGSO) - if sr.IPV4BigTCP.MaxGRO != sr.IPV4BigTCP.MaxGSO { - max = fmt.Sprintf("[%d, %d]", sr.IPV4BigTCP.MaxGRO, sr.IPV4BigTCP.MaxGSO) - } - status = fmt.Sprintf("Enabled\t%s", max) - } - fmt.Fprintf(w, "IPv4 BIG TCP:\t%s\n", status) - } - - if sr.IPV6BigTCP != nil { - status := "Disabled" - if sr.IPV6BigTCP.Enabled { - max := fmt.Sprintf("[%d]", sr.IPV6BigTCP.MaxGSO) - if sr.IPV6BigTCP.MaxGRO != sr.IPV6BigTCP.MaxGSO { - max = fmt.Sprintf("[%d, %d]", sr.IPV6BigTCP.MaxGRO, sr.IPV6BigTCP.MaxGSO) - } - status = fmt.Sprintf("Enabled\t%s", max) - } - fmt.Fprintf(w, "IPv6 BIG TCP:\t%s\n", status) - } - - if sr.BandwidthManager != nil { - var status string - if !sr.BandwidthManager.Enabled { - status = "Disabled" - } else { - status = fmt.Sprintf("EDT with BPF [%s] [%s]", - strings.ToUpper(sr.BandwidthManager.CongestionControl), - strings.Join(sr.BandwidthManager.Devices, ", ")) - } - fmt.Fprintf(w, "BandwidthManager:\t%s\n", status) - } - - if sr.HostRouting != nil { - fmt.Fprintf(w, "Host Routing:\t%s\n", sr.HostRouting.Mode) - } - - if sr.Masquerading != nil { - var status string - - enabled := func(enabled bool) string { - if enabled { - return "Enabled" - } - return "Disabled" - } - - if sr.Masquerading.EnabledProtocols == nil { - status = enabled(sr.Masquerading.Enabled) - } else if !sr.Masquerading.EnabledProtocols.IPV4 && !sr.Masquerading.EnabledProtocols.IPV6 { - status = enabled(false) - } else { - if sr.Masquerading.Mode == models.MasqueradingModeBPF { - if sr.Masquerading.IPMasqAgent { - status = "BPF (ip-masq-agent)" - } else { - status = "BPF" - } - if sr.KubeProxyReplacement != nil { - // When BPF Masquerading is enabled we don't do any masquerading for IPv6 - // traffic so no SNAT Exclusion IPv6 CIDR is listed in status output. - devStr := "" - for i, dev := range sr.KubeProxyReplacement.DeviceList { - devStr += dev.Name - if i+1 != len(sr.KubeProxyReplacement.DeviceList) { - devStr += ", " - } - } - status += fmt.Sprintf("\t[%s]\t%s", - devStr, - sr.Masquerading.SnatExclusionCidrV4) - } - - } else if sr.Masquerading.Mode == models.MasqueradingModeIptables { - status = "IPTables" - } - - status = fmt.Sprintf("%s [IPv4: %s, IPv6: %s]", status, - enabled(sr.Masquerading.EnabledProtocols.IPV4), enabled(sr.Masquerading.EnabledProtocols.IPV6)) - } - fmt.Fprintf(w, "Masquerading:\t%s\n", status) - } - - if sd.ClockSourceDetails && sr.ClockSource != nil { - status := sr.ClockSource.Mode - if sr.ClockSource.Mode == models.ClockSourceModeJiffies { - status = fmt.Sprintf("%s\t[%d Hz]", - sr.ClockSource.Mode, sr.ClockSource.Hertz) - } - fmt.Fprintf(w, "Clock Source for BPF:\t%s\n", status) - } - - if sr.Controllers != nil { - nFailing, out := 0, []string{" Name\tLast success\tLast error\tCount\tMessage\n"} - for _, ctrl := range sr.Controllers { - status := ctrl.Status - if status == nil { - continue - } - - if status.ConsecutiveFailureCount > 0 { - nFailing++ - } else if !sd.AllControllers { - continue - } - - failSince := timeSince(time.Time(status.LastFailureTimestamp)) - successSince := timeSince(time.Time(status.LastSuccessTimestamp)) - - err := "no error" - if status.LastFailureMsg != "" { - err = status.LastFailureMsg - } - - out = append(out, fmt.Sprintf(" %s\t%s\t%s\t%d\t%s\t\n", - ctrl.Name, successSince, failSince, status.ConsecutiveFailureCount, err)) - } - - nOK := len(sr.Controllers) - nFailing - fmt.Fprintf(w, "Controller Status:\t%d/%d healthy\n", nOK, len(sr.Controllers)) - if len(out) > 1 { - tab := tabwriter.NewWriter(w, 0, 0, 3, ' ', 0) - sort.Strings(out) - for _, s := range out { - fmt.Fprint(tab, s) - } - tab.Flush() - } - - } - - if sr.Proxy != nil { - fmt.Fprintf(w, "Proxy Status:\tOK, ip %s, %d redirects active on ports %s, Envoy: %s\n", - sr.Proxy.IP, sr.Proxy.TotalRedirects, sr.Proxy.PortRange, sr.Proxy.EnvoyDeploymentMode) - if sd.AllRedirects && sr.Proxy.TotalRedirects > 0 { - out := make([]string, 0, len(sr.Proxy.Redirects)+1) - for _, r := range sr.Proxy.Redirects { - out = append(out, fmt.Sprintf(" %s\t%s\t%d\n", r.Proxy, r.Name, r.ProxyPort)) - } - tab := tabwriter.NewWriter(w, 0, 0, 3, ' ', 0) - fmt.Fprint(tab, " Protocol\tRedirect\tProxy Port\n") - sort.Strings(out) - for _, s := range out { - fmt.Fprint(tab, s) - } - tab.Flush() - } - } else { - fmt.Fprintf(w, "Proxy Status:\tNo managed proxy redirect\n") - } - - if sr.IdentityRange != nil { - fmt.Fprintf(w, "Global Identity Range:\tmin %d, max %d\n", - sr.IdentityRange.MinIdentity, sr.IdentityRange.MaxIdentity) - } else { - fmt.Fprintf(w, "Global Identity Range:\tUnknown\n") - } - - if sr.Hubble != nil { - var fields []string - - state := sr.Hubble.State - if sr.Hubble.Msg != "" { - state = fmt.Sprintf("%s %s", state, sr.Hubble.Msg) - } - fields = append(fields, state) - - if o := sr.Hubble.Observer; o != nil { - var observer []string - - if o.MaxFlows > 0 { - observer = append(observer, fmt.Sprintf("Current/Max Flows: %d/%d (%.2f%%)", - o.CurrentFlows, o.MaxFlows, (float64(o.CurrentFlows)/float64(o.MaxFlows))*100)) - } - if o.Uptime > 0 { - observer = append(observer, fmt.Sprintf("Flows/s: %.2f", - float64(o.SeenFlows)/time.Duration(o.Uptime).Seconds())) - } - - fields = append(fields, strings.Join(observer, ", ")) - } - - if sr.Hubble.Metrics != nil { - fields = append(fields, fmt.Sprintf("Metrics: %s", sr.Hubble.Metrics.State)) - } - - fmt.Fprintf(w, "Hubble:\t%s\n", strings.Join(fields, "\t")) - } - - if sd.KubeProxyReplacementDetails && sr.Kubernetes != nil && sr.KubeProxyReplacement != nil { - var selection, mode, dsrMode, xdp string - - lb := "Disabled" - cIP := "Enabled" - nPort := "Disabled" - if np := sr.KubeProxyReplacement.Features.NodePort; np.Enabled { - selection = np.Algorithm - if selection == models.KubeProxyReplacementFeaturesNodePortAlgorithmMaglev { - selection = fmt.Sprintf("%s (Table Size: %d)", np.Algorithm, np.LutSize) - } - xdp = np.Acceleration - mode = np.Mode - if mode == models.KubeProxyReplacementFeaturesNodePortModeDSR || - mode == models.KubeProxyReplacementFeaturesNodePortModeHybrid { - dsrMode = np.DsrMode - } - nPort = fmt.Sprintf("Enabled (Range: %d-%d)", np.PortMin, np.PortMax) - lb = "Enabled" - } - - affinity := "Disabled" - if sr.KubeProxyReplacement.Features.SessionAffinity.Enabled { - affinity = "Enabled" - } - - hPort := "Disabled" - if sr.KubeProxyReplacement.Features.HostPort.Enabled { - hPort = "Enabled" - } - - eIP := "Disabled" - if sr.KubeProxyReplacement.Features.ExternalIPs.Enabled { - eIP = "Enabled" - } - - socketLB := "Disabled" - if slb := sr.KubeProxyReplacement.Features.SocketLB; slb.Enabled { - socketLB = "Enabled" - } - - socketLBTracing := "Disabled" - if st := sr.KubeProxyReplacement.Features.SocketLBTracing; st.Enabled { - socketLBTracing = "Enabled" - } - - socketLBCoverage := "Full" - if sr.KubeProxyReplacement.Features.BpfSocketLBHostnsOnly { - socketLBCoverage = "Hostns-only" - } - - gracefulTerm := "Disabled" - if sr.KubeProxyReplacement.Features.GracefulTermination.Enabled { - gracefulTerm = "Enabled" - } - - nat46X64 := "Disabled" - nat46X64GW := "Disabled" - nat46X64SVC := "Disabled" - prefixes := "" - if sr.KubeProxyReplacement.Features.Nat46X64.Enabled { - nat46X64 = "Enabled" - if svc := sr.KubeProxyReplacement.Features.Nat46X64.Service; svc.Enabled { - nat46X64SVC = "Enabled" - } - if gw := sr.KubeProxyReplacement.Features.Nat46X64.Gateway; gw.Enabled { - nat46X64GW = "Enabled" - prefixes = strings.Join(gw.Prefixes, ", ") - } - } - - fmt.Fprintf(w, "KubeProxyReplacement Details:\n") - tab := tabwriter.NewWriter(w, 0, 0, 3, ' ', 0) - fmt.Fprintf(tab, " Status:\t%s\n", sr.KubeProxyReplacement.Mode) - fmt.Fprintf(tab, " Socket LB:\t%s\n", socketLB) - fmt.Fprintf(tab, " Socket LB Tracing:\t%s\n", socketLBTracing) - fmt.Fprintf(tab, " Socket LB Coverage:\t%s\n", socketLBCoverage) - if kubeProxyDevices != "" { - fmt.Fprintf(tab, " Devices:\t%s\n", kubeProxyDevices) - } - if mode != "" { - fmt.Fprintf(tab, " Mode:\t%s\n", mode) - } - if dsrMode != "" { - fmt.Fprintf(tab, " DSR Dispatch Mode:\t%s\n", dsrMode) - } - if selection != "" { - fmt.Fprintf(tab, " Backend Selection:\t%s\n", selection) - } - fmt.Fprintf(tab, " Session Affinity:\t%s\n", affinity) - fmt.Fprintf(tab, " Graceful Termination:\t%s\n", gracefulTerm) - if nat46X64 == "Disabled" { - fmt.Fprintf(tab, " NAT46/64 Support:\t%s\n", nat46X64) - } else { - fmt.Fprintf(tab, " NAT46/64 Support:\n") - fmt.Fprintf(tab, " - Services:\t%s\n", nat46X64SVC) - fmt.Fprintf(tab, " - Gateway:\t%s\n", nat46X64GW) - if nat46X64GW == "Enabled" && prefixes != "" { - fmt.Fprintf(tab, " Prefixes:\t%s\n", prefixes) - } - } - if xdp != "" { - fmt.Fprintf(tab, " XDP Acceleration:\t%s\n", xdp) - } - fmt.Fprintf(tab, " Services:\n") - fmt.Fprintf(tab, " - ClusterIP:\t%s\n", cIP) - fmt.Fprintf(tab, " - NodePort:\t%s \n", nPort) - fmt.Fprintf(tab, " - LoadBalancer:\t%s \n", lb) - fmt.Fprintf(tab, " - externalIPs:\t%s \n", eIP) - fmt.Fprintf(tab, " - HostPort:\t%s\n", hPort) - tab.Flush() - } - - if sd.BPFMapDetails && sr.BpfMaps != nil { - dynamicSizingStatus := "off" - ratio := sr.BpfMaps.DynamicSizeRatio - if 0.0 < ratio && ratio <= 1.0 { - dynamicSizingStatus = fmt.Sprintf("on (ratio: %f)", ratio) - } - fmt.Fprintf(w, "BPF Maps:\tdynamic sizing: %s\n", dynamicSizingStatus) - tab := tabwriter.NewWriter(w, 0, 0, 3, ' ', 0) - fmt.Fprintf(tab, " Name\tSize\n") - for _, m := range sr.BpfMaps.Maps { - fmt.Fprintf(tab, " %s\t%d\n", m.Name, m.Size) - } - tab.Flush() - } - - if sr.Encryption != nil { - var fields []string - - if sr.Encryption.Msg != "" { - fields = append(fields, sr.Encryption.Msg) - } else if wg := sr.Encryption.Wireguard; wg != nil { - fields = append(fields, fmt.Sprintf("[NodeEncryption: %s", wg.NodeEncryption)) - ifaces := make([]string, 0, len(wg.Interfaces)) - for _, i := range wg.Interfaces { - iface := fmt.Sprintf("%s (Pubkey: %s, Port: %d, Peers: %d)", - i.Name, i.PublicKey, i.ListenPort, i.PeerCount) - ifaces = append(ifaces, iface) - } - fields = append(fields, fmt.Sprintf("%s]", strings.Join(ifaces, ", "))) - } - - fmt.Fprintf(w, "Encryption:\t%s\t%s\n", sr.Encryption.Mode, strings.Join(fields, ", ")) - } -} - -// RemoteClustersStatusVerbosity specifies the verbosity when formatting the remote clusters status information. -type RemoteClustersStatusVerbosity uint - -const ( - // RemoteClustersStatusVerbose outputs all remote clusters information. - RemoteClustersStatusVerbose RemoteClustersStatusVerbosity = iota - // RemoteClustersStatusBrief outputs a one-line summary only for ready clusters. - RemoteClustersStatusBrief - // RemoteClustersStatusNotReadyOnly outputs the remote clusters information for non-ready clusters only. - RemoteClustersStatusNotReadyOnly -) - -func FormatStatusResponseRemoteClusters(w io.Writer, clusters []*models.RemoteCluster, verbosity RemoteClustersStatusVerbosity) { - for _, cluster := range clusters { - if verbosity != RemoteClustersStatusNotReadyOnly || !cluster.Ready { - fmt.Fprintf(w, " %s: %s, %d nodes, %d endpoints, %d identities, %d services, %d reconnections (last: %s)\n", - cluster.Name, clusterReadiness(cluster), cluster.NumNodes, - cluster.NumEndpoints, cluster.NumIdentities, cluster.NumSharedServices, - cluster.NumFailures, timeSince(time.Time(cluster.LastFailure))) - - if verbosity == RemoteClustersStatusBrief && cluster.Ready { - continue - } - - fmt.Fprintf(w, " └ %s\n", cluster.Status) - - fmt.Fprint(w, " └ remote configuration: ") - if cluster.Config != nil { - fmt.Fprintf(w, "expected=%t, retrieved=%t", cluster.Config.Required, cluster.Config.Retrieved) - if cluster.Config.Retrieved { - fmt.Fprintf(w, ", cluster-id=%d, kvstoremesh=%t, sync-canaries=%t", - cluster.Config.ClusterID, cluster.Config.Kvstoremesh, cluster.Config.SyncCanaries) - } - } else { - fmt.Fprint(w, "expected=unknown, retrieved=unknown") - } - fmt.Fprint(w, "\n") - - if cluster.Synced != nil { - fmt.Fprintf(w, " └ synchronization status: nodes=%v, endpoints=%v, identities=%v, services=%v\n", - cluster.Synced.Nodes, cluster.Synced.Endpoints, cluster.Synced.Identities, cluster.Synced.Services) - } - } - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/client/config.go b/vendor/github.com/cilium/cilium/pkg/client/config.go deleted file mode 100644 index 3775abe2ee0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/client/config.go +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "github.com/cilium/cilium/api/v1/client/daemon" - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/api" -) - -// ConfigGet returns a daemon configuration. -func (c *Client) ConfigGet() (*models.DaemonConfiguration, error) { - resp, err := c.Daemon.GetConfig(nil) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// ConfigPatch modifies the daemon configuration. -func (c *Client) ConfigPatch(cfg models.DaemonConfigurationSpec) error { - fullCfg, err := c.ConfigGet() - if err != nil { - return err - } - - for opt, value := range cfg.Options { - fullCfg.Spec.Options[opt] = value - } - if cfg.PolicyEnforcement != "" { - fullCfg.Spec.PolicyEnforcement = cfg.PolicyEnforcement - } - - params := daemon.NewPatchConfigParams().WithConfiguration(fullCfg.Spec).WithTimeout(api.ClientTimeout) - _, err = c.Daemon.PatchConfig(params) - return Hint(err) -} diff --git a/vendor/github.com/cilium/cilium/pkg/client/endpoint.go b/vendor/github.com/cilium/cilium/pkg/client/endpoint.go deleted file mode 100644 index d412cf91c65..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/client/endpoint.go +++ /dev/null @@ -1,148 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "github.com/cilium/cilium/api/v1/client/endpoint" - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/api" - pkgEndpointID "github.com/cilium/cilium/pkg/endpoint/id" - "github.com/cilium/cilium/pkg/labels" -) - -// EndpointList returns a list of all endpoints -func (c *Client) EndpointList() ([]*models.Endpoint, error) { - resp, err := c.Endpoint.GetEndpoint(nil) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// EndpointDeleteMany deletes multiple endpoints -func (c *Client) EndpointDeleteMany(req *models.EndpointBatchDeleteRequest) error { - params := endpoint.NewDeleteEndpointParams().WithEndpoint(req).WithTimeout(api.ClientTimeout) - _, _, err := c.Endpoint.DeleteEndpoint(params) - return Hint(err) -} - -// EndpointGet returns endpoint by ID -func (c *Client) EndpointGet(id string) (*models.Endpoint, error) { - params := endpoint.NewGetEndpointIDParams().WithID(id).WithTimeout(api.ClientTimeout) - resp, err := c.Endpoint.GetEndpointID(params) - if err != nil { - /* Since plugins rely on checking the error type, we don't wrap this - * with Hint(...) - */ - return nil, err - } - return resp.Payload, nil -} - -// EndpointCreate creates a new endpoint -func (c *Client) EndpointCreate(ep *models.EndpointChangeRequest) error { - id := pkgEndpointID.NewCiliumID(ep.ID) - params := endpoint.NewPutEndpointIDParams().WithID(id).WithEndpoint(ep).WithTimeout(api.ClientTimeout) - _, err := c.Endpoint.PutEndpointID(params) - return Hint(err) -} - -// EndpointPatch modifies the endpoint -func (c *Client) EndpointPatch(id string, ep *models.EndpointChangeRequest) error { - params := endpoint.NewPatchEndpointIDParams().WithID(id).WithEndpoint(ep).WithTimeout(api.ClientTimeout) - _, err := c.Endpoint.PatchEndpointID(params) - return Hint(err) -} - -// EndpointDelete deletes endpoint -func (c *Client) EndpointDelete(id string) error { - params := endpoint.NewDeleteEndpointIDParams().WithID(id).WithTimeout(api.ClientTimeout) - _, _, err := c.Endpoint.DeleteEndpointID(params) - return Hint(err) -} - -// EndpointLogGet returns endpoint log -func (c *Client) EndpointLogGet(id string) (models.EndpointStatusLog, error) { - params := endpoint.NewGetEndpointIDLogParams().WithID(id).WithTimeout(api.ClientTimeout) - resp, err := c.Endpoint.GetEndpointIDLog(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// EndpointHealthGet returns endpoint healthz -func (c *Client) EndpointHealthGet(id string) (*models.EndpointHealth, error) { - params := endpoint.NewGetEndpointIDHealthzParams().WithID(id).WithTimeout(api.ClientTimeout) - resp, err := c.Endpoint.GetEndpointIDHealthz(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// EndpointConfigGet returns endpoint configuration -func (c *Client) EndpointConfigGet(id string) (*models.EndpointConfigurationStatus, error) { - params := endpoint.NewGetEndpointIDConfigParams().WithID(id).WithTimeout(api.ClientTimeout) - resp, err := c.Endpoint.GetEndpointIDConfig(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// EndpointConfigPatch modifies endpoint configuration -func (c *Client) EndpointConfigPatch(id string, cfg *models.EndpointConfigurationSpec) error { - params := endpoint.NewPatchEndpointIDConfigParams().WithID(id).WithTimeout(api.ClientTimeout) - if cfg != nil { - params.SetEndpointConfiguration(cfg) - } - - _, err := c.Endpoint.PatchEndpointIDConfig(params) - return Hint(err) -} - -// EndpointLabelsGet returns endpoint label configuration -func (c *Client) EndpointLabelsGet(id string) (*models.LabelConfiguration, error) { - params := endpoint.NewGetEndpointIDLabelsParams().WithID(id).WithTimeout(api.ClientTimeout) - resp, err := c.Endpoint.GetEndpointIDLabels(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// EndpointLabelsPut modifies endpoint label configuration -// add: List of labels to add and enable. If the label is an orchestration -// system label which has been disabled before, it will be removed from -// the disabled list and readded to the orchestration list. Otherwise -// it will be added to the custom label list. -// -// delete: List of labels to delete. If the label is an orchestration system -// label, then it will be deleted from the orchestration list and -// added to the disabled list. Otherwise it will be removed from the -// custom list. -func (c *Client) EndpointLabelsPatch(id string, toAdd, toDelete models.Labels) error { - currentCfg, err := c.EndpointLabelsGet(id) - if err != nil { - return err - } - - userLbl := labels.NewLabelsFromModel(currentCfg.Status.Realized.User) - for _, lbl := range toAdd { - lblParsed := labels.ParseLabel(lbl) - if _, found := userLbl[lblParsed.Key]; !found { - userLbl[lblParsed.Key] = lblParsed - } - } - for _, lbl := range toDelete { - lblParsed := labels.ParseLabel(lbl) - delete(userLbl, lblParsed.Key) - } - currentCfg.Spec.User = userLbl.GetModel() - - params := endpoint.NewPatchEndpointIDLabelsParams().WithID(id).WithTimeout(api.ClientTimeout) - _, err = c.Endpoint.PatchEndpointIDLabels(params.WithConfiguration(currentCfg.Spec)) - return Hint(err) -} diff --git a/vendor/github.com/cilium/cilium/pkg/client/identity.go b/vendor/github.com/cilium/cilium/pkg/client/identity.go deleted file mode 100644 index 483509ea716..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/client/identity.go +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "github.com/cilium/cilium/api/v1/client/policy" - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/api" -) - -// IdentityGet returns a security identity. -func (c *Client) IdentityGet(id string) (*models.Identity, error) { - params := policy.NewGetIdentityIDParams().WithID(id).WithTimeout(api.ClientTimeout) - - resp, err := c.Policy.GetIdentityID(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/client/ipam.go b/vendor/github.com/cilium/cilium/pkg/client/ipam.go deleted file mode 100644 index e50bbfb51b5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/client/ipam.go +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "github.com/cilium/cilium/api/v1/client/ipam" - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/api" -) - -const ( - AddressFamilyIPv6 = "ipv6" - AddressFamilyIPv4 = "ipv4" -) - -// IPAMAllocate allocates an IP address out of address family specific pool. -func (c *Client) IPAMAllocate(family, owner, pool string, expiration bool) (*models.IPAMResponse, error) { - params := ipam.NewPostIpamParams().WithTimeout(api.ClientTimeout) - - if family != "" { - params.SetFamily(&family) - } - if owner != "" { - params.SetOwner(&owner) - } - if pool != "" { - params.SetPool(&pool) - } - params.SetExpiration(&expiration) - - resp, err := c.Ipam.PostIpam(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// IPAMAllocateIP tries to allocate a particular IP address. -func (c *Client) IPAMAllocateIP(ip, owner, pool string) error { - params := ipam.NewPostIpamIPParams().WithIP(ip).WithOwner(&owner).WithTimeout(api.ClientTimeout) - if pool != "" { - params.SetPool(&pool) - } - _, err := c.Ipam.PostIpamIP(params) - return Hint(err) -} - -// IPAMReleaseIP releases a IP address back to the pool. -func (c *Client) IPAMReleaseIP(ip, pool string) error { - params := ipam.NewDeleteIpamIPParams().WithIP(ip).WithTimeout(api.ClientTimeout) - if pool != "" { - params.SetPool(&pool) - } - _, err := c.Ipam.DeleteIpamIP(params) - return Hint(err) -} diff --git a/vendor/github.com/cilium/cilium/pkg/client/lrp.go b/vendor/github.com/cilium/cilium/pkg/client/lrp.go deleted file mode 100644 index c1108b49730..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/client/lrp.go +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "github.com/cilium/cilium/api/v1/models" -) - -// GetLRPs returns a list of all local redirect policies. -func (c *Client) GetLRPs() ([]*models.LRPSpec, error) { - resp, err := c.Service.GetLrp(nil) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/client/policy.go b/vendor/github.com/cilium/cilium/pkg/client/policy.go deleted file mode 100644 index f90cd86a7af..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/client/policy.go +++ /dev/null @@ -1,60 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "github.com/cilium/cilium/api/v1/client/policy" - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/api" -) - -// PolicyPut inserts the `policyJSON` -func (c *Client) PolicyPut(policyJSON string) (*models.Policy, error) { - params := policy.NewPutPolicyParams().WithPolicy(policyJSON).WithTimeout(api.ClientTimeout) - resp, err := c.Policy.PutPolicy(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// PolicyReplace replaces the `policyJSON` -func (c *Client) PolicyReplace(policyJSON string, replace bool, replaceWithLabels []string) (*models.Policy, error) { - params := policy.NewPutPolicyParams().WithPolicy(policyJSON).WithReplace(&replace).WithReplaceWithLabels(replaceWithLabels).WithTimeout(api.ClientTimeout) - resp, err := c.Policy.PutPolicy(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// PolicyGet returns policy rules -func (c *Client) PolicyGet(labels []string) (*models.Policy, error) { - params := policy.NewGetPolicyParams().WithLabels(labels).WithTimeout(api.ClientTimeout) - resp, err := c.Policy.GetPolicy(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// PolicyCacheGet returns the contents of a SelectorCache. -func (c *Client) PolicyCacheGet() (models.SelectorCache, error) { - params := policy.NewGetPolicySelectorsParams().WithTimeout(api.ClientTimeout) - resp, err := c.Policy.GetPolicySelectors(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// PolicyDelete deletes policy rules -func (c *Client) PolicyDelete(labels []string) (*models.Policy, error) { - params := policy.NewDeletePolicyParams().WithLabels(labels).WithTimeout(api.ClientTimeout) - resp, err := c.Policy.DeletePolicy(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, Hint(err) -} diff --git a/vendor/github.com/cilium/cilium/pkg/client/prefilter.go b/vendor/github.com/cilium/cilium/pkg/client/prefilter.go deleted file mode 100644 index 79de98e1b14..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/client/prefilter.go +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "github.com/cilium/cilium/api/v1/client/prefilter" - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/api" -) - -// GetPrefilter returns a list of all CIDR prefixes -func (c *Client) GetPrefilter() (*models.Prefilter, error) { - resp, err := c.Prefilter.GetPrefilter(nil) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// PatchPrefilter sets a list of CIDR prefixes -func (c *Client) PatchPrefilter(spec *models.PrefilterSpec) (*models.Prefilter, error) { - params := prefilter.NewPatchPrefilterParams().WithPrefilterSpec(spec).WithTimeout(api.ClientTimeout) - resp, err := c.Prefilter.PatchPrefilter(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// DeletePrefilter deletes a list of CIDR prefixes -func (c *Client) DeletePrefilter(spec *models.PrefilterSpec) (*models.Prefilter, error) { - params := prefilter.NewDeletePrefilterParams().WithPrefilterSpec(spec).WithTimeout(api.ClientTimeout) - resp, err := c.Prefilter.DeletePrefilter(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/client/recorder.go b/vendor/github.com/cilium/cilium/pkg/client/recorder.go deleted file mode 100644 index 4da24a72b9c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/client/recorder.go +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "github.com/cilium/cilium/api/v1/client/recorder" - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/api" -) - -func (c *Client) GetRecorder() ([]*models.Recorder, error) { - resp, err := c.Recorder.GetRecorder(nil) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -func (c *Client) GetRecorderMasks() ([]*models.RecorderMask, error) { - resp, err := c.Recorder.GetRecorderMasks(nil) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -func (c *Client) GetRecorderID(id int64) (*models.Recorder, error) { - params := recorder.NewGetRecorderIDParams().WithID(id).WithTimeout(api.ClientTimeout) - resp, err := c.Recorder.GetRecorderID(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -func (c *Client) PutRecorderID(id int64, rec *models.RecorderSpec) (bool, error) { - params := recorder.NewPutRecorderIDParams().WithID(id).WithConfig(rec).WithTimeout(api.ClientTimeout) - _, created, err := c.Recorder.PutRecorderID(params) - return created != nil, Hint(err) -} - -func (c *Client) DeleteRecorderID(id int64) error { - params := recorder.NewDeleteRecorderIDParams().WithID(id).WithTimeout(api.ClientTimeout) - _, err := c.Recorder.DeleteRecorderID(params) - return Hint(err) -} diff --git a/vendor/github.com/cilium/cilium/pkg/client/service.go b/vendor/github.com/cilium/cilium/pkg/client/service.go deleted file mode 100644 index fa53468c7f0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/client/service.go +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "github.com/cilium/cilium/api/v1/client/service" - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/api" -) - -// GetServices returns a list of all services. -func (c *Client) GetServices() ([]*models.Service, error) { - resp, err := c.Service.GetService(nil) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// GetServiceID returns a service by ID. -func (c *Client) GetServiceID(id int64) (*models.Service, error) { - params := service.NewGetServiceIDParams().WithID(id).WithTimeout(api.ClientTimeout) - resp, err := c.Service.GetServiceID(params) - if err != nil { - return nil, Hint(err) - } - return resp.Payload, nil -} - -// PutServiceID creates or updates a service. Returns true if service was created. -func (c *Client) PutServiceID(id int64, svc *models.ServiceSpec) (bool, error) { - svc.ID = id - params := service.NewPutServiceIDParams().WithID(id).WithConfig(svc).WithTimeout(api.ClientTimeout) - _, created, err := c.Service.PutServiceID(params) - return created != nil, Hint(err) -} - -// DeleteServiceID deletes a service by ID. -func (c *Client) DeleteServiceID(id int64) error { - params := service.NewDeleteServiceIDParams().WithID(id).WithTimeout(api.ClientTimeout) - _, err := c.Service.DeleteServiceID(params) - return Hint(err) -} diff --git a/vendor/github.com/cilium/cilium/pkg/clustermesh/types/option.go b/vendor/github.com/cilium/cilium/pkg/clustermesh/types/option.go index 0ec16ac9898..00b5673f6a9 100644 --- a/vendor/github.com/cilium/cilium/pkg/clustermesh/types/option.go +++ b/vendor/github.com/cilium/cilium/pkg/clustermesh/types/option.go @@ -4,12 +4,13 @@ package types import ( - "errors" "fmt" + "github.com/sirupsen/logrus" "github.com/spf13/pflag" "github.com/cilium/cilium/pkg/defaults" + "github.com/cilium/cilium/pkg/logging/logfields" ) const ( @@ -40,32 +41,37 @@ var DefaultClusterInfo = ClusterInfo{ // Flags implements the cell.Flagger interface, to register the given flags. func (def ClusterInfo) Flags(flags *pflag.FlagSet) { flags.Uint32(OptClusterID, def.ID, "Unique identifier of the cluster") - flags.String(OptClusterName, def.Name, "Name of the cluster") + flags.String(OptClusterName, def.Name, "Name of the cluster. It must consist of at most 32 lower case alphanumeric characters and '-', start and end with an alphanumeric character.") flags.Uint32(OptMaxConnectedClusters, def.MaxConnectedClusters, "Maximum number of clusters to be connected in a clustermesh. Increasing this value will reduce the maximum number of identities available. Valid configurations are [255, 511].") } // Validate validates that the ClusterID is in the valid range (including ClusterID == 0), // and that the ClusterName is different from the default value if the ClusterID != 0. -func (c ClusterInfo) Validate() error { +func (c ClusterInfo) Validate(log logrus.FieldLogger) error { if c.ID < ClusterIDMin || c.ID > ClusterIDMax { return fmt.Errorf("invalid cluster id %d: must be in range %d..%d", c.ID, ClusterIDMin, ClusterIDMax) } - return c.validateName() + return c.validateName(log) } // ValidateStrict validates that the ClusterID is in the valid range, but not 0, // and that the ClusterName is different from the default value. -func (c ClusterInfo) ValidateStrict() error { +func (c ClusterInfo) ValidateStrict(log logrus.FieldLogger) error { if err := ValidateClusterID(c.ID); err != nil { return err } - return c.validateName() + return c.validateName(log) } -func (c ClusterInfo) validateName() error { +func (c ClusterInfo) validateName(log logrus.FieldLogger) error { + if err := ValidateClusterName(c.Name); err != nil { + log.WithField(logfields.ClusterName, c.Name).WithError(err). + Error("Invalid cluster name. This may cause degraded functionality, and will be strictly forbidden starting from Cilium v1.17") + } + if c.ID != 0 && c.Name == defaults.ClusterName { return fmt.Errorf("cannot use default cluster name (%s) with option %s", defaults.ClusterName, OptClusterID) @@ -81,18 +87,8 @@ func (c ClusterInfo) ExtendedClusterMeshEnabled() bool { } // ValidateRemoteConfig validates the remote CiliumClusterConfig to ensure -// compatibility with this cluster's configuration. When configRequired is -// false, a missing configuration or one with ID=0 is allowed for backward -// compatibility, otherwise it is flagged as an error. -func (c ClusterInfo) ValidateRemoteConfig(configRequired bool, config *CiliumClusterConfig) error { - if config == nil || config.ID == 0 { - if configRequired || c.ExtendedClusterMeshEnabled() { - return errors.New("remote cluster is missing cluster configuration") - } - - return nil - } - +// compatibility with this cluster's configuration. +func (c ClusterInfo) ValidateRemoteConfig(config CiliumClusterConfig) error { if err := ValidateClusterID(config.ID); err != nil { return err } diff --git a/vendor/github.com/cilium/cilium/pkg/clustermesh/types/types.go b/vendor/github.com/cilium/cilium/pkg/clustermesh/types/types.go index 8137467fe4f..08d434e8421 100644 --- a/vendor/github.com/cilium/cilium/pkg/clustermesh/types/types.go +++ b/vendor/github.com/cilium/cilium/pkg/clustermesh/types/types.go @@ -4,7 +4,9 @@ package types import ( + "errors" "fmt" + "regexp" "github.com/cilium/cilium/pkg/defaults" ) @@ -13,11 +15,26 @@ const ( // ClusterIDMin is the minimum value of the cluster ID ClusterIDMin = 0 ClusterIDExt511 = 511 + + ClusterIDUnset = ClusterIDMin ) // ClusterIDMax is the maximum value of the cluster ID var ClusterIDMax uint32 = defaults.MaxConnectedClusters +// A cluster name must respect the following constraints: +// * It must contain at most 32 characters; +// * It must begin and end with a lower case alphanumeric character; +// * It may contain lower case alphanumeric characters and dashes between. +const ( + // clusterNameMaxLength is the maximum allowed length of a cluster name. + clusterNameMaxLength = 32 + // clusterNameRegexStr is the regex to validate a cluster name. + clusterNameRegexStr = `^([a-z0-9][-a-z0-9]*)?[a-z0-9]$` +) + +var clusterNameRegex = regexp.MustCompile(clusterNameRegexStr) + // InitClusterIDMax validates and sets the ClusterIDMax package level variable. func (c ClusterInfo) InitClusterIDMax() error { switch c.MaxConnectedClusters { @@ -43,6 +60,23 @@ func ValidateClusterID(clusterID uint32) error { return nil } +// ValidateClusterName validates that the given name matches the cluster name specifications. +func ValidateClusterName(name string) error { + if name == "" { + return errors.New("must not be empty") + } + + if len(name) > clusterNameMaxLength { + return fmt.Errorf("must not be more than %d characters", clusterNameMaxLength) + } + + if !clusterNameRegex.MatchString(name) { + return errors.New("must consist of lower case alphanumeric characters and '-', and must start and end with an alphanumeric character") + } + + return nil +} + type CiliumClusterConfig struct { ID uint32 `json:"id,omitempty"` @@ -61,12 +95,3 @@ type CiliumClusterConfigCapabilities struct { // The maximum number of clusters the given cluster can support in a ClusterMesh. MaxConnectedClusters uint32 `json:"maxConnectedClusters,omitempty"` } - -// ValidationMode defines if a missing CiliumClusterConfig should be allowed for -// backward compatibility, or it should be flagged as an error. -type ValidationMode bool - -const ( - BackwardCompatible ValidationMode = false - Strict ValidationMode = true -) diff --git a/vendor/github.com/cilium/cilium/pkg/command/exec/doc.go b/vendor/github.com/cilium/cilium/pkg/command/exec/doc.go deleted file mode 100644 index 959e9037303..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/command/exec/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package exec provides useful wrappers around the standard "exec" library. -package exec diff --git a/vendor/github.com/cilium/cilium/pkg/command/exec/exec.go b/vendor/github.com/cilium/cilium/pkg/command/exec/exec.go deleted file mode 100644 index 1762e5dbba0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/command/exec/exec.go +++ /dev/null @@ -1,124 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package exec - -import ( - "bufio" - "bytes" - "context" - "errors" - "fmt" - "os/exec" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/time" -) - -func warnToLog(cmd *exec.Cmd, out []byte, scopedLog *logrus.Entry, err error) { - scopedLog.WithError(err).WithField("cmd", cmd.Args).Error("Command execution failed") - scanner := bufio.NewScanner(bytes.NewReader(out)) - for scanner.Scan() { - scopedLog.Warn(scanner.Text()) - } -} - -// combinedOutput is the core implementation of catching deadline exceeded -// options and logging errors. -func combinedOutput(ctx context.Context, cmd *exec.Cmd, scopedLog *logrus.Entry, verbose bool) ([]byte, error) { - out, err := cmd.CombinedOutput() - if ctx.Err() != nil { - if !errors.Is(ctx.Err(), context.Canceled) { - scopedLog.WithError(err).WithField("cmd", cmd.Args).Error("Command execution failed") - } - return nil, fmt.Errorf("Command execution failed for %s: %w", cmd.Args, ctx.Err()) - } - if err != nil && verbose { - warnToLog(cmd, out, scopedLog, err) - } - return out, err -} - -// output is the equivalent to combinedOutput with only capturing stdout -func output(ctx context.Context, cmd *exec.Cmd, scopedLog *logrus.Entry, verbose bool) ([]byte, error) { - out, err := cmd.Output() - if ctx.Err() != nil { - if !errors.Is(ctx.Err(), context.Canceled) { - scopedLog.WithError(err).WithField("cmd", cmd.Args).Error("Command execution failed") - } - return nil, fmt.Errorf("Command execution failed for %s: %w", cmd.Args, ctx.Err()) - } - if err != nil { - var exitErr *exec.ExitError - if errors.As(err, &exitErr) { - err = fmt.Errorf("%w stderr=%q", exitErr, exitErr.Stderr) - } - if verbose { - warnToLog(cmd, out, scopedLog, err) - } - } - return out, err -} - -// Cmd wraps exec.Cmd with a context to provide convenient execution of a -// command with nice checking of the context timeout in the form: -// -// err := exec.Prog().WithTimeout(5*time.Second, myprog, myargs...).CombinedOutput(log, verbose) -type Cmd struct { - *exec.Cmd - ctx context.Context - cancelFn func() -} - -// CommandContext wraps exec.CommandContext to allow this package to be used as -// a drop-in replacement for the standard exec library. -func CommandContext(ctx context.Context, prog string, args ...string) *Cmd { - return &Cmd{ - Cmd: exec.CommandContext(ctx, prog, args...), - ctx: ctx, - } -} - -// WithTimeout creates a Cmd with a context that times out after the specified -// duration. -func WithTimeout(timeout time.Duration, prog string, args ...string) *Cmd { - ctx, cancel := context.WithTimeout(context.Background(), timeout) - cmd := CommandContext(ctx, prog, args...) - cmd.cancelFn = cancel - return cmd -} - -// WithCancel creates a Cmd with a context that can be cancelled by calling the -// resulting Cancel() function. -func WithCancel(ctx context.Context, prog string, args ...string) (*Cmd, context.CancelFunc) { - newCtx, cancel := context.WithCancel(ctx) - cmd := CommandContext(newCtx, prog, args...) - return cmd, cancel -} - -// CombinedOutput runs the command and returns its combined standard output and -// standard error. Unlike the standard library, if the context is exceeded, it -// will return an error indicating so. -// -// Logs any errors that occur to the specified logger. -func (c *Cmd) CombinedOutput(scopedLog *logrus.Entry, verbose bool) ([]byte, error) { - out, err := combinedOutput(c.ctx, c.Cmd, scopedLog, verbose) - if c.cancelFn != nil { - c.cancelFn() - } - return out, err -} - -// Output runs the command and returns only standard output, but not the -// standard error. Unlike the standard library, if the context is exceeded, -// it will return an error indicating so. -// -// Logs any errors that occur to the specified logger. -func (c *Cmd) Output(scopedLog *logrus.Entry, verbose bool) ([]byte, error) { - out, err := output(c.ctx, c.Cmd, scopedLog, verbose) - if c.cancelFn != nil { - c.cancelFn() - } - return out, err -} diff --git a/vendor/github.com/cilium/cilium/pkg/common/const.go b/vendor/github.com/cilium/cilium/pkg/common/const.go deleted file mode 100644 index 365d9ae288a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/common/const.go +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package common - -const ( - // Miscellaneous dedicated constants - - // CHeaderFileName is the name of the C header file for BPF programs for a - // particular endpoint. - CHeaderFileName = "ep_config.h" - - // PossibleCPUSysfsPath is used to retrieve the number of CPUs for per-CPU maps. - PossibleCPUSysfsPath = "/sys/devices/system/cpu/possible" -) diff --git a/vendor/github.com/cilium/cilium/pkg/common/utils.go b/vendor/github.com/cilium/cilium/pkg/common/utils.go deleted file mode 100644 index b8a5a5d400b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/common/utils.go +++ /dev/null @@ -1,137 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package common - -import ( - "fmt" - "io" - "os" - "strconv" - "strings" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/safeio" -) - -// C2GoArray transforms an hexadecimal string representation into a byte slice. -// Example: -// str := "0x12, 0xff, 0x0, 0x1" -// fmt.Print(C2GoArray(str)) //`{0x12, 0xFF, 0x0, 0x01}`" -func C2GoArray(str string) []byte { - ret := []byte{} - - if str == "" { - return ret - } - - hexStr := strings.Split(str, ", ") - for _, hexDigit := range hexStr { - strDigit := strings.TrimPrefix(hexDigit, "0x") - digitUint64, err := strconv.ParseUint(strDigit, 16, 8) - if err != nil { - return nil - } - ret = append(ret, byte(digitUint64)) - } - return ret -} - -// GoArray2C transforms a byte slice into its hexadecimal string representation. -// Example: -// array := []byte{0x12, 0xFF, 0x0, 0x01} -// fmt.Print(GoArray2C(array)) // "{ 0x12, 0xff, 0x0, 0x1 }" -func GoArray2C(array []byte) string { - return goArray2C(array, true) -} - -// GoArray2CNoSpaces does the same as GoArray2C, but no spaces are used in -// the final output. -// Example: -// array := []byte{0x12, 0xFF, 0x0, 0x01} -// fmt.Print(GoArray2CNoSpaces(array)) // "{0x12,0xff,0x0,0x1}" -func GoArray2CNoSpaces(array []byte) string { - return goArray2C(array, false) -} - -func goArray2C(array []byte, space bool) string { - ret := "" - format := ",%#x" - if space { - format = ", %#x" - } - - for i, e := range array { - if i == 0 { - ret = ret + fmt.Sprintf("%#x", e) - } else { - ret = ret + fmt.Sprintf(format, e) - } - } - return ret -} - -// RequireRootPrivilege checks if the user running cmd is root. If not, it exits the program -func RequireRootPrivilege(cmd string) { - if os.Getuid() != 0 { - fmt.Fprintf(os.Stderr, "Please run %q command(s) with root privileges.\n", cmd) - os.Exit(1) - } -} - -// MapStringStructToSlice returns a slice with all keys of the given -// map[string]struct{} -func MapStringStructToSlice(m map[string]struct{}) []string { - s := make([]string, 0, len(m)) - for k := range m { - s = append(s, k) - } - return s -} - -// GetNumPossibleCPUs returns a total number of possible CPUS, i.e. CPUs that -// have been allocated resources and can be brought online if they are present. -// The number is retrieved by parsing /sys/devices/system/cpu/possible. -// -// See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/cpumask.h?h=v4.19#n50 -// for more details. -func GetNumPossibleCPUs(log logrus.FieldLogger) int { - f, err := os.Open(PossibleCPUSysfsPath) - if err != nil { - log.WithError(err).Errorf("unable to open %q", PossibleCPUSysfsPath) - return 0 - } - defer f.Close() - - return getNumPossibleCPUsFromReader(log, f) -} - -func getNumPossibleCPUsFromReader(log logrus.FieldLogger, r io.Reader) int { - out, err := safeio.ReadAllLimit(r, safeio.KB) - if err != nil { - log.WithError(err).Errorf("unable to read %q to get CPU count", PossibleCPUSysfsPath) - return 0 - } - - var start, end int - count := 0 - for _, s := range strings.Split(string(out), ",") { - // Go's scanf will return an error if a format cannot be fully matched. - // So, just ignore it, as a partial match (e.g. when there is only one - // CPU) is expected. - n, err := fmt.Sscanf(s, "%d-%d", &start, &end) - - switch n { - case 0: - log.WithError(err).Errorf("failed to scan %q to retrieve number of possible CPUs!", s) - return 0 - case 1: - count++ - default: - count += (end - start + 1) - } - } - - return count -} diff --git a/vendor/github.com/cilium/cilium/pkg/comparator/comparator.go b/vendor/github.com/cilium/cilium/pkg/comparator/comparator.go deleted file mode 100644 index d31b0194da8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/comparator/comparator.go +++ /dev/null @@ -1,106 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package comparator - -import ( - "github.com/kr/pretty" - "github.com/pmezard/go-difflib/difflib" -) - -// Compare compares two interfaces and emits a unified diff as string -func Compare(a, b interface{}) string { - return CompareWithNames(a, b, "a", "b") -} - -// CompareWithNames compares two interfaces and emits a unified diff as string -func CompareWithNames(a, b interface{}, nameA, nameB string) string { - stringA := pretty.Sprintf("%# v", a) - stringB := pretty.Sprintf("%# v", b) - diff := difflib.UnifiedDiff{ - A: difflib.SplitLines(stringA), - B: difflib.SplitLines(stringB), - FromFile: nameA, - ToFile: nameB, - Context: 32, - } - - out, err := difflib.GetUnifiedDiffString(diff) - if err != nil { - return err.Error() - } - return "Unified diff:\n" + out -} - -// MapStringEquals returns true if both maps are equal. -func MapStringEquals(m1, m2 map[string]string) bool { - switch { - case m1 == nil && m2 == nil: - return true - case m1 == nil && m2 != nil, - m1 != nil && m2 == nil, - len(m1) != len(m2): - return false - } - for k1, v1 := range m1 { - if v2, ok := m2[k1]; !ok || v2 != v1 { - return false - } - } - return true -} - -// MapBoolEquals returns true if both maps are equal. -func MapBoolEquals(m1, m2 map[string]bool) bool { - switch { - case m1 == nil && m2 == nil: - return true - case m1 == nil && m2 != nil, - m1 != nil && m2 == nil, - len(m1) != len(m2): - return false - } - for k1, v1 := range m1 { - if v2, ok := m2[k1]; !ok || v2 != v1 { - return false - } - } - return true -} - -// MapStringEqualsIgnoreKeys returns true if both maps have the same values for -// the keys that are not present in the 'ignoreKeys'. -func MapStringEqualsIgnoreKeys(m1, m2 map[string]string, ignoreKeys []string) bool { - switch { - case m1 == nil && m2 == nil: - return true - case m1 == nil && m2 != nil, - m1 != nil && m2 == nil: - return false - } - ignoredM1 := 0 - for k1, v1 := range m1 { - var ignore bool - for _, ig := range ignoreKeys { - if k1 == ig { - ignore = true - break - } - } - if ignore { - ignoredM1++ - continue - } - if v2, ok := m2[k1]; !ok || v2 != v1 { - return false - } - } - - ignoredM2 := 0 - for _, ig := range ignoreKeys { - if _, ok := m2[ig]; ok { - ignoredM2++ - } - } - return len(m1)-ignoredM1 == len(m2)-ignoredM2 -} diff --git a/vendor/github.com/cilium/cilium/pkg/components/components.go b/vendor/github.com/cilium/cilium/pkg/components/components.go deleted file mode 100644 index 38f483a07e2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/components/components.go +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package components - -import ( - "os" - "strings" -) - -const ( - // CiliumAgentName is the name of cilium-agent (daemon) process name. - CiliumAgentName = "cilium-agent" - // CiliumOperatortName is the name of cilium-operator process name. - CiliumOperatortName = "cilium-operator" - // CiliumDaemonTestName is the name of test binary for daemon package. - CiliumDaemonTestName = "cmd.test" -) - -// IsCiliumAgent checks whether the current process is cilium-agent (daemon). -func IsCiliumAgent() bool { - binaryName := os.Args[0] - return strings.HasSuffix(binaryName, CiliumAgentName) || - strings.HasSuffix(binaryName, CiliumDaemonTestName) -} diff --git a/vendor/github.com/cilium/cilium/pkg/container/ring_buffer.go b/vendor/github.com/cilium/cilium/pkg/container/ring_buffer.go deleted file mode 100644 index 985b6882473..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/container/ring_buffer.go +++ /dev/null @@ -1,152 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package container - -import ( - "sort" -) - -// RingBuffer is a generic ring buffer implementation that contains -// sequential data (i.e. such as time ordered data). -// RingBuffer is implemented using slices. From testing, this should -// be fast than linked-list implementations, and also allows for efficient -// indexing of ordered data. -type RingBuffer struct { - buffer []interface{} - next int // index of ring buffer head. - maxSize int -} - -// NewRingBuffer constructs a new ring buffer for a given buffer size. -func NewRingBuffer(bufferSize int) *RingBuffer { - return &RingBuffer{ - buffer: make([]interface{}, 0, bufferSize), - maxSize: bufferSize, - } -} - -func (eb *RingBuffer) isFull() bool { - return len(eb.buffer) >= eb.maxSize -} - -func (eb *RingBuffer) incr() { - eb.next = (eb.next + 1) % eb.maxSize -} - -// Add adds an element to the buffer. -func (eb *RingBuffer) Add(e interface{}) { - if eb.maxSize == 0 { - return - } - if eb.isFull() { - eb.buffer[eb.next] = e - eb.incr() - return - } - eb.incr() - eb.buffer = append(eb.buffer, e) -} - -func (eb *RingBuffer) dumpWithCallback(callback func(v interface{})) { - for i := 0; i < len(eb.buffer); i++ { - callback(eb.at(i)) - } -} - -func (eb *RingBuffer) at(i int) interface{} { - return eb.buffer[eb.mapIndex(i)] -} - -// firstValidIndex returns the first **absolute** index in the buffer that satisfies -// isValid. -// note: this value needs to be mapped before indexing the buffer. -func (eb *RingBuffer) firstValidIndex(isValid func(interface{}) bool) int { - return sort.Search(len(eb.buffer), func(i int) bool { - return isValid(eb.at(i)) - }) -} - -// IterateValid calls the callback on each element of the buffer, starting with -// the first element in the buffer that satisfies "isValid". -func (eb *RingBuffer) IterateValid(isValid func(interface{}) bool, callback func(interface{})) { - startIndex := eb.firstValidIndex(isValid) - l := len(eb.buffer) - startIndex - for i := 0; i < l; i++ { - index := eb.mapIndex(startIndex + i) - callback(eb.buffer[index]) - } -} - -// maps index in [0:len(buffer)) to the actual index in buffer. -func (eb *RingBuffer) mapIndex(indexOffset int) int { - ret := (eb.next + indexOffset) % len(eb.buffer) - return ret -} - -// Compact clears out invalidated elements in the buffer. -// This may require copying the entire buffer. -// It is assumed that if buffer[i] is invalid then every entry [0...i-1] is also not valid. -func (eb *RingBuffer) Compact(isValid func(interface{}) bool) { - if len(eb.buffer) == 0 { - return - } - startIndex := eb.firstValidIndex(isValid) - // In this case, we compact the entire buffer. - if startIndex >= len(eb.buffer) { - eb.buffer = []interface{}{} - eb.next = 0 - return - } - - mappedStart := eb.mapIndex(startIndex) // mapped start is the new index 0 of our buffer. - // new length will be how long the current buffer is, minus the absolute starting index. - newBufferLength := len(eb.buffer) - startIndex - // case where the head index is to the left of the tail index. - // e.x. [... head, tail, ...] - // mappedStart + newBufferLength is the upper bound of the new buffer list - // if we don't have to worry about mapping. - // - // e.x. [mappedStart:mappedStart+newBufferLength] <- this is our new buffer. - // - // If this value is less than or equal to the length then we don't need - // to worry about any part of the list wrapping around. - if mappedStart+newBufferLength > len(eb.buffer) { - // now we can find the actual end index, by offsetting the startIndex - // by the length and mapping it. - // [... startIndex+newBufferLen ... startIndex ...] - end := eb.mapIndex(startIndex + newBufferLength) - tmp := make([]interface{}, len(eb.buffer[:end])) - copy(tmp, eb.buffer[:end]) - - eb.buffer = eb.buffer[mappedStart:] - eb.buffer = append(eb.buffer, tmp...) - - // at this point the buffer is such that the 0th element - // maps to the 0th index in the buffer array. - eb.next = len(eb.buffer) - if eb.isFull() { - eb.next = eb.next % eb.maxSize - } - return - } - // otherwise, the head is to the right of the tail. - begin := mappedStart - end := mappedStart + newBufferLength - eb.buffer = eb.buffer[begin:end] - eb.next = len(eb.buffer) - if eb.isFull() { - eb.next = eb.next % eb.maxSize - } -} - -// Iterate is a convenience function over IterateValid that iterates -// all elements in the buffer. -func (eb *RingBuffer) Iterate(callback func(interface{})) { - eb.IterateValid(func(e interface{}) bool { return true }, callback) -} - -// Size returns the size of the buffer. -func (eb *RingBuffer) Size() int { - return len(eb.buffer) -} diff --git a/vendor/github.com/cilium/cilium/pkg/controller/cell.go b/vendor/github.com/cilium/cilium/pkg/controller/cell.go deleted file mode 100644 index 53119459a05..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/controller/cell.go +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package controller - -import ( - "github.com/spf13/pflag" - - "github.com/cilium/cilium/pkg/hive/cell" - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/metrics/metric" -) - -const ( - controllerGroupMetrics = "controller-group-metrics" - - // labelControllerGroupName is the label used - // to identify controller-specific metrics - labelControllerGroupName = "group_name" -) - -var ( - // GroupMetricEnabled is populated with the set of ControllerGroups for which metrics are enabled - groupMetricEnabled = map[string]bool{} - - // GroupRuns is a Prometheus-compatible metric for Controller - // runs, labeled by completion status and Group name - GroupRuns = metrics.NoOpCounterVec -) - -var Cell = cell.Module( - "controller", - "Controllers and Controller Lifecycle management", - cell.Config(Config{}), - cell.Metric(NewMetrics), - cell.Invoke(Init), -) - -type Metrics struct { - ControllerGroupRuns metric.Vec[metric.Counter] -} - -func NewMetrics() Metrics { - return Metrics{ - ControllerGroupRuns: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: metrics.Namespace + "_controllers_group_runs_total", - Namespace: metrics.Namespace, - Name: "controllers_group_runs_total", - Help: "Number of times that a controller group was run, labeled by completion status and controller group name", - }, []string{labelControllerGroupName, metrics.LabelStatus}), - } -} - -type Config struct { - // ControllerGroupMetrics is an option which specifies the set of ControllerGroups names - // for which metrics will be enabled. The special values 'all' and 'none' are supported. - ControllerGroupMetrics []string -} - -func (cfg Config) Flags(flags *pflag.FlagSet) { - flags.StringSlice(controllerGroupMetrics, cfg.ControllerGroupMetrics, - "List of controller group names for which to to enable metrics. "+ - "Accepts 'all' and 'none'. "+ - "The set of controller group names available is not guaranteed to be stable between Cilium versions.") -} - -func Init(cfg Config, m Metrics) { - // Initialize package-scoped references to Cell configuration - for _, name := range cfg.ControllerGroupMetrics { - groupMetricEnabled[name] = true - } - - GroupRuns = m.ControllerGroupRuns -} diff --git a/vendor/github.com/cilium/cilium/pkg/controller/controller.go b/vendor/github.com/cilium/cilium/pkg/controller/controller.go deleted file mode 100644 index 821020c7df2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/controller/controller.go +++ /dev/null @@ -1,405 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package controller - -import ( - "context" - "errors" - "fmt" - "math" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/hive/cell" - "github.com/cilium/cilium/pkg/inctimer" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/time" -) - -const ( - success = "success" - failure = "failure" - - // special Group "names" for metrics config - allControllerMetricsEnabled = "all" - noControllerMetricsEnabled = "none" -) - -// ControllerFunc is a function that the controller runs. This type is used for -// DoFunc and StopFunc. -type ControllerFunc func(ctx context.Context) error - -// ExitReason is a returnable type from DoFunc that causes the -// controller to exit. This reason is recorded in the controller's status. The -// controller is not removed from any manager. -// Construct one with NewExitReason("a reason") -type ExitReason struct { - // This is constucted in this odd way because the type assertion in - // runController didn't work otherwise. - error -} - -// NewExitReason returns a new ExitReason -func NewExitReason(reason string) ExitReason { - return ExitReason{errors.New(reason)} -} - -// Group contains metadata about a group of controllers -type Group struct { - // Name of the controller group. - // - // This name MUST NOT be dynamically generated based on - // resource identifier in order to limit metrics cardinality. - Name string -} - -func NewGroup(name string) Group { - return Group{Name: name} -} - -// ControllerParams contains all parameters of a controller -type ControllerParams struct { - // Group is used for aggregate metrics collection. - // The Group.Name must NOT be dynamically generated from a - // resource identifier in order to limit metrics cardinality. - Group Group - - HealthReporter cell.HealthReporter - - // DoFunc is the function that will be run until it succeeds and/or - // using the interval RunInterval if not 0. - // An unset DoFunc is an error and will be logged as one. - DoFunc ControllerFunc - - // CancelDoFuncOnUpdate when set to true cancels the controller context - // (the DoFunc) to allow quick termination of controller - CancelDoFuncOnUpdate bool - - // StopFunc is called when the controller stops. It is intended to run any - // clean-up tasks for the controller (e.g. deallocate/release resources) - // It is guaranteed that DoFunc is called at least once before StopFunc is - // called. - // An unset StopFunc is not an error (and will be a no-op) - // Note: Since this occurs on controller exit, error counts and tracking may - // not be checked after StopFunc is run. - StopFunc ControllerFunc - - // If set to any other value than 0, will cause DoFunc to be run in the - // specified interval. The interval starts from when the DoFunc has - // returned last - RunInterval time.Duration - - // If set to any other value than 0, will cap the error retry interval - // to the specified interval. - MaxRetryInterval time.Duration - - // ErrorRetryBaseDuration is the initial time to wait to run DoFunc - // again on return of an error. On each consecutive error, this value - // is multiplied by the number of consecutive errors to provide a - // constant back off. The default is 1s. - ErrorRetryBaseDuration time.Duration - - // NoErrorRetry when set to true, disabled retries on errors - NoErrorRetry bool - - Context context.Context -} - -// undefinedDoFunc is used when no DoFunc is set. controller.DoFunc is set to this -// when the controller is incorrectly initialised. -func undefinedDoFunc(name string) error { - return fmt.Errorf("controller %s DoFunc is nil", name) -} - -// NoopFunc is a no-op placeholder for DoFunc & StopFunc. -// It is automatically used when StopFunc is undefined, and can be used as a -// DoFunc stub when the controller should only run StopFunc. -func NoopFunc(ctx context.Context) error { - return nil -} - -// isGroupMetricEnabled returns true if metrics are enabled for the Group -// -// The controller metrics config option is used to determine -// if "all", "none" (takes precedence over "all"), or the -// given set of Group names should be enabled. -// -// If no controller metrics config option was provided, -// only then is the DefaultMetricsEnabled field used. -func isGroupMetricEnabled(g Group) bool { - var metricsEnabled = groupMetricEnabled - if metricsEnabled == nil { - // There is currently no guarantee that a caller of this function - // has initialized the configuration map using the hive cell. - return false - } - - if metricsEnabled[noControllerMetricsEnabled] { - // "none" takes precedence over "all" - return false - } else if metricsEnabled[allControllerMetricsEnabled] { - return true - } else { - return metricsEnabled[g.Name] - } -} - -// Controller is a simple pattern that allows to perform the following -// tasks: -// - Run an operation in the background and retry until it succeeds -// - Perform a regular sync operation in the background -// -// A controller has configurable retry intervals and will collect statistics -// on number of successful runs, number of failures, last error message, -// and last error timestamp. -// -// Controllers have a name and are tied to a Manager. The manager is typically -// bound to higher level objects such as endpoint. These higher level objects -// can then run multiple controllers to perform async tasks such as: -// - Annotating k8s resources with values -// - Synchronizing an object with the kvstore -// - Any other async operation to may fail and require retries -// -// Embedding the Manager into higher level resources allows to bind controllers -// to the lifetime of that object. Controllers also have a UUID to allow -// correlating all log messages of a controller instance. -// -// Guidelines to writing controllers: -// - Make sure that the task the controller performs is done in an atomic -// fashion, e.g. if a controller modifies a resource in multiple steps, an -// intermediate manipulation operation failing should not leave behind -// an inconsistent state. This can typically be achieved by locking the -// resource and rolling back or by using transactions. -// - Controllers typically act on behalf of a higher level object such as an -// endpoint. The controller must ensure that the higher level object is -// properly locked when accessing any fields. -// - Controllers run asynchronously in the background, it is the responsibility -// of the controller to be aware of the lifecycle of the owning higher level -// object. This is typically achieved by removing all controllers when the -// owner dies. It is the responsibility of the owner to either lock the owner -// in a way that will delay destruction throughout the controller run or to -// check for the destruction throughout the run. -type controller struct { - // Constant after creation, safe to access without locking - group Group - name string - uuid string - logger *logrus.Entry - - // Channels written to and/or closed by the manager - stop chan struct{} - update chan ControllerParams - trigger chan struct{} - - // terminated is closed by the controller goroutine when it terminates - terminated chan struct{} - - // Manipulated by the controller, read by the Manager, requires locking - mutex lock.RWMutex - successCount int - lastSuccessStamp time.Time - failureCount int - consecutiveErrors int - lastError error - lastErrorStamp time.Time - lastDuration time.Duration -} - -// GetSuccessCount returns the number of successful controller runs -func (c *controller) GetSuccessCount() int { - c.mutex.RLock() - defer c.mutex.RUnlock() - - return c.successCount -} - -// GetFailureCount returns the number of failed controller runs -func (c *controller) GetFailureCount() int { - c.mutex.RLock() - defer c.mutex.RUnlock() - - return c.failureCount -} - -// GetLastError returns the last error returned -func (c *controller) GetLastError() error { - c.mutex.RLock() - defer c.mutex.RUnlock() - - return c.lastError -} - -// GetLastErrorTimestamp returns the last error returned -func (c *controller) GetLastErrorTimestamp() time.Time { - c.mutex.RLock() - defer c.mutex.RUnlock() - - return c.lastErrorStamp -} - -func (c *controller) runController(params ControllerParams) { - errorRetries := 1 - - runTimer, timerDone := inctimer.New() - defer timerDone() - - for { - var err error - - interval := params.RunInterval - - start := time.Now() - err = params.DoFunc(params.Context) - duration := time.Since(start) - - c.mutex.Lock() - c.lastDuration = duration - c.getLogger().Debug("Controller func execution time: ", c.lastDuration) - - if err != nil { - if params.Context.Err() != nil { - // The controller's context was canceled. Let's wait for the - // next controller update (or stop). - err = NewExitReason("controller context canceled") - } - - var exitReason ExitReason - if errors.As(err, &exitReason) { - // This is actually not an error case, but it causes an exit - c.recordSuccess(params.HealthReporter) - c.lastError = exitReason // This will be shown in the controller status - - // Don't exit the goroutine, since that only happens when the - // controller is explicitly stopped. Instead, just wait for - // the next update. - c.getLogger().Debug("Controller run succeeded; waiting for next controller update or stop") - interval = time.Duration(math.MaxInt64) - - } else { - c.getLogger().WithField(fieldConsecutiveErrors, errorRetries). - WithError(err).Debug("Controller run failed") - c.recordError(err, params.HealthReporter) - - if !params.NoErrorRetry { - if params.ErrorRetryBaseDuration != time.Duration(0) { - interval = time.Duration(errorRetries) * params.ErrorRetryBaseDuration - } else { - interval = time.Duration(errorRetries) * time.Second - } - - if params.MaxRetryInterval > 0 && interval > params.MaxRetryInterval { - c.getLogger().WithFields(logrus.Fields{ - "calculatedInterval": interval, - "maxAllowedInterval": params.MaxRetryInterval, - }).Debug("Cap retry interval to max allowed value") - interval = params.MaxRetryInterval - } - - errorRetries++ - } - } - } else { - c.recordSuccess(params.HealthReporter) - - // reset error retries after successful attempt - errorRetries = 1 - - // If no run interval is specified, no further updates - // are required. - if interval == time.Duration(0) { - // Don't exit the goroutine, since that only happens when the - // controller is explicitly stopped. Instead, just wait for - // the next update. - c.getLogger().Debug("Controller run succeeded; waiting for next controller update or stop") - interval = time.Duration(math.MaxInt64) - } - } - - c.mutex.Unlock() - - select { - case <-c.stop: - goto shutdown - - case params = <-c.update: - // update channel is never closed - case <-runTimer.After(interval): - // timer channel is not yet closed - case <-c.trigger: - // trigger channel is never closed - } - - // If we receive a signal on multiple channels golang will pick one randomly. - // This select will make sure we don't execute the controller - // while we are shutting down. - select { - case <-c.stop: - goto shutdown - default: - } - } - -shutdown: - c.getLogger().Debug("Shutting down controller") - - if err := params.StopFunc(context.TODO()); err != nil { - c.mutex.Lock() - c.recordError(err, params.HealthReporter) - c.mutex.Unlock() - c.getLogger().WithField(fieldConsecutiveErrors, errorRetries). - WithError(err).Warn("Error on Controller stop") - } - - close(c.terminated) -} - -// logger returns a logrus object with controllerName and UUID fields. -func (c *controller) getLogger() *logrus.Entry { - if c.logger == nil { - c.logger = log.WithFields(logrus.Fields{ - fieldControllerName: c.name, - fieldUUID: c.uuid, - }) - } - - return c.logger -} - -// recordError updates all statistic collection variables on error -// c.mutex must be held. -func (c *controller) recordError(err error, hr cell.HealthReporter) { - if hr != nil { - hr.Degraded(c.name, err) - } - c.lastError = err - c.lastErrorStamp = time.Now() - c.failureCount++ - c.consecutiveErrors++ - - metrics.ControllerRuns.WithLabelValues(failure).Inc() - if isGroupMetricEnabled(c.group) { - GroupRuns.WithLabelValues(c.group.Name, failure).Inc() - } - metrics.ControllerRunsDuration.WithLabelValues(failure).Observe(c.lastDuration.Seconds()) -} - -// recordSuccess updates all statistic collection variables on success -// c.mutex must be held. -func (c *controller) recordSuccess(hr cell.HealthReporter) { - if hr != nil { - hr.OK(c.name) - } - - c.lastError = nil - c.lastSuccessStamp = time.Now() - c.successCount++ - c.consecutiveErrors = 0 - - metrics.ControllerRuns.WithLabelValues(success).Inc() - if isGroupMetricEnabled(c.group) { - GroupRuns.WithLabelValues(c.group.Name, success).Inc() - } - metrics.ControllerRunsDuration.WithLabelValues(success).Observe(c.lastDuration.Seconds()) -} diff --git a/vendor/github.com/cilium/cilium/pkg/controller/doc.go b/vendor/github.com/cilium/cilium/pkg/controller/doc.go deleted file mode 100644 index 0bab327fd2c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/controller/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package controller provide a simple pattern for async operations that -// require retries and/or regular intervals. -package controller diff --git a/vendor/github.com/cilium/cilium/pkg/controller/logfields.go b/vendor/github.com/cilium/cilium/pkg/controller/logfields.go deleted file mode 100644 index ff144692518..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/controller/logfields.go +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package controller - -import ( - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -// logging field definitions -const ( - // fieldControllerName is the name of the controller - fieldControllerName = "name" - - // fieldUUID is the UUID of the controller - fieldUUID = "uuid" - - // fieldConsecutiveErrors is the number of consecutive errors of a controller - fieldConsecutiveErrors = "consecutiveErrors" -) - -var ( - // log is the controller package logger object. - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "controller") -) diff --git a/vendor/github.com/cilium/cilium/pkg/controller/manager.go b/vendor/github.com/cilium/cilium/pkg/controller/manager.go deleted file mode 100644 index f7d42b305a2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/controller/manager.go +++ /dev/null @@ -1,374 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package controller - -import ( - "context" - "fmt" - - "github.com/go-openapi/strfmt" - "github.com/google/uuid" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/time" -) - -var ( - // globalStatus is the global status of all controllers - globalStatus = NewManager() -) - -type controllerMap map[string]*managedController - -// Manager is a list of controllers -type Manager struct { - controllers controllerMap - mutex lock.RWMutex -} - -// NewManager allocates a new manager -func NewManager() *Manager { - return &Manager{ - controllers: controllerMap{}, - } -} - -// GetGlobalStatus returns the status of all controllers -func GetGlobalStatus() models.ControllerStatuses { - return globalStatus.GetStatusModel() -} - -// UpdateController installs or updates a controller in the -// manager. A controller is primarily identified by its name. -// If a controller with the name already exists, the controller -// will be shut down and replaced with the provided controller. -// -// Updating a controller will cause the DoFunc to be run immediately regardless -// of any previous conditions. It will also cause any statistics to be reset. -func (m *Manager) UpdateController(name string, params ControllerParams) { - m.updateController(name, params) -} - -func (m *Manager) updateController(name string, params ControllerParams) *managedController { - start := time.Now() - - m.mutex.Lock() - defer m.mutex.Unlock() - - if m.controllers == nil { - m.controllers = controllerMap{} - } - - if params.Group.Name == "" { - log.Errorf( - "Controller initialized with unpopulated group information. " + - "Metrics will not be exported for this controller.") - } - - ctrl, exists := m.controllers[name] - if exists { - ctrl.getLogger().Debug("Updating existing controller") - ctrl.updateParamsLocked(params) - - // Notify the goroutine of the params update. - select { - case ctrl.update <- ctrl.params: - default: - } - - ctrl.getLogger().Debug("Controller update time: ", time.Since(start)) - } else { - return m.createControllerLocked(name, params) - } - - return ctrl -} - -func (m *Manager) createControllerLocked(name string, params ControllerParams) *managedController { - ctrl := &managedController{ - controller: controller{ - name: name, - group: params.Group, - uuid: uuid.New().String(), - stop: make(chan struct{}), - update: make(chan ControllerParams, 1), - trigger: make(chan struct{}, 1), - terminated: make(chan struct{}), - }, - } - ctrl.updateParamsLocked(params) - ctrl.getLogger().Debug("Starting new controller") - - m.controllers[ctrl.name] = ctrl - - globalStatus.mutex.Lock() - globalStatus.controllers[ctrl.uuid] = ctrl - globalStatus.mutex.Unlock() - - go ctrl.runController(ctrl.params) - return ctrl -} - -// CreateController installs a new controller in the -// manager. If a controller with the name already exists -// this method returns false without triggering, otherwise -// creates the controller and runs it immediately. -func (m *Manager) CreateController(name string, params ControllerParams) bool { - m.mutex.Lock() - defer m.mutex.Unlock() - - if m.controllers != nil { - if _, exists := m.controllers[name]; exists { - return false - } - } else { - m.controllers = controllerMap{} - } - m.createControllerLocked(name, params) - return true -} - -func (m *Manager) removeController(ctrl *managedController) { - ctrl.stopController() - delete(m.controllers, ctrl.name) - - globalStatus.mutex.Lock() - delete(globalStatus.controllers, ctrl.uuid) - globalStatus.mutex.Unlock() - - ctrl.getLogger().Debug("Removed controller") -} - -func (m *Manager) lookup(name string) *managedController { - m.mutex.RLock() - defer m.mutex.RUnlock() - - if c, ok := m.controllers[name]; ok { - return c - } - - return nil -} - -func (m *Manager) removeAndReturnController(name string) (*managedController, error) { - m.mutex.Lock() - defer m.mutex.Unlock() - - if m.controllers == nil { - return nil, fmt.Errorf("empty controller map") - } - - oldCtrl, ok := m.controllers[name] - if !ok { - return nil, fmt.Errorf("unable to find controller %s", name) - } - - m.removeController(oldCtrl) - - return oldCtrl, nil -} - -// RemoveController stops and removes a controller from the manager. If DoFunc -// is currently running, DoFunc is allowed to complete in the background. -func (m *Manager) RemoveController(name string) error { - _, err := m.removeAndReturnController(name) - return err -} - -// RemoveControllerAndWait stops and removes a controller using -// RemoveController() and then waits for it to run to completion. -func (m *Manager) RemoveControllerAndWait(name string) error { - oldCtrl, err := m.removeAndReturnController(name) - if err == nil { - <-oldCtrl.terminated - } - - return err -} - -func (m *Manager) removeAll() []*managedController { - ctrls := []*managedController{} - - m.mutex.Lock() - defer m.mutex.Unlock() - - if m.controllers == nil { - return ctrls - } - - for _, ctrl := range m.controllers { - m.removeController(ctrl) - ctrls = append(ctrls, ctrl) - } - - return ctrls -} - -// RemoveAll stops and removes all controllers of the manager -func (m *Manager) RemoveAll() { - m.removeAll() -} - -// RemoveAllAndWait stops and removes all controllers of the manager and then -// waits for all controllers to exit -func (m *Manager) RemoveAllAndWait() { - ctrls := m.removeAll() - for _, ctrl := range ctrls { - <-ctrl.terminated - } -} - -// GetStatusModel returns the status of all controllers as models.ControllerStatuses -func (m *Manager) GetStatusModel() models.ControllerStatuses { - // Create a copy of pointers to current controller so we can unlock the - // manager mutex quickly again - controllers := controllerMap{} - m.mutex.RLock() - for key, c := range m.controllers { - controllers[key] = c - } - m.mutex.RUnlock() - - statuses := models.ControllerStatuses{} - for _, c := range controllers { - statuses = append(statuses, c.GetStatusModel()) - } - - return statuses -} - -// TriggerController triggers the controller with the specified name. -func (m *Manager) TriggerController(name string) { - ctrl := m.lookup(name) - if ctrl == nil { - return - } - - select { - case ctrl.trigger <- struct{}{}: - default: - } -} - -// FakeManager returns a fake controller manager with the specified number of -// failing controllers. The returned manager is identical in any regard except -// for internal pointers. -// Used for testing only. -func FakeManager(failingControllers int) *Manager { - m := &Manager{ - controllers: controllerMap{}, - } - - for i := 0; i < failingControllers; i++ { - ctrl := &managedController{ - controller: controller{ - name: fmt.Sprintf("controller-%d", i), - uuid: fmt.Sprintf("%d", i), - stop: make(chan struct{}), - update: make(chan ControllerParams, 1), - trigger: make(chan struct{}, 1), - terminated: make(chan struct{}), - lastError: fmt.Errorf("controller failed"), - failureCount: 1, - consecutiveErrors: 1, - }, - } - - ctrl.params.Context, ctrl.cancelDoFunc = context.WithCancel(context.Background()) - m.controllers[ctrl.name] = ctrl - } - - return m -} - -type managedController struct { - controller - - params ControllerParams - cancelDoFunc context.CancelFunc -} - -// updateParamsLocked sanitizes and sets the controller's parameters. -// -// If the RunInterval exceeds ControllerMaxInterval, it will be capped. -// -// Manager's mutex must be held -func (c *managedController) updateParamsLocked(params ControllerParams) { - // ensure the callbacks are valid - if params.DoFunc == nil { - params.DoFunc = func(ctx context.Context) error { - return undefinedDoFunc(c.name) - } - } - if params.StopFunc == nil { - params.StopFunc = NoopFunc - } - - // Enforce max controller interval - maxInterval := time.Duration(option.Config.MaxControllerInterval) * time.Second - if maxInterval > 0 && params.RunInterval > maxInterval { - c.getLogger().Infof("Limiting interval to %s", maxInterval) - params.RunInterval = maxInterval - } - - // Save current context on update if not canceling - ctx := c.params.Context - // Check if the current context needs to be cancelled - if c.params.CancelDoFuncOnUpdate && c.cancelDoFunc != nil { - c.cancelDoFunc() - c.params.Context = nil - } - - // (re)set the context as the previous might have been cancelled - if c.params.Context == nil { - if params.Context == nil { - ctx, c.cancelDoFunc = context.WithCancel(context.Background()) - } else { - ctx, c.cancelDoFunc = context.WithCancel(params.Context) - } - } - - c.params = params - c.params.Context = ctx -} - -func (c *managedController) stopController() { - if c.cancelDoFunc != nil { - c.cancelDoFunc() - } - - close(c.stop) -} - -// GetStatusModel returns a models.ControllerStatus representing the -// controller's configuration & status -func (c *managedController) GetStatusModel() *models.ControllerStatus { - c.mutex.RLock() - defer c.mutex.RUnlock() - - status := &models.ControllerStatus{ - Name: c.name, - UUID: strfmt.UUID(c.uuid), - Configuration: &models.ControllerStatusConfiguration{ - ErrorRetry: !c.params.NoErrorRetry, - ErrorRetryBase: strfmt.Duration(c.params.ErrorRetryBaseDuration), - Interval: strfmt.Duration(c.params.RunInterval), - }, - Status: &models.ControllerStatusStatus{ - SuccessCount: int64(c.successCount), - LastSuccessTimestamp: strfmt.DateTime(c.lastSuccessStamp), - FailureCount: int64(c.failureCount), - LastFailureTimestamp: strfmt.DateTime(c.lastErrorStamp), - ConsecutiveFailureCount: int64(c.consecutiveErrors), - }, - } - - if c.lastError != nil { - status.Status.LastFailureMsg = c.lastError.Error() - } - - return status -} diff --git a/vendor/github.com/cilium/cilium/pkg/counter/counter.go b/vendor/github.com/cilium/cilium/pkg/counter/counter.go deleted file mode 100644 index 16cc30acfa5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/counter/counter.go +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package counter - -// Counter tracks references for comparable . -// -// No thread safety is provided within this structure, the user is expected to -// handle concurrent access to this structure if it is used from multiple -// threads. -type Counter[T comparable] map[T]int - -// Add increments the reference count for the specified key. -func (c Counter[T]) Add(key T) bool { - value, exists := c[key] - c[key] = value + 1 - return !exists -} - -// Delete decrements the reference count for the specified key. -func (c Counter[T]) Delete(key T) bool { - value := c[key] - if value <= 1 { - delete(c, key) - return true - } - c[key] = value - 1 - return false -} - -// DeepCopy makes a new copy of the received Counter. -func (c Counter[T]) DeepCopy() Counter[T] { - result := make(Counter[T], len(c)) - for k, v := range c { - result[k] = v - } - return result -} - -// Deprecated. Use Counter[string] instead. -type StringCounter = Counter[string] diff --git a/vendor/github.com/cilium/cilium/pkg/counter/doc.go b/vendor/github.com/cilium/cilium/pkg/counter/doc.go deleted file mode 100644 index f1c5ff1533e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/counter/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package counter provides generic reference counter objects -package counter diff --git a/vendor/github.com/cilium/cilium/pkg/counter/integer.go b/vendor/github.com/cilium/cilium/pkg/counter/integer.go deleted file mode 100644 index 91f5fe78e6a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/counter/integer.go +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package counter - -import ( - "sort" -) - -// IntCounter tracks references for integers with an optional limiter. -// -// No threadsafety is provided within this structure, the user is expected to -// handle concurrent access to this structure if it is used from multiple -// threads. -type IntCounter Counter[int] - -// Add increments the reference count for the specified integer key. -func (i IntCounter) Add(key int) (changed bool) { - return Counter[int](i).Add(key) -} - -// Delete decrements the reference count for the specified integer key. -func (i IntCounter) Delete(key int) bool { - return Counter[int](i).Delete(key) -} - -// DeepCopy makes a new copy of the received IntCounter. -func (i IntCounter) DeepCopy() IntCounter { - return IntCounter(Counter[int](i).DeepCopy()) -} - -// ToBPFData returns the keys as a slice, sorted from high to low. -func (i IntCounter) ToBPFData() []int { - result := make([]int, 0, len(i)) - for key := range i { - result = append(result, key) - } - sort.Sort(sort.Reverse(sort.IntSlice(result))) - return result -} diff --git a/vendor/github.com/cilium/cilium/pkg/counter/prefixes.go b/vendor/github.com/cilium/cilium/pkg/counter/prefixes.go deleted file mode 100644 index fad776b674b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/counter/prefixes.go +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package counter - -import ( - "fmt" - "net" - "net/netip" - - "github.com/cilium/cilium/pkg/lock" -) - -// PrefixLengthCounter tracks references to prefix lengths, limited by the -// maxUniquePrefixes count. Neither of the IPv4 or IPv6 counters nested within -// may contain more keys than the specified maximum number of unique prefixes. -type PrefixLengthCounter struct { - lock.RWMutex - - v4 IntCounter - v6 IntCounter - - maxUniquePrefixes4 int - maxUniquePrefixes6 int -} - -// NewPrefixLengthCounter returns a new PrefixLengthCounter which limits -// insertions to the specified maximum number of unique prefix lengths. -func NewPrefixLengthCounter(maxUniquePrefixes6, maxUniquePrefixes4 int) *PrefixLengthCounter { - return &PrefixLengthCounter{ - v4: make(IntCounter), - v6: make(IntCounter), - maxUniquePrefixes4: maxUniquePrefixes4, - maxUniquePrefixes6: maxUniquePrefixes6, - } -} - -func createIPNet(ones, bits int) netip.Prefix { - var addr netip.Addr - switch bits { - case net.IPv4len * 8: - addr = netip.IPv4Unspecified() - case net.IPv6len * 8: - addr = netip.IPv6Unspecified() - default: - // fall through to default library error - } - return netip.PrefixFrom(addr, ones) -} - -// DefaultPrefixLengthCounter creates a default prefix length counter that -// already counts the minimum and maximum prefix lengths for IP hosts and -// default routes (ie, /32 and /0). As with NewPrefixLengthCounter, insertions -// are limited to the specified maximum number of unique prefix lengths. -func DefaultPrefixLengthCounter() *PrefixLengthCounter { - maxIPv4 := net.IPv4len*8 + 1 - maxIPv6 := net.IPv6len*8 + 1 - counter := NewPrefixLengthCounter(maxIPv6, maxIPv4) - - defaultPrefixes := []netip.Prefix{ - // IPv4 - createIPNet(0, net.IPv4len*8), // world - createIPNet(net.IPv4len*8, net.IPv4len*8), // hosts - - // IPv6 - createIPNet(0, net.IPv6len*8), // world - createIPNet(net.IPv6len*8, net.IPv6len*8), // hosts - } - if _, err := counter.Add(defaultPrefixes); err != nil { - panic(fmt.Errorf("Failed to create default prefix lengths: %w", err)) - } - - return counter -} - -// checkLimits checks whether the specified new count of prefixes would exceed -// the specified limit on the maximum number of unique keys, and returns an -// error if it would exceed the limit. -func checkLimits(current, newCount, max int) error { - if newCount > max { - return fmt.Errorf("adding specified prefixes would result in too many prefix lengths (current: %d, result: %d, max: %d)", - current, newCount, max) - } - return nil -} - -// Add increments references to prefix lengths for the specified IPNets to the -// counter. If the maximum number of unique prefix lengths would be exceeded, -// returns an error. -// -// Returns true if adding these prefixes results in an increase in the total -// number of unique prefix lengths in the counter. -func (p *PrefixLengthCounter) Add(prefixes []netip.Prefix) (bool, error) { - p.Lock() - defer p.Unlock() - - // Assemble a map of references that need to be added - newV4Counter := p.v4.DeepCopy() - newV6Counter := p.v6.DeepCopy() - newV4Prefixes := false - newV6Prefixes := false - for _, prefix := range prefixes { - ones := prefix.Bits() - bits := prefix.Addr().BitLen() - - switch bits { - case net.IPv4len * 8: - if newV4Counter.Add(ones) { - newV4Prefixes = true - } - case net.IPv6len * 8: - if newV6Counter.Add(ones) { - newV6Prefixes = true - } - default: - return false, fmt.Errorf("unsupported IPAddr bitlength %d", bits) - } - } - - // Check if they can be added given the limit in place - if newV4Prefixes { - if err := checkLimits(len(p.v4), len(newV4Counter), p.maxUniquePrefixes4); err != nil { - return false, err - } - } - if newV6Prefixes { - if err := checkLimits(len(p.v6), len(newV6Counter), p.maxUniquePrefixes6); err != nil { - return false, err - } - } - - // Set and return whether anything changed - p.v4 = newV4Counter - p.v6 = newV6Counter - return newV4Prefixes || newV6Prefixes, nil -} - -// Delete reduces references to prefix lengths in the the specified IPNets from -// the counter. Returns true if removing references to these prefix lengths -// would result in a decrese in the total number of unique prefix lengths in -// the counter. -func (p *PrefixLengthCounter) Delete(prefixes []netip.Prefix) (changed bool) { - p.Lock() - defer p.Unlock() - - for _, prefix := range prefixes { - ones := prefix.Bits() - bits := prefix.Addr().BitLen() - switch bits { - case net.IPv4len * 8: - if p.v4.Delete(ones) { - changed = true - } - case net.IPv6len * 8: - if p.v6.Delete(ones) { - changed = true - } - } - } - - return changed -} - -// ToBPFData converts the counter into a set of prefix lengths that the BPF -// datapath can use for LPM lookup. -func (p *PrefixLengthCounter) ToBPFData() (s6, s4 []int) { - p.RLock() - defer p.RUnlock() - - return p.v6.ToBPFData(), p.v4.ToBPFData() -} diff --git a/vendor/github.com/cilium/cilium/pkg/crypto/certificatemanager/certificate_manager.go b/vendor/github.com/cilium/cilium/pkg/crypto/certificatemanager/certificate_manager.go deleted file mode 100644 index e2378e6c13b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/crypto/certificatemanager/certificate_manager.go +++ /dev/null @@ -1,177 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package certificatemanager - -import ( - "context" - "fmt" - "os" - "path/filepath" - - "github.com/cilium/cilium/pkg/hive/cell" - k8sClient "github.com/cilium/cilium/pkg/k8s/client" - "github.com/cilium/cilium/pkg/policy/api" - - "github.com/spf13/pflag" -) - -var Cell = cell.Module( - "certificate-manager", - "Provides TLS certificates and secrets", - - cell.Provide(NewManager), - - cell.Config(defaultManagerConfig), -) - -type CertificateManager interface { - GetTLSContext(ctx context.Context, tlsCtx *api.TLSContext, ns string) (ca, public, private string, err error) -} - -type SecretManager interface { - GetSecrets(ctx context.Context, secret *api.Secret, ns string) (string, map[string][]byte, error) - GetSecretString(ctx context.Context, secret *api.Secret, ns string) (string, error) -} - -var defaultManagerConfig = managerConfig{ - CertificatesDirectory: "/var/run/cilium/certs", -} - -type managerConfig struct { - // CertificatesDirectory is the root directory to be used by cilium to find - // certificates locally. - CertificatesDirectory string -} - -func (mc managerConfig) Flags(flags *pflag.FlagSet) { - flags.String("certificates-directory", mc.CertificatesDirectory, "Root directory to find certificates specified in L7 TLS policy enforcement") -} - -// Manager will manage the way certificates are retrieved based in the given -// k8sClient and rootPath. -type manager struct { - rootPath string - k8sClient k8sClient.Clientset -} - -// NewManager returns a new manager. -func NewManager(cfg managerConfig, clientset k8sClient.Clientset) (CertificateManager, SecretManager) { - m := &manager{ - rootPath: cfg.CertificatesDirectory, - k8sClient: clientset, - } - - return m, m -} - -// GetSecrets returns either local or k8s secrets, giving precedence for local secrets if configured. -// The 'ns' parameter is used as the secret namespace if 'secret.Namespace' is an empty string. -func (m *manager) GetSecrets(ctx context.Context, secret *api.Secret, ns string) (string, map[string][]byte, error) { - if secret == nil { - return "", nil, fmt.Errorf("Secret must not be nil") - } - - if secret.Namespace != "" { - ns = secret.Namespace - } - - if secret.Name == "" { - return ns, nil, fmt.Errorf("Missing Secret name") - } - nsName := filepath.Join(ns, secret.Name) - - // Give priority to local secrets. - // K8s API request is only done if the local secret directory can't be read! - certPath := filepath.Join(m.rootPath, nsName) - files, ioErr := os.ReadDir(certPath) - if ioErr == nil { - secrets := make(map[string][]byte, len(files)) - for _, file := range files { - var bytes []byte - - path := filepath.Join(certPath, file.Name()) - bytes, ioErr = os.ReadFile(path) - if ioErr == nil { - secrets[file.Name()] = bytes - } - } - // Return the (latest) error only if no secrets were found - if len(secrets) == 0 && ioErr != nil { - return nsName, nil, ioErr - } - return nsName, secrets, nil - } - secrets, err := m.k8sClient.GetSecrets(ctx, ns, secret.Name) - return nsName, secrets, err -} - -const ( - caDefaultName = "ca.crt" - publicDefaultName = "tls.crt" - privateDefaultName = "tls.key" -) - -// GetTLSContext returns a new ca, public and private certificates found based -// in the given api.TLSContext. -func (m *manager) GetTLSContext(ctx context.Context, tlsCtx *api.TLSContext, ns string) (ca, public, private string, err error) { - name, secrets, err := m.GetSecrets(ctx, tlsCtx.Secret, ns) - if err != nil { - return "", "", "", err - } - - caName := caDefaultName - if tlsCtx.TrustedCA != "" { - caName = tlsCtx.TrustedCA - } - caBytes, ok := secrets[caName] - if ok { - ca = string(caBytes) - } else if tlsCtx.TrustedCA != "" { - return "", "", "", fmt.Errorf("Trusted CA %s not found in secret %s", caName, name) - } - - publicName := publicDefaultName - if tlsCtx.Certificate != "" { - publicName = tlsCtx.Certificate - } - publicBytes, ok := secrets[publicName] - if ok { - public = string(publicBytes) - } else if tlsCtx.Certificate != "" { - return "", "", "", fmt.Errorf("Certificate %s not found in secret %s", publicName, name) - } - - privateName := privateDefaultName - if tlsCtx.PrivateKey != "" { - privateName = tlsCtx.PrivateKey - } - privateBytes, ok := secrets[privateName] - if ok { - private = string(privateBytes) - } else if tlsCtx.PrivateKey != "" { - return "", "", "", fmt.Errorf("Private Key %s not found in secret %s", privateName, name) - } - - if caBytes == nil && publicBytes == nil && privateBytes == nil { - return "", "", "", fmt.Errorf("TLS certificates not found in secret %s ", name) - } - - return ca, public, private, nil -} - -// GetSecretString returns a secret string stored in a k8s secret -func (m *manager) GetSecretString(ctx context.Context, secret *api.Secret, ns string) (string, error) { - name, secrets, err := m.GetSecrets(ctx, secret, ns) - if err != nil { - return "", err - } - - if len(secrets) == 1 { - // get the lone item by looping into the map - for _, value := range secrets { - return string(value), nil - } - } - return "", fmt.Errorf("Secret %s must have exactly one item", name) -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/bandwidth.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/bandwidth.go deleted file mode 100644 index 8afcc2b1bbc..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/bandwidth.go +++ /dev/null @@ -1,303 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build linux - -// NOTE: We can only build on linux because we import bwmap which in turn imports pkg/ebpf and pkg/bpf -// which throw build errors when building on non-linux platforms. - -package bandwidth - -import ( - "fmt" - - "github.com/cilium/ebpf" - "github.com/cilium/ebpf/asm" - "github.com/sirupsen/logrus" - "github.com/vishvananda/netlink" - "k8s.io/apimachinery/pkg/api/resource" - - "github.com/cilium/cilium/pkg/datapath/linux/config/defines" - "github.com/cilium/cilium/pkg/datapath/linux/probes" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/maps/bwmap" - "github.com/cilium/cilium/pkg/sysctl" -) - -const ( - // EgressBandwidth is the K8s Pod annotation. - EgressBandwidth = "kubernetes.io/egress-bandwidth" - // IngressBandwidth is the K8s Pod annotation. - IngressBandwidth = "kubernetes.io/ingress-bandwidth" - - EnableBBR = "enable-bbr" - - // FqDefaultHorizon represents maximum allowed departure - // time delta in future. Given applications can set SO_TXTIME - // from user space this is a limit to prevent buggy applications - // to fill the FQ qdisc. - FqDefaultHorizon = bwmap.DefaultDropHorizon - // FqDefaultBuckets is the default 32k (2^15) bucket limit for bwm. - // Too low bucket limit can cause scalability issue. - FqDefaultBuckets = 15 -) - -type manager struct { - resetQueues, enabled bool - - params bandwidthManagerParams -} - -func (m *manager) Enabled() bool { - return m.enabled -} - -func (m *manager) BBREnabled() bool { - return m.params.Config.EnableBBR -} - -func (m *manager) defines() (defines.Map, error) { - cDefinesMap := make(defines.Map) - if m.resetQueues { - cDefinesMap["RESET_QUEUES"] = "1" - } - - if m.Enabled() { - cDefinesMap["ENABLE_BANDWIDTH_MANAGER"] = "1" - cDefinesMap["THROTTLE_MAP"] = bwmap.MapName - cDefinesMap["THROTTLE_MAP_SIZE"] = fmt.Sprintf("%d", bwmap.MapSize) - } - - return cDefinesMap, nil -} - -func (m *manager) DeleteEndpointBandwidthLimit(epID uint16) error { - if m.enabled { - return bwmap.Delete(epID) - } - return nil -} - -func GetBytesPerSec(bandwidth string) (uint64, error) { - res, err := resource.ParseQuantity(bandwidth) - if err != nil { - return 0, err - } - return uint64(res.Value() / 8), err -} - -// probe checks the various system requirements of the bandwidth manager and disables it if they are -// not met. -func (m *manager) probe() error { - // We at least need 5.1 kernel for native TCP EDT integration - // and writable queue_mapping that we use. Below helper is - // available for 5.1 kernels and onwards. - kernelGood := probes.HaveProgramHelper(ebpf.SchedCLS, asm.FnSkbEcnSetCe) == nil - m.resetQueues = kernelGood - if !m.params.Config.EnableBandwidthManager { - return nil - } - if _, err := sysctl.Read("net.core.default_qdisc"); err != nil { - m.params.Log.WithError(err).Warn("BPF bandwidth manager could not read procfs. Disabling the feature.") - return nil - } - if !kernelGood { - m.params.Log.Warn("BPF bandwidth manager needs kernel 5.1 or newer. Disabling the feature.") - return nil - } - if m.params.Config.EnableBBR { - // We at least need 5.18 kernel for Pod-based BBR TCP congestion - // control since earlier kernels just clear the skb->tstamp upon - // netns traversal. See also: - // - // - https://lpc.events/event/11/contributions/953/ - // - https://lore.kernel.org/bpf/20220302195519.3479274-1-kafai@fb.com/ - if probes.HaveProgramHelper(ebpf.SchedCLS, asm.FnSkbSetTstamp) != nil { - return fmt.Errorf("cannot enable --%s, needs kernel 5.18 or newer", EnableBBR) - } - } - - // Going via host stack will orphan skb->sk, so we do need BPF host - // routing for it to work properly. - if m.params.Config.EnableBBR && m.params.DaemonConfig.EnableHostLegacyRouting { - return fmt.Errorf("BPF bandwidth manager's BBR setup requires BPF host routing.") - } - - if m.params.Config.EnableBandwidthManager && m.params.DaemonConfig.EnableIPSec { - m.params.Log.Warning("The bandwidth manager cannot be used with IPSec. Disabling the bandwidth manager.") - return nil - } - - m.enabled = true - return nil -} - -func (m *manager) init() error { - // TODO make the bwmanager reactive by using the (currently ignored) watch channel, which is - // closed when there's new or changed devices. - devs := m.params.DaemonConfig.GetDevices() - if len(devs) == 0 { - m.params.Log.Warn("BPF bandwidth manager could not detect host devices. Disabling the feature.") - m.enabled = false - return nil - } - - m.params.Log.Info("Setting up BPF bandwidth manager") - - if err := bwmap.ThrottleMap().OpenOrCreate(); err != nil { - return fmt.Errorf("failed to access ThrottleMap: %w", err) - } - - if err := setBaselineSysctls(m.params); err != nil { - return fmt.Errorf("failed to set sysctl needed by BPF bandwidth manager: %w", err) - } - - // Pass 1: Set up Qdiscs. - for _, device := range devs { - link, err := netlink.LinkByName(device) - if err != nil { - m.params.Log.WithError(err).WithField("device", device).Warn("Link does not exist") - continue - } - // We strictly want to avoid a down/up cycle on the device at - // runtime, so given we've changed the default qdisc to FQ, we - // need to reset the root qdisc, and then set up MQ which will - // automatically get FQ leaf qdiscs (given it's been default). - qdisc := &netlink.GenericQdisc{ - QdiscAttrs: netlink.QdiscAttrs{ - LinkIndex: link.Attrs().Index, - Parent: netlink.HANDLE_ROOT, - }, - QdiscType: "noqueue", - } - if err := netlink.QdiscReplace(qdisc); err != nil { - return fmt.Errorf("cannot replace root Qdisc to %s on device %s: %w", qdisc.QdiscType, device, err) - } - qdisc = &netlink.GenericQdisc{ - QdiscAttrs: netlink.QdiscAttrs{ - LinkIndex: link.Attrs().Index, - Parent: netlink.HANDLE_ROOT, - }, - QdiscType: "mq", - } - which := "mq with fq leaves" - if err := netlink.QdiscReplace(qdisc); err != nil { - // No MQ support, so just replace to FQ directly. - fq := &netlink.Fq{ - QdiscAttrs: netlink.QdiscAttrs{ - LinkIndex: link.Attrs().Index, - Parent: netlink.HANDLE_ROOT, - }, - Pacing: 1, - } - // At this point there is nothing we can do about - // it if we fail here, so hard bail out. - if err = netlink.QdiscReplace(fq); err != nil { - return fmt.Errorf("cannot replace root Qdisc to %s on device %s: %w", fq.Type(), device, err) - } - which = "fq" - } - m.params.Log.WithField("device", device).Infof("Setting qdisc to %s", which) - } - - // Pass 2: Iterate over leaf qdiscs and tweak their parameters. - for _, device := range devs { - link, err := netlink.LinkByName(device) - if err != nil { - m.params.Log.WithError(err).WithField("device", device).Warn("Link does not exist") - continue - } - qdiscs, err := netlink.QdiscList(link) - if err != nil { - m.params.Log.WithError(err).WithField("device", device).Warn("Cannot dump qdiscs") - continue - } - for _, qdisc := range qdiscs { - if qdisc.Type() == "fq" { - fq, _ := qdisc.(*netlink.Fq) - fq.Horizon = uint32(FqDefaultHorizon.Microseconds()) - fq.Buckets = uint32(FqDefaultBuckets) - if err := netlink.QdiscReplace(qdisc); err != nil { - m.params.Log.WithError(err).WithField("device", device).Warn("Cannot upgrade qdisc attributes") - } - } - } - } - return nil -} - -func setBaselineSysctls(p bandwidthManagerParams) error { - // Ensure interger type sysctls are no smaller than our baseline settings - baseIntSettings := map[string]int64{ - "net.core.netdev_max_backlog": 1000, - "net.core.somaxconn": 4096, - "net.ipv4.tcp_max_syn_backlog": 4096, - } - - for name, value := range baseIntSettings { - currentValue, err := sysctl.ReadInt(name) - if err != nil { - return fmt.Errorf("read sysctl %s failed: %w", name, err) - } - - scopedLog := p.Log.WithFields(logrus.Fields{ - logfields.SysParamName: name, - logfields.SysParamValue: currentValue, - "baselineValue": value, - }) - - if currentValue >= value { - scopedLog.Info("Skip setting sysctl as it already meets baseline") - continue - } - - scopedLog.Info("Setting sysctl to baseline for BPF bandwidth manager") - if err := sysctl.WriteInt(name, value); err != nil { - return fmt.Errorf("set sysctl %s=%d failed: %w", name, value, err) - } - } - - // Ensure string type sysctls - congctl := "cubic" - if p.Config.EnableBBR { - congctl = "bbr" - } - - baseStringSettings := map[string]string{ - "net.core.default_qdisc": "fq", - "net.ipv4.tcp_congestion_control": congctl, - } - - for name, value := range baseStringSettings { - p.Log.WithFields(logrus.Fields{ - logfields.SysParamName: name, - "baselineValue": value, - }).Info("Setting sysctl to baseline for BPF bandwidth manager") - - if err := sysctl.Write(name, value); err != nil { - return fmt.Errorf("set sysctl %s=%s failed: %w", name, value, err) - } - } - - // Extra settings - extraSettings := map[string]int64{ - "net.ipv4.tcp_slow_start_after_idle": 0, - } - - // Few extra knobs which can be turned on along with pacing. EnableBBR - // also provides the right kernel dependency implicitly as well. - if p.Config.EnableBBR { - for name, value := range extraSettings { - p.Log.WithFields(logrus.Fields{ - logfields.SysParamName: name, - "baselineValue": value, - }).Info("Setting sysctl to baseline for BPF bandwidth manager") - - if err := sysctl.WriteInt(name, value); err != nil { - return fmt.Errorf("set sysctl %s=%d failed: %w", name, value, err) - } - } - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/cell.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/cell.go deleted file mode 100644 index b572519439a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/cell.go +++ /dev/null @@ -1,72 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build linux - -// NOTE: We can only build on linux because we import bwmap which in turn imports pkg/ebpf and pkg/bpf -// which throw build errors when building on non-linux platforms. - -package bandwidth - -import ( - "github.com/sirupsen/logrus" - "github.com/spf13/pflag" - - "github.com/cilium/cilium/pkg/datapath/linux/config/defines" - "github.com/cilium/cilium/pkg/hive/cell" - "github.com/cilium/cilium/pkg/option" -) - -var Cell = cell.Module( - "bandwidth-manager", - "Linux Bandwidth Manager for EDT-based pacing", - - cell.Config(Config{false, false}), - cell.Provide(newBandwidthManager), -) - -type Config struct { - // EnableBandwidthManager enables EDT-based pacing - EnableBandwidthManager bool - - // EnableBBR enables BBR TCP congestion control for the node including Pods - EnableBBR bool -} - -func (def Config) Flags(flags *pflag.FlagSet) { - flags.Bool("enable-bandwidth-manager", def.EnableBandwidthManager, "Enable BPF bandwidth manager") - flags.Bool(EnableBBR, def.EnableBBR, "Enable BBR for the bandwidth manager") -} - -func newBandwidthManager(lc cell.Lifecycle, p bandwidthManagerParams) (Manager, defines.NodeFnOut) { - m := &manager{params: p} - - if !option.Config.DryMode { - lc.Append(m) - } - - return m, defines.NewNodeFnOut(m.defines) -} - -func (m *manager) Start(cell.HookContext) error { - err := m.probe() - if err != nil { - return err - } else if !m.enabled { - return nil - } - - return m.init() -} - -func (*manager) Stop(cell.HookContext) error { - return nil -} - -type bandwidthManagerParams struct { - cell.In - - Log logrus.FieldLogger - Config Config - DaemonConfig *option.DaemonConfig -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/doc.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/doc.go deleted file mode 100644 index 6ad693fa9c8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package bandwidth provides efficient EDT-based rate-limiting. -package bandwidth diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/types.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/types.go deleted file mode 100644 index 89b6e5a1ee9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/bandwidth/types.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package bandwidth - -type Manager interface { - BBREnabled() bool - DeleteEndpointBandwidthLimit(epID uint16) error - Enabled() bool -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/config/defines/defines.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/config/defines/defines.go deleted file mode 100644 index edaafe1067d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/config/defines/defines.go +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package defines - -import ( - "fmt" - - "github.com/cilium/cilium/pkg/hive/cell" -) - -// Map is the type containing the key-value pairs representing extra define -// directives for datapath node configuration. -type Map map[string]string - -func (m Map) Merge(other Map) error { - for key, value := range other { - if _, ok := m[key]; ok { - return fmt.Errorf("extra node define overwrites key %q", key) - } - - m[key] = value - } - return nil -} - -// NodeOut allows injecting configuration into the datapath. -type NodeOut struct { - cell.Out - NodeDefines Map `group:"header-node-defines"` -} - -// Fn is a function returning the key-value pairs representing extra define -// directives for datapath node configuration. -type Fn func() (Map, error) - -// NodeFnOut allows injecting configuration into the datapath -// by invoking a callback. -// -// Prefer using [NodeOut] if possible since it has a valid zero value. -type NodeFnOut struct { - cell.Out - // Fn must not be nil. - Fn `group:"header-node-define-fns"` -} - -// NewNodeFnOut wraps a function returning the key-value pairs representing -// extra define directives for datapath node configuration, so that it can be -// provided through the hive framework. -func NewNodeFnOut(fn Fn) NodeFnOut { - return NodeFnOut{Fn: fn} -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/attach_cgroup.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/attach_cgroup.go deleted file mode 100644 index 33ca8842645..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/attach_cgroup.go +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package probes - -import ( - "errors" - "fmt" - "sync" - - "github.com/cilium/ebpf" - "github.com/cilium/ebpf/asm" - "github.com/cilium/ebpf/link" - "golang.org/x/sys/unix" -) - -// HaveAttachCgroup returns nil if the kernel is compiled with -// CONFIG_CGROUP_BPF. -// -// It's only an approximation and doesn't execute a successful cgroup attachment -// under the hood. If any unexpected errors are encountered, the original error -// is returned. -func HaveAttachCgroup() error { - attachCgroupOnce.Do(func() { - attachCgroupResult = haveAttachCgroup() - }) - - return attachCgroupResult -} - -func haveAttachCgroup() error { - // Load known-good program supported by the earliest kernels with cgroup - // support. - spec := &ebpf.ProgramSpec{ - Type: ebpf.CGroupSKB, - AttachType: ebpf.AttachCGroupInetIngress, - Instructions: asm.Instructions{ - asm.LoadImm(asm.R0, 0, asm.DWord), - asm.Return(), - }, - } - - p, err := ebpf.NewProgramWithOptions(spec, ebpf.ProgramOptions{ - LogDisabled: true, - }) - if err != nil { - return fmt.Errorf("create cgroup program: %w: %w", err, ebpf.ErrNotSupported) - } - defer p.Close() - - // Attaching to a non-cgroup node should result in EBADF when creating the - // link, compared to EINVAL if the kernel does not support or was compiled - // without CONFIG_CGROUP_BPF. - _, err = link.AttachCgroup(link.CgroupOptions{Path: "/dev/null", Program: p, Attach: spec.AttachType}) - if errors.Is(err, unix.EBADF) { - // The kernel checked the given file descriptor from within the cgroup prog - // attach handler. Assume it supports attaching cgroup progs. - return nil - } - if err != nil { - // Preserve the original error in the error string. Needs Go 1.20. - return fmt.Errorf("link cgroup program to /dev/null: %w: %w", err, ebpf.ErrNotSupported) - } - - return errors.New("attaching prog to /dev/null did not result in error") -} - -var attachCgroupOnce sync.Once -var attachCgroupResult error diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/attach_type.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/attach_type.go deleted file mode 100644 index 5ce0c0aa9a8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/attach_type.go +++ /dev/null @@ -1,81 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package probes - -import ( - "errors" - - "golang.org/x/sys/unix" - - "github.com/cilium/ebpf" - "github.com/cilium/ebpf/asm" - "github.com/cilium/ebpf/features" - - "github.com/cilium/cilium/pkg/lock" -) - -// HaveAttachType returns nil if the given program/attach type combination is -// supported by the underlying kernel. Returns ebpf.ErrNotSupported if loading a -// program with the given Program/AttachType fails. If the probe is inconclusive -// due to an unrecognized return code, the original error is returned. -// -// Note that program types that don't use attach types will silently succeed if -// an attach type is specified. -// -// Probe results are cached by the package and shouldn't be memoized by the -// caller. -func HaveAttachType(pt ebpf.ProgramType, at ebpf.AttachType) (err error) { - if err := features.HaveProgramType(pt); err != nil { - return err - } - - attachProbesMu.Lock() - defer attachProbesMu.Unlock() - if err, ok := attachProbes[attachProbe{pt, at}]; ok { - return err - } - - defer func() { - // Closes over named return variable err to cache any returned errors. - attachProbes[attachProbe{pt, at}] = err - }() - - spec := &ebpf.ProgramSpec{ - Type: pt, - AttachType: at, - Instructions: asm.Instructions{ - // recvmsg and peername require a return value of 1, use it for all probes. - asm.LoadImm(asm.R0, 1, asm.DWord), - asm.Return(), - }, - } - - prog, err := ebpf.NewProgramWithOptions(spec, ebpf.ProgramOptions{ - LogDisabled: true, - }) - if err == nil { - prog.Close() - } - - // EINVAL occurs when attempting to create a program with an unknown type. - // E2BIG occurs when ProgLoadAttr contains non-zero bytes past the end - // of the struct known by the running kernel, meaning the kernel is too old - // to support the given prog type. - if errors.Is(err, unix.EINVAL) || errors.Is(err, unix.E2BIG) { - err = ebpf.ErrNotSupported - } - if err != nil { - return err - } - - return nil -} - -type attachProbe struct { - pt ebpf.ProgramType - at ebpf.AttachType -} - -var attachProbesMu lock.Mutex -var attachProbes map[attachProbe]error = make(map[attachProbe]error) diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/doc.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/doc.go deleted file mode 100644 index 285c8851d52..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package probes provides BPF features checks based on bpftool. -package probes diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/kernel_hz.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/kernel_hz.go deleted file mode 100644 index c815eb729e4..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/kernel_hz.go +++ /dev/null @@ -1,151 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package probes - -import ( - "bufio" - "errors" - "fmt" - "io" - "math" - "os" - "time" -) - -// Available CONFIG_HZ values, sorted from highest to lowest. -var hzValues = []uint16{1000, 300, 250, 100} - -// KernelHZ attempts to estimate the kernel's CONFIG_HZ compile-time value by -// making snapshots of the kernel timestamp with a time interval in between. -// -// Blocks for at least 100ms while the measurement is in progress. Can block -// significantly longer under some hypervisors like VirtualBox due to buggy -// clocks, interrupt coalescing and low timer resolution. -func KernelHZ() (uint16, error) { - f, err := os.Open("/proc/schedstat") - if err != nil { - return 0, err - } - defer f.Close() - - // Measure the kernel timestamp at least 100ms apart, giving kernel timer and - // wall clock ample opportunity to advance for adequate sample size. - j1, err := readSchedstat(f) - if err != nil { - return 0, err - } - - // On some platforms, this can put the goroutine to sleep for significantly - // longer than 100ms. Do not rely on readings being anywhere near 100ms apart. - time.Sleep(time.Millisecond * 100) - - j2, err := readSchedstat(f) - if err != nil { - return 0, err - } - - hz, err := j1.interpolate(j2) - if err != nil { - return 0, fmt.Errorf("interpolating hz value: %w", err) - } - - return nearest(hz, hzValues) -} - -// Jiffies returns the kernel's internal timestamp in jiffies read from -// /proc/schedstat. -func Jiffies() (uint64, error) { - f, err := os.Open("/proc/schedstat") - if err != nil { - return 0, err - } - defer f.Close() - - k, err := readSchedstat(f) - if err != nil { - return 0, err - } - - return k.k, nil -} - -// readSchedstat expects to read /proc/schedstat and returns the first line -// matching 'timestamp %d'. Upon return, f is rewound to allow reuse. -// -// Should not be called concurrently. -func readSchedstat(f io.ReadSeeker) (ktime, error) { - // Rewind the file when done so the next call gets fresh data. - defer func() { _, _ = f.Seek(0, 0) }() - - var j uint64 - var t = time.Now() - - s := bufio.NewScanner(f) - for s.Scan() { - if _, err := fmt.Sscanf(s.Text(), "timestamp %d", &j); err == nil { - return ktime{j, t}, nil - } - } - - return ktime{}, errors.New("no kernel timestamp found") -} - -type ktime struct { - k uint64 - t time.Time -} - -// interpolate returns the amount of jiffies (ktime) that would have elapsed if -// both ktimes were measured exactly 1 second apart. Using linear interpolation, -// the delta between both kernel timestamps is adjusted based on the elapsed -// wall time between both measurements. -func (old ktime) interpolate(new ktime) (uint16, error) { - if old.t.After(new.t) { - return 0, fmt.Errorf("old wall time %v is more recent than %v", old.t, new.t) - } - if old.k > new.k { - return 0, fmt.Errorf("old kernel timer %d is higher than %d", old.k, new.k) - } - - // Jiffy and duration delta. - kd := new.k - old.k - td := new.t.Sub(old.t) - - // Linear interpolation to represent elapsed jiffies as a per-second value. - hz := float64(kd) / td.Seconds() - hz = math.Round(hz) - if hz > math.MaxUint16 { - return 0, fmt.Errorf("interpolated hz value would overflow uint16: %f", hz) - } - - return uint16(hz), nil -} - -// nearest returns the entry from values that's closest to in. If in has an -// equal distance to multiple values, the value that appears the earliest in -// values wins. Returns error if values is empty. -func nearest(in uint16, values []uint16) (uint16, error) { - if len(values) == 0 { - return 0, errors.New("values cannot be empty") - } - - var out uint16 - min := ^uint16(0) - for _, v := range values { - // Get absolute distance between in and v. - d := uint16(in - v) - if in < v { - d = v - in - } - - // Check if the distance to the current number is smaller than to the - // previous number. - if d < min { - min = d - out = v - } - } - - return out, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/managed_neighbors.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/managed_neighbors.go deleted file mode 100644 index 2d8196d5352..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/managed_neighbors.go +++ /dev/null @@ -1,117 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package probes - -import ( - "errors" - "fmt" - "net" - "runtime" - "sync" - - "github.com/vishvananda/netlink" - "github.com/vishvananda/netns" -) - -var ( - managedNeighborOnce sync.Once - managedNeighborResult error -) - -// HaveManagedNeighbors returns nil if the host supports managed neighbor entries (NTF_EXT_MANAGED). -// On unexpected probe results this function will terminate with log.Fatal(). -func HaveManagedNeighbors() error { - managedNeighborOnce.Do(func() { - ch := make(chan struct{}) - - // In order to call haveManagedNeighbors safely, it has to be started - // in a goroutine, so we can make sure the goroutine ends when the function exits. - // This makes sure the underlying OS thread exits if we fail to restore it to the original netns. - go func() { - managedNeighborResult = haveManagedNeighbors() - close(ch) - }() - <-ch // wait for probe to finish - - // if we encounter a different error than ErrNotSupported, terminate the agent. - if managedNeighborResult != nil && !errors.Is(managedNeighborResult, ErrNotSupported) { - log.WithError(managedNeighborResult).Fatal("failed to probe managed neighbor support") - } - }) - - return managedNeighborResult -} - -func haveManagedNeighbors() (outer error) { - runtime.LockOSThread() - oldns, err := netns.Get() - if err != nil { - return fmt.Errorf("failed to get current netns: %w", err) - } - defer oldns.Close() - - newns, err := netns.New() - if err != nil { - return fmt.Errorf("failed to create new netns: %w", err) - } - defer newns.Close() - defer func() { - // defer closes over named return variable err - if nerr := netns.Set(oldns); nerr != nil { - // The current goroutine is locked to an OS thread and we've failed - // to undo state modifications to the thread. Returning without unlocking - // the goroutine will make sure the underlying OS thread dies. - outer = fmt.Errorf("error setting thread back to its original netns: %w (original error: %w)", nerr, outer) - return - } - // only now that we have successfully changed the thread back to its - // original state (netns) we can safely unlock the goroutine from its OS thread. - runtime.UnlockOSThread() - }() - - // Use a veth device instead of a dummy to avoid the kernel having to modprobe - // the dummy kmod, which could potentially be compiled out. veth is currently - // a hard dependency for Cilium, so safe to assume the module is available if - // not already loaded. - veth := &netlink.Veth{ - LinkAttrs: netlink.LinkAttrs{Name: "veth0"}, - PeerName: "veth1", - } - - if err := netlink.LinkAdd(veth); err != nil { - return fmt.Errorf("failed to add dummy veth: %w", err) - } - - neigh := netlink.Neigh{ - LinkIndex: veth.Index, - IP: net.IPv4(0, 0, 0, 1), - Flags: NTF_EXT_LEARNED, - FlagsExt: NTF_EXT_MANAGED, - } - - if err := netlink.NeighAdd(&neigh); err != nil { - return fmt.Errorf("failed to add neighbor: %w", err) - } - - nl, err := netlink.NeighList(veth.Index, 0) - if err != nil { - return fmt.Errorf("failed to list neighbors: %w", err) - } - - for _, n := range nl { - if !n.IP.Equal(neigh.IP) { - continue - } - if n.Flags != NTF_EXT_LEARNED { - continue - } - if n.FlagsExt != NTF_EXT_MANAGED { - continue - } - - return nil - } - - return ErrNotSupported -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go deleted file mode 100644 index 0bc687aa972..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes.go +++ /dev/null @@ -1,700 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package probes - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "net" - "os" - "path/filepath" - "strings" - "sync" - "text/template" - - "github.com/cilium/ebpf" - "github.com/cilium/ebpf/asm" - "github.com/cilium/ebpf/features" - "github.com/google/gopacket" - "github.com/google/gopacket/layers" - "golang.org/x/sys/unix" - - "github.com/cilium/cilium/pkg/command/exec" - "github.com/cilium/cilium/pkg/defaults" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "probes") - once sync.Once - probeManager *ProbeManager - tpl = template.New("headerfile") -) - -func init() { - const content = ` -/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ -/* Copyright Authors of Cilium */ - -/* THIS FILE WAS GENERATED DURING AGENT STARTUP. */ - -#pragma once - -{{- if not .Common}} -#include "features.h" -{{- end}} - -{{- range $key, $value := .Features}} -{{- if $value}} -#define {{$key}} 1 -{{end}} -{{- end}} -` - var err error - tpl, err = tpl.Parse(content) - if err != nil { - log.WithError(err).Fatal("could not parse headerfile template") - } -} - -// ErrNotSupported indicates that a feature is not supported by the current kernel. -var ErrNotSupported = errors.New("not supported") - -// KernelParam is a type based on string which represents CONFIG_* kernel -// parameters which usually have values "y", "n" or "m". -type KernelParam string - -// Enabled checks whether the kernel parameter is enabled. -func (kp KernelParam) Enabled() bool { - return kp == "y" -} - -// Module checks whether the kernel parameter is enabled as a module. -func (kp KernelParam) Module() bool { - return kp == "m" -} - -// kernelOption holds information about kernel parameters to probe. -type kernelOption struct { - Description string - Enabled bool - CanBeModule bool -} - -type ProgramHelper struct { - Program ebpf.ProgramType - Helper asm.BuiltinFunc -} - -type miscFeatures struct { - HaveLargeInsnLimit bool - HaveFibIfindex bool -} - -type FeatureProbes struct { - ProgramHelpers map[ProgramHelper]bool - Misc miscFeatures -} - -// SystemConfig contains kernel configuration and sysctl parameters related to -// BPF functionality. -type SystemConfig struct { - UnprivilegedBpfDisabled int `json:"unprivileged_bpf_disabled"` - BpfJitEnable int `json:"bpf_jit_enable"` - BpfJitHarden int `json:"bpf_jit_harden"` - BpfJitKallsyms int `json:"bpf_jit_kallsyms"` - BpfJitLimit int `json:"bpf_jit_limit"` - ConfigBpf KernelParam `json:"CONFIG_BPF"` - ConfigBpfSyscall KernelParam `json:"CONFIG_BPF_SYSCALL"` - ConfigHaveEbpfJit KernelParam `json:"CONFIG_HAVE_EBPF_JIT"` - ConfigBpfJit KernelParam `json:"CONFIG_BPF_JIT"` - ConfigBpfJitAlwaysOn KernelParam `json:"CONFIG_BPF_JIT_ALWAYS_ON"` - ConfigCgroups KernelParam `json:"CONFIG_CGROUPS"` - ConfigCgroupBpf KernelParam `json:"CONFIG_CGROUP_BPF"` - ConfigCgroupNetClassID KernelParam `json:"CONFIG_CGROUP_NET_CLASSID"` - ConfigSockCgroupData KernelParam `json:"CONFIG_SOCK_CGROUP_DATA"` - ConfigBpfEvents KernelParam `json:"CONFIG_BPF_EVENTS"` - ConfigKprobeEvents KernelParam `json:"CONFIG_KPROBE_EVENTS"` - ConfigUprobeEvents KernelParam `json:"CONFIG_UPROBE_EVENTS"` - ConfigTracing KernelParam `json:"CONFIG_TRACING"` - ConfigFtraceSyscalls KernelParam `json:"CONFIG_FTRACE_SYSCALLS"` - ConfigFunctionErrorInjection KernelParam `json:"CONFIG_FUNCTION_ERROR_INJECTION"` - ConfigBpfKprobeOverride KernelParam `json:"CONFIG_BPF_KPROBE_OVERRIDE"` - ConfigNet KernelParam `json:"CONFIG_NET"` - ConfigXdpSockets KernelParam `json:"CONFIG_XDP_SOCKETS"` - ConfigLwtunnelBpf KernelParam `json:"CONFIG_LWTUNNEL_BPF"` - ConfigNetActBpf KernelParam `json:"CONFIG_NET_ACT_BPF"` - ConfigNetClsBpf KernelParam `json:"CONFIG_NET_CLS_BPF"` - ConfigNetClsAct KernelParam `json:"CONFIG_NET_CLS_ACT"` - ConfigNetSchIngress KernelParam `json:"CONFIG_NET_SCH_INGRESS"` - ConfigXfrm KernelParam `json:"CONFIG_XFRM"` - ConfigIPRouteClassID KernelParam `json:"CONFIG_IP_ROUTE_CLASSID"` - ConfigIPv6Seg6Bpf KernelParam `json:"CONFIG_IPV6_SEG6_BPF"` - ConfigBpfLircMode2 KernelParam `json:"CONFIG_BPF_LIRC_MODE2"` - ConfigBpfStreamParser KernelParam `json:"CONFIG_BPF_STREAM_PARSER"` - ConfigNetfilterXtMatchBpf KernelParam `json:"CONFIG_NETFILTER_XT_MATCH_BPF"` - ConfigBpfilter KernelParam `json:"CONFIG_BPFILTER"` - ConfigBpfilterUmh KernelParam `json:"CONFIG_BPFILTER_UMH"` - ConfigTestBpf KernelParam `json:"CONFIG_TEST_BPF"` - ConfigKernelHz KernelParam `json:"CONFIG_HZ"` -} - -// MapTypes contains bools indicating which types of BPF maps the currently -// running kernel supports. -type MapTypes struct { - HaveHashMapType bool `json:"have_hash_map_type"` - HaveArrayMapType bool `json:"have_array_map_type"` - HaveProgArrayMapType bool `json:"have_prog_array_map_type"` - HavePerfEventArrayMapType bool `json:"have_perf_event_array_map_type"` - HavePercpuHashMapType bool `json:"have_percpu_hash_map_type"` - HavePercpuArrayMapType bool `json:"have_percpu_array_map_type"` - HaveStackTraceMapType bool `json:"have_stack_trace_map_type"` - HaveCgroupArrayMapType bool `json:"have_cgroup_array_map_type"` - HaveLruHashMapType bool `json:"have_lru_hash_map_type"` - HaveLruPercpuHashMapType bool `json:"have_lru_percpu_hash_map_type"` - HaveLpmTrieMapType bool `json:"have_lpm_trie_map_type"` - HaveArrayOfMapsMapType bool `json:"have_array_of_maps_map_type"` - HaveHashOfMapsMapType bool `json:"have_hash_of_maps_map_type"` - HaveDevmapMapType bool `json:"have_devmap_map_type"` - HaveSockmapMapType bool `json:"have_sockmap_map_type"` - HaveCpumapMapType bool `json:"have_cpumap_map_type"` - HaveXskmapMapType bool `json:"have_xskmap_map_type"` - HaveSockhashMapType bool `json:"have_sockhash_map_type"` - HaveCgroupStorageMapType bool `json:"have_cgroup_storage_map_type"` - HaveReuseportSockarrayMapType bool `json:"have_reuseport_sockarray_map_type"` - HavePercpuCgroupStorageMapType bool `json:"have_percpu_cgroup_storage_map_type"` - HaveQueueMapType bool `json:"have_queue_map_type"` - HaveStackMapType bool `json:"have_stack_map_type"` -} - -// Features contains BPF feature checks returned by bpftool. -type Features struct { - SystemConfig `json:"system_config"` - MapTypes `json:"map_types"` -} - -// ProbeManager is a manager of BPF feature checks. -type ProbeManager struct { - features Features -} - -// NewProbeManager returns a new instance of ProbeManager - a manager of BPF -// feature checks. -func NewProbeManager() *ProbeManager { - newProbeManager := func() { - probeManager = &ProbeManager{} - probeManager.features = probeManager.Probe() - } - once.Do(newProbeManager) - return probeManager -} - -// Probe probes the underlying kernel for features. -func (*ProbeManager) Probe() Features { - var features Features - out, err := exec.WithTimeout( - defaults.ExecTimeout, - "bpftool", "-j", "feature", "probe", - ).CombinedOutput(log, true) - if err != nil { - log.WithError(err).Fatal("could not run bpftool") - } - if err := json.Unmarshal(out, &features); err != nil { - log.WithError(err).Fatal("could not parse bpftool output") - } - return features -} - -// SystemConfigProbes performs a check of kernel configuration parameters. It -// returns an error when parameters required by Cilium are not enabled. It logs -// warnings when optional parameters are not enabled. -// -// When kernel config file is not found, bpftool can't probe kernel configuration -// parameter real setting, so only return error log when kernel config file exists -// and kernel configuration parameter setting is disabled -func (p *ProbeManager) SystemConfigProbes() error { - var notFound bool - if !p.KernelConfigAvailable() { - notFound = true - log.Info("Kernel config file not found: if the agent fails to start, check the system requirements at https://docs.cilium.io/en/stable/operations/system_requirements") - } - requiredParams := p.GetRequiredConfig() - for param, kernelOption := range requiredParams { - if !kernelOption.Enabled && !notFound { - module := "" - if kernelOption.CanBeModule { - module = " or module" - } - return fmt.Errorf("%s kernel parameter%s is required (needed for: %s)", param, module, kernelOption.Description) - } - } - optionalParams := p.GetOptionalConfig() - for param, kernelOption := range optionalParams { - if !kernelOption.Enabled && !notFound { - module := "" - if kernelOption.CanBeModule { - module = " or module" - } - log.Warningf("%s optional kernel parameter%s is not in kernel (needed for: %s)", param, module, kernelOption.Description) - } - } - return nil -} - -// GetRequiredConfig performs a check of mandatory kernel configuration options. It -// returns a map indicating which required kernel parameters are enabled - and which are not. -// GetRequiredConfig is being used by CLI "cilium kernel-check". -func (p *ProbeManager) GetRequiredConfig() map[KernelParam]kernelOption { - config := p.features.SystemConfig - coreInfraDescription := "Essential eBPF infrastructure" - kernelParams := make(map[KernelParam]kernelOption) - - kernelParams["CONFIG_BPF"] = kernelOption{ - Enabled: config.ConfigBpf.Enabled(), - Description: coreInfraDescription, - CanBeModule: false, - } - kernelParams["CONFIG_BPF_SYSCALL"] = kernelOption{ - Enabled: config.ConfigBpfSyscall.Enabled(), - Description: coreInfraDescription, - CanBeModule: false, - } - kernelParams["CONFIG_NET_SCH_INGRESS"] = kernelOption{ - Enabled: config.ConfigNetSchIngress.Enabled() || config.ConfigNetSchIngress.Module(), - Description: coreInfraDescription, - CanBeModule: true, - } - kernelParams["CONFIG_NET_CLS_BPF"] = kernelOption{ - Enabled: config.ConfigNetClsBpf.Enabled() || config.ConfigNetClsBpf.Module(), - Description: coreInfraDescription, - CanBeModule: true, - } - kernelParams["CONFIG_NET_CLS_ACT"] = kernelOption{ - Enabled: config.ConfigNetClsAct.Enabled(), - Description: coreInfraDescription, - CanBeModule: false, - } - kernelParams["CONFIG_BPF_JIT"] = kernelOption{ - Enabled: config.ConfigBpfJit.Enabled(), - Description: coreInfraDescription, - CanBeModule: false, - } - kernelParams["CONFIG_HAVE_EBPF_JIT"] = kernelOption{ - Enabled: config.ConfigHaveEbpfJit.Enabled(), - Description: coreInfraDescription, - CanBeModule: false, - } - - return kernelParams -} - -// GetOptionalConfig performs a check of *optional* kernel configuration options. It -// returns a map indicating which optional/non-mandatory kernel parameters are enabled. -// GetOptionalConfig is being used by CLI "cilium kernel-check". -func (p *ProbeManager) GetOptionalConfig() map[KernelParam]kernelOption { - config := p.features.SystemConfig - kernelParams := make(map[KernelParam]kernelOption) - - kernelParams["CONFIG_CGROUP_BPF"] = kernelOption{ - Enabled: config.ConfigCgroupBpf.Enabled(), - Description: "Host Reachable Services and Sockmap optimization", - CanBeModule: false, - } - kernelParams["CONFIG_LWTUNNEL_BPF"] = kernelOption{ - Enabled: config.ConfigLwtunnelBpf.Enabled(), - Description: "Lightweight Tunnel hook for IP-in-IP encapsulation", - CanBeModule: false, - } - kernelParams["CONFIG_BPF_EVENTS"] = kernelOption{ - Enabled: config.ConfigBpfEvents.Enabled(), - Description: "Visibility and congestion management with datapath", - CanBeModule: false, - } - - return kernelParams -} - -// KernelConfigAvailable checks if the Kernel Config is available on the -// system or not. -func (p *ProbeManager) KernelConfigAvailable() bool { - // Check Kernel Config is available or not. - // We are replicating BPFTools logic here to check if kernel config is available - // https://elixir.bootlin.com/linux/v5.7/source/tools/bpf/bpftool/feature.c#L390 - info := unix.Utsname{} - err := unix.Uname(&info) - if err != nil { - return false - } - release := strings.TrimSpace(string(bytes.Trim(info.Release[:], "\x00"))) - - // Any error checking these files will return Kernel config not found error - if _, err := os.Stat(fmt.Sprintf("/boot/config-%s", release)); err != nil { - if _, err = os.Stat("/proc/config.gz"); err != nil { - return false - } - } - - return true -} - -// HaveProgramHelper is a wrapper around features.HaveProgramHelper() to -// check if a certain BPF program/helper copmbination is supported by the kernel. -// On unexpected probe results this function will terminate with log.Fatal(). -func HaveProgramHelper(pt ebpf.ProgramType, helper asm.BuiltinFunc) error { - err := features.HaveProgramHelper(pt, helper) - if errors.Is(err, ebpf.ErrNotSupported) { - return err - } - if err != nil { - log.WithError(err).WithField("programtype", pt).WithField("helper", helper).Fatal("failed to probe helper") - } - return nil -} - -// HaveLargeInstructionLimit is a wrapper around features.HaveLargeInstructions() -// to check if the kernel supports the 1 Million instruction limit. -// On unexpected probe results this function will terminate with log.Fatal(). -func HaveLargeInstructionLimit() error { - err := features.HaveLargeInstructions() - if errors.Is(err, ebpf.ErrNotSupported) { - return err - } - if err != nil { - log.WithError(err).Fatal("failed to probe large instruction limit") - } - return nil -} - -// HaveBoundedLoops is a wrapper around features.HaveBoundedLoops() -// to check if the kernel supports bounded loops in BPF programs. -// On unexpected probe results this function will terminate with log.Fatal(). -func HaveBoundedLoops() error { - err := features.HaveBoundedLoops() - if errors.Is(err, ebpf.ErrNotSupported) { - return err - } - if err != nil { - log.WithError(err).Fatal("failed to probe bounded loops") - } - return nil -} - -// HaveFibIfindex checks if kernel has d1c362e1dd68 ("bpf: Always return target -// ifindex in bpf_fib_lookup") which is 5.10+. This got merged in the same kernel -// as the new redirect helpers. -func HaveFibIfindex() error { - return features.HaveProgramHelper(ebpf.SchedCLS, asm.FnRedirectPeer) -} - -// HaveV2ISA is a wrapper around features.HaveV2ISA() to check if the kernel -// supports the V2 ISA. -// On unexpected probe results this function will terminate with log.Fatal(). -func HaveV2ISA() error { - err := features.HaveV2ISA() - if errors.Is(err, ebpf.ErrNotSupported) { - return err - } - if err != nil { - log.WithError(err).Fatal("failed to probe V2 ISA") - } - return nil -} - -// HaveV3ISA is a wrapper around features.HaveV3ISA() to check if the kernel -// supports the V3 ISA. -// On unexpected probe results this function will terminate with log.Fatal(). -func HaveV3ISA() error { - err := features.HaveV3ISA() - if errors.Is(err, ebpf.ErrNotSupported) { - return err - } - if err != nil { - log.WithError(err).Fatal("failed to probe V3 ISA") - } - return nil -} - -// HaveOuterSourceIPSupport tests whether the kernel support setting the outer -// source IP address via the bpf_skb_set_tunnel_key BPF helper. We can't rely -// on the verifier to reject a program using the new support because the -// verifier just accepts any argument size for that helper; non-supported -// fields will simply not be used. Instead, we set the outer source IP and -// retrieve it with bpf_skb_get_tunnel_key right after. If the retrieved value -// equals the value set, we have a confirmation the kernel supports it. -func HaveOuterSourceIPSupport() (err error) { - defer func() { - if err != nil && !errors.Is(err, ebpf.ErrNotSupported) { - log.WithError(err).Fatal("failed to probe for outer source IP support") - } - }() - - progSpec := &ebpf.ProgramSpec{ - Name: "set_tunnel_key_probe", - Type: ebpf.SchedACT, - License: "GPL", - } - progSpec.Instructions = asm.Instructions{ - asm.Mov.Reg(asm.R8, asm.R1), - - asm.Mov.Imm(asm.R2, 0), - asm.StoreMem(asm.RFP, -8, asm.R2, asm.DWord), - asm.StoreMem(asm.RFP, -16, asm.R2, asm.DWord), - asm.StoreMem(asm.RFP, -24, asm.R2, asm.DWord), - asm.StoreMem(asm.RFP, -32, asm.R2, asm.DWord), - asm.StoreMem(asm.RFP, -40, asm.R2, asm.DWord), - asm.Mov.Imm(asm.R2, 42), - asm.StoreMem(asm.RFP, -44, asm.R2, asm.Word), - asm.Mov.Reg(asm.R2, asm.RFP), - asm.Add.Imm(asm.R2, -44), - asm.Mov.Imm(asm.R3, 44), // sizeof(struct bpf_tunnel_key) when setting the outer source IP is supported. - asm.Mov.Imm(asm.R4, 0), - asm.FnSkbSetTunnelKey.Call(), - - asm.Mov.Reg(asm.R1, asm.R8), - asm.Mov.Reg(asm.R2, asm.RFP), - asm.Add.Imm(asm.R2, -44), - asm.Mov.Imm(asm.R3, 44), - asm.Mov.Imm(asm.R4, 0), - asm.FnSkbGetTunnelKey.Call(), - - asm.LoadMem(asm.R0, asm.RFP, -44, asm.Word), - asm.Return(), - } - prog, err := ebpf.NewProgram(progSpec) - if err != nil { - return err - } - defer prog.Close() - - pkt := []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - ret, _, err := prog.Test(pkt) - if err != nil { - return err - } - if ret != 42 { - return ebpf.ErrNotSupported - } - return nil -} - -// HaveSKBAdjustRoomL2RoomMACSupport tests whether the kernel supports the `bpf_skb_adjust_room` helper -// with the `BPF_ADJ_ROOM_MAC` mode. To do so, we create a program that requests the passed in SKB -// to be expanded by 20 bytes. The helper checks the `mode` argument and will return -ENOSUPP if -// the mode is unknown. Otherwise it should resize the SKB by 20 bytes and return 0. -func HaveSKBAdjustRoomL2RoomMACSupport() (err error) { - defer func() { - if err != nil && !errors.Is(err, ebpf.ErrNotSupported) { - log.WithError(err).Fatal("failed to probe for bpf_skb_adjust_room L2 room MAC support") - } - }() - - progSpec := &ebpf.ProgramSpec{ - Name: "adjust_mac_room", - Type: ebpf.SchedCLS, - License: "GPL", - } - progSpec.Instructions = asm.Instructions{ - asm.Mov.Imm(asm.R2, 20), // len_diff - asm.Mov.Imm(asm.R3, 1), // mode: BPF_ADJ_ROOM_MAC - asm.Mov.Imm(asm.R4, 0), // flags: 0 - asm.FnSkbAdjustRoom.Call(), - asm.Return(), - } - prog, err := ebpf.NewProgram(progSpec) - if err != nil { - return err - } - defer prog.Close() - - // This is a Eth + IPv4 + UDP + data packet. The helper relies on a valid packet being passed in - // since it wants to know offsets of the different layers. - buf := gopacket.NewSerializeBuffer() - err = gopacket.SerializeLayers(buf, gopacket.SerializeOptions{}, - &layers.Ethernet{ - DstMAC: net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - SrcMAC: net.HardwareAddr{0x0e, 0xf5, 0x16, 0x3d, 0x6b, 0xab}, - EthernetType: layers.EthernetTypeIPv4, - }, - &layers.IPv4{ - Version: 4, - IHL: 5, - Length: 49, - Id: 0xCECB, - TTL: 64, - Protocol: layers.IPProtocolUDP, - SrcIP: net.IPv4(0xc0, 0xa8, 0xb2, 0x56), - DstIP: net.IPv4(0xc0, 0xa8, 0xb2, 0xff), - }, - &layers.UDP{ - SrcPort: 23939, - DstPort: 32412, - }, - gopacket.Payload("M-SEARCH * HTTP/1.1\x0d\x0a"), - ) - if err != nil { - return fmt.Errorf("craft packet: %w", err) - } - - ret, _, err := prog.Test(buf.Bytes()) - if err != nil { - return err - } - if ret != 0 { - return ebpf.ErrNotSupported - } - return nil -} - -// HaveIPv6Support tests whether kernel can open an IPv6 socket. This will -// also implicitly auto-load IPv6 kernel module if available and not yet -// loaded. -func HaveIPv6Support() error { - fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_STREAM, 0) - if errors.Is(err, unix.EAFNOSUPPORT) || errors.Is(err, unix.EPROTONOSUPPORT) { - return ErrNotSupported - } - unix.Close(fd) - return nil -} - -// CreateHeaderFiles creates C header files with macros indicating which BPF -// features are available in the kernel. -func CreateHeaderFiles(headerDir string, probes *FeatureProbes) error { - common, err := os.Create(filepath.Join(headerDir, "features.h")) - if err != nil { - return fmt.Errorf("could not create common features header file: %w", err) - } - defer common.Close() - if err := writeCommonHeader(common, probes); err != nil { - return fmt.Errorf("could not write common features header file: %w", err) - } - - skb, err := os.Create(filepath.Join(headerDir, "features_skb.h")) - if err != nil { - return fmt.Errorf("could not create skb related features header file: %w", err) - } - defer skb.Close() - if err := writeSkbHeader(skb, probes); err != nil { - return fmt.Errorf("could not write skb related features header file: %w", err) - } - - xdp, err := os.Create(filepath.Join(headerDir, "features_xdp.h")) - if err != nil { - return fmt.Errorf("could not create xdp related features header file: %w", err) - } - defer xdp.Close() - if err := writeXdpHeader(xdp, probes); err != nil { - return fmt.Errorf("could not write xdp related features header file: %w", err) - } - - return nil -} - -// ExecuteHeaderProbes probes the kernel for a specific set of BPF features -// which are currently used to generate various feature macros for the datapath. -// The probe results returned in FeatureProbes are then used in the respective -// function that writes the actual C macro definitions. -// Further needed probes should be added here, while new macro strings need to -// be added in the correct `write*Header()` function. -func ExecuteHeaderProbes() *FeatureProbes { - probes := FeatureProbes{ - ProgramHelpers: make(map[ProgramHelper]bool), - Misc: miscFeatures{}, - } - - progHelpers := []ProgramHelper{ - // common probes - {ebpf.CGroupSock, asm.FnGetNetnsCookie}, - {ebpf.CGroupSockAddr, asm.FnGetNetnsCookie}, - {ebpf.CGroupSockAddr, asm.FnGetSocketCookie}, - {ebpf.CGroupSock, asm.FnJiffies64}, - {ebpf.CGroupSockAddr, asm.FnJiffies64}, - {ebpf.SchedCLS, asm.FnJiffies64}, - {ebpf.XDP, asm.FnJiffies64}, - {ebpf.CGroupSockAddr, asm.FnSkLookupTcp}, - {ebpf.CGroupSockAddr, asm.FnSkLookupUdp}, - {ebpf.CGroupSockAddr, asm.FnGetCurrentCgroupId}, - {ebpf.CGroupSock, asm.FnSetRetval}, - {ebpf.SchedCLS, asm.FnRedirectNeigh}, - {ebpf.SchedCLS, asm.FnRedirectPeer}, - - // skb related probes - {ebpf.SchedCLS, asm.FnSkbChangeTail}, - {ebpf.SchedCLS, asm.FnCsumLevel}, - - // xdp related probes - {ebpf.XDP, asm.FnXdpLoadBytes}, - {ebpf.XDP, asm.FnXdpStoreBytes}, - } - for _, ph := range progHelpers { - probes.ProgramHelpers[ph] = (HaveProgramHelper(ph.Program, ph.Helper) == nil) - } - - probes.Misc.HaveLargeInsnLimit = (HaveLargeInstructionLimit() == nil) - probes.Misc.HaveFibIfindex = (HaveFibIfindex() == nil) - - return &probes -} - -// writeCommonHeader defines macross for bpf/include/bpf/features.h -func writeCommonHeader(writer io.Writer, probes *FeatureProbes) error { - features := map[string]bool{ - "HAVE_NETNS_COOKIE": probes.ProgramHelpers[ProgramHelper{ebpf.CGroupSock, asm.FnGetNetnsCookie}] && - probes.ProgramHelpers[ProgramHelper{ebpf.CGroupSockAddr, asm.FnGetNetnsCookie}], - "HAVE_SOCKET_COOKIE": probes.ProgramHelpers[ProgramHelper{ebpf.CGroupSockAddr, asm.FnGetSocketCookie}], - "HAVE_JIFFIES": probes.ProgramHelpers[ProgramHelper{ebpf.CGroupSock, asm.FnJiffies64}] && - probes.ProgramHelpers[ProgramHelper{ebpf.CGroupSockAddr, asm.FnJiffies64}] && - probes.ProgramHelpers[ProgramHelper{ebpf.SchedCLS, asm.FnJiffies64}] && - probes.ProgramHelpers[ProgramHelper{ebpf.XDP, asm.FnJiffies64}], - "HAVE_SOCKET_LOOKUP": probes.ProgramHelpers[ProgramHelper{ebpf.CGroupSockAddr, asm.FnSkLookupTcp}] && - probes.ProgramHelpers[ProgramHelper{ebpf.CGroupSockAddr, asm.FnSkLookupUdp}], - "HAVE_CGROUP_ID": probes.ProgramHelpers[ProgramHelper{ebpf.CGroupSockAddr, asm.FnGetCurrentCgroupId}], - "HAVE_LARGE_INSN_LIMIT": probes.Misc.HaveLargeInsnLimit, - "HAVE_SET_RETVAL": probes.ProgramHelpers[ProgramHelper{ebpf.CGroupSock, asm.FnSetRetval}], - "HAVE_FIB_NEIGH": probes.ProgramHelpers[ProgramHelper{ebpf.SchedCLS, asm.FnRedirectNeigh}], - "HAVE_FIB_IFINDEX": probes.Misc.HaveFibIfindex, - } - - return writeFeatureHeader(writer, features, true) -} - -// writeSkbHeader defines macros for bpf/include/bpf/features_skb.h -func writeSkbHeader(writer io.Writer, probes *FeatureProbes) error { - featuresSkb := map[string]bool{ - "HAVE_CHANGE_TAIL": probes.ProgramHelpers[ProgramHelper{ebpf.SchedCLS, asm.FnSkbChangeTail}], - "HAVE_CSUM_LEVEL": probes.ProgramHelpers[ProgramHelper{ebpf.SchedCLS, asm.FnCsumLevel}], - } - - return writeFeatureHeader(writer, featuresSkb, false) -} - -// writeXdpHeader defines macros for bpf/include/bpf/features_xdp.h -func writeXdpHeader(writer io.Writer, probes *FeatureProbes) error { - featuresXdp := map[string]bool{ - "HAVE_XDP_LOAD_BYTES": probes.ProgramHelpers[ProgramHelper{ebpf.XDP, asm.FnXdpLoadBytes}], - "HAVE_XDP_STORE_BYTES": probes.ProgramHelpers[ProgramHelper{ebpf.XDP, asm.FnXdpStoreBytes}], - } - - return writeFeatureHeader(writer, featuresXdp, false) -} - -func writeFeatureHeader(writer io.Writer, features map[string]bool, common bool) error { - input := struct { - Common bool - Features map[string]bool - }{ - Common: common, - Features: features, - } - - if err := tpl.Execute(writer, input); err != nil { - return fmt.Errorf("could not write template: %w", err) - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes_linux.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes_linux.go deleted file mode 100644 index 846e9c28e0e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes_linux.go +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package probes - -import "github.com/vishvananda/netlink" - -// Family type definitions -const ( - NTF_EXT_LEARNED = netlink.NTF_EXT_LEARNED - NTF_EXT_MANAGED = netlink.NTF_EXT_MANAGED -) diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes_unspecified.go b/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes_unspecified.go deleted file mode 100644 index f92efd49902..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/linux/probes/probes_unspecified.go +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build !linux - -package probes - -// Dummy values on non-linux platform -const ( - NTF_EXT_LEARNED = iota - NTF_EXT_MANAGED -) diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/loader/metrics/metrics.go b/vendor/github.com/cilium/cilium/pkg/datapath/loader/metrics/metrics.go deleted file mode 100644 index 4896dc830ba..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/loader/metrics/metrics.go +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -import ( - "github.com/cilium/cilium/pkg/spanstat" -) - -// SpanStat is a statistics structure for storing metrics related to datapath -// load operations. -type SpanStat struct { - BpfCompilation spanstat.SpanStat - BpfWaitForELF spanstat.SpanStat - BpfWriteELF spanstat.SpanStat - BpfLoadProg spanstat.SpanStat -} - -// GetMap returns a map of statistic names to stats -func (s *SpanStat) GetMap() map[string]*spanstat.SpanStat { - return map[string]*spanstat.SpanStat{ - "bpfCompilation": &s.BpfCompilation, - "bpfWaitForELF": &s.BpfWaitForELF, - "bpfWriteELF": &s.BpfWriteELF, - "bpfLoadProg": &s.BpfLoadProg, - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/tunnel/cell.go b/vendor/github.com/cilium/cilium/pkg/datapath/tunnel/cell.go deleted file mode 100644 index 9150b8c68b9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/tunnel/cell.go +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package tunnel - -import ( - "github.com/cilium/cilium/pkg/defaults" - "github.com/cilium/cilium/pkg/hive/cell" - "github.com/cilium/cilium/pkg/option" -) - -// Cell is a cell that provides the parameters for the Cilium tunnel, -// based on user configuration and requests from external modules. -var Cell = cell.Module( - "datapath-tunnel-config", - "Tunneling configurations", - - cell.Config(userCfg{TunnelProtocol: defaults.TunnelProtocol}), - - cell.Provide( - newConfig, - - // Provide the datapath options. - Config.datapathConfigProvider, - - // Enable tunnel configuration when it is the primary routing mode. - func(dcfg *option.DaemonConfig) EnablerOut { - return NewEnabler(dcfg.TunnelingEnabled()) - }, - - // Enable tunnel configuration when DSR Geneve is enabled (this is currently - // handled here, as the corresponding logic has not yet been modularized). - func(dcfg *option.DaemonConfig) EnablerOut { - return NewEnabler( - (dcfg.EnableNodePort || - dcfg.KubeProxyReplacement == option.KubeProxyReplacementStrict || - dcfg.KubeProxyReplacement == option.KubeProxyReplacementTrue) && - dcfg.LoadBalancerUsesDSR() && - dcfg.LoadBalancerDSRDispatch == option.DSRDispatchGeneve, - // The datapath logic takes care of the MTU overhead. So no need to - // take it into account here. - // See encap_geneve_dsr_opt[4,6] in nodeport.h - WithoutMTUAdaptation(), - ) - }, - - // Enable tunnel configuration when High Scale IPCache is enabled (this is - // currently handled here, as the corresponding logic has not yet been modularized). - func(dcfg *option.DaemonConfig) EnablerOut { - return NewEnabler(dcfg.EnableHighScaleIPcache) - }, - ), -) diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/tunnel/tunnel.go b/vendor/github.com/cilium/cilium/pkg/datapath/tunnel/tunnel.go deleted file mode 100644 index ba831913981..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/tunnel/tunnel.go +++ /dev/null @@ -1,221 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package tunnel - -import ( - "fmt" - "strings" - - "github.com/spf13/pflag" - "github.com/vishvananda/netlink" - - dpcfgdef "github.com/cilium/cilium/pkg/datapath/linux/config/defines" - "github.com/cilium/cilium/pkg/defaults" - "github.com/cilium/cilium/pkg/hive/cell" -) - -// Protocol represents the valid types of encapsulation protocols. -type Protocol string - -const ( - // VXLAN specifies VXLAN encapsulation - VXLAN Protocol = "vxlan" - - // Geneve specifies Geneve encapsulation - Geneve Protocol = "geneve" - - // Disabled specifies to disable encapsulation - Disabled Protocol = "" -) - -func (tp Protocol) String() string { return string(tp) } - -func (tp Protocol) toDpID() string { - switch tp { - case VXLAN: - return "1" - case Geneve: - return "2" - default: - return "" - } -} - -// Config represents the materialized tunneling configuration to be used, -// depending on the user configuration and optional overrides required by -// additional features. -type Config struct { - protocol Protocol - port uint16 - deviceName string - shouldAdaptMTU bool -} - -type newConfigIn struct { - cell.In - - Cfg userCfg - Enablers []enabler `group:"request-enable-tunneling"` -} - -func newConfig(in newConfigIn) (Config, error) { - switch Protocol(in.Cfg.TunnelProtocol) { - case VXLAN, Geneve: - default: - return Config{}, fmt.Errorf("invalid tunnel protocol %q", in.Cfg.TunnelProtocol) - } - - cfg := Config{ - protocol: Protocol(in.Cfg.TunnelProtocol), - port: in.Cfg.TunnelPort, - } - - var enabled bool - for _, e := range in.Enablers { - if e.enable { - enabled = true - cfg.shouldAdaptMTU = cfg.shouldAdaptMTU || e.needsMTUAdaptation - - for _, validator := range e.validators { - if err := validator(cfg.protocol); err != nil { - return Config{}, err - } - } - } - } - - if !enabled { - return Config{protocol: Disabled}, nil - } - - switch cfg.protocol { - case VXLAN: - cfg.deviceName = defaults.VxlanDevice - - if cfg.port == 0 { - cfg.port = defaults.TunnelPortVXLAN - } - case Geneve: - cfg.deviceName = defaults.GeneveDevice - - if cfg.port == 0 { - cfg.port = defaults.TunnelPortGeneve - } - } - - return cfg, nil -} - -// NewTestConfig returns a new TunnelConfig for testing purposes. -func NewTestConfig(proto Protocol) Config { - cfg := Config{protocol: proto} - - switch proto { - case VXLAN: - cfg.port = defaults.TunnelPortVXLAN - cfg.deviceName = defaults.VxlanDevice - case Geneve: - cfg.port = defaults.TunnelPortGeneve - cfg.deviceName = defaults.GeneveDevice - } - - return cfg -} - -// Protocol returns the enabled tunnel protocol. The tunnel protocol may be -// set to either VXLAN or Geneve even when the primary mode is native routing, in -// case an additional feature (e.g., egress gateway) may request some traffic to -// be routed through a tunnel. -func (cfg Config) Protocol() Protocol { return cfg.protocol } - -// Port returns the port used by the tunnel (0 if disabled). -func (cfg Config) Port() uint16 { return cfg.port } - -// DeviceName returns the name of the tunnel device (empty if disabled). -func (cfg Config) DeviceName() string { return cfg.deviceName } - -// ShouldAdaptMTU returns whether we should adapt the MTU calculation to -// account for encapsulation. -func (cfg Config) ShouldAdaptMTU() bool { return cfg.shouldAdaptMTU } - -func (cfg Config) datapathConfigProvider() (dpcfgdef.NodeOut, dpcfgdef.NodeFnOut) { - defines := make(dpcfgdef.Map) - definesFn := func() (dpcfgdef.Map, error) { return nil, nil } - - if cfg.Protocol() != Disabled { - defines[fmt.Sprintf("TUNNEL_PROTOCOL_%s", strings.ToUpper(VXLAN.String()))] = VXLAN.toDpID() - defines[fmt.Sprintf("TUNNEL_PROTOCOL_%s", strings.ToUpper(Geneve.String()))] = Geneve.toDpID() - defines["TUNNEL_PROTOCOL"] = cfg.Protocol().toDpID() - defines["TUNNEL_PORT"] = fmt.Sprintf("%d", cfg.Port()) - - definesFn = func() (dpcfgdef.Map, error) { - tunnelDev, err := netlink.LinkByName(cfg.DeviceName()) - if err != nil { - return nil, fmt.Errorf("failed to retrieve device info for %q: %w", cfg.DeviceName(), err) - } - - return dpcfgdef.Map{ - "ENCAP_IFINDEX": fmt.Sprintf("%d", tunnelDev.Attrs().Index), - }, nil - } - } - - return dpcfgdef.NodeOut{NodeDefines: defines}, dpcfgdef.NewNodeFnOut(definesFn) -} - -// EnablerOut allows requesting to enable tunneling functionalities. -type EnablerOut struct { - cell.Out - Enabler enabler `group:"request-enable-tunneling"` -} - -// NewEnabler returns an object to be injected through hive to request to -// enable tunneling functionalities. Extra options are meaningful only when -// enable is set to true, and are ignored otherwise. -func NewEnabler(enable bool, opts ...enablerOpt) EnablerOut { - enabler := enabler{enable: enable, needsMTUAdaptation: enable} - - for _, opt := range opts { - opt(&enabler) - } - - return EnablerOut{Enabler: enabler} -} - -// WithValidator allows to register extra validation functions -// to assert that the configured tunnel protocol matches the one expected by -// the given feature. -func WithValidator(validator func(Protocol) error) enablerOpt { - return func(te *enabler) { - te.validators = append(te.validators, validator) - } -} - -// WithoutMTUAdaptation conveys that the given feature request -// to enable tunneling, but the MTU adaptation is already handled externally. -func WithoutMTUAdaptation() enablerOpt { - return func(te *enabler) { - te.needsMTUAdaptation = false - } -} - -type enabler struct { - enable bool - needsMTUAdaptation bool - validators []func(Protocol) error -} - -type enablerOpt func(*enabler) - -// userCfg wraps the tunnel-related user configurations. -type userCfg struct { - TunnelProtocol string - TunnelPort uint16 -} - -// Flags implements the cell.Flagger interface, to register the given flags. -func (def userCfg) Flags(flags *pflag.FlagSet) { - flags.String("tunnel-protocol", def.TunnelProtocol, "Encapsulation protocol to use for the overlay (\"vxlan\" or \"geneve\")") - flags.Uint16("tunnel-port", def.TunnelPort, fmt.Sprintf("Tunnel port (default %d for \"vxlan\" and %d for \"geneve\")", defaults.TunnelPortVXLAN, defaults.TunnelPortGeneve)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/types/config.go b/vendor/github.com/cilium/cilium/pkg/datapath/types/config.go deleted file mode 100644 index 82659c530d5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/types/config.go +++ /dev/null @@ -1,131 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "io" - "net/netip" - - "github.com/cilium/cilium/pkg/cidr" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/mac" - "github.com/cilium/cilium/pkg/node" - "github.com/cilium/cilium/pkg/option" -) - -// DeviceConfiguration is an interface for injecting configuration of datapath -// options that affect lookups and logic applied at a per-device level, whether -// those are devices associated with the endpoint or associated with the host. -type DeviceConfiguration interface { - // GetOptions fetches the configurable datapath options from the owner. - GetOptions() *option.IntOptions -} - -// LoadTimeConfiguration provides datapath implementations a clean interface -// to access endpoint-specific configuration that can be changed at load time. -type LoadTimeConfiguration interface { - // GetID returns a locally-significant endpoint identification number. - GetID() uint64 - // StringID returns the string-formatted version of the ID from GetID(). - StringID() string - // GetIdentity returns a globally-significant numeric security identity. - GetIdentity() identity.NumericIdentity - - // GetIdentityLocked returns a globally-significant numeric security - // identity while assuming that the backing data structure is locked. - // This function should be removed in favour of GetIdentity() - GetIdentityLocked() identity.NumericIdentity - - IPv4Address() netip.Addr - IPv6Address() netip.Addr - GetNodeMAC() mac.MAC - GetIfIndex() int -} - -// CompileTimeConfiguration provides datapath implementations a clean interface -// to access endpoint-specific configuration that can only be changed at -// compile time. -type CompileTimeConfiguration interface { - DeviceConfiguration - - // TODO: Move this detail into the datapath - ConntrackLocalLocked() bool - - // RequireARPPassthrough returns true if the datapath must implement - // ARP passthrough for this endpoint - RequireARPPassthrough() bool - - // RequireEgressProg returns true if the endpoint requires an egress - // program attached to the InterfaceName() invoking the section - // "to-container" - RequireEgressProg() bool - - // RequireRouting returns true if the endpoint requires BPF routing to - // be enabled, when disabled, routing is delegated to Linux routing - RequireRouting() bool - - // RequireEndpointRoute returns true if the endpoint wishes to have a - // per endpoint route installed in the host's routing table to point to - // the endpoint's interface - RequireEndpointRoute() bool - - // GetPolicyVerdictLogFilter returns the PolicyVerdictLogFilter for the endpoint - GetPolicyVerdictLogFilter() uint32 - - // IsHost returns true if the endpoint is the host endpoint. - IsHost() bool -} - -// EndpointConfiguration provides datapath implementations a clean interface -// to access endpoint-specific configuration when configuring the datapath. -type EndpointConfiguration interface { - CompileTimeConfiguration - LoadTimeConfiguration -} - -// ConfigWriter is anything which writes the configuration for various datapath -// program types. -type ConfigWriter interface { - // WriteNodeConfig writes the implementation-specific configuration of - // node-wide options into the specified writer. - WriteNodeConfig(io.Writer, *LocalNodeConfiguration) error - - // WriteNetdevConfig writes the implementation-specific configuration - // of configurable options to the specified writer. Options specified - // here will apply to base programs and not to endpoints, though - // endpoints may have equivalent configurable options. - WriteNetdevConfig(io.Writer, DeviceConfiguration) error - - // WriteTemplateConfig writes the implementation-specific configuration - // of configurable options for BPF templates to the specified writer. - WriteTemplateConfig(w io.Writer, cfg EndpointConfiguration) error - - // WriteEndpointConfig writes the implementation-specific configuration - // of configurable options for the endpoint to the specified writer. - WriteEndpointConfig(w io.Writer, cfg EndpointConfiguration) error -} - -// RemoteSNATDstAddrExclusionCIDRv4 returns a CIDR for SNAT exclusion. Any -// packet sent from a local endpoint to an IP address belonging to the CIDR -// should not be SNAT'd. -func RemoteSNATDstAddrExclusionCIDRv4() *cidr.CIDR { - if c := option.Config.GetIPv4NativeRoutingCIDR(); c != nil { - // ipv4-native-routing-cidr is set, so use it - return c - } - - return node.GetIPv4AllocRange() -} - -// RemoteSNATDstAddrExclusionCIDRv6 returns a IPv6 CIDR for SNAT exclusion. Any -// packet sent from a local endpoint to an IP address belonging to the CIDR -// should not be SNAT'd. -func RemoteSNATDstAddrExclusionCIDRv6() *cidr.CIDR { - if c := option.Config.GetIPv6NativeRoutingCIDR(); c != nil { - // ipv6-native-routing-cidr is set, so use it - return c - } - - return node.GetIPv6AllocRange() -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/types/datapath.go b/vendor/github.com/cilium/cilium/pkg/datapath/types/datapath.go deleted file mode 100644 index f4b1745a477..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/types/datapath.go +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import "github.com/cilium/cilium/pkg/datapath/linux/bandwidth" - -// Datapath is the interface to abstract all datapath interactions. The -// abstraction allows to implement the datapath requirements with multiple -// implementations -type Datapath interface { - ConfigWriter - IptablesManager - - // Node must return the handler for node events - Node() NodeHandler - - NodeIDs() NodeIDHandler - - NodeNeighbors() NodeNeighbors - - // LocalNodeAddressing must return the node addressing implementation - // of the local node - LocalNodeAddressing() NodeAddressing - - // Loader must return the implementation of the loader, which is responsible - // for loading, reloading, and compiling datapath programs. - Loader() Loader - - // WireguardAgent returns the WireGuard agent for the local node - WireguardAgent() WireguardAgent - - // LBMap returns the load-balancer map - LBMap() LBMap - - Procfs() string - - BandwidthManager() bandwidth.Manager -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/types/endpoint.go b/vendor/github.com/cilium/cilium/pkg/datapath/types/endpoint.go deleted file mode 100644 index df3bc01aa01..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/types/endpoint.go +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import "github.com/sirupsen/logrus" - -// Endpoint provides access endpoint configuration information that is necessary -// to compile and load the datapath. -type Endpoint interface { - EndpointConfiguration - InterfaceName() string - Logger(subsystem string) *logrus.Entry - StateDir() string -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/types/ipsec.go b/vendor/github.com/cilium/cilium/pkg/datapath/types/ipsec.go deleted file mode 100644 index a62f7800a63..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/types/ipsec.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -type IPsecKeyCustodian interface { - AuthKeySize() int - SPI() uint8 - StartBackgroundJobs(NodeHandler) error -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/types/lbmap.go b/vendor/github.com/cilium/cilium/pkg/datapath/types/lbmap.go deleted file mode 100644 index 955876e8d8e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/types/lbmap.go +++ /dev/null @@ -1,109 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "net" - "sort" - - "github.com/cilium/cilium/pkg/cidr" - "github.com/cilium/cilium/pkg/loadbalancer" -) - -// LBMap is the interface describing methods for manipulating service maps. -type LBMap interface { - UpsertService(*UpsertServiceParams) error - UpsertMaglevLookupTable(uint16, map[string]*loadbalancer.Backend, bool) error - IsMaglevLookupTableRecreated(bool) bool - DeleteService(loadbalancer.L3n4AddrID, int, bool, loadbalancer.SVCNatPolicy) error - AddBackend(*loadbalancer.Backend, bool) error - UpdateBackendWithState(*loadbalancer.Backend) error - DeleteBackendByID(loadbalancer.BackendID) error - AddAffinityMatch(uint16, loadbalancer.BackendID) error - DeleteAffinityMatch(uint16, loadbalancer.BackendID) error - UpdateSourceRanges(uint16, []*cidr.CIDR, []*cidr.CIDR, bool) error - DumpServiceMaps() ([]*loadbalancer.SVC, []error) - DumpBackendMaps() ([]*loadbalancer.Backend, error) - DumpAffinityMatches() (BackendIDByServiceIDSet, error) - DumpSourceRanges(bool) (SourceRangeSetByServiceID, error) - ExistsSockRevNat(cookie uint64, addr net.IP, port uint16) bool -} - -type UpsertServiceParams struct { - ID uint16 - IP net.IP - Port uint16 - - // PreferredBackends is a subset of ActiveBackends - // Note: this is only used in clustermesh with service affinity annotation. - PreferredBackends map[string]*loadbalancer.Backend - ActiveBackends map[string]*loadbalancer.Backend - NonActiveBackends []loadbalancer.BackendID - PrevBackendsCount int - IPv6 bool - Type loadbalancer.SVCType - NatPolicy loadbalancer.SVCNatPolicy - ExtLocal bool - IntLocal bool - Scope uint8 - SessionAffinity bool - SessionAffinityTimeoutSec uint32 - CheckSourceRange bool - UseMaglev bool - L7LBProxyPort uint16 // Non-zero for L7 LB services - Name loadbalancer.ServiceName // Fully qualified name of the service - LoopbackHostport bool -} - -// GetOrderedBackends returns an ordered list of backends with all the sorted -// preferred backend followed by active and non-active backends. -// Encapsulates logic to be also used in unit tests. -func (p *UpsertServiceParams) GetOrderedBackends() []loadbalancer.BackendID { - backendIDs := make([]loadbalancer.BackendID, 0, len(p.ActiveBackends)+len(p.NonActiveBackends)) - for _, b := range p.ActiveBackends { - backendIDs = append(backendIDs, b.ID) - } - - preferredMap := map[loadbalancer.BackendID]struct{}{} - for _, b := range p.PreferredBackends { - preferredMap[b.ID] = struct{}{} - } - - // Map iterations are non-deterministic so sort the backends by their IDs - // in order to maintain the same order before they are populated in BPF maps. - // This will minimize disruption to existing connections to the backends in the datapath. - sort.Slice(backendIDs, func(i, j int) bool { - // compare preferred flags of two backend IDs - _, firstPreferred := preferredMap[backendIDs[i]] - _, secondPreferred := preferredMap[backendIDs[j]] - - if firstPreferred && secondPreferred { - return backendIDs[i] < backendIDs[j] - } - - if firstPreferred { - return true - } - - if secondPreferred { - return false - } - - return backendIDs[i] < backendIDs[j] - }) - - // Add the non-active backends to the end of preferred/active backends list so that they are - // not considered while selecting backends to load-balance service traffic. - if len(p.NonActiveBackends) > 0 { - backendIDs = append(backendIDs, p.NonActiveBackends...) - } - - return backendIDs -} - -// BackendIDByServiceIDSet is the type of a set for checking whether a backend -// belongs to a given service -type BackendIDByServiceIDSet map[uint16]map[loadbalancer.BackendID]struct{} // svc ID => backend ID - -type SourceRangeSetByServiceID map[uint16][]*cidr.CIDR // svc ID => src range CIDRs diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/types/loader.go b/vendor/github.com/cilium/cilium/pkg/datapath/types/loader.go deleted file mode 100644 index f5b5bb64d78..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/types/loader.go +++ /dev/null @@ -1,82 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "context" - "io" - "net" - - "github.com/cilium/cilium/pkg/datapath/loader/metrics" - "github.com/cilium/cilium/pkg/datapath/tunnel" - "github.com/cilium/cilium/pkg/lock" -) - -// Loader is an interface to abstract out loading of datapath programs. -type Loader interface { - CallsMapPath(id uint16) string - CustomCallsMapPath(id uint16) string - CompileAndLoad(ctx context.Context, ep Endpoint, stats *metrics.SpanStat) error - CompileOrLoad(ctx context.Context, ep Endpoint, stats *metrics.SpanStat) error - ReloadDatapath(ctx context.Context, ep Endpoint, stats *metrics.SpanStat) error - EndpointHash(cfg EndpointConfiguration) (string, error) - Unload(ep Endpoint) - Reinitialize(ctx context.Context, o BaseProgramOwner, tunnelConfig tunnel.Config, deviceMTU int, iptMgr IptablesManager, p Proxy) error - HostDatapathInitialized() <-chan struct{} -} - -// BaseProgramOwner is any type for which a loader is building base programs. -type BaseProgramOwner interface { - DeviceConfiguration - GetCompilationLock() *lock.RWMutex - Datapath() Datapath - LocalConfig() *LocalNodeConfiguration - SetPrefilter(pf PreFilter) -} - -// PreFilter an interface for an XDP pre-filter. -type PreFilter interface { - WriteConfig(fw io.Writer) - Dump(to []string) ([]string, int64) - Insert(revision int64, cidrs []net.IPNet) error - Delete(revision int64, cidrs []net.IPNet) error -} - -// Proxy is any type which installs rules related to redirecting traffic to -// a proxy. -type Proxy interface { - ReinstallRoutingRules() error - ReinstallIPTablesRules(ctx context.Context) error -} - -// IptablesManager manages iptables rules. -type IptablesManager interface { - // InstallProxyRules creates the necessary datapath config (e.g., iptables - // rules for redirecting host proxy traffic on a specific ProxyPort) - InstallProxyRules(ctx context.Context, proxyPort uint16, ingress, localOnly bool, name string) error - - // SupportsOriginalSourceAddr tells if the datapath supports - // use of original source addresses in proxy upstream - // connections. - SupportsOriginalSourceAddr() bool - InstallRules(ctx context.Context, ifName string, quiet, install bool) error - - // GetProxyPort fetches the existing proxy port configured for the - // specified listener. Used early in bootstrap to reopen proxy ports. - GetProxyPort(listener string) uint16 - - // InstallNoTrackRules is explicitly called when a pod has valid - // "policy.cilium.io/no-track-port" annotation. When - // InstallNoConntrackIptRules flag is set, a super set of v4 NOTRACK - // rules will be automatically installed upon agent bootstrap (via - // function addNoTrackPodTrafficRules) and this function will be - // skipped. When InstallNoConntrackIptRules is not set, this function - // will be executed to install NOTRACK rules. The rules installed by - // this function is very specific, for now, the only user is - // node-local-dns pods. - InstallNoTrackRules(IP string, port uint16, ipv6 bool) error - - // See comments for InstallNoTrackRules. - RemoveNoTrackRules(IP string, port uint16, ipv6 bool) error -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/types/node.go b/vendor/github.com/cilium/cilium/pkg/datapath/types/node.go deleted file mode 100644 index fcfcc2b7ba2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/types/node.go +++ /dev/null @@ -1,153 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "context" - "net" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/cidr" - nodeTypes "github.com/cilium/cilium/pkg/node/types" -) - -type MTUConfiguration interface { - GetDeviceMTU() int - GetRouteMTU() int - GetRoutePostEncryptMTU() int -} - -// LocalNodeConfiguration represents the configuration of the local node -type LocalNodeConfiguration struct { - // MtuConfig is the MTU configuration of the node. - // - // This field is immutable at runtime. The value will not change in - // subsequent calls to NodeConfigurationChanged(). - MtuConfig MTUConfiguration - - // AuxiliaryPrefixes is the list of auxiliary prefixes that should be - // configured in addition to the node PodCIDR - // - // This field is mutable. The implementation of - // NodeConfigurationChanged() must adjust the routes accordingly. - AuxiliaryPrefixes []*cidr.CIDR - - // EnableIPv4 enables use of IPv4. Routing to the IPv4 allocation CIDR - // of other nodes must be enabled. - // - // This field is immutable at runtime. The value will not change in - // subsequent calls to NodeConfigurationChanged(). - EnableIPv4 bool - - // EnableIPv6 enables use of IPv6. Routing to the IPv6 allocation CIDR - // of other nodes must be enabled. - // - // This field is immutable at runtime. The value will not change in - // subsequent calls to NodeConfigurationChanged(). - EnableIPv6 bool - - // EnableEncapsulation enables use of encapsulation in communication - // between nodes. - // - // This field is immutable at runtime. The value will not change in - // subsequent calls to NodeConfigurationChanged(). - EnableEncapsulation bool - - // EnableAutoDirectRouting enables the use of direct routes for - // communication between nodes if two nodes have direct L2 - // connectivity. - // - // EnableAutoDirectRouting must be compatible with EnableEncapsulation - // and must provide a fallback to use encapsulation if direct routing - // is not feasible and encapsulation is enabled. - // - // This field is immutable at runtime. The value will not change in - // subsequent calls to NodeConfigurationChanged(). - EnableAutoDirectRouting bool - - // EnableLocalNodeRoute enables installation of the route which points - // the allocation prefix of the local node. Disabling this option is - // useful when another component is responsible for the routing of the - // allocation CIDR IPs into Cilium endpoints. - EnableLocalNodeRoute bool - - // EnableIPSec enables IPSec routes - EnableIPSec bool - - // EncryptNode enables encrypting NodeIP traffic requires EnableIPSec - EncryptNode bool - - // IPv4PodSubnets is a list of IPv4 subnets that pod IPs are assigned from - // these are then used when encryption is enabled to configure the node - // for encryption over these subnets at node initialization. - IPv4PodSubnets []*net.IPNet - - // IPv6PodSubnets is a list of IPv6 subnets that pod IPs are assigned from - // these are then used when encryption is enabled to configure the node - // for encryption over these subnets at node initialization. - IPv6PodSubnets []*net.IPNet -} - -// NodeHandler handles node related events such as addition, update or deletion -// of nodes or changes to the local node configuration. -// -// Node events apply to the local node as well as to remote nodes. The -// implementation can differ between the own local node and remote nodes by -// calling node.IsLocal(). -type NodeHandler interface { - // Name identifies the handler, this is used in logging/reporting handler - // reconciliation errors. - Name() string - - // NodeAdd is called when a node is discovered for the first time. - NodeAdd(newNode nodeTypes.Node) error - - // NodeUpdate is called when a node definition changes. Both the old - // and new node definition is provided. NodeUpdate() is never called - // before NodeAdd() is called for a particular node. - NodeUpdate(oldNode, newNode nodeTypes.Node) error - - // NodeDelete is called after a node has been deleted - NodeDelete(node nodeTypes.Node) error - - // AllNodeValidateImplementation is called to validate the implementation - // of all nodes in the node cache. - AllNodeValidateImplementation() - - // NodeValidateImplementation is called to validate the implementation of - // the node in the datapath. This function is intended to be run on an - // interval to ensure that the datapath is consistently converged. - NodeValidateImplementation(node nodeTypes.Node) error - - // NodeConfigurationChanged is called when the local node configuration - // has changed - NodeConfigurationChanged(config LocalNodeConfiguration) error -} - -type NodeNeighbors interface { - // NodeNeighDiscoveryEnabled returns whether node neighbor discovery is enabled - NodeNeighDiscoveryEnabled() bool - - // NodeNeighborRefresh is called to refresh node neighbor table - NodeNeighborRefresh(ctx context.Context, node nodeTypes.Node) - - // NodeCleanNeighbors cleans all neighbor entries for the direct routing device - // and the encrypt interface. - NodeCleanNeighbors(migrateOnly bool) -} - -type NodeIDHandler interface { - // GetNodeIP returns the string node IP that was previously registered as the given node ID. - GetNodeIP(uint16) string - - // GetNodeID gets the node ID for the given node IP. If none is found, exists is false. - GetNodeID(nodeIP net.IP) (nodeID uint16, exists bool) - - // DumpNodeIDs returns all node IDs and their associated IP addresses. - DumpNodeIDs() []*models.NodeID - - // RestoreNodeIDs restores node IDs and their associated IP addresses from the - // BPF map and into the node handler in-memory copy. - RestoreNodeIDs() -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/types/node_addressing.go b/vendor/github.com/cilium/cilium/pkg/datapath/types/node_addressing.go deleted file mode 100644 index 4582958b31e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/types/node_addressing.go +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "net" - - "github.com/cilium/cilium/pkg/cidr" -) - -// NodeAddressingFamily is the node addressing information for a particular -// address family -type NodeAddressingFamily interface { - // Router is the address that will act as the router on each node where - // an agent is running on. Endpoints have a default route that points - // to this address. - Router() net.IP - - // PrimaryExternal is the primary external address of the node. Nodes - // must be able to reach each other via this address. - PrimaryExternal() net.IP - - // AllocationCIDR is the CIDR used for IP allocation of all endpoints - // on the node - AllocationCIDR() *cidr.CIDR - - // LocalAddresses lists all local addresses - LocalAddresses() ([]net.IP, error) - - // LoadBalancerNodeAddresses lists all addresses on which HostPort and - // NodePort services should be responded to - LoadBalancerNodeAddresses() []net.IP - - // DirectRouting returns the interface index and IP address for - // direct routing. - DirectRouting() (int, net.IP, bool) -} - -// NodeAddressing implements addressing of a node -type NodeAddressing interface { - IPv6() NodeAddressingFamily - IPv4() NodeAddressingFamily -} diff --git a/vendor/github.com/cilium/cilium/pkg/datapath/types/wireguard.go b/vendor/github.com/cilium/cilium/pkg/datapath/types/wireguard.go deleted file mode 100644 index 46aa3ca2dba..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/datapath/types/wireguard.go +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "net" - - "github.com/cilium/cilium/api/v1/models" -) - -// WireguardAgent manages the WireGuard peers -type WireguardAgent interface { - UpdatePeer(nodeName, pubKeyHex string, nodeIPv4, nodeIPv6 net.IP) error - DeletePeer(nodeName string) error - Status(includePeers bool) (*models.WireguardStatus, error) -} diff --git a/vendor/github.com/cilium/cilium/pkg/debug/subsystem.go b/vendor/github.com/cilium/cilium/pkg/debug/subsystem.go deleted file mode 100644 index 62162e36489..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/debug/subsystem.go +++ /dev/null @@ -1,94 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package debug - -import ( - "fmt" - - "github.com/cilium/cilium/pkg/lock" -) - -// StatusFunc is a function returning the debug status of a subsytem. It is -// passed into RegisterStatusFunc(). -type StatusFunc func() string - -// StatusMap is the collection of debug status of all subsystems. The key is -// the subsystem name. The value is the subsystem debug status. -type StatusMap map[string]string - -// StatusObject is the interface an object must impelement to be able to be -// passed into RegisterStatusObject(). -type StatusObject interface { - // DebugStatus() is the equivalent of StatusFunc. It must return the - // debug status as a string. - DebugStatus() string -} - -type functionMap map[string]StatusFunc - -type statusFunctions struct { - functions functionMap - mutex lock.RWMutex -} - -func newStatusFunctions() statusFunctions { - return statusFunctions{ - functions: functionMap{}, - } -} - -func (s *statusFunctions) register(name string, fn StatusFunc) error { - s.mutex.Lock() - defer s.mutex.Unlock() - - if _, ok := s.functions[name]; ok { - return fmt.Errorf("subsystem already registered") - } - - s.functions[name] = fn - - return nil -} - -func (s *statusFunctions) registerStatusObject(name string, obj StatusObject) error { - return s.register(name, func() string { return obj.DebugStatus() }) -} - -func (s *statusFunctions) collectStatus() StatusMap { - fnCopy := functionMap{} - - // Make a copy to not hold the mutex while collecting the status - s.mutex.RLock() - for name, fn := range s.functions { - fnCopy[name] = fn - } - s.mutex.RUnlock() - - status := StatusMap{} - - for name, fn := range fnCopy { - status[name] = fn() - } - - return status -} - -var globalStatusFunctions = newStatusFunctions() - -// RegisterStatusFunc registers a subsystem and associates a status function to -// call for debug status collection -func RegisterStatusFunc(name string, fn StatusFunc) error { - return globalStatusFunctions.register(name, fn) -} - -// RegisterStatusObject registers a subsystem and associated a status object on -// which DebugStatus() is called to collect debug status -func RegisterStatusObject(name string, obj StatusObject) error { - return globalStatusFunctions.registerStatusObject(name, obj) -} - -// CollectSubsystemStatus collects the status of all subsystems and returns it -func CollectSubsystemStatus() StatusMap { - return globalStatusFunctions.collectStatus() -} diff --git a/vendor/github.com/cilium/cilium/pkg/defaults/defaults.go b/vendor/github.com/cilium/cilium/pkg/defaults/defaults.go index 11234c219af..a404fb6e61a 100644 --- a/vendor/github.com/cilium/cilium/pkg/defaults/defaults.go +++ b/vendor/github.com/cilium/cilium/pkg/defaults/defaults.go @@ -56,8 +56,9 @@ const ( // TemplatesDir is the default path for the compiled template objects relative to StateDir TemplatesDir = "templates" - // TemplatePath is the default path for a symlink to a template relative to StateDir/ - TemplatePath = "template.o" + // TemplateIDPath is the name of a file which contains the ID (aka hash) of + // the template used by the endpoint. + TemplateIDPath = "template.txt" // BpfDir is the default path for template files relative to LibDir BpfDir = "bpf" @@ -98,6 +99,17 @@ const ( // HubbleRedactKafkaApiKey controls if the Kafka API key will be redacted from flows HubbleRedactKafkaApiKey = false + // HubbleDropEventsEnabled controls whether Hubble should create v1.Events + // for packet drops related to pods + HubbleDropEventsEnabled = false + + // HubbleDropEventsInterval controls the minimum time between emitting events + // with the same source and destination IP + HubbleDropEventsInterval = 2 * time.Minute + + // HubbleDropEventsReasons controls which drop reasons to emit events for + HubbleDropEventsReasons = "auth_required,policy_denied" + // MonitorSockPath1_2 is the path to the UNIX domain socket used to // distribute BPF and agent events to listeners. // This is the 1.2 protocol version. @@ -114,10 +126,6 @@ const ( // the agent and the CNI plugin processes DeleteQueueLockfile = DeleteQueueDir + "/lockfile" - // EnableHostIPRestore controls whether the host IP should be restored - // from previous state automatically - EnableHostIPRestore = true - // BPFFSRoot is the default path where BPFFS should be mounted BPFFSRoot = "/sys/fs/bpf" @@ -173,13 +181,29 @@ const ( // DNSProxyEnableTransparentMode enables transparent mode for the DNS proxy. DNSProxyEnableTransparentMode = false + // DNSProxyLockCount is the default array size containing mutexes which protect + // against parallel handling of DNS response names. + DNSProxyLockCount = 131 + + // DNSProxyLockTimeout is the default timeout when acquiring the locks controlled by + // DNSProxyLockCount. + DNSProxyLockTimeout = 500 * time.Millisecond + + // DNSProxySocketLingerTimeout defines how many seconds we wait for the connection + // between the DNS proxy and the upstream server to be closed. + DNSProxySocketLingerTimeout = 10 + // IdentityChangeGracePeriod is the default value for // option.IdentityChangeGracePeriod IdentityChangeGracePeriod = 5 * time.Second - // IdentityRestoreGracePeriod is the default value for - // option.IdentityRestoreGracePeriod - IdentityRestoreGracePeriod = 10 * time.Minute + // IdentityRestoreGracePeriodKvstore is the default value for + // option.IdentityRestoreGracePeriod when kvstore is enabled. + IdentityRestoreGracePeriodKvstore = 10 * time.Minute + + // IdentityRestoreGracePeriodKvstore is the default value for + // option.IdentityRestoreGracePeriod when only k8s is in use + IdentityRestoreGracePeriodK8s = 30 * time.Second // ExecTimeout is a timeout for executing commands. ExecTimeout = 300 * time.Second @@ -220,9 +244,6 @@ const ( // EnableL7Proxy is the default value for L7 proxy enablement EnableL7Proxy = true - // EnvoyConfigTimeout determines how long to wait Envoy to N/ACK resources - EnvoyConfigTimeout = 2 * time.Minute - // EnableHostLegacyRouting is the default value for using the old routing path via stack. EnableHostLegacyRouting = false @@ -242,7 +263,12 @@ const ( // Enable caching for XfrmState for IPSec. Significantly reduces CPU usage // in large clusters. - EnableIPSecXfrmStateCaching = false + EnableIPSecXfrmStateCaching = true + + // Enable IPSec encrypted overlay + // + // This feature will encrypt overlay traffic before it leaves the cluster. + EnableIPSecEncryptedOverlay = false // EncryptNode enables encrypting traffic from host networking applications // which are not part of Cilium manged pods. @@ -283,6 +309,9 @@ const ( // EnableAutoDirectRouting is the default value for EnableAutoDirectRouting EnableAutoDirectRouting = false + // EnableDirectRoutingSkipUnreachable is the default value for EnableDirectRoutingIgnoreUnreachableName + EnableDirectRoutingSkipUnreachable = false + // EnableHealthChecking is the default value for EnableHealthChecking EnableHealthChecking = true @@ -311,9 +340,6 @@ const ( // a kvstore path for too long. KVStoreStaleLockTimeout = 30 * time.Second - // IPAllocationTimeout is the timeout when allocating CIDRs - IPAllocationTimeout = 2 * time.Minute - // PolicyQueueSize is the default queue size for policy-related events. PolicyQueueSize = 100 @@ -345,8 +371,6 @@ const ( // connection tracking garbage collection ConntrackGCStartingInterval = 5 * time.Minute - LegacyTurnOffK8sEventHandover = false - // LoopbackIPv4 is the default address for service loopback LoopbackIPv4 = "169.254.42.1" @@ -441,11 +465,11 @@ const ( // policy updates are invoked. PolicyTriggerInterval = 1 * time.Second - // K8sClientQPSLimit is the default qps for the k8s client. It is set to 0 because the the k8s client + // K8sClientQPSLimit is the default qps for the k8s client. It is set to 0 because the k8s client // has its own default. K8sClientQPSLimit float32 = 0.0 - // K8sClientBurst is the default burst for the k8s client. It is set to 0 because the the k8s client + // K8sClientBurst is the default burst for the k8s client. It is set to 0 because the k8s client // has its own default. K8sClientBurst = 0 @@ -472,9 +496,6 @@ const ( // specified in the L7 policies. CertsDirectory = RuntimePath + "/certs" - // EnableRemoteNodeIdentity is the default value for option.EnableRemoteNodeIdentity - EnableRemoteNodeIdentity = true - // IPAMExpiration is the timeout after which an IP subject to expiratio // is being released again if no endpoint is being created in time. IPAMExpiration = 10 * time.Minute @@ -559,8 +580,23 @@ const ( // allocatable identities. MaxConnectedClusters = 255 + // EnableNodeSelectorLabels is the default value for option.EnableNodeSelectorLabels + EnableNodeSelectorLabels = false + + // BPFEventsDropEnabled controls whether the Cilium datapath exposes "drop" events to Cilium monitor and Hubble. + BPFEventsDropEnabled = true + + // BPFEventsPolicyVerdictEnabled controls whether the Cilium datapath exposes "policy verdict" events to Cilium monitor and Hubble. + BPFEventsPolicyVerdictEnabled = true + + // BPFEventsTraceEnabled controls whether the Cilium datapath exposes "trace" events to Cilium monitor and Hubble. + BPFEventsTraceEnabled = true + // EnableEnvoyConfig is the default value for option.EnableEnvoyConfig EnableEnvoyConfig = false + + // NetNsPath is the default path to the mounted network namespaces directory + NetNsPath = "/var/run/cilium/netns" ) var ( diff --git a/vendor/github.com/cilium/cilium/pkg/ebpf/doc.go b/vendor/github.com/cilium/cilium/pkg/ebpf/doc.go deleted file mode 100644 index 7a7cdb0cba2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/ebpf/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package ebpf provides functions that allow golang programs to interact with -// ebpf maps by wrapping the cilium/ebpf library. -// +groupName=pkg -package ebpf diff --git a/vendor/github.com/cilium/cilium/pkg/ebpf/ebpf.go b/vendor/github.com/cilium/cilium/pkg/ebpf/ebpf.go deleted file mode 100644 index 630074060f2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/ebpf/ebpf.go +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package ebpf - -import ( - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "ebpf") -) diff --git a/vendor/github.com/cilium/cilium/pkg/ebpf/map.go b/vendor/github.com/cilium/cilium/pkg/ebpf/map.go deleted file mode 100644 index f5edec6bf69..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/ebpf/map.go +++ /dev/null @@ -1,208 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package ebpf - -import ( - "errors" - "fmt" - "os" - "path/filepath" - - ciliumebpf "github.com/cilium/ebpf" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/bpf" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/metrics" -) - -type MapSpec = ciliumebpf.MapSpec - -type PinType = ciliumebpf.PinType - -const ( - Hash = ciliumebpf.Hash - PerCPUHash = ciliumebpf.PerCPUHash - Array = ciliumebpf.Array - HashOfMaps = ciliumebpf.HashOfMaps - LPMTrie = ciliumebpf.LPMTrie - - PinNone = ciliumebpf.PinNone - PinByName = ciliumebpf.PinByName -) - -var ( - ErrKeyNotExist = ciliumebpf.ErrKeyNotExist -) - -// IterateCallback represents the signature of the callback function expected by -// the IterateWithCallback method, which in turn is used to iterate all the -// keys/values of a map. -type IterateCallback func(key, value interface{}) - -// Map represents an eBPF map. -type Map struct { - lock lock.RWMutex - *ciliumebpf.Map - - spec *MapSpec - path string -} - -// NewMap creates a new Map object. -func NewMap(spec *MapSpec) *Map { - return &Map{ - spec: spec, - } -} - -// LoadRegisterMap loads the specified map from a bpffs pin path and registers -// its handle in the package-global map register. -func LoadRegisterMap(mapName string) (*Map, error) { - path := bpf.MapPath(mapName) - - m, err := LoadPinnedMap(path) - if err != nil { - return nil, err - } - - registerMap(m) - - return m, nil -} - -// LoadPinnedMap wraps cilium/ebpf's LoadPinnedMap. -func LoadPinnedMap(fileName string) (*Map, error) { - m, err := ciliumebpf.LoadPinnedMap(fileName, nil) - if err != nil { - return nil, err - } - - return &Map{ - Map: m, - path: fileName, - }, nil -} - -func MapFromID(id int) (*Map, error) { - newMap, err := ciliumebpf.NewMapFromID(ciliumebpf.MapID(id)) - if err != nil { - return nil, err - } - - return &Map{ - Map: newMap, - }, nil -} - -// OpenOrCreate tries to open or create the eBPF map identified by the spec in -// the Map object. -func (m *Map) OpenOrCreate() error { - m.lock.Lock() - defer m.lock.Unlock() - - if m.Map != nil { - return nil - } - - if m.spec == nil { - return fmt.Errorf("cannot create map: nil map spec") - } - - opts := ciliumebpf.MapOptions{ - PinPath: bpf.TCGlobalsPath(), - } - - m.spec.Flags |= bpf.GetPreAllocateMapFlags(m.spec.Type) - - path := bpf.MapPath(m.spec.Name) - - if m.spec.Pinning == ciliumebpf.PinByName { - mapDir := filepath.Dir(path) - - if _, err := os.Stat(mapDir); os.IsNotExist(err) { - if err = os.MkdirAll(mapDir, 0755); err != nil { - return &os.PathError{ - Op: "Unable create map base directory", - Path: path, - Err: err, - } - } - } - } - - newMap, err := ciliumebpf.NewMapWithOptions(m.spec, opts) - if err != nil { - if !errors.Is(err, ciliumebpf.ErrMapIncompatible) { - return fmt.Errorf("unable to create map: %w", err) - } - - // There already exists a pinned map but it has a different - // configuration (e.g different type, k/v size or flags). - // Try to delete and recreate it. - - log.WithField("map", m.spec.Name). - WithError(err).Warn("Removing map to allow for property upgrade (expect map data loss)") - - oldMap, err := ciliumebpf.LoadPinnedMap(path, &opts.LoadPinOptions) - if err != nil { - return fmt.Errorf("cannot load pinned map %s: %w", m.spec.Name, err) - } - defer func() { - if err := oldMap.Close(); err != nil { - log.WithField("map", m.spec.Name).Warnf("Cannot close map: %v", err) - } - }() - - if err = oldMap.Unpin(); err != nil { - return fmt.Errorf("cannot unpin map %s: %w", m.spec.Name, err) - } - - newMap, err = ciliumebpf.NewMapWithOptions(m.spec, opts) - if err != nil { - return fmt.Errorf("unable to create map: %w", err) - } - } - - m.Map = newMap - m.path = path - - registerMap(m) - metrics.UpdateMapCapacity(m.spec.Name, m.spec.MaxEntries) - return nil -} - -// IterateWithCallback iterates through all the keys/values of a map, passing -// each key/value pair to the cb callback. -func (m *Map) IterateWithCallback(key, value interface{}, cb IterateCallback) error { - if m.Map == nil { - if err := m.OpenOrCreate(); err != nil { - return err - } - } - - m.lock.RLock() - defer m.lock.RUnlock() - - entries := m.Iterate() - for entries.Next(key, value) { - cb(key, value) - } - - return nil -} - -// GetModel returns a BPF map in the representation served via the API. -func (m *Map) GetModel() *models.BPFMap { - m.lock.RLock() - defer m.lock.RUnlock() - - mapModel := &models.BPFMap{ - Path: m.path, - } - - // TODO: handle map cache. See pkg/bpf/map_linux.go:GetModel() - - return mapModel -} diff --git a/vendor/github.com/cilium/cilium/pkg/ebpf/map_register.go b/vendor/github.com/cilium/cilium/pkg/ebpf/map_register.go deleted file mode 100644 index 61327b6eb29..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/ebpf/map_register.go +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package ebpf - -import ( - "path" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/bpf" - "github.com/cilium/cilium/pkg/lock" -) - -var ( - mutex lock.RWMutex - mapRegister = map[string]*Map{} -) - -func registerMap(m *Map) { - mutex.Lock() - mapRegister[m.path] = m - mutex.Unlock() - - log.WithField("path", m.path).Debug("Registered BPF map") -} - -// GetMap returns the registered map with the given name or absolute path -func GetMap(name string) *Map { - mutex.RLock() - defer mutex.RUnlock() - - if !path.IsAbs(name) { - name = bpf.MapPath(name) - } - - return mapRegister[name] -} - -// GetOpenMaps returns a slice of all open BPF maps. This is identical to -// calling GetMap() on all open maps. -func GetOpenMaps() []*models.BPFMap { - // create a copy of mapRegister so we can unlock the mutex again as - // locking Map.lock inside of the mutex is not permitted - mutex.RLock() - maps := make([]*Map, 0, len(mapRegister)) - for _, m := range mapRegister { - maps = append(maps, m) - } - mutex.RUnlock() - - mapList := make([]*models.BPFMap, len(maps)) - for i, m := range maps { - mapList[i] = m.GetModel() - } - - return mapList -} diff --git a/vendor/github.com/cilium/cilium/pkg/endpoint/id/id.go b/vendor/github.com/cilium/cilium/pkg/endpoint/id/id.go deleted file mode 100644 index 96b8d7b1025..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/endpoint/id/id.go +++ /dev/null @@ -1,159 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package id - -import ( - "fmt" - "math" - "net/netip" - "strconv" - "strings" -) - -// MaxEndpointID is the maximum endpoint identifier. -const MaxEndpointID = math.MaxUint16 - -// PrefixType describes the type of endpoint identifier -type PrefixType string - -func (s PrefixType) String() string { return string(s) } - -const ( - // CiliumLocalIdPrefix is a numeric identifier with local scope. It has - // no cluster wide meaning and is only unique in the scope of a single - // agent. An endpoint is guaranteed to always have a local scope identifier. - CiliumLocalIdPrefix PrefixType = "cilium-local" - - // CiliumGlobalIdPrefix is an endpoint identifier with global scope. - // This addressing mechanism is currently unused. - CiliumGlobalIdPrefix PrefixType = "cilium-global" - - // ContainerIdPrefix is used to address an endpoint via its primary - // container ID. The container ID is specific to the container runtime - // in use. Only the primary container that defines the networking scope - // can be used to address an endpoint. - // This can only be used to look up endpoints which have not opted-out of - // legacy identifiers. - // Deprecated. Use CNIAttachmentIdPrefix instead - ContainerIdPrefix PrefixType = "container-id" - - // CNIAttachmentIdPrefix is used to address an endpoint via its primary - // container ID and container interface passed to the CNI plugin. - // This attachment ID uniquely identifies a CNI ADD and CNI DEL invocation pair. - CNIAttachmentIdPrefix PrefixType = "cni-attachment-id" - - // DockerEndpointPrefix is used to address an endpoint via the Docker - // endpoint ID. This method is only possible if the endpoint was - // created via the cilium-docker plugin and the container is backed by - // the libnetwork abstraction. - DockerEndpointPrefix PrefixType = "docker-endpoint" - - // ContainerNamePrefix is used to address the endpoint via the - // container's name. This addressing mechanism depends on the container - // runtime. Only the primary container that the networking scope can be - // used to address an endpoint. - // This can only be used to look up endpoints which have not opted-out of - // legacy identifiers. - // Deprecated. Use CNIAttachmentIdPrefix instead - ContainerNamePrefix PrefixType = "container-name" - - // CEPNamePrefix is used to address an endpoint via its Kubernetes - // CiliumEndpoint resource name. This addressing only works if the endpoint - // is represented as a Kubernetes CiliumEndpoint resource. - CEPNamePrefix PrefixType = "cep-name" - - // PodNamePrefix is used to address an endpoint via the Kubernetes pod - // name. This addressing only works if the endpoint represents as - // Kubernetes pod. - // This can only be used to look up endpoints which have not opted-out of - // legacy identifiers. - // Deprecated. May not be unique. Use CEPNamePrefix instead. - PodNamePrefix PrefixType = "pod-name" - - // IPv4Prefix is used to address an endpoint via the endpoint's IPv4 - // address. - IPv4Prefix PrefixType = "ipv4" - - // IPv6Prefix is the prefix used to refer to an endpoint via IPv6 address - IPv6Prefix PrefixType = "ipv6" -) - -// NewCiliumID returns a new endpoint identifier of type CiliumLocalIdPrefix -func NewCiliumID(id int64) string { - return NewID(CiliumLocalIdPrefix, strconv.FormatInt(id, 10)) -} - -// NewID returns a new endpoint identifier -func NewID(prefix PrefixType, id string) string { - return string(prefix) + ":" + id -} - -// NewIPPrefixID returns an identifier based on the IP address specified. If ip -// is invalid, an empty string is returned. -func NewIPPrefixID(ip netip.Addr) string { - if ip.IsValid() { - if ip.Is4() { - return NewID(IPv4Prefix, ip.String()) - } - return NewID(IPv6Prefix, ip.String()) - } - return "" -} - -// NewCNIAttachmentID returns an identifier based on the CNI attachment ID. If -// the containerIfName is empty, only the containerID will be used. -func NewCNIAttachmentID(containerID, containerIfName string) string { - id := containerID - if containerIfName != "" { - id = containerID + ":" + containerIfName - } - return NewID(CNIAttachmentIdPrefix, id) -} - -// splitID splits ID into prefix and id. No validation is performed on prefix. -func splitID(id string) (PrefixType, string) { - if idx := strings.IndexByte(id, ':'); idx > -1 { - return PrefixType(id[:idx]), id[idx+1:] - } - - // default prefix - return CiliumLocalIdPrefix, id -} - -// ParseCiliumID parses id as cilium endpoint id and returns numeric portion. -func ParseCiliumID(id string) (int64, error) { - prefix, id := splitID(id) - if prefix != CiliumLocalIdPrefix { - return 0, fmt.Errorf("not a cilium identifier") - } - n, err := strconv.ParseInt(id, 0, 64) - if err != nil || n < 0 { - return 0, fmt.Errorf("invalid numeric cilium id: %w", err) - } - if n > MaxEndpointID { - return 0, fmt.Errorf("endpoint id too large: %d", n) - } - return n, nil -} - -// Parse parses a string as an endpoint identified consists of an optional -// prefix [prefix:] followed by the identifier. -func Parse(id string) (PrefixType, string, error) { - prefix, id := splitID(id) - switch prefix { - case CiliumLocalIdPrefix, - CiliumGlobalIdPrefix, - CNIAttachmentIdPrefix, - ContainerIdPrefix, - DockerEndpointPrefix, - ContainerNamePrefix, - CEPNamePrefix, - PodNamePrefix, - IPv4Prefix, - IPv6Prefix: - return prefix, id, nil - } - - return "", "", fmt.Errorf("unknown endpoint ID prefix \"%s\"", prefix) -} diff --git a/vendor/github.com/cilium/cilium/pkg/endpoint/id/identifiers.go b/vendor/github.com/cilium/cilium/pkg/endpoint/id/identifiers.go deleted file mode 100644 index d2deaa391e5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/endpoint/id/identifiers.go +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package id - -// Identifiers is a collection of attributes that identify the Endpoint through -// different systems. For examples of the type of Identifiers, see PrefixType. -type Identifiers map[PrefixType]string diff --git a/vendor/github.com/cilium/cilium/pkg/endpoint/regeneration/owner.go b/vendor/github.com/cilium/cilium/pkg/endpoint/regeneration/owner.go deleted file mode 100644 index 57a6a75cc14..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/endpoint/regeneration/owner.go +++ /dev/null @@ -1,67 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package regeneration - -import ( - "context" - - datapath "github.com/cilium/cilium/pkg/datapath/types" - "github.com/cilium/cilium/pkg/fqdn/restore" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/lock" - monitorAPI "github.com/cilium/cilium/pkg/monitor/api" - "github.com/cilium/cilium/pkg/proxy/accesslog" -) - -// Owner is the interface defines the requirements for anybody owning policies. -type Owner interface { - // QueueEndpointBuild puts the given endpoint in the processing queue - QueueEndpointBuild(ctx context.Context, epID uint64) (func(), error) - - // GetCompilationLock returns the mutex responsible for synchronizing compilation - // of BPF programs. - GetCompilationLock() *lock.RWMutex - - // SendNotification is called to emit an agent notification - SendNotification(msg monitorAPI.AgentNotifyMessage) error - - // Datapath returns a reference to the datapath implementation. - Datapath() datapath.Datapath - - // GetDNSRules creates a fresh copy of DNS rules that can be used when - // endpoint is restored on a restart. - // The endpoint lock must not be held while calling this function. - GetDNSRules(epID uint16) restore.DNSRules - - // RemoveRestoredDNSRules removes any restored DNS rules for - // this endpoint from the DNS proxy. - RemoveRestoredDNSRules(epID uint16) -} - -// EndpointInfoSource returns information about an endpoint being proxied. -// The read lock must be held when calling any method. -type EndpointInfoSource interface { - GetID() uint64 - GetIPv4Address() string - GetIPv6Address() string - GetIdentity() identity.NumericIdentity - GetLabels() []string - HasSidecarProxy() bool - ConntrackName() string - ConntrackNameLocked() string -} - -// EndpointUpdater returns information about an endpoint being proxied and -// is called back to update the endpoint when proxy events occur. -// This is a subset of `Endpoint`. -type EndpointUpdater interface { - EndpointInfoSource - // OnProxyPolicyUpdate is called when the proxy acknowledges that it - // has applied a policy. - OnProxyPolicyUpdate(policyRevision uint64) - - // UpdateProxyStatistics updates the Endpoint's proxy statistics to account - // for a new observed flow with the given characteristics. - UpdateProxyStatistics(proxyType, l4Protocol string, port uint16, ingress, request bool, verdict accesslog.FlowVerdict) -} diff --git a/vendor/github.com/cilium/cilium/pkg/endpoint/regeneration/regeneration_context.go b/vendor/github.com/cilium/cilium/pkg/endpoint/regeneration/regeneration_context.go deleted file mode 100644 index 84cdc63de4d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/endpoint/regeneration/regeneration_context.go +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package regeneration - -import ( - "context" -) - -// DatapathRegenerationLevel determines what is expected of the datapath when -// a regeneration event is processed. -type DatapathRegenerationLevel int - -const ( - // Invalid is the default level to enforce explicit setting of - // the regeneration level. - Invalid DatapathRegenerationLevel = iota - // RegenerateWithoutDatapath indicates that datapath rebuild or reload - // is not required to implement this regeneration. - RegenerateWithoutDatapath - // RegenerateWithDatapathLoad indicates that the datapath must be - // reloaded but not recompiled to implement this regeneration. - RegenerateWithDatapathLoad - // RegenerateWithDatapathRewrite indicates that the datapath must be - // recompiled and reloaded to implement this regeneration. - RegenerateWithDatapathRewrite - // RegenerateWithDatapathRebuild indicates that the datapath must be - // fully recompiled and reloaded without using any cached templates. - RegenerateWithDatapathRebuild -) - -// String converts a DatapathRegenerationLevel into a human-readable string. -func (r DatapathRegenerationLevel) String() string { - switch r { - case Invalid: - return "invalid" - case RegenerateWithoutDatapath: - return "no-rebuild" - case RegenerateWithDatapathLoad: - return "reload" - case RegenerateWithDatapathRewrite: - return "rewrite+load" - case RegenerateWithDatapathRebuild: - return "compile+load" - default: - break - } - return "BUG: Unknown DatapathRegenerationLevel" -} - -// ExternalRegenerationMetadata contains any information about a regeneration that -// the endpoint subsystem should be made aware of for a given endpoint. -type ExternalRegenerationMetadata struct { - // Reason provides context to source for the regeneration, which is - // used to generate useful log messages. - Reason string - - // RegenerationLevel forces datapath regeneration according to the - // levels defined in the DatapathRegenerationLevel description. - RegenerationLevel DatapathRegenerationLevel - - ParentContext context.Context -} diff --git a/vendor/github.com/cilium/cilium/pkg/eventqueue/doc.go b/vendor/github.com/cilium/cilium/pkg/eventqueue/doc.go deleted file mode 100644 index 62b82c19d1c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/eventqueue/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package eventqueue implements a queue-based system for event processing in a -// generic fashion in a first-in, first-out manner. -package eventqueue diff --git a/vendor/github.com/cilium/cilium/pkg/eventqueue/eventqueue.go b/vendor/github.com/cilium/cilium/pkg/eventqueue/eventqueue.go deleted file mode 100644 index e4bd753c7b8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/eventqueue/eventqueue.go +++ /dev/null @@ -1,314 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package eventqueue - -import ( - "fmt" - "reflect" - "sync" - "sync/atomic" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/spanstat" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "eventqueue") -) - -// EventQueue is a structure which is utilized to handle Events in a first-in, -// first-out order. An EventQueue may be closed, in which case all events which -// are queued up, but have not been processed yet, will be cancelled (i.e., not -// ran). It is guaranteed that no events will be scheduled onto an EventQueue -// after it has been closed; if any event is attempted to be scheduled onto an -// EventQueue after it has been closed, it will be cancelled immediately. For -// any event to be processed by the EventQueue, it must implement the -// `EventHandler` interface. This allows for different types of events to be -// processed by anything which chooses to utilize an `EventQueue`. -type EventQueue struct { - // events represents the queue of events. This should always be a buffered - // channel. - events chan *Event - - // close is closed once the EventQueue has been closed. - close chan struct{} - - // drain is closed when the EventQueue is stopped. Any Event which is - // Enqueued after this channel is closed will be cancelled / not processed - // by the queue. If an Event has been Enqueued, but has not been processed - // before this channel is closed, it will be cancelled and not processed - // as well. - drain chan struct{} - - // eventQueueOnce is used to ensure that the EventQueue business logic can - // only be ran once. - eventQueueOnce sync.Once - - // closeOnce is used to ensure that the EventQueue can only be closed once. - closeOnce sync.Once - - // name is used to differentiate this EventQueue from other EventQueues that - // are also running in logs - name string - - eventsMu lock.RWMutex - - // eventsClosed is a channel that's closed when the event loop (Run()) - // terminates. - eventsClosed chan struct{} -} - -// NewEventQueue returns an EventQueue with a capacity for only one event at -// a time. -func NewEventQueue() *EventQueue { - return NewEventQueueBuffered("", 1) -} - -// NewEventQueueBuffered returns an EventQueue with a capacity of, -// numBufferedEvents at a time, and all other needed fields initialized. -func NewEventQueueBuffered(name string, numBufferedEvents int) *EventQueue { - log.WithFields(logrus.Fields{ - "name": name, - "numBufferedEvents": numBufferedEvents, - }).Debug("creating new EventQueue") - return &EventQueue{ - name: name, - // Up to numBufferedEvents can be Enqueued until Enqueueing blocks. - events: make(chan *Event, numBufferedEvents), - close: make(chan struct{}), - drain: make(chan struct{}), - eventsClosed: make(chan struct{}), - } -} - -// Enqueue pushes the given event onto the EventQueue. If the queue has been -// stopped, the Event will not be enqueued, and its cancel channel will be -// closed, indicating that the Event was not ran. This function may block if -// the queue is at its capacity for events. If a single Event has Enqueue -// called on it multiple times asynchronously, there is no guarantee as to -// which one will return the channel which passes results back to the caller. -// It is up to the caller to check whether the returned channel is nil, as -// waiting to receive on such a channel will block forever. Returns an error -// if the Event has been previously enqueued, if the Event is nil, or the queue -// itself is not initialized properly. -func (q *EventQueue) Enqueue(ev *Event) (<-chan interface{}, error) { - if q.notSafeToAccess() || ev == nil { - return nil, fmt.Errorf("unable to Enqueue event") - } - - // Events can only be enqueued once. - if !ev.enqueued.CompareAndSwap(false, true) { - return nil, fmt.Errorf("unable to Enqueue event; event has already had Enqueue called on it") - } - - // Multiple Enqueues can occur at the same time. Ensure that events channel - // is not closed while we are enqueueing events. - q.eventsMu.RLock() - defer q.eventsMu.RUnlock() - - select { - // The event should be drained from the queue (e.g., it should not be - // processed). - case <-q.drain: - // Closed eventResults channel signifies cancellation. - close(ev.cancelled) - close(ev.eventResults) - - return ev.eventResults, nil - default: - // The events channel may be closed even if an event has been pushed - // onto the events channel, as events are consumed off of the events - // channel asynchronously! If the EventQueue is closed before this - // event is processed, then it will be cancelled. - - ev.stats.waitEnqueue.Start() - ev.stats.waitConsumeOffQueue.Start() - q.events <- ev - ev.stats.waitEnqueue.End(true) - return ev.eventResults, nil - } -} - -// Event is an event that can be enqueued onto an EventQueue. -type Event struct { - // Metadata is the information about the event which is sent - // by its queuer. Metadata must implement the EventHandler interface in - // order for the Event to be successfully processed by the EventQueue. - Metadata EventHandler - - // eventResults is a channel on which the results of the event are sent. - // It is populated by the EventQueue itself, not by the queuer. This channel - // is closed if the event is cancelled. - eventResults chan interface{} - - // cancelled signals that the given Event was not ran. This can happen - // if the EventQueue processing this Event was closed before the Event was - // Enqueued onto the Event queue, or if the Event was Enqueued onto an - // EventQueue, and the EventQueue on which the Event was scheduled was - // closed. - cancelled chan struct{} - - // stats is a field which contains information about when this event is - // enqueued, dequeued, etc. - stats eventStatistics - - // enqueued specifies whether this event has been enqueued on an EventQueue. - enqueued atomic.Bool -} - -type eventStatistics struct { - - // waitEnqueue shows how long a given event was waiting on the queue before - // it was actually processed. - waitEnqueue spanstat.SpanStat - - // durationStat shows how long the actual processing of the event took. This - // is the time for how long Handle() takes for the event. - durationStat spanstat.SpanStat - - // waitConsumeOffQueue shows how long it took for the event to be consumed - // plus the time it the event waited in the queue. - waitConsumeOffQueue spanstat.SpanStat -} - -// NewEvent returns an Event with all fields initialized. -func NewEvent(meta EventHandler) *Event { - return &Event{ - Metadata: meta, - eventResults: make(chan interface{}, 1), - cancelled: make(chan struct{}), - stats: eventStatistics{}, - } -} - -// WasCancelled returns whether the cancelled channel for the given Event has -// been closed or not. Cancellation occurs if the event was not processed yet -// by an EventQueue onto which this Event was Enqueued, and the queue is closed, -// or if the event was attempted to be scheduled onto an EventQueue which has -// already been closed. -func (ev *Event) WasCancelled() bool { - select { - case <-ev.cancelled: - return true - default: - return false - } -} - -func (ev *Event) printStats(q *EventQueue) { - if option.Config.Debug { - q.getLogger().WithFields(logrus.Fields{ - "eventType": reflect.TypeOf(ev.Metadata).String(), - "eventHandlingDuration": ev.stats.durationStat.Total(), - "eventEnqueueWaitTime": ev.stats.waitEnqueue.Total(), - "eventConsumeOffQueueWaitTime": ev.stats.waitConsumeOffQueue.Total(), - }).Debug("EventQueue event processing statistics") - } -} - -// Run consumes events that have been queued for this EventQueue. It -// is presumed that the eventQueue is a buffered channel with a length of one -// (i.e., only one event can be processed at a time). All business logic for -// handling queued events is contained within this function. The events in the -// queue must implement the EventHandler interface. If the event queue is -// closed, then all events which were queued up, but not processed, are -// cancelled; any event which is currently being processed will not be -// cancelled. -func (q *EventQueue) Run() { - if q.notSafeToAccess() { - return - } - - go q.run() -} - -func (q *EventQueue) run() { - q.eventQueueOnce.Do(func() { - defer close(q.eventsClosed) - for ev := range q.events { - select { - case <-q.drain: - ev.stats.waitConsumeOffQueue.End(false) - close(ev.cancelled) - close(ev.eventResults) - ev.printStats(q) - default: - ev.stats.waitConsumeOffQueue.End(true) - ev.stats.durationStat.Start() - ev.Metadata.Handle(ev.eventResults) - // Always indicate success for now. - ev.stats.durationStat.End(true) - // Ensures that no more results can be sent as the event has - // already been processed. - ev.printStats(q) - close(ev.eventResults) - } - } - }) -} - -func (q *EventQueue) notSafeToAccess() bool { - return q == nil || q.close == nil || q.drain == nil || q.events == nil -} - -// Stop stops any further events from being processed by the EventQueue. Any -// event which is currently being processed by the EventQueue will continue to -// run. All other events waiting to be processed, and all events that may be -// enqueued will not be processed by the event queue; they will be cancelled. -// If the queue has already been stopped, this is a no-op. -func (q *EventQueue) Stop() { - if q.notSafeToAccess() { - return - } - - q.closeOnce.Do(func() { - q.getLogger().Debug("stopping EventQueue") - // Any event that is sent to the queue at this point will be cancelled - // immediately in Enqueue(). - close(q.drain) - - // Signal that the queue has been drained. - close(q.close) - - q.eventsMu.Lock() - close(q.events) - q.eventsMu.Unlock() - }) -} - -// WaitToBeDrained returns the channel which waits for the EventQueue to have been -// stopped. This allows for queuers to ensure that all events in the queue have -// been processed or cancelled. If the queue is nil, returns immediately. -func (q *EventQueue) WaitToBeDrained() { - if q == nil { - return - } - <-q.close - - // If the queue is running, then in-flight events may still be ongoing. - // Wait for them to be completed for the queue to be fully drained. If the - // queue is not running, we must forcefully run it because nothing else - // will so that it can be drained. - go q.run() - <-q.eventsClosed -} - -func (q *EventQueue) getLogger() *logrus.Entry { - return log.WithFields( - logrus.Fields{ - "name": q.name, - }) -} - -// EventHandler is an interface for allowing an EventQueue to handle events -// in a generic way. To be processed by the EventQueue, all event types must -// implement any function specified in this interface. -type EventHandler interface { - Handle(chan interface{}) -} diff --git a/vendor/github.com/cilium/cilium/pkg/fqdn/dns/dns.go b/vendor/github.com/cilium/cilium/pkg/fqdn/dns/dns.go deleted file mode 100644 index 1c089a7857f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/fqdn/dns/dns.go +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Based on code from github.com/miekg/dns which is: -// -// Copyright 2009 The Go Authors. All rights reserved. -// Copyright 2011 Miek Gieben. All rights reserved. -// Copyright 2014 CloudFlare. All rights reserved. - -package dns - -import "strings" - -// These functions were copied and adapted from github.com/miekg/dns. - -// isFQDN reports whether the domain name s is fully qualified. -func isFQDN(s string) bool { - s2 := strings.TrimSuffix(s, ".") - if s == s2 { - return false - } - - i := strings.LastIndexFunc(s2, func(r rune) bool { - return r != '\\' - }) - - // Test whether we have an even number of escape sequences before - // the dot or none. - return (len(s2)-i)%2 != 0 -} - -// FQDN returns the fully qualified domain name from s. -// If s is already fully qualified, it behaves as the identity function. -func FQDN(s string) string { - if isFQDN(s) { - return strings.ToLower(s) - } - return strings.ToLower(s) + "." -} diff --git a/vendor/github.com/cilium/cilium/pkg/fqdn/matchpattern/matchpattern.go b/vendor/github.com/cilium/cilium/pkg/fqdn/matchpattern/matchpattern.go deleted file mode 100644 index 68e083175da..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/fqdn/matchpattern/matchpattern.go +++ /dev/null @@ -1,107 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package matchpattern - -import ( - "errors" - "regexp" - "strings" - - "github.com/cilium/cilium/pkg/fqdn/dns" - "github.com/cilium/cilium/pkg/fqdn/re" -) - -const allowedDNSCharsREGroup = "[-a-zA-Z0-9_]" - -// MatchAllAnchoredPattern is the simplest pattern that match all inputs. This resulting -// parsed regular expression is the same as an empty string regex (""), but this -// value is easier to reason about when serializing to and from json. -const MatchAllAnchoredPattern = "(?:)" - -// MatchAllUnAnchoredPattern is the same as MatchAllAnchoredPattern, except that -// it can be or-ed (joined with "|") with other rules, and still match all rules. -const MatchAllUnAnchoredPattern = ".*" - -// Validate ensures that pattern is a parseable matchPattern. It returns the -// regexp generated when validating. -func Validate(pattern string) (matcher *regexp.Regexp, err error) { - if err := prevalidate(pattern); err != nil { - return nil, err - } - return re.CompileRegex(ToAnchoredRegexp(pattern)) -} - -// ValidateWithoutCache is the same as Validate() but doesn't consult the regex -// LRU. -func ValidateWithoutCache(pattern string) (matcher *regexp.Regexp, err error) { - if err := prevalidate(pattern); err != nil { - return nil, err - } - return regexp.Compile(ToAnchoredRegexp(pattern)) -} - -func prevalidate(pattern string) error { - pattern = strings.TrimSpace(pattern) - pattern = strings.ToLower(pattern) - - // error check - if strings.ContainsAny(pattern, "[]+{},") { - return errors.New(`Only alphanumeric ASCII characters, the hyphen "-", underscore "_", "." and "*" are allowed in a matchPattern`) - } - - return nil -} - -// Sanitize canonicalized the pattern for use by ToAnchoredRegexp -func Sanitize(pattern string) string { - if pattern == "*" { - return pattern - } - - return dns.FQDN(pattern) -} - -// ToAnchoredRegexp converts a MatchPattern field into a regexp string. It does not -// validate the pattern. It also adds anchors to ensure it match the whole string. -// It supports: -// * to select 0 or more DNS valid characters -func ToAnchoredRegexp(pattern string) string { - pattern = strings.TrimSpace(pattern) - pattern = strings.ToLower(pattern) - - // handle the * match-all case. This will filter down to the end. - if pattern == "*" { - return "(^(" + allowedDNSCharsREGroup + "+[.])+$)|(^[.]$)" - } - - pattern = escapeRegexpCharacters(pattern) - - // Anchor the match to require the whole string to match this expression - return "^" + pattern + "$" -} - -// ToUnAnchoredRegexp converts a MatchPattern field into a regexp string. It does not -// validate the pattern. It does not add regexp anchors. -// It supports: -// * to select 0 or more DNS valid characters -func ToUnAnchoredRegexp(pattern string) string { - pattern = strings.TrimSpace(pattern) - pattern = strings.ToLower(pattern) - // handle the * match-all case. This will filter down to the end. - if pattern == "*" { - return MatchAllUnAnchoredPattern - } - pattern = escapeRegexpCharacters(pattern) - return pattern -} - -func escapeRegexpCharacters(pattern string) string { - // base case. "." becomes a literal . - pattern = strings.Replace(pattern, ".", "[.]", -1) - - // base case. * becomes .*, but only for DNS valid characters - // NOTE: this only works because the case above does not leave the * - pattern = strings.Replace(pattern, "*", allowedDNSCharsREGroup+"*", -1) - return pattern -} diff --git a/vendor/github.com/cilium/cilium/pkg/fqdn/re/re.go b/vendor/github.com/cilium/cilium/pkg/fqdn/re/re.go deleted file mode 100644 index 73dd06339a7..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/fqdn/re/re.go +++ /dev/null @@ -1,81 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package re provides a simple function to access compile regex objects for -// the FQDN subsystem. -package re - -import ( - "errors" - "fmt" - "regexp" - "sync/atomic" - - lru "github.com/golang/groupcache/lru" - - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/option" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "fqdn/re") -) - -// CompileRegex compiles a pattern p into a regex and returns the regex object. -// The regex object will be cached by an LRU. If p has already been compiled -// and cached, this function will return the cached regex object. If not -// already cached, it will compile p into a regex object and cache it in the -// LRU. This function will return an error if the LRU has not already been -// initialized. -func CompileRegex(p string) (*regexp.Regexp, error) { - lru := regexCompileLRU.Load() - if lru == nil { - return nil, errors.New("FQDN regex compilation LRU not yet initialized") - } - lru.Lock() - r, ok := lru.Get(p) - lru.Unlock() - if ok { - return r.(*regexp.Regexp), nil - } - n, err := regexp.Compile(p) - if err != nil { - return nil, fmt.Errorf("failed to compile regex: %w", err) - } - lru.Lock() - lru.Add(p, n) - lru.Unlock() - return n, nil -} - -// InitRegexCompileLRU creates a new instance of the regex compilation LRU. -func InitRegexCompileLRU(size int) error { - if size < 0 { - return fmt.Errorf("failed to initialize FQDN regex compilation LRU due to invalid size %d", size) - } else if size == 0 { - log.Warnf( - "FQDN regex compilation LRU size is unlimited, which can grow unbounded potentially consuming too much memory. Consider passing a maximum size via --%s.", - option.FQDNRegexCompileLRUSize) - } - regexCompileLRU.Store(&RegexCompileLRU{ - Mutex: &lock.Mutex{}, - Cache: lru.New(size), - }) - return nil -} - -// regexCompileLRU is the singleton instance of the LRU that's shared -// throughout Cilium. -var regexCompileLRU atomic.Pointer[RegexCompileLRU] - -// RegexCompileLRU is an LRU cache for storing compiled regex objects of FQDN -// names or patterns, used in CiliumNetworkPolicy or -// ClusterwideCiliumNetworkPolicy. -type RegexCompileLRU struct { - // The lru package doesn't provide any concurrency guarantees so we must - // provide our own locking. - *lock.Mutex - *lru.Cache -} diff --git a/vendor/github.com/cilium/cilium/pkg/fqdn/restore/restore.go b/vendor/github.com/cilium/cilium/pkg/fqdn/restore/restore.go deleted file mode 100644 index 3a0ab9f5353..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/fqdn/restore/restore.go +++ /dev/null @@ -1,128 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// The restore package provides data structures important to restoring -// DNS proxy rules. This package serves as a central source for these -// structures. -// Note that these are marshaled as JSON and any changes need to be compatible -// across an upgrade! -package restore - -import ( - "fmt" - "sort" - "testing" -) - -// PortProtoV2 is 1 value at bit position 24. -const PortProtoV2 = 1 << 24 - -// PortProto is uint32 that encodes two different -// versions of port protocol keys. Version 1 is protocol -// agnostic and (naturally) encodes no values at bit -// positions 16-31. Version 2 encodes protocol at bit -// positions 16-23, and bit position 24 encodes a 1 -// value to indicate that it is Version 2. Both versions -// encode the port at the -// bit positions 0-15. -// -// This works because Version 1 will naturally encode -// no values at postions 16-31 as the original Version 1 -// was a uint16. Version 2 enforces a 1 value at the 24th -// bit position, so it will alway be legible. -type PortProto uint32 - -// MakeV2PortProto returns a Version 2 port protocol. -func MakeV2PortProto(port uint16, proto uint8) PortProto { - return PortProto(PortProtoV2 | (uint32(proto) << 16) | uint32(port)) -} - -// IsPortV2 returns true if the PortProto -// is Version 2. -func (pp PortProto) IsPortV2() bool { - return PortProtoV2&pp == PortProtoV2 -} - -// Port returns the port of the PortProto -func (pp PortProto) Port() uint16 { - return uint16(pp & 0x0000_ffff) -} - -// Protocol returns the protocol of the -// PortProto. It returns "0" for Version 1. -func (pp PortProto) Protocol() uint8 { - return uint8((pp & 0xff_0000) >> 16) -} - -// ToV1 returns the Version 1 (that is, "port") -// version of the PortProto. -func (pp PortProto) ToV1() PortProto { - return pp & 0x0000_ffff -} - -// String returns the decimal representation -// of PortProtocol in string form. -func (pp PortProto) String() string { - return fmt.Sprintf("%d", pp) -} - -// DNSRules contains IP-based DNS rules for a set of port-protocols (e.g., UDP/53) -type DNSRules map[PortProto]IPRules - -// IPRules is an unsorted collection of IPrules -type IPRules []IPRule - -// IPRule stores the allowed destination IPs for a DNS names matching a regex -type IPRule struct { - Re RuleRegex - IPs map[string]struct{} // IPs, nil set is wildcard and allows all IPs! -} - -// RuleRegex is a wrapper for a pointer to a string so that we can define marshalers for it. -type RuleRegex struct { - Pattern *string -} - -// Sort is only used for testing -// Sorts in place, but returns IPRules for convenience -func (r IPRules) Sort(_ *testing.T) IPRules { - sort.SliceStable(r, func(i, j int) bool { - if r[i].Re.Pattern != nil && r[j].Re.Pattern != nil { - return *r[i].Re.Pattern < *r[j].Re.Pattern - } - if r[i].Re.Pattern != nil { - return true - } - return false - }) - - return r -} - -// Sort is only used for testing -// Sorts in place, but returns DNSRules for convenience -func (r DNSRules) Sort(_ *testing.T) DNSRules { - for pp, ipRules := range r { - if len(ipRules) > 0 { - ipRules = ipRules.Sort(nil) - r[pp] = ipRules - } - } - return r -} - -// UnmarshalText unmarshals json into a RuleRegex -// This must have a pointer receiver, otherwise the RuleRegex remains empty. -func (r *RuleRegex) UnmarshalText(b []byte) error { - pattern := string(b) - r.Pattern = &pattern - return nil -} - -// MarshalText marshals RuleRegex as string -func (r RuleRegex) MarshalText() ([]byte, error) { - if r.Pattern != nil { - return []byte(*r.Pattern), nil - } - return nil, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/health/client/client.go b/vendor/github.com/cilium/cilium/pkg/health/client/client.go deleted file mode 100644 index dd943633b26..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/health/client/client.go +++ /dev/null @@ -1,424 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "fmt" - "io" - "net" - "net/http" - "net/url" - "os" - "sort" - "strings" - "time" - - runtime_client "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - clientapi "github.com/cilium/cilium/api/v1/health/client" - "github.com/cilium/cilium/api/v1/health/models" - "github.com/cilium/cilium/pkg/health/defaults" -) - -type ConnectivityStatusType int - -const ( - ipUnavailable = "Unavailable" - - ConnStatusReachable ConnectivityStatusType = 0 - ConnStatusUnreachable ConnectivityStatusType = 1 - ConnStatusUnknown ConnectivityStatusType = 2 -) - -func (c ConnectivityStatusType) String() string { - switch c { - case ConnStatusReachable: - return "reachable" - case ConnStatusUnreachable: - return "unreachable" - default: - return "unknown" - } -} - -// Client is a client for cilium health -type Client struct { - clientapi.CiliumHealthAPI -} - -func configureTransport(tr *http.Transport, proto, addr string) *http.Transport { - if tr == nil { - tr = &http.Transport{} - } - - if proto == "unix" { - // No need for compression in local communications. - tr.DisableCompression = true - tr.Dial = func(_, _ string) (net.Conn, error) { - return net.Dial(proto, addr) - } - } else { - tr.Proxy = http.ProxyFromEnvironment - tr.Dial = (&net.Dialer{}).Dial - } - - return tr -} - -// NewDefaultClient creates a client with default parameters connecting to UNIX domain socket. -func NewDefaultClient() (*Client, error) { - return NewClient("") -} - -// NewClient creates a client for the given `host`. -func NewClient(host string) (*Client, error) { - if host == "" { - // Check if environment variable points to socket - e := os.Getenv(defaults.SockPathEnv) - if e == "" { - // If unset, fall back to default value - e = defaults.SockPath - } - host = "unix://" + e - } - tmp := strings.SplitN(host, "://", 2) - if len(tmp) != 2 { - return nil, fmt.Errorf("invalid host format '%s'", host) - } - - hostHeader := tmp[1] - - switch tmp[0] { - case "tcp": - if _, err := url.Parse("tcp://" + tmp[1]); err != nil { - return nil, err - } - host = "http://" + tmp[1] - case "unix": - host = tmp[1] - // For local communication (unix domain sockets), the hostname is not used. Leave - // Host header empty because otherwise it would be rejected by net/http client-side - // sanitization, see https://go.dev/issue/60374. - hostHeader = "localhost" - } - - transport := configureTransport(nil, tmp[0], host) - httpClient := &http.Client{Transport: transport} - clientTrans := runtime_client.NewWithClient(hostHeader, clientapi.DefaultBasePath, - clientapi.DefaultSchemes, httpClient) - return &Client{*clientapi.New(clientTrans, strfmt.Default)}, nil -} - -// Hint tries to improve the error message displayed to the user. -func Hint(err error) error { - if err == nil { - return err - } - e, _ := url.PathUnescape(err.Error()) - if strings.Contains(err.Error(), defaults.SockPath) { - return fmt.Errorf("%s\nIs the agent running?", e) - } - return fmt.Errorf("%s", e) -} - -func GetConnectivityStatusType(cs *models.ConnectivityStatus) ConnectivityStatusType { - // If the connecticity status is nil, it means that there was no - // successful probe, but also no failed probe with a concrete reason. In - // that case, the status is unknown and it usually means that the new - // is still in the beginning of the bootstraping process. - if cs == nil { - return ConnStatusUnknown - } - // Empty status means successful probe. - if cs.Status == "" { - return ConnStatusReachable - } - // Non-empty status means that there was an explicit reason of failure. - return ConnStatusUnreachable -} - -func GetPathConnectivityStatusType(cp *models.PathStatus) ConnectivityStatusType { - if cp == nil { - return ConnStatusUnreachable - } - statuses := []*models.ConnectivityStatus{ - cp.Icmp, - cp.HTTP, - } - // Initially assume healthy status. - status := ConnStatusReachable - for _, cs := range statuses { - switch GetConnectivityStatusType(cs) { - case ConnStatusUnreachable: - // If any status is unreachable, return it immediately. - return ConnStatusUnreachable - case ConnStatusUnknown: - // If the status is unknown, prepare to return it. It's - // going to be returned if there is no unreachable - // status in next iterations. - status = ConnStatusUnknown - } - } - return status -} - -func SummarizePathConnectivityStatusType(cps []*models.PathStatus) ConnectivityStatusType { - status := ConnStatusReachable - for _, cp := range cps { - switch GetPathConnectivityStatusType(cp) { - case ConnStatusUnreachable: - // If any status is unreachable, return it immediately. - return ConnStatusUnreachable - case ConnStatusUnknown: - // If the status is unknown, prepare to return it. It's - // going to be returned if there is no unreachable - // status in next iterations. - status = ConnStatusUnknown - } - } - return status -} - -func formatConnectivityStatus(w io.Writer, cs *models.ConnectivityStatus, path, indent string) { - status := cs.Status - switch GetConnectivityStatusType(cs) { - case ConnStatusReachable: - latency := time.Duration(cs.Latency) - status = fmt.Sprintf("OK, RTT=%s", latency) - } - fmt.Fprintf(w, "%s%s:\t%s\n", indent, path, status) -} - -func formatPathStatus(w io.Writer, name string, cp *models.PathStatus, indent string, verbose bool) { - if cp == nil { - if verbose { - fmt.Fprintf(w, "%s%s connectivity:\tnil\n", indent, name) - } - return - } - fmt.Fprintf(w, "%s%s connectivity to %s:\n", indent, name, cp.IP) - indent = fmt.Sprintf("%s ", indent) - - if cp.Icmp != nil { - formatConnectivityStatus(w, cp.Icmp, "ICMP to stack", indent) - } - if cp.HTTP != nil { - formatConnectivityStatus(w, cp.HTTP, "HTTP to agent", indent) - } -} - -// allPathsAreHealthyOrUnknown checks whether ICMP and TCP(HTTP) connectivity -// to the given paths is available or had no explicit error status -// (which usually is the case when the new node is provisioned). -func allPathsAreHealthyOrUnknown(cps []*models.PathStatus) bool { - for _, cp := range cps { - if cp == nil { - return false - } - - statuses := []*models.ConnectivityStatus{ - cp.Icmp, - cp.HTTP, - } - for _, status := range statuses { - switch GetConnectivityStatusType(status) { - case ConnStatusUnreachable: - return false - } - } - } - return true -} - -func nodeIsHealthy(node *models.NodeStatus) bool { - return allPathsAreHealthyOrUnknown(GetAllHostAddresses(node)) && - allPathsAreHealthyOrUnknown(GetAllEndpointAddresses(node)) -} - -func nodeIsLocalhost(node *models.NodeStatus, self *models.SelfStatus) bool { - return self != nil && node.Name == self.Name -} - -func getPrimaryAddressIP(node *models.NodeStatus) string { - if node.Host == nil || node.Host.PrimaryAddress == nil { - return ipUnavailable - } - - return node.Host.PrimaryAddress.IP -} - -// GetHostPrimaryAddress returns the PrimaryAddress for the Host within node. -// If node.Host is nil, returns nil. -func GetHostPrimaryAddress(node *models.NodeStatus) *models.PathStatus { - if node.Host == nil { - return nil - } - - return node.Host.PrimaryAddress -} - -// GetHostSecondaryAddresses returns the secondary host addresses (if any) -func GetHostSecondaryAddresses(node *models.NodeStatus) []*models.PathStatus { - if node.Host == nil { - return nil - } - - return node.Host.SecondaryAddresses -} - -// GetAllHostAddresses returns a list of all addresses (primary and any -// and any secondary) for the host of a given node. If node.Host is nil, -// returns nil. -func GetAllHostAddresses(node *models.NodeStatus) []*models.PathStatus { - if node.Host == nil { - return nil - } - - return append([]*models.PathStatus{node.Host.PrimaryAddress}, node.Host.SecondaryAddresses...) -} - -// GetEndpointPrimaryAddress returns the PrimaryAddress for the health endpoint -// within node. If node.HealthEndpoint is nil, returns nil. -func GetEndpointPrimaryAddress(node *models.NodeStatus) *models.PathStatus { - if node.HealthEndpoint == nil { - return nil - } - - return node.HealthEndpoint.PrimaryAddress -} - -// GetEndpointSecondaryAddresses returns the secondary health endpoint addresses -// (if any) -func GetEndpointSecondaryAddresses(node *models.NodeStatus) []*models.PathStatus { - if node.HealthEndpoint == nil { - return nil - } - - return node.HealthEndpoint.SecondaryAddresses -} - -// GetAllEndpointAddresses returns a list of all addresses (primary and any -// secondary) for the health endpoint within a given node. -// If node.HealthEndpoint is nil, returns nil. -func GetAllEndpointAddresses(node *models.NodeStatus) []*models.PathStatus { - if node.HealthEndpoint == nil { - return nil - } - - return append([]*models.PathStatus{node.HealthEndpoint.PrimaryAddress}, node.HealthEndpoint.SecondaryAddresses...) -} - -func formatNodeStatus(w io.Writer, node *models.NodeStatus, printAll, succinct, verbose, localhost bool) { - localStr := "" - if localhost { - localStr = " (localhost)" - } - if succinct { - if printAll || !nodeIsHealthy(node) { - ips := []string{getPrimaryAddressIP(node)} - for _, addr := range GetHostSecondaryAddresses(node) { - if addr == nil { - continue - } - ips = append(ips, addr.IP) - } - fmt.Fprintf(w, " %s%s\t%s\t%s\t%s\n", node.Name, - localStr, strings.Join(ips, ","), - SummarizePathConnectivityStatusType(GetAllHostAddresses(node)).String(), - SummarizePathConnectivityStatusType(GetAllEndpointAddresses(node)).String()) - } - } else { - fmt.Fprintf(w, " %s%s:\n", node.Name, localStr) - formatPathStatus(w, "Host", GetHostPrimaryAddress(node), " ", verbose) - unhealthyPaths := !allPathsAreHealthyOrUnknown(GetHostSecondaryAddresses(node)) - if (verbose || unhealthyPaths) && node.Host != nil { - for _, addr := range node.Host.SecondaryAddresses { - formatPathStatus(w, "Secondary", addr, " ", verbose) - } - } - formatPathStatus(w, "Endpoint", GetEndpointPrimaryAddress(node), " ", verbose) - unhealthyPaths = !allPathsAreHealthyOrUnknown(GetEndpointSecondaryAddresses(node)) - if (verbose || unhealthyPaths) && node.HealthEndpoint != nil { - for _, addr := range node.HealthEndpoint.SecondaryAddresses { - formatPathStatus(w, "Secondary", addr, " ", verbose) - } - } - } -} - -// FormatHealthStatusResponse writes a HealthStatusResponse as a string to the -// writer. -// -// 'printAll', if true, causes all nodes to be printed regardless of status -// 'succinct', if true, causes node health to be output as one line per node -// 'verbose', if true, overrides 'succinct' and prints all information -// 'maxLines', if nonzero, determines the maximum number of lines to print -func FormatHealthStatusResponse(w io.Writer, sr *models.HealthStatusResponse, printAll, succinct, verbose bool, maxLines int) { - var ( - healthy int - localhost *models.NodeStatus - ) - for _, node := range sr.Nodes { - if nodeIsHealthy(node) { - healthy++ - } - if nodeIsLocalhost(node, sr.Local) { - localhost = node - } - } - if succinct { - fmt.Fprintf(w, "Cluster health:\t%d/%d reachable\t(%s)\n", - healthy, len(sr.Nodes), sr.Timestamp) - if printAll || healthy < len(sr.Nodes) { - fmt.Fprintf(w, " Name\tIP\tNode\tEndpoints\n") - } - } else { - fmt.Fprintf(w, "Probe time:\t%s\n", sr.Timestamp) - fmt.Fprintf(w, "Nodes:\n") - } - - if localhost != nil { - formatNodeStatus(w, localhost, printAll, succinct, verbose, true) - maxLines-- - } - - nodes := sr.Nodes - sort.Slice(nodes, func(i, j int) bool { - return strings.Compare(nodes[i].Name, nodes[j].Name) < 0 - }) - for n, node := range nodes { - if maxLines > 0 && n > maxLines { - break - } - if node == localhost { - continue - } - formatNodeStatus(w, node, printAll, succinct, verbose, false) - } - if maxLines > 0 && len(sr.Nodes)-healthy > maxLines { - fmt.Fprintf(w, " ...") - } -} - -// GetAndFormatHealthStatus fetches the health status from the cilium-health -// daemon via the default channel and formats its output as a string to the -// writer. -// -// 'succinct', 'verbose' and 'maxLines' are handled the same as in -// FormatHealthStatusResponse(). -func GetAndFormatHealthStatus(w io.Writer, succinct, verbose bool, maxLines int) { - client, err := NewClient("") - if err != nil { - fmt.Fprintf(w, "Cluster health:\t\t\tClient error: %s\n", err) - return - } - hr, err := client.Connectivity.GetStatus(nil) - if err != nil { - // The regular `cilium status` output will print the reason why. - fmt.Fprintf(w, "Cluster health:\t\t\tWarning\tcilium-health daemon unreachable\n") - return - } - FormatHealthStatusResponse(w, hr.Payload, verbose, succinct, verbose, maxLines) -} diff --git a/vendor/github.com/cilium/cilium/pkg/health/client/modules.go b/vendor/github.com/cilium/cilium/pkg/health/client/modules.go deleted file mode 100644 index 470da8ed15b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/health/client/modules.go +++ /dev/null @@ -1,121 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "encoding/json" - "fmt" - "io" - "sort" - "strings" - "time" - - "k8s.io/apimachinery/pkg/util/duration" - - "github.com/cilium/cilium/api/v1/client/daemon" - "github.com/cilium/cilium/pkg/hive/cell" -) - -const ( - noPod = "(/)" - rootNode = "agent" - noErr = "" -) - -// ModulesHealth represent hive modules health API. -type ModulesHealth interface { - // GetHealth retrieves agent modules health. - GetHealth(params *daemon.GetHealthParams, opts ...daemon.ClientOption) (*daemon.GetHealthOK, error) -} - -// GetAndFormatModulesHealth retrieves modules health and formats output. -func GetAndFormatModulesHealth(w io.Writer, clt ModulesHealth, verbose bool) { - fmt.Fprintf(w, "Modules Health:") - resp, err := clt.GetHealth(daemon.NewGetHealthParams()) - if err != nil { - fmt.Fprintf(w, "\t%s\n", err) - return - } - - if resp.Payload == nil { - fmt.Fprintf(w, "\tno health payload detected\n") - return - } - if verbose { - r := newRoot(rootNode) - sort.Slice(resp.Payload.Modules, func(i, j int) bool { - return resp.Payload.Modules[i].ModuleID < resp.Payload.Modules[j].ModuleID - }) - for _, m := range resp.Payload.Modules { - if m.Level == string(cell.StatusUnknown) { - continue - } - if err := buildTree(r, m.Message); err != nil { - fmt.Fprintf(w, "Modules Health rendering failed: %s\n", err) - } - } - fmt.Fprintln(w, "\n"+r.String()) - return - } - tally := make(map[cell.Level]int, 4) - for _, m := range resp.Payload.Modules { - tally[cell.Level(m.Level)] += 1 - } - fmt.Fprintf(w, "\t%s(%d) %s(%d) %s(%d)\n", - cell.StatusStopped, - tally[cell.StatusStopped], - cell.StatusDegraded, - tally[cell.StatusDegraded], - cell.StatusOK, - tally[cell.StatusOK], - ) -} - -func buildTree(n *node, raw string) error { - var sn cell.StatusNode - if err := json.Unmarshal([]byte(raw), &sn); err != nil { - return err - } - build(n, &sn) - return nil -} - -func ensurePath(n *node, pp []string) *node { - current := n - for _, p := range pp { - if v := current.find(p); v != nil { - current = v - continue - } - current = current.addBranch(strings.Replace(p, noPod, "", 1)) - } - - return current -} - -func build(n *node, sn *cell.StatusNode) { - meta := fmt.Sprintf("[%s] %s", strings.ToUpper(string(sn.LastLevel)), sn.Message) - if sn.Error != "" { - meta += " -- " + sn.Error - } - meta += fmt.Sprintf(" (%s, x%d)", ToAgeHuman(sn.UpdateTimestamp), sn.Count) - pp := strings.Split(sn.Name, ".") - current := ensurePath(n, pp) - if len(sn.SubStatuses) == 0 { - current.meta = meta - return - } - for _, s := range sn.SubStatuses { - build(current, s) - } -} - -// ToAgeHuman converts time to duration. -func ToAgeHuman(t time.Time) string { - if t.IsZero() { - return "n/a" - } - - return duration.HumanDuration(time.Since(t)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/health/client/tree.go b/vendor/github.com/cilium/cilium/pkg/health/client/tree.go deleted file mode 100644 index b8dccd5a512..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/health/client/tree.go +++ /dev/null @@ -1,211 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "bytes" - "fmt" - "io" - "strconv" - "strings" -) - -const ( - indentSize = 3 - leafMaxWidth = 40 - link decoration = "│" - mid decoration = "├──" - end decoration = "└──" -) - -type decoration string - -func newRoot(r string) *node { - return &node{val: r} -} - -type node struct { - val, meta string - parent *node - nodes []*node -} - -func (n *node) addNode(v string) *node { - return n.addNodeWithMeta(v, "") -} - -func (n *node) addNodeWithMeta(v, m string) *node { - node := node{ - parent: n, - val: v, - meta: m, - } - n.nodes = append(n.nodes, &node) - - return &node -} - -func (n *node) addBranch(v string) *node { - return n.addBranchWithMeta(v, "") -} - -func (n *node) addBranchWithMeta(v, m string) *node { - b := node{ - parent: n, - meta: m, - val: v, - } - n.nodes = append(n.nodes, &b) - - return &b -} - -func (n *node) find(val string) *node { - if n.val == val { - return n - } - for _, node := range n.nodes { - if node.val == val { - return node - } - if v := node.find(val); v != nil { - return v - } - } - - return nil -} - -func (n *node) asBytes() []byte { - var ( - w = new(bytes.Buffer) - levelsEnded []int - max = computeMaxLevel(0, n) - ) - if n.parent == nil { - w.WriteString(n.val) - if n.meta != "" { - w.WriteString(" " + n.meta) - } - fmt.Fprintln(w) - } else { - edge := mid - if len(n.nodes) == 0 { - edge = end - levelsEnded = append(levelsEnded, 0) - } - dumpVals(w, 0, max, levelsEnded, edge, n) - } - if len(n.nodes) > 0 { - dumpNodes(w, 0, max, levelsEnded, n.nodes) - } - - return w.Bytes() -} - -func (n *node) String() string { - return string(n.asBytes()) -} - -func (n *node) lastNode() *node { - c := len(n.nodes) - if c == 0 { - return nil - } - - return n.nodes[c-1] -} - -func computeMaxLevel(level int, n *node) int { - if n == nil || len(n.nodes) == 0 { - return level - } - var max int - for _, n := range n.nodes { - m := computeMaxLevel(level+1, n) - if m > max { - max = m - } - } - - return max -} - -func dumpNodes(w io.Writer, level, maxLevel int, levelsEnded []int, nodes []*node) { - for i, node := range nodes { - edge := mid - if i == len(nodes)-1 { - levelsEnded = append(levelsEnded, level) - edge = end - } - dumpVals(w, level, maxLevel, levelsEnded, edge, node) - if len(node.nodes) > 0 { - dumpNodes(w, level+1, maxLevel, levelsEnded, node.nodes) - } - } -} - -func dumpVals(w io.Writer, level, maxLevel int, levelsEnded []int, edge decoration, node *node) { - for i := 0; i < level; i++ { - if isEnded(levelsEnded, i) { - fmt.Fprint(w, strings.Repeat(" ", indentSize+1)) - continue - } - fmt.Fprintf(w, "%s%s", link, strings.Repeat(" ", indentSize)) - } - - val := dumpVal(level, node) - if node.meta != "" { - c := maxLevel - level - if c < 0 { - c = 0 - } - fmt.Fprintf(w, "%s %-"+strconv.Itoa(leafMaxWidth+c*2)+"s%s%s\n", edge, val, strings.Repeat(" ", c), node.meta) - return - } - fmt.Fprintf(w, "%s %s\n", edge, val) -} - -func isEnded(levelsEnded []int, level int) bool { - for _, l := range levelsEnded { - if l == level { - return true - } - } - - return false -} - -func dumpVal(level int, node *node) string { - lines := strings.Split(node.val, "\n") - if len(lines) < 2 { - return node.val - } - - pad := indent(level, node) - for i := 1; i < len(lines); i++ { - lines[i] = fmt.Sprintf("%s%s", pad, lines[i]) - } - - return strings.Join(lines, "\n") -} - -func indent(level int, node *node) string { - links := make([]string, level+1) - for node.parent != nil { - if isLast(node) { - links[level] = strings.Repeat(" ", indentSize+1) - } else { - links[level] = fmt.Sprintf("%s%s", link, strings.Repeat(" ", indentSize)) - } - level-- - node = node.parent - } - - return strings.Join(links, "") -} - -func isLast(n *node) bool { - return n == n.parent.lastNode() -} diff --git a/vendor/github.com/cilium/cilium/pkg/health/defaults/defaults.go b/vendor/github.com/cilium/cilium/pkg/health/defaults/defaults.go deleted file mode 100644 index d84cecd2c58..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/health/defaults/defaults.go +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package defaults - -import ( - daemon "github.com/cilium/cilium/pkg/defaults" -) - -const ( - // SockPath is the path to the UNIX domain socket exposing the API to clients locally - SockPath = daemon.RuntimePath + "/health.sock" - - // SockPathEnv is the environment variable to overwrite SockPath - SockPathEnv = "CILIUM_HEALTH_SOCK" - - // HTTPPathPort is used for probing base HTTP path connectivity - HTTPPathPort = daemon.ClusterHealthPort - - // HealthEPName is the name used for the health endpoint, which is also - // used by the CLI client to detect when connectivity health is enabled - HealthEPName = "cilium-health-ep" -) diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/cell.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/cell.go deleted file mode 100644 index 0529919e71a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/cell.go +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -import ( - "go.uber.org/dig" - - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "hive") -) - -// Cell is the modular building block of the hive. -// -// A cell can be constructed with: -// -// - Module(): Create a named set of cells. -// - Provide(): Provide object constructors. -// - Invoke(): Invoke a function to instantiate objects. -// - Decorate(): Decorate a set of cells to augment an object. -// - Config(): Cell providing a configuration struct. -type Cell interface { - // Info provides a structural summary of the cell for printing purposes. - Info(container) Info - - // Apply the cell to the dependency graph container. - Apply(container) error -} - -// In when embedded into a struct used as constructor parameter makes the exported -// values of that struct become dependency injected values. In other words, it allows -// moving a long list of constructor parameters into a struct. -// -// Struct fields can be annotated with `optional:"true"` to make the dependency optional. -// If the type is not found in the dependency graph, the value is set to the zero value. -// -// See https://pkg.go.dev/go.uber.org/dig#In for more information. -type In = dig.In - -// Out when embedded into a struct that is returned by a constructor will make the -// values in the struct become objects in the dependency graph instead of the struct -// itself. -// -// See https://pkg.go.dev/go.uber.org/dig#Out for more information. -type Out = dig.Out - -// container is the common interface between dig.Container and dig.Scope. -// Used in Apply(). -type container interface { - Provide(ctor any, opts ...dig.ProvideOption) error - Invoke(fn any, opts ...dig.InvokeOption) error - Decorate(fn any, opts ...dig.DecorateOption) error - Scope(name string, opts ...dig.ScopeOption) *dig.Scope -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/config.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/config.go deleted file mode 100644 index f10e39439e5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/config.go +++ /dev/null @@ -1,203 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -import ( - "fmt" - "reflect" - "strings" - - "github.com/mitchellh/mapstructure" - "github.com/spf13/pflag" - "go.uber.org/dig" - - "github.com/cilium/cilium/pkg/cidr" - "github.com/cilium/cilium/pkg/command" -) - -// Config constructs a new config cell. -// -// The configuration struct `T` needs to implement the Flags method that -// registers the flags. The structure is populated and provided via dependency -// injection by Hive.Run(). The underlying mechanism for populating the struct -// is viper's Unmarshal(). -func Config[Cfg Flagger](def Cfg) Cell { - c := &config[Cfg]{defaultConfig: def, flags: pflag.NewFlagSet("", pflag.ContinueOnError)} - def.Flags(c.flags) - return c -} - -// Flagger is implemented by configuration structs to provide configuration -// for a cell. -type Flagger interface { - // Flags registers the configuration options as command-line flags. - // - // By convention a flag name matches the field name - // if they're the same under case-insensitive comparison when dashes are - // removed. E.g. "my-config-flag" matches field "MyConfigFlag". The - // correspondence to the flag can be also specified with the mapstructure - // tag: MyConfigFlag `mapstructure:"my-config-flag"`. - // - // Exported fields that are not found from the viper settings will cause - // hive.Run() to fail. Unexported fields are ignored. - // - // See https://pkg.go.dev/github.com/mitchellh/mapstructure for more info. - Flags(*pflag.FlagSet) -} - -// config is a cell for configuration. It registers the config's command-line -// flags and provides the parsed config to the hive. -type config[Cfg Flagger] struct { - defaultConfig Cfg - flags *pflag.FlagSet -} - -type AllSettings map[string]any - -type configParams[Cfg Flagger] struct { - dig.In - AllSettings AllSettings - Override func(*Cfg) `optional:"true"` -} - -func (c *config[Cfg]) provideConfig(p configParams[Cfg]) (Cfg, error) { - settings := p.AllSettings - target := c.defaultConfig - decoder, err := mapstructure.NewDecoder(decoderConfig(&target)) - if err != nil { - return target, fmt.Errorf("failed to create config decoder: %w", err) - } - - // As input, only consider the declared flags. - input := make(map[string]any) - - c.flags.VisitAll(func(f *pflag.Flag) { - if v, ok := settings[f.Name]; ok { - input[f.Name] = v - } else { - err = fmt.Errorf("internal error: %s not found from settings", f.Name) - } - }) - if err != nil { - return target, err - } - if err := decoder.Decode(input); err != nil { - return target, fmt.Errorf("failed to unmarshal config struct %T: %w.\n"+ - "Hint: field 'FooBar' matches flag 'foo-bar', or use tag `mapstructure:\"flag-name\"` to match field with flag", - target, err) - } - - // See if the configuration was overridden with ConfigOverride. We check the override - // after the decode to validate that the config struct is properly formed and all - // flags are registered. - if p.Override != nil { - p.Override(&target) - } - - return target, nil -} - -func decoderConfig(target any) *mapstructure.DecoderConfig { - return &mapstructure.DecoderConfig{ - Metadata: nil, - Result: target, - WeaklyTypedInput: true, - DecodeHook: mapstructure.ComposeDecodeHookFunc( - // To unify the splitting of fields of a []string field across the input coming - // from environment, configmap and pflag (command-line), we first split a string - // (env/configmap) by comma, and then for all input methods we split a single - // value []string by whitespace. Thus the following all result in the same slice: - // - // --string-slice=foo,bar,baz - // --string-slice="foo bar baz" - // CILIUM_STRING_SLICE="foo,bar,baz" - // CILIUM_STRING_SLICE="foo bar baz" - // /.../configmap/string_slice: "foo bar baz" - // /.../configmap/string_slice: "foo,bar,baz" - // - // If both commas and whitespaces are present the commas take precedence: - // "foo,bar baz" => []string{"foo", "bar baz"} - mapstructure.StringToSliceHookFunc(","), // string->[]string is split by comma - fixupStringSliceHookFunc, // []string of length 1 is split again by whitespace - - mapstructure.StringToTimeDurationHookFunc(), - stringToCIDRHookFunc, - stringToMapHookFunc, - ), - ZeroFields: true, - // Error out if the config struct has fields that are - // not found from input. - ErrorUnset: true, - // Error out also if settings from input are not used. - ErrorUnused: true, - // Match field FooBarBaz with "foo-bar-baz" by removing - // the dashes from the flag. - MatchName: func(mapKey, fieldName string) bool { - return strings.EqualFold( - strings.ReplaceAll(mapKey, "-", ""), - fieldName) - }, - } -} - -func (c *config[Cfg]) Apply(cont container) error { - // Register the flags to the global set of all flags. - err := cont.Invoke( - func(allFlags *pflag.FlagSet) { - allFlags.AddFlagSet(c.flags) - }) - if err != nil { - return err - } - // And provide the constructor for the config. - return cont.Provide(c.provideConfig, dig.Export(true)) -} - -func (c *config[Cfg]) Info(cont container) (info Info) { - cont.Invoke(func(cfg Cfg) { - info = &InfoStruct{cfg} - }) - return -} - -// stringToMapHookFunc is a DecodeHookFunc that converts string -// to map[string]string supporting both json and KV formats. -func stringToMapHookFunc(from reflect.Kind, to reflect.Kind, data interface{}) (interface{}, error) { - if from != reflect.String || to != reflect.Map { - return data, nil - } - return command.ToStringMapStringE(data.(string)) -} - -// stringToCIDRSliceHookFunc is a DecodeHookFunc that converts string to []*cidr.CIDR. -func stringToCIDRHookFunc(from reflect.Type, to reflect.Type, data interface{}) (interface{}, error) { - if from.Kind() != reflect.String { - return data, nil - } - s := data.(string) - if to != reflect.TypeOf((*cidr.CIDR)(nil)) { - return data, nil - } - return cidr.ParseCIDR(s) -} - -// fixupStringSliceHookFunc takes a []string and if it's a single element splits it again -// by whitespace. This unifies the flag parsing behavior with StringSlice -// values coming from environment or configmap where both spaces or commas can be used to split. -func fixupStringSliceHookFunc(from reflect.Type, to reflect.Type, data interface{}) (interface{}, error) { - if from.Kind() != reflect.Slice || to.Kind() != reflect.Slice { - return data, nil - } - if from.Elem().Kind() != reflect.String || to.Elem().Kind() != reflect.String { - return data, nil - } - - raw := data.([]string) - if len(raw) == 1 { - // Flag was already split by commas (the default behavior), so split it - // now by spaces. - return strings.Fields(raw[0]), nil - } - return raw, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/decorator.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/decorator.go deleted file mode 100644 index fcba55aa2a3..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/decorator.go +++ /dev/null @@ -1,62 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -import ( - "fmt" - - "github.com/cilium/cilium/pkg/hive/internal" -) - -// Decorate takes a decorator function and a set of cells and returns -// a decorator cell. -// -// A decorator function is a function that takes as arguments objects -// in the hive and returns one or more augmented objects. The cells wrapped -// with a decorator will be provided the returned augmented objects. -// -// Example: -// -// cell.Decorate( -// func(e Example) Example { -// return e.WithMoreMagic() -// }, -// cell.Invoke(func(e Example) { -// // e now has more magic -// }, -// ) -func Decorate(dtor any, cells ...Cell) Cell { - return &decorator{ - decorator: dtor, - cells: cells, - } -} - -type decorator struct { - decorator any - cells []Cell -} - -func (d *decorator) Apply(c container) error { - scope := c.Scope(fmt.Sprintf("(decorate %s)", internal.PrettyType(d.decorator))) - if err := scope.Decorate(d.decorator); err != nil { - return err - } - - for _, cell := range d.cells { - if err := cell.Apply(scope); err != nil { - return err - } - } - - return nil -} - -func (d *decorator) Info(c container) Info { - n := NewInfoNode(fmt.Sprintf("🔀 %s: %s", internal.FuncNameAndLocation(d.decorator), internal.PrettyType(d.decorator))) - for _, cell := range d.cells { - n.Add(cell.Info(c)) - } - return n -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/group.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/group.go deleted file mode 100644 index f2e60b12c60..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/group.go +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -type group []Cell - -// Group a set of cells. Unlike Module(), Group() does not create a new -// scope. -func Group(cells ...Cell) Cell { - return group(cells) -} - -func (g group) Apply(c container) error { - for _, cell := range g { - if err := cell.Apply(c); err != nil { - return err - } - } - return nil -} - -func (g group) Info(c container) Info { - n := NewInfoNode("") - for _, cell := range g { - n.Add(cell.Info(c)) - } - return n -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/health.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/health.go deleted file mode 100644 index aa4dc93f43e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/health.go +++ /dev/null @@ -1,309 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -import ( - "context" - "fmt" - "sort" - "sync/atomic" - "time" - - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/stream" - - "golang.org/x/exp/maps" -) - -// Level denotes what kind an update is. -type Level string - -const ( - // StatusUnknown is the default status of a Module, prior to it reporting - // any status. - // All created - StatusUnknown Level = "Unknown" - - // StatusStopped is the status of a Module that has completed, further updates - // will not be processed. - StatusStopped Level = "Stopped" - - // StatusDegraded is the status of a Module that has entered a degraded state. - StatusDegraded Level = "Degraded" - - // StatusOK is the status of a Module that has achieved a desired state. - StatusOK Level = "OK" -) - -// HealthReporter provides a method of declaring a Modules health status. -type HealthReporter interface { - // OK declares that a Module has achieved a desired state and has not entered - // any unexpected or incorrect states. - // Modules should only declare themselves as 'OK' once they have stabilized, - // rather than during their initial state. This should be left to be reported - // as the default "unknown" to denote that the module has not reached a "ready" - // health state. - OK(status string) - - // Stopped reports that a module has completed, and will no longer report any - // health status. - // Implementations should differentiate that a stopped module may also be OK or Degraded. - // Stopping a reporting should only affect future updates. - Stopped(reason string) - - // Degraded declares that a module has entered a degraded state. - // This means that it may have failed to provide it's intended services, or - // to perform it's desired task. - Degraded(reason string, err error) -} - -// Update represents an instantaneous health status update. -type Update interface { - // Level returns the level of the update. - Level() Level - - // String returns a string representation of the update. - String() string - - // JSON returns a JSON representation of the update, this is used by the agent - // health CLI to unmarshal health status into cell.StatusNode. - JSON() ([]byte, error) - - Timestamp() time.Time -} - -type statusNodeReporter interface { - setStatus(Update) -} - -// Health provides exported functions for accessing health status data. -// As well, provides unexported functions for use during module apply. -type Health interface { - // All returns a copy of all module statuses. - // This includes unknown status for modules that have not reported a status yet. - All() []Status - - // Get returns a copy of a modules status, by module ID. - // This includes unknown status for modules that have not reported a status yet. - Get(FullModuleID) (Status, error) - - // Stats returns a map of the number of module statuses reported by level. - Stats() map[Level]uint64 - - // Stop stops the health provider from processing updates. - Stop(context.Context) error - - // Subscribe to health status updates. - Subscribe(context.Context, func(Update), func(error)) - - // forModule creates a moduleID scoped reporter handle. - forModule(FullModuleID) statusNodeReporter - - // processed returns the number of updates processed. - processed() uint64 -} - -type StatusResult struct { - Update - FullModuleID FullModuleID - Stopped bool -} - -// Status is a modules last health state, including the last update. -type Status struct { - // Update is the last reported update for a module. - Update - - FullModuleID FullModuleID - - // Stopped is true when a module has been completed, thus it contains - // its last reporter status. New updates will not be processed. - Stopped bool - // Final is the stopped message, if the module has been stopped. - Final Update - // LastOK is the time of the last OK status update. - LastOK time.Time - // LastUpdated is the time of the last status update. - LastUpdated time.Time -} - -func (s *Status) JSON() ([]byte, error) { - if s.Update == nil { - return nil, nil - } - return s.Update.JSON() -} - -func (s *Status) Level() Level { - if s.Update == nil { - return StatusUnknown - } - return s.Update.Level() -} - -// String returns a string representation of a Status, implements fmt.Stringer. -func (s *Status) String() string { - var sinceLast string - if s.LastUpdated.IsZero() { - sinceLast = "never" - } else { - sinceLast = time.Since(s.LastUpdated).String() + " ago" - } - return fmt.Sprintf("Status{ModuleID: %s, Level: %s, Since: %s, Message: %s}", - s.FullModuleID, s.Level(), sinceLast, s.Update.String()) -} - -// NewHealthProvider starts and returns a health status which processes -// health status updates. -func NewHealthProvider() Health { - p := &healthProvider{ - moduleStatuses: make(map[string]Status), - byLevel: make(map[Level]uint64), - running: true, - } - p.obs, p.emit, p.complete = stream.Multicast[Update]() - - return p -} - -func (p *healthProvider) Subscribe(ctx context.Context, cb func(Update), complete func(error)) { - p.obs.Observe(ctx, cb, complete) -} - -func (p *healthProvider) processed() uint64 { - return p.numProcessed.Load() -} - -func (p *healthProvider) updateMetricsLocked(prev Update, curr Level) { - // If an update is processed that transitions the level state of a module - // then update the level counters. - if prev.Level() != curr { - p.byLevel[curr]++ - p.byLevel[prev.Level()]-- - } -} - -func (p *healthProvider) process(id FullModuleID, u Update) { - prev := func() Status { - p.mu.Lock() - defer p.mu.Unlock() - - t := time.Now() - prev := p.moduleStatuses[id.String()] - - // If the module has been stopped, then ignore updates. - if !p.running { - return prev - } - - ns := Status{ - Update: u, - LastUpdated: t, - } - - switch u.Level() { - case StatusOK: - ns.LastOK = t - case StatusStopped: - // If Stopped, set that module was stopped and preserve last known status. - ns = prev - ns.Stopped = true - ns.Final = u - } - p.moduleStatuses[id.String()] = ns - p.updateMetricsLocked(prev.Update, u.Level()) - log.WithField("status", ns.String()).Debug("Processed new health status") - return prev - }() - p.numProcessed.Add(1) - p.emit(u) - if prev.Stopped { - log.Warnf("module %q reported health status after being Stopped", id) - } -} - -// Finish stops the status provider, and waits for all updates to be processed or -// returns an error if the context is cancelled first. -func (p *healthProvider) Stop(ctx context.Context) error { - p.mu.Lock() - defer p.mu.Unlock() - p.running = false // following this, no new reporters will send. - p.complete(nil) // complete the observable, no new subscribers will receive further updates. - return nil -} - -var NoStatus = &StatusNode{Message: "No status reported", LastLevel: StatusUnknown} - -// forModule returns a module scoped status reporter handle for emitting status updates. -// This is used to automatically provide declared modules with a status reported. -func (p *healthProvider) forModule(moduleID FullModuleID) statusNodeReporter { - p.mu.Lock() - p.moduleStatuses[moduleID.String()] = Status{ - FullModuleID: moduleID, - Update: NoStatus, - } - p.byLevel[StatusUnknown]++ - p.mu.Unlock() - - return &reporter{ - moduleID: moduleID, - process: p.process, - } -} - -// All returns a copy of all the latest statuses. -func (p *healthProvider) All() []Status { - p.mu.RLock() - all := maps.Values(p.moduleStatuses) - p.mu.RUnlock() - sort.Slice(all, func(i, j int) bool { - return all[i].FullModuleID.String() < all[j].FullModuleID.String() - }) - return all -} - -// Get returns the latest status for a module, by module ID. -func (p *healthProvider) Get(moduleID FullModuleID) (Status, error) { - p.mu.RLock() - defer p.mu.RUnlock() - s, ok := p.moduleStatuses[moduleID.String()] - if ok { - return s, nil - } - return Status{}, fmt.Errorf("module %q not found", moduleID) -} - -func (p *healthProvider) Stats() map[Level]uint64 { - n := make(map[Level]uint64, len(p.byLevel)) - p.mu.Lock() - maps.Copy(n, p.byLevel) - p.mu.Unlock() - return n -} - -type healthProvider struct { - mu lock.RWMutex - - running bool - numProcessed atomic.Uint64 - - byLevel map[Level]uint64 - moduleStatuses map[string]Status - - obs stream.Observable[Update] - emit func(Update) - complete func(error) -} - -// reporter is a handle for emitting status updates. -type reporter struct { - moduleID FullModuleID - process func(FullModuleID, Update) -} - -// Degraded reports a degraded status update, should be used when a module encounters a -// a state that is not fully reconciled. -func (r *reporter) setStatus(u Update) { - r.process(r.moduleID, u) -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/info.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/info.go deleted file mode 100644 index 7c2075328ae..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/info.go +++ /dev/null @@ -1,124 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -import ( - "bufio" - "fmt" - "io" - "os" - "strings" - - "github.com/davecgh/go-spew/spew" - "golang.org/x/term" -) - -const ( - // indentBy is the number of spaces nested elements should be indented by - indentBy = 4 -) - -type InfoPrinter struct { - io.Writer - width int -} - -func NewInfoPrinter() *InfoPrinter { - width, _, err := term.GetSize(int(os.Stdout.Fd())) - if err != nil { - width = 120 - } - return &InfoPrinter{ - Writer: os.Stdout, - width: width, - } -} - -// Info provides a simple way of printing cells hierarchically in -// textual form. -type Info interface { - Print(indent int, w *InfoPrinter) -} - -type InfoLeaf string - -func (l InfoLeaf) Print(indent int, w *InfoPrinter) { - buf := bufio.NewWriter(w) - indentString := strings.Repeat(" ", indent) - buf.WriteString(indentString) - currentLineLength := len(indentString) - wrapped := false - for _, f := range strings.Fields(string(l)) { - newLineLength := currentLineLength + len(f) + 1 - if newLineLength >= w.width { - buf.WriteByte('\n') - if !wrapped { - // Increase the indent for the wrapped lines so it's clear we - // wrapped. - wrapped = true - indent += 2 - indentString = strings.Repeat(" ", indent) - } - buf.WriteString(indentString) - currentLineLength = indent + len(f) + 1 - } else { - currentLineLength = newLineLength - } - buf.WriteString(f) - buf.WriteByte(' ') - } - buf.WriteByte('\n') - buf.Flush() -} - -type InfoNode struct { - // Header line. If missing, no header printed and children - // not indented. - header string - condensed bool - - children []Info -} - -func NewInfoNode(header string) *InfoNode { - return &InfoNode{header: header} -} - -func (n *InfoNode) Add(child Info) { - n.children = append(n.children, child) -} - -func (n *InfoNode) AddLeaf(format string, args ...any) { - n.Add(InfoLeaf(fmt.Sprintf(format, args...))) -} - -func (n *InfoNode) Print(indent int, w *InfoPrinter) { - if n.header != "" { - fmt.Fprintf(w, "%s%s:\n", strings.Repeat(" ", indent), n.header) - indent += indentBy - } - - for i, child := range n.children { - child.Print(indent, w) - if !n.condensed && i != len(n.children)-1 { - w.Write([]byte{'\n'}) - } - } -} - -type InfoStruct struct { - value any -} - -func (n *InfoStruct) Print(indent int, w *InfoPrinter) { - scs := spew.ConfigState{Indent: strings.Repeat(" ", indentBy), SortKeys: true} - indentString := strings.Repeat(" ", indent) - for i, line := range strings.Split(scs.Sdump(n.value), "\n") { - if i == 0 { - fmt.Fprintf(w, "%s⚙️ %s\n", indentString, line) - } else { - fmt.Fprintf(w, "%s%s\n", indentString, line) - } - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/invoke.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/invoke.go deleted file mode 100644 index 31beeea151f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/invoke.go +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -import ( - "fmt" - "sort" - "strings" - "time" - - "go.uber.org/dig" - - "github.com/cilium/cilium/pkg/hive/internal" -) - -type invoker struct { - funcs []namedFunc -} - -type namedFunc struct { - name string - fn any - info dig.InvokeInfo -} - -type InvokerList interface { - AppendInvoke(func() error) -} - -func (inv *invoker) invoke(cont container) error { - for i, afn := range inv.funcs { - log.WithField("function", afn.name).Debug("Invoking") - t0 := time.Now() - if err := cont.Invoke(afn.fn, dig.FillInvokeInfo(&inv.funcs[i].info)); err != nil { - log.WithError(err).WithField("", afn.name).Error("Invoke failed") - return err - } - d := time.Since(t0) - log.WithField("duration", d).WithField("function", afn.name).Info("Invoked") - } - return nil -} - -func (i *invoker) Apply(c container) error { - // Remember the scope in which we need to invoke. - invoker := func() error { return i.invoke(c) } - - // Append the invoker to the list of invoke functions. These are invoked - // prior to start to build up the objects. They are not invoked directly - // here as first the configuration flags need to be registered. This allows - // using hives in a command-line application with many commands and where - // we don't yet know which command to run, but we still need to register - // all the flags. - return c.Invoke(func(l InvokerList) { - l.AppendInvoke(invoker) - }) -} - -func (i *invoker) Info(container) Info { - n := NewInfoNode("") - for _, namedFunc := range i.funcs { - invNode := NewInfoNode(fmt.Sprintf("🛠️ %s", namedFunc.name)) - invNode.condensed = true - - var ins []string - for _, input := range namedFunc.info.Inputs { - ins = append(ins, internal.TrimName(input.String())) - } - sort.Strings(ins) - invNode.AddLeaf("⇨ %s", strings.Join(ins, ", ")) - n.Add(invNode) - } - return n -} - -// Invoke constructs a cell for invoke functions. The invoke functions are executed -// when the hive is started to instantiate all objects via the constructors. -func Invoke(funcs ...any) Cell { - namedFuncs := []namedFunc{} - for _, fn := range funcs { - namedFuncs = append( - namedFuncs, - namedFunc{name: internal.FuncNameAndLocation(fn), fn: fn}) - } - return &invoker{funcs: namedFuncs} -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/lifecycle.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/lifecycle.go deleted file mode 100644 index 95be1b15b80..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/lifecycle.go +++ /dev/null @@ -1,226 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -import ( - "context" - "errors" - "fmt" - "time" - - "github.com/cilium/cilium/pkg/hive/internal" - "github.com/cilium/cilium/pkg/lock" -) - -// HookContext is a context passed to a lifecycle hook that is cancelled -// in case of timeout. Hooks that perform long blocking operations directly -// in the start or stop function (e.g. connecting to external services to -// initialize) must abort any such operation if this context is cancelled. -type HookContext context.Context - -// HookInterface mirrors the Hook interface from pkg/hive/lifecycle.go. -// Because pkg/hive/cell depends on HookInterface then we need to have a -// copy of it here. -// Hive provides a "cell" version of this HookInterface interface that does -// not depend on pkg/hive/lifecycle.go thus allowing the cell package to define -// lifecycle hooks. -type HookInterface interface { - Start(HookContext) error - Stop(HookContext) error -} - -// Hook is a pair of start and stop callbacks. Both are optional. -// They're paired up to make sure that on failed start all corresponding -// stop hooks are executed. -type Hook struct { - OnStart func(HookContext) error - OnStop func(HookContext) error -} - -func (h Hook) Start(ctx HookContext) error { - if h.OnStart == nil { - return nil - } - return h.OnStart(ctx) -} - -func (h Hook) Stop(ctx HookContext) error { - if h.OnStop == nil { - return nil - } - return h.OnStop(ctx) -} - -// Lifecycle enables cells to register start and stop hooks, either -// from a constructor or an invoke function. -type Lifecycle interface { - Append(HookInterface) - - Start(context.Context) error - Stop(context.Context) error - PrintHooks() -} - -// DefaultLifecycle lifecycle implements a simple lifecycle management that conforms -// to Lifecycle. It is exported for use in applications that have nested lifecycles -// (e.g. operator). -type DefaultLifecycle struct { - mu lock.Mutex - hooks []augmentedHook - numStarted int -} - -type augmentedHook struct { - HookInterface - moduleID FullModuleID -} - -func (lc *DefaultLifecycle) Append(hook HookInterface) { - lc.mu.Lock() - defer lc.mu.Unlock() - - lc.hooks = append(lc.hooks, augmentedHook{hook, nil}) -} - -func (lc *DefaultLifecycle) Start(ctx context.Context) error { - lc.mu.Lock() - defer lc.mu.Unlock() - - // Wrap the context to make sure it gets cancelled after - // start hooks have completed in order to discourage using - // the context for unintended purposes. - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - for _, hook := range lc.hooks { - fnName, exists := getHookFuncName(hook, true) - - if !exists { - // Count as started as there might be a stop hook. - lc.numStarted++ - continue - } - - l := log.WithField("function", fnName) - l.Debug("Executing start hook") - t0 := time.Now() - if err := hook.Start(ctx); err != nil { - l.WithError(err).Error("Start hook failed") - return err - } - d := time.Since(t0) - l.WithField("duration", d).Info("Start hook executed") - lc.numStarted++ - } - return nil -} - -func (lc *DefaultLifecycle) Stop(ctx context.Context) error { - lc.mu.Lock() - defer lc.mu.Unlock() - - // Wrap the context to make sure it gets cancelled after - // stop hooks have completed in order to discourage using - // the context for unintended purposes. - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - var errs error - for ; lc.numStarted > 0; lc.numStarted-- { - if ctx.Err() != nil { - return ctx.Err() - } - hook := lc.hooks[lc.numStarted-1] - - fnName, exists := getHookFuncName(hook, false) - if !exists { - continue - } - l := log.WithField("function", fnName) - l.Debug("Executing stop hook") - t0 := time.Now() - if err := hook.Stop(ctx); err != nil { - l.WithError(err).Error("Stop hook failed") - errs = errors.Join(errs, err) - } else { - d := time.Since(t0) - l.WithField("duration", d).Info("Stop hook executed") - } - } - return errs -} - -func (lc *DefaultLifecycle) PrintHooks() { - lc.mu.Lock() - defer lc.mu.Unlock() - - fmt.Printf("Start hooks:\n\n") - for _, hook := range lc.hooks { - fnName, exists := getHookFuncName(hook.HookInterface, true) - if !exists { - continue - } - fmt.Printf(" • %s (%s)\n", fnName, hook.moduleID) - } - - fmt.Printf("\nStop hooks:\n\n") - for i := len(lc.hooks) - 1; i >= 0; i-- { - hook := lc.hooks[i] - fnName, exists := getHookFuncName(hook.HookInterface, false) - if !exists { - continue - } - fmt.Printf(" • %s (%s)\n", fnName, hook.moduleID) - } -} - -type augmentedLifecycle struct { - *DefaultLifecycle - moduleID FullModuleID -} - -func (lc augmentedLifecycle) Append(hook HookInterface) { - lc.mu.Lock() - defer lc.mu.Unlock() - - lc.hooks = append(lc.hooks, augmentedHook{hook, lc.moduleID}) -} - -func getHookFuncName(hook HookInterface, start bool) (name string, hasHook bool) { - // Ok, we need to get a bit fancy here as runtime.FuncForPC does - // not return what we want: we get "cell.Hook.Stop()" when we want - // "*foo.Stop(). We do know the concrete type, and we do know - // the method name, so we check here whether we're dealing with - // "Hook" the struct, or an object implementing HookInterface. - // - // We could use reflection + FuncForPC to get around this, but it - // still wouldn't work for generic types (file would be "") - // and the type params would be missing, so instead we'll just use the - // type name + method name. - switch hook := hook.(type) { - case augmentedHook: - name, hasHook = getHookFuncName(hook.HookInterface, start) - return - case Hook: - if start { - if hook.OnStart == nil { - return "", false - } - return internal.FuncNameAndLocation(hook.OnStart), true - } - if hook.OnStop == nil { - return "", false - } - return internal.FuncNameAndLocation(hook.OnStop), true - - default: - if start { - return internal.PrettyType(hook) + ".Start", true - } - return internal.PrettyType(hook) + ".Stop", true - - } -} - -var _ Lifecycle = &DefaultLifecycle{} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/metric.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/metric.go deleted file mode 100644 index 76b9cdbf406..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/metric.go +++ /dev/null @@ -1,138 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -import ( - "fmt" - "reflect" - - "github.com/prometheus/client_golang/prometheus" - "go.uber.org/dig" - - "github.com/cilium/cilium/pkg/hive/internal" - pkgmetric "github.com/cilium/cilium/pkg/metrics/metric" -) - -var ( - withMeta pkgmetric.WithMetadata - collector prometheus.Collector -) - -// Metric constructs a new metric cell. -// -// This cell type provides `S` to the hive as returned by `ctor`, it also makes each individual field -// value available via the `hive-metrics` value group. Infrastructure components such as a registry, -// inspection tool, or documentation generator can collect all metrics in the hive via this value group. -// -// The `ctor` constructor must return a struct or pointer to a struct of type `S`. The returned struct -// must only contain public fields. All field types should implement the -// `github.com/cilium/cilium/pkg/metrics/metric.WithMetadata` -// and `github.com/prometheus/client_golang/prometheus.Collector` interfaces. -func Metric[S any](ctor func() S) Cell { - var nilOut S - outTyp := reflect.TypeOf(nilOut) - if outTyp.Kind() == reflect.Ptr { - outTyp = outTyp.Elem() - } - - if outTyp.Kind() != reflect.Struct { - panic(fmt.Errorf( - "cell.Metric must be invoked with a constructor function that returns a struct or pointer to a struct, "+ - "a constructor which returns a %s was supplied", - outTyp.Kind(), - )) - } - - // Let's be strict for now, could lift this in the future if we ever need to - if outTyp.NumField() == 0 { - panic(fmt.Errorf( - "cell.Metric must be invoked with a constructor function that returns exactly a struct with at least 1 " + - "metric, a constructor which returns a struct with zero fields was supplied", - )) - } - - withMetaTyp := reflect.TypeOf(&withMeta).Elem() - collectorTyp := reflect.TypeOf(&collector).Elem() - for i := 0; i < outTyp.NumField(); i++ { - field := outTyp.Field(i) - if !field.IsExported() { - panic(fmt.Errorf( - "The struct returned by the constructor passed to cell.Metric has a private field '%s', which "+ - "is not allowed. All fields on the returning struct must be exported", - field.Name, - )) - } - - if !field.Type.Implements(withMetaTyp) { - panic(fmt.Errorf( - "The struct returned by the constructor passed to cell.Metric has a field '%s', which is not metric.WithMetadata.", - field.Name, - )) - } - - if !field.Type.Implements(collectorTyp) { - panic(fmt.Errorf( - "The struct returned by the constructor passed to cell.Metric has a field '%s', which is not prometheus.Collector.", - field.Name, - )) - } - } - - return &metric[S]{ - ctor: ctor, - } -} - -type metric[S any] struct { - ctor func() S -} - -type metricOut struct { - dig.Out - - Metrics []pkgmetric.WithMetadata `group:"hive-metrics,flatten"` -} - -func (m *metric[S]) provideMetrics(metricSet S) metricOut { - var metrics []pkgmetric.WithMetadata - - value := reflect.ValueOf(metricSet) - typ := value.Type() - if typ.Kind() == reflect.Pointer { - value = value.Elem() - typ = typ.Elem() - } - - if typ.Kind() != reflect.Struct { - return metricOut{} - } - - for i := 0; i < typ.NumField(); i++ { - if withMeta, ok := value.Field(i).Interface().(pkgmetric.WithMetadata); ok { - metrics = append(metrics, withMeta) - } - } - - return metricOut{ - Metrics: metrics, - } -} - -func (m *metric[S]) Info(container) Info { - n := NewInfoNode(fmt.Sprintf("📈 %s", internal.FuncNameAndLocation(m.ctor))) - n.condensed = true - - return n -} - -func (m *metric[S]) Apply(container container) error { - // Provide the supplied constructor, so its return type is directly accessible by cells - container.Provide(m.ctor, dig.Export(true)) - - // Provide the metrics provider, which will take the return value of the constructor and turn it into a - // slice of metrics to be consumed by anyone interested in handling them. - container.Provide(m.provideMetrics, dig.Export(true)) - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/module.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/module.go deleted file mode 100644 index 5f5fcbb284d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/module.go +++ /dev/null @@ -1,161 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -import ( - "fmt" - "regexp" - "slices" - "strings" - - "github.com/sirupsen/logrus" - "go.uber.org/dig" - - "github.com/cilium/cilium/pkg/logging/logfields" -) - -// Module creates a scoped set of cells with a given identifier. -// -// The id and title will be included in the object dump (hive.PrintObjects). -// The id must be lower-case, at most 30 characters and only contain [a-z0-9-_]. -// Title can contain [a-zA-Z0-9_- ] and must be shorter than 80 characters. -// -// Private constructors with a module (ProvidePrivate) are only accessible -// within this module and its sub-modules. -func Module(id, title string, cells ...Cell) Cell { - validateIDAndTitle(id, title) - return &module{id, title, cells} -} - -// ModuleID is the module identifier. Provided in the module's scope. -type ModuleID string - -// FullModuleID is the fully qualified module identifier, e.g. the -// concat of nested module ids, e.g. "agent.controlplane.endpoint-manager". -// Provided in the module's scope. -type FullModuleID []string - -func (f FullModuleID) String() string { - return strings.Join(f, ".") -} - -func (f FullModuleID) append(m ModuleID) FullModuleID { - return append(slices.Clone(f), string(m)) -} - -var ( - idRegex = regexp.MustCompile(`^[a-z][a-z0-9_\-]{1,30}$`) - titleRegex = regexp.MustCompile(`^[a-zA-Z0-9_\- ]{1,80}$`) -) - -func validateIDAndTitle(id, title string) { - if !idRegex.MatchString(id) { - panic(fmt.Sprintf("Invalid hive.Module id: %q, expected to id match %s", id, idRegex)) - } - if !titleRegex.MatchString(title) { - panic(fmt.Sprintf("Invalid hive.Module title: %q, expected to title match %s", title, titleRegex)) - } -} - -type module struct { - // id is the module identity. It is shown in object output and is used to derive - // the scoped logger. - id string - - // title is a human-readable short title for the module. Shown in object output - // alongside the identifier. - title string - - cells []Cell -} - -func (m *module) logger(log logrus.FieldLogger) logrus.FieldLogger { - return log.WithField(logfields.LogSubsys, m.id) -} - -func (m *module) moduleID() ModuleID { - return ModuleID(m.id) -} - -func (m *module) fullModuleID(parent FullModuleID) FullModuleID { - return parent.append(m.moduleID()) -} - -type reporterHooks struct { - rootScope *scope -} - -func (r *reporterHooks) Start(ctx HookContext) error { - r.rootScope.start() - return nil -} - -func (r *reporterHooks) Stop(ctx HookContext) error { - flushAndClose(r.rootScope, "Hive shutting down") - return nil -} - -func createStructedScope(id FullModuleID, p Health, lc Lifecycle) Scope { - rs := rootScope(id, p.forModule(id)) - lc.Append(&reporterHooks{rootScope: rs}) - return rs -} - -func (m *module) lifecycle(lc Lifecycle, fullID FullModuleID) Lifecycle { - switch lc := lc.(type) { - case *DefaultLifecycle: - return &augmentedLifecycle{ - lc, - fullID, - } - case *augmentedLifecycle: - return &augmentedLifecycle{ - lc.DefaultLifecycle, - fullID, - } - default: - return lc - } -} - -func (m *module) Apply(c container) error { - scope := c.Scope(m.id) - - // Provide ModuleID and FullModuleID in the module's scope. - if err := scope.Provide(m.moduleID); err != nil { - return err - } - if err := scope.Decorate(m.fullModuleID); err != nil { - return err - } - - // Provide module scoped status reporter, used for reporting module level - // health status. - if err := scope.Provide(createStructedScope, dig.Export(false)); err != nil { - return err - } - - if err := scope.Decorate(m.lifecycle); err != nil { - return err - } - - if err := scope.Decorate(m.logger); err != nil { - return err - } - - for _, cell := range m.cells { - if err := cell.Apply(scope); err != nil { - return err - } - } - return nil -} - -func (m *module) Info(c container) Info { - n := NewInfoNode("Ⓜ️ " + m.id + " (" + m.title + ")") - for _, cell := range m.cells { - n.Add(cell.Info(c)) - } - return n -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/provide.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/provide.go deleted file mode 100644 index 6b21cc3c00d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/provide.go +++ /dev/null @@ -1,98 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -import ( - "fmt" - "sort" - "strings" - - "go.uber.org/dig" - - "github.com/cilium/cilium/pkg/hive/internal" -) - -// provider is a set of constructors -type provider struct { - ctors []any - infos []dig.ProvideInfo - export bool -} - -func (p *provider) Apply(c container) error { - p.infos = make([]dig.ProvideInfo, len(p.ctors)) - for i, ctor := range p.ctors { - if err := c.Provide(ctor, dig.Export(p.export), dig.FillProvideInfo(&p.infos[i])); err != nil { - return err - } - } - return nil -} - -func (p *provider) Info(container) Info { - n := &InfoNode{} - for i, ctor := range p.ctors { - info := p.infos[i] - privateSymbol := "" - if !p.export { - privateSymbol = "🔒️" - } - - ctorNode := NewInfoNode(fmt.Sprintf("🚧%s %s", privateSymbol, internal.FuncNameAndLocation(ctor))) - ctorNode.condensed = true - - var ins, outs []string - for _, input := range info.Inputs { - ins = append(ins, internal.TrimName(input.String())) - } - sort.Strings(ins) - for _, output := range info.Outputs { - outs = append(outs, internal.TrimName(output.String())) - } - sort.Strings(outs) - if len(ins) > 0 { - ctorNode.AddLeaf("⇨ %s", strings.Join(ins, ", ")) - } - ctorNode.AddLeaf("⇦ %s", strings.Join(outs, ", ")) - n.Add(ctorNode) - } - return n -} - -// Provide constructs a new cell with the given constructors. -// Constructor is any function that takes zero or more parameters and returns -// one or more values and optionally an error. For example, the following forms -// are accepted: -// -// func() A -// func(A, B, C) (D, error). -// -// If the constructor depends on a type that is not provided by any constructor -// the hive will fail to run with an error pointing at the missing type. -// -// A constructor can also take as parameter a structure of parameters annotated -// with `cell.In`, or return a struct annotated with `cell.Out`: -// -// type params struct { -// cell.In -// Flower *Flower -// Sun *Sun -// } -// -// type out struct { -// cell.Out -// Honey *Honey -// Nectar *Nectar -// } -// -// func newBee(params) (out, error) -func Provide(ctors ...any) Cell { - return &provider{ctors: ctors, export: true} -} - -// ProvidePrivate is like Provide, but the constructed objects are only -// available within the module it is defined and nested modules. -func ProvidePrivate(ctors ...any) Cell { - return &provider{ctors: ctors, export: false} -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/cell/structured.go b/vendor/github.com/cilium/cilium/pkg/hive/cell/structured.go deleted file mode 100644 index eca54d24c75..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/cell/structured.go +++ /dev/null @@ -1,604 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cell - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "runtime" - "sort" - "strconv" - "strings" - "sync/atomic" - "text/tabwriter" - "time" - - "github.com/cilium/cilium/pkg/inctimer" - "github.com/cilium/cilium/pkg/lock" - - "golang.org/x/exp/maps" - "k8s.io/apimachinery/pkg/util/duration" - "k8s.io/apimachinery/pkg/util/sets" -) - -type children sets.Set[string] - -// reporterMinTimeout is the minimum time between status realizations, this -// prevents excessive reporter tree walks which hold the lock. -// This also acts as a rate limiter for status updates, if a update is not realized -// because the minimum timeout has not elapsed, it will eventually be realized by -// a periodic wakeup of the same interval. -// -// HealthReporting is not intendeds to capture high frequency events, but rather provide -// a structured view of the health of the system. -var reporterMinTimeout = time.Millisecond * 500 - -// Scope provides a node in the structured health reporter tree that is -// serves only as a parent for other nodes (scopes or reporters), and is -// used to group related reporters together. -type Scope interface { - // Name returns the name of the scope. - Name() string - - // Close removes the scope from the tree, and stops all reporters under this scope. - // Using a reporter that is under this scope after Close has been called will result - // in a noop update and warning log. - // Thus it is preferable for all reporters to be Stopped first, before calling Close. - Close() - - scope() *subReporter -} - -// GetSubScope creates a new reporter scope under the given parent scope. -// This creates a new node in the structured health reporter tree, and any calls -// to GetSubScope or GetHealthReporter from the returned scope will return a child node -// of this reporter tree. -// -// GetSubScope can be chained together to create various levels of sub reporters. -// -// Example: -// -// 1. Init root scope (note: this is provided to modules automatically). -// root := rootScope(hr) -// -// root -// -// 2. Create endpoint-manager subscope, and reporter under that scope (with ok!) -// -// endpointManagerScope := GetSubScope(root, "endpoint-manager") -// GetHealthReporter(endpointManagerScope, "endpoint-000").OK("it works!") -// -// root(OK) -// └── scope(endpoint-manager, OK) -// └── reporter(endpoint-000, OK) -// -// 3. Create another reporter under that scope with degraded -// GetHealthReporter(endpointManagerScope, "endpoint-000").Degraded("oh no!") -// -// root(Degraded) -// └── scope(endpoint-manager, Degraded) -// └── reporter(endpoint-000, OK) -// └── reporter(endpoint-000, Degraded) -// -// 4. Close the endpoint-manager scope -// s.Close() -// -// root(OK) // status has been reported, but we no longer have any degraded status -// // default to ok status. -func GetSubScope(parent Scope, name string) Scope { - if parent == nil { - return nil - } - return createSubScope(parent, name) -} - -// GetHealthReporter creates a new reporter under the given parent scope. -func GetHealthReporter(parent Scope, name string) HealthReporter { - if parent == nil { - return &noopReporter{} - } - return getSubReporter(parent, name, true) -} - -// TestScope exposes creating a root scope for testing purposes only. -func TestScope() Scope { - return TestScopeFromProvider(FullModuleID{"test"}, NewHealthProvider()) -} - -// TestScope exposes creating a root scope from a health provider for testing purposes only. -func TestScopeFromProvider(moduleID FullModuleID, hp Health) Scope { - s := rootScope(moduleID, hp.forModule(moduleID)) - s.start() - return s -} - -func rootScope(id FullModuleID, hr statusNodeReporter) *scope { - r := &subReporter{ - base: &subreporterBase{ - hr: hr, - idToChildren: map[string]children{}, - nodes: map[string]*node{}, - wakeup: make(chan struct{}, 16), - }, - } - // create root node, required in case reporters are created without any subscopes. - r.id = r.base.addChild("", id.String(), false) - r.base.rootID = r.id - - // Realize walks the tree and creates a updated status for the reporter. - // Because this is blocking and can be expensive, we have a reconcile loop - // that only performs this if the revision has changed. - realize := func() { - if r.base.stopped { - return - } - statusTree := r.base.getStatusTreeLocked(r.base.rootID) - if r.base.stopped { - r.base.hr.setStatus(statusTree) - return - } - if r.base.revision.Load() == 0 { - return - } - r.base.hr.setStatus(statusTree) - } - - r.scheduleRealize = func() { - r.base.revision.Add(1) - r.base.wakeup <- struct{}{} - } - r.realizeSync = realize - - return &scope{subReporter: r} -} - -func (r *scope) start() { - ctx, cancel := context.WithCancel(context.Background()) - go func() { - var rev uint64 - var lastUpdate time.Time - for { - select { - case <-inctimer.After(reporterMinTimeout): - case <-r.base.wakeup: - case <-ctx.Done(): - } - if rev < r.base.revision.Load() && time.Since(lastUpdate) > reporterMinTimeout { - rev = r.base.revision.Load() - r.base.Lock() - r.realizeSync() - r.base.Unlock() - lastUpdate = time.Now() - } - if ctx.Err() != nil { - return - } - } - }() - r.closeReconciler = cancel -} - -// Flushes out any remaining unprocessed updates and closes the reporter tree. -// Used to finalize any remaining status updates before the module is stopped. -// This will allow for collecting of health status during shutdown. -func flushAndClose(rs Scope, reason string) { - rs.scope().base.Lock() - defer rs.scope().base.Unlock() - - // Stop reconciler loop, flush any pending updates synchronously. - rs.scope().closeReconciler() - - // Realize and flush the final status. - rs.scope().realizeSync() - - // Mark the module as stopped, and emit a stopped status. - rs.scope().base.stopped = true - rs.scope().base.hr.setStatus(&StatusNode{ - ID: rs.scope().base.rootID, - LastLevel: StatusStopped, - Message: reason, - }) - rs.scope().base.removeTreeLocked(rs.scope().id) -} - -type scope struct { - *subReporter -} - -func (s *scope) Close() { - s.base.Lock() - s.base.removeRefLocked(s.id) - s.base.removeTreeLocked(s.id) - s.base.Unlock() - s.scheduleRealize() -} - -// A scope can be removed if it has no references and all child scopes can be removed. -// Reporter leaf nodes are always immediately removed when Stopped. Thus if the condition -// holds that all subtrees of the scope can be removed, then the scope can be removed. -func (s *subreporterBase) canRemoveTreeLocked(id string) bool { - if _, ok := s.nodes[id]; ok { - node := s.nodes[id] - if (node.isReporter) || s.nodes[id].refs > 0 { - return false - } - for child := range s.idToChildren[id] { - if !s.canRemoveTreeLocked(child) { - return false - } - } - } - // If it does not exist, we assume it's ok to remove (noop). - return true -} - -func (s *scope) scope() *subReporter { - return s.subReporter -} - -func (s *scope) Name() string { - return s.name -} - -// When a scope is orphaned and garbage collected, we want to remove it from the tree if -// the following condition is met: -// 1. All scopes under this scope also have no references. -// 2. There are no reporters under this scope (reporters are always removed immediately -// after they are stopped). -// -// This means that scopes are only kept in the tree if they either have referenced subscopes, -// or if they have reporters under them. -// If a scope is orphaned, and all it's children are orphaned, and it has no reporter children -// then it is impossible for any new reporters to be created under this scope. -// -// Because reporters are only removed when they are explicitly stopped, this means that if a -// reporter node emits a ok/degraded status and then is orphaned. -// This is ok, because we're primarily interested in ensure that ephemerally created scopes that -// are never reported upon and then lost do not grow the tree indefinitely. -func createSubScope(parent Scope, name string) *scope { - s := &scope{ - subReporter: getSubReporter(parent, name, false), - } - runtime.SetFinalizer(s, func(s *scope) { - s.base.Lock() - s.base.removeRefLocked(s.id) - if s.base.canRemoveTreeLocked(s.id) { - s.base.removeTreeLocked(s.id) - } - s.base.Unlock() - runtime.SetFinalizer(s, nil) - }) - return s -} - -func getSubReporter(parent Scope, name string, isReporter bool) *subReporter { - return scopeFromParent(parent, name, isReporter) -} - -func scopeFromParent(parent Scope, name string, isReporter bool) *subReporter { - r := parent.scope() - r.base.Lock() - defer r.base.Unlock() - - // If such a reporter already exists at this scope, we just return the same reporter - // by recreating the subreporter. - for cid := range r.base.idToChildren[r.id] { - child := r.base.nodes[cid] - if child.name == name { - r.base.addRefLocked(cid) - return &subReporter{ - base: r.base, - id: cid, - scheduleRealize: r.scheduleRealize, - name: name, - } - } - } - - id := r.base.addChild(r.id, name, isReporter) - - return &subReporter{ - base: r.base, - id: id, - scheduleRealize: r.scheduleRealize, - name: name, - } -} - -// subreporterBase is the base implementation of a structured health reporter. -// Each node in a reporter tree (i.e. for each cell.Module) has a pointer to -// the single subreporterBase. -// subreporterBase maintains the tree structure, as well as is responsible for -// realizing the status tree, and emitting the status to the module HealthReporter. -type subreporterBase struct { - lock.Mutex - - // Module level health reporter, all realized status is emitted to this reporter. - hr statusNodeReporter - - // idToChildren is the adjacency map of parentID to children IDs. - idToChildren map[string]children - nodes map[string]*node - - // rootID is the root node of the tree, it should always exist in idToChildren and nodes. - rootID string - - stopped bool - - // Variables used for realization loop, because realization involves traversing the tree - // we only perform this when the revision has changed. - revision atomic.Uint64 - counter atomic.Int32 - wakeup chan struct{} -} - -func (s *subreporterBase) addNode(n *node) { - if _, ok := s.idToChildren[n.parentID]; !ok { - s.idToChildren[n.parentID] = children{} - } - s.idToChildren[n.parentID][n.id] = struct{}{} - s.idToChildren[n.id] = children{} - s.nodes[n.id] = n -} - -func (s *subreporterBase) addChild(pid string, name string, isReporter bool) string { - id := strconv.Itoa(int(s.counter.Add(1))) + "-" + name - s.addNode(&node{ - id: id, - parentID: pid, - count: 1, - nodeUpdate: nodeUpdate{ - Level: StatusUnknown, - Timestamp: time.Now(), - }, - name: name, - isReporter: isReporter, - refs: 1, - }) - return id -} - -var errReporterStopped = errors.New("reporter has been stopped") - -func (s *subreporterBase) setStatus(id string, level Level, message string, err error) error { - s.Lock() - defer s.Unlock() - - if s.stopped { - return fmt.Errorf("reporter tree %s has been stopped", id) - } - - if _, ok := s.nodes[id]; !ok { - return fmt.Errorf("could not set status for reporter %s: %w", id, errReporterStopped) - } - - n := s.nodes[id] - - if n.Level == level && n.Message == message { - n.count++ - } else { - n.count = 1 - } - - n.Level = level - n.Message = message - n.Error = err - return nil -} - -func (s *subreporterBase) removeTreeLocked(rid string) { - for child := range s.idToChildren[rid] { - s.removeTreeLocked(child) - } - // Safely remove parents reference to this node. - if _, ok := s.nodes[rid]; ok { - pid := s.nodes[rid].parentID - delete(s.idToChildren[pid], rid) - } - delete(s.idToChildren, rid) - delete(s.nodes, rid) -} - -// StatusNode is a model struct for a status tree realization result. -// It is created upon status tree realization, for now it is only used for -// for generating a plaintext representation of the status tree. -// In the future we will want to use this to generate a structured JSON representation -// of the status tree. -type StatusNode struct { - ID string `json:"id"` - LastLevel Level `json:"level,omitempty"` - Name string `json:"name"` - Message string `json:"message,omitempty"` - UpdateTimestamp time.Time `json:"timestamp"` - Count int `json:"count"` - SubStatuses []*StatusNode `json:"sub_statuses,omitempty"` - Error string `json:"error,omitempty"` -} - -var _ Update = (*StatusNode)(nil) - -func (s *StatusNode) Level() Level { - return s.LastLevel -} - -func (s *StatusNode) Timestamp() time.Time { - return s.UpdateTimestamp -} - -func (s *StatusNode) JSON() ([]byte, error) { - return json.MarshalIndent(s, "", " ") -} - -func (s *StatusNode) allOk() bool { - return s.LastLevel == StatusOK -} - -func (s *StatusNode) writeTo(w io.Writer, d int) { - if len(s.SubStatuses) == 0 { - since := "never" - if !s.UpdateTimestamp.IsZero() { - since = duration.HumanDuration(time.Since(s.UpdateTimestamp)) + " ago" - } - fmt.Fprintf(w, "%s%s\t%s\t%s\t%s\t(x%d)\n", strings.Repeat("\t", d), s.Name, s.LastLevel, s.Message, since, s.Count) - } else { - fmt.Fprintf(w, "%s%s\n", strings.Repeat("\t", d), s.Name) - for _, ss := range s.SubStatuses { - ss.writeTo(w, d+1) - } - } -} - -func (s *StatusNode) StringIndent(ident int) string { - if s == nil { - return "" - } - buf := bytes.NewBuffer(nil) - w := tabwriter.NewWriter(buf, 0, 0, 1, ' ', 0) - s.writeTo(w, ident) - w.Flush() - return buf.String() -} - -func (s *StatusNode) String() string { - return s.Message -} - -func (s *subreporterBase) getStatusTreeLocked(nid string) *StatusNode { - if children, ok := s.idToChildren[nid]; ok { - rn := s.nodes[nid] - n := &StatusNode{ - ID: nid, - Message: rn.Message, - Name: rn.name, - UpdateTimestamp: rn.Timestamp, - Count: rn.count, - } - if err := rn.Error; err != nil { - n.Error = err.Error() - } - allok := true - childIDs := maps.Keys(children) - sort.Strings(childIDs) - for _, child := range childIDs { - cn := s.getStatusTreeLocked(child) - if cn == nil { - log.Errorf("failed to get status for node %s", child) - continue - } - n.SubStatuses = append(n.SubStatuses, cn) - if !cn.allOk() { - allok = false - } - } - // If this is not a leaf and all children are ok then report ok. - // case 1: Non-reporter, has no children, should be ok? - // case 2: Non-reporter, has children, defer down to children. - if rn.isReporter { - n.LastLevel = rn.Level - } else { - if allok { - n.LastLevel = StatusOK - } else { - n.LastLevel = StatusDegraded - } - } - - return n - } - return nil -} - -type node struct { - id string - name string - parentID string - isReporter bool - count int - refs int - Message string - Error error - nodeUpdate -} -type nodeUpdate struct { - Level - Timestamp time.Time -} - -func (b *subreporterBase) removeRefLocked(id string) { - if _, ok := b.nodes[id]; ok { - if b.nodes[id].refs > 0 { - b.nodes[id].refs-- - } - } -} - -func (b *subreporterBase) addRefLocked(id string) { - if _, ok := b.nodes[id]; ok { - b.nodes[id].refs++ - } -} - -// subReporter represents both reporter "leaf" nodes and intermediate -// "scope" nodes. -// subReporter only has a pointer to the base, thus copying a subReporter -// by value yields the same "reporter". -type subReporter struct { - base *subreporterBase - // Triggers realization asynchronously, should not hold lock when calling. - scheduleRealize func() - // Triggers realization synchronously, base lock must be held when calling. - // Use for final status flushes. - realizeSync func() - - closeReconciler func() - id string - name string -} - -const logReporterID = "reporterID" - -func (s *subReporter) OK(message string) { - if err := s.base.setStatus(s.id, StatusOK, message, nil); err != nil { - if errors.Is(err, errReporterStopped) { - log.WithError(err).WithField(logReporterID, s.id).Debug("could not set OK status on subreporter") - } else { - log.WithError(err).WithField(logReporterID, s.id).Warn("could not set OK status on subreporter") - } - return - } - - s.scheduleRealize() -} - -func (s *subReporter) Degraded(message string, err error) { - if err := s.base.setStatus(s.id, StatusDegraded, message, err); err != nil { - if errors.Is(err, errReporterStopped) { - log.WithError(err).WithField(logReporterID, s.id).Debug("could not set degraded status on subreporter") - } else { - log.WithError(err).WithField(logReporterID, s.id).Warn("could not set degraded status on subreporter") - } - return - } - s.scheduleRealize() -} - -// Stopped marks the subreporter as stopped by removing it from the tree. -// Stopped reporters can immediately be removed from the tree, since they do -// not have any children. -func (s *subReporter) Stopped(message string) { - s.base.Lock() - s.base.removeTreeLocked(s.id) - s.base.Unlock() - s.scheduleRealize() -} - -type noopReporter struct{} - -func (s *noopReporter) OK(message string) {} -func (s *noopReporter) Degraded(message string, err error) {} -func (s *noopReporter) Stopped(message string) {} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/command.go b/vendor/github.com/cilium/cilium/pkg/hive/command.go deleted file mode 100644 index fbc74a22346..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/command.go +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package hive - -import ( - "github.com/sirupsen/logrus" - "github.com/spf13/cobra" - - "github.com/cilium/cilium/pkg/logging" -) - -// Command constructs the cobra command for hive. The hive -// command can be used to inspect the dependency graph. -func (h *Hive) Command() *cobra.Command { - cmd := &cobra.Command{ - Use: "hive", - Short: "Inspect the hive", - Run: func(cmd *cobra.Command, args []string) { - // Silence log messages from calling invokes and constructors. - logging.SetLogLevel(logrus.WarnLevel) - h.PrintObjects() - }, - TraverseChildren: false, - } - h.RegisterFlags(cmd.PersistentFlags()) - - cmd.AddCommand( - &cobra.Command{ - Use: "dot-graph", - Short: "Output the dependencies graph in graphviz dot format", - Run: func(cmd *cobra.Command, args []string) { - h.PrintDotGraph() - }, - TraverseChildren: false, - }) - - return cmd -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/doc.go b/vendor/github.com/cilium/cilium/pkg/hive/doc.go deleted file mode 100644 index c10f95e7c3f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/doc.go +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -/* -Package hive provides the infrastructure for building Cilium applications from modular components (cells). - -Hive is implemented using the uber/dig library, which provides the dependency injection for -objects in the hive. It is similar to uber/fx, but adds an opinionated approach to configuration. - -The configuration for cells is extracted from Viper. By default the field names are assumed to correspond -to flag names, e.g. field 'MyOption' corresponds to '--my-option' flag. - -The hive constructor, New(), takes the viper instance and the pflag FlagSet as parameters and registers -the flags from all cells and binds them to viper variables. Once the FlagSet and viper configuration has been -parsed one can call Populate() to pull the values from viper and construct the application. The hive can -then be Run(). - -# Example - -For a runnable example see pkg/hive/example. - -Try running: - - example$ go run . - (ctrl-c stops) - - example$ go run . --dot-graph | dot -Tx11 - -Try also commenting out cell.Provide lines and seeing what the dependency errors look like. -*/ -package hive diff --git a/vendor/github.com/cilium/cilium/pkg/hive/hive.go b/vendor/github.com/cilium/cilium/pkg/hive/hive.go deleted file mode 100644 index e81a64ea42b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/hive.go +++ /dev/null @@ -1,388 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package hive - -import ( - "context" - "errors" - "fmt" - "os" - "os/signal" - "reflect" - "strings" - "syscall" - "time" - - "github.com/sirupsen/logrus" - "github.com/spf13/pflag" - "github.com/spf13/viper" - "go.uber.org/dig" - - "github.com/cilium/cilium/pkg/hive/cell" - "github.com/cilium/cilium/pkg/hive/metrics" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "hive") -) - -const ( - // defaultStartTimeout is the amount of time allotted for start hooks. After - // this duration the context passed to the start hooks is cancelled. - defaultStartTimeout = 5 * time.Minute - - // defaultStopTimeout is the amount of time allotted for stop hooks. - defaultStopTimeout = time.Minute - - // defaultEnvPrefix is the default prefix for environment variables, e.g. - // flag "foo" can be set with environment variable "CILIUM_FOO". - defaultEnvPrefix = "CILIUM_" -) - -// Hive is a framework building modular applications. -// -// It implements dependency injection using the dig library. -// -// See pkg/hive/example for a runnable example application. -type Hive struct { - container *dig.Container - cells []cell.Cell - shutdown chan error - envPrefix string - startTimeout, stopTimeout time.Duration - flags *pflag.FlagSet - viper *viper.Viper - lifecycle cell.Lifecycle - populated bool - invokes []func() error - configOverrides []any -} - -// New returns a new hive that can be run, or inspected. -// The command-line flags from the cells are registered as part of this. -// -// The object graph is not constructed until methods of the hive are -// invoked. -// -// Applications should call RegisterFlags() to register the hive's command-line -// flags. Likewise if configuration settings come from configuration files, then -// the Viper() method can be used to populate the hive's viper instance. -func New(cells ...cell.Cell) *Hive { - h := &Hive{ - container: dig.New(), - envPrefix: defaultEnvPrefix, - cells: cells, - viper: viper.New(), - startTimeout: defaultStartTimeout, - stopTimeout: defaultStopTimeout, - flags: pflag.NewFlagSet("", pflag.ContinueOnError), - lifecycle: &cell.DefaultLifecycle{}, - shutdown: make(chan error, 1), - configOverrides: nil, - } - - if err := h.provideDefaults(); err != nil { - log.WithError(err).Fatal("Failed to provide default objects") - } - - if err := metrics.Cell.Apply(h.container); err != nil { - log.WithError(err).Fatal("Failed to apply Hive metrics cell") - } - - // Use a single health provider for all cells, which is used to create - // module scoped health reporters. - if err := h.container.Provide(func(healthMetrics *metrics.HealthMetrics, lc cell.Lifecycle) cell.Health { - hp := cell.NewHealthProvider() - updateStats := func() { - for l, c := range hp.Stats() { - healthMetrics.HealthStatusGauge.WithLabelValues(strings.ToLower(string(l))).Set(float64(c)) - } - } - lc.Append(cell.Hook{ - OnStart: func(ctx cell.HookContext) error { - updateStats() - hp.Subscribe(ctx, func(u cell.Update) { - updateStats() - }, func(err error) {}) - return nil - }, - OnStop: func(ctx cell.HookContext) error { - return hp.Stop(ctx) - }, - }) - return hp - }); err != nil { - log.WithError(err).Fatal("Failed to provide health provider") - } - - // Apply all cells to the container. This registers all constructors - // and adds all config flags. Invokes are delayed until Start() is - // called. - for _, cell := range cells { - if err := cell.Apply(h.container); err != nil { - log.WithError(err).Fatal("Failed to apply cell") - } - } - - // Bind the newly registered flags to viper. - h.flags.VisitAll(func(f *pflag.Flag) { - if err := h.viper.BindPFlag(f.Name, f); err != nil { - log.Fatalf("BindPFlag: %s", err) - } - if err := h.viper.BindEnv(f.Name, h.getEnvName(f.Name)); err != nil { - log.Fatalf("BindEnv: %s", err) - } - }) - - return h -} - -// RegisterFlags adds all flags in the hive to the given flag set. -// Fatals if a flag already exists in the given flag set. -// Use with e.g. cobra.Command: -// -// cmd := &cobra.Command{...} -// h.RegisterFlags(cmd.Flags()) -func (h *Hive) RegisterFlags(flags *pflag.FlagSet) { - h.flags.VisitAll(func(f *pflag.Flag) { - if flags.Lookup(f.Name) != nil { - log.Fatalf("Error registering flag: '%s' already registered", f.Name) - } - flags.AddFlag(f) - }) -} - -// Viper returns the hive's viper instance. -func (h *Hive) Viper() *viper.Viper { - return h.viper -} - -type defaults struct { - dig.Out - - Flags *pflag.FlagSet - Lifecycle cell.Lifecycle - Logger logrus.FieldLogger - Shutdowner Shutdowner - InvokerList cell.InvokerList - EmptyFullModuleID cell.FullModuleID -} - -func (h *Hive) provideDefaults() error { - return h.container.Provide(func() defaults { - return defaults{ - Flags: h.flags, - Lifecycle: h.lifecycle, - Logger: log, - Shutdowner: h, - InvokerList: h, - EmptyFullModuleID: nil, - } - }) -} - -func (h *Hive) SetTimeouts(start, stop time.Duration) { - h.startTimeout, h.stopTimeout = start, stop -} - -func (h *Hive) SetEnvPrefix(prefix string) { - h.envPrefix = prefix -} - -// AddConfigOverride appends a config override function to modify -// a configuration after it has been parsed. -// -// This method is only meant to be used in tests. -func AddConfigOverride[Cfg cell.Flagger](h *Hive, override func(*Cfg)) { - h.configOverrides = append(h.configOverrides, override) -} - -// Run populates the cell configurations and runs the hive cells. -// Interrupt signal or call to Shutdowner.Shutdown() will cause the hive to stop. -func (h *Hive) Run() error { - startCtx, cancel := context.WithTimeout(context.Background(), h.startTimeout) - defer cancel() - - var errs error - if err := h.Start(startCtx); err != nil { - errs = errors.Join(errs, fmt.Errorf("failed to start: %w", err)) - } - - // If start was successful, wait for Shutdown() or interrupt. - if errs == nil { - errs = errors.Join(errs, h.waitForSignalOrShutdown()) - } - - stopCtx, cancel := context.WithTimeout(context.Background(), h.stopTimeout) - defer cancel() - - if err := h.Stop(stopCtx); err != nil { - errs = errors.Join(errs, fmt.Errorf("failed to stop: %w", err)) - } - return errs -} - -func (h *Hive) waitForSignalOrShutdown() error { - signals := make(chan os.Signal, 1) - defer signal.Stop(signals) - signal.Notify(signals, os.Interrupt, syscall.SIGTERM) - select { - case sig := <-signals: - log.WithField("signal", sig).Info("Signal received") - return nil - case err := <-h.shutdown: - return err - } -} - -// Populate instantiates the hive. Use for testing that the hive can -// be instantiated. -func (h *Hive) Populate() error { - if h.populated { - return nil - } - h.populated = true - - // Provide all the parsed settings to the config cells. - err := h.container.Provide( - func() cell.AllSettings { - return cell.AllSettings(h.viper.AllSettings()) - }) - if err != nil { - return err - } - - // Provide config overriders if any - for _, o := range h.configOverrides { - v := reflect.ValueOf(o) - // Check that the config override is of type func(*cfg) and - // 'cfg' implements Flagger. - t := v.Type() - if t.Kind() != reflect.Func || t.NumIn() != 1 { - return fmt.Errorf("config override has invalid type %T, expected func(*T)", o) - } - flaggerType := reflect.TypeOf((*cell.Flagger)(nil)).Elem() - if !t.In(0).Implements(flaggerType) { - return fmt.Errorf("config override function parameter (%T) does not implement Flagger", o) - } - - // Construct the provider function: 'func() func(*cfg)'. This is - // picked up by the config cell and called to mutate the config - // after it has been parsed. - providerFunc := func(in []reflect.Value) []reflect.Value { - return []reflect.Value{v} - } - providerFuncType := reflect.FuncOf(nil, []reflect.Type{t}, false) - pfv := reflect.MakeFunc(providerFuncType, providerFunc) - if err := h.container.Provide(pfv.Interface()); err != nil { - return fmt.Errorf("providing config override failed: %w", err) - } - } - - // Execute the invoke functions to construct the objects. - for _, invoke := range h.invokes { - if err := invoke(); err != nil { - return err - } - } - return nil -} - -func (h *Hive) AppendInvoke(invoke func() error) { - h.invokes = append(h.invokes, invoke) -} - -// Start starts the hive. The context allows cancelling the start. -// If context is cancelled and the start hooks do not respect the cancellation -// then after 5 more seconds the process will be terminated forcefully. -func (h *Hive) Start(ctx context.Context) error { - if err := h.Populate(); err != nil { - return err - } - - defer close(h.fatalOnTimeout(ctx)) - - log.Info("Starting") - - return h.lifecycle.Start(ctx) -} - -// Stop stops the hive. The context allows cancelling the stop. -// If context is cancelled and the stop hooks do not respect the cancellation -// then after 5 more seconds the process will be terminated forcefully. -func (h *Hive) Stop(ctx context.Context) error { - defer close(h.fatalOnTimeout(ctx)) - log.Info("Stopping") - return h.lifecycle.Stop(ctx) -} - -func (h *Hive) fatalOnTimeout(ctx context.Context) chan struct{} { - terminated := make(chan struct{}, 1) - go func() { - select { - case <-terminated: - // Start/stop terminated in time, nothing to do. - return - - case <-ctx.Done(): - } - - // Context was cancelled. Give 5 more seconds and then - // go fatal. - select { - case <-terminated: - case <-time.After(5 * time.Second): - log.Fatal("Start or stop failed to finish on time, aborting forcefully.") - } - }() - return terminated -} - -// Shutdown implements the Shutdowner interface and is provided -// for the cells to use for triggering a early shutdown. -func (h *Hive) Shutdown(opts ...ShutdownOption) { - var o shutdownOptions - for _, opt := range opts { - opt.apply(&o) - } - - // If there already is an error in the channel, no-op - select { - case h.shutdown <- o.err: - default: - } -} - -func (h *Hive) PrintObjects() { - if err := h.Populate(); err != nil { - log.WithError(err).Fatal("Failed to populate object graph") - } - - fmt.Printf("Cells:\n\n") - ip := cell.NewInfoPrinter() - for _, c := range h.cells { - c.Info(h.container).Print(2, ip) - fmt.Println() - } - h.lifecycle.PrintHooks() -} - -func (h *Hive) PrintDotGraph() { - if err := h.Populate(); err != nil { - log.WithError(err).Fatal("Failed to populate object graph") - } - - if err := dig.Visualize(h.container, os.Stdout); err != nil { - log.WithError(err).Fatal("Failed to Visualize()") - } -} - -// getEnvName returns the environment variable to be used for the given option name. -func (h *Hive) getEnvName(option string) string { - under := strings.Replace(option, "-", "_", -1) - upper := strings.ToUpper(under) - return h.envPrefix + upper -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/internal/reflect.go b/vendor/github.com/cilium/cilium/pkg/hive/internal/reflect.go deleted file mode 100644 index 6fef8842e9f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/internal/reflect.go +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package internal - -import ( - "fmt" - "os" - "path/filepath" - "reflect" - "regexp" - "runtime" - "strings" -) - -var ( - baseNameRegex = regexp.MustCompile(`github\.com/cilium/cilium/[\w\/]+/`) -) - -func TrimName(name string) string { - return string(baseNameRegex.ReplaceAll([]byte(name), []byte{})) -} - -func PrettyType(x any) string { - return TrimName(fmt.Sprintf("%T", x)) -} - -func FuncNameAndLocation(fn any) string { - f := runtime.FuncForPC(reflect.ValueOf(fn).Pointer()) - file, line := f.FileLine(f.Entry()) - name := TrimName(f.Name()) - name = strings.TrimSuffix(name, "-fm") - if file != "" { - return fmt.Sprintf("%s (%s:%d)", name, usefulPathSegment(file), line) - } - return name -} - -// Purely a heuristic. -var commonRoots = map[string]struct{}{ - "pkg": {}, - "cmd": {}, -} - -func usefulPathSegment(file string) string { - p := filepath.Clean(file) - segs := strings.Split(p, string(os.PathSeparator)) - for i := len(segs) - 1; i > 0; i-- { - if _, ok := commonRoots[segs[i]]; ok { - segs = segs[i:] - break - } - } - return filepath.Join(segs...) -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/metrics/health.go b/vendor/github.com/cilium/cilium/pkg/hive/metrics/health.go deleted file mode 100644 index 84d72b1e9f0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/metrics/health.go +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -import ( - "github.com/cilium/cilium/pkg/hive/cell" - "github.com/cilium/cilium/pkg/metrics/metric" -) - -var Cell = cell.Metric(newHealthMetrics) - -type HealthMetrics struct { - HealthStatusGauge metric.Vec[metric.Gauge] -} - -func newHealthMetrics() *HealthMetrics { - return &HealthMetrics{ - HealthStatusGauge: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: "hive_health_status_levels", - Namespace: "cilium", - Subsystem: "hive", - Name: "status", - Help: "Counts of health status levels of Hive components", - }, []string{"status"}), - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/hive/shutdowner.go b/vendor/github.com/cilium/cilium/pkg/hive/shutdowner.go deleted file mode 100644 index d53ddaf284a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hive/shutdowner.go +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package hive - -// Shutdowner provides Shutdown(), which is a way to trigger stop for hive. -// -// To shut down with an error, call Shutdown with ShutdownWithError(err). -// This error will be returned from Run(). -type Shutdowner interface { - Shutdown(...ShutdownOption) -} - -type ShutdownOption interface { - apply(*shutdownOptions) -} - -// ShutdownWithError shuts down with an error. -func ShutdownWithError(err error) ShutdownOption { - return optionFunc(func(opts *shutdownOptions) { - opts.err = err - }) -} - -type optionFunc func(*shutdownOptions) - -func (fn optionFunc) apply(opts *shutdownOptions) { fn(opts) } - -type shutdownOptions struct { - err error -} diff --git a/vendor/github.com/cilium/cilium/pkg/hubble/api/v1/interface.go b/vendor/github.com/cilium/cilium/pkg/hubble/api/v1/interface.go deleted file mode 100644 index 6854993eba7..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/hubble/api/v1/interface.go +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Hubble - -package v1 - -import ( - "github.com/cilium/cilium/pkg/identity" - slim_corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/policy" -) - -// EndpointInfo defines readable fields of a Cilium endpoint. -type EndpointInfo interface { - GetID() uint64 - GetIdentity() identity.NumericIdentity - GetK8sPodName() string - GetK8sNamespace() string - GetLabels() []string - GetPod() *slim_corev1.Pod - GetRealizedPolicyRuleLabelsForKey(key policy.Key) (derivedFrom labels.LabelArrayList, revision uint64, ok bool) -} diff --git a/vendor/github.com/cilium/cilium/pkg/hubble/filters/cel_expression.go b/vendor/github.com/cilium/cilium/pkg/hubble/filters/cel_expression.go new file mode 100644 index 00000000000..79986a17679 --- /dev/null +++ b/vendor/github.com/cilium/cilium/pkg/hubble/filters/cel_expression.go @@ -0,0 +1,126 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Hubble + +package filters + +import ( + "context" + "fmt" + "reflect" + + "github.com/google/cel-go/cel" + "github.com/sirupsen/logrus" + + flowpb "github.com/cilium/cilium/api/v1/flow" + v1 "github.com/cilium/cilium/pkg/hubble/api/v1" +) + +var ( + // unfortunately, "flow" conflicts with the protobuf package name "flow", so + // we have to use something else. + // TODO: what should this be? + flowVariableName = "_flow" + + celTypes = cel.Types(&flowpb.Flow{}) + + goBoolType = reflect.TypeOf(false) + + celEnv *cel.Env +) + +func init() { + var err error + celEnv, err = cel.NewEnv( + cel.Container("flow"), + celTypes, + cel.Variable(flowVariableName, cel.ObjectType("flow.Flow")), + ) + if err != nil { + panic(fmt.Sprintf("error creating CEL env %s", err)) + } + +} + +// compile will parse and check an expression `expr` against a given +// environment `env` and determine whether the resulting type of the expression +// matches the `exprType` provided as input. +// Copied from +// https://github.com/google/cel-go/blob/338b3c80e688f7f44661d163c0dbc02eb120dcb7/codelab/solution/codelab.go#LL385C1-L399C2 +// with modifications +func compile(env *cel.Env, expr string, celType *cel.Type) (*cel.Ast, error) { + ast, iss := env.Compile(expr) + if iss.Err() != nil { + return nil, iss.Err() + } + // Type-check the expression for correctness. + checked, iss := env.Check(ast) + // Report semantic errors, if present. + if iss.Err() != nil { + return nil, iss.Err() + } + if checked.OutputType() != celType { + return nil, fmt.Errorf( + "got %q, wanted %q result type", + checked.OutputType(), celType) + } + return ast, nil +} + +func filterByCELExpression(ctx context.Context, log logrus.FieldLogger, exprs []string) (FilterFunc, error) { + var programs []cel.Program + for _, expr := range exprs { + // we want filters to be boolean expressions, so check the type of the + // expression before proceeding + ast, err := compile(celEnv, expr, cel.BoolType) + if err != nil { + return nil, fmt.Errorf("error compiling CEL expression: %w", err) + } + + prg, err := celEnv.Program(ast) + if err != nil { + return nil, fmt.Errorf("error building CEL program: %w", err) + } + programs = append(programs, prg) + } + + return func(ev *v1.Event) bool { + for _, prg := range programs { + out, _, err := prg.ContextEval(ctx, map[string]any{ + flowVariableName: ev.GetFlow(), + }) + if err != nil { + log.Errorf("error running CEL program %s", err) + return false + } + + v, err := out.ConvertToNative(goBoolType) + if err != nil { + log.Errorf("invalid conversion in CEL program: %s", err) + return false + } + b, ok := v.(bool) + if ok && b { + return true + } + } + return false + }, nil +} + +// CELExpressionFilter implements filtering based on CEL (common expression +// language) expressions +type CELExpressionFilter struct { + log logrus.FieldLogger +} + +// OnBuildFilter builds a CEL expression filter. +func (t *CELExpressionFilter) OnBuildFilter(ctx context.Context, ff *flowpb.FlowFilter) ([]FilterFunc, error) { + if exprs := ff.GetExperimental().GetCelExpression(); exprs != nil { + filter, err := filterByCELExpression(ctx, t.log, exprs) + if err != nil { + return nil, err + } + return []FilterFunc{filter}, nil + } + return []FilterFunc{}, nil +} diff --git a/vendor/github.com/cilium/cilium/pkg/hubble/filters/drop_reason_desc.go b/vendor/github.com/cilium/cilium/pkg/hubble/filters/drop_reason_desc.go new file mode 100644 index 00000000000..8b2022915d1 --- /dev/null +++ b/vendor/github.com/cilium/cilium/pkg/hubble/filters/drop_reason_desc.go @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Hubble + +package filters + +import ( + "context" + + flowpb "github.com/cilium/cilium/api/v1/flow" + v1 "github.com/cilium/cilium/pkg/hubble/api/v1" +) + +func filterByDropReasonDesc(dropReasons []flowpb.DropReason) (FilterFunc, error) { + return func(ev *v1.Event) bool { + flow := ev.GetFlow() + if flow == nil { + return false + } + reasonDesc := flow.GetDropReasonDesc() + verdict := flow.GetVerdict() + if verdict != flowpb.Verdict_DROPPED { + return false + } + for _, reason := range dropReasons { + if reason == reasonDesc { + return true + } + } + return false + }, nil +} + +type DropReasonDescFilter struct{} + +func (f *DropReasonDescFilter) OnBuildFilter(ctx context.Context, ff *flowpb.FlowFilter) ([]FilterFunc, error) { + var fs []FilterFunc + if ff.GetDropReasonDesc() != nil { + filter, err := filterByDropReasonDesc(ff.GetDropReasonDesc()) + if err != nil { + return nil, err + } + fs = append(fs, filter) + } + return fs, nil +} diff --git a/vendor/github.com/cilium/cilium/pkg/hubble/filters/filters.go b/vendor/github.com/cilium/cilium/pkg/hubble/filters/filters.go index 33962b42763..d50741ad4ea 100644 --- a/vendor/github.com/cilium/cilium/pkg/hubble/filters/filters.go +++ b/vendor/github.com/cilium/cilium/pkg/hubble/filters/filters.go @@ -6,6 +6,8 @@ package filters import ( "context" + "github.com/sirupsen/logrus" + flowpb "github.com/cilium/cilium/api/v1/flow" v1 "github.com/cilium/cilium/pkg/hubble/api/v1" ) @@ -123,24 +125,29 @@ func BuildFilterList(ctx context.Context, ff []*flowpb.FlowFilter, auxFilters [] } // DefaultFilters is the list of default filters -var DefaultFilters = []OnBuildFilter{ - &UUIDFilter{}, - &EventTypeFilter{}, - &VerdictFilter{}, - &ReplyFilter{}, - &IdentityFilter{}, - &ProtocolFilter{}, - &IPFilter{}, - &PodFilter{}, - &WorkloadFilter{}, - &ServiceFilter{}, - &FQDNFilter{}, - &LabelsFilter{}, - &PortFilter{}, - &HTTPFilter{}, - &TCPFilter{}, - &NodeNameFilter{}, - &IPVersionFilter{}, - &TraceIDFilter{}, - &TrafficDirectionFilter{}, +func DefaultFilters(log logrus.FieldLogger) []OnBuildFilter { + return []OnBuildFilter{ + &UUIDFilter{}, + &EventTypeFilter{}, + &VerdictFilter{}, + &DropReasonDescFilter{}, + &ReplyFilter{}, + &IdentityFilter{}, + &ProtocolFilter{}, + &IPFilter{}, + &PodFilter{}, + &WorkloadFilter{}, + &ServiceFilter{}, + &FQDNFilter{}, + &LabelsFilter{}, + &PortFilter{}, + &HTTPFilter{}, + &TCPFilter{}, + &NodeNameFilter{}, + &IPVersionFilter{}, + &TraceIDFilter{}, + &TrafficDirectionFilter{}, + &CELExpressionFilter{log: log}, + &NetworkInterfaceFilter{}, + } } diff --git a/vendor/github.com/cilium/cilium/pkg/hubble/filters/ip.go b/vendor/github.com/cilium/cilium/pkg/hubble/filters/ip.go index c857b48d4ef..5f6354191d5 100644 --- a/vendor/github.com/cilium/cilium/pkg/hubble/filters/ip.go +++ b/vendor/github.com/cilium/cilium/pkg/hubble/filters/ip.go @@ -21,6 +21,10 @@ func destinationIP(ev *v1.Event) string { return ev.GetFlow().GetIP().GetDestination() } +func sourceIPXlated(ev *v1.Event) string { + return ev.GetFlow().GetIP().GetSourceXlated() +} + func filterByIPs(ips []string, getIP func(*v1.Event) string) (FilterFunc, error) { // IP filter can either be an exact match (e.g. "1.1.1.1") or a CIDR range // (e.g. "1.1.1.0/24"). Put them into 2 separate lists here. @@ -90,6 +94,14 @@ func (f *IPFilter) OnBuildFilter(ctx context.Context, ff *flowpb.FlowFilter) ([] fs = append(fs, ipf) } + if ff.GetSourceIpXlated() != nil { + ipf, err := filterByIPs(ff.GetSourceIpXlated(), sourceIPXlated) + if err != nil { + return nil, err + } + fs = append(fs, ipf) + } + return fs, nil } diff --git a/vendor/github.com/cilium/cilium/pkg/hubble/filters/labelparser.go b/vendor/github.com/cilium/cilium/pkg/hubble/filters/labelparser.go new file mode 100644 index 00000000000..6db64466076 --- /dev/null +++ b/vendor/github.com/cilium/cilium/pkg/hubble/filters/labelparser.go @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Hubble + +package filters + +import ( + "errors" + "fmt" + "io" + "strings" + "unicode" +) + +// translateSelector takes a label selector with colon-based source prefixes +// and translates it to a valid k8s label selector with dot-based prefixes, +// i.e. "k8s:foo in (bar, baz)" becomes "k8s.foo in (bar, baz)". +// It also makes sure that bare keys without an explicit source will get an +// `any` source prefix. +func translateSelector(selector string) (string, error) { + out := &strings.Builder{} + in := strings.NewReader(selector) + + for in.Len() > 0 { + err := advanceToNextKey(in, out) + if err != nil { + return "", err + } + err = translateKey(in, out) + if err != nil { + return "", err + } + err = advanceToNextSelector(in, out) + if err != nil { + return "", err + } + } + return out.String(), nil +} + +// advanceToNextKey scans from the beginning of a selector to the next +// key and writes everything before the start of the key from in to out. +func advanceToNextKey(in *strings.Reader, out *strings.Builder) error { + for { + r, _, err := in.ReadRune() + if errors.Is(err, io.EOF) { + return nil + } + if err != nil { + return err + } + if !unicode.IsSpace(r) && r != '!' { + return in.UnreadRune() + } + out.WriteRune(r) + } +} + +// translateKey takes a reader that point to the start of a key. It reads +// until the end of the key and writes the translated key (with dot prefixes +// instead of colon-based source prefixes) to out +func translateKey(in *strings.Reader, out *strings.Builder) error { + key := &strings.Builder{} + defer func() { + ckey := key.String() + if !strings.Contains(ckey, ":") { + ckey = fmt.Sprintf("any:%s", ckey) + } + ckey = strings.Replace(ckey, ":", ".", 1) + out.WriteString(ckey) + }() + for { + r, _, err := in.ReadRune() + if errors.Is(err, io.EOF) { + return nil + } + if err != nil { + return err + } + if unicode.IsSpace(r) || r == '=' || r == '!' || r == ',' { + return in.UnreadRune() + } + key.WriteRune(r) + } +} + +// advanceToNextSelector takes a read that points to the end of a key and will +// advance the reader to the beginning of the next selector and writes everything +// it scans to out. +func advanceToNextSelector(in *strings.Reader, out *strings.Builder) error { + nesting := 0 + for { + r, _, err := in.ReadRune() + if errors.Is(err, io.EOF) { + return nil + } + if err != nil { + return err + } + switch r { + case '(': + nesting++ + case ')': + nesting-- + } + out.WriteRune(r) + if r == ',' && nesting == 0 { + return nil + } + } +} diff --git a/vendor/github.com/cilium/cilium/pkg/hubble/filters/labels.go b/vendor/github.com/cilium/cilium/pkg/hubble/filters/labels.go index 231fdfa4418..26cbb51c6e2 100644 --- a/vendor/github.com/cilium/cilium/pkg/hubble/filters/labels.go +++ b/vendor/github.com/cilium/cilium/pkg/hubble/filters/labels.go @@ -6,7 +6,6 @@ package filters import ( "context" "fmt" - "regexp" flowpb "github.com/cilium/cilium/api/v1/flow" v1 "github.com/cilium/cilium/pkg/hubble/api/v1" @@ -24,9 +23,10 @@ func destinationLabels(ev *v1.Event) k8sLabels.Labels { return ciliumLabels.ParseLabelArrayFromArray(labels) } -var ( - labelSelectorWithColon = regexp.MustCompile(`([^,]\s*[a-z0-9-]+):([a-z0-9-]+)`) -) +func nodeLabels(ev *v1.Event) k8sLabels.Labels { + labels := ev.GetFlow().GetNodeLabels() + return ciliumLabels.ParseLabelArrayFromArray(labels) +} func parseSelector(selector string) (k8sLabels.Selector, error) { // ciliumLabels.LabelArray extends the k8sLabels.Selector logic with @@ -39,8 +39,13 @@ func parseSelector(selector string) (k8sLabels.Selector, error) { // therefore we translate any user-specified source prefixes by // replacing colon-based source prefixes in labels with dot-based prefixes, // i.e. "k8s:foo in (bar, baz)" becomes "k8s.foo in (bar, baz)". - - translated := labelSelectorWithColon.ReplaceAllString(selector, "${1}.${2}") + // + // We also prefix any key that doesn ot specify with "any." + // i.e. "example.com in (bar, buzz)" becomes "any.example.com in (bar, buzz)" + translated, err := translateSelector(selector) + if err != nil { + return nil, err + } return k8sLabels.Parse(translated) } @@ -90,5 +95,13 @@ func (l *LabelsFilter) OnBuildFilter(ctx context.Context, ff *flowpb.FlowFilter) fs = append(fs, dlf) } + if ff.GetNodeLabels() != nil { + nlf, err := FilterByLabelSelectors(ff.GetNodeLabels(), nodeLabels) + if err != nil { + return nil, fmt.Errorf("invalid node label filter: %w", err) + } + fs = append(fs, nlf) + } + return fs, nil } diff --git a/vendor/github.com/cilium/cilium/pkg/hubble/filters/network_interface.go b/vendor/github.com/cilium/cilium/pkg/hubble/filters/network_interface.go new file mode 100644 index 00000000000..a5510d0fd68 --- /dev/null +++ b/vendor/github.com/cilium/cilium/pkg/hubble/filters/network_interface.go @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Hubble + +package filters + +import ( + "context" + + flowpb "github.com/cilium/cilium/api/v1/flow" + v1 "github.com/cilium/cilium/pkg/hubble/api/v1" +) + +func filterByNetworkInterface(ifaces []*flowpb.NetworkInterface) FilterFunc { + return func(ev *v1.Event) bool { + iface := ev.GetFlow().GetInterface() + if iface == nil { + return false + } + for _, f := range ifaces { + if idx := f.GetIndex(); idx > 0 && idx != iface.GetIndex() { + continue + } + if name := f.GetName(); name != "" && name != iface.GetName() { + continue + } + return true + } + return false + } +} + +// NetworkInterfaceFilter implements filtering based on flow network interface. +type NetworkInterfaceFilter struct{} + +// OnBuildFilter builds a a flow network interface filter. +func (e *NetworkInterfaceFilter) OnBuildFilter(ctx context.Context, ff *flowpb.FlowFilter) ([]FilterFunc, error) { + var fs []FilterFunc + + if ifaces := ff.GetInterface(); len(ifaces) > 0 { + fs = append(fs, filterByNetworkInterface(ifaces)) + } + + return fs, nil +} diff --git a/vendor/github.com/cilium/cilium/pkg/iana/svcname.go b/vendor/github.com/cilium/cilium/pkg/iana/svcname.go deleted file mode 100644 index f888b87e161..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/iana/svcname.go +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package iana - -import ( - "regexp" -) - -// IANA Service Name consists of alphanumeric characters of which at -// least one is not a number, as well as non-consecutive dashes ('-') -// except for in the beginning or the end. -// Note: Character case must be ignored when comparing service names. -var isSvcName = regexp.MustCompile(`^([a-zA-Z0-9]-?)*[a-zA-Z](-?[a-zA-Z0-9])*$`).MatchString - -// IsSvcName returns true if the string conforms to IANA Service Name specification -// (RFC 6335 Section 5.1. Service Name Syntax) -func IsSvcName(name string) bool { - return len(name) > 0 && len(name) <= 15 && isSvcName(name) -} diff --git a/vendor/github.com/cilium/cilium/pkg/identity/cache/allocator.go b/vendor/github.com/cilium/cilium/pkg/identity/cache/allocator.go deleted file mode 100644 index d5134ec77b9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/cache/allocator.go +++ /dev/null @@ -1,575 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cache - -import ( - "context" - "errors" - "fmt" - "path" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/allocator" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/identity/key" - "github.com/cilium/cilium/pkg/idpool" - clientset "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" - "github.com/cilium/cilium/pkg/k8s/identitybackend" - "github.com/cilium/cilium/pkg/kvstore" - kvstoreallocator "github.com/cilium/cilium/pkg/kvstore/allocator" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/stream" -) - -var ( - // IdentitiesPath is the path to where identities are stored in the - // key-value store. - IdentitiesPath = path.Join(kvstore.BaseKeyPrefix, "state", "identities", "v1") -) - -// CachingIdentityAllocator manages the allocation of identities for both -// global and local identities. -type CachingIdentityAllocator struct { - // IdentityAllocator is an allocator for security identities from the - // kvstore. - IdentityAllocator *allocator.Allocator - - // globalIdentityAllocatorInitialized is closed whenever the global identity - // allocator is initialized. - globalIdentityAllocatorInitialized chan struct{} - - localIdentities *localIdentityCache - - localNodeIdentities *localIdentityCache - - identitiesPath string - - // This field exists is to hand out references that are either for sending - // and receiving. It should not be used directly without converting it first - // to a AllocatorEventSendChan or AllocatorEventRecvChan. - events allocator.AllocatorEventChan - watcher identityWatcher - - // setupMutex synchronizes InitIdentityAllocator() and Close() - setupMutex lock.Mutex - - owner IdentityAllocatorOwner -} - -// IdentityAllocatorOwner is the interface the owner of an identity allocator -// must implement -type IdentityAllocatorOwner interface { - // UpdateIdentities will be called when identities have changed - // - // The caller is responsible for making sure the same identity - // is not present in both 'added' and 'deleted', so that they - // can be processed in either order. - UpdateIdentities(added, deleted IdentityCache) - - // GetSuffix must return the node specific suffix to use - GetNodeSuffix() string -} - -// IdentityAllocator is any type which is responsible for allocating security -// identities based of sets of labels, and caching information about identities -// locally. -type IdentityAllocator interface { - // Identity changes are observable. - stream.Observable[IdentityChange] - - // WaitForInitialGlobalIdentities waits for the initial set of global - // security identities to have been received. - WaitForInitialGlobalIdentities(context.Context) error - - // AllocateIdentity allocates an identity described by the specified labels. - // A possible previously used numeric identity for these labels can be passed - // in as the last parameter; identity.InvalidIdentity must be passed if no - // previous numeric identity exists. - AllocateIdentity(context.Context, labels.Labels, bool, identity.NumericIdentity) (*identity.Identity, bool, error) - - // Release is the reverse operation of AllocateIdentity() and releases the - // specified identity. - Release(context.Context, *identity.Identity, bool) (released bool, err error) - - // ReleaseSlice is the slice variant of Release(). - ReleaseSlice(context.Context, []*identity.Identity) error - - // LookupIdentityByID returns the identity that corresponds to the given - // labels. - LookupIdentity(ctx context.Context, lbls labels.Labels) *identity.Identity - - // LookupIdentityByID returns the identity that corresponds to the given - // numeric identity. - LookupIdentityByID(ctx context.Context, id identity.NumericIdentity) *identity.Identity - - // GetIdentityCache returns the current cache of identities that the - // allocator has allocated. The caller should not modify the resulting - // identities by pointer. - GetIdentityCache() IdentityCache - - // GetIdentities returns a copy of the current cache of identities. - GetIdentities() IdentitiesModel - - // WithholdLocalIdentities holds a set of numeric identities out of the local - // allocation pool(s). Once withheld, a numeric identity can only be used - // when explicitly requested via AllocateIdentity(..., oldNID). - WithholdLocalIdentities(nids []identity.NumericIdentity) - - // UnwithholdLocalIdentities removes numeric identities from the withheld set, - // freeing them for general allocation. - UnwithholdLocalIdentities(nids []identity.NumericIdentity) -} - -// InitIdentityAllocator creates the global identity allocator. Only the first -// invocation of this function will have an effect. The Caller must have -// initialized well known identities before calling this (by calling -// identity.InitWellKnownIdentities()). -// The client is only used by the CRD identity allocator currently. -// Returns a channel which is closed when initialization of the allocator is -// completed. -// TODO: identity backends are initialized directly in this function, pulling -// in dependencies on kvstore and k8s. It would be better to decouple this, -// since the backends are an interface. -func (m *CachingIdentityAllocator) InitIdentityAllocator(client clientset.Interface) <-chan struct{} { - m.setupMutex.Lock() - defer m.setupMutex.Unlock() - - if m.IdentityAllocator != nil { - log.Panic("InitIdentityAllocator() in succession without calling Close()") - } - - log.Info("Initializing identity allocator") - - minID := idpool.ID(identity.GetMinimalAllocationIdentity()) - maxID := idpool.ID(identity.GetMaximumAllocationIdentity()) - - log.WithFields(map[string]interface{}{ - "min": minID, - "max": maxID, - "cluster-id": option.Config.ClusterID, - }).Info("Allocating identities between range") - - // In the case of the allocator being closed, we need to create a new events channel - // and start a new watch. - if m.events == nil { - m.events = make(allocator.AllocatorEventChan, eventsQueueSize) - m.watcher.watch(m.events) - } - - // Asynchronously set up the global identity allocator since it connects - // to the kvstore. - go func(owner IdentityAllocatorOwner, events allocator.AllocatorEventSendChan, minID, maxID idpool.ID) { - m.setupMutex.Lock() - defer m.setupMutex.Unlock() - - var ( - backend allocator.Backend - err error - ) - - switch option.Config.IdentityAllocationMode { - case option.IdentityAllocationModeKVstore: - log.Debug("Identity allocation backed by KVStore") - backend, err = kvstoreallocator.NewKVStoreBackend(m.identitiesPath, owner.GetNodeSuffix(), &key.GlobalIdentity{}, kvstore.Client()) - if err != nil { - log.WithError(err).Fatal("Unable to initialize kvstore backend for identity allocation") - } - - case option.IdentityAllocationModeCRD: - log.Debug("Identity allocation backed by CRD") - backend, err = identitybackend.NewCRDBackend(identitybackend.CRDBackendConfiguration{ - Store: nil, - Client: client, - KeyFunc: (&key.GlobalIdentity{}).PutKeyFromMap, - }) - if err != nil { - log.WithError(err).Fatal("Unable to initialize Kubernetes CRD backend for identity allocation") - } - - default: - log.Fatalf("Unsupported identity allocation mode %s", option.Config.IdentityAllocationMode) - } - - a, err := allocator.NewAllocator(&key.GlobalIdentity{}, backend, - allocator.WithMax(maxID), allocator.WithMin(minID), - allocator.WithEvents(events), - allocator.WithMasterKeyProtection(), - allocator.WithPrefixMask(idpool.ID(option.Config.ClusterID< identity.MaxNumericIdentity { - return nil, false, fmt.Errorf("%d: numeric identity too large", idp) - } - - if option.Config.Debug { - log.WithFields(logrus.Fields{ - logfields.Identity: idp, - logfields.IdentityLabels: lbls.String(), - "isNew": isNew, - "isNewLocally": isNewLocally, - }).Debug("Resolved identity") - } - - return identity.NewIdentity(identity.NumericIdentity(idp), lbls), isNew, nil -} - -func (m *CachingIdentityAllocator) WithholdLocalIdentities(nids []identity.NumericIdentity) { - log.WithField(logfields.Identity, nids).Debug("Withholding numeric identities for later restoration") - - // The allocators will return any identities that are not in-scope. - nids = m.localIdentities.withhold(nids) - nids = m.localNodeIdentities.withhold(nids) - if len(nids) > 0 { - log.WithField(logfields.Identity, nids).Error("Attempt to restore invalid numeric identities.") - } -} - -func (m *CachingIdentityAllocator) UnwithholdLocalIdentities(nids []identity.NumericIdentity) { - log.WithField(logfields.Identity, nids).Debug("Unwithholding numeric identities") - - // The allocators will ignore any identities that are not in-scope. - m.localIdentities.unwithhold(nids) - m.localNodeIdentities.unwithhold(nids) -} - -// Release is the reverse operation of AllocateIdentity() and releases the -// identity again. This function may result in kvstore operations. -// After the last user has released the ID, the returned lastUse value is true. -func (m *CachingIdentityAllocator) Release(ctx context.Context, id *identity.Identity, notifyOwner bool) (released bool, err error) { - defer func() { - if released { - if id.ID.HasLocalScope() { - metrics.Identity.WithLabelValues(identity.NodeLocalIdentityType).Dec() - } else if id.ID.HasRemoteNodeScope() { - metrics.Identity.WithLabelValues(identity.RemoteNodeIdentityType).Dec() - } else if id.ID.IsReservedIdentity() { - metrics.Identity.WithLabelValues(identity.ReservedIdentityType).Dec() - } else { - metrics.Identity.WithLabelValues(identity.ClusterLocalIdentityType).Dec() - } - } - if m.owner != nil && released && notifyOwner { - deleted := IdentityCache{ - id.ID: id.LabelArray, - } - m.owner.UpdateIdentities(nil, deleted) - } - }() - - // Ignore reserved identities. - if id.IsReserved() { - return false, nil - } - - switch identity.ScopeForLabels(id.Labels) { - case identity.IdentityScopeLocal: - return m.localIdentities.release(id, notifyOwner), nil - case identity.IdentityScopeRemoteNode: - return m.localNodeIdentities.release(id, notifyOwner), nil - } - - // This will block until the kvstore can be accessed and all identities - // were successfully synced - err = m.WaitForInitialGlobalIdentities(ctx) - if err != nil { - return false, err - } - - if m.IdentityAllocator == nil { - return false, fmt.Errorf("allocator not initialized") - } - - // Rely on the eventual Kv-Store events for delete - // notifications of kv-store allocated identities. Even if an - // ID is no longer used locally, it may still be used by - // remote nodes, so we can't rely on the locally computed - // "lastUse". - return m.IdentityAllocator.Release(ctx, &key.GlobalIdentity{LabelArray: id.LabelArray}) -} - -// ReleaseSlice attempts to release a set of identities. It is a helper -// function that may be useful for cleaning up multiple identities in paths -// where several identities may be allocated and another error means that they -// should all be released. -func (m *CachingIdentityAllocator) ReleaseSlice(ctx context.Context, identities []*identity.Identity) error { - var err error - for _, id := range identities { - if id == nil { - continue - } - _, err2 := m.Release(ctx, id, false) - if err2 != nil { - log.WithError(err2).WithFields(logrus.Fields{ - logfields.Identity: id, - }).Error("Failed to release identity") - err = err2 - } - } - return err -} - -// WatchRemoteIdentities returns a RemoteCache instance which can be later -// started to watch identities in another kvstore and sync them to the local -// identity cache. remoteName should be unique unless replacing an existing -// remote's backend. When cachedPrefix is set, identities are assumed to be -// stored under the "cilium/cache" prefix, and the watcher is adapted accordingly. -func (m *CachingIdentityAllocator) WatchRemoteIdentities(remoteName string, backend kvstore.BackendOperations, cachedPrefix bool) (*allocator.RemoteCache, error) { - <-m.globalIdentityAllocatorInitialized - - prefix := m.identitiesPath - if cachedPrefix { - prefix = path.Join(kvstore.StateToCachePrefix(prefix), remoteName) - } - - remoteAllocatorBackend, err := kvstoreallocator.NewKVStoreBackend(prefix, m.owner.GetNodeSuffix(), &key.GlobalIdentity{}, backend) - if err != nil { - return nil, fmt.Errorf("error setting up remote allocator backend: %w", err) - } - - remoteAlloc, err := allocator.NewAllocator(&key.GlobalIdentity{}, remoteAllocatorBackend, - allocator.WithEvents(m.IdentityAllocator.GetEvents()), allocator.WithoutGC(), allocator.WithoutAutostart()) - if err != nil { - return nil, fmt.Errorf("unable to initialize remote Identity Allocator: %w", err) - } - - return m.IdentityAllocator.NewRemoteCache(remoteName, remoteAlloc), nil -} - -func (m *CachingIdentityAllocator) RemoveRemoteIdentities(name string) { - if m.IdentityAllocator != nil { - m.IdentityAllocator.RemoveRemoteKVStore(name) - } -} - -type IdentityChangeKind string - -const ( - IdentityChangeSync IdentityChangeKind = IdentityChangeKind(allocator.AllocatorChangeSync) - IdentityChangeUpsert IdentityChangeKind = IdentityChangeKind(allocator.AllocatorChangeUpsert) - IdentityChangeDelete IdentityChangeKind = IdentityChangeKind(allocator.AllocatorChangeDelete) -) - -type IdentityChange struct { - Kind IdentityChangeKind - ID identity.NumericIdentity - Labels labels.Labels -} - -// Observe the identity changes. Conforms to stream.Observable. -// Replays the current state of the cache when subscribing. -func (m *CachingIdentityAllocator) Observe(ctx context.Context, next func(IdentityChange), complete func(error)) { - // This short-lived go routine serves the purpose of waiting for the global identity allocator becoming ready - // before starting to observe the underlying allocator for changes. - // m.IdentityAllocator is backed by a stream.FuncObservable, that will start its own - // go routine. Therefore, the current go routine will stop and free the lock on the setupMutex after the registration. - go func() { - if err := m.WaitForInitialGlobalIdentities(ctx); err != nil { - complete(ctx.Err()) - return - } - - m.setupMutex.Lock() - defer m.setupMutex.Unlock() - - if m.IdentityAllocator == nil { - complete(errors.New("allocator no longer initialized")) - return - } - - // Observe the underlying allocator for changes and map the events to identities. - stream.Map[allocator.AllocatorChange, IdentityChange]( - m.IdentityAllocator, - func(change allocator.AllocatorChange) IdentityChange { - return IdentityChange{ - Kind: IdentityChangeKind(change.Kind), - ID: identity.NumericIdentity(change.ID), - Labels: mapLabels(change.Key), - } - }, - ).Observe(ctx, next, complete) - }() -} - -func mapLabels(allocatorKey allocator.AllocatorKey) labels.Labels { - var idLabels labels.Labels = nil - - if allocatorKey != nil { - idLabels = labels.Labels{} - for k, v := range allocatorKey.GetAsMap() { - label := labels.ParseLabel(k + "=" + v) - idLabels[label.Key] = label - } - } - - return idLabels -} diff --git a/vendor/github.com/cilium/cilium/pkg/identity/cache/cache.go b/vendor/github.com/cilium/cilium/pkg/identity/cache/cache.go deleted file mode 100644 index 7a0b4c1941c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/cache/cache.go +++ /dev/null @@ -1,280 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cache - -import ( - "context" - "reflect" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/allocator" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/identity/key" - identitymodel "github.com/cilium/cilium/pkg/identity/model" - "github.com/cilium/cilium/pkg/idpool" - "github.com/cilium/cilium/pkg/kvstore" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "identity-cache") -) - -// IdentityCache is a cache of identity to labels mapping -type IdentityCache map[identity.NumericIdentity]labels.LabelArray - -// IdentitiesModel is a wrapper so that we can implement the sort.Interface -// to sort the slice by ID -type IdentitiesModel []*models.Identity - -// Less returns true if the element in index `i` is lower than the element -// in index `j` -func (s IdentitiesModel) Less(i, j int) bool { - return s[i].ID < s[j].ID -} - -// FromIdentityCache populates the provided model from an identity cache. -func (s IdentitiesModel) FromIdentityCache(cache IdentityCache) IdentitiesModel { - for id, lbls := range cache { - s = append(s, identitymodel.CreateModel(&identity.Identity{ - ID: id, - Labels: lbls.Labels(), - })) - } - return s -} - -// GetIdentityCache returns a cache of all known identities -func (m *CachingIdentityAllocator) GetIdentityCache() IdentityCache { - log.Debug("getting identity cache for identity allocator manager") - cache := IdentityCache{} - - if m.isGlobalIdentityAllocatorInitialized() { - m.IdentityAllocator.ForeachCache(func(id idpool.ID, val allocator.AllocatorKey) { - if val != nil { - if gi, ok := val.(*key.GlobalIdentity); ok { - cache[identity.NumericIdentity(id)] = gi.LabelArray - } else { - log.Warningf("Ignoring unknown identity type '%s': %+v", - reflect.TypeOf(val), val) - } - } - }) - } - - identity.IterateReservedIdentities(func(ni identity.NumericIdentity, id *identity.Identity) { - cache[ni] = id.Labels.LabelArray() - }) - - for _, identity := range m.localIdentities.GetIdentities() { - cache[identity.ID] = identity.Labels.LabelArray() - } - for _, identity := range m.localNodeIdentities.GetIdentities() { - cache[identity.ID] = identity.Labels.LabelArray() - } - - return cache -} - -// GetIdentities returns all known identities -func (m *CachingIdentityAllocator) GetIdentities() IdentitiesModel { - identities := IdentitiesModel{} - - if m.isGlobalIdentityAllocatorInitialized() { - m.IdentityAllocator.ForeachCache(func(id idpool.ID, val allocator.AllocatorKey) { - if gi, ok := val.(*key.GlobalIdentity); ok { - identity := identity.NewIdentityFromLabelArray(identity.NumericIdentity(id), gi.LabelArray) - identities = append(identities, identitymodel.CreateModel(identity)) - } - - }) - } - identity.IterateReservedIdentities(func(ni identity.NumericIdentity, id *identity.Identity) { - identities = append(identities, identitymodel.CreateModel(id)) - }) - - for _, v := range m.localIdentities.GetIdentities() { - identities = append(identities, identitymodel.CreateModel(v)) - } - for _, v := range m.localNodeIdentities.GetIdentities() { - identities = append(identities, identitymodel.CreateModel(v)) - } - - return identities -} - -type identityWatcher struct { - owner IdentityAllocatorOwner -} - -// collectEvent records the 'event' as an added or deleted identity, -// and makes sure that any identity is present in only one of the sets -// (added or deleted). -func collectEvent(event allocator.AllocatorEvent, added, deleted IdentityCache) bool { - id := identity.NumericIdentity(event.ID) - // Only create events have the key - if event.Typ == kvstore.EventTypeCreate { - if gi, ok := event.Key.(*key.GlobalIdentity); ok { - // Un-delete the added ID if previously - // 'deleted' so that collected events can be - // processed in any order. - delete(deleted, id) - added[id] = gi.LabelArray - return true - } - log.Warningf("collectEvent: Ignoring unknown identity type '%s': %+v", - reflect.TypeOf(event.Key), event.Key) - return false - } - // Reverse an add when subsequently deleted - delete(added, id) - // record the id deleted even if an add was reversed, as the - // id may also have previously existed, in which case the - // result is not no-op! - deleted[id] = labels.LabelArray{} - - return true -} - -// watch starts the identity watcher -func (w *identityWatcher) watch(events allocator.AllocatorEventRecvChan) { - - go func() { - for { - added := IdentityCache{} - deleted := IdentityCache{} - First: - for { - event, ok := <-events - // Wait for one identity add or delete or stop - if !ok { - // 'events' was closed - return - } - // Collect first added and deleted labels - switch event.Typ { - case kvstore.EventTypeCreate, kvstore.EventTypeDelete: - if collectEvent(event, added, deleted) { - // First event collected - break First - } - default: - // Ignore modify events - } - } - - More: - for { - // see if there is more, but do not wait nor stop - select { - case event, ok := <-events: - if !ok { - // 'events' was closed - break More - } - // Collect more added and deleted labels - switch event.Typ { - case kvstore.EventTypeCreate, kvstore.EventTypeDelete: - collectEvent(event, added, deleted) - default: - // Ignore modify events - } - default: - // No more events available without blocking - break More - } - } - // Issue collected updates - w.owner.UpdateIdentities(added, deleted) // disjoint sets - } - }() -} - -// isGlobalIdentityAllocatorInitialized returns true if m.IdentityAllocator is not nil. -// Note: This does not mean that the identities have been synchronized, -// see WaitForInitialGlobalIdentities to wait for a fully populated cache. -func (m *CachingIdentityAllocator) isGlobalIdentityAllocatorInitialized() bool { - select { - case <-m.globalIdentityAllocatorInitialized: - return m.IdentityAllocator != nil - default: - return false - } -} - -// LookupIdentity looks up the identity by its labels but does not create it. -// This function will first search through the local cache, then the caches for -// remote kvstores and finally fall back to the main kvstore. -// May return nil for lookups if the allocator has not yet been synchronized. -func (m *CachingIdentityAllocator) LookupIdentity(ctx context.Context, lbls labels.Labels) *identity.Identity { - if reservedIdentity := identity.LookupReservedIdentityByLabels(lbls); reservedIdentity != nil { - return reservedIdentity - } - - switch identity.ScopeForLabels(lbls) { - case identity.IdentityScopeLocal: - return m.localIdentities.lookup(lbls) - case identity.IdentityScopeRemoteNode: - return m.localNodeIdentities.lookup(lbls) - } - - if !m.isGlobalIdentityAllocatorInitialized() { - return nil - } - - lblArray := lbls.LabelArray() - id, err := m.IdentityAllocator.GetIncludeRemoteCaches(ctx, &key.GlobalIdentity{LabelArray: lblArray}) - if err != nil { - return nil - } - if id > identity.MaxNumericIdentity { - return nil - } - - if id == idpool.NoID { - return nil - } - - return identity.NewIdentityFromLabelArray(identity.NumericIdentity(id), lblArray) -} - -var unknownIdentity = identity.NewIdentity(identity.IdentityUnknown, labels.Labels{labels.IDNameUnknown: labels.NewLabel(labels.IDNameUnknown, "", labels.LabelSourceReserved)}) - -// LookupIdentityByID returns the identity by ID. This function will first -// search through the local cache, then the caches for remote kvstores and -// finally fall back to the main kvstore -// May return nil for lookups if the allocator has not yet been synchronized. -func (m *CachingIdentityAllocator) LookupIdentityByID(ctx context.Context, id identity.NumericIdentity) *identity.Identity { - if id == identity.IdentityUnknown { - return unknownIdentity - } - - if identity := identity.LookupReservedIdentity(id); identity != nil { - return identity - } - - switch id.Scope() { - case identity.IdentityScopeLocal: - return m.localIdentities.lookupByID(id) - case identity.IdentityScopeRemoteNode: - return m.localNodeIdentities.lookupByID(id) - } - - if !m.isGlobalIdentityAllocatorInitialized() { - return nil - } - - allocatorKey, err := m.IdentityAllocator.GetByIDIncludeRemoteCaches(ctx, idpool.ID(id)) - if err != nil { - return nil - } - - if gi, ok := allocatorKey.(*key.GlobalIdentity); ok { - return identity.NewIdentityFromLabelArray(id, gi.LabelArray) - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/identity/cache/local.go b/vendor/github.com/cilium/cilium/pkg/identity/cache/local.go deleted file mode 100644 index 6a2a67919d3..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/cache/local.go +++ /dev/null @@ -1,265 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package cache - -import ( - "fmt" - - "github.com/cilium/cilium/pkg/allocator" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/identity/key" - "github.com/cilium/cilium/pkg/idpool" - "github.com/cilium/cilium/pkg/kvstore" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -type localIdentityCache struct { - mutex lock.RWMutex - identitiesByID map[identity.NumericIdentity]*identity.Identity - identitiesByLabels map[string]*identity.Identity - nextNumericIdentity identity.NumericIdentity - scope identity.NumericIdentity - minID identity.NumericIdentity - maxID identity.NumericIdentity - events allocator.AllocatorEventSendChan - - // withheldIdentities is a set of identities that should be considered unavailable for allocation, - // but not yet allocated. - // They are used during agent restart, where local identities are restored to prevent unnecessary - // ID flapping on restart. - // - // If an old nID is passed to lookupOrCreate(), then it is allowed to use a withhend entry here. Otherwise - // it must allocate a new ID not in this set. - withheldIdentities map[identity.NumericIdentity]struct{} -} - -func newLocalIdentityCache(scope, minID, maxID identity.NumericIdentity, events allocator.AllocatorEventSendChan) *localIdentityCache { - return &localIdentityCache{ - identitiesByID: map[identity.NumericIdentity]*identity.Identity{}, - identitiesByLabels: map[string]*identity.Identity{}, - nextNumericIdentity: minID, - scope: scope, - minID: minID, - maxID: maxID, - events: events, - withheldIdentities: map[identity.NumericIdentity]struct{}{}, - } -} - -func (l *localIdentityCache) bumpNextNumericIdentity() { - if l.nextNumericIdentity == l.maxID { - l.nextNumericIdentity = l.minID - } else { - l.nextNumericIdentity++ - } -} - -// getNextFreeNumericIdentity returns the next available numeric identity or an error -// If idCandidate has the local scope and is available, it will be returned instead of -// searching for a new numeric identity. -// The l.mutex must be held -func (l *localIdentityCache) getNextFreeNumericIdentity(idCandidate identity.NumericIdentity) (identity.NumericIdentity, error) { - // Try first with the given candidate - if idCandidate.Scope() == l.scope { - if _, taken := l.identitiesByID[idCandidate]; !taken { - // let nextNumericIdentity be, allocated identities will be skipped anyway - log.Debugf("Reallocated restored local identity: %d", idCandidate) - return idCandidate, nil - } else { - log.WithField(logfields.Identity, idCandidate).Debug("Requested local identity not available to allocate") - } - } - firstID := l.nextNumericIdentity - for { - idCandidate = l.nextNumericIdentity | l.scope - _, taken := l.identitiesByID[idCandidate] - _, withheld := l.withheldIdentities[idCandidate] - if !taken && !withheld { - l.bumpNextNumericIdentity() - return idCandidate, nil - } - - l.bumpNextNumericIdentity() - if l.nextNumericIdentity == firstID { - // Desperation: no local identities left (unlikely). If there are withheld - // but not-taken identities, claim one of them. - for withheldID := range l.withheldIdentities { - if _, taken := l.identitiesByID[withheldID]; !taken { - delete(l.withheldIdentities, withheldID) - log.WithField(logfields.Identity, withheldID).Warn("Local identity allocator full; claiming first withheld identity. This may cause momentary policy drops") - return withheldID, nil - } - } - - return 0, fmt.Errorf("out of local identity space") - } - } -} - -// lookupOrCreate searches for the existence of a local identity with the given -// labels. If it exists, the reference count is incremented and the identity is -// returned. If it does not exist, a new identity is created with a unique -// numeric identity. All identities returned by lookupOrCreate() must be -// released again via localIdentityCache.release(). -// A possible previously used numeric identity for these labels can be passed -// in as the 'oldNID' parameter; identity.InvalidIdentity must be passed if no -// previous numeric identity exists. 'oldNID' will be reallocated if available. -func (l *localIdentityCache) lookupOrCreate(lbls labels.Labels, oldNID identity.NumericIdentity, notifyOwner bool) (*identity.Identity, bool, error) { - // Not converting to string saves an allocation, as byte key lookups into - // string maps are optimized by the compiler, see - // https://github.com/golang/go/issues/3512. - repr := lbls.SortedList() - - l.mutex.Lock() - defer l.mutex.Unlock() - - if id, ok := l.identitiesByLabels[string(repr)]; ok { - id.ReferenceCount++ - return id, false, nil - } - - numericIdentity, err := l.getNextFreeNumericIdentity(oldNID) - if err != nil { - return nil, false, err - } - - id := &identity.Identity{ - ID: numericIdentity, - Labels: lbls, - LabelArray: lbls.LabelArray(), - ReferenceCount: 1, - } - - l.identitiesByLabels[string(repr)] = id - l.identitiesByID[numericIdentity] = id - - if l.events != nil && notifyOwner { - l.events <- allocator.AllocatorEvent{ - Typ: kvstore.EventTypeCreate, - ID: idpool.ID(id.ID), - Key: &key.GlobalIdentity{LabelArray: id.LabelArray}, - } - } - - return id, true, nil -} - -// release releases a local identity from the cache. true is returned when the -// last use of the identity has been released and the identity has been -// forgotten. -func (l *localIdentityCache) release(id *identity.Identity, notifyOwner bool) bool { - l.mutex.Lock() - defer l.mutex.Unlock() - - if id, ok := l.identitiesByID[id.ID]; ok { - switch { - case id.ReferenceCount > 1: - id.ReferenceCount-- - return false - - case id.ReferenceCount == 1: - // Release is only attempted once, when the reference count is - // hitting the last use - delete(l.identitiesByLabels, string(id.Labels.SortedList())) - delete(l.identitiesByID, id.ID) - - if l.events != nil && notifyOwner { - l.events <- allocator.AllocatorEvent{ - Typ: kvstore.EventTypeDelete, - ID: idpool.ID(id.ID), - } - } - - return true - } - } - - return false -} - -// withhold marks the nids as unavailable. Any out-of-scope identities are returned. -func (l *localIdentityCache) withhold(nids []identity.NumericIdentity) []identity.NumericIdentity { - if len(nids) == 0 { - return nil - } - - unused := make([]identity.NumericIdentity, 0, len(nids)) - l.mutex.Lock() - defer l.mutex.Unlock() - for _, nid := range nids { - if nid.Scope() != l.scope { - unused = append(unused, nid) - continue - } - l.withheldIdentities[nid] = struct{}{} - } - - return unused -} - -func (l *localIdentityCache) unwithhold(nids []identity.NumericIdentity) { - if len(nids) == 0 { - return - } - l.mutex.Lock() - defer l.mutex.Unlock() - for _, nid := range nids { - if nid.Scope() != l.scope { - continue - } - delete(l.withheldIdentities, nid) - } -} - -// lookup searches for a local identity matching the given labels and returns -// it. If found, the reference count is NOT incremented and thus release must -// NOT be called. -func (l *localIdentityCache) lookup(lbls labels.Labels) *identity.Identity { - l.mutex.RLock() - defer l.mutex.RUnlock() - - if id, ok := l.identitiesByLabels[string(lbls.SortedList())]; ok { - return id - } - - return nil -} - -// lookupByID searches for a local identity matching the given ID and returns -// it. If found, the reference count is NOT incremented and thus release must -// NOT be called. -func (l *localIdentityCache) lookupByID(id identity.NumericIdentity) *identity.Identity { - l.mutex.RLock() - defer l.mutex.RUnlock() - - if id, ok := l.identitiesByID[id]; ok { - return id - } - - return nil -} - -// GetIdentities returns all local identities -func (l *localIdentityCache) GetIdentities() map[identity.NumericIdentity]*identity.Identity { - cache := map[identity.NumericIdentity]*identity.Identity{} - - l.mutex.RLock() - defer l.mutex.RUnlock() - - for key, id := range l.identitiesByID { - cache[key] = id - } - - return cache -} - -// close removes the events channel. -func (l *localIdentityCache) close() { - l.mutex.Lock() - defer l.mutex.Unlock() - - l.events = nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/identity/doc.go b/vendor/github.com/cilium/cilium/pkg/identity/doc.go deleted file mode 100644 index 9463d59345a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package identity contains code for managing security identities in Cilium. -// +groupName=pkg -package identity diff --git a/vendor/github.com/cilium/cilium/pkg/identity/identity.go b/vendor/github.com/cilium/cilium/pkg/identity/identity.go deleted file mode 100644 index 9f45d5154ab..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/identity.go +++ /dev/null @@ -1,310 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package identity - -import ( - "encoding/json" - "net" - "strconv" - - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/option" -) - -const ( - NodeLocalIdentityType = "node_local" - ReservedIdentityType = "reserved" - ClusterLocalIdentityType = "cluster_local" - WellKnownIdentityType = "well_known" - RemoteNodeIdentityType = "remote_node" -) - -// Identity is the representation of the security context for a particular set of -// labels. -type Identity struct { - // Identity's ID. - ID NumericIdentity `json:"id"` - // Set of labels that belong to this Identity. - Labels labels.Labels `json:"labels"` - - // LabelArray contains the same labels as Labels in a form of a list, used - // for faster lookup. - LabelArray labels.LabelArray `json:"-"` - - // CIDRLabel is the primary identity label when the identity represents - // a CIDR. The Labels field will consist of all matching prefixes, e.g. - // 10.0.0.0/8 - // 10.0.0.0/7 - // 10.0.0.0/6 - // [...] - // reserved:world - // - // The CIDRLabel field will only contain 10.0.0.0/8 - CIDRLabel labels.Labels `json:"-"` - - // ReferenceCount counts the number of references pointing to this - // identity. This field is used by the owning cache of the identity. - ReferenceCount int `json:"-"` -} - -// IPIdentityPair is a pairing of an IP and the security identity to which that -// IP corresponds. May include an optional Mask which, if present, denotes that -// the IP represents a CIDR with the specified Mask. -// -// WARNING - STABLE API -// This structure is written as JSON to the key-value store. Do NOT modify this -// structure in ways which are not JSON forward compatible. -type IPIdentityPair struct { - IP net.IP `json:"IP"` - Mask net.IPMask `json:"Mask"` - HostIP net.IP `json:"HostIP"` - ID NumericIdentity `json:"ID"` - Key uint8 `json:"Key"` - Metadata string `json:"Metadata"` - K8sNamespace string `json:"K8sNamespace,omitempty"` - K8sPodName string `json:"K8sPodName,omitempty"` - NamedPorts []NamedPort `json:"NamedPorts,omitempty"` -} - -// GetKeyName returns the kvstore key to be used for the IPIdentityPair -func (pair *IPIdentityPair) GetKeyName() string { return pair.PrefixString() } - -// Marshal returns the IPIdentityPair object as JSON byte slice -func (pair *IPIdentityPair) Marshal() ([]byte, error) { return json.Marshal(pair) } - -// Unmarshal parses the JSON byte slice and updates the IPIdentityPair receiver -func (pair *IPIdentityPair) Unmarshal(_ string, data []byte) error { - newPair := IPIdentityPair{} - if err := json.Unmarshal(data, &newPair); err != nil { - return err - } - - *pair = newPair - return nil -} - -// NamedPort is a mapping from a port name to a port number and protocol. -// -// WARNING - STABLE API -// This structure is written as JSON to the key-value store. Do NOT modify this -// structure in ways which are not JSON forward compatible. -type NamedPort struct { - Name string `json:"Name"` - Port uint16 `json:"Port"` - Protocol string `json:"Protocol"` -} - -// Sanitize takes a partially initialized Identity (for example, deserialized -// from json) and reconstitutes the full object from what has been restored. -func (id *Identity) Sanitize() { - if id.Labels != nil { - id.LabelArray = id.Labels.LabelArray() - } -} - -// StringID returns the identity identifier as string -func (id *Identity) StringID() string { - return id.ID.StringID() -} - -// StringID returns the identity identifier as string -func (id *Identity) String() string { - return id.ID.StringID() -} - -// IsReserved returns whether the identity represents a reserved identity -// (true), or not (false). -func (id *Identity) IsReserved() bool { - return LookupReservedIdentity(id.ID) != nil -} - -// IsFixed returns whether the identity represents a fixed identity -// (true), or not (false). -func (id *Identity) IsFixed() bool { - return LookupReservedIdentity(id.ID) != nil && - (id.ID == ReservedIdentityHost || id.ID == ReservedIdentityHealth || - IsUserReservedIdentity(id.ID)) -} - -// IsWellKnown returns whether the identity represents a well known identity -// (true), or not (false). -func (id *Identity) IsWellKnown() bool { - return WellKnown.lookupByNumericIdentity(id.ID) != nil -} - -// IsWellKnownIdentity returns true if the identity represents a well-known -// identity, false otherwise. -func IsWellKnownIdentity(id NumericIdentity) bool { - return WellKnown.lookupByNumericIdentity(id) != nil -} - -// NewIdentityFromLabelArray creates a new identity -func NewIdentityFromLabelArray(id NumericIdentity, lblArray labels.LabelArray) *Identity { - var lbls labels.Labels - - if lblArray != nil { - lbls = lblArray.Labels() - } - return &Identity{ID: id, Labels: lbls, LabelArray: lblArray} -} - -// NewIdentity creates a new identity -func NewIdentity(id NumericIdentity, lbls labels.Labels) *Identity { - var lblArray labels.LabelArray - - if lbls != nil { - lblArray = lbls.LabelArray() - } - return &Identity{ID: id, Labels: lbls, LabelArray: lblArray} -} - -// IsHost determines whether the IP in the pair represents a host (true) or a -// CIDR prefix (false) -func (pair *IPIdentityPair) IsHost() bool { - return pair.Mask == nil -} - -// PrefixString returns the IPIdentityPair's IP as either a host IP in the -// format w.x.y.z if 'host' is true, or as a prefix in the format the w.x.y.z/N -// if 'host' is false. -func (pair *IPIdentityPair) PrefixString() string { - ipstr := pair.IP.String() - - if pair.IsHost() { - return ipstr - } - - ones, _ := pair.Mask.Size() - return ipstr + "/" + strconv.Itoa(ones) -} - -// RequiresGlobalIdentity returns true if the label combination requires a -// global identity -func RequiresGlobalIdentity(lbls labels.Labels) bool { - return ScopeForLabels(lbls) == IdentityScopeGlobal -} - -// ScopeForLabels returns the identity scope to be used for the label set. -// If all labels are either CIDR or reserved, then returns the CIDR scope. -// Note: This assumes the caller has already called LookupReservedIdentityByLabels; -// it does not handle that case. -func ScopeForLabels(lbls labels.Labels) NumericIdentity { - scope := IdentityScopeGlobal - - // If this is a remote node, return the remote node scope. - // Note that this is not reachable when policy-cidr-selects-nodes is false, since - // callers will already have gotten a value from LookupReservedIdentityByLabels. - if lbls.Has(labels.LabelRemoteNode[labels.IDNameRemoteNode]) { - return IdentityScopeRemoteNode - } - - for _, label := range lbls { - switch label.Source { - case labels.LabelSourceCIDR, labels.LabelSourceReserved: - scope = IdentityScopeLocal - default: - return IdentityScopeGlobal - } - } - - return scope -} - -// AddUserDefinedNumericIdentitySet adds all key-value pairs from the given map -// to the map of user defined numeric identities and reserved identities. -// The key-value pairs should map a numeric identity to a valid label. -// Is not safe for concurrent use. -func AddUserDefinedNumericIdentitySet(m map[string]string) error { - // Validate first - for k := range m { - ni, err := ParseNumericIdentity(k) - if err != nil { - return err - } - if !IsUserReservedIdentity(ni) { - return ErrNotUserIdentity - } - } - for k, lbl := range m { - ni, _ := ParseNumericIdentity(k) - AddUserDefinedNumericIdentity(ni, lbl) - AddReservedIdentity(ni, lbl) - } - return nil -} - -// LookupReservedIdentityByLabels looks up a reserved identity by its labels and -// returns it if found. Returns nil if not found. -func LookupReservedIdentityByLabels(lbls labels.Labels) *Identity { - if identity := WellKnown.LookupByLabels(lbls); identity != nil { - return identity - } - - // Check if a fixed identity exists. - if lbl, exists := lbls[labels.LabelKeyFixedIdentity]; exists { - // If the set of labels contain a fixed identity then and exists in - // the map of reserved IDs then return the identity of that reserved ID. - id := GetReservedID(lbl.Value) - if id != IdentityUnknown && IsUserReservedIdentity(id) { - return LookupReservedIdentity(id) - } - // If a fixed identity was not found then we return nil to avoid - // falling to a reserved identity. - return nil - } - - // If there is no reserved label, return nil. - if !lbls.IsReserved() { - return nil - } - - var nid NumericIdentity - if lbls.Has(labels.LabelHost[labels.IDNameHost]) { - nid = ReservedIdentityHost - } else if lbls.Has(labels.LabelRemoteNode[labels.IDNameRemoteNode]) { - // If selecting remote-nodes via CIDR policies is allowed, then - // they no longer have a reserved identity. - if option.Config.PolicyCIDRMatchesNodes() { - return nil - } - nid = ReservedIdentityRemoteNode - if lbls.Has(labels.LabelKubeAPIServer[labels.IDNameKubeAPIServer]) { - // If there's a kube-apiserver label, then we know this is - // kube-apiserver reserved ID, so change it as such. - // Only traffic from non-kube-apiserver nodes should be - // considered as remote-node. - nid = ReservedIdentityKubeAPIServer - } - } - - if nid != IdentityUnknown { - return NewIdentity(nid, lbls) - } - - // We have handled all the cases where multiple labels can be present. - // So, we make sure the set of labels only contains a single label and - // that label is of the reserved type. This is to prevent users from - // adding cilium-reserved labels into the workloads. - if len(lbls) != 1 { - return nil - } - - nid = GetReservedID(lbls.ToSlice()[0].Key) - if nid != IdentityUnknown && !IsUserReservedIdentity(nid) { - return LookupReservedIdentity(nid) - } - return nil -} - -// IdentityAllocationIsLocal returns true if a call to AllocateIdentity with -// the given labels would not require accessing the KV store to allocate the -// identity. -// Currently, this function returns true only if the labels are those of a -// reserved identity, i.e. if the slice contains a single reserved -// "reserved:*" label. -func IdentityAllocationIsLocal(lbls labels.Labels) bool { - // If there is only one label with the "reserved" source and a well-known - // key, the well-known identity for it can be allocated locally. - return LookupReservedIdentityByLabels(lbls) != nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/doc.go b/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/doc.go deleted file mode 100644 index fbf1b56faec..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package identitymanager tracks which global identities are being used by -// the currently running cilium-agent -package identitymanager diff --git a/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/log.go b/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/log.go deleted file mode 100644 index b038e68ce13..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/log.go +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package identitymanager - -import ( - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "identitymanager") -) diff --git a/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/manager.go b/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/manager.go deleted file mode 100644 index 81766a099b8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/manager.go +++ /dev/null @@ -1,216 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package identitymanager - -import ( - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/identity/model" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var ( - // GlobalIdentityManager is a singleton instance of an IdentityManager, used - // for easy updating / tracking lifecycles of identities on the local node - // without having to pass around a specific instance of an IdentityManager - // throughout Cilium. - GlobalIdentityManager = NewIdentityManager() -) - -// IdentityManager caches information about a set of identities, currently a -// reference count of how many users there are for each identity. -type IdentityManager struct { - mutex lock.RWMutex - identities map[identity.NumericIdentity]*identityMetadata - observers map[Observer]struct{} -} - -type identityMetadata struct { - identity *identity.Identity - refCount uint -} - -// NewIdentityManager returns an initialized IdentityManager. -func NewIdentityManager() *IdentityManager { - return &IdentityManager{ - identities: make(map[identity.NumericIdentity]*identityMetadata), - observers: make(map[Observer]struct{}), - } -} - -// Add inserts the identity into the GlobalIdentityManager. -func Add(identity *identity.Identity) { - GlobalIdentityManager.Add(identity) -} - -// Remove deletes the identity from the GlobalIdentityManager. -func Remove(identity *identity.Identity) { - GlobalIdentityManager.Remove(identity) -} - -// RemoveAll deletes all identities from the GlobalIdentityManager. -func RemoveAll() { - GlobalIdentityManager.RemoveAll() -} - -// Add inserts the identity into the identity manager. If the identity is -// already in the identity manager, the reference count for the identity is -// incremented. -func (idm *IdentityManager) Add(identity *identity.Identity) { - log.WithFields(logrus.Fields{ - logfields.Identity: identity, - }).Debug("Adding identity to the identity manager") - - idm.mutex.Lock() - defer idm.mutex.Unlock() - idm.add(identity) -} - -func (idm *IdentityManager) add(identity *identity.Identity) { - - if identity == nil { - return - } - - idMeta, exists := idm.identities[identity.ID] - if !exists { - idm.identities[identity.ID] = &identityMetadata{ - identity: identity, - refCount: 1, - } - for o := range idm.observers { - o.LocalEndpointIdentityAdded(identity) - } - - } else { - idMeta.refCount++ - } -} - -// RemoveOldAddNew removes old from the identity manager and inserts new -// into the IdentityManager. -// Caller must have previously added the old identity with Add(). -// This is a no-op if both identities have the same numeric ID. -func (idm *IdentityManager) RemoveOldAddNew(old, new *identity.Identity) { - idm.mutex.Lock() - defer idm.mutex.Unlock() - - if old == nil && new == nil { - return - } - // The host endpoint will always retain its reserved ID, but its labels may - // change so we need to update its identity. - if old != nil && new != nil && old.ID == new.ID && new.ID != identity.ReservedIdentityHost { - return - } - - log.WithFields(logrus.Fields{ - "old": old, - "new": new, - }).Debug("removing old and adding new identity") - - idm.remove(old) - idm.add(new) -} - -// RemoveOldAddNew removes old from and inserts new into the -// GlobalIdentityManager. -func RemoveOldAddNew(old, new *identity.Identity) { - GlobalIdentityManager.RemoveOldAddNew(old, new) -} - -// RemoveAll removes all identities. -func (idm *IdentityManager) RemoveAll() { - idm.mutex.Lock() - defer idm.mutex.Unlock() - - for id := range idm.identities { - idm.remove(idm.identities[id].identity) - } -} - -// Remove deletes the identity from the identity manager. If the identity is -// already in the identity manager, the reference count for the identity is -// decremented. If the identity is not in the cache, this is a no-op. If the -// ref count becomes zero, the identity is removed from the cache. -func (idm *IdentityManager) Remove(identity *identity.Identity) { - log.WithFields(logrus.Fields{ - logfields.Identity: identity, - }).Debug("Removing identity from the identity manager") - - idm.mutex.Lock() - defer idm.mutex.Unlock() - idm.remove(identity) -} - -func (idm *IdentityManager) remove(identity *identity.Identity) { - - if identity == nil { - return - } - - idMeta, exists := idm.identities[identity.ID] - if !exists { - log.WithFields(logrus.Fields{ - logfields.Identity: identity, - }).Error("removing identity not added to the identity manager!") - return - } - idMeta.refCount-- - if idMeta.refCount == 0 { - delete(idm.identities, identity.ID) - for o := range idm.observers { - o.LocalEndpointIdentityRemoved(identity) - } - } - -} - -// GetIdentityModels returns the API representation of the IdentityManager. -func (idm *IdentityManager) GetIdentityModels() []*models.IdentityEndpoints { - idm.mutex.RLock() - defer idm.mutex.RUnlock() - - identities := make([]*models.IdentityEndpoints, 0, len(idm.identities)) - - for _, v := range idm.identities { - identities = append(identities, &models.IdentityEndpoints{ - Identity: model.CreateModel(v.identity), - RefCount: int64(v.refCount), - }) - } - - return identities -} - -func (idm *IdentityManager) subscribe(o Observer) { - idm.mutex.Lock() - defer idm.mutex.Unlock() - idm.observers[o] = struct{}{} -} - -// GetIdentityModels returns the API model of all identities in the -// GlobalIdentityManager. -func GetIdentityModels() []*models.IdentityEndpoints { - return GlobalIdentityManager.GetIdentityModels() -} - -// IdentitiesModel is a wrapper so that we can implement the sort.Interface -// to sort the slice by ID -type IdentitiesModel []*models.IdentityEndpoints - -// Less returns true if the element in index `i` is lower than the element -// in index `j` -func (s IdentitiesModel) Less(i, j int) bool { - return s[i].Identity.ID < s[j].Identity.ID -} - -// Subscribe adds the specified Observer to the global identity manager, to be -// notified upon changes to local identity usage. -func Subscribe(o Observer) { - GlobalIdentityManager.subscribe(o) -} diff --git a/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/observer.go b/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/observer.go deleted file mode 100644 index c5eacc078cc..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/identitymanager/observer.go +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package identitymanager - -import ( - "github.com/cilium/cilium/pkg/identity" -) - -// Observer can sign up to receive events whenever local identities are removed. -type Observer interface { - // LocalEndpointIdentityAdded is called when an identity first becomes - // used on the node. Implementations must ensure that the callback - // returns within a reasonable period. - LocalEndpointIdentityAdded(*identity.Identity) - - // LocalEndpointIdentityRemoved is called when an identity is no longer - // in use on the node. Implementations must ensure that the callback - // returns within a reasonable period. - LocalEndpointIdentityRemoved(*identity.Identity) -} diff --git a/vendor/github.com/cilium/cilium/pkg/identity/key/global_identity.go b/vendor/github.com/cilium/cilium/pkg/identity/key/global_identity.go deleted file mode 100644 index 96582a5d4f5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/key/global_identity.go +++ /dev/null @@ -1,72 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package key - -import ( - "maps" - "strings" - - "github.com/cilium/cilium/pkg/allocator" - "github.com/cilium/cilium/pkg/labels" -) - -const ( - // MetadataKeyBackendKey is the key used to store the backend key. - MetadataKeyBackendKey = iota -) - -// GlobalIdentity is the structure used to store an identity -type GlobalIdentity struct { - labels.LabelArray - - // metadata contains metadata that are stored for example by the backends. - metadata map[any]any -} - -// GetKey encodes an Identity as string -func (gi *GlobalIdentity) GetKey() string { - var str strings.Builder - for _, l := range gi.LabelArray { - str.Write(l.FormatForKVStore()) - } - return str.String() -} - -// GetAsMap encodes a GlobalIdentity a map of keys to values. The keys will -// include a source delimted by a ':'. This output is pareable by PutKeyFromMap. -func (gi *GlobalIdentity) GetAsMap() map[string]string { - return gi.StringMap() -} - -// PutKey decodes an Identity from its string representation -func (gi *GlobalIdentity) PutKey(v string) allocator.AllocatorKey { - return &GlobalIdentity{LabelArray: labels.NewLabelArrayFromSortedList(v)} -} - -// PutKeyFromMap decodes an Identity from a map of key to value. Output -// from GetAsMap can be parsed. -// Note: NewLabelArrayFromMap will parse the ':' separated label source from -// the keys because the source parameter is "" -func (gi *GlobalIdentity) PutKeyFromMap(v map[string]string) allocator.AllocatorKey { - return &GlobalIdentity{LabelArray: labels.Map2Labels(v, "").LabelArray()} -} - -// PutValue puts metadata inside the global identity for the given 'key' with -// the given 'value'. -func (gi *GlobalIdentity) PutValue(key, value any) allocator.AllocatorKey { - newMap := map[any]any{} - if gi.metadata != nil { - newMap = maps.Clone(gi.metadata) - } - newMap[key] = value - return &GlobalIdentity{ - LabelArray: gi.LabelArray, - metadata: newMap, - } -} - -// Value returns the value stored in the metadata map. -func (gi *GlobalIdentity) Value(key any) any { - return gi.metadata[key] -} diff --git a/vendor/github.com/cilium/cilium/pkg/identity/model/identity.go b/vendor/github.com/cilium/cilium/pkg/identity/model/identity.go deleted file mode 100644 index 4b99df3aaa3..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/model/identity.go +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package model - -import ( - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/labels" -) - -func NewIdentityFromModel(base *models.Identity) *identity.Identity { - if base == nil { - return nil - } - - id := &identity.Identity{ - ID: identity.NumericIdentity(base.ID), - Labels: make(labels.Labels, len(base.Labels)), - } - for _, v := range base.Labels { - lbl := labels.ParseLabel(v) - id.Labels[lbl.Key] = lbl - } - id.Sanitize() - - return id -} - -func CreateModel(id *identity.Identity) *models.Identity { - if id == nil { - return nil - } - - ret := &models.Identity{ - ID: int64(id.ID), - Labels: make([]string, 0, len(id.Labels)), - } - - for _, v := range id.Labels { - ret.Labels = append(ret.Labels, v.String()) - } - return ret -} diff --git a/vendor/github.com/cilium/cilium/pkg/identity/numericidentity.go b/vendor/github.com/cilium/cilium/pkg/identity/numericidentity.go deleted file mode 100644 index ff6ca48b2bc..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/numericidentity.go +++ /dev/null @@ -1,668 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package identity - -import ( - "errors" - "fmt" - "math" - "net/netip" - "sort" - "strconv" - "sync" - "unsafe" - - cmtypes "github.com/cilium/cilium/pkg/clustermesh/types" - api "github.com/cilium/cilium/pkg/k8s/apis/cilium.io" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/option" -) - -const ( - // Identities also have scopes, which is defined by the high 8 bits. - // 0x00 -- Global and reserved identities. Reserved identities are - // not allocated like global identities, but are known - // because they are hardcoded in Cilium. Older versions of - // Cilium will not be aware of any "new" reserved identities - // that are added. - // 0x01 -- local (CIDR) identities - // 0x02 -- remote nodes - - // IdentityScopeMask is the top 8 bits of the 32 bit identity - IdentityScopeMask = NumericIdentity(0xFF_00_00_00) - - // IdentityScopeGlobal is the identity scope used by global and reserved identities. - IdentityScopeGlobal = NumericIdentity(0) - - // IdentityScopeLocal is the tag in the numeric identity that identifies - // a numeric identity to have local (CIDR) scope. - IdentityScopeLocal = NumericIdentity(1 << 24) - - // IdentityScopeRemoteNode is the tag in the numeric identity that identifies - // an identity to be a remote in-cluster node. - IdentityScopeRemoteNode = NumericIdentity(2 << 24) - - // MinAllocatorLocalIdentity represents the minimal numeric identity - // that the localIdentityCache allocator can allocate for a local (CIDR) - // identity. - // - // Note that this does not represents the minimal value for a local - // identity, as the allocated ID will then be bitwise OR'ed with - // LocalIdentityFlag. - MinAllocatorLocalIdentity = 1 - - // MinLocalIdentity represents the actual minimal numeric identity value - // for a local (CIDR) identity. - MinLocalIdentity = MinAllocatorLocalIdentity | IdentityScopeLocal - - // MaxAllocatorLocalIdentity represents the maximal numeric identity - // that the localIdentityCache allocator can allocate for a local (CIDR) - // identity. - // - // Note that this does not represents the maximal value for a local - // identity, as the allocated ID will then be bitwise OR'ed with - // LocalIdentityFlag. - MaxAllocatorLocalIdentity = 0xFFFFFF - - // MaxLocalIdentity represents the actual maximal numeric identity value - // for a local (CIDR) identity. - MaxLocalIdentity = MaxAllocatorLocalIdentity | IdentityScopeLocal - - // MinimalNumericIdentity represents the minimal numeric identity not - // used for reserved purposes. - MinimalNumericIdentity = NumericIdentity(256) - - // UserReservedNumericIdentity represents the minimal numeric identity that - // can be used by users for reserved purposes. - UserReservedNumericIdentity = NumericIdentity(128) - - // InvalidIdentity is the identity assigned if the identity is invalid - // or not determined yet - InvalidIdentity = NumericIdentity(0) -) - -var ( - // clusterIDInit ensures that clusterIDLen and clusterIDShift can only be - // set once, and only if we haven't used either value elsewhere already. - clusterIDInit sync.Once - - // clusterIDShift is the number of bits to shift a cluster ID in a numeric - // identity and is equal to the number of bits that represent a cluster-local identity. - clusterIDShift uint32 -) - -const ( - // IdentityUnknown represents an unknown identity - IdentityUnknown NumericIdentity = iota - - // ReservedIdentityHost represents the local host - ReservedIdentityHost - - // ReservedIdentityWorld represents any endpoint outside of the cluster - ReservedIdentityWorld - - // ReservedIdentityUnmanaged represents unmanaged endpoints. - ReservedIdentityUnmanaged - - // ReservedIdentityHealth represents the local cilium-health endpoint - ReservedIdentityHealth - - // ReservedIdentityInit is the identity given to endpoints that have not - // received any labels yet. - ReservedIdentityInit - - // ReservedIdentityRemoteNode is the identity given to all nodes in - // local and remote clusters except for the local node. - ReservedIdentityRemoteNode - - // ReservedIdentityKubeAPIServer is the identity given to remote node(s) which - // have backend(s) serving the kube-apiserver running. - ReservedIdentityKubeAPIServer - - // ReservedIdentityIngress is the identity given to the IP used as the source - // address for connections from Ingress proxies. - ReservedIdentityIngress - - // ReservedIdentityWorldIPv4 represents any endpoint outside of the cluster - // for IPv4 address only. - ReservedIdentityWorldIPv4 - - // ReservedIdentityWorldIPv6 represents any endpoint outside of the cluster - // for IPv6 address only. - ReservedIdentityWorldIPv6 -) - -// Special identities for well-known cluster components -// Each component has two identities. The first one is used for Kubernetes <1.21 -// or when the NamespaceDefaultLabelName feature gate is disabled. The second -// one is used for Kubernetes >= 1.21 and when the NamespaceDefaultLabelName is -// enabled. -const ( - // ReservedETCDOperator is the reserved identity used for the etcd-operator - // managed by Cilium. - ReservedETCDOperator NumericIdentity = iota + 100 - - // ReservedCiliumKVStore is the reserved identity used for the kvstore - // managed by Cilium (etcd-operator). - ReservedCiliumKVStore - - // ReservedKubeDNS is the reserved identity used for kube-dns. - ReservedKubeDNS - - // ReservedEKSKubeDNS is the reserved identity used for kube-dns on EKS - ReservedEKSKubeDNS - - // ReservedCoreDNS is the reserved identity used for CoreDNS - ReservedCoreDNS - - // ReservedCiliumOperator is the reserved identity used for the Cilium operator - ReservedCiliumOperator - - // ReservedEKSCoreDNS is the reserved identity used for CoreDNS on EKS - ReservedEKSCoreDNS - - // ReservedCiliumEtcdOperator is the reserved identity used for the Cilium etcd operator - ReservedCiliumEtcdOperator - - // Second identities for all above components - ReservedETCDOperator2 - ReservedCiliumKVStore2 - ReservedKubeDNS2 - ReservedEKSKubeDNS2 - ReservedCoreDNS2 - ReservedCiliumOperator2 - ReservedEKSCoreDNS2 - ReservedCiliumEtcdOperator2 -) - -// localNodeIdentity is the endpoint identity allocated for the local node -var localNodeIdentity = struct { - lock.Mutex - identity NumericIdentity -}{ - identity: ReservedIdentityRemoteNode, -} - -type wellKnownIdentities map[NumericIdentity]wellKnownIdentity - -// wellKnownIdentitity is an identity for well-known security labels for which -// a well-known numeric identity is reserved to avoid requiring a cluster wide -// setup. Examples of this include kube-dns and the etcd-operator. -type wellKnownIdentity struct { - identity *Identity - labelArray labels.LabelArray -} - -func (w wellKnownIdentities) add(i NumericIdentity, lbls []string) { - labelMap := labels.NewLabelsFromModel(lbls) - identity := NewIdentity(i, labelMap) - w[i] = wellKnownIdentity{ - identity: NewIdentity(i, labelMap), - labelArray: labelMap.LabelArray(), - } - - cacheMU.Lock() - reservedIdentityCache[i] = identity - cacheMU.Unlock() -} - -func (w wellKnownIdentities) LookupByLabels(lbls labels.Labels) *Identity { - for _, i := range w { - if lbls.Equals(i.identity.Labels) { - return i.identity - } - } - - return nil -} - -func (w wellKnownIdentities) lookupByNumericIdentity(identity NumericIdentity) *Identity { - wki, ok := w[identity] - if !ok { - return nil - } - return wki.identity -} - -type Configuration interface { - CiliumNamespaceName() string -} - -func k8sLabel(key string, value string) string { - return "k8s:" + key + "=" + value -} - -// InitWellKnownIdentities establishes all well-known identities. Returns the -// number of well-known identities initialized. -func InitWellKnownIdentities(c Configuration, cinfo cmtypes.ClusterInfo) int { - // etcd-operator labels - // k8s:io.cilium.k8s.policy.serviceaccount=cilium-etcd-sa - // k8s:io.kubernetes.pod.namespace= - // k8s:io.cilium/app=etcd-operator - // k8s:io.cilium.k8s.policy.cluster=default - etcdOperatorLabels := []string{ - "k8s:io.cilium/app=etcd-operator", - k8sLabel(api.PodNamespaceLabel, c.CiliumNamespaceName()), - k8sLabel(api.PolicyLabelServiceAccount, "cilium-etcd-sa"), - k8sLabel(api.PolicyLabelCluster, cinfo.Name), - } - WellKnown.add(ReservedETCDOperator, etcdOperatorLabels) - WellKnown.add(ReservedETCDOperator2, append(etcdOperatorLabels, - k8sLabel(api.PodNamespaceMetaNameLabel, c.CiliumNamespaceName()))) - - // cilium-etcd labels - // k8s:app=etcd - // k8s:io.cilium/app=etcd-operator - // k8s:etcd_cluster=cilium-etcd - // k8s:io.cilium.k8s.policy.serviceaccount=default - // k8s:io.kubernetes.pod.namespace= - // k8s:io.cilium.k8s.policy.cluster=default - // these 2 labels are ignored by cilium-agent as they can change over time - // container:annotation.etcd.version=3.3.9 - // k8s:etcd_node=cilium-etcd-6snk6vsjcm - ciliumEtcdLabels := []string{ - "k8s:app=etcd", - "k8s:etcd_cluster=cilium-etcd", - "k8s:io.cilium/app=etcd-operator", - k8sLabel(api.PodNamespaceLabel, c.CiliumNamespaceName()), - k8sLabel(api.PolicyLabelServiceAccount, "default"), - k8sLabel(api.PolicyLabelCluster, cinfo.Name), - } - WellKnown.add(ReservedCiliumKVStore, ciliumEtcdLabels) - WellKnown.add(ReservedCiliumKVStore2, append(ciliumEtcdLabels, - k8sLabel(api.PodNamespaceMetaNameLabel, c.CiliumNamespaceName()))) - - // kube-dns labels - // k8s:io.cilium.k8s.policy.serviceaccount=kube-dns - // k8s:io.kubernetes.pod.namespace=kube-system - // k8s:k8s-app=kube-dns - // k8s:io.cilium.k8s.policy.cluster=default - kubeDNSLabels := []string{ - "k8s:k8s-app=kube-dns", - k8sLabel(api.PodNamespaceLabel, "kube-system"), - k8sLabel(api.PolicyLabelServiceAccount, "kube-dns"), - k8sLabel(api.PolicyLabelCluster, cinfo.Name), - } - WellKnown.add(ReservedKubeDNS, kubeDNSLabels) - WellKnown.add(ReservedKubeDNS2, append(kubeDNSLabels, - k8sLabel(api.PodNamespaceMetaNameLabel, "kube-system"))) - - // kube-dns EKS labels - // k8s:io.cilium.k8s.policy.serviceaccount=kube-dns - // k8s:io.kubernetes.pod.namespace=kube-system - // k8s:k8s-app=kube-dns - // k8s:io.cilium.k8s.policy.cluster=default - // k8s:eks.amazonaws.com/component=kube-dns - eksKubeDNSLabels := []string{ - "k8s:k8s-app=kube-dns", - "k8s:eks.amazonaws.com/component=kube-dns", - k8sLabel(api.PodNamespaceLabel, "kube-system"), - k8sLabel(api.PolicyLabelServiceAccount, "kube-dns"), - k8sLabel(api.PolicyLabelCluster, cinfo.Name), - } - WellKnown.add(ReservedEKSKubeDNS, eksKubeDNSLabels) - WellKnown.add(ReservedEKSKubeDNS2, append(eksKubeDNSLabels, - k8sLabel(api.PodNamespaceMetaNameLabel, "kube-system"))) - - // CoreDNS EKS labels - // k8s:io.cilium.k8s.policy.serviceaccount=coredns - // k8s:io.kubernetes.pod.namespace=kube-system - // k8s:k8s-app=kube-dns - // k8s:io.cilium.k8s.policy.cluster=default - // k8s:eks.amazonaws.com/component=coredns - eksCoreDNSLabels := []string{ - "k8s:k8s-app=kube-dns", - "k8s:eks.amazonaws.com/component=coredns", - k8sLabel(api.PodNamespaceLabel, "kube-system"), - k8sLabel(api.PolicyLabelServiceAccount, "coredns"), - k8sLabel(api.PolicyLabelCluster, cinfo.Name), - } - WellKnown.add(ReservedEKSCoreDNS, eksCoreDNSLabels) - WellKnown.add(ReservedEKSCoreDNS2, append(eksCoreDNSLabels, - k8sLabel(api.PodNamespaceMetaNameLabel, "kube-system"))) - - // CoreDNS labels - // k8s:io.cilium.k8s.policy.serviceaccount=coredns - // k8s:io.kubernetes.pod.namespace=kube-system - // k8s:k8s-app=kube-dns - // k8s:io.cilium.k8s.policy.cluster=default - coreDNSLabels := []string{ - "k8s:k8s-app=kube-dns", - k8sLabel(api.PodNamespaceLabel, "kube-system"), - k8sLabel(api.PolicyLabelServiceAccount, "coredns"), - k8sLabel(api.PolicyLabelCluster, cinfo.Name), - } - WellKnown.add(ReservedCoreDNS, coreDNSLabels) - WellKnown.add(ReservedCoreDNS2, append(coreDNSLabels, - k8sLabel(api.PodNamespaceMetaNameLabel, "kube-system"))) - - // CiliumOperator labels - // k8s:io.cilium.k8s.policy.serviceaccount=cilium-operator - // k8s:io.kubernetes.pod.namespace= - // k8s:name=cilium-operator - // k8s:io.cilium/app=operator - // k8s:app.kubernetes.io/part-of=cilium - // k8s:app.kubernetes.io/name=cilium-operator - // k8s:io.cilium.k8s.policy.cluster=default - ciliumOperatorLabels := []string{ - "k8s:name=cilium-operator", - "k8s:io.cilium/app=operator", - "k8s:app.kubernetes.io/part-of=cilium", - "k8s:app.kubernetes.io/name=cilium-operator", - k8sLabel(api.PodNamespaceLabel, c.CiliumNamespaceName()), - k8sLabel(api.PolicyLabelServiceAccount, "cilium-operator"), - k8sLabel(api.PolicyLabelCluster, cinfo.Name), - } - WellKnown.add(ReservedCiliumOperator, ciliumOperatorLabels) - WellKnown.add(ReservedCiliumOperator2, append(ciliumOperatorLabels, - k8sLabel(api.PodNamespaceMetaNameLabel, c.CiliumNamespaceName()))) - - // cilium-etcd-operator labels - // k8s:io.cilium.k8s.policy.cluster=default - // k8s:io.cilium.k8s.policy.serviceaccount=cilium-etcd-operator - // k8s:io.cilium/app=etcd-operator - // k8s:app.kubernetes.io/name: cilium-etcd-operator - // k8s:app.kubernetes.io/part-of: cilium - // k8s:io.kubernetes.pod.namespace= - // k8s:name=cilium-etcd-operator - ciliumEtcdOperatorLabels := []string{ - "k8s:name=cilium-etcd-operator", - "k8s:io.cilium/app=etcd-operator", - "k8s:app.kubernetes.io/name: cilium-etcd-operator", - "k8s:app.kubernetes.io/part-of: cilium", - k8sLabel(api.PodNamespaceLabel, c.CiliumNamespaceName()), - k8sLabel(api.PolicyLabelServiceAccount, "cilium-etcd-operator"), - k8sLabel(api.PolicyLabelCluster, cinfo.Name), - } - WellKnown.add(ReservedCiliumEtcdOperator, ciliumEtcdOperatorLabels) - WellKnown.add(ReservedCiliumEtcdOperator2, append(ciliumEtcdOperatorLabels, - k8sLabel(api.PodNamespaceMetaNameLabel, c.CiliumNamespaceName()))) - - return len(WellKnown) -} - -// GetClusterIDShift returns the number of bits to shift a cluster ID in a numeric -// identity and is equal to the number of bits that represent a cluster-local identity. -// A sync.Once is used to ensure we only initialize clusterIDShift once. -func GetClusterIDShift() uint32 { - clusterIDInit.Do(initClusterIDShift) - return clusterIDShift -} - -// initClusterIDShift sets variables that control the bit allocation of cluster -// ID in a numeric identity. -func initClusterIDShift() { - // ClusterIDLen is the number of bits that represent a cluster ID in a numeric identity - clusterIDLen := uint32(math.Log2(float64(cmtypes.ClusterIDMax + 1))) - // ClusterIDShift is the number of bits to shift a cluster ID in a numeric identity - clusterIDShift = NumericIdentityBitlength - clusterIDLen -} - -// GetMinimalNumericIdentity returns the minimal numeric identity not used for -// reserved purposes. -func GetMinimalAllocationIdentity() NumericIdentity { - if option.Config.ClusterID > 0 { - // For ClusterID > 0, the identity range just starts from cluster shift, - // no well-known-identities need to be reserved from the range. - return NumericIdentity((1 << GetClusterIDShift()) * option.Config.ClusterID) - } - return MinimalNumericIdentity -} - -// GetMaximumAllocationIdentity returns the maximum numeric identity that -// should be handed out by the identity allocator. -func GetMaximumAllocationIdentity() NumericIdentity { - return NumericIdentity((1<= UserReservedNumericIdentity.Uint32() && - id.Uint32() < MinimalNumericIdentity.Uint32() -} - -// AddUserDefinedNumericIdentity adds the given numeric identity and respective -// label to the list of reservedIdentities. If the numeric identity is not -// between UserReservedNumericIdentity and MinimalNumericIdentity it will return -// ErrNotUserIdentity. -// Is not safe for concurrent use. -func AddUserDefinedNumericIdentity(identity NumericIdentity, label string) error { - if !IsUserReservedIdentity(identity) { - return ErrNotUserIdentity - } - reservedIdentities[label] = identity - reservedIdentityNames[identity] = label - return nil -} - -// DelReservedNumericIdentity deletes the given Numeric Identity from the list -// of reservedIdentities. If the numeric identity is not between -// UserReservedNumericIdentity and MinimalNumericIdentity it will return -// ErrNotUserIdentity. -// Is not safe for concurrent use. -func DelReservedNumericIdentity(identity NumericIdentity) error { - if !IsUserReservedIdentity(identity) { - return ErrNotUserIdentity - } - label, ok := reservedIdentityNames[identity] - if ok { - delete(reservedIdentities, label) - delete(reservedIdentityNames, identity) - } - return nil -} - -// NumericIdentity is the numeric representation of a security identity. -// -// Bits: -// -// 0-15: identity identifier -// 16-23: cluster identifier -// 24: LocalIdentityFlag: Indicates that the identity has a local scope -type NumericIdentity uint32 - -// NumericIdentityBitlength is the number of bits used on the wire for a -// NumericIdentity -const NumericIdentityBitlength = 24 - -// MaxNumericIdentity is the maximum value of a NumericIdentity. -const MaxNumericIdentity = math.MaxUint32 - -type NumericIdentitySlice []NumericIdentity - -// AsUint32Slice returns the NumericIdentitySlice as a slice of uint32 without copying any data. -// This is safe as long as the underlying type stays as uint32. -func (nids NumericIdentitySlice) AsUint32Slice() []uint32 { - if len(nids) == 0 { - return nil - } - return unsafe.Slice((*uint32)(&nids[0]), len(nids)) -} - -func ParseNumericIdentity(id string) (NumericIdentity, error) { - nid, err := strconv.ParseUint(id, 0, 32) - if err != nil { - return NumericIdentity(0), err - } - if nid > MaxNumericIdentity { - return NumericIdentity(0), fmt.Errorf("%s: numeric identity too large", id) - } - return NumericIdentity(nid), nil -} - -func (id NumericIdentity) StringID() string { - return strconv.FormatUint(uint64(id), 10) -} - -func (id NumericIdentity) String() string { - if v, exists := reservedIdentityNames[id]; exists { - return v - } - - return id.StringID() -} - -// Uint32 normalizes the ID for use in BPF program. -func (id NumericIdentity) Uint32() uint32 { - return uint32(id) -} - -// GetLocalNodeID returns the configured local node numeric identity that is -// set in tunnel headers when encapsulating packets originating from the local -// node. -func GetLocalNodeID() NumericIdentity { - localNodeIdentity.Lock() - defer localNodeIdentity.Unlock() - return localNodeIdentity.identity -} - -// SetLocalNodeID sets the local node id. -// Note that currently changes to the local node id only take effect during agent bootstrap -func SetLocalNodeID(nodeid uint32) { - localNodeIdentity.Lock() - defer localNodeIdentity.Unlock() - localNodeIdentity.identity = NumericIdentity(nodeid) -} - -func GetReservedID(name string) NumericIdentity { - if v, ok := reservedIdentities[name]; ok { - return v - } - return IdentityUnknown -} - -// IsReservedIdentity returns whether id is one of the special reserved identities. -func (id NumericIdentity) IsReservedIdentity() bool { - _, isReservedIdentity := reservedIdentityNames[id] - return isReservedIdentity -} - -// ClusterID returns the cluster ID associated with the identity -func (id NumericIdentity) ClusterID() uint32 { - return (uint32(id) >> uint32(GetClusterIDShift())) & cmtypes.ClusterIDMax -} - -// GetAllReservedIdentities returns a list of all reserved numeric identities -// in ascending order. -// NOTE: While this func is unused from the cilium repository, is it imported -// and called by the hubble cli. -func GetAllReservedIdentities() []NumericIdentity { - identities := make([]NumericIdentity, 0, len(reservedIdentities)) - for _, id := range reservedIdentities { - identities = append(identities, id) - } - // Because our reservedIdentities source is a go map, and go map order is - // randomized, we need to sort the resulting slice before returning it. - sort.Slice(identities, func(i, j int) bool { - return identities[i].Uint32() < identities[j].Uint32() - }) - return identities -} - -// GetWorldIdentityFromIP gets the correct world identity based -// on the IP address version. If Cilium is not in dual-stack mode -// then ReservedIdentityWorld will always be returned. -func GetWorldIdentityFromIP(addr netip.Addr) NumericIdentity { - if option.Config.IsDualStack() { - if addr.Is6() { - return ReservedIdentityWorldIPv6 - } - return ReservedIdentityWorldIPv4 - } - return ReservedIdentityWorld -} - -// iterateReservedIdentityLabels iterates over all reservedIdentityLabels and -// executes the given function for each key, value pair in -// reservedIdentityLabels. -func iterateReservedIdentityLabels(f func(_ NumericIdentity, _ labels.Labels)) { - for ni, lbls := range reservedIdentityLabels { - f(ni, lbls) - } -} - -// HasLocalScope returns true if the identity is in the Local (CIDR) scope -func (id NumericIdentity) HasLocalScope() bool { - return id.Scope() == IdentityScopeLocal -} - -func (id NumericIdentity) HasRemoteNodeScope() bool { - return id.Scope() == IdentityScopeRemoteNode -} - -// Scope returns the identity scope of this given numeric ID. -func (id NumericIdentity) Scope() NumericIdentity { - return id & IdentityScopeMask -} - -// IsWorld returns true if the identity is one of the world identities -func (id NumericIdentity) IsWorld() bool { - if id == ReservedIdentityWorld { - return true - } - return option.Config.IsDualStack() && - (id == ReservedIdentityWorldIPv4 || id == ReservedIdentityWorldIPv6) -} - -// IsCluster returns true if the identity is a cluster identity by excluding all -// identities that are known to be non-cluster identities. -// NOTE: keep this and bpf identity_is_cluster() in sync! -func (id NumericIdentity) IsCluster() bool { - if id.IsWorld() || id.HasLocalScope() { - return false - } - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/identity/reserved.go b/vendor/github.com/cilium/cilium/pkg/identity/reserved.go deleted file mode 100644 index ce56e918dcb..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/identity/reserved.go +++ /dev/null @@ -1,64 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package identity - -import ( - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/lock" -) - -var ( - // cacheMU protects the following map. - cacheMU lock.RWMutex - // ReservedIdentityCache that maps all reserved identities from their - // numeric identity to their corresponding identity. - reservedIdentityCache = map[NumericIdentity]*Identity{} -) - -// AddReservedIdentity adds the reserved numeric identity with the respective -// label into the map of reserved identity cache, and returns the resulting Identity. -// This identity must not be mutated! -func AddReservedIdentity(ni NumericIdentity, lbl string) *Identity { - identity := NewIdentity(ni, labels.Labels{lbl: labels.NewLabel(lbl, "", labels.LabelSourceReserved)}) - cacheMU.Lock() - reservedIdentityCache[ni] = identity - cacheMU.Unlock() - return identity -} - -// AddReservedIdentityWithLabels is the same as AddReservedIdentity but accepts -// multiple labels. Returns the resulting Identity. -// This identity must not be mutated! -func AddReservedIdentityWithLabels(ni NumericIdentity, lbls labels.Labels) *Identity { - identity := NewIdentity(ni, lbls) - cacheMU.Lock() - reservedIdentityCache[ni] = identity - cacheMU.Unlock() - return identity -} - -// LookupReservedIdentity looks up a reserved identity by its NumericIdentity -// and returns it if found. Returns nil if not found. -// This identity must not be mutated! -func LookupReservedIdentity(ni NumericIdentity) *Identity { - cacheMU.RLock() - defer cacheMU.RUnlock() - return reservedIdentityCache[ni] -} - -func init() { - iterateReservedIdentityLabels(func(ni NumericIdentity, lbls labels.Labels) { - AddReservedIdentityWithLabels(ni, lbls) - }) -} - -// IterateReservedIdentities iterates over all reserved identities and -// executes the given function for each identity. -func IterateReservedIdentities(f func(_ NumericIdentity, _ *Identity)) { - cacheMU.RLock() - defer cacheMU.RUnlock() - for ni, identity := range reservedIdentityCache { - f(ni, identity) - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/idpool/idpool.go b/vendor/github.com/cilium/cilium/pkg/idpool/idpool.go deleted file mode 100644 index d37ca983a51..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/idpool/idpool.go +++ /dev/null @@ -1,239 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package idpool - -import ( - "strconv" - - "github.com/cilium/cilium/pkg/lock" -) - -// ID is a numeric identifier -type ID uint64 - -// NoID is a special ID that represents "no ID available" -const NoID ID = 0 - -// String returns the string representation of an allocated ID -func (i ID) String() string { - return strconv.FormatUint(uint64(i), 10) -} - -// IDPool represents a pool of IDs that can be managed concurrently -// via local usage and external events. -// -// An intermediate state (leased) is introduced to the life cycle -// of an ID in the pool, in order to prevent lost updates to the -// pool that can occur as a result of employing both management schemes -// simultaneously. -// Local usage of an ID becomes a two stage process of leasing -// the ID from the pool, and later, Use()ing or Release()ing the ID on -// the pool upon successful or unsuccessful usage respectively, -// -// The table below shows the state transitions in the ID's life cycle. -// In the case of LeaseAvailableID() the ID is returned rather -// than provided as an input to the operation. -// All ID's begin in the available state. -/* ---------------------------------------------------------------------- -|state\event | LeaseAvailableID | Release | Use | Insert | Remove | ---------------------------------------------------------------------- -|1 available | 2 | * | * | * | 3 | ---------------------------------------------------------------------- -|2 leased | ** | 1 | 3 | * | 3 | ---------------------------------------------------------------------- -|3 unavailable | ** | * | * | 1 | * | ---------------------------------------------------------------------- -* The event has no effect. -** This is guaranteed never to occur. -*/ -type IDPool struct { - // mutex protects all IDPool data structures - mutex lock.Mutex - - // min is the lower limit when leasing IDs. The pool will never - // return an ID lesser than this value. - minID ID - - // max is the upper limit when leasing IDs. The pool will never - // return an ID greater than this value. - maxID ID - - // idCache is a cache of IDs backing the pool. - idCache *idCache -} - -// NewIDPool returns a new ID pool -func NewIDPool(minID ID, maxID ID) *IDPool { - return &IDPool{ - minID: minID, - maxID: maxID, - idCache: newIDCache(minID, maxID), - } -} - -// LeaseAvailableID returns an available ID at random from the pool. -// Returns an ID or NoID if no there is no available ID in the pool. -func (p *IDPool) LeaseAvailableID() ID { - p.mutex.Lock() - defer p.mutex.Unlock() - - return p.idCache.leaseAvailableID() -} - -// AllocateID returns a random available ID. Unlike LeaseAvailableID, the ID is -// immediately marked for use and there is no need to call Use(). -func (p *IDPool) AllocateID() ID { - p.mutex.Lock() - defer p.mutex.Unlock() - - return p.idCache.allocateID() -} - -// Release returns a leased ID back to the pool. -// This operation accounts for IDs that were previously leased -// from the pool but were unused, e.g if allocation was unsuccessful. -// Thus, it has no effect if the ID is not currently leased in the -// pool, or the pool has since been refreshed. -// -// Returns true if the ID was returned back to the pool as -// a result of this call. -func (p *IDPool) Release(id ID) bool { - p.mutex.Lock() - defer p.mutex.Unlock() - - return p.idCache.release(id) -} - -// Use makes a leased ID unavailable in the pool and has no effect -// otherwise. Returns true if the ID was made unavailable -// as a result of this call. -func (p *IDPool) Use(id ID) bool { - p.mutex.Lock() - defer p.mutex.Unlock() - - return p.idCache.use(id) -} - -// Insert makes an unavailable ID available in the pool -// and has no effect otherwise. Returns true if the ID -// was added back to the pool. -func (p *IDPool) Insert(id ID) bool { - p.mutex.Lock() - defer p.mutex.Unlock() - - return p.idCache.insert(id) -} - -// Remove makes an ID unavailable in the pool. -// Returns true if the ID was previously available in the pool. -func (p *IDPool) Remove(id ID) bool { - p.mutex.Lock() - defer p.mutex.Unlock() - - return p.idCache.remove(id) -} - -type idCache struct { - // ids is a slice of IDs available in this idCache. - ids map[ID]struct{} - - // leased is the set of IDs that are leased in this idCache. - leased map[ID]struct{} -} - -func newIDCache(minID ID, maxID ID) *idCache { - n := int(maxID - minID + 1) - if n < 0 { - n = 0 - } - - c := &idCache{ - ids: make(map[ID]struct{}, n), - leased: make(map[ID]struct{}), - } - - for id := minID; id < maxID+1; id++ { - c.ids[id] = struct{}{} - } - - return c -} - -// allocateID returns a random available ID without leasing it -func (c *idCache) allocateID() ID { - for id := range c.ids { - delete(c.ids, id) - return id - } - - return NoID -} - -// leaseAvailableID returns a random available ID. -func (c *idCache) leaseAvailableID() ID { - id := c.allocateID() - if id == NoID { - return NoID - } - - // Mark as leased - c.leased[id] = struct{}{} - - return id -} - -// release makes the ID available again if it is currently -// leased and has no effect otherwise. Returns true if the -// ID was made available as a result of this call. -func (c *idCache) release(id ID) bool { - if _, exists := c.leased[id]; !exists { - return false - } - - delete(c.leased, id) - c.insert(id) - - return true -} - -// use makes the ID unavailable if it is currently -// leased and has no effect otherwise. Returns true if the -// ID was made unavailable as a result of this call. -func (c *idCache) use(id ID) bool { - if _, exists := c.leased[id]; !exists { - return false - } - - delete(c.leased, id) - return true -} - -// insert adds the ID into the cache if it is currently unavailable. -// Returns true if the ID was added to the cache. -func (c *idCache) insert(id ID) bool { - if _, ok := c.ids[id]; ok { - return false - } - - if _, exists := c.leased[id]; exists { - return false - } - - c.ids[id] = struct{}{} - return true -} - -// remove removes the ID from the cache. -// Returns true if the ID was available in the cache. -func (c *idCache) remove(id ID) bool { - delete(c.leased, id) - - if _, ok := c.ids[id]; ok { - delete(c.ids, id) - return true - } - - return false -} diff --git a/vendor/github.com/cilium/cilium/pkg/inctimer/inctimer.go b/vendor/github.com/cilium/cilium/pkg/inctimer/inctimer.go deleted file mode 100644 index 072c02a56e0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/inctimer/inctimer.go +++ /dev/null @@ -1,80 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package inctimer - -import "time" - -// IncTimer should be the preferred mechanism over -// calling `time.After` when wanting an `After`-like -// function in a loop. This prevents memory build up -// as the `time.After` method creates a new timer -// instance every time it is called, and it is not -// garbage collected until after it fires. Conversely, -// IncTimer only uses one timer and correctly stops -// the timer, clears its channel, and resets it -// everytime that `After` is called. -type IncTimer interface { - After(time.Duration) <-chan time.Time -} - -type incTimer struct { - t *time.Timer -} - -// New creates a new IncTimer and a done function. -// IncTimer only uses one timer and correctly stops -// the timer, clears the channel, and resets it every -// time the `After` function is called. -// WARNING: Concurrent use is not expected. The use -// of this timer should be for only one goroutine. -func New() (IncTimer, func() bool) { - it := &incTimer{} - return it, it.stop -} - -// stop returns true if a scheduled timer has been stopped before execution. -func (it *incTimer) stop() bool { - if it.t == nil { - return false - } - return it.t.Stop() -} - -// After returns a channel that will fire after -// the specified duration. -func (it *incTimer) After(d time.Duration) <-chan time.Time { - // Stop the previous timer (if any) to garbage collect it. - // The old timer channel will be garbage collected even if not drained. - it.stop() - - // We have to create a new timer for each invocation, because it is not - // possible to safely use https://golang.org/pkg/time/#Timer.Reset if we - // do not know if the timer channel has already been drained or not (which - // is the case here, as the client might have drained the channel already). - // Even after stopping a timer, it's not safe to attempt to drain its - // timer channel with a default case (for the case where the client has - // drained the channel already), as there is a small window where a timer - // is considered expired, but the channel has not received a value yet [1]. - // This would cause us to erroneously take the default case (assuming the - // channel has been drained by the client), when in fact the channel just - // has not received a value yet. Because the two cases (client has drained - // vs. value not received yet) are indistinguishable for us, we cannot use - // Timer.Reset and need to create a new timer. - // - // [1] The reason why this small window occurs, is because the Go runtime - // will remove a timer from the heap and and mark it as deleted _before_ - // it actually executes the timer function f: - // https://github.com/golang/go/blob/go1.16/src/runtime/time.go#L876 - // This causes t.Stop to report the timer as already expired while it is - // in fact currently running: - // https://github.com/golang/go/blob/go1.16/src/runtime/time.go#L352 - it.t = time.NewTimer(d) - return it.t.C -} - -// After wraps the time.After function to get around the /timeafter linter -// warning for cases where it is inconvenient to use the instantiated version. -func After(d time.Duration) <-chan time.Time { - return time.After(d) -} diff --git a/vendor/github.com/cilium/cilium/pkg/ip/ip.go b/vendor/github.com/cilium/cilium/pkg/ip/ip.go index fe1bb97df25..3c9adcb1fcd 100644 --- a/vendor/github.com/cilium/cilium/pkg/ip/ip.go +++ b/vendor/github.com/cilium/cilium/pkg/ip/ip.go @@ -291,20 +291,27 @@ func PrefixCeil(numIPs int, multiple int) int { return quotient } -// PrefixToIps converts the given prefix to an array containing all IPs in the prefix / CIDR block. -func PrefixToIps(prefixCidr string) ([]string, error) { +// PrefixToIps converts the given prefix to an array containing IPs in the provided +// prefix/CIDR block. When maxIPs is set to 0, the returned array will contain all IPs +// in the given prefix. Otherwise, the returned array of IPs will be limited to the +// value of maxIPs starting at the first IP in the provided CIDR. For example, when +// providing 192.168.1.0/28 as a CIDR with 4 maxIPs, 192.168.1.0, 192.168.1.1, +// 192.168.1.2, 192.168.1.3 will be returned. +func PrefixToIps(prefixCidr string, maxIPs int) ([]string, error) { var prefixIps []string _, ipNet, err := net.ParseCIDR(prefixCidr) if err != nil { return prefixIps, err } netWithRange := ipNetToRange(*ipNet) - for ip := *netWithRange.First; !ip.Equal(*netWithRange.Last); ip = GetNextIP(ip) { + // Ensure last IP in the prefix is included + for ip := *netWithRange.First; len(prefixIps) < maxIPs || maxIPs == 0; ip = GetNextIP(ip) { prefixIps = append(prefixIps, ip.String()) + if ip.Equal(*netWithRange.Last) { + break + } } - // Add the last IP - prefixIps = append(prefixIps, netWithRange.Last.String()) return prefixIps, nil } diff --git a/vendor/github.com/cilium/cilium/pkg/ipam/types/doc.go b/vendor/github.com/cilium/cilium/pkg/ipam/types/doc.go deleted file mode 100644 index e9d435b8da4..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/ipam/types/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:deepcopy-gen=package,register -// +k8s:openapi-gen=true -// +deepequal-gen=package - -// +groupName=ipam -package types diff --git a/vendor/github.com/cilium/cilium/pkg/ipam/types/types.go b/vendor/github.com/cilium/cilium/pkg/ipam/types/types.go deleted file mode 100644 index 1e506030739..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/ipam/types/types.go +++ /dev/null @@ -1,578 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "fmt" - "net/netip" - - "github.com/cilium/cilium/pkg/cidr" - "github.com/cilium/cilium/pkg/lock" -) - -// Limits specifies the IPAM relevant instance limits -type Limits struct { - // Adapters specifies the maximum number of interfaces that can be - // attached to the instance - Adapters int - - // IPv4 is the maximum number of IPv4 addresses per adapter/interface - IPv4 int - - // IPv6 is the maximum number of IPv6 addresses per adapter/interface - IPv6 int - - // HypervisorType tracks the instance's hypervisor type if available. Used to determine if features like prefix - // delegation are supported on an instance. Bare metal instances would have empty string. - HypervisorType string -} - -// AllocationIP is an IP which is available for allocation, or already -// has been allocated -type AllocationIP struct { - // Owner is the owner of the IP. This field is set if the IP has been - // allocated. It will be set to the pod name or another identifier - // representing the usage of the IP - // - // The owner field is left blank for an entry in Spec.IPAM.Pool and - // filled out as the IP is used and also added to Status.IPAM.Used. - // - // +optional - Owner string `json:"owner,omitempty"` - - // Resource is set for both available and allocated IPs, it represents - // what resource the IP is associated with, e.g. in combination with - // AWS ENI, this will refer to the ID of the ENI - // - // +optional - Resource string `json:"resource,omitempty"` -} - -// AllocationMap is a map of allocated IPs indexed by IP -type AllocationMap map[string]AllocationIP - -// IPAMPodCIDR is a pod CIDR -// -// +kubebuilder:validation:Format=cidr -type IPAMPodCIDR string - -func (c *IPAMPodCIDR) ToPrefix() (*netip.Prefix, error) { - if c == nil { - return nil, fmt.Errorf("nil ipam cidr") - } - - prefix, err := netip.ParsePrefix(string(*c)) - if err != nil { - return nil, fmt.Errorf("failed to parse ipam cidr %v: %w", c, err) - } - - return &prefix, nil -} - -// IPAMPoolAllocation describes an allocation of an IPAM pool from the operator to the -// node. It contains the assigned PodCIDRs allocated from this pool -type IPAMPoolAllocation struct { - // Pool is the name of the IPAM pool backing this allocation - // - // +kubebuilder:validation:MinLength=1 - Pool string `json:"pool"` - - // CIDRs contains a list of pod CIDRs currently allocated from this pool - // - // +optional - CIDRs []IPAMPodCIDR `json:"cidrs,omitempty"` -} - -type IPAMPoolRequest struct { - // Pool is the name of the IPAM pool backing this request - // - // +kubebuilder:validation:MinLength=1 - Pool string `json:"pool"` - - // Needed indicates how many IPs out of the above Pool this node requests - // from the operator. The operator runs a reconciliation loop to ensure each - // node always has enough PodCIDRs allocated in each pool to fulfill the - // requested number of IPs here. - // - // +optional - Needed IPAMPoolDemand `json:"needed,omitempty"` -} - -type IPAMPoolSpec struct { - // Requested contains a list of IPAM pool requests, i.e. indicates how many - // addresses this node requests out of each pool listed here. This field - // is owned and written to by cilium-agent and read by the operator. - // - // +optional - Requested []IPAMPoolRequest `json:"requested,omitempty"` - - // Allocated contains the list of pooled CIDR assigned to this node. The - // operator will add new pod CIDRs to this field, whereas the agent will - // remove CIDRs it has released. - // - // +optional - Allocated []IPAMPoolAllocation `json:"allocated,omitempty"` -} - -// IPAMSpec is the IPAM specification of the node -// -// This structure is embedded into v2.CiliumNode -type IPAMSpec struct { - // Pool is the list of IPs available to the node for allocation. When - // an IP is used, the IP will remain on this list but will be added to - // Status.IPAM.Used - // - // +optional - Pool AllocationMap `json:"pool,omitempty"` - - // Pools contains the list of assigned IPAM pools for this node. - // - // +optional - Pools IPAMPoolSpec `json:"pools,omitempty"` - - // PodCIDRs is the list of CIDRs available to the node for allocation. - // When an IP is used, the IP will be added to Status.IPAM.Used - // - // +optional - PodCIDRs []string `json:"podCIDRs,omitempty"` - - // MinAllocate is the minimum number of IPs that must be allocated when - // the node is first bootstrapped. It defines the minimum base socket - // of addresses that must be available. After reaching this watermark, - // the PreAllocate and MaxAboveWatermark logic takes over to continue - // allocating IPs. - // - // +kubebuilder:validation:Minimum=0 - MinAllocate int `json:"min-allocate,omitempty"` - - // MaxAllocate is the maximum number of IPs that can be allocated to the - // node. When the current amount of allocated IPs will approach this value, - // the considered value for PreAllocate will decrease down to 0 in order to - // not attempt to allocate more addresses than defined. - // - // +kubebuilder:validation:Minimum=0 - MaxAllocate int `json:"max-allocate,omitempty"` - - // PreAllocate defines the number of IP addresses that must be - // available for allocation in the IPAMspec. It defines the buffer of - // addresses available immediately without requiring cilium-operator to - // get involved. - // - // +kubebuilder:validation:Minimum=0 - PreAllocate int `json:"pre-allocate,omitempty"` - - // MaxAboveWatermark is the maximum number of addresses to allocate - // beyond the addresses needed to reach the PreAllocate watermark. - // Going above the watermark can help reduce the number of API calls to - // allocate IPs, e.g. when a new ENI is allocated, as many secondary - // IPs as possible are allocated. Limiting the amount can help reduce - // waste of IPs. - // - // +kubebuilder:validation:Minimum=0 - MaxAboveWatermark int `json:"max-above-watermark,omitempty"` -} - -// IPReleaseStatus defines the valid states in IP release handshake -// -// +kubebuilder:validation:Enum=marked-for-release;ready-for-release;do-not-release;released -type IPReleaseStatus string - -// IPAMStatus is the IPAM status of a node -// -// This structure is embedded into v2.CiliumNode -type IPAMStatus struct { - // Used lists all IPs out of Spec.IPAM.Pool which have been allocated - // and are in use. - // - // +optional - Used AllocationMap `json:"used,omitempty"` - - // PodCIDRs lists the status of each pod CIDR allocated to this node. - // - // +optional - PodCIDRs PodCIDRMap `json:"pod-cidrs,omitempty"` - - // Operator is the Operator status of the node - // - // +optional - OperatorStatus OperatorStatus `json:"operator-status,omitempty"` - - // ReleaseIPs tracks the state for every IP considered for release. - // value can be one of the following string : - // * marked-for-release : Set by operator as possible candidate for IP - // * ready-for-release : Acknowledged as safe to release by agent - // * do-not-release : IP already in use / not owned by the node. Set by agent - // * released : IP successfully released. Set by operator - // - // +optional - ReleaseIPs map[string]IPReleaseStatus `json:"release-ips,omitempty"` -} - -// IPAMPoolRequest is a request from the agent to the operator, indicating how -// may IPs it requires from a given pool -type IPAMPoolDemand struct { - // IPv4Addrs contains the number of requested IPv4 addresses out of a given - // pool - // - // +optional - IPv4Addrs int `json:"ipv4-addrs,omitempty"` - - // IPv6Addrs contains the number of requested IPv6 addresses out of a given - // pool - // - // +optional - IPv6Addrs int `json:"ipv6-addrs,omitempty"` -} - -type PodCIDRMap map[string]PodCIDRMapEntry - -// +kubebuilder:validation:Enum=released;depleted;in-use -type PodCIDRStatus string - -const ( - PodCIDRStatusReleased PodCIDRStatus = "released" - PodCIDRStatusDepleted PodCIDRStatus = "depleted" - PodCIDRStatusInUse PodCIDRStatus = "in-use" -) - -type PodCIDRMapEntry struct { - // Status describes the status of a pod CIDR - // - // +optional - Status PodCIDRStatus `json:"status,omitempty"` -} - -// OperatorStatus is the status used by cilium-operator to report -// errors in case the allocation CIDR failed. -type OperatorStatus struct { - // Error is the error message set by cilium-operator. - // - // +optional - Error string `json:"error,omitempty"` -} - -// Tags implements generic key value tags -type Tags map[string]string - -// Match returns true if the required tags are all found -func (t Tags) Match(required Tags) bool { - for k, neededvalue := range required { - haveValue, ok := t[k] - if !ok || (ok && neededvalue != haveValue) { - return false - } - } - return true -} - -// Subnet is a representation of a subnet -type Subnet struct { - // ID is the subnet ID - ID string - - // Name is the subnet name - Name string - - // CIDR is the CIDR associated with the subnet - CIDR *cidr.CIDR - - // AvailabilityZone is the availability zone of the subnet - AvailabilityZone string - - // VirtualNetworkID is the virtual network the subnet is in - VirtualNetworkID string - - // AvailableAddresses is the number of addresses available for - // allocation - AvailableAddresses int - - // Tags is the tags of the subnet - Tags Tags -} - -// SubnetMap indexes subnets by subnet ID -type SubnetMap map[string]*Subnet - -// FirstSubnetWithAvailableAddresses returns the first pool ID in the list of -// subnets with available addresses. If any of the preferred pool IDs have -// available addresses, the first pool ID with available addresses is returned. -func (m SubnetMap) FirstSubnetWithAvailableAddresses(preferredPoolIDs []PoolID) (PoolID, int) { - for _, p := range preferredPoolIDs { - if s := m[string(p)]; s != nil { - if s.AvailableAddresses > 0 { - return p, s.AvailableAddresses - } - } - } - - for poolID, s := range m { - if s.AvailableAddresses > 0 { - return PoolID(poolID), s.AvailableAddresses - } - } - - return PoolNotExists, 0 -} - -// VirtualNetwork is the representation of a virtual network -type VirtualNetwork struct { - // ID is the ID of the virtual network - ID string - - // PrimaryCIDR is the primary IPv4 CIDR - PrimaryCIDR string - - // CIDRs is the list of secondary IPv4 CIDR ranges associated with the VPC - CIDRs []string -} - -// VirtualNetworkMap indexes virtual networks by their ID -type VirtualNetworkMap map[string]*VirtualNetwork - -// PoolNotExists indicate that no such pool ID exists -const PoolNotExists = PoolID("") - -// PoolUnspec indicates that the pool ID is unspecified -const PoolUnspec = PoolNotExists - -// PoolID is the type used to identify an IPAM pool -type PoolID string - -// PoolQuota defines the limits of an IPAM pool -type PoolQuota struct { - // AvailabilityZone is the availability zone in which the IPAM pool resides in - AvailabilityZone string - - // AvailableIPs is the number of available IPs in the pool - AvailableIPs int -} - -// PoolQuotaMap is a map of pool quotas indexes by pool identifier -type PoolQuotaMap map[PoolID]PoolQuota - -// Interface is the implementation of a IPAM relevant network interface -// +k8s:deepcopy-gen=false -// +deepequal-gen=false -type Interface interface { - // InterfaceID must return the identifier of the interface - InterfaceID() string - - // ForeachAddress must iterate over all addresses of the interface and - // call fn for each address - ForeachAddress(instanceID string, fn AddressIterator) error - - // DeepCopyInterface returns a deep copy of the underlying interface type. - DeepCopyInterface() Interface -} - -// InterfaceRevision is the configurationr revision of a network interface. It -// consists of a revision hash representing the current configuration version -// and the resource itself. -// -// +k8s:deepcopy-gen=false -// +deepequal-gen=false -type InterfaceRevision struct { - // Resource is the interface resource - Resource Interface - - // Fingerprint is the fingerprint reprsenting the network interface - // configuration. It is typically implemented as the result of a hash - // function calculated off the resource. This field is optional, not - // all IPAM backends make use of fingerprints. - Fingerprint string -} - -// Instance is the representation of an instance, typically a VM, subject to -// per-node IPAM logic -// -// +k8s:deepcopy-gen=false -// +deepequal-gen=false -type Instance struct { - // interfaces is a map of all interfaces attached to the instance - // indexed by the interface ID - Interfaces map[string]InterfaceRevision -} - -// InstanceMap is the list of all instances indexed by instance ID -// -// +k8s:deepcopy-gen=false -// +deepequal-gen=false -type InstanceMap struct { - mutex lock.RWMutex - data map[string]*Instance -} - -// NewInstanceMap returns a new InstanceMap -func NewInstanceMap() *InstanceMap { - return &InstanceMap{data: map[string]*Instance{}} -} - -// UpdateInstance updates the interfaces map for a particular instance. -func (m *InstanceMap) UpdateInstance(instanceID string, instance *Instance) { - m.mutex.Lock() - m.data[instanceID] = instance - m.mutex.Unlock() -} - -// Update updates the definition of an interface for a particular instance. If -// the interface is already known, the definition is updated, otherwise the -// interface is added to the instance. -func (m *InstanceMap) Update(instanceID string, iface InterfaceRevision) { - m.mutex.Lock() - m.updateLocked(instanceID, iface) - m.mutex.Unlock() -} - -func (m *InstanceMap) updateLocked(instanceID string, iface InterfaceRevision) { - if iface.Resource == nil { - return - } - - i, ok := m.data[instanceID] - if !ok { - i = &Instance{} - m.data[instanceID] = i - } - - if i.Interfaces == nil { - i.Interfaces = map[string]InterfaceRevision{} - } - - i.Interfaces[iface.Resource.InterfaceID()] = iface -} - -type Address interface{} - -// AddressIterator is the function called by the ForeachAddress iterator -type AddressIterator func(instanceID, interfaceID, ip, poolID string, address Address) error - -func foreachAddress(instanceID string, instance *Instance, fn AddressIterator) error { - for _, rev := range instance.Interfaces { - if err := rev.Resource.ForeachAddress(instanceID, fn); err != nil { - return err - } - } - - return nil -} - -// ForeachAddress calls fn for each address on each interface attached to each -// instance. If an instanceID is specified, the only the interfaces and -// addresses of the specified instance are considered. -// -// The InstanceMap is read-locked throughout the iteration process, i.e., no -// updates will occur. However, the address object given to the AddressIterator -// will point to live data and must be deep copied if used outside of the -// context of the iterator function. -func (m *InstanceMap) ForeachAddress(instanceID string, fn AddressIterator) error { - m.mutex.RLock() - defer m.mutex.RUnlock() - - if instanceID != "" { - if instance := m.data[instanceID]; instance != nil { - return foreachAddress(instanceID, instance, fn) - } - return fmt.Errorf("instance does not exist: %q", instanceID) - } - - for instanceID, instance := range m.data { - if err := foreachAddress(instanceID, instance, fn); err != nil { - return err - } - } - - return nil -} - -// InterfaceIterator is the function called by the ForeachInterface iterator -type InterfaceIterator func(instanceID, interfaceID string, iface InterfaceRevision) error - -func foreachInterface(instanceID string, instance *Instance, fn InterfaceIterator) error { - for _, rev := range instance.Interfaces { - if err := fn(instanceID, rev.Resource.InterfaceID(), rev); err != nil { - return err - } - } - - return nil -} - -// ForeachInterface calls fn for each interface on each interface attached to -// each instance. If an instanceID is specified, the only the interfaces and -// addresses of the specified instance are considered. -// -// The InstanceMap is read-locked throughout the iteration process, i.e., no -// updates will occur. However, the address object given to the InterfaceIterator -// will point to live data and must be deep copied if used outside of the -// context of the iterator function. -func (m *InstanceMap) ForeachInterface(instanceID string, fn InterfaceIterator) error { - m.mutex.RLock() - defer m.mutex.RUnlock() - - if instanceID != "" { - if instance := m.data[instanceID]; instance != nil { - return foreachInterface(instanceID, instance, fn) - } - return fmt.Errorf("instance does not exist: %q", instanceID) - } - for instanceID, instance := range m.data { - if err := foreachInterface(instanceID, instance, fn); err != nil { - return err - } - } - - return nil -} - -// GetInterface returns returns a particular interface of an instance. The -// boolean indicates whether the interface was found or not. -func (m *InstanceMap) GetInterface(instanceID, interfaceID string) (InterfaceRevision, bool) { - m.mutex.RLock() - defer m.mutex.RUnlock() - - if instance := m.data[instanceID]; instance != nil { - if rev, ok := instance.Interfaces[interfaceID]; ok { - return rev, true - } - } - - return InterfaceRevision{}, false -} - -// DeepCopy returns a deep copy -func (m *InstanceMap) DeepCopy() *InstanceMap { - c := NewInstanceMap() - m.ForeachInterface("", func(instanceID, interfaceID string, rev InterfaceRevision) error { - // c is not exposed yet, we can access it without locking it - rev.Resource = rev.Resource.DeepCopyInterface() - c.updateLocked(instanceID, rev) - return nil - }) - return c -} - -// NumInstances returns the number of instances in the instance map -func (m *InstanceMap) NumInstances() (size int) { - m.mutex.RLock() - size = len(m.data) - m.mutex.RUnlock() - return -} - -// Exists returns whether the instance ID is in the instanceMap -func (m *InstanceMap) Exists(instanceID string) (exists bool) { - m.mutex.RLock() - defer m.mutex.RUnlock() - if instance := m.data[instanceID]; instance != nil { - return true - } - return false -} - -// Delete instance from m.data -func (m *InstanceMap) Delete(instanceID string) { - m.mutex.Lock() - defer m.mutex.Unlock() - delete(m.data, instanceID) -} diff --git a/vendor/github.com/cilium/cilium/pkg/ipam/types/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/ipam/types/zz_generated.deepcopy.go deleted file mode 100644 index dc090499f19..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/ipam/types/zz_generated.deepcopy.go +++ /dev/null @@ -1,434 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package types - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AllocationIP) DeepCopyInto(out *AllocationIP) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationIP. -func (in *AllocationIP) DeepCopy() *AllocationIP { - if in == nil { - return nil - } - out := new(AllocationIP) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in AllocationMap) DeepCopyInto(out *AllocationMap) { - { - in := &in - *out = make(AllocationMap, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationMap. -func (in AllocationMap) DeepCopy() AllocationMap { - if in == nil { - return nil - } - out := new(AllocationMap) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAMPoolAllocation) DeepCopyInto(out *IPAMPoolAllocation) { - *out = *in - if in.CIDRs != nil { - in, out := &in.CIDRs, &out.CIDRs - *out = make([]IPAMPodCIDR, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMPoolAllocation. -func (in *IPAMPoolAllocation) DeepCopy() *IPAMPoolAllocation { - if in == nil { - return nil - } - out := new(IPAMPoolAllocation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAMPoolDemand) DeepCopyInto(out *IPAMPoolDemand) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMPoolDemand. -func (in *IPAMPoolDemand) DeepCopy() *IPAMPoolDemand { - if in == nil { - return nil - } - out := new(IPAMPoolDemand) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAMPoolRequest) DeepCopyInto(out *IPAMPoolRequest) { - *out = *in - out.Needed = in.Needed - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMPoolRequest. -func (in *IPAMPoolRequest) DeepCopy() *IPAMPoolRequest { - if in == nil { - return nil - } - out := new(IPAMPoolRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAMPoolSpec) DeepCopyInto(out *IPAMPoolSpec) { - *out = *in - if in.Requested != nil { - in, out := &in.Requested, &out.Requested - *out = make([]IPAMPoolRequest, len(*in)) - copy(*out, *in) - } - if in.Allocated != nil { - in, out := &in.Allocated, &out.Allocated - *out = make([]IPAMPoolAllocation, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMPoolSpec. -func (in *IPAMPoolSpec) DeepCopy() *IPAMPoolSpec { - if in == nil { - return nil - } - out := new(IPAMPoolSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAMSpec) DeepCopyInto(out *IPAMSpec) { - *out = *in - if in.Pool != nil { - in, out := &in.Pool, &out.Pool - *out = make(AllocationMap, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - in.Pools.DeepCopyInto(&out.Pools) - if in.PodCIDRs != nil { - in, out := &in.PodCIDRs, &out.PodCIDRs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMSpec. -func (in *IPAMSpec) DeepCopy() *IPAMSpec { - if in == nil { - return nil - } - out := new(IPAMSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAMStatus) DeepCopyInto(out *IPAMStatus) { - *out = *in - if in.Used != nil { - in, out := &in.Used, &out.Used - *out = make(AllocationMap, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.PodCIDRs != nil { - in, out := &in.PodCIDRs, &out.PodCIDRs - *out = make(PodCIDRMap, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - out.OperatorStatus = in.OperatorStatus - if in.ReleaseIPs != nil { - in, out := &in.ReleaseIPs, &out.ReleaseIPs - *out = make(map[string]IPReleaseStatus, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMStatus. -func (in *IPAMStatus) DeepCopy() *IPAMStatus { - if in == nil { - return nil - } - out := new(IPAMStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Limits) DeepCopyInto(out *Limits) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Limits. -func (in *Limits) DeepCopy() *Limits { - if in == nil { - return nil - } - out := new(Limits) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OperatorStatus) DeepCopyInto(out *OperatorStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorStatus. -func (in *OperatorStatus) DeepCopy() *OperatorStatus { - if in == nil { - return nil - } - out := new(OperatorStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in PodCIDRMap) DeepCopyInto(out *PodCIDRMap) { - { - in := &in - *out = make(PodCIDRMap, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodCIDRMap. -func (in PodCIDRMap) DeepCopy() PodCIDRMap { - if in == nil { - return nil - } - out := new(PodCIDRMap) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodCIDRMapEntry) DeepCopyInto(out *PodCIDRMapEntry) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodCIDRMapEntry. -func (in *PodCIDRMapEntry) DeepCopy() *PodCIDRMapEntry { - if in == nil { - return nil - } - out := new(PodCIDRMapEntry) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PoolQuota) DeepCopyInto(out *PoolQuota) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolQuota. -func (in *PoolQuota) DeepCopy() *PoolQuota { - if in == nil { - return nil - } - out := new(PoolQuota) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in PoolQuotaMap) DeepCopyInto(out *PoolQuotaMap) { - { - in := &in - *out = make(PoolQuotaMap, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolQuotaMap. -func (in PoolQuotaMap) DeepCopy() PoolQuotaMap { - if in == nil { - return nil - } - out := new(PoolQuotaMap) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Subnet) DeepCopyInto(out *Subnet) { - *out = *in - if in.CIDR != nil { - in, out := &in.CIDR, &out.CIDR - *out = (*in).DeepCopy() - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnet. -func (in *Subnet) DeepCopy() *Subnet { - if in == nil { - return nil - } - out := new(Subnet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in SubnetMap) DeepCopyInto(out *SubnetMap) { - { - in := &in - *out = make(SubnetMap, len(*in)) - for key, val := range *in { - var outVal *Subnet - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(Subnet) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetMap. -func (in SubnetMap) DeepCopy() SubnetMap { - if in == nil { - return nil - } - out := new(SubnetMap) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in Tags) DeepCopyInto(out *Tags) { - { - in := &in - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tags. -func (in Tags) DeepCopy() Tags { - if in == nil { - return nil - } - out := new(Tags) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualNetwork) DeepCopyInto(out *VirtualNetwork) { - *out = *in - if in.CIDRs != nil { - in, out := &in.CIDRs, &out.CIDRs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetwork. -func (in *VirtualNetwork) DeepCopy() *VirtualNetwork { - if in == nil { - return nil - } - out := new(VirtualNetwork) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in VirtualNetworkMap) DeepCopyInto(out *VirtualNetworkMap) { - { - in := &in - *out = make(VirtualNetworkMap, len(*in)) - for key, val := range *in { - var outVal *VirtualNetwork - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(VirtualNetwork) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualNetworkMap. -func (in VirtualNetworkMap) DeepCopy() VirtualNetworkMap { - if in == nil { - return nil - } - out := new(VirtualNetworkMap) - in.DeepCopyInto(out) - return *out -} diff --git a/vendor/github.com/cilium/cilium/pkg/ipam/types/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/ipam/types/zz_generated.deepequal.go deleted file mode 100644 index 9749444d65b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/ipam/types/zz_generated.deepequal.go +++ /dev/null @@ -1,519 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package types - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AllocationIP) DeepEqual(other *AllocationIP) bool { - if other == nil { - return false - } - - if in.Owner != other.Owner { - return false - } - if in.Resource != other.Resource { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AllocationMap) DeepEqual(other *AllocationMap) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if !inValue.DeepEqual(&otherValue) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IPAMPoolAllocation) DeepEqual(other *IPAMPoolAllocation) bool { - if other == nil { - return false - } - - if in.Pool != other.Pool { - return false - } - if ((in.CIDRs != nil) && (other.CIDRs != nil)) || ((in.CIDRs == nil) != (other.CIDRs == nil)) { - in, other := &in.CIDRs, &other.CIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IPAMPoolDemand) DeepEqual(other *IPAMPoolDemand) bool { - if other == nil { - return false - } - - if in.IPv4Addrs != other.IPv4Addrs { - return false - } - if in.IPv6Addrs != other.IPv6Addrs { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IPAMPoolRequest) DeepEqual(other *IPAMPoolRequest) bool { - if other == nil { - return false - } - - if in.Pool != other.Pool { - return false - } - if in.Needed != other.Needed { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IPAMPoolSpec) DeepEqual(other *IPAMPoolSpec) bool { - if other == nil { - return false - } - - if ((in.Requested != nil) && (other.Requested != nil)) || ((in.Requested == nil) != (other.Requested == nil)) { - in, other := &in.Requested, &other.Requested - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Allocated != nil) && (other.Allocated != nil)) || ((in.Allocated == nil) != (other.Allocated == nil)) { - in, other := &in.Allocated, &other.Allocated - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IPAMSpec) DeepEqual(other *IPAMSpec) bool { - if other == nil { - return false - } - - if ((in.Pool != nil) && (other.Pool != nil)) || ((in.Pool == nil) != (other.Pool == nil)) { - in, other := &in.Pool, &other.Pool - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if !in.Pools.DeepEqual(&other.Pools) { - return false - } - - if ((in.PodCIDRs != nil) && (other.PodCIDRs != nil)) || ((in.PodCIDRs == nil) != (other.PodCIDRs == nil)) { - in, other := &in.PodCIDRs, &other.PodCIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if in.MinAllocate != other.MinAllocate { - return false - } - if in.MaxAllocate != other.MaxAllocate { - return false - } - if in.PreAllocate != other.PreAllocate { - return false - } - if in.MaxAboveWatermark != other.MaxAboveWatermark { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IPAMStatus) DeepEqual(other *IPAMStatus) bool { - if other == nil { - return false - } - - if ((in.Used != nil) && (other.Used != nil)) || ((in.Used == nil) != (other.Used == nil)) { - in, other := &in.Used, &other.Used - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.PodCIDRs != nil) && (other.PodCIDRs != nil)) || ((in.PodCIDRs == nil) != (other.PodCIDRs == nil)) { - in, other := &in.PodCIDRs, &other.PodCIDRs - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if in.OperatorStatus != other.OperatorStatus { - return false - } - - if ((in.ReleaseIPs != nil) && (other.ReleaseIPs != nil)) || ((in.ReleaseIPs == nil) != (other.ReleaseIPs == nil)) { - in, other := &in.ReleaseIPs, &other.ReleaseIPs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Limits) DeepEqual(other *Limits) bool { - if other == nil { - return false - } - - if in.Adapters != other.Adapters { - return false - } - if in.IPv4 != other.IPv4 { - return false - } - if in.IPv6 != other.IPv6 { - return false - } - if in.HypervisorType != other.HypervisorType { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *OperatorStatus) DeepEqual(other *OperatorStatus) bool { - if other == nil { - return false - } - - if in.Error != other.Error { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PodCIDRMap) DeepEqual(other *PodCIDRMap) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if !inValue.DeepEqual(&otherValue) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PodCIDRMapEntry) DeepEqual(other *PodCIDRMapEntry) bool { - if other == nil { - return false - } - - if in.Status != other.Status { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PoolQuota) DeepEqual(other *PoolQuota) bool { - if other == nil { - return false - } - - if in.AvailabilityZone != other.AvailabilityZone { - return false - } - if in.AvailableIPs != other.AvailableIPs { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PoolQuotaMap) DeepEqual(other *PoolQuotaMap) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if !inValue.DeepEqual(&otherValue) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Subnet) DeepEqual(other *Subnet) bool { - if other == nil { - return false - } - - if in.ID != other.ID { - return false - } - if in.Name != other.Name { - return false - } - if (in.CIDR == nil) != (other.CIDR == nil) { - return false - } else if in.CIDR != nil { - if !in.CIDR.DeepEqual(other.CIDR) { - return false - } - } - - if in.AvailabilityZone != other.AvailabilityZone { - return false - } - if in.VirtualNetworkID != other.VirtualNetworkID { - return false - } - if in.AvailableAddresses != other.AvailableAddresses { - return false - } - if ((in.Tags != nil) && (other.Tags != nil)) || ((in.Tags == nil) != (other.Tags == nil)) { - in, other := &in.Tags, &other.Tags - if other == nil || !in.DeepEqual(other) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *SubnetMap) DeepEqual(other *SubnetMap) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if !inValue.DeepEqual(otherValue) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Tags) DeepEqual(other *Tags) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *VirtualNetwork) DeepEqual(other *VirtualNetwork) bool { - if other == nil { - return false - } - - if in.ID != other.ID { - return false - } - if in.PrimaryCIDR != other.PrimaryCIDR { - return false - } - if ((in.CIDRs != nil) && (other.CIDRs != nil)) || ((in.CIDRs == nil) != (other.CIDRs == nil)) { - in, other := &in.CIDRs, &other.CIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *VirtualNetworkMap) DeepEqual(other *VirtualNetworkMap) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if !inValue.DeepEqual(otherValue) { - return false - } - } - } - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/ipcache/types/entries.go b/vendor/github.com/cilium/cilium/pkg/ipcache/types/entries.go deleted file mode 100644 index 1377e25b1f5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/ipcache/types/entries.go +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "bytes" - "net" - - "github.com/cilium/cilium/api/v1/models" -) - -type IPListEntrySlice []*models.IPListEntry - -func (s IPListEntrySlice) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -// Less sorts the IPListEntry objects by CIDR prefix then IP address. -// Given that the same IP cannot map to more than one identity, no further -// sorting is performed. -func (s IPListEntrySlice) Less(i, j int) bool { - _, iNet, _ := net.ParseCIDR(*s[i].Cidr) - _, jNet, _ := net.ParseCIDR(*s[j].Cidr) - iPrefixSize, _ := iNet.Mask.Size() - jPrefixSize, _ := jNet.Mask.Size() - if iPrefixSize == jPrefixSize { - return bytes.Compare(iNet.IP, jNet.IP) < 0 - } - return iPrefixSize < jPrefixSize -} - -func (s IPListEntrySlice) Len() int { - return len(s) -} diff --git a/vendor/github.com/cilium/cilium/pkg/ipcache/types/types.go b/vendor/github.com/cilium/cilium/pkg/ipcache/types/types.go deleted file mode 100644 index d5b3c9e73c5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/ipcache/types/types.go +++ /dev/null @@ -1,109 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "context" - "net" - "net/netip" - "strconv" - "strings" - "sync" - - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/identity/cache" -) - -// PolicyHandler is responsible for handling identity updates into the core -// policy engine. See SelectorCache.UpdateIdentities() for more details. -type PolicyHandler interface { - UpdateIdentities(added, deleted cache.IdentityCache, wg *sync.WaitGroup) -} - -// DatapathHandler is responsible for ensuring that policy updates in the -// core policy engine are pushed into the underlying BPF policy maps, to ensure -// that the policies are actively being enforced in the datapath for any new -// identities that have been updated using 'PolicyHandler'. -// -// Wait on the returned sync.WaitGroup to ensure that the operation is complete -// before updating the datapath's IPCache maps. -type DatapathHandler interface { - UpdatePolicyMaps(context.Context, *sync.WaitGroup) *sync.WaitGroup -} - -// ResourceID identifies a unique copy of a resource that provides a source for -// information tied to an IP address in the IPCache. -type ResourceID string - -// ResourceKind determines the source of the ResourceID. Typically this is the -// short name for the k8s resource. -type ResourceKind string - -var ( - ResourceKindCNP = ResourceKind("cnp") - ResourceKindCCNP = ResourceKind("ccnp") - ResourceKindDaemon = ResourceKind("daemon") - ResourceKindEndpoint = ResourceKind("ep") - ResourceKindNetpol = ResourceKind("netpol") - ResourceKindNode = ResourceKind("node") -) - -// NewResourceID returns a ResourceID populated with the standard fields for -// uniquely identifying a source of IPCache information. -func NewResourceID(kind ResourceKind, namespace, name string) ResourceID { - str := strings.Builder{} - str.Grow(len(kind) + 1 + len(namespace) + 1 + len(name)) - str.WriteString(string(kind)) - str.WriteRune('/') - str.WriteString(namespace) - str.WriteRune('/') - str.WriteString(name) - return ResourceID(str.String()) -} - -// TunnelPeer is the IP address of the host associated with this prefix. This is -// typically used to establish a tunnel, e.g. in tunnel mode or for encryption. -// This type implements ipcache.IPMetadata -type TunnelPeer struct{ netip.Addr } - -func (t TunnelPeer) IP() net.IP { - return t.AsSlice() -} - -// EncryptKey is the identity of the encryption key. -// This type implements ipcache.IPMetadata -type EncryptKey uint8 - -const EncryptKeyEmpty = EncryptKey(0) - -func (e EncryptKey) IsValid() bool { - return e != EncryptKeyEmpty -} - -func (e EncryptKey) Uint8() uint8 { - return uint8(e) -} - -func (e EncryptKey) String() string { - return strconv.Itoa(int(e)) -} - -// RequestedIdentity is a desired numeric identity for the prefix. When the -// prefix is next injected, this numeric ID will be requested from the local -// allocator. If the allocator can accommodate that request, it will do so. -// In order for this to be useful, the prefix must not already have an identity -// (or its set of labels must have changed), and that numeric identity must -// be free. -// Thus, the numeric ID should have already been held-aside in the allocator -// using WithholdLocalIdentities(). That will ensure the numeric ID remains free -// for the prefix to request. -type RequestedIdentity identity.NumericIdentity - -func (id RequestedIdentity) IsValid() bool { - return id != 0 -} - -func (id RequestedIdentity) ID() identity.NumericIdentity { - return identity.NumericIdentity(id) -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/const.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/const.go deleted file mode 100644 index 4aa8ac51695..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/const.go +++ /dev/null @@ -1,97 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package ciliumio - -const ( - // LabelPrefix is the prefix for all Cilium owned labels. - LabelPrefix = "io.cilium.k8s" - - // PolicyLabelName is the name of the policy label which refers to the - // k8s policy name. - PolicyLabelName = LabelPrefix + ".policy.name" - - // PolicyLabelUID is the uid of the policy label which refers to the - // k8s policy UID. - PolicyLabelUID = LabelPrefix + ".policy.uid" - - // PolicyLabelNamespace is the policy's namespace set in k8s. - PolicyLabelNamespace = LabelPrefix + ".policy.namespace" - - // PolicyLabelDerivedFrom is the resource type which was used to - // derived the policy rule - PolicyLabelDerivedFrom = LabelPrefix + ".policy.derived-from" - - // PolicyLabelServiceAccount is the name of the label associated with - // an endpoint to represent the Kubernetes ServiceAccount name - PolicyLabelServiceAccount = LabelPrefix + ".policy.serviceaccount" - - // PolicyLabelCluster is the name of the cluster the endpoint is - // running in - PolicyLabelCluster = LabelPrefix + ".policy.cluster" - - // PolicyLabelIstioSidecarProxy is the label key added to the identity of - // any pod that has been injected by Istio with a Cilium-compatible sidecar - // proxy. The value of this label is expected to be a boolean, i.e. "true" - // or "false". - PolicyLabelIstioSidecarProxy = LabelPrefix + ".policy.istiosidecarproxy" - - // PodNamespaceMetaLabels is the label used to store the labels of the - // kubernetes namespace's labels. - PodNamespaceMetaLabels = LabelPrefix + ".namespace.labels" - - // PodNamespaceMetaNameLabel is the label that Kubernetes automatically adds - // to namespaces. - PodNamespaceMetaNameLabel = PodNamespaceMetaLabels + "." + LabelMetadataName - - // LabelMetadataName is the label name which, in-tree, is used to - // automatically label namespaces, so they can be selected easily by tools - // which require definitive labels. - LabelMetadataName = "kubernetes.io/metadata.name" - - // PodNamespaceLabel is the label used in kubernetes containers to - // specify which namespace they belong to. - PodNamespaceLabel = "io.kubernetes.pod.namespace" - - // PodNameLabel is the label used in kubernetes containers to - // specify the POD name. - PodNameLabel = "io.kubernetes.pod.name" - - // AppKubernetes is the label which is recommended by the official k8s - // documentation add the label for every resource object. - AppKubernetes = "app.kubernetes.io" - - // StatefulSetPodNameLabel is the label name which, in-tree, is used to - // automatically label Pods that are owned by StatefulSets with their name, - // so that one can attach a Service to a specific Pod in the StatefulSet. - StatefulSetPodNameLabel = "statefulset.kubernetes.io/pod-name" - - // StatefulSetPodIndexLabel is the label name which, in-tree, is used to - // automatically label Pods that are owned by StatefulSets with their - // ordinal index. - StatefulSetPodIndexLabel = "apps.kubernetes.io/pod-index" - - // IndexedJobCompletionIndexLabel is the label name which, in-tree, is used - // to automatically label Pods that are owned by Indexed Jobs with their - // completion index. - IndexedJobCompletionIndexLabel = "batch.kubernetes.io/job-completion-index" - - // CtrlPrefixPolicyStatus is the prefix used for the controllers set up - // to sync the CNP with kube-apiserver. - CtrlPrefixPolicyStatus = "sync-cnp-policy-status" - - // BatchJobControllerUID is one of the labels that is available on a Job - // https://kubernetes.io/docs/concepts/workloads/controllers/job/#job-labels - BatchJobControllerUID = "batch.kubernetes.io/controller-uid" - - // CiliumIdentityAnnotationDeprecated is the previous annotation key used to map to an endpoint's security identity. - CiliumIdentityAnnotationDeprecated = "cilium-identity" -) - -const ( - // V1 represents version 1 of cilium API - // Deprecated - V1 = iota - // V2 represents version 2 of cilium API - V2 -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/register.go deleted file mode 100644 index 1cb2109f015..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/register.go +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package ciliumio - -const ( - // CustomResourceDefinitionGroup is the name of the third party resource group - CustomResourceDefinitionGroup = "cilium.io" - - // CustomResourceDefinitionSchemaVersionKey is key to label which holds the CRD schema version - CustomResourceDefinitionSchemaVersionKey = "io.cilium.k8s.crd.schema.version" - - // CustomResourceDefinitionSchemaVersion is semver-conformant version of CRD schema - // Used to determine if CRD needs to be updated in cluster - // - // Maintainers: Run ./Documentation/check-crd-compat-table.sh for each release - // Developers: Bump patch for each change in the CRD schema. - CustomResourceDefinitionSchemaVersion = "1.28.2" -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/utils/utils.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/utils/utils.go deleted file mode 100644 index 28cb2e19ea7..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/utils/utils.go +++ /dev/null @@ -1,349 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package utils - -import ( - "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/types" - - k8sConst "github.com/cilium/cilium/pkg/k8s/apis/cilium.io" - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/policy/api" -) - -const ( - // subsysK8s is the value for logfields.LogSubsys - subsysK8s = "k8s" - // podPrefixLbl is the value the prefix used in the label selector to - // represent pods on the default namespace. - podPrefixLbl = labels.LabelSourceK8sKeyPrefix + k8sConst.PodNamespaceLabel - - // podAnyPrefixLbl is the value of the prefix used in the label selector to - // represent pods in the default namespace for any source type. - podAnyPrefixLbl = labels.LabelSourceAnyKeyPrefix + k8sConst.PodNamespaceLabel - - // podInitLbl is the label used in a label selector to match on - // initializing pods. - podInitLbl = labels.LabelSourceReservedKeyPrefix + labels.IDNameInit - - // ResourceTypeCiliumNetworkPolicy is the resource type used for the - // PolicyLabelDerivedFrom label - ResourceTypeCiliumNetworkPolicy = "CiliumNetworkPolicy" - - // ResourceTypeCiliumClusterwideNetworkPolicy is the resource type used for the - // PolicyLabelDerivedFrom label - ResourceTypeCiliumClusterwideNetworkPolicy = "CiliumClusterwideNetworkPolicy" -) - -var ( - // log is the k8s package logger object. - log = logging.DefaultLogger.WithField(logfields.LogSubsys, subsysK8s) -) - -// GetPolicyLabels returns a LabelArray for the given namespace and name. -func GetPolicyLabels(ns, name string, uid types.UID, derivedFrom string) labels.LabelArray { - // Keep labels sorted by the key. - labelsArr := labels.LabelArray{ - labels.NewLabel(k8sConst.PolicyLabelDerivedFrom, derivedFrom, labels.LabelSourceK8s), - labels.NewLabel(k8sConst.PolicyLabelName, name, labels.LabelSourceK8s), - } - - // For clusterwide policy namespace will be empty. - if ns != "" { - nsLabel := labels.NewLabel(k8sConst.PolicyLabelNamespace, ns, labels.LabelSourceK8s) - labelsArr = append(labelsArr, nsLabel) - } - - srcLabel := labels.NewLabel(k8sConst.PolicyLabelUID, string(uid), labels.LabelSourceK8s) - return append(labelsArr, srcLabel) -} - -// getEndpointSelector converts the provided labelSelector into an EndpointSelector, -// adding the relevant matches for namespaces based on the provided options. -// If no namespace is provided then it is assumed that the selector is global to the cluster -// this is when translating selectors for CiliumClusterwideNetworkPolicy. -func getEndpointSelector(namespace string, labelSelector *slim_metav1.LabelSelector, addK8sPrefix, matchesInit bool) api.EndpointSelector { - es := api.NewESFromK8sLabelSelector("", labelSelector) - - // The k8s prefix must not be added to reserved labels. - if addK8sPrefix && es.HasKeyPrefix(labels.LabelSourceReservedKeyPrefix) { - return es - } - - // The user can explicitly specify the namespace in the - // FromEndpoints selector. If omitted, we limit the - // scope to the namespace the policy lives in. - // - // Policies applying on initializing pods are a special case. - // Those pods don't have any labels, so they don't have a namespace label either. - // Don't add a namespace label to those endpoint selectors, or we wouldn't be - // able to match on those pods. - if !es.HasKey(podPrefixLbl) && !es.HasKey(podAnyPrefixLbl) { - if namespace == "" { - // For a clusterwide policy if a namespace is not specified in the labels we add - // a selector to only match endpoints that contains a namespace label. - // This is to make sure that we are only allowing traffic for cilium managed k8s endpoints - // and even if a wildcard is provided in the selector we don't proceed with a truly - // empty(allow all) endpoint selector for the policy. - if !matchesInit { - es.AddMatchExpression(podPrefixLbl, slim_metav1.LabelSelectorOpExists, []string{}) - } - } else { - es.AddMatch(podPrefixLbl, namespace) - } - } - - return es -} - -func parseToCiliumIngressCommonRule(namespace string, es api.EndpointSelector, ing api.IngressCommonRule) api.IngressCommonRule { - matchesInit := matchesPodInit(es) - var retRule api.IngressCommonRule - - if ing.FromEndpoints != nil { - retRule.FromEndpoints = make([]api.EndpointSelector, len(ing.FromEndpoints)) - for j, ep := range ing.FromEndpoints { - retRule.FromEndpoints[j] = getEndpointSelector(namespace, ep.LabelSelector, true, matchesInit) - } - } - - if ing.FromCIDR != nil { - retRule.FromCIDR = make([]api.CIDR, len(ing.FromCIDR)) - copy(retRule.FromCIDR, ing.FromCIDR) - } - - if ing.FromCIDRSet != nil { - retRule.FromCIDRSet = make([]api.CIDRRule, len(ing.FromCIDRSet)) - copy(retRule.FromCIDRSet, ing.FromCIDRSet) - } - - if ing.FromRequires != nil { - retRule.FromRequires = make([]api.EndpointSelector, len(ing.FromRequires)) - for j, ep := range ing.FromRequires { - retRule.FromRequires[j] = getEndpointSelector(namespace, ep.LabelSelector, false, matchesInit) - } - } - - if ing.FromEntities != nil { - retRule.FromEntities = make([]api.Entity, len(ing.FromEntities)) - copy(retRule.FromEntities, ing.FromEntities) - } - - return retRule -} - -func parseToCiliumIngressRule(namespace string, es api.EndpointSelector, inRules []api.IngressRule) []api.IngressRule { - var retRules []api.IngressRule - - if inRules != nil { - retRules = make([]api.IngressRule, len(inRules)) - for i, ing := range inRules { - if ing.ToPorts != nil { - retRules[i].ToPorts = make([]api.PortRule, len(ing.ToPorts)) - copy(retRules[i].ToPorts, ing.ToPorts) - } - if ing.ICMPs != nil { - retRules[i].ICMPs = make(api.ICMPRules, len(ing.ICMPs)) - copy(retRules[i].ICMPs, ing.ICMPs) - } - retRules[i].IngressCommonRule = parseToCiliumIngressCommonRule(namespace, es, ing.IngressCommonRule) - retRules[i].Authentication = ing.Authentication.DeepCopy() - retRules[i].SetAggregatedSelectors() - } - } - return retRules -} - -func parseToCiliumIngressDenyRule(namespace string, es api.EndpointSelector, inRules []api.IngressDenyRule) []api.IngressDenyRule { - var retRules []api.IngressDenyRule - - if inRules != nil { - retRules = make([]api.IngressDenyRule, len(inRules)) - for i, ing := range inRules { - if ing.ToPorts != nil { - retRules[i].ToPorts = make([]api.PortDenyRule, len(ing.ToPorts)) - copy(retRules[i].ToPorts, ing.ToPorts) - } - if ing.ICMPs != nil { - retRules[i].ICMPs = make(api.ICMPRules, len(ing.ICMPs)) - copy(retRules[i].ICMPs, ing.ICMPs) - } - retRules[i].IngressCommonRule = parseToCiliumIngressCommonRule(namespace, es, ing.IngressCommonRule) - retRules[i].SetAggregatedSelectors() - } - } - return retRules -} - -func parseToCiliumEgressCommonRule(namespace string, es api.EndpointSelector, egr api.EgressCommonRule) api.EgressCommonRule { - matchesInit := matchesPodInit(es) - var retRule api.EgressCommonRule - if egr.ToEndpoints != nil { - retRule.ToEndpoints = make([]api.EndpointSelector, len(egr.ToEndpoints)) - for j, ep := range egr.ToEndpoints { - retRule.ToEndpoints[j] = getEndpointSelector(namespace, ep.LabelSelector, true, matchesInit) - } - } - - if egr.ToCIDR != nil { - retRule.ToCIDR = make([]api.CIDR, len(egr.ToCIDR)) - copy(retRule.ToCIDR, egr.ToCIDR) - } - - if egr.ToCIDRSet != nil { - retRule.ToCIDRSet = make(api.CIDRRuleSlice, len(egr.ToCIDRSet)) - copy(retRule.ToCIDRSet, egr.ToCIDRSet) - } - - if egr.ToRequires != nil { - retRule.ToRequires = make([]api.EndpointSelector, len(egr.ToRequires)) - for j, ep := range egr.ToRequires { - retRule.ToRequires[j] = getEndpointSelector(namespace, ep.LabelSelector, false, matchesInit) - } - } - - if egr.ToServices != nil { - retRule.ToServices = make([]api.Service, len(egr.ToServices)) - copy(retRule.ToServices, egr.ToServices) - } - - if egr.ToEntities != nil { - retRule.ToEntities = make([]api.Entity, len(egr.ToEntities)) - copy(retRule.ToEntities, egr.ToEntities) - } - - if egr.ToGroups != nil { - retRule.ToGroups = make([]api.ToGroups, len(egr.ToGroups)) - copy(retRule.ToGroups, egr.ToGroups) - } - - return retRule -} - -func parseToCiliumEgressRule(namespace string, es api.EndpointSelector, inRules []api.EgressRule) []api.EgressRule { - var retRules []api.EgressRule - - if inRules != nil { - retRules = make([]api.EgressRule, len(inRules)) - for i, egr := range inRules { - if egr.ToPorts != nil { - retRules[i].ToPorts = make([]api.PortRule, len(egr.ToPorts)) - copy(retRules[i].ToPorts, egr.ToPorts) - } - - if egr.ICMPs != nil { - retRules[i].ICMPs = make(api.ICMPRules, len(egr.ICMPs)) - copy(retRules[i].ICMPs, egr.ICMPs) - } - - if egr.ToFQDNs != nil { - retRules[i].ToFQDNs = make([]api.FQDNSelector, len(egr.ToFQDNs)) - copy(retRules[i].ToFQDNs, egr.ToFQDNs) - } - - retRules[i].EgressCommonRule = parseToCiliumEgressCommonRule(namespace, es, egr.EgressCommonRule) - retRules[i].Authentication = egr.Authentication - retRules[i].SetAggregatedSelectors() - } - } - return retRules -} - -func parseToCiliumEgressDenyRule(namespace string, es api.EndpointSelector, inRules []api.EgressDenyRule) []api.EgressDenyRule { - var retRules []api.EgressDenyRule - - if inRules != nil { - retRules = make([]api.EgressDenyRule, len(inRules)) - for i, egr := range inRules { - if egr.ToPorts != nil { - retRules[i].ToPorts = make([]api.PortDenyRule, len(egr.ToPorts)) - copy(retRules[i].ToPorts, egr.ToPorts) - } - - if egr.ICMPs != nil { - retRules[i].ICMPs = make(api.ICMPRules, len(egr.ICMPs)) - copy(retRules[i].ICMPs, egr.ICMPs) - } - - retRules[i].EgressCommonRule = parseToCiliumEgressCommonRule(namespace, es, egr.EgressCommonRule) - retRules[i].SetAggregatedSelectors() - } - } - return retRules -} - -func matchesPodInit(epSelector api.EndpointSelector) bool { - if epSelector.LabelSelector == nil { - return false - } - return epSelector.HasKey(podInitLbl) -} - -// namespacesAreValid checks the set of namespaces from a rule returns true if -// they are not specified, or if they are specified and match the namespace -// where the rule is being inserted. -func namespacesAreValid(namespace string, userNamespaces []string) bool { - return len(userNamespaces) == 0 || - (len(userNamespaces) == 1 && userNamespaces[0] == namespace) -} - -// ParseToCiliumRule returns an api.Rule with all the labels parsed into cilium -// labels. If the namespace provided is empty then the rule is cluster scoped, this -// might happen in case of CiliumClusterwideNetworkPolicy which enforces a policy on the cluster -// instead of the particular namespace. -func ParseToCiliumRule(namespace, name string, uid types.UID, r *api.Rule) *api.Rule { - retRule := &api.Rule{} - if r.EndpointSelector.LabelSelector != nil { - retRule.EndpointSelector = api.NewESFromK8sLabelSelector("", r.EndpointSelector.LabelSelector) - // The PodSelector should only reflect to the same namespace - // the policy is being stored, thus we add the namespace to - // the MatchLabels map. - // - // Policies applying to all namespaces are a special case. - // Such policies can match on any traffic from Pods or Nodes, - // so it wouldn't make sense to inject a namespace match for - // those policies. - if namespace != "" { - userNamespace, present := r.EndpointSelector.GetMatch(podPrefixLbl) - if present && !namespacesAreValid(namespace, userNamespace) { - log.WithFields(logrus.Fields{ - logfields.K8sNamespace: namespace, - logfields.CiliumNetworkPolicyName: name, - logfields.K8sNamespace + ".illegal": userNamespace, - }).Warn("CiliumNetworkPolicy contains illegal namespace match in EndpointSelector." + - " EndpointSelector always applies in namespace of the policy resource, removing illegal namespace match'.") - } - retRule.EndpointSelector.AddMatch(podPrefixLbl, namespace) - } - } else if r.NodeSelector.LabelSelector != nil { - retRule.NodeSelector = api.NewESFromK8sLabelSelector("", r.NodeSelector.LabelSelector) - } - - retRule.Ingress = parseToCiliumIngressRule(namespace, r.EndpointSelector, r.Ingress) - retRule.IngressDeny = parseToCiliumIngressDenyRule(namespace, r.EndpointSelector, r.IngressDeny) - retRule.Egress = parseToCiliumEgressRule(namespace, r.EndpointSelector, r.Egress) - retRule.EgressDeny = parseToCiliumEgressDenyRule(namespace, r.EndpointSelector, r.EgressDeny) - - retRule.Labels = ParseToCiliumLabels(namespace, name, uid, r.Labels) - - retRule.Description = r.Description - - return retRule -} - -// ParseToCiliumLabels returns all ruleLbls appended with a specific label that -// represents the given namespace and name along with a label that specifies -// these labels were derived from a CiliumNetworkPolicy. -func ParseToCiliumLabels(namespace, name string, uid types.UID, ruleLbs labels.LabelArray) labels.LabelArray { - resourceType := ResourceTypeCiliumNetworkPolicy - if namespace == "" { - resourceType = ResourceTypeCiliumClusterwideNetworkPolicy - } - - policyLbls := GetPolicyLabels(namespace, name, uid, resourceType) - return append(policyLbls, ruleLbs...).Sort() -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/ccec_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/ccec_types.go deleted file mode 100644 index 48823bf8be2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/ccec_types.go +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium},singular="ciliumclusterwideenvoyconfig",path="ciliumclusterwideenvoyconfigs",scope="Cluster",shortName={ccec} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",description="The age of the identity",name="Age",type=date -// +kubebuilder:storageversion - -type CiliumClusterwideEnvoyConfig struct { - // +k8s:openapi-gen=false - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +k8s:openapi-gen=false - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // +k8s:openapi-gen=false - Spec CiliumEnvoyConfigSpec `json:"spec,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +deepequal-gen=false - -// CiliumClusterwideEnvoyConfigList is a list of CiliumClusterwideEnvoyConfig objects. -type CiliumClusterwideEnvoyConfigList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumClusterwideEnvoyConfig. - Items []CiliumClusterwideEnvoyConfig `json:"items"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/ccnp_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/ccnp_types.go deleted file mode 100644 index 14ff2c20c55..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/ccnp_types.go +++ /dev/null @@ -1,141 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2 - -import ( - "fmt" - "reflect" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - k8sCiliumUtils "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/utils" - "github.com/cilium/cilium/pkg/policy/api" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +deepequal-gen:private-method=true -// +kubebuilder:resource:categories={cilium,ciliumpolicy},singular="ciliumclusterwidenetworkpolicy",path="ciliumclusterwidenetworkpolicies",scope="Cluster",shortName={ccnp} -// +kubebuilder:subresource:status -// +kubebuilder:storageversion - -// CiliumClusterwideNetworkPolicy is a Kubernetes third-party resource with an -// modified version of CiliumNetworkPolicy which is cluster scoped rather than -// namespace scoped. -type CiliumClusterwideNetworkPolicy struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec is the desired Cilium specific rule specification. - Spec *api.Rule `json:"spec,omitempty"` - - // Specs is a list of desired Cilium specific rule specification. - Specs api.Rules `json:"specs,omitempty"` - - // Status is the status of the Cilium policy rule. - // - // The reason this field exists in this structure is due a bug in the k8s - // code-generator that doesn't create a `UpdateStatus` method because the - // field does not exist in the structure. - // - // +kubebuilder:validation:Optional - Status CiliumNetworkPolicyStatus `json:"status"` -} - -// DeepEqual compares 2 CCNPs while ignoring the LastAppliedConfigAnnotation -// and ignoring the Status field of the CCNP. -func (in *CiliumClusterwideNetworkPolicy) DeepEqual(other *CiliumClusterwideNetworkPolicy) bool { - return objectMetaDeepEqual(in.ObjectMeta, other.ObjectMeta) && in.deepEqual(other) -} - -// GetPolicyStatus returns the CiliumClusterwideNetworkPolicyNodeStatus corresponding to -// nodeName in the provided CiliumClusterwideNetworkPolicy. If Nodes within the rule's -// Status is nil, returns an empty CiliumClusterwideNetworkPolicyNodeStatus. -func (r *CiliumClusterwideNetworkPolicy) GetPolicyStatus(nodeName string) CiliumNetworkPolicyNodeStatus { - if r.Status.Nodes == nil { - return CiliumNetworkPolicyNodeStatus{} - } - return r.Status.Nodes[nodeName] -} - -// SetPolicyStatus sets the given policy status for the given nodes' map. -func (r *CiliumClusterwideNetworkPolicy) SetPolicyStatus(nodeName string, cnpns CiliumNetworkPolicyNodeStatus) { - if r.Status.Nodes == nil { - r.Status.Nodes = map[string]CiliumNetworkPolicyNodeStatus{} - } - r.Status.Nodes[nodeName] = cnpns -} - -// SetDerivedPolicyStatus set the derivative policy status for the given -// derivative policy name. -func (r *CiliumClusterwideNetworkPolicy) SetDerivedPolicyStatus(derivativePolicyName string, status CiliumNetworkPolicyNodeStatus) { - if r.Status.DerivativePolicies == nil { - r.Status.DerivativePolicies = map[string]CiliumNetworkPolicyNodeStatus{} - } - r.Status.DerivativePolicies[derivativePolicyName] = status -} - -// AnnotationsEquals returns true if ObjectMeta.Annotations of each -// CiliumClusterwideNetworkPolicy are equivalent (i.e., they contain equivalent key-value -// pairs). -func (r *CiliumClusterwideNetworkPolicy) AnnotationsEquals(o *CiliumClusterwideNetworkPolicy) bool { - if o == nil { - return r == nil - } - return reflect.DeepEqual(r.ObjectMeta.Annotations, o.ObjectMeta.Annotations) -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumClusterwideNetworkPolicyList is a list of -// CiliumClusterwideNetworkPolicy objects. -type CiliumClusterwideNetworkPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumClusterwideNetworkPolicies. - Items []CiliumClusterwideNetworkPolicy `json:"items"` -} - -// Parse parses a CiliumClusterwideNetworkPolicy and returns a list of cilium -// policy rules. -func (r *CiliumClusterwideNetworkPolicy) Parse() (api.Rules, error) { - if r.ObjectMeta.Name == "" { - return nil, NewErrParse("CiliumClusterwideNetworkPolicy must have name") - } - - name := r.ObjectMeta.Name - uid := r.ObjectMeta.UID - - retRules := api.Rules{} - - if r.Spec == nil && r.Specs == nil { - return nil, ErrEmptyCCNP - } - - if r.Spec != nil { - if err := r.Spec.Sanitize(); err != nil { - return nil, NewErrParse(fmt.Sprintf("Invalid CiliumClusterwideNetworkPolicy spec: %s", err)) - } - cr := k8sCiliumUtils.ParseToCiliumRule("", name, uid, r.Spec) - retRules = append(retRules, cr) - } - if r.Specs != nil { - for _, rule := range r.Specs { - if err := rule.Sanitize(); err != nil { - return nil, NewErrParse(fmt.Sprintf("Invalid CiliumClusterwideNetworkPolicy specs: %s", err)) - - } - cr := k8sCiliumUtils.ParseToCiliumRule("", name, uid, rule) - retRules = append(retRules, cr) - } - } - - return retRules, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cec_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cec_types.go deleted file mode 100644 index ffff813a40f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cec_types.go +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2 - -import ( - "bytes" - "encoding/json" - "fmt" - - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/encoding/prototext" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/anypb" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/cilium/cilium/pkg/option" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium},singular="ciliumenvoyconfig",path="ciliumenvoyconfigs",scope="Namespaced",shortName={cec} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",description="The age of the identity",name="Age",type=date -// +kubebuilder:storageversion - -type CiliumEnvoyConfig struct { - // +k8s:openapi-gen=false - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +k8s:openapi-gen=false - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // +k8s:openapi-gen=false - Spec CiliumEnvoyConfigSpec `json:"spec,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +deepequal-gen=false - -// CiliumEnvoyConfigList is a list of CiliumEnvoyConfig objects. -type CiliumEnvoyConfigList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumEnvoyConfig. - Items []CiliumEnvoyConfig `json:"items"` -} - -type CiliumEnvoyConfigSpec struct { - // Services specifies Kubernetes services for which traffic is - // forwarded to an Envoy listener for L7 load balancing. Backends - // of these services are automatically synced to Envoy usign EDS. - // - // +kubebuilder:validation:Optional - Services []*ServiceListener `json:"services,omitempty"` - - // BackendServices specifies Kubernetes services whose backends - // are automatically synced to Envoy using EDS. Traffic for these - // services is not forwarded to an Envoy listener. This allows an - // Envoy listener load balance traffic to these backends while - // normal Cilium service load balancing takes care of balancing - // traffic for these services at the same time. - // - // +kubebuilder:validation:Optional - BackendServices []*Service `json:"backendServices,omitempty"` - - // Envoy xDS resources, a list of the following Envoy resource types: - // type.googleapis.com/envoy.config.listener.v3.Listener, - // type.googleapis.com/envoy.config.route.v3.RouteConfiguration, - // type.googleapis.com/envoy.config.cluster.v3.Cluster, - // type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment, and - // type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret. - // - // +kubebuilder:validation:Required - Resources []XDSResource `json:"resources,omitempty"` -} - -type Service struct { - // Name is the name of a destination Kubernetes service that identifies traffic - // to be redirected. - // - // +kubebuilder:validation:Required - Name string `json:"name"` - - // Namespace is the Kubernetes service namespace. - // In CiliumEnvoyConfig namespace defaults to the namespace of the CEC, - // In CiliumClusterwideEnvoyConfig namespace defaults to "default". - // +kubebuilder:validation:Optional - Namespace string `json:"namespace"` - - // Port is the port number, which can be used for filtering in case of underlying - // is exposing multiple port numbers. - // - // +kubebuilder:validation:Optional - Ports []string `json:"number,omitempty"` -} - -type ServiceListener struct { - // Name is the name of a destination Kubernetes service that identifies traffic - // to be redirected. - // - // +kubebuilder:validation:Required - Name string `json:"name"` - - // Namespace is the Kubernetes service namespace. - // In CiliumEnvoyConfig namespace this is overridden to the namespace of the CEC, - // In CiliumClusterwideEnvoyConfig namespace defaults to "default". - // +kubebuilder:validation:Optional - Namespace string `json:"namespace"` - - // Listener specifies the name of the Envoy listener the - // service traffic is redirected to. The listener must be - // specified in the Envoy 'resources' of the same - // CiliumEnvoyConfig. - // - // If omitted, the first listener specified in 'resources' is - // used. - // - // +kubebuilder:validation:Optional - Listener string `json:"listener"` -} - -// +kubebuilder:pruning:PreserveUnknownFields -type XDSResource struct { - *anypb.Any `json:"-"` -} - -// DeepCopyInto deep copies 'in' into 'out'. -func (in *XDSResource) DeepCopyInto(out *XDSResource) { - out.Any, _ = proto.Clone(in.Any).(*anypb.Any) -} - -// DeepEqual returns 'true' if 'a' and 'b' are equal. -func (a *XDSResource) DeepEqual(b *XDSResource) bool { - return proto.Equal(a.Any, b.Any) -} - -// MarshalJSON ensures that the unstructured object produces proper -// JSON when passed to Go's standard JSON library. -func (u *XDSResource) MarshalJSON() ([]byte, error) { - return protojson.Marshal(u.Any) -} - -// UnmarshalJSON ensures that the unstructured object properly decodes -// JSON when passed to Go's standard JSON library. -func (u *XDSResource) UnmarshalJSON(b []byte) (err error) { - // xDS resources are not validated in K8s, recover from possible panics - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("CEC JSON decoding paniced: %v", r) - } - }() - u.Any = &anypb.Any{} - err = protojson.Unmarshal(b, u.Any) - if err != nil { - var buf bytes.Buffer - json.Indent(&buf, b, "", "\t") - log.Warningf("Ignoring invalid CiliumEnvoyConfig JSON (%s): %s", - err, buf.String()) - } else if option.Config.Debug { - log.Debugf("CEC unmarshaled XDS Resource: %v", prototext.Format(u.Any)) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cegp_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cegp_types.go deleted file mode 100644 index 9eb408a0378..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cegp_types.go +++ /dev/null @@ -1,118 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - slimv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium,ciliumpolicy},singular="ciliumegressgatewaypolicy",path="ciliumegressgatewaypolicies",scope="Cluster",shortName={cegp} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type=date -// +kubebuilder:storageversion - -type CiliumEgressGatewayPolicy struct { - // +k8s:openapi-gen=false - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +k8s:openapi-gen=false - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - Spec CiliumEgressGatewayPolicySpec `json:"spec,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumEgressGatewayPolicyList is a list of CiliumEgressGatewayPolicy objects. -type CiliumEgressGatewayPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumEgressGatewayPolicy. - Items []CiliumEgressGatewayPolicy `json:"items"` -} - -// +kubebuilder:validation:Pattern=`^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/([0-9]|[1-2][0-9]|3[0-2])$` -type IPv4CIDR string - -type CiliumEgressGatewayPolicySpec struct { - // Egress represents a list of rules by which egress traffic is - // filtered from the source pods. - Selectors []EgressRule `json:"selectors"` - - // DestinationCIDRs is a list of destination CIDRs for destination IP addresses. - // If a destination IP matches any one CIDR, it will be selected. - DestinationCIDRs []IPv4CIDR `json:"destinationCIDRs"` - - // ExcludedCIDRs is a list of destination CIDRs that will be excluded - // from the egress gateway redirection and SNAT logic. - // Should be a subset of destinationCIDRs otherwise it will not have any - // effect. - // - // +kubebuilder:validation:Optional - ExcludedCIDRs []IPv4CIDR `json:"excludedCIDRs"` - - // EgressGateway is the gateway node responsible for SNATing traffic. - EgressGateway *EgressGateway `json:"egressGateway"` -} - -// EgressGateway identifies the node that should act as egress gateway for a -// given egress Gateway policy. In addition to that it also specifies the -// configuration of said node (which egress IP or network interface should be -// used to SNAT traffic). -type EgressGateway struct { - // This is a label selector which selects the node that should act as - // egress gateway for the given policy. - // In case multiple nodes are selected, only the first one in the - // lexical ordering over the node names will be used. - // This field follows standard label selector semantics. - // - // +kubebuilder:validation:Required - NodeSelector *slimv1.LabelSelector `json:"nodeSelector"` - - // Interface is the network interface to which the egress IP address - // that the traffic is SNATed with is assigned. - // - // Example: - // When set to "eth1", matching egress traffic will be redirected to the - // node matching the NodeSelector field and SNATed with the first IPv4 - // address assigned to the eth1 interface. - // - // When none of the Interface or EgressIP fields is specified, the - // policy will use the first IPv4 assigned to the interface with the - // default route. - Interface string `json:"interface,omitempty"` - - // EgressIP is the source IP address that the egress traffic is SNATed - // with. - // - // Example: - // When set to "192.168.1.100", matching egress traffic will be - // redirected to the node matching the NodeSelector field and SNATed - // with IP address 192.168.1.100. - // - // When none of the Interface or EgressIP fields is specified, the - // policy will use the first IPv4 assigned to the interface with the - // default route. - // - // +kubebuilder:validation:Pattern=`((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^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egressIP,omitempty"` -} - -type EgressRule struct { - // Selects Namespaces using cluster-scoped labels. This field follows standard label - // selector semantics; if present but empty, it selects all namespaces. - NamespaceSelector *slimv1.LabelSelector `json:"namespaceSelector,omitempty"` - - // This is a label selector which selects Pods. This field follows standard label - // selector semantics; if present but empty, it selects all pods. - PodSelector *slimv1.LabelSelector `json:"podSelector,omitempty"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cew_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cew_types.go deleted file mode 100644 index 8d6081182e5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cew_types.go +++ /dev/null @@ -1,84 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium},singular="ciliumexternalworkload",path="ciliumexternalworkloads",scope="Cluster",shortName={cew} -// +kubebuilder:printcolumn:JSONPath=".status.id",name="Cilium ID",type=integer -// +kubebuilder:printcolumn:JSONPath=".status.ip",name="IP",type=string -// +kubebuilder:subresource:status - -// CiliumExternalWorkload is a Kubernetes Custom Resource that -// contains a specification for an external workload that can join the -// cluster. The name of the CRD is the FQDN of the external workload, -// and it needs to match the name in the workload registration. The -// labels on the CRD object are the labels that will be used to -// allocate a Cilium Identity for the external workload. If -// 'io.kubernetes.pod.namespace' or 'io.kubernetes.pod.name' labels -// are not explicitly specified, they will be defaulted to 'default' -// and , respectively. 'io.cilium.k8s.policy.cluster' -// will always be defined as the name of the current cluster, which -// defaults to "default". -type CiliumExternalWorkload struct { - // +k8s:openapi-gen=false - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +k8s:openapi-gen=false - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec is the desired configuration of the external Cilium workload. - Spec CiliumExternalWorkloadSpec `json:"spec,omitempty"` - - // Status is the most recent status of the external Cilium workload. - // It is a read-only field. - // - // +deepequal-gen=false - // +kubebuilder:validation:Optional - Status CiliumExternalWorkloadStatus `json:"status"` -} - -// CiliumExternalWorkloadSpec specifies the configurations for redirecting traffic -// within a workload. -type CiliumExternalWorkloadSpec struct { - // IPv4AllocCIDR is the range of IPv4 addresses in the CIDR format that the external workload can - // use to allocate IP addresses for the tunnel device and the health endpoint. - // - // +kubebuilder:validation:Pattern=`^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/([0-9]|[1-2][0-9]|3[0-2])$` - IPv4AllocCIDR string `json:"ipv4-alloc-cidr,omitempty"` - - // IPv6AllocCIDR is the range of IPv6 addresses in the CIDR format that the external workload can - // use to allocate IP addresses for the tunnel device and the health endpoint. - // - // +kubebuilder:validation:Pattern=`^s*((([0-9A-Fa-f]{1,4}:){7}(:|([0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){6}:([0-9A-Fa-f]{1,4})?)|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){0,1}):([0-9A-Fa-f]{1,4})?))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){0,2}):([0-9A-Fa-f]{1,4})?))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){0,3}):([0-9A-Fa-f]{1,4})?))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){0,4}):([0-9A-Fa-f]{1,4})?))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){0,5}):([0-9A-Fa-f]{1,4})?))|(:(:|((:[0-9A-Fa-f]{1,4}){1,7}))))(%.+)?s*/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])$` - IPv6AllocCIDR string `json:"ipv6-alloc-cidr,omitempty"` -} - -// CiliumExternalWorkloadStatus is the status of a the external Cilium workload. -type CiliumExternalWorkloadStatus struct { - // ID is the numeric identity allocated for the external workload. - ID uint64 `json:"id,omitempty"` - - // IP is the IP address of the workload. Empty if the workload has not registered. - IP string `json:"ip,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumExternalWorkloadList is a list of CiliumExternalWorkload objects. -type CiliumExternalWorkloadList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumExternalWorkload - Items []CiliumExternalWorkload `json:"items"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/clrp_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/clrp_types.go deleted file mode 100644 index 63bb1b5e1fd..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/clrp_types.go +++ /dev/null @@ -1,235 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2 - -import ( - "fmt" - "strconv" - "strings" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/cilium/cilium/pkg/iana" - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - lb "github.com/cilium/cilium/pkg/loadbalancer" - "github.com/cilium/cilium/pkg/policy/api" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium,ciliumpolicy},singular="ciliumlocalredirectpolicy",path="ciliumlocalredirectpolicies",scope="Namespaced",shortName={clrp} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type=date - -// CiliumLocalRedirectPolicy is a Kubernetes Custom Resource that contains a -// specification to redirect traffic locally within a node. -type CiliumLocalRedirectPolicy struct { - // +k8s:openapi-gen=false - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +k8s:openapi-gen=false - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec is the desired behavior of the local redirect policy. - Spec CiliumLocalRedirectPolicySpec `json:"spec,omitempty"` - - // Status is the most recent status of the local redirect policy. - // It is a read-only field. - // - // +deepequal-gen=false - // +kubebuilder:validation:Optional - Status CiliumLocalRedirectPolicyStatus `json:"status"` -} - -type Frontend struct { - // IP is a destination ip address for traffic to be redirected. - // - // Example: - // When it is set to "169.254.169.254", traffic destined to - // "169.254.169.254" is redirected. - // - // +kubebuilder:validation:Pattern=`((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))` - // +kubebuilder:validation:Required - IP string `json:"ip"` - - // ToPorts is a list of destination L4 ports with protocol for traffic - // to be redirected. - // When multiple ports are specified, the ports must be named. - // - // Example: - // When set to Port: "53" and Protocol: UDP, traffic destined to port '53' - // with UDP protocol is redirected. - // - // +kubebuilder:validation:Required - ToPorts []PortInfo `json:"toPorts"` -} - -// RedirectFrontend is a frontend configuration that matches traffic that needs to be redirected. -// The configuration must be specified using a ip/port tuple or a Kubernetes service. -type RedirectFrontend struct { - // AddressMatcher is a tuple {IP, port, protocol} that matches traffic to be - // redirected. - // - // +kubebuilder:validation:OneOf - AddressMatcher *Frontend `json:"addressMatcher,omitempty"` - - // ServiceMatcher specifies Kubernetes service and port that matches - // traffic to be redirected. - // - // +kubebuilder:validation:OneOf - ServiceMatcher *ServiceInfo `json:"serviceMatcher,omitempty"` -} - -// PortInfo specifies L4 port number and name along with the transport protocol -type PortInfo struct { - // Port is an L4 port number. The string will be strictly parsed as a single uint16. - // - // +kubebuilder:validation:Pattern=`^()([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])$` - // +kubebuilder:validation:Required - Port string `json:"port"` - - // Protocol is the L4 protocol. - // Accepted values: "TCP", "UDP" - // - // +kubebuilder:validation:Enum=TCP;UDP - // +kubebuilder:validation:Required - Protocol api.L4Proto `json:"protocol"` - - // Name is a port name, which must contain at least one [a-z], - // and may also contain [0-9] and '-' anywhere except adjacent to another - // '-' or in the beginning or the end. - // - // +kubebuilder:validation:Pattern=`^([0-9]{1,4})|([a-zA-Z0-9]-?)*[a-zA-Z](-?[a-zA-Z0-9])*$` - // +kubebuilder:validation:Optional - Name string `json:"name"` -} - -type ServiceInfo struct { - // Name is the name of a destination Kubernetes service that identifies traffic - // to be redirected. - // The service type needs to be ClusterIP. - // - // Example: - // When this field is populated with 'serviceName:myService', all the traffic - // destined to the cluster IP of this service at the (specified) - // service port(s) will be redirected. - // - // +kubebuilder:validation:Required - Name string `json:"serviceName"` - - // Namespace is the Kubernetes service namespace. - // The service namespace must match the namespace of the parent Local - // Redirect Policy. For Cluster-wide Local Redirect Policy, this - // can be any namespace. - // +kubebuilder:validation:Required - Namespace string `json:"namespace"` - - // ToPorts is a list of destination service L4 ports with protocol for - // traffic to be redirected. If not specified, traffic for all the service - // ports will be redirected. - // When multiple ports are specified, the ports must be named. - // - // +kubebuilder:validation:Optional - ToPorts []PortInfo `json:"toPorts,omitempty"` -} - -// RedirectBackend is a backend configuration that determines where traffic needs to be redirected to. -type RedirectBackend struct { - // LocalEndpointSelector selects node local pod(s) where traffic is redirected to. - // - // +kubebuilder:validation:Required - LocalEndpointSelector slim_metav1.LabelSelector `json:"localEndpointSelector"` - - // ToPorts is a list of L4 ports with protocol of node local pod(s) where traffic - // is redirected to. - // When multiple ports are specified, the ports must be named. - // - // +kubebuilder:validation:Required - ToPorts []PortInfo `json:"toPorts"` -} - -// CiliumLocalRedirectPolicySpec specifies the configurations for redirecting traffic -// within a node. -type CiliumLocalRedirectPolicySpec struct { - // RedirectFrontend specifies frontend configuration to redirect traffic from. - // It can not be empty. - // - // +kubebuilder:validation:Required - RedirectFrontend RedirectFrontend `json:"redirectFrontend"` - - // RedirectBackend specifies backend configuration to redirect traffic to. - // It can not be empty. - // - // +kubebuilder:validation:Required - RedirectBackend RedirectBackend `json:"redirectBackend"` - - // Description can be used by the creator of the policy to describe the - // purpose of this policy. - // - // +kubebuilder:validation:Optional - Description string `json:"description,omitempty"` -} - -// CiliumLocalRedirectPolicyStatus is the status of a Local Redirect Policy. -type CiliumLocalRedirectPolicyStatus struct { - // TODO Define status(aditi) - OK bool `json:"ok,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumLocalRedirectPolicyList is a list of CiliumLocalRedirectPolicy objects. -type CiliumLocalRedirectPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumLocalRedirectPolicy - Items []CiliumLocalRedirectPolicy `json:"items"` -} - -// SanitizePortInfo sanitizes all the fields in the PortInfo. -// It returns port number, name, and protocol derived from the given input and error (failure cases). -func (pInfo *PortInfo) SanitizePortInfo(checkNamedPort bool) (uint16, string, lb.L4Type, error) { - var ( - pInt uint16 - pName string - protocol lb.L4Type - ) - // Sanitize port - if pInfo.Port == "" { - return pInt, pName, protocol, fmt.Errorf("port must be specified") - } else { - p, err := strconv.ParseUint(pInfo.Port, 0, 16) - if err != nil { - return pInt, pName, protocol, fmt.Errorf("unable to parse port: %w", err) - } - if p == 0 { - return pInt, pName, protocol, fmt.Errorf("port cannot be 0") - } - pInt = uint16(p) - } - // Sanitize name - if checkNamedPort { - if pInfo.Name == "" { - return pInt, pName, protocol, fmt.Errorf("port %s in the local "+ - "redirect policy spec must have a valid IANA_SVC_NAME, as there are multiple ports", pInfo.Port) - - } - if !iana.IsSvcName(pInfo.Name) { - return pInt, pName, protocol, fmt.Errorf("port name %s isn't a "+ - "valid IANA_SVC_NAME", pInfo.Name) - } - } - pName = strings.ToLower(pInfo.Name) // Normalize for case insensitive comparison - - // Sanitize protocol - var err error - protocol, err = lb.NewL4Type(string(pInfo.Protocol)) - if err != nil { - return pInt, pName, protocol, err - } - return pInt, pName, protocol, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cnp_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cnp_types.go deleted file mode 100644 index 1fb1fdf5059..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/cnp_types.go +++ /dev/null @@ -1,297 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2 - -import ( - "fmt" - "reflect" - "strings" - - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/cilium/cilium/pkg/comparator" - k8sConst "github.com/cilium/cilium/pkg/k8s/apis/cilium.io" - k8sCiliumUtils "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/utils" - slimv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - k8sUtils "github.com/cilium/cilium/pkg/k8s/utils" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/policy/api" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +deepequal-gen:private-method=true -// +kubebuilder:resource:categories={cilium,ciliumpolicy},singular="ciliumnetworkpolicy",path="ciliumnetworkpolicies",scope="Namespaced",shortName={cnp,ciliumnp} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type=date -// +kubebuilder:subresource:status -// +kubebuilder:storageversion - -// CiliumNetworkPolicy is a Kubernetes third-party resource with an extended -// version of NetworkPolicy. -type CiliumNetworkPolicy struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec is the desired Cilium specific rule specification. - Spec *api.Rule `json:"spec,omitempty"` - - // Specs is a list of desired Cilium specific rule specification. - Specs api.Rules `json:"specs,omitempty"` - - // Status is the status of the Cilium policy rule - // - // +deepequal-gen=false - // +kubebuilder:validation:Optional - Status CiliumNetworkPolicyStatus `json:"status"` -} - -// DeepEqual compares 2 CNPs. -func (in *CiliumNetworkPolicy) DeepEqual(other *CiliumNetworkPolicy) bool { - return objectMetaDeepEqual(in.ObjectMeta, other.ObjectMeta) && in.deepEqual(other) -} - -// objectMetaDeepEqual performs an equality check for metav1.ObjectMeta that -// ignores the LastAppliedConfigAnnotation. This function's usage is shared -// among CNP and CCNP as they have the same structure. -func objectMetaDeepEqual(in, other metav1.ObjectMeta) bool { - if !(in.Name == other.Name && in.Namespace == other.Namespace) { - return false - } - - return comparator.MapStringEqualsIgnoreKeys( - in.GetAnnotations(), - other.GetAnnotations(), - // Ignore v1.LastAppliedConfigAnnotation annotation - []string{v1.LastAppliedConfigAnnotation}) -} - -// +deepequal-gen=true - -// CiliumNetworkPolicyStatus is the status of a Cilium policy rule. -type CiliumNetworkPolicyStatus struct { - // Nodes is the Cilium policy status for each node - Nodes map[string]CiliumNetworkPolicyNodeStatus `json:"nodes,omitempty"` - - // DerivativePolicies is the status of all policies derived from the Cilium - // policy - DerivativePolicies map[string]CiliumNetworkPolicyNodeStatus `json:"derivativePolicies,omitempty"` -} - -// +deepequal-gen=true - -// CiliumNetworkPolicyNodeStatus is the status of a Cilium policy rule for a -// specific node. -type CiliumNetworkPolicyNodeStatus struct { - // OK is true when the policy has been parsed and imported successfully - // into the in-memory policy repository on the node. - OK bool `json:"ok,omitempty"` - - // Error describes any error that occurred when parsing or importing the - // policy, or realizing the policy for the endpoints to which it applies - // on the node. - Error string `json:"error,omitempty"` - - // LastUpdated contains the last time this status was updated - LastUpdated slimv1.Time `json:"lastUpdated,omitempty"` - - // Revision is the policy revision of the repository which first implemented - // this policy. - Revision uint64 `json:"localPolicyRevision,omitempty"` - - // Enforcing is set to true once all endpoints present at the time the - // policy has been imported are enforcing this policy. - Enforcing bool `json:"enforcing,omitempty"` - - // Annotations corresponds to the Annotations in the ObjectMeta of the CNP - // that have been realized on the node for CNP. That is, if a CNP has been - // imported and has been assigned annotation X=Y by the user, - // Annotations in CiliumNetworkPolicyNodeStatus will be X=Y once the - // CNP that was imported corresponding to Annotation X=Y has been realized on - // the node. - Annotations map[string]string `json:"annotations,omitempty"` -} - -// CreateCNPNodeStatus returns a CiliumNetworkPolicyNodeStatus created from the -// provided fields. -func CreateCNPNodeStatus(enforcing, ok bool, cnpError error, rev uint64, annotations map[string]string) CiliumNetworkPolicyNodeStatus { - cnpns := CiliumNetworkPolicyNodeStatus{ - Enforcing: enforcing, - Revision: rev, - OK: ok, - LastUpdated: slimv1.Now(), - Annotations: annotations, - } - if cnpError != nil { - cnpns.Error = cnpError.Error() - } - return cnpns -} - -func (r *CiliumNetworkPolicy) String() string { - result := "" - result += fmt.Sprintf("TypeMeta: %s, ", r.TypeMeta.String()) - result += fmt.Sprintf("ObjectMeta: %s, ", r.ObjectMeta.String()) - if r.Spec != nil { - result += fmt.Sprintf("Spec: %v", *(r.Spec)) - } - if r.Specs != nil { - result += fmt.Sprintf("Specs: %v", r.Specs) - } - result += fmt.Sprintf("Status: %v", r.Status) - return result -} - -// GetPolicyStatus returns the CiliumNetworkPolicyNodeStatus corresponding to -// nodeName in the provided CiliumNetworkPolicy. If Nodes within the rule's -// Status is nil, returns an empty CiliumNetworkPolicyNodeStatus. -func (r *CiliumNetworkPolicy) GetPolicyStatus(nodeName string) CiliumNetworkPolicyNodeStatus { - if r.Status.Nodes == nil { - return CiliumNetworkPolicyNodeStatus{} - } - return r.Status.Nodes[nodeName] -} - -// SetPolicyStatus sets the given policy status for the given nodes' map. -func (r *CiliumNetworkPolicy) SetPolicyStatus(nodeName string, cnpns CiliumNetworkPolicyNodeStatus) { - if r.Status.Nodes == nil { - r.Status.Nodes = map[string]CiliumNetworkPolicyNodeStatus{} - } - r.Status.Nodes[nodeName] = cnpns -} - -// SetDerivedPolicyStatus set the derivative policy status for the given -// derivative policy name. -func (r *CiliumNetworkPolicy) SetDerivedPolicyStatus(derivativePolicyName string, status CiliumNetworkPolicyNodeStatus) { - if r.Status.DerivativePolicies == nil { - r.Status.DerivativePolicies = map[string]CiliumNetworkPolicyNodeStatus{} - } - r.Status.DerivativePolicies[derivativePolicyName] = status -} - -// AnnotationsEquals returns true if ObjectMeta.Annotations of each -// CiliumNetworkPolicy are equivalent (i.e., they contain equivalent key-value -// pairs). -func (r *CiliumNetworkPolicy) AnnotationsEquals(o *CiliumNetworkPolicy) bool { - if o == nil { - return r == nil - } - return reflect.DeepEqual(r.ObjectMeta.Annotations, o.ObjectMeta.Annotations) -} - -// Parse parses a CiliumNetworkPolicy and returns a list of cilium policy -// rules. -func (r *CiliumNetworkPolicy) Parse() (api.Rules, error) { - if r.ObjectMeta.Name == "" { - return nil, NewErrParse("CiliumNetworkPolicy must have name") - } - - namespace := k8sUtils.ExtractNamespace(&r.ObjectMeta) - // Temporary fix for CCNPs. See #12834. - // TL;DR. CCNPs are converted into SlimCNPs and end up here so we need to - // convert them back to CCNPs to allow proper parsing. - if namespace == "" { - ccnp := CiliumClusterwideNetworkPolicy{ - TypeMeta: r.TypeMeta, - ObjectMeta: r.ObjectMeta, - Spec: r.Spec, - Specs: r.Specs, - Status: r.Status, - } - return ccnp.Parse() - } - name := r.ObjectMeta.Name - uid := r.ObjectMeta.UID - - retRules := api.Rules{} - - if r.Spec == nil && r.Specs == nil { - return nil, ErrEmptyCNP - } - - if r.Spec != nil { - if err := r.Spec.Sanitize(); err != nil { - return nil, NewErrParse(fmt.Sprintf("Invalid CiliumNetworkPolicy spec: %s", err)) - } - if r.Spec.NodeSelector.LabelSelector != nil { - return nil, NewErrParse("Invalid CiliumNetworkPolicy spec: rule cannot have NodeSelector") - } - cr := k8sCiliumUtils.ParseToCiliumRule(namespace, name, uid, r.Spec) - retRules = append(retRules, cr) - } - if r.Specs != nil { - for _, rule := range r.Specs { - if err := rule.Sanitize(); err != nil { - return nil, NewErrParse(fmt.Sprintf("Invalid CiliumNetworkPolicy specs: %s", err)) - - } - cr := k8sCiliumUtils.ParseToCiliumRule(namespace, name, uid, rule) - retRules = append(retRules, cr) - } - } - - return retRules, nil -} - -// GetControllerName returns the unique name for the controller manager. -func (r *CiliumNetworkPolicy) GetControllerName() string { - name := k8sUtils.GetObjNamespaceName(&r.ObjectMeta) - const staticLen = 6 - var str strings.Builder - str.Grow(staticLen + len(name) + len(k8sConst.CtrlPrefixPolicyStatus)) - str.WriteString(k8sConst.CtrlPrefixPolicyStatus) - str.WriteString(" (v2 ") - str.WriteString(name) - str.WriteString(")") - return str.String() -} - -// GetIdentityLabels returns all rule labels in the CiliumNetworkPolicy. -func (r *CiliumNetworkPolicy) GetIdentityLabels() labels.LabelArray { - namespace := k8sUtils.ExtractNamespace(&r.ObjectMeta) - name := r.ObjectMeta.Name - uid := r.ObjectMeta.UID - - // Even though the struct represents CiliumNetworkPolicy, we use it both for - // CiliumNetworkPolicy and CiliumClusterwideNetworkPolicy, so here we check for namespace - // to send correct derivedFrom label to get the correct policy labels. - derivedFrom := k8sCiliumUtils.ResourceTypeCiliumNetworkPolicy - if namespace == "" { - derivedFrom = k8sCiliumUtils.ResourceTypeCiliumClusterwideNetworkPolicy - } - return k8sCiliumUtils.GetPolicyLabels(namespace, name, uid, derivedFrom) -} - -// RequiresDerivative return true if the CNP has any rule that will create a new -// derivative rule. -func (r *CiliumNetworkPolicy) RequiresDerivative() bool { - if r.Spec != nil { - if r.Spec.RequiresDerivative() { - return true - } - } - if r.Specs != nil { - for _, rule := range r.Specs { - if rule.RequiresDerivative() { - return true - } - } - } - return false -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumNetworkPolicyList is a list of CiliumNetworkPolicy objects. -type CiliumNetworkPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumNetworkPolicy - Items []CiliumNetworkPolicy `json:"items"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/doc.go deleted file mode 100644 index 8b8c1ed1969..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:deepcopy-gen=package,register -// +k8s:openapi-gen=true -// +deepequal-gen=package - -// Package v2 is the v2 version of the API. -// +groupName=cilium.io -package v2 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/errors.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/errors.go deleted file mode 100644 index cc8a0653d5d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/errors.go +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2 - -var ( - // ErrEmptyCNP is an error representing a CNP that is empty, which means it is - // missing both a `spec` and `specs` (both are nil). - ErrEmptyCNP = NewErrParse("Invalid CiliumNetworkPolicy spec(s): empty policy") - - // ErrEmptyCCNP is an error representing a CCNP that is empty, which means it is - // missing both a `spec` and `specs` (both are nil). - ErrEmptyCCNP = NewErrParse("Invalid CiliumClusterwideNetworkPolicy spec(s): empty policy") - - // ParsingErr is for comparison when checking error types. - ParsingErr = NewErrParse("") -) - -// ErrParse is an error to describe where policy fails to parse due any invalid -// rule. -// -// +k8s:deepcopy-gen=false -// +deepequal-gen=false -type ErrParse struct { - msg string -} - -// NewErrParse returns a new ErrParse. -func NewErrParse(msg string) ErrParse { - return ErrParse{ - msg: msg, - } -} - -// Error returns the error message for parsing -func (e ErrParse) Error() string { - return e.msg -} - -// Is returns true if the given error is the type of 'ErrParse'. -func (_ ErrParse) Is(e error) bool { - _, ok := e.(ErrParse) - return ok -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/logfields.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/logfields.go deleted file mode 100644 index b4f5563730c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/logfields.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2 - -import ( - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var log = logging.DefaultLogger.WithField(logfields.LogSubsys, "k8s-apis-cilium.io-v2") diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/register.go deleted file mode 100644 index 3197b461308..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/register.go +++ /dev/null @@ -1,197 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - k8sconst "github.com/cilium/cilium/pkg/k8s/apis/cilium.io" -) - -const ( - // CustomResourceDefinitionGroup is the name of the third party resource group - CustomResourceDefinitionGroup = k8sconst.CustomResourceDefinitionGroup - - // CustomResourceDefinitionVersion is the current version of the resource - CustomResourceDefinitionVersion = "v2" - - // Cilium Network Policy (CNP) - - // CNPPluralName is the plural name of Cilium Network Policy - CNPPluralName = "ciliumnetworkpolicies" - - // CNPKindDefinition is the kind name for Cilium Network Policy - CNPKindDefinition = "CiliumNetworkPolicy" - - // CNPName is the full name of Cilium Network Policy - CNPName = CNPPluralName + "." + CustomResourceDefinitionGroup - - // Cilium Cluster wide Network Policy (CCNP) - - // CCNPPluralName is the plural name of Cilium Cluster wide Network Policy - CCNPPluralName = "ciliumclusterwidenetworkpolicies" - - // CCNPKindDefinition is the kind name for Cilium Cluster wide Network Policy - CCNPKindDefinition = "CiliumClusterwideNetworkPolicy" - - // CCNPName is the full name of Cilium Cluster wide Network Policy - CCNPName = CCNPPluralName + "." + CustomResourceDefinitionGroup - - // Cilium Egress Gateway Policy (CEGP) - - // CEGPPluralName is the plural name of Cilium Egress Gateway Policy - CEGPPluralName = "ciliumegressgatewaypolicies" - - // CEGPKindDefinition is the kind name of Cilium Egress Gateway Policy - CEGPKindDefinition = "CiliumEgressGatewayPolicy" - - // CEGPName is the full name of Cilium Egress Gateway Policy - CEGPName = CEGPPluralName + "." + CustomResourceDefinitionGroup - - // Cilium Endpoint (CEP) - - // CEPluralName is the plural name of Cilium Endpoint - CEPPluralName = "ciliumendpoints" - - // CEKindDefinition is the kind name for Cilium Endpoint - CEPKindDefinition = "CiliumEndpoint" - - // CEPName is the full name of Cilium Endpoint - CEPName = CEPPluralName + "." + CustomResourceDefinitionGroup - - // Cilium Node (CN) - - // CNPluralName is the plural name of Cilium Node - CNPluralName = "ciliumnodes" - - // CNKindDefinition is the kind name for Cilium Node - CNKindDefinition = "CiliumNode" - - // CNName is the full name of Cilium Node - CNName = CNPluralName + "." + CustomResourceDefinitionGroup - - // Cilium Identity - - // CIDPluralName is the plural name of Cilium Identity - CIDPluralName = "ciliumidentities" - - // CIDKindDefinition is the kind name for Cilium Identity - CIDKindDefinition = "CiliumIdentity" - - // CIDName is the full name of Cilium Identity - CIDName = CIDPluralName + "." + CustomResourceDefinitionGroup - - // Cilium Local Redirect Policy (CLRP) - - // CLRPPluralName is the plural name of Local Redirect Policy - CLRPPluralName = "ciliumlocalredirectpolicies" - - // CLRPKindDefinition is the kind name for Local Redirect Policy - CLRPKindDefinition = "CiliumLocalRedirectPolicy" - - // CLRPName is the full name of Local Redirect Policy - CLRPName = CLRPPluralName + "." + CustomResourceDefinitionGroup - - // Cilium External Workload (CEW) - - // CEWPluralName is the plural name of Cilium External Workload - CEWPluralName = "ciliumexternalworkloads" - - // CEWKindDefinition is the kind name for Cilium External Workload - CEWKindDefinition = "CiliumExternalWorkload" - - // CEWName is the full name of Cilium External Workload - CEWName = CEWPluralName + "." + CustomResourceDefinitionGroup - - // Cilium Cluster Envoy Config (CCEC) - - // CCECPluralName is the plural name of Cilium Clusterwide Envoy Config - CCECPluralName = "ciliumclusterwideenvoyconfigs" - - // CCECKindDefinition is the kind name of Cilium Clusterwide Envoy Config - CCECKindDefinition = "CiliumClusterwideEnvoyConfig" - - // CCECName is the full name of Cilium Clusterwide Envoy Config - CCECName = CCECPluralName + "." + CustomResourceDefinitionGroup - - // Cilium Envoy Config (CEC) - - // CECPluralName is the plural name of Cilium Envoy Config - CECPluralName = "ciliumenvoyconfigs" - - // CECKindDefinition is the kind name of Cilium Envoy Config - CECKindDefinition = "CiliumEnvoyConfig" - - // CECName is the full name of Cilium Envoy Config - CECName = CECPluralName + "." + CustomResourceDefinitionGroup -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{ - Group: CustomResourceDefinitionGroup, - Version: CustomResourceDefinitionVersion, -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - // SchemeBuilder is needed by DeepCopy generator. - SchemeBuilder runtime.SchemeBuilder - // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. - localSchemeBuilder = &SchemeBuilder - - // 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) - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CiliumNetworkPolicy{}, - &CiliumNetworkPolicyList{}, - &CiliumClusterwideNetworkPolicy{}, - &CiliumClusterwideNetworkPolicyList{}, - &CiliumEgressGatewayPolicy{}, - &CiliumEgressGatewayPolicyList{}, - &CiliumEndpoint{}, - &CiliumEndpointList{}, - &CiliumNode{}, - &CiliumNodeList{}, - &CiliumExternalWorkload{}, - &CiliumExternalWorkloadList{}, - &CiliumIdentity{}, - &CiliumIdentityList{}, - &CiliumLocalRedirectPolicy{}, - &CiliumLocalRedirectPolicyList{}, - &CiliumEnvoyConfig{}, - &CiliumEnvoyConfigList{}, - &CiliumClusterwideEnvoyConfig{}, - &CiliumClusterwideEnvoyConfigList{}, - ) - - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/types.go deleted file mode 100644 index 4a342e9422c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/types.go +++ /dev/null @@ -1,491 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2 - -import ( - "net" - "sort" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/cilium/cilium/api/v1/models" - alibabaCloudTypes "github.com/cilium/cilium/pkg/alibabacloud/eni/types" - eniTypes "github.com/cilium/cilium/pkg/aws/eni/types" - azureTypes "github.com/cilium/cilium/pkg/azure/types" - ipamTypes "github.com/cilium/cilium/pkg/ipam/types" - "github.com/cilium/cilium/pkg/node/addressing" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +kubebuilder:resource:categories={cilium},singular="ciliumendpoint",path="ciliumendpoints",scope="Namespaced",shortName={cep,ciliumep} -// +kubebuilder:printcolumn:JSONPath=".status.identity.id",description="Security Identity",name="Security Identity",type=integer -// +kubebuilder:printcolumn:JSONPath=".status.policy.ingress.state",description="Ingress enforcement in the endpoint",name="Ingress Enforcement",type=string,priority=1 -// +kubebuilder:printcolumn:JSONPath=".status.policy.egress.state",description="Egress enforcement in the endpoint",name="Egress Enforcement",type=string,priority=1 -// +kubebuilder:printcolumn:JSONPath=".status.visibility-policy-status",description="Status of visibility policy in the endpoint",name="Visibility Policy",type=string,priority=1 -// +kubebuilder:printcolumn:JSONPath=".status.state",description="Endpoint current state",name="Endpoint State",type=string -// +kubebuilder:printcolumn:JSONPath=".status.networking.addressing[0].ipv4",description="Endpoint IPv4 address",name="IPv4",type=string -// +kubebuilder:printcolumn:JSONPath=".status.networking.addressing[0].ipv6",description="Endpoint IPv6 address",name="IPv6",type=string -// +kubebuilder:storageversion - -// CiliumEndpoint is the status of a Cilium policy rule. -type CiliumEndpoint struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // +kubebuilder:validation:Optional - Status EndpointStatus `json:"status"` -} - -// EndpointPolicyState defines the state of the Policy mode: "enforcing", "non-enforcing", "disabled" -type EndpointPolicyState string - -// EndpointStatus is the status of a Cilium endpoint. -type EndpointStatus struct { - // ID is the cilium-agent-local ID of the endpoint. - ID int64 `json:"id,omitempty"` - - // Controllers is the list of failing controllers for this endpoint. - Controllers ControllerList `json:"controllers,omitempty"` - - // ExternalIdentifiers is a set of identifiers to identify the endpoint - // apart from the pod name. This includes container runtime IDs. - ExternalIdentifiers *models.EndpointIdentifiers `json:"external-identifiers,omitempty"` - - // Health is the overall endpoint & subcomponent health. - Health *models.EndpointHealth `json:"health,omitempty"` - - // Identity is the security identity associated with the endpoint - Identity *EndpointIdentity `json:"identity,omitempty"` - - // Log is the list of the last few warning and error log entries - Log []*models.EndpointStatusChange `json:"log,omitempty"` - - // Networking is the networking properties of the endpoint. - // - // +kubebuilder:validation:Optional - Networking *EndpointNetworking `json:"networking,omitempty"` - - // Encryption is the encryption configuration of the node - // - // +kubebuilder:validation:Optional - Encryption EncryptionSpec `json:"encryption,omitempty"` - - Policy *EndpointPolicy `json:"policy,omitempty"` - - VisibilityPolicyStatus *string `json:"visibility-policy-status,omitempty"` - - // State is the state of the endpoint. - // - // +kubebuilder:validation:Enum=creating;waiting-for-identity;not-ready;waiting-to-regenerate;regenerating;restoring;ready;disconnecting;disconnected;invalid - State string `json:"state,omitempty"` - - NamedPorts models.NamedPorts `json:"named-ports,omitempty"` -} - -// EndpointStatusLogEntries is the maximum number of log entries in -// EndpointStatus.Log. -const EndpointStatusLogEntries = 5 - -// +k8s:deepcopy-gen=false - -// ControllerList is a list of ControllerStatus. -type ControllerList []ControllerStatus - -// Sort sorts the ControllerList by controller name -func (c ControllerList) Sort() { - sort.Slice(c, func(i, j int) bool { return c[i].Name < c[j].Name }) -} - -// ControllerStatus is the status of a failing controller. -type ControllerStatus struct { - // Name is the name of the controller - Name string `json:"name,omitempty"` - - // Configuration is the controller configuration - Configuration *models.ControllerStatusConfiguration `json:"configuration,omitempty"` - - // Status is the status of the controller - Status ControllerStatusStatus `json:"status,omitempty"` - - // UUID is the UUID of the controller - UUID string `json:"uuid,omitempty"` -} - -// +k8s:deepcopy-gen=false - -// ControllerStatusStatus is the detailed status section of a controller. -type ControllerStatusStatus struct { - ConsecutiveFailureCount int64 `json:"consecutive-failure-count,omitempty"` - FailureCount int64 `json:"failure-count,omitempty"` - LastFailureMsg string `json:"last-failure-msg,omitempty"` - LastFailureTimestamp string `json:"last-failure-timestamp,omitempty"` - LastSuccessTimestamp string `json:"last-success-timestamp,omitempty"` - SuccessCount int64 `json:"success-count,omitempty"` -} - -// EndpointPolicy represents the endpoint's policy by listing all allowed -// ingress and egress identities in combination with L4 port and protocol. -type EndpointPolicy struct { - Ingress *EndpointPolicyDirection `json:"ingress,omitempty"` - Egress *EndpointPolicyDirection `json:"egress,omitempty"` -} - -// EndpointPolicyDirection is the list of allowed identities per direction. -type EndpointPolicyDirection struct { - Enforcing bool `json:"enforcing"` - Allowed AllowedIdentityList `json:"allowed,omitempty"` - Denied DenyIdentityList `json:"denied,omitempty"` - // Deprecated - Removing AllowedIdentityList `json:"removing,omitempty"` - // Deprecated - Adding AllowedIdentityList `json:"adding,omitempty"` - State EndpointPolicyState `json:"state,omitempty"` -} - -// IdentityTuple specifies a peer by identity, destination port and protocol. -type IdentityTuple struct { - Identity uint64 `json:"identity,omitempty"` - IdentityLabels map[string]string `json:"identity-labels,omitempty"` - DestPort uint16 `json:"dest-port,omitempty"` - Protocol uint8 `json:"protocol,omitempty"` -} - -// +k8s:deepcopy-gen=false - -// IdentityList is a list of IdentityTuple. -type IdentityList []IdentityTuple - -// Sort sorts a list IdentityList by numeric identity, port and protocol. -func (a IdentityList) Sort() { - sort.Slice(a, func(i, j int) bool { - if a[i].Identity < a[j].Identity { - return true - } else if a[i].Identity == a[j].Identity { - if a[i].DestPort < a[j].DestPort { - return true - } else if a[i].DestPort == a[j].DestPort { - return a[i].Protocol < a[j].Protocol - } - } - return false - }) -} - -// +k8s:deepcopy-gen=false - -// AllowedIdentityList is a list of IdentityTuples that species peers that are -// allowed. -type AllowedIdentityList IdentityList - -// Sort sorts a list IdentityList by numeric identity, port and protocol. -func (a AllowedIdentityList) Sort() { - IdentityList(a).Sort() -} - -// +k8s:deepcopy-gen=false - -// DenyIdentityList is a list of IdentityTuples that species peers that are -// denied. -type DenyIdentityList IdentityList - -// Sort sorts a list IdentityList by numeric identity, port and protocol. -func (d DenyIdentityList) Sort() { - IdentityList(d).Sort() -} - -// EndpointIdentity is the identity information of an endpoint. -type EndpointIdentity struct { - // ID is the numeric identity of the endpoint - ID int64 `json:"id,omitempty"` - - // Labels is the list of labels associated with the identity - Labels []string `json:"labels,omitempty"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium},singular="ciliumidentity",path="ciliumidentities",scope="Cluster",shortName={ciliumid} -// +kubebuilder:printcolumn:JSONPath=".metadata.labels.io\\.kubernetes\\.pod\\.namespace",description="The namespace of the entity",name="Namespace",type=string -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",description="The age of the identity",name="Age",type=date -// +kubebuilder:subresource:status -// +kubebuilder:storageversion - -// CiliumIdentity is a CRD that represents an identity managed by Cilium. -// It is intended as a backing store for identity allocation, acting as the -// global coordination backend, and can be used in place of a KVStore (such as -// etcd). -// The name of the CRD is the numeric identity and the labels on the CRD object -// are the kubernetes sourced labels seen by cilium. This is currently the -// only label source possible when running under kubernetes. Non-kubernetes -// labels are filtered but all labels, from all sources, are places in the -// SecurityLabels field. These also include the source and are used to define -// the identity. -// The labels under metav1.ObjectMeta can be used when searching for -// CiliumIdentity instances that include particular labels. This can be done -// with invocations such as: -// -// kubectl get ciliumid -l 'foo=bar' -type CiliumIdentity struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // SecurityLabels is the source-of-truth set of labels for this identity. - SecurityLabels map[string]string `json:"security-labels"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +deepequal-gen=false - -// CiliumIdentityList is a list of CiliumIdentity objects. -type CiliumIdentityList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumIdentity - Items []CiliumIdentity `json:"items"` -} - -// +k8s:deepcopy-gen=false - -// AddressPair is a pair of IPv4 and/or IPv6 address. -type AddressPair struct { - IPV4 string `json:"ipv4,omitempty"` - IPV6 string `json:"ipv6,omitempty"` -} - -// +k8s:deepcopy-gen=false - -// AddressPairList is a list of address pairs. -type AddressPairList []*AddressPair - -// Sort sorts an AddressPairList by IPv4 and IPv6 address. -func (a AddressPairList) Sort() { - sort.Slice(a, func(i, j int) bool { - if a[i].IPV4 < a[j].IPV4 { - return true - } else if a[i].IPV4 == a[j].IPV4 { - return a[i].IPV6 < a[j].IPV6 - } - return false - }) -} - -// EndpointNetworking is the addressing information of an endpoint. -type EndpointNetworking struct { - // IP4/6 addresses assigned to this Endpoint - Addressing AddressPairList `json:"addressing"` - - // NodeIP is the IP of the node the endpoint is running on. The IP must - // be reachable between nodes. - NodeIP string `json:"node,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumEndpointList is a list of CiliumEndpoint objects. -type CiliumEndpointList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumEndpoint - Items []CiliumEndpoint `json:"items"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium},singular="ciliumnode",path="ciliumnodes",scope="Cluster",shortName={cn,ciliumn} -// +kubebuilder:printcolumn:JSONPath=".spec.addresses[?(@.type==\"CiliumInternalIP\")].ip",description="Cilium internal IP for this node",name="CiliumInternalIP",type=string -// +kubebuilder:printcolumn:JSONPath=".spec.addresses[?(@.type==\"InternalIP\")].ip",description="IP of the node",name="InternalIP",type=string -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Ciliumnode",name="Age",type=date -// +kubebuilder:storageversion -// +kubebuilder:subresource:status - -// CiliumNode represents a node managed by Cilium. It contains a specification -// to control various node specific configuration aspects and a status section -// to represent the status of the node. -type CiliumNode struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec defines the desired specification/configuration of the node. - Spec NodeSpec `json:"spec"` - - // Status defines the realized specification/configuration and status - // of the node. - // - // +kubebuilder:validation:Optional - Status NodeStatus `json:"status,omitempty"` -} - -// NodeAddress is a node address. -type NodeAddress struct { - // Type is the type of the node address - Type addressing.AddressType `json:"type,omitempty"` - - // IP is an IP of a node - IP string `json:"ip,omitempty"` -} - -// NodeSpec is the configuration specific to a node. -type NodeSpec struct { - // InstanceID is the identifier of the node. This is different from the - // node name which is typically the FQDN of the node. The InstanceID - // typically refers to the identifier used by the cloud provider or - // some other means of identification. - InstanceID string `json:"instance-id,omitempty"` - - // BootID is a unique node identifier generated on boot - // - // +kubebuilder:validation:Optional - BootID string `json:"bootid,omitempty"` - - // Addresses is the list of all node addresses. - // - // +kubebuilder:validation:Optional - Addresses []NodeAddress `json:"addresses,omitempty"` - - // HealthAddressing is the addressing information for health connectivity - // checking. - // - // +kubebuilder:validation:Optional - HealthAddressing HealthAddressingSpec `json:"health,omitempty"` - - // IngressAddressing is the addressing information for Ingress listener. - // - // +kubebuilder:validation:Optional - IngressAddressing AddressPair `json:"ingress,omitempty"` - - // Encryption is the encryption configuration of the node. - // - // +kubebuilder:validation:Optional - Encryption EncryptionSpec `json:"encryption,omitempty"` - - // ENI is the AWS ENI specific configuration. - // - // +kubebuilder:validation:Optional - ENI eniTypes.ENISpec `json:"eni,omitempty"` - - // Azure is the Azure IPAM specific configuration. - // - // +kubebuilder:validation:Optional - Azure azureTypes.AzureSpec `json:"azure,omitempty"` - - // AlibabaCloud is the AlibabaCloud IPAM specific configuration. - // - // +kubebuilder:validation:Optional - AlibabaCloud alibabaCloudTypes.Spec `json:"alibaba-cloud,omitempty"` - - // IPAM is the address management specification. This section can be - // populated by a user or it can be automatically populated by an IPAM - // operator. - // - // +kubebuilder:validation:Optional - IPAM ipamTypes.IPAMSpec `json:"ipam,omitempty"` - - // NodeIdentity is the Cilium numeric identity allocated for the node, if any. - // - // +kubebuilder:validation:Optional - NodeIdentity uint64 `json:"nodeidentity,omitempty"` -} - -// HealthAddressingSpec is the addressing information required to do -// connectivity health checking. -type HealthAddressingSpec struct { - // IPv4 is the IPv4 address of the IPv4 health endpoint. - // - // +kubebuilder:validation:Optional - IPv4 string `json:"ipv4,omitempty"` - - // IPv6 is the IPv6 address of the IPv4 health endpoint. - // - // +kubebuilder:validation:Optional - IPv6 string `json:"ipv6,omitempty"` -} - -// EncryptionSpec defines the encryption relevant configuration of a node. -type EncryptionSpec struct { - // Key is the index to the key to use for encryption or 0 if encryption is - // disabled. - // - // +kubebuilder:validation:Optional - Key int `json:"key,omitempty"` -} - -// NodeStatus is the status of a node. -type NodeStatus struct { - // ENI is the AWS ENI specific status of the node. - // - // +kubebuilder:validation:Optional - ENI eniTypes.ENIStatus `json:"eni,omitempty"` - - // Azure is the Azure specific status of the node. - // - // +kubebuilder:validation:Optional - Azure azureTypes.AzureStatus `json:"azure,omitempty"` - - // IPAM is the IPAM status of the node. - // - // +kubebuilder:validation:Optional - IPAM ipamTypes.IPAMStatus `json:"ipam,omitempty"` - - // AlibabaCloud is the AlibabaCloud specific status of the node. - // - // +kubebuilder:validation:Optional - AlibabaCloud alibabaCloudTypes.ENIStatus `json:"alibaba-cloud,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +deepequal-gen=false - -// CiliumNodeList is a list of CiliumNode objects. -type CiliumNodeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumNode - Items []CiliumNode `json:"items"` -} - -// InstanceID returns the InstanceID of a CiliumNode. -func (n *CiliumNode) InstanceID() (instanceID string) { - if n != nil { - instanceID = n.Spec.InstanceID - // OBSOLETE: This fallback can be removed in Cilium 1.9 - if instanceID == "" { - instanceID = n.Spec.ENI.InstanceID - } - } - return -} - -func (n NodeAddress) ToString() string { - return n.IP -} - -func (n NodeAddress) AddrType() addressing.AddressType { - return n.Type -} - -// GetIP returns one of the CiliumNode's IP addresses available with the -// following priority: -// - NodeInternalIP -// - NodeExternalIP -// - other IP address type -// An error is returned if GetIP fails to extract an IP from the CiliumNode -// based on the provided address family. -func (n *CiliumNode) GetIP(ipv6 bool) net.IP { - return addressing.ExtractNodeIP[NodeAddress](n.Spec.Addresses, ipv6) -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go deleted file mode 100644 index cf85aaf6d07..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go +++ /dev/null @@ -1,1395 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v2 - -import ( - models "github.com/cilium/cilium/api/v1/models" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - api "github.com/cilium/cilium/pkg/policy/api" - 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 *CiliumClusterwideEnvoyConfig) DeepCopyInto(out *CiliumClusterwideEnvoyConfig) { - *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 CiliumClusterwideEnvoyConfig. -func (in *CiliumClusterwideEnvoyConfig) DeepCopy() *CiliumClusterwideEnvoyConfig { - if in == nil { - return nil - } - out := new(CiliumClusterwideEnvoyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumClusterwideEnvoyConfig) 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 *CiliumClusterwideEnvoyConfigList) DeepCopyInto(out *CiliumClusterwideEnvoyConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumClusterwideEnvoyConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumClusterwideEnvoyConfigList. -func (in *CiliumClusterwideEnvoyConfigList) DeepCopy() *CiliumClusterwideEnvoyConfigList { - if in == nil { - return nil - } - out := new(CiliumClusterwideEnvoyConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumClusterwideEnvoyConfigList) 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 *CiliumClusterwideNetworkPolicy) DeepCopyInto(out *CiliumClusterwideNetworkPolicy) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Spec != nil { - in, out := &in.Spec, &out.Spec - *out = new(api.Rule) - (*in).DeepCopyInto(*out) - } - if in.Specs != nil { - in, out := &in.Specs, &out.Specs - *out = make(api.Rules, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(api.Rule) - (*in).DeepCopyInto(*out) - } - } - } - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumClusterwideNetworkPolicy. -func (in *CiliumClusterwideNetworkPolicy) DeepCopy() *CiliumClusterwideNetworkPolicy { - if in == nil { - return nil - } - out := new(CiliumClusterwideNetworkPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumClusterwideNetworkPolicy) 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 *CiliumClusterwideNetworkPolicyList) DeepCopyInto(out *CiliumClusterwideNetworkPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumClusterwideNetworkPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumClusterwideNetworkPolicyList. -func (in *CiliumClusterwideNetworkPolicyList) DeepCopy() *CiliumClusterwideNetworkPolicyList { - if in == nil { - return nil - } - out := new(CiliumClusterwideNetworkPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumClusterwideNetworkPolicyList) 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 *CiliumEgressGatewayPolicy) DeepCopyInto(out *CiliumEgressGatewayPolicy) { - *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 CiliumEgressGatewayPolicy. -func (in *CiliumEgressGatewayPolicy) DeepCopy() *CiliumEgressGatewayPolicy { - if in == nil { - return nil - } - out := new(CiliumEgressGatewayPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumEgressGatewayPolicy) 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 *CiliumEgressGatewayPolicyList) DeepCopyInto(out *CiliumEgressGatewayPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumEgressGatewayPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumEgressGatewayPolicyList. -func (in *CiliumEgressGatewayPolicyList) DeepCopy() *CiliumEgressGatewayPolicyList { - if in == nil { - return nil - } - out := new(CiliumEgressGatewayPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumEgressGatewayPolicyList) 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 *CiliumEgressGatewayPolicySpec) DeepCopyInto(out *CiliumEgressGatewayPolicySpec) { - *out = *in - if in.Selectors != nil { - in, out := &in.Selectors, &out.Selectors - *out = make([]EgressRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DestinationCIDRs != nil { - in, out := &in.DestinationCIDRs, &out.DestinationCIDRs - *out = make([]IPv4CIDR, len(*in)) - copy(*out, *in) - } - if in.ExcludedCIDRs != nil { - in, out := &in.ExcludedCIDRs, &out.ExcludedCIDRs - *out = make([]IPv4CIDR, len(*in)) - copy(*out, *in) - } - if in.EgressGateway != nil { - in, out := &in.EgressGateway, &out.EgressGateway - *out = new(EgressGateway) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumEgressGatewayPolicySpec. -func (in *CiliumEgressGatewayPolicySpec) DeepCopy() *CiliumEgressGatewayPolicySpec { - if in == nil { - return nil - } - out := new(CiliumEgressGatewayPolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumEndpoint) DeepCopyInto(out *CiliumEndpoint) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumEndpoint. -func (in *CiliumEndpoint) DeepCopy() *CiliumEndpoint { - if in == nil { - return nil - } - out := new(CiliumEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumEndpoint) 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 *CiliumEndpointList) DeepCopyInto(out *CiliumEndpointList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumEndpoint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumEndpointList. -func (in *CiliumEndpointList) DeepCopy() *CiliumEndpointList { - if in == nil { - return nil - } - out := new(CiliumEndpointList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumEndpointList) 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 *CiliumEnvoyConfig) DeepCopyInto(out *CiliumEnvoyConfig) { - *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 CiliumEnvoyConfig. -func (in *CiliumEnvoyConfig) DeepCopy() *CiliumEnvoyConfig { - if in == nil { - return nil - } - out := new(CiliumEnvoyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumEnvoyConfig) 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 *CiliumEnvoyConfigList) DeepCopyInto(out *CiliumEnvoyConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumEnvoyConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumEnvoyConfigList. -func (in *CiliumEnvoyConfigList) DeepCopy() *CiliumEnvoyConfigList { - if in == nil { - return nil - } - out := new(CiliumEnvoyConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumEnvoyConfigList) 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 *CiliumEnvoyConfigSpec) DeepCopyInto(out *CiliumEnvoyConfigSpec) { - *out = *in - if in.Services != nil { - in, out := &in.Services, &out.Services - *out = make([]*ServiceListener, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(ServiceListener) - **out = **in - } - } - } - if in.BackendServices != nil { - in, out := &in.BackendServices, &out.BackendServices - *out = make([]*Service, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(Service) - (*in).DeepCopyInto(*out) - } - } - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]XDSResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumEnvoyConfigSpec. -func (in *CiliumEnvoyConfigSpec) DeepCopy() *CiliumEnvoyConfigSpec { - if in == nil { - return nil - } - out := new(CiliumEnvoyConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumExternalWorkload) DeepCopyInto(out *CiliumExternalWorkload) { - *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 CiliumExternalWorkload. -func (in *CiliumExternalWorkload) DeepCopy() *CiliumExternalWorkload { - if in == nil { - return nil - } - out := new(CiliumExternalWorkload) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumExternalWorkload) 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 *CiliumExternalWorkloadList) DeepCopyInto(out *CiliumExternalWorkloadList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumExternalWorkload, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumExternalWorkloadList. -func (in *CiliumExternalWorkloadList) DeepCopy() *CiliumExternalWorkloadList { - if in == nil { - return nil - } - out := new(CiliumExternalWorkloadList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumExternalWorkloadList) 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 *CiliumExternalWorkloadSpec) DeepCopyInto(out *CiliumExternalWorkloadSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumExternalWorkloadSpec. -func (in *CiliumExternalWorkloadSpec) DeepCopy() *CiliumExternalWorkloadSpec { - if in == nil { - return nil - } - out := new(CiliumExternalWorkloadSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumExternalWorkloadStatus) DeepCopyInto(out *CiliumExternalWorkloadStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumExternalWorkloadStatus. -func (in *CiliumExternalWorkloadStatus) DeepCopy() *CiliumExternalWorkloadStatus { - if in == nil { - return nil - } - out := new(CiliumExternalWorkloadStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumIdentity) DeepCopyInto(out *CiliumIdentity) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.SecurityLabels != nil { - in, out := &in.SecurityLabels, &out.SecurityLabels - *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 CiliumIdentity. -func (in *CiliumIdentity) DeepCopy() *CiliumIdentity { - if in == nil { - return nil - } - out := new(CiliumIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumIdentity) 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 *CiliumIdentityList) DeepCopyInto(out *CiliumIdentityList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumIdentity, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumIdentityList. -func (in *CiliumIdentityList) DeepCopy() *CiliumIdentityList { - if in == nil { - return nil - } - out := new(CiliumIdentityList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumIdentityList) 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 *CiliumLocalRedirectPolicy) DeepCopyInto(out *CiliumLocalRedirectPolicy) { - *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 CiliumLocalRedirectPolicy. -func (in *CiliumLocalRedirectPolicy) DeepCopy() *CiliumLocalRedirectPolicy { - if in == nil { - return nil - } - out := new(CiliumLocalRedirectPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumLocalRedirectPolicy) 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 *CiliumLocalRedirectPolicyList) DeepCopyInto(out *CiliumLocalRedirectPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumLocalRedirectPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumLocalRedirectPolicyList. -func (in *CiliumLocalRedirectPolicyList) DeepCopy() *CiliumLocalRedirectPolicyList { - if in == nil { - return nil - } - out := new(CiliumLocalRedirectPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumLocalRedirectPolicyList) 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 *CiliumLocalRedirectPolicySpec) DeepCopyInto(out *CiliumLocalRedirectPolicySpec) { - *out = *in - in.RedirectFrontend.DeepCopyInto(&out.RedirectFrontend) - in.RedirectBackend.DeepCopyInto(&out.RedirectBackend) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumLocalRedirectPolicySpec. -func (in *CiliumLocalRedirectPolicySpec) DeepCopy() *CiliumLocalRedirectPolicySpec { - if in == nil { - return nil - } - out := new(CiliumLocalRedirectPolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumLocalRedirectPolicyStatus) DeepCopyInto(out *CiliumLocalRedirectPolicyStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumLocalRedirectPolicyStatus. -func (in *CiliumLocalRedirectPolicyStatus) DeepCopy() *CiliumLocalRedirectPolicyStatus { - if in == nil { - return nil - } - out := new(CiliumLocalRedirectPolicyStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumNetworkPolicy) DeepCopyInto(out *CiliumNetworkPolicy) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Spec != nil { - in, out := &in.Spec, &out.Spec - *out = new(api.Rule) - (*in).DeepCopyInto(*out) - } - if in.Specs != nil { - in, out := &in.Specs, &out.Specs - *out = make(api.Rules, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(api.Rule) - (*in).DeepCopyInto(*out) - } - } - } - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumNetworkPolicy. -func (in *CiliumNetworkPolicy) DeepCopy() *CiliumNetworkPolicy { - if in == nil { - return nil - } - out := new(CiliumNetworkPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumNetworkPolicy) 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 *CiliumNetworkPolicyList) DeepCopyInto(out *CiliumNetworkPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumNetworkPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumNetworkPolicyList. -func (in *CiliumNetworkPolicyList) DeepCopy() *CiliumNetworkPolicyList { - if in == nil { - return nil - } - out := new(CiliumNetworkPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumNetworkPolicyList) 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 *CiliumNetworkPolicyNodeStatus) DeepCopyInto(out *CiliumNetworkPolicyNodeStatus) { - *out = *in - in.LastUpdated.DeepCopyInto(&out.LastUpdated) - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *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 CiliumNetworkPolicyNodeStatus. -func (in *CiliumNetworkPolicyNodeStatus) DeepCopy() *CiliumNetworkPolicyNodeStatus { - if in == nil { - return nil - } - out := new(CiliumNetworkPolicyNodeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumNetworkPolicyStatus) DeepCopyInto(out *CiliumNetworkPolicyStatus) { - *out = *in - if in.Nodes != nil { - in, out := &in.Nodes, &out.Nodes - *out = make(map[string]CiliumNetworkPolicyNodeStatus, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.DerivativePolicies != nil { - in, out := &in.DerivativePolicies, &out.DerivativePolicies - *out = make(map[string]CiliumNetworkPolicyNodeStatus, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumNetworkPolicyStatus. -func (in *CiliumNetworkPolicyStatus) DeepCopy() *CiliumNetworkPolicyStatus { - if in == nil { - return nil - } - out := new(CiliumNetworkPolicyStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumNode) DeepCopyInto(out *CiliumNode) { - *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 CiliumNode. -func (in *CiliumNode) DeepCopy() *CiliumNode { - if in == nil { - return nil - } - out := new(CiliumNode) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumNode) 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 *CiliumNodeList) DeepCopyInto(out *CiliumNodeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumNode, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumNodeList. -func (in *CiliumNodeList) DeepCopy() *CiliumNodeList { - if in == nil { - return nil - } - out := new(CiliumNodeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumNodeList) 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 *ControllerStatus) DeepCopyInto(out *ControllerStatus) { - *out = *in - if in.Configuration != nil { - in, out := &in.Configuration, &out.Configuration - *out = new(models.ControllerStatusConfiguration) - **out = **in - } - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerStatus. -func (in *ControllerStatus) DeepCopy() *ControllerStatus { - if in == nil { - return nil - } - out := new(ControllerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressGateway) DeepCopyInto(out *EgressGateway) { - *out = *in - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressGateway. -func (in *EgressGateway) DeepCopy() *EgressGateway { - if in == nil { - return nil - } - out := new(EgressGateway) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressRule) DeepCopyInto(out *EgressRule) { - *out = *in - if in.NamespaceSelector != nil { - in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.PodSelector != nil { - in, out := &in.PodSelector, &out.PodSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressRule. -func (in *EgressRule) DeepCopy() *EgressRule { - if in == nil { - return nil - } - out := new(EgressRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EncryptionSpec) DeepCopyInto(out *EncryptionSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionSpec. -func (in *EncryptionSpec) DeepCopy() *EncryptionSpec { - if in == nil { - return nil - } - out := new(EncryptionSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointIdentity) DeepCopyInto(out *EndpointIdentity) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointIdentity. -func (in *EndpointIdentity) DeepCopy() *EndpointIdentity { - if in == nil { - return nil - } - out := new(EndpointIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointNetworking) DeepCopyInto(out *EndpointNetworking) { - *out = *in - if in.Addressing != nil { - in, out := &in.Addressing, &out.Addressing - *out = make(AddressPairList, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(AddressPair) - **out = **in - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointNetworking. -func (in *EndpointNetworking) DeepCopy() *EndpointNetworking { - if in == nil { - return nil - } - out := new(EndpointNetworking) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointPolicy) DeepCopyInto(out *EndpointPolicy) { - *out = *in - if in.Ingress != nil { - in, out := &in.Ingress, &out.Ingress - *out = new(EndpointPolicyDirection) - (*in).DeepCopyInto(*out) - } - if in.Egress != nil { - in, out := &in.Egress, &out.Egress - *out = new(EndpointPolicyDirection) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPolicy. -func (in *EndpointPolicy) DeepCopy() *EndpointPolicy { - if in == nil { - return nil - } - out := new(EndpointPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointPolicyDirection) DeepCopyInto(out *EndpointPolicyDirection) { - *out = *in - if in.Allowed != nil { - in, out := &in.Allowed, &out.Allowed - *out = make(AllowedIdentityList, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Denied != nil { - in, out := &in.Denied, &out.Denied - *out = make(DenyIdentityList, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Removing != nil { - in, out := &in.Removing, &out.Removing - *out = make(AllowedIdentityList, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Adding != nil { - in, out := &in.Adding, &out.Adding - *out = make(AllowedIdentityList, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPolicyDirection. -func (in *EndpointPolicyDirection) DeepCopy() *EndpointPolicyDirection { - if in == nil { - return nil - } - out := new(EndpointPolicyDirection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointStatus) DeepCopyInto(out *EndpointStatus) { - *out = *in - if in.Controllers != nil { - in, out := &in.Controllers, &out.Controllers - *out = make(ControllerList, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ExternalIdentifiers != nil { - in, out := &in.ExternalIdentifiers, &out.ExternalIdentifiers - *out = new(models.EndpointIdentifiers) - **out = **in - } - if in.Health != nil { - in, out := &in.Health, &out.Health - *out = new(models.EndpointHealth) - **out = **in - } - if in.Identity != nil { - in, out := &in.Identity, &out.Identity - *out = new(EndpointIdentity) - (*in).DeepCopyInto(*out) - } - if in.Log != nil { - in, out := &in.Log, &out.Log - *out = make([]*models.EndpointStatusChange, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(models.EndpointStatusChange) - **out = **in - } - } - } - if in.Networking != nil { - in, out := &in.Networking, &out.Networking - *out = new(EndpointNetworking) - (*in).DeepCopyInto(*out) - } - out.Encryption = in.Encryption - if in.Policy != nil { - in, out := &in.Policy, &out.Policy - *out = new(EndpointPolicy) - (*in).DeepCopyInto(*out) - } - if in.VisibilityPolicyStatus != nil { - in, out := &in.VisibilityPolicyStatus, &out.VisibilityPolicyStatus - *out = new(string) - **out = **in - } - if in.NamedPorts != nil { - in, out := &in.NamedPorts, &out.NamedPorts - *out = make(models.NamedPorts, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(models.Port) - **out = **in - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointStatus. -func (in *EndpointStatus) DeepCopy() *EndpointStatus { - if in == nil { - return nil - } - out := new(EndpointStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Frontend) DeepCopyInto(out *Frontend) { - *out = *in - if in.ToPorts != nil { - in, out := &in.ToPorts, &out.ToPorts - *out = make([]PortInfo, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Frontend. -func (in *Frontend) DeepCopy() *Frontend { - if in == nil { - return nil - } - out := new(Frontend) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HealthAddressingSpec) DeepCopyInto(out *HealthAddressingSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthAddressingSpec. -func (in *HealthAddressingSpec) DeepCopy() *HealthAddressingSpec { - if in == nil { - return nil - } - out := new(HealthAddressingSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IdentityTuple) DeepCopyInto(out *IdentityTuple) { - *out = *in - if in.IdentityLabels != nil { - in, out := &in.IdentityLabels, &out.IdentityLabels - *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 IdentityTuple. -func (in *IdentityTuple) DeepCopy() *IdentityTuple { - if in == nil { - return nil - } - out := new(IdentityTuple) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeAddress) DeepCopyInto(out *NodeAddress) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAddress. -func (in *NodeAddress) DeepCopy() *NodeAddress { - if in == nil { - return nil - } - out := new(NodeAddress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]NodeAddress, len(*in)) - copy(*out, *in) - } - out.HealthAddressing = in.HealthAddressing - out.IngressAddressing = in.IngressAddressing - out.Encryption = in.Encryption - in.ENI.DeepCopyInto(&out.ENI) - out.Azure = in.Azure - in.AlibabaCloud.DeepCopyInto(&out.AlibabaCloud) - in.IPAM.DeepCopyInto(&out.IPAM) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec. -func (in *NodeSpec) DeepCopy() *NodeSpec { - if in == nil { - return nil - } - out := new(NodeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { - *out = *in - in.ENI.DeepCopyInto(&out.ENI) - in.Azure.DeepCopyInto(&out.Azure) - in.IPAM.DeepCopyInto(&out.IPAM) - in.AlibabaCloud.DeepCopyInto(&out.AlibabaCloud) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus. -func (in *NodeStatus) DeepCopy() *NodeStatus { - if in == nil { - return nil - } - out := new(NodeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PortInfo) DeepCopyInto(out *PortInfo) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortInfo. -func (in *PortInfo) DeepCopy() *PortInfo { - if in == nil { - return nil - } - out := new(PortInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedirectBackend) DeepCopyInto(out *RedirectBackend) { - *out = *in - in.LocalEndpointSelector.DeepCopyInto(&out.LocalEndpointSelector) - if in.ToPorts != nil { - in, out := &in.ToPorts, &out.ToPorts - *out = make([]PortInfo, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectBackend. -func (in *RedirectBackend) DeepCopy() *RedirectBackend { - if in == nil { - return nil - } - out := new(RedirectBackend) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedirectFrontend) DeepCopyInto(out *RedirectFrontend) { - *out = *in - if in.AddressMatcher != nil { - in, out := &in.AddressMatcher, &out.AddressMatcher - *out = new(Frontend) - (*in).DeepCopyInto(*out) - } - if in.ServiceMatcher != nil { - in, out := &in.ServiceMatcher, &out.ServiceMatcher - *out = new(ServiceInfo) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectFrontend. -func (in *RedirectFrontend) DeepCopy() *RedirectFrontend { - if in == nil { - return nil - } - out := new(RedirectFrontend) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Service) DeepCopyInto(out *Service) { - *out = *in - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service. -func (in *Service) DeepCopy() *Service { - if in == nil { - return nil - } - out := new(Service) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceInfo) DeepCopyInto(out *ServiceInfo) { - *out = *in - if in.ToPorts != nil { - in, out := &in.ToPorts, &out.ToPorts - *out = make([]PortInfo, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInfo. -func (in *ServiceInfo) DeepCopy() *ServiceInfo { - if in == nil { - return nil - } - out := new(ServiceInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceListener) DeepCopyInto(out *ServiceListener) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceListener. -func (in *ServiceListener) DeepCopy() *ServiceListener { - if in == nil { - return nil - } - out := new(ServiceListener) - in.DeepCopyInto(out) - return out -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XDSResource. -func (in *XDSResource) DeepCopy() *XDSResource { - if in == nil { - return nil - } - out := new(XDSResource) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/zz_generated.deepequal.go deleted file mode 100644 index 1f363e57673..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2/zz_generated.deepequal.go +++ /dev/null @@ -1,1315 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package v2 - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AddressPair) DeepEqual(other *AddressPair) bool { - if other == nil { - return false - } - - if in.IPV4 != other.IPV4 { - return false - } - if in.IPV6 != other.IPV6 { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AddressPairList) DeepEqual(other *AddressPairList) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual((*other)[i]) { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AllowedIdentityList) DeepEqual(other *AllowedIdentityList) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumClusterwideEnvoyConfig) DeepEqual(other *CiliumClusterwideEnvoyConfig) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// deepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumClusterwideNetworkPolicy) deepEqual(other *CiliumClusterwideNetworkPolicy) bool { - if other == nil { - return false - } - - if (in.Spec == nil) != (other.Spec == nil) { - return false - } else if in.Spec != nil { - if !in.Spec.DeepEqual(other.Spec) { - return false - } - } - - if ((in.Specs != nil) && (other.Specs != nil)) || ((in.Specs == nil) != (other.Specs == nil)) { - in, other := &in.Specs, &other.Specs - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if !in.Status.DeepEqual(&other.Status) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumEgressGatewayPolicy) DeepEqual(other *CiliumEgressGatewayPolicy) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumEgressGatewayPolicySpec) DeepEqual(other *CiliumEgressGatewayPolicySpec) bool { - if other == nil { - return false - } - - if ((in.Selectors != nil) && (other.Selectors != nil)) || ((in.Selectors == nil) != (other.Selectors == nil)) { - in, other := &in.Selectors, &other.Selectors - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.DestinationCIDRs != nil) && (other.DestinationCIDRs != nil)) || ((in.DestinationCIDRs == nil) != (other.DestinationCIDRs == nil)) { - in, other := &in.DestinationCIDRs, &other.DestinationCIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if ((in.ExcludedCIDRs != nil) && (other.ExcludedCIDRs != nil)) || ((in.ExcludedCIDRs == nil) != (other.ExcludedCIDRs == nil)) { - in, other := &in.ExcludedCIDRs, &other.ExcludedCIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if (in.EgressGateway == nil) != (other.EgressGateway == nil) { - return false - } else if in.EgressGateway != nil { - if !in.EgressGateway.DeepEqual(other.EgressGateway) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumEndpoint) DeepEqual(other *CiliumEndpoint) bool { - if other == nil { - return false - } - - if !in.Status.DeepEqual(&other.Status) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumEnvoyConfig) DeepEqual(other *CiliumEnvoyConfig) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumEnvoyConfigSpec) DeepEqual(other *CiliumEnvoyConfigSpec) bool { - if other == nil { - return false - } - - if ((in.Services != nil) && (other.Services != nil)) || ((in.Services == nil) != (other.Services == nil)) { - in, other := &in.Services, &other.Services - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual((*other)[i]) { - return false - } - } - } - } - - if ((in.BackendServices != nil) && (other.BackendServices != nil)) || ((in.BackendServices == nil) != (other.BackendServices == nil)) { - in, other := &in.BackendServices, &other.BackendServices - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual((*other)[i]) { - return false - } - } - } - } - - if ((in.Resources != nil) && (other.Resources != nil)) || ((in.Resources == nil) != (other.Resources == nil)) { - in, other := &in.Resources, &other.Resources - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumExternalWorkload) DeepEqual(other *CiliumExternalWorkload) bool { - if other == nil { - return false - } - - if in.Spec != other.Spec { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumExternalWorkloadSpec) DeepEqual(other *CiliumExternalWorkloadSpec) bool { - if other == nil { - return false - } - - if in.IPv4AllocCIDR != other.IPv4AllocCIDR { - return false - } - if in.IPv6AllocCIDR != other.IPv6AllocCIDR { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumExternalWorkloadStatus) DeepEqual(other *CiliumExternalWorkloadStatus) bool { - if other == nil { - return false - } - - if in.ID != other.ID { - return false - } - if in.IP != other.IP { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumIdentity) DeepEqual(other *CiliumIdentity) bool { - if other == nil { - return false - } - - if ((in.SecurityLabels != nil) && (other.SecurityLabels != nil)) || ((in.SecurityLabels == nil) != (other.SecurityLabels == nil)) { - in, other := &in.SecurityLabels, &other.SecurityLabels - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumLocalRedirectPolicy) DeepEqual(other *CiliumLocalRedirectPolicy) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumLocalRedirectPolicySpec) DeepEqual(other *CiliumLocalRedirectPolicySpec) bool { - if other == nil { - return false - } - - if !in.RedirectFrontend.DeepEqual(&other.RedirectFrontend) { - return false - } - - if !in.RedirectBackend.DeepEqual(&other.RedirectBackend) { - return false - } - - if in.Description != other.Description { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumLocalRedirectPolicyStatus) DeepEqual(other *CiliumLocalRedirectPolicyStatus) bool { - if other == nil { - return false - } - - if in.OK != other.OK { - return false - } - - return true -} - -// deepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumNetworkPolicy) deepEqual(other *CiliumNetworkPolicy) bool { - if other == nil { - return false - } - - if (in.Spec == nil) != (other.Spec == nil) { - return false - } else if in.Spec != nil { - if !in.Spec.DeepEqual(other.Spec) { - return false - } - } - - if ((in.Specs != nil) && (other.Specs != nil)) || ((in.Specs == nil) != (other.Specs == nil)) { - in, other := &in.Specs, &other.Specs - if other == nil || !in.DeepEqual(other) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumNetworkPolicyNodeStatus) DeepEqual(other *CiliumNetworkPolicyNodeStatus) bool { - if other == nil { - return false - } - - if in.OK != other.OK { - return false - } - if in.Error != other.Error { - return false - } - if !in.LastUpdated.DeepEqual(&other.LastUpdated) { - return false - } - - if in.Revision != other.Revision { - return false - } - if in.Enforcing != other.Enforcing { - return false - } - if ((in.Annotations != nil) && (other.Annotations != nil)) || ((in.Annotations == nil) != (other.Annotations == nil)) { - in, other := &in.Annotations, &other.Annotations - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumNetworkPolicyStatus) DeepEqual(other *CiliumNetworkPolicyStatus) bool { - if other == nil { - return false - } - - if ((in.Nodes != nil) && (other.Nodes != nil)) || ((in.Nodes == nil) != (other.Nodes == nil)) { - in, other := &in.Nodes, &other.Nodes - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if !inValue.DeepEqual(&otherValue) { - return false - } - } - } - } - } - - if ((in.DerivativePolicies != nil) && (other.DerivativePolicies != nil)) || ((in.DerivativePolicies == nil) != (other.DerivativePolicies == nil)) { - in, other := &in.DerivativePolicies, &other.DerivativePolicies - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if !inValue.DeepEqual(&otherValue) { - return false - } - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumNode) DeepEqual(other *CiliumNode) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - if !in.Status.DeepEqual(&other.Status) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ControllerList) DeepEqual(other *ControllerList) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ControllerStatus) DeepEqual(other *ControllerStatus) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if (in.Configuration == nil) != (other.Configuration == nil) { - return false - } else if in.Configuration != nil { - if !in.Configuration.DeepEqual(other.Configuration) { - return false - } - } - - if in.Status != other.Status { - return false - } - - if in.UUID != other.UUID { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ControllerStatusStatus) DeepEqual(other *ControllerStatusStatus) bool { - if other == nil { - return false - } - - if in.ConsecutiveFailureCount != other.ConsecutiveFailureCount { - return false - } - if in.FailureCount != other.FailureCount { - return false - } - if in.LastFailureMsg != other.LastFailureMsg { - return false - } - if in.LastFailureTimestamp != other.LastFailureTimestamp { - return false - } - if in.LastSuccessTimestamp != other.LastSuccessTimestamp { - return false - } - if in.SuccessCount != other.SuccessCount { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *DenyIdentityList) DeepEqual(other *DenyIdentityList) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EgressGateway) DeepEqual(other *EgressGateway) bool { - if other == nil { - return false - } - - if (in.NodeSelector == nil) != (other.NodeSelector == nil) { - return false - } else if in.NodeSelector != nil { - if !in.NodeSelector.DeepEqual(other.NodeSelector) { - return false - } - } - - if in.Interface != other.Interface { - return false - } - if in.EgressIP != other.EgressIP { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EgressRule) DeepEqual(other *EgressRule) bool { - if other == nil { - return false - } - - if (in.NamespaceSelector == nil) != (other.NamespaceSelector == nil) { - return false - } else if in.NamespaceSelector != nil { - if !in.NamespaceSelector.DeepEqual(other.NamespaceSelector) { - return false - } - } - - if (in.PodSelector == nil) != (other.PodSelector == nil) { - return false - } else if in.PodSelector != nil { - if !in.PodSelector.DeepEqual(other.PodSelector) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EncryptionSpec) DeepEqual(other *EncryptionSpec) bool { - if other == nil { - return false - } - - if in.Key != other.Key { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointIdentity) DeepEqual(other *EndpointIdentity) bool { - if other == nil { - return false - } - - if in.ID != other.ID { - return false - } - if ((in.Labels != nil) && (other.Labels != nil)) || ((in.Labels == nil) != (other.Labels == nil)) { - in, other := &in.Labels, &other.Labels - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointNetworking) DeepEqual(other *EndpointNetworking) bool { - if other == nil { - return false - } - - if ((in.Addressing != nil) && (other.Addressing != nil)) || ((in.Addressing == nil) != (other.Addressing == nil)) { - in, other := &in.Addressing, &other.Addressing - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if in.NodeIP != other.NodeIP { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointPolicy) DeepEqual(other *EndpointPolicy) bool { - if other == nil { - return false - } - - if (in.Ingress == nil) != (other.Ingress == nil) { - return false - } else if in.Ingress != nil { - if !in.Ingress.DeepEqual(other.Ingress) { - return false - } - } - - if (in.Egress == nil) != (other.Egress == nil) { - return false - } else if in.Egress != nil { - if !in.Egress.DeepEqual(other.Egress) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointPolicyDirection) DeepEqual(other *EndpointPolicyDirection) bool { - if other == nil { - return false - } - - if in.Enforcing != other.Enforcing { - return false - } - if ((in.Allowed != nil) && (other.Allowed != nil)) || ((in.Allowed == nil) != (other.Allowed == nil)) { - in, other := &in.Allowed, &other.Allowed - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.Denied != nil) && (other.Denied != nil)) || ((in.Denied == nil) != (other.Denied == nil)) { - in, other := &in.Denied, &other.Denied - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.Removing != nil) && (other.Removing != nil)) || ((in.Removing == nil) != (other.Removing == nil)) { - in, other := &in.Removing, &other.Removing - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.Adding != nil) && (other.Adding != nil)) || ((in.Adding == nil) != (other.Adding == nil)) { - in, other := &in.Adding, &other.Adding - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if in.State != other.State { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointStatus) DeepEqual(other *EndpointStatus) bool { - if other == nil { - return false - } - - if in.ID != other.ID { - return false - } - if ((in.Controllers != nil) && (other.Controllers != nil)) || ((in.Controllers == nil) != (other.Controllers == nil)) { - in, other := &in.Controllers, &other.Controllers - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if (in.ExternalIdentifiers == nil) != (other.ExternalIdentifiers == nil) { - return false - } else if in.ExternalIdentifiers != nil { - if !in.ExternalIdentifiers.DeepEqual(other.ExternalIdentifiers) { - return false - } - } - - if (in.Health == nil) != (other.Health == nil) { - return false - } else if in.Health != nil { - if !in.Health.DeepEqual(other.Health) { - return false - } - } - - if (in.Identity == nil) != (other.Identity == nil) { - return false - } else if in.Identity != nil { - if !in.Identity.DeepEqual(other.Identity) { - return false - } - } - - if ((in.Log != nil) && (other.Log != nil)) || ((in.Log == nil) != (other.Log == nil)) { - in, other := &in.Log, &other.Log - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual((*other)[i]) { - return false - } - } - } - } - - if (in.Networking == nil) != (other.Networking == nil) { - return false - } else if in.Networking != nil { - if !in.Networking.DeepEqual(other.Networking) { - return false - } - } - - if in.Encryption != other.Encryption { - return false - } - - if (in.Policy == nil) != (other.Policy == nil) { - return false - } else if in.Policy != nil { - if !in.Policy.DeepEqual(other.Policy) { - return false - } - } - - if (in.VisibilityPolicyStatus == nil) != (other.VisibilityPolicyStatus == nil) { - return false - } else if in.VisibilityPolicyStatus != nil { - if *in.VisibilityPolicyStatus != *other.VisibilityPolicyStatus { - return false - } - } - - if in.State != other.State { - return false - } - if ((in.NamedPorts != nil) && (other.NamedPorts != nil)) || ((in.NamedPorts == nil) != (other.NamedPorts == nil)) { - in, other := &in.NamedPorts, &other.NamedPorts - if other == nil || !in.DeepEqual(other) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Frontend) DeepEqual(other *Frontend) bool { - if other == nil { - return false - } - - if in.IP != other.IP { - return false - } - if ((in.ToPorts != nil) && (other.ToPorts != nil)) || ((in.ToPorts == nil) != (other.ToPorts == nil)) { - in, other := &in.ToPorts, &other.ToPorts - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *HealthAddressingSpec) DeepEqual(other *HealthAddressingSpec) bool { - if other == nil { - return false - } - - if in.IPv4 != other.IPv4 { - return false - } - if in.IPv6 != other.IPv6 { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IdentityList) DeepEqual(other *IdentityList) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IdentityTuple) DeepEqual(other *IdentityTuple) bool { - if other == nil { - return false - } - - if in.Identity != other.Identity { - return false - } - if ((in.IdentityLabels != nil) && (other.IdentityLabels != nil)) || ((in.IdentityLabels == nil) != (other.IdentityLabels == nil)) { - in, other := &in.IdentityLabels, &other.IdentityLabels - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - if in.DestPort != other.DestPort { - return false - } - if in.Protocol != other.Protocol { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NodeAddress) DeepEqual(other *NodeAddress) bool { - if other == nil { - return false - } - - if in.Type != other.Type { - return false - } - if in.IP != other.IP { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NodeSpec) DeepEqual(other *NodeSpec) bool { - if other == nil { - return false - } - - if in.InstanceID != other.InstanceID { - return false - } - if in.BootID != other.BootID { - return false - } - if ((in.Addresses != nil) && (other.Addresses != nil)) || ((in.Addresses == nil) != (other.Addresses == nil)) { - in, other := &in.Addresses, &other.Addresses - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if in.HealthAddressing != other.HealthAddressing { - return false - } - - if in.IngressAddressing != other.IngressAddressing { - return false - } - - if in.Encryption != other.Encryption { - return false - } - - if !in.ENI.DeepEqual(&other.ENI) { - return false - } - - if in.Azure != other.Azure { - return false - } - - if !in.AlibabaCloud.DeepEqual(&other.AlibabaCloud) { - return false - } - - if !in.IPAM.DeepEqual(&other.IPAM) { - return false - } - - if in.NodeIdentity != other.NodeIdentity { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NodeStatus) DeepEqual(other *NodeStatus) bool { - if other == nil { - return false - } - - if !in.ENI.DeepEqual(&other.ENI) { - return false - } - - if !in.Azure.DeepEqual(&other.Azure) { - return false - } - - if !in.IPAM.DeepEqual(&other.IPAM) { - return false - } - - if !in.AlibabaCloud.DeepEqual(&other.AlibabaCloud) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PortInfo) DeepEqual(other *PortInfo) bool { - if other == nil { - return false - } - - if in.Port != other.Port { - return false - } - if in.Protocol != other.Protocol { - return false - } - if in.Name != other.Name { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *RedirectBackend) DeepEqual(other *RedirectBackend) bool { - if other == nil { - return false - } - - if !in.LocalEndpointSelector.DeepEqual(&other.LocalEndpointSelector) { - return false - } - - if ((in.ToPorts != nil) && (other.ToPorts != nil)) || ((in.ToPorts == nil) != (other.ToPorts == nil)) { - in, other := &in.ToPorts, &other.ToPorts - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *RedirectFrontend) DeepEqual(other *RedirectFrontend) bool { - if other == nil { - return false - } - - if (in.AddressMatcher == nil) != (other.AddressMatcher == nil) { - return false - } else if in.AddressMatcher != nil { - if !in.AddressMatcher.DeepEqual(other.AddressMatcher) { - return false - } - } - - if (in.ServiceMatcher == nil) != (other.ServiceMatcher == nil) { - return false - } else if in.ServiceMatcher != nil { - if !in.ServiceMatcher.DeepEqual(other.ServiceMatcher) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Service) DeepEqual(other *Service) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if in.Namespace != other.Namespace { - return false - } - if ((in.Ports != nil) && (other.Ports != nil)) || ((in.Ports == nil) != (other.Ports == nil)) { - in, other := &in.Ports, &other.Ports - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ServiceInfo) DeepEqual(other *ServiceInfo) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if in.Namespace != other.Namespace { - return false - } - if ((in.ToPorts != nil) && (other.ToPorts != nil)) || ((in.ToPorts == nil) != (other.ToPorts == nil)) { - in, other := &in.ToPorts, &other.ToPorts - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ServiceListener) DeepEqual(other *ServiceListener) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if in.Namespace != other.Namespace { - return false - } - if in.Listener != other.Listener { - return false - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_advert_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_advert_types.go deleted file mode 100644 index af4e4d57c0b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_advert_types.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - slimv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// BGPAdvertisementType defines type of advertisement. -// -// Note list of supported advertisements is not exhaustive and can be extended in the future. -// Consumer of this API should be able to handle unknown values. -// -// +kubebuilder:validation:Enum=PodCIDR;CiliumPodIPPool;CiliumLoadBalancerIP -type BGPAdvertisementType string - -const ( - // PodCIDRAdvert when configured, Cilium will advertise pod CIDRs to BGP peers. - PodCIDRAdvert BGPAdvertisementType = "PodCIDR" - - // CiliumPodIPPoolAdvert when configured, Cilium will advertise prefixes from CiliumPodIPPools to BGP peers. - CiliumPodIPPoolAdvert BGPAdvertisementType = "CiliumPodIPPool" - - // CiliumLoadBalancerIPAdvert when configured, Cilium will advertise load balancer services IPs to BGP peers. - // The loadBalancerClass for a service must be nil or specify a class supported by Cilium, - // e.g. "io.cilium/bgp-control-plane". - // - // Refer to the following document for additional details regarding load balancer - // classes: https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class - CiliumLoadBalancerIPAdvert BGPAdvertisementType = "CiliumLoadBalancerIP" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium,ciliumbgp},singular="ciliumbgpadvertisement",path="ciliumbgpadvertisements",scope="Cluster",shortName={cbgpadvert} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type=date -// +kubebuilder:storageversion - -// CiliumBGPAdvertisement is the Schema for the ciliumbgpadvertisements API -type CiliumBGPAdvertisement struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - Spec CiliumBGPAdvertisementSpec `json:"spec"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumBGPAdvertisementList contains a list of CiliumBGPAdvertisement -type CiliumBGPAdvertisementList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumBGPAdvertisement. - Items []CiliumBGPAdvertisement `json:"items"` -} - -type CiliumBGPAdvertisementSpec struct { - // Advertisements is a list of BGP advertisements. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - Advertisements []Advertisement `json:"advertisements"` -} - -// Advertisement defines which routes Cilium should advertise to BGP peers. Optionally, additional attributes can be -// set to the advertised routes. -type Advertisement struct { - // AdvertisementType defines type of advertisement which has to be advertised. - // - // +kubebuilder:validation:Required - AdvertisementType BGPAdvertisementType `json:"advertisementType"` - - // Selector is a label selector to select objects of the type specified by AdvertisementType. - // If not specified, all objects of the type specified by AdvertisementType are selected for advertisement. - // - // +kubebuilder:validation:Optional - Selector *slimv1.LabelSelector `json:"selector,omitempty"` - - // Attributes defines additional attributes to set to the advertised routes. - // If not specified, no additional attributes are set. - // - // +kubebuilder:validation:Optional - Attributes *CiliumBGPAttributes `json:"attributes,omitempty"` -} - -// CiliumBGPAttributes defines additional attributes to set to the advertised NLRIs. -type CiliumBGPAttributes struct { - // Community sets the community attribute in the route. - // If not specified, no community attribute is set. - // - // +kubebuilder:validation:Optional - Community *BGPCommunities `json:"community,omitempty"` - - // LocalPreference sets the local preference attribute in the route. - // If not specified, no local preference attribute is set. - // - // +kubebuilder:validation:Optional - LocalPreference *int64 `json:"localPreference,omitempty"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_cluster_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_cluster_types.go deleted file mode 100644 index dad7bb87f21..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_cluster_types.go +++ /dev/null @@ -1,138 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - slimv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium,ciliumbgp},singular="ciliumbgpclusterconfig",path="ciliumbgpclusterconfigs",scope="Cluster",shortName={cbgpcluster} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type=date -// +kubebuilder:storageversion - -// CiliumBGPClusterConfig is the Schema for the CiliumBGPClusterConfig API -type CiliumBGPClusterConfig struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec defines the desired cluster configuration of the BGP control plane. - Spec CiliumBGPClusterConfigSpec `json:"spec"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumBGPClusterConfigList is a list of CiliumBGPClusterConfig objects. -type CiliumBGPClusterConfigList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumBGPClusterConfig. - Items []CiliumBGPClusterConfig `json:"items"` -} - -type CiliumBGPClusterConfigSpec struct { - // NodeSelector selects a group of nodes where this BGP Cluster - // config applies. - // If empty / nil this config applies to all nodes. - // - // +kubebuilder:validation:Optional - NodeSelector *slimv1.LabelSelector `json:"nodeSelector,omitempty"` - - // A list of CiliumBGPInstance(s) which instructs - // the BGP control plane how to instantiate virtual BGP routers. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=16 - // +listType=map - // +listMapKey=name - BGPInstances []CiliumBGPInstance `json:"bgpInstances"` -} - -type CiliumBGPInstance struct { - // Name is the name of the BGP instance. It is a unique identifier for the BGP instance - // within the cluster configuration. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - Name string `json:"name"` - - // LocalASN is the ASN of this BGP instance. - // Supports extended 32bit ASNs. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=4294967295 - LocalASN *int64 `json:"localASN,omitempty"` - - // Peers is a list of neighboring BGP peers for this virtual router - // - // +kubebuilder:validation:Optional - // +listType=map - // +listMapKey=name - Peers []CiliumBGPPeer `json:"peers,omitempty"` -} - -type CiliumBGPPeer struct { - // Name is the name of the BGP peer. It is a unique identifier for the peer within the BGP instance. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - Name string `json:"name"` - - // PeerAddress is the IP address of the neighbor. - // Supports IPv4 and IPv6 addresses. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Pattern=`((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))` - PeerAddress *string `json:"peerAddress,omitempty"` - - // PeerASN is the ASN of the peer BGP router. - // Supports extended 32bit ASNs. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=4294967295 - PeerASN *int64 `json:"peerASN,omitempty"` - - // PeerConfigRef is a reference to a peer configuration resource. - // If not specified, the default BGP configuration is used for this peer. - // - // +kubebuilder:validation:Optional - PeerConfigRef *PeerConfigReference `json:"peerConfigRef,omitempty"` -} - -// PeerConfigReference is a reference to a peer configuration resource. -type PeerConfigReference struct { - // Group is the group of the peer config resource. - // If not specified, the default of "cilium.io" is used. - // - // +kubebuilder:validation:Optional - // +kubebuilder:default="cilium.io" - Group string `json:"group"` - - // Kind is the kind of the peer config resource. - // If not specified, the default of "CiliumBGPPeerConfig" is used. - // - // +kubebuilder:validation:Optional - // +kubebuilder:default="CiliumBGPPeerConfig" - Kind string `json:"kind"` - - // Name is the name of the peer config resource. - // Name refers to the name of a Kubernetes object (typically a CiliumBGPPeerConfig). - // - // +kubebuilder:validation:Required - Name string `json:"name"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_node_override_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_node_override_types.go deleted file mode 100644 index 4d788cdac56..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_node_override_types.go +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium,ciliumbgp},singular="ciliumbgpnodeconfigoverride",path="ciliumbgpnodeconfigoverrides",scope="Cluster",shortName={cbgpnodeoverride} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type=date -// +kubebuilder:storageversion - -// CiliumBGPNodeConfigOverride is used to overrides some of the BGP configurations which are node local. -// Users can user this resource to override auto-generated BGP settings for the node. -type CiliumBGPNodeConfigOverride struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec is the specification of the desired behavior of the CiliumBGPNodeConfigOverride. - Spec CiliumBGPNodeConfigOverrideSpec `json:"spec"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumBGPNodeConfigOverrideList is a list of CiliumBGPNodeConfigOverride objects. -type CiliumBGPNodeConfigOverrideList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumBGPNodeConfigOverride. - Items []CiliumBGPNodeConfigOverride `json:"items"` -} - -type CiliumBGPNodeConfigOverrideSpec struct { - // NodeRef is the name of the node for which the BGP configuration is overridden. - // - // +kubebuilder:validation:Required - NodeRef string `json:"nodeRef"` - - // BGPInstances is a list of BGP instances to override. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=name - BGPInstances []CiliumBGPNodeConfigInstanceOverride `json:"bgpInstances"` -} - -// CiliumBGPNodeConfigInstanceOverride defines configuration options which can be overridden for a specific BGP instance. -type CiliumBGPNodeConfigInstanceOverride struct { - // Name is the name of the BGP instance for which the configuration is overridden. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - Name string `json:"name"` - - // RouterID is BGP router id to use for this instance. It must be unique across all BGP instances. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Format=ipv4 - RouterID *string `json:"routerID,omitempty"` - - // LocalPort is port to use for this BGP instance. - // - // +kubebuilder:validation:Optional - LocalPort *int32 `json:"localPort,omitempty"` - - // Peers is a list of peer configurations to override. - // - // +kubebuilder:validation:Optional - // +listType=map - // +listMapKey=name - Peers []CiliumBGPNodeConfigPeerOverride `json:"peers,omitempty"` -} - -// CiliumBGPNodeConfigPeerOverride defines configuration options which can be overridden for a specific peer. -type CiliumBGPNodeConfigPeerOverride struct { - // Name is the name of the peer for which the configuration is overridden. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - Name string `json:"name"` - - // LocalAddress is the IP address to use for connecting to this peer. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Pattern=`((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))` - LocalAddress *string `json:"localAddress,omitempty"` - - // LocalPort is source port to use for connecting to this peer. - // - // +kubebuilder:validation:Optional - LocalPort *int32 `json:"localPort,omitempty"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_node_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_node_types.go deleted file mode 100644 index bf85107e0b8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_node_types.go +++ /dev/null @@ -1,217 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium,ciliumbgp},singular="ciliumbgpnodeconfig",path="ciliumbgpnodeconfigs",scope="Cluster",shortName={cbgpnode} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type=date -// +kubebuilder:storageversion - -// CiliumBGPNodeConfig is node local configuration for BGP agent. Name of the object should be node name. -// This resource will be created by Cilium operator and is read-only for the users. -type CiliumBGPNodeConfig struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec is the specification of the desired behavior of the CiliumBGPNodeConfig. - Spec CiliumBGPNodeSpec `json:"spec"` - - // Status is the most recently observed status of the CiliumBGPNodeConfig. - Status CiliumBGPNodeStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumBGPNodeConfigList is a list of CiliumBGPNodeConfig objects. -type CiliumBGPNodeConfigList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumBGPNodeConfig. - Items []CiliumBGPNodeConfig `json:"items"` -} - -type CiliumBGPNodeSpec struct { - // BGPInstances is a list of BGP router instances on the node. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=16 - // +listType=map - // +listMapKey=name - BGPInstances []CiliumBGPNodeInstance `json:"bgpInstances"` -} - -// CiliumBGPNodeInstance is a single BGP router instance configuration on the node. -type CiliumBGPNodeInstance struct { - // Name is the name of the BGP instance. This name is used to identify the BGP instance on the node. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - Name string `json:"name"` - - // LocalASN is the ASN of this virtual router. - // Supports extended 32bit ASNs. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=4294967295 - LocalASN *int64 `json:"localASN,omitempty"` - - // RouterID is the BGP router ID of this virtual router. - // This configuration is derived from CiliumBGPNodeConfigOverride resource. - // - // If not specified, the router ID will be derived from the node local address. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Format=ipv4 - RouterID *string `json:"routerID,omitempty"` - - // LocalPort is the port on which the BGP daemon listens for incoming connections. - // - // If not specified, BGP instance will not listen for incoming connections. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - LocalPort *int32 `json:"localPort,omitempty"` - - // Peers is a list of neighboring BGP peers for this virtual router - // - // +kubebuilder:validation:Optional - // +listType=map - // +listMapKey=name - Peers []CiliumBGPNodePeer `json:"peers,omitempty"` -} - -type CiliumBGPNodePeer struct { - // Name is the name of the BGP peer. This name is used to identify the BGP peer for the BGP instance. - // - // +kubebuilder:validation:Required - Name string `json:"name"` - - // PeerAddress is the IP address of the neighbor. - // Supports IPv4 and IPv6 addresses. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Pattern=`((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))` - PeerAddress *string `json:"peerAddress,omitempty"` - - // PeerASN is the ASN of the peer BGP router. - // Supports extended 32bit ASNs - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=4294967295 - PeerASN *int64 `json:"peerASN,omitempty"` - - // LocalAddress is the IP address of the local interface to use for the peering session. - // This configuration is derived from CiliumBGPNodeConfigOverride resource. If not specified, the local address will be used for setting up peering. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Pattern=`((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))` - LocalAddress *string `json:"localAddress,omitempty"` - - // PeerConfigRef is a reference to a peer configuration resource. - // If not specified, the default BGP configuration is used for this peer. - // - // +kubebuilder:validation:Optional - PeerConfigRef *PeerConfigReference `json:"peerConfigRef,omitempty"` -} - -// CiliumBGPNodeStatus is the status of the CiliumBGPNodeConfig. -type CiliumBGPNodeStatus struct { - // BGPInstances is the status of the BGP instances on the node. - // - // +kubebuilder:validation:Required - // +listType=map - // +listMapKey=name - BGPInstances []CiliumBGPNodeInstanceStatus `json:"bgpInstances"` -} - -type CiliumBGPNodeInstanceStatus struct { - // Name is the name of the BGP instance. This name is used to identify the BGP instance on the node. - // - // +kubebuilder:validation:Required - Name string `json:"name"` - - // LocalASN is the ASN of this BGP instance. - // - // +kubebuilder:validation:Optional - LocalASN *int64 `json:"localASN,omitempty"` - - // PeerStatuses is the state of the BGP peers for this BGP instance. - // - // +kubebuilder:validation:Optional - // +listType=map - // +listMapKey=name - PeerStatuses []CiliumBGPNodePeerStatus `json:"peers,omitempty"` -} - -// CiliumBGPNodePeerStatus is the status of a BGP peer. -type CiliumBGPNodePeerStatus struct { - // Name is the name of the BGP peer. - // - // +kubebuilder:validation:Required - Name string `json:"name"` - - // PeerAddress is the IP address of the neighbor. - // - // +kubebuilder:validation:Required - PeerAddress string `json:"peerAddress"` - - // PeerASN is the ASN of the neighbor. - // - // +kubebuilder:validation:Optional - PeerASN *int64 `json:"peerASN,omitempty"` - - // PeeringState is last known state of the peering session. - // - // +kubebuilder:validation:Optional - PeeringState *string `json:"peeringState,omitempty"` - - // Timers is the state of the negotiated BGP timers for this peer. - // - // +kubebuilder:validation:Optional - Timers *CiliumBGPTimersState `json:"timers,omitempty"` - - // Uptime is the time since the last peering session was established. - // - // +kubebuilder:validation:Optional - Uptime *string `json:"uptime,omitempty"` - - // RoutesReceived is the number of routes received from this peer. - // - // +kubebuilder:validation:Optional - RoutesReceived *int32 `json:"routesReceived,omitempty"` - - // RoutesAdvertised is the number of routes advertised to this peer. - // - // +kubebuilder:validation:Optional - RoutesAdvertised *int32 `json:"routesAdvertised,omitempty"` -} - -// CiliumBGPTimersState is the state of the negotiated BGP timers for a peer. -type CiliumBGPTimersState struct { - // AppliedHoldTimeSeconds is the negotiated hold time for this peer. - // - // +kubebuilder:validation:Optional - AppliedHoldTimeSeconds *int32 `json:"appliedHoldTimeSeconds,omitempty"` - - // AppliedKeepaliveSeconds is the negotiated keepalive time for this peer. - // - // +kubebuilder:validation:Optional - AppliedKeepaliveSeconds *int32 `json:"appliedKeepaliveSeconds,omitempty"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_peer_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_peer_types.go deleted file mode 100644 index 8e1f7ecb3e6..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgp_peer_types.go +++ /dev/null @@ -1,179 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - slimv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumBGPPeerConfigList is a list of CiliumBGPPeer objects. -type CiliumBGPPeerConfigList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumBGPPeer. - Items []CiliumBGPPeerConfig `json:"items"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium,ciliumbgp},singular="ciliumbgppeerconfig",path="ciliumbgppeerconfigs",scope="Cluster",shortName={cbgppeer} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type=date -// +kubebuilder:storageversion - -type CiliumBGPPeerConfig struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec is the specification of the desired behavior of the CiliumBGPPeerConfig. - Spec CiliumBGPPeerConfigSpec `json:"spec"` -} - -type CiliumBGPPeerConfigSpec struct { - // Transport defines the BGP transport parameters for the peer. - // - // If not specified, the default transport parameters are used. - // - // +kubebuilder:validation:Optional - Transport *CiliumBGPTransport `json:"transport,omitempty"` - - // Timers defines the BGP timers for the peer. - // - // If not specified, the default timers are used. - // - // +kubebuilder:validation:Optional - Timers *CiliumBGPTimers `json:"timers,omitempty"` - - // AuthSecretRef is the name of the secret to use to fetch a TCP - // authentication password for this peer. - // - // If not specified, no authentication is used. - // - // +kubebuilder:validation:Optional - AuthSecretRef *string `json:"authSecretRef,omitempty"` - - // GracefulRestart defines graceful restart parameters which are negotiated - // with this peer. - // - // If not specified, the graceful restart capability is disabled. - // - // +kubebuilder:validation:Optional - GracefulRestart *CiliumBGPNeighborGracefulRestart `json:"gracefulRestart,omitempty"` - - // EBGPMultihopTTL controls the multi-hop feature for eBGP peers. - // Its value defines the Time To Live (TTL) value used in BGP - // packets sent to the peer. - // - // If not specified, EBGP multihop is disabled. This field is ignored for iBGP neighbors. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=255 - // +kubebuilder:default=1 - EBGPMultihop *int32 `json:"ebgpMultihop,omitempty"` - - // Families, if provided, defines a set of AFI/SAFIs the speaker will - // negotiate with it's peer. - // - // If not specified, the default families of IPv6/unicast and IPv4/unicast will be created. - // - // +kubebuilder:validation:Optional - Families []CiliumBGPFamilyWithAdverts `json:"families,omitempty"` -} - -// CiliumBGPFamily represents a AFI/SAFI address family pair. -type CiliumBGPFamily struct { - // Afi is the Address Family Identifier (AFI) of the family. - // - // +kubebuilder:validation:Enum=ipv4;ipv6;l2vpn;ls;opaque - // +kubebuilder:validation:Required - Afi string `json:"afi"` - - // Safi is the Subsequent Address Family Identifier (SAFI) of the family. - // - // +kubebuilder:validation:Enum=unicast;multicast;mpls_label;encapsulation;vpls;evpn;ls;sr_policy;mup;mpls_vpn;mpls_vpn_multicast;route_target_constraints;flowspec_unicast;flowspec_vpn;key_value - // +kubebuilder:validation:Required - Safi string `json:"safi"` -} - -// CiliumBGPFamilyWithAdverts represents a AFI/SAFI address family pair along with reference to BGP Advertisements. -type CiliumBGPFamilyWithAdverts struct { - CiliumBGPFamily `json:",inline"` - - // Advertisements selects group of BGP Advertisement(s) to advertise for this family. - // - // If not specified, no advertisements are sent for this family. - // - // This field is ignored in CiliumBGPNeighbor which is used in CiliumBGPPeeringPolicy. - // Use CiliumBGPPeeringPolicy advertisement options instead. - // - // +kubebuilder:validation:Optional - Advertisements *slimv1.LabelSelector `json:"advertisements,omitempty"` -} - -// CiliumBGPTransport defines the BGP transport parameters for the peer. -type CiliumBGPTransport struct { - // LocalPort is the local port to be used for the BGP session. - // - // If not specified, defaults to TCP port 179. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:default=179 - LocalPort *int32 `json:"localPort,omitempty"` - - // PeerPort is the peer port to be used for the BGP session. - // - // If not specified, defaults to TCP port 179. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:default=179 - PeerPort *int32 `json:"peerPort,omitempty"` -} - -type CiliumBGPTimers struct { - // ConnectRetryTimeSeconds defines the initial value for the BGP ConnectRetryTimer (RFC 4271, Section 8). - // - // If not specified, defaults to 120 seconds. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=2147483647 - // +kubebuilder:default=120 - ConnectRetryTimeSeconds *int32 `json:"connectRetryTimeSeconds,omitempty"` - - // HoldTimeSeconds defines the initial value for the BGP HoldTimer (RFC 4271, Section 4.2). - // Updating this value will cause a session reset. - // - // If not specified, defaults to 90 seconds. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=3 - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:default=90 - HoldTimeSeconds *int32 `json:"holdTimeSeconds,omitempty"` - - // KeepaliveTimeSeconds defines the initial value for the BGP KeepaliveTimer (RFC 4271, Section 8). - // It can not be larger than HoldTimeSeconds. Updating this value will cause a session reset. - // - // If not specified, defaults to 30 seconds. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:default=30 - KeepAliveTimeSeconds *int32 `json:"keepAliveTimeSeconds,omitempty"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgpp_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgpp_types.go deleted file mode 100644 index 35580152288..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/bgpp_types.go +++ /dev/null @@ -1,366 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - "fmt" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/utils/pointer" - - slimv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -const ( - // DefaultBGPExportPodCIDR defines the default value for ExportPodCIDR determining whether to export the Node's private CIDR block. - DefaultBGPExportPodCIDR = false - // DefaultBGPPeerPort defines the TCP port number of a CiliumBGPNeighbor when PeerPort is unspecified. - DefaultBGPPeerPort = 179 - // DefaultBGPEBGPMultihopTTL defines the default value for the TTL value used in BGP packets sent to the eBGP neighbors. - DefaultBGPEBGPMultihopTTL = 1 - // DefaultBGPConnectRetryTimeSeconds defines the default initial value for the BGP ConnectRetryTimer (RFC 4271, Section 8). - DefaultBGPConnectRetryTimeSeconds = 120 - // DefaultBGPHoldTimeSeconds defines the default initial value for the BGP HoldTimer (RFC 4271, Section 4.2). - DefaultBGPHoldTimeSeconds = 90 - // DefaultBGPKeepAliveTimeSeconds defines the default initial value for the BGP KeepaliveTimer (RFC 4271, Section 8). - DefaultBGPKeepAliveTimeSeconds = 30 - // DefaultBGPGRRestartTimeSeconds defines default Restart Time for graceful restart (RFC 4724, section 4.2) - DefaultBGPGRRestartTimeSeconds = 120 - // BGPLoadBalancerClass defines the BGP Control Plane load balancer class for Services. - BGPLoadBalancerClass = "io.cilium/bgp-control-plane" - // PodCIDRSelectorName defines the name for a selector matching Pod CIDRs - // (standard cluster scope / Kubernetes IPAM CIDRs, not Multi-Pool IPAM CIDRs). - PodCIDRSelectorName = "PodCIDR" - // CiliumLoadBalancerIPPoolSelectorName defines the name for a selector matching CiliumLoadBalancerIPPool resources. - CiliumLoadBalancerIPPoolSelectorName = "CiliumLoadBalancerIPPool" - // CiliumPodIPPoolSelectorName defines the name for a selector matching CiliumPodIPPool resources. - CiliumPodIPPoolSelectorName = CPIPKindDefinition -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium,ciliumbgp},singular="ciliumbgppeeringpolicy",path="ciliumbgppeeringpolicies",scope="Cluster",shortName={bgpp} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type=date -// +kubebuilder:storageversion - -// CiliumBGPPeeringPolicy is a Kubernetes third-party resource for instructing -// Cilium's BGP control plane to create virtual BGP routers. -type CiliumBGPPeeringPolicy struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec is a human readable description of a BGP peering policy - // - // +kubebuilder:validation:Optional - Spec CiliumBGPPeeringPolicySpec `json:"spec,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumBGPPeeringPolicyList is a list of -// CiliumBGPPeeringPolicy objects. -type CiliumBGPPeeringPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumBGPPeeringPolicies. - Items []CiliumBGPPeeringPolicy `json:"items"` -} - -// CiliumBGPPeeringPolicySpec specifies one or more CiliumBGPVirtualRouter(s) -// to apply to nodes matching it's label selector. -type CiliumBGPPeeringPolicySpec struct { - // NodeSelector selects a group of nodes where this BGP Peering - // Policy applies. - // - // If empty / nil this policy applies to all nodes. - // - // +kubebuilder:validation:Optional - NodeSelector *slimv1.LabelSelector `json:"nodeSelector,omitempty"` - // A list of CiliumBGPVirtualRouter(s) which instructs - // the BGP control plane how to instantiate virtual BGP routers. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - VirtualRouters []CiliumBGPVirtualRouter `json:"virtualRouters"` -} - -type CiliumBGPNeighborGracefulRestart struct { - // Enabled flag, when set enables graceful restart capability. - // - // +kubebuilder:validation:Required - Enabled bool `json:"enabled"` - // RestartTimeSeconds is the estimated time it will take for the BGP - // session to be re-established with peer after a restart. - // After this period, peer will remove stale routes. This is - // described RFC 4724 section 4.2. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=4095 - // +kubebuilder:default=120 - RestartTimeSeconds *int32 `json:"restartTimeSeconds,omitempty"` -} - -// BGPStandardCommunity type represents a value of the "standard" 32-bit BGP Communities Attribute (RFC 1997) -// as a 4-byte decimal number or two 2-byte decimal numbers separated by a colon. -// +kubebuilder:validation:Pattern=`^([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])$|^([0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]):([0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$` -type BGPStandardCommunity string - -// BGPLargeCommunity type represents a value of the BGP Large Communities Attribute (RFC 8092), -// as three 4-byte decimal numbers separated by colons. -// +kubebuilder:validation:Pattern=`^([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])$` -type BGPLargeCommunity string - -// BGPCommunities holds community values of the supported BGP community path attributes. -type BGPCommunities struct { - // Standard holds a list of "standard" 32-bit BGP Communities Attribute (RFC 1997) values. - // - // +kubebuilder:validation:Optional - Standard []BGPStandardCommunity `json:"standard,omitempty"` - - // Large holds a list of the BGP Large Communities Attribute (RFC 8092) values. - // - // +kubebuilder:validation:Optional - Large []BGPLargeCommunity `json:"large,omitempty"` -} - -// CiliumBGPPathAttributes can be used to apply additional path attributes -// to matched routes when advertising them to a BGP peer. -type CiliumBGPPathAttributes struct { - // SelectorType defines the object type on which the Selector applies: - // - For "PodCIDR" the Selector matches k8s CiliumNode resources - // (path attributes apply to routes announced for PodCIDRs of selected CiliumNodes. - // Only affects routes of cluster scope / Kubernetes IPAM CIDRs, not Multi-Pool IPAM CIDRs. - // - For "CiliumLoadBalancerIPPool" the Selector matches CiliumLoadBalancerIPPool custom resources - // (path attributes apply to routes announced for selected CiliumLoadBalancerIPPools). - // - For "CiliumPodIPPool" the Selector matches CiliumPodIPPool custom resources - // (path attributes apply to routes announced for allocated CIDRs of selected CiliumPodIPPools). - // - // +kubebuilder:validation:Enum=PodCIDR;CiliumLoadBalancerIPPool;CiliumPodIPPool - // +kubebuilder:validation:Required - SelectorType string `json:"selectorType"` - - // Selector selects a group of objects of the SelectorType - // resulting into routes that will be announced with the configured Attributes. - // If nil / not set, all objects of the SelectorType are selected. - // - // +kubebuilder:validation:Optional - Selector *slimv1.LabelSelector `json:"selector,omitempty"` - - // Communities defines a set of community values advertised in the supported BGP Communities path attributes. - // If nil / not set, no BGP Communities path attribute will be advertised. - // - // +kubebuilder:validation:Optional - Communities *BGPCommunities `json:"communities,omitempty"` - - // LocalPreference defines the preference value advertised in the BGP Local Preference path attribute. - // As Local Preference is only valid for iBGP peers, this value will be ignored for eBGP peers - // (no Local Preference path attribute will be advertised). - // If nil / not set, the default Local Preference of 100 will be advertised in - // the Local Preference path attribute for iBGP peers. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=4294967295 - LocalPreference *int64 `json:"localPreference,omitempty"` -} - -// CiliumBGPNeighbor is a neighboring peer for use in a -// CiliumBGPVirtualRouter configuration. -type CiliumBGPNeighbor struct { - // PeerAddress is the IP address of the peer. - // This must be in CIDR notation and use a /32 to express - // a single host. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:Format=cidr - PeerAddress string `json:"peerAddress"` - // PeerPort is the TCP port of the peer. 1-65535 is the range of - // valid port numbers that can be specified. If unset, defaults to 179. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:default=179 - PeerPort *int32 `json:"peerPort,omitempty"` - // PeerASN is the ASN of the peer BGP router. - // Supports extended 32bit ASNs - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=4294967295 - PeerASN int64 `json:"peerASN"` - // AuthSecretRef is the name of the secret to use to fetch a TCP - // authentication password for this peer. - // +kubebuilder:validation:Optional - AuthSecretRef *string `json:"authSecretRef,omitempty"` - // EBGPMultihopTTL controls the multi-hop feature for eBGP peers. - // Its value defines the Time To Live (TTL) value used in BGP packets sent to the neighbor. - // The value 1 implies that eBGP multi-hop feature is disabled (only a single hop is allowed). - // This field is ignored for iBGP peers. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=255 - // +kubebuilder:default=1 - EBGPMultihopTTL *int32 `json:"eBGPMultihopTTL,omitempty"` - // ConnectRetryTimeSeconds defines the initial value for the BGP ConnectRetryTimer (RFC 4271, Section 8). - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=2147483647 - // +kubebuilder:default=120 - ConnectRetryTimeSeconds *int32 `json:"connectRetryTimeSeconds,omitempty"` - // HoldTimeSeconds defines the initial value for the BGP HoldTimer (RFC 4271, Section 4.2). - // Updating this value will cause a session reset. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=3 - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:default=90 - HoldTimeSeconds *int32 `json:"holdTimeSeconds,omitempty"` - // KeepaliveTimeSeconds defines the initial value for the BGP KeepaliveTimer (RFC 4271, Section 8). - // It can not be larger than HoldTimeSeconds. Updating this value will cause a session reset. - // - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:default=30 - KeepAliveTimeSeconds *int32 `json:"keepAliveTimeSeconds,omitempty"` - // GracefulRestart defines graceful restart parameters which are negotiated - // with this neighbor. If empty / nil, the graceful restart capability is disabled. - // - // +kubebuilder:validation:Optional - GracefulRestart *CiliumBGPNeighborGracefulRestart `json:"gracefulRestart,omitempty"` - // Families, if provided, defines a set of AFI/SAFIs the speaker will - // negotiate with it's peer. - // - // If this slice is not provided the default families of IPv6 and IPv4 will - // be provided. - // - // +kubebuilder:validation:Optional - Families []CiliumBGPFamily `json:"families"` - // AdvertisedPathAttributes can be used to apply additional path attributes - // to selected routes when advertising them to the peer. - // If empty / nil, no additional path attributes are advertised. - // - // +kubebuilder:validation:Optional - AdvertisedPathAttributes []CiliumBGPPathAttributes `json:"advertisedPathAttributes,omitempty"` -} - -// CiliumBGPVirtualRouter defines a discrete BGP virtual router configuration. -type CiliumBGPVirtualRouter struct { - // LocalASN is the ASN of this virtual router. - // Supports extended 32bit ASNs - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=4294967295 - LocalASN int64 `json:"localASN"` - // ExportPodCIDR determines whether to export the Node's private CIDR block - // to the configured neighbors. - // - // +kubebuilder:validation:Optional - // +kubebuilder:default=false - ExportPodCIDR *bool `json:"exportPodCIDR,omitempty"` - // PodIPPoolSelector selects CiliumPodIPPools based on labels. The virtual - // router will announce allocated CIDRs of matching CiliumPodIPPools. - // - // If empty / nil no CiliumPodIPPools will be announced. - // - // +kubebuilder:validation:Optional - PodIPPoolSelector *slimv1.LabelSelector `json:"podIPPoolSelector,omitempty"` - // ServiceSelector selects a group of load balancer services which this - // virtual router will announce. The loadBalancerClass for a service must - // be nil or specify a class supported by Cilium, e.g. "io.cilium/bgp-control-plane". - // Refer to the following document for additional details regarding load balancer - // classes: - // - // https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class - // - // If empty / nil no services will be announced. - // - // +kubebuilder:validation:Optional - ServiceSelector *slimv1.LabelSelector `json:"serviceSelector,omitempty"` - // Neighbors is a list of neighboring BGP peers for this virtual router - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - Neighbors []CiliumBGPNeighbor `json:"neighbors"` -} - -// SetDefaults applies default values on the CiliumBGPPeeringPolicy. -// This is normally done by kube-apiserver for fields with explicit static defaults, -// the main use of this method is to avoid the need for nil-checks in the controller code. -func (p *CiliumBGPPeeringPolicy) SetDefaults() { - for i := range p.Spec.VirtualRouters { - p.Spec.VirtualRouters[i].SetDefaults() - } -} - -// SetDefaults applies default values on the CiliumBGPVirtualRouter. -// This is normally done by kube-apiserver for fields with explicit static defaults, -// the main use of this method is to avoid the need for nil-checks in the controller code. -func (r *CiliumBGPVirtualRouter) SetDefaults() { - if r.ExportPodCIDR == nil { - r.ExportPodCIDR = pointer.Bool(DefaultBGPExportPodCIDR) - } - for i := range r.Neighbors { - r.Neighbors[i].SetDefaults() - } -} - -// SetDefaults applies default values on the CiliumBGPNeighbor. -// This is normally done by kube-apiserver for fields with explicit static defaults, -// the main use of this method is to avoid the need for nil-checks in the controller code. -func (n *CiliumBGPNeighbor) SetDefaults() { - if n.PeerPort == nil || *n.PeerPort == 0 { - n.PeerPort = pointer.Int32(DefaultBGPPeerPort) - } - if n.EBGPMultihopTTL == nil { - n.EBGPMultihopTTL = pointer.Int32(DefaultBGPEBGPMultihopTTL) - } - if n.ConnectRetryTimeSeconds == nil || *n.ConnectRetryTimeSeconds == 0 { - n.ConnectRetryTimeSeconds = pointer.Int32(DefaultBGPConnectRetryTimeSeconds) - } - if n.HoldTimeSeconds == nil || *n.HoldTimeSeconds == 0 { - n.HoldTimeSeconds = pointer.Int32(DefaultBGPHoldTimeSeconds) - } - if n.KeepAliveTimeSeconds == nil || *n.KeepAliveTimeSeconds == 0 { - n.KeepAliveTimeSeconds = pointer.Int32(DefaultBGPKeepAliveTimeSeconds) - } - if n.GracefulRestart != nil && n.GracefulRestart.Enabled && - (n.GracefulRestart.RestartTimeSeconds == nil || *n.GracefulRestart.RestartTimeSeconds == 0) { - n.GracefulRestart.RestartTimeSeconds = pointer.Int32(DefaultBGPGRRestartTimeSeconds) - } - if len(n.Families) == 0 { - n.Families = []CiliumBGPFamily{ - { - Afi: "ipv4", - Safi: "unicast", - }, - { - Afi: "ipv6", - Safi: "unicast", - }, - } - } -} - -// Validate validates CiliumBGPNeighbor's configuration constraints -// that can not be expressed using the kubebuilder validation markers. -func (n *CiliumBGPNeighbor) Validate() error { - keepAliveTime := pointer.Int32Deref(n.KeepAliveTimeSeconds, DefaultBGPKeepAliveTimeSeconds) - holdTime := pointer.Int32Deref(n.HoldTimeSeconds, DefaultBGPHoldTimeSeconds) - if keepAliveTime > holdTime { - return fmt.Errorf("KeepAliveTimeSeconds larger than HoldTimeSeconds for peer ASN:%d IP:%s", n.PeerASN, n.PeerAddress) - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/cidrgroups_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/cidrgroups_types.go deleted file mode 100644 index 28bb78003af..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/cidrgroups_types.go +++ /dev/null @@ -1,50 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/cilium/cilium/pkg/policy/api" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium},singular="ciliumcidrgroup",path="ciliumcidrgroups",scope="Cluster",shortName={ccg} -// +kubebuilder:object:root=true -// +kubebuilder:storageversion -// +deepequal-gen=false - -// CiliumCIDRGroup is a list of external CIDRs (i.e: CIDRs selecting peers -// outside the clusters) that can be referenced as a single entity from -// CiliumNetworkPolicies. -type CiliumCIDRGroup struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata,omitempty"` - - // +kubebuilder:validation:Required - Spec CiliumCIDRGroupSpec `json:"spec"` -} - -type CiliumCIDRGroupSpec struct { - // ExternalCIDRs is a list of CIDRs selecting peers outside the clusters. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=0 - ExternalCIDRs []api.CIDR `json:"externalCIDRs"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +deepequal-gen=false - -type CiliumCIDRGroupList struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ListMeta `json:"metadata,omitempty"` - Items []CiliumCIDRGroup `json:"items"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/cnc_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/cnc_types.go deleted file mode 100644 index 81a7e135e8e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/cnc_types.go +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -//+genclient -//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -//+kubebuilder:resource:categories={cilium} -//+kubebuilder:object:root=true -//+deepequal-gen=false -//+kubebuilder:storageversion - -// CiliumNodeConfig is a list of configuration key-value pairs. It is applied to -// nodes indicated by a label selector. -// -// If multiple overrides apply to the same node, they will be ordered by name -// with later Overrides overwriting any conflicting keys. -type CiliumNodeConfig struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Spec is the desired Cilium configuration overrides for a given node - Spec CiliumNodeConfigSpec `json:"spec"` -} - -// +deepequal-gen=false -type CiliumNodeConfigSpec struct { - // Defaults is treated the same as the cilium-config ConfigMap - a set - // of key-value pairs parsed by the agent and operator processes. - // Each key must be a valid config-map data field (i.e. a-z, A-Z, -, _, and .) - Defaults map[string]string `json:"defaults"` - - // NodeSelector is a label selector that determines to which nodes - // this configuration applies. - // If not supplied, then this config applies to no nodes. If - // empty, then it applies to all nodes. - NodeSelector *metav1.LabelSelector `json:"nodeSelector"` -} - -//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -//+deepequal-gen=false - -type CiliumNodeConfigList struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ListMeta `json:"metadata,omitempty"` - Items []CiliumNodeConfig `json:"items"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/doc.go deleted file mode 100644 index d90d9acc806..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:deepcopy-gen=package,register -// +k8s:openapi-gen=true -// +deepequal-gen=package - -// Package v2alpha1 is the v2alpha1 version of the API. -// +groupName=cilium.io -package v2alpha1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/ippool_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/ippool_types.go deleted file mode 100644 index a0e8792f2d0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/ippool_types.go +++ /dev/null @@ -1,86 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium},singular="ciliumpodippool",path="ciliumpodippools",scope="Cluster",shortName={cpip} -// +kubebuilder:object:root=true -// +kubebuilder:storageversion - -// CiliumPodIPPool defines an IP pool that can be used for pooled IPAM (i.e. the multi-pool IPAM -// mode). -type CiliumPodIPPool struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata,omitempty"` - - // +kubebuilder:validation:Required - Spec IPPoolSpec `json:"spec"` -} - -type IPPoolSpec struct { - // IPv4 specifies the IPv4 CIDRs and mask sizes of the pool - // - // +kubebuilder:validation:Optional - IPv4 *IPv4PoolSpec `json:"ipv4"` - - // IPv6 specifies the IPv6 CIDRs and mask sizes of the pool - // - // +kubebuilder:validation:Optional - IPv6 *IPv6PoolSpec `json:"ipv6"` -} - -type IPv4PoolSpec struct { - // CIDRs is a list of IPv4 CIDRs that are part of the pool. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - CIDRs []PoolCIDR `json:"cidrs"` - - // MaskSize is the mask size of the pool. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=32 - // +kubebuilder:validation:ExclusiveMaximum=false - MaskSize uint8 `json:"maskSize"` -} - -type IPv6PoolSpec struct { - // CIDRs is a list of IPv6 CIDRs that are part of the pool. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinItems=1 - CIDRs []PoolCIDR `json:"cidrs"` - - // MaskSize is the mask size of the pool. - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=128 - // +kubebuilder:validation:ExclusiveMaximum=false - MaskSize uint8 `json:"maskSize"` -} - -// PoolCIDR is an IP pool CIDR. -// -// +kubebuilder:validation:Format=cidr -type PoolCIDR string - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +deepequal-gen=false - -// CiliumPodIPPoolList is a list of CiliumPodIPPool objects. -type CiliumPodIPPoolList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - - // Items is a list of CiliumPodIPPools. - Items []CiliumPodIPPool `json:"items"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/l2announcement_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/l2announcement_types.go deleted file mode 100644 index 7170260459f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/l2announcement_types.go +++ /dev/null @@ -1,109 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - slimv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// L2AnnounceLoadBalancerClass defines the L2 Announcer load balancer class for Services. -const L2AnnounceLoadBalancerClass = "io.cilium/l2-announcer" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium},singular="ciliuml2announcementpolicy",path="ciliuml2announcementpolicies",scope="Cluster",shortName={l2announcement} -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type=date -// +kubebuilder:subresource:status -// +kubebuilder:storageversion - -// CiliumL2AnnouncementPolicy is a Kubernetes third-party resource which -// is used to defined which nodes should announce what services on the -// L2 network. -type CiliumL2AnnouncementPolicy struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec is a human readable description of a L2 announcement policy - // - // +kubebuilder:validation:Optional - Spec CiliumL2AnnouncementPolicySpec `json:"spec,omitempty"` - - // Status is the status of the policy. - // - // +deepequal-gen=false - // +kubebuilder:validation:Optional - Status CiliumL2AnnouncementPolicyStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumL2AnnouncementPolicyList is a list of -// CiliumL2AnnouncementPolicy objects. -type CiliumL2AnnouncementPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumL2AnnouncementPolicies. - Items []CiliumL2AnnouncementPolicy `json:"items"` -} - -// +deepequal-gen=true - -// CiliumL2AnnouncementPolicySpec specifies which nodes should announce what -// services to the L2 networks attached to the given list of interfaces. -type CiliumL2AnnouncementPolicySpec struct { - // NodeSelector selects a group of nodes which will announce the IPs for - // the services selected by the service selector. - // - // If nil this policy applies to all nodes. - // - // +kubebuilder:validation:Optional - NodeSelector *slimv1.LabelSelector `json:"nodeSelector"` - // ServiceSelector selects a set of services which will be announced over L2 networks. - // The loadBalancerClass for a service must be nil or specify a supported class, e.g. - // "io.cilium/l2-announcer". Refer to the following document for additional details - // regarding load balancer classes: - // - // https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class - // - // If nil this policy applies to all services. - // - // +kubebuilder:validation:Optional - ServiceSelector *slimv1.LabelSelector `json:"serviceSelector"` - // If true, the loadbalancer IPs of the services are announced - // - // If nil this policy applies to all services. - // - // +kubebuilder:validation:Optional - LoadBalancerIPs bool `json:"loadBalancerIPs"` - // If true, the external IPs of the services are announced - // - // +kubebuilder:validation:Optional - ExternalIPs bool `json:"externalIPs"` - // A list of regular expressions that express which network interface(s) should be used - // to announce the services over. If nil, all network interfaces are used. - // - // +kubebuilder:validation:Optional - Interfaces []string `json:"interfaces"` -} - -// +deepequal-gen=false - -// CiliumL2AnnouncementPolicyStatus contains the status of a CiliumL2AnnouncementPolicy. -type CiliumL2AnnouncementPolicyStatus struct { - // Current service state - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/lbipam_types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/lbipam_types.go deleted file mode 100644 index 95d5414f7a9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/lbipam_types.go +++ /dev/null @@ -1,126 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - slimv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium},singular="ciliumloadbalancerippool",path="ciliumloadbalancerippools",scope="Cluster",shortName={ippools,ippool,lbippool,lbippools} -// +kubebuilder:printcolumn:JSONPath=".spec.disabled",name="Disabled",type=boolean -// +kubebuilder:printcolumn:name="Conflicting",type=string,JSONPath=`.status.conditions[?(@.type=="cilium.io/PoolConflict")].status` -// +kubebuilder:printcolumn:name="IPs Available",type=string,JSONPath=`.status.conditions[?(@.type=="cilium.io/IPsAvailable")].message` -// +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name="Age",type=date -// +kubebuilder:subresource:status -// +kubebuilder:storageversion - -// CiliumLoadBalancerIPPool is a Kubernetes third-party resource which -// is used to defined pools of IPs which the operator can use to to allocate -// and advertise IPs for Services of type LoadBalancer. -type CiliumLoadBalancerIPPool struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Spec is a human readable description for a BGP load balancer - // ip pool. - // - // +kubebuilder:validation:Required - Spec CiliumLoadBalancerIPPoolSpec `json:"spec,omitempty"` - - // Status is the status of the IP Pool. - // - // It might be possible for users to define overlapping IP Pools, we can't validate or enforce non-overlapping pools - // during object creation. The Cilium operator will do this validation and update the status to reflect the ability - // to allocate IPs from this pool. - // - // +deepequal-gen=false - // +kubebuilder:validation:Optional - Status CiliumLoadBalancerIPPoolStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumLoadBalancerIPPoolList is a list of -// CiliumLoadBalancerIPPool objects. -type CiliumLoadBalancerIPPoolList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumBGPLoadBalancerIPPools. - Items []CiliumLoadBalancerIPPool `json:"items"` -} - -// +deepequal-gen=true - -// CiliumLoadBalancerIPPoolSpec is a human readable description for -// a load balancer IP pool. -type CiliumLoadBalancerIPPoolSpec struct { - // ServiceSelector selects a set of services which are eligible to receive IPs from this - // - // +kubebuilder:validation:Optional - ServiceSelector *slimv1.LabelSelector `json:"serviceSelector"` - // AllowFirstLastIPs, if set to `yes` means that the first and last IPs of each CIDR will be allocatable. - // If `no` or undefined, these IPs will be reserved. This field is ignored for /{31,32} and /{127,128} CIDRs since - // reserving the first and last IPs would make the CIDRs unusable. - // - // +kubebuilder:validation:Optional - AllowFirstLastIPs AllowFirstLastIPType `json:"allowFirstLastIPs,omitempty"` - // Cidrs is a list of CIDRs comprising this IP Pool - // Deprecated: please use the `blocks` field instead. This field will be removed in a future release. - // https://github.com/cilium/cilium/issues/28590 - // - // +kubebuilder:validation:Optional - Cidrs []CiliumLoadBalancerIPPoolIPBlock `json:"cidrs,omitempty"` - // Blocks is a list of CIDRs comprising this IP Pool - // - // +kubebuilder:validation:Optional - Blocks []CiliumLoadBalancerIPPoolIPBlock `json:"blocks,omitempty"` - // Disabled, if set to true means that no new IPs will be allocated from this pool. - // Existing allocations will not be removed from services. - // - // +kubebuilder:validation:Optional - // +kubebuilder:default=false - Disabled bool `json:"disabled"` -} - -// +kubebuilder:validation:Enum=Yes;No -type AllowFirstLastIPType string - -const ( - AllowFirstLastIPNo AllowFirstLastIPType = "No" - AllowFirstLastIPYes AllowFirstLastIPType = "Yes" -) - -// CiliumLoadBalancerIPPoolIPBlock describes a single IP block. -type CiliumLoadBalancerIPPoolIPBlock struct { - // +kubebuilder:validation:Format=cidr - // +kubebuilder:validation:Optional - Cidr IPv4orIPv6CIDR `json:"cidr"` - // +kubebuilder:validation:Optional - Start string `json:"start,omitempty"` - // +kubebuilder:validation:Optional - Stop string `json:"stop,omitempty"` -} - -// +deepequal-gen=false - -// CiliumLoadBalancerIPPoolStatus contains the status of a CiliumLoadBalancerIPPool. -type CiliumLoadBalancerIPPoolStatus struct { - // Current service state - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/register.go deleted file mode 100644 index 54d7f9014c7..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/register.go +++ /dev/null @@ -1,180 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - k8sconst "github.com/cilium/cilium/pkg/k8s/apis/cilium.io" -) - -const ( - // CustomResourceDefinitionGroup is the name of the third party resource group - CustomResourceDefinitionGroup = k8sconst.CustomResourceDefinitionGroup - - // CustomResourceDefinitionVersion is the current version of the resource - CustomResourceDefinitionVersion = "v2alpha1" - - // Cilium Endpoint Slice (CES) - - // CESPluralName is the plural name of Cilium Endpoint Slice - CESPluralName = "ciliumendpointslices" - - // CESKindDefinition is the kind name of Cilium Endpoint Slice - CESKindDefinition = "CiliumEndpointSlice" - - // CESName is the full name of Cilium Endpoint Slice - CESName = CESPluralName + "." + CustomResourceDefinitionGroup - - // Cilium BGP Peering Policy (BGPP) - - // BGPPPluralName is the plural name of Cilium BGP Peering Policy - BGPPPluralName = "ciliumbgppeeringpolicies" - - // BGPPKindDefinition is the kind name of Cilium BGP Peering Policy - BGPPKindDefinition = "CiliumBGPPeeringPolicy" - - // BGPPName is the full name of Cilium BGP Peering Policy - BGPPName = BGPPPluralName + "." + CustomResourceDefinitionGroup - - // BGPClusterConfig (BGPCC) - BGPCCPluralName = "ciliumbgpclusterconfigs" - BGPCCKindDefinition = "CiliumBGPClusterConfig" - BGPCCName = BGPCCPluralName + "." + CustomResourceDefinitionGroup - - // BGPPeerConfig (BGPPC) - BGPPCPluralName = "ciliumbgppeerconfigs" - BGPPCKindDefinition = "CiliumBGPPeerConfig" - BGPPCName = BGPPCPluralName + "." + CustomResourceDefinitionGroup - - // BGPAdvertisement (BGPA) - BGPAPluralName = "ciliumbgpadvertisements" - BGPAKindDefinition = "CiliumBGPAdvertisement" - BGPAName = BGPAPluralName + "." + CustomResourceDefinitionGroup - - // BGPNodeConfig (BGPNC) - BGPNCPluralName = "ciliumbgpnodeconfigs" - BGPNCKindDefinition = "CiliumBGPNodeConfig" - BGPNCName = BGPNCPluralName + "." + CustomResourceDefinitionGroup - - // BGPNodeConfigOverride (BGPNCO) - BGPNCOPluralName = "ciliumbgpnodeconfigoverrides" - BGPNCOKindDefinition = "CiliumBGPNodeConfigOverride" - BGPNCOName = BGPNCOPluralName + "." + CustomResourceDefinitionGroup - - // Cilium Load Balancer IP Pool (IPPool) - - // PoolPluralName is the plural name of Cilium Load Balancer IP Pool - PoolPluralName = "ciliumloadbalancerippools" - - // PoolKindDefinition is the kind name of Cilium Peering Policy - PoolKindDefinition = "CiliumLoadBalancerIPPool" - - // LBIPPoolName is the full name of Cilium Load Balancer IP Pool - LBIPPoolName = PoolPluralName + "." + CustomResourceDefinitionGroup - - // CiliumNodeConfig (CNC) - CNCPluralName = "ciliumnodeconfigs" - CNCKindDefinition = "CiliumNodeConfig" - CNCName = CNCPluralName + "." + CustomResourceDefinitionGroup - - // CiliumCIDRGroup (CCG) - CCGPluralName = "ciliumcidrgroups" - CCGKindDefinition = "CiliumCIDRGroup" - CCGName = CCGPluralName + "." + CustomResourceDefinitionGroup - - // Cilium L2 Announcement policy - - // L2AnnouncementSingularName is the singular name ofCilium L2 announcement policy - L2AnnouncementSingularName = "ciliuml2announcementpolicy" - - // L2AnnouncementPluralName is the plural name of Cilium L2 announcement policy - L2AnnouncementPluralName = "ciliuml2announcementpolicies" - - // L2AnnouncementKindDefinition is the kind name of Cilium L2 announcement policy - L2AnnouncementKindDefinition = "CiliumL2AnnouncementPolicy" - - // L2AnnouncementName is the full name of Cilium L2 announcement policy - L2AnnouncementName = L2AnnouncementPluralName + "." + CustomResourceDefinitionGroup - - // CiliumPodIPPool (CPIP) - CPIPPluralName = "ciliumpodippools" - CPIPKindDefinition = "CiliumPodIPPool" - CPIPName = CPIPPluralName + "." + CustomResourceDefinitionGroup -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{ - Group: CustomResourceDefinitionGroup, - Version: CustomResourceDefinitionVersion, -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - // SchemeBuilder is needed by DeepCopy generator. - SchemeBuilder runtime.SchemeBuilder - // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. - localSchemeBuilder = &SchemeBuilder - - // 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) - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CiliumEndpointSlice{}, - &CiliumEndpointSliceList{}, - &CiliumBGPPeeringPolicy{}, - &CiliumBGPPeeringPolicyList{}, - &CiliumLoadBalancerIPPool{}, - &CiliumLoadBalancerIPPoolList{}, - &CiliumNodeConfig{}, - &CiliumNodeConfigList{}, - &CiliumCIDRGroup{}, - &CiliumCIDRGroupList{}, - &CiliumL2AnnouncementPolicy{}, - &CiliumL2AnnouncementPolicyList{}, - &CiliumPodIPPool{}, - &CiliumPodIPPoolList{}, - - // new BGP types - &CiliumBGPClusterConfig{}, - &CiliumBGPClusterConfigList{}, - &CiliumBGPPeerConfig{}, - &CiliumBGPPeerConfigList{}, - &CiliumBGPAdvertisement{}, - &CiliumBGPAdvertisementList{}, - &CiliumBGPNodeConfig{}, - &CiliumBGPNodeConfigList{}, - &CiliumBGPNodeConfigOverride{}, - &CiliumBGPNodeConfigOverrideList{}, - ) - - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/types.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/types.go deleted file mode 100644 index df388cc5ca1..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/types.go +++ /dev/null @@ -1,77 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package v2alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/cilium/cilium/api/v1/models" - cilium_v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - slimv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// +kubebuilder:validation:Format=cidr -type IPv4orIPv6CIDR string - -type EgressRule struct { - // Selects Namespaces using cluster-scoped labels. This field follows standard label - // selector semantics; if present but empty, it selects all namespaces. - NamespaceSelector *slimv1.LabelSelector `json:"namespaceSelector,omitempty"` - - // This is a label selector which selects Pods. This field follows standard label - // selector semantics; if present but empty, it selects all pods. - PodSelector *slimv1.LabelSelector `json:"podSelector,omitempty"` -} - -// CoreCiliumEndpoint is slim version of status of CiliumEndpoint. -type CoreCiliumEndpoint struct { - // Name indicate as CiliumEndpoint name. - Name string `json:"name,omitempty"` - // IdentityID is the numeric identity of the endpoint - IdentityID int64 `json:"id,omitempty"` - // Networking is the networking properties of the endpoint. - - // +kubebuilder:validation:Optional - Networking *cilium_v2.EndpointNetworking `json:"networking,omitempty"` - // Encryption is the encryption configuration of the node - - // +kubebuilder:validation:Optional - Encryption cilium_v2.EncryptionSpec `json:"encryption,omitempty"` - NamedPorts models.NamedPorts `json:"named-ports,omitempty"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:categories={cilium},singular="ciliumendpointslice",path="ciliumendpointslices",scope="Cluster",shortName={ces} -// +kubebuilder:storageversion - -// CiliumEndpointSlice contains a group of CoreCiliumendpoints. -type CiliumEndpointSlice struct { - // +deepequal-gen=false - metav1.TypeMeta `json:",inline"` - // +deepequal-gen=false - metav1.ObjectMeta `json:"metadata"` - - // Namespace indicate as CiliumEndpointSlice namespace. - // All the CiliumEndpoints within the same namespace are put together - // in CiliumEndpointSlice. - Namespace string `json:"namespace,omitempty"` - - // Endpoints is a list of coreCEPs packed in a CiliumEndpointSlice - Endpoints []CoreCiliumEndpoint `json:"endpoints"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=false -// +deepequal-gen=false - -// CiliumEndpointSliceList is a list of CiliumEndpointSlice objects. -type CiliumEndpointSliceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - // Items is a list of CiliumEndpointSlice. - Items []CiliumEndpointSlice `json:"items"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/zz_generated.deepcopy.go deleted file mode 100644 index d8ce33de8e9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1877 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - models "github.com/cilium/cilium/api/v1/models" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - api "github.com/cilium/cilium/pkg/policy/api" - metav1 "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 *Advertisement) DeepCopyInto(out *Advertisement) { - *out = *in - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.Attributes != nil { - in, out := &in.Attributes, &out.Attributes - *out = new(CiliumBGPAttributes) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Advertisement. -func (in *Advertisement) DeepCopy() *Advertisement { - if in == nil { - return nil - } - out := new(Advertisement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BGPCommunities) DeepCopyInto(out *BGPCommunities) { - *out = *in - if in.Standard != nil { - in, out := &in.Standard, &out.Standard - *out = make([]BGPStandardCommunity, len(*in)) - copy(*out, *in) - } - if in.Large != nil { - in, out := &in.Large, &out.Large - *out = make([]BGPLargeCommunity, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BGPCommunities. -func (in *BGPCommunities) DeepCopy() *BGPCommunities { - if in == nil { - return nil - } - out := new(BGPCommunities) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPAdvertisement) DeepCopyInto(out *CiliumBGPAdvertisement) { - *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 CiliumBGPAdvertisement. -func (in *CiliumBGPAdvertisement) DeepCopy() *CiliumBGPAdvertisement { - if in == nil { - return nil - } - out := new(CiliumBGPAdvertisement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPAdvertisement) 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 *CiliumBGPAdvertisementList) DeepCopyInto(out *CiliumBGPAdvertisementList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumBGPAdvertisement, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPAdvertisementList. -func (in *CiliumBGPAdvertisementList) DeepCopy() *CiliumBGPAdvertisementList { - if in == nil { - return nil - } - out := new(CiliumBGPAdvertisementList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPAdvertisementList) 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 *CiliumBGPAdvertisementSpec) DeepCopyInto(out *CiliumBGPAdvertisementSpec) { - *out = *in - if in.Advertisements != nil { - in, out := &in.Advertisements, &out.Advertisements - *out = make([]Advertisement, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPAdvertisementSpec. -func (in *CiliumBGPAdvertisementSpec) DeepCopy() *CiliumBGPAdvertisementSpec { - if in == nil { - return nil - } - out := new(CiliumBGPAdvertisementSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPAttributes) DeepCopyInto(out *CiliumBGPAttributes) { - *out = *in - if in.Community != nil { - in, out := &in.Community, &out.Community - *out = new(BGPCommunities) - (*in).DeepCopyInto(*out) - } - if in.LocalPreference != nil { - in, out := &in.LocalPreference, &out.LocalPreference - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPAttributes. -func (in *CiliumBGPAttributes) DeepCopy() *CiliumBGPAttributes { - if in == nil { - return nil - } - out := new(CiliumBGPAttributes) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPClusterConfig) DeepCopyInto(out *CiliumBGPClusterConfig) { - *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 CiliumBGPClusterConfig. -func (in *CiliumBGPClusterConfig) DeepCopy() *CiliumBGPClusterConfig { - if in == nil { - return nil - } - out := new(CiliumBGPClusterConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPClusterConfig) 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 *CiliumBGPClusterConfigList) DeepCopyInto(out *CiliumBGPClusterConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumBGPClusterConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPClusterConfigList. -func (in *CiliumBGPClusterConfigList) DeepCopy() *CiliumBGPClusterConfigList { - if in == nil { - return nil - } - out := new(CiliumBGPClusterConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPClusterConfigList) 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 *CiliumBGPClusterConfigSpec) DeepCopyInto(out *CiliumBGPClusterConfigSpec) { - *out = *in - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.BGPInstances != nil { - in, out := &in.BGPInstances, &out.BGPInstances - *out = make([]CiliumBGPInstance, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPClusterConfigSpec. -func (in *CiliumBGPClusterConfigSpec) DeepCopy() *CiliumBGPClusterConfigSpec { - if in == nil { - return nil - } - out := new(CiliumBGPClusterConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPFamily) DeepCopyInto(out *CiliumBGPFamily) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPFamily. -func (in *CiliumBGPFamily) DeepCopy() *CiliumBGPFamily { - if in == nil { - return nil - } - out := new(CiliumBGPFamily) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPFamilyWithAdverts) DeepCopyInto(out *CiliumBGPFamilyWithAdverts) { - *out = *in - out.CiliumBGPFamily = in.CiliumBGPFamily - if in.Advertisements != nil { - in, out := &in.Advertisements, &out.Advertisements - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPFamilyWithAdverts. -func (in *CiliumBGPFamilyWithAdverts) DeepCopy() *CiliumBGPFamilyWithAdverts { - if in == nil { - return nil - } - out := new(CiliumBGPFamilyWithAdverts) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPInstance) DeepCopyInto(out *CiliumBGPInstance) { - *out = *in - if in.LocalASN != nil { - in, out := &in.LocalASN, &out.LocalASN - *out = new(int64) - **out = **in - } - if in.Peers != nil { - in, out := &in.Peers, &out.Peers - *out = make([]CiliumBGPPeer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPInstance. -func (in *CiliumBGPInstance) DeepCopy() *CiliumBGPInstance { - if in == nil { - return nil - } - out := new(CiliumBGPInstance) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPNeighbor) DeepCopyInto(out *CiliumBGPNeighbor) { - *out = *in - if in.PeerPort != nil { - in, out := &in.PeerPort, &out.PeerPort - *out = new(int32) - **out = **in - } - if in.AuthSecretRef != nil { - in, out := &in.AuthSecretRef, &out.AuthSecretRef - *out = new(string) - **out = **in - } - if in.EBGPMultihopTTL != nil { - in, out := &in.EBGPMultihopTTL, &out.EBGPMultihopTTL - *out = new(int32) - **out = **in - } - if in.ConnectRetryTimeSeconds != nil { - in, out := &in.ConnectRetryTimeSeconds, &out.ConnectRetryTimeSeconds - *out = new(int32) - **out = **in - } - if in.HoldTimeSeconds != nil { - in, out := &in.HoldTimeSeconds, &out.HoldTimeSeconds - *out = new(int32) - **out = **in - } - if in.KeepAliveTimeSeconds != nil { - in, out := &in.KeepAliveTimeSeconds, &out.KeepAliveTimeSeconds - *out = new(int32) - **out = **in - } - if in.GracefulRestart != nil { - in, out := &in.GracefulRestart, &out.GracefulRestart - *out = new(CiliumBGPNeighborGracefulRestart) - (*in).DeepCopyInto(*out) - } - if in.Families != nil { - in, out := &in.Families, &out.Families - *out = make([]CiliumBGPFamily, len(*in)) - copy(*out, *in) - } - if in.AdvertisedPathAttributes != nil { - in, out := &in.AdvertisedPathAttributes, &out.AdvertisedPathAttributes - *out = make([]CiliumBGPPathAttributes, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNeighbor. -func (in *CiliumBGPNeighbor) DeepCopy() *CiliumBGPNeighbor { - if in == nil { - return nil - } - out := new(CiliumBGPNeighbor) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPNeighborGracefulRestart) DeepCopyInto(out *CiliumBGPNeighborGracefulRestart) { - *out = *in - if in.RestartTimeSeconds != nil { - in, out := &in.RestartTimeSeconds, &out.RestartTimeSeconds - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNeighborGracefulRestart. -func (in *CiliumBGPNeighborGracefulRestart) DeepCopy() *CiliumBGPNeighborGracefulRestart { - if in == nil { - return nil - } - out := new(CiliumBGPNeighborGracefulRestart) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPNodeConfig) DeepCopyInto(out *CiliumBGPNodeConfig) { - *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 CiliumBGPNodeConfig. -func (in *CiliumBGPNodeConfig) DeepCopy() *CiliumBGPNodeConfig { - if in == nil { - return nil - } - out := new(CiliumBGPNodeConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPNodeConfig) 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 *CiliumBGPNodeConfigInstanceOverride) DeepCopyInto(out *CiliumBGPNodeConfigInstanceOverride) { - *out = *in - if in.RouterID != nil { - in, out := &in.RouterID, &out.RouterID - *out = new(string) - **out = **in - } - if in.LocalPort != nil { - in, out := &in.LocalPort, &out.LocalPort - *out = new(int32) - **out = **in - } - if in.Peers != nil { - in, out := &in.Peers, &out.Peers - *out = make([]CiliumBGPNodeConfigPeerOverride, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNodeConfigInstanceOverride. -func (in *CiliumBGPNodeConfigInstanceOverride) DeepCopy() *CiliumBGPNodeConfigInstanceOverride { - if in == nil { - return nil - } - out := new(CiliumBGPNodeConfigInstanceOverride) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPNodeConfigList) DeepCopyInto(out *CiliumBGPNodeConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumBGPNodeConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNodeConfigList. -func (in *CiliumBGPNodeConfigList) DeepCopy() *CiliumBGPNodeConfigList { - if in == nil { - return nil - } - out := new(CiliumBGPNodeConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPNodeConfigList) 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 *CiliumBGPNodeConfigOverride) DeepCopyInto(out *CiliumBGPNodeConfigOverride) { - *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 CiliumBGPNodeConfigOverride. -func (in *CiliumBGPNodeConfigOverride) DeepCopy() *CiliumBGPNodeConfigOverride { - if in == nil { - return nil - } - out := new(CiliumBGPNodeConfigOverride) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPNodeConfigOverride) 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 *CiliumBGPNodeConfigOverrideList) DeepCopyInto(out *CiliumBGPNodeConfigOverrideList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumBGPNodeConfigOverride, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNodeConfigOverrideList. -func (in *CiliumBGPNodeConfigOverrideList) DeepCopy() *CiliumBGPNodeConfigOverrideList { - if in == nil { - return nil - } - out := new(CiliumBGPNodeConfigOverrideList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPNodeConfigOverrideList) 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 *CiliumBGPNodeConfigOverrideSpec) DeepCopyInto(out *CiliumBGPNodeConfigOverrideSpec) { - *out = *in - if in.BGPInstances != nil { - in, out := &in.BGPInstances, &out.BGPInstances - *out = make([]CiliumBGPNodeConfigInstanceOverride, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNodeConfigOverrideSpec. -func (in *CiliumBGPNodeConfigOverrideSpec) DeepCopy() *CiliumBGPNodeConfigOverrideSpec { - if in == nil { - return nil - } - out := new(CiliumBGPNodeConfigOverrideSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPNodeConfigPeerOverride) DeepCopyInto(out *CiliumBGPNodeConfigPeerOverride) { - *out = *in - if in.LocalAddress != nil { - in, out := &in.LocalAddress, &out.LocalAddress - *out = new(string) - **out = **in - } - if in.LocalPort != nil { - in, out := &in.LocalPort, &out.LocalPort - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNodeConfigPeerOverride. -func (in *CiliumBGPNodeConfigPeerOverride) DeepCopy() *CiliumBGPNodeConfigPeerOverride { - if in == nil { - return nil - } - out := new(CiliumBGPNodeConfigPeerOverride) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPNodeInstance) DeepCopyInto(out *CiliumBGPNodeInstance) { - *out = *in - if in.LocalASN != nil { - in, out := &in.LocalASN, &out.LocalASN - *out = new(int64) - **out = **in - } - if in.RouterID != nil { - in, out := &in.RouterID, &out.RouterID - *out = new(string) - **out = **in - } - if in.LocalPort != nil { - in, out := &in.LocalPort, &out.LocalPort - *out = new(int32) - **out = **in - } - if in.Peers != nil { - in, out := &in.Peers, &out.Peers - *out = make([]CiliumBGPNodePeer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNodeInstance. -func (in *CiliumBGPNodeInstance) DeepCopy() *CiliumBGPNodeInstance { - if in == nil { - return nil - } - out := new(CiliumBGPNodeInstance) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPNodeInstanceStatus) DeepCopyInto(out *CiliumBGPNodeInstanceStatus) { - *out = *in - if in.LocalASN != nil { - in, out := &in.LocalASN, &out.LocalASN - *out = new(int64) - **out = **in - } - if in.PeerStatuses != nil { - in, out := &in.PeerStatuses, &out.PeerStatuses - *out = make([]CiliumBGPNodePeerStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNodeInstanceStatus. -func (in *CiliumBGPNodeInstanceStatus) DeepCopy() *CiliumBGPNodeInstanceStatus { - if in == nil { - return nil - } - out := new(CiliumBGPNodeInstanceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPNodePeer) DeepCopyInto(out *CiliumBGPNodePeer) { - *out = *in - if in.PeerAddress != nil { - in, out := &in.PeerAddress, &out.PeerAddress - *out = new(string) - **out = **in - } - if in.PeerASN != nil { - in, out := &in.PeerASN, &out.PeerASN - *out = new(int64) - **out = **in - } - if in.LocalAddress != nil { - in, out := &in.LocalAddress, &out.LocalAddress - *out = new(string) - **out = **in - } - if in.PeerConfigRef != nil { - in, out := &in.PeerConfigRef, &out.PeerConfigRef - *out = new(PeerConfigReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNodePeer. -func (in *CiliumBGPNodePeer) DeepCopy() *CiliumBGPNodePeer { - if in == nil { - return nil - } - out := new(CiliumBGPNodePeer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPNodePeerStatus) DeepCopyInto(out *CiliumBGPNodePeerStatus) { - *out = *in - if in.PeerASN != nil { - in, out := &in.PeerASN, &out.PeerASN - *out = new(int64) - **out = **in - } - if in.PeeringState != nil { - in, out := &in.PeeringState, &out.PeeringState - *out = new(string) - **out = **in - } - if in.Timers != nil { - in, out := &in.Timers, &out.Timers - *out = new(CiliumBGPTimersState) - (*in).DeepCopyInto(*out) - } - if in.Uptime != nil { - in, out := &in.Uptime, &out.Uptime - *out = new(string) - **out = **in - } - if in.RoutesReceived != nil { - in, out := &in.RoutesReceived, &out.RoutesReceived - *out = new(int32) - **out = **in - } - if in.RoutesAdvertised != nil { - in, out := &in.RoutesAdvertised, &out.RoutesAdvertised - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNodePeerStatus. -func (in *CiliumBGPNodePeerStatus) DeepCopy() *CiliumBGPNodePeerStatus { - if in == nil { - return nil - } - out := new(CiliumBGPNodePeerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPNodeSpec) DeepCopyInto(out *CiliumBGPNodeSpec) { - *out = *in - if in.BGPInstances != nil { - in, out := &in.BGPInstances, &out.BGPInstances - *out = make([]CiliumBGPNodeInstance, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNodeSpec. -func (in *CiliumBGPNodeSpec) DeepCopy() *CiliumBGPNodeSpec { - if in == nil { - return nil - } - out := new(CiliumBGPNodeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPNodeStatus) DeepCopyInto(out *CiliumBGPNodeStatus) { - *out = *in - if in.BGPInstances != nil { - in, out := &in.BGPInstances, &out.BGPInstances - *out = make([]CiliumBGPNodeInstanceStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPNodeStatus. -func (in *CiliumBGPNodeStatus) DeepCopy() *CiliumBGPNodeStatus { - if in == nil { - return nil - } - out := new(CiliumBGPNodeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPPathAttributes) DeepCopyInto(out *CiliumBGPPathAttributes) { - *out = *in - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.Communities != nil { - in, out := &in.Communities, &out.Communities - *out = new(BGPCommunities) - (*in).DeepCopyInto(*out) - } - if in.LocalPreference != nil { - in, out := &in.LocalPreference, &out.LocalPreference - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPPathAttributes. -func (in *CiliumBGPPathAttributes) DeepCopy() *CiliumBGPPathAttributes { - if in == nil { - return nil - } - out := new(CiliumBGPPathAttributes) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPPeer) DeepCopyInto(out *CiliumBGPPeer) { - *out = *in - if in.PeerAddress != nil { - in, out := &in.PeerAddress, &out.PeerAddress - *out = new(string) - **out = **in - } - if in.PeerASN != nil { - in, out := &in.PeerASN, &out.PeerASN - *out = new(int64) - **out = **in - } - if in.PeerConfigRef != nil { - in, out := &in.PeerConfigRef, &out.PeerConfigRef - *out = new(PeerConfigReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPPeer. -func (in *CiliumBGPPeer) DeepCopy() *CiliumBGPPeer { - if in == nil { - return nil - } - out := new(CiliumBGPPeer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPPeerConfig) DeepCopyInto(out *CiliumBGPPeerConfig) { - *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 CiliumBGPPeerConfig. -func (in *CiliumBGPPeerConfig) DeepCopy() *CiliumBGPPeerConfig { - if in == nil { - return nil - } - out := new(CiliumBGPPeerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPPeerConfig) 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 *CiliumBGPPeerConfigList) DeepCopyInto(out *CiliumBGPPeerConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumBGPPeerConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPPeerConfigList. -func (in *CiliumBGPPeerConfigList) DeepCopy() *CiliumBGPPeerConfigList { - if in == nil { - return nil - } - out := new(CiliumBGPPeerConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPPeerConfigList) 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 *CiliumBGPPeerConfigSpec) DeepCopyInto(out *CiliumBGPPeerConfigSpec) { - *out = *in - if in.Transport != nil { - in, out := &in.Transport, &out.Transport - *out = new(CiliumBGPTransport) - (*in).DeepCopyInto(*out) - } - if in.Timers != nil { - in, out := &in.Timers, &out.Timers - *out = new(CiliumBGPTimers) - (*in).DeepCopyInto(*out) - } - if in.AuthSecretRef != nil { - in, out := &in.AuthSecretRef, &out.AuthSecretRef - *out = new(string) - **out = **in - } - if in.GracefulRestart != nil { - in, out := &in.GracefulRestart, &out.GracefulRestart - *out = new(CiliumBGPNeighborGracefulRestart) - (*in).DeepCopyInto(*out) - } - if in.EBGPMultihop != nil { - in, out := &in.EBGPMultihop, &out.EBGPMultihop - *out = new(int32) - **out = **in - } - if in.Families != nil { - in, out := &in.Families, &out.Families - *out = make([]CiliumBGPFamilyWithAdverts, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPPeerConfigSpec. -func (in *CiliumBGPPeerConfigSpec) DeepCopy() *CiliumBGPPeerConfigSpec { - if in == nil { - return nil - } - out := new(CiliumBGPPeerConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPPeeringPolicy) DeepCopyInto(out *CiliumBGPPeeringPolicy) { - *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 CiliumBGPPeeringPolicy. -func (in *CiliumBGPPeeringPolicy) DeepCopy() *CiliumBGPPeeringPolicy { - if in == nil { - return nil - } - out := new(CiliumBGPPeeringPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPPeeringPolicy) 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 *CiliumBGPPeeringPolicyList) DeepCopyInto(out *CiliumBGPPeeringPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumBGPPeeringPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPPeeringPolicyList. -func (in *CiliumBGPPeeringPolicyList) DeepCopy() *CiliumBGPPeeringPolicyList { - if in == nil { - return nil - } - out := new(CiliumBGPPeeringPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumBGPPeeringPolicyList) 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 *CiliumBGPPeeringPolicySpec) DeepCopyInto(out *CiliumBGPPeeringPolicySpec) { - *out = *in - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.VirtualRouters != nil { - in, out := &in.VirtualRouters, &out.VirtualRouters - *out = make([]CiliumBGPVirtualRouter, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPPeeringPolicySpec. -func (in *CiliumBGPPeeringPolicySpec) DeepCopy() *CiliumBGPPeeringPolicySpec { - if in == nil { - return nil - } - out := new(CiliumBGPPeeringPolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPTimers) DeepCopyInto(out *CiliumBGPTimers) { - *out = *in - if in.ConnectRetryTimeSeconds != nil { - in, out := &in.ConnectRetryTimeSeconds, &out.ConnectRetryTimeSeconds - *out = new(int32) - **out = **in - } - if in.HoldTimeSeconds != nil { - in, out := &in.HoldTimeSeconds, &out.HoldTimeSeconds - *out = new(int32) - **out = **in - } - if in.KeepAliveTimeSeconds != nil { - in, out := &in.KeepAliveTimeSeconds, &out.KeepAliveTimeSeconds - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPTimers. -func (in *CiliumBGPTimers) DeepCopy() *CiliumBGPTimers { - if in == nil { - return nil - } - out := new(CiliumBGPTimers) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPTimersState) DeepCopyInto(out *CiliumBGPTimersState) { - *out = *in - if in.AppliedHoldTimeSeconds != nil { - in, out := &in.AppliedHoldTimeSeconds, &out.AppliedHoldTimeSeconds - *out = new(int32) - **out = **in - } - if in.AppliedKeepaliveSeconds != nil { - in, out := &in.AppliedKeepaliveSeconds, &out.AppliedKeepaliveSeconds - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPTimersState. -func (in *CiliumBGPTimersState) DeepCopy() *CiliumBGPTimersState { - if in == nil { - return nil - } - out := new(CiliumBGPTimersState) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPTransport) DeepCopyInto(out *CiliumBGPTransport) { - *out = *in - if in.LocalPort != nil { - in, out := &in.LocalPort, &out.LocalPort - *out = new(int32) - **out = **in - } - if in.PeerPort != nil { - in, out := &in.PeerPort, &out.PeerPort - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPTransport. -func (in *CiliumBGPTransport) DeepCopy() *CiliumBGPTransport { - if in == nil { - return nil - } - out := new(CiliumBGPTransport) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumBGPVirtualRouter) DeepCopyInto(out *CiliumBGPVirtualRouter) { - *out = *in - if in.ExportPodCIDR != nil { - in, out := &in.ExportPodCIDR, &out.ExportPodCIDR - *out = new(bool) - **out = **in - } - if in.PodIPPoolSelector != nil { - in, out := &in.PodIPPoolSelector, &out.PodIPPoolSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.ServiceSelector != nil { - in, out := &in.ServiceSelector, &out.ServiceSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.Neighbors != nil { - in, out := &in.Neighbors, &out.Neighbors - *out = make([]CiliumBGPNeighbor, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumBGPVirtualRouter. -func (in *CiliumBGPVirtualRouter) DeepCopy() *CiliumBGPVirtualRouter { - if in == nil { - return nil - } - out := new(CiliumBGPVirtualRouter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumCIDRGroup) DeepCopyInto(out *CiliumCIDRGroup) { - *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 CiliumCIDRGroup. -func (in *CiliumCIDRGroup) DeepCopy() *CiliumCIDRGroup { - if in == nil { - return nil - } - out := new(CiliumCIDRGroup) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumCIDRGroup) 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 *CiliumCIDRGroupList) DeepCopyInto(out *CiliumCIDRGroupList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumCIDRGroup, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumCIDRGroupList. -func (in *CiliumCIDRGroupList) DeepCopy() *CiliumCIDRGroupList { - if in == nil { - return nil - } - out := new(CiliumCIDRGroupList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumCIDRGroupList) 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 *CiliumCIDRGroupSpec) DeepCopyInto(out *CiliumCIDRGroupSpec) { - *out = *in - if in.ExternalCIDRs != nil { - in, out := &in.ExternalCIDRs, &out.ExternalCIDRs - *out = make([]api.CIDR, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumCIDRGroupSpec. -func (in *CiliumCIDRGroupSpec) DeepCopy() *CiliumCIDRGroupSpec { - if in == nil { - return nil - } - out := new(CiliumCIDRGroupSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumEndpointSlice) DeepCopyInto(out *CiliumEndpointSlice) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Endpoints != nil { - in, out := &in.Endpoints, &out.Endpoints - *out = make([]CoreCiliumEndpoint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumEndpointSlice. -func (in *CiliumEndpointSlice) DeepCopy() *CiliumEndpointSlice { - if in == nil { - return nil - } - out := new(CiliumEndpointSlice) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumEndpointSlice) 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 *CiliumEndpointSliceList) DeepCopyInto(out *CiliumEndpointSliceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumEndpointSlice, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumEndpointSliceList. -func (in *CiliumEndpointSliceList) DeepCopy() *CiliumEndpointSliceList { - if in == nil { - return nil - } - out := new(CiliumEndpointSliceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumEndpointSliceList) 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 *CiliumL2AnnouncementPolicy) DeepCopyInto(out *CiliumL2AnnouncementPolicy) { - *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 CiliumL2AnnouncementPolicy. -func (in *CiliumL2AnnouncementPolicy) DeepCopy() *CiliumL2AnnouncementPolicy { - if in == nil { - return nil - } - out := new(CiliumL2AnnouncementPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumL2AnnouncementPolicy) 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 *CiliumL2AnnouncementPolicyList) DeepCopyInto(out *CiliumL2AnnouncementPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumL2AnnouncementPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumL2AnnouncementPolicyList. -func (in *CiliumL2AnnouncementPolicyList) DeepCopy() *CiliumL2AnnouncementPolicyList { - if in == nil { - return nil - } - out := new(CiliumL2AnnouncementPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumL2AnnouncementPolicyList) 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 *CiliumL2AnnouncementPolicySpec) DeepCopyInto(out *CiliumL2AnnouncementPolicySpec) { - *out = *in - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.ServiceSelector != nil { - in, out := &in.ServiceSelector, &out.ServiceSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.Interfaces != nil { - in, out := &in.Interfaces, &out.Interfaces - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumL2AnnouncementPolicySpec. -func (in *CiliumL2AnnouncementPolicySpec) DeepCopy() *CiliumL2AnnouncementPolicySpec { - if in == nil { - return nil - } - out := new(CiliumL2AnnouncementPolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumL2AnnouncementPolicyStatus) DeepCopyInto(out *CiliumL2AnnouncementPolicyStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumL2AnnouncementPolicyStatus. -func (in *CiliumL2AnnouncementPolicyStatus) DeepCopy() *CiliumL2AnnouncementPolicyStatus { - if in == nil { - return nil - } - out := new(CiliumL2AnnouncementPolicyStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumLoadBalancerIPPool) DeepCopyInto(out *CiliumLoadBalancerIPPool) { - *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 CiliumLoadBalancerIPPool. -func (in *CiliumLoadBalancerIPPool) DeepCopy() *CiliumLoadBalancerIPPool { - if in == nil { - return nil - } - out := new(CiliumLoadBalancerIPPool) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumLoadBalancerIPPool) 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 *CiliumLoadBalancerIPPoolIPBlock) DeepCopyInto(out *CiliumLoadBalancerIPPoolIPBlock) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumLoadBalancerIPPoolIPBlock. -func (in *CiliumLoadBalancerIPPoolIPBlock) DeepCopy() *CiliumLoadBalancerIPPoolIPBlock { - if in == nil { - return nil - } - out := new(CiliumLoadBalancerIPPoolIPBlock) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumLoadBalancerIPPoolList) DeepCopyInto(out *CiliumLoadBalancerIPPoolList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumLoadBalancerIPPool, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumLoadBalancerIPPoolList. -func (in *CiliumLoadBalancerIPPoolList) DeepCopy() *CiliumLoadBalancerIPPoolList { - if in == nil { - return nil - } - out := new(CiliumLoadBalancerIPPoolList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumLoadBalancerIPPoolList) 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 *CiliumLoadBalancerIPPoolSpec) DeepCopyInto(out *CiliumLoadBalancerIPPoolSpec) { - *out = *in - if in.ServiceSelector != nil { - in, out := &in.ServiceSelector, &out.ServiceSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.Cidrs != nil { - in, out := &in.Cidrs, &out.Cidrs - *out = make([]CiliumLoadBalancerIPPoolIPBlock, len(*in)) - copy(*out, *in) - } - if in.Blocks != nil { - in, out := &in.Blocks, &out.Blocks - *out = make([]CiliumLoadBalancerIPPoolIPBlock, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumLoadBalancerIPPoolSpec. -func (in *CiliumLoadBalancerIPPoolSpec) DeepCopy() *CiliumLoadBalancerIPPoolSpec { - if in == nil { - return nil - } - out := new(CiliumLoadBalancerIPPoolSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumLoadBalancerIPPoolStatus) DeepCopyInto(out *CiliumLoadBalancerIPPoolStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumLoadBalancerIPPoolStatus. -func (in *CiliumLoadBalancerIPPoolStatus) DeepCopy() *CiliumLoadBalancerIPPoolStatus { - if in == nil { - return nil - } - out := new(CiliumLoadBalancerIPPoolStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumNodeConfig) DeepCopyInto(out *CiliumNodeConfig) { - *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 CiliumNodeConfig. -func (in *CiliumNodeConfig) DeepCopy() *CiliumNodeConfig { - if in == nil { - return nil - } - out := new(CiliumNodeConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumNodeConfig) 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 *CiliumNodeConfigList) DeepCopyInto(out *CiliumNodeConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumNodeConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumNodeConfigList. -func (in *CiliumNodeConfigList) DeepCopy() *CiliumNodeConfigList { - if in == nil { - return nil - } - out := new(CiliumNodeConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumNodeConfigList) 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 *CiliumNodeConfigSpec) DeepCopyInto(out *CiliumNodeConfigSpec) { - *out = *in - if in.Defaults != nil { - in, out := &in.Defaults, &out.Defaults - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumNodeConfigSpec. -func (in *CiliumNodeConfigSpec) DeepCopy() *CiliumNodeConfigSpec { - if in == nil { - return nil - } - out := new(CiliumNodeConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CiliumPodIPPool) DeepCopyInto(out *CiliumPodIPPool) { - *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 CiliumPodIPPool. -func (in *CiliumPodIPPool) DeepCopy() *CiliumPodIPPool { - if in == nil { - return nil - } - out := new(CiliumPodIPPool) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumPodIPPool) 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 *CiliumPodIPPoolList) DeepCopyInto(out *CiliumPodIPPoolList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CiliumPodIPPool, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumPodIPPoolList. -func (in *CiliumPodIPPoolList) DeepCopy() *CiliumPodIPPoolList { - if in == nil { - return nil - } - out := new(CiliumPodIPPoolList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CiliumPodIPPoolList) 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 *CoreCiliumEndpoint) DeepCopyInto(out *CoreCiliumEndpoint) { - *out = *in - if in.Networking != nil { - in, out := &in.Networking, &out.Networking - *out = new(v2.EndpointNetworking) - (*in).DeepCopyInto(*out) - } - out.Encryption = in.Encryption - if in.NamedPorts != nil { - in, out := &in.NamedPorts, &out.NamedPorts - *out = make(models.NamedPorts, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(models.Port) - **out = **in - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoreCiliumEndpoint. -func (in *CoreCiliumEndpoint) DeepCopy() *CoreCiliumEndpoint { - if in == nil { - return nil - } - out := new(CoreCiliumEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressRule) DeepCopyInto(out *EgressRule) { - *out = *in - if in.NamespaceSelector != nil { - in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.PodSelector != nil { - in, out := &in.PodSelector, &out.PodSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressRule. -func (in *EgressRule) DeepCopy() *EgressRule { - if in == nil { - return nil - } - out := new(EgressRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPPoolSpec) DeepCopyInto(out *IPPoolSpec) { - *out = *in - if in.IPv4 != nil { - in, out := &in.IPv4, &out.IPv4 - *out = new(IPv4PoolSpec) - (*in).DeepCopyInto(*out) - } - if in.IPv6 != nil { - in, out := &in.IPv6, &out.IPv6 - *out = new(IPv6PoolSpec) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolSpec. -func (in *IPPoolSpec) DeepCopy() *IPPoolSpec { - if in == nil { - return nil - } - out := new(IPPoolSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPv4PoolSpec) DeepCopyInto(out *IPv4PoolSpec) { - *out = *in - if in.CIDRs != nil { - in, out := &in.CIDRs, &out.CIDRs - *out = make([]PoolCIDR, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv4PoolSpec. -func (in *IPv4PoolSpec) DeepCopy() *IPv4PoolSpec { - if in == nil { - return nil - } - out := new(IPv4PoolSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPv6PoolSpec) DeepCopyInto(out *IPv6PoolSpec) { - *out = *in - if in.CIDRs != nil { - in, out := &in.CIDRs, &out.CIDRs - *out = make([]PoolCIDR, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv6PoolSpec. -func (in *IPv6PoolSpec) DeepCopy() *IPv6PoolSpec { - if in == nil { - return nil - } - out := new(IPv6PoolSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PeerConfigReference) DeepCopyInto(out *PeerConfigReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PeerConfigReference. -func (in *PeerConfigReference) DeepCopy() *PeerConfigReference { - if in == nil { - return nil - } - out := new(PeerConfigReference) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/zz_generated.deepequal.go deleted file mode 100644 index a64995c6b90..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1/zz_generated.deepequal.go +++ /dev/null @@ -1,1534 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package v2alpha1 - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Advertisement) DeepEqual(other *Advertisement) bool { - if other == nil { - return false - } - - if in.AdvertisementType != other.AdvertisementType { - return false - } - if (in.Selector == nil) != (other.Selector == nil) { - return false - } else if in.Selector != nil { - if !in.Selector.DeepEqual(other.Selector) { - return false - } - } - - if (in.Attributes == nil) != (other.Attributes == nil) { - return false - } else if in.Attributes != nil { - if !in.Attributes.DeepEqual(other.Attributes) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *BGPCommunities) DeepEqual(other *BGPCommunities) bool { - if other == nil { - return false - } - - if ((in.Standard != nil) && (other.Standard != nil)) || ((in.Standard == nil) != (other.Standard == nil)) { - in, other := &in.Standard, &other.Standard - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if ((in.Large != nil) && (other.Large != nil)) || ((in.Large == nil) != (other.Large == nil)) { - in, other := &in.Large, &other.Large - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPAdvertisement) DeepEqual(other *CiliumBGPAdvertisement) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPAdvertisementSpec) DeepEqual(other *CiliumBGPAdvertisementSpec) bool { - if other == nil { - return false - } - - if ((in.Advertisements != nil) && (other.Advertisements != nil)) || ((in.Advertisements == nil) != (other.Advertisements == nil)) { - in, other := &in.Advertisements, &other.Advertisements - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPAttributes) DeepEqual(other *CiliumBGPAttributes) bool { - if other == nil { - return false - } - - if (in.Community == nil) != (other.Community == nil) { - return false - } else if in.Community != nil { - if !in.Community.DeepEqual(other.Community) { - return false - } - } - - if (in.LocalPreference == nil) != (other.LocalPreference == nil) { - return false - } else if in.LocalPreference != nil { - if *in.LocalPreference != *other.LocalPreference { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPClusterConfig) DeepEqual(other *CiliumBGPClusterConfig) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPClusterConfigSpec) DeepEqual(other *CiliumBGPClusterConfigSpec) bool { - if other == nil { - return false - } - - if (in.NodeSelector == nil) != (other.NodeSelector == nil) { - return false - } else if in.NodeSelector != nil { - if !in.NodeSelector.DeepEqual(other.NodeSelector) { - return false - } - } - - if ((in.BGPInstances != nil) && (other.BGPInstances != nil)) || ((in.BGPInstances == nil) != (other.BGPInstances == nil)) { - in, other := &in.BGPInstances, &other.BGPInstances - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPFamily) DeepEqual(other *CiliumBGPFamily) bool { - if other == nil { - return false - } - - if in.Afi != other.Afi { - return false - } - if in.Safi != other.Safi { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPFamilyWithAdverts) DeepEqual(other *CiliumBGPFamilyWithAdverts) bool { - if other == nil { - return false - } - - if in.CiliumBGPFamily != other.CiliumBGPFamily { - return false - } - - if (in.Advertisements == nil) != (other.Advertisements == nil) { - return false - } else if in.Advertisements != nil { - if !in.Advertisements.DeepEqual(other.Advertisements) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPInstance) DeepEqual(other *CiliumBGPInstance) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if (in.LocalASN == nil) != (other.LocalASN == nil) { - return false - } else if in.LocalASN != nil { - if *in.LocalASN != *other.LocalASN { - return false - } - } - - if ((in.Peers != nil) && (other.Peers != nil)) || ((in.Peers == nil) != (other.Peers == nil)) { - in, other := &in.Peers, &other.Peers - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNeighbor) DeepEqual(other *CiliumBGPNeighbor) bool { - if other == nil { - return false - } - - if in.PeerAddress != other.PeerAddress { - return false - } - if (in.PeerPort == nil) != (other.PeerPort == nil) { - return false - } else if in.PeerPort != nil { - if *in.PeerPort != *other.PeerPort { - return false - } - } - - if in.PeerASN != other.PeerASN { - return false - } - if (in.AuthSecretRef == nil) != (other.AuthSecretRef == nil) { - return false - } else if in.AuthSecretRef != nil { - if *in.AuthSecretRef != *other.AuthSecretRef { - return false - } - } - - if (in.EBGPMultihopTTL == nil) != (other.EBGPMultihopTTL == nil) { - return false - } else if in.EBGPMultihopTTL != nil { - if *in.EBGPMultihopTTL != *other.EBGPMultihopTTL { - return false - } - } - - if (in.ConnectRetryTimeSeconds == nil) != (other.ConnectRetryTimeSeconds == nil) { - return false - } else if in.ConnectRetryTimeSeconds != nil { - if *in.ConnectRetryTimeSeconds != *other.ConnectRetryTimeSeconds { - return false - } - } - - if (in.HoldTimeSeconds == nil) != (other.HoldTimeSeconds == nil) { - return false - } else if in.HoldTimeSeconds != nil { - if *in.HoldTimeSeconds != *other.HoldTimeSeconds { - return false - } - } - - if (in.KeepAliveTimeSeconds == nil) != (other.KeepAliveTimeSeconds == nil) { - return false - } else if in.KeepAliveTimeSeconds != nil { - if *in.KeepAliveTimeSeconds != *other.KeepAliveTimeSeconds { - return false - } - } - - if (in.GracefulRestart == nil) != (other.GracefulRestart == nil) { - return false - } else if in.GracefulRestart != nil { - if !in.GracefulRestart.DeepEqual(other.GracefulRestart) { - return false - } - } - - if ((in.Families != nil) && (other.Families != nil)) || ((in.Families == nil) != (other.Families == nil)) { - in, other := &in.Families, &other.Families - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.AdvertisedPathAttributes != nil) && (other.AdvertisedPathAttributes != nil)) || ((in.AdvertisedPathAttributes == nil) != (other.AdvertisedPathAttributes == nil)) { - in, other := &in.AdvertisedPathAttributes, &other.AdvertisedPathAttributes - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNeighborGracefulRestart) DeepEqual(other *CiliumBGPNeighborGracefulRestart) bool { - if other == nil { - return false - } - - if in.Enabled != other.Enabled { - return false - } - if (in.RestartTimeSeconds == nil) != (other.RestartTimeSeconds == nil) { - return false - } else if in.RestartTimeSeconds != nil { - if *in.RestartTimeSeconds != *other.RestartTimeSeconds { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNodeConfig) DeepEqual(other *CiliumBGPNodeConfig) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - if !in.Status.DeepEqual(&other.Status) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNodeConfigInstanceOverride) DeepEqual(other *CiliumBGPNodeConfigInstanceOverride) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if (in.RouterID == nil) != (other.RouterID == nil) { - return false - } else if in.RouterID != nil { - if *in.RouterID != *other.RouterID { - return false - } - } - - if (in.LocalPort == nil) != (other.LocalPort == nil) { - return false - } else if in.LocalPort != nil { - if *in.LocalPort != *other.LocalPort { - return false - } - } - - if ((in.Peers != nil) && (other.Peers != nil)) || ((in.Peers == nil) != (other.Peers == nil)) { - in, other := &in.Peers, &other.Peers - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNodeConfigOverride) DeepEqual(other *CiliumBGPNodeConfigOverride) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNodeConfigOverrideSpec) DeepEqual(other *CiliumBGPNodeConfigOverrideSpec) bool { - if other == nil { - return false - } - - if in.NodeRef != other.NodeRef { - return false - } - if ((in.BGPInstances != nil) && (other.BGPInstances != nil)) || ((in.BGPInstances == nil) != (other.BGPInstances == nil)) { - in, other := &in.BGPInstances, &other.BGPInstances - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNodeConfigPeerOverride) DeepEqual(other *CiliumBGPNodeConfigPeerOverride) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if (in.LocalAddress == nil) != (other.LocalAddress == nil) { - return false - } else if in.LocalAddress != nil { - if *in.LocalAddress != *other.LocalAddress { - return false - } - } - - if (in.LocalPort == nil) != (other.LocalPort == nil) { - return false - } else if in.LocalPort != nil { - if *in.LocalPort != *other.LocalPort { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNodeInstance) DeepEqual(other *CiliumBGPNodeInstance) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if (in.LocalASN == nil) != (other.LocalASN == nil) { - return false - } else if in.LocalASN != nil { - if *in.LocalASN != *other.LocalASN { - return false - } - } - - if (in.RouterID == nil) != (other.RouterID == nil) { - return false - } else if in.RouterID != nil { - if *in.RouterID != *other.RouterID { - return false - } - } - - if (in.LocalPort == nil) != (other.LocalPort == nil) { - return false - } else if in.LocalPort != nil { - if *in.LocalPort != *other.LocalPort { - return false - } - } - - if ((in.Peers != nil) && (other.Peers != nil)) || ((in.Peers == nil) != (other.Peers == nil)) { - in, other := &in.Peers, &other.Peers - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNodeInstanceStatus) DeepEqual(other *CiliumBGPNodeInstanceStatus) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if (in.LocalASN == nil) != (other.LocalASN == nil) { - return false - } else if in.LocalASN != nil { - if *in.LocalASN != *other.LocalASN { - return false - } - } - - if ((in.PeerStatuses != nil) && (other.PeerStatuses != nil)) || ((in.PeerStatuses == nil) != (other.PeerStatuses == nil)) { - in, other := &in.PeerStatuses, &other.PeerStatuses - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNodePeer) DeepEqual(other *CiliumBGPNodePeer) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if (in.PeerAddress == nil) != (other.PeerAddress == nil) { - return false - } else if in.PeerAddress != nil { - if *in.PeerAddress != *other.PeerAddress { - return false - } - } - - if (in.PeerASN == nil) != (other.PeerASN == nil) { - return false - } else if in.PeerASN != nil { - if *in.PeerASN != *other.PeerASN { - return false - } - } - - if (in.LocalAddress == nil) != (other.LocalAddress == nil) { - return false - } else if in.LocalAddress != nil { - if *in.LocalAddress != *other.LocalAddress { - return false - } - } - - if (in.PeerConfigRef == nil) != (other.PeerConfigRef == nil) { - return false - } else if in.PeerConfigRef != nil { - if !in.PeerConfigRef.DeepEqual(other.PeerConfigRef) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNodePeerStatus) DeepEqual(other *CiliumBGPNodePeerStatus) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if in.PeerAddress != other.PeerAddress { - return false - } - if (in.PeerASN == nil) != (other.PeerASN == nil) { - return false - } else if in.PeerASN != nil { - if *in.PeerASN != *other.PeerASN { - return false - } - } - - if (in.PeeringState == nil) != (other.PeeringState == nil) { - return false - } else if in.PeeringState != nil { - if *in.PeeringState != *other.PeeringState { - return false - } - } - - if (in.Timers == nil) != (other.Timers == nil) { - return false - } else if in.Timers != nil { - if !in.Timers.DeepEqual(other.Timers) { - return false - } - } - - if (in.Uptime == nil) != (other.Uptime == nil) { - return false - } else if in.Uptime != nil { - if *in.Uptime != *other.Uptime { - return false - } - } - - if (in.RoutesReceived == nil) != (other.RoutesReceived == nil) { - return false - } else if in.RoutesReceived != nil { - if *in.RoutesReceived != *other.RoutesReceived { - return false - } - } - - if (in.RoutesAdvertised == nil) != (other.RoutesAdvertised == nil) { - return false - } else if in.RoutesAdvertised != nil { - if *in.RoutesAdvertised != *other.RoutesAdvertised { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNodeSpec) DeepEqual(other *CiliumBGPNodeSpec) bool { - if other == nil { - return false - } - - if ((in.BGPInstances != nil) && (other.BGPInstances != nil)) || ((in.BGPInstances == nil) != (other.BGPInstances == nil)) { - in, other := &in.BGPInstances, &other.BGPInstances - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPNodeStatus) DeepEqual(other *CiliumBGPNodeStatus) bool { - if other == nil { - return false - } - - if ((in.BGPInstances != nil) && (other.BGPInstances != nil)) || ((in.BGPInstances == nil) != (other.BGPInstances == nil)) { - in, other := &in.BGPInstances, &other.BGPInstances - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPPathAttributes) DeepEqual(other *CiliumBGPPathAttributes) bool { - if other == nil { - return false - } - - if in.SelectorType != other.SelectorType { - return false - } - if (in.Selector == nil) != (other.Selector == nil) { - return false - } else if in.Selector != nil { - if !in.Selector.DeepEqual(other.Selector) { - return false - } - } - - if (in.Communities == nil) != (other.Communities == nil) { - return false - } else if in.Communities != nil { - if !in.Communities.DeepEqual(other.Communities) { - return false - } - } - - if (in.LocalPreference == nil) != (other.LocalPreference == nil) { - return false - } else if in.LocalPreference != nil { - if *in.LocalPreference != *other.LocalPreference { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPPeer) DeepEqual(other *CiliumBGPPeer) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if (in.PeerAddress == nil) != (other.PeerAddress == nil) { - return false - } else if in.PeerAddress != nil { - if *in.PeerAddress != *other.PeerAddress { - return false - } - } - - if (in.PeerASN == nil) != (other.PeerASN == nil) { - return false - } else if in.PeerASN != nil { - if *in.PeerASN != *other.PeerASN { - return false - } - } - - if (in.PeerConfigRef == nil) != (other.PeerConfigRef == nil) { - return false - } else if in.PeerConfigRef != nil { - if !in.PeerConfigRef.DeepEqual(other.PeerConfigRef) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPPeerConfig) DeepEqual(other *CiliumBGPPeerConfig) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPPeerConfigSpec) DeepEqual(other *CiliumBGPPeerConfigSpec) bool { - if other == nil { - return false - } - - if (in.Transport == nil) != (other.Transport == nil) { - return false - } else if in.Transport != nil { - if !in.Transport.DeepEqual(other.Transport) { - return false - } - } - - if (in.Timers == nil) != (other.Timers == nil) { - return false - } else if in.Timers != nil { - if !in.Timers.DeepEqual(other.Timers) { - return false - } - } - - if (in.AuthSecretRef == nil) != (other.AuthSecretRef == nil) { - return false - } else if in.AuthSecretRef != nil { - if *in.AuthSecretRef != *other.AuthSecretRef { - return false - } - } - - if (in.GracefulRestart == nil) != (other.GracefulRestart == nil) { - return false - } else if in.GracefulRestart != nil { - if !in.GracefulRestart.DeepEqual(other.GracefulRestart) { - return false - } - } - - if (in.EBGPMultihop == nil) != (other.EBGPMultihop == nil) { - return false - } else if in.EBGPMultihop != nil { - if *in.EBGPMultihop != *other.EBGPMultihop { - return false - } - } - - if ((in.Families != nil) && (other.Families != nil)) || ((in.Families == nil) != (other.Families == nil)) { - in, other := &in.Families, &other.Families - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPPeeringPolicy) DeepEqual(other *CiliumBGPPeeringPolicy) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPPeeringPolicySpec) DeepEqual(other *CiliumBGPPeeringPolicySpec) bool { - if other == nil { - return false - } - - if (in.NodeSelector == nil) != (other.NodeSelector == nil) { - return false - } else if in.NodeSelector != nil { - if !in.NodeSelector.DeepEqual(other.NodeSelector) { - return false - } - } - - if ((in.VirtualRouters != nil) && (other.VirtualRouters != nil)) || ((in.VirtualRouters == nil) != (other.VirtualRouters == nil)) { - in, other := &in.VirtualRouters, &other.VirtualRouters - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPTimers) DeepEqual(other *CiliumBGPTimers) bool { - if other == nil { - return false - } - - if (in.ConnectRetryTimeSeconds == nil) != (other.ConnectRetryTimeSeconds == nil) { - return false - } else if in.ConnectRetryTimeSeconds != nil { - if *in.ConnectRetryTimeSeconds != *other.ConnectRetryTimeSeconds { - return false - } - } - - if (in.HoldTimeSeconds == nil) != (other.HoldTimeSeconds == nil) { - return false - } else if in.HoldTimeSeconds != nil { - if *in.HoldTimeSeconds != *other.HoldTimeSeconds { - return false - } - } - - if (in.KeepAliveTimeSeconds == nil) != (other.KeepAliveTimeSeconds == nil) { - return false - } else if in.KeepAliveTimeSeconds != nil { - if *in.KeepAliveTimeSeconds != *other.KeepAliveTimeSeconds { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPTimersState) DeepEqual(other *CiliumBGPTimersState) bool { - if other == nil { - return false - } - - if (in.AppliedHoldTimeSeconds == nil) != (other.AppliedHoldTimeSeconds == nil) { - return false - } else if in.AppliedHoldTimeSeconds != nil { - if *in.AppliedHoldTimeSeconds != *other.AppliedHoldTimeSeconds { - return false - } - } - - if (in.AppliedKeepaliveSeconds == nil) != (other.AppliedKeepaliveSeconds == nil) { - return false - } else if in.AppliedKeepaliveSeconds != nil { - if *in.AppliedKeepaliveSeconds != *other.AppliedKeepaliveSeconds { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPTransport) DeepEqual(other *CiliumBGPTransport) bool { - if other == nil { - return false - } - - if (in.LocalPort == nil) != (other.LocalPort == nil) { - return false - } else if in.LocalPort != nil { - if *in.LocalPort != *other.LocalPort { - return false - } - } - - if (in.PeerPort == nil) != (other.PeerPort == nil) { - return false - } else if in.PeerPort != nil { - if *in.PeerPort != *other.PeerPort { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumBGPVirtualRouter) DeepEqual(other *CiliumBGPVirtualRouter) bool { - if other == nil { - return false - } - - if in.LocalASN != other.LocalASN { - return false - } - if (in.ExportPodCIDR == nil) != (other.ExportPodCIDR == nil) { - return false - } else if in.ExportPodCIDR != nil { - if *in.ExportPodCIDR != *other.ExportPodCIDR { - return false - } - } - - if (in.PodIPPoolSelector == nil) != (other.PodIPPoolSelector == nil) { - return false - } else if in.PodIPPoolSelector != nil { - if !in.PodIPPoolSelector.DeepEqual(other.PodIPPoolSelector) { - return false - } - } - - if (in.ServiceSelector == nil) != (other.ServiceSelector == nil) { - return false - } else if in.ServiceSelector != nil { - if !in.ServiceSelector.DeepEqual(other.ServiceSelector) { - return false - } - } - - if ((in.Neighbors != nil) && (other.Neighbors != nil)) || ((in.Neighbors == nil) != (other.Neighbors == nil)) { - in, other := &in.Neighbors, &other.Neighbors - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumCIDRGroupSpec) DeepEqual(other *CiliumCIDRGroupSpec) bool { - if other == nil { - return false - } - - if ((in.ExternalCIDRs != nil) && (other.ExternalCIDRs != nil)) || ((in.ExternalCIDRs == nil) != (other.ExternalCIDRs == nil)) { - in, other := &in.ExternalCIDRs, &other.ExternalCIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumEndpointSlice) DeepEqual(other *CiliumEndpointSlice) bool { - if other == nil { - return false - } - - if in.Namespace != other.Namespace { - return false - } - if ((in.Endpoints != nil) && (other.Endpoints != nil)) || ((in.Endpoints == nil) != (other.Endpoints == nil)) { - in, other := &in.Endpoints, &other.Endpoints - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumL2AnnouncementPolicy) DeepEqual(other *CiliumL2AnnouncementPolicy) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumL2AnnouncementPolicySpec) DeepEqual(other *CiliumL2AnnouncementPolicySpec) bool { - if other == nil { - return false - } - - if (in.NodeSelector == nil) != (other.NodeSelector == nil) { - return false - } else if in.NodeSelector != nil { - if !in.NodeSelector.DeepEqual(other.NodeSelector) { - return false - } - } - - if (in.ServiceSelector == nil) != (other.ServiceSelector == nil) { - return false - } else if in.ServiceSelector != nil { - if !in.ServiceSelector.DeepEqual(other.ServiceSelector) { - return false - } - } - - if in.LoadBalancerIPs != other.LoadBalancerIPs { - return false - } - if in.ExternalIPs != other.ExternalIPs { - return false - } - if ((in.Interfaces != nil) && (other.Interfaces != nil)) || ((in.Interfaces == nil) != (other.Interfaces == nil)) { - in, other := &in.Interfaces, &other.Interfaces - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumLoadBalancerIPPool) DeepEqual(other *CiliumLoadBalancerIPPool) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumLoadBalancerIPPoolIPBlock) DeepEqual(other *CiliumLoadBalancerIPPoolIPBlock) bool { - if other == nil { - return false - } - - if in.Cidr != other.Cidr { - return false - } - if in.Start != other.Start { - return false - } - if in.Stop != other.Stop { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumLoadBalancerIPPoolSpec) DeepEqual(other *CiliumLoadBalancerIPPoolSpec) bool { - if other == nil { - return false - } - - if (in.ServiceSelector == nil) != (other.ServiceSelector == nil) { - return false - } else if in.ServiceSelector != nil { - if !in.ServiceSelector.DeepEqual(other.ServiceSelector) { - return false - } - } - - if in.AllowFirstLastIPs != other.AllowFirstLastIPs { - return false - } - if ((in.Cidrs != nil) && (other.Cidrs != nil)) || ((in.Cidrs == nil) != (other.Cidrs == nil)) { - in, other := &in.Cidrs, &other.Cidrs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Blocks != nil) && (other.Blocks != nil)) || ((in.Blocks == nil) != (other.Blocks == nil)) { - in, other := &in.Blocks, &other.Blocks - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if in.Disabled != other.Disabled { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CiliumPodIPPool) DeepEqual(other *CiliumPodIPPool) bool { - if other == nil { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CoreCiliumEndpoint) DeepEqual(other *CoreCiliumEndpoint) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if in.IdentityID != other.IdentityID { - return false - } - if (in.Networking == nil) != (other.Networking == nil) { - return false - } else if in.Networking != nil { - if !in.Networking.DeepEqual(other.Networking) { - return false - } - } - - if in.Encryption != other.Encryption { - return false - } - - if ((in.NamedPorts != nil) && (other.NamedPorts != nil)) || ((in.NamedPorts == nil) != (other.NamedPorts == nil)) { - in, other := &in.NamedPorts, &other.NamedPorts - if other == nil || !in.DeepEqual(other) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EgressRule) DeepEqual(other *EgressRule) bool { - if other == nil { - return false - } - - if (in.NamespaceSelector == nil) != (other.NamespaceSelector == nil) { - return false - } else if in.NamespaceSelector != nil { - if !in.NamespaceSelector.DeepEqual(other.NamespaceSelector) { - return false - } - } - - if (in.PodSelector == nil) != (other.PodSelector == nil) { - return false - } else if in.PodSelector != nil { - if !in.PodSelector.DeepEqual(other.PodSelector) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IPPoolSpec) DeepEqual(other *IPPoolSpec) bool { - if other == nil { - return false - } - - if (in.IPv4 == nil) != (other.IPv4 == nil) { - return false - } else if in.IPv4 != nil { - if !in.IPv4.DeepEqual(other.IPv4) { - return false - } - } - - if (in.IPv6 == nil) != (other.IPv6 == nil) { - return false - } else if in.IPv6 != nil { - if !in.IPv6.DeepEqual(other.IPv6) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IPv4PoolSpec) DeepEqual(other *IPv4PoolSpec) bool { - if other == nil { - return false - } - - if ((in.CIDRs != nil) && (other.CIDRs != nil)) || ((in.CIDRs == nil) != (other.CIDRs == nil)) { - in, other := &in.CIDRs, &other.CIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if in.MaskSize != other.MaskSize { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IPv6PoolSpec) DeepEqual(other *IPv6PoolSpec) bool { - if other == nil { - return false - } - - if ((in.CIDRs != nil) && (other.CIDRs != nil)) || ((in.CIDRs == nil) != (other.CIDRs == nil)) { - in, other := &in.CIDRs, &other.CIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if in.MaskSize != other.MaskSize { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PeerConfigReference) DeepEqual(other *PeerConfigReference) bool { - if other == nil { - return false - } - - if in.Group != other.Group { - return false - } - if in.Kind != other.Kind { - return false - } - if in.Name != other.Name { - return false - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/cell.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/cell.go deleted file mode 100644 index fe3d7970aec..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/cell.go +++ /dev/null @@ -1,510 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "context" - "errors" - "fmt" - "net" - "net/http" - "os" - "path/filepath" - "strings" - "time" - - "github.com/sirupsen/logrus" - apiext_clientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - apiext_fake "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake" - k8sErrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - utilnet "k8s.io/apimachinery/pkg/util/net" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/discovery" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/kubernetes/fake" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/util/connrotation" - - "github.com/cilium/cilium/pkg/controller" - "github.com/cilium/cilium/pkg/hive/cell" - cilium_clientset "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" - cilium_fake "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake" - k8smetrics "github.com/cilium/cilium/pkg/k8s/metrics" - slim_apiextclientsetscheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme" - slim_apiext_clientset "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-clientset" - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - slim_metav1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1" - slim_clientset "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned" - slim_fake "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake" - k8sversion "github.com/cilium/cilium/pkg/k8s/version" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/version" -) - -// client.Cell provides Clientset, a composition of clientsets to Kubernetes resources -// used by Cilium. -var Cell = cell.Module( - "k8s-client", - "Kubernetes Client", - - cell.Config(defaultConfig), - cell.Provide(newClientset), -) - -var k8sHeartbeatControllerGroup = controller.NewGroup("k8s-heartbeat") - -// Type aliases for the clientsets to avoid name collision on 'Clientset' when composing them. -type ( - KubernetesClientset = kubernetes.Clientset - SlimClientset = slim_clientset.Clientset - APIExtClientset = slim_apiext_clientset.Clientset - CiliumClientset = cilium_clientset.Clientset -) - -// Clientset is a composition of the different client sets used by Cilium. -type Clientset interface { - kubernetes.Interface - apiext_clientset.Interface - cilium_clientset.Interface - Getters - - // Slim returns the slim client, which contains some of the same APIs as the - // normal kubernetes client, but with slimmed down messages to reduce memory - // usage. Prefer the slim version when caching messages. - Slim() slim_clientset.Interface - - // IsEnabled returns true if Kubernetes support is enabled and the - // clientset can be used. - IsEnabled() bool - - // Disable disables the client. Panics if called after the clientset has been - // started. - Disable() - - // Config returns the configuration used to create this client. - Config() Config - - // RestConfig returns the deep copy of rest configuration. - RestConfig() *rest.Config -} - -// compositeClientset implements the Clientset using real clients. -type compositeClientset struct { - started bool - disabled bool - - *KubernetesClientset - *APIExtClientset - *CiliumClientset - clientsetGetters - - controller *controller.Manager - slim *SlimClientset - config Config - log logrus.FieldLogger - closeAllConns func() - restConfig *rest.Config -} - -func newClientset(lc cell.Lifecycle, log logrus.FieldLogger, cfg Config) (Clientset, error) { - if !cfg.isEnabled() { - return &compositeClientset{disabled: true}, nil - } - - if cfg.K8sAPIServer != "" && - !strings.HasPrefix(cfg.K8sAPIServer, "http") { - cfg.K8sAPIServer = "http://" + cfg.K8sAPIServer // default to HTTP - } - - client := compositeClientset{ - log: log, - controller: controller.NewManager(), - config: cfg, - } - - restConfig, err := createConfig(cfg.K8sAPIServer, cfg.K8sKubeConfigPath, cfg.K8sClientQPS, cfg.K8sClientBurst) - if err != nil { - return nil, fmt.Errorf("unable to create k8s client rest configuration: %w", err) - } - client.restConfig = restConfig - defaultCloseAllConns := setDialer(cfg, restConfig) - - httpClient, err := rest.HTTPClientFor(restConfig) - if err != nil { - return nil, fmt.Errorf("unable to create k8s REST client: %w", err) - } - - // We are implementing the same logic as Kubelet, see - // https://github.com/kubernetes/kubernetes/blob/v1.24.0-beta.0/cmd/kubelet/app/server.go#L852. - if s := os.Getenv("DISABLE_HTTP2"); len(s) > 0 { - client.closeAllConns = defaultCloseAllConns - } else { - client.closeAllConns = func() { - utilnet.CloseIdleConnectionsFor(restConfig.Transport) - } - } - - // Slim and K8s clients use protobuf marshalling. - restConfig.ContentConfig.ContentType = `application/vnd.kubernetes.protobuf` - - client.slim, err = slim_clientset.NewForConfigAndClient(restConfig, httpClient) - if err != nil { - return nil, fmt.Errorf("unable to create slim k8s client: %w", err) - } - - client.APIExtClientset, err = slim_apiext_clientset.NewForConfigAndClient(restConfig, httpClient) - if err != nil { - return nil, fmt.Errorf("unable to create apiext k8s client: %w", err) - } - - client.KubernetesClientset, err = kubernetes.NewForConfigAndClient(restConfig, httpClient) - if err != nil { - return nil, fmt.Errorf("unable to create k8s client: %w", err) - } - - client.clientsetGetters = clientsetGetters{&client} - - // The cilium client uses JSON marshalling. - restConfig.ContentConfig.ContentType = `application/json` - client.CiliumClientset, err = cilium_clientset.NewForConfigAndClient(restConfig, httpClient) - if err != nil { - return nil, fmt.Errorf("unable to create cilium k8s client: %w", err) - } - - lc.Append(cell.Hook{ - OnStart: client.onStart, - OnStop: client.onStop, - }) - - return &client, nil -} - -func (c *compositeClientset) Slim() slim_clientset.Interface { - return c.slim -} - -func (c *compositeClientset) Discovery() discovery.DiscoveryInterface { - return c.KubernetesClientset.Discovery() -} - -func (c *compositeClientset) IsEnabled() bool { - return c != nil && c.config.isEnabled() && !c.disabled -} - -func (c *compositeClientset) Disable() { - if c.started { - panic("Clientset.Disable() called after it had been started") - } - c.disabled = true -} - -func (c *compositeClientset) Config() Config { - return c.config -} - -func (c *compositeClientset) RestConfig() *rest.Config { - return rest.CopyConfig(c.restConfig) -} - -func (c *compositeClientset) onStart(startCtx cell.HookContext) error { - if !c.IsEnabled() { - return nil - } - - if err := c.waitForConn(startCtx); err != nil { - return err - } - c.startHeartbeat() - - // Update the global K8s clients, K8s version and the capabilities. - if err := k8sversion.Update(c, c.config.EnableK8sAPIDiscovery); err != nil { - return err - } - - if !k8sversion.Capabilities().MinimalVersionMet { - return fmt.Errorf("k8s version (%v) is not meeting the minimal requirement (%v)", - k8sversion.Version(), k8sversion.MinimalVersionConstraint) - } - - c.started = true - - return nil -} - -func (c *compositeClientset) onStop(stopCtx cell.HookContext) error { - if c.IsEnabled() { - c.controller.RemoveAllAndWait() - c.closeAllConns() - } - c.started = false - return nil -} - -func (c *compositeClientset) startHeartbeat() { - restClient := c.KubernetesClientset.RESTClient() - - timeout := c.config.K8sHeartbeatTimeout - if timeout == 0 { - return - } - - heartBeat := func(ctx context.Context) error { - // Kubernetes does a get node of the node that kubelet is running [0]. This seems excessive in - // our case because the amount of data transferred is bigger than doing a Get of /healthz. - // For this reason we have picked to perform a get on `/healthz` instead a get of a node. - // - // [0] https://github.com/kubernetes/kubernetes/blob/v1.17.3/pkg/kubelet/kubelet_node_status.go#L423 - res := restClient.Get().Resource("healthz").Do(ctx) - return res.Error() - } - - c.controller.UpdateController("k8s-heartbeat", - controller.ControllerParams{ - Group: k8sHeartbeatControllerGroup, - DoFunc: func(context.Context) error { - runHeartbeat( - c.log, - heartBeat, - timeout, - c.closeAllConns, - ) - return nil - }, - RunInterval: timeout, - }) -} - -// createConfig creates a rest.Config for connecting to k8s api-server. -// -// The precedence of the configuration selection is the following: -// 1. kubeCfgPath -// 2. apiServerURL (https if specified) -// 3. rest.InClusterConfig(). -func createConfig(apiServerURL, kubeCfgPath string, qps float32, burst int) (*rest.Config, error) { - var ( - config *rest.Config - err error - ) - cmdName := "cilium" - if len(os.Args[0]) != 0 { - cmdName = filepath.Base(os.Args[0]) - } - userAgent := fmt.Sprintf("%s/%s", cmdName, version.Version) - - switch { - // If the apiServerURL and the kubeCfgPath are empty then we can try getting - // the rest.Config from the InClusterConfig - case apiServerURL == "" && kubeCfgPath == "": - if config, err = rest.InClusterConfig(); err != nil { - return nil, err - } - case kubeCfgPath != "": - if config, err = clientcmd.BuildConfigFromFlags("", kubeCfgPath); err != nil { - return nil, err - } - case strings.HasPrefix(apiServerURL, "https://"): - if config, err = rest.InClusterConfig(); err != nil { - return nil, err - } - config.Host = apiServerURL - default: - config = &rest.Config{Host: apiServerURL, UserAgent: userAgent} - } - - setConfig(config, userAgent, qps, burst) - return config, nil -} - -func setConfig(config *rest.Config, userAgent string, qps float32, burst int) { - if userAgent != "" { - config.UserAgent = userAgent - } - if qps != 0.0 { - config.QPS = qps - } - if burst != 0 { - config.Burst = burst - } -} - -func (c *compositeClientset) waitForConn(ctx context.Context) error { - stop := make(chan struct{}) - timeout := time.NewTimer(time.Minute) - defer timeout.Stop() - var err error - wait.Until(func() { - c.log.WithField("host", c.restConfig.Host).Info("Establishing connection to apiserver") - err = isConnReady(c) - if err == nil { - close(stop) - return - } - - select { - case <-ctx.Done(): - case <-timeout.C: - default: - return - } - - c.log.WithError(err).WithField(logfields.IPAddr, c.restConfig.Host).Error("Unable to contact k8s api-server") - close(stop) - }, 5*time.Second, stop) - if err == nil { - c.log.Info("Connected to apiserver") - } - return err -} - -func setDialer(cfg Config, restConfig *rest.Config) func() { - if cfg.K8sHeartbeatTimeout == 0 { - return func() {} - } - ctx := (&net.Dialer{ - Timeout: cfg.K8sHeartbeatTimeout, - KeepAlive: cfg.K8sHeartbeatTimeout, - }).DialContext - dialer := connrotation.NewDialer(ctx) - restConfig.Dial = dialer.DialContext - return dialer.CloseAll -} - -func runHeartbeat(log logrus.FieldLogger, heartBeat func(context.Context) error, timeout time.Duration, closeAllConns ...func()) { - expireDate := time.Now().Add(-timeout) - // Don't even perform a health check if we have received a successful - // k8s event in the last 'timeout' duration - if k8smetrics.LastSuccessInteraction.Time().After(expireDate) { - return - } - - done := make(chan error) - ctx, cancel := context.WithTimeout(context.Background(), timeout) - defer cancel() - go func() { - // If we have reached up to this point to perform a heartbeat to - // kube-apiserver then we should close the connections if we receive - // any error at all except if we receive a http.StatusTooManyRequests - // which means the server is overloaded and only for this reason we - // will not close all connections. - err := heartBeat(ctx) - if err != nil { - statusError := &k8sErrors.StatusError{} - if !errors.As(err, &statusError) || - statusError.ErrStatus.Code != http.StatusTooManyRequests { - done <- err - } - } - close(done) - }() - - select { - case err := <-done: - if err != nil { - log.WithError(err).Warn("Network status error received, restarting client connections") - for _, fn := range closeAllConns { - fn() - } - } - case <-ctx.Done(): - log.Warn("Heartbeat timed out, restarting client connections") - for _, fn := range closeAllConns { - fn() - } - } -} - -// isConnReady returns the err for the kube-system namespace get -func isConnReady(c kubernetes.Interface) error { - _, err := c.CoreV1().Namespaces().Get(context.TODO(), "kube-system", metav1.GetOptions{}) - return err -} - -var FakeClientCell = cell.Provide(NewFakeClientset) - -type ( - KubernetesFakeClientset = fake.Clientset - SlimFakeClientset = slim_fake.Clientset - CiliumFakeClientset = cilium_fake.Clientset - APIExtFakeClientset = apiext_fake.Clientset -) - -type FakeClientset struct { - disabled bool - - *KubernetesFakeClientset - *CiliumFakeClientset - *APIExtFakeClientset - clientsetGetters - - SlimFakeClientset *SlimFakeClientset - - enabled bool -} - -var _ Clientset = &FakeClientset{} - -func (c *FakeClientset) Slim() slim_clientset.Interface { - return c.SlimFakeClientset -} - -func (c *FakeClientset) Discovery() discovery.DiscoveryInterface { - return c.KubernetesFakeClientset.Discovery() -} - -func (c *FakeClientset) IsEnabled() bool { - return !c.disabled -} - -func (c *FakeClientset) Disable() { - c.disabled = true -} - -func (c *FakeClientset) Config() Config { - return Config{} -} - -func (c *FakeClientset) RestConfig() *rest.Config { - return &rest.Config{} -} - -func NewFakeClientset() (*FakeClientset, Clientset) { - client := FakeClientset{ - SlimFakeClientset: slim_fake.NewSimpleClientset(), - CiliumFakeClientset: cilium_fake.NewSimpleClientset(), - APIExtFakeClientset: apiext_fake.NewSimpleClientset(), - KubernetesFakeClientset: fake.NewSimpleClientset(), - enabled: true, - } - client.clientsetGetters = clientsetGetters{&client} - return &client, &client -} - -// NewStandaloneClientset creates a clientset outside hive. To be removed once -// remaining uses of k8s.Init()/k8s.Client()/etc. have been converted. -func NewStandaloneClientset(cfg Config) (Clientset, error) { - log := logging.DefaultLogger - lc := &cell.DefaultLifecycle{} - - clientset, err := newClientset(lc, log, cfg) - if err != nil { - return nil, err - } - - if err := lc.Start(context.Background()); err != nil { - return nil, err - } - - return clientset, err -} - -func init() { - // Register the metav1.Table and metav1.PartialObjectMetadata for the - // apiextclientset. - utilruntime.Must(slim_metav1.AddMetaToScheme(slim_apiextclientsetscheme.Scheme)) - utilruntime.Must(slim_metav1beta1.AddMetaToScheme(slim_apiextclientsetscheme.Scheme)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/clientset.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/clientset.go deleted file mode 100644 index 720686010ac..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/clientset.go +++ /dev/null @@ -1,120 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - "net/http" - - ciliumv2 "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2" - ciliumv2alpha1 "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - CiliumV2() ciliumv2.CiliumV2Interface - CiliumV2alpha1() ciliumv2alpha1.CiliumV2alpha1Interface -} - -// Clientset contains the clients for groups. -type Clientset struct { - *discovery.DiscoveryClient - ciliumV2 *ciliumv2.CiliumV2Client - ciliumV2alpha1 *ciliumv2alpha1.CiliumV2alpha1Client -} - -// CiliumV2 retrieves the CiliumV2Client -func (c *Clientset) CiliumV2() ciliumv2.CiliumV2Interface { - return c.ciliumV2 -} - -// CiliumV2alpha1 retrieves the CiliumV2alpha1Client -func (c *Clientset) CiliumV2alpha1() ciliumv2alpha1.CiliumV2alpha1Interface { - return c.ciliumV2alpha1 -} - -// 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. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - - // share the transport between all clients - httpClient, err := rest.HTTPClientFor(&configShallowCopy) - if err != nil { - return nil, err - } - - return NewForConfigAndClient(&configShallowCopy, httpClient) -} - -// NewForConfigAndClient creates a new Clientset for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - - var cs Clientset - var err error - cs.ciliumV2, err = ciliumv2.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - cs.ciliumV2alpha1, err = ciliumv2alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - 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 { - cs, err := NewForConfig(c) - if err != nil { - panic(err) - } - return cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.ciliumV2 = ciliumv2.New(c) - cs.ciliumV2alpha1 = ciliumv2alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/clientset_generated.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index f39a5d25ec1..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,79 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" - ciliumv2 "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2" - fakeciliumv2 "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake" - ciliumv2alpha1 "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1" - fakeciliumv2alpha1 "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var ( - _ clientset.Interface = &Clientset{} - _ testing.FakeClient = &Clientset{} -) - -// CiliumV2 retrieves the CiliumV2Client -func (c *Clientset) CiliumV2() ciliumv2.CiliumV2Interface { - return &fakeciliumv2.FakeCiliumV2{Fake: &c.Fake} -} - -// CiliumV2alpha1 retrieves the CiliumV2alpha1Client -func (c *Clientset) CiliumV2alpha1() ciliumv2alpha1.CiliumV2alpha1Interface { - return &fakeciliumv2alpha1.FakeCiliumV2alpha1{Fake: &c.Fake} -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/doc.go deleted file mode 100644 index 1da8cc9d5bb..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/register.go deleted file mode 100644 index 22b7a01cc58..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake/register.go +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - ciliumv2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - ciliumv2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - 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" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - ciliumv2.AddToScheme, - ciliumv2alpha1.AddToScheme, -} - -// 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. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme/doc.go deleted file mode 100644 index ba34515351f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme/register.go deleted file mode 100644 index 59689a04083..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - ciliumv2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - ciliumv2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - 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" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - ciliumv2.AddToScheme, - ciliumv2alpha1.AddToScheme, -} - -// 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. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/cilium.io_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/cilium.io_client.go deleted file mode 100644 index 39002ac0d75..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/cilium.io_client.go +++ /dev/null @@ -1,139 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -import ( - "net/http" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type CiliumV2Interface interface { - RESTClient() rest.Interface - CiliumClusterwideEnvoyConfigsGetter - CiliumClusterwideNetworkPoliciesGetter - CiliumEgressGatewayPoliciesGetter - CiliumEndpointsGetter - CiliumEnvoyConfigsGetter - CiliumExternalWorkloadsGetter - CiliumIdentitiesGetter - CiliumLocalRedirectPoliciesGetter - CiliumNetworkPoliciesGetter - CiliumNodesGetter -} - -// CiliumV2Client is used to interact with features provided by the cilium.io group. -type CiliumV2Client struct { - restClient rest.Interface -} - -func (c *CiliumV2Client) CiliumClusterwideEnvoyConfigs() CiliumClusterwideEnvoyConfigInterface { - return newCiliumClusterwideEnvoyConfigs(c) -} - -func (c *CiliumV2Client) CiliumClusterwideNetworkPolicies() CiliumClusterwideNetworkPolicyInterface { - return newCiliumClusterwideNetworkPolicies(c) -} - -func (c *CiliumV2Client) CiliumEgressGatewayPolicies() CiliumEgressGatewayPolicyInterface { - return newCiliumEgressGatewayPolicies(c) -} - -func (c *CiliumV2Client) CiliumEndpoints(namespace string) CiliumEndpointInterface { - return newCiliumEndpoints(c, namespace) -} - -func (c *CiliumV2Client) CiliumEnvoyConfigs(namespace string) CiliumEnvoyConfigInterface { - return newCiliumEnvoyConfigs(c, namespace) -} - -func (c *CiliumV2Client) CiliumExternalWorkloads() CiliumExternalWorkloadInterface { - return newCiliumExternalWorkloads(c) -} - -func (c *CiliumV2Client) CiliumIdentities() CiliumIdentityInterface { - return newCiliumIdentities(c) -} - -func (c *CiliumV2Client) CiliumLocalRedirectPolicies(namespace string) CiliumLocalRedirectPolicyInterface { - return newCiliumLocalRedirectPolicies(c, namespace) -} - -func (c *CiliumV2Client) CiliumNetworkPolicies(namespace string) CiliumNetworkPolicyInterface { - return newCiliumNetworkPolicies(c, namespace) -} - -func (c *CiliumV2Client) CiliumNodes() CiliumNodeInterface { - return newCiliumNodes(c) -} - -// NewForConfig creates a new CiliumV2Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*CiliumV2Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new CiliumV2Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CiliumV2Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &CiliumV2Client{client}, nil -} - -// NewForConfigOrDie creates a new CiliumV2Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CiliumV2Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CiliumV2Client for the given RESTClient. -func New(c rest.Interface) *CiliumV2Client { - return &CiliumV2Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v2.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - 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 *CiliumV2Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwideenvoyconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwideenvoyconfig.go deleted file mode 100644 index cf8eecec3b9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwideenvoyconfig.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -import ( - "context" - "time" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumClusterwideEnvoyConfigsGetter has a method to return a CiliumClusterwideEnvoyConfigInterface. -// A group's client should implement this interface. -type CiliumClusterwideEnvoyConfigsGetter interface { - CiliumClusterwideEnvoyConfigs() CiliumClusterwideEnvoyConfigInterface -} - -// CiliumClusterwideEnvoyConfigInterface has methods to work with CiliumClusterwideEnvoyConfig resources. -type CiliumClusterwideEnvoyConfigInterface interface { - Create(ctx context.Context, ciliumClusterwideEnvoyConfig *v2.CiliumClusterwideEnvoyConfig, opts v1.CreateOptions) (*v2.CiliumClusterwideEnvoyConfig, error) - Update(ctx context.Context, ciliumClusterwideEnvoyConfig *v2.CiliumClusterwideEnvoyConfig, opts v1.UpdateOptions) (*v2.CiliumClusterwideEnvoyConfig, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumClusterwideEnvoyConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumClusterwideEnvoyConfigList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumClusterwideEnvoyConfig, err error) - CiliumClusterwideEnvoyConfigExpansion -} - -// ciliumClusterwideEnvoyConfigs implements CiliumClusterwideEnvoyConfigInterface -type ciliumClusterwideEnvoyConfigs struct { - client rest.Interface -} - -// newCiliumClusterwideEnvoyConfigs returns a CiliumClusterwideEnvoyConfigs -func newCiliumClusterwideEnvoyConfigs(c *CiliumV2Client) *ciliumClusterwideEnvoyConfigs { - return &ciliumClusterwideEnvoyConfigs{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumClusterwideEnvoyConfig, and returns the corresponding ciliumClusterwideEnvoyConfig object, and an error if there is any. -func (c *ciliumClusterwideEnvoyConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumClusterwideEnvoyConfig, err error) { - result = &v2.CiliumClusterwideEnvoyConfig{} - err = c.client.Get(). - Resource("ciliumclusterwideenvoyconfigs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumClusterwideEnvoyConfigs that match those selectors. -func (c *ciliumClusterwideEnvoyConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumClusterwideEnvoyConfigList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2.CiliumClusterwideEnvoyConfigList{} - err = c.client.Get(). - Resource("ciliumclusterwideenvoyconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumClusterwideEnvoyConfigs. -func (c *ciliumClusterwideEnvoyConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumclusterwideenvoyconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumClusterwideEnvoyConfig and creates it. Returns the server's representation of the ciliumClusterwideEnvoyConfig, and an error, if there is any. -func (c *ciliumClusterwideEnvoyConfigs) Create(ctx context.Context, ciliumClusterwideEnvoyConfig *v2.CiliumClusterwideEnvoyConfig, opts v1.CreateOptions) (result *v2.CiliumClusterwideEnvoyConfig, err error) { - result = &v2.CiliumClusterwideEnvoyConfig{} - err = c.client.Post(). - Resource("ciliumclusterwideenvoyconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumClusterwideEnvoyConfig). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumClusterwideEnvoyConfig and updates it. Returns the server's representation of the ciliumClusterwideEnvoyConfig, and an error, if there is any. -func (c *ciliumClusterwideEnvoyConfigs) Update(ctx context.Context, ciliumClusterwideEnvoyConfig *v2.CiliumClusterwideEnvoyConfig, opts v1.UpdateOptions) (result *v2.CiliumClusterwideEnvoyConfig, err error) { - result = &v2.CiliumClusterwideEnvoyConfig{} - err = c.client.Put(). - Resource("ciliumclusterwideenvoyconfigs"). - Name(ciliumClusterwideEnvoyConfig.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumClusterwideEnvoyConfig). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumClusterwideEnvoyConfig and deletes it. Returns an error if one occurs. -func (c *ciliumClusterwideEnvoyConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumclusterwideenvoyconfigs"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumClusterwideEnvoyConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumclusterwideenvoyconfigs"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumClusterwideEnvoyConfig. -func (c *ciliumClusterwideEnvoyConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumClusterwideEnvoyConfig, err error) { - result = &v2.CiliumClusterwideEnvoyConfig{} - err = c.client.Patch(pt). - Resource("ciliumclusterwideenvoyconfigs"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwidenetworkpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwidenetworkpolicy.go deleted file mode 100644 index 56cde262639..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwidenetworkpolicy.go +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -import ( - "context" - "time" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumClusterwideNetworkPoliciesGetter has a method to return a CiliumClusterwideNetworkPolicyInterface. -// A group's client should implement this interface. -type CiliumClusterwideNetworkPoliciesGetter interface { - CiliumClusterwideNetworkPolicies() CiliumClusterwideNetworkPolicyInterface -} - -// CiliumClusterwideNetworkPolicyInterface has methods to work with CiliumClusterwideNetworkPolicy resources. -type CiliumClusterwideNetworkPolicyInterface interface { - Create(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.CreateOptions) (*v2.CiliumClusterwideNetworkPolicy, error) - Update(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.UpdateOptions) (*v2.CiliumClusterwideNetworkPolicy, error) - UpdateStatus(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.UpdateOptions) (*v2.CiliumClusterwideNetworkPolicy, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumClusterwideNetworkPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumClusterwideNetworkPolicyList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumClusterwideNetworkPolicy, err error) - CiliumClusterwideNetworkPolicyExpansion -} - -// ciliumClusterwideNetworkPolicies implements CiliumClusterwideNetworkPolicyInterface -type ciliumClusterwideNetworkPolicies struct { - client rest.Interface -} - -// newCiliumClusterwideNetworkPolicies returns a CiliumClusterwideNetworkPolicies -func newCiliumClusterwideNetworkPolicies(c *CiliumV2Client) *ciliumClusterwideNetworkPolicies { - return &ciliumClusterwideNetworkPolicies{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumClusterwideNetworkPolicy, and returns the corresponding ciliumClusterwideNetworkPolicy object, and an error if there is any. -func (c *ciliumClusterwideNetworkPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumClusterwideNetworkPolicy, err error) { - result = &v2.CiliumClusterwideNetworkPolicy{} - err = c.client.Get(). - Resource("ciliumclusterwidenetworkpolicies"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumClusterwideNetworkPolicies that match those selectors. -func (c *ciliumClusterwideNetworkPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumClusterwideNetworkPolicyList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2.CiliumClusterwideNetworkPolicyList{} - err = c.client.Get(). - Resource("ciliumclusterwidenetworkpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumClusterwideNetworkPolicies. -func (c *ciliumClusterwideNetworkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumclusterwidenetworkpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumClusterwideNetworkPolicy and creates it. Returns the server's representation of the ciliumClusterwideNetworkPolicy, and an error, if there is any. -func (c *ciliumClusterwideNetworkPolicies) Create(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.CreateOptions) (result *v2.CiliumClusterwideNetworkPolicy, err error) { - result = &v2.CiliumClusterwideNetworkPolicy{} - err = c.client.Post(). - Resource("ciliumclusterwidenetworkpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumClusterwideNetworkPolicy). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumClusterwideNetworkPolicy and updates it. Returns the server's representation of the ciliumClusterwideNetworkPolicy, and an error, if there is any. -func (c *ciliumClusterwideNetworkPolicies) Update(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.UpdateOptions) (result *v2.CiliumClusterwideNetworkPolicy, err error) { - result = &v2.CiliumClusterwideNetworkPolicy{} - err = c.client.Put(). - Resource("ciliumclusterwidenetworkpolicies"). - Name(ciliumClusterwideNetworkPolicy.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumClusterwideNetworkPolicy). - Do(ctx). - 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 *ciliumClusterwideNetworkPolicies) UpdateStatus(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.UpdateOptions) (result *v2.CiliumClusterwideNetworkPolicy, err error) { - result = &v2.CiliumClusterwideNetworkPolicy{} - err = c.client.Put(). - Resource("ciliumclusterwidenetworkpolicies"). - Name(ciliumClusterwideNetworkPolicy.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumClusterwideNetworkPolicy). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumClusterwideNetworkPolicy and deletes it. Returns an error if one occurs. -func (c *ciliumClusterwideNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumclusterwidenetworkpolicies"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumClusterwideNetworkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumclusterwidenetworkpolicies"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumClusterwideNetworkPolicy. -func (c *ciliumClusterwideNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumClusterwideNetworkPolicy, err error) { - result = &v2.CiliumClusterwideNetworkPolicy{} - err = c.client.Patch(pt). - Resource("ciliumclusterwidenetworkpolicies"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumegressgatewaypolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumegressgatewaypolicy.go deleted file mode 100644 index 625a89b74b0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumegressgatewaypolicy.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -import ( - "context" - "time" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumEgressGatewayPoliciesGetter has a method to return a CiliumEgressGatewayPolicyInterface. -// A group's client should implement this interface. -type CiliumEgressGatewayPoliciesGetter interface { - CiliumEgressGatewayPolicies() CiliumEgressGatewayPolicyInterface -} - -// CiliumEgressGatewayPolicyInterface has methods to work with CiliumEgressGatewayPolicy resources. -type CiliumEgressGatewayPolicyInterface interface { - Create(ctx context.Context, ciliumEgressGatewayPolicy *v2.CiliumEgressGatewayPolicy, opts v1.CreateOptions) (*v2.CiliumEgressGatewayPolicy, error) - Update(ctx context.Context, ciliumEgressGatewayPolicy *v2.CiliumEgressGatewayPolicy, opts v1.UpdateOptions) (*v2.CiliumEgressGatewayPolicy, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumEgressGatewayPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumEgressGatewayPolicyList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEgressGatewayPolicy, err error) - CiliumEgressGatewayPolicyExpansion -} - -// ciliumEgressGatewayPolicies implements CiliumEgressGatewayPolicyInterface -type ciliumEgressGatewayPolicies struct { - client rest.Interface -} - -// newCiliumEgressGatewayPolicies returns a CiliumEgressGatewayPolicies -func newCiliumEgressGatewayPolicies(c *CiliumV2Client) *ciliumEgressGatewayPolicies { - return &ciliumEgressGatewayPolicies{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumEgressGatewayPolicy, and returns the corresponding ciliumEgressGatewayPolicy object, and an error if there is any. -func (c *ciliumEgressGatewayPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumEgressGatewayPolicy, err error) { - result = &v2.CiliumEgressGatewayPolicy{} - err = c.client.Get(). - Resource("ciliumegressgatewaypolicies"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumEgressGatewayPolicies that match those selectors. -func (c *ciliumEgressGatewayPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumEgressGatewayPolicyList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2.CiliumEgressGatewayPolicyList{} - err = c.client.Get(). - Resource("ciliumegressgatewaypolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumEgressGatewayPolicies. -func (c *ciliumEgressGatewayPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumegressgatewaypolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumEgressGatewayPolicy and creates it. Returns the server's representation of the ciliumEgressGatewayPolicy, and an error, if there is any. -func (c *ciliumEgressGatewayPolicies) Create(ctx context.Context, ciliumEgressGatewayPolicy *v2.CiliumEgressGatewayPolicy, opts v1.CreateOptions) (result *v2.CiliumEgressGatewayPolicy, err error) { - result = &v2.CiliumEgressGatewayPolicy{} - err = c.client.Post(). - Resource("ciliumegressgatewaypolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumEgressGatewayPolicy). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumEgressGatewayPolicy and updates it. Returns the server's representation of the ciliumEgressGatewayPolicy, and an error, if there is any. -func (c *ciliumEgressGatewayPolicies) Update(ctx context.Context, ciliumEgressGatewayPolicy *v2.CiliumEgressGatewayPolicy, opts v1.UpdateOptions) (result *v2.CiliumEgressGatewayPolicy, err error) { - result = &v2.CiliumEgressGatewayPolicy{} - err = c.client.Put(). - Resource("ciliumegressgatewaypolicies"). - Name(ciliumEgressGatewayPolicy.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumEgressGatewayPolicy). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumEgressGatewayPolicy and deletes it. Returns an error if one occurs. -func (c *ciliumEgressGatewayPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumegressgatewaypolicies"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumEgressGatewayPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumegressgatewaypolicies"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumEgressGatewayPolicy. -func (c *ciliumEgressGatewayPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEgressGatewayPolicy, err error) { - result = &v2.CiliumEgressGatewayPolicy{} - err = c.client.Patch(pt). - Resource("ciliumegressgatewaypolicies"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumendpoint.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumendpoint.go deleted file mode 100644 index 3cd66d46ae5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumendpoint.go +++ /dev/null @@ -1,182 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -import ( - "context" - "time" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumEndpointsGetter has a method to return a CiliumEndpointInterface. -// A group's client should implement this interface. -type CiliumEndpointsGetter interface { - CiliumEndpoints(namespace string) CiliumEndpointInterface -} - -// CiliumEndpointInterface has methods to work with CiliumEndpoint resources. -type CiliumEndpointInterface interface { - Create(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.CreateOptions) (*v2.CiliumEndpoint, error) - Update(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.UpdateOptions) (*v2.CiliumEndpoint, error) - UpdateStatus(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.UpdateOptions) (*v2.CiliumEndpoint, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumEndpoint, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumEndpointList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEndpoint, err error) - CiliumEndpointExpansion -} - -// ciliumEndpoints implements CiliumEndpointInterface -type ciliumEndpoints struct { - client rest.Interface - ns string -} - -// newCiliumEndpoints returns a CiliumEndpoints -func newCiliumEndpoints(c *CiliumV2Client, namespace string) *ciliumEndpoints { - return &ciliumEndpoints{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the ciliumEndpoint, and returns the corresponding ciliumEndpoint object, and an error if there is any. -func (c *ciliumEndpoints) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumEndpoint, err error) { - result = &v2.CiliumEndpoint{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ciliumendpoints"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumEndpoints that match those selectors. -func (c *ciliumEndpoints) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumEndpointList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2.CiliumEndpointList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ciliumendpoints"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumEndpoints. -func (c *ciliumEndpoints) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("ciliumendpoints"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumEndpoint and creates it. Returns the server's representation of the ciliumEndpoint, and an error, if there is any. -func (c *ciliumEndpoints) Create(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.CreateOptions) (result *v2.CiliumEndpoint, err error) { - result = &v2.CiliumEndpoint{} - err = c.client.Post(). - Namespace(c.ns). - Resource("ciliumendpoints"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumEndpoint). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumEndpoint and updates it. Returns the server's representation of the ciliumEndpoint, and an error, if there is any. -func (c *ciliumEndpoints) Update(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.UpdateOptions) (result *v2.CiliumEndpoint, err error) { - result = &v2.CiliumEndpoint{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ciliumendpoints"). - Name(ciliumEndpoint.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumEndpoint). - Do(ctx). - 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 *ciliumEndpoints) UpdateStatus(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.UpdateOptions) (result *v2.CiliumEndpoint, err error) { - result = &v2.CiliumEndpoint{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ciliumendpoints"). - Name(ciliumEndpoint.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumEndpoint). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumEndpoint and deletes it. Returns an error if one occurs. -func (c *ciliumEndpoints) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("ciliumendpoints"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumEndpoints) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("ciliumendpoints"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumEndpoint. -func (c *ciliumEndpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEndpoint, err error) { - result = &v2.CiliumEndpoint{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("ciliumendpoints"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumenvoyconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumenvoyconfig.go deleted file mode 100644 index 9f5acd456d3..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumenvoyconfig.go +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -import ( - "context" - "time" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumEnvoyConfigsGetter has a method to return a CiliumEnvoyConfigInterface. -// A group's client should implement this interface. -type CiliumEnvoyConfigsGetter interface { - CiliumEnvoyConfigs(namespace string) CiliumEnvoyConfigInterface -} - -// CiliumEnvoyConfigInterface has methods to work with CiliumEnvoyConfig resources. -type CiliumEnvoyConfigInterface interface { - Create(ctx context.Context, ciliumEnvoyConfig *v2.CiliumEnvoyConfig, opts v1.CreateOptions) (*v2.CiliumEnvoyConfig, error) - Update(ctx context.Context, ciliumEnvoyConfig *v2.CiliumEnvoyConfig, opts v1.UpdateOptions) (*v2.CiliumEnvoyConfig, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumEnvoyConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumEnvoyConfigList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEnvoyConfig, err error) - CiliumEnvoyConfigExpansion -} - -// ciliumEnvoyConfigs implements CiliumEnvoyConfigInterface -type ciliumEnvoyConfigs struct { - client rest.Interface - ns string -} - -// newCiliumEnvoyConfigs returns a CiliumEnvoyConfigs -func newCiliumEnvoyConfigs(c *CiliumV2Client, namespace string) *ciliumEnvoyConfigs { - return &ciliumEnvoyConfigs{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the ciliumEnvoyConfig, and returns the corresponding ciliumEnvoyConfig object, and an error if there is any. -func (c *ciliumEnvoyConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumEnvoyConfig, err error) { - result = &v2.CiliumEnvoyConfig{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ciliumenvoyconfigs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumEnvoyConfigs that match those selectors. -func (c *ciliumEnvoyConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumEnvoyConfigList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2.CiliumEnvoyConfigList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ciliumenvoyconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumEnvoyConfigs. -func (c *ciliumEnvoyConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("ciliumenvoyconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumEnvoyConfig and creates it. Returns the server's representation of the ciliumEnvoyConfig, and an error, if there is any. -func (c *ciliumEnvoyConfigs) Create(ctx context.Context, ciliumEnvoyConfig *v2.CiliumEnvoyConfig, opts v1.CreateOptions) (result *v2.CiliumEnvoyConfig, err error) { - result = &v2.CiliumEnvoyConfig{} - err = c.client.Post(). - Namespace(c.ns). - Resource("ciliumenvoyconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumEnvoyConfig). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumEnvoyConfig and updates it. Returns the server's representation of the ciliumEnvoyConfig, and an error, if there is any. -func (c *ciliumEnvoyConfigs) Update(ctx context.Context, ciliumEnvoyConfig *v2.CiliumEnvoyConfig, opts v1.UpdateOptions) (result *v2.CiliumEnvoyConfig, err error) { - result = &v2.CiliumEnvoyConfig{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ciliumenvoyconfigs"). - Name(ciliumEnvoyConfig.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumEnvoyConfig). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumEnvoyConfig and deletes it. Returns an error if one occurs. -func (c *ciliumEnvoyConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("ciliumenvoyconfigs"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumEnvoyConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("ciliumenvoyconfigs"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumEnvoyConfig. -func (c *ciliumEnvoyConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEnvoyConfig, err error) { - result = &v2.CiliumEnvoyConfig{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("ciliumenvoyconfigs"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumexternalworkload.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumexternalworkload.go deleted file mode 100644 index 261cbfeed17..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumexternalworkload.go +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -import ( - "context" - "time" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumExternalWorkloadsGetter has a method to return a CiliumExternalWorkloadInterface. -// A group's client should implement this interface. -type CiliumExternalWorkloadsGetter interface { - CiliumExternalWorkloads() CiliumExternalWorkloadInterface -} - -// CiliumExternalWorkloadInterface has methods to work with CiliumExternalWorkload resources. -type CiliumExternalWorkloadInterface interface { - Create(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.CreateOptions) (*v2.CiliumExternalWorkload, error) - Update(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.UpdateOptions) (*v2.CiliumExternalWorkload, error) - UpdateStatus(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.UpdateOptions) (*v2.CiliumExternalWorkload, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumExternalWorkload, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumExternalWorkloadList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumExternalWorkload, err error) - CiliumExternalWorkloadExpansion -} - -// ciliumExternalWorkloads implements CiliumExternalWorkloadInterface -type ciliumExternalWorkloads struct { - client rest.Interface -} - -// newCiliumExternalWorkloads returns a CiliumExternalWorkloads -func newCiliumExternalWorkloads(c *CiliumV2Client) *ciliumExternalWorkloads { - return &ciliumExternalWorkloads{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumExternalWorkload, and returns the corresponding ciliumExternalWorkload object, and an error if there is any. -func (c *ciliumExternalWorkloads) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumExternalWorkload, err error) { - result = &v2.CiliumExternalWorkload{} - err = c.client.Get(). - Resource("ciliumexternalworkloads"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumExternalWorkloads that match those selectors. -func (c *ciliumExternalWorkloads) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumExternalWorkloadList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2.CiliumExternalWorkloadList{} - err = c.client.Get(). - Resource("ciliumexternalworkloads"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumExternalWorkloads. -func (c *ciliumExternalWorkloads) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumexternalworkloads"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumExternalWorkload and creates it. Returns the server's representation of the ciliumExternalWorkload, and an error, if there is any. -func (c *ciliumExternalWorkloads) Create(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.CreateOptions) (result *v2.CiliumExternalWorkload, err error) { - result = &v2.CiliumExternalWorkload{} - err = c.client.Post(). - Resource("ciliumexternalworkloads"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumExternalWorkload). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumExternalWorkload and updates it. Returns the server's representation of the ciliumExternalWorkload, and an error, if there is any. -func (c *ciliumExternalWorkloads) Update(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.UpdateOptions) (result *v2.CiliumExternalWorkload, err error) { - result = &v2.CiliumExternalWorkload{} - err = c.client.Put(). - Resource("ciliumexternalworkloads"). - Name(ciliumExternalWorkload.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumExternalWorkload). - Do(ctx). - 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 *ciliumExternalWorkloads) UpdateStatus(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.UpdateOptions) (result *v2.CiliumExternalWorkload, err error) { - result = &v2.CiliumExternalWorkload{} - err = c.client.Put(). - Resource("ciliumexternalworkloads"). - Name(ciliumExternalWorkload.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumExternalWorkload). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumExternalWorkload and deletes it. Returns an error if one occurs. -func (c *ciliumExternalWorkloads) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumexternalworkloads"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumExternalWorkloads) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumexternalworkloads"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumExternalWorkload. -func (c *ciliumExternalWorkloads) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumExternalWorkload, err error) { - result = &v2.CiliumExternalWorkload{} - err = c.client.Patch(pt). - Resource("ciliumexternalworkloads"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumidentity.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumidentity.go deleted file mode 100644 index c23f0172634..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumidentity.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -import ( - "context" - "time" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumIdentitiesGetter has a method to return a CiliumIdentityInterface. -// A group's client should implement this interface. -type CiliumIdentitiesGetter interface { - CiliumIdentities() CiliumIdentityInterface -} - -// CiliumIdentityInterface has methods to work with CiliumIdentity resources. -type CiliumIdentityInterface interface { - Create(ctx context.Context, ciliumIdentity *v2.CiliumIdentity, opts v1.CreateOptions) (*v2.CiliumIdentity, error) - Update(ctx context.Context, ciliumIdentity *v2.CiliumIdentity, opts v1.UpdateOptions) (*v2.CiliumIdentity, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumIdentity, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumIdentityList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumIdentity, err error) - CiliumIdentityExpansion -} - -// ciliumIdentities implements CiliumIdentityInterface -type ciliumIdentities struct { - client rest.Interface -} - -// newCiliumIdentities returns a CiliumIdentities -func newCiliumIdentities(c *CiliumV2Client) *ciliumIdentities { - return &ciliumIdentities{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumIdentity, and returns the corresponding ciliumIdentity object, and an error if there is any. -func (c *ciliumIdentities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumIdentity, err error) { - result = &v2.CiliumIdentity{} - err = c.client.Get(). - Resource("ciliumidentities"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumIdentities that match those selectors. -func (c *ciliumIdentities) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumIdentityList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2.CiliumIdentityList{} - err = c.client.Get(). - Resource("ciliumidentities"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumIdentities. -func (c *ciliumIdentities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumidentities"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumIdentity and creates it. Returns the server's representation of the ciliumIdentity, and an error, if there is any. -func (c *ciliumIdentities) Create(ctx context.Context, ciliumIdentity *v2.CiliumIdentity, opts v1.CreateOptions) (result *v2.CiliumIdentity, err error) { - result = &v2.CiliumIdentity{} - err = c.client.Post(). - Resource("ciliumidentities"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumIdentity). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumIdentity and updates it. Returns the server's representation of the ciliumIdentity, and an error, if there is any. -func (c *ciliumIdentities) Update(ctx context.Context, ciliumIdentity *v2.CiliumIdentity, opts v1.UpdateOptions) (result *v2.CiliumIdentity, err error) { - result = &v2.CiliumIdentity{} - err = c.client.Put(). - Resource("ciliumidentities"). - Name(ciliumIdentity.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumIdentity). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumIdentity and deletes it. Returns an error if one occurs. -func (c *ciliumIdentities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumidentities"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumIdentities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumidentities"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumIdentity. -func (c *ciliumIdentities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumIdentity, err error) { - result = &v2.CiliumIdentity{} - err = c.client.Patch(pt). - Resource("ciliumidentities"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumlocalredirectpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumlocalredirectpolicy.go deleted file mode 100644 index 9c839eb942c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumlocalredirectpolicy.go +++ /dev/null @@ -1,182 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -import ( - "context" - "time" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumLocalRedirectPoliciesGetter has a method to return a CiliumLocalRedirectPolicyInterface. -// A group's client should implement this interface. -type CiliumLocalRedirectPoliciesGetter interface { - CiliumLocalRedirectPolicies(namespace string) CiliumLocalRedirectPolicyInterface -} - -// CiliumLocalRedirectPolicyInterface has methods to work with CiliumLocalRedirectPolicy resources. -type CiliumLocalRedirectPolicyInterface interface { - Create(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.CreateOptions) (*v2.CiliumLocalRedirectPolicy, error) - Update(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.UpdateOptions) (*v2.CiliumLocalRedirectPolicy, error) - UpdateStatus(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.UpdateOptions) (*v2.CiliumLocalRedirectPolicy, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumLocalRedirectPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumLocalRedirectPolicyList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumLocalRedirectPolicy, err error) - CiliumLocalRedirectPolicyExpansion -} - -// ciliumLocalRedirectPolicies implements CiliumLocalRedirectPolicyInterface -type ciliumLocalRedirectPolicies struct { - client rest.Interface - ns string -} - -// newCiliumLocalRedirectPolicies returns a CiliumLocalRedirectPolicies -func newCiliumLocalRedirectPolicies(c *CiliumV2Client, namespace string) *ciliumLocalRedirectPolicies { - return &ciliumLocalRedirectPolicies{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the ciliumLocalRedirectPolicy, and returns the corresponding ciliumLocalRedirectPolicy object, and an error if there is any. -func (c *ciliumLocalRedirectPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumLocalRedirectPolicy, err error) { - result = &v2.CiliumLocalRedirectPolicy{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ciliumlocalredirectpolicies"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumLocalRedirectPolicies that match those selectors. -func (c *ciliumLocalRedirectPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumLocalRedirectPolicyList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2.CiliumLocalRedirectPolicyList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ciliumlocalredirectpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumLocalRedirectPolicies. -func (c *ciliumLocalRedirectPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("ciliumlocalredirectpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumLocalRedirectPolicy and creates it. Returns the server's representation of the ciliumLocalRedirectPolicy, and an error, if there is any. -func (c *ciliumLocalRedirectPolicies) Create(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.CreateOptions) (result *v2.CiliumLocalRedirectPolicy, err error) { - result = &v2.CiliumLocalRedirectPolicy{} - err = c.client.Post(). - Namespace(c.ns). - Resource("ciliumlocalredirectpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumLocalRedirectPolicy). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumLocalRedirectPolicy and updates it. Returns the server's representation of the ciliumLocalRedirectPolicy, and an error, if there is any. -func (c *ciliumLocalRedirectPolicies) Update(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.UpdateOptions) (result *v2.CiliumLocalRedirectPolicy, err error) { - result = &v2.CiliumLocalRedirectPolicy{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ciliumlocalredirectpolicies"). - Name(ciliumLocalRedirectPolicy.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumLocalRedirectPolicy). - Do(ctx). - 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 *ciliumLocalRedirectPolicies) UpdateStatus(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.UpdateOptions) (result *v2.CiliumLocalRedirectPolicy, err error) { - result = &v2.CiliumLocalRedirectPolicy{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ciliumlocalredirectpolicies"). - Name(ciliumLocalRedirectPolicy.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumLocalRedirectPolicy). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumLocalRedirectPolicy and deletes it. Returns an error if one occurs. -func (c *ciliumLocalRedirectPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("ciliumlocalredirectpolicies"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumLocalRedirectPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("ciliumlocalredirectpolicies"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumLocalRedirectPolicy. -func (c *ciliumLocalRedirectPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumLocalRedirectPolicy, err error) { - result = &v2.CiliumLocalRedirectPolicy{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("ciliumlocalredirectpolicies"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnetworkpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnetworkpolicy.go deleted file mode 100644 index f5d5ae60a88..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnetworkpolicy.go +++ /dev/null @@ -1,182 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -import ( - "context" - "time" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumNetworkPoliciesGetter has a method to return a CiliumNetworkPolicyInterface. -// A group's client should implement this interface. -type CiliumNetworkPoliciesGetter interface { - CiliumNetworkPolicies(namespace string) CiliumNetworkPolicyInterface -} - -// CiliumNetworkPolicyInterface has methods to work with CiliumNetworkPolicy resources. -type CiliumNetworkPolicyInterface interface { - Create(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.CreateOptions) (*v2.CiliumNetworkPolicy, error) - Update(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.UpdateOptions) (*v2.CiliumNetworkPolicy, error) - UpdateStatus(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.UpdateOptions) (*v2.CiliumNetworkPolicy, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumNetworkPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumNetworkPolicyList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumNetworkPolicy, err error) - CiliumNetworkPolicyExpansion -} - -// ciliumNetworkPolicies implements CiliumNetworkPolicyInterface -type ciliumNetworkPolicies struct { - client rest.Interface - ns string -} - -// newCiliumNetworkPolicies returns a CiliumNetworkPolicies -func newCiliumNetworkPolicies(c *CiliumV2Client, namespace string) *ciliumNetworkPolicies { - return &ciliumNetworkPolicies{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the ciliumNetworkPolicy, and returns the corresponding ciliumNetworkPolicy object, and an error if there is any. -func (c *ciliumNetworkPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumNetworkPolicy, err error) { - result = &v2.CiliumNetworkPolicy{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ciliumnetworkpolicies"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumNetworkPolicies that match those selectors. -func (c *ciliumNetworkPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumNetworkPolicyList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2.CiliumNetworkPolicyList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ciliumnetworkpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumNetworkPolicies. -func (c *ciliumNetworkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("ciliumnetworkpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumNetworkPolicy and creates it. Returns the server's representation of the ciliumNetworkPolicy, and an error, if there is any. -func (c *ciliumNetworkPolicies) Create(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.CreateOptions) (result *v2.CiliumNetworkPolicy, err error) { - result = &v2.CiliumNetworkPolicy{} - err = c.client.Post(). - Namespace(c.ns). - Resource("ciliumnetworkpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumNetworkPolicy). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumNetworkPolicy and updates it. Returns the server's representation of the ciliumNetworkPolicy, and an error, if there is any. -func (c *ciliumNetworkPolicies) Update(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.UpdateOptions) (result *v2.CiliumNetworkPolicy, err error) { - result = &v2.CiliumNetworkPolicy{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ciliumnetworkpolicies"). - Name(ciliumNetworkPolicy.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumNetworkPolicy). - Do(ctx). - 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 *ciliumNetworkPolicies) UpdateStatus(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.UpdateOptions) (result *v2.CiliumNetworkPolicy, err error) { - result = &v2.CiliumNetworkPolicy{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ciliumnetworkpolicies"). - Name(ciliumNetworkPolicy.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumNetworkPolicy). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumNetworkPolicy and deletes it. Returns an error if one occurs. -func (c *ciliumNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("ciliumnetworkpolicies"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumNetworkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("ciliumnetworkpolicies"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumNetworkPolicy. -func (c *ciliumNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumNetworkPolicy, err error) { - result = &v2.CiliumNetworkPolicy{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("ciliumnetworkpolicies"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnode.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnode.go deleted file mode 100644 index 9cc2e55550b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnode.go +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -import ( - "context" - "time" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumNodesGetter has a method to return a CiliumNodeInterface. -// A group's client should implement this interface. -type CiliumNodesGetter interface { - CiliumNodes() CiliumNodeInterface -} - -// CiliumNodeInterface has methods to work with CiliumNode resources. -type CiliumNodeInterface interface { - Create(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.CreateOptions) (*v2.CiliumNode, error) - Update(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.UpdateOptions) (*v2.CiliumNode, error) - UpdateStatus(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.UpdateOptions) (*v2.CiliumNode, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumNode, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumNodeList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumNode, err error) - CiliumNodeExpansion -} - -// ciliumNodes implements CiliumNodeInterface -type ciliumNodes struct { - client rest.Interface -} - -// newCiliumNodes returns a CiliumNodes -func newCiliumNodes(c *CiliumV2Client) *ciliumNodes { - return &ciliumNodes{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumNode, and returns the corresponding ciliumNode object, and an error if there is any. -func (c *ciliumNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumNode, err error) { - result = &v2.CiliumNode{} - err = c.client.Get(). - Resource("ciliumnodes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumNodes that match those selectors. -func (c *ciliumNodes) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumNodeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2.CiliumNodeList{} - err = c.client.Get(). - Resource("ciliumnodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumNodes. -func (c *ciliumNodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumnodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumNode and creates it. Returns the server's representation of the ciliumNode, and an error, if there is any. -func (c *ciliumNodes) Create(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.CreateOptions) (result *v2.CiliumNode, err error) { - result = &v2.CiliumNode{} - err = c.client.Post(). - Resource("ciliumnodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumNode). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumNode and updates it. Returns the server's representation of the ciliumNode, and an error, if there is any. -func (c *ciliumNodes) Update(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.UpdateOptions) (result *v2.CiliumNode, err error) { - result = &v2.CiliumNode{} - err = c.client.Put(). - Resource("ciliumnodes"). - Name(ciliumNode.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumNode). - Do(ctx). - 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 *ciliumNodes) UpdateStatus(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.UpdateOptions) (result *v2.CiliumNode, err error) { - result = &v2.CiliumNode{} - err = c.client.Put(). - Resource("ciliumnodes"). - Name(ciliumNode.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumNode). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumNode and deletes it. Returns an error if one occurs. -func (c *ciliumNodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumnodes"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumNodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumnodes"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumNode. -func (c *ciliumNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumNode, err error) { - result = &v2.CiliumNode{} - err = c.client.Patch(pt). - Resource("ciliumnodes"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/doc.go deleted file mode 100644 index b3757ef24ef..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v2 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/doc.go deleted file mode 100644 index 57bd090efb0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_cilium.io_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_cilium.io_client.go deleted file mode 100644 index 9ed059f6480..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_cilium.io_client.go +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v2 "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeCiliumV2 struct { - *testing.Fake -} - -func (c *FakeCiliumV2) CiliumClusterwideEnvoyConfigs() v2.CiliumClusterwideEnvoyConfigInterface { - return &FakeCiliumClusterwideEnvoyConfigs{c} -} - -func (c *FakeCiliumV2) CiliumClusterwideNetworkPolicies() v2.CiliumClusterwideNetworkPolicyInterface { - return &FakeCiliumClusterwideNetworkPolicies{c} -} - -func (c *FakeCiliumV2) CiliumEgressGatewayPolicies() v2.CiliumEgressGatewayPolicyInterface { - return &FakeCiliumEgressGatewayPolicies{c} -} - -func (c *FakeCiliumV2) CiliumEndpoints(namespace string) v2.CiliumEndpointInterface { - return &FakeCiliumEndpoints{c, namespace} -} - -func (c *FakeCiliumV2) CiliumEnvoyConfigs(namespace string) v2.CiliumEnvoyConfigInterface { - return &FakeCiliumEnvoyConfigs{c, namespace} -} - -func (c *FakeCiliumV2) CiliumExternalWorkloads() v2.CiliumExternalWorkloadInterface { - return &FakeCiliumExternalWorkloads{c} -} - -func (c *FakeCiliumV2) CiliumIdentities() v2.CiliumIdentityInterface { - return &FakeCiliumIdentities{c} -} - -func (c *FakeCiliumV2) CiliumLocalRedirectPolicies(namespace string) v2.CiliumLocalRedirectPolicyInterface { - return &FakeCiliumLocalRedirectPolicies{c, namespace} -} - -func (c *FakeCiliumV2) CiliumNetworkPolicies(namespace string) v2.CiliumNetworkPolicyInterface { - return &FakeCiliumNetworkPolicies{c, namespace} -} - -func (c *FakeCiliumV2) CiliumNodes() v2.CiliumNodeInterface { - return &FakeCiliumNodes{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeCiliumV2) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwideenvoyconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwideenvoyconfig.go deleted file mode 100644 index ecabad97a3e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwideenvoyconfig.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumClusterwideEnvoyConfigs implements CiliumClusterwideEnvoyConfigInterface -type FakeCiliumClusterwideEnvoyConfigs struct { - Fake *FakeCiliumV2 -} - -var ciliumclusterwideenvoyconfigsResource = v2.SchemeGroupVersion.WithResource("ciliumclusterwideenvoyconfigs") - -var ciliumclusterwideenvoyconfigsKind = v2.SchemeGroupVersion.WithKind("CiliumClusterwideEnvoyConfig") - -// Get takes name of the ciliumClusterwideEnvoyConfig, and returns the corresponding ciliumClusterwideEnvoyConfig object, and an error if there is any. -func (c *FakeCiliumClusterwideEnvoyConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumClusterwideEnvoyConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumclusterwideenvoyconfigsResource, name), &v2.CiliumClusterwideEnvoyConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumClusterwideEnvoyConfig), err -} - -// List takes label and field selectors, and returns the list of CiliumClusterwideEnvoyConfigs that match those selectors. -func (c *FakeCiliumClusterwideEnvoyConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumClusterwideEnvoyConfigList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumclusterwideenvoyconfigsResource, ciliumclusterwideenvoyconfigsKind, opts), &v2.CiliumClusterwideEnvoyConfigList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2.CiliumClusterwideEnvoyConfigList{ListMeta: obj.(*v2.CiliumClusterwideEnvoyConfigList).ListMeta} - for _, item := range obj.(*v2.CiliumClusterwideEnvoyConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumClusterwideEnvoyConfigs. -func (c *FakeCiliumClusterwideEnvoyConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumclusterwideenvoyconfigsResource, opts)) -} - -// Create takes the representation of a ciliumClusterwideEnvoyConfig and creates it. Returns the server's representation of the ciliumClusterwideEnvoyConfig, and an error, if there is any. -func (c *FakeCiliumClusterwideEnvoyConfigs) Create(ctx context.Context, ciliumClusterwideEnvoyConfig *v2.CiliumClusterwideEnvoyConfig, opts v1.CreateOptions) (result *v2.CiliumClusterwideEnvoyConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumclusterwideenvoyconfigsResource, ciliumClusterwideEnvoyConfig), &v2.CiliumClusterwideEnvoyConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumClusterwideEnvoyConfig), err -} - -// Update takes the representation of a ciliumClusterwideEnvoyConfig and updates it. Returns the server's representation of the ciliumClusterwideEnvoyConfig, and an error, if there is any. -func (c *FakeCiliumClusterwideEnvoyConfigs) Update(ctx context.Context, ciliumClusterwideEnvoyConfig *v2.CiliumClusterwideEnvoyConfig, opts v1.UpdateOptions) (result *v2.CiliumClusterwideEnvoyConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumclusterwideenvoyconfigsResource, ciliumClusterwideEnvoyConfig), &v2.CiliumClusterwideEnvoyConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumClusterwideEnvoyConfig), err -} - -// Delete takes name of the ciliumClusterwideEnvoyConfig and deletes it. Returns an error if one occurs. -func (c *FakeCiliumClusterwideEnvoyConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumclusterwideenvoyconfigsResource, name, opts), &v2.CiliumClusterwideEnvoyConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumClusterwideEnvoyConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumclusterwideenvoyconfigsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2.CiliumClusterwideEnvoyConfigList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumClusterwideEnvoyConfig. -func (c *FakeCiliumClusterwideEnvoyConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumClusterwideEnvoyConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumclusterwideenvoyconfigsResource, name, pt, data, subresources...), &v2.CiliumClusterwideEnvoyConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumClusterwideEnvoyConfig), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwidenetworkpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwidenetworkpolicy.go deleted file mode 100644 index d3d2be6243e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwidenetworkpolicy.go +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumClusterwideNetworkPolicies implements CiliumClusterwideNetworkPolicyInterface -type FakeCiliumClusterwideNetworkPolicies struct { - Fake *FakeCiliumV2 -} - -var ciliumclusterwidenetworkpoliciesResource = v2.SchemeGroupVersion.WithResource("ciliumclusterwidenetworkpolicies") - -var ciliumclusterwidenetworkpoliciesKind = v2.SchemeGroupVersion.WithKind("CiliumClusterwideNetworkPolicy") - -// Get takes name of the ciliumClusterwideNetworkPolicy, and returns the corresponding ciliumClusterwideNetworkPolicy object, and an error if there is any. -func (c *FakeCiliumClusterwideNetworkPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumClusterwideNetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumclusterwidenetworkpoliciesResource, name), &v2.CiliumClusterwideNetworkPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumClusterwideNetworkPolicy), err -} - -// List takes label and field selectors, and returns the list of CiliumClusterwideNetworkPolicies that match those selectors. -func (c *FakeCiliumClusterwideNetworkPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumClusterwideNetworkPolicyList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumclusterwidenetworkpoliciesResource, ciliumclusterwidenetworkpoliciesKind, opts), &v2.CiliumClusterwideNetworkPolicyList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2.CiliumClusterwideNetworkPolicyList{ListMeta: obj.(*v2.CiliumClusterwideNetworkPolicyList).ListMeta} - for _, item := range obj.(*v2.CiliumClusterwideNetworkPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumClusterwideNetworkPolicies. -func (c *FakeCiliumClusterwideNetworkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumclusterwidenetworkpoliciesResource, opts)) -} - -// Create takes the representation of a ciliumClusterwideNetworkPolicy and creates it. Returns the server's representation of the ciliumClusterwideNetworkPolicy, and an error, if there is any. -func (c *FakeCiliumClusterwideNetworkPolicies) Create(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.CreateOptions) (result *v2.CiliumClusterwideNetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumclusterwidenetworkpoliciesResource, ciliumClusterwideNetworkPolicy), &v2.CiliumClusterwideNetworkPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumClusterwideNetworkPolicy), err -} - -// Update takes the representation of a ciliumClusterwideNetworkPolicy and updates it. Returns the server's representation of the ciliumClusterwideNetworkPolicy, and an error, if there is any. -func (c *FakeCiliumClusterwideNetworkPolicies) Update(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.UpdateOptions) (result *v2.CiliumClusterwideNetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumclusterwidenetworkpoliciesResource, ciliumClusterwideNetworkPolicy), &v2.CiliumClusterwideNetworkPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumClusterwideNetworkPolicy), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCiliumClusterwideNetworkPolicies) UpdateStatus(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.UpdateOptions) (*v2.CiliumClusterwideNetworkPolicy, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(ciliumclusterwidenetworkpoliciesResource, "status", ciliumClusterwideNetworkPolicy), &v2.CiliumClusterwideNetworkPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumClusterwideNetworkPolicy), err -} - -// Delete takes name of the ciliumClusterwideNetworkPolicy and deletes it. Returns an error if one occurs. -func (c *FakeCiliumClusterwideNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumclusterwidenetworkpoliciesResource, name, opts), &v2.CiliumClusterwideNetworkPolicy{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumClusterwideNetworkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumclusterwidenetworkpoliciesResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2.CiliumClusterwideNetworkPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumClusterwideNetworkPolicy. -func (c *FakeCiliumClusterwideNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumClusterwideNetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumclusterwidenetworkpoliciesResource, name, pt, data, subresources...), &v2.CiliumClusterwideNetworkPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumClusterwideNetworkPolicy), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumegressgatewaypolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumegressgatewaypolicy.go deleted file mode 100644 index 993ab79e285..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumegressgatewaypolicy.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumEgressGatewayPolicies implements CiliumEgressGatewayPolicyInterface -type FakeCiliumEgressGatewayPolicies struct { - Fake *FakeCiliumV2 -} - -var ciliumegressgatewaypoliciesResource = v2.SchemeGroupVersion.WithResource("ciliumegressgatewaypolicies") - -var ciliumegressgatewaypoliciesKind = v2.SchemeGroupVersion.WithKind("CiliumEgressGatewayPolicy") - -// Get takes name of the ciliumEgressGatewayPolicy, and returns the corresponding ciliumEgressGatewayPolicy object, and an error if there is any. -func (c *FakeCiliumEgressGatewayPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumEgressGatewayPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumegressgatewaypoliciesResource, name), &v2.CiliumEgressGatewayPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEgressGatewayPolicy), err -} - -// List takes label and field selectors, and returns the list of CiliumEgressGatewayPolicies that match those selectors. -func (c *FakeCiliumEgressGatewayPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumEgressGatewayPolicyList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumegressgatewaypoliciesResource, ciliumegressgatewaypoliciesKind, opts), &v2.CiliumEgressGatewayPolicyList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2.CiliumEgressGatewayPolicyList{ListMeta: obj.(*v2.CiliumEgressGatewayPolicyList).ListMeta} - for _, item := range obj.(*v2.CiliumEgressGatewayPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumEgressGatewayPolicies. -func (c *FakeCiliumEgressGatewayPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumegressgatewaypoliciesResource, opts)) -} - -// Create takes the representation of a ciliumEgressGatewayPolicy and creates it. Returns the server's representation of the ciliumEgressGatewayPolicy, and an error, if there is any. -func (c *FakeCiliumEgressGatewayPolicies) Create(ctx context.Context, ciliumEgressGatewayPolicy *v2.CiliumEgressGatewayPolicy, opts v1.CreateOptions) (result *v2.CiliumEgressGatewayPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumegressgatewaypoliciesResource, ciliumEgressGatewayPolicy), &v2.CiliumEgressGatewayPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEgressGatewayPolicy), err -} - -// Update takes the representation of a ciliumEgressGatewayPolicy and updates it. Returns the server's representation of the ciliumEgressGatewayPolicy, and an error, if there is any. -func (c *FakeCiliumEgressGatewayPolicies) Update(ctx context.Context, ciliumEgressGatewayPolicy *v2.CiliumEgressGatewayPolicy, opts v1.UpdateOptions) (result *v2.CiliumEgressGatewayPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumegressgatewaypoliciesResource, ciliumEgressGatewayPolicy), &v2.CiliumEgressGatewayPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEgressGatewayPolicy), err -} - -// Delete takes name of the ciliumEgressGatewayPolicy and deletes it. Returns an error if one occurs. -func (c *FakeCiliumEgressGatewayPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumegressgatewaypoliciesResource, name, opts), &v2.CiliumEgressGatewayPolicy{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumEgressGatewayPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumegressgatewaypoliciesResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2.CiliumEgressGatewayPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumEgressGatewayPolicy. -func (c *FakeCiliumEgressGatewayPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEgressGatewayPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumegressgatewaypoliciesResource, name, pt, data, subresources...), &v2.CiliumEgressGatewayPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEgressGatewayPolicy), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumendpoint.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumendpoint.go deleted file mode 100644 index 5ec15c48b05..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumendpoint.go +++ /dev/null @@ -1,128 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumEndpoints implements CiliumEndpointInterface -type FakeCiliumEndpoints struct { - Fake *FakeCiliumV2 - ns string -} - -var ciliumendpointsResource = v2.SchemeGroupVersion.WithResource("ciliumendpoints") - -var ciliumendpointsKind = v2.SchemeGroupVersion.WithKind("CiliumEndpoint") - -// Get takes name of the ciliumEndpoint, and returns the corresponding ciliumEndpoint object, and an error if there is any. -func (c *FakeCiliumEndpoints) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumEndpoint, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(ciliumendpointsResource, c.ns, name), &v2.CiliumEndpoint{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEndpoint), err -} - -// List takes label and field selectors, and returns the list of CiliumEndpoints that match those selectors. -func (c *FakeCiliumEndpoints) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumEndpointList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(ciliumendpointsResource, ciliumendpointsKind, c.ns, opts), &v2.CiliumEndpointList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2.CiliumEndpointList{ListMeta: obj.(*v2.CiliumEndpointList).ListMeta} - for _, item := range obj.(*v2.CiliumEndpointList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumEndpoints. -func (c *FakeCiliumEndpoints) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(ciliumendpointsResource, c.ns, opts)) - -} - -// Create takes the representation of a ciliumEndpoint and creates it. Returns the server's representation of the ciliumEndpoint, and an error, if there is any. -func (c *FakeCiliumEndpoints) Create(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.CreateOptions) (result *v2.CiliumEndpoint, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(ciliumendpointsResource, c.ns, ciliumEndpoint), &v2.CiliumEndpoint{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEndpoint), err -} - -// Update takes the representation of a ciliumEndpoint and updates it. Returns the server's representation of the ciliumEndpoint, and an error, if there is any. -func (c *FakeCiliumEndpoints) Update(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.UpdateOptions) (result *v2.CiliumEndpoint, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(ciliumendpointsResource, c.ns, ciliumEndpoint), &v2.CiliumEndpoint{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEndpoint), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCiliumEndpoints) UpdateStatus(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.UpdateOptions) (*v2.CiliumEndpoint, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(ciliumendpointsResource, "status", c.ns, ciliumEndpoint), &v2.CiliumEndpoint{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEndpoint), err -} - -// Delete takes name of the ciliumEndpoint and deletes it. Returns an error if one occurs. -func (c *FakeCiliumEndpoints) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(ciliumendpointsResource, c.ns, name, opts), &v2.CiliumEndpoint{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumEndpoints) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(ciliumendpointsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v2.CiliumEndpointList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumEndpoint. -func (c *FakeCiliumEndpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEndpoint, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ciliumendpointsResource, c.ns, name, pt, data, subresources...), &v2.CiliumEndpoint{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEndpoint), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumenvoyconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumenvoyconfig.go deleted file mode 100644 index fa05926956f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumenvoyconfig.go +++ /dev/null @@ -1,116 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumEnvoyConfigs implements CiliumEnvoyConfigInterface -type FakeCiliumEnvoyConfigs struct { - Fake *FakeCiliumV2 - ns string -} - -var ciliumenvoyconfigsResource = v2.SchemeGroupVersion.WithResource("ciliumenvoyconfigs") - -var ciliumenvoyconfigsKind = v2.SchemeGroupVersion.WithKind("CiliumEnvoyConfig") - -// Get takes name of the ciliumEnvoyConfig, and returns the corresponding ciliumEnvoyConfig object, and an error if there is any. -func (c *FakeCiliumEnvoyConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumEnvoyConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(ciliumenvoyconfigsResource, c.ns, name), &v2.CiliumEnvoyConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEnvoyConfig), err -} - -// List takes label and field selectors, and returns the list of CiliumEnvoyConfigs that match those selectors. -func (c *FakeCiliumEnvoyConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumEnvoyConfigList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(ciliumenvoyconfigsResource, ciliumenvoyconfigsKind, c.ns, opts), &v2.CiliumEnvoyConfigList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2.CiliumEnvoyConfigList{ListMeta: obj.(*v2.CiliumEnvoyConfigList).ListMeta} - for _, item := range obj.(*v2.CiliumEnvoyConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumEnvoyConfigs. -func (c *FakeCiliumEnvoyConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(ciliumenvoyconfigsResource, c.ns, opts)) - -} - -// Create takes the representation of a ciliumEnvoyConfig and creates it. Returns the server's representation of the ciliumEnvoyConfig, and an error, if there is any. -func (c *FakeCiliumEnvoyConfigs) Create(ctx context.Context, ciliumEnvoyConfig *v2.CiliumEnvoyConfig, opts v1.CreateOptions) (result *v2.CiliumEnvoyConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(ciliumenvoyconfigsResource, c.ns, ciliumEnvoyConfig), &v2.CiliumEnvoyConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEnvoyConfig), err -} - -// Update takes the representation of a ciliumEnvoyConfig and updates it. Returns the server's representation of the ciliumEnvoyConfig, and an error, if there is any. -func (c *FakeCiliumEnvoyConfigs) Update(ctx context.Context, ciliumEnvoyConfig *v2.CiliumEnvoyConfig, opts v1.UpdateOptions) (result *v2.CiliumEnvoyConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(ciliumenvoyconfigsResource, c.ns, ciliumEnvoyConfig), &v2.CiliumEnvoyConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEnvoyConfig), err -} - -// Delete takes name of the ciliumEnvoyConfig and deletes it. Returns an error if one occurs. -func (c *FakeCiliumEnvoyConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(ciliumenvoyconfigsResource, c.ns, name, opts), &v2.CiliumEnvoyConfig{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumEnvoyConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(ciliumenvoyconfigsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v2.CiliumEnvoyConfigList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumEnvoyConfig. -func (c *FakeCiliumEnvoyConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEnvoyConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ciliumenvoyconfigsResource, c.ns, name, pt, data, subresources...), &v2.CiliumEnvoyConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumEnvoyConfig), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumexternalworkload.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumexternalworkload.go deleted file mode 100644 index e947be5f1cd..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumexternalworkload.go +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumExternalWorkloads implements CiliumExternalWorkloadInterface -type FakeCiliumExternalWorkloads struct { - Fake *FakeCiliumV2 -} - -var ciliumexternalworkloadsResource = v2.SchemeGroupVersion.WithResource("ciliumexternalworkloads") - -var ciliumexternalworkloadsKind = v2.SchemeGroupVersion.WithKind("CiliumExternalWorkload") - -// Get takes name of the ciliumExternalWorkload, and returns the corresponding ciliumExternalWorkload object, and an error if there is any. -func (c *FakeCiliumExternalWorkloads) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumExternalWorkload, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumexternalworkloadsResource, name), &v2.CiliumExternalWorkload{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumExternalWorkload), err -} - -// List takes label and field selectors, and returns the list of CiliumExternalWorkloads that match those selectors. -func (c *FakeCiliumExternalWorkloads) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumExternalWorkloadList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumexternalworkloadsResource, ciliumexternalworkloadsKind, opts), &v2.CiliumExternalWorkloadList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2.CiliumExternalWorkloadList{ListMeta: obj.(*v2.CiliumExternalWorkloadList).ListMeta} - for _, item := range obj.(*v2.CiliumExternalWorkloadList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumExternalWorkloads. -func (c *FakeCiliumExternalWorkloads) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumexternalworkloadsResource, opts)) -} - -// Create takes the representation of a ciliumExternalWorkload and creates it. Returns the server's representation of the ciliumExternalWorkload, and an error, if there is any. -func (c *FakeCiliumExternalWorkloads) Create(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.CreateOptions) (result *v2.CiliumExternalWorkload, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumexternalworkloadsResource, ciliumExternalWorkload), &v2.CiliumExternalWorkload{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumExternalWorkload), err -} - -// Update takes the representation of a ciliumExternalWorkload and updates it. Returns the server's representation of the ciliumExternalWorkload, and an error, if there is any. -func (c *FakeCiliumExternalWorkloads) Update(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.UpdateOptions) (result *v2.CiliumExternalWorkload, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumexternalworkloadsResource, ciliumExternalWorkload), &v2.CiliumExternalWorkload{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumExternalWorkload), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCiliumExternalWorkloads) UpdateStatus(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.UpdateOptions) (*v2.CiliumExternalWorkload, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(ciliumexternalworkloadsResource, "status", ciliumExternalWorkload), &v2.CiliumExternalWorkload{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumExternalWorkload), err -} - -// Delete takes name of the ciliumExternalWorkload and deletes it. Returns an error if one occurs. -func (c *FakeCiliumExternalWorkloads) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumexternalworkloadsResource, name, opts), &v2.CiliumExternalWorkload{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumExternalWorkloads) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumexternalworkloadsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2.CiliumExternalWorkloadList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumExternalWorkload. -func (c *FakeCiliumExternalWorkloads) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumExternalWorkload, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumexternalworkloadsResource, name, pt, data, subresources...), &v2.CiliumExternalWorkload{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumExternalWorkload), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumidentity.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumidentity.go deleted file mode 100644 index 745193c7d31..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumidentity.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumIdentities implements CiliumIdentityInterface -type FakeCiliumIdentities struct { - Fake *FakeCiliumV2 -} - -var ciliumidentitiesResource = v2.SchemeGroupVersion.WithResource("ciliumidentities") - -var ciliumidentitiesKind = v2.SchemeGroupVersion.WithKind("CiliumIdentity") - -// Get takes name of the ciliumIdentity, and returns the corresponding ciliumIdentity object, and an error if there is any. -func (c *FakeCiliumIdentities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumIdentity, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumidentitiesResource, name), &v2.CiliumIdentity{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumIdentity), err -} - -// List takes label and field selectors, and returns the list of CiliumIdentities that match those selectors. -func (c *FakeCiliumIdentities) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumIdentityList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumidentitiesResource, ciliumidentitiesKind, opts), &v2.CiliumIdentityList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2.CiliumIdentityList{ListMeta: obj.(*v2.CiliumIdentityList).ListMeta} - for _, item := range obj.(*v2.CiliumIdentityList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumIdentities. -func (c *FakeCiliumIdentities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumidentitiesResource, opts)) -} - -// Create takes the representation of a ciliumIdentity and creates it. Returns the server's representation of the ciliumIdentity, and an error, if there is any. -func (c *FakeCiliumIdentities) Create(ctx context.Context, ciliumIdentity *v2.CiliumIdentity, opts v1.CreateOptions) (result *v2.CiliumIdentity, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumidentitiesResource, ciliumIdentity), &v2.CiliumIdentity{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumIdentity), err -} - -// Update takes the representation of a ciliumIdentity and updates it. Returns the server's representation of the ciliumIdentity, and an error, if there is any. -func (c *FakeCiliumIdentities) Update(ctx context.Context, ciliumIdentity *v2.CiliumIdentity, opts v1.UpdateOptions) (result *v2.CiliumIdentity, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumidentitiesResource, ciliumIdentity), &v2.CiliumIdentity{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumIdentity), err -} - -// Delete takes name of the ciliumIdentity and deletes it. Returns an error if one occurs. -func (c *FakeCiliumIdentities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumidentitiesResource, name, opts), &v2.CiliumIdentity{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumIdentities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumidentitiesResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2.CiliumIdentityList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumIdentity. -func (c *FakeCiliumIdentities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumIdentity, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumidentitiesResource, name, pt, data, subresources...), &v2.CiliumIdentity{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumIdentity), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumlocalredirectpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumlocalredirectpolicy.go deleted file mode 100644 index 308309ee125..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumlocalredirectpolicy.go +++ /dev/null @@ -1,128 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumLocalRedirectPolicies implements CiliumLocalRedirectPolicyInterface -type FakeCiliumLocalRedirectPolicies struct { - Fake *FakeCiliumV2 - ns string -} - -var ciliumlocalredirectpoliciesResource = v2.SchemeGroupVersion.WithResource("ciliumlocalredirectpolicies") - -var ciliumlocalredirectpoliciesKind = v2.SchemeGroupVersion.WithKind("CiliumLocalRedirectPolicy") - -// Get takes name of the ciliumLocalRedirectPolicy, and returns the corresponding ciliumLocalRedirectPolicy object, and an error if there is any. -func (c *FakeCiliumLocalRedirectPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumLocalRedirectPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(ciliumlocalredirectpoliciesResource, c.ns, name), &v2.CiliumLocalRedirectPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumLocalRedirectPolicy), err -} - -// List takes label and field selectors, and returns the list of CiliumLocalRedirectPolicies that match those selectors. -func (c *FakeCiliumLocalRedirectPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumLocalRedirectPolicyList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(ciliumlocalredirectpoliciesResource, ciliumlocalredirectpoliciesKind, c.ns, opts), &v2.CiliumLocalRedirectPolicyList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2.CiliumLocalRedirectPolicyList{ListMeta: obj.(*v2.CiliumLocalRedirectPolicyList).ListMeta} - for _, item := range obj.(*v2.CiliumLocalRedirectPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumLocalRedirectPolicies. -func (c *FakeCiliumLocalRedirectPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(ciliumlocalredirectpoliciesResource, c.ns, opts)) - -} - -// Create takes the representation of a ciliumLocalRedirectPolicy and creates it. Returns the server's representation of the ciliumLocalRedirectPolicy, and an error, if there is any. -func (c *FakeCiliumLocalRedirectPolicies) Create(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.CreateOptions) (result *v2.CiliumLocalRedirectPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(ciliumlocalredirectpoliciesResource, c.ns, ciliumLocalRedirectPolicy), &v2.CiliumLocalRedirectPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumLocalRedirectPolicy), err -} - -// Update takes the representation of a ciliumLocalRedirectPolicy and updates it. Returns the server's representation of the ciliumLocalRedirectPolicy, and an error, if there is any. -func (c *FakeCiliumLocalRedirectPolicies) Update(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.UpdateOptions) (result *v2.CiliumLocalRedirectPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(ciliumlocalredirectpoliciesResource, c.ns, ciliumLocalRedirectPolicy), &v2.CiliumLocalRedirectPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumLocalRedirectPolicy), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCiliumLocalRedirectPolicies) UpdateStatus(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.UpdateOptions) (*v2.CiliumLocalRedirectPolicy, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(ciliumlocalredirectpoliciesResource, "status", c.ns, ciliumLocalRedirectPolicy), &v2.CiliumLocalRedirectPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumLocalRedirectPolicy), err -} - -// Delete takes name of the ciliumLocalRedirectPolicy and deletes it. Returns an error if one occurs. -func (c *FakeCiliumLocalRedirectPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(ciliumlocalredirectpoliciesResource, c.ns, name, opts), &v2.CiliumLocalRedirectPolicy{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumLocalRedirectPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(ciliumlocalredirectpoliciesResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v2.CiliumLocalRedirectPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumLocalRedirectPolicy. -func (c *FakeCiliumLocalRedirectPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumLocalRedirectPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ciliumlocalredirectpoliciesResource, c.ns, name, pt, data, subresources...), &v2.CiliumLocalRedirectPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumLocalRedirectPolicy), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnetworkpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnetworkpolicy.go deleted file mode 100644 index b40b9740e0e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnetworkpolicy.go +++ /dev/null @@ -1,128 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumNetworkPolicies implements CiliumNetworkPolicyInterface -type FakeCiliumNetworkPolicies struct { - Fake *FakeCiliumV2 - ns string -} - -var ciliumnetworkpoliciesResource = v2.SchemeGroupVersion.WithResource("ciliumnetworkpolicies") - -var ciliumnetworkpoliciesKind = v2.SchemeGroupVersion.WithKind("CiliumNetworkPolicy") - -// Get takes name of the ciliumNetworkPolicy, and returns the corresponding ciliumNetworkPolicy object, and an error if there is any. -func (c *FakeCiliumNetworkPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumNetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(ciliumnetworkpoliciesResource, c.ns, name), &v2.CiliumNetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumNetworkPolicy), err -} - -// List takes label and field selectors, and returns the list of CiliumNetworkPolicies that match those selectors. -func (c *FakeCiliumNetworkPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumNetworkPolicyList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(ciliumnetworkpoliciesResource, ciliumnetworkpoliciesKind, c.ns, opts), &v2.CiliumNetworkPolicyList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2.CiliumNetworkPolicyList{ListMeta: obj.(*v2.CiliumNetworkPolicyList).ListMeta} - for _, item := range obj.(*v2.CiliumNetworkPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumNetworkPolicies. -func (c *FakeCiliumNetworkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(ciliumnetworkpoliciesResource, c.ns, opts)) - -} - -// Create takes the representation of a ciliumNetworkPolicy and creates it. Returns the server's representation of the ciliumNetworkPolicy, and an error, if there is any. -func (c *FakeCiliumNetworkPolicies) Create(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.CreateOptions) (result *v2.CiliumNetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(ciliumnetworkpoliciesResource, c.ns, ciliumNetworkPolicy), &v2.CiliumNetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumNetworkPolicy), err -} - -// Update takes the representation of a ciliumNetworkPolicy and updates it. Returns the server's representation of the ciliumNetworkPolicy, and an error, if there is any. -func (c *FakeCiliumNetworkPolicies) Update(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.UpdateOptions) (result *v2.CiliumNetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(ciliumnetworkpoliciesResource, c.ns, ciliumNetworkPolicy), &v2.CiliumNetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumNetworkPolicy), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCiliumNetworkPolicies) UpdateStatus(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.UpdateOptions) (*v2.CiliumNetworkPolicy, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(ciliumnetworkpoliciesResource, "status", c.ns, ciliumNetworkPolicy), &v2.CiliumNetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumNetworkPolicy), err -} - -// Delete takes name of the ciliumNetworkPolicy and deletes it. Returns an error if one occurs. -func (c *FakeCiliumNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(ciliumnetworkpoliciesResource, c.ns, name, opts), &v2.CiliumNetworkPolicy{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumNetworkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(ciliumnetworkpoliciesResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v2.CiliumNetworkPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumNetworkPolicy. -func (c *FakeCiliumNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumNetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ciliumnetworkpoliciesResource, c.ns, name, pt, data, subresources...), &v2.CiliumNetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumNetworkPolicy), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnode.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnode.go deleted file mode 100644 index 73e91b1f957..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnode.go +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumNodes implements CiliumNodeInterface -type FakeCiliumNodes struct { - Fake *FakeCiliumV2 -} - -var ciliumnodesResource = v2.SchemeGroupVersion.WithResource("ciliumnodes") - -var ciliumnodesKind = v2.SchemeGroupVersion.WithKind("CiliumNode") - -// Get takes name of the ciliumNode, and returns the corresponding ciliumNode object, and an error if there is any. -func (c *FakeCiliumNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.CiliumNode, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumnodesResource, name), &v2.CiliumNode{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumNode), err -} - -// List takes label and field selectors, and returns the list of CiliumNodes that match those selectors. -func (c *FakeCiliumNodes) List(ctx context.Context, opts v1.ListOptions) (result *v2.CiliumNodeList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumnodesResource, ciliumnodesKind, opts), &v2.CiliumNodeList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2.CiliumNodeList{ListMeta: obj.(*v2.CiliumNodeList).ListMeta} - for _, item := range obj.(*v2.CiliumNodeList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumNodes. -func (c *FakeCiliumNodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumnodesResource, opts)) -} - -// Create takes the representation of a ciliumNode and creates it. Returns the server's representation of the ciliumNode, and an error, if there is any. -func (c *FakeCiliumNodes) Create(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.CreateOptions) (result *v2.CiliumNode, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumnodesResource, ciliumNode), &v2.CiliumNode{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumNode), err -} - -// Update takes the representation of a ciliumNode and updates it. Returns the server's representation of the ciliumNode, and an error, if there is any. -func (c *FakeCiliumNodes) Update(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.UpdateOptions) (result *v2.CiliumNode, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumnodesResource, ciliumNode), &v2.CiliumNode{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumNode), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCiliumNodes) UpdateStatus(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.UpdateOptions) (*v2.CiliumNode, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(ciliumnodesResource, "status", ciliumNode), &v2.CiliumNode{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumNode), err -} - -// Delete takes name of the ciliumNode and deletes it. Returns an error if one occurs. -func (c *FakeCiliumNodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumnodesResource, name, opts), &v2.CiliumNode{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumNodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumnodesResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2.CiliumNodeList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumNode. -func (c *FakeCiliumNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumNode, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumnodesResource, name, pt, data, subresources...), &v2.CiliumNode{}) - if obj == nil { - return nil, err - } - return obj.(*v2.CiliumNode), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/generated_expansion.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/generated_expansion.go deleted file mode 100644 index 15b434bacec..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/generated_expansion.go +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2 - -type CiliumClusterwideEnvoyConfigExpansion interface{} - -type CiliumClusterwideNetworkPolicyExpansion interface{} - -type CiliumEgressGatewayPolicyExpansion interface{} - -type CiliumEndpointExpansion interface{} - -type CiliumEnvoyConfigExpansion interface{} - -type CiliumExternalWorkloadExpansion interface{} - -type CiliumIdentityExpansion interface{} - -type CiliumLocalRedirectPolicyExpansion interface{} - -type CiliumNetworkPolicyExpansion interface{} - -type CiliumNodeExpansion interface{} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/cilium.io_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/cilium.io_client.go deleted file mode 100644 index a217d05b8e0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/cilium.io_client.go +++ /dev/null @@ -1,149 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "net/http" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type CiliumV2alpha1Interface interface { - RESTClient() rest.Interface - CiliumBGPAdvertisementsGetter - CiliumBGPClusterConfigsGetter - CiliumBGPNodeConfigsGetter - CiliumBGPNodeConfigOverridesGetter - CiliumBGPPeerConfigsGetter - CiliumBGPPeeringPoliciesGetter - CiliumCIDRGroupsGetter - CiliumEndpointSlicesGetter - CiliumL2AnnouncementPoliciesGetter - CiliumLoadBalancerIPPoolsGetter - CiliumNodeConfigsGetter - CiliumPodIPPoolsGetter -} - -// CiliumV2alpha1Client is used to interact with features provided by the cilium.io group. -type CiliumV2alpha1Client struct { - restClient rest.Interface -} - -func (c *CiliumV2alpha1Client) CiliumBGPAdvertisements() CiliumBGPAdvertisementInterface { - return newCiliumBGPAdvertisements(c) -} - -func (c *CiliumV2alpha1Client) CiliumBGPClusterConfigs() CiliumBGPClusterConfigInterface { - return newCiliumBGPClusterConfigs(c) -} - -func (c *CiliumV2alpha1Client) CiliumBGPNodeConfigs() CiliumBGPNodeConfigInterface { - return newCiliumBGPNodeConfigs(c) -} - -func (c *CiliumV2alpha1Client) CiliumBGPNodeConfigOverrides() CiliumBGPNodeConfigOverrideInterface { - return newCiliumBGPNodeConfigOverrides(c) -} - -func (c *CiliumV2alpha1Client) CiliumBGPPeerConfigs() CiliumBGPPeerConfigInterface { - return newCiliumBGPPeerConfigs(c) -} - -func (c *CiliumV2alpha1Client) CiliumBGPPeeringPolicies() CiliumBGPPeeringPolicyInterface { - return newCiliumBGPPeeringPolicies(c) -} - -func (c *CiliumV2alpha1Client) CiliumCIDRGroups() CiliumCIDRGroupInterface { - return newCiliumCIDRGroups(c) -} - -func (c *CiliumV2alpha1Client) CiliumEndpointSlices() CiliumEndpointSliceInterface { - return newCiliumEndpointSlices(c) -} - -func (c *CiliumV2alpha1Client) CiliumL2AnnouncementPolicies() CiliumL2AnnouncementPolicyInterface { - return newCiliumL2AnnouncementPolicies(c) -} - -func (c *CiliumV2alpha1Client) CiliumLoadBalancerIPPools() CiliumLoadBalancerIPPoolInterface { - return newCiliumLoadBalancerIPPools(c) -} - -func (c *CiliumV2alpha1Client) CiliumNodeConfigs(namespace string) CiliumNodeConfigInterface { - return newCiliumNodeConfigs(c, namespace) -} - -func (c *CiliumV2alpha1Client) CiliumPodIPPools() CiliumPodIPPoolInterface { - return newCiliumPodIPPools(c) -} - -// NewForConfig creates a new CiliumV2alpha1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*CiliumV2alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new CiliumV2alpha1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CiliumV2alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &CiliumV2alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new CiliumV2alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CiliumV2alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CiliumV2alpha1Client for the given RESTClient. -func New(c rest.Interface) *CiliumV2alpha1Client { - return &CiliumV2alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v2alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - 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 *CiliumV2alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpadvertisement.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpadvertisement.go deleted file mode 100644 index 3488a94706b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpadvertisement.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumBGPAdvertisementsGetter has a method to return a CiliumBGPAdvertisementInterface. -// A group's client should implement this interface. -type CiliumBGPAdvertisementsGetter interface { - CiliumBGPAdvertisements() CiliumBGPAdvertisementInterface -} - -// CiliumBGPAdvertisementInterface has methods to work with CiliumBGPAdvertisement resources. -type CiliumBGPAdvertisementInterface interface { - Create(ctx context.Context, ciliumBGPAdvertisement *v2alpha1.CiliumBGPAdvertisement, opts v1.CreateOptions) (*v2alpha1.CiliumBGPAdvertisement, error) - Update(ctx context.Context, ciliumBGPAdvertisement *v2alpha1.CiliumBGPAdvertisement, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPAdvertisement, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPAdvertisement, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPAdvertisementList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPAdvertisement, err error) - CiliumBGPAdvertisementExpansion -} - -// ciliumBGPAdvertisements implements CiliumBGPAdvertisementInterface -type ciliumBGPAdvertisements struct { - client rest.Interface -} - -// newCiliumBGPAdvertisements returns a CiliumBGPAdvertisements -func newCiliumBGPAdvertisements(c *CiliumV2alpha1Client) *ciliumBGPAdvertisements { - return &ciliumBGPAdvertisements{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumBGPAdvertisement, and returns the corresponding ciliumBGPAdvertisement object, and an error if there is any. -func (c *ciliumBGPAdvertisements) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPAdvertisement, err error) { - result = &v2alpha1.CiliumBGPAdvertisement{} - err = c.client.Get(). - Resource("ciliumbgpadvertisements"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumBGPAdvertisements that match those selectors. -func (c *ciliumBGPAdvertisements) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPAdvertisementList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumBGPAdvertisementList{} - err = c.client.Get(). - Resource("ciliumbgpadvertisements"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPAdvertisements. -func (c *ciliumBGPAdvertisements) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumbgpadvertisements"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumBGPAdvertisement and creates it. Returns the server's representation of the ciliumBGPAdvertisement, and an error, if there is any. -func (c *ciliumBGPAdvertisements) Create(ctx context.Context, ciliumBGPAdvertisement *v2alpha1.CiliumBGPAdvertisement, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPAdvertisement, err error) { - result = &v2alpha1.CiliumBGPAdvertisement{} - err = c.client.Post(). - Resource("ciliumbgpadvertisements"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPAdvertisement). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumBGPAdvertisement and updates it. Returns the server's representation of the ciliumBGPAdvertisement, and an error, if there is any. -func (c *ciliumBGPAdvertisements) Update(ctx context.Context, ciliumBGPAdvertisement *v2alpha1.CiliumBGPAdvertisement, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPAdvertisement, err error) { - result = &v2alpha1.CiliumBGPAdvertisement{} - err = c.client.Put(). - Resource("ciliumbgpadvertisements"). - Name(ciliumBGPAdvertisement.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPAdvertisement). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumBGPAdvertisement and deletes it. Returns an error if one occurs. -func (c *ciliumBGPAdvertisements) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumbgpadvertisements"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumBGPAdvertisements) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumbgpadvertisements"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumBGPAdvertisement. -func (c *ciliumBGPAdvertisements) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPAdvertisement, err error) { - result = &v2alpha1.CiliumBGPAdvertisement{} - err = c.client.Patch(pt). - Resource("ciliumbgpadvertisements"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpclusterconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpclusterconfig.go deleted file mode 100644 index b40c50f257d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpclusterconfig.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumBGPClusterConfigsGetter has a method to return a CiliumBGPClusterConfigInterface. -// A group's client should implement this interface. -type CiliumBGPClusterConfigsGetter interface { - CiliumBGPClusterConfigs() CiliumBGPClusterConfigInterface -} - -// CiliumBGPClusterConfigInterface has methods to work with CiliumBGPClusterConfig resources. -type CiliumBGPClusterConfigInterface interface { - Create(ctx context.Context, ciliumBGPClusterConfig *v2alpha1.CiliumBGPClusterConfig, opts v1.CreateOptions) (*v2alpha1.CiliumBGPClusterConfig, error) - Update(ctx context.Context, ciliumBGPClusterConfig *v2alpha1.CiliumBGPClusterConfig, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPClusterConfig, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPClusterConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPClusterConfigList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPClusterConfig, err error) - CiliumBGPClusterConfigExpansion -} - -// ciliumBGPClusterConfigs implements CiliumBGPClusterConfigInterface -type ciliumBGPClusterConfigs struct { - client rest.Interface -} - -// newCiliumBGPClusterConfigs returns a CiliumBGPClusterConfigs -func newCiliumBGPClusterConfigs(c *CiliumV2alpha1Client) *ciliumBGPClusterConfigs { - return &ciliumBGPClusterConfigs{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumBGPClusterConfig, and returns the corresponding ciliumBGPClusterConfig object, and an error if there is any. -func (c *ciliumBGPClusterConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPClusterConfig, err error) { - result = &v2alpha1.CiliumBGPClusterConfig{} - err = c.client.Get(). - Resource("ciliumbgpclusterconfigs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumBGPClusterConfigs that match those selectors. -func (c *ciliumBGPClusterConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPClusterConfigList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumBGPClusterConfigList{} - err = c.client.Get(). - Resource("ciliumbgpclusterconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPClusterConfigs. -func (c *ciliumBGPClusterConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumbgpclusterconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumBGPClusterConfig and creates it. Returns the server's representation of the ciliumBGPClusterConfig, and an error, if there is any. -func (c *ciliumBGPClusterConfigs) Create(ctx context.Context, ciliumBGPClusterConfig *v2alpha1.CiliumBGPClusterConfig, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPClusterConfig, err error) { - result = &v2alpha1.CiliumBGPClusterConfig{} - err = c.client.Post(). - Resource("ciliumbgpclusterconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPClusterConfig). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumBGPClusterConfig and updates it. Returns the server's representation of the ciliumBGPClusterConfig, and an error, if there is any. -func (c *ciliumBGPClusterConfigs) Update(ctx context.Context, ciliumBGPClusterConfig *v2alpha1.CiliumBGPClusterConfig, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPClusterConfig, err error) { - result = &v2alpha1.CiliumBGPClusterConfig{} - err = c.client.Put(). - Resource("ciliumbgpclusterconfigs"). - Name(ciliumBGPClusterConfig.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPClusterConfig). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumBGPClusterConfig and deletes it. Returns an error if one occurs. -func (c *ciliumBGPClusterConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumbgpclusterconfigs"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumBGPClusterConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumbgpclusterconfigs"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumBGPClusterConfig. -func (c *ciliumBGPClusterConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPClusterConfig, err error) { - result = &v2alpha1.CiliumBGPClusterConfig{} - err = c.client.Patch(pt). - Resource("ciliumbgpclusterconfigs"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfig.go deleted file mode 100644 index 005a60d6480..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfig.go +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumBGPNodeConfigsGetter has a method to return a CiliumBGPNodeConfigInterface. -// A group's client should implement this interface. -type CiliumBGPNodeConfigsGetter interface { - CiliumBGPNodeConfigs() CiliumBGPNodeConfigInterface -} - -// CiliumBGPNodeConfigInterface has methods to work with CiliumBGPNodeConfig resources. -type CiliumBGPNodeConfigInterface interface { - Create(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.CreateOptions) (*v2alpha1.CiliumBGPNodeConfig, error) - Update(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPNodeConfig, error) - UpdateStatus(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPNodeConfig, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPNodeConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPNodeConfigList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPNodeConfig, err error) - CiliumBGPNodeConfigExpansion -} - -// ciliumBGPNodeConfigs implements CiliumBGPNodeConfigInterface -type ciliumBGPNodeConfigs struct { - client rest.Interface -} - -// newCiliumBGPNodeConfigs returns a CiliumBGPNodeConfigs -func newCiliumBGPNodeConfigs(c *CiliumV2alpha1Client) *ciliumBGPNodeConfigs { - return &ciliumBGPNodeConfigs{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumBGPNodeConfig, and returns the corresponding ciliumBGPNodeConfig object, and an error if there is any. -func (c *ciliumBGPNodeConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPNodeConfig, err error) { - result = &v2alpha1.CiliumBGPNodeConfig{} - err = c.client.Get(). - Resource("ciliumbgpnodeconfigs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumBGPNodeConfigs that match those selectors. -func (c *ciliumBGPNodeConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPNodeConfigList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumBGPNodeConfigList{} - err = c.client.Get(). - Resource("ciliumbgpnodeconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPNodeConfigs. -func (c *ciliumBGPNodeConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumbgpnodeconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumBGPNodeConfig and creates it. Returns the server's representation of the ciliumBGPNodeConfig, and an error, if there is any. -func (c *ciliumBGPNodeConfigs) Create(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPNodeConfig, err error) { - result = &v2alpha1.CiliumBGPNodeConfig{} - err = c.client.Post(). - Resource("ciliumbgpnodeconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPNodeConfig). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumBGPNodeConfig and updates it. Returns the server's representation of the ciliumBGPNodeConfig, and an error, if there is any. -func (c *ciliumBGPNodeConfigs) Update(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPNodeConfig, err error) { - result = &v2alpha1.CiliumBGPNodeConfig{} - err = c.client.Put(). - Resource("ciliumbgpnodeconfigs"). - Name(ciliumBGPNodeConfig.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPNodeConfig). - Do(ctx). - 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 *ciliumBGPNodeConfigs) UpdateStatus(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPNodeConfig, err error) { - result = &v2alpha1.CiliumBGPNodeConfig{} - err = c.client.Put(). - Resource("ciliumbgpnodeconfigs"). - Name(ciliumBGPNodeConfig.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPNodeConfig). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumBGPNodeConfig and deletes it. Returns an error if one occurs. -func (c *ciliumBGPNodeConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumbgpnodeconfigs"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumBGPNodeConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumbgpnodeconfigs"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumBGPNodeConfig. -func (c *ciliumBGPNodeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPNodeConfig, err error) { - result = &v2alpha1.CiliumBGPNodeConfig{} - err = c.client.Patch(pt). - Resource("ciliumbgpnodeconfigs"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go deleted file mode 100644 index 6c2276fdeb1..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumBGPNodeConfigOverridesGetter has a method to return a CiliumBGPNodeConfigOverrideInterface. -// A group's client should implement this interface. -type CiliumBGPNodeConfigOverridesGetter interface { - CiliumBGPNodeConfigOverrides() CiliumBGPNodeConfigOverrideInterface -} - -// CiliumBGPNodeConfigOverrideInterface has methods to work with CiliumBGPNodeConfigOverride resources. -type CiliumBGPNodeConfigOverrideInterface interface { - Create(ctx context.Context, ciliumBGPNodeConfigOverride *v2alpha1.CiliumBGPNodeConfigOverride, opts v1.CreateOptions) (*v2alpha1.CiliumBGPNodeConfigOverride, error) - Update(ctx context.Context, ciliumBGPNodeConfigOverride *v2alpha1.CiliumBGPNodeConfigOverride, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPNodeConfigOverride, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPNodeConfigOverride, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPNodeConfigOverrideList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPNodeConfigOverride, err error) - CiliumBGPNodeConfigOverrideExpansion -} - -// ciliumBGPNodeConfigOverrides implements CiliumBGPNodeConfigOverrideInterface -type ciliumBGPNodeConfigOverrides struct { - client rest.Interface -} - -// newCiliumBGPNodeConfigOverrides returns a CiliumBGPNodeConfigOverrides -func newCiliumBGPNodeConfigOverrides(c *CiliumV2alpha1Client) *ciliumBGPNodeConfigOverrides { - return &ciliumBGPNodeConfigOverrides{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumBGPNodeConfigOverride, and returns the corresponding ciliumBGPNodeConfigOverride object, and an error if there is any. -func (c *ciliumBGPNodeConfigOverrides) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPNodeConfigOverride, err error) { - result = &v2alpha1.CiliumBGPNodeConfigOverride{} - err = c.client.Get(). - Resource("ciliumbgpnodeconfigoverrides"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumBGPNodeConfigOverrides that match those selectors. -func (c *ciliumBGPNodeConfigOverrides) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPNodeConfigOverrideList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumBGPNodeConfigOverrideList{} - err = c.client.Get(). - Resource("ciliumbgpnodeconfigoverrides"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPNodeConfigOverrides. -func (c *ciliumBGPNodeConfigOverrides) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumbgpnodeconfigoverrides"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumBGPNodeConfigOverride and creates it. Returns the server's representation of the ciliumBGPNodeConfigOverride, and an error, if there is any. -func (c *ciliumBGPNodeConfigOverrides) Create(ctx context.Context, ciliumBGPNodeConfigOverride *v2alpha1.CiliumBGPNodeConfigOverride, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPNodeConfigOverride, err error) { - result = &v2alpha1.CiliumBGPNodeConfigOverride{} - err = c.client.Post(). - Resource("ciliumbgpnodeconfigoverrides"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPNodeConfigOverride). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumBGPNodeConfigOverride and updates it. Returns the server's representation of the ciliumBGPNodeConfigOverride, and an error, if there is any. -func (c *ciliumBGPNodeConfigOverrides) Update(ctx context.Context, ciliumBGPNodeConfigOverride *v2alpha1.CiliumBGPNodeConfigOverride, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPNodeConfigOverride, err error) { - result = &v2alpha1.CiliumBGPNodeConfigOverride{} - err = c.client.Put(). - Resource("ciliumbgpnodeconfigoverrides"). - Name(ciliumBGPNodeConfigOverride.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPNodeConfigOverride). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumBGPNodeConfigOverride and deletes it. Returns an error if one occurs. -func (c *ciliumBGPNodeConfigOverrides) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumbgpnodeconfigoverrides"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumBGPNodeConfigOverrides) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumbgpnodeconfigoverrides"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumBGPNodeConfigOverride. -func (c *ciliumBGPNodeConfigOverrides) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPNodeConfigOverride, err error) { - result = &v2alpha1.CiliumBGPNodeConfigOverride{} - err = c.client.Patch(pt). - Resource("ciliumbgpnodeconfigoverrides"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeerconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeerconfig.go deleted file mode 100644 index da991526712..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeerconfig.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumBGPPeerConfigsGetter has a method to return a CiliumBGPPeerConfigInterface. -// A group's client should implement this interface. -type CiliumBGPPeerConfigsGetter interface { - CiliumBGPPeerConfigs() CiliumBGPPeerConfigInterface -} - -// CiliumBGPPeerConfigInterface has methods to work with CiliumBGPPeerConfig resources. -type CiliumBGPPeerConfigInterface interface { - Create(ctx context.Context, ciliumBGPPeerConfig *v2alpha1.CiliumBGPPeerConfig, opts v1.CreateOptions) (*v2alpha1.CiliumBGPPeerConfig, error) - Update(ctx context.Context, ciliumBGPPeerConfig *v2alpha1.CiliumBGPPeerConfig, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPPeerConfig, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPPeerConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPPeerConfigList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPPeerConfig, err error) - CiliumBGPPeerConfigExpansion -} - -// ciliumBGPPeerConfigs implements CiliumBGPPeerConfigInterface -type ciliumBGPPeerConfigs struct { - client rest.Interface -} - -// newCiliumBGPPeerConfigs returns a CiliumBGPPeerConfigs -func newCiliumBGPPeerConfigs(c *CiliumV2alpha1Client) *ciliumBGPPeerConfigs { - return &ciliumBGPPeerConfigs{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumBGPPeerConfig, and returns the corresponding ciliumBGPPeerConfig object, and an error if there is any. -func (c *ciliumBGPPeerConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPPeerConfig, err error) { - result = &v2alpha1.CiliumBGPPeerConfig{} - err = c.client.Get(). - Resource("ciliumbgppeerconfigs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumBGPPeerConfigs that match those selectors. -func (c *ciliumBGPPeerConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPPeerConfigList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumBGPPeerConfigList{} - err = c.client.Get(). - Resource("ciliumbgppeerconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPPeerConfigs. -func (c *ciliumBGPPeerConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumbgppeerconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumBGPPeerConfig and creates it. Returns the server's representation of the ciliumBGPPeerConfig, and an error, if there is any. -func (c *ciliumBGPPeerConfigs) Create(ctx context.Context, ciliumBGPPeerConfig *v2alpha1.CiliumBGPPeerConfig, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPPeerConfig, err error) { - result = &v2alpha1.CiliumBGPPeerConfig{} - err = c.client.Post(). - Resource("ciliumbgppeerconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPPeerConfig). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumBGPPeerConfig and updates it. Returns the server's representation of the ciliumBGPPeerConfig, and an error, if there is any. -func (c *ciliumBGPPeerConfigs) Update(ctx context.Context, ciliumBGPPeerConfig *v2alpha1.CiliumBGPPeerConfig, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPPeerConfig, err error) { - result = &v2alpha1.CiliumBGPPeerConfig{} - err = c.client.Put(). - Resource("ciliumbgppeerconfigs"). - Name(ciliumBGPPeerConfig.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPPeerConfig). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumBGPPeerConfig and deletes it. Returns an error if one occurs. -func (c *ciliumBGPPeerConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumbgppeerconfigs"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumBGPPeerConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumbgppeerconfigs"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumBGPPeerConfig. -func (c *ciliumBGPPeerConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPPeerConfig, err error) { - result = &v2alpha1.CiliumBGPPeerConfig{} - err = c.client.Patch(pt). - Resource("ciliumbgppeerconfigs"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go deleted file mode 100644 index e19727c07ae..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumBGPPeeringPoliciesGetter has a method to return a CiliumBGPPeeringPolicyInterface. -// A group's client should implement this interface. -type CiliumBGPPeeringPoliciesGetter interface { - CiliumBGPPeeringPolicies() CiliumBGPPeeringPolicyInterface -} - -// CiliumBGPPeeringPolicyInterface has methods to work with CiliumBGPPeeringPolicy resources. -type CiliumBGPPeeringPolicyInterface interface { - Create(ctx context.Context, ciliumBGPPeeringPolicy *v2alpha1.CiliumBGPPeeringPolicy, opts v1.CreateOptions) (*v2alpha1.CiliumBGPPeeringPolicy, error) - Update(ctx context.Context, ciliumBGPPeeringPolicy *v2alpha1.CiliumBGPPeeringPolicy, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPPeeringPolicy, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPPeeringPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPPeeringPolicyList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPPeeringPolicy, err error) - CiliumBGPPeeringPolicyExpansion -} - -// ciliumBGPPeeringPolicies implements CiliumBGPPeeringPolicyInterface -type ciliumBGPPeeringPolicies struct { - client rest.Interface -} - -// newCiliumBGPPeeringPolicies returns a CiliumBGPPeeringPolicies -func newCiliumBGPPeeringPolicies(c *CiliumV2alpha1Client) *ciliumBGPPeeringPolicies { - return &ciliumBGPPeeringPolicies{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumBGPPeeringPolicy, and returns the corresponding ciliumBGPPeeringPolicy object, and an error if there is any. -func (c *ciliumBGPPeeringPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPPeeringPolicy, err error) { - result = &v2alpha1.CiliumBGPPeeringPolicy{} - err = c.client.Get(). - Resource("ciliumbgppeeringpolicies"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumBGPPeeringPolicies that match those selectors. -func (c *ciliumBGPPeeringPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPPeeringPolicyList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumBGPPeeringPolicyList{} - err = c.client.Get(). - Resource("ciliumbgppeeringpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPPeeringPolicies. -func (c *ciliumBGPPeeringPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumbgppeeringpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumBGPPeeringPolicy and creates it. Returns the server's representation of the ciliumBGPPeeringPolicy, and an error, if there is any. -func (c *ciliumBGPPeeringPolicies) Create(ctx context.Context, ciliumBGPPeeringPolicy *v2alpha1.CiliumBGPPeeringPolicy, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPPeeringPolicy, err error) { - result = &v2alpha1.CiliumBGPPeeringPolicy{} - err = c.client.Post(). - Resource("ciliumbgppeeringpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPPeeringPolicy). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumBGPPeeringPolicy and updates it. Returns the server's representation of the ciliumBGPPeeringPolicy, and an error, if there is any. -func (c *ciliumBGPPeeringPolicies) Update(ctx context.Context, ciliumBGPPeeringPolicy *v2alpha1.CiliumBGPPeeringPolicy, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPPeeringPolicy, err error) { - result = &v2alpha1.CiliumBGPPeeringPolicy{} - err = c.client.Put(). - Resource("ciliumbgppeeringpolicies"). - Name(ciliumBGPPeeringPolicy.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumBGPPeeringPolicy). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumBGPPeeringPolicy and deletes it. Returns an error if one occurs. -func (c *ciliumBGPPeeringPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumbgppeeringpolicies"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumBGPPeeringPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumbgppeeringpolicies"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumBGPPeeringPolicy. -func (c *ciliumBGPPeeringPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPPeeringPolicy, err error) { - result = &v2alpha1.CiliumBGPPeeringPolicy{} - err = c.client.Patch(pt). - Resource("ciliumbgppeeringpolicies"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumcidrgroup.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumcidrgroup.go deleted file mode 100644 index 42f93365bb8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumcidrgroup.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumCIDRGroupsGetter has a method to return a CiliumCIDRGroupInterface. -// A group's client should implement this interface. -type CiliumCIDRGroupsGetter interface { - CiliumCIDRGroups() CiliumCIDRGroupInterface -} - -// CiliumCIDRGroupInterface has methods to work with CiliumCIDRGroup resources. -type CiliumCIDRGroupInterface interface { - Create(ctx context.Context, ciliumCIDRGroup *v2alpha1.CiliumCIDRGroup, opts v1.CreateOptions) (*v2alpha1.CiliumCIDRGroup, error) - Update(ctx context.Context, ciliumCIDRGroup *v2alpha1.CiliumCIDRGroup, opts v1.UpdateOptions) (*v2alpha1.CiliumCIDRGroup, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumCIDRGroup, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumCIDRGroupList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumCIDRGroup, err error) - CiliumCIDRGroupExpansion -} - -// ciliumCIDRGroups implements CiliumCIDRGroupInterface -type ciliumCIDRGroups struct { - client rest.Interface -} - -// newCiliumCIDRGroups returns a CiliumCIDRGroups -func newCiliumCIDRGroups(c *CiliumV2alpha1Client) *ciliumCIDRGroups { - return &ciliumCIDRGroups{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumCIDRGroup, and returns the corresponding ciliumCIDRGroup object, and an error if there is any. -func (c *ciliumCIDRGroups) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumCIDRGroup, err error) { - result = &v2alpha1.CiliumCIDRGroup{} - err = c.client.Get(). - Resource("ciliumcidrgroups"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumCIDRGroups that match those selectors. -func (c *ciliumCIDRGroups) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumCIDRGroupList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumCIDRGroupList{} - err = c.client.Get(). - Resource("ciliumcidrgroups"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumCIDRGroups. -func (c *ciliumCIDRGroups) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumcidrgroups"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumCIDRGroup and creates it. Returns the server's representation of the ciliumCIDRGroup, and an error, if there is any. -func (c *ciliumCIDRGroups) Create(ctx context.Context, ciliumCIDRGroup *v2alpha1.CiliumCIDRGroup, opts v1.CreateOptions) (result *v2alpha1.CiliumCIDRGroup, err error) { - result = &v2alpha1.CiliumCIDRGroup{} - err = c.client.Post(). - Resource("ciliumcidrgroups"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumCIDRGroup). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumCIDRGroup and updates it. Returns the server's representation of the ciliumCIDRGroup, and an error, if there is any. -func (c *ciliumCIDRGroups) Update(ctx context.Context, ciliumCIDRGroup *v2alpha1.CiliumCIDRGroup, opts v1.UpdateOptions) (result *v2alpha1.CiliumCIDRGroup, err error) { - result = &v2alpha1.CiliumCIDRGroup{} - err = c.client.Put(). - Resource("ciliumcidrgroups"). - Name(ciliumCIDRGroup.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumCIDRGroup). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumCIDRGroup and deletes it. Returns an error if one occurs. -func (c *ciliumCIDRGroups) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumcidrgroups"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumCIDRGroups) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumcidrgroups"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumCIDRGroup. -func (c *ciliumCIDRGroups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumCIDRGroup, err error) { - result = &v2alpha1.CiliumCIDRGroup{} - err = c.client.Patch(pt). - Resource("ciliumcidrgroups"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumendpointslice.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumendpointslice.go deleted file mode 100644 index 55cdaf11b67..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumendpointslice.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumEndpointSlicesGetter has a method to return a CiliumEndpointSliceInterface. -// A group's client should implement this interface. -type CiliumEndpointSlicesGetter interface { - CiliumEndpointSlices() CiliumEndpointSliceInterface -} - -// CiliumEndpointSliceInterface has methods to work with CiliumEndpointSlice resources. -type CiliumEndpointSliceInterface interface { - Create(ctx context.Context, ciliumEndpointSlice *v2alpha1.CiliumEndpointSlice, opts v1.CreateOptions) (*v2alpha1.CiliumEndpointSlice, error) - Update(ctx context.Context, ciliumEndpointSlice *v2alpha1.CiliumEndpointSlice, opts v1.UpdateOptions) (*v2alpha1.CiliumEndpointSlice, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumEndpointSlice, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumEndpointSliceList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumEndpointSlice, err error) - CiliumEndpointSliceExpansion -} - -// ciliumEndpointSlices implements CiliumEndpointSliceInterface -type ciliumEndpointSlices struct { - client rest.Interface -} - -// newCiliumEndpointSlices returns a CiliumEndpointSlices -func newCiliumEndpointSlices(c *CiliumV2alpha1Client) *ciliumEndpointSlices { - return &ciliumEndpointSlices{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumEndpointSlice, and returns the corresponding ciliumEndpointSlice object, and an error if there is any. -func (c *ciliumEndpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumEndpointSlice, err error) { - result = &v2alpha1.CiliumEndpointSlice{} - err = c.client.Get(). - Resource("ciliumendpointslices"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumEndpointSlices that match those selectors. -func (c *ciliumEndpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumEndpointSliceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumEndpointSliceList{} - err = c.client.Get(). - Resource("ciliumendpointslices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumEndpointSlices. -func (c *ciliumEndpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumendpointslices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumEndpointSlice and creates it. Returns the server's representation of the ciliumEndpointSlice, and an error, if there is any. -func (c *ciliumEndpointSlices) Create(ctx context.Context, ciliumEndpointSlice *v2alpha1.CiliumEndpointSlice, opts v1.CreateOptions) (result *v2alpha1.CiliumEndpointSlice, err error) { - result = &v2alpha1.CiliumEndpointSlice{} - err = c.client.Post(). - Resource("ciliumendpointslices"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumEndpointSlice). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumEndpointSlice and updates it. Returns the server's representation of the ciliumEndpointSlice, and an error, if there is any. -func (c *ciliumEndpointSlices) Update(ctx context.Context, ciliumEndpointSlice *v2alpha1.CiliumEndpointSlice, opts v1.UpdateOptions) (result *v2alpha1.CiliumEndpointSlice, err error) { - result = &v2alpha1.CiliumEndpointSlice{} - err = c.client.Put(). - Resource("ciliumendpointslices"). - Name(ciliumEndpointSlice.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumEndpointSlice). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumEndpointSlice and deletes it. Returns an error if one occurs. -func (c *ciliumEndpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumendpointslices"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumEndpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumendpointslices"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumEndpointSlice. -func (c *ciliumEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumEndpointSlice, err error) { - result = &v2alpha1.CiliumEndpointSlice{} - err = c.client.Patch(pt). - Resource("ciliumendpointslices"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliuml2announcementpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliuml2announcementpolicy.go deleted file mode 100644 index bed50df467c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliuml2announcementpolicy.go +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumL2AnnouncementPoliciesGetter has a method to return a CiliumL2AnnouncementPolicyInterface. -// A group's client should implement this interface. -type CiliumL2AnnouncementPoliciesGetter interface { - CiliumL2AnnouncementPolicies() CiliumL2AnnouncementPolicyInterface -} - -// CiliumL2AnnouncementPolicyInterface has methods to work with CiliumL2AnnouncementPolicy resources. -type CiliumL2AnnouncementPolicyInterface interface { - Create(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.CreateOptions) (*v2alpha1.CiliumL2AnnouncementPolicy, error) - Update(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.UpdateOptions) (*v2alpha1.CiliumL2AnnouncementPolicy, error) - UpdateStatus(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.UpdateOptions) (*v2alpha1.CiliumL2AnnouncementPolicy, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumL2AnnouncementPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumL2AnnouncementPolicyList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumL2AnnouncementPolicy, err error) - CiliumL2AnnouncementPolicyExpansion -} - -// ciliumL2AnnouncementPolicies implements CiliumL2AnnouncementPolicyInterface -type ciliumL2AnnouncementPolicies struct { - client rest.Interface -} - -// newCiliumL2AnnouncementPolicies returns a CiliumL2AnnouncementPolicies -func newCiliumL2AnnouncementPolicies(c *CiliumV2alpha1Client) *ciliumL2AnnouncementPolicies { - return &ciliumL2AnnouncementPolicies{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumL2AnnouncementPolicy, and returns the corresponding ciliumL2AnnouncementPolicy object, and an error if there is any. -func (c *ciliumL2AnnouncementPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumL2AnnouncementPolicy, err error) { - result = &v2alpha1.CiliumL2AnnouncementPolicy{} - err = c.client.Get(). - Resource("ciliuml2announcementpolicies"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumL2AnnouncementPolicies that match those selectors. -func (c *ciliumL2AnnouncementPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumL2AnnouncementPolicyList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumL2AnnouncementPolicyList{} - err = c.client.Get(). - Resource("ciliuml2announcementpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumL2AnnouncementPolicies. -func (c *ciliumL2AnnouncementPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliuml2announcementpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumL2AnnouncementPolicy and creates it. Returns the server's representation of the ciliumL2AnnouncementPolicy, and an error, if there is any. -func (c *ciliumL2AnnouncementPolicies) Create(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.CreateOptions) (result *v2alpha1.CiliumL2AnnouncementPolicy, err error) { - result = &v2alpha1.CiliumL2AnnouncementPolicy{} - err = c.client.Post(). - Resource("ciliuml2announcementpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumL2AnnouncementPolicy). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumL2AnnouncementPolicy and updates it. Returns the server's representation of the ciliumL2AnnouncementPolicy, and an error, if there is any. -func (c *ciliumL2AnnouncementPolicies) Update(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.UpdateOptions) (result *v2alpha1.CiliumL2AnnouncementPolicy, err error) { - result = &v2alpha1.CiliumL2AnnouncementPolicy{} - err = c.client.Put(). - Resource("ciliuml2announcementpolicies"). - Name(ciliumL2AnnouncementPolicy.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumL2AnnouncementPolicy). - Do(ctx). - 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 *ciliumL2AnnouncementPolicies) UpdateStatus(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.UpdateOptions) (result *v2alpha1.CiliumL2AnnouncementPolicy, err error) { - result = &v2alpha1.CiliumL2AnnouncementPolicy{} - err = c.client.Put(). - Resource("ciliuml2announcementpolicies"). - Name(ciliumL2AnnouncementPolicy.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumL2AnnouncementPolicy). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumL2AnnouncementPolicy and deletes it. Returns an error if one occurs. -func (c *ciliumL2AnnouncementPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliuml2announcementpolicies"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumL2AnnouncementPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliuml2announcementpolicies"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumL2AnnouncementPolicy. -func (c *ciliumL2AnnouncementPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumL2AnnouncementPolicy, err error) { - result = &v2alpha1.CiliumL2AnnouncementPolicy{} - err = c.client.Patch(pt). - Resource("ciliuml2announcementpolicies"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumloadbalancerippool.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumloadbalancerippool.go deleted file mode 100644 index bdc76f4a5aa..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumloadbalancerippool.go +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumLoadBalancerIPPoolsGetter has a method to return a CiliumLoadBalancerIPPoolInterface. -// A group's client should implement this interface. -type CiliumLoadBalancerIPPoolsGetter interface { - CiliumLoadBalancerIPPools() CiliumLoadBalancerIPPoolInterface -} - -// CiliumLoadBalancerIPPoolInterface has methods to work with CiliumLoadBalancerIPPool resources. -type CiliumLoadBalancerIPPoolInterface interface { - Create(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.CreateOptions) (*v2alpha1.CiliumLoadBalancerIPPool, error) - Update(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.UpdateOptions) (*v2alpha1.CiliumLoadBalancerIPPool, error) - UpdateStatus(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.UpdateOptions) (*v2alpha1.CiliumLoadBalancerIPPool, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumLoadBalancerIPPool, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumLoadBalancerIPPoolList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumLoadBalancerIPPool, err error) - CiliumLoadBalancerIPPoolExpansion -} - -// ciliumLoadBalancerIPPools implements CiliumLoadBalancerIPPoolInterface -type ciliumLoadBalancerIPPools struct { - client rest.Interface -} - -// newCiliumLoadBalancerIPPools returns a CiliumLoadBalancerIPPools -func newCiliumLoadBalancerIPPools(c *CiliumV2alpha1Client) *ciliumLoadBalancerIPPools { - return &ciliumLoadBalancerIPPools{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumLoadBalancerIPPool, and returns the corresponding ciliumLoadBalancerIPPool object, and an error if there is any. -func (c *ciliumLoadBalancerIPPools) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumLoadBalancerIPPool, err error) { - result = &v2alpha1.CiliumLoadBalancerIPPool{} - err = c.client.Get(). - Resource("ciliumloadbalancerippools"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumLoadBalancerIPPools that match those selectors. -func (c *ciliumLoadBalancerIPPools) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumLoadBalancerIPPoolList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumLoadBalancerIPPoolList{} - err = c.client.Get(). - Resource("ciliumloadbalancerippools"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumLoadBalancerIPPools. -func (c *ciliumLoadBalancerIPPools) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumloadbalancerippools"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumLoadBalancerIPPool and creates it. Returns the server's representation of the ciliumLoadBalancerIPPool, and an error, if there is any. -func (c *ciliumLoadBalancerIPPools) Create(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.CreateOptions) (result *v2alpha1.CiliumLoadBalancerIPPool, err error) { - result = &v2alpha1.CiliumLoadBalancerIPPool{} - err = c.client.Post(). - Resource("ciliumloadbalancerippools"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumLoadBalancerIPPool). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumLoadBalancerIPPool and updates it. Returns the server's representation of the ciliumLoadBalancerIPPool, and an error, if there is any. -func (c *ciliumLoadBalancerIPPools) Update(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.UpdateOptions) (result *v2alpha1.CiliumLoadBalancerIPPool, err error) { - result = &v2alpha1.CiliumLoadBalancerIPPool{} - err = c.client.Put(). - Resource("ciliumloadbalancerippools"). - Name(ciliumLoadBalancerIPPool.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumLoadBalancerIPPool). - Do(ctx). - 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 *ciliumLoadBalancerIPPools) UpdateStatus(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.UpdateOptions) (result *v2alpha1.CiliumLoadBalancerIPPool, err error) { - result = &v2alpha1.CiliumLoadBalancerIPPool{} - err = c.client.Put(). - Resource("ciliumloadbalancerippools"). - Name(ciliumLoadBalancerIPPool.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumLoadBalancerIPPool). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumLoadBalancerIPPool and deletes it. Returns an error if one occurs. -func (c *ciliumLoadBalancerIPPools) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumloadbalancerippools"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumLoadBalancerIPPools) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumloadbalancerippools"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumLoadBalancerIPPool. -func (c *ciliumLoadBalancerIPPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumLoadBalancerIPPool, err error) { - result = &v2alpha1.CiliumLoadBalancerIPPool{} - err = c.client.Patch(pt). - Resource("ciliumloadbalancerippools"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumnodeconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumnodeconfig.go deleted file mode 100644 index bff4996a030..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumnodeconfig.go +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumNodeConfigsGetter has a method to return a CiliumNodeConfigInterface. -// A group's client should implement this interface. -type CiliumNodeConfigsGetter interface { - CiliumNodeConfigs(namespace string) CiliumNodeConfigInterface -} - -// CiliumNodeConfigInterface has methods to work with CiliumNodeConfig resources. -type CiliumNodeConfigInterface interface { - Create(ctx context.Context, ciliumNodeConfig *v2alpha1.CiliumNodeConfig, opts v1.CreateOptions) (*v2alpha1.CiliumNodeConfig, error) - Update(ctx context.Context, ciliumNodeConfig *v2alpha1.CiliumNodeConfig, opts v1.UpdateOptions) (*v2alpha1.CiliumNodeConfig, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumNodeConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumNodeConfigList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumNodeConfig, err error) - CiliumNodeConfigExpansion -} - -// ciliumNodeConfigs implements CiliumNodeConfigInterface -type ciliumNodeConfigs struct { - client rest.Interface - ns string -} - -// newCiliumNodeConfigs returns a CiliumNodeConfigs -func newCiliumNodeConfigs(c *CiliumV2alpha1Client, namespace string) *ciliumNodeConfigs { - return &ciliumNodeConfigs{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the ciliumNodeConfig, and returns the corresponding ciliumNodeConfig object, and an error if there is any. -func (c *ciliumNodeConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumNodeConfig, err error) { - result = &v2alpha1.CiliumNodeConfig{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ciliumnodeconfigs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumNodeConfigs that match those selectors. -func (c *ciliumNodeConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumNodeConfigList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumNodeConfigList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("ciliumnodeconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumNodeConfigs. -func (c *ciliumNodeConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("ciliumnodeconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumNodeConfig and creates it. Returns the server's representation of the ciliumNodeConfig, and an error, if there is any. -func (c *ciliumNodeConfigs) Create(ctx context.Context, ciliumNodeConfig *v2alpha1.CiliumNodeConfig, opts v1.CreateOptions) (result *v2alpha1.CiliumNodeConfig, err error) { - result = &v2alpha1.CiliumNodeConfig{} - err = c.client.Post(). - Namespace(c.ns). - Resource("ciliumnodeconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumNodeConfig). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumNodeConfig and updates it. Returns the server's representation of the ciliumNodeConfig, and an error, if there is any. -func (c *ciliumNodeConfigs) Update(ctx context.Context, ciliumNodeConfig *v2alpha1.CiliumNodeConfig, opts v1.UpdateOptions) (result *v2alpha1.CiliumNodeConfig, err error) { - result = &v2alpha1.CiliumNodeConfig{} - err = c.client.Put(). - Namespace(c.ns). - Resource("ciliumnodeconfigs"). - Name(ciliumNodeConfig.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumNodeConfig). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumNodeConfig and deletes it. Returns an error if one occurs. -func (c *ciliumNodeConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("ciliumnodeconfigs"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumNodeConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("ciliumnodeconfigs"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumNodeConfig. -func (c *ciliumNodeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumNodeConfig, err error) { - result = &v2alpha1.CiliumNodeConfig{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("ciliumnodeconfigs"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumpodippool.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumpodippool.go deleted file mode 100644 index 024442952b6..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumpodippool.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -import ( - "context" - "time" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CiliumPodIPPoolsGetter has a method to return a CiliumPodIPPoolInterface. -// A group's client should implement this interface. -type CiliumPodIPPoolsGetter interface { - CiliumPodIPPools() CiliumPodIPPoolInterface -} - -// CiliumPodIPPoolInterface has methods to work with CiliumPodIPPool resources. -type CiliumPodIPPoolInterface interface { - Create(ctx context.Context, ciliumPodIPPool *v2alpha1.CiliumPodIPPool, opts v1.CreateOptions) (*v2alpha1.CiliumPodIPPool, error) - Update(ctx context.Context, ciliumPodIPPool *v2alpha1.CiliumPodIPPool, opts v1.UpdateOptions) (*v2alpha1.CiliumPodIPPool, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumPodIPPool, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumPodIPPoolList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumPodIPPool, err error) - CiliumPodIPPoolExpansion -} - -// ciliumPodIPPools implements CiliumPodIPPoolInterface -type ciliumPodIPPools struct { - client rest.Interface -} - -// newCiliumPodIPPools returns a CiliumPodIPPools -func newCiliumPodIPPools(c *CiliumV2alpha1Client) *ciliumPodIPPools { - return &ciliumPodIPPools{ - client: c.RESTClient(), - } -} - -// Get takes name of the ciliumPodIPPool, and returns the corresponding ciliumPodIPPool object, and an error if there is any. -func (c *ciliumPodIPPools) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumPodIPPool, err error) { - result = &v2alpha1.CiliumPodIPPool{} - err = c.client.Get(). - Resource("ciliumpodippools"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CiliumPodIPPools that match those selectors. -func (c *ciliumPodIPPools) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumPodIPPoolList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v2alpha1.CiliumPodIPPoolList{} - err = c.client.Get(). - Resource("ciliumpodippools"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested ciliumPodIPPools. -func (c *ciliumPodIPPools) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("ciliumpodippools"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a ciliumPodIPPool and creates it. Returns the server's representation of the ciliumPodIPPool, and an error, if there is any. -func (c *ciliumPodIPPools) Create(ctx context.Context, ciliumPodIPPool *v2alpha1.CiliumPodIPPool, opts v1.CreateOptions) (result *v2alpha1.CiliumPodIPPool, err error) { - result = &v2alpha1.CiliumPodIPPool{} - err = c.client.Post(). - Resource("ciliumpodippools"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumPodIPPool). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a ciliumPodIPPool and updates it. Returns the server's representation of the ciliumPodIPPool, and an error, if there is any. -func (c *ciliumPodIPPools) Update(ctx context.Context, ciliumPodIPPool *v2alpha1.CiliumPodIPPool, opts v1.UpdateOptions) (result *v2alpha1.CiliumPodIPPool, err error) { - result = &v2alpha1.CiliumPodIPPool{} - err = c.client.Put(). - Resource("ciliumpodippools"). - Name(ciliumPodIPPool.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(ciliumPodIPPool). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the ciliumPodIPPool and deletes it. Returns an error if one occurs. -func (c *ciliumPodIPPools) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("ciliumpodippools"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *ciliumPodIPPools) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("ciliumpodippools"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched ciliumPodIPPool. -func (c *ciliumPodIPPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumPodIPPool, err error) { - result = &v2alpha1.CiliumPodIPPool{} - err = c.client.Patch(pt). - Resource("ciliumpodippools"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/doc.go deleted file mode 100644 index 0caa68e33ee..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v2alpha1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/doc.go deleted file mode 100644 index 57bd090efb0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_cilium.io_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_cilium.io_client.go deleted file mode 100644 index a1c62d0ecdd..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_cilium.io_client.go +++ /dev/null @@ -1,71 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeCiliumV2alpha1 struct { - *testing.Fake -} - -func (c *FakeCiliumV2alpha1) CiliumBGPAdvertisements() v2alpha1.CiliumBGPAdvertisementInterface { - return &FakeCiliumBGPAdvertisements{c} -} - -func (c *FakeCiliumV2alpha1) CiliumBGPClusterConfigs() v2alpha1.CiliumBGPClusterConfigInterface { - return &FakeCiliumBGPClusterConfigs{c} -} - -func (c *FakeCiliumV2alpha1) CiliumBGPNodeConfigs() v2alpha1.CiliumBGPNodeConfigInterface { - return &FakeCiliumBGPNodeConfigs{c} -} - -func (c *FakeCiliumV2alpha1) CiliumBGPNodeConfigOverrides() v2alpha1.CiliumBGPNodeConfigOverrideInterface { - return &FakeCiliumBGPNodeConfigOverrides{c} -} - -func (c *FakeCiliumV2alpha1) CiliumBGPPeerConfigs() v2alpha1.CiliumBGPPeerConfigInterface { - return &FakeCiliumBGPPeerConfigs{c} -} - -func (c *FakeCiliumV2alpha1) CiliumBGPPeeringPolicies() v2alpha1.CiliumBGPPeeringPolicyInterface { - return &FakeCiliumBGPPeeringPolicies{c} -} - -func (c *FakeCiliumV2alpha1) CiliumCIDRGroups() v2alpha1.CiliumCIDRGroupInterface { - return &FakeCiliumCIDRGroups{c} -} - -func (c *FakeCiliumV2alpha1) CiliumEndpointSlices() v2alpha1.CiliumEndpointSliceInterface { - return &FakeCiliumEndpointSlices{c} -} - -func (c *FakeCiliumV2alpha1) CiliumL2AnnouncementPolicies() v2alpha1.CiliumL2AnnouncementPolicyInterface { - return &FakeCiliumL2AnnouncementPolicies{c} -} - -func (c *FakeCiliumV2alpha1) CiliumLoadBalancerIPPools() v2alpha1.CiliumLoadBalancerIPPoolInterface { - return &FakeCiliumLoadBalancerIPPools{c} -} - -func (c *FakeCiliumV2alpha1) CiliumNodeConfigs(namespace string) v2alpha1.CiliumNodeConfigInterface { - return &FakeCiliumNodeConfigs{c, namespace} -} - -func (c *FakeCiliumV2alpha1) CiliumPodIPPools() v2alpha1.CiliumPodIPPoolInterface { - return &FakeCiliumPodIPPools{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeCiliumV2alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpadvertisement.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpadvertisement.go deleted file mode 100644 index 1afca178014..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpadvertisement.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumBGPAdvertisements implements CiliumBGPAdvertisementInterface -type FakeCiliumBGPAdvertisements struct { - Fake *FakeCiliumV2alpha1 -} - -var ciliumbgpadvertisementsResource = v2alpha1.SchemeGroupVersion.WithResource("ciliumbgpadvertisements") - -var ciliumbgpadvertisementsKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumBGPAdvertisement") - -// Get takes name of the ciliumBGPAdvertisement, and returns the corresponding ciliumBGPAdvertisement object, and an error if there is any. -func (c *FakeCiliumBGPAdvertisements) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPAdvertisement, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumbgpadvertisementsResource, name), &v2alpha1.CiliumBGPAdvertisement{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPAdvertisement), err -} - -// List takes label and field selectors, and returns the list of CiliumBGPAdvertisements that match those selectors. -func (c *FakeCiliumBGPAdvertisements) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPAdvertisementList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumbgpadvertisementsResource, ciliumbgpadvertisementsKind, opts), &v2alpha1.CiliumBGPAdvertisementList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumBGPAdvertisementList{ListMeta: obj.(*v2alpha1.CiliumBGPAdvertisementList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumBGPAdvertisementList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPAdvertisements. -func (c *FakeCiliumBGPAdvertisements) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumbgpadvertisementsResource, opts)) -} - -// Create takes the representation of a ciliumBGPAdvertisement and creates it. Returns the server's representation of the ciliumBGPAdvertisement, and an error, if there is any. -func (c *FakeCiliumBGPAdvertisements) Create(ctx context.Context, ciliumBGPAdvertisement *v2alpha1.CiliumBGPAdvertisement, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPAdvertisement, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumbgpadvertisementsResource, ciliumBGPAdvertisement), &v2alpha1.CiliumBGPAdvertisement{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPAdvertisement), err -} - -// Update takes the representation of a ciliumBGPAdvertisement and updates it. Returns the server's representation of the ciliumBGPAdvertisement, and an error, if there is any. -func (c *FakeCiliumBGPAdvertisements) Update(ctx context.Context, ciliumBGPAdvertisement *v2alpha1.CiliumBGPAdvertisement, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPAdvertisement, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumbgpadvertisementsResource, ciliumBGPAdvertisement), &v2alpha1.CiliumBGPAdvertisement{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPAdvertisement), err -} - -// Delete takes name of the ciliumBGPAdvertisement and deletes it. Returns an error if one occurs. -func (c *FakeCiliumBGPAdvertisements) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumbgpadvertisementsResource, name, opts), &v2alpha1.CiliumBGPAdvertisement{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumBGPAdvertisements) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumbgpadvertisementsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumBGPAdvertisementList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumBGPAdvertisement. -func (c *FakeCiliumBGPAdvertisements) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPAdvertisement, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumbgpadvertisementsResource, name, pt, data, subresources...), &v2alpha1.CiliumBGPAdvertisement{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPAdvertisement), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpclusterconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpclusterconfig.go deleted file mode 100644 index f01cc1930ca..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpclusterconfig.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumBGPClusterConfigs implements CiliumBGPClusterConfigInterface -type FakeCiliumBGPClusterConfigs struct { - Fake *FakeCiliumV2alpha1 -} - -var ciliumbgpclusterconfigsResource = v2alpha1.SchemeGroupVersion.WithResource("ciliumbgpclusterconfigs") - -var ciliumbgpclusterconfigsKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumBGPClusterConfig") - -// Get takes name of the ciliumBGPClusterConfig, and returns the corresponding ciliumBGPClusterConfig object, and an error if there is any. -func (c *FakeCiliumBGPClusterConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPClusterConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumbgpclusterconfigsResource, name), &v2alpha1.CiliumBGPClusterConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPClusterConfig), err -} - -// List takes label and field selectors, and returns the list of CiliumBGPClusterConfigs that match those selectors. -func (c *FakeCiliumBGPClusterConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPClusterConfigList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumbgpclusterconfigsResource, ciliumbgpclusterconfigsKind, opts), &v2alpha1.CiliumBGPClusterConfigList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumBGPClusterConfigList{ListMeta: obj.(*v2alpha1.CiliumBGPClusterConfigList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumBGPClusterConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPClusterConfigs. -func (c *FakeCiliumBGPClusterConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumbgpclusterconfigsResource, opts)) -} - -// Create takes the representation of a ciliumBGPClusterConfig and creates it. Returns the server's representation of the ciliumBGPClusterConfig, and an error, if there is any. -func (c *FakeCiliumBGPClusterConfigs) Create(ctx context.Context, ciliumBGPClusterConfig *v2alpha1.CiliumBGPClusterConfig, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPClusterConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumbgpclusterconfigsResource, ciliumBGPClusterConfig), &v2alpha1.CiliumBGPClusterConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPClusterConfig), err -} - -// Update takes the representation of a ciliumBGPClusterConfig and updates it. Returns the server's representation of the ciliumBGPClusterConfig, and an error, if there is any. -func (c *FakeCiliumBGPClusterConfigs) Update(ctx context.Context, ciliumBGPClusterConfig *v2alpha1.CiliumBGPClusterConfig, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPClusterConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumbgpclusterconfigsResource, ciliumBGPClusterConfig), &v2alpha1.CiliumBGPClusterConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPClusterConfig), err -} - -// Delete takes name of the ciliumBGPClusterConfig and deletes it. Returns an error if one occurs. -func (c *FakeCiliumBGPClusterConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumbgpclusterconfigsResource, name, opts), &v2alpha1.CiliumBGPClusterConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumBGPClusterConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumbgpclusterconfigsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumBGPClusterConfigList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumBGPClusterConfig. -func (c *FakeCiliumBGPClusterConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPClusterConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumbgpclusterconfigsResource, name, pt, data, subresources...), &v2alpha1.CiliumBGPClusterConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPClusterConfig), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfig.go deleted file mode 100644 index 9bd9953a2d2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfig.go +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumBGPNodeConfigs implements CiliumBGPNodeConfigInterface -type FakeCiliumBGPNodeConfigs struct { - Fake *FakeCiliumV2alpha1 -} - -var ciliumbgpnodeconfigsResource = v2alpha1.SchemeGroupVersion.WithResource("ciliumbgpnodeconfigs") - -var ciliumbgpnodeconfigsKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumBGPNodeConfig") - -// Get takes name of the ciliumBGPNodeConfig, and returns the corresponding ciliumBGPNodeConfig object, and an error if there is any. -func (c *FakeCiliumBGPNodeConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPNodeConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumbgpnodeconfigsResource, name), &v2alpha1.CiliumBGPNodeConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPNodeConfig), err -} - -// List takes label and field selectors, and returns the list of CiliumBGPNodeConfigs that match those selectors. -func (c *FakeCiliumBGPNodeConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPNodeConfigList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumbgpnodeconfigsResource, ciliumbgpnodeconfigsKind, opts), &v2alpha1.CiliumBGPNodeConfigList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumBGPNodeConfigList{ListMeta: obj.(*v2alpha1.CiliumBGPNodeConfigList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumBGPNodeConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPNodeConfigs. -func (c *FakeCiliumBGPNodeConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumbgpnodeconfigsResource, opts)) -} - -// Create takes the representation of a ciliumBGPNodeConfig and creates it. Returns the server's representation of the ciliumBGPNodeConfig, and an error, if there is any. -func (c *FakeCiliumBGPNodeConfigs) Create(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPNodeConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumbgpnodeconfigsResource, ciliumBGPNodeConfig), &v2alpha1.CiliumBGPNodeConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPNodeConfig), err -} - -// Update takes the representation of a ciliumBGPNodeConfig and updates it. Returns the server's representation of the ciliumBGPNodeConfig, and an error, if there is any. -func (c *FakeCiliumBGPNodeConfigs) Update(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPNodeConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumbgpnodeconfigsResource, ciliumBGPNodeConfig), &v2alpha1.CiliumBGPNodeConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPNodeConfig), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCiliumBGPNodeConfigs) UpdateStatus(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPNodeConfig, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(ciliumbgpnodeconfigsResource, "status", ciliumBGPNodeConfig), &v2alpha1.CiliumBGPNodeConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPNodeConfig), err -} - -// Delete takes name of the ciliumBGPNodeConfig and deletes it. Returns an error if one occurs. -func (c *FakeCiliumBGPNodeConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumbgpnodeconfigsResource, name, opts), &v2alpha1.CiliumBGPNodeConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumBGPNodeConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumbgpnodeconfigsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumBGPNodeConfigList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumBGPNodeConfig. -func (c *FakeCiliumBGPNodeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPNodeConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumbgpnodeconfigsResource, name, pt, data, subresources...), &v2alpha1.CiliumBGPNodeConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPNodeConfig), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfigoverride.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfigoverride.go deleted file mode 100644 index c13613f23f3..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfigoverride.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumBGPNodeConfigOverrides implements CiliumBGPNodeConfigOverrideInterface -type FakeCiliumBGPNodeConfigOverrides struct { - Fake *FakeCiliumV2alpha1 -} - -var ciliumbgpnodeconfigoverridesResource = v2alpha1.SchemeGroupVersion.WithResource("ciliumbgpnodeconfigoverrides") - -var ciliumbgpnodeconfigoverridesKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumBGPNodeConfigOverride") - -// Get takes name of the ciliumBGPNodeConfigOverride, and returns the corresponding ciliumBGPNodeConfigOverride object, and an error if there is any. -func (c *FakeCiliumBGPNodeConfigOverrides) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPNodeConfigOverride, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumbgpnodeconfigoverridesResource, name), &v2alpha1.CiliumBGPNodeConfigOverride{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPNodeConfigOverride), err -} - -// List takes label and field selectors, and returns the list of CiliumBGPNodeConfigOverrides that match those selectors. -func (c *FakeCiliumBGPNodeConfigOverrides) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPNodeConfigOverrideList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumbgpnodeconfigoverridesResource, ciliumbgpnodeconfigoverridesKind, opts), &v2alpha1.CiliumBGPNodeConfigOverrideList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumBGPNodeConfigOverrideList{ListMeta: obj.(*v2alpha1.CiliumBGPNodeConfigOverrideList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumBGPNodeConfigOverrideList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPNodeConfigOverrides. -func (c *FakeCiliumBGPNodeConfigOverrides) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumbgpnodeconfigoverridesResource, opts)) -} - -// Create takes the representation of a ciliumBGPNodeConfigOverride and creates it. Returns the server's representation of the ciliumBGPNodeConfigOverride, and an error, if there is any. -func (c *FakeCiliumBGPNodeConfigOverrides) Create(ctx context.Context, ciliumBGPNodeConfigOverride *v2alpha1.CiliumBGPNodeConfigOverride, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPNodeConfigOverride, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumbgpnodeconfigoverridesResource, ciliumBGPNodeConfigOverride), &v2alpha1.CiliumBGPNodeConfigOverride{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPNodeConfigOverride), err -} - -// Update takes the representation of a ciliumBGPNodeConfigOverride and updates it. Returns the server's representation of the ciliumBGPNodeConfigOverride, and an error, if there is any. -func (c *FakeCiliumBGPNodeConfigOverrides) Update(ctx context.Context, ciliumBGPNodeConfigOverride *v2alpha1.CiliumBGPNodeConfigOverride, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPNodeConfigOverride, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumbgpnodeconfigoverridesResource, ciliumBGPNodeConfigOverride), &v2alpha1.CiliumBGPNodeConfigOverride{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPNodeConfigOverride), err -} - -// Delete takes name of the ciliumBGPNodeConfigOverride and deletes it. Returns an error if one occurs. -func (c *FakeCiliumBGPNodeConfigOverrides) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumbgpnodeconfigoverridesResource, name, opts), &v2alpha1.CiliumBGPNodeConfigOverride{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumBGPNodeConfigOverrides) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumbgpnodeconfigoverridesResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumBGPNodeConfigOverrideList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumBGPNodeConfigOverride. -func (c *FakeCiliumBGPNodeConfigOverrides) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPNodeConfigOverride, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumbgpnodeconfigoverridesResource, name, pt, data, subresources...), &v2alpha1.CiliumBGPNodeConfigOverride{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPNodeConfigOverride), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeerconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeerconfig.go deleted file mode 100644 index 393f2fb07da..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeerconfig.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumBGPPeerConfigs implements CiliumBGPPeerConfigInterface -type FakeCiliumBGPPeerConfigs struct { - Fake *FakeCiliumV2alpha1 -} - -var ciliumbgppeerconfigsResource = v2alpha1.SchemeGroupVersion.WithResource("ciliumbgppeerconfigs") - -var ciliumbgppeerconfigsKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumBGPPeerConfig") - -// Get takes name of the ciliumBGPPeerConfig, and returns the corresponding ciliumBGPPeerConfig object, and an error if there is any. -func (c *FakeCiliumBGPPeerConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPPeerConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumbgppeerconfigsResource, name), &v2alpha1.CiliumBGPPeerConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPPeerConfig), err -} - -// List takes label and field selectors, and returns the list of CiliumBGPPeerConfigs that match those selectors. -func (c *FakeCiliumBGPPeerConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPPeerConfigList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumbgppeerconfigsResource, ciliumbgppeerconfigsKind, opts), &v2alpha1.CiliumBGPPeerConfigList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumBGPPeerConfigList{ListMeta: obj.(*v2alpha1.CiliumBGPPeerConfigList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumBGPPeerConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPPeerConfigs. -func (c *FakeCiliumBGPPeerConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumbgppeerconfigsResource, opts)) -} - -// Create takes the representation of a ciliumBGPPeerConfig and creates it. Returns the server's representation of the ciliumBGPPeerConfig, and an error, if there is any. -func (c *FakeCiliumBGPPeerConfigs) Create(ctx context.Context, ciliumBGPPeerConfig *v2alpha1.CiliumBGPPeerConfig, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPPeerConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumbgppeerconfigsResource, ciliumBGPPeerConfig), &v2alpha1.CiliumBGPPeerConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPPeerConfig), err -} - -// Update takes the representation of a ciliumBGPPeerConfig and updates it. Returns the server's representation of the ciliumBGPPeerConfig, and an error, if there is any. -func (c *FakeCiliumBGPPeerConfigs) Update(ctx context.Context, ciliumBGPPeerConfig *v2alpha1.CiliumBGPPeerConfig, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPPeerConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumbgppeerconfigsResource, ciliumBGPPeerConfig), &v2alpha1.CiliumBGPPeerConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPPeerConfig), err -} - -// Delete takes name of the ciliumBGPPeerConfig and deletes it. Returns an error if one occurs. -func (c *FakeCiliumBGPPeerConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumbgppeerconfigsResource, name, opts), &v2alpha1.CiliumBGPPeerConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumBGPPeerConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumbgppeerconfigsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumBGPPeerConfigList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumBGPPeerConfig. -func (c *FakeCiliumBGPPeerConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPPeerConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumbgppeerconfigsResource, name, pt, data, subresources...), &v2alpha1.CiliumBGPPeerConfig{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPPeerConfig), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeeringpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeeringpolicy.go deleted file mode 100644 index 9da1136d414..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeeringpolicy.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumBGPPeeringPolicies implements CiliumBGPPeeringPolicyInterface -type FakeCiliumBGPPeeringPolicies struct { - Fake *FakeCiliumV2alpha1 -} - -var ciliumbgppeeringpoliciesResource = v2alpha1.SchemeGroupVersion.WithResource("ciliumbgppeeringpolicies") - -var ciliumbgppeeringpoliciesKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumBGPPeeringPolicy") - -// Get takes name of the ciliumBGPPeeringPolicy, and returns the corresponding ciliumBGPPeeringPolicy object, and an error if there is any. -func (c *FakeCiliumBGPPeeringPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumBGPPeeringPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumbgppeeringpoliciesResource, name), &v2alpha1.CiliumBGPPeeringPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPPeeringPolicy), err -} - -// List takes label and field selectors, and returns the list of CiliumBGPPeeringPolicies that match those selectors. -func (c *FakeCiliumBGPPeeringPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumBGPPeeringPolicyList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumbgppeeringpoliciesResource, ciliumbgppeeringpoliciesKind, opts), &v2alpha1.CiliumBGPPeeringPolicyList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumBGPPeeringPolicyList{ListMeta: obj.(*v2alpha1.CiliumBGPPeeringPolicyList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumBGPPeeringPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumBGPPeeringPolicies. -func (c *FakeCiliumBGPPeeringPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumbgppeeringpoliciesResource, opts)) -} - -// Create takes the representation of a ciliumBGPPeeringPolicy and creates it. Returns the server's representation of the ciliumBGPPeeringPolicy, and an error, if there is any. -func (c *FakeCiliumBGPPeeringPolicies) Create(ctx context.Context, ciliumBGPPeeringPolicy *v2alpha1.CiliumBGPPeeringPolicy, opts v1.CreateOptions) (result *v2alpha1.CiliumBGPPeeringPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumbgppeeringpoliciesResource, ciliumBGPPeeringPolicy), &v2alpha1.CiliumBGPPeeringPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPPeeringPolicy), err -} - -// Update takes the representation of a ciliumBGPPeeringPolicy and updates it. Returns the server's representation of the ciliumBGPPeeringPolicy, and an error, if there is any. -func (c *FakeCiliumBGPPeeringPolicies) Update(ctx context.Context, ciliumBGPPeeringPolicy *v2alpha1.CiliumBGPPeeringPolicy, opts v1.UpdateOptions) (result *v2alpha1.CiliumBGPPeeringPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumbgppeeringpoliciesResource, ciliumBGPPeeringPolicy), &v2alpha1.CiliumBGPPeeringPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPPeeringPolicy), err -} - -// Delete takes name of the ciliumBGPPeeringPolicy and deletes it. Returns an error if one occurs. -func (c *FakeCiliumBGPPeeringPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumbgppeeringpoliciesResource, name, opts), &v2alpha1.CiliumBGPPeeringPolicy{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumBGPPeeringPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumbgppeeringpoliciesResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumBGPPeeringPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumBGPPeeringPolicy. -func (c *FakeCiliumBGPPeeringPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPPeeringPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumbgppeeringpoliciesResource, name, pt, data, subresources...), &v2alpha1.CiliumBGPPeeringPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumBGPPeeringPolicy), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumcidrgroup.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumcidrgroup.go deleted file mode 100644 index ec271bbc424..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumcidrgroup.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumCIDRGroups implements CiliumCIDRGroupInterface -type FakeCiliumCIDRGroups struct { - Fake *FakeCiliumV2alpha1 -} - -var ciliumcidrgroupsResource = v2alpha1.SchemeGroupVersion.WithResource("ciliumcidrgroups") - -var ciliumcidrgroupsKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumCIDRGroup") - -// Get takes name of the ciliumCIDRGroup, and returns the corresponding ciliumCIDRGroup object, and an error if there is any. -func (c *FakeCiliumCIDRGroups) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumCIDRGroup, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumcidrgroupsResource, name), &v2alpha1.CiliumCIDRGroup{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumCIDRGroup), err -} - -// List takes label and field selectors, and returns the list of CiliumCIDRGroups that match those selectors. -func (c *FakeCiliumCIDRGroups) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumCIDRGroupList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumcidrgroupsResource, ciliumcidrgroupsKind, opts), &v2alpha1.CiliumCIDRGroupList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumCIDRGroupList{ListMeta: obj.(*v2alpha1.CiliumCIDRGroupList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumCIDRGroupList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumCIDRGroups. -func (c *FakeCiliumCIDRGroups) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumcidrgroupsResource, opts)) -} - -// Create takes the representation of a ciliumCIDRGroup and creates it. Returns the server's representation of the ciliumCIDRGroup, and an error, if there is any. -func (c *FakeCiliumCIDRGroups) Create(ctx context.Context, ciliumCIDRGroup *v2alpha1.CiliumCIDRGroup, opts v1.CreateOptions) (result *v2alpha1.CiliumCIDRGroup, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumcidrgroupsResource, ciliumCIDRGroup), &v2alpha1.CiliumCIDRGroup{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumCIDRGroup), err -} - -// Update takes the representation of a ciliumCIDRGroup and updates it. Returns the server's representation of the ciliumCIDRGroup, and an error, if there is any. -func (c *FakeCiliumCIDRGroups) Update(ctx context.Context, ciliumCIDRGroup *v2alpha1.CiliumCIDRGroup, opts v1.UpdateOptions) (result *v2alpha1.CiliumCIDRGroup, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumcidrgroupsResource, ciliumCIDRGroup), &v2alpha1.CiliumCIDRGroup{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumCIDRGroup), err -} - -// Delete takes name of the ciliumCIDRGroup and deletes it. Returns an error if one occurs. -func (c *FakeCiliumCIDRGroups) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumcidrgroupsResource, name, opts), &v2alpha1.CiliumCIDRGroup{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumCIDRGroups) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumcidrgroupsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumCIDRGroupList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumCIDRGroup. -func (c *FakeCiliumCIDRGroups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumCIDRGroup, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumcidrgroupsResource, name, pt, data, subresources...), &v2alpha1.CiliumCIDRGroup{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumCIDRGroup), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumendpointslice.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumendpointslice.go deleted file mode 100644 index 447afbdde63..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumendpointslice.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumEndpointSlices implements CiliumEndpointSliceInterface -type FakeCiliumEndpointSlices struct { - Fake *FakeCiliumV2alpha1 -} - -var ciliumendpointslicesResource = v2alpha1.SchemeGroupVersion.WithResource("ciliumendpointslices") - -var ciliumendpointslicesKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumEndpointSlice") - -// Get takes name of the ciliumEndpointSlice, and returns the corresponding ciliumEndpointSlice object, and an error if there is any. -func (c *FakeCiliumEndpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumEndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumendpointslicesResource, name), &v2alpha1.CiliumEndpointSlice{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumEndpointSlice), err -} - -// List takes label and field selectors, and returns the list of CiliumEndpointSlices that match those selectors. -func (c *FakeCiliumEndpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumEndpointSliceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumendpointslicesResource, ciliumendpointslicesKind, opts), &v2alpha1.CiliumEndpointSliceList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumEndpointSliceList{ListMeta: obj.(*v2alpha1.CiliumEndpointSliceList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumEndpointSliceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumEndpointSlices. -func (c *FakeCiliumEndpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumendpointslicesResource, opts)) -} - -// Create takes the representation of a ciliumEndpointSlice and creates it. Returns the server's representation of the ciliumEndpointSlice, and an error, if there is any. -func (c *FakeCiliumEndpointSlices) Create(ctx context.Context, ciliumEndpointSlice *v2alpha1.CiliumEndpointSlice, opts v1.CreateOptions) (result *v2alpha1.CiliumEndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumendpointslicesResource, ciliumEndpointSlice), &v2alpha1.CiliumEndpointSlice{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumEndpointSlice), err -} - -// Update takes the representation of a ciliumEndpointSlice and updates it. Returns the server's representation of the ciliumEndpointSlice, and an error, if there is any. -func (c *FakeCiliumEndpointSlices) Update(ctx context.Context, ciliumEndpointSlice *v2alpha1.CiliumEndpointSlice, opts v1.UpdateOptions) (result *v2alpha1.CiliumEndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumendpointslicesResource, ciliumEndpointSlice), &v2alpha1.CiliumEndpointSlice{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumEndpointSlice), err -} - -// Delete takes name of the ciliumEndpointSlice and deletes it. Returns an error if one occurs. -func (c *FakeCiliumEndpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumendpointslicesResource, name, opts), &v2alpha1.CiliumEndpointSlice{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumEndpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumendpointslicesResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumEndpointSliceList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumEndpointSlice. -func (c *FakeCiliumEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumEndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumendpointslicesResource, name, pt, data, subresources...), &v2alpha1.CiliumEndpointSlice{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumEndpointSlice), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliuml2announcementpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliuml2announcementpolicy.go deleted file mode 100644 index 2ad271efcea..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliuml2announcementpolicy.go +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumL2AnnouncementPolicies implements CiliumL2AnnouncementPolicyInterface -type FakeCiliumL2AnnouncementPolicies struct { - Fake *FakeCiliumV2alpha1 -} - -var ciliuml2announcementpoliciesResource = v2alpha1.SchemeGroupVersion.WithResource("ciliuml2announcementpolicies") - -var ciliuml2announcementpoliciesKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumL2AnnouncementPolicy") - -// Get takes name of the ciliumL2AnnouncementPolicy, and returns the corresponding ciliumL2AnnouncementPolicy object, and an error if there is any. -func (c *FakeCiliumL2AnnouncementPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumL2AnnouncementPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliuml2announcementpoliciesResource, name), &v2alpha1.CiliumL2AnnouncementPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumL2AnnouncementPolicy), err -} - -// List takes label and field selectors, and returns the list of CiliumL2AnnouncementPolicies that match those selectors. -func (c *FakeCiliumL2AnnouncementPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumL2AnnouncementPolicyList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliuml2announcementpoliciesResource, ciliuml2announcementpoliciesKind, opts), &v2alpha1.CiliumL2AnnouncementPolicyList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumL2AnnouncementPolicyList{ListMeta: obj.(*v2alpha1.CiliumL2AnnouncementPolicyList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumL2AnnouncementPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumL2AnnouncementPolicies. -func (c *FakeCiliumL2AnnouncementPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliuml2announcementpoliciesResource, opts)) -} - -// Create takes the representation of a ciliumL2AnnouncementPolicy and creates it. Returns the server's representation of the ciliumL2AnnouncementPolicy, and an error, if there is any. -func (c *FakeCiliumL2AnnouncementPolicies) Create(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.CreateOptions) (result *v2alpha1.CiliumL2AnnouncementPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliuml2announcementpoliciesResource, ciliumL2AnnouncementPolicy), &v2alpha1.CiliumL2AnnouncementPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumL2AnnouncementPolicy), err -} - -// Update takes the representation of a ciliumL2AnnouncementPolicy and updates it. Returns the server's representation of the ciliumL2AnnouncementPolicy, and an error, if there is any. -func (c *FakeCiliumL2AnnouncementPolicies) Update(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.UpdateOptions) (result *v2alpha1.CiliumL2AnnouncementPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliuml2announcementpoliciesResource, ciliumL2AnnouncementPolicy), &v2alpha1.CiliumL2AnnouncementPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumL2AnnouncementPolicy), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCiliumL2AnnouncementPolicies) UpdateStatus(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.UpdateOptions) (*v2alpha1.CiliumL2AnnouncementPolicy, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(ciliuml2announcementpoliciesResource, "status", ciliumL2AnnouncementPolicy), &v2alpha1.CiliumL2AnnouncementPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumL2AnnouncementPolicy), err -} - -// Delete takes name of the ciliumL2AnnouncementPolicy and deletes it. Returns an error if one occurs. -func (c *FakeCiliumL2AnnouncementPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliuml2announcementpoliciesResource, name, opts), &v2alpha1.CiliumL2AnnouncementPolicy{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumL2AnnouncementPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliuml2announcementpoliciesResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumL2AnnouncementPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumL2AnnouncementPolicy. -func (c *FakeCiliumL2AnnouncementPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumL2AnnouncementPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliuml2announcementpoliciesResource, name, pt, data, subresources...), &v2alpha1.CiliumL2AnnouncementPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumL2AnnouncementPolicy), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumloadbalancerippool.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumloadbalancerippool.go deleted file mode 100644 index b150f24fa6d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumloadbalancerippool.go +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumLoadBalancerIPPools implements CiliumLoadBalancerIPPoolInterface -type FakeCiliumLoadBalancerIPPools struct { - Fake *FakeCiliumV2alpha1 -} - -var ciliumloadbalancerippoolsResource = v2alpha1.SchemeGroupVersion.WithResource("ciliumloadbalancerippools") - -var ciliumloadbalancerippoolsKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumLoadBalancerIPPool") - -// Get takes name of the ciliumLoadBalancerIPPool, and returns the corresponding ciliumLoadBalancerIPPool object, and an error if there is any. -func (c *FakeCiliumLoadBalancerIPPools) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumLoadBalancerIPPool, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumloadbalancerippoolsResource, name), &v2alpha1.CiliumLoadBalancerIPPool{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumLoadBalancerIPPool), err -} - -// List takes label and field selectors, and returns the list of CiliumLoadBalancerIPPools that match those selectors. -func (c *FakeCiliumLoadBalancerIPPools) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumLoadBalancerIPPoolList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumloadbalancerippoolsResource, ciliumloadbalancerippoolsKind, opts), &v2alpha1.CiliumLoadBalancerIPPoolList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumLoadBalancerIPPoolList{ListMeta: obj.(*v2alpha1.CiliumLoadBalancerIPPoolList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumLoadBalancerIPPoolList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumLoadBalancerIPPools. -func (c *FakeCiliumLoadBalancerIPPools) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumloadbalancerippoolsResource, opts)) -} - -// Create takes the representation of a ciliumLoadBalancerIPPool and creates it. Returns the server's representation of the ciliumLoadBalancerIPPool, and an error, if there is any. -func (c *FakeCiliumLoadBalancerIPPools) Create(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.CreateOptions) (result *v2alpha1.CiliumLoadBalancerIPPool, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumloadbalancerippoolsResource, ciliumLoadBalancerIPPool), &v2alpha1.CiliumLoadBalancerIPPool{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumLoadBalancerIPPool), err -} - -// Update takes the representation of a ciliumLoadBalancerIPPool and updates it. Returns the server's representation of the ciliumLoadBalancerIPPool, and an error, if there is any. -func (c *FakeCiliumLoadBalancerIPPools) Update(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.UpdateOptions) (result *v2alpha1.CiliumLoadBalancerIPPool, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumloadbalancerippoolsResource, ciliumLoadBalancerIPPool), &v2alpha1.CiliumLoadBalancerIPPool{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumLoadBalancerIPPool), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCiliumLoadBalancerIPPools) UpdateStatus(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.UpdateOptions) (*v2alpha1.CiliumLoadBalancerIPPool, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(ciliumloadbalancerippoolsResource, "status", ciliumLoadBalancerIPPool), &v2alpha1.CiliumLoadBalancerIPPool{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumLoadBalancerIPPool), err -} - -// Delete takes name of the ciliumLoadBalancerIPPool and deletes it. Returns an error if one occurs. -func (c *FakeCiliumLoadBalancerIPPools) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumloadbalancerippoolsResource, name, opts), &v2alpha1.CiliumLoadBalancerIPPool{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumLoadBalancerIPPools) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumloadbalancerippoolsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumLoadBalancerIPPoolList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumLoadBalancerIPPool. -func (c *FakeCiliumLoadBalancerIPPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumLoadBalancerIPPool, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumloadbalancerippoolsResource, name, pt, data, subresources...), &v2alpha1.CiliumLoadBalancerIPPool{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumLoadBalancerIPPool), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumnodeconfig.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumnodeconfig.go deleted file mode 100644 index a826f0bc097..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumnodeconfig.go +++ /dev/null @@ -1,116 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumNodeConfigs implements CiliumNodeConfigInterface -type FakeCiliumNodeConfigs struct { - Fake *FakeCiliumV2alpha1 - ns string -} - -var ciliumnodeconfigsResource = v2alpha1.SchemeGroupVersion.WithResource("ciliumnodeconfigs") - -var ciliumnodeconfigsKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumNodeConfig") - -// Get takes name of the ciliumNodeConfig, and returns the corresponding ciliumNodeConfig object, and an error if there is any. -func (c *FakeCiliumNodeConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumNodeConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(ciliumnodeconfigsResource, c.ns, name), &v2alpha1.CiliumNodeConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumNodeConfig), err -} - -// List takes label and field selectors, and returns the list of CiliumNodeConfigs that match those selectors. -func (c *FakeCiliumNodeConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumNodeConfigList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(ciliumnodeconfigsResource, ciliumnodeconfigsKind, c.ns, opts), &v2alpha1.CiliumNodeConfigList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumNodeConfigList{ListMeta: obj.(*v2alpha1.CiliumNodeConfigList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumNodeConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumNodeConfigs. -func (c *FakeCiliumNodeConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(ciliumnodeconfigsResource, c.ns, opts)) - -} - -// Create takes the representation of a ciliumNodeConfig and creates it. Returns the server's representation of the ciliumNodeConfig, and an error, if there is any. -func (c *FakeCiliumNodeConfigs) Create(ctx context.Context, ciliumNodeConfig *v2alpha1.CiliumNodeConfig, opts v1.CreateOptions) (result *v2alpha1.CiliumNodeConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(ciliumnodeconfigsResource, c.ns, ciliumNodeConfig), &v2alpha1.CiliumNodeConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumNodeConfig), err -} - -// Update takes the representation of a ciliumNodeConfig and updates it. Returns the server's representation of the ciliumNodeConfig, and an error, if there is any. -func (c *FakeCiliumNodeConfigs) Update(ctx context.Context, ciliumNodeConfig *v2alpha1.CiliumNodeConfig, opts v1.UpdateOptions) (result *v2alpha1.CiliumNodeConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(ciliumnodeconfigsResource, c.ns, ciliumNodeConfig), &v2alpha1.CiliumNodeConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumNodeConfig), err -} - -// Delete takes name of the ciliumNodeConfig and deletes it. Returns an error if one occurs. -func (c *FakeCiliumNodeConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(ciliumnodeconfigsResource, c.ns, name, opts), &v2alpha1.CiliumNodeConfig{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumNodeConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(ciliumnodeconfigsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumNodeConfigList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumNodeConfig. -func (c *FakeCiliumNodeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumNodeConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ciliumnodeconfigsResource, c.ns, name, pt, data, subresources...), &v2alpha1.CiliumNodeConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumNodeConfig), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumpodippool.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumpodippool.go deleted file mode 100644 index 6922a8582ed..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumpodippool.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCiliumPodIPPools implements CiliumPodIPPoolInterface -type FakeCiliumPodIPPools struct { - Fake *FakeCiliumV2alpha1 -} - -var ciliumpodippoolsResource = v2alpha1.SchemeGroupVersion.WithResource("ciliumpodippools") - -var ciliumpodippoolsKind = v2alpha1.SchemeGroupVersion.WithKind("CiliumPodIPPool") - -// Get takes name of the ciliumPodIPPool, and returns the corresponding ciliumPodIPPool object, and an error if there is any. -func (c *FakeCiliumPodIPPools) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CiliumPodIPPool, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(ciliumpodippoolsResource, name), &v2alpha1.CiliumPodIPPool{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumPodIPPool), err -} - -// List takes label and field selectors, and returns the list of CiliumPodIPPools that match those selectors. -func (c *FakeCiliumPodIPPools) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CiliumPodIPPoolList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(ciliumpodippoolsResource, ciliumpodippoolsKind, opts), &v2alpha1.CiliumPodIPPoolList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v2alpha1.CiliumPodIPPoolList{ListMeta: obj.(*v2alpha1.CiliumPodIPPoolList).ListMeta} - for _, item := range obj.(*v2alpha1.CiliumPodIPPoolList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ciliumPodIPPools. -func (c *FakeCiliumPodIPPools) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(ciliumpodippoolsResource, opts)) -} - -// Create takes the representation of a ciliumPodIPPool and creates it. Returns the server's representation of the ciliumPodIPPool, and an error, if there is any. -func (c *FakeCiliumPodIPPools) Create(ctx context.Context, ciliumPodIPPool *v2alpha1.CiliumPodIPPool, opts v1.CreateOptions) (result *v2alpha1.CiliumPodIPPool, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(ciliumpodippoolsResource, ciliumPodIPPool), &v2alpha1.CiliumPodIPPool{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumPodIPPool), err -} - -// Update takes the representation of a ciliumPodIPPool and updates it. Returns the server's representation of the ciliumPodIPPool, and an error, if there is any. -func (c *FakeCiliumPodIPPools) Update(ctx context.Context, ciliumPodIPPool *v2alpha1.CiliumPodIPPool, opts v1.UpdateOptions) (result *v2alpha1.CiliumPodIPPool, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(ciliumpodippoolsResource, ciliumPodIPPool), &v2alpha1.CiliumPodIPPool{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumPodIPPool), err -} - -// Delete takes name of the ciliumPodIPPool and deletes it. Returns an error if one occurs. -func (c *FakeCiliumPodIPPools) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ciliumpodippoolsResource, name, opts), &v2alpha1.CiliumPodIPPool{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCiliumPodIPPools) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(ciliumpodippoolsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v2alpha1.CiliumPodIPPoolList{}) - return err -} - -// Patch applies the patch and returns the patched ciliumPodIPPool. -func (c *FakeCiliumPodIPPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumPodIPPool, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(ciliumpodippoolsResource, name, pt, data, subresources...), &v2alpha1.CiliumPodIPPool{}) - if obj == nil { - return nil, err - } - return obj.(*v2alpha1.CiliumPodIPPool), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/generated_expansion.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/generated_expansion.go deleted file mode 100644 index 4b25b32bb81..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/generated_expansion.go +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v2alpha1 - -type CiliumBGPAdvertisementExpansion interface{} - -type CiliumBGPClusterConfigExpansion interface{} - -type CiliumBGPNodeConfigExpansion interface{} - -type CiliumBGPNodeConfigOverrideExpansion interface{} - -type CiliumBGPPeerConfigExpansion interface{} - -type CiliumBGPPeeringPolicyExpansion interface{} - -type CiliumCIDRGroupExpansion interface{} - -type CiliumEndpointSliceExpansion interface{} - -type CiliumL2AnnouncementPolicyExpansion interface{} - -type CiliumLoadBalancerIPPoolExpansion interface{} - -type CiliumNodeConfigExpansion interface{} - -type CiliumPodIPPoolExpansion interface{} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/config.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/config.go deleted file mode 100644 index ac685bb4b47..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/config.go +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "os" - "time" - - "github.com/spf13/pflag" - - "github.com/cilium/cilium/pkg/defaults" - "github.com/cilium/cilium/pkg/option" -) - -type Config struct { - // EnableK8s is a flag that, when set to false, forcibly disables the clientset, to let cilium - // operates with CNI-compatible orchestrators other than Kubernetes. Default to true. - EnableK8s bool - - // K8sAPIServer is the kubernetes api address server (for https use --k8s-kubeconfig-path instead) - K8sAPIServer string - - // K8sKubeConfigPath is the absolute path of the kubernetes kubeconfig file - K8sKubeConfigPath string - - // K8sClientQPS is the queries per second limit for the K8s client. Defaults to k8s client defaults. - K8sClientQPS float32 - - // K8sClientBurst is the burst value allowed for the K8s client. Defaults to k8s client defaults. - K8sClientBurst int - - // K8sHeartbeatTimeout configures the timeout for apiserver heartbeat - K8sHeartbeatTimeout time.Duration - - // K8sEnableAPIDiscovery enables Kubernetes API discovery - EnableK8sAPIDiscovery bool -} - -var defaultConfig = Config{ - EnableK8s: true, - K8sAPIServer: "", - K8sKubeConfigPath: "", - K8sClientQPS: defaults.K8sClientQPSLimit, - K8sClientBurst: defaults.K8sClientBurst, - K8sHeartbeatTimeout: 30 * time.Second, - EnableK8sAPIDiscovery: defaults.K8sEnableAPIDiscovery, -} - -func (def Config) Flags(flags *pflag.FlagSet) { - flags.Bool(option.EnableK8s, def.EnableK8s, "Enable the k8s clientset") - flags.String(option.K8sAPIServer, def.K8sAPIServer, "Kubernetes API server URL") - flags.String(option.K8sKubeConfigPath, def.K8sKubeConfigPath, "Absolute path of the kubernetes kubeconfig file") - flags.Float32(option.K8sClientQPSLimit, def.K8sClientQPS, "Queries per second limit for the K8s client") - flags.Int(option.K8sClientBurst, def.K8sClientBurst, "Burst value allowed for the K8s client") - flags.Duration(option.K8sHeartbeatTimeout, def.K8sHeartbeatTimeout, "Configures the timeout for api-server heartbeat, set to 0 to disable") - flags.Bool(option.K8sEnableAPIDiscovery, def.EnableK8sAPIDiscovery, "Enable discovery of Kubernetes API groups and resources with the discovery API") -} - -func (cfg Config) isEnabled() bool { - if !cfg.EnableK8s { - return false - } - return cfg.K8sAPIServer != "" || - cfg.K8sKubeConfigPath != "" || - (os.Getenv("KUBERNETES_SERVICE_HOST") != "" && - os.Getenv("KUBERNETES_SERVICE_PORT") != "") || - os.Getenv("K8S_NODE_NAME") != "" -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/client/getters.go b/vendor/github.com/cilium/cilium/pkg/k8s/client/getters.go deleted file mode 100644 index fc499400073..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/client/getters.go +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package client - -import ( - "context" - "fmt" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - cilium_v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - slim_corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" -) - -// Getters is a set of methods for retrieving common objects. -type Getters interface { - GetSecrets(ctx context.Context, namespace, name string) (map[string][]byte, error) - GetK8sNode(ctx context.Context, nodeName string) (*slim_corev1.Node, error) - GetCiliumNode(ctx context.Context, nodeName string) (*cilium_v2.CiliumNode, error) -} - -// clientsetGetters implements the Getters interface in terms of the clientset. -type clientsetGetters struct { - Clientset -} - -// GetSecrets returns the secrets found in the given namespace and name. -func (cs *clientsetGetters) GetSecrets(ctx context.Context, ns, name string) (map[string][]byte, error) { - if !cs.IsEnabled() { - return nil, fmt.Errorf("GetSecrets: No k8s, cannot access k8s secrets") - } - - result, err := cs.CoreV1().Secrets(ns).Get(ctx, name, metav1.GetOptions{}) - if err != nil { - return nil, err - } - return result.Data, nil -} - -// GetK8sNode returns the node with the given nodeName. -func (cs *clientsetGetters) GetK8sNode(ctx context.Context, nodeName string) (*slim_corev1.Node, error) { - if !cs.IsEnabled() { - return nil, fmt.Errorf("GetK8sNode: No k8s, cannot access k8s nodes") - } - - return cs.Slim().CoreV1().Nodes().Get(ctx, nodeName, metav1.GetOptions{}) -} - -// GetCiliumNode returns the CiliumNode with the given nodeName. -func (cs *clientsetGetters) GetCiliumNode(ctx context.Context, nodeName string) (*cilium_v2.CiliumNode, error) { - if !cs.IsEnabled() { - return nil, fmt.Errorf("GetK8sNode: No k8s, cannot access k8s nodes") - } - - return cs.CiliumV2().CiliumNodes().Get(ctx, nodeName, metav1.GetOptions{}) -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/constants/const.go b/vendor/github.com/cilium/cilium/pkg/k8s/constants/const.go deleted file mode 100644 index 1f6cb6dde17..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/constants/const.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package constants - -const ( - // EnvNodeNameSpec is the environment label used by Kubernetes to - // specify the node's name. - EnvNodeNameSpec = "K8S_NODE_NAME" -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/identitybackend/identity.go b/vendor/github.com/cilium/cilium/pkg/k8s/identitybackend/identity.go deleted file mode 100644 index d3a867d557b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/identitybackend/identity.go +++ /dev/null @@ -1,416 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package identitybackend - -import ( - "context" - "fmt" - "reflect" - "sort" - "strconv" - "strings" - - "github.com/sirupsen/logrus" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/tools/cache" - - "github.com/cilium/cilium/pkg/allocator" - cacheKey "github.com/cilium/cilium/pkg/identity/key" - "github.com/cilium/cilium/pkg/idpool" - k8sConst "github.com/cilium/cilium/pkg/k8s/apis/cilium.io" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - clientset "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" - "github.com/cilium/cilium/pkg/k8s/informer" - k8sUtils "github.com/cilium/cilium/pkg/k8s/utils" - "github.com/cilium/cilium/pkg/kvstore" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/rate" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "crd-allocator") -) - -const ( - // HeartBeatAnnotation is an annotation applied by the operator to indicate - // that a CiliumIdentity has been marked for deletion. - HeartBeatAnnotation = "io.cilium.heartbeat" - - k8sPrefix = labels.LabelSourceK8s + ":" - k8sNamespaceLabelPrefix = labels.LabelSourceK8s + ":" + k8sConst.PodNamespaceMetaLabels + labels.PathDelimiter - - // byKeyIndex is the name of the index of the identities by key. - byKeyIndex = "by-key-index" -) - -func NewCRDBackend(c CRDBackendConfiguration) (allocator.Backend, error) { - return &crdBackend{CRDBackendConfiguration: c}, nil -} - -type CRDBackendConfiguration struct { - Store cache.Indexer - Client clientset.Interface - KeyFunc func(map[string]string) allocator.AllocatorKey -} - -type crdBackend struct { - CRDBackendConfiguration -} - -func (c *crdBackend) DeleteAllKeys(ctx context.Context) { -} - -// sanitizeK8sLabels strips the 'k8s:' prefix in the labels generated by -// AllocatorKey.GetAsMap (when the key is k8s labels). In the CRD identity case -// we map the labels directly to the ciliumidentity CRD instance, and -// kubernetes does not allow ':' in the name of the label. These labels are not -// the canonical labels of the identity, but used to ease interaction with the -// CRD object. -func sanitizeK8sLabels(old map[string]string) (selected, skipped map[string]string) { - skipped = make(map[string]string, len(old)) - selected = make(map[string]string, len(old)) - for k, v := range old { - // Skip non-k8s labels. - // Skip synthesized labels for k8s namespace labels, since they contain user input which can result in the label - // name being longer than 63 characters. - if !strings.HasPrefix(k, k8sPrefix) || strings.HasPrefix(k, k8sNamespaceLabelPrefix) { - skipped[k] = v - continue // skip non-k8s labels - } - k = strings.TrimPrefix(k, k8sPrefix) // k8s: is redundant - selected[k] = v - } - return selected, skipped -} - -// AllocateID will create an identity CRD, thus creating the identity for this -// key-> ID mapping. -// Note: the lock field is not supported with the k8s CRD allocator. -// Returns an allocator key with the cilium identity stored in it. -func (c *crdBackend) AllocateID(ctx context.Context, id idpool.ID, key allocator.AllocatorKey) (allocator.AllocatorKey, error) { - selectedLabels, skippedLabels := sanitizeK8sLabels(key.GetAsMap()) - log.WithField(logfields.Labels, skippedLabels).Info("Skipped non-kubernetes labels when labelling ciliumidentity. All labels will still be used in identity determination") - - identity := &v2.CiliumIdentity{ - ObjectMeta: metav1.ObjectMeta{ - Name: id.String(), - Labels: selectedLabels, - }, - SecurityLabels: key.GetAsMap(), - } - - ci, err := c.Client.CiliumV2().CiliumIdentities().Create(ctx, identity, metav1.CreateOptions{}) - if err != nil { - return nil, err - } - return key.PutValue(cacheKey.MetadataKeyBackendKey, ci), nil -} - -func (c *crdBackend) AllocateIDIfLocked(ctx context.Context, id idpool.ID, key allocator.AllocatorKey, lock kvstore.KVLocker) (allocator.AllocatorKey, error) { - return c.AllocateID(ctx, id, key) -} - -// AcquireReference acquires a reference to the identity. -func (c *crdBackend) AcquireReference(ctx context.Context, id idpool.ID, key allocator.AllocatorKey, lock kvstore.KVLocker) error { - // For CiliumIdentity-based allocation, the reference counting is - // handled via CiliumEndpoint. Any CiliumEndpoint referring to a - // CiliumIdentity will keep the CiliumIdentity alive. However, - // there is a brief window where a CiliumEndpoint may not exist - // for a given CiliumIdentity (according to the operator), in - // which case the operator marks the CiliumIdentity for deletion. - // This checks to see if the CiliumIdentity has been marked for - // deletion and removes the mark so that the CiliumIdentity can - // be safely used. - // - // NOTE: A race against using a CiliumIdentity that might otherwise - // be (immediately) deleted is prevented by the operator logic that - // validates the ResourceVersion of the CiliumIdentity before deleting - // it. If a CiliumIdentity does (eventually) get deleted by the - // operator, the agent will then have a chance to recreate it. - var ( - ts string - ok bool - ) - // check to see if the cached copy of the identity - // has the annotation - ci, exists, err := c.getById(ctx, id) - if err != nil { - return err - } - if !exists { - // fall back to the key stored in the allocator key. If it's not present - // then return the error. - ci, ok = key.Value(cacheKey.MetadataKeyBackendKey).(*v2.CiliumIdentity) - if !ok { - return fmt.Errorf("identity (id:%q,key:%q) does not exist", id, key) - } - } - - ts, ok = ci.Annotations[HeartBeatAnnotation] - if ok { - log.WithField(logfields.Identity, ci).Infof("Identity marked for deletion (at %s); attempting to unmark it", ts) - ci = ci.DeepCopy() - delete(ci.Annotations, HeartBeatAnnotation) - _, err = c.Client.CiliumV2().CiliumIdentities().Update(ctx, ci, metav1.UpdateOptions{}) - if err != nil { - return err - } - } - return nil -} - -func (c *crdBackend) RunLocksGC(_ context.Context, _ map[string]kvstore.Value) (map[string]kvstore.Value, error) { - return nil, nil -} - -func (c *crdBackend) RunGC(context.Context, *rate.Limiter, map[string]uint64, idpool.ID, idpool.ID) (map[string]uint64, *allocator.GCStats, error) { - return nil, nil, nil -} - -// UpdateKey refreshes the reference that this node is using this key->ID -// mapping. It assumes that the identity already exists but will recreate it if -// reliablyMissing is true. -// Note: the lock field is not supported with the k8s CRD allocator. -func (c *crdBackend) UpdateKey(ctx context.Context, id idpool.ID, key allocator.AllocatorKey, reliablyMissing bool) error { - err := c.AcquireReference(ctx, id, key, nil) - if err == nil { - log.WithFields(logrus.Fields{ - logfields.Identity: id, - logfields.Labels: key, - }).Debug("Acquired reference for identity") - return nil - } - - // The CRD (aka the master key) is missing. Try to recover by recreating it - // if reliablyMissing is set. - log.WithError(err).WithFields(logrus.Fields{ - logfields.Identity: id, - logfields.Labels: key, - }).Warning("Unable update CRD identity information with a reference for this node") - - if reliablyMissing { - // Recreate a missing master key - if _, err = c.AllocateID(ctx, id, key); err != nil { - return fmt.Errorf("Unable recreate missing CRD identity %q->%q: %w", key, id, err) - } - - return nil - } - - return err -} - -func (c *crdBackend) UpdateKeyIfLocked(ctx context.Context, id idpool.ID, key allocator.AllocatorKey, reliablyMissing bool, lock kvstore.KVLocker) error { - return c.UpdateKey(ctx, id, key, reliablyMissing) -} - -// Lock does not return a lock object. Locking is not supported with the k8s -// CRD allocator. It is here to meet interface requirements. -func (c *crdBackend) Lock(ctx context.Context, key allocator.AllocatorKey) (kvstore.KVLocker, error) { - return &crdLock{}, nil -} - -type crdLock struct{} - -// Unlock does not unlock a lock object. Locking is not supported with the k8s -// CRD allocator. It is here to meet interface requirements. -func (c *crdLock) Unlock(ctx context.Context) error { - return nil -} - -// Comparator does nothing. Locking is not supported with the k8s -// CRD allocator. It is here to meet interface requirements. -func (c *crdLock) Comparator() interface{} { - return nil -} - -// get returns the identity found for the given set of labels. -// In the case of duplicate entries, return an identity entry -// from a sorted list. -func (c *crdBackend) get(ctx context.Context, key allocator.AllocatorKey) *v2.CiliumIdentity { - if c.Store == nil { - return nil - } - - identities, err := c.Store.ByIndex(byKeyIndex, key.GetKey()) - if err != nil || len(identities) == 0 { - return nil - } - - sort.Slice(identities, func(i, j int) bool { - left, ok := identities[i].(*v2.CiliumIdentity) - if !ok { - return false - } - - right, ok := identities[j].(*v2.CiliumIdentity) - if !ok { - return false - } - - return left.CreationTimestamp.Before(&right.CreationTimestamp) - }) - - for _, identityObject := range identities { - identity, ok := identityObject.(*v2.CiliumIdentity) - if !ok { - return nil - } - - if reflect.DeepEqual(identity.SecurityLabels, key.GetAsMap()) { - return identity - } - } - return nil -} - -// Get returns the first ID which is allocated to a key in the identity CRDs in -// kubernetes. -// Note: the lock field is not supported with the k8s CRD allocator. -func (c *crdBackend) Get(ctx context.Context, key allocator.AllocatorKey) (idpool.ID, error) { - identity := c.get(ctx, key) - if identity == nil { - return idpool.NoID, nil - } - - id, err := strconv.ParseUint(identity.Name, 10, 64) - if err != nil { - return idpool.NoID, fmt.Errorf("unable to parse value '%s': %w", identity.Name, err) - } - - return idpool.ID(id), nil -} - -func (c *crdBackend) GetIfLocked(ctx context.Context, key allocator.AllocatorKey, lock kvstore.KVLocker) (idpool.ID, error) { - return c.Get(ctx, key) -} - -// getById fetches the identities from the local store. Returns a nil `err` and -// false `exists` if an Identity is not found for the given `id`. -func (c *crdBackend) getById(ctx context.Context, id idpool.ID) (idty *v2.CiliumIdentity, exists bool, err error) { - if c.Store == nil { - return nil, false, fmt.Errorf("store is not available yet") - } - - identityTemplate := &v2.CiliumIdentity{ - ObjectMeta: metav1.ObjectMeta{ - Name: id.String(), - }, - } - - obj, exists, err := c.Store.Get(identityTemplate) - if err != nil { - return nil, exists, err - } - if !exists { - return nil, exists, nil - } - - identity, ok := obj.(*v2.CiliumIdentity) - if !ok { - return nil, false, fmt.Errorf("invalid object %T", obj) - } - return identity, true, nil -} - -// GetByID returns the key associated with an ID. Returns nil if no key is -// associated with the ID. -// Note: the lock field is not supported with the k8s CRD allocator. -func (c *crdBackend) GetByID(ctx context.Context, id idpool.ID) (allocator.AllocatorKey, error) { - identity, exists, err := c.getById(ctx, id) - if err != nil { - return nil, err - } - if !exists { - return nil, nil - } - - return c.KeyFunc(identity.SecurityLabels), nil -} - -// Release dissociates this node from using the identity bound to the given ID. -// When an identity has no references it may be garbage collected. -func (c *crdBackend) Release(ctx context.Context, id idpool.ID, key allocator.AllocatorKey) (err error) { - // For CiliumIdentity-based allocation, the reference counting is - // handled via CiliumEndpoint. Any CiliumEndpoint referring to a - // CiliumIdentity will keep the CiliumIdentity alive. No action is - // needed to release the reference here. - return nil -} - -func getIdentitiesByKeyFunc(keyFunc func(map[string]string) allocator.AllocatorKey) func(obj interface{}) ([]string, error) { - return func(obj interface{}) ([]string, error) { - if identity, ok := obj.(*v2.CiliumIdentity); ok { - return []string{keyFunc(identity.SecurityLabels).GetKey()}, nil - } - return []string{}, fmt.Errorf("object other than CiliumIdentity was pushed to the store") - } -} - -func (c *crdBackend) ListAndWatch(ctx context.Context, handler allocator.CacheMutations, stopChan chan struct{}) { - c.Store = cache.NewIndexer( - cache.DeletionHandlingMetaNamespaceKeyFunc, - cache.Indexers{byKeyIndex: getIdentitiesByKeyFunc(c.KeyFunc)}) - identityInformer := informer.NewInformerWithStore( - k8sUtils.ListerWatcherFromTyped[*v2.CiliumIdentityList](c.Client.CiliumV2().CiliumIdentities()), - &v2.CiliumIdentity{}, - 0, - cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - if identity, ok := obj.(*v2.CiliumIdentity); ok { - if id, err := strconv.ParseUint(identity.Name, 10, 64); err == nil { - handler.OnAdd(idpool.ID(id), c.KeyFunc(identity.SecurityLabels)) - } - } - }, - UpdateFunc: func(oldObj, newObj interface{}) { - if oldIdentity, ok := newObj.(*v2.CiliumIdentity); ok { - if newIdentity, ok := newObj.(*v2.CiliumIdentity); ok { - if oldIdentity.DeepEqual(newIdentity) { - return - } - if id, err := strconv.ParseUint(newIdentity.Name, 10, 64); err == nil { - handler.OnModify(idpool.ID(id), c.KeyFunc(newIdentity.SecurityLabels)) - } - } - } - }, - DeleteFunc: func(obj interface{}) { - // The delete event is sometimes for items with unknown state that are - // deleted anyway. - if deleteObj, isDeleteObj := obj.(cache.DeletedFinalStateUnknown); isDeleteObj { - obj = deleteObj.Obj - } - - if identity, ok := obj.(*v2.CiliumIdentity); ok { - if id, err := strconv.ParseUint(identity.Name, 10, 64); err == nil { - handler.OnDelete(idpool.ID(id), c.KeyFunc(identity.SecurityLabels)) - } - } else { - log.Debugf("Ignoring unknown delete event %#v", obj) - } - }, - }, - nil, - c.Store, - ) - - go func() { - if ok := cache.WaitForCacheSync(stopChan, identityInformer.HasSynced); ok { - handler.OnListDone() - } - }() - - identityInformer.Run(stopChan) -} - -func (c *crdBackend) Status() (string, error) { - return "OK", nil -} - -func (c *crdBackend) Encode(v string) string { - return v -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/informer/informer.go b/vendor/github.com/cilium/cilium/pkg/k8s/informer/informer.go deleted file mode 100644 index 24680ce73de..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/informer/informer.go +++ /dev/null @@ -1,148 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package informer - -import ( - "errors" - "fmt" - "net/http" - - k8sRuntime "k8s.io/apimachinery/pkg/runtime" - utilRuntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/client-go/tools/cache" - - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/time" -) - -var log = logging.DefaultLogger.WithField(logfields.LogSubsys, "k8s") - -func init() { - utilRuntime.PanicHandlers = append( - utilRuntime.PanicHandlers, - func(r interface{}) { - // from k8s library - if err, ok := r.(error); ok && errors.Is(err, http.ErrAbortHandler) { - // honor the http.ErrAbortHandler sentinel panic value: - // ErrAbortHandler is a sentinel panic value to abort a handler. - // While any panic from ServeHTTP aborts the response to the client, - // panicking with ErrAbortHandler also suppresses logging of a stack trace to the server's error log. - return - } - log.Fatal("Panic in Kubernetes runtime handler") - }, - ) -} - -type privateRunner struct { - cache.Controller - cacheMutationDetector cache.MutationDetector -} - -func (p *privateRunner) Run(stopCh <-chan struct{}) { - go p.cacheMutationDetector.Run(stopCh) - p.Controller.Run(stopCh) -} - -// NewInformer is a copy of k8s.io/client-go/tools/cache/NewInformer includes the default cache MutationDetector. -func NewInformer( - lw cache.ListerWatcher, - objType k8sRuntime.Object, - resyncPeriod time.Duration, - h cache.ResourceEventHandler, - transformer cache.TransformFunc, -) (cache.Store, cache.Controller) { - // This will hold the client state, as we know it. - clientState := cache.NewStore(cache.DeletionHandlingMetaNamespaceKeyFunc) - - return clientState, NewInformerWithStore(lw, objType, resyncPeriod, h, transformer, clientState) -} - -// NewIndexerInformer is a copy of k8s.io/client-go/tools/cache/NewIndexerInformer but includes the -// default cache MutationDetector. -func NewIndexerInformer( - lw cache.ListerWatcher, - objType k8sRuntime.Object, - resyncPeriod time.Duration, - h cache.ResourceEventHandler, - transformer cache.TransformFunc, - indexers cache.Indexers, -) (cache.Indexer, cache.Controller) { - clientState := cache.NewIndexer(cache.DeletionHandlingMetaNamespaceKeyFunc, indexers) - return clientState, NewInformerWithStore(lw, objType, resyncPeriod, h, transformer, clientState) -} - -// NewInformerWithStore uses the same arguments as NewInformer for which a caller can also set a -// cache.Store and includes the default cache MutationDetector. -func NewInformerWithStore( - lw cache.ListerWatcher, - objType k8sRuntime.Object, - resyncPeriod time.Duration, - h cache.ResourceEventHandler, - transformer cache.TransformFunc, - clientState cache.Store, -) cache.Controller { - - // 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. - opts := cache.DeltaFIFOOptions{KeyFunction: cache.MetaNamespaceKeyFunc, KnownObjects: clientState} - fifo := cache.NewDeltaFIFOWithOptions(opts) - - cacheMutationDetector := cache.NewCacheMutationDetector(fmt.Sprintf("%T", objType)) - - cfg := &cache.Config{ - Queue: fifo, - ListerWatcher: lw, - ObjectType: objType, - FullResyncPeriod: resyncPeriod, - RetryOnError: false, - - Process: func(obj interface{}, isInInitialList bool) error { - // from oldest to newest - for _, d := range obj.(cache.Deltas) { - - var obj interface{} - if transformer != nil { - var err error - if obj, err = transformer(d.Object); err != nil { - return err - } - } else { - obj = d.Object - } - - // In CI we detect if the objects were modified and panic - // this is a no-op in production environments. - cacheMutationDetector.AddObject(obj) - - switch d.Type { - case cache.Sync, cache.Added, cache.Updated: - if old, exists, err := clientState.Get(obj); err == nil && exists { - if err := clientState.Update(obj); err != nil { - return err - } - h.OnUpdate(old, obj) - } else { - if err := clientState.Add(obj); err != nil { - return err - } - h.OnAdd(obj, isInInitialList) - } - case cache.Deleted: - if err := clientState.Delete(obj); err != nil { - return err - } - h.OnDelete(obj) - } - } - return nil - }, - } - return &privateRunner{ - Controller: cache.New(cfg), - cacheMutationDetector: cacheMutationDetector, - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/metrics/metrics.go b/vendor/github.com/cilium/cilium/pkg/k8s/metrics/metrics.go deleted file mode 100644 index f153855994c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/metrics/metrics.go +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -import ( - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/time" -) - -var ( - // LastInteraction is the time at which the last apiserver interaction - // occurred - LastInteraction eventTimestamper - // LastSuccessInteraction is the time at which we have received a successful - // k8s apiserver reply (i.e. a response code 2xx or 4xx). - LastSuccessInteraction eventTimestamper -) - -type eventTimestamper struct { - timestamp time.Time - lock lock.RWMutex -} - -// Reset sets the timestamp to the current time -func (e *eventTimestamper) Reset() { - e.lock.Lock() - e.timestamp = time.Now() - e.lock.Unlock() -} - -// Time returns the timestamp as set per Reset() -func (e *eventTimestamper) Time() time.Time { - e.lock.RLock() - t := e.timestamp - e.lock.RUnlock() - return t -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/doc.go deleted file mode 100644 index bbb73f80cc2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/doc.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +deepequal-gen=package -// +groupGoName=core - -// Package v1 contains slimmer versions of k8s core types. -package v1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.pb.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.pb.go deleted file mode 100644 index f76b229b0b1..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.pb.go +++ /dev/null @@ -1,10814 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - - io "io" - - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *ClientIPConfig) Reset() { *m = ClientIPConfig{} } -func (*ClientIPConfig) ProtoMessage() {} -func (*ClientIPConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{0} -} -func (m *ClientIPConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClientIPConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClientIPConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClientIPConfig.Merge(m, src) -} -func (m *ClientIPConfig) XXX_Size() int { - return m.Size() -} -func (m *ClientIPConfig) XXX_DiscardUnknown() { - xxx_messageInfo_ClientIPConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_ClientIPConfig proto.InternalMessageInfo - -func (m *Container) Reset() { *m = Container{} } -func (*Container) ProtoMessage() {} -func (*Container) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{1} -} -func (m *Container) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Container) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Container) XXX_Merge(src proto.Message) { - xxx_messageInfo_Container.Merge(m, src) -} -func (m *Container) XXX_Size() int { - return m.Size() -} -func (m *Container) XXX_DiscardUnknown() { - xxx_messageInfo_Container.DiscardUnknown(m) -} - -var xxx_messageInfo_Container proto.InternalMessageInfo - -func (m *ContainerPort) Reset() { *m = ContainerPort{} } -func (*ContainerPort) ProtoMessage() {} -func (*ContainerPort) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{2} -} -func (m *ContainerPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerPort.Merge(m, src) -} -func (m *ContainerPort) XXX_Size() int { - return m.Size() -} -func (m *ContainerPort) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerPort.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerPort proto.InternalMessageInfo - -func (m *ContainerState) Reset() { *m = ContainerState{} } -func (*ContainerState) ProtoMessage() {} -func (*ContainerState) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{3} -} -func (m *ContainerState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerState.Merge(m, src) -} -func (m *ContainerState) XXX_Size() int { - return m.Size() -} -func (m *ContainerState) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerState.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerState proto.InternalMessageInfo - -func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} } -func (*ContainerStateRunning) ProtoMessage() {} -func (*ContainerStateRunning) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{4} -} -func (m *ContainerStateRunning) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerStateRunning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerStateRunning) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerStateRunning.Merge(m, src) -} -func (m *ContainerStateRunning) XXX_Size() int { - return m.Size() -} -func (m *ContainerStateRunning) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerStateRunning.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerStateRunning proto.InternalMessageInfo - -func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } -func (*ContainerStatus) ProtoMessage() {} -func (*ContainerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{5} -} -func (m *ContainerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContainerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ContainerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContainerStatus.Merge(m, src) -} -func (m *ContainerStatus) XXX_Size() int { - return m.Size() -} -func (m *ContainerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ContainerStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ContainerStatus proto.InternalMessageInfo - -func (m *EndpointAddress) Reset() { *m = EndpointAddress{} } -func (*EndpointAddress) ProtoMessage() {} -func (*EndpointAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{6} -} -func (m *EndpointAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointAddress.Merge(m, src) -} -func (m *EndpointAddress) XXX_Size() int { - return m.Size() -} -func (m *EndpointAddress) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointAddress proto.InternalMessageInfo - -func (m *EndpointPort) Reset() { *m = EndpointPort{} } -func (*EndpointPort) ProtoMessage() {} -func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{7} -} -func (m *EndpointPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointPort.Merge(m, src) -} -func (m *EndpointPort) XXX_Size() int { - return m.Size() -} -func (m *EndpointPort) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointPort.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointPort proto.InternalMessageInfo - -func (m *EndpointSubset) Reset() { *m = EndpointSubset{} } -func (*EndpointSubset) ProtoMessage() {} -func (*EndpointSubset) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{8} -} -func (m *EndpointSubset) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointSubset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointSubset) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointSubset.Merge(m, src) -} -func (m *EndpointSubset) XXX_Size() int { - return m.Size() -} -func (m *EndpointSubset) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointSubset.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointSubset proto.InternalMessageInfo - -func (m *Endpoints) Reset() { *m = Endpoints{} } -func (*Endpoints) ProtoMessage() {} -func (*Endpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{9} -} -func (m *Endpoints) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Endpoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Endpoints) XXX_Merge(src proto.Message) { - xxx_messageInfo_Endpoints.Merge(m, src) -} -func (m *Endpoints) XXX_Size() int { - return m.Size() -} -func (m *Endpoints) XXX_DiscardUnknown() { - xxx_messageInfo_Endpoints.DiscardUnknown(m) -} - -var xxx_messageInfo_Endpoints proto.InternalMessageInfo - -func (m *EndpointsList) Reset() { *m = EndpointsList{} } -func (*EndpointsList) ProtoMessage() {} -func (*EndpointsList) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{10} -} -func (m *EndpointsList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointsList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointsList) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointsList.Merge(m, src) -} -func (m *EndpointsList) XXX_Size() int { - return m.Size() -} -func (m *EndpointsList) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointsList.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointsList proto.InternalMessageInfo - -func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} } -func (*LoadBalancerIngress) ProtoMessage() {} -func (*LoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{11} -} -func (m *LoadBalancerIngress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LoadBalancerIngress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LoadBalancerIngress) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadBalancerIngress.Merge(m, src) -} -func (m *LoadBalancerIngress) XXX_Size() int { - return m.Size() -} -func (m *LoadBalancerIngress) XXX_DiscardUnknown() { - xxx_messageInfo_LoadBalancerIngress.DiscardUnknown(m) -} - -var xxx_messageInfo_LoadBalancerIngress proto.InternalMessageInfo - -func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} } -func (*LoadBalancerStatus) ProtoMessage() {} -func (*LoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{12} -} -func (m *LoadBalancerStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LoadBalancerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LoadBalancerStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadBalancerStatus.Merge(m, src) -} -func (m *LoadBalancerStatus) XXX_Size() int { - return m.Size() -} -func (m *LoadBalancerStatus) XXX_DiscardUnknown() { - xxx_messageInfo_LoadBalancerStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_LoadBalancerStatus proto.InternalMessageInfo - -func (m *Namespace) Reset() { *m = Namespace{} } -func (*Namespace) ProtoMessage() {} -func (*Namespace) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{13} -} -func (m *Namespace) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Namespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Namespace) XXX_Merge(src proto.Message) { - xxx_messageInfo_Namespace.Merge(m, src) -} -func (m *Namespace) XXX_Size() int { - return m.Size() -} -func (m *Namespace) XXX_DiscardUnknown() { - xxx_messageInfo_Namespace.DiscardUnknown(m) -} - -var xxx_messageInfo_Namespace proto.InternalMessageInfo - -func (m *NamespaceList) Reset() { *m = NamespaceList{} } -func (*NamespaceList) ProtoMessage() {} -func (*NamespaceList) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{14} -} -func (m *NamespaceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NamespaceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NamespaceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamespaceList.Merge(m, src) -} -func (m *NamespaceList) XXX_Size() int { - return m.Size() -} -func (m *NamespaceList) XXX_DiscardUnknown() { - xxx_messageInfo_NamespaceList.DiscardUnknown(m) -} - -var xxx_messageInfo_NamespaceList proto.InternalMessageInfo - -func (m *Node) Reset() { *m = Node{} } -func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{15} -} -func (m *Node) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Node) XXX_Merge(src proto.Message) { - xxx_messageInfo_Node.Merge(m, src) -} -func (m *Node) XXX_Size() int { - return m.Size() -} -func (m *Node) XXX_DiscardUnknown() { - xxx_messageInfo_Node.DiscardUnknown(m) -} - -var xxx_messageInfo_Node proto.InternalMessageInfo - -func (m *NodeAddress) Reset() { *m = NodeAddress{} } -func (*NodeAddress) ProtoMessage() {} -func (*NodeAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{16} -} -func (m *NodeAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeAddress.Merge(m, src) -} -func (m *NodeAddress) XXX_Size() int { - return m.Size() -} -func (m *NodeAddress) XXX_DiscardUnknown() { - xxx_messageInfo_NodeAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeAddress proto.InternalMessageInfo - -func (m *NodeCondition) Reset() { *m = NodeCondition{} } -func (*NodeCondition) ProtoMessage() {} -func (*NodeCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{17} -} -func (m *NodeCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeCondition.Merge(m, src) -} -func (m *NodeCondition) XXX_Size() int { - return m.Size() -} -func (m *NodeCondition) XXX_DiscardUnknown() { - xxx_messageInfo_NodeCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeCondition proto.InternalMessageInfo - -func (m *NodeList) Reset() { *m = NodeList{} } -func (*NodeList) ProtoMessage() {} -func (*NodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{18} -} -func (m *NodeList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeList) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeList.Merge(m, src) -} -func (m *NodeList) XXX_Size() int { - return m.Size() -} -func (m *NodeList) XXX_DiscardUnknown() { - xxx_messageInfo_NodeList.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeList proto.InternalMessageInfo - -func (m *NodeSpec) Reset() { *m = NodeSpec{} } -func (*NodeSpec) ProtoMessage() {} -func (*NodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{19} -} -func (m *NodeSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeSpec.Merge(m, src) -} -func (m *NodeSpec) XXX_Size() int { - return m.Size() -} -func (m *NodeSpec) XXX_DiscardUnknown() { - xxx_messageInfo_NodeSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeSpec proto.InternalMessageInfo - -func (m *NodeStatus) Reset() { *m = NodeStatus{} } -func (*NodeStatus) ProtoMessage() {} -func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{20} -} -func (m *NodeStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeStatus.Merge(m, src) -} -func (m *NodeStatus) XXX_Size() int { - return m.Size() -} -func (m *NodeStatus) XXX_DiscardUnknown() { - xxx_messageInfo_NodeStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeStatus proto.InternalMessageInfo - -func (m *Pod) Reset() { *m = Pod{} } -func (*Pod) ProtoMessage() {} -func (*Pod) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{21} -} -func (m *Pod) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Pod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Pod) XXX_Merge(src proto.Message) { - xxx_messageInfo_Pod.Merge(m, src) -} -func (m *Pod) XXX_Size() int { - return m.Size() -} -func (m *Pod) XXX_DiscardUnknown() { - xxx_messageInfo_Pod.DiscardUnknown(m) -} - -var xxx_messageInfo_Pod proto.InternalMessageInfo - -func (m *PodCondition) Reset() { *m = PodCondition{} } -func (*PodCondition) ProtoMessage() {} -func (*PodCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{22} -} -func (m *PodCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodCondition.Merge(m, src) -} -func (m *PodCondition) XXX_Size() int { - return m.Size() -} -func (m *PodCondition) XXX_DiscardUnknown() { - xxx_messageInfo_PodCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_PodCondition proto.InternalMessageInfo - -func (m *PodIP) Reset() { *m = PodIP{} } -func (*PodIP) ProtoMessage() {} -func (*PodIP) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{23} -} -func (m *PodIP) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodIP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodIP) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodIP.Merge(m, src) -} -func (m *PodIP) XXX_Size() int { - return m.Size() -} -func (m *PodIP) XXX_DiscardUnknown() { - xxx_messageInfo_PodIP.DiscardUnknown(m) -} - -var xxx_messageInfo_PodIP proto.InternalMessageInfo - -func (m *PodList) Reset() { *m = PodList{} } -func (*PodList) ProtoMessage() {} -func (*PodList) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{24} -} -func (m *PodList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodList.Merge(m, src) -} -func (m *PodList) XXX_Size() int { - return m.Size() -} -func (m *PodList) XXX_DiscardUnknown() { - xxx_messageInfo_PodList.DiscardUnknown(m) -} - -var xxx_messageInfo_PodList proto.InternalMessageInfo - -func (m *PodSpec) Reset() { *m = PodSpec{} } -func (*PodSpec) ProtoMessage() {} -func (*PodSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{25} -} -func (m *PodSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodSpec.Merge(m, src) -} -func (m *PodSpec) XXX_Size() int { - return m.Size() -} -func (m *PodSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PodSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_PodSpec proto.InternalMessageInfo - -func (m *PodStatus) Reset() { *m = PodStatus{} } -func (*PodStatus) ProtoMessage() {} -func (*PodStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{26} -} -func (m *PodStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodStatus.Merge(m, src) -} -func (m *PodStatus) XXX_Size() int { - return m.Size() -} -func (m *PodStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PodStatus proto.InternalMessageInfo - -func (m *PortStatus) Reset() { *m = PortStatus{} } -func (*PortStatus) ProtoMessage() {} -func (*PortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{27} -} -func (m *PortStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PortStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PortStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PortStatus.Merge(m, src) -} -func (m *PortStatus) XXX_Size() int { - return m.Size() -} -func (m *PortStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PortStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_PortStatus proto.InternalMessageInfo - -func (m *Secret) Reset() { *m = Secret{} } -func (*Secret) ProtoMessage() {} -func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{28} -} -func (m *Secret) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Secret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Secret) XXX_Merge(src proto.Message) { - xxx_messageInfo_Secret.Merge(m, src) -} -func (m *Secret) XXX_Size() int { - return m.Size() -} -func (m *Secret) XXX_DiscardUnknown() { - xxx_messageInfo_Secret.DiscardUnknown(m) -} - -var xxx_messageInfo_Secret proto.InternalMessageInfo - -func (m *SecretList) Reset() { *m = SecretList{} } -func (*SecretList) ProtoMessage() {} -func (*SecretList) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{29} -} -func (m *SecretList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SecretList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SecretList) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecretList.Merge(m, src) -} -func (m *SecretList) XXX_Size() int { - return m.Size() -} -func (m *SecretList) XXX_DiscardUnknown() { - xxx_messageInfo_SecretList.DiscardUnknown(m) -} - -var xxx_messageInfo_SecretList proto.InternalMessageInfo - -func (m *Service) Reset() { *m = Service{} } -func (*Service) ProtoMessage() {} -func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{30} -} -func (m *Service) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Service) XXX_Merge(src proto.Message) { - xxx_messageInfo_Service.Merge(m, src) -} -func (m *Service) XXX_Size() int { - return m.Size() -} -func (m *Service) XXX_DiscardUnknown() { - xxx_messageInfo_Service.DiscardUnknown(m) -} - -var xxx_messageInfo_Service proto.InternalMessageInfo - -func (m *ServiceList) Reset() { *m = ServiceList{} } -func (*ServiceList) ProtoMessage() {} -func (*ServiceList) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{31} -} -func (m *ServiceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceList.Merge(m, src) -} -func (m *ServiceList) XXX_Size() int { - return m.Size() -} -func (m *ServiceList) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceList.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceList proto.InternalMessageInfo - -func (m *ServicePort) Reset() { *m = ServicePort{} } -func (*ServicePort) ProtoMessage() {} -func (*ServicePort) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{32} -} -func (m *ServicePort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServicePort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServicePort) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServicePort.Merge(m, src) -} -func (m *ServicePort) XXX_Size() int { - return m.Size() -} -func (m *ServicePort) XXX_DiscardUnknown() { - xxx_messageInfo_ServicePort.DiscardUnknown(m) -} - -var xxx_messageInfo_ServicePort proto.InternalMessageInfo - -func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } -func (*ServiceSpec) ProtoMessage() {} -func (*ServiceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{33} -} -func (m *ServiceSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceSpec.Merge(m, src) -} -func (m *ServiceSpec) XXX_Size() int { - return m.Size() -} -func (m *ServiceSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceSpec proto.InternalMessageInfo - -func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } -func (*ServiceStatus) ProtoMessage() {} -func (*ServiceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{34} -} -func (m *ServiceStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceStatus.Merge(m, src) -} -func (m *ServiceStatus) XXX_Size() int { - return m.Size() -} -func (m *ServiceStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceStatus proto.InternalMessageInfo - -func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } -func (*SessionAffinityConfig) ProtoMessage() {} -func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{35} -} -func (m *SessionAffinityConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SessionAffinityConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SessionAffinityConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_SessionAffinityConfig.Merge(m, src) -} -func (m *SessionAffinityConfig) XXX_Size() int { - return m.Size() -} -func (m *SessionAffinityConfig) XXX_DiscardUnknown() { - xxx_messageInfo_SessionAffinityConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_SessionAffinityConfig proto.InternalMessageInfo - -func (m *Taint) Reset() { *m = Taint{} } -func (*Taint) ProtoMessage() {} -func (*Taint) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{36} -} -func (m *Taint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Taint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Taint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Taint.Merge(m, src) -} -func (m *Taint) XXX_Size() int { - return m.Size() -} -func (m *Taint) XXX_DiscardUnknown() { - xxx_messageInfo_Taint.DiscardUnknown(m) -} - -var xxx_messageInfo_Taint proto.InternalMessageInfo - -func (m *TypedLocalObjectReference) Reset() { *m = TypedLocalObjectReference{} } -func (*TypedLocalObjectReference) ProtoMessage() {} -func (*TypedLocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{37} -} -func (m *TypedLocalObjectReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TypedLocalObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TypedLocalObjectReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypedLocalObjectReference.Merge(m, src) -} -func (m *TypedLocalObjectReference) XXX_Size() int { - return m.Size() -} -func (m *TypedLocalObjectReference) XXX_DiscardUnknown() { - xxx_messageInfo_TypedLocalObjectReference.DiscardUnknown(m) -} - -var xxx_messageInfo_TypedLocalObjectReference proto.InternalMessageInfo - -func (m *VolumeMount) Reset() { *m = VolumeMount{} } -func (*VolumeMount) ProtoMessage() {} -func (*VolumeMount) Descriptor() ([]byte, []int) { - return fileDescriptor_871504499faea14d, []int{38} -} -func (m *VolumeMount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VolumeMount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *VolumeMount) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeMount.Merge(m, src) -} -func (m *VolumeMount) XXX_Size() int { - return m.Size() -} -func (m *VolumeMount) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeMount.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeMount proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ClientIPConfig)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.ClientIPConfig") - proto.RegisterType((*Container)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.Container") - proto.RegisterType((*ContainerPort)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.ContainerPort") - proto.RegisterType((*ContainerState)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.ContainerState") - proto.RegisterType((*ContainerStateRunning)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.ContainerStateRunning") - proto.RegisterType((*ContainerStatus)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.ContainerStatus") - proto.RegisterType((*EndpointAddress)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.EndpointAddress") - proto.RegisterType((*EndpointPort)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.EndpointPort") - proto.RegisterType((*EndpointSubset)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.EndpointSubset") - proto.RegisterType((*Endpoints)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.Endpoints") - proto.RegisterType((*EndpointsList)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.EndpointsList") - proto.RegisterType((*LoadBalancerIngress)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.LoadBalancerIngress") - proto.RegisterType((*LoadBalancerStatus)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.LoadBalancerStatus") - proto.RegisterType((*Namespace)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.Namespace") - proto.RegisterType((*NamespaceList)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.NamespaceList") - proto.RegisterType((*Node)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.Node") - proto.RegisterType((*NodeAddress)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.NodeAddress") - proto.RegisterType((*NodeCondition)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.NodeCondition") - proto.RegisterType((*NodeList)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.NodeList") - proto.RegisterType((*NodeSpec)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.NodeSpec") - proto.RegisterType((*NodeStatus)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.NodeStatus") - proto.RegisterType((*Pod)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.Pod") - proto.RegisterType((*PodCondition)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.PodCondition") - proto.RegisterType((*PodIP)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.PodIP") - proto.RegisterType((*PodList)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.PodList") - proto.RegisterType((*PodSpec)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.PodSpec") - proto.RegisterType((*PodStatus)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.PodStatus") - proto.RegisterType((*PortStatus)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.PortStatus") - proto.RegisterType((*Secret)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.Secret") - proto.RegisterMapType((map[string]Bytes)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.Secret.DataEntry") - proto.RegisterMapType((map[string]string)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.Secret.StringDataEntry") - proto.RegisterType((*SecretList)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.SecretList") - proto.RegisterType((*Service)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.Service") - proto.RegisterType((*ServiceList)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.ServiceList") - proto.RegisterType((*ServicePort)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.ServicePort") - proto.RegisterType((*ServiceSpec)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.ServiceSpec") - proto.RegisterMapType((map[string]string)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.ServiceSpec.SelectorEntry") - proto.RegisterType((*ServiceStatus)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.ServiceStatus") - proto.RegisterType((*SessionAffinityConfig)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.SessionAffinityConfig") - proto.RegisterType((*Taint)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.Taint") - proto.RegisterType((*TypedLocalObjectReference)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.TypedLocalObjectReference") - proto.RegisterType((*VolumeMount)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1.VolumeMount") -} - -func init() { - proto.RegisterFile("github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.proto", fileDescriptor_871504499faea14d) -} - -var fileDescriptor_871504499faea14d = []byte{ - // 2659 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5a, 0xcf, 0x6f, 0x23, 0x49, - 0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, 0x52, 0xbc, 0xfe, 0xfa, 0x8b, 0x4d, 0x88, 0x96, 0x79, 0x88, 0xe0, 0x33, - 0xe2, 0x67, 0xa9, 0x32, 0x27, 0x97, 0xa2, 0xd0, 0x50, 0x6a, 0x71, 0x8c, 0x60, 0xfd, 0xc6, 0x80, - 0xd9, 0xd4, 0x44, 0xba, 0x14, 0xbd, 0x07, 0x39, 0xca, 0xa7, 0x24, 0xd7, 0x63, 0xe3, 0x4c, 0xd6, - 0x23, 0x3e, 0x0f, 0x91, 0xb9, 0x11, 0x04, 0x5a, 0x85, 0xa2, 0xf6, 0x81, 0xda, 0xba, 0x99, 0x17, - 0xbb, 0x77, 0x51, 0x8a, 0x16, 0xab, 0x31, 0x0b, 0x27, 0xe5, 0xac, 0xaf, 0xc3, 0xec, 0x86, 0xef, - 0x76, 0x02, 0xcf, 0x67, 0x6b, 0xae, 0x1b, 0x12, 0x4a, 0xd1, 0x02, 0x64, 0xbc, 0x8e, 0xf4, 0x63, - 0x90, 0x0a, 0x32, 0xb5, 0x3a, 0xce, 0x78, 0x1d, 0x74, 0x15, 0xf2, 0x7e, 0xe0, 0x12, 0xee, 0xd5, - 0xd2, 0xb1, 0xa6, 0xb9, 0x53, 0x3d, 0x90, 0x34, 0xac, 0xb9, 0xd6, 0x23, 0x03, 0xa6, 0x95, 0xe6, - 0x53, 0x1e, 0x90, 0x65, 0x98, 0xe8, 0xc4, 0x87, 0x43, 0x4b, 0x08, 0x07, 0x17, 0x9c, 0x94, 0x5f, - 0x67, 0x5f, 0xc4, 0xaf, 0xad, 0x7f, 0x1a, 0x50, 0x52, 0xd3, 0x69, 0x74, 0x77, 0x28, 0x61, 0xe8, - 0x21, 0x14, 0xec, 0xc8, 0x64, 0xc2, 0x03, 0x27, 0x0f, 0x1f, 0xf7, 0x46, 0xdc, 0xa1, 0xbe, 0x25, - 0x8c, 0x5d, 0x65, 0x4d, 0x01, 0xe0, 0x18, 0x0b, 0xed, 0xa9, 0x28, 0x99, 0x15, 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 0x92, 0x69, 0xb3, 0x76, 0x06, 0x7f, 0xfb, 0xc9, 0xdc, 0xad, 0xbf, 0x0a, 0x4a, 0xf2, 0x70, 0x0a, - 0x14, 0x75, 0x07, 0x34, 0xcf, 0x6b, 0xa3, 0x66, 0xee, 0x53, 0xb7, 0xce, 0xd6, 0x47, 0x06, 0x0c, - 0x76, 0x5e, 0x14, 0x40, 0xde, 0x91, 0x9f, 0x8c, 0xc9, 0x15, 0x19, 0xf9, 0x1b, 0x94, 0xd4, 0x97, - 0x67, 0xd1, 0x85, 0xbf, 0xa2, 0x61, 0x0d, 0x62, 0xfd, 0xdd, 0x80, 0x9c, 0xb8, 0x69, 0x47, 0xaf, - 0x26, 0xf6, 0xb3, 0x52, 0x94, 0x16, 0x64, 0xdf, 0x22, 0xbd, 0x68, 0x73, 0xaf, 0xa4, 0x36, 0x37, - 0xce, 0x7e, 0xef, 0x70, 0xa2, 0xdc, 0x6b, 0xb4, 0x0a, 0x93, 0x64, 0x77, 0x97, 0x38, 0x4c, 0xa6, - 0x9e, 0x57, 0x55, 0xfd, 0xb4, 0x21, 0xa8, 0x3c, 0x41, 0x08, 0xb0, 0xe8, 0x15, 0x4b, 0x61, 0xde, - 0x97, 0x33, 0xaf, 0x4d, 0xd6, 0x5c, 0x97, 0xb8, 0x67, 0x72, 0x1d, 0x29, 0x1a, 0xb2, 0x6d, 0xa5, - 0x12, 0xc7, 0xda, 0x79, 0x23, 0x7b, 0x89, 0x27, 0x27, 0x77, 0x33, 0x70, 0xec, 0x56, 0x54, 0xb0, - 0x62, 0xb2, 0x4b, 0x42, 0xe2, 0x3b, 0x04, 0x5d, 0x85, 0xbc, 0xdd, 0xf1, 0xde, 0x08, 0x83, 0xae, - 0xba, 0x40, 0x14, 0xeb, 0xb6, 0x56, 0xaf, 0x09, 0x1a, 0xd6, 0x5c, 0x5e, 0xb0, 0xec, 0x7b, 0xbe, - 0x2b, 0x57, 0x43, 0x17, 0x2c, 0x6f, 0x79, 0xbe, 0x8b, 0x05, 0x47, 0x97, 0x4b, 0xd9, 0x61, 0xe5, - 0x92, 0x75, 0x07, 0x8a, 0x89, 0x2f, 0xd6, 0x78, 0xea, 0x6e, 0xf3, 0x87, 0xba, 0xcd, 0xf6, 0xfa, - 0x53, 0xf7, 0x96, 0x62, 0xe0, 0x58, 0xa6, 0xf2, 0xad, 0xc7, 0x4f, 0x17, 0x2f, 0x7c, 0xfc, 0x74, - 0xf1, 0xc2, 0x93, 0xa7, 0x8b, 0x17, 0x3e, 0x38, 0x5a, 0x34, 0x1e, 0x1f, 0x2d, 0x1a, 0x1f, 0x1f, - 0x2d, 0x1a, 0x4f, 0x8e, 0x16, 0x8d, 0x4f, 0x8e, 0x16, 0x8d, 0x9f, 0xff, 0x75, 0xf1, 0xc2, 0x37, - 0x57, 0x47, 0xfa, 0xc6, 0xf3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x64, 0x82, 0x76, 0x1b, - 0x2a, 0x00, 0x00, -} - -func (m *ClientIPConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClientIPConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClientIPConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TimeoutSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Container) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Container) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Container) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.VolumeMounts) > 0 { - for iNdEx := len(m.VolumeMounts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VolumeMounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if len(m.Ports) > 0 { - for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - i -= len(m.Image) - copy(dAtA[i:], m.Image) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Image))) - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ContainerPort) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContainerPort) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContainerPort) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.HostIP) - copy(dAtA[i:], m.HostIP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.HostIP))) - i-- - dAtA[i] = 0x2a - i -= len(m.Protocol) - copy(dAtA[i:], m.Protocol) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) - i-- - dAtA[i] = 0x22 - i = encodeVarintGenerated(dAtA, i, uint64(m.ContainerPort)) - i-- - dAtA[i] = 0x18 - i = encodeVarintGenerated(dAtA, i, uint64(m.HostPort)) - i-- - dAtA[i] = 0x10 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ContainerState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContainerState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContainerState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Running != nil { - { - size, err := m.Running.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *ContainerStateRunning) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContainerStateRunning) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContainerStateRunning) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.StartedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ContainerStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContainerStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContainerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.ContainerID) - copy(dAtA[i:], m.ContainerID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerID))) - i-- - dAtA[i] = 0x42 - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - return len(dAtA) - i, nil -} - -func (m *EndpointAddress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointAddress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NodeName != nil { - i -= len(*m.NodeName) - copy(dAtA[i:], *m.NodeName) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.NodeName))) - i-- - dAtA[i] = 0x22 - } - i -= len(m.IP) - copy(dAtA[i:], m.IP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.IP))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EndpointPort) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointPort) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointPort) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Protocol) - copy(dAtA[i:], m.Protocol) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) - i-- - dAtA[i] = 0x1a - i = encodeVarintGenerated(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x10 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EndpointSubset) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointSubset) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointSubset) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ports) > 0 { - for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Addresses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Endpoints) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Endpoints) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Endpoints) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Subsets) > 0 { - for iNdEx := len(m.Subsets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Subsets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EndpointsList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointsList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointsList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *LoadBalancerIngress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LoadBalancerIngress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LoadBalancerIngress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ports) > 0 { - for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.IPMode != nil { - i -= len(*m.IPMode) - copy(dAtA[i:], *m.IPMode) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.IPMode))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.Hostname) - copy(dAtA[i:], m.Hostname) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Hostname))) - i-- - dAtA[i] = 0x12 - i -= len(m.IP) - copy(dAtA[i:], m.IP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.IP))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *LoadBalancerStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LoadBalancerStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LoadBalancerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ingress) > 0 { - for iNdEx := len(m.Ingress) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ingress[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Namespace) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Namespace) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Namespace) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NamespaceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NamespaceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NamespaceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Node) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Node) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NodeAddress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeAddress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NodeCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x2a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NodeList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NodeSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PodCIDRs) > 0 { - for iNdEx := len(m.PodCIDRs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PodCIDRs[iNdEx]) - copy(dAtA[i:], m.PodCIDRs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodCIDRs[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.Taints) > 0 { - for iNdEx := len(m.Taints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Taints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - i -= len(m.ProviderID) - copy(dAtA[i:], m.ProviderID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ProviderID))) - i-- - dAtA[i] = 0x1a - i -= len(m.PodCIDR) - copy(dAtA[i:], m.PodCIDR) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodCIDR))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NodeStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Addresses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - return len(dAtA) - i, nil -} - -func (m *Pod) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Pod) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Pod) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x32 - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x2a - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.LastProbeTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodIP) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodIP) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodIP) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.IP) - copy(dAtA[i:], m.IP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.IP))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.InitContainers) > 0 { - for iNdEx := len(m.InitContainers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.InitContainers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - } - i-- - if m.HostNetwork { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - i -= len(m.NodeName) - copy(dAtA[i:], m.NodeName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) - i-- - dAtA[i] = 0x52 - i -= len(m.ServiceAccountName) - copy(dAtA[i:], m.ServiceAccountName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceAccountName))) - i-- - dAtA[i] = 0x42 - if len(m.Containers) > 0 { - for iNdEx := len(m.Containers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Containers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - return len(dAtA) - i, nil -} - -func (m *PodStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PodIPs) > 0 { - for iNdEx := len(m.PodIPs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PodIPs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - } - i -= len(m.QOSClass) - copy(dAtA[i:], m.QOSClass) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.QOSClass))) - i-- - dAtA[i] = 0x4a - if len(m.ContainerStatuses) > 0 { - for iNdEx := len(m.ContainerStatuses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ContainerStatuses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if m.StartTime != nil { - { - size, err := m.StartTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - i -= len(m.PodIP) - copy(dAtA[i:], m.PodIP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodIP))) - i-- - dAtA[i] = 0x32 - i -= len(m.HostIP) - copy(dAtA[i:], m.HostIP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.HostIP))) - i-- - dAtA[i] = 0x2a - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Phase) - copy(dAtA[i:], m.Phase) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PortStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PortStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PortStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Error != nil { - i -= len(*m.Error) - copy(dAtA[i:], *m.Error) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Error))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.Protocol) - copy(dAtA[i:], m.Protocol) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) - i-- - dAtA[i] = 0x12 - i = encodeVarintGenerated(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func (m *Secret) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Secret) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Secret) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Immutable != nil { - i-- - if *m.Immutable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.StringData) > 0 { - keysForStringData := make([]string, 0, len(m.StringData)) - for k := range m.StringData { - keysForStringData = append(keysForStringData, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringData) - for iNdEx := len(keysForStringData) - 1; iNdEx >= 0; iNdEx-- { - v := m.StringData[string(keysForStringData[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForStringData[iNdEx]) - copy(dAtA[i:], keysForStringData[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForStringData[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x1a - if len(m.Data) > 0 { - keysForData := make([]string, 0, len(m.Data)) - for k := range m.Data { - keysForData = append(keysForData, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForData) - for iNdEx := len(keysForData) - 1; iNdEx >= 0; iNdEx-- { - v := m.Data[string(keysForData[iNdEx])] - baseI := i - if v != nil { - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - } - i -= len(keysForData[iNdEx]) - copy(dAtA[i:], keysForData[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForData[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SecretList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SecretList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SecretList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Service) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Service) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ServiceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ServicePort) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServicePort) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServicePort) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.NodePort)) - i-- - dAtA[i] = 0x28 - i = encodeVarintGenerated(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x18 - i -= len(m.Protocol) - copy(dAtA[i:], m.Protocol) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ServiceSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.InternalTrafficPolicy != nil { - i -= len(*m.InternalTrafficPolicy) - copy(dAtA[i:], *m.InternalTrafficPolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.InternalTrafficPolicy))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - if m.LoadBalancerClass != nil { - i -= len(*m.LoadBalancerClass) - copy(dAtA[i:], *m.LoadBalancerClass) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.LoadBalancerClass))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if len(m.IPFamilies) > 0 { - for iNdEx := len(m.IPFamilies) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.IPFamilies[iNdEx]) - copy(dAtA[i:], m.IPFamilies[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.IPFamilies[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - } - if len(m.ClusterIPs) > 0 { - for iNdEx := len(m.ClusterIPs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ClusterIPs[iNdEx]) - copy(dAtA[i:], m.ClusterIPs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClusterIPs[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - } - if m.IPFamilyPolicy != nil { - i -= len(*m.IPFamilyPolicy) - copy(dAtA[i:], *m.IPFamilyPolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.IPFamilyPolicy))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if m.SessionAffinityConfig != nil { - { - size, err := m.SessionAffinityConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - i = encodeVarintGenerated(dAtA, i, uint64(m.HealthCheckNodePort)) - i-- - dAtA[i] = 0x60 - i -= len(m.ExternalTrafficPolicy) - copy(dAtA[i:], m.ExternalTrafficPolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ExternalTrafficPolicy))) - i-- - dAtA[i] = 0x5a - if len(m.LoadBalancerSourceRanges) > 0 { - for iNdEx := len(m.LoadBalancerSourceRanges) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.LoadBalancerSourceRanges[iNdEx]) - copy(dAtA[i:], m.LoadBalancerSourceRanges[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.LoadBalancerSourceRanges[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - i -= len(m.LoadBalancerIP) - copy(dAtA[i:], m.LoadBalancerIP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.LoadBalancerIP))) - i-- - dAtA[i] = 0x42 - i -= len(m.SessionAffinity) - copy(dAtA[i:], m.SessionAffinity) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SessionAffinity))) - i-- - dAtA[i] = 0x3a - if len(m.ExternalIPs) > 0 { - for iNdEx := len(m.ExternalIPs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExternalIPs[iNdEx]) - copy(dAtA[i:], m.ExternalIPs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ExternalIPs[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x22 - i -= len(m.ClusterIP) - copy(dAtA[i:], m.ClusterIP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClusterIP))) - i-- - dAtA[i] = 0x1a - 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 iNdEx := len(keysForSelector) - 1; iNdEx >= 0; iNdEx-- { - v := m.Selector[string(keysForSelector[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForSelector[iNdEx]) - copy(dAtA[i:], keysForSelector[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForSelector[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Ports) > 0 { - for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ServiceStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.LoadBalancer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SessionAffinityConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SessionAffinityConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SessionAffinityConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ClientIP != nil { - { - size, err := m.ClientIP.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Taint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Taint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Taint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TimeAdded != nil { - { - size, err := m.TimeAdded.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - i -= len(m.Effect) - copy(dAtA[i:], m.Effect) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect))) - i-- - dAtA[i] = 0x1a - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TypedLocalObjectReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TypedLocalObjectReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TypedLocalObjectReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0x12 - if m.APIGroup != nil { - i -= len(*m.APIGroup) - copy(dAtA[i:], *m.APIGroup) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.APIGroup))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *VolumeMount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VolumeMount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VolumeMount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.MountPath) - copy(dAtA[i:], m.MountPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.MountPath))) - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ClientIPConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeoutSeconds != nil { - n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) - } - return n -} - -func (m *Container) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Image) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Ports) > 0 { - for _, e := range m.Ports { - 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 (m *ContainerPort) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.HostPort)) - n += 1 + sovGenerated(uint64(m.ContainerPort)) - l = len(m.Protocol) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.HostIP) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ContainerState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Running != nil { - l = m.Running.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ContainerStateRunning) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.StartedAt.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ContainerStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.State.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ContainerID) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *EndpointAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.IP) - n += 1 + l + sovGenerated(uint64(l)) - if m.NodeName != nil { - l = len(*m.NodeName) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *EndpointPort) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Port)) - l = len(m.Protocol) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *EndpointSubset) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Addresses) > 0 { - for _, e := range m.Addresses { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Ports) > 0 { - for _, e := range m.Ports { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *Endpoints) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Subsets) > 0 { - for _, e := range m.Subsets { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *EndpointsList) Size() (n int) { - if m == nil { - return 0 - } - 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 *LoadBalancerIngress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.IP) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Hostname) - n += 1 + l + sovGenerated(uint64(l)) - if m.IPMode != nil { - l = len(*m.IPMode) - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Ports) > 0 { - for _, e := range m.Ports { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *LoadBalancerStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Ingress) > 0 { - for _, e := range m.Ingress { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *Namespace) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *NamespaceList) Size() (n int) { - if m == nil { - return 0 - } - 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 *Node) Size() (n int) { - if m == nil { - return 0 - } - 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 *NodeAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Address) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *NodeCondition) Size() (n int) { - if m == nil { - return 0 - } - 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)) - return n -} - -func (m *NodeList) Size() (n int) { - if m == nil { - return 0 - } - 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 *NodeSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PodCIDR) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ProviderID) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Taints) > 0 { - for _, e := range m.Taints { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.PodCIDRs) > 0 { - for _, s := range m.PodCIDRs { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *NodeStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Addresses) > 0 { - for _, e := range m.Addresses { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *Pod) Size() (n int) { - if m == nil { - return 0 - } - 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 *PodCondition) Size() (n int) { - if m == nil { - return 0 - } - 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 *PodIP) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.IP) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *PodList) Size() (n int) { - if m == nil { - return 0 - } - 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 *PodSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Containers) > 0 { - for _, e := range m.Containers { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.ServiceAccountName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.NodeName) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - if len(m.InitContainers) > 0 { - for _, e := range m.InitContainers { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *PodStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Phase) - 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)) - } - } - l = len(m.HostIP) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.PodIP) - n += 1 + l + sovGenerated(uint64(l)) - if m.StartTime != nil { - l = m.StartTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.ContainerStatuses) > 0 { - for _, e := range m.ContainerStatuses { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.QOSClass) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.PodIPs) > 0 { - for _, e := range m.PodIPs { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *PortStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovGenerated(uint64(m.Port)) - l = len(m.Protocol) - n += 1 + l + sovGenerated(uint64(l)) - if m.Error != nil { - l = len(*m.Error) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *Secret) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Data) > 0 { - for k, v := range m.Data { - _ = k - _ = v - l = 0 - if v != nil { - l = 1 + len(v) + sovGenerated(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + l - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.StringData) > 0 { - for k, v := range m.StringData { - _ = 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.Immutable != nil { - n += 2 - } - return n -} - -func (m *SecretList) Size() (n int) { - if m == nil { - return 0 - } - 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 *Service) Size() (n int) { - if m == nil { - return 0 - } - 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 *ServiceList) Size() (n int) { - if m == nil { - return 0 - } - 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 *ServicePort) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Protocol) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Port)) - n += 1 + sovGenerated(uint64(m.NodePort)) - return n -} - -func (m *ServiceSpec) Size() (n int) { - if m == nil { - return 0 - } - 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.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.ClusterIP) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.ExternalIPs) > 0 { - for _, s := range m.ExternalIPs { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.SessionAffinity) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.LoadBalancerIP) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.LoadBalancerSourceRanges) > 0 { - for _, s := range m.LoadBalancerSourceRanges { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.ExternalTrafficPolicy) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.HealthCheckNodePort)) - if m.SessionAffinityConfig != nil { - l = m.SessionAffinityConfig.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.IPFamilyPolicy != nil { - l = len(*m.IPFamilyPolicy) - n += 2 + l + sovGenerated(uint64(l)) - } - if len(m.ClusterIPs) > 0 { - for _, s := range m.ClusterIPs { - l = len(s) - n += 2 + l + sovGenerated(uint64(l)) - } - } - if len(m.IPFamilies) > 0 { - for _, s := range m.IPFamilies { - l = len(s) - n += 2 + l + sovGenerated(uint64(l)) - } - } - if m.LoadBalancerClass != nil { - l = len(*m.LoadBalancerClass) - n += 2 + l + sovGenerated(uint64(l)) - } - if m.InternalTrafficPolicy != nil { - l = len(*m.InternalTrafficPolicy) - n += 2 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ServiceStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.LoadBalancer.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 *SessionAffinityConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ClientIP != nil { - l = m.ClientIP.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *Taint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Value) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Effect) - n += 1 + l + sovGenerated(uint64(l)) - if m.TimeAdded != nil { - l = m.TimeAdded.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *TypedLocalObjectReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.APIGroup != nil { - 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 *VolumeMount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.MountPath) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ClientIPConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ClientIPConfig{`, - `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, - `}`, - }, "") - return s -} -func (this *Container) String() string { - if this == nil { - return "nil" - } - repeatedStringForPorts := "[]ContainerPort{" - for _, f := range this.Ports { - repeatedStringForPorts += strings.Replace(strings.Replace(f.String(), "ContainerPort", "ContainerPort", 1), `&`, ``, 1) + "," - } - repeatedStringForPorts += "}" - repeatedStringForVolumeMounts := "[]VolumeMount{" - for _, f := range this.VolumeMounts { - repeatedStringForVolumeMounts += strings.Replace(strings.Replace(f.String(), "VolumeMount", "VolumeMount", 1), `&`, ``, 1) + "," - } - repeatedStringForVolumeMounts += "}" - s := strings.Join([]string{`&Container{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Image:` + fmt.Sprintf("%v", this.Image) + `,`, - `Ports:` + repeatedStringForPorts + `,`, - `VolumeMounts:` + repeatedStringForVolumeMounts + `,`, - `}`, - }, "") - return s -} -func (this *ContainerPort) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ContainerPort{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `HostPort:` + fmt.Sprintf("%v", this.HostPort) + `,`, - `ContainerPort:` + fmt.Sprintf("%v", this.ContainerPort) + `,`, - `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, - `HostIP:` + fmt.Sprintf("%v", this.HostIP) + `,`, - `}`, - }, "") - return s -} -func (this *ContainerState) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ContainerState{`, - `Running:` + strings.Replace(this.Running.String(), "ContainerStateRunning", "ContainerStateRunning", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ContainerStateRunning) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ContainerStateRunning{`, - `StartedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.StartedAt), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ContainerStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ContainerStatus{`, - `State:` + strings.Replace(strings.Replace(this.State.String(), "ContainerState", "ContainerState", 1), `&`, ``, 1) + `,`, - `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, - `}`, - }, "") - return s -} -func (this *EndpointAddress) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EndpointAddress{`, - `IP:` + fmt.Sprintf("%v", this.IP) + `,`, - `NodeName:` + valueToStringGenerated(this.NodeName) + `,`, - `}`, - }, "") - return s -} -func (this *EndpointPort) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EndpointPort{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Port:` + fmt.Sprintf("%v", this.Port) + `,`, - `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, - `}`, - }, "") - return s -} -func (this *EndpointSubset) String() string { - if this == nil { - return "nil" - } - repeatedStringForAddresses := "[]EndpointAddress{" - for _, f := range this.Addresses { - repeatedStringForAddresses += strings.Replace(strings.Replace(f.String(), "EndpointAddress", "EndpointAddress", 1), `&`, ``, 1) + "," - } - repeatedStringForAddresses += "}" - repeatedStringForPorts := "[]EndpointPort{" - for _, f := range this.Ports { - repeatedStringForPorts += strings.Replace(strings.Replace(f.String(), "EndpointPort", "EndpointPort", 1), `&`, ``, 1) + "," - } - repeatedStringForPorts += "}" - s := strings.Join([]string{`&EndpointSubset{`, - `Addresses:` + repeatedStringForAddresses + `,`, - `Ports:` + repeatedStringForPorts + `,`, - `}`, - }, "") - return s -} -func (this *Endpoints) String() string { - if this == nil { - return "nil" - } - repeatedStringForSubsets := "[]EndpointSubset{" - for _, f := range this.Subsets { - repeatedStringForSubsets += strings.Replace(strings.Replace(f.String(), "EndpointSubset", "EndpointSubset", 1), `&`, ``, 1) + "," - } - repeatedStringForSubsets += "}" - s := strings.Join([]string{`&Endpoints{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Subsets:` + repeatedStringForSubsets + `,`, - `}`, - }, "") - return s -} -func (this *EndpointsList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Endpoints{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Endpoints", "Endpoints", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&EndpointsList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *LoadBalancerIngress) String() string { - if this == nil { - return "nil" - } - repeatedStringForPorts := "[]PortStatus{" - for _, f := range this.Ports { - repeatedStringForPorts += strings.Replace(strings.Replace(f.String(), "PortStatus", "PortStatus", 1), `&`, ``, 1) + "," - } - repeatedStringForPorts += "}" - s := strings.Join([]string{`&LoadBalancerIngress{`, - `IP:` + fmt.Sprintf("%v", this.IP) + `,`, - `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`, - `IPMode:` + valueToStringGenerated(this.IPMode) + `,`, - `Ports:` + repeatedStringForPorts + `,`, - `}`, - }, "") - return s -} -func (this *LoadBalancerStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForIngress := "[]LoadBalancerIngress{" - for _, f := range this.Ingress { - repeatedStringForIngress += strings.Replace(strings.Replace(f.String(), "LoadBalancerIngress", "LoadBalancerIngress", 1), `&`, ``, 1) + "," - } - repeatedStringForIngress += "}" - s := strings.Join([]string{`&LoadBalancerStatus{`, - `Ingress:` + repeatedStringForIngress + `,`, - `}`, - }, "") - return s -} -func (this *Namespace) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Namespace{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *NamespaceList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Namespace{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&NamespaceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *Node) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Node{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NodeSpec", "NodeSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NodeStatus", "NodeStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *NodeAddress) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NodeAddress{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Address:` + fmt.Sprintf("%v", this.Address) + `,`, - `}`, - }, "") - return s -} -func (this *NodeCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NodeCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `}`, - }, "") - return s -} -func (this *NodeList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Node{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Node", "Node", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&NodeList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *NodeSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForTaints := "[]Taint{" - for _, f := range this.Taints { - repeatedStringForTaints += strings.Replace(strings.Replace(f.String(), "Taint", "Taint", 1), `&`, ``, 1) + "," - } - repeatedStringForTaints += "}" - s := strings.Join([]string{`&NodeSpec{`, - `PodCIDR:` + fmt.Sprintf("%v", this.PodCIDR) + `,`, - `ProviderID:` + fmt.Sprintf("%v", this.ProviderID) + `,`, - `Taints:` + repeatedStringForTaints + `,`, - `PodCIDRs:` + fmt.Sprintf("%v", this.PodCIDRs) + `,`, - `}`, - }, "") - return s -} -func (this *NodeStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]NodeCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "NodeCondition", "NodeCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - repeatedStringForAddresses := "[]NodeAddress{" - for _, f := range this.Addresses { - repeatedStringForAddresses += strings.Replace(strings.Replace(f.String(), "NodeAddress", "NodeAddress", 1), `&`, ``, 1) + "," - } - repeatedStringForAddresses += "}" - s := strings.Join([]string{`&NodeStatus{`, - `Conditions:` + repeatedStringForConditions + `,`, - `Addresses:` + repeatedStringForAddresses + `,`, - `}`, - }, "") - return s -} -func (this *Pod) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Pod{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *PodCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PodCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastProbeTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastProbeTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s -} -func (this *PodIP) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PodIP{`, - `IP:` + fmt.Sprintf("%v", this.IP) + `,`, - `}`, - }, "") - return s -} -func (this *PodList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Pod{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Pod", "Pod", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&PodList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *PodSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForContainers := "[]Container{" - for _, f := range this.Containers { - repeatedStringForContainers += strings.Replace(strings.Replace(f.String(), "Container", "Container", 1), `&`, ``, 1) + "," - } - repeatedStringForContainers += "}" - repeatedStringForInitContainers := "[]Container{" - for _, f := range this.InitContainers { - repeatedStringForInitContainers += strings.Replace(strings.Replace(f.String(), "Container", "Container", 1), `&`, ``, 1) + "," - } - repeatedStringForInitContainers += "}" - s := strings.Join([]string{`&PodSpec{`, - `Containers:` + repeatedStringForContainers + `,`, - `ServiceAccountName:` + fmt.Sprintf("%v", this.ServiceAccountName) + `,`, - `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, - `HostNetwork:` + fmt.Sprintf("%v", this.HostNetwork) + `,`, - `InitContainers:` + repeatedStringForInitContainers + `,`, - `}`, - }, "") - return s -} -func (this *PodStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]PodCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "PodCondition", "PodCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - repeatedStringForContainerStatuses := "[]ContainerStatus{" - for _, f := range this.ContainerStatuses { - repeatedStringForContainerStatuses += strings.Replace(strings.Replace(f.String(), "ContainerStatus", "ContainerStatus", 1), `&`, ``, 1) + "," - } - repeatedStringForContainerStatuses += "}" - repeatedStringForPodIPs := "[]PodIP{" - for _, f := range this.PodIPs { - repeatedStringForPodIPs += strings.Replace(strings.Replace(f.String(), "PodIP", "PodIP", 1), `&`, ``, 1) + "," - } - repeatedStringForPodIPs += "}" - s := strings.Join([]string{`&PodStatus{`, - `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `HostIP:` + fmt.Sprintf("%v", this.HostIP) + `,`, - `PodIP:` + fmt.Sprintf("%v", this.PodIP) + `,`, - `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "v1.Time", 1) + `,`, - `ContainerStatuses:` + repeatedStringForContainerStatuses + `,`, - `QOSClass:` + fmt.Sprintf("%v", this.QOSClass) + `,`, - `PodIPs:` + repeatedStringForPodIPs + `,`, - `}`, - }, "") - return s -} -func (this *PortStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PortStatus{`, - `Port:` + fmt.Sprintf("%v", this.Port) + `,`, - `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, - `Error:` + valueToStringGenerated(this.Error) + `,`, - `}`, - }, "") - return s -} -func (this *Secret) String() string { - if this == nil { - return "nil" - } - keysForData := make([]string, 0, len(this.Data)) - for k := range this.Data { - keysForData = append(keysForData, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForData) - mapStringForData := "map[string]Bytes{" - for _, k := range keysForData { - mapStringForData += fmt.Sprintf("%v: %v,", k, this.Data[k]) - } - mapStringForData += "}" - keysForStringData := make([]string, 0, len(this.StringData)) - for k := range this.StringData { - keysForStringData = append(keysForStringData, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStringData) - mapStringForStringData := "map[string]string{" - for _, k := range keysForStringData { - mapStringForStringData += fmt.Sprintf("%v: %v,", k, this.StringData[k]) - } - mapStringForStringData += "}" - s := strings.Join([]string{`&Secret{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Data:` + mapStringForData + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `StringData:` + mapStringForStringData + `,`, - `Immutable:` + valueToStringGenerated(this.Immutable) + `,`, - `}`, - }, "") - return s -} -func (this *SecretList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Secret{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Secret", "Secret", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&SecretList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *Service) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Service{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceSpec", "ServiceSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ServiceStatus", "ServiceStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Service{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Service", "Service", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ServiceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ServicePort) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServicePort{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, - `Port:` + fmt.Sprintf("%v", this.Port) + `,`, - `NodePort:` + fmt.Sprintf("%v", this.NodePort) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForPorts := "[]ServicePort{" - for _, f := range this.Ports { - repeatedStringForPorts += strings.Replace(strings.Replace(f.String(), "ServicePort", "ServicePort", 1), `&`, ``, 1) + "," - } - repeatedStringForPorts += "}" - 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{`&ServiceSpec{`, - `Ports:` + repeatedStringForPorts + `,`, - `Selector:` + mapStringForSelector + `,`, - `ClusterIP:` + fmt.Sprintf("%v", this.ClusterIP) + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `ExternalIPs:` + fmt.Sprintf("%v", this.ExternalIPs) + `,`, - `SessionAffinity:` + fmt.Sprintf("%v", this.SessionAffinity) + `,`, - `LoadBalancerIP:` + fmt.Sprintf("%v", this.LoadBalancerIP) + `,`, - `LoadBalancerSourceRanges:` + fmt.Sprintf("%v", this.LoadBalancerSourceRanges) + `,`, - `ExternalTrafficPolicy:` + fmt.Sprintf("%v", this.ExternalTrafficPolicy) + `,`, - `HealthCheckNodePort:` + fmt.Sprintf("%v", this.HealthCheckNodePort) + `,`, - `SessionAffinityConfig:` + strings.Replace(this.SessionAffinityConfig.String(), "SessionAffinityConfig", "SessionAffinityConfig", 1) + `,`, - `IPFamilyPolicy:` + valueToStringGenerated(this.IPFamilyPolicy) + `,`, - `ClusterIPs:` + fmt.Sprintf("%v", this.ClusterIPs) + `,`, - `IPFamilies:` + fmt.Sprintf("%v", this.IPFamilies) + `,`, - `LoadBalancerClass:` + valueToStringGenerated(this.LoadBalancerClass) + `,`, - `InternalTrafficPolicy:` + valueToStringGenerated(this.InternalTrafficPolicy) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]Condition{" - for _, f := range this.Conditions { - repeatedStringForConditions += fmt.Sprintf("%v", f) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&ServiceStatus{`, - `LoadBalancer:` + strings.Replace(strings.Replace(this.LoadBalancer.String(), "LoadBalancerStatus", "LoadBalancerStatus", 1), `&`, ``, 1) + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `}`, - }, "") - return s -} -func (this *SessionAffinityConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SessionAffinityConfig{`, - `ClientIP:` + strings.Replace(this.ClientIP.String(), "ClientIPConfig", "ClientIPConfig", 1) + `,`, - `}`, - }, "") - return s -} -func (this *Taint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Taint{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`, - `TimeAdded:` + strings.Replace(fmt.Sprintf("%v", this.TimeAdded), "Time", "v1.Time", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TypedLocalObjectReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TypedLocalObjectReference{`, - `APIGroup:` + valueToStringGenerated(this.APIGroup) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} -func (this *VolumeMount) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&VolumeMount{`, - `MountPath:` + fmt.Sprintf("%v", this.MountPath) + `,`, - `}`, - }, "") - 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 *ClientIPConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClientIPConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClientIPConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", 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.TimeoutSeconds = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Container) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Container: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Container: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 Image", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Image = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ports = append(m.Ports, ContainerPort{}) - if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VolumeMounts = append(m.VolumeMounts, 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContainerPort) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ContainerPort: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContainerPort: 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType) - } - m.HostPort = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HostPort |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType) - } - m.ContainerPort = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContainerPort |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Protocol = Protocol(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostIP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostIP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContainerState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ContainerState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContainerState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Running", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Running == nil { - m.Running = &ContainerStateRunning{} - } - if err := m.Running.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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContainerStateRunning) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ContainerStateRunning: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContainerStateRunning: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StartedAt.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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContainerStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ContainerStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContainerStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContainerID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointAddress) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.NodeName = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointPort) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointPort: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointPort: 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Protocol = Protocol(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointSubset) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointSubset: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointSubset: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, EndpointAddress{}) - if err := m.Addresses[len(m.Addresses)-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 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ports = append(m.Ports, EndpointPort{}) - if err := m.Ports[len(m.Ports)-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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Endpoints) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Endpoints: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Endpoints: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 Subsets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subsets = append(m.Subsets, EndpointSubset{}) - if err := m.Subsets[len(m.Subsets)-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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointsList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointsList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointsList: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Endpoints{}) - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LoadBalancerIngress) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LoadBalancerIngress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LoadBalancerIngress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hostname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IPMode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := LoadBalancerIPMode(dAtA[iNdEx:postIndex]) - m.IPMode = &s - iNdEx = postIndex - case 4: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ports = append(m.Ports, PortStatus{}) - if err := m.Ports[len(m.Ports)-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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LoadBalancerStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LoadBalancerStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LoadBalancerStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ingress = append(m.Ingress, LoadBalancerIngress{}) - if err := m.Ingress[len(m.Ingress)-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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Namespace) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Namespace: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Namespace: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NamespaceList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NamespaceList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NamespaceList: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Namespace{}) - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Node) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Node: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Node: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeAddress) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeAddress: 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = NodeAddressType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeCondition: 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = NodeConditionType(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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeList: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Node{}) - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodCIDR", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodCIDR = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Taints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Taints = append(m.Taints, Taint{}) - if err := m.Taints[len(m.Taints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodCIDRs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodCIDRs = append(m.PodCIDRs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 4: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, NodeCondition{}) - if err := m.Conditions[len(m.Conditions)-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 Addresses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, NodeAddress{}) - if err := m.Addresses[len(m.Addresses)-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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Pod) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Pod: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Pod: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodCondition: 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = PodConditionType(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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodIP) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodIP: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodIP: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodList: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Pod{}) - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Containers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Containers = append(m.Containers, Container{}) - if err := m.Containers[len(m.Containers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccountName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceAccountName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - 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 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitContainers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InitContainers = append(m.InitContainers, Container{}) - if err := m.InitContainers[len(m.InitContainers)-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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Phase = PodPhase(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, PodCondition{}) - if err := m.Conditions[len(m.Conditions)-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 HostIP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostIP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodIP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodIP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StartTime == nil { - m.StartTime = &v1.Time{} - } - if err := m.StartTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerStatuses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContainerStatuses = append(m.ContainerStatuses, ContainerStatus{}) - if err := m.ContainerStatuses[len(m.ContainerStatuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QOSClass", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QOSClass = PodQOSClass(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodIPs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodIPs = append(m.PodIPs, PodIP{}) - if err := m.PodIPs[len(m.PodIPs)-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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PortStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PortStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PortStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Protocol = Protocol(dAtA[iNdEx:postIndex]) - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Error = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Secret) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Secret: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Secret: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = make(map[string]Bytes) - } - var mapkey string - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapbyteLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthGenerated - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex < 0 { - return ErrInvalidLengthGenerated - } - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = make([]byte, mapbyteLen) - copy(mapvalue, dAtA[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Data[mapkey] = ((Bytes)(mapvalue)) - iNdEx = postIndex - case 3: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = SecretType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StringData == nil { - m.StringData = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.StringData[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Immutable", 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.Immutable = &b - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SecretList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SecretList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SecretList: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Secret{}) - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Service) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Service: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Service: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceList: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Service{}) - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServicePort) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServicePort: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServicePort: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Protocol = Protocol(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodePort", wireType) - } - m.NodePort = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NodePort |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceSpec: 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ports = append(m.Ports, ServicePort{}) - 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 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Selector == nil { - m.Selector = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Selector[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterIP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterIP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = ServiceType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalIPs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExternalIPs = append(m.ExternalIPs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionAffinity", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SessionAffinity = ServiceAffinity(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancerIP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LoadBalancerIP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancerSourceRanges", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LoadBalancerSourceRanges = append(m.LoadBalancerSourceRanges, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalTrafficPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExternalTrafficPolicy = ServiceExternalTrafficPolicy(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthCheckNodePort", wireType) - } - m.HealthCheckNodePort = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HealthCheckNodePort |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionAffinityConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SessionAffinityConfig == nil { - m.SessionAffinityConfig = &SessionAffinityConfig{} - } - if err := m.SessionAffinityConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IPFamilyPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := IPFamilyPolicy(dAtA[iNdEx:postIndex]) - m.IPFamilyPolicy = &s - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterIPs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterIPs = append(m.ClusterIPs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IPFamilies", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IPFamilies = append(m.IPFamilies, IPFamily(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancerClass", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.LoadBalancerClass = &s - iNdEx = postIndex - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InternalTrafficPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := ServiceInternalTrafficPolicy(dAtA[iNdEx:postIndex]) - m.InternalTrafficPolicy = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceStatus: 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, v1.Condition{}) - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SessionAffinityConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SessionAffinityConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SessionAffinityConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientIP", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClientIP == nil { - m.ClientIP = &ClientIPConfig{} - } - if err := m.ClientIP.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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Taint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Taint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Taint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Effect = TaintEffect(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeAdded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TimeAdded == nil { - m.TimeAdded = &v1.Time{} - } - if err := m.TimeAdded.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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TypedLocalObjectReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TypedLocalObjectReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TypedLocalObjectReference: 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.APIGroup = &s - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VolumeMount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VolumeMount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VolumeMount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MountPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MountPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+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 - depth := 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 - } - } - case 1: - iNdEx += 8 - 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 - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.proto b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.proto deleted file mode 100644 index eb3131a2e3e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.proto +++ /dev/null @@ -1,970 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.cilium.cilium.pkg.k8s.slim.k8s.api.core.v1; - -import "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1"; - -// ClientIPConfig represents the configurations of Client IP based session affinity. -message ClientIPConfig { - // timeoutSeconds specifies the seconds of ClientIP type session sticky time. - // The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". - // Default value is 10800(for 3 hours). - // +optional - optional int32 timeoutSeconds = 1; -} - -// A single application container that you want to run within a pod. -message Container { - // Name of the container specified as a DNS_LABEL. - // Each container in a pod must have a unique name (DNS_LABEL). - // Cannot be updated. - optional string name = 1; - - // Container image name. - // More info: https://kubernetes.io/docs/concepts/containers/images - // This field is optional to allow higher level config management to default or override - // container images in workload controllers like Deployments and StatefulSets. - // +optional - optional string image = 2; - - // List of ports to expose from the container. Not specifying a port here - // DOES NOT prevent that port from being exposed. Any port which is - // listening on the default "0.0.0.0" address inside a container will be - // accessible from the network. - // Modifying this array with strategic merge patch may corrupt the data. - // For more information See https://github.com/kubernetes/kubernetes/issues/108255. - // Cannot be updated. - // +optional - // +patchMergeKey=containerPort - // +patchStrategy=merge - // +listType=map - // +listMapKey=containerPort - // +listMapKey=protocol - repeated ContainerPort ports = 6; - - // Pod volumes to mount into the container's filesystem. - // Cannot be updated. - // +optional - // +patchMergeKey=mountPath - // +patchStrategy=merge - repeated VolumeMount volumeMounts = 9; -} - -// ContainerPort represents a network port in a single container. -message ContainerPort { - // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each - // named port in a pod must have a unique name. Name for the port that can be - // referred to by services. - // +optional - optional string name = 1; - - // Number of port to expose on the host. - // If specified, this must be a valid port number, 0 < x < 65536. - // If HostNetwork is specified, this must match ContainerPort. - // Most containers do not need this. - // +optional - optional int32 hostPort = 2; - - // Number of port to expose on the pod's IP address. - // This must be a valid port number, 0 < x < 65536. - optional int32 containerPort = 3; - - // Protocol for port. Must be UDP, TCP, or SCTP. - // Defaults to "TCP". - // +optional - // +default="TCP" - optional string protocol = 4; - - // What host IP to bind the external port to. - // +optional - optional string hostIP = 5; -} - -// ContainerState holds a possible state of container. -// Only one of its members may be specified. -// If none of them is specified, the default one is ContainerStateWaiting. -message ContainerState { - // Details about a running container - // +optional - optional ContainerStateRunning running = 2; -} - -// ContainerStateRunning is a running state of a container. -message ContainerStateRunning { - // Time at which the container was last (re-)started - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.Time startedAt = 1; -} - -// ContainerStatus contains details for the current status of this container. -message ContainerStatus { - // State holds details about the container's current condition. - // +optional - optional ContainerState state = 2; - - // ContainerID is the ID of the container in the format '://'. - // Where type is a container runtime identifier, returned from Version call of CRI API - // (for example "containerd"). - // +optional - optional string containerID = 8; -} - -// EndpointAddress is a tuple that describes single IP address. -// +structType=atomic -message EndpointAddress { - // The IP of this endpoint. - // May not be loopback (127.0.0.0/8 or ::1), link-local (169.254.0.0/16 or fe80::/10), - // or link-local multicast (224.0.0.0/24 or ff02::/16). - optional string ip = 1; - - // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. - // +optional - optional string nodeName = 4; -} - -// EndpointPort is a tuple that describes a single port. -// +structType=atomic -message EndpointPort { - // The name of this port. This must match the 'name' field in the - // corresponding ServicePort. - // Must be a DNS_LABEL. - // Optional only if one port is defined. - // +optional - optional string name = 1; - - // The port number of the endpoint. - optional int32 port = 2; - - // The IP protocol for this port. - // Must be UDP, TCP, or SCTP. - // Default is TCP. - // +optional - optional string protocol = 3; -} - -// EndpointSubset is a group of addresses with a common set of ports. The -// expanded set of endpoints is the Cartesian product of Addresses x Ports. -// For example, given: -// -// { -// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], -// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] -// } -// -// The resulting set of endpoints can be viewed as: -// -// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], -// b: [ 10.10.1.1:309, 10.10.2.2:309 ] -message EndpointSubset { - // IP addresses which offer the related ports that are marked as ready. These endpoints - // should be considered safe for load balancers and clients to utilize. - // +optional - repeated EndpointAddress addresses = 1; - - // Port numbers available on the related IP addresses. - // +optional - repeated EndpointPort ports = 3; -} - -// Endpoints is a collection of endpoints that implement the actual service. Example: -// -// Name: "mysvc", -// Subsets: [ -// { -// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], -// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] -// }, -// { -// Addresses: [{"ip": "10.10.3.3"}], -// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] -// }, -// ] -message Endpoints { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ObjectMeta metadata = 1; - - // The set of all endpoints is the union of all subsets. Addresses are placed into - // subsets according to the IPs they share. A single address with multiple ports, - // some of which are ready and some of which are not (because they come from - // different containers) will result in the address being displayed in different - // subsets for the different ports. No address will appear in both Addresses and - // NotReadyAddresses in the same subset. - // Sets of addresses and ports that comprise a service. - // +optional - repeated EndpointSubset subsets = 2; -} - -// EndpointsList is a list of endpoints. -message EndpointsList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ListMeta metadata = 1; - - // List of endpoints. - repeated Endpoints items = 2; -} - -// LoadBalancerIngress represents the status of a load-balancer ingress point: -// traffic intended for the service should be sent to an ingress point. -message LoadBalancerIngress { - // IP is set for load-balancer ingress points that are IP based - // (typically GCE or OpenStack load-balancers) - // +optional - optional string ip = 1; - - // Hostname is set for load-balancer ingress points that are DNS based - // (typically AWS load-balancers) - // +optional - optional string hostname = 2; - - // IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified. - // Setting this to "VIP" indicates that traffic is delivered to the node with - // the destination set to the load-balancer's IP and port. - // Setting this to "Proxy" indicates that traffic is delivered to the node or pod with - // the destination set to the node's IP and node port or the pod's IP and port. - // Service implementations may use this information to adjust traffic routing. - // +optional - optional string ipMode = 3; - - // Ports is a list of records of service ports - // If used, every port defined in the service should have an entry in it - // +listType=atomic - // +optional - repeated PortStatus ports = 4; -} - -// LoadBalancerStatus represents the status of a load-balancer. -message LoadBalancerStatus { - // Ingress is a list containing ingress points for the load-balancer. - // Traffic intended for the service should be sent to these ingress points. - // +optional - repeated LoadBalancerIngress ingress = 1; -} - -// Namespace provides a scope for Names. -// Use of multiple namespaces is optional. -message Namespace { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ObjectMeta metadata = 1; -} - -// NamespaceList is a list of Namespaces. -message NamespaceList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of Namespace objects in the list. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - repeated Namespace items = 2; -} - -// Node is a worker node in Kubernetes. -// Each node will have a unique identifier in the cache (i.e. in etcd). -message Node { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec defines the behavior of a node. - // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional NodeSpec spec = 2; - - // Most recently observed status of the node. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional NodeStatus status = 3; -} - -// NodeAddress contains information for the node's address. -message NodeAddress { - // Node address type, one of Hostname, ExternalIP or InternalIP. - optional string type = 1; - - // The node address. - optional string address = 2; -} - -// NodeCondition contains condition information for a node. -message NodeCondition { - // Type of node condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // (brief) reason for the condition's last transition. - // +optional - optional string reason = 5; -} - -// NodeList is the whole list of all Nodes which have been registered with master. -message NodeList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ListMeta metadata = 1; - - // List of nodes - repeated Node items = 2; -} - -// NodeSpec describes the attributes that a node is created with. -message NodeSpec { - // PodCIDR represents the pod IP range assigned to the node. - // +optional - optional string podCIDR = 1; - - // podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this - // field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for - // each of IPv4 and IPv6. - // +optional - // +patchStrategy=merge - repeated string podCIDRs = 7; - - // ID of the node assigned by the cloud provider in the format: :// - // +optional - optional string providerID = 3; - - // If specified, the node's taints. - // +optional - repeated Taint taints = 5; -} - -// NodeStatus is information about the current status of a node. -message NodeStatus { - // Conditions is an array of current observed node conditions. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated NodeCondition conditions = 4; - - // List of addresses reachable to the node. - // Queried from cloud provider, if available. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses - // Note: This field is declared as mergeable, but the merge key is not sufficiently - // unique, which can cause data corruption when it is merged. Callers should instead - // use a full-replacement patch. See https://pr.k8s.io/79391 for an example. - // Consumers should assume that addresses can change during the - // lifetime of a Node. However, there are some exceptions where this may not - // be possible, such as Pods that inherit a Node's address in its own status or - // consumers of the downward API (status.hostIP). - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated NodeAddress addresses = 5; -} - -// Pod is a collection of containers that can run on a host. This resource is created -// by clients and scheduled onto hosts. -message Pod { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ObjectMeta metadata = 1; - - // Specification of the desired behavior of the pod. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional PodSpec spec = 2; - - // Most recently observed status of the pod. - // This data may not be up to date. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional PodStatus status = 3; -} - -// PodCondition contains details for the current condition of this pod. -message PodCondition { - // Type is the type of the condition. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - optional string type = 1; - - // Status is the status of the condition. - // Can be True, False, Unknown. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - optional string status = 2; - - // Last time we probed the condition. - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.Time lastProbeTime = 3; - - // Last time the condition transitioned from one status to another. - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.Time lastTransitionTime = 4; - - // Unique, one-word, CamelCase 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; -} - -// PodIP represents a single IP address allocated to the pod. -message PodIP { - // IP is the IP address assigned to the pod - optional string ip = 1; -} - -// PodList is a list of Pods. -message PodList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ListMeta metadata = 1; - - // List of pods. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md - repeated Pod items = 2; -} - -// PodSpec is a description of a pod. -message PodSpec { - // List of initialization containers belonging to the pod. - // Init containers are executed in order prior to containers being started. If any - // init container fails, the pod is considered to have failed and is handled according - // to its restartPolicy. The name for an init container or normal container must be - // unique among all containers. - // Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. - // The resourceRequirements of an init container are taken into account during scheduling - // by finding the highest request/limit for each resource type, and then using the max of - // of that value or the sum of the normal containers. Limits are applied to init containers - // in a similar fashion. - // Init containers cannot currently be added or removed. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - // +patchMergeKey=name - // +patchStrategy=merge - repeated Container initContainers = 20; - - // List of containers belonging to the pod. - // Containers cannot currently be added or removed. - // There must be at least one container in a Pod. - // Cannot be updated. - // +patchMergeKey=name - // +patchStrategy=merge - repeated Container containers = 2; - - // ServiceAccountName is the name of the ServiceAccount to use to run this pod. - // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - // +optional - optional string serviceAccountName = 8; - - // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, - // the scheduler simply schedules this pod onto that node, assuming that it fits resource - // requirements. - // +optional - optional string nodeName = 10; - - // Host networking requested for this pod. Use the host's network namespace. - // If this option is set, the ports that will be used must be specified. - // Default to false. - // +k8s:conversion-gen=false - // +optional - optional bool hostNetwork = 11; -} - -// PodStatus represents information about the status of a pod. Status may trail the actual -// state of a system, especially if the node that hosts the pod cannot contact the control -// plane. -message PodStatus { - // The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. - // The conditions array, the reason and message fields, and the individual container status - // arrays contain more detail about the pod's status. - // There are five possible phase values: - // - // Pending: The pod has been accepted by the Kubernetes system, but one or more of the - // container images has not been created. This includes time before being scheduled as - // well as time spent downloading images over the network, which could take a while. - // Running: The pod has been bound to a node, and all of the containers have been created. - // At least one container is still running, or is in the process of starting or restarting. - // Succeeded: All containers in the pod have terminated in success, and will not be restarted. - // Failed: All containers in the pod have terminated, and at least one container has - // terminated in failure. The container either exited with non-zero status or was terminated - // by the system. - // Unknown: For some reason the state of the pod could not be obtained, typically due to an - // error in communicating with the host of the pod. - // - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase - // +optional - optional string phase = 1; - - // Current service state of pod. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated PodCondition conditions = 2; - - // hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. - // A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will - // not be updated even if there is a node is assigned to pod - // +optional - optional string hostIP = 5; - - // podIP address allocated to the pod. Routable at least within the cluster. - // Empty if not yet allocated. - // +optional - optional string podIP = 6; - - // podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must - // match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list - // is empty if no IPs have been allocated yet. - // +optional - // +patchStrategy=merge - // +patchMergeKey=ip - repeated PodIP podIPs = 12; - - // RFC 3339 date and time at which the object was acknowledged by the Kubelet. - // This is before the Kubelet pulled the container image(s) for the pod. - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.Time startTime = 7; - - // The list has one entry per container in the manifest. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - // +optional - repeated ContainerStatus containerStatuses = 8; - - // The Quality of Service (QOS) classification assigned to the pod based on resource requirements - // See PodQOSClass type for available QOS classes - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes - // +optional - optional string qosClass = 9; -} - -message PortStatus { - // Port is the port number of the service port of which status is recorded here - optional int32 port = 1; - - // Protocol is the protocol of the service port of which status is recorded here - // The supported values are: "TCP", "UDP", "SCTP" - optional string protocol = 2; - - // Error is to record the problem with the service port - // The format of the error shall comply with the following rules: - // - built-in error values shall be specified in this file and those shall use - // CamelCase names - // - cloud provider specific error values must have names that comply with the - // format foo.example.com/CamelCase. - // --- - // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - // +optional - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` - // +kubebuilder:validation:MaxLength=316 - optional string error = 3; -} - -// Secret holds secret data of a certain type. The total bytes of the values in -// the Data field must be less than MaxSecretSize bytes. -message Secret { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ObjectMeta metadata = 1; - - // Immutable, if set to true, ensures that data stored in the Secret cannot - // be updated (only object metadata can be modified). - // If not set to true, the field can be modified at any time. - // Defaulted to nil. - // +optional - optional bool immutable = 5; - - // Data contains the secret data. Each key must consist of alphanumeric - // characters, '-', '_' or '.'. The serialized form of the secret data is a - // base64 encoded string, representing the arbitrary (possibly non-string) - // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 - // +optional - map data = 2; - - // stringData allows specifying non-binary secret data in string form. - // It is provided as a write-only input field for convenience. - // All keys and values are merged into the data field on write, overwriting any existing values. - // The stringData field is never output when reading from the API. - // +k8s:conversion-gen=false - // +optional - map stringData = 4; - - // Used to facilitate programmatic handling of secret data. - // More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types - // +optional - optional string type = 3; -} - -// SecretList is a list of Secret. -message SecretList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of secret objects. - // More info: https://kubernetes.io/docs/concepts/configuration/secret - repeated Secret items = 2; -} - -// Service is a named abstraction of software service (for example, mysql) consisting of local port -// (for example 3306) that the proxy listens on, and the selector that determines which pods -// will answer requests sent through the proxy. -message Service { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec defines the behavior of a service. - // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional ServiceSpec spec = 2; - - // Most recently observed status of the service. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional ServiceStatus status = 3; -} - -// ServiceList holds a list of services. -message ServiceList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ListMeta metadata = 1; - - // List of services - repeated Service items = 2; -} - -// ServicePort contains information on service's port. -message ServicePort { - // The name of this port within the service. This must be a DNS_LABEL. - // All ports within a ServiceSpec must have unique names. When considering - // the endpoints for a Service, this must match the 'name' field in the - // EndpointPort. - // Optional if only one ServicePort is defined on this service. - // +optional - optional string name = 1; - - // The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". - // Default is TCP. - // +default="TCP" - // +optional - optional string protocol = 2; - - // The port that will be exposed by this service. - optional int32 port = 3; - - // The port on each node on which this service is exposed when type is - // NodePort or LoadBalancer. Usually assigned by the system. If a value is - // specified, in-range, and not in use it will be used, otherwise the - // operation will fail. If not specified, a port will be allocated if this - // Service requires one. If this field is specified when creating a - // Service which does not need it, creation will fail. This field will be - // wiped when updating a Service to no longer need it (e.g. changing type - // from NodePort to ClusterIP). - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - // +optional - optional int32 nodePort = 5; -} - -// ServiceSpec describes the attributes that a user creates on a service. -message ServiceSpec { - // The list of ports that are exposed by this service. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +patchMergeKey=port - // +patchStrategy=merge - // +listType=map - // +listMapKey=port - // +listMapKey=protocol - repeated ServicePort ports = 1; - - // Route service traffic to pods with label keys and values matching this - // selector. If empty or not present, the service is assumed to have an - // external process managing its endpoints, which Kubernetes will not - // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. - // Ignored if type is ExternalName. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/ - // +optional - // +mapType=atomic - map selector = 2; - - // clusterIP is the IP address of the service and is usually assigned - // randomly. If an address is specified manually, is in-range (as per - // system configuration), and is not in use, it will be allocated to the - // service; otherwise creation of the service will fail. This field may not - // be changed through updates unless the type field is also being changed - // to ExternalName (which requires this field to be blank) or the type - // field is being changed from ExternalName (in which case this field may - // optionally be specified, as describe above). Valid values are "None", - // empty string (""), or a valid IP address. Setting this to "None" makes a - // "headless service" (no virtual IP), which is useful when direct endpoint - // connections are preferred and proxying is not required. Only applies to - // types ClusterIP, NodePort, and LoadBalancer. If this field is specified - // when creating a Service of type ExternalName, creation will fail. This - // field will be wiped when updating a Service to type ExternalName. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +optional - optional string clusterIP = 3; - - // ClusterIPs is a list of IP addresses assigned to this service, and are - // usually assigned randomly. If an address is specified manually, is - // in-range (as per system configuration), and is not in use, it will be - // allocated to the service; otherwise creation of the service will fail. - // This field may not be changed through updates unless the type field is - // also being changed to ExternalName (which requires this field to be - // empty) or the type field is being changed from ExternalName (in which - // case this field may optionally be specified, as describe above). Valid - // values are "None", empty string (""), or a valid IP address. Setting - // this to "None" makes a "headless service" (no virtual IP), which is - // useful when direct endpoint connections are preferred and proxying is - // not required. Only applies to types ClusterIP, NodePort, and - // LoadBalancer. If this field is specified when creating a Service of type - // ExternalName, creation will fail. This field will be wiped when updating - // a Service to type ExternalName. If this field is not specified, it will - // be initialized from the clusterIP field. If this field is specified, - // clients must ensure that clusterIPs[0] and clusterIP have the same - // value. - // - // This field may hold a maximum of two entries (dual-stack IPs, in either order). - // These IPs must correspond to the values of the ipFamilies field. Both - // clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +listType=atomic - // +optional - repeated string clusterIPs = 18; - - // type determines how the Service is exposed. Defaults to ClusterIP. Valid - // options are ExternalName, ClusterIP, NodePort, and LoadBalancer. - // "ClusterIP" allocates a cluster-internal IP address for load-balancing - // to endpoints. Endpoints are determined by the selector or if that is not - // specified, by manual construction of an Endpoints object or - // EndpointSlice objects. If clusterIP is "None", no virtual IP is - // allocated and the endpoints are published as a set of endpoints rather - // than a virtual IP. - // "NodePort" builds on ClusterIP and allocates a port on every node which - // routes to the same endpoints as the clusterIP. - // "LoadBalancer" builds on NodePort and creates an external load-balancer - // (if supported in the current cloud) which routes to the same endpoints - // as the clusterIP. - // "ExternalName" aliases this service to the specified externalName. - // Several other fields do not apply to ExternalName services. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types - // +optional - optional string type = 4; - - // externalIPs is a list of IP addresses for which nodes in the cluster - // will also accept traffic for this service. These IPs are not managed by - // Kubernetes. The user is responsible for ensuring that traffic arrives - // at a node with this IP. A common example is external load-balancers - // that are not part of the Kubernetes system. - // +optional - repeated string externalIPs = 5; - - // Supports "ClientIP" and "None". Used to maintain session affinity. - // Enable client IP based session affinity. - // Must be ClientIP or None. - // Defaults to None. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +optional - optional string sessionAffinity = 7; - - // Only applies to Service Type: LoadBalancer. - // This feature depends on whether the underlying cloud-provider supports specifying - // the loadBalancerIP when a load balancer is created. - // This field will be ignored if the cloud-provider does not support the feature. - // Deprecated: This field was under-specified and its meaning varies across implementations. - // Using it is non-portable and it may not support dual-stack. - // Users are encouraged to use implementation-specific annotations when available. - // +optional - optional string loadBalancerIP = 8; - - // If specified and supported by the platform, this will restrict traffic through the cloud-provider - // load-balancer will be restricted to the specified client IPs. This field will be ignored if the - // cloud-provider does not support the feature." - // More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/ - // +optional - repeated string loadBalancerSourceRanges = 9; - - // externalTrafficPolicy describes how nodes distribute service traffic they - // receive on one of the Service's "externally-facing" addresses (NodePorts, - // ExternalIPs, and LoadBalancer IPs). If set to "Local", the proxy will configure - // the service in a way that assumes that external load balancers will take care - // of balancing the service traffic between nodes, and so each node will deliver - // traffic only to the node-local endpoints of the service, without masquerading - // the client source IP. (Traffic mistakenly sent to a node with no endpoints will - // be dropped.) The default value, "Cluster", uses the standard behavior of - // routing to all endpoints evenly (possibly modified by topology and other - // features). Note that traffic sent to an External IP or LoadBalancer IP from - // within the cluster will always get "Cluster" semantics, but clients sending to - // a NodePort from within the cluster may need to take traffic policy into account - // when picking a node. - // +optional - optional string externalTrafficPolicy = 11; - - // healthCheckNodePort specifies the healthcheck nodePort for the service. - // This only applies when type is set to LoadBalancer and - // externalTrafficPolicy is set to Local. If a value is specified, is - // in-range, and is not in use, it will be used. If not specified, a value - // will be automatically allocated. External systems (e.g. load-balancers) - // can use this port to determine if a given node holds endpoints for this - // service or not. If this field is specified when creating a Service - // which does not need it, creation will fail. This field will be wiped - // when updating a Service to no longer need it (e.g. changing type). - // This field cannot be updated once set. - // +optional - optional int32 healthCheckNodePort = 12; - - // sessionAffinityConfig contains the configurations of session affinity. - // +optional - optional SessionAffinityConfig sessionAffinityConfig = 14; - - // IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this - // service. This field is usually assigned automatically based on cluster - // configuration and the ipFamilyPolicy field. If this field is specified - // manually, the requested family is available in the cluster, - // and ipFamilyPolicy allows it, it will be used; otherwise creation of - // the service will fail. This field is conditionally mutable: it allows - // for adding or removing a secondary IP family, but it does not allow - // changing the primary IP family of the Service. Valid values are "IPv4" - // and "IPv6". This field only applies to Services of types ClusterIP, - // NodePort, and LoadBalancer, and does apply to "headless" services. - // This field will be wiped when updating a Service to type ExternalName. - // - // This field may hold a maximum of two entries (dual-stack families, in - // either order). These families must correspond to the values of the - // clusterIPs field, if specified. Both clusterIPs and ipFamilies are - // governed by the ipFamilyPolicy field. - // +listType=atomic - // +optional - repeated string ipFamilies = 19; - - // IPFamilyPolicy represents the dual-stack-ness requested or required by - // this Service. If there is no value provided, then this field will be set - // to SingleStack. Services can be "SingleStack" (a single IP family), - // "PreferDualStack" (two IP families on dual-stack configured clusters or - // a single IP family on single-stack clusters), or "RequireDualStack" - // (two IP families on dual-stack configured clusters, otherwise fail). The - // ipFamilies and clusterIPs fields depend on the value of this field. This - // field will be wiped when updating a service to type ExternalName. - // +optional - optional string ipFamilyPolicy = 17; - - // loadBalancerClass is the class of the load balancer implementation this Service belongs to. - // If specified, the value of this field must be a label-style identifier, with an optional prefix, - // e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. - // This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load - // balancer implementation is used, today this is typically done through the cloud provider integration, - // but should apply for any default implementation. If set, it is assumed that a load balancer - // implementation is watching for Services with a matching class. Any default load balancer - // implementation (e.g. cloud providers) should ignore Services that set this field. - // This field can only be set when creating or updating a Service to type 'LoadBalancer'. - // Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. - // +optional - optional string loadBalancerClass = 21; - - // InternalTrafficPolicy describes how nodes distribute service traffic they - // receive on the ClusterIP. If set to "Local", the proxy will assume that pods - // only want to talk to endpoints of the service on the same node as the pod, - // dropping the traffic if there are no local endpoints. The default value, - // "Cluster", uses the standard behavior of routing to all endpoints evenly - // (possibly modified by topology and other features). - // +optional - optional string internalTrafficPolicy = 22; -} - -// ServiceStatus represents the current status of a service. -message ServiceStatus { - // LoadBalancer contains the current status of the load-balancer, - // if one is present. - // +optional - optional LoadBalancerStatus loadBalancer = 1; - - // Current service state - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - repeated github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.Condition conditions = 2; -} - -// SessionAffinityConfig represents the configurations of session affinity. -message SessionAffinityConfig { - // clientIP contains the configurations of Client IP based session affinity. - // +optional - optional ClientIPConfig clientIP = 1; -} - -// The node this Taint is attached to has the "effect" on -// any pod that does not tolerate the Taint. -message Taint { - // Required. The taint key to be applied to a node. - optional string key = 1; - - // The taint value corresponding to the taint key. - // +optional - optional string value = 2; - - // Required. The effect of the taint on pods - // that do not tolerate the taint. - // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - optional string effect = 3; - - // TimeAdded represents the time at which the taint was added. - // It is only written for NoExecute taints. - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.Time timeAdded = 4; -} - -// TypedLocalObjectReference contains enough information to let you locate the -// typed referenced object inside the same namespace. -// +structType=atomic -message TypedLocalObjectReference { - // APIGroup is the group for the resource being referenced. - // If APIGroup is not specified, the specified Kind must be in the core API group. - // For any other third-party types, APIGroup is required. - // +optional - 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; -} - -// VolumeMount describes a mounting of a Volume within a container. -message VolumeMount { - // Path within the container at which the volume should be mounted. Must - // not contain ':'. - optional string mountPath = 3; -} - diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/register.go deleted file mode 100644 index 5cdbe4769ff..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/register.go +++ /dev/null @@ -1,56 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2015 The Kubernetes Authors. - -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 = "" - -// 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 ( - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - 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, - &Pod{}, - &PodList{}, - &Service{}, - &ServiceList{}, - &Endpoints{}, - &EndpointsList{}, - &Node{}, - &NodeList{}, - &Namespace{}, - &NamespaceList{}, - &Secret{}, - &SecretList{}, - ) - - // Add common types - scheme.AddKnownTypes(SchemeGroupVersion, &metav1.Status{}) - - // Add the watch version that applies - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/taint.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/taint.go deleted file mode 100644 index 9bd88b6d137..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/taint.go +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2017 The Kubernetes Authors. - -package v1 - -import "fmt" - -// MatchTaint checks if the taint matches taintToMatch. Taints are unique by key:effect, -// if the two taints have same key:effect, regard as they match. -func (t *Taint) MatchTaint(taintToMatch *Taint) bool { - return t.Key == taintToMatch.Key && t.Effect == taintToMatch.Effect -} - -// taint.ToString() converts taint struct to string in format '=:', '=:', ':', or ''. -func (t *Taint) ToString() string { - if len(t.Effect) == 0 { - if len(t.Value) == 0 { - return fmt.Sprintf("%v", t.Key) - } - return fmt.Sprintf("%v=%v:", t.Key, t.Value) - } - if len(t.Value) == 0 { - return fmt.Sprintf("%v:%v", t.Key, t.Effect) - } - return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect) -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/types.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/types.go deleted file mode 100644 index 2245d3869b5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/types.go +++ /dev/null @@ -1,1426 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2015 The Kubernetes Authors. - -package v1 - -import ( - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -const ( - // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients - NamespaceDefault string = "default" - // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces - NamespaceAll string = "" - // NamespaceNodeLease is the namespace where we place node lease objects (used for node heartbeats) - NamespaceNodeLease string = "kube-node-lease" -) - -// Protocol defines network protocols supported for things like container ports. -// +enum -type Protocol string - -const ( - // ProtocolTCP is the TCP protocol. - ProtocolTCP Protocol = "TCP" - // ProtocolUDP is the UDP protocol. - ProtocolUDP Protocol = "UDP" - // ProtocolSCTP is the SCTP protocol. - ProtocolSCTP Protocol = "SCTP" -) - -// ContainerPort represents a network port in a single container. -type ContainerPort struct { - // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each - // named port in a pod must have a unique name. Name for the port that can be - // referred to by services. - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - // Number of port to expose on the host. - // If specified, this must be a valid port number, 0 < x < 65536. - // If HostNetwork is specified, this must match ContainerPort. - // Most containers do not need this. - // +optional - HostPort int32 `json:"hostPort,omitempty" protobuf:"varint,2,opt,name=hostPort"` - // Number of port to expose on the pod's IP address. - // This must be a valid port number, 0 < x < 65536. - ContainerPort int32 `json:"containerPort" protobuf:"varint,3,opt,name=containerPort"` - // Protocol for port. Must be UDP, TCP, or SCTP. - // Defaults to "TCP". - // +optional - // +default="TCP" - Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,4,opt,name=protocol,casttype=Protocol"` - // What host IP to bind the external port to. - // +optional - HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"` -} - -// VolumeMount describes a mounting of a Volume within a container. -type VolumeMount struct { - // Path within the container at which the volume should be mounted. Must - // not contain ':'. - MountPath string `json:"mountPath" protobuf:"bytes,3,opt,name=mountPath"` -} - -// A single application container that you want to run within a pod. -type Container struct { - // Name of the container specified as a DNS_LABEL. - // Each container in a pod must have a unique name (DNS_LABEL). - // Cannot be updated. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Container image name. - // More info: https://kubernetes.io/docs/concepts/containers/images - // This field is optional to allow higher level config management to default or override - // container images in workload controllers like Deployments and StatefulSets. - // +optional - Image string `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"` - // List of ports to expose from the container. Not specifying a port here - // DOES NOT prevent that port from being exposed. Any port which is - // listening on the default "0.0.0.0" address inside a container will be - // accessible from the network. - // Modifying this array with strategic merge patch may corrupt the data. - // For more information See https://github.com/kubernetes/kubernetes/issues/108255. - // Cannot be updated. - // +optional - // +patchMergeKey=containerPort - // +patchStrategy=merge - // +listType=map - // +listMapKey=containerPort - // +listMapKey=protocol - Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"` - // Pod volumes to mount into the container's filesystem. - // Cannot be updated. - // +optional - // +patchMergeKey=mountPath - // +patchStrategy=merge - VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` -} - -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" -) - -// PodQOSClass defines the supported qos classes of Pods. -// +enum -type PodQOSClass string - -const ( - // PodQOSGuaranteed is the Guaranteed qos class. - PodQOSGuaranteed PodQOSClass = "Guaranteed" - // PodQOSBurstable is the Burstable qos class. - PodQOSBurstable PodQOSClass = "Burstable" - // PodQOSBestEffort is the BestEffort qos class. - PodQOSBestEffort PodQOSClass = "BestEffort" -) - -// ContainerStateRunning is a running state of a container. -type ContainerStateRunning struct { - // Time at which the container was last (re-)started - // +optional - StartedAt slim_metav1.Time `json:"startedAt,omitempty" protobuf:"bytes,1,opt,name=startedAt"` -} - -// ContainerState holds a possible state of container. -// Only one of its members may be specified. -// If none of them is specified, the default one is ContainerStateWaiting. -type ContainerState struct { - // Details about a running container - // +optional - Running *ContainerStateRunning `json:"running,omitempty" protobuf:"bytes,2,opt,name=running"` -} - -// ContainerStatus contains details for the current status of this container. -type ContainerStatus struct { - // State holds details about the container's current condition. - // +optional - State ContainerState `json:"state,omitempty" protobuf:"bytes,2,opt,name=state"` - // ContainerID is the ID of the container in the format '://'. - // Where type is a container runtime identifier, returned from Version call of CRI API - // (for example "containerd"). - // +optional - ContainerID string `json:"containerID,omitempty" protobuf:"bytes,8,opt,name=containerID"` -} - -// PodPhase is a label for the condition of a pod at the current time. -// +enum -type PodPhase string - -// These are the valid statuses of pods. -const ( - // PodPending means the pod has been accepted by the system, but one or more of the containers - // has not been started. This includes time before being bound to a node, as well as time spent - // pulling images onto the host. - PodPending PodPhase = "Pending" - // PodRunning means the pod has been bound to a node and all of the containers have been started. - // At least one container is still running or is in the process of being restarted. - PodRunning PodPhase = "Running" - // PodSucceeded means that all containers in the pod have voluntarily terminated - // with a container exit code of 0, and the system is not going to restart any of these containers. - PodSucceeded PodPhase = "Succeeded" - // PodFailed means that all containers in the pod have terminated, and at least one container has - // terminated in a failure (exited with a non-zero exit code or was stopped by the system). - PodFailed PodPhase = "Failed" - // PodUnknown means that for some reason the state of the pod could not be obtained, typically due - // to an error in communicating with the host of the pod. - // Deprecated: It isn't being set since 2015 (74da3b14b0c0f658b3bb8d2def5094686d0e9095) - PodUnknown PodPhase = "Unknown" -) - -// PodConditionType is a valid value for PodCondition.Type -type PodConditionType string - -// These are built-in conditions of pod. An application may use a custom condition not listed here. -const ( - // ContainersReady indicates whether all containers in the pod are ready. - ContainersReady PodConditionType = "ContainersReady" - // PodInitialized means that all init containers in the pod have started successfully. - PodInitialized PodConditionType = "Initialized" - // PodReady means the pod is able to service requests and should be added to the - // load balancing pools of all matching services. - PodReady PodConditionType = "Ready" - // PodScheduled represents status of the scheduling process for this pod. - PodScheduled PodConditionType = "PodScheduled" - // DisruptionTarget indicates the pod is about to be terminated due to a - // disruption (such as preemption, eviction API or garbage-collection). - DisruptionTarget PodConditionType = "DisruptionTarget" - // PodReadyToStartContainers pod sandbox is successfully configured and - // the pod is ready to launch containers. - PodReadyToStartContainers PodConditionType = "PodReadyToStartContainers" -) - -// These are reasons for a pod's transition to a condition. -const ( - // PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler - // can't schedule the pod right now, for example due to insufficient resources in the cluster. - PodReasonUnschedulable = "Unschedulable" - - // PodReasonSchedulingGated reason in PodScheduled PodCondition means that the scheduler - // skips scheduling the pod because one or more scheduling gates are still present. - PodReasonSchedulingGated = "SchedulingGated" - - // PodReasonSchedulerError reason in PodScheduled PodCondition means that some internal error happens - // during scheduling, for example due to nodeAffinity parsing errors. - PodReasonSchedulerError = "SchedulerError" - - // TerminationByKubelet reason in DisruptionTarget pod condition indicates that the termination - // is initiated by kubelet - PodReasonTerminationByKubelet = "TerminationByKubelet" - - // PodReasonPreemptionByScheduler reason in DisruptionTarget pod condition indicates that the - // disruption was initiated by scheduler's preemption. - PodReasonPreemptionByScheduler = "PreemptionByScheduler" -) - -// PodCondition contains details for the current condition of this pod. -type PodCondition struct { - // Type is the type of the condition. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - Type PodConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"` - // Status is the status of the condition. - // Can be True, False, Unknown. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // Last time we probed the condition. - // +optional - LastProbeTime slim_metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` - // Last time the condition transitioned from one status to another. - // +optional - LastTransitionTime slim_metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` - // Unique, one-word, CamelCase 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"` -} - -// The node this Taint is attached to has the "effect" on -// any pod that does not tolerate the Taint. -type Taint struct { - // Required. The taint key to be applied to a node. - Key string `json:"key" protobuf:"bytes,1,opt,name=key"` - // The taint value corresponding to the taint key. - // +optional - Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` - // Required. The effect of the taint on pods - // that do not tolerate the taint. - // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - Effect TaintEffect `json:"effect" protobuf:"bytes,3,opt,name=effect,casttype=TaintEffect"` - // TimeAdded represents the time at which the taint was added. - // It is only written for NoExecute taints. - // +optional - TimeAdded *slim_metav1.Time `json:"timeAdded,omitempty" protobuf:"bytes,4,opt,name=timeAdded"` -} - -// +enum -type TaintEffect string - -const ( - // Do not allow new pods to schedule onto the node unless they tolerate the taint, - // but allow all pods submitted to Kubelet without going through the scheduler - // to start, and allow all already-running pods to continue running. - // Enforced by the scheduler. - TaintEffectNoSchedule TaintEffect = "NoSchedule" - // Like TaintEffectNoSchedule, but the scheduler tries not to schedule - // new pods onto the node, rather than prohibiting new pods from scheduling - // onto the node entirely. Enforced by the scheduler. - TaintEffectPreferNoSchedule TaintEffect = "PreferNoSchedule" - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. - // Like TaintEffectNoSchedule, but additionally do not allow pods submitted to - // Kubelet without going through the scheduler to start. - // Enforced by Kubelet and the scheduler. - // TaintEffectNoScheduleNoAdmit TaintEffect = "NoScheduleNoAdmit" - - // Evict any already-running pods that do not tolerate the taint. - // Currently enforced by NodeController. - TaintEffectNoExecute TaintEffect = "NoExecute" -) - -// PodSpec is a description of a pod. -type PodSpec struct { - // List of initialization containers belonging to the pod. - // Init containers are executed in order prior to containers being started. If any - // init container fails, the pod is considered to have failed and is handled according - // to its restartPolicy. The name for an init container or normal container must be - // unique among all containers. - // Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. - // The resourceRequirements of an init container are taken into account during scheduling - // by finding the highest request/limit for each resource type, and then using the max of - // of that value or the sum of the normal containers. Limits are applied to init containers - // in a similar fashion. - // Init containers cannot currently be added or removed. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - // +patchMergeKey=name - // +patchStrategy=merge - InitContainers []Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,20,rep,name=initContainers"` - // List of containers belonging to the pod. - // Containers cannot currently be added or removed. - // There must be at least one container in a Pod. - // Cannot be updated. - // +patchMergeKey=name - // +patchStrategy=merge - Containers []Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"` - // ServiceAccountName is the name of the ServiceAccount to use to run this pod. - // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - // +optional - ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,8,opt,name=serviceAccountName"` - // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, - // the scheduler simply schedules this pod onto that node, assuming that it fits resource - // requirements. - // +optional - NodeName string `json:"nodeName,omitempty" protobuf:"bytes,10,opt,name=nodeName"` - // Host networking requested for this pod. Use the host's network namespace. - // If this option is set, the ports that will be used must be specified. - // Default to false. - // +k8s:conversion-gen=false - // +optional - HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,11,opt,name=hostNetwork"` -} - -// PodIP represents a single IP address allocated to the pod. -type PodIP struct { - // IP is the IP address assigned to the pod - IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"` -} - -// PodStatus represents information about the status of a pod. Status may trail the actual -// state of a system, especially if the node that hosts the pod cannot contact the control -// plane. -type PodStatus struct { - // The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. - // The conditions array, the reason and message fields, and the individual container status - // arrays contain more detail about the pod's status. - // There are five possible phase values: - // - // Pending: The pod has been accepted by the Kubernetes system, but one or more of the - // container images has not been created. This includes time before being scheduled as - // well as time spent downloading images over the network, which could take a while. - // Running: The pod has been bound to a node, and all of the containers have been created. - // At least one container is still running, or is in the process of starting or restarting. - // Succeeded: All containers in the pod have terminated in success, and will not be restarted. - // Failed: All containers in the pod have terminated, and at least one container has - // terminated in failure. The container either exited with non-zero status or was terminated - // by the system. - // Unknown: For some reason the state of the pod could not be obtained, typically due to an - // error in communicating with the host of the pod. - // - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase - // +optional - Phase PodPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PodPhase"` - // Current service state of pod. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Conditions []PodCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` - // hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. - // A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will - // not be updated even if there is a node is assigned to pod - // +optional - HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"` - - // podIP address allocated to the pod. Routable at least within the cluster. - // Empty if not yet allocated. - // +optional - PodIP string `json:"podIP,omitempty" protobuf:"bytes,6,opt,name=podIP"` - - // podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must - // match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list - // is empty if no IPs have been allocated yet. - // +optional - // +patchStrategy=merge - // +patchMergeKey=ip - PodIPs []PodIP `json:"podIPs,omitempty" protobuf:"bytes,12,rep,name=podIPs" patchStrategy:"merge" patchMergeKey:"ip"` - - // RFC 3339 date and time at which the object was acknowledged by the Kubelet. - // This is before the Kubelet pulled the container image(s) for the pod. - // +optional - StartTime *slim_metav1.Time `json:"startTime,omitempty" protobuf:"bytes,7,opt,name=startTime"` - - // The list has one entry per container in the manifest. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - // +optional - ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty" protobuf:"bytes,8,rep,name=containerStatuses"` - // The Quality of Service (QOS) classification assigned to the pod based on resource requirements - // See PodQOSClass type for available QOS classes - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes - // +optional - QOSClass PodQOSClass `json:"qosClass,omitempty" protobuf:"bytes,9,rep,name=qosClass"` -} - -// +genclient -// +genclient:method=UpdateEphemeralContainers,verb=update,subresource=ephemeralcontainers -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Pod is a collection of containers that can run on a host. This resource is created -// by clients and scheduled onto hosts. -type Pod struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - slim_metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Specification of the desired behavior of the pod. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Most recently observed status of the pod. - // This data may not be up to date. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status PodStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// PodList is a list of Pods. -type PodList struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - slim_metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of pods. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md - Items []Pod `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// Session Affinity Type string -// +enum -type ServiceAffinity string - -const ( - // ServiceAffinityClientIP is the Client IP based. - ServiceAffinityClientIP ServiceAffinity = "ClientIP" - - // ServiceAffinityNone - no session affinity. - ServiceAffinityNone ServiceAffinity = "None" -) - -const DefaultClientIPServiceAffinitySeconds int32 = 10800 - -// SessionAffinityConfig represents the configurations of session affinity. -type SessionAffinityConfig struct { - // clientIP contains the configurations of Client IP based session affinity. - // +optional - ClientIP *ClientIPConfig `json:"clientIP,omitempty" protobuf:"bytes,1,opt,name=clientIP"` -} - -// ClientIPConfig represents the configurations of Client IP based session affinity. -type ClientIPConfig struct { - // timeoutSeconds specifies the seconds of ClientIP type session sticky time. - // The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". - // Default value is 10800(for 3 hours). - // +optional - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,1,opt,name=timeoutSeconds"` -} - -// Service Type string describes ingress methods for a service -// +enum -type ServiceType string - -const ( - // ServiceTypeClusterIP means a service will only be accessible inside the - // cluster, via the cluster IP. - ServiceTypeClusterIP ServiceType = "ClusterIP" - - // ServiceTypeNodePort means a service will be exposed on one port of - // every node, in addition to 'ClusterIP' type. - ServiceTypeNodePort ServiceType = "NodePort" - - // ServiceTypeLoadBalancer means a service will be exposed via an - // external load balancer (if the cloud provider supports it), in addition - // to 'NodePort' type. - ServiceTypeLoadBalancer ServiceType = "LoadBalancer" - - // ServiceTypeExternalName means a service consists of only a reference to - // an external name that kubedns or equivalent will return as a CNAME - // record, with no exposing or proxying of any pods involved. - ServiceTypeExternalName ServiceType = "ExternalName" -) - -// ServiceInternalTrafficPolicy describes how nodes distribute service traffic they -// receive on the ClusterIP. -// +enum -type ServiceInternalTrafficPolicy string - -const ( - // ServiceInternalTrafficPolicyCluster routes traffic to all endpoints. - ServiceInternalTrafficPolicyCluster ServiceInternalTrafficPolicy = "Cluster" - - // ServiceInternalTrafficPolicyLocal routes traffic only to endpoints on the same - // node as the client pod (dropping the traffic if there are no local endpoints). - ServiceInternalTrafficPolicyLocal ServiceInternalTrafficPolicy = "Local" -) - -// for backwards compat -// +enum -type ServiceInternalTrafficPolicyType = ServiceInternalTrafficPolicy - -// ServiceExternalTrafficPolicy describes how nodes distribute service traffic they -// receive on one of the Service's "externally-facing" addresses (NodePorts, ExternalIPs, -// and LoadBalancer IPs. -// +enum -type ServiceExternalTrafficPolicy string - -const ( - // ServiceExternalTrafficPolicyCluster routes traffic to all endpoints. - ServiceExternalTrafficPolicyCluster ServiceExternalTrafficPolicy = "Cluster" - - // ServiceExternalTrafficPolicyLocal preserves the source IP of the traffic by - // routing only to endpoints on the same node as the traffic was received on - // (dropping the traffic if there are no local endpoints). - ServiceExternalTrafficPolicyLocal ServiceExternalTrafficPolicy = "Local" -) - -// for backwards compat -// +enum -type ServiceExternalTrafficPolicyType = ServiceExternalTrafficPolicy - -// These are the valid conditions of a service. -const ( - // LoadBalancerPortsError represents the condition of the requested ports - // on the cloud load balancer instance. - LoadBalancerPortsError = "LoadBalancerPortsError" - // LoadBalancerPortsErrorReason reason in ServiceStatus condition LoadBalancerPortsError - // means the LoadBalancer was not able to be configured correctly. - LoadBalancerPortsErrorReason = "LoadBalancerMixedProtocolNotSupported" -) - -// ServiceStatus represents the current status of a service. -type ServiceStatus struct { - // LoadBalancer contains the current status of the load-balancer, - // if one is present. - // +optional - LoadBalancer LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"` - // Current service state - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - Conditions []slim_metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` -} - -// LoadBalancerStatus represents the status of a load-balancer. -type LoadBalancerStatus struct { - // Ingress is a list containing ingress points for the load-balancer. - // Traffic intended for the service should be sent to these ingress points. - // +optional - Ingress []LoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` -} - -// LoadBalancerIngress represents the status of a load-balancer ingress point: -// traffic intended for the service should be sent to an ingress point. -type LoadBalancerIngress struct { - // IP is set for load-balancer ingress points that are IP based - // (typically GCE or OpenStack load-balancers) - // +optional - IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"` - - // Hostname is set for load-balancer ingress points that are DNS based - // (typically AWS load-balancers) - // +optional - Hostname string `json:"hostname,omitempty" protobuf:"bytes,2,opt,name=hostname"` - - // IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified. - // Setting this to "VIP" indicates that traffic is delivered to the node with - // the destination set to the load-balancer's IP and port. - // Setting this to "Proxy" indicates that traffic is delivered to the node or pod with - // the destination set to the node's IP and node port or the pod's IP and port. - // Service implementations may use this information to adjust traffic routing. - // +optional - IPMode *LoadBalancerIPMode `json:"ipMode,omitempty" protobuf:"bytes,3,opt,name=ipMode"` - - // Ports is a list of records of service ports - // If used, every port defined in the service should have an entry in it - // +listType=atomic - // +optional - Ports []PortStatus `json:"ports,omitempty" protobuf:"bytes,4,rep,name=ports"` -} - -// IPFamily represents the IP Family (IPv4 or IPv6). This type is used -// to express the family of an IP expressed by a type (e.g. service.spec.ipFamilies). -// +enum -type IPFamily string - -const ( - // IPv4Protocol indicates that this IP is IPv4 protocol - IPv4Protocol IPFamily = "IPv4" - // IPv6Protocol indicates that this IP is IPv6 protocol - IPv6Protocol IPFamily = "IPv6" - // IPFamilyUnknown indicates that this IP is unknown protocol - IPFamilyUnknown IPFamily = "" -) - -// IPFamilyPolicy represents the dual-stack-ness requested or required by a Service -// +enum -type IPFamilyPolicy string - -const ( - // IPFamilyPolicySingleStack indicates that this service is required to have a single IPFamily. - // The IPFamily assigned is based on the default IPFamily used by the cluster - // or as identified by service.spec.ipFamilies field - IPFamilyPolicySingleStack IPFamilyPolicy = "SingleStack" - // IPFamilyPolicyPreferDualStack indicates that this service prefers dual-stack when - // the cluster is configured for dual-stack. If the cluster is not configured - // for dual-stack the service will be assigned a single IPFamily. If the IPFamily is not - // set in service.spec.ipFamilies then the service will be assigned the default IPFamily - // configured on the cluster - IPFamilyPolicyPreferDualStack IPFamilyPolicy = "PreferDualStack" - // IPFamilyPolicyRequireDualStack indicates that this service requires dual-stack. Using - // IPFamilyPolicyRequireDualStack on a single stack cluster will result in validation errors. The - // IPFamilies (and their order) assigned to this service is based on service.spec.ipFamilies. If - // service.spec.ipFamilies was not provided then it will be assigned according to how they are - // configured on the cluster. If service.spec.ipFamilies has only one entry then the alternative - // IPFamily will be added by apiserver - IPFamilyPolicyRequireDualStack IPFamilyPolicy = "RequireDualStack" -) - -// for backwards compat -// +enum -type IPFamilyPolicyType = IPFamilyPolicy - -// ServiceSpec describes the attributes that a user creates on a service. -type ServiceSpec struct { - // The list of ports that are exposed by this service. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +patchMergeKey=port - // +patchStrategy=merge - // +listType=map - // +listMapKey=port - // +listMapKey=protocol - Ports []ServicePort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"` - - // Route service traffic to pods with label keys and values matching this - // selector. If empty or not present, the service is assumed to have an - // external process managing its endpoints, which Kubernetes will not - // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. - // Ignored if type is ExternalName. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/ - // +optional - // +mapType=atomic - Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"` - - // clusterIP is the IP address of the service and is usually assigned - // randomly. If an address is specified manually, is in-range (as per - // system configuration), and is not in use, it will be allocated to the - // service; otherwise creation of the service will fail. This field may not - // be changed through updates unless the type field is also being changed - // to ExternalName (which requires this field to be blank) or the type - // field is being changed from ExternalName (in which case this field may - // optionally be specified, as describe above). Valid values are "None", - // empty string (""), or a valid IP address. Setting this to "None" makes a - // "headless service" (no virtual IP), which is useful when direct endpoint - // connections are preferred and proxying is not required. Only applies to - // types ClusterIP, NodePort, and LoadBalancer. If this field is specified - // when creating a Service of type ExternalName, creation will fail. This - // field will be wiped when updating a Service to type ExternalName. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +optional - ClusterIP string `json:"clusterIP,omitempty" protobuf:"bytes,3,opt,name=clusterIP"` - - // ClusterIPs is a list of IP addresses assigned to this service, and are - // usually assigned randomly. If an address is specified manually, is - // in-range (as per system configuration), and is not in use, it will be - // allocated to the service; otherwise creation of the service will fail. - // This field may not be changed through updates unless the type field is - // also being changed to ExternalName (which requires this field to be - // empty) or the type field is being changed from ExternalName (in which - // case this field may optionally be specified, as describe above). Valid - // values are "None", empty string (""), or a valid IP address. Setting - // this to "None" makes a "headless service" (no virtual IP), which is - // useful when direct endpoint connections are preferred and proxying is - // not required. Only applies to types ClusterIP, NodePort, and - // LoadBalancer. If this field is specified when creating a Service of type - // ExternalName, creation will fail. This field will be wiped when updating - // a Service to type ExternalName. If this field is not specified, it will - // be initialized from the clusterIP field. If this field is specified, - // clients must ensure that clusterIPs[0] and clusterIP have the same - // value. - // - // This field may hold a maximum of two entries (dual-stack IPs, in either order). - // These IPs must correspond to the values of the ipFamilies field. Both - // clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +listType=atomic - // +optional - ClusterIPs []string `json:"clusterIPs,omitempty" protobuf:"bytes,18,opt,name=clusterIPs"` - - // type determines how the Service is exposed. Defaults to ClusterIP. Valid - // options are ExternalName, ClusterIP, NodePort, and LoadBalancer. - // "ClusterIP" allocates a cluster-internal IP address for load-balancing - // to endpoints. Endpoints are determined by the selector or if that is not - // specified, by manual construction of an Endpoints object or - // EndpointSlice objects. If clusterIP is "None", no virtual IP is - // allocated and the endpoints are published as a set of endpoints rather - // than a virtual IP. - // "NodePort" builds on ClusterIP and allocates a port on every node which - // routes to the same endpoints as the clusterIP. - // "LoadBalancer" builds on NodePort and creates an external load-balancer - // (if supported in the current cloud) which routes to the same endpoints - // as the clusterIP. - // "ExternalName" aliases this service to the specified externalName. - // Several other fields do not apply to ExternalName services. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types - // +optional - Type ServiceType `json:"type,omitempty" protobuf:"bytes,4,opt,name=type,casttype=ServiceType"` - - // externalIPs is a list of IP addresses for which nodes in the cluster - // will also accept traffic for this service. These IPs are not managed by - // Kubernetes. The user is responsible for ensuring that traffic arrives - // at a node with this IP. A common example is external load-balancers - // that are not part of the Kubernetes system. - // +optional - ExternalIPs []string `json:"externalIPs,omitempty" protobuf:"bytes,5,rep,name=externalIPs"` - - // Supports "ClientIP" and "None". Used to maintain session affinity. - // Enable client IP based session affinity. - // Must be ClientIP or None. - // Defaults to None. - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // +optional - SessionAffinity ServiceAffinity `json:"sessionAffinity,omitempty" protobuf:"bytes,7,opt,name=sessionAffinity,casttype=ServiceAffinity"` - - // Only applies to Service Type: LoadBalancer. - // This feature depends on whether the underlying cloud-provider supports specifying - // the loadBalancerIP when a load balancer is created. - // This field will be ignored if the cloud-provider does not support the feature. - // Deprecated: This field was under-specified and its meaning varies across implementations. - // Using it is non-portable and it may not support dual-stack. - // Users are encouraged to use implementation-specific annotations when available. - // +optional - LoadBalancerIP string `json:"loadBalancerIP,omitempty" protobuf:"bytes,8,opt,name=loadBalancerIP"` - - // If specified and supported by the platform, this will restrict traffic through the cloud-provider - // load-balancer will be restricted to the specified client IPs. This field will be ignored if the - // cloud-provider does not support the feature." - // More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/ - // +optional - LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"` - - // externalTrafficPolicy describes how nodes distribute service traffic they - // receive on one of the Service's "externally-facing" addresses (NodePorts, - // ExternalIPs, and LoadBalancer IPs). If set to "Local", the proxy will configure - // the service in a way that assumes that external load balancers will take care - // of balancing the service traffic between nodes, and so each node will deliver - // traffic only to the node-local endpoints of the service, without masquerading - // the client source IP. (Traffic mistakenly sent to a node with no endpoints will - // be dropped.) The default value, "Cluster", uses the standard behavior of - // routing to all endpoints evenly (possibly modified by topology and other - // features). Note that traffic sent to an External IP or LoadBalancer IP from - // within the cluster will always get "Cluster" semantics, but clients sending to - // a NodePort from within the cluster may need to take traffic policy into account - // when picking a node. - // +optional - ExternalTrafficPolicy ServiceExternalTrafficPolicy `json:"externalTrafficPolicy,omitempty" protobuf:"bytes,11,opt,name=externalTrafficPolicy"` - - // healthCheckNodePort specifies the healthcheck nodePort for the service. - // This only applies when type is set to LoadBalancer and - // externalTrafficPolicy is set to Local. If a value is specified, is - // in-range, and is not in use, it will be used. If not specified, a value - // will be automatically allocated. External systems (e.g. load-balancers) - // can use this port to determine if a given node holds endpoints for this - // service or not. If this field is specified when creating a Service - // which does not need it, creation will fail. This field will be wiped - // when updating a Service to no longer need it (e.g. changing type). - // This field cannot be updated once set. - // +optional - HealthCheckNodePort int32 `json:"healthCheckNodePort,omitempty" protobuf:"bytes,12,opt,name=healthCheckNodePort"` - - // sessionAffinityConfig contains the configurations of session affinity. - // +optional - SessionAffinityConfig *SessionAffinityConfig `json:"sessionAffinityConfig,omitempty" protobuf:"bytes,14,opt,name=sessionAffinityConfig"` - - // IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this - // service. This field is usually assigned automatically based on cluster - // configuration and the ipFamilyPolicy field. If this field is specified - // manually, the requested family is available in the cluster, - // and ipFamilyPolicy allows it, it will be used; otherwise creation of - // the service will fail. This field is conditionally mutable: it allows - // for adding or removing a secondary IP family, but it does not allow - // changing the primary IP family of the Service. Valid values are "IPv4" - // and "IPv6". This field only applies to Services of types ClusterIP, - // NodePort, and LoadBalancer, and does apply to "headless" services. - // This field will be wiped when updating a Service to type ExternalName. - // - // This field may hold a maximum of two entries (dual-stack families, in - // either order). These families must correspond to the values of the - // clusterIPs field, if specified. Both clusterIPs and ipFamilies are - // governed by the ipFamilyPolicy field. - // +listType=atomic - // +optional - IPFamilies []IPFamily `json:"ipFamilies,omitempty" protobuf:"bytes,19,opt,name=ipFamilies,casttype=IPFamily"` - - // IPFamilyPolicy represents the dual-stack-ness requested or required by - // this Service. If there is no value provided, then this field will be set - // to SingleStack. Services can be "SingleStack" (a single IP family), - // "PreferDualStack" (two IP families on dual-stack configured clusters or - // a single IP family on single-stack clusters), or "RequireDualStack" - // (two IP families on dual-stack configured clusters, otherwise fail). The - // ipFamilies and clusterIPs fields depend on the value of this field. This - // field will be wiped when updating a service to type ExternalName. - // +optional - IPFamilyPolicy *IPFamilyPolicy `json:"ipFamilyPolicy,omitempty" protobuf:"bytes,17,opt,name=ipFamilyPolicy,casttype=IPFamilyPolicy"` - - // loadBalancerClass is the class of the load balancer implementation this Service belongs to. - // If specified, the value of this field must be a label-style identifier, with an optional prefix, - // e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. - // This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load - // balancer implementation is used, today this is typically done through the cloud provider integration, - // but should apply for any default implementation. If set, it is assumed that a load balancer - // implementation is watching for Services with a matching class. Any default load balancer - // implementation (e.g. cloud providers) should ignore Services that set this field. - // This field can only be set when creating or updating a Service to type 'LoadBalancer'. - // Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. - // +optional - LoadBalancerClass *string `json:"loadBalancerClass,omitempty" protobuf:"bytes,21,opt,name=loadBalancerClass"` - - // InternalTrafficPolicy describes how nodes distribute service traffic they - // receive on the ClusterIP. If set to "Local", the proxy will assume that pods - // only want to talk to endpoints of the service on the same node as the pod, - // dropping the traffic if there are no local endpoints. The default value, - // "Cluster", uses the standard behavior of routing to all endpoints evenly - // (possibly modified by topology and other features). - // +optional - InternalTrafficPolicy *ServiceInternalTrafficPolicy `json:"internalTrafficPolicy,omitempty" protobuf:"bytes,22,opt,name=internalTrafficPolicy"` -} - -// ServicePort contains information on service's port. -type ServicePort struct { - // The name of this port within the service. This must be a DNS_LABEL. - // All ports within a ServiceSpec must have unique names. When considering - // the endpoints for a Service, this must match the 'name' field in the - // EndpointPort. - // Optional if only one ServicePort is defined on this service. - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - - // The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". - // Default is TCP. - // +default="TCP" - // +optional - Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"` - - // The port that will be exposed by this service. - Port int32 `json:"port" protobuf:"varint,3,opt,name=port"` - - // The port on each node on which this service is exposed when type is - // NodePort or LoadBalancer. Usually assigned by the system. If a value is - // specified, in-range, and not in use it will be used, otherwise the - // operation will fail. If not specified, a port will be allocated if this - // Service requires one. If this field is specified when creating a - // Service which does not need it, creation will fail. This field will be - // wiped when updating a Service to no longer need it (e.g. changing type - // from NodePort to ClusterIP). - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - // +optional - NodePort int32 `json:"nodePort,omitempty" protobuf:"varint,5,opt,name=nodePort"` -} - -// +genclient -// +genclient:skipVerbs=deleteCollection -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Service is a named abstraction of software service (for example, mysql) consisting of local port -// (for example 3306) that the proxy listens on, and the selector that determines which pods -// will answer requests sent through the proxy. -type Service struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - slim_metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the behavior of a service. - // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec ServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Most recently observed status of the service. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status ServiceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ServiceList holds a list of services. -type ServiceList struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - slim_metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of services - Items []Service `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Endpoints is a collection of endpoints that implement the actual service. Example: -// -// Name: "mysvc", -// Subsets: [ -// { -// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], -// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] -// }, -// { -// Addresses: [{"ip": "10.10.3.3"}], -// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] -// }, -// ] -type Endpoints struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - slim_metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // The set of all endpoints is the union of all subsets. Addresses are placed into - // subsets according to the IPs they share. A single address with multiple ports, - // some of which are ready and some of which are not (because they come from - // different containers) will result in the address being displayed in different - // subsets for the different ports. No address will appear in both Addresses and - // NotReadyAddresses in the same subset. - // Sets of addresses and ports that comprise a service. - // +optional - Subsets []EndpointSubset `json:"subsets,omitempty" protobuf:"bytes,2,rep,name=subsets"` -} - -// EndpointSubset is a group of addresses with a common set of ports. The -// expanded set of endpoints is the Cartesian product of Addresses x Ports. -// For example, given: -// -// { -// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], -// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] -// } -// -// The resulting set of endpoints can be viewed as: -// -// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], -// b: [ 10.10.1.1:309, 10.10.2.2:309 ] -type EndpointSubset struct { - // IP addresses which offer the related ports that are marked as ready. These endpoints - // should be considered safe for load balancers and clients to utilize. - // +optional - Addresses []EndpointAddress `json:"addresses,omitempty" protobuf:"bytes,1,rep,name=addresses"` - // Port numbers available on the related IP addresses. - // +optional - Ports []EndpointPort `json:"ports,omitempty" protobuf:"bytes,3,rep,name=ports"` -} - -// EndpointAddress is a tuple that describes single IP address. -// +structType=atomic -type EndpointAddress struct { - // The IP of this endpoint. - // May not be loopback (127.0.0.0/8 or ::1), link-local (169.254.0.0/16 or fe80::/10), - // or link-local multicast (224.0.0.0/24 or ff02::/16). - IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"` - // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. - // +optional - NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,4,opt,name=nodeName"` -} - -// EndpointPort is a tuple that describes a single port. -// +structType=atomic -type EndpointPort struct { - // The name of this port. This must match the 'name' field in the - // corresponding ServicePort. - // Must be a DNS_LABEL. - // Optional only if one port is defined. - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - - // The port number of the endpoint. - Port int32 `json:"port" protobuf:"varint,2,opt,name=port"` - - // The IP protocol for this port. - // Must be UDP, TCP, or SCTP. - // Default is TCP. - // +optional - Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,3,opt,name=protocol,casttype=Protocol"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// EndpointsList is a list of endpoints. -type EndpointsList struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - slim_metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of endpoints. - Items []Endpoints `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// NodeSpec describes the attributes that a node is created with. -type NodeSpec struct { - // PodCIDR represents the pod IP range assigned to the node. - // +optional - PodCIDR string `json:"podCIDR,omitempty" protobuf:"bytes,1,opt,name=podCIDR"` - - // podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this - // field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for - // each of IPv4 and IPv6. - // +optional - // +patchStrategy=merge - PodCIDRs []string `json:"podCIDRs,omitempty" protobuf:"bytes,7,opt,name=podCIDRs" patchStrategy:"merge"` - - // ID of the node assigned by the cloud provider in the format: :// - // +optional - ProviderID string `json:"providerID,omitempty" protobuf:"bytes,3,opt,name=providerID"` - - // If specified, the node's taints. - // +optional - Taints []Taint `json:"taints,omitempty" protobuf:"bytes,5,opt,name=taints"` -} - -// NodeStatus is information about the current status of a node. -type NodeStatus struct { - // Conditions is an array of current observed node conditions. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Conditions []NodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` - // List of addresses reachable to the node. - // Queried from cloud provider, if available. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses - // Note: This field is declared as mergeable, but the merge key is not sufficiently - // unique, which can cause data corruption when it is merged. Callers should instead - // use a full-replacement patch. See https://pr.k8s.io/79391 for an example. - // Consumers should assume that addresses can change during the - // lifetime of a Node. However, there are some exceptions where this may not - // be possible, such as Pods that inherit a Node's address in its own status or - // consumers of the downward API (status.hostIP). - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Addresses []NodeAddress `json:"addresses,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,5,rep,name=addresses"` -} - -// +enum -type NodePhase string - -// These are the valid phases of node. -const ( - // NodePending means the node has been created/added by the system, but not configured. - NodePending NodePhase = "Pending" - // NodeRunning means the node has been configured and has Kubernetes components running. - NodeRunning NodePhase = "Running" - // NodeTerminated means the node has been removed from the cluster. - NodeTerminated NodePhase = "Terminated" -) - -type NodeConditionType string - -// These are valid but not exhaustive conditions of node. A cloud provider may set a condition not listed here. -// The built-in set of conditions are: -// NodeReachable, NodeLive, NodeReady, NodeSchedulable, NodeRunnable. -const ( - // NodeReady means kubelet is healthy and ready to accept pods. - NodeReady NodeConditionType = "Ready" - // NodeMemoryPressure means the kubelet is under pressure due to insufficient available memory. - NodeMemoryPressure NodeConditionType = "MemoryPressure" - // NodeDiskPressure means the kubelet is under pressure due to insufficient available disk. - NodeDiskPressure NodeConditionType = "DiskPressure" - // NodePIDPressure means the kubelet is under pressure due to insufficient available PID. - NodePIDPressure NodeConditionType = "PIDPressure" - // NodeNetworkUnavailable means that network for the node is not correctly configured. - NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable" -) - -// NodeCondition contains condition information for a node. -type NodeCondition struct { - // Type of node condition. - Type NodeConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=NodeConditionType"` - // Status of the condition, one of True, False, Unknown. - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // (brief) reason for the condition's last transition. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` -} - -// +enum -type NodeAddressType string - -// These are built-in addresses type of node. A cloud provider may set a type not listed here. -const ( - // NodeHostName identifies a name of the node. Although every node can be assumed - // to have a NodeAddress of this type, its exact syntax and semantics are not - // defined, and are not consistent between different clusters. - NodeHostName NodeAddressType = "Hostname" - - // NodeInternalIP identifies an IP address which is assigned to one of the node's - // network interfaces. Every node should have at least one address of this type. - // - // An internal IP is normally expected to be reachable from every other node, but - // may not be visible to hosts outside the cluster. By default it is assumed that - // kube-apiserver can reach node internal IPs, though it is possible to configure - // clusters where this is not the case. - // - // NodeInternalIP is the default type of node IP, and does not necessarily imply - // that the IP is ONLY reachable internally. If a node has multiple internal IPs, - // no specific semantics are assigned to the additional IPs. - NodeInternalIP NodeAddressType = "InternalIP" - - // NodeExternalIP identifies an IP address which is, in some way, intended to be - // more usable from outside the cluster then an internal IP, though no specific - // semantics are defined. It may be a globally routable IP, though it is not - // required to be. - // - // External IPs may be assigned directly to an interface on the node, like a - // NodeInternalIP, or alternatively, packets sent to the external IP may be NAT'ed - // to an internal node IP rather than being delivered directly (making the IP less - // efficient for node-to-node traffic than a NodeInternalIP). - NodeExternalIP NodeAddressType = "ExternalIP" - - // NodeInternalDNS identifies a DNS name which resolves to an IP address which has - // the characteristics of a NodeInternalIP. The IP it resolves to may or may not - // be a listed NodeInternalIP address. - NodeInternalDNS NodeAddressType = "InternalDNS" - - // NodeExternalDNS identifies a DNS name which resolves to an IP address which has - // the characteristics of a NodeExternalIP. The IP it resolves to may or may not - // be a listed NodeExternalIP address. - NodeExternalDNS NodeAddressType = "ExternalDNS" -) - -// NodeAddress contains information for the node's address. -type NodeAddress struct { - // Node address type, one of Hostname, ExternalIP or InternalIP. - Type NodeAddressType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=NodeAddressType"` - // The node address. - Address string `json:"address" protobuf:"bytes,2,opt,name=address"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Node is a worker node in Kubernetes. -// Each node will have a unique identifier in the cache (i.e. in etcd). -type Node struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - slim_metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the behavior of a node. - // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec NodeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Most recently observed status of the node. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status NodeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NodeList is the whole list of all Nodes which have been registered with master. -type NodeList struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - slim_metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of nodes - Items []Node `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:nonNamespaced -// +genclient:skipVerbs=deleteCollection -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Namespace provides a scope for Names. -// Use of multiple namespaces is optional. -type Namespace struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - slim_metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NamespaceList is a list of Namespaces. -type NamespaceList struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - slim_metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of Namespace objects in the list. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - Items []Namespace `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// TypedLocalObjectReference contains enough information to let you locate the -// typed referenced object inside the same namespace. -// +structType=atomic -type TypedLocalObjectReference struct { - // APIGroup is the group for the resource being referenced. - // If APIGroup is not specified, the specified Kind must be in the core API group. - // For any other third-party types, APIGroup is required. - // +optional - 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"` -} - -// Bytes type is used to avoid issue with deepequal -// deepequal.go:607 Hit an unsupported type []byte for map[string][]byte, from map[string][]byte -type Bytes []byte - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Secret holds secret data of a certain type. The total bytes of the values in -// the Data field must be less than MaxSecretSize bytes. -type Secret struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - slim_metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Immutable, if set to true, ensures that data stored in the Secret cannot - // be updated (only object metadata can be modified). - // If not set to true, the field can be modified at any time. - // Defaulted to nil. - // +optional - Immutable *bool `json:"immutable,omitempty" protobuf:"varint,5,opt,name=immutable"` - - // Data contains the secret data. Each key must consist of alphanumeric - // characters, '-', '_' or '.'. The serialized form of the secret data is a - // base64 encoded string, representing the arbitrary (possibly non-string) - // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 - // +optional - Data map[string]Bytes `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"` - - // stringData allows specifying non-binary secret data in string form. - // It is provided as a write-only input field for convenience. - // All keys and values are merged into the data field on write, overwriting any existing values. - // The stringData field is never output when reading from the API. - // +k8s:conversion-gen=false - // +optional - StringData map[string]string `json:"stringData,omitempty" protobuf:"bytes,4,rep,name=stringData"` - - // Used to facilitate programmatic handling of secret data. - // More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types - // +optional - Type SecretType `json:"type,omitempty" protobuf:"bytes,3,opt,name=type,casttype=SecretType"` -} - -const MaxSecretSize = 1 * 1024 * 1024 - -type SecretType string - -const ( - // SecretTypeOpaque is the default. Arbitrary user-defined data - SecretTypeOpaque SecretType = "Opaque" - - // SecretTypeServiceAccountToken contains a token that identifies a service account to the API - // - // Required fields: - // - Secret.Annotations["kubernetes.io/service-account.name"] - the name of the ServiceAccount the token identifies - // - Secret.Annotations["kubernetes.io/service-account.uid"] - the UID of the ServiceAccount the token identifies - // - Secret.Data["token"] - a token that identifies the service account to the API - SecretTypeServiceAccountToken SecretType = "kubernetes.io/service-account-token" - - // ServiceAccountNameKey is the key of the required annotation for SecretTypeServiceAccountToken secrets - ServiceAccountNameKey = "kubernetes.io/service-account.name" - // ServiceAccountUIDKey is the key of the required annotation for SecretTypeServiceAccountToken secrets - ServiceAccountUIDKey = "kubernetes.io/service-account.uid" - // ServiceAccountTokenKey is the key of the required data for SecretTypeServiceAccountToken secrets - ServiceAccountTokenKey = "token" - // ServiceAccountKubeconfigKey is the key of the optional kubeconfig data for SecretTypeServiceAccountToken secrets - ServiceAccountKubeconfigKey = "kubernetes.kubeconfig" - // ServiceAccountRootCAKey is the key of the optional root certificate authority for SecretTypeServiceAccountToken secrets - ServiceAccountRootCAKey = "ca.crt" - // ServiceAccountNamespaceKey is the key of the optional namespace to use as the default for namespaced API calls - ServiceAccountNamespaceKey = "namespace" - - // SecretTypeDockercfg contains a dockercfg file that follows the same format rules as ~/.dockercfg - // - // Required fields: - // - Secret.Data[".dockercfg"] - a serialized ~/.dockercfg file - SecretTypeDockercfg SecretType = "kubernetes.io/dockercfg" - - // DockerConfigKey is the key of the required data for SecretTypeDockercfg secrets - DockerConfigKey = ".dockercfg" - - // SecretTypeDockerConfigJson contains a dockercfg file that follows the same format rules as ~/.docker/config.json - // - // Required fields: - // - Secret.Data[".dockerconfigjson"] - a serialized ~/.docker/config.json file - SecretTypeDockerConfigJson SecretType = "kubernetes.io/dockerconfigjson" - - // DockerConfigJsonKey is the key of the required data for SecretTypeDockerConfigJson secrets - DockerConfigJsonKey = ".dockerconfigjson" - - // SecretTypeBasicAuth contains data needed for basic authentication. - // - // Required at least one of fields: - // - Secret.Data["username"] - username used for authentication - // - Secret.Data["password"] - password or token needed for authentication - SecretTypeBasicAuth SecretType = "kubernetes.io/basic-auth" - - // BasicAuthUsernameKey is the key of the username for SecretTypeBasicAuth secrets - BasicAuthUsernameKey = "username" - // BasicAuthPasswordKey is the key of the password or token for SecretTypeBasicAuth secrets - BasicAuthPasswordKey = "password" - - // SecretTypeSSHAuth contains data needed for SSH authetication. - // - // Required field: - // - Secret.Data["ssh-privatekey"] - private SSH key needed for authentication - SecretTypeSSHAuth SecretType = "kubernetes.io/ssh-auth" - - // SSHAuthPrivateKey is the key of the required SSH private key for SecretTypeSSHAuth secrets - SSHAuthPrivateKey = "ssh-privatekey" - // SecretTypeTLS contains information about a TLS client or server secret. It - // is primarily used with TLS termination of the Ingress resource, but may be - // used in other types. - // - // Required fields: - // - Secret.Data["tls.key"] - TLS private key. - // Secret.Data["tls.crt"] - TLS certificate. - // TODO: Consider supporting different formats, specifying CA/destinationCA. - SecretTypeTLS SecretType = "kubernetes.io/tls" - - // TLSCertKey is the key for tls certificates in a TLS secret. - TLSCertKey = "tls.crt" - // TLSPrivateKeyKey is the key for the private key field in a TLS secret. - TLSPrivateKeyKey = "tls.key" - // SecretTypeBootstrapToken is used during the automated bootstrap process (first - // implemented by kubeadm). It stores tokens that are used to sign well known - // ConfigMaps. They are used for authn. - SecretTypeBootstrapToken SecretType = "bootstrap.kubernetes.io/token" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SecretList is a list of Secret. -type SecretList struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - slim_metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is a list of secret objects. - // More info: https://kubernetes.io/docs/concepts/configuration/secret - Items []Secret `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// PortStatus represents the error condition of a service port - -type PortStatus struct { - // Port is the port number of the service port of which status is recorded here - Port int32 `json:"port" protobuf:"varint,1,opt,name=port"` - // Protocol is the protocol of the service port of which status is recorded here - // The supported values are: "TCP", "UDP", "SCTP" - Protocol Protocol `json:"protocol" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"` - // Error is to record the problem with the service port - // The format of the error shall comply with the following rules: - // - built-in error values shall be specified in this file and those shall use - // CamelCase names - // - cloud provider specific error values must have names that comply with the - // format foo.example.com/CamelCase. - // --- - // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - // +optional - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` - // +kubebuilder:validation:MaxLength=316 - Error *string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"` -} - -// LoadBalancerIPMode represents the mode of the LoadBalancer ingress IP -type LoadBalancerIPMode string - -const ( - // LoadBalancerIPModeVIP indicates that traffic is delivered to the node with - // the destination set to the load-balancer's IP and port. - LoadBalancerIPModeVIP LoadBalancerIPMode = "VIP" - // LoadBalancerIPModeProxy indicates that traffic is delivered to the node or pod with - // the destination set to the node's IP and port or the pod's IP and port. - LoadBalancerIPModeProxy LoadBalancerIPMode = "Proxy" -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/zz_generated.deepcopy.go deleted file mode 100644 index 182db516036..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1058 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/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 Bytes) DeepCopyInto(out *Bytes) { - { - in := &in - *out = make(Bytes, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bytes. -func (in Bytes) DeepCopy() Bytes { - if in == nil { - return nil - } - out := new(Bytes) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClientIPConfig) DeepCopyInto(out *ClientIPConfig) { - *out = *in - if in.TimeoutSeconds != nil { - in, out := &in.TimeoutSeconds, &out.TimeoutSeconds - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientIPConfig. -func (in *ClientIPConfig) DeepCopy() *ClientIPConfig { - if in == nil { - return nil - } - out := new(ClientIPConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Container) DeepCopyInto(out *Container) { - *out = *in - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]ContainerPort, len(*in)) - copy(*out, *in) - } - if in.VolumeMounts != nil { - in, out := &in.VolumeMounts, &out.VolumeMounts - *out = make([]VolumeMount, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Container. -func (in *Container) DeepCopy() *Container { - if in == nil { - return nil - } - out := new(Container) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerPort) DeepCopyInto(out *ContainerPort) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerPort. -func (in *ContainerPort) DeepCopy() *ContainerPort { - if in == nil { - return nil - } - out := new(ContainerPort) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerState) DeepCopyInto(out *ContainerState) { - *out = *in - if in.Running != nil { - in, out := &in.Running, &out.Running - *out = new(ContainerStateRunning) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerState. -func (in *ContainerState) DeepCopy() *ContainerState { - if in == nil { - return nil - } - out := new(ContainerState) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerStateRunning) DeepCopyInto(out *ContainerStateRunning) { - *out = *in - in.StartedAt.DeepCopyInto(&out.StartedAt) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerStateRunning. -func (in *ContainerStateRunning) DeepCopy() *ContainerStateRunning { - if in == nil { - return nil - } - out := new(ContainerStateRunning) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerStatus) DeepCopyInto(out *ContainerStatus) { - *out = *in - in.State.DeepCopyInto(&out.State) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerStatus. -func (in *ContainerStatus) DeepCopy() *ContainerStatus { - if in == nil { - return nil - } - out := new(ContainerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointAddress) DeepCopyInto(out *EndpointAddress) { - *out = *in - if in.NodeName != nil { - in, out := &in.NodeName, &out.NodeName - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointAddress. -func (in *EndpointAddress) DeepCopy() *EndpointAddress { - if in == nil { - return nil - } - out := new(EndpointAddress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointPort) DeepCopyInto(out *EndpointPort) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPort. -func (in *EndpointPort) DeepCopy() *EndpointPort { - if in == nil { - return nil - } - out := new(EndpointPort) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointSubset) DeepCopyInto(out *EndpointSubset) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]EndpointAddress, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]EndpointPort, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSubset. -func (in *EndpointSubset) DeepCopy() *EndpointSubset { - if in == nil { - return nil - } - out := new(EndpointSubset) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Endpoints) DeepCopyInto(out *Endpoints) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Subsets != nil { - in, out := &in.Subsets, &out.Subsets - *out = make([]EndpointSubset, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoints. -func (in *Endpoints) DeepCopy() *Endpoints { - if in == nil { - return nil - } - out := new(Endpoints) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Endpoints) 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 *EndpointsList) DeepCopyInto(out *EndpointsList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Endpoints, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointsList. -func (in *EndpointsList) DeepCopy() *EndpointsList { - if in == nil { - return nil - } - out := new(EndpointsList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EndpointsList) 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 *LoadBalancerIngress) DeepCopyInto(out *LoadBalancerIngress) { - *out = *in - if in.IPMode != nil { - in, out := &in.IPMode, &out.IPMode - *out = new(LoadBalancerIPMode) - **out = **in - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]PortStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerIngress. -func (in *LoadBalancerIngress) DeepCopy() *LoadBalancerIngress { - if in == nil { - return nil - } - out := new(LoadBalancerIngress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoadBalancerStatus) DeepCopyInto(out *LoadBalancerStatus) { - *out = *in - if in.Ingress != nil { - in, out := &in.Ingress, &out.Ingress - *out = make([]LoadBalancerIngress, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerStatus. -func (in *LoadBalancerStatus) DeepCopy() *LoadBalancerStatus { - if in == nil { - return nil - } - out := new(LoadBalancerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Namespace) DeepCopyInto(out *Namespace) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Namespace. -func (in *Namespace) DeepCopy() *Namespace { - if in == nil { - return nil - } - out := new(Namespace) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Namespace) 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 *NamespaceList) DeepCopyInto(out *NamespaceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Namespace, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceList. -func (in *NamespaceList) DeepCopy() *NamespaceList { - if in == nil { - return nil - } - out := new(NamespaceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespaceList) 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 *Node) DeepCopyInto(out *Node) { - *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 Node. -func (in *Node) DeepCopy() *Node { - if in == nil { - return nil - } - out := new(Node) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Node) 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 *NodeAddress) DeepCopyInto(out *NodeAddress) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAddress. -func (in *NodeAddress) DeepCopy() *NodeAddress { - if in == nil { - return nil - } - out := new(NodeAddress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeCondition) DeepCopyInto(out *NodeCondition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeCondition. -func (in *NodeCondition) DeepCopy() *NodeCondition { - if in == nil { - return nil - } - out := new(NodeCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeList) DeepCopyInto(out *NodeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Node, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList. -func (in *NodeList) DeepCopy() *NodeList { - if in == nil { - return nil - } - out := new(NodeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeList) 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 *NodeSpec) DeepCopyInto(out *NodeSpec) { - *out = *in - if in.PodCIDRs != nil { - in, out := &in.PodCIDRs, &out.PodCIDRs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Taints != nil { - in, out := &in.Taints, &out.Taints - *out = make([]Taint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec. -func (in *NodeSpec) DeepCopy() *NodeSpec { - if in == nil { - return nil - } - out := new(NodeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]NodeCondition, len(*in)) - copy(*out, *in) - } - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]NodeAddress, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus. -func (in *NodeStatus) DeepCopy() *NodeStatus { - if in == nil { - return nil - } - out := new(NodeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Pod) DeepCopyInto(out *Pod) { - *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 Pod. -func (in *Pod) DeepCopy() *Pod { - if in == nil { - return nil - } - out := new(Pod) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Pod) 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 *PodCondition) DeepCopyInto(out *PodCondition) { - *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 PodCondition. -func (in *PodCondition) DeepCopy() *PodCondition { - if in == nil { - return nil - } - out := new(PodCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodIP) DeepCopyInto(out *PodIP) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIP. -func (in *PodIP) DeepCopy() *PodIP { - if in == nil { - return nil - } - out := new(PodIP) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodList) DeepCopyInto(out *PodList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Pod, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodList. -func (in *PodList) DeepCopy() *PodList { - if in == nil { - return nil - } - out := new(PodList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodList) 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 *PodSpec) DeepCopyInto(out *PodSpec) { - *out = *in - if in.InitContainers != nil { - in, out := &in.InitContainers, &out.InitContainers - *out = make([]Container, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Containers != nil { - in, out := &in.Containers, &out.Containers - *out = make([]Container, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec. -func (in *PodSpec) DeepCopy() *PodSpec { - if in == nil { - return nil - } - out := new(PodSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodStatus) DeepCopyInto(out *PodStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]PodCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.PodIPs != nil { - in, out := &in.PodIPs, &out.PodIPs - *out = make([]PodIP, len(*in)) - copy(*out, *in) - } - if in.StartTime != nil { - in, out := &in.StartTime, &out.StartTime - *out = (*in).DeepCopy() - } - if in.ContainerStatuses != nil { - in, out := &in.ContainerStatuses, &out.ContainerStatuses - *out = make([]ContainerStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStatus. -func (in *PodStatus) DeepCopy() *PodStatus { - if in == nil { - return nil - } - out := new(PodStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PortStatus) DeepCopyInto(out *PortStatus) { - *out = *in - if in.Error != nil { - in, out := &in.Error, &out.Error - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortStatus. -func (in *PortStatus) DeepCopy() *PortStatus { - if in == nil { - return nil - } - out := new(PortStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Secret) DeepCopyInto(out *Secret) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Immutable != nil { - in, out := &in.Immutable, &out.Immutable - *out = new(bool) - **out = **in - } - if in.Data != nil { - in, out := &in.Data, &out.Data - *out = make(map[string]Bytes, len(*in)) - for key, val := range *in { - var outVal []byte - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make(Bytes, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - if in.StringData != nil { - in, out := &in.StringData, &out.StringData - *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 Secret. -func (in *Secret) DeepCopy() *Secret { - if in == nil { - return nil - } - out := new(Secret) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Secret) 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 *SecretList) DeepCopyInto(out *SecretList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Secret, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretList. -func (in *SecretList) DeepCopy() *SecretList { - if in == nil { - return nil - } - out := new(SecretList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SecretList) 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 *Service) DeepCopyInto(out *Service) { - *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 Service. -func (in *Service) DeepCopy() *Service { - if in == nil { - return nil - } - out := new(Service) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Service) 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 *ServiceList) DeepCopyInto(out *ServiceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Service, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceList. -func (in *ServiceList) DeepCopy() *ServiceList { - if in == nil { - return nil - } - out := new(ServiceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceList) 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 *ServicePort) DeepCopyInto(out *ServicePort) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePort. -func (in *ServicePort) DeepCopy() *ServicePort { - if in == nil { - return nil - } - out := new(ServicePort) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { - *out = *in - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]ServicePort, len(*in)) - copy(*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 - } - } - if in.ClusterIPs != nil { - in, out := &in.ClusterIPs, &out.ClusterIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExternalIPs != nil { - in, out := &in.ExternalIPs, &out.ExternalIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.LoadBalancerSourceRanges != nil { - in, out := &in.LoadBalancerSourceRanges, &out.LoadBalancerSourceRanges - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SessionAffinityConfig != nil { - in, out := &in.SessionAffinityConfig, &out.SessionAffinityConfig - *out = new(SessionAffinityConfig) - (*in).DeepCopyInto(*out) - } - if in.IPFamilies != nil { - in, out := &in.IPFamilies, &out.IPFamilies - *out = make([]IPFamily, len(*in)) - copy(*out, *in) - } - if in.IPFamilyPolicy != nil { - in, out := &in.IPFamilyPolicy, &out.IPFamilyPolicy - *out = new(IPFamilyPolicy) - **out = **in - } - if in.LoadBalancerClass != nil { - in, out := &in.LoadBalancerClass, &out.LoadBalancerClass - *out = new(string) - **out = **in - } - if in.InternalTrafficPolicy != nil { - in, out := &in.InternalTrafficPolicy, &out.InternalTrafficPolicy - *out = new(ServiceInternalTrafficPolicy) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec. -func (in *ServiceSpec) DeepCopy() *ServiceSpec { - if in == nil { - return nil - } - out := new(ServiceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus) { - *out = *in - in.LoadBalancer.DeepCopyInto(&out.LoadBalancer) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceStatus. -func (in *ServiceStatus) DeepCopy() *ServiceStatus { - if in == nil { - return nil - } - out := new(ServiceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SessionAffinityConfig) DeepCopyInto(out *SessionAffinityConfig) { - *out = *in - if in.ClientIP != nil { - in, out := &in.ClientIP, &out.ClientIP - *out = new(ClientIPConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionAffinityConfig. -func (in *SessionAffinityConfig) DeepCopy() *SessionAffinityConfig { - if in == nil { - return nil - } - out := new(SessionAffinityConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Taint) DeepCopyInto(out *Taint) { - *out = *in - if in.TimeAdded != nil { - in, out := &in.TimeAdded, &out.TimeAdded - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Taint. -func (in *Taint) DeepCopy() *Taint { - if in == nil { - return nil - } - out := new(Taint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TypedLocalObjectReference) DeepCopyInto(out *TypedLocalObjectReference) { - *out = *in - if in.APIGroup != nil { - in, out := &in.APIGroup, &out.APIGroup - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypedLocalObjectReference. -func (in *TypedLocalObjectReference) DeepCopy() *TypedLocalObjectReference { - if in == nil { - return nil - } - out := new(TypedLocalObjectReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VolumeMount) DeepCopyInto(out *VolumeMount) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeMount. -func (in *VolumeMount) DeepCopy() *VolumeMount { - if in == nil { - return nil - } - out := new(VolumeMount) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/zz_generated.deepequal.go deleted file mode 100644 index aed723500ba..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/zz_generated.deepequal.go +++ /dev/null @@ -1,1379 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package v1 - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Bytes) DeepEqual(other *Bytes) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ClientIPConfig) DeepEqual(other *ClientIPConfig) bool { - if other == nil { - return false - } - - if (in.TimeoutSeconds == nil) != (other.TimeoutSeconds == nil) { - return false - } else if in.TimeoutSeconds != nil { - if *in.TimeoutSeconds != *other.TimeoutSeconds { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Container) DeepEqual(other *Container) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if in.Image != other.Image { - return false - } - if ((in.Ports != nil) && (other.Ports != nil)) || ((in.Ports == nil) != (other.Ports == nil)) { - in, other := &in.Ports, &other.Ports - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.VolumeMounts != nil) && (other.VolumeMounts != nil)) || ((in.VolumeMounts == nil) != (other.VolumeMounts == nil)) { - in, other := &in.VolumeMounts, &other.VolumeMounts - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ContainerPort) DeepEqual(other *ContainerPort) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if in.HostPort != other.HostPort { - return false - } - if in.ContainerPort != other.ContainerPort { - return false - } - if in.Protocol != other.Protocol { - return false - } - if in.HostIP != other.HostIP { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ContainerState) DeepEqual(other *ContainerState) bool { - if other == nil { - return false - } - - if (in.Running == nil) != (other.Running == nil) { - return false - } else if in.Running != nil { - if !in.Running.DeepEqual(other.Running) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ContainerStateRunning) DeepEqual(other *ContainerStateRunning) bool { - if other == nil { - return false - } - - if !in.StartedAt.DeepEqual(&other.StartedAt) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ContainerStatus) DeepEqual(other *ContainerStatus) bool { - if other == nil { - return false - } - - if !in.State.DeepEqual(&other.State) { - return false - } - - if in.ContainerID != other.ContainerID { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointAddress) DeepEqual(other *EndpointAddress) bool { - if other == nil { - return false - } - - if in.IP != other.IP { - return false - } - if (in.NodeName == nil) != (other.NodeName == nil) { - return false - } else if in.NodeName != nil { - if *in.NodeName != *other.NodeName { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointPort) DeepEqual(other *EndpointPort) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if in.Port != other.Port { - return false - } - if in.Protocol != other.Protocol { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointSubset) DeepEqual(other *EndpointSubset) bool { - if other == nil { - return false - } - - if ((in.Addresses != nil) && (other.Addresses != nil)) || ((in.Addresses == nil) != (other.Addresses == nil)) { - in, other := &in.Addresses, &other.Addresses - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Ports != nil) && (other.Ports != nil)) || ((in.Ports == nil) != (other.Ports == nil)) { - in, other := &in.Ports, &other.Ports - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Endpoints) DeepEqual(other *Endpoints) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ObjectMeta.DeepEqual(&other.ObjectMeta) { - return false - } - - if ((in.Subsets != nil) && (other.Subsets != nil)) || ((in.Subsets == nil) != (other.Subsets == nil)) { - in, other := &in.Subsets, &other.Subsets - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointsList) DeepEqual(other *EndpointsList) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ListMeta.DeepEqual(&other.ListMeta) { - return false - } - - if ((in.Items != nil) && (other.Items != nil)) || ((in.Items == nil) != (other.Items == nil)) { - in, other := &in.Items, &other.Items - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *LoadBalancerIngress) DeepEqual(other *LoadBalancerIngress) bool { - if other == nil { - return false - } - - if in.IP != other.IP { - return false - } - if in.Hostname != other.Hostname { - return false - } - if (in.IPMode == nil) != (other.IPMode == nil) { - return false - } else if in.IPMode != nil { - if *in.IPMode != *other.IPMode { - return false - } - } - - if ((in.Ports != nil) && (other.Ports != nil)) || ((in.Ports == nil) != (other.Ports == nil)) { - in, other := &in.Ports, &other.Ports - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *LoadBalancerStatus) DeepEqual(other *LoadBalancerStatus) bool { - if other == nil { - return false - } - - if ((in.Ingress != nil) && (other.Ingress != nil)) || ((in.Ingress == nil) != (other.Ingress == nil)) { - in, other := &in.Ingress, &other.Ingress - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Namespace) DeepEqual(other *Namespace) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ObjectMeta.DeepEqual(&other.ObjectMeta) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NamespaceList) DeepEqual(other *NamespaceList) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ListMeta.DeepEqual(&other.ListMeta) { - return false - } - - if ((in.Items != nil) && (other.Items != nil)) || ((in.Items == nil) != (other.Items == nil)) { - in, other := &in.Items, &other.Items - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Node) DeepEqual(other *Node) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ObjectMeta.DeepEqual(&other.ObjectMeta) { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - if !in.Status.DeepEqual(&other.Status) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NodeAddress) DeepEqual(other *NodeAddress) bool { - if other == nil { - return false - } - - if in.Type != other.Type { - return false - } - if in.Address != other.Address { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NodeCondition) DeepEqual(other *NodeCondition) bool { - if other == nil { - return false - } - - if in.Type != other.Type { - return false - } - if in.Status != other.Status { - return false - } - if in.Reason != other.Reason { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NodeList) DeepEqual(other *NodeList) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ListMeta.DeepEqual(&other.ListMeta) { - return false - } - - if ((in.Items != nil) && (other.Items != nil)) || ((in.Items == nil) != (other.Items == nil)) { - in, other := &in.Items, &other.Items - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NodeSpec) DeepEqual(other *NodeSpec) bool { - if other == nil { - return false - } - - if in.PodCIDR != other.PodCIDR { - return false - } - if ((in.PodCIDRs != nil) && (other.PodCIDRs != nil)) || ((in.PodCIDRs == nil) != (other.PodCIDRs == nil)) { - in, other := &in.PodCIDRs, &other.PodCIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if in.ProviderID != other.ProviderID { - return false - } - if ((in.Taints != nil) && (other.Taints != nil)) || ((in.Taints == nil) != (other.Taints == nil)) { - in, other := &in.Taints, &other.Taints - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NodeStatus) DeepEqual(other *NodeStatus) bool { - if other == nil { - return false - } - - if ((in.Conditions != nil) && (other.Conditions != nil)) || ((in.Conditions == nil) != (other.Conditions == nil)) { - in, other := &in.Conditions, &other.Conditions - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Addresses != nil) && (other.Addresses != nil)) || ((in.Addresses == nil) != (other.Addresses == nil)) { - in, other := &in.Addresses, &other.Addresses - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Pod) DeepEqual(other *Pod) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ObjectMeta.DeepEqual(&other.ObjectMeta) { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - if !in.Status.DeepEqual(&other.Status) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PodCondition) DeepEqual(other *PodCondition) bool { - if other == nil { - return false - } - - if in.Type != other.Type { - return false - } - if in.Status != other.Status { - return false - } - if !in.LastProbeTime.DeepEqual(&other.LastProbeTime) { - return false - } - - if !in.LastTransitionTime.DeepEqual(&other.LastTransitionTime) { - return false - } - - if in.Reason != other.Reason { - return false - } - if in.Message != other.Message { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PodIP) DeepEqual(other *PodIP) bool { - if other == nil { - return false - } - - if in.IP != other.IP { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PodList) DeepEqual(other *PodList) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ListMeta.DeepEqual(&other.ListMeta) { - return false - } - - if ((in.Items != nil) && (other.Items != nil)) || ((in.Items == nil) != (other.Items == nil)) { - in, other := &in.Items, &other.Items - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PodSpec) DeepEqual(other *PodSpec) bool { - if other == nil { - return false - } - - if ((in.InitContainers != nil) && (other.InitContainers != nil)) || ((in.InitContainers == nil) != (other.InitContainers == nil)) { - in, other := &in.InitContainers, &other.InitContainers - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Containers != nil) && (other.Containers != nil)) || ((in.Containers == nil) != (other.Containers == nil)) { - in, other := &in.Containers, &other.Containers - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if in.ServiceAccountName != other.ServiceAccountName { - return false - } - if in.NodeName != other.NodeName { - return false - } - if in.HostNetwork != other.HostNetwork { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PodStatus) DeepEqual(other *PodStatus) bool { - if other == nil { - return false - } - - if in.Phase != other.Phase { - return false - } - if ((in.Conditions != nil) && (other.Conditions != nil)) || ((in.Conditions == nil) != (other.Conditions == nil)) { - in, other := &in.Conditions, &other.Conditions - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if in.HostIP != other.HostIP { - return false - } - if in.PodIP != other.PodIP { - return false - } - if ((in.PodIPs != nil) && (other.PodIPs != nil)) || ((in.PodIPs == nil) != (other.PodIPs == nil)) { - in, other := &in.PodIPs, &other.PodIPs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if (in.StartTime == nil) != (other.StartTime == nil) { - return false - } else if in.StartTime != nil { - if !in.StartTime.DeepEqual(other.StartTime) { - return false - } - } - - if ((in.ContainerStatuses != nil) && (other.ContainerStatuses != nil)) || ((in.ContainerStatuses == nil) != (other.ContainerStatuses == nil)) { - in, other := &in.ContainerStatuses, &other.ContainerStatuses - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if in.QOSClass != other.QOSClass { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PortStatus) DeepEqual(other *PortStatus) bool { - if other == nil { - return false - } - - if in.Port != other.Port { - return false - } - if in.Protocol != other.Protocol { - return false - } - if (in.Error == nil) != (other.Error == nil) { - return false - } else if in.Error != nil { - if *in.Error != *other.Error { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Secret) DeepEqual(other *Secret) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ObjectMeta.DeepEqual(&other.ObjectMeta) { - return false - } - - if (in.Immutable == nil) != (other.Immutable == nil) { - return false - } else if in.Immutable != nil { - if *in.Immutable != *other.Immutable { - return false - } - } - - if ((in.Data != nil) && (other.Data != nil)) || ((in.Data == nil) != (other.Data == nil)) { - in, other := &in.Data, &other.Data - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if !inValue.DeepEqual(&otherValue) { - return false - } - } - } - } - } - - if ((in.StringData != nil) && (other.StringData != nil)) || ((in.StringData == nil) != (other.StringData == nil)) { - in, other := &in.StringData, &other.StringData - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - if in.Type != other.Type { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *SecretList) DeepEqual(other *SecretList) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ListMeta.DeepEqual(&other.ListMeta) { - return false - } - - if ((in.Items != nil) && (other.Items != nil)) || ((in.Items == nil) != (other.Items == nil)) { - in, other := &in.Items, &other.Items - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Service) DeepEqual(other *Service) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ObjectMeta.DeepEqual(&other.ObjectMeta) { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - if !in.Status.DeepEqual(&other.Status) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ServiceList) DeepEqual(other *ServiceList) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ListMeta.DeepEqual(&other.ListMeta) { - return false - } - - if ((in.Items != nil) && (other.Items != nil)) || ((in.Items == nil) != (other.Items == nil)) { - in, other := &in.Items, &other.Items - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ServicePort) DeepEqual(other *ServicePort) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - if in.Protocol != other.Protocol { - return false - } - if in.Port != other.Port { - return false - } - if in.NodePort != other.NodePort { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ServiceSpec) DeepEqual(other *ServiceSpec) bool { - if other == nil { - return false - } - - if ((in.Ports != nil) && (other.Ports != nil)) || ((in.Ports == nil) != (other.Ports == nil)) { - in, other := &in.Ports, &other.Ports - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Selector != nil) && (other.Selector != nil)) || ((in.Selector == nil) != (other.Selector == nil)) { - in, other := &in.Selector, &other.Selector - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - if in.ClusterIP != other.ClusterIP { - return false - } - if ((in.ClusterIPs != nil) && (other.ClusterIPs != nil)) || ((in.ClusterIPs == nil) != (other.ClusterIPs == nil)) { - in, other := &in.ClusterIPs, &other.ClusterIPs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if in.Type != other.Type { - return false - } - if ((in.ExternalIPs != nil) && (other.ExternalIPs != nil)) || ((in.ExternalIPs == nil) != (other.ExternalIPs == nil)) { - in, other := &in.ExternalIPs, &other.ExternalIPs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if in.SessionAffinity != other.SessionAffinity { - return false - } - if in.LoadBalancerIP != other.LoadBalancerIP { - return false - } - if ((in.LoadBalancerSourceRanges != nil) && (other.LoadBalancerSourceRanges != nil)) || ((in.LoadBalancerSourceRanges == nil) != (other.LoadBalancerSourceRanges == nil)) { - in, other := &in.LoadBalancerSourceRanges, &other.LoadBalancerSourceRanges - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if in.ExternalTrafficPolicy != other.ExternalTrafficPolicy { - return false - } - if in.HealthCheckNodePort != other.HealthCheckNodePort { - return false - } - if (in.SessionAffinityConfig == nil) != (other.SessionAffinityConfig == nil) { - return false - } else if in.SessionAffinityConfig != nil { - if !in.SessionAffinityConfig.DeepEqual(other.SessionAffinityConfig) { - return false - } - } - - if ((in.IPFamilies != nil) && (other.IPFamilies != nil)) || ((in.IPFamilies == nil) != (other.IPFamilies == nil)) { - in, other := &in.IPFamilies, &other.IPFamilies - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if (in.IPFamilyPolicy == nil) != (other.IPFamilyPolicy == nil) { - return false - } else if in.IPFamilyPolicy != nil { - if *in.IPFamilyPolicy != *other.IPFamilyPolicy { - return false - } - } - - if (in.LoadBalancerClass == nil) != (other.LoadBalancerClass == nil) { - return false - } else if in.LoadBalancerClass != nil { - if *in.LoadBalancerClass != *other.LoadBalancerClass { - return false - } - } - - if (in.InternalTrafficPolicy == nil) != (other.InternalTrafficPolicy == nil) { - return false - } else if in.InternalTrafficPolicy != nil { - if *in.InternalTrafficPolicy != *other.InternalTrafficPolicy { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ServiceStatus) DeepEqual(other *ServiceStatus) bool { - if other == nil { - return false - } - - if !in.LoadBalancer.DeepEqual(&other.LoadBalancer) { - return false - } - - if ((in.Conditions != nil) && (other.Conditions != nil)) || ((in.Conditions == nil) != (other.Conditions == nil)) { - in, other := &in.Conditions, &other.Conditions - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *SessionAffinityConfig) DeepEqual(other *SessionAffinityConfig) bool { - if other == nil { - return false - } - - if (in.ClientIP == nil) != (other.ClientIP == nil) { - return false - } else if in.ClientIP != nil { - if !in.ClientIP.DeepEqual(other.ClientIP) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Taint) DeepEqual(other *Taint) bool { - if other == nil { - return false - } - - if in.Key != other.Key { - return false - } - if in.Value != other.Value { - return false - } - if in.Effect != other.Effect { - return false - } - if (in.TimeAdded == nil) != (other.TimeAdded == nil) { - return false - } else if in.TimeAdded != nil { - if !in.TimeAdded.DeepEqual(other.TimeAdded) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *TypedLocalObjectReference) DeepEqual(other *TypedLocalObjectReference) bool { - if other == nil { - return false - } - - if (in.APIGroup == nil) != (other.APIGroup == nil) { - return false - } else if in.APIGroup != nil { - if *in.APIGroup != *other.APIGroup { - return false - } - } - - if in.Kind != other.Kind { - return false - } - if in.Name != other.Name { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *VolumeMount) DeepEqual(other *VolumeMount) bool { - if other == nil { - return false - } - - if in.MountPath != other.MountPath { - return false - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/doc.go deleted file mode 100644 index 6474070a367..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/doc.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +k8s:openapi-gen=true -// +deepequal-gen=package -// +groupName=discovery.k8s.io - -// Package v1 contains slimmer versions of k8s discovery types. -package v1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/generated.pb.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/generated.pb.go deleted file mode 100644 index 13b934cc88f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/generated.pb.go +++ /dev/null @@ -1,2092 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - github_com_cilium_cilium_pkg_k8s_slim_k8s_api_core_v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - - io "io" - - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *Endpoint) Reset() { *m = Endpoint{} } -func (*Endpoint) ProtoMessage() {} -func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_824daf76e2aebd1d, []int{0} -} -func (m *Endpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Endpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Endpoint.Merge(m, src) -} -func (m *Endpoint) XXX_Size() int { - return m.Size() -} -func (m *Endpoint) XXX_DiscardUnknown() { - xxx_messageInfo_Endpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_Endpoint proto.InternalMessageInfo - -func (m *EndpointConditions) Reset() { *m = EndpointConditions{} } -func (*EndpointConditions) ProtoMessage() {} -func (*EndpointConditions) Descriptor() ([]byte, []int) { - return fileDescriptor_824daf76e2aebd1d, []int{1} -} -func (m *EndpointConditions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointConditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointConditions) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointConditions.Merge(m, src) -} -func (m *EndpointConditions) XXX_Size() int { - return m.Size() -} -func (m *EndpointConditions) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointConditions.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointConditions proto.InternalMessageInfo - -func (m *EndpointHints) Reset() { *m = EndpointHints{} } -func (*EndpointHints) ProtoMessage() {} -func (*EndpointHints) Descriptor() ([]byte, []int) { - return fileDescriptor_824daf76e2aebd1d, []int{2} -} -func (m *EndpointHints) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointHints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointHints) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointHints.Merge(m, src) -} -func (m *EndpointHints) XXX_Size() int { - return m.Size() -} -func (m *EndpointHints) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointHints.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointHints proto.InternalMessageInfo - -func (m *EndpointPort) Reset() { *m = EndpointPort{} } -func (*EndpointPort) ProtoMessage() {} -func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_824daf76e2aebd1d, []int{3} -} -func (m *EndpointPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointPort.Merge(m, src) -} -func (m *EndpointPort) XXX_Size() int { - return m.Size() -} -func (m *EndpointPort) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointPort.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointPort proto.InternalMessageInfo - -func (m *EndpointSlice) Reset() { *m = EndpointSlice{} } -func (*EndpointSlice) ProtoMessage() {} -func (*EndpointSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_824daf76e2aebd1d, []int{4} -} -func (m *EndpointSlice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointSlice) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointSlice.Merge(m, src) -} -func (m *EndpointSlice) XXX_Size() int { - return m.Size() -} -func (m *EndpointSlice) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointSlice.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointSlice proto.InternalMessageInfo - -func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} } -func (*EndpointSliceList) ProtoMessage() {} -func (*EndpointSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_824daf76e2aebd1d, []int{5} -} -func (m *EndpointSliceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointSliceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointSliceList.Merge(m, src) -} -func (m *EndpointSliceList) XXX_Size() int { - return m.Size() -} -func (m *EndpointSliceList) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointSliceList.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointSliceList proto.InternalMessageInfo - -func (m *ForZone) Reset() { *m = ForZone{} } -func (*ForZone) ProtoMessage() {} -func (*ForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_824daf76e2aebd1d, []int{6} -} -func (m *ForZone) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ForZone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ForZone) XXX_Merge(src proto.Message) { - xxx_messageInfo_ForZone.Merge(m, src) -} -func (m *ForZone) XXX_Size() int { - return m.Size() -} -func (m *ForZone) XXX_DiscardUnknown() { - xxx_messageInfo_ForZone.DiscardUnknown(m) -} - -var xxx_messageInfo_ForZone proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Endpoint)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1.Endpoint") - proto.RegisterMapType((map[string]string)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1.Endpoint.DeprecatedTopologyEntry") - proto.RegisterType((*EndpointConditions)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1.EndpointConditions") - proto.RegisterType((*EndpointHints)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1.EndpointHints") - proto.RegisterType((*EndpointPort)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1.EndpointPort") - proto.RegisterType((*EndpointSlice)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1.EndpointSlice") - proto.RegisterType((*EndpointSliceList)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1.EndpointSliceList") - proto.RegisterType((*ForZone)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1.ForZone") -} - -func init() { - proto.RegisterFile("github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/generated.proto", fileDescriptor_824daf76e2aebd1d) -} - -var fileDescriptor_824daf76e2aebd1d = []byte{ - // 847 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0xe4, 0x34, - 0x18, 0x1e, 0xef, 0x34, 0x34, 0xe3, 0xb4, 0x62, 0xd7, 0x42, 0x22, 0xaa, 0x50, 0x32, 0x1a, 0x09, - 0x69, 0xa4, 0x15, 0x89, 0xda, 0x03, 0xaa, 0x7a, 0x40, 0x6c, 0xb6, 0x5d, 0xed, 0x22, 0x28, 0x2b, - 0x6f, 0x4f, 0x2b, 0x0e, 0xa4, 0x89, 0x37, 0x75, 0x67, 0x62, 0x87, 0xd8, 0x33, 0xd2, 0x70, 0x42, - 0xfb, 0x07, 0xe0, 0x67, 0x70, 0xe3, 0xc6, 0x6f, 0xe8, 0x71, 0x8f, 0x7b, 0x8a, 0x68, 0xf8, 0x09, - 0xdc, 0x7a, 0x42, 0x76, 0xbe, 0xa6, 0x4c, 0x11, 0xea, 0x30, 0xa7, 0xd8, 0x8f, 0x5f, 0x3f, 0xef, - 0xf3, 0x3e, 0xaf, 0x6d, 0x05, 0x7e, 0x95, 0x50, 0x79, 0x31, 0x3b, 0xf7, 0x22, 0x9e, 0xfa, 0x11, - 0x9d, 0xd2, 0x59, 0xfb, 0xc9, 0x26, 0x89, 0x3f, 0x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00, -} - -func (m *Endpoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Endpoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Hints != nil { - { - size, err := m.Hints.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.Zone != nil { - i -= len(*m.Zone) - copy(dAtA[i:], *m.Zone) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Zone))) - i-- - dAtA[i] = 0x3a - } - if m.NodeName != nil { - i -= len(*m.NodeName) - copy(dAtA[i:], *m.NodeName) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.NodeName))) - i-- - dAtA[i] = 0x32 - } - if len(m.DeprecatedTopology) > 0 { - keysForDeprecatedTopology := make([]string, 0, len(m.DeprecatedTopology)) - for k := range m.DeprecatedTopology { - keysForDeprecatedTopology = append(keysForDeprecatedTopology, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForDeprecatedTopology) - for iNdEx := len(keysForDeprecatedTopology) - 1; iNdEx >= 0; iNdEx-- { - v := m.DeprecatedTopology[string(keysForDeprecatedTopology[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForDeprecatedTopology[iNdEx]) - copy(dAtA[i:], keysForDeprecatedTopology[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForDeprecatedTopology[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - { - size, err := m.Conditions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Addresses[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *EndpointConditions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointConditions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointConditions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Terminating != nil { - i-- - if *m.Terminating { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.Serving != nil { - i-- - if *m.Serving { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Ready != nil { - i-- - if *m.Ready { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EndpointHints) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointHints) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointHints) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ForZones) > 0 { - for iNdEx := len(m.ForZones) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ForZones[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *EndpointPort) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointPort) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointPort) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Port != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Port)) - i-- - dAtA[i] = 0x18 - } - if m.Protocol != nil { - i -= len(*m.Protocol) - copy(dAtA[i:], *m.Protocol) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Protocol))) - i-- - dAtA[i] = 0x12 - } - if m.Name != nil { - i -= len(*m.Name) - copy(dAtA[i:], *m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EndpointSlice) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointSlice) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.AddressType) - copy(dAtA[i:], m.AddressType) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AddressType))) - i-- - dAtA[i] = 0x22 - if len(m.Ports) > 0 { - for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Endpoints) > 0 { - for iNdEx := len(m.Endpoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Endpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EndpointSliceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointSliceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ForZone) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ForZone) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ForZone) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Endpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.Conditions.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.DeprecatedTopology) > 0 { - for k, v := range m.DeprecatedTopology { - _ = 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.NodeName != nil { - l = len(*m.NodeName) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Zone != nil { - l = len(*m.Zone) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Hints != nil { - l = m.Hints.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *EndpointConditions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ready != nil { - n += 2 - } - if m.Serving != nil { - n += 2 - } - if m.Terminating != nil { - n += 2 - } - return n -} - -func (m *EndpointHints) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ForZones) > 0 { - for _, e := range m.ForZones { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *EndpointPort) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Protocol != nil { - l = len(*m.Protocol) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Port != nil { - n += 1 + sovGenerated(uint64(*m.Port)) - } - return n -} - -func (m *EndpointSlice) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Endpoints) > 0 { - for _, e := range m.Endpoints { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Ports) > 0 { - for _, e := range m.Ports { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.AddressType) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *EndpointSliceList) Size() (n int) { - if m == nil { - return 0 - } - 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 *ForZone) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Endpoint) String() string { - if this == nil { - return "nil" - } - keysForDeprecatedTopology := make([]string, 0, len(this.DeprecatedTopology)) - for k := range this.DeprecatedTopology { - keysForDeprecatedTopology = append(keysForDeprecatedTopology, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForDeprecatedTopology) - mapStringForDeprecatedTopology := "map[string]string{" - for _, k := range keysForDeprecatedTopology { - mapStringForDeprecatedTopology += fmt.Sprintf("%v: %v,", k, this.DeprecatedTopology[k]) - } - mapStringForDeprecatedTopology += "}" - s := strings.Join([]string{`&Endpoint{`, - `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, - `Conditions:` + strings.Replace(strings.Replace(this.Conditions.String(), "EndpointConditions", "EndpointConditions", 1), `&`, ``, 1) + `,`, - `DeprecatedTopology:` + mapStringForDeprecatedTopology + `,`, - `NodeName:` + valueToStringGenerated(this.NodeName) + `,`, - `Zone:` + valueToStringGenerated(this.Zone) + `,`, - `Hints:` + strings.Replace(this.Hints.String(), "EndpointHints", "EndpointHints", 1) + `,`, - `}`, - }, "") - return s -} -func (this *EndpointConditions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EndpointConditions{`, - `Ready:` + valueToStringGenerated(this.Ready) + `,`, - `Serving:` + valueToStringGenerated(this.Serving) + `,`, - `Terminating:` + valueToStringGenerated(this.Terminating) + `,`, - `}`, - }, "") - return s -} -func (this *EndpointHints) String() string { - if this == nil { - return "nil" - } - repeatedStringForForZones := "[]ForZone{" - for _, f := range this.ForZones { - repeatedStringForForZones += strings.Replace(strings.Replace(f.String(), "ForZone", "ForZone", 1), `&`, ``, 1) + "," - } - repeatedStringForForZones += "}" - s := strings.Join([]string{`&EndpointHints{`, - `ForZones:` + repeatedStringForForZones + `,`, - `}`, - }, "") - return s -} -func (this *EndpointPort) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EndpointPort{`, - `Name:` + valueToStringGenerated(this.Name) + `,`, - `Protocol:` + valueToStringGenerated(this.Protocol) + `,`, - `Port:` + valueToStringGenerated(this.Port) + `,`, - `}`, - }, "") - return s -} -func (this *EndpointSlice) String() string { - if this == nil { - return "nil" - } - repeatedStringForEndpoints := "[]Endpoint{" - for _, f := range this.Endpoints { - repeatedStringForEndpoints += strings.Replace(strings.Replace(f.String(), "Endpoint", "Endpoint", 1), `&`, ``, 1) + "," - } - repeatedStringForEndpoints += "}" - repeatedStringForPorts := "[]EndpointPort{" - for _, f := range this.Ports { - repeatedStringForPorts += strings.Replace(strings.Replace(f.String(), "EndpointPort", "EndpointPort", 1), `&`, ``, 1) + "," - } - repeatedStringForPorts += "}" - s := strings.Join([]string{`&EndpointSlice{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Endpoints:` + repeatedStringForEndpoints + `,`, - `Ports:` + repeatedStringForPorts + `,`, - `AddressType:` + fmt.Sprintf("%v", this.AddressType) + `,`, - `}`, - }, "") - return s -} -func (this *EndpointSliceList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]EndpointSlice{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "EndpointSlice", "EndpointSlice", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&EndpointSliceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ForZone) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ForZone{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - 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 *Endpoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Endpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Conditions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedTopology", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DeprecatedTopology == nil { - m.DeprecatedTopology = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.DeprecatedTopology[mapkey] = mapvalue - iNdEx = postIndex - case 6: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.NodeName = &s - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Zone = &s - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Hints == nil { - m.Hints = &EndpointHints{} - } - if err := m.Hints.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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointConditions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointConditions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointConditions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Ready", 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.Ready = &b - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Serving", 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.Serving = &b - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Terminating", 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.Terminating = &b - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointHints) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointHints: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointHints: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ForZones", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ForZones = append(m.ForZones, ForZone{}) - if err := m.ForZones[len(m.ForZones)-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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointPort) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointPort: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointPort: 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Name = &s - iNdEx = postIndex - case 2: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := github_com_cilium_cilium_pkg_k8s_slim_k8s_api_core_v1.Protocol(dAtA[iNdEx:postIndex]) - m.Protocol = &s - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", 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.Port = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointSlice) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointSlice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointSlice: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 Endpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Endpoints = append(m.Endpoints, Endpoint{}) - if err := m.Endpoints[len(m.Endpoints)-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 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ports = append(m.Ports, EndpointPort{}) - if err := m.Ports[len(m.Ports)-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 AddressType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AddressType = AddressType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointSliceList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointSliceList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointSliceList: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, EndpointSlice{}) - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ForZone) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ForZone: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ForZone: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+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 - depth := 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 - } - } - case 1: - iNdEx += 8 - 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 - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/generated.proto b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/generated.proto deleted file mode 100644 index d893485a0bf..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/generated.proto +++ /dev/null @@ -1,161 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1; - -import "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.proto"; -import "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1"; - -// Endpoint represents a single logical "backend" implementing a service. -message Endpoint { - // addresses of this endpoint. The contents of this field are interpreted - // according to the corresponding EndpointSlice addressType field. Consumers - // must handle different types of addresses in the context of their own - // capabilities. This must contain at least one address but no more than - // 100. These are all assumed to be fungible and clients may choose to only - // use the first element. Refer to: https://issue.k8s.io/106267 - // +listType=set - repeated string addresses = 1; - - // conditions contains information about the current status of the endpoint. - optional EndpointConditions conditions = 2; - - // deprecatedTopology contains topology information part of the v1beta1 - // API. This field is deprecated, and will be removed when the v1beta1 - // API is removed (no sooner than kubernetes v1.24). While this field can - // hold values, it is not writable through the v1 API, and any attempts to - // write to it will be silently ignored. Topology information can be found - // in the zone and nodeName fields instead. - // +optional - map deprecatedTopology = 5; - - // nodeName represents the name of the Node hosting this endpoint. This can - // be used to determine endpoints local to a Node. - // +optional - optional string nodeName = 6; - - // zone is the name of the Zone this endpoint exists in. - // +optional - optional string zone = 7; - - // hints contains information associated with how an endpoint should be - // consumed. - // +optional - optional EndpointHints hints = 8; -} - -// EndpointConditions represents the current condition of an endpoint. -message EndpointConditions { - // ready indicates that this endpoint is prepared to receive traffic, - // according to whatever system is managing the endpoint. A nil value - // indicates an unknown state. In most cases consumers should interpret this - // unknown state as ready. For compatibility reasons, ready should never be - // "true" for terminating endpoints, except when the normal readiness - // behavior is being explicitly overridden, for example when the associated - // Service has set the publishNotReadyAddresses flag. - // +optional - optional bool ready = 1; - - // serving is identical to ready except that it is set regardless of the - // terminating state of endpoints. This condition should be set to true for - // a ready endpoint that is terminating. If nil, consumers should defer to - // the ready condition. - // +optional - optional bool serving = 2; - - // terminating indicates that this endpoint is terminating. A nil value - // indicates an unknown state. Consumers should interpret this unknown state - // to mean that the endpoint is not terminating. - // +optional - optional bool terminating = 3; -} - -// EndpointHints provides hints describing how an endpoint should be consumed. -message EndpointHints { - // forZones indicates the zone(s) this endpoint should be consumed by to - // enable topology aware routing. - // +listType=atomic - repeated ForZone forZones = 1; -} - -// EndpointPort represents a Port used by an EndpointSlice -// +structType=atomic -message EndpointPort { - // name represents the name of this port. All ports in an EndpointSlice must have a unique name. - // If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. - // Name must either be an empty string or pass DNS_LABEL validation: - // * must be no more than 63 characters long. - // * must consist of lower case alphanumeric characters or '-'. - // * must start and end with an alphanumeric character. - // Default is empty string. - optional string name = 1; - - // protocol represents the IP protocol for this port. - // Must be UDP, TCP, or SCTP. - // Default is TCP. - optional string protocol = 2; - - // port represents the port number of the endpoint. - // If this is not specified, ports are not restricted and must be - // interpreted in the context of the specific consumer. - optional int32 port = 3; -} - -// EndpointSlice represents a subset of the endpoints that implement a service. -// For a given service there may be multiple EndpointSlice objects, selected by -// labels, which must be joined to produce the full set of endpoints. -message EndpointSlice { - // Standard object's metadata. - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ObjectMeta metadata = 1; - - // addressType specifies the type of address carried by this EndpointSlice. - // All addresses in this slice must be the same type. This field is - // immutable after creation. The following address types are currently - // supported: - // * IPv4: Represents an IPv4 Address. - // * IPv6: Represents an IPv6 Address. - // * FQDN: Represents a Fully Qualified Domain Name. - optional string addressType = 4; - - // endpoints is a list of unique endpoints in this slice. Each slice may - // include a maximum of 1000 endpoints. - // +listType=atomic - repeated Endpoint endpoints = 2; - - // ports specifies the list of network ports exposed by each endpoint in - // this slice. Each port must have a unique name. When ports is empty, it - // indicates that there are no defined ports. When a port is defined with a - // nil port value, it indicates "all ports". Each slice may include a - // maximum of 100 ports. - // +optional - // +listType=atomic - repeated EndpointPort ports = 3; -} - -// EndpointSliceList represents a list of endpoint slices -message EndpointSliceList { - // Standard list metadata. - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of endpoint slices - repeated EndpointSlice items = 2; -} - -// ForZone provides information about which zones should consume this endpoint. -message ForZone { - // name represents the name of the zone. - optional string name = 1; -} - diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/types.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/types.go deleted file mode 100644 index 51a23485e26..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/types.go +++ /dev/null @@ -1,176 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2019 The Kubernetes Authors. - -package v1 - -import ( - slim_corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// EndpointSlice represents a subset of the endpoints that implement a service. -// For a given service there may be multiple EndpointSlice objects, selected by -// labels, which must be joined to produce the full set of endpoints. -type EndpointSlice struct { - slim_metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // +optional - slim_metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // addressType specifies the type of address carried by this EndpointSlice. - // All addresses in this slice must be the same type. This field is - // immutable after creation. The following address types are currently - // supported: - // * IPv4: Represents an IPv4 Address. - // * IPv6: Represents an IPv6 Address. - // * FQDN: Represents a Fully Qualified Domain Name. - AddressType AddressType `json:"addressType" protobuf:"bytes,4,rep,name=addressType"` - - // endpoints is a list of unique endpoints in this slice. Each slice may - // include a maximum of 1000 endpoints. - // +listType=atomic - Endpoints []Endpoint `json:"endpoints" protobuf:"bytes,2,rep,name=endpoints"` - - // ports specifies the list of network ports exposed by each endpoint in - // this slice. Each port must have a unique name. When ports is empty, it - // indicates that there are no defined ports. When a port is defined with a - // nil port value, it indicates "all ports". Each slice may include a - // maximum of 100 ports. - // +optional - // +listType=atomic - Ports []EndpointPort `json:"ports" protobuf:"bytes,3,rep,name=ports"` -} - -// AddressType represents the type of address referred to by an endpoint. -// +enum -type AddressType string - -const ( - // AddressTypeIPv4 represents an IPv4 Address. - AddressTypeIPv4 = AddressType(slim_corev1.IPv4Protocol) - - // AddressTypeIPv6 represents an IPv6 Address. - AddressTypeIPv6 = AddressType(slim_corev1.IPv6Protocol) - - // AddressTypeFQDN represents a FQDN. - AddressTypeFQDN = AddressType("FQDN") -) - -// Endpoint represents a single logical "backend" implementing a service. -type Endpoint struct { - // addresses of this endpoint. The contents of this field are interpreted - // according to the corresponding EndpointSlice addressType field. Consumers - // must handle different types of addresses in the context of their own - // capabilities. This must contain at least one address but no more than - // 100. These are all assumed to be fungible and clients may choose to only - // use the first element. Refer to: https://issue.k8s.io/106267 - // +listType=set - Addresses []string `json:"addresses" protobuf:"bytes,1,rep,name=addresses"` - - // conditions contains information about the current status of the endpoint. - Conditions EndpointConditions `json:"conditions,omitempty" protobuf:"bytes,2,opt,name=conditions"` - - // deprecatedTopology contains topology information part of the v1beta1 - // API. This field is deprecated, and will be removed when the v1beta1 - // API is removed (no sooner than kubernetes v1.24). While this field can - // hold values, it is not writable through the v1 API, and any attempts to - // write to it will be silently ignored. Topology information can be found - // in the zone and nodeName fields instead. - // +optional - DeprecatedTopology map[string]string `json:"deprecatedTopology,omitempty" protobuf:"bytes,5,opt,name=deprecatedTopology"` - - // nodeName represents the name of the Node hosting this endpoint. This can - // be used to determine endpoints local to a Node. - // +optional - NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,6,opt,name=nodeName"` - - // zone is the name of the Zone this endpoint exists in. - // +optional - Zone *string `json:"zone,omitempty" protobuf:"bytes,7,opt,name=zone"` - - // hints contains information associated with how an endpoint should be - // consumed. - // +optional - Hints *EndpointHints `json:"hints,omitempty" protobuf:"bytes,8,opt,name=hints"` -} - -// EndpointConditions represents the current condition of an endpoint. -type EndpointConditions struct { - // ready indicates that this endpoint is prepared to receive traffic, - // according to whatever system is managing the endpoint. A nil value - // indicates an unknown state. In most cases consumers should interpret this - // unknown state as ready. For compatibility reasons, ready should never be - // "true" for terminating endpoints, except when the normal readiness - // behavior is being explicitly overridden, for example when the associated - // Service has set the publishNotReadyAddresses flag. - // +optional - Ready *bool `json:"ready,omitempty" protobuf:"bytes,1,name=ready"` - - // serving is identical to ready except that it is set regardless of the - // terminating state of endpoints. This condition should be set to true for - // a ready endpoint that is terminating. If nil, consumers should defer to - // the ready condition. - // +optional - Serving *bool `json:"serving,omitempty" protobuf:"bytes,2,name=serving"` - - // terminating indicates that this endpoint is terminating. A nil value - // indicates an unknown state. Consumers should interpret this unknown state - // to mean that the endpoint is not terminating. - // +optional - Terminating *bool `json:"terminating,omitempty" protobuf:"bytes,3,name=terminating"` -} - -// EndpointHints provides hints describing how an endpoint should be consumed. -type EndpointHints struct { - // forZones indicates the zone(s) this endpoint should be consumed by to - // enable topology aware routing. - // +listType=atomic - ForZones []ForZone `json:"forZones,omitempty" protobuf:"bytes,1,name=forZones"` -} - -// ForZone provides information about which zones should consume this endpoint. -type ForZone struct { - // name represents the name of the zone. - Name string `json:"name" protobuf:"bytes,1,name=name"` -} - -// EndpointPort represents a Port used by an EndpointSlice -// +structType=atomic -type EndpointPort struct { - // name represents the name of this port. All ports in an EndpointSlice must have a unique name. - // If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. - // Name must either be an empty string or pass DNS_LABEL validation: - // * must be no more than 63 characters long. - // * must consist of lower case alphanumeric characters or '-'. - // * must start and end with an alphanumeric character. - // Default is empty string. - Name *string `json:"name,omitempty" protobuf:"bytes,1,name=name"` - - // protocol represents the IP protocol for this port. - // Must be UDP, TCP, or SCTP. - // Default is TCP. - Protocol *slim_corev1.Protocol `json:"protocol,omitempty" protobuf:"bytes,2,name=protocol"` - - // port represents the port number of the endpoint. - // If this is not specified, ports are not restricted and must be - // interpreted in the context of the specific consumer. - Port *int32 `json:"port,omitempty" protobuf:"bytes,3,opt,name=port"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// EndpointSliceList represents a list of endpoint slices -type EndpointSliceList struct { - slim_metav1.TypeMeta `json:",inline"` - - // Standard list metadata. - // +optional - slim_metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of endpoint slices - Items []EndpointSlice `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/well_known_labels.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/well_known_labels.go deleted file mode 100644 index e2b671a3a3e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/well_known_labels.go +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2019 The Kubernetes Authors. - -package v1 - -const ( - // LabelServiceName is used to indicate the name of a Kubernetes service. - LabelServiceName = "kubernetes.io/service-name" - // LabelManagedBy is used to indicate the controller or entity that manages - // an EndpointSlice. This label aims to enable different EndpointSlice - // objects to be managed by different controllers or entities within the - // same cluster. It is highly recommended to configure this label for all - // EndpointSlices. - LabelManagedBy = "endpointslice.kubernetes.io/managed-by" - // LabelSkipMirror can be set to true on an Endpoints resource to indicate - // that the EndpointSliceMirroring controller should not mirror this - // resource with EndpointSlices. - LabelSkipMirror = "endpointslice.kubernetes.io/skip-mirror" -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/zz_generated.deepcopy.go deleted file mode 100644 index 84538aa06b1..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,230 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1 - -import ( - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/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 *Endpoint) DeepCopyInto(out *Endpoint) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.Conditions.DeepCopyInto(&out.Conditions) - if in.DeprecatedTopology != nil { - in, out := &in.DeprecatedTopology, &out.DeprecatedTopology - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.NodeName != nil { - in, out := &in.NodeName, &out.NodeName - *out = new(string) - **out = **in - } - if in.Zone != nil { - in, out := &in.Zone, &out.Zone - *out = new(string) - **out = **in - } - if in.Hints != nil { - in, out := &in.Hints, &out.Hints - *out = new(EndpointHints) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. -func (in *Endpoint) DeepCopy() *Endpoint { - if in == nil { - return nil - } - out := new(Endpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointConditions) DeepCopyInto(out *EndpointConditions) { - *out = *in - if in.Ready != nil { - in, out := &in.Ready, &out.Ready - *out = new(bool) - **out = **in - } - if in.Serving != nil { - in, out := &in.Serving, &out.Serving - *out = new(bool) - **out = **in - } - if in.Terminating != nil { - in, out := &in.Terminating, &out.Terminating - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointConditions. -func (in *EndpointConditions) DeepCopy() *EndpointConditions { - if in == nil { - return nil - } - out := new(EndpointConditions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointHints) DeepCopyInto(out *EndpointHints) { - *out = *in - if in.ForZones != nil { - in, out := &in.ForZones, &out.ForZones - *out = make([]ForZone, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointHints. -func (in *EndpointHints) DeepCopy() *EndpointHints { - if in == nil { - return nil - } - out := new(EndpointHints) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointPort) DeepCopyInto(out *EndpointPort) { - *out = *in - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.Protocol != nil { - in, out := &in.Protocol, &out.Protocol - *out = new(corev1.Protocol) - **out = **in - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPort. -func (in *EndpointPort) DeepCopy() *EndpointPort { - if in == nil { - return nil - } - out := new(EndpointPort) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointSlice) DeepCopyInto(out *EndpointSlice) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Endpoints != nil { - in, out := &in.Endpoints, &out.Endpoints - *out = make([]Endpoint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]EndpointPort, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSlice. -func (in *EndpointSlice) DeepCopy() *EndpointSlice { - if in == nil { - return nil - } - out := new(EndpointSlice) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EndpointSlice) 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 *EndpointSliceList) DeepCopyInto(out *EndpointSliceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]EndpointSlice, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSliceList. -func (in *EndpointSliceList) DeepCopy() *EndpointSliceList { - if in == nil { - return nil - } - out := new(EndpointSliceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EndpointSliceList) 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 *ForZone) DeepCopyInto(out *ForZone) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForZone. -func (in *ForZone) DeepCopy() *ForZone { - if in == nil { - return nil - } - out := new(ForZone) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/zz_generated.deepequal.go deleted file mode 100644 index 5a033885589..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/zz_generated.deepequal.go +++ /dev/null @@ -1,284 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package v1 - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Endpoint) DeepEqual(other *Endpoint) bool { - if other == nil { - return false - } - - if ((in.Addresses != nil) && (other.Addresses != nil)) || ((in.Addresses == nil) != (other.Addresses == nil)) { - in, other := &in.Addresses, &other.Addresses - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if !in.Conditions.DeepEqual(&other.Conditions) { - return false - } - - if ((in.DeprecatedTopology != nil) && (other.DeprecatedTopology != nil)) || ((in.DeprecatedTopology == nil) != (other.DeprecatedTopology == nil)) { - in, other := &in.DeprecatedTopology, &other.DeprecatedTopology - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - if (in.NodeName == nil) != (other.NodeName == nil) { - return false - } else if in.NodeName != nil { - if *in.NodeName != *other.NodeName { - return false - } - } - - if (in.Zone == nil) != (other.Zone == nil) { - return false - } else if in.Zone != nil { - if *in.Zone != *other.Zone { - return false - } - } - - if (in.Hints == nil) != (other.Hints == nil) { - return false - } else if in.Hints != nil { - if !in.Hints.DeepEqual(other.Hints) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointConditions) DeepEqual(other *EndpointConditions) bool { - if other == nil { - return false - } - - if (in.Ready == nil) != (other.Ready == nil) { - return false - } else if in.Ready != nil { - if *in.Ready != *other.Ready { - return false - } - } - - if (in.Serving == nil) != (other.Serving == nil) { - return false - } else if in.Serving != nil { - if *in.Serving != *other.Serving { - return false - } - } - - if (in.Terminating == nil) != (other.Terminating == nil) { - return false - } else if in.Terminating != nil { - if *in.Terminating != *other.Terminating { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointHints) DeepEqual(other *EndpointHints) bool { - if other == nil { - return false - } - - if ((in.ForZones != nil) && (other.ForZones != nil)) || ((in.ForZones == nil) != (other.ForZones == nil)) { - in, other := &in.ForZones, &other.ForZones - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointPort) DeepEqual(other *EndpointPort) bool { - if other == nil { - return false - } - - if (in.Name == nil) != (other.Name == nil) { - return false - } else if in.Name != nil { - if *in.Name != *other.Name { - return false - } - } - - if (in.Protocol == nil) != (other.Protocol == nil) { - return false - } else if in.Protocol != nil { - if *in.Protocol != *other.Protocol { - return false - } - } - - if (in.Port == nil) != (other.Port == nil) { - return false - } else if in.Port != nil { - if *in.Port != *other.Port { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointSlice) DeepEqual(other *EndpointSlice) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ObjectMeta.DeepEqual(&other.ObjectMeta) { - return false - } - - if in.AddressType != other.AddressType { - return false - } - if ((in.Endpoints != nil) && (other.Endpoints != nil)) || ((in.Endpoints == nil) != (other.Endpoints == nil)) { - in, other := &in.Endpoints, &other.Endpoints - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Ports != nil) && (other.Ports != nil)) || ((in.Ports == nil) != (other.Ports == nil)) { - in, other := &in.Ports, &other.Ports - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointSliceList) DeepEqual(other *EndpointSliceList) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ListMeta.DeepEqual(&other.ListMeta) { - return false - } - - if ((in.Items != nil) && (other.Items != nil)) || ((in.Items == nil) != (other.Items == nil)) { - in, other := &in.Items, &other.Items - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ForZone) DeepEqual(other *ForZone) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/doc.go deleted file mode 100644 index 67e6a87697c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/doc.go +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +k8s:openapi-gen=true -// +k8s:prerelease-lifecycle-gen=true -// +deepequal-gen=package -// +groupName=discovery.k8s.io - -// Package v1beta1 contains slimmer versions of k8s discovery types. -package v1beta1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/generated.pb.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/generated.pb.go deleted file mode 100644 index 3280b5e8f64..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/generated.pb.go +++ /dev/null @@ -1,1992 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/generated.proto - -package v1beta1 - -import ( - fmt "fmt" - - github_com_cilium_cilium_pkg_k8s_slim_k8s_api_core_v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - - io "io" - - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *Endpoint) Reset() { *m = Endpoint{} } -func (*Endpoint) ProtoMessage() {} -func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_db2884f8c881be40, []int{0} -} -func (m *Endpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Endpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_Endpoint.Merge(m, src) -} -func (m *Endpoint) XXX_Size() int { - return m.Size() -} -func (m *Endpoint) XXX_DiscardUnknown() { - xxx_messageInfo_Endpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_Endpoint proto.InternalMessageInfo - -func (m *EndpointConditions) Reset() { *m = EndpointConditions{} } -func (*EndpointConditions) ProtoMessage() {} -func (*EndpointConditions) Descriptor() ([]byte, []int) { - return fileDescriptor_db2884f8c881be40, []int{1} -} -func (m *EndpointConditions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointConditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointConditions) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointConditions.Merge(m, src) -} -func (m *EndpointConditions) XXX_Size() int { - return m.Size() -} -func (m *EndpointConditions) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointConditions.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointConditions proto.InternalMessageInfo - -func (m *EndpointHints) Reset() { *m = EndpointHints{} } -func (*EndpointHints) ProtoMessage() {} -func (*EndpointHints) Descriptor() ([]byte, []int) { - return fileDescriptor_db2884f8c881be40, []int{2} -} -func (m *EndpointHints) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointHints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointHints) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointHints.Merge(m, src) -} -func (m *EndpointHints) XXX_Size() int { - return m.Size() -} -func (m *EndpointHints) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointHints.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointHints proto.InternalMessageInfo - -func (m *EndpointPort) Reset() { *m = EndpointPort{} } -func (*EndpointPort) ProtoMessage() {} -func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_db2884f8c881be40, []int{3} -} -func (m *EndpointPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointPort.Merge(m, src) -} -func (m *EndpointPort) XXX_Size() int { - return m.Size() -} -func (m *EndpointPort) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointPort.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointPort proto.InternalMessageInfo - -func (m *EndpointSlice) Reset() { *m = EndpointSlice{} } -func (*EndpointSlice) ProtoMessage() {} -func (*EndpointSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_db2884f8c881be40, []int{4} -} -func (m *EndpointSlice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointSlice) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointSlice.Merge(m, src) -} -func (m *EndpointSlice) XXX_Size() int { - return m.Size() -} -func (m *EndpointSlice) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointSlice.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointSlice proto.InternalMessageInfo - -func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} } -func (*EndpointSliceList) ProtoMessage() {} -func (*EndpointSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_db2884f8c881be40, []int{5} -} -func (m *EndpointSliceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EndpointSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *EndpointSliceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_EndpointSliceList.Merge(m, src) -} -func (m *EndpointSliceList) XXX_Size() int { - return m.Size() -} -func (m *EndpointSliceList) XXX_DiscardUnknown() { - xxx_messageInfo_EndpointSliceList.DiscardUnknown(m) -} - -var xxx_messageInfo_EndpointSliceList proto.InternalMessageInfo - -func (m *ForZone) Reset() { *m = ForZone{} } -func (*ForZone) ProtoMessage() {} -func (*ForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_db2884f8c881be40, []int{6} -} -func (m *ForZone) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ForZone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ForZone) XXX_Merge(src proto.Message) { - xxx_messageInfo_ForZone.Merge(m, src) -} -func (m *ForZone) XXX_Size() int { - return m.Size() -} -func (m *ForZone) XXX_DiscardUnknown() { - xxx_messageInfo_ForZone.DiscardUnknown(m) -} - -var xxx_messageInfo_ForZone proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Endpoint)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1beta1.Endpoint") - proto.RegisterMapType((map[string]string)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1beta1.Endpoint.TopologyEntry") - proto.RegisterType((*EndpointConditions)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1beta1.EndpointConditions") - proto.RegisterType((*EndpointHints)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1beta1.EndpointHints") - proto.RegisterType((*EndpointPort)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1beta1.EndpointPort") - proto.RegisterType((*EndpointSlice)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1beta1.EndpointSlice") - proto.RegisterType((*EndpointSliceList)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1beta1.EndpointSliceList") - proto.RegisterType((*ForZone)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1beta1.ForZone") -} - -func init() { - proto.RegisterFile("github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/generated.proto", fileDescriptor_db2884f8c881be40) -} - -var fileDescriptor_db2884f8c881be40 = []byte{ - // 806 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x8b, 0xdb, 0x46, - 0x1c, 0xf5, 0xc4, 0xab, 0xae, 0x34, 0xda, 0xa5, 0xc9, 0xd0, 0x83, 0x59, 0x8a, 0x64, 0x04, 0x05, - 0x43, 0xa8, 0x84, 0x7d, 0x28, 0x4b, 0x0b, 0x4d, 0xa3, 0x76, 0x43, 0x02, 0x8d, 0x13, 0x66, 0x17, - 0x0a, 0xb9, 0xc9, 0xd2, 0x44, 0x3b, 0xb1, 0xa5, 0x11, 0x9a, 0xb1, 0xc1, 0x3d, 0xf5, 0x52, 0x72, - 0x6c, 0x3f, 0x4a, 0x4f, 0x85, 0x7e, 0x83, 0x3d, 0xe6, 0x98, 0x93, 0xe8, 0xaa, 0x5f, 0xa2, 0xe4, - 0x54, 0x66, 0xf4, 0xcf, 0xae, 0x0b, 0x65, 0x77, 0x7d, 0xf2, 0xcc, 0x9b, 0x99, 0xf7, 0xde, 0xfc, - 0x9e, 0x7e, 0x83, 0xe1, 0x8b, 0x98, 0x8a, 0xcb, 0xe5, 0xcc, 0x0d, 0x59, 0xe2, 0x85, 0x74, 0x41, - 0x97, 0xed, 0x4f, 0x36, 0x8f, 0xbd, 0xf9, 0x29, 0xf7, 0xf8, 0x82, 0x26, 0x6a, 0x10, 0x64, 0xd4, - 0x8b, 0x28, 0x0f, 0xd9, 0x8a, 0xe4, 0x6b, 0x6f, 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99, 0x95, 0x7f, 0x5c, 0x6b, 0x6b, 0x72, - 0xc6, 0x71, 0x25, 0xe5, 0xfc, 0x0d, 0xe0, 0x83, 0xad, 0xec, 0xbe, 0xa7, 0x5c, 0xa0, 0x74, 0x27, - 0xbf, 0x6f, 0x6e, 0x9b, 0x9f, 0xe4, 0x53, 0xe9, 0xb5, 0x9f, 0x7e, 0x83, 0x6c, 0x64, 0xc7, 0xa1, - 0x46, 0x05, 0x49, 0x9a, 0x8a, 0x4f, 0xf7, 0x76, 0x73, 0x75, 0xa5, 0xee, 0xea, 0xcf, 0xa4, 0x08, - 0xae, 0xb4, 0x9c, 0x87, 0xf0, 0xb0, 0xee, 0x42, 0x34, 0xdc, 0xea, 0xb4, 0xa3, 0x7a, 0xfb, 0x46, - 0xb7, 0xf9, 0xe4, 0xea, 0xda, 0xea, 0xbd, 0xbb, 0xb6, 0x7a, 0xef, 0xaf, 0xad, 0xde, 0x4f, 0xa5, - 0x05, 0xae, 0x4a, 0x0b, 0xbc, 0x2b, 0x2d, 0xf0, 0xbe, 0xb4, 0xc0, 0x9f, 0xa5, 0x05, 0x7e, 0xfd, - 0xcb, 0xea, 0xbd, 0x7a, 0x74, 0xc7, 0xbf, 0x12, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x0c, - 0x62, 0x8d, 0x8c, 0x08, 0x00, 0x00, -} - -func (m *Endpoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Endpoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NodeName != nil { - i -= len(*m.NodeName) - copy(dAtA[i:], *m.NodeName) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.NodeName))) - i-- - dAtA[i] = 0x32 - } - if len(m.Topology) > 0 { - keysForTopology := make([]string, 0, len(m.Topology)) - for k := range m.Topology { - keysForTopology = append(keysForTopology, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForTopology) - for iNdEx := len(keysForTopology) - 1; iNdEx >= 0; iNdEx-- { - v := m.Topology[string(keysForTopology[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForTopology[iNdEx]) - copy(dAtA[i:], keysForTopology[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForTopology[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - { - size, err := m.Conditions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Addresses[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *EndpointConditions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointConditions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointConditions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Terminating != nil { - i-- - if *m.Terminating { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.Serving != nil { - i-- - if *m.Serving { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Ready != nil { - i-- - if *m.Ready { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EndpointHints) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointHints) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointHints) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ForZones) > 0 { - for iNdEx := len(m.ForZones) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ForZones[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *EndpointPort) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointPort) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointPort) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Port != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Port)) - i-- - dAtA[i] = 0x18 - } - if m.Protocol != nil { - i -= len(*m.Protocol) - copy(dAtA[i:], *m.Protocol) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Protocol))) - i-- - dAtA[i] = 0x12 - } - if m.Name != nil { - i -= len(*m.Name) - copy(dAtA[i:], *m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EndpointSlice) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointSlice) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.AddressType) - copy(dAtA[i:], m.AddressType) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AddressType))) - i-- - dAtA[i] = 0x22 - if len(m.Ports) > 0 { - for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Endpoints) > 0 { - for iNdEx := len(m.Endpoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Endpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EndpointSliceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EndpointSliceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EndpointSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ForZone) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ForZone) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ForZone) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Endpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.Conditions.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Topology) > 0 { - for k, v := range m.Topology { - _ = 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.NodeName != nil { - l = len(*m.NodeName) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *EndpointConditions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ready != nil { - n += 2 - } - if m.Serving != nil { - n += 2 - } - if m.Terminating != nil { - n += 2 - } - return n -} - -func (m *EndpointHints) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ForZones) > 0 { - for _, e := range m.ForZones { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *EndpointPort) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Protocol != nil { - l = len(*m.Protocol) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Port != nil { - n += 1 + sovGenerated(uint64(*m.Port)) - } - return n -} - -func (m *EndpointSlice) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Endpoints) > 0 { - for _, e := range m.Endpoints { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Ports) > 0 { - for _, e := range m.Ports { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.AddressType) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *EndpointSliceList) Size() (n int) { - if m == nil { - return 0 - } - 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 *ForZone) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Endpoint) String() string { - if this == nil { - return "nil" - } - keysForTopology := make([]string, 0, len(this.Topology)) - for k := range this.Topology { - keysForTopology = append(keysForTopology, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForTopology) - mapStringForTopology := "map[string]string{" - for _, k := range keysForTopology { - mapStringForTopology += fmt.Sprintf("%v: %v,", k, this.Topology[k]) - } - mapStringForTopology += "}" - s := strings.Join([]string{`&Endpoint{`, - `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, - `Conditions:` + strings.Replace(strings.Replace(this.Conditions.String(), "EndpointConditions", "EndpointConditions", 1), `&`, ``, 1) + `,`, - `Topology:` + mapStringForTopology + `,`, - `NodeName:` + valueToStringGenerated(this.NodeName) + `,`, - `}`, - }, "") - return s -} -func (this *EndpointConditions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EndpointConditions{`, - `Ready:` + valueToStringGenerated(this.Ready) + `,`, - `Serving:` + valueToStringGenerated(this.Serving) + `,`, - `Terminating:` + valueToStringGenerated(this.Terminating) + `,`, - `}`, - }, "") - return s -} -func (this *EndpointHints) String() string { - if this == nil { - return "nil" - } - repeatedStringForForZones := "[]ForZone{" - for _, f := range this.ForZones { - repeatedStringForForZones += strings.Replace(strings.Replace(f.String(), "ForZone", "ForZone", 1), `&`, ``, 1) + "," - } - repeatedStringForForZones += "}" - s := strings.Join([]string{`&EndpointHints{`, - `ForZones:` + repeatedStringForForZones + `,`, - `}`, - }, "") - return s -} -func (this *EndpointPort) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EndpointPort{`, - `Name:` + valueToStringGenerated(this.Name) + `,`, - `Protocol:` + valueToStringGenerated(this.Protocol) + `,`, - `Port:` + valueToStringGenerated(this.Port) + `,`, - `}`, - }, "") - return s -} -func (this *EndpointSlice) String() string { - if this == nil { - return "nil" - } - repeatedStringForEndpoints := "[]Endpoint{" - for _, f := range this.Endpoints { - repeatedStringForEndpoints += strings.Replace(strings.Replace(f.String(), "Endpoint", "Endpoint", 1), `&`, ``, 1) + "," - } - repeatedStringForEndpoints += "}" - repeatedStringForPorts := "[]EndpointPort{" - for _, f := range this.Ports { - repeatedStringForPorts += strings.Replace(strings.Replace(f.String(), "EndpointPort", "EndpointPort", 1), `&`, ``, 1) + "," - } - repeatedStringForPorts += "}" - s := strings.Join([]string{`&EndpointSlice{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Endpoints:` + repeatedStringForEndpoints + `,`, - `Ports:` + repeatedStringForPorts + `,`, - `AddressType:` + fmt.Sprintf("%v", this.AddressType) + `,`, - `}`, - }, "") - return s -} -func (this *EndpointSliceList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]EndpointSlice{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "EndpointSlice", "EndpointSlice", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&EndpointSliceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ForZone) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ForZone{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - 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 *Endpoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Endpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Conditions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Topology", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Topology == nil { - m.Topology = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Topology[mapkey] = mapvalue - iNdEx = postIndex - case 6: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.NodeName = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointConditions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointConditions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointConditions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Ready", 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.Ready = &b - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Serving", 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.Serving = &b - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Terminating", 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.Terminating = &b - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointHints) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointHints: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointHints: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ForZones", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ForZones = append(m.ForZones, ForZone{}) - if err := m.ForZones[len(m.ForZones)-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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointPort) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointPort: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointPort: 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Name = &s - iNdEx = postIndex - case 2: - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := github_com_cilium_cilium_pkg_k8s_slim_k8s_api_core_v1.Protocol(dAtA[iNdEx:postIndex]) - m.Protocol = &s - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", 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.Port = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointSlice) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointSlice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointSlice: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 Endpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Endpoints = append(m.Endpoints, Endpoint{}) - if err := m.Endpoints[len(m.Endpoints)-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 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ports = append(m.Ports, EndpointPort{}) - if err := m.Ports[len(m.Ports)-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 AddressType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AddressType = AddressType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EndpointSliceList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EndpointSliceList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EndpointSliceList: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, EndpointSlice{}) - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ForZone) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ForZone: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ForZone: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+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 - depth := 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 - } - } - case 1: - iNdEx += 8 - 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 - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/generated.proto b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/generated.proto deleted file mode 100644 index 5c4d9aafbf9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/generated.proto +++ /dev/null @@ -1,156 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.cilium.cilium.pkg.k8s.slim.k8s.api.discovery.v1beta1; - -import "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.proto"; -import "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1"; - -// Endpoint represents a single logical "backend" implementing a service. -message Endpoint { - // addresses of this endpoint. The contents of this field are interpreted - // according to the corresponding EndpointSlice addressType field. Consumers - // must handle different types of addresses in the context of their own - // capabilities. This must contain at least one address but no more than - // 100. These are all assumed to be fungible and clients may choose to only - // use the first element. Refer to: https://issue.k8s.io/106267 - // +listType=set - repeated string addresses = 1; - - // conditions contains information about the current status of the endpoint. - optional EndpointConditions conditions = 2; - - // topology contains arbitrary topology information associated with the - // endpoint. These key/value pairs must conform with the label format. - // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - // Topology may include a maximum of 16 key/value pairs. This includes, but - // is not limited to the following well known keys: - // * kubernetes.io/hostname: the value indicates the hostname of the node - // where the endpoint is located. This should match the corresponding - // node label. - // * topology.kubernetes.io/zone: the value indicates the zone where the - // endpoint is located. This should match the corresponding node label. - // * topology.kubernetes.io/region: the value indicates the region where the - // endpoint is located. This should match the corresponding node label. - // This field is deprecated and will be removed in future api versions. - // +optional - map topology = 5; - - // nodeName represents the name of the Node hosting this endpoint. This can - // be used to determine endpoints local to a Node. - // +optional - optional string nodeName = 6; -} - -// EndpointConditions represents the current condition of an endpoint. -message EndpointConditions { - // ready indicates that this endpoint is prepared to receive traffic, - // according to whatever system is managing the endpoint. A nil value - // indicates an unknown state. In most cases consumers should interpret this - // unknown state as ready. For compatibility reasons, ready should never be - // "true" for terminating endpoints. - // +optional - optional bool ready = 1; - - // serving is identical to ready except that it is set regardless of the - // terminating state of endpoints. This condition should be set to true for - // a ready endpoint that is terminating. If nil, consumers should defer to - // the ready condition. - // +optional - optional bool serving = 2; - - // terminating indicates that this endpoint is terminating. A nil value - // indicates an unknown state. Consumers should interpret this unknown state - // to mean that the endpoint is not terminating. - // +optional - optional bool terminating = 3; -} - -// EndpointHints provides hints describing how an endpoint should be consumed. -message EndpointHints { - // forZones indicates the zone(s) this endpoint should be consumed by to - // enable topology aware routing. May contain a maximum of 8 entries. - // +listType=atomic - repeated ForZone forZones = 1; -} - -// EndpointPort represents a Port used by an EndpointSlice -message EndpointPort { - // name represents the name of this port. All ports in an EndpointSlice must have a unique name. - // If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. - // Name must either be an empty string or pass DNS_LABEL validation: - // * must be no more than 63 characters long. - // * must consist of lower case alphanumeric characters or '-'. - // * must start and end with an alphanumeric character. - // Default is empty string. - optional string name = 1; - - // protocol represents the IP protocol for this port. - // Must be UDP, TCP, or SCTP. - // Default is TCP. - optional string protocol = 2; - - // port represents the port number of the endpoint. - // If this is not specified, ports are not restricted and must be - // interpreted in the context of the specific consumer. - optional int32 port = 3; -} - -// EndpointSlice represents a subset of the endpoints that implement a service. -// For a given service there may be multiple EndpointSlice objects, selected by -// labels, which must be joined to produce the full set of endpoints. -message EndpointSlice { - // Standard object's metadata. - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ObjectMeta metadata = 1; - - // addressType specifies the type of address carried by this EndpointSlice. - // All addresses in this slice must be the same type. This field is - // immutable after creation. The following address types are currently - // supported: - // * IPv4: Represents an IPv4 Address. - // * IPv6: Represents an IPv6 Address. - // * FQDN: Represents a Fully Qualified Domain Name. - optional string addressType = 4; - - // endpoints is a list of unique endpoints in this slice. Each slice may - // include a maximum of 1000 endpoints. - // +listType=atomic - repeated Endpoint endpoints = 2; - - // ports specifies the list of network ports exposed by each endpoint in - // this slice. Each port must have a unique name. When ports is empty, it - // indicates that there are no defined ports. When a port is defined with a - // nil port value, it indicates "all ports". Each slice may include a - // maximum of 100 ports. - // +optional - // +listType=atomic - repeated EndpointPort ports = 3; -} - -// EndpointSliceList represents a list of endpoint slices -message EndpointSliceList { - // Standard list metadata. - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of endpoint slices - repeated EndpointSlice items = 2; -} - -// ForZone provides information about which zones should consume this endpoint. -message ForZone { - // name represents the name of the zone. - optional string name = 1; -} - diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/types.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/types.go deleted file mode 100644 index 499efe3370a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/types.go +++ /dev/null @@ -1,180 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2019 The Kubernetes Authors. - -package v1beta1 - -import ( - slim_corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.16 -// +k8s:prerelease-lifecycle-gen:deprecated=1.21 -// +k8s:prerelease-lifecycle-gen:removed=1.25 -// +k8s:prerelease-lifecycle-gen:replacement=discovery.k8s.io,v1,EndpointSlice - -// EndpointSlice represents a subset of the endpoints that implement a service. -// For a given service there may be multiple EndpointSlice objects, selected by -// labels, which must be joined to produce the full set of endpoints. -type EndpointSlice struct { - slim_metav1.TypeMeta `json:",inline"` - - // Standard object's metadata. - // +optional - slim_metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // addressType specifies the type of address carried by this EndpointSlice. - // All addresses in this slice must be the same type. This field is - // immutable after creation. The following address types are currently - // supported: - // * IPv4: Represents an IPv4 Address. - // * IPv6: Represents an IPv6 Address. - // * FQDN: Represents a Fully Qualified Domain Name. - AddressType AddressType `json:"addressType" protobuf:"bytes,4,rep,name=addressType"` - - // endpoints is a list of unique endpoints in this slice. Each slice may - // include a maximum of 1000 endpoints. - // +listType=atomic - Endpoints []Endpoint `json:"endpoints" protobuf:"bytes,2,rep,name=endpoints"` - - // ports specifies the list of network ports exposed by each endpoint in - // this slice. Each port must have a unique name. When ports is empty, it - // indicates that there are no defined ports. When a port is defined with a - // nil port value, it indicates "all ports". Each slice may include a - // maximum of 100 ports. - // +optional - // +listType=atomic - Ports []EndpointPort `json:"ports" protobuf:"bytes,3,rep,name=ports"` -} - -// AddressType represents the type of address referred to by an endpoint. -type AddressType string - -const ( - // AddressTypeIPv4 represents an IPv4 Address. - AddressTypeIPv4 = AddressType(slim_corev1.IPv4Protocol) - - // AddressTypeIPv6 represents an IPv6 Address. - AddressTypeIPv6 = AddressType(slim_corev1.IPv6Protocol) - - // AddressTypeFQDN represents a FQDN. - AddressTypeFQDN = AddressType("FQDN") -) - -// Endpoint represents a single logical "backend" implementing a service. -type Endpoint struct { - // addresses of this endpoint. The contents of this field are interpreted - // according to the corresponding EndpointSlice addressType field. Consumers - // must handle different types of addresses in the context of their own - // capabilities. This must contain at least one address but no more than - // 100. These are all assumed to be fungible and clients may choose to only - // use the first element. Refer to: https://issue.k8s.io/106267 - // +listType=set - Addresses []string `json:"addresses" protobuf:"bytes,1,rep,name=addresses"` - - // conditions contains information about the current status of the endpoint. - Conditions EndpointConditions `json:"conditions,omitempty" protobuf:"bytes,2,opt,name=conditions"` - - // topology contains arbitrary topology information associated with the - // endpoint. These key/value pairs must conform with the label format. - // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - // Topology may include a maximum of 16 key/value pairs. This includes, but - // is not limited to the following well known keys: - // * kubernetes.io/hostname: the value indicates the hostname of the node - // where the endpoint is located. This should match the corresponding - // node label. - // * topology.kubernetes.io/zone: the value indicates the zone where the - // endpoint is located. This should match the corresponding node label. - // * topology.kubernetes.io/region: the value indicates the region where the - // endpoint is located. This should match the corresponding node label. - // This field is deprecated and will be removed in future api versions. - // +optional - Topology map[string]string `json:"topology,omitempty" protobuf:"bytes,5,opt,name=topology"` - - // nodeName represents the name of the Node hosting this endpoint. This can - // be used to determine endpoints local to a Node. - // +optional - NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,6,opt,name=nodeName"` -} - -// EndpointConditions represents the current condition of an endpoint. -type EndpointConditions struct { - // ready indicates that this endpoint is prepared to receive traffic, - // according to whatever system is managing the endpoint. A nil value - // indicates an unknown state. In most cases consumers should interpret this - // unknown state as ready. For compatibility reasons, ready should never be - // "true" for terminating endpoints. - // +optional - Ready *bool `json:"ready,omitempty" protobuf:"bytes,1,name=ready"` - - // serving is identical to ready except that it is set regardless of the - // terminating state of endpoints. This condition should be set to true for - // a ready endpoint that is terminating. If nil, consumers should defer to - // the ready condition. - // +optional - Serving *bool `json:"serving,omitempty" protobuf:"bytes,2,name=serving"` - - // terminating indicates that this endpoint is terminating. A nil value - // indicates an unknown state. Consumers should interpret this unknown state - // to mean that the endpoint is not terminating. - // +optional - Terminating *bool `json:"terminating,omitempty" protobuf:"bytes,3,name=terminating"` -} - -// EndpointHints provides hints describing how an endpoint should be consumed. -type EndpointHints struct { - // forZones indicates the zone(s) this endpoint should be consumed by to - // enable topology aware routing. May contain a maximum of 8 entries. - // +listType=atomic - ForZones []ForZone `json:"forZones,omitempty" protobuf:"bytes,1,name=forZones"` -} - -// ForZone provides information about which zones should consume this endpoint. -type ForZone struct { - // name represents the name of the zone. - Name string `json:"name" protobuf:"bytes,1,name=name"` -} - -// EndpointPort represents a Port used by an EndpointSlice -type EndpointPort struct { - // name represents the name of this port. All ports in an EndpointSlice must have a unique name. - // If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. - // Name must either be an empty string or pass DNS_LABEL validation: - // * must be no more than 63 characters long. - // * must consist of lower case alphanumeric characters or '-'. - // * must start and end with an alphanumeric character. - // Default is empty string. - Name *string `json:"name,omitempty" protobuf:"bytes,1,name=name"` - - // protocol represents the IP protocol for this port. - // Must be UDP, TCP, or SCTP. - // Default is TCP. - Protocol *slim_corev1.Protocol `json:"protocol,omitempty" protobuf:"bytes,2,name=protocol"` - - // port represents the port number of the endpoint. - // If this is not specified, ports are not restricted and must be - // interpreted in the context of the specific consumer. - Port *int32 `json:"port,omitempty" protobuf:"bytes,3,opt,name=port"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.16 -// +k8s:prerelease-lifecycle-gen:deprecated=1.21 -// +k8s:prerelease-lifecycle-gen:removed=1.25 -// +k8s:prerelease-lifecycle-gen:replacement=discovery.k8s.io,v1,EndpointSlice - -// EndpointSliceList represents a list of endpoint slices -type EndpointSliceList struct { - slim_metav1.TypeMeta `json:",inline"` - - // Standard list metadata. - // +optional - slim_metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of endpoint slices - Items []EndpointSlice `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/well_known_labels.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/well_known_labels.go deleted file mode 100644 index b864b949c7e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/well_known_labels.go +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2019 The Kubernetes Authors. - -package v1beta1 - -const ( - // LabelServiceName is used to indicate the name of a Kubernetes service. - LabelServiceName = "kubernetes.io/service-name" - // LabelManagedBy is used to indicate the controller or entity that manages - // an EndpointSlice. This label aims to enable different EndpointSlice - // objects to be managed by different controllers or entities within the - // same cluster. It is highly recommended to configure this label for all - // EndpointSlices. - LabelManagedBy = "endpointslice.kubernetes.io/managed-by" - // LabelSkipMirror can be set to true on an Endpoints resource to indicate - // that the EndpointSliceMirroring controller should not mirror this - // resource with EndpointSlices. - LabelSkipMirror = "endpointslice.kubernetes.io/skip-mirror" -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index cbfe0d129d9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,220 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/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 *Endpoint) DeepCopyInto(out *Endpoint) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.Conditions.DeepCopyInto(&out.Conditions) - if in.Topology != nil { - in, out := &in.Topology, &out.Topology - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.NodeName != nil { - in, out := &in.NodeName, &out.NodeName - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. -func (in *Endpoint) DeepCopy() *Endpoint { - if in == nil { - return nil - } - out := new(Endpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointConditions) DeepCopyInto(out *EndpointConditions) { - *out = *in - if in.Ready != nil { - in, out := &in.Ready, &out.Ready - *out = new(bool) - **out = **in - } - if in.Serving != nil { - in, out := &in.Serving, &out.Serving - *out = new(bool) - **out = **in - } - if in.Terminating != nil { - in, out := &in.Terminating, &out.Terminating - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointConditions. -func (in *EndpointConditions) DeepCopy() *EndpointConditions { - if in == nil { - return nil - } - out := new(EndpointConditions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointHints) DeepCopyInto(out *EndpointHints) { - *out = *in - if in.ForZones != nil { - in, out := &in.ForZones, &out.ForZones - *out = make([]ForZone, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointHints. -func (in *EndpointHints) DeepCopy() *EndpointHints { - if in == nil { - return nil - } - out := new(EndpointHints) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointPort) DeepCopyInto(out *EndpointPort) { - *out = *in - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.Protocol != nil { - in, out := &in.Protocol, &out.Protocol - *out = new(v1.Protocol) - **out = **in - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPort. -func (in *EndpointPort) DeepCopy() *EndpointPort { - if in == nil { - return nil - } - out := new(EndpointPort) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointSlice) DeepCopyInto(out *EndpointSlice) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Endpoints != nil { - in, out := &in.Endpoints, &out.Endpoints - *out = make([]Endpoint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]EndpointPort, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSlice. -func (in *EndpointSlice) DeepCopy() *EndpointSlice { - if in == nil { - return nil - } - out := new(EndpointSlice) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EndpointSlice) 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 *EndpointSliceList) DeepCopyInto(out *EndpointSliceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]EndpointSlice, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSliceList. -func (in *EndpointSliceList) DeepCopy() *EndpointSliceList { - if in == nil { - return nil - } - out := new(EndpointSliceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EndpointSliceList) 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 *ForZone) DeepCopyInto(out *ForZone) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForZone. -func (in *ForZone) DeepCopy() *ForZone { - if in == nil { - return nil - } - out := new(ForZone) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/zz_generated.deepequal.go deleted file mode 100644 index e25dc21f58c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1/zz_generated.deepequal.go +++ /dev/null @@ -1,268 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package v1beta1 - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Endpoint) DeepEqual(other *Endpoint) bool { - if other == nil { - return false - } - - if ((in.Addresses != nil) && (other.Addresses != nil)) || ((in.Addresses == nil) != (other.Addresses == nil)) { - in, other := &in.Addresses, &other.Addresses - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if !in.Conditions.DeepEqual(&other.Conditions) { - return false - } - - if ((in.Topology != nil) && (other.Topology != nil)) || ((in.Topology == nil) != (other.Topology == nil)) { - in, other := &in.Topology, &other.Topology - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - if (in.NodeName == nil) != (other.NodeName == nil) { - return false - } else if in.NodeName != nil { - if *in.NodeName != *other.NodeName { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointConditions) DeepEqual(other *EndpointConditions) bool { - if other == nil { - return false - } - - if (in.Ready == nil) != (other.Ready == nil) { - return false - } else if in.Ready != nil { - if *in.Ready != *other.Ready { - return false - } - } - - if (in.Serving == nil) != (other.Serving == nil) { - return false - } else if in.Serving != nil { - if *in.Serving != *other.Serving { - return false - } - } - - if (in.Terminating == nil) != (other.Terminating == nil) { - return false - } else if in.Terminating != nil { - if *in.Terminating != *other.Terminating { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointHints) DeepEqual(other *EndpointHints) bool { - if other == nil { - return false - } - - if ((in.ForZones != nil) && (other.ForZones != nil)) || ((in.ForZones == nil) != (other.ForZones == nil)) { - in, other := &in.ForZones, &other.ForZones - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointPort) DeepEqual(other *EndpointPort) bool { - if other == nil { - return false - } - - if (in.Name == nil) != (other.Name == nil) { - return false - } else if in.Name != nil { - if *in.Name != *other.Name { - return false - } - } - - if (in.Protocol == nil) != (other.Protocol == nil) { - return false - } else if in.Protocol != nil { - if *in.Protocol != *other.Protocol { - return false - } - } - - if (in.Port == nil) != (other.Port == nil) { - return false - } else if in.Port != nil { - if *in.Port != *other.Port { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointSlice) DeepEqual(other *EndpointSlice) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ObjectMeta.DeepEqual(&other.ObjectMeta) { - return false - } - - if in.AddressType != other.AddressType { - return false - } - if ((in.Endpoints != nil) && (other.Endpoints != nil)) || ((in.Endpoints == nil) != (other.Endpoints == nil)) { - in, other := &in.Endpoints, &other.Endpoints - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Ports != nil) && (other.Ports != nil)) || ((in.Ports == nil) != (other.Ports == nil)) { - in, other := &in.Ports, &other.Ports - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointSliceList) DeepEqual(other *EndpointSliceList) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ListMeta.DeepEqual(&other.ListMeta) { - return false - } - - if ((in.Items != nil) && (other.Items != nil)) || ((in.Items == nil) != (other.Items == nil)) { - in, other := &in.Items, &other.Items - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ForZone) DeepEqual(other *ForZone) bool { - if other == nil { - return false - } - - if in.Name != other.Name { - return false - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/doc.go deleted file mode 100644 index 269888d36d6..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/doc.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +k8s:openapi-gen=true -// +deepequal-gen=package -// +groupName=networking.k8s.io - -// Package v1 contains slimmer versions of k8s networking types. -package v1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/generated.pb.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/generated.pb.go deleted file mode 100644 index bd02e24d061..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/generated.pb.go +++ /dev/null @@ -1,2195 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - github_com_cilium_cilium_pkg_k8s_slim_k8s_api_core_v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - intstr "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr" - - io "io" - - proto "github.com/gogo/protobuf/proto" - - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *IPBlock) Reset() { *m = IPBlock{} } -func (*IPBlock) ProtoMessage() {} -func (*IPBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_5d3be2d57d520df2, []int{0} -} -func (m *IPBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPBlock.Merge(m, src) -} -func (m *IPBlock) XXX_Size() int { - return m.Size() -} -func (m *IPBlock) XXX_DiscardUnknown() { - xxx_messageInfo_IPBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_IPBlock proto.InternalMessageInfo - -func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } -func (*NetworkPolicy) ProtoMessage() {} -func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_5d3be2d57d520df2, []int{1} -} -func (m *NetworkPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicy.Merge(m, src) -} -func (m *NetworkPolicy) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkPolicy proto.InternalMessageInfo - -func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } -func (*NetworkPolicyEgressRule) ProtoMessage() {} -func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_5d3be2d57d520df2, []int{2} -} -func (m *NetworkPolicyEgressRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyEgressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyEgressRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyEgressRule.Merge(m, src) -} -func (m *NetworkPolicyEgressRule) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyEgressRule) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyEgressRule.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkPolicyEgressRule proto.InternalMessageInfo - -func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } -func (*NetworkPolicyIngressRule) ProtoMessage() {} -func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_5d3be2d57d520df2, []int{3} -} -func (m *NetworkPolicyIngressRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyIngressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyIngressRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyIngressRule.Merge(m, src) -} -func (m *NetworkPolicyIngressRule) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyIngressRule) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyIngressRule.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkPolicyIngressRule proto.InternalMessageInfo - -func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } -func (*NetworkPolicyList) ProtoMessage() {} -func (*NetworkPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_5d3be2d57d520df2, []int{4} -} -func (m *NetworkPolicyList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyList) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyList.Merge(m, src) -} -func (m *NetworkPolicyList) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyList) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyList.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkPolicyList proto.InternalMessageInfo - -func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } -func (*NetworkPolicyPeer) ProtoMessage() {} -func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { - return fileDescriptor_5d3be2d57d520df2, []int{5} -} -func (m *NetworkPolicyPeer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyPeer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyPeer) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyPeer.Merge(m, src) -} -func (m *NetworkPolicyPeer) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyPeer) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyPeer.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkPolicyPeer proto.InternalMessageInfo - -func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } -func (*NetworkPolicyPort) ProtoMessage() {} -func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { - return fileDescriptor_5d3be2d57d520df2, []int{6} -} -func (m *NetworkPolicyPort) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyPort) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyPort.Merge(m, src) -} -func (m *NetworkPolicyPort) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyPort) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyPort.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkPolicyPort proto.InternalMessageInfo - -func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } -func (*NetworkPolicySpec) ProtoMessage() {} -func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5d3be2d57d520df2, []int{7} -} -func (m *NetworkPolicySpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicySpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicySpec.Merge(m, src) -} -func (m *NetworkPolicySpec) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicySpec) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicySpec.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkPolicySpec proto.InternalMessageInfo - -func init() { - proto.RegisterType((*IPBlock)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.networking.v1.IPBlock") - proto.RegisterType((*NetworkPolicy)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.networking.v1.NetworkPolicy") - proto.RegisterType((*NetworkPolicyEgressRule)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.networking.v1.NetworkPolicyEgressRule") - proto.RegisterType((*NetworkPolicyIngressRule)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.networking.v1.NetworkPolicyIngressRule") - proto.RegisterType((*NetworkPolicyList)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.networking.v1.NetworkPolicyList") - proto.RegisterType((*NetworkPolicyPeer)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.networking.v1.NetworkPolicyPeer") - proto.RegisterType((*NetworkPolicyPort)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.networking.v1.NetworkPolicyPort") - proto.RegisterType((*NetworkPolicySpec)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.api.networking.v1.NetworkPolicySpec") -} - -func init() { - proto.RegisterFile("github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/generated.proto", fileDescriptor_5d3be2d57d520df2) -} - -var fileDescriptor_5d3be2d57d520df2 = []byte{ - // 838 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x6f, 0xe4, 0x34, - 0x14, 0x9e, 0x64, 0xa6, 0x9d, 0xae, 0xcb, 0xb2, 0xd4, 0x08, 0x31, 0x5a, 0x89, 0xa4, 0x8a, 0x84, - 0xb4, 0x17, 0x1c, 0x95, 0x03, 0x5a, 0x69, 0x25, 0x40, 0x61, 0x67, 0xd1, 0x2c, 0xd0, 0x8e, 0xdc, - 0x72, 0xe1, 0x96, 0xc9, 0x78, 0x53, 0x77, 0x92, 0x38, 0xb2, 0x3d, 0x65, 0x2b, 0xed, 0x61, 0x39, - 0x21, 0x21, 0x21, 0xf1, 0x67, 0xf5, 0xb8, 0x12, 0x97, 0x3d, 0x45, 0x34, 0xfc, 0x0b, 0x70, 0xe9, - 0x09, 0xd9, 0x71, 0x26, 0xf3, 0x63, 0x11, 0x9a, 0x76, 0x56, 0x9c, 0x12, 0xbf, 0xd8, 0xdf, 0xf7, - 0xbd, 0xe7, 0xcf, 0xcf, 0x01, 0xdf, 0xc4, 0x54, 0x9e, 0x4e, 0x47, 0x28, 0x62, 0xa9, 0x1f, 0xd1, - 0x84, 0x4e, 0x67, 0x8f, 0x7c, 0x12, 0xfb, 0x93, 0x87, 0xc2, 0x17, 0x09, 0x4d, 0xf5, 0x4b, 0x98, - 0x53, 0x3f, 0x23, 0xf2, 0x47, 0xc6, 0x27, 0x34, 0x8b, 0xfd, 0xf3, 0x03, 0x3f, 0x26, 0x19, 0xe1, - 0xa1, 0x24, 0x63, 0x94, 0x73, 0x26, 0x19, 0x7c, 0xd4, 0x80, 0xa1, 0x0a, 0xa5, 0x7e, 0xe4, 0x93, - 0x18, 0x4d, 0x1e, 0x0a, 0xa4, 0xc0, 0xf4, 0x4b, 0x98, 0x53, 0xd4, 0x80, 0xa1, 0xf3, 0x83, 0xfb, - 0xfd, 0xf5, 0x94, 0x44, 0x8c, 0x93, 0x37, 0x68, 0xb8, 0xff, 0x64, 0x2d, 0x18, 0xe1, 0xa7, 0x44, - 0x86, 0x6f, 0xc2, 0x79, 0xba, 0x26, 0xce, 0x54, 0xd2, 0xc4, 0xa7, 0x99, 0x14, 0x92, 0xaf, 0x60, - 0x7d, 0x32, 0x87, 0x15, 0xb3, 0x98, 0xf9, 0x3a, 0x3c, 0x9a, 0x3e, 0xd3, 0x23, 0x3d, 0xd0, 0x6f, - 0x66, 0xba, 0x02, 0x45, 0x94, 0x29, 0xdc, 0x34, 0x8c, 0x4e, 0x69, 0x46, 0xf8, 0x85, 0x66, 0xe5, - 0xd3, 0x4c, 0xd2, 0x94, 0xac, 0xe0, 0x7f, 0xf6, 0x5f, 0x0b, 0x44, 0x74, 0x4a, 0xd2, 0x70, 0x79, - 0x9d, 0x77, 0x04, 0xba, 0x83, 0x61, 0x90, 0xb0, 0x68, 0x02, 0xf7, 0x41, 0x27, 0xa2, 0x63, 0xde, - 0xb3, 0xf6, 0xad, 0x07, 0x77, 0x82, 0x77, 0x2e, 0x0b, 0xb7, 0x55, 0x16, 0x6e, 0xe7, 0xab, 0xc1, - 0x63, 0x8c, 0xf5, 0x17, 0xe8, 0x81, 0x6d, 0xf2, 0x3c, 0x22, 0xb9, 0xec, 0xd9, 0xfb, 0xed, 0x07, - 0x77, 0x02, 0x50, 0x16, 0xee, 0x76, 0x5f, 0x47, 0xb0, 0xf9, 0xe2, 0xfd, 0x6d, 0x81, 0xbb, 0x87, - 0xd5, 0xae, 0x0e, 0x59, 0x42, 0xa3, 0x0b, 0xc8, 0xc1, 0x8e, 0xaa, 0xf0, 0x38, 0x94, 0xa1, 0xc6, - 0xde, 0xfd, 0x34, 0x40, 0x6b, 0xb9, 0x44, 0x20, 0xb5, 0x1e, 0x9d, 0x1f, 0xa0, 0xa3, 0xd1, 0x19, - 0x89, 0xe4, 0x77, 0x44, 0x86, 0x01, 0x34, 0xfa, 0x40, 0x13, 0xc3, 0x33, 0x1e, 0x98, 0x83, 0x8e, - 0xc8, 0x49, 0xd4, 0xb3, 0x35, 0xdf, 0x21, 0xba, 0x85, 0x2b, 0xd1, 0x42, 0x36, 0xc7, 0x39, 0x89, - 0x9a, 0xda, 0xa8, 0x11, 0xd6, 0x4c, 0xde, 0xb5, 0x05, 0x3e, 0x5c, 0x98, 0xd9, 0x8f, 0x39, 0x11, - 0x02, 0x4f, 0x13, 0x02, 0x05, 0xd8, 0xca, 0x19, 0x97, 0xa2, 0x67, 0xed, 0xb7, 0x37, 0x2b, 0x67, - 0xc8, 0xb8, 0x0c, 0xee, 0x1a, 0x39, 0x5b, 0x6a, 0x24, 0x70, 0xc5, 0x05, 0xcf, 0x80, 0x2d, 0x99, - 0xde, 0xa8, 0xcd, 0x32, 0x12, 0xc2, 0x03, 0x60, 0x18, 0xed, 0x13, 0x86, 0x6d, 0xc9, 0xbc, 0x9f, - 0x6c, 0xd0, 0x5b, 0x98, 0x35, 0xc8, 0xfe, 0xe7, 0xec, 0x73, 0xd0, 0x79, 0xc6, 0x59, 0xfa, 0x96, - 0xf2, 0x9f, 0x19, 0xe0, 0x09, 0x67, 0x29, 0xd6, 0x4c, 0xde, 0x5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-} - -func (m *IPBlock) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IPBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IPBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Except) > 0 { - for iNdEx := len(m.Except) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Except[iNdEx]) - copy(dAtA[i:], m.Except[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Except[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.CIDR) - copy(dAtA[i:], m.CIDR) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CIDR))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NetworkPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetworkPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetworkPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NetworkPolicyEgressRule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetworkPolicyEgressRule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetworkPolicyEgressRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.To) > 0 { - for iNdEx := len(m.To) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.To[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Ports) > 0 { - for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *NetworkPolicyIngressRule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetworkPolicyIngressRule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetworkPolicyIngressRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.From) > 0 { - for iNdEx := len(m.From) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.From[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Ports) > 0 { - for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *NetworkPolicyList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetworkPolicyList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetworkPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NetworkPolicyPeer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetworkPolicyPeer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetworkPolicyPeer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IPBlock != nil { - { - size, err := m.IPBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.NamespaceSelector != nil { - { - size, err := m.NamespaceSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PodSelector != nil { - { - size, err := m.PodSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NetworkPolicyPort) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetworkPolicyPort) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetworkPolicyPort) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EndPort != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.EndPort)) - i-- - dAtA[i] = 0x18 - } - if m.Port != nil { - { - size, err := m.Port.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Protocol != nil { - i -= len(*m.Protocol) - copy(dAtA[i:], *m.Protocol) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Protocol))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NetworkPolicySpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetworkPolicySpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetworkPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PolicyTypes) > 0 { - for iNdEx := len(m.PolicyTypes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PolicyTypes[iNdEx]) - copy(dAtA[i:], m.PolicyTypes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.PolicyTypes[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Egress) > 0 { - for iNdEx := len(m.Egress) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Egress[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Ingress) > 0 { - for iNdEx := len(m.Ingress) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ingress[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.PodSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *IPBlock) Size() (n int) { - if m == nil { - return 0 - } - 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) { - if m == nil { - return 0 - } - 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) { - if m == nil { - return 0 - } - 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) { - if m == nil { - return 0 - } - 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) { - if m == nil { - return 0 - } - 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) { - if m == nil { - return 0 - } - 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) { - if m == nil { - return 0 - } - 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)) - } - if m.EndPort != nil { - n += 1 + sovGenerated(uint64(*m.EndPort)) - } - return n -} - -func (m *NetworkPolicySpec) Size() (n int) { - if m == nil { - return 0 - } - 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) { - return (math_bits.Len64(x|1) + 6) / 7 -} -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(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "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" - } - repeatedStringForPorts := "[]NetworkPolicyPort{" - for _, f := range this.Ports { - repeatedStringForPorts += strings.Replace(strings.Replace(f.String(), "NetworkPolicyPort", "NetworkPolicyPort", 1), `&`, ``, 1) + "," - } - repeatedStringForPorts += "}" - repeatedStringForTo := "[]NetworkPolicyPeer{" - for _, f := range this.To { - repeatedStringForTo += strings.Replace(strings.Replace(f.String(), "NetworkPolicyPeer", "NetworkPolicyPeer", 1), `&`, ``, 1) + "," - } - repeatedStringForTo += "}" - s := strings.Join([]string{`&NetworkPolicyEgressRule{`, - `Ports:` + repeatedStringForPorts + `,`, - `To:` + repeatedStringForTo + `,`, - `}`, - }, "") - return s -} -func (this *NetworkPolicyIngressRule) String() string { - if this == nil { - return "nil" - } - repeatedStringForPorts := "[]NetworkPolicyPort{" - for _, f := range this.Ports { - repeatedStringForPorts += strings.Replace(strings.Replace(f.String(), "NetworkPolicyPort", "NetworkPolicyPort", 1), `&`, ``, 1) + "," - } - repeatedStringForPorts += "}" - repeatedStringForFrom := "[]NetworkPolicyPeer{" - for _, f := range this.From { - repeatedStringForFrom += strings.Replace(strings.Replace(f.String(), "NetworkPolicyPeer", "NetworkPolicyPeer", 1), `&`, ``, 1) + "," - } - repeatedStringForFrom += "}" - s := strings.Join([]string{`&NetworkPolicyIngressRule{`, - `Ports:` + repeatedStringForPorts + `,`, - `From:` + repeatedStringForFrom + `,`, - `}`, - }, "") - return s -} -func (this *NetworkPolicyList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]NetworkPolicy{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "NetworkPolicy", "NetworkPolicy", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&NetworkPolicyList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - 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", "v1.LabelSelector", 1) + `,`, - `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `IPBlock:` + strings.Replace(this.IPBlock.String(), "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", "intstr.IntOrString", 1) + `,`, - `EndPort:` + valueToStringGenerated(this.EndPort) + `,`, - `}`, - }, "") - return s -} -func (this *NetworkPolicySpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForIngress := "[]NetworkPolicyIngressRule{" - for _, f := range this.Ingress { - repeatedStringForIngress += strings.Replace(strings.Replace(f.String(), "NetworkPolicyIngressRule", "NetworkPolicyIngressRule", 1), `&`, ``, 1) + "," - } - repeatedStringForIngress += "}" - repeatedStringForEgress := "[]NetworkPolicyEgressRule{" - for _, f := range this.Egress { - repeatedStringForEgress += strings.Replace(strings.Replace(f.String(), "NetworkPolicyEgressRule", "NetworkPolicyEgressRule", 1), `&`, ``, 1) + "," - } - repeatedStringForEgress += "}" - s := strings.Join([]string{`&NetworkPolicySpec{`, - `PodSelector:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PodSelector), "LabelSelector", "v1.LabelSelector", 1), `&`, ``, 1) + `,`, - `Ingress:` + repeatedStringForIngress + `,`, - `Egress:` + repeatedStringForEgress + `,`, - `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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PodSelector == nil { - m.PodSelector = &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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NamespaceSelector == nil { - m.NamespaceSelector = &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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := github_com_cilium_cilium_pkg_k8s_slim_k8s_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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Port == nil { - m.Port = &intstr.IntOrString{} - } - if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndPort", 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.EndPort = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+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 - depth := 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 - } - } - case 1: - iNdEx += 8 - 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 - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/generated.proto b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/generated.proto deleted file mode 100644 index c96ffa7d4e9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/generated.proto +++ /dev/null @@ -1,191 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.cilium.cilium.pkg.k8s.slim.k8s.api.networking.v1; - -import "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1/generated.proto"; -import "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto"; -import "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1"; - -// IPBlock describes a particular CIDR (Ex. "192.168.1.0/24","2001:db8::/64") 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 IPBlock - // Valid examples are "192.168.1.0/24" or "2001:db8::/64" - optional string cidr = 1; - - // except is a slice of CIDRs that should not be included within an IPBlock - // Valid examples are "192.168.1.0/24" or "2001:db8::/64" - // 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/sig-architecture/api-conventions.md#metadata - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ObjectMeta metadata = 1; - - // spec represents the 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 { - // ports is a 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; - - // to is a 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 { - // ports is a 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; - - // from is a 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 one 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/sig-architecture/api-conventions.md#metadata - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of schema objects. - repeated NetworkPolicy items = 2; -} - -// NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of -// fields are allowed -message NetworkPolicyPeer { - // podSelector is a label selector which selects pods. This field follows standard label - // selector semantics; if present but empty, it selects all pods. - // - // If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects - // the pods matching podSelector in the Namespaces selected by NamespaceSelector. - // Otherwise it selects the pods matching podSelector in the policy's own namespace. - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.LabelSelector podSelector = 1; - - // namespaceSelector selects namespaces using cluster-scoped labels. This field follows - // standard label selector semantics; if present but empty, it selects all namespaces. - // - // If podSelector is also set, then the NetworkPolicyPeer as a whole selects - // the pods matching podSelector in the namespaces selected by namespaceSelector. - // Otherwise it selects all pods in the namespaces selected by namespaceSelector. - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.LabelSelector namespaceSelector = 2; - - // ipBlock defines policy on a particular IPBlock. If this field is set then - // neither of the other fields can be. - // +optional - optional IPBlock ipBlock = 3; -} - -// NetworkPolicyPort describes a port to allow traffic on -message NetworkPolicyPort { - // protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. - // If not specified, this field defaults to TCP. - // +optional - optional string protocol = 1; - - // port represents 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 github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.util.intstr.IntOrString port = 2; - - // endPort indicates that the range of ports from port to endPort if set, inclusive, - // should be allowed by the policy. This field cannot be defined if the port field - // is not defined or if the port field is defined as a named (string) port. - // The endPort must be equal or greater than port. - // +optional - optional int32 endPort = 3; -} - -// NetworkPolicySpec provides the specification of a NetworkPolicy -message 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. - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.LabelSelector podSelector = 1; - - // ingress is a 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; - - // egress is a 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; - - // policyTypes is a 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/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/register.go deleted file mode 100644 index db5db6022e1..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/register.go +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2017 The Kubernetes Authors. - -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/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/types.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/types.go deleted file mode 100644 index 99d749e1dc4..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/types.go +++ /dev/null @@ -1,209 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2017 The Kubernetes Authors. - -package v1 - -import ( - slim_corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/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 { - slim_metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - slim_metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec represents the specification of the desired behavior for this NetworkPolicy. - // +optional - Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status is tombstoned to show why 3 is a reserved protobuf tag. - // This commented field should remain, so in the future if we decide to reimplement - // NetworkPolicyStatus a different protobuf name and tag SHOULD be used! - // Status NetworkPolicyStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// PolicyType string describes the NetworkPolicy type -// This type is beta-level in 1.8 -// +enum -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 { - // 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. - PodSelector slim_metav1.LabelSelector `json:"podSelector" protobuf:"bytes,1,opt,name=podSelector"` - - // ingress is a 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"` - - // egress is a 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"` - - // policyTypes is a 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 { - // ports is a 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"` - - // from is a 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 one 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 { - // ports is a 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"` - - // to is a 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 { - // protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. - // If not specified, this field defaults to TCP. - // +optional - Protocol *slim_corev1.Protocol `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol,casttype=k8s.io/api/core/v1.Protocol"` - - // port represents 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"` - - // endPort indicates that the range of ports from port to endPort if set, inclusive, - // should be allowed by the policy. This field cannot be defined if the port field - // is not defined or if the port field is defined as a named (string) port. - // The endPort must be equal or greater than port. - // +optional - EndPort *int32 `json:"endPort,omitempty" protobuf:"bytes,3,opt,name=endPort"` -} - -// IPBlock describes a particular CIDR (Ex. "192.168.1.0/24","2001:db8::/64") 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 IPBlock - // Valid examples are "192.168.1.0/24" or "2001:db8::/64" - CIDR string `json:"cidr" protobuf:"bytes,1,name=cidr"` - - // except is a slice of CIDRs that should not be included within an IPBlock - // Valid examples are "192.168.1.0/24" or "2001:db8::/64" - // 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 to/from. Only certain combinations of -// fields are allowed -type NetworkPolicyPeer struct { - // podSelector is a label selector which selects pods. This field follows standard label - // selector semantics; if present but empty, it selects all pods. - // - // If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects - // the pods matching podSelector in the Namespaces selected by NamespaceSelector. - // Otherwise it selects the pods matching podSelector in the policy's own namespace. - // +optional - PodSelector *slim_metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"` - - // namespaceSelector selects namespaces using cluster-scoped labels. This field follows - // standard label selector semantics; if present but empty, it selects all namespaces. - // - // If podSelector is also set, then the NetworkPolicyPeer as a whole selects - // the pods matching podSelector in the namespaces selected by namespaceSelector. - // Otherwise it selects all pods in the namespaces selected by namespaceSelector. - // +optional - NamespaceSelector *slim_metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"` - - // ipBlock defines policy on a particular IPBlock. If this field is set then - // neither of the other fields can be. - // +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 { - slim_metav1.TypeMeta `json:",inline"` - - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - slim_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/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/well_known_annotations.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/well_known_annotations.go deleted file mode 100644 index 136d2456aa7..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/well_known_annotations.go +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2020 The Kubernetes Authors. - -package v1 - -const ( - // AnnotationIsDefaultIngressClass can be used to indicate that an - // IngressClass should be considered default. When a single IngressClass - // resource has this annotation set to true, new Ingress resources without a - // class specified will be assigned this default class. - AnnotationIsDefaultIngressClass = "ingressclass.kubernetes.io/is-default-class" -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/zz_generated.deepcopy.go deleted file mode 100644 index 3e9b954348a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,255 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1 - -import ( - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - intstr "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr" - 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 *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 - in.ListMeta.DeepCopyInto(&out.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 - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.NamespaceSelector != nil { - in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.IPBlock != nil { - in, out := &in.IPBlock, &out.IPBlock - *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 - *out = new(corev1.Protocol) - **out = **in - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(intstr.IntOrString) - **out = **in - } - if in.EndPort != nil { - in, out := &in.EndPort, &out.EndPort - *out = new(int32) - **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/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/zz_generated.deepequal.go deleted file mode 100644 index eec20108d68..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1/zz_generated.deepequal.go +++ /dev/null @@ -1,317 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package v1 - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IPBlock) DeepEqual(other *IPBlock) bool { - if other == nil { - return false - } - - if in.CIDR != other.CIDR { - return false - } - if ((in.Except != nil) && (other.Except != nil)) || ((in.Except == nil) != (other.Except == nil)) { - in, other := &in.Except, &other.Except - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NetworkPolicy) DeepEqual(other *NetworkPolicy) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ObjectMeta.DeepEqual(&other.ObjectMeta) { - return false - } - - if !in.Spec.DeepEqual(&other.Spec) { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NetworkPolicyEgressRule) DeepEqual(other *NetworkPolicyEgressRule) bool { - if other == nil { - return false - } - - if ((in.Ports != nil) && (other.Ports != nil)) || ((in.Ports == nil) != (other.Ports == nil)) { - in, other := &in.Ports, &other.Ports - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.To != nil) && (other.To != nil)) || ((in.To == nil) != (other.To == nil)) { - in, other := &in.To, &other.To - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NetworkPolicyIngressRule) DeepEqual(other *NetworkPolicyIngressRule) bool { - if other == nil { - return false - } - - if ((in.Ports != nil) && (other.Ports != nil)) || ((in.Ports == nil) != (other.Ports == nil)) { - in, other := &in.Ports, &other.Ports - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.From != nil) && (other.From != nil)) || ((in.From == nil) != (other.From == nil)) { - in, other := &in.From, &other.From - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NetworkPolicyList) DeepEqual(other *NetworkPolicyList) bool { - if other == nil { - return false - } - - if in.TypeMeta != other.TypeMeta { - return false - } - - if !in.ListMeta.DeepEqual(&other.ListMeta) { - return false - } - - if ((in.Items != nil) && (other.Items != nil)) || ((in.Items == nil) != (other.Items == nil)) { - in, other := &in.Items, &other.Items - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NetworkPolicyPeer) DeepEqual(other *NetworkPolicyPeer) bool { - if other == nil { - return false - } - - if (in.PodSelector == nil) != (other.PodSelector == nil) { - return false - } else if in.PodSelector != nil { - if !in.PodSelector.DeepEqual(other.PodSelector) { - return false - } - } - - if (in.NamespaceSelector == nil) != (other.NamespaceSelector == nil) { - return false - } else if in.NamespaceSelector != nil { - if !in.NamespaceSelector.DeepEqual(other.NamespaceSelector) { - return false - } - } - - if (in.IPBlock == nil) != (other.IPBlock == nil) { - return false - } else if in.IPBlock != nil { - if !in.IPBlock.DeepEqual(other.IPBlock) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NetworkPolicyPort) DeepEqual(other *NetworkPolicyPort) bool { - if other == nil { - return false - } - - if (in.Protocol == nil) != (other.Protocol == nil) { - return false - } else if in.Protocol != nil { - if *in.Protocol != *other.Protocol { - return false - } - } - - if (in.Port == nil) != (other.Port == nil) { - return false - } else if in.Port != nil { - if !in.Port.DeepEqual(other.Port) { - return false - } - } - - if (in.EndPort == nil) != (other.EndPort == nil) { - return false - } else if in.EndPort != nil { - if *in.EndPort != *other.EndPort { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *NetworkPolicySpec) DeepEqual(other *NetworkPolicySpec) bool { - if other == nil { - return false - } - - if !in.PodSelector.DeepEqual(&other.PodSelector) { - return false - } - - if ((in.Ingress != nil) && (other.Ingress != nil)) || ((in.Ingress == nil) != (other.Ingress == nil)) { - in, other := &in.Ingress, &other.Ingress - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Egress != nil) && (other.Egress != nil)) || ((in.Egress == nil) != (other.Egress == nil)) { - in, other := &in.Egress, &other.Egress - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.PolicyTypes != nil) && (other.PolicyTypes != nil)) || ((in.PolicyTypes == nil) != (other.PolicyTypes == nil)) { - in, other := &in.PolicyTypes, &other.PolicyTypes - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme/doc.go deleted file mode 100644 index ba34515351f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme/register.go deleted file mode 100644 index cc6ff2709fd..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - apiextensionsv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" - 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" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - apiextensionsv1.AddToScheme, -} - -// 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. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/apiextensions_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/apiextensions_client.go deleted file mode 100644 index 5f5e04bd9aa..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/apiextensions_client.go +++ /dev/null @@ -1,94 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "net/http" - - "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" - rest "k8s.io/client-go/rest" -) - -type ApiextensionsV1Interface interface { - RESTClient() rest.Interface - CustomResourceDefinitionsGetter -} - -// ApiextensionsV1Client is used to interact with features provided by the apiextensions.k8s.io group. -type ApiextensionsV1Client struct { - restClient rest.Interface -} - -func (c *ApiextensionsV1Client) CustomResourceDefinitions() CustomResourceDefinitionInterface { - return newCustomResourceDefinitions(c) -} - -// NewForConfig creates a new ApiextensionsV1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*ApiextensionsV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new ApiextensionsV1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ApiextensionsV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &ApiextensionsV1Client{client}, nil -} - -// NewForConfigOrDie creates a new ApiextensionsV1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ApiextensionsV1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ApiextensionsV1Client for the given RESTClient. -func New(c rest.Interface) *ApiextensionsV1Client { - return &ApiextensionsV1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - 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 *ApiextensionsV1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/customresourcedefinition.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/customresourcedefinition.go deleted file mode 100644 index d251544ef59..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/customresourcedefinition.go +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// CustomResourceDefinitionsGetter has a method to return a CustomResourceDefinitionInterface. -// A group's client should implement this interface. -type CustomResourceDefinitionsGetter interface { - CustomResourceDefinitions() CustomResourceDefinitionInterface -} - -// CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources. -type CustomResourceDefinitionInterface interface { - Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.CreateOptions) (*v1.CustomResourceDefinition, error) - Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (*v1.CustomResourceDefinition, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CustomResourceDefinition, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.CustomResourceDefinitionList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CustomResourceDefinition, err error) - CustomResourceDefinitionExpansion -} - -// customResourceDefinitions implements CustomResourceDefinitionInterface -type customResourceDefinitions struct { - client rest.Interface -} - -// newCustomResourceDefinitions returns a CustomResourceDefinitions -func newCustomResourceDefinitions(c *ApiextensionsV1Client) *customResourceDefinitions { - return &customResourceDefinitions{ - client: c.RESTClient(), - } -} - -// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any. -func (c *customResourceDefinitions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CustomResourceDefinition, err error) { - result = &v1.CustomResourceDefinition{} - err = c.client.Get(). - Resource("customresourcedefinitions"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. -func (c *customResourceDefinitions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CustomResourceDefinitionList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.CustomResourceDefinitionList{} - err = c.client.Get(). - Resource("customresourcedefinitions"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested customResourceDefinitions. -func (c *customResourceDefinitions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("customresourcedefinitions"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.CreateOptions) (result *v1.CustomResourceDefinition, err error) { - result = &v1.CustomResourceDefinition{} - err = c.client.Post(). - Resource("customresourcedefinitions"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(customResourceDefinition). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (result *v1.CustomResourceDefinition, err error) { - result = &v1.CustomResourceDefinition{} - err = c.client.Put(). - Resource("customresourcedefinitions"). - Name(customResourceDefinition.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(customResourceDefinition). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. -func (c *customResourceDefinitions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("customresourcedefinitions"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("customresourcedefinitions"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched customResourceDefinition. -func (c *customResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CustomResourceDefinition, err error) { - result = &v1.CustomResourceDefinition{} - err = c.client.Patch(pt). - Resource("customresourcedefinitions"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/doc.go deleted file mode 100644 index 50cfbd485a5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/generated_expansion.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/generated_expansion.go deleted file mode 100644 index 2ea7378ea99..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -type CustomResourceDefinitionExpansion interface{} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-clientset/clientset.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-clientset/clientset.go deleted file mode 100644 index e15d6ef49a6..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-clientset/clientset.go +++ /dev/null @@ -1,89 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright The Kubernetes Authors. - -package clientset - -import ( - "fmt" - "net/http" - - apiextclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" - - slim_apiextensionsv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1" -) - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *apiextclientset.Clientset - apiextensionsV1beta1 *apiextensionsv1beta1.ApiextensionsV1beta1Client - apiextensionsV1 *apiextensionsv1.ApiextensionsV1Client -} - -// ApiextensionsV1 retrieves the ApiextensionsV1Client -func (c *Clientset) ApiextensionsV1() apiextensionsv1.ApiextensionsV1Interface { - return c.apiextensionsV1 -} - -// ApiextensionsV1beta1 retrieves the ApiextensionsV1beta1Client -func (c *Clientset) ApiextensionsV1beta1() apiextensionsv1beta1.ApiextensionsV1beta1Interface { - return c.apiextensionsV1beta1 -} - -// NewForConfigAndClient creates a new Clientset for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.Clientset, err = apiextclientset.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - // Wrap extensionsV1 with our own implementation - extensionsV1, err := slim_apiextensionsv1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - cs.apiextensionsV1 = apiextensionsv1.New(extensionsV1.RESTClient()) - - 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.Clientset = apiextclientset.NewForConfigOrDie(c) - - // Wrap extensionsV1 with our own implementation - cs.apiextensionsV1 = apiextensionsv1.New(slim_apiextensionsv1.NewForConfigOrDie(c).RESTClient()) - - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.Clientset = apiextclientset.New(c) - - // Wrap extensionsV1 with our own implementation - cs.apiextensionsV1 = apiextensionsv1.New(slim_apiextensionsv1.New(c).RESTClient()) - - return &cs -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/doc.go deleted file mode 100644 index c54b4a560b3..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/doc.go +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2019 The Kubernetes Authors. - -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +k8s:conversion-gen=k8s.io/apiextensions-apiserver/pkg/apis/apiextensions -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +groupName=apiextensions.k8s.io - -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/generated.pb.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/generated.pb.go deleted file mode 100644 index c53e29423db..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/generated.pb.go +++ /dev/null @@ -1,568 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - - proto "github.com/gogo/protobuf/proto" - - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } -func (*CustomResourceDefinition) ProtoMessage() {} -func (*CustomResourceDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_2ae25e910fba1c55, []int{0} -} -func (m *CustomResourceDefinition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinition) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinition.Merge(m, src) -} -func (m *CustomResourceDefinition) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinition) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinition.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinition proto.InternalMessageInfo - -func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } -func (*CustomResourceDefinitionList) ProtoMessage() {} -func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int) { - return fileDescriptor_2ae25e910fba1c55, []int{1} -} -func (m *CustomResourceDefinitionList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CustomResourceDefinitionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CustomResourceDefinitionList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CustomResourceDefinitionList.Merge(m, src) -} -func (m *CustomResourceDefinitionList) XXX_Size() int { - return m.Size() -} -func (m *CustomResourceDefinitionList) XXX_DiscardUnknown() { - xxx_messageInfo_CustomResourceDefinitionList.DiscardUnknown(m) -} - -var xxx_messageInfo_CustomResourceDefinitionList proto.InternalMessageInfo - -func init() { - proto.RegisterType((*CustomResourceDefinition)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.apiextensions.v1.CustomResourceDefinition") - proto.RegisterType((*CustomResourceDefinitionList)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.apiextensions.v1.CustomResourceDefinitionList") -} - -func init() { - proto.RegisterFile("github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/generated.proto", fileDescriptor_2ae25e910fba1c55) -} - -var fileDescriptor_2ae25e910fba1c55 = []byte{ - // 378 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x4f, 0x8b, 0xda, 0x40, - 0x18, 0x87, 0x33, 0x16, 0x41, 0x22, 0x85, 0x92, 0x93, 0x48, 0x19, 0xc5, 0x93, 0x97, 0x4e, 0xd0, - 0x43, 0xf1, 0x66, 0x49, 0x4b, 0xa1, 0xd0, 0x22, 0x78, 0x6b, 0x6f, 0x63, 0x7c, 0x8d, 0xd3, 0x38, - 0x33, 0x21, 0x33, 0x91, 0xdd, 0xcb, 0xb2, 0x9f, 0x40, 0xf6, 0x63, 0x79, 0xf4, 0xe8, 0x49, 0xd6, - 0xec, 0x17, 0x59, 0x66, 0xfc, 0xb7, 0xbb, 0xae, 0x2c, 0xae, 0x97, 0xcc, 0x3b, 0x2f, 0x79, 0x9f, - 0xdf, 0x33, 0x21, 0xe3, 0xf6, 0x22, 0xa6, 0xc7, 0xd9, 0x80, 0x84, 0x92, 0xfb, 0x21, 0x9b, 0xb0, - 0x6c, 0xbf, 0x24, 0x71, 0xe4, 0xc7, 0x1d, 0xe5, 0xab, 0x09, 0xe3, 0xb6, 0xa0, 0x09, 0xb3, 0x0f, - 0xb8, 0xd2, 0x20, 0x14, 0x93, 0x42, 0xf9, 0xd3, 0x96, 0x1f, 0x81, 0x80, 0x94, 0x6a, 0x18, 0x92, - 0x24, 0x95, 0x5a, 0x7a, 0xdd, 0x03, 0x90, 0x6c, 0x48, 0xbb, 0x25, 0x89, 0x23, 0x12, 0x77, 0x14, - 0x31, 0x40, 0x5b, 0x18, 0x20, 0x79, 0x06, 0x24, 0xd3, 0x56, 0xf5, 0xe7, 0x99, 0x46, 0x1c, 0x34, - 0x7d, 0x45, 0xa4, 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0xe6, 0x39, 0x46, 0x8b, 0x1c, 0xa3, 0x65, 0x8e, - 0xd1, 0x7d, 0x8e, 0xd1, 0xdd, 0x03, 0x76, 0xfe, 0x75, 0x2f, 0xbc, 0x39, 0x8f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0xe9, 0x04, 0x05, 0xb8, 0x7b, 0x03, 0x00, 0x00, -} - -func (m *CustomResourceDefinition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CustomResourceDefinition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *CustomResourceDefinitionList) Size() (n int) { - if m == nil { - return 0 - } - 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) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *CustomResourceDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceDefinition{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]CustomResourceDefinition{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "CustomResourceDefinition", "CustomResourceDefinition", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&CustomResourceDefinitionList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - 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 *CustomResourceDefinition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinition: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionList: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, CustomResourceDefinition{}) - 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) || (iNdEx+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 - depth := 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 - } - } - case 1: - iNdEx += 8 - 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 - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/generated.proto b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/generated.proto deleted file mode 100644 index a78a196617c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/generated.proto +++ /dev/null @@ -1,37 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.apiextensions.v1; - -import "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1"; - -// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format -// <.spec.name>.<.spec.group>. -message CustomResourceDefinition { - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ObjectMeta metadata = 1; -} - -// CustomResourceDefinitionList is a list of CustomResourceDefinition objects. -message CustomResourceDefinitionList { - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ListMeta metadata = 1; - - // items list individual CustomResourceDefinition objects - repeated CustomResourceDefinition items = 2; -} - diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/register.go deleted file mode 100644 index 71fba678c3c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2017 The Kubernetes Authors. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "apiextensions.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - 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, - &CustomResourceDefinition{}, - &CustomResourceDefinitionList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/types.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/types.go deleted file mode 100644 index 9be5bf3e25e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/types.go +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2019 The Kubernetes Authors. - -package v1 - -import ( - metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format -// <.spec.name>.<.spec.group>. -type CustomResourceDefinition struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CustomResourceDefinitionList is a list of CustomResourceDefinition objects. -type CustomResourceDefinitionList struct { - metav1.TypeMeta `json:",inline"` - - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items list individual CustomResourceDefinition objects - Items []CustomResourceDefinition `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/zz_generated.deepcopy.go deleted file mode 100644 index 0acce338ebe..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,72 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// 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 *CustomResourceDefinition) DeepCopyInto(out *CustomResourceDefinition) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinition. -func (in *CustomResourceDefinition) DeepCopy() *CustomResourceDefinition { - if in == nil { - return nil - } - out := new(CustomResourceDefinition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CustomResourceDefinition) 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 *CustomResourceDefinitionList) DeepCopyInto(out *CustomResourceDefinitionList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CustomResourceDefinition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionList. -func (in *CustomResourceDefinitionList) DeepCopy() *CustomResourceDefinitionList { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CustomResourceDefinitionList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/labels.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/labels.go index 298e3393b14..32b29882230 100644 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/labels.go +++ b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/labels.go @@ -6,8 +6,11 @@ package labels import ( + "fmt" "sort" "strings" + + "k8s.io/apimachinery/pkg/util/validation/field" ) // Labels allows you to present labels independently from their storage. @@ -130,3 +133,31 @@ func Equals(labels1, labels2 Set) bool { } return true } + +// ConvertSelectorToLabelsMap converts selector string to labels map +// and validates keys and values +func ConvertSelectorToLabelsMap(selector string, opts ...field.PathOption) (Set, error) { + labelsMap := Set{} + + if len(selector) == 0 { + return labelsMap, nil + } + + labels := strings.Split(selector, ",") + for _, label := range labels { + l := strings.Split(label, "=") + if len(l) != 2 { + return labelsMap, fmt.Errorf("invalid selector: %s", l) + } + key := strings.TrimSpace(l[0]) + if err := validateLabelKey(key, field.ToPath(opts...)); err != nil { + return labelsMap, err + } + value := strings.TrimSpace(l[1]) + if err := validateLabelValue(key, value, field.ToPath(opts...)); err != nil { + return labelsMap, err + } + labelsMap[key] = value + } + return labelsMap, nil +} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/selector.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/selector.go index ade6fc43498..6619aedca27 100644 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/selector.go +++ b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/selector.go @@ -950,3 +950,76 @@ func SelectorFromValidatedSet(ls Set) Selector { func ParseToRequirements(selector string, opts ...field.PathOption) ([]Requirement, error) { return parse(selector, field.ToPath(opts...)) } + +// ValidatedSetSelector wraps a Set, allowing it to implement the Selector interface. Unlike +// Set.AsSelectorPreValidated (which copies the input Set), this type simply wraps the underlying +// Set. As a result, it is substantially more efficient. A nil and empty Sets are considered +// equivalent to Everything(). +// +// Callers MUST ensure the underlying Set is not mutated, and that it is already validated. If these +// constraints are not met, Set.AsValidatedSelector should be preferred +// +// None of the Selector methods mutate the underlying Set, but Add() and Requirements() convert to +// the less optimized version. +type ValidatedSetSelector Set + +func (s ValidatedSetSelector) Matches(labels Labels) bool { + for k, v := range s { + if !labels.Has(k) || v != labels.Get(k) { + return false + } + } + return true +} + +func (s ValidatedSetSelector) Empty() bool { + return len(s) == 0 +} + +func (s ValidatedSetSelector) String() string { + keys := make([]string, 0, len(s)) + for k := range s { + keys = append(keys, k) + } + // Ensure deterministic output + sort.Strings(keys) + b := strings.Builder{} + for i, key := range keys { + v := s[key] + b.Grow(len(key) + 2 + len(v)) + if i != 0 { + b.WriteString(",") + } + b.WriteString(key) + b.WriteString("=") + b.WriteString(v) + } + return b.String() +} + +func (s ValidatedSetSelector) Add(r ...Requirement) Selector { + return s.toFullSelector().Add(r...) +} + +func (s ValidatedSetSelector) Requirements() (requirements Requirements, selectable bool) { + return s.toFullSelector().Requirements() +} + +func (s ValidatedSetSelector) DeepCopySelector() Selector { + res := make(ValidatedSetSelector, len(s)) + for k, v := range s { + res[k] = v + } + return res +} + +func (s ValidatedSetSelector) RequiresExactMatch(label string) (value string, found bool) { + v, f := s[label] + return v, f +} + +func (s ValidatedSetSelector) toFullSelector() Selector { + return SelectorFromValidatedSet(Set(s)) +} + +var _ Selector = ValidatedSetSelector{} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/zz_generated.deepequal.go index f05c7cb36ed..1f3ad535172 100644 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/zz_generated.deepequal.go +++ b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels/zz_generated.deepequal.go @@ -177,3 +177,27 @@ func (in *Set) DeepEqual(other *Set) bool { return true } + +// DeepEqual is an autogenerated deepequal function, deeply comparing the +// receiver with other. in must be non-nil. +func (in *ValidatedSetSelector) DeepEqual(other *ValidatedSetSelector) bool { + if other == nil { + return false + } + + if len(*in) != len(*other) { + return false + } else { + for key, inValue := range *in { + if otherValue, present := (*other)[key]; !present { + return false + } else { + if inValue != otherValue { + return false + } + } + } + } + + return true +} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto index 49ca0e991fe..f237c9313bf 100644 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto +++ b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto @@ -96,6 +96,7 @@ message LabelSelector { // matchExpressions is a list of label selector requirements. The requirements are ANDed. // +kubebuilder:validation:Optional + // +listType=atomic repeated LabelSelectorRequirement matchExpressions = 2; } @@ -115,8 +116,8 @@ message LabelSelectorRequirement { // the values array must be non-empty. If the operator is Exists or DoesNotExist, // the values array must be empty. This array is replaced during a strategic // merge patch. - // // +kubebuilder:validation:Optional + // +listType=atomic repeated string values = 3; } @@ -263,6 +264,8 @@ message ObjectMeta { // +optional // +patchMergeKey=uid // +patchStrategy=merge + // +listType=map + // +listMapKey=uid repeated OwnerReference ownerReferences = 13; } diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/helpers.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/helpers.go index 0b9804f6e12..d2d08077a00 100644 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/helpers.go +++ b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/helpers.go @@ -9,6 +9,7 @@ import ( "fmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels" "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/selection" @@ -57,6 +58,100 @@ func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) { return selector, nil } +// LabelSelectorAsMap converts the LabelSelector api type into a map of strings, ie. the +// original structure of a label selector. Operators that cannot be converted into plain +// labels (Exists, DoesNotExist, NotIn, and In with more than one value) will result in +// an error. +func LabelSelectorAsMap(ps *LabelSelector) (map[string]string, error) { + if ps == nil { + return nil, nil + } + selector := map[string]string{} + for k, v := range ps.MatchLabels { + selector[k] = v + } + for _, expr := range ps.MatchExpressions { + switch expr.Operator { + case LabelSelectorOpIn: + if len(expr.Values) != 1 { + return selector, fmt.Errorf("operator %q without a single value cannot be converted into the old label selector format", expr.Operator) + } + // Should we do anything in case this will override a previous key-value pair? + selector[expr.Key] = expr.Values[0] + case LabelSelectorOpNotIn, LabelSelectorOpExists, LabelSelectorOpDoesNotExist: + return selector, fmt.Errorf("operator %q cannot be converted into the old label selector format", expr.Operator) + default: + return selector, fmt.Errorf("%q is not a valid selector operator", expr.Operator) + } + } + return selector, nil +} + +// ParseToLabelSelector parses a string representing a selector into a LabelSelector object. +// Note: This function should be kept in sync with the parser in pkg/labels/selector.go +func ParseToLabelSelector(selector string) (*LabelSelector, error) { + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return nil, fmt.Errorf("couldn't parse the selector string \"%s\": %w", selector, err) + } + + labelSelector := &LabelSelector{ + MatchLabels: map[string]string{}, + MatchExpressions: []LabelSelectorRequirement{}, + } + for _, req := range reqs { + var op LabelSelectorOperator + switch req.Operator() { + case selection.Equals, selection.DoubleEquals: + vals := req.Values() + if vals.Len() != 1 { + return nil, fmt.Errorf("equals operator must have exactly one value") + } + val, ok := vals.PopAny() + if !ok { + return nil, fmt.Errorf("equals operator has exactly one value but it cannot be retrieved") + } + labelSelector.MatchLabels[req.Key()] = val + continue + case selection.In: + op = LabelSelectorOpIn + case selection.NotIn: + op = LabelSelectorOpNotIn + case selection.Exists: + op = LabelSelectorOpExists + case selection.DoesNotExist: + op = LabelSelectorOpDoesNotExist + case selection.GreaterThan, selection.LessThan: + // Adding a separate case for these operators to indicate that this is deliberate + return nil, fmt.Errorf("%q isn't supported in label selectors", req.Operator()) + default: + return nil, fmt.Errorf("%q is not a valid label selector operator", req.Operator()) + } + labelSelector.MatchExpressions = append(labelSelector.MatchExpressions, LabelSelectorRequirement{ + Key: req.Key(), + Operator: op, + Values: sets.List(req.Values()), + }) + } + return labelSelector, nil +} + +// SetAsLabelSelector converts the labels.Set object into a LabelSelector api object. +func SetAsLabelSelector(ls labels.Set) *LabelSelector { + if ls == nil { + return nil + } + + selector := &LabelSelector{ + MatchLabels: make(map[string]string, len(ls)), + } + for label, value := range ls { + selector.MatchLabels[label] = value + } + + return selector +} + // FormatLabelSelector convert labelSelector into plain string func FormatLabelSelector(labelSelector *LabelSelector) string { selector, err := LabelSelectorAsSelector(labelSelector) @@ -102,3 +197,31 @@ func SlimOwnerReferences(references []metav1.OwnerReference) []OwnerReference { } return slimRefs } + +// HasAnnotation returns a bool if passed in annotation exists +func HasAnnotation(obj ObjectMeta, ann string) bool { + _, found := obj.Annotations[ann] + return found +} + +// SetMetaDataAnnotation sets the annotation and value +func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) { + if obj.Annotations == nil { + obj.Annotations = make(map[string]string) + } + obj.Annotations[ann] = value +} + +// HasLabel returns a bool if passed in label exists +func HasLabel(obj ObjectMeta, label string) bool { + _, found := obj.Labels[label] + return found +} + +// SetMetaDataLabel sets the label and value +func SetMetaDataLabel(obj *ObjectMeta, label string, value string) { + if obj.Labels == nil { + obj.Labels = make(map[string]string) + } + obj.Labels[label] = value +} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/meta.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/meta.go index f5b506010f1..3ad98318308 100644 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/meta.go +++ b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/meta.go @@ -38,24 +38,22 @@ func (obj *ObjectMeta) GetObjectMeta() metav1.Object { return obj } // Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows // fast, direct access to metadata fields for API objects. -func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } -func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } -func (meta *ObjectMeta) GetName() string { return meta.Name } -func (meta *ObjectMeta) SetName(name string) { meta.Name = name } -func (meta *ObjectMeta) GetGenerateName() string { - panic("ObjectMeta - GetGenerateName() not implemented") +func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } +func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } +func (meta *ObjectMeta) GetName() string { return meta.Name } +func (meta *ObjectMeta) SetName(name string) { meta.Name = name } +func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName } +func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName } +func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } +func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } +func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } +func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } +func (meta *ObjectMeta) GetGeneration() int64 { panic("ObjectMeta - GetGeneration() not implemented") } +func (meta *ObjectMeta) SetGeneration(_ int64) { panic("ObjectMeta - SetGeneration() not implemented") } +func (meta *ObjectMeta) GetSelfLink() string { panic("ObjectMeta - GetSelfLink() not implemented") } +func (meta *ObjectMeta) SetSelfLink(_ string) { + panic("ObjectMeta - SetSelfLink() not implemented") } -func (meta *ObjectMeta) SetGenerateName(string) { - panic("ObjectMeta - SetGenerateName() not implemented") -} -func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } -func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } -func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } -func (meta *ObjectMeta) SetResourceVersion(ver string) { meta.ResourceVersion = ver } -func (meta *ObjectMeta) GetGeneration() int64 { panic("ObjectMeta - GetGeneration() not implemented") } -func (meta *ObjectMeta) SetGeneration(_ int64) { panic("ObjectMeta - SetGeneration() not implemented") } -func (meta *ObjectMeta) GetSelfLink() string { panic("ObjectMeta - GetSelfLink() not implemented") } -func (meta *ObjectMeta) SetSelfLink(_ string) { panic("ObjectMeta - SetSelfLink() not implemented") } func (meta *ObjectMeta) GetCreationTimestamp() metav1.Time { panic("ObjectMeta - GetCreationTimestamp() not implemented") } @@ -95,9 +93,6 @@ func (meta *ObjectMeta) GetOwnerReferences() []metav1.OwnerReference { func (meta *ObjectMeta) SetOwnerReferences(references []metav1.OwnerReference) { meta.OwnerReferences = SlimOwnerReferences(references) } -func (meta *ObjectMeta) GetZZZ_DeprecatedClusterName() string { panic("not implemented") } -func (meta *ObjectMeta) SetZZZ_DeprecatedClusterName(_ string) { panic("not implemented") } - func (meta *ObjectMeta) GetManagedFields() []metav1.ManagedFieldsEntry { panic("ObjectMeta - GetManagedFields() not implemented") } diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/register.go index 6df49bca435..d323d5714c4 100644 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/register.go +++ b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/register.go @@ -14,6 +14,13 @@ import ( // GroupName is the group name for this API. const GroupName = "meta.k8s.io" +var ( + // localSchemeBuilder is used to make compiler happy for autogenerated + // conversions. However, it's not used. + schemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &schemeBuilder +) + // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} @@ -21,6 +28,9 @@ var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // TODO: this should be v1 probably var Unversioned = schema.GroupVersion{Group: "", Version: "v1"} +// WatchEventKind is name reserved for serializing watch events. +const WatchEventKind = "WatchEvent" + // Kind takes an unqualified kind and returns a Group qualified GroupKind func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() @@ -32,6 +42,20 @@ var scheme = runtime.NewScheme() // ParameterCodec knows about query parameters used with the meta v1 API spec. var ParameterCodec = runtime.NewParameterCodec(scheme) +var optionsTypes = []runtime.Object{} + +// AddToGroupVersion registers common meta types into schemas. +func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) { + // Supports legacy code paths, most callers should use metav1.ParameterCodec for now + scheme.AddKnownTypes(groupVersion, optionsTypes...) + // Register Unversioned types under their own special group + scheme.AddUnversionedTypes(Unversioned) + + // register manually. This usually goes through the SchemeBuilder, which we cannot use here. + utilruntime.Must(RegisterConversions(scheme)) + utilruntime.Must(RegisterDefaults(scheme)) +} + // AddMetaToScheme registers base meta types into schemas. func AddMetaToScheme(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, @@ -43,8 +67,10 @@ func AddMetaToScheme(scheme *runtime.Scheme) error { } func init() { - scheme.AddUnversionedTypes(SchemeGroupVersion) + scheme.AddUnversionedTypes(SchemeGroupVersion, optionsTypes...) utilruntime.Must(AddMetaToScheme(scheme)) + // register manually. This usually goes through the SchemeBuilder, which we cannot use here. + utilruntime.Must(RegisterDefaults(scheme)) } diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/types.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/types.go index 728b0731286..d3dea84ccdf 100644 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/types.go +++ b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/types.go @@ -75,6 +75,18 @@ type ListMeta struct { RemainingItemCount *int64 `json:"remainingItemCount,omitempty" protobuf:"bytes,4,opt,name=remainingItemCount"` } +// Field path constants that are specific to the internal API +// representation. +const ( + ObjectNameField = "metadata.name" +) + +// These are internal finalizer values for Kubernetes-like APIs, must be qualified name unless defined here +const ( + FinalizerOrphanDependents = "orphan" + FinalizerDeleteDependents = "foregroundDeletion" +) + // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. type ObjectMeta struct { @@ -184,6 +196,8 @@ type ObjectMeta struct { // +optional // +patchMergeKey=uid // +patchStrategy=merge + // +listType=map + // +listMapKey=uid OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` } @@ -221,6 +235,25 @@ type OwnerReference struct { Controller *bool `json:"controller,omitempty" protobuf:"varint,6,opt,name=controller"` } +const ( + // FieldValidationIgnore ignores unknown/duplicate fields + FieldValidationIgnore = "Ignore" + // FieldValidationWarn responds with a warning, but successfully serve the request + FieldValidationWarn = "Warn" + // FieldValidationStrict fails the request on unknown/duplicate fields + FieldValidationStrict = "Strict" +) + +// TODO: remove me when watch is refactored +func LabelSelectorQueryParam(version string) string { + return "labelSelector" +} + +// TODO: remove me when watch is refactored +func FieldSelectorQueryParam(version string) string { + return "fieldSelector" +} + // Note: // There are two different styles of label selectors used in versioned types: // an older style which is represented as just a string in versioned types, and a @@ -240,6 +273,7 @@ type LabelSelector struct { MatchLabels map[string]MatchLabelsValue `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` // matchExpressions is a list of label selector requirements. The requirements are ANDed. // +kubebuilder:validation:Optional + // +listType=atomic MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` } @@ -263,8 +297,8 @@ type LabelSelectorRequirement struct { // the values array must be non-empty. If the operator is Exists or DoesNotExist, // the values array must be empty. This array is replaced during a strategic // merge patch. - // // +kubebuilder:validation:Optional + // +listType=atomic Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` } diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/validation/validation.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/validation/validation.go deleted file mode 100644 index 07857fefafc..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/validation/validation.go +++ /dev/null @@ -1,81 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2015 The Kubernetes Authors. - -package validation - -import ( - "k8s.io/apimachinery/pkg/util/validation" - "k8s.io/apimachinery/pkg/util/validation/field" - - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// LabelSelectorValidationOptions is a struct that can be passed to ValidateLabelSelector to record the validate options -type LabelSelectorValidationOptions struct { - // Allow invalid label value in selector - AllowInvalidLabelValueInSelector bool -} - -// ValidateLabelSelector validate the LabelSelector according to the opts and returns any validation errors. -// opts.AllowInvalidLabelValueInSelector is only expected to be set to true when required for backwards compatibility with existing invalid data. -func ValidateLabelSelector(ps *slim_metav1.LabelSelector, opts LabelSelectorValidationOptions, 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, opts, fldPath.Child("matchExpressions").Index(i))...) - } - return allErrs -} - -// ValidateLabelSelectorRequirement validate the requirement according to the opts and returns any validation errors. -// opts.AllowInvalidLabelValueInSelector is only expected to be set to true when required for backwards compatibility with existing invalid data. -func ValidateLabelSelectorRequirement(sr slim_metav1.LabelSelectorRequirement, opts LabelSelectorValidationOptions, fldPath *field.Path) field.ErrorList { - allErrs := field.ErrorList{} - switch sr.Operator { - case slim_metav1.LabelSelectorOpIn, slim_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 slim_metav1.LabelSelectorOpExists, slim_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"))...) - if !opts.AllowInvalidLabelValueInSelector { - for valueIndex, value := range sr.Values { - for _, msg := range validation.IsValidLabelValue(value) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("values").Index(valueIndex), value, msg)) - } - } - } - 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 -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.conversion.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.conversion.go new file mode 100644 index 00000000000..e475040a27b --- /dev/null +++ b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.conversion.go @@ -0,0 +1,23 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Cilium + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1 + +import ( + 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(s *runtime.Scheme) error { + return nil +} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.defaults.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.defaults.go new file mode 100644 index 00000000000..cd8143c7f9a --- /dev/null +++ b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/zz_generated.defaults.go @@ -0,0 +1,20 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Cilium + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +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/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/doc.go deleted file mode 100644 index b55d23db59c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/doc.go +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2017 The Kubernetes Authors. - -// +k8s:deepcopy-gen=package -// +k8s:openapi-gen=true -// +k8s:defaulter-gen=TypeMeta - -// +groupName=meta - -package v1beta1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/generated.pb.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/generated.pb.go deleted file mode 100644 index b419723c871..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/generated.pb.go +++ /dev/null @@ -1,401 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/generated.proto - -package v1beta1 - -import ( - fmt "fmt" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - - io "io" - - proto "github.com/gogo/protobuf/proto" - - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } -func (*PartialObjectMetadataList) ProtoMessage() {} -func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) { - return fileDescriptor_1a84ae209524fd15, []int{0} -} -func (m *PartialObjectMetadataList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PartialObjectMetadataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PartialObjectMetadataList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PartialObjectMetadataList.Merge(m, src) -} -func (m *PartialObjectMetadataList) XXX_Size() int { - return m.Size() -} -func (m *PartialObjectMetadataList) XXX_DiscardUnknown() { - xxx_messageInfo_PartialObjectMetadataList.DiscardUnknown(m) -} - -var xxx_messageInfo_PartialObjectMetadataList proto.InternalMessageInfo - -func init() { - proto.RegisterType((*PartialObjectMetadataList)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1beta1.PartialObjectMetadataList") -} - -func init() { - proto.RegisterFile("github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/generated.proto", fileDescriptor_1a84ae209524fd15) -} - -var fileDescriptor_1a84ae209524fd15 = []byte{ - // 322 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x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0xbf, 0x88, 0x7f, 0xf6, 0x00, 0x39, 0x4a, 0x98, 0xdd, 0x07, 0xcf, 0x22, 0xc4, - 0x91, 0x40, 0x98, 0x00, 0xc2, 0x9d, 0xd4, 0x58, 0x4f, 0xfc, 0xaa, 0x2a, 0xe7, 0xc6, 0x51, 0x9b, - 0x74, 0x6a, 0xbd, 0x2b, 0x76, 0xd8, 0xe3, 0x30, 0xcb, 0xb3, 0xec, 0xe1, 0xe9, 0x7c, 0xd5, 0xf2, - 0xcc, 0xaa, 0x55, 0xdd, 0x6e, 0xc6, 0x3b, 0x47, 0x3d, 0xf7, 0x2b, 0x12, 0x85, 0xd2, 0x0d, 0xd2, - 0x3e, 0xee, 0xd4, 0x7a, 0xa3, 0x43, 0x65, 0x7f, 0xde, 0x68, 0x78, 0x52, 0x9a, 0x2b, 0x37, 0xd6, - 0x31, 0xde, 0xa8, 0x86, 0x30, 0x5f, 0x53, 0x6f, 0xb1, 0xa6, 0xde, 0x72, 0x4d, 0xbd, 0x37, 0x43, - 0xc9, 0xdc, 0x50, 0xb2, 0x30, 0x94, 0x2c, 0x0d, 0x25, 0x1f, 0x86, 0x92, 0xf7, 0x4f, 0xea, 0x3d, - 0x0e, 0xfe, 0xf1, 0xc1, 0xbe, 0x03, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xe4, 0x91, 0x70, 0x9e, 0x02, - 0x00, 0x00, -} - -func (m *PartialObjectMetadataList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PartialObjectMetadataList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PartialObjectMetadataList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *PartialObjectMetadataList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *PartialObjectMetadataList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]PartialObjectMetadata{" - for _, f := range this.Items { - repeatedStringForItems += fmt.Sprintf("%v", f) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&PartialObjectMetadataList{`, - `Items:` + repeatedStringForItems + `,`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 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 *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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, v1.PartialObjectMetadata{}) - if err := m.Items[len(m.Items)-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 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.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) || (iNdEx+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 - depth := 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 - } - } - case 1: - iNdEx += 8 - 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 - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/generated.proto b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/generated.proto deleted file mode 100644 index be61fe3a0a5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/generated.proto +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1beta1; - -import "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1"; - -// PartialObjectMetadataList contains a list of objects containing only their metadata. -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -message PartialObjectMetadataList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - optional github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.ListMeta metadata = 2; - - // items contains each of the included items. - repeated github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.meta.v1.PartialObjectMetadata items = 1; -} - diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/register.go deleted file mode 100644 index 5d62e06556d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/register.go +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2017 The Kubernetes Authors. - -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() -} - -// AddMetaToScheme registers base meta types into schemas. -func AddMetaToScheme(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &PartialObjectMetadata{}, - &PartialObjectMetadataList{}, - ) - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/types.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/types.go deleted file mode 100644 index aa1a77b82f2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/types.go +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2017 The Kubernetes Authors. - -// package v1beta1 is alpha objects from meta that will be introduced. -package v1beta1 - -import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// 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 = v1.PartialObjectMetadata - -// IMPORTANT: PartialObjectMetadataList has different protobuf field ids in v1beta1 than -// v1 because ListMeta was accidentally omitted prior to 1.15. Therefore this type must -// remain independent of v1.PartialObjectMetadataList to preserve mappings. - -// 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"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,2,opt,name=metadata"` - - // items contains each of the included items. - Items []v1.PartialObjectMetadata `json:"items" protobuf:"bytes,1,rep,name=items"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index d3b949f0dd5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,47 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/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 *PartialObjectMetadataList) DeepCopyInto(out *PartialObjectMetadataList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1.PartialObjectMetadata, len(*in)) - for i := range *in { - (*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 - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/doc.go deleted file mode 100644 index 3955e271b0e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +deepequal-gen=package - -// Package types contains slimmer versions of k8s types. -// +groupName=util -package intstr diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/generated.pb.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/generated.pb.go deleted file mode 100644 index 376a6c0f872..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/generated.pb.go +++ /dev/null @@ -1,356 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/generated.proto - -package intstr - -import ( - fmt "fmt" - - io "io" - math "math" - math_bits "math/bits" - - proto "github.com/gogo/protobuf/proto" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *IntOrString) Reset() { *m = IntOrString{} } -func (*IntOrString) ProtoMessage() {} -func (*IntOrString) Descriptor() ([]byte, []int) { - return fileDescriptor_8984be45904ea297, []int{0} -} -func (m *IntOrString) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IntOrString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IntOrString) XXX_Merge(src proto.Message) { - xxx_messageInfo_IntOrString.Merge(m, src) -} -func (m *IntOrString) XXX_Size() int { - return m.Size() -} -func (m *IntOrString) XXX_DiscardUnknown() { - xxx_messageInfo_IntOrString.DiscardUnknown(m) -} - -var xxx_messageInfo_IntOrString proto.InternalMessageInfo - -func init() { - proto.RegisterType((*IntOrString)(nil), "github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.util.intstr.IntOrString") -} - -func init() { - proto.RegisterFile("github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/generated.proto", fileDescriptor_8984be45904ea297) -} - -var fileDescriptor_8984be45904ea297 = []byte{ - // 293 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0x4a, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcc, 0xc9, 0x2c, 0x85, 0x53, 0x05, 0xd9, - 0xe9, 0xfa, 0xd9, 0x16, 0xc5, 0xfa, 0xc5, 0x39, 0x99, 0xb9, 0x60, 0x46, 0x62, 0x41, 0x66, 0xb1, - 0x7e, 0x69, 0x49, 0x66, 0x8e, 0x7e, 0x66, 0x5e, 0x49, 0x71, 0x49, 0x91, 0x7e, 0x7a, 0x6a, 0x5e, - 0x6a, 0x51, 0x62, 0x49, 0x6a, 0x8a, 0x5e, 0x41, 0x51, 0x7e, 0x49, 0xbe, 0x90, 0x15, 0xc2, 0x2c, - 0x3d, 0x88, 0x21, 0x30, 0xaa, 0x20, 0x3b, 0x5d, 0x2f, 0xdb, 0xa2, 0x58, 0x0f, 0x64, 0x16, 0x98, - 0x01, 0x32, 0x4b, 0x0f, 0x64, 0x96, 0x1e, 0xc4, 0x2c, 0x29, 0x5d, 0x24, 0x77, 0xa4, 0xe7, 0xa7, - 0xe7, 0xeb, 0x83, 0x8d, 0x4c, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0x95, 0xd2, - 0x44, 0x46, 0x2e, 0x6e, 0xcf, 0xbc, 0x12, 0xff, 0xa2, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x21, - 0x0d, 0x2e, 0x96, 0x92, 0xca, 0x82, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x66, 0x27, 0x91, 0x13, - 0xf7, 0xe4, 0x19, 0x1e, 0xdd, 0x93, 0x67, 0x09, 0xa9, 0x2c, 0x48, 0xfd, 0x05, 0xa5, 0x83, 0xc0, - 0x2a, 0x84, 0xd4, 0xb8, 0xd8, 0x32, 0xf3, 0x4a, 0xc2, 0x12, 0x73, 0x24, 0x98, 0x14, 0x18, 0x35, - 0x58, 0x9d, 0xf8, 0xa0, 0x6a, 0xd9, 0x3c, 0xc1, 0xa2, 0x41, 0x50, 0x59, 0x90, 0xba, 0xe2, 0x92, - 0x22, 0x90, 0x3a, 0x66, 0x05, 0x46, 0x0d, 0x4e, 0x84, 0xba, 0x60, 0xb0, 0x68, 0x10, 0x54, 0xd6, - 0x8a, 0x63, 0xc6, 0x02, 0x79, 0x86, 0x86, 0x3b, 0x0a, 0x0c, 0x4e, 0x09, 0x27, 0x1e, 0xca, 0x31, - 0x5c, 0x78, 0x28, 0xc7, 0x70, 0xe3, 0xa1, 0x1c, 0x43, 0xc3, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, - 0x18, 0x2f, 0x3c, 0x92, 0x63, 0xbc, 0xf1, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, - 0xe5, 0x18, 0xa2, 0xac, 0xc8, 0x0f, 0x70, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0x17, 0x78, - 0x08, 0xad, 0x01, 0x00, 0x00, -} - -func (m *IntOrString) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IntOrString) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IntOrString) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.StrVal) - copy(dAtA[i:], m.StrVal) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.StrVal))) - i-- - dAtA[i] = 0x1a - i = encodeVarintGenerated(dAtA, i, uint64(m.IntVal)) - i-- - dAtA[i] = 0x10 - i = encodeVarintGenerated(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *IntOrString) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovGenerated(uint64(m.Type)) - n += 1 + sovGenerated(uint64(m.IntVal)) - l = len(m.StrVal) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *IntOrString) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IntOrString: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IntOrString: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= Type(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IntVal", wireType) - } - m.IntVal = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IntVal |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrVal", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StrVal = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+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 - depth := 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 - } - } - case 1: - iNdEx += 8 - 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 - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/generated.proto b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/generated.proto deleted file mode 100644 index 2d929fd1854..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/generated.proto +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.cilium.cilium.pkg.k8s.slim.k8s.apis.util.intstr; - -// Package-wide variables from generator "generated". -option go_package = "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr"; - -// IntOrString is a type that can hold an int32 or a string. When used in -// JSON or YAML marshalling and unmarshalling, it produces or consumes the -// inner type. This allows you to have, for example, a JSON field that can -// accept a name or number. -// TODO: Rename to Int32OrString -// -// +protobuf=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -// +k8s:openapi-gen=true -message IntOrString { - optional int64 type = 1; - - optional int32 intVal = 2; - - optional string strVal = 3; -} - diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/intstr.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/intstr.go deleted file mode 100644 index 2f76aa37776..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/intstr.go +++ /dev/null @@ -1,221 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright 2014 The Kubernetes Authors. - -package intstr - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "runtime/debug" - "strconv" - "strings" - - "k8s.io/klog/v2" -) - -// IntOrString is a type that can hold an int32 or a string. When used in -// JSON or YAML marshalling and unmarshalling, it produces or consumes the -// inner type. This allows you to have, for example, a JSON field that can -// accept a name or number. -// TODO: Rename to Int32OrString -// -// +protobuf=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -// +k8s:openapi-gen=true -type IntOrString struct { - Type Type `protobuf:"varint,1,opt,name=type,casttype=Type"` - IntVal int32 `protobuf:"varint,2,opt,name=intVal"` - StrVal string `protobuf:"bytes,3,opt,name=strVal"` -} - -// Type represents the stored type of IntOrString. -type Type int64 - -const ( - Int Type = iota // The IntOrString holds an int. - String // The IntOrString holds a string. -) - -// FromInt creates an IntOrString object with an int32 value. It is -// your responsibility not to call this method with a value greater -// than int32. -// Deprecated: use FromInt32 instead. -func FromInt(val int) IntOrString { - if val > math.MaxInt32 || val < math.MinInt32 { - klog.Errorf("value: %d overflows int32\n%s\n", val, debug.Stack()) - } - return IntOrString{Type: Int, IntVal: int32(val)} -} - -// FromInt32 creates an IntOrString object with an int32 value. -func FromInt32(val int32) IntOrString { - return IntOrString{Type: Int, IntVal: val} -} - -// FromString creates an IntOrString object with a string value. -func FromString(val string) IntOrString { - return IntOrString{Type: String, StrVal: val} -} - -// Parse the given string and try to convert it to an int32 integer before -// setting it as a string value. -func Parse(val string) IntOrString { - i, err := strconv.ParseInt(val, 10, 32) - if err != nil { - return FromString(val) - } - return FromInt32(int32(i)) -} - -// UnmarshalJSON implements the json.Unmarshaller interface. -func (intstr *IntOrString) UnmarshalJSON(value []byte) error { - if value[0] == '"' { - intstr.Type = String - return json.Unmarshal(value, &intstr.StrVal) - } - intstr.Type = Int - return json.Unmarshal(value, &intstr.IntVal) -} - -// String returns the string value, or the Itoa of the int value. -func (intstr *IntOrString) String() string { - if intstr == nil { - return "" - } - if intstr.Type == String { - return intstr.StrVal - } - return strconv.Itoa(intstr.IntValue()) -} - -// IntValue returns the IntVal if type Int, or if -// it is a String, will attempt a conversion to int, -// returning 0 if a parsing error occurs. -func (intstr *IntOrString) IntValue() int { - if intstr.Type == String { - i, _ := strconv.Atoi(intstr.StrVal) - return i - } - return int(intstr.IntVal) -} - -// MarshalJSON implements the json.Marshaller interface. -func (intstr IntOrString) MarshalJSON() ([]byte, error) { - switch intstr.Type { - case Int: - return json.Marshal(intstr.IntVal) - case String: - return json.Marshal(intstr.StrVal) - default: - return []byte{}, fmt.Errorf("impossible IntOrString.Type") - } -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (IntOrString) OpenAPISchemaType() []string { return []string{"string"} } - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (IntOrString) OpenAPISchemaFormat() string { return "int-or-string" } - -// OpenAPIV3OneOfTypes is used by the kube-openapi generator when constructing -// the OpenAPI v3 spec of this type. -func (IntOrString) OpenAPIV3OneOfTypes() []string { return []string{"integer", "string"} } - -func ValueOrDefault(intOrPercent *IntOrString, defaultValue IntOrString) *IntOrString { - if intOrPercent == nil { - return &defaultValue - } - return intOrPercent -} - -// GetScaledValueFromIntOrPercent is meant to replace GetValueFromIntOrPercent. -// This method returns a scaled value from an IntOrString type. If the IntOrString -// is a percentage string value it's treated as a percentage and scaled appropriately -// in accordance to the total, if it's an int value it's treated as a simple value and -// if it is a string value which is either non-numeric or numeric but lacking a trailing '%' it returns an error. -func GetScaledValueFromIntOrPercent(intOrPercent *IntOrString, total int, roundUp bool) (int, error) { - if intOrPercent == nil { - return 0, errors.New("nil value for IntOrString") - } - value, isPercent, err := getIntOrPercentValueSafely(intOrPercent) - if err != nil { - return 0, fmt.Errorf("invalid value for IntOrString: %w", err) - } - if isPercent { - if roundUp { - value = int(math.Ceil(float64(value) * (float64(total)) / 100)) - } else { - value = int(math.Floor(float64(value) * (float64(total)) / 100)) - } - } - return value, nil -} - -// GetValueFromIntOrPercent was deprecated in favor of -// GetScaledValueFromIntOrPercent. This method was treating all int as a numeric value and all -// strings with or without a percent symbol as a percentage value. -// Deprecated -func GetValueFromIntOrPercent(intOrPercent *IntOrString, total int, roundUp bool) (int, error) { - if intOrPercent == nil { - return 0, errors.New("nil value for IntOrString") - } - value, isPercent, err := getIntOrPercentValue(intOrPercent) - if err != nil { - return 0, fmt.Errorf("invalid value for IntOrString: %w", err) - } - if isPercent { - if roundUp { - value = int(math.Ceil(float64(value) * (float64(total)) / 100)) - } else { - value = int(math.Floor(float64(value) * (float64(total)) / 100)) - } - } - return value, nil -} - -// getIntOrPercentValue is a legacy function and only meant to be called by GetValueFromIntOrPercent -// For a more correct implementation call getIntOrPercentSafely -func getIntOrPercentValue(intOrStr *IntOrString) (int, bool, error) { - switch intOrStr.Type { - case Int: - return intOrStr.IntValue(), false, nil - case String: - s := strings.Replace(intOrStr.StrVal, "%", "", -1) - v, err := strconv.Atoi(s) - if err != nil { - return 0, false, fmt.Errorf("invalid value %q: %w", intOrStr.StrVal, err) - } - return int(v), true, nil - } - return 0, false, fmt.Errorf("invalid type: neither int nor percentage") -} - -func getIntOrPercentValueSafely(intOrStr *IntOrString) (int, bool, error) { - switch intOrStr.Type { - case Int: - return intOrStr.IntValue(), false, nil - case String: - isPercent := false - s := intOrStr.StrVal - if strings.HasSuffix(s, "%") { - isPercent = true - s = strings.TrimSuffix(intOrStr.StrVal, "%") - } else { - return 0, false, fmt.Errorf("invalid type: string is not a percentage") - } - v, err := strconv.Atoi(s) - if err != nil { - return 0, false, fmt.Errorf("invalid value %q: %w", intOrStr.StrVal, err) - } - return int(v), isPercent, nil - } - return 0, false, fmt.Errorf("invalid type: neither int nor percentage") -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/zz_generated.deepequal.go deleted file mode 100644 index c9cb4ad5839..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr/zz_generated.deepequal.go +++ /dev/null @@ -1,29 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package intstr - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IntOrString) DeepEqual(other *IntOrString) bool { - if other == nil { - return false - } - - if in.Type != other.Type { - return false - } - if in.IntVal != other.IntVal { - return false - } - if in.StrVal != other.StrVal { - return false - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/clientset.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/clientset.go deleted file mode 100644 index 516fa061d28..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/clientset.go +++ /dev/null @@ -1,146 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - "net/http" - - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1" - discoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1" - discoveryv1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1" - networkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - CoreV1() corev1.CoreV1Interface - DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface - DiscoveryV1() discoveryv1.DiscoveryV1Interface - NetworkingV1() networkingv1.NetworkingV1Interface -} - -// Clientset contains the clients for groups. -type Clientset struct { - *discovery.DiscoveryClient - coreV1 *corev1.CoreV1Client - discoveryV1beta1 *discoveryv1beta1.DiscoveryV1beta1Client - discoveryV1 *discoveryv1.DiscoveryV1Client - networkingV1 *networkingv1.NetworkingV1Client -} - -// CoreV1 retrieves the CoreV1Client -func (c *Clientset) CoreV1() corev1.CoreV1Interface { - return c.coreV1 -} - -// DiscoveryV1beta1 retrieves the DiscoveryV1beta1Client -func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { - return c.discoveryV1beta1 -} - -// DiscoveryV1 retrieves the DiscoveryV1Client -func (c *Clientset) DiscoveryV1() discoveryv1.DiscoveryV1Interface { - return c.discoveryV1 -} - -// NetworkingV1 retrieves the NetworkingV1Client -func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface { - return c.networkingV1 -} - -// 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. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - - // share the transport between all clients - httpClient, err := rest.HTTPClientFor(&configShallowCopy) - if err != nil { - return nil, err - } - - return NewForConfigAndClient(&configShallowCopy, httpClient) -} - -// NewForConfigAndClient creates a new Clientset for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - - var cs Clientset - var err error - cs.coreV1, err = corev1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - cs.discoveryV1beta1, err = discoveryv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - cs.discoveryV1, err = discoveryv1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - cs.networkingV1, err = networkingv1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - 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 { - cs, err := NewForConfig(c) - if err != nil { - panic(err) - } - return cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.coreV1 = corev1.New(c) - cs.discoveryV1beta1 = discoveryv1beta1.New(c) - cs.discoveryV1 = discoveryv1.New(c) - cs.networkingV1 = networkingv1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/clientset_generated.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index 03fbe929fa4..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,93 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned" - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1" - fakecorev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake" - discoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1" - fakediscoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake" - discoveryv1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1" - fakediscoveryv1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake" - networkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1" - fakenetworkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var ( - _ clientset.Interface = &Clientset{} - _ testing.FakeClient = &Clientset{} -) - -// CoreV1 retrieves the CoreV1Client -func (c *Clientset) CoreV1() corev1.CoreV1Interface { - return &fakecorev1.FakeCoreV1{Fake: &c.Fake} -} - -// DiscoveryV1beta1 retrieves the DiscoveryV1beta1Client -func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { - return &fakediscoveryv1beta1.FakeDiscoveryV1beta1{Fake: &c.Fake} -} - -// DiscoveryV1 retrieves the DiscoveryV1Client -func (c *Clientset) DiscoveryV1() discoveryv1.DiscoveryV1Interface { - return &fakediscoveryv1.FakeDiscoveryV1{Fake: &c.Fake} -} - -// NetworkingV1 retrieves the NetworkingV1Client -func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface { - return &fakenetworkingv1.FakeNetworkingV1{Fake: &c.Fake} -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/doc.go deleted file mode 100644 index 1da8cc9d5bb..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/register.go deleted file mode 100644 index 8053061f478..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake/register.go +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - discoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" - discoveryv1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" - networkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" - 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" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - corev1.AddToScheme, - discoveryv1beta1.AddToScheme, - discoveryv1.AddToScheme, - networkingv1.AddToScheme, -} - -// 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. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme/doc.go deleted file mode 100644 index ba34515351f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme/register.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme/register.go deleted file mode 100644 index dd5b051f722..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - discoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" - discoveryv1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" - networkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" - 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" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - corev1.AddToScheme, - discoveryv1beta1.AddToScheme, - discoveryv1.AddToScheme, - networkingv1.AddToScheme, -} - -// 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. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/core_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/core_client.go deleted file mode 100644 index 25eab19580c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/core_client.go +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "net/http" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type CoreV1Interface interface { - RESTClient() rest.Interface - EndpointsGetter - NamespacesGetter - NodesGetter - PodsGetter - SecretsGetter - ServicesGetter -} - -// CoreV1Client is used to interact with features provided by the group. -type CoreV1Client struct { - restClient rest.Interface -} - -func (c *CoreV1Client) Endpoints(namespace string) EndpointsInterface { - return newEndpoints(c, namespace) -} - -func (c *CoreV1Client) Namespaces() NamespaceInterface { - return newNamespaces(c) -} - -func (c *CoreV1Client) Nodes() NodeInterface { - return newNodes(c) -} - -func (c *CoreV1Client) Pods(namespace string) PodInterface { - return newPods(c, namespace) -} - -func (c *CoreV1Client) Secrets(namespace string) SecretInterface { - return newSecrets(c, namespace) -} - -func (c *CoreV1Client) Services(namespace string) ServiceInterface { - return newServices(c, namespace) -} - -// NewForConfig creates a new CoreV1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*CoreV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new CoreV1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CoreV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - 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 = scheme.Codecs.WithoutConversion() - - 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/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/doc.go deleted file mode 100644 index 50cfbd485a5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/endpoints.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/endpoints.go deleted file mode 100644 index 9f363250eb8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/endpoints.go +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - 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(ctx context.Context, endpoints *v1.Endpoints, opts metav1.CreateOptions) (*v1.Endpoints, error) - Update(ctx context.Context, endpoints *v1.Endpoints, opts metav1.UpdateOptions) (*v1.Endpoints, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Endpoints, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.EndpointsList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, 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(ctx context.Context, name string, options metav1.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(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *endpoints) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EndpointsList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.EndpointsList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("endpoints"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested endpoints. -func (c *endpoints) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("endpoints"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// 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(ctx context.Context, endpoints *v1.Endpoints, opts metav1.CreateOptions) (result *v1.Endpoints, err error) { - result = &v1.Endpoints{} - err = c.client.Post(). - Namespace(c.ns). - Resource("endpoints"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(endpoints). - Do(ctx). - 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(ctx context.Context, endpoints *v1.Endpoints, opts metav1.UpdateOptions) (result *v1.Endpoints, err error) { - result = &v1.Endpoints{} - err = c.client.Put(). - Namespace(c.ns). - Resource("endpoints"). - Name(endpoints.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(endpoints). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the endpoints and deletes it. Returns an error if one occurs. -func (c *endpoints) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("endpoints"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *endpoints) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("endpoints"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched endpoints. -func (c *endpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Endpoints, err error) { - result = &v1.Endpoints{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("endpoints"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/doc.go deleted file mode 100644 index 57bd090efb0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_core_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_core_client.go deleted file mode 100644 index 60176f481b6..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_core_client.go +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeCoreV1 struct { - *testing.Fake -} - -func (c *FakeCoreV1) Endpoints(namespace string) v1.EndpointsInterface { - return &FakeEndpoints{c, namespace} -} - -func (c *FakeCoreV1) Namespaces() v1.NamespaceInterface { - return &FakeNamespaces{c} -} - -func (c *FakeCoreV1) Nodes() v1.NodeInterface { - return &FakeNodes{c} -} - -func (c *FakeCoreV1) Pods(namespace string) v1.PodInterface { - return &FakePods{c, namespace} -} - -func (c *FakeCoreV1) Secrets(namespace string) v1.SecretInterface { - return &FakeSecrets{c, namespace} -} - -func (c *FakeCoreV1) Services(namespace string) v1.ServiceInterface { - return &FakeServices{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeCoreV1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_endpoints.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_endpoints.go deleted file mode 100644 index 9029e198c0d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_endpoints.go +++ /dev/null @@ -1,116 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeEndpoints implements EndpointsInterface -type FakeEndpoints struct { - Fake *FakeCoreV1 - ns string -} - -var endpointsResource = v1.SchemeGroupVersion.WithResource("endpoints") - -var endpointsKind = v1.SchemeGroupVersion.WithKind("Endpoints") - -// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any. -func (c *FakeEndpoints) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Endpoints, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(endpointsResource, c.ns, name), &v1.Endpoints{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Endpoints), err -} - -// List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *FakeEndpoints) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EndpointsList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(endpointsResource, endpointsKind, c.ns, opts), &v1.EndpointsList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.EndpointsList{ListMeta: obj.(*v1.EndpointsList).ListMeta} - for _, item := range obj.(*v1.EndpointsList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested endpoints. -func (c *FakeEndpoints) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(endpointsResource, c.ns, opts)) - -} - -// 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 *FakeEndpoints) Create(ctx context.Context, endpoints *v1.Endpoints, opts metav1.CreateOptions) (result *v1.Endpoints, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(endpointsResource, c.ns, endpoints), &v1.Endpoints{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Endpoints), err -} - -// 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 *FakeEndpoints) Update(ctx context.Context, endpoints *v1.Endpoints, opts metav1.UpdateOptions) (result *v1.Endpoints, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(endpointsResource, c.ns, endpoints), &v1.Endpoints{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Endpoints), err -} - -// Delete takes name of the endpoints and deletes it. Returns an error if one occurs. -func (c *FakeEndpoints) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(endpointsResource, c.ns, name, opts), &v1.Endpoints{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeEndpoints) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1.EndpointsList{}) - return err -} - -// Patch applies the patch and returns the patched endpoints. -func (c *FakeEndpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Endpoints, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, pt, data, subresources...), &v1.Endpoints{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Endpoints), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_namespace.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_namespace.go deleted file mode 100644 index 81154658357..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_namespace.go +++ /dev/null @@ -1,100 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeNamespaces implements NamespaceInterface -type FakeNamespaces struct { - Fake *FakeCoreV1 -} - -var namespacesResource = v1.SchemeGroupVersion.WithResource("namespaces") - -var namespacesKind = v1.SchemeGroupVersion.WithKind("Namespace") - -// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any. -func (c *FakeNamespaces) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Namespace, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(namespacesResource, name), &v1.Namespace{}) - if obj == nil { - return nil, err - } - return obj.(*v1.Namespace), err -} - -// List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *FakeNamespaces) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NamespaceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(namespacesResource, namespacesKind, opts), &v1.NamespaceList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.NamespaceList{ListMeta: obj.(*v1.NamespaceList).ListMeta} - for _, item := range obj.(*v1.NamespaceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested namespaces. -func (c *FakeNamespaces) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(namespacesResource, opts)) -} - -// 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 *FakeNamespaces) Create(ctx context.Context, namespace *v1.Namespace, opts metav1.CreateOptions) (result *v1.Namespace, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(namespacesResource, namespace), &v1.Namespace{}) - if obj == nil { - return nil, err - } - return obj.(*v1.Namespace), err -} - -// 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 *FakeNamespaces) Update(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (result *v1.Namespace, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &v1.Namespace{}) - if obj == nil { - return nil, err - } - return obj.(*v1.Namespace), err -} - -// Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *FakeNamespaces) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(namespacesResource, name, opts), &v1.Namespace{}) - return err -} - -// Patch applies the patch and returns the patched namespace. -func (c *FakeNamespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Namespace, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, pt, data, subresources...), &v1.Namespace{}) - if obj == nil { - return nil, err - } - return obj.(*v1.Namespace), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_node.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_node.go deleted file mode 100644 index 316a9084268..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_node.go +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeNodes implements NodeInterface -type FakeNodes struct { - Fake *FakeCoreV1 -} - -var nodesResource = v1.SchemeGroupVersion.WithResource("nodes") - -var nodesKind = v1.SchemeGroupVersion.WithKind("Node") - -// Get takes name of the node, and returns the corresponding node object, and an error if there is any. -func (c *FakeNodes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Node, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(nodesResource, name), &v1.Node{}) - if obj == nil { - return nil, err - } - return obj.(*v1.Node), err -} - -// List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *FakeNodes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NodeList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(nodesResource, nodesKind, opts), &v1.NodeList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.NodeList{ListMeta: obj.(*v1.NodeList).ListMeta} - for _, item := range obj.(*v1.NodeList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested nodes. -func (c *FakeNodes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(nodesResource, opts)) -} - -// 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 *FakeNodes) Create(ctx context.Context, node *v1.Node, opts metav1.CreateOptions) (result *v1.Node, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(nodesResource, node), &v1.Node{}) - if obj == nil { - return nil, err - } - return obj.(*v1.Node), err -} - -// 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 *FakeNodes) Update(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (result *v1.Node, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(nodesResource, node), &v1.Node{}) - if obj == nil { - return nil, err - } - return obj.(*v1.Node), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNodes) UpdateStatus(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (*v1.Node, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(nodesResource, "status", node), &v1.Node{}) - if obj == nil { - return nil, err - } - return obj.(*v1.Node), err -} - -// Delete takes name of the node and deletes it. Returns an error if one occurs. -func (c *FakeNodes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(nodesResource, name, opts), &v1.Node{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeNodes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(nodesResource, listOpts) - - _, err := c.Fake.Invokes(action, &v1.NodeList{}) - return err -} - -// Patch applies the patch and returns the patched node. -func (c *FakeNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Node, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, pt, data, subresources...), &v1.Node{}) - if obj == nil { - return nil, err - } - return obj.(*v1.Node), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_pod.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_pod.go deleted file mode 100644 index dca3fe6f00a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_pod.go +++ /dev/null @@ -1,139 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakePods implements PodInterface -type FakePods struct { - Fake *FakeCoreV1 - ns string -} - -var podsResource = v1.SchemeGroupVersion.WithResource("pods") - -var podsKind = v1.SchemeGroupVersion.WithKind("Pod") - -// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any. -func (c *FakePods) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Pod, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(podsResource, c.ns, name), &v1.Pod{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Pod), err -} - -// List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *FakePods) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PodList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(podsResource, podsKind, c.ns, opts), &v1.PodList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.PodList{ListMeta: obj.(*v1.PodList).ListMeta} - for _, item := range obj.(*v1.PodList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested pods. -func (c *FakePods) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(podsResource, c.ns, opts)) - -} - -// 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 *FakePods) Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (result *v1.Pod, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(podsResource, c.ns, pod), &v1.Pod{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Pod), err -} - -// 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 *FakePods) Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(podsResource, c.ns, pod), &v1.Pod{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Pod), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePods) UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &v1.Pod{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Pod), err -} - -// Delete takes name of the pod and deletes it. Returns an error if one occurs. -func (c *FakePods) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(podsResource, c.ns, name, opts), &v1.Pod{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePods) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1.PodList{}) - return err -} - -// Patch applies the patch and returns the patched pod. -func (c *FakePods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, pt, data, subresources...), &v1.Pod{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Pod), err -} - -// UpdateEphemeralContainers 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 *FakePods) UpdateEphemeralContainers(ctx context.Context, podName string, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(podsResource, "ephemeralcontainers", c.ns, pod), &v1.Pod{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Pod), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_secret.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_secret.go deleted file mode 100644 index 964116565fe..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_secret.go +++ /dev/null @@ -1,116 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeSecrets implements SecretInterface -type FakeSecrets struct { - Fake *FakeCoreV1 - ns string -} - -var secretsResource = v1.SchemeGroupVersion.WithResource("secrets") - -var secretsKind = v1.SchemeGroupVersion.WithKind("Secret") - -// Get takes name of the secret, and returns the corresponding secret object, and an error if there is any. -func (c *FakeSecrets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Secret, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(secretsResource, c.ns, name), &v1.Secret{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Secret), err -} - -// List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *FakeSecrets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SecretList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(secretsResource, secretsKind, c.ns, opts), &v1.SecretList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.SecretList{ListMeta: obj.(*v1.SecretList).ListMeta} - for _, item := range obj.(*v1.SecretList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested secrets. -func (c *FakeSecrets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(secretsResource, c.ns, opts)) - -} - -// 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 *FakeSecrets) Create(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) (result *v1.Secret, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(secretsResource, c.ns, secret), &v1.Secret{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Secret), err -} - -// 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 *FakeSecrets) Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) (result *v1.Secret, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &v1.Secret{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Secret), err -} - -// Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *FakeSecrets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(secretsResource, c.ns, name, opts), &v1.Secret{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeSecrets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1.SecretList{}) - return err -} - -// Patch applies the patch and returns the patched secret. -func (c *FakeSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Secret, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, pt, data, subresources...), &v1.Secret{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Secret), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_service.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_service.go deleted file mode 100644 index a68cb606728..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_service.go +++ /dev/null @@ -1,120 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeServices implements ServiceInterface -type FakeServices struct { - Fake *FakeCoreV1 - ns string -} - -var servicesResource = v1.SchemeGroupVersion.WithResource("services") - -var servicesKind = v1.SchemeGroupVersion.WithKind("Service") - -// Get takes name of the service, and returns the corresponding service object, and an error if there is any. -func (c *FakeServices) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Service, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(servicesResource, c.ns, name), &v1.Service{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Service), err -} - -// List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *FakeServices) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(servicesResource, servicesKind, c.ns, opts), &v1.ServiceList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ServiceList{ListMeta: obj.(*v1.ServiceList).ListMeta} - for _, item := range obj.(*v1.ServiceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested services. -func (c *FakeServices) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(servicesResource, c.ns, opts)) - -} - -// 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 *FakeServices) Create(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (result *v1.Service, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(servicesResource, c.ns, service), &v1.Service{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Service), err -} - -// 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 *FakeServices) Update(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (result *v1.Service, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(servicesResource, c.ns, service), &v1.Service{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Service), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServices) UpdateStatus(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &v1.Service{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Service), err -} - -// Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *FakeServices) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(servicesResource, c.ns, name, opts), &v1.Service{}) - - return err -} - -// Patch applies the patch and returns the patched service. -func (c *FakeServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Service, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, pt, data, subresources...), &v1.Service{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.Service), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/generated_expansion.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/generated_expansion.go deleted file mode 100644 index 4245920bade..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/generated_expansion.go +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -type EndpointsExpansion interface{} - -type NamespaceExpansion interface{} - -type NodeExpansion interface{} - -type PodExpansion interface{} - -type SecretExpansion interface{} - -type ServiceExpansion interface{} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/namespace.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/namespace.go deleted file mode 100644 index 7fea2416da5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/namespace.go +++ /dev/null @@ -1,139 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - 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(ctx context.Context, namespace *v1.Namespace, opts metav1.CreateOptions) (*v1.Namespace, error) - Update(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Namespace, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.NamespaceList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, 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(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Namespace, err error) { - result = &v1.Namespace{} - err = c.client.Get(). - Resource("namespaces"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *namespaces) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NamespaceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.NamespaceList{} - err = c.client.Get(). - Resource("namespaces"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested namespaces. -func (c *namespaces) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("namespaces"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// 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(ctx context.Context, namespace *v1.Namespace, opts metav1.CreateOptions) (result *v1.Namespace, err error) { - result = &v1.Namespace{} - err = c.client.Post(). - Resource("namespaces"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(namespace). - Do(ctx). - 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(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (result *v1.Namespace, err error) { - result = &v1.Namespace{} - err = c.client.Put(). - Resource("namespaces"). - Name(namespace.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(namespace). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *namespaces) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("namespaces"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched namespace. -func (c *namespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Namespace, err error) { - result = &v1.Namespace{} - err = c.client.Patch(pt). - Resource("namespaces"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/node.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/node.go deleted file mode 100644 index 6d2e916cff5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/node.go +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - 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(ctx context.Context, node *v1.Node, opts metav1.CreateOptions) (*v1.Node, error) - Update(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (*v1.Node, error) - UpdateStatus(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (*v1.Node, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Node, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.NodeList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, 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(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Node, err error) { - result = &v1.Node{} - err = c.client.Get(). - Resource("nodes"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *nodes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NodeList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.NodeList{} - err = c.client.Get(). - Resource("nodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested nodes. -func (c *nodes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("nodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// 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(ctx context.Context, node *v1.Node, opts metav1.CreateOptions) (result *v1.Node, err error) { - result = &v1.Node{} - err = c.client.Post(). - Resource("nodes"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(node). - Do(ctx). - 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(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (result *v1.Node, err error) { - result = &v1.Node{} - err = c.client.Put(). - Resource("nodes"). - Name(node.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(node). - Do(ctx). - 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(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (result *v1.Node, err error) { - result = &v1.Node{} - err = c.client.Put(). - Resource("nodes"). - Name(node.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(node). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the node and deletes it. Returns an error if one occurs. -func (c *nodes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Resource("nodes"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *nodes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("nodes"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched node. -func (c *nodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Node, err error) { - result = &v1.Node{} - err = c.client.Patch(pt). - Resource("nodes"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/pod.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/pod.go deleted file mode 100644 index f46d4d7c3df..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/pod.go +++ /dev/null @@ -1,199 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - 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(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (*v1.Pod, error) - Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) - UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Pod, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.PodList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) - UpdateEphemeralContainers(ctx context.Context, podName string, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, 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(ctx context.Context, name string, options metav1.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(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *pods) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PodList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.PodList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested pods. -func (c *pods) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// 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(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (result *v1.Pod, err error) { - result = &v1.Pod{} - err = c.client.Post(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(pod). - Do(ctx). - 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(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { - result = &v1.Pod{} - err = c.client.Put(). - Namespace(c.ns). - Resource("pods"). - Name(pod.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(pod). - Do(ctx). - 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(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { - result = &v1.Pod{} - err = c.client.Put(). - Namespace(c.ns). - Resource("pods"). - Name(pod.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(pod). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the pod and deletes it. Returns an error if one occurs. -func (c *pods) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("pods"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *pods) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("pods"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched pod. -func (c *pods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) { - result = &v1.Pod{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("pods"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} - -// UpdateEphemeralContainers takes the top resource name and 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) UpdateEphemeralContainers(ctx context.Context, podName string, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { - result = &v1.Pod{} - err = c.client.Put(). - Namespace(c.ns). - Resource("pods"). - Name(podName). - SubResource("ephemeralcontainers"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(pod). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/secret.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/secret.go deleted file mode 100644 index ccbf30c1634..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/secret.go +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - 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(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) (*v1.Secret, error) - Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) (*v1.Secret, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Secret, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.SecretList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, 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(ctx context.Context, name string, options metav1.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(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *secrets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SecretList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.SecretList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("secrets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested secrets. -func (c *secrets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("secrets"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// 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(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) (result *v1.Secret, err error) { - result = &v1.Secret{} - err = c.client.Post(). - Namespace(c.ns). - Resource("secrets"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(secret). - Do(ctx). - 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(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) (result *v1.Secret, err error) { - result = &v1.Secret{} - err = c.client.Put(). - Namespace(c.ns). - Resource("secrets"). - Name(secret.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(secret). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *secrets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("secrets"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *secrets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("secrets"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched secret. -func (c *secrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Secret, err error) { - result = &v1.Secret{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("secrets"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/service.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/service.go deleted file mode 100644 index b981e197965..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/service.go +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - 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(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (*v1.Service, error) - Update(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) - UpdateStatus(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Service, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, 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(ctx context.Context, name string, options metav1.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(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.ServiceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("services"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("services"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// 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(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (result *v1.Service, err error) { - result = &v1.Service{} - err = c.client.Post(). - Namespace(c.ns). - Resource("services"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(service). - Do(ctx). - 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(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (result *v1.Service, err error) { - result = &v1.Service{} - err = c.client.Put(). - Namespace(c.ns). - Resource("services"). - Name(service.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(service). - Do(ctx). - 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(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (result *v1.Service, err error) { - result = &v1.Service{} - err = c.client.Put(). - Namespace(c.ns). - Resource("services"). - Name(service.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(service). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("services"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched service. -func (c *services) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Service, err error) { - result = &v1.Service{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("services"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/discovery_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/discovery_client.go deleted file mode 100644 index ca9ef1187ff..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/discovery_client.go +++ /dev/null @@ -1,94 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "net/http" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type DiscoveryV1Interface interface { - RESTClient() rest.Interface - EndpointSlicesGetter -} - -// DiscoveryV1Client is used to interact with features provided by the discovery.k8s.io group. -type DiscoveryV1Client struct { - restClient rest.Interface -} - -func (c *DiscoveryV1Client) EndpointSlices(namespace string) EndpointSliceInterface { - return newEndpointSlices(c, namespace) -} - -// NewForConfig creates a new DiscoveryV1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*DiscoveryV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new DiscoveryV1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*DiscoveryV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &DiscoveryV1Client{client}, nil -} - -// NewForConfigOrDie creates a new DiscoveryV1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *DiscoveryV1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new DiscoveryV1Client for the given RESTClient. -func New(c rest.Interface) *DiscoveryV1Client { - return &DiscoveryV1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - 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 *DiscoveryV1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/doc.go deleted file mode 100644 index 50cfbd485a5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/endpointslice.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/endpointslice.go deleted file mode 100644 index cfb4ab528ee..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/endpointslice.go +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" - scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// EndpointSlicesGetter has a method to return a EndpointSliceInterface. -// A group's client should implement this interface. -type EndpointSlicesGetter interface { - EndpointSlices(namespace string) EndpointSliceInterface -} - -// EndpointSliceInterface has methods to work with EndpointSlice resources. -type EndpointSliceInterface interface { - Create(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.CreateOptions) (*v1.EndpointSlice, error) - Update(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.UpdateOptions) (*v1.EndpointSlice, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.EndpointSlice, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.EndpointSliceList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.EndpointSlice, err error) - EndpointSliceExpansion -} - -// endpointSlices implements EndpointSliceInterface -type endpointSlices struct { - client rest.Interface - ns string -} - -// newEndpointSlices returns a EndpointSlices -func newEndpointSlices(c *DiscoveryV1Client, namespace string) *endpointSlices { - return &endpointSlices{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. -func (c *endpointSlices) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.EndpointSlice, err error) { - result = &v1.EndpointSlice{} - err = c.client.Get(). - Namespace(c.ns). - Resource("endpointslices"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. -func (c *endpointSlices) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EndpointSliceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.EndpointSliceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("endpointslices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested endpointSlices. -func (c *endpointSlices) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("endpointslices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.CreateOptions) (result *v1.EndpointSlice, err error) { - result = &v1.EndpointSlice{} - err = c.client.Post(). - Namespace(c.ns). - Resource("endpointslices"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(endpointSlice). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.UpdateOptions) (result *v1.EndpointSlice, err error) { - result = &v1.EndpointSlice{} - err = c.client.Put(). - Namespace(c.ns). - Resource("endpointslices"). - Name(endpointSlice.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(endpointSlice). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. -func (c *endpointSlices) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("endpointslices"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *endpointSlices) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("endpointslices"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched endpointSlice. -func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.EndpointSlice, err error) { - result = &v1.EndpointSlice{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("endpointslices"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/doc.go deleted file mode 100644 index 57bd090efb0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_discovery_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_discovery_client.go deleted file mode 100644 index 0cee06b9942..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_discovery_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeDiscoveryV1 struct { - *testing.Fake -} - -func (c *FakeDiscoveryV1) EndpointSlices(namespace string) v1.EndpointSliceInterface { - return &FakeEndpointSlices{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeDiscoveryV1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_endpointslice.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_endpointslice.go deleted file mode 100644 index d04fdcf47cf..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_endpointslice.go +++ /dev/null @@ -1,116 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeEndpointSlices implements EndpointSliceInterface -type FakeEndpointSlices struct { - Fake *FakeDiscoveryV1 - ns string -} - -var endpointslicesResource = v1.SchemeGroupVersion.WithResource("endpointslices") - -var endpointslicesKind = v1.SchemeGroupVersion.WithKind("EndpointSlice") - -// Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. -func (c *FakeEndpointSlices) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.EndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(endpointslicesResource, c.ns, name), &v1.EndpointSlice{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.EndpointSlice), err -} - -// List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. -func (c *FakeEndpointSlices) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EndpointSliceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(endpointslicesResource, endpointslicesKind, c.ns, opts), &v1.EndpointSliceList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.EndpointSliceList{ListMeta: obj.(*v1.EndpointSliceList).ListMeta} - for _, item := range obj.(*v1.EndpointSliceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested endpointSlices. -func (c *FakeEndpointSlices) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(endpointslicesResource, c.ns, opts)) - -} - -// Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.CreateOptions) (result *v1.EndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(endpointslicesResource, c.ns, endpointSlice), &v1.EndpointSlice{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.EndpointSlice), err -} - -// Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.UpdateOptions) (result *v1.EndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(endpointslicesResource, c.ns, endpointSlice), &v1.EndpointSlice{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.EndpointSlice), err -} - -// Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. -func (c *FakeEndpointSlices) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(endpointslicesResource, c.ns, name, opts), &v1.EndpointSlice{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeEndpointSlices) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionAction(endpointslicesResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1.EndpointSliceList{}) - return err -} - -// Patch applies the patch and returns the patched endpointSlice. -func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.EndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, name, pt, data, subresources...), &v1.EndpointSlice{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.EndpointSlice), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/generated_expansion.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/generated_expansion.go deleted file mode 100644 index 7295b601e64..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -type EndpointSliceExpansion interface{} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/discovery_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/discovery_client.go deleted file mode 100644 index d2d55658183..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/discovery_client.go +++ /dev/null @@ -1,94 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - "net/http" - - v1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type DiscoveryV1beta1Interface interface { - RESTClient() rest.Interface - EndpointSlicesGetter -} - -// DiscoveryV1beta1Client is used to interact with features provided by the discovery.k8s.io group. -type DiscoveryV1beta1Client struct { - restClient rest.Interface -} - -func (c *DiscoveryV1beta1Client) EndpointSlices(namespace string) EndpointSliceInterface { - return newEndpointSlices(c, namespace) -} - -// NewForConfig creates a new DiscoveryV1beta1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*DiscoveryV1beta1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new DiscoveryV1beta1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*DiscoveryV1beta1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &DiscoveryV1beta1Client{client}, nil -} - -// NewForConfigOrDie creates a new DiscoveryV1beta1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *DiscoveryV1beta1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new DiscoveryV1beta1Client for the given RESTClient. -func New(c rest.Interface) *DiscoveryV1beta1Client { - return &DiscoveryV1beta1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - 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 *DiscoveryV1beta1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/doc.go deleted file mode 100644 index 07e23ed4aad..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1beta1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/endpointslice.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/endpointslice.go deleted file mode 100644 index a77bbb97e0a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/endpointslice.go +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - "context" - "time" - - v1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" - scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// EndpointSlicesGetter has a method to return a EndpointSliceInterface. -// A group's client should implement this interface. -type EndpointSlicesGetter interface { - EndpointSlices(namespace string) EndpointSliceInterface -} - -// EndpointSliceInterface has methods to work with EndpointSlice resources. -type EndpointSliceInterface interface { - Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (*v1beta1.EndpointSlice, error) - Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (*v1beta1.EndpointSlice, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.EndpointSlice, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.EndpointSliceList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) - EndpointSliceExpansion -} - -// endpointSlices implements EndpointSliceInterface -type endpointSlices struct { - client rest.Interface - ns string -} - -// newEndpointSlices returns a EndpointSlices -func newEndpointSlices(c *DiscoveryV1beta1Client, namespace string) *endpointSlices { - return &endpointSlices{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. -func (c *endpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.EndpointSlice, err error) { - result = &v1beta1.EndpointSlice{} - err = c.client.Get(). - Namespace(c.ns). - Resource("endpointslices"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. -func (c *endpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EndpointSliceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.EndpointSliceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("endpointslices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested endpointSlices. -func (c *endpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("endpointslices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (result *v1beta1.EndpointSlice, err error) { - result = &v1beta1.EndpointSlice{} - err = c.client.Post(). - Namespace(c.ns). - Resource("endpointslices"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(endpointSlice). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (result *v1beta1.EndpointSlice, err error) { - result = &v1beta1.EndpointSlice{} - err = c.client.Put(). - Namespace(c.ns). - Resource("endpointslices"). - Name(endpointSlice.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(endpointSlice). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. -func (c *endpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("endpointslices"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *endpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("endpointslices"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched endpointSlice. -func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) { - result = &v1beta1.EndpointSlice{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("endpointslices"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/doc.go deleted file mode 100644 index 57bd090efb0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_discovery_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_discovery_client.go deleted file mode 100644 index a1d258d80c5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_discovery_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeDiscoveryV1beta1 struct { - *testing.Fake -} - -func (c *FakeDiscoveryV1beta1) EndpointSlices(namespace string) v1beta1.EndpointSliceInterface { - return &FakeEndpointSlices{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeDiscoveryV1beta1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_endpointslice.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_endpointslice.go deleted file mode 100644 index ddc55497d1b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_endpointslice.go +++ /dev/null @@ -1,116 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeEndpointSlices implements EndpointSliceInterface -type FakeEndpointSlices struct { - Fake *FakeDiscoveryV1beta1 - ns string -} - -var endpointslicesResource = v1beta1.SchemeGroupVersion.WithResource("endpointslices") - -var endpointslicesKind = v1beta1.SchemeGroupVersion.WithKind("EndpointSlice") - -// Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. -func (c *FakeEndpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.EndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(endpointslicesResource, c.ns, name), &v1beta1.EndpointSlice{}) - - if obj == nil { - return nil, err - } - return obj.(*v1beta1.EndpointSlice), err -} - -// List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. -func (c *FakeEndpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EndpointSliceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(endpointslicesResource, endpointslicesKind, c.ns, opts), &v1beta1.EndpointSliceList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.EndpointSliceList{ListMeta: obj.(*v1beta1.EndpointSliceList).ListMeta} - for _, item := range obj.(*v1beta1.EndpointSliceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested endpointSlices. -func (c *FakeEndpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(endpointslicesResource, c.ns, opts)) - -} - -// Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (result *v1beta1.EndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(endpointslicesResource, c.ns, endpointSlice), &v1beta1.EndpointSlice{}) - - if obj == nil { - return nil, err - } - return obj.(*v1beta1.EndpointSlice), err -} - -// Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (result *v1beta1.EndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(endpointslicesResource, c.ns, endpointSlice), &v1beta1.EndpointSlice{}) - - if obj == nil { - return nil, err - } - return obj.(*v1beta1.EndpointSlice), err -} - -// Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. -func (c *FakeEndpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(endpointslicesResource, c.ns, name, opts), &v1beta1.EndpointSlice{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeEndpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(endpointslicesResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1beta1.EndpointSliceList{}) - return err -} - -// Patch applies the patch and returns the patched endpointSlice. -func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, name, pt, data, subresources...), &v1beta1.EndpointSlice{}) - - if obj == nil { - return nil, err - } - return obj.(*v1beta1.EndpointSlice), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/generated_expansion.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/generated_expansion.go deleted file mode 100644 index 1aa54bf9b1a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -type EndpointSliceExpansion interface{} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/doc.go deleted file mode 100644 index 50cfbd485a5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1 diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/doc.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/doc.go deleted file mode 100644 index 57bd090efb0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networking_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networking_client.go deleted file mode 100644 index 6e5f98fde06..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networking_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeNetworkingV1 struct { - *testing.Fake -} - -func (c *FakeNetworkingV1) NetworkPolicies(namespace string) v1.NetworkPolicyInterface { - return &FakeNetworkPolicies{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeNetworkingV1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networkpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networkpolicy.go deleted file mode 100644 index e51d9f36703..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networkpolicy.go +++ /dev/null @@ -1,116 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeNetworkPolicies implements NetworkPolicyInterface -type FakeNetworkPolicies struct { - Fake *FakeNetworkingV1 - ns string -} - -var networkpoliciesResource = v1.SchemeGroupVersion.WithResource("networkpolicies") - -var networkpoliciesKind = v1.SchemeGroupVersion.WithKind("NetworkPolicy") - -// Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. -func (c *FakeNetworkPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.NetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(networkpoliciesResource, c.ns, name), &v1.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.NetworkPolicy), err -} - -// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. -func (c *FakeNetworkPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NetworkPolicyList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(networkpoliciesResource, networkpoliciesKind, c.ns, opts), &v1.NetworkPolicyList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.NetworkPolicyList{ListMeta: obj.(*v1.NetworkPolicyList).ListMeta} - for _, item := range obj.(*v1.NetworkPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested networkPolicies. -func (c *FakeNetworkPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(networkpoliciesResource, c.ns, opts)) - -} - -// 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 *FakeNetworkPolicies) Create(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (result *v1.NetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &v1.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.NetworkPolicy), err -} - -// 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 *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (result *v1.NetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &v1.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.NetworkPolicy), err -} - -// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. -func (c *FakeNetworkPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(networkpoliciesResource, c.ns, name, opts), &v1.NetworkPolicy{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeNetworkPolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionAction(networkpoliciesResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1.NetworkPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched networkPolicy. -func (c *FakeNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, pt, data, subresources...), &v1.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v1.NetworkPolicy), err -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/generated_expansion.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/generated_expansion.go deleted file mode 100644 index e78ec060915..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -type NetworkPolicyExpansion interface{} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networking_client.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networking_client.go deleted file mode 100644 index ab93e1dfa9d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networking_client.go +++ /dev/null @@ -1,94 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "net/http" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/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. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*NetworkingV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new NetworkingV1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NetworkingV1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - 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 = scheme.Codecs.WithoutConversion() - - 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/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networkpolicy.go b/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networkpolicy.go deleted file mode 100644 index f657e00a310..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networkpolicy.go +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - "time" - - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" - scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - 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(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (*v1.NetworkPolicy, error) - Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.NetworkPolicy, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.NetworkPolicyList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, 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(ctx context.Context, name string, options metav1.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(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. -func (c *networkPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NetworkPolicyList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.NetworkPolicyList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("networkpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested networkPolicies. -func (c *networkPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("networkpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// 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(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (result *v1.NetworkPolicy, err error) { - result = &v1.NetworkPolicy{} - err = c.client.Post(). - Namespace(c.ns). - Resource("networkpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(networkPolicy). - Do(ctx). - 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(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (result *v1.NetworkPolicy, err error) { - result = &v1.NetworkPolicy{} - err = c.client.Put(). - Namespace(c.ns). - Resource("networkpolicies"). - Name(networkPolicy.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(networkPolicy). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. -func (c *networkPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("networkpolicies"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *networkPolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("networkpolicies"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched networkPolicy. -func (c *networkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error) { - result = &v1.NetworkPolicy{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("networkpolicies"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/utils/listwatcher.go b/vendor/github.com/cilium/cilium/pkg/k8s/utils/listwatcher.go deleted file mode 100644 index 12d71835ff6..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/utils/listwatcher.go +++ /dev/null @@ -1,76 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package utils - -import ( - "context" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/fields" - k8sRuntime "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" -) - -// typedListWatcher is a generic interface that all the typed k8s clients match. -type typedListWatcher[T k8sRuntime.Object] interface { - List(ctx context.Context, opts metav1.ListOptions) (T, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -// genListWatcher takes a typed list watcher and implements cache.ListWatch -// using it. -type genListWatcher[T k8sRuntime.Object] struct { - lw typedListWatcher[T] -} - -func (g *genListWatcher[T]) List(opts metav1.ListOptions) (k8sRuntime.Object, error) { - return g.lw.List(context.Background(), opts) -} - -func (g *genListWatcher[T]) Watch(opts metav1.ListOptions) (watch.Interface, error) { - return g.lw.Watch(context.Background(), opts) -} - -// ListerWatcherFromTyped adapts a typed k8s client to cache.ListerWatcher so it can be used -// with an informer. With this construction we can use fake clients for testing, -// which would not be possible if we used NewListWatchFromClient and RESTClient(). -func ListerWatcherFromTyped[T k8sRuntime.Object](lw typedListWatcher[T]) cache.ListerWatcher { - return &genListWatcher[T]{lw: lw} -} - -type listWatcherWithModifier struct { - inner cache.ListerWatcher - optsModifier func(*metav1.ListOptions) -} - -func (lw *listWatcherWithModifier) List(opts metav1.ListOptions) (k8sRuntime.Object, error) { - lw.optsModifier(&opts) - return lw.inner.List(opts) -} - -func (lw *listWatcherWithModifier) Watch(opts metav1.ListOptions) (watch.Interface, error) { - lw.optsModifier(&opts) - return lw.inner.Watch(opts) -} - -func ListerWatcherWithFields(lw cache.ListerWatcher, fieldSelector fields.Selector) cache.ListerWatcher { - return ListerWatcherWithModifier( - lw, - func(opts *metav1.ListOptions) { opts.FieldSelector = fieldSelector.String() }) -} - -func ListerWatcherWithModifier(lw cache.ListerWatcher, optsModifier func(*metav1.ListOptions)) cache.ListerWatcher { - return &listWatcherWithModifier{ - inner: lw, - optsModifier: optsModifier, - } -} - -func ListerWatcherWithModifiers(lw cache.ListerWatcher, opts ...func(*metav1.ListOptions)) cache.ListerWatcher { - for _, opt := range opts { - lw = ListerWatcherWithModifier(lw, opt) - } - return lw -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/utils/utils.go b/vendor/github.com/cilium/cilium/pkg/k8s/utils/utils.go deleted file mode 100644 index e47652d11f5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/utils/utils.go +++ /dev/null @@ -1,281 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package utils - -import ( - "net" - "sort" - "strings" - - v1 "k8s.io/api/core/v1" - v1meta "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/cilium/cilium/pkg/ip" - k8sconst "github.com/cilium/cilium/pkg/k8s/apis/cilium.io" - slim_corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/selection" - labelsPkg "github.com/cilium/cilium/pkg/labels" -) - -const ( - // ServiceProxyNameLabel is the label for service proxy name in k8s service related - // objects. - serviceProxyNameLabel = "service.kubernetes.io/service-proxy-name" -) - -type NamespaceNameGetter interface { - GetNamespace() string - GetName() string -} - -// ExtractNamespace extracts the namespace of ObjectMeta. -// For cluster scoped objects the Namespace field is empty and this function -// assumes that the object is returned from kubernetes itself implying that -// the namespace is empty only and only when the Object is cluster scoped -// and thus returns empty namespace for such objects. -func ExtractNamespace(np NamespaceNameGetter) string { - return np.GetNamespace() -} - -// ExtractNamespaceOrDefault extracts the namespace of ObjectMeta, it returns default -// namespace if the namespace field in the ObjectMeta is empty. -func ExtractNamespaceOrDefault(np NamespaceNameGetter) string { - ns := np.GetNamespace() - if ns == "" { - return v1.NamespaceDefault - } - - return ns -} - -// GetObjNamespaceName returns the object's namespace and name. -// If the object is cluster scoped then the function returns only the object name -// without any namespace prefix. -func GetObjNamespaceName(obj NamespaceNameGetter) string { - ns := ExtractNamespace(obj) - if ns == "" { - return obj.GetName() - } - - return ns + "/" + obj.GetName() -} - -// EnvoyConfigConfiguration is the required configuration for GetServiceAndEndpointListOptionsModifier -type EnvoyConfigConfiguration interface { - // K8sEnvoyConfigEnabled returns true if CiliumEnvoyConfig feature is enabled in Cilium - K8sEnvoyConfigEnabled() bool -} - -// IngressConfiguration is the required configuration for GetServiceAndEndpointListOptionsModifier -type IngressConfiguration interface { - // K8sIngressControllerEnabled returns true if ingress controller feature is enabled in Cilium - K8sIngressControllerEnabled() bool -} - -// GatewayAPIConfiguration is the required configuration for GetServiceAndEndpointListOptionsModifier -type GatewayAPIConfiguration interface { - // K8sGatewayAPIEnabled returns true if gateway API is enabled in Cilium - K8sGatewayAPIEnabled() bool -} - -// PolicyConfiguration is the required configuration for K8s NetworkPolicy -type PolicyConfiguration interface { - // K8sNetworkPolicyEnabled returns true if cilium agent needs to support K8s NetworkPolicy - K8sNetworkPolicyEnabled() bool -} - -// GetEndpointSliceListOptionsModifier returns the options modifier for endpointSlice object list. -// This methods returns a ListOptions modifier which adds a label selector to -// select all endpointSlice objects that do not contain the k8s headless service label. -// This is the same behavior as kube-proxy. -// Given label mirroring from the service objects to endpoint slice objects were introduced in Kubernetes PR 94443, -// and released as part of Kubernetes v1.20; we can start using GetServiceAndEndpointListOptionsModifier for -// endpoint slices when dropping support for Kubernetes v1.19 and older. We can do that since the -// serviceProxyNameLabel label will then be mirrored to endpoint slices for services with that label. -func GetEndpointSliceListOptionsModifier() (func(options *v1meta.ListOptions), error) { - nonHeadlessServiceSelector, err := labels.NewRequirement(v1.IsHeadlessService, selection.DoesNotExist, nil) - if err != nil { - return nil, err - } - - labelSelector := labels.NewSelector() - labelSelector = labelSelector.Add(*nonHeadlessServiceSelector) - - return func(options *v1meta.ListOptions) { - options.LabelSelector = labelSelector.String() - }, nil -} - -// GetServiceAndEndpointListOptionsModifier returns the options modifier for service and endpoint object lists. -// This methods returns a ListOptions modifier which adds a label selector to only -// select services that are in context of Cilium. -// Like kube-proxy Cilium does not select services/endpoints containing k8s headless service label. -// We honor service.kubernetes.io/service-proxy-name label in the service object and only -// handle services that match our service proxy name. If the service proxy name for Cilium -// is an empty string, we assume that Cilium is the default service handler in which case -// we select all services that don't have the above mentioned label. -func GetServiceAndEndpointListOptionsModifier(k8sServiceProxy string) (func(options *v1meta.ListOptions), error) { - var ( - serviceNameSelector, nonHeadlessServiceSelector *labels.Requirement - err error - ) - - nonHeadlessServiceSelector, err = labels.NewRequirement(v1.IsHeadlessService, selection.DoesNotExist, nil) - if err != nil { - return nil, err - } - - if k8sServiceProxy == "" { - serviceNameSelector, err = labels.NewRequirement( - serviceProxyNameLabel, selection.DoesNotExist, nil) - } else { - serviceNameSelector, err = labels.NewRequirement( - serviceProxyNameLabel, selection.DoubleEquals, []string{k8sServiceProxy}) - } - - if err != nil { - return nil, err - } - - labelSelector := labels.NewSelector() - labelSelector = labelSelector.Add(*serviceNameSelector, *nonHeadlessServiceSelector) - - return func(options *v1meta.ListOptions) { - options.LabelSelector = labelSelector.String() - }, nil -} - -// GetLatestPodReadiness returns the lastest podReady condition on a given pod. -func GetLatestPodReadiness(podStatus slim_corev1.PodStatus) slim_corev1.ConditionStatus { - for _, cond := range podStatus.Conditions { - if cond.Type == slim_corev1.PodReady { - return cond.Status - } - } - return slim_corev1.ConditionUnknown -} - -// ValidIPs return a sorted slice of unique IP addresses retrieved from the given PodStatus. -// Returns an error when no IPs are found. -func ValidIPs(podStatus slim_corev1.PodStatus) []string { - if len(podStatus.PodIPs) == 0 && len(podStatus.PodIP) == 0 { - return nil - } - - // make it a set first to avoid repeated IP addresses - ipsMap := make(map[string]struct{}, 1+len(podStatus.PodIPs)) - if podStatus.PodIP != "" { - ipsMap[podStatus.PodIP] = struct{}{} - } - for _, podIP := range podStatus.PodIPs { - if podIP.IP != "" { - ipsMap[podIP.IP] = struct{}{} - } - } - - ips := make([]string, 0, len(ipsMap)) - for ipStr := range ipsMap { - ips = append(ips, ipStr) - } - sort.Strings(ips) - return ips -} - -// IsPodRunning returns true if the pod is considered to be in running state. -// We consider a Running pod a pod that does not report a Failed nor a Succeeded -// pod Phase. -func IsPodRunning(status slim_corev1.PodStatus) bool { - switch status.Phase { - case slim_corev1.PodFailed, slim_corev1.PodSucceeded: - return false - } - return true -} - -// GetClusterIPByFamily returns a service clusterip by family. -// From - https://github.com/kubernetes/kubernetes/blob/release-1.20/pkg/proxy/util/utils.go#L386-L411 -func GetClusterIPByFamily(ipFamily slim_corev1.IPFamily, service *slim_corev1.Service) string { - // allowing skew - if len(service.Spec.IPFamilies) == 0 { - if len(service.Spec.ClusterIP) == 0 || service.Spec.ClusterIP == v1.ClusterIPNone { - return "" - } - - IsIPv6Family := (ipFamily == slim_corev1.IPv6Protocol) - if IsIPv6Family == ip.IsIPv6(net.ParseIP(service.Spec.ClusterIP)) { - return service.Spec.ClusterIP - } - - return "" - } - - for idx, family := range service.Spec.IPFamilies { - if family == ipFamily { - if idx < len(service.Spec.ClusterIPs) { - return service.Spec.ClusterIPs[idx] - } - } - } - - return "" -} - -// filterPodLabels returns a copy of the given labels map, without the labels owned by Cilium. -func filterPodLabels(labels map[string]string) map[string]string { - res := map[string]string{} - for k, v := range labels { - if strings.HasPrefix(k, k8sconst.LabelPrefix) { - continue - } - res[k] = v - } - return res -} - -// SanitizePodLabels makes sure that no important pod labels were overridden manually on k8s pod -// object creation. -func SanitizePodLabels(podLabels map[string]string, namespace *slim_corev1.Namespace, serviceAccount, clusterName string) map[string]string { - sanitizedLabels := filterPodLabels(podLabels) - - // Sanitize namespace labels - for k, v := range namespace.GetLabels() { - sanitizedLabels[joinPath(k8sconst.PodNamespaceMetaLabels, k)] = v - } - // Sanitize namespace name label - sanitizedLabels[k8sconst.PodNamespaceLabel] = namespace.ObjectMeta.Name - // Sanitize service account name - if serviceAccount != "" { - sanitizedLabels[k8sconst.PolicyLabelServiceAccount] = serviceAccount - } else { - delete(sanitizedLabels, k8sconst.PolicyLabelServiceAccount) - } - // Sanitize cluster name - sanitizedLabels[k8sconst.PolicyLabelCluster] = clusterName - - return sanitizedLabels -} - -// StripPodSpecialLabels strips labels that are not supposed to be coming from a k8s pod object update. -func StripPodSpecialLabels(labels map[string]string) map[string]string { - sanitizedLabels := make(map[string]string) - for k, v := range filterPodLabels(labels) { - // If the key contains the prefix for namespace labels then we will - // ignore it. - if strings.HasPrefix(k, k8sconst.PodNamespaceMetaLabels) { - continue - } - // Also ignore it if the key is a kubernetes namespace label. - if k == k8sconst.PodNamespaceLabel { - continue - } - sanitizedLabels[k] = v - } - return sanitizedLabels -} - -// joinPath mimics JoinPath from pkg/policy/utils, which could not be imported here due to circular dependency -func joinPath(a, b string) string { - return a + labelsPkg.PathDelimiter + b -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/utils/workload.go b/vendor/github.com/cilium/cilium/pkg/k8s/utils/workload.go deleted file mode 100644 index 4b7d338eeb8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/utils/workload.go +++ /dev/null @@ -1,94 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Copyright Istio Authors -// Copyright Authors of Hubble - -// GetWorkloadMetaFromPod and cronJobNameRegexp are copied from -// https://github.com/istio/istio/blob/1aca7a67afd7b3e1d24fafb2fbfbeaf1e41534c0/pkg/kube/util.go -// -// Modifications: -// GetDeployMetaFromPod has been renamed to GetWorkloadMetaFromPod and has -// been updated to use the cilium slim API types. -// We do not store the APIVersion of the owning workload in the TypeMeta -// either, because it isn't needed for our purposes, and our slim types do not -// have this field. -// We fallback to the pod's ownerReference if we cannot find a more suitable -// workload based on heuristics, whereas the original code defaulted to the -// pod's name. This may be the case when using ReplicaSets without a Deployment. - -package utils - -import ( - "regexp" - "strings" - - slim_corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -var cronJobNameRegexp = regexp.MustCompile(`(.+)-\d{8,10}$`) - -// GetWorkloadMetaFromPod heuristically derives workload metadata from the pod spec. -func GetWorkloadMetaFromPod(pod *slim_corev1.Pod) (slim_metav1.ObjectMeta, slim_metav1.TypeMeta, bool) { - if pod == nil { - return slim_metav1.ObjectMeta{}, slim_metav1.TypeMeta{}, false - } - // try to capture more useful namespace/name info for deployments, etc. - // TODO(dougreid): expand to enable lookup of OWNERs recursively a la kubernetesenv - workloadObjectMeta := pod.ObjectMeta - workloadObjectMeta.OwnerReferences = nil - - var ok bool - var typeMetadata slim_metav1.TypeMeta - if len(pod.GenerateName) > 0 { - // if the pod name was generated (or is scheduled for generation), we can begin an investigation into the controlling reference for the pod. - var controllerRef slim_metav1.OwnerReference - controllerFound := false - for _, ref := range pod.OwnerReferences { - if ref.Controller != nil && *ref.Controller { - controllerRef = ref - controllerFound = true - break - } - } - if controllerFound { - ok = true - // default to the owner kind/name - typeMetadata.Kind = controllerRef.Kind - workloadObjectMeta.Name = controllerRef.Name - - // heuristic for deployment detection - if typeMetadata.Kind == "ReplicaSet" && pod.Labels["pod-template-hash"] != "" && strings.HasSuffix(controllerRef.Name, pod.Labels["pod-template-hash"]) { - name := strings.TrimSuffix(controllerRef.Name, "-"+pod.Labels["pod-template-hash"]) - workloadObjectMeta.Name = name - typeMetadata.Kind = "Deployment" - } else if typeMetadata.Kind == "ReplicaSet" && pod.Labels["pod-template-hash"] == "" { - workloadObjectMeta.Name = controllerRef.Name - typeMetadata.Kind = "ReplicaSet" - } else if typeMetadata.Kind == "ReplicationController" && pod.Labels["deploymentconfig"] != "" { - // If the pod is controlled by the replication controller, which is created by the DeploymentConfig resource in - // Openshift platform, set the deploy name to the deployment config's name, and the kind to 'DeploymentConfig'. - // - // nolint: lll - // For DeploymentConfig details, refer to - // https://docs.openshift.com/container-platform/4.1/applications/deployments/what-deployments-are.html#deployments-and-deploymentconfigs_what-deployments-are - // - // For the reference to the pod label 'deploymentconfig', refer to - // https://github.com/openshift/library-go/blob/7a65fdb398e28782ee1650959a5e0419121e97ae/pkg/apps/appsutil/const.go#L25 - workloadObjectMeta.Name = pod.Labels["deploymentconfig"] - typeMetadata.Kind = "DeploymentConfig" - delete(workloadObjectMeta.Labels, "deploymentconfig") - } else if typeMetadata.Kind == "Job" { - // If job name suffixed with `-`, where the length of digit timestamp is 8~10, - // trim the suffix and set kind to cron job. - if jn := cronJobNameRegexp.FindStringSubmatch(controllerRef.Name); len(jn) == 2 { - workloadObjectMeta.Name = jn[1] - typeMetadata.Kind = "CronJob" - } - } - } - } - - return workloadObjectMeta, typeMetadata, ok -} diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/version/version.go b/vendor/github.com/cilium/cilium/pkg/k8s/version/version.go deleted file mode 100644 index db2bab99517..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/k8s/version/version.go +++ /dev/null @@ -1,309 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package version keeps track of the Kubernetes version the client is -// connected to -package version - -import ( - "context" - "fmt" - - "github.com/blang/semver/v4" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes" - - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/versioncheck" -) - -var log = logging.DefaultLogger.WithField(logfields.LogSubsys, "k8s") - -// ServerCapabilities is a list of server capabilities derived based on -// version, the Kubernetes discovery API, or probing of individual API -// endpoints. -type ServerCapabilities struct { - // MinimalVersionMet is true when the minimal version of Kubernetes - // required to run Cilium has been met - MinimalVersionMet bool - - // EndpointSlice is the ability of k8s server to support endpoint slices - EndpointSlice bool - - // EndpointSliceV1 is the ability of k8s server to support endpoint slices - // v1. This version was introduced in K8s v1.21.0. - EndpointSliceV1 bool - - // LeasesResourceLock is the ability of K8s server to support Lease type - // from coordination.k8s.io/v1 API for leader election purposes(currently only in operator). - // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#lease-v1-coordination-k8s-io - // - // This capability was introduced in K8s version 1.14, prior to which - // we don't support HA mode for the cilium-operator. - LeasesResourceLock bool -} - -type cachedVersion struct { - mutex lock.RWMutex - capabilities ServerCapabilities - version semver.Version -} - -const ( - // MinimalVersionConstraint is the minimal version that Cilium supports to - // run kubernetes. - MinimalVersionConstraint = "1.16.0" -) - -var ( - cached = cachedVersion{} - - discoveryAPIGroupV1beta1 = "discovery.k8s.io/v1beta1" - discoveryAPIGroupV1 = "discovery.k8s.io/v1" - coordinationV1APIGroup = "coordination.k8s.io/v1" - endpointSliceKind = "EndpointSlice" - leaseKind = "Lease" - - // Constraint to check support for discovery/v1 types. Support for v1 - // discovery was introduced in K8s version 1.21. - isGEThanAPIDiscoveryV1 = versioncheck.MustCompile(">=1.21.0") - - // Constraint to check support for discovery/v1beta1 types. Support for - // v1beta1 discovery was introduced in K8s version 1.17. - isGEThanAPIDiscoveryV1Beta1 = versioncheck.MustCompile(">=1.17.0") - - // isGEThanMinimalVersionConstraint is the minimal version required to run - // Cilium - isGEThanMinimalVersionConstraint = versioncheck.MustCompile(">=" + MinimalVersionConstraint) -) - -// Version returns the version of the Kubernetes apiserver -func Version() semver.Version { - cached.mutex.RLock() - c := cached.version - cached.mutex.RUnlock() - return c -} - -// Capabilities returns the capabilities of the Kubernetes apiserver -func Capabilities() ServerCapabilities { - cached.mutex.RLock() - c := cached.capabilities - cached.mutex.RUnlock() - return c -} - -func DisableLeasesResourceLock() { - cached.mutex.Lock() - defer cached.mutex.Unlock() - cached.capabilities.LeasesResourceLock = false -} - -func updateVersion(version semver.Version) { - cached.mutex.Lock() - defer cached.mutex.Unlock() - - cached.version = version - - cached.capabilities.MinimalVersionMet = isGEThanMinimalVersionConstraint(version) - cached.capabilities.EndpointSliceV1 = isGEThanAPIDiscoveryV1(version) - cached.capabilities.EndpointSlice = isGEThanAPIDiscoveryV1Beta1(version) -} - -func updateServerGroupsAndResources(apiResourceLists []*metav1.APIResourceList) { - cached.mutex.Lock() - defer cached.mutex.Unlock() - - cached.capabilities.EndpointSlice = false - cached.capabilities.EndpointSliceV1 = false - cached.capabilities.LeasesResourceLock = false - for _, rscList := range apiResourceLists { - if rscList.GroupVersion == discoveryAPIGroupV1beta1 { - for _, rsc := range rscList.APIResources { - if rsc.Kind == endpointSliceKind { - cached.capabilities.EndpointSlice = true - break - } - } - } - if rscList.GroupVersion == discoveryAPIGroupV1 { - for _, rsc := range rscList.APIResources { - if rsc.Kind == endpointSliceKind { - cached.capabilities.EndpointSlice = true - cached.capabilities.EndpointSliceV1 = true - break - } - } - } - - if rscList.GroupVersion == coordinationV1APIGroup { - for _, rsc := range rscList.APIResources { - if rsc.Kind == leaseKind { - cached.capabilities.LeasesResourceLock = true - break - } - } - } - } -} - -// Force forces the use of a specific version -func Force(version string) error { - ver, err := versioncheck.Version(version) - if err != nil { - return err - } - updateVersion(ver) - return nil -} - -func endpointSlicesFallbackDiscovery(client kubernetes.Interface) error { - // If a k8s version with discovery v1 is used, then do not even bother - // checking for v1beta1 - cached.mutex.Lock() - if cached.capabilities.EndpointSliceV1 { - cached.capabilities.EndpointSlice = true - cached.mutex.Unlock() - return nil - } - cached.mutex.Unlock() - - // Discovery of API groups requires the API services of the apiserver to be - // healthy. Such API services can depend on the readiness of regular pods - // which require Cilium to function correctly. By treating failure to - // discover API groups as fatal, a critial loop can be entered in which - // Cilium cannot start because the API groups can't be discovered. - // - // Here we acknowledge the lack of discovery ability as non Fatal and fall back to probing - // the API directly. - _, err := client.DiscoveryV1beta1().EndpointSlices("default").Get(context.TODO(), "kubernetes", metav1.GetOptions{}) - if err == nil { - cached.mutex.Lock() - cached.capabilities.EndpointSlice = true - cached.mutex.Unlock() - return nil - } - - if errors.IsNotFound(err) { - log.WithError(err).Info("Unable to retrieve EndpointSlices for default/kubernetes. Disabling EndpointSlices") - // StatusNotFound is a safe error, EndpointSlices are - // disabled and the agent can continue. - return nil - } - - // Unknown error, we can't derive whether to enable or disable - // EndpointSlices and need to error out. - return fmt.Errorf("unable to validate EndpointSlices support: %w", err) -} - -func leasesFallbackDiscovery(client kubernetes.Interface, apiDiscoveryEnabled bool) error { - // apiDiscoveryEnabled is used to fallback leases discovery to directly - // probing the API when we cannot discover API groups. - // We require to check for Leases capabilities in operator only, which uses Leases - // for leader election purposes in HA mode. - if !apiDiscoveryEnabled { - log.Debugf("Skipping Leases support fallback discovery") - return nil - } - - // Similar to endpointSlicesFallbackDiscovery here we fallback to probing the Kubernetes - // API directly. `kube-controller-manager` creates a lease in the kube-system namespace - // and here we try and see if that Lease exists. - _, err := client.CoordinationV1().Leases("kube-system").Get(context.TODO(), "kube-controller-manager", metav1.GetOptions{}) - if err == nil { - cached.mutex.Lock() - cached.capabilities.LeasesResourceLock = true - cached.mutex.Unlock() - return nil - } - - if errors.IsNotFound(err) { - log.WithError(err).Info("Unable to retrieve Leases for kube-controller-manager. Disabling LeasesResourceLock") - // StatusNotFound is a safe error, Leases are - // disabled and the agent can continue - return nil - } - - // Unknown error, we can't derive whether to enable or disable - // LeasesResourceLock and need to error out - return fmt.Errorf("unable to validate LeasesResourceLock support: %w", err) -} - -func updateK8sServerVersion(client kubernetes.Interface) error { - var ver semver.Version - - sv, err := client.Discovery().ServerVersion() - if err != nil { - return err - } - - // Try GitVersion first. In case of error fallback to MajorMinor - if sv.GitVersion != "" { - // This is a string like "v1.9.0" - ver, err = versioncheck.Version(sv.GitVersion) - if err == nil { - updateVersion(ver) - return nil - } - } - - if sv.Major != "" && sv.Minor != "" { - ver, err = versioncheck.Version(fmt.Sprintf("%s.%s", sv.Major, sv.Minor)) - if err == nil { - updateVersion(ver) - return nil - } - } - - return fmt.Errorf("cannot parse k8s server version from %+v: %w", sv, err) -} - -// Update retrieves the version of the Kubernetes apiserver and derives the -// capabilities. This function must be called after connectivity to the -// apiserver has been established. -// -// Discovery of capabilities only works if the discovery API of the apiserver -// is functional. If it is not available, a warning is logged and the discovery -// falls back to probing individual API endpoints. -func Update(client kubernetes.Interface, apiDiscoveryEnabled bool) error { - err := updateK8sServerVersion(client) - if err != nil { - return err - } - - if apiDiscoveryEnabled { - // Discovery of API groups requires the API services of the - // apiserver to be healthy. Such API services can depend on the - // readiness of regular pods which require Cilium to function - // correctly. By treating failure to discover API groups as - // fatal, a critical loop can be entered in which Cilium cannot - // start because the API groups can't be discovered and th API - // groups will only become discoverable once Cilium is up. - _, apiResourceLists, err := client.Discovery().ServerGroupsAndResources() - if err != nil { - // It doesn't make sense to retry the retrieval of this - // information at a later point because the capabilities are - // primiarly used while the agent is starting up. Instead, fall - // back to probing API endpoints directly. - log.WithError(err).Warning("Unable to discover API groups and resources") - if err := endpointSlicesFallbackDiscovery(client); err != nil { - return err - } - - return leasesFallbackDiscovery(client, apiDiscoveryEnabled) - } - - updateServerGroupsAndResources(apiResourceLists) - } else { - if err := endpointSlicesFallbackDiscovery(client); err != nil { - return err - } - - return leasesFallbackDiscovery(client, apiDiscoveryEnabled) - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/allocator/allocator.go b/vendor/github.com/cilium/cilium/pkg/kvstore/allocator/allocator.go deleted file mode 100644 index c9141031d78..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/allocator/allocator.go +++ /dev/null @@ -1,637 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package allocator - -import ( - "context" - "fmt" - "path" - "strconv" - "strings" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/allocator" - "github.com/cilium/cilium/pkg/idpool" - "github.com/cilium/cilium/pkg/kvstore" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/rate" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "kvstorebackend") -) - -// kvstoreBackend is an implementaton of pkg/allocator.Backend. It store -// identities in the following format: -// -// Slave keys: -// -// Slave keys are owned by individual nodes: -// - basePath/value/key1/node1 => 1001 -// - basePath/value/key1/node2 => 1001 -// - basePath/value/key2/node1 => 1002 -// - basePath/value/key2/node2 => 1002 -// -// If at least one key exists with the prefix basePath/value/keyN then that -// key must be considered to be in use in the allocation space. -// -// Slave keys are protected by a lease and will automatically get removed -// after ~ option.Config.KVstoreLeaseTTL if the node does not renew in time. -// -// Master key: -// - basePath/id/1001 => key1 -// - basePath/id/1002 => key2 -// -// Master keys provide the mapping from ID to key. As long as a master key -// for an ID exists, the ID is still in use. However, if a master key is no -// longer backed by at least one slave key, the garbage collector will -// eventually release the master key and return it back to the pool. -type kvstoreBackend struct { - // lockless is true if allocation can be done lockless. This depends on - // the underlying kvstore backend - lockless bool - - // basePrefix is the prefix in the kvstore that all keys share which - // are being managed by this allocator. The basePrefix typically - // consists of something like: "space/project/allocatorName" - basePrefix string - - // idPrefix is the kvstore key prefix for all master keys. It is being - // derived from the basePrefix. - idPrefix string - - // valuePrefix is the kvstore key prefix for all slave keys. It is - // being derived from the basePrefix. - valuePrefix string - - // lockPrefix is the prefix to use for all kvstore locks. This prefix - // is different from the idPrefix and valuePrefix to simplify watching - // for ID and key changes. - lockPrefix string - - // suffix is the suffix attached to keys which must be node specific, - // this is typical set to the node's IP address - suffix string - - backend kvstore.BackendOperations - - keyType allocator.AllocatorKey -} - -func locklessCapability(backend kvstore.BackendOperations) bool { - required := kvstore.CapabilityCreateIfExists | kvstore.CapabilityDeleteOnZeroCount - return backend.GetCapabilities()&required == required -} - -func prefixMatchesKey(prefix, key string) bool { - // cilium/state/identities/v1/value/label;foo;bar;/172.0.124.60 - lastSlash := strings.LastIndex(key, "/") - return len(prefix) == lastSlash -} - -// NewKVStoreBackend creates a pkg/allocator.Backend compatible instance. The -// specific kvstore used is configured in pkg/kvstore. -func NewKVStoreBackend(basePath, suffix string, typ allocator.AllocatorKey, backend kvstore.BackendOperations) (*kvstoreBackend, error) { - if backend == nil { - return nil, fmt.Errorf("kvstore client not configured") - } - - return &kvstoreBackend{ - basePrefix: basePath, - idPrefix: path.Join(basePath, "id"), - valuePrefix: path.Join(basePath, "value"), - lockPrefix: path.Join(basePath, "locks"), - suffix: suffix, - keyType: typ, - lockless: locklessCapability(backend), - backend: backend, - }, nil -} - -// lockPath locks a key in the scope of an allocator -func (k *kvstoreBackend) lockPath(ctx context.Context, key string) (*kvstore.Lock, error) { - suffix := strings.TrimPrefix(key, k.basePrefix) - return kvstore.LockPath(ctx, k.backend, path.Join(k.lockPrefix, suffix)) -} - -// DeleteAllKeys will delete all keys -func (k *kvstoreBackend) DeleteAllKeys(ctx context.Context) { - k.backend.DeletePrefix(ctx, k.basePrefix) -} - -// AllocateID allocates a key->ID mapping in the kvstore. -func (k *kvstoreBackend) AllocateID(ctx context.Context, id idpool.ID, key allocator.AllocatorKey) (allocator.AllocatorKey, error) { - // create /id/ and fail if it already exists - keyPath := path.Join(k.idPrefix, id.String()) - keyEncoded := []byte(k.backend.Encode([]byte(key.GetKey()))) - success, err := k.backend.CreateOnly(ctx, keyPath, keyEncoded, false) - if err != nil || !success { - return nil, fmt.Errorf("unable to create master key '%s': %w", keyPath, err) - } - - return key, nil -} - -// AllocateID allocates a key->ID mapping in the kvstore. -func (k *kvstoreBackend) AllocateIDIfLocked(ctx context.Context, id idpool.ID, key allocator.AllocatorKey, lock kvstore.KVLocker) (allocator.AllocatorKey, error) { - // create /id/ and fail if it already exists - keyPath := path.Join(k.idPrefix, id.String()) - keyEncoded := []byte(k.backend.Encode([]byte(key.GetKey()))) - success, err := k.backend.CreateOnlyIfLocked(ctx, keyPath, keyEncoded, false, lock) - if err != nil || !success { - return nil, fmt.Errorf("unable to create master key '%s': %w", keyPath, err) - } - - return key, nil -} - -// AcquireReference marks that this node is using this key->ID mapping in the kvstore. -func (k *kvstoreBackend) AcquireReference(ctx context.Context, id idpool.ID, key allocator.AllocatorKey, lock kvstore.KVLocker) error { - keyString := k.backend.Encode([]byte(key.GetKey())) - if err := k.createValueNodeKey(ctx, keyString, id, lock); err != nil { - return fmt.Errorf("unable to create slave key '%s': %w", keyString, err) - } - return nil -} - -// createValueKey records that this "node" is using this key->ID -func (k *kvstoreBackend) createValueNodeKey(ctx context.Context, key string, newID idpool.ID, lock kvstore.KVLocker) error { - // add a new key /value// to account for the reference - // The key is protected with a TTL/lease and will expire after LeaseTTL - valueKey := path.Join(k.valuePrefix, key, k.suffix) - if _, err := k.backend.UpdateIfDifferentIfLocked(ctx, valueKey, []byte(newID.String()), true, lock); err != nil { - return fmt.Errorf("unable to create value-node key '%s': %w", valueKey, err) - } - - return nil -} - -// Lock locks a key in the scope of an allocator -func (k *kvstoreBackend) lock(ctx context.Context, key string) (*kvstore.Lock, error) { - suffix := strings.TrimPrefix(key, k.basePrefix) - return kvstore.LockPath(ctx, k.backend, path.Join(k.lockPrefix, suffix)) -} - -// Lock locks a key in the scope of an allocator -func (k *kvstoreBackend) Lock(ctx context.Context, key allocator.AllocatorKey) (kvstore.KVLocker, error) { - return k.lock(ctx, k.backend.Encode([]byte(key.GetKey()))) -} - -// Get returns the ID which is allocated to a key in the kvstore -func (k *kvstoreBackend) Get(ctx context.Context, key allocator.AllocatorKey) (idpool.ID, error) { - // ListPrefix() will return all keys matching the prefix, the prefix - // can cover multiple different keys, example: - // - // key1 := label1;label2; - // key2 := label1;label2;label3; - // - // In order to retrieve the correct key, the position of the last '/' - // is significant, e.g. - // - // prefix := cilium/state/identities/v1/value/label;foo; - // - // key1 := cilium/state/identities/v1/value/label;foo;/172.0.124.60 - // key2 := cilium/state/identities/v1/value/label;foo;bar;/172.0.124.60 - // - // Only key1 should match - prefix := path.Join(k.valuePrefix, k.backend.Encode([]byte(key.GetKey()))) - pairs, err := k.backend.ListPrefix(ctx, prefix) - kvstore.Trace("ListPrefix", err, logrus.Fields{fieldPrefix: prefix, "entries": len(pairs)}) - if err != nil { - return 0, err - } - - for k, v := range pairs { - if prefixMatchesKey(prefix, k) { - id, err := strconv.ParseUint(string(v.Data), 10, 64) - if err == nil { - return idpool.ID(id), nil - } - } - } - - return idpool.NoID, nil -} - -// GetIfLocked returns the ID which is allocated to a key in the kvstore -// if the client is still holding the given lock. -func (k *kvstoreBackend) GetIfLocked(ctx context.Context, key allocator.AllocatorKey, lock kvstore.KVLocker) (idpool.ID, error) { - // ListPrefixIfLocked() will return all keys matching the prefix, the prefix - // can cover multiple different keys, example: - // - // key1 := label1;label2; - // key2 := label1;label2;label3; - // - // In order to retrieve the correct key, the position of the last '/' - // is significant, e.g. - // - // prefix := cilium/state/identities/v1/value/label;foo; - // - // key1 := cilium/state/identities/v1/value/label;foo;/172.0.124.60 - // key2 := cilium/state/identities/v1/value/label;foo;bar;/172.0.124.60 - // - // Only key1 should match - prefix := path.Join(k.valuePrefix, k.backend.Encode([]byte(key.GetKey()))) - pairs, err := k.backend.ListPrefixIfLocked(ctx, prefix, lock) - kvstore.Trace("ListPrefixLocked", err, logrus.Fields{fieldPrefix: prefix, "entries": len(pairs)}) - if err != nil { - return 0, err - } - - for k, v := range pairs { - if prefixMatchesKey(prefix, k) { - id, err := strconv.ParseUint(string(v.Data), 10, 64) - if err == nil { - return idpool.ID(id), nil - } - } - } - - return idpool.NoID, nil -} - -// GetByID returns the key associated with an ID. Returns nil if no key is -// associated with the ID. -func (k *kvstoreBackend) GetByID(ctx context.Context, id idpool.ID) (allocator.AllocatorKey, error) { - v, err := k.backend.Get(ctx, path.Join(k.idPrefix, id.String())) - if err != nil { - return nil, err - } - - if v == nil { - return nil, nil - } - - s, err := k.backend.Decode(string(v)) - if err != nil { - return nil, err - } - - return k.keyType.PutKey(string(s)), nil -} - -// UpdateKey refreshes the record that this node is using this key -> id -// mapping. When reliablyMissing is set it will also recreate missing master or -// slave keys. -func (k *kvstoreBackend) UpdateKey(ctx context.Context, id idpool.ID, key allocator.AllocatorKey, reliablyMissing bool) error { - var ( - err error - recreated bool - keyPath = path.Join(k.idPrefix, id.String()) - keyEncoded = []byte(k.backend.Encode([]byte(key.GetKey()))) - valueKey = path.Join(k.valuePrefix, k.backend.Encode([]byte(key.GetKey())), k.suffix) - ) - - // Use of CreateOnly() ensures that any existing potentially - // conflicting key is never overwritten. - success, err := k.backend.CreateOnly(ctx, keyPath, keyEncoded, false) - switch { - case err != nil: - return fmt.Errorf("Unable to re-create missing master key \"%s\" -> \"%s\": %w", fieldKey, valueKey, err) - case success: - log.WithField(fieldKey, keyPath).Warning("Re-created missing master key") - } - - // Also re-create the slave key in case it has been deleted. This will - // ensure that the next garbage collection cycle of any participating - // node does not remove the master key again. - if reliablyMissing { - recreated, err = k.backend.CreateOnly(ctx, valueKey, []byte(id.String()), true) - } else { - recreated, err = k.backend.UpdateIfDifferent(ctx, valueKey, []byte(id.String()), true) - } - switch { - case err != nil: - return fmt.Errorf("Unable to re-create missing slave key \"%s\" -> \"%s\": %w", fieldKey, valueKey, err) - case recreated: - log.WithField(fieldKey, valueKey).Warning("Re-created missing slave key") - } - - return nil -} - -// UpdateKeyIfLocked refreshes the record that this node is using this key -> id -// mapping. When reliablyMissing is set it will also recreate missing master or -// slave keys. -func (k *kvstoreBackend) UpdateKeyIfLocked(ctx context.Context, id idpool.ID, key allocator.AllocatorKey, reliablyMissing bool, lock kvstore.KVLocker) error { - var ( - err error - recreated bool - keyPath = path.Join(k.idPrefix, id.String()) - keyEncoded = []byte(k.backend.Encode([]byte(key.GetKey()))) - valueKey = path.Join(k.valuePrefix, k.backend.Encode([]byte(key.GetKey())), k.suffix) - ) - - // Use of CreateOnly() ensures that any existing potentially - // conflicting key is never overwritten. - success, err := k.backend.CreateOnlyIfLocked(ctx, keyPath, keyEncoded, false, lock) - switch { - case err != nil: - return fmt.Errorf("Unable to re-create missing master key \"%s\" -> \"%s\": %w", fieldKey, valueKey, err) - case success: - log.WithField(fieldKey, keyPath).Warning("Re-created missing master key") - } - - // Also re-create the slave key in case it has been deleted. This will - // ensure that the next garbage collection cycle of any participating - // node does not remove the master key again. - // lock is ignored since the key doesn't exist. - if reliablyMissing { - recreated, err = k.backend.CreateOnly(ctx, valueKey, []byte(id.String()), true) - } else { - recreated, err = k.backend.UpdateIfDifferentIfLocked(ctx, valueKey, []byte(id.String()), true, lock) - } - switch { - case err != nil: - return fmt.Errorf("Unable to re-create missing slave key \"%s\" -> \"%s\": %w", fieldKey, valueKey, err) - case recreated: - log.WithField(fieldKey, valueKey).Warning("Re-created missing slave key") - } - - return nil -} - -// Release releases the use of an ID associated with the provided key. It does -// not guard against concurrent releases. This is currently guarded by -// Allocator.slaveKeysMutex when called from pkg/allocator.Allocator.Release. -func (k *kvstoreBackend) Release(ctx context.Context, _ idpool.ID, key allocator.AllocatorKey) (err error) { - valueKey := path.Join(k.valuePrefix, k.backend.Encode([]byte(key.GetKey())), k.suffix) - log.WithField(fieldKey, key).Info("Released last local use of key, invoking global release") - - // does not need to be deleted with a lock as its protected by the - // Allocator.slaveKeysMutex - if err := k.backend.Delete(ctx, valueKey); err != nil { - log.WithError(err).WithFields(logrus.Fields{fieldKey: key}).Warning("Ignoring node specific ID") - return err - } - - // if k.lockless { - // FIXME: etcd 3.3 will make it possible to do a lockless - // cleanup of the ID and release it right away. For now we rely - // on the GC to kick in a release unused IDs. - // } - - return nil -} - -// RunLocksGC scans the kvstore for unused locks and removes them. Returns -// a map of locks that are currently being held, including the ones that have -// failed to be GCed. -func (k *kvstoreBackend) RunLocksGC(ctx context.Context, staleKeysPrevRound map[string]kvstore.Value) (map[string]kvstore.Value, error) { - // fetch list of all /../locks keys - allocated, err := k.backend.ListPrefix(ctx, k.lockPrefix) - if err != nil { - return nil, fmt.Errorf("list failed: %w", err) - } - - staleKeys := map[string]kvstore.Value{} - - // iterate over /../locks - for key, v := range allocated { - scopedLog := log.WithFields(logrus.Fields{ - fieldKey: key, - fieldLeaseID: strconv.FormatUint(uint64(v.LeaseID), 16), - }) - // Only delete if this key was previously marked as to be deleted - if modRev, ok := staleKeysPrevRound[key]; ok && - // comparing ModRevision ensures the same client is still holding - // this lock since the last GC was called. - modRev.ModRevision == v.ModRevision && - modRev.LeaseID == v.LeaseID && - modRev.SessionID == v.SessionID { - if err := k.backend.Delete(ctx, key); err == nil { - scopedLog.Warning("Forcefully removed distributed lock due to client staleness." + - " Please check the connectivity between the KVStore and the client with that lease ID.") - continue - } - scopedLog.WithError(err). - Warning("Unable to remove distributed lock due to client staleness." + - " Please check the connectivity between the KVStore and the client with that lease ID.") - } - // If the key was not found mark it to be delete in the next RunGC - staleKeys[key] = kvstore.Value{ - ModRevision: v.ModRevision, - LeaseID: v.LeaseID, - SessionID: v.SessionID, - } - } - - return staleKeys, nil -} - -// RunGC scans the kvstore for unused master keys and removes them -func (k *kvstoreBackend) RunGC( - ctx context.Context, - rateLimit *rate.Limiter, - staleKeysPrevRound map[string]uint64, - minID, maxID idpool.ID, -) (map[string]uint64, *allocator.GCStats, error) { - - // fetch list of all /id/ keys - allocated, err := k.backend.ListPrefix(ctx, k.idPrefix) - if err != nil { - return nil, nil, fmt.Errorf("list failed: %w", err) - } - - totalEntries := len(allocated) - deletedEntries := 0 - - staleKeys := map[string]uint64{} - - min := uint64(minID) - max := uint64(maxID) - reasonOutOfRange := "out of local cluster identity range [" + strconv.FormatUint(min, 10) + "," + strconv.FormatUint(max, 10) + "]" - - // iterate over /id/ - for key, v := range allocated { - // if k.lockless { - // FIXME: Add DeleteOnZeroCount support - // } - - // Parse identity ID - items := strings.Split(key, "/") - if len(items) == 0 { - log.WithField(fieldKey, key).WithError(err).Warning("Unknown identity key found, skipping") - continue - } - - if identityID, err := strconv.ParseUint(items[len(items)-1], 10, 64); err != nil { - log.WithField(fieldKey, key).WithError(err).Warning("Parse identity failed, skipping") - continue - } else { - // We should not GC those identities that are out of our scope - if identityID < min || identityID > max { - log.WithFields(logrus.Fields{ - fieldKey: key, - "reason": reasonOutOfRange, - }).Debug("Skipping this key") - continue - } - } - - lock, err := k.lockPath(ctx, key) - if err != nil { - log.WithError(err).WithField(fieldKey, key).Warning("allocator garbage collector was unable to lock key") - continue - } - - // fetch list of all /value/ keys - valueKeyPrefix := path.Join(k.valuePrefix, string(v.Data)) - pairs, err := k.backend.ListPrefixIfLocked(ctx, valueKeyPrefix, lock) - if err != nil { - log.WithError(err).WithField(fieldPrefix, valueKeyPrefix).Warning("allocator garbage collector was unable to list keys") - lock.Unlock(context.Background()) - continue - } - - hasUsers := false - for prefix := range pairs { - if prefixMatchesKey(valueKeyPrefix, prefix) { - hasUsers = true - break - } - } - - var deleted bool - // if ID has no user, delete it - if !hasUsers { - scopedLog := log.WithFields(logrus.Fields{ - fieldKey: key, - fieldID: path.Base(key), - }) - // Only delete if this key was previously marked as to be deleted - if modRev, ok := staleKeysPrevRound[key]; ok { - // if the v.ModRevision is different than the modRev (which is - // the last seen v.ModRevision) then this key was re-used in - // between GC calls. We should not mark it as stale keys yet, - // but the next GC call will do it. - if modRev == v.ModRevision { - if err := k.backend.DeleteIfLocked(ctx, key, lock); err != nil { - scopedLog.WithError(err).Warning("Unable to delete unused allocator master key") - } else { - deletedEntries++ - scopedLog.Info("Deleted unused allocator master key") - } - // consider the key regardless if there was an error from - // the kvstore. We want to rate limit the number of requests - // done to the KVStore. - deleted = true - } - } else { - // If the key was not found mark it to be delete in the next RunGC - staleKeys[key] = v.ModRevision - } - } - - lock.Unlock(context.Background()) - if deleted { - // Wait after deleted the key. This is not ideal because we have - // done the operation that should be rate limited before checking the - // rate limit. We have to do this here to avoid holding the global lock - // for a long period of time. - err = rateLimit.Wait(ctx) - if err != nil { - return nil, nil, err - } - } - } - - gcStats := &allocator.GCStats{ - Alive: totalEntries - deletedEntries, - Deleted: deletedEntries, - } - return staleKeys, gcStats, nil -} - -func (k *kvstoreBackend) keyToID(key string) (id idpool.ID, err error) { - if !strings.HasPrefix(key, k.idPrefix) { - return idpool.NoID, fmt.Errorf("Found invalid key \"%s\" outside of prefix \"%s\"", key, k.idPrefix) - } - - suffix := strings.TrimPrefix(key, k.idPrefix) - if suffix[0] == '/' { - suffix = suffix[1:] - } - - idParsed, err := strconv.ParseUint(suffix, 10, 64) - if err != nil { - return idpool.NoID, fmt.Errorf("Cannot parse key suffix \"%s\"", suffix) - } - - return idpool.ID(idParsed), nil -} - -func (k *kvstoreBackend) ListAndWatch(ctx context.Context, handler allocator.CacheMutations, stopChan chan struct{}) { - watcher := k.backend.ListAndWatch(ctx, k.idPrefix, 512) - - for { - select { - case event, ok := <-watcher.Events: - if !ok { - goto abort - } - if event.Typ == kvstore.EventTypeListDone { - handler.OnListDone() - continue - } - - id, err := k.keyToID(event.Key) - switch { - case err != nil: - log.WithError(err).WithField(fieldKey, event.Key).Warning("Invalid key") - - case id != idpool.NoID: - var key allocator.AllocatorKey - - if len(event.Value) > 0 { - s, err := k.backend.Decode(string(event.Value)) - if err != nil { - log.WithError(err).WithFields(logrus.Fields{ - fieldKey: event.Key, - fieldValue: event.Value, - }).Warning("Unable to decode key value") - continue - } - - key = k.keyType.PutKey(string(s)) - } else { - if event.Typ != kvstore.EventTypeDelete { - log.WithFields(logrus.Fields{ - fieldKey: event.Key, - fieldEventType: event.Typ, - }).Error("Received a key with an empty value") - continue - } - } - - switch event.Typ { - case kvstore.EventTypeCreate: - handler.OnAdd(id, key) - - case kvstore.EventTypeModify: - handler.OnModify(id, key) - - case kvstore.EventTypeDelete: - handler.OnDelete(id, key) - } - } - - case <-stopChan: - goto abort - } - } - -abort: - watcher.Stop() -} - -func (k *kvstoreBackend) Status() (string, error) { - return k.backend.Status() -} - -func (k *kvstoreBackend) Encode(v string) string { - return k.backend.Encode([]byte(v)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/allocator/doc.go b/vendor/github.com/cilium/cilium/pkg/kvstore/allocator/doc.go deleted file mode 100644 index 26c9a9aad10..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/allocator/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package allocator provides a kvstore based ID allocator -package allocator diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/allocator/logfields.go b/vendor/github.com/cilium/cilium/pkg/kvstore/allocator/logfields.go deleted file mode 100644 index e6f03302970..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/allocator/logfields.go +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package allocator - -const ( - fieldID = "id" - fieldKey = "key" - fieldPrefix = "prefix" - fieldValue = "value" - fieldLeaseID = "leaseID" - fieldEventType = "eventType" -) diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/backend.go b/vendor/github.com/cilium/cilium/pkg/kvstore/backend.go deleted file mode 100644 index b9a5ad5da8d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/backend.go +++ /dev/null @@ -1,236 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "context" - - "google.golang.org/grpc" - - "github.com/cilium/cilium/pkg/time" -) - -type backendOption struct { - // description is the description of the option - description string - - // value is the value the option has been configured to - value string - - // validate, if set, is called to validate the value before assignment - validate func(value string) error -} - -type backendOptions map[string]*backendOption - -type ClusterSizeDependantIntervalFunc func(baseInterval time.Duration) time.Duration - -// ExtraOptions represents any options that can not be represented in a textual -// format and need to be set programmatically. -type ExtraOptions struct { - DialOption []grpc.DialOption - - // ClusterSizeDependantInterval defines the function to calculate - // intervals based on cluster size - ClusterSizeDependantInterval ClusterSizeDependantIntervalFunc - - // NoLockQuorumCheck disables the lock acquisition quorum check - NoLockQuorumCheck bool - - // ClusterName is the name of each etcd cluster - ClusterName string -} - -// StatusCheckInterval returns the interval of status checks depending on the -// cluster size and the current connectivity state -// -// nodes OK Failing -// 1 20s 3s -// 4 45s 7s -// 8 1m05s 11s -// 32 1m45s 18s -// 128 2m25s 24s -// 512 3m07s 32s -// 2048 3m46s 38s -// 8192 4m30s 45s -func (e *ExtraOptions) StatusCheckInterval(allConnected bool) time.Duration { - interval := 30 * time.Second - - // Reduce the interval while connectivity issues are being detected - if !allConnected { - interval = 5 * time.Second - } - - if e != nil && e.ClusterSizeDependantInterval != nil { - interval = e.ClusterSizeDependantInterval(interval) - } - return interval -} - -// backendModule is the interface that each kvstore backend has to implement. -type backendModule interface { - // getName must return the name of the backend - getName() string - - // setConfig must configure the backend with the specified options. - // This function is called once before newClient(). - setConfig(opts map[string]string) error - - // setExtraConfig sets more options in the kvstore that are not able to - // be set by strings. - setExtraConfig(opts *ExtraOptions) error - - // setConfigDummy must configure the backend with dummy configuration - // for testing purposes. This is a replacement for setConfig(). - setConfigDummy() - - // getConfig must return the backend configuration. - getConfig() map[string]string - - // newClient must initializes the backend and create a new kvstore - // client which implements the BackendOperations interface - newClient(ctx context.Context, opts *ExtraOptions) (BackendOperations, chan error) - - // createInstance creates a new instance of the module - createInstance() backendModule -} - -var ( - // registeredBackends is a slice of all backends that have registered - // itself via registerBackend() - registeredBackends = map[string]backendModule{} -) - -// registerBackend must be called by kvstore backends to register themselves -func registerBackend(name string, module backendModule) { - if _, ok := registeredBackends[name]; ok { - log.Panicf("backend with name '%s' already registered", name) - } - - registeredBackends[name] = module -} - -// getBackend finds a registered backend by name -func getBackend(name string) backendModule { - if backend, ok := registeredBackends[name]; ok { - return backend.createInstance() - } - - return nil -} - -// BackendOperations are the individual kvstore operations that each backend -// must implement. Direct use of this interface is possible but will bypass the -// tracing layer. -type BackendOperations interface { - // Connected returns a channel which is closed whenever the kvstore client - // is connected to the kvstore server. - Connected(ctx context.Context) <-chan error - - // Disconnected returns a channel which is closed whenever the kvstore - // client is not connected to the kvstore server. (Only implemented for etcd) - Disconnected() <-chan struct{} - - // Status returns the status of the kvstore client including an - // eventual error - Status() (string, error) - - // StatusCheckErrors returns a channel which receives status check - // errors - StatusCheckErrors() <-chan error - - // LockPath locks the provided path - LockPath(ctx context.Context, path string) (KVLocker, error) - - // Get returns value of key - Get(ctx context.Context, key string) ([]byte, error) - - // GetIfLocked returns value of key if the client is still holding the given lock. - GetIfLocked(ctx context.Context, key string, lock KVLocker) ([]byte, error) - - // GetPrefix returns the first key which matches the prefix and its value - GetPrefix(ctx context.Context, prefix string) (string, []byte, error) - - // GetPrefixIfLocked returns the first key which matches the prefix and its value if the client is still holding the given lock. - GetPrefixIfLocked(ctx context.Context, prefix string, lock KVLocker) (string, []byte, error) - - // Set sets value of key - Set(ctx context.Context, key string, value []byte) error - - // Delete deletes a key. It does not return an error if the key does not exist. - Delete(ctx context.Context, key string) error - - // DeleteIfLocked deletes a key if the client is still holding the given lock. It does not return an error if the key does not exist. - DeleteIfLocked(ctx context.Context, key string, lock KVLocker) error - - DeletePrefix(ctx context.Context, path string) error - - // Update creates or updates a key. - Update(ctx context.Context, key string, value []byte, lease bool) error - - // UpdateIfLocked updates a key if the client is still holding the given lock. - UpdateIfLocked(ctx context.Context, key string, value []byte, lease bool, lock KVLocker) error - - // UpdateIfDifferent updates a key if the value is different - UpdateIfDifferent(ctx context.Context, key string, value []byte, lease bool) (bool, error) - - // UpdateIfDifferentIfLocked updates a key if the value is different and if the client is still holding the given lock. - UpdateIfDifferentIfLocked(ctx context.Context, key string, value []byte, lease bool, lock KVLocker) (bool, error) - - // CreateOnly atomically creates a key or fails if it already exists - CreateOnly(ctx context.Context, key string, value []byte, lease bool) (bool, error) - - // CreateOnlyIfLocked atomically creates a key if the client is still holding the given lock or fails if it already exists - CreateOnlyIfLocked(ctx context.Context, key string, value []byte, lease bool, lock KVLocker) (bool, error) - - // CreateIfExists creates a key with the value only if key condKey exists - CreateIfExists(ctx context.Context, condKey, key string, value []byte, lease bool) error - - // ListPrefix returns a list of keys matching the prefix - ListPrefix(ctx context.Context, prefix string) (KeyValuePairs, error) - - // ListPrefixIfLocked returns a list of keys matching the prefix only if the client is still holding the given lock. - ListPrefixIfLocked(ctx context.Context, prefix string, lock KVLocker) (KeyValuePairs, error) - - // Watch starts watching for changes in a prefix. If list is true, the - // current keys matching the prefix will be listed and reported as new - // keys first. - Watch(ctx context.Context, w *Watcher) - - // Close closes the kvstore client - Close(ctx context.Context) - - // GetCapabilities returns the capabilities of the backend - GetCapabilities() Capabilities - - // Encodes a binary slice into a character set that the backend - // supports - Encode(in []byte) string - - // Decodes a key previously encoded back into the original binary slice - Decode(in string) ([]byte, error) - - // ListAndWatch creates a new watcher which will watch the specified - // prefix for changes. Before doing this, it will list the current keys - // matching the prefix and report them as new keys. The Events channel is - // created with the specified sizes. Upon every change observed, a - // KeyValueEvent will be sent to the Events channel - ListAndWatch(ctx context.Context, prefix string, chanSize int) *Watcher - - // RegisterLeaseExpiredObserver registers a function which is executed when - // the lease associated with a key having the given prefix is detected as expired. - // If the function is nil, the previous observer (if any) is unregistered. - RegisterLeaseExpiredObserver(prefix string, fn func(key string)) - - BackendOperationsUserMgmt -} - -// BackendOperationsUserMgmt are the kvstore operations for users management. -type BackendOperationsUserMgmt interface { - // UserEnforcePresence creates a user in the kvstore if not already present, and grants the specified roles. - UserEnforcePresence(ctx context.Context, name string, roles []string) error - - // UserEnforcePresence deletes a user from the kvstore, if present. - UserEnforceAbsence(ctx context.Context, name string) error -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/backwards_compat.go b/vendor/github.com/cilium/cilium/pkg/kvstore/backwards_compat.go deleted file mode 100644 index a5417c5b17a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/backwards_compat.go +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import "context" - -const ( - // OperationalPath is the base path to store the operational details in the kvstore. - OperationalPath = "cilium-net/operational" - - // servicePathV1 is the base path for the services stored in the kvstore. - servicePathV1 = OperationalPath + "/Services/" -) - -// deleteLegacyPrefixes removes old kvstore prefixes of non-persistent keys -// which have been used in the past but have been obsoleted since. We remove -// them on agent start to ensure that as users upgrade, we do not leave behind -// stale keys -// -// Rules: -// -// - For non-persistent state, obsoletd prefixes can be deleted as soon as the -// prefix has been declared obsolete -// - For persistent configuration stored in the kvstore, a forward upgrade -// path must be created which automatically removes the old keys on successful -// translation. -func deleteLegacyPrefixes(ctx context.Context) { - // Delete all keys in old services prefix - Client().DeletePrefix(ctx, servicePathV1) -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/cell.go b/vendor/github.com/cilium/cilium/pkg/kvstore/cell.go deleted file mode 100644 index 32b27ad8166..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/cell.go +++ /dev/null @@ -1,161 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "context" - "errors" - "fmt" - "sync" - - "github.com/spf13/pflag" - - "github.com/cilium/cilium/pkg/defaults" - "github.com/cilium/cilium/pkg/hive" - "github.com/cilium/cilium/pkg/hive/cell" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/promise" - "github.com/cilium/cilium/pkg/time" -) - -// Cell returns a cell which provides a promise for the global kvstore client. -// The parameter allows to customize the default backend, which can be either -// set to a specific value (e.g., in the case of clustermesh-apiserver) or -// left unset. -var Cell = func(defaultBackend string) cell.Cell { - return cell.Module( - "kvstore-client", - "KVStore Client", - - cell.Config(config{ - KVStore: defaultBackend, - KVStoreConnectivityTimeout: defaults.KVstoreConnectivityTimeout, - KVStoreLeaseTTL: defaults.KVstoreLeaseTTL, - KVStorePeriodicSync: defaults.KVstorePeriodicSync, - KVstoreMaxConsecutiveQuorumErrors: defaults.KVstoreMaxConsecutiveQuorumErrors, - }), - - cell.Provide(func(lc cell.Lifecycle, shutdowner hive.Shutdowner, cfg config, opts *ExtraOptions) promise.Promise[BackendOperations] { - resolver, promise := promise.New[BackendOperations]() - if cfg.KVStore == "" { - log.Info("Skipping connection to kvstore, as not configured") - resolver.Reject(errors.New("kvstore not configured")) - return promise - } - - // Propagate the options to the global variables for backward compatibility - option.Config.KVStore = cfg.KVStore - option.Config.KVStoreOpt = cfg.KVStoreOpt - option.Config.KVstoreConnectivityTimeout = cfg.KVStoreConnectivityTimeout - option.Config.KVstoreLeaseTTL = cfg.KVStoreLeaseTTL - option.Config.KVstorePeriodicSync = cfg.KVStorePeriodicSync - option.Config.KVstoreMaxConsecutiveQuorumErrors = cfg.KVstoreMaxConsecutiveQuorumErrors - - ctx, cancel := context.WithCancel(context.Background()) - var wg sync.WaitGroup - - lc.Append(cell.Hook{ - OnStart: func(cell.HookContext) error { - wg.Add(1) - go func() { - defer wg.Done() - - log := log.WithField(logfields.BackendName, cfg.KVStore) - log.Info("Establishing connection to kvstore") - backend, errCh := NewClient(ctx, cfg.KVStore, cfg.KVStoreOpt, opts) - - if err, isErr := <-errCh; isErr { - log.WithError(err).Error("Failed to establish connection to kvstore") - resolver.Reject(fmt.Errorf("failed connecting to kvstore: %w", err)) - shutdowner.Shutdown(hive.ShutdownWithError(err)) - return - } - - log.Info("Connection to kvstore successfully established") - resolver.Resolve(backend) - }() - return nil - }, - OnStop: func(cell.HookContext) error { - cancel() - wg.Wait() - - // We don't explicitly close the backend here, because that would - // attempt to revoke the lease, causing all entries associated - // with that lease to be deleted. This would not be the - // behavior expected by the consumers of this cell. - return nil - }, - }) - - return promise - }), - ) -} - -type config struct { - KVStore string - KVStoreOpt map[string]string - KVStoreConnectivityTimeout time.Duration - KVStoreLeaseTTL time.Duration - KVStorePeriodicSync time.Duration - KVstoreMaxConsecutiveQuorumErrors uint -} - -func (def config) Flags(flags *pflag.FlagSet) { - flags.String(option.KVStore, def.KVStore, "Key-value store type") - - flags.StringToString(option.KVStoreOpt, def.KVStoreOpt, - "Key-value store options e.g. etcd.address=127.0.0.1:4001") - - flags.Duration(option.KVstoreConnectivityTimeout, def.KVStoreConnectivityTimeout, - "Time after which an incomplete kvstore operation is considered failed") - - flags.Duration(option.KVstoreLeaseTTL, def.KVStoreLeaseTTL, - "Time-to-live for the KVstore lease.") - flags.MarkHidden(option.KVstoreLeaseTTL) - - flags.Duration(option.KVstorePeriodicSync, def.KVStorePeriodicSync, - "Periodic KVstore synchronization interval") - - flags.Uint(option.KVstoreMaxConsecutiveQuorumErrorsName, def.KVstoreMaxConsecutiveQuorumErrors, - "Max acceptable kvstore consecutive quorum errors before recreating the etcd connection") -} - -// GlobalUserMgmtClientPromiseCell provides a promise returning the global kvstore client to perform users -// management operations, once it has been initialized. -var GlobalUserMgmtClientPromiseCell = cell.Module( - "global-kvstore-users-client", - "Global KVStore Users Management Client Promise", - - cell.Provide(func(lc cell.Lifecycle, backendPromise promise.Promise[BackendOperations]) promise.Promise[BackendOperationsUserMgmt] { - resolver, promise := promise.New[BackendOperationsUserMgmt]() - ctx, cancel := context.WithCancel(context.Background()) - var wg sync.WaitGroup - - lc.Append(cell.Hook{ - OnStart: func(cell.HookContext) error { - wg.Add(1) - go func() { - backend, err := backendPromise.Await(ctx) - if err != nil { - resolver.Reject(err) - } else { - resolver.Resolve(backend) - } - wg.Done() - }() - return nil - }, - OnStop: func(cell.HookContext) error { - cancel() - wg.Wait() - return nil - }, - }) - - return promise - }), -) diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/client.go b/vendor/github.com/cilium/cilium/pkg/kvstore/client.go deleted file mode 100644 index 60b68f1091a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/client.go +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "context" - "fmt" - - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/time" -) - -var ( - // defaultClient is the default client initialized by initClient - defaultClient BackendOperations - // defaultClientSet is a channel that is closed whenever the defaultClient - // is set. - defaultClientSet = make(chan struct{}) -) - -func initClient(ctx context.Context, module backendModule, opts *ExtraOptions) error { - scopedLog := log.WithField(fieldKVStoreModule, module.getName()) - c, errChan := module.newClient(ctx, opts) - if c == nil { - err := <-errChan - scopedLog.WithError(err).Fatal("Unable to create kvstore client") - } - - defaultClient = c - select { - case <-defaultClientSet: - // avoid closing channel already closed. - default: - close(defaultClientSet) - } - - go func() { - err, isErr := <-errChan - if isErr && err != nil { - scopedLog.WithError(err).Fatal("Unable to connect to kvstore") - } - if !option.Config.JoinCluster { - deleteLegacyPrefixes(ctx) - } - }() - - return nil -} - -// Client returns the global kvstore, blocking until it has been configured -func Client() BackendOperations { - <-defaultClientSet - return defaultClient -} - -// NewClient returns a new kvstore client based on the configuration -func NewClient(ctx context.Context, selectedBackend string, opts map[string]string, options *ExtraOptions) (BackendOperations, chan error) { - // Channel used to report immediate errors, module.newClient will - // create and return a different channel, caller doesn't need to know - errChan := make(chan error, 1) - defer close(errChan) - - module := getBackend(selectedBackend) - if module == nil { - errChan <- fmt.Errorf("unknown key-value store type %q. See cilium.link/err-kvstore for details", selectedBackend) - return nil, errChan - } - - if err := module.setConfig(opts); err != nil { - errChan <- err - return nil, errChan - } - - if err := module.setExtraConfig(options); err != nil { - errChan <- err - return nil, errChan - } - - return module.newClient(ctx, options) -} - -// Connected returns a channel which is closed when the following conditions -// are being met at the same time: -// * The kvstore client is configured -// * Connectivity to the kvstore has been established -// * The kvstore has quorum -// -// The channel will *not* be closed if the kvstore client is closed before -// connectivity or quorum has been achieved. It will wait until a new kvstore -// client is configured to again wait for connectivity and quorum. -func Connected() <-chan struct{} { - c := make(chan struct{}) - go func(c chan struct{}) { - for { - if err := <-Client().Connected(context.Background()); err == nil { - close(c) - return - } - time.Sleep(100 * time.Millisecond) - } - }(c) - return c -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/config.go b/vendor/github.com/cilium/cilium/pkg/kvstore/config.go deleted file mode 100644 index 7e85d4f0669..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/config.go +++ /dev/null @@ -1,103 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "context" - "fmt" - "sync" - - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var ( - // selectedModule is the name of the selected backend module - selectedModule string -) - -// setOpts validates the specified options against the selected backend and -// then modifies the configuration -func setOpts(opts map[string]string, supportedOpts backendOptions) error { - errors := 0 - - for key, val := range opts { - opt, ok := supportedOpts[key] - if !ok { - errors++ - log.WithField(logfields.Key, key).Error("unknown kvstore configuration key") - continue - } - - if opt.validate != nil { - if err := opt.validate(val); err != nil { - log.WithError(err).Errorf("invalid value for key %s", key) - errors++ - } - } - - } - - // if errors have occurred, print the supported configuration keys to - // the log - if errors > 0 { - log.Error("Supported configuration keys:") - for key, val := range supportedOpts { - log.Errorf(" %-12s %s", key, val.description) - } - - return fmt.Errorf("invalid kvstore configuration, see log for details") - } - - // modify the configuration atomically after verification - for key, val := range opts { - supportedOpts[key].value = val - } - - return nil -} - -func getOpts(opts backendOptions) map[string]string { - result := map[string]string{} - - for key, opt := range opts { - result[key] = opt.value - } - - return result -} - -var ( - setupOnce sync.Once -) - -func setup(ctx context.Context, selectedBackend string, opts map[string]string, goOpts *ExtraOptions) error { - module := getBackend(selectedBackend) - if module == nil { - return fmt.Errorf("unknown key-value store type %q. See cilium.link/err-kvstore for details", selectedBackend) - } - - if err := module.setConfig(opts); err != nil { - return err - } - - if err := module.setExtraConfig(goOpts); err != nil { - return err - } - - selectedModule = module.getName() - - return initClient(ctx, module, goOpts) -} - -// Setup sets up the key-value store specified in kvStore and configures it -// with the options provided in opts -func Setup(ctx context.Context, selectedBackend string, opts map[string]string, goOpts *ExtraOptions) error { - var err error - - setupOnce.Do(func() { - err = setup(ctx, selectedBackend, opts, goOpts) - }) - - return err -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/consul.go b/vendor/github.com/cilium/cilium/pkg/kvstore/consul.go deleted file mode 100644 index 287ec5f7d16..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/consul.go +++ /dev/null @@ -1,790 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "bytes" - "context" - "encoding/base64" - "errors" - "fmt" - "os" - - consulAPI "github.com/hashicorp/consul/api" - "github.com/sirupsen/logrus" - "gopkg.in/yaml.v3" - - "github.com/cilium/cilium/pkg/backoff" - "github.com/cilium/cilium/pkg/controller" - "github.com/cilium/cilium/pkg/inctimer" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/spanstat" - "github.com/cilium/cilium/pkg/time" -) - -const ( - consulName = "consul" - - // ConsulAddrOption is the string representing the key mapping to the value of the - // address for Consul. - ConsulAddrOption = "consul.address" - ConsulOptionConfig = "consul.tlsconfig" - - // maxLockRetries is the number of retries attempted when acquiring a lock - maxLockRetries = 10 -) - -type consulModule struct { - opts backendOptions - config *consulAPI.Config -} - -var ( - // consulDummyAddress can be overwritten from test invokers using ldflags - consulDummyAddress = "https://127.0.0.1:8501" - // consulDummyConfigFile can be overwritten from test invokers using ldflags - consulDummyConfigFile = "/tmp/cilium-consul-certs/cilium-consul.yaml" - - module = newConsulModule() - - // ErrNotImplemented is the error which is returned when a functionality is not implemented. - ErrNotImplemented = errors.New("not implemented") - - consulLeaseKeepaliveControllerGroup = controller.NewGroup("consul-lease-keepalive") -) - -func init() { - // register consul module for use - registerBackend(consulName, module) -} - -func newConsulModule() backendModule { - return &consulModule{ - opts: backendOptions{ - ConsulAddrOption: &backendOption{ - description: "Addresses of consul cluster", - }, - ConsulOptionConfig: &backendOption{ - description: "Path to consul tls configuration file", - }, - }, - } -} - -func ConsulDummyAddress() string { - return consulDummyAddress -} - -func ConsulDummyConfigFile() string { - return consulDummyConfigFile -} - -func (c *consulModule) createInstance() backendModule { - return newConsulModule() -} - -func (c *consulModule) getName() string { - return consulName -} - -func (c *consulModule) setConfigDummy() { - c.config = consulAPI.DefaultConfig() - c.config.Address = consulDummyAddress - yc := consulAPI.TLSConfig{} - b, err := os.ReadFile(consulDummyConfigFile) - if err != nil { - log.WithError(err).Warnf("unable to read consul tls configuration file %s", consulDummyConfigFile) - } - - err = yaml.Unmarshal(b, &yc) - if err != nil { - log.WithError(err).Warnf("invalid consul tls configuration in %s", consulDummyConfigFile) - } - - c.config.TLSConfig = yc -} - -func (c *consulModule) setConfig(opts map[string]string) error { - return setOpts(opts, c.opts) -} - -func (c *consulModule) setExtraConfig(opts *ExtraOptions) error { - return nil -} - -func (c *consulModule) getConfig() map[string]string { - return getOpts(c.opts) -} - -func (c *consulModule) newClient(ctx context.Context, opts *ExtraOptions) (BackendOperations, chan error) { - log.WithFields(logrus.Fields{ - logfields.URL: "https://cilium.herokuapp.com/", - }).Warning("Support for Consul as a kvstore backend has been deprecated due to lack of maintainers. If you are interested in helping to maintain Consul support in Cilium, please reach out on GitHub or the official Cilium slack") - - errChan := make(chan error, 1) - backend, err := c.connectConsulClient(ctx, opts) - if err != nil { - errChan <- err - } - close(errChan) - return backend, errChan -} - -func (c *consulModule) connectConsulClient(ctx context.Context, opts *ExtraOptions) (BackendOperations, error) { - if c.config == nil { - consulAddr, consulAddrSet := c.opts[ConsulAddrOption] - configPathOpt, configPathOptSet := c.opts[ConsulOptionConfig] - if !consulAddrSet { - return nil, fmt.Errorf("invalid consul configuration, please specify %s option", ConsulAddrOption) - } - - if consulAddr.value == "" { - return nil, fmt.Errorf("invalid consul configuration, please specify %s option", ConsulAddrOption) - } - - addr := consulAddr.value - c.config = consulAPI.DefaultConfig() - if configPathOptSet && configPathOpt.value != "" { - b, err := os.ReadFile(configPathOpt.value) - if err != nil { - return nil, fmt.Errorf("unable to read consul tls configuration file %s: %w", configPathOpt.value, err) - } - yc := consulAPI.TLSConfig{} - err = yaml.Unmarshal(b, &yc) - if err != nil { - return nil, fmt.Errorf("invalid consul tls configuration in %s: %w", configPathOpt.value, err) - } - c.config.TLSConfig = yc - } - - c.config.Address = addr - - } - client, err := newConsulClient(ctx, c.config, opts) - if err != nil { - return nil, err - } - - return client, nil -} - -var ( - maxRetries = 30 -) - -type consulClient struct { - *consulAPI.Client - lease string - controllers *controller.Manager - extraOptions *ExtraOptions - disconnectedMu lock.RWMutex - disconnected chan struct{} - statusCheckErrors chan error -} - -func newConsulClient(ctx context.Context, config *consulAPI.Config, opts *ExtraOptions) (BackendOperations, error) { - var ( - c *consulAPI.Client - err error - ) - if config != nil { - c, err = consulAPI.NewClient(config) - } else { - c, err = consulAPI.NewClient(consulAPI.DefaultConfig()) - } - if err != nil { - return nil, err - } - - boff := backoff.Exponential{Min: time.Duration(100) * time.Millisecond} - - for i := 0; i < maxRetries; i++ { - var leader string - leader, err = c.Status().Leader() - - if err == nil { - if leader != "" { - // happy path - break - } else { - err = errors.New("timeout while waiting for leader to be elected") - } - } - log.Info("Waiting for consul to elect a leader") - boff.Wait(ctx) - } - - if err != nil { - log.WithError(err).Fatal("Unable to contact consul server") - } - - entry := &consulAPI.SessionEntry{ - TTL: fmt.Sprintf("%ds", int(option.Config.KVstoreLeaseTTL.Seconds())), - Behavior: consulAPI.SessionBehaviorDelete, - } - - wo := &consulAPI.WriteOptions{} - lease, _, err := c.Session().Create(entry, wo.WithContext(ctx)) - if err != nil { - return nil, fmt.Errorf("unable to create default lease: %w", err) - } - - client := &consulClient{ - Client: c, - lease: lease, - controllers: controller.NewManager(), - extraOptions: opts, - disconnected: make(chan struct{}), - statusCheckErrors: make(chan error, 128), - } - - client.controllers.UpdateController( - fmt.Sprintf("consul-lease-keepalive-%p", c), - controller.ControllerParams{ - Group: consulLeaseKeepaliveControllerGroup, - DoFunc: func(ctx context.Context) error { - wo := &consulAPI.WriteOptions{} - _, _, err := c.Session().Renew(lease, wo.WithContext(ctx)) - if err != nil { - // consider disconnected! - client.disconnectedMu.Lock() - close(client.disconnected) - client.disconnected = make(chan struct{}) - client.disconnectedMu.Unlock() - } - return err - }, - RunInterval: option.Config.KVstoreKeepAliveInterval, - }, - ) - - return client, nil -} - -type ConsulLocker struct { - *consulAPI.Lock -} - -func (cl *ConsulLocker) Unlock(ctx context.Context) error { - return cl.Lock.Unlock() -} - -func (cl *ConsulLocker) Comparator() interface{} { - return nil -} - -func (c *consulClient) LockPath(ctx context.Context, path string) (KVLocker, error) { - lockKey, err := c.LockOpts(&consulAPI.LockOptions{Key: getLockPath(path)}) - if err != nil { - return nil, err - } - - for retries := 0; retries < maxLockRetries; retries++ { - ch, err := lockKey.Lock(nil) - switch { - case err != nil: - return nil, err - case ch == nil: - Trace("Acquiring lock timed out, retrying", nil, logrus.Fields{fieldKey: path, logfields.Attempt: retries}) - default: - return &ConsulLocker{Lock: lockKey}, err - } - - select { - case <-ctx.Done(): - return nil, fmt.Errorf("lock cancelled via context: %w", ctx.Err()) - default: - } - } - - return nil, fmt.Errorf("maximum retries (%d) reached", maxLockRetries) -} - -// Watch starts watching for changes in a prefix -func (c *consulClient) Watch(ctx context.Context, w *Watcher) { - // Last known state of all KVPairs matching the prefix - localState := map[string]consulAPI.KVPair{} - nextIndex := uint64(0) - - q := &consulAPI.QueryOptions{ - WaitTime: time.Second, - } - - qo := q.WithContext(ctx) - - sleepTimer, sleepTimerDone := inctimer.New() - defer sleepTimerDone() - - for { - // Initialize sleep time to a millisecond as we don't - // want to sleep in between successful watch cycles - sleepTime := 1 * time.Millisecond - - qo.WaitIndex = nextIndex - pairs, q, err := c.KV().List(w.Prefix, qo) - if err != nil { - sleepTime = 5 * time.Second - Trace("List of Watch failed", err, logrus.Fields{fieldPrefix: w.Prefix}) - } - - if q != nil { - nextIndex = q.LastIndex - } - - // timeout while watching for changes, re-schedule - if qo.WaitIndex != 0 && (q == nil || q.LastIndex == qo.WaitIndex) { - goto wait - } - - for _, newPair := range pairs { - oldPair, ok := localState[newPair.Key] - - // Keys reported for the first time must be new - if !ok { - if newPair.CreateIndex != newPair.ModifyIndex { - log.Debugf("consul: Previously unknown key %s received with CreateIndex(%d) != ModifyIndex(%d)", - newPair.Key, newPair.CreateIndex, newPair.ModifyIndex) - } - - queueStart := spanstat.Start() - w.Events <- KeyValueEvent{ - Typ: EventTypeCreate, - Key: newPair.Key, - Value: newPair.Value, - } - trackEventQueued(newPair.Key, EventTypeCreate, queueStart.End(true).Total()) - } else if oldPair.ModifyIndex != newPair.ModifyIndex { - queueStart := spanstat.Start() - w.Events <- KeyValueEvent{ - Typ: EventTypeModify, - Key: newPair.Key, - Value: newPair.Value, - } - trackEventQueued(newPair.Key, EventTypeModify, queueStart.End(true).Total()) - } - - // Everything left on localState will be assumed to - // have been deleted, therefore remove all keys in - // localState that still exist in the kvstore - delete(localState, newPair.Key) - } - - for k, deletedPair := range localState { - queueStart := spanstat.Start() - w.Events <- KeyValueEvent{ - Typ: EventTypeDelete, - Key: deletedPair.Key, - Value: deletedPair.Value, - } - trackEventQueued(deletedPair.Key, EventTypeDelete, queueStart.End(true).Total()) - delete(localState, k) - } - - for _, newPair := range pairs { - localState[newPair.Key] = *newPair - - } - - // Initial list operation has been completed, signal this - if qo.WaitIndex == 0 { - w.Events <- KeyValueEvent{Typ: EventTypeListDone} - } - - wait: - select { - case <-sleepTimer.After(sleepTime): - case <-w.stopWatch: - close(w.Events) - w.stopWait.Done() - return - } - } -} - -func (c *consulClient) waitForInitLock(ctx context.Context) <-chan struct{} { - initLockSucceeded := make(chan struct{}) - - go func() { - for { - locker, err := c.LockPath(ctx, InitLockPath) - if err == nil { - locker.Unlock(context.Background()) - close(initLockSucceeded) - log.Info("Distributed lock successful, consul has quorum") - return - } - - time.Sleep(100 * time.Millisecond) - } - }() - - return initLockSucceeded -} - -// Connected closes the returned channel when the consul client is connected. -func (c *consulClient) Connected(ctx context.Context) <-chan error { - ch := make(chan error) - go func() { - for { - qo := &consulAPI.QueryOptions{} - // TODO find out if there's a better way to do this for consul - _, _, err := c.Session().Info(c.lease, qo.WithContext(ctx)) - if err == nil { - break - } - time.Sleep(100 * time.Millisecond) - } - <-c.waitForInitLock(ctx) - close(ch) - }() - return ch -} - -// Disconnected closes the returned channel when consul detects the client -// is disconnected from the server. -func (c *consulClient) Disconnected() <-chan struct{} { - c.disconnectedMu.RLock() - ch := c.disconnected - c.disconnectedMu.RUnlock() - return ch -} - -func (c *consulClient) Status() (string, error) { - leader, err := c.Client.Status().Leader() - return "Consul: " + leader, err -} - -func (c *consulClient) DeletePrefix(ctx context.Context, path string) (err error) { - defer func() { Trace("DeletePrefix", err, logrus.Fields{fieldPrefix: path}) }() - - duration := spanstat.Start() - wo := &consulAPI.WriteOptions{} - _, err = c.Client.KV().DeleteTree(path, wo.WithContext(ctx)) - increaseMetric(path, metricDelete, "DeletePrefix", duration.EndError(err).Total(), err) - return err -} - -// Set sets value of key -func (c *consulClient) Set(ctx context.Context, key string, value []byte) (err error) { - defer func() { Trace("Set", err, logrus.Fields{fieldKey: key, fieldValue: string(value)}) }() - - duration := spanstat.Start() - wo := &consulAPI.WriteOptions{} - _, err = c.KV().Put(&consulAPI.KVPair{Key: key, Value: value}, wo.WithContext(ctx)) - increaseMetric(key, metricSet, "Set", duration.EndError(err).Total(), err) - return err -} - -// DeleteIfLocked deletes a key if the client is still holding the given lock. -func (c *consulClient) DeleteIfLocked(ctx context.Context, key string, lock KVLocker) (err error) { - defer func() { Trace("DeleteIfLocked", err, logrus.Fields{fieldKey: key}) }() - return c.delete(ctx, key) -} - -// Delete deletes a key -func (c *consulClient) Delete(ctx context.Context, key string) (err error) { - defer func() { Trace("Delete", err, logrus.Fields{fieldKey: key}) }() - return c.delete(ctx, key) -} - -func (c *consulClient) delete(ctx context.Context, key string) error { - duration := spanstat.Start() - wo := &consulAPI.WriteOptions{} - _, err := c.KV().Delete(key, wo.WithContext(ctx)) - increaseMetric(key, metricDelete, "Delete", duration.EndError(err).Total(), err) - return err -} - -// GetIfLocked returns value of key if the client is still holding the given lock. -func (c *consulClient) GetIfLocked(ctx context.Context, key string, lock KVLocker) (bv []byte, err error) { - defer func() { Trace("GetIfLocked", err, logrus.Fields{fieldKey: key, fieldValue: string(bv)}) }() - return c.Get(ctx, key) -} - -// Get returns value of key -func (c *consulClient) Get(ctx context.Context, key string) (bv []byte, err error) { - defer func() { Trace("Get", err, logrus.Fields{fieldKey: key, fieldValue: string(bv)}) }() - - duration := spanstat.Start() - qo := &consulAPI.QueryOptions{} - pair, _, err := c.KV().Get(key, qo.WithContext(ctx)) - increaseMetric(key, metricRead, "Get", duration.EndError(err).Total(), err) - if err != nil { - return nil, err - } - if pair == nil { - return nil, nil - } - return pair.Value, nil -} - -// GetPrefixIfLocked returns the first key which matches the prefix and its value if the client is still holding the given lock. -func (c *consulClient) GetPrefixIfLocked(ctx context.Context, prefix string, lock KVLocker) (k string, bv []byte, err error) { - defer func() { - Trace("GetPrefixIfLocked", err, logrus.Fields{fieldPrefix: prefix, fieldKey: k, fieldValue: string(bv)}) - }() - return c.getPrefix(ctx, prefix) -} - -// GetPrefix returns the first key which matches the prefix and its value -func (c *consulClient) GetPrefix(ctx context.Context, prefix string) (k string, bv []byte, err error) { - defer func() { - Trace("GetPrefix", err, logrus.Fields{fieldPrefix: prefix, fieldKey: k, fieldValue: string(bv)}) - }() - return c.getPrefix(ctx, prefix) -} - -func (c *consulClient) getPrefix(ctx context.Context, prefix string) (k string, bv []byte, err error) { - duration := spanstat.Start() - opts := &consulAPI.QueryOptions{} - pairs, _, err := c.KV().List(prefix, opts.WithContext(ctx)) - increaseMetric(prefix, metricRead, "GetPrefix", duration.EndError(err).Total(), err) - if err != nil { - return "", nil, err - } - - if len(pairs) == 0 { - return "", nil, nil - } - - return pairs[0].Key, pairs[0].Value, nil -} - -// UpdateIfLocked updates a key if the client is still holding the given lock. -func (c *consulClient) UpdateIfLocked(ctx context.Context, key string, value []byte, lease bool, lock KVLocker) error { - return c.Update(ctx, key, value, lease) -} - -// Update creates or updates a key with the value -func (c *consulClient) Update(ctx context.Context, key string, value []byte, lease bool) (err error) { - defer func() { - Trace("Update", err, logrus.Fields{fieldKey: key, fieldValue: string(value), fieldAttachLease: lease}) - }() - - k := &consulAPI.KVPair{Key: key, Value: value} - - if lease { - k.Session = c.lease - } - - opts := &consulAPI.WriteOptions{} - - duration := spanstat.Start() - _, err = c.KV().Put(k, opts.WithContext(ctx)) - increaseMetric(key, metricSet, "Update", duration.EndError(err).Total(), err) - return err -} - -// UpdateIfDifferentIfLocked updates a key if the value is different and if the client is still holding the given lock. -func (c *consulClient) UpdateIfDifferentIfLocked(ctx context.Context, key string, value []byte, lease bool, lock KVLocker) (recreated bool, err error) { - defer func() { - Trace("UpdateIfDifferentIfLocked", err, logrus.Fields{fieldKey: key, fieldValue: value, fieldAttachLease: lease, "recreated": recreated}) - }() - - return c.updateIfDifferent(ctx, key, value, lease) -} - -// UpdateIfDifferent updates a key if the value is different -func (c *consulClient) UpdateIfDifferent(ctx context.Context, key string, value []byte, lease bool) (recreated bool, err error) { - defer func() { - Trace("UpdateIfDifferent", err, logrus.Fields{fieldKey: key, fieldValue: value, fieldAttachLease: lease, "recreated": recreated}) - }() - - return c.updateIfDifferent(ctx, key, value, lease) -} - -func (c *consulClient) updateIfDifferent(ctx context.Context, key string, value []byte, lease bool) (bool, error) { - duration := spanstat.Start() - qo := &consulAPI.QueryOptions{} - getR, _, err := c.KV().Get(key, qo.WithContext(ctx)) - increaseMetric(key, metricRead, "Get", duration.EndError(err).Total(), err) - // On error, attempt update blindly - if err != nil || getR == nil { - return true, c.Update(ctx, key, value, lease) - } - - if lease && getR.Session != c.lease { - return true, c.Update(ctx, key, value, lease) - } - - // if lease is different and value is not equal then update. - if !bytes.Equal(getR.Value, value) { - return true, c.Update(ctx, key, value, lease) - } - - return false, nil -} - -// CreateOnlyIfLocked atomically creates a key if the client is still holding the given lock or fails if it already exists -func (c *consulClient) CreateOnlyIfLocked(ctx context.Context, key string, value []byte, lease bool, lock KVLocker) (success bool, err error) { - defer func() { - Trace("CreateOnlyIfLocked", err, logrus.Fields{fieldKey: key, fieldValue: value, fieldAttachLease: lease, "success": success}) - }() - return c.createOnly(ctx, key, value, lease) -} - -// CreateOnly creates a key with the value and will fail if the key already exists -func (c *consulClient) CreateOnly(ctx context.Context, key string, value []byte, lease bool) (success bool, err error) { - defer func() { - Trace("CreateOnly", err, logrus.Fields{fieldKey: key, fieldValue: value, fieldAttachLease: lease, "success": success}) - }() - - return c.createOnly(ctx, key, value, lease) -} - -func (c *consulClient) createOnly(ctx context.Context, key string, value []byte, lease bool) (bool, error) { - k := &consulAPI.KVPair{ - Key: key, - Value: value, - CreateIndex: 0, - } - - if lease { - k.Session = c.lease - } - opts := &consulAPI.WriteOptions{} - - duration := spanstat.Start() - success, _, err := c.KV().CAS(k, opts.WithContext(ctx)) - increaseMetric(key, metricSet, "CreateOnly", duration.EndError(err).Total(), err) - if err != nil { - return false, fmt.Errorf("unable to compare-and-swap: %w", err) - } - return success, nil -} - -// createIfExists creates a key with the value only if key condKey exists -func (c *consulClient) createIfExists(ctx context.Context, condKey, key string, value []byte, lease bool) error { - // Consul does not support transactions which would allow to check for - // the presence of a conditional key if the key is not the key being - // manipulated - // - // Lock the conditional key to serialize all CreateIfExists() calls - - l, err := LockPath(ctx, c, condKey) - if err != nil { - return fmt.Errorf("unable to lock condKey for CreateIfExists: %w", err) - } - - defer l.Unlock(context.Background()) - - // Create the key if it does not exist - if _, err := c.CreateOnly(ctx, key, value, lease); err != nil { - return err - } - - // Consul does not support transactions which would allow to check for - // the presence of another key - masterKey, err := c.Get(ctx, condKey) - if err != nil || masterKey == nil { - c.Delete(ctx, key) - return fmt.Errorf("conditional key not present") - } - - return nil -} - -// CreateIfExists creates a key with the value only if key condKey exists -func (c *consulClient) CreateIfExists(ctx context.Context, condKey, key string, value []byte, lease bool) (err error) { - defer func() { - Trace("CreateIfExists", err, logrus.Fields{fieldKey: key, fieldValue: string(value), fieldCondition: condKey, fieldAttachLease: lease}) - }() - - duration := spanstat.Start() - err = c.createIfExists(ctx, condKey, key, value, lease) - increaseMetric(key, metricSet, "CreateIfExists", duration.EndError(err).Total(), err) - return err -} - -// ListPrefixIfLocked returns a list of keys matching the prefix only if the client is still holding the given lock. -func (c *consulClient) ListPrefixIfLocked(ctx context.Context, prefix string, lock KVLocker) (v KeyValuePairs, err error) { - defer func() { Trace("ListPrefixIfLocked", err, logrus.Fields{fieldPrefix: prefix, fieldNumEntries: len(v)}) }() - return c.listPrefix(ctx, prefix) -} - -// ListPrefix returns a map of matching keys -func (c *consulClient) ListPrefix(ctx context.Context, prefix string) (v KeyValuePairs, err error) { - defer func() { Trace("ListPrefix", err, logrus.Fields{fieldPrefix: prefix, fieldNumEntries: len(v)}) }() - return c.listPrefix(ctx, prefix) -} - -func (c *consulClient) listPrefix(ctx context.Context, prefix string) (KeyValuePairs, error) { - duration := spanstat.Start() - qo := &consulAPI.QueryOptions{} - pairs, _, err := c.KV().List(prefix, qo.WithContext(ctx)) - increaseMetric(prefix, metricRead, "ListPrefix", duration.EndError(err).Total(), err) - if err != nil { - return nil, err - } - - p := KeyValuePairs(make(map[string]Value, len(pairs))) - for i := 0; i < len(pairs); i++ { - p[pairs[i].Key] = Value{ - Data: pairs[i].Value, - ModRevision: pairs[i].ModifyIndex, - SessionID: pairs[i].Session, - } - } - - return p, nil -} - -// Close closes the consul session -func (c *consulClient) Close(ctx context.Context) { - close(c.statusCheckErrors) - if c.controllers != nil { - c.controllers.RemoveAll() - } - if c.lease != "" { - c.Session().Destroy(c.lease, nil) - } -} - -// GetCapabilities returns the capabilities of the backend -func (c *consulClient) GetCapabilities() Capabilities { - return Capabilities(0) -} - -// Encode encodes a binary slice into a character set that the backend supports -func (c *consulClient) Encode(in []byte) (out string) { - defer func() { Trace("Encode", nil, logrus.Fields{"in": in, "out": out}) }() - return base64.URLEncoding.EncodeToString([]byte(in)) -} - -// Decode decodes a key previously encoded back into the original binary slice -func (c *consulClient) Decode(in string) (out []byte, err error) { - defer func() { Trace("Decode", err, logrus.Fields{"in": in, "out": out}) }() - return base64.URLEncoding.DecodeString(in) -} - -// ListAndWatch implements the BackendOperations.ListAndWatch using consul -func (c *consulClient) ListAndWatch(ctx context.Context, prefix string, chanSize int) *Watcher { - w := newWatcher(prefix, chanSize) - - log.WithField(fieldPrefix, prefix).Debug("Starting watcher...") - - go c.Watch(ctx, w) - - return w -} - -// StatusCheckErrors returns a channel which receives status check errors -func (c *consulClient) StatusCheckErrors() <-chan error { - return c.statusCheckErrors -} - -// RegisterLeaseExpiredObserver is not implemented for the consul backend -func (c *consulClient) RegisterLeaseExpiredObserver(prefix string, fn func(key string)) {} - -// UserEnforcePresence is not implemented for the consul backend -func (c *consulClient) UserEnforcePresence(ctx context.Context, name string, roles []string) error { - return ErrNotImplemented -} - -// UserEnforceAbsence is not implemented for the consul backend -func (c *consulClient) UserEnforceAbsence(ctx context.Context, name string) error { - return ErrNotImplemented -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/doc.go b/vendor/github.com/cilium/cilium/pkg/kvstore/doc.go deleted file mode 100644 index b69800a22fb..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package kvstore abstracts KVstore access and provides a high level API to -// atomically manage cluster wide resources -package kvstore diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/dummy.go b/vendor/github.com/cilium/cilium/pkg/kvstore/dummy.go deleted file mode 100644 index 989c24a42a5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/dummy.go +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "context" - "testing" - - "github.com/cilium/cilium/pkg/inctimer" - "github.com/cilium/cilium/pkg/time" -) - -// SetupDummy sets up kvstore for tests. A lock mechanism it used to prevent -// the creation of two clients at the same time, to avoid interferences in case -// different tests are run in parallel. A cleanup function is automatically -// registered to delete all keys and close the client when the test terminates. -func SetupDummy(tb testing.TB, dummyBackend string) { - SetupDummyWithConfigOpts(tb, dummyBackend, nil) -} - -// SetupDummyWithConfigOpts sets up the dummy kvstore for tests but also -// configures the module with the provided opts. A lock mechanism it used to -// prevent the creation of two clients at the same time, to avoid interferences -// in case different tests are run in parallel. A cleanup function is -// automatically registered to delete all keys and close the client when the -// test terminates. -func SetupDummyWithConfigOpts(tb testing.TB, dummyBackend string, opts map[string]string) { - module := getBackend(dummyBackend) - if module == nil { - tb.Fatalf("Unknown dummy kvstore backend %s", dummyBackend) - } - - module.setConfigDummy() - - if opts != nil { - err := module.setConfig(opts) - if err != nil { - tb.Fatalf("Unable to set config options for kvstore backend module: %v", err) - } - } - - if err := initClient(context.Background(), module, nil); err != nil { - tb.Fatalf("Unable to initialize kvstore client: %v", err) - } - - tb.Cleanup(func() { - if err := Client().DeletePrefix(context.Background(), ""); err != nil { - tb.Fatalf("Unable to delete all kvstore keys: %v", err) - } - - Client().Close(context.Background()) - }) - - ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) - defer cancel() - - if err := <-Client().Connected(ctx); err != nil { - tb.Fatalf("Failed waiting for kvstore connection to be established: %v", err) - } - - timer, done := inctimer.New() - defer done() - - // Multiple tests might be running in parallel by go test if they are part of - // different packages. Let's implement a locking mechanism to ensure that only - // one at a time can access the kvstore, to prevent that they interact with - // each other. Locking is implemented through CreateOnly (rather than using - // the locking abstraction), so that we can release it in the same atomic - // transaction that also removes all the other keys. - for { - succeeded, err := Client().CreateOnly(ctx, ".lock", []byte(""), true) - if err != nil { - tb.Fatalf("Unable to acquire the kvstore lock: %v", err) - } - - if succeeded { - return - } - - select { - case <-timer.After(100 * time.Millisecond): - case <-ctx.Done(): - tb.Fatal("Timed out waiting to acquire the kvstore lock") - } - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/etcd.go b/vendor/github.com/cilium/cilium/pkg/kvstore/etcd.go deleted file mode 100644 index 12bdd6bd69f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/etcd.go +++ /dev/null @@ -1,1892 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "bytes" - "context" - "crypto/tls" - "errors" - "fmt" - "net/url" - "os" - "strconv" - "strings" - - "github.com/sirupsen/logrus" - "go.etcd.io/etcd/api/v3/mvccpb" - v3rpcErrors "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.etcd.io/etcd/client/pkg/v3/logutil" - "go.etcd.io/etcd/client/pkg/v3/tlsutil" - client "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/client/v3/concurrency" - clientyaml "go.etcd.io/etcd/client/v3/yaml" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - "golang.org/x/time/rate" - "sigs.k8s.io/yaml" - - "github.com/cilium/cilium/pkg/backoff" - "github.com/cilium/cilium/pkg/defaults" - "github.com/cilium/cilium/pkg/inctimer" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/rand" - ciliumrate "github.com/cilium/cilium/pkg/rate" - ciliumratemetrics "github.com/cilium/cilium/pkg/rate/metrics" - "github.com/cilium/cilium/pkg/spanstat" - "github.com/cilium/cilium/pkg/time" -) - -const ( - // EtcdBackendName is the backend name for etcd - EtcdBackendName = "etcd" - - EtcdAddrOption = "etcd.address" - isEtcdOperatorOption = "etcd.operator" - EtcdOptionConfig = "etcd.config" - EtcdOptionKeepAliveHeartbeat = "etcd.keepaliveHeartbeat" - EtcdOptionKeepAliveTimeout = "etcd.keepaliveTimeout" - - // EtcdRateLimitOption specifies maximum kv operations per second - EtcdRateLimitOption = "etcd.qps" - - // EtcdMaxInflightOption specifies maximum inflight concurrent kv store operations - EtcdMaxInflightOption = "etcd.maxInflight" - - // EtcdListLimitOption limits the number of results retrieved in one batch - // by ListAndWatch operations. A 0 value equals to no limit. - EtcdListLimitOption = "etcd.limit" - - // etcdMaxKeysPerLease is the maximum number of keys that can be attached to a lease - etcdMaxKeysPerLease = 1000 -) - -var ( - // ErrLockLeaseExpired is an error whenever the lease of the lock does not - // exist or it was expired. - ErrLockLeaseExpired = errors.New("transaction did not succeed: lock lease expired") - - randGen = rand.NewSafeRand(time.Now().UnixNano()) -) - -type etcdModule struct { - opts backendOptions - config *client.Config -} - -var ( - // statusCheckTimeout is the timeout when performing status checks with - // all etcd endpoints - statusCheckTimeout = 10 * time.Second - - // initialConnectionTimeout is the timeout for the initial connection to - // the etcd server - initialConnectionTimeout = 15 * time.Minute - - // etcdDummyAddress can be overwritten from test invokers using ldflags - etcdDummyAddress = "http://127.0.0.1:4002" - - etcdInstance = newEtcdModule() - - // etcd3ClientLogger is the logger used for the underlying etcd clients. We - // explicitly initialize a logger and propagate it to prevent each client from - // automatically creating a new one, which comes with a significant memory cost. - etcd3ClientLogger *zap.Logger -) - -func EtcdDummyAddress() string { - return etcdDummyAddress -} - -func newEtcdModule() backendModule { - return &etcdModule{ - opts: backendOptions{ - isEtcdOperatorOption: &backendOption{ - description: "if the configuration is setting up an etcd-operator", - }, - EtcdAddrOption: &backendOption{ - description: "Addresses of etcd cluster", - }, - EtcdOptionConfig: &backendOption{ - description: "Path to etcd configuration file", - }, - EtcdOptionKeepAliveTimeout: &backendOption{ - description: "Timeout after which an unanswered heartbeat triggers the connection to be closed", - validate: func(v string) error { - _, err := time.ParseDuration(v) - return err - }, - }, - EtcdOptionKeepAliveHeartbeat: &backendOption{ - description: "Heartbeat interval to keep gRPC connection alive", - validate: func(v string) error { - _, err := time.ParseDuration(v) - return err - }, - }, - EtcdRateLimitOption: &backendOption{ - description: "Rate limit in kv store operations per second", - validate: func(v string) error { - _, err := strconv.Atoi(v) - return err - }, - }, - EtcdMaxInflightOption: &backendOption{ - description: "Maximum inflight concurrent kv store operations; defaults to etcd.qps if unset", - validate: func(v string) error { - _, err := strconv.Atoi(v) - return err - }, - }, - EtcdListLimitOption: &backendOption{ - description: "Max number of results retrieved in one batch by ListAndWatch operations (0 = no limit)", - validate: func(v string) error { - _, err := strconv.Atoi(v) - return err - }, - }, - }, - } -} - -func (e *etcdModule) createInstance() backendModule { - return newEtcdModule() -} - -func (e *etcdModule) getName() string { - return EtcdBackendName -} - -func (e *etcdModule) setConfigDummy() { - e.config = &client.Config{} - e.config.Endpoints = []string{etcdDummyAddress} -} - -func (e *etcdModule) setConfig(opts map[string]string) error { - return setOpts(opts, e.opts) -} - -func (e *etcdModule) setExtraConfig(opts *ExtraOptions) error { - if opts != nil && len(opts.DialOption) != 0 { - e.config = &client.Config{} - e.config.DialOptions = append(e.config.DialOptions, opts.DialOption...) - } - return nil -} - -func (e *etcdModule) getConfig() map[string]string { - return getOpts(e.opts) -} - -func shuffleEndpoints(endpoints []string) { - randGen.Shuffle(len(endpoints), func(i, j int) { - endpoints[i], endpoints[j] = endpoints[j], endpoints[i] - }) -} - -type clientOptions struct { - KeepAliveHeartbeat time.Duration - KeepAliveTimeout time.Duration - RateLimit int - MaxInflight int - ListBatchSize int -} - -func (e *etcdModule) newClient(ctx context.Context, opts *ExtraOptions) (BackendOperations, chan error) { - errChan := make(chan error, 10) - - clientOptions := clientOptions{ - KeepAliveHeartbeat: 15 * time.Second, - KeepAliveTimeout: 25 * time.Second, - RateLimit: defaults.KVstoreQPS, - ListBatchSize: 256, - } - - if o, ok := e.opts[EtcdRateLimitOption]; ok && o.value != "" { - clientOptions.RateLimit, _ = strconv.Atoi(o.value) - } - - if o, ok := e.opts[EtcdMaxInflightOption]; ok && o.value != "" { - clientOptions.MaxInflight, _ = strconv.Atoi(o.value) - } - - if clientOptions.MaxInflight == 0 { - clientOptions.MaxInflight = clientOptions.RateLimit - } - - if o, ok := e.opts[EtcdListLimitOption]; ok && o.value != "" { - clientOptions.ListBatchSize, _ = strconv.Atoi(o.value) - } - - if o, ok := e.opts[EtcdOptionKeepAliveTimeout]; ok && o.value != "" { - clientOptions.KeepAliveTimeout, _ = time.ParseDuration(o.value) - } - - if o, ok := e.opts[EtcdOptionKeepAliveHeartbeat]; ok && o.value != "" { - clientOptions.KeepAliveHeartbeat, _ = time.ParseDuration(o.value) - } - - endpointsOpt, endpointsSet := e.opts[EtcdAddrOption] - configPathOpt, configSet := e.opts[EtcdOptionConfig] - - var configPath string - if configSet { - configPath = configPathOpt.value - } - if e.config == nil { - if !endpointsSet && !configSet { - errChan <- fmt.Errorf("invalid etcd configuration, %s or %s must be specified", EtcdOptionConfig, EtcdAddrOption) - close(errChan) - return nil, errChan - } - - if endpointsOpt.value == "" && configPath == "" { - errChan <- fmt.Errorf("invalid etcd configuration, %s or %s must be specified", - EtcdOptionConfig, EtcdAddrOption) - close(errChan) - return nil, errChan - } - - e.config = &client.Config{} - } - - if e.config.Endpoints == nil && endpointsSet { - e.config.Endpoints = []string{endpointsOpt.value} - } - - log.WithFields(logrus.Fields{ - "ConfigPath": configPath, - "KeepAliveHeartbeat": clientOptions.KeepAliveHeartbeat, - "KeepAliveTimeout": clientOptions.KeepAliveTimeout, - "RateLimit": clientOptions.RateLimit, - "MaxInflight": clientOptions.MaxInflight, - "ListLimit": clientOptions.ListBatchSize, - }).Info("Creating etcd client") - - for { - // connectEtcdClient will close errChan when the connection attempt has - // been successful - backend, err := connectEtcdClient(ctx, e.config, configPath, errChan, clientOptions, opts) - switch { - case os.IsNotExist(err): - log.WithError(err).Info("Waiting for all etcd configuration files to be available") - time.Sleep(5 * time.Second) - case err != nil: - errChan <- err - close(errChan) - return backend, errChan - default: - return backend, errChan - } - } -} - -func init() { - // register etcd module for use - registerBackend(EtcdBackendName, etcdInstance) - - if duration := os.Getenv("CILIUM_ETCD_STATUS_CHECK_INTERVAL"); duration != "" { - timeout, err := time.ParseDuration(duration) - if err == nil { - statusCheckTimeout = timeout - } - } - - // Initialize the etcd client logger. - l, err := logutil.CreateDefaultZapLogger(etcdClientDebugLevel()) - if err != nil { - log.WithError(err).Warning("Failed to initialize etcd client logger") - l = zap.NewNop() - } - etcd3ClientLogger = l.Named("etcd-client") -} - -// etcdClientDebugLevel translates ETCD_CLIENT_DEBUG into zap log level. -// This is a copy of a private etcd client function: -// https://github.com/etcd-io/etcd/blob/v3.5.9/client/v3/logger.go#L47-L59 -func etcdClientDebugLevel() zapcore.Level { - envLevel := os.Getenv("ETCD_CLIENT_DEBUG") - if envLevel == "" || envLevel == "true" { - return zapcore.InfoLevel - } - var l zapcore.Level - if err := l.Set(envLevel); err != nil { - log.Warning("Invalid value for environment variable 'ETCD_CLIENT_DEBUG'. Using default level: 'info'") - return zapcore.InfoLevel - } - return l -} - -// Hint tries to improve the error message displayed to te user. -func Hint(err error) error { - if errors.Is(err, context.DeadlineExceeded) { - return fmt.Errorf("etcd client timeout exceeded") - } - return err -} - -type etcdClient struct { - // firstSession is a channel that will be closed once the first session - // is set up in the etcd client. If an error occurred and the initial - // session cannot be established, the error is provided via the - // channel. - firstSession chan struct{} - - // stopStatusChecker is closed when the status checker can be terminated - stopStatusChecker chan struct{} - - client *client.Client - - // config and configPath are initialized once and never written to again, they can be accessed without locking - config *client.Config - configPath string - - // statusCheckErrors receives all errors reported by statusChecker() - statusCheckErrors chan error - - // protects all sessions and sessionErr from concurrent access - lock.RWMutex - - sessionErr error - - // leaseManager manages the acquisition of etcd leases for generic purposes - leaseManager *etcdLeaseManager - // lockLeaseManager manages the acquisition of etcd leases for locking - // purposes, associated with a shorter TTL - lockLeaseManager *etcdLeaseManager - - // statusLock protects latestStatusSnapshot and latestErrorStatus for - // read/write access - statusLock lock.RWMutex - - // latestStatusSnapshot is a snapshot of the latest etcd cluster status - latestStatusSnapshot string - - // latestErrorStatus is the latest error condition of the etcd connection - latestErrorStatus error - - extraOptions *ExtraOptions - - limiter *ciliumrate.APILimiter - listBatchSize int - - lastHeartbeat time.Time - - leaseExpiredObservers lock.Map[string, func(string)] - - // logger is the scoped logger associated with this client - logger logrus.FieldLogger -} - -type etcdMutex struct { - mutex *concurrency.Mutex - onUnlock func() -} - -func (e *etcdMutex) Unlock(ctx context.Context) error { - e.onUnlock() - return e.mutex.Unlock(ctx) -} - -func (e *etcdMutex) Comparator() interface{} { - return e.mutex.IsOwner() -} - -// StatusCheckErrors returns a channel which receives status check errors -func (e *etcdClient) StatusCheckErrors() <-chan error { - return e.statusCheckErrors -} - -func (e *etcdClient) waitForInitLock(ctx context.Context) <-chan error { - initLockSucceeded := make(chan error) - - go func() { - for { - select { - case <-e.client.Ctx().Done(): - initLockSucceeded <- fmt.Errorf("client context ended: %w", e.client.Ctx().Err()) - close(initLockSucceeded) - return - case <-ctx.Done(): - initLockSucceeded <- fmt.Errorf("caller context ended: %w", ctx.Err()) - close(initLockSucceeded) - return - default: - } - - if e.extraOptions != nil && e.extraOptions.NoLockQuorumCheck { - close(initLockSucceeded) - return - } - - // Generate a random number so that we can acquire a lock even - // if other agents are killed while locking this path. - randNumber := strconv.FormatUint(randGen.Uint64(), 16) - locker, err := e.LockPath(ctx, InitLockPath+"/"+randNumber) - if err == nil { - locker.Unlock(context.Background()) - close(initLockSucceeded) - e.logger.Debug("Distributed lock successful, etcd has quorum") - return - } - - time.Sleep(100 * time.Millisecond) - } - }() - - return initLockSucceeded -} - -func (e *etcdClient) isConnectedAndHasQuorum(ctx context.Context) error { - ctxTimeout, cancel := context.WithTimeout(ctx, statusCheckTimeout) - defer cancel() - - select { - // Wait for the the initial connection to be established - case <-e.firstSession: - if err := e.sessionError(); err != nil { - return err - } - // Client is closing - case <-e.client.Ctx().Done(): - return fmt.Errorf("client is closing") - // Timeout while waiting for initial connection, no success - case <-ctxTimeout.Done(): - recordQuorumError("timeout") - return fmt.Errorf("timeout while waiting for initial connection") - } - - initLockSucceeded := e.waitForInitLock(ctxTimeout) - if err := <-initLockSucceeded; err != nil { - recordQuorumError("lock timeout") - return fmt.Errorf("unable to acquire lock: %w", err) - } - - return nil -} - -// Connected closes the returned channel when the etcd client is connected. If -// the context is cancelled or if the etcd client is closed, an error is -// returned on the channel. -func (e *etcdClient) Connected(ctx context.Context) <-chan error { - out := make(chan error) - go func() { - defer close(out) - for { - select { - case <-e.client.Ctx().Done(): - out <- fmt.Errorf("etcd client context ended") - return - case <-ctx.Done(): - out <- ctx.Err() - return - default: - } - if e.isConnectedAndHasQuorum(ctx) == nil { - return - } - time.Sleep(100 * time.Millisecond) - } - }() - return out -} - -// Disconnected closes the returned channel when the etcd client is -// disconnected after being reconnected. Blocks until the etcd client is first -// connected with the kvstore. -func (e *etcdClient) Disconnected() <-chan struct{} { - <-e.firstSession - - for { - session, err := e.lockLeaseManager.GetSession(context.Background(), InitLockPath) - if err == nil { - return session.Done() - } - - e.logger.WithError(err).Warning("Failed to acquire lock session") - time.Sleep(100 * time.Millisecond) - } -} - -func connectEtcdClient(ctx context.Context, config *client.Config, cfgPath string, errChan chan error, clientOptions clientOptions, opts *ExtraOptions) (BackendOperations, error) { - if cfgPath != "" { - cfg, err := newConfig(cfgPath) - if err != nil { - return nil, err - } - if cfg.TLS != nil { - cfg.TLS.GetClientCertificate, err = getClientCertificateReloader(cfgPath) - if err != nil { - return nil, err - } - } - cfg.DialOptions = append(cfg.DialOptions, config.DialOptions...) - config = cfg - } - - // Shuffle the order of endpoints to avoid all agents connecting to the - // same etcd endpoint and to work around etcd client library failover - // bugs. (https://github.com/etcd-io/etcd/pull/9860) - if config.Endpoints != nil { - shuffleEndpoints(config.Endpoints) - } - - // Set client context so that client can be cancelled from outside - config.Context = ctx - // Set DialTimeout to 0, otherwise the creation of a new client will - // block until DialTimeout is reached or a connection to the server - // is made. - config.DialTimeout = 0 - // Ping the server to verify if the server connection is still valid - config.DialKeepAliveTime = clientOptions.KeepAliveHeartbeat - // Timeout if the server does not reply within 15 seconds and close the - // connection. Ideally it should be lower than staleLockTimeout - config.DialKeepAliveTimeout = clientOptions.KeepAliveTimeout - - // Use the shared etcd client logger to prevent unnecessary allocations. - config.Logger = etcd3ClientLogger - - c, err := client.New(*config) - if err != nil { - return nil, err - } - - errorChan := make(chan error) - - limiter := ciliumrate.NewAPILimiter(makeSessionName("etcd", opts), ciliumrate.APILimiterParameters{ - RateLimit: rate.Limit(clientOptions.RateLimit), - RateBurst: clientOptions.RateLimit, - ParallelRequests: clientOptions.MaxInflight, - }, ciliumratemetrics.APILimiterObserver()) - - ec := &etcdClient{ - client: c, - config: config, - configPath: cfgPath, - firstSession: make(chan struct{}), - latestStatusSnapshot: "Waiting for initial connection to be established", - stopStatusChecker: make(chan struct{}), - extraOptions: opts, - limiter: limiter, - listBatchSize: clientOptions.ListBatchSize, - statusCheckErrors: make(chan error, 128), - logger: log.WithFields(logrus.Fields{ - "endpoints": config.Endpoints, - "config": cfgPath, - }), - } - - ec.logger.Info("Connecting to etcd server...") - - leaseTTL := option.Config.KVstoreLeaseTTL - if option.Config.KVstoreLeaseTTL == 0 { - leaseTTL = defaults.KVstoreLeaseTTL - } - - ec.leaseManager = newEtcdLeaseManager(c, leaseTTL, etcdMaxKeysPerLease, ec.expiredLeaseObserver, ec.logger) - ec.lockLeaseManager = newEtcdLeaseManager(c, defaults.LockLeaseTTL, etcdMaxKeysPerLease, nil, ec.logger) - - // create session in parallel as this is a blocking operation - go func() { - ls, err := ec.lockLeaseManager.GetSession(ctx, InitLockPath) - if err != nil { - errorChan <- err - close(errorChan) - return - } - - log.Infof("Got lock lease ID %x", ls.Lease()) - close(errorChan) - }() - - handleSessionError := func(err error) { - ec.RWMutex.Lock() - ec.sessionErr = err - ec.RWMutex.Unlock() - - ec.statusLock.Lock() - ec.latestStatusSnapshot = "Failed to establish initial connection" - ec.latestErrorStatus = err - ec.statusLock.Unlock() - - errChan <- err - ec.statusCheckErrors <- err - } - - // wait for session to be created also in parallel - go func() { - err := func() (err error) { - select { - case err = <-errorChan: - if err != nil { - return err - } - case <-time.After(initialConnectionTimeout): - return fmt.Errorf("timed out while waiting for etcd session. Ensure that etcd is running on %s", config.Endpoints) - } - - ec.logger.Info("Initial etcd session established") - - return nil - }() - - if err != nil { - handleSessionError(err) - close(errChan) - close(ec.firstSession) - close(ec.statusCheckErrors) - return - } - - close(errChan) - close(ec.firstSession) - - go ec.statusChecker() - - watcher := ec.ListAndWatch(ctx, HeartbeatPath, 128) - - for { - select { - case _, ok := <-watcher.Events: - if !ok { - log.Debug("Stopping heartbeat watcher") - watcher.Stop() - return - } - - // It is tempting to compare against the - // heartbeat value stored in the key. However, - // this would require the time on all nodes to - // be synchronized. Instead, assume current - // time and print the heartbeat value in debug - // messages for troubleshooting - ec.RWMutex.Lock() - ec.lastHeartbeat = time.Now() - ec.RWMutex.Unlock() - log.Debug("Received update notification of heartbeat") - case <-ctx.Done(): - return - } - } - }() - - return ec, nil -} - -// makeSessionName builds up a session/locksession controller name -// clusterName is expected to be empty for main kvstore connection -func makeSessionName(sessionPrefix string, opts *ExtraOptions) string { - if opts != nil && opts.ClusterName != "" { - return sessionPrefix + "-" + opts.ClusterName - } - return sessionPrefix -} - -func (e *etcdClient) sessionError() (err error) { - e.RWMutex.RLock() - err = e.sessionErr - e.RWMutex.RUnlock() - return -} - -func (e *etcdClient) LockPath(ctx context.Context, path string) (KVLocker, error) { - // Create the context first, so that the timeout also accounts for the time - // possibly required to acquire a new session (if not already established). - ctx, cancel := context.WithTimeout(ctx, time.Minute) - defer cancel() - - session, err := e.lockLeaseManager.GetSession(ctx, path) - if err != nil { - return nil, Hint(err) - } - - mu := concurrency.NewMutex(session, path) - err = mu.Lock(ctx) - if err != nil { - e.lockLeaseManager.CancelIfExpired(err, session.Lease()) - return nil, Hint(err) - } - - release := func() { e.lockLeaseManager.Release(path) } - return &etcdMutex{mutex: mu, onUnlock: release}, nil -} - -func (e *etcdClient) DeletePrefix(ctx context.Context, path string) (err error) { - defer func() { - Trace("DeletePrefix", err, logrus.Fields{fieldPrefix: path}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return Hint(err) - } - - defer func(duration *spanstat.SpanStat) { - increaseMetric(path, metricDelete, "DeletePrefix", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - _, err = e.client.Delete(ctx, path, client.WithPrefix()) - // Using lr.Error for convenience, as it matches lr.Done() when err is nil - lr.Error(err, -1) - - if err == nil { - e.leaseManager.ReleasePrefix(path) - } - - return Hint(err) -} - -// Watch starts watching for changes in a prefix -func (e *etcdClient) Watch(ctx context.Context, w *Watcher) { - localCache := watcherCache{} - listSignalSent := false - - defer func() { - close(w.Events) - w.stopWait.Done() - - // The watch might be aborted by closing - // the context instead of calling - // w.Stop() from outside. In that case - // we make sure to close everything and - // as this uses sync.Once it can be - // run multiple times (if that's the case). - w.Stop() - }() - - scopedLog := e.logger.WithField(fieldPrefix, w.Prefix) - scopedLog.Debug("Starting watcher...") - - err := <-e.Connected(ctx) - if err != nil { - // The context ended or the etcd client was closed - // before connectivity was achieved - return - } - - // errLimiter is used to rate limit the retry of the first Get request in case an error - // has occurred, to prevent overloading the etcd server due to the more aggressive - // default rate limiter. - errLimiter := backoff.Exponential{ - Name: "etcd-list-before-watch-error", - Min: 50 * time.Millisecond, - Max: 1 * time.Minute, - } - - if e.extraOptions != nil { - errLimiter.NodeManager = backoff.NewNodeManager(e.extraOptions.ClusterSizeDependantInterval) - } - -reList: - for { - select { - case <-e.client.Ctx().Done(): - return - case <-ctx.Done(): - return - default: - } - - lr, err := e.limiter.Wait(ctx) - if err != nil { - continue - } - kvs, revision, err := e.paginatedList(ctx, scopedLog, w.Prefix) - if err != nil { - lr.Error(err, -1) - scopedLog.WithError(Hint(err)).Warn("Unable to list keys before starting watcher") - errLimiter.Wait(ctx) - continue - } - lr.Done() - errLimiter.Reset() - - for _, key := range kvs { - t := EventTypeCreate - if localCache.Exists(key.Key) { - t = EventTypeModify - } - - localCache.MarkInUse(key.Key) - - if traceEnabled { - scopedLog.Debugf("Emitting list result as %s event for %s=%s", t, key.Key, key.Value) - } - - queueStart := spanstat.Start() - w.Events <- KeyValueEvent{ - Key: string(key.Key), - Value: key.Value, - Typ: t, - } - trackEventQueued(string(key.Key), t, queueStart.End(true).Total()) - } - - nextRev := revision + 1 - - // Send out deletion events for all keys that were deleted - // between our last known revision and the latest revision - // received via Get - localCache.RemoveDeleted(func(k string) { - event := KeyValueEvent{ - Key: k, - Typ: EventTypeDelete, - } - - if traceEnabled { - scopedLog.Debugf("Emitting EventTypeDelete event for %s", k) - } - - queueStart := spanstat.Start() - w.Events <- event - trackEventQueued(k, EventTypeDelete, queueStart.End(true).Total()) - }) - - // Only send the list signal once - if !listSignalSent { - w.Events <- KeyValueEvent{Typ: EventTypeListDone} - listSignalSent = true - } - - recreateWatcher: - scopedLog.WithField(fieldRev, nextRev).Debug("Starting to watch a prefix") - - lr, err = e.limiter.Wait(ctx) - if err != nil { - select { - case <-e.client.Ctx().Done(): - return - case <-ctx.Done(): - return - default: - goto recreateWatcher - } - } - - etcdWatch := e.client.Watch(client.WithRequireLeader(ctx), w.Prefix, - client.WithPrefix(), client.WithRev(nextRev)) - lr.Done() - - for { - select { - case <-e.client.Ctx().Done(): - return - case <-ctx.Done(): - return - case <-w.stopWatch: - return - case r, ok := <-etcdWatch: - if !ok { - time.Sleep(50 * time.Millisecond) - goto recreateWatcher - } - - scopedLog := scopedLog.WithField(fieldRev, r.Header.Revision) - - if err := r.Err(); err != nil { - // We tried to watch on a compacted - // revision that may no longer exist, - // recreate the watcher and try to - // watch on the next possible revision - if errors.Is(err, v3rpcErrors.ErrCompacted) { - scopedLog.WithError(Hint(err)).Debug("Tried watching on compacted revision") - } - - // mark all local keys in state for - // deletion unless the upcoming GET - // marks them alive - localCache.MarkAllForDeletion() - - goto reList - } - - nextRev = r.Header.Revision + 1 - if traceEnabled { - scopedLog.Debugf("Received event from etcd: %+v", r) - } - - for _, ev := range r.Events { - event := KeyValueEvent{ - Key: string(ev.Kv.Key), - Value: ev.Kv.Value, - } - - switch { - case ev.Type == client.EventTypeDelete: - event.Typ = EventTypeDelete - localCache.RemoveKey(ev.Kv.Key) - case ev.IsCreate(): - event.Typ = EventTypeCreate - localCache.MarkInUse(ev.Kv.Key) - default: - event.Typ = EventTypeModify - localCache.MarkInUse(ev.Kv.Key) - } - - if traceEnabled { - scopedLog.Debugf("Emitting %s event for %s=%s", event.Typ, event.Key, event.Value) - } - - queueStart := spanstat.Start() - w.Events <- event - trackEventQueued(string(ev.Kv.Key), event.Typ, queueStart.End(true).Total()) - } - } - } - } -} - -func (e *etcdClient) paginatedList(ctx context.Context, log *logrus.Entry, prefix string) (kvs []*mvccpb.KeyValue, revision int64, err error) { - start, end := prefix, client.GetPrefixRangeEnd(prefix) - - for { - res, err := e.client.Get(ctx, start, client.WithRange(end), - client.WithSort(client.SortByKey, client.SortAscend), - client.WithRev(revision), client.WithSerializable(), - client.WithLimit(int64(e.listBatchSize)), - ) - if err != nil { - return nil, 0, err - } - - log.WithFields(logrus.Fields{ - fieldNumEntries: len(res.Kvs), - fieldRemainingEntries: res.Count - int64(len(res.Kvs)), - }).Debug("Received list response from etcd") - - if kvs == nil { - kvs = make([]*mvccpb.KeyValue, 0, res.Count) - } - - kvs = append(kvs, res.Kvs...) - - revision = res.Header.Revision - if !res.More || len(res.Kvs) == 0 { - return kvs, revision, nil - } - - start = string(res.Kvs[len(res.Kvs)-1].Key) + "\x00" - } -} - -func (e *etcdClient) determineEndpointStatus(ctx context.Context, endpointAddress string) (string, error) { - ctxTimeout, cancel := context.WithTimeout(ctx, statusCheckTimeout) - defer cancel() - - e.logger.Debugf("Checking status to etcd endpoint %s", endpointAddress) - - status, err := e.client.Status(ctxTimeout, endpointAddress) - if err != nil { - return fmt.Sprintf("%s - %s", endpointAddress, err), Hint(err) - } - - str := fmt.Sprintf("%s - %s", endpointAddress, status.Version) - if status.Header.MemberId == status.Leader { - str += " (Leader)" - } - - return str, nil -} - -func (e *etcdClient) statusChecker() { - ctx := context.Background() - - var consecutiveQuorumErrors uint - - statusTimer, statusTimerDone := inctimer.New() - defer statusTimerDone() - - for { - newStatus := []string{} - ok := 0 - - quorumError := e.isConnectedAndHasQuorum(ctx) - - endpoints := e.client.Endpoints() - for _, ep := range endpoints { - st, err := e.determineEndpointStatus(ctx, ep) - if err == nil { - ok++ - } - - newStatus = append(newStatus, st) - } - - allConnected := len(endpoints) == ok - - e.RWMutex.RLock() - lastHeartbeat := e.lastHeartbeat - e.RWMutex.RUnlock() - - if heartbeatDelta := time.Since(lastHeartbeat); !lastHeartbeat.IsZero() && heartbeatDelta > 2*HeartbeatWriteInterval { - recordQuorumError("no event received") - quorumError = fmt.Errorf("%s since last heartbeat update has been received", heartbeatDelta) - } - - quorumString := "true" - if quorumError != nil { - quorumString = quorumError.Error() - consecutiveQuorumErrors++ - quorumString += fmt.Sprintf(", consecutive-errors=%d", consecutiveQuorumErrors) - } else { - consecutiveQuorumErrors = 0 - } - - e.statusLock.Lock() - - switch { - case consecutiveQuorumErrors > option.Config.KVstoreMaxConsecutiveQuorumErrors: - e.latestErrorStatus = fmt.Errorf("quorum check failed %d times in a row: %w", - consecutiveQuorumErrors, quorumError) - e.latestStatusSnapshot = e.latestErrorStatus.Error() - case len(endpoints) > 0 && ok == 0: - e.latestErrorStatus = fmt.Errorf("not able to connect to any etcd endpoints") - e.latestStatusSnapshot = e.latestErrorStatus.Error() - default: - e.latestErrorStatus = nil - e.latestStatusSnapshot = fmt.Sprintf("etcd: %d/%d connected, leases=%d, lock leases=%d, has-quorum=%s: %s", - ok, len(endpoints), e.leaseManager.TotalLeases(), e.lockLeaseManager.TotalLeases(), quorumString, strings.Join(newStatus, "; ")) - } - - e.statusLock.Unlock() - if e.latestErrorStatus != nil { - select { - case e.statusCheckErrors <- e.latestErrorStatus: - default: - // Channel's buffer is full, skip sending errors to the channel but log warnings instead - log.WithError(e.latestErrorStatus). - Warning("Status check error channel is full, dropping this error") - } - } - - select { - case <-e.stopStatusChecker: - close(e.statusCheckErrors) - return - case <-statusTimer.After(e.extraOptions.StatusCheckInterval(allConnected)): - } - } -} - -func (e *etcdClient) Status() (string, error) { - e.statusLock.RLock() - defer e.statusLock.RUnlock() - - return e.latestStatusSnapshot, Hint(e.latestErrorStatus) -} - -// GetIfLocked returns value of key if the client is still holding the given lock. -func (e *etcdClient) GetIfLocked(ctx context.Context, key string, lock KVLocker) (bv []byte, err error) { - defer func() { - Trace("GetIfLocked", err, logrus.Fields{fieldKey: key, fieldValue: string(bv)}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return nil, Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(key, metricRead, "GetLocked", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - opGet := client.OpGet(key) - cmp := lock.Comparator().(client.Cmp) - txnReply, err := e.client.Txn(ctx).If(cmp).Then(opGet).Commit() - if err == nil && !txnReply.Succeeded { - err = ErrLockLeaseExpired - } - - if err != nil { - lr.Error(err, -1) - return nil, Hint(err) - } - - lr.Done() - getR := txnReply.Responses[0].GetResponseRange() - // RangeResponse - if getR.Count == 0 { - return nil, nil - } - return getR.Kvs[0].Value, nil -} - -// Get returns value of key -func (e *etcdClient) Get(ctx context.Context, key string) (bv []byte, err error) { - defer func() { - Trace("Get", err, logrus.Fields{fieldKey: key, fieldValue: string(bv)}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return nil, Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(key, metricRead, "Get", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - getR, err := e.client.Get(ctx, key) - if err != nil { - lr.Error(err, -1) - return nil, Hint(err) - } - lr.Done() - - if getR.Count == 0 { - return nil, nil - } - return getR.Kvs[0].Value, nil -} - -// GetPrefixIfLocked returns the first key which matches the prefix and its value if the client is still holding the given lock. -func (e *etcdClient) GetPrefixIfLocked(ctx context.Context, prefix string, lock KVLocker) (k string, bv []byte, err error) { - defer func() { - Trace("GetPrefixIfLocked", err, logrus.Fields{fieldPrefix: prefix, fieldKey: k, fieldValue: string(bv)}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return "", nil, Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(prefix, metricRead, "GetPrefixLocked", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - opGet := client.OpGet(prefix, client.WithPrefix(), client.WithLimit(1)) - cmp := lock.Comparator().(client.Cmp) - txnReply, err := e.client.Txn(ctx).If(cmp).Then(opGet).Commit() - if err == nil && !txnReply.Succeeded { - err = ErrLockLeaseExpired - } - - if err != nil { - lr.Error(err, -1) - return "", nil, Hint(err) - } - lr.Done() - - getR := txnReply.Responses[0].GetResponseRange() - - if getR.Count == 0 { - return "", nil, nil - } - return string(getR.Kvs[0].Key), getR.Kvs[0].Value, nil -} - -// GetPrefix returns the first key which matches the prefix and its value -func (e *etcdClient) GetPrefix(ctx context.Context, prefix string) (k string, bv []byte, err error) { - defer func() { - Trace("GetPrefix", err, logrus.Fields{fieldPrefix: prefix, fieldKey: k, fieldValue: string(bv)}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return "", nil, Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(prefix, metricRead, "GetPrefix", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - getR, err := e.client.Get(ctx, prefix, client.WithPrefix(), client.WithLimit(1)) - if err != nil { - lr.Error(err, -1) - return "", nil, Hint(err) - } - lr.Done() - - if getR.Count == 0 { - return "", nil, nil - } - return string(getR.Kvs[0].Key), getR.Kvs[0].Value, nil -} - -// Set sets value of key -func (e *etcdClient) Set(ctx context.Context, key string, value []byte) (err error) { - defer func() { - Trace("Set", err, logrus.Fields{fieldKey: key, fieldValue: string(value)}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(key, metricSet, "Set", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - _, err = e.client.Put(ctx, key, string(value)) - // Using lr.Error for convenience, as it matches lr.Done() when err is nil - lr.Error(err, -1) - return Hint(err) -} - -// DeleteIfLocked deletes a key if the client is still holding the given lock. -func (e *etcdClient) DeleteIfLocked(ctx context.Context, key string, lock KVLocker) (err error) { - defer func() { - Trace("DeleteIfLocked", err, logrus.Fields{fieldKey: key}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(key, metricDelete, "DeleteLocked", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - opDel := client.OpDelete(key) - cmp := lock.Comparator().(client.Cmp) - txnReply, err := e.client.Txn(ctx).If(cmp).Then(opDel).Commit() - if err == nil && !txnReply.Succeeded { - err = ErrLockLeaseExpired - } - if err == nil { - e.leaseManager.Release(key) - } - - // Using lr.Error for convenience, as it matches lr.Done() when err is nil - lr.Error(err, -1) - return Hint(err) -} - -// Delete deletes a key -func (e *etcdClient) Delete(ctx context.Context, key string) (err error) { - defer func() { - Trace("Delete", err, logrus.Fields{fieldKey: key}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(key, metricDelete, "Delete", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - _, err = e.client.Delete(ctx, key) - // Using lr.Error for convenience, as it matches lr.Done() when err is nil - lr.Error(err, -1) - - if err == nil { - e.leaseManager.Release(key) - } - - return Hint(err) -} - -func (e *etcdClient) createOpPut(key string, value []byte, leaseID client.LeaseID) *client.Op { - if leaseID != 0 { - op := client.OpPut(key, string(value), client.WithLease(leaseID)) - return &op - } - - op := client.OpPut(key, string(value)) - return &op -} - -// UpdateIfLocked updates a key if the client is still holding the given lock. -func (e *etcdClient) UpdateIfLocked(ctx context.Context, key string, value []byte, lease bool, lock KVLocker) (err error) { - defer func() { - Trace("UpdateIfLocked", err, logrus.Fields{fieldKey: key, fieldValue: string(value), fieldAttachLease: lease}) - }() - var leaseID client.LeaseID - if lease { - leaseID, err = e.leaseManager.GetLeaseID(ctx, key) - if err != nil { - return Hint(err) - } - } - lr, err := e.limiter.Wait(ctx) - if err != nil { - return Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(key, metricSet, "UpdateIfLocked", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - var txnReply *client.TxnResponse - opPut := client.OpPut(key, string(value), client.WithLease(leaseID)) - cmp := lock.Comparator().(client.Cmp) - txnReply, err = e.client.Txn(ctx).If(cmp).Then(opPut).Commit() - e.leaseManager.CancelIfExpired(err, leaseID) - - if err == nil && !txnReply.Succeeded { - err = ErrLockLeaseExpired - } - - // Using lr.Error for convenience, as it matches lr.Done() when err is nil - lr.Error(err, -1) - return Hint(err) -} - -// Update creates or updates a key -func (e *etcdClient) Update(ctx context.Context, key string, value []byte, lease bool) (err error) { - defer func() { - Trace("Update", err, logrus.Fields{fieldKey: key, fieldValue: string(value), fieldAttachLease: lease}) - }() - var leaseID client.LeaseID - if lease { - leaseID, err = e.leaseManager.GetLeaseID(ctx, key) - if err != nil { - return Hint(err) - } - } - lr, err := e.limiter.Wait(ctx) - if err != nil { - return Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(key, metricSet, "Update", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - _, err = e.client.Put(ctx, key, string(value), client.WithLease(leaseID)) - e.leaseManager.CancelIfExpired(err, leaseID) - - // Using lr.Error for convenience, as it matches lr.Done() when err is nil - lr.Error(err, -1) - return Hint(err) -} - -// UpdateIfDifferentIfLocked updates a key if the value is different and if the client is still holding the given lock. -func (e *etcdClient) UpdateIfDifferentIfLocked(ctx context.Context, key string, value []byte, lease bool, lock KVLocker) (recreated bool, err error) { - defer func() { - Trace("UpdateIfDifferentIfLocked", err, logrus.Fields{fieldKey: key, fieldValue: value, fieldAttachLease: lease, "recreated": recreated}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return false, Hint(err) - } - duration := spanstat.Start() - - cnds := lock.Comparator().(client.Cmp) - txnresp, err := e.client.Txn(ctx).If(cnds).Then(client.OpGet(key)).Commit() - // Using lr.Error for convenience, as it matches lr.Done() when err is nil - lr.Error(err, -1) - increaseMetric(key, metricRead, "Get", duration.EndError(err).Total(), err) - - // On error, attempt update blindly - if err != nil { - return true, e.UpdateIfLocked(ctx, key, value, lease, lock) - } - - if !txnresp.Succeeded { - return false, ErrLockLeaseExpired - } - - getR := txnresp.Responses[0].GetResponseRange() - if getR.Count == 0 { - return true, e.UpdateIfLocked(ctx, key, value, lease, lock) - } - - if lease && !e.leaseManager.KeyHasLease(key, client.LeaseID(getR.Kvs[0].Lease)) { - return true, e.UpdateIfLocked(ctx, key, value, lease, lock) - } - // if value is not equal then update. - if !bytes.Equal(getR.Kvs[0].Value, value) { - return true, e.UpdateIfLocked(ctx, key, value, lease, lock) - } - - return false, nil -} - -// UpdateIfDifferent updates a key if the value is different -func (e *etcdClient) UpdateIfDifferent(ctx context.Context, key string, value []byte, lease bool) (recreated bool, err error) { - defer func() { - Trace("UpdateIfDifferent", err, logrus.Fields{fieldKey: key, fieldValue: value, fieldAttachLease: lease, "recreated": recreated}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return false, Hint(err) - } - duration := spanstat.Start() - - getR, err := e.client.Get(ctx, key) - // Using lr.Error for convenience, as it matches lr.Done() when err is nil - lr.Error(err, -1) - increaseMetric(key, metricRead, "Get", duration.EndError(err).Total(), err) - // On error, attempt update blindly - if err != nil || getR.Count == 0 { - return true, e.Update(ctx, key, value, lease) - } - if lease && !e.leaseManager.KeyHasLease(key, client.LeaseID(getR.Kvs[0].Lease)) { - return true, e.Update(ctx, key, value, lease) - } - // if value is not equal then update. - if !bytes.Equal(getR.Kvs[0].Value, value) { - return true, e.Update(ctx, key, value, lease) - } - - return false, nil -} - -// CreateOnlyIfLocked atomically creates a key if the client is still holding the given lock or fails if it already exists -func (e *etcdClient) CreateOnlyIfLocked(ctx context.Context, key string, value []byte, lease bool, lock KVLocker) (success bool, err error) { - defer func() { - Trace("CreateOnlyIfLocked", err, logrus.Fields{fieldKey: key, fieldValue: value, fieldAttachLease: lease, "success": success}) - }() - var leaseID client.LeaseID - if lease { - leaseID, err = e.leaseManager.GetLeaseID(ctx, key) - if err != nil { - return false, Hint(err) - } - } - lr, err := e.limiter.Wait(ctx) - if err != nil { - return false, Hint(err) - } - duration := spanstat.Start() - - req := e.createOpPut(key, value, leaseID) - cnds := []client.Cmp{ - client.Compare(client.Version(key), "=", 0), - lock.Comparator().(client.Cmp), - } - - // We need to do a get in the else of the txn to detect if the lock is still - // valid or not. - opGets := []client.Op{ - client.OpGet(key), - } - txnresp, err := e.client.Txn(ctx).If(cnds...).Then(*req).Else(opGets...).Commit() - increaseMetric(key, metricSet, "CreateOnlyLocked", duration.EndError(err).Total(), err) - if err != nil { - lr.Error(err, -1) - e.leaseManager.CancelIfExpired(err, leaseID) - return false, Hint(err) - } - lr.Done() - - // The txn can failed for the following reasons: - // - Key version is not zero; - // - Lock does not exist or is expired. - // For both of those cases, the key that we are comparing might or not - // exist, so we have: - // A - Key does not exist and lock does not exist => ErrLockLeaseExpired - // B - Key does not exist and lock exist => txn should succeed - // C - Key does exist, version is == 0 and lock does not exist => ErrLockLeaseExpired - // D - Key does exist, version is != 0 and lock does not exist => ErrLockLeaseExpired - // E - Key does exist, version is == 0 and lock does exist => txn should succeed - // F - Key does exist, version is != 0 and lock does exist => txn fails but returned is nil! - - if !txnresp.Succeeded { - // case F - if len(txnresp.Responses[0].GetResponseRange().Kvs) != 0 && - txnresp.Responses[0].GetResponseRange().Kvs[0].Version != 0 { - return false, nil - } - - // case A, C and D - return false, ErrLockLeaseExpired - } - - // case B and E - return true, nil -} - -// CreateOnly creates a key with the value and will fail if the key already exists -func (e *etcdClient) CreateOnly(ctx context.Context, key string, value []byte, lease bool) (success bool, err error) { - defer func() { - Trace("CreateOnly", err, logrus.Fields{fieldKey: key, fieldValue: value, fieldAttachLease: lease, "success": success}) - }() - var leaseID client.LeaseID - if lease { - leaseID, err = e.leaseManager.GetLeaseID(ctx, key) - if err != nil { - return false, Hint(err) - } - } - lr, err := e.limiter.Wait(ctx) - if err != nil { - return false, Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(key, metricSet, "CreateOnly", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - req := e.createOpPut(key, value, leaseID) - cond := client.Compare(client.Version(key), "=", 0) - - txnresp, err := e.client.Txn(ctx).If(cond).Then(*req).Commit() - - if err != nil { - lr.Error(err, -1) - e.leaseManager.CancelIfExpired(err, leaseID) - return false, Hint(err) - } - - lr.Done() - return txnresp.Succeeded, nil -} - -// CreateIfExists creates a key with the value only if key condKey exists -func (e *etcdClient) CreateIfExists(ctx context.Context, condKey, key string, value []byte, lease bool) (err error) { - defer func() { - Trace("CreateIfExists", err, logrus.Fields{fieldKey: key, fieldValue: string(value), fieldCondition: condKey, fieldAttachLease: lease}) - }() - var leaseID client.LeaseID - if lease { - leaseID, err = e.leaseManager.GetLeaseID(ctx, key) - if err != nil { - return Hint(err) - } - } - lr, err := e.limiter.Wait(ctx) - if err != nil { - return Hint(err) - } - duration := spanstat.Start() - - req := e.createOpPut(key, value, leaseID) - cond := client.Compare(client.Version(condKey), "!=", 0) - txnresp, err := e.client.Txn(ctx).If(cond).Then(*req).Commit() - - increaseMetric(key, metricSet, "CreateIfExists", duration.EndError(err).Total(), err) - if err != nil { - lr.Error(err, -1) - e.leaseManager.CancelIfExpired(err, leaseID) - return Hint(err) - } - lr.Done() - - if !txnresp.Succeeded { - return fmt.Errorf("create was unsuccessful") - } - - return nil -} - -// FIXME: When we rebase to etcd 3.3 -// -// DeleteOnZeroCount deletes the key if no matching keys for prefix exist -//func (e *etcdClient) DeleteOnZeroCount(key, prefix string) error { -// txnresp, err := e.client.Txn(ctx.TODO()). -// If(client.Compare(client.Version(prefix).WithPrefix(), "=", 0)). -// Then(client.OpDelete(key)). -// Commit() -// if err != nil { -// return err -// } -// -// if txnresp.Succeeded == false { -// return fmt.Errorf("delete was unsuccessful") -// } -// -// return nil -//} - -// ListPrefixIfLocked returns a list of keys matching the prefix only if the client is still holding the given lock. -func (e *etcdClient) ListPrefixIfLocked(ctx context.Context, prefix string, lock KVLocker) (v KeyValuePairs, err error) { - defer func() { - Trace("ListPrefixIfLocked", err, logrus.Fields{fieldPrefix: prefix, fieldNumEntries: len(v)}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return nil, Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(prefix, metricRead, "ListPrefixLocked", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - opGet := client.OpGet(prefix, client.WithPrefix()) - cmp := lock.Comparator().(client.Cmp) - txnReply, err := e.client.Txn(ctx).If(cmp).Then(opGet).Commit() - if err == nil && !txnReply.Succeeded { - err = ErrLockLeaseExpired - } - if err != nil { - lr.Error(err, -1) - return nil, Hint(err) - } - lr.Done() - getR := txnReply.Responses[0].GetResponseRange() - - pairs := KeyValuePairs(make(map[string]Value, getR.Count)) - for i := int64(0); i < getR.Count; i++ { - pairs[string(getR.Kvs[i].Key)] = Value{ - Data: getR.Kvs[i].Value, - ModRevision: uint64(getR.Kvs[i].ModRevision), - } - - } - - return pairs, nil -} - -// ListPrefix returns a map of matching keys -func (e *etcdClient) ListPrefix(ctx context.Context, prefix string) (v KeyValuePairs, err error) { - defer func() { - Trace("ListPrefix", err, logrus.Fields{fieldPrefix: prefix, fieldNumEntries: len(v)}) - }() - lr, err := e.limiter.Wait(ctx) - if err != nil { - return nil, Hint(err) - } - defer func(duration *spanstat.SpanStat) { - increaseMetric(prefix, metricRead, "ListPrefix", duration.EndError(err).Total(), err) - }(spanstat.Start()) - - getR, err := e.client.Get(ctx, prefix, client.WithPrefix()) - if err != nil { - lr.Error(err, -1) - return nil, Hint(err) - } - lr.Done() - - pairs := KeyValuePairs(make(map[string]Value, getR.Count)) - for i := int64(0); i < getR.Count; i++ { - pairs[string(getR.Kvs[i].Key)] = Value{ - Data: getR.Kvs[i].Value, - ModRevision: uint64(getR.Kvs[i].ModRevision), - LeaseID: getR.Kvs[i].Lease, - } - - } - - return pairs, nil -} - -// Close closes the etcd session -func (e *etcdClient) Close(ctx context.Context) { - close(e.stopStatusChecker) - - if err := e.client.Close(); err != nil { - e.logger.WithError(err).Warning("Failed to close etcd client") - } - - // Wait until all child goroutines spawned by the lease managers have terminated. - e.leaseManager.Wait() - e.lockLeaseManager.Wait() -} - -// GetCapabilities returns the capabilities of the backend -func (e *etcdClient) GetCapabilities() Capabilities { - return Capabilities(CapabilityCreateIfExists) -} - -// Encode encodes a binary slice into a character set that the backend supports -func (e *etcdClient) Encode(in []byte) (out string) { - return string(in) -} - -// Decode decodes a key previously encoded back into the original binary slice -func (e *etcdClient) Decode(in string) (out []byte, err error) { - return []byte(in), nil -} - -// ListAndWatch implements the BackendOperations.ListAndWatch using etcd -func (e *etcdClient) ListAndWatch(ctx context.Context, prefix string, chanSize int) *Watcher { - w := newWatcher(prefix, chanSize) - - go e.Watch(ctx, w) - - return w -} - -// RegisterLeaseExpiredObserver registers a function which is executed when -// the lease associated with a key having the given prefix is detected as expired. -// If the function is nil, the previous observer (if any) is unregistered. -func (e *etcdClient) RegisterLeaseExpiredObserver(prefix string, fn func(key string)) { - if fn == nil { - e.leaseExpiredObservers.Delete(prefix) - } else { - e.leaseExpiredObservers.Store(prefix, fn) - } -} - -func (e *etcdClient) expiredLeaseObserver(key string) { - e.leaseExpiredObservers.Range(func(prefix string, fn func(string)) bool { - if strings.HasPrefix(key, prefix) { - fn(key) - } - return true - }) -} - -// UserEnforcePresence creates a user in etcd if not already present, and grants the specified roles. -func (e *etcdClient) UserEnforcePresence(ctx context.Context, name string, roles []string) error { - scopedLog := e.logger.WithField(FieldUser, name) - - scopedLog.Debug("Creating user") - _, err := e.client.Auth.UserAddWithOptions(ctx, name, "", &client.UserAddOptions{NoPassword: true}) - if err != nil { - if errors.Is(err, v3rpcErrors.ErrUserAlreadyExist) { - scopedLog.Debug("User already exists") - } else { - return err - } - } - - for _, role := range roles { - scopedLog.WithField(FieldRole, role).Debug("Granting role to user") - - _, err := e.client.Auth.UserGrantRole(ctx, name, role) - if err != nil { - return err - } - } - - return nil -} - -// UserEnforcePresence deletes a user from etcd, if present. -func (e *etcdClient) UserEnforceAbsence(ctx context.Context, name string) error { - scopedLog := e.logger.WithField(FieldUser, name) - - scopedLog.Debug("Deleting user") - _, err := e.client.Auth.UserDelete(ctx, name) - if err != nil { - if errors.Is(err, v3rpcErrors.ErrUserNotFound) { - scopedLog.Debug("User not found") - } else { - return err - } - } - - return nil -} - -// SplitK8sServiceURL returns the service name and namespace for the given address. -// If the given address is not parseable or it is not the format -// '://>.[optional]', returns an error. -func SplitK8sServiceURL(address string) (string, string, error) { - u, err := url.Parse(address) - if err != nil { - return "", "", err - } - // typical service name "cilium-etcd-client.kube-system.svc" - names := strings.Split(u.Hostname(), ".") - if len(names) >= 2 { - return names[0], names[1], nil - } - return "", "", - fmt.Errorf("invalid service name. expecting .[optional], got: %s", address) -} - -// IsEtcdOperator returns the service name if the configuration is setting up an -// etcd-operator. If the configuration explicitly states it is configured -// to connect to an etcd operator, e.g. with etcd.operator=true, the returned -// service name is the first found within the configuration specified. -func IsEtcdOperator(selectedBackend string, opts map[string]string, k8sNamespace string) (string, bool) { - if selectedBackend != EtcdBackendName { - return "", false - } - - isEtcdOperator := strings.ToLower(opts[isEtcdOperatorOption]) == "true" - - fqdnIsEtcdOperator := func(address string) bool { - svcName, ns, err := SplitK8sServiceURL(address) - return err == nil && - svcName == "cilium-etcd-client" && - ns == k8sNamespace - } - - fqdn := opts[EtcdAddrOption] - if len(fqdn) != 0 { - if fqdnIsEtcdOperator(fqdn) || isEtcdOperator { - return fqdn, true - } - return "", false - } - - bm := newEtcdModule() - err := bm.setConfig(opts) - if err != nil { - return "", false - } - etcdConfig := bm.getConfig()[EtcdOptionConfig] - if len(etcdConfig) == 0 { - return "", false - } - - cfg, err := newConfig(etcdConfig) - if err != nil { - log.WithError(err).Error("Unable to read etcd configuration.") - return "", false - } - for _, endpoint := range cfg.Endpoints { - if fqdnIsEtcdOperator(endpoint) || isEtcdOperator { - return endpoint, true - } - } - - return "", false -} - -// newConfig is a wrapper of clientyaml.NewConfig. Since etcd has deprecated -// the `ca-file` field from yamlConfig in v3.4, the clientyaml.NewConfig won't -// read that field from the etcd configuration file making Cilium fail to -// connect to a TLS-enabled etcd server. Since we should have deprecated the -// usage of this field a long time ago, in this galaxy, we will have this -// wrapper function as a workaround which will still use the `ca-file` field to -// avoid users breaking their connectivity to etcd when upgrading Cilium. -// TODO remove this wrapper in cilium >= 1.8 -func newConfig(fpath string) (*client.Config, error) { - cfg, err := clientyaml.NewConfig(fpath) - if err != nil { - return nil, err - } - if cfg.TLS == nil || cfg.TLS.RootCAs != nil { - return cfg, nil - } - - yc := &yamlConfig{} - b, err := os.ReadFile(fpath) - if err != nil { - return nil, err - } - err = yaml.Unmarshal(b, yc) - if err != nil { - return nil, err - } - if yc.InsecureTransport { - return cfg, nil - } - - if yc.CAfile != "" { - cp, err := tlsutil.NewCertPool([]string{yc.CAfile}) - if err != nil { - return nil, err - } - cfg.TLS.RootCAs = cp - } - return cfg, nil -} - -// reload on-disk certificate and key when needed -func getClientCertificateReloader(fpath string) (func(*tls.CertificateRequestInfo) (*tls.Certificate, error), error) { - yc := &yamlKeyPairConfig{} - b, err := os.ReadFile(fpath) - if err != nil { - return nil, err - } - err = yaml.Unmarshal(b, yc) - if err != nil { - return nil, err - } - if yc.Certfile == "" || yc.Keyfile == "" { - return nil, nil - } - reloader := func(_ *tls.CertificateRequestInfo) (*tls.Certificate, error) { - cer, err := tls.LoadX509KeyPair(yc.Certfile, yc.Keyfile) - return &cer, err - } - return reloader, nil -} - -// copy of relevant internal structure fields in go.etcd.io/etcd/clientv3/yaml -// needed to implement certificates reload, not depending on the deprecated -// newconfig/yamlConfig. -type yamlKeyPairConfig struct { - Certfile string `json:"cert-file"` - Keyfile string `json:"key-file"` -} - -// copy of the internal structure in github.com/etcd-io/etcd/clientv3/yaml so we -// can still use the `ca-file` field for one more release. -type yamlConfig struct { - client.Config - - InsecureTransport bool `json:"insecure-transport"` - InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify"` - Certfile string `json:"cert-file"` - Keyfile string `json:"key-file"` - TrustedCAfile string `json:"trusted-ca-file"` - - // CAfile is being deprecated. Use 'TrustedCAfile' instead. - // TODO: deprecate this in v4 - CAfile string `json:"ca-file"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/etcd_debug.go b/vendor/github.com/cilium/cilium/pkg/kvstore/etcd_debug.go deleted file mode 100644 index 53637336cfc..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/etcd_debug.go +++ /dev/null @@ -1,400 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "bytes" - "context" - "crypto/tls" - "crypto/x509" - "encoding/pem" - "errors" - "fmt" - "io" - "net" - "net/url" - "os" - "regexp" - "strings" - - client "go.etcd.io/etcd/client/v3" - "go.uber.org/zap" - "google.golang.org/grpc" - "sigs.k8s.io/yaml" - - "github.com/cilium/cilium/pkg/time" -) - -var etcdVersionRegexp = regexp.MustCompile(`"etcdserver":"(?P.*?)"`) - -// EtcdDbgDialer enables to override the LookupIP and DialContext functions, -// e.g., to support service name to IP address resolution when CoreDNS is not -// the configured DNS server --- for pods running in the host network namespace. -type EtcdDbgDialer interface { - LookupIP(ctx context.Context, hostname string) ([]net.IP, error) - DialContext(ctx context.Context, addr string) (net.Conn, error) -} - -// DefaultEtcdDbgDialer provides a default implementation of the EtcdDbgDialer interface. -type DefaultEtcdDbgDialer struct{} - -func (DefaultEtcdDbgDialer) LookupIP(ctx context.Context, hostname string) ([]net.IP, error) { - return net.DefaultResolver.LookupIP(ctx, "ip", hostname) -} - -func (DefaultEtcdDbgDialer) DialContext(ctx context.Context, addr string) (net.Conn, error) { - return (&net.Dialer{}).DialContext(ctx, "tcp", addr) -} - -// EtcdDbg performs a set of sanity checks concerning the connection to the given -// etcd cluster, and outputs the result in a user-friendly format. -func EtcdDbg(ctx context.Context, cfgfile string, dialer EtcdDbgDialer, w io.Writer) { - iw := newIndentedWriter(w, 0) - - iw.Println("📄 Configuration path: %s", cfgfile) - cfg, err := newConfig(cfgfile) - if err != nil { - iw.Println("❌ Cannot parse etcd configuration: %s", err) - return - } - - iw.NewLine() - if len(cfg.Endpoints) == 0 { - iw.Println("❌ No available endpoints") - } else { - iw.Println("🔌 Endpoints:") - for _, ep := range cfg.Endpoints { - iiw := iw.WithExtraIndent(3) - iiw.Println("- %s", ep) - etcdDbgEndpoint(ctx, ep, cfg.TLS.Clone(), dialer, iiw.WithExtraIndent(2)) - } - } - - iw.NewLine() - iw.Println("🔑 Digital certificates:") - etcdDbgCerts(cfgfile, cfg, iw.WithExtraIndent(3)) - - iw.NewLine() - iw.Println("⚙️ Etcd client:") - iiw := iw.WithExtraIndent(3) - cfg.Context = ctx - cfg.Logger = zap.NewNop() - cfg.DialOptions = append(cfg.DialOptions, grpc.WithBlock(), grpc.WithContextDialer(dialer.DialContext)) - cfg.DialTimeout = 1 * time.Second // The client hangs in case the connection fails, hence set a short timeout. - - cl, err := client.New(*cfg) - if err != nil { - iiw.Println("❌ Failed to establish connection: %s", err) - return - } - defer cl.Close() - - // Try to retrieve the heartbeat key, as a basic authorization check. - // It doesn't really matter whether the heartbeat key exists or not. - out, err := cl.Get(ctx, HeartbeatPath) - if err != nil { - iiw.Println("❌ Failed to retrieve key from etcd: %s", err) - return - } - - iiw.Println("✅ Etcd connection successfully established") - if out.Header != nil { - iiw.Println("ℹ️ Etcd cluster ID: %x", out.Header.GetClusterId()) - } -} - -func etcdDbgEndpoint(ctx context.Context, ep string, tlscfg *tls.Config, dialer EtcdDbgDialer, iw *indentedWriter) { - u, err := url.Parse(ep) - if err != nil { - iw.Println("❌ Cannot parse endpoint: %s", err) - return - } - - // Hostname resolution - hostname := u.Hostname() - if net.ParseIP(hostname) == nil { - ips, err := dialer.LookupIP(ctx, hostname) - if err != nil { - iw.Println("❌ Cannot resolve hostname: %s", err) - } else { - iw.Println("✅ Hostname resolved to: %s", etcdDbgOutputIPs(ips)) - } - } - - // TCP Connection - conn, err := dialer.DialContext(ctx, u.Host) - if err != nil { - iw.Println("❌ Cannot establish TCP connection to %s: %s", u.Host, err) - return - } - - iw.Println("✅ TCP connection successfully established to %s", conn.RemoteAddr()) - if u.Scheme != "https" { - conn.Close() - return - } - - // TLS Connection - if tlscfg.ServerName == "" { - tlscfg.ServerName = hostname - } - - // We use GetClientCertificate rather than Certificates to return an error - // in case the certificate does not match any of the requested CAs. One - // limitation, though, is that the match appears to be performed based on - // the distinguished name only, and it doesn't fail if two CAs have the same - // DN (which is typically the case with the default CA generated by Cilium). - var acceptableCAs [][]byte - tlscfg.GetClientCertificate = func(cri *tls.CertificateRequestInfo) (*tls.Certificate, error) { - for _, chain := range tlscfg.Certificates { - if err := cri.SupportsCertificate(&chain); err == nil { - return &chain, nil - } - } - - acceptableCAs = cri.AcceptableCAs - return nil, fmt.Errorf("client certificate is not signed by any acceptable CA") - } - - tconn := tls.Client(conn, tlscfg) - defer tconn.Close() - - err = tconn.HandshakeContext(ctx) - if err != nil { - iw.Println("❌ Cannot establish TLS connection to %s: %s", u.Host, err) - if len(acceptableCAs) > 0 { - // The output is suboptimal being DER-encoded, but there doesn't - // seem to be any easy way to parse it (the utility used by - // ParseCertificate is not exported). Better than nothing though. - var buf bytes.Buffer - for i, ca := range acceptableCAs { - if i != 0 { - buf.WriteString(", ") - } - buf.WriteRune('"') - buf.WriteString(string(ca)) - buf.WriteRune('"') - } - - iw.Println("ℹ️ Acceptable CAs: %s", buf.String()) - } - return - } - - iw.Println("✅ TLS connection successfully established to %s", tconn.RemoteAddr()) - iw.Println("ℹ️ Negotiated TLS version: %s, ciphersuite %s", - tls.VersionName(tconn.ConnectionState().Version), - tls.CipherSuiteName(tconn.ConnectionState().CipherSuite)) - - // With TLS 1.3, the server doesn't acknowledge whether client authentication - // succeeded, and a possible error is returned only when reading some data. - // Hence, let's trigger a request, so that we see if it failed. - tconn.SetDeadline(time.Now().Add(1 * time.Second)) - data := fmt.Sprintf("GET /version HTTP/1.1\r\nHost: %s\r\n\r\n", u.Host) - _, err = tconn.Write([]byte(data)) - if err != nil { - iw.Println("❌ Failed to perform a GET /version request: %s", err) - return - } - - buf := make([]byte, 1000) - _, err = tconn.Read(buf) - if err != nil { - opErr := &net.OpError{} - if errors.As(err, &opErr) && opErr.Op == "remote error" { - iw.Println("❌ TLS client authentication failed: %s", err) - } else { - iw.Println("❌ Failed to retrieve GET /version answer: %s", err) - } - return - } - - matches := etcdVersionRegexp.FindAllStringSubmatch(string(buf), 1) - if len(matches) != 1 { - iw.Println("⚠️ Could not retrieve etcd server version") - return - } - - iw.Println("ℹ️ Etcd server version: %s", matches[0][etcdVersionRegexp.SubexpIndex("version")]) -} - -func etcdDbgCerts(cfgfile string, cfg *client.Config, iw *indentedWriter) { - if cfg.TLS.RootCAs == nil { - iw.Println("⚠️ Root CA unset: using system pool") - } else { - // Retrieve the RootCA path from the configuration, as it appears - // that we cannot introspect cfg.TLS.RootCAs. - certs, err := etcdDbgRetrieveRootCAFile(cfgfile) - if err != nil { - iw.Println("❌ Failed to retrieve Root CA path: %s", err) - } else { - iw.Println("✅ TLS Root CA certificates:") - for _, cert := range certs { - parsed, err := x509.ParseCertificate(cert) - if err != nil { - iw.Println("❌ Failed to parse certificate: %s", err) - continue - } - - etcdDbgOutputCert(parsed, iw.WithExtraIndent(3)) - } - } - } - - if len(cfg.TLS.Certificates) == 0 { - iw.Println("⚠️ No available TLS client certificates") - } else { - iw.Println("✅ TLS client certificates:") - for _, cert := range cfg.TLS.Certificates { - if len(cert.Certificate) == 0 { - iw.Println("❌ The certificate looks invalid") - continue - } - - leaf, err := x509.ParseCertificate(cert.Certificate[0]) - if err != nil { - iw.Println("❌ Failed to parse certificate: %s", err) - continue - } - - iiw := iw.WithExtraIndent(3) - etcdDbgOutputCert(leaf, iiw) - iiw = iiw.WithExtraIndent(2) - - // Print intermediate certificates, if any. - intermediates := x509.NewCertPool() - for _, cert := range cert.Certificate[1:] { - iiw.Println("Intermediates:") - - intermediate, err := x509.ParseCertificate(cert) - if err != nil { - iw.Println("❌ Failed to parse intermediate certificate: %s", err) - continue - } - - etcdDbgOutputCert(intermediate, iiw) - intermediates.AddCert(intermediate) - } - - // Attempt to verify whether the given certificate can be validated - // using the configured root CAs. Although a failure is not necessarily - // an error, as the remote etcd server may be configured with a different - // root CA, it still signals a misconfiguration in most cases. - opts := x509.VerifyOptions{ - Roots: cfg.TLS.RootCAs, - Intermediates: intermediates, - } - - _, err = leaf.Verify(opts) - if err != nil { - iiw.Println("⚠️ Cannot verify certificate with the configured root CAs") - } - } - } - - if cfg.Username != "" { - passwd := "unset" - if cfg.Password != "" { - passwd = "set" - } - - iw.Println("✅ Username set to %s, password is %s", cfg.Username, passwd) - } -} - -func etcdDbgOutputIPs(ips []net.IP) string { - var buf bytes.Buffer - for i, ip := range ips { - if i > 0 { - buf.WriteString(", ") - } - - if i == 4 { - buf.WriteString("...") - break - } - - buf.WriteString(ip.String()) - } - return buf.String() -} - -func etcdDbgRetrieveRootCAFile(cfgfile string) (certs [][]byte, err error) { - var yc yamlConfig - - b, err := os.ReadFile(cfgfile) - if err != nil { - return nil, err - } - - err = yaml.Unmarshal(b, &yc) - if err != nil { - return nil, err - } - - crtfile := yc.TrustedCAfile - if crtfile == "" { - crtfile = yc.CAfile - } - if crtfile == "" { - return nil, errors.New("not provided") - } - - data, err := os.ReadFile(crtfile) - if err != nil { - return nil, err - } - - for { - block, rest := pem.Decode(data) - if block == nil { - if len(certs) == 0 { - return nil, errors.New("no certificate found") - } - - return certs, nil - } - - if block.Type == "CERTIFICATE" { - certs = append(certs, block.Bytes) - } - - data = rest - } -} - -func etcdDbgOutputCert(cert *x509.Certificate, iw *indentedWriter) { - sn := cert.SerialNumber.Text(16) - for i := 2; i < len(sn); i += 3 { - sn = sn[:i] + ":" + sn[i:] - } - - iw.Println("- Serial number: %s", string(sn)) - iw.Println(" Subject: %s", cert.Subject) - iw.Println(" Issuer: %s", cert.Issuer) - iw.Println(" Validity:") - iw.Println(" Not before: %s", cert.NotBefore) - iw.Println(" Not after: %s", cert.NotAfter) -} - -type indentedWriter struct { - w io.Writer - indent []byte -} - -func newIndentedWriter(w io.Writer, indent int) *indentedWriter { - return &indentedWriter{w: w, indent: []byte(strings.Repeat(" ", indent))} -} - -func (iw *indentedWriter) NewLine() { iw.w.Write([]byte("\n")) } - -func (iw *indentedWriter) Println(format string, a ...any) { - iw.w.Write(iw.indent) - fmt.Fprintf(iw.w, format, a...) - iw.NewLine() -} - -func (iw *indentedWriter) WithExtraIndent(indent int) *indentedWriter { - return newIndentedWriter(iw.w, len(iw.indent)+indent) -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/etcd_lease.go b/vendor/github.com/cilium/cilium/pkg/kvstore/etcd_lease.go deleted file mode 100644 index 2e0a2f6d977..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/etcd_lease.go +++ /dev/null @@ -1,307 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "context" - "errors" - "strings" - "sync" - - "github.com/sirupsen/logrus" - v3rpcErrors "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - client "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/client/v3/concurrency" - - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/spanstat" - "github.com/cilium/cilium/pkg/time" -) - -type leaseInfo struct { - count uint32 - session *concurrency.Session -} - -// etcdLeaseManager manages the acquisition of the leases, and keeps track of -// which lease is attached to which etcd key. -type etcdLeaseManager struct { - client *client.Client - log logrus.FieldLogger - - ttl time.Duration - limit uint32 - expired func(key string) - - mu lock.RWMutex - leases map[client.LeaseID]*leaseInfo - keys map[string]client.LeaseID - current client.LeaseID - - acquiring chan struct{} - wg sync.WaitGroup -} - -// newEtcdLeaseManager builds and returns a new lease manager instance. -func newEtcdLeaseManager(cl *client.Client, ttl time.Duration, limit uint32, expired func(key string), log logrus.FieldLogger) *etcdLeaseManager { - return &etcdLeaseManager{ - client: cl, - log: log, - - ttl: ttl, - limit: limit, - expired: expired, - - current: client.NoLease, - leases: make(map[client.LeaseID]*leaseInfo), - keys: make(map[string]client.LeaseID), - } -} - -// GetLeaseID returns a lease ID, and associates it to the given key. It leverages -// one of the already acquired leases if they are not already attached to too many -// keys, otherwise a new one is acquired. -// -// There's a small possibility that the returned lease is already expired, or gets -// expired immediately before use (due the time window between the lease expiration -// on the etcd server and the subsequent client side detection and garbage collection). -// As we cannot completely remove this uncertainty period, let's adopt the easiest -// approach here, without explicitly checking if the lease is expired before returning -// it (given that it would be a client-side check only). Instead, let's just rely on -// the fact that the operation will fail (as the lease is no longer valid), triggering -// a retry. At that point, a new (hopefully valid) lease will be retrieved again. -func (elm *etcdLeaseManager) GetLeaseID(ctx context.Context, key string) (client.LeaseID, error) { - session, err := elm.GetSession(ctx, key) - if err != nil { - return client.NoLease, err - } - - return session.Lease(), nil -} - -// GetSession returns a session, and associates it to the given key. It leverages -// one of the already acquired leases if they are not already attached to too many -// keys, otherwise a new one is acquired. -// -// There's a small possibility that the returned session is already expired, or gets -// expired immediately before use (due the time window between the lease expiration -// on the etcd server and the subsequent client side detection and garbage collection). -// As we cannot completely remove this uncertainty period, let's adopt the easiest -// approach here, without explicitly checking if the session is expired before returning -// it (given that it would be a client-side check only). Instead, let's just rely on -// the fact that the operation will fail (as the lease is no longer valid), triggering -// a retry. At that point, a new (hopefully valid) session will be retrieved again. -func (elm *etcdLeaseManager) GetSession(ctx context.Context, key string) (*concurrency.Session, error) { - elm.mu.Lock() - - // This key is already attached to a lease, hence just return it. - if leaseID := elm.keys[key]; leaseID != client.NoLease { - // The entry is guaranteed to exist if the lease is associated with a key - info := elm.leases[leaseID] - elm.mu.Unlock() - return info.session, nil - } - - // Return the current lease if it has not been used more than limit times - if info := elm.leases[elm.current]; info != nil && info.count < elm.limit { - info.count++ - elm.keys[key] = elm.current - elm.mu.Unlock() - - return info.session, nil - } - - // Otherwise, loop through the other known leases to see if any has been released - for lease, info := range elm.leases { - if info.count < elm.limit { - elm.current = lease - info.count++ - elm.keys[key] = elm.current - elm.mu.Unlock() - - return info.session, nil - } - } - - // If none is found, we need to acquire a new lease. acquiring is a channel - // used to detect whether we are already in the process of acquiring a new - // lease, to prevent multiple acquisitions in parallel. - acquiring := elm.acquiring - if acquiring == nil { - elm.acquiring = make(chan struct{}) - } - - // Unlock, so that we don't block other paraller operations (e.g., releases) - // while acquiring a new lease, since it might be a slow operation. - elm.mu.Unlock() - - // Someone else is already acquiring a new lease. Wait until - // it completes, and then retry again. - if acquiring != nil { - select { - case <-acquiring: - return elm.GetSession(ctx, key) - case <-ctx.Done(): - return nil, ctx.Err() - case <-elm.client.Ctx().Done(): - return nil, elm.client.Ctx().Err() - } - } - - // Otherwise, we can proceed to acquire a new lease. - session, err := elm.newSession(ctx) - - elm.mu.Lock() - - // Signal that the acquisition process has completed. - close(elm.acquiring) - elm.acquiring = nil - - if err != nil { - elm.mu.Unlock() - return nil, err - } - - elm.current = session.Lease() - elm.leases[session.Lease()] = &leaseInfo{session: session} - elm.mu.Unlock() - - return elm.GetSession(ctx, key) -} - -// Release decrements the counter of the lease attached to the given key. -func (elm *etcdLeaseManager) Release(key string) { - elm.mu.Lock() - defer elm.mu.Unlock() - - elm.releaseUnlocked(key) -} - -// ReleasePrefix decrements the counter of the leases attached to the keys -// starting with the given prefix. -func (elm *etcdLeaseManager) ReleasePrefix(prefix string) { - elm.mu.Lock() - defer elm.mu.Unlock() - - for key, leaseID := range elm.keys { - if strings.HasPrefix(key, prefix) { - if info := elm.leases[leaseID]; info != nil && info.count > 0 { - info.count-- - } - delete(elm.keys, key) - } - } -} - -// KeyHasLease returns whether the given key is associated with the specified lease. -func (elm *etcdLeaseManager) KeyHasLease(key string, leaseID client.LeaseID) bool { - elm.mu.RLock() - defer elm.mu.RUnlock() - - return elm.keys[key] == leaseID -} - -// CancelIfExpired verifies whether the error reports that the given lease has -// expired, and in that case aborts the corresponding keepalive process. -func (elm *etcdLeaseManager) CancelIfExpired(err error, leaseID client.LeaseID) { - if errors.Is(err, v3rpcErrors.ErrLeaseNotFound) { - elm.mu.Lock() - if info := elm.leases[leaseID]; info != nil { - info.session.Orphan() - } - elm.mu.Unlock() - } -} - -// TotalLeases returns the number of managed leases. -func (elm *etcdLeaseManager) TotalLeases() uint32 { - elm.mu.RLock() - defer elm.mu.RUnlock() - - return uint32(len(elm.leases)) -} - -// Wait waits until all child goroutines terminated. -func (elm *etcdLeaseManager) Wait() { - elm.wg.Wait() -} - -func (elm *etcdLeaseManager) newSession(ctx context.Context) (session *concurrency.Session, err error) { - defer func(duration *spanstat.SpanStat) { - increaseMetric("lease", metricSet, "AcquireLease", duration.EndError(err).Total(), err) - }(spanstat.Start()) - resp, err := elm.client.Grant(ctx, int64(elm.ttl.Seconds())) - if err != nil { - return nil, err - } - leaseID := resp.ID - - // Construct the session specifying the lease just acquired. This allows to - // split the possibly blocking operation (i.e., lease acquisition), from the - // non-blocking one (i.e., the setup of the keepalive logic), so that we can use - // different contexts. We want the lease acquisition to be controlled by the - // context associated with the given request, while the keepalive process should - // continue until either the etcd client is closed or the session is orphaned. - session, err = concurrency.NewSession(elm.client, - concurrency.WithLease(leaseID), - concurrency.WithTTL(int(elm.ttl.Seconds())), - ) - if err != nil { - return nil, err - } - - elm.wg.Add(1) - go elm.waitForExpiration(session) - - elm.log.WithFields(logrus.Fields{ - "LeaseID": leaseID, - "TTL": elm.ttl, - }).Info("New lease successfully acquired") - return session, nil -} - -func (elm *etcdLeaseManager) waitForExpiration(session *concurrency.Session) { - defer elm.wg.Done() - - // Block until the session gets orphaned, either because it fails to be - // renewed or the etcd client is closed. - <-session.Done() - - select { - case <-elm.client.Ctx().Done(): - // The context of the etcd client was closed - return - default: - } - - elm.log.WithField("LeaseID", session.Lease()).Warning("Lease expired") - - elm.mu.Lock() - delete(elm.leases, session.Lease()) - - var keys []string - for key, id := range elm.keys { - if id == session.Lease() { - keys = append(keys, key) - delete(elm.keys, key) - } - } - elm.mu.Unlock() - - if elm.expired != nil { - for _, key := range keys { - elm.expired(key) - } - } -} - -func (elm *etcdLeaseManager) releaseUnlocked(key string) { - leaseID := elm.keys[key] - if leaseID != client.NoLease { - if info := elm.leases[leaseID]; info != nil && info.count > 0 { - info.count-- - } - delete(elm.keys, key) - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/events.go b/vendor/github.com/cilium/cilium/pkg/kvstore/events.go deleted file mode 100644 index 56c71b4c5f6..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/events.go +++ /dev/null @@ -1,91 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium -package kvstore - -import ( - "sync" -) - -// EventType defines the type of watch event that occurred -type EventType int - -const ( - // EventTypeCreate represents a newly created key - EventTypeCreate EventType = iota - // EventTypeModify represents a modified key - EventTypeModify - // EventTypeDelete represents a deleted key - EventTypeDelete - //EventTypeListDone signals that the initial list operation has completed - EventTypeListDone -) - -// String() returns the human readable format of an event type -func (t EventType) String() string { - switch t { - case EventTypeCreate: - return "create" - case EventTypeModify: - return "modify" - case EventTypeDelete: - return "delete" - case EventTypeListDone: - return "listDone" - default: - return "unknown" - } -} - -// KeyValueEvent is a change event for a Key/Value pair -type KeyValueEvent struct { - // Typ is the type of event { EventTypeCreate | EventTypeModify | EventTypeDelete | EventTypeListDone } - Typ EventType - - // Key is the kvstore key that changed - Key string - - // Value is the kvstore value associated with the key - Value []byte -} - -// EventChan is a channel to receive events on -type EventChan chan KeyValueEvent - -// stopChan is the channel used to indicate stopping of the watcher -type stopChan chan struct{} - -// Watcher represents a KVstore watcher -type Watcher struct { - // Events is the channel to which change notifications will be sent to - Events EventChan `json:"-"` - - Prefix string `json:"prefix"` - stopWatch stopChan - - // stopOnce guarantees that Stop() is only called once - stopOnce sync.Once - - // stopWait is the wait group to wait for watchers to exit gracefully - stopWait sync.WaitGroup -} - -func newWatcher(prefix string, chanSize int) *Watcher { - w := &Watcher{ - Prefix: prefix, - Events: make(EventChan, chanSize), - stopWatch: make(stopChan), - } - - w.stopWait.Add(1) - - return w -} - -// Stop stops a watcher previously created and started with Watch() -func (w *Watcher) Stop() { - w.stopOnce.Do(func() { - close(w.stopWatch) - log.WithField(fieldPrefix, w.Prefix).Debug("Stopped watcher") - w.stopWait.Wait() - }) -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/kvstore.go b/vendor/github.com/cilium/cilium/pkg/kvstore/kvstore.go deleted file mode 100644 index 12f24de538f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/kvstore.go +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "strings" - - "github.com/cilium/cilium/pkg/time" -) - -// Value is an abstraction of the data stored in the kvstore as well as the -// mod revision of that data. -type Value struct { - Data []byte - ModRevision uint64 - LeaseID int64 - SessionID string -} - -// KeyValuePairs is a map of key=value pairs -type KeyValuePairs map[string]Value - -// Capabilities is a bitmask to indicate the capabilities of a backend -type Capabilities uint32 - -const ( - // CapabilityCreateIfExists is true if CreateIfExists is functional - CapabilityCreateIfExists Capabilities = 1 << 0 - - // CapabilityDeleteOnZeroCount is true if DeleteOnZeroCount is functional - CapabilityDeleteOnZeroCount Capabilities = 1 << 1 - - // BaseKeyPrefix is the base prefix that should be used for all keys - BaseKeyPrefix = "cilium" - - // InitLockPath is the path to the init lock to test quorum - InitLockPath = BaseKeyPrefix + "/.initlock" - - // HeartbeatPath is the path to the key at which the operator updates - // the heartbeat - HeartbeatPath = BaseKeyPrefix + "/.heartbeat" - - // HasClusterConfigPath is the path to the key used to convey that the cluster - // configuration will be eventually created, and remote cilium agents shall - // wait until it is present. If this key is not set, the cilium configuration - // might, or might not, be configured, but the agents will continue regardless, - // falling back to the backward compatible behavior. It must be set before that - // the agents have the possibility to connect to the kvstore (that is, when - // it is not yet exposed). The corresponding values is ignored. - HasClusterConfigPath = BaseKeyPrefix + "/.has-cluster-config" - - // ClusterConfigPrefix is the kvstore prefix to cluster configuration - ClusterConfigPrefix = BaseKeyPrefix + "/cluster-config" - - // SyncedPrefix is the kvstore prefix used to convey whether - // synchronization from an external source has completed for a given prefix - SyncedPrefix = BaseKeyPrefix + "/synced" - - // HeartbeatWriteInterval is the interval in which the heartbeat key at - // HeartbeatPath is updated - HeartbeatWriteInterval = time.Minute -) - -// StateToCachePrefix converts a kvstore prefix starting with "cilium/state" -// (holding the cilium state) to the corresponding one holding cached information -// from another kvstore (that is, "cilium/cache"). -func StateToCachePrefix(prefix string) string { - if strings.HasPrefix(prefix, "cilium/state") { - return strings.Replace(prefix, "cilium/state", "cilium/cache", 1) - } - return prefix -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/lock.go b/vendor/github.com/cilium/cilium/pkg/kvstore/lock.go deleted file mode 100644 index c70ee81046b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/lock.go +++ /dev/null @@ -1,172 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "context" - "fmt" - - "github.com/davecgh/go-spew/spew" - "github.com/google/uuid" - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/debug" - "github.com/cilium/cilium/pkg/defaults" - "github.com/cilium/cilium/pkg/inctimer" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/time" -) - -var ( - kvstoreLocks = pathLocks{lockPaths: map[string]lockOwner{}} - - // staleLockTimeout is the timeout after which waiting for a believed - // other local lock user for the same key is given up on and etcd is - // asked directly. It is still highly unlikely that concurrent access - // occurs as only one consumer will manage to acquire the newly - // released lock. The only possibility of concurrent access is if a - // consumer is *still* holding the lock but this is highly unlikely - // given the duration of this timeout. - staleLockTimeout = defaults.KVStoreStaleLockTimeout -) - -type KVLocker interface { - Unlock(ctx context.Context) error - // Comparator returns an object that should be used by the KVStore to make - // sure if the lock is still valid for its client or nil if no such - // verification exists. - Comparator() interface{} -} - -// getLockPath returns the lock path representation of the given path. -func getLockPath(path string) string { - return path + ".lock" -} - -type lockOwner struct { - created time.Time - id uuid.UUID -} - -type pathLocks struct { - mutex lock.RWMutex - lockPaths map[string]lockOwner -} - -func init() { - debug.RegisterStatusObject("kvstore-locks", &kvstoreLocks) -} - -// DebugStatus implements debug.StatusObject to provide debug status collection -// ability -func (pl *pathLocks) DebugStatus() string { - pl.mutex.RLock() - str := spew.Sdump(pl.lockPaths) - pl.mutex.RUnlock() - return str -} - -func (pl *pathLocks) runGC() { - pl.mutex.Lock() - for path, owner := range pl.lockPaths { - if time.Since(owner.created) > staleLockTimeout { - log.WithField("path", path).Error("Forcefully unlocking local kvstore lock") - delete(pl.lockPaths, path) - } - } - pl.mutex.Unlock() -} - -func (pl *pathLocks) lock(ctx context.Context, path string) (id uuid.UUID, err error) { - lockTimer, lockTimerDone := inctimer.New() - defer lockTimerDone() - for { - pl.mutex.Lock() - if _, ok := pl.lockPaths[path]; !ok { - id = uuid.New() - pl.lockPaths[path] = lockOwner{ - created: time.Now(), - id: id, - } - pl.mutex.Unlock() - return - } - pl.mutex.Unlock() - - select { - case <-lockTimer.After(time.Duration(10) * time.Millisecond): - case <-ctx.Done(): - err = fmt.Errorf("lock was cancelled: %w", ctx.Err()) - return - } - } -} - -func (pl *pathLocks) unlock(path string, id uuid.UUID) { - pl.mutex.Lock() - if owner, ok := pl.lockPaths[path]; ok && owner.id == id { - delete(pl.lockPaths, path) - } - pl.mutex.Unlock() -} - -// Lock is a lock return by LockPath -type Lock struct { - path string - id uuid.UUID - kvLock KVLocker -} - -// LockPath locks the specified path. The key for the lock is not the path -// provided itself but the path with a suffix of ".lock" appended. The lock -// returned also contains a patch specific local Mutex which will be held. -// -// It is required to call Unlock() on the returned Lock to unlock -func LockPath(ctx context.Context, backend BackendOperations, path string) (l *Lock, err error) { - id, err := kvstoreLocks.lock(ctx, path) - if err != nil { - return nil, err - } - - lock, err := backend.LockPath(ctx, path) - if err != nil { - kvstoreLocks.unlock(path, id) - Trace("Failed to lock", err, logrus.Fields{fieldKey: path}) - err = fmt.Errorf("error while locking path %s: %w", path, err) - return nil, err - } - - Trace("Successful lock", err, logrus.Fields{fieldKey: path}) - return &Lock{kvLock: lock, path: path, id: id}, err -} - -// RunLockGC inspects all local kvstore locks to determine whether they have -// been held longer than the stale lock timeout, and if so, unlocks them -// forceably. -func RunLockGC() { - kvstoreLocks.runGC() -} - -// Unlock unlocks a lock -func (l *Lock) Unlock(ctx context.Context) error { - if l == nil { - return nil - } - - // Unlock kvstore mutex first - err := l.kvLock.Unlock(ctx) - if err != nil { - log.WithError(err).WithField("path", l.path).Error("Unable to unlock kvstore lock") - } - - // unlock local lock even if kvstore cannot be unlocked - kvstoreLocks.unlock(l.path, l.id) - Trace("Unlocked", nil, logrus.Fields{fieldKey: l.path}) - - return err -} - -func (l *Lock) Comparator() interface{} { - return l.kvLock.Comparator() -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/logfields.go b/vendor/github.com/cilium/cilium/pkg/kvstore/logfields.go deleted file mode 100644 index cf6b9792a8b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/logfields.go +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var log = logging.DefaultLogger.WithField(logfields.LogSubsys, "kvstore") - -const ( - // fieldKVStoreModule is the name of the kvstore backend (etcd or consul) - fieldKVStoreModule = "module" - - // key revision - fieldRev = "revision" - - // fieldPrefix is the prefix of the key used in the operation - fieldPrefix = "prefix" - - // fieldKey is the prefix of the key used in the operation - fieldKey = "key" - - // fieldValue is the prefix of the key used in the operation - fieldValue = "value" - - // fieldCondition is the condition that requires to be met - fieldCondition = "condition" - - // fieldNumEntries is the number of entries in the result - fieldNumEntries = "numEntries" - - // fieldRemainingEntries is the number of entries still to be retrieved - fieldRemainingEntries = "remainingEntries" - - // fieldAttachLease is true if the key must be attached to a lease - fieldAttachLease = "attachLease" - - // FieldUser identifies a user in the kvstore - FieldUser = logfields.User - - // FieldRole identifies a role in the kvstore - FieldRole = "role" -) diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/metrics.go b/vendor/github.com/cilium/cilium/pkg/kvstore/metrics.go deleted file mode 100644 index 4f09efd734e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/metrics.go +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "fmt" - "strings" - - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/time" -) - -const ( - metricDelete = "delete" - metricRead = "read" - metricSet = "set" -) - -func GetScopeFromKey(key string) string { - s := strings.SplitN(key, "/", 5) - if len(s) < 4 { - if len(key) >= 12 { - return key[:12] - } - return key - } - return fmt.Sprintf("%s/%s", s[2], s[3]) -} - -func increaseMetric(key, kind, action string, duration time.Duration, err error) { - if !metrics.KVStoreOperationsDuration.IsEnabled() { - return - } - namespace := GetScopeFromKey(key) - outcome := metrics.Error2Outcome(err) - metrics.KVStoreOperationsDuration. - WithLabelValues(namespace, kind, action, outcome).Observe(duration.Seconds()) -} - -func trackEventQueued(key string, typ EventType, duration time.Duration) { - if !metrics.KVStoreEventsQueueDuration.IsEnabled() { - return - } - metrics.KVStoreEventsQueueDuration.WithLabelValues(GetScopeFromKey(key), typ.String()).Observe(duration.Seconds()) -} - -func recordQuorumError(err string) { - if !metrics.KVStoreQuorumErrors.IsEnabled() { - return - } - metrics.KVStoreQuorumErrors.WithLabelValues(err).Inc() -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/store/cell.go b/vendor/github.com/cilium/cilium/pkg/kvstore/store/cell.go deleted file mode 100644 index 238c641d4a8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/store/cell.go +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package store - -import ( - "github.com/cilium/cilium/pkg/hive/cell" -) - -var Cell = cell.Module( - "kvstore-utils", - "Provides factory for kvstore related synchronizers", - - cell.Provide(NewFactory), - - cell.Metric(MetricsProvider), -) - -type Factory interface { - NewSyncStore(clusterName string, backend SyncStoreBackend, prefix string, opts ...WSSOpt) SyncStore - NewWatchStore(clusterName string, keyCreator KeyCreator, observer Observer, opts ...RWSOpt) WatchStore - NewWatchStoreManager(backend WatchStoreBackend, clusterName string) WatchStoreManager -} - -type factoryImpl struct { - metrics *Metrics -} - -func (w *factoryImpl) NewSyncStore(clusterName string, backend SyncStoreBackend, prefix string, opts ...WSSOpt) SyncStore { - return newWorkqueueSyncStore(clusterName, backend, prefix, w.metrics, opts...) -} - -func (w *factoryImpl) NewWatchStore(clusterName string, keyCreator KeyCreator, observer Observer, opts ...RWSOpt) WatchStore { - return newRestartableWatchStore(clusterName, keyCreator, observer, w.metrics, opts...) -} - -func (w *factoryImpl) NewWatchStoreManager(backend WatchStoreBackend, clusterName string) WatchStoreManager { - return newWatchStoreManagerSync(backend, clusterName, w) -} - -func NewFactory(storeMetrics *Metrics) Factory { - return &factoryImpl{ - metrics: storeMetrics, - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/store/doc.go b/vendor/github.com/cilium/cilium/pkg/kvstore/store/doc.go deleted file mode 100644 index 78006529334..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/store/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package store implements a shared store backed by a kvstore or similar with -// the following properties: -// -// - A single type is used to represent all keys -// - Any number of collaborators can join the store. Typically a collaborator -// is an individual Cilium agent running on each node. -// - All collaborators can own and contribute keys to the store. Each key is -// owned by exactly one collaborator. It is the responsibility of each -// collaborator to pick a key name which is guaranteed to be unique. -// - All collaborate desire to see all keys within the scope of a store. The -// scope of the store is defined by a common key prefix. For this purpose, -// each collaborator maintains a local cache of all keys in the store by -// subscribing to change events. -package store diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/store/metrics.go b/vendor/github.com/cilium/cilium/pkg/kvstore/store/metrics.go deleted file mode 100644 index 171436f0d71..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/store/metrics.go +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package store - -import ( - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/metrics/metric" -) - -type Metrics struct { - KVStoreSyncQueueSize metric.Vec[metric.Gauge] - KVStoreSyncErrors metric.Vec[metric.Counter] - KVStoreInitialSyncCompleted metric.Vec[metric.Gauge] -} - -func MetricsProvider() *Metrics { - return &Metrics{ - KVStoreSyncQueueSize: metric.NewGaugeVec(metric.GaugeOpts{ - Namespace: metrics.Namespace, - Subsystem: metrics.SubsystemKVStore, - Name: "sync_queue_size", - Help: "Number of elements queued for synchronization in the kvstore", - }, []string{metrics.LabelScope, metrics.LabelSourceCluster}), - KVStoreSyncErrors: metric.NewCounterVec(metric.CounterOpts{ - Namespace: metrics.Namespace, - Subsystem: metrics.SubsystemKVStore, - Name: "sync_errors_total", - Help: "Number of times synchronization to the kvstore failed", - }, []string{metrics.LabelScope, metrics.LabelSourceCluster}), - KVStoreInitialSyncCompleted: metric.NewGaugeVec(metric.GaugeOpts{ - Namespace: metrics.Namespace, - Subsystem: metrics.SubsystemKVStore, - Name: "initial_sync_completed", - Help: "Whether the initial synchronization from/to the kvstore has completed", - }, []string{metrics.LabelScope, metrics.LabelSourceCluster, metrics.LabelAction}), - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/store/store.go b/vendor/github.com/cilium/cilium/pkg/kvstore/store/store.go deleted file mode 100644 index 73a05859b74..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/store/store.go +++ /dev/null @@ -1,506 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package store - -import ( - "context" - "fmt" - "path" - "strings" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/controller" - "github.com/cilium/cilium/pkg/kvstore" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/time" -) - -const ( - // listTimeoutDefault is the default timeout to wait while performing - // the initial list operation of objects from the kvstore - listTimeoutDefault = 3 * time.Minute - - // watcherChanSize is the size of the channel to buffer kvstore events - watcherChanSize = 100 -) - -var ( - controllers controller.Manager - - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "shared-store") - - kvstoreSyncControllerGroup = controller.NewGroup("kvstore-sync") -) - -// KeyCreator is the function to create a new empty Key instances. Store -// collaborators must implement this interface and provide the implementation -// in the Configuration structure. -type KeyCreator func() Key - -// Configuration is the set of configuration parameters of a shared store. -type Configuration struct { - // Prefix is the key prefix of the store shared by all keys. The prefix - // is the unique identification of the store. Multiple collaborators - // connected to the same kvstore cluster configuring stores with - // matching prefixes will automatically form a shared store. This - // parameter is required. - Prefix string - - // SynchronizationInterval is the interval in which locally owned keys - // are synchronized with the kvstore. This parameter is optional. - SynchronizationInterval time.Duration - - // SharedKeyDeleteDelay is the delay before a shared key delete is - // handled. This parameter is optional, and defaults to 0 if unset. - SharedKeyDeleteDelay time.Duration - - // KeyCreator is called to allocate a Key instance when a new shared - // key is discovered. This parameter is required. - KeyCreator KeyCreator - - // Backend is the kvstore to use as a backend. If no backend is - // specified, kvstore.Client() is being used. - Backend kvstore.BackendOperations - - // Observer is the observe that will receive events on key mutations - Observer Observer - - Context context.Context -} - -// validate is invoked by JoinSharedStore to validate and complete the -// configuration. It returns nil when the configuration is valid. -func (c *Configuration) validate() error { - if c.Prefix == "" { - return fmt.Errorf("prefix must be specified") - } - - if c.KeyCreator == nil { - return fmt.Errorf("KeyCreator must be specified") - } - - if c.SynchronizationInterval == 0 { - c.SynchronizationInterval = option.Config.KVstorePeriodicSync - } - - if c.Backend == nil { - c.Backend = kvstore.Client() - } - - if c.Context == nil { - c.Context = context.Background() - } - - return nil -} - -// SharedStore is an instance of a shared store. It is created with -// JoinSharedStore() and released with the SharedStore.Close() function. -type SharedStore struct { - // conf is a copy of the store configuration. This field is never - // mutated after JoinSharedStore() so it is safe to access this without - // a lock. - conf Configuration - - // name is the name of the shared store. It is derived from the kvstore - // prefix. - name string - - // controllerName is the name of the controller used to synchronize - // with the kvstore. It is derived from the name. - controllerName string - - // backend is the backend as configured via Configuration - backend kvstore.BackendOperations - - // mutex protects mutations to localKeys and sharedKeys - mutex lock.RWMutex - - // localKeys is a map of keys that are owned by the local instance. All - // local keys are synchronized with the kvstore. This map can be - // modified with UpdateLocalKey() and DeleteLocalKey(). - localKeys map[string]LocalKey - - // sharedKeys is a map of all keys that either have been discovered - // from remote collaborators or successfully shared local keys. This - // map represents the state in the kvstore and is updated based on - // kvstore events. - sharedKeys map[string]Key - - kvstoreWatcher *kvstore.Watcher -} - -// Observer receives events when objects in the store mutate -type Observer interface { - // OnDelete is called when the key has been deleted from the shared store - OnDelete(k NamedKey) - - // OnUpdate is called whenever a change has occurred in the data - // structure represented by the key - OnUpdate(k Key) -} - -// NamedKey is an interface that a data structure must implement in order to -// be deleted from a SharedStore. -type NamedKey interface { - // GetKeyName must return the name of the key. The name of the key must - // be unique within the store and stable for a particular key. The name - // of the key must be identical across agent restarts as the keys - // remain in the kvstore. - GetKeyName() string -} - -// Key is the interface that a data structure must implement in order to be -// stored and shared as a key in a SharedStore. -type Key interface { - NamedKey - - // Marshal is called to retrieve the byte slice representation of the - // data represented by the key to store it in the kvstore. The function - // must ensure that the underlying datatype is properly locked. It is - // typically a good idea to use json.Marshal to implement this - // function. - Marshal() ([]byte, error) - - // Unmarshal is called when an update from the kvstore is received. The - // prefix configured for the store is removed from the key, and the - // byte slice passed to the function is coming from the Marshal - // function from another collaborator. The function must unmarshal and - // update the underlying data type. It is typically a good idea to use - // json.Unmarshal to implement this function. - Unmarshal(key string, data []byte) error -} - -// LocalKey is a Key owned by the local store instance -type LocalKey interface { - Key - - // DeepKeyCopy must return a deep copy of the key - DeepKeyCopy() LocalKey -} - -// KVPair represents a basic implementation of the LocalKey interface -type KVPair struct{ Key, Value string } - -func NewKVPair(key, value string) *KVPair { return &KVPair{Key: key, Value: value} } -func KVPairCreator() Key { return &KVPair{} } - -func (kv *KVPair) GetKeyName() string { return kv.Key } -func (kv *KVPair) Marshal() ([]byte, error) { return []byte(kv.Value), nil } - -func (kv *KVPair) Unmarshal(key string, data []byte) error { - kv.Key, kv.Value = key, string(data) - return nil -} - -func (kv *KVPair) DeepKeyCopy() LocalKey { - return NewKVPair(kv.Key, kv.Value) -} - -// JoinSharedStore creates a new shared store based on the provided -// configuration. An error is returned if the configuration is invalid. The -// store is initialized with the contents of the kvstore. An error is returned -// if the contents cannot be retrieved synchronously from the kvstore. Starts a -// controller to continuously synchronize the store with the kvstore. -func JoinSharedStore(c Configuration) (*SharedStore, error) { - if err := c.validate(); err != nil { - return nil, err - } - - s := &SharedStore{ - conf: c, - localKeys: map[string]LocalKey{}, - sharedKeys: map[string]Key{}, - backend: c.Backend, - } - - s.name = "store-" + s.conf.Prefix - s.controllerName = "kvstore-sync-" + s.name - - if err := s.listAndStartWatcher(); err != nil { - return nil, err - } - - controllers.UpdateController(s.controllerName, - controller.ControllerParams{ - Group: kvstoreSyncControllerGroup, - DoFunc: func(ctx context.Context) error { - return s.syncLocalKeys(ctx, true) - }, - RunInterval: s.conf.SynchronizationInterval, - }, - ) - - return s, nil -} - -func (s *SharedStore) onDelete(k NamedKey) { - if s.conf.Observer != nil { - s.conf.Observer.OnDelete(k) - } -} - -func (s *SharedStore) onUpdate(k Key) { - if s.conf.Observer != nil { - s.conf.Observer.OnUpdate(k) - } -} - -// Release frees all resources own by the store but leaves all keys in the -// kvstore intact -func (s *SharedStore) Release() { - // Wait for all write operations to complete and then block all further - // operations - s.mutex.Lock() - defer s.mutex.Unlock() - - if s.kvstoreWatcher != nil { - s.kvstoreWatcher.Stop() - } - - controllers.RemoveController(s.controllerName) -} - -// Close stops participation with a shared store and removes all keys owned by -// this node in the kvstore. This stops the controller started by -// JoinSharedStore(). -func (s *SharedStore) Close(ctx context.Context) { - s.Release() - - for name, key := range s.localKeys { - if err := s.backend.Delete(ctx, s.keyPath(key)); err != nil { - s.getLogger().WithError(err).Warning("Unable to delete key in kvstore") - } - - delete(s.localKeys, name) - // Since we have received our own notification we also need to remove - // it from the shared keys. - delete(s.sharedKeys, name) - - s.onDelete(key) - } -} - -// keyPath returns the absolute kvstore path of a key -func (s *SharedStore) keyPath(key NamedKey) string { - // WARNING - STABLE API: The composition of the absolute key path - // cannot be changed without breaking up and downgrades. - return path.Join(s.conf.Prefix, key.GetKeyName()) -} - -// syncLocalKey synchronizes a key to the kvstore -func (s *SharedStore) syncLocalKey(ctx context.Context, key LocalKey, lease bool) error { - jsonValue, err := key.Marshal() - if err != nil { - return err - } - - // Update key in kvstore, overwrite an eventual existing key. If requested, attach - // lease to expire entry when agent dies and never comes back up. - if _, err := s.backend.UpdateIfDifferent(ctx, s.keyPath(key), jsonValue, lease); err != nil { - return err - } - - return nil -} - -// syncLocalKeys synchronizes all local keys with the kvstore -func (s *SharedStore) syncLocalKeys(ctx context.Context, lease bool) error { - // Create a copy of all local keys so we can unlock and sync to kvstore - // without holding the lock - s.mutex.RLock() - keys := make([]LocalKey, 0, len(s.localKeys)) - for _, key := range s.localKeys { - keys = append(keys, key) - } - s.mutex.RUnlock() - - for _, key := range keys { - if err := s.syncLocalKey(ctx, key, lease); err != nil { - return err - } - } - - return nil -} - -func (s *SharedStore) lookupLocalKey(name string) LocalKey { - s.mutex.RLock() - defer s.mutex.RUnlock() - - for _, key := range s.localKeys { - if key.GetKeyName() == name { - return key - } - } - - return nil -} - -// NumEntries returns the number of entries in the store -func (s *SharedStore) NumEntries() int { - if s == nil { - return 0 - } - - s.mutex.RLock() - defer s.mutex.RUnlock() - return len(s.sharedKeys) -} - -// SharedKeysMap returns a copy of the SharedKeysMap, the returned map can -// be safely modified but the values of the map represent the actual data -// stored in the internal SharedStore SharedKeys map. -func (s *SharedStore) SharedKeysMap() map[string]Key { - s.mutex.RLock() - defer s.mutex.RUnlock() - sharedKeysCopy := make(map[string]Key, len(s.sharedKeys)) - - for k, v := range s.sharedKeys { - sharedKeysCopy[k] = v - } - return sharedKeysCopy -} - -// UpdateLocalKeySync synchronously synchronizes a local key with the kvstore -// and adds it to the list of local keys to be synchronized if the initial -// synchronous synchronization was successful -func (s *SharedStore) UpdateLocalKeySync(ctx context.Context, key LocalKey) error { - s.mutex.Lock() - defer s.mutex.Unlock() - err := s.syncLocalKey(ctx, key, true) - if err == nil { - s.localKeys[key.GetKeyName()] = key.DeepKeyCopy() - } - return err -} - -// UpdateKeySync synchronously synchronizes a key with the kvstore. -func (s *SharedStore) UpdateKeySync(ctx context.Context, key LocalKey, lease bool) error { - return s.syncLocalKey(ctx, key, lease) -} - -// DeleteLocalKey removes a key from being synchronized with the kvstore -func (s *SharedStore) DeleteLocalKey(ctx context.Context, key NamedKey) { - name := key.GetKeyName() - - s.mutex.Lock() - _, ok := s.localKeys[name] - delete(s.localKeys, name) - s.mutex.Unlock() - - err := s.backend.Delete(ctx, s.keyPath(key)) - - if ok { - if err != nil { - s.getLogger().WithError(err).Warning("Unable to delete key in kvstore") - } - - s.onDelete(key) - } -} - -func (s *SharedStore) getLogger() *logrus.Entry { - return log.WithFields(logrus.Fields{ - "storeName": s.name, - }) -} - -func (s *SharedStore) updateKey(name string, value []byte) error { - newKey := s.conf.KeyCreator() - if err := newKey.Unmarshal(name, value); err != nil { - return err - } - - s.mutex.Lock() - s.sharedKeys[name] = newKey - s.mutex.Unlock() - - s.onUpdate(newKey) - return nil -} - -func (s *SharedStore) deleteSharedKey(name string) { - s.mutex.Lock() - existingKey, ok := s.sharedKeys[name] - delete(s.sharedKeys, name) - s.mutex.Unlock() - - if ok { - go func() { - time.Sleep(s.conf.SharedKeyDeleteDelay) - s.mutex.RLock() - _, ok := s.sharedKeys[name] - s.mutex.RUnlock() - if ok { - s.getLogger().WithFields(logrus.Fields{"key": name, "timeWindow": s.conf.SharedKeyDeleteDelay}). - Warning("Received delete event for key which re-appeared within delay time window") - return - } - - s.onDelete(existingKey) - }() - } else { - s.getLogger().WithField("key", name). - Warning("Unable to find deleted key in local state") - } -} - -func (s *SharedStore) listAndStartWatcher() error { - listDone := make(chan struct{}) - - go s.watcher(listDone) - - select { - case <-listDone: - case <-time.After(listTimeoutDefault): - return fmt.Errorf("timeout while retrieving initial list of objects from kvstore") - } - - return nil -} - -func (s *SharedStore) watcher(listDone chan struct{}) { - s.kvstoreWatcher = s.backend.ListAndWatch(s.conf.Context, s.conf.Prefix, watcherChanSize) - - for event := range s.kvstoreWatcher.Events { - if event.Typ == kvstore.EventTypeListDone { - s.getLogger().Debug("Initial list of objects received from kvstore") - close(listDone) - continue - } - - logger := s.getLogger().WithFields(logrus.Fields{ - "key": event.Key, - "eventType": event.Typ, - }) - - logger.Debugf("Received key update via kvstore [value %s]", string(event.Value)) - - keyName := strings.TrimPrefix(event.Key, s.conf.Prefix) - if keyName[0] == '/' { - keyName = keyName[1:] - } - - switch event.Typ { - case kvstore.EventTypeCreate, kvstore.EventTypeModify: - if err := s.updateKey(keyName, event.Value); err != nil { - logger.WithError(err).Warningf("Unable to unmarshal store value: %s", string(event.Value)) - } - - case kvstore.EventTypeDelete: - if localKey := s.lookupLocalKey(keyName); localKey != nil { - logger.Warning("Received delete event for local key. Re-creating the key in the kvstore") - - s.syncLocalKey(s.conf.Context, localKey, true) - } else { - s.deleteSharedKey(keyName) - } - } - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/store/syncstore.go b/vendor/github.com/cilium/cilium/pkg/kvstore/store/syncstore.go deleted file mode 100644 index f8af6aa9995..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/store/syncstore.go +++ /dev/null @@ -1,360 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package store - -import ( - "bytes" - "context" - "fmt" - "path" - "strings" - "sync" - "sync/atomic" - - "github.com/prometheus/client_golang/prometheus" - "github.com/sirupsen/logrus" - "k8s.io/client-go/util/workqueue" - - "github.com/cilium/cilium/pkg/kvstore" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/time" -) - -// SyncStore abstracts the operations allowing to synchronize key/value pairs -// into a kvstore. -type SyncStore interface { - // Run starts the SyncStore logic, blocking until the context is closed. - Run(ctx context.Context) - - // UpsertKey upserts a key/value pair into the kvstore. - UpsertKey(ctx context.Context, key Key) error - - // DeleteKey removes a key from the kvstore. - DeleteKey(ctx context.Context, key NamedKey) error - - // Synced triggers the insertion of the "synced" key associated with this - // store into the kvstore once all upsertions already issued have completed - // successfully, eventually executing all specified callbacks (if any). - // Only the first invocation takes effect. - Synced(ctx context.Context, callbacks ...func(ctx context.Context)) error -} - -// SyncStoreBackend represents the subset kvstore.BackendOperations leveraged -// by SyncStore implementations. -type SyncStoreBackend interface { - // Update creates or updates a key. - Update(ctx context.Context, key string, value []byte, lease bool) error - // Delete deletes a key. - Delete(ctx context.Context, key string) error - - // RegisterLeaseExpiredObserver registers a function which is executed when - // the lease associated with a key having the given prefix is detected as expired. - RegisterLeaseExpiredObserver(prefix string, fn func(key string)) -} - -// wqSyncStore implements the SyncStore interface leveraging a workqueue to -// coalescence update/delete requests and handle retries in case of errors. -type wqSyncStore struct { - backend SyncStoreBackend - prefix string - source string - - workers uint - withLease bool - - limiter workqueue.RateLimiter - workqueue workqueue.RateLimitingInterface - state lock.Map[string, []byte] // map[NamedKey.GetKeyName()]Key.Marshal() - - synced atomic.Bool // Synced() has been triggered - pendingSync lock.Map[string, struct{}] // the set of keys still to sync - syncedKey string - syncedCallbacks []func(context.Context) - - log *logrus.Entry - queuedMetric prometheus.Gauge - errorsMetric prometheus.Counter - syncedMetric prometheus.Gauge -} - -type syncCanary struct{ skipCallbacks bool } - -type WSSOpt func(*wqSyncStore) - -// WSSWithRateLimiter sets the rate limiting algorithm to be used when requeueing failed events. -func WSSWithRateLimiter(limiter workqueue.RateLimiter) WSSOpt { - return func(wss *wqSyncStore) { - wss.limiter = limiter - } -} - -// WSSWithWorkers configures the number of workers spawned by Run() to handle update/delete operations. -func WSSWithWorkers(workers uint) WSSOpt { - return func(wss *wqSyncStore) { - wss.workers = workers - } -} - -// WSSWithoutLease disables attaching the lease to upserted keys. -func WSSWithoutLease() WSSOpt { - return func(wss *wqSyncStore) { - wss.withLease = false - } -} - -// WSSWithSyncedKeyOverride overrides the "synced" key inserted into the kvstore -// when initial synchronization completed (by default it corresponds to the prefix). -func WSSWithSyncedKeyOverride(key string) WSSOpt { - return func(wss *wqSyncStore) { - wss.syncedKey = key - } -} - -// NewWorkqueueSyncStore returns a SyncStore instance which leverages a workqueue -// to coalescence update/delete requests and handle retries in case of errors. -func newWorkqueueSyncStore(clusterName string, backend SyncStoreBackend, prefix string, m *Metrics, opts ...WSSOpt) SyncStore { - wss := &wqSyncStore{ - backend: backend, - prefix: prefix, - source: clusterName, - - workers: 1, - withLease: true, - limiter: workqueue.DefaultControllerRateLimiter(), - syncedKey: prefix, - - log: log.WithField(logfields.Prefix, prefix), - } - - for _, opt := range opts { - opt(wss) - } - - wss.log = wss.log.WithField(logfields.ClusterName, wss.source) - wss.workqueue = workqueue.NewRateLimitingQueue(wss.limiter) - wss.queuedMetric = m.KVStoreSyncQueueSize.WithLabelValues(kvstore.GetScopeFromKey(prefix), wss.source) - wss.errorsMetric = m.KVStoreSyncErrors.WithLabelValues(kvstore.GetScopeFromKey(prefix), wss.source) - wss.syncedMetric = m.KVStoreInitialSyncCompleted.WithLabelValues(kvstore.GetScopeFromKey(prefix), wss.source, "write") - return wss -} - -// Run starts the SyncStore logic, blocking until the context is closed. -func (wss *wqSyncStore) Run(ctx context.Context) { - var wg sync.WaitGroup - - wss.syncedMetric.Set(metrics.BoolToFloat64(false)) - defer wss.syncedMetric.Set(metrics.BoolToFloat64(false)) - - wss.backend.RegisterLeaseExpiredObserver(wss.prefix, wss.handleExpiredLease) - wss.backend.RegisterLeaseExpiredObserver(wss.getSyncedKey(), wss.handleExpiredLease) - - wss.log.WithField(logfields.Workers, wss.workers).Info("Starting workqueue-based sync store") - wg.Add(int(wss.workers)) - for i := uint(0); i < wss.workers; i++ { - go func() { - defer wg.Done() - for wss.processNextItem(ctx) { - } - }() - } - - <-ctx.Done() - - wss.backend.RegisterLeaseExpiredObserver(wss.prefix, nil) - wss.backend.RegisterLeaseExpiredObserver(wss.getSyncedKey(), nil) - - wss.log.Info("Shutting down workqueue-based sync store") - wss.workqueue.ShutDown() - wg.Wait() -} - -// UpsertKey registers the key for asynchronous upsertion in the kvstore, if the -// corresponding value has changed. It returns an error in case it is impossible -// to marshal the value, while kvstore failures are automatically handled through -// a retry mechanism. -func (wss *wqSyncStore) UpsertKey(_ context.Context, k Key) error { - key := k.GetKeyName() - value, err := k.Marshal() - if err != nil { - return fmt.Errorf("failed marshaling key %q: %w", k, err) - } - - prevValue, loaded := wss.state.Swap(key, value) - if loaded && bytes.Equal(prevValue, value) { - wss.log.WithField(logfields.Key, k).Debug("ignoring upsert request for already up-to-date key") - } else { - if !wss.synced.Load() { - wss.pendingSync.Store(key, struct{}{}) - } - - wss.workqueue.Add(key) - wss.queuedMetric.Set(float64(wss.workqueue.Len())) - } - - return nil -} - -// DeleteKey registers the key for asynchronous deletion from the kvstore, if it -// was known to be present. It never returns an error, because kvstore failures -// are automatically handled through a retry mechanism. -func (wss *wqSyncStore) DeleteKey(_ context.Context, k NamedKey) error { - key := k.GetKeyName() - if _, loaded := wss.state.LoadAndDelete(key); loaded { - wss.workqueue.Add(key) - wss.queuedMetric.Set(float64(wss.workqueue.Len())) - } else { - wss.log.WithField(logfields.Key, key).Debug("ignoring delete request for non-existing key") - } - - return nil -} - -func (wss *wqSyncStore) Synced(_ context.Context, callbacks ...func(ctx context.Context)) error { - if synced := wss.synced.Swap(true); !synced { - wss.syncedCallbacks = callbacks - wss.workqueue.Add(syncCanary{}) - } - return nil -} - -func (wss *wqSyncStore) processNextItem(ctx context.Context) bool { - // Retrieve the next key to process from the workqueue. - key, shutdown := wss.workqueue.Get() - wss.queuedMetric.Set(float64(wss.workqueue.Len())) - if shutdown { - return false - } - - // We call Done here so the workqueue knows we have finished - // processing this item. - defer func() { - wss.workqueue.Done(key) - // This ensures that the metric is correctly updated in case of requeues. - wss.queuedMetric.Set(float64(wss.workqueue.Len())) - }() - - // Run the handler, passing it the key to be processed as parameter. - if err := wss.handle(ctx, key); err != nil { - // Put the item back on the workqueue to handle any transient errors. - wss.errorsMetric.Inc() - wss.workqueue.AddRateLimited(key) - return true - } - - // Since no error occurred, forget this item so it does not get queued again - // until another change happens. - wss.workqueue.Forget(key) - if skey, ok := key.(string); ok { - wss.pendingSync.Delete(skey) - } - return true -} - -func (wss *wqSyncStore) handle(ctx context.Context, key interface{}) error { - if value, ok := key.(syncCanary); ok { - return wss.handleSync(ctx, value.skipCallbacks) - } - - if value, ok := wss.state.Load(key.(string)); ok { - return wss.handleUpsert(ctx, key.(string), value) - } - - return wss.handleDelete(ctx, key.(string)) -} - -func (wss *wqSyncStore) handleUpsert(ctx context.Context, key string, value []byte) error { - scopedLog := wss.log.WithField(logfields.Key, key) - - err := wss.backend.Update(ctx, wss.keyPath(key), value, wss.withLease) - if err != nil { - scopedLog.WithError(err).Warning("Failed upserting key in kvstore. Retrying...") - return err - } - - scopedLog.Debug("Upserted key in kvstore") - return nil -} - -func (wss *wqSyncStore) handleDelete(ctx context.Context, key string) error { - scopedLog := wss.log.WithField(logfields.Key, key) - - if err := wss.backend.Delete(ctx, wss.keyPath(key)); err != nil { - scopedLog.WithError(err).Warning("Failed deleting key from kvstore. Retrying...") - return err - } - - scopedLog.Debug("Deleted key from kvstore") - return nil -} - -func (wss *wqSyncStore) handleSync(ctx context.Context, skipCallbacks bool) error { - // This could be replaced by wss.toSync.Len() == 0 if it only existed... - syncCompleted := true - wss.pendingSync.Range(func(string, struct{}) bool { - syncCompleted = false - return false - }) - - if !syncCompleted { - return fmt.Errorf("there are still keys to be synchronized") - } - - key := wss.getSyncedKey() - scopedLog := wss.log.WithField(logfields.Key, key) - - err := wss.backend.Update(ctx, key, []byte(time.Now().Format(time.RFC3339)), wss.withLease) - if err != nil { - scopedLog.WithError(err).Warning("Failed upserting synced key in kvstore. Retrying...") - return err - } - - wss.log.Info("Initial synchronization from the external source completed") - wss.syncedMetric.Set(metrics.BoolToFloat64(true)) - - // Execute any callback that might have been registered. - if !skipCallbacks { - for _, callback := range wss.syncedCallbacks { - callback(ctx) - } - } - - return nil -} - -// handleExpiredLease gets executed when the lease attached to a given key expired, -// and is responsible for enqueuing the given key to recreate it. -func (wss *wqSyncStore) handleExpiredLease(key string) { - defer wss.queuedMetric.Set(float64(wss.workqueue.Len())) - - if key == wss.getSyncedKey() { - // Re-enqueue the creation of the sync canary, but make sure that - // the registered callbacks are not executed a second time. - wss.workqueue.Add(syncCanary{skipCallbacks: true}) - return - } - - key = strings.TrimPrefix(strings.TrimPrefix(key, wss.prefix), "/") - _, ok := wss.state.Load(key) - if ok { - wss.log.WithField(logfields.Key, key).Debug("enqueuing upsert request for key as the attached lease expired") - if !wss.synced.Load() { - wss.pendingSync.Store(key, struct{}{}) - } - - wss.workqueue.Add(key) - } -} - -// keyPath returns the absolute kvstore path of a key -func (wss *wqSyncStore) keyPath(key string) string { - // WARNING - STABLE API: The composition of the absolute key path - // cannot be changed without breaking up and downgrades. - return path.Join(wss.prefix, key) -} - -func (wss *wqSyncStore) getSyncedKey() string { - return path.Join(kvstore.SyncedPrefix, wss.source, wss.syncedKey) -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/store/watchstore.go b/vendor/github.com/cilium/cilium/pkg/kvstore/store/watchstore.go deleted file mode 100644 index 04881f7179f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/store/watchstore.go +++ /dev/null @@ -1,252 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package store - -import ( - "context" - "strings" - "sync/atomic" - - "github.com/prometheus/client_golang/prometheus" - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/kvstore" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/metrics/metric" -) - -// WatchStore abstracts the operations allowing to synchronize key/value pairs -// from a kvstore, emitting the corresponding events. -type WatchStore interface { - // Watch starts watching the specified kvstore prefix, blocking until the context is closed. - // Depending on the implementation, it might be executed multiple times. - Watch(ctx context.Context, backend WatchStoreBackend, prefix string) - - // NumEntries returns the number of entries synchronized from the store. - NumEntries() uint64 - - // Synced returns whether the initial list of entries has been retrieved from - // the kvstore, and new events are currently being watched. - Synced() bool - - // Drain emits a deletion event for each known key. It shall be called only - // when no watch operation is in progress. - Drain() -} - -// WatchStoreBackend represents the subset of kvstore.BackendOperations leveraged -// by WatchStore implementations. -type WatchStoreBackend interface { - // ListAndWatch creates a new watcher for the given prefix after listing the existing keys. - ListAndWatch(ctx context.Context, prefix string, chanSize int) *kvstore.Watcher -} - -type RWSOpt func(*restartableWatchStore) - -// WSWithOnSyncCallback registers a function to be executed after -// listing all keys from the kvstore for the first time. Multiple -// callback functions can be registered. -func RWSWithOnSyncCallback(callback func(ctx context.Context)) RWSOpt { - return func(rws *restartableWatchStore) { - rws.onSyncCallbacks = append(rws.onSyncCallbacks, callback) - } -} - -// WSWithEntriesGauge registers a Prometheus gauge metric that is kept -// in sync with the number of entries synchronized from the kvstore. -func RWSWithEntriesMetric(gauge prometheus.Gauge) RWSOpt { - return func(rws *restartableWatchStore) { - rws.entriesMetric = gauge - } -} - -type rwsEntry struct { - key Key - stale bool -} - -// restartableWatchStore implements the WatchStore interface, supporting -// multiple executions of the Watch() operation (granted that the previous one -// already terminated). This allows to transparently handle the case in which -// we had to create a new etcd connection (for instance following a failure) -// which refers to the same remote cluster. -type restartableWatchStore struct { - source string - keyCreator KeyCreator - observer Observer - - watching atomic.Bool - synced atomic.Bool - onSyncCallbacks []func(ctx context.Context) - - // Using a separate entries counter avoids the need for synchronizing the - // access to the state map, since the only concurrent reader is represented - // by the NumEntries() function. - state map[string]*rwsEntry - numEntries atomic.Uint64 - - log *logrus.Entry - entriesMetric prometheus.Gauge - syncMetric metric.Vec[metric.Gauge] -} - -// NewRestartableWatchStore returns a WatchStore instance which supports -// restarting the watch operation multiple times, automatically handling -// the emission of deletion events for all stale entries (if enabled). It -// shall be restarted only once the previous Watch execution terminated. -func newRestartableWatchStore(clusterName string, keyCreator KeyCreator, observer Observer, m *Metrics, opts ...RWSOpt) WatchStore { - rws := &restartableWatchStore{ - source: clusterName, - keyCreator: keyCreator, - observer: observer, - - state: make(map[string]*rwsEntry), - - log: log, - entriesMetric: metrics.NoOpGauge, - syncMetric: m.KVStoreInitialSyncCompleted, - } - - for _, opt := range opts { - opt(rws) - } - - rws.log = rws.log.WithField(logfields.ClusterName, rws.source) - return rws -} - -// Watch starts watching the specified kvstore prefix, blocking until the context is closed. -// It might be executed multiple times, granted that the previous execution already terminated. -func (rws *restartableWatchStore) Watch(ctx context.Context, backend WatchStoreBackend, prefix string) { - // Append a trailing "/" to the prefix, to make sure that we watch only - // sub-elements belonging to that prefix, and not to sibling prefixes - // (for instance in case the last part of the prefix is the cluster name, - // and one is the substring of another). - if !strings.HasSuffix(prefix, "/") { - prefix = prefix + "/" - } - - rws.log = rws.log.WithField(logfields.Prefix, prefix) - syncedMetric := rws.syncMetric.WithLabelValues( - kvstore.GetScopeFromKey(prefix), rws.source, "read") - - rws.log.Info("Starting restartable watch store") - syncedMetric.Set(metrics.BoolToFloat64(false)) - - if rws.watching.Swap(true) { - rws.log.Panic("Cannot start the watch store while still running") - } - - defer func() { - rws.log.Info("Stopped restartable watch store") - syncedMetric.Set(metrics.BoolToFloat64(false)) - rws.watching.Store(false) - rws.synced.Store(false) - }() - - // Mark all known keys as stale. - for _, entry := range rws.state { - entry.stale = true - } - - // The events channel is closed when the context is closed. - watcher := backend.ListAndWatch(ctx, prefix, 0) - for event := range watcher.Events { - if event.Typ == kvstore.EventTypeListDone { - rws.log.Debug("Initial synchronization completed") - rws.drainKeys(true) - syncedMetric.Set(metrics.BoolToFloat64(true)) - rws.synced.Store(true) - - for _, callback := range rws.onSyncCallbacks { - callback(ctx) - } - - // Clear the list of callbacks so that they don't get executed - // a second time in case of reconnections. - rws.onSyncCallbacks = nil - - continue - } - - key := strings.TrimPrefix(event.Key, prefix) - rws.log.WithFields(logrus.Fields{ - logfields.Key: key, - logfields.Event: event.Typ, - }).Debug("Received event from kvstore") - - switch event.Typ { - case kvstore.EventTypeCreate, kvstore.EventTypeModify: - rws.handleUpsert(key, event.Value) - case kvstore.EventTypeDelete: - rws.handleDelete(key) - } - } -} - -// NumEntries returns the number of entries synchronized from the store. -func (rws *restartableWatchStore) NumEntries() uint64 { - return rws.numEntries.Load() -} - -// Synced returns whether the initial list of entries has been retrieved from -// the kvstore, and new events are currently being watched. -func (rws *restartableWatchStore) Synced() bool { - return rws.synced.Load() -} - -// Drain emits a deletion event for each known key. It shall be called only -// when no watch operation is in progress. -func (rws *restartableWatchStore) Drain() { - if rws.watching.Swap(true) { - rws.log.Panic("Cannot drain the watch store while still running") - } - defer rws.watching.Store(false) - - rws.log.Info("Draining restartable watch store") - rws.drainKeys(false) - rws.log.Info("Drained restartable watch store") -} - -// drainKeys emits synthetic deletion events: -// * staleOnly == true: for all keys marked as stale; -// * staleOnly == false: for all known keys; -func (rws *restartableWatchStore) drainKeys(staleOnly bool) { - for key, entry := range rws.state { - if !staleOnly || entry.stale { - rws.log.WithField(logfields.Key, key).Debug("Emitting deletion event for stale key") - rws.handleDelete(key) - } - } -} - -func (rws *restartableWatchStore) handleUpsert(key string, value []byte) { - entry := &rwsEntry{key: rws.keyCreator()} - if err := entry.key.Unmarshal(key, value); err != nil { - rws.log.WithFields(logrus.Fields{ - logfields.Key: key, - logfields.Value: string(value), - }).WithError(err).Warning("Unable to unmarshal value") - return - } - - rws.state[key] = entry - rws.numEntries.Store(uint64(len(rws.state))) - rws.entriesMetric.Set(float64(len(rws.state))) - rws.observer.OnUpdate(entry.key) -} - -func (rws *restartableWatchStore) handleDelete(key string) { - entry, ok := rws.state[key] - if !ok { - rws.log.WithField(logfields.Key, key).Warning("Received deletion event for unknown key") - return - } - - delete(rws.state, key) - rws.numEntries.Store(uint64(len(rws.state))) - rws.entriesMetric.Set(float64(len(rws.state))) - rws.observer.OnDelete(entry.key) -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/store/watchstoremgr.go b/vendor/github.com/cilium/cilium/pkg/kvstore/store/watchstoremgr.go deleted file mode 100644 index 44f85114c7e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/store/watchstoremgr.go +++ /dev/null @@ -1,144 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package store - -import ( - "context" - "path" - "sync" - "sync/atomic" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/kvstore" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -// WSMFunc if a function which can be registered in the WatchStoreManager. -type WSMFunc func(context.Context) - -// WatchStoreManager enables to register a set of functions to be asynchronously -// executed when the corresponding kvstore prefixes are synchronized (based on -// the implementation). -type WatchStoreManager interface { - // Register registers a function associated with a given kvstore prefix. - // It cannot be called once Run() has started. - Register(prefix string, function WSMFunc) - // Run starts the manager, blocking until the context is closed and all - // started functions terminated. - Run(ctx context.Context) -} - -// wsmCommon implements the common logic shared by WatchStoreManager implementations. -type wsmCommon struct { - wg sync.WaitGroup - functions map[string]WSMFunc - - running atomic.Bool - log *logrus.Entry -} - -func newWSMCommon(clusterName string) wsmCommon { - return wsmCommon{ - functions: make(map[string]WSMFunc), - log: log.WithField(logfields.ClusterName, clusterName), - } -} - -// Register registers a function associated with a given kvstore prefix. -// It cannot be called once Run() has started. -func (mgr *wsmCommon) Register(prefix string, function WSMFunc) { - if mgr.running.Load() { - mgr.log.Panic("Cannot call Register while the watch store manager is running") - } - - mgr.functions[prefix] = function -} - -func (mgr *wsmCommon) ready(ctx context.Context, prefix string) { - if fn := mgr.functions[prefix]; fn != nil { - mgr.log.WithField(logfields.Prefix, prefix).Debug("Starting function for kvstore prefix") - delete(mgr.functions, prefix) - - mgr.wg.Add(1) - go func() { - defer mgr.wg.Done() - fn(ctx) - mgr.log.WithField(logfields.Prefix, prefix).Debug("Function terminated for kvstore prefix") - }() - } else { - mgr.log.WithField(logfields.Prefix, prefix).Debug("Received sync event for unregistered prefix") - } -} - -func (mgr *wsmCommon) run() { - mgr.log.Info("Starting watch store manager") - if mgr.running.Swap(true) { - mgr.log.Panic("Cannot start the watch store manager twice") - } -} - -func (mgr *wsmCommon) wait() { - mgr.wg.Wait() - mgr.log.Info("Stopped watch store manager") -} - -type wsmSync struct { - wsmCommon - - clusterName string - backend WatchStoreBackend - store WatchStore - onUpdate func(prefix string) -} - -// NewWatchStoreManagerSync implements the WatchStoreManager interface, starting the -// registered functions only once the corresponding prefix sync canary has been received. -// This ensures that the synchronization of the keys hosted under the given prefix -// have been successfully synchronized from the external source, even in case an -// ephemeral kvstore is used. -func newWatchStoreManagerSync(backend WatchStoreBackend, clusterName string, factory Factory) WatchStoreManager { - mgr := wsmSync{ - wsmCommon: newWSMCommon(clusterName), - clusterName: clusterName, - backend: backend, - } - - mgr.store = factory.NewWatchStore(clusterName, KVPairCreator, &mgr) - return &mgr -} - -// Run starts the manager, blocking until the context is closed and all -// started functions terminated. -func (mgr *wsmSync) Run(ctx context.Context) { - mgr.run() - mgr.onUpdate = func(prefix string) { mgr.ready(ctx, prefix) } - mgr.store.Watch(ctx, mgr.backend, path.Join(kvstore.SyncedPrefix, mgr.clusterName)) - mgr.wait() -} - -func (mgr *wsmSync) OnUpdate(k Key) { mgr.onUpdate(k.GetKeyName()) } -func (mgr *wsmSync) OnDelete(k NamedKey) {} - -type wsmImmediate struct { - wsmCommon -} - -// NewWatchStoreManagerImmediate implements the WatchStoreManager interface, -// immediately starting the registered functions once Run() is executed. -func NewWatchStoreManagerImmediate(clusterName string) WatchStoreManager { - return &wsmImmediate{ - wsmCommon: newWSMCommon(clusterName), - } -} - -// Run starts the manager, blocking until the context is closed and all -// started functions terminated. -func (mgr *wsmImmediate) Run(ctx context.Context) { - mgr.run() - for prefix := range mgr.functions { - mgr.ready(ctx, prefix) - } - mgr.wait() -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/trace.go b/vendor/github.com/cilium/cilium/pkg/kvstore/trace.go deleted file mode 100644 index b06887c0f88..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/trace.go +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -import ( - "github.com/sirupsen/logrus" -) - -var ( - traceEnabled bool -) - -// EnableTracing enables kvstore tracing -func EnableTracing() { - traceEnabled = true -} - -// Trace is used to trace kvstore debug messages -func Trace(format string, err error, fields logrus.Fields, a ...interface{}) { - if traceEnabled { - log.WithError(err).WithFields(fields).Debugf(format) - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/kvstore/watcher_cache.go b/vendor/github.com/cilium/cilium/pkg/kvstore/watcher_cache.go deleted file mode 100644 index a3bf7cbf553..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/kvstore/watcher_cache.go +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kvstore - -type watchState struct { - deletionMark bool -} - -type watcherCache map[string]watchState - -func (wc watcherCache) Exists(key []byte) bool { - if _, ok := wc[string(key)]; ok { - return true - } - - return false -} - -func (wc watcherCache) RemoveDeleted(f func(string)) { - for k, localKey := range wc { - if localKey.deletionMark { - f(k) - delete(wc, k) - } - } -} - -func (wc watcherCache) MarkAllForDeletion() { - for k := range wc { - wc[k] = watchState{deletionMark: true} - } -} - -func (wc watcherCache) MarkInUse(key []byte) { - wc[string(key)] = watchState{deletionMark: false} -} - -func (wc watcherCache) RemoveKey(key []byte) { - delete(wc, string(key)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/labels/array.go b/vendor/github.com/cilium/cilium/pkg/labels/array.go index 0582adb0fa4..e13b055d73c 100644 --- a/vendor/github.com/cilium/cilium/pkg/labels/array.go +++ b/vendor/github.com/cilium/cilium/pkg/labels/array.go @@ -85,7 +85,7 @@ func (ls LabelArray) Contains(needed LabelArray) bool { nextLabel: for i := range needed { for l := range ls { - if needed[i].matches(&ls[l]) { + if ls[l].Has(&needed[i]) { continue nextLabel } } @@ -96,13 +96,29 @@ nextLabel: return true } +// Intersects returns true if ls contains at least one label in needed. +// +// This has the same matching semantics as Has, namely, +// ["k8s:foo=bar"].Intersects(["any:foo=bar"]) == true +// ["any:foo=bar"].Intersects(["k8s:foo=bar"]) == false +func (ls LabelArray) Intersects(needed LabelArray) bool { + for _, l := range ls { + for _, n := range needed { + if l.Has(&n) { + return true + } + } + } + return false +} + // Lacks is identical to Contains but returns all missing labels func (ls LabelArray) Lacks(needed LabelArray) LabelArray { missing := LabelArray{} nextLabel: for i := range needed { for l := range ls { - if needed[i].matches(&ls[l]) { + if ls[l].Has(&needed[l]) { continue nextLabel } } @@ -113,24 +129,25 @@ nextLabel: return missing } -// Has returns whether the provided key exists. +// Has returns whether the provided key exists in the label array. // Implementation of the // github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels.Labels interface. +// +// The key can be of source "any", in which case the source is +// ignored. The inverse, however, is not true. +// ["k8s.foo=bar"].Has("any.foo") => true +// ["any.foo=bar"].Has("k8s.foo") => false +// +// If the key is of source "cidr", this will also match +// broader keys. +// ["cidr:1.1.1.1/32"].Has("cidr.1.0.0.0/8") => true +// ["cidr:1.0.0.0/8"].Has("cidr.1.1.1.1/32") => false func (ls LabelArray) Has(key string) bool { // The key is submitted in the form of `source.key=value` keyLabel := parseSelectLabel(key, '.') - if keyLabel.IsAnySource() { - for l := range ls { - if ls[l].Key == keyLabel.Key { - return true - } - } - } else { - for _, lsl := range ls { - // Note that if '=value' is part of 'key' it is ignored here - if lsl.Source == keyLabel.Source && lsl.Key == keyLabel.Key { - return true - } + for _, l := range ls { + if l.HasKey(&keyLabel) { + return true } } return false @@ -139,19 +156,21 @@ func (ls LabelArray) Has(key string) bool { // Get returns the value for the provided key. // Implementation of the // github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels.Labels interface. +// +// The key can be of source "any", in which case the source is +// ignored. The inverse, however, is not true. +// ["k8s.foo=bar"].Get("any.foo") => "bar" +// ["any.foo=bar"].Get("k8s.foo") => "" +// +// If the key is of source "cidr", this will also match +// broader keys. +// ["cidr:1.1.1.1/32"].Has("cidr.1.0.0.0/8") => true +// ["cidr:1.0.0.0/8"].Has("cidr.1.1.1.1/32") => false func (ls LabelArray) Get(key string) string { keyLabel := parseSelectLabel(key, '.') - if keyLabel.IsAnySource() { - for l := range ls { - if ls[l].Key == keyLabel.Key { - return ls[l].Value - } - } - } else { - for _, lsl := range ls { - if lsl.Source == keyLabel.Source && lsl.Key == keyLabel.Key { - return lsl.Value - } + for _, l := range ls { + if l.HasKey(&keyLabel) { + return l.Value } } return "" diff --git a/vendor/github.com/cilium/cilium/pkg/labels/cidr.go b/vendor/github.com/cilium/cilium/pkg/labels/cidr.go index 611ff5512d5..003e0985318 100644 --- a/vendor/github.com/cilium/cilium/pkg/labels/cidr.go +++ b/vendor/github.com/cilium/cilium/pkg/labels/cidr.go @@ -8,14 +8,16 @@ import ( "net/netip" "strconv" "strings" - "sync" - "github.com/hashicorp/golang-lru/v2/simplelru" - - "github.com/cilium/cilium/pkg/lock" "github.com/cilium/cilium/pkg/option" ) +var ( + worldLabelNonDualStack = Label{Key: IDNameWorld, Source: LabelSourceReserved} + worldLabelV4 = Label{Source: LabelSourceReserved, Key: IDNameWorldIPv4} + worldLabelV6 = Label{Source: LabelSourceReserved, Key: IDNameWorldIPv6} +) + // maskedIPToLabelString is the base method for serializing an IP + prefix into // a string that can be used for creating Labels and EndpointSelector objects. // @@ -78,62 +80,25 @@ func IPStringToLabel(ip string) (Label, error) { } } -// GetCIDRLabels turns a CIDR into a set of labels representing the cidr itself -// and all broader CIDRS which include the specified CIDR in them. For example: -// CIDR: 10.0.0.0/8 => -// -// "cidr:10.0.0.0/8", "cidr:10.0.0.0/7", "cidr:8.0.0.0/6", -// "cidr:8.0.0.0/5", "cidr:0.0.0.0/4, "cidr:0.0.0.0/3", -// "cidr:0.0.0.0/2", "cidr:0.0.0.0/1", "cidr:0.0.0.0/0" +// GetCIDRLabels turns a CIDR in to a specially formatted label, and returns +// a Labels including the CIDR-specific label and the appropriate world label. +// e.g. "10.0.0.0/8" => ["cidr:10.0.0.0/8", "reserved:world-ipv4"] // -// The identity reserved:world is always added as it includes any CIDR. +// IPv6 requires some special treatment, since ":" is special in the label selector +// grammar. For example, "::/0" becomes "cidr:0--0/0", func GetCIDRLabels(prefix netip.Prefix) Labels { - once.Do(func() { - // simplelru.NewLRU fails only when given a negative size, so we can skip the error check - cidrLabelsCache, _ = simplelru.NewLRU[netip.Prefix, []Label](cidrLabelsCacheMaxSize, nil) - }) - - addr := prefix.Addr() - ones := prefix.Bits() - lbls := make(Labels, 1 /* this CIDR */ +ones /* the prefixes */ +1 /*world label*/) - - // If ones is zero, then it's the default CIDR prefix /0 which should - // just be regarded as reserved:world. In all other cases, we need - // to generate the set of prefixes starting from the /0 up to the - // specified prefix length. - if ones == 0 { - addWorldLabel(addr, lbls) - return lbls + lbls := make(Labels, 2) + if prefix.Bits() > 0 { + l := maskedIPToLabel(prefix.Addr().String(), prefix.Bits()) + l.cidr = &prefix + lbls[l.Key] = l } - - computeCIDRLabels( - cidrLabelsCache, - lbls, - nil, // avoid allocating space for the intermediate results until we need it - addr, - ones, - ) - addWorldLabel(addr, lbls) + AddWorldLabel(prefix.Addr(), lbls) return lbls } -var ( - // cidrLabelsCache stores the partial computations for CIDR labels. - // This both avoids repeatedly computing the prefixes and makes sure the - // CIDR strings are reused to reduce memory usage. - // Stored in a lru map to limit memory usage. - // - // Stores e.g. for prefix "10.0.0.0/8" the labels ["10.0.0.0/8", ..., "0.0.0.0/0"]. - cidrLabelsCache *simplelru.LRU[netip.Prefix, []Label] - - // mutex to serialize concurrent accesses to the cidrLabelsCache. - mu lock.Mutex -) - -const cidrLabelsCacheMaxSize = 8192 - -func addWorldLabel(addr netip.Addr, lbls Labels) { +func AddWorldLabel(addr netip.Addr, lbls Labels) { switch { case !option.Config.IsDualStack(): lbls[worldLabelNonDualStack.Key] = worldLabelNonDualStack @@ -144,81 +109,11 @@ func addWorldLabel(addr netip.Addr, lbls Labels) { } } -var ( - once sync.Once - - worldLabelNonDualStack = Label{Key: IDNameWorld, Source: LabelSourceReserved} - worldLabelV4 = Label{Source: LabelSourceReserved, Key: IDNameWorldIPv4} - worldLabelV6 = Label{Source: LabelSourceReserved, Key: IDNameWorldIPv6} -) - -func computeCIDRLabels(cache *simplelru.LRU[netip.Prefix, []Label], lbls Labels, results []Label, addr netip.Addr, ones int) []Label { - if ones < 0 { - return results - } - - prefix, _ := addr.Prefix(ones) - - mu.Lock() - cachedLbls, ok := cache.Get(prefix) - mu.Unlock() - if ok { - for _, lbl := range cachedLbls { - lbls[lbl.Key] = lbl - } - if results == nil { - return cachedLbls - } else { - return append(results, cachedLbls...) - } - } - - // Compute the label for this prefix (e.g. "cidr:10.0.0.0/8") - prefixLabel := maskedIPToLabel(prefix.Addr().String(), ones) - lbls[prefixLabel.Key] = prefixLabel - - // Keep computing the rest (e.g. "cidr:10.0.0.0/7", ...). - results = computeCIDRLabels( - cache, - lbls, - append(results, prefixLabel), - prefix.Addr(), ones-1, - ) - - // Cache the resulting labels derived from this prefix, e.g. /8, /7, ... - mu.Lock() - cache.Add(prefix, results[len(results)-ones-1:]) - mu.Unlock() - - return results -} - -// leafCIDRList is a map of CIDR to data, where only leaf CIDRs are present -// in the map. -type leafCIDRList[T any] map[netip.Prefix]T - -// insert conditionally adds a prefix to the leaf cidr list, -// adding it only if the prefix is a leaf. Additionally, it removes -// any now non-leaf cidr. -func (ll leafCIDRList[T]) insert(newPrefix netip.Prefix, v T) { - // Check every existing leaf CIDR. Three possible cases: - // - an existing prefix contains this one: delete existing, add new - // - this new prefix contains an existing one: drop new prefix - // - no matches: add new - for existingPrefix := range ll { - // Is this a subset of an existing prefix? That means we've found a now non-leaf - // prefix -- swap it - if existingPrefix.Contains(newPrefix.Addr()) && existingPrefix.Bits() < newPrefix.Bits() { - delete(ll, existingPrefix) - // it is safe to stop here, since at most one prefix in the list could - // have contained this prefix. - break - } - - // Is this a superset of an existing prefix? Then we're not a leaf; skip it - if newPrefix.Contains(existingPrefix.Addr()) && newPrefix.Bits() <= existingPrefix.Bits() { - return - } +func LabelToPrefix(key string) (netip.Prefix, error) { + prefixStr := strings.Replace(key, "-", ":", -1) + pfx, err := netip.ParsePrefix(prefixStr) + if err != nil { + return netip.Prefix{}, fmt.Errorf("failed to parse label prefix %s: %w", key, err) } - ll[newPrefix] = v + return pfx, nil } diff --git a/vendor/github.com/cilium/cilium/pkg/labels/labels.go b/vendor/github.com/cilium/cilium/pkg/labels/labels.go index 74a7afd32c8..609f1bd5462 100644 --- a/vendor/github.com/cilium/cilium/pkg/labels/labels.go +++ b/vendor/github.com/cilium/cilium/pkg/labels/labels.go @@ -11,6 +11,10 @@ import ( "slices" "sort" "strings" + + "github.com/sirupsen/logrus" + + "github.com/cilium/cilium/pkg/logging/logfields" ) const ( @@ -51,6 +55,16 @@ const ( // with IDNameHost if the kube-apiserver is running on the local host. IDNameKubeAPIServer = "kube-apiserver" + // IDNameEncryptedOverlay is the label used to identify encrypted overlay + // traffic. + // + // It is part of the reserved identity 11 and signals that overlay traffic + // with this identity must be IPSec encrypted before leaving the host. + // + // This identity should never be seen on the wire and is used only on the + // local host. + IDNameEncryptedOverlay = "overlay-to-encrypt" + // IDNameIngress is the label used to identify Ingress proxies. It is part // of the reserved identity 8. IDNameIngress = "ingress" @@ -124,9 +138,18 @@ const ( // LabelSourceCIDR is the label source for generated CIDRs. LabelSourceCIDR = "cidr" + // LabelSourceNode is the label source for remote-nodes. + LabelSourceNode = "node" + + // LabelSourceFQDN is the label source for IPs resolved by fqdn lookups + LabelSourceFQDN = "fqdn" + // LabelSourceReservedKeyPrefix is the prefix of a reserved label LabelSourceReservedKeyPrefix = LabelSourceReserved + "." + // LabelSourceDirectory is the label source for policies read from files + LabelSourceDirectory = "directory" + // LabelKeyFixedIdentity is the label that can be used to define a fixed // identity. LabelKeyFixedIdentity = "io.cilium.fixed-identity" @@ -140,32 +163,32 @@ type Label struct { // // +kubebuilder:validation:Optional Source string `json:"source"` + + // optimization for CIDR prefixes + // +deepequal-gen=false + cidr *netip.Prefix `json:"-"` } // Labels is a map of labels where the map's key is the same as the label's key. type Labels map[string]Label // GetPrintableModel turns the Labels into a sorted list of strings -// representing the labels, with CIDRs deduplicated (ie, only provide the most -// specific CIDRs). +// representing the labels. func (l Labels) GetPrintableModel() (res []string) { - // Aggregate list of "leaf" CIDRs - leafCIDRs := leafCIDRList[*Label]{} + res = make([]string, 0, len(l)) for _, v := range l { - // If this is a CIDR label, filter out non-leaf CIDRs for human consumption if v.Source == LabelSourceCIDR { - v := v - prefixStr := strings.Replace(v.Key, "-", ":", -1) - prefix, _ := netip.ParsePrefix(prefixStr) - leafCIDRs.insert(prefix, &v) + prefix, err := LabelToPrefix(v.Key) + if err != nil { + res = append(res, v.String()) + } else { + res = append(res, LabelSourceCIDR+":"+prefix.String()) + } } else { // not a CIDR label, no magic needed res = append(res, v.String()) } } - for _, val := range leafCIDRs { - res = append(res, strings.Replace(val.String(), "-", ":", -1)) - } sort.Strings(res) return res @@ -224,11 +247,21 @@ func NewLabel(key string, value string, source string) Label { value = "" } - return Label{ + l := Label{ Key: key, Value: value, Source: source, } + if l.Source == LabelSourceCIDR { + c, err := LabelToPrefix(l.Key) + if err != nil { + logrus.WithField("key", l.Key).WithError(err).Error("Failed to parse CIDR label: invalid prefix.") + } else { + l.cidr = &c + } + } + + return l } // Equals returns true if source, Key and Value are equal and false otherwise. @@ -249,9 +282,48 @@ func (l *Label) IsReservedSource() bool { return l.Source == LabelSourceReserved } -// matches returns true if l matches the target -func (l *Label) matches(target *Label) bool { - return l.Equals(target) +// Has returns true label L contains target. +// target may be "looser" w.r.t source or cidr, i.e. +// "k8s:foo=bar".Has("any:foo=bar") is true +// "any:foo=bar".Has("k8s:foo=bar") is false +// "cidr:10.0.0.1/32".Has("cidr:10.0.0.0/24") is true +func (l *Label) Has(target *Label) bool { + return l.HasKey(target) && l.Value == target.Value +} + +// HasKey returns true if l has target's key. +// target may be "looser" w.r.t source or cidr, i.e. +// "k8s:foo=bar".HasKey("any:foo") is true +// "any:foo=bar".HasKey("k8s:foo") is false +// "cidr:10.0.0.1/32".HasKey("cidr:10.0.0.0/24") is true +// "cidr:10.0.0.0/24".HasKey("cidr:10.0.0.1/32") is false +func (l *Label) HasKey(target *Label) bool { + if !target.IsAnySource() && l.Source != target.Source { + return false + } + + // Do cidr-aware matching if both sources are "cidr". + if target.Source == LabelSourceCIDR && l.Source == LabelSourceCIDR { + tc := target.cidr + if tc == nil { + v, err := LabelToPrefix(target.Key) + if err != nil { + tc = &v + } + } + lc := l.cidr + if lc == nil { + v, err := LabelToPrefix(l.Key) + if err != nil { + lc = &v + } + } + if tc != nil && lc != nil && tc.Bits() <= lc.Bits() && tc.Contains(lc.Addr()) { + return true + } + } + + return l.Key == target.Key } // String returns the string representation of Label in the for of Source:Key=Value or @@ -311,6 +383,15 @@ func (l *Label) UnmarshalJSON(data []byte) error { l.Value = aux.Value } + if l.Source == LabelSourceCIDR { + c, err := LabelToPrefix(l.Key) + if err == nil { + l.cidr = &c + } else { + logrus.WithField("key", l.Key).WithError(err).Error("Failed to parse CIDR label: invalid prefix.") + } + } + return nil } @@ -566,24 +647,38 @@ func (l Labels) FindReserved() Labels { // IsReserved returns true if any of the labels has a reserved source. func (l Labels) IsReserved() bool { + return l.HasSource(LabelSourceReserved) +} + +// Has returns true if l contains the given label. +func (l Labels) Has(label Label) bool { for _, lbl := range l { - if lbl.Source == LabelSourceReserved { + if lbl.Has(&label) { return true } } return false } -// Has returns true if l contains the given label. -func (l Labels) Has(label Label) bool { +// HasSource returns true if l contains the given label source. +func (l Labels) HasSource(source string) bool { for _, lbl := range l { - if lbl.matches(&label) { + if lbl.Source == source { return true } } return false } +// CollectSources returns all distinct label sources found in l +func (l Labels) CollectSources() map[string]struct{} { + sources := make(map[string]struct{}) + for _, lbl := range l { + sources[lbl.Source] = struct{}{} + } + return sources +} + // parseSource returns the parsed source of the given str. It also returns the next piece // of text that is after the source. // Example: @@ -640,6 +735,18 @@ func parseLabel(str string, delim byte) (lbl Label) { lbl.Value = next[i+1:] } } + + if lbl.Source == LabelSourceCIDR { + if lbl.Value != "" { + logrus.WithField(logfields.Label, lbl.String()).Error("Invalid CIDR label: labels with source cidr cannot have values.") + } + c, err := LabelToPrefix(lbl.Key) + if err != nil { + logrus.WithField(logfields.Label, str).WithError(err).Error("Failed to parse CIDR label: invalid prefix.") + } else { + lbl.cidr = &c + } + } return lbl } diff --git a/vendor/github.com/cilium/cilium/pkg/labels/oplabels.go b/vendor/github.com/cilium/cilium/pkg/labels/oplabels.go index 96f394f4629..4dad8e7ab85 100644 --- a/vendor/github.com/cilium/cilium/pkg/labels/oplabels.go +++ b/vendor/github.com/cilium/cilium/pkg/labels/oplabels.go @@ -18,7 +18,7 @@ func (k keepMarks) set(key string) { k[key] = struct{}{} // marked for keeping } -// OpLabels represents the the possible types. +// OpLabels represents the possible types. type OpLabels struct { // Active labels that are enabled and disabled but not deleted Custom Labels diff --git a/vendor/github.com/cilium/cilium/pkg/loadbalancer/doc.go b/vendor/github.com/cilium/cilium/pkg/loadbalancer/doc.go deleted file mode 100644 index 997e3f7f186..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/loadbalancer/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:deepcopy-gen=package,register - -// Package loadbalancer contains all logic related with the loadbalancer -// +groupName=pkg -package loadbalancer diff --git a/vendor/github.com/cilium/cilium/pkg/loadbalancer/loadbalancer.go b/vendor/github.com/cilium/cilium/pkg/loadbalancer/loadbalancer.go deleted file mode 100644 index 07073c5d9f1..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/loadbalancer/loadbalancer.go +++ /dev/null @@ -1,824 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package loadbalancer - -import ( - "fmt" - "net" - "sort" - "strconv" - "strings" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/cidr" - cmtypes "github.com/cilium/cilium/pkg/clustermesh/types" - "github.com/cilium/cilium/pkg/option" -) - -// SVCType is a type of a service. -type SVCType string - -const ( - SVCTypeNone = SVCType("NONE") - SVCTypeHostPort = SVCType("HostPort") - SVCTypeClusterIP = SVCType("ClusterIP") - SVCTypeNodePort = SVCType("NodePort") - SVCTypeExternalIPs = SVCType("ExternalIPs") - SVCTypeLoadBalancer = SVCType("LoadBalancer") - SVCTypeLocalRedirect = SVCType("LocalRedirect") -) - -// SVCTrafficPolicy defines which backends are chosen -type SVCTrafficPolicy string - -const ( - SVCTrafficPolicyNone = SVCTrafficPolicy("NONE") - SVCTrafficPolicyCluster = SVCTrafficPolicy("Cluster") - SVCTrafficPolicyLocal = SVCTrafficPolicy("Local") -) - -// SVCNatPolicy defines whether we need NAT46/64 translation for backends -type SVCNatPolicy string - -const ( - SVCNatPolicyNone = SVCNatPolicy("NONE") - SVCNatPolicyNat46 = SVCNatPolicy("Nat46") - SVCNatPolicyNat64 = SVCNatPolicy("Nat64") -) - -// ServiceFlags is the datapath representation of the service flags that can be -// used (lb{4,6}_service.flags) -type ServiceFlags uint16 - -const ( - serviceFlagNone = 0 - serviceFlagExternalIPs = 1 << 0 - serviceFlagNodePort = 1 << 1 - serviceFlagExtLocalScope = 1 << 2 - serviceFlagHostPort = 1 << 3 - serviceFlagSessionAffinity = 1 << 4 - serviceFlagLoadBalancer = 1 << 5 - serviceFlagRoutable = 1 << 6 - serviceFlagSourceRange = 1 << 7 - serviceFlagLocalRedirect = 1 << 8 - serviceFlagNat46x64 = 1 << 9 - serviceFlagL7LoadBalancer = 1 << 10 - serviceFlagLoopback = 1 << 11 - serviceFlagIntLocalScope = 1 << 12 - serviceFlagTwoScopes = 1 << 13 -) - -type SvcFlagParam struct { - SvcType SVCType - SvcNatPolicy SVCNatPolicy - SvcExtLocal bool - SvcIntLocal bool - SessionAffinity bool - IsRoutable bool - CheckSourceRange bool - L7LoadBalancer bool - LoopbackHostport bool -} - -// NewSvcFlag creates service flag -func NewSvcFlag(p *SvcFlagParam) ServiceFlags { - var flags ServiceFlags - - switch p.SvcType { - case SVCTypeExternalIPs: - flags |= serviceFlagExternalIPs - case SVCTypeNodePort: - flags |= serviceFlagNodePort - case SVCTypeLoadBalancer: - flags |= serviceFlagLoadBalancer - case SVCTypeHostPort: - flags |= serviceFlagHostPort - if p.LoopbackHostport { - flags |= serviceFlagLoopback - } - case SVCTypeLocalRedirect: - flags |= serviceFlagLocalRedirect - } - - switch p.SvcNatPolicy { - case SVCNatPolicyNat46: - fallthrough - case SVCNatPolicyNat64: - flags |= serviceFlagNat46x64 - } - - if p.SvcExtLocal { - flags |= serviceFlagExtLocalScope - } - if p.SvcIntLocal { - flags |= serviceFlagIntLocalScope - } - if p.SessionAffinity { - flags |= serviceFlagSessionAffinity - } - if p.IsRoutable { - flags |= serviceFlagRoutable - } - if p.CheckSourceRange { - flags |= serviceFlagSourceRange - } - if p.L7LoadBalancer { - flags |= serviceFlagL7LoadBalancer - } - if p.SvcExtLocal != p.SvcIntLocal && p.SvcType != SVCTypeClusterIP { - flags |= serviceFlagTwoScopes - } - - return flags -} - -// SVCType returns a service type from the flags -func (s ServiceFlags) SVCType() SVCType { - switch { - case s&serviceFlagExternalIPs != 0: - return SVCTypeExternalIPs - case s&serviceFlagNodePort != 0: - return SVCTypeNodePort - case s&serviceFlagLoadBalancer != 0: - return SVCTypeLoadBalancer - case s&serviceFlagHostPort != 0: - return SVCTypeHostPort - case s&serviceFlagLocalRedirect != 0: - return SVCTypeLocalRedirect - default: - return SVCTypeClusterIP - } -} - -func (s ServiceFlags) IsL7LB() bool { - return s&serviceFlagL7LoadBalancer != 0 -} - -// SVCExtTrafficPolicy returns a service traffic policy from the flags -func (s ServiceFlags) SVCExtTrafficPolicy() SVCTrafficPolicy { - switch { - case s&serviceFlagExtLocalScope != 0: - return SVCTrafficPolicyLocal - default: - return SVCTrafficPolicyCluster - } -} - -// SVCIntTrafficPolicy returns a service traffic policy from the flags -func (s ServiceFlags) SVCIntTrafficPolicy() SVCTrafficPolicy { - switch { - case s&serviceFlagIntLocalScope != 0: - return SVCTrafficPolicyLocal - default: - return SVCTrafficPolicyCluster - } -} - -// SVCNatPolicy returns a service NAT policy from the flags -func (s ServiceFlags) SVCNatPolicy(fe L3n4Addr) SVCNatPolicy { - if s&serviceFlagNat46x64 == 0 { - return SVCNatPolicyNone - } - - if fe.IsIPv6() { - return SVCNatPolicyNat64 - } else { - return SVCNatPolicyNat46 - } -} - -// String returns the string implementation of ServiceFlags. -func (s ServiceFlags) String() string { - var str []string - - str = append(str, string(s.SVCType())) - if s&serviceFlagExtLocalScope != 0 { - str = append(str, string(SVCTrafficPolicyLocal)) - } - if s&serviceFlagIntLocalScope != 0 { - str = append(str, "Internal"+string(SVCTrafficPolicyLocal)) - } - if s&serviceFlagTwoScopes != 0 { - str = append(str, "two-scopes") - } - if s&serviceFlagSessionAffinity != 0 { - str = append(str, "sessionAffinity") - } - if s&serviceFlagRoutable == 0 { - str = append(str, "non-routable") - } - if s&serviceFlagSourceRange != 0 { - str = append(str, "check source-range") - } - if s&serviceFlagNat46x64 != 0 { - str = append(str, "46x64") - } - if s&serviceFlagL7LoadBalancer != 0 { - str = append(str, "l7-load-balancer") - } - if s&serviceFlagLoopback != 0 { - str = append(str, "loopback") - } - - return strings.Join(str, ", ") -} - -// UInt8 returns the UInt16 representation of the ServiceFlags. -func (s ServiceFlags) UInt16() uint16 { - return uint16(s) -} - -const ( - NONE = L4Type("NONE") - // TCP type. - TCP = L4Type("TCP") - // UDP type. - UDP = L4Type("UDP") - // SCTP type. - SCTP = L4Type("SCTP") -) - -const ( - // ScopeExternal is the lookup scope for services from outside the node. - ScopeExternal uint8 = iota - // ScopeInternal is the lookup scope for services from inside the node. - ScopeInternal -) - -// BackendState tracks backend's ability to load-balance service traffic. -// -// Valid transition states for a backend - -// BackendStateActive -> BackendStateTerminating, BackendStateQuarantined, BackendStateMaintenance -// BackendStateTerminating -> No valid state transition -// BackendStateQuarantined -> BackendStateActive, BackendStateTerminating -// BackendStateMaintenance -> BackendStateActive -// -// Sources setting the states - -// BackendStateActive - Kubernetes events, service API -// BackendStateTerminating - Kubernetes events -// BackendStateQuarantined - service API -// BackendStateMaintenance - service API -const ( - // BackendStateActive refers to the backend state when it's available for - // load-balancing traffic. It's the default state for a backend. - // Backends in this state can be health-checked. - BackendStateActive BackendState = iota - // BackendStateTerminating refers to the terminating backend state so that - // it can be gracefully removed. - // Backends in this state won't be health-checked. - BackendStateTerminating - // BackendStateQuarantined refers to the backend state when it's unreachable, - // and will not be selected for load-balancing traffic. - // Backends in this state can be health-checked. - BackendStateQuarantined - // BackendStateMaintenance refers to the backend state where the backend - // is put under maintenance, and will neither be selected for load-balancing - // traffic nor be health-checked. - BackendStateMaintenance - // BackendStateInvalid is an invalid state, and is used to report error conditions. - // Keep this as the last entry. - BackendStateInvalid -) - -// BackendStateFlags is the datapath representation of the backend flags that -// are used in (lb{4,6}_backend.flags) to store backend state. -type BackendStateFlags = uint8 - -const ( - BackendStateActiveFlag = iota - BackendStateTerminatingFlag - BackendStateQuarantinedFlag - BackendStateMaintenanceFlag -) - -func NewBackendFlags(state BackendState) BackendStateFlags { - var flags BackendStateFlags - - switch state { - case BackendStateActive: - flags = BackendStateActiveFlag - case BackendStateTerminating: - flags = BackendStateTerminatingFlag - case BackendStateQuarantined: - flags = BackendStateQuarantinedFlag - case BackendStateMaintenance: - flags = BackendStateMaintenanceFlag - } - - return flags -} - -func GetBackendStateFromFlags(flags uint8) BackendState { - switch flags { - case BackendStateTerminatingFlag: - return BackendStateTerminating - case BackendStateQuarantinedFlag: - return BackendStateQuarantined - case BackendStateMaintenanceFlag: - return BackendStateMaintenance - default: - return BackendStateActive - } -} - -// DefaultBackendWeight is used when backend weight is not set in ServiceSpec -const DefaultBackendWeight = 100 - -var ( - // AllProtocols is the list of all supported L4 protocols - AllProtocols = []L4Type{TCP, UDP, SCTP} -) - -// L4Type name. -type L4Type = string - -// FEPortName is the name of the frontend's port. -type FEPortName string - -// ServiceID is the service's ID. -type ServiceID uint16 - -// ServiceName represents the fully-qualified reference to the service by name, -// including both the namespace and name of the service (and optionally the cluster). -type ServiceName struct { - Namespace string - Name string - Cluster string -} - -func (n ServiceName) String() string { - if n.Cluster != "" { - return n.Cluster + "/" + n.Namespace + "/" + n.Name - } - - return n.Namespace + "/" + n.Name -} - -// BackendID is the backend's ID. -type BackendID uint32 - -// ID is the ID of L3n4Addr endpoint (either service or backend). -type ID uint32 - -// BackendState is the state of a backend for load-balancing service traffic. -type BackendState uint8 - -// Preferred indicates if this backend is preferred to be load balanced. -type Preferred bool - -// Backend represents load balancer backend. -type Backend struct { - // FEPortName is the frontend port name. This is used to filter backends sending to EDS. - FEPortName string - // ID of the backend - ID BackendID - // Weight of backend - Weight uint16 - // Node hosting this backend. This is used to determine backends local to - // a node. - NodeName string - L3n4Addr - // State of the backend for load-balancing service traffic - State BackendState - // Preferred indicates if the healthy backend is preferred - Preferred Preferred -} - -func (b *Backend) String() string { - return b.L3n4Addr.String() -} - -// SVC is a structure for storing service details. -type SVC struct { - Frontend L3n4AddrID // SVC frontend addr and an allocated ID - Backends []*Backend // List of service backends - Type SVCType // Service type - ExtTrafficPolicy SVCTrafficPolicy // Service external traffic policy - IntTrafficPolicy SVCTrafficPolicy // Service internal traffic policy - NatPolicy SVCNatPolicy // Service NAT 46/64 policy - SessionAffinity bool - SessionAffinityTimeoutSec uint32 - HealthCheckNodePort uint16 // Service health check node port - Name ServiceName // Fully qualified service name - LoadBalancerSourceRanges []*cidr.CIDR - L7LBProxyPort uint16 // Non-zero for L7 LB services - L7LBFrontendPorts []string // Non-zero for L7 LB frontend service ports - LoopbackHostport bool -} - -func (s *SVC) GetModel() *models.Service { - var natPolicy string - type backendPlacement struct { - pos int - id BackendID - } - - if s == nil { - return nil - } - - id := int64(s.Frontend.ID) - if s.NatPolicy != SVCNatPolicyNone { - natPolicy = string(s.NatPolicy) - } - spec := &models.ServiceSpec{ - ID: id, - FrontendAddress: s.Frontend.GetModel(), - BackendAddresses: make([]*models.BackendAddress, len(s.Backends)), - Flags: &models.ServiceSpecFlags{ - Type: string(s.Type), - TrafficPolicy: string(s.ExtTrafficPolicy), - ExtTrafficPolicy: string(s.ExtTrafficPolicy), - IntTrafficPolicy: string(s.IntTrafficPolicy), - NatPolicy: natPolicy, - HealthCheckNodePort: s.HealthCheckNodePort, - - Name: s.Name.Name, - Namespace: s.Name.Namespace, - }, - } - - if s.Name.Cluster != option.Config.ClusterName { - spec.Flags.Cluster = s.Name.Cluster - } - - placements := make([]backendPlacement, len(s.Backends)) - for i, be := range s.Backends { - placements[i] = backendPlacement{pos: i, id: be.ID} - } - sort.Slice(placements, - func(i, j int) bool { return placements[i].id < placements[j].id }) - for i, placement := range placements { - spec.BackendAddresses[i] = s.Backends[placement.pos].GetBackendModel() - } - - return &models.Service{ - Spec: spec, - Status: &models.ServiceStatus{ - Realized: spec, - }, - } -} - -func IsValidStateTransition(old, new BackendState) bool { - if old == new { - return true - } - if new == BackendStateInvalid { - return false - } - - switch old { - case BackendStateActive: - case BackendStateTerminating: - return false - case BackendStateQuarantined: - if new == BackendStateMaintenance { - return false - } - case BackendStateMaintenance: - if new != BackendStateActive { - return false - } - default: - return false - } - return true -} - -func GetBackendState(state string) (BackendState, error) { - switch strings.ToLower(state) { - case models.BackendAddressStateActive, "": - return BackendStateActive, nil - case models.BackendAddressStateTerminating: - return BackendStateTerminating, nil - case models.BackendAddressStateQuarantined: - return BackendStateQuarantined, nil - case models.BackendAddressStateMaintenance: - return BackendStateMaintenance, nil - default: - return BackendStateInvalid, fmt.Errorf("invalid backend state %s", state) - } -} - -func (state BackendState) String() (string, error) { - switch state { - case BackendStateActive: - return models.BackendAddressStateActive, nil - case BackendStateTerminating: - return models.BackendAddressStateTerminating, nil - case BackendStateQuarantined: - return models.BackendAddressStateQuarantined, nil - case BackendStateMaintenance: - return models.BackendAddressStateMaintenance, nil - default: - return "", fmt.Errorf("invalid backend state %d", state) - } -} - -func IsValidBackendState(state string) bool { - _, err := GetBackendState(state) - - return err == nil -} - -func NewL4Type(name string) (L4Type, error) { - switch strings.ToLower(name) { - case "tcp": - return TCP, nil - case "udp": - return UDP, nil - case "sctp": - return SCTP, nil - default: - return "", fmt.Errorf("unknown L4 protocol") - } -} - -// L4Addr is an abstraction for the backend port with a L4Type, usually tcp or udp, and -// the Port number. -// -// +deepequal-gen=true -// +deepequal-gen:private-method=true -type L4Addr struct { - Protocol L4Type - Port uint16 -} - -// DeepEqual returns true if both the receiver and 'o' are deeply equal. -func (l *L4Addr) DeepEqual(o *L4Addr) bool { - if l == nil { - return o == nil - } - return l.deepEqual(o) -} - -// NewL4Addr creates a new L4Addr. -func NewL4Addr(protocol L4Type, number uint16) *L4Addr { - return &L4Addr{Protocol: protocol, Port: number} -} - -// L3n4Addr is used to store, as an unique L3+L4 address in the KVStore. It also -// includes the lookup scope for frontend addresses which is used in service -// handling for externalTrafficPolicy=Local and internalTrafficPolicy=Local, -// that is, Scope{External,Internal}. -// -// +deepequal-gen=true -// +deepequal-gen:private-method=true -type L3n4Addr struct { - AddrCluster cmtypes.AddrCluster - L4Addr - Scope uint8 -} - -// DeepEqual returns true if both the receiver and 'o' are deeply equal. -func (l *L3n4Addr) DeepEqual(o *L3n4Addr) bool { - if l == nil { - return o == nil - } - return l.AddrCluster.Equal(o.AddrCluster) && l.deepEqual(o) -} - -// NewL3n4Addr creates a new L3n4Addr. -func NewL3n4Addr(protocol L4Type, addrCluster cmtypes.AddrCluster, portNumber uint16, scope uint8) *L3n4Addr { - lbport := NewL4Addr(protocol, portNumber) - - addr := L3n4Addr{AddrCluster: addrCluster, L4Addr: *lbport, Scope: scope} - - return &addr -} - -func NewL3n4AddrFromModel(base *models.FrontendAddress) (*L3n4Addr, error) { - var scope uint8 - - if base == nil { - return nil, nil - } - - if base.IP == "" { - return nil, fmt.Errorf("missing IP address") - } - - proto := NONE - if base.Protocol != "" { - p, err := NewL4Type(base.Protocol) - if err != nil { - return nil, err - } - proto = p - } - - l4addr := NewL4Addr(proto, base.Port) - addrCluster, err := cmtypes.ParseAddrCluster(base.IP) - if err != nil { - return nil, err - } - - if base.Scope == models.FrontendAddressScopeExternal { - scope = ScopeExternal - } else if base.Scope == models.FrontendAddressScopeInternal { - scope = ScopeInternal - } else { - return nil, fmt.Errorf("invalid scope \"%s\"", base.Scope) - } - - return &L3n4Addr{AddrCluster: addrCluster, L4Addr: *l4addr, Scope: scope}, nil -} - -// NewBackend creates the Backend struct instance from given params. -// The default state for the returned Backend is BackendStateActive. -func NewBackend(id BackendID, protocol L4Type, addrCluster cmtypes.AddrCluster, portNumber uint16) *Backend { - lbport := NewL4Addr(protocol, portNumber) - b := Backend{ - ID: id, - L3n4Addr: L3n4Addr{AddrCluster: addrCluster, L4Addr: *lbport}, - State: BackendStateActive, - Preferred: Preferred(false), - Weight: DefaultBackendWeight, - } - - return &b -} - -// NewBackendWithState creates the Backend struct instance from given params. -func NewBackendWithState(id BackendID, protocol L4Type, addrCluster cmtypes.AddrCluster, portNumber uint16, - state BackendState) *Backend { - lbport := NewL4Addr(protocol, portNumber) - b := Backend{ - ID: id, - L3n4Addr: L3n4Addr{AddrCluster: addrCluster, L4Addr: *lbport}, - State: state, - Weight: DefaultBackendWeight, - } - - return &b -} - -func NewBackendFromBackendModel(base *models.BackendAddress) (*Backend, error) { - if base.IP == nil { - return nil, fmt.Errorf("missing IP address") - } - - // FIXME: Should this be NONE ? - l4addr := NewL4Addr(NONE, base.Port) - addrCluster, err := cmtypes.ParseAddrCluster(*base.IP) - if err != nil { - return nil, err - } - state, err := GetBackendState(base.State) - if err != nil { - return nil, fmt.Errorf("invalid backend state [%s]", base.State) - } - - b := &Backend{ - NodeName: base.NodeName, - L3n4Addr: L3n4Addr{AddrCluster: addrCluster, L4Addr: *l4addr}, - State: state, - Preferred: Preferred(base.Preferred), - } - - if base.Weight != nil { - b.Weight = *base.Weight - } - - if b.Weight == 0 { - b.State = BackendStateMaintenance - } - - return b, nil -} - -func NewL3n4AddrFromBackendModel(base *models.BackendAddress) (*L3n4Addr, error) { - if base.IP == nil { - return nil, fmt.Errorf("missing IP address") - } - - // FIXME: Should this be NONE ? - l4addr := NewL4Addr(NONE, base.Port) - addrCluster, err := cmtypes.ParseAddrCluster(*base.IP) - if err != nil { - return nil, err - } - return &L3n4Addr{AddrCluster: addrCluster, L4Addr: *l4addr}, nil -} - -func (a *L3n4Addr) GetModel() *models.FrontendAddress { - if a == nil { - return nil - } - - scope := models.FrontendAddressScopeExternal - if a.Scope == ScopeInternal { - scope = models.FrontendAddressScopeInternal - } - return &models.FrontendAddress{ - IP: a.AddrCluster.String(), - Port: a.Port, - Scope: scope, - } -} - -func (b *Backend) GetBackendModel() *models.BackendAddress { - if b == nil { - return nil - } - - addrClusterStr := b.AddrCluster.String() - stateStr, _ := b.State.String() - return &models.BackendAddress{ - IP: &addrClusterStr, - Port: b.Port, - NodeName: b.NodeName, - State: stateStr, - Preferred: bool(b.Preferred), - Weight: &b.Weight, - } -} - -// String returns the L3n4Addr in the "IPv4:Port[/Scope]" format for IPv4 and -// "[IPv6]:Port[/Scope]" format for IPv6. -func (a *L3n4Addr) String() string { - var scope string - if a.Scope == ScopeInternal { - scope = "/i" - } - if a.IsIPv6() { - return "[" + a.AddrCluster.String() + "]:" + strconv.FormatUint(uint64(a.Port), 10) + scope - } - return a.AddrCluster.String() + ":" + strconv.FormatUint(uint64(a.Port), 10) + scope -} - -// StringWithProtocol returns the L3n4Addr in the "IPv4:Port/Protocol[/Scope]" -// format for IPv4 and "[IPv6]:Port/Protocol[/Scope]" format for IPv6. -func (a *L3n4Addr) StringWithProtocol() string { - var scope string - if a.Scope == ScopeInternal { - scope = "/i" - } - if a.IsIPv6() { - return "[" + a.AddrCluster.String() + "]:" + strconv.FormatUint(uint64(a.Port), 10) + "/" + a.Protocol + scope - } - return a.AddrCluster.String() + ":" + strconv.FormatUint(uint64(a.Port), 10) + "/" + a.Protocol + scope -} - -// StringID returns the L3n4Addr as string to be used for unique identification -func (a *L3n4Addr) StringID() string { - // This does not include the protocol right now as the datapath does - // not include the protocol in the lookup of the service IP. - return a.String() -} - -// Hash calculates a unique string of the L3n4Addr e.g for use as a key in maps. -// Note: the resulting string is meant to be used as a key for maps and is not -// readable by a human eye when printed out. -func (a L3n4Addr) Hash() string { - const lenProto = 0 // proto is omitted for now - const lenScope = 1 // scope is uint8 which is an alias for byte - const lenPort = 2 // port is uint16 which is 2 bytes - - b := make([]byte, cmtypes.AddrClusterLen+lenProto+lenScope+lenPort) - ac20 := a.AddrCluster.As20() - copy(b, ac20[:]) - // FIXME: add Protocol once we care about protocols - // scope is a uint8 which is an alias for byte so a cast is safe - b[net.IPv6len+lenProto] = byte(a.Scope) - // port is a uint16, so 2 bytes - b[net.IPv6len+lenProto+lenScope] = byte(a.Port >> 8) - b[net.IPv6len+lenProto+lenScope+1] = byte(a.Port & 0xff) - return string(b) -} - -// IsIPv6 returns true if the IP address in the given L3n4Addr is IPv6 or not. -func (a *L3n4Addr) IsIPv6() bool { - return a.AddrCluster.Is6() -} - -// L3n4AddrID is used to store, as an unique L3+L4 plus the assigned ID, in the -// KVStore. -// -// +deepequal-gen=true -// +deepequal-gen:private-method=true -type L3n4AddrID struct { - L3n4Addr - ID ID -} - -// DeepEqual returns true if both the receiver and 'o' are deeply equal. -func (l *L3n4AddrID) DeepEqual(o *L3n4AddrID) bool { - if l == nil { - return o == nil - } - return l.deepEqual(o) -} - -// NewL3n4AddrID creates a new L3n4AddrID. -func NewL3n4AddrID(protocol L4Type, addrCluster cmtypes.AddrCluster, portNumber uint16, scope uint8, id ID) *L3n4AddrID { - l3n4Addr := NewL3n4Addr(protocol, addrCluster, portNumber, scope) - return &L3n4AddrID{L3n4Addr: *l3n4Addr, ID: id} -} - -// IsIPv6 returns true if the IP address in L3n4Addr's L3n4AddrID is IPv6 or not. -func (l *L3n4AddrID) IsIPv6() bool { - return l.L3n4Addr.IsIPv6() -} diff --git a/vendor/github.com/cilium/cilium/pkg/loadbalancer/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/loadbalancer/zz_generated.deepcopy.go deleted file mode 100644 index 45d5cd88ce8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/loadbalancer/zz_generated.deepcopy.go +++ /dev/null @@ -1,157 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package loadbalancer - -import ( - cidr "github.com/cilium/cilium/pkg/cidr" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Backend) DeepCopyInto(out *Backend) { - *out = *in - in.L3n4Addr.DeepCopyInto(&out.L3n4Addr) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backend. -func (in *Backend) DeepCopy() *Backend { - if in == nil { - return nil - } - out := new(Backend) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *L3n4Addr) DeepCopyInto(out *L3n4Addr) { - *out = *in - in.AddrCluster.DeepCopyInto(&out.AddrCluster) - out.L4Addr = in.L4Addr - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L3n4Addr. -func (in *L3n4Addr) DeepCopy() *L3n4Addr { - if in == nil { - return nil - } - out := new(L3n4Addr) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *L3n4AddrID) DeepCopyInto(out *L3n4AddrID) { - *out = *in - in.L3n4Addr.DeepCopyInto(&out.L3n4Addr) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L3n4AddrID. -func (in *L3n4AddrID) DeepCopy() *L3n4AddrID { - if in == nil { - return nil - } - out := new(L3n4AddrID) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *L4Addr) DeepCopyInto(out *L4Addr) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L4Addr. -func (in *L4Addr) DeepCopy() *L4Addr { - if in == nil { - return nil - } - out := new(L4Addr) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SVC) DeepCopyInto(out *SVC) { - *out = *in - in.Frontend.DeepCopyInto(&out.Frontend) - if in.Backends != nil { - in, out := &in.Backends, &out.Backends - *out = make([]*Backend, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(Backend) - (*in).DeepCopyInto(*out) - } - } - } - out.Name = in.Name - if in.LoadBalancerSourceRanges != nil { - in, out := &in.LoadBalancerSourceRanges, &out.LoadBalancerSourceRanges - *out = make([]*cidr.CIDR, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = (*in).DeepCopy() - } - } - } - if in.L7LBFrontendPorts != nil { - in, out := &in.L7LBFrontendPorts, &out.L7LBFrontendPorts - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SVC. -func (in *SVC) DeepCopy() *SVC { - if in == nil { - return nil - } - out := new(SVC) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceName) DeepCopyInto(out *ServiceName) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceName. -func (in *ServiceName) DeepCopy() *ServiceName { - if in == nil { - return nil - } - out := new(ServiceName) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SvcFlagParam) DeepCopyInto(out *SvcFlagParam) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SvcFlagParam. -func (in *SvcFlagParam) DeepCopy() *SvcFlagParam { - if in == nil { - return nil - } - out := new(SvcFlagParam) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/cilium/cilium/pkg/loadbalancer/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/loadbalancer/zz_generated.deepequal.go deleted file mode 100644 index 7290c0d255a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/loadbalancer/zz_generated.deepequal.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package loadbalancer - -// deepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *L3n4Addr) deepEqual(other *L3n4Addr) bool { - if other == nil { - return false - } - - if !in.AddrCluster.DeepEqual(&other.AddrCluster) { - return false - } - - if in.L4Addr != other.L4Addr { - return false - } - - if in.Scope != other.Scope { - return false - } - - return true -} - -// deepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *L3n4AddrID) deepEqual(other *L3n4AddrID) bool { - if other == nil { - return false - } - - if !in.L3n4Addr.DeepEqual(&other.L3n4Addr) { - return false - } - - if in.ID != other.ID { - return false - } - - return true -} - -// deepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *L4Addr) deepEqual(other *L4Addr) bool { - if other == nil { - return false - } - - if in.Protocol != other.Protocol { - return false - } - if in.Port != other.Port { - return false - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/logging/logfields/logfields.go b/vendor/github.com/cilium/cilium/pkg/logging/logfields/logfields.go index 1416ba904ee..96882fd8892 100644 --- a/vendor/github.com/cilium/cilium/pkg/logging/logfields/logfields.go +++ b/vendor/github.com/cilium/cilium/pkg/logging/logfields/logfields.go @@ -32,6 +32,9 @@ const ( // EndpointState is the current endpoint state EndpointState = "endpointState" + // Error is the Go error + Error = "error" + // EventUUID is an event unique identifier EventUUID = "eventID" @@ -53,6 +56,9 @@ const ( // Labels are any label, they may not be relevant to the security identity. Labels = "labels" + // Label is a singular label, where relevant + Label = "label" + // SourceFilter is the label or node information source SourceFilter = "sourceFilter" @@ -75,10 +81,25 @@ const ( // OldIdentity is a previously used security identity OldIdentity = "oldIdentity" + // PolicyKey is a policy map key + PolicyKey = "policyKey" + + // PolicyEntry is a policy map value + PolicyEntry = "policyEntry" + // PolicyRevision is the revision of the policy in the repository or of // the object in question PolicyRevision = "policyRevision" + // PolicyKeysAdded is a set of added policy map keys + PolicyKeysAdded = "policyKeysAdded" + + // PolicyKeysDeleted is a set of deleted policy map keys + PolicyKeysDeleted = "policyKeysDeleted" + + // PolicyEntriesOld is a set of old policy map keys and values + PolicyEntriesOld = "policyEntriesOld" + // DatapathPolicyRevision is the policy revision currently running in // the datapath DatapathPolicyRevision = "datapathPolicyRevision" @@ -238,6 +259,12 @@ const ( // VethPair is a tuple of Veth that are paired VethPair = "vethPair" + // Netkit is a netkit object or ID + Netkit = "netkit" + + // NetkitPair is a tuple of Netkit that are paired + NetkitPair = "netkitPair" + // NetNSName is a name of a network namespace NetNSName = "netNSName" @@ -317,6 +344,9 @@ const ( // BackendSlot is the backend slot number in a service BPF map BackendSlot = "backendSlot" + // ProxyName is the name of a proxy (e.g., "Envoy") + ProxyName = "proxyName" + // L7LBProxyPort is the port number of the Envoy listener a L7 LB service redirects traffic to for load balancing. L7LBProxyPort = "l7LBProxyPort" @@ -356,6 +386,9 @@ const ( // Listener is the name of an Envoy Listener defined in CEC or CCEC Listener = "listener" + // ListenerPriority is the priority of an Envoy Listener defined in CEC or CCEC + ListenerPriority = "listenerPriority" + // BPFMapKey is a key from a BPF map BPFMapKey = "bpfMapKey" @@ -740,6 +773,26 @@ const ( // State is the state of an individual component (apiserver, kvstore etc) State = "state" + // EtcdQPSLimit is the QPS limit for an etcd client. + EtcdQPSLimit = "etcdQPSLimit" + + // LeaseID identifies a KVStore lease + LeaseID = "leaseID" + + // EventType identifies the type of KVStore events + EventType = "eventType" + + // Entries specifies the number of KVStore entries + Entries = "entries" + // Action is the summarized action from a reconciliation. + Action = "action" + // EtcdClusterID is the ID of the etcd cluster EtcdClusterID = "etcdClusterID" + + // NetnsCookie is the Linux kernel netns cookie. + NetnsCookie = "netnsCookie" + + // Target identifies a target value + Target = "target" ) diff --git a/vendor/github.com/cilium/cilium/pkg/logging/logging.go b/vendor/github.com/cilium/cilium/pkg/logging/logging.go index 91dca60bcf0..4c03f85a7be 100644 --- a/vendor/github.com/cilium/cilium/pkg/logging/logging.go +++ b/vendor/github.com/cilium/cilium/pkg/logging/logging.go @@ -166,6 +166,11 @@ func SetupLogging(loggers []string, logOpts LogOptions, tag string, debug bool) // background goroutines that are not cleaned up. initializeKLog() + if debug { + logOpts[LevelOpt] = "debug" + } + initializeSlog(logOpts, len(loggers) == 0) + // Updating the default log format SetLogFormat(logOpts.GetLogFormat()) diff --git a/vendor/github.com/cilium/cilium/pkg/logging/slog.go b/vendor/github.com/cilium/cilium/pkg/logging/slog.go new file mode 100644 index 00000000000..ec95a7e6b61 --- /dev/null +++ b/vendor/github.com/cilium/cilium/pkg/logging/slog.go @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Cilium + +package logging + +import ( + "context" + "log/slog" + "os" + "strings" + "time" + + "github.com/sirupsen/logrus" +) + +// SlogNopHandler discards all logs. +var SlogNopHandler slog.Handler = nopHandler{} + +type nopHandler struct{} + +func (nopHandler) Enabled(context.Context, slog.Level) bool { return false } +func (nopHandler) Handle(context.Context, slog.Record) error { return nil } +func (n nopHandler) WithAttrs([]slog.Attr) slog.Handler { return n } +func (n nopHandler) WithGroup(string) slog.Handler { return n } + +var slogHandlerOpts = &slog.HandlerOptions{ + AddSource: false, + Level: slog.LevelInfo, + ReplaceAttr: replaceLevelAndDropTime, +} + +// Default slog logger. Will be overwritten once initializeSlog is called. +var DefaultSlogLogger *slog.Logger = slog.New(slog.NewTextHandler( + os.Stderr, + slogHandlerOpts, +)) + +func slogLevel(l logrus.Level) slog.Level { + switch l { + case logrus.DebugLevel, logrus.TraceLevel: + return slog.LevelDebug + case logrus.InfoLevel: + return slog.LevelInfo + case logrus.WarnLevel: + return slog.LevelWarn + case logrus.ErrorLevel, logrus.PanicLevel, logrus.FatalLevel: + return slog.LevelError + default: + return slog.LevelInfo + } +} + +// Approximates the logrus output via slog for job groups during the transition +// phase. +func initializeSlog(logOpts LogOptions, useStdout bool) { + opts := *slogHandlerOpts + opts.Level = slogLevel(logOpts.GetLogLevel()) + + logFormat := logOpts.GetLogFormat() + switch logFormat { + case LogFormatJSON, LogFormatText: + opts.ReplaceAttr = replaceLevelAndDropTime + case LogFormatJSONTimestamp, LogFormatTextTimestamp: + opts.ReplaceAttr = replaceLevel + } + + writer := os.Stderr + if useStdout { + writer = os.Stdout + } + + switch logFormat { + case LogFormatJSON, LogFormatJSONTimestamp: + DefaultSlogLogger = slog.New(slog.NewJSONHandler( + writer, + &opts, + )) + case LogFormatText, LogFormatTextTimestamp: + DefaultSlogLogger = slog.New(slog.NewTextHandler( + writer, + &opts, + )) + } +} + +func replaceLevel(groups []string, a slog.Attr) slog.Attr { + switch a.Key { + case slog.TimeKey: + // Adjust to timestamp format that logrus uses; except that we can't + // force slog to quote the value like logrus does... + return slog.String(slog.TimeKey, a.Value.Time().Format(time.RFC3339)) + case slog.LevelKey: + // Lower-case the log level + return slog.Attr{ + Key: a.Key, + Value: slog.StringValue(strings.ToLower(a.Value.String())), + } + } + return a +} + +func replaceLevelAndDropTime(groups []string, a slog.Attr) slog.Attr { + switch a.Key { + case slog.TimeKey: + // Drop timestamps + return slog.Attr{} + case slog.LevelKey: + // Lower-case the log level + return slog.Attr{ + Key: a.Key, + Value: slog.StringValue(strings.ToLower(a.Value.String())), + } + } + return a +} diff --git a/vendor/github.com/cilium/cilium/pkg/mac/mac_linux.go b/vendor/github.com/cilium/cilium/pkg/mac/mac_linux.go index 772bf01d8cb..9e9dd69ea7c 100644 --- a/vendor/github.com/cilium/cilium/pkg/mac/mac_linux.go +++ b/vendor/github.com/cilium/cilium/pkg/mac/mac_linux.go @@ -3,7 +3,12 @@ package mac -import "github.com/vishvananda/netlink" +import ( + "errors" + "net" + + "github.com/vishvananda/netlink" +) // HasMacAddr returns true if the given network interface has L2 addr. func HasMacAddr(iface string) bool { @@ -18,3 +23,19 @@ func HasMacAddr(iface string) bool { func LinkHasMacAddr(link netlink.Link) bool { return len(link.Attrs().HardwareAddr) != 0 } + +// ReplaceMacAddressWithLinkName replaces the MAC address of the given link +func ReplaceMacAddressWithLinkName(ifName, macAddress string) error { + l, err := netlink.LinkByName(ifName) + if err != nil { + if errors.As(err, &netlink.LinkNotFoundError{}) { + return nil + } + return err + } + hw, err := net.ParseMAC(macAddress) + if err != nil { + return err + } + return netlink.LinkSetHardwareAddr(l, hw) +} diff --git a/vendor/github.com/cilium/cilium/pkg/mac/mac_unspecified.go b/vendor/github.com/cilium/cilium/pkg/mac/mac_unspecified.go index e59e51bf8a9..cff4c267e61 100644 --- a/vendor/github.com/cilium/cilium/pkg/mac/mac_unspecified.go +++ b/vendor/github.com/cilium/cilium/pkg/mac/mac_unspecified.go @@ -5,8 +5,14 @@ package mac +import "fmt" + // HasMacAddr returns true if the given network interface has L2 addr. // This is not supported for non-linux environment func HasMacAddr(iface string) bool { return false } + +func ReplaceMacAddressWithLinkName(ifName, macAddress string) error { + return fmt.Errorf("not implemented") +} diff --git a/vendor/github.com/cilium/cilium/pkg/maps/bwmap/bwmap.go b/vendor/github.com/cilium/cilium/pkg/maps/bwmap/bwmap.go deleted file mode 100644 index c6442861756..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/maps/bwmap/bwmap.go +++ /dev/null @@ -1,83 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package bwmap - -import ( - "fmt" - "sync" - - "github.com/cilium/cilium/pkg/bpf" - "github.com/cilium/cilium/pkg/ebpf" - "github.com/cilium/cilium/pkg/maps/lxcmap" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/time" -) - -const ( - MapName = "cilium_throttle" - // Flow aggregate is per Pod, so same size as Endpoint map. - MapSize = lxcmap.MaxEntries - - // DefaultDropHorizon represents maximum allowed departure - // time delta in future. Given applications can set SO_TXTIME - // from user space this is a limit to prevent buggy applications - // to fill the FQ qdisc. - DefaultDropHorizon = 2 * time.Second -) - -type EdtId struct { - Id uint64 `align:"id"` -} - -func (k *EdtId) String() string { return fmt.Sprintf("%d", int(k.Id)) } -func (k *EdtId) New() bpf.MapKey { return &EdtId{} } - -type EdtInfo struct { - Bps uint64 `align:"bps"` - TimeLast uint64 `align:"t_last"` - TimeHorizonDrop uint64 `align:"t_horizon_drop"` - Pad [4]uint64 `align:"pad"` -} - -func (v *EdtInfo) String() string { return fmt.Sprintf("%d", int(v.Bps)) } -func (v *EdtInfo) New() bpf.MapValue { return &EdtInfo{} } - -var ( - throttleMap *bpf.Map - throttleMapInit = &sync.Once{} -) - -func ThrottleMap() *bpf.Map { - throttleMapInit.Do(func() { - throttleMap = bpf.NewMap( - MapName, - ebpf.Hash, - &EdtId{}, - &EdtInfo{}, - MapSize, - bpf.BPF_F_NO_PREALLOC, - ).WithCache().WithPressureMetric(). - WithEvents(option.Config.GetEventBufferConfig(MapName)) - }) - - return throttleMap -} - -func Update(Id uint16, Bps uint64) error { - return ThrottleMap().Update( - &EdtId{Id: uint64(Id)}, - &EdtInfo{Bps: Bps, TimeHorizonDrop: uint64(DefaultDropHorizon)}) -} - -func Delete(Id uint16) error { - return ThrottleMap().Delete( - &EdtId{Id: uint64(Id)}) -} - -func SilentDelete(Id uint16) error { - _, err := ThrottleMap().SilentDelete( - &EdtId{Id: uint64(Id)}) - - return err -} diff --git a/vendor/github.com/cilium/cilium/pkg/maps/bwmap/doc.go b/vendor/github.com/cilium/cilium/pkg/maps/bwmap/doc.go deleted file mode 100644 index b15be313f0c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/maps/bwmap/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package bwmap represents the BPF map used to enforce Pod bandwidth -// limitations via EDT (Earliest Departure Time) + BPF. -// +groupName=maps -package bwmap diff --git a/vendor/github.com/cilium/cilium/pkg/maps/callsmap/callsmap.go b/vendor/github.com/cilium/cilium/pkg/maps/callsmap/callsmap.go deleted file mode 100644 index cf94c2b5ea0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/maps/callsmap/callsmap.go +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package callsmap - -const ( - // MapName is the prefix of the BPF map. - MapName = "cilium_calls_" - // CustomCallsMapName is the name prefix for the per-endpoint prog - // array maps used for loading user-defined eBPF programs. - CustomCallsMapName = MapName + "custom_" -) - -var ( - // HostMapName and NetdevMapName are name prefixes for the host - // datapath BPF maps. They must be different but have the same length. - HostMapName = MapName + "hostns_" - NetdevMapName = MapName + "netdev_" -) diff --git a/vendor/github.com/cilium/cilium/pkg/maps/callsmap/doc.go b/vendor/github.com/cilium/cilium/pkg/maps/callsmap/doc.go deleted file mode 100644 index 2f3927745e7..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/maps/callsmap/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package callsmap represents the internal calls map for endpoint and host -// datapaths. It is primarily managed from the datapath; Cilium side contains a -// few constants used for loading only. -// +groupName=maps -package callsmap diff --git a/vendor/github.com/cilium/cilium/pkg/maps/lxcmap/doc.go b/vendor/github.com/cilium/cilium/pkg/maps/lxcmap/doc.go deleted file mode 100644 index 01af96c4adb..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/maps/lxcmap/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package lxcmap represents the endpoints BPF map in the BPF programs. It is -// implemented as a hash table containing an entry for all local endpoints. -// The hashtable can be accessed through the key EndpointKey and points which -// points to the value EndpointInfo. -// +groupName=maps -package lxcmap diff --git a/vendor/github.com/cilium/cilium/pkg/maps/lxcmap/lxcmap.go b/vendor/github.com/cilium/cilium/pkg/maps/lxcmap/lxcmap.go deleted file mode 100644 index 51261df078a..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/maps/lxcmap/lxcmap.go +++ /dev/null @@ -1,239 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package lxcmap - -import ( - "fmt" - "net" - "net/netip" - "sync" - - "github.com/cilium/ebpf" - - "github.com/cilium/cilium/pkg/bpf" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/mac" - "github.com/cilium/cilium/pkg/option" -) - -const ( - MapName = "cilium_lxc" - - // MaxEntries represents the maximum number of endpoints in the map - MaxEntries = 65535 - - // PortMapMax represents the maximum number of Ports Mapping per container. - PortMapMax = 16 -) - -var ( - // LXCMap represents the BPF map for endpoints - lxcMap *bpf.Map - lxcMapOnce sync.Once -) - -func LXCMap() *bpf.Map { - lxcMapOnce.Do(func() { - lxcMap = bpf.NewMap(MapName, - ebpf.Hash, - &EndpointKey{}, - &EndpointInfo{}, - MaxEntries, - 0, - ).WithCache().WithPressureMetric(). - WithEvents(option.Config.GetEventBufferConfig(MapName)) - }) - return lxcMap -} - -const ( - // EndpointFlagHost indicates that this endpoint represents the host - EndpointFlagHost = 1 -) - -// EndpointFrontend is the interface to implement for an object to synchronize -// with the endpoint BPF map. -type EndpointFrontend interface { - LXCMac() mac.MAC - GetNodeMAC() mac.MAC - GetIfIndex() int - GetID() uint64 - IPv4Address() netip.Addr - IPv6Address() netip.Addr - GetIdentity() identity.NumericIdentity -} - -// GetBPFKeys returns all keys which should represent this endpoint in the BPF -// endpoints map -func GetBPFKeys(e EndpointFrontend) []*EndpointKey { - keys := []*EndpointKey{} - if e.IPv6Address().IsValid() { - keys = append(keys, NewEndpointKey(e.IPv6Address().AsSlice())) - } - - if e.IPv4Address().IsValid() { - keys = append(keys, NewEndpointKey(e.IPv4Address().AsSlice())) - } - - return keys -} - -// GetBPFValue returns the value which should represent this endpoint in the -// BPF endpoints map -// Must only be called if init() succeeded. -func GetBPFValue(e EndpointFrontend) (*EndpointInfo, error) { - mac, err := e.LXCMac().Uint64() - if err != nil { - return nil, fmt.Errorf("invalid LXC MAC: %w", err) - } - - nodeMAC, err := e.GetNodeMAC().Uint64() - if err != nil { - return nil, fmt.Errorf("invalid node MAC: %w", err) - } - - info := &EndpointInfo{ - IfIndex: uint32(e.GetIfIndex()), - // Store security identity in network byte order so it can be - // written into the packet without an additional byte order - // conversion. - LxcID: uint16(e.GetID()), - MAC: mac, - NodeMAC: nodeMAC, - SecID: e.GetIdentity().Uint32(), - } - - return info, nil - -} - -type pad3uint32 [3]uint32 - -// EndpointInfo represents the value of the endpoints BPF map. -// -// Must be in sync with struct endpoint_info in -type EndpointInfo struct { - IfIndex uint32 `align:"ifindex"` - Unused uint16 `align:"unused"` - LxcID uint16 `align:"lxc_id"` - Flags uint32 `align:"flags"` - // go alignment - _ uint32 - MAC mac.Uint64MAC `align:"mac"` - NodeMAC mac.Uint64MAC `align:"node_mac"` - SecID uint32 `align:"sec_id"` - Pad pad3uint32 `align:"pad"` -} - -type EndpointKey struct { - bpf.EndpointKey -} - -// NewEndpointKey returns an EndpointKey based on the provided IP address. The -// address family is automatically detected -func NewEndpointKey(ip net.IP) *EndpointKey { - return &EndpointKey{ - EndpointKey: bpf.NewEndpointKey(ip, 0), - } -} - -func (k *EndpointKey) New() bpf.MapKey { return &EndpointKey{} } - -// IsHost returns true if the EndpointInfo represents a host IP -func (v *EndpointInfo) IsHost() bool { - return v.Flags&EndpointFlagHost != 0 -} - -// String returns the human readable representation of an EndpointInfo -func (v *EndpointInfo) String() string { - if v.Flags&EndpointFlagHost != 0 { - return "(localhost)" - } - - return fmt.Sprintf("id=%-5d sec_id=%-5d flags=0x%04X ifindex=%-3d mac=%s nodemac=%s", - v.LxcID, - v.SecID, - v.Flags, - v.IfIndex, - v.MAC, - v.NodeMAC, - ) -} - -func (v *EndpointInfo) New() bpf.MapValue { return &EndpointInfo{} } - -// WriteEndpoint updates the BPF map with the endpoint information and links -// the endpoint information to all keys provided. -func WriteEndpoint(f EndpointFrontend) error { - info, err := GetBPFValue(f) - if err != nil { - return err - } - - // FIXME: Revert on failure - for _, v := range GetBPFKeys(f) { - if err := LXCMap().Update(v, info); err != nil { - return err - } - } - - return nil -} - -// AddHostEntry adds a special endpoint which represents the local host -func AddHostEntry(ip net.IP) error { - key := NewEndpointKey(ip) - ep := &EndpointInfo{Flags: EndpointFlagHost} - return LXCMap().Update(key, ep) -} - -// SyncHostEntry checks if a host entry exists in the lxcmap and adds one if needed. -// Returns boolean indicating if a new entry was added and an error. -func SyncHostEntry(ip net.IP) (bool, error) { - key := NewEndpointKey(ip) - value, err := LXCMap().Lookup(key) - if err != nil || value.(*EndpointInfo).Flags&EndpointFlagHost == 0 { - err = AddHostEntry(ip) - if err == nil { - return true, nil - } - } - return false, err -} - -// DeleteEntry deletes a single map entry -func DeleteEntry(ip net.IP) error { - return LXCMap().Delete(NewEndpointKey(ip)) -} - -// DeleteElement deletes the endpoint using all keys which represent the -// endpoint. It returns the number of errors encountered during deletion. -func DeleteElement(f EndpointFrontend) []error { - var errors []error - for _, k := range GetBPFKeys(f) { - if err := LXCMap().Delete(k); err != nil { - errors = append(errors, fmt.Errorf("Unable to delete key %v from %s: %w", k, bpf.MapPath(MapName), err)) - } - } - - return errors -} - -// DumpToMap dumps the contents of the lxcmap into a map and returns it -func DumpToMap() (map[string]EndpointInfo, error) { - m := map[string]EndpointInfo{} - callback := func(key bpf.MapKey, value bpf.MapValue) { - if info, ok := value.(*EndpointInfo); ok { - if endpointKey, ok := key.(*EndpointKey); ok { - m[endpointKey.ToIP().String()] = *info - } - } - } - - if err := LXCMap().DumpWithCallback(callback); err != nil { - return nil, fmt.Errorf("unable to read BPF endpoint list: %w", err) - } - - return m, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/bpf.go b/vendor/github.com/cilium/cilium/pkg/metrics/bpf.go deleted file mode 100644 index c13ca2587df..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/bpf.go +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -import ( - "context" - "encoding/json" - "fmt" - "os/exec" - - "github.com/prometheus/client_golang/prometheus" - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/time" -) - -type bpfCollector struct { - bpfMapsMemory *prometheus.Desc - bpfProgMemory *prometheus.Desc -} - -func newbpfCollector() *bpfCollector { - return &bpfCollector{ - bpfMapsMemory: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, "", "bpf_maps_virtual_memory_max_bytes"), - "BPF maps kernel max memory usage size in bytes.", - nil, nil, - ), - bpfProgMemory: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, "", "bpf_progs_virtual_memory_max_bytes"), - "BPF programs kernel max memory usage size in bytes.", - nil, nil, - ), - } -} - -func (s *bpfCollector) Describe(ch chan<- *prometheus.Desc) { - ch <- s.bpfMapsMemory - ch <- s.bpfProgMemory -} - -type memoryEntry struct { - BytesMemlock uint64 `json:"bytes_memlock"` -} - -func getMemoryUsage(typ string) (uint64, error) { - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) - defer cancel() - cmd := exec.CommandContext(ctx, "bpftool", "-j", typ, "show") - out, err := cmd.Output() - if err != nil { - return 0, fmt.Errorf("unable to get bpftool output: %w", err) - } - - var memoryEntries []memoryEntry - err = json.Unmarshal(out, &memoryEntries) - if err != nil { - return 0, fmt.Errorf("unable to unmarshal bpftool output: %w", err) - } - var totalMem uint64 - for _, entry := range memoryEntries { - totalMem += entry.BytesMemlock - } - return totalMem, nil -} - -func (s *bpfCollector) Collect(ch chan<- prometheus.Metric) { - mapMem, err := getMemoryUsage("map") - if err != nil { - logrus.WithError(err).Error("Error while getting BPF maps memory usage") - } else { - ch <- prometheus.MustNewConstMetric( - s.bpfMapsMemory, - prometheus.GaugeValue, - float64(mapMem), - ) - } - - progMem, err := getMemoryUsage("prog") - if err != nil { - logrus.WithError(err).Error("Error while getting BPF progs memory usage") - } else { - ch <- prometheus.MustNewConstMetric( - s.bpfProgMemory, - prometheus.GaugeValue, - float64(progMem), - ) - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/cell.go b/vendor/github.com/cilium/cilium/pkg/metrics/cell.go deleted file mode 100644 index 15d35c8dc62..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/cell.go +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -import "github.com/cilium/cilium/pkg/hive/cell" - -var Cell = cell.Module("metrics", "Metrics", - // Provide registry to hive, but also invoke if case no cells decide to use as dependency - cell.Provide(NewRegistry), - cell.Metric(NewLegacyMetrics), - cell.Config(defaultRegistryConfig), - cell.Invoke(func(_ *Registry) { - // This is a hack to ensure that errors/warnings collected in the pre hive initialization - // phase are emitted as metrics. - FlushLoggingMetrics() - }), -) diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/interfaces.go b/vendor/github.com/cilium/cilium/pkg/metrics/interfaces.go deleted file mode 100644 index 016f2bc58df..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/interfaces.go +++ /dev/null @@ -1,199 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -import ( - "github.com/cilium/cilium/api/v1/client/daemon" - "github.com/cilium/cilium/api/v1/health/client/connectivity" - metricpkg "github.com/cilium/cilium/pkg/metrics/metric" - - "github.com/prometheus/client_golang/prometheus" - dto "github.com/prometheus/client_model/go" -) - -type daemonHealthGetter interface { - GetHealthz(params *daemon.GetHealthzParams, opts ...daemon.ClientOption) (*daemon.GetHealthzOK, error) -} - -type connectivityStatusGetter interface { - GetStatus(params *connectivity.GetStatusParams, opts ...connectivity.ClientOption) (*connectivity.GetStatusOK, error) -} - -var ( - NoOpMetric prometheus.Metric = &mockMetric{} - NoOpCollector prometheus.Collector = &collector{} - - NoOpCounter metricpkg.Counter = &counter{NoOpMetric, NoOpCollector} - NoOpCounterVec metricpkg.Vec[metricpkg.Counter] = &counterVec{NoOpCollector} - NoOpObserver metricpkg.Observer = &observer{} - NoOpHistogram metricpkg.Histogram = &histogram{NoOpCollector} - NoOpObserverVec metricpkg.Vec[metricpkg.Observer] = &observerVec{NoOpCollector} - NoOpGauge metricpkg.Gauge = &gauge{NoOpMetric, NoOpCollector} - NoOpGaugeVec metricpkg.Vec[metricpkg.Gauge] = &gaugeVec{NoOpCollector} - NoOpGaugeDeletableVec metricpkg.DeletableVec[metricpkg.Gauge] = &gaugeDeletableVec{gaugeVec{NoOpCollector}} -) - -// Metric - -type mockMetric struct{} - -// *WARNING*: Desc returns nil so do not register this metric into prometheus -// default register. -func (m *mockMetric) Desc() *prometheus.Desc { return nil } -func (m *mockMetric) Write(*dto.Metric) error { return nil } - -// Collector - -type collector struct{} - -func (c *collector) Describe(chan<- *prometheus.Desc) {} -func (c *collector) Collect(chan<- prometheus.Metric) {} - -// Counter - -type counter struct { - prometheus.Metric - prometheus.Collector -} - -func (cv *counter) Add(float64) {} -func (cv *counter) Get() float64 { return 0 } -func (cv *counter) Inc() {} -func (cv *counter) IsEnabled() bool { return false } -func (cv *counter) SetEnabled(bool) {} -func (cv *counter) Opts() metricpkg.Opts { return metricpkg.Opts{} } - -// CounterVec - -type counterVec struct{ prometheus.Collector } - -func (cv *counterVec) With(prometheus.Labels) metricpkg.Counter { return NoOpGauge } -func (cv *counterVec) WithLabelValues(...string) metricpkg.Counter { return NoOpGauge } - -func (cv *counterVec) CurryWith(prometheus.Labels) (metricpkg.Vec[metricpkg.Counter], error) { - return NoOpCounterVec, nil -} -func (cv *counterVec) MustCurryWith(prometheus.Labels) metricpkg.Vec[metricpkg.Counter] { - return NoOpCounterVec -} -func (cv *counterVec) GetMetricWith(prometheus.Labels) (metricpkg.Counter, error) { - return NoOpCounter, nil -} -func (cv *counterVec) GetMetricWithLabelValues(...string) (metricpkg.Counter, error) { - return NoOpCounter, nil -} -func (cv *counterVec) IsEnabled() bool { return false } -func (cv *counterVec) SetEnabled(bool) {} -func (cv *counterVec) Opts() metricpkg.Opts { return metricpkg.Opts{} } - -// Observer - -type observer struct{} - -func (o *observer) Observe(float64) {} -func (o *observer) IsEnabled() bool { return false } -func (o *observer) SetEnabled(bool) {} -func (o *observer) Opts() metricpkg.Opts { return metricpkg.Opts{} } - -// Histogram - -type histogram struct { - prometheus.Collector -} - -func (h *histogram) Observe(float64) {} - -func (h *histogram) Desc() *prometheus.Desc { return nil } -func (h *histogram) Write(*dto.Metric) error { return nil } -func (h *histogram) IsEnabled() bool { return false } -func (h *histogram) SetEnabled(bool) {} -func (h *histogram) Opts() metricpkg.Opts { return metricpkg.Opts{} } - -// ObserverVec - -type observerVec struct { - prometheus.Collector -} - -func (ov *observerVec) GetMetricWith(prometheus.Labels) (metricpkg.Observer, error) { - return NoOpObserver, nil -} -func (ov *observerVec) GetMetricWithLabelValues(lvs ...string) (metricpkg.Observer, error) { - return NoOpObserver, nil -} - -func (ov *observerVec) With(prometheus.Labels) metricpkg.Observer { return NoOpObserver } -func (ov *observerVec) WithLabelValues(...string) metricpkg.Observer { return NoOpObserver } - -func (ov *observerVec) CurryWith(prometheus.Labels) (metricpkg.Vec[metricpkg.Observer], error) { - return NoOpObserverVec, nil -} -func (ov *observerVec) MustCurryWith(prometheus.Labels) metricpkg.Vec[metricpkg.Observer] { - return NoOpObserverVec -} - -func (ov *observerVec) IsEnabled() bool { return false } -func (ov *observerVec) SetEnabled(bool) {} -func (ov *observerVec) Opts() metricpkg.Opts { return metricpkg.Opts{} } - -// Gauge - -type gauge struct { - prometheus.Metric - prometheus.Collector -} - -func (g *gauge) Set(float64) {} -func (g *gauge) Get() float64 { return 0 } -func (g *gauge) Inc() {} -func (g *gauge) Dec() {} -func (g *gauge) Add(float64) {} -func (g *gauge) Sub(float64) {} -func (g *gauge) SetToCurrentTime() {} -func (g *gauge) IsEnabled() bool { return false } -func (g *gauge) SetEnabled(bool) {} -func (g *gauge) Opts() metricpkg.Opts { return metricpkg.Opts{} } - -// GaugeVec - -type gaugeDeletableVec struct { - gaugeVec -} - -func (*gaugeDeletableVec) Delete(ll prometheus.Labels) bool { - return false -} - -func (*gaugeDeletableVec) DeleteLabelValues(lvs ...string) bool { - return false -} - -func (*gaugeDeletableVec) DeletePartialMatch(labels prometheus.Labels) int { - return 0 -} - -func (*gaugeDeletableVec) Reset() {} - -type gaugeVec struct { - prometheus.Collector -} - -func (gv *gaugeVec) With(prometheus.Labels) metricpkg.Gauge { return NoOpGauge } -func (gv *gaugeVec) WithLabelValues(...string) metricpkg.Gauge { return NoOpGauge } - -func (gv *gaugeVec) CurryWith(prometheus.Labels) (metricpkg.Vec[metricpkg.Gauge], error) { - return NoOpGaugeVec, nil -} -func (gv *gaugeVec) MustCurryWith(prometheus.Labels) metricpkg.Vec[metricpkg.Gauge] { - return NoOpGaugeVec -} -func (gv *gaugeVec) GetMetricWith(prometheus.Labels) (metricpkg.Gauge, error) { - return NoOpGauge, nil -} -func (gv *gaugeVec) GetMetricWithLabelValues(...string) (metricpkg.Gauge, error) { - return NoOpGauge, nil -} -func (gv *gaugeVec) IsEnabled() bool { return false } -func (gv *gaugeVec) SetEnabled(bool) {} -func (gv *gaugeVec) Opts() metricpkg.Opts { return metricpkg.Opts{} } diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/logging_hook.go b/vendor/github.com/cilium/cilium/pkg/metrics/logging_hook.go deleted file mode 100644 index fe876017a25..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/logging_hook.go +++ /dev/null @@ -1,96 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -import ( - "fmt" - "reflect" - "sync" - "sync/atomic" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var ( - metricsInitialized chan struct{} = make(chan struct{}) - flushMetrics = sync.Once{} -) - -// FlushLoggingMetrics will cause all logging hook metrics accumulated prior -// to the errors_warnings metrics being registered with the Prometheus collector -// to be incremented to their respective errors_warnings metrics tuple. -func FlushLoggingMetrics() { - flushMetrics.Do(func() { - if metricsInitialized != nil { - close(metricsInitialized) - metricsInitialized = nil - } - }) -} - -// LoggingHook is a hook for logrus which counts error and warning messages as a -// Prometheus metric. -type LoggingHook struct { - errs, warn atomic.Uint64 -} - -// NewLoggingHook returns a new instance of LoggingHook for the given Cilium -// component. -func NewLoggingHook() *LoggingHook { - lh := &LoggingHook{} - go func() { - // This channel is closed after registry is created. At this point if the errs/warnings metric - // is enabled we flush counts of errors/warnings we collected before the registry was created. - // This is a hack to ensure that errors/warnings collected in the pre hive initialization - // phase are emitted as metrics. - // Because the ErrorsWarnings metric is a counter, this means that the rate of these errors won't be - // accurate, however init errors can only happen during initialization so it probably doesn't make - // a big difference in practice. - <-metricsInitialized - ErrorsWarnings.WithLabelValues(logrus.ErrorLevel.String(), "init").Add(float64(lh.errs.Load())) - ErrorsWarnings.WithLabelValues(logrus.WarnLevel.String(), "init").Add(float64(lh.warn.Load())) - }() - return lh -} - -// Levels returns the list of logging levels on which the hook is triggered. -func (h *LoggingHook) Levels() []logrus.Level { - return []logrus.Level{ - logrus.ErrorLevel, - logrus.WarnLevel, - } -} - -// Fire is the main method which is called every time when logger has an error -// or warning message. -func (h *LoggingHook) Fire(entry *logrus.Entry) error { - // Get information about subsystem from logging entry field. - iSubsystem, ok := entry.Data[logfields.LogSubsys] - if !ok { - serializedEntry, err := entry.String() - if err != nil { - return fmt.Errorf("log entry cannot be serialized and doesn't contain 'subsys' field") - } - return fmt.Errorf("log entry doesn't contain 'subsys' field: %s", serializedEntry) - } - subsystem, ok := iSubsystem.(string) - if !ok { - return fmt.Errorf("type of the 'subsystem' log entry field is not string but %s", reflect.TypeOf(iSubsystem)) - } - - // We count errors/warnings outside of the prometheus metric. - switch entry.Level { - case logrus.ErrorLevel: - h.errs.Add(1) - case logrus.WarnLevel: - h.warn.Add(1) - } - - // Increment the metric. - ErrorsWarnings.WithLabelValues(entry.Level.String(), subsystem).Inc() - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/metric/collections/product.go b/vendor/github.com/cilium/cilium/pkg/metrics/metric/collections/product.go deleted file mode 100644 index 28c24f7f241..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/metric/collections/product.go +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package collections - -// CartesianProduct returns the cartesian product of the input vectors as -// a vector of vectors, each with length the same as the number of input vectors. -func CartesianProduct[T any](vs ...[]T) [][]T { - if len(vs) == 0 { - return [][]T{} - } - - dimension := len(vs) // Each output will be a vector of this length. - // Iterate to find out the number of output vectors. - size := len(vs[0]) - for i := 1; i < len(vs); i++ { - size *= len(vs[i]) - } - - // Allocate the output vectors. - dst := make([][]T, size) - for i := range dst { - dst[i] = make([]T, dimension) - } - - lastm := 1 - for i := 0; i < dimension; i++ { - permuteColumn[T](dst, i, lastm, vs[i]) - lastm = lastm * len(vs[i]) - } - return dst -} - -// permuteColumn fills in the nth column of the output vectors of the cartesian -// product of the input vectors. -// -// leftPermSize is the number of vectors as a result of permuting 0,..,col-1 columns. -// That is, this is the block size upon which we will repeat the values of v0 such that -// every previous permutation is again permuted with each value of v0. -// -// For ex. -// CartesianProduct[string]({"a", "b"}, {"x", "y", "z"}) -// -// Iteration (i.e. col, leftPermSize=1) 1: -// -// dst = [ -// ["a"], -// ["b"], -// ["a"] -// ["b"] -// ["a"] -// ["b"] -// ] -// -// Iteration (leftPermSize=2): -// -// dst = [ -// ["a", "x"], // <- each elem of vec is repeated leftPermSize times. -// ["b", "x"], -// ["a", "y"] -// ["b", "y"] -// ["a", "z"] -// ["b", "z"] -// ] -func permuteColumn[T any](dst [][]T, col int, leftPermSize int, vec []T) { - // Go down the column with the current lhs. - // You want to skip along, lastm elements at a time. - for i := 0; i < len(dst); i += leftPermSize { // So we're skipping n rows at a time, - vi := (i / leftPermSize) % len(vec) - for off := 0; off < leftPermSize; off++ { // this is a repeat - dst[i+off][col] = vec[vi] - } - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/metric/counter.go b/vendor/github.com/cilium/cilium/pkg/metrics/metric/counter.go deleted file mode 100644 index bcbf938c6e0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/metric/counter.go +++ /dev/null @@ -1,205 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metric - -import ( - "github.com/prometheus/client_golang/prometheus" - dto "github.com/prometheus/client_model/go" -) - -func NewCounter(opts CounterOpts) Counter { - return &counter{ - Counter: prometheus.NewCounter(opts.toPrometheus()), - metric: metric{ - enabled: !opts.Disabled, - opts: Opts(opts), - }, - } -} - -type Counter interface { - prometheus.Counter - WithMetadata - - Get() float64 -} - -type counter struct { - prometheus.Counter - metric -} - -func (c *counter) Collect(metricChan chan<- prometheus.Metric) { - if c.enabled { - c.Counter.Collect(metricChan) - } -} - -func (c *counter) Get() float64 { - var pm dto.Metric - err := c.Counter.Write(&pm) - if err == nil { - return *pm.Counter.Value - } - return 0 -} - -// Inc increments the counter by 1. Use Add to increment it by arbitrary -// non-negative values. -func (c *counter) Inc() { - if c.enabled { - c.Counter.Inc() - } -} - -// Add adds the given value to the counter. It panics if the value is < 0. -func (c *counter) Add(val float64) { - if c.enabled { - c.Counter.Add(val) - } -} - -// NewCounterVec creates a new DeletableVec[Counter] based on the provided CounterOpts and -// partitioned by the given label names. -func NewCounterVec(opts CounterOpts, labelNames []string) *counterVec { - return &counterVec{ - CounterVec: prometheus.NewCounterVec(opts.toPrometheus(), labelNames), - metric: metric{ - enabled: !opts.Disabled, - opts: Opts(opts), - }, - } -} - -// NewCounterVecWithLabels creates a new DeletableVec[Counter] based on the provided CounterOpts and -// partitioned by the given labels. -// This will also initialize the labels with the provided values so that metrics with known label value -// ranges can be pre-initialized to zero upon init. -// -// This should only be used when all label values are known at init, otherwise use of the -// metric vector with uninitialized labels will result in warnings. -// -// Note: Disabled metrics will not have their label values initialized. -// -// For example: -// -// NewCounterVecWithLabels(CounterOpts{ -// Namespace: "cilium", -// Subsystem: "subsystem", -// Name: "cilium_test", -// Disabled: false, -// }, Labels{ -// {Name: "foo", Values: NewValues("0", "1")}, -// {Name: "bar", Values: NewValues("a", "b")}, -// }) -// -// Will initialize the following metrics to: -// -// cilium_subsystem_cilium_test{foo="0", bar="a"} 0 -// cilium_subsystem_cilium_test{foo="0", bar="b"} 0 -// cilium_subsystem_cilium_test{foo="1", bar="a"} 0 -// cilium_subsystem_cilium_test{foo="1", bar="b"} 0 -func NewCounterVecWithLabels(opts CounterOpts, labels Labels) *counterVec { - cv := NewCounterVec(opts, labels.labelNames()) - initLabels[Counter](&cv.metric, labels, cv, opts.Disabled) - return cv -} - -type counterVec struct { - *prometheus.CounterVec - metric -} - -func (cv *counterVec) CurryWith(labels prometheus.Labels) (Vec[Counter], error) { - cv.checkLabels(labels) - vec, err := cv.CounterVec.CurryWith(labels) - if err == nil { - return &counterVec{CounterVec: vec, metric: cv.metric}, nil - } - return nil, err -} - -func (cv *counterVec) GetMetricWith(labels prometheus.Labels) (Counter, error) { - if !cv.enabled { - return &counter{ - metric: metric{enabled: false}, - }, nil - } - - promCounter, err := cv.CounterVec.GetMetricWith(labels) - if err == nil { - return &counter{ - Counter: promCounter, - metric: cv.metric, - }, nil - } - return nil, err -} - -func (cv *counterVec) GetMetricWithLabelValues(lvs ...string) (Counter, error) { - if !cv.enabled { - return &counter{ - metric: metric{enabled: false}, - }, nil - } - - promCounter, err := cv.CounterVec.GetMetricWithLabelValues(lvs...) - if err == nil { - return &counter{ - Counter: promCounter, - metric: cv.metric, - }, nil - } - return nil, err -} - -func (cv *counterVec) With(labels prometheus.Labels) Counter { - cv.checkLabels(labels) - if !cv.enabled { - return &counter{ - metric: metric{enabled: false}, - } - } - - promCounter := cv.CounterVec.With(labels) - return &counter{ - Counter: promCounter, - metric: cv.metric, - } -} - -func (cv *counterVec) WithLabelValues(lvs ...string) Counter { - cv.checkLabelValues(lvs...) - if !cv.enabled { - return &counter{ - metric: metric{enabled: false}, - } - } - - promCounter := cv.CounterVec.WithLabelValues(lvs...) - return &counter{ - Counter: promCounter, - metric: cv.metric, - } -} - -func (cv *counterVec) SetEnabled(e bool) { - if !e { - cv.Reset() - } - - cv.metric.SetEnabled(e) -} - -type CounterOpts Opts - -func (co CounterOpts) toPrometheus() prometheus.CounterOpts { - return prometheus.CounterOpts{ - Name: co.Name, - Namespace: co.Namespace, - Subsystem: co.Subsystem, - Help: co.Help, - ConstLabels: co.ConstLabels, - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/metric/gauge.go b/vendor/github.com/cilium/cilium/pkg/metrics/metric/gauge.go deleted file mode 100644 index 083caef554b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/metric/gauge.go +++ /dev/null @@ -1,267 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metric - -import ( - "github.com/prometheus/client_golang/prometheus" - dto "github.com/prometheus/client_model/go" -) - -func NewGauge(opts GaugeOpts) Gauge { - return &gauge{ - Gauge: prometheus.NewGauge(opts.toPrometheus()), - metric: metric{ - enabled: !opts.Disabled, - opts: Opts(opts), - }, - } -} - -type Gauge interface { - prometheus.Gauge - WithMetadata - - Get() float64 -} - -type gauge struct { - prometheus.Gauge - metric -} - -func (g *gauge) Collect(metricChan chan<- prometheus.Metric) { - if g.enabled { - g.Gauge.Collect(metricChan) - } -} - -func (g *gauge) Get() float64 { - if !g.enabled { - return 0 - } - - var pm dto.Metric - err := g.Gauge.Write(&pm) - if err == nil { - return *pm.Gauge.Value - } - return 0 -} - -// Set sets the Gauge to an arbitrary value. -func (g *gauge) Set(val float64) { - if g.enabled { - g.Gauge.Set(val) - } -} - -// Inc increments the Gauge by 1. Use Add to increment it by arbitrary -// values. -func (g *gauge) Inc() { - if g.enabled { - g.Gauge.Inc() - } -} - -// Dec decrements the Gauge by 1. Use Sub to decrement it by arbitrary -// values. -func (g *gauge) Dec() { - if g.enabled { - g.Gauge.Dec() - } -} - -// Add adds the given value to the Gauge. (The value can be negative, -// resulting in a decrease of the Gauge.) -func (g *gauge) Add(val float64) { - if g.enabled { - g.Gauge.Add(val) - } -} - -// Sub subtracts the given value from the Gauge. (The value can be -// negative, resulting in an increase of the Gauge.) -func (g *gauge) Sub(i float64) { - if g.enabled { - g.Gauge.Sub(i) - } -} - -// SetToCurrentTime sets the Gauge to the current Unix time in seconds. -func (g *gauge) SetToCurrentTime() { - if g.enabled { - g.Gauge.SetToCurrentTime() - } -} - -// NewGaugeVec creates a new DeletableVec[Gauge] based on the provided GaugeOpts and -// partitioned by the given label names. -func NewGaugeVec(opts GaugeOpts, labelNames []string) *gaugeVec { - gv := &gaugeVec{ - GaugeVec: prometheus.NewGaugeVec(opts.toPrometheus(), labelNames), - metric: metric{ - enabled: !opts.Disabled, - opts: Opts(opts), - }, - } - return gv -} - -// NewGaugeVecWithLabels creates a new DeletableVec[Gauge] based on the provided CounterOpts and -// partitioned by the given labels. -// This will also initialize the labels with the provided values so that metrics with known label value -// ranges can be pre-initialized to zero upon init. -// -// This should only be used when all label values are known at init, otherwise use of the -// metric vector with uninitialized labels will result in warnings. -// -// Note: Disabled metrics will not have their label values initialized. -// -// For example: -// -// NewGaugeVecWithLabels(GaugeOpts{ -// Namespace: "cilium", -// Subsystem: "subsystem", -// Name: "cilium_test", -// Disabled: false, -// }, Labels{ -// {Name: "foo", Values: NewValues("0", "1")}, -// {Name: "bar", Values: NewValues("a", "b")}, -// }) -// -// Will initialize the following metrics to: -// -// cilium_subsystem_cilium_test{foo="0", bar="a"} 0 -// cilium_subsystem_cilium_test{foo="0", bar="b"} 0 -// cilium_subsystem_cilium_test{foo="1", bar="a"} 0 -// cilium_subsystem_cilium_test{foo="1", bar="b"} 0 -func NewGaugeVecWithLabels(opts GaugeOpts, labels Labels) *gaugeVec { - gv := NewGaugeVec(opts, labels.labelNames()) - initLabels[Gauge](&gv.metric, labels, gv, opts.Disabled) - return gv -} - -type gaugeVec struct { - *prometheus.GaugeVec - metric -} - -func (gv *gaugeVec) CurryWith(labels prometheus.Labels) (Vec[Gauge], error) { - gv.checkLabels(labels) - vec, err := gv.GaugeVec.CurryWith(labels) - if err == nil { - return &gaugeVec{GaugeVec: vec, metric: gv.metric}, nil - } - return nil, err -} - -func (gv *gaugeVec) GetMetricWith(labels prometheus.Labels) (Gauge, error) { - if !gv.enabled { - return &gauge{ - metric: metric{enabled: false}, - }, nil - } - - promGauge, err := gv.GaugeVec.GetMetricWith(labels) - if err == nil { - return &gauge{ - Gauge: promGauge, - metric: gv.metric, - }, nil - } - return nil, err -} - -func (gv *gaugeVec) GetMetricWithLabelValues(lvs ...string) (Gauge, error) { - if !gv.enabled { - return &gauge{ - metric: metric{enabled: false}, - }, nil - } - - promGauge, err := gv.GaugeVec.GetMetricWithLabelValues(lvs...) - if err == nil { - return &gauge{ - Gauge: promGauge, - metric: gv.metric, - }, nil - } - return nil, err -} - -func (gv *gaugeVec) With(labels prometheus.Labels) Gauge { - if !gv.enabled { - return &gauge{ - metric: metric{enabled: false}, - } - } - gv.checkLabels(labels) - - promGauge := gv.GaugeVec.With(labels) - return &gauge{ - Gauge: promGauge, - metric: gv.metric, - } -} - -func (gv *gaugeVec) WithLabelValues(lvs ...string) Gauge { - gv.checkLabelValues(lvs...) - if !gv.enabled { - return &gauge{ - metric: metric{enabled: false}, - } - } - - promGauge := gv.GaugeVec.WithLabelValues(lvs...) - return &gauge{ - Gauge: promGauge, - metric: gv.metric, - } -} - -func (gv *gaugeVec) SetEnabled(e bool) { - if !e { - gv.Reset() - } - - gv.metric.SetEnabled(e) -} - -type GaugeFunc interface { - prometheus.GaugeFunc - WithMetadata -} - -func NewGaugeFunc(opts GaugeOpts, function func() float64) GaugeFunc { - return &gaugeFunc{ - GaugeFunc: prometheus.NewGaugeFunc(opts.toPrometheus(), function), - metric: metric{ - enabled: !opts.Disabled, - opts: Opts(opts), - }, - } -} - -type gaugeFunc struct { - prometheus.GaugeFunc - metric -} - -func (gf *gaugeFunc) Collect(metricChan chan<- prometheus.Metric) { - if gf.enabled { - gf.GaugeFunc.Collect(metricChan) - } -} - -type GaugeOpts Opts - -func (o GaugeOpts) toPrometheus() prometheus.GaugeOpts { - return prometheus.GaugeOpts{ - Namespace: o.Namespace, - Subsystem: o.Subsystem, - Name: o.Name, - Help: o.Help, - ConstLabels: o.ConstLabels, - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/metric/histogram.go b/vendor/github.com/cilium/cilium/pkg/metrics/metric/histogram.go deleted file mode 100644 index 6d499707d0c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/metric/histogram.go +++ /dev/null @@ -1,335 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metric - -import ( - "time" - - "github.com/prometheus/client_golang/prometheus" -) - -func NewHistogram(opts HistogramOpts) Histogram { - return &histogram{ - Histogram: prometheus.NewHistogram(opts.toPrometheus()), - metric: metric{ - enabled: !opts.Disabled, - opts: opts.opts(), - }, - } -} - -type Histogram interface { - prometheus.Histogram - WithMetadata -} - -type histogram struct { - prometheus.Histogram - metric -} - -func (h *histogram) Collect(metricChan chan<- prometheus.Metric) { - if h.enabled { - h.Histogram.Collect(metricChan) - } -} - -// Observe adds a single observation to the histogram. Observations are -// usually positive or zero. Negative observations are accepted but -// prevent current versions of Prometheus from properly detecting -// counter resets in the sum of observations. (The experimental Native -// Histograms handle negative observations properly.) See -// https://prometheus.io/docs/practices/histograms/#count-and-sum-of-observations -// for details. -func (h *histogram) Observe(val float64) { - if h.enabled { - h.Histogram.Observe(val) - } -} - -type Observer interface { - prometheus.Observer - WithMetadata -} - -type observer struct { - prometheus.Observer - metric -} - -// Observe adds a single observation to the histogram. Observations are -// usually positive or zero. Negative observations are accepted but -// prevent current versions of Prometheus from properly detecting -// counter resets in the sum of observations. (The experimental Native -// Histograms handle negative observations properly.) See -// https://prometheus.io/docs/practices/histograms/#count-and-sum-of-observations -// for details. -func (o *observer) Observe(val float64) { - if o.enabled { - o.Observer.Observe(val) - } -} - -// NewHistogramVec creates a new Vec[Observer] (i.e. Histogram Vec) based on the provided HistogramOpts and -// partitioned by the given label names. -func NewHistogramVec(opts HistogramOpts, labelNames []string) *histogramVec { - return &histogramVec{ - ObserverVec: prometheus.NewHistogramVec(opts.toPrometheus(), labelNames), - metric: metric{ - enabled: !opts.Disabled, - opts: opts.opts(), - }, - } -} - -// NewHistogramVec creates a new Vec[Observer] based on the provided CounterOpts and -// partitioned by the given labels. -// This will also initialize the labels with the provided values so that metrics with known label value -// ranges can be pre-initialized to zero upon init. -// -// This should only be used when all label values are known at init, otherwise use of the -// metric vector with uninitialized labels will result in warnings. -// -// Note: Disabled metrics will not have their label values initialized. -func NewHistogramVecWithLabels(opts HistogramOpts, labels Labels) *histogramVec { - hv := NewHistogramVec(opts, labels.labelNames()) - initLabels(&hv.metric, labels, hv, opts.Disabled) - return hv -} - -type histogramVec struct { - prometheus.ObserverVec - metric -} - -func (cv *histogramVec) CurryWith(labels prometheus.Labels) (Vec[Observer], error) { - cv.checkLabels(labels) - vec, err := cv.ObserverVec.CurryWith(labels) - if err == nil { - return &histogramVec{ObserverVec: vec, metric: cv.metric}, nil - } - return nil, err -} - -func (cv *histogramVec) GetMetricWith(labels prometheus.Labels) (Observer, error) { - if !cv.enabled { - return &observer{ - metric: metric{enabled: false}, - }, nil - } - - promObserver, err := cv.ObserverVec.GetMetricWith(labels) - if err == nil { - return &observer{ - Observer: promObserver, - metric: cv.metric, - }, nil - } - return nil, err -} - -func (cv *histogramVec) GetMetricWithLabelValues(lvs ...string) (Observer, error) { - if !cv.enabled { - return &observer{ - metric: metric{enabled: false}, - }, nil - } - - promObserver, err := cv.ObserverVec.GetMetricWithLabelValues(lvs...) - if err == nil { - return &observer{ - Observer: promObserver, - metric: cv.metric, - }, nil - } - return nil, err -} - -func (cv *histogramVec) With(labels prometheus.Labels) Observer { - if !cv.enabled { - return &observer{ - metric: metric{enabled: false}, - } - } - cv.checkLabels(labels) - - promObserver := cv.ObserverVec.With(labels) - return &observer{ - Observer: promObserver, - metric: cv.metric, - } -} - -func (cv *histogramVec) WithLabelValues(lvs ...string) Observer { - if !cv.enabled { - return &observer{ - metric: metric{enabled: false}, - } - } - cv.checkLabelValues(lvs...) - - promObserver := cv.ObserverVec.WithLabelValues(lvs...) - return &observer{ - Observer: promObserver, - metric: cv.metric, - } -} - -func (cv *histogramVec) SetEnabled(e bool) { - if !e { - if histVec, ok := cv.ObserverVec.(*prometheus.HistogramVec); ok { - histVec.Reset() - } - } - - cv.metric.SetEnabled(e) -} - -// HistogramOpts are a modified and expanded version of the prometheus.HistogramOpts. -// https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#HistogramOpts -type HistogramOpts struct { - // Namespace, Subsystem, and Name are components of the fully-qualified - // name of the Histogram (created by joining these components with - // "_"). Only Name is mandatory, the others merely help structuring the - // name. Note that the fully-qualified name of the Histogram must be a - // valid Prometheus metric name. - Namespace string - Subsystem string - Name string - - // Help provides information about this Histogram. - // - // Metrics with the same fully-qualified name must have the same Help - // string. - Help string - - // ConstLabels are used to attach fixed labels to this metric. Metrics - // with the same fully-qualified name must have the same label names in - // their ConstLabels. - // - // ConstLabels are only used rarely. In particular, do not use them to - // attach the same labels to all your metrics. Those use cases are - // better covered by target labels set by the scraping Prometheus - // server, or by one specific metric (e.g. a build_info or a - // machine_role metric). See also - // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels - ConstLabels prometheus.Labels - - // Buckets defines the buckets into which observations are counted. Each - // element in the slice is the upper inclusive bound of a bucket. The - // values must be sorted in strictly increasing order. There is no need - // to add a highest bucket with +Inf bound, it will be added - // implicitly. If Buckets is left as nil or set to a slice of length - // zero, it is replaced by default buckets. The default buckets are - // DefBuckets if no buckets for a native histogram (see below) are used, - // otherwise the default is no buckets. (In other words, if you want to - // use both reguler buckets and buckets for a native histogram, you have - // to define the regular buckets here explicitly.) - Buckets []float64 - - // If NativeHistogramBucketFactor is greater than one, so-called sparse - // buckets are used (in addition to the regular buckets, if defined - // above). A Histogram with sparse buckets will be ingested as a Native - // Histogram by a Prometheus server with that feature enabled (requires - // Prometheus v2.40+). Sparse buckets are exponential buckets covering - // the whole float64 range (with the exception of the “zero” bucket, see - // SparseBucketsZeroThreshold below). From any one bucket to the next, - // the width of the bucket grows by a constant - // factor. NativeHistogramBucketFactor provides an upper bound for this - // factor (exception see below). The smaller - // NativeHistogramBucketFactor, the more buckets will be used and thus - // the more costly the histogram will become. A generally good trade-off - // between cost and accuracy is a value of 1.1 (each bucket is at most - // 10% wider than the previous one), which will result in each power of - // two divided into 8 buckets (e.g. there will be 8 buckets between 1 - // and 2, same as between 2 and 4, and 4 and 8, etc.). - // - // Details about the actually used factor: The factor is calculated as - // 2^(2^n), where n is an integer number between (and including) -8 and - // 4. n is chosen so that the resulting factor is the largest that is - // still smaller or equal to NativeHistogramBucketFactor. Note that the - // smallest possible factor is therefore approx. 1.00271 (i.e. 2^(2^-8) - // ). If NativeHistogramBucketFactor is greater than 1 but smaller than - // 2^(2^-8), then the actually used factor is still 2^(2^-8) even though - // it is larger than the provided NativeHistogramBucketFactor. - // - // NOTE: Native Histograms are still an experimental feature. Their - // behavior might still change without a major version - // bump. Subsequently, all NativeHistogram... options here might still - // change their behavior or name (or might completely disappear) without - // a major version bump. - NativeHistogramBucketFactor float64 - // All observations with an absolute value of less or equal - // NativeHistogramZeroThreshold are accumulated into a “zero” - // bucket. For best results, this should be close to a bucket - // boundary. This is usually the case if picking a power of two. If - // NativeHistogramZeroThreshold is left at zero, - // DefSparseBucketsZeroThreshold is used as the threshold. To configure - // a zero bucket with an actual threshold of zero (i.e. only - // observations of precisely zero will go into the zero bucket), set - // NativeHistogramZeroThreshold to the NativeHistogramZeroThresholdZero - // constant (or any negative float value). - NativeHistogramZeroThreshold float64 - - // The remaining fields define a strategy to limit the number of - // populated sparse buckets. If NativeHistogramMaxBucketNumber is left - // at zero, the number of buckets is not limited. (Note that this might - // lead to unbounded memory consumption if the values observed by the - // Histogram are sufficiently wide-spread. In particular, this could be - // used as a DoS attack vector. Where the observed values depend on - // external inputs, it is highly recommended to set a - // NativeHistogramMaxBucketNumber.) Once the set - // NativeHistogramMaxBucketNumber is exceeded, the following strategy is - // enacted: First, if the last reset (or the creation) of the histogram - // is at least NativeHistogramMinResetDuration ago, then the whole - // histogram is reset to its initial state (including regular - // buckets). If less time has passed, or if - // NativeHistogramMinResetDuration is zero, no reset is - // performed. Instead, the zero threshold is increased sufficiently to - // reduce the number of buckets to or below - // NativeHistogramMaxBucketNumber, but not to more than - // NativeHistogramMaxZeroThreshold. Thus, if - // NativeHistogramMaxZeroThreshold is already at or below the current - // zero threshold, nothing happens at this step. After that, if the - // number of buckets still exceeds NativeHistogramMaxBucketNumber, the - // resolution of the histogram is reduced by doubling the width of the - // sparse buckets (up to a growth factor between one bucket to the next - // of 2^(2^4) = 65536, see above). - NativeHistogramMaxBucketNumber uint32 - NativeHistogramMinResetDuration time.Duration - NativeHistogramMaxZeroThreshold float64 - - ConfigName string - - // If true, the metric has to be explicitly enabled via config or flags - Disabled bool -} - -func (ho HistogramOpts) opts() Opts { - return Opts{ - Namespace: ho.Namespace, - Subsystem: ho.Subsystem, - Name: ho.Name, - Help: ho.Help, - ConstLabels: ho.ConstLabels, - ConfigName: ho.ConfigName, - Disabled: ho.Disabled, - } -} - -func (ho HistogramOpts) toPrometheus() prometheus.HistogramOpts { - return prometheus.HistogramOpts{ - Namespace: ho.Namespace, - Subsystem: ho.Subsystem, - Name: ho.Name, - Help: ho.Help, - ConstLabels: ho.ConstLabels, - Buckets: ho.Buckets, - NativeHistogramBucketFactor: ho.NativeHistogramBucketFactor, - NativeHistogramZeroThreshold: ho.NativeHistogramZeroThreshold, - NativeHistogramMaxBucketNumber: ho.NativeHistogramMaxBucketNumber, - NativeHistogramMinResetDuration: ho.NativeHistogramMinResetDuration, - NativeHistogramMaxZeroThreshold: ho.NativeHistogramMaxZeroThreshold, - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/metric/metric.go b/vendor/github.com/cilium/cilium/pkg/metrics/metric/metric.go deleted file mode 100644 index 580e8ff32c9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/metric/metric.go +++ /dev/null @@ -1,343 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metric - -import ( - "fmt" - - "github.com/prometheus/client_golang/prometheus" - "github.com/sirupsen/logrus" - "golang.org/x/exp/maps" - - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/metrics/metric/collections" -) - -var logger = logrus.WithField(logfields.LogSubsys, "metric") - -// WithMetadata is the interface implemented by any metric defined in this package. These typically embed existing -// prometheus metric types and add additional metadata. In addition, these metrics have the concept of being enabled -// or disabled which is used in place of conditional registration so all metric types can always be registered. -type WithMetadata interface { - IsEnabled() bool - SetEnabled(bool) - Opts() Opts -} - -// metric is a "base" structure which can be embedded to provide common functionality. -type metric struct { - enabled bool - opts Opts - labels *labelSet -} - -// forEachLabelVector performs a product of all possible label value combinations -// and calls the provided function for each combination. -func (b *metric) forEachLabelVector(fn func(lvls []string)) { - if b.labels == nil { - return - } - var labelValues [][]string - for _, label := range b.labels.lbls { - labelValues = append(labelValues, maps.Keys(label.Values)) - } - for _, labelVector := range collections.CartesianProduct(labelValues...) { - fn(labelVector) - } -} - -// checkLabelValues checks that the provided label values are within the range -// of provided label values, if labels where defined using the Labels type. -// Violations are logged as errors for detection, but metrics should still -// be collected as is. -func (b *metric) checkLabelValues(lvs ...string) { - if b.labels == nil { - return - } - if err := b.labels.checkLabelValues(lvs); err != nil { - logger.WithError(err). - WithFields(logrus.Fields{ - "metric": b.opts.Name, - }). - Warning("metric label constraints violated, metric will still be collected") - } -} - -func (b *metric) checkLabels(labels prometheus.Labels) { - if b.labels == nil { - return - } - - if err := b.labels.checkLabels(labels); err != nil { - logger.WithError(err). - WithFields(logrus.Fields{ - "metric": b.opts.Name, - }). - Warning("metric label constraints violated, metric will still be collected") - } -} - -func (b *metric) IsEnabled() bool { - return b.enabled -} - -func (b *metric) SetEnabled(e bool) { - b.enabled = e -} - -func (b *metric) Opts() Opts { - return b.opts -} - -// Vec is a generic type to describe the vectorized version of another metric type, for example Vec[Counter] would be -// our version of a prometheus.CounterVec. -type Vec[T any] interface { - prometheus.Collector - WithMetadata - - // CurryWith returns a vector curried with the provided labels, i.e. the - // returned vector has those labels pre-set for all labeled operations performed - // on it. The cardinality of the curried vector is reduced accordingly. The - // order of the remaining labels stays the same (just with the curried labels - // taken out of the sequence – which is relevant for the - // (GetMetric)WithLabelValues methods). It is possible to curry a curried - // vector, but only with labels not yet used for currying before. - // - // The metrics contained in the `Vec[T]` are shared between the curried and - // uncurried vectors. They are just accessed differently. Curried and uncurried - // vectors behave identically in terms of collection. Only one must be - // registered with a given registry (usually the uncurried version). The Reset - // method deletes all metrics, even if called on a curried vector. - CurryWith(labels prometheus.Labels) (Vec[T], error) - - // GetMetricWith returns the `T` for the given Labels map (the label names - // must match those of the variable labels in Desc). If that label map is - // accessed for the first time, a new `T` is created. Implications of - // creating a `T` without using it and keeping the `T` for later use are - // the same as for GetMetricWithLabelValues. - // - // An error is returned if the number and names of the Labels are inconsistent - // with those of the variable labels in Desc (minus any curried labels). - // - // This method is used for the same purpose as - // GetMetricWithLabelValues(...string). See there for pros and cons of the two - // methods. - GetMetricWith(labels prometheus.Labels) (T, error) - - // GetMetricWithLabelValues returns the `T` for the given slice of label - // values (same order as the variable labels in Desc). If that combination of - // label values is accessed for the first time, a new `T` is created. - // - // It is possible to call this method without using the returned `T` to only - // create the new `T` but leave it at its starting value 0. - // - // Keeping the `T` for later use is possible (and should be considered if - // performance is critical), but keep in mind that Reset, DeleteLabelValues and - // Delete can be used to delete the `T` from the `Vec[T]`, assuming it also - // implements `DeletableVec[T]`. In that case, - // the `T` will still exist, but it will not be exported anymore, even if a - // `T` with the same label values is created later. - // - // An error is returned if the number of label values is not the same as the - // number of variable labels in Desc (minus any curried labels). - // - // Note that for more than one label value, this method is prone to mistakes - // caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as - // an alternative to avoid that type of mistake. For higher label numbers, the - // latter has a much more readable (albeit more verbose) syntax, but it comes - // with a performance overhead (for creating and processing the Labels map). - GetMetricWithLabelValues(lvs ...string) (T, error) - - // With works as GetMetricWith, but panics where GetMetricWithLabels would have - // returned an error. Not returning an error allows shortcuts like - // - // myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Add(42) - With(labels prometheus.Labels) T - - // WithLabelValues works as GetMetricWithLabelValues, but panics where - // GetMetricWithLabelValues would have returned an error. Not returning an - // error allows shortcuts like - // - // myVec.WithLabelValues("404", "GET").Add(42) - WithLabelValues(lvs ...string) T -} - -// DeletableVec is a generic type to describe a vectorized version of another metric type, like Vec[T], but with the -// additional ability to remove labels without re-creating the metric. -type DeletableVec[T any] interface { - Vec[T] - - // Delete deletes the metric where the variable labels are the same as those - // passed in as labels. It returns true if a metric was deleted. - // - // It is not an error if the number and names of the Labels are inconsistent - // with those of the VariableLabels in Desc. However, such inconsistent Labels - // can never match an actual metric, so the method will always return false in - // that case. - // - // This method is used for the same purpose as DeleteLabelValues(...string). See - // there for pros and cons of the two methods. - Delete(labels prometheus.Labels) bool - - // DeleteLabelValues removes the metric where the variable labels are the same - // as those passed in as labels (same order as the VariableLabels in Desc). It - // returns true if a metric was deleted. - // - // It is not an error if the number of label values is not the same as the - // number of VariableLabels in Desc. However, such inconsistent label count can - // never match an actual metric, so the method will always return false in that - // case. - // - // Note that for more than one label value, this method is prone to mistakes - // caused by an incorrect order of arguments. Consider Delete(Labels) as an - // alternative to avoid that type of mistake. For higher label numbers, the - // latter has a much more readable (albeit more verbose) syntax, but it comes - // with a performance overhead (for creating and processing the Labels map). - // See also the CounterVec example. - DeleteLabelValues(lvs ...string) bool - - // DeletePartialMatch deletes all metrics where the variable labels contain all of those - // passed in as labels. The order of the labels does not matter. - // It returns the number of metrics deleted. - // - // Note that curried labels will never be matched if deleting from the curried vector. - // To match curried labels with DeletePartialMatch, it must be called on the base vector. - DeletePartialMatch(labels prometheus.Labels) int - - // Reset deletes all metrics in this vector. - Reset() -} - -// Opts are a modified and extended version of the prometheus.Opts -// https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#Opts -type Opts struct { - // Namespace, Subsystem, and Name are components of the fully-qualified - // name of the Metric (created by joining these components with - // "_"). Only Name is mandatory, the others merely help structuring the - // name. Note that the fully-qualified name of the metric must be a - // valid Prometheus metric name. - Namespace string - Subsystem string - Name string - - // Help provides information about this metric. - // - // Metrics with the same fully-qualified name must have the same Help - // string. - Help string - - // ConstLabels are used to attach fixed labels to this metric. Metrics - // with the same fully-qualified name must have the same label names in - // their ConstLabels. - // - // ConstLabels are only used rarely. In particular, do not use them to - // attach the same labels to all your metrics. Those use cases are - // better covered by target labels set by the scraping Prometheus - // server, or by one specific metric (e.g. a build_info or a - // machine_role metric). See also - // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels - ConstLabels prometheus.Labels - - // The name used to enable/disable this metric via the config/flags - ConfigName string - - // If true, the metric has to be explicitly enabled via config or flags - Disabled bool -} - -func (b Opts) GetConfigName() string { - if b.ConfigName == "" { - return prometheus.BuildFQName(b.Namespace, b.Subsystem, b.Name) - } - return b.ConfigName -} - -// Label represents a metric label with a pre-defined range of values. -// This is used with the NewxxxVecWithLabels metrics constructors to initialize -// vector metrics with known label value ranges, avoiding empty metrics. -type Label struct { - Name string - // If defined, only these values are allowed. - Values Values -} - -// Values is a distinct set of possible label values for a particular Label. -type Values map[string]struct{} - -// NewValues constructs a Values type from a set of strings. -func NewValues(vs ...string) Values { - vals := Values{} - for _, v := range vs { - vals[v] = struct{}{} - } - return vals -} - -// Labels is a slice of labels that represents a label set for a vector type -// metric. -type Labels []Label - -func (lbls Labels) labelNames() []string { - lns := make([]string, len(lbls)) - for i, label := range lbls { - lns[i] = label.Name - } - return lns -} - -type labelSet struct { - lbls Labels - m map[string]map[string]struct{} -} - -func (l *labelSet) namesToValues() map[string]map[string]struct{} { - if l.m != nil { - return l.m - } - l.m = make(map[string]map[string]struct{}) - for _, label := range l.lbls { - l.m[label.Name] = label.Values - } - return l.m -} - -func (l *labelSet) checkLabels(labels prometheus.Labels) error { - for name, value := range labels { - if lvs, ok := l.namesToValues()[name]; ok { - if _, ok := lvs[value]; !ok { - return fmt.Errorf("unexpected label vector value for label %q: value %q not defined in label range %v", - name, value, maps.Keys(lvs)) - } - } else { - return fmt.Errorf("invalid label name: %s", name) - } - } - return nil -} - -func (l *labelSet) checkLabelValues(lvs []string) error { - if len(l.lbls) != len(lvs) { - return fmt.Errorf("unexpected label vector length: expected %d, got %d", len(l.lbls), len(lvs)) - } - for i, label := range l.lbls { - if _, ok := label.Values[lvs[i]]; !ok { - return fmt.Errorf("unexpected label vector value for label %q: value %q not defined in label range %v", - label.Name, lvs[i], maps.Keys(label.Values)) - } - } - return nil -} - -// initLabels is a helper function to initialize the labels of a metric. -// It is used by xxxVecWithLabels metrics constructors to initialize the -// labels of the metric and the vector (i.e. registering all possible label value combinations). -func initLabels[T any](m *metric, labels Labels, vec Vec[T], disabled bool) { - if disabled { - return - } - m.labels = &labelSet{lbls: labels} - m.forEachLabelVector(func(vs []string) { - vec.WithLabelValues(vs...) - }) -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/metrics.go b/vendor/github.com/cilium/cilium/pkg/metrics/metrics.go deleted file mode 100644 index 4f4b1b6e0ef..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/metrics.go +++ /dev/null @@ -1,1612 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package metrics holds prometheus metrics objects and related utility functions. It -// does not abstract away the prometheus client but the caller rarely needs to -// refer to prometheus directly. -package metrics - -// Adding a metric -// - Add a metric object of the appropriate type as an exported variable -// - Register the new object in the init function - -import ( - "context" - - "github.com/prometheus/client_golang/prometheus" - dto "github.com/prometheus/client_model/go" - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/metrics/metric" - "github.com/cilium/cilium/pkg/promise" - "github.com/cilium/cilium/pkg/source" - "github.com/cilium/cilium/pkg/time" - "github.com/cilium/cilium/pkg/version" -) - -const ( - // ErrorTimeout is the value used to notify timeout errors. - ErrorTimeout = "timeout" - - // ErrorProxy is the value used to notify errors on Proxy. - ErrorProxy = "proxy" - - // L7DNS is the value used to report DNS label on metrics - L7DNS = "dns" - - // SubsystemBPF is the subsystem to scope metrics related to the bpf syscalls. - SubsystemBPF = "bpf" - - // SubsystemDatapath is the subsystem to scope metrics related to management of - // the datapath. It is prepended to metric names and separated with a '_'. - SubsystemDatapath = "datapath" - - // SubsystemAgent is the subsystem to scope metrics related to the cilium agent itself. - SubsystemAgent = "agent" - - // SubsystemFQDN is the subsystem to scope metrics related to the FQDN proxy. - SubsystemIPCache = "ipcache" - - // SubsystemK8s is the subsystem to scope metrics related to Kubernetes - SubsystemK8s = "k8s" - - // SubsystemK8sClient is the subsystem to scope metrics related to the kubernetes client. - SubsystemK8sClient = "k8s_client" - - // SubsystemWorkQueue is the subsystem to scope metrics related to the workqueue. - SubsystemWorkQueue = "k8s_workqueue" - - // SubsystemKVStore is the subsystem to scope metrics related to the kvstore. - SubsystemKVStore = "kvstore" - - // SubsystemFQDN is the subsystem to scope metrics related to the FQDN proxy. - SubsystemFQDN = "fqdn" - - // SubsystemNodes is the subsystem to scope metrics related to the node manager. - SubsystemNodes = "nodes" - - // SubsystemTriggers is the subsystem to scope metrics related to the trigger package. - SubsystemTriggers = "triggers" - - // SubsystemAPILimiter is the subsystem to scope metrics related to the API limiter package. - SubsystemAPILimiter = "api_limiter" - - // CiliumAgentNamespace is used to scope metrics from the Cilium Agent - CiliumAgentNamespace = "cilium" - - // CiliumClusterMeshAPIServerNamespace is used to scope metrics from the - // Cilium Cluster Mesh API Server - CiliumClusterMeshAPIServerNamespace = "cilium_clustermesh_apiserver" - - // CiliumClusterMeshAPIServerNamespace is used to scope metrics from - // Cilium KVStoreMesh - CiliumKVStoreMeshNamespace = "cilium_kvstoremesh" - - // CiliumOperatorNamespace is used to scope metrics from the Cilium Operator - CiliumOperatorNamespace = "cilium_operator" - - // LabelError indicates the type of error (string) - LabelError = "error" - - // LabelOutcome indicates whether the outcome of the operation was successful or not - LabelOutcome = "outcome" - - // LabelAttempts is the number of attempts it took to complete the operation - LabelAttempts = "attempts" - - // Labels - - // LabelValueFalse is the string value for true metric label values. - LabelValueTrue = "true" - - // LabelValueFalse is the string value for false metric label values. - LabelValueFalse = "false" - - // LabelValueOutcomeSuccess is used as a successful outcome of an operation - LabelValueOutcomeSuccess = "success" - - // LabelValueOutcomeFail is used as an unsuccessful outcome of an operation - LabelValueOutcomeFail = "fail" - - // LabelValueOutcomeFailure is used as an unsuccessful outcome of an operation. - // NOTE: This should only be used for existing metrics, new metrics should use LabelValueOutcomeFail. - LabelValueOutcomeFailure = "failure" - - // LabelDropReason is used to describe reason for dropping a packets/bytes - LabelDropReason = "reason" - - // LabelEventSourceAPI marks event-related metrics that come from the API - LabelEventSourceAPI = "api" - - // LabelEventSourceK8s marks event-related metrics that come from k8s - LabelEventSourceK8s = "k8s" - - // LabelEventSourceFQDN marks event-related metrics that come from pkg/fqdn - LabelEventSourceFQDN = "fqdn" - - // LabelEventSourceContainerd marks event-related metrics that come from docker - LabelEventSourceContainerd = "docker" - - // LabelDatapathArea marks which area the metrics are related to (eg, which BPF map) - LabelDatapathArea = "area" - - // LabelDatapathName marks a unique identifier for this metric. - // The name should be defined once for a given type of error. - LabelDatapathName = "name" - - // LabelDatapathFamily marks which protocol family (IPv4, IPV6) the metric is related to. - LabelDatapathFamily = "family" - - // LabelProtocol marks the L4 protocol (TCP, ANY) for the metric. - LabelProtocol = "protocol" - - // LabelSignalType marks the signal name - LabelSignalType = "signal" - - // LabelSignalData marks the signal data - LabelSignalData = "data" - - // LabelStatus the label from completed task - LabelStatus = "status" - - // LabelPolicyEnforcement is the label used to see the enforcement status - LabelPolicyEnforcement = "enforcement" - - // LabelPolicySource is the label used to see the enforcement status - LabelPolicySource = "source" - - LabelSource = "source" - - // LabelScope is the label used to defined multiples scopes in the same - // metric. For example, one counter may measure a metric over the scope of - // the entire event (scope=global), or just part of an event - // (scope=slow_path) - LabelScope = "scope" - - // LabelProtocolL7 is the label used when working with layer 7 protocols. - LabelProtocolL7 = "protocol_l7" - - // LabelBuildState is the state a build queue entry is in - LabelBuildState = "state" - - // LabelBuildQueueName is the name of the build queue - LabelBuildQueueName = "name" - - // LabelAction is the label used to defined what kind of action was performed in a metric - LabelAction = "action" - - // LabelSubsystem is the label used to refer to any of the child process - // started by cilium (Envoy, monitor, etc..) - LabelSubsystem = "subsystem" - - // LabelKind is the kind of a label - LabelKind = "kind" - - // LabelEventSource is the source of a label for event metrics - // i.e. k8s, containerd, api. - LabelEventSource = "source" - - // LabelPath is the label for the API path - LabelPath = "path" - // LabelMethod is the label for the HTTP method - LabelMethod = "method" - - // LabelAPIReturnCode is the HTTP code returned for that API path - LabelAPIReturnCode = "return_code" - - // LabelOperation is the label for BPF maps operations - LabelOperation = "operation" - - // LabelMapName is the label for the BPF map name - LabelMapName = "map_name" - - LabelMapGroup = "map_group" - - // LabelVersion is the label for the version number - LabelVersion = "version" - - // LabelVersionRevision is the label for the version revision - LabelVersionRevision = "revision" - - // LabelArch is the label for the platform architecture (e.g. linux/amd64) - LabelArch = "arch" - - // LabelDirection is the label for traffic direction - LabelDirection = "direction" - - // LabelSourceCluster is the label for source cluster name - LabelSourceCluster = "source_cluster" - - // LabelSourceNodeName is the label for source node name - LabelSourceNodeName = "source_node_name" - - // LabelTargetCluster is the label for target cluster name - LabelTargetCluster = "target_cluster" - - // LabelTargetNodeIP is the label for target node IP - LabelTargetNodeIP = "target_node_ip" - - // LabelTargetNodeName is the label for target node name - LabelTargetNodeName = "target_node_name" - - // LabelTargetNodeType is the label for target node type (local_node, remote_intra_cluster, vs remote_inter_cluster) - LabelTargetNodeType = "target_node_type" - - LabelLocationLocalNode = "local_node" - LabelLocationRemoteIntraCluster = "remote_intra_cluster" - LabelLocationRemoteInterCluster = "remote_inter_cluster" - - // Rule label is a label for a L7 rule name. - LabelL7Rule = "rule" - - // LabelL7ProxyType is the label for denoting a L7 proxy type. - LabelL7ProxyType = "proxy_type" - - // LabelType is the label for type in general (e.g. endpoint, node) - LabelType = "type" - LabelPeerEndpoint = "endpoint" - LabelPeerNode = "node" - - LabelTrafficHTTP = "http" - LabelTrafficICMP = "icmp" - - LabelAddressType = "address_type" - LabelAddressTypePrimary = "primary" - LabelAddressTypeSecondary = "secondary" -) - -var ( - // LabelValuesBool is metric label value set for boolean type. - LabelValuesBool = metric.NewValues(LabelValueTrue, LabelValueFalse) - - // Namespace is used to scope metrics from cilium. It is prepended to metric - // names and separated with a '_' - Namespace = CiliumAgentNamespace - - registryResolver, registry = promise.New[*Registry]() - - BPFMapPressure = true - - // BootstrapTimes is the durations of cilium-agent bootstrap sequence. - BootstrapTimes = NoOpObserverVec - - // APIInteractions is the total time taken to process an API call made - // to the cilium-agent - APIInteractions = NoOpObserverVec - - // Status - - // NodeConnectivityStatus is the connectivity status between local node to - // other node intra or inter cluster. - NodeConnectivityStatus = NoOpGaugeDeletableVec - - // NodeConnectivityLatency is the connectivity latency between local node to - // other node intra or inter cluster. - NodeConnectivityLatency = NoOpGaugeDeletableVec - - // Endpoint - - // Endpoint is a function used to collect this metric. - // It must be thread-safe. - Endpoint metric.GaugeFunc - - // EndpointMaxIfindex is the maximum observed interface index for existing endpoints - EndpointMaxIfindex = NoOpGauge - - // EndpointRegenerationTotal is a count of the number of times any endpoint - // has been regenerated and success/fail outcome - EndpointRegenerationTotal = NoOpCounterVec - - // EndpointStateCount is the total count of the endpoints in various states. - EndpointStateCount = NoOpGaugeVec - - // EndpointRegenerationTimeStats is the total time taken to regenerate - // endpoints, labeled by span name and status ("success" or "failure") - EndpointRegenerationTimeStats = NoOpObserverVec - - // EndpointPropagationDelay is the delay between creation of local CiliumEndpoint - // and update for that CiliumEndpoint received through CiliumEndpointSlice. - // Measure of local CEP roundtrip time with CiliumEndpointSlice feature enabled. - EndpointPropagationDelay = NoOpObserverVec - - // Policy - // Policy is the number of policies loaded into the agent - Policy = NoOpGauge - - // PolicyRegenerationCount is the total number of successful policy - // regenerations. - PolicyRegenerationCount = NoOpCounter - - // PolicyRegenerationTimeStats is the total time taken to generate policies - PolicyRegenerationTimeStats = NoOpObserverVec - - // PolicyRevision is the current policy revision number for this agent - PolicyRevision = NoOpGauge - - // PolicyChangeTotal is a count of policy changes by outcome ("success" or - // "failure") - PolicyChangeTotal = NoOpCounterVec - - // PolicyEndpointStatus is the number of endpoints with policy labeled by enforcement type - PolicyEndpointStatus = NoOpGaugeVec - - // PolicyImplementationDelay is a distribution of times taken from adding a - // policy (and incrementing the policy revision) to seeing it in the datapath - // per Endpoint. This reflects the actual delay perceived by traffic flowing - // through the datapath. The longest times will roughly correlate with the - // time taken to fully deploy an endpoint. - PolicyImplementationDelay = NoOpObserverVec - - // CIDRGroup - - // CIDRGroupsReferenced is the number of CNPs and CCNPs referencing at least one CiliumCIDRGroup. - // CNPs with empty or non-existing CIDRGroupRefs are not considered. - CIDRGroupsReferenced = NoOpGauge - - // CIDRGroupTranslationTimeStats is the time taken to translate the policy field `FromCIDRGroupRef` - // after the referenced CIDRGroups have been updated or deleted. - CIDRGroupTranslationTimeStats = NoOpHistogram - - // Identity - - // Identity is the number of identities currently in use on the node by type - Identity = NoOpGaugeVec - - // Events - - // EventTS is the time in seconds since epoch that we last received an - // event that was handled by Cilium. This metric tracks the source of the - // event which can be one of K8s or Cilium's API. - EventTS = NoOpGaugeVec - - // EventLagK8s is the lag calculation for k8s Pod events. - EventLagK8s = NoOpGauge - - // L7 statistics - - // ProxyRedirects is the number of redirects labeled by protocol - ProxyRedirects = NoOpGaugeVec - - // ProxyPolicyL7Total is a count of all l7 requests handled by proxy - ProxyPolicyL7Total = NoOpCounterVec - - // ProxyUpstreamTime is how long the upstream server took to reply labeled - // by error, protocol and span time - ProxyUpstreamTime = NoOpObserverVec - - // ProxyDatapathUpdateTimeout is a count of all the timeouts encountered while - // updating the datapath due to an FQDN IP update - ProxyDatapathUpdateTimeout = NoOpCounter - - // L3-L4 statistics - - // Datapath statistics - - // ConntrackGCRuns is the number of times that the conntrack GC - // process was run. - ConntrackGCRuns = NoOpCounterVec - - // ConntrackGCKeyFallbacks number of times that the conntrack key fallback was invalid. - ConntrackGCKeyFallbacks = NoOpCounterVec - - // ConntrackGCSize the number of entries in the conntrack table - ConntrackGCSize = NoOpGaugeVec - - // NatGCSize the number of entries in the nat table - NatGCSize = NoOpGaugeVec - - // ConntrackGCDuration the duration of the conntrack GC process in milliseconds. - ConntrackGCDuration = NoOpObserverVec - - // ConntrackDumpReset marks the count for conntrack dump resets - ConntrackDumpResets = NoOpCounterVec - - // Signals - - // SignalsHandled is the number of signals received. - SignalsHandled = NoOpCounterVec - - // Services - - // ServicesEventsCount counts the number of services - ServicesEventsCount = NoOpCounterVec - - // Errors and warnings - - // ErrorsWarnings is the number of errors and warnings in cilium-agent instances - ErrorsWarnings = NoOpCounterVec - - // ControllerRuns is the number of times that a controller process runs. - ControllerRuns = NoOpCounterVec - - // ControllerRunsDuration the duration of the controller process in seconds - ControllerRunsDuration = NoOpObserverVec - - // subprocess, labeled by Subsystem - SubprocessStart = NoOpCounterVec - - // Kubernetes Events - - // KubernetesEventProcessed is the number of Kubernetes events - // processed labeled by scope, action and execution result - KubernetesEventProcessed = NoOpCounterVec - - // KubernetesEventReceived is the number of Kubernetes events received - // labeled by scope, action, valid data and equalness. - KubernetesEventReceived = NoOpCounterVec - - // Kubernetes interactions - - // KubernetesAPIInteractions is the total time taken to process an API call made - // to the kube-apiserver - KubernetesAPIInteractions = NoOpObserverVec - - // KubernetesAPIRateLimiterLatency is the client side rate limiter latency metric - KubernetesAPIRateLimiterLatency = NoOpObserverVec - - // KubernetesAPICallsTotal is the counter for all API calls made to - // kube-apiserver. - KubernetesAPICallsTotal = NoOpCounterVec - - // KubernetesCNPStatusCompletion is the number of seconds it takes to - // complete a CNP status update - KubernetesCNPStatusCompletion = NoOpObserverVec - - // TerminatingEndpointsEvents is the number of terminating endpoint events received from kubernetes. - TerminatingEndpointsEvents = NoOpCounter - - // IPAM events - - // IPAMEvent is the number of IPAM events received labeled by action and - // datapath family type - IPAMEvent = NoOpCounterVec - - // IPAMCapacity tracks the total number of IPs that could be allocated. To - // get the current number of available IPs, it would be this metric - // subtracted by IPAMEvent{allocated}. - IPAMCapacity = NoOpGaugeVec - - // KVstore events - - // KVStoreOperationsDuration records the duration of kvstore operations - KVStoreOperationsDuration = NoOpObserverVec - - // KVStoreEventsQueueDuration records the duration in seconds of time - // received event was blocked before it could be queued - KVStoreEventsQueueDuration = NoOpObserverVec - - // KVStoreQuorumErrors records the number of kvstore quorum errors - KVStoreQuorumErrors = NoOpCounterVec - - // FQDNGarbageCollectorCleanedTotal is the number of domains cleaned by the - // GC job. - FQDNGarbageCollectorCleanedTotal = NoOpCounter - - // FQDNActiveNames is the number of domains inside the DNS cache that have - // not expired (by TTL), per endpoint. - FQDNActiveNames = NoOpGaugeVec - - // FQDNActiveIPs is the number of IPs inside the DNS cache associated with - // a domain that has not expired (by TTL) and are currently active, per - // endpoint. - FQDNActiveIPs = NoOpGaugeVec - - // FQDNAliveZombieConnections is the number IPs associated with domains - // that have expired (by TTL) yet still associated with an active - // connection (aka zombie), per endpoint. - FQDNAliveZombieConnections = NoOpGaugeVec - - // FQDNSemaphoreRejectedTotal is the total number of DNS requests rejected - // by the DNS proxy because too many requests were in flight, as enforced by - // the admission semaphore. - FQDNSemaphoreRejectedTotal = NoOpCounter - - // IPCacheErrorsTotal is the total number of IPCache events handled in - // the IPCache subsystem that resulted in errors. - IPCacheErrorsTotal = NoOpCounterVec - - // IPCacheEventsTotal is the total number of IPCache events handled in - // the IPCache subsystem. - IPCacheEventsTotal = NoOpCounterVec - - // BPFSyscallDuration is the metric for bpf syscalls duration. - BPFSyscallDuration = NoOpObserverVec - - // BPFMapOps is the metric to measure the number of operations done to a - // bpf map. - BPFMapOps = NoOpCounterVec - - // BPFMapCapacity is the max capacity of bpf maps, labelled by map group classification. - BPFMapCapacity = NoOpGaugeVec - - // TriggerPolicyUpdateTotal is the metric to count total number of - // policy update triggers - TriggerPolicyUpdateTotal = NoOpCounterVec - - // TriggerPolicyUpdateFolds is the current level folding that is - // happening when running policy update triggers - TriggerPolicyUpdateFolds = NoOpGauge - - // TriggerPolicyUpdateCallDuration measures the latency and call - // duration of policy update triggers - TriggerPolicyUpdateCallDuration = NoOpObserverVec - - // VersionMetric labelled by Cilium version - VersionMetric = NoOpGaugeVec - - // APILimiterWaitHistoryDuration is a histogram that measures the - // individual wait durations of API limiters - APILimiterWaitHistoryDuration = NoOpObserverVec - - // APILimiterWaitDuration is the gauge of the current mean, min, and - // max wait duration - APILimiterWaitDuration = NoOpGaugeVec - - // APILimiterProcessingDuration is the gauge of the mean and estimated - // processing duration - APILimiterProcessingDuration = NoOpGaugeVec - - // APILimiterRequestsInFlight is the gauge of the current and max - // requests in flight - APILimiterRequestsInFlight = NoOpGaugeVec - - // APILimiterRateLimit is the gauge of the current rate limiting - // configuration including limit and burst - APILimiterRateLimit = NoOpGaugeVec - - // APILimiterAdjustmentFactor is the gauge representing the latest - // adjustment factor that was applied - APILimiterAdjustmentFactor = NoOpGaugeVec - - // APILimiterProcessedRequests is the counter of the number of - // processed (successful and failed) requests - APILimiterProcessedRequests = NoOpCounterVec - - // WorkQueueDepth is the depth of the workqueue - // - // We set actual metrics here instead of NoOp for the workqueue metrics - // because these metrics will be registered with workqueue.SetProvider - // by init function in watcher.go. Otherwise, we will register NoOps. - // - WorkQueueDepth = metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemWorkQueue + "_depth", - Namespace: Namespace, - Subsystem: SubsystemWorkQueue, - Name: "depth", - Help: "Current depth of workqueue.", - }, []string{"name"}) - - // WorkQueueAddsTotal is the total number of adds to the workqueue - WorkQueueAddsTotal = metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemWorkQueue + "_adds_total", - Namespace: Namespace, - Subsystem: SubsystemWorkQueue, - Name: "adds_total", - Help: "Total number of adds handled by workqueue.", - }, []string{"name"}) - - // WorkQueueLatency is the latency of how long an item stays in the workqueue - WorkQueueLatency = metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemWorkQueue + "_queue_duration_seconds", - Namespace: Namespace, - Subsystem: SubsystemWorkQueue, - Name: "queue_duration_seconds", - Help: "How long in seconds an item stays in workqueue before being requested.", - Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10), - }, []string{"name"}) - - // WorkQueueDuration is the duration of how long processing an item for the workqueue - WorkQueueDuration = metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemWorkQueue + "_work_duration_seconds", - Namespace: Namespace, - Subsystem: SubsystemWorkQueue, - Name: "work_duration_seconds", - Help: "How long in seconds processing an item from workqueue takes.", - Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10), - }, []string{"name"}) - - // WorkQueueUnfinishedWork is how many seconds of work has been done that is in progress - WorkQueueUnfinishedWork = metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemWorkQueue + "_unfinished_work_seconds", - Namespace: Namespace, - Subsystem: SubsystemWorkQueue, - Name: "unfinished_work_seconds", - Help: "How many seconds of work has been done that " + - "is in progress and hasn't been observed by work_duration. Large " + - "values indicate stuck threads. One can deduce the number of stuck " + - "threads by observing the rate at which this increases.", - }, []string{"name"}) - - // WorkQueueLongestRunningProcessor is the longest running processor in the workqueue - WorkQueueLongestRunningProcessor = metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemWorkQueue + "_longest_running_processor_seconds", - Namespace: Namespace, - Subsystem: SubsystemWorkQueue, - Name: "longest_running_processor_seconds", - Help: "How many seconds has the longest running " + - "processor for workqueue been running.", - }, []string{"name"}) - - // WorkQueueRetries is the number of retries for handled by the workqueue - WorkQueueRetries = metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemWorkQueue + "_retries_total", - Namespace: Namespace, - Subsystem: SubsystemWorkQueue, - Name: "retries_total", - Help: "Total number of retries handled by workqueue.", - }, []string{"name"}) -) - -type LegacyMetrics struct { - BootstrapTimes metric.Vec[metric.Observer] - APIInteractions metric.Vec[metric.Observer] - NodeConnectivityStatus metric.DeletableVec[metric.Gauge] - NodeConnectivityLatency metric.DeletableVec[metric.Gauge] - Endpoint metric.GaugeFunc - EndpointMaxIfindex metric.Gauge - EndpointRegenerationTotal metric.Vec[metric.Counter] - EndpointStateCount metric.Vec[metric.Gauge] - EndpointRegenerationTimeStats metric.Vec[metric.Observer] - EndpointPropagationDelay metric.Vec[metric.Observer] - Policy metric.Gauge - PolicyRegenerationCount metric.Counter - PolicyRegenerationTimeStats metric.Vec[metric.Observer] - PolicyRevision metric.Gauge - PolicyChangeTotal metric.Vec[metric.Counter] - PolicyEndpointStatus metric.Vec[metric.Gauge] - PolicyImplementationDelay metric.Vec[metric.Observer] - CIDRGroupsReferenced metric.Gauge - CIDRGroupTranslationTimeStats metric.Histogram - Identity metric.Vec[metric.Gauge] - EventTS metric.Vec[metric.Gauge] - EventLagK8s metric.Gauge - ProxyRedirects metric.Vec[metric.Gauge] - ProxyPolicyL7Total metric.Vec[metric.Counter] - ProxyUpstreamTime metric.Vec[metric.Observer] - ProxyDatapathUpdateTimeout metric.Counter - ConntrackGCRuns metric.Vec[metric.Counter] - ConntrackGCKeyFallbacks metric.Vec[metric.Counter] - ConntrackGCSize metric.Vec[metric.Gauge] - NatGCSize metric.Vec[metric.Gauge] - ConntrackGCDuration metric.Vec[metric.Observer] - ConntrackDumpResets metric.Vec[metric.Counter] - SignalsHandled metric.Vec[metric.Counter] - ServicesEventsCount metric.Vec[metric.Counter] - ErrorsWarnings metric.Vec[metric.Counter] - ControllerRuns metric.Vec[metric.Counter] - ControllerRunsDuration metric.Vec[metric.Observer] - SubprocessStart metric.Vec[metric.Counter] - KubernetesEventProcessed metric.Vec[metric.Counter] - KubernetesEventReceived metric.Vec[metric.Counter] - KubernetesAPIInteractions metric.Vec[metric.Observer] - KubernetesAPIRateLimiterLatency metric.Vec[metric.Observer] - KubernetesAPICallsTotal metric.Vec[metric.Counter] - KubernetesCNPStatusCompletion metric.Vec[metric.Observer] - TerminatingEndpointsEvents metric.Counter - IPAMEvent metric.Vec[metric.Counter] - IPAMCapacity metric.Vec[metric.Gauge] - KVStoreOperationsDuration metric.Vec[metric.Observer] - KVStoreEventsQueueDuration metric.Vec[metric.Observer] - KVStoreQuorumErrors metric.Vec[metric.Counter] - FQDNGarbageCollectorCleanedTotal metric.Counter - FQDNActiveNames metric.Vec[metric.Gauge] - FQDNActiveIPs metric.Vec[metric.Gauge] - FQDNAliveZombieConnections metric.Vec[metric.Gauge] - FQDNSemaphoreRejectedTotal metric.Counter - IPCacheErrorsTotal metric.Vec[metric.Counter] - IPCacheEventsTotal metric.Vec[metric.Counter] - BPFSyscallDuration metric.Vec[metric.Observer] - BPFMapOps metric.Vec[metric.Counter] - BPFMapCapacity metric.Vec[metric.Gauge] - TriggerPolicyUpdateTotal metric.Vec[metric.Counter] - TriggerPolicyUpdateFolds metric.Gauge - TriggerPolicyUpdateCallDuration metric.Vec[metric.Observer] - VersionMetric metric.Vec[metric.Gauge] - APILimiterWaitHistoryDuration metric.Vec[metric.Observer] - APILimiterWaitDuration metric.Vec[metric.Gauge] - APILimiterProcessingDuration metric.Vec[metric.Gauge] - APILimiterRequestsInFlight metric.Vec[metric.Gauge] - APILimiterRateLimit metric.Vec[metric.Gauge] - APILimiterAdjustmentFactor metric.Vec[metric.Gauge] - APILimiterProcessedRequests metric.Vec[metric.Counter] - WorkQueueDepth metric.Vec[metric.Gauge] - WorkQueueAddsTotal metric.Vec[metric.Counter] - WorkQueueLatency metric.Vec[metric.Observer] - WorkQueueDuration metric.Vec[metric.Observer] - WorkQueueUnfinishedWork metric.Vec[metric.Gauge] - WorkQueueLongestRunningProcessor metric.Vec[metric.Gauge] - WorkQueueRetries metric.Vec[metric.Counter] -} - -func NewLegacyMetrics() *LegacyMetrics { - lm := &LegacyMetrics{ - BootstrapTimes: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemAgent + "_bootstrap_seconds", - Namespace: Namespace, - Subsystem: SubsystemAgent, - Name: "bootstrap_seconds", - Help: "Duration of bootstrap sequence", - }, []string{LabelScope, LabelOutcome}), - - APIInteractions: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemAgent + "_api_process_time_seconds", - - Namespace: Namespace, - Subsystem: SubsystemAgent, - Name: "api_process_time_seconds", - Help: "Duration of processed API calls labeled by path, method and return code.", - }, []string{LabelPath, LabelMethod, LabelAPIReturnCode}), - - EndpointRegenerationTotal: metric.NewCounterVecWithLabels(metric.CounterOpts{ - ConfigName: Namespace + "_endpoint_regenerations_total", - - Namespace: Namespace, - Name: "endpoint_regenerations_total", - Help: "Count of all endpoint regenerations that have completed, tagged by outcome", - }, metric.Labels{ - { - Name: LabelOutcome, - Values: metric.NewValues(LabelValueOutcomeSuccess, LabelValueOutcomeFailure), - }, - }), - - EndpointStateCount: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_endpoint_state", - Namespace: Namespace, - Name: "endpoint_state", - Help: "Count of all endpoints, tagged by different endpoint states", - }, - []string{"endpoint_state"}, - ), - - EndpointRegenerationTimeStats: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_endpoint_regeneration_time_stats_seconds", - - Namespace: Namespace, - Name: "endpoint_regeneration_time_stats_seconds", - Help: "Endpoint regeneration time stats labeled by the scope", - }, []string{LabelScope, LabelStatus}), - - Policy: metric.NewGauge(metric.GaugeOpts{ - ConfigName: Namespace + "_policy", - Namespace: Namespace, - Name: "policy", - Help: "Number of policies currently loaded", - }), - - PolicyRegenerationCount: metric.NewCounter(metric.CounterOpts{ - ConfigName: Namespace + "_policy_regeneration_total", - Namespace: Namespace, - Name: "policy_regeneration_total", - Help: "Total number of successful policy regenerations", - }), - - PolicyRegenerationTimeStats: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_policy_regeneration_time_stats_seconds", - Namespace: Namespace, - Name: "policy_regeneration_time_stats_seconds", - Help: "Policy regeneration time stats labeled by the scope", - }, []string{LabelScope, LabelStatus}), - - PolicyRevision: metric.NewGauge(metric.GaugeOpts{ - ConfigName: Namespace + "_policy_max_revision", - Namespace: Namespace, - Name: "policy_max_revision", - Help: "Highest policy revision number in the agent", - }), - - PolicyChangeTotal: metric.NewCounterVecWithLabels(metric.CounterOpts{ - ConfigName: Namespace + "_policy_change_total", - - Namespace: Namespace, - Name: "policy_change_total", - Help: "Number of policy changes by outcome", - }, metric.Labels{ - { - Name: LabelOutcome, - Values: metric.NewValues(LabelValueOutcomeSuccess, LabelValueOutcomeFailure), - }, - }), - - PolicyEndpointStatus: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_policy_endpoint_enforcement_status", - - Namespace: Namespace, - Name: "policy_endpoint_enforcement_status", - Help: "Number of endpoints labeled by policy enforcement status", - }, []string{LabelPolicyEnforcement}), - - PolicyImplementationDelay: metric.NewHistogramVecWithLabels(metric.HistogramOpts{ - ConfigName: Namespace + "_policy_implementation_delay", - - Namespace: Namespace, - Name: "policy_implementation_delay", - Help: "Time between a policy change and it being fully deployed into the datapath", - }, metric.Labels{ - { - Name: LabelPolicySource, - Values: metric.NewValues(string(source.Kubernetes), string(source.CustomResource), string(source.LocalAPI)), - }, - }), - - CIDRGroupsReferenced: metric.NewGauge(metric.GaugeOpts{ - ConfigName: Namespace + "cidrgroups_referenced", - - Namespace: Namespace, - Name: "cidrgroups_referenced", - Help: "Number of CNPs and CCNPs referencing at least one CiliumCIDRGroup. CNPs with empty or non-existing CIDRGroupRefs are not considered", - }), - - CIDRGroupTranslationTimeStats: metric.NewHistogram(metric.HistogramOpts{ - ConfigName: Namespace + "cidrgroup_translation_time_stats_seconds", - Disabled: true, - - Namespace: Namespace, - Name: "cidrgroup_translation_time_stats_seconds", - Help: "CIDRGroup translation time stats", - }), - - Identity: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_identity", - - Namespace: Namespace, - Name: "identity", - Help: "Number of identities currently allocated", - }, []string{LabelType}), - - EventTS: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_event_ts", - Namespace: Namespace, - Name: "event_ts", - Help: "Last timestamp when Cilium received an event from a control plane source, per resource and per action", - }, []string{LabelEventSource, LabelScope, LabelAction}), - - EventLagK8s: metric.NewGauge(metric.GaugeOpts{ - ConfigName: Namespace + "_k8s_event_lag_seconds", - Disabled: true, - Namespace: Namespace, - Name: "k8s_event_lag_seconds", - Help: "Lag for Kubernetes events - computed value between receiving a CNI ADD event from kubelet and a Pod event received from kube-api-server", - ConstLabels: prometheus.Labels{"source": LabelEventSourceK8s}, - }), - - ProxyRedirects: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_proxy_redirects", - - Namespace: Namespace, - Name: "proxy_redirects", - Help: "Number of redirects installed for endpoints, labeled by protocol", - }, []string{LabelProtocolL7}), - - ProxyPolicyL7Total: metric.NewCounterVecWithLabels(metric.CounterOpts{ - ConfigName: Namespace + "_policy_l7_total", - Namespace: Namespace, - Name: "policy_l7_total", - Help: "Number of total proxy requests handled", - }, metric.Labels{ - { - Name: LabelL7Rule, - Values: metric.NewValues("received", "forwarded", "denied", "parse_errors"), - }, - { - Name: LabelL7ProxyType, - Values: metric.NewValues("fqdn", "envoy"), - }, - }), - - ProxyUpstreamTime: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_proxy_upstream_reply_seconds", - Namespace: Namespace, - Name: "proxy_upstream_reply_seconds", - Help: "Seconds waited to get a reply from a upstream server", - }, []string{"error", LabelProtocolL7, LabelScope}), - - ProxyDatapathUpdateTimeout: metric.NewCounter(metric.CounterOpts{ - ConfigName: Namespace + "_proxy_datapath_update_timeout_total", - Disabled: true, - - Namespace: Namespace, - Name: "proxy_datapath_update_timeout_total", - Help: "Number of total datapath update timeouts due to FQDN IP updates", - }), - - ConntrackGCRuns: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemDatapath + "_conntrack_gc_runs_total", - Namespace: Namespace, - Subsystem: SubsystemDatapath, - Name: "conntrack_gc_runs_total", - Help: "Number of times that the conntrack garbage collector process was run " + - "labeled by completion status", - }, []string{LabelDatapathFamily, LabelProtocol, LabelStatus}), - - ConntrackGCKeyFallbacks: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemDatapath + "_conntrack_gc_key_fallbacks_total", - Namespace: Namespace, - Subsystem: SubsystemDatapath, - Name: "conntrack_gc_key_fallbacks_total", - Help: "Number of times a key fallback was needed when iterating over the BPF map", - }, []string{LabelDatapathFamily, LabelProtocol}), - - ConntrackGCSize: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemDatapath + "_conntrack_gc_entries", - Namespace: Namespace, - Subsystem: SubsystemDatapath, - Name: "conntrack_gc_entries", - Help: "The number of alive and deleted conntrack entries at the end " + - "of a garbage collector run labeled by datapath family.", - }, []string{LabelDatapathFamily, LabelProtocol, LabelStatus}), - - NatGCSize: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemDatapath + "_nat_gc_entries", - Disabled: true, - Namespace: Namespace, - Subsystem: SubsystemDatapath, - Name: "nat_gc_entries", - Help: "The number of alive and deleted nat entries at the end " + - "of a garbage collector run labeled by datapath family.", - }, []string{LabelDatapathFamily, LabelDirection, LabelStatus}), - - ConntrackGCDuration: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemDatapath + "_conntrack_gc_duration_seconds", - Namespace: Namespace, - Subsystem: SubsystemDatapath, - Name: "conntrack_gc_duration_seconds", - Help: "Duration in seconds of the garbage collector process " + - "labeled by datapath family and completion status", - }, []string{LabelDatapathFamily, LabelProtocol, LabelStatus}), - - ConntrackDumpResets: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemDatapath + "_conntrack_dump_resets_total", - Namespace: Namespace, - Subsystem: SubsystemDatapath, - Name: "conntrack_dump_resets_total", - Help: "Number of conntrack dump resets. Happens when a BPF entry gets removed while dumping the map is in progress", - }, []string{LabelDatapathArea, LabelDatapathName, LabelDatapathFamily}), - - SignalsHandled: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemDatapath + "_signals_handled_total", - - Namespace: Namespace, - Subsystem: SubsystemDatapath, - Name: "signals_handled_total", - Help: "Number of times that the datapath signal handler process was run " + - "labeled by signal type, data and completion status", - }, []string{LabelSignalType, LabelSignalData, LabelStatus}), - - ServicesEventsCount: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_services_events_total", - Namespace: Namespace, - Name: "services_events_total", - Help: "Number of services events labeled by action type", - }, []string{LabelAction}), - - ErrorsWarnings: newErrorsWarningsMetric(), - - ControllerRuns: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_controllers_runs_total", - Namespace: Namespace, - Name: "controllers_runs_total", - Help: "Number of times that a controller process was run labeled by completion status", - }, []string{LabelStatus}), - - ControllerRunsDuration: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_controllers_runs_duration_seconds", - Namespace: Namespace, - Name: "controllers_runs_duration_seconds", - Help: "Duration in seconds of the controller process labeled by completion status", - }, []string{LabelStatus}), - - SubprocessStart: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_subprocess_start_total", - Namespace: Namespace, - Name: "subprocess_start_total", - Help: "Number of times that Cilium has started a subprocess, labeled by subsystem", - }, []string{LabelSubsystem}), - - KubernetesEventProcessed: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_kubernetes_events_total", - Namespace: Namespace, - Name: "kubernetes_events_total", - Help: "Number of Kubernetes events processed labeled by scope, action and execution result", - }, []string{LabelScope, LabelAction, LabelStatus}), - - KubernetesEventReceived: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_kubernetes_events_received_total", - Namespace: Namespace, - Name: "kubernetes_events_received_total", - Help: "Number of Kubernetes events received labeled by scope, action, valid data and equalness", - }, []string{LabelScope, LabelAction, "valid", "equal"}), - - KubernetesAPIInteractions: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemK8sClient + "_api_latency_time_seconds", - Namespace: Namespace, - Subsystem: SubsystemK8sClient, - Name: "api_latency_time_seconds", - Help: "Duration of processed API calls labeled by path and method.", - }, []string{LabelPath, LabelMethod}), - - KubernetesAPIRateLimiterLatency: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemK8sClient + "_rate_limiter_duration_seconds", - Namespace: Namespace, - Subsystem: SubsystemK8sClient, - Name: "rate_limiter_duration_seconds", - Help: "Kubernetes client rate limiter latency in seconds. Broken down by path and method.", - Buckets: []float64{0.005, 0.025, 0.1, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 15.0, 30.0, 60.0}, - }, []string{LabelPath, LabelMethod}), - - KubernetesAPICallsTotal: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemK8sClient + "_api_calls_total", - Namespace: Namespace, - Subsystem: SubsystemK8sClient, - Name: "api_calls_total", - Help: "Number of API calls made to kube-apiserver labeled by host, method and return code.", - }, []string{"host", LabelMethod, LabelAPIReturnCode}), - - KubernetesCNPStatusCompletion: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemK8s + "_cnp_status_completion_seconds", - Namespace: Namespace, - Subsystem: SubsystemK8s, - Name: "cnp_status_completion_seconds", - Help: "Duration in seconds in how long it took to complete a CNP status update", - }, []string{LabelAttempts, LabelOutcome}), - - TerminatingEndpointsEvents: metric.NewCounter(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemK8s + "_terminating_endpoints_events_total", - Namespace: Namespace, - Subsystem: SubsystemK8s, - Name: "terminating_endpoints_events_total", - Help: "Number of terminating endpoint events received from Kubernetes", - }), - - IPAMEvent: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_ipam_events_total", - Namespace: Namespace, - Name: "ipam_events_total", - Help: "Number of IPAM events received labeled by action and datapath family type", - }, []string{LabelAction, LabelDatapathFamily}), - - IPAMCapacity: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_ipam_capacity", - Namespace: Namespace, - Name: "ipam_capacity", - Help: "Total number of IPs in the IPAM pool labeled by family", - }, []string{LabelDatapathFamily}), - - KVStoreOperationsDuration: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemKVStore + "_operations_duration_seconds", - Namespace: Namespace, - Subsystem: SubsystemKVStore, - Name: "operations_duration_seconds", - Help: "Duration in seconds of kvstore operations", - }, []string{LabelScope, LabelKind, LabelAction, LabelOutcome}), - - KVStoreEventsQueueDuration: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemKVStore + "_events_queue_seconds", - Namespace: Namespace, - Subsystem: SubsystemKVStore, - Name: "events_queue_seconds", - Help: "Seconds waited before a received event was queued", - Buckets: []float64{.002, .005, .01, .015, .025, .05, .1, .25, .5, .75, 1}, - }, []string{LabelScope, LabelAction}), - - KVStoreQuorumErrors: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemKVStore + "_quorum_errors_total", - Namespace: Namespace, - Subsystem: SubsystemKVStore, - Name: "quorum_errors_total", - Help: "Number of quorum errors", - }, []string{LabelError}), - - IPCacheErrorsTotal: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemIPCache + "_errors_total", - Namespace: Namespace, - Subsystem: SubsystemIPCache, - Name: "errors_total", - Help: "Number of errors interacting with the IP to Identity cache", - }, []string{LabelType, LabelError}), - - IPCacheEventsTotal: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemIPCache + "_events_total", - Disabled: true, - Namespace: Namespace, - Subsystem: SubsystemIPCache, - Name: "events_total", - Help: "Number of events interacting with the IP to Identity cache", - }, []string{LabelType}), - - FQDNGarbageCollectorCleanedTotal: metric.NewCounter(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemFQDN + "_gc_deletions_total", - Namespace: Namespace, - Subsystem: SubsystemFQDN, - Name: "gc_deletions_total", - Help: "Number of FQDNs that have been cleaned on FQDN Garbage collector job", - }), - - FQDNActiveNames: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemFQDN + "_active_names", - Disabled: true, - Namespace: Namespace, - Subsystem: SubsystemFQDN, - Name: "active_names", - Help: "Number of domains inside the DNS cache that have not expired (by TTL), per endpoint", - }, []string{LabelPeerEndpoint}), - - FQDNActiveIPs: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemFQDN + "_active_ips", - Disabled: true, - Namespace: Namespace, - Subsystem: SubsystemFQDN, - Name: "active_ips", - Help: "Number of IPs inside the DNS cache associated with a domain that has not expired (by TTL), per endpoint", - }, []string{LabelPeerEndpoint}), - - FQDNAliveZombieConnections: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemFQDN + "_alive_zombie_connections", - Disabled: true, - Namespace: Namespace, - Subsystem: SubsystemFQDN, - Name: "alive_zombie_connections", - Help: "Number of IPs associated with domains that have expired (by TTL) yet still associated with an active connection (aka zombie), per endpoint", - }, []string{LabelPeerEndpoint}), - - FQDNSemaphoreRejectedTotal: metric.NewCounter(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemFQDN + "_semaphore_rejected_total", - Disabled: true, - Namespace: Namespace, - Subsystem: SubsystemFQDN, - Name: "semaphore_rejected_total", - Help: "Number of DNS request rejected by the DNS Proxy's admission semaphore", - }), - - BPFSyscallDuration: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemBPF + "_syscall_duration_seconds", - Disabled: true, - Namespace: Namespace, - Subsystem: SubsystemBPF, - Name: "syscall_duration_seconds", - Help: "Duration of BPF system calls", - }, []string{LabelOperation, LabelOutcome}), - - BPFMapOps: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemBPF + "_map_ops_total", - Namespace: Namespace, - Subsystem: SubsystemBPF, - Name: "map_ops_total", - Help: "Total operations on map, tagged by map name", - }, []string{LabelMapName, LabelOperation, LabelOutcome}), - - BPFMapCapacity: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemBPF + "_map_capacity", - Namespace: Namespace, - Subsystem: SubsystemBPF, - Name: "map_capacity", - Help: "Capacity of map, tagged by map group. All maps with a capacity of 65536 are grouped under 'default'", - }, []string{LabelMapGroup}), - - TriggerPolicyUpdateTotal: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemTriggers + "_policy_update_total", - Namespace: Namespace, - Subsystem: SubsystemTriggers, - Name: "policy_update_total", - Help: "Total number of policy update trigger invocations labeled by reason", - }, []string{"reason"}), - - TriggerPolicyUpdateFolds: metric.NewGauge(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemTriggers + "_policy_update_folds", - Namespace: Namespace, - Subsystem: SubsystemTriggers, - Name: "policy_update_folds", - Help: "Current number of folds", - }), - - TriggerPolicyUpdateCallDuration: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemTriggers + "_policy_update_call_duration_seconds", - Namespace: Namespace, - Subsystem: SubsystemTriggers, - Name: "policy_update_call_duration_seconds", - Help: "Duration of policy update trigger", - }, []string{LabelType}), - - VersionMetric: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_version", - Namespace: Namespace, - Name: "version", - Help: "Cilium version", - }, []string{LabelVersion, LabelVersionRevision, LabelArch}), - - APILimiterWaitHistoryDuration: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_" + SubsystemAPILimiter + "_wait_history_duration_seconds", - Disabled: true, - Namespace: Namespace, - Subsystem: SubsystemAPILimiter, - Name: "wait_history_duration_seconds", - Help: "Histogram over duration of waiting period for API calls subjects to rate limiting", - }, []string{"api_call"}), - - APILimiterWaitDuration: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemAPILimiter + "_wait_duration_seconds", - Namespace: Namespace, - Subsystem: SubsystemAPILimiter, - Name: "wait_duration_seconds", - Help: "Current wait time for api calls", - }, []string{"api_call", "value"}), - - APILimiterProcessingDuration: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemAPILimiter + "_processing_duration_seconds", - Namespace: Namespace, - Subsystem: SubsystemAPILimiter, - Name: "processing_duration_seconds", - Help: "Current processing time of api call", - }, []string{"api_call", "value"}), - - APILimiterRequestsInFlight: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemAPILimiter + "_requests_in_flight", - Namespace: Namespace, - Subsystem: SubsystemAPILimiter, - Name: "requests_in_flight", - Help: "Current requests in flight", - }, []string{"api_call", "value"}), - - APILimiterRateLimit: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemAPILimiter + "_rate_limit", - Namespace: Namespace, - Subsystem: SubsystemAPILimiter, - Name: "rate_limit", - Help: "Current rate limiting configuration", - }, []string{"api_call", "value"}), - - APILimiterAdjustmentFactor: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_" + SubsystemAPILimiter + "_adjustment_factor", - Namespace: Namespace, - Subsystem: SubsystemAPILimiter, - Name: "adjustment_factor", - Help: "Current adjustment factor while auto adjusting", - }, []string{"api_call"}), - - APILimiterProcessedRequests: metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_" + SubsystemAPILimiter + "_processed_requests_total", - Namespace: Namespace, - Subsystem: SubsystemAPILimiter, - Name: "processed_requests_total", - Help: "Total number of API requests processed", - }, []string{"api_call", LabelOutcome, LabelAPIReturnCode}), - - EndpointPropagationDelay: metric.NewHistogramVec(metric.HistogramOpts{ - ConfigName: Namespace + "_endpoint_propagation_delay_seconds", - Namespace: Namespace, - Name: "endpoint_propagation_delay_seconds", - Help: "CiliumEndpoint roundtrip propagation delay in seconds", - Buckets: []float64{.05, .1, 1, 5, 30, 60, 120, 240, 300, 600}, - }, []string{}), - - NodeConnectivityStatus: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_node_connectivity_status", - Namespace: Namespace, - Name: "node_connectivity_status", - Help: "The last observed status of both ICMP and HTTP connectivity between the current Cilium agent and other Cilium nodes", - }, []string{ - LabelSourceCluster, - LabelSourceNodeName, - LabelTargetCluster, - LabelTargetNodeName, - LabelTargetNodeType, - LabelType, - }), - - NodeConnectivityLatency: metric.NewGaugeVec(metric.GaugeOpts{ - ConfigName: Namespace + "_node_connectivity_latency_seconds", - Namespace: Namespace, - Name: "node_connectivity_latency_seconds", - Help: "The last observed latency between the current Cilium agent and other Cilium nodes in seconds", - }, []string{ - LabelSourceCluster, - LabelSourceNodeName, - LabelTargetCluster, - LabelTargetNodeName, - LabelTargetNodeIP, - LabelTargetNodeType, - LabelType, - LabelProtocol, - LabelAddressType, - }), - - WorkQueueDepth: WorkQueueDepth, - WorkQueueAddsTotal: WorkQueueAddsTotal, - WorkQueueLatency: WorkQueueLatency, - WorkQueueDuration: WorkQueueDuration, - WorkQueueUnfinishedWork: WorkQueueUnfinishedWork, - WorkQueueLongestRunningProcessor: WorkQueueLongestRunningProcessor, - WorkQueueRetries: WorkQueueRetries, - } - - ifindexOpts := metric.GaugeOpts{ - ConfigName: Namespace + "_endpoint_max_ifindex", - Disabled: !enableIfIndexMetric(), - Namespace: Namespace, - Name: "endpoint_max_ifindex", - Help: "Maximum interface index observed for existing endpoints", - } - lm.EndpointMaxIfindex = metric.NewGauge(ifindexOpts) - - v := version.GetCiliumVersion() - lm.VersionMetric.WithLabelValues(v.Version, v.Revision, v.Arch) - lm.BPFMapCapacity.WithLabelValues("default").Set(DefaultMapCapacity) - - BootstrapTimes = lm.BootstrapTimes - APIInteractions = lm.APIInteractions - NodeConnectivityStatus = lm.NodeConnectivityStatus - NodeConnectivityLatency = lm.NodeConnectivityLatency - Endpoint = lm.Endpoint - EndpointMaxIfindex = lm.EndpointMaxIfindex - EndpointRegenerationTotal = lm.EndpointRegenerationTotal - EndpointStateCount = lm.EndpointStateCount - EndpointRegenerationTimeStats = lm.EndpointRegenerationTimeStats - EndpointPropagationDelay = lm.EndpointPropagationDelay - Policy = lm.Policy - PolicyRegenerationCount = lm.PolicyRegenerationCount - PolicyRegenerationTimeStats = lm.PolicyRegenerationTimeStats - PolicyRevision = lm.PolicyRevision - PolicyChangeTotal = lm.PolicyChangeTotal - PolicyEndpointStatus = lm.PolicyEndpointStatus - PolicyImplementationDelay = lm.PolicyImplementationDelay - CIDRGroupsReferenced = lm.CIDRGroupsReferenced - CIDRGroupTranslationTimeStats = lm.CIDRGroupTranslationTimeStats - Identity = lm.Identity - EventTS = lm.EventTS - EventLagK8s = lm.EventLagK8s - ProxyRedirects = lm.ProxyRedirects - ProxyPolicyL7Total = lm.ProxyPolicyL7Total - ProxyUpstreamTime = lm.ProxyUpstreamTime - ProxyDatapathUpdateTimeout = lm.ProxyDatapathUpdateTimeout - ConntrackGCRuns = lm.ConntrackGCRuns - ConntrackGCKeyFallbacks = lm.ConntrackGCKeyFallbacks - ConntrackGCSize = lm.ConntrackGCSize - NatGCSize = lm.NatGCSize - ConntrackGCDuration = lm.ConntrackGCDuration - ConntrackDumpResets = lm.ConntrackDumpResets - SignalsHandled = lm.SignalsHandled - ServicesEventsCount = lm.ServicesEventsCount - ErrorsWarnings = lm.ErrorsWarnings - ControllerRuns = lm.ControllerRuns - ControllerRunsDuration = lm.ControllerRunsDuration - SubprocessStart = lm.SubprocessStart - KubernetesEventProcessed = lm.KubernetesEventProcessed - KubernetesEventReceived = lm.KubernetesEventReceived - KubernetesAPIInteractions = lm.KubernetesAPIInteractions - KubernetesAPIRateLimiterLatency = lm.KubernetesAPIRateLimiterLatency - KubernetesAPICallsTotal = lm.KubernetesAPICallsTotal - KubernetesCNPStatusCompletion = lm.KubernetesCNPStatusCompletion - TerminatingEndpointsEvents = lm.TerminatingEndpointsEvents - IPAMEvent = lm.IPAMEvent - IPAMCapacity = lm.IPAMCapacity - KVStoreOperationsDuration = lm.KVStoreOperationsDuration - KVStoreEventsQueueDuration = lm.KVStoreEventsQueueDuration - KVStoreQuorumErrors = lm.KVStoreQuorumErrors - FQDNGarbageCollectorCleanedTotal = lm.FQDNGarbageCollectorCleanedTotal - FQDNActiveNames = lm.FQDNActiveNames - FQDNActiveIPs = lm.FQDNActiveIPs - FQDNAliveZombieConnections = lm.FQDNAliveZombieConnections - FQDNSemaphoreRejectedTotal = lm.FQDNSemaphoreRejectedTotal - IPCacheErrorsTotal = lm.IPCacheErrorsTotal - IPCacheEventsTotal = lm.IPCacheEventsTotal - BPFSyscallDuration = lm.BPFSyscallDuration - BPFMapOps = lm.BPFMapOps - BPFMapCapacity = lm.BPFMapCapacity - TriggerPolicyUpdateTotal = lm.TriggerPolicyUpdateTotal - TriggerPolicyUpdateFolds = lm.TriggerPolicyUpdateFolds - TriggerPolicyUpdateCallDuration = lm.TriggerPolicyUpdateCallDuration - VersionMetric = lm.VersionMetric - APILimiterWaitHistoryDuration = lm.APILimiterWaitHistoryDuration - APILimiterWaitDuration = lm.APILimiterWaitDuration - APILimiterProcessingDuration = lm.APILimiterProcessingDuration - APILimiterRequestsInFlight = lm.APILimiterRequestsInFlight - APILimiterRateLimit = lm.APILimiterRateLimit - APILimiterAdjustmentFactor = lm.APILimiterAdjustmentFactor - APILimiterProcessedRequests = lm.APILimiterProcessedRequests - - return lm -} - -// InitOperatorMetrics is used to init legacy metrics necessary during operator init. -func InitOperatorMetrics() { - ErrorsWarnings = newErrorsWarningsMetric() -} - -func newErrorsWarningsMetric() metric.Vec[metric.Counter] { - return metric.NewCounterVec(metric.CounterOpts{ - ConfigName: Namespace + "_errors_warnings_total", - Namespace: Namespace, - Name: "errors_warnings_total", - Help: "Number of total errors in cilium-agent instances", - }, []string{"level", "subsystem"}) -} - -// GaugeWithThreshold is a prometheus gauge that registers itself with -// prometheus if over a threshold value and unregisters when under. -type GaugeWithThreshold struct { - gauge prometheus.Gauge - threshold float64 - active bool -} - -// Set the value of the GaugeWithThreshold. -func (gwt *GaugeWithThreshold) Set(value float64) { - overThreshold := value > gwt.threshold - if gwt.active && !overThreshold { - gwt.active = !Unregister(gwt.gauge) - if gwt.active { - logrus.WithField("metric", gwt.gauge.Desc().String()).Warning("Failed to unregister metric") - } - } else if !gwt.active && overThreshold { - err := Register(gwt.gauge) - gwt.active = err == nil - if err != nil { - logrus.WithField("metric", gwt.gauge.Desc().String()).WithError(err).Warning("Failed to register metric") - } - } - - gwt.gauge.Set(value) -} - -// NewGaugeWithThreshold creates a new GaugeWithThreshold. -func NewGaugeWithThreshold(name string, subsystem string, desc string, labels map[string]string, threshold float64) *GaugeWithThreshold { - return &GaugeWithThreshold{ - gauge: prometheus.NewGauge(prometheus.GaugeOpts{ - Namespace: Namespace, - Subsystem: subsystem, - Name: name, - Help: desc, - ConstLabels: labels, - }), - threshold: threshold, - active: false, - } -} - -// NewBPFMapPressureGauge creates a new GaugeWithThreshold for the -// cilium_bpf_map_pressure metric with the map name as constant label. -func NewBPFMapPressureGauge(mapname string, threshold float64) *GaugeWithThreshold { - return NewGaugeWithThreshold( - "map_pressure", - SubsystemBPF, - "Fill percentage of map, tagged by map name", - map[string]string{ - LabelMapName: mapname, - }, - threshold, - ) -} - -func Reinitialize() { - reg, err := registry.Await(context.Background()) - if err == nil { - reg.Reinitialize() - } -} - -// Register registers a collector -func Register(c prometheus.Collector) error { - var err error - - withRegistry(func(reg *Registry) { - err = reg.Register(c) - }) - - return err -} - -// RegisterList registers a list of collectors. If registration of one -// collector fails, no collector is registered. -func RegisterList(list []prometheus.Collector) error { - withRegistry(func(reg *Registry) { - reg.RegisterList(list) - }) - - return nil -} - -// Unregister unregisters a collector -func Unregister(c prometheus.Collector) bool { - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - reg, err := registry.Await(ctx) - if err == nil { - return reg.Unregister(c) - } - - return false -} - -// DumpMetrics gets the current Cilium metrics and dumps all into a -// models.Metrics structure.If metrics cannot be retrieved, returns an error -func DumpMetrics() ([]*models.Metric, error) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - reg, err := registry.Await(ctx) - if err == nil { - return reg.DumpMetrics() - } - - return nil, nil -} - -// withRegistry waits up to 1 second for the registry promise to resolve, if it does not then -// we might be calling this function before hive has been started, so to avoid a deadlock, -// wait in a routine so actions are deferred until the registry is initialized. -func withRegistry(fn func(reg *Registry)) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - reg, err := registry.Await(ctx) - if err == nil { - fn(reg) - cancel() - return - } - cancel() - - go func() { - reg, err := registry.Await(context.Background()) - if err == nil { - fn(reg) - } - }() -} - -// GetCounterValue returns the current value -// stored for the counter -func GetCounterValue(m prometheus.Counter) float64 { - var pm dto.Metric - err := m.Write(&pm) - if err == nil && pm.Counter != nil && pm.Counter.Value != nil { - return *pm.Counter.Value - } - return 0 -} - -// GetGaugeValue returns the current value stored for the gauge. This function -// is useful in tests. -func GetGaugeValue(m prometheus.Gauge) float64 { - var pm dto.Metric - err := m.Write(&pm) - if err == nil && pm.Gauge != nil && pm.Gauge.Value != nil { - return *pm.Gauge.Value - } - return 0 -} - -// Error2Outcome converts an error to LabelOutcome -func Error2Outcome(err error) string { - if err != nil { - return LabelValueOutcomeFail - } - - return LabelValueOutcomeSuccess -} - -// LabelOutcome2Code converts a label outcome to a code -func LabelOutcome2Code(outcome string) int { - if outcome == LabelValueOutcomeSuccess { - return 200 - } - return 500 -} - -func BoolToFloat64(v bool) float64 { - if v { - return 1 - } - return 0 -} - -// In general, most bpf maps are allocated to occupy a 16-bit key size. -// To reduce the number of metrics that need to be emitted for map capacity, -// we assume a default map size of 2^16 entries for all maps, which can be -// assumed unless specified otherwise. -const DefaultMapCapacity = 65536 - -func UpdateMapCapacity(groupName string, capacity uint32) { - if capacity == 0 || capacity == DefaultMapCapacity { - return - } - BPFMapCapacity.WithLabelValues(groupName).Set(float64(capacity)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/metrics_unix.go b/vendor/github.com/cilium/cilium/pkg/metrics/metrics_unix.go deleted file mode 100644 index 184d3baa719..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/metrics_unix.go +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build !windows - -package metrics - -import ( - "golang.org/x/sys/unix" - - "github.com/cilium/cilium/pkg/datapath/linux/probes" -) - -// Errno2Outcome converts a unix.Errno to LabelOutcome -func Errno2Outcome(errno unix.Errno) string { - if errno != 0 { - return LabelValueOutcomeFail - } - - return LabelValueOutcomeSuccess -} - -func enableIfIndexMetric() bool { - // On kernels which do not provide ifindex via the FIB, Cilium needs - // to store it in the CT map, with a field limit of max(uint16). - // The EndpointMaxIfindex metric can be used to determine if that - // limit is approaching. However, it should only be enabled by - // default if we observe that the FIB is not providing the ifindex. - return probes.HaveFibIfindex() != nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/metrics_windows.go b/vendor/github.com/cilium/cilium/pkg/metrics/metrics_windows.go deleted file mode 100644 index dc4333ab32f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/metrics_windows.go +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -func enableIfIndexMetric() bool { - return false -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/middleware.go b/vendor/github.com/cilium/cilium/pkg/metrics/middleware.go deleted file mode 100644 index be13472a1a0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/middleware.go +++ /dev/null @@ -1,68 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -import ( - "net/http" - "strconv" - "strings" - - "github.com/cilium/cilium/pkg/metrics/metric" - "github.com/cilium/cilium/pkg/spanstat" -) - -// APIEventTSHelper is intended to be a global middleware to track metrics -// around API calls. -// It records the timestamp of an API call in the provided gauge. -type APIEventTSHelper struct { - Next http.Handler - TSGauge metric.Vec[metric.Gauge] - Histogram metric.Vec[metric.Observer] -} - -type ResponderWrapper struct { - http.ResponseWriter - code int -} - -func (rw *ResponderWrapper) WriteHeader(code int) { - rw.code = code - rw.ResponseWriter.WriteHeader(code) -} - -// getShortPath returns the API path trimmed after the 3rd slash. -// examples: -// -// "/v1/config" -> "/v1/config" -// "/v1/endpoint/cilium-local:0" -> "/v1/endpoint" -// "/v1/endpoint/container-id:597.." -> "/v1/endpoint" -func getShortPath(s string) string { - var idxSum int - for nThSlash := 0; nThSlash < 3; nThSlash++ { - idx := strings.IndexByte(s[idxSum:], '/') - if idx == -1 { - return s - } - idxSum += idx + 1 - } - return s[:idxSum-1] -} - -// ServeHTTP implements the http.Handler interface. It records the timestamp -// this API call began at, then chains to the next handler. -func (m *APIEventTSHelper) ServeHTTP(r http.ResponseWriter, req *http.Request) { - reqOk := req != nil && req.URL != nil && req.URL.Path != "" - var path string - if reqOk { - path = getShortPath(req.URL.Path) - m.TSGauge.WithLabelValues(LabelEventSourceAPI, path, req.Method).SetToCurrentTime() - } - duration := spanstat.Start() - rw := &ResponderWrapper{ResponseWriter: r} - m.Next.ServeHTTP(rw, req) - if reqOk { - took := float64(duration.End(true).Total().Seconds()) - m.Histogram.WithLabelValues(path, req.Method, strconv.Itoa(rw.code)).Observe(took) - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/registry.go b/vendor/github.com/cilium/cilium/pkg/metrics/registry.go deleted file mode 100644 index c6a820f168b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/registry.go +++ /dev/null @@ -1,249 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -import ( - "errors" - "net/http" - "regexp" - "strings" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/hive" - "github.com/cilium/cilium/pkg/hive/cell" - metricpkg "github.com/cilium/cilium/pkg/metrics/metric" - "github.com/cilium/cilium/pkg/option" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/collectors" - "github.com/prometheus/client_golang/prometheus/promhttp" - dto "github.com/prometheus/client_model/go" - "github.com/sirupsen/logrus" - "github.com/spf13/pflag" -) - -var defaultRegistryConfig = RegistryConfig{ - PrometheusServeAddr: "", -} - -type RegistryConfig struct { - // PrometheusServeAddr IP:Port on which to serve prometheus metrics (pass ":Port" to bind on all interfaces, "" is off) - PrometheusServeAddr string - // This is a list of metrics to be enabled or disabled, format is `+`/`-` + `{metric name}` - Metrics []string -} - -func (rc RegistryConfig) Flags(flags *pflag.FlagSet) { - flags.String("prometheus-serve-addr", rc.PrometheusServeAddr, "IP:Port on which to serve prometheus metrics (pass \":Port\" to bind on all interfaces, \"\" is off)") - flags.StringSlice("metrics", rc.Metrics, "Metrics that should be enabled or disabled from the default metric list. (+metric_foo to enable metric_foo, -metric_bar to disable metric_bar)") -} - -// RegistryParams are the parameters needed to construct a Registry -type RegistryParams struct { - cell.In - - Logger logrus.FieldLogger - Shutdowner hive.Shutdowner - Lifecycle cell.Lifecycle - - AutoMetrics []metricpkg.WithMetadata `group:"hive-metrics"` - Config RegistryConfig - - DaemonConfig *option.DaemonConfig -} - -// Registry is a cell around a prometheus registry. This registry starts an HTTP server as part of its lifecycle -// on which all enabled metrics will be available. A reference to this registry can also be used to dynamically -// register or unregister `prometheus.Collector`s. -type Registry struct { - inner *prometheus.Registry - - params RegistryParams -} - -func NewRegistry(params RegistryParams) *Registry { - reg := &Registry{ - params: params, - } - - reg.Reinitialize() - - // Resolve the global registry variable for as long as we still have global functions - registryResolver.Resolve(reg) - - if params.Config.PrometheusServeAddr != "" { - // The Handler function provides a default handler to expose metrics - // via an HTTP server. "/metrics" is the usual endpoint for that. - mux := http.NewServeMux() - mux.Handle("/metrics", promhttp.HandlerFor(reg.inner, promhttp.HandlerOpts{})) - srv := http.Server{ - Addr: params.Config.PrometheusServeAddr, - Handler: mux, - } - - params.Lifecycle.Append(cell.Hook{ - OnStart: func(hc cell.HookContext) error { - go func() { - params.Logger.Infof("Serving prometheus metrics on %s", params.Config.PrometheusServeAddr) - err := srv.ListenAndServe() - if err != nil && !errors.Is(err, http.ErrServerClosed) { - params.Shutdowner.Shutdown(hive.ShutdownWithError(err)) - } - }() - return nil - }, - OnStop: func(hc cell.HookContext) error { - return srv.Shutdown(hc) - }, - }) - } - - return reg -} - -// Register registers a collector -func (r *Registry) Register(c prometheus.Collector) error { - return r.inner.Register(c) -} - -// Unregister unregisters a collector -func (r *Registry) Unregister(c prometheus.Collector) bool { - return r.inner.Unregister(c) -} - -// goCustomCollectorsRX tracks enabled go runtime metrics. -var goCustomCollectorsRX = regexp.MustCompile(`^/sched/latencies:seconds`) - -// Reinitialize creates a new internal registry and re-registers metrics to it. -func (r *Registry) Reinitialize() { - r.inner = prometheus.NewPedanticRegistry() - - // Default metrics which can't be disabled. - r.MustRegister(collectors.NewProcessCollector(collectors.ProcessCollectorOpts{Namespace: Namespace})) - r.MustRegister(collectors.NewGoCollector( - collectors.WithGoCollectorRuntimeMetrics( - collectors.GoRuntimeMetricsRule{Matcher: goCustomCollectorsRX}, - ))) - r.MustRegister(newStatusCollector()) - r.MustRegister(newbpfCollector()) - - metrics := make(map[string]metricpkg.WithMetadata) - for i, autoMetric := range r.params.AutoMetrics { - metrics[autoMetric.Opts().GetConfigName()] = r.params.AutoMetrics[i] - } - - // This is a bodge for a very specific feature, inherited from the old `Daemon.additionalMetrics`. - // We should really find a more generic way to handle such cases. - metricFlags := r.params.Config.Metrics - if r.params.DaemonConfig.DNSProxyConcurrencyLimit > 0 { - metricFlags = append(metricFlags, "+"+Namespace+"_"+SubsystemFQDN+"_semaphore_rejected_total") - } - - for _, metricFlag := range metricFlags { - metricFlag = strings.TrimSpace(metricFlag) - - // This is a temporary hack which allows us to get rid of the centralized metric config without refactoring the - // dynamic map pressure registration/unregistion mechanism. - // Long term the map pressure metric becomes a smarter component so this is no longer needed. - if metricFlag[1:] == "-"+Namespace+"_"+SubsystemBPF+"_map_pressure" { - BPFMapPressure = false - continue - } - - metric := metrics[metricFlag[1:]] - if metric == nil { - continue - } - - switch metricFlag[0] { - case '+': - metric.SetEnabled(true) - case '-': - metric.SetEnabled(false) - default: - r.params.Logger.Warning( - "--metrics flag contains value which does not start with + or -, '%s', ignoring", - metricFlag, - ) - } - } - - for _, m := range metrics { - if c, ok := m.(prometheus.Collector); ok { - r.MustRegister(c) - } - } -} - -// MustRegister adds the collector to the registry, exposing this metric to -// prometheus scrapes. -// It will panic on error. -func (r *Registry) MustRegister(c ...prometheus.Collector) { - r.inner.MustRegister(c...) -} - -// RegisterList registers a list of collectors. If registration of one -// collector fails, no collector is registered. -func (r *Registry) RegisterList(list []prometheus.Collector) error { - registered := []prometheus.Collector{} - - for _, c := range list { - if err := r.Register(c); err != nil { - for _, c := range registered { - r.Unregister(c) - } - return err - } - - registered = append(registered, c) - } - - return nil -} - -// DumpMetrics gets the current Cilium metrics and dumps all into a -// models.Metrics structure.If metrics cannot be retrieved, returns an error -func (r *Registry) DumpMetrics() ([]*models.Metric, error) { - result := []*models.Metric{} - currentMetrics, err := r.inner.Gather() - if err != nil { - return result, err - } - - for _, val := range currentMetrics { - metricName := val.GetName() - metricType := val.GetType() - - for _, metricLabel := range val.Metric { - labels := map[string]string{} - for _, label := range metricLabel.GetLabel() { - labels[label.GetName()] = label.GetValue() - } - - var value float64 - switch metricType { - case dto.MetricType_COUNTER: - value = metricLabel.Counter.GetValue() - case dto.MetricType_GAUGE: - value = metricLabel.GetGauge().GetValue() - case dto.MetricType_UNTYPED: - value = metricLabel.GetUntyped().GetValue() - case dto.MetricType_SUMMARY: - value = metricLabel.GetSummary().GetSampleSum() - case dto.MetricType_HISTOGRAM: - value = metricLabel.GetHistogram().GetSampleSum() - default: - continue - } - - metric := &models.Metric{ - Name: metricName, - Labels: labels, - Value: value, - } - result = append(result, metric) - } - } - return result, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/metrics/status.go b/vendor/github.com/cilium/cilium/pkg/metrics/status.go deleted file mode 100644 index 98c4c9d9e0b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/metrics/status.go +++ /dev/null @@ -1,162 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -import ( - "github.com/prometheus/client_golang/prometheus" - "github.com/sirupsen/logrus" - - clientPkg "github.com/cilium/cilium/pkg/client" - healthClientPkg "github.com/cilium/cilium/pkg/health/client" -) - -type statusCollector struct { - daemonHealthGetter daemonHealthGetter - connectivityStatusGetter connectivityStatusGetter - - controllersFailingDesc *prometheus.Desc - ipAddressesDesc *prometheus.Desc - unreachableNodesDesc *prometheus.Desc - unreachableHealthEndpointsDesc *prometheus.Desc -} - -func newStatusCollector() *statusCollector { - ciliumClient, err := clientPkg.NewClient("") - if err != nil { - logrus.WithError(err).Fatal("Error while creating Cilium API client") - } - - healthClient, err := healthClientPkg.NewClient("") - if err != nil { - logrus.WithError(err).Fatal("Error while creating cilium-health API client") - } - - return newStatusCollectorWithClients(ciliumClient.Daemon, healthClient.Connectivity) -} - -// newStatusCollectorWithClients provides a constructor with injected clients -func newStatusCollectorWithClients(d daemonHealthGetter, c connectivityStatusGetter) *statusCollector { - return &statusCollector{ - daemonHealthGetter: d, - connectivityStatusGetter: c, - controllersFailingDesc: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, "", "controllers_failing"), - "Number of failing controllers", - nil, nil, - ), - ipAddressesDesc: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, "", "ip_addresses"), - "Number of allocated IP addresses", - []string{"family"}, nil, - ), - unreachableNodesDesc: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, "", "unreachable_nodes"), - "Number of nodes that cannot be reached", - nil, nil, - ), - unreachableHealthEndpointsDesc: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, "", "unreachable_health_endpoints"), - "Number of health endpoints that cannot be reached", - nil, nil, - ), - } -} - -func (s *statusCollector) Describe(ch chan<- *prometheus.Desc) { - ch <- s.controllersFailingDesc - ch <- s.ipAddressesDesc - ch <- s.unreachableNodesDesc - ch <- s.unreachableHealthEndpointsDesc -} - -func (s *statusCollector) Collect(ch chan<- prometheus.Metric) { - statusResponse, err := s.daemonHealthGetter.GetHealthz(nil) - if err != nil { - logrus.WithError(err).Error("Error while getting Cilium status") - return - } - - if statusResponse.Payload == nil { - return - } - - // Controllers failing - controllersFailing := 0 - - for _, ctrl := range statusResponse.Payload.Controllers { - if ctrl.Status == nil { - continue - } - if ctrl.Status.ConsecutiveFailureCount > 0 { - controllersFailing++ - } - } - - ch <- prometheus.MustNewConstMetric( - s.controllersFailingDesc, - prometheus.GaugeValue, - float64(controllersFailing), - ) - - if statusResponse.Payload.Ipam != nil { - // Address count - ch <- prometheus.MustNewConstMetric( - s.ipAddressesDesc, - prometheus.GaugeValue, - float64(len(statusResponse.Payload.Ipam.IPV4)), - "ipv4", - ) - - ch <- prometheus.MustNewConstMetric( - s.ipAddressesDesc, - prometheus.GaugeValue, - float64(len(statusResponse.Payload.Ipam.IPV6)), - "ipv6", - ) - } - - healthStatusResponse, err := s.connectivityStatusGetter.GetStatus(nil) - if err != nil { - logrus.WithError(err).Error("Error while getting cilium-health status") - return - } - - if healthStatusResponse.Payload == nil { - return - } - - // Nodes and endpoints healthStatusResponse - var ( - unreachableNodes int - unreachableEndpoints int - ) - - for _, nodeStatus := range healthStatusResponse.Payload.Nodes { - for _, addr := range healthClientPkg.GetAllHostAddresses(nodeStatus) { - if healthClientPkg.GetPathConnectivityStatusType(addr) == healthClientPkg.ConnStatusUnreachable { - unreachableNodes++ - break - } - } - - for _, addr := range healthClientPkg.GetAllEndpointAddresses(nodeStatus) { - if healthClientPkg.GetPathConnectivityStatusType(addr) == healthClientPkg.ConnStatusUnreachable { - unreachableEndpoints++ - break - } - } - } - - ch <- prometheus.MustNewConstMetric( - s.unreachableNodesDesc, - prometheus.GaugeValue, - float64(unreachableNodes), - ) - - ch <- prometheus.MustNewConstMetric( - s.unreachableHealthEndpointsDesc, - prometheus.GaugeValue, - float64(unreachableEndpoints), - ) -} diff --git a/vendor/github.com/cilium/cilium/pkg/monitor/api/drop.go b/vendor/github.com/cilium/cilium/pkg/monitor/api/drop.go index 7d39d5e7556..6c895e53a44 100644 --- a/vendor/github.com/cilium/cilium/pkg/monitor/api/drop.go +++ b/vendor/github.com/cilium/cilium/pkg/monitor/api/drop.go @@ -101,7 +101,7 @@ var errors = map[uint8]string{ 203: "Endpoint policy program not available", } -func extendedReason(reason uint8, extError int8) string { +func extendedReason(extError int8) string { if extError == int8(0) { return "" } @@ -110,7 +110,7 @@ func extendedReason(reason uint8, extError int8) string { func DropReasonExt(reason uint8, extError int8) string { if err, ok := errors[reason]; ok { - if ext := extendedReason(reason, extError); ext == "" { + if ext := extendedReason(extError); ext == "" { return err } else { return err + ", " + ext diff --git a/vendor/github.com/cilium/cilium/pkg/monitor/api/files.go b/vendor/github.com/cilium/cilium/pkg/monitor/api/files.go new file mode 100644 index 00000000000..a2b4f460a49 --- /dev/null +++ b/vendor/github.com/cilium/cilium/pkg/monitor/api/files.go @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Cilium + +package api + +import "fmt" + +// Keep in sync with __source_file_name_to_id in bpf/source_names_to_ids.h. +var files = map[uint8]string{ + // @@ source files list begin + + // source files from bpf/ + 1: "bpf_host.c", + 2: "bpf_lxc.c", + 3: "bpf_overlay.c", + 4: "bpf_xdp.c", + 5: "bpf_sock.c", + 6: "bpf_network.c", + 7: "bpf_wireguard.c", + + // header files from bpf/lib/ + 101: "arp.h", + 102: "drop.h", + 103: "srv6.h", + 104: "icmp6.h", + 105: "nodeport.h", + 106: "lb.h", + 107: "mcast.h", + 108: "ipv4.h", + 109: "conntrack.h", + 110: "l3.h", + 111: "trace.h", + 112: "encap.h", + 113: "encrypt.h", + + // @@ source files list end +} + +// BPFFileName returns the file name for the given BPF file id. +func BPFFileName(id uint8) string { + if name, ok := files[id]; ok { + return name + } + return fmt.Sprintf("unknown(%d)", id) +} diff --git a/vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo.go b/vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo.go deleted file mode 100644 index 54f509054c2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo.go +++ /dev/null @@ -1,115 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package mountinfo - -import ( - "bufio" - "fmt" - "io" - "os" - "strconv" - "strings" -) - -const ( - mountInfoFilepath = "/proc/self/mountinfo" -) - -// MountInfo is a struct representing information from /proc/pid/mountinfo. More -// information about file syntax: -// https://www.kernel.org/doc/Documentation/filesystems/proc.txt -type MountInfo struct { - MountID int64 - ParentID int64 - StDev string - Root string - MountPoint string - MountOptions string - OptionalFields []string - FilesystemType string - MountSource string - SuperOptions string -} - -// parseMountInfoFile returns a slice of *MountInfo with information parsed from -// the given reader -func parseMountInfoFile(r io.Reader) ([]*MountInfo, error) { - var result []*MountInfo - - scanner := bufio.NewScanner(r) - scanner.Split(bufio.ScanLines) - - for scanner.Scan() { - mountInfoRaw := scanner.Text() - - // Optional fields (which are on the 7th position) are separated - // from the rest of fields by "-" character. The number of - // optional fields can be greater or equal to 1. - mountInfoSeparated := strings.Split(mountInfoRaw, " - ") - if len(mountInfoSeparated) != 2 { - return nil, fmt.Errorf("invalid mountinfo entry which has more that one '-' separator: %s", mountInfoRaw) - } - - // Extract fields from both sides of mountinfo - mountInfoLeft := strings.Split(mountInfoSeparated[0], " ") - mountInfoRight := strings.Split(mountInfoSeparated[1], " ") - - // Before '-' separator there should be 6 fields and unknown - // number of optional fields - if len(mountInfoLeft) < 6 { - return nil, fmt.Errorf("invalid mountinfo entry: %s", mountInfoRaw) - } - // After '-' separator there should be 3 fields - if len(mountInfoRight) != 3 { - return nil, fmt.Errorf("invalid mountinfo entry: %s", mountInfoRaw) - } - - mountID, err := strconv.ParseInt(mountInfoLeft[0], 10, 64) - if err != nil { - return nil, err - } - - parentID, err := strconv.ParseInt(mountInfoLeft[1], 10, 64) - if err != nil { - return nil, err - } - - // Extract optional fields, which start from 7th position - var optionalFields []string - for i := 6; i < len(mountInfoLeft); i++ { - optionalFields = append(optionalFields, mountInfoLeft[i]) - } - - result = append(result, &MountInfo{ - MountID: mountID, - ParentID: parentID, - StDev: mountInfoLeft[2], - Root: mountInfoLeft[3], - MountPoint: mountInfoLeft[4], - MountOptions: mountInfoLeft[5], - OptionalFields: optionalFields, - FilesystemType: mountInfoRight[0], - MountSource: mountInfoRight[1], - SuperOptions: mountInfoRight[2], - }) - } - - if err := scanner.Err(); err != nil { - return nil, err - } - - return result, nil -} - -// GetMountInfo returns a slice of *MountInfo with information parsed from -// /proc/self/mountinfo -func GetMountInfo() ([]*MountInfo, error) { - fMounts, err := os.Open(mountInfoFilepath) - if err != nil { - return nil, fmt.Errorf("failed to open mount information at %s: %w", mountInfoFilepath, err) - } - defer fMounts.Close() - - return parseMountInfoFile(fMounts) -} diff --git a/vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo_linux.go b/vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo_linux.go deleted file mode 100644 index 638b9e4465f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo_linux.go +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package mountinfo - -import ( - "errors" - "os" - "path/filepath" - - "golang.org/x/sys/unix" -) - -const ( - // FilesystemType superblock magic numbers for filesystems, - // to be used for IsMountFS. - FilesystemTypeBPFFS = unix.BPF_FS_MAGIC - FilesystemTypeCgroup2 = unix.CGROUP2_SUPER_MAGIC -) - -// IsMountFS returns two boolean values, checking -// - whether the path is a mount point; -// - if yes, whether its filesystem type is mntType. -// -// Note that this function can not detect bind mounts, -// and is not working properly when path="/". -func IsMountFS(mntType int64, path string) (bool, bool, error) { - var st, pst unix.Stat_t - - err := unix.Lstat(path, &st) - if err != nil { - if errors.Is(err, unix.ENOENT) { - // non-existent path can't be a mount point - return false, false, nil - } - return false, false, &os.PathError{Op: "lstat", Path: path, Err: err} - } - - parent := filepath.Dir(path) - err = unix.Lstat(parent, &pst) - if err != nil { - return false, false, &os.PathError{Op: "lstat", Path: parent, Err: err} - } - if st.Dev == pst.Dev { - // parent has the same dev -- not a mount point - return false, false, nil - } - - // Check the fstype - fst := unix.Statfs_t{} - err = unix.Statfs(path, &fst) - if err != nil { - return true, false, &os.PathError{Op: "statfs", Path: path, Err: err} - } - - return true, int64(fst.Type) == mntType, nil - -} diff --git a/vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo_unspecified.go b/vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo_unspecified.go deleted file mode 100644 index a00a96a1dfd..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/mountinfo/mountinfo_unspecified.go +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build !linux - -package mountinfo - -import "errors" - -const ( - // Dummy FilesystemType superblock magic numbers for filesystems, - // to be used for IsMountFS. - FilesystemTypeBPFFS = 0 -) - -// IsMountFS returns two boolean values, checking -// - whether the path is a mount point; -// - if yes, whether its filesystem type is mntType. -// -// Note that this function can not detect bind mounts, -// and is not working properly when path="/". -func IsMountFS(mntType int64, path string) (bool, bool, error) { - return false, false, errors.New("not implemented") -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/address.go b/vendor/github.com/cilium/cilium/pkg/node/address.go deleted file mode 100644 index b61f12634dd..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/address.go +++ /dev/null @@ -1,631 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package node - -import ( - "bufio" - "context" - "fmt" - "net" - "os" - "strconv" - "strings" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/byteorder" - "github.com/cilium/cilium/pkg/cidr" - "github.com/cilium/cilium/pkg/common" - "github.com/cilium/cilium/pkg/defaults" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/option" - wgTypes "github.com/cilium/cilium/pkg/wireguard/types" -) - -const preferPublicIP bool = true - -var ( - // addrsMu protects addrs. Outside the addresses struct - // so that we can Uninitialize() without linter complaining - // about lock copying. - addrsMu lock.RWMutex - addrs addresses - - // localNode holds the current state of the local "types.Node". - // This is defined here until all uses of the getters and - // setters in this file have been migrated to use LocalNodeStore - // directly. - // Initialized to proper instance via an invoke function in LocalNodeStoreCell, - // or temporarily in tests with 'WithTestLocalNodeStore'. - localNode *LocalNodeStore -) - -func getLocalNode() LocalNode { - n, err := localNode.Get(context.TODO()) - if err != nil { - // Only expecting errors if we're called after LocalNodeStore has stopped, e.g. - // we have a component that uses the legacy getters and setters here and does - // not depend on LocalNodeStore. - log.WithError(err).Fatal("getLocalNode: unexpected error") - } - return n -} - -type addresses struct { - ipv4Loopback net.IP - ipv4MasqAddrs map[string]net.IP // iface name => ip addr - ipv6MasqAddrs map[string]net.IP // iface name => ip addr - routerInfo RouterInfo -} - -type RouterInfo interface { - GetIPv4CIDRs() []net.IPNet -} - -func makeIPv6HostIP() net.IP { - ipstr := "fc00::10CA:1" - ip := net.ParseIP(ipstr) - if ip == nil { - log.WithField(logfields.IPAddr, ipstr).Fatal("Unable to parse IP") - } - - return ip -} - -// InitDefaultPrefix initializes the node address and allocation prefixes with -// default values derived from the system. device can be set to the primary -// network device of the system in which case the first address with global -// scope will be regarded as the system's node address. -func InitDefaultPrefix(device string) { - localNode.Update(func(n *LocalNode) { - SetDefaultPrefix(option.Config, device, n) - }) -} - -func SetDefaultPrefix(cfg *option.DaemonConfig, device string, node *LocalNode) { - if cfg.EnableIPv4 { - isIPv6 := false - - ip, err := firstGlobalV4Addr(device, node.GetCiliumInternalIP(isIPv6), preferPublicIP) - if err != nil { - return - } - - if node.GetNodeIP(isIPv6) == nil { - node.SetNodeInternalIP(ip) - } - - ipv4range := node.IPv4AllocCIDR - ipv6range := node.IPv6AllocCIDR - - if ipv4range == nil { - // If the IPv6AllocRange is not nil then the IPv4 allocation should be - // derived from the IPv6AllocRange. - // vvvv vvvv - // FD00:0000:0000:0000:0000:0000:0000:0000 - if ipv6range != nil { - ip = net.IPv4( - ipv6range.IP[8], - ipv6range.IP[9], - ipv6range.IP[10], - ipv6range.IP[11]) - } - v4range := fmt.Sprintf(defaults.DefaultIPv4Prefix+"/%d", - ip.To4()[3], defaults.DefaultIPv4PrefixLen) - _, ip4net, err := net.ParseCIDR(v4range) - if err != nil { - log.WithError(err).WithField(logfields.V4Prefix, v4range).Panic("BUG: Invalid default IPv4 prefix") - } - - node.IPv4AllocCIDR = cidr.NewCIDR(ip4net) - log.WithField(logfields.V4Prefix, node.IPv4AllocCIDR).Info("Using autogenerated IPv4 allocation range") - } - } - - if cfg.EnableIPv6 { - isIPv6 := true - ipv4range := node.IPv4AllocCIDR - ipv6range := node.IPv6AllocCIDR - - if node.GetNodeIP(isIPv6) == nil { - // Find a IPv6 node address first - addr, _ := firstGlobalV6Addr(device, node.GetCiliumInternalIP(isIPv6), preferPublicIP) - if addr == nil { - addr = makeIPv6HostIP() - } - node.SetNodeInternalIP(addr) - } - - if ipv6range == nil && ipv4range != nil { - // The IPv6 allocation should be derived from the IPv4 allocation. - ip := ipv4range.IP - v6range := fmt.Sprintf("%s%02x%02x:%02x%02x:0:0/%d", - cfg.IPv6ClusterAllocCIDRBase, ip[0], ip[1], ip[2], ip[3], 96) - - _, ip6net, err := net.ParseCIDR(v6range) - if err != nil { - log.WithError(err).WithField(logfields.V6Prefix, v6range).Panic("BUG: Invalid default IPv6 prefix") - } - - node.IPv6AllocCIDR = cidr.NewCIDR(ip6net) - log.WithField(logfields.V6Prefix, node.IPv6AllocCIDR).Info("Using autogenerated IPv6 allocation range") - } - } -} - -// InitBPFMasqueradeAddrs initializes BPF masquerade addrs for the given devices. -func InitBPFMasqueradeAddrs(devices []string) error { - addrsMu.Lock() - defer addrsMu.Unlock() - - masqIPFromDevice := option.Config.DeriveMasqIPAddrFromDevice - - if option.Config.EnableIPv4 { - addrs.ipv4MasqAddrs = make(map[string]net.IP, len(devices)) - err := initMasqueradeV4Addrs(addrs.ipv4MasqAddrs, masqIPFromDevice, devices, logfields.IPv4) - if err != nil { - return err - } - } - if option.Config.EnableIPv6 { - addrs.ipv6MasqAddrs = make(map[string]net.IP, len(devices)) - return initMasqueradeV6Addrs(addrs.ipv6MasqAddrs, masqIPFromDevice, devices, logfields.IPv6) - } - - return nil -} - -func clone(ip net.IP) net.IP { - if ip == nil { - return nil - } - dup := make(net.IP, len(ip)) - copy(dup, ip) - return dup -} - -// GetIPv4Loopback returns the loopback IPv4 address of this node. -func GetIPv4Loopback() net.IP { - addrsMu.RLock() - defer addrsMu.RUnlock() - return clone(addrs.ipv4Loopback) -} - -// SetIPv4Loopback sets the loopback IPv4 address of this node. -func SetIPv4Loopback(ip net.IP) { - addrsMu.Lock() - addrs.ipv4Loopback = clone(ip) - addrsMu.Unlock() -} - -// GetIPv4AllocRange returns the IPv4 allocation prefix of this node -func GetIPv4AllocRange() *cidr.CIDR { - return getLocalNode().IPv4AllocCIDR.DeepCopy() -} - -// GetIPv6AllocRange returns the IPv6 allocation prefix of this node -func GetIPv6AllocRange() *cidr.CIDR { - return getLocalNode().IPv6AllocCIDR.DeepCopy() -} - -// GetIPv4 returns one of the IPv4 node address available with the following -// priority: -// - NodeInternalIP -// - NodeExternalIP -// - other IP address type. -// It must be reachable on the network. -func GetIPv4() net.IP { - n := getLocalNode() - return clone(n.GetNodeIP(false)) -} - -// GetInternalIPv4 returns node internal ipv4 address else return nil. -func GetInternalIPv4() net.IP { - n := getLocalNode() - return clone(n.GetNodeInternalIPv4()) -} - -// GetInternalIPv6 returns node internal ipv6 address else return nil. -func GetInternalIPv6() net.IP { - n := getLocalNode() - return clone(n.GetNodeInternalIPv6()) -} - -// GetCiliumEndpointNodeIP is the node IP that will be referenced by CiliumEndpoints with endpoints -// running on this node. -func GetCiliumEndpointNodeIP() string { - if option.Config.EnableIPv4 { - return GetIPv4().String() - } - return GetIPv6().String() -} - -// SetInternalIPv4Router sets the cilium internal IPv4 node address, it is allocated from the node prefix. -// This must not be conflated with k8s internal IP as this IP address is only relevant within the -// Cilium-managed network (this means within the node for direct routing mode and on the overlay -// for tunnel mode). -func SetInternalIPv4Router(ip net.IP) { - localNode.Update(func(n *LocalNode) { - n.SetCiliumInternalIP(ip) - }) -} - -// GetInternalIPv4Router returns the cilium internal IPv4 node address. This must not be conflated with -// k8s internal IP as this IP address is only relevant within the Cilium-managed network (this means -// within the node for direct routing mode and on the overlay for tunnel mode). -func GetInternalIPv4Router() net.IP { - n := getLocalNode() - return n.GetCiliumInternalIP(false) -} - -// GetK8sExternalIPv4 returns the external IPv4 node address. It must be a public IP that is routable -// on the network as well as the internet. It can return nil if no External IPv4 address is assigned. -func GetK8sExternalIPv4() net.IP { - n := getLocalNode() - return n.GetExternalIP(false) -} - -// GetRouterInfo returns additional information for the router, the cilium_host interface. -func GetRouterInfo() RouterInfo { - addrsMu.RLock() - defer addrsMu.RUnlock() - return addrs.routerInfo -} - -// SetRouterInfo sets additional information for the router, the cilium_host interface. -func SetRouterInfo(info RouterInfo) { - addrsMu.Lock() - addrs.routerInfo = info - addrsMu.Unlock() -} - -// GetHostMasqueradeIPv4 returns the IPv4 address to be used for masquerading -// any traffic that is being forwarded from the host into the Cilium cluster. -func GetHostMasqueradeIPv4() net.IP { - return GetInternalIPv4Router() -} - -// SetIPv4AllocRange sets the IPv4 address pool to use when allocating -// addresses for local endpoints -func SetIPv4AllocRange(net *cidr.CIDR) { - localNode.Update(func(n *LocalNode) { - n.IPv4AllocCIDR = net - }) -} - -// GetMasqIPv4AddrsWithDevices returns the map iface => BPF masquerade IPv4. -func GetMasqIPv4AddrsWithDevices() map[string]net.IP { - addrsMu.RLock() - defer addrsMu.RUnlock() - return copyStringToNetIPMap(addrs.ipv4MasqAddrs) -} - -// GetMasqIPv6AddrsWithDevices returns the map iface => BPF masquerade IPv6. -func GetMasqIPv6AddrsWithDevices() map[string]net.IP { - addrsMu.RLock() - defer addrsMu.RUnlock() - return copyStringToNetIPMap(addrs.ipv6MasqAddrs) -} - -// SetIPv6NodeRange sets the IPv6 address pool to be used on this node -func SetIPv6NodeRange(net *cidr.CIDR) { - localNode.Update(func(n *LocalNode) { - n.IPv6AllocCIDR = net - }) -} - -// AutoComplete completes the parts of addressing that can be auto derived -func AutoComplete() error { - InitDefaultPrefix(option.Config.DirectRoutingDevice) - - if option.Config.EnableIPv6 && GetIPv6AllocRange() == nil { - return fmt.Errorf("IPv6 allocation CIDR is not configured. Please specify --%s", option.IPv6Range) - } - - if option.Config.EnableIPv4 && GetIPv4AllocRange() == nil { - return fmt.Errorf("IPv4 allocation CIDR is not configured. Please specify --%s", option.IPv4Range) - } - - return nil -} - -// ValidatePostInit validates the entire addressing setup and completes it as -// required -func ValidatePostInit() error { - if option.Config.EnableIPv4 || option.Config.TunnelingEnabled() { - if GetIPv4() == nil { - return fmt.Errorf("external IPv4 node address could not be derived, please configure via --ipv4-node") - } - } - - if option.Config.EnableIPv4 && GetInternalIPv4Router() == nil { - return fmt.Errorf("BUG: Internal IPv4 node address was not configured") - } - - return nil -} - -// GetIPv6 returns the IPv6 address of the node -func GetIPv6() net.IP { - n := getLocalNode() - return clone(n.GetNodeIP(true)) -} - -// GetHostMasqueradeIPv6 returns the IPv6 address to be used for masquerading -// any traffic that is being forwarded from the host into the Cilium cluster. -func GetHostMasqueradeIPv6() net.IP { - return GetIPv6Router() -} - -// GetIPv6Router returns the IPv6 address of the router, e.g. address -// of cilium_host device. -func GetIPv6Router() net.IP { - n := getLocalNode() - return clone(n.GetCiliumInternalIP(true)) -} - -// SetIPv6Router sets the IPv6 address of the router address, e.g. address -// of cilium_host device. -func SetIPv6Router(ip net.IP) { - localNode.Update(func(n *LocalNode) { - n.SetCiliumInternalIP(ip) - }) -} - -// GetK8sExternalIPv6 returns the external IPv6 node address. -func GetK8sExternalIPv6() net.IP { - n := getLocalNode() - return clone(n.GetExternalIP(false)) -} - -// GetNodeAddressing returns the NodeAddressing model for the local IPs. -func GetNodeAddressing() *models.NodeAddressing { - a := &models.NodeAddressing{} - - if option.Config.EnableIPv6 { - a.IPV6 = &models.NodeAddressingElement{ - Enabled: option.Config.EnableIPv6, - IP: GetIPv6Router().String(), - AllocRange: GetIPv6AllocRange().String(), - } - } - - if option.Config.EnableIPv4 { - a.IPV4 = &models.NodeAddressingElement{ - Enabled: option.Config.EnableIPv4, - IP: GetInternalIPv4Router().String(), - AllocRange: GetIPv4AllocRange().String(), - } - } - - return a -} - -func getCiliumHostIPsFromFile(nodeConfig string) (ipv4GW, ipv6Router net.IP) { - // ipLen is the length of the IP address stored in the node_config.h - // it has the same length for both IPv4 and IPv6. - const ipLen = net.IPv6len - - var hasIPv4, hasIPv6 bool - f, err := os.Open(nodeConfig) - switch { - case err != nil: - default: - defer f.Close() - scanner := bufio.NewScanner(f) - for scanner.Scan() { - txt := scanner.Text() - switch { - case !hasIPv6 && strings.Contains(txt, defaults.RestoreV6Addr): - defineLine := strings.Split(txt, defaults.RestoreV6Addr) - if len(defineLine) != 2 { - continue - } - ipv6 := common.C2GoArray(defineLine[1]) - if len(ipv6) != ipLen { - continue - } - ipv6Router = net.IP(ipv6) - hasIPv6 = true - case !hasIPv4 && strings.Contains(txt, defaults.RestoreV4Addr): - defineLine := strings.Split(txt, defaults.RestoreV4Addr) - if len(defineLine) != 2 { - continue - } - ipv4 := common.C2GoArray(defineLine[1]) - if len(ipv4) != ipLen { - continue - } - ipv4GW = net.IP(ipv4) - hasIPv4 = true - - // Legacy cases based on the header defines: - case !hasIPv4 && strings.Contains(txt, "IPV4_GATEWAY"): - // #define IPV4_GATEWAY 0xee1c000a - defineLine := strings.Split(txt, " ") - if len(defineLine) != 3 { - continue - } - ipv4GWHex := strings.TrimPrefix(defineLine[2], "0x") - ipv4GWUint64, err := strconv.ParseUint(ipv4GWHex, 16, 32) - if err != nil { - continue - } - if ipv4GWUint64 != 0 { - bs := make([]byte, net.IPv4len) - byteorder.Native.PutUint32(bs, uint32(ipv4GWUint64)) - ipv4GW = net.IPv4(bs[0], bs[1], bs[2], bs[3]) - hasIPv4 = true - } - case !hasIPv6 && strings.Contains(txt, " ROUTER_IP "): - // #define ROUTER_IP 0xf0, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8a, 0xd6 - defineLine := strings.Split(txt, " ROUTER_IP ") - if len(defineLine) != 2 { - continue - } - ipv6 := common.C2GoArray(defineLine[1]) - if len(ipv6) != net.IPv6len { - continue - } - ipv6Router = net.IP(ipv6) - hasIPv6 = true - } - } - } - return ipv4GW, ipv6Router -} - -// ExtractCiliumHostIPFromFS returns the Cilium IPv4 gateway and router IPv6 address from -// the node_config.h file if is present; or by deriving it from -// defaults.HostDevice interface, on which only the IPv4 is possible to derive. -func ExtractCiliumHostIPFromFS() (ipv4GW, ipv6Router net.IP) { - if !option.Config.EnableHostIPRestore { - return nil, nil - } - - nodeConfig := option.Config.GetNodeConfigPath() - ipv4GW, ipv6Router = getCiliumHostIPsFromFile(nodeConfig) - if ipv4GW != nil || ipv6Router != nil { - log.WithFields(logrus.Fields{ - "ipv4": ipv4GW, - "ipv6": ipv6Router, - "file": nodeConfig, - }).Info("Restored router address from node_config") - return ipv4GW, ipv6Router - } - return getCiliumHostIPsFromNetDev(defaults.HostDevice) -} - -// SetIPsecKeyIdentity sets the IPsec key identity an opaque value used to -// identity encryption keys used on the node. -func SetIPsecKeyIdentity(id uint8) { - localNode.Update(func(n *LocalNode) { - n.EncryptionKey = id - }) -} - -// GetK8sNodeIPs returns k8s Node IP addr. -func GetK8sNodeIP() net.IP { - n := getLocalNode() - return n.GetK8sNodeIP() -} - -func GetWireguardPubKey() string { - return getLocalNode().WireguardPubKey -} - -func GetOptOutNodeEncryption() bool { - return getLocalNode().OptOutNodeEncryption -} - -// SetEndpointHealthIPv4 sets the IPv4 cilium-health endpoint address. -func SetEndpointHealthIPv4(ip net.IP) { - localNode.Update(func(n *LocalNode) { - n.IPv4HealthIP = ip - }) -} - -// GetEndpointHealthIPv4 returns the IPv4 cilium-health endpoint address. -func GetEndpointHealthIPv4() net.IP { - return getLocalNode().IPv4HealthIP -} - -// SetEndpointHealthIPv6 sets the IPv6 cilium-health endpoint address. -func SetEndpointHealthIPv6(ip net.IP) { - localNode.Update(func(n *LocalNode) { - n.IPv6HealthIP = ip - }) -} - -// GetEndpointHealthIPv6 returns the IPv6 cilium-health endpoint address. -func GetEndpointHealthIPv6() net.IP { - return getLocalNode().IPv6HealthIP -} - -// SetIngressIPv4 sets the local IPv4 source address for Cilium Ingress. -func SetIngressIPv4(ip net.IP) { - localNode.Update(func(n *LocalNode) { - n.IPv4IngressIP = ip - }) -} - -// GetIngressIPv4 returns the local IPv4 source address for Cilium Ingress. -func GetIngressIPv4() net.IP { - return getLocalNode().IPv4IngressIP -} - -// SetIngressIPv6 sets the local IPv6 source address for Cilium Ingress. -func SetIngressIPv6(ip net.IP) { - localNode.Update(func(n *LocalNode) { - n.IPv6IngressIP = ip - }) -} - -// GetIngressIPv6 returns the local IPv6 source address for Cilium Ingress. -func GetIngressIPv6() net.IP { - return getLocalNode().IPv6IngressIP -} - -// GetEndpointEncryptKeyIndex returns the encryption key value for an endpoint -// owned by the local node. -// With IPSec encryption, this is the ID of the currently loaded key. -// With WireGuard, this returns a non-zero static value. -// Note that the key index returned by this function is only valid for _endpoints_ -// of the local node. If you want to obtain the key index of the local node itself, -// access the `EncryptionKey` field via the LocalNodeStore. -func GetEndpointEncryptKeyIndex() uint8 { - switch { - case option.Config.EnableIPSec: - return getLocalNode().EncryptionKey - case option.Config.EnableWireguard: - return wgTypes.StaticEncryptKey - - } - return 0 -} - -func copyStringToNetIPMap(in map[string]net.IP) map[string]net.IP { - out := make(map[string]net.IP, len(in)) - for iface, ip := range in { - dup := make(net.IP, len(ip)) - copy(dup, ip) - out[iface] = dup - } - return out -} - -// WithTestLocalNodeStore sets the 'localNode' to a temporary instance and -// runs the given test. Afterwards the 'localNode' is restored to nil. -// This is a temporary workaround for tests until the LocalNodeStoreCell can be -// used. -func WithTestLocalNodeStore(runTest func()) { - SetTestLocalNodeStore() - defer UnsetTestLocalNodeStore() - runTest() -} - -func SetTestLocalNodeStore() { - if localNode != nil { - panic("localNode already set") - } - - // Set the localNode global variable temporarily so that the legacy getters - // and setters can access it. - localNode = NewTestLocalNodeStore(LocalNode{}) -} - -func UnsetTestLocalNodeStore() { - localNode = nil -} - -// UpdateLocalNodeInTest provides access to modifying the local node -// information from tests that are not yet using hive and the LocalNodeStoreCell. -func UpdateLocalNodeInTest(mod func(n *LocalNode)) { - if localNode == nil { - panic("localNode not set, use node.LocalNodeStoreCell or WithTestLocalNodeStore()?") - } - localNode.Update(mod) -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/address_linux.go b/vendor/github.com/cilium/cilium/pkg/node/address_linux.go deleted file mode 100644 index b0f66d23e0e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/address_linux.go +++ /dev/null @@ -1,242 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build !darwin - -package node - -import ( - "fmt" - "net" - "sort" - - "github.com/sirupsen/logrus" - "github.com/vishvananda/netlink" - "golang.org/x/sys/unix" - - "github.com/cilium/cilium/pkg/ip" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -func firstGlobalAddr(intf string, preferredIP net.IP, family int, preferPublic bool) (net.IP, error) { - var link netlink.Link - var ipLen int - var err error - - ipsToExclude := GetExcludedIPs() - linkScopeMax := unix.RT_SCOPE_UNIVERSE - if family == netlink.FAMILY_V4 { - ipLen = 4 - } else { - ipLen = 16 - } - - if intf != "" && intf != "undefined" { - link, err = netlink.LinkByName(intf) - if err != nil { - link = nil - } else { - ipsToExclude = []net.IP{} - } - } - -retryInterface: - addr, err := netlink.AddrList(link, family) - if err != nil { - return nil, err - } - -retryScope: - ipsPublic := []netlink.Addr{} - ipsPrivate := []netlink.Addr{} - hasPreferred := false - - for _, a := range addr { - if a.Scope > linkScopeMax { - continue - } - if ip.ListContainsIP(ipsToExclude, a.IP) { - continue - } - if len(a.IP) < ipLen { - continue - } - isPreferredIP := a.IP.Equal(preferredIP) - if a.Flags&unix.IFA_F_SECONDARY > 0 && !isPreferredIP { - // Skip secondary addresses if they're not the preferredIP - continue - } - - if ip.IsPublicAddr(a.IP) { - ipsPublic = append(ipsPublic, a) - } else { - ipsPrivate = append(ipsPrivate, a) - } - // If the IP is the same as the preferredIP, that - // means that maybe it is restored from node_config.h, - // so if it is present we prefer this one, even if it - // is a secondary address. - if isPreferredIP { - hasPreferred = true - } - } - - if hasPreferred && !preferPublic { - return preferredIP, nil - } - - if len(ipsPublic) != 0 { - if hasPreferred && ip.IsPublicAddr(preferredIP) { - return preferredIP, nil - } - - // Just make sure that we always return the same one and not a - // random one. More info in the issue GH-7637. - sort.SliceStable(ipsPublic, func(i, j int) bool { - return ipsPublic[i].LinkIndex < ipsPublic[j].LinkIndex - }) - - return ipsPublic[0].IP, nil - } - - if len(ipsPrivate) != 0 { - if hasPreferred && !ip.IsPublicAddr(preferredIP) { - return preferredIP, nil - } - - // Same stable order, see above ipsPublic. - sort.SliceStable(ipsPrivate, func(i, j int) bool { - return ipsPrivate[i].LinkIndex < ipsPrivate[j].LinkIndex - }) - - return ipsPrivate[0].IP, nil - } - - // First, if a device is specified, fall back to anything wider - // than link (site, custom, ...) before trying all devices. - if linkScopeMax != unix.RT_SCOPE_SITE { - linkScopeMax = unix.RT_SCOPE_SITE - goto retryScope - } - - // Fall back with retry for all interfaces with full scope again - // (which then goes back to lower scope again for all interfaces - // before we give up completely). - if link != nil { - linkScopeMax = unix.RT_SCOPE_UNIVERSE - link = nil - goto retryInterface - } - - return nil, fmt.Errorf("No address found") -} - -// firstGlobalV4Addr returns the first IPv4 global IP of an interface, -// where the IPs are sorted in creation order (oldest to newest). -// -// All secondary IPs, except the preferredIP, are filtered out. -// -// Public IPs are preferred over private ones. When intf is defined only -// IPs belonging to that interface are considered. -// -// If preferredIP is present in the IP list it is returned irrespective of -// the sort order. However, if preferPublic is true and preferredIP is a -// private IP, a public IP will be returned if it is assigned to the intf -// -// Passing intf and preferredIP will only return preferredIP if it is in -// the IPs that belong to intf. -// -// In all cases, if intf is not found all interfaces are considered. -// -// If a intf-specific global address couldn't be found, we retry to find -// an address with reduced scope (site, custom) on that particular device. -// -// If the latter fails as well, we retry on all interfaces beginning with -// universe scope again (and then falling back to reduced scope). -// -// In case none of the above helped, we bail out with error. -func firstGlobalV4Addr(intf string, preferredIP net.IP, preferPublic bool) (net.IP, error) { - return firstGlobalAddr(intf, preferredIP, netlink.FAMILY_V4, preferPublic) -} - -// firstGlobalV6Addr returns first IPv6 global IP of an interface, see -// firstGlobalV4Addr for more details. -func firstGlobalV6Addr(intf string, preferredIP net.IP, preferPublic bool) (net.IP, error) { - return firstGlobalAddr(intf, preferredIP, netlink.FAMILY_V6, preferPublic) -} - -// getCiliumHostIPsFromNetDev returns the first IPv4 link local and returns -// it -func getCiliumHostIPsFromNetDev(devName string) (ipv4GW, ipv6Router net.IP) { - hostDev, err := netlink.LinkByName(devName) - if err != nil { - return nil, nil - } - addrs, err := netlink.AddrList(hostDev, netlink.FAMILY_ALL) - if err != nil { - return nil, nil - } - for _, addr := range addrs { - if addr.IP.To4() != nil { - if addr.Scope == int(netlink.SCOPE_LINK) { - ipv4GW = addr.IP - } - } else { - if addr.Scope != int(netlink.SCOPE_LINK) { - ipv6Router = addr.IP - } - } - } - - if ipv4GW != nil || ipv6Router != nil { - log.WithFields(logrus.Fields{ - "ipv4": ipv4GW, - "ipv6": ipv6Router, - "device": devName, - }).Info("Restored router address from device") - } - - return ipv4GW, ipv6Router -} - -// initMasqueradeAddrs initializes BPF masquerade addresses for the given -// devices. -func initMasqueradeAddrs(masqAddrs map[string]net.IP, family int, masqIPFromDevice string, devices []string, logfield string) error { - if ifaceName := masqIPFromDevice; ifaceName != "" { - ip, err := firstGlobalAddr(ifaceName, nil, family, preferPublicIP) - if err != nil { - return fmt.Errorf("Failed to determine IP of %s for BPF masq", ifaceName) - } - for _, device := range devices { - masqAddrs[device] = ip - } - return nil - } - - for _, device := range devices { - ip, err := firstGlobalAddr(device, GetK8sNodeIP(), family, preferPublicIP) - if err != nil { - return fmt.Errorf("Failed to determine IP of %s for BPF masq", device) - } - - masqAddrs[device] = ip - log.WithFields(logrus.Fields{ - logfield: ip, - logfields.Device: device, - }).Info("Masquerading IP selected for device") - } - - return nil -} - -// initMasqueradeV4Addrs initializes BPF masquerade IPv4 addresses for the -// given devices. -func initMasqueradeV4Addrs(masqAddrs map[string]net.IP, masqIPFromDevice string, devices []string, logfield string) error { - return initMasqueradeAddrs(masqAddrs, netlink.FAMILY_V4, masqIPFromDevice, devices, logfield) -} - -// initMasqueradeV6Addrs initializes BPF masquerade IPv6 addresses for the -// given devices. -func initMasqueradeV6Addrs(masqAddrs map[string]net.IP, masqIPFromDevice string, devices []string, logfield string) error { - return initMasqueradeAddrs(masqAddrs, netlink.FAMILY_V6, masqIPFromDevice, devices, logfield) -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/address_other.go b/vendor/github.com/cilium/cilium/pkg/node/address_other.go deleted file mode 100644 index af2ba9fae41..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/address_other.go +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -//go:build !linux - -package node - -import "net" - -func firstGlobalAddr(intf string, preferredIP net.IP, family int, preferPublic bool) (net.IP, error) { - return net.IP{}, nil -} - -func firstGlobalV4Addr(intf string, preferredIP net.IP, preferPublic bool) (net.IP, error) { - return net.IP{}, nil -} - -func firstGlobalV6Addr(intf string, preferredIP net.IP, preferPublic bool) (net.IP, error) { - return net.IP{}, nil -} - -func initMasqueradeV4Addrs(masqAddrs map[string]net.IP, masqIPFromDevice string, devices []string, logfield string) error { - return nil -} - -func initMasqueradeV6Addrs(masqAddrs map[string]net.IP, masqIPFromDevice string, devices []string, logfield string) error { - return nil -} - -// getCiliumHostIPsFromNetDev returns the first IPv4 link local and returns -// it -func getCiliumHostIPsFromNetDev(devName string) (ipv4GW, ipv6Router net.IP) { - return net.IP{}, net.IP{} -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/addressing/addresstype.go b/vendor/github.com/cilium/cilium/pkg/node/addressing/addresstype.go deleted file mode 100644 index 345786de3f4..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/addressing/addresstype.go +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package addressing - -import ( - "net" -) - -// AddressType represents a type of IP address for a node. They are copied -// from k8s.io/api/core/v1/types.go to avoid pulling in a lot of Kubernetes -// imports into this package. -type AddressType string - -const ( - NodeHostName AddressType = "Hostname" - NodeExternalIP AddressType = "ExternalIP" - NodeInternalIP AddressType = "InternalIP" - NodeExternalDNS AddressType = "ExternalDNS" - NodeInternalDNS AddressType = "InternalDNS" - NodeCiliumInternalIP AddressType = "CiliumInternalIP" -) - -type Address interface { - AddrType() AddressType - ToString() string -} - -// ExtractNodeIP returns one of the provided IP addresses available with the following priority: -// - NodeInternalIP -// - NodeExternalIP -// - other IP address type -// An error is returned if ExtractNodeIP fails to get an IP based on the provided address family. -func ExtractNodeIP[T Address](addrs []T, ipv6 bool) net.IP { - var backupIP net.IP - for _, addr := range addrs { - parsed := net.ParseIP(addr.ToString()) - if parsed == nil { - continue - } - if (ipv6 && parsed.To4() != nil) || - (!ipv6 && parsed.To4() == nil) { - continue - } - switch addr.AddrType() { - // Ignore CiliumInternalIPs - case NodeCiliumInternalIP: - continue - // Always prefer a cluster internal IP - case NodeInternalIP: - return parsed - case NodeExternalIP: - // Fall back to external Node IP - // if no internal IP could be found - backupIP = parsed - default: - // As a last resort, if no internal or external - // IP was found, use any node address available - if backupIP == nil { - backupIP = parsed - } - } - } - return backupIP -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/bootid.go b/vendor/github.com/cilium/cilium/pkg/node/bootid.go deleted file mode 100644 index 7345749991f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/bootid.go +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package node - -import "sync" - -var ( - localBootID string - logOnce sync.Once -) - -func GetBootID() string { - logOnce.Do(func() { - log.Infof("Local boot ID is %q", localBootID) - }) - return localBootID -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/bootid_linux.go b/vendor/github.com/cilium/cilium/pkg/node/bootid_linux.go deleted file mode 100644 index c3ba1b5d69d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/bootid_linux.go +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package node - -import ( - "io/ioutil" - "strings" -) - -var bootIDFilePath = "/proc/sys/kernel/random/boot_id" - -func init() { - bootID, err := ioutil.ReadFile(bootIDFilePath) - if err != nil { - log.WithError(err).Warnf("Could not read boot id from %s", bootIDFilePath) - return - } - localBootID = strings.TrimSpace(string(bootID)) -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/doc.go b/vendor/github.com/cilium/cilium/pkg/node/doc.go deleted file mode 100644 index 076044279a9..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package node provides functionality related to the local and remote node -// addresses -package node diff --git a/vendor/github.com/cilium/cilium/pkg/node/host_endpoint.go b/vendor/github.com/cilium/cilium/pkg/node/host_endpoint.go deleted file mode 100644 index 4296484fe73..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/host_endpoint.go +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package node - -const ( - templateHostEndpointID = uint64(0xffff) -) - -var ( - endpointID = templateHostEndpointID -) - -// GetEndpointID returns the ID of the host endpoint for this node. -func GetEndpointID() uint64 { - return endpointID -} - -// SetEndpointID sets the ID of the host endpoint this node. -func SetEndpointID(id uint64) { - endpointID = id -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/ip.go b/vendor/github.com/cilium/cilium/pkg/node/ip.go deleted file mode 100644 index fe3a76e6ed0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/ip.go +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package node - -import "net" - -var excludedIPs []net.IP - -// GetExcludedIPs returns a list of IPs from netdevices that Cilium -// needs to exclude to operate -func GetExcludedIPs() []net.IP { - return excludedIPs -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/ip_linux.go b/vendor/github.com/cilium/cilium/pkg/node/ip_linux.go deleted file mode 100644 index 21a7176fc4e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/ip_linux.go +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package node - -import ( - "strings" - - "github.com/vishvananda/netlink" -) - -func init() { - initExcludedIPs() -} - -func initExcludedIPs() { - // We exclude below bad device prefixes from address selection ... - prefixes := []string{ - "docker", - } - links, err := netlink.LinkList() - if err != nil { - return - } - for _, l := range links { - // ... also all down devices since they won't be reachable. - // - // We need to check for both "up" and "unknown" state, as some - // drivers may not implement operstate handling, and just report - // their state as unknown even though they are operational. - if l.Attrs().OperState == netlink.OperUp || - l.Attrs().OperState == netlink.OperUnknown { - skip := true - for _, p := range prefixes { - if strings.HasPrefix(l.Attrs().Name, p) { - skip = false - break - } - } - if skip { - continue - } - } - addr, err := netlink.AddrList(l, netlink.FAMILY_ALL) - if err != nil { - continue - } - for _, a := range addr { - excludedIPs = append(excludedIPs, a.IP) - } - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/local_node_store.go b/vendor/github.com/cilium/cilium/pkg/node/local_node_store.go deleted file mode 100644 index 0e8bfaf84ca..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/local_node_store.go +++ /dev/null @@ -1,159 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package node - -import ( - "context" - "sync" - - k8stypes "k8s.io/apimachinery/pkg/types" - - "github.com/cilium/cilium/pkg/hive/cell" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/node/types" - "github.com/cilium/cilium/pkg/stream" -) - -type LocalNode struct { - types.Node - // OptOutNodeEncryption will make the local node opt-out of node-to-node - // encryption - OptOutNodeEncryption bool - // Unique identifier of the Kubernetes node, used to construct the - // corresponding owner reference. - UID k8stypes.UID - // ID of the node assigned by the cloud provider. - ProviderID string -} - -// LocalNodeSynchronizer specifies how to build, and keep synchronized the local -// node object. -type LocalNodeSynchronizer interface { - InitLocalNode(context.Context, *LocalNode) error - SyncLocalNode(context.Context, *LocalNodeStore) -} - -// LocalNodeStoreCell provides the LocalNodeStore instance. -// The LocalNodeStore is the canonical owner of `types.Node` for the local node and -// provides a reactive API for observing and updating it. -var LocalNodeStoreCell = cell.Module( - "local-node-store", - "Provides LocalNodeStore for observing and updating local node info", - - cell.Provide(NewLocalNodeStore), -) - -// LocalNodeStoreParams are the inputs needed for constructing LocalNodeStore. -type LocalNodeStoreParams struct { - cell.In - - Lifecycle cell.Lifecycle - Sync LocalNodeSynchronizer `optional:"true"` -} - -// LocalNodeStore is the canonical owner for the local node object and provides -// a reactive API for observing and updating the state. -type LocalNodeStore struct { - // Changes to the local node are observable. - stream.Observable[LocalNode] - - mu lock.Mutex - value LocalNode - emit func(LocalNode) - complete func(error) -} - -func NewTestLocalNodeStore(mockNode LocalNode) *LocalNodeStore { - src, emit, complete := stream.Multicast[LocalNode](stream.EmitLatest) - emit(mockNode) - return &LocalNodeStore{ - Observable: src, - emit: emit, - complete: complete, - value: mockNode, - } -} - -func NewLocalNodeStore(params LocalNodeStoreParams) (*LocalNodeStore, error) { - src, emit, complete := stream.Multicast[LocalNode](stream.EmitLatest) - - s := &LocalNodeStore{ - Observable: src, - value: LocalNode{Node: types.Node{ - // Explicitly initialize the labels and annotations maps, so that - // we don't need to always check for nil values. - Labels: make(map[string]string), - Annotations: make(map[string]string), - }}, - } - - bctx, cancel := context.WithCancel(context.Background()) - var wg sync.WaitGroup - - params.Lifecycle.Append(cell.Hook{ - OnStart: func(ctx cell.HookContext) error { - s.mu.Lock() - defer s.mu.Unlock() - if params.Sync != nil { - if err := params.Sync.InitLocalNode(ctx, &s.value); err != nil { - return err - } - - // Start the synchronization process in background - wg.Add(1) - go func() { - params.Sync.SyncLocalNode(bctx, s) - wg.Done() - }() - } - - // Set the global variable still used by getters - // and setters in address.go. We're setting it in Start - // to catch uses of it before it's initialized. - localNode = s - - s.emit = emit - s.complete = complete - emit(s.value) - return nil - }, - OnStop: func(cell.HookContext) error { - // Stop the synchronization process (no-op if it had not been started) - cancel() - wg.Wait() - - s.mu.Lock() - s.complete(nil) - s.complete = nil - s.emit = nil - s.mu.Unlock() - - localNode = nil - return nil - }, - }) - - return s, nil -} - -// Get retrieves the current local node. Use Get() only for inspecting the state, -// e.g. in API handlers. Do not assume the value does not change over time. -// Blocks until the store has been initialized. -func (s *LocalNodeStore) Get(ctx context.Context) (LocalNode, error) { - // Subscribe to the stream of updates and take the first (latest) state. - return stream.First[LocalNode](ctx, s) -} - -// Update modifies the local node with a mutator. The updated value -// is passed to observers. -func (s *LocalNodeStore) Update(update func(*LocalNode)) { - s.mu.Lock() - defer s.mu.Unlock() - - update(&s.value) - - if s.emit != nil { - s.emit(s.value) - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/logfields.go b/vendor/github.com/cilium/cilium/pkg/node/logfields.go deleted file mode 100644 index 5b12bc9f1be..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/logfields.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package node - -import ( - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var log = logging.DefaultLogger.WithField(logfields.LogSubsys, "node") diff --git a/vendor/github.com/cilium/cilium/pkg/node/types/logfields.go b/vendor/github.com/cilium/cilium/pkg/node/types/logfields.go deleted file mode 100644 index f992f913695..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/types/logfields.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -var log = logging.DefaultLogger.WithField(logfields.LogSubsys, "node") diff --git a/vendor/github.com/cilium/cilium/pkg/node/types/node.go b/vendor/github.com/cilium/cilium/pkg/node/types/node.go deleted file mode 100644 index 42ce0e3b330..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/types/node.go +++ /dev/null @@ -1,664 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "encoding/json" - "fmt" - "net" - "path" - "slices" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/annotation" - "github.com/cilium/cilium/pkg/cidr" - cmtypes "github.com/cilium/cilium/pkg/clustermesh/types" - "github.com/cilium/cilium/pkg/defaults" - ipamTypes "github.com/cilium/cilium/pkg/ipam/types" - ciliumv2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "github.com/cilium/cilium/pkg/kvstore/store" - "github.com/cilium/cilium/pkg/node/addressing" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/source" -) - -// Identity represents the node identity of a node. -type Identity struct { - Name string - Cluster string -} - -// String returns the string representation on NodeIdentity. -func (nn Identity) String() string { - return path.Join(nn.Cluster, nn.Name) -} - -// appendAllocCDIR sets or appends the given podCIDR to the node. -// If the IPv4/IPv6AllocCIDR is already set, we add the podCIDR as a secondary -// alloc CIDR. -func (n *Node) appendAllocCDIR(podCIDR *cidr.CIDR) { - if podCIDR.IP.To4() != nil { - if n.IPv4AllocCIDR == nil { - n.IPv4AllocCIDR = podCIDR - } else { - n.IPv4SecondaryAllocCIDRs = append(n.IPv4SecondaryAllocCIDRs, podCIDR) - } - } else { - if n.IPv6AllocCIDR == nil { - n.IPv6AllocCIDR = podCIDR - } else { - n.IPv6SecondaryAllocCIDRs = append(n.IPv6SecondaryAllocCIDRs, podCIDR) - } - } -} - -// ParseCiliumNode parses a CiliumNode custom resource and returns a Node -// instance. Invalid IP and CIDRs are silently ignored -func ParseCiliumNode(n *ciliumv2.CiliumNode) (node Node) { - wireguardPubKey, _ := annotation.Get(n, annotation.WireguardPubKey, annotation.WireguardPubKeyAlias) - node = Node{ - Name: n.Name, - EncryptionKey: uint8(n.Spec.Encryption.Key), - Cluster: option.Config.ClusterName, - ClusterID: option.Config.ClusterID, - Source: source.CustomResource, - Labels: n.ObjectMeta.Labels, - Annotations: n.ObjectMeta.Annotations, - NodeIdentity: uint32(n.Spec.NodeIdentity), - WireguardPubKey: wireguardPubKey, - BootID: n.Spec.BootID, - } - - for _, cidrString := range n.Spec.IPAM.PodCIDRs { - ipnet, err := cidr.ParseCIDR(cidrString) - if err == nil { - node.appendAllocCDIR(ipnet) - } - } - - for _, pool := range n.Spec.IPAM.Pools.Allocated { - for _, podCIDR := range pool.CIDRs { - ipnet, err := cidr.ParseCIDR(string(podCIDR)) - if err == nil { - node.appendAllocCDIR(ipnet) - } - } - } - - node.IPv4HealthIP = net.ParseIP(n.Spec.HealthAddressing.IPv4) - node.IPv6HealthIP = net.ParseIP(n.Spec.HealthAddressing.IPv6) - - node.IPv4IngressIP = net.ParseIP(n.Spec.IngressAddressing.IPV4) - node.IPv6IngressIP = net.ParseIP(n.Spec.IngressAddressing.IPV6) - - for _, address := range n.Spec.Addresses { - if ip := net.ParseIP(address.IP); ip != nil { - node.IPAddresses = append(node.IPAddresses, Address{Type: address.Type, IP: ip}) - } - } - - return -} - -// ToCiliumNode converts the node to a CiliumNode -func (n *Node) ToCiliumNode() *ciliumv2.CiliumNode { - var ( - podCIDRs []string - ipAddrs []ciliumv2.NodeAddress - healthIPv4, healthIPv6 string - ingressIPv4, ingressIPv6 string - ) - - if n.IPv4AllocCIDR != nil { - podCIDRs = append(podCIDRs, n.IPv4AllocCIDR.String()) - } - if n.IPv6AllocCIDR != nil { - podCIDRs = append(podCIDRs, n.IPv6AllocCIDR.String()) - } - for _, ipv4AllocCIDR := range n.IPv4SecondaryAllocCIDRs { - podCIDRs = append(podCIDRs, ipv4AllocCIDR.String()) - } - for _, ipv6AllocCIDR := range n.IPv6SecondaryAllocCIDRs { - podCIDRs = append(podCIDRs, ipv6AllocCIDR.String()) - } - if n.IPv4HealthIP != nil { - healthIPv4 = n.IPv4HealthIP.String() - } - if n.IPv6HealthIP != nil { - healthIPv6 = n.IPv6HealthIP.String() - } - if n.IPv4IngressIP != nil { - ingressIPv4 = n.IPv4IngressIP.String() - } - if n.IPv6IngressIP != nil { - ingressIPv6 = n.IPv6IngressIP.String() - } - - for _, address := range n.IPAddresses { - ipAddrs = append(ipAddrs, ciliumv2.NodeAddress{ - Type: address.Type, - IP: address.IP.String(), - }) - } - - return &ciliumv2.CiliumNode{ - ObjectMeta: v1.ObjectMeta{ - Name: n.Name, - Labels: n.Labels, - Annotations: n.Annotations, - }, - Spec: ciliumv2.NodeSpec{ - Addresses: ipAddrs, - HealthAddressing: ciliumv2.HealthAddressingSpec{ - IPv4: healthIPv4, - IPv6: healthIPv6, - }, - IngressAddressing: ciliumv2.AddressPair{ - IPV4: ingressIPv4, - IPV6: ingressIPv6, - }, - Encryption: ciliumv2.EncryptionSpec{ - Key: int(n.EncryptionKey), - }, - IPAM: ipamTypes.IPAMSpec{ - PodCIDRs: podCIDRs, - }, - NodeIdentity: uint64(n.NodeIdentity), - BootID: n.BootID, - }, - } -} - -// RegisterNode overloads GetKeyName to ignore the cluster name, as cluster name may not be stable during node registration. -// -// +k8s:deepcopy-gen=true -type RegisterNode struct { - Node -} - -// GetKeyName Overloaded key name w/o cluster name -func (n *RegisterNode) GetKeyName() string { - return n.Name -} - -// DeepKeyCopy creates a deep copy of the LocalKey -func (n *RegisterNode) DeepKeyCopy() store.LocalKey { - return n.DeepCopy() -} - -func (n *RegisterNode) Unmarshal(_ string, data []byte) error { - newNode := Node{} - if err := json.Unmarshal(data, &newNode); err != nil { - return err - } - - n.Node = newNode - return nil -} - -// Node contains the nodes name, the list of addresses to this address -// -// +k8s:deepcopy-gen=true -type Node struct { - // Name is the name of the node. This is typically the hostname of the node. - Name string - - // Cluster is the name of the cluster the node is associated with - Cluster string - - IPAddresses []Address - - // IPv4AllocCIDR if set, is the IPv4 address pool out of which the node - // allocates IPs for local endpoints from - IPv4AllocCIDR *cidr.CIDR - - // IPv4SecondaryAllocCIDRs contains additional IPv4 CIDRs from which this - //node allocates IPs for its local endpoints from - IPv4SecondaryAllocCIDRs []*cidr.CIDR - - // IPv6AllocCIDR if set, is the IPv6 address pool out of which the node - // allocates IPs for local endpoints from - IPv6AllocCIDR *cidr.CIDR - - // IPv6SecondaryAllocCIDRs contains additional IPv6 CIDRs from which this - // node allocates IPs for its local endpoints from - IPv6SecondaryAllocCIDRs []*cidr.CIDR - - // IPv4HealthIP if not nil, this is the IPv4 address of the - // cilium-health endpoint located on the node. - IPv4HealthIP net.IP - - // IPv6HealthIP if not nil, this is the IPv6 address of the - // cilium-health endpoint located on the node. - IPv6HealthIP net.IP - - // IPv4IngressIP if not nil, this is the IPv4 address of the - // Ingress listener on the node. - IPv4IngressIP net.IP - - // IPv6IngressIP if not nil, this is the IPv6 address of the - // Ingress listener located on the node. - IPv6IngressIP net.IP - - // ClusterID is the unique identifier of the cluster - ClusterID uint32 - - // Source is the source where the node configuration was generated / created. - Source source.Source - - // Key index used for transparent encryption or 0 for no encryption - EncryptionKey uint8 - - // Node labels - Labels map[string]string - - // Node annotations - Annotations map[string]string - - // NodeIdentity is the numeric identity allocated for the node - NodeIdentity uint32 - - // WireguardPubKey is the WireGuard public key of this node - WireguardPubKey string - - // BootID is a unique node identifier generated on boot - BootID string -} - -// Fullname returns the node's full name including the cluster name if a -// cluster name value other than the default value has been specified -func (n *Node) Fullname() string { - if n.Cluster != defaults.ClusterName { - return path.Join(n.Cluster, n.Name) - } - - return n.Name -} - -// Address is a node address which contains an IP and the address type. -// -// +k8s:deepcopy-gen=true -type Address struct { - Type addressing.AddressType - IP net.IP -} - -func (a Address) ToString() string { - return a.IP.String() -} - -func (a Address) AddrType() addressing.AddressType { - return a.Type -} - -// GetNodeIP returns one of the node's IP addresses available with the -// following priority: -// - NodeInternalIP -// - NodeExternalIP -// - other IP address type -// Nil is returned if GetNodeIP fails to extract an IP from the Node based -// on the provided address family. -func (n *Node) GetNodeIP(ipv6 bool) net.IP { - return addressing.ExtractNodeIP[Address](n.IPAddresses, ipv6) -} - -// GetExternalIP returns ExternalIP of k8s Node. If not present, then it -// returns nil; -func (n *Node) GetExternalIP(ipv6 bool) net.IP { - for _, addr := range n.IPAddresses { - if (ipv6 && addr.IP.To4() != nil) || (!ipv6 && addr.IP.To4() == nil) { - continue - } - if addr.Type == addressing.NodeExternalIP { - return addr.IP - } - } - - return nil -} - -// GetK8sNodeIPs returns k8s Node IP (either InternalIP or ExternalIP or nil; -// the former is preferred). -func (n *Node) GetK8sNodeIP() net.IP { - var externalIP net.IP - - for _, addr := range n.IPAddresses { - if addr.Type == addressing.NodeInternalIP { - return addr.IP - } else if addr.Type == addressing.NodeExternalIP { - externalIP = addr.IP - } - } - - return externalIP -} - -// GetNodeInternalIP returns the Internal IPv4 of node or nil. -func (n *Node) GetNodeInternalIPv4() net.IP { - for _, addr := range n.IPAddresses { - if addr.IP.To4() == nil { - continue - } - if addr.Type == addressing.NodeInternalIP { - return addr.IP - } - } - - return nil -} - -// GetNodeInternalIP returns the Internal IPv6 of node or nil. -func (n *Node) GetNodeInternalIPv6() net.IP { - for _, addr := range n.IPAddresses { - if addr.IP.To4() != nil { - continue - } - if addr.Type == addressing.NodeInternalIP { - return addr.IP - } - } - - return nil -} - -// GetCiliumInternalIP returns the CiliumInternalIP e.g. the IP associated -// with cilium_host on the node. -func (n *Node) GetCiliumInternalIP(ipv6 bool) net.IP { - for _, addr := range n.IPAddresses { - if (ipv6 && addr.IP.To4() != nil) || - (!ipv6 && addr.IP.To4() == nil) { - continue - } - if addr.Type == addressing.NodeCiliumInternalIP { - return addr.IP - } - } - return nil -} - -// SetCiliumInternalIP sets the CiliumInternalIP e.g. the IP associated -// with cilium_host on the node. -func (n *Node) SetCiliumInternalIP(newAddr net.IP) { - n.setAddress(addressing.NodeCiliumInternalIP, newAddr) -} - -// SetNodeExternalIP sets the NodeExternalIP. -func (n *Node) SetNodeExternalIP(newAddr net.IP) { - n.setAddress(addressing.NodeExternalIP, newAddr) -} - -// SetNodeInternalIP sets the NodeInternalIP. -func (n *Node) SetNodeInternalIP(newAddr net.IP) { - n.setAddress(addressing.NodeInternalIP, newAddr) -} - -func (n *Node) RemoveAddresses(typ addressing.AddressType) { - newAddresses := []Address{} - for _, addr := range n.IPAddresses { - if addr.Type != typ { - newAddresses = append(newAddresses, addr) - } - } - n.IPAddresses = newAddresses -} - -func (n *Node) setAddress(typ addressing.AddressType, newIP net.IP) { - newAddr := Address{Type: typ, IP: newIP} - - if newIP == nil { - n.RemoveAddresses(typ) - return - } - - // Create a copy of the slice, so that we don't modify the - // current one, which may be captured by any of the observers. - n.IPAddresses = slices.Clone(n.IPAddresses) - - ipv6 := newIP.To4() == nil - // Try first to replace an existing address with same type - for i, addr := range n.IPAddresses { - if addr.Type != typ { - continue - } - if ipv6 != (addr.IP.To4() == nil) { - // Don't replace if address family is different. - continue - } - n.IPAddresses[i] = newAddr - return - } - n.IPAddresses = append(n.IPAddresses, newAddr) - -} - -func (n *Node) GetIPByType(addrType addressing.AddressType, ipv6 bool) net.IP { - for _, addr := range n.IPAddresses { - if addr.Type != addrType { - continue - } - if is4 := addr.IP.To4() != nil; (!ipv6 && is4) || (ipv6 && !is4) { - return addr.IP - } - } - return nil -} - -func (n *Node) getPrimaryAddress() *models.NodeAddressing { - v4 := n.GetNodeIP(false) - v6 := n.GetNodeIP(true) - - var ipv4AllocStr, ipv6AllocStr string - if n.IPv4AllocCIDR != nil { - ipv4AllocStr = n.IPv4AllocCIDR.String() - } - if n.IPv6AllocCIDR != nil { - ipv6AllocStr = n.IPv6AllocCIDR.String() - } - - var v4Str, v6Str string - if v4 != nil { - v4Str = v4.String() - } - if v6 != nil { - v6Str = v6.String() - } - - return &models.NodeAddressing{ - IPV4: &models.NodeAddressingElement{ - Enabled: option.Config.EnableIPv4, - IP: v4Str, - AllocRange: ipv4AllocStr, - }, - IPV6: &models.NodeAddressingElement{ - Enabled: option.Config.EnableIPv6, - IP: v6Str, - AllocRange: ipv6AllocStr, - }, - } -} - -func (n *Node) isPrimaryAddress(addr Address, ipv4 bool) bool { - return addr.IP.String() == n.GetNodeIP(!ipv4).String() -} - -func (n *Node) getSecondaryAddresses() []*models.NodeAddressingElement { - result := []*models.NodeAddressingElement{} - - for _, addr := range n.IPAddresses { - ipv4 := false - if addr.IP.To4() != nil { - ipv4 = true - } - if !n.isPrimaryAddress(addr, ipv4) { - result = append(result, &models.NodeAddressingElement{ - IP: addr.IP.String(), - }) - } - } - - return result -} - -func (n *Node) getHealthAddresses() *models.NodeAddressing { - if n.IPv4HealthIP == nil && n.IPv6HealthIP == nil { - return nil - } - - var v4Str, v6Str string - if n.IPv4HealthIP != nil { - v4Str = n.IPv4HealthIP.String() - } - if n.IPv6HealthIP != nil { - v6Str = n.IPv6HealthIP.String() - } - - return &models.NodeAddressing{ - IPV4: &models.NodeAddressingElement{ - Enabled: option.Config.EnableIPv4, - IP: v4Str, - }, - IPV6: &models.NodeAddressingElement{ - Enabled: option.Config.EnableIPv6, - IP: v6Str, - }, - } -} - -func (n *Node) getIngressAddresses() *models.NodeAddressing { - if n.IPv4IngressIP == nil && n.IPv6IngressIP == nil { - return nil - } - - var v4Str, v6Str string - if n.IPv4IngressIP != nil { - v4Str = n.IPv4IngressIP.String() - } - if n.IPv6IngressIP != nil { - v6Str = n.IPv6IngressIP.String() - } - - return &models.NodeAddressing{ - IPV4: &models.NodeAddressingElement{ - Enabled: option.Config.EnableIPv4, - IP: v4Str, - }, - IPV6: &models.NodeAddressingElement{ - Enabled: option.Config.EnableIPv6, - IP: v6Str, - }, - } -} - -// GetModel returns the API model representation of a node. -func (n *Node) GetModel() *models.NodeElement { - return &models.NodeElement{ - Name: n.Fullname(), - PrimaryAddress: n.getPrimaryAddress(), - SecondaryAddresses: n.getSecondaryAddresses(), - HealthEndpointAddress: n.getHealthAddresses(), - IngressAddress: n.getIngressAddresses(), - Source: string(n.Source), - } -} - -// Identity returns the identity of the node -func (n *Node) Identity() Identity { - return Identity{ - Name: n.Name, - Cluster: n.Cluster, - } -} - -func getCluster() string { - return option.Config.ClusterName -} - -// IsLocal returns true if this is the node on which the agent itself is -// running on -func (n *Node) IsLocal() bool { - return n != nil && n.Name == GetName() && n.Cluster == getCluster() -} - -func (n *Node) GetIPv4AllocCIDRs() []*cidr.CIDR { - result := make([]*cidr.CIDR, 0, len(n.IPv4SecondaryAllocCIDRs)+1) - if n.IPv4AllocCIDR != nil { - result = append(result, n.IPv4AllocCIDR) - } - if len(n.IPv4SecondaryAllocCIDRs) > 0 { - result = append(result, n.IPv4SecondaryAllocCIDRs...) - } - return result -} - -func (n *Node) GetIPv6AllocCIDRs() []*cidr.CIDR { - result := make([]*cidr.CIDR, 0, len(n.IPv6SecondaryAllocCIDRs)+1) - if n.IPv6AllocCIDR != nil { - result = append(result, n.IPv6AllocCIDR) - } - if len(n.IPv6SecondaryAllocCIDRs) > 0 { - result = append(result, n.IPv6SecondaryAllocCIDRs...) - } - return result -} - -// GetKeyNodeName constructs the API name for the given cluster and node name. -func GetKeyNodeName(cluster, node string) string { - // WARNING - STABLE API: Changing the structure of the key may break - // backwards compatibility - return path.Join(cluster, node) -} - -// GetKeyName returns the kvstore key to be used for the node -func (n *Node) GetKeyName() string { - return GetKeyNodeName(n.Cluster, n.Name) -} - -// DeepKeyCopy creates a deep copy of the LocalKey -func (n *Node) DeepKeyCopy() store.LocalKey { - return n.DeepCopy() -} - -// Marshal returns the node object as JSON byte slice -func (n *Node) Marshal() ([]byte, error) { - return json.Marshal(n) -} - -// Unmarshal parses the JSON byte slice and updates the node receiver -func (n *Node) Unmarshal(_ string, data []byte) error { - newNode := Node{} - if err := json.Unmarshal(data, &newNode); err != nil { - return err - } - - if err := newNode.validate(); err != nil { - return err - } - - *n = newNode - - return nil -} - -// LogRepr returns a representation of the node to be used for logging -func (n *Node) LogRepr() string { - b, err := n.Marshal() - if err != nil { - return fmt.Sprintf("%#v", n) - } - return string(b) -} - -func (n *Node) validate() error { - // Skip the ClusterID check if it matches the local one, as we assume that - // it has already been validated, and to allow it to be zero. - if n.ClusterID != option.Config.ClusterID { - if err := cmtypes.ValidateClusterID(n.ClusterID); err != nil { - return err - } - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/types/nodename.go b/vendor/github.com/cilium/cilium/pkg/node/types/nodename.go deleted file mode 100644 index 8faa30c3ed8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/types/nodename.go +++ /dev/null @@ -1,68 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "os" - - "github.com/cilium/cilium/pkg/defaults" - k8sConsts "github.com/cilium/cilium/pkg/k8s/constants" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/option" -) - -var ( - nodeName = "localhost" -) - -// SetName sets the name of the local node. This will overwrite the value that -// is automatically retrieved with `os.Hostname()`. -// -// Note: This function is currently designed to only be called during the -// bootstrapping procedure of the agent where no parallelism exists. If you -// want to use this function in later stages, a mutex must be added first. -func SetName(name string) { - nodeName = name -} - -// GetName returns the name of the local node. The value returned was either -// previously set with SetName(), retrieved via `os.Hostname()`, or as a last -// resort is hardcoded to "localhost". -func GetName() string { - return nodeName -} - -// GetAbsoluteNodeName returns the absolute node name combined of both -// (prefixed)cluster name and the local node name in case of -// clustered environments otherwise returns the name of the local node. -func GetAbsoluteNodeName() string { - if clusterName := GetClusterName(); clusterName != "" { - return clusterName + "/" + nodeName - } else { - return nodeName - } -} - -func GetClusterName() string { - if option.Config.ClusterName != "" && - option.Config.ClusterName != defaults.ClusterName { - return option.Config.ClusterName - } else { - return "" - } -} - -func init() { - // Give priority to the environment variable available in the Cilium agent - if name := os.Getenv(k8sConsts.EnvNodeNameSpec); name != "" { - nodeName = name - return - } - if h, err := os.Hostname(); err != nil { - log.WithError(err).Warn("Unable to retrieve local hostname") - } else { - log.WithField(logfields.NodeName, h).Debug("os.Hostname() returned") - nodeName = h - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/node/types/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/node/types/zz_generated.deepcopy.go deleted file mode 100644 index 6f78dd8c584..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/node/types/zz_generated.deepcopy.go +++ /dev/null @@ -1,138 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package types - -import ( - net "net" - - cidr "github.com/cilium/cilium/pkg/cidr" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Address) DeepCopyInto(out *Address) { - *out = *in - if in.IP != nil { - in, out := &in.IP, &out.IP - *out = make(net.IP, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Address. -func (in *Address) DeepCopy() *Address { - if in == nil { - return nil - } - out := new(Address) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Node) DeepCopyInto(out *Node) { - *out = *in - if in.IPAddresses != nil { - in, out := &in.IPAddresses, &out.IPAddresses - *out = make([]Address, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.IPv4AllocCIDR != nil { - in, out := &in.IPv4AllocCIDR, &out.IPv4AllocCIDR - *out = (*in).DeepCopy() - } - if in.IPv4SecondaryAllocCIDRs != nil { - in, out := &in.IPv4SecondaryAllocCIDRs, &out.IPv4SecondaryAllocCIDRs - *out = make([]*cidr.CIDR, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = (*in).DeepCopy() - } - } - } - if in.IPv6AllocCIDR != nil { - in, out := &in.IPv6AllocCIDR, &out.IPv6AllocCIDR - *out = (*in).DeepCopy() - } - if in.IPv6SecondaryAllocCIDRs != nil { - in, out := &in.IPv6SecondaryAllocCIDRs, &out.IPv6SecondaryAllocCIDRs - *out = make([]*cidr.CIDR, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = (*in).DeepCopy() - } - } - } - if in.IPv4HealthIP != nil { - in, out := &in.IPv4HealthIP, &out.IPv4HealthIP - *out = make(net.IP, len(*in)) - copy(*out, *in) - } - if in.IPv6HealthIP != nil { - in, out := &in.IPv6HealthIP, &out.IPv6HealthIP - *out = make(net.IP, len(*in)) - copy(*out, *in) - } - if in.IPv4IngressIP != nil { - in, out := &in.IPv4IngressIP, &out.IPv4IngressIP - *out = make(net.IP, len(*in)) - copy(*out, *in) - } - if in.IPv6IngressIP != nil { - in, out := &in.IPv6IngressIP, &out.IPv6IngressIP - *out = make(net.IP, len(*in)) - copy(*out, *in) - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *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 Node. -func (in *Node) DeepCopy() *Node { - if in == nil { - return nil - } - out := new(Node) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RegisterNode) DeepCopyInto(out *RegisterNode) { - *out = *in - in.Node.DeepCopyInto(&out.Node) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegisterNode. -func (in *RegisterNode) DeepCopy() *RegisterNode { - if in == nil { - return nil - } - out := new(RegisterNode) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/cilium/cilium/pkg/option/.gitignore b/vendor/github.com/cilium/cilium/pkg/option/.gitignore new file mode 100644 index 00000000000..68fddb5ff90 --- /dev/null +++ b/vendor/github.com/cilium/cilium/pkg/option/.gitignore @@ -0,0 +1 @@ +agent-runtime-config*.json diff --git a/vendor/github.com/cilium/cilium/pkg/option/config.go b/vendor/github.com/cilium/cilium/pkg/option/config.go index 34e77a85947..890835fed14 100644 --- a/vendor/github.com/cilium/cilium/pkg/option/config.go +++ b/vendor/github.com/cilium/cilium/pkg/option/config.go @@ -5,6 +5,8 @@ package option import ( "bytes" + "context" + "crypto/sha256" "encoding/json" "errors" "fmt" @@ -19,8 +21,12 @@ import ( "sort" "strconv" "strings" + "unicode" + "unicode/utf8" - "github.com/shirou/gopsutil/v3/mem" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/mackerelio/go-osstat/memory" "github.com/sirupsen/logrus" "github.com/spf13/cast" "github.com/spf13/cobra" @@ -123,13 +129,13 @@ const ( // Devices facing cluster/external network for attaching bpf_host Devices = "devices" + // Forces the auto-detection of devices, even if specific devices are explicitly listed + ForceDeviceDetection = "force-device-detection" + // DirectRoutingDevice is the name of a device used to connect nodes in // direct routing mode (only required by BPF NodePort) DirectRoutingDevice = "direct-routing-device" - // DisableEnvoyVersionCheck do not perform Envoy binary version check on startup - DisableEnvoyVersionCheck = "disable-envoy-version-check" - // EnablePolicy enables policy enforcement in the agent. EnablePolicy = "enable-policy" @@ -142,6 +148,9 @@ const ( // EnableTracing enables tracing mode in the agent. EnableTracing = "enable-tracing" + // EnableIPIPTermination is the name of the option to enable IPIP termination + EnableIPIPTermination = "enable-ipip-termination" + // Add unreachable routes on pod deletion EnableUnreachableRoutes = "enable-unreachable-routes" @@ -151,29 +160,18 @@ const ( // EncryptNode enables node IP encryption EncryptNode = "encrypt-node" - // EnvoyLog sets the path to a separate Envoy log file, if any - EnvoyLog = "envoy-log" - // GopsPort is the TCP port for the gops server. GopsPort = "gops-port" - // ProxyPrometheusPort specifies the port to serve Cilium host proxy metrics on. - ProxyPrometheusPort = "proxy-prometheus-port" - - // ProxyMaxRequestsPerConnection specifies the max_requests_per_connection setting for the proxy - ProxyMaxRequestsPerConnection = "proxy-max-requests-per-connection" - - // ProxyMaxConnectionDuration specifies the max_connection_duration setting for the proxy in seconds - ProxyMaxConnectionDuration = "proxy-max-connection-duration-seconds" - - // ProxyIdleTimeout specifies the idle_timeout setting (in seconds), which applies - // for the connection from proxy to upstream cluster - ProxyIdleTimeout = "proxy-idle-timeout-seconds" - // FixedIdentityMapping is the key-value for the fixed identity mapping // which allows to use reserved label for fixed identities FixedIdentityMapping = "fixed-identity-mapping" + // FixedZoneMapping is the key-value for the fixed zone mapping which + // is used to map zone value (string) from EndpointSlice to ID (uint8) + // in lb{4,6}_backend in BPF map. + FixedZoneMapping = "fixed-zone-mapping" + // IPv4Range is the per-node IPv4 endpoint prefix, e.g. 10.16.0.0/16 IPv4Range = "ipv4-range" @@ -358,27 +356,15 @@ const ( // EnableMasqueradeRouteSource masquerades to the source route IP address instead of the interface one EnableMasqueradeRouteSource = "enable-masquerade-to-route-source" - // DeriveMasqIPAddrFromDevice is device name which IP addr is used for BPF masquerades - DeriveMasqIPAddrFromDevice = "derive-masquerade-ip-addr-from-device" - // EnableIPMasqAgent enables BPF ip-masq-agent EnableIPMasqAgent = "enable-ip-masq-agent" // EnableIPv4EgressGateway enables the IPv4 egress gateway EnableIPv4EgressGateway = "enable-ipv4-egress-gateway" - // EnableIngressController enables Ingress Controller - EnableIngressController = "enable-ingress-controller" - - // EnableGatewayAPI enables Gateway API support - EnableGatewayAPI = "enable-gateway-api" - // EnableEnvoyConfig enables processing of CiliumClusterwideEnvoyConfig and CiliumEnvoyConfig CRDs EnableEnvoyConfig = "enable-envoy-config" - // EnvoyConfigTimeout determines how long to wait Envoy to N/ACK resources - EnvoyConfigTimeout = "envoy-config-timeout" - // IPMasqAgentConfigPath is the configuration file path IPMasqAgentConfigPath = "ip-masq-agent-config-path" @@ -402,9 +388,6 @@ const ( // Restore restores state, if possible, from previous daemon Restore = "restore" - // SidecarIstioProxyImage regular expression matching compatible Istio sidecar istio-proxy container image names - SidecarIstioProxyImage = "sidecar-istio-proxy-image" - // SocketPath sets daemon's socket path to listen for connections SocketPath = "socket-path" @@ -420,6 +403,9 @@ const ( // EnableXDPPrefilter enables XDP-based prefiltering EnableXDPPrefilter = "enable-xdp-prefilter" + // EnableTCX enables attaching endpoint programs using tcx if the kernel supports it + EnableTCX = "enable-tcx" + ProcFs = "procfs" // PrometheusServeAddr IP:Port on which to serve prometheus metrics (pass ":Port" to bind on all interfaces, "" is off) @@ -482,6 +468,10 @@ const ( // DNSProxyLockCount. DNSProxyLockTimeout = "dnsproxy-lock-timeout" + // DNSProxySocketLingerTimeout defines how many seconds we wait for the connection + // between the DNS proxy and the upstream server to be closed. + DNSProxySocketLingerTimeout = "dnsproxy-socket-linger-timeout" + // DNSProxyEnableTransparentMode enables transparent mode for the DNS proxy. DNSProxyEnableTransparentMode = "dnsproxy-enable-transparent-mode" @@ -507,6 +497,10 @@ const ( // BPFSocketLBHostnsOnly is the name of the BPFSocketLBHostnsOnly option BPFSocketLBHostnsOnly = "bpf-lb-sock-hostns-only" + // EnableSocketLBPodConnectionTermination enables termination of pod connections + // to deleted service backends when socket-LB is enabled. + EnableSocketLBPodConnectionTermination = "bpf-lb-sock-terminate-pod-connections" + // RoutingMode is the name of the option to choose between native routing and tunneling mode RoutingMode = "routing-mode" @@ -730,6 +724,9 @@ const ( // EnableAutoDirectRoutingName is the name for the EnableAutoDirectRouting option EnableAutoDirectRoutingName = "auto-direct-node-routes" + // DirectRoutingSkipUnreachableName is the name for the DirectRoutingSkipUnreachable option + DirectRoutingSkipUnreachableName = "direct-routing-skip-unreachable" + // EnableIPSecName is the name of the option to enable IPSec EnableIPSecName = "enable-ipsec" @@ -748,6 +745,12 @@ const ( // IPSecKeyFileName is the name of the option for ipsec key file IPSecKeyFileName = "ipsec-key-file" + // EnableIPSecEncrytpedOverlay is the name of the option which enables + // the EncryptedOverlay feature. + // + // This feature will encrypt overlay traffic before it leaves the cluster. + EnableIPSecEncryptedOverlay = "enable-ipsec-encrypted-overlay" + // EnableWireguard is the name of the option to enable WireGuard EnableWireguard = "enable-wireguard" @@ -797,9 +800,6 @@ const ( // KVstoreConnectivityTimeout is the timeout when performing kvstore operations KVstoreConnectivityTimeout = "kvstore-connectivity-timeout" - // IPAllocationTimeout is the timeout when allocating CIDRs - IPAllocationTimeout = "ip-allocation-timeout" - // IdentityChangeGracePeriod is the name of the // IdentityChangeGracePeriod option IdentityChangeGracePeriod = "identity-change-grace-period" @@ -831,14 +831,6 @@ const ( // endpoints that are no longer alive and healthy. EndpointGCInterval = "endpoint-gc-interval" - // This option turns off switching from full pods informer to node's local pods informer - // when CEP CRD is disabled and kvstore is used. - // Switching from full pods informer to node's local pods informer is considered default behaviour - // and this option allows us to change it back to having full pods informer all the time. - // It's meant to be mitigation only in case if endpoint synchronization from kvstore has some bugs - // and we actually need to watch all pods all the time. - LegacyTurnOffK8sEventHandover = "legacy-turn-off-k8s-event-handover" - // LoopbackIPv4 is the address to use for service loopback SNAT LoopbackIPv4 = "ipv4-service-loopback-address" @@ -905,6 +897,10 @@ const ( // CiliumNode resource for the local node AutoCreateCiliumNodeResource = "auto-create-cilium-node-resource" + // ExcludeNodeLabelPatterns allows for excluding unnecessary labels from being propagated from k8s node to cilium + // node object. This allows for avoiding unnecessary events being broadcast to all nodes in the cluster. + ExcludeNodeLabelPatterns = "exclude-node-label-patterns" + // IPv4NativeRoutingCIDR describes a v4 CIDR in which pod IPs are routable IPv4NativeRoutingCIDR = "ipv4-native-routing-cidr" @@ -940,12 +936,12 @@ const ( // control plane, e.g. when using the managed etcd feature EnableWellKnownIdentities = "enable-well-known-identities" - // EnableRemoteNodeIdentity enables use of the remote-node identity - EnableRemoteNodeIdentity = "enable-remote-node-identity" - // PolicyAuditModeArg argument enables policy audit mode. PolicyAuditModeArg = "policy-audit-mode" + // PolicyAccountingArg argument enable policy accounting. + PolicyAccountingArg = "policy-accounting" + // EnableHubble enables hubble in the agent. EnableHubble = "enable-hubble" @@ -985,6 +981,23 @@ const ( // HubbleMetricsServer specifies the addresses to serve Hubble metrics on. HubbleMetricsServer = "hubble-metrics-server" + // HubbleMetricsTLSEnabled allows the Hubble metrics server to run on the given listen + // address with TLS. + HubbleMetricsTLSEnabled = "hubble-metrics-server-enable-tls" + + // HubbleMetricsServerTLSCertFile specifies the path to the public key file for the + // Hubble metrics server. The file must contain PEM encoded data. + HubbleMetricsTLSCertFile = "hubble-metrics-server-tls-cert-file" + + // HubbleMetricsServerTLSKeyFile specifies the path to the private key file for the + // Hubble metrics server. The file must contain PEM encoded data. + HubbleMetricsTLSKeyFile = "hubble-metrics-server-tls-key-file" + + // HubbleMetricsServerTLSClientCAFiles specifies the path to one or more client CA + // certificates to use for TLS with mutual authentication (mTLS) on the Hubble metrics server. + // The files must contain PEM encoded data. + HubbleMetricsTLSClientCAFiles = "hubble-metrics-server-tls-client-ca-files" + // HubbleMetrics specifies enabled metrics and their configuration options. HubbleMetrics = "hubble-metrics" @@ -1053,27 +1066,25 @@ const ( // HubbleRedactHttpHeadersDeny controls which http headers will be redacted from flows HubbleRedactHttpHeadersDeny = "hubble-redact-http-headers-deny" - // K8sHeartbeatTimeout configures the timeout for apiserver heartbeat - K8sHeartbeatTimeout = "k8s-heartbeat-timeout" - - // EndpointStatus enables population of information in the - // CiliumEndpoint.Status resource - EndpointStatus = "endpoint-status" + // HubbleDropEvents controls whether Hubble should create v1.Events + // for packet drops related to pods + HubbleDropEvents = "hubble-drop-events" - // EndpointStatusPolicy enables CiliumEndpoint.Status.Policy - EndpointStatusPolicy = "policy" + // HubbleDropEventsInterval controls the minimum time between emitting events + // with the same source and destination IP + HubbleDropEventsInterval = "hubble-drop-events-interval" - // EndpointStatusHealth enables CiliumEndpoint.Status.Health - EndpointStatusHealth = "health" + // HubbleDropEventsReasons controls which drop reasons to emit events for + HubbleDropEventsReasons = "hubble-drop-events-reasons" - // EndpointStatusControllers enables CiliumEndpoint.Status.Controllers - EndpointStatusControllers = "controllers" + // K8sClientConnectionTimeout configures the timeout for K8s client connections. + K8sClientConnectionTimeout = "k8s-client-connection-timeout" - // EndpointStatusLog enables CiliumEndpoint.Status.Log - EndpointStatusLog = "log" + // K8sClientConnectionKeepAlive configures the keep alive duration for K8s client connections. + K8sClientConnectionKeepAlive = "k8s-client-connection-keep-alive" - // EndpointStatusState enables CiliumEndpoint.Status.State - EndpointStatusState = "state" + // K8sHeartbeatTimeout configures the timeout for apiserver heartbeat + K8sHeartbeatTimeout = "k8s-heartbeat-timeout" // EnableIPv4FragmentsTrackingName is the name of the option to enable // IPv4 fragments tracking for L4-based lookups. Needs LRU map support. @@ -1140,6 +1151,9 @@ const ( // VLANBPFBypass instructs Cilium to bypass bpf logic for vlan tagged packets VLANBPFBypass = "vlan-bpf-bypass" + // DisableExternalIPMitigation disable ExternalIP mitigation (CVE-2020-8554) + DisableExternalIPMitigation = "disable-external-ip-mitigation" + // EnableICMPRules enables ICMP-based rule support for Cilium Network Policies. EnableICMPRules = "enable-icmp-rules" @@ -1177,15 +1191,6 @@ const ( // Flag to enable BGP control plane features EnableBGPControlPlane = "enable-bgp-control-plane" - // EnvoySecretsNamespace is the namespace having secrets used by CEC. - EnvoySecretsNamespace = "envoy-secrets-namespace" - - // IngressSecretsNamespace is the namespace having tls secrets used by CEC, originating from Ingress controller. - IngressSecretsNamespace = "ingress-secrets-namespace" - - // GatewayAPISecretsNamespace is the namespace having tls secrets used by CEC, originating from Gateway API. - GatewayAPISecretsNamespace = "gateway-api-secrets-namespace" - // EnableRuntimeDeviceDetection is the name of the option to enable detection // of new and removed datapath devices during the agent runtime. EnableRuntimeDeviceDetection = "enable-runtime-device-detection" @@ -1207,6 +1212,22 @@ const ( // PolicyCIDRMatchMode defines the entities that CIDR selectors can reach PolicyCIDRMatchMode = "policy-cidr-match-mode" + + // EnableNodeSelectorLabels enables use of the node label based identity + EnableNodeSelectorLabels = "enable-node-selector-labels" + + // NodeLabels is the list of label prefixes used to determine identity of a node (requires enabling of + // EnableNodeSelectorLabels) + NodeLabels = "node-labels" + + // BPFEventsDropEnabled defines the DropNotification setting for any endpoint + BPFEventsDropEnabled = "bpf-events-drop-enabled" + + // BPFEventsPolicyVerdictEnabled defines the PolicyVerdictNotification setting for any endpoint + BPFEventsPolicyVerdictEnabled = "bpf-events-policy-verdict-enabled" + + // BPFEventsTraceEnabled defines the TraceNotification setting for any endpoint + BPFEventsTraceEnabled = "bpf-events-trace-enabled" ) // Default string arguments @@ -1227,49 +1248,10 @@ const ( RoutingModeTunnel = "tunnel" ) -// Envoy option names const ( - // HTTPNormalizePath switches on Envoy HTTP path normalization options, which currently - // includes RFC 3986 path normalization, Envoy merge slashes option, and unescaping and - // redirecting for paths that contain escaped slashes. These are necessary to keep path based - // access control functional, and should not interfere with normal operation. Set this to - // false only with caution. - HTTPNormalizePath = "http-normalize-path" - // HTTP403Message specifies the response body for 403 responses, defaults to "Access denied" HTTP403Message = "http-403-msg" - // HTTPRequestTimeout specifies the time in seconds after which forwarded requests time out - HTTPRequestTimeout = "http-request-timeout" - - // HTTPIdleTimeout spcifies the time in seconds if http stream being idle after which the - // request times out - HTTPIdleTimeout = "http-idle-timeout" - - // HTTPMaxGRPCTimeout specifies the maximum time in seconds that limits the values of - // "grpc-timeout" headers being honored. - HTTPMaxGRPCTimeout = "http-max-grpc-timeout" - - // HTTPRetryCount specifies the number of retries performed after a forwarded request fails - HTTPRetryCount = "http-retry-count" - - // HTTPRetryTimeout is the time in seconds before an uncompleted request is retried. - HTTPRetryTimeout = "http-retry-timeout" - - // ProxyConnectTimeout specifies the time in seconds after which a TCP connection attempt - // is considered timed out - ProxyConnectTimeout = "proxy-connect-timeout" - - // ProxyXffNumTrustedHopsIngress specifies the number of trusted hops regarding the x-forwarded-for and related HTTP headers for the ingress L7 policy enforcement Envoy listeners. - ProxyXffNumTrustedHopsIngress = "proxy-xff-num-trusted-hops-ingress" - - // ProxyXffNumTrustedHopsEgress specifies the number of trusted hops regarding the x-forwarded-for and related HTTP headers for the egress L7 policy enforcement Envoy listeners. - ProxyXffNumTrustedHopsEgress = "proxy-xff-num-trusted-hops-egress" - - // ProxyGID specifies the group ID that has access to unix domain sockets opened by Cilium - // agent for proxy configuration and access logging. - ProxyGID = "proxy-gid" - // ReadCNIConfiguration reads the CNI configuration file and extracts // Cilium relevant information. This can be used to pass per node // configuration to Cilium. @@ -1347,22 +1329,12 @@ const ( // NodePortAccelerationBestEffort means we accelerate NodePort via native XDP in the driver (preferred), but will skip devices without driver support NodePortAccelerationBestEffort = XDPModeBestEffort - // KubeProxyReplacementPartial specifies to enable only selected kube-proxy - // replacement features (might panic) - KubeProxyReplacementPartial = "partial" - - // KubeProxyReplacementStrict specifies to enable all kube-proxy replacement - // features (might panic) - KubeProxyReplacementStrict = "strict" - - // KubeProxyReplacementDisabled specified to completely disable kube-proxy - // replacement - KubeProxyReplacementDisabled = "disabled" - - // KubeProxyReplacementTrue has the same meaning as previous "strict". + // KubeProxyReplacementTrue specifies to enable all kube-proxy replacement + // features (might panic). KubeProxyReplacementTrue = "true" - // KubeProxyReplacementTrue has the same meaning as previous "partial". + // KubeProxyReplacementFalse specifies to enable only selected kube-proxy + // replacement features (might panic). KubeProxyReplacementFalse = "false" // KubeProxyReplacement healthz server bind address @@ -1426,21 +1398,24 @@ func LogRegisteredOptions(vp *viper.Viper, entry *logrus.Entry) { // DaemonConfig is the configuration used by Daemon. type DaemonConfig struct { + // Private sum of the config written to file. Used to check that the config is not changed + // after. + shaSum [32]byte + CreationTime time.Time - BpfDir string // BPF template files directory - LibDir string // Cilium library files directory - RunDir string // Cilium runtime directory - ExternalEnvoyProxy bool // Whether Envoy is deployed as external DaemonSet or not - devicesMu lock.RWMutex // Protects devices - devices []string // bpf_host device - DirectRoutingDevice string // Direct routing device (used by BPF NodePort and BPF Host Routing) - LBDevInheritIPAddr string // Device which IP addr used by bpf_host devices - EnableXDPPrefilter bool // Enable XDP-based prefiltering - XDPMode string // XDP mode, values: { xdpdrv | xdpgeneric | none } - HostV4Addr net.IP // Host v4 address of the snooping device - HostV6Addr net.IP // Host v6 address of the snooping device - EncryptInterface []string // Set of network facing interface to encrypt over - EncryptNode bool // Set to true for encrypting node IP traffic + BpfDir string // BPF template files directory + LibDir string // Cilium library files directory + RunDir string // Cilium runtime directory + ExternalEnvoyProxy bool // Whether Envoy is deployed as external DaemonSet or not + DirectRoutingDevice string // Direct routing device (used by BPF NodePort and BPF Host Routing) + LBDevInheritIPAddr string // Device which IP addr used by bpf_host devices + EnableXDPPrefilter bool // Enable XDP-based prefiltering + XDPMode string // XDP mode, values: { xdpdrv | xdpgeneric | none } + EnableTCX bool // Enable attaching endpoint programs using tcx if the kernel supports it + HostV4Addr net.IP // Host v4 address of the snooping device + HostV6Addr net.IP // Host v6 address of the snooping device + EncryptInterface []string // Set of network facing interface to encrypt over + EncryptNode bool // Set to true for encrypting node IP traffic // If set to true the daemon will detect new and deleted datapath devices // at runtime and reconfigure the datapath to load programs onto the new @@ -1455,10 +1430,6 @@ type DaemonConfig struct { // RestoreState enables restoring the state from previous running daemons. RestoreState bool - // EnableHostIPRestore enables restoring the host IPs based on state - // left behind by previous Cilium runs. - EnableHostIPRestore bool - KeepConfig bool // Keep configuration of existing endpoints when starting up. // AllowLocalhost defines when to allows the local stack to local endpoints @@ -1472,7 +1443,7 @@ type DaemonConfig struct { Opts *IntOptions // Mutex for serializing configuration updates to the daemon. - ConfigPatchMutex lock.RWMutex + ConfigPatchMutex *lock.RWMutex // Monitor contains the configuration for the node monitor. Monitor *models.MonitorStatus @@ -1596,69 +1567,10 @@ type DaemonConfig struct { // RunInterval. Zero means unlimited. MaxControllerInterval int - // HTTPNormalizePath switches on Envoy HTTP path normalization options, which currently - // includes RFC 3986 path normalization, Envoy merge slashes option, and unescaping and - // redirecting for paths that contain escaped slashes. These are necessary to keep path based - // access control functional, and should not interfere with normal operation. Set this to - // false only with caution. - HTTPNormalizePath bool - // HTTP403Message is the error message to return when a HTTP 403 is returned // by the proxy, if L7 policy is configured. HTTP403Message string - // HTTPRequestTimeout is the time in seconds after which Envoy responds with an - // error code on a request that has not yet completed. This needs to be longer - // than the HTTPIdleTimeout - HTTPRequestTimeout int - - // HTTPIdleTimeout is the time in seconds of a HTTP stream having no traffic after - // which Envoy responds with an error code. This needs to be shorter than the - // HTTPRequestTimeout - HTTPIdleTimeout int - - // HTTPMaxGRPCTimeout is the upper limit to which "grpc-timeout" headers in GRPC - // requests are honored by Envoy. If 0 there is no limit. GRPC requests are not - // bound by the HTTPRequestTimeout, but ARE affected by the idle timeout! - HTTPMaxGRPCTimeout int - - // HTTPRetryCount is the upper limit on how many times Envoy retries failed requests. - HTTPRetryCount int - - // HTTPRetryTimeout is the time in seconds before an uncompleted request is retried. - HTTPRetryTimeout int - - // ProxyConnectTimeout is the time in seconds after which Envoy considers a TCP - // connection attempt to have timed out. - ProxyConnectTimeout int - - // ProxyXffNumTrustedHopsIngress defines the number of trusted hops regarding the x-forwarded-for and related HTTP headers for the ingress L7 policy enforcement Envoy listeners. - ProxyXffNumTrustedHopsIngress uint32 - - // ProxyXffNumTrustedHopsEgress defines the number of trusted hops regarding the x-forwarded-for and related HTTP headers for the egress L7 policy enforcement Envoy listeners. - ProxyXffNumTrustedHopsEgress uint32 - - // ProxyGID specifies the group ID that has access to unix domain sockets opened by Cilium - // agent for proxy configuration and access logging. - ProxyGID int - - // ProxyPrometheusPort specifies the port to serve Envoy metrics on. - ProxyPrometheusPort int - - // ProxyMaxRequestsPerConnection specifies the max_requests_per_connection setting for the proxy - ProxyMaxRequestsPerConnection int - - // ProxyMaxConnectionDuration specifies the max_connection_duration setting for the proxy - ProxyMaxConnectionDuration time.Duration - - // ProxyIdleTimeout specifies the idle_timeout setting (in seconds), which applies - // for the connection from proxy to upstream cluster - ProxyIdleTimeout time.Duration - - // EnvoyLogPath specifies where to store the Envoy proxy logs when Envoy - // runs in the same container as Cilium. - EnvoyLogPath string - ProcFs string // K8sNamespace is the name of the namespace in which Cilium is @@ -1719,6 +1631,9 @@ type DaemonConfig struct { // EnableIPSecXfrmStateCaching enables IPSec XfrmState caching. EnableIPSecXfrmStateCaching bool + // EnableIPSecEncryptedOverlay enables IPSec encryption for overlay traffic. + EnableIPSecEncryptedOverlay bool + // EnableWireguard enables Wireguard encryption EnableWireguard bool @@ -1775,11 +1690,13 @@ type DaemonConfig struct { EnableSocketLBPeer bool EnablePolicy string EnableTracing bool + EnableIPIPTermination bool EnableUnreachableRoutes bool - EnvoyLog string - DisableEnvoyVersionCheck bool FixedIdentityMapping map[string]string FixedIdentityMappingValidator func(val string) (string, error) `json:"-"` + FixedZoneMapping map[string]uint8 + ReverseFixedZoneMapping map[uint8]string + FixedZoneMappingValidator func(val string) (string, error) `json:"-"` IPv4Range string IPv6Range string IPv4ServiceRange string @@ -1791,7 +1708,6 @@ type DaemonConfig struct { KVStoreOpt map[string]string LabelPrefixFile string Labels []string - LegacyTurnOffK8sEventHandover bool LogDriver []string LogOpt map[string]string Logstash bool @@ -1804,21 +1720,16 @@ type DaemonConfig struct { EnableBPFMasquerade bool EnableMasqueradeRouteSource bool EnableIPMasqAgent bool - DeriveMasqIPAddrFromDevice string IPMasqAgentConfigPath string EnableBPFClockProbe bool EnableIPv4EgressGateway bool EnableEnvoyConfig bool - EnableIngressController bool - EnableGatewayAPI bool - EnvoyConfigTimeout time.Duration InstallIptRules bool MonitorAggregation string PreAllocateMaps bool IPv6NodeAddr string IPv4NodeAddr string - SidecarIstioProxyImage string SocketPath string TracePayloadlen int Version string @@ -1895,6 +1806,10 @@ type DaemonConfig struct { // DNSProxyLockCount. DNSProxyLockTimeout time.Duration + // DNSProxySocketLingerTimeout defines how many seconds we wait for the connection + // between the DNS proxy and the upstream server to be closed. + DNSProxySocketLingerTimeout int + // EnableXTSocketFallback allows disabling of kernel's ip_early_demux // sysctl option if `xt_socket` kernel module is not available. EnableXTSocketFallback bool @@ -1907,6 +1822,10 @@ type DaemonConfig struct { // other nodes when available EnableAutoDirectRouting bool + // DirectRoutingSkipUnreachable skips installation of direct routes + // to nodes when they're not on the same L2 + DirectRoutingSkipUnreachable bool + // EnableLocalNodeRoute controls installation of the route which points // the allocation prefix of the local node. EnableLocalNodeRoute bool @@ -1946,9 +1865,6 @@ type DaemonConfig struct { // KVstoreConnectivityTimeout is the timeout when performing kvstore operations KVstoreConnectivityTimeout time.Duration - // IPAllocationTimeout is the timeout when allocating CIDRs - IPAllocationTimeout time.Duration - // IdentityChangeGracePeriod is the grace period that needs to pass // before an endpoint that has changed its identity will start using // that new identity. During the grace period, the new identity has @@ -1961,6 +1877,8 @@ type DaemonConfig struct { // unused after this time, they will be removed from the IP cache. Any of the restored // identities that are used in network policies will remain in the IP cache until all such // policies are removed. + // + // The default is 30 seconds for k8s clusters, and 10 minutes for kvstore clusters IdentityRestoreGracePeriod time.Duration // PolicyQueueSize is the size of the queues for the policy repository. @@ -2136,6 +2054,10 @@ type DaemonConfig struct { // CiliumNode resource for the local node AutoCreateCiliumNodeResource bool + // ExcludeNodeLabelPatterns allows for excluding unnecessary labels from being propagated from k8s node to cilium + // node object. This allows for avoiding unnecessary events being broadcast to all nodes in the cluster. + ExcludeNodeLabelPatterns []*regexp.Regexp + // IPv4NativeRoutingCIDR describes a CIDR in which pod IPs are routable IPv4NativeRoutingCIDR *cidr.CIDR @@ -2166,9 +2088,6 @@ type DaemonConfig struct { // control plane, e.g. when using the managed etcd feature EnableWellKnownIdentities bool - // EnableRemoteNodeIdentity enables use of the remote-node identity - EnableRemoteNodeIdentity bool - // Azure options // PolicyAuditMode enables non-drop mode for installed policies. In @@ -2176,6 +2095,9 @@ type DaemonConfig struct { // Policy related decisions can be checked via the poicy verdict messages. PolicyAuditMode bool + // PolicyAccounting enable policy accounting + PolicyAccounting bool + // EnableHubble specifies whether to enable the hubble server. EnableHubble bool @@ -2215,6 +2137,23 @@ type DaemonConfig struct { // HubbleMetricsServer specifies the addresses to serve Hubble metrics on. HubbleMetricsServer string + // HubbleMetricsServerTLSEnabled allows the Hubble metrics server to run on the given listen + // address with TLS. + HubbleMetricsServerTLSEnabled bool + + // HubbleMetricsServerTLSCertFile specifies the path to the public key file for the + // Hubble server. The file must contain PEM encoded data. + HubbleMetricsServerTLSCertFile string + + // HubbleMetricsServerTLSKeyFile specifies the path to the private key file for the + // Hubble server. The file must contain PEM encoded data. + HubbleMetricsServerTLSKeyFile string + + // HubbleMetricsServerTLSClientCAFiles specifies the path to one or more client CA + // certificates to use for TLS with mutual authentication (mTLS). The files + // must contain PEM encoded data. + HubbleMetricsServerTLSClientCAFiles []string + // HubbleMetrics specifies enabled metrics and their configuration options. HubbleMetrics []string @@ -2283,9 +2222,16 @@ type DaemonConfig struct { // HubbleRedactHttpHeadersDeny controls which http headers will be redacted from flows HubbleRedactHttpHeadersDeny []string - // EndpointStatus enables population of information in the - // CiliumEndpoint.Status resource - EndpointStatus map[string]struct{} + // HubbleDropEvents controls whether Hubble should create v1.Events + // for packet drops related to pods + HubbleDropEvents bool + + // HubbleDropEventsInterval controls the minimum time between emitting events + // with the same source and destination IP + HubbleDropEventsInterval time.Duration + + // HubbleDropEventsReasons controls which drop reasons to emit events for + HubbleDropEventsReasons []string // EnableIPv4FragmentsTracking enables IPv4 fragments tracking for // L4-based lookups. Needs LRU map support. @@ -2379,6 +2325,7 @@ type DaemonConfig struct { // ARPPingRefreshPeriod is the ARP entries refresher period. ARPPingRefreshPeriod time.Duration + // EnableCiliumEndpointSlice enables the cilium endpoint slicing feature. EnableCiliumEndpointSlice bool @@ -2387,6 +2334,10 @@ type DaemonConfig struct { // VLANBPFBypass list of explicitly allowed VLAN id's for bpf logic bypass VLANBPFBypass []int + + // DisableExternalIPMigration disable externalIP mitigation (CVE-2020-8554) + DisableExternalIPMitigation bool + // EnableL2NeighDiscovery determines if cilium should perform L2 neighbor // discovery. EnableL2NeighDiscovery bool @@ -2428,15 +2379,21 @@ type DaemonConfig struct { // Enables BGP control plane features. EnableBGPControlPlane bool - // EnvoySecretNamespaces for TLS secrets. Used by CiliumEnvoyConfig via SDS. - EnvoySecretNamespaces []string - // BPFMapEventBuffers has configuration on what BPF map event buffers to enabled // and configuration options for those. BPFMapEventBuffers map[string]string BPFMapEventBuffersValidator func(val string) (string, error) `json:"-"` bpfMapEventConfigs BPFEventBufferConfigs + // BPFEventsDropEnabled controls whether the Cilium datapath exposes "drop" events to Cilium monitor and Hubble. + BPFEventsDropEnabled bool + + // BPFEventsPolicyVerdictEnabled controls whether the Cilium datapath exposes "policy verdict" events to Cilium monitor and Hubble. + BPFEventsPolicyVerdictEnabled bool + + // BPFEventsTraceEnabled controls whether the Cilium datapath exposes "trace" events to Cilium monitor and Hubble. + BPFEventsTraceEnabled bool + // IPAMCiliumNodeUpdateRate is the maximum rate at which the CiliumNode custom // resource is updated. IPAMCiliumNodeUpdateRate time.Duration @@ -2462,6 +2419,17 @@ type DaemonConfig struct { // ServiceNoBackendResponse determines how we handle traffic to a service with no backends. ServiceNoBackendResponse string + + // EnableNodeSelectorLabels enables use of the node label based identity + EnableNodeSelectorLabels bool + + // NodeLabels is the list of label prefixes used to determine identity of a node (requires enabling of + // EnableNodeSelectorLabels) + NodeLabels []string + + // EnableSocketLBPodConnectionTermination enables the termination of connections from pods + // to deleted service backends when socket-LB is enabled + EnableSocketLBPodConnectionTermination bool } var ( @@ -2469,11 +2437,11 @@ var ( Config = &DaemonConfig{ CreationTime: time.Now(), Opts: NewIntOptions(&DaemonOptionLibrary), + ConfigPatchMutex: new(lock.RWMutex), Monitor: &models.MonitorStatus{Cpus: int64(runtime.NumCPU()), Npages: 64, Pagesize: int64(os.Getpagesize()), Lost: 0, Unknown: 0}, IPv6ClusterAllocCIDR: defaults.IPv6ClusterAllocCIDR, IPv6ClusterAllocCIDRBase: defaults.IPv6ClusterAllocCIDRBase, IPAMDefaultIPPool: defaults.IPAMDefaultIPPool, - EnableHostIPRestore: defaults.EnableHostIPRestore, EnableHealthChecking: defaults.EnableHealthChecking, EnableEndpointHealthChecking: defaults.EnableEndpointHealthChecking, EnableHealthCheckLoadBalancerIP: defaults.EnableHealthCheckLoadBalancerIP, @@ -2483,14 +2451,12 @@ var ( EnableIPv6NDP: defaults.EnableIPv6NDP, EnableSCTP: defaults.EnableSCTP, EnableL7Proxy: defaults.EnableL7Proxy, - EndpointStatus: make(map[string]struct{}), DNSMaxIPsPerRestoredRule: defaults.DNSMaxIPsPerRestoredRule, ToFQDNsMaxIPsPerHost: defaults.ToFQDNsMaxIPsPerHost, KVstorePeriodicSync: defaults.KVstorePeriodicSync, KVstoreConnectivityTimeout: defaults.KVstoreConnectivityTimeout, - IPAllocationTimeout: defaults.IPAllocationTimeout, IdentityChangeGracePeriod: defaults.IdentityChangeGracePeriod, - IdentityRestoreGracePeriod: defaults.IdentityRestoreGracePeriod, + IdentityRestoreGracePeriod: defaults.IdentityRestoreGracePeriodK8s, FixedIdentityMapping: make(map[string]string), KVStoreOpt: make(map[string]string), LogOpt: make(map[string]string), @@ -2514,7 +2480,11 @@ var ( EnableK8sNetworkPolicy: defaults.EnableK8sNetworkPolicy, PolicyCIDRMatchMode: defaults.PolicyCIDRMatchMode, MaxConnectedClusters: defaults.MaxConnectedClusters, - EnableEnvoyConfig: defaults.EnableEnvoyConfig, + + BPFEventsDropEnabled: defaults.BPFEventsDropEnabled, + BPFEventsPolicyVerdictEnabled: defaults.BPFEventsPolicyVerdictEnabled, + BPFEventsTraceEnabled: defaults.BPFEventsTraceEnabled, + EnableEnvoyConfig: defaults.EnableEnvoyConfig, } ) @@ -2548,24 +2518,6 @@ func (c *DaemonConfig) SetIPv6NativeRoutingCIDR(cidr *cidr.CIDR) { c.ConfigPatchMutex.Unlock() } -func (c *DaemonConfig) SetDevices(devices []string) { - c.devicesMu.Lock() - c.devices = devices - c.devicesMu.Unlock() -} - -func (c *DaemonConfig) GetDevices() []string { - c.devicesMu.RLock() - defer c.devicesMu.RUnlock() - return c.devices -} - -func (c *DaemonConfig) AppendDevice(dev string) { - c.devicesMu.Lock() - c.devices = append(c.devices, dev) - c.devicesMu.Unlock() -} - // IsExcludedLocalAddress returns true if the specified IP matches one of the // excluded local IP ranges func (c *DaemonConfig) IsExcludedLocalAddress(ip net.IP) bool { @@ -2623,7 +2575,18 @@ func (c *DaemonConfig) TunnelingEnabled() bool { // devices to implement some features. func (c *DaemonConfig) AreDevicesRequired() bool { return c.EnableNodePort || c.EnableHostFirewall || c.EnableWireguard || - c.EnableHighScaleIPcache || c.EnableL2Announcements || c.ForceDeviceRequired + c.EnableHighScaleIPcache || c.EnableL2Announcements || c.ForceDeviceRequired || + c.EnableIPSecEncryptedOverlay +} + +// When WG & encrypt-node are on, a NodePort BPF to-be forwarded request +// to a remote node running a selected service endpoint must be encrypted. +// To make the NodePort's rev-{S,D}NAT translations to happen for a reply +// from the remote node, we need to attach bpf_host to the Cilium's WG +// netdev (otherwise, the WG netdev after decrypting the reply will pass +// it to the stack which drops the packet). +func (c *DaemonConfig) NeedBPFHostOnWireGuardDevice() bool { + return c.EnableNodePort && c.EnableWireguard && c.EncryptNode } // MasqueradingEnabled returns true if either IPv4 or IPv6 masquerading is enabled. @@ -2655,12 +2618,6 @@ func (c *DaemonConfig) NodeIpsetNeeded() bool { return !c.TunnelingEnabled() && c.IptablesMasqueradingEnabled() } -// RemoteNodeIdentitiesEnabled returns true if the remote-node identity feature -// is enabled -func (c *DaemonConfig) RemoteNodeIdentitiesEnabled() bool { - return c.EnableRemoteNodeIdentity -} - // NodeEncryptionEnabled returns true if node encryption is enabled func (c *DaemonConfig) NodeEncryptionEnabled() bool { return c.EncryptNode @@ -2712,13 +2669,6 @@ func (c *DaemonConfig) UnreachableRoutesEnabled() bool { return c.EnableUnreachableRoutes } -// EndpointStatusIsEnabled returns true if a particular EndpointStatus* feature -// is enabled -func (c *DaemonConfig) EndpointStatusIsEnabled(option string) bool { - _, ok := c.EndpointStatus[option] - return ok -} - // CiliumNamespaceName returns the name of the namespace in which Cilium is // deployed in func (c *DaemonConfig) CiliumNamespaceName() string { @@ -2740,21 +2690,6 @@ func (c *DaemonConfig) K8sNetworkPolicyEnabled() bool { return c.EnableK8sNetworkPolicy } -// K8sEnvoyConfigEnabled returns true if CiliumEnvoyConfig feature is enabled in Cilium -func (c *DaemonConfig) K8sEnvoyConfigEnabled() bool { - return c.EnableEnvoyConfig -} - -// K8sIngressControllerEnabled returns true if ingress controller feature is enabled in Cilium -func (c *DaemonConfig) K8sIngressControllerEnabled() bool { - return c.EnableIngressController -} - -// K8sGatewayAPIEnabled returns true if Gateway API feature is enabled in Cilium -func (c *DaemonConfig) K8sGatewayAPIEnabled() bool { - return c.EnableGatewayAPI -} - func (c *DaemonConfig) PolicyCIDRMatchesNodes() bool { for _, mode := range c.PolicyCIDRMatchMode { if mode == "nodes" { @@ -2764,6 +2699,12 @@ func (c *DaemonConfig) PolicyCIDRMatchesNodes() bool { return false } +// PerNodeLabelsEnabled returns true if per-node labels feature +// is enabled +func (c *DaemonConfig) PerNodeLabelsEnabled() bool { + return c.EnableNodeSelectorLabels +} + func (c *DaemonConfig) validatePolicyCIDRMatchMode() error { // Currently, the only acceptable values is "nodes". for _, mode := range c.PolicyCIDRMatchMode { @@ -2876,7 +2817,7 @@ func (c *DaemonConfig) Validate(vp *viper.Viper) error { if !c.EnableIPv6 { return fmt.Errorf("IPv6NDP cannot be enabled when IPv6 is not enabled") } - if len(c.IPv6MCastDevice) == 0 && !MightAutoDetectDevices() { + if len(c.IPv6MCastDevice) == 0 { return fmt.Errorf("IPv6NDP cannot be enabled without %s", IPv6MCastDevice) } } @@ -2896,7 +2837,7 @@ func (c *DaemonConfig) Validate(vp *viper.Viper) error { if err := cinfo.InitClusterIDMax(); err != nil { return err } - if err := cinfo.Validate(); err != nil { + if err := cinfo.Validate(log); err != nil { return err } @@ -2923,13 +2864,6 @@ func (c *DaemonConfig) Validate(vp *viper.Viper) error { int64(defaults.KVstoreLeaseMaxTTL.Seconds())) } - allowedEndpointStatusValues := EndpointStatusValuesMap() - for enabledEndpointStatus := range c.EndpointStatus { - if _, ok := allowedEndpointStatusValues[enabledEndpointStatus]; !ok { - return fmt.Errorf("unknown endpoint-status option '%s'", enabledEndpointStatus) - } - } - if c.EnableVTEP { err := c.validateVTEP(vp) if err != nil { @@ -3076,16 +3010,18 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.WireguardPersistentKeepalive = vp.GetDuration(WireguardPersistentKeepalive) c.EnableWellKnownIdentities = vp.GetBool(EnableWellKnownIdentities) c.EnableXDPPrefilter = vp.GetBool(EnableXDPPrefilter) + c.EnableTCX = vp.GetBool(EnableTCX) c.DisableCiliumEndpointCRD = vp.GetBool(DisableCiliumEndpointCRDName) c.MasqueradeInterfaces = vp.GetStringSlice(MasqueradeInterfaces) c.EgressMasqueradeInterfaces = strings.Join(c.MasqueradeInterfaces, ",") c.BPFSocketLBHostnsOnly = vp.GetBool(BPFSocketLBHostnsOnly) c.EnableSocketLB = vp.GetBool(EnableSocketLB) c.EnableSocketLBTracing = vp.GetBool(EnableSocketLBTracing) - c.EnableRemoteNodeIdentity = vp.GetBool(EnableRemoteNodeIdentity) + c.EnableSocketLBPodConnectionTermination = vp.GetBool(EnableSocketLBPodConnectionTermination) c.EnableBPFTProxy = vp.GetBool(EnableBPFTProxy) c.EnableXTSocketFallback = vp.GetBool(EnableXTSocketFallbackName) c.EnableAutoDirectRouting = vp.GetBool(EnableAutoDirectRoutingName) + c.DirectRoutingSkipUnreachable = vp.GetBool(DirectRoutingSkipUnreachableName) c.EnableEndpointRoutes = vp.GetBool(EnableEndpointRoutes) c.EnableHealthChecking = vp.GetBool(EnableHealthChecking) c.EnableEndpointHealthChecking = vp.GetBool(EnableEndpointHealthChecking) @@ -3096,6 +3032,7 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.EnableExternalIPs = vp.GetBool(EnableExternalIPs) c.EnableL7Proxy = vp.GetBool(EnableL7Proxy) c.EnableTracing = vp.GetBool(EnableTracing) + c.EnableIPIPTermination = vp.GetBool(EnableIPIPTermination) c.EnableUnreachableRoutes = vp.GetBool(EnableUnreachableRoutes) c.EnableNodePort = vp.GetBool(EnableNodePort) c.EnableSVCSourceRangeCheck = vp.GetBool(EnableSVCSourceRangeCheck) @@ -3114,13 +3051,6 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.EnableLocalRedirectPolicy = vp.GetBool(EnableLocalRedirectPolicy) c.EncryptInterface = vp.GetStringSlice(EncryptInterface) c.EncryptNode = vp.GetBool(EncryptNode) - c.EnvoyLogPath = vp.GetString(EnvoyLog) - c.HTTPNormalizePath = vp.GetBool(HTTPNormalizePath) - c.HTTPIdleTimeout = vp.GetInt(HTTPIdleTimeout) - c.HTTPMaxGRPCTimeout = vp.GetInt(HTTPMaxGRPCTimeout) - c.HTTPRequestTimeout = vp.GetInt(HTTPRequestTimeout) - c.HTTPRetryCount = vp.GetInt(HTTPRetryCount) - c.HTTPRetryTimeout = vp.GetInt(HTTPRetryTimeout) c.IdentityChangeGracePeriod = vp.GetDuration(IdentityChangeGracePeriod) c.IdentityRestoreGracePeriod = vp.GetDuration(IdentityRestoreGracePeriod) c.IPAM = vp.GetString(IPAM) @@ -3136,7 +3066,6 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.K8sRequireIPv4PodCIDR = vp.GetBool(K8sRequireIPv4PodCIDRName) c.K8sRequireIPv6PodCIDR = vp.GetBool(K8sRequireIPv6PodCIDRName) c.K8sServiceCacheSize = uint(vp.GetInt(K8sServiceCacheSize)) - c.LegacyTurnOffK8sEventHandover = vp.GetBool(LegacyTurnOffK8sEventHandover) c.K8sSyncTimeout = vp.GetDuration(K8sSyncTimeoutName) c.AllocatorListTimeout = vp.GetDuration(AllocatorListTimeoutName) c.K8sWatcherEndpointSelector = vp.GetString(K8sWatcherEndpointSelector) @@ -3147,7 +3076,6 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.KVstorePeriodicSync = vp.GetDuration(KVstorePeriodicSync) c.KVstoreConnectivityTimeout = vp.GetDuration(KVstoreConnectivityTimeout) c.KVstoreMaxConsecutiveQuorumErrors = vp.GetUint(KVstoreMaxConsecutiveQuorumErrorsName) - c.IPAllocationTimeout = vp.GetDuration(IPAllocationTimeout) c.LabelPrefixFile = vp.GetString(LabelPrefixFile) c.Labels = vp.GetStringSlice(Labels) c.LibDir = vp.GetString(LibDir) @@ -3161,9 +3089,6 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.EnableIPMasqAgent = vp.GetBool(EnableIPMasqAgent) c.EnableIPv4EgressGateway = vp.GetBool(EnableIPv4EgressGateway) c.EnableEnvoyConfig = vp.GetBool(EnableEnvoyConfig) - c.EnableIngressController = vp.GetBool(EnableIngressController) - c.EnableGatewayAPI = vp.GetBool(EnableGatewayAPI) - c.EnvoyConfigTimeout = vp.GetDuration(EnvoyConfigTimeout) c.IPMasqAgentConfigPath = vp.GetString(IPMasqAgentConfigPath) c.InstallIptRules = vp.GetBool(InstallIptRules) c.IPSecKeyFile = vp.GetString(IPSecKeyFileName) @@ -3175,19 +3100,10 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.MTU = vp.GetInt(MTUName) c.PreAllocateMaps = vp.GetBool(PreAllocateMapsName) c.ProcFs = vp.GetString(ProcFs) - c.ProxyConnectTimeout = vp.GetInt(ProxyConnectTimeout) - c.ProxyXffNumTrustedHopsIngress = vp.GetUint32(ProxyXffNumTrustedHopsIngress) - c.ProxyXffNumTrustedHopsEgress = vp.GetUint32(ProxyXffNumTrustedHopsEgress) - c.ProxyGID = vp.GetInt(ProxyGID) - c.ProxyPrometheusPort = vp.GetInt(ProxyPrometheusPort) - c.ProxyMaxRequestsPerConnection = vp.GetInt(ProxyMaxRequestsPerConnection) - c.ProxyMaxConnectionDuration = time.Duration(vp.GetInt64(ProxyMaxConnectionDuration)) - c.ProxyIdleTimeout = time.Duration(vp.GetInt64(ProxyIdleTimeout)) c.RestoreState = vp.GetBool(Restore) c.RouteMetric = vp.GetInt(RouteMetric) c.RunDir = vp.GetString(StateDir) c.ExternalEnvoyProxy = vp.GetBool(ExternalEnvoyProxy) - c.SidecarIstioProxyImage = vp.GetString(SidecarIstioProxyImage) c.SocketPath = vp.GetString(SocketPath) c.TracePayloadlen = vp.GetInt(TracePayloadlen) c.Version = vp.GetString(Version) @@ -3200,6 +3116,7 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.CTMapEntriesTimeoutSYN = vp.GetDuration(CTMapEntriesTimeoutSYNName) c.CTMapEntriesTimeoutFIN = vp.GetDuration(CTMapEntriesTimeoutFINName) c.PolicyAuditMode = vp.GetBool(PolicyAuditModeArg) + c.PolicyAccounting = vp.GetBool(PolicyAccountingArg) c.EnableIPv4FragmentsTracking = vp.GetBool(EnableIPv4FragmentsTrackingName) c.FragmentsMapEntries = vp.GetInt(FragmentsMapEntriesName) c.CRDWaitTimeout = vp.GetDuration(CRDWaitTimeout) @@ -3221,10 +3138,13 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.EnableIPv6Masquerade = vp.GetBool(EnableIPv6Masquerade) && c.EnableIPv6 c.EnableBPFMasquerade = vp.GetBool(EnableBPFMasquerade) c.EnableMasqueradeRouteSource = vp.GetBool(EnableMasqueradeRouteSource) - c.DeriveMasqIPAddrFromDevice = vp.GetString(DeriveMasqIPAddrFromDevice) c.EnablePMTUDiscovery = vp.GetBool(EnablePMTUDiscovery) c.IPv6NAT46x64CIDR = defaults.IPv6NAT46x64CIDR c.IPAMCiliumNodeUpdateRate = vp.GetDuration(IPAMCiliumNodeUpdateRate) + c.BPFEventsDropEnabled = vp.GetBool(BPFEventsDropEnabled) + c.BPFEventsPolicyVerdictEnabled = vp.GetBool(BPFEventsPolicyVerdictEnabled) + c.BPFEventsTraceEnabled = vp.GetBool(BPFEventsTraceEnabled) + c.EnableIPSecEncryptedOverlay = vp.GetBool(EnableIPSecEncryptedOverlay) c.ServiceNoBackendResponse = vp.GetString(ServiceNoBackendResponse) switch c.ServiceNoBackendResponse { @@ -3236,7 +3156,6 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { } c.populateLoadBalancerSettings(vp) - c.populateDevices(vp) c.EnableRuntimeDeviceDetection = vp.GetBool(EnableRuntimeDeviceDetection) c.EgressMultiHomeIPRuleCompat = vp.GetBool(EgressMultiHomeIPRuleCompat) @@ -3250,6 +3169,8 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.VLANBPFBypass = append(c.VLANBPFBypass, vlanID) } + c.DisableExternalIPMitigation = vp.GetBool(DisableExternalIPMitigation) + tcFilterPrio := vp.GetUint32(TCFilterPriority) if tcFilterPrio > math.MaxUint16 { log.Fatalf("%s cannot be higher than %d", TCFilterPriority, math.MaxUint16) @@ -3330,6 +3251,10 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { "which can cause problems with performance, observability and policy", EnableAutoDirectRoutingName, IPv6NativeRoutingCIDR, IPv6NativeRoutingCIDR) } + if c.DirectRoutingSkipUnreachable && !c.EnableAutoDirectRouting { + log.Fatalf("Flag %s cannot be enabled when %s is not enabled. As if %s is then enabled, it may lead to unexpected behaviour causing network connectivity issues.", DirectRoutingSkipUnreachableName, EnableAutoDirectRoutingName, EnableAutoDirectRoutingName) + } + if err := c.calculateBPFMapSizes(vp); err != nil { log.Fatal(err) } @@ -3365,6 +3290,7 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.DNSProxyInsecureSkipTransparentModeCheck = vp.GetBool(DNSProxyInsecureSkipTransparentModeCheck) c.DNSProxyLockCount = vp.GetInt(DNSProxyLockCount) c.DNSProxyLockTimeout = vp.GetDuration(DNSProxyLockTimeout) + c.DNSProxySocketLingerTimeout = vp.GetInt(DNSProxySocketLingerTimeout) c.FQDNRejectResponse = vp.GetString(FQDNRejectResponseCode) // Convert IP strings into net.IPNet types @@ -3413,6 +3339,27 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.FixedIdentityMapping = m } + if m := command.GetStringMapString(vp, FixedZoneMapping); err != nil { + log.Fatalf("unable to parse %s: %s", FixedZoneMapping, err) + } else if len(m) != 0 { + forward := make(map[string]uint8, len(m)) + reverse := make(map[uint8]string, len(m)) + for k, v := range m { + bigN, _ := strconv.Atoi(v) + n := uint8(bigN) + if oldKey, ok := reverse[n]; ok && oldKey != k { + log.Fatalf("duplicate numeric ID entry for %s: %q and %q map to the same value %d", FixedZoneMapping, oldKey, k, n) + } + if oldN, ok := forward[k]; ok && oldN != n { + log.Fatalf("duplicate zone name entry for %s: %d and %d map to different values %s", FixedZoneMapping, oldN, n, k) + } + forward[k] = n + reverse[n] = k + } + c.FixedZoneMapping = forward + c.ReverseFixedZoneMapping = reverse + } + c.ConntrackGCInterval = vp.GetDuration(ConntrackGCInterval) c.ConntrackGCMaxInterval = vp.GetDuration(ConntrackGCMaxInterval) @@ -3443,10 +3390,6 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.NodeEncryptionOptOutLabels = sel } - for _, option := range vp.GetStringSlice(EndpointStatus) { - c.EndpointStatus[option] = struct{}{} - } - if err := c.parseExcludedLocalAddresses(vp.GetStringSlice(ExcludeLocalAddress)); err != nil { log.WithError(err).Fatalf("Unable to parse excluded local addresses") } @@ -3516,7 +3459,12 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.HubbleEventQueueSize = getDefaultMonitorQueueSize(runtime.NumCPU()) } c.HubbleMetricsServer = vp.GetString(HubbleMetricsServer) + c.HubbleMetricsServerTLSEnabled = vp.GetBool(HubbleMetricsTLSEnabled) + c.HubbleMetricsServerTLSCertFile = vp.GetString(HubbleMetricsTLSCertFile) + c.HubbleMetricsServerTLSKeyFile = vp.GetString(HubbleMetricsTLSKeyFile) + c.HubbleMetricsServerTLSClientCAFiles = vp.GetStringSlice(HubbleMetricsTLSClientCAFiles) c.HubbleMetrics = vp.GetStringSlice(HubbleMetrics) + c.HubbleExportFilePath = vp.GetString(HubbleExportFilePath) c.HubbleExportFileMaxSizeMB = vp.GetInt(HubbleExportFileMaxSizeMB) c.HubbleExportFileMaxBackups = vp.GetInt(HubbleExportFileMaxBackups) @@ -3567,6 +3515,9 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.HubbleRedactKafkaApiKey = vp.GetBool(HubbleRedactKafkaApiKey) c.HubbleRedactHttpHeadersAllow = vp.GetStringSlice(HubbleRedactHttpHeadersAllow) c.HubbleRedactHttpHeadersDeny = vp.GetStringSlice(HubbleRedactHttpHeadersDeny) + c.HubbleDropEvents = vp.GetBool(HubbleDropEvents) + c.HubbleDropEventsInterval = vp.GetDuration(HubbleDropEventsInterval) + c.HubbleDropEventsReasons = vp.GetStringSlice(HubbleDropEventsReasons) // Hidden options c.CompilerFlags = vp.GetStringSlice(CompilerFlags) @@ -3582,48 +3533,31 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) { c.BypassIPAvailabilityUponRestore = vp.GetBool(BypassIPAvailabilityUponRestore) c.EnableK8sTerminatingEndpoint = vp.GetBool(EnableK8sTerminatingEndpoint) - // Disable Envoy version check if L7 proxy is disabled. - c.DisableEnvoyVersionCheck = vp.GetBool(DisableEnvoyVersionCheck) - if !c.EnableL7Proxy { - c.DisableEnvoyVersionCheck = true - } - // VTEP integration enable option c.EnableVTEP = vp.GetBool(EnableVTEP) // Enable BGP control plane features c.EnableBGPControlPlane = vp.GetBool(EnableBGPControlPlane) - // Envoy secrets namespaces to watch - params := []string{EnvoySecretsNamespace, IngressSecretsNamespace, GatewayAPISecretsNamespace} - var nsList = make([]string, 0, len(params)) - for _, param := range params { - ns := vp.GetString(param) - if ns != "" { - nsList = append(nsList, ns) - } - } - c.EnvoySecretNamespaces = nsList - // To support K8s NetworkPolicy c.EnableK8sNetworkPolicy = vp.GetBool(EnableK8sNetworkPolicy) c.PolicyCIDRMatchMode = vp.GetStringSlice(PolicyCIDRMatchMode) -} - -func (c *DaemonConfig) populateDevices(vp *viper.Viper) { - c.devices = vp.GetStringSlice(Devices) + c.EnableNodeSelectorLabels = vp.GetBool(EnableNodeSelectorLabels) + c.NodeLabels = vp.GetStringSlice(NodeLabels) - // Make sure that devices are unique - if len(c.devices) <= 1 { - return - } - devSet := map[string]struct{}{} - for _, dev := range c.devices { - devSet[dev] = struct{}{} + // Parse node label patterns + nodeLabelPatterns := vp.GetStringSlice(ExcludeNodeLabelPatterns) + for _, pattern := range nodeLabelPatterns { + r, err := regexp.Compile(pattern) + if err != nil { + log.WithError(err).Errorf("Unable to compile exclude node label regex pattern %s", pattern) + continue + } + c.ExcludeNodeLabelPatterns = append(c.ExcludeNodeLabelPatterns, r) } - c.devices = make([]string, 0, len(devSet)) - for dev := range devSet { - c.devices = append(c.devices, dev) + + if c.KVStore != "" { + c.IdentityRestoreGracePeriod = defaults.IdentityRestoreGracePeriodKvstore } } @@ -3840,12 +3774,9 @@ func (c *DaemonConfig) checkIPAMDelegatedPlugin() error { if c.EnableEndpointHealthChecking { return fmt.Errorf("--%s must be disabled with --%s=%s", EnableEndpointHealthChecking, IPAM, ipamOption.IPAMDelegatedPlugin) } - // Ingress controller and envoy config require cilium-agent to create an IP address - // specifically for differentiating ingress and envoy traffic, which is not possible + // envoy config (Ingress, Gateway API, ...) require cilium-agent to create an IP address + // specifically for differentiating envoy traffic, which is not possible // with delegated IPAM. - if c.EnableIngressController { - return fmt.Errorf("--%s must be disabled with --%s=%s", EnableIngressController, IPAM, ipamOption.IPAMDelegatedPlugin) - } if c.EnableEnvoyConfig { return fmt.Errorf("--%s must be disabled with --%s=%s", EnableEnvoyConfig, IPAM, ipamOption.IPAMDelegatedPlugin) } @@ -3887,7 +3818,7 @@ func (c *DaemonConfig) calculateBPFMapSizes(vp *viper.Viper) error { // to 98% of the total memory being allocated for BPF maps. dynamicSizeRatio := vp.GetFloat64(MapEntriesGlobalDynamicSizeRatioName) if 0.0 < dynamicSizeRatio && dynamicSizeRatio <= 1.0 { - vms, err := mem.VirtualMemory() + vms, err := memory.Get() if err != nil || vms == nil { log.WithError(err).Fatal("Failed to get system memory") } @@ -4066,16 +3997,17 @@ func (c *DaemonConfig) KubeProxyReplacementFullyEnabled() bool { c.EnableSessionAffinity } +var backupFileNames []string = []string{ + "agent-runtime-config.json", + "agent-runtime-config-1.json", + "agent-runtime-config-2.json", +} + // StoreInFile stores the configuration in a the given directory under the file // name 'daemon-config.json'. If this file already exists, it is renamed to // 'daemon-config-1.json', if 'daemon-config-1.json' also exists, // 'daemon-config-1.json' is renamed to 'daemon-config-2.json' func (c *DaemonConfig) StoreInFile(dir string) error { - backupFileNames := []string{ - "agent-runtime-config.json", - "agent-runtime-config-1.json", - "agent-runtime-config-2.json", - } backupFiles(dir, backupFileNames) f, err := os.Create(backupFileNames[0]) if err != nil { @@ -4084,7 +4016,85 @@ func (c *DaemonConfig) StoreInFile(dir string) error { defer f.Close() e := json.NewEncoder(f) e.SetIndent("", " ") - return e.Encode(c) + + // Exclude concurrent modification of fields protected by c.ConfigPatchMutex + // we store the file + c.ConfigPatchMutex.RLock() + err = e.Encode(c) + c.shaSum = c.checksum() + c.ConfigPatchMutex.RUnlock() + + return err +} + +func (c *DaemonConfig) checksum() [32]byte { + // take a shallow copy for summing + sumConfig := *c + // Ignore variable parts + sumConfig.Opts = nil + cBytes, err := json.Marshal(&sumConfig) + if err != nil { + return [32]byte{} + } + return sha256.Sum256(cBytes) +} + +// ValidateUnchanged takes a context that is unused so that it can be used as a doFunc in a +// controller +func (c *DaemonConfig) ValidateUnchanged(context.Context) error { + // Exclude concurrent modification of fields protected by c.ConfigPatchMutex + // we store the file + c.ConfigPatchMutex.RLock() + sum := c.checksum() + c.ConfigPatchMutex.RUnlock() + + if sum != c.shaSum { + return c.diffFromFile() + } + return nil +} + +func (c *DaemonConfig) diffFromFile() error { + f, err := os.Open(backupFileNames[0]) + if err != nil { + return err + } + + fi, err := f.Stat() + if err != nil { + return err + } + + fileBytes := make([]byte, fi.Size()) + count, err := f.Read(fileBytes) + if err != nil { + return err + } + fileBytes = fileBytes[:count] + + var config DaemonConfig + err = json.Unmarshal(fileBytes, &config) + + var diff string + if err != nil { + diff = fmt.Errorf("unmarshal failed %q: %w", string(fileBytes), err).Error() + } else { + // Ignore all unexported fields during Diff. + // from https://github.com/google/go-cmp/issues/313#issuecomment-1315651560 + opts := cmp.FilterPath(func(p cmp.Path) bool { + sf, ok := p.Index(-1).(cmp.StructField) + if !ok { + return false + } + r, _ := utf8.DecodeRuneInString(sf.Name()) + return !unicode.IsUpper(r) + }, cmp.Ignore()) + + diff = cmp.Diff(&config, c, opts, + cmpopts.IgnoreTypes(&IntOptions{}), + cmpopts.IgnoreTypes(&OptionLibrary{})) + } + return fmt.Errorf("Config differs:\n%s", diff) } func (c *DaemonConfig) BGPControlPlaneEnabled() bool { @@ -4286,35 +4296,6 @@ func getDefaultMonitorQueueSize(numCPU int) int { return monitorQueueSize } -// EndpointStatusValues returns all available EndpointStatus option values -func EndpointStatusValues() []string { - return []string{ - EndpointStatusControllers, - EndpointStatusHealth, - EndpointStatusLog, - EndpointStatusPolicy, - EndpointStatusState, - } -} - -// EndpointStatusValuesMap returns all EndpointStatus option values as a map -func EndpointStatusValuesMap() (values map[string]struct{}) { - values = map[string]struct{}{} - for _, v := range EndpointStatusValues() { - values[v] = struct{}{} - } - return -} - -// MightAutoDetectDevices returns true if the device auto-detection might take -// place. -func MightAutoDetectDevices() bool { - devices := Config.GetDevices() - return ((Config.EnableHostFirewall || Config.EnableWireguard || Config.EnableHighScaleIPcache) && len(devices) == 0) || - (Config.KubeProxyReplacement != KubeProxyReplacementDisabled && - (len(devices) == 0 || Config.DirectRoutingDevice == "")) -} - // BPFEventBufferConfig contains parsed configuration for a bpf map event buffer. type BPFEventBufferConfig struct { Enabled bool @@ -4389,3 +4370,11 @@ func (d *DaemonConfig) EnforceLXCFibLookup() bool { // have auto-device detection on by default. return d.EnableEndpointRoutes } + +func (d *DaemonConfig) GetZone(id uint8) string { + return d.ReverseFixedZoneMapping[id] +} + +func (d *DaemonConfig) GetZoneID(zone string) uint8 { + return d.FixedZoneMapping[zone] +} diff --git a/vendor/github.com/cilium/cilium/pkg/option/daemon.go b/vendor/github.com/cilium/cilium/pkg/option/daemon.go index 3e5ffd368dc..d5ad6266e23 100644 --- a/vendor/github.com/cilium/cilium/pkg/option/daemon.go +++ b/vendor/github.com/cilium/cilium/pkg/option/daemon.go @@ -16,6 +16,7 @@ var ( DaemonMutableOptionLibrary = OptionLibrary{ ConntrackAccounting: &specConntrackAccounting, + PolicyAccounting: &specPolicyAccounting, ConntrackLocal: &specConntrackLocal, Debug: &specDebug, DebugLB: &specDebugLB, diff --git a/vendor/github.com/cilium/cilium/pkg/option/endpoint.go b/vendor/github.com/cilium/cilium/pkg/option/endpoint.go index 29e579368ba..b72049ebe39 100644 --- a/vendor/github.com/cilium/cilium/pkg/option/endpoint.go +++ b/vendor/github.com/cilium/cilium/pkg/option/endpoint.go @@ -6,6 +6,7 @@ package option var ( endpointMutableOptionLibrary = OptionLibrary{ ConntrackAccounting: &specConntrackAccounting, + PolicyAccounting: &specPolicyAccounting, ConntrackLocal: &specConntrackLocal, Debug: &specDebug, DebugLB: &specDebugLB, diff --git a/vendor/github.com/cilium/cilium/pkg/option/runtime_options.go b/vendor/github.com/cilium/cilium/pkg/option/runtime_options.go index 07cb16dde4e..a5da6f27375 100644 --- a/vendor/github.com/cilium/cilium/pkg/option/runtime_options.go +++ b/vendor/github.com/cilium/cilium/pkg/option/runtime_options.go @@ -15,6 +15,7 @@ const ( TraceSockNotify = "TraceSockNotification" PolicyVerdictNotify = "PolicyVerdictNotification" PolicyAuditMode = "PolicyAuditMode" + PolicyAccounting = "PolicyAccounting" MonitorAggregation = "MonitorAggregationLevel" SourceIPVerification = "SourceIPVerification" AlwaysEnforce = "always" @@ -60,6 +61,11 @@ var ( Description: "Enable trace notifications", } + specPolicyAccounting = Option{ + Define: "POLICY_ACCOUNTING", + Description: "Enable policy accounting ", + } + specPolicyVerdictNotify = Option{ Define: "POLICY_VERDICT_NOTIFY", Description: "Enable policy verdict notifications", diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/cidr.go b/vendor/github.com/cilium/cilium/pkg/policy/api/cidr.go deleted file mode 100644 index e9df0560941..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/cidr.go +++ /dev/null @@ -1,200 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "net" - "net/netip" - "strings" - - "github.com/cilium/cilium/pkg/ip" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/option" -) - -// +kubebuilder:validation:Pattern=`^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/([0-9]|[1-2][0-9]|3[0-2])$|^s*((([0-9A-Fa-f]{1,4}:){7}(:|([0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){6}:([0-9A-Fa-f]{1,4})?)|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){0,1}):([0-9A-Fa-f]{1,4})?))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){0,2}):([0-9A-Fa-f]{1,4})?))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){0,3}):([0-9A-Fa-f]{1,4})?))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){0,4}):([0-9A-Fa-f]{1,4})?))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){0,5}):([0-9A-Fa-f]{1,4})?))|(:(:|((:[0-9A-Fa-f]{1,4}){1,7}))))(%.+)?s*/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])$` - -// CIDR specifies a block of IP addresses. -// Example: 192.0.2.1/32 -type CIDR string - -var ( - ipv4All = CIDR("0.0.0.0/0") - ipv6All = CIDR("::/0") -) - -// CIDRRule is a rule that specifies a CIDR prefix to/from which outside -// communication is allowed, along with an optional list of subnets within that -// CIDR prefix to/from which outside communication is not allowed. -type CIDRRule struct { - // CIDR is a CIDR prefix / IP Block. - // - // +kubebuilder:validation:OneOf - Cidr CIDR `json:"cidr,omitempty"` - - // CIDRGroupRef is a reference to a CiliumCIDRGroup object. - // A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to - // the rule, can (Ingress) or cannot (IngressDeny) receive connections from. - // - // +kubebuilder:validation:OneOf - CIDRGroupRef CIDRGroupRef `json:"cidrGroupRef,omitempty"` - - // ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule - // is not allowed to initiate connections to. These CIDR prefixes should be - // contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not - // supported yet. - // These exceptions are only applied to the Cidr in this CIDRRule, and do not - // apply to any other CIDR prefixes in any other CIDRRules. - // - // +kubebuilder:validation:Optional - ExceptCIDRs []CIDR `json:"except,omitempty"` - - // Generated indicates whether the rule was generated based on other rules - // or provided by user - Generated bool `json:"-"` -} - -// String converts the CIDRRule into a human-readable string. -func (r CIDRRule) String() string { - exceptCIDRs := "" - if len(r.ExceptCIDRs) > 0 { - exceptCIDRs = "-" + CIDRSlice(r.ExceptCIDRs).String() - } - return string(r.Cidr) + exceptCIDRs -} - -// CIDRSlice is a slice of CIDRs. It allows receiver methods to be defined for -// transforming the slice into other convenient forms such as -// EndpointSelectorSlice. -type CIDRSlice []CIDR - -// GetAsEndpointSelectors returns the provided CIDR slice as a slice of -// endpoint selectors -func (s CIDRSlice) GetAsEndpointSelectors() EndpointSelectorSlice { - // If multiple CIDRs representing reserved:world are in this CIDRSlice, - // we only have to add the EndpointSelector representing reserved:world - // once. - var hasIPv4AllBeenAdded, hasIPv6AllBeenAdded bool - slice := EndpointSelectorSlice{} - for _, cidr := range s { - if cidr == ipv4All { - hasIPv4AllBeenAdded = true - } - if cidr == ipv6All { - hasIPv6AllBeenAdded = true - } - lbl, err := labels.IPStringToLabel(string(cidr)) - if err == nil { - slice = append(slice, NewESFromLabels(lbl)) - } - // TODO: Log the error? - } - - if option.Config.IsDualStack() { - // If Cilium is in dual-stack mode then world-ipv4 and - // world-ipv6 need to be distinguished from one another. - if hasIPv4AllBeenAdded && hasIPv6AllBeenAdded { - slice = append(slice, ReservedEndpointSelectors[labels.IDNameWorld]) - } - if hasIPv4AllBeenAdded { - slice = append(slice, ReservedEndpointSelectors[labels.IDNameWorldIPv4]) - } - if hasIPv6AllBeenAdded { - slice = append(slice, ReservedEndpointSelectors[labels.IDNameWorldIPv6]) - } - } else if option.Config.EnableIPv4 && hasIPv4AllBeenAdded { - slice = append(slice, ReservedEndpointSelectors[labels.IDNameWorld]) - } else if option.Config.EnableIPv6 && hasIPv6AllBeenAdded { - slice = append(slice, ReservedEndpointSelectors[labels.IDNameWorld]) - } - return slice -} - -// StringSlice returns the CIDR slice as a slice of strings. -func (s CIDRSlice) StringSlice() []string { - result := make([]string, 0, len(s)) - for _, c := range s { - result = append(result, string(c)) - } - return result -} - -// String converts the CIDRSlice into a human-readable string. -func (s CIDRSlice) String() string { - if len(s) == 0 { - return "" - } - return "[" + strings.Join(s.StringSlice(), ",") + "]" -} - -// CIDRRuleSlice is a slice of CIDRRules. It allows receiver methods to be -// defined for transforming the slice into other convenient forms such as -// EndpointSelectorSlice. -type CIDRRuleSlice []CIDRRule - -// GetAsEndpointSelectors returns the provided CIDRRule slice as a slice of -// endpoint selectors -func (s CIDRRuleSlice) GetAsEndpointSelectors() EndpointSelectorSlice { - cidrs := ComputeResultantCIDRSet(s) - return cidrs.GetAsEndpointSelectors() -} - -// StringSlice returns the CIDRRuleSlice as a slice of strings. -func (s CIDRRuleSlice) StringSlice() []string { - result := make([]string, 0, len(s)) - for _, c := range s { - result = append(result, c.String()) - } - return result -} - -// ComputeResultantCIDRSet converts a slice of CIDRRules into a slice of -// individual CIDRs. This expands the cidr defined by each CIDRRule, applies -// the CIDR exceptions defined in "ExceptCIDRs", and forms a minimal set of -// CIDRs that cover all of the CIDRRules. -// -// Assumes no error checking is necessary as CIDRRule.Sanitize already does this. -func ComputeResultantCIDRSet(cidrs CIDRRuleSlice) CIDRSlice { - var allResultantAllowedCIDRs CIDRSlice - for _, s := range cidrs { - _, allowNet, _ := net.ParseCIDR(string(s.Cidr)) - - var removeSubnets []*net.IPNet - for _, t := range s.ExceptCIDRs { - _, removeSubnet, _ := net.ParseCIDR(string(t)) - removeSubnets = append(removeSubnets, removeSubnet) - } - resultantAllowedCIDRs := ip.RemoveCIDRs([]*net.IPNet{allowNet}, removeSubnets) - - for _, u := range resultantAllowedCIDRs { - allResultantAllowedCIDRs = append(allResultantAllowedCIDRs, CIDR(u.String())) - } - } - return allResultantAllowedCIDRs -} - -// addrsToCIDRRules generates CIDRRules for the IPs passed in. -// This function will mark the rule to Generated true by default. -func addrsToCIDRRules(addrs []netip.Addr) []CIDRRule { - cidrRules := make([]CIDRRule, 0, len(addrs)) - for _, addr := range addrs { - rule := CIDRRule{ExceptCIDRs: make([]CIDR, 0)} - rule.Generated = true - if addr.Is4() { - rule.Cidr = CIDR(addr.String() + "/32") - } else { - rule.Cidr = CIDR(addr.String() + "/128") - } - cidrRules = append(cidrRules, rule) - } - return cidrRules -} - -// +kubebuilder:validation:MaxLength=253 -// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$` -// -// CIDRGroupRef is a reference to a CIDR Group. -// A CIDR Group is a list of CIDRs whose IP addresses should be considered as a -// same entity when applying fromCIDRGroupRefs policies on incoming network traffic. -type CIDRGroupRef string diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/decision.go b/vendor/github.com/cilium/cilium/pkg/policy/api/decision.go deleted file mode 100644 index 3a05b3adaab..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/decision.go +++ /dev/null @@ -1,68 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "fmt" -) - -// Decision is a reachability policy decision -type Decision byte - -const ( - // Undecided means that we have not come to a decision yet - Undecided Decision = iota - // Allowed means that reachability is allowed - Allowed - // Denied means that reachability is denied - Denied -) - -var ( - decisionToString = map[Decision]string{ - Undecided: "undecided", - Allowed: "allowed", - Denied: "denied", - } - stringToDecision = map[string]Decision{ - "undecided": Undecided, - "allowed": Allowed, - "denied": Denied, - } -) - -// String returns the decision in human readable format -func (d Decision) String() string { - if v, exists := decisionToString[d]; exists { - return v - } - return "" -} - -// UnmarshalJSON parses a JSON formatted buffer and returns a decision -func (d *Decision) UnmarshalJSON(b []byte) error { - if d == nil { - d = new(Decision) - } - if len(b) <= len(`""`) { - return fmt.Errorf("invalid decision '%s'", string(b)) - } - if v, exists := stringToDecision[string(b[1:len(b)-1])]; exists { - *d = v - return nil - } - - return fmt.Errorf("unknown '%s' decision", string(b)) -} - -// MarshalJSON returns the decision as JSON formatted buffer -func (d Decision) MarshalJSON() ([]byte, error) { - s := d.String() - // length of decision string plus two `"` - b := make([]byte, len(s)+2) - b[0] = '"' - copy(b[1:], s) - b[len(b)-1] = '"' - return b, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/doc.go b/vendor/github.com/cilium/cilium/pkg/policy/api/doc.go deleted file mode 100644 index ef8723992fd..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:deepcopy-gen=package -// +k8s:openapi-gen=true -// +deepequal-gen=package - -// Package api defines the API of the Cilium network policy interface -// +groupName=policy -package api diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/egress.go b/vendor/github.com/cilium/cilium/pkg/policy/api/egress.go deleted file mode 100644 index f4eac3d7210..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/egress.go +++ /dev/null @@ -1,370 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "context" - - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// EgressCommonRule is a rule that shares some of its fields across the -// EgressRule and EgressDenyRule. It's publicly exported so the code generators -// can generate code for this structure. -type EgressCommonRule struct { - // ToEndpoints is a list of endpoints identified by an EndpointSelector to - // which the endpoints subject to the rule are allowed to communicate. - // - // Example: - // Any endpoint with the label "role=frontend" can communicate with any - // endpoint carrying the label "role=backend". - // - // +kubebuilder:validation:Optional - ToEndpoints []EndpointSelector `json:"toEndpoints,omitempty"` - - // ToRequires is a list of additional constraints which must be met - // in order for the selected endpoints to be able to connect to other - // endpoints. These additional constraints do no by itself grant access - // privileges and must always be accompanied with at least one matching - // ToEndpoints. - // - // Example: - // Any Endpoint with the label "team=A" requires any endpoint to which it - // communicates to also carry the label "team=A". - // - // +kubebuilder:validation:Optional - ToRequires []EndpointSelector `json:"toRequires,omitempty"` - - // ToCIDR is a list of IP blocks which the endpoint subject to the rule - // is allowed to initiate connections. Only connections destined for - // outside of the cluster and not targeting the host will be subject - // to CIDR rules. This will match on the destination IP address of - // outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet - // with no ExcludeCIDRs is equivalent. Overlaps are allowed between - // ToCIDR and ToCIDRSet. - // - // Example: - // Any endpoint with the label "app=database-proxy" is allowed to - // initiate connections to 10.2.3.0/24 - // - // +kubebuilder:validation:Optional - ToCIDR CIDRSlice `json:"toCIDR,omitempty"` - - // ToCIDRSet is a list of IP blocks which the endpoint subject to the rule - // is allowed to initiate connections to in addition to connections - // which are allowed via ToEndpoints, along with a list of subnets contained - // within their corresponding IP block to which traffic should not be - // allowed. This will match on the destination IP address of outgoing - // connections. Adding a prefix into ToCIDR or into ToCIDRSet with no - // ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and - // ToCIDRSet. - // - // Example: - // Any endpoint with the label "app=database-proxy" is allowed to - // initiate connections to 10.2.3.0/24 except from IPs in subnet 10.2.3.0/28. - // - // +kubebuilder:validation:Optional - ToCIDRSet CIDRRuleSlice `json:"toCIDRSet,omitempty"` - - // ToEntities is a list of special entities to which the endpoint subject - // to the rule is allowed to initiate connections. Supported entities are - // `world`, `cluster`,`host`,`remote-node`,`kube-apiserver`, `init`, - // `health`,`unmanaged` and `all`. - // - // +kubebuilder:validation:Optional - ToEntities EntitySlice `json:"toEntities,omitempty"` - - // ToServices is a list of services to which the endpoint subject - // to the rule is allowed to initiate connections. - // Currently Cilium only supports toServices for K8s services without - // selectors. - // - // Example: - // Any endpoint with the label "app=backend-app" is allowed to - // initiate connections to all cidrs backing the "external-service" service - // - // +kubebuilder:validation:Optional - ToServices []Service `json:"toServices,omitempty"` - - // ToGroups is a directive that allows the integration with multiple outside - // providers. Currently, only AWS is supported, and the rule can select by - // multiple sub directives: - // - // Example: - // toGroups: - // - aws: - // securityGroupsIds: - // - 'sg-XXXXXXXXXXXXX' - // - // +kubebuilder:validation:Optional - ToGroups []ToGroups `json:"toGroups,omitempty"` - - // TODO: Move this to the policy package - // (https://github.com/cilium/cilium/issues/8353) - aggregatedSelectors EndpointSelectorSlice `json:"-"` -} - -// EgressRule contains all rule types which can be applied at egress, i.e. -// network traffic that originates inside the endpoint and exits the endpoint -// selected by the endpointSelector. -// -// - All members of this structure are optional. If omitted or empty, the -// member will have no effect on the rule. -// -// - If multiple members of the structure are specified, then all members -// must match in order for the rule to take effect. The exception to this -// rule is the ToRequires member; the effects of any Requires field in any -// rule will apply to all other rules as well. -// -// - ToEndpoints, ToCIDR, ToCIDRSet, ToEntities, ToServices and ToGroups are -// mutually exclusive. Only one of these members may be present within an -// individual rule. -type EgressRule struct { - EgressCommonRule `json:",inline"` - - // ToPorts is a list of destination ports identified by port number and - // protocol which the endpoint subject to the rule is allowed to - // connect to. - // - // Example: - // Any endpoint with the label "role=frontend" is allowed to initiate - // connections to destination port 8080/tcp - // - // +kubebuilder:validation:Optional - ToPorts PortRules `json:"toPorts,omitempty"` - - // ToFQDN allows whitelisting DNS names in place of IPs. The IPs that result - // from DNS resolution of `ToFQDN.MatchName`s are added to the same - // EgressRule object as ToCIDRSet entries, and behave accordingly. Any L4 and - // L7 rules within this EgressRule will also apply to these IPs. - // The DNS -> IP mapping is re-resolved periodically from within the - // cilium-agent, and the IPs in the DNS response are effected in the policy - // for selected pods as-is (i.e. the list of IPs is not modified in any way). - // Note: An explicit rule to allow for DNS traffic is needed for the pods, as - // ToFQDN counts as an egress rule and will enforce egress policy when - // PolicyEnforcment=default. - // Note: If the resolved IPs are IPs within the kubernetes cluster, the - // ToFQDN rule will not apply to that IP. - // Note: ToFQDN cannot occur in the same policy as other To* rules. - // - // +kubebuilder:validation:Optional - ToFQDNs FQDNSelectorSlice `json:"toFQDNs,omitempty"` - - // ICMPs is a list of ICMP rule identified by type number - // which the endpoint subject to the rule is allowed to connect to. - // - // Example: - // Any endpoint with the label "app=httpd" is allowed to initiate - // type 8 ICMP connections. - // - // +kubebuilder:validation:Optional - ICMPs ICMPRules `json:"icmps,omitempty"` - - // Authentication is the required authentication type for the allowed traffic, if any. - // - // +kubebuilder:validation:Optional - Authentication *Authentication `json:"authentication,omitempty"` -} - -// EgressDenyRule contains all rule types which can be applied at egress, i.e. -// network traffic that originates inside the endpoint and exits the endpoint -// selected by the endpointSelector. -// -// - All members of this structure are optional. If omitted or empty, the -// member will have no effect on the rule. -// -// - If multiple members of the structure are specified, then all members -// must match in order for the rule to take effect. The exception to this -// rule is the ToRequires member; the effects of any Requires field in any -// rule will apply to all other rules as well. -// -// - ToEndpoints, ToCIDR, ToCIDRSet, ToEntities, ToServices and ToGroups are -// mutually exclusive. Only one of these members may be present within an -// individual rule. -type EgressDenyRule struct { - EgressCommonRule `json:",inline"` - - // ToPorts is a list of destination ports identified by port number and - // protocol which the endpoint subject to the rule is not allowed to connect - // to. - // - // Example: - // Any endpoint with the label "role=frontend" is not allowed to initiate - // connections to destination port 8080/tcp - // - // +kubebuilder:validation:Optional - ToPorts PortDenyRules `json:"toPorts,omitempty"` - - // ICMPs is a list of ICMP rule identified by type number - // which the endpoint subject to the rule is not allowed to connect to. - // - // Example: - // Any endpoint with the label "app=httpd" is not allowed to initiate - // type 8 ICMP connections. - // - // +kubebuilder:validation:Optional - ICMPs ICMPRules `json:"icmps,omitempty"` -} - -// SetAggregatedSelectors creates a single slice containing all of the following -// fields within the EgressCommonRule, converted to EndpointSelector, to be -// stored by the caller of the EgressCommonRule for easy lookup while performing -// policy evaluation for the rule: -// * ToEntities -// * ToCIDR -// * ToCIDRSet -// * ToFQDNs -// -// ToEndpoints is not aggregated due to requirement folding in -// GetDestinationEndpointSelectorsWithRequirements() -func (e *EgressCommonRule) getAggregatedSelectors() EndpointSelectorSlice { - res := make(EndpointSelectorSlice, 0, len(e.ToEntities)+len(e.ToCIDR)+len(e.ToCIDRSet)) - res = append(res, e.ToEntities.GetAsEndpointSelectors()...) - res = append(res, e.ToCIDR.GetAsEndpointSelectors()...) - res = append(res, e.ToCIDRSet.GetAsEndpointSelectors()...) - return res -} - -// SetAggregatedSelectors creates a single slice containing all of the following -// fields within the EgressRule, converted to EndpointSelector, to be stored -// within the EgressRule for easy lookup while performing policy evaluation -// for the rule: -// * ToEntities -// * ToCIDR -// * ToCIDRSet -// * ToFQDNs -// -// ToEndpoints is not aggregated due to requirement folding in -// GetDestinationEndpointSelectorsWithRequirements() -func (e *EgressRule) SetAggregatedSelectors() { - ess := e.getAggregatedSelectors() - ess = append(ess, e.ToFQDNs.GetAsEndpointSelectors()...) - e.aggregatedSelectors = ess -} - -// SetAggregatedSelectors creates a single slice containing all of the following -// fields within the EgressRule, converted to EndpointSelector, to be stored -// within the EgressRule for easy lookup while performing policy evaluation -// for the rule: -// * ToEntities -// * ToCIDR -// * ToCIDRSet -// * ToFQDNs -// -// ToEndpoints is not aggregated due to requirement folding in -// GetDestinationEndpointSelectorsWithRequirements() -func (e *EgressCommonRule) SetAggregatedSelectors() { - e.aggregatedSelectors = e.getAggregatedSelectors() -} - -// GetDestinationEndpointSelectorsWithRequirements returns a slice of endpoints selectors covering -// all L3 dst selectors of the egress rule -func (e *EgressRule) GetDestinationEndpointSelectorsWithRequirements(requirements []slim_metav1.LabelSelectorRequirement) EndpointSelectorSlice { - if e.aggregatedSelectors == nil { - e.SetAggregatedSelectors() - } - return e.EgressCommonRule.getDestinationEndpointSelectorsWithRequirements(requirements) -} - -// GetDestinationEndpointSelectorsWithRequirements returns a slice of endpoints selectors covering -// all L3 source selectors of the ingress rule -func (e *EgressDenyRule) GetDestinationEndpointSelectorsWithRequirements(requirements []slim_metav1.LabelSelectorRequirement) EndpointSelectorSlice { - if e.aggregatedSelectors == nil { - e.SetAggregatedSelectors() - } - return e.EgressCommonRule.getDestinationEndpointSelectorsWithRequirements(requirements) -} - -// GetDestinationEndpointSelectorsWithRequirements returns a slice of endpoints selectors covering -// all L3 source selectors of the ingress rule -func (e *EgressCommonRule) getDestinationEndpointSelectorsWithRequirements( - requirements []slim_metav1.LabelSelectorRequirement, -) EndpointSelectorSlice { - - res := make(EndpointSelectorSlice, 0, len(e.ToEndpoints)+len(e.aggregatedSelectors)) - - if len(requirements) > 0 && len(e.ToEndpoints) > 0 { - for idx := range e.ToEndpoints { - sel := *e.ToEndpoints[idx].DeepCopy() - sel.MatchExpressions = append(sel.MatchExpressions, requirements...) - sel.SyncRequirementsWithLabelSelector() - // Even though this string is deep copied, we need to override it - // because we are updating the contents of the MatchExpressions. - sel.cachedLabelSelectorString = sel.LabelSelector.String() - res = append(res, sel) - } - } else { - res = append(res, e.ToEndpoints...) - } - return append(res, e.aggregatedSelectors...) -} - -// AllowsWildcarding returns true if wildcarding should be performed upon -// policy evaluation for the given rule. -func (e *EgressRule) AllowsWildcarding() bool { - return e.EgressCommonRule.AllowsWildcarding() && len(e.ToFQDNs) == 0 -} - -// AllowsWildcarding returns true if wildcarding should be performed upon -// policy evaluation for the given rule. -func (e *EgressCommonRule) AllowsWildcarding() bool { - return len(e.ToRequires)+len(e.ToServices) == 0 -} - -// RequiresDerivative returns true when the EgressCommonRule contains sections -// that need a derivative policy created in order to be enforced -// (e.g. ToGroups). -func (e *EgressCommonRule) RequiresDerivative() bool { - return len(e.ToGroups) > 0 -} - -// CreateDerivative will return a new rule based on the data gathered by the -// rules that creates a new derivative policy. -// In the case of ToGroups will call outside using the groups callback and this -// function can take a bit of time. -func (e *EgressRule) CreateDerivative(ctx context.Context) (*EgressRule, error) { - newRule := e.DeepCopy() - if !e.RequiresDerivative() { - return newRule, nil - } - newRule.ToCIDRSet = make(CIDRRuleSlice, 0, len(e.ToGroups)) - for _, group := range e.ToGroups { - cidrSet, err := group.GetCidrSet(ctx) - if err != nil { - return &EgressRule{}, err - } - if len(cidrSet) == 0 { - return &EgressRule{}, nil - } - newRule.ToCIDRSet = append(e.ToCIDRSet, cidrSet...) - } - newRule.ToGroups = nil - e.SetAggregatedSelectors() - return newRule, nil -} - -// CreateDerivative will return a new rule based on the data gathered by the -// rules that creates a new derivative policy. -// In the case of ToGroups will call outside using the groups callback and this -// function can take a bit of time. -func (e *EgressDenyRule) CreateDerivative(ctx context.Context) (*EgressDenyRule, error) { - newRule := e.DeepCopy() - if !e.RequiresDerivative() { - return newRule, nil - } - newRule.ToCIDRSet = make(CIDRRuleSlice, 0, len(e.ToGroups)) - for _, group := range e.ToGroups { - cidrSet, err := group.GetCidrSet(ctx) - if err != nil { - return &EgressDenyRule{}, err - } - if len(cidrSet) == 0 { - return &EgressDenyRule{}, nil - } - newRule.ToCIDRSet = append(e.ToCIDRSet, cidrSet...) - } - newRule.ToGroups = nil - e.SetAggregatedSelectors() - return newRule, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/entity.go b/vendor/github.com/cilium/cilium/pkg/policy/api/entity.go deleted file mode 100644 index 084d5815184..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/entity.go +++ /dev/null @@ -1,151 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - k8sapi "github.com/cilium/cilium/pkg/k8s/apis/cilium.io" - "github.com/cilium/cilium/pkg/labels" -) - -// Entity specifies the class of receiver/sender endpoints that do not have -// individual identities. Entities are used to describe "outside of cluster", -// "host", etc. -// -// +kubebuilder:validation:Enum=all;world;cluster;host;init;ingress;unmanaged;remote-node;health;none;kube-apiserver -type Entity string - -const ( - // EntityAll is an entity that represents all traffic - EntityAll Entity = "all" - - // EntityWorld is an entity that represents traffic external to - // endpoint's cluster - EntityWorld Entity = "world" - - // EntityWorldIPv4 is an entity that represents traffic external to - // endpoint's cluster, specifically an IPv4 endpoint, to distinguish - // it from IPv6 in dual-stack mode. - EntityWorldIPv4 Entity = "world-ipv4" - - // EntityWorldIPv6 is an entity that represents traffic external to - // endpoint's cluster, specifically an IPv6 endpoint, to distinguish - // it from IPv4 in dual-stack mode. - EntityWorldIPv6 Entity = "world-ipv6" - - // EntityCluster is an entity that represents traffic within the - // endpoint's cluster, to endpoints not managed by cilium - EntityCluster Entity = "cluster" - - // EntityHost is an entity that represents traffic within endpoint host - EntityHost Entity = "host" - - // EntityInit is an entity that represents an initializing endpoint - EntityInit Entity = "init" - - // EntityIngress is an entity that represents envoy proxy - EntityIngress Entity = "ingress" - - // EntityUnmanaged is an entity that represents unamanaged endpoints. - EntityUnmanaged Entity = "unmanaged" - - // EntityRemoteNode is an entity that represents all remote nodes - EntityRemoteNode Entity = "remote-node" - - // EntityHealth is an entity that represents all health endpoints. - EntityHealth Entity = "health" - - // EntityNone is an entity that can be selected but never exist - EntityNone Entity = "none" - - // EntityNone is an entity that represents the kube-apiserver. - EntityKubeAPIServer Entity = "kube-apiserver" -) - -var ( - endpointSelectorWorld = NewESFromLabels(labels.NewLabel(labels.IDNameWorld, "", labels.LabelSourceReserved)) - - endpointSelectorWorldIPv4 = NewESFromLabels(labels.NewLabel(labels.IDNameWorldIPv4, "", labels.LabelSourceReserved)) - - endpointSelectorWorldIPv6 = NewESFromLabels(labels.NewLabel(labels.IDNameWorldIPv6, "", labels.LabelSourceReserved)) - - endpointSelectorHost = NewESFromLabels(labels.NewLabel(labels.IDNameHost, "", labels.LabelSourceReserved)) - - endpointSelectorInit = NewESFromLabels(labels.NewLabel(labels.IDNameInit, "", labels.LabelSourceReserved)) - - endpointSelectorIngress = NewESFromLabels(labels.NewLabel(labels.IDNameIngress, "", labels.LabelSourceReserved)) - - endpointSelectorRemoteNode = NewESFromLabels(labels.NewLabel(labels.IDNameRemoteNode, "", labels.LabelSourceReserved)) - - endpointSelectorHealth = NewESFromLabels(labels.NewLabel(labels.IDNameHealth, "", labels.LabelSourceReserved)) - - EndpointSelectorNone = NewESFromLabels(labels.NewLabel(labels.IDNameNone, "", labels.LabelSourceReserved)) - - endpointSelectorUnmanaged = NewESFromLabels(labels.NewLabel(labels.IDNameUnmanaged, "", labels.LabelSourceReserved)) - - endpointSelectorKubeAPIServer = NewESFromLabels(labels.LabelKubeAPIServer[labels.IDNameKubeAPIServer]) - - // EntitySelectorMapping maps special entity names that come in - // policies to selectors - EntitySelectorMapping = map[Entity]EndpointSelectorSlice{ - EntityAll: {WildcardEndpointSelector}, - EntityWorld: {endpointSelectorWorld, endpointSelectorWorldIPv4, endpointSelectorWorldIPv6}, - EntityWorldIPv4: {endpointSelectorWorldIPv4}, - EntityWorldIPv6: {endpointSelectorWorldIPv6}, - EntityHost: {endpointSelectorHost}, - EntityInit: {endpointSelectorInit}, - EntityIngress: {endpointSelectorIngress}, - EntityRemoteNode: {endpointSelectorRemoteNode}, - EntityHealth: {endpointSelectorHealth}, - EntityUnmanaged: {endpointSelectorUnmanaged}, - EntityNone: {EndpointSelectorNone}, - EntityKubeAPIServer: {endpointSelectorKubeAPIServer}, - - // EntityCluster is populated with an empty entry to allow the - // cilium client importing this package to perform basic rule - // validation. The basic rule validation only enforces - // awareness of individual entity names and does not require - // understanding of the individual endpoint selectors. The - // endpoint selector for the cluster entity can only be - // initialized at runtime as it depends on user configuration - // such as the cluster name. See InitEntities() below. - EntityCluster: {}, - } -) - -// EntitySlice is a slice of entities -type EntitySlice []Entity - -// GetAsEndpointSelectors returns the provided entity slice as a slice of -// endpoint selectors -func (s EntitySlice) GetAsEndpointSelectors() EndpointSelectorSlice { - slice := EndpointSelectorSlice{} - for _, e := range s { - if selector, ok := EntitySelectorMapping[e]; ok { - slice = append(slice, selector...) - } - } - - return slice -} - -// InitEntities is called to initialize the policy API layer -func InitEntities(clusterName string, treatRemoteNodeAsHost bool) { - EntitySelectorMapping[EntityCluster] = EndpointSelectorSlice{ - endpointSelectorHost, - endpointSelectorRemoteNode, - endpointSelectorInit, - endpointSelectorIngress, - endpointSelectorHealth, - endpointSelectorUnmanaged, - endpointSelectorKubeAPIServer, - NewESFromLabels(labels.NewLabel(k8sapi.PolicyLabelCluster, clusterName, labels.LabelSourceK8s)), - } - - hostSelectors := make(EndpointSelectorSlice, 0, 2) - hostSelectors = append(hostSelectors, endpointSelectorHost) - if treatRemoteNodeAsHost { - hostSelectors = append(hostSelectors, endpointSelectorRemoteNode) - } - EntitySelectorMapping[EntityHost] = hostSelectors -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/fqdn.go b/vendor/github.com/cilium/cilium/pkg/policy/api/fqdn.go deleted file mode 100644 index 1d015975fee..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/fqdn.go +++ /dev/null @@ -1,147 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "fmt" - "regexp" - "strings" - - "github.com/cilium/cilium/pkg/fqdn/dns" - "github.com/cilium/cilium/pkg/fqdn/matchpattern" -) - -var ( - // allowedMatchNameChars tests that MatchName contains only valid DNS characters - allowedMatchNameChars = regexp.MustCompile("^[-a-zA-Z0-9_.]+$") - - // allowedPatternChars tests that the MatchPattern field contains only the - // characters we want in our wilcard scheme. - allowedPatternChars = regexp.MustCompile("^[-a-zA-Z0-9_.*]+$") // the * inside the [] is a literal * - - // FQDNMatchNameRegexString is a regex string which matches what's expected - // in the MatchName field in the FQDNSelector. This should be kept in-sync - // with the marker comment for validation. There's no way to use a Golang - // variable in the marker comment, so it's left up to the developer. - FQDNMatchNameRegexString = `^([-a-zA-Z0-9_]+[.]?)+$` - - // FQDNMatchPatternRegexString is a regex string which matches what's expected - // in the MatchPattern field in the FQDNSelector. This should be kept in-sync - // with the marker comment for validation. There's no way to use a Golang - // variable in the marker comment, so it's left up to the developer. - FQDNMatchPatternRegexString = `^([-a-zA-Z0-9_*]+[.]?)+$` -) - -type FQDNSelector struct { - // MatchName matches literal DNS names. A trailing "." is automatically added - // when missing. - // - // +kubebuilder:validation:Pattern=`^([-a-zA-Z0-9_]+[.]?)+$` - MatchName string `json:"matchName,omitempty"` - - // MatchPattern allows using wildcards to match DNS names. All wildcards are - // case insensitive. The wildcards are: - // - "*" matches 0 or more DNS valid characters, and may occur anywhere in - // the pattern. As a special case a "*" as the leftmost character, without a - // following "." matches all subdomains as well as the name to the right. - // A trailing "." is automatically added when missing. - // - // Examples: - // `*.cilium.io` matches subomains of cilium at that level - // www.cilium.io and blog.cilium.io match, cilium.io and google.com do not - // `*cilium.io` matches cilium.io and all subdomains ends with "cilium.io" - // except those containing "." separator, subcilium.io and sub-cilium.io match, - // www.cilium.io and blog.cilium.io does not - // sub*.cilium.io matches subdomains of cilium where the subdomain component - // begins with "sub" - // sub.cilium.io and subdomain.cilium.io match, www.cilium.io, - // blog.cilium.io, cilium.io and google.com do not - // - // +kubebuilder:validation:Pattern=`^([-a-zA-Z0-9_*]+[.]?)+$` - MatchPattern string `json:"matchPattern,omitempty"` -} - -func (s *FQDNSelector) String() string { - const m = "MatchName: " - const mm = ", MatchPattern: " - var str strings.Builder - str.Grow(len(m) + len(mm) + len(s.MatchName) + len(s.MatchPattern)) - str.WriteString(m) - str.WriteString(s.MatchName) - str.WriteString(mm) - str.WriteString(s.MatchPattern) - return str.String() -} - -// sanitize for FQDNSelector is a little wonky. While we do more processing -// when using MatchName the basic requirement is that is a valid regexp. We -// test that it can compile here. -func (s *FQDNSelector) sanitize() error { - if len(s.MatchName) > 0 && len(s.MatchPattern) > 0 { - return fmt.Errorf("only one of MatchName or MatchPattern is allowed in an FQDNSelector") - } - if len(s.MatchName) > 0 && !allowedMatchNameChars.MatchString(s.MatchName) { - return fmt.Errorf("Invalid characters in MatchName: \"%s\". Only 0-9, a-z, A-Z and . and - characters are allowed", s.MatchName) - } - - if len(s.MatchPattern) > 0 && !allowedPatternChars.MatchString(s.MatchPattern) { - return fmt.Errorf("Invalid characters in MatchPattern: \"%s\". Only 0-9, a-z, A-Z and ., - and * characters are allowed", s.MatchPattern) - } - _, err := matchpattern.Validate(s.MatchPattern) - return err -} - -// ToRegex converts the given FQDNSelector to its corresponding regular -// expression. If the MatchName field is set in the selector, it performs all -// needed formatting to ensure that the field is a valid regular expression. -func (s *FQDNSelector) ToRegex() (*regexp.Regexp, error) { - var preparedMatch string - if s.MatchName != "" { - preparedMatch = dns.FQDN(s.MatchName) - } else { - preparedMatch = matchpattern.Sanitize(s.MatchPattern) - } - - regex, err := matchpattern.Validate(preparedMatch) - return regex, err -} - -// PortRuleDNS is a list of allowed DNS lookups. -type PortRuleDNS FQDNSelector - -// Sanitize checks that the matchName in the portRule can be compiled as a -// regex. It does not check that a DNS name is a valid DNS name. -func (r *PortRuleDNS) Sanitize() error { - if len(r.MatchName) > 0 && !allowedMatchNameChars.MatchString(r.MatchName) { - return fmt.Errorf("Invalid characters in MatchName: \"%s\". Only 0-9, a-z, A-Z and . and - characters are allowed", r.MatchName) - } - - if len(r.MatchPattern) > 0 && !allowedPatternChars.MatchString(r.MatchPattern) { - return fmt.Errorf("Invalid characters in MatchPattern: \"%s\". Only 0-9, a-z, A-Z and ., - and * characters are allowed", r.MatchPattern) - } - _, err := matchpattern.Validate(r.MatchPattern) - return err -} - -// GetAsEndpointSelectors returns a FQDNSelector as a single EntityNone -// EndpointSelector slice. -// Note that toFQDNs behaves differently than most other rules. The presence of -// any toFQDNs rules means the endpoint must enforce policy, but the IPs are later -// added as toCIDRSet entries and processed as such. -func (s *FQDNSelector) GetAsEndpointSelectors() EndpointSelectorSlice { - return []EndpointSelector{EndpointSelectorNone} -} - -// FQDNSelectorSlice is a wrapper type for []FQDNSelector to make is simpler to -// bind methods. -type FQDNSelectorSlice []FQDNSelector - -// GetAsEndpointSelectors will return a single EntityNone if any -// toFQDNs rules exist, and a nil slice otherwise. -func (s FQDNSelectorSlice) GetAsEndpointSelectors() EndpointSelectorSlice { - for _, rule := range s { - return rule.GetAsEndpointSelectors() - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/groups.go b/vendor/github.com/cilium/cilium/pkg/policy/api/groups.go deleted file mode 100644 index fb3174ead0d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/groups.go +++ /dev/null @@ -1,68 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "context" - "fmt" - "net/netip" - - "github.com/cilium/cilium/pkg/ip" - "github.com/cilium/cilium/pkg/lock" -) - -const ( - AWSProvider = "AWS" // AWS provider key -) - -var ( - providers lock.Map[string, GroupProviderFunc] // map with the list of providers to callback to retrieve info from. -) - -// GroupProviderFunc is a func that need to be register to be able to -// register a new provider in the platform. -type GroupProviderFunc func(context.Context, *ToGroups) ([]netip.Addr, error) - -// ToGroups structure to store all kinds of new integrations that needs a new -// derivative policy. -type ToGroups struct { - AWS *AWSGroup `json:"aws,omitempty"` -} - -// AWSGroup is an structure that can be used to whitelisting information from AWS integration -type AWSGroup struct { - Labels map[string]string `json:"labels,omitempty"` - SecurityGroupsIds []string `json:"securityGroupsIds,omitempty"` - SecurityGroupsNames []string `json:"securityGroupsNames,omitempty"` - Region string `json:"region,omitempty"` -} - -// RegisterToGroupsProvider it will register a new callback that will be used -// when a new ToGroups rule is added. -func RegisterToGroupsProvider(providerName string, callback GroupProviderFunc) { - providers.Store(providerName, callback) -} - -// GetCidrSet will return the CIDRRule for the rule using the callbacks that -// are register in the platform. -func (group *ToGroups) GetCidrSet(ctx context.Context) ([]CIDRRule, error) { - var addrs []netip.Addr - // Get per provider CIDRSet - if group.AWS != nil { - callback, ok := providers.Load(AWSProvider) - if !ok { - return nil, fmt.Errorf("Provider %s is not registered", AWSProvider) - } - awsAddrs, err := callback(ctx, group) - if err != nil { - return nil, fmt.Errorf( - "Cannot retrieve data from %s provider: %w", - AWSProvider, err) - } - addrs = append(addrs, awsAddrs...) - } - - resultAddrs := ip.KeepUniqueAddrs(addrs) - return addrsToCIDRRules(resultAddrs), nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/http.go b/vendor/github.com/cilium/cilium/pkg/policy/api/http.go deleted file mode 100644 index fa7ee9173ba..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/http.go +++ /dev/null @@ -1,144 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "fmt" - "regexp" -) - -// MismatchAction specifies what to do when there is no header match -// Empty string is the default for making the rule to fail the match. -// Otherwise the rule is still considered as matching, but the mismatches -// are logged in the access log. -type MismatchAction string - -const ( - MismatchActionLog MismatchAction = "LOG" // Keep checking other matches - MismatchActionAdd MismatchAction = "ADD" // Add the missing value to a possibly multi-valued header - MismatchActionDelete MismatchAction = "DELETE" // Remove the whole mismatching header - MismatchActionReplace MismatchAction = "REPLACE" // Replace (of add if missing) the header -) - -// HeaderMatch extends the HeaderValue for matching requirement of a -// named header field against an immediate string, a secret value, or -// a regex. If none of the optional fields is present, then the -// header value is not matched, only presence of the header is enough. -type HeaderMatch struct { - // Mismatch identifies what to do in case there is no match. The default is - // to drop the request. Otherwise the overall rule is still considered as - // matching, but the mismatches are logged in the access log. - // - // +kubebuilder:validation:Enum=LOG;ADD;DELETE;REPLACE - // +kubebuilder:validation:Optional - Mismatch MismatchAction `json:"mismatch,omitempty"` - - // Name identifies the header. - Name string `json:"name"` - - // Secret refers to a secret that contains the value to be matched against. - // The secret must only contain one entry. If the referred secret does not - // exist, and there is no "Value" specified, the match will fail. - // - // +kubebuilder:validation:Optional - Secret *Secret `json:"secret,omitempty"` - - // Value matches the exact value of the header. Can be specified either - // alone or together with "Secret"; will be used as the header value if the - // secret can not be found in the latter case. - // - // +kubebuilder:validation:Optional - Value string `json:"value,omitempty"` -} - -// PortRuleHTTP is a list of HTTP protocol constraints. All fields are -// optional, if all fields are empty or missing, the rule does not have any -// effect. -// -// All fields of this type are 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. -type PortRuleHTTP struct { - // Path is an extended POSIX regex matched against the path of a - // request. Currently it can contain characters disallowed from the - // conventional "path" part of a URL as defined by RFC 3986. - // - // If omitted or empty, all paths are all allowed. - // - // +kubebuilder:validation:Optional - Path string `json:"path,omitempty"` - - // Method is an extended POSIX regex matched against the method of a - // request, e.g. "GET", "POST", "PUT", "PATCH", "DELETE", ... - // - // If omitted or empty, all methods are allowed. - // - // +kubebuilder:validation:Optional - Method string `json:"method,omitempty"` - - // Host is an extended POSIX regex matched against the host header of a - // request, e.g. "foo.com" - // - // If omitted or empty, the value of the host header is ignored. - // - // +kubebuilder:validation:Format=idn-hostname - // +kubebuilder:validation:Optional - Host string `json:"host,omitempty"` - - // Headers is a list of HTTP headers which must be present in the - // request. If omitted or empty, requests are allowed regardless of - // headers present. - // - // +kubebuilder:validation:Optional - Headers []string `json:"headers,omitempty"` - - // HeaderMatches is a list of HTTP headers which must be - // present and match against the given values. Mismatch field can be used - // to specify what to do when there is no match. - // - // +kubebuilder:validation:Optional - HeaderMatches []*HeaderMatch `json:"headerMatches,omitempty"` -} - -// Sanitize sanitizes HTTP rules. It ensures that the path and method fields -// are valid regular expressions. Note that the proxy may support a wider-range -// of regular expressions (e.g. that specified by ECMAScript), so this function -// may return some false positives. If the rule is invalid, returns an error. -func (h *PortRuleHTTP) Sanitize() error { - - if h.Path != "" { - _, err := regexp.Compile(h.Path) - if err != nil { - return err - } - } - - if h.Method != "" { - _, err := regexp.Compile(h.Method) - if err != nil { - return err - } - } - - // Headers are not sanitized. - - // But HeaderMatches are - for _, m := range h.HeaderMatches { - if m.Name == "" { - return fmt.Errorf("Header name missing") - } - if m.Mismatch != "" && - m.Mismatch != MismatchActionLog && m.Mismatch != MismatchActionAdd && - m.Mismatch != MismatchActionDelete && m.Mismatch != MismatchActionReplace { - return fmt.Errorf("Invalid header action: %s", m.Mismatch) - } - if m.Secret != nil && m.Secret.Name == "" { - return fmt.Errorf("Secret name missing") - } - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/icmp.go b/vendor/github.com/cilium/cilium/pkg/policy/api/icmp.go deleted file mode 100644 index c2a68472955..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/icmp.go +++ /dev/null @@ -1,96 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import "strconv" - -const ( - IPv4Family = "IPv4" - IPv6Family = "IPv6" -) - -type ICMPRules []ICMPRule - -// ICMPRule is a list of ICMP fields. -type ICMPRule struct { - // Fields is a list of ICMP fields. - // - // +kubebuilder:validation:Optional - Fields []ICMPField `json:"fields,omitempty"` -} - -// ICMPField is a ICMP field. -type ICMPField struct { - // Family is a IP address version. - // Currently, we support `IPv4` and `IPv6`. - // `IPv4` is set as default. - // - // +kubebuilder:default=IPv4 - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Enum=IPv4;IPv6 - Family string `json:"family,omitempty"` - - // Type is a ICMP-type. - // It should be 0-255 (8bit). - // - // +kubebuilder:validation:Maximum=255 - // +kubebuilder:validation:Minimum=0 - Type uint8 `json:"type"` -} - -// Iterate iterates over all elements of ICMPRules. -func (ir ICMPRules) Iterate(f func(pr Ports) error) error { - for i := range ir { - if err := f(&ir[i]); err != nil { - return err - } - } - return nil -} - -// Len returns the length of the elements of ICMPRules. -func (ir ICMPRules) Len() int { - return len(ir) -} - -// GetPortProtocols generates PortProtocol slice from ICMPRule and returns it. -func (ir ICMPRule) GetPortProtocols() []PortProtocol { - var pps []PortProtocol - for _, t := range ir.Fields { - pp := t.PortProtocol() - pps = append(pps, *pp) - } - return pps -} - -// GetPortRule generates PortRule from ICMPRule and returns it. -func (ir ICMPRule) GetPortRule() *PortRule { - var pps []PortProtocol - for _, t := range ir.Fields { - pp := t.PortProtocol() - pps = append(pps, *pp) - } - pr := PortRule{ - Ports: pps, - } - return &pr -} - -// PortProtocol translates ICMPType to PortProtocol. -func (i ICMPField) PortProtocol() *PortProtocol { - var proto L4Proto - - typeStr := strconv.Itoa(int(i.Type)) - if i.Family == IPv6Family { - proto = ProtoICMPv6 - } else { - proto = ProtoICMP - } - - pr := PortProtocol{ - Port: typeStr, - Protocol: proto, - } - return &pr -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/ingress.go b/vendor/github.com/cilium/cilium/pkg/policy/api/ingress.go deleted file mode 100644 index a727d9df207..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/ingress.go +++ /dev/null @@ -1,215 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" -) - -// IngressCommonRule is a rule that shares some of its fields across the -// IngressRule and IngressDenyRule. It's publicly exported so the code -// generators can generate code for this structure. -type IngressCommonRule struct { - // FromEndpoints is a list of endpoints identified by an - // EndpointSelector which are allowed to communicate with the endpoint - // subject to the rule. - // - // Example: - // Any endpoint with the label "role=backend" can be consumed by any - // endpoint carrying the label "role=frontend". - // - // +kubebuilder:validation:Optional - FromEndpoints []EndpointSelector `json:"fromEndpoints,omitempty"` - - // FromRequires is a list of additional constraints which must be met - // in order for the selected endpoints to be reachable. These - // additional constraints do no by itself grant access privileges and - // must always be accompanied with at least one matching FromEndpoints. - // - // Example: - // Any Endpoint with the label "team=A" requires consuming endpoint - // to also carry the label "team=A". - // - // +kubebuilder:validation:Optional - FromRequires []EndpointSelector `json:"fromRequires,omitempty"` - - // FromCIDR is a list of IP blocks which the endpoint subject to the - // rule is allowed to receive connections from. Only connections which - // do *not* originate from the cluster or from the local host are subject - // to CIDR rules. In order to allow in-cluster connectivity, use the - // FromEndpoints field. This will match on the source IP address of - // incoming connections. Adding a prefix into FromCIDR or into - // FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are - // allowed between FromCIDR and FromCIDRSet. - // - // Example: - // Any endpoint with the label "app=my-legacy-pet" is allowed to receive - // connections from 10.3.9.1 - // - // +kubebuilder:validation:Optional - FromCIDR CIDRSlice `json:"fromCIDR,omitempty"` - - // FromCIDRSet is a list of IP blocks which the endpoint subject to the - // rule is allowed to receive connections from in addition to FromEndpoints, - // along with a list of subnets contained within their corresponding IP block - // from which traffic should not be allowed. - // This will match on the source IP address of incoming connections. Adding - // a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is - // equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. - // - // Example: - // Any endpoint with the label "app=my-legacy-pet" is allowed to receive - // connections from 10.0.0.0/8 except from IPs in subnet 10.96.0.0/12. - // - // +kubebuilder:validation:Optional - FromCIDRSet CIDRRuleSlice `json:"fromCIDRSet,omitempty"` - - // FromEntities is a list of special entities which the endpoint subject - // to the rule is allowed to receive connections from. Supported entities are - // `world`, `cluster` and `host` - // - // +kubebuilder:validation:Optional - FromEntities EntitySlice `json:"fromEntities,omitempty"` - - // TODO: Move this to the policy package - // (https://github.com/cilium/cilium/issues/8353) - aggregatedSelectors EndpointSelectorSlice `json:"-"` -} - -// IngressRule contains all rule types which can be applied at ingress, -// i.e. network traffic that originates outside of the endpoint and -// is entering the endpoint selected by the endpointSelector. -// -// - All members of this structure are optional. If omitted or empty, the -// member will have no effect on the rule. -// -// - If multiple members are set, all of them need to match in order for -// the rule to take effect. The exception to this rule is FromRequires field; -// the effects of any Requires field in any rule will apply to all other -// rules as well. -// -// - FromEndpoints, FromCIDR, FromCIDRSet and FromEntities are mutually -// exclusive. Only one of these members may be present within an individual -// rule. -type IngressRule struct { - IngressCommonRule `json:",inline"` - - // ToPorts is a list of destination ports identified by port number and - // protocol which the endpoint subject to the rule is allowed to - // receive connections on. - // - // Example: - // Any endpoint with the label "app=httpd" can only accept incoming - // connections on port 80/tcp. - // - // +kubebuilder:validation:Optional - ToPorts PortRules `json:"toPorts,omitempty"` - - // ICMPs is a list of ICMP rule identified by type number - // which the endpoint subject to the rule is allowed to - // receive connections on. - // - // Example: - // Any endpoint with the label "app=httpd" can only accept incoming - // type 8 ICMP connections. - // - // +kubebuilder:validation:Optional - ICMPs ICMPRules `json:"icmps,omitempty"` - - // Authentication is the required authentication type for the allowed traffic, if any. - // - // +kubebuilder:validation:Optional - Authentication *Authentication `json:"authentication,omitempty"` -} - -// IngressDenyRule contains all rule types which can be applied at ingress, -// i.e. network traffic that originates outside of the endpoint and -// is entering the endpoint selected by the endpointSelector. -// -// - All members of this structure are optional. If omitted or empty, the -// member will have no effect on the rule. -// -// - If multiple members are set, all of them need to match in order for -// the rule to take effect. The exception to this rule is FromRequires field; -// the effects of any Requires field in any rule will apply to all other -// rules as well. -// -// - FromEndpoints, FromCIDR, FromCIDRSet and FromEntities are mutually -// exclusive. Only one of these members may be present within an individual -// rule. -type IngressDenyRule struct { - IngressCommonRule `json:",inline"` - - // ToPorts is a list of destination ports identified by port number and - // protocol which the endpoint subject to the rule is not allowed to - // receive connections on. - // - // Example: - // Any endpoint with the label "app=httpd" can not accept incoming - // connections on port 80/tcp. - // - // +kubebuilder:validation:Optional - ToPorts PortDenyRules `json:"toPorts,omitempty"` - - // ICMPs is a list of ICMP rule identified by type number - // which the endpoint subject to the rule is not allowed to - // receive connections on. - // - // Example: - // Any endpoint with the label "app=httpd" can not accept incoming - // type 8 ICMP connections. - // - // +kubebuilder:validation:Optional - ICMPs ICMPRules `json:"icmps,omitempty"` -} - -// SetAggregatedSelectors creates a single slice containing all of the following -// fields within the IngressRule, converted to EndpointSelector, to be stored -// within the IngressRule for easy lookup while performing policy evaluation -// for the rule: -// * FromEntities -// * FromCIDR -// * FromCIDRSet -// -// FromEndpoints is not aggregated due to requirement folding in -// GetSourceEndpointSelectorsWithRequirements() -func (i *IngressCommonRule) SetAggregatedSelectors() { - res := make(EndpointSelectorSlice, 0, len(i.FromEntities)+len(i.FromCIDR)+len(i.FromCIDRSet)) - res = append(res, i.FromEntities.GetAsEndpointSelectors()...) - res = append(res, i.FromCIDR.GetAsEndpointSelectors()...) - res = append(res, i.FromCIDRSet.GetAsEndpointSelectors()...) - // Goroutines can race setting this, but they will all compute - // the same result, so it does not matter. - i.aggregatedSelectors = res -} - -// GetSourceEndpointSelectorsWithRequirements returns a slice of endpoints selectors covering -// all L3 source selectors of the ingress rule -func (i *IngressCommonRule) GetSourceEndpointSelectorsWithRequirements(requirements []slim_metav1.LabelSelectorRequirement) EndpointSelectorSlice { - if i.aggregatedSelectors == nil { - i.SetAggregatedSelectors() - } - res := make(EndpointSelectorSlice, 0, len(i.FromEndpoints)+len(i.aggregatedSelectors)) - if len(requirements) > 0 && len(i.FromEndpoints) > 0 { - for idx := range i.FromEndpoints { - sel := *i.FromEndpoints[idx].DeepCopy() - sel.MatchExpressions = append(sel.MatchExpressions, requirements...) - sel.SyncRequirementsWithLabelSelector() - // Even though this string is deep copied, we need to override it - // because we are updating the contents of the MatchExpressions. - sel.cachedLabelSelectorString = sel.LabelSelector.String() - res = append(res, sel) - } - } else { - res = append(res, i.FromEndpoints...) - } - - return append(res, i.aggregatedSelectors...) -} - -// AllowsWildcarding returns true if wildcarding should be performed upon -// policy evaluation for the given rule. -func (i *IngressCommonRule) AllowsWildcarding() bool { - return len(i.FromRequires) == 0 -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/l4.go b/vendor/github.com/cilium/cilium/pkg/policy/api/l4.go deleted file mode 100644 index a717f498a76..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/l4.go +++ /dev/null @@ -1,331 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "github.com/cilium/proxy/pkg/policy/api/kafka" -) - -// L4Proto is a layer 4 protocol name -type L4Proto string - -const ( - // Keep pkg/u8proto up-to-date with any additions here - - ProtoTCP L4Proto = "TCP" - ProtoUDP L4Proto = "UDP" - ProtoSCTP L4Proto = "SCTP" - ProtoICMP L4Proto = "ICMP" - ProtoICMPv6 L4Proto = "ICMPV6" - ProtoAny L4Proto = "ANY" - - PortProtocolAny = "0/ANY" -) - -// IsAny returns true if an L4Proto represents ANY protocol -func (l4 L4Proto) IsAny() bool { - return l4 == ProtoAny || string(l4) == "" -} - -// PortProtocol specifies an L4 port with an optional transport protocol -type PortProtocol struct { - // Port is an L4 port number. For now the string will be strictly - // parsed as a single uint16. In the future, this field may support - // ranges in the form "1024-2048 - // Port can also be a port name, which must contain at least one [a-z], - // and may also contain [0-9] and '-' anywhere except adjacent to another - // '-' or in the beginning or the end. - // - // +kubebuilder:validation:Pattern=`^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[0-9]{1,4})|([a-zA-Z0-9]-?)*[a-zA-Z](-?[a-zA-Z0-9])*$` - Port string `json:"port"` - - // Protocol is the L4 protocol. If omitted or empty, any protocol - // matches. Accepted values: "TCP", "UDP", "SCTP", "ANY" - // - // Matching on ICMP is not supported. - // - // Named port specified for a container may narrow this down, but may not - // contradict this. - // - // +kubebuilder:validation:Enum=TCP;UDP;SCTP;ANY - // +kubebuilder:validation:Optional - Protocol L4Proto `json:"protocol,omitempty"` -} - -// Covers returns true if the ports and protocol specified in the received -// PortProtocol are equal to or a superset of the ports and protocol in 'other'. -// Named ports only cover other named ports with exactly the same name. -func (p PortProtocol) Covers(other PortProtocol) bool { - if p.Port != other.Port { - return false - } - if p.Protocol != other.Protocol { - return p.Protocol.IsAny() - } - return true -} - -// Secret is a reference to a secret, backed by k8s or local file system. -type Secret struct { - // Namespace is the namespace in which the secret exists. Context of use - // determines the default value if left out (e.g., "default"). - // - // +kubebuilder:validation:Optional - Namespace string `json:"namespace,omitempty"` - - // Name is the name of the secret. - // - // +kubebuilder:validation:Required - Name string `json:"name"` -} - -// TLSContext provides TLS configuration via reference to either k8s secrets -// or via filepath. If both are set, directory is given priority over -// k8sSecrets. -type TLSContext struct { - // Secret is the secret that contains the certificates and private key for - // the TLS context. - // By default, Cilium will search in this secret for the following items: - // - 'ca.crt' - Which represents the trusted CA to verify remote source. - // - 'tls.crt' - Which represents the public key certificate. - // - 'tls.key' - Which represents the private key matching the public key - // certificate. - // - // +kubebuilder:validation:Required - Secret *Secret `json:"secret"` - - // TrustedCA is the file name or k8s secret item name for the trusted CA. - // If omitted, 'ca.crt' is assumed, if it exists. If given, the item must - // exist. - // - // +kubebuilder:validation:Optional - TrustedCA string `json:"trustedCA,omitempty"` - - // Certificate is the file name or k8s secret item name for the certificate - // chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the - // item must exist. - // - // +kubebuilder:validation:Optional - Certificate string `json:"certificate,omitempty"` - - // PrivateKey is the file name or k8s secret item name for the private key - // matching the certificate chain. If omitted, 'tls.key' is assumed, if it - // exists. If given, the item must exist. - // - // +kubebuilder:validation:Optional - PrivateKey string `json:"privateKey,omitempty"` -} - -// EnvoyConfig defines a reference to a CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig -type EnvoyConfig struct { - // Kind is the resource type being referred to. Defaults to CiliumEnvoyConfig or - // CiliumClusterwideEnvoyConfig for CiliumNetworkPolicy and CiliumClusterwideNetworkPolicy, - // respectively. The only case this is currently explicitly needed is when referring to a - // CiliumClusterwideEnvoyConfig from CiliumNetworkPolicy, as using a namespaced listener - // from a cluster scoped policy is not allowed. - // - // +kubebuilder:validation:Enum=CiliumEnvoyConfig;CiliumClusterwideEnvoyConfig - // +kubebuilder:validation:Optional - Kind string `json:"kind"` - - // Name is the resource name of the CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig where - // the listener is defined in. - // - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Required - Name string `json:"name"` -} - -// Listener defines a reference to an Envoy listener specified in a CEC or CCEC resource. -type Listener struct { - // EnvoyConfig is a reference to the CEC or CCNP resource in which - // the listener is defined. - // - // +kubebuilder:validation:Required - EnvoyConfig *EnvoyConfig `json:"envoyConfig"` - - // Name is the name of the listener. - // - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Required - Name string `json:"name"` -} - -// PortRule is a list of ports/protocol combinations with optional Layer 7 -// rules which must be met. -type PortRule struct { - // Ports is a list of L4 port/protocol - // - // +kubebuilder:validation:Optional - Ports []PortProtocol `json:"ports,omitempty"` - - // TerminatingTLS is the TLS context for the connection terminated by - // the L7 proxy. For egress policy this specifies the server-side TLS - // parameters to be applied on the connections originated from the local - // endpoint and terminated by the L7 proxy. For ingress policy this specifies - // the server-side TLS parameters to be applied on the connections - // originated from a remote source and terminated by the L7 proxy. - // - // +kubebuilder:validation:Optional - TerminatingTLS *TLSContext `json:"terminatingTLS,omitempty"` - - // OriginatingTLS is the TLS context for the connections originated by - // the L7 proxy. For egress policy this specifies the client-side TLS - // parameters for the upstream connection originating from the L7 proxy - // to the remote destination. For ingress policy this specifies the - // client-side TLS parameters for the connection from the L7 proxy to - // the local endpoint. - // - // +kubebuilder:validation:Optional - OriginatingTLS *TLSContext `json:"originatingTLS,omitempty"` - - // ServerNames is a list of allowed TLS SNI values. If not empty, then - // TLS must be present and one of the provided SNIs must be indicated in the - // TLS handshake. - // - // +kubebuilder:validation:Optional - ServerNames []string `json:"serverNames,omitempty"` - - // listener specifies the name of a custom Envoy listener to which this traffic should be - // redirected to. - // - // +kubebuilder:validation:Optional - Listener *Listener `json:"listener,omitempty"` - - // Rules is a list of additional port level rules which must be met in - // order for the PortRule to allow the traffic. If omitted or empty, - // no layer 7 rules are enforced. - // - // +kubebuilder:validation:Optional - Rules *L7Rules `json:"rules,omitempty"` -} - -// GetPortProtocols returns the Ports field of the PortRule. -func (pd PortRule) GetPortProtocols() []PortProtocol { - return pd.Ports -} - -// GetPortRule returns the PortRule. -func (pd *PortRule) GetPortRule() *PortRule { - return pd -} - -// PortDenyRule is a list of ports/protocol that should be used for deny -// policies. This structure lacks the L7Rules since it's not supported in deny -// policies. -type PortDenyRule struct { - // Ports is a list of L4 port/protocol - // - // +kubebuilder:validation:Optional - Ports []PortProtocol `json:"ports,omitempty"` -} - -// GetPortProtocols returns the Ports field of the PortDenyRule. -func (pd PortDenyRule) GetPortProtocols() []PortProtocol { - return pd.Ports -} - -// GetPortRule returns nil has it is not a PortRule. -func (pd *PortDenyRule) GetPortRule() *PortRule { - return nil -} - -// L7Rules is a union of port level rule types. Mixing of different port -// level rule types is disallowed, so exactly one of the following must be set. -// If none are specified, then no additional port level rules are applied. -type L7Rules struct { - // HTTP specific rules. - // - // +kubebuilder:validation:Optional - HTTP []PortRuleHTTP `json:"http,omitempty"` - - // Kafka-specific rules. - // - // +kubebuilder:validation:Optional - Kafka []kafka.PortRule `json:"kafka,omitempty"` - - // DNS-specific rules. - // - // +kubebuilder:validation:Optional - DNS []PortRuleDNS `json:"dns,omitempty"` - - // Name of the L7 protocol for which the Key-value pair rules apply. - // - // +kubebuilder:validation:Optional - L7Proto string `json:"l7proto,omitempty"` - - // Key-value pair rules. - // - // +kubebuilder:validation:Optional - L7 []PortRuleL7 `json:"l7,omitempty"` -} - -// Len returns the total number of rules inside `L7Rules`. -// Returns 0 if nil. -func (rules *L7Rules) Len() int { - if rules == nil { - return 0 - } - return len(rules.HTTP) + len(rules.Kafka) + len(rules.DNS) + len(rules.L7) -} - -// IsEmpty returns whether the `L7Rules` is nil or contains no rules. -func (rules *L7Rules) IsEmpty() bool { - return rules.Len() == 0 -} - -// PortRules is a slice of PortRule. -type PortRules []PortRule - -// Iterate iterates over all elements of PortRules. -func (pr PortRules) Iterate(f func(pr Ports) error) error { - for i := range pr { - err := f(&pr[i]) - if err != nil { - return err - } - } - return nil -} - -// Len returns the length of the elements of PortRules. -func (pr PortRules) Len() int { - return len(pr) -} - -// PortDenyRules is a slice of PortDenyRule. -type PortDenyRules []PortDenyRule - -// Iterate iterates over all elements of PortDenyRules. -func (pr PortDenyRules) Iterate(f func(pr Ports) error) error { - for i := range pr { - err := f(&pr[i]) - if err != nil { - return err - } - } - return nil -} - -// Len returns the length of the elements of PortDenyRules. -func (pr PortDenyRules) Len() int { - return len(pr) -} - -// Ports is an interface that should be used by all implementations of the -// PortProtocols. -type Ports interface { - // GetPortProtocols returns the slice PortProtocol - GetPortProtocols() []PortProtocol - // GetPortRule returns a PortRule, if the implementation does not support - // it, then returns nil. - GetPortRule() *PortRule -} - -// PortsIterator is an interface that should be implemented by structures that -// can iterate over a list of Ports interfaces. -type PortsIterator interface { - Iterate(f func(pr Ports) error) error - Len() int -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/l7.go b/vendor/github.com/cilium/cilium/pkg/policy/api/l7.go deleted file mode 100644 index ba1e924f075..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/l7.go +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "fmt" -) - -// PortRuleL7 is a list of key-value pairs interpreted by a L7 protocol as -// protocol constraints. All fields are optional, if all fields are empty or -// missing, the rule does not have any effect. -type PortRuleL7 map[string]string - -// Sanitize sanitizes key-value pair rules. It makes sure keys are present. -func (rule *PortRuleL7) Sanitize() error { - for k := range *rule { - if k == "" { - return fmt.Errorf("Empty key not allowed") - } - } - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/rule.go b/vendor/github.com/cilium/cilium/pkg/policy/api/rule.go deleted file mode 100644 index f0224b1f48c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/rule.go +++ /dev/null @@ -1,244 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "context" - "encoding/json" - - "github.com/cilium/cilium/pkg/labels" -) - -// AuthenticationMode is a string identifying a supported authentication type -type AuthenticationMode string - -const ( - AuthenticationModeDisabled AuthenticationMode = "disabled" // Always succeeds - AuthenticationModeRequired AuthenticationMode = "required" // Mutual TLS with SPIFFE as certificate provider by default - AuthenticationModeAlwaysFail AuthenticationMode = "test-always-fail" -) - -// Authentication specifies the kind of cryptographic authentication required for the traffic to -// be allowed. -type Authentication struct { - // Mode is the required authentication mode for the allowed traffic, if any. - // - // +kubebuilder:validation:Enum=disabled;required;test-always-fail - // +kubebuilder:validation:Required - Mode AuthenticationMode `json:"mode"` -} - -// Rule is a policy rule which must be applied to all endpoints which match the -// labels contained in the endpointSelector -// -// Each rule is split into an ingress section which contains all rules -// applicable at ingress, and an egress section applicable at egress. For rule -// types such as `L4Rule` and `CIDR` which can be applied at both ingress and -// egress, both ingress and egress side have to either specifically allow the -// connection or one side has to be omitted. -// -// Either ingress, egress, or both can be provided. If both ingress and egress -// are omitted, the rule has no effect. -// -// +deepequal-gen:private-method=true -type Rule struct { - // EndpointSelector selects all endpoints which should be subject to - // this rule. EndpointSelector and NodeSelector cannot be both empty and - // are mutually exclusive. - // - // +kubebuilder:validation:OneOf - EndpointSelector EndpointSelector `json:"endpointSelector,omitempty"` - - // NodeSelector selects all nodes which should be subject to this rule. - // EndpointSelector and NodeSelector cannot be both empty and are mutually - // exclusive. Can only be used in CiliumClusterwideNetworkPolicies. - // - // +kubebuilder:validation:OneOf - NodeSelector EndpointSelector `json:"nodeSelector,omitempty"` - - // Ingress is a list of IngressRule which are enforced at ingress. - // If omitted or empty, this rule does not apply at ingress. - // - // +kubebuilder:validation:Optional - Ingress []IngressRule `json:"ingress,omitempty"` - - // IngressDeny is a list of IngressDenyRule which are enforced at ingress. - // Any rule inserted here will be denied regardless of the allowed ingress - // rules in the 'ingress' field. - // If omitted or empty, this rule does not apply at ingress. - // - // +kubebuilder:validation:Optional - IngressDeny []IngressDenyRule `json:"ingressDeny,omitempty"` - - // Egress is a list of EgressRule which are enforced at egress. - // If omitted or empty, this rule does not apply at egress. - // - // +kubebuilder:validation:Optional - Egress []EgressRule `json:"egress,omitempty"` - - // EgressDeny is a list of EgressDenyRule which are enforced at egress. - // Any rule inserted here will be denied regardless of the allowed egress - // rules in the 'egress' field. - // If omitted or empty, this rule does not apply at egress. - // - // +kubebuilder:validation:Optional - EgressDeny []EgressDenyRule `json:"egressDeny,omitempty"` - - // Labels is a list of optional strings which can be used to - // re-identify the rule or to store metadata. It is possible to lookup - // or delete strings based on labels. Labels are not required to be - // unique, multiple rules can have overlapping or identical labels. - // - // +kubebuilder:validation:Optional - Labels labels.LabelArray `json:"labels,omitempty"` - - // Description is a free form string, it can be used by the creator of - // the rule to store human readable explanation of the purpose of this - // rule. Rules cannot be identified by comment. - // - // +kubebuilder:validation:Optional - Description string `json:"description,omitempty"` -} - -// MarshalJSON returns the JSON encoding of Rule r. We need to overwrite it to -// enforce omitempty on the EndpointSelector nested structures. -func (r *Rule) MarshalJSON() ([]byte, error) { - type common struct { - Ingress []IngressRule `json:"ingress,omitempty"` - IngressDeny []IngressDenyRule `json:"ingressDeny,omitempty"` - Egress []EgressRule `json:"egress,omitempty"` - EgressDeny []EgressDenyRule `json:"egressDeny,omitempty"` - Labels labels.LabelArray `json:"labels,omitempty"` - Description string `json:"description,omitempty"` - } - - var a interface{} - ruleCommon := common{ - Ingress: r.Ingress, - IngressDeny: r.IngressDeny, - Egress: r.Egress, - EgressDeny: r.EgressDeny, - Labels: r.Labels, - Description: r.Description, - } - - // Only one of endpointSelector or nodeSelector is permitted. - switch { - case r.EndpointSelector.LabelSelector != nil: - a = struct { - EndpointSelector EndpointSelector `json:"endpointSelector,omitempty"` - common - }{ - EndpointSelector: r.EndpointSelector, - common: ruleCommon, - } - case r.NodeSelector.LabelSelector != nil: - a = struct { - NodeSelector EndpointSelector `json:"nodeSelector,omitempty"` - common - }{ - NodeSelector: r.NodeSelector, - common: ruleCommon, - } - } - - return json.Marshal(a) -} - -func (r *Rule) DeepEqual(o *Rule) bool { - switch { - case (r == nil) != (o == nil): - return false - case (r == nil) && (o == nil): - return true - } - return r.deepEqual(o) -} - -// NewRule builds a new rule with no selector and no policy. -func NewRule() *Rule { - return &Rule{} -} - -// WithEndpointSelector configures the Rule with the specified selector. -func (r *Rule) WithEndpointSelector(es EndpointSelector) *Rule { - r.EndpointSelector = es - return r -} - -// WithIngressRules configures the Rule with the specified rules. -func (r *Rule) WithIngressRules(rules []IngressRule) *Rule { - r.Ingress = rules - return r -} - -// WithIngressDenyRules configures the Rule with the specified rules. -func (r *Rule) WithIngressDenyRules(rules []IngressDenyRule) *Rule { - r.IngressDeny = rules - return r -} - -// WithEgressRules configures the Rule with the specified rules. -func (r *Rule) WithEgressRules(rules []EgressRule) *Rule { - r.Egress = rules - return r -} - -// WithEgressDenyRules configures the Rule with the specified rules. -func (r *Rule) WithEgressDenyRules(rules []EgressDenyRule) *Rule { - r.EgressDeny = rules - return r -} - -// WithLabels configures the Rule with the specified labels metadata. -func (r *Rule) WithLabels(labels labels.LabelArray) *Rule { - r.Labels = labels - return r -} - -// WithDescription configures the Rule with the specified description metadata. -func (r *Rule) WithDescription(desc string) *Rule { - r.Description = desc - return r -} - -// RequiresDerivative it return true if the rule has a derivative rule. -func (r *Rule) RequiresDerivative() bool { - for _, rule := range r.Egress { - if rule.RequiresDerivative() { - return true - } - } - for _, rule := range r.EgressDeny { - if rule.RequiresDerivative() { - return true - } - } - return false -} - -// CreateDerivative will return a new Rule with the new data based gather -// by the rules that autogenerated new Rule -func (r *Rule) CreateDerivative(ctx context.Context) (*Rule, error) { - newRule := r.DeepCopy() - newRule.Egress = []EgressRule{} - newRule.EgressDeny = []EgressDenyRule{} - - for _, egressRule := range r.Egress { - derivativeEgressRule, err := egressRule.CreateDerivative(ctx) - if err != nil { - return newRule, err - } - newRule.Egress = append(newRule.Egress, *derivativeEgressRule) - } - - for _, egressDenyRule := range r.EgressDeny { - derivativeEgressDenyRule, err := egressDenyRule.CreateDerivative(ctx) - if err != nil { - return newRule, err - } - newRule.EgressDeny = append(newRule.EgressDeny, *derivativeEgressDenyRule) - } - return newRule, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/rule_validation.go b/vendor/github.com/cilium/cilium/pkg/policy/api/rule_validation.go deleted file mode 100644 index b2db0b45d03..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/rule_validation.go +++ /dev/null @@ -1,495 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "errors" - "fmt" - "net/netip" - "strconv" - "strings" - - "github.com/cilium/cilium/pkg/iana" - "github.com/cilium/cilium/pkg/option" -) - -const ( - maxPorts = 40 - maxICMPFields = 40 -) - -// Sanitize validates and sanitizes a policy rule. Minor edits such as -// capitalization of the protocol name are automatically fixed up. More -// fundamental violations will cause an error to be returned. -func (r Rule) Sanitize() error { - if r.EndpointSelector.LabelSelector == nil && r.NodeSelector.LabelSelector == nil { - return fmt.Errorf("rule must have one of EndpointSelector or NodeSelector") - } - if r.EndpointSelector.LabelSelector != nil && r.NodeSelector.LabelSelector != nil { - return fmt.Errorf("rule cannot have both EndpointSelector and NodeSelector") - } - - if r.EndpointSelector.LabelSelector != nil { - if err := r.EndpointSelector.sanitize(); err != nil { - return err - } - } - - var hostPolicy bool - if r.NodeSelector.LabelSelector != nil { - if err := r.NodeSelector.sanitize(); err != nil { - return err - } - hostPolicy = true - } - - for i := range r.Ingress { - if err := r.Ingress[i].sanitize(); err != nil { - return err - } - if hostPolicy { - if len(countL7Rules(r.Ingress[i].ToPorts)) > 0 { - return fmt.Errorf("host policies do not support L7 rules yet") - } - } - } - - for i := range r.Egress { - if err := r.Egress[i].sanitize(); err != nil { - return err - } - if hostPolicy { - if len(countL7Rules(r.Egress[i].ToPorts)) > 0 { - return fmt.Errorf("host policies do not support L7 rules yet") - } - } - } - - return nil -} - -func countL7Rules(ports []PortRule) map[string]int { - result := make(map[string]int) - for _, port := range ports { - if !port.Rules.IsEmpty() { - result["DNS"] += len(port.Rules.DNS) - result["HTTP"] += len(port.Rules.HTTP) - result["Kafka"] += len(port.Rules.Kafka) - } - } - return result -} - -func (i *IngressRule) sanitize() error { - l3Members := map[string]int{ - "FromEndpoints": len(i.FromEndpoints), - "FromCIDR": len(i.FromCIDR), - "FromCIDRSet": len(i.FromCIDRSet), - "FromEntities": len(i.FromEntities), - } - l7Members := countL7Rules(i.ToPorts) - l7IngressSupport := map[string]bool{ - "DNS": false, - "Kafka": true, - "HTTP": true, - } - - for m1 := range l3Members { - for m2 := range l3Members { - if m2 != m1 && l3Members[m1] > 0 && l3Members[m2] > 0 { - return fmt.Errorf("Combining %s and %s is not supported yet", m1, m2) - } - } - } - - if len(l7Members) > 0 && !option.Config.EnableL7Proxy { - return errors.New("L7 policy is not supported since L7 proxy is not enabled") - } - for member := range l7Members { - if l7Members[member] > 0 && !l7IngressSupport[member] { - return fmt.Errorf("L7 protocol %s is not supported on ingress yet", member) - } - } - - if len(i.ICMPs) > 0 && !option.Config.EnableICMPRules { - return fmt.Errorf("ICMP rules can only be applied when the %q flag is set", option.EnableICMPRules) - } - - if len(i.ICMPs) > 0 && len(i.ToPorts) > 0 { - return fmt.Errorf("The ICMPs block may only be present without ToPorts. Define a separate rule to use ToPorts.") - } - - for _, es := range i.FromEndpoints { - if err := es.sanitize(); err != nil { - return err - } - } - - for _, es := range i.FromRequires { - if err := es.sanitize(); err != nil { - return err - } - } - - for n := range i.ToPorts { - if err := i.ToPorts[n].sanitize(true); err != nil { - return err - } - } - - for n := range i.ICMPs { - if err := i.ICMPs[n].verify(); err != nil { - return err - } - } - - for n := range i.FromCIDR { - if err := i.FromCIDR[n].sanitize(); err != nil { - return err - } - } - - for n := range i.FromCIDRSet { - if err := i.FromCIDRSet[n].sanitize(); err != nil { - return err - } - } - - for _, fromEntity := range i.FromEntities { - _, ok := EntitySelectorMapping[fromEntity] - if !ok { - return fmt.Errorf("unsupported entity: %s", fromEntity) - } - } - - i.SetAggregatedSelectors() - - return nil -} - -func (e *EgressRule) sanitize() error { - l3Members := map[string]int{ - "ToCIDR": len(e.ToCIDR), - "ToCIDRSet": len(e.ToCIDRSet), - "ToEndpoints": len(e.ToEndpoints), - "ToEntities": len(e.ToEntities), - "ToServices": len(e.ToServices), - "ToFQDNs": len(e.ToFQDNs), - "ToGroups": len(e.ToGroups), - } - l3DependentL4Support := map[interface{}]bool{ - "ToCIDR": true, - "ToCIDRSet": true, - "ToEndpoints": true, - "ToEntities": true, - "ToServices": false, // see https://github.com/cilium/cilium/issues/20067 - "ToFQDNs": true, - "ToGroups": true, - } - l7Members := countL7Rules(e.ToPorts) - l7EgressSupport := map[string]bool{ - "DNS": true, - "Kafka": true, - "HTTP": true, - } - - for m1 := range l3Members { - for m2 := range l3Members { - if m2 != m1 && l3Members[m1] > 0 && l3Members[m2] > 0 { - return fmt.Errorf("Combining %s and %s is not supported yet", m1, m2) - } - } - } - for member := range l3Members { - if l3Members[member] > 0 && len(e.ToPorts) > 0 && !l3DependentL4Support[member] { - return fmt.Errorf("Combining %s and ToPorts is not supported yet", member) - } - } - - if len(l7Members) > 0 && !option.Config.EnableL7Proxy { - return errors.New("L7 policy is not supported since L7 proxy is not enabled") - } - for member := range l7Members { - if l7Members[member] > 0 && !l7EgressSupport[member] { - return fmt.Errorf("L7 protocol %s is not supported on egress yet", member) - } - } - - if len(e.ICMPs) > 0 && !option.Config.EnableICMPRules { - return fmt.Errorf("ICMP rules can only be applied when the %q flag is set", option.EnableICMPRules) - } - - if len(e.ICMPs) > 0 && len(e.ToPorts) > 0 { - return fmt.Errorf("The ICMPs block may only be present without ToPorts. Define a separate rule to use ToPorts.") - } - - for _, es := range e.ToEndpoints { - if err := es.sanitize(); err != nil { - return err - } - } - - for _, es := range e.ToRequires { - if err := es.sanitize(); err != nil { - return err - } - } - - for i := range e.ToPorts { - if err := e.ToPorts[i].sanitize(false); err != nil { - return err - } - } - - for n := range e.ICMPs { - if err := e.ICMPs[n].verify(); err != nil { - return err - } - } - - for i := range e.ToCIDR { - if err := e.ToCIDR[i].sanitize(); err != nil { - return err - } - } - for i := range e.ToCIDRSet { - if err := e.ToCIDRSet[i].sanitize(); err != nil { - return err - } - } - - for _, toEntity := range e.ToEntities { - _, ok := EntitySelectorMapping[toEntity] - if !ok { - return fmt.Errorf("unsupported entity: %s", toEntity) - } - } - - for i := range e.ToFQDNs { - err := e.ToFQDNs[i].sanitize() - if err != nil { - return err - } - } - - e.SetAggregatedSelectors() - - return nil -} - -func (pr *L7Rules) sanitize(ports []PortProtocol) error { - nTypes := 0 - - if pr.HTTP != nil { - nTypes++ - for i := range pr.HTTP { - if err := pr.HTTP[i].Sanitize(); err != nil { - return err - } - } - } - - if pr.Kafka != nil { - nTypes++ - for i := range pr.Kafka { - if err := pr.Kafka[i].Sanitize(); err != nil { - return err - } - } - } - - if pr.DNS != nil { - // Forthcoming TPROXY redirection restricts DNS proxy to the standard DNS port (53). - // Require the port 53 be explicitly configured, and disallow other port numbers. - if len(ports) == 0 { - return fmt.Errorf("Port 53 must be specified for DNS rules") - } - - nTypes++ - for i := range pr.DNS { - if err := pr.DNS[i].Sanitize(); err != nil { - return err - } - } - } - - if pr.L7 != nil && pr.L7Proto == "" { - return fmt.Errorf("'l7' may only be specified when a 'l7proto' is also specified") - } - if pr.L7Proto != "" { - nTypes++ - for i := range pr.L7 { - if err := pr.L7[i].Sanitize(); err != nil { - return err - } - } - } - - if nTypes > 1 { - return fmt.Errorf("multiple L7 protocol rule types specified in single rule") - } - return nil -} - -func (pr *PortRule) sanitize(ingress bool) error { - hasDNSRules := pr.Rules != nil && len(pr.Rules.DNS) > 0 - if ingress && hasDNSRules { - return fmt.Errorf("DNS rules are not allowed on ingress") - } - - if len(pr.ServerNames) > 0 && !pr.Rules.IsEmpty() && pr.TerminatingTLS == nil { - return fmt.Errorf("ServerNames are not allowed with L7 rules without TLS termination") - } - for _, sn := range pr.ServerNames { - if sn == "" { - return fmt.Errorf("Empty server name is not allowed") - } - } - - if len(pr.Ports) > maxPorts { - return fmt.Errorf("too many ports, the max is %d", maxPorts) - } - haveZeroPort := false - for i := range pr.Ports { - var isZero bool - var err error - if isZero, err = pr.Ports[i].sanitize(); err != nil { - return err - } - if isZero { - haveZeroPort = true - } - // DNS L7 rules can be TCP, UDP or ANY, all others are TCP only. - switch { - case pr.Rules.IsEmpty(), hasDNSRules: - // nothing to do if no rules OR they are DNS rules (note the comma above) - case pr.Ports[i].Protocol != ProtoTCP: - return fmt.Errorf("L7 rules can only apply to TCP (not %s) except for DNS rules", pr.Ports[i].Protocol) - } - } - - listener := pr.Listener - if listener != nil { - // For now we have only tested custom listener support on the egress path. TODO - // (jrajahalme): Lift this limitation in follow-up work once proper testing has been - // done on the ingress path. - if ingress { - return fmt.Errorf("Listener is not allowed on ingress (%s)", listener.Name) - } - // There is no quarantee that Listener will support Cilium policy enforcement. Even - // now proxylib-based enforcement (e.g, Kafka) may work, but has not been tested. - // TODO (jrajahalme): Lift this limitation in follow-up work for proxylib based - // parsers if needed and when tested. - if !pr.Rules.IsEmpty() { - return fmt.Errorf("Listener is not allowed with L7 rules (%s)", listener.Name) - } - } - - // Sanitize L7 rules - if !pr.Rules.IsEmpty() { - if haveZeroPort { - return fmt.Errorf("L7 rules can not be used when a port is 0") - } - - if err := pr.Rules.sanitize(pr.Ports); err != nil { - return err - } - } - return nil -} - -func (pp *PortProtocol) sanitize() (isZero bool, err error) { - if pp.Port == "" { - return isZero, fmt.Errorf("Port must be specified") - } - - // Port names are formatted as IANA Service Names. This means that - // some legal numeric literals are no longer considered numbers, e.g, - // 0x10 is now considered a name rather than number 16. - if iana.IsSvcName(pp.Port) { - pp.Port = strings.ToLower(pp.Port) // Normalize for case insensitive comparison - } else { - p, err := strconv.ParseUint(pp.Port, 0, 16) - if err != nil { - return isZero, fmt.Errorf("Unable to parse port: %w", err) - } - isZero = p == 0 - } - - pp.Protocol, err = ParseL4Proto(string(pp.Protocol)) - return isZero, err -} - -func (ir *ICMPRule) verify() error { - if len(ir.Fields) > maxICMPFields { - return fmt.Errorf("too many types, the max is %d", maxICMPFields) - } - - for _, f := range ir.Fields { - if f.Family != IPv4Family && f.Family != IPv6Family && f.Family != "" { - return fmt.Errorf("wrong family: %s", f.Family) - } - } - - return nil -} - -// sanitize the given CIDR. -func (c CIDR) sanitize() error { - strCIDR := string(c) - if strCIDR == "" { - return fmt.Errorf("IP must be specified") - } - - prefix, err := netip.ParsePrefix(strCIDR) - if err != nil { - _, err := netip.ParseAddr(strCIDR) - if err != nil { - return fmt.Errorf("unable to parse CIDR: %w", err) - } - return nil - } - prefixLength := prefix.Bits() - if prefixLength < 0 { - return fmt.Errorf("CIDR cannot specify non-contiguous mask %s", prefix) - } - - return nil -} - -// sanitize validates a CIDRRule by checking that the CIDR prefix itself is -// valid, and ensuring that all of the exception CIDR prefixes are contained -// within the allowed CIDR prefix. -func (c *CIDRRule) sanitize() error { - // Only allow notation /. Note that this differs from - // the logic in api.CIDR.Sanitize(). - prefix, err := netip.ParsePrefix(string(c.Cidr)) - if err != nil { - return fmt.Errorf("Unable to parse CIDRRule %q: %w", c.Cidr, err) - } - - prefixLength := prefix.Bits() - if prefixLength < 0 { - return fmt.Errorf("CIDR cannot specify non-contiguous mask %s", prefix) - } - - // Ensure that each provided exception CIDR prefix is formatted correctly, - // and is contained within the CIDR prefix to/from which we want to allow - // traffic. - for _, p := range c.ExceptCIDRs { - except, err := netip.ParsePrefix(string(p)) - if err != nil { - return err - } - - // Note: this also checks that the allow CIDR prefix and the exception - // CIDR prefixes are part of the same address family. - if !prefix.Contains(except.Addr()) { - return fmt.Errorf("allow CIDR prefix %s does not contain "+ - "exclude CIDR prefix %s", c.Cidr, p) - } - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/rules.go b/vendor/github.com/cilium/cilium/pkg/policy/api/rules.go deleted file mode 100644 index aa69904eaa8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/rules.go +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "fmt" - "strings" -) - -// Rules is a collection of api.Rule. -// -// All rules must be evaluated in order to come to a conclusion. While -// it is sufficient to have a single fromEndpoints rule match, none of -// the fromRequires may be violated at the same time. -// +deepequal-gen:private-method=true -type Rules []*Rule - -func (rs Rules) String() string { - strRules := make([]string, 0, len(rs)) - - for _, r := range rs { - strRules = append(strRules, fmt.Sprintf("%+v", r)) - } - - return "[" + strings.Join(strRules, ",\n") + "]" -} - -// DeepEqual is a deepequal function, deeply comparing the -// receiver with other. the receiver must be non-nil. -func (rs *Rules) DeepEqual(other *Rules) bool { - switch { - case (rs == nil) != (other == nil): - return false - case (rs == nil) && (other == nil): - return true - } - return rs.deepEqual(other) -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/selector.go b/vendor/github.com/cilium/cilium/pkg/policy/api/selector.go deleted file mode 100644 index c23aa0d9c2b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/selector.go +++ /dev/null @@ -1,388 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "encoding/json" - "fmt" - "strings" - - k8sLbls "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels" - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - validation "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/validation" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/metrics" -) - -var log = logging.DefaultLogger.WithField(logfields.LogSubsys, "policy-api") - -// EndpointSelector is a wrapper for k8s LabelSelector. -type EndpointSelector struct { - *slim_metav1.LabelSelector `json:",inline"` - - // requirements provides a cache for a k8s-friendly format of the - // LabelSelector, which allows more efficient matching in Matches(). - // - // Kept as a pointer to allow EndpointSelector to be used as a map key. - requirements *k8sLbls.Requirements `json:"-"` - - // cachedLabelSelectorString is the cached representation of the - // LabelSelector for this EndpointSelector. It is populated when - // EndpointSelectors are created via `NewESFromMatchRequirements`. It is - // immutable after its creation. - cachedLabelSelectorString string `json:"-"` -} - -// LabelSelectorString returns a user-friendly string representation of -// EndpointSelector. -func (n *EndpointSelector) LabelSelectorString() string { - if n != nil && n.LabelSelector == nil { - return "" - } - return slim_metav1.FormatLabelSelector(n.LabelSelector) -} - -// String returns a string representation of EndpointSelector. -func (n EndpointSelector) String() string { - j, _ := n.MarshalJSON() - return string(j) -} - -// CachedString returns the cached string representation of the LabelSelector -// for this EndpointSelector. -func (n EndpointSelector) CachedString() string { - return n.cachedLabelSelectorString -} - -// UnmarshalJSON unmarshals the endpoint selector from the byte array. -func (n *EndpointSelector) UnmarshalJSON(b []byte) error { - n.LabelSelector = &slim_metav1.LabelSelector{} - err := json.Unmarshal(b, n.LabelSelector) - if err != nil { - return err - } - if n.MatchLabels != nil { - ml := map[string]string{} - for k, v := range n.MatchLabels { - ml[labels.GetExtendedKeyFrom(k)] = v - } - n.MatchLabels = ml - } - if n.MatchExpressions != nil { - newMatchExpr := make([]slim_metav1.LabelSelectorRequirement, len(n.MatchExpressions)) - for i, v := range n.MatchExpressions { - v.Key = labels.GetExtendedKeyFrom(v.Key) - newMatchExpr[i] = v - } - n.MatchExpressions = newMatchExpr - } - n.requirements = labelSelectorToRequirements(n.LabelSelector) - n.cachedLabelSelectorString = n.LabelSelector.String() - return nil -} - -// MarshalJSON returns a JSON representation of the byte array. -func (n EndpointSelector) MarshalJSON() ([]byte, error) { - ls := slim_metav1.LabelSelector{} - - if n.LabelSelector == nil { - return json.Marshal(ls) - } - - if n.MatchLabels != nil { - newLabels := map[string]string{} - for k, v := range n.MatchLabels { - newLabels[labels.GetCiliumKeyFrom(k)] = v - } - ls.MatchLabels = newLabels - } - if n.MatchExpressions != nil { - newMatchExpr := make([]slim_metav1.LabelSelectorRequirement, len(n.MatchExpressions)) - for i, v := range n.MatchExpressions { - v.Key = labels.GetCiliumKeyFrom(v.Key) - newMatchExpr[i] = v - } - ls.MatchExpressions = newMatchExpr - } - return json.Marshal(ls) -} - -// HasKeyPrefix checks if the endpoint selector contains the given key prefix in -// its MatchLabels map and MatchExpressions slice. -func (n EndpointSelector) HasKeyPrefix(prefix string) bool { - for k := range n.MatchLabels { - if strings.HasPrefix(k, prefix) { - return true - } - } - for _, v := range n.MatchExpressions { - if strings.HasPrefix(v.Key, prefix) { - return true - } - } - return false -} - -// HasKey checks if the endpoint selector contains the given key in -// its MatchLabels map or in its MatchExpressions slice. -func (n EndpointSelector) HasKey(key string) bool { - if _, ok := n.MatchLabels[key]; ok { - return true - } - for _, v := range n.MatchExpressions { - if v.Key == key { - return true - } - } - return false -} - -// GetMatch checks for a match on the specified key, and returns the value that -// the key must match, and true. If a match cannot be found, returns nil, false. -func (n EndpointSelector) GetMatch(key string) ([]string, bool) { - if value, ok := n.MatchLabels[key]; ok { - return []string{value}, true - } - for _, v := range n.MatchExpressions { - if v.Key == key && v.Operator == slim_metav1.LabelSelectorOpIn { - return v.Values, true - } - } - return nil, false -} - -// labelSelectorToRequirements turns a kubernetes Selector into a slice of -// requirements equivalent to the selector. These are cached internally in the -// EndpointSelector to speed up Matches(). -// -// This validates the labels, which can be expensive (and may fail..) -// If there's an error, the selector will be nil and the Matches() -// implementation will refuse to match any labels. -func labelSelectorToRequirements(labelSelector *slim_metav1.LabelSelector) *k8sLbls.Requirements { - selector, err := slim_metav1.LabelSelectorAsSelector(labelSelector) - if err != nil { - metrics.PolicyChangeTotal.WithLabelValues(metrics.LabelValueOutcomeFail).Inc() - log.WithError(err).WithField(logfields.EndpointLabelSelector, - logfields.Repr(labelSelector)).Error("unable to construct selector in label selector") - return nil - } - metrics.PolicyChangeTotal.WithLabelValues(metrics.LabelValueOutcomeSuccess).Inc() - - requirements, selectable := selector.Requirements() - if !selectable { - return nil - } - return &requirements -} - -// NewESFromLabels creates a new endpoint selector from the given labels. -func NewESFromLabels(lbls ...labels.Label) EndpointSelector { - ml := map[string]string{} - for _, lbl := range lbls { - ml[lbl.GetExtendedKey()] = lbl.Value - } - - return NewESFromMatchRequirements(ml, nil) -} - -// NewESFromMatchRequirements creates a new endpoint selector from the given -// match specifications: An optional set of labels that must match, and -// an optional slice of LabelSelectorRequirements. -// -// If the caller intends to reuse 'matchLabels' or 'reqs' after creating the -// EndpointSelector, they must make a copy of the parameter. -func NewESFromMatchRequirements(matchLabels map[string]string, reqs []slim_metav1.LabelSelectorRequirement) EndpointSelector { - labelSelector := &slim_metav1.LabelSelector{ - MatchLabels: matchLabels, - MatchExpressions: reqs, - } - return EndpointSelector{ - LabelSelector: labelSelector, - requirements: labelSelectorToRequirements(labelSelector), - cachedLabelSelectorString: labelSelector.String(), - } -} - -// SyncRequirementsWithLabelSelector ensures that the requirements within the -// specified EndpointSelector are in sync with the LabelSelector. This is -// because the LabelSelector has publicly accessible fields, which can be -// updated without concurrently updating the requirements, so the two fields can -// become out of sync. -func (n *EndpointSelector) SyncRequirementsWithLabelSelector() { - n.requirements = labelSelectorToRequirements(n.LabelSelector) -} - -// newReservedEndpointSelector returns a selector that matches on all -// endpoints with the specified reserved label. -func newReservedEndpointSelector(ID string) EndpointSelector { - reservedLabels := labels.NewLabel(ID, "", labels.LabelSourceReserved) - return NewESFromLabels(reservedLabels) -} - -var ( - // WildcardEndpointSelector is a wildcard endpoint selector matching - // all endpoints that can be described with labels. - WildcardEndpointSelector = NewESFromLabels() - - // ReservedEndpointSelectors map reserved labels to EndpointSelectors - // that will match those endpoints. - ReservedEndpointSelectors = map[string]EndpointSelector{ - labels.IDNameHost: newReservedEndpointSelector(labels.IDNameHost), - labels.IDNameRemoteNode: newReservedEndpointSelector(labels.IDNameRemoteNode), - labels.IDNameWorld: newReservedEndpointSelector(labels.IDNameWorld), - labels.IDNameWorldIPv4: newReservedEndpointSelector(labels.IDNameWorldIPv4), - labels.IDNameWorldIPv6: newReservedEndpointSelector(labels.IDNameWorldIPv6), - } -) - -// NewESFromK8sLabelSelector returns a new endpoint selector from the label -// where it the given srcPrefix will be encoded in the label's keys. -func NewESFromK8sLabelSelector(srcPrefix string, lss ...*slim_metav1.LabelSelector) EndpointSelector { - var ( - matchLabels map[string]string - matchExpressions []slim_metav1.LabelSelectorRequirement - ) - for _, ls := range lss { - if ls == nil { - continue - } - if ls.MatchLabels != nil { - if matchLabels == nil { - matchLabels = map[string]string{} - } - for k, v := range ls.MatchLabels { - matchLabels[srcPrefix+k] = v - } - } - if ls.MatchExpressions != nil { - if matchExpressions == nil { - matchExpressions = make([]slim_metav1.LabelSelectorRequirement, 0, len(ls.MatchExpressions)) - } - for _, v := range ls.MatchExpressions { - v.Key = srcPrefix + v.Key - matchExpressions = append(matchExpressions, v) - } - } - } - return NewESFromMatchRequirements(matchLabels, matchExpressions) -} - -// AddMatch adds a match for 'key' == 'value' to the endpoint selector. -func (n *EndpointSelector) AddMatch(key, value string) { - if n.MatchLabels == nil { - n.MatchLabels = map[string]string{} - } - n.MatchLabels[key] = value - n.requirements = labelSelectorToRequirements(n.LabelSelector) - n.cachedLabelSelectorString = n.LabelSelector.String() -} - -// AddMatchExpression adds a match expression to label selector of the endpoint selector. -func (n *EndpointSelector) AddMatchExpression(key string, op slim_metav1.LabelSelectorOperator, values []string) { - n.MatchExpressions = append(n.MatchExpressions, slim_metav1.LabelSelectorRequirement{ - Key: key, - Operator: op, - Values: values, - }) - - // Update cache of the EndopintSelector from the embedded label selector. - // This is to make sure we have updates caches containing the required selectors. - n.requirements = labelSelectorToRequirements(n.LabelSelector) - n.cachedLabelSelectorString = n.LabelSelector.String() -} - -// Matches returns true if the endpoint selector Matches the `lblsToMatch`. -// Returns always true if the endpoint selector contains the reserved label for -// "all". -func (n *EndpointSelector) Matches(lblsToMatch k8sLbls.Labels) bool { - // Try to update cached requirements for this EndpointSelector if possible. - if n.requirements == nil { - n.requirements = labelSelectorToRequirements(n.LabelSelector) - // Nil indicates that requirements failed validation in some way, - // so we cannot parse the labels for matching purposes; thus, we cannot - // match if labels cannot be parsed, so return false. - if n.requirements == nil { - return false - } - } - for _, req := range *n.requirements { - if !req.Matches(lblsToMatch) { - return false - } - } - return true -} - -// IsWildcard returns true if the endpoint selector selects all endpoints. -func (n *EndpointSelector) IsWildcard() bool { - return n.LabelSelector != nil && - len(n.LabelSelector.MatchLabels)+len(n.LabelSelector.MatchExpressions) == 0 -} - -// ConvertToLabelSelectorRequirementSlice converts the MatchLabels and -// MatchExpressions within the specified EndpointSelector into a list of -// LabelSelectorRequirements. -func (n *EndpointSelector) ConvertToLabelSelectorRequirementSlice() []slim_metav1.LabelSelectorRequirement { - requirements := make([]slim_metav1.LabelSelectorRequirement, 0, len(n.MatchExpressions)+len(n.MatchLabels)) - // Append already existing match expressions. - requirements = append(requirements, n.MatchExpressions...) - // Convert each MatchLables to LabelSelectorRequirement. - for key, value := range n.MatchLabels { - requirementFromMatchLabels := slim_metav1.LabelSelectorRequirement{ - Key: key, - Operator: slim_metav1.LabelSelectorOpIn, - Values: []string{value}, - } - requirements = append(requirements, requirementFromMatchLabels) - } - return requirements -} - -// sanitize returns an error if the EndpointSelector's LabelSelector is invalid. -func (n *EndpointSelector) sanitize() error { - errList := validation.ValidateLabelSelector(n.LabelSelector, validation.LabelSelectorValidationOptions{AllowInvalidLabelValueInSelector: false}, nil) - if len(errList) > 0 { - return fmt.Errorf("invalid label selector: %w", errList.ToAggregate()) - } - return nil -} - -// EndpointSelectorSlice is a slice of EndpointSelectors that can be sorted. -type EndpointSelectorSlice []EndpointSelector - -func (s EndpointSelectorSlice) Len() int { return len(s) } -func (s EndpointSelectorSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -func (s EndpointSelectorSlice) Less(i, j int) bool { - strI := s[i].LabelSelectorString() - strJ := s[j].LabelSelectorString() - - return strings.Compare(strI, strJ) < 0 -} - -// Matches returns true if any of the EndpointSelectors in the slice match the -// provided labels -func (s EndpointSelectorSlice) Matches(ctx labels.LabelArray) bool { - for _, selector := range s { - if selector.Matches(ctx) { - return true - } - } - - return false -} - -// SelectsAllEndpoints returns whether the EndpointSelectorSlice selects all -// endpoints, which is true if the wildcard endpoint selector is present in the -// slice. -func (s EndpointSelectorSlice) SelectsAllEndpoints() bool { - for _, selector := range s { - if selector.IsWildcard() { - return true - } - } - return false -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/service.go b/vendor/github.com/cilium/cilium/pkg/policy/api/service.go deleted file mode 100644 index 57868a367aa..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/service.go +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -// ServiceSelector is a label selector for k8s services -type ServiceSelector EndpointSelector - -// Service wraps around selectors for services -type Service struct { - // K8sServiceSelector selects services by k8s labels and namespace - K8sServiceSelector *K8sServiceSelectorNamespace `json:"k8sServiceSelector,omitempty"` - // K8sService selects service by name and namespace pair - K8sService *K8sServiceNamespace `json:"k8sService,omitempty"` -} - -// K8sServiceNamespace is an abstraction for the k8s service + namespace types. -type K8sServiceNamespace struct { - ServiceName string `json:"serviceName,omitempty"` - Namespace string `json:"namespace,omitempty"` -} - -// K8sServiceSelectorNamespace wraps service selector with namespace -type K8sServiceSelectorNamespace struct { - // +kubebuilder:validation:Required - Selector ServiceSelector `json:"selector"` - Namespace string `json:"namespace,omitempty"` -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/utils.go b/vendor/github.com/cilium/cilium/pkg/policy/api/utils.go deleted file mode 100644 index 674f9c25087..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/utils.go +++ /dev/null @@ -1,172 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package api - -import ( - "fmt" - "strings" -) - -// Exists returns true if the HTTP rule already exists in the list of rules -func (h *PortRuleHTTP) Exists(rules L7Rules) bool { - for _, existingRule := range rules.HTTP { - if h.Equal(existingRule) { - return true - } - } - - return false -} - -// Equal returns true if both HTTP rules are equal -func (h *PortRuleHTTP) Equal(o PortRuleHTTP) bool { - if h.Path != o.Path || - h.Method != o.Method || - h.Host != o.Host || - len(h.Headers) != len(o.Headers) || - len(h.HeaderMatches) != len(o.HeaderMatches) { - return false - } - - for i, value := range h.Headers { - if o.Headers[i] != value { - return false - } - } - - for i, value := range h.HeaderMatches { - if !o.HeaderMatches[i].Equal(value) { - return false - } - } - return true -} - -// Equal returns true if both Secrets are equal -func (a *Secret) Equal(b *Secret) bool { - return a == nil && b == nil || a != nil && b != nil && *a == *b -} - -// Equal returns true if both HeaderMatches are equal -func (h *HeaderMatch) Equal(o *HeaderMatch) bool { - if h.Mismatch != o.Mismatch || - h.Name != o.Name || - h.Value != o.Value || - !h.Secret.Equal(o.Secret) { - return false - } - return true -} - -// Exists returns true if the DNS rule already exists in the list of rules -func (d *PortRuleDNS) Exists(rules L7Rules) bool { - for _, existingRule := range rules.DNS { - if d.Equal(existingRule) { - return true - } - } - - return false -} - -// Exists returns true if the L7 rule already exists in the list of rules -func (h *PortRuleL7) Exists(rules L7Rules) bool { - for _, existingRule := range rules.L7 { - if h.Equal(existingRule) { - return true - } - } - - return false -} - -// Equal returns true if both rules are equal -func (d *PortRuleDNS) Equal(o PortRuleDNS) bool { - return d != nil && d.MatchName == o.MatchName && d.MatchPattern == o.MatchPattern -} - -// Equal returns true if both L7 rules are equal -func (h *PortRuleL7) Equal(o PortRuleL7) bool { - if len(*h) != len(o) { - return false - } - for k, v := range *h { - if v2, ok := o[k]; !ok || v2 != v { - return false - } - } - return true -} - -// Validate returns an error if the layer 4 protocol is not valid -func (l4 L4Proto) Validate() error { - switch l4 { - case ProtoAny, ProtoTCP, ProtoUDP, ProtoSCTP: - default: - return fmt.Errorf("invalid protocol %q, must be { tcp | udp | sctp | any }", l4) - } - - return nil -} - -// ParseL4Proto parses a string as layer 4 protocol -func ParseL4Proto(proto string) (L4Proto, error) { - if proto == "" { - return ProtoAny, nil - } - - p := L4Proto(strings.ToUpper(proto)) - return p, p.Validate() -} - -// ResourceQualifiedName returns the qualified name of an Envoy resource, -// prepending CEC namespace and CEC name to the resource name and using -// '/' as a separator. -// -// If resourceName already has a slash, it must be of the form 'namespace/name', where namespace -// usually is equal to 'namespace'. This also applies for clusterwide resources for which -// 'namespace' is empty. -// -// If 'resourceName' has no slash, it will be prepended with 'namespace/cecName' so that the -// full name passed to Envoy is 'namespace/cecName/resourceName'. This makes non-qualified resource -// names and resource name references local to the given namespace and CiliumEnvoyConfig CRD. -// -// if 'forceNamespace' is 'true' then resourceName is always prepended with "namespace/cecName/", -// even it it already has backslashes, unless the first component of the name is equal to -// 'namespace'. -// -// As a special case pass through an empty resourceName without qualification so that unnamed -// resources do not become named. This is important to not transform an invalid Envoy configuration -// to a valid one with a fake name. - -type Option int - -const ( - ForceNamespace Option = iota -) - -func ResourceQualifiedName(namespace, cecName, resourceName string, options ...Option) (name string, updated bool) { - forceNamespace := false - for _, option := range options { - switch option { - case ForceNamespace: - forceNamespace = true - } - } - - idx := strings.IndexRune(resourceName, '/') - if resourceName == "" || idx >= 0 && (!forceNamespace || (idx == len(namespace) && strings.HasPrefix(resourceName, namespace))) { - return resourceName, false - } - - var sb strings.Builder - - sb.WriteString(namespace) - sb.WriteRune('/') - sb.WriteString(cecName) - sb.WriteRune('/') - sb.WriteString(resourceName) - - return sb.String(), true -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/zz_generated.deepcopy.go b/vendor/github.com/cilium/cilium/pkg/policy/api/zz_generated.deepcopy.go deleted file mode 100644 index 7d1b0b70ba5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/zz_generated.deepcopy.go +++ /dev/null @@ -1,1080 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package api - -import ( - labels "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - kafka "github.com/cilium/proxy/pkg/policy/api/kafka" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSGroup) DeepCopyInto(out *AWSGroup) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.SecurityGroupsIds != nil { - in, out := &in.SecurityGroupsIds, &out.SecurityGroupsIds - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecurityGroupsNames != nil { - in, out := &in.SecurityGroupsNames, &out.SecurityGroupsNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSGroup. -func (in *AWSGroup) DeepCopy() *AWSGroup { - if in == nil { - return nil - } - out := new(AWSGroup) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Authentication) DeepCopyInto(out *Authentication) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authentication. -func (in *Authentication) DeepCopy() *Authentication { - if in == nil { - return nil - } - out := new(Authentication) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CIDRRule) DeepCopyInto(out *CIDRRule) { - *out = *in - if in.ExceptCIDRs != nil { - in, out := &in.ExceptCIDRs, &out.ExceptCIDRs - *out = make([]CIDR, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CIDRRule. -func (in *CIDRRule) DeepCopy() *CIDRRule { - if in == nil { - return nil - } - out := new(CIDRRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in CIDRRuleSlice) DeepCopyInto(out *CIDRRuleSlice) { - { - in := &in - *out = make(CIDRRuleSlice, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CIDRRuleSlice. -func (in CIDRRuleSlice) DeepCopy() CIDRRuleSlice { - if in == nil { - return nil - } - out := new(CIDRRuleSlice) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in CIDRSlice) DeepCopyInto(out *CIDRSlice) { - { - in := &in - *out = make(CIDRSlice, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CIDRSlice. -func (in CIDRSlice) DeepCopy() CIDRSlice { - if in == nil { - return nil - } - out := new(CIDRSlice) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressCommonRule) DeepCopyInto(out *EgressCommonRule) { - *out = *in - if in.ToEndpoints != nil { - in, out := &in.ToEndpoints, &out.ToEndpoints - *out = make([]EndpointSelector, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ToRequires != nil { - in, out := &in.ToRequires, &out.ToRequires - *out = make([]EndpointSelector, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ToCIDR != nil { - in, out := &in.ToCIDR, &out.ToCIDR - *out = make(CIDRSlice, len(*in)) - copy(*out, *in) - } - if in.ToCIDRSet != nil { - in, out := &in.ToCIDRSet, &out.ToCIDRSet - *out = make(CIDRRuleSlice, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ToEntities != nil { - in, out := &in.ToEntities, &out.ToEntities - *out = make(EntitySlice, len(*in)) - copy(*out, *in) - } - if in.ToServices != nil { - in, out := &in.ToServices, &out.ToServices - *out = make([]Service, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ToGroups != nil { - in, out := &in.ToGroups, &out.ToGroups - *out = make([]ToGroups, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.aggregatedSelectors != nil { - in, out := &in.aggregatedSelectors, &out.aggregatedSelectors - *out = make(EndpointSelectorSlice, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressCommonRule. -func (in *EgressCommonRule) DeepCopy() *EgressCommonRule { - if in == nil { - return nil - } - out := new(EgressCommonRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressDenyRule) DeepCopyInto(out *EgressDenyRule) { - *out = *in - in.EgressCommonRule.DeepCopyInto(&out.EgressCommonRule) - if in.ToPorts != nil { - in, out := &in.ToPorts, &out.ToPorts - *out = make(PortDenyRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ICMPs != nil { - in, out := &in.ICMPs, &out.ICMPs - *out = make(ICMPRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressDenyRule. -func (in *EgressDenyRule) DeepCopy() *EgressDenyRule { - if in == nil { - return nil - } - out := new(EgressDenyRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressRule) DeepCopyInto(out *EgressRule) { - *out = *in - in.EgressCommonRule.DeepCopyInto(&out.EgressCommonRule) - if in.ToPorts != nil { - in, out := &in.ToPorts, &out.ToPorts - *out = make(PortRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ToFQDNs != nil { - in, out := &in.ToFQDNs, &out.ToFQDNs - *out = make(FQDNSelectorSlice, len(*in)) - copy(*out, *in) - } - if in.ICMPs != nil { - in, out := &in.ICMPs, &out.ICMPs - *out = make(ICMPRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Authentication != nil { - in, out := &in.Authentication, &out.Authentication - *out = new(Authentication) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressRule. -func (in *EgressRule) DeepCopy() *EgressRule { - if in == nil { - return nil - } - out := new(EgressRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointSelector) DeepCopyInto(out *EndpointSelector) { - *out = *in - if in.LabelSelector != nil { - in, out := &in.LabelSelector, &out.LabelSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.requirements != nil { - in, out := &in.requirements, &out.requirements - *out = new(labels.Requirements) - if **in != nil { - in, out := *in, *out - *out = make([]labels.Requirement, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSelector. -func (in *EndpointSelector) DeepCopy() *EndpointSelector { - if in == nil { - return nil - } - out := new(EndpointSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in EndpointSelectorSlice) DeepCopyInto(out *EndpointSelectorSlice) { - { - in := &in - *out = make(EndpointSelectorSlice, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSelectorSlice. -func (in EndpointSelectorSlice) DeepCopy() EndpointSelectorSlice { - if in == nil { - return nil - } - out := new(EndpointSelectorSlice) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in EntitySlice) DeepCopyInto(out *EntitySlice) { - { - in := &in - *out = make(EntitySlice, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EntitySlice. -func (in EntitySlice) DeepCopy() EntitySlice { - if in == nil { - return nil - } - out := new(EntitySlice) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyConfig) DeepCopyInto(out *EnvoyConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyConfig. -func (in *EnvoyConfig) DeepCopy() *EnvoyConfig { - if in == nil { - return nil - } - out := new(EnvoyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FQDNSelector) DeepCopyInto(out *FQDNSelector) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FQDNSelector. -func (in *FQDNSelector) DeepCopy() *FQDNSelector { - if in == nil { - return nil - } - out := new(FQDNSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in FQDNSelectorSlice) DeepCopyInto(out *FQDNSelectorSlice) { - { - in := &in - *out = make(FQDNSelectorSlice, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FQDNSelectorSlice. -func (in FQDNSelectorSlice) DeepCopy() FQDNSelectorSlice { - if in == nil { - return nil - } - out := new(FQDNSelectorSlice) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HeaderMatch) DeepCopyInto(out *HeaderMatch) { - *out = *in - if in.Secret != nil { - in, out := &in.Secret, &out.Secret - *out = new(Secret) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderMatch. -func (in *HeaderMatch) DeepCopy() *HeaderMatch { - if in == nil { - return nil - } - out := new(HeaderMatch) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ICMPField) DeepCopyInto(out *ICMPField) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ICMPField. -func (in *ICMPField) DeepCopy() *ICMPField { - if in == nil { - return nil - } - out := new(ICMPField) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ICMPRule) DeepCopyInto(out *ICMPRule) { - *out = *in - if in.Fields != nil { - in, out := &in.Fields, &out.Fields - *out = make([]ICMPField, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ICMPRule. -func (in *ICMPRule) DeepCopy() *ICMPRule { - if in == nil { - return nil - } - out := new(ICMPRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in ICMPRules) DeepCopyInto(out *ICMPRules) { - { - in := &in - *out = make(ICMPRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ICMPRules. -func (in ICMPRules) DeepCopy() ICMPRules { - if in == nil { - return nil - } - out := new(ICMPRules) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressCommonRule) DeepCopyInto(out *IngressCommonRule) { - *out = *in - if in.FromEndpoints != nil { - in, out := &in.FromEndpoints, &out.FromEndpoints - *out = make([]EndpointSelector, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FromRequires != nil { - in, out := &in.FromRequires, &out.FromRequires - *out = make([]EndpointSelector, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FromCIDR != nil { - in, out := &in.FromCIDR, &out.FromCIDR - *out = make(CIDRSlice, len(*in)) - copy(*out, *in) - } - if in.FromCIDRSet != nil { - in, out := &in.FromCIDRSet, &out.FromCIDRSet - *out = make(CIDRRuleSlice, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FromEntities != nil { - in, out := &in.FromEntities, &out.FromEntities - *out = make(EntitySlice, len(*in)) - copy(*out, *in) - } - if in.aggregatedSelectors != nil { - in, out := &in.aggregatedSelectors, &out.aggregatedSelectors - *out = make(EndpointSelectorSlice, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressCommonRule. -func (in *IngressCommonRule) DeepCopy() *IngressCommonRule { - if in == nil { - return nil - } - out := new(IngressCommonRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressDenyRule) DeepCopyInto(out *IngressDenyRule) { - *out = *in - in.IngressCommonRule.DeepCopyInto(&out.IngressCommonRule) - if in.ToPorts != nil { - in, out := &in.ToPorts, &out.ToPorts - *out = make(PortDenyRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ICMPs != nil { - in, out := &in.ICMPs, &out.ICMPs - *out = make(ICMPRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressDenyRule. -func (in *IngressDenyRule) DeepCopy() *IngressDenyRule { - if in == nil { - return nil - } - out := new(IngressDenyRule) - in.DeepCopyInto(out) - return out -} - -// 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.IngressCommonRule.DeepCopyInto(&out.IngressCommonRule) - if in.ToPorts != nil { - in, out := &in.ToPorts, &out.ToPorts - *out = make(PortRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ICMPs != nil { - in, out := &in.ICMPs, &out.ICMPs - *out = make(ICMPRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Authentication != nil { - in, out := &in.Authentication, &out.Authentication - *out = new(Authentication) - **out = **in - } - 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 *K8sServiceNamespace) DeepCopyInto(out *K8sServiceNamespace) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8sServiceNamespace. -func (in *K8sServiceNamespace) DeepCopy() *K8sServiceNamespace { - if in == nil { - return nil - } - out := new(K8sServiceNamespace) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *K8sServiceSelectorNamespace) DeepCopyInto(out *K8sServiceSelectorNamespace) { - *out = *in - in.Selector.DeepCopyInto(&out.Selector) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8sServiceSelectorNamespace. -func (in *K8sServiceSelectorNamespace) DeepCopy() *K8sServiceSelectorNamespace { - if in == nil { - return nil - } - out := new(K8sServiceSelectorNamespace) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *L7Rules) DeepCopyInto(out *L7Rules) { - *out = *in - if in.HTTP != nil { - in, out := &in.HTTP, &out.HTTP - *out = make([]PortRuleHTTP, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Kafka != nil { - in, out := &in.Kafka, &out.Kafka - *out = make([]kafka.PortRule, len(*in)) - copy(*out, *in) - } - if in.DNS != nil { - in, out := &in.DNS, &out.DNS - *out = make([]PortRuleDNS, len(*in)) - copy(*out, *in) - } - if in.L7 != nil { - in, out := &in.L7, &out.L7 - *out = make([]PortRuleL7, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = make(PortRuleL7, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L7Rules. -func (in *L7Rules) DeepCopy() *L7Rules { - if in == nil { - return nil - } - out := new(L7Rules) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Listener) DeepCopyInto(out *Listener) { - *out = *in - if in.EnvoyConfig != nil { - in, out := &in.EnvoyConfig, &out.EnvoyConfig - *out = new(EnvoyConfig) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Listener. -func (in *Listener) DeepCopy() *Listener { - if in == nil { - return nil - } - out := new(Listener) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PortDenyRule) DeepCopyInto(out *PortDenyRule) { - *out = *in - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]PortProtocol, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortDenyRule. -func (in *PortDenyRule) DeepCopy() *PortDenyRule { - if in == nil { - return nil - } - out := new(PortDenyRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in PortDenyRules) DeepCopyInto(out *PortDenyRules) { - { - in := &in - *out = make(PortDenyRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortDenyRules. -func (in PortDenyRules) DeepCopy() PortDenyRules { - if in == nil { - return nil - } - out := new(PortDenyRules) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PortProtocol) DeepCopyInto(out *PortProtocol) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortProtocol. -func (in *PortProtocol) DeepCopy() *PortProtocol { - if in == nil { - return nil - } - out := new(PortProtocol) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PortRule) DeepCopyInto(out *PortRule) { - *out = *in - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]PortProtocol, len(*in)) - copy(*out, *in) - } - if in.TerminatingTLS != nil { - in, out := &in.TerminatingTLS, &out.TerminatingTLS - *out = new(TLSContext) - (*in).DeepCopyInto(*out) - } - if in.OriginatingTLS != nil { - in, out := &in.OriginatingTLS, &out.OriginatingTLS - *out = new(TLSContext) - (*in).DeepCopyInto(*out) - } - if in.ServerNames != nil { - in, out := &in.ServerNames, &out.ServerNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Listener != nil { - in, out := &in.Listener, &out.Listener - *out = new(Listener) - (*in).DeepCopyInto(*out) - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = new(L7Rules) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortRule. -func (in *PortRule) DeepCopy() *PortRule { - if in == nil { - return nil - } - out := new(PortRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PortRuleDNS) DeepCopyInto(out *PortRuleDNS) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortRuleDNS. -func (in *PortRuleDNS) DeepCopy() *PortRuleDNS { - if in == nil { - return nil - } - out := new(PortRuleDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PortRuleHTTP) DeepCopyInto(out *PortRuleHTTP) { - *out = *in - if in.Headers != nil { - in, out := &in.Headers, &out.Headers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.HeaderMatches != nil { - in, out := &in.HeaderMatches, &out.HeaderMatches - *out = make([]*HeaderMatch, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(HeaderMatch) - (*in).DeepCopyInto(*out) - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortRuleHTTP. -func (in *PortRuleHTTP) DeepCopy() *PortRuleHTTP { - if in == nil { - return nil - } - out := new(PortRuleHTTP) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in PortRuleL7) DeepCopyInto(out *PortRuleL7) { - { - in := &in - *out = make(PortRuleL7, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortRuleL7. -func (in PortRuleL7) DeepCopy() PortRuleL7 { - if in == nil { - return nil - } - out := new(PortRuleL7) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in PortRules) DeepCopyInto(out *PortRules) { - { - in := &in - *out = make(PortRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortRules. -func (in PortRules) DeepCopy() PortRules { - if in == nil { - return nil - } - out := new(PortRules) - in.DeepCopyInto(out) - return *out -} - -// 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 - in.EndpointSelector.DeepCopyInto(&out.EndpointSelector) - in.NodeSelector.DeepCopyInto(&out.NodeSelector) - if in.Ingress != nil { - in, out := &in.Ingress, &out.Ingress - *out = make([]IngressRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.IngressDeny != nil { - in, out := &in.IngressDeny, &out.IngressDeny - *out = make([]IngressDenyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Egress != nil { - in, out := &in.Egress, &out.Egress - *out = make([]EgressRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.EgressDeny != nil { - in, out := &in.EgressDeny, &out.EgressDeny - *out = make([]EgressDenyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.Labels = in.Labels.DeepCopy() - 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 Rules) DeepCopyInto(out *Rules) { - { - in := &in - *out = make(Rules, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(Rule) - (*in).DeepCopyInto(*out) - } - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rules. -func (in Rules) DeepCopy() Rules { - if in == nil { - return nil - } - out := new(Rules) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Secret) DeepCopyInto(out *Secret) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Secret. -func (in *Secret) DeepCopy() *Secret { - if in == nil { - return nil - } - out := new(Secret) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Service) DeepCopyInto(out *Service) { - *out = *in - if in.K8sServiceSelector != nil { - in, out := &in.K8sServiceSelector, &out.K8sServiceSelector - *out = new(K8sServiceSelectorNamespace) - (*in).DeepCopyInto(*out) - } - if in.K8sService != nil { - in, out := &in.K8sService, &out.K8sService - *out = new(K8sServiceNamespace) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service. -func (in *Service) DeepCopy() *Service { - if in == nil { - return nil - } - out := new(Service) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceSelector) DeepCopyInto(out *ServiceSelector) { - *out = *in - if in.LabelSelector != nil { - in, out := &in.LabelSelector, &out.LabelSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.requirements != nil { - in, out := &in.requirements, &out.requirements - *out = new(labels.Requirements) - if **in != nil { - in, out := *in, *out - *out = make([]labels.Requirement, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSelector. -func (in *ServiceSelector) DeepCopy() *ServiceSelector { - if in == nil { - return nil - } - out := new(ServiceSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TLSContext) DeepCopyInto(out *TLSContext) { - *out = *in - if in.Secret != nil { - in, out := &in.Secret, &out.Secret - *out = new(Secret) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSContext. -func (in *TLSContext) DeepCopy() *TLSContext { - if in == nil { - return nil - } - out := new(TLSContext) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ToGroups) DeepCopyInto(out *ToGroups) { - *out = *in - if in.AWS != nil { - in, out := &in.AWS, &out.AWS - *out = new(AWSGroup) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ToGroups. -func (in *ToGroups) DeepCopy() *ToGroups { - if in == nil { - return nil - } - out := new(ToGroups) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/api/zz_generated.deepequal.go b/vendor/github.com/cilium/cilium/pkg/policy/api/zz_generated.deepequal.go deleted file mode 100644 index a6573025d3e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/api/zz_generated.deepequal.go +++ /dev/null @@ -1,1326 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package api - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *AWSGroup) DeepEqual(other *AWSGroup) bool { - if other == nil { - return false - } - - if ((in.Labels != nil) && (other.Labels != nil)) || ((in.Labels == nil) != (other.Labels == nil)) { - in, other := &in.Labels, &other.Labels - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - } - - if ((in.SecurityGroupsIds != nil) && (other.SecurityGroupsIds != nil)) || ((in.SecurityGroupsIds == nil) != (other.SecurityGroupsIds == nil)) { - in, other := &in.SecurityGroupsIds, &other.SecurityGroupsIds - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if ((in.SecurityGroupsNames != nil) && (other.SecurityGroupsNames != nil)) || ((in.SecurityGroupsNames == nil) != (other.SecurityGroupsNames == nil)) { - in, other := &in.SecurityGroupsNames, &other.SecurityGroupsNames - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if in.Region != other.Region { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Authentication) DeepEqual(other *Authentication) bool { - if other == nil { - return false - } - - if in.Mode != other.Mode { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CIDRRule) DeepEqual(other *CIDRRule) bool { - if other == nil { - return false - } - - if in.Cidr != other.Cidr { - return false - } - if in.CIDRGroupRef != other.CIDRGroupRef { - return false - } - if ((in.ExceptCIDRs != nil) && (other.ExceptCIDRs != nil)) || ((in.ExceptCIDRs == nil) != (other.ExceptCIDRs == nil)) { - in, other := &in.ExceptCIDRs, &other.ExceptCIDRs - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if in.Generated != other.Generated { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CIDRRuleSlice) DeepEqual(other *CIDRRuleSlice) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *CIDRSlice) DeepEqual(other *CIDRSlice) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EgressCommonRule) DeepEqual(other *EgressCommonRule) bool { - if other == nil { - return false - } - - if ((in.ToEndpoints != nil) && (other.ToEndpoints != nil)) || ((in.ToEndpoints == nil) != (other.ToEndpoints == nil)) { - in, other := &in.ToEndpoints, &other.ToEndpoints - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.ToRequires != nil) && (other.ToRequires != nil)) || ((in.ToRequires == nil) != (other.ToRequires == nil)) { - in, other := &in.ToRequires, &other.ToRequires - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.ToCIDR != nil) && (other.ToCIDR != nil)) || ((in.ToCIDR == nil) != (other.ToCIDR == nil)) { - in, other := &in.ToCIDR, &other.ToCIDR - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.ToCIDRSet != nil) && (other.ToCIDRSet != nil)) || ((in.ToCIDRSet == nil) != (other.ToCIDRSet == nil)) { - in, other := &in.ToCIDRSet, &other.ToCIDRSet - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.ToEntities != nil) && (other.ToEntities != nil)) || ((in.ToEntities == nil) != (other.ToEntities == nil)) { - in, other := &in.ToEntities, &other.ToEntities - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.ToServices != nil) && (other.ToServices != nil)) || ((in.ToServices == nil) != (other.ToServices == nil)) { - in, other := &in.ToServices, &other.ToServices - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.ToGroups != nil) && (other.ToGroups != nil)) || ((in.ToGroups == nil) != (other.ToGroups == nil)) { - in, other := &in.ToGroups, &other.ToGroups - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.aggregatedSelectors != nil) && (other.aggregatedSelectors != nil)) || ((in.aggregatedSelectors == nil) != (other.aggregatedSelectors == nil)) { - in, other := &in.aggregatedSelectors, &other.aggregatedSelectors - if other == nil || !in.DeepEqual(other) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EgressDenyRule) DeepEqual(other *EgressDenyRule) bool { - if other == nil { - return false - } - - if !in.EgressCommonRule.DeepEqual(&other.EgressCommonRule) { - return false - } - - if ((in.ToPorts != nil) && (other.ToPorts != nil)) || ((in.ToPorts == nil) != (other.ToPorts == nil)) { - in, other := &in.ToPorts, &other.ToPorts - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.ICMPs != nil) && (other.ICMPs != nil)) || ((in.ICMPs == nil) != (other.ICMPs == nil)) { - in, other := &in.ICMPs, &other.ICMPs - if other == nil || !in.DeepEqual(other) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EgressRule) DeepEqual(other *EgressRule) bool { - if other == nil { - return false - } - - if !in.EgressCommonRule.DeepEqual(&other.EgressCommonRule) { - return false - } - - if ((in.ToPorts != nil) && (other.ToPorts != nil)) || ((in.ToPorts == nil) != (other.ToPorts == nil)) { - in, other := &in.ToPorts, &other.ToPorts - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.ToFQDNs != nil) && (other.ToFQDNs != nil)) || ((in.ToFQDNs == nil) != (other.ToFQDNs == nil)) { - in, other := &in.ToFQDNs, &other.ToFQDNs - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.ICMPs != nil) && (other.ICMPs != nil)) || ((in.ICMPs == nil) != (other.ICMPs == nil)) { - in, other := &in.ICMPs, &other.ICMPs - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if (in.Authentication == nil) != (other.Authentication == nil) { - return false - } else if in.Authentication != nil { - if !in.Authentication.DeepEqual(other.Authentication) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointSelector) DeepEqual(other *EndpointSelector) bool { - if other == nil { - return false - } - - if (in.LabelSelector == nil) != (other.LabelSelector == nil) { - return false - } else if in.LabelSelector != nil { - if !in.LabelSelector.DeepEqual(other.LabelSelector) { - return false - } - } - - if (in.requirements == nil) != (other.requirements == nil) { - return false - } else if in.requirements != nil { - if !in.requirements.DeepEqual(other.requirements) { - return false - } - } - - if in.cachedLabelSelectorString != other.cachedLabelSelectorString { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EndpointSelectorSlice) DeepEqual(other *EndpointSelectorSlice) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EntitySlice) DeepEqual(other *EntitySlice) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *EnvoyConfig) DeepEqual(other *EnvoyConfig) bool { - if other == nil { - return false - } - - if in.Kind != other.Kind { - return false - } - if in.Name != other.Name { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *FQDNSelector) DeepEqual(other *FQDNSelector) bool { - if other == nil { - return false - } - - if in.MatchName != other.MatchName { - return false - } - if in.MatchPattern != other.MatchPattern { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *FQDNSelectorSlice) DeepEqual(other *FQDNSelectorSlice) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *HeaderMatch) DeepEqual(other *HeaderMatch) bool { - if other == nil { - return false - } - - if in.Mismatch != other.Mismatch { - return false - } - if in.Name != other.Name { - return false - } - if (in.Secret == nil) != (other.Secret == nil) { - return false - } else if in.Secret != nil { - if !in.Secret.DeepEqual(other.Secret) { - return false - } - } - - if in.Value != other.Value { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ICMPField) DeepEqual(other *ICMPField) bool { - if other == nil { - return false - } - - if in.Family != other.Family { - return false - } - if in.Type != other.Type { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ICMPRule) DeepEqual(other *ICMPRule) bool { - if other == nil { - return false - } - - if ((in.Fields != nil) && (other.Fields != nil)) || ((in.Fields == nil) != (other.Fields == nil)) { - in, other := &in.Fields, &other.Fields - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ICMPRules) DeepEqual(other *ICMPRules) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IngressCommonRule) DeepEqual(other *IngressCommonRule) bool { - if other == nil { - return false - } - - if ((in.FromEndpoints != nil) && (other.FromEndpoints != nil)) || ((in.FromEndpoints == nil) != (other.FromEndpoints == nil)) { - in, other := &in.FromEndpoints, &other.FromEndpoints - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.FromRequires != nil) && (other.FromRequires != nil)) || ((in.FromRequires == nil) != (other.FromRequires == nil)) { - in, other := &in.FromRequires, &other.FromRequires - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.FromCIDR != nil) && (other.FromCIDR != nil)) || ((in.FromCIDR == nil) != (other.FromCIDR == nil)) { - in, other := &in.FromCIDR, &other.FromCIDR - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.FromCIDRSet != nil) && (other.FromCIDRSet != nil)) || ((in.FromCIDRSet == nil) != (other.FromCIDRSet == nil)) { - in, other := &in.FromCIDRSet, &other.FromCIDRSet - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.FromEntities != nil) && (other.FromEntities != nil)) || ((in.FromEntities == nil) != (other.FromEntities == nil)) { - in, other := &in.FromEntities, &other.FromEntities - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.aggregatedSelectors != nil) && (other.aggregatedSelectors != nil)) || ((in.aggregatedSelectors == nil) != (other.aggregatedSelectors == nil)) { - in, other := &in.aggregatedSelectors, &other.aggregatedSelectors - if other == nil || !in.DeepEqual(other) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IngressDenyRule) DeepEqual(other *IngressDenyRule) bool { - if other == nil { - return false - } - - if !in.IngressCommonRule.DeepEqual(&other.IngressCommonRule) { - return false - } - - if ((in.ToPorts != nil) && (other.ToPorts != nil)) || ((in.ToPorts == nil) != (other.ToPorts == nil)) { - in, other := &in.ToPorts, &other.ToPorts - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.ICMPs != nil) && (other.ICMPs != nil)) || ((in.ICMPs == nil) != (other.ICMPs == nil)) { - in, other := &in.ICMPs, &other.ICMPs - if other == nil || !in.DeepEqual(other) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *IngressRule) DeepEqual(other *IngressRule) bool { - if other == nil { - return false - } - - if !in.IngressCommonRule.DeepEqual(&other.IngressCommonRule) { - return false - } - - if ((in.ToPorts != nil) && (other.ToPorts != nil)) || ((in.ToPorts == nil) != (other.ToPorts == nil)) { - in, other := &in.ToPorts, &other.ToPorts - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if ((in.ICMPs != nil) && (other.ICMPs != nil)) || ((in.ICMPs == nil) != (other.ICMPs == nil)) { - in, other := &in.ICMPs, &other.ICMPs - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if (in.Authentication == nil) != (other.Authentication == nil) { - return false - } else if in.Authentication != nil { - if !in.Authentication.DeepEqual(other.Authentication) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *K8sServiceNamespace) DeepEqual(other *K8sServiceNamespace) bool { - if other == nil { - return false - } - - if in.ServiceName != other.ServiceName { - return false - } - if in.Namespace != other.Namespace { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *K8sServiceSelectorNamespace) DeepEqual(other *K8sServiceSelectorNamespace) bool { - if other == nil { - return false - } - - if !in.Selector.DeepEqual(&other.Selector) { - return false - } - - if in.Namespace != other.Namespace { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *L7Rules) DeepEqual(other *L7Rules) bool { - if other == nil { - return false - } - - if ((in.HTTP != nil) && (other.HTTP != nil)) || ((in.HTTP == nil) != (other.HTTP == nil)) { - in, other := &in.HTTP, &other.HTTP - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Kafka != nil) && (other.Kafka != nil)) || ((in.Kafka == nil) != (other.Kafka == nil)) { - in, other := &in.Kafka, &other.Kafka - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.DNS != nil) && (other.DNS != nil)) || ((in.DNS == nil) != (other.DNS == nil)) { - in, other := &in.DNS, &other.DNS - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if in.L7Proto != other.L7Proto { - return false - } - if ((in.L7 != nil) && (other.L7 != nil)) || ((in.L7 == nil) != (other.L7 == nil)) { - in, other := &in.L7, &other.L7 - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Listener) DeepEqual(other *Listener) bool { - if other == nil { - return false - } - - if (in.EnvoyConfig == nil) != (other.EnvoyConfig == nil) { - return false - } else if in.EnvoyConfig != nil { - if !in.EnvoyConfig.DeepEqual(other.EnvoyConfig) { - return false - } - } - - if in.Name != other.Name { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PortDenyRule) DeepEqual(other *PortDenyRule) bool { - if other == nil { - return false - } - - if ((in.Ports != nil) && (other.Ports != nil)) || ((in.Ports == nil) != (other.Ports == nil)) { - in, other := &in.Ports, &other.Ports - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PortDenyRules) DeepEqual(other *PortDenyRules) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PortProtocol) DeepEqual(other *PortProtocol) bool { - if other == nil { - return false - } - - if in.Port != other.Port { - return false - } - if in.Protocol != other.Protocol { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PortRule) DeepEqual(other *PortRule) bool { - if other == nil { - return false - } - - if ((in.Ports != nil) && (other.Ports != nil)) || ((in.Ports == nil) != (other.Ports == nil)) { - in, other := &in.Ports, &other.Ports - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if (in.TerminatingTLS == nil) != (other.TerminatingTLS == nil) { - return false - } else if in.TerminatingTLS != nil { - if !in.TerminatingTLS.DeepEqual(other.TerminatingTLS) { - return false - } - } - - if (in.OriginatingTLS == nil) != (other.OriginatingTLS == nil) { - return false - } else if in.OriginatingTLS != nil { - if !in.OriginatingTLS.DeepEqual(other.OriginatingTLS) { - return false - } - } - - if ((in.ServerNames != nil) && (other.ServerNames != nil)) || ((in.ServerNames == nil) != (other.ServerNames == nil)) { - in, other := &in.ServerNames, &other.ServerNames - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if (in.Listener == nil) != (other.Listener == nil) { - return false - } else if in.Listener != nil { - if !in.Listener.DeepEqual(other.Listener) { - return false - } - } - - if (in.Rules == nil) != (other.Rules == nil) { - return false - } else if in.Rules != nil { - if !in.Rules.DeepEqual(other.Rules) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PortRuleDNS) DeepEqual(other *PortRuleDNS) bool { - if other == nil { - return false - } - - if in.MatchName != other.MatchName { - return false - } - if in.MatchPattern != other.MatchPattern { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PortRuleHTTP) DeepEqual(other *PortRuleHTTP) bool { - if other == nil { - return false - } - - if in.Path != other.Path { - return false - } - if in.Method != other.Method { - return false - } - if in.Host != other.Host { - return false - } - if ((in.Headers != nil) && (other.Headers != nil)) || ((in.Headers == nil) != (other.Headers == nil)) { - in, other := &in.Headers, &other.Headers - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if inElement != (*other)[i] { - return false - } - } - } - } - - if ((in.HeaderMatches != nil) && (other.HeaderMatches != nil)) || ((in.HeaderMatches == nil) != (other.HeaderMatches == nil)) { - in, other := &in.HeaderMatches, &other.HeaderMatches - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual((*other)[i]) { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PortRuleL7) DeepEqual(other *PortRuleL7) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for key, inValue := range *in { - if otherValue, present := (*other)[key]; !present { - return false - } else { - if inValue != otherValue { - return false - } - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PortRules) DeepEqual(other *PortRules) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - - return true -} - -// deepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Rule) deepEqual(other *Rule) bool { - if other == nil { - return false - } - - if !in.EndpointSelector.DeepEqual(&other.EndpointSelector) { - return false - } - - if !in.NodeSelector.DeepEqual(&other.NodeSelector) { - return false - } - - if ((in.Ingress != nil) && (other.Ingress != nil)) || ((in.Ingress == nil) != (other.Ingress == nil)) { - in, other := &in.Ingress, &other.Ingress - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.IngressDeny != nil) && (other.IngressDeny != nil)) || ((in.IngressDeny == nil) != (other.IngressDeny == nil)) { - in, other := &in.IngressDeny, &other.IngressDeny - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Egress != nil) && (other.Egress != nil)) || ((in.Egress == nil) != (other.Egress == nil)) { - in, other := &in.Egress, &other.Egress - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.EgressDeny != nil) && (other.EgressDeny != nil)) || ((in.EgressDeny == nil) != (other.EgressDeny == nil)) { - in, other := &in.EgressDeny, &other.EgressDeny - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual(&(*other)[i]) { - return false - } - } - } - } - - if ((in.Labels != nil) && (other.Labels != nil)) || ((in.Labels == nil) != (other.Labels == nil)) { - in, other := &in.Labels, &other.Labels - if other == nil || !in.DeepEqual(other) { - return false - } - } - - if in.Description != other.Description { - return false - } - - return true -} - -// deepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Rules) deepEqual(other *Rules) bool { - if other == nil { - return false - } - - if len(*in) != len(*other) { - return false - } else { - for i, inElement := range *in { - if !inElement.DeepEqual((*other)[i]) { - return false - } - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Secret) DeepEqual(other *Secret) bool { - if other == nil { - return false - } - - if in.Namespace != other.Namespace { - return false - } - if in.Name != other.Name { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *Service) DeepEqual(other *Service) bool { - if other == nil { - return false - } - - if (in.K8sServiceSelector == nil) != (other.K8sServiceSelector == nil) { - return false - } else if in.K8sServiceSelector != nil { - if !in.K8sServiceSelector.DeepEqual(other.K8sServiceSelector) { - return false - } - } - - if (in.K8sService == nil) != (other.K8sService == nil) { - return false - } else if in.K8sService != nil { - if !in.K8sService.DeepEqual(other.K8sService) { - return false - } - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ServiceSelector) DeepEqual(other *ServiceSelector) bool { - if other == nil { - return false - } - - if (in.LabelSelector == nil) != (other.LabelSelector == nil) { - return false - } else if in.LabelSelector != nil { - if !in.LabelSelector.DeepEqual(other.LabelSelector) { - return false - } - } - - if (in.requirements == nil) != (other.requirements == nil) { - return false - } else if in.requirements != nil { - if !in.requirements.DeepEqual(other.requirements) { - return false - } - } - - if in.cachedLabelSelectorString != other.cachedLabelSelectorString { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *TLSContext) DeepEqual(other *TLSContext) bool { - if other == nil { - return false - } - - if (in.Secret == nil) != (other.Secret == nil) { - return false - } else if in.Secret != nil { - if !in.Secret.DeepEqual(other.Secret) { - return false - } - } - - if in.TrustedCA != other.TrustedCA { - return false - } - if in.Certificate != other.Certificate { - return false - } - if in.PrivateKey != other.PrivateKey { - return false - } - - return true -} - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *ToGroups) DeepEqual(other *ToGroups) bool { - if other == nil { - return false - } - - if (in.AWS == nil) != (other.AWS == nil) { - return false - } else if in.AWS != nil { - if !in.AWS.DeepEqual(other.AWS) { - return false - } - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/cidr.go b/vendor/github.com/cilium/cilium/pkg/policy/cidr.go deleted file mode 100644 index 33f14a9cd99..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/cidr.go +++ /dev/null @@ -1,75 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "net/netip" - - "github.com/cilium/cilium/pkg/ip" - "github.com/cilium/cilium/pkg/policy/api" -) - -// getPrefixesFromCIDR fetches all CIDRs referred to by the specified slice -// and returns them as regular golang CIDR objects. -func getPrefixesFromCIDR(cidrs api.CIDRSlice) []netip.Prefix { - result, _, _ := ip.ParsePrefixes(cidrs.StringSlice()) - return result -} - -// GetPrefixesFromCIDRSet fetches all CIDRs referred to by the specified slice -// and returns them as regular golang CIDR objects. -// -// Assumes that validation already occurred on 'rules'. -func GetPrefixesFromCIDRSet(rules api.CIDRRuleSlice) []netip.Prefix { - cidrs := api.ComputeResultantCIDRSet(rules) - return getPrefixesFromCIDR(cidrs) -} - -// GetCIDRPrefixes runs through the specified 'rules' to find every reference -// to a CIDR in the rules, and returns a slice containing all of these CIDRs. -// Multiple rules referring to the same CIDR will result in multiple copies of -// the CIDR in the returned slice. -// -// Assumes that validation already occurred on 'rules'. -func GetCIDRPrefixes(rules api.Rules) []netip.Prefix { - if len(rules) == 0 { - return nil - } - res := make([]netip.Prefix, 0, 32) - for _, r := range rules { - for _, ir := range r.Ingress { - if len(ir.FromCIDR) > 0 { - res = append(res, getPrefixesFromCIDR(ir.FromCIDR)...) - } - if len(ir.FromCIDRSet) > 0 { - res = append(res, GetPrefixesFromCIDRSet(ir.FromCIDRSet)...) - } - } - for _, ir := range r.IngressDeny { - if len(ir.FromCIDR) > 0 { - res = append(res, getPrefixesFromCIDR(ir.FromCIDR)...) - } - if len(ir.FromCIDRSet) > 0 { - res = append(res, GetPrefixesFromCIDRSet(ir.FromCIDRSet)...) - } - } - for _, er := range r.Egress { - if len(er.ToCIDR) > 0 { - res = append(res, getPrefixesFromCIDR(er.ToCIDR)...) - } - if len(er.ToCIDRSet) > 0 { - res = append(res, GetPrefixesFromCIDRSet(er.ToCIDRSet)...) - } - } - for _, er := range r.EgressDeny { - if len(er.ToCIDR) > 0 { - res = append(res, getPrefixesFromCIDR(er.ToCIDR)...) - } - if len(er.ToCIDRSet) > 0 { - res = append(res, GetPrefixesFromCIDRSet(er.ToCIDRSet)...) - } - } - } - return res -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/config.go b/vendor/github.com/cilium/cilium/pkg/policy/config.go deleted file mode 100644 index ed63c474780..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/config.go +++ /dev/null @@ -1,71 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - ipcacheTypes "github.com/cilium/cilium/pkg/ipcache/types" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/source" - "github.com/cilium/cilium/pkg/time" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, "policy") - mutex lock.RWMutex // Protects enablePolicy - enablePolicy string // Whether policy enforcement is enabled. -) - -// SetPolicyEnabled sets the policy enablement configuration. Valid values are: -// - endpoint.AlwaysEnforce -// - endpoint.NeverEnforce -// - endpoint.DefaultEnforcement -func SetPolicyEnabled(val string) { - mutex.Lock() - enablePolicy = val - mutex.Unlock() -} - -// GetPolicyEnabled returns the policy enablement configuration -func GetPolicyEnabled() string { - mutex.RLock() - val := enablePolicy - mutex.RUnlock() - return val -} - -// AddOptions are options which can be passed to PolicyAdd -type AddOptions struct { - // Replace if true indicates that existing rules with identical labels should be replaced - Replace bool - // ReplaceWithLabels if present indicates that existing rules with the - // given LabelArray should be deleted. - ReplaceWithLabels labels.LabelArray - // Generated should be set as true to signalize a the policy being inserted - // was generated by cilium-agent, e.g. dns poller. - Generated bool - - // The source of this policy, one of api, fqdn or k8s - Source source.Source - - // The time the policy initially began to be processed in Cilium, such as when the - // policy was received from the API server. - ProcessingStartTime time.Time - - // Resource provides the object ID for the underlying object that backs - // this information from 'source'. - Resource ipcacheTypes.ResourceID -} - -// DeleteOptions are options which can be passed to PolicyDelete -type DeleteOptions struct { - // The source of this policy, one of api, fqdn or k8s - Source source.Source - - // Resource provides the object ID for the underlying object that backs - // this information from 'source'. - Resource ipcacheTypes.ResourceID -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/distillery.go b/vendor/github.com/cilium/cilium/pkg/policy/distillery.go deleted file mode 100644 index 2889ebfc182..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/distillery.go +++ /dev/null @@ -1,241 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "fmt" - "sync/atomic" - - identityPkg "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/identity/identitymanager" - "github.com/cilium/cilium/pkg/lock" -) - -// SelectorPolicy represents a cached selectorPolicy, previously resolved from -// the policy repository and ready to be distilled against a set of identities -// to compute datapath-level policy configuration. -type SelectorPolicy interface { - // Consume returns the policy in terms of connectivity to peer - // Identities. - Consume(owner PolicyOwner) *EndpointPolicy -} - -// PolicyCache represents a cache of resolved policies for identities. -type PolicyCache struct { - lock.Mutex - - // repo is a circular reference back to the Repository, but as - // we create only one Repository and one PolicyCache for each - // Cilium Agent process, these will never need to be garbage - // collected. - repo *Repository - policies map[identityPkg.NumericIdentity]*cachedSelectorPolicy -} - -// NewPolicyCache creates a new cache of SelectorPolicy. -func NewPolicyCache(repo *Repository, subscribe bool) *PolicyCache { - cache := &PolicyCache{ - repo: repo, - policies: make(map[identityPkg.NumericIdentity]*cachedSelectorPolicy), - } - if subscribe { - identitymanager.Subscribe(cache) - } - return cache -} - -func (cache *PolicyCache) GetSelectorCache() *SelectorCache { - return cache.repo.GetSelectorCache() -} - -// lookupOrCreate adds the specified Identity to the policy cache, with a reference -// from the specified Endpoint, then returns the threadsafe copy of the policy. -func (cache *PolicyCache) lookupOrCreate(identity *identityPkg.Identity, create bool) SelectorPolicy { - cache.Lock() - defer cache.Unlock() - cip, ok := cache.policies[identity.ID] - if !ok { - if !create { - return nil - } - cip = newCachedSelectorPolicy(identity, cache.repo.GetSelectorCache()) - cache.policies[identity.ID] = cip - } - return cip -} - -// insert adds the specified Identity to the policy cache, with a reference -// from the specified Endpoint, then returns the threadsafe copy of the policy. -func (cache *PolicyCache) insert(identity *identityPkg.Identity) SelectorPolicy { - return cache.lookupOrCreate(identity, true) -} - -// delete forgets about any cached SelectorPolicy that this endpoint uses. -// -// Returns true if the SelectorPolicy was removed from the cache. -func (cache *PolicyCache) delete(identity *identityPkg.Identity) bool { - cache.Lock() - defer cache.Unlock() - cip, ok := cache.policies[identity.ID] - if ok { - delete(cache.policies, identity.ID) - cip.getPolicy().Detach() - } - return ok -} - -// updateSelectorPolicy resolves the policy for the security identity of the -// specified endpoint and stores it internally. It will skip policy resolution -// if the cached policy is already at the revision specified in the repo. -// -// Returns whether the cache was updated, or an error. -// -// Must be called with repo.Mutex held for reading. -func (cache *PolicyCache) updateSelectorPolicy(identity *identityPkg.Identity) (bool, error) { - cache.Lock() - cip, ok := cache.policies[identity.ID] - cache.Unlock() - if !ok { - return false, fmt.Errorf("SelectorPolicy not found in cache for ID %d", identity.ID) - } - - // As long as UpdatePolicy() is triggered from endpoint - // regeneration, it's possible for two endpoints with the - // *same* identity to race to update the policy here. Such - // racing would lead to first of the endpoints using a - // selectorPolicy that is already detached from the selector - // cache, and thus not getting any incremental updates. - // - // Lock the 'cip' for the duration of the revision check and - // the possible policy update. - cip.Lock() - defer cip.Unlock() - - // Don't resolve policy if it was already done for this or later revision. - if cip.getPolicy().Revision >= cache.repo.GetRevision() { - return false, nil - } - - // Resolve the policies, which could fail - selPolicy, err := cache.repo.resolvePolicyLocked(identity) - if err != nil { - return false, err - } - - cip.setPolicy(selPolicy) - - return true, nil -} - -// LocalEndpointIdentityAdded creates a SelectorPolicy cache entry for the -// specified Identity, without calculating any policy for it. -func (cache *PolicyCache) LocalEndpointIdentityAdded(identity *identityPkg.Identity) { - cache.insert(identity) -} - -// LocalEndpointIdentityRemoved deletes the cached SelectorPolicy for the -// specified Identity. -func (cache *PolicyCache) LocalEndpointIdentityRemoved(identity *identityPkg.Identity) { - cache.delete(identity) -} - -// Lookup attempts to locate the SelectorPolicy corresponding to the specified -// identity. If policy is not cached for the identity, it returns nil. -func (cache *PolicyCache) Lookup(identity *identityPkg.Identity) SelectorPolicy { - return cache.lookupOrCreate(identity, false) -} - -// UpdatePolicy resolves the policy for the security identity of the specified -// endpoint and caches it for future use. -// -// The caller must provide threadsafety for iteration over the policy -// repository. -func (cache *PolicyCache) UpdatePolicy(identity *identityPkg.Identity) error { - _, err := cache.updateSelectorPolicy(identity) - return err -} - -// GetAuthTypes returns the AuthTypes required by the policy between the localID and remoteID, if -// any, otherwise returns nil. -func (cache *PolicyCache) GetAuthTypes(localID, remoteID identityPkg.NumericIdentity) AuthTypes { - cache.Lock() - cip, ok := cache.policies[localID] - cache.Unlock() - if !ok { - return nil // No policy for localID (no endpoint with localID) - } - - // SelectorPolicy is const after it has been created, so no locking needed to access it - selPolicy := cip.getPolicy() - - var resTypes AuthTypes - for cs, authTypes := range selPolicy.L4Policy.AuthMap { - missing := false - for authType := range authTypes { - if _, exists := resTypes[authType]; !exists { - missing = true - break - } - } - // Only check if 'cs' selects 'remoteID' if one of the authTypes is still missing - // from the result - if missing && cs.Selects(remoteID) { - if resTypes == nil { - resTypes = make(AuthTypes, 1) - } - for authType := range authTypes { - resTypes[authType] = struct{}{} - } - } - } - return resTypes -} - -// cachedSelectorPolicy is a wrapper around a selectorPolicy (stored in the -// 'policy' field). It is always nested directly in the owning policyCache, -// and is protected against concurrent writes via the policyCache mutex. -type cachedSelectorPolicy struct { - lock.Mutex // lock is needed to synchronize parallel policy updates - - identity *identityPkg.Identity - policy atomic.Pointer[selectorPolicy] -} - -func newCachedSelectorPolicy(identity *identityPkg.Identity, selectorCache *SelectorCache) *cachedSelectorPolicy { - cip := &cachedSelectorPolicy{ - identity: identity, - } - cip.setPolicy(newSelectorPolicy(selectorCache)) - return cip -} - -// getPolicy returns a reference to the selectorPolicy that is cached. -// -// Users should treat the result as immutable state that MUST NOT be modified. -func (cip *cachedSelectorPolicy) getPolicy() *selectorPolicy { - return cip.policy.Load() -} - -// setPolicy updates the reference to the SelectorPolicy that is cached. -// Calls Detach() on the old policy, if any. -func (cip *cachedSelectorPolicy) setPolicy(policy *selectorPolicy) { - oldPolicy := cip.policy.Swap(policy) - if oldPolicy != nil { - // Release the references the previous policy holds on the selector cache. - oldPolicy.Detach() - } -} - -// Consume returns the EndpointPolicy that defines connectivity policy to -// Identities in the specified cache. -// -// This denotes that a particular endpoint is 'consuming' the policy from the -// selector policy cache. -func (cip *cachedSelectorPolicy) Consume(owner PolicyOwner) *EndpointPolicy { - // TODO: This currently computes the EndpointPolicy from SelectorPolicy - // on-demand, however in future the cip is intended to cache the - // EndpointPolicy for this Identity and emit datapath deltas instead. - isHost := cip.identity.ID == identityPkg.ReservedIdentityHost - return cip.getPolicy().DistillPolicy(owner, isHost) -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/identifier.go b/vendor/github.com/cilium/cilium/pkg/policy/identifier.go deleted file mode 100644 index 6479c34b3c0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/identifier.go +++ /dev/null @@ -1,86 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "sync" - - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/lock" -) - -// Endpoint refers to any structure which has the following properties: -// * a node-local ID stored as a uint16 -// * a security identity -// * a means of incrementing its policy revision -// * a means of checking if it represents a node or a pod. -// * a set of labels -// * a kubernetes namespace -type Endpoint interface { - GetID16() uint16 - GetSecurityIdentity() (*identity.Identity, error) - PolicyRevisionBumpEvent(rev uint64) - IsHost() bool - GetOpLabels() []string - GetK8sNamespace() string -} - -// EndpointSet is used to be able to group together a given set of Endpoints -// that need to have a specific operation performed upon them (e.g., policy -// revision updates). -type EndpointSet struct { - mutex lock.RWMutex - endpoints map[Endpoint]struct{} -} - -// NewEndpointSet returns an EndpointSet with the given Endpoints map -func NewEndpointSet(m map[Endpoint]struct{}) *EndpointSet { - if m != nil { - return &EndpointSet{ - endpoints: m, - } - } - return &EndpointSet{ - endpoints: map[Endpoint]struct{}{}, - } -} - -// ForEachGo runs epFunc asynchronously inside a goroutine for each endpoint in -// the EndpointSet. It signals to the provided WaitGroup when epFunc has been -// executed for each endpoint. -func (e *EndpointSet) ForEachGo(wg *sync.WaitGroup, epFunc func(epp Endpoint)) { - e.mutex.RLock() - defer e.mutex.RUnlock() - - wg.Add(len(e.endpoints)) - - for ep := range e.endpoints { - go func(eppp Endpoint) { - epFunc(eppp) - wg.Done() - }(ep) - } -} - -// Delete removes ep from the EndpointSet. -func (e *EndpointSet) Delete(ep Endpoint) { - e.mutex.Lock() - delete(e.endpoints, ep) - e.mutex.Unlock() -} - -// Insert adds ep to the EndpointSet. -func (e *EndpointSet) Insert(ep Endpoint) { - e.mutex.Lock() - e.endpoints[ep] = struct{}{} - e.mutex.Unlock() -} - -// Len returns the number of elements in the EndpointSet. -func (e *EndpointSet) Len() (nElem int) { - e.mutex.RLock() - nElem = len(e.endpoints) - e.mutex.RUnlock() - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/l4.go b/vendor/github.com/cilium/cilium/pkg/policy/l4.go deleted file mode 100644 index 59eaf3b30a6..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/l4.go +++ /dev/null @@ -1,1405 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "bytes" - "encoding/json" - "fmt" - "sort" - "strconv" - "sync/atomic" - - cilium "github.com/cilium/proxy/go/cilium/api" - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/iana" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/policy/api" - "github.com/cilium/cilium/pkg/policy/trafficdirection" - "github.com/cilium/cilium/pkg/u8proto" -) - -// covers returns true if 'l4rule' has the effect needed for the 'l3l4rule', when 'l4rule' is added -// to the datapath, due to the l4-only rule matching if l3l4-rule is not present. This determination -// can be done here only when both rules have the same port number (or both have a wildcarded port). -func (l4rule *PerSelectorPolicy) covers(l3l4rule *PerSelectorPolicy) bool { - // Deny takes highest precedence so it is dealt with first - if l4rule != nil && l4rule.IsDeny { - // l4-only deny takes precedence - return true - } else if l3l4rule != nil && l3l4rule.IsDeny { - // Must not skip if l3l4 rule is deny while l4-only rule is not - return false - } - - // Can not skip if currentRule has an explicit auth type and wildcardRule does not or if - // both have different auth types. In all other cases the auth type from the wildcardRule - // can be used also for the current rule. - // Note that the caller must deal with inheriting redirect from wildcardRule to currentRule, - // if any. - cHasAuth, cAuthType := l3l4rule.GetAuthType() - wHasAuth, wAuthType := l4rule.GetAuthType() - if cHasAuth && !wHasAuth || cHasAuth && wHasAuth && cAuthType != wAuthType { - return false - } - - l3l4IsRedirect := l3l4rule.IsRedirect() - l4OnlyIsRedirect := l4rule.IsRedirect() - if l3l4IsRedirect && !l4OnlyIsRedirect { - // Can not skip if l3l4-rule is redirect while l4-only is not - return false - } - - // else can skip - return true -} - -// TLS context holds the secret values resolved from an 'api.TLSContext' -type TLSContext struct { - TrustedCA string `json:"trustedCA,omitempty"` - CertificateChain string `json:"certificateChain,omitempty"` - PrivateKey string `json:"privateKey,omitempty"` -} - -// Equal returns true if 'a' and 'b' have the same contents. -func (a *TLSContext) Equal(b *TLSContext) bool { - return a == nil && b == nil || a != nil && b != nil && *a == *b -} - -// MarshalJSON marsahls a redacted version of the TLSContext. We want -// to see which fields are present, but not reveal their values in any -// logs, etc. -func (t *TLSContext) MarshalJSON() ([]byte, error) { - type tlsContext TLSContext - var redacted tlsContext - if t.TrustedCA != "" { - redacted.TrustedCA = "[redacted]" - } - if t.CertificateChain != "" { - redacted.CertificateChain = "[redacted]" - } - if t.PrivateKey != "" { - redacted.PrivateKey = "[redacted]" - } - return json.Marshal(&redacted) -} - -type StringSet map[string]struct{} - -func (a StringSet) Equal(b StringSet) bool { - if len(a) != len(b) { - return false - } - for k := range a { - if _, exists := b[k]; !exists { - return false - } - } - return true -} - -// NewStringSet returns a StringSet initialized from slice of strings. -// Returns nil for an empty slice -func NewStringSet(from []string) StringSet { - if len(from) == 0 { - return nil - } - set := make(StringSet, len(from)) - for _, s := range from { - set[s] = struct{}{} - } - return set -} - -// Merge returns StringSet with strings from both a and b. -// Returns a or b, possibly with modifications. -func (a StringSet) Merge(b StringSet) StringSet { - if len(a) == 0 { - return b - } - for s := range b { - a[s] = struct{}{} - } - return a -} - -// PerSelectorPolicy contains policy rules for a CachedSelector, i.e. for a -// selection of numerical identities. -type PerSelectorPolicy struct { - // TerminatingTLS is the TLS context for the connection terminated by - // the L7 proxy. For egress policy this specifies the server-side TLS - // parameters to be applied on the connections originated from the local - // POD and terminated by the L7 proxy. For ingress policy this specifies - // the server-side TLS parameters to be applied on the connections - // originated from a remote source and terminated by the L7 proxy. - TerminatingTLS *TLSContext `json:"terminatingTLS,omitempty"` - - // OriginatingTLS is the TLS context for the connections originated by - // the L7 proxy. For egress policy this specifies the client-side TLS - // parameters for the upstream connection originating from the L7 proxy - // to the remote destination. For ingress policy this specifies the - // client-side TLS parameters for the connection from the L7 proxy to - // the local POD. - OriginatingTLS *TLSContext `json:"originatingTLS,omitempty"` - - // ServerNames is a list of allowed TLS SNI values. If not empty, then - // TLS must be present and one of the provided SNIs must be indicated in the - // TLS handshake. - ServerNames StringSet `json:"serverNames,omitempty"` - - // isRedirect is 'true' when traffic must be redirected - isRedirect bool `json:"-"` - - // Pre-computed HTTP rules, computed after rule merging is complete - EnvoyHTTPRules *cilium.HttpNetworkPolicyRules `json:"-"` - - // CanShortCircuit is true if all 'EnvoyHTTPRules' may be - // short-circuited by other matches. - CanShortCircuit bool `json:"-"` - - api.L7Rules - - // Authentication is the kind of cryptographic authentication required for the traffic to be allowed - // at L3, if any. - Authentication *api.Authentication `json:"auth,omitempty"` - - // IsDeny is set if this L4Filter contains should be denied - IsDeny bool `json:",omitempty"` -} - -// Equal returns true if 'a' and 'b' represent the same L7 Rules -func (a *PerSelectorPolicy) Equal(b *PerSelectorPolicy) bool { - return a == nil && b == nil || a != nil && b != nil && - a.TerminatingTLS.Equal(b.TerminatingTLS) && - a.OriginatingTLS.Equal(b.OriginatingTLS) && - a.ServerNames.Equal(b.ServerNames) && - a.isRedirect == b.isRedirect && - (a.Authentication == nil && b.Authentication == nil || a.Authentication != nil && a.Authentication.DeepEqual(b.Authentication)) && - a.IsDeny == b.IsDeny && - a.L7Rules.DeepEqual(&b.L7Rules) -} - -// AuthType enumerates the supported authentication types in api. -// Numerically higher type takes precedence in case of conflicting auth types. -type AuthType uint8 - -// AuthTypes is a set of AuthTypes, usually nil if empty -type AuthTypes map[AuthType]struct{} - -// Authmap maps remote selectors to their needed AuthTypes, if any -type AuthMap map[CachedSelector]AuthTypes - -const ( - // AuthTypeDisabled means no authentication required - AuthTypeDisabled AuthType = iota - // AuthTypeSpire is a mutual auth type that uses SPIFFE identities with a SPIRE server - AuthTypeSpire - // AuthTypeAlwaysFail is a simple auth type that always denies the request - AuthTypeAlwaysFail -) - -type HasAuthType bool - -const ( - DefaultAuthType HasAuthType = false - ExplicitAuthType HasAuthType = true -) - -// GetAuthType returns the AuthType of the L4Filter. -func (a *PerSelectorPolicy) GetAuthType() (HasAuthType, AuthType) { - if a == nil { - return DefaultAuthType, AuthTypeDisabled - } - return GetAuthType(a.Authentication) -} - -// GetAuthType returns boolean HasAuthType and AuthType for the api.Authentication -// If there is no explicit auth type, (DefaultAuthType, AuthTypeDisabled) is returned -func GetAuthType(auth *api.Authentication) (HasAuthType, AuthType) { - if auth == nil { - return DefaultAuthType, AuthTypeDisabled - } - switch auth.Mode { - case api.AuthenticationModeDisabled: - return ExplicitAuthType, AuthTypeDisabled - case api.AuthenticationModeRequired: - return ExplicitAuthType, AuthTypeSpire - case api.AuthenticationModeAlwaysFail: - return ExplicitAuthType, AuthTypeAlwaysFail - default: - return DefaultAuthType, AuthTypeDisabled - } -} - -// Uint8 returns AuthType as a uint8 -func (a AuthType) Uint8() uint8 { - return uint8(a) -} - -// String returns AuthType as a string -// This must return the strings accepted for api.AuthType -func (a AuthType) String() string { - switch a { - case AuthTypeDisabled: - return "disabled" - case AuthTypeSpire: - return "spire" - case AuthTypeAlwaysFail: - return "test-always-fail" - } - return "Unknown-auth-type-" + strconv.FormatUint(uint64(a.Uint8()), 10) -} - -// IsRedirect returns true if the L7Rules are a redirect. -func (a *PerSelectorPolicy) IsRedirect() bool { - return a != nil && a.isRedirect -} - -// HasL7Rules returns whether the `L7Rules` contains any L7 rules. -func (a *PerSelectorPolicy) HasL7Rules() bool { - return !a.L7Rules.IsEmpty() -} - -// L7DataMap contains a map of L7 rules per endpoint where key is a CachedSelector -type L7DataMap map[CachedSelector]*PerSelectorPolicy - -func (l7 L7DataMap) MarshalJSON() ([]byte, error) { - if len(l7) == 0 { - return []byte("[]"), nil - } - - /* First, create a sorted slice of the selectors so we can get - * consistent JSON output */ - selectors := make(CachedSelectorSlice, 0, len(l7)) - for cs := range l7 { - selectors = append(selectors, cs) - } - sort.Sort(selectors) - - /* Now we can iterate the slice and generate JSON entries. */ - var err error - buffer := bytes.NewBufferString("[") - for _, cs := range selectors { - buffer.WriteString("{\"") - buffer.WriteString(cs.String()) - buffer.WriteString("\":") - b, err := json.Marshal(l7[cs]) - if err == nil { - buffer.Write(b) - } else { - buffer.WriteString("\"L7DataMap error: ") - buffer.WriteString(err.Error()) - buffer.WriteString("\"") - } - buffer.WriteString("},") - } - buffer.Truncate(buffer.Len() - 1) // Drop the final "," - buffer.WriteString("]") - - return buffer.Bytes(), err -} - -// ShallowCopy returns a shallow copy of the L7DataMap. -func (l7 L7DataMap) ShallowCopy() L7DataMap { - m := make(L7DataMap, len(l7)) - for k, v := range l7 { - m[k] = v - } - return m -} - -// L7ParserType is the type used to indicate what L7 parser to use. -// Consts are defined for all well known L7 parsers. -// Unknown string values are created for key-value pair policies, which -// are then transparently used in redirect configuration. -type L7ParserType string - -func (l7 L7ParserType) String() string { - return (string)(l7) -} - -const ( - // ParserTypeNone represents the case where no parser type is provided. - ParserTypeNone L7ParserType = "" - // ParserTypeTLS is used for TLS origination, termination, or SNI filtering without any L7 - // parsing. If TLS policies are used with HTTP rules, ParserTypeHTTP is used instead. - ParserTypeTLS L7ParserType = "tls" - // ParserTypeCRD is used with a custom CiliumEnvoyConfig redirection. Incompatible with any - // parser type with L7 enforcement (HTTP, Kafka, proxylib), as the custom Listener generally - // does not support them. - ParserTypeCRD L7ParserType = "crd" - // ParserTypeHTTP specifies a HTTP parser type - ParserTypeHTTP L7ParserType = "http" - // ParserTypeKafka specifies a Kafka parser type - ParserTypeKafka L7ParserType = "kafka" - // ParserTypeDNS specifies a DNS parser type - ParserTypeDNS L7ParserType = "dns" -) - -// redirectTypes is a bitmask of redirection types of multiple filters -type redirectTypes uint16 - -const ( - // redirectTypeDNS bit is set when policy contains a redirection to DNS proxy - redirectTypeDNS redirectTypes = 1 << iota - // redirectTypeEnvoy bit is set when policy contains a redirection to Envoy - redirectTypeEnvoy - // redirectTypeProxylib bits are set when policy contains a redirection to Proxylib (via - // Envoy) - redirectTypeProxylib redirectTypes = 1< 0 || !rules.IsEmpty()) - for epsel := range l7 { - l7policy := &PerSelectorPolicy{ - TerminatingTLS: terminatingTLS, - OriginatingTLS: originatingTLS, - Authentication: auth, - IsDeny: deny, - ServerNames: NewStringSet(sni), - isRedirect: isRedirect, - } - if rules != nil { - l7policy.L7Rules = *rules - } - l7[epsel] = l7policy - } -} - -type TLSDirection string - -const ( - TerminatingTLS TLSDirection = "terminating" - OriginatingTLS TLSDirection = "originating" -) - -func (l4 *L4Filter) getCerts(policyCtx PolicyContext, tls *api.TLSContext, direction TLSDirection) (*TLSContext, error) { - if tls == nil { - return nil, nil - } - ca, public, private, err := policyCtx.GetTLSContext(tls) - if err != nil { - log.WithError(err).Warningf("policy: Error getting %s TLS Context.", direction) - return nil, err - } - switch direction { - case TerminatingTLS: - if public == "" || private == "" { - return nil, fmt.Errorf("Terminating TLS context is missing certs.") - } - case OriginatingTLS: - if ca == "" { - return nil, fmt.Errorf("Originating TLS context is missing CA certs.") - } - default: - return nil, fmt.Errorf("invalid TLS direction: %s", direction) - } - - return &TLSContext{ - TrustedCA: ca, - CertificateChain: public, - PrivateKey: private, - }, nil -} - -// createL4Filter creates a filter for L4 policy that applies to the specified -// endpoints and port/protocol, with reference to the original rules that the -// filter is derived from. This filter may be associated with a series of L7 -// rules via the `rule` parameter. -// Not called with an empty peerEndpoints. -func createL4Filter(policyCtx PolicyContext, peerEndpoints api.EndpointSelectorSlice, auth *api.Authentication, rule api.Ports, port api.PortProtocol, - protocol api.L4Proto, ruleLabels labels.LabelArray, ingress bool, fqdns api.FQDNSelectorSlice) (*L4Filter, error) { - selectorCache := policyCtx.GetSelectorCache() - - portName := "" - p := uint64(0) - if iana.IsSvcName(port.Port) { - portName = port.Port - } else { - // already validated via PortRule.Validate() - p, _ = strconv.ParseUint(port.Port, 0, 16) - } - - // already validated via L4Proto.Validate(), never "ANY" - u8p, _ := u8proto.ParseProtocol(string(protocol)) - - l4 := &L4Filter{ - Port: int(p), // 0 for L3-only rules and named ports - PortName: portName, // non-"" for named ports - Protocol: protocol, - U8Proto: u8p, - PerSelectorPolicies: make(L7DataMap), - RuleOrigin: make(map[CachedSelector]labels.LabelArrayList), // Filled in below. - Ingress: ingress, - } - - if peerEndpoints.SelectsAllEndpoints() { - l4.wildcard = l4.cacheIdentitySelector(api.WildcardEndpointSelector, ruleLabels, selectorCache) - } else { - l4.cacheIdentitySelectors(peerEndpoints, ruleLabels, selectorCache) - l4.cacheFQDNSelectors(fqdns, ruleLabels, selectorCache) - } - - var terminatingTLS *TLSContext - var originatingTLS *TLSContext - var rules *api.L7Rules - var sni []string - forceRedirect := false - pr := rule.GetPortRule() - if pr != nil { - rules = pr.Rules - sni = pr.ServerNames - - // Get TLS contexts, if any - var err error - terminatingTLS, err = l4.getCerts(policyCtx, pr.TerminatingTLS, TerminatingTLS) - if err != nil { - return nil, err - } - originatingTLS, err = l4.getCerts(policyCtx, pr.OriginatingTLS, OriginatingTLS) - if err != nil { - return nil, err - } - - // Set parser type to TLS, if TLS. This will be overridden by L7 below, if rules - // exists. - if terminatingTLS != nil || originatingTLS != nil || len(pr.ServerNames) > 0 { - l4.L7Parser = ParserTypeTLS - } - - // Determine L7ParserType from rules present. Earlier validation ensures rules - // for multiple protocols are not present here. - if rules != nil { - // we need this to redirect DNS UDP (or ANY, which is more useful) - if len(rules.DNS) > 0 { - l4.L7Parser = ParserTypeDNS - } else if protocol == api.ProtoTCP { // Other than DNS only support TCP - switch { - case len(rules.HTTP) > 0: - l4.L7Parser = ParserTypeHTTP - case len(rules.Kafka) > 0: - l4.L7Parser = ParserTypeKafka - case rules.L7Proto != "": - l4.L7Parser = (L7ParserType)(rules.L7Proto) - } - } - } - - // Override the parser type to CRD is applicable. - if pr.Listener != nil { - l4.L7Parser = ParserTypeCRD - ns := policyCtx.GetNamespace() - resource := pr.Listener.EnvoyConfig - switch resource.Kind { - case "CiliumEnvoyConfig": - if ns == "" { - // Cluster-scoped CCNP tries to use namespaced - // CiliumEnvoyConfig - // - // TODO: Catch this in rule validation once we have a - // validation context in there so that we can differentiate - // between CNP and CCNP at validation time. - return nil, fmt.Errorf("Listener %q in CCNP can not use Kind CiliumEnvoyConfig", pr.Listener.Name) - } - case "CiliumClusterwideEnvoyConfig": - // CNP refers to a cluster-scoped listener - ns = "" - default: - } - l4.Listener, _ = api.ResourceQualifiedName(ns, resource.Name, pr.Listener.Name, api.ForceNamespace) - forceRedirect = true - } - } - - if l4.L7Parser != ParserTypeNone || auth != nil || policyCtx.IsDeny() { - l4.PerSelectorPolicies.addPolicyForSelector(rules, terminatingTLS, originatingTLS, auth, policyCtx.IsDeny(), sni, forceRedirect) - } - - for cs := range l4.PerSelectorPolicies { - l4.RuleOrigin[cs] = labels.LabelArrayList{ruleLabels} - } - - return l4, nil -} - -func (l4 *L4Filter) removeSelectors(selectorCache *SelectorCache) { - selectors := make(CachedSelectorSlice, 0, len(l4.PerSelectorPolicies)) - for cs := range l4.PerSelectorPolicies { - selectors = append(selectors, cs) - } - selectorCache.RemoveSelectors(selectors, l4) -} - -// detach releases the references held in the L4Filter and must be called before -// the filter is left to be garbage collected. -// L4Filter may still be accessed concurrently after it has been detached. -func (l4 *L4Filter) detach(selectorCache *SelectorCache) { - l4.removeSelectors(selectorCache) - l4.policy.Store(nil) -} - -// attach signifies that the L4Filter is ready and reacheable for updates -// from SelectorCache. L4Filter (and L4Policy) is read-only after this is called, -// multiple goroutines will be reading the fields from that point on. -func (l4 *L4Filter) attach(ctx PolicyContext, l4Policy *L4Policy) policyFeatures { - // All rules have been added to the L4Filter at this point. - // Sort the rules label array list for more efficient equality comparison. - for _, labels := range l4.RuleOrigin { - labels.Sort() - } - - var features policyFeatures - for cs, cp := range l4.PerSelectorPolicies { - if cp != nil { - if cp.IsDeny { - features.setFeature(denyRules) - } - - hasAuth, authType := GetAuthType(cp.Authentication) - if hasAuth { - features.setFeature(authRules) - - if authType != AuthTypeDisabled { - if l4Policy.AuthMap == nil { - l4Policy.AuthMap = make(AuthMap, 1) - } - authTypes := l4Policy.AuthMap[cs] - if authTypes == nil { - authTypes = make(AuthTypes, 1) - } - authTypes[authType] = struct{}{} - l4Policy.AuthMap[cs] = authTypes - } - } - - // Compute Envoy policies when a policy is ready to be used - if len(cp.L7Rules.HTTP) > 0 { - cp.EnvoyHTTPRules, cp.CanShortCircuit = ctx.GetEnvoyHTTPRules(&cp.L7Rules) - } - } - } - - l4.policy.Store(l4Policy) - return features -} - -// createL4IngressFilter creates a filter for L4 policy that applies to the -// specified endpoints and port/protocol for ingress traffic, with reference -// to the original rules that the filter is derived from. This filter may be -// associated with a series of L7 rules via the `rule` parameter. -// -// hostWildcardL7 determines if L7 traffic from Host should be -// wildcarded (in the relevant daemon mode). -func createL4IngressFilter(policyCtx PolicyContext, fromEndpoints api.EndpointSelectorSlice, auth *api.Authentication, hostWildcardL7 []string, rule api.Ports, port api.PortProtocol, - protocol api.L4Proto, ruleLabels labels.LabelArray) (*L4Filter, error) { - - filter, err := createL4Filter(policyCtx, fromEndpoints, auth, rule, port, protocol, ruleLabels, true, nil) - if err != nil { - return nil, err - } - - // If the filter would apply proxy redirection for the Host, when we should accept - // everything from host, then wildcard Host at L7. - if len(hostWildcardL7) > 0 { - for cs, l7 := range filter.PerSelectorPolicies { - if l7.IsRedirect() && cs.Selects(identity.ReservedIdentityHost) { - for _, name := range hostWildcardL7 { - selector := api.ReservedEndpointSelectors[name] - filter.cacheIdentitySelector(selector, ruleLabels, policyCtx.GetSelectorCache()) - } - } - } - } - - return filter, nil -} - -// createL4EgressFilter creates a filter for L4 policy that applies to the -// specified endpoints and port/protocol for egress traffic, with reference -// to the original rules that the filter is derived from. This filter may be -// associated with a series of L7 rules via the `rule` parameter. -func createL4EgressFilter(policyCtx PolicyContext, toEndpoints api.EndpointSelectorSlice, auth *api.Authentication, rule api.Ports, port api.PortProtocol, - protocol api.L4Proto, ruleLabels labels.LabelArray, fqdns api.FQDNSelectorSlice) (*L4Filter, error) { - - return createL4Filter(policyCtx, toEndpoints, auth, rule, port, protocol, ruleLabels, false, fqdns) -} - -// redirectType returns the redirectType for this filter -func (l4 *L4Filter) redirectType() redirectTypes { - switch l4.L7Parser { - case ParserTypeNone: - return redirectTypeNone - case ParserTypeDNS: - return redirectTypeDNS - case ParserTypeHTTP, ParserTypeTLS, ParserTypeCRD: - return redirectTypeEnvoy - default: - // all other (non-empty) values are used for proxylib redirects - return redirectTypeProxylib - } -} - -// IsRedirect returns true if the L4 filter contains a port redirection -func (l4 *L4Filter) IsRedirect() bool { - return l4.L7Parser != ParserTypeNone -} - -// Marshal returns the `L4Filter` in a JSON string. -func (l4 *L4Filter) Marshal() string { - b, err := json.Marshal(l4) - if err != nil { - b = []byte("\"L4Filter error: " + err.Error() + "\"") - } - return string(b) -} - -// String returns the `L4Filter` in a human-readable string. -func (l4 *L4Filter) String() string { - b, err := json.Marshal(l4) - if err != nil { - return err.Error() - } - return string(b) -} - -// Note: Only used for policy tracing -func (l4 *L4Filter) matchesLabels(labels labels.LabelArray) (bool, bool) { - if l4.wildcard != nil { - perSelectorPolicy := l4.PerSelectorPolicies[l4.wildcard] - isDeny := perSelectorPolicy != nil && perSelectorPolicy.IsDeny - return true, isDeny - } else if len(labels) == 0 { - return false, false - } - - var selected bool - for sel, rule := range l4.PerSelectorPolicies { - // slow, but OK for tracing - idSel := sel.(*identitySelector) - if lis, ok := idSel.source.(*labelIdentitySelector); ok && lis.xxxMatches(labels) { - isDeny := rule != nil && rule.IsDeny - selected = true - if isDeny { - return true, isDeny - } - } - } - return selected, false -} - -// addL4Filter adds 'filterToMerge' into the 'resMap'. Returns an error if it -// the 'filterToMerge' can't be merged with an existing filter for the same -// port and proto. -func addL4Filter(policyCtx PolicyContext, - ctx *SearchContext, resMap L4PolicyMap, - p api.PortProtocol, proto api.L4Proto, - filterToMerge *L4Filter, - ruleLabels labels.LabelArray) error { - - key := p.Port + "/" + string(proto) - existingFilter, ok := resMap[key] - if !ok { - resMap[key] = filterToMerge - return nil - } - - selectorCache := policyCtx.GetSelectorCache() - if err := mergePortProto(ctx, existingFilter, filterToMerge, selectorCache); err != nil { - filterToMerge.detach(selectorCache) - return err - } - - // To keep the rule origin tracking correct, merge the rule label arrays for each CachedSelector - // we know about. New CachedSelectors are added. - for cs, newLabels := range filterToMerge.RuleOrigin { - if existingLabels, ok := existingFilter.RuleOrigin[cs]; ok { - existingFilter.RuleOrigin[cs] = existingLabels.MergeSorted(newLabels) - } else { - existingFilter.RuleOrigin[cs] = newLabels - } - } - - resMap[key] = existingFilter - return nil -} - -// L4PolicyMap is a list of L4 filters indexable by protocol/port -// key format: "port/proto" -type L4PolicyMap map[string]*L4Filter - -type policyFeatures uint8 - -const ( - denyRules policyFeatures = 1 << iota - authRules - - allFeatures policyFeatures = ^policyFeatures(0) -) - -func (pf *policyFeatures) setFeature(feature policyFeatures) { - *pf |= feature -} - -func (pf policyFeatures) contains(feature policyFeatures) bool { - return pf&feature != 0 -} - -type L4DirectionPolicy struct { - PortRules L4PolicyMap - - // features tracks properties of PortRules to skip code when features are not used - features policyFeatures -} - -func newL4DirectionPolicy() L4DirectionPolicy { - return L4DirectionPolicy{ - PortRules: L4PolicyMap{}, - } -} - -// Detach removes the cached selectors held by L4PolicyMap from the -// selectorCache, allowing the map to be garbage collected when there -// are no more references to it. -func (l4 L4DirectionPolicy) Detach(selectorCache *SelectorCache) { - l4.PortRules.Detach(selectorCache) -} - -// detach is used directly from tracing and testing functions -func (l4 L4PolicyMap) Detach(selectorCache *SelectorCache) { - for _, f := range l4 { - f.detach(selectorCache) - } -} - -// Attach makes all the L4Filters to point back to the L4Policy that contains them. -// This is done before the L4PolicyMap is exposed to concurrent access. -// Returns the bitmask of all redirect types for this policymap. -func (l4 *L4DirectionPolicy) attach(ctx PolicyContext, l4Policy *L4Policy) redirectTypes { - var redirectTypes redirectTypes - var features policyFeatures - for _, f := range l4.PortRules { - features |= f.attach(ctx, l4Policy) - redirectTypes |= f.redirectType() - } - l4.features = features - return redirectTypes -} - -// containsAllL3L4 checks if the L4PolicyMap contains all L4 ports in `ports`. -// For L4Filters that specify ToEndpoints or FromEndpoints, uses `labels` to -// determine whether the policy allows L4 communication between the corresponding -// endpoints. -// Returns api.Denied in the following conditions: -// - If a single port is not present in the `L4PolicyMap` and is not allowed -// by the distilled L3 policy -// - If a port is present in the `L4PolicyMap`, but it applies ToEndpoints or -// FromEndpoints constraints that require labels not present in `labels`. -// -// Otherwise, returns api.Allowed. -// -// Note: Only used for policy tracing -func (l4 L4PolicyMap) containsAllL3L4(labels labels.LabelArray, ports []*models.Port) api.Decision { - if len(l4) == 0 { - return api.Allowed - } - - // Check L3-only filters first. - filter, match := l4[api.PortProtocolAny] - if match { - - matches, isDeny := filter.matchesLabels(labels) - switch { - case matches && isDeny: - return api.Denied - case matches: - return api.Allowed - } - } - - for _, l4Ctx := range ports { - portStr := l4Ctx.Name - if !iana.IsSvcName(portStr) { - portStr = strconv.FormatUint(uint64(l4Ctx.Port), 10) - } - lwrProtocol := l4Ctx.Protocol - var isUDPDeny, isTCPDeny, isSCTPDeny bool - switch lwrProtocol { - case "", models.PortProtocolANY: - tcpPort := portStr + "/TCP" - tcpFilter, tcpmatch := l4[tcpPort] - if tcpmatch { - tcpmatch, isTCPDeny = tcpFilter.matchesLabels(labels) - } - - udpPort := portStr + "/UDP" - udpFilter, udpmatch := l4[udpPort] - if udpmatch { - udpmatch, isUDPDeny = udpFilter.matchesLabels(labels) - } - - sctpPort := portStr + "/SCTP" - sctpFilter, sctpmatch := l4[sctpPort] - if sctpmatch { - sctpmatch, isSCTPDeny = sctpFilter.matchesLabels(labels) - } - - if (!tcpmatch && !udpmatch && !sctpmatch) || (isTCPDeny && isUDPDeny && isSCTPDeny) { - return api.Denied - } - default: - port := portStr + "/" + lwrProtocol - filter, match := l4[port] - if !match { - return api.Denied - } - matches, isDeny := filter.matchesLabels(labels) - if !matches || isDeny { - return api.Denied - } - } - } - return api.Allowed -} - -type L4Policy struct { - Ingress L4DirectionPolicy - Egress L4DirectionPolicy - - AuthMap AuthMap - - // Revision is the repository revision used to generate this policy. - Revision uint64 - - // redirectTypes is a bitmap containing the types of redirect contained by this policy. It - // is computed after the policy maps to avoid scanning them repeatedly when using the - // L4Policy - redirectTypes redirectTypes - - // Endpoint policies using this L4Policy - // These are circular references, cleaned up in Detach() - // This mutex is taken while Endpoint mutex is held, so Endpoint lock - // MUST always be taken before this mutex. - mutex lock.RWMutex - users map[*EndpointPolicy]struct{} -} - -// NewL4Policy creates a new L4Policy -func NewL4Policy(revision uint64) L4Policy { - return L4Policy{ - Ingress: newL4DirectionPolicy(), - Egress: newL4DirectionPolicy(), - Revision: revision, - users: make(map[*EndpointPolicy]struct{}), - } -} - -// insertUser adds a user to the L4Policy so that incremental -// updates of the L4Policy may be forwarded to the users of it. -func (l4 *L4Policy) insertUser(user *EndpointPolicy) { - l4.mutex.Lock() - - // 'users' is set to nil when the policy is detached. This - // happens to the old policy when it is being replaced with a - // new one, or when the last endpoint using this policy is - // removed. - // In the case of an policy update it is possible that an - // endpoint has started regeneration before the policy was - // updated, and that the policy was updated before the said - // endpoint reached this point. In this case the endpoint's - // policy is going to be recomputed soon after and we do - // nothing here. - if l4.users != nil { - l4.users[user] = struct{}{} - } - - l4.mutex.Unlock() -} - -// removeUser removes a user that no longer needs incremental updates -// from the L4Policy. -func (l4 *L4Policy) removeUser(user *EndpointPolicy) { - // 'users' is set to nil when the policy is detached. This - // happens to the old policy when it is being replaced with a - // new one, or when the last endpoint using this policy is - // removed. - l4.mutex.Lock() - if l4.users != nil { - delete(l4.users, user) - } - l4.mutex.Unlock() -} - -// AccumulateMapChanges distributes the given changes to the registered users. -// -// The caller is responsible for making sure the same identity is not -// present in both 'adds' and 'deletes'. -func (l4Policy *L4Policy) AccumulateMapChanges(l4 *L4Filter, cs CachedSelector, adds, deletes []identity.NumericIdentity) { - port := uint16(l4.Port) - proto := uint8(l4.U8Proto) - derivedFrom := l4.RuleOrigin[cs] - - direction := trafficdirection.Egress - if l4.Ingress { - direction = trafficdirection.Ingress - } - perSelectorPolicy := l4.PerSelectorPolicies[cs] - redirect := perSelectorPolicy.IsRedirect() - hasAuth, authType := perSelectorPolicy.GetAuthType() - isDeny := perSelectorPolicy != nil && perSelectorPolicy.IsDeny - - // Must take a copy of 'users' as GetNamedPort() will lock the Endpoint below and - // the Endpoint lock may not be taken while 'l4.mutex' is held. - l4Policy.mutex.RLock() - users := make(map[*EndpointPolicy]struct{}, len(l4Policy.users)) - for user := range l4Policy.users { - users[user] = struct{}{} - } - l4Policy.mutex.RUnlock() - - for epPolicy := range users { - // Skip if endpoint has no policy maps - if !epPolicy.PolicyOwner.HasBPFPolicyMap() { - continue - } - // resolve named port - if port == 0 && l4.PortName != "" { - port = epPolicy.PolicyOwner.GetNamedPort(l4.Ingress, l4.PortName, proto) - if port == 0 { - continue - } - } - key := Key{DestPort: port, Nexthdr: proto, TrafficDirection: direction.Uint8()} - value := NewMapStateEntry(cs, derivedFrom, redirect, isDeny, hasAuth, authType) - - if option.Config.Debug { - authString := "default" - if hasAuth { - authString = authType.String() - } - log.WithFields(logrus.Fields{ - logfields.EndpointSelector: cs, - logfields.AddedPolicyID: adds, - logfields.DeletedPolicyID: deletes, - logfields.Port: port, - logfields.Protocol: proto, - logfields.TrafficDirection: direction, - logfields.IsRedirect: redirect, - logfields.AuthType: authString, - }).Debug("AccumulateMapChanges") - } - epPolicy.policyMapChanges.AccumulateMapChanges(cs, adds, deletes, key, value) - } -} - -// Detach makes the L4Policy ready for garbage collection, removing -// circular pointer references. -// Note that the L4Policy itself is not modified in any way, so that it may still -// be used concurrently. -func (l4 *L4Policy) Detach(selectorCache *SelectorCache) { - l4.Ingress.Detach(selectorCache) - l4.Egress.Detach(selectorCache) - - l4.mutex.Lock() - l4.users = nil - l4.mutex.Unlock() -} - -// Attach makes all the L4Filters to point back to the L4Policy that contains them. -// This is done before the L4Policy is exposed to concurrent access. -func (l4 *L4Policy) Attach(ctx PolicyContext) { - ingressRedirects := l4.Ingress.attach(ctx, l4) - egressRedirects := l4.Egress.attach(ctx, l4) - l4.redirectTypes = ingressRedirects | egressRedirects -} - -// IngressCoversContext checks if the receiver's ingress L4Policy contains -// all `dPorts` and `labels`. -// -// Note: Only used for policy tracing -func (l4 *L4PolicyMap) IngressCoversContext(ctx *SearchContext) api.Decision { - return l4.containsAllL3L4(ctx.From, ctx.DPorts) -} - -// EgressCoversContext checks if the receiver's egress L4Policy contains -// all `dPorts` and `labels`. -// -// Note: Only used for policy tracing -func (l4 *L4PolicyMap) EgressCoversContext(ctx *SearchContext) api.Decision { - return l4.containsAllL3L4(ctx.To, ctx.DPorts) -} - -// HasRedirect returns true if the L4 policy contains at least one port redirection -func (l4 *L4Policy) HasRedirect() bool { - return l4 != nil && l4.redirectTypes != redirectTypeNone -} - -// HasEnvoyRedirect returns true if the L4 policy contains at least one port redirection to Envoy -func (l4 *L4Policy) HasEnvoyRedirect() bool { - return l4 != nil && l4.redirectTypes&redirectTypeEnvoy == redirectTypeEnvoy -} - -// HasProxylibRedirect returns true if the L4 policy contains at least one port redirection to Proxylib -func (l4 *L4Policy) HasProxylibRedirect() bool { - return l4 != nil && l4.redirectTypes&redirectTypeProxylib == redirectTypeProxylib -} - -func (l4 *L4Policy) GetModel() *models.L4Policy { - if l4 == nil { - return nil - } - - ingress := []*models.PolicyRule{} - for _, v := range l4.Ingress.PortRules { - rulesBySelector := map[string][][]string{} - derivedFrom := labels.LabelArrayList{} - for sel, rules := range v.RuleOrigin { - derivedFrom.MergeSorted(rules) - rulesBySelector[sel.String()] = rules.GetModel() - } - ingress = append(ingress, &models.PolicyRule{ - Rule: v.Marshal(), - DerivedFromRules: derivedFrom.GetModel(), - RulesBySelector: rulesBySelector, - }) - } - - egress := []*models.PolicyRule{} - for _, v := range l4.Egress.PortRules { - derivedFrom := labels.LabelArrayList{} - for _, rules := range v.RuleOrigin { - derivedFrom.MergeSorted(rules) - } - egress = append(egress, &models.PolicyRule{ - Rule: v.Marshal(), - DerivedFromRules: derivedFrom.GetModel(), - }) - } - - return &models.L4Policy{ - Ingress: ingress, - Egress: egress, - } -} - -// ProxyPolicy is any type which encodes state needed to redirect to an L7 -// proxy. -type ProxyPolicy interface { - CopyL7RulesPerEndpoint() L7DataMap - GetL7Parser() L7ParserType - GetIngress() bool - GetPort() uint16 - GetProtocol() uint8 - GetListener() string -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/mapstate.go b/vendor/github.com/cilium/cilium/pkg/policy/mapstate.go deleted file mode 100644 index e1c408e11a2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/mapstate.go +++ /dev/null @@ -1,1456 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "fmt" - "net" - "slices" - "strconv" - "testing" - - "github.com/sirupsen/logrus" - "golang.org/x/exp/maps" - - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/ip" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/policy/trafficdirection" -) - -var ( - // localHostKey represents an ingress L3 allow from the local host. - localHostKey = Key{ - Identity: identity.ReservedIdentityHost.Uint32(), - TrafficDirection: trafficdirection.Ingress.Uint8(), - } - // localRemoteNodeKey represents an ingress L3 allow from remote nodes. - localRemoteNodeKey = Key{ - Identity: identity.ReservedIdentityRemoteNode.Uint32(), - TrafficDirection: trafficdirection.Ingress.Uint8(), - } - // allKey represents a key for unknown traffic, i.e., all traffic. - allKey = Key{ - Identity: identity.IdentityUnknown.Uint32(), - } -) - -const ( - LabelKeyPolicyDerivedFrom = "io.cilium.policy.derived-from" - LabelAllowLocalHostIngress = "allow-localhost-ingress" - LabelAllowRemoteHostIngress = "allow-remotehost-ingress" - LabelAllowAnyIngress = "allow-any-ingress" - LabelAllowAnyEgress = "allow-any-egress" - LabelVisibilityAnnotation = "visibility-annotation" -) - -// MapState is a map interface for policy maps -type MapState interface { - Get(Key) (MapStateEntry, bool) - Insert(Key, MapStateEntry) - Delete(Key) - // ForEach allows iteration over the MapStateEntries. It returns true iff - // the iteration was not stopped early by the callback. - ForEach(func(Key, MapStateEntry) (cont bool)) (complete bool) - // ForEachAllow behaves like ForEach, but only iterates MapStateEntries which are not denies. - ForEachAllow(func(Key, MapStateEntry) (cont bool)) (complete bool) - // ForEachDeny behaves like ForEach, but only iterates MapStateEntries which are denies. - ForEachDeny(func(Key, MapStateEntry) (cont bool)) (complete bool) - GetIdentities(*logrus.Logger) ([]int64, []int64) - GetDenyIdentities(*logrus.Logger) ([]int64, []int64) - RevertChanges(ChangeState) - AddVisibilityKeys(PolicyOwner, uint16, *VisibilityMetadata, ChangeState) - Len() int - Equals(MapState) bool - Diff(t *testing.T, expected MapState) string - - allowAllIdentities(ingress, egress bool) - determineAllowLocalhostIngress() - deniesL4(policyOwner PolicyOwner, l4 *L4Filter) bool - denyPreferredInsertWithChanges(newKey Key, newEntry MapStateEntry, identities Identities, features policyFeatures, changes ChangeState) - deleteKeyWithChanges(key Key, owner MapStateOwner, changes ChangeState) -} - -// mapState is a state of a policy map. -type mapState struct { - allows mapStateMap - denies mapStateMap -} - -// mapStateMap is a convience type representing the actual structure mapping -// policymap keys to policymap entries. -type mapStateMap map[Key]MapStateEntry - -func (m mapStateMap) insert(k Key, e MapStateEntry) { - if m == nil { - n := make(mapStateMap) - m = n - } - m[k] = e -} - -type Identities interface { - GetNetsLocked(identity.NumericIdentity) []*net.IPNet -} - -// Key is the userspace representation of a policy key in BPF. It is -// intentionally duplicated from pkg/maps/policymap to avoid pulling in the -// BPF dependency to this package. -type Key struct { - // Identity is the numeric identity to / from which traffic is allowed. - Identity uint32 - // DestPort is the port at L4 to / from which traffic is allowed, in - // host-byte order. - DestPort uint16 - // NextHdr is the protocol which is allowed. - Nexthdr uint8 - // TrafficDirection indicates in which direction Identity is allowed - // communication (egress or ingress). - TrafficDirection uint8 -} - -// String returns a string representation of the Key -func (k Key) String() string { - return "Identity=" + strconv.FormatUint(uint64(k.Identity), 10) + - ",DestPort=" + strconv.FormatUint(uint64(k.DestPort), 10) + - ",Nexthdr=" + strconv.FormatUint(uint64(k.Nexthdr), 10) + - ",TrafficDirection=" + strconv.FormatUint(uint64(k.TrafficDirection), 10) -} - -// IsIngress returns true if the key refers to an ingress policy key -func (k Key) IsIngress() bool { - return k.TrafficDirection == trafficdirection.Ingress.Uint8() -} - -// IsEgress returns true if the key refers to an egress policy key -func (k Key) IsEgress() bool { - return k.TrafficDirection == trafficdirection.Egress.Uint8() -} - -// PortProtoIsBroader returns true if the receiver Key has broader -// port-protocol than the argument Key. That is a port-protocol -// that covers the argument Key's port-protocol and is larger. -// An equal port-protocol will return false. -func (k Key) PortProtoIsBroader(c Key) bool { - return k.DestPort == 0 && c.DestPort != 0 || - k.Nexthdr == 0 && c.Nexthdr != 0 -} - -// PortProtoIsEqual returns true if the port-protocols of the -// two keys are exactly equal. -func (k Key) PortProtoIsEqual(c Key) bool { - return k.DestPort == c.DestPort && k.Nexthdr == c.Nexthdr -} - -type Keys map[Key]struct{} - -type MapStateOwner interface{} - -// MapStateEntry is the configuration associated with a Key in a -// MapState. This is a minimized version of policymap.PolicyEntry. -type MapStateEntry struct { - // The proxy port, in host byte order. - // If 0 (default), there is no proxy redirection for the corresponding - // Key. Any other value signifies proxy redirection. - ProxyPort uint16 - - // IsDeny is true when the policy should be denied. - IsDeny bool - - // hasAuthType is 'DefaultAuthType' when policy has no explicit AuthType set. In this case the - // value of AuthType is derived from more generic entries covering this entry. - hasAuthType HasAuthType - - // AuthType is non-zero when authentication is required for the traffic to be allowed. - AuthType AuthType - - // DerivedFromRules tracks the policy rules this entry derives from - // In sorted order. - DerivedFromRules labels.LabelArrayList - - // Owners collects the keys in the map and selectors in the policy that require this key to be present. - // TODO: keep track which selector needed the entry to be deny, redirect, or just allow. - owners map[MapStateOwner]struct{} - - // dependents contains the keys for entries create based on this entry. These entries - // will be deleted once all of the owners are deleted. - dependents Keys -} - -// NewMapStateEntry creates a map state entry. If redirect is true, the -// caller is expected to replace the ProxyPort field before it is added to -// the actual BPF map. -// 'cs' is used to keep track of which policy selectors need this entry. If it is 'nil' this entry -// will become sticky and cannot be completely removed via incremental updates. Even in this case -// the entry may be overridden or removed by a deny entry. -func NewMapStateEntry(cs MapStateOwner, derivedFrom labels.LabelArrayList, redirect, deny bool, hasAuth HasAuthType, authType AuthType) MapStateEntry { - var proxyPort uint16 - if redirect { - // Any non-zero value will do, as the callers replace this with the - // actual proxy listening port number before the entry is added to the - // actual bpf map. - proxyPort = 1 - } - - return MapStateEntry{ - ProxyPort: proxyPort, - DerivedFromRules: derivedFrom, - IsDeny: deny, - hasAuthType: hasAuth, - AuthType: authType, - owners: map[MapStateOwner]struct{}{cs: {}}, - } -} - -// AddDependent adds 'key' to the set of dependent keys. -func (e *MapStateEntry) AddDependent(key Key) { - if e.dependents == nil { - e.dependents = make(Keys, 1) - } - e.dependents[key] = struct{}{} -} - -// RemoveDependent removes 'key' from the set of dependent keys. -func (e *MapStateEntry) RemoveDependent(key Key) { - delete(e.dependents, key) - // Nil the map when empty. This is mainly to make unit testing easier. - if len(e.dependents) == 0 { - e.dependents = nil - } -} - -// HasDependent returns true if the 'key' is contained -// within the set of dependent keys -func (e *MapStateEntry) HasDependent(key Key) bool { - if e.dependents == nil { - return false - } - _, ok := e.dependents[key] - return ok -} - -var worldNets = map[identity.NumericIdentity][]*net.IPNet{ - identity.ReservedIdentityWorld: { - {IP: net.IPv4zero, Mask: net.CIDRMask(0, net.IPv4len*8)}, - {IP: net.IPv6zero, Mask: net.CIDRMask(0, net.IPv6len*8)}, - }, - identity.ReservedIdentityWorldIPv4: { - {IP: net.IPv4zero, Mask: net.CIDRMask(0, net.IPv4len*8)}, - }, - identity.ReservedIdentityWorldIPv6: { - {IP: net.IPv6zero, Mask: net.CIDRMask(0, net.IPv6len*8)}, - }, -} - -// getNets returns the most specific CIDR for an identity. For the "World" identity -// it returns both IPv4 and IPv6. -func getNets(identities Identities, ident uint32) []*net.IPNet { - // World identities are handled explicitly for two reasons: - // 1. 'identities' may be nil, but world identities are still expected to be considered - // 2. SelectorCache is not be informed of reserved/world identities in all test cases - id := identity.NumericIdentity(ident) - if id <= identity.ReservedIdentityWorldIPv6 { - return worldNets[id] - } - // CIDR identities have a local scope, so we can skip the rest if id is not of local scope. - if !id.HasLocalScope() || identities == nil { - return nil - } - return identities.GetNetsLocked(id) -} - -// NewMapState creates a new MapState interface -func NewMapState(initMap map[Key]MapStateEntry) MapState { - return newMapState(initMap) -} - -func newMapState(initMap map[Key]MapStateEntry) *mapState { - m := &mapState{ - allows: make(map[Key]MapStateEntry), - denies: make(map[Key]MapStateEntry), - } - for k, v := range initMap { - m.Insert(k, v) - } - return m -} - -// Get the MapStateEntry that matches the Key. -func (ms *mapState) Get(k Key) (MapStateEntry, bool) { - v, ok := ms.denies[k] - if ok { - return v, ok - } - v, ok = ms.allows[k] - return v, ok -} - -// Insert the Key and matcthing MapStateEntry into the -// MapState -func (ms *mapState) Insert(k Key, v MapStateEntry) { - if v.IsDeny { - delete(ms.allows, k) - ms.denies.insert(k, v) - } else { - delete(ms.denies, k) - ms.allows.insert(k, v) - } -} - -// Delete removes the Key an related MapStateEntry. -func (ms *mapState) Delete(k Key) { - delete(ms.allows, k) - delete(ms.denies, k) -} - -// ForEach iterates over every Key MapStateEntry and stops when the function -// argument returns false. It returns false iff the iteration was cut short. -func (ms *mapState) ForEach(f func(Key, MapStateEntry) (cont bool)) (complete bool) { - if complete := ms.ForEachAllow(f); !complete { - return complete - } - - return ms.ForEachDeny(f) -} - -// ForEachAllow iterates over every Key MapStateEntry that isn't a deny and -// stops when the function argument returns false -func (ms *mapState) ForEachAllow(f func(Key, MapStateEntry) (cont bool)) (complete bool) { - for k, v := range ms.allows { - if !f(k, v) { - return false - } - } - return true -} - -// ForEachDeny iterates over every Key MapStateEntry that is a deny and -// stops when the function argument returns false -func (ms *mapState) ForEachDeny(f func(Key, MapStateEntry) (cont bool)) (complete bool) { - for k, v := range ms.denies { - if !f(k, v) { - return false - } - } - return true -} - -// Len returns the length of the map -func (ms *mapState) Len() int { - return len(ms.allows) + len(ms.denies) -} - -// Equals determines if this MapState is equal to the -// argument MapState -func (msA *mapState) Equals(msB MapState) bool { - if msA.Len() != msB.Len() { - return false - } - - return msA.ForEach(func(kA Key, vA MapStateEntry) bool { - if vB, ok := msB.Get(kA); ok { - return (&vB).DatapathEqual(&vA) - } - return false - }) -} - -// Diff returns the string of differences between 'obtained' and 'expected' prefixed with -// '+ ' or '- ' for obtaining something unexpected, or not obtaining the expected, respectively. -// For use in debugging. -func (obtained *mapState) Diff(_ *testing.T, expected MapState) (res string) { - expected.ForEach(func(kE Key, vE MapStateEntry) bool { - if vO, ok := obtained.Get(kE); ok { - if !(&vO).DatapathEqual(&vE) { - res += "- " + kE.String() + ": " + vE.String() + "\n" - res += "+ " + kE.String() + ": " + vO.String() + "\n" - } - } else { - res += "- " + kE.String() + ": " + vE.String() + "\n" - } - return true - }) - obtained.ForEach(func(kE Key, vE MapStateEntry) bool { - if vO, ok := expected.Get(kE); !ok { - res += "+ " + kE.String() + ": " + vO.String() + "\n" - } - return true - }) - return res -} - -// AddDependent adds 'key' to the set of dependent keys. -func (ms *mapState) AddDependent(owner Key, dependent Key, changes ChangeState) { - if e, exists := ms.allows[owner]; exists { - ms.addDependentOnEntry(owner, e, dependent, changes) - } else if e, exists := ms.denies[owner]; exists { - ms.addDependentOnEntry(owner, e, dependent, changes) - } -} - -// addDependentOnEntry adds 'dependent' to the set of dependent keys of 'e'. -func (ms *mapState) addDependentOnEntry(owner Key, e MapStateEntry, dependent Key, changes ChangeState) { - if _, exists := e.dependents[dependent]; !exists { - if changes.Old != nil { - changes.Old[owner] = e - } - e.AddDependent(dependent) - ms.Insert(owner, e) - } -} - -// RemoveDependent removes 'key' from the list of dependent keys. -// This is called when a dependent entry is being deleted. -// If 'old' is not nil, then old value is added there before any modifications. -func (ms *mapState) RemoveDependent(owner Key, dependent Key, changes ChangeState) { - if e, exists := ms.allows[owner]; exists { - changes.insertOldIfNotExists(owner, e) - e.RemoveDependent(dependent) - delete(ms.denies, owner) - ms.allows.insert(owner, e) - return - } - - if e, exists := ms.denies[owner]; exists { - changes.insertOldIfNotExists(owner, e) - e.RemoveDependent(dependent) - delete(ms.allows, owner) - ms.denies.insert(owner, e) - } -} - -// Merge adds owners, dependents, and DerivedFromRules from a new 'entry' to an existing -// entry 'e'. 'entry' is not modified. -// IsDeny, ProxyPort, and AuthType are merged by giving precedence to deny over non-deny, proxy -// redirection over no proxy redirection, and explicit auth type over default auth type. -func (e *MapStateEntry) Merge(entry *MapStateEntry) { - // Deny is sticky - if !e.IsDeny { - e.IsDeny = entry.IsDeny - } - - // Deny entries have no proxy redirection nor auth requirement - if e.IsDeny { - e.ProxyPort = 0 - e.hasAuthType = DefaultAuthType - e.AuthType = AuthTypeDisabled - } else { - // Proxy port takes precedence, but may be updated - if entry.ProxyPort != 0 { - e.ProxyPort = entry.ProxyPort - } - - // Explicit auth takes precedence over defaulted one. - if entry.hasAuthType == ExplicitAuthType { - if e.hasAuthType == ExplicitAuthType { - // Numerically higher AuthType takes precedence when both are explicitly defined - if entry.AuthType > e.AuthType { - e.AuthType = entry.AuthType - } - } else { - e.hasAuthType = ExplicitAuthType - e.AuthType = entry.AuthType - } - } else if e.hasAuthType == DefaultAuthType { - e.AuthType = entry.AuthType // new default takes precedence - } - } - - if e.owners == nil && len(entry.owners) > 0 { - e.owners = make(map[MapStateOwner]struct{}, len(entry.owners)) - } - for k, v := range entry.owners { - e.owners[k] = v - } - - // merge dependents - for k := range entry.dependents { - e.AddDependent(k) - } - - // merge DerivedFromRules - if len(entry.DerivedFromRules) > 0 { - e.DerivedFromRules.MergeSorted(entry.DerivedFromRules) - } -} - -// IsRedirectEntry returns true if e contains a redirect -func (e *MapStateEntry) IsRedirectEntry() bool { - return e.ProxyPort != 0 -} - -// DatapathEqual returns true of two entries are equal in the datapath's PoV, -// i.e., IsDeny, ProxyPort and AuthType are the same for both entries. -func (e *MapStateEntry) DatapathEqual(o *MapStateEntry) bool { - if e == nil || o == nil { - return e == o - } - - return e.IsDeny == o.IsDeny && e.ProxyPort == o.ProxyPort && e.AuthType == o.AuthType -} - -// DeepEqual is a manually generated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -// Defined manually due to deepequal-gen not supporting interface types. -// 'cachedNets' member is ignored in comparison, as it is a cached value and -// makes no functional difference. -func (e *MapStateEntry) DeepEqual(o *MapStateEntry) bool { - if !e.DatapathEqual(o) { - return false - } - - if !e.DerivedFromRules.DeepEqual(&o.DerivedFromRules) { - return false - } - - if len(e.owners) != len(o.owners) { - return false - } - for k := range o.owners { - if _, exists := e.owners[k]; !exists { - return false - } - } - - if len(e.dependents) != len(o.dependents) { - return false - } - for k := range o.dependents { - if _, exists := e.dependents[k]; !exists { - return false - } - } - - // ignoring cachedNets - - return true -} - -// String returns a string representation of the MapStateEntry -func (e MapStateEntry) String() string { - return "ProxyPort=" + strconv.FormatUint(uint64(e.ProxyPort), 10) + - ",IsDeny=" + strconv.FormatBool(e.IsDeny) + - ",AuthType=" + e.AuthType.String() + - ",DerivedFromRules=" + fmt.Sprintf("%v", e.DerivedFromRules) -} - -// denyPreferredInsert inserts a key and entry into the map by given preference -// to deny entries, and L3-only deny entries over L3-L4 allows. -// This form may be used when a full policy is computed and we are not yet interested -// in accumulating incremental changes. -// Caller may insert the same MapStateEntry multiple times for different Keys, but all from the same -// owner. -func (ms *mapState) denyPreferredInsert(newKey Key, newEntry MapStateEntry, identities Identities, features policyFeatures) { - // Enforce nil values from NewMapStateEntry - newEntry.dependents = nil - - ms.denyPreferredInsertWithChanges(newKey, newEntry, identities, features, ChangeState{}) -} - -// addKeyWithChanges adds a 'key' with value 'entry' to 'keys' keeping track of incremental changes in 'adds' and 'deletes', and any changed or removed old values in 'old', if not nil. -func (ms *mapState) addKeyWithChanges(key Key, entry MapStateEntry, changes ChangeState) { - // Keep all owners that need this entry so that it is deleted only if all the owners delete their contribution - var datapathEqual bool - oldEntry, exists := ms.Get(key) - if exists { - // Deny entry can only be overridden by another deny entry - if oldEntry.IsDeny && !entry.IsDeny { - return - } - - if entry.DeepEqual(&oldEntry) { - return // nothing to do - } - - // Save old value before any changes, if desired - if changes.Old != nil { - changes.insertOldIfNotExists(key, oldEntry) - } - - // Compare for datapath equalness before merging, as the old entry is updated in - // place! - datapathEqual = oldEntry.DatapathEqual(&entry) - oldEntry.Merge(&entry) - ms.Insert(key, oldEntry) - } else { - // Newly inserted entries must have their own containers, so that they - // remain separate when new owners/dependents are added to existing entries - entry.DerivedFromRules = slices.Clone(entry.DerivedFromRules) - entry.owners = maps.Clone(entry.owners) - entry.dependents = maps.Clone(entry.dependents) - ms.Insert(key, entry) - } - - // Record an incremental Add if desired and entry is new or changed - if changes.Adds != nil && (!exists || !datapathEqual) { - changes.Adds[key] = struct{}{} - // Key add overrides any previous delete of the same key - if changes.Deletes != nil { - delete(changes.Deletes, key) - } - } -} - -// deleteKeyWithChanges deletes a 'key' from 'keys' keeping track of incremental changes in 'adds' and 'deletes'. -// The key is unconditionally deleted if 'cs' is nil, otherwise only the contribution of this 'cs' is removed. -func (ms *mapState) deleteKeyWithChanges(key Key, owner MapStateOwner, changes ChangeState) { - if entry, exists := ms.Get(key); exists { - // Save old value before any changes, if desired - oldAdded := changes.insertOldIfNotExists(key, entry) - if owner != nil { - // remove the contribution of the given selector only - if _, exists = entry.owners[owner]; exists { - // Remove the contribution of this selector from the entry - delete(entry.owners, owner) - if ownerKey, ok := owner.(Key); ok { - ms.RemoveDependent(ownerKey, key, changes) - } - // key is not deleted if other owners still need it - if len(entry.owners) > 0 { - return - } - } else { - // 'owner' was not found, do not change anything - if oldAdded { - delete(changes.Old, key) - } - return - } - } - - // Remove this key from all owners' dependents maps if no owner was given. - // Owner is nil when deleting more specific entries (e.g., L3/L4) when - // adding deny entries that cover them (e.g., L3-deny). - if owner == nil { - for owner := range entry.owners { - if owner != nil { - if ownerKey, ok := owner.(Key); ok { - ms.RemoveDependent(ownerKey, key, changes) - } - } - } - } - - // Check if dependent entries need to be deleted as well - for k := range entry.dependents { - ms.deleteKeyWithChanges(k, key, changes) - } - if changes.Deletes != nil { - changes.Deletes[key] = struct{}{} - // Remove a potential previously added key - if changes.Adds != nil { - delete(changes.Adds, key) - } - } - - delete(ms.allows, key) - delete(ms.denies, key) - } -} - -// identityIsSupersetOf compares two entries and keys to see if the primary identity contains -// the compared identity. This means that either that primary identity is 0 (i.e. it is a superset -// of every other identity), or one of the subnets of the primary identity fully contains or is -// equal to one of the subnets in the compared identity (note:this covers cases like "reserved:world"). -func identityIsSupersetOf(primaryIdentity, compareIdentity uint32, identities Identities) bool { - // If the identities are equal then neither is a superset (for the purposes of our business logic). - if primaryIdentity == compareIdentity { - return false - } - - // Consider an identity that selects a broader CIDR as a superset of - // an identity that selects a narrower CIDR. For instance, an identity - // corresponding to 192.0.0.0/16 is a superset of the identity that - // corresponds to 192.0.2.3/32. - // - // The reasons we need to do this are surprisingly complex, taking into - // consideration design decisions around the handling of ToFQDNs policy - // and how L4PolicyMap/L4Filter structures cache the policies with - // respect to specific CIDRs. More specifically: - // - At the time of initial L4Filter creation, it is not known which - // specific CIDRs (or corresponding identities) are selected by a - // toFQDNs rule in the policy engine. - // - It is possible to have a CIDR deny rule that should deny peers - // that are allowed by a ToFQDNs statement. The precedence rules in - // the API for such policy conflicts define that the deny should take - // precedence. - // - Consider a case where there is a deny rule for 192.0.0.0/16 with - // an allow rule for cilium.io, and one of the IP addresses for - // cilium.io is 192.0.2.3. - // - If the IP for cilium.io was known at initial policy computation - // time, then we would calculate the MapState from the L4Filters and - // immediately determine that there is a conflict between the - // L4Filter that denies 192.0.0.0/16 vs. the allow for 192.0.2.3. - // From this we could immediately discard the "allow to 192.0.2.3" - // policymap entry during policy calculation. This would satisfy the - // API constraint that deny rules take precedence over allow rules. - // However, this is not the case for ToFQDNs -- the IPs are not known - // until DNS resolution time by the selected application / endpoint. - // - In order to make ToFQDNs policy implementation efficient, it uses - // a shorter incremental policy computation path that attempts to - // directly implement the ToFQDNs allow into a MapState entry without - // reaching back up to the L4Filter layer to iterate all selectors - // to determine traffic reachability for this newly learned IP. - // - As such, when the new ToFQDNs allow for the 192.0.2.3 IP address - // is implemented, we must iterate back through all existing MapState - // entries to determine whether any of the other map entries already - // denies this traffic by virtue of the IP prefix being a superset of - // this new allow. This allows us to ensure that the broader CIDR - // deny semantics are correctly applied when there is a combination - // of CIDR deny rules and ToFQDNs allow rules. - // - // An alternative to this approach might be to change the ToFQDNs - // policy calculation layer to reference back to the L4Filter layer, - // and perhaps introduce additional CIDR caching somewhere there so - // that this policy computation can be efficient while handling DNS - // responses. As of the writing of this message, such there is no - // active proposal to implement this proposal. As a result, any time - // there is an incremental policy update for a new map entry, we must - // iterate through all entries in the map and re-evaluate superset - // relationships for deny entries to ensure that policy precedence is - // correctly implemented between the new and old entries, taking into - // account whether the identities may represent CIDRs that have a - // superset relationship. - return primaryIdentity == 0 && compareIdentity != 0 || - ip.NetsContainsAny(getNets(identities, primaryIdentity), - getNets(identities, compareIdentity)) -} - -// protocolsMatch checks to see if two given keys match on protocol. -// This means that either one of them covers all protocols or they -// are equal. -func protocolsMatch(a, b Key) bool { - return a.Nexthdr == 0 || b.Nexthdr == 0 || a.Nexthdr == b.Nexthdr -} - -// RevertChanges undoes changes to 'keys' as indicated by 'changes.adds' and 'changes.old' collected via -// denyPreferredInsertWithChanges(). -func (ms *mapState) RevertChanges(changes ChangeState) { - for k := range changes.Adds { - delete(ms.allows, k) - delete(ms.denies, k) - } - // 'old' contains all the original values of both modified and deleted entries - for k, v := range changes.Old { - ms.Insert(k, v) - } -} - -// denyPreferredInsertWithChanges contains the most important business logic for policy insertions. It inserts -// a key and entry into the map by giving preference to deny entries, and L3-only deny entries over L3-L4 allows. -// Incremental changes performed are recorded in 'adds' and 'deletes', if not nil. -// See https://docs.google.com/spreadsheets/d/1WANIoZGB48nryylQjjOw6lKjI80eVgPShrdMTMalLEw#gid=2109052536 for details -func (ms *mapState) denyPreferredInsertWithChanges(newKey Key, newEntry MapStateEntry, identities Identities, features policyFeatures, changes ChangeState) { - // Skip deny rules processing if the policy in this direction has no deny rules - if !features.contains(denyRules) { - ms.authPreferredInsert(newKey, newEntry, features, changes) - return - } - - allCpy := allKey - allCpy.TrafficDirection = newKey.TrafficDirection - // If we have a deny "all" we don't accept any kind of map entry. - if _, ok := ms.denies[allCpy]; ok { - return - } - if newEntry.IsDeny { - ms.ForEachAllow(func(k Key, v MapStateEntry) bool { - // Protocols and traffic directions that don't match ensure that the policies - // do not interact in anyway. - if newKey.TrafficDirection != k.TrafficDirection || !protocolsMatch(newKey, k) { - return true - } - - if identityIsSupersetOf(k.Identity, newKey.Identity, identities) { - if newKey.PortProtoIsBroader(k) { - // If this iterated-allow-entry is a superset of the new-entry - // and it has a more specific port-protocol than the new-entry - // then an additional copy of the new-entry with the more - // specific port-protocol of the iterated-allow-entry must be inserted. - newKeyCpy := newKey - newKeyCpy.DestPort = k.DestPort - newKeyCpy.Nexthdr = k.Nexthdr - l3l4DenyEntry := NewMapStateEntry(newKey, newEntry.DerivedFromRules, false, true, DefaultAuthType, AuthTypeDisabled) - ms.addKeyWithChanges(newKeyCpy, l3l4DenyEntry, changes) - // L3-only entries can be deleted incrementally so we need to track their - // effects on other entries so that those effects can be reverted when the - // identity is removed. - newEntry.AddDependent(newKeyCpy) - } - } else if (newKey.Identity == k.Identity || - identityIsSupersetOf(newKey.Identity, k.Identity, identities)) && - (newKey.PortProtoIsBroader(k) || newKey.PortProtoIsEqual(k)) { - // If the new-entry is a superset (or equal) of the iterated-allow-entry and - // the new-entry has a broader (or equal) port-protocol then we - // should delete the iterated-allow-entry - ms.deleteKeyWithChanges(k, nil, changes) - } - return true - }) - - bailed := false - ms.ForEachDeny(func(k Key, v MapStateEntry) bool { - // Protocols and traffic directions that don't match ensure that the policies - // do not interact in anyway. - if newKey.TrafficDirection != k.TrafficDirection || !protocolsMatch(newKey, k) { - return true - } - - if (newKey.Identity == k.Identity || - identityIsSupersetOf(k.Identity, newKey.Identity, identities)) && - k.DestPort == 0 && k.Nexthdr == 0 && - !v.HasDependent(newKey) { - // If this iterated-deny-entry is a supserset (or equal) of the new-entry and - // the iterated-deny-entry is an L3-only policy then we - // should not insert the new entry (as long as it is not one - // of the special L4-only denies we created to cover the special - // case of a superset-allow with a more specific port-protocol). - // - // NOTE: This condition could be broader to reject more deny entries, - // but there *may* be performance tradeoffs. - bailed = true - return false - } else if (newKey.Identity == k.Identity || - identityIsSupersetOf(newKey.Identity, k.Identity, identities)) && - newKey.DestPort == 0 && newKey.Nexthdr == 0 && - !newEntry.HasDependent(k) { - // If this iterated-deny-entry is a subset (or equal) of the new-entry and - // the new-entry is an L3-only policy then we - // should delete the iterated-deny-entry (as long as it is not one - // of the special L4-only denies we created to cover the special - // case of a superset-allow with a more specific port-protocol). - // - // NOTE: This condition could be broader to reject more deny entries, - // but there *may* be performance tradeoffs. - ms.deleteKeyWithChanges(k, nil, changes) - } - return true - }) - - if !bailed { - ms.addKeyWithChanges(newKey, newEntry, changes) - } - } else { - // NOTE: We do not delete redundant allow entries. - bailed := false - ms.ForEachDeny(func(k Key, v MapStateEntry) bool { - // Protocols and traffic directions that don't match ensure that the policies - // do not interact in anyway. - if newKey.TrafficDirection != k.TrafficDirection || !protocolsMatch(newKey, k) { - return true - } - if identityIsSupersetOf(newKey.Identity, k.Identity, identities) { - if k.PortProtoIsBroader(newKey) { - // If the new-entry is *only* superset of the iterated-deny-entry - // and the new-entry has a more specific port-protocol than the - // iterated-deny-entry then an additional copy of the iterated-deny-entry - // with the more specific port-porotocol of the new-entry must - // be added. - denyKeyCpy := k - denyKeyCpy.DestPort = newKey.DestPort - denyKeyCpy.Nexthdr = newKey.Nexthdr - l3l4DenyEntry := NewMapStateEntry(k, v.DerivedFromRules, false, true, DefaultAuthType, AuthTypeDisabled) - ms.addKeyWithChanges(denyKeyCpy, l3l4DenyEntry, changes) - // L3-only entries can be deleted incrementally so we need to track their - // effects on other entries so that those effects can be reverted when the - // identity is removed. - ms.addDependentOnEntry(k, v, denyKeyCpy, changes) - } - } else if (k.Identity == newKey.Identity || - identityIsSupersetOf(k.Identity, newKey.Identity, identities)) && - (k.PortProtoIsBroader(newKey) || k.PortProtoIsEqual(newKey)) && - !v.HasDependent(newKey) { - // If the iterated-deny-entry is a superset (or equal) of the new-entry and has a - // broader (or equal) port-protocol than the new-entry then the new - // entry should not be inserted. - bailed = true - return false - } - - return true - }) - - if !bailed { - ms.authPreferredInsert(newKey, newEntry, features, changes) - } - } -} - -// IsSuperSetOf checks if the receiver Key is a superset of the argument Key, and returns a -// specificity score of the receiver key (higher score is more specific), if so. Being a superset -// means that the receiver key would match all the traffic of the argument key without being the -// same key. Hence, a L3-only key is not a superset of a L4-only key, as the L3-only key would match -// the traffic for the given L3 only, while the L4-only key matches traffic on the given port for -// all the L3's. -// Returns 0 if the receiver key is not a superset of the argument key. -// -// Specificity score for all possible superset wildcard patterns. Datapath requires proto to be specified if port is specified. -// x. L3/proto/port -// 1. */*/* -// 2. */proto/* -// 3. */proto/port -// 4. ID/*/* -// 5. ID/proto/* -// ( ID/proto/port can not be superset of anything ) -func (k Key) IsSuperSetOf(other Key) int { - if k.TrafficDirection != other.TrafficDirection { - return 0 // TrafficDirection must match for 'k' to be a superset of 'other' - } - if k.Identity == 0 { - if other.Identity == 0 { - if k.Nexthdr == 0 { // k.DestPort == 0 is implied - if other.Nexthdr != 0 { - return 1 // */*/* is a superset of */proto/x - } // else both are */*/* - } else if k.Nexthdr == other.Nexthdr { - if k.DestPort == 0 && other.DestPort != 0 { - return 2 // */proto/* is a superset of */proto/port - } // else more specific or different ports - } // else more specific or different protocol - } else { - // Wildcard L3 is a superset of a specific L3 only if wildcard L3 is also wildcard L4, or the L4's match between the keys - if k.Nexthdr == 0 { // k.DestPort == 0 is implied - return 1 // */*/* is a superset of ID/x/x - } else if k.Nexthdr == other.Nexthdr { - if k.DestPort == 0 { - return 2 // */proto/* is a superset of ID/proto/x - } else if k.DestPort == other.DestPort { - return 3 // */proto/port is a superset of ID/proto/port - } // else more specific or different ports - } // else more specific or different protocol - } - } else if k.Identity == other.Identity { - if k.Nexthdr == 0 { - if other.Nexthdr != 0 { - return 4 // ID/*/* is a superset of ID/proto/x - } // else both are ID/*/* - } else if k.Nexthdr == other.Nexthdr { - if k.DestPort == 0 && other.DestPort != 0 { - return 5 // ID/proto/* is a superset of ID/proto/port - } // else more specific or different ports - } // else more specific or different protocol - } // else more specific or different identity - return 0 -} - -// authPreferredInsert applies AuthType of a more generic entry to more specific entries, if not -// explicitly specified. -// -// This function is expected to be called for a map insertion after deny -// entry evaluation. If there is a map entry that is a superset of 'newKey' -// which denies traffic matching 'newKey', then this function should not be called. -func (ms *mapState) authPreferredInsert(newKey Key, newEntry MapStateEntry, features policyFeatures, changes ChangeState) { - if features.contains(authRules) { - if newEntry.hasAuthType == DefaultAuthType { - // New entry has a default auth type. - // Fill in the AuthType from more generic entries with an explicit auth type - maxSpecificity := 0 - l3l4State := newMapState(nil) - - ms.ForEachAllow(func(k Key, v MapStateEntry) bool { - // Only consider the same Traffic direction - if newKey.TrafficDirection != k.TrafficDirection { - return true - } - - // Nothing to be done if entry has default AuthType - if v.hasAuthType == DefaultAuthType { - return true - } - - // Find out if 'k' is an identity-port-proto superset of 'newKey' - if specificity := k.IsSuperSetOf(newKey); specificity > 0 { - if specificity > maxSpecificity { - // AuthType from the most specific superset is - // applied to 'newEntry' - newEntry.AuthType = v.AuthType - maxSpecificity = specificity - } - } else { - // Check if a new L3L4 entry must be created due to L3-only - // 'k' specifying an explicit AuthType and an L4-only 'newKey' not - // having an explicit AuthType. In this case AuthType should - // only override the AuthType for the L3 & L4 combination, - // not L4 in general. - // - // These need to be collected and only added if there is a - // superset key of newKey with an explicit auth type. In - // this case AuthType of the new L4-only entry was - // overridden by a more generic entry and 'max_specificity > - // 0' after the loop. - if k.Identity != 0 && k.Nexthdr == 0 && newKey.Identity == 0 && newKey.Nexthdr != 0 { - newKeyCpy := k - newKeyCpy.DestPort = newKey.DestPort - newKeyCpy.Nexthdr = newKey.Nexthdr - l3l4AuthEntry := NewMapStateEntry(k, v.DerivedFromRules, false, false, DefaultAuthType, v.AuthType) - l3l4AuthEntry.DerivedFromRules.MergeSorted(newEntry.DerivedFromRules) - l3l4State.allows[newKeyCpy] = l3l4AuthEntry - } - } - return true - }) - // Add collected L3/L4 entries if the auth type of the new entry was not - // overridden by a more generic entry. If it was overridden, the new L3L4 - // entries are not needed as the L4-only entry with an overridden AuthType - // will be matched before the L3-only entries in the datapath. - if maxSpecificity == 0 { - l3l4State.ForEach(func(k Key, v MapStateEntry) bool { - ms.addKeyWithChanges(k, v, changes) - // L3-only entries can be deleted incrementally so we need to track their - // effects on other entries so that those effects can be reverted when the - // identity is removed. - newEntry.AddDependent(k) - return true - }) - } - } else { - // New entry has an explicit auth type. - // Check if the new entry is the most specific superset of any other entry - // with the default auth type, and propagate the auth type from the new - // entry to such entries. - explicitSubsetKeys := make(Keys) - defaultSubsetKeys := make(map[Key]int) - - ms.ForEachAllow(func(k Key, v MapStateEntry) bool { - // Only consider the same Traffic direction - if newKey.TrafficDirection != k.TrafficDirection { - return true - } - - // Find out if 'newKey' is a superset of 'k' - if specificity := newKey.IsSuperSetOf(k); specificity > 0 { - if v.hasAuthType == ExplicitAuthType { - // store for later comparison - explicitSubsetKeys[k] = struct{}{} - } else { - defaultSubsetKeys[k] = specificity - } - } else if v.hasAuthType == DefaultAuthType { - // Check if a new L3L4 entry must be created due to L3-only - // 'newKey' with an explicit AuthType and an L4-only 'k' not - // having an explicit AuthType. In this case AuthType should - // only override the AuthType for the L3 & L4 combination, - // not L4 in general. - if newKey.Identity != 0 && newKey.Nexthdr == 0 && k.Identity == 0 && k.Nexthdr != 0 { - newKeyCpy := newKey - newKeyCpy.DestPort = k.DestPort - newKeyCpy.Nexthdr = k.Nexthdr - l3l4AuthEntry := NewMapStateEntry(newKey, newEntry.DerivedFromRules, false, false, DefaultAuthType, newEntry.AuthType) - l3l4AuthEntry.DerivedFromRules.MergeSorted(v.DerivedFromRules) - ms.addKeyWithChanges(newKeyCpy, l3l4AuthEntry, changes) - // L3-only entries can be deleted incrementally so we need to track their - // effects on other entries so that those effects can be reverted when the - // identity is removed. - newEntry.AddDependent(newKeyCpy) - } - } - - return true - }) - // Find out if this newKey is the most specific superset for all the subset keys with default auth type - Next: - for k, specificity := range defaultSubsetKeys { - for l := range explicitSubsetKeys { - if s := l.IsSuperSetOf(k); s > specificity { - // k has a more specific superset key than the newKey, skip - continue Next - } - } - // newKey is the most specific superset with an explicit auth type, - // propagate auth type from newEntry to the entry of k - v, _ := ms.Get(k) - v.AuthType = newEntry.AuthType - ms.addKeyWithChanges(k, v, changes) // Update the map value - } - } - } - ms.addKeyWithChanges(newKey, newEntry, changes) -} - -var visibilityDerivedFromLabels = labels.LabelArray{ - labels.NewLabel(LabelKeyPolicyDerivedFrom, LabelVisibilityAnnotation, labels.LabelSourceReserved), -} - -var visibilityDerivedFrom = labels.LabelArrayList{visibilityDerivedFromLabels} - -// insertIfNotExists only inserts `key=value` if `key` does not exist in keys already -// returns 'true' if 'key=entry' was added to 'keys' -func (changes *ChangeState) insertOldIfNotExists(key Key, entry MapStateEntry) bool { - if changes == nil || changes.Old == nil { - return false - } - if _, exists := changes.Old[key]; !exists { - // Only insert the old entry if the entry was not first added on this round of - // changes. - if _, added := changes.Adds[key]; !added { - // new containers to keep this entry separate from the one that may remain in 'keys' - entry.DerivedFromRules = slices.Clone(entry.DerivedFromRules) - entry.owners = maps.Clone(entry.owners) - entry.dependents = maps.Clone(entry.dependents) - - changes.Old[key] = entry - return true - } - } - return false -} - -// AddVisibilityKeys adjusts and expands PolicyMapState keys -// and values to redirect for visibility on the port of the visibility -// annotation while still denying traffic on this port for identities -// for which the traffic is denied. -// -// Datapath lookup order is, from highest to lowest precedence: -// 1. L3/L4 -// 2. L4-only (wildcard L3) -// 3. L3-only (wildcard L4) -// 4. Allow-all -// -// This means that the L4-only allow visibility key can only be added if there is an -// allow-all key, and all L3-only deny keys are expanded to L3/L4 keys. If no -// L4-only key is added then also the L3-only allow keys need to be expanded to -// L3/L4 keys for visibility redirection. In addition the existing L3/L4 and L4-only -// allow keys need to be redirected to the proxy port, if not already redirected. -// -// The above can be accomplished by: -// -// 1. Change existing L4-only ALLOW key on matching port that does not already -// redirect to redirect. -// - e.g., 0:80=allow,0 -> 0:80=allow, -// 2. If allow-all policy exists, add L4-only visibility redirect key if the L4-only -// key does not already exist. -// - e.g., 0:0=allow,0 -> add 0:80=allow, if 0:80 does not exist -// - this allows all traffic on port 80, but see step 5 below. -// 3. Change all L3/L4 ALLOW keys on matching port that do not already redirect to -// redirect. -// - e.g, :80=allow,0 -> :80=allow, -// 4. For each L3-only ALLOW key add the corresponding L3/L4 ALLOW redirect if no -// L3/L4 key already exists and no L4-only key already exists and one is not added. -// - e.g., :0=allow,0 -> add :80=allow, if :80 -// and 0:80 do not exist -// 5. If a new L4-only key was added: For each L3-only DENY key add the -// corresponding L3/L4 DENY key if no L3/L4 key already exists. -// - e.g., :0=deny,0 -> add :80=deny,0 if :80 does not exist -// -// With the above we only change/expand existing allow keys to redirect, and -// expand existing drop keys to also drop on the port of interest, if a new -// L4-only key allowing the port is added. -// -// 'adds' and 'oldValues' are updated with the changes made. 'adds' contains both the added and -// changed keys. 'oldValues' contains the old values for changed keys. This function does not -// delete any keys. -func (ms *mapState) AddVisibilityKeys(e PolicyOwner, redirectPort uint16, visMeta *VisibilityMetadata, changes ChangeState) { - direction := trafficdirection.Egress - if visMeta.Ingress { - direction = trafficdirection.Ingress - } - - allowAllKey := Key{ - TrafficDirection: direction.Uint8(), - } - key := Key{ - DestPort: visMeta.Port, - Nexthdr: uint8(visMeta.Proto), - TrafficDirection: direction.Uint8(), - } - - entry := NewMapStateEntry(nil, visibilityDerivedFrom, true, false, DefaultAuthType, AuthTypeDisabled) - entry.ProxyPort = redirectPort - - _, haveAllowAllKey := ms.Get(allowAllKey) - l4Only, haveL4OnlyKey := ms.Get(key) - addL4OnlyKey := false - if haveL4OnlyKey && !l4Only.IsDeny && l4Only.ProxyPort == 0 { - // 1. Change existing L4-only ALLOW key on matching port that does not already - // redirect to redirect. - e.PolicyDebug(logrus.Fields{ - logfields.BPFMapKey: key, - logfields.BPFMapValue: entry, - }, "AddVisibilityKeys: Changing L4-only ALLOW key for visibility redirect") - ms.addKeyWithChanges(key, entry, changes) - } - if haveAllowAllKey && !haveL4OnlyKey { - // 2. If allow-all policy exists, add L4-only visibility redirect key if the L4-only - // key does not already exist. - e.PolicyDebug(logrus.Fields{ - logfields.BPFMapKey: key, - logfields.BPFMapValue: entry, - }, "AddVisibilityKeys: Adding L4-only ALLOW key for visibility redirect") - addL4OnlyKey = true - ms.addKeyWithChanges(key, entry, changes) - } - // - // Loop through all L3 keys in the traffic direction of the new key - // - ms.ForEach(func(k Key, v MapStateEntry) bool { - if k.TrafficDirection != key.TrafficDirection || k.Identity == 0 { - return true - } - if k.DestPort == key.DestPort && k.Nexthdr == key.Nexthdr { - // - // Same L4 - // - if !v.IsDeny && v.ProxyPort == 0 { - // 3. Change all L3/L4 ALLOW keys on matching port that do not - // already redirect to redirect. - v.ProxyPort = redirectPort - v.DerivedFromRules = visibilityDerivedFrom - e.PolicyDebug(logrus.Fields{ - logfields.BPFMapKey: k, - logfields.BPFMapValue: v, - }, "AddVisibilityKeys: Changing L3/L4 ALLOW key for visibility redirect") - ms.addKeyWithChanges(k, v, changes) - } - } else if k.DestPort == 0 && k.Nexthdr == 0 { - // - // Wildcarded L4, i.e., L3-only - // - k2 := k - k2.DestPort = key.DestPort - k2.Nexthdr = key.Nexthdr - if !v.IsDeny && !haveL4OnlyKey && !addL4OnlyKey { - // 4. For each L3-only ALLOW key add the corresponding L3/L4 - // ALLOW redirect if no L3/L4 key already exists and no - // L4-only key already exists and one is not added. - if _, ok := ms.Get(k2); !ok { - d2 := labels.LabelArrayList{visibilityDerivedFromLabels} - d2.MergeSorted(v.DerivedFromRules) - v2 := NewMapStateEntry(k, d2, true, false, v.hasAuthType, v.AuthType) - v2.ProxyPort = redirectPort - e.PolicyDebug(logrus.Fields{ - logfields.BPFMapKey: k2, - logfields.BPFMapValue: v2, - }, "AddVisibilityKeys: Extending L3-only ALLOW key to L3/L4 key for visibility redirect") - ms.addKeyWithChanges(k2, v2, changes) - - // Mark the new entry as a dependent of 'v' - ms.addDependentOnEntry(k, v, k2, changes) - } - } else if addL4OnlyKey && v.IsDeny { - // 5. If a new L4-only key was added: For each L3-only DENY - // key add the corresponding L3/L4 DENY key if no L3/L4 - // key already exists. - if _, ok := ms.Get(k2); !ok { - v2 := NewMapStateEntry(k, v.DerivedFromRules, false, true, DefaultAuthType, AuthTypeDisabled) - e.PolicyDebug(logrus.Fields{ - logfields.BPFMapKey: k2, - logfields.BPFMapValue: v2, - }, "AddVisibilityKeys: Extending L3-only DENY key to L3/L4 key to deny a port with visibility annotation") - ms.addKeyWithChanges(k2, v2, changes) - - // Mark the new entry as a dependent of 'v' - ms.addDependentOnEntry(k, v, k2, changes) - } - } - } - - return true - }) -} - -// determineAllowLocalhostIngress determines whether communication should be allowed -// from the localhost. It inserts the Key corresponding to the localhost in -// the desiredPolicyKeys if the localhost is allowed to communicate with the -// endpoint. Authentication for localhost traffic is not required. -func (ms *mapState) determineAllowLocalhostIngress() { - if option.Config.AlwaysAllowLocalhost() { - derivedFrom := labels.LabelArrayList{ - labels.LabelArray{ - labels.NewLabel(LabelKeyPolicyDerivedFrom, LabelAllowLocalHostIngress, labels.LabelSourceReserved), - }, - } - es := NewMapStateEntry(nil, derivedFrom, false, false, ExplicitAuthType, AuthTypeDisabled) // Authentication never required for local host ingress - ms.denyPreferredInsert(localHostKey, es, nil, allFeatures) - if !option.Config.EnableRemoteNodeIdentity { - var isHostDenied bool - v, ok := ms.Get(localHostKey) - isHostDenied = ok && v.IsDeny - derivedFrom := labels.LabelArrayList{ - labels.LabelArray{ - labels.NewLabel(LabelKeyPolicyDerivedFrom, LabelAllowRemoteHostIngress, labels.LabelSourceReserved), - }, - } - es := NewMapStateEntry(nil, derivedFrom, false, isHostDenied, ExplicitAuthType, AuthTypeDisabled) // Authentication never required for remote node ingress - ms.denyPreferredInsert(localRemoteNodeKey, es, nil, allFeatures) - } - } -} - -// allowAllIdentities translates all identities in selectorCache to their -// corresponding Keys in the specified direction (ingress, egress) which allows -// all at L3. -// Note that this is used when policy is not enforced, so authentication is explicitly not required. -func (ms *mapState) allowAllIdentities(ingress, egress bool) { - if ingress { - keyToAdd := Key{ - Identity: 0, - DestPort: 0, - Nexthdr: 0, - TrafficDirection: trafficdirection.Ingress.Uint8(), - } - derivedFrom := labels.LabelArrayList{ - labels.LabelArray{ - labels.NewLabel(LabelKeyPolicyDerivedFrom, LabelAllowAnyIngress, labels.LabelSourceReserved), - }, - } - ms.allows[keyToAdd] = NewMapStateEntry(nil, derivedFrom, false, false, ExplicitAuthType, AuthTypeDisabled) - } - if egress { - keyToAdd := Key{ - Identity: 0, - DestPort: 0, - Nexthdr: 0, - TrafficDirection: trafficdirection.Egress.Uint8(), - } - derivedFrom := labels.LabelArrayList{ - labels.LabelArray{ - labels.NewLabel(LabelKeyPolicyDerivedFrom, LabelAllowAnyEgress, labels.LabelSourceReserved), - }, - } - ms.allows[keyToAdd] = NewMapStateEntry(nil, derivedFrom, false, false, ExplicitAuthType, AuthTypeDisabled) - } -} - -func (ms *mapState) deniesL4(policyOwner PolicyOwner, l4 *L4Filter) bool { - port := uint16(l4.Port) - proto := uint8(l4.U8Proto) - - // resolve named port - if port == 0 && l4.PortName != "" { - port = policyOwner.GetNamedPort(l4.Ingress, l4.PortName, proto) - if port == 0 { - return true - } - } - - var dir uint8 - if l4.Ingress { - dir = trafficdirection.Ingress.Uint8() - } else { - dir = trafficdirection.Egress.Uint8() - } - anyKey := Key{ - Identity: 0, - DestPort: 0, - Nexthdr: 0, - TrafficDirection: dir, - } - // Are we explicitly denying all traffic? - v, ok := ms.Get(anyKey) - if ok && v.IsDeny { - return true - } - - // Are we explicitly denying this L4-only traffic? - anyKey.DestPort = port - anyKey.Nexthdr = proto - v, ok = ms.Get(anyKey) - if ok && v.IsDeny { - return true - } - - // The given L4 is not categorically denied. - // Traffic to/from a specific L3 on any of the selectors can still be denied. - return false -} - -func (ms *mapState) GetIdentities(log *logrus.Logger) (ingIdentities, egIdentities []int64) { - return ms.getIdentities(log, false) -} - -func (ms *mapState) GetDenyIdentities(log *logrus.Logger) (ingIdentities, egIdentities []int64) { - return ms.getIdentities(log, true) -} - -// GetIdentities returns the ingress and egress identities stored in the -// MapState. -func (ms *mapState) getIdentities(log *logrus.Logger, denied bool) (ingIdentities, egIdentities []int64) { - ms.ForEach(func(policyMapKey Key, policyMapValue MapStateEntry) bool { - if denied != policyMapValue.IsDeny { - return true - } - if policyMapKey.DestPort != 0 { - // If the port is non-zero, then the Key no longer only applies - // at L3. AllowedIngressIdentities and AllowedEgressIdentities - // contain sets of which identities (i.e., label-based L3 only) - // are allowed, so anything which contains L4-related policy should - // not be added to these sets. - return true - } - switch trafficdirection.TrafficDirection(policyMapKey.TrafficDirection) { - case trafficdirection.Ingress: - ingIdentities = append(ingIdentities, int64(policyMapKey.Identity)) - case trafficdirection.Egress: - egIdentities = append(egIdentities, int64(policyMapKey.Identity)) - default: - td := trafficdirection.TrafficDirection(policyMapKey.TrafficDirection) - log.WithField(logfields.TrafficDirection, td). - Errorf("Unexpected traffic direction present in policy map state for endpoint") - } - return true - }) - return ingIdentities, egIdentities -} - -// MapChanges collects updates to the endpoint policy on the -// granularity of individual mapstate key-value pairs for both adds -// and deletes. 'mutex' must be held for any access. -type MapChanges struct { - mutex lock.Mutex - changes []MapChange -} - -type MapChange struct { - Add bool // false deletes - Key Key - Value MapStateEntry -} - -// AccumulateMapChanges accumulates the given changes to the -// MapChanges. -// -// The caller is responsible for making sure the same identity is not -// present in both 'adds' and 'deletes'. -func (mc *MapChanges) AccumulateMapChanges(cs CachedSelector, adds, deletes []identity.NumericIdentity, key Key, value MapStateEntry) { - mc.mutex.Lock() - for _, id := range adds { - key.Identity = id.Uint32() - mc.changes = append(mc.changes, MapChange{Add: true, Key: key, Value: value}) - } - for _, id := range deletes { - key.Identity = id.Uint32() - mc.changes = append(mc.changes, MapChange{Add: false, Key: key, Value: value}) - } - mc.mutex.Unlock() -} - -// consumeMapChanges transfers the incremental changes from MapChanges to the caller, -// while applying the changes to PolicyMapState. -func (mc *MapChanges) consumeMapChanges(policyMapState MapState, features policyFeatures, identities Identities) (adds, deletes Keys) { - mc.mutex.Lock() - changes := ChangeState{ - Adds: make(Keys, len(mc.changes)), - Deletes: make(Keys, len(mc.changes)), - } - - for i := range mc.changes { - if mc.changes[i].Add { - // insert but do not allow non-redirect entries to overwrite a redirect entry, - // nor allow non-deny entries to overwrite deny entries. - // Collect the incremental changes to the overall state in 'mc.adds' and 'mc.deletes'. - policyMapState.denyPreferredInsertWithChanges(mc.changes[i].Key, mc.changes[i].Value, identities, features, changes) - } else { - // Delete the contribution of this cs to the key and collect incremental changes - for cs := range mc.changes[i].Value.owners { // get the sole selector - policyMapState.deleteKeyWithChanges(mc.changes[i].Key, cs, changes) - } - } - } - mc.changes = nil - mc.mutex.Unlock() - return changes.Adds, changes.Deletes -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/policy.go b/vendor/github.com/cilium/cilium/pkg/policy/policy.go deleted file mode 100644 index 861530dd844..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/policy.go +++ /dev/null @@ -1,118 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "io" - stdlog "log" - "strconv" - "strings" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/policy/api" -) - -type Tracing int - -const ( - TRACE_DISABLED Tracing = iota - TRACE_ENABLED - TRACE_VERBOSE -) - -// TraceEnabled returns true if the SearchContext requests tracing. -func (s *SearchContext) TraceEnabled() bool { - return s.Trace != TRACE_DISABLED -} - -// PolicyTrace logs the given message into the SearchContext logger only if -// TRACE_ENABLED or TRACE_VERBOSE is enabled in the receiver's SearchContext. -func (s *SearchContext) PolicyTrace(format string, a ...interface{}) { - if s.TraceEnabled() { - log.Debugf(format, a...) - if s.Logging != nil { - format = "%-" + s.CallDepth() + "s" + format - a = append([]interface{}{""}, a...) - s.Logging.Printf(format, a...) - } - } -} - -// PolicyTraceVerbose logs the given message into the SearchContext logger only -// if TRACE_VERBOSE is enabled in the receiver's SearchContext. -func (s *SearchContext) PolicyTraceVerbose(format string, a ...interface{}) { - switch s.Trace { - case TRACE_VERBOSE: - log.Debugf(format, a...) - if s.Logging != nil { - s.Logging.Printf(format, a...) - } - } -} - -// SearchContext defines the context while evaluating policy -type SearchContext struct { - Trace Tracing - Depth int - Logging *stdlog.Logger - From labels.LabelArray - To labels.LabelArray - DPorts []*models.Port - // rulesSelect specifies whether or not to check whether a rule which is - // being analyzed using this SearchContext matches either From or To. - // This is used to avoid using EndpointSelector.Matches() if possible, - // since it is costly in terms of performance. - rulesSelect bool -} - -func (s *SearchContext) String() string { - from := make([]string, 0, len(s.From)) - to := make([]string, 0, len(s.To)) - dports := make([]string, 0, len(s.DPorts)) - for _, fromLabel := range s.From { - from = append(from, fromLabel.String()) - } - for _, toLabel := range s.To { - to = append(to, toLabel.String()) - } - // We should avoid to use `fmt.Sprintf()` since - // it is well-known for not being opimal in terms of - // CPU and memory allocations. - // See https://github.com/cilium/cilium/issues/19571 - for _, dport := range s.DPorts { - dportStr := dport.Name - if dportStr == "" { - dportStr = strconv.FormatUint(uint64(dport.Port), 10) - } - dports = append(dports, dportStr+"/"+dport.Protocol) - } - fromStr := strings.Join(from, ", ") - toStr := strings.Join(to, ", ") - if len(dports) != 0 { - dportStr := strings.Join(dports, ", ") - return "From: [" + fromStr + "] => To: [" + toStr + "] Ports: [" + dportStr + "]" - } - return "From: [" + fromStr + "] => To: [" + toStr + "]" -} - -func (s *SearchContext) CallDepth() string { - return strconv.Itoa(s.Depth * 2) -} - -// WithLogger returns a shallow copy of the received SearchContext with the -// logging set to write to 'log'. -func (s *SearchContext) WithLogger(log io.Writer) *SearchContext { - result := *s - result.Logging = stdlog.New(log, "", 0) - if result.Trace == TRACE_DISABLED { - result.Trace = TRACE_ENABLED - } - return &result -} - -// Translator is an interface for altering policy rules -type Translator interface { - Translate(*api.Rule, *TranslationResult) error -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/proxyid.go b/vendor/github.com/cilium/cilium/pkg/policy/proxyid.go deleted file mode 100644 index 96029950a54..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/proxyid.go +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "fmt" - "strconv" - "strings" - - "github.com/cilium/cilium/pkg/policy/trafficdirection" - "github.com/cilium/cilium/pkg/u8proto" -) - -// ProxyID returns a unique string to identify a proxy mapping. -func ProxyID(endpointID uint16, ingress bool, protocol string, port uint16) string { - direction := "egress" - if ingress { - direction = "ingress" - } - return strconv.FormatUint(uint64(endpointID), 10) + ":" + direction + ":" + protocol + ":" + strconv.FormatUint(uint64(port), 10) -} - -// ProxyIDFromKey returns a unique string to identify a proxy mapping. -func ProxyIDFromKey(endpointID uint16, key Key) string { - return ProxyID(endpointID, key.TrafficDirection == trafficdirection.Ingress.Uint8(), u8proto.U8proto(key.Nexthdr).String(), key.DestPort) -} - -// ParseProxyID parses a proxy ID returned by ProxyID and returns its components. -func ParseProxyID(proxyID string) (endpointID uint16, ingress bool, protocol string, port uint16, err error) { - comps := strings.Split(proxyID, ":") - if len(comps) != 4 { - err = fmt.Errorf("invalid proxy ID structure: %s", proxyID) - return - } - epID, err := strconv.ParseUint(comps[0], 10, 16) - if err != nil { - return - } - endpointID = uint16(epID) - ingress = comps[1] == "ingress" - protocol = comps[2] - l4port, err := strconv.ParseUint(comps[3], 10, 16) - if err != nil { - return - } - port = uint16(l4port) - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/repository.go b/vendor/github.com/cilium/cilium/pkg/policy/repository.go deleted file mode 100644 index 52cde0e9274..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/repository.go +++ /dev/null @@ -1,815 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "context" - "encoding/json" - "fmt" - "net/netip" - "sync" - "sync/atomic" - - cilium "github.com/cilium/proxy/go/cilium/api" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/crypto/certificatemanager" - "github.com/cilium/cilium/pkg/eventqueue" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/identity/cache" - k8sConst "github.com/cilium/cilium/pkg/k8s/apis/cilium.io" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/policy/api" -) - -// PolicyContext is an interface policy resolution functions use to access the Repository. -// This way testing code can run without mocking a full Repository. -type PolicyContext interface { - // return the namespace in which the policy rule is being resolved - GetNamespace() string - - // return the SelectorCache - GetSelectorCache() *SelectorCache - - // GetTLSContext resolves the given 'api.TLSContext' into CA - // certs and the public and private keys, using secrets from - // k8s or from the local file system. - GetTLSContext(tls *api.TLSContext) (ca, public, private string, err error) - - // GetEnvoyHTTPRules translates the given 'api.L7Rules' into - // the protobuf representation the Envoy can consume. The bool - // return parameter tells whether the the rule enforcement can - // be short-circuited upon the first allowing rule. This is - // false if any of the rules has side-effects, requiring all - // such rules being evaluated. - GetEnvoyHTTPRules(l7Rules *api.L7Rules) (*cilium.HttpNetworkPolicyRules, bool) - - // IsDeny returns true if the policy computation should be done for the - // policy deny case. This function returns different values depending on the - // code path as it can be changed during the policy calculation. - IsDeny() bool - - // SetDeny sets the Deny field of the PolicyContext and returns the old - // value stored. - SetDeny(newValue bool) (oldValue bool) -} - -type policyContext struct { - repo *Repository - ns string - // isDeny this field is set to true if the given policy computation should - // be done for the policy deny. - isDeny bool -} - -// GetNamespace() returns the namespace for the policy rule being resolved -func (p *policyContext) GetNamespace() string { - return p.ns -} - -// GetSelectorCache() returns the selector cache used by the Repository -func (p *policyContext) GetSelectorCache() *SelectorCache { - return p.repo.GetSelectorCache() -} - -// GetTLSContext() returns data for TLS Context via a CertificateManager -func (p *policyContext) GetTLSContext(tls *api.TLSContext) (ca, public, private string, err error) { - if p.repo.certManager == nil { - return "", "", "", fmt.Errorf("No Certificate Manager set on Policy Repository") - } - return p.repo.certManager.GetTLSContext(context.TODO(), tls, p.ns) -} - -func (p *policyContext) GetEnvoyHTTPRules(l7Rules *api.L7Rules) (*cilium.HttpNetworkPolicyRules, bool) { - return p.repo.GetEnvoyHTTPRules(l7Rules, p.ns) -} - -// IsDeny returns true if the policy computation should be done for the -// policy deny case. This function return different values depending on the -// code path as it can be changed during the policy calculation. -func (p *policyContext) IsDeny() bool { - return p.isDeny -} - -// SetDeny sets the Deny field of the PolicyContext and returns the old -// value stored. -func (p *policyContext) SetDeny(deny bool) bool { - oldDeny := p.isDeny - p.isDeny = deny - return oldDeny -} - -// Repository is a list of policy rules which in combination form the security -// policy. A policy repository can be -type Repository struct { - // Mutex protects the whole policy tree - Mutex lock.RWMutex - rules ruleSlice - - // rulesIndexByK8sUID indexes the rules by k8s UID. - rulesIndexByK8sUID map[string]*rule - - // revision is the revision of the policy repository. It will be - // incremented whenever the policy repository is changed. - // Always positive (>0). - revision atomic.Uint64 - - // RepositoryChangeQueue is a queue which serializes changes to the policy - // repository. - RepositoryChangeQueue *eventqueue.EventQueue - - // RuleReactionQueue is a queue which serializes the resultant events that - // need to occur after updating the state of the policy repository. This - // can include queueing endpoint regenerations, policy revision increments - // for endpoints, etc. - RuleReactionQueue *eventqueue.EventQueue - - // SelectorCache tracks the selectors used in the policies - // resolved from the repository. - selectorCache *SelectorCache - - // PolicyCache tracks the selector policies created from this repo - policyCache *PolicyCache - - certManager certificatemanager.CertificateManager - secretManager certificatemanager.SecretManager - - getEnvoyHTTPRules func(certificatemanager.SecretManager, *api.L7Rules, string) (*cilium.HttpNetworkPolicyRules, bool) -} - -// GetSelectorCache() returns the selector cache used by the Repository -func (p *Repository) GetSelectorCache() *SelectorCache { - return p.selectorCache -} - -// GetAuthTypes returns the AuthTypes required by the policy between the localID and remoteID -func (p *Repository) GetAuthTypes(localID, remoteID identity.NumericIdentity) AuthTypes { - return p.policyCache.GetAuthTypes(localID, remoteID) -} - -func (p *Repository) SetEnvoyRulesFunc(f func(certificatemanager.SecretManager, *api.L7Rules, string) (*cilium.HttpNetworkPolicyRules, bool)) { - p.getEnvoyHTTPRules = f -} - -func (p *Repository) GetEnvoyHTTPRules(l7Rules *api.L7Rules, ns string) (*cilium.HttpNetworkPolicyRules, bool) { - if p.getEnvoyHTTPRules == nil { - return nil, true - } - return p.getEnvoyHTTPRules(p.secretManager, l7Rules, ns) -} - -// GetPolicyCache() returns the policy cache used by the Repository -func (p *Repository) GetPolicyCache() *PolicyCache { - return p.policyCache -} - -// NewPolicyRepository creates a new policy repository. -func NewPolicyRepository( - idAllocator cache.IdentityAllocator, - idCache cache.IdentityCache, - certManager certificatemanager.CertificateManager, - secretManager certificatemanager.SecretManager, -) *Repository { - repo := NewStoppedPolicyRepository(idAllocator, idCache, certManager, secretManager) - repo.Start() - return repo -} - -// NewStoppedPolicyRepository creates a new policy repository without starting -// queues. -// -// Qeues must be allocated via [Repository.Start]. The function serves to -// satisfy hive invariants. -func NewStoppedPolicyRepository( - idAllocator cache.IdentityAllocator, - idCache cache.IdentityCache, - certManager certificatemanager.CertificateManager, - secretManager certificatemanager.SecretManager, -) *Repository { - selectorCache := NewSelectorCache(idAllocator, idCache) - repo := &Repository{ - rulesIndexByK8sUID: map[string]*rule{}, - selectorCache: selectorCache, - certManager: certManager, - secretManager: secretManager, - } - repo.revision.Store(1) - repo.policyCache = NewPolicyCache(repo, true) - return repo -} - -// traceState is an internal structure used to collect information -// while determining policy decision -type traceState struct { - // selectedRules is the number of rules with matching EndpointSelector - selectedRules int - - // matchedRules is the number of rules that have allowed traffic - matchedRules int - - // matchedDenyRules is the number of rules that have denied traffic - matchedDenyRules int - - // constrainedRules counts how many "FromRequires" constraints are - // unsatisfied - constrainedRules int - - // ruleID is the rule ID currently being evaluated - ruleID int -} - -func (state *traceState) trace(rules int, ctx *SearchContext) { - ctx.PolicyTrace("%d/%d rules selected\n", state.selectedRules, rules) - if state.constrainedRules > 0 { - ctx.PolicyTrace("Found unsatisfied FromRequires constraint\n") - } else { - if state.matchedRules > 0 { - ctx.PolicyTrace("Found allow rule\n") - } else { - ctx.PolicyTrace("Found no allow rule\n") - } - if state.matchedDenyRules > 0 { - ctx.PolicyTrace("Found deny rule\n") - } else { - ctx.PolicyTrace("Found no deny rule\n") - } - } -} - -// Start allocates and starts various queues used by the Repository. -// -// Must only be called if using [NewStoppedPolicyRepository] -func (p *Repository) Start() { - p.RepositoryChangeQueue = eventqueue.NewEventQueueBuffered("repository-change-queue", option.Config.PolicyQueueSize) - p.RuleReactionQueue = eventqueue.NewEventQueueBuffered("repository-reaction-queue", option.Config.PolicyQueueSize) - p.RepositoryChangeQueue.Run() - p.RuleReactionQueue.Run() -} - -// ResolveL4IngressPolicy resolves the L4 ingress policy for a set of endpoints -// by searching the policy repository for `PortRule` rules that are attached to -// a `Rule` where the EndpointSelector matches `ctx.To`. `ctx.From` takes no effect and -// is ignored in the search. If multiple `PortRule` rules are found, all rules -// are merged together. If rules contains overlapping port definitions, the first -// rule found in the repository takes precedence. -// -// TODO: Coalesce l7 rules? -// -// Caller must release resources by calling Detach() on the returned map! -// -// NOTE: This is only called from unit tests, but from multiple packages. -func (p *Repository) ResolveL4IngressPolicy(ctx *SearchContext) (L4PolicyMap, error) { - policyCtx := policyContext{ - repo: p, - ns: ctx.To.Get(labels.LabelSourceK8sKeyPrefix + k8sConst.PodNamespaceLabel), - } - result, err := p.rules.resolveL4IngressPolicy(&policyCtx, ctx) - if err != nil { - return nil, err - } - - return result, nil -} - -// ResolveL4EgressPolicy resolves the L4 egress policy for a set of endpoints -// by searching the policy repository for `PortRule` rules that are attached to -// a `Rule` where the EndpointSelector matches `ctx.From`. `ctx.To` takes no effect and -// is ignored in the search. If multiple `PortRule` rules are found, all rules -// are merged together. If rules contains overlapping port definitions, the first -// rule found in the repository takes precedence. -// -// Caller must release resources by calling Detach() on the returned map! -// -// NOTE: This is only called from unit tests, but from multiple packages. -func (p *Repository) ResolveL4EgressPolicy(ctx *SearchContext) (L4PolicyMap, error) { - policyCtx := policyContext{ - repo: p, - ns: ctx.From.Get(labels.LabelSourceK8sKeyPrefix + k8sConst.PodNamespaceLabel), - } - result, err := p.rules.resolveL4EgressPolicy(&policyCtx, ctx) - - if err != nil { - return nil, err - } - - return result, nil -} - -// AllowsIngressRLocked evaluates the policy repository for the provided search -// context and returns the verdict for ingress. If no matching policy allows for -// the connection, the request will be denied. The policy repository mutex must -// be held. -// -// NOTE: This is only called from unit tests, but from multiple packages. -func (p *Repository) AllowsIngressRLocked(ctx *SearchContext) api.Decision { - // Lack of DPorts in the SearchContext means L3-only search - if len(ctx.DPorts) == 0 { - newCtx := *ctx - newCtx.DPorts = []*models.Port{{ - Port: 0, - Protocol: models.PortProtocolANY, - }} - ctx = &newCtx - } - - ctx.PolicyTrace("Tracing %s", ctx.String()) - ingressPolicy, err := p.ResolveL4IngressPolicy(ctx) - if err != nil { - log.WithError(err).Warn("Evaluation error while resolving L4 ingress policy") - } - - verdict := api.Denied - if err == nil && len(ingressPolicy) > 0 { - verdict = ingressPolicy.IngressCoversContext(ctx) - } - - ctx.PolicyTrace("Ingress verdict: %s", verdict.String()) - ingressPolicy.Detach(p.GetSelectorCache()) - - return verdict -} - -// AllowsEgressRLocked evaluates the policy repository for the provided search -// context and returns the verdict. If no matching policy allows for the -// connection, the request will be denied. The policy repository mutex must be -// held. -// -// NOTE: This is only called from unit tests, but from multiple packages. -func (p *Repository) AllowsEgressRLocked(ctx *SearchContext) api.Decision { - // Lack of DPorts in the SearchContext means L3-only search - if len(ctx.DPorts) == 0 { - newCtx := *ctx - newCtx.DPorts = []*models.Port{{ - Port: 0, - Protocol: models.PortProtocolANY, - }} - ctx = &newCtx - } - - ctx.PolicyTrace("Tracing %s\n", ctx.String()) - egressPolicy, err := p.ResolveL4EgressPolicy(ctx) - if err != nil { - log.WithError(err).Warn("Evaluation error while resolving L4 egress policy") - } - verdict := api.Denied - if err == nil && len(egressPolicy) > 0 { - verdict = egressPolicy.EgressCoversContext(ctx) - } - - ctx.PolicyTrace("Egress verdict: %s", verdict.String()) - egressPolicy.Detach(p.GetSelectorCache()) - return verdict -} - -// SearchRLocked searches the policy repository for rules which match the -// specified labels and will return an array of all rules which matched. -func (p *Repository) SearchRLocked(lbls labels.LabelArray) api.Rules { - result := api.Rules{} - - if uid := lbls.Get(labels.LabelSourceK8sKeyPrefix + k8sConst.PolicyLabelUID); uid != "" { - r, ok := p.rulesIndexByK8sUID[uid] - if ok { - result = append(result, &r.Rule) - } - return result - } - for _, r := range p.rules { - if r.Labels.Contains(lbls) { - result = append(result, &r.Rule) - } - } - - return result -} - -// Add inserts a rule into the policy repository -// This is just a helper function for unit testing. -// TODO: this should be in a test_helpers.go file or something similar -// so we can clearly delineate what helpers are for testing. -// NOTE: This is only called from unit tests, but from multiple packages. -func (p *Repository) Add(r api.Rule) (uint64, map[uint16]struct{}, error) { - p.Mutex.Lock() - defer p.Mutex.Unlock() - - if err := r.Sanitize(); err != nil { - return p.GetRevision(), nil, err - } - - newList := make([]*api.Rule, 1) - newList[0] = &r - _, rev := p.AddListLocked(newList) - return rev, map[uint16]struct{}{}, nil -} - -// AddListLocked inserts a rule into the policy repository with the repository already locked -// Expects that the entire rule list has already been sanitized. -func (p *Repository) AddListLocked(rules api.Rules) (ruleSlice, uint64) { - - newList := make(ruleSlice, len(rules)) - for i := range rules { - newRule := &rule{ - Rule: *rules[i], - metadata: newRuleMetadata(), - } - newList[i] = newRule - if uid := rules[i].Labels.Get(labels.LabelSourceK8sKeyPrefix + k8sConst.PolicyLabelUID); uid != "" { - p.rulesIndexByK8sUID[uid] = newRule - } - } - - p.rules = append(p.rules, newList...) - p.BumpRevision() - metrics.Policy.Add(float64(len(newList))) - return newList, p.GetRevision() -} - -// removeIdentityFromRuleCaches removes the identity from the selector cache -// in each rule in the repository. -// -// Returns a sync.WaitGroup that blocks until the policy operation is complete. -// The repository read lock must be held until the waitgroup is complete. -func (p *Repository) removeIdentityFromRuleCaches(identity *identity.Identity) *sync.WaitGroup { - var wg sync.WaitGroup - wg.Add(len(p.rules)) - for _, r := range p.rules { - go func(rr *rule, wgg *sync.WaitGroup) { - rr.metadata.delete(identity) - wgg.Done() - }(r, &wg) - } - return &wg -} - -// LocalEndpointIdentityAdded handles local identity add events. -func (p *Repository) LocalEndpointIdentityAdded(*identity.Identity) { - // no-op for now. -} - -// LocalEndpointIdentityRemoved handles local identity removal events to -// remove references from rules in the repository to the specified identity. -func (p *Repository) LocalEndpointIdentityRemoved(identity *identity.Identity) { - go func() { - scopedLog := log.WithField(logfields.Identity, identity) - scopedLog.Debug("Removing identity references from policy cache") - p.Mutex.RLock() - wg := p.removeIdentityFromRuleCaches(identity) - wg.Wait() - p.Mutex.RUnlock() - scopedLog.Debug("Finished cleaning policy cache") - }() -} - -// AddList inserts a rule into the policy repository. It is used for -// unit-testing purposes only. -func (p *Repository) AddList(rules api.Rules) (ruleSlice, uint64) { - p.Mutex.Lock() - defer p.Mutex.Unlock() - return p.AddListLocked(rules) -} - -// Iterate iterates the policy repository, calling f for each rule. It is safe -// to execute Iterate concurrently. -func (p *Repository) Iterate(f func(rule *api.Rule)) { - p.Mutex.RWMutex.Lock() - defer p.Mutex.RWMutex.Unlock() - for _, r := range p.rules { - f(&r.Rule) - } -} - -// UpdateRulesEndpointsCaches updates the caches within each rule in r that -// specify whether the rule selects the endpoints in eps. If any rule matches -// the endpoints, it is added to the provided IDSet, and removed from the -// provided EndpointSet. The provided WaitGroup is signaled for a given endpoint -// when it is finished being processed. -func (r ruleSlice) UpdateRulesEndpointsCaches(endpointsToBumpRevision, endpointsToRegenerate *EndpointSet, policySelectionWG *sync.WaitGroup) { - endpointsToBumpRevision.ForEachGo(policySelectionWG, func(epp Endpoint) { - endpointSelected, err := r.updateEndpointsCaches(epp) - if endpointSelected { - endpointsToRegenerate.Insert(epp) - } - // If we could not evaluate the rules against the current endpoint, or - // the endpoint is selected by the rules, remove it from the set of - // endpoints to bump the revision. If the error is non-nil, the - // endpoint is no longer in either set (endpointsToBumpRevision or - // endpointsToRegenerate, as we could not determine what to do for the - // endpoint). This is usually the case when the endpoint is no longer - // alive (i.e., it has been marked to be deleted). - if endpointSelected || err != nil { - if err != nil { - log.WithError(err).Debug("could not determine whether endpoint was selected by rule") - } - endpointsToBumpRevision.Delete(epp) - } - }) -} - -// DeleteByLabelsLocked deletes all rules in the policy repository which -// contain the specified labels. Returns the revision of the policy repository -// after deleting the rules, as well as now many rules were deleted. -func (p *Repository) DeleteByLabelsLocked(lbls labels.LabelArray) (ruleSlice, uint64, int) { - - deleted := 0 - new := p.rules[:0] - deletedRules := ruleSlice{} - - for _, r := range p.rules { - if !r.Labels.Contains(lbls) { - new = append(new, r) - } else { - deletedRules = append(deletedRules, r) - deleted++ - } - } - - if deleted > 0 { - p.BumpRevision() - p.rules = new - if uid := lbls.Get(labels.LabelSourceK8sKeyPrefix + k8sConst.PolicyLabelUID); uid != "" { - delete(p.rulesIndexByK8sUID, uid) - } - metrics.Policy.Sub(float64(deleted)) - } - - return deletedRules, p.GetRevision(), deleted -} - -// DeleteByLabels deletes all rules in the policy repository which contain the -// specified labels -func (p *Repository) DeleteByLabels(lbls labels.LabelArray) (uint64, int) { - p.Mutex.Lock() - defer p.Mutex.Unlock() - _, rev, numDeleted := p.DeleteByLabelsLocked(lbls) - return rev, numDeleted -} - -// JSONMarshalRules returns a slice of policy rules as string in JSON -// representation -func JSONMarshalRules(rules api.Rules) string { - b, err := json.MarshalIndent(rules, "", " ") - if err != nil { - return err.Error() - } - return string(b) -} - -// GetJSON returns all rules of the policy repository as string in JSON -// representation -func (p *Repository) GetJSON() string { - p.Mutex.RLock() - defer p.Mutex.RUnlock() - - result := api.Rules{} - for _, r := range p.rules { - result = append(result, &r.Rule) - } - - return JSONMarshalRules(result) -} - -// GetRulesMatching returns whether any of the rules in a repository contain a -// rule with labels matching the labels in the provided LabelArray. -// -// Must be called with p.Mutex held -func (p *Repository) GetRulesMatching(lbls labels.LabelArray) (ingressMatch bool, egressMatch bool) { - ingressMatch = false - egressMatch = false - for _, r := range p.rules { - rulesMatch := r.getSelector().Matches(lbls) - if rulesMatch { - if len(r.Ingress) > 0 { - ingressMatch = true - } - if len(r.IngressDeny) > 0 { - ingressMatch = true - } - if len(r.Egress) > 0 { - egressMatch = true - } - if len(r.EgressDeny) > 0 { - egressMatch = true - } - } - - if ingressMatch && egressMatch { - return - } - } - return -} - -// getMatchingRules returns whether any of the rules in a repository contain a -// rule with labels matching the given security identity, as well as -// a slice of all rules which match. -// -// Must be called with p.Mutex held -func (p *Repository) getMatchingRules(securityIdentity *identity.Identity) ( - ingressMatch, egressMatch bool, - matchingRules ruleSlice) { - - matchingRules = []*rule{} - for _, r := range p.rules { - isNode := securityIdentity.ID == identity.ReservedIdentityHost - selectsNode := r.NodeSelector.LabelSelector != nil - if selectsNode != isNode { - continue - } - if ruleMatches := r.matches(securityIdentity); ruleMatches { - // Don't need to update whether ingressMatch is true if it already - // has been determined to be true - allows us to not have to check - // lenth of slice. - if !ingressMatch { - ingressMatch = len(r.Ingress) > 0 || len(r.IngressDeny) > 0 - } - if !egressMatch { - egressMatch = len(r.Egress) > 0 || len(r.EgressDeny) > 0 - } - matchingRules = append(matchingRules, r) - } - } - return -} - -// NumRules returns the amount of rules in the policy repository. -// -// Must be called with p.Mutex held -func (p *Repository) NumRules() int { - return len(p.rules) -} - -// GetRevision returns the revision of the policy repository -func (p *Repository) GetRevision() uint64 { - return p.revision.Load() -} - -// Empty returns 'true' if repository has no rules, 'false' otherwise. -// -// Must be called without p.Mutex held -func (p *Repository) Empty() bool { - p.Mutex.Lock() - defer p.Mutex.Unlock() - return p.NumRules() == 0 -} - -// TranslationResult contains the results of the rule translation -type TranslationResult struct { - // NumToServicesRules is the number of ToServices rules processed while - // translating the rules - NumToServicesRules int - - // BackendPrefixes contains all egress CIDRs that are to be added - // for the translation. - PrefixesToAdd []netip.Prefix - - // BackendPrefixes contains all egress CIDRs that are to be removed - // for the translation. - PrefixesToRelease []netip.Prefix -} - -// TranslateRules traverses rules and applies provided translator to rules -// -// Note: Only used by the k8s watcher. -func (p *Repository) TranslateRules(translator Translator) (*TranslationResult, error) { - p.Mutex.Lock() - defer p.Mutex.Unlock() - - result := &TranslationResult{} - - for ruleIndex := range p.rules { - if err := translator.Translate(&p.rules[ruleIndex].Rule, result); err != nil { - return nil, err - } - } - return result, nil -} - -// BumpRevision allows forcing policy regeneration -func (p *Repository) BumpRevision() { - metrics.PolicyRevision.Inc() - p.revision.Add(1) -} - -// GetRulesList returns the current policy -func (p *Repository) GetRulesList() *models.Policy { - p.Mutex.RLock() - defer p.Mutex.RUnlock() - - lbls := labels.ParseSelectLabelArrayFromArray([]string{}) - ruleList := p.SearchRLocked(lbls) - - return &models.Policy{ - Revision: int64(p.GetRevision()), - Policy: JSONMarshalRules(ruleList), - } -} - -// resolvePolicyLocked returns the selectorPolicy for the provided -// identity from the set of rules in the repository. If the policy -// cannot be generated due to conflicts at L4 or L7, returns an error. -// -// Must be performed while holding the Repository lock. -func (p *Repository) resolvePolicyLocked(securityIdentity *identity.Identity) (*selectorPolicy, error) { - // First obtain whether policy applies in both traffic directions, as well - // as list of rules which actually select this endpoint. This allows us - // to not have to iterate through the entire rule list multiple times and - // perform the matching decision again when computing policy for each - // protocol layer, which is quite costly in terms of performance. - ingressEnabled, egressEnabled, - matchingRules := - p.computePolicyEnforcementAndRules(securityIdentity) - - calculatedPolicy := &selectorPolicy{ - Revision: p.GetRevision(), - SelectorCache: p.GetSelectorCache(), - L4Policy: NewL4Policy(p.GetRevision()), - IngressPolicyEnabled: ingressEnabled, - EgressPolicyEnabled: egressEnabled, - } - - lbls := securityIdentity.LabelArray - ingressCtx := SearchContext{ - To: lbls, - rulesSelect: true, - } - - egressCtx := SearchContext{ - From: lbls, - rulesSelect: true, - } - - if option.Config.TracingEnabled() { - ingressCtx.Trace = TRACE_ENABLED - egressCtx.Trace = TRACE_ENABLED - } - - policyCtx := policyContext{ - repo: p, - ns: lbls.Get(labels.LabelSourceK8sKeyPrefix + k8sConst.PodNamespaceLabel), - } - - if ingressEnabled { - newL4IngressPolicy, err := matchingRules.resolveL4IngressPolicy(&policyCtx, &ingressCtx) - if err != nil { - return nil, err - } - calculatedPolicy.L4Policy.Ingress.PortRules = newL4IngressPolicy - } - - if egressEnabled { - newL4EgressPolicy, err := matchingRules.resolveL4EgressPolicy(&policyCtx, &egressCtx) - if err != nil { - return nil, err - } - calculatedPolicy.L4Policy.Egress.PortRules = newL4EgressPolicy - } - - // Make the calculated policy ready for incremental updates - calculatedPolicy.Attach(&policyCtx) - - return calculatedPolicy, nil -} - -// computePolicyEnforcementAndRules returns whether policy applies at ingress or ingress -// for the given security identity, as well as a list of any rules which select -// the set of labels of the given security identity. -// -// Must be called with repo mutex held for reading. -func (p *Repository) computePolicyEnforcementAndRules(securityIdentity *identity.Identity) ( - ingress, egress bool, - matchingRules ruleSlice, -) { - lbls := securityIdentity.LabelArray - - // Check if policy enforcement should be enabled at the daemon level. - if lbls.Has(labels.IDNameHost) && !option.Config.EnableHostFirewall { - return false, false, nil - } - switch GetPolicyEnabled() { - case option.AlwaysEnforce: - _, _, matchingRules = p.getMatchingRules(securityIdentity) - // If policy enforcement is enabled for the daemon, then it has to be - // enabled for the endpoint. - return true, true, matchingRules - case option.DefaultEnforcement: - ingress, egress, matchingRules = p.getMatchingRules(securityIdentity) - // If the endpoint has the reserved:init label, i.e. if it has not yet - // received any labels, always enforce policy (default deny). - if lbls.Has(labels.IDNameInit) { - return true, true, matchingRules - } - - // Default mode means that if rules contain labels that match this - // endpoint, then enable policy enforcement for this endpoint. - return ingress, egress, matchingRules - default: - // If policy enforcement isn't enabled, we do not enable policy - // enforcement for the endpoint. We don't care about returning any - // rules that match. - return false, false, nil - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/resolve.go b/vendor/github.com/cilium/cilium/pkg/policy/resolve.go deleted file mode 100644 index 7fdfac8156e..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/resolve.go +++ /dev/null @@ -1,304 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/policy/trafficdirection" -) - -// selectorPolicy is a structure which contains the resolved policy for a -// particular Identity across all layers (L3, L4, and L7), with the policy -// still determined in terms of EndpointSelectors. -type selectorPolicy struct { - // Revision is the revision of the policy repository used to generate - // this selectorPolicy. - Revision uint64 - - // SelectorCache managing selectors in L4Policy - SelectorCache *SelectorCache - - // L4Policy contains the computed L4 and L7 policy. - L4Policy L4Policy - - // IngressPolicyEnabled specifies whether this policy contains any policy - // at ingress. - IngressPolicyEnabled bool - - // EgressPolicyEnabled specifies whether this policy contains any policy - // at egress. - EgressPolicyEnabled bool -} - -func (p *selectorPolicy) Attach(ctx PolicyContext) { - p.L4Policy.Attach(ctx) -} - -// EndpointPolicy is a structure which contains the resolved policy across all -// layers (L3, L4, and L7), distilled against a set of identities. -type EndpointPolicy struct { - // Note that all Endpoints sharing the same identity will be - // referring to a shared selectorPolicy! - *selectorPolicy - - // policyMapState contains the state of this policy as it relates to the - // datapath. In the future, this will be factored out of this object to - // decouple the policy as it relates to the datapath vs. its userspace - // representation. - // It maps each Key to the proxy port if proxy redirection is needed. - // Proxy port 0 indicates no proxy redirection. - // All fields within the Key and the proxy port must be in host byte-order. - // Must only be accessed with PolicyOwner (aka Endpoint) lock taken. - policyMapState MapState - - // policyMapChanges collects pending changes to the PolicyMapState - policyMapChanges MapChanges - - // PolicyOwner describes any type which consumes this EndpointPolicy object. - PolicyOwner PolicyOwner -} - -// PolicyOwner is anything which consumes a EndpointPolicy. -type PolicyOwner interface { - GetID() uint64 - LookupRedirectPortBuildLocked(ingress bool, protocol string, port uint16) uint16 - HasBPFPolicyMap() bool - GetNamedPort(ingress bool, name string, proto uint8) uint16 - PolicyDebug(fields logrus.Fields, msg string) -} - -// newSelectorPolicy returns an empty selectorPolicy stub. -func newSelectorPolicy(selectorCache *SelectorCache) *selectorPolicy { - return &selectorPolicy{ - Revision: 0, - SelectorCache: selectorCache, - L4Policy: NewL4Policy(0), - } -} - -// insertUser adds a user to the L4Policy so that incremental -// updates of the L4Policy may be fowarded. -func (p *selectorPolicy) insertUser(user *EndpointPolicy) { - p.L4Policy.insertUser(user) -} - -// removeUser removes a user from the L4Policy so the EndpointPolicy -// can be freed when not needed any more -func (p *selectorPolicy) removeUser(user *EndpointPolicy) { - p.L4Policy.removeUser(user) -} - -// Detach releases resources held by a selectorPolicy to enable -// successful eventual GC. Note that the selectorPolicy itself if not -// modified in any way, so that it can be used concurrently. -func (p *selectorPolicy) Detach() { - p.L4Policy.Detach(p.SelectorCache) -} - -// DistillPolicy filters down the specified selectorPolicy (which acts -// upon selectors) into a set of concrete map entries based on the -// SelectorCache. These can subsequently be plumbed into the datapath. -// -// Called without holding the Selector cache or Repository locks. -// PolicyOwner (aka Endpoint) is also unlocked during this call, -// but the Endpoint's build mutex is held. -func (p *selectorPolicy) DistillPolicy(policyOwner PolicyOwner, isHost bool) *EndpointPolicy { - calculatedPolicy := &EndpointPolicy{ - selectorPolicy: p, - policyMapState: NewMapState(nil), - PolicyOwner: policyOwner, - } - - if !p.IngressPolicyEnabled || !p.EgressPolicyEnabled { - calculatedPolicy.policyMapState.allowAllIdentities( - !p.IngressPolicyEnabled, !p.EgressPolicyEnabled) - } - - // Register the new EndpointPolicy as a receiver of delta - // updates. Any updates happening after this, but before - // computeDesiredL4PolicyMapEntries() call finishes may - // already be applied to the PolicyMapState, specifically: - // - // - policyMapChanges may contain an addition of an entry that - // is already added to the PolicyMapState - // - // - policyMapChanges may contain a deletion of an entry that - // has already been deleted from PolicyMapState - p.insertUser(calculatedPolicy) - - // Must come after the 'insertUser()' above to guarantee - // PolicyMapChanges will contain all changes that are applied - // after the computation of PolicyMapState has started. - p.SelectorCache.mutex.RLock() - calculatedPolicy.toMapState() - if !isHost { - calculatedPolicy.policyMapState.determineAllowLocalhostIngress() - } - p.SelectorCache.mutex.RUnlock() - - return calculatedPolicy -} - -// GetPolicyMap gets the policy map state as the interface -// MapState -func (p *EndpointPolicy) GetPolicyMap() MapState { - return p.policyMapState -} - -// SetPolicyMap sets the policy map state as the interface -// MapState. If the main argument is nil, then this method -// will initialize a new MapState object for the caller. -func (p *EndpointPolicy) SetPolicyMap(ms MapState) { - if ms == nil { - p.policyMapState = NewMapState(nil) - return - } - p.policyMapState = ms -} - -// Detach removes EndpointPolicy references from selectorPolicy -// to allow the EndpointPolicy to be GC'd. -// PolicyOwner (aka Endpoint) is also locked during this call. -func (p *EndpointPolicy) Detach() { - p.selectorPolicy.removeUser(p) -} - -// toMapState transforms the EndpointPolicy.L4Policy into -// the datapath-friendly format inside EndpointPolicy.PolicyMapState. -// Called with selectorcache locked for reading. -// Called without holding the Repository lock. -// PolicyOwner (aka Endpoint) is also unlocked during this call, -// but the Endpoint's build mutex is held. -func (p *EndpointPolicy) toMapState() { - p.L4Policy.Ingress.toMapState(p) - p.L4Policy.Egress.toMapState(p) -} - -// toMapState transforms the L4DirectionPolicy into -// the datapath-friendly format inside EndpointPolicy.PolicyMapState. -// Called with selectorcache locked for reading. -// Called without holding the Repository lock. -// PolicyOwner (aka Endpoint) is also unlocked during this call, -// but the Endpoint's build mutex is held. -func (l4policy L4DirectionPolicy) toMapState(p *EndpointPolicy) { - for _, l4 := range l4policy.PortRules { - lookupDone := false - proxyport := uint16(0) - l4.toMapState(p, l4policy.features, func(keyFromFilter Key, entry *MapStateEntry) bool { - // Fix up the proxy port for entries that need proxy redirection - if entry.IsRedirectEntry() { - if !lookupDone { - // only lookup once for each filter - // Use 'destPort' from the key as it is already resolved - // from a named port if needed. - proxyport = p.PolicyOwner.LookupRedirectPortBuildLocked(l4.Ingress, string(l4.Protocol), keyFromFilter.DestPort) - lookupDone = true - } - entry.ProxyPort = proxyport - // If the currently allocated proxy port is 0, this is a new - // redirect, for which no port has been allocated yet. Ignore - // it for now. This will be configured by - // UpdateRedirects() once the port has been allocated. - if !entry.IsRedirectEntry() { - return false - } - } - return true - }, ChangeState{}) - } -} - -type getProxyPortFunc func(*L4Filter) (proxyPort uint16, ok bool) - -// UpdateRedirects updates redirects in the EndpointPolicy's PolicyMapState by using the provided -// function to obtain a proxy port number to use. Changes to 'p.PolicyMapState' are collected in -// 'adds' and 'updated' so that they can be reverted when needed. -func (p *EndpointPolicy) UpdateRedirects(ingress bool, getProxyPort getProxyPortFunc, changes ChangeState) { - l4policy := &p.L4Policy.Ingress - if ingress { - l4policy = &p.L4Policy.Egress - } - - l4policy.updateRedirects(p, getProxyPort, changes) -} - -func (l4policy L4DirectionPolicy) updateRedirects(p *EndpointPolicy, getProxyPort getProxyPortFunc, changes ChangeState) { - // Selectorcache needs to be locked for toMapState (GetLabels()) call - p.SelectorCache.mutex.RLock() - defer p.SelectorCache.mutex.RUnlock() - - for _, l4 := range l4policy.PortRules { - if l4.IsRedirect() { - // Check if we are denying this specific L4 first regardless the L3, if there are any deny policies - if l4policy.features.contains(denyRules) && p.policyMapState.deniesL4(p.PolicyOwner, l4) { - continue - } - - redirectPort, ok := getProxyPort(l4) - if !ok { - continue - } - - // Set the proxy port in the policy map. - l4.toMapState(p, l4policy.features, func(_ Key, entry *MapStateEntry) bool { - if entry.IsRedirectEntry() { - entry.ProxyPort = redirectPort - } - return true - }, changes) - } - } -} - -// ConsumeMapChanges transfers the changes from MapChanges to the caller, -// locking the selector cache to make sure concurrent identity updates -// have completed. -// PolicyOwner (aka Endpoint) is also locked during this call. -func (p *EndpointPolicy) ConsumeMapChanges() (adds, deletes Keys) { - p.selectorPolicy.SelectorCache.mutex.Lock() - defer p.selectorPolicy.SelectorCache.mutex.Unlock() - features := p.selectorPolicy.L4Policy.Ingress.features | p.selectorPolicy.L4Policy.Egress.features - return p.policyMapChanges.consumeMapChanges(p.policyMapState, features, p.SelectorCache) -} - -// AllowsIdentity returns whether the specified policy allows -// ingress and egress traffic for the specified numeric security identity. -// If the 'secID' is zero, it will check if all traffic is allowed. -// -// Returning true for either return value indicates all traffic is allowed. -func (p *EndpointPolicy) AllowsIdentity(identity identity.NumericIdentity) (ingress, egress bool) { - key := Key{ - Identity: uint32(identity), - } - - if !p.IngressPolicyEnabled { - ingress = true - } else { - key.TrafficDirection = trafficdirection.Ingress.Uint8() - if v, exists := p.policyMapState.Get(key); exists && !v.IsDeny { - ingress = true - } - } - - if !p.EgressPolicyEnabled { - egress = true - } else { - key.TrafficDirection = trafficdirection.Egress.Uint8() - if v, exists := p.policyMapState.Get(key); exists && !v.IsDeny { - egress = true - } - } - - return ingress, egress -} - -// NewEndpointPolicy returns an empty EndpointPolicy stub. -func NewEndpointPolicy(repo *Repository) *EndpointPolicy { - return &EndpointPolicy{ - selectorPolicy: newSelectorPolicy(repo.GetSelectorCache()), - policyMapState: NewMapState(nil), - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/rule.go b/vendor/github.com/cilium/cilium/pkg/policy/rule.go deleted file mode 100644 index b1e19e640b8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/rule.go +++ /dev/null @@ -1,794 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "fmt" - "strconv" - "strings" - - "github.com/cilium/proxy/pkg/policy/api/kafka" - - "github.com/cilium/cilium/pkg/identity" - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/policy/api" -) - -type rule struct { - api.Rule - - metadata *ruleMetadata -} - -type ruleMetadata struct { - // mutex protects all fields in this type. - Mutex lock.Mutex - - // IdentitySelected is a cache that maps from an identity to whether - // this rule selects that identity. - IdentitySelected map[identity.NumericIdentity]bool -} - -func newRuleMetadata() *ruleMetadata { - return &ruleMetadata{ - IdentitySelected: make(map[identity.NumericIdentity]bool), - } -} - -func (m *ruleMetadata) delete(identity *identity.Identity) { - m.Mutex.Lock() - defer m.Mutex.Unlock() - delete(m.IdentitySelected, identity.ID) -} - -func (r *rule) String() string { - return r.EndpointSelector.String() -} - -func (r *rule) getSelector() *api.EndpointSelector { - if r.NodeSelector.LabelSelector != nil { - return &r.NodeSelector - } - return &r.EndpointSelector -} - -func (epd *PerSelectorPolicy) appendL7WildcardRule(ctx *SearchContext) api.L7Rules { - // Wildcard rule only needs to be appended if some rules already exist - switch { - case len(epd.L7Rules.HTTP) > 0: - rule := api.PortRuleHTTP{} - if !rule.Exists(epd.L7Rules) { - ctx.PolicyTrace(" Merging HTTP wildcard rule: %+v\n", rule) - epd.L7Rules.HTTP = append(epd.L7Rules.HTTP, rule) - } else { - ctx.PolicyTrace(" Merging HTTP wildcard rule, equal rule already exists: %+v\n", rule) - } - case len(epd.L7Rules.Kafka) > 0: - rule := kafka.PortRule{} - rule.Sanitize() - if !rule.Exists(epd.L7Rules.Kafka) { - ctx.PolicyTrace(" Merging Kafka wildcard rule: %+v\n", rule) - epd.L7Rules.Kafka = append(epd.L7Rules.Kafka, rule) - } else { - ctx.PolicyTrace(" Merging Kafka wildcard rule, equal rule already exists: %+v\n", rule) - } - case len(epd.L7Rules.DNS) > 0: - // Wildcarding at L7 for DNS is specified via allowing all via - // MatchPattern! - rule := api.PortRuleDNS{MatchPattern: "*"} - rule.Sanitize() - if !rule.Exists(epd.L7Rules) { - ctx.PolicyTrace(" Merging DNS wildcard rule: %+v\n", rule) - epd.L7Rules.DNS = append(epd.L7Rules.DNS, rule) - } else { - ctx.PolicyTrace(" Merging DNS wildcard rule, equal rule already exists: %+v\n", rule) - } - case epd.L7Rules.L7Proto != "" && len(epd.L7Rules.L7) > 0: - rule := api.PortRuleL7{} - if !rule.Exists(epd.L7Rules) { - ctx.PolicyTrace(" Merging L7 wildcard rule: %+v\n", rule) - epd.L7Rules.L7 = append(epd.L7Rules.L7, rule) - } else { - ctx.PolicyTrace(" Merging L7 wildcard rule, equal rule already exists: %+v\n", rule) - } - } - return epd.L7Rules -} - -func mergePortProto(ctx *SearchContext, existingFilter, filterToMerge *L4Filter, selectorCache *SelectorCache) (err error) { - // Merge the L7-related data from the filter to merge - // with the L7-related data already in the existing filter. - existingFilter.L7Parser, err = existingFilter.L7Parser.Merge(filterToMerge.L7Parser) - if err != nil { - ctx.PolicyTrace(" Merge conflict: mismatching parsers %s/%s\n", filterToMerge.L7Parser, existingFilter.L7Parser) - return err - } - - if existingFilter.Listener == "" || filterToMerge.Listener == "" { - if filterToMerge.Listener != "" { - existingFilter.Listener = filterToMerge.Listener - } - } else if filterToMerge.Listener != existingFilter.Listener { - ctx.PolicyTrace(" Merge conflict: mismatching CiliumEnvoyConfig listeners %v/%v\n", filterToMerge.Listener, existingFilter.Listener) - return fmt.Errorf("cannot merge conflicting CiliumEnvoyConfig Listeners (%v/%v)", filterToMerge.Listener, existingFilter.Listener) - } - - for cs, newL7Rules := range filterToMerge.PerSelectorPolicies { - // 'cs' will be merged or moved (see below), either way it needs - // to be removed from the map it is in now. - delete(filterToMerge.PerSelectorPolicies, cs) - - if l7Rules, ok := existingFilter.PerSelectorPolicies[cs]; ok { - // existing filter already has 'cs', release and merge L7 rules - selectorCache.RemoveSelector(cs, filterToMerge) - - // skip merging for reserved:none, as it is never - // selected, and toFQDN rules currently translate to - // reserved:none as an endpoint selector, causing a - // merge conflict for different toFQDN destinations - // with different TLS contexts. - if cs.IsNone() { - continue - } - - if l7Rules.Equal(newL7Rules) { - continue // identical rules need no merging - } - - // Merge two non-identical sets of non-nil rules - if l7Rules != nil && l7Rules.IsDeny { - // If existing rule is deny then it's a no-op - // Denies takes priority over any rule. - continue - } else if newL7Rules != nil && newL7Rules.IsDeny { - // Overwrite existing filter if the new rule is a deny case - // Denies takes priority over any rule. - existingFilter.PerSelectorPolicies[cs] = newL7Rules - continue - } - - // One of the rules may be a nil rule, expand it to an empty non-nil rule - if l7Rules == nil { - l7Rules = &PerSelectorPolicy{} - } - if newL7Rules == nil { - newL7Rules = &PerSelectorPolicy{} - } - - // Merge isRedirect flag - l7Rules.isRedirect = l7Rules.isRedirect || newL7Rules.isRedirect - - if l7Rules.Authentication == nil || newL7Rules.Authentication == nil { - if newL7Rules.Authentication != nil { - l7Rules.Authentication = newL7Rules.Authentication - } - } else if !newL7Rules.Authentication.DeepEqual(l7Rules.Authentication) { - ctx.PolicyTrace(" Merge conflict: mismatching auth types %s/%s\n", newL7Rules.Authentication.Mode, l7Rules.Authentication.Mode) - return fmt.Errorf("cannot merge conflicting authentication types (%s/%s)", newL7Rules.Authentication.Mode, l7Rules.Authentication.Mode) - } - - if l7Rules.TerminatingTLS == nil || newL7Rules.TerminatingTLS == nil { - if newL7Rules.TerminatingTLS != nil { - l7Rules.TerminatingTLS = newL7Rules.TerminatingTLS - } - } else if !newL7Rules.TerminatingTLS.Equal(l7Rules.TerminatingTLS) { - ctx.PolicyTrace(" Merge conflict: mismatching terminating TLS contexts %v/%v\n", newL7Rules.TerminatingTLS, l7Rules.TerminatingTLS) - return fmt.Errorf("cannot merge conflicting terminating TLS contexts for cached selector %s: (%v/%v)", cs.String(), newL7Rules.TerminatingTLS, l7Rules.TerminatingTLS) - } - if l7Rules.OriginatingTLS == nil || newL7Rules.OriginatingTLS == nil { - if newL7Rules.OriginatingTLS != nil { - l7Rules.OriginatingTLS = newL7Rules.OriginatingTLS - } - } else if !newL7Rules.OriginatingTLS.Equal(l7Rules.OriginatingTLS) { - ctx.PolicyTrace(" Merge conflict: mismatching originating TLS contexts %v/%v\n", newL7Rules.OriginatingTLS, l7Rules.OriginatingTLS) - return fmt.Errorf("cannot merge conflicting originating TLS contexts for cached selector %s: (%v/%v)", cs.String(), newL7Rules.OriginatingTLS, l7Rules.OriginatingTLS) - } - - // For now we simply merge the set of allowed SNIs from different rules - // to/from the *same remote*, port, and protocol. This means that if any - // rule requires SNI, then all traffic to that remote/port requires TLS, - // even if other merged rules would be fine without TLS. Any SNI from all - // applicable rules is allowed. - // - // Preferably we could allow different rules for each SNI, but for now the - // combination of all L7 rules is allowed for all the SNIs. For example, if - // SNI and TLS termination are used together so that L7 filtering is - // possible, in this example: - // - // - existing: SNI: public.example.com - // - new: SNI: private.example.com HTTP: path="/public" - // - // Separately, these rule allow access to all paths at SNI - // public.example.com and path private.example.com/public, but currently we - // allow all paths also at private.example.com. This may be clamped down if - // there is sufficient demand for SNI and TLS termination together. - // - // Note however that SNI rules are typically used with `toFQDNs`, each of - // which defines a separate destination, so that SNIs for different - // `toFQDNs` will not be merged together. - l7Rules.ServerNames = l7Rules.ServerNames.Merge(newL7Rules.ServerNames) - - // L7 rules can be applied with SNI filtering only if the TLS is also - // terminated - if len(l7Rules.ServerNames) > 0 && !l7Rules.L7Rules.IsEmpty() && l7Rules.TerminatingTLS == nil { - ctx.PolicyTrace(" Merge conflict: cannot use SNI filtering with L7 rules without TLS termination: %v\n", l7Rules.ServerNames) - return fmt.Errorf("cannot merge L7 rules for cached selector %s with SNI filtering without TLS termination: %v", cs.String(), l7Rules.ServerNames) - } - - // empty L7 rules effectively wildcard L7. When merging with a non-empty - // rule, the empty must be expanded to an actual wildcard rule for the - // specific L7 - if !l7Rules.HasL7Rules() && newL7Rules.HasL7Rules() { - l7Rules.L7Rules = newL7Rules.appendL7WildcardRule(ctx) - existingFilter.PerSelectorPolicies[cs] = l7Rules - continue - } - if l7Rules.HasL7Rules() && !newL7Rules.HasL7Rules() { - l7Rules.appendL7WildcardRule(ctx) - existingFilter.PerSelectorPolicies[cs] = l7Rules - continue - } - - // We already know from the L7Parser.Merge() above that there are no - // conflicting parser types, and rule validation only allows one type of L7 - // rules in a rule, so we can just merge the rules here. - for _, newRule := range newL7Rules.HTTP { - if !newRule.Exists(l7Rules.L7Rules) { - l7Rules.HTTP = append(l7Rules.HTTP, newRule) - } - } - for _, newRule := range newL7Rules.Kafka { - if !newRule.Exists(l7Rules.L7Rules.Kafka) { - l7Rules.Kafka = append(l7Rules.Kafka, newRule) - } - } - if l7Rules.L7Proto == "" && newL7Rules.L7Proto != "" { - l7Rules.L7Proto = newL7Rules.L7Proto - } - for _, newRule := range newL7Rules.L7 { - if !newRule.Exists(l7Rules.L7Rules) { - l7Rules.L7 = append(l7Rules.L7, newRule) - } - } - for _, newRule := range newL7Rules.DNS { - if !newRule.Exists(l7Rules.L7Rules) { - l7Rules.DNS = append(l7Rules.DNS, newRule) - } - } - // Update the pointer in the map in case it was newly allocated - existingFilter.PerSelectorPolicies[cs] = l7Rules - } else { // 'cs' is not in the existing filter yet - // Update selector owner to the existing filter - selectorCache.ChangeUser(cs, filterToMerge, existingFilter) - - // Move L7 rules over. - existingFilter.PerSelectorPolicies[cs] = newL7Rules - - if cs.IsWildcard() { - existingFilter.wildcard = cs - } - } - } - - return nil -} - -// mergeIngressPortProto merges all rules which share the same port & protocol that -// select a given set of endpoints. It updates the L4Filter mapped to by the specified -// port and protocol with the contents of the provided PortRule. If the rule -// being merged has conflicting L7 rules with those already in the provided -// L4PolicyMap for the specified port-protocol tuple, it returns an error. -// -// If any rules contain L7 rules that select Host or Remote Node and we should -// accept all traffic from host, the L7 rules will be translated into L7 -// wildcards via 'hostWildcardL7'. That is to say, traffic will be -// forwarded to the proxy for endpoints matching those labels, but the proxy -// will allow all such traffic. -func mergeIngressPortProto(policyCtx PolicyContext, ctx *SearchContext, endpoints api.EndpointSelectorSlice, auth *api.Authentication, hostWildcardL7 []string, - r api.Ports, p api.PortProtocol, proto api.L4Proto, ruleLabels labels.LabelArray, resMap L4PolicyMap) (int, error) { - // Create a new L4Filter - filterToMerge, err := createL4IngressFilter(policyCtx, endpoints, auth, hostWildcardL7, r, p, proto, ruleLabels) - if err != nil { - return 0, err - } - - err = addL4Filter(policyCtx, ctx, resMap, p, proto, filterToMerge, ruleLabels) - if err != nil { - return 0, err - } - return 1, err -} - -func traceL3(ctx *SearchContext, peerEndpoints api.EndpointSelectorSlice, direction string, isDeny bool) { - var result strings.Builder - - // Requirements will be cloned into every selector, only trace them once. - if len(peerEndpoints[0].MatchExpressions) > 0 { - sel := peerEndpoints[0] - result.WriteString(" Enforcing requirements ") - result.WriteString(fmt.Sprintf("%+v", sel.MatchExpressions)) - result.WriteString("\n") - } - // EndpointSelector - for _, sel := range peerEndpoints { - if len(sel.MatchLabels) > 0 { - if !isDeny { - result.WriteString(" Allows ") - } else { - result.WriteString(" Denies ") - } - result.WriteString(direction) - result.WriteString(" labels ") - result.WriteString(sel.String()) - result.WriteString("\n") - } - } - ctx.PolicyTrace(result.String()) -} - -// portRulesCoverContext determines whether L4 portions of rules cover the -// specified port models. -// -// Returns true if the list of ports is 0, or the rules match the ports. -func rulePortsCoverSearchContext(ports []api.PortProtocol, ctx *SearchContext) bool { - if len(ctx.DPorts) == 0 { - return true - } - for _, p := range ports { - for _, dp := range ctx.DPorts { - tracePort := api.PortProtocol{ - Protocol: api.L4Proto(dp.Protocol), - } - if dp.Name != "" { - tracePort.Port = dp.Name - } else { - tracePort.Port = strconv.FormatUint(uint64(dp.Port), 10) - } - if p.Covers(tracePort) { - return true - } - } - } - return false -} - -func mergeIngress(policyCtx PolicyContext, ctx *SearchContext, fromEndpoints api.EndpointSelectorSlice, auth *api.Authentication, toPorts, icmp api.PortsIterator, ruleLabels labels.LabelArray, resMap L4PolicyMap) (int, error) { - found := 0 - - if ctx.From != nil && len(fromEndpoints) > 0 { - if ctx.TraceEnabled() { - traceL3(ctx, fromEndpoints, "from", policyCtx.IsDeny()) - } - if !fromEndpoints.Matches(ctx.From) { - ctx.PolicyTrace(" No label match for %s", ctx.From) - return 0, nil - } - ctx.PolicyTrace(" Found all required labels") - } - - // Daemon options may induce L3 allows for host/world. In this case, if - // we find any L7 rules matching host/world then we need to turn any L7 - // restrictions on these endpoints into L7 allow-all so that the - // traffic is always allowed, but is also always redirected through the - // proxy - hostWildcardL7 := make([]string, 0, 2) - if option.Config.AlwaysAllowLocalhost() { - hostWildcardL7 = append(hostWildcardL7, labels.IDNameHost) - if !option.Config.EnableRemoteNodeIdentity { - hostWildcardL7 = append(hostWildcardL7, labels.IDNameRemoteNode) - } - } - - var ( - cnt int - err error - ) - - // L3-only rule (with requirements folded into fromEndpoints). - if toPorts.Len() == 0 && icmp.Len() == 0 && len(fromEndpoints) > 0 { - cnt, err = mergeIngressPortProto(policyCtx, ctx, fromEndpoints, auth, hostWildcardL7, &api.PortRule{}, api.PortProtocol{Port: "0", Protocol: api.ProtoAny}, api.ProtoAny, ruleLabels, resMap) - if err != nil { - return found, err - } - } - - found += cnt - - err = toPorts.Iterate(func(r api.Ports) error { - // For L4 Policy, an empty slice of EndpointSelector indicates that the - // rule allows all at L3 - explicitly specify this by creating a slice - // with the WildcardEndpointSelector. - if len(fromEndpoints) == 0 { - fromEndpoints = api.EndpointSelectorSlice{api.WildcardEndpointSelector} - } - if !policyCtx.IsDeny() { - ctx.PolicyTrace(" Allows port %v\n", r.GetPortProtocols()) - } else { - ctx.PolicyTrace(" Denies port %v\n", r.GetPortProtocols()) - } - if !rulePortsCoverSearchContext(r.GetPortProtocols(), ctx) { - ctx.PolicyTrace(" No port match found\n") - return nil - } - pr := r.GetPortRule() - if pr != nil { - if pr.Rules != nil && pr.Rules.L7Proto != "" { - ctx.PolicyTrace(" l7proto: \"%s\"\n", pr.Rules.L7Proto) - } - if !pr.Rules.IsEmpty() { - for _, l7 := range pr.Rules.HTTP { - ctx.PolicyTrace(" %+v\n", l7) - } - for _, l7 := range pr.Rules.Kafka { - ctx.PolicyTrace(" %+v\n", l7) - } - for _, l7 := range pr.Rules.L7 { - ctx.PolicyTrace(" %+v\n", l7) - } - } - } - - for _, p := range r.GetPortProtocols() { - if p.Protocol.IsAny() { - cnt, err := mergeIngressPortProto(policyCtx, ctx, fromEndpoints, auth, hostWildcardL7, r, p, api.ProtoTCP, ruleLabels, resMap) - if err != nil { - return err - } - found += cnt - - cnt, err = mergeIngressPortProto(policyCtx, ctx, fromEndpoints, auth, hostWildcardL7, r, p, api.ProtoUDP, ruleLabels, resMap) - if err != nil { - return err - } - found += cnt - - cnt, err = mergeIngressPortProto(policyCtx, ctx, fromEndpoints, auth, hostWildcardL7, r, p, api.ProtoSCTP, ruleLabels, resMap) - if err != nil { - return err - } - found += cnt - } else { - cnt, err := mergeIngressPortProto(policyCtx, ctx, fromEndpoints, auth, hostWildcardL7, r, p, p.Protocol, ruleLabels, resMap) - if err != nil { - return err - } - found += cnt - } - } - return nil - }) - if err != nil { - return found, err - } - - err = icmp.Iterate(func(r api.Ports) error { - if len(fromEndpoints) == 0 { - fromEndpoints = api.EndpointSelectorSlice{api.WildcardEndpointSelector} - } - if !policyCtx.IsDeny() { - ctx.PolicyTrace(" Allows ICMP type %v\n", r.GetPortProtocols()) - } else { - ctx.PolicyTrace(" Denies ICMP type %v\n", r.GetPortProtocols()) - } - if !rulePortsCoverSearchContext(r.GetPortProtocols(), ctx) { - ctx.PolicyTrace(" No ICMP type match found\n") - return nil - } - - for _, p := range r.GetPortProtocols() { - cnt, err := mergeIngressPortProto(policyCtx, ctx, fromEndpoints, auth, hostWildcardL7, r, p, p.Protocol, ruleLabels, resMap) - if err != nil { - return err - } - found += cnt - } - return nil - }) - - return found, err -} - -func (state *traceState) selectRule(ctx *SearchContext, r *rule) { - ctx.PolicyTrace("* Rule %s: selected\n", r) - state.selectedRules++ -} - -func (state *traceState) unSelectRule(ctx *SearchContext, labels labels.LabelArray, r *rule) { - ctx.PolicyTraceVerbose(" Rule %s: did not select %+v\n", r, labels) -} - -// resolveIngressPolicy analyzes the rule against the given SearchContext, and -// merges it with any prior-generated policy within the provided L4Policy. -// Requirements based off of all Ingress requirements (set in FromRequires) in -// other rules are stored in the specified slice of LabelSelectorRequirement. -// These requirements are dynamically inserted into a copy of the receiver rule, -// as requirements form conjunctions across all rules. -func (r *rule) resolveIngressPolicy( - policyCtx PolicyContext, - ctx *SearchContext, - state *traceState, - result L4PolicyMap, - requirements, requirementsDeny []slim_metav1.LabelSelectorRequirement, -) ( - L4PolicyMap, error, -) { - if !ctx.rulesSelect { - if !r.getSelector().Matches(ctx.To) { - state.unSelectRule(ctx, ctx.To, r) - return nil, nil - } - } - - state.selectRule(ctx, r) - found, foundDeny := 0, 0 - - if len(r.Ingress) == 0 && len(r.IngressDeny) == 0 { - ctx.PolicyTrace(" No ingress rules\n") - } - for _, ingressRule := range r.Ingress { - fromEndpoints := ingressRule.GetSourceEndpointSelectorsWithRequirements(requirements) - cnt, err := mergeIngress(policyCtx, ctx, fromEndpoints, ingressRule.Authentication, ingressRule.ToPorts, ingressRule.ICMPs, r.Rule.Labels.DeepCopy(), result) - if err != nil { - return nil, err - } - if cnt > 0 { - found += cnt - } - } - - oldDeny := policyCtx.SetDeny(true) - defer func() { - policyCtx.SetDeny(oldDeny) - }() - for _, ingressRule := range r.IngressDeny { - fromEndpoints := ingressRule.GetSourceEndpointSelectorsWithRequirements(requirementsDeny) - cnt, err := mergeIngress(policyCtx, ctx, fromEndpoints, nil, ingressRule.ToPorts, ingressRule.ICMPs, r.Rule.Labels.DeepCopy(), result) - if err != nil { - return nil, err - } - if cnt > 0 { - foundDeny += cnt - } - } - - if found+foundDeny > 0 { - if found != 0 { - state.matchedRules++ - } - if foundDeny != 0 { - state.matchedDenyRules++ - } - return result, nil - } - - return nil, nil -} - -func (r *rule) matches(securityIdentity *identity.Identity) bool { - r.metadata.Mutex.Lock() - defer r.metadata.Mutex.Unlock() - isNode := securityIdentity.ID == identity.ReservedIdentityHost - - if ruleMatches, cached := r.metadata.IdentitySelected[securityIdentity.ID]; cached { - return ruleMatches - } - - // Short-circuit if the rule's selector type (node vs. endpoint) does not match the - // identity's type - if (r.NodeSelector.LabelSelector != nil) != isNode { - r.metadata.IdentitySelected[securityIdentity.ID] = false - return false - } - - // Fall back to costly matching. - ruleMatches := r.getSelector().Matches(securityIdentity.LabelArray) - - // Update cache so we don't have to do costly matching again. - // the local Host identity has mutable labels, so we cannot use the cache - if !isNode { - r.metadata.IdentitySelected[securityIdentity.ID] = ruleMatches - } - - return ruleMatches -} - -// ****************** EGRESS POLICY ****************** - -func mergeEgress(policyCtx PolicyContext, ctx *SearchContext, toEndpoints api.EndpointSelectorSlice, auth *api.Authentication, toPorts, icmp api.PortsIterator, ruleLabels labels.LabelArray, resMap L4PolicyMap, fqdns api.FQDNSelectorSlice) (int, error) { - found := 0 - - if ctx.To != nil && len(toEndpoints) > 0 { - if ctx.TraceEnabled() { - traceL3(ctx, toEndpoints, "to", policyCtx.IsDeny()) - } - if !toEndpoints.Matches(ctx.To) { - ctx.PolicyTrace(" No label match for %s", ctx.To) - return 0, nil - } - ctx.PolicyTrace(" Found all required labels") - } - - var ( - cnt int - err error - ) - - // L3-only rule (with requirements folded into toEndpoints). - if toPorts.Len() == 0 && icmp.Len() == 0 && len(toEndpoints) > 0 { - cnt, err = mergeEgressPortProto(policyCtx, ctx, toEndpoints, auth, &api.PortRule{}, api.PortProtocol{Port: "0", Protocol: api.ProtoAny}, api.ProtoAny, ruleLabels, resMap, fqdns) - if err != nil { - return found, err - } - } - - found += cnt - - err = toPorts.Iterate(func(r api.Ports) error { - // For L4 Policy, an empty slice of EndpointSelector indicates that the - // rule allows all at L3 - explicitly specify this by creating a slice - // with the WildcardEndpointSelector. - if len(toEndpoints) == 0 { - toEndpoints = api.EndpointSelectorSlice{api.WildcardEndpointSelector} - } - if !policyCtx.IsDeny() { - ctx.PolicyTrace(" Allows port %v\n", r.GetPortProtocols()) - } else { - ctx.PolicyTrace(" Denies port %v\n", r.GetPortProtocols()) - } - - pr := r.GetPortRule() - if pr != nil { - if !pr.Rules.IsEmpty() { - for _, l7 := range pr.Rules.HTTP { - ctx.PolicyTrace(" %+v\n", l7) - } - for _, l7 := range pr.Rules.Kafka { - ctx.PolicyTrace(" %+v\n", l7) - } - for _, l7 := range pr.Rules.L7 { - ctx.PolicyTrace(" %+v\n", l7) - } - } - } - - for _, p := range r.GetPortProtocols() { - if p.Protocol.IsAny() { - cnt, err := mergeEgressPortProto(policyCtx, ctx, toEndpoints, auth, r, p, api.ProtoTCP, ruleLabels, resMap, fqdns) - if err != nil { - return err - } - found += cnt - - cnt, err = mergeEgressPortProto(policyCtx, ctx, toEndpoints, auth, r, p, api.ProtoUDP, ruleLabels, resMap, fqdns) - if err != nil { - return err - } - found += cnt - - cnt, err = mergeEgressPortProto(policyCtx, ctx, toEndpoints, auth, r, p, api.ProtoSCTP, ruleLabels, resMap, fqdns) - if err != nil { - return err - } - found += cnt - } else { - cnt, err := mergeEgressPortProto(policyCtx, ctx, toEndpoints, auth, r, p, p.Protocol, ruleLabels, resMap, fqdns) - if err != nil { - return err - } - found += cnt - } - } - return nil - }, - ) - if err != nil { - return found, err - } - - err = icmp.Iterate(func(r api.Ports) error { - if len(toEndpoints) == 0 { - toEndpoints = api.EndpointSelectorSlice{api.WildcardEndpointSelector} - } - if !policyCtx.IsDeny() { - ctx.PolicyTrace(" Allows ICMP type %v\n", r.GetPortProtocols()) - } else { - ctx.PolicyTrace(" Denies ICMP type %v\n", r.GetPortProtocols()) - } - - for _, p := range r.GetPortProtocols() { - cnt, err := mergeEgressPortProto(policyCtx, ctx, toEndpoints, auth, r, p, p.Protocol, ruleLabels, resMap, fqdns) - if err != nil { - return err - } - found += cnt - } - return nil - }) - - return found, err -} - -// mergeEgressPortProto merges all rules which share the same port & protocol that -// select a given set of endpoints. It updates the L4Filter mapped to by the specified -// port and protocol with the contents of the provided PortRule. If the rule -// being merged has conflicting L7 rules with those already in the provided -// L4PolicyMap for the specified port-protocol tuple, it returns an error. -func mergeEgressPortProto(policyCtx PolicyContext, ctx *SearchContext, endpoints api.EndpointSelectorSlice, auth *api.Authentication, r api.Ports, p api.PortProtocol, - proto api.L4Proto, ruleLabels labels.LabelArray, resMap L4PolicyMap, fqdns api.FQDNSelectorSlice) (int, error) { - // Create a new L4Filter - filterToMerge, err := createL4EgressFilter(policyCtx, endpoints, auth, r, p, proto, ruleLabels, fqdns) - if err != nil { - return 0, err - } - - err = addL4Filter(policyCtx, ctx, resMap, p, proto, filterToMerge, ruleLabels) - if err != nil { - return 0, err - } - return 1, err -} - -func (r *rule) resolveEgressPolicy( - policyCtx PolicyContext, - ctx *SearchContext, - state *traceState, - result L4PolicyMap, - requirements, requirementsDeny []slim_metav1.LabelSelectorRequirement, -) ( - L4PolicyMap, error, -) { - if !ctx.rulesSelect { - if !r.getSelector().Matches(ctx.From) { - state.unSelectRule(ctx, ctx.From, r) - return nil, nil - } - } - - state.selectRule(ctx, r) - found, foundDeny := 0, 0 - - if len(r.Egress) == 0 && len(r.EgressDeny) == 0 { - ctx.PolicyTrace(" No egress rules\n") - } - for _, egressRule := range r.Egress { - toEndpoints := egressRule.GetDestinationEndpointSelectorsWithRequirements(requirements) - cnt, err := mergeEgress(policyCtx, ctx, toEndpoints, egressRule.Authentication, egressRule.ToPorts, egressRule.ICMPs, r.Rule.Labels.DeepCopy(), result, egressRule.ToFQDNs) - if err != nil { - return nil, err - } - if cnt > 0 { - found += cnt - } - } - - oldDeny := policyCtx.SetDeny(true) - defer func() { - policyCtx.SetDeny(oldDeny) - }() - for _, egressRule := range r.EgressDeny { - toEndpoints := egressRule.GetDestinationEndpointSelectorsWithRequirements(requirementsDeny) - cnt, err := mergeEgress(policyCtx, ctx, toEndpoints, nil, egressRule.ToPorts, egressRule.ICMPs, r.Rule.Labels.DeepCopy(), result, nil) - if err != nil { - return nil, err - } - if cnt > 0 { - foundDeny += cnt - } - } - - if found+foundDeny > 0 { - if found != 0 { - state.matchedRules++ - } - if foundDeny != 0 { - state.matchedDenyRules++ - } - return result, nil - } - - return nil, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/rules.go b/vendor/github.com/cilium/cilium/pkg/policy/rules.go deleted file mode 100644 index 9caa9e88db0..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/rules.go +++ /dev/null @@ -1,160 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "fmt" - - slim_metav1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1" - policyapi "github.com/cilium/cilium/pkg/policy/api" -) - -// ruleSlice is a wrapper around a slice of *rule, which allows for functions -// to be written with []*rule as a receiver. -type ruleSlice []*rule - -func (rules ruleSlice) resolveL4IngressPolicy(policyCtx PolicyContext, ctx *SearchContext) (L4PolicyMap, error) { - result := L4PolicyMap{} - - ctx.PolicyTrace("\n") - ctx.PolicyTrace("Resolving ingress policy for %+v\n", ctx.To) - - state := traceState{} - var matchedRules ruleSlice - var requirements, requirementsDeny []slim_metav1.LabelSelectorRequirement - - // Iterate over all FromRequires which select ctx.To. These requirements - // will be appended to each EndpointSelector's MatchExpressions in - // each FromEndpoints for all ingress rules. This ensures that FromRequires - // is taken into account when evaluating policy at L4. - for _, r := range rules { - if ctx.rulesSelect || r.getSelector().Matches(ctx.To) { - matchedRules = append(matchedRules, r) - for _, ingressRule := range r.Ingress { - for _, requirement := range ingressRule.FromRequires { - requirements = append(requirements, requirement.ConvertToLabelSelectorRequirementSlice()...) - } - } - for _, ingressRule := range r.IngressDeny { - for _, requirement := range ingressRule.FromRequires { - requirementsDeny = append(requirementsDeny, requirement.ConvertToLabelSelectorRequirementSlice()...) - } - } - } - } - - // Only dealing with matching rules from now on. Mark it in the ctx - oldRulesSelect := ctx.rulesSelect - ctx.rulesSelect = true - - for _, r := range matchedRules { - _, err := r.resolveIngressPolicy(policyCtx, ctx, &state, result, requirements, requirementsDeny) - if err != nil { - return nil, err - } - state.ruleID++ - } - - state.trace(len(rules), ctx) - - // Restore ctx in case caller uses it again. - ctx.rulesSelect = oldRulesSelect - - return result, nil -} - -func (rules ruleSlice) resolveL4EgressPolicy(policyCtx PolicyContext, ctx *SearchContext) (L4PolicyMap, error) { - result := L4PolicyMap{} - - ctx.PolicyTrace("\n") - ctx.PolicyTrace("Resolving egress policy for %+v\n", ctx.From) - - state := traceState{} - var matchedRules ruleSlice - var requirements, requirementsDeny []slim_metav1.LabelSelectorRequirement - - // Iterate over all ToRequires which select ctx.To. These requirements will - // be appended to each EndpointSelector's MatchExpressions in each - // ToEndpoints for all egress rules. This ensures that ToRequires is - // taken into account when evaluating policy at L4. - for _, r := range rules { - if ctx.rulesSelect || r.getSelector().Matches(ctx.From) { - matchedRules = append(matchedRules, r) - for _, egressRule := range r.Egress { - for _, requirement := range egressRule.ToRequires { - requirements = append(requirements, requirement.ConvertToLabelSelectorRequirementSlice()...) - } - } - for _, egressRule := range r.EgressDeny { - for _, requirement := range egressRule.ToRequires { - requirementsDeny = append(requirementsDeny, requirement.ConvertToLabelSelectorRequirementSlice()...) - } - } - } - } - - // Only dealing with matching rules from now on. Mark it in the ctx - oldRulesSelect := ctx.rulesSelect - ctx.rulesSelect = true - - for i, r := range matchedRules { - state.ruleID = i - _, err := r.resolveEgressPolicy(policyCtx, ctx, &state, result, requirements, requirementsDeny) - if err != nil { - return nil, err - } - state.ruleID++ - } - - state.trace(len(rules), ctx) - - // Restore ctx in case caller uses it again. - ctx.rulesSelect = oldRulesSelect - - return result, nil -} - -// updateEndpointsCaches iterates over a given list of rules to update the cache -// within the rule which determines whether or not the given identity is -// selected by that rule. If a rule in the list does select said identity, it is -// added to epSet. Note that epSet can be shared across goroutines! -// Returns whether the endpoint was selected by one of the rules, or if the -// endpoint is nil. -func (rules ruleSlice) updateEndpointsCaches(ep Endpoint) (bool, error) { - if ep == nil { - return false, fmt.Errorf("cannot update caches in rules because endpoint is nil") - } - id := ep.GetID16() - securityIdentity, err := ep.GetSecurityIdentity() - if err != nil { - return false, fmt.Errorf("cannot update caches in rules for endpoint %d because it is being deleted: %w", id, err) - } - - if securityIdentity == nil { - return false, fmt.Errorf("cannot update caches in rules for endpoint %d because it has a nil identity", id) - } - endpointSelected := false - for _, r := range rules { - // NodeSelector can only match nodes, EndpointSelector only pods. - if (r.NodeSelector.LabelSelector != nil) != ep.IsHost() { - continue - } - // Update the matches cache of each rule, and note if - // the ep is selected by any of them. - if ruleMatches := r.matches(securityIdentity); ruleMatches { - endpointSelected = true - } - } - - return endpointSelected, nil -} - -// AsPolicyRules return the internal policyapi.Rule objects as a policyapi.Rules object -func (rules ruleSlice) AsPolicyRules() policyapi.Rules { - policyRules := make(policyapi.Rules, 0, len(rules)) - for _, r := range rules { - policyRules = append(policyRules, &r.Rule) - } - return policyRules -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/selectorcache.go b/vendor/github.com/cilium/cilium/pkg/policy/selectorcache.go deleted file mode 100644 index 5102bf4193f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/selectorcache.go +++ /dev/null @@ -1,632 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "net" - "net/netip" - "strings" - "sync" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/api/v1/models" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/identity/cache" - k8sConst "github.com/cilium/cilium/pkg/k8s/apis/cilium.io" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/policy/api" -) - -// scIdentity is the information we need about a an identity that rules can select -type scIdentity struct { - NID identity.NumericIdentity - lbls labels.LabelArray - nets []*net.IPNet // Most specific CIDR for the identity, if any. - computed bool // nets has been computed - namespace string // value of the namespace label, or "" -} - -// scIdentityCache is a cache of Identities keyed by the numeric identity -type scIdentityCache map[identity.NumericIdentity]scIdentity - -func newIdentity(nid identity.NumericIdentity, lbls labels.LabelArray) scIdentity { - return scIdentity{ - NID: nid, - lbls: lbls, - nets: getLocalScopeNets(nid, lbls), - namespace: lbls.Get(labels.LabelSourceK8sKeyPrefix + k8sConst.PodNamespaceLabel), - computed: true, - } -} - -// getLocalScopeNets returns the most specific CIDR for a local scope identity. -func getLocalScopeNets(id identity.NumericIdentity, lbls labels.LabelArray) []*net.IPNet { - if id.HasLocalScope() { - var mostSpecificCidr *net.IPNet - maskSize := -1 // allow for 0-length prefix (e.g., "0.0.0.0/0") - for _, lbl := range lbls { - if lbl.Source == labels.LabelSourceCIDR { - // Reverse the transformation done in labels.maskedIPToLabel() - // as ':' is not allowed within a k8s label, colons are represented - // with '-'. - cidr := strings.ReplaceAll(lbl.Key, "-", ":") - _, netIP, err := net.ParseCIDR(cidr) - if err == nil { - if ms, _ := netIP.Mask.Size(); ms > maskSize { - mostSpecificCidr = netIP - maskSize = ms - } - } - } - } - if mostSpecificCidr != nil { - return []*net.IPNet{mostSpecificCidr} - } - } - return nil -} - -func getIdentityCache(ids cache.IdentityCache) scIdentityCache { - idCache := make(map[identity.NumericIdentity]scIdentity, len(ids)) - for nid, lbls := range ids { - idCache[nid] = newIdentity(nid, lbls) - } - return idCache -} - -// userNotification stores the information needed to call -// IdentitySelectionUpdated callbacks to notify users of selector's -// identity changes. These are queued to be able to call the callbacks -// in FIFO order while not holding any locks. -type userNotification struct { - user CachedSelectionUser - selector CachedSelector - added []identity.NumericIdentity - deleted []identity.NumericIdentity - wg *sync.WaitGroup -} - -// SelectorCache caches identities, identity selectors, and the -// subsets of identities each selector selects. -type SelectorCache struct { - mutex lock.RWMutex - - // idAllocator is used to allocate and release identities. It is used - // by the NameManager to manage identities corresponding to FQDNs. - idAllocator cache.IdentityAllocator - - // idCache contains all known identities as informed by the - // kv-store and the local identity facility via our - // UpdateIdentities() function. - idCache scIdentityCache - - // map key is the string representation of the selector being cached. - selectors map[string]*identitySelector - - localIdentityNotifier identityNotifier - - // userCond is a condition variable for receiving signals - // about addition of new elements in userNotes - userCond *sync.Cond - // userMutex protects userNotes and is linked to userCond - userMutex lock.Mutex - // userNotes holds a FIFO list of user notifications to be made - userNotes []userNotification - - // used to lazily start the handler for user notifications. - startNotificationsHandlerOnce sync.Once -} - -// GetModel returns the API model of the SelectorCache. -func (sc *SelectorCache) GetModel() models.SelectorCache { - sc.mutex.RLock() - defer sc.mutex.RUnlock() - - selCacheMdl := make(models.SelectorCache, 0, len(sc.selectors)) - - for selector, idSel := range sc.selectors { - selections := idSel.GetSelections() - ids := make([]int64, 0, len(selections)) - for i := range selections { - ids = append(ids, int64(selections[i])) - } - selMdl := &models.SelectorIdentityMapping{ - Selector: selector, - Identities: ids, - Users: int64(idSel.numUsers()), - Labels: labelArrayToModel(idSel.GetMetadataLabels()), - } - selCacheMdl = append(selCacheMdl, selMdl) - } - - return selCacheMdl -} - -func labelArrayToModel(arr labels.LabelArray) models.LabelArray { - lbls := make(models.LabelArray, 0, len(arr)) - for _, l := range arr { - lbls = append(lbls, &models.Label{ - Key: l.Key, - Value: l.Value, - Source: l.Source, - }) - } - return lbls -} - -func (sc *SelectorCache) handleUserNotifications() { - for { - sc.userMutex.Lock() - for len(sc.userNotes) == 0 { - sc.userCond.Wait() - } - // get the current batch of notifications and release the lock so that SelectorCache - // can't block on userMutex while we call IdentitySelectionUpdated callbacks below. - notifications := sc.userNotes - sc.userNotes = nil - sc.userMutex.Unlock() - - for _, n := range notifications { - n.user.IdentitySelectionUpdated(n.selector, n.added, n.deleted) - n.wg.Done() - } - } -} - -func (sc *SelectorCache) queueUserNotification(user CachedSelectionUser, selector CachedSelector, added, deleted []identity.NumericIdentity, wg *sync.WaitGroup) { - sc.startNotificationsHandlerOnce.Do(func() { - go sc.handleUserNotifications() - }) - wg.Add(1) - sc.userMutex.Lock() - sc.userNotes = append(sc.userNotes, userNotification{ - user: user, - selector: selector, - added: added, - deleted: deleted, - wg: wg, - }) - sc.userMutex.Unlock() - sc.userCond.Signal() -} - -// NewSelectorCache creates a new SelectorCache with the given identities. -func NewSelectorCache(allocator cache.IdentityAllocator, ids cache.IdentityCache) *SelectorCache { - sc := &SelectorCache{ - idAllocator: allocator, - idCache: getIdentityCache(ids), - selectors: make(map[string]*identitySelector), - } - sc.userCond = sync.NewCond(&sc.userMutex) - return sc -} - -// SetLocalIdentityNotifier injects the provided identityNotifier into the -// SelectorCache. Currently, this is used to inject the FQDN subsystem into -// the SelectorCache so the SelectorCache can notify the FQDN subsystem when -// it should be aware of a given FQDNSelector for which CIDR identities need -// to be provided upon DNS lookups which corespond to said FQDNSelector. -func (sc *SelectorCache) SetLocalIdentityNotifier(pop identityNotifier) { - sc.localIdentityNotifier = pop -} - -var ( - // Empty slice of numeric identities used for all selectors that select nothing - emptySelection identity.NumericIdentitySlice - // wildcardSelectorKey is used to compare if a key is for a wildcard - wildcardSelectorKey = api.WildcardEndpointSelector.LabelSelector.String() - // noneSelectorKey is used to compare if a key is for "reserved:none" - noneSelectorKey = api.EndpointSelectorNone.LabelSelector.String() -) - -// identityNotifier provides a means for other subsystems to be made aware of a -// given FQDNSelector (currently pkg/fqdn) so that said subsystems can notify -// the SelectorCache about new IPs (via CIDR Identities) which correspond to -// said FQDNSelector. This is necessary since there is nothing intrinsic to a -// CIDR Identity that says that it corresponds to a given FQDNSelector; this -// relationship is contained only via DNS responses, which are handled -// externally. -type identityNotifier interface { - // Lock must be held during any calls to *Locked functions below. - Lock() - - // Unlock must be called after calls to *Locked functions below. - Unlock() - - // RegisterForIPUpdatesLocked exposes this FQDNSelector so that identities - // for IPs contained in a DNS response that matches said selector can - // be propagated back to the SelectorCache via `UpdateFQDNSelector`. - // - // This function should only be called when the SelectorCache has been - // made aware of the FQDNSelector for the first time; subsequent - // updates to the selectors should be made via `UpdateFQDNSelector`. - // - // This function returns the set of IPs for which this selector already applies. - RegisterForIPUpdatesLocked(selector api.FQDNSelector) []netip.Addr - - // UnregisterForIPUpdatesLocked removes this FQDNSelector from the set of - // FQDNSelectors which are being tracked by the identityNotifier. The result - // of this is that no more updates for IPs which correspond to said selector - // are propagated back to the SelectorCache via `UpdateFQDNSelector`. - // This occurs when there are no more users of a given FQDNSelector for the - // SelectorCache. - UnregisterForIPUpdatesLocked(selector api.FQDNSelector) -} - -// -// CachedSelector implementation (== Public API) -// -// No locking needed. -// - -// UpdateResult is a bitfield that indicates what parts of the policy engines -// need to update in order to implement a policy -type UpdateResult uint32 - -const ( - // UpdateResultUpdatePolicyMaps indicates the caller should call EndpointManager.UpdatePolicyMaps() - UpdateResultUpdatePolicyMaps = UpdateResult(1) << iota - - // UpdateResultIdentitiesNeeded indicates the caller should wait for a complete ipcache label injection, - // as the selector is missing identities - UpdateResultIdentitiesNeeded - - UpdateResultUnchanged = UpdateResult(0) -) - -// UpdateFQDNSelector updates the mapping of fqdnKey (the FQDNSelector from a -// policy rule as a string) to to the provided list of IPs. -// -// If the supplied IPs are already known to the SelectorCache (i.e. they already) -// have identities allocated for them), the selector's cachedSelections changes, and -// users are notified asynchronously. Caller must then call Wait() on the supplied -// sync.WaitGroup before triggering any policy updates via UpdatePolicyMaps(). -// Policy updates may need Endpoint locks, so this Wait() can deadlock if the caller -// is holding any endpoint locks. When this is the case, the returned UpdateResult has -// the UpdateResultUpdatePolicyMaps bit set. -// -// In the case where identities are not found for all supplied IPs, the returned -// result has the IdentitiesNeeded bit set to signify that an ipcache update is needed. -// -// The caller must always ensure that all selected IP addresses are known to the ipcache. -// -// Returns an UpdateResult that indicates if the caller should call UpdatePolicyMaps() and/or -// wait for ipcache UpsertMetadata() to finish. -func (sc *SelectorCache) UpdateFQDNSelector(fqdnSelec api.FQDNSelector, ips []netip.Addr, wg *sync.WaitGroup) UpdateResult { - sc.mutex.Lock() - defer sc.mutex.Unlock() - return sc.updateFQDNSelector(fqdnSelec, ips, wg) -} - -func (sc *SelectorCache) updateFQDNSelector(fqdnSelec api.FQDNSelector, ips []netip.Addr, wg *sync.WaitGroup) UpdateResult { - key := fqdnSelec.String() - - idSelector, exists := sc.selectors[key] - if !exists || idSelector == nil { - log.WithField(logfields.Selector, fqdnSelec.String()).Error("UpdateFQDNSelector of selector not registered in SelectorCache!") - } - - fqdnSelect, ok := idSelector.source.(*fqdnSelector) - if !ok { - log.Error("UpdateFQDNSelector for non-FQDN selector!") - return UpdateResultUnchanged - } - - // update wantLabels, then determine set of added and removed identities - fqdnSelect.setSelectorIPs(ips) // this updates wantLabels - - // Note that 'added' and 'deleted' are guaranteed to be - // disjoint, as one of them is left as nil, or an identity - // being in 'identities' is a precondition for an - // identity to be appended to 'added', while the inverse is - // true for 'deleted'. - var added, deleted []identity.NumericIdentity - - // Delete any non-matching entries from cachedSelections - for nid := range idSelector.cachedSelections { - identity := sc.idCache[nid] - if !idSelector.source.matches(identity) { - deleted = append(deleted, nid) - delete(idSelector.cachedSelections, nid) - } - } - - // Scan the cached set of IDs to determine any new matchers - for nid, identity := range sc.idCache { - if idSelector.source.matches(identity) { - if _, exists := idSelector.cachedSelections[nid]; !exists { - added = append(added, nid) - idSelector.cachedSelections[nid] = struct{}{} - } - } - } - - // Result indicates whether or not the caller should call UpdatePolicyMaps - // and / or wait for ipcache to finish. - result := UpdateResultUnchanged - - // If we're missing identities, then the caller also needs to wait for ipcache to do a - // allocation + injection round - // - // This assumes we should have a 1:1 mapping from label to IPs, which is currently the case. - // If this changes, this conditional will be wrong. - if len(idSelector.cachedSelections) != len(fqdnSelect.wantLabels) { - result |= UpdateResultIdentitiesNeeded - } - - idSelector.updateSelections() - - // If the set of selections has changed, then we need to push out an - // incremental update. This will add an incremental change to all users, - // and tell the caller that a call to UpdatePolicyMaps is required. - if len(added)+len(deleted) > 0 { - result |= UpdateResultUpdatePolicyMaps - idSelector.notifyUsers(sc, added, deleted, wg) // disjoint sets, see the comment above - } - - return result -} - -// AddFQDNSelector adds the given api.FQDNSelector in to the selector cache. If -// an identical EndpointSelector has already been cached, the corresponding -// CachedSelector is returned, otherwise one is created and added to the cache. -func (sc *SelectorCache) AddFQDNSelector(user CachedSelectionUser, lbls labels.LabelArray, fqdnSelec api.FQDNSelector) (cachedSelector CachedSelector, added bool) { - key := fqdnSelec.String() - - // Lock NameManager before the SelectorCache. Always. - // This is because SelectorCache and NameManager have interleaving locks, - // so we must always acquire the NameManager lock first - sc.localIdentityNotifier.Lock() - defer sc.localIdentityNotifier.Unlock() - sc.mutex.Lock() - defer sc.mutex.Unlock() - - // If the selector already exists, use it. - idSel, exists := sc.selectors[key] - if exists { - return idSel, idSel.addUser(user) - } - - source := &fqdnSelector{ - selector: fqdnSelec, - } - - // Make the FQDN subsystem aware of this selector and fetch ips - // that the FQDN subsystem is aware of. - currentIPs := sc.localIdentityNotifier.RegisterForIPUpdatesLocked(source.selector) - source.setSelectorIPs(currentIPs) - - return sc.addSelector(user, lbls, key, source) -} - -func (sc *SelectorCache) addSelector(user CachedSelectionUser, lbls labels.LabelArray, key string, source selectorSource) (CachedSelector, bool) { - idSel := &identitySelector{ - key: key, - users: make(map[CachedSelectionUser]struct{}), - cachedSelections: make(map[identity.NumericIdentity]struct{}), - source: source, - metadataLbls: lbls, - } - sc.selectors[key] = idSel - - // Scan the cached set of IDs to determine any new matchers - for nid, identity := range sc.idCache { - if idSel.source.matches(identity) { - idSel.cachedSelections[nid] = struct{}{} - } - } - - // Note: No notifications are sent for the existing - // identities. Caller must use GetSelections() to get the - // current selections after adding a selector. This way the - // behavior is the same between the two cases here (selector - // is already cached, or is a new one). - - // Create the immutable slice representation of the selected - // numeric identities - idSel.updateSelections() - - return idSel, idSel.addUser(user) - -} - -// FindCachedIdentitySelector finds the given api.EndpointSelector in the -// selector cache, returning nil if one can not be found. -func (sc *SelectorCache) FindCachedIdentitySelector(selector api.EndpointSelector) CachedSelector { - key := selector.CachedString() - sc.mutex.Lock() - idSel := sc.selectors[key] - sc.mutex.Unlock() - return idSel -} - -// AddIdentitySelector adds the given api.EndpointSelector in to the -// selector cache. If an identical EndpointSelector has already been -// cached, the corresponding CachedSelector is returned, otherwise one -// is created and added to the cache. -func (sc *SelectorCache) AddIdentitySelector(user CachedSelectionUser, lbls labels.LabelArray, selector api.EndpointSelector) (cachedSelector CachedSelector, added bool) { - // The key returned here may be different for equivalent - // labelselectors, if the selector's requirements are stored - // in different orders. When this happens we'll be tracking - // essentially two copies of the same selector. - key := selector.CachedString() - sc.mutex.Lock() - defer sc.mutex.Unlock() - idSel, exists := sc.selectors[key] - if exists { - return idSel, idSel.addUser(user) - } - - // Selectors are never modified once a rule is placed in the policy repository, - // so no need to deep copy. - source := &labelIdentitySelector{ - selector: selector, - } - // check is selector has a namespace match or requirement - if namespaces, ok := selector.GetMatch(labels.LabelSourceK8sKeyPrefix + k8sConst.PodNamespaceLabel); ok { - source.namespaces = namespaces - } - - return sc.addSelector(user, lbls, key, source) -} - -// lock must be held -func (sc *SelectorCache) removeSelectorLocked(selector CachedSelector, user CachedSelectionUser) { - key := selector.String() - sel, exists := sc.selectors[key] - if exists { - if sel.removeUser(user) { - sel.source.remove(sc.localIdentityNotifier) - delete(sc.selectors, key) - } - } -} - -// RemoveSelector removes CachedSelector for the user. -func (sc *SelectorCache) RemoveSelector(selector CachedSelector, user CachedSelectionUser) { - sc.localIdentityNotifier.Lock() - sc.mutex.Lock() - sc.removeSelectorLocked(selector, user) - sc.mutex.Unlock() - sc.localIdentityNotifier.Unlock() - -} - -// RemoveSelectors removes CachedSelectorSlice for the user. -func (sc *SelectorCache) RemoveSelectors(selectors CachedSelectorSlice, user CachedSelectionUser) { - sc.localIdentityNotifier.Lock() - sc.mutex.Lock() - for _, selector := range selectors { - sc.removeSelectorLocked(selector, user) - } - sc.mutex.Unlock() - sc.localIdentityNotifier.Unlock() -} - -// ChangeUser changes the CachedSelectionUser that gets updates on the -// updates on the cached selector. -func (sc *SelectorCache) ChangeUser(selector CachedSelector, from, to CachedSelectionUser) { - key := selector.String() - sc.mutex.Lock() - idSel, exists := sc.selectors[key] - if exists { - // Add before remove so that the count does not dip to zero in between, - // as this causes FQDN unregistration (if applicable). - idSel.addUser(to) - // ignoring the return value as we have just added a user above - idSel.removeUser(from) - } - sc.mutex.Unlock() -} - -// UpdateIdentities propagates identity updates to selectors -// -// The caller is responsible for making sure the same identity is not -// present in both 'added' and 'deleted'. -// -// Caller should Wait() on the returned sync.WaitGroup before triggering any -// policy updates. Policy updates may need Endpoint locks, so this Wait() can -// deadlock if the caller is holding any endpoint locks. -func (sc *SelectorCache) UpdateIdentities(added, deleted cache.IdentityCache, wg *sync.WaitGroup) { - sc.mutex.Lock() - defer sc.mutex.Unlock() - - // Update idCache so that newly added selectors get - // prepopulated with all matching numeric identities. - for numericID := range deleted { - if old, exists := sc.idCache[numericID]; exists { - log.WithFields(logrus.Fields{ - logfields.Identity: numericID, - logfields.Labels: old.lbls, - }).Debug("UpdateIdentities: Deleting identity") - delete(sc.idCache, numericID) - } else { - log.WithFields(logrus.Fields{ - logfields.Identity: numericID, - }).Warning("UpdateIdentities: Skipping Delete of a non-existing identity") - delete(deleted, numericID) - } - } - for numericID, lbls := range added { - if old, exists := sc.idCache[numericID]; exists { - // Skip if no change. Not skipping if label - // order is different, but identity labels are - // sorted for the kv-store, so there should - // not be too many false negatives. - if lbls.Equals(old.lbls) { - log.WithFields(logrus.Fields{ - logfields.Identity: numericID, - }).Debug("UpdateIdentities: Skipping add of an existing identical identity") - delete(added, numericID) - continue - } - scopedLog := log.WithFields(logrus.Fields{ - logfields.Identity: numericID, - logfields.Labels: old.lbls, - logfields.Labels + "(new)": lbls}, - ) - msg := "UpdateIdentities: Updating an existing identity" - // Warn if any other ID has their labels change, besides local - // host. The local host can have its labels change at runtime if - // the kube-apiserver is running on the local host, see - // ipcache.TriggerLabelInjection(). - if numericID == identity.ReservedIdentityHost { - scopedLog.Debug(msg) - } else { - scopedLog.Warning(msg) - } - } else { - log.WithFields(logrus.Fields{ - logfields.Identity: numericID, - logfields.Labels: lbls, - }).Debug("UpdateIdentities: Adding a new identity") - } - sc.idCache[numericID] = newIdentity(numericID, lbls) - } - - if len(deleted)+len(added) > 0 { - // Iterate through all locally used identity selectors and - // update the cached numeric identities as required. - for _, idSel := range sc.selectors { - var adds, dels []identity.NumericIdentity - for numericID := range deleted { - if _, exists := idSel.cachedSelections[numericID]; exists { - dels = append(dels, numericID) - delete(idSel.cachedSelections, numericID) - } - } - for numericID := range added { - if _, exists := idSel.cachedSelections[numericID]; !exists { - if idSel.source.matches(sc.idCache[numericID]) { - adds = append(adds, numericID) - idSel.cachedSelections[numericID] = struct{}{} - } - } - } - if len(dels)+len(adds) > 0 { - idSel.updateSelections() - idSel.notifyUsers(sc, adds, dels, wg) - } - } - } -} - -// GetNetsLocked returns the most specific CIDR for an identity. For the "World" identity -// it returns both IPv4 and IPv6. -func (sc *SelectorCache) GetNetsLocked(id identity.NumericIdentity) []*net.IPNet { - ident, ok := sc.idCache[id] - if !ok { - return nil - } - if !ident.computed { - log.WithFields(logrus.Fields{ - logfields.Identity: id, - logfields.Labels: ident.lbls, - }).Warning("GetNetsLocked: Identity with missing nets!") - } - return ident.nets -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/selectorcache_selector.go b/vendor/github.com/cilium/cilium/pkg/policy/selectorcache_selector.go deleted file mode 100644 index 6cecd669efb..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/selectorcache_selector.go +++ /dev/null @@ -1,359 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "bytes" - "encoding/json" - "net/netip" - "sort" - "strings" - "sync" - "sync/atomic" - - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/labels" - "github.com/cilium/cilium/pkg/policy/api" -) - -// CachedSelector represents an identity selector owned by the selector cache -type CachedSelector interface { - // GetSelections returns the cached set of numeric identities - // selected by the CachedSelector. The retuned slice must NOT - // be modified, as it is shared among multiple users. - GetSelections() identity.NumericIdentitySlice - - // GetMetadataLabels returns metadata labels for additional context - // surrounding the selector. These are typically the labels associated with - // Cilium rules. - GetMetadataLabels() labels.LabelArray - - // Selects return 'true' if the CachedSelector selects the given - // numeric identity. - Selects(nid identity.NumericIdentity) bool - - // IsWildcard returns true if the endpoint selector selects - // all endpoints. - IsWildcard() bool - - // IsNone returns true if the selector never selects anything - IsNone() bool - - // String returns the string representation of this selector. - // Used as a map key. - String() string -} - -// CachedSelectorSlice is a slice of CachedSelectors that can be sorted. -type CachedSelectorSlice []CachedSelector - -// MarshalJSON returns the CachedSelectors as JSON formatted buffer -func (s CachedSelectorSlice) MarshalJSON() ([]byte, error) { - buffer := bytes.NewBufferString("[") - for i, selector := range s { - buf, err := json.Marshal(selector.String()) - if err != nil { - return nil, err - } - - buffer.Write(buf) - if i < len(s)-1 { - buffer.WriteString(",") - } - } - buffer.WriteString("]") - return buffer.Bytes(), nil -} - -func (s CachedSelectorSlice) Len() int { return len(s) } -func (s CachedSelectorSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -func (s CachedSelectorSlice) Less(i, j int) bool { - return strings.Compare(s[i].String(), s[j].String()) < 0 -} - -// SelectsAllEndpoints returns whether the CachedSelectorSlice selects all -// endpoints, which is true if the wildcard endpoint selector is present in the -// slice. -func (s CachedSelectorSlice) SelectsAllEndpoints() bool { - for _, selector := range s { - if selector.IsWildcard() { - return true - } - } - return false -} - -// CachedSelectionUser inserts selectors into the cache and gets update -// callbacks whenever the set of selected numeric identities change for -// the CachedSelectors pushed by it. -type CachedSelectionUser interface { - // IdentitySelectionUpdated implementations MUST NOT call back - // to the name manager or the selector cache while executing this function! - // - // The caller is responsible for making sure the same identity is not - // present in both 'added' and 'deleted'. - IdentitySelectionUpdated(selector CachedSelector, added, deleted []identity.NumericIdentity) -} - -// identitySelector is the internal type for all selectors in the -// selector cache. -// -// identitySelector represents the mapping of an EndpointSelector -// to a slice of identities. These mappings are updated via two -// different processes: -// -// 1. When policy rules are changed these are added and/or deleted -// depending on what selectors the rules contain. Cached selections of -// new identitySelectors are pre-populated from the set of currently -// known identities. -// -// 2. When reachacble identities appear or disappear, either via local -// allocation (CIDRs), or via the KV-store (remote endpoints). In this -// case all existing identitySelectors are walked through and their -// cached selections are updated as necessary. -// -// In both of the above cases the set of existing identitySelectors is -// write locked. -// -// To minimize the upkeep the identity selectors are shared across -// all IdentityPolicies, so that only one copy exists for each -// identitySelector. Users of the SelectorCache take care of creating -// identitySelectors as needed by identity policies. The set of -// identitySelectors is read locked during an IdentityPolicy update so -// that the the policy is always updated using a coherent set of -// cached selections. -// -// identitySelector is used as a map key, so it must not be implemented by a -// map, slice, or a func, or a runtime panic will be triggered. In all -// cases below identitySelector is being implemented by structs. -// -// identitySelector is used in the policy engine as a map key, -// so it must always be given to the user as a pointer to the actual type. -// (The public methods only expose the CachedSelector interface.) -type identitySelector struct { - source selectorSource - key string - selections atomic.Pointer[identity.NumericIdentitySlice] - users map[CachedSelectionUser]struct{} - cachedSelections map[identity.NumericIdentity]struct{} - metadataLbls labels.LabelArray -} - -// identitySelector implements CachedSelector -var _ CachedSelector = (*identitySelector)(nil) - -type selectorSource interface { - matches(scIdentity) bool - - remove(identityNotifier) -} - -// fqdnSelector is implemented as an updatable bag-of-labels. Any identity that matches -// any of the labels in wantLabels is selected. Unlike the identitySelector, this selector -// is "mutable" in that the FQDN subsystem may update the set of matched labels arbitrarily. -type fqdnSelector struct { - selector api.FQDNSelector - wantLabels labels.LabelArray // MUST be sorted -} - -func (f *fqdnSelector) remove(dnsProxy identityNotifier) { - dnsProxy.UnregisterForIPUpdatesLocked(f.selector) -} - -// setSelectorIPs updates the set of desired labels associated with this selector. -// lock must be held -func (f *fqdnSelector) setSelectorIPs(ips []netip.Addr) { - lbls := make(labels.LabelArray, 0, len(ips)) - for _, ip := range ips { - l, err := labels.IPStringToLabel(ip.String()) - if err != nil { - // not possible - continue - } - lbls = append(lbls, l) - } - lbls.Sort() - f.wantLabels = lbls -} - -// matches returns true if the identity contains at least one label -// that is in wantLabels. -// This is reasonably efficient, as it relies on both arrays being sorted. -func (f *fqdnSelector) matches(identity scIdentity) bool { - wantIdx := 0 - checkIdx := 0 - - // Both arrays are sorted; walk through until we get a match - for wantIdx < len(f.wantLabels) && checkIdx < len(identity.lbls) { - want := f.wantLabels[wantIdx] - check := identity.lbls[checkIdx] - if want == check { - return true - } - - // Not equal, bump - if check.Key < want.Key { - checkIdx++ - } else { - wantIdx++ - } - } - - return false -} - -type labelIdentitySelector struct { - selector api.EndpointSelector - namespaces []string // allowed namespaces, or "" -} - -// xxxMatches returns true if the CachedSelector matches given labels. -// This is slow, but only used for policy tracing, so it's OK. -func (l *labelIdentitySelector) xxxMatches(labels labels.LabelArray) bool { - return l.selector.Matches(labels) -} - -func (l *labelIdentitySelector) matchesNamespace(ns string) bool { - if len(l.namespaces) > 0 { - if ns != "" { - for i := range l.namespaces { - if ns == l.namespaces[i] { - return true - } - } - } - // namespace required, but no match - return false - } - // no namespace required, match - return true -} - -func (l *labelIdentitySelector) matches(identity scIdentity) bool { - return l.matchesNamespace(identity.namespace) && l.selector.Matches(identity.lbls) -} - -func (l *labelIdentitySelector) remove(_ identityNotifier) { - // only useful for fqdn selectors -} - -// lock must be held -// -// The caller is responsible for making sure the same identity is not -// present in both 'added' and 'deleted'. -func (i *identitySelector) notifyUsers(sc *SelectorCache, added, deleted []identity.NumericIdentity, wg *sync.WaitGroup) { - for user := range i.users { - // pass 'f' to the user as '*fqdnSelector' - sc.queueUserNotification(user, i, added, deleted, wg) - } -} - -// Equal is used by checker.Equals, and only considers the identity of the selector, -// ignoring the internal state! -func (i *identitySelector) Equal(b *identitySelector) bool { - return i.key == b.key -} - -// -// CachedSelector implementation (== Public API) -// -// No locking needed. -// - -// GetSelections returns the set of numeric identities currently -// selected. The cached selections can be concurrently updated. In -// that case GetSelections() will return either the old or new version -// of the selections. If the old version is returned, the user is -// guaranteed to receive a notification including the update. -func (i *identitySelector) GetSelections() identity.NumericIdentitySlice { - selections := i.selections.Load() - if selections == nil { - return emptySelection - } - return *selections -} - -func (i *identitySelector) GetMetadataLabels() labels.LabelArray { - return i.metadataLbls -} - -// Selects return 'true' if the CachedSelector selects the given -// numeric identity. -func (i *identitySelector) Selects(nid identity.NumericIdentity) bool { - if i.IsWildcard() { - return true - } - nids := i.GetSelections() - idx := sort.Search(len(nids), func(i int) bool { return nids[i] >= nid }) - return idx < len(nids) && nids[idx] == nid -} - -// IsWildcard returns true if the endpoint selector selects all -// endpoints. -func (i *identitySelector) IsWildcard() bool { - return i.key == wildcardSelectorKey -} - -// IsNone returns true if the endpoint selector never selects anything. -func (i *identitySelector) IsNone() bool { - return i.key == noneSelectorKey -} - -// String returns the map key for this selector -func (i *identitySelector) String() string { - return i.key -} - -// -// identitySelector implementation (== internal API) -// - -// lock must be held -func (i *identitySelector) addUser(user CachedSelectionUser) (added bool) { - if _, exists := i.users[user]; exists { - return false - } - i.users[user] = struct{}{} - return true -} - -// locks must be held for the dnsProxy and the SelectorCache (if the selector is a FQDN selector) -func (i *identitySelector) removeUser(user CachedSelectionUser) (last bool) { - delete(i.users, user) - return len(i.users) == 0 -} - -// lock must be held -func (i *identitySelector) numUsers() int { - return len(i.users) -} - -// updateSelections updates the immutable slice representation of the -// cached selections after the cached selections have been changed. -// -// lock must be held -func (i *identitySelector) updateSelections() { - selections := make(identity.NumericIdentitySlice, len(i.cachedSelections)) - idx := 0 - for nid := range i.cachedSelections { - selections[idx] = nid - idx++ - } - // Sort the numeric identities so that the map iteration order - // does not matter. This makes testing easier, but may help - // identifying changes easier also otherwise. - sort.Slice(selections, func(i, j int) bool { - return selections[i] < selections[j] - }) - i.setSelections(&selections) -} - -func (i *identitySelector) setSelections(selections *identity.NumericIdentitySlice) { - if len(*selections) > 0 { - i.selections.Store(selections) - } else { - i.selections.Store(&emptySelection) - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/trafficdirection/doc.go b/vendor/github.com/cilium/cilium/pkg/policy/trafficdirection/doc.go deleted file mode 100644 index 82557818872..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/trafficdirection/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// package trafficdirection specifies the directionality of policy in a -// numeric representation. -package trafficdirection diff --git a/vendor/github.com/cilium/cilium/pkg/policy/trafficdirection/trafficdirection.go b/vendor/github.com/cilium/cilium/pkg/policy/trafficdirection/trafficdirection.go deleted file mode 100644 index 9b530cfc505..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/trafficdirection/trafficdirection.go +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package trafficdirection - -// TrafficDirection specifies the directionality of policy (ingress or egress). -type TrafficDirection uint8 - -const ( - // Invalid represents an invalid traffic direction. - Invalid TrafficDirection = 2 - - // Egress represents egress traffic. - Egress TrafficDirection = 1 - - // Ingress represents ingress traffic. - Ingress TrafficDirection = 0 -) - -// Uint8 normalizes the TrafficDirection for insertion into BPF maps. -func (td TrafficDirection) Uint8() uint8 { - return uint8(td) -} - -func (td TrafficDirection) String() string { - if td == Egress { - return "Egress" - } else if td == Ingress { - return "Ingress" - } - - return "Unknown" -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/trigger.go b/vendor/github.com/cilium/cilium/pkg/policy/trigger.go deleted file mode 100644 index bec4139b43d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/trigger.go +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "strings" - "sync" - - "github.com/cilium/cilium/pkg/endpoint/regeneration" - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/option" - "github.com/cilium/cilium/pkg/time" - "github.com/cilium/cilium/pkg/trigger" -) - -// TriggerPolicyUpdates triggers the policy update trigger. -// -// To follow what the trigger does, see NewUpdater. -func (u *Updater) TriggerPolicyUpdates(force bool, reason string) { - if force { - log.Debugf("Artificially increasing policy revision to enforce policy recalculation") - u.repo.BumpRevision() - } - - u.TriggerWithReason(reason) -} - -// NewUpdater returns a new Updater instance to handle triggering policy -// updates ready for use. -func NewUpdater(r *Repository, regen regenerator) (*Updater, error) { - t, err := trigger.NewTrigger(trigger.Parameters{ - Name: "policy_update", - MetricsObserver: &TriggerMetrics{}, - MinInterval: option.Config.PolicyTriggerInterval, - // Triggers policy updates for every local endpoint. - // This may be called in a variety of situations: after policy changes, - // changes in agent configuration, changes in endpoint labels, and - // change of security identities. - TriggerFunc: func(reasons []string) { - log.Debug("Regenerating all endpoints") - reason := strings.Join(reasons, ", ") - - regenerationMetadata := ®eneration.ExternalRegenerationMetadata{ - Reason: reason, - RegenerationLevel: regeneration.RegenerateWithoutDatapath, - } - regen.RegenerateAllEndpoints(regenerationMetadata) - }, - }) - if err != nil { - return nil, err - } - return &Updater{ - Trigger: t, - repo: r, - }, nil -} - -// Updater is responsible for triggering policy updates, in order to perform -// policy recalculation. -type Updater struct { - *trigger.Trigger - - repo *Repository -} - -type regenerator interface { - // RegenerateAllEndpoints should trigger a regeneration of all endpoints. - RegenerateAllEndpoints(*regeneration.ExternalRegenerationMetadata) *sync.WaitGroup -} - -// TriggerMetrics handles the metrics for trigger policy recalculations. -type TriggerMetrics struct{} - -func (p *TriggerMetrics) QueueEvent(reason string) { - if metrics.TriggerPolicyUpdateTotal.IsEnabled() { - metrics.TriggerPolicyUpdateTotal.WithLabelValues(reason).Inc() - } -} - -func (p *TriggerMetrics) PostRun(duration, latency time.Duration, folds int) { - if metrics.TriggerPolicyUpdateCallDuration.IsEnabled() { - metrics.TriggerPolicyUpdateCallDuration.WithLabelValues("duration").Observe(duration.Seconds()) - metrics.TriggerPolicyUpdateCallDuration.WithLabelValues("latency").Observe(latency.Seconds()) - } - if metrics.TriggerPolicyUpdateFolds.IsEnabled() { - metrics.TriggerPolicyUpdateFolds.Set(float64(folds)) - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/utils.go b/vendor/github.com/cilium/cilium/pkg/policy/utils.go deleted file mode 100644 index fa3c4859038..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/utils.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import "github.com/cilium/cilium/pkg/labels" - -// JoinPath returns a joined path from a and b. -func JoinPath(a, b string) string { - return a + labels.PathDelimiter + b -} diff --git a/vendor/github.com/cilium/cilium/pkg/policy/visibility.go b/vendor/github.com/cilium/cilium/pkg/policy/visibility.go deleted file mode 100644 index b02315f63d8..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/policy/visibility.go +++ /dev/null @@ -1,223 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package policy - -import ( - "fmt" - "regexp" - "strconv" - "strings" - - "github.com/cilium/cilium/pkg/policy/api" - "github.com/cilium/cilium/pkg/u8proto" -) - -var ( - singleAnnotationRegex = "<(Ingress|Egress)/([1-9][0-9]{1,5})/(TCP|UDP|SCTP|ANY)/([A-Za-z]{3,32})>" - annotationRegex = regexp.MustCompile(fmt.Sprintf(`^((%s)(,(%s))*)$`, singleAnnotationRegex, singleAnnotationRegex)) -) - -func validateL7ProtocolWithDirection(dir string, proto L7ParserType) error { - switch proto { - case ParserTypeHTTP: - return nil - case ParserTypeDNS: - if dir == "Egress" { - return nil - } - case ParserTypeKafka: - return nil - default: - return fmt.Errorf("unsupported parser type %s", proto) - - } - return fmt.Errorf("%s not allowed with direction %s", proto, dir) -} - -// NewVisibilityPolicy generates the VisibilityPolicy that is encoded in the -// annotation parameter. -// Returns an error: -// - if the annotation does not correspond to the expected -// format for a visibility annotation. -// - if there is a conflict between the state encoded in the annotation (e.g., -// different L7 protocols for the same L4 port / protocol / traffic direction. -func NewVisibilityPolicy(anno string) (*VisibilityPolicy, error) { - if !annotationRegex.MatchString(anno) { - return nil, fmt.Errorf("annotation for proxy visibility did not match expected format %s", annotationRegex.String()) - } - - nvp := &VisibilityPolicy{ - Ingress: make(DirectionalVisibilityPolicy), - Egress: make(DirectionalVisibilityPolicy), - } - - // TODO: look into using regex groups. - anSplit := strings.Split(anno, ",") - for i := range anSplit { - proxyAnnoSplit := strings.Split(anSplit[i], "/") - if len(proxyAnnoSplit) != 4 { - err := fmt.Errorf("invalid number of fields (%d) in annotation", len(proxyAnnoSplit)) - return nil, err - } - // Ingress|Egress - // Don't need to validate the content itself, regex already did that. - direction := proxyAnnoSplit[0][1:] - port := proxyAnnoSplit[1] - - portInt, err := strconv.ParseUint(port, 10, 16) - if err != nil { - return nil, fmt.Errorf("unable to parse port: %w", err) - } - - // Don't need to validate, regex already did that. - l4Proto := proxyAnnoSplit[2] - u8Prot, err := u8proto.ParseProtocol(l4Proto) - if err != nil { - return nil, fmt.Errorf("invalid L4 protocol %s", l4Proto) - } - - // ANY equates to TCP and UDP in the datapath; the datapath itself does - // not support 'Any' protocol paired with a port at L4. - var protos []u8proto.U8proto - if u8Prot == u8proto.ANY { - protos = append(protos, u8proto.TCP) - protos = append(protos, u8proto.UDP) - protos = append(protos, u8proto.SCTP) - } else { - protos = append(protos, u8Prot) - } - // Remove trailing '>'. - l7Protocol := L7ParserType(strings.ToLower(proxyAnnoSplit[3][:len(proxyAnnoSplit[3])-1])) - - if err := validateL7ProtocolWithDirection(direction, l7Protocol); err != nil { - return nil, err - } - - var dvp DirectionalVisibilityPolicy - var ingress bool - if direction == "Ingress" { - dvp = nvp.Ingress - ingress = true - } else { - dvp = nvp.Egress - ingress = false - } - - for _, prot := range protos { - pp := strconv.FormatUint(portInt, 10) + "/" + prot.String() - if res, ok := dvp[pp]; ok { - if res.Parser != l7Protocol { - return nil, fmt.Errorf("duplicate annotations with different L7 protocols %s and %s for %s", res.Parser, l7Protocol, pp) - } - } - - l7Meta := generateL7AllowAllRules(l7Protocol) - - dvp[pp] = &VisibilityMetadata{ - Parser: l7Protocol, - Port: uint16(portInt), - Proto: prot, - Ingress: ingress, - L7Metadata: l7Meta, - } - } - } - - return nvp, nil -} - -func generateL7AllowAllRules(parser L7ParserType) L7DataMap { - var m L7DataMap - switch parser { - case ParserTypeDNS: - m = L7DataMap{} - // Create an entry to explicitly allow all at L7 for DNS. - emptyL3Selector := &identitySelector{source: &labelIdentitySelector{selector: api.WildcardEndpointSelector}, key: wildcardSelectorKey} - m[emptyL3Selector] = &PerSelectorPolicy{ - L7Rules: api.L7Rules{ - DNS: []api.PortRuleDNS{ - { - MatchPattern: "*", - }, - }, - }, - } - } - return m -} - -// VisibilityMetadata encodes state about what type of traffic should be -// redirected to an L7Proxy. Implements the ProxyPolicy interface. -// TODO: an L4Filter could be composed of this type. -type VisibilityMetadata struct { - // Parser represents the proxy to which traffic should be redirected. - Parser L7ParserType - - // Port, in tandem with Proto, signifies which L4 port for which traffic - // should be redirected. - Port uint16 - - // Proto, in tandem with port, signifies which L4 protocol for which traffic - // should be redirected. - Proto u8proto.U8proto - - // Ingress specifies whether ingress traffic at the given L4 port / protocol - // should be redirected to the proxy. - Ingress bool - - // L7Metadata encodes optional information what is allowed at L7 for - // visibility. Some specific protocol parsers do not need this set for - // allowing of traffic (e.g., HTTP), but some do (e.g., DNS). - L7Metadata L7DataMap -} - -// DirectionalVisibilityPolicy is a mapping of VisibilityMetadata keyed by -// L4 Port / L4 Protocol (e.g., 80/TCP) for a given traffic direction (e.g., -// ingress or egress). This encodes at which L4 Port / L4 Protocol traffic -// should be redirected to a given L7 proxy. An empty instance of this type -// indicates that no traffic should be redirected. -type DirectionalVisibilityPolicy map[string]*VisibilityMetadata - -// VisibilityPolicy represents for both ingress and egress which types of -// traffic should be redirected to a given L7 proxy. -type VisibilityPolicy struct { - Ingress DirectionalVisibilityPolicy - Egress DirectionalVisibilityPolicy - Error error -} - -// CopyL7RulesPerEndpoint returns a shallow copy of the L7Metadata of the -// L4Filter. -func (v *VisibilityMetadata) CopyL7RulesPerEndpoint() L7DataMap { - if v.L7Metadata != nil { - return v.L7Metadata.ShallowCopy() - } - return nil -} - -// GetL7Parser returns the L7ParserType for this VisibilityMetadata. -func (v *VisibilityMetadata) GetL7Parser() L7ParserType { - return v.Parser -} - -// GetIngress returns whether the VisibilityMetadata applies at ingress or -// egress. -func (v *VisibilityMetadata) GetIngress() bool { - return v.Ingress -} - -// GetPort returns at which port the VisibilityMetadata applies. -func (v *VisibilityMetadata) GetPort() uint16 { - return v.Port -} - -// GetProtocol returns the protocol where the VisibilityMetadata applies. -func (v *VisibilityMetadata) GetProtocol() uint8 { - return uint8(v.Proto) -} - -// GetListener returns the optional listener name. -func (l4 *VisibilityMetadata) GetListener() string { - return "" -} diff --git a/vendor/github.com/cilium/cilium/pkg/promise/promise.go b/vendor/github.com/cilium/cilium/pkg/promise/promise.go deleted file mode 100644 index 1ca251eb075..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/promise/promise.go +++ /dev/null @@ -1,143 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package promise - -import ( - "context" - "sync" - - "github.com/cilium/cilium/pkg/lock" -) - -// A promise for a future value. -type Promise[T any] interface { - // Await blocks until the value is resolved or rejected. - Await(context.Context) (T, error) -} - -// Resolver can resolve or reject a promise. -// These methods are separate from 'Promise' to make it clear where the promise is resolved -// from. -type Resolver[T any] interface { - // Resolve a promise. Unblocks all Await()s. Future calls of Await() - // return the resolved value immediately. - // - // Only the first call to resolve (or reject) has an effect and - // further calls are ignored. - Resolve(T) - - // Reject a promise with an error. - Reject(error) -} - -// New creates a new promise for value T. -// Returns a resolver and the promise. -func New[T any]() (Resolver[T], Promise[T]) { - promise := &promise[T]{} - promise.cond = sync.NewCond(promise) - return promise, promise -} - -const ( - promiseUnresolved = iota - promiseResolved - promiseRejected -) - -type promise[T any] struct { - lock.Mutex - cond *sync.Cond - state int - value T - err error -} - -// Resolve informs all other codepaths who are Await()ing on the received -// promise that T is now successfully initialized and available for usage. -// -// Initialization logic for T should either call Resolve() or Reject(), and -// must not call these functions more than once. -func (p *promise[T]) Resolve(value T) { - p.Lock() - defer p.Unlock() - if p.state != promiseUnresolved { - return - } - p.state = promiseResolved - p.value = value - p.cond.Broadcast() -} - -// Reject informs all other codepaths who are Await()ing on the received -// promise that T could not be initialized and cannot be used to due the -// specified error reason. -// -// Initialization logic for T should either call Resolve() or Reject(), and -// must not call these functions more than once. -func (p *promise[T]) Reject(err error) { - p.Lock() - defer p.Unlock() - if p.state != promiseUnresolved { - return - } - p.state = promiseRejected - p.err = err - p.cond.Broadcast() -} - -// Await blocks until the promise has been resolved, rejected or context cancelled. -func (p *promise[T]) Await(ctx context.Context) (value T, err error) { - // Fork off a goroutine to wait for cancellation and wake up. - ctx, cancel := context.WithCancel(ctx) - defer cancel() - go func() { - <-ctx.Done() - p.cond.Broadcast() - }() - - p.Lock() - defer p.Unlock() - - // Wait until the promise is resolved or context cancelled. - for p.state == promiseUnresolved && (ctx == nil || ctx.Err() == nil) { - p.cond.Wait() - } - - if ctx.Err() != nil { - err = ctx.Err() - } else if p.state == promiseResolved { - value = p.value - } else { - err = p.err - } - return -} - -type wrappedPromise[T any] func(context.Context) (T, error) - -func (await wrappedPromise[T]) Await(ctx context.Context) (T, error) { - return await(ctx) -} - -// Map transforms the value of a promise with the provided function. -func Map[A, B any](p Promise[A], transform func(A) B) Promise[B] { - return wrappedPromise[B](func(ctx context.Context) (out B, err error) { - v, err := p.Await(ctx) - if err != nil { - return out, err - } - return transform(v), nil - }) -} - -// MapError transforms the error of a rejected promise with the provided function. -func MapError[A any](p Promise[A], transform func(error) error) Promise[A] { - return wrappedPromise[A](func(ctx context.Context) (out A, err error) { - v, err := p.Await(ctx) - if err != nil { - err = transform(err) - } - return v, err - }) -} diff --git a/vendor/github.com/cilium/cilium/pkg/proxy/accesslog/record.go b/vendor/github.com/cilium/cilium/pkg/proxy/accesslog/record.go deleted file mode 100644 index 1044fc67e0f..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/proxy/accesslog/record.go +++ /dev/null @@ -1,303 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package accesslog - -import ( - "net" - "net/http" - "net/url" -) - -// FlowType is the type to indicate the flow direction -type FlowType string - -const ( - // TypeRequest is a request message - TypeRequest FlowType = "Request" - - // TypeResponse is a response to a request - TypeResponse FlowType = "Response" - - // TypeSample is a packet sample - TypeSample FlowType = "Sample" -) - -// FlowVerdict is the verdict passed on the flow -type FlowVerdict string - -const ( - // VerdictForwarded indicates that the flow was forwarded - VerdictForwarded FlowVerdict = "Forwarded" - - // VerdictDenied indicates that the flow was denied - VerdictDenied = "Denied" - - // VerdictError indicates that there was an error processing the flow - VerdictError = "Error" - - // VerdictError indicates that the flow was redirected through the proxy - VerdictRedirected = "Redirected" -) - -// ObservationPoint is the type used to describe point of observation -type ObservationPoint string - -const ( - // Ingress indicates event was generated at ingress - Ingress ObservationPoint = "Ingress" - - // Egress indicates event was generated at egress - Egress ObservationPoint = "Egress" -) - -// IPVersion indicates the flow's IP version -type IPVersion uint8 - -const ( - // VersionIPv4 indicates IPv4 - VersionIPv4 IPVersion = iota - // VersionIPV6 indicates IPv6 - VersionIPV6 -) - -// EndpointInfo contains information about the sending (resp. receiving) endpoint. -// If the field using this struct is SourceEndpoint, all fields correspond to -// the sending endpoint, if the field using this struct is DestinationEndpoint, -// then all fields correspond to the receiving endpoint. -type EndpointInfo struct { - // ID is the endpoint id - ID uint64 - - // IPv4 is the IPv4 address of the endpoint - IPv4 string - - // IPv6 is the IPv6 address of the endpoint - IPv6 string - - // Port represents the source point for SourceEndpoint and the - // destination port for DestinationEndpoint - Port uint16 - - // Identity is the security identity of the endpoint - Identity uint64 - - // Labels is the list of security relevant labels of the endpoint - Labels []string -} - -// ServiceInfo contains information about the Kubernetes service -type ServiceInfo struct { - // Name specifies the name of the service - Name string - - // IPPort is the IP and transport port of the service - IPPort IPPort -} - -// FlowEvent identifies the event type of an L4 log record -type FlowEvent string - -const ( - // FlowAdded means that this is a new flow - FlowAdded FlowEvent = "FlowAdded" - - // FlowRemoved means that a flow has been deleted - FlowRemoved FlowEvent = "FlowRemoved" -) - -// DropReason indicates the reason why the flow was dropped -type DropReason uint16 - -// TransportProtocol defines layer 4 protocols -type TransportProtocol uint16 - -// NodeAddressInfo holds addressing information of the node the agent runs on -type NodeAddressInfo struct { - IPv4 string - IPv6 string -} - -// IPPort bundles an IP address and port number -type IPPort struct { - IP string - Port uint16 -} - -// LogRecord is the structure used to log individual request/response -// processing events or sampled packets -type LogRecord struct { - // Type is the type of the flow - Type FlowType - - // Timestamp is the start of a request, the end of a response, or the time the packet has been sampled, - // depending on the flow type - Timestamp string - - // NodeAddressInfo contains the IPs of the node where the event was generated - NodeAddressInfo NodeAddressInfo - - // ObservationPoint indicates where the flow was observed - ObservationPoint ObservationPoint - - // SourceEndpoint is information about the source endpoint, if available - SourceEndpoint EndpointInfo - - // DestinationEndpoint is information about the destination endpoint, if available - DestinationEndpoint EndpointInfo - - // IPVersion indicates the version of the IP protocol in use - IPVersion IPVersion - - // Verdict is the verdict on the flow taken - Verdict FlowVerdict - - // Info includes information about the rule that matched or the error - // that occurred - Info string - - // Metadata is additional arbitrary metadata - Metadata []string - - // TransportProtocol identifies the flow's transport layer (layer 4) protocol - TransportProtocol TransportProtocol - - // FlowEvent identifies the flow event for L4 log record - FlowEvent FlowEvent - - // ServiceInfo identifies the Kubernetes service this flow went through. It is set to - // nil if the flow did not go though any service. Note that this field is always set to - // nil if ObservationPoint is Ingress since currently Cilium cannot tell at ingress - // whether the packet went through a service before. - ServiceInfo *ServiceInfo - - // DropReason indicates the reason of the drop. This field is set if and only if - // the Verdict field is set to VerdictDenied. Otherwise it's set to nil. - DropReason *DropReason - - // The following are the protocol specific parts. Only one of the - // following should ever be set. Unused fields will be omitted - - // HTTP contains information for HTTP request/responses - HTTP *LogRecordHTTP `json:"HTTP,omitempty"` - - // Kafka contains information for Kafka request/responses - Kafka *LogRecordKafka `json:"Kafka,omitempty"` - - // DNS contains information for DNS request/responses - DNS *LogRecordDNS `json:"DNS,omitempty"` - - // L7 contains information about generic L7 protocols - L7 *LogRecordL7 `json:"L7,omitempty"` -} - -// LogRecordHTTP contains the HTTP specific portion of a log record -type LogRecordHTTP struct { - // Code is the HTTP code being returned - Code int - - // Method is the method of the request - Method string - - // URL is the URL of the request - URL *url.URL - - // Protocol is the HTTP protocol in use - Protocol string - - // Headers are all HTTP headers present in the request and response. Request records - // contain request headers, while response headers contain response headers and the - // 'x-request-id' from the request headers, if any. If response headers already contain - // a 'x-request-id' with a different value then both will be included as two separate - // entries with the same key. - Headers http.Header - - // MissingHeaders are HTTP request headers that were deemed missing from the request - MissingHeaders http.Header - - // RejectedHeaders are HTTP request headers that were rejected from the request - RejectedHeaders http.Header -} - -// KafkaTopic contains the topic for requests -type KafkaTopic struct { - Topic string `json:"Topic,omitempty"` -} - -// LogRecordKafka contains the Kafka-specific portion of a log record -type LogRecordKafka struct { - // ErrorCode is the Kafka error code being returned - ErrorCode int - - // APIVersion of the Kafka api used - APIVersion int16 - - // APIKey for Kafka message - // Reference: https://kafka.apache.org/protocol#protocol_api_keys - APIKey string - - // CorrelationID is a user-supplied integer value that will be passed - // back with the response - CorrelationID int32 - - // Topic of the request, currently is a single topic - // Note that this string can be empty since not all messages use - // Topic. example: LeaveGroup, Heartbeat - Topic KafkaTopic -} - -type DNSDataSource string - -const ( - // DNSSourceProxy indicates that the DNS record was created by a proxy - // intercepting a DNS request/response. - DNSSourceProxy DNSDataSource = "proxy" -) - -// LogRecordDNS contains the DNS specific portion of a log record -type LogRecordDNS struct { - // Query is the name in the original query - Query string `json:"Query,omitempty"` - - // IPs are any IPs seen in this response. - // This field is filled only for DNS responses with IPs. - IPs []net.IP `json:"IPs,omitempty"` - - // TTL is the lowest applicable TTL for this data - // This field is filled only for DNS responses. - TTL uint32 `json:"TTL,omitempty"` - - // CNAMEs are any CNAME records seen in the response leading from Query - // to the IPs. - // This field is filled only for DNS responses with CNAMEs to IP data. - CNAMEs []string `json:"CNAMEs,omitempty"` - - // ObservationSource represents the source of the data in this LogRecordDNS. - // Empty or undefined may indicate older cilium versions, as it is expected - // to be filled in. - ObservationSource DNSDataSource `json:"ObservationSource,omitempty"` - - // RCode is the response code - // defined as per https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6 - // Use github.com/cilium/dns.RcodeToString map to retrieve string representation - RCode int `json:"RCode,omitempty"` - - // QTypes are question types in DNS message - // https://www.ietf.org/rfc/rfc1035.txt - // Use github.com/cilium/dns.TypeToString map to retrieve string representation - QTypes []uint16 `json:"QTypes,omitempty"` - - // AnswerTypes are record types in the answer section - // https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4 - // Use github.com/cilium/dns.TypeToString map to retrieve string representation - AnswerTypes []uint16 `json:"AnswerTypes,omitempty"` -} - -// LogRecordL7 contains the generic L7 portion of a log record -type LogRecordL7 struct { - // Proto is the name of the protocol this record represents - Proto string `json:"Proto,omitempty"` - - // Fields is a map of key-value pairs describing the protocol - Fields map[string]string -} diff --git a/vendor/github.com/cilium/cilium/pkg/rand/safe_rand.go b/vendor/github.com/cilium/cilium/pkg/rand/safe_rand.go deleted file mode 100644 index 9829484a181..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/rand/safe_rand.go +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package rand - -import ( - "math/rand" - - "github.com/cilium/cilium/pkg/lock" -) - -// SafeRand is a concurrency-safe source of pseudo-random numbers. The Go -// stdlib's math/rand.Source is not concurrency-safe. The global source in -// math/rand would be concurrency safe (due to its internal use of -// lockedSource), but it is prone to inter-package interference with the PRNG -// state. -// Also see https://github.com/cilium/cilium/issues/10988 -type SafeRand struct { - mu lock.Mutex - r *rand.Rand -} - -func NewSafeRand(seed int64) *SafeRand { - return &SafeRand{r: rand.New(rand.NewSource(seed))} -} - -func (sr *SafeRand) Seed(seed int64) { - sr.mu.Lock() - sr.r.Seed(seed) - sr.mu.Unlock() -} - -func (sr *SafeRand) Int63() int64 { - sr.mu.Lock() - v := sr.r.Int63() - sr.mu.Unlock() - return v -} - -func (sr *SafeRand) Int63n(n int64) int64 { - sr.mu.Lock() - v := sr.r.Int63n(n) - sr.mu.Unlock() - return v -} - -func (sr *SafeRand) Uint32() uint32 { - sr.mu.Lock() - v := sr.r.Uint32() - sr.mu.Unlock() - return v -} - -func (sr *SafeRand) Uint64() uint64 { - sr.mu.Lock() - v := sr.r.Uint64() - sr.mu.Unlock() - return v -} - -func (sr *SafeRand) Intn(n int) int { - sr.mu.Lock() - v := sr.r.Intn(n) - sr.mu.Unlock() - return v -} - -func (sr *SafeRand) Float64() float64 { - sr.mu.Lock() - v := sr.r.Float64() - sr.mu.Unlock() - return v -} - -func (sr *SafeRand) Perm(n int) []int { - sr.mu.Lock() - v := sr.r.Perm(n) - sr.mu.Unlock() - return v - -} - -func (sr *SafeRand) Shuffle(n int, swap func(i, j int)) { - sr.mu.Lock() - sr.r.Shuffle(n, swap) - sr.mu.Unlock() -} diff --git a/vendor/github.com/cilium/cilium/pkg/rate/api_limiter.go b/vendor/github.com/cilium/cilium/pkg/rate/api_limiter.go deleted file mode 100644 index 68728f23517..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/rate/api_limiter.go +++ /dev/null @@ -1,901 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package rate - -import ( - "context" - "fmt" - "math" - "strconv" - "strings" - - "github.com/google/uuid" - "github.com/sirupsen/logrus" - "golang.org/x/sync/semaphore" - "golang.org/x/time/rate" - - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/time" -) - -var log = logging.DefaultLogger.WithField(logfields.LogSubsys, "rate") - -const ( - defaultMeanOver = 10 - defaultDelayedAdjustmentFactor = 0.50 - defaultMaxAdjustmentFactor = 100.0 - - // waitSemaphoreWeight is the maximum resolution of the wait semaphore, - // the higher this value, the more accurate the ParallelRequests - // requirement is implemented - waitSemaphoreResolution = 10000000 - - // logUUID is the UUID of the request. - logUUID = "uuid" - // logAPICallName is the name of the underlying API call, such as - // "endpoint-create". - logAPICallName = "name" - // logProcessingDuration is the time taken to perform the actual underlying - // API call such as creating an endpoint or deleting an endpoint. This is - // the time between when the request has finished waiting (or being - // delayed), to when the underlying action has finished. - logProcessingDuration = "processingDuration" - // logParallelRequests is the number of allowed parallel requests. See - // APILimiter.parallelRequests. - logParallelRequests = "parallelRequests" - // logMinWaitDuration represents APILimiterParameters.MinWaitDuration. - logMinWaitDuration = "minWaitDuration" - // logMaxWaitDuration represents APILimiterParameters.MaxWaitDuration. - logMaxWaitDuration = "maxWaitDuration" - // logMaxWaitDurationLimiter is the actual / calculated maximum threshold - // for a request to wait. Any request exceeding this threshold will not be - // processed. - logMaxWaitDurationLimiter = "maxWaitDurationLimiter" - // logWaitDurationLimit is the actual / calculated amount of time - // determined by the underlying rate-limiting library that this request - // must wait before the rate limiter releases it, so that it can take the - // underlying action. See golang.org/x/time/rate.(*Reservation).Delay(). - logWaitDurationLimit = "waitDurationLimiter" - // logWaitDurationTotal is the actual total amount of time that this - // request spent waiting to be released by the rate limiter. - logWaitDurationTotal = "waitDurationTotal" - // logLimit is the rate limit. See APILimiterParameters.RateLimit. - logLimit = "limit" - // logLimit is the burst rate. See APILimiterParameters.RateBurst. - logBurst = "burst" - // logTotalDuration is the total time between when the request was first - // scheduled (entered the rate limiter) to when it completed processing of - // the underlying action. This is the absolute total time of the request - // from beginning to end. - logTotalDuration = "totalDuration" - // logSkipped represents whether the rate limiter will skip rate-limiting - // this request. See APILimiterParameters.SkipInitial. - logSkipped = "rateLimiterSkipped" -) - -type outcome string - -const ( - outcomeParallelMaxWait outcome = "fail-parallel-wait" - outcomeLimitMaxWait outcome = "fail-limit-wait" - outcomeReqCancelled outcome = "request-cancelled" - outcomeErrorCode int = 429 - outcomeSuccessCode int = 200 -) - -// APILimiter is an extension to x/time/rate.Limiter specifically for Cilium -// API calls. It allows to automatically adjust the rate, burst and maximum -// parallel API calls to stay as close as possible to an estimated processing -// time. -type APILimiter struct { - // name is the name of the API call. This field is immutable after - // NewAPILimiter() - name string - - // params is the parameters of the limiter. This field is immutable - // after NewAPILimiter() - params APILimiterParameters - - // metrics points to the metrics implementation provided by the caller - // of the APILimiter. This field is immutable after NewAPILimiter() - metrics MetricsObserver - - // mutex protects all fields below this line - mutex lock.RWMutex - - // meanProcessingDuration is the latest mean processing duration, - // calculated based on processingDurations - meanProcessingDuration float64 - - // processingDurations is the last params.MeanOver processing durations - processingDurations []time.Duration - - // meanWaitDuration is the latest mean wait duration, calculated based - // on waitDurations - meanWaitDuration float64 - - // waitDurations is the last params.MeanOver wait durations - waitDurations []time.Duration - - // parallelRequests is the currently allowed maximum parallel - // requests. This defaults to params.MaxParallel requests and is then - // adjusted automatically if params.AutoAdjust is enabled. - parallelRequests int - - // adjustmentFactor is the latest adjustment factor. It is the ratio - // between params.EstimatedProcessingDuration and - // meanProcessingDuration. - adjustmentFactor float64 - - // limiter is the rate limiter based on params.RateLimit and - // params.RateBurst. - limiter *rate.Limiter - - // currentRequestsInFlight is the number of parallel API requests - // currently in flight - currentRequestsInFlight int - - // requestsProcessed is the total number of processed requests - requestsProcessed int64 - - // requestsScheduled is the total number of scheduled requests - requestsScheduled int64 - - // parallelWaitSemaphore is the semaphore used to implement - // params.MaxParallel. It is initialized with a capacity of - // waitSemaphoreResolution and each API request will acquire - // waitSemaphoreResolution/params.MaxParallel tokens. - parallelWaitSemaphore *semaphore.Weighted -} - -// APILimiterParameters is the configuration of an APILimiter. The structure -// may not be mutated after it has been passed into NewAPILimiter(). -type APILimiterParameters struct { - // EstimatedProcessingDuration is the estimated duration an API call - // will take. This value is used if AutoAdjust is enabled to - // automatically adjust rate limits to stay as close as possible to the - // estimated processing duration. - EstimatedProcessingDuration time.Duration - - // AutoAdjust enables automatic adjustment of the values - // ParallelRequests, RateLimit, and RateBurst in order to keep the - // mean processing duration close to EstimatedProcessingDuration - AutoAdjust bool - - // MeanOver is the number of entries to keep in order to calculate the - // mean processing and wait duration - MeanOver int - - // ParallelRequests is the parallel requests allowed. If AutoAdjust is - // enabled, the value will adjust automatically. - ParallelRequests int - - // MaxParallelRequests is the maximum parallel requests allowed. If - // AutoAdjust is enabled, then the ParalelRequests will never grow - // above MaxParallelRequests. - MaxParallelRequests int - - // MinParallelRequests is the minimum parallel requests allowed. If - // AutoAdjust is enabled, then the ParallelRequests will never fall - // below MinParallelRequests. - MinParallelRequests int - - // RateLimit is the initial number of API requests allowed per second. - // If AutoAdjust is enabled, the value will adjust automatically. - RateLimit rate.Limit - - // RateBurst is the initial allowed burst of API requests allowed. If - // AutoAdjust is enabled, the value will adjust automatically. - RateBurst int - - // MinWaitDuration is the minimum time an API request always has to - // wait before the Wait() function returns an error. - MinWaitDuration time.Duration - - // MaxWaitDuration is the maximum time an API request is allowed to - // wait before the Wait() function returns an error. - MaxWaitDuration time.Duration - - // Log enables info logging of processed API requests. This should only - // be used for low frequency API calls. - Log bool - - // DelayedAdjustmentFactor is percentage of the AdjustmentFactor to be - // applied to RateBurst and MaxWaitDuration defined as a value between - // 0.0..1.0. This is used to steer a slower reaction of the RateBurst - // and ParallelRequests compared to RateLimit. - DelayedAdjustmentFactor float64 - - // SkipInitial is the number of initial API calls for which to not - // apply any rate limiting. This is useful to define a learning phase - // in the beginning to allow for auto adjustment before imposing wait - // durations and rate limiting on API calls. - SkipInitial int - - // MaxAdjustmentFactor is the maximum adjustment factor when AutoAdjust - // is enabled. Base values will not adjust more than by this factor. - MaxAdjustmentFactor float64 -} - -// MergeUserConfig merges the provided user configuration into the existing -// parameters and returns a new copy. -func (p APILimiterParameters) MergeUserConfig(config string) (APILimiterParameters, error) { - if err := (&p).mergeUserConfig(config); err != nil { - return APILimiterParameters{}, err - } - - return p, nil -} - -// NewAPILimiter returns a new APILimiter based on the parameters and metrics implementation -func NewAPILimiter(name string, p APILimiterParameters, metrics MetricsObserver) *APILimiter { - if p.MeanOver == 0 { - p.MeanOver = defaultMeanOver - } - - if p.MinParallelRequests == 0 { - p.MinParallelRequests = 1 - } - - if p.RateBurst == 0 { - p.RateBurst = 1 - } - - if p.DelayedAdjustmentFactor == 0.0 { - p.DelayedAdjustmentFactor = defaultDelayedAdjustmentFactor - } - - if p.MaxAdjustmentFactor == 0.0 { - p.MaxAdjustmentFactor = defaultMaxAdjustmentFactor - } - - l := &APILimiter{ - name: name, - params: p, - parallelRequests: p.ParallelRequests, - parallelWaitSemaphore: semaphore.NewWeighted(waitSemaphoreResolution), - metrics: metrics, - } - - if p.RateLimit != 0 { - l.limiter = rate.NewLimiter(p.RateLimit, p.RateBurst) - } - - return l -} - -// NewAPILimiterFromConfig returns a new APILimiter based on user configuration -func NewAPILimiterFromConfig(name, config string, metrics MetricsObserver) (*APILimiter, error) { - p := &APILimiterParameters{} - - if err := p.mergeUserConfig(config); err != nil { - return nil, err - } - - return NewAPILimiter(name, *p, metrics), nil -} - -func (p *APILimiterParameters) mergeUserConfigKeyValue(key, value string) error { - switch strings.ToLower(key) { - case "rate-limit": - limit, err := parseRate(value) - if err != nil { - return fmt.Errorf("unable to parse rate %q: %w", value, err) - } - p.RateLimit = limit - case "rate-burst": - burst, err := parsePositiveInt(value) - if err != nil { - return err - } - p.RateBurst = burst - case "min-wait-duration": - minWaitDuration, err := time.ParseDuration(value) - if err != nil { - return fmt.Errorf("unable to parse duration %q: %w", value, err) - } - p.MinWaitDuration = minWaitDuration - case "max-wait-duration": - maxWaitDuration, err := time.ParseDuration(value) - if err != nil { - return fmt.Errorf("unable to parse duration %q: %w", value, err) - } - p.MaxWaitDuration = maxWaitDuration - case "estimated-processing-duration": - estProcessingDuration, err := time.ParseDuration(value) - if err != nil { - return fmt.Errorf("unable to parse duration %q: %w", value, err) - } - p.EstimatedProcessingDuration = estProcessingDuration - case "auto-adjust": - v, err := strconv.ParseBool(value) - if err != nil { - return fmt.Errorf("unable to parse bool %q: %w", value, err) - } - p.AutoAdjust = v - case "parallel-requests": - parallel, err := parsePositiveInt(value) - if err != nil { - return err - } - p.ParallelRequests = parallel - case "min-parallel-requests": - minParallel, err := parsePositiveInt(value) - if err != nil { - return err - } - p.MinParallelRequests = minParallel - case "max-parallel-requests": - maxParallel, err := parsePositiveInt(value) - if err != nil { - return err - } - p.MaxParallelRequests = int(maxParallel) - case "mean-over": - meanOver, err := parsePositiveInt(value) - if err != nil { - return err - } - p.MeanOver = meanOver - case "log": - v, err := strconv.ParseBool(value) - if err != nil { - return fmt.Errorf("unable to parse bool %q: %w", value, err) - } - p.Log = v - case "delayed-adjustment-factor": - delayedAdjustmentFactor, err := strconv.ParseFloat(value, 64) - if err != nil { - return fmt.Errorf("unable to parse float %q: %w", value, err) - } - p.DelayedAdjustmentFactor = delayedAdjustmentFactor - case "max-adjustment-factor": - maxAdjustmentFactor, err := strconv.ParseFloat(value, 64) - if err != nil { - return fmt.Errorf("unable to parse float %q: %w", value, err) - } - p.MaxAdjustmentFactor = maxAdjustmentFactor - case "skip-initial": - skipInitial, err := parsePositiveInt(value) - if err != nil { - return err - } - p.SkipInitial = skipInitial - default: - return fmt.Errorf("unknown rate limiting option %q", key) - } - - return nil -} - -func (p *APILimiterParameters) mergeUserConfig(config string) error { - tokens := strings.Split(config, ",") - for _, token := range tokens { - if token == "" { - continue - } - - t := strings.SplitN(token, ":", 2) - if len(t) != 2 { - return fmt.Errorf("unable to parse rate limit option %q, must in the form name=option:value[,option:value]", token) - } - - if err := p.mergeUserConfigKeyValue(t[0], t[1]); err != nil { - return fmt.Errorf("unable to parse rate limit option %q with value %q: %w", t[0], t[1], err) - } - } - - return nil -} - -func (l *APILimiter) Parameters() APILimiterParameters { - return l.params -} - -func (l *APILimiter) delayedAdjustment(current, min, max float64) (n float64) { - n = current * l.adjustmentFactor - n = current + ((n - current) * l.params.DelayedAdjustmentFactor) - if min > 0.0 && n < min { - n = min - } - if max > 0.0 && n > max { - n = max - } - return -} - -func (l *APILimiter) calculateAdjustmentFactor() float64 { - f := l.params.EstimatedProcessingDuration.Seconds() / l.meanProcessingDuration - if f > l.params.MaxAdjustmentFactor { - f = l.params.MaxAdjustmentFactor - } - if f < 1.0/l.params.MaxAdjustmentFactor { - f = 1.0 / l.params.MaxAdjustmentFactor - } - return f -} - -func (l *APILimiter) adjustmentLimit(newValue, initialValue float64) float64 { - return math.Max(initialValue/l.params.MaxAdjustmentFactor, math.Min(initialValue*l.params.MaxAdjustmentFactor, newValue)) -} - -func (l *APILimiter) adjustedBurst() int { - newBurst := l.delayedAdjustment(float64(l.params.RateBurst), float64(l.params.MinParallelRequests), 0.0) - return int(math.Round(l.adjustmentLimit(newBurst, float64(l.params.RateBurst)))) -} - -func (l *APILimiter) adjustedLimit() rate.Limit { - newLimit := rate.Limit(float64(l.params.RateLimit) * l.adjustmentFactor) - return rate.Limit(l.adjustmentLimit(float64(newLimit), float64(l.params.RateLimit))) -} - -func (l *APILimiter) adjustedParallelRequests() int { - newParallelRequests := l.delayedAdjustment(float64(l.params.ParallelRequests), - float64(l.params.MinParallelRequests), float64(l.params.MaxParallelRequests)) - return int(l.adjustmentLimit(newParallelRequests, float64(l.params.ParallelRequests))) -} - -func (l *APILimiter) requestFinished(r *limitedRequest, err error, code int) { - if r.finished { - return - } - - r.finished = true - - var processingDuration time.Duration - if !r.startTime.IsZero() { - processingDuration = time.Since(r.startTime) - } - - totalDuration := time.Since(r.scheduleTime) - - scopedLog := log.WithFields(logrus.Fields{ - logAPICallName: l.name, - logUUID: r.uuid, - logProcessingDuration: processingDuration, - logTotalDuration: totalDuration, - logWaitDurationTotal: r.waitDuration, - }) - - if err != nil { - scopedLog = scopedLog.WithError(err) - } - - if l.params.Log { - scopedLog.Info("API call has been processed") - } else { - scopedLog.Debug("API call has been processed") - } - - if r.waitSemaphoreWeight != 0 { - l.parallelWaitSemaphore.Release(r.waitSemaphoreWeight) - } - - l.mutex.Lock() - - if !r.startTime.IsZero() { - l.requestsProcessed++ - l.currentRequestsInFlight-- - } - - // Only auto-adjust ratelimiter using metrics from successful API requests - if err == nil { - l.processingDurations = append(l.processingDurations, processingDuration) - if exceed := len(l.processingDurations) - l.params.MeanOver; exceed > 0 { - l.processingDurations = l.processingDurations[exceed:] - } - l.meanProcessingDuration = calcMeanDuration(l.processingDurations) - - l.waitDurations = append(l.waitDurations, r.waitDuration) - if exceed := len(l.waitDurations) - l.params.MeanOver; exceed > 0 { - l.waitDurations = l.waitDurations[exceed:] - } - l.meanWaitDuration = calcMeanDuration(l.waitDurations) - - if l.params.AutoAdjust && l.params.EstimatedProcessingDuration != 0 { - l.adjustmentFactor = l.calculateAdjustmentFactor() - l.parallelRequests = l.adjustedParallelRequests() - - if l.limiter != nil { - l.limiter.SetLimit(l.adjustedLimit()) - - newBurst := l.adjustedBurst() - l.limiter.SetBurst(newBurst) - } - } - } - - values := MetricsValues{ - EstimatedProcessingDuration: l.params.EstimatedProcessingDuration.Seconds(), - WaitDuration: r.waitDuration, - MaxWaitDuration: l.params.MaxWaitDuration, - MinWaitDuration: l.params.MinWaitDuration, - MeanProcessingDuration: l.meanProcessingDuration, - MeanWaitDuration: l.meanWaitDuration, - ParallelRequests: l.parallelRequests, - CurrentRequestsInFlight: l.currentRequestsInFlight, - AdjustmentFactor: l.adjustmentFactor, - Error: err, - Outcome: string(r.outcome), - ReturnCode: code, - } - - if l.limiter != nil { - values.Limit = l.limiter.Limit() - values.Burst = l.limiter.Burst() - } - l.mutex.Unlock() - - if l.metrics != nil { - l.metrics.ProcessedRequest(l.name, values) - } -} - -// calcMeanDuration returns the mean duration in seconds -func calcMeanDuration(durations []time.Duration) float64 { - total := 0.0 - for _, t := range durations { - total += t.Seconds() - } - return total / float64(len(durations)) -} - -// LimitedRequest represents a request that is being limited. It is returned -// by Wait() and the caller of Wait() is responsible to call Done() or Error() -// when the API call has been processed or resulted in an error. It is safe to -// call Error() and then Done(). It is not safe to call Done(), Error(), or -// WaitDuration() concurrently. -type LimitedRequest interface { - Done() - Error(err error, code int) - WaitDuration() time.Duration -} - -type limitedRequest struct { - limiter *APILimiter - startTime time.Time - scheduleTime time.Time - waitDuration time.Duration - waitSemaphoreWeight int64 - uuid string - finished bool - outcome outcome -} - -// WaitDuration returns the duration the request had to wait -func (l *limitedRequest) WaitDuration() time.Duration { - return l.waitDuration -} - -// Done must be called when the API request has been successfully processed -func (l *limitedRequest) Done() { - l.limiter.requestFinished(l, nil, outcomeSuccessCode) -} - -// Error must be called when the API request resulted in an error -func (l *limitedRequest) Error(err error, code int) { - l.limiter.requestFinished(l, err, code) -} - -// Wait blocks until the next API call is allowed to be processed. If the -// configured MaxWaitDuration is exceeded, an error is returned. On success, a -// LimitedRequest is returned on which Done() must be called when the API call -// has completed or Error() if an error occurred. -func (l *APILimiter) Wait(ctx context.Context) (LimitedRequest, error) { - req, err := l.wait(ctx) - if err != nil { - l.requestFinished(req, err, outcomeErrorCode) - return nil, err - } - return req, nil -} - -// wait implements the API rate limiting delaying functionality. Every error -// message and corresponding log message are documented in -// Documentation/configuration/api-rate-limiting.rst. If any changes related to -// errors or log messages are made to this function, please update the -// aforementioned page as well. -func (l *APILimiter) wait(ctx context.Context) (req *limitedRequest, err error) { - var ( - limitWaitDuration time.Duration - r *rate.Reservation - ) - - req = &limitedRequest{ - limiter: l, - scheduleTime: time.Now(), - uuid: uuid.New().String(), - } - - l.mutex.Lock() - - l.requestsScheduled++ - - scopedLog := log.WithFields(logrus.Fields{ - logAPICallName: l.name, - logUUID: req.uuid, - logParallelRequests: l.parallelRequests, - }) - - if l.params.MaxWaitDuration > 0 { - scopedLog = scopedLog.WithField(logMaxWaitDuration, l.params.MaxWaitDuration) - } - - if l.params.MinWaitDuration > 0 { - scopedLog = scopedLog.WithField(logMinWaitDuration, l.params.MinWaitDuration) - } - - select { - case <-ctx.Done(): - if l.params.Log { - scopedLog.Warning("Not processing API request due to cancelled context") - } - l.mutex.Unlock() - req.outcome = outcomeReqCancelled - err = fmt.Errorf("request cancelled while waiting for rate limiting slot: %w", ctx.Err()) - return - default: - } - - skip := l.params.SkipInitial > 0 && l.requestsScheduled <= int64(l.params.SkipInitial) - if skip { - scopedLog = scopedLog.WithField(logSkipped, skip) - } - - parallelRequests := l.parallelRequests - meanProcessingDuration := l.meanProcessingDuration - l.mutex.Unlock() - - if l.params.Log { - scopedLog.Info("Processing API request with rate limiter") - } else { - scopedLog.Debug("Processing API request with rate limiter") - } - - if skip { - goto skipRateLimiter - } - - if parallelRequests > 0 { - waitCtx := ctx - if l.params.MaxWaitDuration > 0 { - ctx2, cancel := context.WithTimeout(ctx, l.params.MaxWaitDuration) - defer cancel() - waitCtx = ctx2 - } - w := int64(waitSemaphoreResolution / parallelRequests) - err2 := l.parallelWaitSemaphore.Acquire(waitCtx, w) - if err2 != nil { - if l.params.Log { - scopedLog.WithError(err2).Warning("Not processing API request. Wait duration for maximum parallel requests exceeds maximum") - } - req.outcome = outcomeParallelMaxWait - err = fmt.Errorf("timed out while waiting to be served with %d parallel requests: %w", parallelRequests, err2) - return - } - req.waitSemaphoreWeight = w - } - req.waitDuration = time.Since(req.scheduleTime) - - l.mutex.Lock() - if l.limiter != nil { - r = l.limiter.Reserve() - limitWaitDuration = r.Delay() - - scopedLog = scopedLog.WithFields(logrus.Fields{ - logLimit: fmt.Sprintf("%.2f/s", l.limiter.Limit()), - logBurst: l.limiter.Burst(), - logWaitDurationLimit: limitWaitDuration, - logMaxWaitDurationLimiter: l.params.MaxWaitDuration - req.waitDuration, - }) - } - l.mutex.Unlock() - - if l.params.MinWaitDuration > 0 && limitWaitDuration < l.params.MinWaitDuration { - limitWaitDuration = l.params.MinWaitDuration - } - - if (l.params.MaxWaitDuration > 0 && (limitWaitDuration+req.waitDuration) > l.params.MaxWaitDuration) || limitWaitDuration == rate.InfDuration { - if l.params.Log { - scopedLog.Warning("Not processing API request. Wait duration exceeds maximum") - } - - // The rate limiter should only consider a reservation valid if - // the request is actually processed. Cancellation of the - // reservation should happen before we sleep below. - if r != nil { - r.Cancel() - } - - // Instead of returning immediately, pace the caller by - // sleeping for the mean processing duration. This helps - // against callers who disrespect 429 error codes and retry - // immediately. - if meanProcessingDuration > 0.0 { - time.Sleep(time.Duration(meanProcessingDuration * float64(time.Second))) - } - - req.outcome = outcomeLimitMaxWait - err = fmt.Errorf("request would have to wait %v to be served (maximum wait duration: %v)", - limitWaitDuration, l.params.MaxWaitDuration-req.waitDuration) - return - } - - if limitWaitDuration != 0 { - select { - case <-time.After(limitWaitDuration): - case <-ctx.Done(): - if l.params.Log { - scopedLog.Warning("Not processing API request due to cancelled context while waiting") - } - // The rate limiter should only consider a reservation - // valid if the request is actually processed. - if r != nil { - r.Cancel() - } - - req.outcome = outcomeReqCancelled - err = fmt.Errorf("request cancelled while waiting for rate limiting slot: %w", ctx.Err()) - return - } - } - - req.waitDuration = time.Since(req.scheduleTime) - -skipRateLimiter: - - l.mutex.Lock() - l.currentRequestsInFlight++ - l.mutex.Unlock() - - scopedLog = scopedLog.WithField(logWaitDurationTotal, req.waitDuration) - - if l.params.Log { - scopedLog.Info("API request released by rate limiter") - } else { - scopedLog.Debug("API request released by rate limiter") - } - - req.startTime = time.Now() - return req, nil - -} - -func parseRate(r string) (rate.Limit, error) { - tokens := strings.SplitN(r, "/", 2) - if len(tokens) != 2 { - return 0, fmt.Errorf("not in the form number/interval") - } - - f, err := strconv.ParseFloat(tokens[0], 64) - if err != nil { - return 0, fmt.Errorf("unable to parse float %q: %w", tokens[0], err) - } - - // Reject rates such as 1/1 or 10/10 as it will default to nanoseconds - // which is likely unexpected to the user. Require an explicit suffix. - if _, err := strconv.ParseInt(string(tokens[1]), 10, 64); err == nil { - return 0, fmt.Errorf("interval %q must contain duration suffix", tokens[1]) - } - - // If duration is provided as "m" or "s", convert it into "1m" or "1s" - if _, err := strconv.ParseInt(string(tokens[1][0]), 10, 64); err != nil { - tokens[1] = "1" + tokens[1] - } - - d, err := time.ParseDuration(tokens[1]) - if err != nil { - return 0, fmt.Errorf("unable to parse duration %q: %w", tokens[1], err) - } - - return rate.Limit(f / d.Seconds()), nil -} - -// APILimiterSet is a set of APILimiter indexed by name -type APILimiterSet struct { - limiters map[string]*APILimiter - metrics MetricsObserver -} - -// MetricsValues is the snapshot of relevant values to feed into the -// MetricsObserver -type MetricsValues struct { - WaitDuration time.Duration - MinWaitDuration time.Duration - MaxWaitDuration time.Duration - Outcome string - MeanProcessingDuration float64 - MeanWaitDuration float64 - EstimatedProcessingDuration float64 - ParallelRequests int - Limit rate.Limit - Burst int - CurrentRequestsInFlight int - AdjustmentFactor float64 - Error error - ReturnCode int -} - -// MetricsObserver is the interface that must be implemented to extract metrics -type MetricsObserver interface { - // ProcessedRequest is invoked after invocation of an API call - ProcessedRequest(name string, values MetricsValues) -} - -// NewAPILimiterSet creates a new APILimiterSet based on a set of rate limiting -// configurations and the default configuration. Any rate limiter that is -// configured in the config OR the defaults will be configured and made -// available via the Limiter(name) and Wait() function. -func NewAPILimiterSet(config map[string]string, defaults map[string]APILimiterParameters, metrics MetricsObserver) (*APILimiterSet, error) { - limiters := map[string]*APILimiter{} - - for name, p := range defaults { - // Merge user config into defaults when provided - if userConfig, ok := config[name]; ok { - combinedParams, err := p.MergeUserConfig(userConfig) - if err != nil { - return nil, err - } - p = combinedParams - } - - limiters[name] = NewAPILimiter(name, p, metrics) - } - - for name, c := range config { - if _, ok := defaults[name]; !ok { - l, err := NewAPILimiterFromConfig(name, c, metrics) - if err != nil { - return nil, fmt.Errorf("unable to parse rate limiting configuration %s=%s: %w", name, c, err) - } - - limiters[name] = l - } - } - - return &APILimiterSet{ - limiters: limiters, - metrics: metrics, - }, nil -} - -// Limiter returns the APILimiter with a given name -func (s *APILimiterSet) Limiter(name string) *APILimiter { - return s.limiters[name] -} - -type dummyRequest struct{} - -func (d dummyRequest) WaitDuration() time.Duration { return 0 } -func (d dummyRequest) Done() {} -func (d dummyRequest) Error(err error, code int) {} - -// Wait invokes Wait() on the APILimiter with the given name. If the limiter -// does not exist, a dummy limiter is used which will not impose any -// restrictions. -func (s *APILimiterSet) Wait(ctx context.Context, name string) (LimitedRequest, error) { - l, ok := s.limiters[name] - if !ok { - return dummyRequest{}, nil - } - - return l.Wait(ctx) -} - -// parsePositiveInt parses value as an int. It returns an error if value cannot -// be parsed or is negative. -func parsePositiveInt(value string) (int, error) { - switch i64, err := strconv.ParseInt(value, 10, 64); { - case err != nil: - return 0, fmt.Errorf("unable to parse positive integer %q: %w", value, err) - case i64 < 0: - return 0, fmt.Errorf("unable to parse positive integer %q: negative value", value) - case i64 > math.MaxInt: - return 0, fmt.Errorf("unable to parse positive integer %q: overflow", value) - default: - return int(i64), nil - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/rate/doc.go b/vendor/github.com/cilium/cilium/pkg/rate/doc.go deleted file mode 100644 index b031503aad7..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/rate/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package rate provides a rate limiter to rate limit requests that can be -// burstable but they should only allowed N per a period defined. -// This package differs from the "golang.org/x/time/rate" package as it does not -// implement the token bucket algorithm. -package rate diff --git a/vendor/github.com/cilium/cilium/pkg/rate/limiter.go b/vendor/github.com/cilium/cilium/pkg/rate/limiter.go deleted file mode 100644 index abb7be05ee5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/rate/limiter.go +++ /dev/null @@ -1,110 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package rate - -import ( - "context" - "fmt" - "sync/atomic" - "time" - - "golang.org/x/sync/semaphore" -) - -// Limiter is used to limit the number of operations done. -type Limiter struct { - semaphore *semaphore.Weighted - burst int64 - currWeights atomic.Int64 - ticker *time.Ticker - cancelFunc context.CancelFunc - ctx context.Context -} - -// NewLimiter returns a new Limiter that allows events up to b tokens during -// the given interval. -// This Limiter has a different implementation from the 'x/time/rate's Limiter -// implementation. 'x/time/rate.Limiter' sends a constant stream of updates -// (at a rate of few dozen events per second) over the period of a N minutes -// which is the behavior of the token bucket algorithm. It is designed to -// flatten bursts in a signal to a fixed output rate. -// This rate.Limiter does the opposite of 'x/time/rate.Limiter'. It takes a -// somewhat fixed-rate stream of updates and turns it into a stream of -// controlled small bursts every N minutes. -func NewLimiter(interval time.Duration, b int64) *Limiter { - ticker := time.NewTicker(interval) - ctx, cancel := context.WithCancel(context.Background()) - l := &Limiter{ - semaphore: semaphore.NewWeighted(b), - burst: b, - ticker: ticker, - ctx: ctx, - cancelFunc: cancel, - } - go func() { - for { - select { - case <-ticker.C: - case <-l.ctx.Done(): - return - } - currWeights := l.currWeights.Swap(0) - l.semaphore.Release(currWeights) - } - }() - return l -} - -// Stop stops the internal components used for the rate limiter logic. -func (lim *Limiter) Stop() { - lim.cancelFunc() - lim.ticker.Stop() -} - -func (lim *Limiter) assertAlive() { - select { - case <-lim.ctx.Done(): - panic("limiter misuse: Allow / Wait / WaitN called concurrently after Stop") - default: - } -} - -// Allow is shorthand for AllowN(1). -func (lim *Limiter) Allow() bool { - return lim.AllowN(1) -} - -// AllowN returns true if it's possible to allow n tokens. -func (lim *Limiter) AllowN(n int64) bool { - lim.assertAlive() - acq := lim.semaphore.TryAcquire(n) - if acq { - lim.currWeights.Add(n) - return true - } - return false -} - -// Wait is shorthand for WaitN(ctx, 1). -func (lim *Limiter) Wait(ctx context.Context) error { - return lim.WaitN(ctx, 1) -} - -// WaitN acquires n tokens, blocking until resources are available or ctx is -// done. On success, returns nil. On failure, returns ctx.Err() and leaves the -// limiter unchanged. -// -// If ctx is already done, WaitN may still succeed without blocking. -func (lim *Limiter) WaitN(ctx context.Context, n int64) error { - lim.assertAlive() - if n > lim.burst { - return fmt.Errorf("rate: Wait(n=%d) exceeds limiter's burst %d", n, lim.burst) - } - err := lim.semaphore.Acquire(ctx, n) - if err != nil { - return err - } - lim.currWeights.Add(n) - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/rate/metrics/metrics.go b/vendor/github.com/cilium/cilium/pkg/rate/metrics/metrics.go deleted file mode 100644 index a3df70b2069..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/rate/metrics/metrics.go +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package metrics - -import ( - "strconv" - - "github.com/cilium/cilium/pkg/metrics" - "github.com/cilium/cilium/pkg/rate" -) - -func APILimiterObserver() rate.MetricsObserver { - return &apiRateLimitingMetrics{} -} - -type apiRateLimitingMetrics struct{} - -func (a *apiRateLimitingMetrics) ProcessedRequest(name string, v rate.MetricsValues) { - metrics.APILimiterProcessingDuration.WithLabelValues(name, "mean").Set(v.MeanProcessingDuration) - metrics.APILimiterProcessingDuration.WithLabelValues(name, "estimated").Set(v.EstimatedProcessingDuration) - metrics.APILimiterWaitDuration.WithLabelValues(name, "mean").Set(v.MeanWaitDuration) - metrics.APILimiterWaitDuration.WithLabelValues(name, "max").Set(v.MaxWaitDuration.Seconds()) - metrics.APILimiterWaitDuration.WithLabelValues(name, "min").Set(v.MinWaitDuration.Seconds()) - metrics.APILimiterRequestsInFlight.WithLabelValues(name, "in-flight").Set(float64(v.CurrentRequestsInFlight)) - metrics.APILimiterRequestsInFlight.WithLabelValues(name, "limit").Set(float64(v.ParallelRequests)) - metrics.APILimiterRateLimit.WithLabelValues(name, "limit").Set(float64(v.Limit)) - metrics.APILimiterRateLimit.WithLabelValues(name, "burst").Set(float64(v.Burst)) - metrics.APILimiterAdjustmentFactor.WithLabelValues(name).Set(v.AdjustmentFactor) - - if v.Outcome == "" { - metrics.APILimiterWaitHistoryDuration.WithLabelValues(name).Observe(v.WaitDuration.Seconds()) - v.Outcome = metrics.Error2Outcome(v.Error) - } - - if v.ReturnCode == -1 { - v.ReturnCode = metrics.LabelOutcome2Code(v.Outcome) - } - - metrics.APILimiterProcessedRequests.WithLabelValues(name, v.Outcome, strconv.Itoa(v.ReturnCode)).Inc() -} diff --git a/vendor/github.com/cilium/cilium/pkg/safeio/safeio.go b/vendor/github.com/cilium/cilium/pkg/safeio/safeio.go deleted file mode 100644 index 4eddccc4140..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/safeio/safeio.go +++ /dev/null @@ -1,77 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package safeio - -import ( - "fmt" - "io" -) - -// ErrLimitReached indicates that ReadAllLimit has -// reached its limit before completing a full read -// of the io.Reader. -var ErrLimitReached = fmt.Errorf("read limit reached") - -// ByteSize expresses the size of bytes -type ByteSize float64 - -const ( - _ = iota // ignore first value by assigning to blank identifier - // KB is a Kilobyte - KB ByteSize = 1 << (10 * iota) - // MB is a Megabyte - MB - // GB is a Gigabyte - GB - // TB is a Terabyte - TB - // PB is a Petabyte - PB - // EB is an Exabyte - EB - // ZB is a Zettabyte - ZB - // YB is a Yottabyte - YB -) - -// String converts a ByteSize to a string -func (b ByteSize) String() string { - switch { - case b >= YB: - return fmt.Sprintf("%.1fYB", b/YB) - case b >= ZB: - return fmt.Sprintf("%.1fZB", b/ZB) - case b >= EB: - return fmt.Sprintf("%.1fEB", b/EB) - case b >= PB: - return fmt.Sprintf("%.1fPB", b/PB) - case b >= TB: - return fmt.Sprintf("%.1fTB", b/TB) - case b >= GB: - return fmt.Sprintf("%.1fGB", b/GB) - case b >= MB: - return fmt.Sprintf("%.1fMB", b/MB) - case b >= KB: - return fmt.Sprintf("%.1fKB", b/KB) - } - return fmt.Sprintf("%.1fB", b) -} - -// ReadAllLimit reads from r until an error, EOF, or after n bytes and returns -// the data it read. A successful call returns err == nil, not err == EOF. -// Because ReadAllLimit is defined to read from src until EOF it does not -// treat an EOF from Read as an error to be reported. If the limit is reached -// ReadAllLimit will return ErrLimitReached as an error. -func ReadAllLimit(r io.Reader, n ByteSize) ([]byte, error) { - limit := int(n + 1) - buf, err := io.ReadAll(io.LimitReader(r, int64(limit))) - if err != nil { - return buf, err - } - if len(buf) >= limit { - return buf[:limit-1], ErrLimitReached - } - return buf, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/safetime/doc.go b/vendor/github.com/cilium/cilium/pkg/safetime/doc.go deleted file mode 100644 index 11ecf3c5fd2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/safetime/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package safetime contains a wrapper function for time.Since to deal with -// negative durations. -package safetime diff --git a/vendor/github.com/cilium/cilium/pkg/safetime/safetime.go b/vendor/github.com/cilium/cilium/pkg/safetime/safetime.go deleted file mode 100644 index cc00c25ac54..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/safetime/safetime.go +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package safetime - -import ( - "runtime" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/time" -) - -// TimeSinceSafe returns the duration since t. If the duration is negative, -// returns false to indicate the fact. -// -// Used to workaround a malfunctioning monotonic clock. -func TimeSinceSafe(t time.Time, logger *logrus.Entry) (time.Duration, bool) { - n := time.Now() - d := n.Sub(t) - - if d < 0 { - logger = logger.WithFields(logrus.Fields{ - logfields.StartTime: t, - logfields.EndTime: n, - logfields.Duration: d, - }) - _, file, line, ok := runtime.Caller(1) - if ok { - logger = logger.WithFields(logrus.Fields{ - logfields.Path: file, - logfields.Line: line, - }) - } - logger.Warn("BUG: negative duration") - - return time.Duration(0), false - } - - return d, true -} diff --git a/vendor/github.com/cilium/cilium/pkg/slices/slices.go b/vendor/github.com/cilium/cilium/pkg/slices/slices.go index be9652454dc..e229cb146b1 100644 --- a/vendor/github.com/cilium/cilium/pkg/slices/slices.go +++ b/vendor/github.com/cilium/cilium/pkg/slices/slices.go @@ -145,3 +145,9 @@ func SubsetOf[S ~[]T, T comparable](a, b S) (bool, []T) { d := Diff(a, b) return len(d) == 0, d } + +// XorNil returns true if one of the two slices is nil while the other is not. +func XorNil[T any](s1, s2 []T) bool { + return s1 == nil && s2 != nil || + s1 != nil && s2 == nil +} diff --git a/vendor/github.com/cilium/cilium/pkg/source/source.go b/vendor/github.com/cilium/cilium/pkg/source/source.go deleted file mode 100644 index 4156105ab5d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/source/source.go +++ /dev/null @@ -1,100 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package source - -// Source describes the source of a definition -type Source string - -const ( - // Unspec is used when the source is unspecified - Unspec Source = "unspec" - - // KubeAPIServer is the source used for state which represents the - // kube-apiserver, such as the IPs associated with it. This is not to be - // confused with the Kubernetes source. - // KubeAPIServer state has the strongest ownership and can only be - // overwritten by itself. - KubeAPIServer Source = "kube-apiserver" - - // Local is the source used for state derived from local agent state. - // Local state has the second strongest ownership, behind KubeAPIServer. - Local Source = "local" - - // KVStore is the source used for state derived from a key value store. - // State in the key value stored takes precedence over orchestration - // system state such as Kubernetes. - KVStore Source = "kvstore" - - // CustomResource is the source used for state derived from Kubernetes - // custom resources - CustomResource Source = "custom-resource" - - // Kubernetes is the source used for state derived from Kubernetes - Kubernetes Source = "k8s" - - // LocalAPI is the source used for state derived from the API served - // locally on the node. - LocalAPI Source = "api" - - // Generated is the source used for generated state which can be - // overwritten by all other sources, except for restored (and unspec). - Generated Source = "generated" - - // Restored is the source used for restored state from data left behind - // by the previous agent instance. Can be overwritten by all other - // sources (except for unspec). - Restored Source = "restored" -) - -// AllowOverwrite returns true if new state from a particular source is allowed -// to overwrite existing state from another source -func AllowOverwrite(existing, new Source) bool { - switch existing { - - // KubeAPIServer state can only be overwritten by other kube-apiserver - // state. - case KubeAPIServer: - return new == KubeAPIServer - - // Local state can only be overwritten by other local state or - // kube-apiserver state. - case Local: - return new == Local || new == KubeAPIServer - - // KVStore can be overwritten by other kvstore, local state, or - // kube-apiserver state. - case KVStore: - return new == KVStore || new == Local || new == KubeAPIServer - - // Custom-resource state can be overwritten by other CRD, kvstore, - // local or kube-apiserver state. - case CustomResource: - return new == CustomResource || new == KVStore || new == Local || new == KubeAPIServer - - // Kubernetes state can be overwritten by everything except local API, - // generated, restored and unspecified state. - case Kubernetes: - return new != LocalAPI && new != Generated && new != Restored && new != Unspec - - // Local API state can be overwritten by everything except restored, - // generated and unspecified state - case LocalAPI: - return new != Generated && new != Restored && new != Unspec - - // Generated can be overwritten by everything except by Restored and - // Unspecified - case Generated: - return new != Restored && new != Unspec - - // Restored can be overwritten by everything except by Unspecified - case Restored: - return new != Unspec - - // Unspecified state can be overwritten by everything - case Unspec: - return true - } - - return true -} diff --git a/vendor/github.com/cilium/cilium/pkg/spanstat/doc.go b/vendor/github.com/cilium/cilium/pkg/spanstat/doc.go deleted file mode 100644 index 61b9dc8124b..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/spanstat/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package spanstat provides a mechanism to measure duration of multiple spans -// and add them up to a total duration -package spanstat diff --git a/vendor/github.com/cilium/cilium/pkg/spanstat/spanstat.go b/vendor/github.com/cilium/cilium/pkg/spanstat/spanstat.go deleted file mode 100644 index 2557233533c..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/spanstat/spanstat.go +++ /dev/null @@ -1,113 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package spanstat - -import ( - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" - "github.com/cilium/cilium/pkg/safetime" - "github.com/cilium/cilium/pkg/time" -) - -var ( - subSystem = "spanstat" - log = logging.DefaultLogger.WithField(logfields.LogSubsys, subSystem) -) - -// SpanStat measures the total duration of all time spent in between Start() -// and Stop() calls. -type SpanStat struct { - mutex lock.RWMutex - spanStart time.Time - successDuration time.Duration - failureDuration time.Duration -} - -// Start creates a new SpanStat and starts it -func Start() *SpanStat { - s := &SpanStat{} - return s.Start() -} - -// Start starts a new span -func (s *SpanStat) Start() *SpanStat { - s.mutex.Lock() - defer s.mutex.Unlock() - s.spanStart = time.Now() - return s -} - -// EndError calls End() based on the value of err -func (s *SpanStat) EndError(err error) *SpanStat { - s.mutex.Lock() - defer s.mutex.Unlock() - return s.end(err == nil) -} - -// End ends the current span and adds the measured duration to the total -// cumulated duration, and to the success or failure cumulated duration -// depending on the given success flag -func (s *SpanStat) End(success bool) *SpanStat { - s.mutex.Lock() - defer s.mutex.Unlock() - return s.end(success) -} - -// must be called with Lock() held -func (s *SpanStat) end(success bool) *SpanStat { - if !s.spanStart.IsZero() { - d, _ := safetime.TimeSinceSafe(s.spanStart, log) - if success { - s.successDuration += d - } else { - s.failureDuration += d - } - } - s.spanStart = time.Time{} - return s -} - -// Total returns the total duration of all spans measured, including both -// successes and failures -func (s *SpanStat) Total() time.Duration { - s.mutex.RLock() - defer s.mutex.RUnlock() - return s.successDuration + s.failureDuration -} - -// SuccessTotal returns the total duration of all successful spans measured -func (s *SpanStat) SuccessTotal() time.Duration { - s.mutex.RLock() - defer s.mutex.RUnlock() - return s.successDuration -} - -// FailureTotal returns the total duration of all unsuccessful spans measured -func (s *SpanStat) FailureTotal() time.Duration { - s.mutex.RLock() - defer s.mutex.RUnlock() - return s.failureDuration -} - -// Reset rests the duration measurements -func (s *SpanStat) Reset() { - s.mutex.Lock() - defer s.mutex.Unlock() - s.successDuration = 0 - s.failureDuration = 0 -} - -// Seconds returns the number of seconds represents by the spanstat. If a span -// is still open, it is closed first. -func (s *SpanStat) Seconds() float64 { - s.mutex.Lock() - defer s.mutex.Unlock() - if !s.spanStart.IsZero() { - s.end(true) - } - - total := s.successDuration + s.failureDuration - return total.Seconds() -} diff --git a/vendor/github.com/cilium/cilium/pkg/stream/observable.go b/vendor/github.com/cilium/cilium/pkg/stream/observable.go deleted file mode 100644 index 22e96af95dd..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/stream/observable.go +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// The stream package provides utilities for working with observable streams. -// Any type that implements the Observable interface can be transformed and -// consumed with these utilities. -package stream - -import "context" - -// Observable defines the Observe method for observing a stream of values. -// -// Also see https://reactivex.io/documentation/observable.html for in-depth -// description of observables. -// -// For interactive diagrams see https://rxmarbles.com/. -type Observable[T any] interface { - // Observe a stream of values as long as the given context is valid. - // 'next' is called for each item, and finally 'complete' is called - // when the stream is complete, or an error has occurred. - // - // Observable implementations are allowed to call 'next' and 'complete' - // from any goroutine, but never concurrently. - Observe(ctx context.Context, next func(T), complete func(error)) -} - -// FuncObservable implements the Observable interface with a function. -// -// This provides a convenient way of creating new observables without having -// to introduce a new type: -// -// var Ones Observable[int] = -// FuncObservable[int]( -// func(ctx context.Context, next func(int), complete func(error)) { -// go func() { -// defer complete(nil) -// for ctx.Err() == nil { -// next(1) -// } -// }() -// }) -// -// versus with a new type: -// -// type onesObservable struct {} -// -// func (o onesObservable) Observe(ctx context.Context, next func(int), complete func(error)) { -// go func() { -// defer complete(nil) -// for ctx.Err() == nil { -// next(1) -// } -// }() -// } -type FuncObservable[T any] func(context.Context, func(T), func(error)) - -func (f FuncObservable[T]) Observe(ctx context.Context, next func(T), complete func(error)) { - f(ctx, next, complete) -} diff --git a/vendor/github.com/cilium/cilium/pkg/stream/operators.go b/vendor/github.com/cilium/cilium/pkg/stream/operators.go deleted file mode 100644 index c12e4040089..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/stream/operators.go +++ /dev/null @@ -1,247 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package stream - -import ( - "context" - - "golang.org/x/time/rate" - - "github.com/cilium/cilium/pkg/time" -) - -// -// Operators transform the observable stream. -// - -// Map applies a function onto values of an observable and emits the resulting values. -// -// Map(Range(1,4), func(x int) int { return x * 2}) -// => [2,4,6] -func Map[A, B any](src Observable[A], apply func(A) B) Observable[B] { - return FuncObservable[B]( - func(ctx context.Context, next func(B), complete func(error)) { - src.Observe( - ctx, - func(a A) { next(apply(a)) }, - complete) - }) -} - -// Filter only emits the values for which the provided predicate returns true. -// -// Filter(Range(1,4), func(x int) int { return x%2 == 0 }) -// => [2] -func Filter[T any](src Observable[T], pred func(T) bool) Observable[T] { - return FuncObservable[T]( - func(ctx context.Context, next func(T), complete func(error)) { - src.Observe( - ctx, - func(x T) { - if pred(x) { - next(x) - } - }, - complete) - }) -} - -// Reduce takes an initial state, and a function 'reduce' that is called on each element -// along with a state and returns an observable with a single item: the state produced -// by the last call to 'reduce'. -// -// Reduce(Range(1,4), 0, func(sum, item int) int { return sum + item }) -// => [(0+1+2+3)] => [6] -func Reduce[Item, Result any](src Observable[Item], init Result, reduce func(Result, Item) Result) Observable[Result] { - result := init - return FuncObservable[Result]( - func(ctx context.Context, next func(Result), complete func(error)) { - src.Observe( - ctx, - func(x Item) { - result = reduce(result, x) - }, - func(err error) { - if err == nil { - next(result) - } - complete(err) - }) - }) -} - -// Distinct skips adjacent equal values. -// -// Distinct(FromSlice([]int{1,1,2,2,3}) -// => [1,2,3] -func Distinct[T comparable](src Observable[T]) Observable[T] { - var prev T - first := true - return Filter(src, func(item T) bool { - if first { - first = false - prev = item - return true - } - eq := prev == item - prev = item - return !eq - }) -} - -// RetryFunc decides whether the processing should be retried given the error -type RetryFunc func(err error) bool - -// Retry resubscribes to the observable if it completes with an error. -func Retry[T any](src Observable[T], shouldRetry RetryFunc) Observable[T] { - return FuncObservable[T]( - func(ctx context.Context, next func(T), complete func(error)) { - var observe func() - observe = func() { - src.Observe( - ctx, - next, - func(err error) { - if err != nil && shouldRetry(err) { - observe() - } else { - complete(err) - } - }) - } - observe() - }) -} - -// AlwaysRetry always asks for a retry regardless of the error. -func AlwaysRetry(err error) bool { - return true -} - -// BackoffRetry retries with an exponential backoff. -func BackoffRetry(shouldRetry RetryFunc, minBackoff, maxBackoff time.Duration) RetryFunc { - backoff := minBackoff - return func(err error) bool { - time.Sleep(backoff) - backoff *= 2 - if backoff > maxBackoff { - backoff = maxBackoff - } - return shouldRetry(err) - } - -} - -// LimitRetries limits the number of retries with the given retry method. -// e.g. LimitRetries(BackoffRetry(time.Millisecond, time.Second), 5) -func LimitRetries(shouldRetry RetryFunc, numRetries int) RetryFunc { - return func(err error) bool { - if numRetries <= 0 { - return false - } - numRetries-- - return shouldRetry(err) - } -} - -// ToMulticast makes 'src' a multicast observable, e.g. each observer will observe -// the same sequence. Useful for fanning out items to multiple observers from a source -// that is consumed by the act of observing. -// -// mcast, connect := ToMulticast(FromChannel(values)) -// a := ToSlice(mcast) -// b := ToSlice(mcast) -// connect(ctx) // start! -// => a == b -func ToMulticast[T any](src Observable[T], opts ...MulticastOpt) (mcast Observable[T], connect func(context.Context)) { - mcast, next, complete := Multicast[T](opts...) - connect = func(ctx context.Context) { - src.Observe(ctx, next, complete) - } - return mcast, connect -} - -// Throttle limits the rate at which items are emitted. -func Throttle[T any](src Observable[T], ratePerSecond float64, burst int) Observable[T] { - return FuncObservable[T]( - func(ctx context.Context, next func(T), complete func(error)) { - limiter := rate.NewLimiter(rate.Limit(ratePerSecond), burst) - var limiterErr error - subCtx, cancel := context.WithCancel(ctx) - src.Observe( - subCtx, - func(item T) { - limiterErr = limiter.Wait(ctx) - if limiterErr != nil { - cancel() - return - } - next(item) - }, - func(err error) { - if limiterErr != nil { - complete(limiterErr) - } else { - complete(err) - } - - }, - ) - }) -} - -// Debounce emits an item only after the specified duration has lapsed since -// the previous item was emitted. Only the latest item is emitted. -// -// In: a b c d e |-> -// Out: a d e |-> -func Debounce[T any](src Observable[T], duration time.Duration) Observable[T] { - return FuncObservable[T]( - func(ctx context.Context, next func(T), complete func(error)) { - errs := make(chan error, 1) - items := ToChannel(ctx, src, WithErrorChan(errs)) - go func() { - defer close(errs) - - timer := time.NewTimer(duration) - defer timer.Stop() - - timerElapsed := true // Do not delay the first item. - var latest *T - - for { - select { - case err := <-errs: - complete(err) - return - - case item, ok := <-items: - if !ok { - items = nil - latest = nil - continue - } - - if timerElapsed { - next(item) - timerElapsed = false - latest = nil - timer.Reset(duration) - } else { - latest = &item - } - - case <-timer.C: - if latest != nil { - next(*latest) - latest = nil - timer.Reset(duration) - } else { - timerElapsed = true - } - } - } - }() - }) -} diff --git a/vendor/github.com/cilium/cilium/pkg/stream/sinks.go b/vendor/github.com/cilium/cilium/pkg/stream/sinks.go deleted file mode 100644 index 23c5ee22708..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/stream/sinks.go +++ /dev/null @@ -1,165 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package stream - -import ( - "context" - "io" - "sync" - "sync/atomic" -) - -// -// Sinks: operators that consume the observable to produce a value. -// - -// First returns the first item from 'src' observable and then cancels -// the subscription. Blocks until first item is observed or the stream -// is completed. If the observable completes without emitting items -// then io.EOF error is returned. -func First[T any](ctx context.Context, src Observable[T]) (item T, err error) { - subCtx, cancel := context.WithCancel(ctx) - var taken atomic.Bool - errs := make(chan error) - src.Observe(subCtx, - func(x T) { - if !taken.CompareAndSwap(false, true) { - return - } - item = x - cancel() - }, - func(err error) { - errs <- err - close(errs) - }) - - err = <-errs - - if taken.Load() { - // We got the item, ignore any error. - err = nil - } else if err == nil { - // No error and no item => EOF - err = io.EOF - } - - return -} - -// Last returns the last item from 'src' observable. Blocks until -// the stream has been completed. If no items are observed then -// io.EOF error is returned. -func Last[T any](ctx context.Context, src Observable[T]) (item T, err error) { - errs := make(chan error) - var taken atomic.Bool - src.Observe( - ctx, - func(x T) { - item = x - taken.Store(true) - }, - func(err error) { - errs <- err - close(errs) - }) - - err = <-errs - if taken.Load() { - // We got the item, ignore any error. - err = nil - } else if err == nil { - // No error and no item => EOF - err = io.EOF - } - return item, err -} - -// ToSlice converts an Observable into a slice. -// -// ToSlice(ctx, Range(1,4)) -// => ([]int{1,2,3}, nil) -func ToSlice[T any](ctx context.Context, src Observable[T]) (items []T, err error) { - errs := make(chan error) - items = make([]T, 0) - src.Observe( - ctx, - func(item T) { - items = append(items, item) - }, - func(err error) { - errs <- err - close(errs) - }) - return items, <-errs -} - -type toChannelOpts struct { - bufferSize int - errorChan chan error -} - -type ToChannelOpt func(*toChannelOpts) - -// WithBufferSize sets the buffer size of the channel returned by ToChannel. -func WithBufferSize(n int) ToChannelOpt { - return func(o *toChannelOpts) { - o.bufferSize = n - } -} - -// WithErrorChan asks ToChannel to send completion error to the provided channel. -func WithErrorChan(errCh chan error) ToChannelOpt { - return func(o *toChannelOpts) { - o.errorChan = errCh - } -} - -// ToChannel converts an observable into a channel. -// When the provided context is cancelled the underlying subscription is cancelled -// and the channel is closed. To receive completion errors use [WithErrorChan]. -// -// items <- ToChannel(ctx, Range(1,4)) -// a := <- items -// b := <- items -// c := <- items -// _, ok := <- items -// => a=1, b=2, c=3, ok=false -func ToChannel[T any](ctx context.Context, src Observable[T], opts ...ToChannelOpt) <-chan T { - var o toChannelOpts - for _, opt := range opts { - opt(&o) - } - items := make(chan T, o.bufferSize) - src.Observe( - ctx, - func(item T) { items <- item }, - func(err error) { - close(items) - if o.errorChan != nil { - o.errorChan <- err - } - }) - return items -} - -// Discard discards all items from 'src'. -func Discard[T any](ctx context.Context, src Observable[T]) { - src.Observe(ctx, - func(item T) {}, - func(err error) {}) -} - -// ObserveWithWaitGroup is like Observe(), but adds to a WaitGroup and calls -// Done() when complete. -func ObserveWithWaitGroup[T any](ctx context.Context, wg *sync.WaitGroup, src Observable[T], next func(T), complete func(error)) { - wg.Add(1) - src.Observe( - ctx, - next, - func(err error) { - complete(err) - wg.Done() - }) -} diff --git a/vendor/github.com/cilium/cilium/pkg/stream/sources.go b/vendor/github.com/cilium/cilium/pkg/stream/sources.go deleted file mode 100644 index a9e3f06e247..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/stream/sources.go +++ /dev/null @@ -1,263 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package stream - -import ( - "context" - - "github.com/cilium/cilium/pkg/lock" -) - -// Just creates an observable that emits a single item and completes. -// -// xs, err := ToSlice(ctx, Just(1)) -// => xs == []int{1}, err == nil -func Just[T any](item T) Observable[T] { - return FuncObservable[T]( - func(ctx context.Context, next func(T), complete func(error)) { - go func() { - if err := ctx.Err(); err != nil { - complete(err) - } else { - next(item) - complete(nil) - } - }() - }) -} - -// Stuck creates an observable that never emits anything and -// just waits for the context to be cancelled. -// Mainly meant for testing. -func Stuck[T any]() Observable[T] { - return FuncObservable[T]( - func(ctx context.Context, next func(T), complete func(error)) { - go func() { - <-ctx.Done() - complete(ctx.Err()) - }() - }) -} - -// Error creates an observable that fails immediately with given error. -// -// failErr = errors.New("fail") -// xs, err := ToSlice(ctx, Error[int](failErr)) -// => xs == []int{}, err == failErr -func Error[T any](err error) Observable[T] { - return FuncObservable[T]( - func(ctx context.Context, next func(T), complete func(error)) { - go complete(err) - }) -} - -// Empty creates an "empty" observable that completes immediately. -// -// xs, err := ToSlice(Empty[int]()) -// => xs == []int{}, err == nil -func Empty[T any]() Observable[T] { - return Error[T](nil) -} - -// FromSlice converts a slice into an Observable. -// -// ToSlice(ctx, FromSlice([]int{1,2,3}) -// => []int{1,2,3} -func FromSlice[T any](items []T) Observable[T] { - // Emit items in chunks to reduce overhead of mutex in ctx.Err(). - const chunkSize = 64 - return FuncObservable[T]( - func(ctx context.Context, next func(T), complete func(error)) { - go func() { - for chunk := 0; chunk < len(items); chunk += chunkSize { - if err := ctx.Err(); err != nil { - complete(err) - return - } - for i := chunk; i < len(items) && i < chunk+chunkSize; i++ { - next(items[i]) - } - } - complete(nil) - }() - }) -} - -// FromChannel creates an observable from a channel. The channel is consumed -// by the first observer. -// -// values := make(chan int) -// go func() { -// values <- 1 -// values <- 2 -// values <- 3 -// close(values) -// }() -// obs := FromChannel(values) -// xs, err := ToSlice(ctx, obs) -// => xs == []int{1,2,3}, err == nil -// -// xs, err = ToSlice(ctx, obs) -// => xs == []int{}, err == nil -func FromChannel[T any](in <-chan T) Observable[T] { - return FuncObservable[T]( - func(ctx context.Context, next func(T), complete func(error)) { - go func() { - done := ctx.Done() - for { - select { - case <-done: - complete(ctx.Err()) - return - case v, ok := <-in: - if !ok { - complete(nil) - return - } - next(v) - } - } - }() - }) -} - -// Range creates an observable that emits integers in range from...to-1. -// -// ToSlice(ctx, Range(1,2,3)) => []int{1,2,3} -func Range(from, to int) Observable[int] { - return FuncObservable[int]( - func(ctx context.Context, next func(int), complete func(error)) { - go func() { - for i := from; i < to; i++ { - if ctx.Err() != nil { - break - } - next(i) - } - complete(ctx.Err()) - }() - }) -} - -type mcastSubscriber[T any] struct { - next func(T) - complete func() -} - -type MulticastOpt func(o *mcastOpts) - -type mcastOpts struct { - emitLatest bool -} - -func (o mcastOpts) apply(opts []MulticastOpt) mcastOpts { - for _, opt := range opts { - opt(&o) - } - return o -} - -// Multicast options -var ( - // Emit the latest seen item when subscribing. - EmitLatest = func(o *mcastOpts) { o.emitLatest = true } -) - -// Multicast creates an observable that "multicasts" the emitted items to all observers. -// -// mcast, next, complete := Multicast[int]() -// next(1) // no observers, none receives this -// sub1 := ToChannel(ctx, mcast, WithBufferSize(10)) -// sub2 := ToChannel(ctx, mcast, WithBufferSize(10)) -// next(2) -// next(3) -// complete(nil) -// => sub1 == sub2 == [2,3] -// -// mcast, next, complete = Multicast[int](EmitLatest) -// next(1) -// next(2) // "EmitLatest" tells Multicast to keep this -// x, err := First(ctx, mcast) -// => x == 2, err == nil -func Multicast[T any](opts ...MulticastOpt) (mcast Observable[T], next func(T), complete func(error)) { - var ( - mu lock.Mutex - subId int - subs = make(map[int]mcastSubscriber[T]) - latestValue T - completed bool - completeErr error - haveLatest bool - opt = mcastOpts{}.apply(opts) - ) - - next = func(item T) { - mu.Lock() - defer mu.Unlock() - if completed { - return - } - if opt.emitLatest { - latestValue = item - haveLatest = true - } - for _, sub := range subs { - sub.next(item) - } - } - - complete = func(err error) { - mu.Lock() - defer mu.Unlock() - completed = true - completeErr = err - for _, sub := range subs { - sub.complete() - } - subs = nil - } - - mcast = FuncObservable[T]( - func(ctx context.Context, subNext func(T), subComplete func(error)) { - mu.Lock() - if completed { - mu.Unlock() - go subComplete(completeErr) - return - } - - subCtx, cancel := context.WithCancel(ctx) - thisId := subId - subId++ - subs[thisId] = mcastSubscriber[T]{ - subNext, - cancel, - } - - // Continue subscribing asynchronously so caller is not blocked. - go func() { - if opt.emitLatest && haveLatest { - subNext(latestValue) - } - mu.Unlock() - - // Wait for cancellation by observer, or completion from upstream. - <-subCtx.Done() - - // Remove the observer and complete. - var err error - mu.Lock() - delete(subs, thisId) - if completed { - err = completeErr - } else { - err = subCtx.Err() - } - mu.Unlock() - subComplete(err) - }() - }) - - return -} diff --git a/vendor/github.com/cilium/cilium/pkg/sysctl/doc.go b/vendor/github.com/cilium/cilium/pkg/sysctl/doc.go deleted file mode 100644 index 07b01e24a64..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/sysctl/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package sysctl allows to change kernel parameters at runtime. -package sysctl diff --git a/vendor/github.com/cilium/cilium/pkg/sysctl/sysctl.go b/vendor/github.com/cilium/cilium/pkg/sysctl/sysctl.go deleted file mode 100644 index 7ec9bfaca68..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/sysctl/sysctl.go +++ /dev/null @@ -1,182 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package sysctl - -import ( - "errors" - "fmt" - "io" - "os" - "path/filepath" - "regexp" - "strconv" - "strings" - - "github.com/sirupsen/logrus" - - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/logging" - "github.com/cilium/cilium/pkg/logging/logfields" -) - -const ( - subsystem = "sysctl" - - procFsDefault = "/proc" -) - -var ( - log = logging.DefaultLogger.WithField(logfields.LogSubsys, subsystem) - - // parameterElemRx matches an element of a sysctl parameter. - parameterElemRx = regexp.MustCompile(`\A[-0-9_a-z]+\z`) - - procFsMU lock.Mutex - // procFsRead is mark as true if procFs changes value. - procFsRead bool - procFs = procFsDefault -) - -// An ErrInvalidSysctlParameter is returned when a parameter is invalid. -type ErrInvalidSysctlParameter string - -func (e ErrInvalidSysctlParameter) Error() string { - return fmt.Sprintf("invalid sysctl parameter: %q", string(e)) -} - -// Setting represents a sysctl setting. Its purpose it to be able to iterate -// over a slice of settings. -type Setting struct { - Name string - Val string - IgnoreErr bool - - // Warn if non-empty is the alternative warning log message to use when IgnoreErr is false. - Warn string -} - -// parameterPath returns the path to the sysctl file for parameter name. -func parameterPath(name string) (string, error) { - elems := strings.Split(name, ".") - for _, elem := range elems { - if !parameterElemRx.MatchString(elem) { - return "", ErrInvalidSysctlParameter(name) - } - } - return filepath.Join(append([]string{GetProcfs(), "sys"}, elems...)...), nil -} - -// SetProcfs sets path for the root's /proc. Calling it after GetProcfs causes -// panic. -func SetProcfs(path string) { - procFsMU.Lock() - defer procFsMU.Unlock() - if procFsRead { - // do not change the procfs after we have gotten its value from GetProcfs - panic("SetProcfs called after GetProcfs") - } - procFs = path -} - -// GetProcfs returns the path set in procFs. Executing SetProcFs after GetProcfs -// might panic depending. See SetProcfs for more info. -func GetProcfs() string { - procFsMU.Lock() - defer procFsMU.Unlock() - procFsRead = true - return procFs -} - -func writeSysctl(name string, value string) error { - path, err := parameterPath(name) - if err != nil { - return err - } - f, err := os.OpenFile(path, os.O_RDWR, 0644) - if err != nil { - return fmt.Errorf("could not open the sysctl file %s: %w", - path, err) - } - defer f.Close() - if _, err := io.WriteString(f, value); err != nil { - return fmt.Errorf("could not write to the systctl file %s: %w", - path, err) - } - return nil -} - -// Disable disables the given sysctl parameter. -func Disable(name string) error { - return writeSysctl(name, "0") -} - -// Enable enables the given sysctl parameter. -func Enable(name string) error { - return writeSysctl(name, "1") -} - -// Write writes the given sysctl parameter. -func Write(name string, val string) error { - return writeSysctl(name, val) -} - -// WriteInt writes the given integer type sysctl parameter. -func WriteInt(name string, val int64) error { - return writeSysctl(name, strconv.FormatInt(val, 10)) -} - -// Read reads the given sysctl parameter. -func Read(name string) (string, error) { - path, err := parameterPath(name) - if err != nil { - return "", err - } - val, err := os.ReadFile(path) - if err != nil { - return "", fmt.Errorf("Failed to read %s: %w", path, err) - } - - return strings.TrimRight(string(val), "\n"), nil -} - -// ReadInt reads the given sysctl parameter, return an int64 value. -func ReadInt(name string) (int64, error) { - s, err := Read(name) - if err != nil { - return -1, err - } - - i, err := strconv.ParseInt(s, 10, 64) - if err != nil { - return -1, err - } - - return i, nil -} - -// ApplySettings applies all settings in sysSettings. -func ApplySettings(sysSettings []Setting) error { - for _, s := range sysSettings { - log.WithFields(logrus.Fields{ - logfields.SysParamName: s.Name, - logfields.SysParamValue: s.Val, - }).Info("Setting sysctl") - if err := Write(s.Name, s.Val); err != nil { - if !s.IgnoreErr || errors.Is(err, ErrInvalidSysctlParameter("")) { - return fmt.Errorf("Failed to sysctl -w %s=%s: %w", s.Name, s.Val, err) - } - - warn := "Failed to sysctl -w" - if s.Warn != "" { - warn = s.Warn - } - log.WithError(err).WithFields(logrus.Fields{ - logfields.SysParamName: s.Name, - logfields.SysParamValue: s.Val, - }).Warning(warn) - } - } - - return nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/trigger/doc.go b/vendor/github.com/cilium/cilium/pkg/trigger/doc.go deleted file mode 100644 index 7ca449cd3a5..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/trigger/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Package trigger provides a mechanism to trigger actions that require to be -// serialized while providing a non-blocking notification mechanism -package trigger diff --git a/vendor/github.com/cilium/cilium/pkg/trigger/trigger.go b/vendor/github.com/cilium/cilium/pkg/trigger/trigger.go deleted file mode 100644 index 7afae25872d..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/trigger/trigger.go +++ /dev/null @@ -1,221 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package trigger - -import ( - "fmt" - - "github.com/cilium/cilium/pkg/inctimer" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/time" -) - -// MetricsObserver is the interface a metrics collector has to implement in -// order to collect trigger metrics -type MetricsObserver interface { - // PostRun is called after a trigger run with the call duration, the - // latency between 1st queue request and the call run and the number of - // queued events folded into the last run - PostRun(callDuration, latency time.Duration, folds int) - - // QueueEvent is called when Trigger() is called to schedule a trigger - // run - QueueEvent(reason string) -} - -// Parameters are the user specified parameters -type Parameters struct { - // MinInterval is the minimum required interval between invocations of - // TriggerFunc - MinInterval time.Duration - - // TriggerFunc is the function to be called when Trigger() is called - // while respecting MinInterval and serialization - TriggerFunc func(reasons []string) - - // ShutdownFunc is called when the trigger is shut down - ShutdownFunc func() - - MetricsObserver MetricsObserver - - // Name is the unique name of the trigger. It must be provided in a - // format compatible to be used as prometheus name string. - Name string - - // sleepInterval controls the waiter sleep duration. This parameter is - // only exposed to tests - sleepInterval time.Duration -} - -type reasonStack map[string]struct{} - -func newReasonStack() reasonStack { - return map[string]struct{}{} -} - -func (r reasonStack) add(reason string) { - r[reason] = struct{}{} -} - -func (r reasonStack) slice() []string { - result := make([]string, len(r)) - i := 0 - for reason := range r { - result[i] = reason - i++ - } - return result -} - -// Trigger represents an active trigger logic. Use NewTrigger() to create a -// trigger -type Trigger struct { - // protect mutual access of 'trigger' between Trigger() and waiter() - mutex lock.Mutex - trigger bool - - // params are the user specified parameters - params Parameters - - // lastTrigger is the timestamp of the last invoked trigger - lastTrigger time.Time - - // wakeupCan is used to wake up the background trigger routine - wakeupChan chan struct{} - - // closeChan is used to stop the background trigger routine - closeChan chan struct{} - - // numFolds is the current count of folds that happened into the - // currently scheduled trigger - numFolds int - - // foldedReasons is the sum of all unique reasons folded together. - foldedReasons reasonStack - - waitStart time.Time -} - -// NewTrigger returns a new trigger based on the provided parameters -func NewTrigger(p Parameters) (*Trigger, error) { - if p.sleepInterval == 0 { - p.sleepInterval = time.Second - } - - if p.TriggerFunc == nil { - return nil, fmt.Errorf("trigger function is nil") - } - - t := &Trigger{ - params: p, - wakeupChan: make(chan struct{}, 1), - closeChan: make(chan struct{}, 1), - foldedReasons: newReasonStack(), - } - - // Guarantee that initial trigger has no delay - if p.MinInterval > time.Duration(0) { - t.lastTrigger = time.Now().Add(-1 * p.MinInterval) - } - - go t.waiter() - - return t, nil -} - -// needsDelay returns whether and how long of a delay is required to fullfil -// MinInterval -func (t *Trigger) needsDelay() (bool, time.Duration) { - if t.params.MinInterval == time.Duration(0) { - return false, 0 - } - - sleepTime := time.Since(t.lastTrigger.Add(t.params.MinInterval)) - return sleepTime < 0, sleepTime * -1 -} - -// Trigger triggers the call to TriggerFunc as specified in the parameters -// provided to NewTrigger(). It respects MinInterval and ensures that calls to -// TriggerFunc are serialized. This function is non-blocking and will return -// immediately before TriggerFunc is potentially triggered and has completed. -func (t *Trigger) TriggerWithReason(reason string) { - t.mutex.Lock() - t.trigger = true - if t.numFolds == 0 { - t.waitStart = time.Now() - } - t.numFolds++ - t.foldedReasons.add(reason) - t.mutex.Unlock() - - if t.params.MetricsObserver != nil { - t.params.MetricsObserver.QueueEvent(reason) - } - - select { - case t.wakeupChan <- struct{}{}: - default: - } -} - -// Trigger triggers the call to TriggerFunc as specified in the parameters -// provided to NewTrigger(). It respects MinInterval and ensures that calls to -// TriggerFunc are serialized. This function is non-blocking and will return -// immediately before TriggerFunc is potentially triggered and has completed. -func (t *Trigger) Trigger() { - t.TriggerWithReason("") -} - -// Shutdown stops the trigger mechanism -func (t *Trigger) Shutdown() { - close(t.closeChan) -} - -func (t *Trigger) waiter() { - sleepTimer, sleepTimerDone := inctimer.New() - defer sleepTimerDone() - for { - // keep critical section as small as possible - t.mutex.Lock() - triggerEnabled := t.trigger - t.trigger = false - t.mutex.Unlock() - - // run the trigger function - if triggerEnabled { - if delayNeeded, delay := t.needsDelay(); delayNeeded { - time.Sleep(delay) - } - - t.mutex.Lock() - t.lastTrigger = time.Now() - numFolds := t.numFolds - t.numFolds = 0 - reasons := t.foldedReasons.slice() - t.foldedReasons = newReasonStack() - callLatency := time.Since(t.waitStart) - t.mutex.Unlock() - - beforeTrigger := time.Now() - t.params.TriggerFunc(reasons) - - if t.params.MetricsObserver != nil { - callDuration := time.Since(beforeTrigger) - t.params.MetricsObserver.PostRun(callDuration, callLatency, numFolds) - } - } - - select { - case <-t.wakeupChan: - case <-sleepTimer.After(t.params.sleepInterval): - - case <-t.closeChan: - shutdownFunc := t.params.ShutdownFunc - if shutdownFunc != nil { - shutdownFunc() - } - return - } - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/types/ipv4.go b/vendor/github.com/cilium/cilium/pkg/types/ipv4.go deleted file mode 100644 index e45ca66ef89..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/types/ipv4.go +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "net" - "net/netip" -) - -// IPv4 is the binary representation for encoding in binary structs. -type IPv4 [4]byte - -func (v4 IPv4) IsZero() bool { - return v4[0] == 0 && v4[1] == 0 && v4[2] == 0 && v4[3] == 0 -} - -func (v4 IPv4) IP() net.IP { - return v4[:] -} - -func (v4 IPv4) Addr() netip.Addr { - return netip.AddrFrom4(v4) -} - -func (v4 IPv4) String() string { - return v4.IP().String() -} - -// DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (v4 *IPv4) DeepCopyInto(out *IPv4) { - copy(out[:], v4[:]) -} - -// FromAddr will populate the receiver with the specified address if and only -// if the provided address is a valid IPv4 address. Any other address, -// including the "invalid ip" value netip.Addr{} will zero the receiver. -func (v4 *IPv4) FromAddr(addr netip.Addr) { - if addr.Is4() { - a := IPv4(addr.As4()) - copy(v4[:], a[:]) - } else { - clear(v4[:]) - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/types/ipv6.go b/vendor/github.com/cilium/cilium/pkg/types/ipv6.go deleted file mode 100644 index e740e19e8d2..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/types/ipv6.go +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "net" - "net/netip" -) - -// IPv6 is the binary representation for encoding in binary structs. -type IPv6 [16]byte - -func (v6 IPv6) IP() net.IP { - return v6[:] -} - -func (v6 IPv6) Addr() netip.Addr { - return netip.AddrFrom16(v6) -} - -func (v6 IPv6) String() string { - return v6.IP().String() -} - -// DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (v6 *IPv6) DeepCopyInto(out *IPv6) { - copy(out[:], v6[:]) -} - -// FromAddr will populate the receiver with the specified address if and only -// if the provided address is a valid IPv6 address. Any other address, -// including the "invalid ip" value netip.Addr{} will zero the receiver. -func (v6 *IPv6) FromAddr(addr netip.Addr) { - if addr.Is6() { - a := IPv6(addr.As16()) - copy(v6[:], a[:]) - } else { - clear(v6[:]) - } -} diff --git a/vendor/github.com/cilium/cilium/pkg/types/macaddr.go b/vendor/github.com/cilium/cilium/pkg/types/macaddr.go deleted file mode 100644 index 10470bd7254..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/types/macaddr.go +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "net" -) - -// MACAddr is the binary representation for encoding in binary structs. -type MACAddr [6]byte - -func (addr MACAddr) hardwareAddr() net.HardwareAddr { - return addr[:] -} - -func (addr MACAddr) String() string { - return addr.hardwareAddr().String() -} - -// DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (addr *MACAddr) DeepCopyInto(out *MACAddr) { - copy(out[:], addr[:]) -} diff --git a/vendor/github.com/cilium/cilium/pkg/types/portmap.go b/vendor/github.com/cilium/cilium/pkg/types/portmap.go deleted file mode 100644 index 86ab9f44636..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/types/portmap.go +++ /dev/null @@ -1,219 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package types - -import ( - "errors" - "fmt" - "strings" - - "github.com/cilium/cilium/pkg/counter" - "github.com/cilium/cilium/pkg/iana" - "github.com/cilium/cilium/pkg/lock" - "github.com/cilium/cilium/pkg/u8proto" -) - -var ( - ErrNilMap = errors.New("nil map") - ErrUnknownNamedPort = errors.New("unknown named port") - ErrIncompatibleProtocol = errors.New("incompatible protocol") - ErrNamedPortIsZero = errors.New("named port is zero") - ErrDuplicateNamedPorts = errors.New("duplicate named ports") -) - -// PortProto is a pair of port number and protocol and is used as the -// value type in named port maps. -type PortProto struct { - Port uint16 // non-0 - Proto uint8 // 0 for any -} - -// NamedPortMap maps port names to port numbers and protocols. -type NamedPortMap map[string]PortProto - -// PortProtoSet is a reference-counted set of unique PortProto values. -type PortProtoSet counter.Counter[PortProto] - -// Equal returns true if the PortProtoSets are equal. -func (pps PortProtoSet) Equal(other PortProtoSet) bool { - if len(pps) != len(other) { - return false - } - - for port := range pps { - if _, exists := other[port]; !exists { - return false - } - } - return true -} - -// Add increments the reference count for the specified key. -func (pps PortProtoSet) Add(pp PortProto) bool { - return counter.Counter[PortProto](pps).Add(pp) -} - -// Delete decrements the reference count for the specified key. -func (pps PortProtoSet) Delete(pp PortProto) bool { - return counter.Counter[PortProto](pps).Delete(pp) -} - -// NamedPortMultiMap may have multiple entries for a name if multiple PODs -// define the same name with different values. -type NamedPortMultiMap interface { - // GetNamedPort returns the port number for the named port, if any. - GetNamedPort(name string, proto uint8) (uint16, error) - // Len returns the number of Name->PortProtoSet mappings known. - Len() int -} - -func NewNamedPortMultiMap() *namedPortMultiMap { - return &namedPortMultiMap{ - m: make(map[string]PortProtoSet), - } -} - -// Implements NamedPortMultiMap and allows changes through Update. All accesses -// must be protected by its RW mutex. -type namedPortMultiMap struct { - lock.RWMutex - m map[string]PortProtoSet -} - -func (npm *namedPortMultiMap) Len() int { - npm.RLock() - defer npm.RUnlock() - return len(npm.m) -} - -// Update applies potential changes in named ports, and returns whether there were any. -func (npm *namedPortMultiMap) Update(old, new NamedPortMap) (namedPortsChanged bool) { - npm.Lock() - defer npm.Unlock() - // The order is important here. Increment the refcount first, and then - // decrement it again for old ports, so that we don't hit zero if there are - // no changes. - for name, port := range new { - c, ok := npm.m[name] - if !ok { - c = make(PortProtoSet) - npm.m[name] = c - } - if c.Add(port) { - namedPortsChanged = true - } - } - for name, port := range old { - if npm.m[name].Delete(port) { - namedPortsChanged = true - if len(npm.m[name]) == 0 { - delete(npm.m, name) - } - } - } - return namedPortsChanged -} - -// ValidatePortName checks that the port name conforms to the IANA Service Names spec -// and converts the port name to lower case for case-insensitive comparisons. -func ValidatePortName(name string) (string, error) { - if !iana.IsSvcName(name) { // Port names are formatted as IANA Service Names - return "", fmt.Errorf("Invalid port name \"%s\", not using as a named port", name) - } - return strings.ToLower(name), nil // Normalize for case-insensitive comparison -} - -func newPortProto(port int, protocol string) (pp PortProto, err error) { - var u8p u8proto.U8proto - if protocol == "" { - u8p = u8proto.TCP // K8s ContainerPort protocol defaults to TCP - } else { - var err error - u8p, err = u8proto.ParseProtocol(protocol) - if err != nil { - return pp, err - } - } - if port < 1 || port > 65535 { - if port == 0 { - return pp, ErrNamedPortIsZero - } - return pp, fmt.Errorf("Port number %d out of 16-bit range", port) - } - return PortProto{ - Proto: uint8(u8p), - Port: uint16(port), - }, nil -} - -// AddPort adds a new PortProto to the NamedPortMap -func (npm NamedPortMap) AddPort(name string, port int, protocol string) error { - name, err := ValidatePortName(name) - if err != nil { - return err - } - pp, err := newPortProto(port, protocol) - if err != nil { - return err - } - npm[name] = pp - return nil -} - -// GetNamedPort returns the port number for the named port, if any. -func (npm NamedPortMap) GetNamedPort(name string, proto uint8) (uint16, error) { - if npm == nil { - return 0, ErrNilMap - } - pp, ok := npm[name] - if !ok { - return 0, ErrUnknownNamedPort - } - if pp.Proto != 0 && proto != pp.Proto { - return 0, ErrIncompatibleProtocol - } - if pp.Port == 0 { - return 0, ErrNamedPortIsZero - } - return pp.Port, nil -} - -// GetNamedPort returns the port number for the named port, if any. -func (npm *namedPortMultiMap) GetNamedPort(name string, proto uint8) (uint16, error) { - if npm == nil { - return 0, ErrNilMap - } - npm.RLock() - defer npm.RUnlock() - if npm.m == nil { - return 0, ErrNilMap - } - pps, ok := npm.m[name] - if !ok { - // Return an error the caller can filter out as this happens only for egress policy - // and it is likely the destination POD with the port name is simply not scheduled yet. - return 0, ErrUnknownNamedPort - } - // Find if there is a single port that has no proto conflict and no zero port value - port := uint16(0) - err := ErrUnknownNamedPort - for pp := range pps { - if pp.Proto != 0 && proto != pp.Proto { - err = ErrIncompatibleProtocol - continue // conflicting proto - } - if pp.Port == 0 { - err = ErrNamedPortIsZero - continue // zero port - } - if port != 0 && pp.Port != port { - return 0, ErrDuplicateNamedPorts - } - port = pp.Port - } - if port == 0 { - return 0, err - } - return port, nil -} diff --git a/vendor/github.com/cilium/cilium/pkg/u8proto/u8proto.go b/vendor/github.com/cilium/cilium/pkg/u8proto/u8proto.go deleted file mode 100644 index 2df035a0441..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/u8proto/u8proto.go +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package u8proto - -import ( - "fmt" - "strconv" - "strings" -) - -// These definitions must contain and be compatible with the string -// values defined for pkg/pollicy/api/L4Proto - -const ( - // ANY represents all protocols. - ANY U8proto = 0 - ICMP U8proto = 1 - TCP U8proto = 6 - UDP U8proto = 17 - ICMPv6 U8proto = 58 - SCTP U8proto = 132 -) - -var protoNames = map[U8proto]string{ - 0: "ANY", - 1: "ICMP", - 6: "TCP", - 17: "UDP", - 58: "ICMPv6", - 132: "SCTP", -} - -var ProtoIDs = map[string]U8proto{ - "all": 0, - "any": 0, - "icmp": 1, - "tcp": 6, - "udp": 17, - "icmpv6": 58, - "sctp": 132, -} - -type U8proto uint8 - -func (p U8proto) String() string { - if _, ok := protoNames[p]; ok { - return protoNames[p] - } - return strconv.Itoa(int(p)) -} - -func ParseProtocol(proto string) (U8proto, error) { - if u, ok := ProtoIDs[strings.ToLower(proto)]; ok { - return u, nil - } - return 0, fmt.Errorf("unknown protocol '%s'", proto) -} diff --git a/vendor/github.com/cilium/cilium/pkg/version/version_unix.go b/vendor/github.com/cilium/cilium/pkg/version/version_unix.go index 09e72b88823..b4d5454e97e 100644 --- a/vendor/github.com/cilium/cilium/pkg/version/version_unix.go +++ b/vendor/github.com/cilium/cilium/pkg/version/version_unix.go @@ -18,23 +18,33 @@ import ( func parseKernelVersion(ver string) (semver.Version, error) { verStrs := strings.Split(ver, ".") - switch { - case len(verStrs) < 2: + + // We are assuming the kernel version will be one of the following: + // 4.9.17-040917-generic or 4.9-040917-generic or 4-generic + // So as observed, the kernel value is N.N.N-m or N.N-m or N-m + // This implies the len(verStrs) should be between 1 and 3 + + if len(verStrs) < 1 || len(verStrs) > 3 { return semver.Version{}, fmt.Errorf("unable to get kernel version from %q", ver) - case len(verStrs) < 3: - verStrs = append(verStrs, "0") } - // We are assuming the kernel version will be something as: - // 4.9.17-040917-generic - // If verStrs is []string{ "4", "9", "17-040917-generic" } - // then we need to retrieve patch number. - patch := regexp.MustCompilePOSIX(`^[0-9]+`).FindString(verStrs[2]) + // Given the observations, we use regular expression to extract + // the patch number from the last element of the verStrs array and + // append "0" to the verStrs array in case the until its length is + // 3 as in all cases we want to return from this function : + // Major.Minor.PatchNumber + + patch := regexp.MustCompilePOSIX(`^[0-9]+`).FindString(verStrs[len(verStrs)-1]) if patch == "" { - verStrs[2] = "0" + verStrs[len(verStrs)-1] = "0" } else { - verStrs[2] = patch + verStrs[len(verStrs)-1] = patch } + + for len(verStrs) < 3 { + verStrs = append(verStrs, "0") + } + return versioncheck.Version(strings.Join(verStrs[:3], ".")) } diff --git a/vendor/github.com/cilium/cilium/pkg/wireguard/types/types.go b/vendor/github.com/cilium/cilium/pkg/wireguard/types/types.go deleted file mode 100644 index 889e2a45481..00000000000 --- a/vendor/github.com/cilium/cilium/pkg/wireguard/types/types.go +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Common WireGuard types and constants -package types - -const ( - // ListenPort is the port on which the WireGuard tunnel device listens on - ListenPort = 51871 - // IfaceName is the name of the WireGuard tunnel device - IfaceName = "cilium_wg0" - // PrivKeyFilename is the name of the WireGuard private key file - PrivKeyFilename = "cilium_wg0.key" - // StaticEncryptKey is used in the IPCache to mark entries for which we - // want to enable WireGuard encryption - StaticEncryptKey = uint8(0xFF) -) diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/accesslog.go b/vendor/github.com/cilium/proxy/go/cilium/api/accesslog.go deleted file mode 100644 index 89d60eec20d..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/accesslog.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2020 Authors of Cilium -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cilium - -// Add an exported type alias for L7 log entry oneof, so that the Go code does -// not need to know all the individual types -type IsLogEntry_L7 = isLogEntry_L7 diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/accesslog.pb.go b/vendor/github.com/cilium/proxy/go/cilium/api/accesslog.pb.go deleted file mode 100644 index f5ebaac5ad2..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/accesslog.pb.go +++ /dev/null @@ -1,860 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: cilium/api/accesslog.proto - -package cilium - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type HttpProtocol int32 - -const ( - HttpProtocol_HTTP10 HttpProtocol = 0 - HttpProtocol_HTTP11 HttpProtocol = 1 - HttpProtocol_HTTP2 HttpProtocol = 2 -) - -// Enum value maps for HttpProtocol. -var ( - HttpProtocol_name = map[int32]string{ - 0: "HTTP10", - 1: "HTTP11", - 2: "HTTP2", - } - HttpProtocol_value = map[string]int32{ - "HTTP10": 0, - "HTTP11": 1, - "HTTP2": 2, - } -) - -func (x HttpProtocol) Enum() *HttpProtocol { - p := new(HttpProtocol) - *p = x - return p -} - -func (x HttpProtocol) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HttpProtocol) Descriptor() protoreflect.EnumDescriptor { - return file_cilium_api_accesslog_proto_enumTypes[0].Descriptor() -} - -func (HttpProtocol) Type() protoreflect.EnumType { - return &file_cilium_api_accesslog_proto_enumTypes[0] -} - -func (x HttpProtocol) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HttpProtocol.Descriptor instead. -func (HttpProtocol) EnumDescriptor() ([]byte, []int) { - return file_cilium_api_accesslog_proto_rawDescGZIP(), []int{0} -} - -type EntryType int32 - -const ( - EntryType_Request EntryType = 0 - EntryType_Response EntryType = 1 - EntryType_Denied EntryType = 2 -) - -// Enum value maps for EntryType. -var ( - EntryType_name = map[int32]string{ - 0: "Request", - 1: "Response", - 2: "Denied", - } - EntryType_value = map[string]int32{ - "Request": 0, - "Response": 1, - "Denied": 2, - } -) - -func (x EntryType) Enum() *EntryType { - p := new(EntryType) - *p = x - return p -} - -func (x EntryType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (EntryType) Descriptor() protoreflect.EnumDescriptor { - return file_cilium_api_accesslog_proto_enumTypes[1].Descriptor() -} - -func (EntryType) Type() protoreflect.EnumType { - return &file_cilium_api_accesslog_proto_enumTypes[1] -} - -func (x EntryType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use EntryType.Descriptor instead. -func (EntryType) EnumDescriptor() ([]byte, []int) { - return file_cilium_api_accesslog_proto_rawDescGZIP(), []int{1} -} - -type KeyValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *KeyValue) Reset() { - *x = KeyValue{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_accesslog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeyValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeyValue) ProtoMessage() {} - -func (x *KeyValue) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_accesslog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KeyValue.ProtoReflect.Descriptor instead. -func (*KeyValue) Descriptor() ([]byte, []int) { - return file_cilium_api_accesslog_proto_rawDescGZIP(), []int{0} -} - -func (x *KeyValue) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *KeyValue) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type HttpLogEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HttpProtocol HttpProtocol `protobuf:"varint,1,opt,name=http_protocol,json=httpProtocol,proto3,enum=cilium.HttpProtocol" json:"http_protocol,omitempty"` - // Request info that is also retained for the response - Scheme string `protobuf:"bytes,2,opt,name=scheme,proto3" json:"scheme,omitempty"` // Envoy "x-forwarded-proto", e.g., "http", "https" - Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` // Envoy ":authority" header - Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` // Envoy ":path" header - Method string `protobuf:"bytes,5,opt,name=method,proto3" json:"method,omitempty"` // Envoy ":method" header - // Request or response headers not included above - Headers []*KeyValue `protobuf:"bytes,6,rep,name=headers,proto3" json:"headers,omitempty"` - // Response info - Status uint32 `protobuf:"varint,7,opt,name=status,proto3" json:"status,omitempty"` // Envoy ":status" header, zero for request - // missing_headers includes both headers that were added to the - // request, and headers that were merely logged as missing - MissingHeaders []*KeyValue `protobuf:"bytes,8,rep,name=missing_headers,json=missingHeaders,proto3" json:"missing_headers,omitempty"` - // rejected_headers includes headers that were flagged as unallowed, - // which may have been removed, or merely logged and the request still - // allowed, or the request may have been dropped due to them. - RejectedHeaders []*KeyValue `protobuf:"bytes,9,rep,name=rejected_headers,json=rejectedHeaders,proto3" json:"rejected_headers,omitempty"` -} - -func (x *HttpLogEntry) Reset() { - *x = HttpLogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_accesslog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpLogEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpLogEntry) ProtoMessage() {} - -func (x *HttpLogEntry) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_accesslog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpLogEntry.ProtoReflect.Descriptor instead. -func (*HttpLogEntry) Descriptor() ([]byte, []int) { - return file_cilium_api_accesslog_proto_rawDescGZIP(), []int{1} -} - -func (x *HttpLogEntry) GetHttpProtocol() HttpProtocol { - if x != nil { - return x.HttpProtocol - } - return HttpProtocol_HTTP10 -} - -func (x *HttpLogEntry) GetScheme() string { - if x != nil { - return x.Scheme - } - return "" -} - -func (x *HttpLogEntry) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *HttpLogEntry) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *HttpLogEntry) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -func (x *HttpLogEntry) GetHeaders() []*KeyValue { - if x != nil { - return x.Headers - } - return nil -} - -func (x *HttpLogEntry) GetStatus() uint32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *HttpLogEntry) GetMissingHeaders() []*KeyValue { - if x != nil { - return x.MissingHeaders - } - return nil -} - -func (x *HttpLogEntry) GetRejectedHeaders() []*KeyValue { - if x != nil { - return x.RejectedHeaders - } - return nil -} - -type KafkaLogEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // correlation_id is a user-supplied integer value that will be passed - // back with the response - CorrelationId int32 `protobuf:"varint,1,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"` - // error_code is the Kafka error code being returned - // Ref. https://kafka.apache.org/protocol#protocol_error_codes - ErrorCode int32 `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` - // api_version of the Kafka api used - // Ref. https://kafka.apache.org/protocol#protocol_compatibility - ApiVersion int32 `protobuf:"varint,3,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` - // api_key for Kafka message - // Reference: https://kafka.apache.org/protocol#protocol_api_keys - ApiKey int32 `protobuf:"varint,4,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` - // Topics of the request - // Optional, as not all messages have topics (ex. LeaveGroup, Heartbeat) - Topics []string `protobuf:"bytes,5,rep,name=topics,proto3" json:"topics,omitempty"` -} - -func (x *KafkaLogEntry) Reset() { - *x = KafkaLogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_accesslog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KafkaLogEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KafkaLogEntry) ProtoMessage() {} - -func (x *KafkaLogEntry) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_accesslog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KafkaLogEntry.ProtoReflect.Descriptor instead. -func (*KafkaLogEntry) Descriptor() ([]byte, []int) { - return file_cilium_api_accesslog_proto_rawDescGZIP(), []int{2} -} - -func (x *KafkaLogEntry) GetCorrelationId() int32 { - if x != nil { - return x.CorrelationId - } - return 0 -} - -func (x *KafkaLogEntry) GetErrorCode() int32 { - if x != nil { - return x.ErrorCode - } - return 0 -} - -func (x *KafkaLogEntry) GetApiVersion() int32 { - if x != nil { - return x.ApiVersion - } - return 0 -} - -func (x *KafkaLogEntry) GetApiKey() int32 { - if x != nil { - return x.ApiKey - } - return 0 -} - -func (x *KafkaLogEntry) GetTopics() []string { - if x != nil { - return x.Topics - } - return nil -} - -type L7LogEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Proto string `protobuf:"bytes,1,opt,name=proto,proto3" json:"proto,omitempty"` - Fields map[string]string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *L7LogEntry) Reset() { - *x = L7LogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_accesslog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L7LogEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L7LogEntry) ProtoMessage() {} - -func (x *L7LogEntry) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_accesslog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L7LogEntry.ProtoReflect.Descriptor instead. -func (*L7LogEntry) Descriptor() ([]byte, []int) { - return file_cilium_api_accesslog_proto_rawDescGZIP(), []int{3} -} - -func (x *L7LogEntry) GetProto() string { - if x != nil { - return x.Proto - } - return "" -} - -func (x *L7LogEntry) GetFields() map[string]string { - if x != nil { - return x.Fields - } - return nil -} - -type LogEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The time that Cilium filter captured this log entry, - // in, nanoseconds since 1/1/1970. - Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // 'true' if the request was received by an ingress listener, - // 'false' if received by an egress listener - IsIngress bool `protobuf:"varint,15,opt,name=is_ingress,json=isIngress,proto3" json:"is_ingress,omitempty"` - EntryType EntryType `protobuf:"varint,3,opt,name=entry_type,json=entryType,proto3,enum=cilium.EntryType" json:"entry_type,omitempty"` - // Cilium network policy resource name - PolicyName string `protobuf:"bytes,4,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` - // proxy_id identifies the listener this message relates to, - // as configured via the bpf_metadata listener filter - ProxyId uint32 `protobuf:"varint,17,opt,name=proxy_id,json=proxyId,proto3" json:"proxy_id,omitempty"` - // Cilium rule reference - CiliumRuleRef string `protobuf:"bytes,5,opt,name=cilium_rule_ref,json=ciliumRuleRef,proto3" json:"cilium_rule_ref,omitempty"` - // Cilium security ID of the source and destination - SourceSecurityId uint32 `protobuf:"varint,6,opt,name=source_security_id,json=sourceSecurityId,proto3" json:"source_security_id,omitempty"` - DestinationSecurityId uint32 `protobuf:"varint,16,opt,name=destination_security_id,json=destinationSecurityId,proto3" json:"destination_security_id,omitempty"` - // These fields record the original source and destination addresses, - // stored in ipv4:port or [ipv6]:port format. - SourceAddress string `protobuf:"bytes,7,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` - DestinationAddress string `protobuf:"bytes,8,opt,name=destination_address,json=destinationAddress,proto3" json:"destination_address,omitempty"` - // Types that are assignable to L7: - // - // *LogEntry_Http - // *LogEntry_Kafka - // *LogEntry_GenericL7 - L7 isLogEntry_L7 `protobuf_oneof:"l7"` -} - -func (x *LogEntry) Reset() { - *x = LogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_accesslog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LogEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LogEntry) ProtoMessage() {} - -func (x *LogEntry) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_accesslog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LogEntry.ProtoReflect.Descriptor instead. -func (*LogEntry) Descriptor() ([]byte, []int) { - return file_cilium_api_accesslog_proto_rawDescGZIP(), []int{4} -} - -func (x *LogEntry) GetTimestamp() uint64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -func (x *LogEntry) GetIsIngress() bool { - if x != nil { - return x.IsIngress - } - return false -} - -func (x *LogEntry) GetEntryType() EntryType { - if x != nil { - return x.EntryType - } - return EntryType_Request -} - -func (x *LogEntry) GetPolicyName() string { - if x != nil { - return x.PolicyName - } - return "" -} - -func (x *LogEntry) GetProxyId() uint32 { - if x != nil { - return x.ProxyId - } - return 0 -} - -func (x *LogEntry) GetCiliumRuleRef() string { - if x != nil { - return x.CiliumRuleRef - } - return "" -} - -func (x *LogEntry) GetSourceSecurityId() uint32 { - if x != nil { - return x.SourceSecurityId - } - return 0 -} - -func (x *LogEntry) GetDestinationSecurityId() uint32 { - if x != nil { - return x.DestinationSecurityId - } - return 0 -} - -func (x *LogEntry) GetSourceAddress() string { - if x != nil { - return x.SourceAddress - } - return "" -} - -func (x *LogEntry) GetDestinationAddress() string { - if x != nil { - return x.DestinationAddress - } - return "" -} - -func (m *LogEntry) GetL7() isLogEntry_L7 { - if m != nil { - return m.L7 - } - return nil -} - -func (x *LogEntry) GetHttp() *HttpLogEntry { - if x, ok := x.GetL7().(*LogEntry_Http); ok { - return x.Http - } - return nil -} - -func (x *LogEntry) GetKafka() *KafkaLogEntry { - if x, ok := x.GetL7().(*LogEntry_Kafka); ok { - return x.Kafka - } - return nil -} - -func (x *LogEntry) GetGenericL7() *L7LogEntry { - if x, ok := x.GetL7().(*LogEntry_GenericL7); ok { - return x.GenericL7 - } - return nil -} - -type isLogEntry_L7 interface { - isLogEntry_L7() -} - -type LogEntry_Http struct { - Http *HttpLogEntry `protobuf:"bytes,100,opt,name=http,proto3,oneof"` -} - -type LogEntry_Kafka struct { - Kafka *KafkaLogEntry `protobuf:"bytes,101,opt,name=kafka,proto3,oneof"` -} - -type LogEntry_GenericL7 struct { - GenericL7 *L7LogEntry `protobuf:"bytes,102,opt,name=generic_l7,json=genericL7,proto3,oneof"` -} - -func (*LogEntry_Http) isLogEntry_L7() {} - -func (*LogEntry_Kafka) isLogEntry_L7() {} - -func (*LogEntry_GenericL7) isLogEntry_L7() {} - -var File_cilium_api_accesslog_proto protoreflect.FileDescriptor - -var file_cilium_api_accesslog_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x69, - 0x6c, 0x69, 0x75, 0x6d, 0x22, 0x32, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xdd, 0x02, 0x0a, 0x0c, 0x48, 0x74, 0x74, - 0x70, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x39, 0x0a, 0x0d, 0x68, 0x74, 0x74, - 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x14, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2a, 0x0a, 0x07, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x39, 0x0a, 0x0f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x69, 0x6c, 0x69, - 0x75, 0x6d, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x10, 0x72, - 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, - 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4b, - 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x0d, 0x4b, 0x61, 0x66, - 0x6b, 0x61, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, - 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x61, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, - 0x70, 0x69, 0x63, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, - 0x63, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x0a, 0x4c, 0x37, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x36, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, - 0x2e, 0x4c, 0x37, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, - 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb1, 0x04, 0x0a, 0x08, 0x4c, - 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x67, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x49, 0x6e, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, - 0x6d, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x5f, 0x72, 0x75, 0x6c, - 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x69, 0x6c, - 0x69, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x49, 0x64, - 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, - 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x04, - 0x68, 0x74, 0x74, 0x70, 0x12, 0x2d, 0x0a, 0x05, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x18, 0x65, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4b, 0x61, 0x66, - 0x6b, 0x61, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x05, 0x6b, 0x61, - 0x66, 0x6b, 0x61, 0x12, 0x33, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x6c, - 0x37, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, - 0x2e, 0x4c, 0x37, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x09, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4c, 0x37, 0x42, 0x04, 0x0a, 0x02, 0x6c, 0x37, 0x2a, 0x31, - 0x0a, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x0a, - 0x0a, 0x06, 0x48, 0x54, 0x54, 0x50, 0x31, 0x30, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x54, - 0x54, 0x50, 0x31, 0x31, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x32, 0x10, - 0x02, 0x2a, 0x32, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, - 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x65, 0x6e, - 0x69, 0x65, 0x64, 0x10, 0x02, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x63, - 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cilium_api_accesslog_proto_rawDescOnce sync.Once - file_cilium_api_accesslog_proto_rawDescData = file_cilium_api_accesslog_proto_rawDesc -) - -func file_cilium_api_accesslog_proto_rawDescGZIP() []byte { - file_cilium_api_accesslog_proto_rawDescOnce.Do(func() { - file_cilium_api_accesslog_proto_rawDescData = protoimpl.X.CompressGZIP(file_cilium_api_accesslog_proto_rawDescData) - }) - return file_cilium_api_accesslog_proto_rawDescData -} - -var file_cilium_api_accesslog_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_cilium_api_accesslog_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_cilium_api_accesslog_proto_goTypes = []interface{}{ - (HttpProtocol)(0), // 0: cilium.HttpProtocol - (EntryType)(0), // 1: cilium.EntryType - (*KeyValue)(nil), // 2: cilium.KeyValue - (*HttpLogEntry)(nil), // 3: cilium.HttpLogEntry - (*KafkaLogEntry)(nil), // 4: cilium.KafkaLogEntry - (*L7LogEntry)(nil), // 5: cilium.L7LogEntry - (*LogEntry)(nil), // 6: cilium.LogEntry - nil, // 7: cilium.L7LogEntry.FieldsEntry -} -var file_cilium_api_accesslog_proto_depIdxs = []int32{ - 0, // 0: cilium.HttpLogEntry.http_protocol:type_name -> cilium.HttpProtocol - 2, // 1: cilium.HttpLogEntry.headers:type_name -> cilium.KeyValue - 2, // 2: cilium.HttpLogEntry.missing_headers:type_name -> cilium.KeyValue - 2, // 3: cilium.HttpLogEntry.rejected_headers:type_name -> cilium.KeyValue - 7, // 4: cilium.L7LogEntry.fields:type_name -> cilium.L7LogEntry.FieldsEntry - 1, // 5: cilium.LogEntry.entry_type:type_name -> cilium.EntryType - 3, // 6: cilium.LogEntry.http:type_name -> cilium.HttpLogEntry - 4, // 7: cilium.LogEntry.kafka:type_name -> cilium.KafkaLogEntry - 5, // 8: cilium.LogEntry.generic_l7:type_name -> cilium.L7LogEntry - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_cilium_api_accesslog_proto_init() } -func file_cilium_api_accesslog_proto_init() { - if File_cilium_api_accesslog_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cilium_api_accesslog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_accesslog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpLogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_accesslog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KafkaLogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_accesslog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L7LogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_accesslog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cilium_api_accesslog_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*LogEntry_Http)(nil), - (*LogEntry_Kafka)(nil), - (*LogEntry_GenericL7)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cilium_api_accesslog_proto_rawDesc, - NumEnums: 2, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cilium_api_accesslog_proto_goTypes, - DependencyIndexes: file_cilium_api_accesslog_proto_depIdxs, - EnumInfos: file_cilium_api_accesslog_proto_enumTypes, - MessageInfos: file_cilium_api_accesslog_proto_msgTypes, - }.Build() - File_cilium_api_accesslog_proto = out.File - file_cilium_api_accesslog_proto_rawDesc = nil - file_cilium_api_accesslog_proto_goTypes = nil - file_cilium_api_accesslog_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/accesslog.pb.validate.go b/vendor/github.com/cilium/proxy/go/cilium/api/accesslog.pb.validate.go deleted file mode 100644 index 3a9c5b417a5..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/accesslog.pb.validate.go +++ /dev/null @@ -1,810 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: cilium/api/accesslog.proto - -package cilium - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on KeyValue with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *KeyValue) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on KeyValue with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in KeyValueMultiError, or nil -// if none found. -func (m *KeyValue) ValidateAll() error { - return m.validate(true) -} - -func (m *KeyValue) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Key - - // no validation rules for Value - - if len(errors) > 0 { - return KeyValueMultiError(errors) - } - - return nil -} - -// KeyValueMultiError is an error wrapping multiple validation errors returned -// by KeyValue.ValidateAll() if the designated constraints aren't met. -type KeyValueMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m KeyValueMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m KeyValueMultiError) AllErrors() []error { return m } - -// KeyValueValidationError is the validation error returned by -// KeyValue.Validate if the designated constraints aren't met. -type KeyValueValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e KeyValueValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e KeyValueValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e KeyValueValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e KeyValueValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e KeyValueValidationError) ErrorName() string { return "KeyValueValidationError" } - -// Error satisfies the builtin error interface -func (e KeyValueValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sKeyValue.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = KeyValueValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = KeyValueValidationError{} - -// Validate checks the field values on HttpLogEntry with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HttpLogEntry) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpLogEntry with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HttpLogEntryMultiError, or -// nil if none found. -func (m *HttpLogEntry) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpLogEntry) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for HttpProtocol - - // no validation rules for Scheme - - // no validation rules for Host - - // no validation rules for Path - - // no validation rules for Method - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpLogEntryValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpLogEntryValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpLogEntryValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for Status - - for idx, item := range m.GetMissingHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpLogEntryValidationError{ - field: fmt.Sprintf("MissingHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpLogEntryValidationError{ - field: fmt.Sprintf("MissingHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpLogEntryValidationError{ - field: fmt.Sprintf("MissingHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRejectedHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpLogEntryValidationError{ - field: fmt.Sprintf("RejectedHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpLogEntryValidationError{ - field: fmt.Sprintf("RejectedHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpLogEntryValidationError{ - field: fmt.Sprintf("RejectedHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return HttpLogEntryMultiError(errors) - } - - return nil -} - -// HttpLogEntryMultiError is an error wrapping multiple validation errors -// returned by HttpLogEntry.ValidateAll() if the designated constraints aren't met. -type HttpLogEntryMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpLogEntryMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpLogEntryMultiError) AllErrors() []error { return m } - -// HttpLogEntryValidationError is the validation error returned by -// HttpLogEntry.Validate if the designated constraints aren't met. -type HttpLogEntryValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpLogEntryValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpLogEntryValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpLogEntryValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpLogEntryValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpLogEntryValidationError) ErrorName() string { return "HttpLogEntryValidationError" } - -// Error satisfies the builtin error interface -func (e HttpLogEntryValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpLogEntry.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpLogEntryValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpLogEntryValidationError{} - -// Validate checks the field values on KafkaLogEntry with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *KafkaLogEntry) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on KafkaLogEntry with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in KafkaLogEntryMultiError, or -// nil if none found. -func (m *KafkaLogEntry) ValidateAll() error { - return m.validate(true) -} - -func (m *KafkaLogEntry) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for CorrelationId - - // no validation rules for ErrorCode - - // no validation rules for ApiVersion - - // no validation rules for ApiKey - - if len(errors) > 0 { - return KafkaLogEntryMultiError(errors) - } - - return nil -} - -// KafkaLogEntryMultiError is an error wrapping multiple validation errors -// returned by KafkaLogEntry.ValidateAll() if the designated constraints -// aren't met. -type KafkaLogEntryMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m KafkaLogEntryMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m KafkaLogEntryMultiError) AllErrors() []error { return m } - -// KafkaLogEntryValidationError is the validation error returned by -// KafkaLogEntry.Validate if the designated constraints aren't met. -type KafkaLogEntryValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e KafkaLogEntryValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e KafkaLogEntryValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e KafkaLogEntryValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e KafkaLogEntryValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e KafkaLogEntryValidationError) ErrorName() string { return "KafkaLogEntryValidationError" } - -// Error satisfies the builtin error interface -func (e KafkaLogEntryValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sKafkaLogEntry.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = KafkaLogEntryValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = KafkaLogEntryValidationError{} - -// Validate checks the field values on L7LogEntry with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *L7LogEntry) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on L7LogEntry with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in L7LogEntryMultiError, or -// nil if none found. -func (m *L7LogEntry) ValidateAll() error { - return m.validate(true) -} - -func (m *L7LogEntry) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Proto - - // no validation rules for Fields - - if len(errors) > 0 { - return L7LogEntryMultiError(errors) - } - - return nil -} - -// L7LogEntryMultiError is an error wrapping multiple validation errors -// returned by L7LogEntry.ValidateAll() if the designated constraints aren't met. -type L7LogEntryMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m L7LogEntryMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m L7LogEntryMultiError) AllErrors() []error { return m } - -// L7LogEntryValidationError is the validation error returned by -// L7LogEntry.Validate if the designated constraints aren't met. -type L7LogEntryValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e L7LogEntryValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e L7LogEntryValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e L7LogEntryValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e L7LogEntryValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e L7LogEntryValidationError) ErrorName() string { return "L7LogEntryValidationError" } - -// Error satisfies the builtin error interface -func (e L7LogEntryValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sL7LogEntry.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = L7LogEntryValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = L7LogEntryValidationError{} - -// Validate checks the field values on LogEntry with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *LogEntry) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on LogEntry with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in LogEntryMultiError, or nil -// if none found. -func (m *LogEntry) ValidateAll() error { - return m.validate(true) -} - -func (m *LogEntry) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Timestamp - - // no validation rules for IsIngress - - // no validation rules for EntryType - - // no validation rules for PolicyName - - // no validation rules for ProxyId - - // no validation rules for CiliumRuleRef - - // no validation rules for SourceSecurityId - - // no validation rules for DestinationSecurityId - - // no validation rules for SourceAddress - - // no validation rules for DestinationAddress - - switch v := m.L7.(type) { - case *LogEntry_Http: - if v == nil { - err := LogEntryValidationError{ - field: "L7", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetHttp()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LogEntryValidationError{ - field: "Http", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LogEntryValidationError{ - field: "Http", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LogEntryValidationError{ - field: "Http", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *LogEntry_Kafka: - if v == nil { - err := LogEntryValidationError{ - field: "L7", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetKafka()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LogEntryValidationError{ - field: "Kafka", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LogEntryValidationError{ - field: "Kafka", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKafka()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LogEntryValidationError{ - field: "Kafka", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *LogEntry_GenericL7: - if v == nil { - err := LogEntryValidationError{ - field: "L7", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetGenericL7()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LogEntryValidationError{ - field: "GenericL7", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LogEntryValidationError{ - field: "GenericL7", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGenericL7()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LogEntryValidationError{ - field: "GenericL7", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return LogEntryMultiError(errors) - } - - return nil -} - -// LogEntryMultiError is an error wrapping multiple validation errors returned -// by LogEntry.ValidateAll() if the designated constraints aren't met. -type LogEntryMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LogEntryMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LogEntryMultiError) AllErrors() []error { return m } - -// LogEntryValidationError is the validation error returned by -// LogEntry.Validate if the designated constraints aren't met. -type LogEntryValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LogEntryValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LogEntryValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LogEntryValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LogEntryValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LogEntryValidationError) ErrorName() string { return "LogEntryValidationError" } - -// Error satisfies the builtin error interface -func (e LogEntryValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLogEntry.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LogEntryValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LogEntryValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/bpf_metadata.pb.go b/vendor/github.com/cilium/proxy/go/cilium/api/bpf_metadata.pb.go deleted file mode 100644 index a8a62eec9cc..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/bpf_metadata.pb.go +++ /dev/null @@ -1,250 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: cilium/api/bpf_metadata.proto - -package cilium - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type BpfMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // File system root for bpf. Defaults to "/sys/fs/bpf" if left empty. - BpfRoot string `protobuf:"bytes,1,opt,name=bpf_root,json=bpfRoot,proto3" json:"bpf_root,omitempty"` - // 'true' if the filter is on ingress listener, 'false' for egress listener. - IsIngress bool `protobuf:"varint,2,opt,name=is_ingress,json=isIngress,proto3" json:"is_ingress,omitempty"` - // Use of the original source address requires kernel datapath support which - // may or may not be available. 'true' if original source address - // should be used. Original source address use may still be - // skipped in scenarios where it is knows to not work. - UseOriginalSourceAddress bool `protobuf:"varint,3,opt,name=use_original_source_address,json=useOriginalSourceAddress,proto3" json:"use_original_source_address,omitempty"` - // True if the listener is used for an L7 LB. In this case policy enforcement is done on the - // destination selected by the listener rather than on the original destination address. For - // local sources the source endpoint ID is set in socket mark instead of source security ID if - // 'use_original_source_address' is also true, so that the local source's egress policy is - // enforced on the bpf datapath. - // Only valid for egress. - IsL7Lb bool `protobuf:"varint,4,opt,name=is_l7lb,json=isL7lb,proto3" json:"is_l7lb,omitempty"` - // Source address to be used whenever the original source address is not used. - // Either ipv4_source_address or ipv6_source_address depending on the address - // family of the destination address. If left empty, and no Envoy Cluster Bind - // Config is provided, the source address will be picked by the local IP stack. - Ipv4SourceAddress string `protobuf:"bytes,5,opt,name=ipv4_source_address,json=ipv4SourceAddress,proto3" json:"ipv4_source_address,omitempty"` - Ipv6SourceAddress string `protobuf:"bytes,6,opt,name=ipv6_source_address,json=ipv6SourceAddress,proto3" json:"ipv6_source_address,omitempty"` - // True if policy should be enforced on l7 LB used. The policy bound to the configured - // ipv[46]_source_addresses, which must be explicitly set, applies. Ingress policy is - // enforced on the security identity of the original (e.g., external) source. Egress - // policy is enforced on the security identity of the backend selected by the load balancer. - // - // Deprecation note: This option will be forced 'true' and deprecated when Cilium 1.15 is - // the oldest supported release. - EnforcePolicyOnL7Lb bool `protobuf:"varint,7,opt,name=enforce_policy_on_l7lb,json=enforcePolicyOnL7lb,proto3" json:"enforce_policy_on_l7lb,omitempty"` - // proxy_id is passed to access log messages and allows relating access log messages to - // listeners. - ProxyId uint32 `protobuf:"varint,8,opt,name=proxy_id,json=proxyId,proto3" json:"proxy_id,omitempty"` -} - -func (x *BpfMetadata) Reset() { - *x = BpfMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_bpf_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BpfMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BpfMetadata) ProtoMessage() {} - -func (x *BpfMetadata) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_bpf_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BpfMetadata.ProtoReflect.Descriptor instead. -func (*BpfMetadata) Descriptor() ([]byte, []int) { - return file_cilium_api_bpf_metadata_proto_rawDescGZIP(), []int{0} -} - -func (x *BpfMetadata) GetBpfRoot() string { - if x != nil { - return x.BpfRoot - } - return "" -} - -func (x *BpfMetadata) GetIsIngress() bool { - if x != nil { - return x.IsIngress - } - return false -} - -func (x *BpfMetadata) GetUseOriginalSourceAddress() bool { - if x != nil { - return x.UseOriginalSourceAddress - } - return false -} - -func (x *BpfMetadata) GetIsL7Lb() bool { - if x != nil { - return x.IsL7Lb - } - return false -} - -func (x *BpfMetadata) GetIpv4SourceAddress() string { - if x != nil { - return x.Ipv4SourceAddress - } - return "" -} - -func (x *BpfMetadata) GetIpv6SourceAddress() string { - if x != nil { - return x.Ipv6SourceAddress - } - return "" -} - -func (x *BpfMetadata) GetEnforcePolicyOnL7Lb() bool { - if x != nil { - return x.EnforcePolicyOnL7Lb - } - return false -} - -func (x *BpfMetadata) GetProxyId() uint32 { - if x != nil { - return x.ProxyId - } - return 0 -} - -var File_cilium_api_bpf_metadata_proto protoreflect.FileDescriptor - -var file_cilium_api_bpf_metadata_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x70, 0x66, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x06, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x22, 0xcf, 0x02, 0x0a, 0x0b, 0x42, 0x70, 0x66, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x70, 0x66, 0x5f, 0x72, - 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x70, 0x66, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x3d, 0x0a, 0x1b, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, - 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x75, 0x73, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6c, 0x37, 0x6c, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x69, 0x73, 0x4c, 0x37, 0x6c, 0x62, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x70, 0x76, - 0x34, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x69, 0x70, 0x76, 0x34, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x70, 0x76, - 0x36, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x69, 0x70, 0x76, 0x36, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x65, 0x6e, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6f, 0x6e, 0x5f, 0x6c, - 0x37, 0x6c, 0x62, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4f, 0x6e, 0x4c, 0x37, 0x6c, 0x62, 0x12, 0x19, - 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x07, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x3b, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_cilium_api_bpf_metadata_proto_rawDescOnce sync.Once - file_cilium_api_bpf_metadata_proto_rawDescData = file_cilium_api_bpf_metadata_proto_rawDesc -) - -func file_cilium_api_bpf_metadata_proto_rawDescGZIP() []byte { - file_cilium_api_bpf_metadata_proto_rawDescOnce.Do(func() { - file_cilium_api_bpf_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_cilium_api_bpf_metadata_proto_rawDescData) - }) - return file_cilium_api_bpf_metadata_proto_rawDescData -} - -var file_cilium_api_bpf_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cilium_api_bpf_metadata_proto_goTypes = []interface{}{ - (*BpfMetadata)(nil), // 0: cilium.BpfMetadata -} -var file_cilium_api_bpf_metadata_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cilium_api_bpf_metadata_proto_init() } -func file_cilium_api_bpf_metadata_proto_init() { - if File_cilium_api_bpf_metadata_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cilium_api_bpf_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BpfMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cilium_api_bpf_metadata_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cilium_api_bpf_metadata_proto_goTypes, - DependencyIndexes: file_cilium_api_bpf_metadata_proto_depIdxs, - MessageInfos: file_cilium_api_bpf_metadata_proto_msgTypes, - }.Build() - File_cilium_api_bpf_metadata_proto = out.File - file_cilium_api_bpf_metadata_proto_rawDesc = nil - file_cilium_api_bpf_metadata_proto_goTypes = nil - file_cilium_api_bpf_metadata_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/bpf_metadata.pb.validate.go b/vendor/github.com/cilium/proxy/go/cilium/api/bpf_metadata.pb.validate.go deleted file mode 100644 index 2c3fff7c35c..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/bpf_metadata.pb.validate.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: cilium/api/bpf_metadata.proto - -package cilium - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on BpfMetadata with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *BpfMetadata) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on BpfMetadata with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in BpfMetadataMultiError, or -// nil if none found. -func (m *BpfMetadata) ValidateAll() error { - return m.validate(true) -} - -func (m *BpfMetadata) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for BpfRoot - - // no validation rules for IsIngress - - // no validation rules for UseOriginalSourceAddress - - // no validation rules for IsL7Lb - - // no validation rules for Ipv4SourceAddress - - // no validation rules for Ipv6SourceAddress - - // no validation rules for EnforcePolicyOnL7Lb - - // no validation rules for ProxyId - - if len(errors) > 0 { - return BpfMetadataMultiError(errors) - } - - return nil -} - -// BpfMetadataMultiError is an error wrapping multiple validation errors -// returned by BpfMetadata.ValidateAll() if the designated constraints aren't met. -type BpfMetadataMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m BpfMetadataMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m BpfMetadataMultiError) AllErrors() []error { return m } - -// BpfMetadataValidationError is the validation error returned by -// BpfMetadata.Validate if the designated constraints aren't met. -type BpfMetadataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BpfMetadataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BpfMetadataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BpfMetadataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BpfMetadataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BpfMetadataValidationError) ErrorName() string { return "BpfMetadataValidationError" } - -// Error satisfies the builtin error interface -func (e BpfMetadataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBpfMetadata.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BpfMetadataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BpfMetadataValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/health_check_sink.pb.go b/vendor/github.com/cilium/proxy/go/cilium/api/health_check_sink.pb.go deleted file mode 100644 index f96b0168dbc..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/health_check_sink.pb.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: cilium/api/health_check_sink.proto - -package cilium - -import ( - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Health check event pipe sink. -// The health check event will be streamed as binary protobufs. -type HealthCheckEventPipeSink struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Unix domain socket path where to connect to send health check events to. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *HealthCheckEventPipeSink) Reset() { - *x = HealthCheckEventPipeSink{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_health_check_sink_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckEventPipeSink) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckEventPipeSink) ProtoMessage() {} - -func (x *HealthCheckEventPipeSink) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_health_check_sink_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckEventPipeSink.ProtoReflect.Descriptor instead. -func (*HealthCheckEventPipeSink) Descriptor() ([]byte, []int) { - return file_cilium_api_health_check_sink_proto_rawDescGZIP(), []int{0} -} - -func (x *HealthCheckEventPipeSink) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -var File_cilium_api_health_check_sink_proto protoreflect.FileDescriptor - -var file_cilium_api_health_check_sink_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x37, 0x0a, 0x18, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x70, 0x65, 0x53, 0x69, 0x6e, - 0x6b, 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x2e, - 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x69, 0x6c, - 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x69, 0x6c, - 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cilium_api_health_check_sink_proto_rawDescOnce sync.Once - file_cilium_api_health_check_sink_proto_rawDescData = file_cilium_api_health_check_sink_proto_rawDesc -) - -func file_cilium_api_health_check_sink_proto_rawDescGZIP() []byte { - file_cilium_api_health_check_sink_proto_rawDescOnce.Do(func() { - file_cilium_api_health_check_sink_proto_rawDescData = protoimpl.X.CompressGZIP(file_cilium_api_health_check_sink_proto_rawDescData) - }) - return file_cilium_api_health_check_sink_proto_rawDescData -} - -var file_cilium_api_health_check_sink_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cilium_api_health_check_sink_proto_goTypes = []interface{}{ - (*HealthCheckEventPipeSink)(nil), // 0: cilium.HealthCheckEventPipeSink -} -var file_cilium_api_health_check_sink_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cilium_api_health_check_sink_proto_init() } -func file_cilium_api_health_check_sink_proto_init() { - if File_cilium_api_health_check_sink_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cilium_api_health_check_sink_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckEventPipeSink); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cilium_api_health_check_sink_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cilium_api_health_check_sink_proto_goTypes, - DependencyIndexes: file_cilium_api_health_check_sink_proto_depIdxs, - MessageInfos: file_cilium_api_health_check_sink_proto_msgTypes, - }.Build() - File_cilium_api_health_check_sink_proto = out.File - file_cilium_api_health_check_sink_proto_rawDesc = nil - file_cilium_api_health_check_sink_proto_goTypes = nil - file_cilium_api_health_check_sink_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/health_check_sink.pb.validate.go b/vendor/github.com/cilium/proxy/go/cilium/api/health_check_sink.pb.validate.go deleted file mode 100644 index 5931df1ba50..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/health_check_sink.pb.validate.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: cilium/api/health_check_sink.proto - -package cilium - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on HealthCheckEventPipeSink with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HealthCheckEventPipeSink) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthCheckEventPipeSink with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HealthCheckEventPipeSinkMultiError, or nil if none found. -func (m *HealthCheckEventPipeSink) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheckEventPipeSink) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetPath()) < 1 { - err := HealthCheckEventPipeSinkValidationError{ - field: "Path", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HealthCheckEventPipeSinkMultiError(errors) - } - - return nil -} - -// HealthCheckEventPipeSinkMultiError is an error wrapping multiple validation -// errors returned by HealthCheckEventPipeSink.ValidateAll() if the designated -// constraints aren't met. -type HealthCheckEventPipeSinkMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheckEventPipeSinkMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheckEventPipeSinkMultiError) AllErrors() []error { return m } - -// HealthCheckEventPipeSinkValidationError is the validation error returned by -// HealthCheckEventPipeSink.Validate if the designated constraints aren't met. -type HealthCheckEventPipeSinkValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheckEventPipeSinkValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheckEventPipeSinkValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheckEventPipeSinkValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheckEventPipeSinkValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheckEventPipeSinkValidationError) ErrorName() string { - return "HealthCheckEventPipeSinkValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheckEventPipeSinkValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheckEventPipeSink.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheckEventPipeSinkValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheckEventPipeSinkValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/l7policy.pb.go b/vendor/github.com/cilium/proxy/go/cilium/api/l7policy.pb.go deleted file mode 100644 index eccf771091c..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/l7policy.pb.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: cilium/api/l7policy.proto - -package cilium - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type L7Policy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path to the unix domain socket for the cilium access log. - AccessLogPath string `protobuf:"bytes,1,opt,name=access_log_path,json=accessLogPath,proto3" json:"access_log_path,omitempty"` - // HTTP response body message for 403 status code. - // If empty, "Access denied" will be used. - Denied_403Body string `protobuf:"bytes,3,opt,name=denied_403_body,json=denied403Body,proto3" json:"denied_403_body,omitempty"` -} - -func (x *L7Policy) Reset() { - *x = L7Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_l7policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L7Policy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L7Policy) ProtoMessage() {} - -func (x *L7Policy) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_l7policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L7Policy.ProtoReflect.Descriptor instead. -func (*L7Policy) Descriptor() ([]byte, []int) { - return file_cilium_api_l7policy_proto_rawDescGZIP(), []int{0} -} - -func (x *L7Policy) GetAccessLogPath() string { - if x != nil { - return x.AccessLogPath - } - return "" -} - -func (x *L7Policy) GetDenied_403Body() string { - if x != nil { - return x.Denied_403Body - } - return "" -} - -var File_cilium_api_l7policy_proto protoreflect.FileDescriptor - -var file_cilium_api_l7policy_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x37, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x69, 0x6c, - 0x69, 0x75, 0x6d, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x08, 0x4c, 0x37, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x65, 0x6e, 0x69, 0x65, - 0x64, 0x5f, 0x34, 0x30, 0x33, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x34, 0x30, 0x33, 0x42, 0x6f, 0x64, 0x79, 0x42, - 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x69, - 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x69, - 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cilium_api_l7policy_proto_rawDescOnce sync.Once - file_cilium_api_l7policy_proto_rawDescData = file_cilium_api_l7policy_proto_rawDesc -) - -func file_cilium_api_l7policy_proto_rawDescGZIP() []byte { - file_cilium_api_l7policy_proto_rawDescOnce.Do(func() { - file_cilium_api_l7policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_cilium_api_l7policy_proto_rawDescData) - }) - return file_cilium_api_l7policy_proto_rawDescData -} - -var file_cilium_api_l7policy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cilium_api_l7policy_proto_goTypes = []interface{}{ - (*L7Policy)(nil), // 0: cilium.L7Policy -} -var file_cilium_api_l7policy_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cilium_api_l7policy_proto_init() } -func file_cilium_api_l7policy_proto_init() { - if File_cilium_api_l7policy_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cilium_api_l7policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L7Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cilium_api_l7policy_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cilium_api_l7policy_proto_goTypes, - DependencyIndexes: file_cilium_api_l7policy_proto_depIdxs, - MessageInfos: file_cilium_api_l7policy_proto_msgTypes, - }.Build() - File_cilium_api_l7policy_proto = out.File - file_cilium_api_l7policy_proto_rawDesc = nil - file_cilium_api_l7policy_proto_goTypes = nil - file_cilium_api_l7policy_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/l7policy.pb.validate.go b/vendor/github.com/cilium/proxy/go/cilium/api/l7policy.pb.validate.go deleted file mode 100644 index a9b1cc932c1..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/l7policy.pb.validate.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: cilium/api/l7policy.proto - -package cilium - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on L7Policy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *L7Policy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on L7Policy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in L7PolicyMultiError, or nil -// if none found. -func (m *L7Policy) ValidateAll() error { - return m.validate(true) -} - -func (m *L7Policy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for AccessLogPath - - // no validation rules for Denied_403Body - - if len(errors) > 0 { - return L7PolicyMultiError(errors) - } - - return nil -} - -// L7PolicyMultiError is an error wrapping multiple validation errors returned -// by L7Policy.ValidateAll() if the designated constraints aren't met. -type L7PolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m L7PolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m L7PolicyMultiError) AllErrors() []error { return m } - -// L7PolicyValidationError is the validation error returned by -// L7Policy.Validate if the designated constraints aren't met. -type L7PolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e L7PolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e L7PolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e L7PolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e L7PolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e L7PolicyValidationError) ErrorName() string { return "L7PolicyValidationError" } - -// Error satisfies the builtin error interface -func (e L7PolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sL7Policy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = L7PolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = L7PolicyValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/network_filter.pb.go b/vendor/github.com/cilium/proxy/go/cilium/api/network_filter.pb.go deleted file mode 100644 index 4868b7f6320..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/network_filter.pb.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: cilium/api/network_filter.proto - -package cilium - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type NetworkFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path to the proxylib to be opened - Proxylib string `protobuf:"bytes,1,opt,name=proxylib,proto3" json:"proxylib,omitempty"` - // Transparent set of parameters provided for proxylib initialization - ProxylibParams map[string]string `protobuf:"bytes,2,rep,name=proxylib_params,json=proxylibParams,proto3" json:"proxylib_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Path to the unix domain socket for the cilium access log. - AccessLogPath string `protobuf:"bytes,5,opt,name=access_log_path,json=accessLogPath,proto3" json:"access_log_path,omitempty"` -} - -func (x *NetworkFilter) Reset() { - *x = NetworkFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_network_filter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NetworkFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NetworkFilter) ProtoMessage() {} - -func (x *NetworkFilter) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_network_filter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NetworkFilter.ProtoReflect.Descriptor instead. -func (*NetworkFilter) Descriptor() ([]byte, []int) { - return file_cilium_api_network_filter_proto_rawDescGZIP(), []int{0} -} - -func (x *NetworkFilter) GetProxylib() string { - if x != nil { - return x.Proxylib - } - return "" -} - -func (x *NetworkFilter) GetProxylibParams() map[string]string { - if x != nil { - return x.ProxylibParams - } - return nil -} - -func (x *NetworkFilter) GetAccessLogPath() string { - if x != nil { - return x.AccessLogPath - } - return "" -} - -var File_cilium_api_network_filter_proto protoreflect.FileDescriptor - -var file_cilium_api_network_filter_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x06, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x22, 0xea, 0x01, 0x0a, 0x0d, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x6c, 0x69, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x6c, 0x69, 0x62, 0x12, 0x52, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x6c, 0x69, 0x62, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x29, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x6c, 0x69, 0x62, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x6c, 0x69, 0x62, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x50, - 0x61, 0x74, 0x68, 0x1a, 0x41, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x6c, 0x69, 0x62, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x3b, - 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cilium_api_network_filter_proto_rawDescOnce sync.Once - file_cilium_api_network_filter_proto_rawDescData = file_cilium_api_network_filter_proto_rawDesc -) - -func file_cilium_api_network_filter_proto_rawDescGZIP() []byte { - file_cilium_api_network_filter_proto_rawDescOnce.Do(func() { - file_cilium_api_network_filter_proto_rawDescData = protoimpl.X.CompressGZIP(file_cilium_api_network_filter_proto_rawDescData) - }) - return file_cilium_api_network_filter_proto_rawDescData -} - -var file_cilium_api_network_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cilium_api_network_filter_proto_goTypes = []interface{}{ - (*NetworkFilter)(nil), // 0: cilium.NetworkFilter - nil, // 1: cilium.NetworkFilter.ProxylibParamsEntry -} -var file_cilium_api_network_filter_proto_depIdxs = []int32{ - 1, // 0: cilium.NetworkFilter.proxylib_params:type_name -> cilium.NetworkFilter.ProxylibParamsEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_cilium_api_network_filter_proto_init() } -func file_cilium_api_network_filter_proto_init() { - if File_cilium_api_network_filter_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cilium_api_network_filter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetworkFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cilium_api_network_filter_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cilium_api_network_filter_proto_goTypes, - DependencyIndexes: file_cilium_api_network_filter_proto_depIdxs, - MessageInfos: file_cilium_api_network_filter_proto_msgTypes, - }.Build() - File_cilium_api_network_filter_proto = out.File - file_cilium_api_network_filter_proto_rawDesc = nil - file_cilium_api_network_filter_proto_goTypes = nil - file_cilium_api_network_filter_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/network_filter.pb.validate.go b/vendor/github.com/cilium/proxy/go/cilium/api/network_filter.pb.validate.go deleted file mode 100644 index fec4b8b7199..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/network_filter.pb.validate.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: cilium/api/network_filter.proto - -package cilium - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on NetworkFilter with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *NetworkFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on NetworkFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in NetworkFilterMultiError, or -// nil if none found. -func (m *NetworkFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *NetworkFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Proxylib - - // no validation rules for ProxylibParams - - // no validation rules for AccessLogPath - - if len(errors) > 0 { - return NetworkFilterMultiError(errors) - } - - return nil -} - -// NetworkFilterMultiError is an error wrapping multiple validation errors -// returned by NetworkFilter.ValidateAll() if the designated constraints -// aren't met. -type NetworkFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NetworkFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m NetworkFilterMultiError) AllErrors() []error { return m } - -// NetworkFilterValidationError is the validation error returned by -// NetworkFilter.Validate if the designated constraints aren't met. -type NetworkFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NetworkFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NetworkFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NetworkFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NetworkFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NetworkFilterValidationError) ErrorName() string { return "NetworkFilterValidationError" } - -// Error satisfies the builtin error interface -func (e NetworkFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNetworkFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NetworkFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NetworkFilterValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/npds.pb.go b/vendor/github.com/cilium/proxy/go/cilium/api/npds.pb.go deleted file mode 100644 index fc72a8019b0..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/npds.pb.go +++ /dev/null @@ -1,1772 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: cilium/api/npds.proto - -package cilium - -import ( - context "context" - _ "github.com/cilium/proxy/go/envoy/annotations" - v3 "github.com/cilium/proxy/go/envoy/config/core/v3" - v31 "github.com/cilium/proxy/go/envoy/config/route/v3" - v33 "github.com/cilium/proxy/go/envoy/service/discovery/v3" - v32 "github.com/cilium/proxy/go/envoy/type/matcher/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Action specifies what to do when the header matches. -type HeaderMatch_MatchAction int32 - -const ( - HeaderMatch_CONTINUE_ON_MATCH HeaderMatch_MatchAction = 0 // Keep checking other matches (default) - HeaderMatch_FAIL_ON_MATCH HeaderMatch_MatchAction = 1 // Drop the request if no other rule matches - HeaderMatch_DELETE_ON_MATCH HeaderMatch_MatchAction = 2 // Remove the whole matching header -) - -// Enum value maps for HeaderMatch_MatchAction. -var ( - HeaderMatch_MatchAction_name = map[int32]string{ - 0: "CONTINUE_ON_MATCH", - 1: "FAIL_ON_MATCH", - 2: "DELETE_ON_MATCH", - } - HeaderMatch_MatchAction_value = map[string]int32{ - "CONTINUE_ON_MATCH": 0, - "FAIL_ON_MATCH": 1, - "DELETE_ON_MATCH": 2, - } -) - -func (x HeaderMatch_MatchAction) Enum() *HeaderMatch_MatchAction { - p := new(HeaderMatch_MatchAction) - *p = x - return p -} - -func (x HeaderMatch_MatchAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HeaderMatch_MatchAction) Descriptor() protoreflect.EnumDescriptor { - return file_cilium_api_npds_proto_enumTypes[0].Descriptor() -} - -func (HeaderMatch_MatchAction) Type() protoreflect.EnumType { - return &file_cilium_api_npds_proto_enumTypes[0] -} - -func (x HeaderMatch_MatchAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HeaderMatch_MatchAction.Descriptor instead. -func (HeaderMatch_MatchAction) EnumDescriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{5, 0} -} - -type HeaderMatch_MismatchAction int32 - -const ( - HeaderMatch_FAIL_ON_MISMATCH HeaderMatch_MismatchAction = 0 // Drop the request if no other rule matches (default) - HeaderMatch_CONTINUE_ON_MISMATCH HeaderMatch_MismatchAction = 1 // Keep checking other matches, log the mismatch - HeaderMatch_ADD_ON_MISMATCH HeaderMatch_MismatchAction = 2 // Add 'value' to the multivalued header - HeaderMatch_DELETE_ON_MISMATCH HeaderMatch_MismatchAction = 3 // Remove the whole mismatching header - HeaderMatch_REPLACE_ON_MISMATCH HeaderMatch_MismatchAction = 4 // Replace the whole mismatching header with 'value' -) - -// Enum value maps for HeaderMatch_MismatchAction. -var ( - HeaderMatch_MismatchAction_name = map[int32]string{ - 0: "FAIL_ON_MISMATCH", - 1: "CONTINUE_ON_MISMATCH", - 2: "ADD_ON_MISMATCH", - 3: "DELETE_ON_MISMATCH", - 4: "REPLACE_ON_MISMATCH", - } - HeaderMatch_MismatchAction_value = map[string]int32{ - "FAIL_ON_MISMATCH": 0, - "CONTINUE_ON_MISMATCH": 1, - "ADD_ON_MISMATCH": 2, - "DELETE_ON_MISMATCH": 3, - "REPLACE_ON_MISMATCH": 4, - } -) - -func (x HeaderMatch_MismatchAction) Enum() *HeaderMatch_MismatchAction { - p := new(HeaderMatch_MismatchAction) - *p = x - return p -} - -func (x HeaderMatch_MismatchAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HeaderMatch_MismatchAction) Descriptor() protoreflect.EnumDescriptor { - return file_cilium_api_npds_proto_enumTypes[1].Descriptor() -} - -func (HeaderMatch_MismatchAction) Type() protoreflect.EnumType { - return &file_cilium_api_npds_proto_enumTypes[1] -} - -func (x HeaderMatch_MismatchAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HeaderMatch_MismatchAction.Descriptor instead. -func (HeaderMatch_MismatchAction) EnumDescriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{5, 1} -} - -// A network policy that is enforced by a filter on the network flows to/from -// associated hosts. -type NetworkPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // IPs of the endpoint to which this policy applies. - // Required. - EndpointIps []string `protobuf:"bytes,1,rep,name=endpoint_ips,json=endpointIps,proto3" json:"endpoint_ips,omitempty"` - // The endpoint identifier associated with the network policy. - // Required. - EndpointId uint64 `protobuf:"varint,2,opt,name=endpoint_id,json=endpointId,proto3" json:"endpoint_id,omitempty"` - // The part of the policy to be enforced at ingress by the filter, as a set - // of per-port network policies, one per destination L4 port. - // Every PortNetworkPolicy element in this set has a unique port / protocol - // combination. - // Optional. If empty, all flows in this direction are denied. - IngressPerPortPolicies []*PortNetworkPolicy `protobuf:"bytes,3,rep,name=ingress_per_port_policies,json=ingressPerPortPolicies,proto3" json:"ingress_per_port_policies,omitempty"` - // The part of the policy to be enforced at egress by the filter, as a set - // of per-port network policies, one per destination L4 port. - // Every PortNetworkPolicy element in this set has a unique port / protocol - // combination. - // Optional. If empty, all flows in this direction are denied. - EgressPerPortPolicies []*PortNetworkPolicy `protobuf:"bytes,4,rep,name=egress_per_port_policies,json=egressPerPortPolicies,proto3" json:"egress_per_port_policies,omitempty"` - // Name of the conntrack map to use with this policy. - // The paths to various Cilium conntrack maps are derived using this name. - // Optional. If empty, ipcache or hostmap lookup is used instead of conntrack - // map. - ConntrackMapName string `protobuf:"bytes,5,opt,name=conntrack_map_name,json=conntrackMapName,proto3" json:"conntrack_map_name,omitempty"` -} - -func (x *NetworkPolicy) Reset() { - *x = NetworkPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NetworkPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NetworkPolicy) ProtoMessage() {} - -func (x *NetworkPolicy) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NetworkPolicy.ProtoReflect.Descriptor instead. -func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{0} -} - -func (x *NetworkPolicy) GetEndpointIps() []string { - if x != nil { - return x.EndpointIps - } - return nil -} - -func (x *NetworkPolicy) GetEndpointId() uint64 { - if x != nil { - return x.EndpointId - } - return 0 -} - -func (x *NetworkPolicy) GetIngressPerPortPolicies() []*PortNetworkPolicy { - if x != nil { - return x.IngressPerPortPolicies - } - return nil -} - -func (x *NetworkPolicy) GetEgressPerPortPolicies() []*PortNetworkPolicy { - if x != nil { - return x.EgressPerPortPolicies - } - return nil -} - -func (x *NetworkPolicy) GetConntrackMapName() string { - if x != nil { - return x.ConntrackMapName - } - return "" -} - -// A network policy to whitelist flows to a specific destination L4 port, -// as a conjunction of predicates on L3/L4/L7 flows. -// If all the predicates of a policy match a flow, the flow is whitelisted. -type PortNetworkPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The flows' destination L4 port number, as an unsigned 16-bit integer. - // If 0, all destination L4 port numbers are matched by this predicate. - Port uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"` - // The end of the destination port range, if non-zero. - EndPort uint32 `protobuf:"varint,4,opt,name=end_port,json=endPort,proto3" json:"end_port,omitempty"` - // The flows' L4 transport protocol. - // Required. - Protocol v3.SocketAddress_Protocol `protobuf:"varint,2,opt,name=protocol,proto3,enum=envoy.config.core.v3.SocketAddress_Protocol" json:"protocol,omitempty"` - // The network policy rules to be enforced on the flows to the port. - // Optional. A flow is matched by this predicate if either the set of - // rules is empty or any of the rules matches it. - Rules []*PortNetworkPolicyRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *PortNetworkPolicy) Reset() { - *x = PortNetworkPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PortNetworkPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PortNetworkPolicy) ProtoMessage() {} - -func (x *PortNetworkPolicy) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PortNetworkPolicy.ProtoReflect.Descriptor instead. -func (*PortNetworkPolicy) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{1} -} - -func (x *PortNetworkPolicy) GetPort() uint32 { - if x != nil { - return x.Port - } - return 0 -} - -func (x *PortNetworkPolicy) GetEndPort() uint32 { - if x != nil { - return x.EndPort - } - return 0 -} - -func (x *PortNetworkPolicy) GetProtocol() v3.SocketAddress_Protocol { - if x != nil { - return x.Protocol - } - return v3.SocketAddress_TCP -} - -func (x *PortNetworkPolicy) GetRules() []*PortNetworkPolicyRule { - if x != nil { - return x.Rules - } - return nil -} - -type TLSContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // CA certificates. If present, the counterparty must provide a valid - // certificate. - // Deprecated, use 'validation_context_sds_secret' instead. - TrustedCa string `protobuf:"bytes,1,opt,name=trusted_ca,json=trustedCa,proto3" json:"trusted_ca,omitempty"` - // Certificate chain. - // Deprecated, use 'tls_sds_secret' instead. - CertificateChain string `protobuf:"bytes,2,opt,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"` - // Private key - // Deprecated, use 'tls_sds_secret' instead. - PrivateKey string `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` - // Server Name Indicator. For downstream this helps choose the certificate to - // present to the client. For upstream this will be used as the SNI on the - // client connection. - ServerNames []string `protobuf:"bytes,4,rep,name=server_names,json=serverNames,proto3" json:"server_names,omitempty"` - // Name of an SDS secret for CA certificates. Secret is fetched from the same gRPC source as - // this Network Policy. If present, the counterparty must provide a valid certificate. - // May not be used at the same time with 'trusted_ca'. - ValidationContextSdsSecret string `protobuf:"bytes,5,opt,name=validation_context_sds_secret,json=validationContextSdsSecret,proto3" json:"validation_context_sds_secret,omitempty"` - // Name of an SDS secret for both TLS private key and certificate chain. Secret is fetched - // from the same gRPC source as this Network Policy. - // May not be used at the same time with 'certificate_chain' or 'private_key'. - TlsSdsSecret string `protobuf:"bytes,6,opt,name=tls_sds_secret,json=tlsSdsSecret,proto3" json:"tls_sds_secret,omitempty"` -} - -func (x *TLSContext) Reset() { - *x = TLSContext{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TLSContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TLSContext) ProtoMessage() {} - -func (x *TLSContext) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TLSContext.ProtoReflect.Descriptor instead. -func (*TLSContext) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{2} -} - -func (x *TLSContext) GetTrustedCa() string { - if x != nil { - return x.TrustedCa - } - return "" -} - -func (x *TLSContext) GetCertificateChain() string { - if x != nil { - return x.CertificateChain - } - return "" -} - -func (x *TLSContext) GetPrivateKey() string { - if x != nil { - return x.PrivateKey - } - return "" -} - -func (x *TLSContext) GetServerNames() []string { - if x != nil { - return x.ServerNames - } - return nil -} - -func (x *TLSContext) GetValidationContextSdsSecret() string { - if x != nil { - return x.ValidationContextSdsSecret - } - return "" -} - -func (x *TLSContext) GetTlsSdsSecret() string { - if x != nil { - return x.TlsSdsSecret - } - return "" -} - -// A network policy rule, as a conjunction of predicates on L3/L7 flows. -// If all the predicates of a rule match a flow, the flow is matched by the -// rule. -type PortNetworkPolicyRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Traffic on this port is denied for all `remote_policies` if true - Deny bool `protobuf:"varint,8,opt,name=deny,proto3" json:"deny,omitempty"` - // Optional name for the rule, can be used in logging and error messages. - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - // The set of numeric remote security IDs explicitly allowed or denied. - // A flow is matched by this predicate if the identifier of the policy - // applied on the flow's remote host is contained in this set. - // Optional. If not specified, any remote host is matched by this predicate. - // This field is deprecated, use remote_policies instead. - // TODO: Remove when Cilium 1.14 no longer supported. - DeprecatedRemotePolicies_64 []uint64 `protobuf:"varint,1,rep,packed,name=deprecated_remote_policies_64,json=deprecatedRemotePolicies64,proto3" json:"deprecated_remote_policies_64,omitempty"` - RemotePolicies []uint32 `protobuf:"varint,7,rep,packed,name=remote_policies,json=remotePolicies,proto3" json:"remote_policies,omitempty"` - // Optional downstream TLS context. If present, the incoming connection must - // be a TLS connection. - DownstreamTlsContext *TLSContext `protobuf:"bytes,3,opt,name=downstream_tls_context,json=downstreamTlsContext,proto3" json:"downstream_tls_context,omitempty"` - // Optional upstream TLS context. If present, the outgoing connection will use - // TLS. - UpstreamTlsContext *TLSContext `protobuf:"bytes,4,opt,name=upstream_tls_context,json=upstreamTlsContext,proto3" json:"upstream_tls_context,omitempty"` - // Optional allowed SNIs in TLS handshake. - ServerNames []string `protobuf:"bytes,6,rep,name=server_names,json=serverNames,proto3" json:"server_names,omitempty"` - // Optional L7 protocol parser name. This is only used if the parser is not - // one of the well knows ones. If specified, the l7 parser having this name - // needs to be built in to libcilium.so. - L7Proto string `protobuf:"bytes,2,opt,name=l7_proto,json=l7Proto,proto3" json:"l7_proto,omitempty"` - // Optional. If not specified, any L7 request is matched by this predicate. - // All rules on any given port must have the same type of L7 rules! - // - // Types that are assignable to L7: - // - // *PortNetworkPolicyRule_HttpRules - // *PortNetworkPolicyRule_KafkaRules - // *PortNetworkPolicyRule_L7Rules - L7 isPortNetworkPolicyRule_L7 `protobuf_oneof:"l7"` -} - -func (x *PortNetworkPolicyRule) Reset() { - *x = PortNetworkPolicyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PortNetworkPolicyRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PortNetworkPolicyRule) ProtoMessage() {} - -func (x *PortNetworkPolicyRule) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PortNetworkPolicyRule.ProtoReflect.Descriptor instead. -func (*PortNetworkPolicyRule) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{3} -} - -func (x *PortNetworkPolicyRule) GetDeny() bool { - if x != nil { - return x.Deny - } - return false -} - -func (x *PortNetworkPolicyRule) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PortNetworkPolicyRule) GetDeprecatedRemotePolicies_64() []uint64 { - if x != nil { - return x.DeprecatedRemotePolicies_64 - } - return nil -} - -func (x *PortNetworkPolicyRule) GetRemotePolicies() []uint32 { - if x != nil { - return x.RemotePolicies - } - return nil -} - -func (x *PortNetworkPolicyRule) GetDownstreamTlsContext() *TLSContext { - if x != nil { - return x.DownstreamTlsContext - } - return nil -} - -func (x *PortNetworkPolicyRule) GetUpstreamTlsContext() *TLSContext { - if x != nil { - return x.UpstreamTlsContext - } - return nil -} - -func (x *PortNetworkPolicyRule) GetServerNames() []string { - if x != nil { - return x.ServerNames - } - return nil -} - -func (x *PortNetworkPolicyRule) GetL7Proto() string { - if x != nil { - return x.L7Proto - } - return "" -} - -func (m *PortNetworkPolicyRule) GetL7() isPortNetworkPolicyRule_L7 { - if m != nil { - return m.L7 - } - return nil -} - -func (x *PortNetworkPolicyRule) GetHttpRules() *HttpNetworkPolicyRules { - if x, ok := x.GetL7().(*PortNetworkPolicyRule_HttpRules); ok { - return x.HttpRules - } - return nil -} - -func (x *PortNetworkPolicyRule) GetKafkaRules() *KafkaNetworkPolicyRules { - if x, ok := x.GetL7().(*PortNetworkPolicyRule_KafkaRules); ok { - return x.KafkaRules - } - return nil -} - -func (x *PortNetworkPolicyRule) GetL7Rules() *L7NetworkPolicyRules { - if x, ok := x.GetL7().(*PortNetworkPolicyRule_L7Rules); ok { - return x.L7Rules - } - return nil -} - -type isPortNetworkPolicyRule_L7 interface { - isPortNetworkPolicyRule_L7() -} - -type PortNetworkPolicyRule_HttpRules struct { - // The set of HTTP network policy rules. - // An HTTP request is matched by this predicate if any of its rules matches - // the request. - HttpRules *HttpNetworkPolicyRules `protobuf:"bytes,100,opt,name=http_rules,json=httpRules,proto3,oneof"` -} - -type PortNetworkPolicyRule_KafkaRules struct { - // The set of Kafka network policy rules. - // A Kafka request is matched by this predicate if any of its rules matches - // the request. - KafkaRules *KafkaNetworkPolicyRules `protobuf:"bytes,101,opt,name=kafka_rules,json=kafkaRules,proto3,oneof"` -} - -type PortNetworkPolicyRule_L7Rules struct { - // Set of Generic policy rules used when 'l7_proto' is defined. - // Only to be used for l7 protocols for which a specific oneof - // is not defined - L7Rules *L7NetworkPolicyRules `protobuf:"bytes,102,opt,name=l7_rules,json=l7Rules,proto3,oneof"` -} - -func (*PortNetworkPolicyRule_HttpRules) isPortNetworkPolicyRule_L7() {} - -func (*PortNetworkPolicyRule_KafkaRules) isPortNetworkPolicyRule_L7() {} - -func (*PortNetworkPolicyRule_L7Rules) isPortNetworkPolicyRule_L7() {} - -// A set of network policy rules that match HTTP requests. -type HttpNetworkPolicyRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The set of HTTP network policy rules. - // An HTTP request is matched if any of its rules matches the request. - // Required and may not be empty. - HttpRules []*HttpNetworkPolicyRule `protobuf:"bytes,1,rep,name=http_rules,json=httpRules,proto3" json:"http_rules,omitempty"` -} - -func (x *HttpNetworkPolicyRules) Reset() { - *x = HttpNetworkPolicyRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpNetworkPolicyRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpNetworkPolicyRules) ProtoMessage() {} - -func (x *HttpNetworkPolicyRules) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpNetworkPolicyRules.ProtoReflect.Descriptor instead. -func (*HttpNetworkPolicyRules) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{4} -} - -func (x *HttpNetworkPolicyRules) GetHttpRules() []*HttpNetworkPolicyRule { - if x != nil { - return x.HttpRules - } - return nil -} - -type HeaderMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // empty for presence match. For secret data use 'value_sds_secret' instead. - MatchAction HeaderMatch_MatchAction `protobuf:"varint,3,opt,name=match_action,json=matchAction,proto3,enum=cilium.HeaderMatch_MatchAction" json:"match_action,omitempty"` - MismatchAction HeaderMatch_MismatchAction `protobuf:"varint,4,opt,name=mismatch_action,json=mismatchAction,proto3,enum=cilium.HeaderMatch_MismatchAction" json:"mismatch_action,omitempty"` - // Generic secret name for fetching value via SDS. Secret is fetched from the same gRPC source as - // this Network Policy. - ValueSdsSecret string `protobuf:"bytes,5,opt,name=value_sds_secret,json=valueSdsSecret,proto3" json:"value_sds_secret,omitempty"` -} - -func (x *HeaderMatch) Reset() { - *x = HeaderMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderMatch) ProtoMessage() {} - -func (x *HeaderMatch) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderMatch.ProtoReflect.Descriptor instead. -func (*HeaderMatch) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{5} -} - -func (x *HeaderMatch) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *HeaderMatch) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *HeaderMatch) GetMatchAction() HeaderMatch_MatchAction { - if x != nil { - return x.MatchAction - } - return HeaderMatch_CONTINUE_ON_MATCH -} - -func (x *HeaderMatch) GetMismatchAction() HeaderMatch_MismatchAction { - if x != nil { - return x.MismatchAction - } - return HeaderMatch_FAIL_ON_MISMATCH -} - -func (x *HeaderMatch) GetValueSdsSecret() string { - if x != nil { - return x.ValueSdsSecret - } - return "" -} - -// An HTTP network policy rule, as a conjunction of predicates on HTTP requests. -// If all the predicates of a rule match an HTTP request, the request is -// allowed. Otherwise, it is denied. -type HttpNetworkPolicyRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A set of matchers on the HTTP request's headers' names and values. - // If all the matchers in this set match an HTTP request, the request is - // allowed by this rule. Otherwise, it is denied. - // - // Some special header names are: - // - // * *:uri*: The HTTP request's URI. - // * *:method*: The HTTP request's method. - // * *:authority*: Also maps to the HTTP 1.1 *Host* header. - // - // Optional. If empty, matches any HTTP request. - Headers []*v31.HeaderMatcher `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` - // header_matches is a set of HTTP header name and value pairs that - // will be matched against the request headers, if all the other match - // requirements in 'headers' are met. Each HeaderAction determines what to do - // when there is a match or mismatch. - // - // Optional. - HeaderMatches []*HeaderMatch `protobuf:"bytes,2,rep,name=header_matches,json=headerMatches,proto3" json:"header_matches,omitempty"` -} - -func (x *HttpNetworkPolicyRule) Reset() { - *x = HttpNetworkPolicyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpNetworkPolicyRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpNetworkPolicyRule) ProtoMessage() {} - -func (x *HttpNetworkPolicyRule) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpNetworkPolicyRule.ProtoReflect.Descriptor instead. -func (*HttpNetworkPolicyRule) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{6} -} - -func (x *HttpNetworkPolicyRule) GetHeaders() []*v31.HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -func (x *HttpNetworkPolicyRule) GetHeaderMatches() []*HeaderMatch { - if x != nil { - return x.HeaderMatches - } - return nil -} - -// A set of network policy rules that match Kafka requests. -type KafkaNetworkPolicyRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The set of Kafka network policy rules. - // A Kafka request is matched if any of its rules matches the request. - // Required and may not be empty. - KafkaRules []*KafkaNetworkPolicyRule `protobuf:"bytes,1,rep,name=kafka_rules,json=kafkaRules,proto3" json:"kafka_rules,omitempty"` -} - -func (x *KafkaNetworkPolicyRules) Reset() { - *x = KafkaNetworkPolicyRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KafkaNetworkPolicyRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KafkaNetworkPolicyRules) ProtoMessage() {} - -func (x *KafkaNetworkPolicyRules) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KafkaNetworkPolicyRules.ProtoReflect.Descriptor instead. -func (*KafkaNetworkPolicyRules) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{7} -} - -func (x *KafkaNetworkPolicyRules) GetKafkaRules() []*KafkaNetworkPolicyRule { - if x != nil { - return x.KafkaRules - } - return nil -} - -// A Kafka network policy rule, as a conjunction of predicates on Kafka -// requests. If all the predicates of a rule match a Kafka request, the request -// is allowed. Otherwise, it is denied. -type KafkaNetworkPolicyRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The Kafka request's API version. - // If < 0, all Kafka requests are matched by this predicate. - ApiVersion int32 `protobuf:"varint,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` - // Set of allowed API keys in the Kafka request. - // If none, all Kafka requests are matched by this predicate. - ApiKeys []int32 `protobuf:"varint,2,rep,packed,name=api_keys,json=apiKeys,proto3" json:"api_keys,omitempty"` - // The Kafka request's client ID. - // Optional. If not specified, all Kafka requests are matched by this - // predicate. If specified, this predicates only matches requests that contain - // this client ID, and never matches requests that don't contain any client - // ID. - ClientId string `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - // The Kafka request's topic. - // Optional. If not specified, this rule will not consider the Kafka request's - // topics. If specified, this predicates only matches requests that contain - // this topic, and never matches requests that don't contain any topic. - // However, messages that can not contain a topic will also me matched. - Topic string `protobuf:"bytes,4,opt,name=topic,proto3" json:"topic,omitempty"` -} - -func (x *KafkaNetworkPolicyRule) Reset() { - *x = KafkaNetworkPolicyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KafkaNetworkPolicyRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KafkaNetworkPolicyRule) ProtoMessage() {} - -func (x *KafkaNetworkPolicyRule) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KafkaNetworkPolicyRule.ProtoReflect.Descriptor instead. -func (*KafkaNetworkPolicyRule) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{8} -} - -func (x *KafkaNetworkPolicyRule) GetApiVersion() int32 { - if x != nil { - return x.ApiVersion - } - return 0 -} - -func (x *KafkaNetworkPolicyRule) GetApiKeys() []int32 { - if x != nil { - return x.ApiKeys - } - return nil -} - -func (x *KafkaNetworkPolicyRule) GetClientId() string { - if x != nil { - return x.ClientId - } - return "" -} - -func (x *KafkaNetworkPolicyRule) GetTopic() string { - if x != nil { - return x.Topic - } - return "" -} - -// A set of network policy rules that match generic L7 requests. -type L7NetworkPolicyRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The set of allowing l7 policy rules. - // A request is allowed if any of these rules matches the request, - // and the request does not match any of the deny rules. - // Optional. If missing or empty then all requests are allowed, unless - // denied by a deny rule. - L7AllowRules []*L7NetworkPolicyRule `protobuf:"bytes,1,rep,name=l7_allow_rules,json=l7AllowRules,proto3" json:"l7_allow_rules,omitempty"` - // The set of denying l7 policy rules. - // A request is denied if any of these rules matches the request. - // A request that is not denied may be allowed by 'l7_allow_rules'. - // Optional. - L7DenyRules []*L7NetworkPolicyRule `protobuf:"bytes,2,rep,name=l7_deny_rules,json=l7DenyRules,proto3" json:"l7_deny_rules,omitempty"` -} - -func (x *L7NetworkPolicyRules) Reset() { - *x = L7NetworkPolicyRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L7NetworkPolicyRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L7NetworkPolicyRules) ProtoMessage() {} - -func (x *L7NetworkPolicyRules) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L7NetworkPolicyRules.ProtoReflect.Descriptor instead. -func (*L7NetworkPolicyRules) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{9} -} - -func (x *L7NetworkPolicyRules) GetL7AllowRules() []*L7NetworkPolicyRule { - if x != nil { - return x.L7AllowRules - } - return nil -} - -func (x *L7NetworkPolicyRules) GetL7DenyRules() []*L7NetworkPolicyRule { - if x != nil { - return x.L7DenyRules - } - return nil -} - -// A generic L7 policy rule, as a conjunction of predicates on l7 requests. -// If all the predicates of a rule match a request, the request is allowed. -// Otherwise, it is denied. -type L7NetworkPolicyRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional rule name, can be used in logging and error messages. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // Generic rule for Go extensions. - // Optional. If empty, matches any request. Not allowed if 'metadata_rule' is - // present. - Rule map[string]string `protobuf:"bytes,1,rep,name=rule,proto3" json:"rule,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Generic rule for Envoy metadata enforcement. All matchers must match for - // the rule to allow the request/connection. Optional. If empty, matches any - // request. Not allowed if 'rule' is present. - MetadataRule []*v32.MetadataMatcher `protobuf:"bytes,2,rep,name=metadata_rule,json=metadataRule,proto3" json:"metadata_rule,omitempty"` -} - -func (x *L7NetworkPolicyRule) Reset() { - *x = L7NetworkPolicyRule{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *L7NetworkPolicyRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*L7NetworkPolicyRule) ProtoMessage() {} - -func (x *L7NetworkPolicyRule) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use L7NetworkPolicyRule.ProtoReflect.Descriptor instead. -func (*L7NetworkPolicyRule) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{10} -} - -func (x *L7NetworkPolicyRule) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *L7NetworkPolicyRule) GetRule() map[string]string { - if x != nil { - return x.Rule - } - return nil -} - -func (x *L7NetworkPolicyRule) GetMetadataRule() []*v32.MetadataMatcher { - if x != nil { - return x.MetadataRule - } - return nil -} - -// Cilium's network policy manager fills this message with all currently known network policies. -type NetworkPoliciesConfigDump struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The loaded networkpolicy configs. - Networkpolicies []*NetworkPolicy `protobuf:"bytes,1,rep,name=networkpolicies,proto3" json:"networkpolicies,omitempty"` -} - -func (x *NetworkPoliciesConfigDump) Reset() { - *x = NetworkPoliciesConfigDump{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_npds_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NetworkPoliciesConfigDump) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NetworkPoliciesConfigDump) ProtoMessage() {} - -func (x *NetworkPoliciesConfigDump) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_npds_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NetworkPoliciesConfigDump.ProtoReflect.Descriptor instead. -func (*NetworkPoliciesConfigDump) Descriptor() ([]byte, []int) { - return file_cilium_api_npds_proto_rawDescGZIP(), []int{11} -} - -func (x *NetworkPoliciesConfigDump) GetNetworkpolicies() []*NetworkPolicy { - if x != nil { - return x.Networkpolicies - } - return nil -} - -var File_cilium_api_npds_proto protoreflect.FileDescriptor - -var file_cilium_api_npds_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x70, 0x64, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x1a, - 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x02, 0x0a, - 0x0d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, - 0x0a, 0x0c, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x08, 0x01, 0x10, 0x02, - 0x22, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x49, 0x70, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x19, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x70, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, - 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x16, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x50, 0x65, 0x72, 0x50, 0x6f, - 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x18, 0x65, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x15, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x50, - 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2c, - 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x6d, 0x61, 0x70, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x6b, 0x4d, 0x61, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xd7, 0x01, 0x0a, - 0x11, 0x50, 0x6f, 0x72, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x1d, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0xff, 0xff, 0x03, 0x52, 0x04, 0x70, 0x6f, 0x72, - 0x74, 0x12, 0x24, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0xff, 0xff, 0x03, 0x52, 0x07, - 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x48, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x12, 0x33, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, - 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x85, 0x02, 0x0a, 0x0a, 0x54, 0x4c, 0x53, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, - 0x5f, 0x63, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x75, 0x73, 0x74, - 0x65, 0x64, 0x43, 0x61, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x64, 0x73, 0x5f, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, - 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x6c, 0x73, 0x5f, - 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x74, 0x6c, 0x73, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0xbf, - 0x04, 0x0a, 0x15, 0x50, 0x6f, 0x72, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x6e, 0x79, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x65, 0x6e, 0x79, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x41, 0x0a, 0x1d, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x5f, 0x36, - 0x34, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x1a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0e, 0x72, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x16, - 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, - 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x54, 0x4c, 0x53, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x52, 0x14, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x14, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x54, 0x4c, - 0x53, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x6c, 0x37, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6c, 0x37, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x0a, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, - 0x52, 0x09, 0x68, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0b, 0x6b, - 0x61, 0x66, 0x6b, 0x61, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x39, 0x0a, 0x08, 0x6c, 0x37, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x66, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4c, 0x37, 0x4e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, - 0x00, 0x52, 0x07, 0x6c, 0x37, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x04, 0x0a, 0x02, 0x6c, 0x37, - 0x22, 0x60, 0x0a, 0x16, 0x48, 0x74, 0x74, 0x70, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x68, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, - 0x65, 0x73, 0x22, 0xd2, 0x03, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x69, - 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x0f, 0x6d, 0x69, 0x73, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x4d, 0x69, 0x73, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, 0x73, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, - 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x22, 0x4c, 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x4d, - 0x41, 0x54, 0x43, 0x48, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x41, 0x49, 0x4c, 0x5f, 0x4f, - 0x4e, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x45, 0x4c, - 0x45, 0x54, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x02, 0x22, 0x86, - 0x01, 0x0a, 0x0e, 0x4d, 0x69, 0x73, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x41, 0x49, 0x4c, 0x5f, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x53, - 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4e, 0x54, 0x49, - 0x4e, 0x55, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, - 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x44, 0x44, 0x5f, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x53, 0x4d, - 0x41, 0x54, 0x43, 0x48, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, - 0x5f, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x03, 0x12, 0x17, - 0x0a, 0x13, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x53, - 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x04, 0x22, 0x93, 0x01, 0x0a, 0x15, 0x48, 0x74, 0x74, 0x70, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, - 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x3a, 0x0a, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x69, 0x6c, 0x69, - 0x75, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x0d, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x22, 0x64, 0x0a, - 0x17, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0b, 0x6b, 0x61, 0x66, 0x6b, - 0x61, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x52, 0x75, - 0x6c, 0x65, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x16, 0x4b, 0x61, 0x66, 0x6b, 0x61, 0x4e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x19, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x07, 0x61, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, - 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, - 0x39, 0x2e, 0x5f, 0x2d, 0x5d, 0x2a, 0x24, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, - 0x64, 0x12, 0x31, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x1b, 0xfa, 0x42, 0x18, 0x72, 0x16, 0x18, 0xff, 0x01, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, - 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2e, 0x5f, 0x2d, 0x5d, 0x2a, 0x24, 0x52, 0x05, 0x74, - 0x6f, 0x70, 0x69, 0x63, 0x22, 0x9a, 0x01, 0x0a, 0x14, 0x4c, 0x37, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x41, 0x0a, - 0x0e, 0x6c, 0x37, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4c, - 0x37, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, - 0x6c, 0x65, 0x52, 0x0c, 0x6c, 0x37, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x3f, 0x0a, 0x0d, 0x6c, 0x37, 0x5f, 0x64, 0x65, 0x6e, 0x79, 0x5f, 0x72, 0x75, 0x6c, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, - 0x2e, 0x4c, 0x37, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0b, 0x6c, 0x37, 0x44, 0x65, 0x6e, 0x79, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x22, 0xea, 0x01, 0x0a, 0x13, 0x4c, 0x37, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, - 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x69, - 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4c, 0x37, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x75, 0x6c, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5c, - 0x0a, 0x19, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x3f, 0x0a, 0x0f, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0f, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x32, 0xda, 0x02, 0x0a, - 0x1d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7a, - 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x9e, 0x01, 0x0a, 0x14, 0x46, - 0x65, 0x74, 0x63, 0x68, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x69, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x1a, 0x1c, 0x8a, 0xa4, 0x96, - 0xf3, 0x07, 0x16, 0x0a, 0x14, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x3b, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_cilium_api_npds_proto_rawDescOnce sync.Once - file_cilium_api_npds_proto_rawDescData = file_cilium_api_npds_proto_rawDesc -) - -func file_cilium_api_npds_proto_rawDescGZIP() []byte { - file_cilium_api_npds_proto_rawDescOnce.Do(func() { - file_cilium_api_npds_proto_rawDescData = protoimpl.X.CompressGZIP(file_cilium_api_npds_proto_rawDescData) - }) - return file_cilium_api_npds_proto_rawDescData -} - -var file_cilium_api_npds_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_cilium_api_npds_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_cilium_api_npds_proto_goTypes = []interface{}{ - (HeaderMatch_MatchAction)(0), // 0: cilium.HeaderMatch.MatchAction - (HeaderMatch_MismatchAction)(0), // 1: cilium.HeaderMatch.MismatchAction - (*NetworkPolicy)(nil), // 2: cilium.NetworkPolicy - (*PortNetworkPolicy)(nil), // 3: cilium.PortNetworkPolicy - (*TLSContext)(nil), // 4: cilium.TLSContext - (*PortNetworkPolicyRule)(nil), // 5: cilium.PortNetworkPolicyRule - (*HttpNetworkPolicyRules)(nil), // 6: cilium.HttpNetworkPolicyRules - (*HeaderMatch)(nil), // 7: cilium.HeaderMatch - (*HttpNetworkPolicyRule)(nil), // 8: cilium.HttpNetworkPolicyRule - (*KafkaNetworkPolicyRules)(nil), // 9: cilium.KafkaNetworkPolicyRules - (*KafkaNetworkPolicyRule)(nil), // 10: cilium.KafkaNetworkPolicyRule - (*L7NetworkPolicyRules)(nil), // 11: cilium.L7NetworkPolicyRules - (*L7NetworkPolicyRule)(nil), // 12: cilium.L7NetworkPolicyRule - (*NetworkPoliciesConfigDump)(nil), // 13: cilium.NetworkPoliciesConfigDump - nil, // 14: cilium.L7NetworkPolicyRule.RuleEntry - (v3.SocketAddress_Protocol)(0), // 15: envoy.config.core.v3.SocketAddress.Protocol - (*v31.HeaderMatcher)(nil), // 16: envoy.config.route.v3.HeaderMatcher - (*v32.MetadataMatcher)(nil), // 17: envoy.type.matcher.v3.MetadataMatcher - (*v33.DiscoveryRequest)(nil), // 18: envoy.service.discovery.v3.DiscoveryRequest - (*v33.DiscoveryResponse)(nil), // 19: envoy.service.discovery.v3.DiscoveryResponse -} -var file_cilium_api_npds_proto_depIdxs = []int32{ - 3, // 0: cilium.NetworkPolicy.ingress_per_port_policies:type_name -> cilium.PortNetworkPolicy - 3, // 1: cilium.NetworkPolicy.egress_per_port_policies:type_name -> cilium.PortNetworkPolicy - 15, // 2: cilium.PortNetworkPolicy.protocol:type_name -> envoy.config.core.v3.SocketAddress.Protocol - 5, // 3: cilium.PortNetworkPolicy.rules:type_name -> cilium.PortNetworkPolicyRule - 4, // 4: cilium.PortNetworkPolicyRule.downstream_tls_context:type_name -> cilium.TLSContext - 4, // 5: cilium.PortNetworkPolicyRule.upstream_tls_context:type_name -> cilium.TLSContext - 6, // 6: cilium.PortNetworkPolicyRule.http_rules:type_name -> cilium.HttpNetworkPolicyRules - 9, // 7: cilium.PortNetworkPolicyRule.kafka_rules:type_name -> cilium.KafkaNetworkPolicyRules - 11, // 8: cilium.PortNetworkPolicyRule.l7_rules:type_name -> cilium.L7NetworkPolicyRules - 8, // 9: cilium.HttpNetworkPolicyRules.http_rules:type_name -> cilium.HttpNetworkPolicyRule - 0, // 10: cilium.HeaderMatch.match_action:type_name -> cilium.HeaderMatch.MatchAction - 1, // 11: cilium.HeaderMatch.mismatch_action:type_name -> cilium.HeaderMatch.MismatchAction - 16, // 12: cilium.HttpNetworkPolicyRule.headers:type_name -> envoy.config.route.v3.HeaderMatcher - 7, // 13: cilium.HttpNetworkPolicyRule.header_matches:type_name -> cilium.HeaderMatch - 10, // 14: cilium.KafkaNetworkPolicyRules.kafka_rules:type_name -> cilium.KafkaNetworkPolicyRule - 12, // 15: cilium.L7NetworkPolicyRules.l7_allow_rules:type_name -> cilium.L7NetworkPolicyRule - 12, // 16: cilium.L7NetworkPolicyRules.l7_deny_rules:type_name -> cilium.L7NetworkPolicyRule - 14, // 17: cilium.L7NetworkPolicyRule.rule:type_name -> cilium.L7NetworkPolicyRule.RuleEntry - 17, // 18: cilium.L7NetworkPolicyRule.metadata_rule:type_name -> envoy.type.matcher.v3.MetadataMatcher - 2, // 19: cilium.NetworkPoliciesConfigDump.networkpolicies:type_name -> cilium.NetworkPolicy - 18, // 20: cilium.NetworkPolicyDiscoveryService.StreamNetworkPolicies:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 18, // 21: cilium.NetworkPolicyDiscoveryService.FetchNetworkPolicies:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 19, // 22: cilium.NetworkPolicyDiscoveryService.StreamNetworkPolicies:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 19, // 23: cilium.NetworkPolicyDiscoveryService.FetchNetworkPolicies:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 22, // [22:24] is the sub-list for method output_type - 20, // [20:22] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name -} - -func init() { file_cilium_api_npds_proto_init() } -func file_cilium_api_npds_proto_init() { - if File_cilium_api_npds_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cilium_api_npds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetworkPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_npds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PortNetworkPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_npds_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TLSContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_npds_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PortNetworkPolicyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_npds_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpNetworkPolicyRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_npds_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_npds_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpNetworkPolicyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_npds_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KafkaNetworkPolicyRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_npds_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KafkaNetworkPolicyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_npds_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L7NetworkPolicyRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_npds_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*L7NetworkPolicyRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_npds_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetworkPoliciesConfigDump); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_cilium_api_npds_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*PortNetworkPolicyRule_HttpRules)(nil), - (*PortNetworkPolicyRule_KafkaRules)(nil), - (*PortNetworkPolicyRule_L7Rules)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cilium_api_npds_proto_rawDesc, - NumEnums: 2, - NumMessages: 13, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cilium_api_npds_proto_goTypes, - DependencyIndexes: file_cilium_api_npds_proto_depIdxs, - EnumInfos: file_cilium_api_npds_proto_enumTypes, - MessageInfos: file_cilium_api_npds_proto_msgTypes, - }.Build() - File_cilium_api_npds_proto = out.File - file_cilium_api_npds_proto_rawDesc = nil - file_cilium_api_npds_proto_goTypes = nil - file_cilium_api_npds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// NetworkPolicyDiscoveryServiceClient is the client API for NetworkPolicyDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type NetworkPolicyDiscoveryServiceClient interface { - StreamNetworkPolicies(ctx context.Context, opts ...grpc.CallOption) (NetworkPolicyDiscoveryService_StreamNetworkPoliciesClient, error) - FetchNetworkPolicies(ctx context.Context, in *v33.DiscoveryRequest, opts ...grpc.CallOption) (*v33.DiscoveryResponse, error) -} - -type networkPolicyDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewNetworkPolicyDiscoveryServiceClient(cc grpc.ClientConnInterface) NetworkPolicyDiscoveryServiceClient { - return &networkPolicyDiscoveryServiceClient{cc} -} - -func (c *networkPolicyDiscoveryServiceClient) StreamNetworkPolicies(ctx context.Context, opts ...grpc.CallOption) (NetworkPolicyDiscoveryService_StreamNetworkPoliciesClient, error) { - stream, err := c.cc.NewStream(ctx, &_NetworkPolicyDiscoveryService_serviceDesc.Streams[0], "/cilium.NetworkPolicyDiscoveryService/StreamNetworkPolicies", opts...) - if err != nil { - return nil, err - } - x := &networkPolicyDiscoveryServiceStreamNetworkPoliciesClient{stream} - return x, nil -} - -type NetworkPolicyDiscoveryService_StreamNetworkPoliciesClient interface { - Send(*v33.DiscoveryRequest) error - Recv() (*v33.DiscoveryResponse, error) - grpc.ClientStream -} - -type networkPolicyDiscoveryServiceStreamNetworkPoliciesClient struct { - grpc.ClientStream -} - -func (x *networkPolicyDiscoveryServiceStreamNetworkPoliciesClient) Send(m *v33.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *networkPolicyDiscoveryServiceStreamNetworkPoliciesClient) Recv() (*v33.DiscoveryResponse, error) { - m := new(v33.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *networkPolicyDiscoveryServiceClient) FetchNetworkPolicies(ctx context.Context, in *v33.DiscoveryRequest, opts ...grpc.CallOption) (*v33.DiscoveryResponse, error) { - out := new(v33.DiscoveryResponse) - err := c.cc.Invoke(ctx, "/cilium.NetworkPolicyDiscoveryService/FetchNetworkPolicies", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NetworkPolicyDiscoveryServiceServer is the server API for NetworkPolicyDiscoveryService service. -type NetworkPolicyDiscoveryServiceServer interface { - StreamNetworkPolicies(NetworkPolicyDiscoveryService_StreamNetworkPoliciesServer) error - FetchNetworkPolicies(context.Context, *v33.DiscoveryRequest) (*v33.DiscoveryResponse, error) -} - -// UnimplementedNetworkPolicyDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedNetworkPolicyDiscoveryServiceServer struct { -} - -func (*UnimplementedNetworkPolicyDiscoveryServiceServer) StreamNetworkPolicies(NetworkPolicyDiscoveryService_StreamNetworkPoliciesServer) error { - return status.Errorf(codes.Unimplemented, "method StreamNetworkPolicies not implemented") -} -func (*UnimplementedNetworkPolicyDiscoveryServiceServer) FetchNetworkPolicies(context.Context, *v33.DiscoveryRequest) (*v33.DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchNetworkPolicies not implemented") -} - -func RegisterNetworkPolicyDiscoveryServiceServer(s *grpc.Server, srv NetworkPolicyDiscoveryServiceServer) { - s.RegisterService(&_NetworkPolicyDiscoveryService_serviceDesc, srv) -} - -func _NetworkPolicyDiscoveryService_StreamNetworkPolicies_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(NetworkPolicyDiscoveryServiceServer).StreamNetworkPolicies(&networkPolicyDiscoveryServiceStreamNetworkPoliciesServer{stream}) -} - -type NetworkPolicyDiscoveryService_StreamNetworkPoliciesServer interface { - Send(*v33.DiscoveryResponse) error - Recv() (*v33.DiscoveryRequest, error) - grpc.ServerStream -} - -type networkPolicyDiscoveryServiceStreamNetworkPoliciesServer struct { - grpc.ServerStream -} - -func (x *networkPolicyDiscoveryServiceStreamNetworkPoliciesServer) Send(m *v33.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *networkPolicyDiscoveryServiceStreamNetworkPoliciesServer) Recv() (*v33.DiscoveryRequest, error) { - m := new(v33.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _NetworkPolicyDiscoveryService_FetchNetworkPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v33.DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NetworkPolicyDiscoveryServiceServer).FetchNetworkPolicies(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cilium.NetworkPolicyDiscoveryService/FetchNetworkPolicies", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NetworkPolicyDiscoveryServiceServer).FetchNetworkPolicies(ctx, req.(*v33.DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _NetworkPolicyDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cilium.NetworkPolicyDiscoveryService", - HandlerType: (*NetworkPolicyDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchNetworkPolicies", - Handler: _NetworkPolicyDiscoveryService_FetchNetworkPolicies_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamNetworkPolicies", - Handler: _NetworkPolicyDiscoveryService_StreamNetworkPolicies_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "cilium/api/npds.proto", -} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/npds.pb.validate.go b/vendor/github.com/cilium/proxy/go/cilium/api/npds.pb.validate.go deleted file mode 100644 index 70118cedc2f..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/npds.pb.validate.go +++ /dev/null @@ -1,1971 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: cilium/api/npds.proto - -package cilium - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" - - v3 "github.com/cilium/proxy/go/envoy/config/core/v3" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort - - _ = v3.SocketAddress_Protocol(0) -) - -// Validate checks the field values on NetworkPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *NetworkPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on NetworkPolicy with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in NetworkPolicyMultiError, or -// nil if none found. -func (m *NetworkPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *NetworkPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if l := len(m.GetEndpointIps()); l < 1 || l > 2 { - err := NetworkPolicyValidationError{ - field: "EndpointIps", - reason: "value must contain between 1 and 2 items, inclusive", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetEndpointIps() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 1 { - err := NetworkPolicyValidationError{ - field: fmt.Sprintf("EndpointIps[%v]", idx), - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - // no validation rules for EndpointId - - for idx, item := range m.GetIngressPerPortPolicies() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NetworkPolicyValidationError{ - field: fmt.Sprintf("IngressPerPortPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NetworkPolicyValidationError{ - field: fmt.Sprintf("IngressPerPortPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NetworkPolicyValidationError{ - field: fmt.Sprintf("IngressPerPortPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetEgressPerPortPolicies() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NetworkPolicyValidationError{ - field: fmt.Sprintf("EgressPerPortPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NetworkPolicyValidationError{ - field: fmt.Sprintf("EgressPerPortPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NetworkPolicyValidationError{ - field: fmt.Sprintf("EgressPerPortPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for ConntrackMapName - - if len(errors) > 0 { - return NetworkPolicyMultiError(errors) - } - - return nil -} - -// NetworkPolicyMultiError is an error wrapping multiple validation errors -// returned by NetworkPolicy.ValidateAll() if the designated constraints -// aren't met. -type NetworkPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NetworkPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m NetworkPolicyMultiError) AllErrors() []error { return m } - -// NetworkPolicyValidationError is the validation error returned by -// NetworkPolicy.Validate if the designated constraints aren't met. -type NetworkPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NetworkPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NetworkPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NetworkPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NetworkPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NetworkPolicyValidationError) ErrorName() string { return "NetworkPolicyValidationError" } - -// Error satisfies the builtin error interface -func (e NetworkPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNetworkPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NetworkPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NetworkPolicyValidationError{} - -// Validate checks the field values on PortNetworkPolicy with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *PortNetworkPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PortNetworkPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PortNetworkPolicyMultiError, or nil if none found. -func (m *PortNetworkPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *PortNetworkPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetPort() > 65535 { - err := PortNetworkPolicyValidationError{ - field: "Port", - reason: "value must be less than or equal to 65535", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetEndPort() > 65535 { - err := PortNetworkPolicyValidationError{ - field: "EndPort", - reason: "value must be less than or equal to 65535", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Protocol - - for idx, item := range m.GetRules() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PortNetworkPolicyValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PortNetworkPolicyValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PortNetworkPolicyValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return PortNetworkPolicyMultiError(errors) - } - - return nil -} - -// PortNetworkPolicyMultiError is an error wrapping multiple validation errors -// returned by PortNetworkPolicy.ValidateAll() if the designated constraints -// aren't met. -type PortNetworkPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PortNetworkPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PortNetworkPolicyMultiError) AllErrors() []error { return m } - -// PortNetworkPolicyValidationError is the validation error returned by -// PortNetworkPolicy.Validate if the designated constraints aren't met. -type PortNetworkPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PortNetworkPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PortNetworkPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PortNetworkPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PortNetworkPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PortNetworkPolicyValidationError) ErrorName() string { - return "PortNetworkPolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e PortNetworkPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPortNetworkPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PortNetworkPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PortNetworkPolicyValidationError{} - -// Validate checks the field values on TLSContext with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *TLSContext) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TLSContext with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in TLSContextMultiError, or -// nil if none found. -func (m *TLSContext) ValidateAll() error { - return m.validate(true) -} - -func (m *TLSContext) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for TrustedCa - - // no validation rules for CertificateChain - - // no validation rules for PrivateKey - - // no validation rules for ValidationContextSdsSecret - - // no validation rules for TlsSdsSecret - - if len(errors) > 0 { - return TLSContextMultiError(errors) - } - - return nil -} - -// TLSContextMultiError is an error wrapping multiple validation errors -// returned by TLSContext.ValidateAll() if the designated constraints aren't met. -type TLSContextMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TLSContextMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TLSContextMultiError) AllErrors() []error { return m } - -// TLSContextValidationError is the validation error returned by -// TLSContext.Validate if the designated constraints aren't met. -type TLSContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TLSContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TLSContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TLSContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TLSContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TLSContextValidationError) ErrorName() string { return "TLSContextValidationError" } - -// Error satisfies the builtin error interface -func (e TLSContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTLSContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TLSContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TLSContextValidationError{} - -// Validate checks the field values on PortNetworkPolicyRule with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *PortNetworkPolicyRule) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PortNetworkPolicyRule with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PortNetworkPolicyRuleMultiError, or nil if none found. -func (m *PortNetworkPolicyRule) ValidateAll() error { - return m.validate(true) -} - -func (m *PortNetworkPolicyRule) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Deny - - // no validation rules for Name - - if all { - switch v := interface{}(m.GetDownstreamTlsContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PortNetworkPolicyRuleValidationError{ - field: "DownstreamTlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PortNetworkPolicyRuleValidationError{ - field: "DownstreamTlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDownstreamTlsContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PortNetworkPolicyRuleValidationError{ - field: "DownstreamTlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetUpstreamTlsContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PortNetworkPolicyRuleValidationError{ - field: "UpstreamTlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PortNetworkPolicyRuleValidationError{ - field: "UpstreamTlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUpstreamTlsContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PortNetworkPolicyRuleValidationError{ - field: "UpstreamTlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for L7Proto - - switch v := m.L7.(type) { - case *PortNetworkPolicyRule_HttpRules: - if v == nil { - err := PortNetworkPolicyRuleValidationError{ - field: "L7", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetHttpRules()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PortNetworkPolicyRuleValidationError{ - field: "HttpRules", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PortNetworkPolicyRuleValidationError{ - field: "HttpRules", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHttpRules()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PortNetworkPolicyRuleValidationError{ - field: "HttpRules", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *PortNetworkPolicyRule_KafkaRules: - if v == nil { - err := PortNetworkPolicyRuleValidationError{ - field: "L7", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetKafkaRules()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PortNetworkPolicyRuleValidationError{ - field: "KafkaRules", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PortNetworkPolicyRuleValidationError{ - field: "KafkaRules", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKafkaRules()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PortNetworkPolicyRuleValidationError{ - field: "KafkaRules", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *PortNetworkPolicyRule_L7Rules: - if v == nil { - err := PortNetworkPolicyRuleValidationError{ - field: "L7", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetL7Rules()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PortNetworkPolicyRuleValidationError{ - field: "L7Rules", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PortNetworkPolicyRuleValidationError{ - field: "L7Rules", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetL7Rules()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PortNetworkPolicyRuleValidationError{ - field: "L7Rules", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return PortNetworkPolicyRuleMultiError(errors) - } - - return nil -} - -// PortNetworkPolicyRuleMultiError is an error wrapping multiple validation -// errors returned by PortNetworkPolicyRule.ValidateAll() if the designated -// constraints aren't met. -type PortNetworkPolicyRuleMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PortNetworkPolicyRuleMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PortNetworkPolicyRuleMultiError) AllErrors() []error { return m } - -// PortNetworkPolicyRuleValidationError is the validation error returned by -// PortNetworkPolicyRule.Validate if the designated constraints aren't met. -type PortNetworkPolicyRuleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PortNetworkPolicyRuleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PortNetworkPolicyRuleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PortNetworkPolicyRuleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PortNetworkPolicyRuleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PortNetworkPolicyRuleValidationError) ErrorName() string { - return "PortNetworkPolicyRuleValidationError" -} - -// Error satisfies the builtin error interface -func (e PortNetworkPolicyRuleValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPortNetworkPolicyRule.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PortNetworkPolicyRuleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PortNetworkPolicyRuleValidationError{} - -// Validate checks the field values on HttpNetworkPolicyRules with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HttpNetworkPolicyRules) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpNetworkPolicyRules with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HttpNetworkPolicyRulesMultiError, or nil if none found. -func (m *HttpNetworkPolicyRules) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpNetworkPolicyRules) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetHttpRules()) < 1 { - err := HttpNetworkPolicyRulesValidationError{ - field: "HttpRules", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetHttpRules() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpNetworkPolicyRulesValidationError{ - field: fmt.Sprintf("HttpRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpNetworkPolicyRulesValidationError{ - field: fmt.Sprintf("HttpRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpNetworkPolicyRulesValidationError{ - field: fmt.Sprintf("HttpRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return HttpNetworkPolicyRulesMultiError(errors) - } - - return nil -} - -// HttpNetworkPolicyRulesMultiError is an error wrapping multiple validation -// errors returned by HttpNetworkPolicyRules.ValidateAll() if the designated -// constraints aren't met. -type HttpNetworkPolicyRulesMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpNetworkPolicyRulesMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpNetworkPolicyRulesMultiError) AllErrors() []error { return m } - -// HttpNetworkPolicyRulesValidationError is the validation error returned by -// HttpNetworkPolicyRules.Validate if the designated constraints aren't met. -type HttpNetworkPolicyRulesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpNetworkPolicyRulesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpNetworkPolicyRulesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpNetworkPolicyRulesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpNetworkPolicyRulesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpNetworkPolicyRulesValidationError) ErrorName() string { - return "HttpNetworkPolicyRulesValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpNetworkPolicyRulesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpNetworkPolicyRules.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpNetworkPolicyRulesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpNetworkPolicyRulesValidationError{} - -// Validate checks the field values on HeaderMatch with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HeaderMatch) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HeaderMatch with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HeaderMatchMultiError, or -// nil if none found. -func (m *HeaderMatch) ValidateAll() error { - return m.validate(true) -} - -func (m *HeaderMatch) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := HeaderMatchValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Value - - // no validation rules for MatchAction - - // no validation rules for MismatchAction - - // no validation rules for ValueSdsSecret - - if len(errors) > 0 { - return HeaderMatchMultiError(errors) - } - - return nil -} - -// HeaderMatchMultiError is an error wrapping multiple validation errors -// returned by HeaderMatch.ValidateAll() if the designated constraints aren't met. -type HeaderMatchMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HeaderMatchMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HeaderMatchMultiError) AllErrors() []error { return m } - -// HeaderMatchValidationError is the validation error returned by -// HeaderMatch.Validate if the designated constraints aren't met. -type HeaderMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderMatchValidationError) ErrorName() string { return "HeaderMatchValidationError" } - -// Error satisfies the builtin error interface -func (e HeaderMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderMatchValidationError{} - -// Validate checks the field values on HttpNetworkPolicyRule with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HttpNetworkPolicyRule) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpNetworkPolicyRule with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HttpNetworkPolicyRuleMultiError, or nil if none found. -func (m *HttpNetworkPolicyRule) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpNetworkPolicyRule) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpNetworkPolicyRuleValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpNetworkPolicyRuleValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpNetworkPolicyRuleValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetHeaderMatches() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpNetworkPolicyRuleValidationError{ - field: fmt.Sprintf("HeaderMatches[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpNetworkPolicyRuleValidationError{ - field: fmt.Sprintf("HeaderMatches[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpNetworkPolicyRuleValidationError{ - field: fmt.Sprintf("HeaderMatches[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return HttpNetworkPolicyRuleMultiError(errors) - } - - return nil -} - -// HttpNetworkPolicyRuleMultiError is an error wrapping multiple validation -// errors returned by HttpNetworkPolicyRule.ValidateAll() if the designated -// constraints aren't met. -type HttpNetworkPolicyRuleMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpNetworkPolicyRuleMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpNetworkPolicyRuleMultiError) AllErrors() []error { return m } - -// HttpNetworkPolicyRuleValidationError is the validation error returned by -// HttpNetworkPolicyRule.Validate if the designated constraints aren't met. -type HttpNetworkPolicyRuleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpNetworkPolicyRuleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpNetworkPolicyRuleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpNetworkPolicyRuleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpNetworkPolicyRuleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpNetworkPolicyRuleValidationError) ErrorName() string { - return "HttpNetworkPolicyRuleValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpNetworkPolicyRuleValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpNetworkPolicyRule.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpNetworkPolicyRuleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpNetworkPolicyRuleValidationError{} - -// Validate checks the field values on KafkaNetworkPolicyRules with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *KafkaNetworkPolicyRules) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on KafkaNetworkPolicyRules with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// KafkaNetworkPolicyRulesMultiError, or nil if none found. -func (m *KafkaNetworkPolicyRules) ValidateAll() error { - return m.validate(true) -} - -func (m *KafkaNetworkPolicyRules) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetKafkaRules()) < 1 { - err := KafkaNetworkPolicyRulesValidationError{ - field: "KafkaRules", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetKafkaRules() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, KafkaNetworkPolicyRulesValidationError{ - field: fmt.Sprintf("KafkaRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, KafkaNetworkPolicyRulesValidationError{ - field: fmt.Sprintf("KafkaRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return KafkaNetworkPolicyRulesValidationError{ - field: fmt.Sprintf("KafkaRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return KafkaNetworkPolicyRulesMultiError(errors) - } - - return nil -} - -// KafkaNetworkPolicyRulesMultiError is an error wrapping multiple validation -// errors returned by KafkaNetworkPolicyRules.ValidateAll() if the designated -// constraints aren't met. -type KafkaNetworkPolicyRulesMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m KafkaNetworkPolicyRulesMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m KafkaNetworkPolicyRulesMultiError) AllErrors() []error { return m } - -// KafkaNetworkPolicyRulesValidationError is the validation error returned by -// KafkaNetworkPolicyRules.Validate if the designated constraints aren't met. -type KafkaNetworkPolicyRulesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e KafkaNetworkPolicyRulesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e KafkaNetworkPolicyRulesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e KafkaNetworkPolicyRulesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e KafkaNetworkPolicyRulesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e KafkaNetworkPolicyRulesValidationError) ErrorName() string { - return "KafkaNetworkPolicyRulesValidationError" -} - -// Error satisfies the builtin error interface -func (e KafkaNetworkPolicyRulesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sKafkaNetworkPolicyRules.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = KafkaNetworkPolicyRulesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = KafkaNetworkPolicyRulesValidationError{} - -// Validate checks the field values on KafkaNetworkPolicyRule with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *KafkaNetworkPolicyRule) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on KafkaNetworkPolicyRule with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// KafkaNetworkPolicyRuleMultiError, or nil if none found. -func (m *KafkaNetworkPolicyRule) ValidateAll() error { - return m.validate(true) -} - -func (m *KafkaNetworkPolicyRule) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ApiVersion - - if !_KafkaNetworkPolicyRule_ClientId_Pattern.MatchString(m.GetClientId()) { - err := KafkaNetworkPolicyRuleValidationError{ - field: "ClientId", - reason: "value does not match regex pattern \"^[a-zA-Z0-9._-]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetTopic()) > 255 { - err := KafkaNetworkPolicyRuleValidationError{ - field: "Topic", - reason: "value length must be at most 255 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_KafkaNetworkPolicyRule_Topic_Pattern.MatchString(m.GetTopic()) { - err := KafkaNetworkPolicyRuleValidationError{ - field: "Topic", - reason: "value does not match regex pattern \"^[a-zA-Z0-9._-]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return KafkaNetworkPolicyRuleMultiError(errors) - } - - return nil -} - -// KafkaNetworkPolicyRuleMultiError is an error wrapping multiple validation -// errors returned by KafkaNetworkPolicyRule.ValidateAll() if the designated -// constraints aren't met. -type KafkaNetworkPolicyRuleMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m KafkaNetworkPolicyRuleMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m KafkaNetworkPolicyRuleMultiError) AllErrors() []error { return m } - -// KafkaNetworkPolicyRuleValidationError is the validation error returned by -// KafkaNetworkPolicyRule.Validate if the designated constraints aren't met. -type KafkaNetworkPolicyRuleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e KafkaNetworkPolicyRuleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e KafkaNetworkPolicyRuleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e KafkaNetworkPolicyRuleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e KafkaNetworkPolicyRuleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e KafkaNetworkPolicyRuleValidationError) ErrorName() string { - return "KafkaNetworkPolicyRuleValidationError" -} - -// Error satisfies the builtin error interface -func (e KafkaNetworkPolicyRuleValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sKafkaNetworkPolicyRule.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = KafkaNetworkPolicyRuleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = KafkaNetworkPolicyRuleValidationError{} - -var _KafkaNetworkPolicyRule_ClientId_Pattern = regexp.MustCompile("^[a-zA-Z0-9._-]*$") - -var _KafkaNetworkPolicyRule_Topic_Pattern = regexp.MustCompile("^[a-zA-Z0-9._-]*$") - -// Validate checks the field values on L7NetworkPolicyRules with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *L7NetworkPolicyRules) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on L7NetworkPolicyRules with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// L7NetworkPolicyRulesMultiError, or nil if none found. -func (m *L7NetworkPolicyRules) ValidateAll() error { - return m.validate(true) -} - -func (m *L7NetworkPolicyRules) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetL7AllowRules() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, L7NetworkPolicyRulesValidationError{ - field: fmt.Sprintf("L7AllowRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, L7NetworkPolicyRulesValidationError{ - field: fmt.Sprintf("L7AllowRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return L7NetworkPolicyRulesValidationError{ - field: fmt.Sprintf("L7AllowRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetL7DenyRules() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, L7NetworkPolicyRulesValidationError{ - field: fmt.Sprintf("L7DenyRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, L7NetworkPolicyRulesValidationError{ - field: fmt.Sprintf("L7DenyRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return L7NetworkPolicyRulesValidationError{ - field: fmt.Sprintf("L7DenyRules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return L7NetworkPolicyRulesMultiError(errors) - } - - return nil -} - -// L7NetworkPolicyRulesMultiError is an error wrapping multiple validation -// errors returned by L7NetworkPolicyRules.ValidateAll() if the designated -// constraints aren't met. -type L7NetworkPolicyRulesMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m L7NetworkPolicyRulesMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m L7NetworkPolicyRulesMultiError) AllErrors() []error { return m } - -// L7NetworkPolicyRulesValidationError is the validation error returned by -// L7NetworkPolicyRules.Validate if the designated constraints aren't met. -type L7NetworkPolicyRulesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e L7NetworkPolicyRulesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e L7NetworkPolicyRulesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e L7NetworkPolicyRulesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e L7NetworkPolicyRulesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e L7NetworkPolicyRulesValidationError) ErrorName() string { - return "L7NetworkPolicyRulesValidationError" -} - -// Error satisfies the builtin error interface -func (e L7NetworkPolicyRulesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sL7NetworkPolicyRules.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = L7NetworkPolicyRulesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = L7NetworkPolicyRulesValidationError{} - -// Validate checks the field values on L7NetworkPolicyRule with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *L7NetworkPolicyRule) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on L7NetworkPolicyRule with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// L7NetworkPolicyRuleMultiError, or nil if none found. -func (m *L7NetworkPolicyRule) ValidateAll() error { - return m.validate(true) -} - -func (m *L7NetworkPolicyRule) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - // no validation rules for Rule - - for idx, item := range m.GetMetadataRule() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, L7NetworkPolicyRuleValidationError{ - field: fmt.Sprintf("MetadataRule[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, L7NetworkPolicyRuleValidationError{ - field: fmt.Sprintf("MetadataRule[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return L7NetworkPolicyRuleValidationError{ - field: fmt.Sprintf("MetadataRule[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return L7NetworkPolicyRuleMultiError(errors) - } - - return nil -} - -// L7NetworkPolicyRuleMultiError is an error wrapping multiple validation -// errors returned by L7NetworkPolicyRule.ValidateAll() if the designated -// constraints aren't met. -type L7NetworkPolicyRuleMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m L7NetworkPolicyRuleMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m L7NetworkPolicyRuleMultiError) AllErrors() []error { return m } - -// L7NetworkPolicyRuleValidationError is the validation error returned by -// L7NetworkPolicyRule.Validate if the designated constraints aren't met. -type L7NetworkPolicyRuleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e L7NetworkPolicyRuleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e L7NetworkPolicyRuleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e L7NetworkPolicyRuleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e L7NetworkPolicyRuleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e L7NetworkPolicyRuleValidationError) ErrorName() string { - return "L7NetworkPolicyRuleValidationError" -} - -// Error satisfies the builtin error interface -func (e L7NetworkPolicyRuleValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sL7NetworkPolicyRule.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = L7NetworkPolicyRuleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = L7NetworkPolicyRuleValidationError{} - -// Validate checks the field values on NetworkPoliciesConfigDump with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *NetworkPoliciesConfigDump) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on NetworkPoliciesConfigDump with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// NetworkPoliciesConfigDumpMultiError, or nil if none found. -func (m *NetworkPoliciesConfigDump) ValidateAll() error { - return m.validate(true) -} - -func (m *NetworkPoliciesConfigDump) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetNetworkpolicies() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NetworkPoliciesConfigDumpValidationError{ - field: fmt.Sprintf("Networkpolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NetworkPoliciesConfigDumpValidationError{ - field: fmt.Sprintf("Networkpolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NetworkPoliciesConfigDumpValidationError{ - field: fmt.Sprintf("Networkpolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return NetworkPoliciesConfigDumpMultiError(errors) - } - - return nil -} - -// NetworkPoliciesConfigDumpMultiError is an error wrapping multiple validation -// errors returned by NetworkPoliciesConfigDump.ValidateAll() if the -// designated constraints aren't met. -type NetworkPoliciesConfigDumpMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NetworkPoliciesConfigDumpMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m NetworkPoliciesConfigDumpMultiError) AllErrors() []error { return m } - -// NetworkPoliciesConfigDumpValidationError is the validation error returned by -// NetworkPoliciesConfigDump.Validate if the designated constraints aren't met. -type NetworkPoliciesConfigDumpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NetworkPoliciesConfigDumpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NetworkPoliciesConfigDumpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NetworkPoliciesConfigDumpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NetworkPoliciesConfigDumpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NetworkPoliciesConfigDumpValidationError) ErrorName() string { - return "NetworkPoliciesConfigDumpValidationError" -} - -// Error satisfies the builtin error interface -func (e NetworkPoliciesConfigDumpValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNetworkPoliciesConfigDump.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NetworkPoliciesConfigDumpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NetworkPoliciesConfigDumpValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/nphds.pb.go b/vendor/github.com/cilium/proxy/go/cilium/api/nphds.pb.go deleted file mode 100644 index 0f3b9c65e07..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/nphds.pb.go +++ /dev/null @@ -1,362 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: cilium/api/nphds.proto - -package cilium - -import ( - context "context" - _ "github.com/cilium/proxy/go/envoy/annotations" - v3 "github.com/cilium/proxy/go/envoy/service/discovery/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// The mapping of a network policy identifier to the IP addresses of all the -// hosts on which the network policy is enforced. -// A host may be associated only with one network policy. -type NetworkPolicyHosts struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique identifier of the network policy enforced on the hosts. - Policy uint64 `protobuf:"varint,1,opt,name=policy,proto3" json:"policy,omitempty"` - // The set of IP addresses of the hosts on which the network policy is - // enforced. Optional. May be empty. - HostAddresses []string `protobuf:"bytes,2,rep,name=host_addresses,json=hostAddresses,proto3" json:"host_addresses,omitempty"` -} - -func (x *NetworkPolicyHosts) Reset() { - *x = NetworkPolicyHosts{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_nphds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NetworkPolicyHosts) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NetworkPolicyHosts) ProtoMessage() {} - -func (x *NetworkPolicyHosts) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_nphds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NetworkPolicyHosts.ProtoReflect.Descriptor instead. -func (*NetworkPolicyHosts) Descriptor() ([]byte, []int) { - return file_cilium_api_nphds_proto_rawDescGZIP(), []int{0} -} - -func (x *NetworkPolicyHosts) GetPolicy() uint64 { - if x != nil { - return x.Policy - } - return 0 -} - -func (x *NetworkPolicyHosts) GetHostAddresses() []string { - if x != nil { - return x.HostAddresses - } - return nil -} - -var File_cilium_api_nphds_proto protoreflect.FileDescriptor - -var file_cilium_api_nphds_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x70, 0x68, - 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, - 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x69, 0x0a, 0x12, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x3b, 0x0a, 0x0e, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x05, - 0x92, 0x01, 0x02, 0x18, 0x01, 0xfa, 0x42, 0x09, 0x92, 0x01, 0x06, 0x22, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x32, 0xee, 0x02, 0x0a, 0x22, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x6f, - 0x73, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0xa5, 0x01, 0x0a, 0x17, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x6f, 0x73, - 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x22, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x3a, 0x01, 0x2a, 0x1a, 0x21, - 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x1b, 0x0a, 0x19, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2e, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x6f, 0x73, 0x74, - 0x73, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2f, - 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x63, 0x69, 0x6c, 0x69, 0x75, - 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cilium_api_nphds_proto_rawDescOnce sync.Once - file_cilium_api_nphds_proto_rawDescData = file_cilium_api_nphds_proto_rawDesc -) - -func file_cilium_api_nphds_proto_rawDescGZIP() []byte { - file_cilium_api_nphds_proto_rawDescOnce.Do(func() { - file_cilium_api_nphds_proto_rawDescData = protoimpl.X.CompressGZIP(file_cilium_api_nphds_proto_rawDescData) - }) - return file_cilium_api_nphds_proto_rawDescData -} - -var file_cilium_api_nphds_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cilium_api_nphds_proto_goTypes = []interface{}{ - (*NetworkPolicyHosts)(nil), // 0: cilium.NetworkPolicyHosts - (*v3.DiscoveryRequest)(nil), // 1: envoy.service.discovery.v3.DiscoveryRequest - (*v3.DiscoveryResponse)(nil), // 2: envoy.service.discovery.v3.DiscoveryResponse -} -var file_cilium_api_nphds_proto_depIdxs = []int32{ - 1, // 0: cilium.NetworkPolicyHostsDiscoveryService.StreamNetworkPolicyHosts:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 1, // 1: cilium.NetworkPolicyHostsDiscoveryService.FetchNetworkPolicyHosts:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 2, // 2: cilium.NetworkPolicyHostsDiscoveryService.StreamNetworkPolicyHosts:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 2, // 3: cilium.NetworkPolicyHostsDiscoveryService.FetchNetworkPolicyHosts:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cilium_api_nphds_proto_init() } -func file_cilium_api_nphds_proto_init() { - if File_cilium_api_nphds_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cilium_api_nphds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetworkPolicyHosts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cilium_api_nphds_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cilium_api_nphds_proto_goTypes, - DependencyIndexes: file_cilium_api_nphds_proto_depIdxs, - MessageInfos: file_cilium_api_nphds_proto_msgTypes, - }.Build() - File_cilium_api_nphds_proto = out.File - file_cilium_api_nphds_proto_rawDesc = nil - file_cilium_api_nphds_proto_goTypes = nil - file_cilium_api_nphds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// NetworkPolicyHostsDiscoveryServiceClient is the client API for NetworkPolicyHostsDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type NetworkPolicyHostsDiscoveryServiceClient interface { - StreamNetworkPolicyHosts(ctx context.Context, opts ...grpc.CallOption) (NetworkPolicyHostsDiscoveryService_StreamNetworkPolicyHostsClient, error) - FetchNetworkPolicyHosts(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) -} - -type networkPolicyHostsDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewNetworkPolicyHostsDiscoveryServiceClient(cc grpc.ClientConnInterface) NetworkPolicyHostsDiscoveryServiceClient { - return &networkPolicyHostsDiscoveryServiceClient{cc} -} - -func (c *networkPolicyHostsDiscoveryServiceClient) StreamNetworkPolicyHosts(ctx context.Context, opts ...grpc.CallOption) (NetworkPolicyHostsDiscoveryService_StreamNetworkPolicyHostsClient, error) { - stream, err := c.cc.NewStream(ctx, &_NetworkPolicyHostsDiscoveryService_serviceDesc.Streams[0], "/cilium.NetworkPolicyHostsDiscoveryService/StreamNetworkPolicyHosts", opts...) - if err != nil { - return nil, err - } - x := &networkPolicyHostsDiscoveryServiceStreamNetworkPolicyHostsClient{stream} - return x, nil -} - -type NetworkPolicyHostsDiscoveryService_StreamNetworkPolicyHostsClient interface { - Send(*v3.DiscoveryRequest) error - Recv() (*v3.DiscoveryResponse, error) - grpc.ClientStream -} - -type networkPolicyHostsDiscoveryServiceStreamNetworkPolicyHostsClient struct { - grpc.ClientStream -} - -func (x *networkPolicyHostsDiscoveryServiceStreamNetworkPolicyHostsClient) Send(m *v3.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *networkPolicyHostsDiscoveryServiceStreamNetworkPolicyHostsClient) Recv() (*v3.DiscoveryResponse, error) { - m := new(v3.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *networkPolicyHostsDiscoveryServiceClient) FetchNetworkPolicyHosts(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) { - out := new(v3.DiscoveryResponse) - err := c.cc.Invoke(ctx, "/cilium.NetworkPolicyHostsDiscoveryService/FetchNetworkPolicyHosts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NetworkPolicyHostsDiscoveryServiceServer is the server API for NetworkPolicyHostsDiscoveryService service. -type NetworkPolicyHostsDiscoveryServiceServer interface { - StreamNetworkPolicyHosts(NetworkPolicyHostsDiscoveryService_StreamNetworkPolicyHostsServer) error - FetchNetworkPolicyHosts(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) -} - -// UnimplementedNetworkPolicyHostsDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedNetworkPolicyHostsDiscoveryServiceServer struct { -} - -func (*UnimplementedNetworkPolicyHostsDiscoveryServiceServer) StreamNetworkPolicyHosts(NetworkPolicyHostsDiscoveryService_StreamNetworkPolicyHostsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamNetworkPolicyHosts not implemented") -} -func (*UnimplementedNetworkPolicyHostsDiscoveryServiceServer) FetchNetworkPolicyHosts(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchNetworkPolicyHosts not implemented") -} - -func RegisterNetworkPolicyHostsDiscoveryServiceServer(s *grpc.Server, srv NetworkPolicyHostsDiscoveryServiceServer) { - s.RegisterService(&_NetworkPolicyHostsDiscoveryService_serviceDesc, srv) -} - -func _NetworkPolicyHostsDiscoveryService_StreamNetworkPolicyHosts_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(NetworkPolicyHostsDiscoveryServiceServer).StreamNetworkPolicyHosts(&networkPolicyHostsDiscoveryServiceStreamNetworkPolicyHostsServer{stream}) -} - -type NetworkPolicyHostsDiscoveryService_StreamNetworkPolicyHostsServer interface { - Send(*v3.DiscoveryResponse) error - Recv() (*v3.DiscoveryRequest, error) - grpc.ServerStream -} - -type networkPolicyHostsDiscoveryServiceStreamNetworkPolicyHostsServer struct { - grpc.ServerStream -} - -func (x *networkPolicyHostsDiscoveryServiceStreamNetworkPolicyHostsServer) Send(m *v3.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *networkPolicyHostsDiscoveryServiceStreamNetworkPolicyHostsServer) Recv() (*v3.DiscoveryRequest, error) { - m := new(v3.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _NetworkPolicyHostsDiscoveryService_FetchNetworkPolicyHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v3.DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NetworkPolicyHostsDiscoveryServiceServer).FetchNetworkPolicyHosts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cilium.NetworkPolicyHostsDiscoveryService/FetchNetworkPolicyHosts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NetworkPolicyHostsDiscoveryServiceServer).FetchNetworkPolicyHosts(ctx, req.(*v3.DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _NetworkPolicyHostsDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cilium.NetworkPolicyHostsDiscoveryService", - HandlerType: (*NetworkPolicyHostsDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchNetworkPolicyHosts", - Handler: _NetworkPolicyHostsDiscoveryService_FetchNetworkPolicyHosts_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamNetworkPolicyHosts", - Handler: _NetworkPolicyHostsDiscoveryService_StreamNetworkPolicyHosts_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "cilium/api/nphds.proto", -} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/nphds.pb.validate.go b/vendor/github.com/cilium/proxy/go/cilium/api/nphds.pb.validate.go deleted file mode 100644 index 6ea20122148..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/nphds.pb.validate.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: cilium/api/nphds.proto - -package cilium - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on NetworkPolicyHosts with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *NetworkPolicyHosts) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on NetworkPolicyHosts with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// NetworkPolicyHostsMultiError, or nil if none found. -func (m *NetworkPolicyHosts) ValidateAll() error { - return m.validate(true) -} - -func (m *NetworkPolicyHosts) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Policy - - _NetworkPolicyHosts_HostAddresses_Unique := make(map[string]struct{}, len(m.GetHostAddresses())) - - for idx, item := range m.GetHostAddresses() { - _, _ = idx, item - - if _, exists := _NetworkPolicyHosts_HostAddresses_Unique[item]; exists { - err := NetworkPolicyHostsValidationError{ - field: fmt.Sprintf("HostAddresses[%v]", idx), - reason: "repeated value must contain unique items", - } - if !all { - return err - } - errors = append(errors, err) - } else { - _NetworkPolicyHosts_HostAddresses_Unique[item] = struct{}{} - } - - if utf8.RuneCountInString(item) < 1 { - err := NetworkPolicyHostsValidationError{ - field: fmt.Sprintf("HostAddresses[%v]", idx), - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(errors) > 0 { - return NetworkPolicyHostsMultiError(errors) - } - - return nil -} - -// NetworkPolicyHostsMultiError is an error wrapping multiple validation errors -// returned by NetworkPolicyHosts.ValidateAll() if the designated constraints -// aren't met. -type NetworkPolicyHostsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NetworkPolicyHostsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m NetworkPolicyHostsMultiError) AllErrors() []error { return m } - -// NetworkPolicyHostsValidationError is the validation error returned by -// NetworkPolicyHosts.Validate if the designated constraints aren't met. -type NetworkPolicyHostsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NetworkPolicyHostsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NetworkPolicyHostsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NetworkPolicyHostsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NetworkPolicyHostsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NetworkPolicyHostsValidationError) ErrorName() string { - return "NetworkPolicyHostsValidationError" -} - -// Error satisfies the builtin error interface -func (e NetworkPolicyHostsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNetworkPolicyHosts.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NetworkPolicyHostsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NetworkPolicyHostsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/tls_wrapper.pb.go b/vendor/github.com/cilium/proxy/go/cilium/api/tls_wrapper.pb.go deleted file mode 100644 index e46dbabcd3c..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/tls_wrapper.pb.go +++ /dev/null @@ -1,194 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: cilium/api/tls_wrapper.proto - -package cilium - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Empty configuration messages for Cilium TLS wrapper to make Envoy happy -type UpstreamTlsWrapperContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpstreamTlsWrapperContext) Reset() { - *x = UpstreamTlsWrapperContext{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_tls_wrapper_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamTlsWrapperContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamTlsWrapperContext) ProtoMessage() {} - -func (x *UpstreamTlsWrapperContext) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_tls_wrapper_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamTlsWrapperContext.ProtoReflect.Descriptor instead. -func (*UpstreamTlsWrapperContext) Descriptor() ([]byte, []int) { - return file_cilium_api_tls_wrapper_proto_rawDescGZIP(), []int{0} -} - -type DownstreamTlsWrapperContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DownstreamTlsWrapperContext) Reset() { - *x = DownstreamTlsWrapperContext{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_tls_wrapper_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DownstreamTlsWrapperContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DownstreamTlsWrapperContext) ProtoMessage() {} - -func (x *DownstreamTlsWrapperContext) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_tls_wrapper_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DownstreamTlsWrapperContext.ProtoReflect.Descriptor instead. -func (*DownstreamTlsWrapperContext) Descriptor() ([]byte, []int) { - return file_cilium_api_tls_wrapper_proto_rawDescGZIP(), []int{1} -} - -var File_cilium_api_tls_wrapper_proto protoreflect.FileDescriptor - -var file_cilium_api_tls_wrapper_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x6c, 0x73, - 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, - 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x54, 0x6c, 0x73, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, - 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x63, 0x69, 0x6c, 0x69, - 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cilium_api_tls_wrapper_proto_rawDescOnce sync.Once - file_cilium_api_tls_wrapper_proto_rawDescData = file_cilium_api_tls_wrapper_proto_rawDesc -) - -func file_cilium_api_tls_wrapper_proto_rawDescGZIP() []byte { - file_cilium_api_tls_wrapper_proto_rawDescOnce.Do(func() { - file_cilium_api_tls_wrapper_proto_rawDescData = protoimpl.X.CompressGZIP(file_cilium_api_tls_wrapper_proto_rawDescData) - }) - return file_cilium_api_tls_wrapper_proto_rawDescData -} - -var file_cilium_api_tls_wrapper_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cilium_api_tls_wrapper_proto_goTypes = []interface{}{ - (*UpstreamTlsWrapperContext)(nil), // 0: cilium.UpstreamTlsWrapperContext - (*DownstreamTlsWrapperContext)(nil), // 1: cilium.DownstreamTlsWrapperContext -} -var file_cilium_api_tls_wrapper_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cilium_api_tls_wrapper_proto_init() } -func file_cilium_api_tls_wrapper_proto_init() { - if File_cilium_api_tls_wrapper_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cilium_api_tls_wrapper_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamTlsWrapperContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_tls_wrapper_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DownstreamTlsWrapperContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cilium_api_tls_wrapper_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cilium_api_tls_wrapper_proto_goTypes, - DependencyIndexes: file_cilium_api_tls_wrapper_proto_depIdxs, - MessageInfos: file_cilium_api_tls_wrapper_proto_msgTypes, - }.Build() - File_cilium_api_tls_wrapper_proto = out.File - file_cilium_api_tls_wrapper_proto_rawDesc = nil - file_cilium_api_tls_wrapper_proto_goTypes = nil - file_cilium_api_tls_wrapper_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/tls_wrapper.pb.validate.go b/vendor/github.com/cilium/proxy/go/cilium/api/tls_wrapper.pb.validate.go deleted file mode 100644 index b5da26f8bf3..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/tls_wrapper.pb.validate.go +++ /dev/null @@ -1,241 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: cilium/api/tls_wrapper.proto - -package cilium - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on UpstreamTlsWrapperContext with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpstreamTlsWrapperContext) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpstreamTlsWrapperContext with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpstreamTlsWrapperContextMultiError, or nil if none found. -func (m *UpstreamTlsWrapperContext) ValidateAll() error { - return m.validate(true) -} - -func (m *UpstreamTlsWrapperContext) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return UpstreamTlsWrapperContextMultiError(errors) - } - - return nil -} - -// UpstreamTlsWrapperContextMultiError is an error wrapping multiple validation -// errors returned by UpstreamTlsWrapperContext.ValidateAll() if the -// designated constraints aren't met. -type UpstreamTlsWrapperContextMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpstreamTlsWrapperContextMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpstreamTlsWrapperContextMultiError) AllErrors() []error { return m } - -// UpstreamTlsWrapperContextValidationError is the validation error returned by -// UpstreamTlsWrapperContext.Validate if the designated constraints aren't met. -type UpstreamTlsWrapperContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpstreamTlsWrapperContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpstreamTlsWrapperContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpstreamTlsWrapperContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpstreamTlsWrapperContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpstreamTlsWrapperContextValidationError) ErrorName() string { - return "UpstreamTlsWrapperContextValidationError" -} - -// Error satisfies the builtin error interface -func (e UpstreamTlsWrapperContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpstreamTlsWrapperContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpstreamTlsWrapperContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpstreamTlsWrapperContextValidationError{} - -// Validate checks the field values on DownstreamTlsWrapperContext with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DownstreamTlsWrapperContext) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DownstreamTlsWrapperContext with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DownstreamTlsWrapperContextMultiError, or nil if none found. -func (m *DownstreamTlsWrapperContext) ValidateAll() error { - return m.validate(true) -} - -func (m *DownstreamTlsWrapperContext) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return DownstreamTlsWrapperContextMultiError(errors) - } - - return nil -} - -// DownstreamTlsWrapperContextMultiError is an error wrapping multiple -// validation errors returned by DownstreamTlsWrapperContext.ValidateAll() if -// the designated constraints aren't met. -type DownstreamTlsWrapperContextMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DownstreamTlsWrapperContextMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DownstreamTlsWrapperContextMultiError) AllErrors() []error { return m } - -// DownstreamTlsWrapperContextValidationError is the validation error returned -// by DownstreamTlsWrapperContext.Validate if the designated constraints -// aren't met. -type DownstreamTlsWrapperContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DownstreamTlsWrapperContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DownstreamTlsWrapperContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DownstreamTlsWrapperContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DownstreamTlsWrapperContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DownstreamTlsWrapperContextValidationError) ErrorName() string { - return "DownstreamTlsWrapperContextValidationError" -} - -// Error satisfies the builtin error interface -func (e DownstreamTlsWrapperContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDownstreamTlsWrapperContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DownstreamTlsWrapperContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DownstreamTlsWrapperContextValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/websocket.pb.go b/vendor/github.com/cilium/proxy/go/cilium/api/websocket.pb.go deleted file mode 100644 index 9ce27a2f895..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/websocket.pb.go +++ /dev/null @@ -1,411 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: cilium/api/websocket.proto - -package cilium - -import ( - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type WebSocketClient struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path to the unix domain socket for the cilium access log, if any. - AccessLogPath string `protobuf:"bytes,1,opt,name=access_log_path,json=accessLogPath,proto3" json:"access_log_path,omitempty"` - // Host header value, required. - Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` - // Path value. Defaults to "/". - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - // sec-websocket-key value to use, defaults to a random key. - Key string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` - // Websocket version, defaults to "13". - Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` - // Origin header, if any. - Origin string `protobuf:"bytes,6,opt,name=origin,proto3" json:"origin,omitempty"` - // Websocket handshake timeout, default is 5 seconds. - HandshakeTimeout *durationpb.Duration `protobuf:"bytes,7,opt,name=handshake_timeout,json=handshakeTimeout,proto3" json:"handshake_timeout,omitempty"` - // ping interval, default is 0 (disabled). - // Connection is assumed dead if response is not received before the next ping is to be sent. - PingInterval *durationpb.Duration `protobuf:"bytes,8,opt,name=ping_interval,json=pingInterval,proto3" json:"ping_interval,omitempty"` - // ping only on when idle on both directions. - // ping_interval must be non-zero when this is true. - PingWhenIdle bool `protobuf:"varint,9,opt,name=ping_when_idle,json=pingWhenIdle,proto3" json:"ping_when_idle,omitempty"` -} - -func (x *WebSocketClient) Reset() { - *x = WebSocketClient{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_websocket_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WebSocketClient) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WebSocketClient) ProtoMessage() {} - -func (x *WebSocketClient) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_websocket_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WebSocketClient.ProtoReflect.Descriptor instead. -func (*WebSocketClient) Descriptor() ([]byte, []int) { - return file_cilium_api_websocket_proto_rawDescGZIP(), []int{0} -} - -func (x *WebSocketClient) GetAccessLogPath() string { - if x != nil { - return x.AccessLogPath - } - return "" -} - -func (x *WebSocketClient) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *WebSocketClient) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *WebSocketClient) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *WebSocketClient) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *WebSocketClient) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *WebSocketClient) GetHandshakeTimeout() *durationpb.Duration { - if x != nil { - return x.HandshakeTimeout - } - return nil -} - -func (x *WebSocketClient) GetPingInterval() *durationpb.Duration { - if x != nil { - return x.PingInterval - } - return nil -} - -func (x *WebSocketClient) GetPingWhenIdle() bool { - if x != nil { - return x.PingWhenIdle - } - return false -} - -type WebSocketServer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path to the unix domain socket for the cilium access log, if any. - AccessLogPath string `protobuf:"bytes,1,opt,name=access_log_path,json=accessLogPath,proto3" json:"access_log_path,omitempty"` - // Expected host header value, if any. - Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` - // Expected path value, if any. - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - // sec-websocket-key value to expect, if any. - Key string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` - // Websocket version, ignored if omitted. - Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` - // Origin header, if any. Origin header is not allowed if omitted. - Origin string `protobuf:"bytes,6,opt,name=origin,proto3" json:"origin,omitempty"` - // Websocket handshake timeout, default is 5 seconds. - HandshakeTimeout *durationpb.Duration `protobuf:"bytes,7,opt,name=handshake_timeout,json=handshakeTimeout,proto3" json:"handshake_timeout,omitempty"` - // ping interval, default is 0 (disabled). - // Connection is assumed dead if response is not received before the next ping is to be sent. - PingInterval *durationpb.Duration `protobuf:"bytes,8,opt,name=ping_interval,json=pingInterval,proto3" json:"ping_interval,omitempty"` - // ping only on when idle on both directions. - // ping_interval must be non-zero when this is true. - PingWhenIdle bool `protobuf:"varint,9,opt,name=ping_when_idle,json=pingWhenIdle,proto3" json:"ping_when_idle,omitempty"` -} - -func (x *WebSocketServer) Reset() { - *x = WebSocketServer{} - if protoimpl.UnsafeEnabled { - mi := &file_cilium_api_websocket_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WebSocketServer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WebSocketServer) ProtoMessage() {} - -func (x *WebSocketServer) ProtoReflect() protoreflect.Message { - mi := &file_cilium_api_websocket_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WebSocketServer.ProtoReflect.Descriptor instead. -func (*WebSocketServer) Descriptor() ([]byte, []int) { - return file_cilium_api_websocket_proto_rawDescGZIP(), []int{1} -} - -func (x *WebSocketServer) GetAccessLogPath() string { - if x != nil { - return x.AccessLogPath - } - return "" -} - -func (x *WebSocketServer) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *WebSocketServer) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *WebSocketServer) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *WebSocketServer) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *WebSocketServer) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *WebSocketServer) GetHandshakeTimeout() *durationpb.Duration { - if x != nil { - return x.HandshakeTimeout - } - return nil -} - -func (x *WebSocketServer) GetPingInterval() *durationpb.Duration { - if x != nil { - return x.PingInterval - } - return nil -} - -func (x *WebSocketServer) GetPingWhenIdle() bool { - if x != nil { - return x.PingWhenIdle - } - return false -} - -var File_cilium_api_websocket_proto protoreflect.FileDescriptor - -var file_cilium_api_websocket_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x77, 0x65, 0x62, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x69, - 0x6c, 0x69, 0x75, 0x6d, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x02, - 0x0a, 0x0f, 0x57, 0x65, 0x62, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x6f, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x02, - 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x46, - 0x0a, 0x11, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x77, - 0x68, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x70, 0x69, 0x6e, 0x67, 0x57, 0x68, 0x65, 0x6e, 0x49, 0x64, 0x6c, 0x65, 0x22, 0xd3, 0x02, 0x0a, - 0x0f, 0x57, 0x65, 0x62, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x11, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, - 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x68, 0x61, 0x6e, 0x64, - 0x73, 0x68, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3e, 0x0a, 0x0d, - 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, - 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0e, - 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x68, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x70, 0x69, 0x6e, 0x67, 0x57, 0x68, 0x65, 0x6e, 0x49, 0x64, - 0x6c, 0x65, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, - 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x63, 0x69, 0x6c, 0x69, - 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cilium_api_websocket_proto_rawDescOnce sync.Once - file_cilium_api_websocket_proto_rawDescData = file_cilium_api_websocket_proto_rawDesc -) - -func file_cilium_api_websocket_proto_rawDescGZIP() []byte { - file_cilium_api_websocket_proto_rawDescOnce.Do(func() { - file_cilium_api_websocket_proto_rawDescData = protoimpl.X.CompressGZIP(file_cilium_api_websocket_proto_rawDescData) - }) - return file_cilium_api_websocket_proto_rawDescData -} - -var file_cilium_api_websocket_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cilium_api_websocket_proto_goTypes = []interface{}{ - (*WebSocketClient)(nil), // 0: cilium.WebSocketClient - (*WebSocketServer)(nil), // 1: cilium.WebSocketServer - (*durationpb.Duration)(nil), // 2: google.protobuf.Duration -} -var file_cilium_api_websocket_proto_depIdxs = []int32{ - 2, // 0: cilium.WebSocketClient.handshake_timeout:type_name -> google.protobuf.Duration - 2, // 1: cilium.WebSocketClient.ping_interval:type_name -> google.protobuf.Duration - 2, // 2: cilium.WebSocketServer.handshake_timeout:type_name -> google.protobuf.Duration - 2, // 3: cilium.WebSocketServer.ping_interval:type_name -> google.protobuf.Duration - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_cilium_api_websocket_proto_init() } -func file_cilium_api_websocket_proto_init() { - if File_cilium_api_websocket_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cilium_api_websocket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebSocketClient); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cilium_api_websocket_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebSocketServer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cilium_api_websocket_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cilium_api_websocket_proto_goTypes, - DependencyIndexes: file_cilium_api_websocket_proto_depIdxs, - MessageInfos: file_cilium_api_websocket_proto_msgTypes, - }.Build() - File_cilium_api_websocket_proto = out.File - file_cilium_api_websocket_proto_rawDesc = nil - file_cilium_api_websocket_proto_goTypes = nil - file_cilium_api_websocket_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/cilium/api/websocket.pb.validate.go b/vendor/github.com/cilium/proxy/go/cilium/api/websocket.pb.validate.go deleted file mode 100644 index 9f7a8b25cea..00000000000 --- a/vendor/github.com/cilium/proxy/go/cilium/api/websocket.pb.validate.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: cilium/api/websocket.proto - -package cilium - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on WebSocketClient with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *WebSocketClient) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on WebSocketClient with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// WebSocketClientMultiError, or nil if none found. -func (m *WebSocketClient) ValidateAll() error { - return m.validate(true) -} - -func (m *WebSocketClient) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for AccessLogPath - - if utf8.RuneCountInString(m.GetHost()) < 2 { - err := WebSocketClientValidationError{ - field: "Host", - reason: "value length must be at least 2 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Path - - // no validation rules for Key - - // no validation rules for Version - - // no validation rules for Origin - - if all { - switch v := interface{}(m.GetHandshakeTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WebSocketClientValidationError{ - field: "HandshakeTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WebSocketClientValidationError{ - field: "HandshakeTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHandshakeTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WebSocketClientValidationError{ - field: "HandshakeTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPingInterval()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WebSocketClientValidationError{ - field: "PingInterval", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WebSocketClientValidationError{ - field: "PingInterval", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPingInterval()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WebSocketClientValidationError{ - field: "PingInterval", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for PingWhenIdle - - if len(errors) > 0 { - return WebSocketClientMultiError(errors) - } - - return nil -} - -// WebSocketClientMultiError is an error wrapping multiple validation errors -// returned by WebSocketClient.ValidateAll() if the designated constraints -// aren't met. -type WebSocketClientMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m WebSocketClientMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m WebSocketClientMultiError) AllErrors() []error { return m } - -// WebSocketClientValidationError is the validation error returned by -// WebSocketClient.Validate if the designated constraints aren't met. -type WebSocketClientValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e WebSocketClientValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e WebSocketClientValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e WebSocketClientValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e WebSocketClientValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e WebSocketClientValidationError) ErrorName() string { return "WebSocketClientValidationError" } - -// Error satisfies the builtin error interface -func (e WebSocketClientValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sWebSocketClient.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = WebSocketClientValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = WebSocketClientValidationError{} - -// Validate checks the field values on WebSocketServer with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *WebSocketServer) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on WebSocketServer with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// WebSocketServerMultiError, or nil if none found. -func (m *WebSocketServer) ValidateAll() error { - return m.validate(true) -} - -func (m *WebSocketServer) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for AccessLogPath - - // no validation rules for Host - - // no validation rules for Path - - // no validation rules for Key - - // no validation rules for Version - - // no validation rules for Origin - - if all { - switch v := interface{}(m.GetHandshakeTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WebSocketServerValidationError{ - field: "HandshakeTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WebSocketServerValidationError{ - field: "HandshakeTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHandshakeTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WebSocketServerValidationError{ - field: "HandshakeTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPingInterval()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WebSocketServerValidationError{ - field: "PingInterval", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WebSocketServerValidationError{ - field: "PingInterval", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPingInterval()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WebSocketServerValidationError{ - field: "PingInterval", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for PingWhenIdle - - if len(errors) > 0 { - return WebSocketServerMultiError(errors) - } - - return nil -} - -// WebSocketServerMultiError is an error wrapping multiple validation errors -// returned by WebSocketServer.ValidateAll() if the designated constraints -// aren't met. -type WebSocketServerMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m WebSocketServerMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m WebSocketServerMultiError) AllErrors() []error { return m } - -// WebSocketServerValidationError is the validation error returned by -// WebSocketServer.Validate if the designated constraints aren't met. -type WebSocketServerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e WebSocketServerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e WebSocketServerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e WebSocketServerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e WebSocketServerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e WebSocketServerValidationError) ErrorName() string { return "WebSocketServerValidationError" } - -// Error satisfies the builtin error interface -func (e WebSocketServerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sWebSocketServer.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = WebSocketServerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = WebSocketServerValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/annotations/deprecation.pb.go b/vendor/github.com/cilium/proxy/go/envoy/annotations/deprecation.pb.go deleted file mode 100644 index b18b44ba6bc..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/annotations/deprecation.pb.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/annotations/deprecation.proto - -package annotations - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -var file_envoy_annotations_deprecation_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 189503207, - Name: "envoy.annotations.disallowed_by_default", - Tag: "varint,189503207,opt,name=disallowed_by_default", - Filename: "envoy/annotations/deprecation.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 157299826, - Name: "envoy.annotations.deprecated_at_minor_version", - Tag: "bytes,157299826,opt,name=deprecated_at_minor_version", - Filename: "envoy/annotations/deprecation.proto", - }, - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 70100853, - Name: "envoy.annotations.disallowed_by_default_enum", - Tag: "varint,70100853,opt,name=disallowed_by_default_enum", - Filename: "envoy/annotations/deprecation.proto", - }, - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*string)(nil), - Field: 181198657, - Name: "envoy.annotations.deprecated_at_minor_version_enum", - Tag: "bytes,181198657,opt,name=deprecated_at_minor_version_enum", - Filename: "envoy/annotations/deprecation.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // optional bool disallowed_by_default = 189503207; - E_DisallowedByDefault = &file_envoy_annotations_deprecation_proto_extTypes[0] - // The API major and minor version on which the field was deprecated - // (e.g., "3.5" for major version 3 and minor version 5). - // - // optional string deprecated_at_minor_version = 157299826; - E_DeprecatedAtMinorVersion = &file_envoy_annotations_deprecation_proto_extTypes[1] -) - -// Extension fields to descriptorpb.EnumValueOptions. -var ( - // optional bool disallowed_by_default_enum = 70100853; - E_DisallowedByDefaultEnum = &file_envoy_annotations_deprecation_proto_extTypes[2] - // The API major and minor version on which the enum value was deprecated - // (e.g., "3.5" for major version 3 and minor version 5). - // - // optional string deprecated_at_minor_version_enum = 181198657; - E_DeprecatedAtMinorVersionEnum = &file_envoy_annotations_deprecation_proto_extTypes[3] -) - -var File_envoy_annotations_deprecation_proto protoreflect.FileDescriptor - -var file_envoy_annotations_deprecation_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x54, 0x0a, 0x15, 0x64, 0x69, - 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0xe7, 0xad, 0xae, 0x5a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x3a, 0x5f, 0x0a, 0x1b, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xf2, - 0xe8, 0x80, 0x4b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x69, 0x6e, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x3a, 0x61, 0x0a, 0x1a, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, - 0x62, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x12, - 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0xf5, 0xce, 0xb6, 0x21, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x64, 0x69, 0x73, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x6c, 0x0a, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc1, 0xbe, 0xb3, 0x56, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x4d, 0x69, 0x6e, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, - 0x75, 0x6d, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_envoy_annotations_deprecation_proto_goTypes = []interface{}{ - (*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions - (*descriptorpb.EnumValueOptions)(nil), // 1: google.protobuf.EnumValueOptions -} -var file_envoy_annotations_deprecation_proto_depIdxs = []int32{ - 0, // 0: envoy.annotations.disallowed_by_default:extendee -> google.protobuf.FieldOptions - 0, // 1: envoy.annotations.deprecated_at_minor_version:extendee -> google.protobuf.FieldOptions - 1, // 2: envoy.annotations.disallowed_by_default_enum:extendee -> google.protobuf.EnumValueOptions - 1, // 3: envoy.annotations.deprecated_at_minor_version_enum:extendee -> google.protobuf.EnumValueOptions - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 0, // [0:4] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_annotations_deprecation_proto_init() } -func file_envoy_annotations_deprecation_proto_init() { - if File_envoy_annotations_deprecation_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_annotations_deprecation_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 4, - NumServices: 0, - }, - GoTypes: file_envoy_annotations_deprecation_proto_goTypes, - DependencyIndexes: file_envoy_annotations_deprecation_proto_depIdxs, - ExtensionInfos: file_envoy_annotations_deprecation_proto_extTypes, - }.Build() - File_envoy_annotations_deprecation_proto = out.File - file_envoy_annotations_deprecation_proto_rawDesc = nil - file_envoy_annotations_deprecation_proto_goTypes = nil - file_envoy_annotations_deprecation_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/annotations/deprecation.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/annotations/deprecation.pb.validate.go deleted file mode 100644 index 2452fcdd6ed..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/annotations/deprecation.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/annotations/deprecation.proto - -package annotations - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/vendor/github.com/cilium/proxy/go/envoy/annotations/resource.pb.go b/vendor/github.com/cilium/proxy/go/envoy/annotations/resource.pb.go deleted file mode 100644 index 5b42ed96a5e..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/annotations/resource.pb.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/annotations/resource.proto - -package annotations - -import ( - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type ResourceAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Annotation for xDS services that indicates the fully-qualified Protobuf type for the resource - // type. - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` -} - -func (x *ResourceAnnotation) Reset() { - *x = ResourceAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_annotations_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceAnnotation) ProtoMessage() {} - -func (x *ResourceAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_envoy_annotations_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceAnnotation.ProtoReflect.Descriptor instead. -func (*ResourceAnnotation) Descriptor() ([]byte, []int) { - return file_envoy_annotations_resource_proto_rawDescGZIP(), []int{0} -} - -func (x *ResourceAnnotation) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -var file_envoy_annotations_resource_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.ServiceOptions)(nil), - ExtensionType: (*ResourceAnnotation)(nil), - Field: 265073217, - Name: "envoy.annotations.resource", - Tag: "bytes,265073217,opt,name=resource", - Filename: "envoy/annotations/resource.proto", - }, -} - -// Extension fields to descriptorpb.ServiceOptions. -var ( - // optional envoy.annotations.ResourceAnnotation resource = 265073217; - E_Resource = &file_envoy_annotations_resource_proto_extTypes[0] -) - -var File_envoy_annotations_resource_proto protoreflect.FileDescriptor - -var file_envoy_annotations_resource_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x11, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x3a, 0x65, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc1, - 0xe4, 0xb2, 0x7e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, - 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_annotations_resource_proto_rawDescOnce sync.Once - file_envoy_annotations_resource_proto_rawDescData = file_envoy_annotations_resource_proto_rawDesc -) - -func file_envoy_annotations_resource_proto_rawDescGZIP() []byte { - file_envoy_annotations_resource_proto_rawDescOnce.Do(func() { - file_envoy_annotations_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_annotations_resource_proto_rawDescData) - }) - return file_envoy_annotations_resource_proto_rawDescData -} - -var file_envoy_annotations_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_annotations_resource_proto_goTypes = []interface{}{ - (*ResourceAnnotation)(nil), // 0: envoy.annotations.ResourceAnnotation - (*descriptorpb.ServiceOptions)(nil), // 1: google.protobuf.ServiceOptions -} -var file_envoy_annotations_resource_proto_depIdxs = []int32{ - 1, // 0: envoy.annotations.resource:extendee -> google.protobuf.ServiceOptions - 0, // 1: envoy.annotations.resource:type_name -> envoy.annotations.ResourceAnnotation - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 1, // [1:2] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_annotations_resource_proto_init() } -func file_envoy_annotations_resource_proto_init() { - if File_envoy_annotations_resource_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_annotations_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_annotations_resource_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_envoy_annotations_resource_proto_goTypes, - DependencyIndexes: file_envoy_annotations_resource_proto_depIdxs, - MessageInfos: file_envoy_annotations_resource_proto_msgTypes, - ExtensionInfos: file_envoy_annotations_resource_proto_extTypes, - }.Build() - File_envoy_annotations_resource_proto = out.File - file_envoy_annotations_resource_proto_rawDesc = nil - file_envoy_annotations_resource_proto_goTypes = nil - file_envoy_annotations_resource_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/annotations/resource.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/annotations/resource.pb.validate.go deleted file mode 100644 index 05dc7896820..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/annotations/resource.pb.validate.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/annotations/resource.proto - -package annotations - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ResourceAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ResourceAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ResourceAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ResourceAnnotationMultiError, or nil if none found. -func (m *ResourceAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *ResourceAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Type - - if len(errors) > 0 { - return ResourceAnnotationMultiError(errors) - } - - return nil -} - -// ResourceAnnotationMultiError is an error wrapping multiple validation errors -// returned by ResourceAnnotation.ValidateAll() if the designated constraints -// aren't met. -type ResourceAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResourceAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResourceAnnotationMultiError) AllErrors() []error { return m } - -// ResourceAnnotationValidationError is the validation error returned by -// ResourceAnnotation.Validate if the designated constraints aren't met. -type ResourceAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourceAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourceAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourceAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourceAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourceAnnotationValidationError) ErrorName() string { - return "ResourceAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e ResourceAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResourceAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourceAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourceAnnotationValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/address.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/address.pb.go deleted file mode 100644 index 5bbf74f97f5..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/address.pb.go +++ /dev/null @@ -1,1095 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/address.proto - -package corev3 - -import ( - _ "github.com/cilium/proxy/go/envoy/annotations" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type SocketAddress_Protocol int32 - -const ( - SocketAddress_TCP SocketAddress_Protocol = 0 - SocketAddress_UDP SocketAddress_Protocol = 1 -) - -// Enum value maps for SocketAddress_Protocol. -var ( - SocketAddress_Protocol_name = map[int32]string{ - 0: "TCP", - 1: "UDP", - } - SocketAddress_Protocol_value = map[string]int32{ - "TCP": 0, - "UDP": 1, - } -) - -func (x SocketAddress_Protocol) Enum() *SocketAddress_Protocol { - p := new(SocketAddress_Protocol) - *p = x - return p -} - -func (x SocketAddress_Protocol) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SocketAddress_Protocol) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_address_proto_enumTypes[0].Descriptor() -} - -func (SocketAddress_Protocol) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_address_proto_enumTypes[0] -} - -func (x SocketAddress_Protocol) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SocketAddress_Protocol.Descriptor instead. -func (SocketAddress_Protocol) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_address_proto_rawDescGZIP(), []int{2, 0} -} - -type Pipe struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Unix Domain Socket path. On Linux, paths starting with '@' will use the - // abstract namespace. The starting '@' is replaced by a null byte by Envoy. - // Paths starting with '@' will result in an error in environments other than - // Linux. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // The mode for the Pipe. Not applicable for abstract sockets. - Mode uint32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"` -} - -func (x *Pipe) Reset() { - *x = Pipe{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Pipe) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Pipe) ProtoMessage() {} - -func (x *Pipe) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Pipe.ProtoReflect.Descriptor instead. -func (*Pipe) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_address_proto_rawDescGZIP(), []int{0} -} - -func (x *Pipe) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *Pipe) GetMode() uint32 { - if x != nil { - return x.Mode - } - return 0 -} - -// The address represents an envoy internal listener. -// [#comment: TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30.] -type EnvoyInternalAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to AddressNameSpecifier: - // - // *EnvoyInternalAddress_ServerListenerName - AddressNameSpecifier isEnvoyInternalAddress_AddressNameSpecifier `protobuf_oneof:"address_name_specifier"` - // Specifies an endpoint identifier to distinguish between multiple endpoints for the same internal listener in a - // single upstream pool. Only used in the upstream addresses for tracking changes to individual endpoints. This, for - // example, may be set to the final destination IP for the target internal listener. - EndpointId string `protobuf:"bytes,2,opt,name=endpoint_id,json=endpointId,proto3" json:"endpoint_id,omitempty"` -} - -func (x *EnvoyInternalAddress) Reset() { - *x = EnvoyInternalAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnvoyInternalAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnvoyInternalAddress) ProtoMessage() {} - -func (x *EnvoyInternalAddress) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnvoyInternalAddress.ProtoReflect.Descriptor instead. -func (*EnvoyInternalAddress) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_address_proto_rawDescGZIP(), []int{1} -} - -func (m *EnvoyInternalAddress) GetAddressNameSpecifier() isEnvoyInternalAddress_AddressNameSpecifier { - if m != nil { - return m.AddressNameSpecifier - } - return nil -} - -func (x *EnvoyInternalAddress) GetServerListenerName() string { - if x, ok := x.GetAddressNameSpecifier().(*EnvoyInternalAddress_ServerListenerName); ok { - return x.ServerListenerName - } - return "" -} - -func (x *EnvoyInternalAddress) GetEndpointId() string { - if x != nil { - return x.EndpointId - } - return "" -} - -type isEnvoyInternalAddress_AddressNameSpecifier interface { - isEnvoyInternalAddress_AddressNameSpecifier() -} - -type EnvoyInternalAddress_ServerListenerName struct { - // Specifies the :ref:`name ` of the - // internal listener. - ServerListenerName string `protobuf:"bytes,1,opt,name=server_listener_name,json=serverListenerName,proto3,oneof"` -} - -func (*EnvoyInternalAddress_ServerListenerName) isEnvoyInternalAddress_AddressNameSpecifier() {} - -// [#next-free-field: 7] -type SocketAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Protocol SocketAddress_Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=envoy.config.core.v3.SocketAddress_Protocol" json:"protocol,omitempty"` - // The address for this socket. :ref:`Listeners ` will bind - // to the address. An empty address is not allowed. Specify “0.0.0.0“ or “::“ - // to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: - // It is possible to distinguish a Listener address via the prefix/suffix matching - // in :ref:`FilterChainMatch `.] When used - // within an upstream :ref:`BindConfig `, the address - // controls the source address of outbound connections. For :ref:`clusters - // `, the cluster type determines whether the - // address must be an IP (“STATIC“ or “EDS“ clusters) or a hostname resolved by DNS - // (“STRICT_DNS“ or “LOGICAL_DNS“ clusters). Address resolution can be customized - // via :ref:`resolver_name `. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // Types that are assignable to PortSpecifier: - // - // *SocketAddress_PortValue - // *SocketAddress_NamedPort - PortSpecifier isSocketAddress_PortSpecifier `protobuf_oneof:"port_specifier"` - // The name of the custom resolver. This must have been registered with Envoy. If - // this is empty, a context dependent default applies. If the address is a concrete - // IP address, no resolution will occur. If address is a hostname this - // should be set for resolution other than DNS. Specifying a custom resolver with - // “STRICT_DNS“ or “LOGICAL_DNS“ will generate an error at runtime. - ResolverName string `protobuf:"bytes,5,opt,name=resolver_name,json=resolverName,proto3" json:"resolver_name,omitempty"` - // When binding to an IPv6 address above, this enables `IPv4 compatibility - // `_. Binding to “::“ will - // allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into - // IPv6 space as “::FFFF:“. - Ipv4Compat bool `protobuf:"varint,6,opt,name=ipv4_compat,json=ipv4Compat,proto3" json:"ipv4_compat,omitempty"` -} - -func (x *SocketAddress) Reset() { - *x = SocketAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SocketAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SocketAddress) ProtoMessage() {} - -func (x *SocketAddress) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SocketAddress.ProtoReflect.Descriptor instead. -func (*SocketAddress) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_address_proto_rawDescGZIP(), []int{2} -} - -func (x *SocketAddress) GetProtocol() SocketAddress_Protocol { - if x != nil { - return x.Protocol - } - return SocketAddress_TCP -} - -func (x *SocketAddress) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (m *SocketAddress) GetPortSpecifier() isSocketAddress_PortSpecifier { - if m != nil { - return m.PortSpecifier - } - return nil -} - -func (x *SocketAddress) GetPortValue() uint32 { - if x, ok := x.GetPortSpecifier().(*SocketAddress_PortValue); ok { - return x.PortValue - } - return 0 -} - -func (x *SocketAddress) GetNamedPort() string { - if x, ok := x.GetPortSpecifier().(*SocketAddress_NamedPort); ok { - return x.NamedPort - } - return "" -} - -func (x *SocketAddress) GetResolverName() string { - if x != nil { - return x.ResolverName - } - return "" -} - -func (x *SocketAddress) GetIpv4Compat() bool { - if x != nil { - return x.Ipv4Compat - } - return false -} - -type isSocketAddress_PortSpecifier interface { - isSocketAddress_PortSpecifier() -} - -type SocketAddress_PortValue struct { - PortValue uint32 `protobuf:"varint,3,opt,name=port_value,json=portValue,proto3,oneof"` -} - -type SocketAddress_NamedPort struct { - // This is only valid if :ref:`resolver_name - // ` is specified below and the - // named resolver is capable of named port resolution. - NamedPort string `protobuf:"bytes,4,opt,name=named_port,json=namedPort,proto3,oneof"` -} - -func (*SocketAddress_PortValue) isSocketAddress_PortSpecifier() {} - -func (*SocketAddress_NamedPort) isSocketAddress_PortSpecifier() {} - -type TcpKeepalive struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Maximum number of keepalive probes to send without response before deciding - // the connection is dead. Default is to use the OS level configuration (unless - // overridden, Linux defaults to 9.) - KeepaliveProbes *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=keepalive_probes,json=keepaliveProbes,proto3" json:"keepalive_probes,omitempty"` - // The number of seconds a connection needs to be idle before keep-alive probes - // start being sent. Default is to use the OS level configuration (unless - // overridden, Linux defaults to 7200s (i.e., 2 hours.) - KeepaliveTime *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=keepalive_time,json=keepaliveTime,proto3" json:"keepalive_time,omitempty"` - // The number of seconds between keep-alive probes. Default is to use the OS - // level configuration (unless overridden, Linux defaults to 75s.) - KeepaliveInterval *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=keepalive_interval,json=keepaliveInterval,proto3" json:"keepalive_interval,omitempty"` -} - -func (x *TcpKeepalive) Reset() { - *x = TcpKeepalive{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TcpKeepalive) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TcpKeepalive) ProtoMessage() {} - -func (x *TcpKeepalive) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TcpKeepalive.ProtoReflect.Descriptor instead. -func (*TcpKeepalive) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_address_proto_rawDescGZIP(), []int{3} -} - -func (x *TcpKeepalive) GetKeepaliveProbes() *wrapperspb.UInt32Value { - if x != nil { - return x.KeepaliveProbes - } - return nil -} - -func (x *TcpKeepalive) GetKeepaliveTime() *wrapperspb.UInt32Value { - if x != nil { - return x.KeepaliveTime - } - return nil -} - -func (x *TcpKeepalive) GetKeepaliveInterval() *wrapperspb.UInt32Value { - if x != nil { - return x.KeepaliveInterval - } - return nil -} - -type ExtraSourceAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The additional address to bind. - Address *SocketAddress `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. If specified, this will override the - // :ref:`socket_options ` - // in the BindConfig. If specified with no - // :ref:`socket_options ` - // or an empty list of :ref:`socket_options `, - // it means no socket option will apply. - SocketOptions *SocketOptionsOverride `protobuf:"bytes,2,opt,name=socket_options,json=socketOptions,proto3" json:"socket_options,omitempty"` -} - -func (x *ExtraSourceAddress) Reset() { - *x = ExtraSourceAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtraSourceAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtraSourceAddress) ProtoMessage() {} - -func (x *ExtraSourceAddress) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtraSourceAddress.ProtoReflect.Descriptor instead. -func (*ExtraSourceAddress) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_address_proto_rawDescGZIP(), []int{4} -} - -func (x *ExtraSourceAddress) GetAddress() *SocketAddress { - if x != nil { - return x.Address - } - return nil -} - -func (x *ExtraSourceAddress) GetSocketOptions() *SocketOptionsOverride { - if x != nil { - return x.SocketOptions - } - return nil -} - -// [#next-free-field: 6] -type BindConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address to bind to when creating a socket. - SourceAddress *SocketAddress `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` - // Whether to set the “IP_FREEBIND“ option when creating the socket. When this - // flag is set to true, allows the :ref:`source_address - // ` to be an IP address - // that is not configured on the system running Envoy. When this flag is set - // to false, the option “IP_FREEBIND“ is disabled on the socket. When this - // flag is not set (default), the socket is not modified, i.e. the option is - // neither enabled nor disabled. - Freebind *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=freebind,proto3" json:"freebind,omitempty"` - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - SocketOptions []*SocketOption `protobuf:"bytes,3,rep,name=socket_options,json=socketOptions,proto3" json:"socket_options,omitempty"` - // Extra source addresses appended to the address specified in the `source_address` - // field. This enables to specify multiple source addresses. Currently, only one extra - // address can be supported, and the extra address should have a different IP version - // with the address in the `source_address` field. The address which has the same IP - // version with the target host's address IP version will be used as bind address. If more - // than one extra address specified, only the first address matched IP version will be - // returned. If there is no same IP version address found, the address in the `source_address` - // will be returned. - ExtraSourceAddresses []*ExtraSourceAddress `protobuf:"bytes,5,rep,name=extra_source_addresses,json=extraSourceAddresses,proto3" json:"extra_source_addresses,omitempty"` - // Deprecated by - // :ref:`extra_source_addresses ` - // - // Deprecated: Do not use. - AdditionalSourceAddresses []*SocketAddress `protobuf:"bytes,4,rep,name=additional_source_addresses,json=additionalSourceAddresses,proto3" json:"additional_source_addresses,omitempty"` -} - -func (x *BindConfig) Reset() { - *x = BindConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BindConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BindConfig) ProtoMessage() {} - -func (x *BindConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BindConfig.ProtoReflect.Descriptor instead. -func (*BindConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_address_proto_rawDescGZIP(), []int{5} -} - -func (x *BindConfig) GetSourceAddress() *SocketAddress { - if x != nil { - return x.SourceAddress - } - return nil -} - -func (x *BindConfig) GetFreebind() *wrapperspb.BoolValue { - if x != nil { - return x.Freebind - } - return nil -} - -func (x *BindConfig) GetSocketOptions() []*SocketOption { - if x != nil { - return x.SocketOptions - } - return nil -} - -func (x *BindConfig) GetExtraSourceAddresses() []*ExtraSourceAddress { - if x != nil { - return x.ExtraSourceAddresses - } - return nil -} - -// Deprecated: Do not use. -func (x *BindConfig) GetAdditionalSourceAddresses() []*SocketAddress { - if x != nil { - return x.AdditionalSourceAddresses - } - return nil -} - -// Addresses specify either a logical or physical address and port, which are -// used to tell Envoy where to bind/listen, connect to upstream and find -// management servers. -type Address struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Address: - // - // *Address_SocketAddress - // *Address_Pipe - // *Address_EnvoyInternalAddress - Address isAddress_Address `protobuf_oneof:"address"` -} - -func (x *Address) Reset() { - *x = Address{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Address) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Address) ProtoMessage() {} - -func (x *Address) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Address.ProtoReflect.Descriptor instead. -func (*Address) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_address_proto_rawDescGZIP(), []int{6} -} - -func (m *Address) GetAddress() isAddress_Address { - if m != nil { - return m.Address - } - return nil -} - -func (x *Address) GetSocketAddress() *SocketAddress { - if x, ok := x.GetAddress().(*Address_SocketAddress); ok { - return x.SocketAddress - } - return nil -} - -func (x *Address) GetPipe() *Pipe { - if x, ok := x.GetAddress().(*Address_Pipe); ok { - return x.Pipe - } - return nil -} - -func (x *Address) GetEnvoyInternalAddress() *EnvoyInternalAddress { - if x, ok := x.GetAddress().(*Address_EnvoyInternalAddress); ok { - return x.EnvoyInternalAddress - } - return nil -} - -type isAddress_Address interface { - isAddress_Address() -} - -type Address_SocketAddress struct { - SocketAddress *SocketAddress `protobuf:"bytes,1,opt,name=socket_address,json=socketAddress,proto3,oneof"` -} - -type Address_Pipe struct { - Pipe *Pipe `protobuf:"bytes,2,opt,name=pipe,proto3,oneof"` -} - -type Address_EnvoyInternalAddress struct { - // Specifies a user-space address handled by :ref:`internal listeners - // `. - EnvoyInternalAddress *EnvoyInternalAddress `protobuf:"bytes,3,opt,name=envoy_internal_address,json=envoyInternalAddress,proto3,oneof"` -} - -func (*Address_SocketAddress) isAddress_Address() {} - -func (*Address_Pipe) isAddress_Address() {} - -func (*Address_EnvoyInternalAddress) isAddress_Address() {} - -// CidrRange specifies an IP Address and a prefix length to construct -// the subnet mask for a `CIDR `_ range. -type CidrRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // IPv4 or IPv6 address, e.g. “192.0.0.0“ or “2001:db8::“. - AddressPrefix string `protobuf:"bytes,1,opt,name=address_prefix,json=addressPrefix,proto3" json:"address_prefix,omitempty"` - // Length of prefix, e.g. 0, 32. Defaults to 0 when unset. - PrefixLen *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` -} - -func (x *CidrRange) Reset() { - *x = CidrRange{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CidrRange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CidrRange) ProtoMessage() {} - -func (x *CidrRange) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_address_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CidrRange.ProtoReflect.Descriptor instead. -func (*CidrRange) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_address_proto_rawDescGZIP(), []int{7} -} - -func (x *CidrRange) GetAddressPrefix() string { - if x != nil { - return x.AddressPrefix - } - return "" -} - -func (x *CidrRange) GetPrefixLen() *wrapperspb.UInt32Value { - if x != nil { - return x.PrefixLen - } - return nil -} - -var File_envoy_config_core_v3_address_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_address_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, - 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x04, 0x50, 0x69, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x04, 0x6d, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x18, 0xff, - 0x03, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x3a, 0x1d, 0x9a, 0xc5, 0x88, 0x1e, 0x18, 0x0a, 0x16, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x14, 0x45, 0x6e, 0x76, 0x6f, 0x79, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x32, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x12, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x49, 0x64, 0x42, 0x1d, 0x0a, 0x16, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x22, 0xf6, 0x02, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x52, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x21, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, 0x0a, 0x0a, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0xff, 0xff, 0x03, 0x48, 0x00, 0x52, 0x09, 0x70, - 0x6f, 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, - 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, - 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x70, 0x76, 0x34, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x22, - 0x1c, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x07, 0x0a, 0x03, 0x54, - 0x43, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x01, 0x3a, 0x26, 0x9a, - 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x15, 0x0a, 0x0e, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x90, 0x02, 0x0a, - 0x0c, 0x54, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x12, 0x47, 0x0a, - 0x10, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, - 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0e, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, - 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x6b, 0x65, - 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x12, 0x6b, - 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, - 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x54, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x22, - 0xb1, 0x01, 0x0a, 0x12, 0x45, 0x78, 0x74, 0x72, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x52, 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0xd2, 0x03, 0x0a, 0x0a, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x4a, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, - 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x36, - 0x0a, 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x66, 0x72, - 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x12, 0x49, 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x5e, 0x0a, 0x16, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x14, 0x65, 0x78, 0x74, - 0x72, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x12, 0x70, 0x0a, 0x1b, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0b, 0x18, 0x01, 0x92, - 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x19, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x65, 0x73, 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, - 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x9f, 0x02, 0x0a, 0x07, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x30, 0x0a, 0x04, 0x70, 0x69, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, - 0x70, 0x69, 0x70, 0x65, 0x12, 0x62, 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x48, 0x00, 0x52, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x20, 0x9a, 0xc5, 0x88, 0x1e, 0x1b, 0x0a, - 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x0e, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xa6, 0x01, 0x0a, 0x09, 0x43, - 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, - 0x03, 0x18, 0x80, 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x3a, - 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x42, 0x80, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, - 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_address_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_address_proto_rawDescData = file_envoy_config_core_v3_address_proto_rawDesc -) - -func file_envoy_config_core_v3_address_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_address_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_address_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_address_proto_rawDescData) - }) - return file_envoy_config_core_v3_address_proto_rawDescData -} - -var file_envoy_config_core_v3_address_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v3_address_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_envoy_config_core_v3_address_proto_goTypes = []interface{}{ - (SocketAddress_Protocol)(0), // 0: envoy.config.core.v3.SocketAddress.Protocol - (*Pipe)(nil), // 1: envoy.config.core.v3.Pipe - (*EnvoyInternalAddress)(nil), // 2: envoy.config.core.v3.EnvoyInternalAddress - (*SocketAddress)(nil), // 3: envoy.config.core.v3.SocketAddress - (*TcpKeepalive)(nil), // 4: envoy.config.core.v3.TcpKeepalive - (*ExtraSourceAddress)(nil), // 5: envoy.config.core.v3.ExtraSourceAddress - (*BindConfig)(nil), // 6: envoy.config.core.v3.BindConfig - (*Address)(nil), // 7: envoy.config.core.v3.Address - (*CidrRange)(nil), // 8: envoy.config.core.v3.CidrRange - (*wrapperspb.UInt32Value)(nil), // 9: google.protobuf.UInt32Value - (*SocketOptionsOverride)(nil), // 10: envoy.config.core.v3.SocketOptionsOverride - (*wrapperspb.BoolValue)(nil), // 11: google.protobuf.BoolValue - (*SocketOption)(nil), // 12: envoy.config.core.v3.SocketOption -} -var file_envoy_config_core_v3_address_proto_depIdxs = []int32{ - 0, // 0: envoy.config.core.v3.SocketAddress.protocol:type_name -> envoy.config.core.v3.SocketAddress.Protocol - 9, // 1: envoy.config.core.v3.TcpKeepalive.keepalive_probes:type_name -> google.protobuf.UInt32Value - 9, // 2: envoy.config.core.v3.TcpKeepalive.keepalive_time:type_name -> google.protobuf.UInt32Value - 9, // 3: envoy.config.core.v3.TcpKeepalive.keepalive_interval:type_name -> google.protobuf.UInt32Value - 3, // 4: envoy.config.core.v3.ExtraSourceAddress.address:type_name -> envoy.config.core.v3.SocketAddress - 10, // 5: envoy.config.core.v3.ExtraSourceAddress.socket_options:type_name -> envoy.config.core.v3.SocketOptionsOverride - 3, // 6: envoy.config.core.v3.BindConfig.source_address:type_name -> envoy.config.core.v3.SocketAddress - 11, // 7: envoy.config.core.v3.BindConfig.freebind:type_name -> google.protobuf.BoolValue - 12, // 8: envoy.config.core.v3.BindConfig.socket_options:type_name -> envoy.config.core.v3.SocketOption - 5, // 9: envoy.config.core.v3.BindConfig.extra_source_addresses:type_name -> envoy.config.core.v3.ExtraSourceAddress - 3, // 10: envoy.config.core.v3.BindConfig.additional_source_addresses:type_name -> envoy.config.core.v3.SocketAddress - 3, // 11: envoy.config.core.v3.Address.socket_address:type_name -> envoy.config.core.v3.SocketAddress - 1, // 12: envoy.config.core.v3.Address.pipe:type_name -> envoy.config.core.v3.Pipe - 2, // 13: envoy.config.core.v3.Address.envoy_internal_address:type_name -> envoy.config.core.v3.EnvoyInternalAddress - 9, // 14: envoy.config.core.v3.CidrRange.prefix_len:type_name -> google.protobuf.UInt32Value - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_address_proto_init() } -func file_envoy_config_core_v3_address_proto_init() { - if File_envoy_config_core_v3_address_proto != nil { - return - } - file_envoy_config_core_v3_socket_option_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pipe); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_address_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnvoyInternalAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_address_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SocketAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_address_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TcpKeepalive); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_address_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtraSourceAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_address_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BindConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_address_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Address); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_address_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CidrRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v3_address_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*EnvoyInternalAddress_ServerListenerName)(nil), - } - file_envoy_config_core_v3_address_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*SocketAddress_PortValue)(nil), - (*SocketAddress_NamedPort)(nil), - } - file_envoy_config_core_v3_address_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*Address_SocketAddress)(nil), - (*Address_Pipe)(nil), - (*Address_EnvoyInternalAddress)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_address_proto_rawDesc, - NumEnums: 1, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_address_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_address_proto_depIdxs, - EnumInfos: file_envoy_config_core_v3_address_proto_enumTypes, - MessageInfos: file_envoy_config_core_v3_address_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_address_proto = out.File - file_envoy_config_core_v3_address_proto_rawDesc = nil - file_envoy_config_core_v3_address_proto_goTypes = nil - file_envoy_config_core_v3_address_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/address.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/address.pb.validate.go deleted file mode 100644 index 25610ab041a..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/address.pb.validate.go +++ /dev/null @@ -1,1449 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/address.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Pipe with the rules defined in the proto -// definition for this message. If any rules are violated, the first error -// encountered is returned, or nil if there are no violations. -func (m *Pipe) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Pipe with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in PipeMultiError, or nil if none found. -func (m *Pipe) ValidateAll() error { - return m.validate(true) -} - -func (m *Pipe) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetPath()) < 1 { - err := PipeValidationError{ - field: "Path", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetMode() > 511 { - err := PipeValidationError{ - field: "Mode", - reason: "value must be less than or equal to 511", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return PipeMultiError(errors) - } - - return nil -} - -// PipeMultiError is an error wrapping multiple validation errors returned by -// Pipe.ValidateAll() if the designated constraints aren't met. -type PipeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PipeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PipeMultiError) AllErrors() []error { return m } - -// PipeValidationError is the validation error returned by Pipe.Validate if the -// designated constraints aren't met. -type PipeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PipeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PipeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PipeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PipeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PipeValidationError) ErrorName() string { return "PipeValidationError" } - -// Error satisfies the builtin error interface -func (e PipeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPipe.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PipeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PipeValidationError{} - -// Validate checks the field values on EnvoyInternalAddress with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *EnvoyInternalAddress) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on EnvoyInternalAddress with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// EnvoyInternalAddressMultiError, or nil if none found. -func (m *EnvoyInternalAddress) ValidateAll() error { - return m.validate(true) -} - -func (m *EnvoyInternalAddress) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for EndpointId - - oneofAddressNameSpecifierPresent := false - switch v := m.AddressNameSpecifier.(type) { - case *EnvoyInternalAddress_ServerListenerName: - if v == nil { - err := EnvoyInternalAddressValidationError{ - field: "AddressNameSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofAddressNameSpecifierPresent = true - // no validation rules for ServerListenerName - default: - _ = v // ensures v is used - } - if !oneofAddressNameSpecifierPresent { - err := EnvoyInternalAddressValidationError{ - field: "AddressNameSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return EnvoyInternalAddressMultiError(errors) - } - - return nil -} - -// EnvoyInternalAddressMultiError is an error wrapping multiple validation -// errors returned by EnvoyInternalAddress.ValidateAll() if the designated -// constraints aren't met. -type EnvoyInternalAddressMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m EnvoyInternalAddressMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m EnvoyInternalAddressMultiError) AllErrors() []error { return m } - -// EnvoyInternalAddressValidationError is the validation error returned by -// EnvoyInternalAddress.Validate if the designated constraints aren't met. -type EnvoyInternalAddressValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EnvoyInternalAddressValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EnvoyInternalAddressValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EnvoyInternalAddressValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EnvoyInternalAddressValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EnvoyInternalAddressValidationError) ErrorName() string { - return "EnvoyInternalAddressValidationError" -} - -// Error satisfies the builtin error interface -func (e EnvoyInternalAddressValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEnvoyInternalAddress.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EnvoyInternalAddressValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EnvoyInternalAddressValidationError{} - -// Validate checks the field values on SocketAddress with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *SocketAddress) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SocketAddress with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SocketAddressMultiError, or -// nil if none found. -func (m *SocketAddress) ValidateAll() error { - return m.validate(true) -} - -func (m *SocketAddress) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := SocketAddress_Protocol_name[int32(m.GetProtocol())]; !ok { - err := SocketAddressValidationError{ - field: "Protocol", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetAddress()) < 1 { - err := SocketAddressValidationError{ - field: "Address", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for ResolverName - - // no validation rules for Ipv4Compat - - oneofPortSpecifierPresent := false - switch v := m.PortSpecifier.(type) { - case *SocketAddress_PortValue: - if v == nil { - err := SocketAddressValidationError{ - field: "PortSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPortSpecifierPresent = true - - if m.GetPortValue() > 65535 { - err := SocketAddressValidationError{ - field: "PortValue", - reason: "value must be less than or equal to 65535", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *SocketAddress_NamedPort: - if v == nil { - err := SocketAddressValidationError{ - field: "PortSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPortSpecifierPresent = true - // no validation rules for NamedPort - default: - _ = v // ensures v is used - } - if !oneofPortSpecifierPresent { - err := SocketAddressValidationError{ - field: "PortSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return SocketAddressMultiError(errors) - } - - return nil -} - -// SocketAddressMultiError is an error wrapping multiple validation errors -// returned by SocketAddress.ValidateAll() if the designated constraints -// aren't met. -type SocketAddressMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SocketAddressMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SocketAddressMultiError) AllErrors() []error { return m } - -// SocketAddressValidationError is the validation error returned by -// SocketAddress.Validate if the designated constraints aren't met. -type SocketAddressValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SocketAddressValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SocketAddressValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SocketAddressValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SocketAddressValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SocketAddressValidationError) ErrorName() string { return "SocketAddressValidationError" } - -// Error satisfies the builtin error interface -func (e SocketAddressValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSocketAddress.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SocketAddressValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SocketAddressValidationError{} - -// Validate checks the field values on TcpKeepalive with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *TcpKeepalive) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TcpKeepalive with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in TcpKeepaliveMultiError, or -// nil if none found. -func (m *TcpKeepalive) ValidateAll() error { - return m.validate(true) -} - -func (m *TcpKeepalive) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetKeepaliveProbes()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TcpKeepaliveValidationError{ - field: "KeepaliveProbes", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TcpKeepaliveValidationError{ - field: "KeepaliveProbes", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKeepaliveProbes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TcpKeepaliveValidationError{ - field: "KeepaliveProbes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetKeepaliveTime()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TcpKeepaliveValidationError{ - field: "KeepaliveTime", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TcpKeepaliveValidationError{ - field: "KeepaliveTime", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKeepaliveTime()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TcpKeepaliveValidationError{ - field: "KeepaliveTime", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetKeepaliveInterval()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TcpKeepaliveValidationError{ - field: "KeepaliveInterval", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TcpKeepaliveValidationError{ - field: "KeepaliveInterval", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKeepaliveInterval()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TcpKeepaliveValidationError{ - field: "KeepaliveInterval", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return TcpKeepaliveMultiError(errors) - } - - return nil -} - -// TcpKeepaliveMultiError is an error wrapping multiple validation errors -// returned by TcpKeepalive.ValidateAll() if the designated constraints aren't met. -type TcpKeepaliveMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TcpKeepaliveMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TcpKeepaliveMultiError) AllErrors() []error { return m } - -// TcpKeepaliveValidationError is the validation error returned by -// TcpKeepalive.Validate if the designated constraints aren't met. -type TcpKeepaliveValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TcpKeepaliveValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TcpKeepaliveValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TcpKeepaliveValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TcpKeepaliveValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TcpKeepaliveValidationError) ErrorName() string { return "TcpKeepaliveValidationError" } - -// Error satisfies the builtin error interface -func (e TcpKeepaliveValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTcpKeepalive.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TcpKeepaliveValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TcpKeepaliveValidationError{} - -// Validate checks the field values on ExtraSourceAddress with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ExtraSourceAddress) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ExtraSourceAddress with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ExtraSourceAddressMultiError, or nil if none found. -func (m *ExtraSourceAddress) ValidateAll() error { - return m.validate(true) -} - -func (m *ExtraSourceAddress) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetAddress() == nil { - err := ExtraSourceAddressValidationError{ - field: "Address", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ExtraSourceAddressValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ExtraSourceAddressValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtraSourceAddressValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSocketOptions()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ExtraSourceAddressValidationError{ - field: "SocketOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ExtraSourceAddressValidationError{ - field: "SocketOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSocketOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtraSourceAddressValidationError{ - field: "SocketOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ExtraSourceAddressMultiError(errors) - } - - return nil -} - -// ExtraSourceAddressMultiError is an error wrapping multiple validation errors -// returned by ExtraSourceAddress.ValidateAll() if the designated constraints -// aren't met. -type ExtraSourceAddressMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ExtraSourceAddressMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ExtraSourceAddressMultiError) AllErrors() []error { return m } - -// ExtraSourceAddressValidationError is the validation error returned by -// ExtraSourceAddress.Validate if the designated constraints aren't met. -type ExtraSourceAddressValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtraSourceAddressValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtraSourceAddressValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtraSourceAddressValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtraSourceAddressValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtraSourceAddressValidationError) ErrorName() string { - return "ExtraSourceAddressValidationError" -} - -// Error satisfies the builtin error interface -func (e ExtraSourceAddressValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtraSourceAddress.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtraSourceAddressValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtraSourceAddressValidationError{} - -// Validate checks the field values on BindConfig with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *BindConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on BindConfig with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in BindConfigMultiError, or -// nil if none found. -func (m *BindConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *BindConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetSourceAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, BindConfigValidationError{ - field: "SourceAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, BindConfigValidationError{ - field: "SourceAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BindConfigValidationError{ - field: "SourceAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetFreebind()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, BindConfigValidationError{ - field: "Freebind", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, BindConfigValidationError{ - field: "Freebind", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BindConfigValidationError{ - field: "Freebind", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetSocketOptions() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, BindConfigValidationError{ - field: fmt.Sprintf("SocketOptions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, BindConfigValidationError{ - field: fmt.Sprintf("SocketOptions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BindConfigValidationError{ - field: fmt.Sprintf("SocketOptions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetExtraSourceAddresses() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, BindConfigValidationError{ - field: fmt.Sprintf("ExtraSourceAddresses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, BindConfigValidationError{ - field: fmt.Sprintf("ExtraSourceAddresses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BindConfigValidationError{ - field: fmt.Sprintf("ExtraSourceAddresses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetAdditionalSourceAddresses() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, BindConfigValidationError{ - field: fmt.Sprintf("AdditionalSourceAddresses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, BindConfigValidationError{ - field: fmt.Sprintf("AdditionalSourceAddresses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BindConfigValidationError{ - field: fmt.Sprintf("AdditionalSourceAddresses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return BindConfigMultiError(errors) - } - - return nil -} - -// BindConfigMultiError is an error wrapping multiple validation errors -// returned by BindConfig.ValidateAll() if the designated constraints aren't met. -type BindConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m BindConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m BindConfigMultiError) AllErrors() []error { return m } - -// BindConfigValidationError is the validation error returned by -// BindConfig.Validate if the designated constraints aren't met. -type BindConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BindConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BindConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BindConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BindConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BindConfigValidationError) ErrorName() string { return "BindConfigValidationError" } - -// Error satisfies the builtin error interface -func (e BindConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBindConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BindConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BindConfigValidationError{} - -// Validate checks the field values on Address with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Address) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Address with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in AddressMultiError, or nil if none found. -func (m *Address) ValidateAll() error { - return m.validate(true) -} - -func (m *Address) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofAddressPresent := false - switch v := m.Address.(type) { - case *Address_SocketAddress: - if v == nil { - err := AddressValidationError{ - field: "Address", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofAddressPresent = true - - if all { - switch v := interface{}(m.GetSocketAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AddressValidationError{ - field: "SocketAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AddressValidationError{ - field: "SocketAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSocketAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AddressValidationError{ - field: "SocketAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Address_Pipe: - if v == nil { - err := AddressValidationError{ - field: "Address", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofAddressPresent = true - - if all { - switch v := interface{}(m.GetPipe()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AddressValidationError{ - field: "Pipe", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AddressValidationError{ - field: "Pipe", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPipe()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AddressValidationError{ - field: "Pipe", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Address_EnvoyInternalAddress: - if v == nil { - err := AddressValidationError{ - field: "Address", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofAddressPresent = true - - if all { - switch v := interface{}(m.GetEnvoyInternalAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AddressValidationError{ - field: "EnvoyInternalAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AddressValidationError{ - field: "EnvoyInternalAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEnvoyInternalAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AddressValidationError{ - field: "EnvoyInternalAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofAddressPresent { - err := AddressValidationError{ - field: "Address", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return AddressMultiError(errors) - } - - return nil -} - -// AddressMultiError is an error wrapping multiple validation errors returned -// by Address.ValidateAll() if the designated constraints aren't met. -type AddressMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AddressMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AddressMultiError) AllErrors() []error { return m } - -// AddressValidationError is the validation error returned by Address.Validate -// if the designated constraints aren't met. -type AddressValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AddressValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AddressValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AddressValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AddressValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AddressValidationError) ErrorName() string { return "AddressValidationError" } - -// Error satisfies the builtin error interface -func (e AddressValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAddress.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AddressValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AddressValidationError{} - -// Validate checks the field values on CidrRange with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *CidrRange) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CidrRange with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in CidrRangeMultiError, or nil -// if none found. -func (m *CidrRange) ValidateAll() error { - return m.validate(true) -} - -func (m *CidrRange) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetAddressPrefix()) < 1 { - err := CidrRangeValidationError{ - field: "AddressPrefix", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if wrapper := m.GetPrefixLen(); wrapper != nil { - - if wrapper.GetValue() > 128 { - err := CidrRangeValidationError{ - field: "PrefixLen", - reason: "value must be less than or equal to 128", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(errors) > 0 { - return CidrRangeMultiError(errors) - } - - return nil -} - -// CidrRangeMultiError is an error wrapping multiple validation errors returned -// by CidrRange.ValidateAll() if the designated constraints aren't met. -type CidrRangeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CidrRangeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CidrRangeMultiError) AllErrors() []error { return m } - -// CidrRangeValidationError is the validation error returned by -// CidrRange.Validate if the designated constraints aren't met. -type CidrRangeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CidrRangeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CidrRangeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CidrRangeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CidrRangeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CidrRangeValidationError) ErrorName() string { return "CidrRangeValidationError" } - -// Error satisfies the builtin error interface -func (e CidrRangeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCidrRange.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CidrRangeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CidrRangeValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/backoff.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/backoff.pb.go deleted file mode 100644 index 3502651b79b..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/backoff.pb.go +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/backoff.proto - -package corev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration defining a jittered exponential back off strategy. -type BackoffStrategy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The base interval to be used for the next back off computation. It should - // be greater than zero and less than or equal to :ref:`max_interval - // `. - BaseInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` - // Specifies the maximum interval between retries. This parameter is optional, - // but must be greater than or equal to the :ref:`base_interval - // ` if set. The default - // is 10 times the :ref:`base_interval - // `. - MaxInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` -} - -func (x *BackoffStrategy) Reset() { - *x = BackoffStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_backoff_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BackoffStrategy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BackoffStrategy) ProtoMessage() {} - -func (x *BackoffStrategy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_backoff_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BackoffStrategy.ProtoReflect.Descriptor instead. -func (*BackoffStrategy) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_backoff_proto_rawDescGZIP(), []int{0} -} - -func (x *BackoffStrategy) GetBaseInterval() *durationpb.Duration { - if x != nil { - return x.BaseInterval - } - return nil -} - -func (x *BackoffStrategy) GetMaxInterval() *durationpb.Duration { - if x != nil { - return x.MaxInterval - } - return nil -} - -var File_envoy_config_core_v3_backoff_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_backoff_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, - 0x66, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x4e, 0x0a, 0x0d, 0x62, 0x61, 0x73, - 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x0b, - 0xaa, 0x01, 0x08, 0x08, 0x01, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0c, 0x62, 0x61, 0x73, - 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x61, 0x78, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, - 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x61, 0x63, 0x6b, - 0x6f, 0x66, 0x66, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x80, 0x01, 0x0a, 0x22, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x42, 0x0c, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, - 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_backoff_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_backoff_proto_rawDescData = file_envoy_config_core_v3_backoff_proto_rawDesc -) - -func file_envoy_config_core_v3_backoff_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_backoff_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_backoff_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_backoff_proto_rawDescData) - }) - return file_envoy_config_core_v3_backoff_proto_rawDescData -} - -var file_envoy_config_core_v3_backoff_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v3_backoff_proto_goTypes = []interface{}{ - (*BackoffStrategy)(nil), // 0: envoy.config.core.v3.BackoffStrategy - (*durationpb.Duration)(nil), // 1: google.protobuf.Duration -} -var file_envoy_config_core_v3_backoff_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v3.BackoffStrategy.base_interval:type_name -> google.protobuf.Duration - 1, // 1: envoy.config.core.v3.BackoffStrategy.max_interval:type_name -> google.protobuf.Duration - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_backoff_proto_init() } -func file_envoy_config_core_v3_backoff_proto_init() { - if File_envoy_config_core_v3_backoff_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_backoff_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BackoffStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_backoff_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_backoff_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_backoff_proto_depIdxs, - MessageInfos: file_envoy_config_core_v3_backoff_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_backoff_proto = out.File - file_envoy_config_core_v3_backoff_proto_rawDesc = nil - file_envoy_config_core_v3_backoff_proto_goTypes = nil - file_envoy_config_core_v3_backoff_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/backoff.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/backoff.pb.validate.go deleted file mode 100644 index c9b6590ccb0..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/backoff.pb.validate.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/backoff.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on BackoffStrategy with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *BackoffStrategy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on BackoffStrategy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// BackoffStrategyMultiError, or nil if none found. -func (m *BackoffStrategy) ValidateAll() error { - return m.validate(true) -} - -func (m *BackoffStrategy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetBaseInterval() == nil { - err := BackoffStrategyValidationError{ - field: "BaseInterval", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if d := m.GetBaseInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = BackoffStrategyValidationError{ - field: "BaseInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur < gte { - err := BackoffStrategyValidationError{ - field: "BaseInterval", - reason: "value must be greater than or equal to 1ms", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if d := m.GetMaxInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = BackoffStrategyValidationError{ - field: "MaxInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := BackoffStrategyValidationError{ - field: "MaxInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if len(errors) > 0 { - return BackoffStrategyMultiError(errors) - } - - return nil -} - -// BackoffStrategyMultiError is an error wrapping multiple validation errors -// returned by BackoffStrategy.ValidateAll() if the designated constraints -// aren't met. -type BackoffStrategyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m BackoffStrategyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m BackoffStrategyMultiError) AllErrors() []error { return m } - -// BackoffStrategyValidationError is the validation error returned by -// BackoffStrategy.Validate if the designated constraints aren't met. -type BackoffStrategyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BackoffStrategyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BackoffStrategyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BackoffStrategyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BackoffStrategyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BackoffStrategyValidationError) ErrorName() string { return "BackoffStrategyValidationError" } - -// Error satisfies the builtin error interface -func (e BackoffStrategyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBackoffStrategy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BackoffStrategyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BackoffStrategyValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/base.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/base.pb.go deleted file mode 100644 index de869d9506e..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/base.pb.go +++ /dev/null @@ -1,2636 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/base.proto - -package corev3 - -import ( - _ "github.com/cilium/proxy/go/envoy/annotations" - v3 "github.com/cilium/proxy/go/envoy/type/v3" - _ "github.com/cncf/xds/go/udpa/annotations" - v31 "github.com/cncf/xds/go/xds/core/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - structpb "google.golang.org/protobuf/types/known/structpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Envoy supports :ref:`upstream priority routing -// ` both at the route and the virtual -// cluster level. The current priority implementation uses different connection -// pool and circuit breaking settings for each priority level. This means that -// even for HTTP/2 requests, two physical connections will be used to an -// upstream host. In the future Envoy will likely support true HTTP/2 priority -// over a single upstream connection. -type RoutingPriority int32 - -const ( - RoutingPriority_DEFAULT RoutingPriority = 0 - RoutingPriority_HIGH RoutingPriority = 1 -) - -// Enum value maps for RoutingPriority. -var ( - RoutingPriority_name = map[int32]string{ - 0: "DEFAULT", - 1: "HIGH", - } - RoutingPriority_value = map[string]int32{ - "DEFAULT": 0, - "HIGH": 1, - } -) - -func (x RoutingPriority) Enum() *RoutingPriority { - p := new(RoutingPriority) - *p = x - return p -} - -func (x RoutingPriority) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RoutingPriority) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_base_proto_enumTypes[0].Descriptor() -} - -func (RoutingPriority) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_base_proto_enumTypes[0] -} - -func (x RoutingPriority) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RoutingPriority.Descriptor instead. -func (RoutingPriority) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{0} -} - -// HTTP request method. -type RequestMethod int32 - -const ( - RequestMethod_METHOD_UNSPECIFIED RequestMethod = 0 - RequestMethod_GET RequestMethod = 1 - RequestMethod_HEAD RequestMethod = 2 - RequestMethod_POST RequestMethod = 3 - RequestMethod_PUT RequestMethod = 4 - RequestMethod_DELETE RequestMethod = 5 - RequestMethod_CONNECT RequestMethod = 6 - RequestMethod_OPTIONS RequestMethod = 7 - RequestMethod_TRACE RequestMethod = 8 - RequestMethod_PATCH RequestMethod = 9 -) - -// Enum value maps for RequestMethod. -var ( - RequestMethod_name = map[int32]string{ - 0: "METHOD_UNSPECIFIED", - 1: "GET", - 2: "HEAD", - 3: "POST", - 4: "PUT", - 5: "DELETE", - 6: "CONNECT", - 7: "OPTIONS", - 8: "TRACE", - 9: "PATCH", - } - RequestMethod_value = map[string]int32{ - "METHOD_UNSPECIFIED": 0, - "GET": 1, - "HEAD": 2, - "POST": 3, - "PUT": 4, - "DELETE": 5, - "CONNECT": 6, - "OPTIONS": 7, - "TRACE": 8, - "PATCH": 9, - } -) - -func (x RequestMethod) Enum() *RequestMethod { - p := new(RequestMethod) - *p = x - return p -} - -func (x RequestMethod) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RequestMethod) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_base_proto_enumTypes[1].Descriptor() -} - -func (RequestMethod) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_base_proto_enumTypes[1] -} - -func (x RequestMethod) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RequestMethod.Descriptor instead. -func (RequestMethod) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{1} -} - -// Identifies the direction of the traffic relative to the local Envoy. -type TrafficDirection int32 - -const ( - // Default option is unspecified. - TrafficDirection_UNSPECIFIED TrafficDirection = 0 - // The transport is used for incoming traffic. - TrafficDirection_INBOUND TrafficDirection = 1 - // The transport is used for outgoing traffic. - TrafficDirection_OUTBOUND TrafficDirection = 2 -) - -// Enum value maps for TrafficDirection. -var ( - TrafficDirection_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "INBOUND", - 2: "OUTBOUND", - } - TrafficDirection_value = map[string]int32{ - "UNSPECIFIED": 0, - "INBOUND": 1, - "OUTBOUND": 2, - } -) - -func (x TrafficDirection) Enum() *TrafficDirection { - p := new(TrafficDirection) - *p = x - return p -} - -func (x TrafficDirection) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TrafficDirection) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_base_proto_enumTypes[2].Descriptor() -} - -func (TrafficDirection) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_base_proto_enumTypes[2] -} - -func (x TrafficDirection) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TrafficDirection.Descriptor instead. -func (TrafficDirection) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{2} -} - -// Describes the supported actions types for header append action. -type HeaderValueOption_HeaderAppendAction int32 - -const ( - // This action will append the specified value to the existing values if the header - // already exists. If the header doesn't exist then this will add the header with - // specified key and value. - HeaderValueOption_APPEND_IF_EXISTS_OR_ADD HeaderValueOption_HeaderAppendAction = 0 - // This action will add the header if it doesn't already exist. If the header - // already exists then this will be a no-op. - HeaderValueOption_ADD_IF_ABSENT HeaderValueOption_HeaderAppendAction = 1 - // This action will overwrite the specified value by discarding any existing values if - // the header already exists. If the header doesn't exist then this will add the header - // with specified key and value. - HeaderValueOption_OVERWRITE_IF_EXISTS_OR_ADD HeaderValueOption_HeaderAppendAction = 2 - // This action will overwrite the specified value by discarding any existing values if - // the header already exists. If the header doesn't exist then this will be no-op. - HeaderValueOption_OVERWRITE_IF_EXISTS HeaderValueOption_HeaderAppendAction = 3 -) - -// Enum value maps for HeaderValueOption_HeaderAppendAction. -var ( - HeaderValueOption_HeaderAppendAction_name = map[int32]string{ - 0: "APPEND_IF_EXISTS_OR_ADD", - 1: "ADD_IF_ABSENT", - 2: "OVERWRITE_IF_EXISTS_OR_ADD", - 3: "OVERWRITE_IF_EXISTS", - } - HeaderValueOption_HeaderAppendAction_value = map[string]int32{ - "APPEND_IF_EXISTS_OR_ADD": 0, - "ADD_IF_ABSENT": 1, - "OVERWRITE_IF_EXISTS_OR_ADD": 2, - "OVERWRITE_IF_EXISTS": 3, - } -) - -func (x HeaderValueOption_HeaderAppendAction) Enum() *HeaderValueOption_HeaderAppendAction { - p := new(HeaderValueOption_HeaderAppendAction) - *p = x - return p -} - -func (x HeaderValueOption_HeaderAppendAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HeaderValueOption_HeaderAppendAction) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_base_proto_enumTypes[3].Descriptor() -} - -func (HeaderValueOption_HeaderAppendAction) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_base_proto_enumTypes[3] -} - -func (x HeaderValueOption_HeaderAppendAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HeaderValueOption_HeaderAppendAction.Descriptor instead. -func (HeaderValueOption_HeaderAppendAction) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{11, 0} -} - -// Identifies location of where either Envoy runs or where upstream hosts run. -type Locality struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Region this :ref:`zone ` belongs to. - Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` - // Defines the local service zone where Envoy is running. Though optional, it - // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, - // either in this message or via :option:`--service-zone`. The meaning of zone - // is context dependent, e.g. `Availability Zone (AZ) - // `_ - // on AWS, `Zone `_ on - // GCP, etc. - Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // When used for locality of upstream hosts, this field further splits zone - // into smaller chunks of sub-zones so they can be load balanced - // independently. - SubZone string `protobuf:"bytes,3,opt,name=sub_zone,json=subZone,proto3" json:"sub_zone,omitempty"` -} - -func (x *Locality) Reset() { - *x = Locality{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Locality) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Locality) ProtoMessage() {} - -func (x *Locality) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Locality.ProtoReflect.Descriptor instead. -func (*Locality) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{0} -} - -func (x *Locality) GetRegion() string { - if x != nil { - return x.Region - } - return "" -} - -func (x *Locality) GetZone() string { - if x != nil { - return x.Zone - } - return "" -} - -func (x *Locality) GetSubZone() string { - if x != nil { - return x.SubZone - } - return "" -} - -// BuildVersion combines SemVer version of extension with free-form build information -// (i.e. 'alpha', 'private-build') as a set of strings. -type BuildVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // SemVer version of extension. - Version *v3.SemanticVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Free-form build information. - // Envoy defines several well known keys in the source/common/version/version.h file - Metadata *structpb.Struct `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *BuildVersion) Reset() { - *x = BuildVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BuildVersion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BuildVersion) ProtoMessage() {} - -func (x *BuildVersion) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BuildVersion.ProtoReflect.Descriptor instead. -func (*BuildVersion) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{1} -} - -func (x *BuildVersion) GetVersion() *v3.SemanticVersion { - if x != nil { - return x.Version - } - return nil -} - -func (x *BuildVersion) GetMetadata() *structpb.Struct { - if x != nil { - return x.Metadata - } - return nil -} - -// Version and identification for an Envoy extension. -// [#next-free-field: 7] -type Extension struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This is the name of the Envoy filter as specified in the Envoy - // configuration, e.g. envoy.filters.http.router, com.acme.widget. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Category of the extension. - // Extension category names use reverse DNS notation. For instance "envoy.filters.listener" - // for Envoy's built-in listener filters or "com.acme.filters.http" for HTTP filters from - // acme.com vendor. - // [#comment:TODO(yanavlasov): Link to the doc with existing envoy category names.] - Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` - // [#not-implemented-hide:] Type descriptor of extension configuration proto. - // [#comment:TODO(yanavlasov): Link to the doc with existing configuration protos.] - // [#comment:TODO(yanavlasov): Add tests when PR #9391 lands.] - // - // Deprecated: Do not use. - TypeDescriptor string `protobuf:"bytes,3,opt,name=type_descriptor,json=typeDescriptor,proto3" json:"type_descriptor,omitempty"` - // The version is a property of the extension and maintained independently - // of other extensions and the Envoy API. - // This field is not set when extension did not provide version information. - Version *BuildVersion `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - // Indicates that the extension is present but was disabled via dynamic configuration. - Disabled bool `protobuf:"varint,5,opt,name=disabled,proto3" json:"disabled,omitempty"` - // Type URLs of extension configuration protos. - TypeUrls []string `protobuf:"bytes,6,rep,name=type_urls,json=typeUrls,proto3" json:"type_urls,omitempty"` -} - -func (x *Extension) Reset() { - *x = Extension{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Extension) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Extension) ProtoMessage() {} - -func (x *Extension) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Extension.ProtoReflect.Descriptor instead. -func (*Extension) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{2} -} - -func (x *Extension) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Extension) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -// Deprecated: Do not use. -func (x *Extension) GetTypeDescriptor() string { - if x != nil { - return x.TypeDescriptor - } - return "" -} - -func (x *Extension) GetVersion() *BuildVersion { - if x != nil { - return x.Version - } - return nil -} - -func (x *Extension) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -func (x *Extension) GetTypeUrls() []string { - if x != nil { - return x.TypeUrls - } - return nil -} - -// Identifies a specific Envoy instance. The node identifier is presented to the -// management server, which may use this identifier to distinguish per Envoy -// configuration for serving. -// [#next-free-field: 13] -type Node struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An opaque node identifier for the Envoy node. This also provides the local - // service node name. It should be set if any of the following features are - // used: :ref:`statsd `, :ref:`CDS - // `, and :ref:`HTTP tracing - // `, either in this message or via - // :option:`--service-node`. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Defines the local service cluster name where Envoy is running. Though - // optional, it should be set if any of the following features are used: - // :ref:`statsd `, :ref:`health check cluster - // verification - // `, - // :ref:`runtime override directory `, - // :ref:`user agent addition - // `, - // :ref:`HTTP global rate limiting `, - // :ref:`CDS `, and :ref:`HTTP tracing - // `, either in this message or via - // :option:`--service-cluster`. - Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` - // Opaque metadata extending the node identifier. Envoy will pass this - // directly to the management server. - Metadata *structpb.Struct `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Map from xDS resource type URL to dynamic context parameters. These may vary at runtime (unlike - // other fields in this message). For example, the xDS client may have a shard identifier that - // changes during the lifetime of the xDS client. In Envoy, this would be achieved by updating the - // dynamic context on the Server::Instance's LocalInfo context provider. The shard ID dynamic - // parameter then appears in this field during future discovery requests. - DynamicParameters map[string]*v31.ContextParams `protobuf:"bytes,12,rep,name=dynamic_parameters,json=dynamicParameters,proto3" json:"dynamic_parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Locality specifying where the Envoy instance is running. - Locality *Locality `protobuf:"bytes,4,opt,name=locality,proto3" json:"locality,omitempty"` - // Free-form string that identifies the entity requesting config. - // E.g. "envoy" or "grpc" - UserAgentName string `protobuf:"bytes,6,opt,name=user_agent_name,json=userAgentName,proto3" json:"user_agent_name,omitempty"` - // Types that are assignable to UserAgentVersionType: - // - // *Node_UserAgentVersion - // *Node_UserAgentBuildVersion - UserAgentVersionType isNode_UserAgentVersionType `protobuf_oneof:"user_agent_version_type"` - // List of extensions and their versions supported by the node. - Extensions []*Extension `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty"` - // Client feature support list. These are well known features described - // in the Envoy API repository for a given major version of an API. Client features - // use reverse DNS naming scheme, for example “com.acme.feature“. - // See :ref:`the list of features ` that xDS client may - // support. - ClientFeatures []string `protobuf:"bytes,10,rep,name=client_features,json=clientFeatures,proto3" json:"client_features,omitempty"` - // Known listening ports on the node as a generic hint to the management server - // for filtering :ref:`listeners ` to be returned. For example, - // if there is a listener bound to port 80, the list can optionally contain the - // SocketAddress “(0.0.0.0,80)“. The field is optional and just a hint. - // - // Deprecated: Do not use. - ListeningAddresses []*Address `protobuf:"bytes,11,rep,name=listening_addresses,json=listeningAddresses,proto3" json:"listening_addresses,omitempty"` -} - -func (x *Node) Reset() { - *x = Node{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Node) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Node) ProtoMessage() {} - -func (x *Node) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Node.ProtoReflect.Descriptor instead. -func (*Node) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{3} -} - -func (x *Node) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Node) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -func (x *Node) GetMetadata() *structpb.Struct { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Node) GetDynamicParameters() map[string]*v31.ContextParams { - if x != nil { - return x.DynamicParameters - } - return nil -} - -func (x *Node) GetLocality() *Locality { - if x != nil { - return x.Locality - } - return nil -} - -func (x *Node) GetUserAgentName() string { - if x != nil { - return x.UserAgentName - } - return "" -} - -func (m *Node) GetUserAgentVersionType() isNode_UserAgentVersionType { - if m != nil { - return m.UserAgentVersionType - } - return nil -} - -func (x *Node) GetUserAgentVersion() string { - if x, ok := x.GetUserAgentVersionType().(*Node_UserAgentVersion); ok { - return x.UserAgentVersion - } - return "" -} - -func (x *Node) GetUserAgentBuildVersion() *BuildVersion { - if x, ok := x.GetUserAgentVersionType().(*Node_UserAgentBuildVersion); ok { - return x.UserAgentBuildVersion - } - return nil -} - -func (x *Node) GetExtensions() []*Extension { - if x != nil { - return x.Extensions - } - return nil -} - -func (x *Node) GetClientFeatures() []string { - if x != nil { - return x.ClientFeatures - } - return nil -} - -// Deprecated: Do not use. -func (x *Node) GetListeningAddresses() []*Address { - if x != nil { - return x.ListeningAddresses - } - return nil -} - -type isNode_UserAgentVersionType interface { - isNode_UserAgentVersionType() -} - -type Node_UserAgentVersion struct { - // Free-form string that identifies the version of the entity requesting config. - // E.g. "1.12.2" or "abcd1234", or "SpecialEnvoyBuild" - UserAgentVersion string `protobuf:"bytes,7,opt,name=user_agent_version,json=userAgentVersion,proto3,oneof"` -} - -type Node_UserAgentBuildVersion struct { - // Structured version of the entity requesting config. - UserAgentBuildVersion *BuildVersion `protobuf:"bytes,8,opt,name=user_agent_build_version,json=userAgentBuildVersion,proto3,oneof"` -} - -func (*Node_UserAgentVersion) isNode_UserAgentVersionType() {} - -func (*Node_UserAgentBuildVersion) isNode_UserAgentVersionType() {} - -// Metadata provides additional inputs to filters based on matched listeners, -// filter chains, routes and endpoints. It is structured as a map, usually from -// filter name (in reverse DNS format) to metadata specific to the filter. Metadata -// key-values for a filter are merged as connection and request handling occurs, -// with later values for the same key overriding earlier values. -// -// An example use of metadata is providing additional values to -// http_connection_manager in the envoy.http_connection_manager.access_log -// namespace. -// -// Another example use of metadata is to per service config info in cluster metadata, which may get -// consumed by multiple filters. -// -// For load balancing, Metadata provides a means to subset cluster endpoints. -// Endpoints have a Metadata object associated and routes contain a Metadata -// object to match against. There are some well defined metadata used today for -// this purpose: -// -// - “{"envoy.lb": {"canary": }}“ This indicates the canary status of an -// endpoint and is also used during header processing -// (x-envoy-upstream-canary) and for stats purposes. -// -// [#next-major-version: move to type/metadata/v2] -type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Key is the reverse DNS filter name, e.g. com.acme.widget. The “envoy.*“ - // namespace is reserved for Envoy's built-in filters. - // If both “filter_metadata“ and - // :ref:`typed_filter_metadata ` - // fields are present in the metadata with same keys, - // only “typed_filter_metadata“ field will be parsed. - FilterMetadata map[string]*structpb.Struct `protobuf:"bytes,1,rep,name=filter_metadata,json=filterMetadata,proto3" json:"filter_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Key is the reverse DNS filter name, e.g. com.acme.widget. The “envoy.*“ - // namespace is reserved for Envoy's built-in filters. - // The value is encoded as google.protobuf.Any. - // If both :ref:`filter_metadata ` - // and “typed_filter_metadata“ fields are present in the metadata with same keys, - // only “typed_filter_metadata“ field will be parsed. - TypedFilterMetadata map[string]*anypb.Any `protobuf:"bytes,2,rep,name=typed_filter_metadata,json=typedFilterMetadata,proto3" json:"typed_filter_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Metadata) Reset() { - *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata) ProtoMessage() {} - -func (x *Metadata) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. -func (*Metadata) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{4} -} - -func (x *Metadata) GetFilterMetadata() map[string]*structpb.Struct { - if x != nil { - return x.FilterMetadata - } - return nil -} - -func (x *Metadata) GetTypedFilterMetadata() map[string]*anypb.Any { - if x != nil { - return x.TypedFilterMetadata - } - return nil -} - -// Runtime derived uint32 with a default when not specified. -type RuntimeUInt32 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Default value if runtime value is not available. - DefaultValue uint32 `protobuf:"varint,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Runtime key to get value for comparison. This value is used if defined. - RuntimeKey string `protobuf:"bytes,3,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` -} - -func (x *RuntimeUInt32) Reset() { - *x = RuntimeUInt32{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeUInt32) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeUInt32) ProtoMessage() {} - -func (x *RuntimeUInt32) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeUInt32.ProtoReflect.Descriptor instead. -func (*RuntimeUInt32) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{5} -} - -func (x *RuntimeUInt32) GetDefaultValue() uint32 { - if x != nil { - return x.DefaultValue - } - return 0 -} - -func (x *RuntimeUInt32) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -// Runtime derived percentage with a default when not specified. -type RuntimePercent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Default value if runtime value is not available. - DefaultValue *v3.Percent `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Runtime key to get value for comparison. This value is used if defined. - RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` -} - -func (x *RuntimePercent) Reset() { - *x = RuntimePercent{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimePercent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimePercent) ProtoMessage() {} - -func (x *RuntimePercent) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimePercent.ProtoReflect.Descriptor instead. -func (*RuntimePercent) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{6} -} - -func (x *RuntimePercent) GetDefaultValue() *v3.Percent { - if x != nil { - return x.DefaultValue - } - return nil -} - -func (x *RuntimePercent) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -// Runtime derived double with a default when not specified. -type RuntimeDouble struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Default value if runtime value is not available. - DefaultValue float64 `protobuf:"fixed64,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Runtime key to get value for comparison. This value is used if defined. - RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` -} - -func (x *RuntimeDouble) Reset() { - *x = RuntimeDouble{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeDouble) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeDouble) ProtoMessage() {} - -func (x *RuntimeDouble) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeDouble.ProtoReflect.Descriptor instead. -func (*RuntimeDouble) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{7} -} - -func (x *RuntimeDouble) GetDefaultValue() float64 { - if x != nil { - return x.DefaultValue - } - return 0 -} - -func (x *RuntimeDouble) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -// Runtime derived bool with a default when not specified. -type RuntimeFeatureFlag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Default value if runtime value is not available. - DefaultValue *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Runtime key to get value for comparison. This value is used if defined. The boolean value must - // be represented via its - // `canonical JSON encoding `_. - RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` -} - -func (x *RuntimeFeatureFlag) Reset() { - *x = RuntimeFeatureFlag{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeFeatureFlag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeFeatureFlag) ProtoMessage() {} - -func (x *RuntimeFeatureFlag) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeFeatureFlag.ProtoReflect.Descriptor instead. -func (*RuntimeFeatureFlag) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{8} -} - -func (x *RuntimeFeatureFlag) GetDefaultValue() *wrapperspb.BoolValue { - if x != nil { - return x.DefaultValue - } - return nil -} - -func (x *RuntimeFeatureFlag) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -// Query parameter name/value pair. -type QueryParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key of the query parameter. Case sensitive. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // The value of the query parameter. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *QueryParameter) Reset() { - *x = QueryParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParameter) ProtoMessage() {} - -func (x *QueryParameter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QueryParameter.ProtoReflect.Descriptor instead. -func (*QueryParameter) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryParameter) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *QueryParameter) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// Header name/value pair. -type HeaderValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Header name. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Header value. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown header values are replaced with the empty string instead of “-“. - // Header value is encoded as string. This does not work for non-utf8 characters. - // Only one of “value“ or “raw_value“ can be set. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // Header value is encoded as bytes which can support non-utf8 characters. - // Only one of “value“ or “raw_value“ can be set. - RawValue []byte `protobuf:"bytes,3,opt,name=raw_value,json=rawValue,proto3" json:"raw_value,omitempty"` -} - -func (x *HeaderValue) Reset() { - *x = HeaderValue{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderValue) ProtoMessage() {} - -func (x *HeaderValue) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderValue.ProtoReflect.Descriptor instead. -func (*HeaderValue) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{10} -} - -func (x *HeaderValue) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *HeaderValue) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *HeaderValue) GetRawValue() []byte { - if x != nil { - return x.RawValue - } - return nil -} - -// Header name/value pair plus option to control append behavior. -type HeaderValueOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Header name/value pair that this option applies to. - Header *HeaderValue `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // Should the value be appended? If true (default), the value is appended to - // existing values. Otherwise it replaces any existing values. - // This field is deprecated and please use - // :ref:`append_action ` as replacement. - // - // .. note:: - // - // The :ref:`external authorization service ` and - // :ref:`external processor service ` have - // default value (``false``) for this field. - // - // Deprecated: Do not use. - Append *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=append,proto3" json:"append,omitempty"` - // Describes the action taken to append/overwrite the given value for an existing header - // or to only add this header if it's absent. - // Value defaults to :ref:`APPEND_IF_EXISTS_OR_ADD - // `. - AppendAction HeaderValueOption_HeaderAppendAction `protobuf:"varint,3,opt,name=append_action,json=appendAction,proto3,enum=envoy.config.core.v3.HeaderValueOption_HeaderAppendAction" json:"append_action,omitempty"` - // Is the header value allowed to be empty? If false (default), custom headers with empty values are dropped, - // otherwise they are added. - KeepEmptyValue bool `protobuf:"varint,4,opt,name=keep_empty_value,json=keepEmptyValue,proto3" json:"keep_empty_value,omitempty"` -} - -func (x *HeaderValueOption) Reset() { - *x = HeaderValueOption{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderValueOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderValueOption) ProtoMessage() {} - -func (x *HeaderValueOption) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderValueOption.ProtoReflect.Descriptor instead. -func (*HeaderValueOption) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{11} -} - -func (x *HeaderValueOption) GetHeader() *HeaderValue { - if x != nil { - return x.Header - } - return nil -} - -// Deprecated: Do not use. -func (x *HeaderValueOption) GetAppend() *wrapperspb.BoolValue { - if x != nil { - return x.Append - } - return nil -} - -func (x *HeaderValueOption) GetAppendAction() HeaderValueOption_HeaderAppendAction { - if x != nil { - return x.AppendAction - } - return HeaderValueOption_APPEND_IF_EXISTS_OR_ADD -} - -func (x *HeaderValueOption) GetKeepEmptyValue() bool { - if x != nil { - return x.KeepEmptyValue - } - return false -} - -// Wrapper for a set of headers. -type HeaderMap struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Headers []*HeaderValue `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *HeaderMap) Reset() { - *x = HeaderMap{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderMap) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderMap) ProtoMessage() {} - -func (x *HeaderMap) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderMap.ProtoReflect.Descriptor instead. -func (*HeaderMap) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{12} -} - -func (x *HeaderMap) GetHeaders() []*HeaderValue { - if x != nil { - return x.Headers - } - return nil -} - -// A directory that is watched for changes, e.g. by inotify on Linux. Move/rename -// events inside this directory trigger the watch. -type WatchedDirectory struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Directory path to watch. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *WatchedDirectory) Reset() { - *x = WatchedDirectory{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WatchedDirectory) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WatchedDirectory) ProtoMessage() {} - -func (x *WatchedDirectory) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WatchedDirectory.ProtoReflect.Descriptor instead. -func (*WatchedDirectory) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{13} -} - -func (x *WatchedDirectory) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -// Data source consisting of a file, an inline value, or an environment variable. -type DataSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Specifier: - // - // *DataSource_Filename - // *DataSource_InlineBytes - // *DataSource_InlineString - // *DataSource_EnvironmentVariable - Specifier isDataSource_Specifier `protobuf_oneof:"specifier"` -} - -func (x *DataSource) Reset() { - *x = DataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DataSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DataSource) ProtoMessage() {} - -func (x *DataSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DataSource.ProtoReflect.Descriptor instead. -func (*DataSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{14} -} - -func (m *DataSource) GetSpecifier() isDataSource_Specifier { - if m != nil { - return m.Specifier - } - return nil -} - -func (x *DataSource) GetFilename() string { - if x, ok := x.GetSpecifier().(*DataSource_Filename); ok { - return x.Filename - } - return "" -} - -func (x *DataSource) GetInlineBytes() []byte { - if x, ok := x.GetSpecifier().(*DataSource_InlineBytes); ok { - return x.InlineBytes - } - return nil -} - -func (x *DataSource) GetInlineString() string { - if x, ok := x.GetSpecifier().(*DataSource_InlineString); ok { - return x.InlineString - } - return "" -} - -func (x *DataSource) GetEnvironmentVariable() string { - if x, ok := x.GetSpecifier().(*DataSource_EnvironmentVariable); ok { - return x.EnvironmentVariable - } - return "" -} - -type isDataSource_Specifier interface { - isDataSource_Specifier() -} - -type DataSource_Filename struct { - // Local filesystem data source. - Filename string `protobuf:"bytes,1,opt,name=filename,proto3,oneof"` -} - -type DataSource_InlineBytes struct { - // Bytes inlined in the configuration. - InlineBytes []byte `protobuf:"bytes,2,opt,name=inline_bytes,json=inlineBytes,proto3,oneof"` -} - -type DataSource_InlineString struct { - // String inlined in the configuration. - InlineString string `protobuf:"bytes,3,opt,name=inline_string,json=inlineString,proto3,oneof"` -} - -type DataSource_EnvironmentVariable struct { - // Environment variable data source. - EnvironmentVariable string `protobuf:"bytes,4,opt,name=environment_variable,json=environmentVariable,proto3,oneof"` -} - -func (*DataSource_Filename) isDataSource_Specifier() {} - -func (*DataSource_InlineBytes) isDataSource_Specifier() {} - -func (*DataSource_InlineString) isDataSource_Specifier() {} - -func (*DataSource_EnvironmentVariable) isDataSource_Specifier() {} - -// The message specifies the retry policy of remote data source when fetching fails. -type RetryPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies parameters that control :ref:`retry backoff strategy `. - // This parameter is optional, in which case the default base interval is 1000 milliseconds. The - // default maximum interval is 10 times the base interval. - RetryBackOff *BackoffStrategy `protobuf:"bytes,1,opt,name=retry_back_off,json=retryBackOff,proto3" json:"retry_back_off,omitempty"` - // Specifies the allowed number of retries. This parameter is optional and - // defaults to 1. - NumRetries *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=num_retries,json=numRetries,proto3" json:"num_retries,omitempty"` -} - -func (x *RetryPolicy) Reset() { - *x = RetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy) ProtoMessage() {} - -func (x *RetryPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead. -func (*RetryPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{15} -} - -func (x *RetryPolicy) GetRetryBackOff() *BackoffStrategy { - if x != nil { - return x.RetryBackOff - } - return nil -} - -func (x *RetryPolicy) GetNumRetries() *wrapperspb.UInt32Value { - if x != nil { - return x.NumRetries - } - return nil -} - -// The message specifies how to fetch data from remote and how to verify it. -type RemoteDataSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The HTTP URI to fetch the remote data. - HttpUri *HttpUri `protobuf:"bytes,1,opt,name=http_uri,json=httpUri,proto3" json:"http_uri,omitempty"` - // SHA256 string for verifying data. - Sha256 string `protobuf:"bytes,2,opt,name=sha256,proto3" json:"sha256,omitempty"` - // Retry policy for fetching remote data. - RetryPolicy *RetryPolicy `protobuf:"bytes,3,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` -} - -func (x *RemoteDataSource) Reset() { - *x = RemoteDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoteDataSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoteDataSource) ProtoMessage() {} - -func (x *RemoteDataSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoteDataSource.ProtoReflect.Descriptor instead. -func (*RemoteDataSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{16} -} - -func (x *RemoteDataSource) GetHttpUri() *HttpUri { - if x != nil { - return x.HttpUri - } - return nil -} - -func (x *RemoteDataSource) GetSha256() string { - if x != nil { - return x.Sha256 - } - return "" -} - -func (x *RemoteDataSource) GetRetryPolicy() *RetryPolicy { - if x != nil { - return x.RetryPolicy - } - return nil -} - -// Async data source which support async data fetch. -type AsyncDataSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Specifier: - // - // *AsyncDataSource_Local - // *AsyncDataSource_Remote - Specifier isAsyncDataSource_Specifier `protobuf_oneof:"specifier"` -} - -func (x *AsyncDataSource) Reset() { - *x = AsyncDataSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AsyncDataSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AsyncDataSource) ProtoMessage() {} - -func (x *AsyncDataSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AsyncDataSource.ProtoReflect.Descriptor instead. -func (*AsyncDataSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{17} -} - -func (m *AsyncDataSource) GetSpecifier() isAsyncDataSource_Specifier { - if m != nil { - return m.Specifier - } - return nil -} - -func (x *AsyncDataSource) GetLocal() *DataSource { - if x, ok := x.GetSpecifier().(*AsyncDataSource_Local); ok { - return x.Local - } - return nil -} - -func (x *AsyncDataSource) GetRemote() *RemoteDataSource { - if x, ok := x.GetSpecifier().(*AsyncDataSource_Remote); ok { - return x.Remote - } - return nil -} - -type isAsyncDataSource_Specifier interface { - isAsyncDataSource_Specifier() -} - -type AsyncDataSource_Local struct { - // Local async data source. - Local *DataSource `protobuf:"bytes,1,opt,name=local,proto3,oneof"` -} - -type AsyncDataSource_Remote struct { - // Remote async data source. - Remote *RemoteDataSource `protobuf:"bytes,2,opt,name=remote,proto3,oneof"` -} - -func (*AsyncDataSource_Local) isAsyncDataSource_Specifier() {} - -func (*AsyncDataSource_Remote) isAsyncDataSource_Specifier() {} - -// Configuration for transport socket in :ref:`listeners ` and -// :ref:`clusters `. If the configuration is -// empty, a default transport socket implementation and configuration will be -// chosen based on the platform and existence of tls_context. -type TransportSocket struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the transport socket to instantiate. The name must match a supported transport - // socket implementation. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Implementation specific configuration which depends on the implementation being instantiated. - // See the supported transport socket implementations for further documentation. - // - // Types that are assignable to ConfigType: - // - // *TransportSocket_TypedConfig - ConfigType isTransportSocket_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *TransportSocket) Reset() { - *x = TransportSocket{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransportSocket) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransportSocket) ProtoMessage() {} - -func (x *TransportSocket) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransportSocket.ProtoReflect.Descriptor instead. -func (*TransportSocket) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{18} -} - -func (x *TransportSocket) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *TransportSocket) GetConfigType() isTransportSocket_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *TransportSocket) GetTypedConfig() *anypb.Any { - if x, ok := x.GetConfigType().(*TransportSocket_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isTransportSocket_ConfigType interface { - isTransportSocket_ConfigType() -} - -type TransportSocket_TypedConfig struct { - TypedConfig *anypb.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*TransportSocket_TypedConfig) isTransportSocket_ConfigType() {} - -// Runtime derived FractionalPercent with defaults for when the numerator or denominator is not -// specified via a runtime key. -// -// .. note:: -// -// Parsing of the runtime key's data is implemented such that it may be represented as a -// :ref:`FractionalPercent ` proto represented as JSON/YAML -// and may also be represented as an integer with the assumption that the value is an integral -// percentage out of 100. For instance, a runtime key lookup returning the value "42" would parse -// as a ``FractionalPercent`` whose numerator is 42 and denominator is HUNDRED. -type RuntimeFractionalPercent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Default value if the runtime value's for the numerator/denominator keys are not available. - DefaultValue *v3.FractionalPercent `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Runtime key for a YAML representation of a FractionalPercent. - RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` -} - -func (x *RuntimeFractionalPercent) Reset() { - *x = RuntimeFractionalPercent{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeFractionalPercent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeFractionalPercent) ProtoMessage() {} - -func (x *RuntimeFractionalPercent) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeFractionalPercent.ProtoReflect.Descriptor instead. -func (*RuntimeFractionalPercent) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{19} -} - -func (x *RuntimeFractionalPercent) GetDefaultValue() *v3.FractionalPercent { - if x != nil { - return x.DefaultValue - } - return nil -} - -func (x *RuntimeFractionalPercent) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -// Identifies a specific ControlPlane instance that Envoy is connected to. -type ControlPlane struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An opaque control plane identifier that uniquely identifies an instance - // of control plane. This can be used to identify which control plane instance, - // the Envoy is connected to. - Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` -} - -func (x *ControlPlane) Reset() { - *x = ControlPlane{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ControlPlane) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ControlPlane) ProtoMessage() {} - -func (x *ControlPlane) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_base_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ControlPlane.ProtoReflect.Descriptor instead. -func (*ControlPlane) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_base_proto_rawDescGZIP(), []int{20} -} - -func (x *ControlPlane) GetIdentifier() string { - if x != nil { - return x.Identifier - } - return "" -} - -var File_envoy_config_core_v3_base_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_base_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x33, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, - 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, - 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x75, - 0x62, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, - 0x62, 0x5a, 0x6f, 0x6e, 0x65, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, 0xa4, 0x01, 0x0a, 0x0c, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, - 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, - 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0x8c, 0x02, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x34, 0x0a, - 0x0f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, - 0x33, 0x2e, 0x30, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1b, 0x0a, - 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x73, 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, - 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb2, - 0x06, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x60, 0x0a, 0x12, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x44, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x69, 0x74, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, - 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, - 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x18, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0a, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x5b, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, - 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x12, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x65, 0x73, 0x1a, 0x60, 0x0a, 0x16, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x1d, 0x9a, 0xc5, 0x88, 0x1e, 0x18, 0x0a, 0x16, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, - 0x6f, 0x64, 0x65, 0x42, 0x19, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, - 0x08, 0x05, 0x10, 0x06, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0xb1, 0x03, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x5b, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x6b, 0x0a, - 0x15, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x74, 0x79, 0x70, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x5a, 0x0a, 0x13, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5c, 0x0a, 0x18, 0x54, 0x79, 0x70, 0x65, 0x64, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x86, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, - 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, - 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x22, 0x77, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x86, 0x01, 0x0a, 0x0d, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, - 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x12, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x49, 0x0a, 0x0d, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x2b, - 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x22, 0x41, 0x0a, 0x0e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xcd, - 0x01, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xfa, 0x42, 0x0e, - 0x72, 0x0c, 0x10, 0x01, 0x28, 0x80, 0x80, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x21, 0xfa, 0x42, 0x0c, 0x72, 0x0a, 0x28, 0x80, 0x80, 0x01, 0xc0, 0x01, 0x02, - 0xc8, 0x01, 0x00, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0c, 0x12, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x09, - 0x72, 0x61, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x1d, 0xfa, 0x42, 0x08, 0x7a, 0x06, 0x10, 0x00, 0x18, 0x80, 0x80, 0x01, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x0c, 0x12, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x08, - 0x72, 0x61, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, - 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd9, - 0x03, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x06, 0x61, 0x70, 0x70, - 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, - 0x2e, 0x30, 0x52, 0x06, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x69, 0x0a, 0x0d, 0x61, 0x70, - 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0e, 0x6b, 0x65, 0x65, 0x70, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x7d, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, - 0x49, 0x46, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x52, 0x5f, 0x41, 0x44, 0x44, - 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x44, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x42, 0x53, - 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x56, 0x45, 0x52, 0x57, 0x52, 0x49, - 0x54, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x5f, 0x4f, 0x52, 0x5f, - 0x41, 0x44, 0x44, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x56, 0x45, 0x52, 0x57, 0x52, 0x49, - 0x54, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, 0x10, 0x03, 0x3a, 0x2a, - 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6c, 0x0a, 0x09, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x12, 0x3b, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x22, 0x2f, 0x0a, 0x10, 0x57, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xf4, 0x01, 0x0a, 0x0a, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x23, 0x0a, 0x0c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0d, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x69, - 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x3c, 0x0a, 0x14, 0x65, - 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x48, 0x00, 0x52, 0x13, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, - 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x10, - 0x0a, 0x09, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x22, 0xd4, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x4b, 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, - 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, - 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x52, 0x0a, - 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x13, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0d, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, - 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xe8, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x08, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x68, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, - 0x12, 0x1f, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x68, 0x61, 0x32, 0x35, - 0x36, 0x12, 0x44, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, - 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x0f, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x12, 0x40, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x44, 0x61, - 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x73, 0x79, - 0x6e, 0x63, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x10, 0x0a, 0x09, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xb0, - 0x01, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, - 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, - 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x22, 0xbf, 0x01, 0x0a, 0x18, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x4f, - 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, - 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x22, 0x55, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, - 0x61, 0x6e, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x2a, 0x28, 0x0a, 0x0f, 0x52, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, - 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, - 0x47, 0x48, 0x10, 0x01, 0x2a, 0x89, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, - 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, - 0x02, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x50, - 0x55, 0x54, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, - 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0b, 0x0a, - 0x07, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, - 0x41, 0x43, 0x45, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x41, 0x54, 0x43, 0x48, 0x10, 0x09, - 0x2a, 0x3e, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, - 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, - 0x42, 0x7d, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x42, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, - 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_base_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_base_proto_rawDescData = file_envoy_config_core_v3_base_proto_rawDesc -) - -func file_envoy_config_core_v3_base_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_base_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_base_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_base_proto_rawDescData) - }) - return file_envoy_config_core_v3_base_proto_rawDescData -} - -var file_envoy_config_core_v3_base_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_envoy_config_core_v3_base_proto_msgTypes = make([]protoimpl.MessageInfo, 24) -var file_envoy_config_core_v3_base_proto_goTypes = []interface{}{ - (RoutingPriority)(0), // 0: envoy.config.core.v3.RoutingPriority - (RequestMethod)(0), // 1: envoy.config.core.v3.RequestMethod - (TrafficDirection)(0), // 2: envoy.config.core.v3.TrafficDirection - (HeaderValueOption_HeaderAppendAction)(0), // 3: envoy.config.core.v3.HeaderValueOption.HeaderAppendAction - (*Locality)(nil), // 4: envoy.config.core.v3.Locality - (*BuildVersion)(nil), // 5: envoy.config.core.v3.BuildVersion - (*Extension)(nil), // 6: envoy.config.core.v3.Extension - (*Node)(nil), // 7: envoy.config.core.v3.Node - (*Metadata)(nil), // 8: envoy.config.core.v3.Metadata - (*RuntimeUInt32)(nil), // 9: envoy.config.core.v3.RuntimeUInt32 - (*RuntimePercent)(nil), // 10: envoy.config.core.v3.RuntimePercent - (*RuntimeDouble)(nil), // 11: envoy.config.core.v3.RuntimeDouble - (*RuntimeFeatureFlag)(nil), // 12: envoy.config.core.v3.RuntimeFeatureFlag - (*QueryParameter)(nil), // 13: envoy.config.core.v3.QueryParameter - (*HeaderValue)(nil), // 14: envoy.config.core.v3.HeaderValue - (*HeaderValueOption)(nil), // 15: envoy.config.core.v3.HeaderValueOption - (*HeaderMap)(nil), // 16: envoy.config.core.v3.HeaderMap - (*WatchedDirectory)(nil), // 17: envoy.config.core.v3.WatchedDirectory - (*DataSource)(nil), // 18: envoy.config.core.v3.DataSource - (*RetryPolicy)(nil), // 19: envoy.config.core.v3.RetryPolicy - (*RemoteDataSource)(nil), // 20: envoy.config.core.v3.RemoteDataSource - (*AsyncDataSource)(nil), // 21: envoy.config.core.v3.AsyncDataSource - (*TransportSocket)(nil), // 22: envoy.config.core.v3.TransportSocket - (*RuntimeFractionalPercent)(nil), // 23: envoy.config.core.v3.RuntimeFractionalPercent - (*ControlPlane)(nil), // 24: envoy.config.core.v3.ControlPlane - nil, // 25: envoy.config.core.v3.Node.DynamicParametersEntry - nil, // 26: envoy.config.core.v3.Metadata.FilterMetadataEntry - nil, // 27: envoy.config.core.v3.Metadata.TypedFilterMetadataEntry - (*v3.SemanticVersion)(nil), // 28: envoy.type.v3.SemanticVersion - (*structpb.Struct)(nil), // 29: google.protobuf.Struct - (*Address)(nil), // 30: envoy.config.core.v3.Address - (*v3.Percent)(nil), // 31: envoy.type.v3.Percent - (*wrapperspb.BoolValue)(nil), // 32: google.protobuf.BoolValue - (*BackoffStrategy)(nil), // 33: envoy.config.core.v3.BackoffStrategy - (*wrapperspb.UInt32Value)(nil), // 34: google.protobuf.UInt32Value - (*HttpUri)(nil), // 35: envoy.config.core.v3.HttpUri - (*anypb.Any)(nil), // 36: google.protobuf.Any - (*v3.FractionalPercent)(nil), // 37: envoy.type.v3.FractionalPercent - (*v31.ContextParams)(nil), // 38: xds.core.v3.ContextParams -} -var file_envoy_config_core_v3_base_proto_depIdxs = []int32{ - 28, // 0: envoy.config.core.v3.BuildVersion.version:type_name -> envoy.type.v3.SemanticVersion - 29, // 1: envoy.config.core.v3.BuildVersion.metadata:type_name -> google.protobuf.Struct - 5, // 2: envoy.config.core.v3.Extension.version:type_name -> envoy.config.core.v3.BuildVersion - 29, // 3: envoy.config.core.v3.Node.metadata:type_name -> google.protobuf.Struct - 25, // 4: envoy.config.core.v3.Node.dynamic_parameters:type_name -> envoy.config.core.v3.Node.DynamicParametersEntry - 4, // 5: envoy.config.core.v3.Node.locality:type_name -> envoy.config.core.v3.Locality - 5, // 6: envoy.config.core.v3.Node.user_agent_build_version:type_name -> envoy.config.core.v3.BuildVersion - 6, // 7: envoy.config.core.v3.Node.extensions:type_name -> envoy.config.core.v3.Extension - 30, // 8: envoy.config.core.v3.Node.listening_addresses:type_name -> envoy.config.core.v3.Address - 26, // 9: envoy.config.core.v3.Metadata.filter_metadata:type_name -> envoy.config.core.v3.Metadata.FilterMetadataEntry - 27, // 10: envoy.config.core.v3.Metadata.typed_filter_metadata:type_name -> envoy.config.core.v3.Metadata.TypedFilterMetadataEntry - 31, // 11: envoy.config.core.v3.RuntimePercent.default_value:type_name -> envoy.type.v3.Percent - 32, // 12: envoy.config.core.v3.RuntimeFeatureFlag.default_value:type_name -> google.protobuf.BoolValue - 14, // 13: envoy.config.core.v3.HeaderValueOption.header:type_name -> envoy.config.core.v3.HeaderValue - 32, // 14: envoy.config.core.v3.HeaderValueOption.append:type_name -> google.protobuf.BoolValue - 3, // 15: envoy.config.core.v3.HeaderValueOption.append_action:type_name -> envoy.config.core.v3.HeaderValueOption.HeaderAppendAction - 14, // 16: envoy.config.core.v3.HeaderMap.headers:type_name -> envoy.config.core.v3.HeaderValue - 33, // 17: envoy.config.core.v3.RetryPolicy.retry_back_off:type_name -> envoy.config.core.v3.BackoffStrategy - 34, // 18: envoy.config.core.v3.RetryPolicy.num_retries:type_name -> google.protobuf.UInt32Value - 35, // 19: envoy.config.core.v3.RemoteDataSource.http_uri:type_name -> envoy.config.core.v3.HttpUri - 19, // 20: envoy.config.core.v3.RemoteDataSource.retry_policy:type_name -> envoy.config.core.v3.RetryPolicy - 18, // 21: envoy.config.core.v3.AsyncDataSource.local:type_name -> envoy.config.core.v3.DataSource - 20, // 22: envoy.config.core.v3.AsyncDataSource.remote:type_name -> envoy.config.core.v3.RemoteDataSource - 36, // 23: envoy.config.core.v3.TransportSocket.typed_config:type_name -> google.protobuf.Any - 37, // 24: envoy.config.core.v3.RuntimeFractionalPercent.default_value:type_name -> envoy.type.v3.FractionalPercent - 38, // 25: envoy.config.core.v3.Node.DynamicParametersEntry.value:type_name -> xds.core.v3.ContextParams - 29, // 26: envoy.config.core.v3.Metadata.FilterMetadataEntry.value:type_name -> google.protobuf.Struct - 36, // 27: envoy.config.core.v3.Metadata.TypedFilterMetadataEntry.value:type_name -> google.protobuf.Any - 28, // [28:28] is the sub-list for method output_type - 28, // [28:28] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_base_proto_init() } -func file_envoy_config_core_v3_base_proto_init() { - if File_envoy_config_core_v3_base_proto != nil { - return - } - file_envoy_config_core_v3_address_proto_init() - file_envoy_config_core_v3_backoff_proto_init() - file_envoy_config_core_v3_http_uri_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Locality); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuildVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Extension); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Node); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeUInt32); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimePercent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeDouble); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeFeatureFlag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderValueOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WatchedDirectory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoteDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AsyncDataSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransportSocket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeFractionalPercent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_base_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ControlPlane); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v3_base_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*Node_UserAgentVersion)(nil), - (*Node_UserAgentBuildVersion)(nil), - } - file_envoy_config_core_v3_base_proto_msgTypes[14].OneofWrappers = []interface{}{ - (*DataSource_Filename)(nil), - (*DataSource_InlineBytes)(nil), - (*DataSource_InlineString)(nil), - (*DataSource_EnvironmentVariable)(nil), - } - file_envoy_config_core_v3_base_proto_msgTypes[17].OneofWrappers = []interface{}{ - (*AsyncDataSource_Local)(nil), - (*AsyncDataSource_Remote)(nil), - } - file_envoy_config_core_v3_base_proto_msgTypes[18].OneofWrappers = []interface{}{ - (*TransportSocket_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_base_proto_rawDesc, - NumEnums: 4, - NumMessages: 24, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_base_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_base_proto_depIdxs, - EnumInfos: file_envoy_config_core_v3_base_proto_enumTypes, - MessageInfos: file_envoy_config_core_v3_base_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_base_proto = out.File - file_envoy_config_core_v3_base_proto_rawDesc = nil - file_envoy_config_core_v3_base_proto_goTypes = nil - file_envoy_config_core_v3_base_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/base.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/base.pb.validate.go deleted file mode 100644 index 7e2dd5390e4..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/base.pb.validate.go +++ /dev/null @@ -1,3316 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/base.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Locality with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Locality) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Locality with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in LocalityMultiError, or nil -// if none found. -func (m *Locality) ValidateAll() error { - return m.validate(true) -} - -func (m *Locality) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Region - - // no validation rules for Zone - - // no validation rules for SubZone - - if len(errors) > 0 { - return LocalityMultiError(errors) - } - - return nil -} - -// LocalityMultiError is an error wrapping multiple validation errors returned -// by Locality.ValidateAll() if the designated constraints aren't met. -type LocalityMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LocalityMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LocalityMultiError) AllErrors() []error { return m } - -// LocalityValidationError is the validation error returned by -// Locality.Validate if the designated constraints aren't met. -type LocalityValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LocalityValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LocalityValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LocalityValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LocalityValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LocalityValidationError) ErrorName() string { return "LocalityValidationError" } - -// Error satisfies the builtin error interface -func (e LocalityValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLocality.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LocalityValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LocalityValidationError{} - -// Validate checks the field values on BuildVersion with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *BuildVersion) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on BuildVersion with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in BuildVersionMultiError, or -// nil if none found. -func (m *BuildVersion) ValidateAll() error { - return m.validate(true) -} - -func (m *BuildVersion) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetVersion()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, BuildVersionValidationError{ - field: "Version", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, BuildVersionValidationError{ - field: "Version", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BuildVersionValidationError{ - field: "Version", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, BuildVersionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, BuildVersionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return BuildVersionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return BuildVersionMultiError(errors) - } - - return nil -} - -// BuildVersionMultiError is an error wrapping multiple validation errors -// returned by BuildVersion.ValidateAll() if the designated constraints aren't met. -type BuildVersionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m BuildVersionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m BuildVersionMultiError) AllErrors() []error { return m } - -// BuildVersionValidationError is the validation error returned by -// BuildVersion.Validate if the designated constraints aren't met. -type BuildVersionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BuildVersionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BuildVersionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BuildVersionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BuildVersionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BuildVersionValidationError) ErrorName() string { return "BuildVersionValidationError" } - -// Error satisfies the builtin error interface -func (e BuildVersionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBuildVersion.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BuildVersionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BuildVersionValidationError{} - -// Validate checks the field values on Extension with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Extension) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Extension with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ExtensionMultiError, or nil -// if none found. -func (m *Extension) ValidateAll() error { - return m.validate(true) -} - -func (m *Extension) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - // no validation rules for Category - - // no validation rules for TypeDescriptor - - if all { - switch v := interface{}(m.GetVersion()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ExtensionValidationError{ - field: "Version", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ExtensionValidationError{ - field: "Version", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetVersion()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtensionValidationError{ - field: "Version", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Disabled - - if len(errors) > 0 { - return ExtensionMultiError(errors) - } - - return nil -} - -// ExtensionMultiError is an error wrapping multiple validation errors returned -// by Extension.ValidateAll() if the designated constraints aren't met. -type ExtensionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ExtensionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ExtensionMultiError) AllErrors() []error { return m } - -// ExtensionValidationError is the validation error returned by -// Extension.Validate if the designated constraints aren't met. -type ExtensionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtensionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtensionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtensionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtensionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtensionValidationError) ErrorName() string { return "ExtensionValidationError" } - -// Error satisfies the builtin error interface -func (e ExtensionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtension.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtensionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtensionValidationError{} - -// Validate checks the field values on Node with the rules defined in the proto -// definition for this message. If any rules are violated, the first error -// encountered is returned, or nil if there are no violations. -func (m *Node) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Node with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in NodeMultiError, or nil if none found. -func (m *Node) ValidateAll() error { - return m.validate(true) -} - -func (m *Node) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Id - - // no validation rules for Cluster - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NodeValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NodeValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NodeValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - { - sorted_keys := make([]string, len(m.GetDynamicParameters())) - i := 0 - for key := range m.GetDynamicParameters() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetDynamicParameters()[key] - _ = val - - // no validation rules for DynamicParameters[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NodeValidationError{ - field: fmt.Sprintf("DynamicParameters[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NodeValidationError{ - field: fmt.Sprintf("DynamicParameters[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NodeValidationError{ - field: fmt.Sprintf("DynamicParameters[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if all { - switch v := interface{}(m.GetLocality()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NodeValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NodeValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NodeValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for UserAgentName - - for idx, item := range m.GetExtensions() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NodeValidationError{ - field: fmt.Sprintf("Extensions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NodeValidationError{ - field: fmt.Sprintf("Extensions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NodeValidationError{ - field: fmt.Sprintf("Extensions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetListeningAddresses() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NodeValidationError{ - field: fmt.Sprintf("ListeningAddresses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NodeValidationError{ - field: fmt.Sprintf("ListeningAddresses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NodeValidationError{ - field: fmt.Sprintf("ListeningAddresses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - switch v := m.UserAgentVersionType.(type) { - case *Node_UserAgentVersion: - if v == nil { - err := NodeValidationError{ - field: "UserAgentVersionType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for UserAgentVersion - case *Node_UserAgentBuildVersion: - if v == nil { - err := NodeValidationError{ - field: "UserAgentVersionType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetUserAgentBuildVersion()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NodeValidationError{ - field: "UserAgentBuildVersion", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NodeValidationError{ - field: "UserAgentBuildVersion", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUserAgentBuildVersion()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NodeValidationError{ - field: "UserAgentBuildVersion", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return NodeMultiError(errors) - } - - return nil -} - -// NodeMultiError is an error wrapping multiple validation errors returned by -// Node.ValidateAll() if the designated constraints aren't met. -type NodeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NodeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m NodeMultiError) AllErrors() []error { return m } - -// NodeValidationError is the validation error returned by Node.Validate if the -// designated constraints aren't met. -type NodeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NodeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NodeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NodeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NodeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NodeValidationError) ErrorName() string { return "NodeValidationError" } - -// Error satisfies the builtin error interface -func (e NodeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNode.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NodeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NodeValidationError{} - -// Validate checks the field values on Metadata with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Metadata) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Metadata with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in MetadataMultiError, or nil -// if none found. -func (m *Metadata) ValidateAll() error { - return m.validate(true) -} - -func (m *Metadata) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - { - sorted_keys := make([]string, len(m.GetFilterMetadata())) - i := 0 - for key := range m.GetFilterMetadata() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetFilterMetadata()[key] - _ = val - - // no validation rules for FilterMetadata[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataValidationError{ - field: fmt.Sprintf("FilterMetadata[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataValidationError{ - field: fmt.Sprintf("FilterMetadata[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataValidationError{ - field: fmt.Sprintf("FilterMetadata[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetTypedFilterMetadata())) - i := 0 - for key := range m.GetTypedFilterMetadata() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetTypedFilterMetadata()[key] - _ = val - - // no validation rules for TypedFilterMetadata[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataValidationError{ - field: fmt.Sprintf("TypedFilterMetadata[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataValidationError{ - field: fmt.Sprintf("TypedFilterMetadata[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataValidationError{ - field: fmt.Sprintf("TypedFilterMetadata[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(errors) > 0 { - return MetadataMultiError(errors) - } - - return nil -} - -// MetadataMultiError is an error wrapping multiple validation errors returned -// by Metadata.ValidateAll() if the designated constraints aren't met. -type MetadataMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataMultiError) AllErrors() []error { return m } - -// MetadataValidationError is the validation error returned by -// Metadata.Validate if the designated constraints aren't met. -type MetadataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataValidationError) ErrorName() string { return "MetadataValidationError" } - -// Error satisfies the builtin error interface -func (e MetadataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadata.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataValidationError{} - -// Validate checks the field values on RuntimeUInt32 with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RuntimeUInt32) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RuntimeUInt32 with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RuntimeUInt32MultiError, or -// nil if none found. -func (m *RuntimeUInt32) ValidateAll() error { - return m.validate(true) -} - -func (m *RuntimeUInt32) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for DefaultValue - - if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - err := RuntimeUInt32ValidationError{ - field: "RuntimeKey", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RuntimeUInt32MultiError(errors) - } - - return nil -} - -// RuntimeUInt32MultiError is an error wrapping multiple validation errors -// returned by RuntimeUInt32.ValidateAll() if the designated constraints -// aren't met. -type RuntimeUInt32MultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RuntimeUInt32MultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RuntimeUInt32MultiError) AllErrors() []error { return m } - -// RuntimeUInt32ValidationError is the validation error returned by -// RuntimeUInt32.Validate if the designated constraints aren't met. -type RuntimeUInt32ValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeUInt32ValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeUInt32ValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeUInt32ValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeUInt32ValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeUInt32ValidationError) ErrorName() string { return "RuntimeUInt32ValidationError" } - -// Error satisfies the builtin error interface -func (e RuntimeUInt32ValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeUInt32.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeUInt32ValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeUInt32ValidationError{} - -// Validate checks the field values on RuntimePercent with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RuntimePercent) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RuntimePercent with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RuntimePercentMultiError, -// or nil if none found. -func (m *RuntimePercent) ValidateAll() error { - return m.validate(true) -} - -func (m *RuntimePercent) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetDefaultValue()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RuntimePercentValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RuntimePercentValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimePercentValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - err := RuntimePercentValidationError{ - field: "RuntimeKey", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RuntimePercentMultiError(errors) - } - - return nil -} - -// RuntimePercentMultiError is an error wrapping multiple validation errors -// returned by RuntimePercent.ValidateAll() if the designated constraints -// aren't met. -type RuntimePercentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RuntimePercentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RuntimePercentMultiError) AllErrors() []error { return m } - -// RuntimePercentValidationError is the validation error returned by -// RuntimePercent.Validate if the designated constraints aren't met. -type RuntimePercentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimePercentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimePercentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimePercentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimePercentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimePercentValidationError) ErrorName() string { return "RuntimePercentValidationError" } - -// Error satisfies the builtin error interface -func (e RuntimePercentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimePercent.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimePercentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimePercentValidationError{} - -// Validate checks the field values on RuntimeDouble with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RuntimeDouble) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RuntimeDouble with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RuntimeDoubleMultiError, or -// nil if none found. -func (m *RuntimeDouble) ValidateAll() error { - return m.validate(true) -} - -func (m *RuntimeDouble) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for DefaultValue - - if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - err := RuntimeDoubleValidationError{ - field: "RuntimeKey", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RuntimeDoubleMultiError(errors) - } - - return nil -} - -// RuntimeDoubleMultiError is an error wrapping multiple validation errors -// returned by RuntimeDouble.ValidateAll() if the designated constraints -// aren't met. -type RuntimeDoubleMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RuntimeDoubleMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RuntimeDoubleMultiError) AllErrors() []error { return m } - -// RuntimeDoubleValidationError is the validation error returned by -// RuntimeDouble.Validate if the designated constraints aren't met. -type RuntimeDoubleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeDoubleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeDoubleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeDoubleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeDoubleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeDoubleValidationError) ErrorName() string { return "RuntimeDoubleValidationError" } - -// Error satisfies the builtin error interface -func (e RuntimeDoubleValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeDouble.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeDoubleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeDoubleValidationError{} - -// Validate checks the field values on RuntimeFeatureFlag with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RuntimeFeatureFlag) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RuntimeFeatureFlag with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RuntimeFeatureFlagMultiError, or nil if none found. -func (m *RuntimeFeatureFlag) ValidateAll() error { - return m.validate(true) -} - -func (m *RuntimeFeatureFlag) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetDefaultValue() == nil { - err := RuntimeFeatureFlagValidationError{ - field: "DefaultValue", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetDefaultValue()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RuntimeFeatureFlagValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RuntimeFeatureFlagValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimeFeatureFlagValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if utf8.RuneCountInString(m.GetRuntimeKey()) < 1 { - err := RuntimeFeatureFlagValidationError{ - field: "RuntimeKey", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RuntimeFeatureFlagMultiError(errors) - } - - return nil -} - -// RuntimeFeatureFlagMultiError is an error wrapping multiple validation errors -// returned by RuntimeFeatureFlag.ValidateAll() if the designated constraints -// aren't met. -type RuntimeFeatureFlagMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RuntimeFeatureFlagMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RuntimeFeatureFlagMultiError) AllErrors() []error { return m } - -// RuntimeFeatureFlagValidationError is the validation error returned by -// RuntimeFeatureFlag.Validate if the designated constraints aren't met. -type RuntimeFeatureFlagValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeFeatureFlagValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeFeatureFlagValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeFeatureFlagValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeFeatureFlagValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeFeatureFlagValidationError) ErrorName() string { - return "RuntimeFeatureFlagValidationError" -} - -// Error satisfies the builtin error interface -func (e RuntimeFeatureFlagValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeFeatureFlag.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeFeatureFlagValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeFeatureFlagValidationError{} - -// Validate checks the field values on QueryParameter with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *QueryParameter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on QueryParameter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in QueryParameterMultiError, -// or nil if none found. -func (m *QueryParameter) ValidateAll() error { - return m.validate(true) -} - -func (m *QueryParameter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKey()) < 1 { - err := QueryParameterValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Value - - if len(errors) > 0 { - return QueryParameterMultiError(errors) - } - - return nil -} - -// QueryParameterMultiError is an error wrapping multiple validation errors -// returned by QueryParameter.ValidateAll() if the designated constraints -// aren't met. -type QueryParameterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m QueryParameterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m QueryParameterMultiError) AllErrors() []error { return m } - -// QueryParameterValidationError is the validation error returned by -// QueryParameter.Validate if the designated constraints aren't met. -type QueryParameterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e QueryParameterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e QueryParameterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e QueryParameterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e QueryParameterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e QueryParameterValidationError) ErrorName() string { return "QueryParameterValidationError" } - -// Error satisfies the builtin error interface -func (e QueryParameterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sQueryParameter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = QueryParameterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = QueryParameterValidationError{} - -// Validate checks the field values on HeaderValue with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HeaderValue) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HeaderValue with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HeaderValueMultiError, or -// nil if none found. -func (m *HeaderValue) ValidateAll() error { - return m.validate(true) -} - -func (m *HeaderValue) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKey()) < 1 { - err := HeaderValueValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetKey()) > 16384 { - err := HeaderValueValidationError{ - field: "Key", - reason: "value length must be at most 16384 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_HeaderValue_Key_Pattern.MatchString(m.GetKey()) { - err := HeaderValueValidationError{ - field: "Key", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetValue()) > 16384 { - err := HeaderValueValidationError{ - field: "Value", - reason: "value length must be at most 16384 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_HeaderValue_Value_Pattern.MatchString(m.GetValue()) { - err := HeaderValueValidationError{ - field: "Value", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if l := len(m.GetRawValue()); l < 0 || l > 16384 { - err := HeaderValueValidationError{ - field: "RawValue", - reason: "value length must be between 0 and 16384 bytes, inclusive", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HeaderValueMultiError(errors) - } - - return nil -} - -// HeaderValueMultiError is an error wrapping multiple validation errors -// returned by HeaderValue.ValidateAll() if the designated constraints aren't met. -type HeaderValueMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HeaderValueMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HeaderValueMultiError) AllErrors() []error { return m } - -// HeaderValueValidationError is the validation error returned by -// HeaderValue.Validate if the designated constraints aren't met. -type HeaderValueValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderValueValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderValueValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderValueValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderValueValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderValueValidationError) ErrorName() string { return "HeaderValueValidationError" } - -// Error satisfies the builtin error interface -func (e HeaderValueValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderValue.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderValueValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderValueValidationError{} - -var _HeaderValue_Key_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _HeaderValue_Value_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on HeaderValueOption with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *HeaderValueOption) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HeaderValueOption with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HeaderValueOptionMultiError, or nil if none found. -func (m *HeaderValueOption) ValidateAll() error { - return m.validate(true) -} - -func (m *HeaderValueOption) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetHeader() == nil { - err := HeaderValueOptionValidationError{ - field: "Header", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetHeader()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HeaderValueOptionValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HeaderValueOptionValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeaderValueOptionValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetAppend()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HeaderValueOptionValidationError{ - field: "Append", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HeaderValueOptionValidationError{ - field: "Append", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAppend()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeaderValueOptionValidationError{ - field: "Append", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if _, ok := HeaderValueOption_HeaderAppendAction_name[int32(m.GetAppendAction())]; !ok { - err := HeaderValueOptionValidationError{ - field: "AppendAction", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for KeepEmptyValue - - if len(errors) > 0 { - return HeaderValueOptionMultiError(errors) - } - - return nil -} - -// HeaderValueOptionMultiError is an error wrapping multiple validation errors -// returned by HeaderValueOption.ValidateAll() if the designated constraints -// aren't met. -type HeaderValueOptionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HeaderValueOptionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HeaderValueOptionMultiError) AllErrors() []error { return m } - -// HeaderValueOptionValidationError is the validation error returned by -// HeaderValueOption.Validate if the designated constraints aren't met. -type HeaderValueOptionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderValueOptionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderValueOptionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderValueOptionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderValueOptionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderValueOptionValidationError) ErrorName() string { - return "HeaderValueOptionValidationError" -} - -// Error satisfies the builtin error interface -func (e HeaderValueOptionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderValueOption.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderValueOptionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderValueOptionValidationError{} - -// Validate checks the field values on HeaderMap with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HeaderMap) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HeaderMap with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HeaderMapMultiError, or nil -// if none found. -func (m *HeaderMap) ValidateAll() error { - return m.validate(true) -} - -func (m *HeaderMap) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HeaderMapValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HeaderMapValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeaderMapValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return HeaderMapMultiError(errors) - } - - return nil -} - -// HeaderMapMultiError is an error wrapping multiple validation errors returned -// by HeaderMap.ValidateAll() if the designated constraints aren't met. -type HeaderMapMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HeaderMapMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HeaderMapMultiError) AllErrors() []error { return m } - -// HeaderMapValidationError is the validation error returned by -// HeaderMap.Validate if the designated constraints aren't met. -type HeaderMapValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderMapValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderMapValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderMapValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderMapValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderMapValidationError) ErrorName() string { return "HeaderMapValidationError" } - -// Error satisfies the builtin error interface -func (e HeaderMapValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderMap.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderMapValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderMapValidationError{} - -// Validate checks the field values on WatchedDirectory with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *WatchedDirectory) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on WatchedDirectory with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// WatchedDirectoryMultiError, or nil if none found. -func (m *WatchedDirectory) ValidateAll() error { - return m.validate(true) -} - -func (m *WatchedDirectory) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetPath()) < 1 { - err := WatchedDirectoryValidationError{ - field: "Path", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return WatchedDirectoryMultiError(errors) - } - - return nil -} - -// WatchedDirectoryMultiError is an error wrapping multiple validation errors -// returned by WatchedDirectory.ValidateAll() if the designated constraints -// aren't met. -type WatchedDirectoryMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m WatchedDirectoryMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m WatchedDirectoryMultiError) AllErrors() []error { return m } - -// WatchedDirectoryValidationError is the validation error returned by -// WatchedDirectory.Validate if the designated constraints aren't met. -type WatchedDirectoryValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e WatchedDirectoryValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e WatchedDirectoryValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e WatchedDirectoryValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e WatchedDirectoryValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e WatchedDirectoryValidationError) ErrorName() string { return "WatchedDirectoryValidationError" } - -// Error satisfies the builtin error interface -func (e WatchedDirectoryValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sWatchedDirectory.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = WatchedDirectoryValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = WatchedDirectoryValidationError{} - -// Validate checks the field values on DataSource with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DataSource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DataSource with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DataSourceMultiError, or -// nil if none found. -func (m *DataSource) ValidateAll() error { - return m.validate(true) -} - -func (m *DataSource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofSpecifierPresent := false - switch v := m.Specifier.(type) { - case *DataSource_Filename: - if v == nil { - err := DataSourceValidationError{ - field: "Specifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofSpecifierPresent = true - - if utf8.RuneCountInString(m.GetFilename()) < 1 { - err := DataSourceValidationError{ - field: "Filename", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *DataSource_InlineBytes: - if v == nil { - err := DataSourceValidationError{ - field: "Specifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofSpecifierPresent = true - // no validation rules for InlineBytes - case *DataSource_InlineString: - if v == nil { - err := DataSourceValidationError{ - field: "Specifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofSpecifierPresent = true - // no validation rules for InlineString - case *DataSource_EnvironmentVariable: - if v == nil { - err := DataSourceValidationError{ - field: "Specifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofSpecifierPresent = true - - if utf8.RuneCountInString(m.GetEnvironmentVariable()) < 1 { - err := DataSourceValidationError{ - field: "EnvironmentVariable", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - if !oneofSpecifierPresent { - err := DataSourceValidationError{ - field: "Specifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return DataSourceMultiError(errors) - } - - return nil -} - -// DataSourceMultiError is an error wrapping multiple validation errors -// returned by DataSource.ValidateAll() if the designated constraints aren't met. -type DataSourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DataSourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DataSourceMultiError) AllErrors() []error { return m } - -// DataSourceValidationError is the validation error returned by -// DataSource.Validate if the designated constraints aren't met. -type DataSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DataSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DataSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DataSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DataSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DataSourceValidationError) ErrorName() string { return "DataSourceValidationError" } - -// Error satisfies the builtin error interface -func (e DataSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDataSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DataSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DataSourceValidationError{} - -// Validate checks the field values on RetryPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RetryPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RetryPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RetryPolicyMultiError, or -// nil if none found. -func (m *RetryPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *RetryPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetRetryBackOff()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RetryBackOff", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RetryBackOff", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "RetryBackOff", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetNumRetries()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "NumRetries", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "NumRetries", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "NumRetries", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RetryPolicyMultiError(errors) - } - - return nil -} - -// RetryPolicyMultiError is an error wrapping multiple validation errors -// returned by RetryPolicy.ValidateAll() if the designated constraints aren't met. -type RetryPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RetryPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RetryPolicyMultiError) AllErrors() []error { return m } - -// RetryPolicyValidationError is the validation error returned by -// RetryPolicy.Validate if the designated constraints aren't met. -type RetryPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicyValidationError) ErrorName() string { return "RetryPolicyValidationError" } - -// Error satisfies the builtin error interface -func (e RetryPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicyValidationError{} - -// Validate checks the field values on RemoteDataSource with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *RemoteDataSource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RemoteDataSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RemoteDataSourceMultiError, or nil if none found. -func (m *RemoteDataSource) ValidateAll() error { - return m.validate(true) -} - -func (m *RemoteDataSource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetHttpUri() == nil { - err := RemoteDataSourceValidationError{ - field: "HttpUri", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetHttpUri()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RemoteDataSourceValidationError{ - field: "HttpUri", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RemoteDataSourceValidationError{ - field: "HttpUri", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RemoteDataSourceValidationError{ - field: "HttpUri", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if utf8.RuneCountInString(m.GetSha256()) < 1 { - err := RemoteDataSourceValidationError{ - field: "Sha256", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetRetryPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RemoteDataSourceValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RemoteDataSourceValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RemoteDataSourceValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RemoteDataSourceMultiError(errors) - } - - return nil -} - -// RemoteDataSourceMultiError is an error wrapping multiple validation errors -// returned by RemoteDataSource.ValidateAll() if the designated constraints -// aren't met. -type RemoteDataSourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RemoteDataSourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RemoteDataSourceMultiError) AllErrors() []error { return m } - -// RemoteDataSourceValidationError is the validation error returned by -// RemoteDataSource.Validate if the designated constraints aren't met. -type RemoteDataSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RemoteDataSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RemoteDataSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RemoteDataSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RemoteDataSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RemoteDataSourceValidationError) ErrorName() string { return "RemoteDataSourceValidationError" } - -// Error satisfies the builtin error interface -func (e RemoteDataSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRemoteDataSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RemoteDataSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RemoteDataSourceValidationError{} - -// Validate checks the field values on AsyncDataSource with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *AsyncDataSource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AsyncDataSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// AsyncDataSourceMultiError, or nil if none found. -func (m *AsyncDataSource) ValidateAll() error { - return m.validate(true) -} - -func (m *AsyncDataSource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofSpecifierPresent := false - switch v := m.Specifier.(type) { - case *AsyncDataSource_Local: - if v == nil { - err := AsyncDataSourceValidationError{ - field: "Specifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofSpecifierPresent = true - - if all { - switch v := interface{}(m.GetLocal()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AsyncDataSourceValidationError{ - field: "Local", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AsyncDataSourceValidationError{ - field: "Local", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLocal()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AsyncDataSourceValidationError{ - field: "Local", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AsyncDataSource_Remote: - if v == nil { - err := AsyncDataSourceValidationError{ - field: "Specifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofSpecifierPresent = true - - if all { - switch v := interface{}(m.GetRemote()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AsyncDataSourceValidationError{ - field: "Remote", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AsyncDataSourceValidationError{ - field: "Remote", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRemote()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AsyncDataSourceValidationError{ - field: "Remote", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofSpecifierPresent { - err := AsyncDataSourceValidationError{ - field: "Specifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return AsyncDataSourceMultiError(errors) - } - - return nil -} - -// AsyncDataSourceMultiError is an error wrapping multiple validation errors -// returned by AsyncDataSource.ValidateAll() if the designated constraints -// aren't met. -type AsyncDataSourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AsyncDataSourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AsyncDataSourceMultiError) AllErrors() []error { return m } - -// AsyncDataSourceValidationError is the validation error returned by -// AsyncDataSource.Validate if the designated constraints aren't met. -type AsyncDataSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AsyncDataSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AsyncDataSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AsyncDataSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AsyncDataSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AsyncDataSourceValidationError) ErrorName() string { return "AsyncDataSourceValidationError" } - -// Error satisfies the builtin error interface -func (e AsyncDataSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAsyncDataSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AsyncDataSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AsyncDataSourceValidationError{} - -// Validate checks the field values on TransportSocket with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *TransportSocket) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TransportSocket with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// TransportSocketMultiError, or nil if none found. -func (m *TransportSocket) ValidateAll() error { - return m.validate(true) -} - -func (m *TransportSocket) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := TransportSocketValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - switch v := m.ConfigType.(type) { - case *TransportSocket_TypedConfig: - if v == nil { - err := TransportSocketValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TransportSocketValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TransportSocketValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TransportSocketValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return TransportSocketMultiError(errors) - } - - return nil -} - -// TransportSocketMultiError is an error wrapping multiple validation errors -// returned by TransportSocket.ValidateAll() if the designated constraints -// aren't met. -type TransportSocketMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TransportSocketMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TransportSocketMultiError) AllErrors() []error { return m } - -// TransportSocketValidationError is the validation error returned by -// TransportSocket.Validate if the designated constraints aren't met. -type TransportSocketValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TransportSocketValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TransportSocketValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TransportSocketValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TransportSocketValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TransportSocketValidationError) ErrorName() string { return "TransportSocketValidationError" } - -// Error satisfies the builtin error interface -func (e TransportSocketValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTransportSocket.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TransportSocketValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TransportSocketValidationError{} - -// Validate checks the field values on RuntimeFractionalPercent with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RuntimeFractionalPercent) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RuntimeFractionalPercent with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RuntimeFractionalPercentMultiError, or nil if none found. -func (m *RuntimeFractionalPercent) ValidateAll() error { - return m.validate(true) -} - -func (m *RuntimeFractionalPercent) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetDefaultValue() == nil { - err := RuntimeFractionalPercentValidationError{ - field: "DefaultValue", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetDefaultValue()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RuntimeFractionalPercentValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RuntimeFractionalPercentValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimeFractionalPercentValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for RuntimeKey - - if len(errors) > 0 { - return RuntimeFractionalPercentMultiError(errors) - } - - return nil -} - -// RuntimeFractionalPercentMultiError is an error wrapping multiple validation -// errors returned by RuntimeFractionalPercent.ValidateAll() if the designated -// constraints aren't met. -type RuntimeFractionalPercentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RuntimeFractionalPercentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RuntimeFractionalPercentMultiError) AllErrors() []error { return m } - -// RuntimeFractionalPercentValidationError is the validation error returned by -// RuntimeFractionalPercent.Validate if the designated constraints aren't met. -type RuntimeFractionalPercentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeFractionalPercentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeFractionalPercentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeFractionalPercentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeFractionalPercentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeFractionalPercentValidationError) ErrorName() string { - return "RuntimeFractionalPercentValidationError" -} - -// Error satisfies the builtin error interface -func (e RuntimeFractionalPercentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeFractionalPercent.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeFractionalPercentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeFractionalPercentValidationError{} - -// Validate checks the field values on ControlPlane with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ControlPlane) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ControlPlane with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ControlPlaneMultiError, or -// nil if none found. -func (m *ControlPlane) ValidateAll() error { - return m.validate(true) -} - -func (m *ControlPlane) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Identifier - - if len(errors) > 0 { - return ControlPlaneMultiError(errors) - } - - return nil -} - -// ControlPlaneMultiError is an error wrapping multiple validation errors -// returned by ControlPlane.ValidateAll() if the designated constraints aren't met. -type ControlPlaneMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ControlPlaneMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ControlPlaneMultiError) AllErrors() []error { return m } - -// ControlPlaneValidationError is the validation error returned by -// ControlPlane.Validate if the designated constraints aren't met. -type ControlPlaneValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ControlPlaneValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ControlPlaneValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ControlPlaneValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ControlPlaneValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ControlPlaneValidationError) ErrorName() string { return "ControlPlaneValidationError" } - -// Error satisfies the builtin error interface -func (e ControlPlaneValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sControlPlane.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ControlPlaneValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ControlPlaneValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/config_source.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/config_source.pb.go deleted file mode 100644 index 0ba48f39063..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/config_source.pb.go +++ /dev/null @@ -1,1203 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/config_source.proto - -package corev3 - -import ( - _ "github.com/cilium/proxy/go/envoy/annotations" - _ "github.com/cncf/xds/go/udpa/annotations" - v3 "github.com/cncf/xds/go/xds/core/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// xDS API and non-xDS services version. This is used to describe both resource and transport -// protocol versions (in distinct configuration fields). -type ApiVersion int32 - -const ( - // When not specified, we assume v2, to ease migration to Envoy's stable API - // versioning. If a client does not support v2 (e.g. due to deprecation), this - // is an invalid value. - // - // Deprecated: Do not use. - ApiVersion_AUTO ApiVersion = 0 - // Use xDS v2 API. - // - // Deprecated: Do not use. - ApiVersion_V2 ApiVersion = 1 - // Use xDS v3 API. - ApiVersion_V3 ApiVersion = 2 -) - -// Enum value maps for ApiVersion. -var ( - ApiVersion_name = map[int32]string{ - 0: "AUTO", - 1: "V2", - 2: "V3", - } - ApiVersion_value = map[string]int32{ - "AUTO": 0, - "V2": 1, - "V3": 2, - } -) - -func (x ApiVersion) Enum() *ApiVersion { - p := new(ApiVersion) - *p = x - return p -} - -func (x ApiVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ApiVersion) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_config_source_proto_enumTypes[0].Descriptor() -} - -func (ApiVersion) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_config_source_proto_enumTypes[0] -} - -func (x ApiVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ApiVersion.Descriptor instead. -func (ApiVersion) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{0} -} - -// APIs may be fetched via either REST or gRPC. -type ApiConfigSource_ApiType int32 - -const ( - // Ideally this would be 'reserved 0' but one can't reserve the default - // value. Instead we throw an exception if this is ever used. - // - // Deprecated: Do not use. - ApiConfigSource_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE ApiConfigSource_ApiType = 0 - // REST-JSON v2 API. The `canonical JSON encoding - // `_ for - // the v2 protos is used. - ApiConfigSource_REST ApiConfigSource_ApiType = 1 - // SotW gRPC service. - ApiConfigSource_GRPC ApiConfigSource_ApiType = 2 - // Using the delta xDS gRPC service, i.e. DeltaDiscovery{Request,Response} - // rather than Discovery{Request,Response}. Rather than sending Envoy the entire state - // with every update, the xDS server only sends what has changed since the last update. - ApiConfigSource_DELTA_GRPC ApiConfigSource_ApiType = 3 - // SotW xDS gRPC with ADS. All resources which resolve to this configuration source will be - // multiplexed on a single connection to an ADS endpoint. - // [#not-implemented-hide:] - ApiConfigSource_AGGREGATED_GRPC ApiConfigSource_ApiType = 5 - // Delta xDS gRPC with ADS. All resources which resolve to this configuration source will be - // multiplexed on a single connection to an ADS endpoint. - // [#not-implemented-hide:] - ApiConfigSource_AGGREGATED_DELTA_GRPC ApiConfigSource_ApiType = 6 -) - -// Enum value maps for ApiConfigSource_ApiType. -var ( - ApiConfigSource_ApiType_name = map[int32]string{ - 0: "DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE", - 1: "REST", - 2: "GRPC", - 3: "DELTA_GRPC", - 5: "AGGREGATED_GRPC", - 6: "AGGREGATED_DELTA_GRPC", - } - ApiConfigSource_ApiType_value = map[string]int32{ - "DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE": 0, - "REST": 1, - "GRPC": 2, - "DELTA_GRPC": 3, - "AGGREGATED_GRPC": 5, - "AGGREGATED_DELTA_GRPC": 6, - } -) - -func (x ApiConfigSource_ApiType) Enum() *ApiConfigSource_ApiType { - p := new(ApiConfigSource_ApiType) - *p = x - return p -} - -func (x ApiConfigSource_ApiType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ApiConfigSource_ApiType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_config_source_proto_enumTypes[1].Descriptor() -} - -func (ApiConfigSource_ApiType) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_config_source_proto_enumTypes[1] -} - -func (x ApiConfigSource_ApiType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ApiConfigSource_ApiType.Descriptor instead. -func (ApiConfigSource_ApiType) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{0, 0} -} - -// API configuration source. This identifies the API type and cluster that Envoy -// will use to fetch an xDS API. -// [#next-free-field: 10] -type ApiConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // API type (gRPC, REST, delta gRPC) - ApiType ApiConfigSource_ApiType `protobuf:"varint,1,opt,name=api_type,json=apiType,proto3,enum=envoy.config.core.v3.ApiConfigSource_ApiType" json:"api_type,omitempty"` - // API version for xDS transport protocol. This describes the xDS gRPC/REST - // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. - TransportApiVersion ApiVersion `protobuf:"varint,8,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v3.ApiVersion" json:"transport_api_version,omitempty"` - // Cluster names should be used only with REST. If > 1 - // cluster is defined, clusters will be cycled through if any kind of failure - // occurs. - // - // .. note:: - // - // The cluster with name ``cluster_name`` must be statically defined and its - // type must not be ``EDS``. - ClusterNames []string `protobuf:"bytes,2,rep,name=cluster_names,json=clusterNames,proto3" json:"cluster_names,omitempty"` - // Multiple gRPC services be provided for GRPC. If > 1 cluster is defined, - // services will be cycled through if any kind of failure occurs. - GrpcServices []*GrpcService `protobuf:"bytes,4,rep,name=grpc_services,json=grpcServices,proto3" json:"grpc_services,omitempty"` - // For REST APIs, the delay between successive polls. - RefreshDelay *durationpb.Duration `protobuf:"bytes,3,opt,name=refresh_delay,json=refreshDelay,proto3" json:"refresh_delay,omitempty"` - // For REST APIs, the request timeout. If not set, a default value of 1s will be used. - RequestTimeout *durationpb.Duration `protobuf:"bytes,5,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` - // For GRPC APIs, the rate limit settings. If present, discovery requests made by Envoy will be - // rate limited. - RateLimitSettings *RateLimitSettings `protobuf:"bytes,6,opt,name=rate_limit_settings,json=rateLimitSettings,proto3" json:"rate_limit_settings,omitempty"` - // Skip the node identifier in subsequent discovery requests for streaming gRPC config types. - SetNodeOnFirstMessageOnly bool `protobuf:"varint,7,opt,name=set_node_on_first_message_only,json=setNodeOnFirstMessageOnly,proto3" json:"set_node_on_first_message_only,omitempty"` - // A list of config validators that will be executed when a new update is - // received from the ApiConfigSource. Note that each validator handles a - // specific xDS service type, and only the validators corresponding to the - // type url (in “:ref: DiscoveryResponse“ or “:ref: DeltaDiscoveryResponse“) - // will be invoked. - // If the validator returns false or throws an exception, the config will be rejected by - // the client, and a NACK will be sent. - // [#extension-category: envoy.config.validators] - ConfigValidators []*TypedExtensionConfig `protobuf:"bytes,9,rep,name=config_validators,json=configValidators,proto3" json:"config_validators,omitempty"` -} - -func (x *ApiConfigSource) Reset() { - *x = ApiConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApiConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApiConfigSource) ProtoMessage() {} - -func (x *ApiConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApiConfigSource.ProtoReflect.Descriptor instead. -func (*ApiConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{0} -} - -func (x *ApiConfigSource) GetApiType() ApiConfigSource_ApiType { - if x != nil { - return x.ApiType - } - return ApiConfigSource_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE -} - -func (x *ApiConfigSource) GetTransportApiVersion() ApiVersion { - if x != nil { - return x.TransportApiVersion - } - return ApiVersion_AUTO -} - -func (x *ApiConfigSource) GetClusterNames() []string { - if x != nil { - return x.ClusterNames - } - return nil -} - -func (x *ApiConfigSource) GetGrpcServices() []*GrpcService { - if x != nil { - return x.GrpcServices - } - return nil -} - -func (x *ApiConfigSource) GetRefreshDelay() *durationpb.Duration { - if x != nil { - return x.RefreshDelay - } - return nil -} - -func (x *ApiConfigSource) GetRequestTimeout() *durationpb.Duration { - if x != nil { - return x.RequestTimeout - } - return nil -} - -func (x *ApiConfigSource) GetRateLimitSettings() *RateLimitSettings { - if x != nil { - return x.RateLimitSettings - } - return nil -} - -func (x *ApiConfigSource) GetSetNodeOnFirstMessageOnly() bool { - if x != nil { - return x.SetNodeOnFirstMessageOnly - } - return false -} - -func (x *ApiConfigSource) GetConfigValidators() []*TypedExtensionConfig { - if x != nil { - return x.ConfigValidators - } - return nil -} - -// Aggregated Discovery Service (ADS) options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to -// specify that ADS is to be used. -type AggregatedConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AggregatedConfigSource) Reset() { - *x = AggregatedConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AggregatedConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AggregatedConfigSource) ProtoMessage() {} - -func (x *AggregatedConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AggregatedConfigSource.ProtoReflect.Descriptor instead. -func (*AggregatedConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{1} -} - -// [#not-implemented-hide:] -// Self-referencing config source options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to -// specify that other data can be obtained from the same server. -type SelfConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // API version for xDS transport protocol. This describes the xDS gRPC/REST - // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. - TransportApiVersion ApiVersion `protobuf:"varint,1,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v3.ApiVersion" json:"transport_api_version,omitempty"` -} - -func (x *SelfConfigSource) Reset() { - *x = SelfConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SelfConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SelfConfigSource) ProtoMessage() {} - -func (x *SelfConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SelfConfigSource.ProtoReflect.Descriptor instead. -func (*SelfConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{2} -} - -func (x *SelfConfigSource) GetTransportApiVersion() ApiVersion { - if x != nil { - return x.TransportApiVersion - } - return ApiVersion_AUTO -} - -// Rate Limit settings to be applied for discovery requests made by Envoy. -type RateLimitSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Maximum number of tokens to be used for rate limiting discovery request calls. If not set, a - // default value of 100 will be used. - MaxTokens *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` - // Rate at which tokens will be filled per second. If not set, a default fill rate of 10 tokens - // per second will be used. - FillRate *wrapperspb.DoubleValue `protobuf:"bytes,2,opt,name=fill_rate,json=fillRate,proto3" json:"fill_rate,omitempty"` -} - -func (x *RateLimitSettings) Reset() { - *x = RateLimitSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitSettings) ProtoMessage() {} - -func (x *RateLimitSettings) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimitSettings.ProtoReflect.Descriptor instead. -func (*RateLimitSettings) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{3} -} - -func (x *RateLimitSettings) GetMaxTokens() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxTokens - } - return nil -} - -func (x *RateLimitSettings) GetFillRate() *wrapperspb.DoubleValue { - if x != nil { - return x.FillRate - } - return nil -} - -// Local filesystem path configuration source. -type PathConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Path on the filesystem to source and watch for configuration updates. - // When sourcing configuration for a :ref:`secret `, - // the certificate and key files are also watched for updates. - // - // .. note:: - // - // The path to the source must exist at config load time. - // - // .. note:: - // - // If ``watched_directory`` is *not* configured, Envoy will watch the file path for *moves*. - // This is because in general only moves are atomic. The same method of swapping files as is - // demonstrated in the :ref:`runtime documentation ` can be - // used here also. If ``watched_directory`` is configured, no watch will be placed directly on - // this path. Instead, the configured ``watched_directory`` will be used to trigger reloads of - // this path. This is required in certain deployment scenarios. See below for more information. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // If configured, this directory will be watched for *moves*. When an entry in this directory is - // moved to, the “path“ will be reloaded. This is required in certain deployment scenarios. - // - // Specifically, if trying to load an xDS resource using a - // `Kubernetes ConfigMap `_, the - // following configuration might be used: - // 1. Store xds.yaml inside a ConfigMap. - // 2. Mount the ConfigMap to “/config_map/xds“ - // 3. Configure path “/config_map/xds/xds.yaml“ - // 4. Configure watched directory “/config_map/xds“ - // - // The above configuration will ensure that Envoy watches the owning directory for moves which is - // required due to how Kubernetes manages ConfigMap symbolic links during atomic updates. - WatchedDirectory *WatchedDirectory `protobuf:"bytes,2,opt,name=watched_directory,json=watchedDirectory,proto3" json:"watched_directory,omitempty"` -} - -func (x *PathConfigSource) Reset() { - *x = PathConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PathConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PathConfigSource) ProtoMessage() {} - -func (x *PathConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PathConfigSource.ProtoReflect.Descriptor instead. -func (*PathConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{4} -} - -func (x *PathConfigSource) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *PathConfigSource) GetWatchedDirectory() *WatchedDirectory { - if x != nil { - return x.WatchedDirectory - } - return nil -} - -// Configuration for :ref:`listeners `, :ref:`clusters -// `, :ref:`routes -// `, :ref:`endpoints -// ` etc. may either be sourced from the -// filesystem or from an xDS API source. Filesystem configs are watched with -// inotify for updates. -// [#next-free-field: 9] -type ConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Authorities that this config source may be used for. An authority specified in a xdstp:// URL - // is resolved to a “ConfigSource“ prior to configuration fetch. This field provides the - // association between authority name and configuration source. - // [#not-implemented-hide:] - Authorities []*v3.Authority `protobuf:"bytes,7,rep,name=authorities,proto3" json:"authorities,omitempty"` - // Types that are assignable to ConfigSourceSpecifier: - // - // *ConfigSource_Path - // *ConfigSource_PathConfigSource - // *ConfigSource_ApiConfigSource - // *ConfigSource_Ads - // *ConfigSource_Self - ConfigSourceSpecifier isConfigSource_ConfigSourceSpecifier `protobuf_oneof:"config_source_specifier"` - // When this timeout is specified, Envoy will wait no longer than the specified time for first - // config response on this xDS subscription during the :ref:`initialization process - // `. After reaching the timeout, Envoy will move to the next - // initialization phase, even if the first config is not delivered yet. The timer is activated - // when the xDS API subscription starts, and is disarmed on first config update or on error. 0 - // means no timeout - Envoy will wait indefinitely for the first xDS config (unless another - // timeout applies). The default is 15s. - InitialFetchTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=initial_fetch_timeout,json=initialFetchTimeout,proto3" json:"initial_fetch_timeout,omitempty"` - // API version for xDS resources. This implies the type URLs that the client - // will request for resources and the resource type that the client will in - // turn expect to be delivered. - ResourceApiVersion ApiVersion `protobuf:"varint,6,opt,name=resource_api_version,json=resourceApiVersion,proto3,enum=envoy.config.core.v3.ApiVersion" json:"resource_api_version,omitempty"` -} - -func (x *ConfigSource) Reset() { - *x = ConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfigSource) ProtoMessage() {} - -func (x *ConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfigSource.ProtoReflect.Descriptor instead. -func (*ConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{5} -} - -func (x *ConfigSource) GetAuthorities() []*v3.Authority { - if x != nil { - return x.Authorities - } - return nil -} - -func (m *ConfigSource) GetConfigSourceSpecifier() isConfigSource_ConfigSourceSpecifier { - if m != nil { - return m.ConfigSourceSpecifier - } - return nil -} - -// Deprecated: Do not use. -func (x *ConfigSource) GetPath() string { - if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_Path); ok { - return x.Path - } - return "" -} - -func (x *ConfigSource) GetPathConfigSource() *PathConfigSource { - if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_PathConfigSource); ok { - return x.PathConfigSource - } - return nil -} - -func (x *ConfigSource) GetApiConfigSource() *ApiConfigSource { - if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_ApiConfigSource); ok { - return x.ApiConfigSource - } - return nil -} - -func (x *ConfigSource) GetAds() *AggregatedConfigSource { - if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_Ads); ok { - return x.Ads - } - return nil -} - -func (x *ConfigSource) GetSelf() *SelfConfigSource { - if x, ok := x.GetConfigSourceSpecifier().(*ConfigSource_Self); ok { - return x.Self - } - return nil -} - -func (x *ConfigSource) GetInitialFetchTimeout() *durationpb.Duration { - if x != nil { - return x.InitialFetchTimeout - } - return nil -} - -func (x *ConfigSource) GetResourceApiVersion() ApiVersion { - if x != nil { - return x.ResourceApiVersion - } - return ApiVersion_AUTO -} - -type isConfigSource_ConfigSourceSpecifier interface { - isConfigSource_ConfigSourceSpecifier() -} - -type ConfigSource_Path struct { - // Deprecated in favor of “path_config_source“. Use that field instead. - // - // Deprecated: Do not use. - Path string `protobuf:"bytes,1,opt,name=path,proto3,oneof"` -} - -type ConfigSource_PathConfigSource struct { - // Local filesystem path configuration source. - PathConfigSource *PathConfigSource `protobuf:"bytes,8,opt,name=path_config_source,json=pathConfigSource,proto3,oneof"` -} - -type ConfigSource_ApiConfigSource struct { - // API configuration source. - ApiConfigSource *ApiConfigSource `protobuf:"bytes,2,opt,name=api_config_source,json=apiConfigSource,proto3,oneof"` -} - -type ConfigSource_Ads struct { - // When set, ADS will be used to fetch resources. The ADS API configuration - // source in the bootstrap configuration is used. - Ads *AggregatedConfigSource `protobuf:"bytes,3,opt,name=ads,proto3,oneof"` -} - -type ConfigSource_Self struct { - // [#not-implemented-hide:] - // When set, the client will access the resources from the same server it got the - // ConfigSource from, although not necessarily from the same stream. This is similar to the - // :ref:`ads` field, except that the client may use a - // different stream to the same server. As a result, this field can be used for things - // like LRS that cannot be sent on an ADS stream. It can also be used to link from (e.g.) - // LDS to RDS on the same server without requiring the management server to know its name - // or required credentials. - // [#next-major-version: In xDS v3, consider replacing the ads field with this one, since - // this field can implicitly mean to use the same stream in the case where the ConfigSource - // is provided via ADS and the specified data can also be obtained via ADS.] - Self *SelfConfigSource `protobuf:"bytes,5,opt,name=self,proto3,oneof"` -} - -func (*ConfigSource_Path) isConfigSource_ConfigSourceSpecifier() {} - -func (*ConfigSource_PathConfigSource) isConfigSource_ConfigSourceSpecifier() {} - -func (*ConfigSource_ApiConfigSource) isConfigSource_ConfigSourceSpecifier() {} - -func (*ConfigSource_Ads) isConfigSource_ConfigSourceSpecifier() {} - -func (*ConfigSource_Self) isConfigSource_ConfigSourceSpecifier() {} - -// Configuration source specifier for a late-bound extension configuration. The -// parent resource is warmed until all the initial extension configurations are -// received, unless the flag to apply the default configuration is set. -// Subsequent extension updates are atomic on a per-worker basis. Once an -// extension configuration is applied to a request or a connection, it remains -// constant for the duration of processing. If the initial delivery of the -// extension configuration fails, due to a timeout for example, the optional -// default configuration is applied. Without a default configuration, the -// extension is disabled, until an extension configuration is received. The -// behavior of a disabled extension depends on the context. For example, a -// filter chain with a disabled extension filter rejects all incoming streams. -type ExtensionConfigSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConfigSource *ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` - // Optional default configuration to use as the initial configuration if - // there is a failure to receive the initial extension configuration or if - // “apply_default_config_without_warming“ flag is set. - DefaultConfig *anypb.Any `protobuf:"bytes,2,opt,name=default_config,json=defaultConfig,proto3" json:"default_config,omitempty"` - // Use the default config as the initial configuration without warming and - // waiting for the first discovery response. Requires the default configuration - // to be supplied. - ApplyDefaultConfigWithoutWarming bool `protobuf:"varint,3,opt,name=apply_default_config_without_warming,json=applyDefaultConfigWithoutWarming,proto3" json:"apply_default_config_without_warming,omitempty"` - // A set of permitted extension type URLs. Extension configuration updates are rejected - // if they do not match any type URL in the set. - TypeUrls []string `protobuf:"bytes,4,rep,name=type_urls,json=typeUrls,proto3" json:"type_urls,omitempty"` -} - -func (x *ExtensionConfigSource) Reset() { - *x = ExtensionConfigSource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtensionConfigSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtensionConfigSource) ProtoMessage() {} - -func (x *ExtensionConfigSource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_config_source_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtensionConfigSource.ProtoReflect.Descriptor instead. -func (*ExtensionConfigSource) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_config_source_proto_rawDescGZIP(), []int{6} -} - -func (x *ExtensionConfigSource) GetConfigSource() *ConfigSource { - if x != nil { - return x.ConfigSource - } - return nil -} - -func (x *ExtensionConfigSource) GetDefaultConfig() *anypb.Any { - if x != nil { - return x.DefaultConfig - } - return nil -} - -func (x *ExtensionConfigSource) GetApplyDefaultConfigWithoutWarming() bool { - if x != nil { - return x.ApplyDefaultConfigWithoutWarming - } - return false -} - -func (x *ExtensionConfigSource) GetTypeUrls() []string { - if x != nil { - return x.TypeUrls - } - return nil -} - -var File_envoy_config_core_v3_config_source_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_config_source_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, - 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x78, 0x64, 0x73, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, 0x06, 0x0a, 0x0f, 0x41, 0x70, 0x69, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x52, 0x0a, 0x08, - 0x61, 0x70, 0x69, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x41, 0x70, 0x69, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x70, 0x69, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x5e, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, - 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x0c, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3e, 0x0a, - 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x4c, 0x0a, - 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x57, 0x0a, 0x13, 0x72, - 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x52, 0x11, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x1e, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x73, 0x65, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4f, 0x6e, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x57, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x22, 0x92, 0x01, 0x0a, 0x07, 0x41, 0x70, 0x69, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x25, - 0x44, 0x45, 0x50, 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x55, - 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x44, 0x4f, 0x5f, 0x4e, 0x4f, - 0x54, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x00, 0x1a, 0x08, 0x08, 0x01, 0xa8, 0xf7, 0xb4, 0x8b, 0x02, - 0x01, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x47, - 0x52, 0x50, 0x43, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x4c, 0x54, 0x41, 0x5f, 0x47, - 0x52, 0x50, 0x43, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, - 0x54, 0x45, 0x44, 0x5f, 0x47, 0x52, 0x50, 0x43, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x47, - 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x44, 0x45, 0x4c, 0x54, 0x41, 0x5f, 0x47, - 0x52, 0x50, 0x43, 0x10, 0x06, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, - 0x49, 0x0a, 0x16, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x10, 0x53, - 0x65, 0x6c, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x5e, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, - 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x11, 0x52, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x3b, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x49, 0x0a, - 0x09, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0e, - 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x08, - 0x66, 0x69, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, - 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x10, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x53, 0x0a, 0x11, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, - 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x10, 0x77, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x8c, 0x05, 0x0a, 0x0c, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0b, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, - 0x30, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x56, 0x0a, 0x12, 0x70, 0x61, 0x74, - 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, - 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, - 0x10, 0x70, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x12, 0x53, 0x0a, 0x11, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x03, 0x61, 0x64, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x48, 0x00, 0x52, 0x03, 0x61, 0x64, 0x73, 0x12, 0x3c, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x66, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, - 0x6c, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, - 0x52, 0x04, 0x73, 0x65, 0x6c, 0x66, 0x12, 0x4d, 0x0a, 0x15, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x13, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x5c, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x69, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x1e, 0x0a, 0x17, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x9e, 0x02, 0x0a, 0x15, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x24, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x77, 0x69, 0x74, - 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x57, 0x61, 0x72, - 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x01, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x73, 0x2a, 0x40, 0x0a, 0x0a, 0x41, - 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x04, 0x41, 0x55, 0x54, - 0x4f, 0x10, 0x00, 0x1a, 0x0b, 0x08, 0x01, 0x8a, 0xf4, 0x9b, 0xb3, 0x05, 0x03, 0x33, 0x2e, 0x30, - 0x12, 0x13, 0x0a, 0x02, 0x56, 0x32, 0x10, 0x01, 0x1a, 0x0b, 0x08, 0x01, 0x8a, 0xf4, 0x9b, 0xb3, - 0x05, 0x03, 0x33, 0x2e, 0x30, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x33, 0x10, 0x02, 0x42, 0x85, 0x01, - 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, - 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_config_source_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_config_source_proto_rawDescData = file_envoy_config_core_v3_config_source_proto_rawDesc -) - -func file_envoy_config_core_v3_config_source_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_config_source_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_config_source_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_config_source_proto_rawDescData) - }) - return file_envoy_config_core_v3_config_source_proto_rawDescData -} - -var file_envoy_config_core_v3_config_source_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_config_core_v3_config_source_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_envoy_config_core_v3_config_source_proto_goTypes = []interface{}{ - (ApiVersion)(0), // 0: envoy.config.core.v3.ApiVersion - (ApiConfigSource_ApiType)(0), // 1: envoy.config.core.v3.ApiConfigSource.ApiType - (*ApiConfigSource)(nil), // 2: envoy.config.core.v3.ApiConfigSource - (*AggregatedConfigSource)(nil), // 3: envoy.config.core.v3.AggregatedConfigSource - (*SelfConfigSource)(nil), // 4: envoy.config.core.v3.SelfConfigSource - (*RateLimitSettings)(nil), // 5: envoy.config.core.v3.RateLimitSettings - (*PathConfigSource)(nil), // 6: envoy.config.core.v3.PathConfigSource - (*ConfigSource)(nil), // 7: envoy.config.core.v3.ConfigSource - (*ExtensionConfigSource)(nil), // 8: envoy.config.core.v3.ExtensionConfigSource - (*GrpcService)(nil), // 9: envoy.config.core.v3.GrpcService - (*durationpb.Duration)(nil), // 10: google.protobuf.Duration - (*TypedExtensionConfig)(nil), // 11: envoy.config.core.v3.TypedExtensionConfig - (*wrapperspb.UInt32Value)(nil), // 12: google.protobuf.UInt32Value - (*wrapperspb.DoubleValue)(nil), // 13: google.protobuf.DoubleValue - (*WatchedDirectory)(nil), // 14: envoy.config.core.v3.WatchedDirectory - (*v3.Authority)(nil), // 15: xds.core.v3.Authority - (*anypb.Any)(nil), // 16: google.protobuf.Any -} -var file_envoy_config_core_v3_config_source_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v3.ApiConfigSource.api_type:type_name -> envoy.config.core.v3.ApiConfigSource.ApiType - 0, // 1: envoy.config.core.v3.ApiConfigSource.transport_api_version:type_name -> envoy.config.core.v3.ApiVersion - 9, // 2: envoy.config.core.v3.ApiConfigSource.grpc_services:type_name -> envoy.config.core.v3.GrpcService - 10, // 3: envoy.config.core.v3.ApiConfigSource.refresh_delay:type_name -> google.protobuf.Duration - 10, // 4: envoy.config.core.v3.ApiConfigSource.request_timeout:type_name -> google.protobuf.Duration - 5, // 5: envoy.config.core.v3.ApiConfigSource.rate_limit_settings:type_name -> envoy.config.core.v3.RateLimitSettings - 11, // 6: envoy.config.core.v3.ApiConfigSource.config_validators:type_name -> envoy.config.core.v3.TypedExtensionConfig - 0, // 7: envoy.config.core.v3.SelfConfigSource.transport_api_version:type_name -> envoy.config.core.v3.ApiVersion - 12, // 8: envoy.config.core.v3.RateLimitSettings.max_tokens:type_name -> google.protobuf.UInt32Value - 13, // 9: envoy.config.core.v3.RateLimitSettings.fill_rate:type_name -> google.protobuf.DoubleValue - 14, // 10: envoy.config.core.v3.PathConfigSource.watched_directory:type_name -> envoy.config.core.v3.WatchedDirectory - 15, // 11: envoy.config.core.v3.ConfigSource.authorities:type_name -> xds.core.v3.Authority - 6, // 12: envoy.config.core.v3.ConfigSource.path_config_source:type_name -> envoy.config.core.v3.PathConfigSource - 2, // 13: envoy.config.core.v3.ConfigSource.api_config_source:type_name -> envoy.config.core.v3.ApiConfigSource - 3, // 14: envoy.config.core.v3.ConfigSource.ads:type_name -> envoy.config.core.v3.AggregatedConfigSource - 4, // 15: envoy.config.core.v3.ConfigSource.self:type_name -> envoy.config.core.v3.SelfConfigSource - 10, // 16: envoy.config.core.v3.ConfigSource.initial_fetch_timeout:type_name -> google.protobuf.Duration - 0, // 17: envoy.config.core.v3.ConfigSource.resource_api_version:type_name -> envoy.config.core.v3.ApiVersion - 7, // 18: envoy.config.core.v3.ExtensionConfigSource.config_source:type_name -> envoy.config.core.v3.ConfigSource - 16, // 19: envoy.config.core.v3.ExtensionConfigSource.default_config:type_name -> google.protobuf.Any - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_config_source_proto_init() } -func file_envoy_config_core_v3_config_source_proto_init() { - if File_envoy_config_core_v3_config_source_proto != nil { - return - } - file_envoy_config_core_v3_base_proto_init() - file_envoy_config_core_v3_extension_proto_init() - file_envoy_config_core_v3_grpc_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_config_source_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApiConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_config_source_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AggregatedConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_config_source_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SelfConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_config_source_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_config_source_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PathConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_config_source_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_config_source_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtensionConfigSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v3_config_source_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*ConfigSource_Path)(nil), - (*ConfigSource_PathConfigSource)(nil), - (*ConfigSource_ApiConfigSource)(nil), - (*ConfigSource_Ads)(nil), - (*ConfigSource_Self)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_config_source_proto_rawDesc, - NumEnums: 2, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_config_source_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_config_source_proto_depIdxs, - EnumInfos: file_envoy_config_core_v3_config_source_proto_enumTypes, - MessageInfos: file_envoy_config_core_v3_config_source_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_config_source_proto = out.File - file_envoy_config_core_v3_config_source_proto_rawDesc = nil - file_envoy_config_core_v3_config_source_proto_goTypes = nil - file_envoy_config_core_v3_config_source_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/config_source.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/config_source.pb.validate.go deleted file mode 100644 index edab1513527..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/config_source.pb.validate.go +++ /dev/null @@ -1,1344 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/config_source.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ApiConfigSource with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ApiConfigSource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ApiConfigSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ApiConfigSourceMultiError, or nil if none found. -func (m *ApiConfigSource) ValidateAll() error { - return m.validate(true) -} - -func (m *ApiConfigSource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := ApiConfigSource_ApiType_name[int32(m.GetApiType())]; !ok { - err := ApiConfigSourceValidationError{ - field: "ApiType", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if _, ok := ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - err := ApiConfigSourceValidationError{ - field: "TransportApiVersion", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetGrpcServices() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ApiConfigSourceValidationError{ - field: fmt.Sprintf("GrpcServices[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ApiConfigSourceValidationError{ - field: fmt.Sprintf("GrpcServices[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ApiConfigSourceValidationError{ - field: fmt.Sprintf("GrpcServices[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetRefreshDelay()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ApiConfigSourceValidationError{ - field: "RefreshDelay", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ApiConfigSourceValidationError{ - field: "RefreshDelay", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRefreshDelay()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ApiConfigSourceValidationError{ - field: "RefreshDelay", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if d := m.GetRequestTimeout(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = ApiConfigSourceValidationError{ - field: "RequestTimeout", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := ApiConfigSourceValidationError{ - field: "RequestTimeout", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if all { - switch v := interface{}(m.GetRateLimitSettings()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ApiConfigSourceValidationError{ - field: "RateLimitSettings", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ApiConfigSourceValidationError{ - field: "RateLimitSettings", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRateLimitSettings()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ApiConfigSourceValidationError{ - field: "RateLimitSettings", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for SetNodeOnFirstMessageOnly - - for idx, item := range m.GetConfigValidators() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ApiConfigSourceValidationError{ - field: fmt.Sprintf("ConfigValidators[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ApiConfigSourceValidationError{ - field: fmt.Sprintf("ConfigValidators[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ApiConfigSourceValidationError{ - field: fmt.Sprintf("ConfigValidators[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ApiConfigSourceMultiError(errors) - } - - return nil -} - -// ApiConfigSourceMultiError is an error wrapping multiple validation errors -// returned by ApiConfigSource.ValidateAll() if the designated constraints -// aren't met. -type ApiConfigSourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ApiConfigSourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ApiConfigSourceMultiError) AllErrors() []error { return m } - -// ApiConfigSourceValidationError is the validation error returned by -// ApiConfigSource.Validate if the designated constraints aren't met. -type ApiConfigSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ApiConfigSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ApiConfigSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ApiConfigSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ApiConfigSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ApiConfigSourceValidationError) ErrorName() string { return "ApiConfigSourceValidationError" } - -// Error satisfies the builtin error interface -func (e ApiConfigSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sApiConfigSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ApiConfigSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ApiConfigSourceValidationError{} - -// Validate checks the field values on AggregatedConfigSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *AggregatedConfigSource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AggregatedConfigSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// AggregatedConfigSourceMultiError, or nil if none found. -func (m *AggregatedConfigSource) ValidateAll() error { - return m.validate(true) -} - -func (m *AggregatedConfigSource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return AggregatedConfigSourceMultiError(errors) - } - - return nil -} - -// AggregatedConfigSourceMultiError is an error wrapping multiple validation -// errors returned by AggregatedConfigSource.ValidateAll() if the designated -// constraints aren't met. -type AggregatedConfigSourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AggregatedConfigSourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AggregatedConfigSourceMultiError) AllErrors() []error { return m } - -// AggregatedConfigSourceValidationError is the validation error returned by -// AggregatedConfigSource.Validate if the designated constraints aren't met. -type AggregatedConfigSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AggregatedConfigSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AggregatedConfigSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AggregatedConfigSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AggregatedConfigSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AggregatedConfigSourceValidationError) ErrorName() string { - return "AggregatedConfigSourceValidationError" -} - -// Error satisfies the builtin error interface -func (e AggregatedConfigSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAggregatedConfigSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AggregatedConfigSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AggregatedConfigSourceValidationError{} - -// Validate checks the field values on SelfConfigSource with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *SelfConfigSource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SelfConfigSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SelfConfigSourceMultiError, or nil if none found. -func (m *SelfConfigSource) ValidateAll() error { - return m.validate(true) -} - -func (m *SelfConfigSource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { - err := SelfConfigSourceValidationError{ - field: "TransportApiVersion", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return SelfConfigSourceMultiError(errors) - } - - return nil -} - -// SelfConfigSourceMultiError is an error wrapping multiple validation errors -// returned by SelfConfigSource.ValidateAll() if the designated constraints -// aren't met. -type SelfConfigSourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SelfConfigSourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SelfConfigSourceMultiError) AllErrors() []error { return m } - -// SelfConfigSourceValidationError is the validation error returned by -// SelfConfigSource.Validate if the designated constraints aren't met. -type SelfConfigSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SelfConfigSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SelfConfigSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SelfConfigSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SelfConfigSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SelfConfigSourceValidationError) ErrorName() string { return "SelfConfigSourceValidationError" } - -// Error satisfies the builtin error interface -func (e SelfConfigSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSelfConfigSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SelfConfigSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SelfConfigSourceValidationError{} - -// Validate checks the field values on RateLimitSettings with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *RateLimitSettings) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimitSettings with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RateLimitSettingsMultiError, or nil if none found. -func (m *RateLimitSettings) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitSettings) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetMaxTokens()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitSettingsValidationError{ - field: "MaxTokens", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitSettingsValidationError{ - field: "MaxTokens", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxTokens()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitSettingsValidationError{ - field: "MaxTokens", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetFillRate(); wrapper != nil { - - if wrapper.GetValue() <= 0 { - err := RateLimitSettingsValidationError{ - field: "FillRate", - reason: "value must be greater than 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(errors) > 0 { - return RateLimitSettingsMultiError(errors) - } - - return nil -} - -// RateLimitSettingsMultiError is an error wrapping multiple validation errors -// returned by RateLimitSettings.ValidateAll() if the designated constraints -// aren't met. -type RateLimitSettingsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitSettingsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitSettingsMultiError) AllErrors() []error { return m } - -// RateLimitSettingsValidationError is the validation error returned by -// RateLimitSettings.Validate if the designated constraints aren't met. -type RateLimitSettingsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitSettingsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitSettingsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitSettingsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitSettingsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitSettingsValidationError) ErrorName() string { - return "RateLimitSettingsValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitSettingsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitSettings.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitSettingsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitSettingsValidationError{} - -// Validate checks the field values on PathConfigSource with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *PathConfigSource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PathConfigSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PathConfigSourceMultiError, or nil if none found. -func (m *PathConfigSource) ValidateAll() error { - return m.validate(true) -} - -func (m *PathConfigSource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetPath()) < 1 { - err := PathConfigSourceValidationError{ - field: "Path", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetWatchedDirectory()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PathConfigSourceValidationError{ - field: "WatchedDirectory", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PathConfigSourceValidationError{ - field: "WatchedDirectory", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetWatchedDirectory()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PathConfigSourceValidationError{ - field: "WatchedDirectory", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return PathConfigSourceMultiError(errors) - } - - return nil -} - -// PathConfigSourceMultiError is an error wrapping multiple validation errors -// returned by PathConfigSource.ValidateAll() if the designated constraints -// aren't met. -type PathConfigSourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PathConfigSourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PathConfigSourceMultiError) AllErrors() []error { return m } - -// PathConfigSourceValidationError is the validation error returned by -// PathConfigSource.Validate if the designated constraints aren't met. -type PathConfigSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PathConfigSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PathConfigSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PathConfigSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PathConfigSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PathConfigSourceValidationError) ErrorName() string { return "PathConfigSourceValidationError" } - -// Error satisfies the builtin error interface -func (e PathConfigSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPathConfigSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PathConfigSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PathConfigSourceValidationError{} - -// Validate checks the field values on ConfigSource with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ConfigSource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ConfigSource with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ConfigSourceMultiError, or -// nil if none found. -func (m *ConfigSource) ValidateAll() error { - return m.validate(true) -} - -func (m *ConfigSource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetAuthorities() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: fmt.Sprintf("Authorities[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: fmt.Sprintf("Authorities[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: fmt.Sprintf("Authorities[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetInitialFetchTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: "InitialFetchTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: "InitialFetchTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetInitialFetchTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: "InitialFetchTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if _, ok := ApiVersion_name[int32(m.GetResourceApiVersion())]; !ok { - err := ConfigSourceValidationError{ - field: "ResourceApiVersion", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - oneofConfigSourceSpecifierPresent := false - switch v := m.ConfigSourceSpecifier.(type) { - case *ConfigSource_Path: - if v == nil { - err := ConfigSourceValidationError{ - field: "ConfigSourceSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofConfigSourceSpecifierPresent = true - // no validation rules for Path - case *ConfigSource_PathConfigSource: - if v == nil { - err := ConfigSourceValidationError{ - field: "ConfigSourceSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofConfigSourceSpecifierPresent = true - - if all { - switch v := interface{}(m.GetPathConfigSource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: "PathConfigSource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: "PathConfigSource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPathConfigSource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: "PathConfigSource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ConfigSource_ApiConfigSource: - if v == nil { - err := ConfigSourceValidationError{ - field: "ConfigSourceSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofConfigSourceSpecifierPresent = true - - if all { - switch v := interface{}(m.GetApiConfigSource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: "ApiConfigSource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: "ApiConfigSource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetApiConfigSource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: "ApiConfigSource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ConfigSource_Ads: - if v == nil { - err := ConfigSourceValidationError{ - field: "ConfigSourceSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofConfigSourceSpecifierPresent = true - - if all { - switch v := interface{}(m.GetAds()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: "Ads", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: "Ads", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAds()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: "Ads", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ConfigSource_Self: - if v == nil { - err := ConfigSourceValidationError{ - field: "ConfigSourceSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofConfigSourceSpecifierPresent = true - - if all { - switch v := interface{}(m.GetSelf()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: "Self", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ConfigSourceValidationError{ - field: "Self", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSelf()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ConfigSourceValidationError{ - field: "Self", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofConfigSourceSpecifierPresent { - err := ConfigSourceValidationError{ - field: "ConfigSourceSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ConfigSourceMultiError(errors) - } - - return nil -} - -// ConfigSourceMultiError is an error wrapping multiple validation errors -// returned by ConfigSource.ValidateAll() if the designated constraints aren't met. -type ConfigSourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ConfigSourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ConfigSourceMultiError) AllErrors() []error { return m } - -// ConfigSourceValidationError is the validation error returned by -// ConfigSource.Validate if the designated constraints aren't met. -type ConfigSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ConfigSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ConfigSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ConfigSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ConfigSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ConfigSourceValidationError) ErrorName() string { return "ConfigSourceValidationError" } - -// Error satisfies the builtin error interface -func (e ConfigSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sConfigSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ConfigSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ConfigSourceValidationError{} - -// Validate checks the field values on ExtensionConfigSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ExtensionConfigSource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ExtensionConfigSource with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ExtensionConfigSourceMultiError, or nil if none found. -func (m *ExtensionConfigSource) ValidateAll() error { - return m.validate(true) -} - -func (m *ExtensionConfigSource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetConfigSource() == nil { - err := ExtensionConfigSourceValidationError{ - field: "ConfigSource", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if a := m.GetConfigSource(); a != nil { - - } - - if all { - switch v := interface{}(m.GetDefaultConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ExtensionConfigSourceValidationError{ - field: "DefaultConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ExtensionConfigSourceValidationError{ - field: "DefaultConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDefaultConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtensionConfigSourceValidationError{ - field: "DefaultConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ApplyDefaultConfigWithoutWarming - - if len(m.GetTypeUrls()) < 1 { - err := ExtensionConfigSourceValidationError{ - field: "TypeUrls", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ExtensionConfigSourceMultiError(errors) - } - - return nil -} - -// ExtensionConfigSourceMultiError is an error wrapping multiple validation -// errors returned by ExtensionConfigSource.ValidateAll() if the designated -// constraints aren't met. -type ExtensionConfigSourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ExtensionConfigSourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ExtensionConfigSourceMultiError) AllErrors() []error { return m } - -// ExtensionConfigSourceValidationError is the validation error returned by -// ExtensionConfigSource.Validate if the designated constraints aren't met. -type ExtensionConfigSourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtensionConfigSourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtensionConfigSourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtensionConfigSourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtensionConfigSourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtensionConfigSourceValidationError) ErrorName() string { - return "ExtensionConfigSourceValidationError" -} - -// Error satisfies the builtin error interface -func (e ExtensionConfigSourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtensionConfigSource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtensionConfigSourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtensionConfigSourceValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/event_service_config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/event_service_config.pb.go deleted file mode 100644 index c293c92b1c8..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/event_service_config.pb.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/event_service_config.proto - -package corev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#not-implemented-hide:] -// Configuration of the event reporting service endpoint. -type EventServiceConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ConfigSourceSpecifier: - // - // *EventServiceConfig_GrpcService - ConfigSourceSpecifier isEventServiceConfig_ConfigSourceSpecifier `protobuf_oneof:"config_source_specifier"` -} - -func (x *EventServiceConfig) Reset() { - *x = EventServiceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_event_service_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventServiceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventServiceConfig) ProtoMessage() {} - -func (x *EventServiceConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_event_service_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EventServiceConfig.ProtoReflect.Descriptor instead. -func (*EventServiceConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_event_service_config_proto_rawDescGZIP(), []int{0} -} - -func (m *EventServiceConfig) GetConfigSourceSpecifier() isEventServiceConfig_ConfigSourceSpecifier { - if m != nil { - return m.ConfigSourceSpecifier - } - return nil -} - -func (x *EventServiceConfig) GetGrpcService() *GrpcService { - if x, ok := x.GetConfigSourceSpecifier().(*EventServiceConfig_GrpcService); ok { - return x.GrpcService - } - return nil -} - -type isEventServiceConfig_ConfigSourceSpecifier interface { - isEventServiceConfig_ConfigSourceSpecifier() -} - -type EventServiceConfig_GrpcService struct { - // Specifies the gRPC service that hosts the event reporting service. - GrpcService *GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3,oneof"` -} - -func (*EventServiceConfig_GrpcService) isEventServiceConfig_ConfigSourceSpecifier() {} - -var File_envoy_config_core_v3_event_service_config_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_event_service_config_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, - 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x01, 0x0a, 0x12, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x46, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x67, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, - 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x1e, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x8b, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x17, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, - 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_event_service_config_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_event_service_config_proto_rawDescData = file_envoy_config_core_v3_event_service_config_proto_rawDesc -) - -func file_envoy_config_core_v3_event_service_config_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_event_service_config_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_event_service_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_event_service_config_proto_rawDescData) - }) - return file_envoy_config_core_v3_event_service_config_proto_rawDescData -} - -var file_envoy_config_core_v3_event_service_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v3_event_service_config_proto_goTypes = []interface{}{ - (*EventServiceConfig)(nil), // 0: envoy.config.core.v3.EventServiceConfig - (*GrpcService)(nil), // 1: envoy.config.core.v3.GrpcService -} -var file_envoy_config_core_v3_event_service_config_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v3.EventServiceConfig.grpc_service:type_name -> envoy.config.core.v3.GrpcService - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_event_service_config_proto_init() } -func file_envoy_config_core_v3_event_service_config_proto_init() { - if File_envoy_config_core_v3_event_service_config_proto != nil { - return - } - file_envoy_config_core_v3_grpc_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_event_service_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventServiceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v3_event_service_config_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*EventServiceConfig_GrpcService)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_event_service_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_event_service_config_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_event_service_config_proto_depIdxs, - MessageInfos: file_envoy_config_core_v3_event_service_config_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_event_service_config_proto = out.File - file_envoy_config_core_v3_event_service_config_proto_rawDesc = nil - file_envoy_config_core_v3_event_service_config_proto_goTypes = nil - file_envoy_config_core_v3_event_service_config_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/event_service_config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/event_service_config.pb.validate.go deleted file mode 100644 index a55672c2759..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/event_service_config.pb.validate.go +++ /dev/null @@ -1,196 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/event_service_config.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on EventServiceConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *EventServiceConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on EventServiceConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// EventServiceConfigMultiError, or nil if none found. -func (m *EventServiceConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *EventServiceConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofConfigSourceSpecifierPresent := false - switch v := m.ConfigSourceSpecifier.(type) { - case *EventServiceConfig_GrpcService: - if v == nil { - err := EventServiceConfigValidationError{ - field: "ConfigSourceSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofConfigSourceSpecifierPresent = true - - if all { - switch v := interface{}(m.GetGrpcService()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, EventServiceConfigValidationError{ - field: "GrpcService", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, EventServiceConfigValidationError{ - field: "GrpcService", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EventServiceConfigValidationError{ - field: "GrpcService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofConfigSourceSpecifierPresent { - err := EventServiceConfigValidationError{ - field: "ConfigSourceSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return EventServiceConfigMultiError(errors) - } - - return nil -} - -// EventServiceConfigMultiError is an error wrapping multiple validation errors -// returned by EventServiceConfig.ValidateAll() if the designated constraints -// aren't met. -type EventServiceConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m EventServiceConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m EventServiceConfigMultiError) AllErrors() []error { return m } - -// EventServiceConfigValidationError is the validation error returned by -// EventServiceConfig.Validate if the designated constraints aren't met. -type EventServiceConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EventServiceConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EventServiceConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EventServiceConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EventServiceConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EventServiceConfigValidationError) ErrorName() string { - return "EventServiceConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e EventServiceConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEventServiceConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EventServiceConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EventServiceConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/extension.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/extension.pb.go deleted file mode 100644 index bb691cdd5ac..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/extension.pb.go +++ /dev/null @@ -1,190 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/extension.proto - -package corev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Message type for extension configuration. -// [#next-major-version: revisit all existing typed_config that doesn't use this wrapper.]. -type TypedExtensionConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of an extension. This is not used to select the extension, instead - // it serves the role of an opaque identifier. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The typed config for the extension. The type URL will be used to identify - // the extension. In the case that the type URL is “xds.type.v3.TypedStruct“ - // (or, for historical reasons, “udpa.type.v1.TypedStruct“), the inner type - // URL of “TypedStruct“ will be utilized. See the - // :ref:`extension configuration overview - // ` for further details. - TypedConfig *anypb.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` -} - -func (x *TypedExtensionConfig) Reset() { - *x = TypedExtensionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_extension_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TypedExtensionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TypedExtensionConfig) ProtoMessage() {} - -func (x *TypedExtensionConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_extension_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TypedExtensionConfig.ProtoReflect.Descriptor instead. -func (*TypedExtensionConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_extension_proto_rawDescGZIP(), []int{0} -} - -func (x *TypedExtensionConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TypedExtensionConfig) GetTypedConfig() *anypb.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -var File_envoy_config_core_v3_extension_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_extension_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x19, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x76, 0x0a, 0x14, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x82, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, - 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_extension_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_extension_proto_rawDescData = file_envoy_config_core_v3_extension_proto_rawDesc -) - -func file_envoy_config_core_v3_extension_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_extension_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_extension_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_extension_proto_rawDescData) - }) - return file_envoy_config_core_v3_extension_proto_rawDescData -} - -var file_envoy_config_core_v3_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v3_extension_proto_goTypes = []interface{}{ - (*TypedExtensionConfig)(nil), // 0: envoy.config.core.v3.TypedExtensionConfig - (*anypb.Any)(nil), // 1: google.protobuf.Any -} -var file_envoy_config_core_v3_extension_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v3.TypedExtensionConfig.typed_config:type_name -> google.protobuf.Any - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_extension_proto_init() } -func file_envoy_config_core_v3_extension_proto_init() { - if File_envoy_config_core_v3_extension_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_extension_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TypedExtensionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_extension_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_extension_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_extension_proto_depIdxs, - MessageInfos: file_envoy_config_core_v3_extension_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_extension_proto = out.File - file_envoy_config_core_v3_extension_proto_rawDesc = nil - file_envoy_config_core_v3_extension_proto_goTypes = nil - file_envoy_config_core_v3_extension_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/extension.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/extension.pb.validate.go deleted file mode 100644 index 9c915d3833d..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/extension.pb.validate.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/extension.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on TypedExtensionConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *TypedExtensionConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TypedExtensionConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// TypedExtensionConfigMultiError, or nil if none found. -func (m *TypedExtensionConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *TypedExtensionConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := TypedExtensionConfigValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetTypedConfig() == nil { - err := TypedExtensionConfigValidationError{ - field: "TypedConfig", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if a := m.GetTypedConfig(); a != nil { - - } - - if len(errors) > 0 { - return TypedExtensionConfigMultiError(errors) - } - - return nil -} - -// TypedExtensionConfigMultiError is an error wrapping multiple validation -// errors returned by TypedExtensionConfig.ValidateAll() if the designated -// constraints aren't met. -type TypedExtensionConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TypedExtensionConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TypedExtensionConfigMultiError) AllErrors() []error { return m } - -// TypedExtensionConfigValidationError is the validation error returned by -// TypedExtensionConfig.Validate if the designated constraints aren't met. -type TypedExtensionConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TypedExtensionConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TypedExtensionConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TypedExtensionConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TypedExtensionConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TypedExtensionConfigValidationError) ErrorName() string { - return "TypedExtensionConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e TypedExtensionConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTypedExtensionConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TypedExtensionConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TypedExtensionConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_method_list.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_method_list.pb.go deleted file mode 100644 index 8fc3cdb7503..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_method_list.pb.go +++ /dev/null @@ -1,251 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/grpc_method_list.proto - -package corev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// A list of gRPC methods which can be used as an allowlist, for example. -type GrpcMethodList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Services []*GrpcMethodList_Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` -} - -func (x *GrpcMethodList) Reset() { - *x = GrpcMethodList{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_method_list_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcMethodList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcMethodList) ProtoMessage() {} - -func (x *GrpcMethodList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_method_list_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcMethodList.ProtoReflect.Descriptor instead. -func (*GrpcMethodList) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_method_list_proto_rawDescGZIP(), []int{0} -} - -func (x *GrpcMethodList) GetServices() []*GrpcMethodList_Service { - if x != nil { - return x.Services - } - return nil -} - -type GrpcMethodList_Service struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the gRPC service. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The names of the gRPC methods in this service. - MethodNames []string `protobuf:"bytes,2,rep,name=method_names,json=methodNames,proto3" json:"method_names,omitempty"` -} - -func (x *GrpcMethodList_Service) Reset() { - *x = GrpcMethodList_Service{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_method_list_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcMethodList_Service) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcMethodList_Service) ProtoMessage() {} - -func (x *GrpcMethodList_Service) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_method_list_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcMethodList_Service.ProtoReflect.Descriptor instead. -func (*GrpcMethodList_Service) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_method_list_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *GrpcMethodList_Service) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *GrpcMethodList_Service) GetMethodNames() []string { - if x != nil { - return x.MethodNames - } - return nil -} - -var File_envoy_config_core_v3_grpc_method_list_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_grpc_method_list_proto_rawDesc = []byte{ - 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, - 0x02, 0x0a, 0x0e, 0x47, 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x48, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x84, 0x01, 0x0a, 0x07, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, - 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x87, 0x01, 0x0a, 0x22, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x42, 0x13, 0x47, 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, - 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_grpc_method_list_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_grpc_method_list_proto_rawDescData = file_envoy_config_core_v3_grpc_method_list_proto_rawDesc -) - -func file_envoy_config_core_v3_grpc_method_list_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_grpc_method_list_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_grpc_method_list_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_grpc_method_list_proto_rawDescData) - }) - return file_envoy_config_core_v3_grpc_method_list_proto_rawDescData -} - -var file_envoy_config_core_v3_grpc_method_list_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_config_core_v3_grpc_method_list_proto_goTypes = []interface{}{ - (*GrpcMethodList)(nil), // 0: envoy.config.core.v3.GrpcMethodList - (*GrpcMethodList_Service)(nil), // 1: envoy.config.core.v3.GrpcMethodList.Service -} -var file_envoy_config_core_v3_grpc_method_list_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v3.GrpcMethodList.services:type_name -> envoy.config.core.v3.GrpcMethodList.Service - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_grpc_method_list_proto_init() } -func file_envoy_config_core_v3_grpc_method_list_proto_init() { - if File_envoy_config_core_v3_grpc_method_list_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_grpc_method_list_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcMethodList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_method_list_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcMethodList_Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_grpc_method_list_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_grpc_method_list_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_grpc_method_list_proto_depIdxs, - MessageInfos: file_envoy_config_core_v3_grpc_method_list_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_grpc_method_list_proto = out.File - file_envoy_config_core_v3_grpc_method_list_proto_rawDesc = nil - file_envoy_config_core_v3_grpc_method_list_proto_goTypes = nil - file_envoy_config_core_v3_grpc_method_list_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_method_list.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_method_list.pb.validate.go deleted file mode 100644 index 4fc134e94e6..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_method_list.pb.validate.go +++ /dev/null @@ -1,294 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/grpc_method_list.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on GrpcMethodList with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *GrpcMethodList) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GrpcMethodList with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in GrpcMethodListMultiError, -// or nil if none found. -func (m *GrpcMethodList) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcMethodList) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetServices() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcMethodListValidationError{ - field: fmt.Sprintf("Services[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcMethodListValidationError{ - field: fmt.Sprintf("Services[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcMethodListValidationError{ - field: fmt.Sprintf("Services[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return GrpcMethodListMultiError(errors) - } - - return nil -} - -// GrpcMethodListMultiError is an error wrapping multiple validation errors -// returned by GrpcMethodList.ValidateAll() if the designated constraints -// aren't met. -type GrpcMethodListMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcMethodListMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcMethodListMultiError) AllErrors() []error { return m } - -// GrpcMethodListValidationError is the validation error returned by -// GrpcMethodList.Validate if the designated constraints aren't met. -type GrpcMethodListValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcMethodListValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcMethodListValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcMethodListValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcMethodListValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcMethodListValidationError) ErrorName() string { return "GrpcMethodListValidationError" } - -// Error satisfies the builtin error interface -func (e GrpcMethodListValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcMethodList.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcMethodListValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcMethodListValidationError{} - -// Validate checks the field values on GrpcMethodList_Service with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GrpcMethodList_Service) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GrpcMethodList_Service with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GrpcMethodList_ServiceMultiError, or nil if none found. -func (m *GrpcMethodList_Service) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcMethodList_Service) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := GrpcMethodList_ServiceValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetMethodNames()) < 1 { - err := GrpcMethodList_ServiceValidationError{ - field: "MethodNames", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return GrpcMethodList_ServiceMultiError(errors) - } - - return nil -} - -// GrpcMethodList_ServiceMultiError is an error wrapping multiple validation -// errors returned by GrpcMethodList_Service.ValidateAll() if the designated -// constraints aren't met. -type GrpcMethodList_ServiceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcMethodList_ServiceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcMethodList_ServiceMultiError) AllErrors() []error { return m } - -// GrpcMethodList_ServiceValidationError is the validation error returned by -// GrpcMethodList_Service.Validate if the designated constraints aren't met. -type GrpcMethodList_ServiceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcMethodList_ServiceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcMethodList_ServiceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcMethodList_ServiceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcMethodList_ServiceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcMethodList_ServiceValidationError) ErrorName() string { - return "GrpcMethodList_ServiceValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcMethodList_ServiceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcMethodList_Service.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcMethodList_ServiceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcMethodList_ServiceValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_service.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_service.pb.go deleted file mode 100644 index 47195db1413..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_service.pb.go +++ /dev/null @@ -1,1769 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/grpc_service.proto - -package corev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - structpb "google.golang.org/protobuf/types/known/structpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// gRPC service configuration. This is used by :ref:`ApiConfigSource -// ` and filter configurations. -// [#next-free-field: 6] -type GrpcService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to TargetSpecifier: - // - // *GrpcService_EnvoyGrpc_ - // *GrpcService_GoogleGrpc_ - TargetSpecifier isGrpcService_TargetSpecifier `protobuf_oneof:"target_specifier"` - // The timeout for the gRPC request. This is the timeout for a specific - // request. - Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` - // Additional metadata to include in streams initiated to the GrpcService. This can be used for - // scenarios in which additional ad hoc authorization headers (e.g. “x-foo-bar: baz-key“) are to - // be injected. For more information, including details on header value syntax, see the - // documentation on :ref:`custom request headers - // `. - InitialMetadata []*HeaderValue `protobuf:"bytes,5,rep,name=initial_metadata,json=initialMetadata,proto3" json:"initial_metadata,omitempty"` -} - -func (x *GrpcService) Reset() { - *x = GrpcService{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService) ProtoMessage() {} - -func (x *GrpcService) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService.ProtoReflect.Descriptor instead. -func (*GrpcService) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0} -} - -func (m *GrpcService) GetTargetSpecifier() isGrpcService_TargetSpecifier { - if m != nil { - return m.TargetSpecifier - } - return nil -} - -func (x *GrpcService) GetEnvoyGrpc() *GrpcService_EnvoyGrpc { - if x, ok := x.GetTargetSpecifier().(*GrpcService_EnvoyGrpc_); ok { - return x.EnvoyGrpc - } - return nil -} - -func (x *GrpcService) GetGoogleGrpc() *GrpcService_GoogleGrpc { - if x, ok := x.GetTargetSpecifier().(*GrpcService_GoogleGrpc_); ok { - return x.GoogleGrpc - } - return nil -} - -func (x *GrpcService) GetTimeout() *durationpb.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *GrpcService) GetInitialMetadata() []*HeaderValue { - if x != nil { - return x.InitialMetadata - } - return nil -} - -type isGrpcService_TargetSpecifier interface { - isGrpcService_TargetSpecifier() -} - -type GrpcService_EnvoyGrpc_ struct { - // Envoy's in-built gRPC client. - // See the :ref:`gRPC services overview ` - // documentation for discussion on gRPC client selection. - EnvoyGrpc *GrpcService_EnvoyGrpc `protobuf:"bytes,1,opt,name=envoy_grpc,json=envoyGrpc,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_ struct { - // `Google C++ gRPC client `_ - // See the :ref:`gRPC services overview ` - // documentation for discussion on gRPC client selection. - GoogleGrpc *GrpcService_GoogleGrpc `protobuf:"bytes,2,opt,name=google_grpc,json=googleGrpc,proto3,oneof"` -} - -func (*GrpcService_EnvoyGrpc_) isGrpcService_TargetSpecifier() {} - -func (*GrpcService_GoogleGrpc_) isGrpcService_TargetSpecifier() {} - -type GrpcService_EnvoyGrpc struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the upstream gRPC cluster. SSL credentials will be supplied - // in the :ref:`Cluster ` :ref:`transport_socket - // `. - ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` - // The “:authority“ header in the grpc request. If this field is not set, the authority header value will be “cluster_name“. - // Note that this authority does not override the SNI. The SNI is provided by the transport socket of the cluster. - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` - // Indicates the retry policy for re-establishing the gRPC stream - // This field is optional. If max interval is not provided, it will be set to ten times the provided base interval. - // Currently only supported for xDS gRPC streams. - // If not set, xDS gRPC streams default base interval:500ms, maximum interval:30s will be applied. - RetryPolicy *RetryPolicy `protobuf:"bytes,3,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` -} - -func (x *GrpcService_EnvoyGrpc) Reset() { - *x = GrpcService_EnvoyGrpc{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_EnvoyGrpc) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_EnvoyGrpc) ProtoMessage() {} - -func (x *GrpcService_EnvoyGrpc) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_EnvoyGrpc.ProtoReflect.Descriptor instead. -func (*GrpcService_EnvoyGrpc) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *GrpcService_EnvoyGrpc) GetClusterName() string { - if x != nil { - return x.ClusterName - } - return "" -} - -func (x *GrpcService_EnvoyGrpc) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *GrpcService_EnvoyGrpc) GetRetryPolicy() *RetryPolicy { - if x != nil { - return x.RetryPolicy - } - return nil -} - -// [#next-free-field: 9] -type GrpcService_GoogleGrpc struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The target URI when using the `Google C++ gRPC client - // `_. SSL credentials will be supplied in - // :ref:`channel_credentials `. - TargetUri string `protobuf:"bytes,1,opt,name=target_uri,json=targetUri,proto3" json:"target_uri,omitempty"` - ChannelCredentials *GrpcService_GoogleGrpc_ChannelCredentials `protobuf:"bytes,2,opt,name=channel_credentials,json=channelCredentials,proto3" json:"channel_credentials,omitempty"` - // A set of call credentials that can be composed with `channel credentials - // `_. - CallCredentials []*GrpcService_GoogleGrpc_CallCredentials `protobuf:"bytes,3,rep,name=call_credentials,json=callCredentials,proto3" json:"call_credentials,omitempty"` - // The human readable prefix to use when emitting statistics for the gRPC - // service. - // - // .. csv-table:: - // - // :header: Name, Type, Description - // :widths: 1, 1, 2 - // - // streams_total, Counter, Total number of streams opened - // streams_closed_, Counter, Total streams closed with - StatPrefix string `protobuf:"bytes,4,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` - // The name of the Google gRPC credentials factory to use. This must have been registered with - // Envoy. If this is empty, a default credentials factory will be used that sets up channel - // credentials based on other configuration parameters. - CredentialsFactoryName string `protobuf:"bytes,5,opt,name=credentials_factory_name,json=credentialsFactoryName,proto3" json:"credentials_factory_name,omitempty"` - // Additional configuration for site-specific customizations of the Google - // gRPC library. - Config *structpb.Struct `protobuf:"bytes,6,opt,name=config,proto3" json:"config,omitempty"` - // How many bytes each stream can buffer internally. - // If not set an implementation defined default is applied (1MiB). - PerStreamBufferLimitBytes *wrapperspb.UInt32Value `protobuf:"bytes,7,opt,name=per_stream_buffer_limit_bytes,json=perStreamBufferLimitBytes,proto3" json:"per_stream_buffer_limit_bytes,omitempty"` - // Custom channels args. - ChannelArgs *GrpcService_GoogleGrpc_ChannelArgs `protobuf:"bytes,8,opt,name=channel_args,json=channelArgs,proto3" json:"channel_args,omitempty"` -} - -func (x *GrpcService_GoogleGrpc) Reset() { - *x = GrpcService_GoogleGrpc{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *GrpcService_GoogleGrpc) GetTargetUri() string { - if x != nil { - return x.TargetUri - } - return "" -} - -func (x *GrpcService_GoogleGrpc) GetChannelCredentials() *GrpcService_GoogleGrpc_ChannelCredentials { - if x != nil { - return x.ChannelCredentials - } - return nil -} - -func (x *GrpcService_GoogleGrpc) GetCallCredentials() []*GrpcService_GoogleGrpc_CallCredentials { - if x != nil { - return x.CallCredentials - } - return nil -} - -func (x *GrpcService_GoogleGrpc) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -func (x *GrpcService_GoogleGrpc) GetCredentialsFactoryName() string { - if x != nil { - return x.CredentialsFactoryName - } - return "" -} - -func (x *GrpcService_GoogleGrpc) GetConfig() *structpb.Struct { - if x != nil { - return x.Config - } - return nil -} - -func (x *GrpcService_GoogleGrpc) GetPerStreamBufferLimitBytes() *wrapperspb.UInt32Value { - if x != nil { - return x.PerStreamBufferLimitBytes - } - return nil -} - -func (x *GrpcService_GoogleGrpc) GetChannelArgs() *GrpcService_GoogleGrpc_ChannelArgs { - if x != nil { - return x.ChannelArgs - } - return nil -} - -// See https://grpc.io/grpc/cpp/structgrpc_1_1_ssl_credentials_options.html. -type GrpcService_GoogleGrpc_SslCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // PEM encoded server root certificates. - RootCerts *DataSource `protobuf:"bytes,1,opt,name=root_certs,json=rootCerts,proto3" json:"root_certs,omitempty"` - // PEM encoded client private key. - PrivateKey *DataSource `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` - // PEM encoded client certificate chain. - CertChain *DataSource `protobuf:"bytes,3,opt,name=cert_chain,json=certChain,proto3" json:"cert_chain,omitempty"` -} - -func (x *GrpcService_GoogleGrpc_SslCredentials) Reset() { - *x = GrpcService_GoogleGrpc_SslCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_SslCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_SslCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_SslCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_SslCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_SslCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 1, 0} -} - -func (x *GrpcService_GoogleGrpc_SslCredentials) GetRootCerts() *DataSource { - if x != nil { - return x.RootCerts - } - return nil -} - -func (x *GrpcService_GoogleGrpc_SslCredentials) GetPrivateKey() *DataSource { - if x != nil { - return x.PrivateKey - } - return nil -} - -func (x *GrpcService_GoogleGrpc_SslCredentials) GetCertChain() *DataSource { - if x != nil { - return x.CertChain - } - return nil -} - -// Local channel credentials. Only UDS is supported for now. -// See https://github.com/grpc/grpc/pull/15909. -type GrpcService_GoogleGrpc_GoogleLocalCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GrpcService_GoogleGrpc_GoogleLocalCredentials) Reset() { - *x = GrpcService_GoogleGrpc_GoogleLocalCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_GoogleLocalCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_GoogleLocalCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_GoogleLocalCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_GoogleLocalCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_GoogleLocalCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 1, 1} -} - -// See https://grpc.io/docs/guides/auth.html#credential-types to understand Channel and Call -// credential types. -type GrpcService_GoogleGrpc_ChannelCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to CredentialSpecifier: - // - // *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials - // *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault - // *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials - CredentialSpecifier isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier `protobuf_oneof:"credential_specifier"` -} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) Reset() { - *x = GrpcService_GoogleGrpc_ChannelCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_ChannelCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_ChannelCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_ChannelCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 1, 2} -} - -func (m *GrpcService_GoogleGrpc_ChannelCredentials) GetCredentialSpecifier() isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier { - if m != nil { - return m.CredentialSpecifier - } - return nil -} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) GetSslCredentials() *GrpcService_GoogleGrpc_SslCredentials { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials); ok { - return x.SslCredentials - } - return nil -} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) GetGoogleDefault() *emptypb.Empty { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault); ok { - return x.GoogleDefault - } - return nil -} - -func (x *GrpcService_GoogleGrpc_ChannelCredentials) GetLocalCredentials() *GrpcService_GoogleGrpc_GoogleLocalCredentials { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials); ok { - return x.LocalCredentials - } - return nil -} - -type isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier interface { - isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier() -} - -type GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials struct { - SslCredentials *GrpcService_GoogleGrpc_SslCredentials `protobuf:"bytes,1,opt,name=ssl_credentials,json=sslCredentials,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault struct { - // https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 - GoogleDefault *emptypb.Empty `protobuf:"bytes,2,opt,name=google_default,json=googleDefault,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials struct { - LocalCredentials *GrpcService_GoogleGrpc_GoogleLocalCredentials `protobuf:"bytes,3,opt,name=local_credentials,json=localCredentials,proto3,oneof"` -} - -func (*GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials) isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault) isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials) isGrpcService_GoogleGrpc_ChannelCredentials_CredentialSpecifier() { -} - -// [#next-free-field: 8] -type GrpcService_GoogleGrpc_CallCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to CredentialSpecifier: - // - // *GrpcService_GoogleGrpc_CallCredentials_AccessToken - // *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine - // *GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken - // *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess - // *GrpcService_GoogleGrpc_CallCredentials_GoogleIam - // *GrpcService_GoogleGrpc_CallCredentials_FromPlugin - // *GrpcService_GoogleGrpc_CallCredentials_StsService_ - CredentialSpecifier isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier `protobuf_oneof:"credential_specifier"` -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) Reset() { - *x = GrpcService_GoogleGrpc_CallCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_CallCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_CallCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_CallCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_CallCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 1, 3} -} - -func (m *GrpcService_GoogleGrpc_CallCredentials) GetCredentialSpecifier() isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier { - if m != nil { - return m.CredentialSpecifier - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetAccessToken() string { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_AccessToken); ok { - return x.AccessToken - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetGoogleComputeEngine() *emptypb.Empty { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine); ok { - return x.GoogleComputeEngine - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetGoogleRefreshToken() string { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken); ok { - return x.GoogleRefreshToken - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetServiceAccountJwtAccess() *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess); ok { - return x.ServiceAccountJwtAccess - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetGoogleIam() *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_GoogleIam); ok { - return x.GoogleIam - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetFromPlugin() *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_FromPlugin); ok { - return x.FromPlugin - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials) GetStsService() *GrpcService_GoogleGrpc_CallCredentials_StsService { - if x, ok := x.GetCredentialSpecifier().(*GrpcService_GoogleGrpc_CallCredentials_StsService_); ok { - return x.StsService - } - return nil -} - -type isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier interface { - isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() -} - -type GrpcService_GoogleGrpc_CallCredentials_AccessToken struct { - // Access token credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#ad3a80da696ffdaea943f0f858d7a360d. - AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine struct { - // Google Compute Engine credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 - GoogleComputeEngine *emptypb.Empty `protobuf:"bytes,2,opt,name=google_compute_engine,json=googleComputeEngine,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken struct { - // Google refresh token credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a96901c997b91bc6513b08491e0dca37c. - GoogleRefreshToken string `protobuf:"bytes,3,opt,name=google_refresh_token,json=googleRefreshToken,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess struct { - // Service Account JWT Access credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a92a9f959d6102461f66ee973d8e9d3aa. - ServiceAccountJwtAccess *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials `protobuf:"bytes,4,opt,name=service_account_jwt_access,json=serviceAccountJwtAccess,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_GoogleIam struct { - // Google IAM credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a9fc1fc101b41e680d47028166e76f9d0. - GoogleIam *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials `protobuf:"bytes,5,opt,name=google_iam,json=googleIam,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_FromPlugin struct { - // Custom authenticator credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a823c6a4b19ffc71fb33e90154ee2ad07. - // https://grpc.io/docs/guides/auth.html#extending-grpc-to-support-other-authentication-mechanisms. - FromPlugin *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin `protobuf:"bytes,6,opt,name=from_plugin,json=fromPlugin,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_CallCredentials_StsService_ struct { - // Custom security token service which implements OAuth 2.0 token exchange. - // https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 - // See https://github.com/grpc/grpc/pull/19587. - StsService *GrpcService_GoogleGrpc_CallCredentials_StsService `protobuf:"bytes,7,opt,name=sts_service,json=stsService,proto3,oneof"` -} - -func (*GrpcService_GoogleGrpc_CallCredentials_AccessToken) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_GoogleIam) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_FromPlugin) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -func (*GrpcService_GoogleGrpc_CallCredentials_StsService_) isGrpcService_GoogleGrpc_CallCredentials_CredentialSpecifier() { -} - -// Channel arguments. -type GrpcService_GoogleGrpc_ChannelArgs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // See grpc_types.h GRPC_ARG #defines for keys that work here. - Args map[string]*GrpcService_GoogleGrpc_ChannelArgs_Value `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs) Reset() { - *x = GrpcService_GoogleGrpc_ChannelArgs{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_ChannelArgs) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_ChannelArgs) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_ChannelArgs.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_ChannelArgs) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 1, 4} -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs) GetArgs() map[string]*GrpcService_GoogleGrpc_ChannelArgs_Value { - if x != nil { - return x.Args - } - return nil -} - -type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - JsonKey string `protobuf:"bytes,1,opt,name=json_key,json=jsonKey,proto3" json:"json_key,omitempty"` - TokenLifetimeSeconds uint64 `protobuf:"varint,2,opt,name=token_lifetime_seconds,json=tokenLifetimeSeconds,proto3" json:"token_lifetime_seconds,omitempty"` -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Reset() { - *x = GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 1, 3, 0} -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) GetJsonKey() string { - if x != nil { - return x.JsonKey - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) GetTokenLifetimeSeconds() uint64 { - if x != nil { - return x.TokenLifetimeSeconds - } - return 0 -} - -type GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AuthorizationToken string `protobuf:"bytes,1,opt,name=authorization_token,json=authorizationToken,proto3" json:"authorization_token,omitempty"` - AuthoritySelector string `protobuf:"bytes,2,opt,name=authority_selector,json=authoritySelector,proto3" json:"authority_selector,omitempty"` -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Reset() { - *x = GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 1, 3, 1} -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) GetAuthorizationToken() string { - if x != nil { - return x.AuthorizationToken - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) GetAuthoritySelector() string { - if x != nil { - return x.AuthoritySelector - } - return "" -} - -type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // [#extension-category: envoy.grpc_credentials] - // - // Types that are assignable to ConfigType: - // - // *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig - ConfigType isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Reset() { - *x = GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 1, 3, 2} -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetConfigType() isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) GetTypedConfig() *anypb.Any { - if x, ok := x.GetConfigType().(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType interface { - isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType() -} - -type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig struct { - TypedConfig *anypb.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig) isGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_ConfigType() { -} - -// Security token service configuration that allows Google gRPC to -// fetch security token from an OAuth 2.0 authorization server. -// See https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 and -// https://github.com/grpc/grpc/pull/19587. -// [#next-free-field: 10] -type GrpcService_GoogleGrpc_CallCredentials_StsService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // URI of the token exchange service that handles token exchange requests. - // [#comment:TODO(asraa): Add URI validation when implemented. Tracked by - // https://github.com/bufbuild/protoc-gen-validate/issues/303] - TokenExchangeServiceUri string `protobuf:"bytes,1,opt,name=token_exchange_service_uri,json=tokenExchangeServiceUri,proto3" json:"token_exchange_service_uri,omitempty"` - // Location of the target service or resource where the client - // intends to use the requested security token. - Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - // Logical name of the target service where the client intends to - // use the requested security token. - Audience string `protobuf:"bytes,3,opt,name=audience,proto3" json:"audience,omitempty"` - // The desired scope of the requested security token in the - // context of the service or resource where the token will be used. - Scope string `protobuf:"bytes,4,opt,name=scope,proto3" json:"scope,omitempty"` - // Type of the requested security token. - RequestedTokenType string `protobuf:"bytes,5,opt,name=requested_token_type,json=requestedTokenType,proto3" json:"requested_token_type,omitempty"` - // The path of subject token, a security token that represents the - // identity of the party on behalf of whom the request is being made. - SubjectTokenPath string `protobuf:"bytes,6,opt,name=subject_token_path,json=subjectTokenPath,proto3" json:"subject_token_path,omitempty"` - // Type of the subject token. - SubjectTokenType string `protobuf:"bytes,7,opt,name=subject_token_type,json=subjectTokenType,proto3" json:"subject_token_type,omitempty"` - // The path of actor token, a security token that represents the identity - // of the acting party. The acting party is authorized to use the - // requested security token and act on behalf of the subject. - ActorTokenPath string `protobuf:"bytes,8,opt,name=actor_token_path,json=actorTokenPath,proto3" json:"actor_token_path,omitempty"` - // Type of the actor token. - ActorTokenType string `protobuf:"bytes,9,opt,name=actor_token_type,json=actorTokenType,proto3" json:"actor_token_type,omitempty"` -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) Reset() { - *x = GrpcService_GoogleGrpc_CallCredentials_StsService{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_CallCredentials_StsService) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_CallCredentials_StsService.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_CallCredentials_StsService) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 1, 3, 3} -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetTokenExchangeServiceUri() string { - if x != nil { - return x.TokenExchangeServiceUri - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetAudience() string { - if x != nil { - return x.Audience - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetScope() string { - if x != nil { - return x.Scope - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetRequestedTokenType() string { - if x != nil { - return x.RequestedTokenType - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetSubjectTokenPath() string { - if x != nil { - return x.SubjectTokenPath - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetSubjectTokenType() string { - if x != nil { - return x.SubjectTokenType - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetActorTokenPath() string { - if x != nil { - return x.ActorTokenPath - } - return "" -} - -func (x *GrpcService_GoogleGrpc_CallCredentials_StsService) GetActorTokenType() string { - if x != nil { - return x.ActorTokenType - } - return "" -} - -type GrpcService_GoogleGrpc_ChannelArgs_Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Pointer values are not supported, since they don't make any sense when - // delivered via the API. - // - // Types that are assignable to ValueSpecifier: - // - // *GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue - // *GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue - ValueSpecifier isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier `protobuf_oneof:"value_specifier"` -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs_Value) Reset() { - *x = GrpcService_GoogleGrpc_ChannelArgs_Value{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs_Value) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcService_GoogleGrpc_ChannelArgs_Value) ProtoMessage() {} - -func (x *GrpcService_GoogleGrpc_ChannelArgs_Value) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_grpc_service_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcService_GoogleGrpc_ChannelArgs_Value.ProtoReflect.Descriptor instead. -func (*GrpcService_GoogleGrpc_ChannelArgs_Value) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP(), []int{0, 1, 4, 0} -} - -func (m *GrpcService_GoogleGrpc_ChannelArgs_Value) GetValueSpecifier() isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier { - if m != nil { - return m.ValueSpecifier - } - return nil -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs_Value) GetStringValue() string { - if x, ok := x.GetValueSpecifier().(*GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue); ok { - return x.StringValue - } - return "" -} - -func (x *GrpcService_GoogleGrpc_ChannelArgs_Value) GetIntValue() int64 { - if x, ok := x.GetValueSpecifier().(*GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue); ok { - return x.IntValue - } - return 0 -} - -type isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier interface { - isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier() -} - -type GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue struct { - StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` -} - -type GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue struct { - IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` -} - -func (*GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue) isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier() { -} - -func (*GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue) isGrpcService_GoogleGrpc_ChannelArgs_Value_ValueSpecifier() { -} - -var File_envoy_config_core_v3_grpc_service_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_grpc_service_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, - 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x21, 0x0a, 0x0b, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x67, 0x72, 0x70, - 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, - 0x47, 0x72, 0x70, 0x63, 0x48, 0x00, 0x52, 0x09, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x47, 0x72, 0x70, - 0x63, 0x12, 0x4f, 0x0a, 0x0b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x70, 0x63, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x47, 0x72, 0x70, 0x63, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, - 0x70, 0x63, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4c, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xde, 0x01, 0x0a, 0x09, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x47, - 0x72, 0x70, 0x63, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x2f, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0x72, 0x0c, 0x10, 0x00, 0x28, 0x80, 0x80, 0x01, 0xc0, - 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x44, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, - 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6e, 0x76, - 0x6f, 0x79, 0x47, 0x72, 0x70, 0x63, 0x1a, 0xfa, 0x1c, 0x0a, 0x0a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x47, 0x72, 0x70, 0x63, 0x12, 0x26, 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, - 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x72, 0x69, 0x12, 0x70, 0x0a, - 0x13, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x12, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, - 0x67, 0x0a, 0x10, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x0f, 0x63, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, - 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x12, 0x38, 0x0a, 0x18, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x73, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x73, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5e, 0x0a, - 0x1d, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, - 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x19, 0x70, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x66, - 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x5b, 0x0a, - 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x72, 0x67, 0x73, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, - 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x52, 0x0b, 0x63, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x9d, 0x02, 0x0a, 0x0e, 0x53, - 0x73, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x3f, 0x0a, - 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x49, - 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x0a, 0x70, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x65, 0x72, - 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x09, 0x63, 0x65, 0x72, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, - 0x39, 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x6c, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x60, 0x0a, 0x16, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, - 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x92, 0x03, 0x0a, - 0x12, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x73, 0x73, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x6c, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x73, 0x6c, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x3f, 0x0a, 0x0e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0d, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x72, 0x0a, 0x11, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, - 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x10, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, - 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x42, 0x1b, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, - 0x01, 0x1a, 0x88, 0x0f, 0x0a, 0x0f, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x23, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x4c, 0x0a, 0x15, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x67, - 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x48, 0x00, 0x52, 0x13, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x75, - 0x74, 0x65, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x12, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x9e, 0x01, 0x0a, - 0x1a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x5f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, - 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x57, - 0x54, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x48, 0x00, 0x52, 0x17, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x77, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x72, 0x0a, - 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x69, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, - 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, - 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x09, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x61, - 0x6d, 0x12, 0x7d, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x12, 0x6a, 0x0a, 0x0b, 0x73, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, - 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x2e, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, - 0x52, 0x0a, 0x73, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0xd9, 0x01, 0x0a, - 0x22, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4a, - 0x57, 0x54, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x73, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x34, - 0x0a, 0x16, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, - 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x73, 0x3a, 0x62, 0x9a, 0xc5, 0x88, 0x1e, 0x5d, 0x0a, 0x5b, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x57, 0x54, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0xcc, 0x01, 0x0a, 0x14, 0x47, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, - 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x3a, 0x54, 0x9a, 0xc5, 0x88, 0x1e, 0x4f, 0x0a, 0x4d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, - 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x49, 0x41, 0x4d, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0xea, 0x01, 0x0a, 0x1d, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, - 0x72, 0x6f, 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, - 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x5d, 0x9a, 0xc5, 0x88, 0x1e, 0x58, 0x0a, - 0x56, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x46, 0x72, 0x6f, - 0x6d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xd7, 0x03, 0x0a, 0x0a, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x72, - 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x72, 0x69, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x30, - 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x35, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x35, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x10, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, - 0x0a, 0x10, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, - 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x2e, 0x53, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3f, - 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, - 0x43, 0x61, 0x6c, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x42, - 0x1b, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xc3, 0x02, 0x0a, - 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x12, 0x56, 0x0a, 0x04, - 0x61, 0x72, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x41, 0x72, 0x67, 0x73, 0x2e, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, - 0x61, 0x72, 0x67, 0x73, 0x1a, 0x63, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, - 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x16, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x77, 0x0a, 0x09, 0x41, 0x72, 0x67, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x54, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, - 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, 0x70, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x47, - 0x72, 0x70, 0x63, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x17, 0x0a, 0x10, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x42, 0x84, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, - 0x10, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, - 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_grpc_service_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_grpc_service_proto_rawDescData = file_envoy_config_core_v3_grpc_service_proto_rawDesc -) - -func file_envoy_config_core_v3_grpc_service_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_grpc_service_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_grpc_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_grpc_service_proto_rawDescData) - }) - return file_envoy_config_core_v3_grpc_service_proto_rawDescData -} - -var file_envoy_config_core_v3_grpc_service_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_envoy_config_core_v3_grpc_service_proto_goTypes = []interface{}{ - (*GrpcService)(nil), // 0: envoy.config.core.v3.GrpcService - (*GrpcService_EnvoyGrpc)(nil), // 1: envoy.config.core.v3.GrpcService.EnvoyGrpc - (*GrpcService_GoogleGrpc)(nil), // 2: envoy.config.core.v3.GrpcService.GoogleGrpc - (*GrpcService_GoogleGrpc_SslCredentials)(nil), // 3: envoy.config.core.v3.GrpcService.GoogleGrpc.SslCredentials - (*GrpcService_GoogleGrpc_GoogleLocalCredentials)(nil), // 4: envoy.config.core.v3.GrpcService.GoogleGrpc.GoogleLocalCredentials - (*GrpcService_GoogleGrpc_ChannelCredentials)(nil), // 5: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelCredentials - (*GrpcService_GoogleGrpc_CallCredentials)(nil), // 6: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials - (*GrpcService_GoogleGrpc_ChannelArgs)(nil), // 7: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs - (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials)(nil), // 8: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.ServiceAccountJWTAccessCredentials - (*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials)(nil), // 9: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.GoogleIAMCredentials - (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin)(nil), // 10: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin - (*GrpcService_GoogleGrpc_CallCredentials_StsService)(nil), // 11: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.StsService - (*GrpcService_GoogleGrpc_ChannelArgs_Value)(nil), // 12: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.Value - nil, // 13: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.ArgsEntry - (*durationpb.Duration)(nil), // 14: google.protobuf.Duration - (*HeaderValue)(nil), // 15: envoy.config.core.v3.HeaderValue - (*RetryPolicy)(nil), // 16: envoy.config.core.v3.RetryPolicy - (*structpb.Struct)(nil), // 17: google.protobuf.Struct - (*wrapperspb.UInt32Value)(nil), // 18: google.protobuf.UInt32Value - (*DataSource)(nil), // 19: envoy.config.core.v3.DataSource - (*emptypb.Empty)(nil), // 20: google.protobuf.Empty - (*anypb.Any)(nil), // 21: google.protobuf.Any -} -var file_envoy_config_core_v3_grpc_service_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v3.GrpcService.envoy_grpc:type_name -> envoy.config.core.v3.GrpcService.EnvoyGrpc - 2, // 1: envoy.config.core.v3.GrpcService.google_grpc:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc - 14, // 2: envoy.config.core.v3.GrpcService.timeout:type_name -> google.protobuf.Duration - 15, // 3: envoy.config.core.v3.GrpcService.initial_metadata:type_name -> envoy.config.core.v3.HeaderValue - 16, // 4: envoy.config.core.v3.GrpcService.EnvoyGrpc.retry_policy:type_name -> envoy.config.core.v3.RetryPolicy - 5, // 5: envoy.config.core.v3.GrpcService.GoogleGrpc.channel_credentials:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelCredentials - 6, // 6: envoy.config.core.v3.GrpcService.GoogleGrpc.call_credentials:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials - 17, // 7: envoy.config.core.v3.GrpcService.GoogleGrpc.config:type_name -> google.protobuf.Struct - 18, // 8: envoy.config.core.v3.GrpcService.GoogleGrpc.per_stream_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 7, // 9: envoy.config.core.v3.GrpcService.GoogleGrpc.channel_args:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs - 19, // 10: envoy.config.core.v3.GrpcService.GoogleGrpc.SslCredentials.root_certs:type_name -> envoy.config.core.v3.DataSource - 19, // 11: envoy.config.core.v3.GrpcService.GoogleGrpc.SslCredentials.private_key:type_name -> envoy.config.core.v3.DataSource - 19, // 12: envoy.config.core.v3.GrpcService.GoogleGrpc.SslCredentials.cert_chain:type_name -> envoy.config.core.v3.DataSource - 3, // 13: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelCredentials.ssl_credentials:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.SslCredentials - 20, // 14: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelCredentials.google_default:type_name -> google.protobuf.Empty - 4, // 15: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelCredentials.local_credentials:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.GoogleLocalCredentials - 20, // 16: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.google_compute_engine:type_name -> google.protobuf.Empty - 8, // 17: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.service_account_jwt_access:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.ServiceAccountJWTAccessCredentials - 9, // 18: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.google_iam:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.GoogleIAMCredentials - 10, // 19: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.from_plugin:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin - 11, // 20: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.sts_service:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.StsService - 13, // 21: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.args:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.ArgsEntry - 21, // 22: envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin.typed_config:type_name -> google.protobuf.Any - 12, // 23: envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.ArgsEntry.value:type_name -> envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.Value - 24, // [24:24] is the sub-list for method output_type - 24, // [24:24] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_grpc_service_proto_init() } -func file_envoy_config_core_v3_grpc_service_proto_init() { - if File_envoy_config_core_v3_grpc_service_proto != nil { - return - } - file_envoy_config_core_v3_base_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_grpc_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_EnvoyGrpc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_SslCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_GoogleLocalCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_ChannelCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_CallCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_ChannelArgs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_CallCredentials_StsService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcService_GoogleGrpc_ChannelArgs_Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*GrpcService_EnvoyGrpc_)(nil), - (*GrpcService_GoogleGrpc_)(nil), - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials)(nil), - (*GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault)(nil), - (*GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials)(nil), - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*GrpcService_GoogleGrpc_CallCredentials_AccessToken)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_GoogleIam)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_FromPlugin)(nil), - (*GrpcService_GoogleGrpc_CallCredentials_StsService_)(nil), - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[10].OneofWrappers = []interface{}{ - (*GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig)(nil), - } - file_envoy_config_core_v3_grpc_service_proto_msgTypes[12].OneofWrappers = []interface{}{ - (*GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue)(nil), - (*GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_grpc_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_grpc_service_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_grpc_service_proto_depIdxs, - MessageInfos: file_envoy_config_core_v3_grpc_service_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_grpc_service_proto = out.File - file_envoy_config_core_v3_grpc_service_proto_rawDesc = nil - file_envoy_config_core_v3_grpc_service_proto_goTypes = nil - file_envoy_config_core_v3_grpc_service_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_service.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_service.pb.validate.go deleted file mode 100644 index 8fd25237592..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/grpc_service.pb.validate.go +++ /dev/null @@ -1,2518 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/grpc_service.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on GrpcService with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *GrpcService) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GrpcService with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in GrpcServiceMultiError, or -// nil if none found. -func (m *GrpcService) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcServiceValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcServiceValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcServiceValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetInitialMetadata() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcServiceValidationError{ - field: fmt.Sprintf("InitialMetadata[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcServiceValidationError{ - field: fmt.Sprintf("InitialMetadata[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcServiceValidationError{ - field: fmt.Sprintf("InitialMetadata[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - oneofTargetSpecifierPresent := false - switch v := m.TargetSpecifier.(type) { - case *GrpcService_EnvoyGrpc_: - if v == nil { - err := GrpcServiceValidationError{ - field: "TargetSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTargetSpecifierPresent = true - - if all { - switch v := interface{}(m.GetEnvoyGrpc()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcServiceValidationError{ - field: "EnvoyGrpc", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcServiceValidationError{ - field: "EnvoyGrpc", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEnvoyGrpc()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcServiceValidationError{ - field: "EnvoyGrpc", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_: - if v == nil { - err := GrpcServiceValidationError{ - field: "TargetSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTargetSpecifierPresent = true - - if all { - switch v := interface{}(m.GetGoogleGrpc()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcServiceValidationError{ - field: "GoogleGrpc", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcServiceValidationError{ - field: "GoogleGrpc", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGoogleGrpc()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcServiceValidationError{ - field: "GoogleGrpc", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofTargetSpecifierPresent { - err := GrpcServiceValidationError{ - field: "TargetSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return GrpcServiceMultiError(errors) - } - - return nil -} - -// GrpcServiceMultiError is an error wrapping multiple validation errors -// returned by GrpcService.ValidateAll() if the designated constraints aren't met. -type GrpcServiceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcServiceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcServiceMultiError) AllErrors() []error { return m } - -// GrpcServiceValidationError is the validation error returned by -// GrpcService.Validate if the designated constraints aren't met. -type GrpcServiceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcServiceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcServiceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcServiceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcServiceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcServiceValidationError) ErrorName() string { return "GrpcServiceValidationError" } - -// Error satisfies the builtin error interface -func (e GrpcServiceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcServiceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcServiceValidationError{} - -// Validate checks the field values on GrpcService_EnvoyGrpc with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GrpcService_EnvoyGrpc) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GrpcService_EnvoyGrpc with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GrpcService_EnvoyGrpcMultiError, or nil if none found. -func (m *GrpcService_EnvoyGrpc) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_EnvoyGrpc) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetClusterName()) < 1 { - err := GrpcService_EnvoyGrpcValidationError{ - field: "ClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetAuthority()) < 0 { - err := GrpcService_EnvoyGrpcValidationError{ - field: "Authority", - reason: "value length must be at least 0 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetAuthority()) > 16384 { - err := GrpcService_EnvoyGrpcValidationError{ - field: "Authority", - reason: "value length must be at most 16384 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_GrpcService_EnvoyGrpc_Authority_Pattern.MatchString(m.GetAuthority()) { - err := GrpcService_EnvoyGrpcValidationError{ - field: "Authority", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetRetryPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_EnvoyGrpcValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_EnvoyGrpcValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_EnvoyGrpcValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GrpcService_EnvoyGrpcMultiError(errors) - } - - return nil -} - -// GrpcService_EnvoyGrpcMultiError is an error wrapping multiple validation -// errors returned by GrpcService_EnvoyGrpc.ValidateAll() if the designated -// constraints aren't met. -type GrpcService_EnvoyGrpcMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_EnvoyGrpcMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_EnvoyGrpcMultiError) AllErrors() []error { return m } - -// GrpcService_EnvoyGrpcValidationError is the validation error returned by -// GrpcService_EnvoyGrpc.Validate if the designated constraints aren't met. -type GrpcService_EnvoyGrpcValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_EnvoyGrpcValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_EnvoyGrpcValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_EnvoyGrpcValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_EnvoyGrpcValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_EnvoyGrpcValidationError) ErrorName() string { - return "GrpcService_EnvoyGrpcValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_EnvoyGrpcValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_EnvoyGrpc.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_EnvoyGrpcValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_EnvoyGrpcValidationError{} - -var _GrpcService_EnvoyGrpc_Authority_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on GrpcService_GoogleGrpc with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GrpcService_GoogleGrpc) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GrpcService_GoogleGrpc with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GrpcService_GoogleGrpcMultiError, or nil if none found. -func (m *GrpcService_GoogleGrpc) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_GoogleGrpc) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetTargetUri()) < 1 { - err := GrpcService_GoogleGrpcValidationError{ - field: "TargetUri", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetChannelCredentials()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpcValidationError{ - field: "ChannelCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpcValidationError{ - field: "ChannelCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetChannelCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: "ChannelCredentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetCallCredentials() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpcValidationError{ - field: fmt.Sprintf("CallCredentials[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpcValidationError{ - field: fmt.Sprintf("CallCredentials[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: fmt.Sprintf("CallCredentials[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { - err := GrpcService_GoogleGrpcValidationError{ - field: "StatPrefix", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for CredentialsFactoryName - - if all { - switch v := interface{}(m.GetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpcValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpcValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPerStreamBufferLimitBytes()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpcValidationError{ - field: "PerStreamBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpcValidationError{ - field: "PerStreamBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPerStreamBufferLimitBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: "PerStreamBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetChannelArgs()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpcValidationError{ - field: "ChannelArgs", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpcValidationError{ - field: "ChannelArgs", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetChannelArgs()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpcValidationError{ - field: "ChannelArgs", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GrpcService_GoogleGrpcMultiError(errors) - } - - return nil -} - -// GrpcService_GoogleGrpcMultiError is an error wrapping multiple validation -// errors returned by GrpcService_GoogleGrpc.ValidateAll() if the designated -// constraints aren't met. -type GrpcService_GoogleGrpcMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_GoogleGrpcMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_GoogleGrpcMultiError) AllErrors() []error { return m } - -// GrpcService_GoogleGrpcValidationError is the validation error returned by -// GrpcService_GoogleGrpc.Validate if the designated constraints aren't met. -type GrpcService_GoogleGrpcValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpcValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpcValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpcValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpcValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpcValidationError) ErrorName() string { - return "GrpcService_GoogleGrpcValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpcValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpcValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpcValidationError{} - -// Validate checks the field values on GrpcService_GoogleGrpc_SslCredentials -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *GrpcService_GoogleGrpc_SslCredentials) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GrpcService_GoogleGrpc_SslCredentials -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// GrpcService_GoogleGrpc_SslCredentialsMultiError, or nil if none found. -func (m *GrpcService_GoogleGrpc_SslCredentials) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_GoogleGrpc_SslCredentials) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetRootCerts()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "RootCerts", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "RootCerts", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRootCerts()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "RootCerts", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPrivateKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "PrivateKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "PrivateKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "PrivateKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCertChain()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "CertChain", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "CertChain", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCertChain()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_SslCredentialsValidationError{ - field: "CertChain", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GrpcService_GoogleGrpc_SslCredentialsMultiError(errors) - } - - return nil -} - -// GrpcService_GoogleGrpc_SslCredentialsMultiError is an error wrapping -// multiple validation errors returned by -// GrpcService_GoogleGrpc_SslCredentials.ValidateAll() if the designated -// constraints aren't met. -type GrpcService_GoogleGrpc_SslCredentialsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_GoogleGrpc_SslCredentialsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_GoogleGrpc_SslCredentialsMultiError) AllErrors() []error { return m } - -// GrpcService_GoogleGrpc_SslCredentialsValidationError is the validation error -// returned by GrpcService_GoogleGrpc_SslCredentials.Validate if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_SslCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_SslCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_SslCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_SslCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_SslCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_SslCredentialsValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_GoogleLocalCredentials with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// GrpcService_GoogleGrpc_GoogleLocalCredentials with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError, or nil if none found. -func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_GoogleGrpc_GoogleLocalCredentials) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError(errors) - } - - return nil -} - -// GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError is an error wrapping -// multiple validation errors returned by -// GrpcService_GoogleGrpc_GoogleLocalCredentials.ValidateAll() if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_GoogleGrpc_GoogleLocalCredentialsMultiError) AllErrors() []error { return m } - -// GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError is the -// validation error returned by -// GrpcService_GoogleGrpc_GoogleLocalCredentials.Validate if the designated -// constraints aren't met. -type GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_GoogleLocalCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_GoogleLocalCredentialsValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_ChannelCredentials with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *GrpcService_GoogleGrpc_ChannelCredentials) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// GrpcService_GoogleGrpc_ChannelCredentials with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// GrpcService_GoogleGrpc_ChannelCredentialsMultiError, or nil if none found. -func (m *GrpcService_GoogleGrpc_ChannelCredentials) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_GoogleGrpc_ChannelCredentials) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofCredentialSpecifierPresent := false - switch v := m.CredentialSpecifier.(type) { - case *GrpcService_GoogleGrpc_ChannelCredentials_SslCredentials: - if v == nil { - err := GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofCredentialSpecifierPresent = true - - if all { - switch v := interface{}(m.GetSslCredentials()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "SslCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "SslCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSslCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "SslCredentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_ChannelCredentials_GoogleDefault: - if v == nil { - err := GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofCredentialSpecifierPresent = true - - if all { - switch v := interface{}(m.GetGoogleDefault()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "GoogleDefault", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "GoogleDefault", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGoogleDefault()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "GoogleDefault", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_ChannelCredentials_LocalCredentials: - if v == nil { - err := GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofCredentialSpecifierPresent = true - - if all { - switch v := interface{}(m.GetLocalCredentials()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "LocalCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "LocalCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLocalCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "LocalCredentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofCredentialSpecifierPresent { - err := GrpcService_GoogleGrpc_ChannelCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return GrpcService_GoogleGrpc_ChannelCredentialsMultiError(errors) - } - - return nil -} - -// GrpcService_GoogleGrpc_ChannelCredentialsMultiError is an error wrapping -// multiple validation errors returned by -// GrpcService_GoogleGrpc_ChannelCredentials.ValidateAll() if the designated -// constraints aren't met. -type GrpcService_GoogleGrpc_ChannelCredentialsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_GoogleGrpc_ChannelCredentialsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_GoogleGrpc_ChannelCredentialsMultiError) AllErrors() []error { return m } - -// GrpcService_GoogleGrpc_ChannelCredentialsValidationError is the validation -// error returned by GrpcService_GoogleGrpc_ChannelCredentials.Validate if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_ChannelCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_ChannelCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_ChannelCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_ChannelCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_ChannelCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_ChannelCredentialsValidationError{} - -// Validate checks the field values on GrpcService_GoogleGrpc_CallCredentials -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *GrpcService_GoogleGrpc_CallCredentials) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// GrpcService_GoogleGrpc_CallCredentials with the rules defined in the proto -// definition for this message. If any rules are violated, the result is a -// list of violation errors wrapped in -// GrpcService_GoogleGrpc_CallCredentialsMultiError, or nil if none found. -func (m *GrpcService_GoogleGrpc_CallCredentials) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_GoogleGrpc_CallCredentials) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofCredentialSpecifierPresent := false - switch v := m.CredentialSpecifier.(type) { - case *GrpcService_GoogleGrpc_CallCredentials_AccessToken: - if v == nil { - err := GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofCredentialSpecifierPresent = true - // no validation rules for AccessToken - case *GrpcService_GoogleGrpc_CallCredentials_GoogleComputeEngine: - if v == nil { - err := GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofCredentialSpecifierPresent = true - - if all { - switch v := interface{}(m.GetGoogleComputeEngine()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "GoogleComputeEngine", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "GoogleComputeEngine", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGoogleComputeEngine()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "GoogleComputeEngine", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_CallCredentials_GoogleRefreshToken: - if v == nil { - err := GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofCredentialSpecifierPresent = true - // no validation rules for GoogleRefreshToken - case *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJwtAccess: - if v == nil { - err := GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofCredentialSpecifierPresent = true - - if all { - switch v := interface{}(m.GetServiceAccountJwtAccess()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "ServiceAccountJwtAccess", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "ServiceAccountJwtAccess", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetServiceAccountJwtAccess()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "ServiceAccountJwtAccess", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_CallCredentials_GoogleIam: - if v == nil { - err := GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofCredentialSpecifierPresent = true - - if all { - switch v := interface{}(m.GetGoogleIam()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "GoogleIam", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "GoogleIam", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGoogleIam()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "GoogleIam", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_CallCredentials_FromPlugin: - if v == nil { - err := GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofCredentialSpecifierPresent = true - - if all { - switch v := interface{}(m.GetFromPlugin()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "FromPlugin", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "FromPlugin", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFromPlugin()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "FromPlugin", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *GrpcService_GoogleGrpc_CallCredentials_StsService_: - if v == nil { - err := GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofCredentialSpecifierPresent = true - - if all { - switch v := interface{}(m.GetStsService()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "StsService", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "StsService", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetStsService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "StsService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofCredentialSpecifierPresent { - err := GrpcService_GoogleGrpc_CallCredentialsValidationError{ - field: "CredentialSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return GrpcService_GoogleGrpc_CallCredentialsMultiError(errors) - } - - return nil -} - -// GrpcService_GoogleGrpc_CallCredentialsMultiError is an error wrapping -// multiple validation errors returned by -// GrpcService_GoogleGrpc_CallCredentials.ValidateAll() if the designated -// constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentialsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_GoogleGrpc_CallCredentialsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_GoogleGrpc_CallCredentialsMultiError) AllErrors() []error { return m } - -// GrpcService_GoogleGrpc_CallCredentialsValidationError is the validation -// error returned by GrpcService_GoogleGrpc_CallCredentials.Validate if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_CallCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_CallCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_CallCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_CallCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_CallCredentialsValidationError{} - -// Validate checks the field values on GrpcService_GoogleGrpc_ChannelArgs with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *GrpcService_GoogleGrpc_ChannelArgs) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GrpcService_GoogleGrpc_ChannelArgs -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// GrpcService_GoogleGrpc_ChannelArgsMultiError, or nil if none found. -func (m *GrpcService_GoogleGrpc_ChannelArgs) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_GoogleGrpc_ChannelArgs) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - { - sorted_keys := make([]string, len(m.GetArgs())) - i := 0 - for key := range m.GetArgs() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetArgs()[key] - _ = val - - // no validation rules for Args[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_ChannelArgsValidationError{ - field: fmt.Sprintf("Args[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_ChannelArgsValidationError{ - field: fmt.Sprintf("Args[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_ChannelArgsValidationError{ - field: fmt.Sprintf("Args[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(errors) > 0 { - return GrpcService_GoogleGrpc_ChannelArgsMultiError(errors) - } - - return nil -} - -// GrpcService_GoogleGrpc_ChannelArgsMultiError is an error wrapping multiple -// validation errors returned by -// GrpcService_GoogleGrpc_ChannelArgs.ValidateAll() if the designated -// constraints aren't met. -type GrpcService_GoogleGrpc_ChannelArgsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_GoogleGrpc_ChannelArgsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_GoogleGrpc_ChannelArgsMultiError) AllErrors() []error { return m } - -// GrpcService_GoogleGrpc_ChannelArgsValidationError is the validation error -// returned by GrpcService_GoogleGrpc_ChannelArgs.Validate if the designated -// constraints aren't met. -type GrpcService_GoogleGrpc_ChannelArgsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_ChannelArgsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_ChannelArgsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_ChannelArgs.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_ChannelArgsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_ChannelArgsValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError, -// or nil if none found. -func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for JsonKey - - // no validation rules for TokenLifetimeSeconds - - if len(errors) > 0 { - return GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError(errors) - } - - return nil -} - -// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError -// is an error wrapping multiple validation errors returned by -// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.ValidateAll() -// if the designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsMultiError) AllErrors() []error { - return m -} - -// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError -// is the validation error returned by -// GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.Validate -// if the designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentialsValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError, or -// nil if none found. -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for AuthorizationToken - - // no validation rules for AuthoritySelector - - if len(errors) > 0 { - return GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError(errors) - } - - return nil -} - -// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError is an -// error wrapping multiple validation errors returned by -// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.ValidateAll() -// if the designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsMultiError) AllErrors() []error { - return m -} - -// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError -// is the validation error returned by -// GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.Validate if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentialsValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError, -// or nil if none found. -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - switch v := m.ConfigType.(type) { - case *GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_TypedConfig: - if v == nil { - err := GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError(errors) - } - - return nil -} - -// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError -// is an error wrapping multiple validation errors returned by -// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.ValidateAll() -// if the designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginMultiError) AllErrors() []error { - return m -} - -// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError -// is the validation error returned by -// GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.Validate -// if the designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPluginValidationError{} - -// Validate checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_StsService with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// GrpcService_GoogleGrpc_CallCredentials_StsService with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in -// GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError, or nil if none found. -func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_GoogleGrpc_CallCredentials_StsService) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for TokenExchangeServiceUri - - // no validation rules for Resource - - // no validation rules for Audience - - // no validation rules for Scope - - // no validation rules for RequestedTokenType - - if utf8.RuneCountInString(m.GetSubjectTokenPath()) < 1 { - err := GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ - field: "SubjectTokenPath", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetSubjectTokenType()) < 1 { - err := GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{ - field: "SubjectTokenType", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for ActorTokenPath - - // no validation rules for ActorTokenType - - if len(errors) > 0 { - return GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError(errors) - } - - return nil -} - -// GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError is an error -// wrapping multiple validation errors returned by -// GrpcService_GoogleGrpc_CallCredentials_StsService.ValidateAll() if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_GoogleGrpc_CallCredentials_StsServiceMultiError) AllErrors() []error { return m } - -// GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError is the -// validation error returned by -// GrpcService_GoogleGrpc_CallCredentials_StsService.Validate if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_CallCredentials_StsService.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_CallCredentials_StsServiceValidationError{} - -// Validate checks the field values on GrpcService_GoogleGrpc_ChannelArgs_Value -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *GrpcService_GoogleGrpc_ChannelArgs_Value) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// GrpcService_GoogleGrpc_ChannelArgs_Value with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError, or nil if none found. -func (m *GrpcService_GoogleGrpc_ChannelArgs_Value) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcService_GoogleGrpc_ChannelArgs_Value) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofValueSpecifierPresent := false - switch v := m.ValueSpecifier.(type) { - case *GrpcService_GoogleGrpc_ChannelArgs_Value_StringValue: - if v == nil { - err := GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{ - field: "ValueSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofValueSpecifierPresent = true - // no validation rules for StringValue - case *GrpcService_GoogleGrpc_ChannelArgs_Value_IntValue: - if v == nil { - err := GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{ - field: "ValueSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofValueSpecifierPresent = true - // no validation rules for IntValue - default: - _ = v // ensures v is used - } - if !oneofValueSpecifierPresent { - err := GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{ - field: "ValueSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError(errors) - } - - return nil -} - -// GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError is an error wrapping -// multiple validation errors returned by -// GrpcService_GoogleGrpc_ChannelArgs_Value.ValidateAll() if the designated -// constraints aren't met. -type GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcService_GoogleGrpc_ChannelArgs_ValueMultiError) AllErrors() []error { return m } - -// GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError is the validation -// error returned by GrpcService_GoogleGrpc_ChannelArgs_Value.Validate if the -// designated constraints aren't met. -type GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) ErrorName() string { - return "GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcService_GoogleGrpc_ChannelArgs_Value.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcService_GoogleGrpc_ChannelArgs_ValueValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/health_check.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/health_check.pb.go deleted file mode 100644 index 0076971468c..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/health_check.pb.go +++ /dev/null @@ -1,1670 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/health_check.proto - -package corev3 - -import ( - _ "github.com/cilium/proxy/go/envoy/annotations" - v31 "github.com/cilium/proxy/go/envoy/type/matcher/v3" - v3 "github.com/cilium/proxy/go/envoy/type/v3" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - structpb "google.golang.org/protobuf/types/known/structpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Endpoint health status. -type HealthStatus int32 - -const ( - // The health status is not known. This is interpreted by Envoy as “HEALTHY“. - HealthStatus_UNKNOWN HealthStatus = 0 - // Healthy. - HealthStatus_HEALTHY HealthStatus = 1 - // Unhealthy. - HealthStatus_UNHEALTHY HealthStatus = 2 - // Connection draining in progress. E.g., - // ``_ - // or - // ``_. - // This is interpreted by Envoy as “UNHEALTHY“. - HealthStatus_DRAINING HealthStatus = 3 - // Health check timed out. This is part of HDS and is interpreted by Envoy as - // “UNHEALTHY“. - HealthStatus_TIMEOUT HealthStatus = 4 - // Degraded. - HealthStatus_DEGRADED HealthStatus = 5 -) - -// Enum value maps for HealthStatus. -var ( - HealthStatus_name = map[int32]string{ - 0: "UNKNOWN", - 1: "HEALTHY", - 2: "UNHEALTHY", - 3: "DRAINING", - 4: "TIMEOUT", - 5: "DEGRADED", - } - HealthStatus_value = map[string]int32{ - "UNKNOWN": 0, - "HEALTHY": 1, - "UNHEALTHY": 2, - "DRAINING": 3, - "TIMEOUT": 4, - "DEGRADED": 5, - } -) - -func (x HealthStatus) Enum() *HealthStatus { - p := new(HealthStatus) - *p = x - return p -} - -func (x HealthStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HealthStatus) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_health_check_proto_enumTypes[0].Descriptor() -} - -func (HealthStatus) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_health_check_proto_enumTypes[0] -} - -func (x HealthStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HealthStatus.Descriptor instead. -func (HealthStatus) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0} -} - -type HealthStatusSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An order-independent set of health status. - Statuses []HealthStatus `protobuf:"varint,1,rep,packed,name=statuses,proto3,enum=envoy.config.core.v3.HealthStatus" json:"statuses,omitempty"` -} - -func (x *HealthStatusSet) Reset() { - *x = HealthStatusSet{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthStatusSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthStatusSet) ProtoMessage() {} - -func (x *HealthStatusSet) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthStatusSet.ProtoReflect.Descriptor instead. -func (*HealthStatusSet) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{0} -} - -func (x *HealthStatusSet) GetStatuses() []HealthStatus { - if x != nil { - return x.Statuses - } - return nil -} - -// [#next-free-field: 26] -type HealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The time to wait for a health check response. If the timeout is reached the - // health check attempt will be considered a failure. - Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"` - // The interval between health checks. - Interval *durationpb.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` - // An optional jitter amount in milliseconds. If specified, Envoy will start health - // checking after for a random time in ms between 0 and initial_jitter. This only - // applies to the first health check. - InitialJitter *durationpb.Duration `protobuf:"bytes,20,opt,name=initial_jitter,json=initialJitter,proto3" json:"initial_jitter,omitempty"` - // An optional jitter amount in milliseconds. If specified, during every - // interval Envoy will add interval_jitter to the wait time. - IntervalJitter *durationpb.Duration `protobuf:"bytes,3,opt,name=interval_jitter,json=intervalJitter,proto3" json:"interval_jitter,omitempty"` - // An optional jitter amount as a percentage of interval_ms. If specified, - // during every interval Envoy will add “interval_ms“ * - // “interval_jitter_percent“ / 100 to the wait time. - // - // If interval_jitter_ms and interval_jitter_percent are both set, both of - // them will be used to increase the wait time. - IntervalJitterPercent uint32 `protobuf:"varint,18,opt,name=interval_jitter_percent,json=intervalJitterPercent,proto3" json:"interval_jitter_percent,omitempty"` - // The number of unhealthy health checks required before a host is marked - // unhealthy. Note that for “http“ health checking if a host responds with a code not in - // :ref:`expected_statuses ` - // or :ref:`retriable_statuses `, - // this threshold is ignored and the host is considered immediately unhealthy. - UnhealthyThreshold *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=unhealthy_threshold,json=unhealthyThreshold,proto3" json:"unhealthy_threshold,omitempty"` - // The number of healthy health checks required before a host is marked - // healthy. Note that during startup, only a single successful health check is - // required to mark a host healthy. - HealthyThreshold *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=healthy_threshold,json=healthyThreshold,proto3" json:"healthy_threshold,omitempty"` - // [#not-implemented-hide:] Non-serving port for health checking. - AltPort *wrapperspb.UInt32Value `protobuf:"bytes,6,opt,name=alt_port,json=altPort,proto3" json:"alt_port,omitempty"` - // Reuse health check connection between health checks. Default is true. - ReuseConnection *wrapperspb.BoolValue `protobuf:"bytes,7,opt,name=reuse_connection,json=reuseConnection,proto3" json:"reuse_connection,omitempty"` - // Types that are assignable to HealthChecker: - // - // *HealthCheck_HttpHealthCheck_ - // *HealthCheck_TcpHealthCheck_ - // *HealthCheck_GrpcHealthCheck_ - // *HealthCheck_CustomHealthCheck_ - HealthChecker isHealthCheck_HealthChecker `protobuf_oneof:"health_checker"` - // The "no traffic interval" is a special health check interval that is used when a cluster has - // never had traffic routed to it. This lower interval allows cluster information to be kept up to - // date, without sending a potentially large amount of active health checking traffic for no - // reason. Once a cluster has been used for traffic routing, Envoy will shift back to using the - // standard health check interval that is defined. Note that this interval takes precedence over - // any other. - // - // The default value for "no traffic interval" is 60 seconds. - NoTrafficInterval *durationpb.Duration `protobuf:"bytes,12,opt,name=no_traffic_interval,json=noTrafficInterval,proto3" json:"no_traffic_interval,omitempty"` - // The "no traffic healthy interval" is a special health check interval that - // is used for hosts that are currently passing active health checking - // (including new hosts) when the cluster has received no traffic. - // - // This is useful for when we want to send frequent health checks with - // “no_traffic_interval“ but then revert to lower frequency “no_traffic_healthy_interval“ once - // a host in the cluster is marked as healthy. - // - // Once a cluster has been used for traffic routing, Envoy will shift back to using the - // standard health check interval that is defined. - // - // If no_traffic_healthy_interval is not set, it will default to the - // no traffic interval and send that interval regardless of health state. - NoTrafficHealthyInterval *durationpb.Duration `protobuf:"bytes,24,opt,name=no_traffic_healthy_interval,json=noTrafficHealthyInterval,proto3" json:"no_traffic_healthy_interval,omitempty"` - // The "unhealthy interval" is a health check interval that is used for hosts that are marked as - // unhealthy. As soon as the host is marked as healthy, Envoy will shift back to using the - // standard health check interval that is defined. - // - // The default value for "unhealthy interval" is the same as "interval". - UnhealthyInterval *durationpb.Duration `protobuf:"bytes,14,opt,name=unhealthy_interval,json=unhealthyInterval,proto3" json:"unhealthy_interval,omitempty"` - // The "unhealthy edge interval" is a special health check interval that is used for the first - // health check right after a host is marked as unhealthy. For subsequent health checks - // Envoy will shift back to using either "unhealthy interval" if present or the standard health - // check interval that is defined. - // - // The default value for "unhealthy edge interval" is the same as "unhealthy interval". - UnhealthyEdgeInterval *durationpb.Duration `protobuf:"bytes,15,opt,name=unhealthy_edge_interval,json=unhealthyEdgeInterval,proto3" json:"unhealthy_edge_interval,omitempty"` - // The "healthy edge interval" is a special health check interval that is used for the first - // health check right after a host is marked as healthy. For subsequent health checks - // Envoy will shift back to using the standard health check interval that is defined. - // - // The default value for "healthy edge interval" is the same as the default interval. - HealthyEdgeInterval *durationpb.Duration `protobuf:"bytes,16,opt,name=healthy_edge_interval,json=healthyEdgeInterval,proto3" json:"healthy_edge_interval,omitempty"` - // .. attention:: - // This field is deprecated in favor of the extension - // :ref:`event_logger ` and - // :ref:`event_log_path ` - // in the file sink extension. - // - // Specifies the path to the :ref:`health check event log `. - // - // Deprecated: Do not use. - EventLogPath string `protobuf:"bytes,17,opt,name=event_log_path,json=eventLogPath,proto3" json:"event_log_path,omitempty"` - // A list of event log sinks to process the health check event. - // [#extension-category: envoy.health_check.event_sinks] - EventLogger []*TypedExtensionConfig `protobuf:"bytes,25,rep,name=event_logger,json=eventLogger,proto3" json:"event_logger,omitempty"` - // [#not-implemented-hide:] - // The gRPC service for the health check event service. - // If empty, health check events won't be sent to a remote endpoint. - EventService *EventServiceConfig `protobuf:"bytes,22,opt,name=event_service,json=eventService,proto3" json:"event_service,omitempty"` - // If set to true, health check failure events will always be logged. If set to false, only the - // initial health check failure event will be logged. - // The default value is false. - AlwaysLogHealthCheckFailures bool `protobuf:"varint,19,opt,name=always_log_health_check_failures,json=alwaysLogHealthCheckFailures,proto3" json:"always_log_health_check_failures,omitempty"` - // This allows overriding the cluster TLS settings, just for health check connections. - TlsOptions *HealthCheck_TlsOptions `protobuf:"bytes,21,opt,name=tls_options,json=tlsOptions,proto3" json:"tls_options,omitempty"` - // Optional key/value pairs that will be used to match a transport socket from those specified in the cluster's - // :ref:`tranport socket matches `. - // For example, the following match criteria - // - // .. code-block:: yaml - // - // transport_socket_match_criteria: - // useMTLS: true - // - // Will match the following :ref:`cluster socket match ` - // - // .. code-block:: yaml - // - // transport_socket_matches: - // - name: "useMTLS" - // match: - // useMTLS: true - // transport_socket: - // name: envoy.transport_sockets.tls - // config: { ... } # tls socket configuration - // - // If this field is set, then for health checks it will supersede an entry of “envoy.transport_socket“ in the - // :ref:`LbEndpoint.Metadata `. - // This allows using different transport socket capabilities for health checking versus proxying to the - // endpoint. - // - // If the key/values pairs specified do not match any - // :ref:`transport socket matches `, - // the cluster's :ref:`transport socket ` - // will be used for health check socket configuration. - TransportSocketMatchCriteria *structpb.Struct `protobuf:"bytes,23,opt,name=transport_socket_match_criteria,json=transportSocketMatchCriteria,proto3" json:"transport_socket_match_criteria,omitempty"` -} - -func (x *HealthCheck) Reset() { - *x = HealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck) ProtoMessage() {} - -func (x *HealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1} -} - -func (x *HealthCheck) GetTimeout() *durationpb.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *HealthCheck) GetInterval() *durationpb.Duration { - if x != nil { - return x.Interval - } - return nil -} - -func (x *HealthCheck) GetInitialJitter() *durationpb.Duration { - if x != nil { - return x.InitialJitter - } - return nil -} - -func (x *HealthCheck) GetIntervalJitter() *durationpb.Duration { - if x != nil { - return x.IntervalJitter - } - return nil -} - -func (x *HealthCheck) GetIntervalJitterPercent() uint32 { - if x != nil { - return x.IntervalJitterPercent - } - return 0 -} - -func (x *HealthCheck) GetUnhealthyThreshold() *wrapperspb.UInt32Value { - if x != nil { - return x.UnhealthyThreshold - } - return nil -} - -func (x *HealthCheck) GetHealthyThreshold() *wrapperspb.UInt32Value { - if x != nil { - return x.HealthyThreshold - } - return nil -} - -func (x *HealthCheck) GetAltPort() *wrapperspb.UInt32Value { - if x != nil { - return x.AltPort - } - return nil -} - -func (x *HealthCheck) GetReuseConnection() *wrapperspb.BoolValue { - if x != nil { - return x.ReuseConnection - } - return nil -} - -func (m *HealthCheck) GetHealthChecker() isHealthCheck_HealthChecker { - if m != nil { - return m.HealthChecker - } - return nil -} - -func (x *HealthCheck) GetHttpHealthCheck() *HealthCheck_HttpHealthCheck { - if x, ok := x.GetHealthChecker().(*HealthCheck_HttpHealthCheck_); ok { - return x.HttpHealthCheck - } - return nil -} - -func (x *HealthCheck) GetTcpHealthCheck() *HealthCheck_TcpHealthCheck { - if x, ok := x.GetHealthChecker().(*HealthCheck_TcpHealthCheck_); ok { - return x.TcpHealthCheck - } - return nil -} - -func (x *HealthCheck) GetGrpcHealthCheck() *HealthCheck_GrpcHealthCheck { - if x, ok := x.GetHealthChecker().(*HealthCheck_GrpcHealthCheck_); ok { - return x.GrpcHealthCheck - } - return nil -} - -func (x *HealthCheck) GetCustomHealthCheck() *HealthCheck_CustomHealthCheck { - if x, ok := x.GetHealthChecker().(*HealthCheck_CustomHealthCheck_); ok { - return x.CustomHealthCheck - } - return nil -} - -func (x *HealthCheck) GetNoTrafficInterval() *durationpb.Duration { - if x != nil { - return x.NoTrafficInterval - } - return nil -} - -func (x *HealthCheck) GetNoTrafficHealthyInterval() *durationpb.Duration { - if x != nil { - return x.NoTrafficHealthyInterval - } - return nil -} - -func (x *HealthCheck) GetUnhealthyInterval() *durationpb.Duration { - if x != nil { - return x.UnhealthyInterval - } - return nil -} - -func (x *HealthCheck) GetUnhealthyEdgeInterval() *durationpb.Duration { - if x != nil { - return x.UnhealthyEdgeInterval - } - return nil -} - -func (x *HealthCheck) GetHealthyEdgeInterval() *durationpb.Duration { - if x != nil { - return x.HealthyEdgeInterval - } - return nil -} - -// Deprecated: Do not use. -func (x *HealthCheck) GetEventLogPath() string { - if x != nil { - return x.EventLogPath - } - return "" -} - -func (x *HealthCheck) GetEventLogger() []*TypedExtensionConfig { - if x != nil { - return x.EventLogger - } - return nil -} - -func (x *HealthCheck) GetEventService() *EventServiceConfig { - if x != nil { - return x.EventService - } - return nil -} - -func (x *HealthCheck) GetAlwaysLogHealthCheckFailures() bool { - if x != nil { - return x.AlwaysLogHealthCheckFailures - } - return false -} - -func (x *HealthCheck) GetTlsOptions() *HealthCheck_TlsOptions { - if x != nil { - return x.TlsOptions - } - return nil -} - -func (x *HealthCheck) GetTransportSocketMatchCriteria() *structpb.Struct { - if x != nil { - return x.TransportSocketMatchCriteria - } - return nil -} - -type isHealthCheck_HealthChecker interface { - isHealthCheck_HealthChecker() -} - -type HealthCheck_HttpHealthCheck_ struct { - // HTTP health check. - HttpHealthCheck *HealthCheck_HttpHealthCheck `protobuf:"bytes,8,opt,name=http_health_check,json=httpHealthCheck,proto3,oneof"` -} - -type HealthCheck_TcpHealthCheck_ struct { - // TCP health check. - TcpHealthCheck *HealthCheck_TcpHealthCheck `protobuf:"bytes,9,opt,name=tcp_health_check,json=tcpHealthCheck,proto3,oneof"` -} - -type HealthCheck_GrpcHealthCheck_ struct { - // gRPC health check. - GrpcHealthCheck *HealthCheck_GrpcHealthCheck `protobuf:"bytes,11,opt,name=grpc_health_check,json=grpcHealthCheck,proto3,oneof"` -} - -type HealthCheck_CustomHealthCheck_ struct { - // Custom health check. - CustomHealthCheck *HealthCheck_CustomHealthCheck `protobuf:"bytes,13,opt,name=custom_health_check,json=customHealthCheck,proto3,oneof"` -} - -func (*HealthCheck_HttpHealthCheck_) isHealthCheck_HealthChecker() {} - -func (*HealthCheck_TcpHealthCheck_) isHealthCheck_HealthChecker() {} - -func (*HealthCheck_GrpcHealthCheck_) isHealthCheck_HealthChecker() {} - -func (*HealthCheck_CustomHealthCheck_) isHealthCheck_HealthChecker() {} - -// Describes the encoding of the payload bytes in the payload. -type HealthCheck_Payload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Payload: - // - // *HealthCheck_Payload_Text - // *HealthCheck_Payload_Binary - Payload isHealthCheck_Payload_Payload `protobuf_oneof:"payload"` -} - -func (x *HealthCheck_Payload) Reset() { - *x = HealthCheck_Payload{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_Payload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_Payload) ProtoMessage() {} - -func (x *HealthCheck_Payload) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_Payload.ProtoReflect.Descriptor instead. -func (*HealthCheck_Payload) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 0} -} - -func (m *HealthCheck_Payload) GetPayload() isHealthCheck_Payload_Payload { - if m != nil { - return m.Payload - } - return nil -} - -func (x *HealthCheck_Payload) GetText() string { - if x, ok := x.GetPayload().(*HealthCheck_Payload_Text); ok { - return x.Text - } - return "" -} - -func (x *HealthCheck_Payload) GetBinary() []byte { - if x, ok := x.GetPayload().(*HealthCheck_Payload_Binary); ok { - return x.Binary - } - return nil -} - -type isHealthCheck_Payload_Payload interface { - isHealthCheck_Payload_Payload() -} - -type HealthCheck_Payload_Text struct { - // Hex encoded payload. E.g., "000000FF". - Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"` -} - -type HealthCheck_Payload_Binary struct { - // Binary payload. - Binary []byte `protobuf:"bytes,2,opt,name=binary,proto3,oneof"` -} - -func (*HealthCheck_Payload_Text) isHealthCheck_Payload_Payload() {} - -func (*HealthCheck_Payload_Binary) isHealthCheck_Payload_Payload() {} - -// [#next-free-field: 15] -type HealthCheck_HttpHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The value of the host header in the HTTP health check request. If - // left empty (default value), the name of the cluster this health check is associated - // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - // Specifies the HTTP path that will be requested during health checking. For example - // “/healthcheck“. - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - // [#not-implemented-hide:] HTTP specific payload. - Send *HealthCheck_Payload `protobuf:"bytes,3,opt,name=send,proto3" json:"send,omitempty"` - // Specifies a list of HTTP expected responses to match in the first “response_buffer_size“ bytes of the response body. - // If it is set, both the expected response check and status code determine the health check. - // When checking the response, “fuzzy” matching is performed such that each payload block must be found, - // and in the order specified, but not necessarily contiguous. - // - // .. note:: - // - // It is recommended to set ``response_buffer_size`` based on the total Payload size for efficiency. - // The default buffer size is 1024 bytes when it is not set. - Receive []*HealthCheck_Payload `protobuf:"bytes,4,rep,name=receive,proto3" json:"receive,omitempty"` - // Specifies the size of response buffer in bytes that is used to Payload match. - // The default value is 1024. Setting to 0 implies that the Payload will be matched against the entire response. - ResponseBufferSize *wrapperspb.UInt64Value `protobuf:"bytes,14,opt,name=response_buffer_size,json=responseBufferSize,proto3" json:"response_buffer_size,omitempty"` - // Specifies a list of HTTP headers that should be added to each request that is sent to the - // health checked cluster. For more information, including details on header value syntax, see - // the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*HeaderValueOption `protobuf:"bytes,6,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each request that is sent to the - // health checked cluster. - RequestHeadersToRemove []string `protobuf:"bytes,8,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // Specifies a list of HTTP response statuses considered healthy. If provided, replaces default - // 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open - // semantics of :ref:`Int64Range `. The start and end of each - // range are required. Only statuses in the range [100, 600) are allowed. - ExpectedStatuses []*v3.Int64Range `protobuf:"bytes,9,rep,name=expected_statuses,json=expectedStatuses,proto3" json:"expected_statuses,omitempty"` - // Specifies a list of HTTP response statuses considered retriable. If provided, responses in this range - // will count towards the configured :ref:`unhealthy_threshold `, - // but will not result in the host being considered immediately unhealthy. Ranges follow half-open semantics of - // :ref:`Int64Range `. The start and end of each range are required. - // Only statuses in the range [100, 600) are allowed. The :ref:`expected_statuses ` - // field takes precedence for any range overlaps with this field i.e. if status code 200 is both retriable and expected, a 200 response will - // be considered a successful health check. By default all responses not in - // :ref:`expected_statuses ` will result in - // the host being considered immediately unhealthy i.e. if status code 200 is expected and there are no configured retriable statuses, any - // non-200 response will result in the host being marked unhealthy. - RetriableStatuses []*v3.Int64Range `protobuf:"bytes,12,rep,name=retriable_statuses,json=retriableStatuses,proto3" json:"retriable_statuses,omitempty"` - // Use specified application protocol for health checks. - CodecClientType v3.CodecClientType `protobuf:"varint,10,opt,name=codec_client_type,json=codecClientType,proto3,enum=envoy.type.v3.CodecClientType" json:"codec_client_type,omitempty"` - // An optional service name parameter which is used to validate the identity of - // the health checked cluster using a :ref:`StringMatcher - // `. See the :ref:`architecture overview - // ` for more information. - ServiceNameMatcher *v31.StringMatcher `protobuf:"bytes,11,opt,name=service_name_matcher,json=serviceNameMatcher,proto3" json:"service_name_matcher,omitempty"` - // HTTP Method that will be used for health checking, default is "GET". - // GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, PATCH methods are supported, but making request body is not supported. - // CONNECT method is disallowed because it is not appropriate for health check request. - // If a non-200 response is expected by the method, it needs to be set in :ref:`expected_statuses `. - Method RequestMethod `protobuf:"varint,13,opt,name=method,proto3,enum=envoy.config.core.v3.RequestMethod" json:"method,omitempty"` -} - -func (x *HealthCheck_HttpHealthCheck) Reset() { - *x = HealthCheck_HttpHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_HttpHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_HttpHealthCheck) ProtoMessage() {} - -func (x *HealthCheck_HttpHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_HttpHealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck_HttpHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 1} -} - -func (x *HealthCheck_HttpHealthCheck) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *HealthCheck_HttpHealthCheck) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *HealthCheck_HttpHealthCheck) GetSend() *HealthCheck_Payload { - if x != nil { - return x.Send - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetReceive() []*HealthCheck_Payload { - if x != nil { - return x.Receive - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetResponseBufferSize() *wrapperspb.UInt64Value { - if x != nil { - return x.ResponseBufferSize - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetRequestHeadersToAdd() []*HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetExpectedStatuses() []*v3.Int64Range { - if x != nil { - return x.ExpectedStatuses - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetRetriableStatuses() []*v3.Int64Range { - if x != nil { - return x.RetriableStatuses - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetCodecClientType() v3.CodecClientType { - if x != nil { - return x.CodecClientType - } - return v3.CodecClientType_HTTP1 -} - -func (x *HealthCheck_HttpHealthCheck) GetServiceNameMatcher() *v31.StringMatcher { - if x != nil { - return x.ServiceNameMatcher - } - return nil -} - -func (x *HealthCheck_HttpHealthCheck) GetMethod() RequestMethod { - if x != nil { - return x.Method - } - return RequestMethod_METHOD_UNSPECIFIED -} - -type HealthCheck_TcpHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Empty payloads imply a connect-only health check. - Send *HealthCheck_Payload `protobuf:"bytes,1,opt,name=send,proto3" json:"send,omitempty"` - // When checking the response, “fuzzy” matching is performed such that each - // payload block must be found, and in the order specified, but not - // necessarily contiguous. - Receive []*HealthCheck_Payload `protobuf:"bytes,2,rep,name=receive,proto3" json:"receive,omitempty"` -} - -func (x *HealthCheck_TcpHealthCheck) Reset() { - *x = HealthCheck_TcpHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_TcpHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_TcpHealthCheck) ProtoMessage() {} - -func (x *HealthCheck_TcpHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_TcpHealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck_TcpHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 2} -} - -func (x *HealthCheck_TcpHealthCheck) GetSend() *HealthCheck_Payload { - if x != nil { - return x.Send - } - return nil -} - -func (x *HealthCheck_TcpHealthCheck) GetReceive() []*HealthCheck_Payload { - if x != nil { - return x.Receive - } - return nil -} - -type HealthCheck_RedisHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If set, optionally perform “EXISTS “ instead of “PING“. A return value - // from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other - // than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance - // by setting the specified key to any value and waiting for traffic to drain. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *HealthCheck_RedisHealthCheck) Reset() { - *x = HealthCheck_RedisHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_RedisHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_RedisHealthCheck) ProtoMessage() {} - -func (x *HealthCheck_RedisHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_RedisHealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck_RedisHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 3} -} - -func (x *HealthCheck_RedisHealthCheck) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -// `grpc.health.v1.Health -// `_-based -// healthcheck. See `gRPC doc `_ -// for details. -type HealthCheck_GrpcHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An optional service name parameter which will be sent to gRPC service in - // `grpc.health.v1.HealthCheckRequest - // `_. - // message. See `gRPC health-checking overview - // `_ for more information. - ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` - // The value of the :authority header in the gRPC health check request. If - // left empty (default value), the name of the cluster this health check is associated - // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` - // Specifies a list of key-value pairs that should be added to the metadata of each GRPC call - // that is sent to the health checked cluster. For more information, including details on header value syntax, - // see the documentation on :ref:`custom request headers - // `. - InitialMetadata []*HeaderValueOption `protobuf:"bytes,3,rep,name=initial_metadata,json=initialMetadata,proto3" json:"initial_metadata,omitempty"` -} - -func (x *HealthCheck_GrpcHealthCheck) Reset() { - *x = HealthCheck_GrpcHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_GrpcHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_GrpcHealthCheck) ProtoMessage() {} - -func (x *HealthCheck_GrpcHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_GrpcHealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck_GrpcHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 4} -} - -func (x *HealthCheck_GrpcHealthCheck) GetServiceName() string { - if x != nil { - return x.ServiceName - } - return "" -} - -func (x *HealthCheck_GrpcHealthCheck) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *HealthCheck_GrpcHealthCheck) GetInitialMetadata() []*HeaderValueOption { - if x != nil { - return x.InitialMetadata - } - return nil -} - -// Custom health check. -type HealthCheck_CustomHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The registered name of the custom health checker. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A custom health checker specific configuration which depends on the custom health checker - // being instantiated. See :api:`envoy/config/health_checker` for reference. - // [#extension-category: envoy.health_checkers] - // - // Types that are assignable to ConfigType: - // - // *HealthCheck_CustomHealthCheck_TypedConfig - ConfigType isHealthCheck_CustomHealthCheck_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *HealthCheck_CustomHealthCheck) Reset() { - *x = HealthCheck_CustomHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_CustomHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_CustomHealthCheck) ProtoMessage() {} - -func (x *HealthCheck_CustomHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_CustomHealthCheck.ProtoReflect.Descriptor instead. -func (*HealthCheck_CustomHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 5} -} - -func (x *HealthCheck_CustomHealthCheck) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *HealthCheck_CustomHealthCheck) GetConfigType() isHealthCheck_CustomHealthCheck_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *HealthCheck_CustomHealthCheck) GetTypedConfig() *anypb.Any { - if x, ok := x.GetConfigType().(*HealthCheck_CustomHealthCheck_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isHealthCheck_CustomHealthCheck_ConfigType interface { - isHealthCheck_CustomHealthCheck_ConfigType() -} - -type HealthCheck_CustomHealthCheck_TypedConfig struct { - TypedConfig *anypb.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*HealthCheck_CustomHealthCheck_TypedConfig) isHealthCheck_CustomHealthCheck_ConfigType() {} - -// Health checks occur over the transport socket specified for the cluster. This implies that if a -// cluster is using a TLS-enabled transport socket, the health check will also occur over TLS. -// -// This allows overriding the cluster TLS settings, just for health check connections. -type HealthCheck_TlsOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the ALPN protocols for health check connections. This is useful if the - // corresponding upstream is using ALPN-based :ref:`FilterChainMatch - // ` along with different protocols for health checks - // versus data connections. If empty, no ALPN protocols will be set on health check connections. - AlpnProtocols []string `protobuf:"bytes,1,rep,name=alpn_protocols,json=alpnProtocols,proto3" json:"alpn_protocols,omitempty"` -} - -func (x *HealthCheck_TlsOptions) Reset() { - *x = HealthCheck_TlsOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheck_TlsOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheck_TlsOptions) ProtoMessage() {} - -func (x *HealthCheck_TlsOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_health_check_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheck_TlsOptions.ProtoReflect.Descriptor instead. -func (*HealthCheck_TlsOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_health_check_proto_rawDescGZIP(), []int{1, 6} -} - -func (x *HealthCheck_TlsOptions) GetAlpnProtocols() []string { - if x != nil { - return x.AlpnProtocols - } - return nil -} - -var File_envoy_config_core_v3_health_check_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_health_check_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, - 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x0f, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x08, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x22, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x92, 0x01, 0x07, 0x22, 0x05, 0x82, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x22, 0xed, 0x1e, 0x0a, 0x0b, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x3f, 0x0a, 0x07, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, - 0x01, 0x2a, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x41, 0x0a, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, - 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, - 0x40, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, - 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, - 0x72, 0x12, 0x42, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6a, 0x69, - 0x74, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4a, - 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x57, 0x0a, - 0x13, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x12, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x79, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x61, - 0x6c, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x61, 0x6c, 0x74, - 0x50, 0x6f, 0x72, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x75, 0x73, - 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x11, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0f, 0x68, 0x74, 0x74, - 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x5c, 0x0a, 0x10, - 0x74, 0x63, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x54, 0x63, 0x70, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x63, 0x70, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x5f, 0x0a, 0x11, 0x67, 0x72, - 0x70, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0f, 0x67, 0x72, 0x70, 0x63, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x65, 0x0a, 0x13, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x00, 0x52, - 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, - 0x01, 0x02, 0x2a, 0x00, 0x52, 0x11, 0x6e, 0x6f, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x62, 0x0a, 0x1b, 0x6e, 0x6f, 0x5f, 0x74, 0x72, - 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, - 0x00, 0x52, 0x18, 0x6e, 0x6f, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x52, 0x0a, 0x12, 0x75, - 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x11, 0x75, 0x6e, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, - 0x5b, 0x0a, 0x17, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x65, 0x64, 0x67, - 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x15, 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, - 0x45, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x57, 0x0a, 0x15, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, - 0x52, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x45, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x31, 0x0a, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6c, - 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x18, - 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4d, 0x0a, 0x0c, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, - 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x1c, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x4c, 0x6f, 0x67, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x4d, - 0x0a, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x54, 0x6c, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x0a, 0x74, 0x6c, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5e, 0x0a, - 0x1f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, - 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, - 0x1c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x1a, 0x80, 0x01, - 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1d, 0x0a, 0x04, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x62, 0x69, 0x6e, 0x61, - 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x06, 0x62, 0x69, 0x6e, 0x61, - 0x72, 0x79, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x42, 0x0e, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x1a, 0xcc, 0x07, 0x0a, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1f, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, - 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x02, 0xc8, - 0x01, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x52, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x12, 0x43, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x57, 0x0a, 0x14, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, - 0x00, 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, - 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, - 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4b, - 0x0a, 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, - 0xc8, 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x65, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, - 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x10, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x11, 0x72, 0x65, 0x74, 0x72, - 0x69, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x54, 0x0a, - 0x11, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x56, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x06, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, 0x20, 0x06, 0x52, 0x06, 0x6d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, - 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x75, 0x73, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x32, 0x1a, - 0xc9, 0x01, 0x0a, 0x0e, 0x54, 0x63, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x04, 0x73, 0x65, 0x6e, - 0x64, 0x12, 0x43, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x54, 0x63, 0x70, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x5b, 0x0a, 0x10, 0x52, - 0x65, 0x64, 0x69, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0xf4, 0x01, 0x0a, 0x0f, 0x47, 0x72, 0x70, - 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x29, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x5d, 0x0a, 0x10, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, - 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, - 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, - 0x47, 0x72, 0x70, 0x63, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, - 0xc0, 0x01, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, - 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x36, 0x9a, - 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x1a, 0x64, 0x0a, 0x0a, 0x54, 0x6c, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x70, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, 0x70, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x54, 0x6c, - 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, - 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x15, - 0x0a, 0x0e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x2a, 0x60, 0x0a, 0x0c, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, - 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, - 0x48, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, - 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x04, 0x12, - 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x47, 0x52, 0x41, 0x44, 0x45, 0x44, 0x10, 0x05, 0x42, 0x84, 0x01, - 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, - 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, - 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_health_check_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_health_check_proto_rawDescData = file_envoy_config_core_v3_health_check_proto_rawDesc -) - -func file_envoy_config_core_v3_health_check_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_health_check_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_health_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_health_check_proto_rawDescData) - }) - return file_envoy_config_core_v3_health_check_proto_rawDescData -} - -var file_envoy_config_core_v3_health_check_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v3_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_envoy_config_core_v3_health_check_proto_goTypes = []interface{}{ - (HealthStatus)(0), // 0: envoy.config.core.v3.HealthStatus - (*HealthStatusSet)(nil), // 1: envoy.config.core.v3.HealthStatusSet - (*HealthCheck)(nil), // 2: envoy.config.core.v3.HealthCheck - (*HealthCheck_Payload)(nil), // 3: envoy.config.core.v3.HealthCheck.Payload - (*HealthCheck_HttpHealthCheck)(nil), // 4: envoy.config.core.v3.HealthCheck.HttpHealthCheck - (*HealthCheck_TcpHealthCheck)(nil), // 5: envoy.config.core.v3.HealthCheck.TcpHealthCheck - (*HealthCheck_RedisHealthCheck)(nil), // 6: envoy.config.core.v3.HealthCheck.RedisHealthCheck - (*HealthCheck_GrpcHealthCheck)(nil), // 7: envoy.config.core.v3.HealthCheck.GrpcHealthCheck - (*HealthCheck_CustomHealthCheck)(nil), // 8: envoy.config.core.v3.HealthCheck.CustomHealthCheck - (*HealthCheck_TlsOptions)(nil), // 9: envoy.config.core.v3.HealthCheck.TlsOptions - (*durationpb.Duration)(nil), // 10: google.protobuf.Duration - (*wrapperspb.UInt32Value)(nil), // 11: google.protobuf.UInt32Value - (*wrapperspb.BoolValue)(nil), // 12: google.protobuf.BoolValue - (*TypedExtensionConfig)(nil), // 13: envoy.config.core.v3.TypedExtensionConfig - (*EventServiceConfig)(nil), // 14: envoy.config.core.v3.EventServiceConfig - (*structpb.Struct)(nil), // 15: google.protobuf.Struct - (*wrapperspb.UInt64Value)(nil), // 16: google.protobuf.UInt64Value - (*HeaderValueOption)(nil), // 17: envoy.config.core.v3.HeaderValueOption - (*v3.Int64Range)(nil), // 18: envoy.type.v3.Int64Range - (v3.CodecClientType)(0), // 19: envoy.type.v3.CodecClientType - (*v31.StringMatcher)(nil), // 20: envoy.type.matcher.v3.StringMatcher - (RequestMethod)(0), // 21: envoy.config.core.v3.RequestMethod - (*anypb.Any)(nil), // 22: google.protobuf.Any -} -var file_envoy_config_core_v3_health_check_proto_depIdxs = []int32{ - 0, // 0: envoy.config.core.v3.HealthStatusSet.statuses:type_name -> envoy.config.core.v3.HealthStatus - 10, // 1: envoy.config.core.v3.HealthCheck.timeout:type_name -> google.protobuf.Duration - 10, // 2: envoy.config.core.v3.HealthCheck.interval:type_name -> google.protobuf.Duration - 10, // 3: envoy.config.core.v3.HealthCheck.initial_jitter:type_name -> google.protobuf.Duration - 10, // 4: envoy.config.core.v3.HealthCheck.interval_jitter:type_name -> google.protobuf.Duration - 11, // 5: envoy.config.core.v3.HealthCheck.unhealthy_threshold:type_name -> google.protobuf.UInt32Value - 11, // 6: envoy.config.core.v3.HealthCheck.healthy_threshold:type_name -> google.protobuf.UInt32Value - 11, // 7: envoy.config.core.v3.HealthCheck.alt_port:type_name -> google.protobuf.UInt32Value - 12, // 8: envoy.config.core.v3.HealthCheck.reuse_connection:type_name -> google.protobuf.BoolValue - 4, // 9: envoy.config.core.v3.HealthCheck.http_health_check:type_name -> envoy.config.core.v3.HealthCheck.HttpHealthCheck - 5, // 10: envoy.config.core.v3.HealthCheck.tcp_health_check:type_name -> envoy.config.core.v3.HealthCheck.TcpHealthCheck - 7, // 11: envoy.config.core.v3.HealthCheck.grpc_health_check:type_name -> envoy.config.core.v3.HealthCheck.GrpcHealthCheck - 8, // 12: envoy.config.core.v3.HealthCheck.custom_health_check:type_name -> envoy.config.core.v3.HealthCheck.CustomHealthCheck - 10, // 13: envoy.config.core.v3.HealthCheck.no_traffic_interval:type_name -> google.protobuf.Duration - 10, // 14: envoy.config.core.v3.HealthCheck.no_traffic_healthy_interval:type_name -> google.protobuf.Duration - 10, // 15: envoy.config.core.v3.HealthCheck.unhealthy_interval:type_name -> google.protobuf.Duration - 10, // 16: envoy.config.core.v3.HealthCheck.unhealthy_edge_interval:type_name -> google.protobuf.Duration - 10, // 17: envoy.config.core.v3.HealthCheck.healthy_edge_interval:type_name -> google.protobuf.Duration - 13, // 18: envoy.config.core.v3.HealthCheck.event_logger:type_name -> envoy.config.core.v3.TypedExtensionConfig - 14, // 19: envoy.config.core.v3.HealthCheck.event_service:type_name -> envoy.config.core.v3.EventServiceConfig - 9, // 20: envoy.config.core.v3.HealthCheck.tls_options:type_name -> envoy.config.core.v3.HealthCheck.TlsOptions - 15, // 21: envoy.config.core.v3.HealthCheck.transport_socket_match_criteria:type_name -> google.protobuf.Struct - 3, // 22: envoy.config.core.v3.HealthCheck.HttpHealthCheck.send:type_name -> envoy.config.core.v3.HealthCheck.Payload - 3, // 23: envoy.config.core.v3.HealthCheck.HttpHealthCheck.receive:type_name -> envoy.config.core.v3.HealthCheck.Payload - 16, // 24: envoy.config.core.v3.HealthCheck.HttpHealthCheck.response_buffer_size:type_name -> google.protobuf.UInt64Value - 17, // 25: envoy.config.core.v3.HealthCheck.HttpHealthCheck.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 18, // 26: envoy.config.core.v3.HealthCheck.HttpHealthCheck.expected_statuses:type_name -> envoy.type.v3.Int64Range - 18, // 27: envoy.config.core.v3.HealthCheck.HttpHealthCheck.retriable_statuses:type_name -> envoy.type.v3.Int64Range - 19, // 28: envoy.config.core.v3.HealthCheck.HttpHealthCheck.codec_client_type:type_name -> envoy.type.v3.CodecClientType - 20, // 29: envoy.config.core.v3.HealthCheck.HttpHealthCheck.service_name_matcher:type_name -> envoy.type.matcher.v3.StringMatcher - 21, // 30: envoy.config.core.v3.HealthCheck.HttpHealthCheck.method:type_name -> envoy.config.core.v3.RequestMethod - 3, // 31: envoy.config.core.v3.HealthCheck.TcpHealthCheck.send:type_name -> envoy.config.core.v3.HealthCheck.Payload - 3, // 32: envoy.config.core.v3.HealthCheck.TcpHealthCheck.receive:type_name -> envoy.config.core.v3.HealthCheck.Payload - 17, // 33: envoy.config.core.v3.HealthCheck.GrpcHealthCheck.initial_metadata:type_name -> envoy.config.core.v3.HeaderValueOption - 22, // 34: envoy.config.core.v3.HealthCheck.CustomHealthCheck.typed_config:type_name -> google.protobuf.Any - 35, // [35:35] is the sub-list for method output_type - 35, // [35:35] is the sub-list for method input_type - 35, // [35:35] is the sub-list for extension type_name - 35, // [35:35] is the sub-list for extension extendee - 0, // [0:35] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_health_check_proto_init() } -func file_envoy_config_core_v3_health_check_proto_init() { - if File_envoy_config_core_v3_health_check_proto != nil { - return - } - file_envoy_config_core_v3_base_proto_init() - file_envoy_config_core_v3_event_service_config_proto_init() - file_envoy_config_core_v3_extension_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_health_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthStatusSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_health_check_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_health_check_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_Payload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_health_check_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_HttpHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_health_check_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_TcpHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_health_check_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_RedisHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_health_check_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_GrpcHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_health_check_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_CustomHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_health_check_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheck_TlsOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v3_health_check_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*HealthCheck_HttpHealthCheck_)(nil), - (*HealthCheck_TcpHealthCheck_)(nil), - (*HealthCheck_GrpcHealthCheck_)(nil), - (*HealthCheck_CustomHealthCheck_)(nil), - } - file_envoy_config_core_v3_health_check_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*HealthCheck_Payload_Text)(nil), - (*HealthCheck_Payload_Binary)(nil), - } - file_envoy_config_core_v3_health_check_proto_msgTypes[7].OneofWrappers = []interface{}{ - (*HealthCheck_CustomHealthCheck_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_health_check_proto_rawDesc, - NumEnums: 1, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_health_check_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_health_check_proto_depIdxs, - EnumInfos: file_envoy_config_core_v3_health_check_proto_enumTypes, - MessageInfos: file_envoy_config_core_v3_health_check_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_health_check_proto = out.File - file_envoy_config_core_v3_health_check_proto_rawDesc = nil - file_envoy_config_core_v3_health_check_proto_goTypes = nil - file_envoy_config_core_v3_health_check_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/health_check.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/health_check.pb.validate.go deleted file mode 100644 index d496267b735..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/health_check.pb.validate.go +++ /dev/null @@ -1,2259 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/health_check.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" - - v3 "github.com/cilium/proxy/go/envoy/type/v3" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort - - _ = v3.CodecClientType(0) -) - -// Validate checks the field values on HealthStatusSet with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *HealthStatusSet) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthStatusSet with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HealthStatusSetMultiError, or nil if none found. -func (m *HealthStatusSet) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthStatusSet) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetStatuses() { - _, _ = idx, item - - if _, ok := HealthStatus_name[int32(item)]; !ok { - err := HealthStatusSetValidationError{ - field: fmt.Sprintf("Statuses[%v]", idx), - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(errors) > 0 { - return HealthStatusSetMultiError(errors) - } - - return nil -} - -// HealthStatusSetMultiError is an error wrapping multiple validation errors -// returned by HealthStatusSet.ValidateAll() if the designated constraints -// aren't met. -type HealthStatusSetMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthStatusSetMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthStatusSetMultiError) AllErrors() []error { return m } - -// HealthStatusSetValidationError is the validation error returned by -// HealthStatusSet.Validate if the designated constraints aren't met. -type HealthStatusSetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthStatusSetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthStatusSetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthStatusSetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthStatusSetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthStatusSetValidationError) ErrorName() string { return "HealthStatusSetValidationError" } - -// Error satisfies the builtin error interface -func (e HealthStatusSetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthStatusSet.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthStatusSetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthStatusSetValidationError{} - -// Validate checks the field values on HealthCheck with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HealthCheck) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthCheck with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HealthCheckMultiError, or -// nil if none found. -func (m *HealthCheck) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheck) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetTimeout() == nil { - err := HealthCheckValidationError{ - field: "Timeout", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if d := m.GetTimeout(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = HealthCheckValidationError{ - field: "Timeout", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := HealthCheckValidationError{ - field: "Timeout", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if m.GetInterval() == nil { - err := HealthCheckValidationError{ - field: "Interval", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if d := m.GetInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = HealthCheckValidationError{ - field: "Interval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := HealthCheckValidationError{ - field: "Interval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if all { - switch v := interface{}(m.GetInitialJitter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "InitialJitter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "InitialJitter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetInitialJitter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "InitialJitter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetIntervalJitter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "IntervalJitter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "IntervalJitter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetIntervalJitter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "IntervalJitter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for IntervalJitterPercent - - if m.GetUnhealthyThreshold() == nil { - err := HealthCheckValidationError{ - field: "UnhealthyThreshold", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetUnhealthyThreshold()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "UnhealthyThreshold", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "UnhealthyThreshold", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUnhealthyThreshold()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "UnhealthyThreshold", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetHealthyThreshold() == nil { - err := HealthCheckValidationError{ - field: "HealthyThreshold", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetHealthyThreshold()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "HealthyThreshold", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "HealthyThreshold", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHealthyThreshold()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "HealthyThreshold", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetAltPort()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "AltPort", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "AltPort", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAltPort()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "AltPort", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetReuseConnection()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "ReuseConnection", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "ReuseConnection", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetReuseConnection()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "ReuseConnection", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if d := m.GetNoTrafficInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = HealthCheckValidationError{ - field: "NoTrafficInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := HealthCheckValidationError{ - field: "NoTrafficInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if d := m.GetNoTrafficHealthyInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = HealthCheckValidationError{ - field: "NoTrafficHealthyInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := HealthCheckValidationError{ - field: "NoTrafficHealthyInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if d := m.GetUnhealthyInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = HealthCheckValidationError{ - field: "UnhealthyInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := HealthCheckValidationError{ - field: "UnhealthyInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if d := m.GetUnhealthyEdgeInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = HealthCheckValidationError{ - field: "UnhealthyEdgeInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := HealthCheckValidationError{ - field: "UnhealthyEdgeInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if d := m.GetHealthyEdgeInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = HealthCheckValidationError{ - field: "HealthyEdgeInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := HealthCheckValidationError{ - field: "HealthyEdgeInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - // no validation rules for EventLogPath - - for idx, item := range m.GetEventLogger() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: fmt.Sprintf("EventLogger[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: fmt.Sprintf("EventLogger[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: fmt.Sprintf("EventLogger[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetEventService()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "EventService", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "EventService", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEventService()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "EventService", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AlwaysLogHealthCheckFailures - - if all { - switch v := interface{}(m.GetTlsOptions()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "TlsOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "TlsOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTlsOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "TlsOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTransportSocketMatchCriteria()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "TransportSocketMatchCriteria", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "TransportSocketMatchCriteria", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTransportSocketMatchCriteria()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "TransportSocketMatchCriteria", - reason: "embedded message failed validation", - cause: err, - } - } - } - - oneofHealthCheckerPresent := false - switch v := m.HealthChecker.(type) { - case *HealthCheck_HttpHealthCheck_: - if v == nil { - err := HealthCheckValidationError{ - field: "HealthChecker", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofHealthCheckerPresent = true - - if all { - switch v := interface{}(m.GetHttpHealthCheck()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "HttpHealthCheck", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "HttpHealthCheck", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHttpHealthCheck()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "HttpHealthCheck", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HealthCheck_TcpHealthCheck_: - if v == nil { - err := HealthCheckValidationError{ - field: "HealthChecker", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofHealthCheckerPresent = true - - if all { - switch v := interface{}(m.GetTcpHealthCheck()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "TcpHealthCheck", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "TcpHealthCheck", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTcpHealthCheck()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "TcpHealthCheck", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HealthCheck_GrpcHealthCheck_: - if v == nil { - err := HealthCheckValidationError{ - field: "HealthChecker", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofHealthCheckerPresent = true - - if all { - switch v := interface{}(m.GetGrpcHealthCheck()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "GrpcHealthCheck", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "GrpcHealthCheck", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGrpcHealthCheck()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "GrpcHealthCheck", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HealthCheck_CustomHealthCheck_: - if v == nil { - err := HealthCheckValidationError{ - field: "HealthChecker", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofHealthCheckerPresent = true - - if all { - switch v := interface{}(m.GetCustomHealthCheck()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "CustomHealthCheck", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckValidationError{ - field: "CustomHealthCheck", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCustomHealthCheck()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckValidationError{ - field: "CustomHealthCheck", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofHealthCheckerPresent { - err := HealthCheckValidationError{ - field: "HealthChecker", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HealthCheckMultiError(errors) - } - - return nil -} - -// HealthCheckMultiError is an error wrapping multiple validation errors -// returned by HealthCheck.ValidateAll() if the designated constraints aren't met. -type HealthCheckMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheckMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheckMultiError) AllErrors() []error { return m } - -// HealthCheckValidationError is the validation error returned by -// HealthCheck.Validate if the designated constraints aren't met. -type HealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheckValidationError) ErrorName() string { return "HealthCheckValidationError" } - -// Error satisfies the builtin error interface -func (e HealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheckValidationError{} - -// Validate checks the field values on HealthCheck_Payload with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HealthCheck_Payload) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthCheck_Payload with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HealthCheck_PayloadMultiError, or nil if none found. -func (m *HealthCheck_Payload) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheck_Payload) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofPayloadPresent := false - switch v := m.Payload.(type) { - case *HealthCheck_Payload_Text: - if v == nil { - err := HealthCheck_PayloadValidationError{ - field: "Payload", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPayloadPresent = true - - if utf8.RuneCountInString(m.GetText()) < 1 { - err := HealthCheck_PayloadValidationError{ - field: "Text", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *HealthCheck_Payload_Binary: - if v == nil { - err := HealthCheck_PayloadValidationError{ - field: "Payload", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPayloadPresent = true - // no validation rules for Binary - default: - _ = v // ensures v is used - } - if !oneofPayloadPresent { - err := HealthCheck_PayloadValidationError{ - field: "Payload", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HealthCheck_PayloadMultiError(errors) - } - - return nil -} - -// HealthCheck_PayloadMultiError is an error wrapping multiple validation -// errors returned by HealthCheck_Payload.ValidateAll() if the designated -// constraints aren't met. -type HealthCheck_PayloadMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheck_PayloadMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheck_PayloadMultiError) AllErrors() []error { return m } - -// HealthCheck_PayloadValidationError is the validation error returned by -// HealthCheck_Payload.Validate if the designated constraints aren't met. -type HealthCheck_PayloadValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_PayloadValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_PayloadValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_PayloadValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_PayloadValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_PayloadValidationError) ErrorName() string { - return "HealthCheck_PayloadValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_PayloadValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_Payload.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_PayloadValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_PayloadValidationError{} - -// Validate checks the field values on HealthCheck_HttpHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HealthCheck_HttpHealthCheck) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthCheck_HttpHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HealthCheck_HttpHealthCheckMultiError, or nil if none found. -func (m *HealthCheck_HttpHealthCheck) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheck_HttpHealthCheck) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if !_HealthCheck_HttpHealthCheck_Host_Pattern.MatchString(m.GetHost()) { - err := HealthCheck_HttpHealthCheckValidationError{ - field: "Host", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetPath()) < 1 { - err := HealthCheck_HttpHealthCheckValidationError{ - field: "Path", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_HealthCheck_HttpHealthCheck_Path_Pattern.MatchString(m.GetPath()) { - err := HealthCheck_HttpHealthCheckValidationError{ - field: "Path", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSend()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: "Send", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: "Send", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheck_HttpHealthCheckValidationError{ - field: "Send", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetReceive() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("Receive[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("Receive[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("Receive[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if wrapper := m.GetResponseBufferSize(); wrapper != nil { - - if wrapper.GetValue() < 0 { - err := HealthCheck_HttpHealthCheckValidationError{ - field: "ResponseBufferSize", - reason: "value must be greater than or equal to 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(m.GetRequestHeadersToAdd()) > 1000 { - err := HealthCheck_HttpHealthCheckValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRequestHeadersToRemove() { - _, _ = idx, item - - if !_HealthCheck_HttpHealthCheck_RequestHeadersToRemove_Pattern.MatchString(item) { - err := HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - for idx, item := range m.GetExpectedStatuses() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("ExpectedStatuses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("ExpectedStatuses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("ExpectedStatuses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRetriableStatuses() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("RetriableStatuses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("RetriableStatuses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheck_HttpHealthCheckValidationError{ - field: fmt.Sprintf("RetriableStatuses[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if _, ok := v3.CodecClientType_name[int32(m.GetCodecClientType())]; !ok { - err := HealthCheck_HttpHealthCheckValidationError{ - field: "CodecClientType", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetServiceNameMatcher()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: "ServiceNameMatcher", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheck_HttpHealthCheckValidationError{ - field: "ServiceNameMatcher", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetServiceNameMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheck_HttpHealthCheckValidationError{ - field: "ServiceNameMatcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if _, ok := _HealthCheck_HttpHealthCheck_Method_NotInLookup[m.GetMethod()]; ok { - err := HealthCheck_HttpHealthCheckValidationError{ - field: "Method", - reason: "value must not be in list [CONNECT]", - } - if !all { - return err - } - errors = append(errors, err) - } - - if _, ok := RequestMethod_name[int32(m.GetMethod())]; !ok { - err := HealthCheck_HttpHealthCheckValidationError{ - field: "Method", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HealthCheck_HttpHealthCheckMultiError(errors) - } - - return nil -} - -// HealthCheck_HttpHealthCheckMultiError is an error wrapping multiple -// validation errors returned by HealthCheck_HttpHealthCheck.ValidateAll() if -// the designated constraints aren't met. -type HealthCheck_HttpHealthCheckMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheck_HttpHealthCheckMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheck_HttpHealthCheckMultiError) AllErrors() []error { return m } - -// HealthCheck_HttpHealthCheckValidationError is the validation error returned -// by HealthCheck_HttpHealthCheck.Validate if the designated constraints -// aren't met. -type HealthCheck_HttpHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_HttpHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_HttpHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_HttpHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_HttpHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_HttpHealthCheckValidationError) ErrorName() string { - return "HealthCheck_HttpHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_HttpHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_HttpHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_HttpHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_HttpHealthCheckValidationError{} - -var _HealthCheck_HttpHealthCheck_Host_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _HealthCheck_HttpHealthCheck_Path_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _HealthCheck_HttpHealthCheck_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _HealthCheck_HttpHealthCheck_Method_NotInLookup = map[RequestMethod]struct{}{ - 6: {}, -} - -// Validate checks the field values on HealthCheck_TcpHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HealthCheck_TcpHealthCheck) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthCheck_TcpHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HealthCheck_TcpHealthCheckMultiError, or nil if none found. -func (m *HealthCheck_TcpHealthCheck) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheck_TcpHealthCheck) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetSend()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ - field: "Send", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ - field: "Send", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSend()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheck_TcpHealthCheckValidationError{ - field: "Send", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetReceive() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ - field: fmt.Sprintf("Receive[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheck_TcpHealthCheckValidationError{ - field: fmt.Sprintf("Receive[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheck_TcpHealthCheckValidationError{ - field: fmt.Sprintf("Receive[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return HealthCheck_TcpHealthCheckMultiError(errors) - } - - return nil -} - -// HealthCheck_TcpHealthCheckMultiError is an error wrapping multiple -// validation errors returned by HealthCheck_TcpHealthCheck.ValidateAll() if -// the designated constraints aren't met. -type HealthCheck_TcpHealthCheckMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheck_TcpHealthCheckMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheck_TcpHealthCheckMultiError) AllErrors() []error { return m } - -// HealthCheck_TcpHealthCheckValidationError is the validation error returned -// by HealthCheck_TcpHealthCheck.Validate if the designated constraints aren't met. -type HealthCheck_TcpHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_TcpHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_TcpHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_TcpHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_TcpHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_TcpHealthCheckValidationError) ErrorName() string { - return "HealthCheck_TcpHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_TcpHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_TcpHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_TcpHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_TcpHealthCheckValidationError{} - -// Validate checks the field values on HealthCheck_RedisHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HealthCheck_RedisHealthCheck) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthCheck_RedisHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HealthCheck_RedisHealthCheckMultiError, or nil if none found. -func (m *HealthCheck_RedisHealthCheck) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheck_RedisHealthCheck) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Key - - if len(errors) > 0 { - return HealthCheck_RedisHealthCheckMultiError(errors) - } - - return nil -} - -// HealthCheck_RedisHealthCheckMultiError is an error wrapping multiple -// validation errors returned by HealthCheck_RedisHealthCheck.ValidateAll() if -// the designated constraints aren't met. -type HealthCheck_RedisHealthCheckMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheck_RedisHealthCheckMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheck_RedisHealthCheckMultiError) AllErrors() []error { return m } - -// HealthCheck_RedisHealthCheckValidationError is the validation error returned -// by HealthCheck_RedisHealthCheck.Validate if the designated constraints -// aren't met. -type HealthCheck_RedisHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_RedisHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_RedisHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_RedisHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_RedisHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_RedisHealthCheckValidationError) ErrorName() string { - return "HealthCheck_RedisHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_RedisHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_RedisHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_RedisHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_RedisHealthCheckValidationError{} - -// Validate checks the field values on HealthCheck_GrpcHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HealthCheck_GrpcHealthCheck) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthCheck_GrpcHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HealthCheck_GrpcHealthCheckMultiError, or nil if none found. -func (m *HealthCheck_GrpcHealthCheck) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheck_GrpcHealthCheck) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ServiceName - - if !_HealthCheck_GrpcHealthCheck_Authority_Pattern.MatchString(m.GetAuthority()) { - err := HealthCheck_GrpcHealthCheckValidationError{ - field: "Authority", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetInitialMetadata()) > 1000 { - err := HealthCheck_GrpcHealthCheckValidationError{ - field: "InitialMetadata", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetInitialMetadata() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheck_GrpcHealthCheckValidationError{ - field: fmt.Sprintf("InitialMetadata[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheck_GrpcHealthCheckValidationError{ - field: fmt.Sprintf("InitialMetadata[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheck_GrpcHealthCheckValidationError{ - field: fmt.Sprintf("InitialMetadata[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return HealthCheck_GrpcHealthCheckMultiError(errors) - } - - return nil -} - -// HealthCheck_GrpcHealthCheckMultiError is an error wrapping multiple -// validation errors returned by HealthCheck_GrpcHealthCheck.ValidateAll() if -// the designated constraints aren't met. -type HealthCheck_GrpcHealthCheckMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheck_GrpcHealthCheckMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheck_GrpcHealthCheckMultiError) AllErrors() []error { return m } - -// HealthCheck_GrpcHealthCheckValidationError is the validation error returned -// by HealthCheck_GrpcHealthCheck.Validate if the designated constraints -// aren't met. -type HealthCheck_GrpcHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_GrpcHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_GrpcHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_GrpcHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_GrpcHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_GrpcHealthCheckValidationError) ErrorName() string { - return "HealthCheck_GrpcHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_GrpcHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_GrpcHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_GrpcHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_GrpcHealthCheckValidationError{} - -var _HealthCheck_GrpcHealthCheck_Authority_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on HealthCheck_CustomHealthCheck with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HealthCheck_CustomHealthCheck) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthCheck_CustomHealthCheck with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// HealthCheck_CustomHealthCheckMultiError, or nil if none found. -func (m *HealthCheck_CustomHealthCheck) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheck_CustomHealthCheck) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := HealthCheck_CustomHealthCheckValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - switch v := m.ConfigType.(type) { - case *HealthCheck_CustomHealthCheck_TypedConfig: - if v == nil { - err := HealthCheck_CustomHealthCheckValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheck_CustomHealthCheckValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheck_CustomHealthCheckValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheck_CustomHealthCheckValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return HealthCheck_CustomHealthCheckMultiError(errors) - } - - return nil -} - -// HealthCheck_CustomHealthCheckMultiError is an error wrapping multiple -// validation errors returned by HealthCheck_CustomHealthCheck.ValidateAll() -// if the designated constraints aren't met. -type HealthCheck_CustomHealthCheckMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheck_CustomHealthCheckMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheck_CustomHealthCheckMultiError) AllErrors() []error { return m } - -// HealthCheck_CustomHealthCheckValidationError is the validation error -// returned by HealthCheck_CustomHealthCheck.Validate if the designated -// constraints aren't met. -type HealthCheck_CustomHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_CustomHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_CustomHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_CustomHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_CustomHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_CustomHealthCheckValidationError) ErrorName() string { - return "HealthCheck_CustomHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_CustomHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_CustomHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_CustomHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_CustomHealthCheckValidationError{} - -// Validate checks the field values on HealthCheck_TlsOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HealthCheck_TlsOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthCheck_TlsOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HealthCheck_TlsOptionsMultiError, or nil if none found. -func (m *HealthCheck_TlsOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheck_TlsOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return HealthCheck_TlsOptionsMultiError(errors) - } - - return nil -} - -// HealthCheck_TlsOptionsMultiError is an error wrapping multiple validation -// errors returned by HealthCheck_TlsOptions.ValidateAll() if the designated -// constraints aren't met. -type HealthCheck_TlsOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheck_TlsOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheck_TlsOptionsMultiError) AllErrors() []error { return m } - -// HealthCheck_TlsOptionsValidationError is the validation error returned by -// HealthCheck_TlsOptions.Validate if the designated constraints aren't met. -type HealthCheck_TlsOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheck_TlsOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheck_TlsOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheck_TlsOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheck_TlsOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheck_TlsOptionsValidationError) ErrorName() string { - return "HealthCheck_TlsOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheck_TlsOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheck_TlsOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheck_TlsOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheck_TlsOptionsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/http_uri.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/http_uri.pb.go deleted file mode 100644 index 76b21f4928d..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/http_uri.pb.go +++ /dev/null @@ -1,240 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/http_uri.proto - -package corev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Envoy external URI descriptor -type HttpUri struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The HTTP server URI. It should be a full FQDN with protocol, host and path. - // - // Example: - // - // .. code-block:: yaml - // - // uri: https://www.googleapis.com/oauth2/v1/certs - Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` - // Specify how “uri“ is to be fetched. Today, this requires an explicit - // cluster, but in the future we may support dynamic cluster creation or - // inline DNS resolution. See `issue - // `_. - // - // Types that are assignable to HttpUpstreamType: - // - // *HttpUri_Cluster - HttpUpstreamType isHttpUri_HttpUpstreamType `protobuf_oneof:"http_upstream_type"` - // Sets the maximum duration in milliseconds that a response can take to arrive upon request. - Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` -} - -func (x *HttpUri) Reset() { - *x = HttpUri{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_http_uri_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpUri) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpUri) ProtoMessage() {} - -func (x *HttpUri) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_http_uri_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpUri.ProtoReflect.Descriptor instead. -func (*HttpUri) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_http_uri_proto_rawDescGZIP(), []int{0} -} - -func (x *HttpUri) GetUri() string { - if x != nil { - return x.Uri - } - return "" -} - -func (m *HttpUri) GetHttpUpstreamType() isHttpUri_HttpUpstreamType { - if m != nil { - return m.HttpUpstreamType - } - return nil -} - -func (x *HttpUri) GetCluster() string { - if x, ok := x.GetHttpUpstreamType().(*HttpUri_Cluster); ok { - return x.Cluster - } - return "" -} - -func (x *HttpUri) GetTimeout() *durationpb.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -type isHttpUri_HttpUpstreamType interface { - isHttpUri_HttpUpstreamType() -} - -type HttpUri_Cluster struct { - // A cluster is created in the Envoy "cluster_manager" config - // section. This field specifies the cluster name. - // - // Example: - // - // .. code-block:: yaml - // - // cluster: jwks_cluster - Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3,oneof"` -} - -func (*HttpUri_Cluster) isHttpUri_HttpUpstreamType() {} - -var File_envoy_config_core_v3_http_uri_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_http_uri_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc7, 0x01, 0x0a, 0x07, 0x48, 0x74, 0x74, 0x70, 0x55, - 0x72, 0x69, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x23, 0x0a, - 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, - 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x32, 0x00, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x3a, 0x20, 0x9a, 0xc5, 0x88, 0x1e, 0x1b, 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x55, 0x72, 0x69, 0x42, 0x19, 0x0a, 0x12, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x42, 0x80, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, - 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_http_uri_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_http_uri_proto_rawDescData = file_envoy_config_core_v3_http_uri_proto_rawDesc -) - -func file_envoy_config_core_v3_http_uri_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_http_uri_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_http_uri_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_http_uri_proto_rawDescData) - }) - return file_envoy_config_core_v3_http_uri_proto_rawDescData -} - -var file_envoy_config_core_v3_http_uri_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v3_http_uri_proto_goTypes = []interface{}{ - (*HttpUri)(nil), // 0: envoy.config.core.v3.HttpUri - (*durationpb.Duration)(nil), // 1: google.protobuf.Duration -} -var file_envoy_config_core_v3_http_uri_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v3.HttpUri.timeout:type_name -> google.protobuf.Duration - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_http_uri_proto_init() } -func file_envoy_config_core_v3_http_uri_proto_init() { - if File_envoy_config_core_v3_http_uri_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_http_uri_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpUri); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v3_http_uri_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*HttpUri_Cluster)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_http_uri_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_http_uri_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_http_uri_proto_depIdxs, - MessageInfos: file_envoy_config_core_v3_http_uri_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_http_uri_proto = out.File - file_envoy_config_core_v3_http_uri_proto_rawDesc = nil - file_envoy_config_core_v3_http_uri_proto_goTypes = nil - file_envoy_config_core_v3_http_uri_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/http_uri.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/http_uri.pb.validate.go deleted file mode 100644 index 0e3ab815eef..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/http_uri.pb.validate.go +++ /dev/null @@ -1,226 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/http_uri.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on HttpUri with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HttpUri) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpUri with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in HttpUriMultiError, or nil if none found. -func (m *HttpUri) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpUri) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetUri()) < 1 { - err := HttpUriValidationError{ - field: "Uri", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetTimeout() == nil { - err := HttpUriValidationError{ - field: "Timeout", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if d := m.GetTimeout(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = HttpUriValidationError{ - field: "Timeout", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gte := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur < gte { - err := HttpUriValidationError{ - field: "Timeout", - reason: "value must be greater than or equal to 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - oneofHttpUpstreamTypePresent := false - switch v := m.HttpUpstreamType.(type) { - case *HttpUri_Cluster: - if v == nil { - err := HttpUriValidationError{ - field: "HttpUpstreamType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofHttpUpstreamTypePresent = true - - if utf8.RuneCountInString(m.GetCluster()) < 1 { - err := HttpUriValidationError{ - field: "Cluster", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - if !oneofHttpUpstreamTypePresent { - err := HttpUriValidationError{ - field: "HttpUpstreamType", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HttpUriMultiError(errors) - } - - return nil -} - -// HttpUriMultiError is an error wrapping multiple validation errors returned -// by HttpUri.ValidateAll() if the designated constraints aren't met. -type HttpUriMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpUriMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpUriMultiError) AllErrors() []error { return m } - -// HttpUriValidationError is the validation error returned by HttpUri.Validate -// if the designated constraints aren't met. -type HttpUriValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpUriValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpUriValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpUriValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpUriValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpUriValidationError) ErrorName() string { return "HttpUriValidationError" } - -// Error satisfies the builtin error interface -func (e HttpUriValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpUri.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpUriValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpUriValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/protocol.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/protocol.pb.go deleted file mode 100644 index 1d67dbd8d5d..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/protocol.pb.go +++ /dev/null @@ -1,2382 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/protocol.proto - -package corev3 - -import ( - _ "github.com/cilium/proxy/go/envoy/annotations" - v3 "github.com/cilium/proxy/go/envoy/type/v3" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/cncf/xds/go/xds/annotations/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Action to take when Envoy receives client request with header names containing underscore -// characters. -// Underscore character is allowed in header names by the RFC-7230 and this behavior is implemented -// as a security measure due to systems that treat '_' and '-' as interchangeable. Envoy by default allows client request headers with underscore -// characters. -type HttpProtocolOptions_HeadersWithUnderscoresAction int32 - -const ( - // Allow headers with underscores. This is the default behavior. - HttpProtocolOptions_ALLOW HttpProtocolOptions_HeadersWithUnderscoresAction = 0 - // Reject client request. HTTP/1 requests are rejected with the 400 status. HTTP/2 requests - // end with the stream reset. The "httpN.requests_rejected_with_underscores_in_headers" counter - // is incremented for each rejected request. - HttpProtocolOptions_REJECT_REQUEST HttpProtocolOptions_HeadersWithUnderscoresAction = 1 - // Drop the client header with name containing underscores. The header is dropped before the filter chain is - // invoked and as such filters will not see dropped headers. The - // "httpN.dropped_headers_with_underscores" is incremented for each dropped header. - HttpProtocolOptions_DROP_HEADER HttpProtocolOptions_HeadersWithUnderscoresAction = 2 -) - -// Enum value maps for HttpProtocolOptions_HeadersWithUnderscoresAction. -var ( - HttpProtocolOptions_HeadersWithUnderscoresAction_name = map[int32]string{ - 0: "ALLOW", - 1: "REJECT_REQUEST", - 2: "DROP_HEADER", - } - HttpProtocolOptions_HeadersWithUnderscoresAction_value = map[string]int32{ - "ALLOW": 0, - "REJECT_REQUEST": 1, - "DROP_HEADER": 2, - } -) - -func (x HttpProtocolOptions_HeadersWithUnderscoresAction) Enum() *HttpProtocolOptions_HeadersWithUnderscoresAction { - p := new(HttpProtocolOptions_HeadersWithUnderscoresAction) - *p = x - return p -} - -func (x HttpProtocolOptions_HeadersWithUnderscoresAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HttpProtocolOptions_HeadersWithUnderscoresAction) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_protocol_proto_enumTypes[0].Descriptor() -} - -func (HttpProtocolOptions_HeadersWithUnderscoresAction) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_protocol_proto_enumTypes[0] -} - -func (x HttpProtocolOptions_HeadersWithUnderscoresAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HttpProtocolOptions_HeadersWithUnderscoresAction.Descriptor instead. -func (HttpProtocolOptions_HeadersWithUnderscoresAction) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{5, 0} -} - -// [#not-implemented-hide:] -type TcpProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TcpProtocolOptions) Reset() { - *x = TcpProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TcpProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TcpProtocolOptions) ProtoMessage() {} - -func (x *TcpProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TcpProtocolOptions.ProtoReflect.Descriptor instead. -func (*TcpProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{0} -} - -// Config for keepalive probes in a QUIC connection. -// Note that QUIC keep-alive probing packets work differently from HTTP/2 keep-alive PINGs in a sense that the probing packet -// itself doesn't timeout waiting for a probing response. Quic has a shorter idle timeout than TCP, so it doesn't rely on such probing to discover dead connections. If the peer fails to respond, the connection will idle timeout eventually. Thus, they are configured differently from :ref:`connection_keepalive `. -type QuicKeepAliveSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The max interval for a connection to send keep-alive probing packets (with PING or PATH_RESPONSE). The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout while not less than 1s to avoid throttling the connection or flooding the peer with probes. - // - // If :ref:`initial_interval ` is absent or zero, a client connection will use this value to start probing. - // - // If zero, disable keepalive probing. - // If absent, use the QUICHE default interval to probe. - MaxInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` - // The interval to send the first few keep-alive probing packets to prevent connection from hitting the idle timeout. Subsequent probes will be sent, each one with an interval exponentially longer than previous one, till it reaches :ref:`max_interval `. And the probes afterwards will always use :ref:`max_interval `. - // - // The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout and smaller than max_interval to take effect. - // - // If absent or zero, disable keepalive probing for a server connection. For a client connection, if :ref:`max_interval ` is also zero, do not keepalive, otherwise use max_interval or QUICHE default to probe all the time. - InitialInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=initial_interval,json=initialInterval,proto3" json:"initial_interval,omitempty"` -} - -func (x *QuicKeepAliveSettings) Reset() { - *x = QuicKeepAliveSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuicKeepAliveSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuicKeepAliveSettings) ProtoMessage() {} - -func (x *QuicKeepAliveSettings) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QuicKeepAliveSettings.ProtoReflect.Descriptor instead. -func (*QuicKeepAliveSettings) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{1} -} - -func (x *QuicKeepAliveSettings) GetMaxInterval() *durationpb.Duration { - if x != nil { - return x.MaxInterval - } - return nil -} - -func (x *QuicKeepAliveSettings) GetInitialInterval() *durationpb.Duration { - if x != nil { - return x.InitialInterval - } - return nil -} - -// QUIC protocol options which apply to both downstream and upstream connections. -// [#next-free-field: 6] -type QuicProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Maximum number of streams that the client can negotiate per connection. 100 - // if not specified. - MaxConcurrentStreams *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"` - // `Initial stream-level flow-control receive window - // `_ size. Valid values range from - // 1 to 16777216 (2^24, maximum supported by QUICHE) and defaults to 65536 (2^16). - // - // NOTE: 16384 (2^14) is the minimum window size supported in Google QUIC. If configured smaller than it, we will use 16384 instead. - // QUICHE IETF Quic implementation supports 1 bytes window. We only support increasing the default window size now, so it's also the minimum. - // - // This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the - // QUIC stream send and receive buffers. Once the buffer reaches this pointer, watermark callbacks will fire to - // stop the flow of data to the stream buffers. - InitialStreamWindowSize *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=initial_stream_window_size,json=initialStreamWindowSize,proto3" json:"initial_stream_window_size,omitempty"` - // Similar to “initial_stream_window_size“, but for connection-level - // flow-control. Valid values rage from 1 to 25165824 (24MB, maximum supported by QUICHE) and defaults to 65536 (2^16). - // window. Currently, this has the same minimum/default as “initial_stream_window_size“. - // - // NOTE: 16384 (2^14) is the minimum window size supported in Google QUIC. We only support increasing the default - // window size now, so it's also the minimum. - InitialConnectionWindowSize *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=initial_connection_window_size,json=initialConnectionWindowSize,proto3" json:"initial_connection_window_size,omitempty"` - // The number of timeouts that can occur before port migration is triggered for QUIC clients. - // This defaults to 1. If set to 0, port migration will not occur on path degrading. - // Timeout here refers to QUIC internal path degrading timeout mechanism, such as PTO. - // This has no effect on server sessions. - NumTimeoutsToTriggerPortMigration *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=num_timeouts_to_trigger_port_migration,json=numTimeoutsToTriggerPortMigration,proto3" json:"num_timeouts_to_trigger_port_migration,omitempty"` - // Probes the peer at the configured interval to solicit traffic, i.e. ACK or PATH_RESPONSE, from the peer to push back connection idle timeout. - // If absent, use the default keepalive behavior of which a client connection sends PINGs every 15s, and a server connection doesn't do anything. - ConnectionKeepalive *QuicKeepAliveSettings `protobuf:"bytes,5,opt,name=connection_keepalive,json=connectionKeepalive,proto3" json:"connection_keepalive,omitempty"` -} - -func (x *QuicProtocolOptions) Reset() { - *x = QuicProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuicProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuicProtocolOptions) ProtoMessage() {} - -func (x *QuicProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QuicProtocolOptions.ProtoReflect.Descriptor instead. -func (*QuicProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{2} -} - -func (x *QuicProtocolOptions) GetMaxConcurrentStreams() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxConcurrentStreams - } - return nil -} - -func (x *QuicProtocolOptions) GetInitialStreamWindowSize() *wrapperspb.UInt32Value { - if x != nil { - return x.InitialStreamWindowSize - } - return nil -} - -func (x *QuicProtocolOptions) GetInitialConnectionWindowSize() *wrapperspb.UInt32Value { - if x != nil { - return x.InitialConnectionWindowSize - } - return nil -} - -func (x *QuicProtocolOptions) GetNumTimeoutsToTriggerPortMigration() *wrapperspb.UInt32Value { - if x != nil { - return x.NumTimeoutsToTriggerPortMigration - } - return nil -} - -func (x *QuicProtocolOptions) GetConnectionKeepalive() *QuicKeepAliveSettings { - if x != nil { - return x.ConnectionKeepalive - } - return nil -} - -type UpstreamHttpProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Set transport socket `SNI `_ for new - // upstream connections based on the downstream HTTP host/authority header or any other arbitrary - // header when :ref:`override_auto_sni_header ` - // is set, as seen by the :ref:`router filter `. - // Does nothing if a filter before the http router filter sets the corresponding metadata. - AutoSni bool `protobuf:"varint,1,opt,name=auto_sni,json=autoSni,proto3" json:"auto_sni,omitempty"` - // Automatic validate upstream presented certificate for new upstream connections based on the - // downstream HTTP host/authority header or any other arbitrary header when :ref:`override_auto_sni_header ` - // is set, as seen by the :ref:`router filter `. - // This field is intended to be set with “auto_sni“ field. - // Does nothing if a filter before the http router filter sets the corresponding metadata. - AutoSanValidation bool `protobuf:"varint,2,opt,name=auto_san_validation,json=autoSanValidation,proto3" json:"auto_san_validation,omitempty"` - // An optional alternative to the host/authority header to be used for setting the SNI value. - // It should be a valid downstream HTTP header, as seen by the - // :ref:`router filter `. - // If unset, host/authority header will be used for populating the SNI. If the specified header - // is not found or the value is empty, host/authority header will be used instead. - // This field is intended to be set with “auto_sni“ and/or “auto_san_validation“ fields. - // If none of these fields are set then setting this would be a no-op. - // Does nothing if a filter before the http router filter sets the corresponding metadata. - OverrideAutoSniHeader string `protobuf:"bytes,3,opt,name=override_auto_sni_header,json=overrideAutoSniHeader,proto3" json:"override_auto_sni_header,omitempty"` -} - -func (x *UpstreamHttpProtocolOptions) Reset() { - *x = UpstreamHttpProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamHttpProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamHttpProtocolOptions) ProtoMessage() {} - -func (x *UpstreamHttpProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamHttpProtocolOptions.ProtoReflect.Descriptor instead. -func (*UpstreamHttpProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{3} -} - -func (x *UpstreamHttpProtocolOptions) GetAutoSni() bool { - if x != nil { - return x.AutoSni - } - return false -} - -func (x *UpstreamHttpProtocolOptions) GetAutoSanValidation() bool { - if x != nil { - return x.AutoSanValidation - } - return false -} - -func (x *UpstreamHttpProtocolOptions) GetOverrideAutoSniHeader() string { - if x != nil { - return x.OverrideAutoSniHeader - } - return "" -} - -// Configures the alternate protocols cache which tracks alternate protocols that can be used to -// make an HTTP connection to an origin server. See https://tools.ietf.org/html/rfc7838 for -// HTTP Alternative Services and https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https-04 -// for the "HTTPS" DNS resource record. -// [#next-free-field: 6] -type AlternateProtocolsCacheOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the cache. Multiple named caches allow independent alternate protocols cache - // configurations to operate within a single Envoy process using different configurations. All - // alternate protocols cache options with the same name *must* be equal in all fields when - // referenced from different configuration components. Configuration will fail to load if this is - // not the case. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The maximum number of entries that the cache will hold. If not specified defaults to 1024. - // - // .. note: - // - // The implementation is approximate and enforced independently on each worker thread, thus - // it is possible for the maximum entries in the cache to go slightly above the configured - // value depending on timing. This is similar to how other circuit breakers work. - MaxEntries *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"` - // Allows configuring a persistent - // :ref:`key value store ` to flush - // alternate protocols entries to disk. - // This function is currently only supported if concurrency is 1 - // Cached entries will take precedence over pre-populated entries below. - KeyValueStoreConfig *TypedExtensionConfig `protobuf:"bytes,3,opt,name=key_value_store_config,json=keyValueStoreConfig,proto3" json:"key_value_store_config,omitempty"` - // Allows pre-populating the cache with entries, as described above. - PrepopulatedEntries []*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry `protobuf:"bytes,4,rep,name=prepopulated_entries,json=prepopulatedEntries,proto3" json:"prepopulated_entries,omitempty"` - // Optional list of hostnames suffixes for which Alt-Svc entries can be shared. For example, if - // this list contained the value “.c.example.com“, then an Alt-Svc entry for “foo.c.example.com“ - // could be shared with “bar.c.example.com“ but would not be shared with “baz.example.com“. On - // the other hand, if the list contained the value “.example.com“ then all three hosts could share - // Alt-Svc entries. Each entry must start with “.“. If a hostname matches multiple suffixes, the - // first listed suffix will be used. - // - // Since lookup in this list is O(n), it is recommended that the number of suffixes be limited. - // [#not-implemented-hide:] - CanonicalSuffixes []string `protobuf:"bytes,5,rep,name=canonical_suffixes,json=canonicalSuffixes,proto3" json:"canonical_suffixes,omitempty"` -} - -func (x *AlternateProtocolsCacheOptions) Reset() { - *x = AlternateProtocolsCacheOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AlternateProtocolsCacheOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AlternateProtocolsCacheOptions) ProtoMessage() {} - -func (x *AlternateProtocolsCacheOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AlternateProtocolsCacheOptions.ProtoReflect.Descriptor instead. -func (*AlternateProtocolsCacheOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{4} -} - -func (x *AlternateProtocolsCacheOptions) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *AlternateProtocolsCacheOptions) GetMaxEntries() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxEntries - } - return nil -} - -func (x *AlternateProtocolsCacheOptions) GetKeyValueStoreConfig() *TypedExtensionConfig { - if x != nil { - return x.KeyValueStoreConfig - } - return nil -} - -func (x *AlternateProtocolsCacheOptions) GetPrepopulatedEntries() []*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry { - if x != nil { - return x.PrepopulatedEntries - } - return nil -} - -func (x *AlternateProtocolsCacheOptions) GetCanonicalSuffixes() []string { - if x != nil { - return x.CanonicalSuffixes - } - return nil -} - -// [#next-free-field: 7] -type HttpProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The idle timeout for connections. The idle timeout is defined as the - // period in which there are no active requests. When the - // idle timeout is reached the connection will be closed. If the connection is an HTTP/2 - // downstream connection a drain sequence will occur prior to closing the connection, see - // :ref:`drain_timeout - // `. - // Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. - // If not specified, this defaults to 1 hour. To disable idle timeouts explicitly set this to 0. - // - // .. warning:: - // - // Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP - // FIN packets, etc. - // - // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" - // is configured, this timeout is scaled for downstream connections according to the value for - // :ref:`HTTP_DOWNSTREAM_CONNECTION_IDLE `. - IdleTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` - // The maximum duration of a connection. The duration is defined as a period since a connection - // was established. If not set, there is no max duration. When max_connection_duration is reached - // and if there are no active streams, the connection will be closed. If the connection is a - // downstream connection and there are any active streams, the drain sequence will kick-in, - // and the connection will be force-closed after the drain period. See :ref:`drain_timeout - // `. - MaxConnectionDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=max_connection_duration,json=maxConnectionDuration,proto3" json:"max_connection_duration,omitempty"` - // The maximum number of headers. If unconfigured, the default - // maximum number of request headers allowed is 100. Requests that exceed this limit will receive - // a 431 response for HTTP/1.x and cause a stream reset for HTTP/2. - MaxHeadersCount *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=max_headers_count,json=maxHeadersCount,proto3" json:"max_headers_count,omitempty"` - // Total duration to keep alive an HTTP request/response stream. If the time limit is reached the stream will be - // reset independent of any other timeouts. If not specified, this value is not set. - MaxStreamDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=max_stream_duration,json=maxStreamDuration,proto3" json:"max_stream_duration,omitempty"` - // Action to take when a client request with a header name containing underscore characters is received. - // If this setting is not specified, the value defaults to ALLOW. - // Note: upstream responses are not affected by this setting. - // Note: this only affects client headers. It does not affect headers added - // by Envoy filters and does not have any impact if added to cluster config. - HeadersWithUnderscoresAction HttpProtocolOptions_HeadersWithUnderscoresAction `protobuf:"varint,5,opt,name=headers_with_underscores_action,json=headersWithUnderscoresAction,proto3,enum=envoy.config.core.v3.HttpProtocolOptions_HeadersWithUnderscoresAction" json:"headers_with_underscores_action,omitempty"` - // Optional maximum requests for both upstream and downstream connections. - // If not specified, there is no limit. - // Setting this parameter to 1 will effectively disable keep alive. - // For HTTP/2 and HTTP/3, due to concurrent stream processing, the limit is approximate. - MaxRequestsPerConnection *wrapperspb.UInt32Value `protobuf:"bytes,6,opt,name=max_requests_per_connection,json=maxRequestsPerConnection,proto3" json:"max_requests_per_connection,omitempty"` -} - -func (x *HttpProtocolOptions) Reset() { - *x = HttpProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpProtocolOptions) ProtoMessage() {} - -func (x *HttpProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpProtocolOptions.ProtoReflect.Descriptor instead. -func (*HttpProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{5} -} - -func (x *HttpProtocolOptions) GetIdleTimeout() *durationpb.Duration { - if x != nil { - return x.IdleTimeout - } - return nil -} - -func (x *HttpProtocolOptions) GetMaxConnectionDuration() *durationpb.Duration { - if x != nil { - return x.MaxConnectionDuration - } - return nil -} - -func (x *HttpProtocolOptions) GetMaxHeadersCount() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxHeadersCount - } - return nil -} - -func (x *HttpProtocolOptions) GetMaxStreamDuration() *durationpb.Duration { - if x != nil { - return x.MaxStreamDuration - } - return nil -} - -func (x *HttpProtocolOptions) GetHeadersWithUnderscoresAction() HttpProtocolOptions_HeadersWithUnderscoresAction { - if x != nil { - return x.HeadersWithUnderscoresAction - } - return HttpProtocolOptions_ALLOW -} - -func (x *HttpProtocolOptions) GetMaxRequestsPerConnection() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxRequestsPerConnection - } - return nil -} - -// [#next-free-field: 11] -type Http1ProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Handle HTTP requests with absolute URLs in the requests. These requests - // are generally sent by clients to forward/explicit proxies. This allows clients to configure - // envoy as their HTTP proxy. In Unix, for example, this is typically done by setting the - // “http_proxy“ environment variable. - AllowAbsoluteUrl *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=allow_absolute_url,json=allowAbsoluteUrl,proto3" json:"allow_absolute_url,omitempty"` - // Handle incoming HTTP/1.0 and HTTP 0.9 requests. - // This is off by default, and not fully standards compliant. There is support for pre-HTTP/1.1 - // style connect logic, dechunking, and handling lack of client host iff - // “default_host_for_http_10“ is configured. - AcceptHttp_10 bool `protobuf:"varint,2,opt,name=accept_http_10,json=acceptHttp10,proto3" json:"accept_http_10,omitempty"` - // A default host for HTTP/1.0 requests. This is highly suggested if “accept_http_10“ is true as - // Envoy does not otherwise support HTTP/1.0 without a Host header. - // This is a no-op if “accept_http_10“ is not true. - DefaultHostForHttp_10 string `protobuf:"bytes,3,opt,name=default_host_for_http_10,json=defaultHostForHttp10,proto3" json:"default_host_for_http_10,omitempty"` - // Describes how the keys for response headers should be formatted. By default, all header keys - // are lower cased. - HeaderKeyFormat *Http1ProtocolOptions_HeaderKeyFormat `protobuf:"bytes,4,opt,name=header_key_format,json=headerKeyFormat,proto3" json:"header_key_format,omitempty"` - // Enables trailers for HTTP/1. By default the HTTP/1 codec drops proxied trailers. - // - // .. attention:: - // - // Note that this only happens when Envoy is chunk encoding which occurs when: - // - The request is HTTP/1.1. - // - Is neither a HEAD only request nor a HTTP Upgrade. - // - Not a response to a HEAD request. - // - The content length header is not present. - EnableTrailers bool `protobuf:"varint,5,opt,name=enable_trailers,json=enableTrailers,proto3" json:"enable_trailers,omitempty"` - // Allows Envoy to process requests/responses with both “Content-Length“ and “Transfer-Encoding“ - // headers set. By default such messages are rejected, but if option is enabled - Envoy will - // remove Content-Length header and process message. - // See `RFC7230, sec. 3.3.3 `_ for details. - // - // .. attention:: - // - // Enabling this option might lead to request smuggling vulnerability, especially if traffic - // is proxied via multiple layers of proxies. - // - // [#comment:TODO: This field is ignored when the - // :ref:`header validation configuration ` - // is present.] - AllowChunkedLength bool `protobuf:"varint,6,opt,name=allow_chunked_length,json=allowChunkedLength,proto3" json:"allow_chunked_length,omitempty"` - // Allows invalid HTTP messaging. When this option is false, then Envoy will terminate - // HTTP/1.1 connections upon receiving an invalid HTTP message. However, - // when this option is true, then Envoy will leave the HTTP/1.1 connection - // open where possible. - // If set, this overrides any HCM :ref:`stream_error_on_invalid_http_messaging - // `. - OverrideStreamErrorOnInvalidHttpMessage *wrapperspb.BoolValue `protobuf:"bytes,7,opt,name=override_stream_error_on_invalid_http_message,json=overrideStreamErrorOnInvalidHttpMessage,proto3" json:"override_stream_error_on_invalid_http_message,omitempty"` - // Allows sending fully qualified URLs when proxying the first line of the - // response. By default, Envoy will only send the path components in the first line. - // If this is true, Envoy will create a fully qualified URI composing scheme - // (inferred if not present), host (from the host/:authority header) and path - // (from first line or :path header). - SendFullyQualifiedUrl bool `protobuf:"varint,8,opt,name=send_fully_qualified_url,json=sendFullyQualifiedUrl,proto3" json:"send_fully_qualified_url,omitempty"` - // [#not-implemented-hide:] Hiding so that field can be removed after BalsaParser is rolled out. - // If set, force HTTP/1 parser: BalsaParser if true, http-parser if false. - // If unset, HTTP/1 parser is selected based on - // envoy.reloadable_features.http1_use_balsa_parser. - // See issue #21245. - UseBalsaParser *wrapperspb.BoolValue `protobuf:"bytes,9,opt,name=use_balsa_parser,json=useBalsaParser,proto3" json:"use_balsa_parser,omitempty"` - // [#not-implemented-hide:] Hiding so that field can be removed. - // If true, and BalsaParser is used (either `use_balsa_parser` above is true, - // or `envoy.reloadable_features.http1_use_balsa_parser` is true and - // `use_balsa_parser` is unset), then every non-empty method with only valid - // characters is accepted. Otherwise, methods not on the hard-coded list are - // rejected. - // Once UHV is enabled, this field should be removed, and BalsaParser should - // allow any method. UHV validates the method, rejecting empty string or - // invalid characters, and provides :ref:`restrict_http_methods - // ` - // to reject custom methods. - AllowCustomMethods bool `protobuf:"varint,10,opt,name=allow_custom_methods,json=allowCustomMethods,proto3" json:"allow_custom_methods,omitempty"` -} - -func (x *Http1ProtocolOptions) Reset() { - *x = Http1ProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http1ProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http1ProtocolOptions) ProtoMessage() {} - -func (x *Http1ProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http1ProtocolOptions.ProtoReflect.Descriptor instead. -func (*Http1ProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{6} -} - -func (x *Http1ProtocolOptions) GetAllowAbsoluteUrl() *wrapperspb.BoolValue { - if x != nil { - return x.AllowAbsoluteUrl - } - return nil -} - -func (x *Http1ProtocolOptions) GetAcceptHttp_10() bool { - if x != nil { - return x.AcceptHttp_10 - } - return false -} - -func (x *Http1ProtocolOptions) GetDefaultHostForHttp_10() string { - if x != nil { - return x.DefaultHostForHttp_10 - } - return "" -} - -func (x *Http1ProtocolOptions) GetHeaderKeyFormat() *Http1ProtocolOptions_HeaderKeyFormat { - if x != nil { - return x.HeaderKeyFormat - } - return nil -} - -func (x *Http1ProtocolOptions) GetEnableTrailers() bool { - if x != nil { - return x.EnableTrailers - } - return false -} - -func (x *Http1ProtocolOptions) GetAllowChunkedLength() bool { - if x != nil { - return x.AllowChunkedLength - } - return false -} - -func (x *Http1ProtocolOptions) GetOverrideStreamErrorOnInvalidHttpMessage() *wrapperspb.BoolValue { - if x != nil { - return x.OverrideStreamErrorOnInvalidHttpMessage - } - return nil -} - -func (x *Http1ProtocolOptions) GetSendFullyQualifiedUrl() bool { - if x != nil { - return x.SendFullyQualifiedUrl - } - return false -} - -func (x *Http1ProtocolOptions) GetUseBalsaParser() *wrapperspb.BoolValue { - if x != nil { - return x.UseBalsaParser - } - return nil -} - -func (x *Http1ProtocolOptions) GetAllowCustomMethods() bool { - if x != nil { - return x.AllowCustomMethods - } - return false -} - -type KeepaliveSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Send HTTP/2 PING frames at this period, in order to test that the connection is still alive. - // If this is zero, interval PINGs will not be sent. - Interval *durationpb.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` - // How long to wait for a response to a keepalive PING. If a response is not received within this - // time period, the connection will be aborted. Note that in order to prevent the influence of - // Head-of-line (HOL) blocking the timeout period is extended when *any* frame is received on - // the connection, under the assumption that if a frame is received the connection is healthy. - Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` - // A random jitter amount as a percentage of interval that will be added to each interval. - // A value of zero means there will be no jitter. - // The default value is 15%. - IntervalJitter *v3.Percent `protobuf:"bytes,3,opt,name=interval_jitter,json=intervalJitter,proto3" json:"interval_jitter,omitempty"` - // If the connection has been idle for this duration, send a HTTP/2 ping ahead - // of new stream creation, to quickly detect dead connections. - // If this is zero, this type of PING will not be sent. - // If an interval ping is outstanding, a second ping will not be sent as the - // interval ping will determine if the connection is dead. - // - // The same feature for HTTP/3 is given by inheritance from QUICHE which uses :ref:`connection idle_timeout ` and the current PTO of the connection to decide whether to probe before sending a new request. - ConnectionIdleInterval *durationpb.Duration `protobuf:"bytes,4,opt,name=connection_idle_interval,json=connectionIdleInterval,proto3" json:"connection_idle_interval,omitempty"` -} - -func (x *KeepaliveSettings) Reset() { - *x = KeepaliveSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeepaliveSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeepaliveSettings) ProtoMessage() {} - -func (x *KeepaliveSettings) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KeepaliveSettings.ProtoReflect.Descriptor instead. -func (*KeepaliveSettings) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{7} -} - -func (x *KeepaliveSettings) GetInterval() *durationpb.Duration { - if x != nil { - return x.Interval - } - return nil -} - -func (x *KeepaliveSettings) GetTimeout() *durationpb.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *KeepaliveSettings) GetIntervalJitter() *v3.Percent { - if x != nil { - return x.IntervalJitter - } - return nil -} - -func (x *KeepaliveSettings) GetConnectionIdleInterval() *durationpb.Duration { - if x != nil { - return x.ConnectionIdleInterval - } - return nil -} - -// [#next-free-field: 17] -type Http2ProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // `Maximum table size `_ - // (in octets) that the encoder is permitted to use for the dynamic HPACK table. Valid values - // range from 0 to 4294967295 (2^32 - 1) and defaults to 4096. 0 effectively disables header - // compression. - HpackTableSize *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=hpack_table_size,json=hpackTableSize,proto3" json:"hpack_table_size,omitempty"` - // `Maximum concurrent streams `_ - // allowed for peer on one HTTP/2 connection. Valid values range from 1 to 2147483647 (2^31 - 1) - // and defaults to 2147483647. - // - // For upstream connections, this also limits how many streams Envoy will initiate concurrently - // on a single connection. If the limit is reached, Envoy may queue requests or establish - // additional connections (as allowed per circuit breaker limits). - // - // This acts as an upper bound: Envoy will lower the max concurrent streams allowed on a given - // connection based on upstream settings. Config dumps will reflect the configured upper bound, - // not the per-connection negotiated limits. - MaxConcurrentStreams *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"` - // `Initial stream-level flow-control window - // `_ size. Valid values range from 65535 - // (2^16 - 1, HTTP/2 default) to 2147483647 (2^31 - 1, HTTP/2 maximum) and defaults to 268435456 - // (256 * 1024 * 1024). - // - // NOTE: 65535 is the initial window size from HTTP/2 spec. We only support increasing the default - // window size now, so it's also the minimum. - // - // This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the - // HTTP/2 codec buffers. Once the buffer reaches this pointer, watermark callbacks will fire to - // stop the flow of data to the codec buffers. - InitialStreamWindowSize *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=initial_stream_window_size,json=initialStreamWindowSize,proto3" json:"initial_stream_window_size,omitempty"` - // Similar to “initial_stream_window_size“, but for connection-level flow-control - // window. Currently, this has the same minimum/maximum/default as “initial_stream_window_size“. - InitialConnectionWindowSize *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=initial_connection_window_size,json=initialConnectionWindowSize,proto3" json:"initial_connection_window_size,omitempty"` - // Allows proxying Websocket and other upgrades over H2 connect. - AllowConnect bool `protobuf:"varint,5,opt,name=allow_connect,json=allowConnect,proto3" json:"allow_connect,omitempty"` - // [#not-implemented-hide:] Hiding until envoy has full metadata support. - // Still under implementation. DO NOT USE. - // - // Allows metadata. See [metadata - // docs](https://github.com/envoyproxy/envoy/blob/main/source/docs/h2_metadata.md) for more - // information. - AllowMetadata bool `protobuf:"varint,6,opt,name=allow_metadata,json=allowMetadata,proto3" json:"allow_metadata,omitempty"` - // Limit the number of pending outbound downstream frames of all types (frames that are waiting to - // be written into the socket). Exceeding this limit triggers flood mitigation and connection is - // terminated. The “http2.outbound_flood“ stat tracks the number of terminated connections due - // to flood mitigation. The default limit is 10000. - MaxOutboundFrames *wrapperspb.UInt32Value `protobuf:"bytes,7,opt,name=max_outbound_frames,json=maxOutboundFrames,proto3" json:"max_outbound_frames,omitempty"` - // Limit the number of pending outbound downstream frames of types PING, SETTINGS and RST_STREAM, - // preventing high memory utilization when receiving continuous stream of these frames. Exceeding - // this limit triggers flood mitigation and connection is terminated. The - // “http2.outbound_control_flood“ stat tracks the number of terminated connections due to flood - // mitigation. The default limit is 1000. - MaxOutboundControlFrames *wrapperspb.UInt32Value `protobuf:"bytes,8,opt,name=max_outbound_control_frames,json=maxOutboundControlFrames,proto3" json:"max_outbound_control_frames,omitempty"` - // Limit the number of consecutive inbound frames of types HEADERS, CONTINUATION and DATA with an - // empty payload and no end stream flag. Those frames have no legitimate use and are abusive, but - // might be a result of a broken HTTP/2 implementation. The `http2.inbound_empty_frames_flood“ - // stat tracks the number of connections terminated due to flood mitigation. - // Setting this to 0 will terminate connection upon receiving first frame with an empty payload - // and no end stream flag. The default limit is 1. - MaxConsecutiveInboundFramesWithEmptyPayload *wrapperspb.UInt32Value `protobuf:"bytes,9,opt,name=max_consecutive_inbound_frames_with_empty_payload,json=maxConsecutiveInboundFramesWithEmptyPayload,proto3" json:"max_consecutive_inbound_frames_with_empty_payload,omitempty"` - // Limit the number of inbound PRIORITY frames allowed per each opened stream. If the number - // of PRIORITY frames received over the lifetime of connection exceeds the value calculated - // using this formula:: - // - // ``max_inbound_priority_frames_per_stream`` * (1 + ``opened_streams``) - // - // the connection is terminated. For downstream connections the “opened_streams“ is incremented when - // Envoy receives complete response headers from the upstream server. For upstream connection the - // “opened_streams“ is incremented when Envoy send the HEADERS frame for a new stream. The - // “http2.inbound_priority_frames_flood“ stat tracks - // the number of connections terminated due to flood mitigation. The default limit is 100. - MaxInboundPriorityFramesPerStream *wrapperspb.UInt32Value `protobuf:"bytes,10,opt,name=max_inbound_priority_frames_per_stream,json=maxInboundPriorityFramesPerStream,proto3" json:"max_inbound_priority_frames_per_stream,omitempty"` - // Limit the number of inbound WINDOW_UPDATE frames allowed per DATA frame sent. If the number - // of WINDOW_UPDATE frames received over the lifetime of connection exceeds the value calculated - // using this formula:: - // - // 5 + 2 * (``opened_streams`` + - // ``max_inbound_window_update_frames_per_data_frame_sent`` * ``outbound_data_frames``) - // - // the connection is terminated. For downstream connections the “opened_streams“ is incremented when - // Envoy receives complete response headers from the upstream server. For upstream connections the - // “opened_streams“ is incremented when Envoy sends the HEADERS frame for a new stream. The - // “http2.inbound_priority_frames_flood“ stat tracks the number of connections terminated due to - // flood mitigation. The default max_inbound_window_update_frames_per_data_frame_sent value is 10. - // Setting this to 1 should be enough to support HTTP/2 implementations with basic flow control, - // but more complex implementations that try to estimate available bandwidth require at least 2. - MaxInboundWindowUpdateFramesPerDataFrameSent *wrapperspb.UInt32Value `protobuf:"bytes,11,opt,name=max_inbound_window_update_frames_per_data_frame_sent,json=maxInboundWindowUpdateFramesPerDataFrameSent,proto3" json:"max_inbound_window_update_frames_per_data_frame_sent,omitempty"` - // Allows invalid HTTP messaging and headers. When this option is disabled (default), then - // the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, - // when this option is enabled, only the offending stream is terminated. - // - // This is overridden by HCM :ref:`stream_error_on_invalid_http_messaging - // ` - // iff present. - // - // This is deprecated in favor of :ref:`override_stream_error_on_invalid_http_message - // ` - // - // See `RFC7540, sec. 8.1 `_ for details. - // - // Deprecated: Do not use. - StreamErrorOnInvalidHttpMessaging bool `protobuf:"varint,12,opt,name=stream_error_on_invalid_http_messaging,json=streamErrorOnInvalidHttpMessaging,proto3" json:"stream_error_on_invalid_http_messaging,omitempty"` - // Allows invalid HTTP messaging and headers. When this option is disabled (default), then - // the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, - // when this option is enabled, only the offending stream is terminated. - // - // This overrides any HCM :ref:`stream_error_on_invalid_http_messaging - // ` - // - // See `RFC7540, sec. 8.1 `_ for details. - OverrideStreamErrorOnInvalidHttpMessage *wrapperspb.BoolValue `protobuf:"bytes,14,opt,name=override_stream_error_on_invalid_http_message,json=overrideStreamErrorOnInvalidHttpMessage,proto3" json:"override_stream_error_on_invalid_http_message,omitempty"` - // [#not-implemented-hide:] - // Specifies SETTINGS frame parameters to be sent to the peer, with two exceptions: - // - // 1. SETTINGS_ENABLE_PUSH (0x2) is not configurable as HTTP/2 server push is not supported by - // Envoy. - // - // 2. SETTINGS_ENABLE_CONNECT_PROTOCOL (0x8) is only configurable through the named field - // 'allow_connect'. - // - // Note that custom parameters specified through this field can not also be set in the - // corresponding named parameters: - // - // .. code-block:: text - // - // ID Field Name - // ---------------- - // 0x1 hpack_table_size - // 0x3 max_concurrent_streams - // 0x4 initial_stream_window_size - // - // Collisions will trigger config validation failure on load/update. Likewise, inconsistencies - // between custom parameters with the same identifier will trigger a failure. - // - // See `IANA HTTP/2 Settings - // `_ for - // standardized identifiers. - CustomSettingsParameters []*Http2ProtocolOptions_SettingsParameter `protobuf:"bytes,13,rep,name=custom_settings_parameters,json=customSettingsParameters,proto3" json:"custom_settings_parameters,omitempty"` - // Send HTTP/2 PING frames to verify that the connection is still healthy. If the remote peer - // does not respond within the configured timeout, the connection will be aborted. - ConnectionKeepalive *KeepaliveSettings `protobuf:"bytes,15,opt,name=connection_keepalive,json=connectionKeepalive,proto3" json:"connection_keepalive,omitempty"` - // [#not-implemented-hide:] Hiding so that the field can be removed after oghttp2 is rolled out. - // If set, force use of a particular HTTP/2 codec: oghttp2 if true, nghttp2 if false. - // If unset, HTTP/2 codec is selected based on envoy.reloadable_features.http2_use_oghttp2. - UseOghttp2Codec *wrapperspb.BoolValue `protobuf:"bytes,16,opt,name=use_oghttp2_codec,json=useOghttp2Codec,proto3" json:"use_oghttp2_codec,omitempty"` -} - -func (x *Http2ProtocolOptions) Reset() { - *x = Http2ProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http2ProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http2ProtocolOptions) ProtoMessage() {} - -func (x *Http2ProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http2ProtocolOptions.ProtoReflect.Descriptor instead. -func (*Http2ProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{8} -} - -func (x *Http2ProtocolOptions) GetHpackTableSize() *wrapperspb.UInt32Value { - if x != nil { - return x.HpackTableSize - } - return nil -} - -func (x *Http2ProtocolOptions) GetMaxConcurrentStreams() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxConcurrentStreams - } - return nil -} - -func (x *Http2ProtocolOptions) GetInitialStreamWindowSize() *wrapperspb.UInt32Value { - if x != nil { - return x.InitialStreamWindowSize - } - return nil -} - -func (x *Http2ProtocolOptions) GetInitialConnectionWindowSize() *wrapperspb.UInt32Value { - if x != nil { - return x.InitialConnectionWindowSize - } - return nil -} - -func (x *Http2ProtocolOptions) GetAllowConnect() bool { - if x != nil { - return x.AllowConnect - } - return false -} - -func (x *Http2ProtocolOptions) GetAllowMetadata() bool { - if x != nil { - return x.AllowMetadata - } - return false -} - -func (x *Http2ProtocolOptions) GetMaxOutboundFrames() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxOutboundFrames - } - return nil -} - -func (x *Http2ProtocolOptions) GetMaxOutboundControlFrames() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxOutboundControlFrames - } - return nil -} - -func (x *Http2ProtocolOptions) GetMaxConsecutiveInboundFramesWithEmptyPayload() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxConsecutiveInboundFramesWithEmptyPayload - } - return nil -} - -func (x *Http2ProtocolOptions) GetMaxInboundPriorityFramesPerStream() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxInboundPriorityFramesPerStream - } - return nil -} - -func (x *Http2ProtocolOptions) GetMaxInboundWindowUpdateFramesPerDataFrameSent() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxInboundWindowUpdateFramesPerDataFrameSent - } - return nil -} - -// Deprecated: Do not use. -func (x *Http2ProtocolOptions) GetStreamErrorOnInvalidHttpMessaging() bool { - if x != nil { - return x.StreamErrorOnInvalidHttpMessaging - } - return false -} - -func (x *Http2ProtocolOptions) GetOverrideStreamErrorOnInvalidHttpMessage() *wrapperspb.BoolValue { - if x != nil { - return x.OverrideStreamErrorOnInvalidHttpMessage - } - return nil -} - -func (x *Http2ProtocolOptions) GetCustomSettingsParameters() []*Http2ProtocolOptions_SettingsParameter { - if x != nil { - return x.CustomSettingsParameters - } - return nil -} - -func (x *Http2ProtocolOptions) GetConnectionKeepalive() *KeepaliveSettings { - if x != nil { - return x.ConnectionKeepalive - } - return nil -} - -func (x *Http2ProtocolOptions) GetUseOghttp2Codec() *wrapperspb.BoolValue { - if x != nil { - return x.UseOghttp2Codec - } - return nil -} - -// [#not-implemented-hide:] -type GrpcProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Http2ProtocolOptions *Http2ProtocolOptions `protobuf:"bytes,1,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` -} - -func (x *GrpcProtocolOptions) Reset() { - *x = GrpcProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcProtocolOptions) ProtoMessage() {} - -func (x *GrpcProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcProtocolOptions.ProtoReflect.Descriptor instead. -func (*GrpcProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{9} -} - -func (x *GrpcProtocolOptions) GetHttp2ProtocolOptions() *Http2ProtocolOptions { - if x != nil { - return x.Http2ProtocolOptions - } - return nil -} - -// A message which allows using HTTP/3. -// [#next-free-field: 6] -type Http3ProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - QuicProtocolOptions *QuicProtocolOptions `protobuf:"bytes,1,opt,name=quic_protocol_options,json=quicProtocolOptions,proto3" json:"quic_protocol_options,omitempty"` - // Allows invalid HTTP messaging and headers. When this option is disabled (default), then - // the whole HTTP/3 connection is terminated upon receiving invalid HEADERS frame. However, - // when this option is enabled, only the offending stream is terminated. - // - // If set, this overrides any HCM :ref:`stream_error_on_invalid_http_messaging - // `. - OverrideStreamErrorOnInvalidHttpMessage *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=override_stream_error_on_invalid_http_message,json=overrideStreamErrorOnInvalidHttpMessage,proto3" json:"override_stream_error_on_invalid_http_message,omitempty"` - // Allows proxying Websocket and other upgrades over HTTP/3 CONNECT using - // the header mechanisms from the `HTTP/2 extended connect RFC - // `_ - // and settings `proposed for HTTP/3 - // `_ - // Note that HTTP/3 CONNECT is not yet an RFC. - AllowExtendedConnect bool `protobuf:"varint,5,opt,name=allow_extended_connect,json=allowExtendedConnect,proto3" json:"allow_extended_connect,omitempty"` -} - -func (x *Http3ProtocolOptions) Reset() { - *x = Http3ProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http3ProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http3ProtocolOptions) ProtoMessage() {} - -func (x *Http3ProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http3ProtocolOptions.ProtoReflect.Descriptor instead. -func (*Http3ProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{10} -} - -func (x *Http3ProtocolOptions) GetQuicProtocolOptions() *QuicProtocolOptions { - if x != nil { - return x.QuicProtocolOptions - } - return nil -} - -func (x *Http3ProtocolOptions) GetOverrideStreamErrorOnInvalidHttpMessage() *wrapperspb.BoolValue { - if x != nil { - return x.OverrideStreamErrorOnInvalidHttpMessage - } - return nil -} - -func (x *Http3ProtocolOptions) GetAllowExtendedConnect() bool { - if x != nil { - return x.AllowExtendedConnect - } - return false -} - -// A message to control transformations to the :scheme header -type SchemeHeaderTransformation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Transformation: - // - // *SchemeHeaderTransformation_SchemeToOverwrite - Transformation isSchemeHeaderTransformation_Transformation `protobuf_oneof:"transformation"` -} - -func (x *SchemeHeaderTransformation) Reset() { - *x = SchemeHeaderTransformation{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SchemeHeaderTransformation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SchemeHeaderTransformation) ProtoMessage() {} - -func (x *SchemeHeaderTransformation) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SchemeHeaderTransformation.ProtoReflect.Descriptor instead. -func (*SchemeHeaderTransformation) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{11} -} - -func (m *SchemeHeaderTransformation) GetTransformation() isSchemeHeaderTransformation_Transformation { - if m != nil { - return m.Transformation - } - return nil -} - -func (x *SchemeHeaderTransformation) GetSchemeToOverwrite() string { - if x, ok := x.GetTransformation().(*SchemeHeaderTransformation_SchemeToOverwrite); ok { - return x.SchemeToOverwrite - } - return "" -} - -type isSchemeHeaderTransformation_Transformation interface { - isSchemeHeaderTransformation_Transformation() -} - -type SchemeHeaderTransformation_SchemeToOverwrite struct { - // Overwrite any Scheme header with the contents of this string. - SchemeToOverwrite string `protobuf:"bytes,1,opt,name=scheme_to_overwrite,json=schemeToOverwrite,proto3,oneof"` -} - -func (*SchemeHeaderTransformation_SchemeToOverwrite) isSchemeHeaderTransformation_Transformation() {} - -// Allows pre-populating the cache with HTTP/3 alternate protocols entries with a 7 day lifetime. -// This will cause Envoy to attempt HTTP/3 to those upstreams, even if the upstreams have not -// advertised HTTP/3 support. These entries will be overwritten by alt-svc -// response headers or cached values. -// As with regular cached entries, if the origin response would result in clearing an existing -// alternate protocol cache entry, pre-populated entries will also be cleared. -// Adding a cache entry with hostname=foo.com port=123 is the equivalent of getting -// response headers -// alt-svc: h3=:"123"; ma=86400" in a response to a request to foo.com:123 -type AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The host name for the alternate protocol entry. - Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` - // The port for the alternate protocol entry. - Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` -} - -func (x *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) Reset() { - *x = AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) ProtoMessage() {} - -func (x *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry.ProtoReflect.Descriptor instead. -func (*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) GetHostname() string { - if x != nil { - return x.Hostname - } - return "" -} - -func (x *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) GetPort() uint32 { - if x != nil { - return x.Port - } - return 0 -} - -// [#next-free-field: 9] -type Http1ProtocolOptions_HeaderKeyFormat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to HeaderFormat: - // - // *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_ - // *Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter - HeaderFormat isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat `protobuf_oneof:"header_format"` -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat) Reset() { - *x = Http1ProtocolOptions_HeaderKeyFormat{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http1ProtocolOptions_HeaderKeyFormat) ProtoMessage() {} - -func (x *Http1ProtocolOptions_HeaderKeyFormat) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http1ProtocolOptions_HeaderKeyFormat.ProtoReflect.Descriptor instead. -func (*Http1ProtocolOptions_HeaderKeyFormat) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{6, 0} -} - -func (m *Http1ProtocolOptions_HeaderKeyFormat) GetHeaderFormat() isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat { - if m != nil { - return m.HeaderFormat - } - return nil -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat) GetProperCaseWords() *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords { - if x, ok := x.GetHeaderFormat().(*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_); ok { - return x.ProperCaseWords - } - return nil -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat) GetStatefulFormatter() *TypedExtensionConfig { - if x, ok := x.GetHeaderFormat().(*Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter); ok { - return x.StatefulFormatter - } - return nil -} - -type isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat interface { - isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() -} - -type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_ struct { - // Formats the header by proper casing words: the first character and any character following - // a special character will be capitalized if it's an alpha character. For example, - // "content-type" becomes "Content-Type", and "foo$b#$are" becomes "Foo$B#$Are". - // Note that while this results in most headers following conventional casing, certain headers - // are not covered. For example, the "TE" header will be formatted as "Te". - ProperCaseWords *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords `protobuf:"bytes,1,opt,name=proper_case_words,json=properCaseWords,proto3,oneof"` -} - -type Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter struct { - // Configuration for stateful formatter extensions that allow using received headers to - // affect the output of encoding headers. E.g., preserving case during proxying. - // [#extension-category: envoy.http.stateful_header_formatters] - StatefulFormatter *TypedExtensionConfig `protobuf:"bytes,8,opt,name=stateful_formatter,json=statefulFormatter,proto3,oneof"` -} - -func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_) isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() { -} - -func (*Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter) isHttp1ProtocolOptions_HeaderKeyFormat_HeaderFormat() { -} - -type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Reset() { - *x = Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) ProtoMessage() {} - -func (x *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.ProtoReflect.Descriptor instead. -func (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{6, 0, 0} -} - -// Defines a parameter to be sent in the SETTINGS frame. -// See `RFC7540, sec. 6.5.1 `_ for details. -type Http2ProtocolOptions_SettingsParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The 16 bit parameter identifier. - Identifier *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - // The 32 bit parameter value. - Value *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Http2ProtocolOptions_SettingsParameter) Reset() { - *x = Http2ProtocolOptions_SettingsParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http2ProtocolOptions_SettingsParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http2ProtocolOptions_SettingsParameter) ProtoMessage() {} - -func (x *Http2ProtocolOptions_SettingsParameter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_protocol_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http2ProtocolOptions_SettingsParameter.ProtoReflect.Descriptor instead. -func (*Http2ProtocolOptions_SettingsParameter) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_protocol_proto_rawDescGZIP(), []int{8, 0} -} - -func (x *Http2ProtocolOptions_SettingsParameter) GetIdentifier() *wrapperspb.UInt32Value { - if x != nil { - return x.Identifier - } - return nil -} - -func (x *Http2ProtocolOptions_SettingsParameter) GetValue() *wrapperspb.UInt32Value { - if x != nil { - return x.Value - } - return nil -} - -var File_envoy_config_core_v3_protocol_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_protocol_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, - 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, - 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x41, 0x0a, 0x12, 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x54, 0x63, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x69, 0x63, 0x4b, 0x65, 0x65, 0x70, 0x41, - 0x6c, 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4a, 0x0a, 0x0c, - 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, - 0x42, 0x09, 0xaa, 0x01, 0x06, 0x22, 0x00, 0x32, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x78, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x52, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, - 0x42, 0x09, 0xaa, 0x01, 0x06, 0x22, 0x00, 0x32, 0x02, 0x08, 0x01, 0x52, 0x0f, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0xa8, 0x04, 0x0a, - 0x13, 0x51, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x14, 0x6d, 0x61, 0x78, - 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x12, 0x67, 0x0a, 0x1a, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x80, 0x08, 0x28, - 0x01, 0x52, 0x17, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x6f, 0x0a, 0x1e, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x80, 0x0c, 0x28, 0x01, 0x52, 0x1b, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x7a, 0x0a, 0x26, 0x6e, - 0x75, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x74, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, - 0x18, 0x05, 0x28, 0x00, 0x52, 0x21, 0x6e, 0x75, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x73, 0x54, 0x6f, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x69, - 0x63, 0x4b, 0x65, 0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, - 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x22, 0xe4, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x5f, - 0x73, 0x6e, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x75, 0x74, 0x6f, 0x53, - 0x6e, 0x69, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x61, 0x6e, 0x5f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x11, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x61, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x18, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x61, - 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x6e, 0x69, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xd0, 0x01, - 0x01, 0x52, 0x15, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x53, - 0x6e, 0x69, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, - 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x86, - 0x04, 0x0a, 0x1e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, - 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x45, - 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x16, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, - 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x13, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x74, 0x6f, 0x72, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x84, 0x01, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x70, - 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6c, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, - 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x6c, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x70, 0x72, 0x65, 0x70, 0x6f, - 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2d, - 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x66, 0x66, - 0x69, 0x78, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x63, 0x61, 0x6e, 0x6f, - 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x65, 0x73, 0x1a, 0x68, 0x0a, - 0x1c, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, 0x0a, - 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x68, 0x6f, - 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x10, 0xff, 0xff, 0x03, 0x20, - 0x00, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xaf, 0x05, 0x0a, 0x13, 0x48, 0x74, 0x74, 0x70, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x51, 0x0a, - 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x51, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, - 0x28, 0x01, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x78, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x8d, - 0x01, 0x0a, 0x1f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, - 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x55, - 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x1c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x55, 0x6e, 0x64, - 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, - 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, - 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4e, 0x0a, 0x1c, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x73, - 0x63, 0x6f, 0x72, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x41, - 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, - 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x52, - 0x4f, 0x50, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, - 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x93, 0x09, 0x0a, 0x14, 0x48, 0x74, - 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x62, 0x73, 0x6f, - 0x6c, 0x75, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x41, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x24, 0x0a, 0x0e, - 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x31, 0x30, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x48, 0x74, 0x74, 0x70, - 0x31, 0x30, 0x12, 0x36, 0x0a, 0x18, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x31, 0x30, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x73, - 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x31, 0x30, 0x12, 0x66, 0x0a, 0x11, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, - 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x61, - 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x7a, 0x0a, - 0x2d, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x27, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x74, - 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x73, 0x65, 0x6e, - 0x64, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x5f, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x65, 0x6e, - 0x64, 0x46, 0x75, 0x6c, 0x6c, 0x79, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x55, - 0x72, 0x6c, 0x12, 0x4e, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x73, 0x61, 0x5f, - 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, - 0x08, 0x01, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x42, 0x61, 0x6c, 0x73, 0x61, 0x50, 0x61, 0x72, 0x73, - 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x1a, 0x9f, - 0x03, 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x12, 0x78, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x73, - 0x65, 0x5f, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x43, 0x61, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x43, 0x61, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x5b, 0x0a, 0x12, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x11, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x1a, 0x60, 0x0a, 0x0f, 0x50, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x43, 0x61, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x3a, 0x4d, 0x9a, 0xc5, - 0x88, 0x1e, 0x48, 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x43, 0x61, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, - 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x14, 0x0a, 0x0d, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0xc1, 0x02, 0x0a, 0x11, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x43, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, - 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x43, 0x0a, 0x07, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0xaa, 0x01, 0x08, 0x08, 0x01, - 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, - 0x3f, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6a, 0x69, 0x74, 0x74, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, - 0x12, 0x61, 0x0a, 0x18, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, - 0x42, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x16, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x22, 0xd3, 0x0e, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x10, - 0x68, 0x70, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x68, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x12, 0x61, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x2a, 0x08, 0x18, 0xff, 0xff, 0xff, 0xff, 0x07, 0x28, - 0x01, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x6a, 0x0a, 0x1a, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x2a, 0x0a, - 0x18, 0xff, 0xff, 0xff, 0xff, 0x07, 0x28, 0xff, 0xff, 0x03, 0x52, 0x17, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x72, 0x0a, 0x1e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x2a, 0x0a, - 0x18, 0xff, 0xff, 0xff, 0xff, 0x07, 0x28, 0xff, 0xff, 0x03, 0x52, 0x1b, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x25, 0x0a, 0x0e, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x55, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x4f, 0x75, 0x74, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x1b, 0x6d, 0x61, - 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x4f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, - 0x12, 0x84, 0x01, 0x0a, 0x31, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x70, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x2b, 0x6d, 0x61, 0x78, 0x43, - 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x6f, 0x0a, 0x26, 0x6d, 0x61, 0x78, 0x5f, 0x69, - 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x21, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, - 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x91, 0x01, 0x0a, 0x34, 0x6d, 0x61, 0x78, - 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x70, 0x65, - 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x6e, - 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x2c, - 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x44, - 0x61, 0x74, 0x61, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x5e, 0x0a, 0x26, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, - 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, 0x18, 0x01, - 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x21, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, - 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x7a, 0x0a, 0x2d, - 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x27, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x74, 0x74, - 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x7a, 0x0a, 0x1a, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x18, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, - 0x69, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x13, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, - 0x12, 0x50, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x67, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, - 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, - 0x01, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x4f, 0x67, 0x68, 0x74, 0x74, 0x70, 0x32, 0x43, 0x6f, 0x64, - 0x65, 0x63, 0x1a, 0xe5, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x13, 0xfa, 0x42, 0x08, 0x2a, - 0x06, 0x18, 0xff, 0xff, 0x03, 0x28, 0x00, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, - 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, - 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x13, 0x47, 0x72, - 0x70, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x60, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, - 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0xb1, 0x02, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x33, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x15, 0x71, 0x75, - 0x69, 0x63, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x51, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x71, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7a, 0x0a, 0x2d, 0x6f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, - 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x27, 0x6f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x52, - 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x22, 0x74, 0x0a, 0x1a, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x13, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5f, 0x74, 0x6f, - 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x72, 0x0d, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x52, 0x05, 0x68, - 0x74, 0x74, 0x70, 0x73, 0x48, 0x00, 0x52, 0x11, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x54, 0x6f, - 0x4f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x81, 0x01, 0x0a, 0x22, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x42, 0x0d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, - 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_protocol_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_protocol_proto_rawDescData = file_envoy_config_core_v3_protocol_proto_rawDesc -) - -func file_envoy_config_core_v3_protocol_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_protocol_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_protocol_proto_rawDescData) - }) - return file_envoy_config_core_v3_protocol_proto_rawDescData -} - -var file_envoy_config_core_v3_protocol_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v3_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_envoy_config_core_v3_protocol_proto_goTypes = []interface{}{ - (HttpProtocolOptions_HeadersWithUnderscoresAction)(0), // 0: envoy.config.core.v3.HttpProtocolOptions.HeadersWithUnderscoresAction - (*TcpProtocolOptions)(nil), // 1: envoy.config.core.v3.TcpProtocolOptions - (*QuicKeepAliveSettings)(nil), // 2: envoy.config.core.v3.QuicKeepAliveSettings - (*QuicProtocolOptions)(nil), // 3: envoy.config.core.v3.QuicProtocolOptions - (*UpstreamHttpProtocolOptions)(nil), // 4: envoy.config.core.v3.UpstreamHttpProtocolOptions - (*AlternateProtocolsCacheOptions)(nil), // 5: envoy.config.core.v3.AlternateProtocolsCacheOptions - (*HttpProtocolOptions)(nil), // 6: envoy.config.core.v3.HttpProtocolOptions - (*Http1ProtocolOptions)(nil), // 7: envoy.config.core.v3.Http1ProtocolOptions - (*KeepaliveSettings)(nil), // 8: envoy.config.core.v3.KeepaliveSettings - (*Http2ProtocolOptions)(nil), // 9: envoy.config.core.v3.Http2ProtocolOptions - (*GrpcProtocolOptions)(nil), // 10: envoy.config.core.v3.GrpcProtocolOptions - (*Http3ProtocolOptions)(nil), // 11: envoy.config.core.v3.Http3ProtocolOptions - (*SchemeHeaderTransformation)(nil), // 12: envoy.config.core.v3.SchemeHeaderTransformation - (*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry)(nil), // 13: envoy.config.core.v3.AlternateProtocolsCacheOptions.AlternateProtocolsCacheEntry - (*Http1ProtocolOptions_HeaderKeyFormat)(nil), // 14: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat - (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords)(nil), // 15: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords - (*Http2ProtocolOptions_SettingsParameter)(nil), // 16: envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter - (*durationpb.Duration)(nil), // 17: google.protobuf.Duration - (*wrapperspb.UInt32Value)(nil), // 18: google.protobuf.UInt32Value - (*TypedExtensionConfig)(nil), // 19: envoy.config.core.v3.TypedExtensionConfig - (*wrapperspb.BoolValue)(nil), // 20: google.protobuf.BoolValue - (*v3.Percent)(nil), // 21: envoy.type.v3.Percent -} -var file_envoy_config_core_v3_protocol_proto_depIdxs = []int32{ - 17, // 0: envoy.config.core.v3.QuicKeepAliveSettings.max_interval:type_name -> google.protobuf.Duration - 17, // 1: envoy.config.core.v3.QuicKeepAliveSettings.initial_interval:type_name -> google.protobuf.Duration - 18, // 2: envoy.config.core.v3.QuicProtocolOptions.max_concurrent_streams:type_name -> google.protobuf.UInt32Value - 18, // 3: envoy.config.core.v3.QuicProtocolOptions.initial_stream_window_size:type_name -> google.protobuf.UInt32Value - 18, // 4: envoy.config.core.v3.QuicProtocolOptions.initial_connection_window_size:type_name -> google.protobuf.UInt32Value - 18, // 5: envoy.config.core.v3.QuicProtocolOptions.num_timeouts_to_trigger_port_migration:type_name -> google.protobuf.UInt32Value - 2, // 6: envoy.config.core.v3.QuicProtocolOptions.connection_keepalive:type_name -> envoy.config.core.v3.QuicKeepAliveSettings - 18, // 7: envoy.config.core.v3.AlternateProtocolsCacheOptions.max_entries:type_name -> google.protobuf.UInt32Value - 19, // 8: envoy.config.core.v3.AlternateProtocolsCacheOptions.key_value_store_config:type_name -> envoy.config.core.v3.TypedExtensionConfig - 13, // 9: envoy.config.core.v3.AlternateProtocolsCacheOptions.prepopulated_entries:type_name -> envoy.config.core.v3.AlternateProtocolsCacheOptions.AlternateProtocolsCacheEntry - 17, // 10: envoy.config.core.v3.HttpProtocolOptions.idle_timeout:type_name -> google.protobuf.Duration - 17, // 11: envoy.config.core.v3.HttpProtocolOptions.max_connection_duration:type_name -> google.protobuf.Duration - 18, // 12: envoy.config.core.v3.HttpProtocolOptions.max_headers_count:type_name -> google.protobuf.UInt32Value - 17, // 13: envoy.config.core.v3.HttpProtocolOptions.max_stream_duration:type_name -> google.protobuf.Duration - 0, // 14: envoy.config.core.v3.HttpProtocolOptions.headers_with_underscores_action:type_name -> envoy.config.core.v3.HttpProtocolOptions.HeadersWithUnderscoresAction - 18, // 15: envoy.config.core.v3.HttpProtocolOptions.max_requests_per_connection:type_name -> google.protobuf.UInt32Value - 20, // 16: envoy.config.core.v3.Http1ProtocolOptions.allow_absolute_url:type_name -> google.protobuf.BoolValue - 14, // 17: envoy.config.core.v3.Http1ProtocolOptions.header_key_format:type_name -> envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat - 20, // 18: envoy.config.core.v3.Http1ProtocolOptions.override_stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue - 20, // 19: envoy.config.core.v3.Http1ProtocolOptions.use_balsa_parser:type_name -> google.protobuf.BoolValue - 17, // 20: envoy.config.core.v3.KeepaliveSettings.interval:type_name -> google.protobuf.Duration - 17, // 21: envoy.config.core.v3.KeepaliveSettings.timeout:type_name -> google.protobuf.Duration - 21, // 22: envoy.config.core.v3.KeepaliveSettings.interval_jitter:type_name -> envoy.type.v3.Percent - 17, // 23: envoy.config.core.v3.KeepaliveSettings.connection_idle_interval:type_name -> google.protobuf.Duration - 18, // 24: envoy.config.core.v3.Http2ProtocolOptions.hpack_table_size:type_name -> google.protobuf.UInt32Value - 18, // 25: envoy.config.core.v3.Http2ProtocolOptions.max_concurrent_streams:type_name -> google.protobuf.UInt32Value - 18, // 26: envoy.config.core.v3.Http2ProtocolOptions.initial_stream_window_size:type_name -> google.protobuf.UInt32Value - 18, // 27: envoy.config.core.v3.Http2ProtocolOptions.initial_connection_window_size:type_name -> google.protobuf.UInt32Value - 18, // 28: envoy.config.core.v3.Http2ProtocolOptions.max_outbound_frames:type_name -> google.protobuf.UInt32Value - 18, // 29: envoy.config.core.v3.Http2ProtocolOptions.max_outbound_control_frames:type_name -> google.protobuf.UInt32Value - 18, // 30: envoy.config.core.v3.Http2ProtocolOptions.max_consecutive_inbound_frames_with_empty_payload:type_name -> google.protobuf.UInt32Value - 18, // 31: envoy.config.core.v3.Http2ProtocolOptions.max_inbound_priority_frames_per_stream:type_name -> google.protobuf.UInt32Value - 18, // 32: envoy.config.core.v3.Http2ProtocolOptions.max_inbound_window_update_frames_per_data_frame_sent:type_name -> google.protobuf.UInt32Value - 20, // 33: envoy.config.core.v3.Http2ProtocolOptions.override_stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue - 16, // 34: envoy.config.core.v3.Http2ProtocolOptions.custom_settings_parameters:type_name -> envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter - 8, // 35: envoy.config.core.v3.Http2ProtocolOptions.connection_keepalive:type_name -> envoy.config.core.v3.KeepaliveSettings - 20, // 36: envoy.config.core.v3.Http2ProtocolOptions.use_oghttp2_codec:type_name -> google.protobuf.BoolValue - 9, // 37: envoy.config.core.v3.GrpcProtocolOptions.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions - 3, // 38: envoy.config.core.v3.Http3ProtocolOptions.quic_protocol_options:type_name -> envoy.config.core.v3.QuicProtocolOptions - 20, // 39: envoy.config.core.v3.Http3ProtocolOptions.override_stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue - 15, // 40: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.proper_case_words:type_name -> envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords - 19, // 41: envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.stateful_formatter:type_name -> envoy.config.core.v3.TypedExtensionConfig - 18, // 42: envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter.identifier:type_name -> google.protobuf.UInt32Value - 18, // 43: envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter.value:type_name -> google.protobuf.UInt32Value - 44, // [44:44] is the sub-list for method output_type - 44, // [44:44] is the sub-list for method input_type - 44, // [44:44] is the sub-list for extension type_name - 44, // [44:44] is the sub-list for extension extendee - 0, // [0:44] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_protocol_proto_init() } -func file_envoy_config_core_v3_protocol_proto_init() { - if File_envoy_config_core_v3_protocol_proto != nil { - return - } - file_envoy_config_core_v3_extension_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TcpProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuicKeepAliveSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuicProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamHttpProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AlternateProtocolsCacheOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http1ProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeepaliveSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http2ProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http3ProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SchemeHeaderTransformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http1ProtocolOptions_HeaderKeyFormat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http2ProtocolOptions_SettingsParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v3_protocol_proto_msgTypes[11].OneofWrappers = []interface{}{ - (*SchemeHeaderTransformation_SchemeToOverwrite)(nil), - } - file_envoy_config_core_v3_protocol_proto_msgTypes[13].OneofWrappers = []interface{}{ - (*Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_)(nil), - (*Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_protocol_proto_rawDesc, - NumEnums: 1, - NumMessages: 16, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_protocol_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_protocol_proto_depIdxs, - EnumInfos: file_envoy_config_core_v3_protocol_proto_enumTypes, - MessageInfos: file_envoy_config_core_v3_protocol_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_protocol_proto = out.File - file_envoy_config_core_v3_protocol_proto_rawDesc = nil - file_envoy_config_core_v3_protocol_proto_goTypes = nil - file_envoy_config_core_v3_protocol_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/protocol.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/protocol.pb.validate.go deleted file mode 100644 index 9e9a9155e98..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/protocol.pb.validate.go +++ /dev/null @@ -1,2975 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/protocol.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on TcpProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *TcpProtocolOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TcpProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// TcpProtocolOptionsMultiError, or nil if none found. -func (m *TcpProtocolOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *TcpProtocolOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return TcpProtocolOptionsMultiError(errors) - } - - return nil -} - -// TcpProtocolOptionsMultiError is an error wrapping multiple validation errors -// returned by TcpProtocolOptions.ValidateAll() if the designated constraints -// aren't met. -type TcpProtocolOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TcpProtocolOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TcpProtocolOptionsMultiError) AllErrors() []error { return m } - -// TcpProtocolOptionsValidationError is the validation error returned by -// TcpProtocolOptions.Validate if the designated constraints aren't met. -type TcpProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TcpProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TcpProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TcpProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TcpProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TcpProtocolOptionsValidationError) ErrorName() string { - return "TcpProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e TcpProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTcpProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TcpProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TcpProtocolOptionsValidationError{} - -// Validate checks the field values on QuicKeepAliveSettings with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *QuicKeepAliveSettings) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on QuicKeepAliveSettings with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// QuicKeepAliveSettingsMultiError, or nil if none found. -func (m *QuicKeepAliveSettings) ValidateAll() error { - return m.validate(true) -} - -func (m *QuicKeepAliveSettings) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if d := m.GetMaxInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = QuicKeepAliveSettingsValidationError{ - field: "MaxInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - lte := time.Duration(0*time.Second + 0*time.Nanosecond) - gte := time.Duration(1*time.Second + 0*time.Nanosecond) - - if dur > lte && dur < gte { - err := QuicKeepAliveSettingsValidationError{ - field: "MaxInterval", - reason: "value must be outside range (0s, 1s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if d := m.GetInitialInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = QuicKeepAliveSettingsValidationError{ - field: "InitialInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - lte := time.Duration(0*time.Second + 0*time.Nanosecond) - gte := time.Duration(1*time.Second + 0*time.Nanosecond) - - if dur > lte && dur < gte { - err := QuicKeepAliveSettingsValidationError{ - field: "InitialInterval", - reason: "value must be outside range (0s, 1s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if len(errors) > 0 { - return QuicKeepAliveSettingsMultiError(errors) - } - - return nil -} - -// QuicKeepAliveSettingsMultiError is an error wrapping multiple validation -// errors returned by QuicKeepAliveSettings.ValidateAll() if the designated -// constraints aren't met. -type QuicKeepAliveSettingsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m QuicKeepAliveSettingsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m QuicKeepAliveSettingsMultiError) AllErrors() []error { return m } - -// QuicKeepAliveSettingsValidationError is the validation error returned by -// QuicKeepAliveSettings.Validate if the designated constraints aren't met. -type QuicKeepAliveSettingsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e QuicKeepAliveSettingsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e QuicKeepAliveSettingsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e QuicKeepAliveSettingsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e QuicKeepAliveSettingsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e QuicKeepAliveSettingsValidationError) ErrorName() string { - return "QuicKeepAliveSettingsValidationError" -} - -// Error satisfies the builtin error interface -func (e QuicKeepAliveSettingsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sQuicKeepAliveSettings.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = QuicKeepAliveSettingsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = QuicKeepAliveSettingsValidationError{} - -// Validate checks the field values on QuicProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *QuicProtocolOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on QuicProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// QuicProtocolOptionsMultiError, or nil if none found. -func (m *QuicProtocolOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *QuicProtocolOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if wrapper := m.GetMaxConcurrentStreams(); wrapper != nil { - - if wrapper.GetValue() < 1 { - err := QuicProtocolOptionsValidationError{ - field: "MaxConcurrentStreams", - reason: "value must be greater than or equal to 1", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetInitialStreamWindowSize(); wrapper != nil { - - if val := wrapper.GetValue(); val < 1 || val > 16777216 { - err := QuicProtocolOptionsValidationError{ - field: "InitialStreamWindowSize", - reason: "value must be inside range [1, 16777216]", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetInitialConnectionWindowSize(); wrapper != nil { - - if val := wrapper.GetValue(); val < 1 || val > 25165824 { - err := QuicProtocolOptionsValidationError{ - field: "InitialConnectionWindowSize", - reason: "value must be inside range [1, 25165824]", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetNumTimeoutsToTriggerPortMigration(); wrapper != nil { - - if val := wrapper.GetValue(); val < 0 || val > 5 { - err := QuicProtocolOptionsValidationError{ - field: "NumTimeoutsToTriggerPortMigration", - reason: "value must be inside range [0, 5]", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if all { - switch v := interface{}(m.GetConnectionKeepalive()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, QuicProtocolOptionsValidationError{ - field: "ConnectionKeepalive", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, QuicProtocolOptionsValidationError{ - field: "ConnectionKeepalive", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConnectionKeepalive()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return QuicProtocolOptionsValidationError{ - field: "ConnectionKeepalive", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return QuicProtocolOptionsMultiError(errors) - } - - return nil -} - -// QuicProtocolOptionsMultiError is an error wrapping multiple validation -// errors returned by QuicProtocolOptions.ValidateAll() if the designated -// constraints aren't met. -type QuicProtocolOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m QuicProtocolOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m QuicProtocolOptionsMultiError) AllErrors() []error { return m } - -// QuicProtocolOptionsValidationError is the validation error returned by -// QuicProtocolOptions.Validate if the designated constraints aren't met. -type QuicProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e QuicProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e QuicProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e QuicProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e QuicProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e QuicProtocolOptionsValidationError) ErrorName() string { - return "QuicProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e QuicProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sQuicProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = QuicProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = QuicProtocolOptionsValidationError{} - -// Validate checks the field values on UpstreamHttpProtocolOptions with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpstreamHttpProtocolOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpstreamHttpProtocolOptions with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpstreamHttpProtocolOptionsMultiError, or nil if none found. -func (m *UpstreamHttpProtocolOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *UpstreamHttpProtocolOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for AutoSni - - // no validation rules for AutoSanValidation - - if m.GetOverrideAutoSniHeader() != "" { - - if !_UpstreamHttpProtocolOptions_OverrideAutoSniHeader_Pattern.MatchString(m.GetOverrideAutoSniHeader()) { - err := UpstreamHttpProtocolOptionsValidationError{ - field: "OverrideAutoSniHeader", - reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(errors) > 0 { - return UpstreamHttpProtocolOptionsMultiError(errors) - } - - return nil -} - -// UpstreamHttpProtocolOptionsMultiError is an error wrapping multiple -// validation errors returned by UpstreamHttpProtocolOptions.ValidateAll() if -// the designated constraints aren't met. -type UpstreamHttpProtocolOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpstreamHttpProtocolOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpstreamHttpProtocolOptionsMultiError) AllErrors() []error { return m } - -// UpstreamHttpProtocolOptionsValidationError is the validation error returned -// by UpstreamHttpProtocolOptions.Validate if the designated constraints -// aren't met. -type UpstreamHttpProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpstreamHttpProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpstreamHttpProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpstreamHttpProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpstreamHttpProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpstreamHttpProtocolOptionsValidationError) ErrorName() string { - return "UpstreamHttpProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e UpstreamHttpProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpstreamHttpProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpstreamHttpProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpstreamHttpProtocolOptionsValidationError{} - -var _UpstreamHttpProtocolOptions_OverrideAutoSniHeader_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") - -// Validate checks the field values on AlternateProtocolsCacheOptions with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *AlternateProtocolsCacheOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AlternateProtocolsCacheOptions with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// AlternateProtocolsCacheOptionsMultiError, or nil if none found. -func (m *AlternateProtocolsCacheOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *AlternateProtocolsCacheOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := AlternateProtocolsCacheOptionsValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if wrapper := m.GetMaxEntries(); wrapper != nil { - - if wrapper.GetValue() <= 0 { - err := AlternateProtocolsCacheOptionsValidationError{ - field: "MaxEntries", - reason: "value must be greater than 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if all { - switch v := interface{}(m.GetKeyValueStoreConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AlternateProtocolsCacheOptionsValidationError{ - field: "KeyValueStoreConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AlternateProtocolsCacheOptionsValidationError{ - field: "KeyValueStoreConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKeyValueStoreConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AlternateProtocolsCacheOptionsValidationError{ - field: "KeyValueStoreConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetPrepopulatedEntries() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AlternateProtocolsCacheOptionsValidationError{ - field: fmt.Sprintf("PrepopulatedEntries[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AlternateProtocolsCacheOptionsValidationError{ - field: fmt.Sprintf("PrepopulatedEntries[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AlternateProtocolsCacheOptionsValidationError{ - field: fmt.Sprintf("PrepopulatedEntries[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return AlternateProtocolsCacheOptionsMultiError(errors) - } - - return nil -} - -// AlternateProtocolsCacheOptionsMultiError is an error wrapping multiple -// validation errors returned by AlternateProtocolsCacheOptions.ValidateAll() -// if the designated constraints aren't met. -type AlternateProtocolsCacheOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AlternateProtocolsCacheOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AlternateProtocolsCacheOptionsMultiError) AllErrors() []error { return m } - -// AlternateProtocolsCacheOptionsValidationError is the validation error -// returned by AlternateProtocolsCacheOptions.Validate if the designated -// constraints aren't met. -type AlternateProtocolsCacheOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AlternateProtocolsCacheOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AlternateProtocolsCacheOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AlternateProtocolsCacheOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AlternateProtocolsCacheOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AlternateProtocolsCacheOptionsValidationError) ErrorName() string { - return "AlternateProtocolsCacheOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e AlternateProtocolsCacheOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAlternateProtocolsCacheOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AlternateProtocolsCacheOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AlternateProtocolsCacheOptionsValidationError{} - -// Validate checks the field values on HttpProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HttpProtocolOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HttpProtocolOptionsMultiError, or nil if none found. -func (m *HttpProtocolOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpProtocolOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetIdleTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpProtocolOptionsValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpProtocolOptionsValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMaxConnectionDuration()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpProtocolOptionsValidationError{ - field: "MaxConnectionDuration", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpProtocolOptionsValidationError{ - field: "MaxConnectionDuration", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxConnectionDuration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "MaxConnectionDuration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetMaxHeadersCount(); wrapper != nil { - - if wrapper.GetValue() < 1 { - err := HttpProtocolOptionsValidationError{ - field: "MaxHeadersCount", - reason: "value must be greater than or equal to 1", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if all { - switch v := interface{}(m.GetMaxStreamDuration()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpProtocolOptionsValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpProtocolOptionsValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for HeadersWithUnderscoresAction - - if all { - switch v := interface{}(m.GetMaxRequestsPerConnection()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpProtocolOptionsValidationError{ - field: "MaxRequestsPerConnection", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpProtocolOptionsValidationError{ - field: "MaxRequestsPerConnection", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxRequestsPerConnection()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpProtocolOptionsValidationError{ - field: "MaxRequestsPerConnection", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return HttpProtocolOptionsMultiError(errors) - } - - return nil -} - -// HttpProtocolOptionsMultiError is an error wrapping multiple validation -// errors returned by HttpProtocolOptions.ValidateAll() if the designated -// constraints aren't met. -type HttpProtocolOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpProtocolOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpProtocolOptionsMultiError) AllErrors() []error { return m } - -// HttpProtocolOptionsValidationError is the validation error returned by -// HttpProtocolOptions.Validate if the designated constraints aren't met. -type HttpProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpProtocolOptionsValidationError) ErrorName() string { - return "HttpProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpProtocolOptionsValidationError{} - -// Validate checks the field values on Http1ProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Http1ProtocolOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Http1ProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Http1ProtocolOptionsMultiError, or nil if none found. -func (m *Http1ProtocolOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *Http1ProtocolOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetAllowAbsoluteUrl()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http1ProtocolOptionsValidationError{ - field: "AllowAbsoluteUrl", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http1ProtocolOptionsValidationError{ - field: "AllowAbsoluteUrl", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAllowAbsoluteUrl()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http1ProtocolOptionsValidationError{ - field: "AllowAbsoluteUrl", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AcceptHttp_10 - - // no validation rules for DefaultHostForHttp_10 - - if all { - switch v := interface{}(m.GetHeaderKeyFormat()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http1ProtocolOptionsValidationError{ - field: "HeaderKeyFormat", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http1ProtocolOptionsValidationError{ - field: "HeaderKeyFormat", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHeaderKeyFormat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http1ProtocolOptionsValidationError{ - field: "HeaderKeyFormat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for EnableTrailers - - // no validation rules for AllowChunkedLength - - if all { - switch v := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http1ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http1ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http1ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for SendFullyQualifiedUrl - - if all { - switch v := interface{}(m.GetUseBalsaParser()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http1ProtocolOptionsValidationError{ - field: "UseBalsaParser", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http1ProtocolOptionsValidationError{ - field: "UseBalsaParser", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUseBalsaParser()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http1ProtocolOptionsValidationError{ - field: "UseBalsaParser", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AllowCustomMethods - - if len(errors) > 0 { - return Http1ProtocolOptionsMultiError(errors) - } - - return nil -} - -// Http1ProtocolOptionsMultiError is an error wrapping multiple validation -// errors returned by Http1ProtocolOptions.ValidateAll() if the designated -// constraints aren't met. -type Http1ProtocolOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Http1ProtocolOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Http1ProtocolOptionsMultiError) AllErrors() []error { return m } - -// Http1ProtocolOptionsValidationError is the validation error returned by -// Http1ProtocolOptions.Validate if the designated constraints aren't met. -type Http1ProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Http1ProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Http1ProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Http1ProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Http1ProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Http1ProtocolOptionsValidationError) ErrorName() string { - return "Http1ProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e Http1ProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttp1ProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Http1ProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Http1ProtocolOptionsValidationError{} - -// Validate checks the field values on KeepaliveSettings with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *KeepaliveSettings) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on KeepaliveSettings with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// KeepaliveSettingsMultiError, or nil if none found. -func (m *KeepaliveSettings) ValidateAll() error { - return m.validate(true) -} - -func (m *KeepaliveSettings) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if d := m.GetInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = KeepaliveSettingsValidationError{ - field: "Interval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur < gte { - err := KeepaliveSettingsValidationError{ - field: "Interval", - reason: "value must be greater than or equal to 1ms", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if m.GetTimeout() == nil { - err := KeepaliveSettingsValidationError{ - field: "Timeout", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if d := m.GetTimeout(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = KeepaliveSettingsValidationError{ - field: "Timeout", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur < gte { - err := KeepaliveSettingsValidationError{ - field: "Timeout", - reason: "value must be greater than or equal to 1ms", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if all { - switch v := interface{}(m.GetIntervalJitter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, KeepaliveSettingsValidationError{ - field: "IntervalJitter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, KeepaliveSettingsValidationError{ - field: "IntervalJitter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetIntervalJitter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return KeepaliveSettingsValidationError{ - field: "IntervalJitter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if d := m.GetConnectionIdleInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = KeepaliveSettingsValidationError{ - field: "ConnectionIdleInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur < gte { - err := KeepaliveSettingsValidationError{ - field: "ConnectionIdleInterval", - reason: "value must be greater than or equal to 1ms", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if len(errors) > 0 { - return KeepaliveSettingsMultiError(errors) - } - - return nil -} - -// KeepaliveSettingsMultiError is an error wrapping multiple validation errors -// returned by KeepaliveSettings.ValidateAll() if the designated constraints -// aren't met. -type KeepaliveSettingsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m KeepaliveSettingsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m KeepaliveSettingsMultiError) AllErrors() []error { return m } - -// KeepaliveSettingsValidationError is the validation error returned by -// KeepaliveSettings.Validate if the designated constraints aren't met. -type KeepaliveSettingsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e KeepaliveSettingsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e KeepaliveSettingsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e KeepaliveSettingsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e KeepaliveSettingsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e KeepaliveSettingsValidationError) ErrorName() string { - return "KeepaliveSettingsValidationError" -} - -// Error satisfies the builtin error interface -func (e KeepaliveSettingsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sKeepaliveSettings.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = KeepaliveSettingsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = KeepaliveSettingsValidationError{} - -// Validate checks the field values on Http2ProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Http2ProtocolOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Http2ProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Http2ProtocolOptionsMultiError, or nil if none found. -func (m *Http2ProtocolOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *Http2ProtocolOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetHpackTableSize()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "HpackTableSize", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "HpackTableSize", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHpackTableSize()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "HpackTableSize", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetMaxConcurrentStreams(); wrapper != nil { - - if val := wrapper.GetValue(); val < 1 || val > 2147483647 { - err := Http2ProtocolOptionsValidationError{ - field: "MaxConcurrentStreams", - reason: "value must be inside range [1, 2147483647]", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetInitialStreamWindowSize(); wrapper != nil { - - if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { - err := Http2ProtocolOptionsValidationError{ - field: "InitialStreamWindowSize", - reason: "value must be inside range [65535, 2147483647]", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetInitialConnectionWindowSize(); wrapper != nil { - - if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { - err := Http2ProtocolOptionsValidationError{ - field: "InitialConnectionWindowSize", - reason: "value must be inside range [65535, 2147483647]", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - // no validation rules for AllowConnect - - // no validation rules for AllowMetadata - - if wrapper := m.GetMaxOutboundFrames(); wrapper != nil { - - if wrapper.GetValue() < 1 { - err := Http2ProtocolOptionsValidationError{ - field: "MaxOutboundFrames", - reason: "value must be greater than or equal to 1", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetMaxOutboundControlFrames(); wrapper != nil { - - if wrapper.GetValue() < 1 { - err := Http2ProtocolOptionsValidationError{ - field: "MaxOutboundControlFrames", - reason: "value must be greater than or equal to 1", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if all { - switch v := interface{}(m.GetMaxConsecutiveInboundFramesWithEmptyPayload()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "MaxConsecutiveInboundFramesWithEmptyPayload", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "MaxConsecutiveInboundFramesWithEmptyPayload", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxConsecutiveInboundFramesWithEmptyPayload()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "MaxConsecutiveInboundFramesWithEmptyPayload", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMaxInboundPriorityFramesPerStream()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "MaxInboundPriorityFramesPerStream", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "MaxInboundPriorityFramesPerStream", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxInboundPriorityFramesPerStream()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "MaxInboundPriorityFramesPerStream", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetMaxInboundWindowUpdateFramesPerDataFrameSent(); wrapper != nil { - - if wrapper.GetValue() < 1 { - err := Http2ProtocolOptionsValidationError{ - field: "MaxInboundWindowUpdateFramesPerDataFrameSent", - reason: "value must be greater than or equal to 1", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - // no validation rules for StreamErrorOnInvalidHttpMessaging - - if all { - switch v := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetCustomSettingsParameters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: fmt.Sprintf("CustomSettingsParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: fmt.Sprintf("CustomSettingsParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: fmt.Sprintf("CustomSettingsParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetConnectionKeepalive()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "ConnectionKeepalive", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "ConnectionKeepalive", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConnectionKeepalive()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "ConnectionKeepalive", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetUseOghttp2Codec()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "UseOghttp2Codec", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http2ProtocolOptionsValidationError{ - field: "UseOghttp2Codec", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUseOghttp2Codec()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptionsValidationError{ - field: "UseOghttp2Codec", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return Http2ProtocolOptionsMultiError(errors) - } - - return nil -} - -// Http2ProtocolOptionsMultiError is an error wrapping multiple validation -// errors returned by Http2ProtocolOptions.ValidateAll() if the designated -// constraints aren't met. -type Http2ProtocolOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Http2ProtocolOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Http2ProtocolOptionsMultiError) AllErrors() []error { return m } - -// Http2ProtocolOptionsValidationError is the validation error returned by -// Http2ProtocolOptions.Validate if the designated constraints aren't met. -type Http2ProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Http2ProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Http2ProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Http2ProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Http2ProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Http2ProtocolOptionsValidationError) ErrorName() string { - return "Http2ProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e Http2ProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttp2ProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Http2ProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Http2ProtocolOptionsValidationError{} - -// Validate checks the field values on GrpcProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GrpcProtocolOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GrpcProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GrpcProtocolOptionsMultiError, or nil if none found. -func (m *GrpcProtocolOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcProtocolOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GrpcProtocolOptionsValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GrpcProtocolOptionsValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GrpcProtocolOptionsValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GrpcProtocolOptionsMultiError(errors) - } - - return nil -} - -// GrpcProtocolOptionsMultiError is an error wrapping multiple validation -// errors returned by GrpcProtocolOptions.ValidateAll() if the designated -// constraints aren't met. -type GrpcProtocolOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcProtocolOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcProtocolOptionsMultiError) AllErrors() []error { return m } - -// GrpcProtocolOptionsValidationError is the validation error returned by -// GrpcProtocolOptions.Validate if the designated constraints aren't met. -type GrpcProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcProtocolOptionsValidationError) ErrorName() string { - return "GrpcProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e GrpcProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcProtocolOptionsValidationError{} - -// Validate checks the field values on Http3ProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Http3ProtocolOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Http3ProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Http3ProtocolOptionsMultiError, or nil if none found. -func (m *Http3ProtocolOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *Http3ProtocolOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetQuicProtocolOptions()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http3ProtocolOptionsValidationError{ - field: "QuicProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http3ProtocolOptionsValidationError{ - field: "QuicProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetQuicProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http3ProtocolOptionsValidationError{ - field: "QuicProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http3ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http3ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOverrideStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http3ProtocolOptionsValidationError{ - field: "OverrideStreamErrorOnInvalidHttpMessage", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AllowExtendedConnect - - if len(errors) > 0 { - return Http3ProtocolOptionsMultiError(errors) - } - - return nil -} - -// Http3ProtocolOptionsMultiError is an error wrapping multiple validation -// errors returned by Http3ProtocolOptions.ValidateAll() if the designated -// constraints aren't met. -type Http3ProtocolOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Http3ProtocolOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Http3ProtocolOptionsMultiError) AllErrors() []error { return m } - -// Http3ProtocolOptionsValidationError is the validation error returned by -// Http3ProtocolOptions.Validate if the designated constraints aren't met. -type Http3ProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Http3ProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Http3ProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Http3ProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Http3ProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Http3ProtocolOptionsValidationError) ErrorName() string { - return "Http3ProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e Http3ProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttp3ProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Http3ProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Http3ProtocolOptionsValidationError{} - -// Validate checks the field values on SchemeHeaderTransformation with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *SchemeHeaderTransformation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SchemeHeaderTransformation with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SchemeHeaderTransformationMultiError, or nil if none found. -func (m *SchemeHeaderTransformation) ValidateAll() error { - return m.validate(true) -} - -func (m *SchemeHeaderTransformation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - switch v := m.Transformation.(type) { - case *SchemeHeaderTransformation_SchemeToOverwrite: - if v == nil { - err := SchemeHeaderTransformationValidationError{ - field: "Transformation", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if _, ok := _SchemeHeaderTransformation_SchemeToOverwrite_InLookup[m.GetSchemeToOverwrite()]; !ok { - err := SchemeHeaderTransformationValidationError{ - field: "SchemeToOverwrite", - reason: "value must be in list [http https]", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return SchemeHeaderTransformationMultiError(errors) - } - - return nil -} - -// SchemeHeaderTransformationMultiError is an error wrapping multiple -// validation errors returned by SchemeHeaderTransformation.ValidateAll() if -// the designated constraints aren't met. -type SchemeHeaderTransformationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SchemeHeaderTransformationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SchemeHeaderTransformationMultiError) AllErrors() []error { return m } - -// SchemeHeaderTransformationValidationError is the validation error returned -// by SchemeHeaderTransformation.Validate if the designated constraints aren't met. -type SchemeHeaderTransformationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SchemeHeaderTransformationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SchemeHeaderTransformationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SchemeHeaderTransformationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SchemeHeaderTransformationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SchemeHeaderTransformationValidationError) ErrorName() string { - return "SchemeHeaderTransformationValidationError" -} - -// Error satisfies the builtin error interface -func (e SchemeHeaderTransformationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSchemeHeaderTransformation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SchemeHeaderTransformationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SchemeHeaderTransformationValidationError{} - -var _SchemeHeaderTransformation_SchemeToOverwrite_InLookup = map[string]struct{}{ - "http": {}, - "https": {}, -} - -// Validate checks the field values on -// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError, or -// nil if none found. -func (m *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) ValidateAll() error { - return m.validate(true) -} - -func (m *AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetHostname() != "" { - - if !_AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry_Hostname_Pattern.MatchString(m.GetHostname()) { - err := AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError{ - field: "Hostname", - reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if val := m.GetPort(); val <= 0 || val >= 65535 { - err := AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError{ - field: "Port", - reason: "value must be inside range (0, 65535)", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError(errors) - } - - return nil -} - -// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError is an -// error wrapping multiple validation errors returned by -// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry.ValidateAll() -// if the designated constraints aren't met. -type AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryMultiError) AllErrors() []error { - return m -} - -// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError -// is the validation error returned by -// AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry.Validate if the -// designated constraints aren't met. -type AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) ErrorName() string { - return "AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError" -} - -// Error satisfies the builtin error interface -func (e AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntryValidationError{} - -var _AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry_Hostname_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") - -// Validate checks the field values on Http1ProtocolOptions_HeaderKeyFormat -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *Http1ProtocolOptions_HeaderKeyFormat) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Http1ProtocolOptions_HeaderKeyFormat -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// Http1ProtocolOptions_HeaderKeyFormatMultiError, or nil if none found. -func (m *Http1ProtocolOptions_HeaderKeyFormat) ValidateAll() error { - return m.validate(true) -} - -func (m *Http1ProtocolOptions_HeaderKeyFormat) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofHeaderFormatPresent := false - switch v := m.HeaderFormat.(type) { - case *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_: - if v == nil { - err := Http1ProtocolOptions_HeaderKeyFormatValidationError{ - field: "HeaderFormat", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofHeaderFormatPresent = true - - if all { - switch v := interface{}(m.GetProperCaseWords()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ - field: "ProperCaseWords", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ - field: "ProperCaseWords", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetProperCaseWords()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http1ProtocolOptions_HeaderKeyFormatValidationError{ - field: "ProperCaseWords", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Http1ProtocolOptions_HeaderKeyFormat_StatefulFormatter: - if v == nil { - err := Http1ProtocolOptions_HeaderKeyFormatValidationError{ - field: "HeaderFormat", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofHeaderFormatPresent = true - - if all { - switch v := interface{}(m.GetStatefulFormatter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ - field: "StatefulFormatter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http1ProtocolOptions_HeaderKeyFormatValidationError{ - field: "StatefulFormatter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetStatefulFormatter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http1ProtocolOptions_HeaderKeyFormatValidationError{ - field: "StatefulFormatter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofHeaderFormatPresent { - err := Http1ProtocolOptions_HeaderKeyFormatValidationError{ - field: "HeaderFormat", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return Http1ProtocolOptions_HeaderKeyFormatMultiError(errors) - } - - return nil -} - -// Http1ProtocolOptions_HeaderKeyFormatMultiError is an error wrapping multiple -// validation errors returned by -// Http1ProtocolOptions_HeaderKeyFormat.ValidateAll() if the designated -// constraints aren't met. -type Http1ProtocolOptions_HeaderKeyFormatMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Http1ProtocolOptions_HeaderKeyFormatMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Http1ProtocolOptions_HeaderKeyFormatMultiError) AllErrors() []error { return m } - -// Http1ProtocolOptions_HeaderKeyFormatValidationError is the validation error -// returned by Http1ProtocolOptions_HeaderKeyFormat.Validate if the designated -// constraints aren't met. -type Http1ProtocolOptions_HeaderKeyFormatValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Http1ProtocolOptions_HeaderKeyFormatValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Http1ProtocolOptions_HeaderKeyFormatValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Http1ProtocolOptions_HeaderKeyFormatValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Http1ProtocolOptions_HeaderKeyFormatValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Http1ProtocolOptions_HeaderKeyFormatValidationError) ErrorName() string { - return "Http1ProtocolOptions_HeaderKeyFormatValidationError" -} - -// Error satisfies the builtin error interface -func (e Http1ProtocolOptions_HeaderKeyFormatValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttp1ProtocolOptions_HeaderKeyFormat.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Http1ProtocolOptions_HeaderKeyFormatValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Http1ProtocolOptions_HeaderKeyFormatValidationError{} - -// Validate checks the field values on -// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in -// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError, or nil if -// none found. -func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) ValidateAll() error { - return m.validate(true) -} - -func (m *Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError(errors) - } - - return nil -} - -// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError is an error -// wrapping multiple validation errors returned by -// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.ValidateAll() if the -// designated constraints aren't met. -type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsMultiError) AllErrors() []error { return m } - -// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError is the -// validation error returned by -// Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.Validate if the -// designated constraints aren't met. -type Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError) ErrorName() string { - return "Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError" -} - -// Error satisfies the builtin error interface -func (e Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttp1ProtocolOptions_HeaderKeyFormat_ProperCaseWords.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWordsValidationError{} - -// Validate checks the field values on Http2ProtocolOptions_SettingsParameter -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *Http2ProtocolOptions_SettingsParameter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// Http2ProtocolOptions_SettingsParameter with the rules defined in the proto -// definition for this message. If any rules are violated, the result is a -// list of violation errors wrapped in -// Http2ProtocolOptions_SettingsParameterMultiError, or nil if none found. -func (m *Http2ProtocolOptions_SettingsParameter) ValidateAll() error { - return m.validate(true) -} - -func (m *Http2ProtocolOptions_SettingsParameter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if wrapper := m.GetIdentifier(); wrapper != nil { - - if val := wrapper.GetValue(); val < 0 || val > 65535 { - err := Http2ProtocolOptions_SettingsParameterValidationError{ - field: "Identifier", - reason: "value must be inside range [0, 65535]", - } - if !all { - return err - } - errors = append(errors, err) - } - - } else { - err := Http2ProtocolOptions_SettingsParameterValidationError{ - field: "Identifier", - reason: "value is required and must not be nil.", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetValue() == nil { - err := Http2ProtocolOptions_SettingsParameterValidationError{ - field: "Value", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetValue()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Http2ProtocolOptions_SettingsParameterValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Http2ProtocolOptions_SettingsParameterValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Http2ProtocolOptions_SettingsParameterValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return Http2ProtocolOptions_SettingsParameterMultiError(errors) - } - - return nil -} - -// Http2ProtocolOptions_SettingsParameterMultiError is an error wrapping -// multiple validation errors returned by -// Http2ProtocolOptions_SettingsParameter.ValidateAll() if the designated -// constraints aren't met. -type Http2ProtocolOptions_SettingsParameterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Http2ProtocolOptions_SettingsParameterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Http2ProtocolOptions_SettingsParameterMultiError) AllErrors() []error { return m } - -// Http2ProtocolOptions_SettingsParameterValidationError is the validation -// error returned by Http2ProtocolOptions_SettingsParameter.Validate if the -// designated constraints aren't met. -type Http2ProtocolOptions_SettingsParameterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Http2ProtocolOptions_SettingsParameterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Http2ProtocolOptions_SettingsParameterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Http2ProtocolOptions_SettingsParameterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Http2ProtocolOptions_SettingsParameterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Http2ProtocolOptions_SettingsParameterValidationError) ErrorName() string { - return "Http2ProtocolOptions_SettingsParameterValidationError" -} - -// Error satisfies the builtin error interface -func (e Http2ProtocolOptions_SettingsParameterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttp2ProtocolOptions_SettingsParameter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Http2ProtocolOptions_SettingsParameterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Http2ProtocolOptions_SettingsParameterValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/proxy_protocol.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/proxy_protocol.pb.go deleted file mode 100644 index ba77ffc6d51..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/proxy_protocol.pb.go +++ /dev/null @@ -1,375 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/proxy_protocol.proto - -package corev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type ProxyProtocolPassThroughTLVs_PassTLVsMatchType int32 - -const ( - // Pass all TLVs. - ProxyProtocolPassThroughTLVs_INCLUDE_ALL ProxyProtocolPassThroughTLVs_PassTLVsMatchType = 0 - // Pass specific TLVs defined in tlv_type. - ProxyProtocolPassThroughTLVs_INCLUDE ProxyProtocolPassThroughTLVs_PassTLVsMatchType = 1 -) - -// Enum value maps for ProxyProtocolPassThroughTLVs_PassTLVsMatchType. -var ( - ProxyProtocolPassThroughTLVs_PassTLVsMatchType_name = map[int32]string{ - 0: "INCLUDE_ALL", - 1: "INCLUDE", - } - ProxyProtocolPassThroughTLVs_PassTLVsMatchType_value = map[string]int32{ - "INCLUDE_ALL": 0, - "INCLUDE": 1, - } -) - -func (x ProxyProtocolPassThroughTLVs_PassTLVsMatchType) Enum() *ProxyProtocolPassThroughTLVs_PassTLVsMatchType { - p := new(ProxyProtocolPassThroughTLVs_PassTLVsMatchType) - *p = x - return p -} - -func (x ProxyProtocolPassThroughTLVs_PassTLVsMatchType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProxyProtocolPassThroughTLVs_PassTLVsMatchType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_proxy_protocol_proto_enumTypes[0].Descriptor() -} - -func (ProxyProtocolPassThroughTLVs_PassTLVsMatchType) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_proxy_protocol_proto_enumTypes[0] -} - -func (x ProxyProtocolPassThroughTLVs_PassTLVsMatchType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProxyProtocolPassThroughTLVs_PassTLVsMatchType.Descriptor instead. -func (ProxyProtocolPassThroughTLVs_PassTLVsMatchType) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_proxy_protocol_proto_rawDescGZIP(), []int{0, 0} -} - -type ProxyProtocolConfig_Version int32 - -const ( - // PROXY protocol version 1. Human readable format. - ProxyProtocolConfig_V1 ProxyProtocolConfig_Version = 0 - // PROXY protocol version 2. Binary format. - ProxyProtocolConfig_V2 ProxyProtocolConfig_Version = 1 -) - -// Enum value maps for ProxyProtocolConfig_Version. -var ( - ProxyProtocolConfig_Version_name = map[int32]string{ - 0: "V1", - 1: "V2", - } - ProxyProtocolConfig_Version_value = map[string]int32{ - "V1": 0, - "V2": 1, - } -) - -func (x ProxyProtocolConfig_Version) Enum() *ProxyProtocolConfig_Version { - p := new(ProxyProtocolConfig_Version) - *p = x - return p -} - -func (x ProxyProtocolConfig_Version) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ProxyProtocolConfig_Version) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_proxy_protocol_proto_enumTypes[1].Descriptor() -} - -func (ProxyProtocolConfig_Version) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_proxy_protocol_proto_enumTypes[1] -} - -func (x ProxyProtocolConfig_Version) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ProxyProtocolConfig_Version.Descriptor instead. -func (ProxyProtocolConfig_Version) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_proxy_protocol_proto_rawDescGZIP(), []int{1, 0} -} - -type ProxyProtocolPassThroughTLVs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The strategy to pass through TLVs. Default is INCLUDE_ALL. - // If INCLUDE_ALL is set, all TLVs will be passed through no matter the tlv_type field. - MatchType ProxyProtocolPassThroughTLVs_PassTLVsMatchType `protobuf:"varint,1,opt,name=match_type,json=matchType,proto3,enum=envoy.config.core.v3.ProxyProtocolPassThroughTLVs_PassTLVsMatchType" json:"match_type,omitempty"` - // The TLV types that are applied based on match_type. - // TLV type is defined as uint8_t in proxy protocol. See `the spec - // `_ for details. - TlvType []uint32 `protobuf:"varint,2,rep,packed,name=tlv_type,json=tlvType,proto3" json:"tlv_type,omitempty"` -} - -func (x *ProxyProtocolPassThroughTLVs) Reset() { - *x = ProxyProtocolPassThroughTLVs{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_proxy_protocol_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProxyProtocolPassThroughTLVs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProxyProtocolPassThroughTLVs) ProtoMessage() {} - -func (x *ProxyProtocolPassThroughTLVs) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_proxy_protocol_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProxyProtocolPassThroughTLVs.ProtoReflect.Descriptor instead. -func (*ProxyProtocolPassThroughTLVs) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_proxy_protocol_proto_rawDescGZIP(), []int{0} -} - -func (x *ProxyProtocolPassThroughTLVs) GetMatchType() ProxyProtocolPassThroughTLVs_PassTLVsMatchType { - if x != nil { - return x.MatchType - } - return ProxyProtocolPassThroughTLVs_INCLUDE_ALL -} - -func (x *ProxyProtocolPassThroughTLVs) GetTlvType() []uint32 { - if x != nil { - return x.TlvType - } - return nil -} - -type ProxyProtocolConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The PROXY protocol version to use. See https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt for details - Version ProxyProtocolConfig_Version `protobuf:"varint,1,opt,name=version,proto3,enum=envoy.config.core.v3.ProxyProtocolConfig_Version" json:"version,omitempty"` - // This config controls which TLVs can be passed to upstream if it is Proxy Protocol - // V2 header. If there is no setting for this field, no TLVs will be passed through. - PassThroughTlvs *ProxyProtocolPassThroughTLVs `protobuf:"bytes,2,opt,name=pass_through_tlvs,json=passThroughTlvs,proto3" json:"pass_through_tlvs,omitempty"` -} - -func (x *ProxyProtocolConfig) Reset() { - *x = ProxyProtocolConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_proxy_protocol_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProxyProtocolConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProxyProtocolConfig) ProtoMessage() {} - -func (x *ProxyProtocolConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_proxy_protocol_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProxyProtocolConfig.ProtoReflect.Descriptor instead. -func (*ProxyProtocolConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_proxy_protocol_proto_rawDescGZIP(), []int{1} -} - -func (x *ProxyProtocolConfig) GetVersion() ProxyProtocolConfig_Version { - if x != nil { - return x.Version - } - return ProxyProtocolConfig_V1 -} - -func (x *ProxyProtocolConfig) GetPassThroughTlvs() *ProxyProtocolPassThroughTLVs { - if x != nil { - return x.PassThroughTlvs - } - return nil -} - -var File_envoy_config_core_v3_proxy_protocol_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_proxy_protocol_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x01, 0x0a, 0x1c, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x61, 0x73, 0x73, 0x54, - 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x54, 0x4c, 0x56, 0x73, 0x12, 0x63, 0x0a, 0x0a, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x50, 0x61, 0x73, 0x73, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x54, 0x4c, - 0x56, 0x73, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x54, 0x4c, 0x56, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x28, 0x0a, 0x08, 0x74, 0x6c, 0x76, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0d, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x92, 0x01, 0x07, 0x22, 0x05, 0x2a, 0x03, 0x10, 0x80, 0x02, - 0x52, 0x07, 0x74, 0x6c, 0x76, 0x54, 0x79, 0x70, 0x65, 0x22, 0x31, 0x0a, 0x11, 0x50, 0x61, 0x73, - 0x73, 0x54, 0x4c, 0x56, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, - 0x0a, 0x0b, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x00, 0x12, - 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x10, 0x01, 0x22, 0xdd, 0x01, 0x0a, - 0x13, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4b, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x5e, 0x0a, 0x11, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, - 0x68, 0x5f, 0x74, 0x6c, 0x76, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x50, 0x61, 0x73, 0x73, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x54, 0x4c, 0x56, 0x73, - 0x52, 0x0f, 0x70, 0x61, 0x73, 0x73, 0x54, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x54, 0x6c, 0x76, - 0x73, 0x22, 0x19, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a, 0x02, - 0x56, 0x31, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x32, 0x10, 0x01, 0x42, 0x86, 0x01, 0x0a, - 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x33, 0x42, 0x12, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, - 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_proxy_protocol_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_proxy_protocol_proto_rawDescData = file_envoy_config_core_v3_proxy_protocol_proto_rawDesc -) - -func file_envoy_config_core_v3_proxy_protocol_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_proxy_protocol_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_proxy_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_proxy_protocol_proto_rawDescData) - }) - return file_envoy_config_core_v3_proxy_protocol_proto_rawDescData -} - -var file_envoy_config_core_v3_proxy_protocol_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_config_core_v3_proxy_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_config_core_v3_proxy_protocol_proto_goTypes = []interface{}{ - (ProxyProtocolPassThroughTLVs_PassTLVsMatchType)(0), // 0: envoy.config.core.v3.ProxyProtocolPassThroughTLVs.PassTLVsMatchType - (ProxyProtocolConfig_Version)(0), // 1: envoy.config.core.v3.ProxyProtocolConfig.Version - (*ProxyProtocolPassThroughTLVs)(nil), // 2: envoy.config.core.v3.ProxyProtocolPassThroughTLVs - (*ProxyProtocolConfig)(nil), // 3: envoy.config.core.v3.ProxyProtocolConfig -} -var file_envoy_config_core_v3_proxy_protocol_proto_depIdxs = []int32{ - 0, // 0: envoy.config.core.v3.ProxyProtocolPassThroughTLVs.match_type:type_name -> envoy.config.core.v3.ProxyProtocolPassThroughTLVs.PassTLVsMatchType - 1, // 1: envoy.config.core.v3.ProxyProtocolConfig.version:type_name -> envoy.config.core.v3.ProxyProtocolConfig.Version - 2, // 2: envoy.config.core.v3.ProxyProtocolConfig.pass_through_tlvs:type_name -> envoy.config.core.v3.ProxyProtocolPassThroughTLVs - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_proxy_protocol_proto_init() } -func file_envoy_config_core_v3_proxy_protocol_proto_init() { - if File_envoy_config_core_v3_proxy_protocol_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_proxy_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProxyProtocolPassThroughTLVs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_proxy_protocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProxyProtocolConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_proxy_protocol_proto_rawDesc, - NumEnums: 2, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_proxy_protocol_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_proxy_protocol_proto_depIdxs, - EnumInfos: file_envoy_config_core_v3_proxy_protocol_proto_enumTypes, - MessageInfos: file_envoy_config_core_v3_proxy_protocol_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_proxy_protocol_proto = out.File - file_envoy_config_core_v3_proxy_protocol_proto_rawDesc = nil - file_envoy_config_core_v3_proxy_protocol_proto_goTypes = nil - file_envoy_config_core_v3_proxy_protocol_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/proxy_protocol.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/proxy_protocol.pb.validate.go deleted file mode 100644 index 2edd9b1165c..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/proxy_protocol.pb.validate.go +++ /dev/null @@ -1,290 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/proxy_protocol.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ProxyProtocolPassThroughTLVs with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ProxyProtocolPassThroughTLVs) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ProxyProtocolPassThroughTLVs with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ProxyProtocolPassThroughTLVsMultiError, or nil if none found. -func (m *ProxyProtocolPassThroughTLVs) ValidateAll() error { - return m.validate(true) -} - -func (m *ProxyProtocolPassThroughTLVs) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for MatchType - - for idx, item := range m.GetTlvType() { - _, _ = idx, item - - if item >= 256 { - err := ProxyProtocolPassThroughTLVsValidationError{ - field: fmt.Sprintf("TlvType[%v]", idx), - reason: "value must be less than 256", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(errors) > 0 { - return ProxyProtocolPassThroughTLVsMultiError(errors) - } - - return nil -} - -// ProxyProtocolPassThroughTLVsMultiError is an error wrapping multiple -// validation errors returned by ProxyProtocolPassThroughTLVs.ValidateAll() if -// the designated constraints aren't met. -type ProxyProtocolPassThroughTLVsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ProxyProtocolPassThroughTLVsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ProxyProtocolPassThroughTLVsMultiError) AllErrors() []error { return m } - -// ProxyProtocolPassThroughTLVsValidationError is the validation error returned -// by ProxyProtocolPassThroughTLVs.Validate if the designated constraints -// aren't met. -type ProxyProtocolPassThroughTLVsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ProxyProtocolPassThroughTLVsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ProxyProtocolPassThroughTLVsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ProxyProtocolPassThroughTLVsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ProxyProtocolPassThroughTLVsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ProxyProtocolPassThroughTLVsValidationError) ErrorName() string { - return "ProxyProtocolPassThroughTLVsValidationError" -} - -// Error satisfies the builtin error interface -func (e ProxyProtocolPassThroughTLVsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sProxyProtocolPassThroughTLVs.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ProxyProtocolPassThroughTLVsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ProxyProtocolPassThroughTLVsValidationError{} - -// Validate checks the field values on ProxyProtocolConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ProxyProtocolConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ProxyProtocolConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ProxyProtocolConfigMultiError, or nil if none found. -func (m *ProxyProtocolConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *ProxyProtocolConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Version - - if all { - switch v := interface{}(m.GetPassThroughTlvs()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ProxyProtocolConfigValidationError{ - field: "PassThroughTlvs", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ProxyProtocolConfigValidationError{ - field: "PassThroughTlvs", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPassThroughTlvs()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ProxyProtocolConfigValidationError{ - field: "PassThroughTlvs", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ProxyProtocolConfigMultiError(errors) - } - - return nil -} - -// ProxyProtocolConfigMultiError is an error wrapping multiple validation -// errors returned by ProxyProtocolConfig.ValidateAll() if the designated -// constraints aren't met. -type ProxyProtocolConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ProxyProtocolConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ProxyProtocolConfigMultiError) AllErrors() []error { return m } - -// ProxyProtocolConfigValidationError is the validation error returned by -// ProxyProtocolConfig.Validate if the designated constraints aren't met. -type ProxyProtocolConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ProxyProtocolConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ProxyProtocolConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ProxyProtocolConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ProxyProtocolConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ProxyProtocolConfigValidationError) ErrorName() string { - return "ProxyProtocolConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e ProxyProtocolConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sProxyProtocolConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ProxyProtocolConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ProxyProtocolConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/resolver.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/resolver.pb.go deleted file mode 100644 index 6f2e617680e..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/resolver.pb.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/resolver.proto - -package corev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration of DNS resolver option flags which control the behavior of the DNS resolver. -type DnsResolverOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Use TCP for all DNS queries instead of the default protocol UDP. - UseTcpForDnsLookups bool `protobuf:"varint,1,opt,name=use_tcp_for_dns_lookups,json=useTcpForDnsLookups,proto3" json:"use_tcp_for_dns_lookups,omitempty"` - // Do not use the default search domains; only query hostnames as-is or as aliases. - NoDefaultSearchDomain bool `protobuf:"varint,2,opt,name=no_default_search_domain,json=noDefaultSearchDomain,proto3" json:"no_default_search_domain,omitempty"` -} - -func (x *DnsResolverOptions) Reset() { - *x = DnsResolverOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_resolver_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsResolverOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsResolverOptions) ProtoMessage() {} - -func (x *DnsResolverOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_resolver_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsResolverOptions.ProtoReflect.Descriptor instead. -func (*DnsResolverOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_resolver_proto_rawDescGZIP(), []int{0} -} - -func (x *DnsResolverOptions) GetUseTcpForDnsLookups() bool { - if x != nil { - return x.UseTcpForDnsLookups - } - return false -} - -func (x *DnsResolverOptions) GetNoDefaultSearchDomain() bool { - if x != nil { - return x.NoDefaultSearchDomain - } - return false -} - -// DNS resolution configuration which includes the underlying dns resolver addresses and options. -type DnsResolutionConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A list of dns resolver addresses. If specified, the DNS client library will perform resolution - // via the underlying DNS resolvers. Otherwise, the default system resolvers - // (e.g., /etc/resolv.conf) will be used. - Resolvers []*Address `protobuf:"bytes,1,rep,name=resolvers,proto3" json:"resolvers,omitempty"` - // Configuration of DNS resolver option flags which control the behavior of the DNS resolver. - DnsResolverOptions *DnsResolverOptions `protobuf:"bytes,2,opt,name=dns_resolver_options,json=dnsResolverOptions,proto3" json:"dns_resolver_options,omitempty"` -} - -func (x *DnsResolutionConfig) Reset() { - *x = DnsResolutionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_resolver_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DnsResolutionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DnsResolutionConfig) ProtoMessage() {} - -func (x *DnsResolutionConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_resolver_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DnsResolutionConfig.ProtoReflect.Descriptor instead. -func (*DnsResolutionConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_resolver_proto_rawDescGZIP(), []int{1} -} - -func (x *DnsResolutionConfig) GetResolvers() []*Address { - if x != nil { - return x.Resolvers - } - return nil -} - -func (x *DnsResolutionConfig) GetDnsResolverOptions() *DnsResolverOptions { - if x != nil { - return x.DnsResolverOptions - } - return nil -} - -var File_envoy_config_core_v3_resolver_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_resolver_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x12, 0x44, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x34, - 0x0a, 0x17, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x64, 0x6e, - 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x13, 0x75, 0x73, 0x65, 0x54, 0x63, 0x70, 0x46, 0x6f, 0x72, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, - 0x6b, 0x75, 0x70, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x6e, 0x6f, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x6e, 0x6f, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0xb8, 0x01, - 0x0a, 0x13, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x01, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x14, - 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x81, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, - 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, - 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_resolver_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_resolver_proto_rawDescData = file_envoy_config_core_v3_resolver_proto_rawDesc -) - -func file_envoy_config_core_v3_resolver_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_resolver_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_resolver_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_resolver_proto_rawDescData) - }) - return file_envoy_config_core_v3_resolver_proto_rawDescData -} - -var file_envoy_config_core_v3_resolver_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_config_core_v3_resolver_proto_goTypes = []interface{}{ - (*DnsResolverOptions)(nil), // 0: envoy.config.core.v3.DnsResolverOptions - (*DnsResolutionConfig)(nil), // 1: envoy.config.core.v3.DnsResolutionConfig - (*Address)(nil), // 2: envoy.config.core.v3.Address -} -var file_envoy_config_core_v3_resolver_proto_depIdxs = []int32{ - 2, // 0: envoy.config.core.v3.DnsResolutionConfig.resolvers:type_name -> envoy.config.core.v3.Address - 0, // 1: envoy.config.core.v3.DnsResolutionConfig.dns_resolver_options:type_name -> envoy.config.core.v3.DnsResolverOptions - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_resolver_proto_init() } -func file_envoy_config_core_v3_resolver_proto_init() { - if File_envoy_config_core_v3_resolver_proto != nil { - return - } - file_envoy_config_core_v3_address_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_resolver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsResolverOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_resolver_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DnsResolutionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_resolver_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_resolver_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_resolver_proto_depIdxs, - MessageInfos: file_envoy_config_core_v3_resolver_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_resolver_proto = out.File - file_envoy_config_core_v3_resolver_proto_rawDesc = nil - file_envoy_config_core_v3_resolver_proto_goTypes = nil - file_envoy_config_core_v3_resolver_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/resolver.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/resolver.pb.validate.go deleted file mode 100644 index 30de106fe24..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/resolver.pb.validate.go +++ /dev/null @@ -1,318 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/resolver.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on DnsResolverOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DnsResolverOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DnsResolverOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DnsResolverOptionsMultiError, or nil if none found. -func (m *DnsResolverOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *DnsResolverOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for UseTcpForDnsLookups - - // no validation rules for NoDefaultSearchDomain - - if len(errors) > 0 { - return DnsResolverOptionsMultiError(errors) - } - - return nil -} - -// DnsResolverOptionsMultiError is an error wrapping multiple validation errors -// returned by DnsResolverOptions.ValidateAll() if the designated constraints -// aren't met. -type DnsResolverOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DnsResolverOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DnsResolverOptionsMultiError) AllErrors() []error { return m } - -// DnsResolverOptionsValidationError is the validation error returned by -// DnsResolverOptions.Validate if the designated constraints aren't met. -type DnsResolverOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsResolverOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsResolverOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsResolverOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsResolverOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsResolverOptionsValidationError) ErrorName() string { - return "DnsResolverOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsResolverOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsResolverOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsResolverOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsResolverOptionsValidationError{} - -// Validate checks the field values on DnsResolutionConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DnsResolutionConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DnsResolutionConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DnsResolutionConfigMultiError, or nil if none found. -func (m *DnsResolutionConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *DnsResolutionConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetResolvers()) < 1 { - err := DnsResolutionConfigValidationError{ - field: "Resolvers", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetResolvers() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DnsResolutionConfigValidationError{ - field: fmt.Sprintf("Resolvers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DnsResolutionConfigValidationError{ - field: fmt.Sprintf("Resolvers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsResolutionConfigValidationError{ - field: fmt.Sprintf("Resolvers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetDnsResolverOptions()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DnsResolutionConfigValidationError{ - field: "DnsResolverOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DnsResolutionConfigValidationError{ - field: "DnsResolverOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDnsResolverOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DnsResolutionConfigValidationError{ - field: "DnsResolverOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DnsResolutionConfigMultiError(errors) - } - - return nil -} - -// DnsResolutionConfigMultiError is an error wrapping multiple validation -// errors returned by DnsResolutionConfig.ValidateAll() if the designated -// constraints aren't met. -type DnsResolutionConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DnsResolutionConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DnsResolutionConfigMultiError) AllErrors() []error { return m } - -// DnsResolutionConfigValidationError is the validation error returned by -// DnsResolutionConfig.Validate if the designated constraints aren't met. -type DnsResolutionConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DnsResolutionConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DnsResolutionConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DnsResolutionConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DnsResolutionConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DnsResolutionConfigValidationError) ErrorName() string { - return "DnsResolutionConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e DnsResolutionConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDnsResolutionConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DnsResolutionConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DnsResolutionConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/socket_option.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/socket_option.pb.go deleted file mode 100644 index 6847f51edb2..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/socket_option.pb.go +++ /dev/null @@ -1,409 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/socket_option.proto - -package corev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type SocketOption_SocketState int32 - -const ( - // Socket options are applied after socket creation but before binding the socket to a port - SocketOption_STATE_PREBIND SocketOption_SocketState = 0 - // Socket options are applied after binding the socket to a port but before calling listen() - SocketOption_STATE_BOUND SocketOption_SocketState = 1 - // Socket options are applied after calling listen() - SocketOption_STATE_LISTENING SocketOption_SocketState = 2 -) - -// Enum value maps for SocketOption_SocketState. -var ( - SocketOption_SocketState_name = map[int32]string{ - 0: "STATE_PREBIND", - 1: "STATE_BOUND", - 2: "STATE_LISTENING", - } - SocketOption_SocketState_value = map[string]int32{ - "STATE_PREBIND": 0, - "STATE_BOUND": 1, - "STATE_LISTENING": 2, - } -) - -func (x SocketOption_SocketState) Enum() *SocketOption_SocketState { - p := new(SocketOption_SocketState) - *p = x - return p -} - -func (x SocketOption_SocketState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SocketOption_SocketState) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_core_v3_socket_option_proto_enumTypes[0].Descriptor() -} - -func (SocketOption_SocketState) Type() protoreflect.EnumType { - return &file_envoy_config_core_v3_socket_option_proto_enumTypes[0] -} - -func (x SocketOption_SocketState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SocketOption_SocketState.Descriptor instead. -func (SocketOption_SocketState) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_core_v3_socket_option_proto_rawDescGZIP(), []int{0, 0} -} - -// Generic socket option message. This would be used to set socket options that -// might not exist in upstream kernels or precompiled Envoy binaries. -// -// For example: -// -// .. code-block:: json -// -// { -// "description": "support tcp keep alive", -// "state": 0, -// "level": 1, -// "name": 9, -// "int_value": 1, -// } -// -// 1 means SOL_SOCKET and 9 means SO_KEEPALIVE on Linux. -// With the above configuration, `TCP Keep-Alives `_ -// can be enabled in socket with Linux, which can be used in -// :ref:`listener's` or -// :ref:`admin's ` socket_options etc. -// -// It should be noted that the name or level may have different values on different platforms. -// [#next-free-field: 7] -type SocketOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An optional name to give this socket option for debugging, etc. - // Uniqueness is not required and no special meaning is assumed. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP - Level int64 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` - // The numeric name as passed to setsockopt - Name int64 `protobuf:"varint,3,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to Value: - // - // *SocketOption_IntValue - // *SocketOption_BufValue - Value isSocketOption_Value `protobuf_oneof:"value"` - // The state in which the option will be applied. When used in BindConfig - // STATE_PREBIND is currently the only valid value. - State SocketOption_SocketState `protobuf:"varint,6,opt,name=state,proto3,enum=envoy.config.core.v3.SocketOption_SocketState" json:"state,omitempty"` -} - -func (x *SocketOption) Reset() { - *x = SocketOption{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_socket_option_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SocketOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SocketOption) ProtoMessage() {} - -func (x *SocketOption) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_socket_option_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SocketOption.ProtoReflect.Descriptor instead. -func (*SocketOption) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_socket_option_proto_rawDescGZIP(), []int{0} -} - -func (x *SocketOption) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *SocketOption) GetLevel() int64 { - if x != nil { - return x.Level - } - return 0 -} - -func (x *SocketOption) GetName() int64 { - if x != nil { - return x.Name - } - return 0 -} - -func (m *SocketOption) GetValue() isSocketOption_Value { - if m != nil { - return m.Value - } - return nil -} - -func (x *SocketOption) GetIntValue() int64 { - if x, ok := x.GetValue().(*SocketOption_IntValue); ok { - return x.IntValue - } - return 0 -} - -func (x *SocketOption) GetBufValue() []byte { - if x, ok := x.GetValue().(*SocketOption_BufValue); ok { - return x.BufValue - } - return nil -} - -func (x *SocketOption) GetState() SocketOption_SocketState { - if x != nil { - return x.State - } - return SocketOption_STATE_PREBIND -} - -type isSocketOption_Value interface { - isSocketOption_Value() -} - -type SocketOption_IntValue struct { - // Because many sockopts take an int value. - IntValue int64 `protobuf:"varint,4,opt,name=int_value,json=intValue,proto3,oneof"` -} - -type SocketOption_BufValue struct { - // Otherwise it's a byte buffer. - BufValue []byte `protobuf:"bytes,5,opt,name=buf_value,json=bufValue,proto3,oneof"` -} - -func (*SocketOption_IntValue) isSocketOption_Value() {} - -func (*SocketOption_BufValue) isSocketOption_Value() {} - -type SocketOptionsOverride struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SocketOptions []*SocketOption `protobuf:"bytes,1,rep,name=socket_options,json=socketOptions,proto3" json:"socket_options,omitempty"` -} - -func (x *SocketOptionsOverride) Reset() { - *x = SocketOptionsOverride{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_socket_option_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SocketOptionsOverride) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SocketOptionsOverride) ProtoMessage() {} - -func (x *SocketOptionsOverride) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_socket_option_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SocketOptionsOverride.ProtoReflect.Descriptor instead. -func (*SocketOptionsOverride) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_socket_option_proto_rawDescGZIP(), []int{1} -} - -func (x *SocketOptionsOverride) GetSocketOptions() []*SocketOption { - if x != nil { - return x.SocketOptions - } - return nil -} - -var File_envoy_config_core_v3_socket_option_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_socket_option_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x02, 0x0a, 0x0c, - 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, - 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, - 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x62, 0x75, 0x66, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x08, 0x62, 0x75, - 0x66, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x46, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, - 0x52, 0x45, 0x42, 0x49, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x3a, 0x25, - 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x22, 0x62, 0x0a, 0x15, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x49, 0x0a, 0x0e, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x85, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, - 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, - 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_socket_option_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_socket_option_proto_rawDescData = file_envoy_config_core_v3_socket_option_proto_rawDesc -) - -func file_envoy_config_core_v3_socket_option_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_socket_option_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_socket_option_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_socket_option_proto_rawDescData) - }) - return file_envoy_config_core_v3_socket_option_proto_rawDescData -} - -var file_envoy_config_core_v3_socket_option_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_config_core_v3_socket_option_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_config_core_v3_socket_option_proto_goTypes = []interface{}{ - (SocketOption_SocketState)(0), // 0: envoy.config.core.v3.SocketOption.SocketState - (*SocketOption)(nil), // 1: envoy.config.core.v3.SocketOption - (*SocketOptionsOverride)(nil), // 2: envoy.config.core.v3.SocketOptionsOverride -} -var file_envoy_config_core_v3_socket_option_proto_depIdxs = []int32{ - 0, // 0: envoy.config.core.v3.SocketOption.state:type_name -> envoy.config.core.v3.SocketOption.SocketState - 1, // 1: envoy.config.core.v3.SocketOptionsOverride.socket_options:type_name -> envoy.config.core.v3.SocketOption - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_socket_option_proto_init() } -func file_envoy_config_core_v3_socket_option_proto_init() { - if File_envoy_config_core_v3_socket_option_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_socket_option_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SocketOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_core_v3_socket_option_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SocketOptionsOverride); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v3_socket_option_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*SocketOption_IntValue)(nil), - (*SocketOption_BufValue)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_socket_option_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_socket_option_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_socket_option_proto_depIdxs, - EnumInfos: file_envoy_config_core_v3_socket_option_proto_enumTypes, - MessageInfos: file_envoy_config_core_v3_socket_option_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_socket_option_proto = out.File - file_envoy_config_core_v3_socket_option_proto_rawDesc = nil - file_envoy_config_core_v3_socket_option_proto_goTypes = nil - file_envoy_config_core_v3_socket_option_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/socket_option.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/socket_option.pb.validate.go deleted file mode 100644 index dc0b53f5518..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/socket_option.pb.validate.go +++ /dev/null @@ -1,330 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/socket_option.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on SocketOption with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *SocketOption) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SocketOption with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SocketOptionMultiError, or -// nil if none found. -func (m *SocketOption) ValidateAll() error { - return m.validate(true) -} - -func (m *SocketOption) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Description - - // no validation rules for Level - - // no validation rules for Name - - if _, ok := SocketOption_SocketState_name[int32(m.GetState())]; !ok { - err := SocketOptionValidationError{ - field: "State", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - oneofValuePresent := false - switch v := m.Value.(type) { - case *SocketOption_IntValue: - if v == nil { - err := SocketOptionValidationError{ - field: "Value", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofValuePresent = true - // no validation rules for IntValue - case *SocketOption_BufValue: - if v == nil { - err := SocketOptionValidationError{ - field: "Value", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofValuePresent = true - // no validation rules for BufValue - default: - _ = v // ensures v is used - } - if !oneofValuePresent { - err := SocketOptionValidationError{ - field: "Value", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return SocketOptionMultiError(errors) - } - - return nil -} - -// SocketOptionMultiError is an error wrapping multiple validation errors -// returned by SocketOption.ValidateAll() if the designated constraints aren't met. -type SocketOptionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SocketOptionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SocketOptionMultiError) AllErrors() []error { return m } - -// SocketOptionValidationError is the validation error returned by -// SocketOption.Validate if the designated constraints aren't met. -type SocketOptionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SocketOptionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SocketOptionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SocketOptionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SocketOptionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SocketOptionValidationError) ErrorName() string { return "SocketOptionValidationError" } - -// Error satisfies the builtin error interface -func (e SocketOptionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSocketOption.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SocketOptionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SocketOptionValidationError{} - -// Validate checks the field values on SocketOptionsOverride with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *SocketOptionsOverride) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SocketOptionsOverride with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SocketOptionsOverrideMultiError, or nil if none found. -func (m *SocketOptionsOverride) ValidateAll() error { - return m.validate(true) -} - -func (m *SocketOptionsOverride) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetSocketOptions() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SocketOptionsOverrideValidationError{ - field: fmt.Sprintf("SocketOptions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SocketOptionsOverrideValidationError{ - field: fmt.Sprintf("SocketOptions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SocketOptionsOverrideValidationError{ - field: fmt.Sprintf("SocketOptions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return SocketOptionsOverrideMultiError(errors) - } - - return nil -} - -// SocketOptionsOverrideMultiError is an error wrapping multiple validation -// errors returned by SocketOptionsOverride.ValidateAll() if the designated -// constraints aren't met. -type SocketOptionsOverrideMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SocketOptionsOverrideMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SocketOptionsOverrideMultiError) AllErrors() []error { return m } - -// SocketOptionsOverrideValidationError is the validation error returned by -// SocketOptionsOverride.Validate if the designated constraints aren't met. -type SocketOptionsOverrideValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SocketOptionsOverrideValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SocketOptionsOverrideValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SocketOptionsOverrideValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SocketOptionsOverrideValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SocketOptionsOverrideValidationError) ErrorName() string { - return "SocketOptionsOverrideValidationError" -} - -// Error satisfies the builtin error interface -func (e SocketOptionsOverrideValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSocketOptionsOverride.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SocketOptionsOverrideValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SocketOptionsOverrideValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/substitution_format_string.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/substitution_format_string.pb.go deleted file mode 100644 index 9e29768d766..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/substitution_format_string.pb.go +++ /dev/null @@ -1,363 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/substitution_format_string.proto - -package corev3 - -import ( - _ "github.com/cilium/proxy/go/envoy/annotations" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configuration to use multiple :ref:`command operators ` -// to generate a new string in either plain text or JSON format. -// [#next-free-field: 7] -type SubstitutionFormatString struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Format: - // - // *SubstitutionFormatString_TextFormat - // *SubstitutionFormatString_JsonFormat - // *SubstitutionFormatString_TextFormatSource - Format isSubstitutionFormatString_Format `protobuf_oneof:"format"` - // If set to true, when command operators are evaluated to null, - // - // - for “text_format“, the output of the empty operator is changed from “-“ to an - // empty string, so that empty values are omitted entirely. - // - for “json_format“ the keys with null values are omitted in the output structure. - OmitEmptyValues bool `protobuf:"varint,3,opt,name=omit_empty_values,json=omitEmptyValues,proto3" json:"omit_empty_values,omitempty"` - // Specify a “content_type“ field. - // If this field is not set then “text/plain“ is used for “text_format“ and - // “application/json“ is used for “json_format“. - // - // .. validated-code-block:: yaml - // - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // content_type: "text/html; charset=UTF-8" - ContentType string `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` - // Specifies a collection of Formatter plugins that can be called from the access log configuration. - // See the formatters extensions documentation for details. - // [#extension-category: envoy.formatter] - Formatters []*TypedExtensionConfig `protobuf:"bytes,6,rep,name=formatters,proto3" json:"formatters,omitempty"` -} - -func (x *SubstitutionFormatString) Reset() { - *x = SubstitutionFormatString{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_substitution_format_string_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubstitutionFormatString) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubstitutionFormatString) ProtoMessage() {} - -func (x *SubstitutionFormatString) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_substitution_format_string_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubstitutionFormatString.ProtoReflect.Descriptor instead. -func (*SubstitutionFormatString) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_substitution_format_string_proto_rawDescGZIP(), []int{0} -} - -func (m *SubstitutionFormatString) GetFormat() isSubstitutionFormatString_Format { - if m != nil { - return m.Format - } - return nil -} - -// Deprecated: Do not use. -func (x *SubstitutionFormatString) GetTextFormat() string { - if x, ok := x.GetFormat().(*SubstitutionFormatString_TextFormat); ok { - return x.TextFormat - } - return "" -} - -func (x *SubstitutionFormatString) GetJsonFormat() *structpb.Struct { - if x, ok := x.GetFormat().(*SubstitutionFormatString_JsonFormat); ok { - return x.JsonFormat - } - return nil -} - -func (x *SubstitutionFormatString) GetTextFormatSource() *DataSource { - if x, ok := x.GetFormat().(*SubstitutionFormatString_TextFormatSource); ok { - return x.TextFormatSource - } - return nil -} - -func (x *SubstitutionFormatString) GetOmitEmptyValues() bool { - if x != nil { - return x.OmitEmptyValues - } - return false -} - -func (x *SubstitutionFormatString) GetContentType() string { - if x != nil { - return x.ContentType - } - return "" -} - -func (x *SubstitutionFormatString) GetFormatters() []*TypedExtensionConfig { - if x != nil { - return x.Formatters - } - return nil -} - -type isSubstitutionFormatString_Format interface { - isSubstitutionFormatString_Format() -} - -type SubstitutionFormatString_TextFormat struct { - // Specify a format with command operators to form a text string. - // Its details is described in :ref:`format string`. - // - // For example, setting “text_format“ like below, - // - // .. validated-code-block:: yaml - // - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n" - // - // generates plain text similar to: - // - // .. code-block:: text - // - // upstream connect error:503:path=/foo - // - // Deprecated in favor of :ref:`text_format_source `. To migrate text format strings, use the :ref:`inline_string ` field. - // - // Deprecated: Do not use. - TextFormat string `protobuf:"bytes,1,opt,name=text_format,json=textFormat,proto3,oneof"` -} - -type SubstitutionFormatString_JsonFormat struct { - // Specify a format with command operators to form a JSON string. - // Its details is described in :ref:`format dictionary`. - // Values are rendered as strings, numbers, or boolean values as appropriate. - // Nested JSON objects may be produced by some command operators (e.g. FILTER_STATE or DYNAMIC_METADATA). - // See the documentation for a specific command operator for details. - // - // .. validated-code-block:: yaml - // - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // json_format: - // status: "%RESPONSE_CODE%" - // message: "%LOCAL_REPLY_BODY%" - // - // The following JSON object would be created: - // - // .. code-block:: json - // - // { - // "status": 500, - // "message": "My error message" - // } - JsonFormat *structpb.Struct `protobuf:"bytes,2,opt,name=json_format,json=jsonFormat,proto3,oneof"` -} - -type SubstitutionFormatString_TextFormatSource struct { - // Specify a format with command operators to form a text string. - // Its details is described in :ref:`format string`. - // - // For example, setting “text_format“ like below, - // - // .. validated-code-block:: yaml - // - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // text_format_source: - // inline_string: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n" - // - // generates plain text similar to: - // - // .. code-block:: text - // - // upstream connect error:503:path=/foo - TextFormatSource *DataSource `protobuf:"bytes,5,opt,name=text_format_source,json=textFormatSource,proto3,oneof"` -} - -func (*SubstitutionFormatString_TextFormat) isSubstitutionFormatString_Format() {} - -func (*SubstitutionFormatString_JsonFormat) isSubstitutionFormatString_Format() {} - -func (*SubstitutionFormatString_TextFormatSource) isSubstitutionFormatString_Format() {} - -var File_envoy_config_core_v3_substitution_format_string_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_substitution_format_string_proto_rawDesc = []byte{ - 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x99, 0x03, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2e, 0x0a, 0x0b, - 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, - 0x52, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x44, 0x0a, 0x0b, - 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x12, 0x50, 0x0a, 0x12, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x48, 0x00, 0x52, 0x10, 0x74, 0x65, 0x78, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0f, 0x6f, 0x6d, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x2e, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, - 0xc8, 0x01, 0x00, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x4a, 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x73, 0x42, 0x0d, 0x0a, 0x06, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x91, 0x01, 0x0a, 0x22, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x42, 0x1d, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, - 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_substitution_format_string_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_substitution_format_string_proto_rawDescData = file_envoy_config_core_v3_substitution_format_string_proto_rawDesc -) - -func file_envoy_config_core_v3_substitution_format_string_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_substitution_format_string_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_substitution_format_string_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_substitution_format_string_proto_rawDescData) - }) - return file_envoy_config_core_v3_substitution_format_string_proto_rawDescData -} - -var file_envoy_config_core_v3_substitution_format_string_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v3_substitution_format_string_proto_goTypes = []interface{}{ - (*SubstitutionFormatString)(nil), // 0: envoy.config.core.v3.SubstitutionFormatString - (*structpb.Struct)(nil), // 1: google.protobuf.Struct - (*DataSource)(nil), // 2: envoy.config.core.v3.DataSource - (*TypedExtensionConfig)(nil), // 3: envoy.config.core.v3.TypedExtensionConfig -} -var file_envoy_config_core_v3_substitution_format_string_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v3.SubstitutionFormatString.json_format:type_name -> google.protobuf.Struct - 2, // 1: envoy.config.core.v3.SubstitutionFormatString.text_format_source:type_name -> envoy.config.core.v3.DataSource - 3, // 2: envoy.config.core.v3.SubstitutionFormatString.formatters:type_name -> envoy.config.core.v3.TypedExtensionConfig - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_substitution_format_string_proto_init() } -func file_envoy_config_core_v3_substitution_format_string_proto_init() { - if File_envoy_config_core_v3_substitution_format_string_proto != nil { - return - } - file_envoy_config_core_v3_base_proto_init() - file_envoy_config_core_v3_extension_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_substitution_format_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubstitutionFormatString); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_core_v3_substitution_format_string_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*SubstitutionFormatString_TextFormat)(nil), - (*SubstitutionFormatString_JsonFormat)(nil), - (*SubstitutionFormatString_TextFormatSource)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_substitution_format_string_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_substitution_format_string_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_substitution_format_string_proto_depIdxs, - MessageInfos: file_envoy_config_core_v3_substitution_format_string_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_substitution_format_string_proto = out.File - file_envoy_config_core_v3_substitution_format_string_proto_rawDesc = nil - file_envoy_config_core_v3_substitution_format_string_proto_goTypes = nil - file_envoy_config_core_v3_substitution_format_string_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/substitution_format_string.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/substitution_format_string.pb.validate.go deleted file mode 100644 index 2f3615c0b98..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/substitution_format_string.pb.validate.go +++ /dev/null @@ -1,311 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/substitution_format_string.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on SubstitutionFormatString with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *SubstitutionFormatString) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SubstitutionFormatString with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SubstitutionFormatStringMultiError, or nil if none found. -func (m *SubstitutionFormatString) ValidateAll() error { - return m.validate(true) -} - -func (m *SubstitutionFormatString) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for OmitEmptyValues - - if !_SubstitutionFormatString_ContentType_Pattern.MatchString(m.GetContentType()) { - err := SubstitutionFormatStringValidationError{ - field: "ContentType", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetFormatters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SubstitutionFormatStringValidationError{ - field: fmt.Sprintf("Formatters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SubstitutionFormatStringValidationError{ - field: fmt.Sprintf("Formatters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SubstitutionFormatStringValidationError{ - field: fmt.Sprintf("Formatters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - oneofFormatPresent := false - switch v := m.Format.(type) { - case *SubstitutionFormatString_TextFormat: - if v == nil { - err := SubstitutionFormatStringValidationError{ - field: "Format", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFormatPresent = true - // no validation rules for TextFormat - case *SubstitutionFormatString_JsonFormat: - if v == nil { - err := SubstitutionFormatStringValidationError{ - field: "Format", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFormatPresent = true - - if m.GetJsonFormat() == nil { - err := SubstitutionFormatStringValidationError{ - field: "JsonFormat", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetJsonFormat()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SubstitutionFormatStringValidationError{ - field: "JsonFormat", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SubstitutionFormatStringValidationError{ - field: "JsonFormat", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetJsonFormat()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SubstitutionFormatStringValidationError{ - field: "JsonFormat", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *SubstitutionFormatString_TextFormatSource: - if v == nil { - err := SubstitutionFormatStringValidationError{ - field: "Format", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFormatPresent = true - - if all { - switch v := interface{}(m.GetTextFormatSource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SubstitutionFormatStringValidationError{ - field: "TextFormatSource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SubstitutionFormatStringValidationError{ - field: "TextFormatSource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTextFormatSource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SubstitutionFormatStringValidationError{ - field: "TextFormatSource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofFormatPresent { - err := SubstitutionFormatStringValidationError{ - field: "Format", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return SubstitutionFormatStringMultiError(errors) - } - - return nil -} - -// SubstitutionFormatStringMultiError is an error wrapping multiple validation -// errors returned by SubstitutionFormatString.ValidateAll() if the designated -// constraints aren't met. -type SubstitutionFormatStringMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SubstitutionFormatStringMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SubstitutionFormatStringMultiError) AllErrors() []error { return m } - -// SubstitutionFormatStringValidationError is the validation error returned by -// SubstitutionFormatString.Validate if the designated constraints aren't met. -type SubstitutionFormatStringValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SubstitutionFormatStringValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SubstitutionFormatStringValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SubstitutionFormatStringValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SubstitutionFormatStringValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SubstitutionFormatStringValidationError) ErrorName() string { - return "SubstitutionFormatStringValidationError" -} - -// Error satisfies the builtin error interface -func (e SubstitutionFormatStringValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSubstitutionFormatString.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SubstitutionFormatStringValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SubstitutionFormatStringValidationError{} - -var _SubstitutionFormatString_ContentType_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/udp_socket_config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/udp_socket_config.pb.go deleted file mode 100644 index f10d69534da..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/udp_socket_config.pb.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/core/v3/udp_socket_config.proto - -package corev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Generic UDP socket configuration. -type UdpSocketConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The maximum size of received UDP datagrams. Using a larger size will cause Envoy to allocate - // more memory per socket. Received datagrams above this size will be dropped. If not set - // defaults to 1500 bytes. - MaxRxDatagramSize *wrapperspb.UInt64Value `protobuf:"bytes,1,opt,name=max_rx_datagram_size,json=maxRxDatagramSize,proto3" json:"max_rx_datagram_size,omitempty"` - // Configures whether Generic Receive Offload (GRO) - // _ is preferred when reading from the - // UDP socket. The default is context dependent and is documented where UdpSocketConfig is used. - // This option affects performance but not functionality. If GRO is not supported by the operating - // system, non-GRO receive will be used. - PreferGro *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=prefer_gro,json=preferGro,proto3" json:"prefer_gro,omitempty"` -} - -func (x *UdpSocketConfig) Reset() { - *x = UdpSocketConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_core_v3_udp_socket_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UdpSocketConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UdpSocketConfig) ProtoMessage() {} - -func (x *UdpSocketConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_core_v3_udp_socket_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UdpSocketConfig.ProtoReflect.Descriptor instead. -func (*UdpSocketConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_core_v3_udp_socket_config_proto_rawDescGZIP(), []int{0} -} - -func (x *UdpSocketConfig) GetMaxRxDatagramSize() *wrapperspb.UInt64Value { - if x != nil { - return x.MaxRxDatagramSize - } - return nil -} - -func (x *UdpSocketConfig) GetPreferGro() *wrapperspb.BoolValue { - if x != nil { - return x.PreferGro - } - return nil -} - -var File_envoy_config_core_v3_udp_socket_config_proto protoreflect.FileDescriptor - -var file_envoy_config_core_v3_udp_socket_config_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x01, 0x0a, - 0x0f, 0x55, 0x64, 0x70, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x5a, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x78, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x67, - 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0xfa, 0x42, - 0x08, 0x32, 0x06, 0x10, 0x80, 0x80, 0x04, 0x20, 0x00, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x52, 0x78, - 0x44, 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x39, 0x0a, 0x0a, - 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x5f, 0x67, 0x72, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x42, 0x88, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x14, - 0x55, 0x64, 0x70, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, - 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_core_v3_udp_socket_config_proto_rawDescOnce sync.Once - file_envoy_config_core_v3_udp_socket_config_proto_rawDescData = file_envoy_config_core_v3_udp_socket_config_proto_rawDesc -) - -func file_envoy_config_core_v3_udp_socket_config_proto_rawDescGZIP() []byte { - file_envoy_config_core_v3_udp_socket_config_proto_rawDescOnce.Do(func() { - file_envoy_config_core_v3_udp_socket_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_core_v3_udp_socket_config_proto_rawDescData) - }) - return file_envoy_config_core_v3_udp_socket_config_proto_rawDescData -} - -var file_envoy_config_core_v3_udp_socket_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_core_v3_udp_socket_config_proto_goTypes = []interface{}{ - (*UdpSocketConfig)(nil), // 0: envoy.config.core.v3.UdpSocketConfig - (*wrapperspb.UInt64Value)(nil), // 1: google.protobuf.UInt64Value - (*wrapperspb.BoolValue)(nil), // 2: google.protobuf.BoolValue -} -var file_envoy_config_core_v3_udp_socket_config_proto_depIdxs = []int32{ - 1, // 0: envoy.config.core.v3.UdpSocketConfig.max_rx_datagram_size:type_name -> google.protobuf.UInt64Value - 2, // 1: envoy.config.core.v3.UdpSocketConfig.prefer_gro:type_name -> google.protobuf.BoolValue - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_config_core_v3_udp_socket_config_proto_init() } -func file_envoy_config_core_v3_udp_socket_config_proto_init() { - if File_envoy_config_core_v3_udp_socket_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_core_v3_udp_socket_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UdpSocketConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_core_v3_udp_socket_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_core_v3_udp_socket_config_proto_goTypes, - DependencyIndexes: file_envoy_config_core_v3_udp_socket_config_proto_depIdxs, - MessageInfos: file_envoy_config_core_v3_udp_socket_config_proto_msgTypes, - }.Build() - File_envoy_config_core_v3_udp_socket_config_proto = out.File - file_envoy_config_core_v3_udp_socket_config_proto_rawDesc = nil - file_envoy_config_core_v3_udp_socket_config_proto_goTypes = nil - file_envoy_config_core_v3_udp_socket_config_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/udp_socket_config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/udp_socket_config.pb.validate.go deleted file mode 100644 index f0c17960d10..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/core/v3/udp_socket_config.pb.validate.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/core/v3/udp_socket_config.proto - -package corev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on UdpSocketConfig with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *UdpSocketConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UdpSocketConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UdpSocketConfigMultiError, or nil if none found. -func (m *UdpSocketConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *UdpSocketConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if wrapper := m.GetMaxRxDatagramSize(); wrapper != nil { - - if val := wrapper.GetValue(); val <= 0 || val >= 65536 { - err := UdpSocketConfigValidationError{ - field: "MaxRxDatagramSize", - reason: "value must be inside range (0, 65536)", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if all { - switch v := interface{}(m.GetPreferGro()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UdpSocketConfigValidationError{ - field: "PreferGro", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UdpSocketConfigValidationError{ - field: "PreferGro", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPreferGro()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UdpSocketConfigValidationError{ - field: "PreferGro", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return UdpSocketConfigMultiError(errors) - } - - return nil -} - -// UdpSocketConfigMultiError is an error wrapping multiple validation errors -// returned by UdpSocketConfig.ValidateAll() if the designated constraints -// aren't met. -type UdpSocketConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UdpSocketConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UdpSocketConfigMultiError) AllErrors() []error { return m } - -// UdpSocketConfigValidationError is the validation error returned by -// UdpSocketConfig.Validate if the designated constraints aren't met. -type UdpSocketConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UdpSocketConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UdpSocketConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UdpSocketConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UdpSocketConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UdpSocketConfigValidationError) ErrorName() string { return "UdpSocketConfigValidationError" } - -// Error satisfies the builtin error interface -func (e UdpSocketConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUdpSocketConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UdpSocketConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UdpSocketConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route.pb.go deleted file mode 100644 index 28d5d303fdc..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route.pb.go +++ /dev/null @@ -1,566 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/route/v3/route.proto - -package routev3 - -import ( - v3 "github.com/cilium/proxy/go/envoy/config/core/v3" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-free-field: 17] -type RouteConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the route configuration. For example, it might match - // :ref:`route_config_name - // ` in - // :ref:`envoy_v3_api_msg_extensions.filters.network.http_connection_manager.v3.Rds`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // An array of virtual hosts that make up the route table. - VirtualHosts []*VirtualHost `protobuf:"bytes,2,rep,name=virtual_hosts,json=virtualHosts,proto3" json:"virtual_hosts,omitempty"` - // An array of virtual hosts will be dynamically loaded via the VHDS API. - // Both “virtual_hosts“ and “vhds“ fields will be used when present. “virtual_hosts“ can be used - // for a base routing table or for infrequently changing virtual hosts. “vhds“ is used for - // on-demand discovery of virtual hosts. The contents of these two fields will be merged to - // generate a routing table for a given RouteConfiguration, with “vhds“ derived configuration - // taking precedence. - Vhds *Vhds `protobuf:"bytes,9,opt,name=vhds,proto3" json:"vhds,omitempty"` - // Optionally specifies a list of HTTP headers that the connection manager - // will consider to be internal only. If they are found on external requests they will be cleaned - // prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more - // information. - InternalOnlyHeaders []string `protobuf:"bytes,3,rep,name=internal_only_headers,json=internalOnlyHeaders,proto3" json:"internal_only_headers,omitempty"` - // Specifies a list of HTTP headers that should be added to each response that - // the connection manager encodes. Headers specified at this level are applied - // after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or - // :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,4,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each response - // that the connection manager encodes. - ResponseHeadersToRemove []string `protobuf:"bytes,5,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` - // Specifies a list of HTTP headers that should be added to each request - // routed by the HTTP connection manager. Headers specified at this level are - // applied after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or - // :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,6,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each request - // routed by the HTTP connection manager. - RequestHeadersToRemove []string `protobuf:"bytes,8,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // By default, headers that should be added/removed are evaluated from most to least specific: - // - // * route level - // * virtual host level - // * connection manager level - // - // To allow setting overrides at the route or virtual host level, this order can be reversed - // by setting this option to true. Defaults to false. - MostSpecificHeaderMutationsWins bool `protobuf:"varint,10,opt,name=most_specific_header_mutations_wins,json=mostSpecificHeaderMutationsWins,proto3" json:"most_specific_header_mutations_wins,omitempty"` - // An optional boolean that specifies whether the clusters that the route - // table refers to will be validated by the cluster manager. If set to true - // and a route refers to a non-existent cluster, the route table will not - // load. If set to false and a route refers to a non-existent cluster, the - // route table will load and the router filter will return a 404 if the route - // is selected at runtime. This setting defaults to true if the route table - // is statically defined via the :ref:`route_config - // ` - // option. This setting default to false if the route table is loaded dynamically via the - // :ref:`rds - // ` - // option. Users may wish to override the default behavior in certain cases (for example when - // using CDS with a static route table). - ValidateClusters *wrapperspb.BoolValue `protobuf:"bytes,7,opt,name=validate_clusters,json=validateClusters,proto3" json:"validate_clusters,omitempty"` - // The maximum bytes of the response :ref:`direct response body - // ` size. If not specified the default - // is 4096. - // - // .. warning:: - // - // Envoy currently holds the content of :ref:`direct response body - // ` in memory. Be careful setting - // this to be larger than the default 4KB, since the allocated memory for direct response body - // is not subject to data plane buffering controls. - MaxDirectResponseBodySizeBytes *wrapperspb.UInt32Value `protobuf:"bytes,11,opt,name=max_direct_response_body_size_bytes,json=maxDirectResponseBodySizeBytes,proto3" json:"max_direct_response_body_size_bytes,omitempty"` - // A list of plugins and their configurations which may be used by a - // :ref:`cluster specifier plugin name ` - // within the route. All “extension.name“ fields in this list must be unique. - ClusterSpecifierPlugins []*ClusterSpecifierPlugin `protobuf:"bytes,12,rep,name=cluster_specifier_plugins,json=clusterSpecifierPlugins,proto3" json:"cluster_specifier_plugins,omitempty"` - // Specify a set of default request mirroring policies which apply to all routes under its virtual hosts. - // Note that policies are not merged, the most specific non-empty one becomes the mirror policies. - RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,13,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"` - // By default, port in :authority header (if any) is used in host matching. - // With this option enabled, Envoy will ignore the port number in the :authority header (if any) when picking VirtualHost. - // NOTE: this option will not strip the port number (if any) contained in route config - // :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`.domains field. - IgnorePortInHostMatching bool `protobuf:"varint,14,opt,name=ignore_port_in_host_matching,json=ignorePortInHostMatching,proto3" json:"ignore_port_in_host_matching,omitempty"` - // Ignore path-parameters in path-matching. - // Before RFC3986, URI were like(RFC1808): :///;?# - // Envoy by default takes ":path" as ";". - // For users who want to only match path on the "" portion, this option should be true. - IgnorePathParametersInPathMatching bool `protobuf:"varint,15,opt,name=ignore_path_parameters_in_path_matching,json=ignorePathParametersInPathMatching,proto3" json:"ignore_path_parameters_in_path_matching,omitempty"` - // The typed_per_filter_config field can be used to provide RouteConfiguration level per filter config. - // The key should match the :ref:`filter config name - // `. - // The canonical filter name (e.g., “envoy.filters.http.buffer“ for the HTTP buffer filter) can also - // be used for the backwards compatibility. If there is no entry referred by the filter config name, the - // entry referred by the canonical filter name will be provided to the filters as fallback. - // - // Use of this field is filter specific; - // see the :ref:`HTTP filter documentation ` for if and how it is utilized. - // [#comment: An entry's value may be wrapped in a - // :ref:`FilterConfig` - // message to specify additional options.] - TypedPerFilterConfig map[string]*anypb.Any `protobuf:"bytes,16,rep,name=typed_per_filter_config,json=typedPerFilterConfig,proto3" json:"typed_per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *RouteConfiguration) Reset() { - *x = RouteConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteConfiguration) ProtoMessage() {} - -func (x *RouteConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteConfiguration.ProtoReflect.Descriptor instead. -func (*RouteConfiguration) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_proto_rawDescGZIP(), []int{0} -} - -func (x *RouteConfiguration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RouteConfiguration) GetVirtualHosts() []*VirtualHost { - if x != nil { - return x.VirtualHosts - } - return nil -} - -func (x *RouteConfiguration) GetVhds() *Vhds { - if x != nil { - return x.Vhds - } - return nil -} - -func (x *RouteConfiguration) GetInternalOnlyHeaders() []string { - if x != nil { - return x.InternalOnlyHeaders - } - return nil -} - -func (x *RouteConfiguration) GetResponseHeadersToAdd() []*v3.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *RouteConfiguration) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -func (x *RouteConfiguration) GetRequestHeadersToAdd() []*v3.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *RouteConfiguration) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *RouteConfiguration) GetMostSpecificHeaderMutationsWins() bool { - if x != nil { - return x.MostSpecificHeaderMutationsWins - } - return false -} - -func (x *RouteConfiguration) GetValidateClusters() *wrapperspb.BoolValue { - if x != nil { - return x.ValidateClusters - } - return nil -} - -func (x *RouteConfiguration) GetMaxDirectResponseBodySizeBytes() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxDirectResponseBodySizeBytes - } - return nil -} - -func (x *RouteConfiguration) GetClusterSpecifierPlugins() []*ClusterSpecifierPlugin { - if x != nil { - return x.ClusterSpecifierPlugins - } - return nil -} - -func (x *RouteConfiguration) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPolicy { - if x != nil { - return x.RequestMirrorPolicies - } - return nil -} - -func (x *RouteConfiguration) GetIgnorePortInHostMatching() bool { - if x != nil { - return x.IgnorePortInHostMatching - } - return false -} - -func (x *RouteConfiguration) GetIgnorePathParametersInPathMatching() bool { - if x != nil { - return x.IgnorePathParametersInPathMatching - } - return false -} - -func (x *RouteConfiguration) GetTypedPerFilterConfig() map[string]*anypb.Any { - if x != nil { - return x.TypedPerFilterConfig - } - return nil -} - -type Vhds struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration source specifier for VHDS. - ConfigSource *v3.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` -} - -func (x *Vhds) Reset() { - *x = Vhds{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Vhds) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Vhds) ProtoMessage() {} - -func (x *Vhds) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Vhds.ProtoReflect.Descriptor instead. -func (*Vhds) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_proto_rawDescGZIP(), []int{1} -} - -func (x *Vhds) GetConfigSource() *v3.ConfigSource { - if x != nil { - return x.ConfigSource - } - return nil -} - -var File_envoy_config_route_v3_route_proto protoreflect.FileDescriptor - -var file_envoy_config_route_v3_route_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x0b, 0x0a, 0x12, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, - 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x52, - 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x2f, 0x0a, - 0x04, 0x76, 0x68, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x68, 0x64, 0x73, 0x52, 0x04, 0x76, 0x68, 0x64, 0x73, 0x12, 0x44, - 0x0a, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, - 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, - 0x13, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4f, 0x6e, 0x6c, 0x79, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x69, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, - 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, - 0x4d, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, - 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x67, - 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, - 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4b, 0x0a, 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, - 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x4c, 0x0a, 0x23, 0x6d, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x75, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x77, 0x69, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x1f, 0x6d, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x57, 0x69, - 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x69, 0x0a, 0x23, 0x6d, - 0x61, 0x78, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1e, 0x6d, 0x61, 0x78, 0x44, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x69, 0x7a, - 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x69, 0x0a, 0x19, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x17, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x73, 0x12, 0x6e, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, - 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, - 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, - 0x73, 0x12, 0x3e, 0x0a, 0x1c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, - 0x5f, 0x69, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, - 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x50, - 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, - 0x67, 0x12, 0x53, 0x0a, 0x27, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x22, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x50, 0x61, 0x74, 0x68, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x7a, 0x0a, 0x17, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, - 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x73, 0x0a, 0x04, 0x56, 0x68, 0x64, - 0x73, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x3a, 0x18, 0x9a, 0xc5, 0x88, 0x1e, 0x13, 0x0a, 0x11, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x68, 0x64, 0x73, 0x42, 0x81, - 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, - 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_route_v3_route_proto_rawDescOnce sync.Once - file_envoy_config_route_v3_route_proto_rawDescData = file_envoy_config_route_v3_route_proto_rawDesc -) - -func file_envoy_config_route_v3_route_proto_rawDescGZIP() []byte { - file_envoy_config_route_v3_route_proto_rawDescOnce.Do(func() { - file_envoy_config_route_v3_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_route_v3_route_proto_rawDescData) - }) - return file_envoy_config_route_v3_route_proto_rawDescData -} - -var file_envoy_config_route_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_config_route_v3_route_proto_goTypes = []interface{}{ - (*RouteConfiguration)(nil), // 0: envoy.config.route.v3.RouteConfiguration - (*Vhds)(nil), // 1: envoy.config.route.v3.Vhds - nil, // 2: envoy.config.route.v3.RouteConfiguration.TypedPerFilterConfigEntry - (*VirtualHost)(nil), // 3: envoy.config.route.v3.VirtualHost - (*v3.HeaderValueOption)(nil), // 4: envoy.config.core.v3.HeaderValueOption - (*wrapperspb.BoolValue)(nil), // 5: google.protobuf.BoolValue - (*wrapperspb.UInt32Value)(nil), // 6: google.protobuf.UInt32Value - (*ClusterSpecifierPlugin)(nil), // 7: envoy.config.route.v3.ClusterSpecifierPlugin - (*RouteAction_RequestMirrorPolicy)(nil), // 8: envoy.config.route.v3.RouteAction.RequestMirrorPolicy - (*v3.ConfigSource)(nil), // 9: envoy.config.core.v3.ConfigSource - (*anypb.Any)(nil), // 10: google.protobuf.Any -} -var file_envoy_config_route_v3_route_proto_depIdxs = []int32{ - 3, // 0: envoy.config.route.v3.RouteConfiguration.virtual_hosts:type_name -> envoy.config.route.v3.VirtualHost - 1, // 1: envoy.config.route.v3.RouteConfiguration.vhds:type_name -> envoy.config.route.v3.Vhds - 4, // 2: envoy.config.route.v3.RouteConfiguration.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 4, // 3: envoy.config.route.v3.RouteConfiguration.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 5, // 4: envoy.config.route.v3.RouteConfiguration.validate_clusters:type_name -> google.protobuf.BoolValue - 6, // 5: envoy.config.route.v3.RouteConfiguration.max_direct_response_body_size_bytes:type_name -> google.protobuf.UInt32Value - 7, // 6: envoy.config.route.v3.RouteConfiguration.cluster_specifier_plugins:type_name -> envoy.config.route.v3.ClusterSpecifierPlugin - 8, // 7: envoy.config.route.v3.RouteConfiguration.request_mirror_policies:type_name -> envoy.config.route.v3.RouteAction.RequestMirrorPolicy - 2, // 8: envoy.config.route.v3.RouteConfiguration.typed_per_filter_config:type_name -> envoy.config.route.v3.RouteConfiguration.TypedPerFilterConfigEntry - 9, // 9: envoy.config.route.v3.Vhds.config_source:type_name -> envoy.config.core.v3.ConfigSource - 10, // 10: envoy.config.route.v3.RouteConfiguration.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_envoy_config_route_v3_route_proto_init() } -func file_envoy_config_route_v3_route_proto_init() { - if File_envoy_config_route_v3_route_proto != nil { - return - } - file_envoy_config_route_v3_route_components_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_route_v3_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Vhds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_route_v3_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_route_v3_route_proto_goTypes, - DependencyIndexes: file_envoy_config_route_v3_route_proto_depIdxs, - MessageInfos: file_envoy_config_route_v3_route_proto_msgTypes, - }.Build() - File_envoy_config_route_v3_route_proto = out.File - file_envoy_config_route_v3_route_proto_rawDesc = nil - file_envoy_config_route_v3_route_proto_goTypes = nil - file_envoy_config_route_v3_route_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route.pb.validate.go deleted file mode 100644 index ce8a399e8da..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route.pb.validate.go +++ /dev/null @@ -1,663 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/route/v3/route.proto - -package routev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on RouteConfiguration with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteConfiguration) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteConfiguration with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RouteConfigurationMultiError, or nil if none found. -func (m *RouteConfiguration) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteConfiguration) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - for idx, item := range m.GetVirtualHosts() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("VirtualHosts[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("VirtualHosts[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("VirtualHosts[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetVhds()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: "Vhds", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: "Vhds", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetVhds()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: "Vhds", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetInternalOnlyHeaders() { - _, _ = idx, item - - if !_RouteConfiguration_InternalOnlyHeaders_Pattern.MatchString(item) { - err := RouteConfigurationValidationError{ - field: fmt.Sprintf("InternalOnlyHeaders[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - err := RouteConfigurationValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetResponseHeadersToRemove() { - _, _ = idx, item - - if !_RouteConfiguration_ResponseHeadersToRemove_Pattern.MatchString(item) { - err := RouteConfigurationValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(m.GetRequestHeadersToAdd()) > 1000 { - err := RouteConfigurationValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRequestHeadersToRemove() { - _, _ = idx, item - - if !_RouteConfiguration_RequestHeadersToRemove_Pattern.MatchString(item) { - err := RouteConfigurationValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - // no validation rules for MostSpecificHeaderMutationsWins - - if all { - switch v := interface{}(m.GetValidateClusters()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: "ValidateClusters", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: "ValidateClusters", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValidateClusters()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: "ValidateClusters", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMaxDirectResponseBodySizeBytes()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: "MaxDirectResponseBodySizeBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: "MaxDirectResponseBodySizeBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxDirectResponseBodySizeBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: "MaxDirectResponseBodySizeBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetClusterSpecifierPlugins() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("ClusterSpecifierPlugins[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("ClusterSpecifierPlugins[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("ClusterSpecifierPlugins[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRequestMirrorPolicies() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for IgnorePortInHostMatching - - // no validation rules for IgnorePathParametersInPathMatching - - { - sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) - i := 0 - for key := range m.GetTypedPerFilterConfig() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetTypedPerFilterConfig()[key] - _ = val - - // no validation rules for TypedPerFilterConfig[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(errors) > 0 { - return RouteConfigurationMultiError(errors) - } - - return nil -} - -// RouteConfigurationMultiError is an error wrapping multiple validation errors -// returned by RouteConfiguration.ValidateAll() if the designated constraints -// aren't met. -type RouteConfigurationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteConfigurationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteConfigurationMultiError) AllErrors() []error { return m } - -// RouteConfigurationValidationError is the validation error returned by -// RouteConfiguration.Validate if the designated constraints aren't met. -type RouteConfigurationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteConfigurationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteConfigurationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteConfigurationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteConfigurationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteConfigurationValidationError) ErrorName() string { - return "RouteConfigurationValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteConfigurationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteConfiguration.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteConfigurationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteConfigurationValidationError{} - -var _RouteConfiguration_InternalOnlyHeaders_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteConfiguration_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteConfiguration_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on Vhds with the rules defined in the proto -// definition for this message. If any rules are violated, the first error -// encountered is returned, or nil if there are no violations. -func (m *Vhds) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Vhds with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in VhdsMultiError, or nil if none found. -func (m *Vhds) ValidateAll() error { - return m.validate(true) -} - -func (m *Vhds) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetConfigSource() == nil { - err := VhdsValidationError{ - field: "ConfigSource", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetConfigSource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VhdsValidationError{ - field: "ConfigSource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VhdsValidationError{ - field: "ConfigSource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VhdsValidationError{ - field: "ConfigSource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return VhdsMultiError(errors) - } - - return nil -} - -// VhdsMultiError is an error wrapping multiple validation errors returned by -// Vhds.ValidateAll() if the designated constraints aren't met. -type VhdsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m VhdsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m VhdsMultiError) AllErrors() []error { return m } - -// VhdsValidationError is the validation error returned by Vhds.Validate if the -// designated constraints aren't met. -type VhdsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e VhdsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e VhdsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e VhdsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e VhdsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e VhdsValidationError) ErrorName() string { return "VhdsValidationError" } - -// Error satisfies the builtin error interface -func (e VhdsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sVhds.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = VhdsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = VhdsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route_components.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route_components.pb.go deleted file mode 100644 index fe5f7aa4c94..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route_components.pb.go +++ /dev/null @@ -1,9015 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/route/v3/route_components.proto - -package routev3 - -import ( - _ "github.com/cilium/proxy/go/envoy/annotations" - v31 "github.com/cilium/proxy/go/envoy/config/core/v3" - v32 "github.com/cilium/proxy/go/envoy/type/matcher/v3" - v35 "github.com/cilium/proxy/go/envoy/type/metadata/v3" - v34 "github.com/cilium/proxy/go/envoy/type/tracing/v3" - v33 "github.com/cilium/proxy/go/envoy/type/v3" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/cncf/xds/go/xds/annotations/v3" - v3 "github.com/cncf/xds/go/xds/type/matcher/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type VirtualHost_TlsRequirementType int32 - -const ( - // No TLS requirement for the virtual host. - VirtualHost_NONE VirtualHost_TlsRequirementType = 0 - // External requests must use TLS. If a request is external and it is not - // using TLS, a 301 redirect will be sent telling the client to use HTTPS. - VirtualHost_EXTERNAL_ONLY VirtualHost_TlsRequirementType = 1 - // All requests must use TLS. If a request is not using TLS, a 301 redirect - // will be sent telling the client to use HTTPS. - VirtualHost_ALL VirtualHost_TlsRequirementType = 2 -) - -// Enum value maps for VirtualHost_TlsRequirementType. -var ( - VirtualHost_TlsRequirementType_name = map[int32]string{ - 0: "NONE", - 1: "EXTERNAL_ONLY", - 2: "ALL", - } - VirtualHost_TlsRequirementType_value = map[string]int32{ - "NONE": 0, - "EXTERNAL_ONLY": 1, - "ALL": 2, - } -) - -func (x VirtualHost_TlsRequirementType) Enum() *VirtualHost_TlsRequirementType { - p := new(VirtualHost_TlsRequirementType) - *p = x - return p -} - -func (x VirtualHost_TlsRequirementType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (VirtualHost_TlsRequirementType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v3_route_components_proto_enumTypes[0].Descriptor() -} - -func (VirtualHost_TlsRequirementType) Type() protoreflect.EnumType { - return &file_envoy_config_route_v3_route_components_proto_enumTypes[0] -} - -func (x VirtualHost_TlsRequirementType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use VirtualHost_TlsRequirementType.Descriptor instead. -func (VirtualHost_TlsRequirementType) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{0, 0} -} - -type RouteAction_ClusterNotFoundResponseCode int32 - -const ( - // HTTP status code - 503 Service Unavailable. - RouteAction_SERVICE_UNAVAILABLE RouteAction_ClusterNotFoundResponseCode = 0 - // HTTP status code - 404 Not Found. - RouteAction_NOT_FOUND RouteAction_ClusterNotFoundResponseCode = 1 - // HTTP status code - 500 Internal Server Error. - RouteAction_INTERNAL_SERVER_ERROR RouteAction_ClusterNotFoundResponseCode = 2 -) - -// Enum value maps for RouteAction_ClusterNotFoundResponseCode. -var ( - RouteAction_ClusterNotFoundResponseCode_name = map[int32]string{ - 0: "SERVICE_UNAVAILABLE", - 1: "NOT_FOUND", - 2: "INTERNAL_SERVER_ERROR", - } - RouteAction_ClusterNotFoundResponseCode_value = map[string]int32{ - "SERVICE_UNAVAILABLE": 0, - "NOT_FOUND": 1, - "INTERNAL_SERVER_ERROR": 2, - } -) - -func (x RouteAction_ClusterNotFoundResponseCode) Enum() *RouteAction_ClusterNotFoundResponseCode { - p := new(RouteAction_ClusterNotFoundResponseCode) - *p = x - return p -} - -func (x RouteAction_ClusterNotFoundResponseCode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RouteAction_ClusterNotFoundResponseCode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v3_route_components_proto_enumTypes[1].Descriptor() -} - -func (RouteAction_ClusterNotFoundResponseCode) Type() protoreflect.EnumType { - return &file_envoy_config_route_v3_route_components_proto_enumTypes[1] -} - -func (x RouteAction_ClusterNotFoundResponseCode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RouteAction_ClusterNotFoundResponseCode.Descriptor instead. -func (RouteAction_ClusterNotFoundResponseCode) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 0} -} - -// Configures :ref:`internal redirect ` behavior. -// [#next-major-version: remove this definition - it's defined in the InternalRedirectPolicy message.] -// -// Deprecated: Do not use. -type RouteAction_InternalRedirectAction int32 - -const ( - RouteAction_PASS_THROUGH_INTERNAL_REDIRECT RouteAction_InternalRedirectAction = 0 - RouteAction_HANDLE_INTERNAL_REDIRECT RouteAction_InternalRedirectAction = 1 -) - -// Enum value maps for RouteAction_InternalRedirectAction. -var ( - RouteAction_InternalRedirectAction_name = map[int32]string{ - 0: "PASS_THROUGH_INTERNAL_REDIRECT", - 1: "HANDLE_INTERNAL_REDIRECT", - } - RouteAction_InternalRedirectAction_value = map[string]int32{ - "PASS_THROUGH_INTERNAL_REDIRECT": 0, - "HANDLE_INTERNAL_REDIRECT": 1, - } -) - -func (x RouteAction_InternalRedirectAction) Enum() *RouteAction_InternalRedirectAction { - p := new(RouteAction_InternalRedirectAction) - *p = x - return p -} - -func (x RouteAction_InternalRedirectAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RouteAction_InternalRedirectAction) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v3_route_components_proto_enumTypes[2].Descriptor() -} - -func (RouteAction_InternalRedirectAction) Type() protoreflect.EnumType { - return &file_envoy_config_route_v3_route_components_proto_enumTypes[2] -} - -func (x RouteAction_InternalRedirectAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RouteAction_InternalRedirectAction.Descriptor instead. -func (RouteAction_InternalRedirectAction) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 1} -} - -type RetryPolicy_ResetHeaderFormat int32 - -const ( - RetryPolicy_SECONDS RetryPolicy_ResetHeaderFormat = 0 - RetryPolicy_UNIX_TIMESTAMP RetryPolicy_ResetHeaderFormat = 1 -) - -// Enum value maps for RetryPolicy_ResetHeaderFormat. -var ( - RetryPolicy_ResetHeaderFormat_name = map[int32]string{ - 0: "SECONDS", - 1: "UNIX_TIMESTAMP", - } - RetryPolicy_ResetHeaderFormat_value = map[string]int32{ - "SECONDS": 0, - "UNIX_TIMESTAMP": 1, - } -) - -func (x RetryPolicy_ResetHeaderFormat) Enum() *RetryPolicy_ResetHeaderFormat { - p := new(RetryPolicy_ResetHeaderFormat) - *p = x - return p -} - -func (x RetryPolicy_ResetHeaderFormat) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RetryPolicy_ResetHeaderFormat) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v3_route_components_proto_enumTypes[3].Descriptor() -} - -func (RetryPolicy_ResetHeaderFormat) Type() protoreflect.EnumType { - return &file_envoy_config_route_v3_route_components_proto_enumTypes[3] -} - -func (x RetryPolicy_ResetHeaderFormat) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RetryPolicy_ResetHeaderFormat.Descriptor instead. -func (RetryPolicy_ResetHeaderFormat) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{9, 0} -} - -type RedirectAction_RedirectResponseCode int32 - -const ( - // Moved Permanently HTTP Status Code - 301. - RedirectAction_MOVED_PERMANENTLY RedirectAction_RedirectResponseCode = 0 - // Found HTTP Status Code - 302. - RedirectAction_FOUND RedirectAction_RedirectResponseCode = 1 - // See Other HTTP Status Code - 303. - RedirectAction_SEE_OTHER RedirectAction_RedirectResponseCode = 2 - // Temporary Redirect HTTP Status Code - 307. - RedirectAction_TEMPORARY_REDIRECT RedirectAction_RedirectResponseCode = 3 - // Permanent Redirect HTTP Status Code - 308. - RedirectAction_PERMANENT_REDIRECT RedirectAction_RedirectResponseCode = 4 -) - -// Enum value maps for RedirectAction_RedirectResponseCode. -var ( - RedirectAction_RedirectResponseCode_name = map[int32]string{ - 0: "MOVED_PERMANENTLY", - 1: "FOUND", - 2: "SEE_OTHER", - 3: "TEMPORARY_REDIRECT", - 4: "PERMANENT_REDIRECT", - } - RedirectAction_RedirectResponseCode_value = map[string]int32{ - "MOVED_PERMANENTLY": 0, - "FOUND": 1, - "SEE_OTHER": 2, - "TEMPORARY_REDIRECT": 3, - "PERMANENT_REDIRECT": 4, - } -) - -func (x RedirectAction_RedirectResponseCode) Enum() *RedirectAction_RedirectResponseCode { - p := new(RedirectAction_RedirectResponseCode) - *p = x - return p -} - -func (x RedirectAction_RedirectResponseCode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RedirectAction_RedirectResponseCode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v3_route_components_proto_enumTypes[4].Descriptor() -} - -func (RedirectAction_RedirectResponseCode) Type() protoreflect.EnumType { - return &file_envoy_config_route_v3_route_components_proto_enumTypes[4] -} - -func (x RedirectAction_RedirectResponseCode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RedirectAction_RedirectResponseCode.Descriptor instead. -func (RedirectAction_RedirectResponseCode) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{11, 0} -} - -type RateLimit_Action_MetaData_Source int32 - -const ( - // Query :ref:`dynamic metadata ` - RateLimit_Action_MetaData_DYNAMIC RateLimit_Action_MetaData_Source = 0 - // Query :ref:`route entry metadata ` - RateLimit_Action_MetaData_ROUTE_ENTRY RateLimit_Action_MetaData_Source = 1 -) - -// Enum value maps for RateLimit_Action_MetaData_Source. -var ( - RateLimit_Action_MetaData_Source_name = map[int32]string{ - 0: "DYNAMIC", - 1: "ROUTE_ENTRY", - } - RateLimit_Action_MetaData_Source_value = map[string]int32{ - "DYNAMIC": 0, - "ROUTE_ENTRY": 1, - } -) - -func (x RateLimit_Action_MetaData_Source) Enum() *RateLimit_Action_MetaData_Source { - p := new(RateLimit_Action_MetaData_Source) - *p = x - return p -} - -func (x RateLimit_Action_MetaData_Source) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RateLimit_Action_MetaData_Source) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_route_v3_route_components_proto_enumTypes[5].Descriptor() -} - -func (RateLimit_Action_MetaData_Source) Type() protoreflect.EnumType { - return &file_envoy_config_route_v3_route_components_proto_enumTypes[5] -} - -func (x RateLimit_Action_MetaData_Source) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RateLimit_Action_MetaData_Source.Descriptor instead. -func (RateLimit_Action_MetaData_Source) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0, 8, 0} -} - -// The top level element in the routing configuration is a virtual host. Each virtual host has -// a logical name as well as a set of domains that get routed to it based on the incoming request's -// host header. This allows a single listener to service multiple top level domain path trees. Once -// a virtual host is selected based on the domain, the routes are processed in order to see which -// upstream cluster to route to or whether to perform a redirect. -// [#next-free-field: 24] -type VirtualHost struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The logical name of the virtual host. This is used when emitting certain - // statistics but is not relevant for routing. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A list of domains (host/authority header) that will be matched to this - // virtual host. Wildcard hosts are supported in the suffix or prefix form. - // - // Domain search order: - // 1. Exact domain names: “www.foo.com“. - // 2. Suffix domain wildcards: “*.foo.com“ or “*-bar.foo.com“. - // 3. Prefix domain wildcards: “foo.*“ or “foo-*“. - // 4. Special wildcard “*“ matching any domain. - // - // .. note:: - // - // The wildcard will not match the empty string. - // e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. - // The longest wildcards match first. - // Only a single virtual host in the entire route configuration can match on ``*``. A domain - // must be unique across all virtual hosts or the config will fail to load. - // - // Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE. - Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"` - // The list of routes that will be matched, in order, for incoming requests. - // The first route that matches will be used. - // Only one of this and “matcher“ can be specified. - Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` - // [#next-major-version: This should be included in a oneof with routes wrapped in a message.] - // The match tree to use when resolving route actions for incoming requests. Only one of this and “routes“ - // can be specified. - Matcher *v3.Matcher `protobuf:"bytes,21,opt,name=matcher,proto3" json:"matcher,omitempty"` - // Specifies the type of TLS enforcement the virtual host expects. If this option is not - // specified, there is no TLS requirement for the virtual host. - RequireTls VirtualHost_TlsRequirementType `protobuf:"varint,4,opt,name=require_tls,json=requireTls,proto3,enum=envoy.config.route.v3.VirtualHost_TlsRequirementType" json:"require_tls,omitempty"` - // A list of virtual clusters defined for this virtual host. Virtual clusters - // are used for additional statistics gathering. - VirtualClusters []*VirtualCluster `protobuf:"bytes,5,rep,name=virtual_clusters,json=virtualClusters,proto3" json:"virtual_clusters,omitempty"` - // Specifies a set of rate limit configurations that will be applied to the - // virtual host. - RateLimits []*RateLimit `protobuf:"bytes,6,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` - // Specifies a list of HTTP headers that should be added to each request - // handled by this virtual host. Headers specified at this level are applied - // after headers from enclosed :ref:`envoy_v3_api_msg_config.route.v3.Route` and before headers from the - // enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,7,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each request - // handled by this virtual host. - RequestHeadersToRemove []string `protobuf:"bytes,13,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // Specifies a list of HTTP headers that should be added to each response - // handled by this virtual host. Headers specified at this level are applied - // after headers from enclosed :ref:`envoy_v3_api_msg_config.route.v3.Route` and before headers from the - // enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,10,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each response - // handled by this virtual host. - ResponseHeadersToRemove []string `protobuf:"bytes,11,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` - // Indicates that the virtual host has a CORS policy. This field is ignored if related cors policy is - // found in the - // :ref:`VirtualHost.typed_per_filter_config`. - // - // .. attention:: - // - // This option has been deprecated. Please use - // :ref:`VirtualHost.typed_per_filter_config` - // to configure the CORS HTTP filter. - // - // Deprecated: Do not use. - Cors *CorsPolicy `protobuf:"bytes,8,opt,name=cors,proto3" json:"cors,omitempty"` - // The per_filter_config field can be used to provide virtual host-specific configurations for filters. - // The key should match the :ref:`filter config name - // `. - // The canonical filter name (e.g., “envoy.filters.http.buffer“ for the HTTP buffer filter) can also - // be used for the backwards compatibility. If there is no entry referred by the filter config name, the - // entry referred by the canonical filter name will be provided to the filters as fallback. - // - // Use of this field is filter specific; - // see the :ref:`HTTP filter documentation ` for if and how it is utilized. - // [#comment: An entry's value may be wrapped in a - // :ref:`FilterConfig` - // message to specify additional options.] - TypedPerFilterConfig map[string]*anypb.Any `protobuf:"bytes,15,rep,name=typed_per_filter_config,json=typedPerFilterConfig,proto3" json:"typed_per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the upstream request. Setting this option will cause it to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the upstream - // will see the attempt count as perceived by the second Envoy. Defaults to false. - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - // - // [#next-major-version: rename to include_attempt_count_in_request.] - IncludeRequestAttemptCount bool `protobuf:"varint,14,opt,name=include_request_attempt_count,json=includeRequestAttemptCount,proto3" json:"include_request_attempt_count,omitempty"` - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the downstream response. Setting this option will cause the router to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the downstream - // will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false. - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - IncludeAttemptCountInResponse bool `protobuf:"varint,19,opt,name=include_attempt_count_in_response,json=includeAttemptCountInResponse,proto3" json:"include_attempt_count_in_response,omitempty"` - // Indicates the retry policy for all routes in this virtual host. Note that setting a - // route level entry will take precedence over this config and it'll be treated - // independently (e.g.: values are not inherited). - RetryPolicy *RetryPolicy `protobuf:"bytes,16,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that setting a route level entry - // will take precedence over this config and it'll be treated independently (e.g.: values are not - // inherited). :ref:`Retry policy ` should not be - // set if this field is used. - RetryPolicyTypedConfig *anypb.Any `protobuf:"bytes,20,opt,name=retry_policy_typed_config,json=retryPolicyTypedConfig,proto3" json:"retry_policy_typed_config,omitempty"` - // Indicates the hedge policy for all routes in this virtual host. Note that setting a - // route level entry will take precedence over this config and it'll be treated - // independently (e.g.: values are not inherited). - HedgePolicy *HedgePolicy `protobuf:"bytes,17,opt,name=hedge_policy,json=hedgePolicy,proto3" json:"hedge_policy,omitempty"` - // Decides whether to include the :ref:`x-envoy-is-timeout-retry ` - // request header in retries initiated by per try timeouts. - IncludeIsTimeoutRetryHeader bool `protobuf:"varint,23,opt,name=include_is_timeout_retry_header,json=includeIsTimeoutRetryHeader,proto3" json:"include_is_timeout_retry_header,omitempty"` - // The maximum bytes which will be buffered for retries and shadowing. - // If set and a route-specific limit is not set, the bytes actually buffered will be the minimum - // value of this and the listener per_connection_buffer_limit_bytes. - PerRequestBufferLimitBytes *wrapperspb.UInt32Value `protobuf:"bytes,18,opt,name=per_request_buffer_limit_bytes,json=perRequestBufferLimitBytes,proto3" json:"per_request_buffer_limit_bytes,omitempty"` - // Specify a set of default request mirroring policies for every route under this virtual host. - // It takes precedence over the route config mirror policy entirely. - // That is, policies are not merged, the most specific non-empty one becomes the mirror policies. - RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,22,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"` -} - -func (x *VirtualHost) Reset() { - *x = VirtualHost{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VirtualHost) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VirtualHost) ProtoMessage() {} - -func (x *VirtualHost) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VirtualHost.ProtoReflect.Descriptor instead. -func (*VirtualHost) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{0} -} - -func (x *VirtualHost) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *VirtualHost) GetDomains() []string { - if x != nil { - return x.Domains - } - return nil -} - -func (x *VirtualHost) GetRoutes() []*Route { - if x != nil { - return x.Routes - } - return nil -} - -func (x *VirtualHost) GetMatcher() *v3.Matcher { - if x != nil { - return x.Matcher - } - return nil -} - -func (x *VirtualHost) GetRequireTls() VirtualHost_TlsRequirementType { - if x != nil { - return x.RequireTls - } - return VirtualHost_NONE -} - -func (x *VirtualHost) GetVirtualClusters() []*VirtualCluster { - if x != nil { - return x.VirtualClusters - } - return nil -} - -func (x *VirtualHost) GetRateLimits() []*RateLimit { - if x != nil { - return x.RateLimits - } - return nil -} - -func (x *VirtualHost) GetRequestHeadersToAdd() []*v31.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *VirtualHost) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *VirtualHost) GetResponseHeadersToAdd() []*v31.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *VirtualHost) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -// Deprecated: Do not use. -func (x *VirtualHost) GetCors() *CorsPolicy { - if x != nil { - return x.Cors - } - return nil -} - -func (x *VirtualHost) GetTypedPerFilterConfig() map[string]*anypb.Any { - if x != nil { - return x.TypedPerFilterConfig - } - return nil -} - -func (x *VirtualHost) GetIncludeRequestAttemptCount() bool { - if x != nil { - return x.IncludeRequestAttemptCount - } - return false -} - -func (x *VirtualHost) GetIncludeAttemptCountInResponse() bool { - if x != nil { - return x.IncludeAttemptCountInResponse - } - return false -} - -func (x *VirtualHost) GetRetryPolicy() *RetryPolicy { - if x != nil { - return x.RetryPolicy - } - return nil -} - -func (x *VirtualHost) GetRetryPolicyTypedConfig() *anypb.Any { - if x != nil { - return x.RetryPolicyTypedConfig - } - return nil -} - -func (x *VirtualHost) GetHedgePolicy() *HedgePolicy { - if x != nil { - return x.HedgePolicy - } - return nil -} - -func (x *VirtualHost) GetIncludeIsTimeoutRetryHeader() bool { - if x != nil { - return x.IncludeIsTimeoutRetryHeader - } - return false -} - -func (x *VirtualHost) GetPerRequestBufferLimitBytes() *wrapperspb.UInt32Value { - if x != nil { - return x.PerRequestBufferLimitBytes - } - return nil -} - -func (x *VirtualHost) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPolicy { - if x != nil { - return x.RequestMirrorPolicies - } - return nil -} - -// A filter-defined action type. -type FilterAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Action *anypb.Any `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` -} - -func (x *FilterAction) Reset() { - *x = FilterAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilterAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilterAction) ProtoMessage() {} - -func (x *FilterAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilterAction.ProtoReflect.Descriptor instead. -func (*FilterAction) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{1} -} - -func (x *FilterAction) GetAction() *anypb.Any { - if x != nil { - return x.Action - } - return nil -} - -// This can be used in route matcher :ref:`VirtualHost.matcher `. -// When the matcher matches, routes will be matched and run. -type RouteList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of routes that will be matched and run, in order. The first route that matches will be used. - Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"` -} - -func (x *RouteList) Reset() { - *x = RouteList{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteList) ProtoMessage() {} - -func (x *RouteList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteList.ProtoReflect.Descriptor instead. -func (*RouteList) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{2} -} - -func (x *RouteList) GetRoutes() []*Route { - if x != nil { - return x.Routes - } - return nil -} - -// A route is both a specification of how to match a request as well as an indication of what to do -// next (e.g., redirect, forward, rewrite, etc.). -// -// .. attention:: -// -// Envoy supports routing on HTTP method via :ref:`header matching -// `. -// -// [#next-free-field: 20] -type Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name for the route. - Name string `protobuf:"bytes,14,opt,name=name,proto3" json:"name,omitempty"` - // Route matching parameters. - Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // Types that are assignable to Action: - // - // *Route_Route - // *Route_Redirect - // *Route_DirectResponse - // *Route_FilterAction - // *Route_NonForwardingAction - Action isRoute_Action `protobuf_oneof:"action"` - // The Metadata field can be used to provide additional information - // about the route. It can be used for configuration, stats, and logging. - // The metadata should go under the filter namespace that will need it. - // For instance, if the metadata is intended for the Router filter, - // the filter name should be specified as “envoy.filters.http.router“. - Metadata *v31.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Decorator for the matched route. - Decorator *Decorator `protobuf:"bytes,5,opt,name=decorator,proto3" json:"decorator,omitempty"` - // The per_filter_config field can be used to provide route-specific configurations for filters. - // The key should match the :ref:`filter config name - // `. - // The canonical filter name (e.g., “envoy.filters.http.buffer“ for the HTTP buffer filter) can also - // be used for the backwards compatibility. If there is no entry referred by the filter config name, the - // entry referred by the canonical filter name will be provided to the filters as fallback. - // - // Use of this field is filter specific; - // see the :ref:`HTTP filter documentation ` for if and how it is utilized. - // [#comment: An entry's value may be wrapped in a - // :ref:`FilterConfig` - // message to specify additional options.] - TypedPerFilterConfig map[string]*anypb.Any `protobuf:"bytes,13,rep,name=typed_per_filter_config,json=typedPerFilterConfig,proto3" json:"typed_per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Specifies a set of headers that will be added to requests matching this - // route. Headers specified at this level are applied before headers from the - // enclosing :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` and - // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,9,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each request - // matching this route. - RequestHeadersToRemove []string `protobuf:"bytes,12,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // Specifies a set of headers that will be added to responses to requests - // matching this route. Headers specified at this level are applied before - // headers from the enclosing :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` and - // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on - // :ref:`custom request headers `. - ResponseHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,10,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each response - // to requests matching this route. - ResponseHeadersToRemove []string `protobuf:"bytes,11,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` - // Presence of the object defines whether the connection manager's tracing configuration - // is overridden by this route specific instance. - Tracing *Tracing `protobuf:"bytes,15,opt,name=tracing,proto3" json:"tracing,omitempty"` - // The maximum bytes which will be buffered for retries and shadowing. - // If set, the bytes actually buffered will be the minimum value of this and the - // listener per_connection_buffer_limit_bytes. - PerRequestBufferLimitBytes *wrapperspb.UInt32Value `protobuf:"bytes,16,opt,name=per_request_buffer_limit_bytes,json=perRequestBufferLimitBytes,proto3" json:"per_request_buffer_limit_bytes,omitempty"` - // The human readable prefix to use when emitting statistics for this endpoint. - // The statistics are rooted at vhost..route.. - // This should be set for highly critical - // endpoints that one wishes to get “per-route” statistics on. - // If not set, endpoint statistics are not generated. - // - // The emitted statistics are the same as those documented for :ref:`virtual clusters `. - // - // .. warning:: - // - // We do not recommend setting up a stat prefix for - // every application endpoint. This is both not easily maintainable and - // statistics use a non-trivial amount of memory(approximately 1KiB per route). - StatPrefix string `protobuf:"bytes,19,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` -} - -func (x *Route) Reset() { - *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Route) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Route) ProtoMessage() {} - -func (x *Route) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Route.ProtoReflect.Descriptor instead. -func (*Route) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{3} -} - -func (x *Route) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Route) GetMatch() *RouteMatch { - if x != nil { - return x.Match - } - return nil -} - -func (m *Route) GetAction() isRoute_Action { - if m != nil { - return m.Action - } - return nil -} - -func (x *Route) GetRoute() *RouteAction { - if x, ok := x.GetAction().(*Route_Route); ok { - return x.Route - } - return nil -} - -func (x *Route) GetRedirect() *RedirectAction { - if x, ok := x.GetAction().(*Route_Redirect); ok { - return x.Redirect - } - return nil -} - -func (x *Route) GetDirectResponse() *DirectResponseAction { - if x, ok := x.GetAction().(*Route_DirectResponse); ok { - return x.DirectResponse - } - return nil -} - -func (x *Route) GetFilterAction() *FilterAction { - if x, ok := x.GetAction().(*Route_FilterAction); ok { - return x.FilterAction - } - return nil -} - -func (x *Route) GetNonForwardingAction() *NonForwardingAction { - if x, ok := x.GetAction().(*Route_NonForwardingAction); ok { - return x.NonForwardingAction - } - return nil -} - -func (x *Route) GetMetadata() *v31.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Route) GetDecorator() *Decorator { - if x != nil { - return x.Decorator - } - return nil -} - -func (x *Route) GetTypedPerFilterConfig() map[string]*anypb.Any { - if x != nil { - return x.TypedPerFilterConfig - } - return nil -} - -func (x *Route) GetRequestHeadersToAdd() []*v31.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *Route) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *Route) GetResponseHeadersToAdd() []*v31.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *Route) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -func (x *Route) GetTracing() *Tracing { - if x != nil { - return x.Tracing - } - return nil -} - -func (x *Route) GetPerRequestBufferLimitBytes() *wrapperspb.UInt32Value { - if x != nil { - return x.PerRequestBufferLimitBytes - } - return nil -} - -func (x *Route) GetStatPrefix() string { - if x != nil { - return x.StatPrefix - } - return "" -} - -type isRoute_Action interface { - isRoute_Action() -} - -type Route_Route struct { - // Route request to some upstream cluster. - Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3,oneof"` -} - -type Route_Redirect struct { - // Return a redirect. - Redirect *RedirectAction `protobuf:"bytes,3,opt,name=redirect,proto3,oneof"` -} - -type Route_DirectResponse struct { - // Return an arbitrary HTTP response directly, without proxying. - DirectResponse *DirectResponseAction `protobuf:"bytes,7,opt,name=direct_response,json=directResponse,proto3,oneof"` -} - -type Route_FilterAction struct { - // [#not-implemented-hide:] - // A filter-defined action (e.g., it could dynamically generate the RouteAction). - // [#comment: TODO(samflattery): Remove cleanup in route_fuzz_test.cc when - // implemented] - FilterAction *FilterAction `protobuf:"bytes,17,opt,name=filter_action,json=filterAction,proto3,oneof"` -} - -type Route_NonForwardingAction struct { - // [#not-implemented-hide:] - // An action used when the route will generate a response directly, - // without forwarding to an upstream host. This will be used in non-proxy - // xDS clients like the gRPC server. It could also be used in the future - // in Envoy for a filter that directly generates responses for requests. - NonForwardingAction *NonForwardingAction `protobuf:"bytes,18,opt,name=non_forwarding_action,json=nonForwardingAction,proto3,oneof"` -} - -func (*Route_Route) isRoute_Action() {} - -func (*Route_Redirect) isRoute_Action() {} - -func (*Route_DirectResponse) isRoute_Action() {} - -func (*Route_FilterAction) isRoute_Action() {} - -func (*Route_NonForwardingAction) isRoute_Action() {} - -// Compared to the :ref:`cluster ` field that specifies a -// single upstream cluster as the target of a request, the :ref:`weighted_clusters -// ` option allows for specification of -// multiple upstream clusters along with weights that indicate the percentage of -// traffic to be forwarded to each cluster. The router selects an upstream cluster based on the -// weights. -type WeightedCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies one or more upstream clusters associated with the route. - Clusters []*WeightedCluster_ClusterWeight `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` - // Specifies the total weight across all clusters. The sum of all cluster weights must equal this - // value, if this is greater than 0. - // This field is now deprecated, and the client will use the sum of all - // cluster weights. It is up to the management server to supply the correct weights. - // - // Deprecated: Do not use. - TotalWeight *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=total_weight,json=totalWeight,proto3" json:"total_weight,omitempty"` - // Specifies the runtime key prefix that should be used to construct the - // runtime keys associated with each cluster. When the “runtime_key_prefix“ is - // specified, the router will look for weights associated with each upstream - // cluster under the key “runtime_key_prefix“ + “.“ + “cluster[i].name“ where - // “cluster[i]“ denotes an entry in the clusters array field. If the runtime - // key for the cluster does not exist, the value specified in the - // configuration file will be used as the default weight. See the :ref:`runtime documentation - // ` for how key names map to the underlying implementation. - RuntimeKeyPrefix string `protobuf:"bytes,2,opt,name=runtime_key_prefix,json=runtimeKeyPrefix,proto3" json:"runtime_key_prefix,omitempty"` - // Types that are assignable to RandomValueSpecifier: - // - // *WeightedCluster_HeaderName - RandomValueSpecifier isWeightedCluster_RandomValueSpecifier `protobuf_oneof:"random_value_specifier"` -} - -func (x *WeightedCluster) Reset() { - *x = WeightedCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WeightedCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WeightedCluster) ProtoMessage() {} - -func (x *WeightedCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WeightedCluster.ProtoReflect.Descriptor instead. -func (*WeightedCluster) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{4} -} - -func (x *WeightedCluster) GetClusters() []*WeightedCluster_ClusterWeight { - if x != nil { - return x.Clusters - } - return nil -} - -// Deprecated: Do not use. -func (x *WeightedCluster) GetTotalWeight() *wrapperspb.UInt32Value { - if x != nil { - return x.TotalWeight - } - return nil -} - -func (x *WeightedCluster) GetRuntimeKeyPrefix() string { - if x != nil { - return x.RuntimeKeyPrefix - } - return "" -} - -func (m *WeightedCluster) GetRandomValueSpecifier() isWeightedCluster_RandomValueSpecifier { - if m != nil { - return m.RandomValueSpecifier - } - return nil -} - -func (x *WeightedCluster) GetHeaderName() string { - if x, ok := x.GetRandomValueSpecifier().(*WeightedCluster_HeaderName); ok { - return x.HeaderName - } - return "" -} - -type isWeightedCluster_RandomValueSpecifier interface { - isWeightedCluster_RandomValueSpecifier() -} - -type WeightedCluster_HeaderName struct { - // Specifies the header name that is used to look up the random value passed in the request header. - // This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic. - // If header is not present or invalid, Envoy will fall back to use the internally generated random value. - // This header is expected to be single-valued header as we only want to have one selected value throughout - // the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX. - HeaderName string `protobuf:"bytes,4,opt,name=header_name,json=headerName,proto3,oneof"` -} - -func (*WeightedCluster_HeaderName) isWeightedCluster_RandomValueSpecifier() {} - -// Configuration for a cluster specifier plugin. -type ClusterSpecifierPlugin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the plugin and its opaque configuration. - Extension *v31.TypedExtensionConfig `protobuf:"bytes,1,opt,name=extension,proto3" json:"extension,omitempty"` - // If is_optional is not set or is set to false and the plugin defined by this message is not a - // supported type, the containing resource is NACKed. If is_optional is set to true, the resource - // would not be NACKed for this reason. In this case, routes referencing this plugin's name would - // not be treated as an illegal configuration, but would result in a failure if the route is - // selected. - IsOptional bool `protobuf:"varint,2,opt,name=is_optional,json=isOptional,proto3" json:"is_optional,omitempty"` -} - -func (x *ClusterSpecifierPlugin) Reset() { - *x = ClusterSpecifierPlugin{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterSpecifierPlugin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterSpecifierPlugin) ProtoMessage() {} - -func (x *ClusterSpecifierPlugin) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterSpecifierPlugin.ProtoReflect.Descriptor instead. -func (*ClusterSpecifierPlugin) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{5} -} - -func (x *ClusterSpecifierPlugin) GetExtension() *v31.TypedExtensionConfig { - if x != nil { - return x.Extension - } - return nil -} - -func (x *ClusterSpecifierPlugin) GetIsOptional() bool { - if x != nil { - return x.IsOptional - } - return false -} - -// [#next-free-field: 16] -type RouteMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to PathSpecifier: - // - // *RouteMatch_Prefix - // *RouteMatch_Path - // *RouteMatch_SafeRegex - // *RouteMatch_ConnectMatcher_ - // *RouteMatch_PathSeparatedPrefix - // *RouteMatch_PathMatchPolicy - PathSpecifier isRouteMatch_PathSpecifier `protobuf_oneof:"path_specifier"` - // Indicates that prefix/path matching should be case sensitive. The default - // is true. Ignored for safe_regex matching. - CaseSensitive *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=case_sensitive,json=caseSensitive,proto3" json:"case_sensitive,omitempty"` - // Indicates that the route should additionally match on a runtime key. Every time the route - // is considered for a match, it must also fall under the percentage of matches indicated by - // this field. For some fraction N/D, a random number in the range [0,D) is selected. If the - // number is <= the value of the numerator N, or if the key is not present, the default - // value, the router continues to evaluate the remaining match criteria. A runtime_fraction - // route configuration can be used to roll out route changes in a gradual manner without full - // code/config deploys. Refer to the :ref:`traffic shifting - // ` docs for additional documentation. - // - // .. note:: - // - // Parsing this field is implemented such that the runtime key's data may be represented - // as a FractionalPercent proto represented as JSON/YAML and may also be represented as an - // integer with the assumption that the value is an integral percentage out of 100. For - // instance, a runtime key lookup returning the value "42" would parse as a FractionalPercent - // whose numerator is 42 and denominator is HUNDRED. This preserves legacy semantics. - RuntimeFraction *v31.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` - // Specifies a set of headers that the route should match on. The router will - // check the request’s headers against all the specified headers in the route - // config. A match will happen if all the headers in the route are present in - // the request with the same values (or based on presence if the value field - // is not in the config). - Headers []*HeaderMatcher `protobuf:"bytes,6,rep,name=headers,proto3" json:"headers,omitempty"` - // Specifies a set of URL query parameters on which the route should - // match. The router will check the query string from the “path“ header - // against all the specified query parameters. If the number of specified - // query parameters is nonzero, they all must match the “path“ header's - // query string for a match to occur. - // - // .. note:: - // - // If query parameters are used to pass request message fields when - // `grpc_json_transcoder `_ - // is used, the transcoded message fields maybe different. The query parameters are - // url encoded, but the message fields are not. For example, if a query - // parameter is "foo%20bar", the message field will be "foo bar". - QueryParameters []*QueryParameterMatcher `protobuf:"bytes,7,rep,name=query_parameters,json=queryParameters,proto3" json:"query_parameters,omitempty"` - // If specified, only gRPC requests will be matched. The router will check - // that the content-type header has a application/grpc or one of the various - // application/grpc+ values. - Grpc *RouteMatch_GrpcRouteMatchOptions `protobuf:"bytes,8,opt,name=grpc,proto3" json:"grpc,omitempty"` - // If specified, the client tls context will be matched against the defined - // match options. - // - // [#next-major-version: unify with RBAC] - TlsContext *RouteMatch_TlsContextMatchOptions `protobuf:"bytes,11,opt,name=tls_context,json=tlsContext,proto3" json:"tls_context,omitempty"` - // Specifies a set of dynamic metadata matchers on which the route should match. - // The router will check the dynamic metadata against all the specified dynamic metadata matchers. - // If the number of specified dynamic metadata matchers is nonzero, they all must match the - // dynamic metadata for a match to occur. - DynamicMetadata []*v32.MetadataMatcher `protobuf:"bytes,13,rep,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` -} - -func (x *RouteMatch) Reset() { - *x = RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch) ProtoMessage() {} - -func (x *RouteMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead. -func (*RouteMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{6} -} - -func (m *RouteMatch) GetPathSpecifier() isRouteMatch_PathSpecifier { - if m != nil { - return m.PathSpecifier - } - return nil -} - -func (x *RouteMatch) GetPrefix() string { - if x, ok := x.GetPathSpecifier().(*RouteMatch_Prefix); ok { - return x.Prefix - } - return "" -} - -func (x *RouteMatch) GetPath() string { - if x, ok := x.GetPathSpecifier().(*RouteMatch_Path); ok { - return x.Path - } - return "" -} - -func (x *RouteMatch) GetSafeRegex() *v32.RegexMatcher { - if x, ok := x.GetPathSpecifier().(*RouteMatch_SafeRegex); ok { - return x.SafeRegex - } - return nil -} - -func (x *RouteMatch) GetConnectMatcher() *RouteMatch_ConnectMatcher { - if x, ok := x.GetPathSpecifier().(*RouteMatch_ConnectMatcher_); ok { - return x.ConnectMatcher - } - return nil -} - -func (x *RouteMatch) GetPathSeparatedPrefix() string { - if x, ok := x.GetPathSpecifier().(*RouteMatch_PathSeparatedPrefix); ok { - return x.PathSeparatedPrefix - } - return "" -} - -func (x *RouteMatch) GetPathMatchPolicy() *v31.TypedExtensionConfig { - if x, ok := x.GetPathSpecifier().(*RouteMatch_PathMatchPolicy); ok { - return x.PathMatchPolicy - } - return nil -} - -func (x *RouteMatch) GetCaseSensitive() *wrapperspb.BoolValue { - if x != nil { - return x.CaseSensitive - } - return nil -} - -func (x *RouteMatch) GetRuntimeFraction() *v31.RuntimeFractionalPercent { - if x != nil { - return x.RuntimeFraction - } - return nil -} - -func (x *RouteMatch) GetHeaders() []*HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -func (x *RouteMatch) GetQueryParameters() []*QueryParameterMatcher { - if x != nil { - return x.QueryParameters - } - return nil -} - -func (x *RouteMatch) GetGrpc() *RouteMatch_GrpcRouteMatchOptions { - if x != nil { - return x.Grpc - } - return nil -} - -func (x *RouteMatch) GetTlsContext() *RouteMatch_TlsContextMatchOptions { - if x != nil { - return x.TlsContext - } - return nil -} - -func (x *RouteMatch) GetDynamicMetadata() []*v32.MetadataMatcher { - if x != nil { - return x.DynamicMetadata - } - return nil -} - -type isRouteMatch_PathSpecifier interface { - isRouteMatch_PathSpecifier() -} - -type RouteMatch_Prefix struct { - // If specified, the route is a prefix rule meaning that the prefix must - // match the beginning of the “:path“ header. - Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3,oneof"` -} - -type RouteMatch_Path struct { - // If specified, the route is an exact path rule meaning that the path must - // exactly match the “:path“ header once the query string is removed. - Path string `protobuf:"bytes,2,opt,name=path,proto3,oneof"` -} - -type RouteMatch_SafeRegex struct { - // If specified, the route is a regular expression rule meaning that the - // regex must match the “:path“ header once the query string is removed. The entire path - // (without the query string) must match the regex. The rule will not match if only a - // subsequence of the “:path“ header matches the regex. - // - // [#next-major-version: In the v3 API we should redo how path specification works such - // that we utilize StringMatcher, and additionally have consistent options around whether we - // strip query strings, do a case sensitive match, etc. In the interim it will be too disruptive - // to deprecate the existing options. We should even consider whether we want to do away with - // path_specifier entirely and just rely on a set of header matchers which can already match - // on :path, etc. The issue with that is it is unclear how to generically deal with query string - // stripping. This needs more thought.] - SafeRegex *v32.RegexMatcher `protobuf:"bytes,10,opt,name=safe_regex,json=safeRegex,proto3,oneof"` -} - -type RouteMatch_ConnectMatcher_ struct { - // If this is used as the matcher, the matcher will only match CONNECT requests. - // Note that this will not match HTTP/2 upgrade-style CONNECT requests - // (WebSocket and the like) as they are normalized in Envoy as HTTP/1.1 style - // upgrades. - // This is the only way to match CONNECT requests for HTTP/1.1. For HTTP/2, - // where Extended CONNECT requests may have a path, the path matchers will work if - // there is a path present. - // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment: TODO(htuch): Replace the above comment with an alpha tag.] - ConnectMatcher *RouteMatch_ConnectMatcher `protobuf:"bytes,12,opt,name=connect_matcher,json=connectMatcher,proto3,oneof"` -} - -type RouteMatch_PathSeparatedPrefix struct { - // If specified, the route is a path-separated prefix rule meaning that the - // “:path“ header (without the query string) must either exactly match the - // “path_separated_prefix“ or have it as a prefix, followed by “/“ - // - // For example, “/api/dev“ would match - // “/api/dev“, “/api/dev/“, “/api/dev/v1“, and “/api/dev?param=true“ - // but would not match “/api/developer“ - // - // Expect the value to not contain “?“ or “#“ and not to end in “/“ - PathSeparatedPrefix string `protobuf:"bytes,14,opt,name=path_separated_prefix,json=pathSeparatedPrefix,proto3,oneof"` -} - -type RouteMatch_PathMatchPolicy struct { - // [#extension-category: envoy.path.match] - PathMatchPolicy *v31.TypedExtensionConfig `protobuf:"bytes,15,opt,name=path_match_policy,json=pathMatchPolicy,proto3,oneof"` -} - -func (*RouteMatch_Prefix) isRouteMatch_PathSpecifier() {} - -func (*RouteMatch_Path) isRouteMatch_PathSpecifier() {} - -func (*RouteMatch_SafeRegex) isRouteMatch_PathSpecifier() {} - -func (*RouteMatch_ConnectMatcher_) isRouteMatch_PathSpecifier() {} - -func (*RouteMatch_PathSeparatedPrefix) isRouteMatch_PathSpecifier() {} - -func (*RouteMatch_PathMatchPolicy) isRouteMatch_PathSpecifier() {} - -// Cors policy configuration. -// -// .. attention:: -// -// This message has been deprecated. Please use -// :ref:`CorsPolicy in filter extension ` -// as as alternative. -// -// [#next-free-field: 13] -type CorsPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies string patterns that match allowed origins. An origin is allowed if any of the - // string matchers match. - AllowOriginStringMatch []*v32.StringMatcher `protobuf:"bytes,11,rep,name=allow_origin_string_match,json=allowOriginStringMatch,proto3" json:"allow_origin_string_match,omitempty"` - // Specifies the content for the “access-control-allow-methods“ header. - AllowMethods string `protobuf:"bytes,2,opt,name=allow_methods,json=allowMethods,proto3" json:"allow_methods,omitempty"` - // Specifies the content for the “access-control-allow-headers“ header. - AllowHeaders string `protobuf:"bytes,3,opt,name=allow_headers,json=allowHeaders,proto3" json:"allow_headers,omitempty"` - // Specifies the content for the “access-control-expose-headers“ header. - ExposeHeaders string `protobuf:"bytes,4,opt,name=expose_headers,json=exposeHeaders,proto3" json:"expose_headers,omitempty"` - // Specifies the content for the “access-control-max-age“ header. - MaxAge string `protobuf:"bytes,5,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` - // Specifies whether the resource allows credentials. - AllowCredentials *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"` - // Types that are assignable to EnabledSpecifier: - // - // *CorsPolicy_FilterEnabled - EnabledSpecifier isCorsPolicy_EnabledSpecifier `protobuf_oneof:"enabled_specifier"` - // Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not - // enforced. - // - // This field is intended to be used when “filter_enabled“ and “enabled“ are off. One of those - // fields have to explicitly disable the filter in order for this setting to take effect. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - // and track the request's “Origin“ to determine if it's valid but will not enforce any policies. - ShadowEnabled *v31.RuntimeFractionalPercent `protobuf:"bytes,10,opt,name=shadow_enabled,json=shadowEnabled,proto3" json:"shadow_enabled,omitempty"` - // Specify whether allow requests whose target server's IP address is more private than that from - // which the request initiator was fetched. - // - // More details refer to https://developer.chrome.com/blog/private-network-access-preflight. - AllowPrivateNetworkAccess *wrapperspb.BoolValue `protobuf:"bytes,12,opt,name=allow_private_network_access,json=allowPrivateNetworkAccess,proto3" json:"allow_private_network_access,omitempty"` -} - -func (x *CorsPolicy) Reset() { - *x = CorsPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CorsPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CorsPolicy) ProtoMessage() {} - -func (x *CorsPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CorsPolicy.ProtoReflect.Descriptor instead. -func (*CorsPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{7} -} - -func (x *CorsPolicy) GetAllowOriginStringMatch() []*v32.StringMatcher { - if x != nil { - return x.AllowOriginStringMatch - } - return nil -} - -func (x *CorsPolicy) GetAllowMethods() string { - if x != nil { - return x.AllowMethods - } - return "" -} - -func (x *CorsPolicy) GetAllowHeaders() string { - if x != nil { - return x.AllowHeaders - } - return "" -} - -func (x *CorsPolicy) GetExposeHeaders() string { - if x != nil { - return x.ExposeHeaders - } - return "" -} - -func (x *CorsPolicy) GetMaxAge() string { - if x != nil { - return x.MaxAge - } - return "" -} - -func (x *CorsPolicy) GetAllowCredentials() *wrapperspb.BoolValue { - if x != nil { - return x.AllowCredentials - } - return nil -} - -func (m *CorsPolicy) GetEnabledSpecifier() isCorsPolicy_EnabledSpecifier { - if m != nil { - return m.EnabledSpecifier - } - return nil -} - -func (x *CorsPolicy) GetFilterEnabled() *v31.RuntimeFractionalPercent { - if x, ok := x.GetEnabledSpecifier().(*CorsPolicy_FilterEnabled); ok { - return x.FilterEnabled - } - return nil -} - -func (x *CorsPolicy) GetShadowEnabled() *v31.RuntimeFractionalPercent { - if x != nil { - return x.ShadowEnabled - } - return nil -} - -func (x *CorsPolicy) GetAllowPrivateNetworkAccess() *wrapperspb.BoolValue { - if x != nil { - return x.AllowPrivateNetworkAccess - } - return nil -} - -type isCorsPolicy_EnabledSpecifier interface { - isCorsPolicy_EnabledSpecifier() -} - -type CorsPolicy_FilterEnabled struct { - // Specifies the % of requests for which the CORS filter is enabled. - // - // If neither “enabled“, “filter_enabled“, nor “shadow_enabled“ are specified, the CORS - // filter will be enabled for 100% of the requests. - // - // If :ref:`runtime_key ` is - // specified, Envoy will lookup the runtime key to get the percentage of requests to filter. - FilterEnabled *v31.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=filter_enabled,json=filterEnabled,proto3,oneof"` -} - -func (*CorsPolicy_FilterEnabled) isCorsPolicy_EnabledSpecifier() {} - -// [#next-free-field: 42] -type RouteAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ClusterSpecifier: - // - // *RouteAction_Cluster - // *RouteAction_ClusterHeader - // *RouteAction_WeightedClusters - // *RouteAction_ClusterSpecifierPlugin - // *RouteAction_InlineClusterSpecifierPlugin - ClusterSpecifier isRouteAction_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` - // The HTTP status code to use when configured cluster is not found. - // The default response code is 503 Service Unavailable. - ClusterNotFoundResponseCode RouteAction_ClusterNotFoundResponseCode `protobuf:"varint,20,opt,name=cluster_not_found_response_code,json=clusterNotFoundResponseCode,proto3,enum=envoy.config.route.v3.RouteAction_ClusterNotFoundResponseCode" json:"cluster_not_found_response_code,omitempty"` - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints - // in the upstream cluster with metadata matching what's set in this field will be considered - // for load balancing. If using :ref:`weighted_clusters - // `, metadata will be merged, with values - // provided there taking precedence. The filter name should be specified as “envoy.lb“. - MetadataMatch *v31.Metadata `protobuf:"bytes,4,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` - // Indicates that during forwarding, the matched prefix (or path) should be - // swapped with this value. This option allows application URLs to be rooted - // at a different path from those exposed at the reverse proxy layer. The router filter will - // place the original path before rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of :ref:`regex_rewrite ` - // :ref:`path_rewrite_policy `, - // or :ref:`prefix_rewrite ` may be specified. - // - // .. attention:: - // - // Pay careful attention to the use of trailing slashes in the - // :ref:`route's match ` prefix value. - // Stripping a prefix from a path requires multiple Routes to handle all cases. For example, - // rewriting ``/prefix`` to ``/`` and ``/prefix/etc`` to ``/etc`` cannot be done in a single - // :ref:`Route `, as shown by the below config entries: - // - // .. code-block:: yaml - // - // - match: - // prefix: "/prefix/" - // route: - // prefix_rewrite: "/" - // - match: - // prefix: "/prefix" - // route: - // prefix_rewrite: "/" - // - // Having above entries in the config, requests to ``/prefix`` will be stripped to ``/``, while - // requests to ``/prefix/etc`` will be stripped to ``/etc``. - PrefixRewrite string `protobuf:"bytes,5,opt,name=prefix_rewrite,json=prefixRewrite,proto3" json:"prefix_rewrite,omitempty"` - // Indicates that during forwarding, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. The router filter will place the original path as it was - // before the rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of :ref:`regex_rewrite `, - // :ref:`prefix_rewrite `, or - // :ref:`path_rewrite_policy `] - // may be specified. - // - // Examples using Google's `RE2 `_ engine: - // - // - The path pattern “^/service/([^/]+)(/.*)$“ paired with a substitution - // string of “\2/instance/\1“ would transform “/service/foo/v1/api“ - // into “/v1/api/instance/foo“. - // - // - The pattern “one“ paired with a substitution string of “two“ would - // transform “/xxx/one/yyy/one/zzz“ into “/xxx/two/yyy/two/zzz“. - // - // - The pattern “^(.*?)one(.*)$“ paired with a substitution string of - // “\1two\2“ would replace only the first occurrence of “one“, - // transforming path “/xxx/one/yyy/one/zzz“ into “/xxx/two/yyy/one/zzz“. - // - // - The pattern “(?i)/xxx/“ paired with a substitution string of “/yyy/“ - // would do a case-insensitive match and transform path “/aaa/XxX/bbb“ to - // “/aaa/yyy/bbb“. - RegexRewrite *v32.RegexMatchAndSubstitute `protobuf:"bytes,32,opt,name=regex_rewrite,json=regexRewrite,proto3" json:"regex_rewrite,omitempty"` - // [#extension-category: envoy.path.rewrite] - PathRewritePolicy *v31.TypedExtensionConfig `protobuf:"bytes,41,opt,name=path_rewrite_policy,json=pathRewritePolicy,proto3" json:"path_rewrite_policy,omitempty"` - // Types that are assignable to HostRewriteSpecifier: - // - // *RouteAction_HostRewriteLiteral - // *RouteAction_AutoHostRewrite - // *RouteAction_HostRewriteHeader - // *RouteAction_HostRewritePathRegex - HostRewriteSpecifier isRouteAction_HostRewriteSpecifier `protobuf_oneof:"host_rewrite_specifier"` - // If set, then a host rewrite action (one of - // :ref:`host_rewrite_literal `, - // :ref:`auto_host_rewrite `, - // :ref:`host_rewrite_header `, or - // :ref:`host_rewrite_path_regex `) - // causes the original value of the host header, if any, to be appended to the - // :ref:`config_http_conn_man_headers_x-forwarded-host` HTTP header if it is different to the last value appended. - // This can be disabled by setting the runtime guard `envoy_reloadable_features_append_xfh_idempotent` to false. - AppendXForwardedHost bool `protobuf:"varint,38,opt,name=append_x_forwarded_host,json=appendXForwardedHost,proto3" json:"append_x_forwarded_host,omitempty"` - // Specifies the upstream timeout for the route. If not specified, the default is 15s. This - // spans between the point at which the entire downstream request (i.e. end-of-stream) has been - // processed and when the upstream response has been completely processed. A value of 0 will - // disable the route's timeout. - // - // .. note:: - // - // This timeout includes all retries. See also - // :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the - // :ref:`retry overview `. - Timeout *durationpb.Duration `protobuf:"bytes,8,opt,name=timeout,proto3" json:"timeout,omitempty"` - // Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout, - // although the connection manager wide :ref:`stream_idle_timeout - // ` - // will still apply. A value of 0 will completely disable the route's idle timeout, even if a - // connection manager stream idle timeout is configured. - // - // The idle timeout is distinct to :ref:`timeout - // `, which provides an upper bound - // on the upstream response time; :ref:`idle_timeout - // ` instead bounds the amount - // of time the request's stream may be idle. - // - // After header decoding, the idle timeout will apply on downstream and - // upstream request events. Each time an encode/decode event for headers or - // data is processed for the stream, the timer will be reset. If the timeout - // fires, the stream is terminated with a 408 Request Timeout error code if no - // upstream response header has been received, otherwise a stream reset - // occurs. - // - // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" - // is configured, this timeout is scaled according to the value for - // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. - IdleTimeout *durationpb.Duration `protobuf:"bytes,24,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` - // Specifies how to send request over TLS early data. - // If absent, allows `safe HTTP requests `_ to be sent on early data. - // [#extension-category: envoy.route.early_data_policy] - EarlyDataPolicy *v31.TypedExtensionConfig `protobuf:"bytes,40,opt,name=early_data_policy,json=earlyDataPolicy,proto3" json:"early_data_policy,omitempty"` - // Indicates that the route has a retry policy. Note that if this is set, - // it'll take precedence over the virtual host level retry policy entirely - // (e.g.: policies are not merged, most internal one becomes the enforced policy). - RetryPolicy *RetryPolicy `protobuf:"bytes,9,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that if this is set, it'll take - // precedence over the virtual host level retry policy entirely (e.g.: policies are not merged, - // most internal one becomes the enforced policy). :ref:`Retry policy ` - // should not be set if this field is used. - RetryPolicyTypedConfig *anypb.Any `protobuf:"bytes,33,opt,name=retry_policy_typed_config,json=retryPolicyTypedConfig,proto3" json:"retry_policy_typed_config,omitempty"` - // Specify a set of route request mirroring policies. - // It takes precedence over the virtual host and route config mirror policy entirely. - // That is, policies are not merged, the most specific non-empty one becomes the mirror policies. - RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,30,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"` - // Optionally specifies the :ref:`routing priority `. - Priority v31.RoutingPriority `protobuf:"varint,11,opt,name=priority,proto3,enum=envoy.config.core.v3.RoutingPriority" json:"priority,omitempty"` - // Specifies a set of rate limit configurations that could be applied to the - // route. - RateLimits []*RateLimit `protobuf:"bytes,13,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` - // Specifies if the rate limit filter should include the virtual host rate - // limits. By default, if the route configured rate limits, the virtual host - // :ref:`rate_limits ` are not applied to the - // request. - // - // This field is deprecated. Please use :ref:`vh_rate_limits ` - // - // Deprecated: Do not use. - IncludeVhRateLimits *wrapperspb.BoolValue `protobuf:"bytes,14,opt,name=include_vh_rate_limits,json=includeVhRateLimits,proto3" json:"include_vh_rate_limits,omitempty"` - // Specifies a list of hash policies to use for ring hash load balancing. Each - // hash policy is evaluated individually and the combined result is used to - // route the request. The method of combination is deterministic such that - // identical lists of hash policies will produce the same hash. Since a hash - // policy examines specific parts of a request, it can fail to produce a hash - // (i.e. if the hashed header is not present). If (and only if) all configured - // hash policies fail to generate a hash, no hash will be produced for - // the route. In this case, the behavior is the same as if no hash policies - // were specified (i.e. the ring hash load balancer will choose a random - // backend). If a hash policy has the "terminal" attribute set to true, and - // there is already a hash generated, the hash is returned immediately, - // ignoring the rest of the hash policy list. - HashPolicy []*RouteAction_HashPolicy `protobuf:"bytes,15,rep,name=hash_policy,json=hashPolicy,proto3" json:"hash_policy,omitempty"` - // Indicates that the route has a CORS policy. This field is ignored if related cors policy is - // found in the :ref:`Route.typed_per_filter_config` or - // :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config`. - // - // .. attention:: - // - // This option has been deprecated. Please use - // :ref:`Route.typed_per_filter_config` or - // :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config` - // to configure the CORS HTTP filter. - // - // Deprecated: Do not use. - Cors *CorsPolicy `protobuf:"bytes,17,opt,name=cors,proto3" json:"cors,omitempty"` - // Deprecated by :ref:`grpc_timeout_header_max ` - // If present, and the request is a gRPC request, use the - // `grpc-timeout header `_, - // or its default value (infinity) instead of - // :ref:`timeout `, but limit the applied timeout - // to the maximum value specified here. If configured as 0, the maximum allowed timeout for - // gRPC requests is infinity. If not configured at all, the “grpc-timeout“ header is not used - // and gRPC requests time out like any other requests using - // :ref:`timeout ` or its default. - // This can be used to prevent unexpected upstream request timeouts due to potentially long - // time gaps between gRPC request and response in gRPC streaming mode. - // - // .. note:: - // - // If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes - // precedence over `grpc-timeout header `_, when - // both are present. See also - // :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the - // :ref:`retry overview `. - // - // Deprecated: Do not use. - MaxGrpcTimeout *durationpb.Duration `protobuf:"bytes,23,opt,name=max_grpc_timeout,json=maxGrpcTimeout,proto3" json:"max_grpc_timeout,omitempty"` - // Deprecated by :ref:`grpc_timeout_header_offset `. - // If present, Envoy will adjust the timeout provided by the “grpc-timeout“ header by subtracting - // the provided duration from the header. This is useful in allowing Envoy to set its global - // timeout to be less than that of the deadline imposed by the calling client, which makes it more - // likely that Envoy will handle the timeout instead of having the call canceled by the client. - // The offset will only be applied if the provided grpc_timeout is greater than the offset. This - // ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning - // infinity). - // - // Deprecated: Do not use. - GrpcTimeoutOffset *durationpb.Duration `protobuf:"bytes,28,opt,name=grpc_timeout_offset,json=grpcTimeoutOffset,proto3" json:"grpc_timeout_offset,omitempty"` - UpgradeConfigs []*RouteAction_UpgradeConfig `protobuf:"bytes,25,rep,name=upgrade_configs,json=upgradeConfigs,proto3" json:"upgrade_configs,omitempty"` - // If present, Envoy will try to follow an upstream redirect response instead of proxying the - // response back to the downstream. An upstream redirect response is defined - // by :ref:`redirect_response_codes - // `. - InternalRedirectPolicy *InternalRedirectPolicy `protobuf:"bytes,34,opt,name=internal_redirect_policy,json=internalRedirectPolicy,proto3" json:"internal_redirect_policy,omitempty"` - // Deprecated: Do not use. - InternalRedirectAction RouteAction_InternalRedirectAction `protobuf:"varint,26,opt,name=internal_redirect_action,json=internalRedirectAction,proto3,enum=envoy.config.route.v3.RouteAction_InternalRedirectAction" json:"internal_redirect_action,omitempty"` - // An internal redirect is handled, iff the number of previous internal redirects that a - // downstream request has encountered is lower than this value, and - // :ref:`internal_redirect_action ` - // is set to :ref:`HANDLE_INTERNAL_REDIRECT - // ` - // In the case where a downstream request is bounced among multiple routes by internal redirect, - // the first route that hits this threshold, or has - // :ref:`internal_redirect_action ` - // set to - // :ref:`PASS_THROUGH_INTERNAL_REDIRECT - // ` - // will pass the redirect back to downstream. - // - // If not specified, at most one redirect will be followed. - // - // Deprecated: Do not use. - MaxInternalRedirects *wrapperspb.UInt32Value `protobuf:"bytes,31,opt,name=max_internal_redirects,json=maxInternalRedirects,proto3" json:"max_internal_redirects,omitempty"` - // Indicates that the route has a hedge policy. Note that if this is set, - // it'll take precedence over the virtual host level hedge policy entirely - // (e.g.: policies are not merged, most internal one becomes the enforced policy). - HedgePolicy *HedgePolicy `protobuf:"bytes,27,opt,name=hedge_policy,json=hedgePolicy,proto3" json:"hedge_policy,omitempty"` - // Specifies the maximum stream duration for this route. - MaxStreamDuration *RouteAction_MaxStreamDuration `protobuf:"bytes,36,opt,name=max_stream_duration,json=maxStreamDuration,proto3" json:"max_stream_duration,omitempty"` -} - -func (x *RouteAction) Reset() { - *x = RouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction) ProtoMessage() {} - -func (x *RouteAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction.ProtoReflect.Descriptor instead. -func (*RouteAction) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8} -} - -func (m *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier { - if m != nil { - return m.ClusterSpecifier - } - return nil -} - -func (x *RouteAction) GetCluster() string { - if x, ok := x.GetClusterSpecifier().(*RouteAction_Cluster); ok { - return x.Cluster - } - return "" -} - -func (x *RouteAction) GetClusterHeader() string { - if x, ok := x.GetClusterSpecifier().(*RouteAction_ClusterHeader); ok { - return x.ClusterHeader - } - return "" -} - -func (x *RouteAction) GetWeightedClusters() *WeightedCluster { - if x, ok := x.GetClusterSpecifier().(*RouteAction_WeightedClusters); ok { - return x.WeightedClusters - } - return nil -} - -func (x *RouteAction) GetClusterSpecifierPlugin() string { - if x, ok := x.GetClusterSpecifier().(*RouteAction_ClusterSpecifierPlugin); ok { - return x.ClusterSpecifierPlugin - } - return "" -} - -func (x *RouteAction) GetInlineClusterSpecifierPlugin() *ClusterSpecifierPlugin { - if x, ok := x.GetClusterSpecifier().(*RouteAction_InlineClusterSpecifierPlugin); ok { - return x.InlineClusterSpecifierPlugin - } - return nil -} - -func (x *RouteAction) GetClusterNotFoundResponseCode() RouteAction_ClusterNotFoundResponseCode { - if x != nil { - return x.ClusterNotFoundResponseCode - } - return RouteAction_SERVICE_UNAVAILABLE -} - -func (x *RouteAction) GetMetadataMatch() *v31.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -func (x *RouteAction) GetPrefixRewrite() string { - if x != nil { - return x.PrefixRewrite - } - return "" -} - -func (x *RouteAction) GetRegexRewrite() *v32.RegexMatchAndSubstitute { - if x != nil { - return x.RegexRewrite - } - return nil -} - -func (x *RouteAction) GetPathRewritePolicy() *v31.TypedExtensionConfig { - if x != nil { - return x.PathRewritePolicy - } - return nil -} - -func (m *RouteAction) GetHostRewriteSpecifier() isRouteAction_HostRewriteSpecifier { - if m != nil { - return m.HostRewriteSpecifier - } - return nil -} - -func (x *RouteAction) GetHostRewriteLiteral() string { - if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_HostRewriteLiteral); ok { - return x.HostRewriteLiteral - } - return "" -} - -func (x *RouteAction) GetAutoHostRewrite() *wrapperspb.BoolValue { - if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_AutoHostRewrite); ok { - return x.AutoHostRewrite - } - return nil -} - -func (x *RouteAction) GetHostRewriteHeader() string { - if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_HostRewriteHeader); ok { - return x.HostRewriteHeader - } - return "" -} - -func (x *RouteAction) GetHostRewritePathRegex() *v32.RegexMatchAndSubstitute { - if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_HostRewritePathRegex); ok { - return x.HostRewritePathRegex - } - return nil -} - -func (x *RouteAction) GetAppendXForwardedHost() bool { - if x != nil { - return x.AppendXForwardedHost - } - return false -} - -func (x *RouteAction) GetTimeout() *durationpb.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *RouteAction) GetIdleTimeout() *durationpb.Duration { - if x != nil { - return x.IdleTimeout - } - return nil -} - -func (x *RouteAction) GetEarlyDataPolicy() *v31.TypedExtensionConfig { - if x != nil { - return x.EarlyDataPolicy - } - return nil -} - -func (x *RouteAction) GetRetryPolicy() *RetryPolicy { - if x != nil { - return x.RetryPolicy - } - return nil -} - -func (x *RouteAction) GetRetryPolicyTypedConfig() *anypb.Any { - if x != nil { - return x.RetryPolicyTypedConfig - } - return nil -} - -func (x *RouteAction) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPolicy { - if x != nil { - return x.RequestMirrorPolicies - } - return nil -} - -func (x *RouteAction) GetPriority() v31.RoutingPriority { - if x != nil { - return x.Priority - } - return v31.RoutingPriority_DEFAULT -} - -func (x *RouteAction) GetRateLimits() []*RateLimit { - if x != nil { - return x.RateLimits - } - return nil -} - -// Deprecated: Do not use. -func (x *RouteAction) GetIncludeVhRateLimits() *wrapperspb.BoolValue { - if x != nil { - return x.IncludeVhRateLimits - } - return nil -} - -func (x *RouteAction) GetHashPolicy() []*RouteAction_HashPolicy { - if x != nil { - return x.HashPolicy - } - return nil -} - -// Deprecated: Do not use. -func (x *RouteAction) GetCors() *CorsPolicy { - if x != nil { - return x.Cors - } - return nil -} - -// Deprecated: Do not use. -func (x *RouteAction) GetMaxGrpcTimeout() *durationpb.Duration { - if x != nil { - return x.MaxGrpcTimeout - } - return nil -} - -// Deprecated: Do not use. -func (x *RouteAction) GetGrpcTimeoutOffset() *durationpb.Duration { - if x != nil { - return x.GrpcTimeoutOffset - } - return nil -} - -func (x *RouteAction) GetUpgradeConfigs() []*RouteAction_UpgradeConfig { - if x != nil { - return x.UpgradeConfigs - } - return nil -} - -func (x *RouteAction) GetInternalRedirectPolicy() *InternalRedirectPolicy { - if x != nil { - return x.InternalRedirectPolicy - } - return nil -} - -// Deprecated: Do not use. -func (x *RouteAction) GetInternalRedirectAction() RouteAction_InternalRedirectAction { - if x != nil { - return x.InternalRedirectAction - } - return RouteAction_PASS_THROUGH_INTERNAL_REDIRECT -} - -// Deprecated: Do not use. -func (x *RouteAction) GetMaxInternalRedirects() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxInternalRedirects - } - return nil -} - -func (x *RouteAction) GetHedgePolicy() *HedgePolicy { - if x != nil { - return x.HedgePolicy - } - return nil -} - -func (x *RouteAction) GetMaxStreamDuration() *RouteAction_MaxStreamDuration { - if x != nil { - return x.MaxStreamDuration - } - return nil -} - -type isRouteAction_ClusterSpecifier interface { - isRouteAction_ClusterSpecifier() -} - -type RouteAction_Cluster struct { - // Indicates the upstream cluster to which the request should be routed - // to. - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` -} - -type RouteAction_ClusterHeader struct { - // Envoy will determine the cluster to route to by reading the value of the - // HTTP header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist, Envoy will - // return a 404 response. - // - // .. attention:: - // - // Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 - // ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - ClusterHeader string `protobuf:"bytes,2,opt,name=cluster_header,json=clusterHeader,proto3,oneof"` -} - -type RouteAction_WeightedClusters struct { - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. See - // :ref:`traffic splitting ` - // for additional documentation. - WeightedClusters *WeightedCluster `protobuf:"bytes,3,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` -} - -type RouteAction_ClusterSpecifierPlugin struct { - // Name of the cluster specifier plugin to use to determine the cluster for requests on this route. - // The cluster specifier plugin name must be defined in the associated - // :ref:`cluster specifier plugins ` - // in the :ref:`name ` field. - ClusterSpecifierPlugin string `protobuf:"bytes,37,opt,name=cluster_specifier_plugin,json=clusterSpecifierPlugin,proto3,oneof"` -} - -type RouteAction_InlineClusterSpecifierPlugin struct { - // Custom cluster specifier plugin configuration to use to determine the cluster for requests - // on this route. - InlineClusterSpecifierPlugin *ClusterSpecifierPlugin `protobuf:"bytes,39,opt,name=inline_cluster_specifier_plugin,json=inlineClusterSpecifierPlugin,proto3,oneof"` -} - -func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} - -func (*RouteAction_ClusterHeader) isRouteAction_ClusterSpecifier() {} - -func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} - -func (*RouteAction_ClusterSpecifierPlugin) isRouteAction_ClusterSpecifier() {} - -func (*RouteAction_InlineClusterSpecifierPlugin) isRouteAction_ClusterSpecifier() {} - -type isRouteAction_HostRewriteSpecifier interface { - isRouteAction_HostRewriteSpecifier() -} - -type RouteAction_HostRewriteLiteral struct { - // Indicates that during forwarding, the host header will be swapped with - // this value. Using this option will append the - // :ref:`config_http_conn_man_headers_x-forwarded-host` header if - // :ref:`append_x_forwarded_host ` - // is set. - HostRewriteLiteral string `protobuf:"bytes,6,opt,name=host_rewrite_literal,json=hostRewriteLiteral,proto3,oneof"` -} - -type RouteAction_AutoHostRewrite struct { - // Indicates that during forwarding, the host header will be swapped with - // the hostname of the upstream host chosen by the cluster manager. This - // option is applicable only when the destination cluster for a route is of - // type “strict_dns“ or “logical_dns“. Setting this to true with other cluster types - // has no effect. Using this option will append the - // :ref:`config_http_conn_man_headers_x-forwarded-host` header if - // :ref:`append_x_forwarded_host ` - // is set. - AutoHostRewrite *wrapperspb.BoolValue `protobuf:"bytes,7,opt,name=auto_host_rewrite,json=autoHostRewrite,proto3,oneof"` -} - -type RouteAction_HostRewriteHeader struct { - // Indicates that during forwarding, the host header will be swapped with the content of given - // downstream or :ref:`custom ` header. - // If header value is empty, host header is left intact. Using this option will append the - // :ref:`config_http_conn_man_headers_x-forwarded-host` header if - // :ref:`append_x_forwarded_host ` - // is set. - // - // .. attention:: - // - // Pay attention to the potential security implications of using this option. Provided header - // must come from trusted source. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - HostRewriteHeader string `protobuf:"bytes,29,opt,name=host_rewrite_header,json=hostRewriteHeader,proto3,oneof"` -} - -type RouteAction_HostRewritePathRegex struct { - // Indicates that during forwarding, the host header will be swapped with - // the result of the regex substitution executed on path value with query and fragment removed. - // This is useful for transitioning variable content between path segment and subdomain. - // Using this option will append the - // :ref:`config_http_conn_man_headers_x-forwarded-host` header if - // :ref:`append_x_forwarded_host ` - // is set. - // - // For example with the following config: - // - // .. code-block:: yaml - // - // host_rewrite_path_regex: - // pattern: - // google_re2: {} - // regex: "^/(.+)/.+$" - // substitution: \1 - // - // Would rewrite the host header to “envoyproxy.io“ given the path “/envoyproxy.io/some/path“. - HostRewritePathRegex *v32.RegexMatchAndSubstitute `protobuf:"bytes,35,opt,name=host_rewrite_path_regex,json=hostRewritePathRegex,proto3,oneof"` -} - -func (*RouteAction_HostRewriteLiteral) isRouteAction_HostRewriteSpecifier() {} - -func (*RouteAction_AutoHostRewrite) isRouteAction_HostRewriteSpecifier() {} - -func (*RouteAction_HostRewriteHeader) isRouteAction_HostRewriteSpecifier() {} - -func (*RouteAction_HostRewritePathRegex) isRouteAction_HostRewriteSpecifier() {} - -// HTTP retry :ref:`architecture overview `. -// [#next-free-field: 14] -type RetryPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the conditions under which retry takes place. These are the same - // conditions documented for :ref:`config_http_filters_router_x-envoy-retry-on` and - // :ref:`config_http_filters_router_x-envoy-retry-grpc-on`. - RetryOn string `protobuf:"bytes,1,opt,name=retry_on,json=retryOn,proto3" json:"retry_on,omitempty"` - // Specifies the allowed number of retries. This parameter is optional and - // defaults to 1. These are the same conditions documented for - // :ref:`config_http_filters_router_x-envoy-max-retries`. - NumRetries *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=num_retries,json=numRetries,proto3" json:"num_retries,omitempty"` - // Specifies a non-zero upstream timeout per retry attempt (including the initial attempt). This - // parameter is optional. The same conditions documented for - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply. - // - // .. note:: - // - // If left unspecified, Envoy will use the global - // :ref:`route timeout ` for the request. - // Consequently, when using a :ref:`5xx ` based - // retry policy, a request that times out will not be retried as the total timeout budget - // would have been exhausted. - PerTryTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=per_try_timeout,json=perTryTimeout,proto3" json:"per_try_timeout,omitempty"` - // Specifies an upstream idle timeout per retry attempt (including the initial attempt). This - // parameter is optional and if absent there is no per try idle timeout. The semantics of the per - // try idle timeout are similar to the - // :ref:`route idle timeout ` and - // :ref:`stream idle timeout - // ` - // both enforced by the HTTP connection manager. The difference is that this idle timeout - // is enforced by the router for each individual attempt and thus after all previous filters have - // run, as opposed to *before* all previous filters run for the other idle timeouts. This timeout - // is useful in cases in which total request timeout is bounded by a number of retries and a - // :ref:`per_try_timeout `, but - // there is a desire to ensure each try is making incremental progress. Note also that similar - // to :ref:`per_try_timeout `, - // this idle timeout does not start until after both the entire request has been received by the - // router *and* a connection pool connection has been obtained. Unlike - // :ref:`per_try_timeout `, - // the idle timer continues once the response starts streaming back to the downstream client. - // This ensures that response data continues to make progress without using one of the HTTP - // connection manager idle timeouts. - PerTryIdleTimeout *durationpb.Duration `protobuf:"bytes,13,opt,name=per_try_idle_timeout,json=perTryIdleTimeout,proto3" json:"per_try_idle_timeout,omitempty"` - // Specifies an implementation of a RetryPriority which is used to determine the - // distribution of load across priorities used for retries. Refer to - // :ref:`retry plugin configuration ` for more details. - RetryPriority *RetryPolicy_RetryPriority `protobuf:"bytes,4,opt,name=retry_priority,json=retryPriority,proto3" json:"retry_priority,omitempty"` - // Specifies a collection of RetryHostPredicates that will be consulted when selecting a host - // for retries. If any of the predicates reject the host, host selection will be reattempted. - // Refer to :ref:`retry plugin configuration ` for more - // details. - RetryHostPredicate []*RetryPolicy_RetryHostPredicate `protobuf:"bytes,5,rep,name=retry_host_predicate,json=retryHostPredicate,proto3" json:"retry_host_predicate,omitempty"` - // Retry options predicates that will be applied prior to retrying a request. These predicates - // allow customizing request behavior between retries. - // [#comment: add [#extension-category: envoy.retry_options_predicates] when there are built-in extensions] - RetryOptionsPredicates []*v31.TypedExtensionConfig `protobuf:"bytes,12,rep,name=retry_options_predicates,json=retryOptionsPredicates,proto3" json:"retry_options_predicates,omitempty"` - // The maximum number of times host selection will be reattempted before giving up, at which - // point the host that was last selected will be routed to. If unspecified, this will default to - // retrying once. - HostSelectionRetryMaxAttempts int64 `protobuf:"varint,6,opt,name=host_selection_retry_max_attempts,json=hostSelectionRetryMaxAttempts,proto3" json:"host_selection_retry_max_attempts,omitempty"` - // HTTP status codes that should trigger a retry in addition to those specified by retry_on. - RetriableStatusCodes []uint32 `protobuf:"varint,7,rep,packed,name=retriable_status_codes,json=retriableStatusCodes,proto3" json:"retriable_status_codes,omitempty"` - // Specifies parameters that control exponential retry back off. This parameter is optional, in which case the - // default base interval is 25 milliseconds or, if set, the current value of the - // “upstream.base_retry_backoff_ms“ runtime parameter. The default maximum interval is 10 times - // the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` - // describes Envoy's back-off algorithm. - RetryBackOff *RetryPolicy_RetryBackOff `protobuf:"bytes,8,opt,name=retry_back_off,json=retryBackOff,proto3" json:"retry_back_off,omitempty"` - // Specifies parameters that control a retry back-off strategy that is used - // when the request is rate limited by the upstream server. The server may - // return a response header like “Retry-After“ or “X-RateLimit-Reset“ to - // provide feedback to the client on how long to wait before retrying. If - // configured, this back-off strategy will be used instead of the - // default exponential back off strategy (configured using “retry_back_off“) - // whenever a response includes the matching headers. - RateLimitedRetryBackOff *RetryPolicy_RateLimitedRetryBackOff `protobuf:"bytes,11,opt,name=rate_limited_retry_back_off,json=rateLimitedRetryBackOff,proto3" json:"rate_limited_retry_back_off,omitempty"` - // HTTP response headers that trigger a retry if present in the response. A retry will be - // triggered if any of the header matches match the upstream response headers. - // The field is only consulted if 'retriable-headers' retry policy is active. - RetriableHeaders []*HeaderMatcher `protobuf:"bytes,9,rep,name=retriable_headers,json=retriableHeaders,proto3" json:"retriable_headers,omitempty"` - // HTTP headers which must be present in the request for retries to be attempted. - RetriableRequestHeaders []*HeaderMatcher `protobuf:"bytes,10,rep,name=retriable_request_headers,json=retriableRequestHeaders,proto3" json:"retriable_request_headers,omitempty"` -} - -func (x *RetryPolicy) Reset() { - *x = RetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy) ProtoMessage() {} - -func (x *RetryPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead. -func (*RetryPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{9} -} - -func (x *RetryPolicy) GetRetryOn() string { - if x != nil { - return x.RetryOn - } - return "" -} - -func (x *RetryPolicy) GetNumRetries() *wrapperspb.UInt32Value { - if x != nil { - return x.NumRetries - } - return nil -} - -func (x *RetryPolicy) GetPerTryTimeout() *durationpb.Duration { - if x != nil { - return x.PerTryTimeout - } - return nil -} - -func (x *RetryPolicy) GetPerTryIdleTimeout() *durationpb.Duration { - if x != nil { - return x.PerTryIdleTimeout - } - return nil -} - -func (x *RetryPolicy) GetRetryPriority() *RetryPolicy_RetryPriority { - if x != nil { - return x.RetryPriority - } - return nil -} - -func (x *RetryPolicy) GetRetryHostPredicate() []*RetryPolicy_RetryHostPredicate { - if x != nil { - return x.RetryHostPredicate - } - return nil -} - -func (x *RetryPolicy) GetRetryOptionsPredicates() []*v31.TypedExtensionConfig { - if x != nil { - return x.RetryOptionsPredicates - } - return nil -} - -func (x *RetryPolicy) GetHostSelectionRetryMaxAttempts() int64 { - if x != nil { - return x.HostSelectionRetryMaxAttempts - } - return 0 -} - -func (x *RetryPolicy) GetRetriableStatusCodes() []uint32 { - if x != nil { - return x.RetriableStatusCodes - } - return nil -} - -func (x *RetryPolicy) GetRetryBackOff() *RetryPolicy_RetryBackOff { - if x != nil { - return x.RetryBackOff - } - return nil -} - -func (x *RetryPolicy) GetRateLimitedRetryBackOff() *RetryPolicy_RateLimitedRetryBackOff { - if x != nil { - return x.RateLimitedRetryBackOff - } - return nil -} - -func (x *RetryPolicy) GetRetriableHeaders() []*HeaderMatcher { - if x != nil { - return x.RetriableHeaders - } - return nil -} - -func (x *RetryPolicy) GetRetriableRequestHeaders() []*HeaderMatcher { - if x != nil { - return x.RetriableRequestHeaders - } - return nil -} - -// HTTP request hedging :ref:`architecture overview `. -type HedgePolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the number of initial requests that should be sent upstream. - // Must be at least 1. - // Defaults to 1. - // [#not-implemented-hide:] - InitialRequests *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=initial_requests,json=initialRequests,proto3" json:"initial_requests,omitempty"` - // Specifies a probability that an additional upstream request should be sent - // on top of what is specified by initial_requests. - // Defaults to 0. - // [#not-implemented-hide:] - AdditionalRequestChance *v33.FractionalPercent `protobuf:"bytes,2,opt,name=additional_request_chance,json=additionalRequestChance,proto3" json:"additional_request_chance,omitempty"` - // Indicates that a hedged request should be sent when the per-try timeout is hit. - // This means that a retry will be issued without resetting the original request, leaving multiple upstream requests in flight. - // The first request to complete successfully will be the one returned to the caller. - // - // - At any time, a successful response (i.e. not triggering any of the retry-on conditions) would be returned to the client. - // - Before per-try timeout, an error response (per retry-on conditions) would be retried immediately or returned ot the client - // if there are no more retries left. - // - After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress. - // - // Note: For this to have effect, you must have a :ref:`RetryPolicy ` that retries at least - // one error code and specifies a maximum number of retries. - // - // Defaults to false. - HedgeOnPerTryTimeout bool `protobuf:"varint,3,opt,name=hedge_on_per_try_timeout,json=hedgeOnPerTryTimeout,proto3" json:"hedge_on_per_try_timeout,omitempty"` -} - -func (x *HedgePolicy) Reset() { - *x = HedgePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HedgePolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HedgePolicy) ProtoMessage() {} - -func (x *HedgePolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HedgePolicy.ProtoReflect.Descriptor instead. -func (*HedgePolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{10} -} - -func (x *HedgePolicy) GetInitialRequests() *wrapperspb.UInt32Value { - if x != nil { - return x.InitialRequests - } - return nil -} - -func (x *HedgePolicy) GetAdditionalRequestChance() *v33.FractionalPercent { - if x != nil { - return x.AdditionalRequestChance - } - return nil -} - -func (x *HedgePolicy) GetHedgeOnPerTryTimeout() bool { - if x != nil { - return x.HedgeOnPerTryTimeout - } - return false -} - -// [#next-free-field: 10] -type RedirectAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // When the scheme redirection take place, the following rules apply: - // 1. If the source URI scheme is “http“ and the port is explicitly - // set to “:80“, the port will be removed after the redirection - // 2. If the source URI scheme is “https“ and the port is explicitly - // set to “:443“, the port will be removed after the redirection - // - // Types that are assignable to SchemeRewriteSpecifier: - // - // *RedirectAction_HttpsRedirect - // *RedirectAction_SchemeRedirect - SchemeRewriteSpecifier isRedirectAction_SchemeRewriteSpecifier `protobuf_oneof:"scheme_rewrite_specifier"` - // The host portion of the URL will be swapped with this value. - HostRedirect string `protobuf:"bytes,1,opt,name=host_redirect,json=hostRedirect,proto3" json:"host_redirect,omitempty"` - // The port value of the URL will be swapped with this value. - PortRedirect uint32 `protobuf:"varint,8,opt,name=port_redirect,json=portRedirect,proto3" json:"port_redirect,omitempty"` - // Types that are assignable to PathRewriteSpecifier: - // - // *RedirectAction_PathRedirect - // *RedirectAction_PrefixRewrite - // *RedirectAction_RegexRewrite - PathRewriteSpecifier isRedirectAction_PathRewriteSpecifier `protobuf_oneof:"path_rewrite_specifier"` - // The HTTP status code to use in the redirect response. The default response - // code is MOVED_PERMANENTLY (301). - ResponseCode RedirectAction_RedirectResponseCode `protobuf:"varint,3,opt,name=response_code,json=responseCode,proto3,enum=envoy.config.route.v3.RedirectAction_RedirectResponseCode" json:"response_code,omitempty"` - // Indicates that during redirection, the query portion of the URL will - // be removed. Default value is false. - StripQuery bool `protobuf:"varint,6,opt,name=strip_query,json=stripQuery,proto3" json:"strip_query,omitempty"` -} - -func (x *RedirectAction) Reset() { - *x = RedirectAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RedirectAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedirectAction) ProtoMessage() {} - -func (x *RedirectAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RedirectAction.ProtoReflect.Descriptor instead. -func (*RedirectAction) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{11} -} - -func (m *RedirectAction) GetSchemeRewriteSpecifier() isRedirectAction_SchemeRewriteSpecifier { - if m != nil { - return m.SchemeRewriteSpecifier - } - return nil -} - -func (x *RedirectAction) GetHttpsRedirect() bool { - if x, ok := x.GetSchemeRewriteSpecifier().(*RedirectAction_HttpsRedirect); ok { - return x.HttpsRedirect - } - return false -} - -func (x *RedirectAction) GetSchemeRedirect() string { - if x, ok := x.GetSchemeRewriteSpecifier().(*RedirectAction_SchemeRedirect); ok { - return x.SchemeRedirect - } - return "" -} - -func (x *RedirectAction) GetHostRedirect() string { - if x != nil { - return x.HostRedirect - } - return "" -} - -func (x *RedirectAction) GetPortRedirect() uint32 { - if x != nil { - return x.PortRedirect - } - return 0 -} - -func (m *RedirectAction) GetPathRewriteSpecifier() isRedirectAction_PathRewriteSpecifier { - if m != nil { - return m.PathRewriteSpecifier - } - return nil -} - -func (x *RedirectAction) GetPathRedirect() string { - if x, ok := x.GetPathRewriteSpecifier().(*RedirectAction_PathRedirect); ok { - return x.PathRedirect - } - return "" -} - -func (x *RedirectAction) GetPrefixRewrite() string { - if x, ok := x.GetPathRewriteSpecifier().(*RedirectAction_PrefixRewrite); ok { - return x.PrefixRewrite - } - return "" -} - -func (x *RedirectAction) GetRegexRewrite() *v32.RegexMatchAndSubstitute { - if x, ok := x.GetPathRewriteSpecifier().(*RedirectAction_RegexRewrite); ok { - return x.RegexRewrite - } - return nil -} - -func (x *RedirectAction) GetResponseCode() RedirectAction_RedirectResponseCode { - if x != nil { - return x.ResponseCode - } - return RedirectAction_MOVED_PERMANENTLY -} - -func (x *RedirectAction) GetStripQuery() bool { - if x != nil { - return x.StripQuery - } - return false -} - -type isRedirectAction_SchemeRewriteSpecifier interface { - isRedirectAction_SchemeRewriteSpecifier() -} - -type RedirectAction_HttpsRedirect struct { - // The scheme portion of the URL will be swapped with "https". - HttpsRedirect bool `protobuf:"varint,4,opt,name=https_redirect,json=httpsRedirect,proto3,oneof"` -} - -type RedirectAction_SchemeRedirect struct { - // The scheme portion of the URL will be swapped with this value. - SchemeRedirect string `protobuf:"bytes,7,opt,name=scheme_redirect,json=schemeRedirect,proto3,oneof"` -} - -func (*RedirectAction_HttpsRedirect) isRedirectAction_SchemeRewriteSpecifier() {} - -func (*RedirectAction_SchemeRedirect) isRedirectAction_SchemeRewriteSpecifier() {} - -type isRedirectAction_PathRewriteSpecifier interface { - isRedirectAction_PathRewriteSpecifier() -} - -type RedirectAction_PathRedirect struct { - // The path portion of the URL will be swapped with this value. - // Please note that query string in path_redirect will override the - // request's query string and will not be stripped. - // - // For example, let's say we have the following routes: - // - // - match: { path: "/old-path-1" } - // redirect: { path_redirect: "/new-path-1" } - // - match: { path: "/old-path-2" } - // redirect: { path_redirect: "/new-path-2", strip-query: "true" } - // - match: { path: "/old-path-3" } - // redirect: { path_redirect: "/new-path-3?foo=1", strip_query: "true" } - // - // 1. if request uri is "/old-path-1?bar=1", users will be redirected to "/new-path-1?bar=1" - // 2. if request uri is "/old-path-2?bar=1", users will be redirected to "/new-path-2" - // 3. if request uri is "/old-path-3?bar=1", users will be redirected to "/new-path-3?foo=1" - PathRedirect string `protobuf:"bytes,2,opt,name=path_redirect,json=pathRedirect,proto3,oneof"` -} - -type RedirectAction_PrefixRewrite struct { - // Indicates that during redirection, the matched prefix (or path) - // should be swapped with this value. This option allows redirect URLs be dynamically created - // based on the request. - // - // .. attention:: - // - // Pay attention to the use of trailing slashes as mentioned in - // :ref:`RouteAction's prefix_rewrite `. - PrefixRewrite string `protobuf:"bytes,5,opt,name=prefix_rewrite,json=prefixRewrite,proto3,oneof"` -} - -type RedirectAction_RegexRewrite struct { - // Indicates that during redirect, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. - // - // Examples using Google's `RE2 `_ engine: - // - // - The path pattern “^/service/([^/]+)(/.*)$“ paired with a substitution - // string of “\2/instance/\1“ would transform “/service/foo/v1/api“ - // into “/v1/api/instance/foo“. - // - // - The pattern “one“ paired with a substitution string of “two“ would - // transform “/xxx/one/yyy/one/zzz“ into “/xxx/two/yyy/two/zzz“. - // - // - The pattern “^(.*?)one(.*)$“ paired with a substitution string of - // “\1two\2“ would replace only the first occurrence of “one“, - // transforming path “/xxx/one/yyy/one/zzz“ into “/xxx/two/yyy/one/zzz“. - // - // - The pattern “(?i)/xxx/“ paired with a substitution string of “/yyy/“ - // would do a case-insensitive match and transform path “/aaa/XxX/bbb“ to - // “/aaa/yyy/bbb“. - RegexRewrite *v32.RegexMatchAndSubstitute `protobuf:"bytes,9,opt,name=regex_rewrite,json=regexRewrite,proto3,oneof"` -} - -func (*RedirectAction_PathRedirect) isRedirectAction_PathRewriteSpecifier() {} - -func (*RedirectAction_PrefixRewrite) isRedirectAction_PathRewriteSpecifier() {} - -func (*RedirectAction_RegexRewrite) isRedirectAction_PathRewriteSpecifier() {} - -type DirectResponseAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the HTTP response status to be returned. - Status uint32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` - // Specifies the content of the response body. If this setting is omitted, - // no body is included in the generated response. - // - // .. note:: - // - // Headers can be specified using ``response_headers_to_add`` in the enclosing - // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` or - // :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`. - Body *v31.DataSource `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` -} - -func (x *DirectResponseAction) Reset() { - *x = DirectResponseAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DirectResponseAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DirectResponseAction) ProtoMessage() {} - -func (x *DirectResponseAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DirectResponseAction.ProtoReflect.Descriptor instead. -func (*DirectResponseAction) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{12} -} - -func (x *DirectResponseAction) GetStatus() uint32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *DirectResponseAction) GetBody() *v31.DataSource { - if x != nil { - return x.Body - } - return nil -} - -// [#not-implemented-hide:] -type NonForwardingAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *NonForwardingAction) Reset() { - *x = NonForwardingAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NonForwardingAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NonForwardingAction) ProtoMessage() {} - -func (x *NonForwardingAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NonForwardingAction.ProtoReflect.Descriptor instead. -func (*NonForwardingAction) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{13} -} - -type Decorator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The operation name associated with the request matched to this route. If tracing is - // enabled, this information will be used as the span name reported for this request. - // - // .. note:: - // - // For ingress (inbound) requests, or egress (outbound) responses, this value may be overridden - // by the :ref:`x-envoy-decorator-operation - // ` header. - Operation string `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` - // Whether the decorated details should be propagated to the other party. The default is true. - Propagate *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=propagate,proto3" json:"propagate,omitempty"` -} - -func (x *Decorator) Reset() { - *x = Decorator{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Decorator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Decorator) ProtoMessage() {} - -func (x *Decorator) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Decorator.ProtoReflect.Descriptor instead. -func (*Decorator) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{14} -} - -func (x *Decorator) GetOperation() string { - if x != nil { - return x.Operation - } - return "" -} - -func (x *Decorator) GetPropagate() *wrapperspb.BoolValue { - if x != nil { - return x.Propagate - } - return nil -} - -type Tracing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Target percentage of requests managed by this HTTP connection manager that will be force - // traced if the :ref:`x-client-trace-id ` - // header is set. This field is a direct analog for the runtime variable - // 'tracing.client_enabled' in the :ref:`HTTP Connection Manager - // `. - // Default: 100% - ClientSampling *v33.FractionalPercent `protobuf:"bytes,1,opt,name=client_sampling,json=clientSampling,proto3" json:"client_sampling,omitempty"` - // Target percentage of requests managed by this HTTP connection manager that will be randomly - // selected for trace generation, if not requested by the client or not forced. This field is - // a direct analog for the runtime variable 'tracing.random_sampling' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - RandomSampling *v33.FractionalPercent `protobuf:"bytes,2,opt,name=random_sampling,json=randomSampling,proto3" json:"random_sampling,omitempty"` - // Target percentage of requests managed by this HTTP connection manager that will be traced - // after all other sampling checks have been applied (client-directed, force tracing, random - // sampling). This field functions as an upper limit on the total configured sampling rate. For - // instance, setting client_sampling to 100% but overall_sampling to 1% will result in only 1% - // of client requests with the appropriate headers to be force traced. This field is a direct - // analog for the runtime variable 'tracing.global_enabled' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - OverallSampling *v33.FractionalPercent `protobuf:"bytes,3,opt,name=overall_sampling,json=overallSampling,proto3" json:"overall_sampling,omitempty"` - // A list of custom tags with unique tag name to create tags for the active span. - // It will take effect after merging with the :ref:`corresponding configuration - // ` - // configured in the HTTP connection manager. If two tags with the same name are configured - // each in the HTTP connection manager and the route level, the one configured here takes - // priority. - CustomTags []*v34.CustomTag `protobuf:"bytes,4,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty"` -} - -func (x *Tracing) Reset() { - *x = Tracing{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tracing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tracing) ProtoMessage() {} - -func (x *Tracing) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tracing.ProtoReflect.Descriptor instead. -func (*Tracing) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{15} -} - -func (x *Tracing) GetClientSampling() *v33.FractionalPercent { - if x != nil { - return x.ClientSampling - } - return nil -} - -func (x *Tracing) GetRandomSampling() *v33.FractionalPercent { - if x != nil { - return x.RandomSampling - } - return nil -} - -func (x *Tracing) GetOverallSampling() *v33.FractionalPercent { - if x != nil { - return x.OverallSampling - } - return nil -} - -func (x *Tracing) GetCustomTags() []*v34.CustomTag { - if x != nil { - return x.CustomTags - } - return nil -} - -// A virtual cluster is a way of specifying a regex matching rule against -// certain important endpoints such that statistics are generated explicitly for -// the matched requests. The reason this is useful is that when doing -// prefix/path matching Envoy does not always know what the application -// considers to be an endpoint. Thus, it’s impossible for Envoy to generically -// emit per endpoint statistics. However, often systems have highly critical -// endpoints that they wish to get “perfect” statistics on. Virtual cluster -// statistics are perfect in the sense that they are emitted on the downstream -// side such that they include network level failures. -// -// Documentation for :ref:`virtual cluster statistics `. -// -// .. note:: -// -// Virtual clusters are a useful tool, but we do not recommend setting up a virtual cluster for -// every application endpoint. This is both not easily maintainable and as well the matching and -// statistics output are not free. -type VirtualCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies a list of header matchers to use for matching requests. Each specified header must - // match. The pseudo-headers “:path“ and “:method“ can be used to match the request path and - // method, respectively. - Headers []*HeaderMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"` - // Specifies the name of the virtual cluster. The virtual cluster name as well - // as the virtual host name are used when emitting statistics. The statistics are emitted by the - // router filter and are documented :ref:`here `. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *VirtualCluster) Reset() { - *x = VirtualCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VirtualCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VirtualCluster) ProtoMessage() {} - -func (x *VirtualCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VirtualCluster.ProtoReflect.Descriptor instead. -func (*VirtualCluster) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{16} -} - -func (x *VirtualCluster) GetHeaders() []*HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -func (x *VirtualCluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Global rate limiting :ref:`architecture overview `. -// Also applies to Local rate limiting :ref:`using descriptors `. -type RateLimit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Refers to the stage set in the filter. The rate limit configuration only - // applies to filters with the same stage number. The default stage number is - // 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - Stage *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=stage,proto3" json:"stage,omitempty"` - // The key to be set in runtime to disable this rate limit configuration. - DisableKey string `protobuf:"bytes,2,opt,name=disable_key,json=disableKey,proto3" json:"disable_key,omitempty"` - // A list of actions that are to be applied for this rate limit configuration. - // Order matters as the actions are processed sequentially and the descriptor - // is composed by appending descriptor entries in that sequence. If an action - // cannot append a descriptor entry, no descriptor is generated for the - // configuration. See :ref:`composing actions - // ` for additional documentation. - Actions []*RateLimit_Action `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"` - // An optional limit override to be appended to the descriptor produced by this - // rate limit configuration. If the override value is invalid or cannot be resolved - // from metadata, no override is provided. See :ref:`rate limit override - // ` for more information. - Limit *RateLimit_Override `protobuf:"bytes,4,opt,name=limit,proto3" json:"limit,omitempty"` -} - -func (x *RateLimit) Reset() { - *x = RateLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit) ProtoMessage() {} - -func (x *RateLimit) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit.ProtoReflect.Descriptor instead. -func (*RateLimit) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17} -} - -func (x *RateLimit) GetStage() *wrapperspb.UInt32Value { - if x != nil { - return x.Stage - } - return nil -} - -func (x *RateLimit) GetDisableKey() string { - if x != nil { - return x.DisableKey - } - return "" -} - -func (x *RateLimit) GetActions() []*RateLimit_Action { - if x != nil { - return x.Actions - } - return nil -} - -func (x *RateLimit) GetLimit() *RateLimit_Override { - if x != nil { - return x.Limit - } - return nil -} - -// .. attention:: -// -// Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 ``Host`` -// header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. -// -// .. attention:: -// -// To route on HTTP method, use the special HTTP/2 ``:method`` header. This works for both -// HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g., -// -// .. code-block:: json -// -// { -// "name": ":method", -// "string_match": { -// "exact": "POST" -// } -// } -// -// .. attention:: -// -// In the absence of any header match specifier, match will default to :ref:`present_match -// `. i.e, a request that has the :ref:`name -// ` header will match, regardless of the header's -// value. -// -// [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] -// -// [#next-free-field: 15] -type HeaderMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the name of the header in the request. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Specifies how the header match will be performed to route the request. - // - // Types that are assignable to HeaderMatchSpecifier: - // - // *HeaderMatcher_ExactMatch - // *HeaderMatcher_SafeRegexMatch - // *HeaderMatcher_RangeMatch - // *HeaderMatcher_PresentMatch - // *HeaderMatcher_PrefixMatch - // *HeaderMatcher_SuffixMatch - // *HeaderMatcher_ContainsMatch - // *HeaderMatcher_StringMatch - HeaderMatchSpecifier isHeaderMatcher_HeaderMatchSpecifier `protobuf_oneof:"header_match_specifier"` - // If specified, the match result will be inverted before checking. Defaults to false. - // - // Examples: - // - // * The regex “\d{3}“ does not match the value “1234“, so it will match when inverted. - // * The range [-10,0) will match the value -1, so it will not match when inverted. - InvertMatch bool `protobuf:"varint,8,opt,name=invert_match,json=invertMatch,proto3" json:"invert_match,omitempty"` - // If specified, for any header match rule, if the header match rule specified header - // does not exist, this header value will be treated as empty. Defaults to false. - // - // Examples: - // - // - The header match rule specified header "header1" to range match of [0, 10], - // :ref:`invert_match ` - // is set to true and :ref:`treat_missing_header_as_empty ` - // is set to true; The "header1" header is not present. The match rule will - // treat the "header1" as an empty header. The empty header does not match the range, - // so it will match when inverted. - // - The header match rule specified header "header2" to range match of [0, 10], - // :ref:`invert_match ` - // is set to true and :ref:`treat_missing_header_as_empty ` - // is set to false; The "header2" header is not present and the header - // matcher rule for "header2" will be ignored so it will not match. - // - The header match rule specified header "header3" to a string regex match - // “^$“ which means an empty string, and - // :ref:`treat_missing_header_as_empty ` - // is set to true; The "header3" header is not present. - // The match rule will treat the "header3" header as an empty header so it will match. - // - The header match rule specified header "header4" to a string regex match - // “^$“ which means an empty string, and - // :ref:`treat_missing_header_as_empty ` - // is set to false; The "header4" header is not present. - // The match rule for "header4" will be ignored so it will not match. - TreatMissingHeaderAsEmpty bool `protobuf:"varint,14,opt,name=treat_missing_header_as_empty,json=treatMissingHeaderAsEmpty,proto3" json:"treat_missing_header_as_empty,omitempty"` -} - -func (x *HeaderMatcher) Reset() { - *x = HeaderMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderMatcher) ProtoMessage() {} - -func (x *HeaderMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderMatcher.ProtoReflect.Descriptor instead. -func (*HeaderMatcher) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{18} -} - -func (x *HeaderMatcher) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *HeaderMatcher) GetHeaderMatchSpecifier() isHeaderMatcher_HeaderMatchSpecifier { - if m != nil { - return m.HeaderMatchSpecifier - } - return nil -} - -// Deprecated: Do not use. -func (x *HeaderMatcher) GetExactMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_ExactMatch); ok { - return x.ExactMatch - } - return "" -} - -// Deprecated: Do not use. -func (x *HeaderMatcher) GetSafeRegexMatch() *v32.RegexMatcher { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_SafeRegexMatch); ok { - return x.SafeRegexMatch - } - return nil -} - -func (x *HeaderMatcher) GetRangeMatch() *v33.Int64Range { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_RangeMatch); ok { - return x.RangeMatch - } - return nil -} - -func (x *HeaderMatcher) GetPresentMatch() bool { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_PresentMatch); ok { - return x.PresentMatch - } - return false -} - -// Deprecated: Do not use. -func (x *HeaderMatcher) GetPrefixMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_PrefixMatch); ok { - return x.PrefixMatch - } - return "" -} - -// Deprecated: Do not use. -func (x *HeaderMatcher) GetSuffixMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_SuffixMatch); ok { - return x.SuffixMatch - } - return "" -} - -// Deprecated: Do not use. -func (x *HeaderMatcher) GetContainsMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_ContainsMatch); ok { - return x.ContainsMatch - } - return "" -} - -func (x *HeaderMatcher) GetStringMatch() *v32.StringMatcher { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_StringMatch); ok { - return x.StringMatch - } - return nil -} - -func (x *HeaderMatcher) GetInvertMatch() bool { - if x != nil { - return x.InvertMatch - } - return false -} - -func (x *HeaderMatcher) GetTreatMissingHeaderAsEmpty() bool { - if x != nil { - return x.TreatMissingHeaderAsEmpty - } - return false -} - -type isHeaderMatcher_HeaderMatchSpecifier interface { - isHeaderMatcher_HeaderMatchSpecifier() -} - -type HeaderMatcher_ExactMatch struct { - // If specified, header match will be performed based on the value of the header. - // This field is deprecated. Please use :ref:`string_match `. - // - // Deprecated: Do not use. - ExactMatch string `protobuf:"bytes,4,opt,name=exact_match,json=exactMatch,proto3,oneof"` -} - -type HeaderMatcher_SafeRegexMatch struct { - // If specified, this regex string is a regular expression rule which implies the entire request - // header value must match the regex. The rule will not match if only a subsequence of the - // request header value matches the regex. - // This field is deprecated. Please use :ref:`string_match `. - // - // Deprecated: Do not use. - SafeRegexMatch *v32.RegexMatcher `protobuf:"bytes,11,opt,name=safe_regex_match,json=safeRegexMatch,proto3,oneof"` -} - -type HeaderMatcher_RangeMatch struct { - // If specified, header match will be performed based on range. - // The rule will match if the request header value is within this range. - // The entire request header value must represent an integer in base 10 notation: consisting of - // an optional plus or minus sign followed by a sequence of digits. The rule will not match if - // the header value does not represent an integer. Match will fail for empty values, floating - // point numbers or if only a subsequence of the header value is an integer. - // - // Examples: - // - // - For range [-10,0), route will match for header value -1, but not for 0, “somestring“, 10.9, - // “-1somestring“ - RangeMatch *v33.Int64Range `protobuf:"bytes,6,opt,name=range_match,json=rangeMatch,proto3,oneof"` -} - -type HeaderMatcher_PresentMatch struct { - // If specified as true, header match will be performed based on whether the header is in the - // request. If specified as false, header match will be performed based on whether the header is absent. - PresentMatch bool `protobuf:"varint,7,opt,name=present_match,json=presentMatch,proto3,oneof"` -} - -type HeaderMatcher_PrefixMatch struct { - // If specified, header match will be performed based on the prefix of the header value. - // Note: empty prefix is not allowed, please use present_match instead. - // This field is deprecated. Please use :ref:`string_match `. - // - // Examples: - // - // * The prefix “abcd“ matches the value “abcdxyz“, but not for “abcxyz“. - // - // Deprecated: Do not use. - PrefixMatch string `protobuf:"bytes,9,opt,name=prefix_match,json=prefixMatch,proto3,oneof"` -} - -type HeaderMatcher_SuffixMatch struct { - // If specified, header match will be performed based on the suffix of the header value. - // Note: empty suffix is not allowed, please use present_match instead. - // This field is deprecated. Please use :ref:`string_match `. - // - // Examples: - // - // * The suffix “abcd“ matches the value “xyzabcd“, but not for “xyzbcd“. - // - // Deprecated: Do not use. - SuffixMatch string `protobuf:"bytes,10,opt,name=suffix_match,json=suffixMatch,proto3,oneof"` -} - -type HeaderMatcher_ContainsMatch struct { - // If specified, header match will be performed based on whether the header value contains - // the given value or not. - // Note: empty contains match is not allowed, please use present_match instead. - // This field is deprecated. Please use :ref:`string_match `. - // - // Examples: - // - // * The value “abcd“ matches the value “xyzabcdpqr“, but not for “xyzbcdpqr“. - // - // Deprecated: Do not use. - ContainsMatch string `protobuf:"bytes,12,opt,name=contains_match,json=containsMatch,proto3,oneof"` -} - -type HeaderMatcher_StringMatch struct { - // If specified, header match will be performed based on the string match of the header value. - StringMatch *v32.StringMatcher `protobuf:"bytes,13,opt,name=string_match,json=stringMatch,proto3,oneof"` -} - -func (*HeaderMatcher_ExactMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_SafeRegexMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_RangeMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_PresentMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_PrefixMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_SuffixMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_ContainsMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_StringMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -// Query parameter matching treats the query string of a request's :path header -// as an ampersand-separated list of keys and/or key=value elements. -// [#next-free-field: 7] -type QueryParameterMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the name of a key that must be present in the requested - // “path“'s query string. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to QueryParameterMatchSpecifier: - // - // *QueryParameterMatcher_StringMatch - // *QueryParameterMatcher_PresentMatch - QueryParameterMatchSpecifier isQueryParameterMatcher_QueryParameterMatchSpecifier `protobuf_oneof:"query_parameter_match_specifier"` -} - -func (x *QueryParameterMatcher) Reset() { - *x = QueryParameterMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParameterMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParameterMatcher) ProtoMessage() {} - -func (x *QueryParameterMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QueryParameterMatcher.ProtoReflect.Descriptor instead. -func (*QueryParameterMatcher) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{19} -} - -func (x *QueryParameterMatcher) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *QueryParameterMatcher) GetQueryParameterMatchSpecifier() isQueryParameterMatcher_QueryParameterMatchSpecifier { - if m != nil { - return m.QueryParameterMatchSpecifier - } - return nil -} - -func (x *QueryParameterMatcher) GetStringMatch() *v32.StringMatcher { - if x, ok := x.GetQueryParameterMatchSpecifier().(*QueryParameterMatcher_StringMatch); ok { - return x.StringMatch - } - return nil -} - -func (x *QueryParameterMatcher) GetPresentMatch() bool { - if x, ok := x.GetQueryParameterMatchSpecifier().(*QueryParameterMatcher_PresentMatch); ok { - return x.PresentMatch - } - return false -} - -type isQueryParameterMatcher_QueryParameterMatchSpecifier interface { - isQueryParameterMatcher_QueryParameterMatchSpecifier() -} - -type QueryParameterMatcher_StringMatch struct { - // Specifies whether a query parameter value should match against a string. - StringMatch *v32.StringMatcher `protobuf:"bytes,5,opt,name=string_match,json=stringMatch,proto3,oneof"` -} - -type QueryParameterMatcher_PresentMatch struct { - // Specifies whether a query parameter should be present. - PresentMatch bool `protobuf:"varint,6,opt,name=present_match,json=presentMatch,proto3,oneof"` -} - -func (*QueryParameterMatcher_StringMatch) isQueryParameterMatcher_QueryParameterMatchSpecifier() {} - -func (*QueryParameterMatcher_PresentMatch) isQueryParameterMatcher_QueryParameterMatchSpecifier() {} - -// HTTP Internal Redirect :ref:`architecture overview `. -type InternalRedirectPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // An internal redirect is not handled, unless the number of previous internal redirects that a - // downstream request has encountered is lower than this value. - // In the case where a downstream request is bounced among multiple routes by internal redirect, - // the first route that hits this threshold, or does not set :ref:`internal_redirect_policy - // ` - // will pass the redirect back to downstream. - // - // If not specified, at most one redirect will be followed. - MaxInternalRedirects *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=max_internal_redirects,json=maxInternalRedirects,proto3" json:"max_internal_redirects,omitempty"` - // Defines what upstream response codes are allowed to trigger internal redirect. If unspecified, - // only 302 will be treated as internal redirect. - // Only 301, 302, 303, 307 and 308 are valid values. Any other codes will be ignored. - RedirectResponseCodes []uint32 `protobuf:"varint,2,rep,packed,name=redirect_response_codes,json=redirectResponseCodes,proto3" json:"redirect_response_codes,omitempty"` - // Specifies a list of predicates that are queried when an upstream response is deemed - // to trigger an internal redirect by all other criteria. Any predicate in the list can reject - // the redirect, causing the response to be proxied to downstream. - // [#extension-category: envoy.internal_redirect_predicates] - Predicates []*v31.TypedExtensionConfig `protobuf:"bytes,3,rep,name=predicates,proto3" json:"predicates,omitempty"` - // Allow internal redirect to follow a target URI with a different scheme than the value of - // x-forwarded-proto. The default is false. - AllowCrossSchemeRedirect bool `protobuf:"varint,4,opt,name=allow_cross_scheme_redirect,json=allowCrossSchemeRedirect,proto3" json:"allow_cross_scheme_redirect,omitempty"` -} - -func (x *InternalRedirectPolicy) Reset() { - *x = InternalRedirectPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InternalRedirectPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InternalRedirectPolicy) ProtoMessage() {} - -func (x *InternalRedirectPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InternalRedirectPolicy.ProtoReflect.Descriptor instead. -func (*InternalRedirectPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{20} -} - -func (x *InternalRedirectPolicy) GetMaxInternalRedirects() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxInternalRedirects - } - return nil -} - -func (x *InternalRedirectPolicy) GetRedirectResponseCodes() []uint32 { - if x != nil { - return x.RedirectResponseCodes - } - return nil -} - -func (x *InternalRedirectPolicy) GetPredicates() []*v31.TypedExtensionConfig { - if x != nil { - return x.Predicates - } - return nil -} - -func (x *InternalRedirectPolicy) GetAllowCrossSchemeRedirect() bool { - if x != nil { - return x.AllowCrossSchemeRedirect - } - return false -} - -// A simple wrapper for an HTTP filter config. This is intended to be used as a wrapper for the -// map value in -// :ref:`VirtualHost.typed_per_filter_config`, -// :ref:`Route.typed_per_filter_config`, -// or :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config` -// to add additional flags to the filter. -type FilterConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The filter config. - Config *anypb.Any `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - // If true, the filter is optional, meaning that if the client does - // not support the specified filter, it may ignore the map entry rather - // than rejecting the config. - IsOptional bool `protobuf:"varint,2,opt,name=is_optional,json=isOptional,proto3" json:"is_optional,omitempty"` - // If true, the filter is disabled in the route or virtual host and the “config“ field is ignored. - // - // .. note:: - // - // This field will take effect when the request arrive and filter chain is created for the request. - // If initial route is selected for the request and a filter is disabled in the initial route, then - // the filter will not be added to the filter chain. - // And if the request is mutated later and re-match to another route, the disabled filter by the - // initial route will not be added back to the filter chain because the filter chain is already - // created and it is too late to change the chain. - // - // This field only make sense for the downstream HTTP filters for now. - Disabled bool `protobuf:"varint,3,opt,name=disabled,proto3" json:"disabled,omitempty"` -} - -func (x *FilterConfig) Reset() { - *x = FilterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilterConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilterConfig) ProtoMessage() {} - -func (x *FilterConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilterConfig.ProtoReflect.Descriptor instead. -func (*FilterConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{21} -} - -func (x *FilterConfig) GetConfig() *anypb.Any { - if x != nil { - return x.Config - } - return nil -} - -func (x *FilterConfig) GetIsOptional() bool { - if x != nil { - return x.IsOptional - } - return false -} - -func (x *FilterConfig) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -// [#next-free-field: 13] -type WeightedCluster_ClusterWeight struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Only one of “name“ and “cluster_header“ may be specified. - // [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}] - // Name of the upstream cluster. The cluster must exist in the - // :ref:`cluster manager configuration `. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Only one of “name“ and “cluster_header“ may be specified. - // [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }] - // Envoy will determine the cluster to route to by reading the value of the - // HTTP header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist, Envoy will - // return a 404 response. - // - // .. attention:: - // - // Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 - // ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - ClusterHeader string `protobuf:"bytes,12,opt,name=cluster_header,json=clusterHeader,proto3" json:"cluster_header,omitempty"` - // The weight of the cluster. This value is relative to the other clusters' - // weights. When a request matches the route, the choice of an upstream cluster - // is determined by its weight. The sum of weights across all - // entries in the clusters array must be greater than 0, and must not exceed - // uint32_t maximal value (4294967295). - Weight *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field will be considered for - // load balancing. Note that this will be merged with what's provided in - // :ref:`RouteAction.metadata_match `, with - // values here taking precedence. The filter name should be specified as “envoy.lb“. - MetadataMatch *v31.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` - // Specifies a list of headers to be added to requests when this cluster is selected - // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and - // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,4,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each request when - // this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. - RequestHeadersToRemove []string `protobuf:"bytes,9,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // Specifies a list of headers to be added to responses when this cluster is selected - // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and - // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,5,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` - // Specifies a list of headers to be removed from responses when this cluster is selected - // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. - ResponseHeadersToRemove []string `protobuf:"bytes,6,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` - // The per_filter_config field can be used to provide weighted cluster-specific configurations - // for filters. - // The key should match the :ref:`filter config name - // `. - // The canonical filter name (e.g., “envoy.filters.http.buffer“ for the HTTP buffer filter) can also - // be used for the backwards compatibility. If there is no entry referred by the filter config name, the - // entry referred by the canonical filter name will be provided to the filters as fallback. - // - // Use of this field is filter specific; - // see the :ref:`HTTP filter documentation ` for if and how it is utilized. - // [#comment: An entry's value may be wrapped in a - // :ref:`FilterConfig` - // message to specify additional options.] - TypedPerFilterConfig map[string]*anypb.Any `protobuf:"bytes,10,rep,name=typed_per_filter_config,json=typedPerFilterConfig,proto3" json:"typed_per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Types that are assignable to HostRewriteSpecifier: - // - // *WeightedCluster_ClusterWeight_HostRewriteLiteral - HostRewriteSpecifier isWeightedCluster_ClusterWeight_HostRewriteSpecifier `protobuf_oneof:"host_rewrite_specifier"` -} - -func (x *WeightedCluster_ClusterWeight) Reset() { - *x = WeightedCluster_ClusterWeight{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WeightedCluster_ClusterWeight) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WeightedCluster_ClusterWeight) ProtoMessage() {} - -func (x *WeightedCluster_ClusterWeight) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WeightedCluster_ClusterWeight.ProtoReflect.Descriptor instead. -func (*WeightedCluster_ClusterWeight) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *WeightedCluster_ClusterWeight) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WeightedCluster_ClusterWeight) GetClusterHeader() string { - if x != nil { - return x.ClusterHeader - } - return "" -} - -func (x *WeightedCluster_ClusterWeight) GetWeight() *wrapperspb.UInt32Value { - if x != nil { - return x.Weight - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetMetadataMatch() *v31.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetRequestHeadersToAdd() []*v31.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetResponseHeadersToAdd() []*v31.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetTypedPerFilterConfig() map[string]*anypb.Any { - if x != nil { - return x.TypedPerFilterConfig - } - return nil -} - -func (m *WeightedCluster_ClusterWeight) GetHostRewriteSpecifier() isWeightedCluster_ClusterWeight_HostRewriteSpecifier { - if m != nil { - return m.HostRewriteSpecifier - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetHostRewriteLiteral() string { - if x, ok := x.GetHostRewriteSpecifier().(*WeightedCluster_ClusterWeight_HostRewriteLiteral); ok { - return x.HostRewriteLiteral - } - return "" -} - -type isWeightedCluster_ClusterWeight_HostRewriteSpecifier interface { - isWeightedCluster_ClusterWeight_HostRewriteSpecifier() -} - -type WeightedCluster_ClusterWeight_HostRewriteLiteral struct { - // Indicates that during forwarding, the host header will be swapped with - // this value. - HostRewriteLiteral string `protobuf:"bytes,11,opt,name=host_rewrite_literal,json=hostRewriteLiteral,proto3,oneof"` -} - -func (*WeightedCluster_ClusterWeight_HostRewriteLiteral) isWeightedCluster_ClusterWeight_HostRewriteSpecifier() { -} - -type RouteMatch_GrpcRouteMatchOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RouteMatch_GrpcRouteMatchOptions) Reset() { - *x = RouteMatch_GrpcRouteMatchOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch_GrpcRouteMatchOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch_GrpcRouteMatchOptions) ProtoMessage() {} - -func (x *RouteMatch_GrpcRouteMatchOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch_GrpcRouteMatchOptions.ProtoReflect.Descriptor instead. -func (*RouteMatch_GrpcRouteMatchOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{6, 0} -} - -type RouteMatch_TlsContextMatchOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If specified, the route will match against whether or not a certificate is presented. - // If not specified, certificate presentation status (true or false) will not be considered when route matching. - Presented *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=presented,proto3" json:"presented,omitempty"` - // If specified, the route will match against whether or not a certificate is validated. - // If not specified, certificate validation status (true or false) will not be considered when route matching. - Validated *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=validated,proto3" json:"validated,omitempty"` -} - -func (x *RouteMatch_TlsContextMatchOptions) Reset() { - *x = RouteMatch_TlsContextMatchOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch_TlsContextMatchOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch_TlsContextMatchOptions) ProtoMessage() {} - -func (x *RouteMatch_TlsContextMatchOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch_TlsContextMatchOptions.ProtoReflect.Descriptor instead. -func (*RouteMatch_TlsContextMatchOptions) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{6, 1} -} - -func (x *RouteMatch_TlsContextMatchOptions) GetPresented() *wrapperspb.BoolValue { - if x != nil { - return x.Presented - } - return nil -} - -func (x *RouteMatch_TlsContextMatchOptions) GetValidated() *wrapperspb.BoolValue { - if x != nil { - return x.Validated - } - return nil -} - -// An extensible message for matching CONNECT requests. -type RouteMatch_ConnectMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RouteMatch_ConnectMatcher) Reset() { - *x = RouteMatch_ConnectMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch_ConnectMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch_ConnectMatcher) ProtoMessage() {} - -func (x *RouteMatch_ConnectMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch_ConnectMatcher.ProtoReflect.Descriptor instead. -func (*RouteMatch_ConnectMatcher) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{6, 2} -} - -// The router is capable of shadowing traffic from one cluster to another. The current -// implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to -// respond before returning the response from the primary cluster. All normal statistics are -// collected for the shadow cluster making this feature useful for testing. -// -// During shadowing, the host/authority header is altered such that “-shadow“ is appended. This is -// useful for logging. For example, “cluster1“ becomes “cluster1-shadow“. -// -// .. note:: -// -// Shadowing will not be triggered if the primary cluster does not exist. -// -// .. note:: -// -// Shadowing doesn't support Http CONNECT and upgrades. -// -// [#next-free-field: 6] -type RouteAction_RequestMirrorPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Only one of “cluster“ and “cluster_header“ can be specified. - // [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}] - // Specifies the cluster that requests will be mirrored to. The cluster must - // exist in the cluster manager configuration. - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - // Only one of “cluster“ and “cluster_header“ can be specified. - // Envoy will determine the cluster to route to by reading the value of the - // HTTP header named by cluster_header from the request headers. Only the first value in header is used, - // and no shadow request will happen if the value is not found in headers. Envoy will not wait for - // the shadow cluster to respond before returning the response from the primary cluster. - // - // .. attention:: - // - // Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 - // ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - ClusterHeader string `protobuf:"bytes,5,opt,name=cluster_header,json=clusterHeader,proto3" json:"cluster_header,omitempty"` - // If not specified, all requests to the target cluster will be mirrored. - // - // If specified, this field takes precedence over the “runtime_key“ field and requests must also - // fall under the percentage of matches indicated by this field. - // - // For some fraction N/D, a random number in the range [0,D) is selected. If the - // number is <= the value of the numerator N, or if the key is not present, the default - // value, the request will be mirrored. - RuntimeFraction *v31.RuntimeFractionalPercent `protobuf:"bytes,3,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` - // Determines if the trace span should be sampled. Defaults to true. - TraceSampled *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=trace_sampled,json=traceSampled,proto3" json:"trace_sampled,omitempty"` -} - -func (x *RouteAction_RequestMirrorPolicy) Reset() { - *x = RouteAction_RequestMirrorPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_RequestMirrorPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_RequestMirrorPolicy) ProtoMessage() {} - -func (x *RouteAction_RequestMirrorPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_RequestMirrorPolicy.ProtoReflect.Descriptor instead. -func (*RouteAction_RequestMirrorPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 0} -} - -func (x *RouteAction_RequestMirrorPolicy) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -func (x *RouteAction_RequestMirrorPolicy) GetClusterHeader() string { - if x != nil { - return x.ClusterHeader - } - return "" -} - -func (x *RouteAction_RequestMirrorPolicy) GetRuntimeFraction() *v31.RuntimeFractionalPercent { - if x != nil { - return x.RuntimeFraction - } - return nil -} - -func (x *RouteAction_RequestMirrorPolicy) GetTraceSampled() *wrapperspb.BoolValue { - if x != nil { - return x.TraceSampled - } - return nil -} - -// Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer -// `. -// [#next-free-field: 7] -type RouteAction_HashPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to PolicySpecifier: - // - // *RouteAction_HashPolicy_Header_ - // *RouteAction_HashPolicy_Cookie_ - // *RouteAction_HashPolicy_ConnectionProperties_ - // *RouteAction_HashPolicy_QueryParameter_ - // *RouteAction_HashPolicy_FilterState_ - PolicySpecifier isRouteAction_HashPolicy_PolicySpecifier `protobuf_oneof:"policy_specifier"` - // The flag that short-circuits the hash computing. This field provides a - // 'fallback' style of configuration: "if a terminal policy doesn't work, - // fallback to rest of the policy list", it saves time when the terminal - // policy works. - // - // If true, and there is already a hash computed, ignore rest of the - // list of hash polices. - // For example, if the following hash methods are configured: - // - // ========= ======== - // specifier terminal - // ========= ======== - // Header A true - // Header B false - // Header C false - // ========= ======== - // - // The generateHash process ends if policy "header A" generates a hash, as - // it's a terminal policy. - Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"` -} - -func (x *RouteAction_HashPolicy) Reset() { - *x = RouteAction_HashPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy) ProtoMessage() {} - -func (x *RouteAction_HashPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 1} -} - -func (m *RouteAction_HashPolicy) GetPolicySpecifier() isRouteAction_HashPolicy_PolicySpecifier { - if m != nil { - return m.PolicySpecifier - } - return nil -} - -func (x *RouteAction_HashPolicy) GetHeader() *RouteAction_HashPolicy_Header { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_Header_); ok { - return x.Header - } - return nil -} - -func (x *RouteAction_HashPolicy) GetCookie() *RouteAction_HashPolicy_Cookie { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_Cookie_); ok { - return x.Cookie - } - return nil -} - -func (x *RouteAction_HashPolicy) GetConnectionProperties() *RouteAction_HashPolicy_ConnectionProperties { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_ConnectionProperties_); ok { - return x.ConnectionProperties - } - return nil -} - -func (x *RouteAction_HashPolicy) GetQueryParameter() *RouteAction_HashPolicy_QueryParameter { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_QueryParameter_); ok { - return x.QueryParameter - } - return nil -} - -func (x *RouteAction_HashPolicy) GetFilterState() *RouteAction_HashPolicy_FilterState { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_FilterState_); ok { - return x.FilterState - } - return nil -} - -func (x *RouteAction_HashPolicy) GetTerminal() bool { - if x != nil { - return x.Terminal - } - return false -} - -type isRouteAction_HashPolicy_PolicySpecifier interface { - isRouteAction_HashPolicy_PolicySpecifier() -} - -type RouteAction_HashPolicy_Header_ struct { - // Header hash policy. - Header *RouteAction_HashPolicy_Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"` -} - -type RouteAction_HashPolicy_Cookie_ struct { - // Cookie hash policy. - Cookie *RouteAction_HashPolicy_Cookie `protobuf:"bytes,2,opt,name=cookie,proto3,oneof"` -} - -type RouteAction_HashPolicy_ConnectionProperties_ struct { - // Connection properties hash policy. - ConnectionProperties *RouteAction_HashPolicy_ConnectionProperties `protobuf:"bytes,3,opt,name=connection_properties,json=connectionProperties,proto3,oneof"` -} - -type RouteAction_HashPolicy_QueryParameter_ struct { - // Query parameter hash policy. - QueryParameter *RouteAction_HashPolicy_QueryParameter `protobuf:"bytes,5,opt,name=query_parameter,json=queryParameter,proto3,oneof"` -} - -type RouteAction_HashPolicy_FilterState_ struct { - // Filter state hash policy. - FilterState *RouteAction_HashPolicy_FilterState `protobuf:"bytes,6,opt,name=filter_state,json=filterState,proto3,oneof"` -} - -func (*RouteAction_HashPolicy_Header_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_Cookie_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_ConnectionProperties_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_QueryParameter_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_FilterState_) isRouteAction_HashPolicy_PolicySpecifier() {} - -// Allows enabling and disabling upgrades on a per-route basis. -// This overrides any enabled/disabled upgrade filter chain specified in the -// HttpConnectionManager -// :ref:`upgrade_configs -// ` -// but does not affect any custom filter chain specified there. -type RouteAction_UpgradeConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The case-insensitive name of this upgrade, e.g. "websocket". - // For each upgrade type present in upgrade_configs, requests with - // Upgrade: [upgrade_type] will be proxied upstream. - UpgradeType string `protobuf:"bytes,1,opt,name=upgrade_type,json=upgradeType,proto3" json:"upgrade_type,omitempty"` - // Determines if upgrades are available on this route. Defaults to true. - Enabled *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=enabled,proto3" json:"enabled,omitempty"` - // Configuration for sending data upstream as a raw data payload. This is used for - // CONNECT requests, when forwarding CONNECT payload as raw TCP. - // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment: TODO(htuch): Replace the above comment with an alpha tag.] - ConnectConfig *RouteAction_UpgradeConfig_ConnectConfig `protobuf:"bytes,3,opt,name=connect_config,json=connectConfig,proto3" json:"connect_config,omitempty"` -} - -func (x *RouteAction_UpgradeConfig) Reset() { - *x = RouteAction_UpgradeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_UpgradeConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_UpgradeConfig) ProtoMessage() {} - -func (x *RouteAction_UpgradeConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_UpgradeConfig.ProtoReflect.Descriptor instead. -func (*RouteAction_UpgradeConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 2} -} - -func (x *RouteAction_UpgradeConfig) GetUpgradeType() string { - if x != nil { - return x.UpgradeType - } - return "" -} - -func (x *RouteAction_UpgradeConfig) GetEnabled() *wrapperspb.BoolValue { - if x != nil { - return x.Enabled - } - return nil -} - -func (x *RouteAction_UpgradeConfig) GetConnectConfig() *RouteAction_UpgradeConfig_ConnectConfig { - if x != nil { - return x.ConnectConfig - } - return nil -} - -type RouteAction_MaxStreamDuration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the maximum duration allowed for streams on the route. If not specified, the value - // from the :ref:`max_stream_duration - // ` field in - // :ref:`HttpConnectionManager.common_http_protocol_options - // ` - // is used. If this field is set explicitly to zero, any - // HttpConnectionManager max_stream_duration timeout will be disabled for - // this route. - MaxStreamDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=max_stream_duration,json=maxStreamDuration,proto3" json:"max_stream_duration,omitempty"` - // If present, and the request contains a `grpc-timeout header - // `_, use that value as the - // “max_stream_duration“, but limit the applied timeout to the maximum value specified here. - // If set to 0, the “grpc-timeout“ header is used without modification. - GrpcTimeoutHeaderMax *durationpb.Duration `protobuf:"bytes,2,opt,name=grpc_timeout_header_max,json=grpcTimeoutHeaderMax,proto3" json:"grpc_timeout_header_max,omitempty"` - // If present, Envoy will adjust the timeout provided by the “grpc-timeout“ header by - // subtracting the provided duration from the header. This is useful for allowing Envoy to set - // its global timeout to be less than that of the deadline imposed by the calling client, which - // makes it more likely that Envoy will handle the timeout instead of having the call canceled - // by the client. If, after applying the offset, the resulting timeout is zero or negative, - // the stream will timeout immediately. - GrpcTimeoutHeaderOffset *durationpb.Duration `protobuf:"bytes,3,opt,name=grpc_timeout_header_offset,json=grpcTimeoutHeaderOffset,proto3" json:"grpc_timeout_header_offset,omitempty"` -} - -func (x *RouteAction_MaxStreamDuration) Reset() { - *x = RouteAction_MaxStreamDuration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_MaxStreamDuration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_MaxStreamDuration) ProtoMessage() {} - -func (x *RouteAction_MaxStreamDuration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_MaxStreamDuration.ProtoReflect.Descriptor instead. -func (*RouteAction_MaxStreamDuration) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 3} -} - -func (x *RouteAction_MaxStreamDuration) GetMaxStreamDuration() *durationpb.Duration { - if x != nil { - return x.MaxStreamDuration - } - return nil -} - -func (x *RouteAction_MaxStreamDuration) GetGrpcTimeoutHeaderMax() *durationpb.Duration { - if x != nil { - return x.GrpcTimeoutHeaderMax - } - return nil -} - -func (x *RouteAction_MaxStreamDuration) GetGrpcTimeoutHeaderOffset() *durationpb.Duration { - if x != nil { - return x.GrpcTimeoutHeaderOffset - } - return nil -} - -type RouteAction_HashPolicy_Header struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the request header that will be used to obtain the hash - // key. If the request header is not present, no hash will be produced. - HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` - // If specified, the request header value will be rewritten and used - // to produce the hash key. - RegexRewrite *v32.RegexMatchAndSubstitute `protobuf:"bytes,2,opt,name=regex_rewrite,json=regexRewrite,proto3" json:"regex_rewrite,omitempty"` -} - -func (x *RouteAction_HashPolicy_Header) Reset() { - *x = RouteAction_HashPolicy_Header{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_Header) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_Header) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_Header) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_Header.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_Header) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 1, 0} -} - -func (x *RouteAction_HashPolicy_Header) GetHeaderName() string { - if x != nil { - return x.HeaderName - } - return "" -} - -func (x *RouteAction_HashPolicy_Header) GetRegexRewrite() *v32.RegexMatchAndSubstitute { - if x != nil { - return x.RegexRewrite - } - return nil -} - -// CookieAttribute defines an API for adding additional attributes for a HTTP cookie. -type RouteAction_HashPolicy_CookieAttribute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the cookie attribute. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The optional value of the cookie attribute. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *RouteAction_HashPolicy_CookieAttribute) Reset() { - *x = RouteAction_HashPolicy_CookieAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_CookieAttribute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_CookieAttribute) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_CookieAttribute) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_CookieAttribute.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_CookieAttribute) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 1, 1} -} - -func (x *RouteAction_HashPolicy_CookieAttribute) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RouteAction_HashPolicy_CookieAttribute) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// Envoy supports two types of cookie affinity: -// -// 1. Passive. Envoy takes a cookie that's present in the cookies header and -// hashes on its value. -// -// 2. Generated. Envoy generates and sets a cookie with an expiration (TTL) -// on the first request from the client in its response to the client, -// based on the endpoint the request gets sent to. The client then -// presents this on the next and all subsequent requests. The hash of -// this is sufficient to ensure these requests get sent to the same -// endpoint. The cookie is generated by hashing the source and -// destination ports and addresses so that multiple independent HTTP2 -// streams on the same connection will independently receive the same -// cookie, even if they arrive at the Envoy simultaneously. -type RouteAction_HashPolicy_Cookie struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the cookie that will be used to obtain the hash key. If the - // cookie is not present and ttl below is not set, no hash will be - // produced. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // If specified, a cookie with the TTL will be generated if the cookie is - // not present. If the TTL is present and zero, the generated cookie will - // be a session cookie. - Ttl *durationpb.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"` - // The name of the path for the cookie. If no path is specified here, no path - // will be set for the cookie. - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - // Additional attributes for the cookie. They will be used when generating a new cookie. - Attributes []*RouteAction_HashPolicy_CookieAttribute `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (x *RouteAction_HashPolicy_Cookie) Reset() { - *x = RouteAction_HashPolicy_Cookie{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_Cookie) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_Cookie) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_Cookie) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_Cookie.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_Cookie) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 1, 2} -} - -func (x *RouteAction_HashPolicy_Cookie) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RouteAction_HashPolicy_Cookie) GetTtl() *durationpb.Duration { - if x != nil { - return x.Ttl - } - return nil -} - -func (x *RouteAction_HashPolicy_Cookie) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *RouteAction_HashPolicy_Cookie) GetAttributes() []*RouteAction_HashPolicy_CookieAttribute { - if x != nil { - return x.Attributes - } - return nil -} - -type RouteAction_HashPolicy_ConnectionProperties struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Hash on source IP address. - SourceIp bool `protobuf:"varint,1,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` -} - -func (x *RouteAction_HashPolicy_ConnectionProperties) Reset() { - *x = RouteAction_HashPolicy_ConnectionProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_ConnectionProperties) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_ConnectionProperties) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_ConnectionProperties) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_ConnectionProperties.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_ConnectionProperties) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 1, 3} -} - -func (x *RouteAction_HashPolicy_ConnectionProperties) GetSourceIp() bool { - if x != nil { - return x.SourceIp - } - return false -} - -type RouteAction_HashPolicy_QueryParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the URL query parameter that will be used to obtain the hash - // key. If the parameter is not present, no hash will be produced. Query - // parameter names are case-sensitive. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *RouteAction_HashPolicy_QueryParameter) Reset() { - *x = RouteAction_HashPolicy_QueryParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_QueryParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_QueryParameter) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_QueryParameter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_QueryParameter.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_QueryParameter) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 1, 4} -} - -func (x *RouteAction_HashPolicy_QueryParameter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type RouteAction_HashPolicy_FilterState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the Object in the per-request filterState, which is an - // Envoy::Hashable object. If there is no data associated with the key, - // or the stored object is not Envoy::Hashable, no hash will be produced. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *RouteAction_HashPolicy_FilterState) Reset() { - *x = RouteAction_HashPolicy_FilterState{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_FilterState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_FilterState) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_FilterState) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_FilterState.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_FilterState) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 1, 5} -} - -func (x *RouteAction_HashPolicy_FilterState) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -// Configuration for sending data upstream as a raw data payload. This is used for -// CONNECT or POST requests, when forwarding request payload as raw TCP. -type RouteAction_UpgradeConfig_ConnectConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream. - ProxyProtocolConfig *v31.ProxyProtocolConfig `protobuf:"bytes,1,opt,name=proxy_protocol_config,json=proxyProtocolConfig,proto3" json:"proxy_protocol_config,omitempty"` - // If set, the route will also allow forwarding POST payload as raw TCP. - AllowPost bool `protobuf:"varint,2,opt,name=allow_post,json=allowPost,proto3" json:"allow_post,omitempty"` -} - -func (x *RouteAction_UpgradeConfig_ConnectConfig) Reset() { - *x = RouteAction_UpgradeConfig_ConnectConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_UpgradeConfig_ConnectConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_UpgradeConfig_ConnectConfig) ProtoMessage() {} - -func (x *RouteAction_UpgradeConfig_ConnectConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_UpgradeConfig_ConnectConfig.ProtoReflect.Descriptor instead. -func (*RouteAction_UpgradeConfig_ConnectConfig) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{8, 2, 0} -} - -func (x *RouteAction_UpgradeConfig_ConnectConfig) GetProxyProtocolConfig() *v31.ProxyProtocolConfig { - if x != nil { - return x.ProxyProtocolConfig - } - return nil -} - -func (x *RouteAction_UpgradeConfig_ConnectConfig) GetAllowPost() bool { - if x != nil { - return x.AllowPost - } - return false -} - -type RetryPolicy_RetryPriority struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // [#extension-category: envoy.retry_priorities] - // - // Types that are assignable to ConfigType: - // - // *RetryPolicy_RetryPriority_TypedConfig - ConfigType isRetryPolicy_RetryPriority_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *RetryPolicy_RetryPriority) Reset() { - *x = RetryPolicy_RetryPriority{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_RetryPriority) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_RetryPriority) ProtoMessage() {} - -func (x *RetryPolicy_RetryPriority) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_RetryPriority.ProtoReflect.Descriptor instead. -func (*RetryPolicy_RetryPriority) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{9, 0} -} - -func (x *RetryPolicy_RetryPriority) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *RetryPolicy_RetryPriority) GetConfigType() isRetryPolicy_RetryPriority_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *RetryPolicy_RetryPriority) GetTypedConfig() *anypb.Any { - if x, ok := x.GetConfigType().(*RetryPolicy_RetryPriority_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isRetryPolicy_RetryPriority_ConfigType interface { - isRetryPolicy_RetryPriority_ConfigType() -} - -type RetryPolicy_RetryPriority_TypedConfig struct { - TypedConfig *anypb.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*RetryPolicy_RetryPriority_TypedConfig) isRetryPolicy_RetryPriority_ConfigType() {} - -type RetryPolicy_RetryHostPredicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // [#extension-category: envoy.retry_host_predicates] - // - // Types that are assignable to ConfigType: - // - // *RetryPolicy_RetryHostPredicate_TypedConfig - ConfigType isRetryPolicy_RetryHostPredicate_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *RetryPolicy_RetryHostPredicate) Reset() { - *x = RetryPolicy_RetryHostPredicate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_RetryHostPredicate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_RetryHostPredicate) ProtoMessage() {} - -func (x *RetryPolicy_RetryHostPredicate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_RetryHostPredicate.ProtoReflect.Descriptor instead. -func (*RetryPolicy_RetryHostPredicate) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{9, 1} -} - -func (x *RetryPolicy_RetryHostPredicate) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *RetryPolicy_RetryHostPredicate) GetConfigType() isRetryPolicy_RetryHostPredicate_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -func (x *RetryPolicy_RetryHostPredicate) GetTypedConfig() *anypb.Any { - if x, ok := x.GetConfigType().(*RetryPolicy_RetryHostPredicate_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isRetryPolicy_RetryHostPredicate_ConfigType interface { - isRetryPolicy_RetryHostPredicate_ConfigType() -} - -type RetryPolicy_RetryHostPredicate_TypedConfig struct { - TypedConfig *anypb.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*RetryPolicy_RetryHostPredicate_TypedConfig) isRetryPolicy_RetryHostPredicate_ConfigType() {} - -type RetryPolicy_RetryBackOff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the base interval between retries. This parameter is required and must be greater - // than zero. Values less than 1 ms are rounded up to 1 ms. - // See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion of Envoy's - // back-off algorithm. - BaseInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` - // Specifies the maximum interval between retries. This parameter is optional, but must be - // greater than or equal to the “base_interval“ if set. The default is 10 times the - // “base_interval“. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion - // of Envoy's back-off algorithm. - MaxInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` -} - -func (x *RetryPolicy_RetryBackOff) Reset() { - *x = RetryPolicy_RetryBackOff{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_RetryBackOff) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_RetryBackOff) ProtoMessage() {} - -func (x *RetryPolicy_RetryBackOff) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_RetryBackOff.ProtoReflect.Descriptor instead. -func (*RetryPolicy_RetryBackOff) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{9, 2} -} - -func (x *RetryPolicy_RetryBackOff) GetBaseInterval() *durationpb.Duration { - if x != nil { - return x.BaseInterval - } - return nil -} - -func (x *RetryPolicy_RetryBackOff) GetMaxInterval() *durationpb.Duration { - if x != nil { - return x.MaxInterval - } - return nil -} - -type RetryPolicy_ResetHeader struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the reset header. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The format of the reset header. - Format RetryPolicy_ResetHeaderFormat `protobuf:"varint,2,opt,name=format,proto3,enum=envoy.config.route.v3.RetryPolicy_ResetHeaderFormat" json:"format,omitempty"` -} - -func (x *RetryPolicy_ResetHeader) Reset() { - *x = RetryPolicy_ResetHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_ResetHeader) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_ResetHeader) ProtoMessage() {} - -func (x *RetryPolicy_ResetHeader) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_ResetHeader.ProtoReflect.Descriptor instead. -func (*RetryPolicy_ResetHeader) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{9, 3} -} - -func (x *RetryPolicy_ResetHeader) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RetryPolicy_ResetHeader) GetFormat() RetryPolicy_ResetHeaderFormat { - if x != nil { - return x.Format - } - return RetryPolicy_SECONDS -} - -// A retry back-off strategy that applies when the upstream server rate limits -// the request. -// -// Given this configuration: -// -// .. code-block:: yaml -// -// rate_limited_retry_back_off: -// reset_headers: -// - name: Retry-After -// format: SECONDS -// - name: X-RateLimit-Reset -// format: UNIX_TIMESTAMP -// max_interval: "300s" -// -// The following algorithm will apply: -// -// 1. If the response contains the header “Retry-After“ its value must be on -// the form “120“ (an integer that represents the number of seconds to -// wait before retrying). If so, this value is used as the back-off interval. -// 2. Otherwise, if the response contains the header “X-RateLimit-Reset“ its -// value must be on the form “1595320702“ (an integer that represents the -// point in time at which to retry, as a Unix timestamp in seconds). If so, -// the current time is subtracted from this value and the result is used as -// the back-off interval. -// 3. Otherwise, Envoy will use the default -// :ref:`exponential back-off ` -// strategy. -// -// No matter which format is used, if the resulting back-off interval exceeds -// “max_interval“ it is discarded and the next header in “reset_headers“ -// is tried. If a request timeout is configured for the route it will further -// limit how long the request will be allowed to run. -// -// To prevent many clients retrying at the same point in time jitter is added -// to the back-off interval, so the resulting interval is decided by taking: -// “random(interval, interval * 1.5)“. -// -// .. attention:: -// -// Configuring ``rate_limited_retry_back_off`` will not by itself cause a request -// to be retried. You will still need to configure the right retry policy to match -// the responses from the upstream server. -type RetryPolicy_RateLimitedRetryBackOff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the reset headers (like “Retry-After“ or “X-RateLimit-Reset“) - // to match against the response. Headers are tried in order, and matched case - // insensitive. The first header to be parsed successfully is used. If no headers - // match the default exponential back-off is used instead. - ResetHeaders []*RetryPolicy_ResetHeader `protobuf:"bytes,1,rep,name=reset_headers,json=resetHeaders,proto3" json:"reset_headers,omitempty"` - // Specifies the maximum back off interval that Envoy will allow. If a reset - // header contains an interval longer than this then it will be discarded and - // the next header will be tried. Defaults to 300 seconds. - MaxInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` -} - -func (x *RetryPolicy_RateLimitedRetryBackOff) Reset() { - *x = RetryPolicy_RateLimitedRetryBackOff{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_RateLimitedRetryBackOff) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_RateLimitedRetryBackOff) ProtoMessage() {} - -func (x *RetryPolicy_RateLimitedRetryBackOff) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_RateLimitedRetryBackOff.ProtoReflect.Descriptor instead. -func (*RetryPolicy_RateLimitedRetryBackOff) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{9, 4} -} - -func (x *RetryPolicy_RateLimitedRetryBackOff) GetResetHeaders() []*RetryPolicy_ResetHeader { - if x != nil { - return x.ResetHeaders - } - return nil -} - -func (x *RetryPolicy_RateLimitedRetryBackOff) GetMaxInterval() *durationpb.Duration { - if x != nil { - return x.MaxInterval - } - return nil -} - -// [#next-free-field: 12] -type RateLimit_Action struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ActionSpecifier: - // - // *RateLimit_Action_SourceCluster_ - // *RateLimit_Action_DestinationCluster_ - // *RateLimit_Action_RequestHeaders_ - // *RateLimit_Action_RemoteAddress_ - // *RateLimit_Action_GenericKey_ - // *RateLimit_Action_HeaderValueMatch_ - // *RateLimit_Action_DynamicMetadata - // *RateLimit_Action_Metadata - // *RateLimit_Action_Extension - // *RateLimit_Action_MaskedRemoteAddress_ - // *RateLimit_Action_QueryParameterValueMatch_ - ActionSpecifier isRateLimit_Action_ActionSpecifier `protobuf_oneof:"action_specifier"` -} - -func (x *RateLimit_Action) Reset() { - *x = RateLimit_Action{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action) ProtoMessage() {} - -func (x *RateLimit_Action) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action.ProtoReflect.Descriptor instead. -func (*RateLimit_Action) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0} -} - -func (m *RateLimit_Action) GetActionSpecifier() isRateLimit_Action_ActionSpecifier { - if m != nil { - return m.ActionSpecifier - } - return nil -} - -func (x *RateLimit_Action) GetSourceCluster() *RateLimit_Action_SourceCluster { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_SourceCluster_); ok { - return x.SourceCluster - } - return nil -} - -func (x *RateLimit_Action) GetDestinationCluster() *RateLimit_Action_DestinationCluster { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_DestinationCluster_); ok { - return x.DestinationCluster - } - return nil -} - -func (x *RateLimit_Action) GetRequestHeaders() *RateLimit_Action_RequestHeaders { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_RequestHeaders_); ok { - return x.RequestHeaders - } - return nil -} - -func (x *RateLimit_Action) GetRemoteAddress() *RateLimit_Action_RemoteAddress { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_RemoteAddress_); ok { - return x.RemoteAddress - } - return nil -} - -func (x *RateLimit_Action) GetGenericKey() *RateLimit_Action_GenericKey { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_GenericKey_); ok { - return x.GenericKey - } - return nil -} - -func (x *RateLimit_Action) GetHeaderValueMatch() *RateLimit_Action_HeaderValueMatch { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_HeaderValueMatch_); ok { - return x.HeaderValueMatch - } - return nil -} - -// Deprecated: Do not use. -func (x *RateLimit_Action) GetDynamicMetadata() *RateLimit_Action_DynamicMetaData { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_DynamicMetadata); ok { - return x.DynamicMetadata - } - return nil -} - -func (x *RateLimit_Action) GetMetadata() *RateLimit_Action_MetaData { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_Metadata); ok { - return x.Metadata - } - return nil -} - -func (x *RateLimit_Action) GetExtension() *v31.TypedExtensionConfig { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_Extension); ok { - return x.Extension - } - return nil -} - -func (x *RateLimit_Action) GetMaskedRemoteAddress() *RateLimit_Action_MaskedRemoteAddress { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_MaskedRemoteAddress_); ok { - return x.MaskedRemoteAddress - } - return nil -} - -func (x *RateLimit_Action) GetQueryParameterValueMatch() *RateLimit_Action_QueryParameterValueMatch { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_QueryParameterValueMatch_); ok { - return x.QueryParameterValueMatch - } - return nil -} - -type isRateLimit_Action_ActionSpecifier interface { - isRateLimit_Action_ActionSpecifier() -} - -type RateLimit_Action_SourceCluster_ struct { - // Rate limit on source cluster. - SourceCluster *RateLimit_Action_SourceCluster `protobuf:"bytes,1,opt,name=source_cluster,json=sourceCluster,proto3,oneof"` -} - -type RateLimit_Action_DestinationCluster_ struct { - // Rate limit on destination cluster. - DestinationCluster *RateLimit_Action_DestinationCluster `protobuf:"bytes,2,opt,name=destination_cluster,json=destinationCluster,proto3,oneof"` -} - -type RateLimit_Action_RequestHeaders_ struct { - // Rate limit on request headers. - RequestHeaders *RateLimit_Action_RequestHeaders `protobuf:"bytes,3,opt,name=request_headers,json=requestHeaders,proto3,oneof"` -} - -type RateLimit_Action_RemoteAddress_ struct { - // Rate limit on remote address. - RemoteAddress *RateLimit_Action_RemoteAddress `protobuf:"bytes,4,opt,name=remote_address,json=remoteAddress,proto3,oneof"` -} - -type RateLimit_Action_GenericKey_ struct { - // Rate limit on a generic key. - GenericKey *RateLimit_Action_GenericKey `protobuf:"bytes,5,opt,name=generic_key,json=genericKey,proto3,oneof"` -} - -type RateLimit_Action_HeaderValueMatch_ struct { - // Rate limit on the existence of request headers. - HeaderValueMatch *RateLimit_Action_HeaderValueMatch `protobuf:"bytes,6,opt,name=header_value_match,json=headerValueMatch,proto3,oneof"` -} - -type RateLimit_Action_DynamicMetadata struct { - // Rate limit on dynamic metadata. - // - // .. attention:: - // - // This field has been deprecated in favor of the :ref:`metadata ` field - // - // Deprecated: Do not use. - DynamicMetadata *RateLimit_Action_DynamicMetaData `protobuf:"bytes,7,opt,name=dynamic_metadata,json=dynamicMetadata,proto3,oneof"` -} - -type RateLimit_Action_Metadata struct { - // Rate limit on metadata. - Metadata *RateLimit_Action_MetaData `protobuf:"bytes,8,opt,name=metadata,proto3,oneof"` -} - -type RateLimit_Action_Extension struct { - // Rate limit descriptor extension. See the rate limit descriptor extensions documentation. - // - // :ref:`HTTP matching input functions ` are - // permitted as descriptor extensions. The input functions are only - // looked up if there is no rate limit descriptor extension matching - // the type URL. - // - // [#extension-category: envoy.rate_limit_descriptors] - Extension *v31.TypedExtensionConfig `protobuf:"bytes,9,opt,name=extension,proto3,oneof"` -} - -type RateLimit_Action_MaskedRemoteAddress_ struct { - // Rate limit on masked remote address. - MaskedRemoteAddress *RateLimit_Action_MaskedRemoteAddress `protobuf:"bytes,10,opt,name=masked_remote_address,json=maskedRemoteAddress,proto3,oneof"` -} - -type RateLimit_Action_QueryParameterValueMatch_ struct { - // Rate limit on the existence of query parameters. - QueryParameterValueMatch *RateLimit_Action_QueryParameterValueMatch `protobuf:"bytes,11,opt,name=query_parameter_value_match,json=queryParameterValueMatch,proto3,oneof"` -} - -func (*RateLimit_Action_SourceCluster_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_DestinationCluster_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_RequestHeaders_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_RemoteAddress_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_GenericKey_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_HeaderValueMatch_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_DynamicMetadata) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_Metadata) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_Extension) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_MaskedRemoteAddress_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_QueryParameterValueMatch_) isRateLimit_Action_ActionSpecifier() {} - -type RateLimit_Override struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to OverrideSpecifier: - // - // *RateLimit_Override_DynamicMetadata_ - OverrideSpecifier isRateLimit_Override_OverrideSpecifier `protobuf_oneof:"override_specifier"` -} - -func (x *RateLimit_Override) Reset() { - *x = RateLimit_Override{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Override) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Override) ProtoMessage() {} - -func (x *RateLimit_Override) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Override.ProtoReflect.Descriptor instead. -func (*RateLimit_Override) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 1} -} - -func (m *RateLimit_Override) GetOverrideSpecifier() isRateLimit_Override_OverrideSpecifier { - if m != nil { - return m.OverrideSpecifier - } - return nil -} - -func (x *RateLimit_Override) GetDynamicMetadata() *RateLimit_Override_DynamicMetadata { - if x, ok := x.GetOverrideSpecifier().(*RateLimit_Override_DynamicMetadata_); ok { - return x.DynamicMetadata - } - return nil -} - -type isRateLimit_Override_OverrideSpecifier interface { - isRateLimit_Override_OverrideSpecifier() -} - -type RateLimit_Override_DynamicMetadata_ struct { - // Limit override from dynamic metadata. - DynamicMetadata *RateLimit_Override_DynamicMetadata `protobuf:"bytes,1,opt,name=dynamic_metadata,json=dynamicMetadata,proto3,oneof"` -} - -func (*RateLimit_Override_DynamicMetadata_) isRateLimit_Override_OverrideSpecifier() {} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("source_cluster", "") -// -// is derived from the :option:`--service-cluster` option. -type RateLimit_Action_SourceCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimit_Action_SourceCluster) Reset() { - *x = RateLimit_Action_SourceCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_SourceCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_SourceCluster) ProtoMessage() {} - -func (x *RateLimit_Action_SourceCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_SourceCluster.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_SourceCluster) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0, 0} -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("destination_cluster", "") -// -// Once a request matches against a route table rule, a routed cluster is determined by one of -// the following :ref:`route table configuration ` -// settings: -// -// - :ref:`cluster ` indicates the upstream cluster -// to route to. -// - :ref:`weighted_clusters ` -// chooses a cluster randomly from a set of clusters with attributed weight. -// - :ref:`cluster_header ` indicates which -// header in the request contains the target cluster. -type RateLimit_Action_DestinationCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimit_Action_DestinationCluster) Reset() { - *x = RateLimit_Action_DestinationCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_DestinationCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_DestinationCluster) ProtoMessage() {} - -func (x *RateLimit_Action_DestinationCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_DestinationCluster.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_DestinationCluster) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0, 1} -} - -// The following descriptor entry is appended when a header contains a key that matches the -// “header_name“: -// -// .. code-block:: cpp -// -// ("", "") -type RateLimit_Action_RequestHeaders struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The header name to be queried from the request headers. The header’s - // value is used to populate the value of the descriptor entry for the - // descriptor_key. - HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` - // The key to use in the descriptor entry. - DescriptorKey string `protobuf:"bytes,2,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` - // If set to true, Envoy skips the descriptor while calling rate limiting service - // when header is not present in the request. By default it skips calling the - // rate limiting service if this header is not present in the request. - SkipIfAbsent bool `protobuf:"varint,3,opt,name=skip_if_absent,json=skipIfAbsent,proto3" json:"skip_if_absent,omitempty"` -} - -func (x *RateLimit_Action_RequestHeaders) Reset() { - *x = RateLimit_Action_RequestHeaders{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_RequestHeaders) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_RequestHeaders) ProtoMessage() {} - -func (x *RateLimit_Action_RequestHeaders) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_RequestHeaders.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_RequestHeaders) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0, 2} -} - -func (x *RateLimit_Action_RequestHeaders) GetHeaderName() string { - if x != nil { - return x.HeaderName - } - return "" -} - -func (x *RateLimit_Action_RequestHeaders) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -func (x *RateLimit_Action_RequestHeaders) GetSkipIfAbsent() bool { - if x != nil { - return x.SkipIfAbsent - } - return false -} - -// The following descriptor entry is appended to the descriptor and is populated using the -// trusted address from :ref:`x-forwarded-for `: -// -// .. code-block:: cpp -// -// ("remote_address", "") -type RateLimit_Action_RemoteAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimit_Action_RemoteAddress) Reset() { - *x = RateLimit_Action_RemoteAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_RemoteAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_RemoteAddress) ProtoMessage() {} - -func (x *RateLimit_Action_RemoteAddress) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_RemoteAddress.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_RemoteAddress) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0, 3} -} - -// The following descriptor entry is appended to the descriptor and is populated using the -// masked address from :ref:`x-forwarded-for `: -// -// .. code-block:: cpp -// -// ("masked_remote_address", "") -type RateLimit_Action_MaskedRemoteAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Length of prefix mask len for IPv4 (e.g. 0, 32). - // Defaults to 32 when unset. - // For example, trusted address from x-forwarded-for is “192.168.1.1“, - // the descriptor entry is ("masked_remote_address", "192.168.1.1/32"); - // if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24"). - V4PrefixMaskLen *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=v4_prefix_mask_len,json=v4PrefixMaskLen,proto3" json:"v4_prefix_mask_len,omitempty"` - // Length of prefix mask len for IPv6 (e.g. 0, 128). - // Defaults to 128 when unset. - // For example, trusted address from x-forwarded-for is “2001:abcd:ef01:2345:6789:abcd:ef01:234“, - // the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128"); - // if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64"). - V6PrefixMaskLen *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=v6_prefix_mask_len,json=v6PrefixMaskLen,proto3" json:"v6_prefix_mask_len,omitempty"` -} - -func (x *RateLimit_Action_MaskedRemoteAddress) Reset() { - *x = RateLimit_Action_MaskedRemoteAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_MaskedRemoteAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_MaskedRemoteAddress) ProtoMessage() {} - -func (x *RateLimit_Action_MaskedRemoteAddress) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_MaskedRemoteAddress.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_MaskedRemoteAddress) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0, 4} -} - -func (x *RateLimit_Action_MaskedRemoteAddress) GetV4PrefixMaskLen() *wrapperspb.UInt32Value { - if x != nil { - return x.V4PrefixMaskLen - } - return nil -} - -func (x *RateLimit_Action_MaskedRemoteAddress) GetV6PrefixMaskLen() *wrapperspb.UInt32Value { - if x != nil { - return x.V6PrefixMaskLen - } - return nil -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("generic_key", "") -type RateLimit_Action_GenericKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The value to use in the descriptor entry. - DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` - // An optional key to use in the descriptor entry. If not set it defaults - // to 'generic_key' as the descriptor key. - DescriptorKey string `protobuf:"bytes,2,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` -} - -func (x *RateLimit_Action_GenericKey) Reset() { - *x = RateLimit_Action_GenericKey{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_GenericKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_GenericKey) ProtoMessage() {} - -func (x *RateLimit_Action_GenericKey) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_GenericKey.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_GenericKey) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0, 5} -} - -func (x *RateLimit_Action_GenericKey) GetDescriptorValue() string { - if x != nil { - return x.DescriptorValue - } - return "" -} - -func (x *RateLimit_Action_GenericKey) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("header_match", "") -type RateLimit_Action_HeaderValueMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key to use in the descriptor entry. Defaults to “header_match“. - DescriptorKey string `protobuf:"bytes,4,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` - // The value to use in the descriptor entry. - DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` - // If set to true, the action will append a descriptor entry when the - // request matches the headers. If set to false, the action will append a - // descriptor entry when the request does not match the headers. The - // default value is true. - ExpectMatch *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=expect_match,json=expectMatch,proto3" json:"expect_match,omitempty"` - // Specifies a set of headers that the rate limit action should match - // on. The action will check the request’s headers against all the - // specified headers in the config. A match will happen if all the - // headers in the config are present in the request with the same values - // (or based on presence if the value field is not in the config). - Headers []*HeaderMatcher `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *RateLimit_Action_HeaderValueMatch) Reset() { - *x = RateLimit_Action_HeaderValueMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_HeaderValueMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_HeaderValueMatch) ProtoMessage() {} - -func (x *RateLimit_Action_HeaderValueMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_HeaderValueMatch.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_HeaderValueMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0, 6} -} - -func (x *RateLimit_Action_HeaderValueMatch) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -func (x *RateLimit_Action_HeaderValueMatch) GetDescriptorValue() string { - if x != nil { - return x.DescriptorValue - } - return "" -} - -func (x *RateLimit_Action_HeaderValueMatch) GetExpectMatch() *wrapperspb.BoolValue { - if x != nil { - return x.ExpectMatch - } - return nil -} - -func (x *RateLimit_Action_HeaderValueMatch) GetHeaders() []*HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -// The following descriptor entry is appended when the -// :ref:`dynamic metadata ` contains a key value: -// -// .. code-block:: cpp -// -// ("", "") -// -// .. attention:: -// -// This action has been deprecated in favor of the :ref:`metadata ` action -type RateLimit_Action_DynamicMetaData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key to use in the descriptor entry. - DescriptorKey string `protobuf:"bytes,1,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` - // Metadata struct that defines the key and path to retrieve the string value. A match will - // only happen if the value in the dynamic metadata is of type string. - MetadataKey *v35.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` - // An optional value to use if “metadata_key“ is empty. If not set and - // no value is present under the metadata_key then no descriptor is generated. - DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` -} - -func (x *RateLimit_Action_DynamicMetaData) Reset() { - *x = RateLimit_Action_DynamicMetaData{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_DynamicMetaData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_DynamicMetaData) ProtoMessage() {} - -func (x *RateLimit_Action_DynamicMetaData) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_DynamicMetaData.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_DynamicMetaData) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0, 7} -} - -func (x *RateLimit_Action_DynamicMetaData) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -func (x *RateLimit_Action_DynamicMetaData) GetMetadataKey() *v35.MetadataKey { - if x != nil { - return x.MetadataKey - } - return nil -} - -func (x *RateLimit_Action_DynamicMetaData) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -// The following descriptor entry is appended when the metadata contains a key value: -// -// .. code-block:: cpp -// -// ("", "") -// -// [#next-free-field: 6] -type RateLimit_Action_MetaData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key to use in the descriptor entry. - DescriptorKey string `protobuf:"bytes,1,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` - // Metadata struct that defines the key and path to retrieve the string value. A match will - // only happen if the value in the metadata is of type string. - MetadataKey *v35.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` - // An optional value to use if “metadata_key“ is empty. If not set and - // no value is present under the metadata_key then “skip_if_absent“ is followed to - // skip calling the rate limiting service or skip the descriptor. - DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Source of metadata - Source RateLimit_Action_MetaData_Source `protobuf:"varint,4,opt,name=source,proto3,enum=envoy.config.route.v3.RateLimit_Action_MetaData_Source" json:"source,omitempty"` - // If set to true, Envoy skips the descriptor while calling rate limiting service - // when “metadata_key“ is empty and “default_value“ is not set. By default it skips calling the - // rate limiting service in that case. - SkipIfAbsent bool `protobuf:"varint,5,opt,name=skip_if_absent,json=skipIfAbsent,proto3" json:"skip_if_absent,omitempty"` -} - -func (x *RateLimit_Action_MetaData) Reset() { - *x = RateLimit_Action_MetaData{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_MetaData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_MetaData) ProtoMessage() {} - -func (x *RateLimit_Action_MetaData) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[55] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_MetaData.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_MetaData) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0, 8} -} - -func (x *RateLimit_Action_MetaData) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -func (x *RateLimit_Action_MetaData) GetMetadataKey() *v35.MetadataKey { - if x != nil { - return x.MetadataKey - } - return nil -} - -func (x *RateLimit_Action_MetaData) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -func (x *RateLimit_Action_MetaData) GetSource() RateLimit_Action_MetaData_Source { - if x != nil { - return x.Source - } - return RateLimit_Action_MetaData_DYNAMIC -} - -func (x *RateLimit_Action_MetaData) GetSkipIfAbsent() bool { - if x != nil { - return x.SkipIfAbsent - } - return false -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("query_match", "") -type RateLimit_Action_QueryParameterValueMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key to use in the descriptor entry. Defaults to “query_match“. - DescriptorKey string `protobuf:"bytes,4,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` - // The value to use in the descriptor entry. - DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` - // If set to true, the action will append a descriptor entry when the - // request matches the headers. If set to false, the action will append a - // descriptor entry when the request does not match the headers. The - // default value is true. - ExpectMatch *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=expect_match,json=expectMatch,proto3" json:"expect_match,omitempty"` - // Specifies a set of query parameters that the rate limit action should match - // on. The action will check the request’s query parameters against all the - // specified query parameters in the config. A match will happen if all the - // query parameters in the config are present in the request with the same values - // (or based on presence if the value field is not in the config). - QueryParameters []*QueryParameterMatcher `protobuf:"bytes,3,rep,name=query_parameters,json=queryParameters,proto3" json:"query_parameters,omitempty"` -} - -func (x *RateLimit_Action_QueryParameterValueMatch) Reset() { - *x = RateLimit_Action_QueryParameterValueMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_QueryParameterValueMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_QueryParameterValueMatch) ProtoMessage() {} - -func (x *RateLimit_Action_QueryParameterValueMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[56] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_QueryParameterValueMatch.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_QueryParameterValueMatch) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 0, 9} -} - -func (x *RateLimit_Action_QueryParameterValueMatch) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -func (x *RateLimit_Action_QueryParameterValueMatch) GetDescriptorValue() string { - if x != nil { - return x.DescriptorValue - } - return "" -} - -func (x *RateLimit_Action_QueryParameterValueMatch) GetExpectMatch() *wrapperspb.BoolValue { - if x != nil { - return x.ExpectMatch - } - return nil -} - -func (x *RateLimit_Action_QueryParameterValueMatch) GetQueryParameters() []*QueryParameterMatcher { - if x != nil { - return x.QueryParameters - } - return nil -} - -// Fetches the override from the dynamic metadata. -type RateLimit_Override_DynamicMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Metadata struct that defines the key and path to retrieve the struct value. - // The value must be a struct containing an integer "requests_per_unit" property - // and a "unit" property with a value parseable to :ref:`RateLimitUnit - // enum ` - MetadataKey *v35.MetadataKey `protobuf:"bytes,1,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` -} - -func (x *RateLimit_Override_DynamicMetadata) Reset() { - *x = RateLimit_Override_DynamicMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Override_DynamicMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Override_DynamicMetadata) ProtoMessage() {} - -func (x *RateLimit_Override_DynamicMetadata) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_route_components_proto_msgTypes[57] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Override_DynamicMetadata.ProtoReflect.Descriptor instead. -func (*RateLimit_Override_DynamicMetadata) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_route_components_proto_rawDescGZIP(), []int{17, 1, 0} -} - -func (x *RateLimit_Override_DynamicMetadata) GetMetadataKey() *v35.MetadataKey { - if x != nil { - return x.MetadataKey - } - return nil -} - -var File_envoy_config_route_v3_route_components_proto protoreflect.FileDescriptor - -var file_envoy_config_route_v3_route_components_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, - 0x76, 0x33, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, - 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x0e, 0x0a, 0x0b, 0x56, - 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, - 0x08, 0x01, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x07, 0x64, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, - 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, - 0x06, 0x02, 0x08, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x60, 0x0a, - 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, - 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x2e, 0x54, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x54, 0x6c, 0x73, 0x12, - 0x50, 0x0a, 0x10, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, - 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, - 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, - 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, - 0x01, 0xc8, 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x69, 0x0a, 0x17, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, - 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4f, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, 0x0f, - 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, - 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, - 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x73, 0x0a, 0x17, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, - 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x41, 0x0a, 0x1d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x21, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x1d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, - 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x16, - 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0c, 0x68, 0x65, 0x64, 0x67, 0x65, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x0b, 0x68, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x44, 0x0a, - 0x1f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x49, - 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x1e, 0x70, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x70, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, - 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x15, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x69, 0x65, 0x73, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, - 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3a, 0x0a, 0x12, 0x54, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, - 0x4e, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, - 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, - 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, - 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, - 0x0c, 0x10, 0x0d, 0x52, 0x11, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x64, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x0a, 0x09, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, - 0xaf, 0x0b, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, - 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x3a, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x08, - 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x12, 0x56, 0x0a, 0x0f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x15, 0x6e, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x6e, - 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x48, 0x00, 0x52, 0x13, 0x6e, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x12, 0x6d, 0x0a, 0x17, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, - 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, 0x19, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, - 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, - 0xfa, 0x42, 0x0f, 0x92, 0x01, 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, - 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x69, 0x0a, 0x17, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, - 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, - 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4f, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x92, 0x01, - 0x0c, 0x22, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x17, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, - 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, - 0x12, 0x60, 0x0a, 0x1e, 0x70, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x3a, 0x1f, 0x9a, 0xc5, 0x88, 0x1e, 0x1a, 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x42, 0x0d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x52, 0x11, - 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x22, 0xf3, 0x0a, 0x0a, 0x0f, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, - 0x2e, 0x30, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, - 0x2c, 0x0a, 0x12, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x2e, 0x0a, - 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x48, - 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x92, 0x08, - 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, - 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x13, 0x12, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4b, - 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, - 0xc8, 0x01, 0x00, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x13, 0x12, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0d, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x06, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x67, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, - 0x64, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, - 0x64, 0x12, 0x4b, 0x0a, 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x09, - 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, - 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x69, - 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, - 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, 0x1a, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, - 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, - 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, - 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x17, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, 0x70, 0x65, - 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x3f, 0x0a, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, - 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x00, 0x52, 0x12, 0x68, - 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, - 0x6c, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x57, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x6f, 0x73, - 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x52, - 0x11, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x18, 0x0a, - 0x16, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x8d, 0x01, 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x12, 0x52, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xc5, 0x0a, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x12, 0x14, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x4e, 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, - 0x65, 0x67, 0x65, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x73, 0x61, 0x66, - 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x5b, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x15, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x73, 0x65, 0x70, 0x61, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x15, 0xfa, 0x42, 0x12, 0x72, 0x10, 0x32, 0x0e, 0x5e, 0x5b, 0x5e, 0x3f, 0x23, - 0x5d, 0x2b, 0x5b, 0x5e, 0x3f, 0x23, 0x2f, 0x5d, 0x24, 0x48, 0x00, 0x52, 0x13, 0x70, 0x61, 0x74, - 0x68, 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x12, 0x58, 0x0a, 0x11, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x61, 0x74, 0x68, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x61, - 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, - 0x63, 0x61, 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x59, 0x0a, - 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, - 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x52, 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x4b, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x59, - 0x0a, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x74, - 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x51, 0x0a, 0x10, 0x64, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0d, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0f, 0x64, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x53, 0x0a, 0x15, - 0x47, 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, 0x72, 0x70, 0x63, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0xc9, 0x01, 0x0a, 0x16, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x09, - 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x65, - 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x10, 0x0a, - 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x3a, - 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x15, 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x05, - 0x10, 0x06, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x22, - 0xc5, 0x05, 0x0a, 0x0a, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5f, - 0x0a, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x70, - 0x6f, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x41, 0x67, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x12, 0x57, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x0e, 0x73, - 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x12, 0x5b, 0x0a, 0x1c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x3a, - 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x72, 0x73, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, - 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x52, 0x0c, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xdc, 0x2c, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x0e, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, - 0xc8, 0x01, 0x00, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, - 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x18, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x16, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x76, 0x0a, 0x1f, 0x69, 0x6e, 0x6c, 0x69, 0x6e, - 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x48, - 0x00, 0x52, 0x1c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, - 0x8e, 0x01, 0x0a, 0x1f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, - 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x1b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, - 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, - 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0d, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x53, 0x0a, 0x0d, 0x72, - 0x65, 0x67, 0x65, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x20, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, - 0x74, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x12, 0x5a, 0x0a, 0x13, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x70, 0x61, 0x74, 0x68, 0x52, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3f, 0x0a, 0x14, - 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x74, - 0x65, 0x72, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, - 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x01, 0x52, 0x12, 0x68, 0x6f, 0x73, 0x74, 0x52, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x48, 0x0a, - 0x11, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x48, 0x01, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, - 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x5f, - 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x1d, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, - 0x00, 0x48, 0x01, 0x52, 0x11, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x17, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x67, 0x65, - 0x78, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, - 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x48, 0x01, 0x52, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x52, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, - 0x35, 0x0a, 0x17, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x78, 0x5f, 0x66, 0x6f, 0x72, 0x77, - 0x61, 0x72, 0x64, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x26, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x14, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x58, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, - 0x65, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x69, - 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, - 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x56, 0x0a, 0x11, 0x65, 0x61, 0x72, - 0x6c, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x28, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0f, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x12, 0x45, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, - 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, - 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x16, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, - 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6e, 0x0a, 0x17, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, - 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x08, 0x70, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0a, 0x72, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x5c, 0x0a, 0x16, 0x69, 0x6e, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x76, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, - 0x2e, 0x30, 0x52, 0x13, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x68, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x4e, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x68, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0a, 0x68, 0x61, 0x73, - 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x42, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, - 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, - 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x10, 0x6d, - 0x61, 0x78, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0e, 0x6d, - 0x61, 0x78, 0x47, 0x72, 0x70, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x56, 0x0a, - 0x13, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, - 0x2e, 0x30, 0x52, 0x11, 0x67, 0x72, 0x70, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x59, 0x0a, 0x0f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x12, 0x67, 0x0a, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x22, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x80, 0x01, 0x0a, 0x18, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, - 0x03, 0x33, 0x2e, 0x30, 0x52, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x16, - 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, - 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x12, 0x45, 0x0a, - 0x0c, 0x68, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x64, 0x67, - 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x68, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x64, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x81, 0x03, 0x0a, 0x13, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x13, 0x12, 0x11, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x07, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x24, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0xf2, 0x98, 0xfe, 0x8f, - 0x05, 0x13, 0x12, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x3f, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, - 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, - 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x04, 0x08, 0x02, 0x10, - 0x03, 0x52, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x1a, 0xd6, - 0x0b, 0x0a, 0x0a, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4e, 0x0a, - 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, - 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6f, - 0x6b, 0x69, 0x65, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x79, 0x0a, - 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x67, 0x0a, 0x0f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x0e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x12, 0x5e, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x1a, 0xc6, 0x01, - 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, - 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x65, - 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x52, - 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x3a, 0x37, 0x9a, - 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x5f, 0x0a, 0x0f, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0x72, 0x0c, 0x10, 0x01, - 0x28, 0x80, 0x80, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0f, 0xfa, 0x42, 0x0c, 0x72, 0x0a, 0x28, 0x80, 0x80, 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xfe, 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6f, 0x6b, - 0x69, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x12, 0x5d, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x3a, - 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x1a, 0x7a, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x3a, 0x45, 0x9a, - 0xc5, 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x1a, 0x6e, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x1a, 0x66, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x3c, - 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, 0x30, 0x9a, 0xc5, - 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x17, - 0x0a, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xa3, 0x03, 0x0a, 0x0d, 0x55, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x0c, 0x75, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0b, - 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x65, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x8d, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5d, 0x0a, 0x15, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6f, 0x73, 0x74, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, - 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x88, 0x02, - 0x0a, 0x11, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x78, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, - 0x0a, 0x17, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x67, 0x72, 0x70, 0x63, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x78, - 0x12, 0x56, 0x0a, 0x1a, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x17, 0x67, 0x72, 0x70, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x60, 0x0a, 0x1b, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x45, 0x52, 0x56, 0x49, - 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, - 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, - 0x19, 0x0a, 0x15, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, 0x52, 0x56, - 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x22, 0x5e, 0x0a, 0x16, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x41, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x52, - 0x4f, 0x55, 0x47, 0x48, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, - 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x41, 0x4e, 0x44, - 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x44, 0x49, - 0x52, 0x45, 0x43, 0x54, 0x10, 0x01, 0x1a, 0x02, 0x18, 0x01, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, - 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x18, 0x0a, 0x16, 0x68, - 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x12, 0x10, - 0x13, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a, 0x04, 0x08, - 0x16, 0x10, 0x17, 0x4a, 0x04, 0x08, 0x15, 0x10, 0x16, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x52, - 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xbf, 0x10, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, - 0x6e, 0x12, 0x52, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x13, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0d, 0x0a, 0x0b, 0x6d, 0x61, - 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x52, 0x65, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x54, 0x72, - 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4a, 0x0a, 0x14, 0x70, 0x65, 0x72, 0x5f, - 0x74, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x11, 0x70, 0x65, 0x72, 0x54, 0x72, 0x79, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0d, - 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x67, 0x0a, - 0x14, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x52, 0x12, 0x72, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, - 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x64, 0x0a, 0x18, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x21, - 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, - 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4d, 0x61, 0x78, 0x41, 0x74, - 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x0e, - 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, - 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, - 0x4f, 0x66, 0x66, 0x12, 0x78, 0x0a, 0x1b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, - 0x66, 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, - 0x6b, 0x4f, 0x66, 0x66, 0x52, 0x17, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x51, 0x0a, - 0x11, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x10, - 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x12, 0x60, 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x17, 0x72, 0x65, 0x74, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x1a, 0xb9, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, - 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x33, 0x9a, 0xc5, - 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc3, - 0x01, 0x0a, 0x12, 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, - 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x38, 0x9a, - 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xd6, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, - 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x4a, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, - 0x01, 0x2a, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, 0x6d, 0x61, - 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, - 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x1a, 0x88, 0x01, - 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, - 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x56, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x1a, 0xc0, 0x01, 0x0a, 0x17, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, - 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x5d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, - 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x34, 0x0a, 0x11, 0x52, - 0x65, 0x73, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x53, 0x10, 0x00, 0x12, 0x12, 0x0a, - 0x0e, 0x55, 0x4e, 0x49, 0x58, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, - 0x01, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x9c, 0x02, 0x0a, 0x0b, 0x48, 0x65, 0x64, - 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x50, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x5c, 0x0a, 0x19, 0x61, 0x64, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, - 0x17, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x18, 0x68, 0x65, 0x64, 0x67, - 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x68, 0x65, 0x64, 0x67, - 0x65, 0x4f, 0x6e, 0x50, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x64, 0x67, - 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xe1, 0x05, 0x0a, 0x0e, 0x52, 0x65, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0e, 0x68, 0x74, - 0x74, 0x70, 0x73, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x68, 0x74, 0x74, 0x70, 0x73, 0x52, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x12, 0x29, 0x0a, 0x0f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5f, 0x72, 0x65, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x30, - 0x0a, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, - 0x01, 0x00, 0x52, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, - 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x01, 0x52, 0x0c, 0x70, 0x61, 0x74, - 0x68, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x34, 0x0a, 0x0e, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x01, - 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, - 0x55, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, - 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x48, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x69, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x70, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x22, 0x77, 0x0a, 0x14, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x4f, - 0x56, 0x45, 0x44, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x4c, 0x59, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, - 0x53, 0x45, 0x45, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x54, - 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, - 0x54, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, - 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x04, 0x3a, 0x28, 0x9a, 0xc5, 0x88, - 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1a, 0x0a, 0x18, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5f, - 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x42, 0x18, 0x0a, 0x16, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xa1, 0x01, 0x0a, 0x14, - 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x10, 0xd8, 0x04, 0x28, 0xc8, - 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x3a, - 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x15, 0x0a, 0x13, 0x4e, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6f, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x70, - 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, - 0x61, 0x67, 0x61, 0x74, 0x65, 0x3a, 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0xd2, 0x02, 0x0a, 0x07, 0x54, - 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x49, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, - 0x67, 0x12, 0x49, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, - 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x61, - 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x4b, 0x0a, 0x10, - 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, - 0x6c, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, - 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x3a, 0x21, 0x9a, 0xc5, - 0x88, 0x1e, 0x1c, 0x0a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x22, - 0xb4, 0x01, 0x0a, 0x0e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, - 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, - 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, - 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x52, 0x06, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0xc9, 0x1c, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4b, - 0x65, 0x79, 0x12, 0x4b, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x3f, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x1a, 0xb5, 0x18, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x0e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x6d, 0x0a, 0x13, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x61, 0x0a, 0x0f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5e, 0x0a, - 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, - 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, - 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x12, 0x68, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x10, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x77, - 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, - 0x61, 0x42, 0x11, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0xb8, 0xee, - 0xf2, 0xd2, 0x05, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4a, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, 0x15, 0x6d, 0x61, 0x73, 0x6b, 0x65, 0x64, 0x5f, 0x72, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x73, 0x6b, - 0x65, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, - 0x00, 0x52, 0x13, 0x6d, 0x61, 0x73, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x1b, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, - 0x52, 0x18, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x49, 0x0a, 0x0d, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, - 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x53, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, - 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0xd1, 0x01, 0x0a, 0x0e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, - 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, - 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, - 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, - 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x69, 0x66, 0x5f, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x49, 0x66, 0x41, 0x62, 0x73, - 0x65, 0x6e, 0x74, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x49, - 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, - 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0xbe, 0x01, 0x0a, 0x13, 0x4d, 0x61, - 0x73, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x52, 0x0a, 0x12, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6d, - 0x61, 0x73, 0x6b, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x2a, 0x02, 0x18, 0x20, 0x52, 0x0f, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4d, 0x61, - 0x73, 0x6b, 0x4c, 0x65, 0x6e, 0x12, 0x53, 0x0a, 0x12, 0x76, 0x36, 0x5f, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x18, 0x80, 0x01, 0x52, 0x0f, 0x76, 0x36, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x4d, 0x61, 0x73, 0x6b, 0x4c, 0x65, 0x6e, 0x1a, 0x9e, 0x01, 0x0a, 0x0a, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, - 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x4b, 0x65, 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x1a, 0xb3, 0x02, 0x0a, 0x10, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x65, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x65, - 0x78, 0x70, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x48, 0x0a, 0x07, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x1a, 0xb8, 0x01, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, - 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xda, 0x02, 0x0a, - 0x08, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0e, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x59, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, - 0x74, 0x61, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x73, - 0x6b, 0x69, 0x70, 0x5f, 0x69, 0x66, 0x5f, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x6b, 0x69, 0x70, 0x49, 0x66, 0x41, 0x62, 0x73, 0x65, 0x6e, - 0x74, 0x22, 0x26, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, - 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, 0x55, 0x54, - 0x45, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x01, 0x1a, 0x97, 0x02, 0x0a, 0x18, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, - 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x61, 0x0a, 0x10, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, - 0x08, 0x01, 0x52, 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x17, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xf2, 0x01, 0x0a, 0x08, 0x4f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x66, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, - 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x63, 0x0a, - 0x0f, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, - 0x65, 0x79, 0x42, 0x19, 0x0a, 0x12, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x23, 0x9a, - 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x22, 0xe6, 0x05, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, - 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0b, 0x65, 0x78, 0x61, 0x63, 0x74, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x18, 0x01, - 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x61, - 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x5c, 0x0a, 0x10, 0x73, 0x61, 0x66, 0x65, 0x5f, - 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, - 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, - 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x37, 0x0a, 0x0c, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x12, 0x18, 0x01, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, - 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x37, 0x0a, 0x0c, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0x18, 0x01, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, - 0x0b, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x0e, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0x18, 0x01, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x92, - 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x49, 0x0a, 0x0c, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x65, - 0x72, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x40, 0x0a, 0x1d, 0x74, 0x72, 0x65, 0x61, 0x74, - 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, - 0x61, 0x73, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, - 0x74, 0x72, 0x65, 0x61, 0x74, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x41, 0x73, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, - 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x02, - 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x52, 0x0b, - 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xa1, 0x02, 0x0a, 0x15, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x28, 0x80, 0x08, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, - 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x42, 0x21, 0x0a, 0x1f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, - 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x22, - 0xb9, 0x02, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x52, 0x0a, 0x16, 0x6d, 0x61, - 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x12, 0x40, - 0x0a, 0x17, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x05, 0x52, 0x15, 0x72, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, - 0x12, 0x4a, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x1b, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x65, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x22, 0x79, 0x0a, 0x0c, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, 0x0a, 0x06, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x69, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x8b, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x14, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, - 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_route_v3_route_components_proto_rawDescOnce sync.Once - file_envoy_config_route_v3_route_components_proto_rawDescData = file_envoy_config_route_v3_route_components_proto_rawDesc -) - -func file_envoy_config_route_v3_route_components_proto_rawDescGZIP() []byte { - file_envoy_config_route_v3_route_components_proto_rawDescOnce.Do(func() { - file_envoy_config_route_v3_route_components_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_route_v3_route_components_proto_rawDescData) - }) - return file_envoy_config_route_v3_route_components_proto_rawDescData -} - -var file_envoy_config_route_v3_route_components_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_envoy_config_route_v3_route_components_proto_msgTypes = make([]protoimpl.MessageInfo, 58) -var file_envoy_config_route_v3_route_components_proto_goTypes = []interface{}{ - (VirtualHost_TlsRequirementType)(0), // 0: envoy.config.route.v3.VirtualHost.TlsRequirementType - (RouteAction_ClusterNotFoundResponseCode)(0), // 1: envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode - (RouteAction_InternalRedirectAction)(0), // 2: envoy.config.route.v3.RouteAction.InternalRedirectAction - (RetryPolicy_ResetHeaderFormat)(0), // 3: envoy.config.route.v3.RetryPolicy.ResetHeaderFormat - (RedirectAction_RedirectResponseCode)(0), // 4: envoy.config.route.v3.RedirectAction.RedirectResponseCode - (RateLimit_Action_MetaData_Source)(0), // 5: envoy.config.route.v3.RateLimit.Action.MetaData.Source - (*VirtualHost)(nil), // 6: envoy.config.route.v3.VirtualHost - (*FilterAction)(nil), // 7: envoy.config.route.v3.FilterAction - (*RouteList)(nil), // 8: envoy.config.route.v3.RouteList - (*Route)(nil), // 9: envoy.config.route.v3.Route - (*WeightedCluster)(nil), // 10: envoy.config.route.v3.WeightedCluster - (*ClusterSpecifierPlugin)(nil), // 11: envoy.config.route.v3.ClusterSpecifierPlugin - (*RouteMatch)(nil), // 12: envoy.config.route.v3.RouteMatch - (*CorsPolicy)(nil), // 13: envoy.config.route.v3.CorsPolicy - (*RouteAction)(nil), // 14: envoy.config.route.v3.RouteAction - (*RetryPolicy)(nil), // 15: envoy.config.route.v3.RetryPolicy - (*HedgePolicy)(nil), // 16: envoy.config.route.v3.HedgePolicy - (*RedirectAction)(nil), // 17: envoy.config.route.v3.RedirectAction - (*DirectResponseAction)(nil), // 18: envoy.config.route.v3.DirectResponseAction - (*NonForwardingAction)(nil), // 19: envoy.config.route.v3.NonForwardingAction - (*Decorator)(nil), // 20: envoy.config.route.v3.Decorator - (*Tracing)(nil), // 21: envoy.config.route.v3.Tracing - (*VirtualCluster)(nil), // 22: envoy.config.route.v3.VirtualCluster - (*RateLimit)(nil), // 23: envoy.config.route.v3.RateLimit - (*HeaderMatcher)(nil), // 24: envoy.config.route.v3.HeaderMatcher - (*QueryParameterMatcher)(nil), // 25: envoy.config.route.v3.QueryParameterMatcher - (*InternalRedirectPolicy)(nil), // 26: envoy.config.route.v3.InternalRedirectPolicy - (*FilterConfig)(nil), // 27: envoy.config.route.v3.FilterConfig - nil, // 28: envoy.config.route.v3.VirtualHost.TypedPerFilterConfigEntry - nil, // 29: envoy.config.route.v3.Route.TypedPerFilterConfigEntry - (*WeightedCluster_ClusterWeight)(nil), // 30: envoy.config.route.v3.WeightedCluster.ClusterWeight - nil, // 31: envoy.config.route.v3.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry - (*RouteMatch_GrpcRouteMatchOptions)(nil), // 32: envoy.config.route.v3.RouteMatch.GrpcRouteMatchOptions - (*RouteMatch_TlsContextMatchOptions)(nil), // 33: envoy.config.route.v3.RouteMatch.TlsContextMatchOptions - (*RouteMatch_ConnectMatcher)(nil), // 34: envoy.config.route.v3.RouteMatch.ConnectMatcher - (*RouteAction_RequestMirrorPolicy)(nil), // 35: envoy.config.route.v3.RouteAction.RequestMirrorPolicy - (*RouteAction_HashPolicy)(nil), // 36: envoy.config.route.v3.RouteAction.HashPolicy - (*RouteAction_UpgradeConfig)(nil), // 37: envoy.config.route.v3.RouteAction.UpgradeConfig - (*RouteAction_MaxStreamDuration)(nil), // 38: envoy.config.route.v3.RouteAction.MaxStreamDuration - (*RouteAction_HashPolicy_Header)(nil), // 39: envoy.config.route.v3.RouteAction.HashPolicy.Header - (*RouteAction_HashPolicy_CookieAttribute)(nil), // 40: envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute - (*RouteAction_HashPolicy_Cookie)(nil), // 41: envoy.config.route.v3.RouteAction.HashPolicy.Cookie - (*RouteAction_HashPolicy_ConnectionProperties)(nil), // 42: envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties - (*RouteAction_HashPolicy_QueryParameter)(nil), // 43: envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter - (*RouteAction_HashPolicy_FilterState)(nil), // 44: envoy.config.route.v3.RouteAction.HashPolicy.FilterState - (*RouteAction_UpgradeConfig_ConnectConfig)(nil), // 45: envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig - (*RetryPolicy_RetryPriority)(nil), // 46: envoy.config.route.v3.RetryPolicy.RetryPriority - (*RetryPolicy_RetryHostPredicate)(nil), // 47: envoy.config.route.v3.RetryPolicy.RetryHostPredicate - (*RetryPolicy_RetryBackOff)(nil), // 48: envoy.config.route.v3.RetryPolicy.RetryBackOff - (*RetryPolicy_ResetHeader)(nil), // 49: envoy.config.route.v3.RetryPolicy.ResetHeader - (*RetryPolicy_RateLimitedRetryBackOff)(nil), // 50: envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff - (*RateLimit_Action)(nil), // 51: envoy.config.route.v3.RateLimit.Action - (*RateLimit_Override)(nil), // 52: envoy.config.route.v3.RateLimit.Override - (*RateLimit_Action_SourceCluster)(nil), // 53: envoy.config.route.v3.RateLimit.Action.SourceCluster - (*RateLimit_Action_DestinationCluster)(nil), // 54: envoy.config.route.v3.RateLimit.Action.DestinationCluster - (*RateLimit_Action_RequestHeaders)(nil), // 55: envoy.config.route.v3.RateLimit.Action.RequestHeaders - (*RateLimit_Action_RemoteAddress)(nil), // 56: envoy.config.route.v3.RateLimit.Action.RemoteAddress - (*RateLimit_Action_MaskedRemoteAddress)(nil), // 57: envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress - (*RateLimit_Action_GenericKey)(nil), // 58: envoy.config.route.v3.RateLimit.Action.GenericKey - (*RateLimit_Action_HeaderValueMatch)(nil), // 59: envoy.config.route.v3.RateLimit.Action.HeaderValueMatch - (*RateLimit_Action_DynamicMetaData)(nil), // 60: envoy.config.route.v3.RateLimit.Action.DynamicMetaData - (*RateLimit_Action_MetaData)(nil), // 61: envoy.config.route.v3.RateLimit.Action.MetaData - (*RateLimit_Action_QueryParameterValueMatch)(nil), // 62: envoy.config.route.v3.RateLimit.Action.QueryParameterValueMatch - (*RateLimit_Override_DynamicMetadata)(nil), // 63: envoy.config.route.v3.RateLimit.Override.DynamicMetadata - (*v3.Matcher)(nil), // 64: xds.type.matcher.v3.Matcher - (*v31.HeaderValueOption)(nil), // 65: envoy.config.core.v3.HeaderValueOption - (*anypb.Any)(nil), // 66: google.protobuf.Any - (*wrapperspb.UInt32Value)(nil), // 67: google.protobuf.UInt32Value - (*v31.Metadata)(nil), // 68: envoy.config.core.v3.Metadata - (*v31.TypedExtensionConfig)(nil), // 69: envoy.config.core.v3.TypedExtensionConfig - (*v32.RegexMatcher)(nil), // 70: envoy.type.matcher.v3.RegexMatcher - (*wrapperspb.BoolValue)(nil), // 71: google.protobuf.BoolValue - (*v31.RuntimeFractionalPercent)(nil), // 72: envoy.config.core.v3.RuntimeFractionalPercent - (*v32.MetadataMatcher)(nil), // 73: envoy.type.matcher.v3.MetadataMatcher - (*v32.StringMatcher)(nil), // 74: envoy.type.matcher.v3.StringMatcher - (*v32.RegexMatchAndSubstitute)(nil), // 75: envoy.type.matcher.v3.RegexMatchAndSubstitute - (*durationpb.Duration)(nil), // 76: google.protobuf.Duration - (v31.RoutingPriority)(0), // 77: envoy.config.core.v3.RoutingPriority - (*v33.FractionalPercent)(nil), // 78: envoy.type.v3.FractionalPercent - (*v31.DataSource)(nil), // 79: envoy.config.core.v3.DataSource - (*v34.CustomTag)(nil), // 80: envoy.type.tracing.v3.CustomTag - (*v33.Int64Range)(nil), // 81: envoy.type.v3.Int64Range - (*v31.ProxyProtocolConfig)(nil), // 82: envoy.config.core.v3.ProxyProtocolConfig - (*v35.MetadataKey)(nil), // 83: envoy.type.metadata.v3.MetadataKey -} -var file_envoy_config_route_v3_route_components_proto_depIdxs = []int32{ - 9, // 0: envoy.config.route.v3.VirtualHost.routes:type_name -> envoy.config.route.v3.Route - 64, // 1: envoy.config.route.v3.VirtualHost.matcher:type_name -> xds.type.matcher.v3.Matcher - 0, // 2: envoy.config.route.v3.VirtualHost.require_tls:type_name -> envoy.config.route.v3.VirtualHost.TlsRequirementType - 22, // 3: envoy.config.route.v3.VirtualHost.virtual_clusters:type_name -> envoy.config.route.v3.VirtualCluster - 23, // 4: envoy.config.route.v3.VirtualHost.rate_limits:type_name -> envoy.config.route.v3.RateLimit - 65, // 5: envoy.config.route.v3.VirtualHost.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 65, // 6: envoy.config.route.v3.VirtualHost.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 13, // 7: envoy.config.route.v3.VirtualHost.cors:type_name -> envoy.config.route.v3.CorsPolicy - 28, // 8: envoy.config.route.v3.VirtualHost.typed_per_filter_config:type_name -> envoy.config.route.v3.VirtualHost.TypedPerFilterConfigEntry - 15, // 9: envoy.config.route.v3.VirtualHost.retry_policy:type_name -> envoy.config.route.v3.RetryPolicy - 66, // 10: envoy.config.route.v3.VirtualHost.retry_policy_typed_config:type_name -> google.protobuf.Any - 16, // 11: envoy.config.route.v3.VirtualHost.hedge_policy:type_name -> envoy.config.route.v3.HedgePolicy - 67, // 12: envoy.config.route.v3.VirtualHost.per_request_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 35, // 13: envoy.config.route.v3.VirtualHost.request_mirror_policies:type_name -> envoy.config.route.v3.RouteAction.RequestMirrorPolicy - 66, // 14: envoy.config.route.v3.FilterAction.action:type_name -> google.protobuf.Any - 9, // 15: envoy.config.route.v3.RouteList.routes:type_name -> envoy.config.route.v3.Route - 12, // 16: envoy.config.route.v3.Route.match:type_name -> envoy.config.route.v3.RouteMatch - 14, // 17: envoy.config.route.v3.Route.route:type_name -> envoy.config.route.v3.RouteAction - 17, // 18: envoy.config.route.v3.Route.redirect:type_name -> envoy.config.route.v3.RedirectAction - 18, // 19: envoy.config.route.v3.Route.direct_response:type_name -> envoy.config.route.v3.DirectResponseAction - 7, // 20: envoy.config.route.v3.Route.filter_action:type_name -> envoy.config.route.v3.FilterAction - 19, // 21: envoy.config.route.v3.Route.non_forwarding_action:type_name -> envoy.config.route.v3.NonForwardingAction - 68, // 22: envoy.config.route.v3.Route.metadata:type_name -> envoy.config.core.v3.Metadata - 20, // 23: envoy.config.route.v3.Route.decorator:type_name -> envoy.config.route.v3.Decorator - 29, // 24: envoy.config.route.v3.Route.typed_per_filter_config:type_name -> envoy.config.route.v3.Route.TypedPerFilterConfigEntry - 65, // 25: envoy.config.route.v3.Route.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 65, // 26: envoy.config.route.v3.Route.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 21, // 27: envoy.config.route.v3.Route.tracing:type_name -> envoy.config.route.v3.Tracing - 67, // 28: envoy.config.route.v3.Route.per_request_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 30, // 29: envoy.config.route.v3.WeightedCluster.clusters:type_name -> envoy.config.route.v3.WeightedCluster.ClusterWeight - 67, // 30: envoy.config.route.v3.WeightedCluster.total_weight:type_name -> google.protobuf.UInt32Value - 69, // 31: envoy.config.route.v3.ClusterSpecifierPlugin.extension:type_name -> envoy.config.core.v3.TypedExtensionConfig - 70, // 32: envoy.config.route.v3.RouteMatch.safe_regex:type_name -> envoy.type.matcher.v3.RegexMatcher - 34, // 33: envoy.config.route.v3.RouteMatch.connect_matcher:type_name -> envoy.config.route.v3.RouteMatch.ConnectMatcher - 69, // 34: envoy.config.route.v3.RouteMatch.path_match_policy:type_name -> envoy.config.core.v3.TypedExtensionConfig - 71, // 35: envoy.config.route.v3.RouteMatch.case_sensitive:type_name -> google.protobuf.BoolValue - 72, // 36: envoy.config.route.v3.RouteMatch.runtime_fraction:type_name -> envoy.config.core.v3.RuntimeFractionalPercent - 24, // 37: envoy.config.route.v3.RouteMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher - 25, // 38: envoy.config.route.v3.RouteMatch.query_parameters:type_name -> envoy.config.route.v3.QueryParameterMatcher - 32, // 39: envoy.config.route.v3.RouteMatch.grpc:type_name -> envoy.config.route.v3.RouteMatch.GrpcRouteMatchOptions - 33, // 40: envoy.config.route.v3.RouteMatch.tls_context:type_name -> envoy.config.route.v3.RouteMatch.TlsContextMatchOptions - 73, // 41: envoy.config.route.v3.RouteMatch.dynamic_metadata:type_name -> envoy.type.matcher.v3.MetadataMatcher - 74, // 42: envoy.config.route.v3.CorsPolicy.allow_origin_string_match:type_name -> envoy.type.matcher.v3.StringMatcher - 71, // 43: envoy.config.route.v3.CorsPolicy.allow_credentials:type_name -> google.protobuf.BoolValue - 72, // 44: envoy.config.route.v3.CorsPolicy.filter_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent - 72, // 45: envoy.config.route.v3.CorsPolicy.shadow_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent - 71, // 46: envoy.config.route.v3.CorsPolicy.allow_private_network_access:type_name -> google.protobuf.BoolValue - 10, // 47: envoy.config.route.v3.RouteAction.weighted_clusters:type_name -> envoy.config.route.v3.WeightedCluster - 11, // 48: envoy.config.route.v3.RouteAction.inline_cluster_specifier_plugin:type_name -> envoy.config.route.v3.ClusterSpecifierPlugin - 1, // 49: envoy.config.route.v3.RouteAction.cluster_not_found_response_code:type_name -> envoy.config.route.v3.RouteAction.ClusterNotFoundResponseCode - 68, // 50: envoy.config.route.v3.RouteAction.metadata_match:type_name -> envoy.config.core.v3.Metadata - 75, // 51: envoy.config.route.v3.RouteAction.regex_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute - 69, // 52: envoy.config.route.v3.RouteAction.path_rewrite_policy:type_name -> envoy.config.core.v3.TypedExtensionConfig - 71, // 53: envoy.config.route.v3.RouteAction.auto_host_rewrite:type_name -> google.protobuf.BoolValue - 75, // 54: envoy.config.route.v3.RouteAction.host_rewrite_path_regex:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute - 76, // 55: envoy.config.route.v3.RouteAction.timeout:type_name -> google.protobuf.Duration - 76, // 56: envoy.config.route.v3.RouteAction.idle_timeout:type_name -> google.protobuf.Duration - 69, // 57: envoy.config.route.v3.RouteAction.early_data_policy:type_name -> envoy.config.core.v3.TypedExtensionConfig - 15, // 58: envoy.config.route.v3.RouteAction.retry_policy:type_name -> envoy.config.route.v3.RetryPolicy - 66, // 59: envoy.config.route.v3.RouteAction.retry_policy_typed_config:type_name -> google.protobuf.Any - 35, // 60: envoy.config.route.v3.RouteAction.request_mirror_policies:type_name -> envoy.config.route.v3.RouteAction.RequestMirrorPolicy - 77, // 61: envoy.config.route.v3.RouteAction.priority:type_name -> envoy.config.core.v3.RoutingPriority - 23, // 62: envoy.config.route.v3.RouteAction.rate_limits:type_name -> envoy.config.route.v3.RateLimit - 71, // 63: envoy.config.route.v3.RouteAction.include_vh_rate_limits:type_name -> google.protobuf.BoolValue - 36, // 64: envoy.config.route.v3.RouteAction.hash_policy:type_name -> envoy.config.route.v3.RouteAction.HashPolicy - 13, // 65: envoy.config.route.v3.RouteAction.cors:type_name -> envoy.config.route.v3.CorsPolicy - 76, // 66: envoy.config.route.v3.RouteAction.max_grpc_timeout:type_name -> google.protobuf.Duration - 76, // 67: envoy.config.route.v3.RouteAction.grpc_timeout_offset:type_name -> google.protobuf.Duration - 37, // 68: envoy.config.route.v3.RouteAction.upgrade_configs:type_name -> envoy.config.route.v3.RouteAction.UpgradeConfig - 26, // 69: envoy.config.route.v3.RouteAction.internal_redirect_policy:type_name -> envoy.config.route.v3.InternalRedirectPolicy - 2, // 70: envoy.config.route.v3.RouteAction.internal_redirect_action:type_name -> envoy.config.route.v3.RouteAction.InternalRedirectAction - 67, // 71: envoy.config.route.v3.RouteAction.max_internal_redirects:type_name -> google.protobuf.UInt32Value - 16, // 72: envoy.config.route.v3.RouteAction.hedge_policy:type_name -> envoy.config.route.v3.HedgePolicy - 38, // 73: envoy.config.route.v3.RouteAction.max_stream_duration:type_name -> envoy.config.route.v3.RouteAction.MaxStreamDuration - 67, // 74: envoy.config.route.v3.RetryPolicy.num_retries:type_name -> google.protobuf.UInt32Value - 76, // 75: envoy.config.route.v3.RetryPolicy.per_try_timeout:type_name -> google.protobuf.Duration - 76, // 76: envoy.config.route.v3.RetryPolicy.per_try_idle_timeout:type_name -> google.protobuf.Duration - 46, // 77: envoy.config.route.v3.RetryPolicy.retry_priority:type_name -> envoy.config.route.v3.RetryPolicy.RetryPriority - 47, // 78: envoy.config.route.v3.RetryPolicy.retry_host_predicate:type_name -> envoy.config.route.v3.RetryPolicy.RetryHostPredicate - 69, // 79: envoy.config.route.v3.RetryPolicy.retry_options_predicates:type_name -> envoy.config.core.v3.TypedExtensionConfig - 48, // 80: envoy.config.route.v3.RetryPolicy.retry_back_off:type_name -> envoy.config.route.v3.RetryPolicy.RetryBackOff - 50, // 81: envoy.config.route.v3.RetryPolicy.rate_limited_retry_back_off:type_name -> envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff - 24, // 82: envoy.config.route.v3.RetryPolicy.retriable_headers:type_name -> envoy.config.route.v3.HeaderMatcher - 24, // 83: envoy.config.route.v3.RetryPolicy.retriable_request_headers:type_name -> envoy.config.route.v3.HeaderMatcher - 67, // 84: envoy.config.route.v3.HedgePolicy.initial_requests:type_name -> google.protobuf.UInt32Value - 78, // 85: envoy.config.route.v3.HedgePolicy.additional_request_chance:type_name -> envoy.type.v3.FractionalPercent - 75, // 86: envoy.config.route.v3.RedirectAction.regex_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute - 4, // 87: envoy.config.route.v3.RedirectAction.response_code:type_name -> envoy.config.route.v3.RedirectAction.RedirectResponseCode - 79, // 88: envoy.config.route.v3.DirectResponseAction.body:type_name -> envoy.config.core.v3.DataSource - 71, // 89: envoy.config.route.v3.Decorator.propagate:type_name -> google.protobuf.BoolValue - 78, // 90: envoy.config.route.v3.Tracing.client_sampling:type_name -> envoy.type.v3.FractionalPercent - 78, // 91: envoy.config.route.v3.Tracing.random_sampling:type_name -> envoy.type.v3.FractionalPercent - 78, // 92: envoy.config.route.v3.Tracing.overall_sampling:type_name -> envoy.type.v3.FractionalPercent - 80, // 93: envoy.config.route.v3.Tracing.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag - 24, // 94: envoy.config.route.v3.VirtualCluster.headers:type_name -> envoy.config.route.v3.HeaderMatcher - 67, // 95: envoy.config.route.v3.RateLimit.stage:type_name -> google.protobuf.UInt32Value - 51, // 96: envoy.config.route.v3.RateLimit.actions:type_name -> envoy.config.route.v3.RateLimit.Action - 52, // 97: envoy.config.route.v3.RateLimit.limit:type_name -> envoy.config.route.v3.RateLimit.Override - 70, // 98: envoy.config.route.v3.HeaderMatcher.safe_regex_match:type_name -> envoy.type.matcher.v3.RegexMatcher - 81, // 99: envoy.config.route.v3.HeaderMatcher.range_match:type_name -> envoy.type.v3.Int64Range - 74, // 100: envoy.config.route.v3.HeaderMatcher.string_match:type_name -> envoy.type.matcher.v3.StringMatcher - 74, // 101: envoy.config.route.v3.QueryParameterMatcher.string_match:type_name -> envoy.type.matcher.v3.StringMatcher - 67, // 102: envoy.config.route.v3.InternalRedirectPolicy.max_internal_redirects:type_name -> google.protobuf.UInt32Value - 69, // 103: envoy.config.route.v3.InternalRedirectPolicy.predicates:type_name -> envoy.config.core.v3.TypedExtensionConfig - 66, // 104: envoy.config.route.v3.FilterConfig.config:type_name -> google.protobuf.Any - 66, // 105: envoy.config.route.v3.VirtualHost.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 66, // 106: envoy.config.route.v3.Route.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 67, // 107: envoy.config.route.v3.WeightedCluster.ClusterWeight.weight:type_name -> google.protobuf.UInt32Value - 68, // 108: envoy.config.route.v3.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.config.core.v3.Metadata - 65, // 109: envoy.config.route.v3.WeightedCluster.ClusterWeight.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 65, // 110: envoy.config.route.v3.WeightedCluster.ClusterWeight.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 31, // 111: envoy.config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config:type_name -> envoy.config.route.v3.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry - 66, // 112: envoy.config.route.v3.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 71, // 113: envoy.config.route.v3.RouteMatch.TlsContextMatchOptions.presented:type_name -> google.protobuf.BoolValue - 71, // 114: envoy.config.route.v3.RouteMatch.TlsContextMatchOptions.validated:type_name -> google.protobuf.BoolValue - 72, // 115: envoy.config.route.v3.RouteAction.RequestMirrorPolicy.runtime_fraction:type_name -> envoy.config.core.v3.RuntimeFractionalPercent - 71, // 116: envoy.config.route.v3.RouteAction.RequestMirrorPolicy.trace_sampled:type_name -> google.protobuf.BoolValue - 39, // 117: envoy.config.route.v3.RouteAction.HashPolicy.header:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.Header - 41, // 118: envoy.config.route.v3.RouteAction.HashPolicy.cookie:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.Cookie - 42, // 119: envoy.config.route.v3.RouteAction.HashPolicy.connection_properties:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties - 43, // 120: envoy.config.route.v3.RouteAction.HashPolicy.query_parameter:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter - 44, // 121: envoy.config.route.v3.RouteAction.HashPolicy.filter_state:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.FilterState - 71, // 122: envoy.config.route.v3.RouteAction.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue - 45, // 123: envoy.config.route.v3.RouteAction.UpgradeConfig.connect_config:type_name -> envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig - 76, // 124: envoy.config.route.v3.RouteAction.MaxStreamDuration.max_stream_duration:type_name -> google.protobuf.Duration - 76, // 125: envoy.config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max:type_name -> google.protobuf.Duration - 76, // 126: envoy.config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset:type_name -> google.protobuf.Duration - 75, // 127: envoy.config.route.v3.RouteAction.HashPolicy.Header.regex_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute - 76, // 128: envoy.config.route.v3.RouteAction.HashPolicy.Cookie.ttl:type_name -> google.protobuf.Duration - 40, // 129: envoy.config.route.v3.RouteAction.HashPolicy.Cookie.attributes:type_name -> envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute - 82, // 130: envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig.proxy_protocol_config:type_name -> envoy.config.core.v3.ProxyProtocolConfig - 66, // 131: envoy.config.route.v3.RetryPolicy.RetryPriority.typed_config:type_name -> google.protobuf.Any - 66, // 132: envoy.config.route.v3.RetryPolicy.RetryHostPredicate.typed_config:type_name -> google.protobuf.Any - 76, // 133: envoy.config.route.v3.RetryPolicy.RetryBackOff.base_interval:type_name -> google.protobuf.Duration - 76, // 134: envoy.config.route.v3.RetryPolicy.RetryBackOff.max_interval:type_name -> google.protobuf.Duration - 3, // 135: envoy.config.route.v3.RetryPolicy.ResetHeader.format:type_name -> envoy.config.route.v3.RetryPolicy.ResetHeaderFormat - 49, // 136: envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff.reset_headers:type_name -> envoy.config.route.v3.RetryPolicy.ResetHeader - 76, // 137: envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff.max_interval:type_name -> google.protobuf.Duration - 53, // 138: envoy.config.route.v3.RateLimit.Action.source_cluster:type_name -> envoy.config.route.v3.RateLimit.Action.SourceCluster - 54, // 139: envoy.config.route.v3.RateLimit.Action.destination_cluster:type_name -> envoy.config.route.v3.RateLimit.Action.DestinationCluster - 55, // 140: envoy.config.route.v3.RateLimit.Action.request_headers:type_name -> envoy.config.route.v3.RateLimit.Action.RequestHeaders - 56, // 141: envoy.config.route.v3.RateLimit.Action.remote_address:type_name -> envoy.config.route.v3.RateLimit.Action.RemoteAddress - 58, // 142: envoy.config.route.v3.RateLimit.Action.generic_key:type_name -> envoy.config.route.v3.RateLimit.Action.GenericKey - 59, // 143: envoy.config.route.v3.RateLimit.Action.header_value_match:type_name -> envoy.config.route.v3.RateLimit.Action.HeaderValueMatch - 60, // 144: envoy.config.route.v3.RateLimit.Action.dynamic_metadata:type_name -> envoy.config.route.v3.RateLimit.Action.DynamicMetaData - 61, // 145: envoy.config.route.v3.RateLimit.Action.metadata:type_name -> envoy.config.route.v3.RateLimit.Action.MetaData - 69, // 146: envoy.config.route.v3.RateLimit.Action.extension:type_name -> envoy.config.core.v3.TypedExtensionConfig - 57, // 147: envoy.config.route.v3.RateLimit.Action.masked_remote_address:type_name -> envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress - 62, // 148: envoy.config.route.v3.RateLimit.Action.query_parameter_value_match:type_name -> envoy.config.route.v3.RateLimit.Action.QueryParameterValueMatch - 63, // 149: envoy.config.route.v3.RateLimit.Override.dynamic_metadata:type_name -> envoy.config.route.v3.RateLimit.Override.DynamicMetadata - 67, // 150: envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress.v4_prefix_mask_len:type_name -> google.protobuf.UInt32Value - 67, // 151: envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress.v6_prefix_mask_len:type_name -> google.protobuf.UInt32Value - 71, // 152: envoy.config.route.v3.RateLimit.Action.HeaderValueMatch.expect_match:type_name -> google.protobuf.BoolValue - 24, // 153: envoy.config.route.v3.RateLimit.Action.HeaderValueMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher - 83, // 154: envoy.config.route.v3.RateLimit.Action.DynamicMetaData.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 83, // 155: envoy.config.route.v3.RateLimit.Action.MetaData.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 5, // 156: envoy.config.route.v3.RateLimit.Action.MetaData.source:type_name -> envoy.config.route.v3.RateLimit.Action.MetaData.Source - 71, // 157: envoy.config.route.v3.RateLimit.Action.QueryParameterValueMatch.expect_match:type_name -> google.protobuf.BoolValue - 25, // 158: envoy.config.route.v3.RateLimit.Action.QueryParameterValueMatch.query_parameters:type_name -> envoy.config.route.v3.QueryParameterMatcher - 83, // 159: envoy.config.route.v3.RateLimit.Override.DynamicMetadata.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 160, // [160:160] is the sub-list for method output_type - 160, // [160:160] is the sub-list for method input_type - 160, // [160:160] is the sub-list for extension type_name - 160, // [160:160] is the sub-list for extension extendee - 0, // [0:160] is the sub-list for field type_name -} - -func init() { file_envoy_config_route_v3_route_components_proto_init() } -func file_envoy_config_route_v3_route_components_proto_init() { - if File_envoy_config_route_v3_route_components_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_route_v3_route_components_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VirtualHost); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WeightedCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterSpecifierPlugin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CorsPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HedgePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RedirectAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DirectResponseAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NonForwardingAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Decorator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tracing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VirtualCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParameterMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InternalRedirectPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WeightedCluster_ClusterWeight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch_GrpcRouteMatchOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch_TlsContextMatchOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch_ConnectMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_RequestMirrorPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_UpgradeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_MaxStreamDuration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_CookieAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_Cookie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_ConnectionProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_QueryParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_FilterState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_UpgradeConfig_ConnectConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_RetryPriority); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_RetryHostPredicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_RetryBackOff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_ResetHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_RateLimitedRetryBackOff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Override); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_SourceCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_DestinationCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_RequestHeaders); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_RemoteAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_MaskedRemoteAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_GenericKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_HeaderValueMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_DynamicMetaData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_MetaData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_QueryParameterValueMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Override_DynamicMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_route_v3_route_components_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*Route_Route)(nil), - (*Route_Redirect)(nil), - (*Route_DirectResponse)(nil), - (*Route_FilterAction)(nil), - (*Route_NonForwardingAction)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*WeightedCluster_HeaderName)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*RouteMatch_Prefix)(nil), - (*RouteMatch_Path)(nil), - (*RouteMatch_SafeRegex)(nil), - (*RouteMatch_ConnectMatcher_)(nil), - (*RouteMatch_PathSeparatedPrefix)(nil), - (*RouteMatch_PathMatchPolicy)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[7].OneofWrappers = []interface{}{ - (*CorsPolicy_FilterEnabled)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[8].OneofWrappers = []interface{}{ - (*RouteAction_Cluster)(nil), - (*RouteAction_ClusterHeader)(nil), - (*RouteAction_WeightedClusters)(nil), - (*RouteAction_ClusterSpecifierPlugin)(nil), - (*RouteAction_InlineClusterSpecifierPlugin)(nil), - (*RouteAction_HostRewriteLiteral)(nil), - (*RouteAction_AutoHostRewrite)(nil), - (*RouteAction_HostRewriteHeader)(nil), - (*RouteAction_HostRewritePathRegex)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[11].OneofWrappers = []interface{}{ - (*RedirectAction_HttpsRedirect)(nil), - (*RedirectAction_SchemeRedirect)(nil), - (*RedirectAction_PathRedirect)(nil), - (*RedirectAction_PrefixRewrite)(nil), - (*RedirectAction_RegexRewrite)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[18].OneofWrappers = []interface{}{ - (*HeaderMatcher_ExactMatch)(nil), - (*HeaderMatcher_SafeRegexMatch)(nil), - (*HeaderMatcher_RangeMatch)(nil), - (*HeaderMatcher_PresentMatch)(nil), - (*HeaderMatcher_PrefixMatch)(nil), - (*HeaderMatcher_SuffixMatch)(nil), - (*HeaderMatcher_ContainsMatch)(nil), - (*HeaderMatcher_StringMatch)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[19].OneofWrappers = []interface{}{ - (*QueryParameterMatcher_StringMatch)(nil), - (*QueryParameterMatcher_PresentMatch)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[24].OneofWrappers = []interface{}{ - (*WeightedCluster_ClusterWeight_HostRewriteLiteral)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[30].OneofWrappers = []interface{}{ - (*RouteAction_HashPolicy_Header_)(nil), - (*RouteAction_HashPolicy_Cookie_)(nil), - (*RouteAction_HashPolicy_ConnectionProperties_)(nil), - (*RouteAction_HashPolicy_QueryParameter_)(nil), - (*RouteAction_HashPolicy_FilterState_)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[40].OneofWrappers = []interface{}{ - (*RetryPolicy_RetryPriority_TypedConfig)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[41].OneofWrappers = []interface{}{ - (*RetryPolicy_RetryHostPredicate_TypedConfig)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[45].OneofWrappers = []interface{}{ - (*RateLimit_Action_SourceCluster_)(nil), - (*RateLimit_Action_DestinationCluster_)(nil), - (*RateLimit_Action_RequestHeaders_)(nil), - (*RateLimit_Action_RemoteAddress_)(nil), - (*RateLimit_Action_GenericKey_)(nil), - (*RateLimit_Action_HeaderValueMatch_)(nil), - (*RateLimit_Action_DynamicMetadata)(nil), - (*RateLimit_Action_Metadata)(nil), - (*RateLimit_Action_Extension)(nil), - (*RateLimit_Action_MaskedRemoteAddress_)(nil), - (*RateLimit_Action_QueryParameterValueMatch_)(nil), - } - file_envoy_config_route_v3_route_components_proto_msgTypes[46].OneofWrappers = []interface{}{ - (*RateLimit_Override_DynamicMetadata_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_route_v3_route_components_proto_rawDesc, - NumEnums: 6, - NumMessages: 58, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_route_v3_route_components_proto_goTypes, - DependencyIndexes: file_envoy_config_route_v3_route_components_proto_depIdxs, - EnumInfos: file_envoy_config_route_v3_route_components_proto_enumTypes, - MessageInfos: file_envoy_config_route_v3_route_components_proto_msgTypes, - }.Build() - File_envoy_config_route_v3_route_components_proto = out.File - file_envoy_config_route_v3_route_components_proto_rawDesc = nil - file_envoy_config_route_v3_route_components_proto_goTypes = nil - file_envoy_config_route_v3_route_components_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route_components.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route_components.pb.validate.go deleted file mode 100644 index 4c8519e5404..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/route_components.pb.validate.go +++ /dev/null @@ -1,12142 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/route/v3/route_components.proto - -package routev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" - - v3 "github.com/cilium/proxy/go/envoy/config/core/v3" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort - - _ = v3.RoutingPriority(0) -) - -// Validate checks the field values on VirtualHost with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *VirtualHost) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on VirtualHost with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in VirtualHostMultiError, or -// nil if none found. -func (m *VirtualHost) ValidateAll() error { - return m.validate(true) -} - -func (m *VirtualHost) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := VirtualHostValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetDomains()) < 1 { - err := VirtualHostValidationError{ - field: "Domains", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetDomains() { - _, _ = idx, item - - if !_VirtualHost_Domains_Pattern.MatchString(item) { - err := VirtualHostValidationError{ - field: fmt.Sprintf("Domains[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - for idx, item := range m.GetRoutes() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetMatcher()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "Matcher", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "Matcher", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "Matcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if _, ok := VirtualHost_TlsRequirementType_name[int32(m.GetRequireTls())]; !ok { - err := VirtualHostValidationError{ - field: "RequireTls", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetVirtualClusters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("VirtualClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("VirtualClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("VirtualClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRateLimits() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(m.GetRequestHeadersToAdd()) > 1000 { - err := VirtualHostValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRequestHeadersToRemove() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 1 { - err := VirtualHostValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_VirtualHost_RequestHeadersToRemove_Pattern.MatchString(item) { - err := VirtualHostValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - err := VirtualHostValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetResponseHeadersToRemove() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 1 { - err := VirtualHostValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_VirtualHost_ResponseHeadersToRemove_Pattern.MatchString(item) { - err := VirtualHostValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if all { - switch v := interface{}(m.GetCors()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - } - } - } - - { - sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) - i := 0 - for key := range m.GetTypedPerFilterConfig() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetTypedPerFilterConfig()[key] - _ = val - - // no validation rules for TypedPerFilterConfig[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - // no validation rules for IncludeRequestAttemptCount - - // no validation rules for IncludeAttemptCountInResponse - - if all { - switch v := interface{}(m.GetRetryPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRetryPolicyTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetHedgePolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for IncludeIsTimeoutRetryHeader - - if all { - switch v := interface{}(m.GetPerRequestBufferLimitBytes()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetRequestMirrorPolicies() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return VirtualHostMultiError(errors) - } - - return nil -} - -// VirtualHostMultiError is an error wrapping multiple validation errors -// returned by VirtualHost.ValidateAll() if the designated constraints aren't met. -type VirtualHostMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m VirtualHostMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m VirtualHostMultiError) AllErrors() []error { return m } - -// VirtualHostValidationError is the validation error returned by -// VirtualHost.Validate if the designated constraints aren't met. -type VirtualHostValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e VirtualHostValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e VirtualHostValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e VirtualHostValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e VirtualHostValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e VirtualHostValidationError) ErrorName() string { return "VirtualHostValidationError" } - -// Error satisfies the builtin error interface -func (e VirtualHostValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sVirtualHost.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = VirtualHostValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = VirtualHostValidationError{} - -var _VirtualHost_Domains_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _VirtualHost_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _VirtualHost_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on FilterAction with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *FilterAction) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FilterAction with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in FilterActionMultiError, or -// nil if none found. -func (m *FilterAction) ValidateAll() error { - return m.validate(true) -} - -func (m *FilterAction) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetAction()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterActionValidationError{ - field: "Action", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterActionValidationError{ - field: "Action", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterActionValidationError{ - field: "Action", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return FilterActionMultiError(errors) - } - - return nil -} - -// FilterActionMultiError is an error wrapping multiple validation errors -// returned by FilterAction.ValidateAll() if the designated constraints aren't met. -type FilterActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FilterActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FilterActionMultiError) AllErrors() []error { return m } - -// FilterActionValidationError is the validation error returned by -// FilterAction.Validate if the designated constraints aren't met. -type FilterActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterActionValidationError) ErrorName() string { return "FilterActionValidationError" } - -// Error satisfies the builtin error interface -func (e FilterActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilterAction.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterActionValidationError{} - -// Validate checks the field values on RouteList with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RouteList) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteList with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RouteListMultiError, or nil -// if none found. -func (m *RouteList) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteList) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetRoutes() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteListValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteListValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteListValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RouteListMultiError(errors) - } - - return nil -} - -// RouteListMultiError is an error wrapping multiple validation errors returned -// by RouteList.ValidateAll() if the designated constraints aren't met. -type RouteListMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteListMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteListMultiError) AllErrors() []error { return m } - -// RouteListValidationError is the validation error returned by -// RouteList.Validate if the designated constraints aren't met. -type RouteListValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteListValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteListValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteListValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteListValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteListValidationError) ErrorName() string { return "RouteListValidationError" } - -// Error satisfies the builtin error interface -func (e RouteListValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteList.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteListValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteListValidationError{} - -// Validate checks the field values on Route with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Route) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Route with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in RouteMultiError, or nil if none found. -func (m *Route) ValidateAll() error { - return m.validate(true) -} - -func (m *Route) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - if m.GetMatch() == nil { - err := RouteValidationError{ - field: "Match", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetDecorator()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Decorator", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Decorator", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDecorator()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Decorator", - reason: "embedded message failed validation", - cause: err, - } - } - } - - { - sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) - i := 0 - for key := range m.GetTypedPerFilterConfig() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetTypedPerFilterConfig()[key] - _ = val - - // no validation rules for TypedPerFilterConfig[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(m.GetRequestHeadersToAdd()) > 1000 { - err := RouteValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRequestHeadersToRemove() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 1 { - err := RouteValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_Route_RequestHeadersToRemove_Pattern.MatchString(item) { - err := RouteValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - err := RouteValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetResponseHeadersToRemove() { - _, _ = idx, item - - if utf8.RuneCountInString(item) < 1 { - err := RouteValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_Route_ResponseHeadersToRemove_Pattern.MatchString(item) { - err := RouteValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if all { - switch v := interface{}(m.GetTracing()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Tracing", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Tracing", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Tracing", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPerRequestBufferLimitBytes()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for StatPrefix - - oneofActionPresent := false - switch v := m.Action.(type) { - case *Route_Route: - if v == nil { - err := RouteValidationError{ - field: "Action", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionPresent = true - - if all { - switch v := interface{}(m.GetRoute()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Route_Redirect: - if v == nil { - err := RouteValidationError{ - field: "Action", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionPresent = true - - if all { - switch v := interface{}(m.GetRedirect()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Redirect", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Redirect", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRedirect()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Redirect", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Route_DirectResponse: - if v == nil { - err := RouteValidationError{ - field: "Action", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionPresent = true - - if all { - switch v := interface{}(m.GetDirectResponse()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "DirectResponse", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "DirectResponse", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDirectResponse()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "DirectResponse", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Route_FilterAction: - if v == nil { - err := RouteValidationError{ - field: "Action", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionPresent = true - - if all { - switch v := interface{}(m.GetFilterAction()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "FilterAction", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "FilterAction", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFilterAction()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "FilterAction", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Route_NonForwardingAction: - if v == nil { - err := RouteValidationError{ - field: "Action", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionPresent = true - - if all { - switch v := interface{}(m.GetNonForwardingAction()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "NonForwardingAction", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "NonForwardingAction", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNonForwardingAction()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "NonForwardingAction", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofActionPresent { - err := RouteValidationError{ - field: "Action", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteMultiError(errors) - } - - return nil -} - -// RouteMultiError is an error wrapping multiple validation errors returned by -// Route.ValidateAll() if the designated constraints aren't met. -type RouteMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteMultiError) AllErrors() []error { return m } - -// RouteValidationError is the validation error returned by Route.Validate if -// the designated constraints aren't met. -type RouteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteValidationError) ErrorName() string { return "RouteValidationError" } - -// Error satisfies the builtin error interface -func (e RouteValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRoute.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteValidationError{} - -var _Route_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _Route_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on WeightedCluster with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *WeightedCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on WeightedCluster with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// WeightedClusterMultiError, or nil if none found. -func (m *WeightedCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *WeightedCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetClusters()) < 1 { - err := WeightedClusterValidationError{ - field: "Clusters", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetClusters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedClusterValidationError{ - field: fmt.Sprintf("Clusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedClusterValidationError{ - field: fmt.Sprintf("Clusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedClusterValidationError{ - field: fmt.Sprintf("Clusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetTotalWeight()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedClusterValidationError{ - field: "TotalWeight", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedClusterValidationError{ - field: "TotalWeight", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTotalWeight()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedClusterValidationError{ - field: "TotalWeight", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for RuntimeKeyPrefix - - switch v := m.RandomValueSpecifier.(type) { - case *WeightedCluster_HeaderName: - if v == nil { - err := WeightedClusterValidationError{ - field: "RandomValueSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_WeightedCluster_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - err := WeightedClusterValidationError{ - field: "HeaderName", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return WeightedClusterMultiError(errors) - } - - return nil -} - -// WeightedClusterMultiError is an error wrapping multiple validation errors -// returned by WeightedCluster.ValidateAll() if the designated constraints -// aren't met. -type WeightedClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m WeightedClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m WeightedClusterMultiError) AllErrors() []error { return m } - -// WeightedClusterValidationError is the validation error returned by -// WeightedCluster.Validate if the designated constraints aren't met. -type WeightedClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e WeightedClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e WeightedClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e WeightedClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e WeightedClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e WeightedClusterValidationError) ErrorName() string { return "WeightedClusterValidationError" } - -// Error satisfies the builtin error interface -func (e WeightedClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sWeightedCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = WeightedClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = WeightedClusterValidationError{} - -var _WeightedCluster_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on ClusterSpecifierPlugin with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ClusterSpecifierPlugin) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ClusterSpecifierPlugin with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ClusterSpecifierPluginMultiError, or nil if none found. -func (m *ClusterSpecifierPlugin) ValidateAll() error { - return m.validate(true) -} - -func (m *ClusterSpecifierPlugin) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetExtension() == nil { - err := ClusterSpecifierPluginValidationError{ - field: "Extension", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetExtension()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterSpecifierPluginValidationError{ - field: "Extension", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterSpecifierPluginValidationError{ - field: "Extension", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExtension()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterSpecifierPluginValidationError{ - field: "Extension", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for IsOptional - - if len(errors) > 0 { - return ClusterSpecifierPluginMultiError(errors) - } - - return nil -} - -// ClusterSpecifierPluginMultiError is an error wrapping multiple validation -// errors returned by ClusterSpecifierPlugin.ValidateAll() if the designated -// constraints aren't met. -type ClusterSpecifierPluginMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ClusterSpecifierPluginMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ClusterSpecifierPluginMultiError) AllErrors() []error { return m } - -// ClusterSpecifierPluginValidationError is the validation error returned by -// ClusterSpecifierPlugin.Validate if the designated constraints aren't met. -type ClusterSpecifierPluginValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterSpecifierPluginValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterSpecifierPluginValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterSpecifierPluginValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterSpecifierPluginValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterSpecifierPluginValidationError) ErrorName() string { - return "ClusterSpecifierPluginValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterSpecifierPluginValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterSpecifierPlugin.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterSpecifierPluginValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterSpecifierPluginValidationError{} - -// Validate checks the field values on RouteMatch with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RouteMatch) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteMatch with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RouteMatchMultiError, or -// nil if none found. -func (m *RouteMatch) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteMatch) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetCaseSensitive()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "CaseSensitive", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "CaseSensitive", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCaseSensitive()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "CaseSensitive", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRuntimeFraction()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetQueryParameters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: fmt.Sprintf("QueryParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: fmt.Sprintf("QueryParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: fmt.Sprintf("QueryParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetGrpc()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "Grpc", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "Grpc", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGrpc()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "Grpc", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTlsContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetDynamicMetadata() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: fmt.Sprintf("DynamicMetadata[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: fmt.Sprintf("DynamicMetadata[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: fmt.Sprintf("DynamicMetadata[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - oneofPathSpecifierPresent := false - switch v := m.PathSpecifier.(type) { - case *RouteMatch_Prefix: - if v == nil { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPathSpecifierPresent = true - // no validation rules for Prefix - case *RouteMatch_Path: - if v == nil { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPathSpecifierPresent = true - // no validation rules for Path - case *RouteMatch_SafeRegex: - if v == nil { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPathSpecifierPresent = true - - if m.GetSafeRegex() == nil { - err := RouteMatchValidationError{ - field: "SafeRegex", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSafeRegex()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteMatch_ConnectMatcher_: - if v == nil { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPathSpecifierPresent = true - - if all { - switch v := interface{}(m.GetConnectMatcher()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "ConnectMatcher", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "ConnectMatcher", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConnectMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "ConnectMatcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteMatch_PathSeparatedPrefix: - if v == nil { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPathSpecifierPresent = true - - if !_RouteMatch_PathSeparatedPrefix_Pattern.MatchString(m.GetPathSeparatedPrefix()) { - err := RouteMatchValidationError{ - field: "PathSeparatedPrefix", - reason: "value does not match regex pattern \"^[^?#]+[^?#/]$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RouteMatch_PathMatchPolicy: - if v == nil { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPathSpecifierPresent = true - - if all { - switch v := interface{}(m.GetPathMatchPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "PathMatchPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "PathMatchPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPathMatchPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "PathMatchPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofPathSpecifierPresent { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteMatchMultiError(errors) - } - - return nil -} - -// RouteMatchMultiError is an error wrapping multiple validation errors -// returned by RouteMatch.ValidateAll() if the designated constraints aren't met. -type RouteMatchMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteMatchMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteMatchMultiError) AllErrors() []error { return m } - -// RouteMatchValidationError is the validation error returned by -// RouteMatch.Validate if the designated constraints aren't met. -type RouteMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteMatchValidationError) ErrorName() string { return "RouteMatchValidationError" } - -// Error satisfies the builtin error interface -func (e RouteMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteMatchValidationError{} - -var _RouteMatch_PathSeparatedPrefix_Pattern = regexp.MustCompile("^[^?#]+[^?#/]$") - -// Validate checks the field values on CorsPolicy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *CorsPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CorsPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in CorsPolicyMultiError, or -// nil if none found. -func (m *CorsPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *CorsPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetAllowOriginStringMatch() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for AllowMethods - - // no validation rules for AllowHeaders - - // no validation rules for ExposeHeaders - - // no validation rules for MaxAge - - if all { - switch v := interface{}(m.GetAllowCredentials()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "AllowCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "AllowCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAllowCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "AllowCredentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetShadowEnabled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "ShadowEnabled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "ShadowEnabled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "ShadowEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetAllowPrivateNetworkAccess()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "AllowPrivateNetworkAccess", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "AllowPrivateNetworkAccess", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAllowPrivateNetworkAccess()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "AllowPrivateNetworkAccess", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch v := m.EnabledSpecifier.(type) { - case *CorsPolicy_FilterEnabled: - if v == nil { - err := CorsPolicyValidationError{ - field: "EnabledSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetFilterEnabled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "FilterEnabled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "FilterEnabled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "FilterEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return CorsPolicyMultiError(errors) - } - - return nil -} - -// CorsPolicyMultiError is an error wrapping multiple validation errors -// returned by CorsPolicy.ValidateAll() if the designated constraints aren't met. -type CorsPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CorsPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CorsPolicyMultiError) AllErrors() []error { return m } - -// CorsPolicyValidationError is the validation error returned by -// CorsPolicy.Validate if the designated constraints aren't met. -type CorsPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CorsPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CorsPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CorsPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CorsPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CorsPolicyValidationError) ErrorName() string { return "CorsPolicyValidationError" } - -// Error satisfies the builtin error interface -func (e CorsPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCorsPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CorsPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CorsPolicyValidationError{} - -// Validate checks the field values on RouteAction with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RouteAction) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RouteActionMultiError, or -// nil if none found. -func (m *RouteAction) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := RouteAction_ClusterNotFoundResponseCode_name[int32(m.GetClusterNotFoundResponseCode())]; !ok { - err := RouteActionValidationError{ - field: "ClusterNotFoundResponseCode", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadataMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if !_RouteAction_PrefixRewrite_Pattern.MatchString(m.GetPrefixRewrite()) { - err := RouteActionValidationError{ - field: "PrefixRewrite", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetRegexRewrite()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPathRewritePolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "PathRewritePolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "PathRewritePolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPathRewritePolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "PathRewritePolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AppendXForwardedHost - - if all { - switch v := interface{}(m.GetTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetIdleTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetEarlyDataPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "EarlyDataPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "EarlyDataPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEarlyDataPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "EarlyDataPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRetryPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRetryPolicyTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetRequestMirrorPolicies() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if _, ok := v3.RoutingPriority_name[int32(m.GetPriority())]; !ok { - err := RouteActionValidationError{ - field: "Priority", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRateLimits() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetIncludeVhRateLimits()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "IncludeVhRateLimits", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "IncludeVhRateLimits", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetIncludeVhRateLimits()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "IncludeVhRateLimits", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetHashPolicy() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("HashPolicy[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("HashPolicy[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: fmt.Sprintf("HashPolicy[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetCors()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMaxGrpcTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MaxGrpcTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MaxGrpcTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxGrpcTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "MaxGrpcTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetGrpcTimeoutOffset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "GrpcTimeoutOffset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "GrpcTimeoutOffset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGrpcTimeoutOffset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "GrpcTimeoutOffset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetUpgradeConfigs() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("UpgradeConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("UpgradeConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: fmt.Sprintf("UpgradeConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetInternalRedirectPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "InternalRedirectPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "InternalRedirectPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetInternalRedirectPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "InternalRedirectPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for InternalRedirectAction - - if all { - switch v := interface{}(m.GetMaxInternalRedirects()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MaxInternalRedirects", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MaxInternalRedirects", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxInternalRedirects()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "MaxInternalRedirects", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetHedgePolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMaxStreamDuration()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - oneofClusterSpecifierPresent := false - switch v := m.ClusterSpecifier.(type) { - case *RouteAction_Cluster: - if v == nil { - err := RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofClusterSpecifierPresent = true - - if utf8.RuneCountInString(m.GetCluster()) < 1 { - err := RouteActionValidationError{ - field: "Cluster", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RouteAction_ClusterHeader: - if v == nil { - err := RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofClusterSpecifierPresent = true - - if utf8.RuneCountInString(m.GetClusterHeader()) < 1 { - err := RouteActionValidationError{ - field: "ClusterHeader", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RouteAction_ClusterHeader_Pattern.MatchString(m.GetClusterHeader()) { - err := RouteActionValidationError{ - field: "ClusterHeader", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RouteAction_WeightedClusters: - if v == nil { - err := RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofClusterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetWeightedClusters()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "WeightedClusters", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "WeightedClusters", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "WeightedClusters", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteAction_ClusterSpecifierPlugin: - if v == nil { - err := RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofClusterSpecifierPresent = true - // no validation rules for ClusterSpecifierPlugin - case *RouteAction_InlineClusterSpecifierPlugin: - if v == nil { - err := RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofClusterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetInlineClusterSpecifierPlugin()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "InlineClusterSpecifierPlugin", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "InlineClusterSpecifierPlugin", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetInlineClusterSpecifierPlugin()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "InlineClusterSpecifierPlugin", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofClusterSpecifierPresent { - err := RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - switch v := m.HostRewriteSpecifier.(type) { - case *RouteAction_HostRewriteLiteral: - if v == nil { - err := RouteActionValidationError{ - field: "HostRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RouteAction_HostRewriteLiteral_Pattern.MatchString(m.GetHostRewriteLiteral()) { - err := RouteActionValidationError{ - field: "HostRewriteLiteral", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RouteAction_AutoHostRewrite: - if v == nil { - err := RouteActionValidationError{ - field: "HostRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetAutoHostRewrite()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "AutoHostRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "AutoHostRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAutoHostRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "AutoHostRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteAction_HostRewriteHeader: - if v == nil { - err := RouteActionValidationError{ - field: "HostRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RouteAction_HostRewriteHeader_Pattern.MatchString(m.GetHostRewriteHeader()) { - err := RouteActionValidationError{ - field: "HostRewriteHeader", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RouteAction_HostRewritePathRegex: - if v == nil { - err := RouteActionValidationError{ - field: "HostRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetHostRewritePathRegex()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "HostRewritePathRegex", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "HostRewritePathRegex", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHostRewritePathRegex()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "HostRewritePathRegex", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return RouteActionMultiError(errors) - } - - return nil -} - -// RouteActionMultiError is an error wrapping multiple validation errors -// returned by RouteAction.ValidateAll() if the designated constraints aren't met. -type RouteActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteActionMultiError) AllErrors() []error { return m } - -// RouteActionValidationError is the validation error returned by -// RouteAction.Validate if the designated constraints aren't met. -type RouteActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteActionValidationError) ErrorName() string { return "RouteActionValidationError" } - -// Error satisfies the builtin error interface -func (e RouteActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteActionValidationError{} - -var _RouteAction_ClusterHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteAction_PrefixRewrite_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteAction_HostRewriteLiteral_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteAction_HostRewriteHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RetryPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RetryPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RetryPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RetryPolicyMultiError, or -// nil if none found. -func (m *RetryPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *RetryPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for RetryOn - - if all { - switch v := interface{}(m.GetNumRetries()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "NumRetries", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "NumRetries", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "NumRetries", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPerTryTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "PerTryTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "PerTryTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPerTryTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "PerTryTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPerTryIdleTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "PerTryIdleTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "PerTryIdleTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPerTryIdleTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "PerTryIdleTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRetryPriority()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RetryPriority", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RetryPriority", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPriority()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "RetryPriority", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetRetryHostPredicate() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetryHostPredicate[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetryHostPredicate[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: fmt.Sprintf("RetryHostPredicate[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRetryOptionsPredicates() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetryOptionsPredicates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetryOptionsPredicates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: fmt.Sprintf("RetryOptionsPredicates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for HostSelectionRetryMaxAttempts - - if all { - switch v := interface{}(m.GetRetryBackOff()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RetryBackOff", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RetryBackOff", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "RetryBackOff", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRateLimitedRetryBackOff()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RateLimitedRetryBackOff", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RateLimitedRetryBackOff", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRateLimitedRetryBackOff()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "RateLimitedRetryBackOff", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetRetriableHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRetriableRequestHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RetryPolicyMultiError(errors) - } - - return nil -} - -// RetryPolicyMultiError is an error wrapping multiple validation errors -// returned by RetryPolicy.ValidateAll() if the designated constraints aren't met. -type RetryPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RetryPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RetryPolicyMultiError) AllErrors() []error { return m } - -// RetryPolicyValidationError is the validation error returned by -// RetryPolicy.Validate if the designated constraints aren't met. -type RetryPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicyValidationError) ErrorName() string { return "RetryPolicyValidationError" } - -// Error satisfies the builtin error interface -func (e RetryPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicyValidationError{} - -// Validate checks the field values on HedgePolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HedgePolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HedgePolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HedgePolicyMultiError, or -// nil if none found. -func (m *HedgePolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *HedgePolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if wrapper := m.GetInitialRequests(); wrapper != nil { - - if wrapper.GetValue() < 1 { - err := HedgePolicyValidationError{ - field: "InitialRequests", - reason: "value must be greater than or equal to 1", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if all { - switch v := interface{}(m.GetAdditionalRequestChance()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HedgePolicyValidationError{ - field: "AdditionalRequestChance", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HedgePolicyValidationError{ - field: "AdditionalRequestChance", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAdditionalRequestChance()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HedgePolicyValidationError{ - field: "AdditionalRequestChance", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for HedgeOnPerTryTimeout - - if len(errors) > 0 { - return HedgePolicyMultiError(errors) - } - - return nil -} - -// HedgePolicyMultiError is an error wrapping multiple validation errors -// returned by HedgePolicy.ValidateAll() if the designated constraints aren't met. -type HedgePolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HedgePolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HedgePolicyMultiError) AllErrors() []error { return m } - -// HedgePolicyValidationError is the validation error returned by -// HedgePolicy.Validate if the designated constraints aren't met. -type HedgePolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HedgePolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HedgePolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HedgePolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HedgePolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HedgePolicyValidationError) ErrorName() string { return "HedgePolicyValidationError" } - -// Error satisfies the builtin error interface -func (e HedgePolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHedgePolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HedgePolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HedgePolicyValidationError{} - -// Validate checks the field values on RedirectAction with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RedirectAction) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RedirectAction with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RedirectActionMultiError, -// or nil if none found. -func (m *RedirectAction) ValidateAll() error { - return m.validate(true) -} - -func (m *RedirectAction) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if !_RedirectAction_HostRedirect_Pattern.MatchString(m.GetHostRedirect()) { - err := RedirectActionValidationError{ - field: "HostRedirect", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for PortRedirect - - if _, ok := RedirectAction_RedirectResponseCode_name[int32(m.GetResponseCode())]; !ok { - err := RedirectActionValidationError{ - field: "ResponseCode", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for StripQuery - - switch v := m.SchemeRewriteSpecifier.(type) { - case *RedirectAction_HttpsRedirect: - if v == nil { - err := RedirectActionValidationError{ - field: "SchemeRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for HttpsRedirect - case *RedirectAction_SchemeRedirect: - if v == nil { - err := RedirectActionValidationError{ - field: "SchemeRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for SchemeRedirect - default: - _ = v // ensures v is used - } - switch v := m.PathRewriteSpecifier.(type) { - case *RedirectAction_PathRedirect: - if v == nil { - err := RedirectActionValidationError{ - field: "PathRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RedirectAction_PathRedirect_Pattern.MatchString(m.GetPathRedirect()) { - err := RedirectActionValidationError{ - field: "PathRedirect", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RedirectAction_PrefixRewrite: - if v == nil { - err := RedirectActionValidationError{ - field: "PathRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RedirectAction_PrefixRewrite_Pattern.MatchString(m.GetPrefixRewrite()) { - err := RedirectActionValidationError{ - field: "PrefixRewrite", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RedirectAction_RegexRewrite: - if v == nil { - err := RedirectActionValidationError{ - field: "PathRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetRegexRewrite()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RedirectActionValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RedirectActionValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RedirectActionValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return RedirectActionMultiError(errors) - } - - return nil -} - -// RedirectActionMultiError is an error wrapping multiple validation errors -// returned by RedirectAction.ValidateAll() if the designated constraints -// aren't met. -type RedirectActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RedirectActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RedirectActionMultiError) AllErrors() []error { return m } - -// RedirectActionValidationError is the validation error returned by -// RedirectAction.Validate if the designated constraints aren't met. -type RedirectActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RedirectActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RedirectActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RedirectActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RedirectActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RedirectActionValidationError) ErrorName() string { return "RedirectActionValidationError" } - -// Error satisfies the builtin error interface -func (e RedirectActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRedirectAction.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RedirectActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RedirectActionValidationError{} - -var _RedirectAction_HostRedirect_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RedirectAction_PathRedirect_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RedirectAction_PrefixRewrite_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on DirectResponseAction with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DirectResponseAction) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DirectResponseAction with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DirectResponseActionMultiError, or nil if none found. -func (m *DirectResponseAction) ValidateAll() error { - return m.validate(true) -} - -func (m *DirectResponseAction) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if val := m.GetStatus(); val < 200 || val >= 600 { - err := DirectResponseActionValidationError{ - field: "Status", - reason: "value must be inside range [200, 600)", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetBody()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DirectResponseActionValidationError{ - field: "Body", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DirectResponseActionValidationError{ - field: "Body", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DirectResponseActionValidationError{ - field: "Body", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DirectResponseActionMultiError(errors) - } - - return nil -} - -// DirectResponseActionMultiError is an error wrapping multiple validation -// errors returned by DirectResponseAction.ValidateAll() if the designated -// constraints aren't met. -type DirectResponseActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DirectResponseActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DirectResponseActionMultiError) AllErrors() []error { return m } - -// DirectResponseActionValidationError is the validation error returned by -// DirectResponseAction.Validate if the designated constraints aren't met. -type DirectResponseActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DirectResponseActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DirectResponseActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DirectResponseActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DirectResponseActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DirectResponseActionValidationError) ErrorName() string { - return "DirectResponseActionValidationError" -} - -// Error satisfies the builtin error interface -func (e DirectResponseActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDirectResponseAction.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DirectResponseActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DirectResponseActionValidationError{} - -// Validate checks the field values on NonForwardingAction with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *NonForwardingAction) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on NonForwardingAction with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// NonForwardingActionMultiError, or nil if none found. -func (m *NonForwardingAction) ValidateAll() error { - return m.validate(true) -} - -func (m *NonForwardingAction) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return NonForwardingActionMultiError(errors) - } - - return nil -} - -// NonForwardingActionMultiError is an error wrapping multiple validation -// errors returned by NonForwardingAction.ValidateAll() if the designated -// constraints aren't met. -type NonForwardingActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NonForwardingActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m NonForwardingActionMultiError) AllErrors() []error { return m } - -// NonForwardingActionValidationError is the validation error returned by -// NonForwardingAction.Validate if the designated constraints aren't met. -type NonForwardingActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NonForwardingActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NonForwardingActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NonForwardingActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NonForwardingActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NonForwardingActionValidationError) ErrorName() string { - return "NonForwardingActionValidationError" -} - -// Error satisfies the builtin error interface -func (e NonForwardingActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNonForwardingAction.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NonForwardingActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NonForwardingActionValidationError{} - -// Validate checks the field values on Decorator with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Decorator) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Decorator with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DecoratorMultiError, or nil -// if none found. -func (m *Decorator) ValidateAll() error { - return m.validate(true) -} - -func (m *Decorator) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetOperation()) < 1 { - err := DecoratorValidationError{ - field: "Operation", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetPropagate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DecoratorValidationError{ - field: "Propagate", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DecoratorValidationError{ - field: "Propagate", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPropagate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DecoratorValidationError{ - field: "Propagate", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DecoratorMultiError(errors) - } - - return nil -} - -// DecoratorMultiError is an error wrapping multiple validation errors returned -// by Decorator.ValidateAll() if the designated constraints aren't met. -type DecoratorMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DecoratorMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DecoratorMultiError) AllErrors() []error { return m } - -// DecoratorValidationError is the validation error returned by -// Decorator.Validate if the designated constraints aren't met. -type DecoratorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DecoratorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DecoratorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DecoratorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DecoratorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DecoratorValidationError) ErrorName() string { return "DecoratorValidationError" } - -// Error satisfies the builtin error interface -func (e DecoratorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDecorator.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DecoratorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DecoratorValidationError{} - -// Validate checks the field values on Tracing with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Tracing) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Tracing with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in TracingMultiError, or nil if none found. -func (m *Tracing) ValidateAll() error { - return m.validate(true) -} - -func (m *Tracing) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetClientSampling()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TracingValidationError{ - field: "ClientSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TracingValidationError{ - field: "ClientSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetClientSampling()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TracingValidationError{ - field: "ClientSampling", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRandomSampling()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TracingValidationError{ - field: "RandomSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TracingValidationError{ - field: "RandomSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TracingValidationError{ - field: "RandomSampling", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetOverallSampling()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TracingValidationError{ - field: "OverallSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TracingValidationError{ - field: "OverallSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOverallSampling()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TracingValidationError{ - field: "OverallSampling", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetCustomTags() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TracingValidationError{ - field: fmt.Sprintf("CustomTags[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TracingValidationError{ - field: fmt.Sprintf("CustomTags[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TracingValidationError{ - field: fmt.Sprintf("CustomTags[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return TracingMultiError(errors) - } - - return nil -} - -// TracingMultiError is an error wrapping multiple validation errors returned -// by Tracing.ValidateAll() if the designated constraints aren't met. -type TracingMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TracingMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TracingMultiError) AllErrors() []error { return m } - -// TracingValidationError is the validation error returned by Tracing.Validate -// if the designated constraints aren't met. -type TracingValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TracingValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TracingValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TracingValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TracingValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TracingValidationError) ErrorName() string { return "TracingValidationError" } - -// Error satisfies the builtin error interface -func (e TracingValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTracing.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TracingValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TracingValidationError{} - -// Validate checks the field values on VirtualCluster with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *VirtualCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on VirtualCluster with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in VirtualClusterMultiError, -// or nil if none found. -func (m *VirtualCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *VirtualCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualClusterValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualClusterValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualClusterValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := VirtualClusterValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return VirtualClusterMultiError(errors) - } - - return nil -} - -// VirtualClusterMultiError is an error wrapping multiple validation errors -// returned by VirtualCluster.ValidateAll() if the designated constraints -// aren't met. -type VirtualClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m VirtualClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m VirtualClusterMultiError) AllErrors() []error { return m } - -// VirtualClusterValidationError is the validation error returned by -// VirtualCluster.Validate if the designated constraints aren't met. -type VirtualClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e VirtualClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e VirtualClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e VirtualClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e VirtualClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e VirtualClusterValidationError) ErrorName() string { return "VirtualClusterValidationError" } - -// Error satisfies the builtin error interface -func (e VirtualClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sVirtualCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = VirtualClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = VirtualClusterValidationError{} - -// Validate checks the field values on RateLimit with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RateLimit) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RateLimitMultiError, or nil -// if none found. -func (m *RateLimit) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if wrapper := m.GetStage(); wrapper != nil { - - if wrapper.GetValue() > 10 { - err := RateLimitValidationError{ - field: "Stage", - reason: "value must be less than or equal to 10", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - // no validation rules for DisableKey - - if len(m.GetActions()) < 1 { - err := RateLimitValidationError{ - field: "Actions", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetActions() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitValidationError{ - field: fmt.Sprintf("Actions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitValidationError{ - field: fmt.Sprintf("Actions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitValidationError{ - field: fmt.Sprintf("Actions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetLimit()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitValidationError{ - field: "Limit", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitValidationError{ - field: "Limit", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLimit()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitValidationError{ - field: "Limit", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RateLimitMultiError(errors) - } - - return nil -} - -// RateLimitMultiError is an error wrapping multiple validation errors returned -// by RateLimit.ValidateAll() if the designated constraints aren't met. -type RateLimitMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitMultiError) AllErrors() []error { return m } - -// RateLimitValidationError is the validation error returned by -// RateLimit.Validate if the designated constraints aren't met. -type RateLimitValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitValidationError) ErrorName() string { return "RateLimitValidationError" } - -// Error satisfies the builtin error interface -func (e RateLimitValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitValidationError{} - -// Validate checks the field values on HeaderMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HeaderMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HeaderMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HeaderMatcherMultiError, or -// nil if none found. -func (m *HeaderMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *HeaderMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := HeaderMatcherValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_HeaderMatcher_Name_Pattern.MatchString(m.GetName()) { - err := HeaderMatcherValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for InvertMatch - - // no validation rules for TreatMissingHeaderAsEmpty - - switch v := m.HeaderMatchSpecifier.(type) { - case *HeaderMatcher_ExactMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for ExactMatch - case *HeaderMatcher_SafeRegexMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSafeRegexMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HeaderMatcherValidationError{ - field: "SafeRegexMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HeaderMatcherValidationError{ - field: "SafeRegexMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSafeRegexMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeaderMatcherValidationError{ - field: "SafeRegexMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HeaderMatcher_RangeMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetRangeMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HeaderMatcherValidationError{ - field: "RangeMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HeaderMatcherValidationError{ - field: "RangeMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeaderMatcherValidationError{ - field: "RangeMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HeaderMatcher_PresentMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for PresentMatch - case *HeaderMatcher_PrefixMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetPrefixMatch()) < 1 { - err := HeaderMatcherValidationError{ - field: "PrefixMatch", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *HeaderMatcher_SuffixMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetSuffixMatch()) < 1 { - err := HeaderMatcherValidationError{ - field: "SuffixMatch", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *HeaderMatcher_ContainsMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetContainsMatch()) < 1 { - err := HeaderMatcherValidationError{ - field: "ContainsMatch", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *HeaderMatcher_StringMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetStringMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HeaderMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HeaderMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeaderMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return HeaderMatcherMultiError(errors) - } - - return nil -} - -// HeaderMatcherMultiError is an error wrapping multiple validation errors -// returned by HeaderMatcher.ValidateAll() if the designated constraints -// aren't met. -type HeaderMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HeaderMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HeaderMatcherMultiError) AllErrors() []error { return m } - -// HeaderMatcherValidationError is the validation error returned by -// HeaderMatcher.Validate if the designated constraints aren't met. -type HeaderMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderMatcherValidationError) ErrorName() string { return "HeaderMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e HeaderMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderMatcherValidationError{} - -var _HeaderMatcher_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on QueryParameterMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *QueryParameterMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on QueryParameterMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// QueryParameterMatcherMultiError, or nil if none found. -func (m *QueryParameterMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *QueryParameterMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := QueryParameterMatcherValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetName()) > 1024 { - err := QueryParameterMatcherValidationError{ - field: "Name", - reason: "value length must be at most 1024 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - switch v := m.QueryParameterMatchSpecifier.(type) { - case *QueryParameterMatcher_StringMatch: - if v == nil { - err := QueryParameterMatcherValidationError{ - field: "QueryParameterMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetStringMatch() == nil { - err := QueryParameterMatcherValidationError{ - field: "StringMatch", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetStringMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, QueryParameterMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, QueryParameterMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return QueryParameterMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *QueryParameterMatcher_PresentMatch: - if v == nil { - err := QueryParameterMatcherValidationError{ - field: "QueryParameterMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for PresentMatch - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return QueryParameterMatcherMultiError(errors) - } - - return nil -} - -// QueryParameterMatcherMultiError is an error wrapping multiple validation -// errors returned by QueryParameterMatcher.ValidateAll() if the designated -// constraints aren't met. -type QueryParameterMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m QueryParameterMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m QueryParameterMatcherMultiError) AllErrors() []error { return m } - -// QueryParameterMatcherValidationError is the validation error returned by -// QueryParameterMatcher.Validate if the designated constraints aren't met. -type QueryParameterMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e QueryParameterMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e QueryParameterMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e QueryParameterMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e QueryParameterMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e QueryParameterMatcherValidationError) ErrorName() string { - return "QueryParameterMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e QueryParameterMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sQueryParameterMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = QueryParameterMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = QueryParameterMatcherValidationError{} - -// Validate checks the field values on InternalRedirectPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *InternalRedirectPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on InternalRedirectPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// InternalRedirectPolicyMultiError, or nil if none found. -func (m *InternalRedirectPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *InternalRedirectPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetMaxInternalRedirects()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, InternalRedirectPolicyValidationError{ - field: "MaxInternalRedirects", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, InternalRedirectPolicyValidationError{ - field: "MaxInternalRedirects", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxInternalRedirects()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return InternalRedirectPolicyValidationError{ - field: "MaxInternalRedirects", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetRedirectResponseCodes()) > 5 { - err := InternalRedirectPolicyValidationError{ - field: "RedirectResponseCodes", - reason: "value must contain no more than 5 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetPredicates() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, InternalRedirectPolicyValidationError{ - field: fmt.Sprintf("Predicates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, InternalRedirectPolicyValidationError{ - field: fmt.Sprintf("Predicates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return InternalRedirectPolicyValidationError{ - field: fmt.Sprintf("Predicates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for AllowCrossSchemeRedirect - - if len(errors) > 0 { - return InternalRedirectPolicyMultiError(errors) - } - - return nil -} - -// InternalRedirectPolicyMultiError is an error wrapping multiple validation -// errors returned by InternalRedirectPolicy.ValidateAll() if the designated -// constraints aren't met. -type InternalRedirectPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m InternalRedirectPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m InternalRedirectPolicyMultiError) AllErrors() []error { return m } - -// InternalRedirectPolicyValidationError is the validation error returned by -// InternalRedirectPolicy.Validate if the designated constraints aren't met. -type InternalRedirectPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e InternalRedirectPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e InternalRedirectPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e InternalRedirectPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e InternalRedirectPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e InternalRedirectPolicyValidationError) ErrorName() string { - return "InternalRedirectPolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e InternalRedirectPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInternalRedirectPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = InternalRedirectPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = InternalRedirectPolicyValidationError{} - -// Validate checks the field values on FilterConfig with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *FilterConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FilterConfig with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in FilterConfigMultiError, or -// nil if none found. -func (m *FilterConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *FilterConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterConfigValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterConfigValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterConfigValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for IsOptional - - // no validation rules for Disabled - - if len(errors) > 0 { - return FilterConfigMultiError(errors) - } - - return nil -} - -// FilterConfigMultiError is an error wrapping multiple validation errors -// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. -type FilterConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FilterConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FilterConfigMultiError) AllErrors() []error { return m } - -// FilterConfigValidationError is the validation error returned by -// FilterConfig.Validate if the designated constraints aren't met. -type FilterConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterConfigValidationError) ErrorName() string { return "FilterConfigValidationError" } - -// Error satisfies the builtin error interface -func (e FilterConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilterConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterConfigValidationError{} - -// Validate checks the field values on WeightedCluster_ClusterWeight with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *WeightedCluster_ClusterWeight) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on WeightedCluster_ClusterWeight with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// WeightedCluster_ClusterWeightMultiError, or nil if none found. -func (m *WeightedCluster_ClusterWeight) ValidateAll() error { - return m.validate(true) -} - -func (m *WeightedCluster_ClusterWeight) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - if !_WeightedCluster_ClusterWeight_ClusterHeader_Pattern.MatchString(m.GetClusterHeader()) { - err := WeightedCluster_ClusterWeightValidationError{ - field: "ClusterHeader", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetWeight()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: "Weight", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: "Weight", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetWeight()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: "Weight", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadataMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetRequestHeadersToAdd()) > 1000 { - err := WeightedCluster_ClusterWeightValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRequestHeadersToRemove() { - _, _ = idx, item - - if !_WeightedCluster_ClusterWeight_RequestHeadersToRemove_Pattern.MatchString(item) { - err := WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - err := WeightedCluster_ClusterWeightValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetResponseHeadersToRemove() { - _, _ = idx, item - - if !_WeightedCluster_ClusterWeight_ResponseHeadersToRemove_Pattern.MatchString(item) { - err := WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - { - sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) - i := 0 - for key := range m.GetTypedPerFilterConfig() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetTypedPerFilterConfig()[key] - _ = val - - // no validation rules for TypedPerFilterConfig[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - switch v := m.HostRewriteSpecifier.(type) { - case *WeightedCluster_ClusterWeight_HostRewriteLiteral: - if v == nil { - err := WeightedCluster_ClusterWeightValidationError{ - field: "HostRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_WeightedCluster_ClusterWeight_HostRewriteLiteral_Pattern.MatchString(m.GetHostRewriteLiteral()) { - err := WeightedCluster_ClusterWeightValidationError{ - field: "HostRewriteLiteral", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return WeightedCluster_ClusterWeightMultiError(errors) - } - - return nil -} - -// WeightedCluster_ClusterWeightMultiError is an error wrapping multiple -// validation errors returned by WeightedCluster_ClusterWeight.ValidateAll() -// if the designated constraints aren't met. -type WeightedCluster_ClusterWeightMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m WeightedCluster_ClusterWeightMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m WeightedCluster_ClusterWeightMultiError) AllErrors() []error { return m } - -// WeightedCluster_ClusterWeightValidationError is the validation error -// returned by WeightedCluster_ClusterWeight.Validate if the designated -// constraints aren't met. -type WeightedCluster_ClusterWeightValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e WeightedCluster_ClusterWeightValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e WeightedCluster_ClusterWeightValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e WeightedCluster_ClusterWeightValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e WeightedCluster_ClusterWeightValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e WeightedCluster_ClusterWeightValidationError) ErrorName() string { - return "WeightedCluster_ClusterWeightValidationError" -} - -// Error satisfies the builtin error interface -func (e WeightedCluster_ClusterWeightValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sWeightedCluster_ClusterWeight.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = WeightedCluster_ClusterWeightValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = WeightedCluster_ClusterWeightValidationError{} - -var _WeightedCluster_ClusterWeight_ClusterHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _WeightedCluster_ClusterWeight_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _WeightedCluster_ClusterWeight_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _WeightedCluster_ClusterWeight_HostRewriteLiteral_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RouteMatch_GrpcRouteMatchOptions with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RouteMatch_GrpcRouteMatchOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteMatch_GrpcRouteMatchOptions with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RouteMatch_GrpcRouteMatchOptionsMultiError, or nil if none found. -func (m *RouteMatch_GrpcRouteMatchOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteMatch_GrpcRouteMatchOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RouteMatch_GrpcRouteMatchOptionsMultiError(errors) - } - - return nil -} - -// RouteMatch_GrpcRouteMatchOptionsMultiError is an error wrapping multiple -// validation errors returned by -// RouteMatch_GrpcRouteMatchOptions.ValidateAll() if the designated -// constraints aren't met. -type RouteMatch_GrpcRouteMatchOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteMatch_GrpcRouteMatchOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteMatch_GrpcRouteMatchOptionsMultiError) AllErrors() []error { return m } - -// RouteMatch_GrpcRouteMatchOptionsValidationError is the validation error -// returned by RouteMatch_GrpcRouteMatchOptions.Validate if the designated -// constraints aren't met. -type RouteMatch_GrpcRouteMatchOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) ErrorName() string { - return "RouteMatch_GrpcRouteMatchOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteMatch_GrpcRouteMatchOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteMatch_GrpcRouteMatchOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteMatch_GrpcRouteMatchOptionsValidationError{} - -// Validate checks the field values on RouteMatch_TlsContextMatchOptions with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RouteMatch_TlsContextMatchOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteMatch_TlsContextMatchOptions -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RouteMatch_TlsContextMatchOptionsMultiError, or nil if none found. -func (m *RouteMatch_TlsContextMatchOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteMatch_TlsContextMatchOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetPresented()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Presented", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Presented", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPresented()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Presented", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetValidated()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Validated", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Validated", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValidated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Validated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RouteMatch_TlsContextMatchOptionsMultiError(errors) - } - - return nil -} - -// RouteMatch_TlsContextMatchOptionsMultiError is an error wrapping multiple -// validation errors returned by -// RouteMatch_TlsContextMatchOptions.ValidateAll() if the designated -// constraints aren't met. -type RouteMatch_TlsContextMatchOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteMatch_TlsContextMatchOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteMatch_TlsContextMatchOptionsMultiError) AllErrors() []error { return m } - -// RouteMatch_TlsContextMatchOptionsValidationError is the validation error -// returned by RouteMatch_TlsContextMatchOptions.Validate if the designated -// constraints aren't met. -type RouteMatch_TlsContextMatchOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteMatch_TlsContextMatchOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteMatch_TlsContextMatchOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteMatch_TlsContextMatchOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteMatch_TlsContextMatchOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteMatch_TlsContextMatchOptionsValidationError) ErrorName() string { - return "RouteMatch_TlsContextMatchOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteMatch_TlsContextMatchOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteMatch_TlsContextMatchOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteMatch_TlsContextMatchOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteMatch_TlsContextMatchOptionsValidationError{} - -// Validate checks the field values on RouteMatch_ConnectMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteMatch_ConnectMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteMatch_ConnectMatcher with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RouteMatch_ConnectMatcherMultiError, or nil if none found. -func (m *RouteMatch_ConnectMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteMatch_ConnectMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RouteMatch_ConnectMatcherMultiError(errors) - } - - return nil -} - -// RouteMatch_ConnectMatcherMultiError is an error wrapping multiple validation -// errors returned by RouteMatch_ConnectMatcher.ValidateAll() if the -// designated constraints aren't met. -type RouteMatch_ConnectMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteMatch_ConnectMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteMatch_ConnectMatcherMultiError) AllErrors() []error { return m } - -// RouteMatch_ConnectMatcherValidationError is the validation error returned by -// RouteMatch_ConnectMatcher.Validate if the designated constraints aren't met. -type RouteMatch_ConnectMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteMatch_ConnectMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteMatch_ConnectMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteMatch_ConnectMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteMatch_ConnectMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteMatch_ConnectMatcherValidationError) ErrorName() string { - return "RouteMatch_ConnectMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteMatch_ConnectMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteMatch_ConnectMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteMatch_ConnectMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteMatch_ConnectMatcherValidationError{} - -// Validate checks the field values on RouteAction_RequestMirrorPolicy with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteAction_RequestMirrorPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_RequestMirrorPolicy with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RouteAction_RequestMirrorPolicyMultiError, or nil if none found. -func (m *RouteAction_RequestMirrorPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_RequestMirrorPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Cluster - - if !_RouteAction_RequestMirrorPolicy_ClusterHeader_Pattern.MatchString(m.GetClusterHeader()) { - err := RouteAction_RequestMirrorPolicyValidationError{ - field: "ClusterHeader", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetRuntimeFraction()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_RequestMirrorPolicyValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTraceSampled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ - field: "TraceSampled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ - field: "TraceSampled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTraceSampled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_RequestMirrorPolicyValidationError{ - field: "TraceSampled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RouteAction_RequestMirrorPolicyMultiError(errors) - } - - return nil -} - -// RouteAction_RequestMirrorPolicyMultiError is an error wrapping multiple -// validation errors returned by RouteAction_RequestMirrorPolicy.ValidateAll() -// if the designated constraints aren't met. -type RouteAction_RequestMirrorPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_RequestMirrorPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_RequestMirrorPolicyMultiError) AllErrors() []error { return m } - -// RouteAction_RequestMirrorPolicyValidationError is the validation error -// returned by RouteAction_RequestMirrorPolicy.Validate if the designated -// constraints aren't met. -type RouteAction_RequestMirrorPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_RequestMirrorPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_RequestMirrorPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_RequestMirrorPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_RequestMirrorPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_RequestMirrorPolicyValidationError) ErrorName() string { - return "RouteAction_RequestMirrorPolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_RequestMirrorPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_RequestMirrorPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_RequestMirrorPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_RequestMirrorPolicyValidationError{} - -var _RouteAction_RequestMirrorPolicy_ClusterHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RouteAction_HashPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteAction_HashPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_HashPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RouteAction_HashPolicyMultiError, or nil if none found. -func (m *RouteAction_HashPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Terminal - - oneofPolicySpecifierPresent := false - switch v := m.PolicySpecifier.(type) { - case *RouteAction_HashPolicy_Header_: - if v == nil { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetHeader()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicyValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteAction_HashPolicy_Cookie_: - if v == nil { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetCookie()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "Cookie", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "Cookie", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCookie()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicyValidationError{ - field: "Cookie", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteAction_HashPolicy_ConnectionProperties_: - if v == nil { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetConnectionProperties()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "ConnectionProperties", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "ConnectionProperties", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicyValidationError{ - field: "ConnectionProperties", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteAction_HashPolicy_QueryParameter_: - if v == nil { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetQueryParameter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "QueryParameter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "QueryParameter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetQueryParameter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicyValidationError{ - field: "QueryParameter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteAction_HashPolicy_FilterState_: - if v == nil { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetFilterState()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "FilterState", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "FilterState", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFilterState()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicyValidationError{ - field: "FilterState", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofPolicySpecifierPresent { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteAction_HashPolicyMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicyMultiError is an error wrapping multiple validation -// errors returned by RouteAction_HashPolicy.ValidateAll() if the designated -// constraints aren't met. -type RouteAction_HashPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicyMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicyValidationError is the validation error returned by -// RouteAction_HashPolicy.Validate if the designated constraints aren't met. -type RouteAction_HashPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicyValidationError) ErrorName() string { - return "RouteAction_HashPolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicyValidationError{} - -// Validate checks the field values on RouteAction_UpgradeConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteAction_UpgradeConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_UpgradeConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RouteAction_UpgradeConfigMultiError, or nil if none found. -func (m *RouteAction_UpgradeConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_UpgradeConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetUpgradeType()) < 1 { - err := RouteAction_UpgradeConfigValidationError{ - field: "UpgradeType", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RouteAction_UpgradeConfig_UpgradeType_Pattern.MatchString(m.GetUpgradeType()) { - err := RouteAction_UpgradeConfigValidationError{ - field: "UpgradeType", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetEnabled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_UpgradeConfigValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_UpgradeConfigValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_UpgradeConfigValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetConnectConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_UpgradeConfigValidationError{ - field: "ConnectConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_UpgradeConfigValidationError{ - field: "ConnectConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConnectConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_UpgradeConfigValidationError{ - field: "ConnectConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RouteAction_UpgradeConfigMultiError(errors) - } - - return nil -} - -// RouteAction_UpgradeConfigMultiError is an error wrapping multiple validation -// errors returned by RouteAction_UpgradeConfig.ValidateAll() if the -// designated constraints aren't met. -type RouteAction_UpgradeConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_UpgradeConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_UpgradeConfigMultiError) AllErrors() []error { return m } - -// RouteAction_UpgradeConfigValidationError is the validation error returned by -// RouteAction_UpgradeConfig.Validate if the designated constraints aren't met. -type RouteAction_UpgradeConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_UpgradeConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_UpgradeConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_UpgradeConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_UpgradeConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_UpgradeConfigValidationError) ErrorName() string { - return "RouteAction_UpgradeConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_UpgradeConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_UpgradeConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_UpgradeConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_UpgradeConfigValidationError{} - -var _RouteAction_UpgradeConfig_UpgradeType_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RouteAction_MaxStreamDuration with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteAction_MaxStreamDuration) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_MaxStreamDuration with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RouteAction_MaxStreamDurationMultiError, or nil if none found. -func (m *RouteAction_MaxStreamDuration) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_MaxStreamDuration) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetMaxStreamDuration()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_MaxStreamDurationValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_MaxStreamDurationValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxStreamDuration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_MaxStreamDurationValidationError{ - field: "MaxStreamDuration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetGrpcTimeoutHeaderMax()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_MaxStreamDurationValidationError{ - field: "GrpcTimeoutHeaderMax", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_MaxStreamDurationValidationError{ - field: "GrpcTimeoutHeaderMax", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGrpcTimeoutHeaderMax()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_MaxStreamDurationValidationError{ - field: "GrpcTimeoutHeaderMax", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetGrpcTimeoutHeaderOffset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_MaxStreamDurationValidationError{ - field: "GrpcTimeoutHeaderOffset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_MaxStreamDurationValidationError{ - field: "GrpcTimeoutHeaderOffset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGrpcTimeoutHeaderOffset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_MaxStreamDurationValidationError{ - field: "GrpcTimeoutHeaderOffset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RouteAction_MaxStreamDurationMultiError(errors) - } - - return nil -} - -// RouteAction_MaxStreamDurationMultiError is an error wrapping multiple -// validation errors returned by RouteAction_MaxStreamDuration.ValidateAll() -// if the designated constraints aren't met. -type RouteAction_MaxStreamDurationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_MaxStreamDurationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_MaxStreamDurationMultiError) AllErrors() []error { return m } - -// RouteAction_MaxStreamDurationValidationError is the validation error -// returned by RouteAction_MaxStreamDuration.Validate if the designated -// constraints aren't met. -type RouteAction_MaxStreamDurationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_MaxStreamDurationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_MaxStreamDurationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_MaxStreamDurationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_MaxStreamDurationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_MaxStreamDurationValidationError) ErrorName() string { - return "RouteAction_MaxStreamDurationValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_MaxStreamDurationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_MaxStreamDuration.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_MaxStreamDurationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_MaxStreamDurationValidationError{} - -// Validate checks the field values on RouteAction_HashPolicy_Header with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteAction_HashPolicy_Header) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_HashPolicy_Header with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RouteAction_HashPolicy_HeaderMultiError, or nil if none found. -func (m *RouteAction_HashPolicy_Header) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy_Header) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetHeaderName()) < 1 { - err := RouteAction_HashPolicy_HeaderValidationError{ - field: "HeaderName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RouteAction_HashPolicy_Header_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - err := RouteAction_HashPolicy_HeaderValidationError{ - field: "HeaderName", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetRegexRewrite()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicy_HeaderValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicy_HeaderValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicy_HeaderValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RouteAction_HashPolicy_HeaderMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicy_HeaderMultiError is an error wrapping multiple -// validation errors returned by RouteAction_HashPolicy_Header.ValidateAll() -// if the designated constraints aren't met. -type RouteAction_HashPolicy_HeaderMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicy_HeaderMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicy_HeaderMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicy_HeaderValidationError is the validation error -// returned by RouteAction_HashPolicy_Header.Validate if the designated -// constraints aren't met. -type RouteAction_HashPolicy_HeaderValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicy_HeaderValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicy_HeaderValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicy_HeaderValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicy_HeaderValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicy_HeaderValidationError) ErrorName() string { - return "RouteAction_HashPolicy_HeaderValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicy_HeaderValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy_Header.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicy_HeaderValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicy_HeaderValidationError{} - -var _RouteAction_HashPolicy_Header_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RouteAction_HashPolicy_CookieAttribute -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *RouteAction_HashPolicy_CookieAttribute) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// RouteAction_HashPolicy_CookieAttribute with the rules defined in the proto -// definition for this message. If any rules are violated, the result is a -// list of violation errors wrapped in -// RouteAction_HashPolicy_CookieAttributeMultiError, or nil if none found. -func (m *RouteAction_HashPolicy_CookieAttribute) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy_CookieAttribute) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := RouteAction_HashPolicy_CookieAttributeValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetName()) > 16384 { - err := RouteAction_HashPolicy_CookieAttributeValidationError{ - field: "Name", - reason: "value length must be at most 16384 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RouteAction_HashPolicy_CookieAttribute_Name_Pattern.MatchString(m.GetName()) { - err := RouteAction_HashPolicy_CookieAttributeValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetValue()) > 16384 { - err := RouteAction_HashPolicy_CookieAttributeValidationError{ - field: "Value", - reason: "value length must be at most 16384 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RouteAction_HashPolicy_CookieAttribute_Value_Pattern.MatchString(m.GetValue()) { - err := RouteAction_HashPolicy_CookieAttributeValidationError{ - field: "Value", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteAction_HashPolicy_CookieAttributeMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicy_CookieAttributeMultiError is an error wrapping -// multiple validation errors returned by -// RouteAction_HashPolicy_CookieAttribute.ValidateAll() if the designated -// constraints aren't met. -type RouteAction_HashPolicy_CookieAttributeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicy_CookieAttributeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicy_CookieAttributeMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicy_CookieAttributeValidationError is the validation -// error returned by RouteAction_HashPolicy_CookieAttribute.Validate if the -// designated constraints aren't met. -type RouteAction_HashPolicy_CookieAttributeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicy_CookieAttributeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicy_CookieAttributeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicy_CookieAttributeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicy_CookieAttributeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicy_CookieAttributeValidationError) ErrorName() string { - return "RouteAction_HashPolicy_CookieAttributeValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicy_CookieAttributeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy_CookieAttribute.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicy_CookieAttributeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicy_CookieAttributeValidationError{} - -var _RouteAction_HashPolicy_CookieAttribute_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteAction_HashPolicy_CookieAttribute_Value_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RouteAction_HashPolicy_Cookie with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteAction_HashPolicy_Cookie) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_HashPolicy_Cookie with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RouteAction_HashPolicy_CookieMultiError, or nil if none found. -func (m *RouteAction_HashPolicy_Cookie) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy_Cookie) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := RouteAction_HashPolicy_CookieValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTtl()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicy_CookieValidationError{ - field: "Ttl", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicy_CookieValidationError{ - field: "Ttl", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTtl()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicy_CookieValidationError{ - field: "Ttl", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Path - - for idx, item := range m.GetAttributes() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicy_CookieValidationError{ - field: fmt.Sprintf("Attributes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicy_CookieValidationError{ - field: fmt.Sprintf("Attributes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicy_CookieValidationError{ - field: fmt.Sprintf("Attributes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RouteAction_HashPolicy_CookieMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicy_CookieMultiError is an error wrapping multiple -// validation errors returned by RouteAction_HashPolicy_Cookie.ValidateAll() -// if the designated constraints aren't met. -type RouteAction_HashPolicy_CookieMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicy_CookieMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicy_CookieMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicy_CookieValidationError is the validation error -// returned by RouteAction_HashPolicy_Cookie.Validate if the designated -// constraints aren't met. -type RouteAction_HashPolicy_CookieValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicy_CookieValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicy_CookieValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicy_CookieValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicy_CookieValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicy_CookieValidationError) ErrorName() string { - return "RouteAction_HashPolicy_CookieValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicy_CookieValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy_Cookie.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicy_CookieValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicy_CookieValidationError{} - -// Validate checks the field values on -// RouteAction_HashPolicy_ConnectionProperties with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RouteAction_HashPolicy_ConnectionProperties) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// RouteAction_HashPolicy_ConnectionProperties with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// RouteAction_HashPolicy_ConnectionPropertiesMultiError, or nil if none found. -func (m *RouteAction_HashPolicy_ConnectionProperties) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy_ConnectionProperties) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for SourceIp - - if len(errors) > 0 { - return RouteAction_HashPolicy_ConnectionPropertiesMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicy_ConnectionPropertiesMultiError is an error wrapping -// multiple validation errors returned by -// RouteAction_HashPolicy_ConnectionProperties.ValidateAll() if the designated -// constraints aren't met. -type RouteAction_HashPolicy_ConnectionPropertiesMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicy_ConnectionPropertiesMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicy_ConnectionPropertiesMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicy_ConnectionPropertiesValidationError is the validation -// error returned by RouteAction_HashPolicy_ConnectionProperties.Validate if -// the designated constraints aren't met. -type RouteAction_HashPolicy_ConnectionPropertiesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) ErrorName() string { - return "RouteAction_HashPolicy_ConnectionPropertiesValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy_ConnectionProperties.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicy_ConnectionPropertiesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicy_ConnectionPropertiesValidationError{} - -// Validate checks the field values on RouteAction_HashPolicy_QueryParameter -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *RouteAction_HashPolicy_QueryParameter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_HashPolicy_QueryParameter -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RouteAction_HashPolicy_QueryParameterMultiError, or nil if none found. -func (m *RouteAction_HashPolicy_QueryParameter) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy_QueryParameter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := RouteAction_HashPolicy_QueryParameterValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteAction_HashPolicy_QueryParameterMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicy_QueryParameterMultiError is an error wrapping -// multiple validation errors returned by -// RouteAction_HashPolicy_QueryParameter.ValidateAll() if the designated -// constraints aren't met. -type RouteAction_HashPolicy_QueryParameterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicy_QueryParameterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicy_QueryParameterMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicy_QueryParameterValidationError is the validation error -// returned by RouteAction_HashPolicy_QueryParameter.Validate if the -// designated constraints aren't met. -type RouteAction_HashPolicy_QueryParameterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicy_QueryParameterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicy_QueryParameterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicy_QueryParameterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicy_QueryParameterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicy_QueryParameterValidationError) ErrorName() string { - return "RouteAction_HashPolicy_QueryParameterValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicy_QueryParameterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy_QueryParameter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicy_QueryParameterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicy_QueryParameterValidationError{} - -// Validate checks the field values on RouteAction_HashPolicy_FilterState with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RouteAction_HashPolicy_FilterState) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_HashPolicy_FilterState -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RouteAction_HashPolicy_FilterStateMultiError, or nil if none found. -func (m *RouteAction_HashPolicy_FilterState) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy_FilterState) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKey()) < 1 { - err := RouteAction_HashPolicy_FilterStateValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteAction_HashPolicy_FilterStateMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicy_FilterStateMultiError is an error wrapping multiple -// validation errors returned by -// RouteAction_HashPolicy_FilterState.ValidateAll() if the designated -// constraints aren't met. -type RouteAction_HashPolicy_FilterStateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicy_FilterStateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicy_FilterStateMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicy_FilterStateValidationError is the validation error -// returned by RouteAction_HashPolicy_FilterState.Validate if the designated -// constraints aren't met. -type RouteAction_HashPolicy_FilterStateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicy_FilterStateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicy_FilterStateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicy_FilterStateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicy_FilterStateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicy_FilterStateValidationError) ErrorName() string { - return "RouteAction_HashPolicy_FilterStateValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicy_FilterStateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy_FilterState.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicy_FilterStateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicy_FilterStateValidationError{} - -// Validate checks the field values on RouteAction_UpgradeConfig_ConnectConfig -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *RouteAction_UpgradeConfig_ConnectConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// RouteAction_UpgradeConfig_ConnectConfig with the rules defined in the proto -// definition for this message. If any rules are violated, the result is a -// list of violation errors wrapped in -// RouteAction_UpgradeConfig_ConnectConfigMultiError, or nil if none found. -func (m *RouteAction_UpgradeConfig_ConnectConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_UpgradeConfig_ConnectConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetProxyProtocolConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_UpgradeConfig_ConnectConfigValidationError{ - field: "ProxyProtocolConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_UpgradeConfig_ConnectConfigValidationError{ - field: "ProxyProtocolConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetProxyProtocolConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_UpgradeConfig_ConnectConfigValidationError{ - field: "ProxyProtocolConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AllowPost - - if len(errors) > 0 { - return RouteAction_UpgradeConfig_ConnectConfigMultiError(errors) - } - - return nil -} - -// RouteAction_UpgradeConfig_ConnectConfigMultiError is an error wrapping -// multiple validation errors returned by -// RouteAction_UpgradeConfig_ConnectConfig.ValidateAll() if the designated -// constraints aren't met. -type RouteAction_UpgradeConfig_ConnectConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_UpgradeConfig_ConnectConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_UpgradeConfig_ConnectConfigMultiError) AllErrors() []error { return m } - -// RouteAction_UpgradeConfig_ConnectConfigValidationError is the validation -// error returned by RouteAction_UpgradeConfig_ConnectConfig.Validate if the -// designated constraints aren't met. -type RouteAction_UpgradeConfig_ConnectConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) ErrorName() string { - return "RouteAction_UpgradeConfig_ConnectConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_UpgradeConfig_ConnectConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_UpgradeConfig_ConnectConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_UpgradeConfig_ConnectConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_UpgradeConfig_ConnectConfigValidationError{} - -// Validate checks the field values on RetryPolicy_RetryPriority with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RetryPolicy_RetryPriority) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RetryPolicy_RetryPriority with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RetryPolicy_RetryPriorityMultiError, or nil if none found. -func (m *RetryPolicy_RetryPriority) ValidateAll() error { - return m.validate(true) -} - -func (m *RetryPolicy_RetryPriority) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := RetryPolicy_RetryPriorityValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - switch v := m.ConfigType.(type) { - case *RetryPolicy_RetryPriority_TypedConfig: - if v == nil { - err := RetryPolicy_RetryPriorityValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicy_RetryPriorityValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicy_RetryPriorityValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicy_RetryPriorityValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return RetryPolicy_RetryPriorityMultiError(errors) - } - - return nil -} - -// RetryPolicy_RetryPriorityMultiError is an error wrapping multiple validation -// errors returned by RetryPolicy_RetryPriority.ValidateAll() if the -// designated constraints aren't met. -type RetryPolicy_RetryPriorityMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RetryPolicy_RetryPriorityMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RetryPolicy_RetryPriorityMultiError) AllErrors() []error { return m } - -// RetryPolicy_RetryPriorityValidationError is the validation error returned by -// RetryPolicy_RetryPriority.Validate if the designated constraints aren't met. -type RetryPolicy_RetryPriorityValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicy_RetryPriorityValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicy_RetryPriorityValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicy_RetryPriorityValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicy_RetryPriorityValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicy_RetryPriorityValidationError) ErrorName() string { - return "RetryPolicy_RetryPriorityValidationError" -} - -// Error satisfies the builtin error interface -func (e RetryPolicy_RetryPriorityValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy_RetryPriority.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicy_RetryPriorityValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicy_RetryPriorityValidationError{} - -// Validate checks the field values on RetryPolicy_RetryHostPredicate with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RetryPolicy_RetryHostPredicate) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RetryPolicy_RetryHostPredicate with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RetryPolicy_RetryHostPredicateMultiError, or nil if none found. -func (m *RetryPolicy_RetryHostPredicate) ValidateAll() error { - return m.validate(true) -} - -func (m *RetryPolicy_RetryHostPredicate) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := RetryPolicy_RetryHostPredicateValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - switch v := m.ConfigType.(type) { - case *RetryPolicy_RetryHostPredicate_TypedConfig: - if v == nil { - err := RetryPolicy_RetryHostPredicateValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicy_RetryHostPredicateValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return RetryPolicy_RetryHostPredicateMultiError(errors) - } - - return nil -} - -// RetryPolicy_RetryHostPredicateMultiError is an error wrapping multiple -// validation errors returned by RetryPolicy_RetryHostPredicate.ValidateAll() -// if the designated constraints aren't met. -type RetryPolicy_RetryHostPredicateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RetryPolicy_RetryHostPredicateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RetryPolicy_RetryHostPredicateMultiError) AllErrors() []error { return m } - -// RetryPolicy_RetryHostPredicateValidationError is the validation error -// returned by RetryPolicy_RetryHostPredicate.Validate if the designated -// constraints aren't met. -type RetryPolicy_RetryHostPredicateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicy_RetryHostPredicateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicy_RetryHostPredicateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicy_RetryHostPredicateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicy_RetryHostPredicateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicy_RetryHostPredicateValidationError) ErrorName() string { - return "RetryPolicy_RetryHostPredicateValidationError" -} - -// Error satisfies the builtin error interface -func (e RetryPolicy_RetryHostPredicateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy_RetryHostPredicate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicy_RetryHostPredicateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicy_RetryHostPredicateValidationError{} - -// Validate checks the field values on RetryPolicy_RetryBackOff with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RetryPolicy_RetryBackOff) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RetryPolicy_RetryBackOff with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RetryPolicy_RetryBackOffMultiError, or nil if none found. -func (m *RetryPolicy_RetryBackOff) ValidateAll() error { - return m.validate(true) -} - -func (m *RetryPolicy_RetryBackOff) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetBaseInterval() == nil { - err := RetryPolicy_RetryBackOffValidationError{ - field: "BaseInterval", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if d := m.GetBaseInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = RetryPolicy_RetryBackOffValidationError{ - field: "BaseInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := RetryPolicy_RetryBackOffValidationError{ - field: "BaseInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if d := m.GetMaxInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = RetryPolicy_RetryBackOffValidationError{ - field: "MaxInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := RetryPolicy_RetryBackOffValidationError{ - field: "MaxInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if len(errors) > 0 { - return RetryPolicy_RetryBackOffMultiError(errors) - } - - return nil -} - -// RetryPolicy_RetryBackOffMultiError is an error wrapping multiple validation -// errors returned by RetryPolicy_RetryBackOff.ValidateAll() if the designated -// constraints aren't met. -type RetryPolicy_RetryBackOffMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RetryPolicy_RetryBackOffMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RetryPolicy_RetryBackOffMultiError) AllErrors() []error { return m } - -// RetryPolicy_RetryBackOffValidationError is the validation error returned by -// RetryPolicy_RetryBackOff.Validate if the designated constraints aren't met. -type RetryPolicy_RetryBackOffValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicy_RetryBackOffValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicy_RetryBackOffValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicy_RetryBackOffValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicy_RetryBackOffValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicy_RetryBackOffValidationError) ErrorName() string { - return "RetryPolicy_RetryBackOffValidationError" -} - -// Error satisfies the builtin error interface -func (e RetryPolicy_RetryBackOffValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy_RetryBackOff.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicy_RetryBackOffValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicy_RetryBackOffValidationError{} - -// Validate checks the field values on RetryPolicy_ResetHeader with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RetryPolicy_ResetHeader) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RetryPolicy_ResetHeader with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RetryPolicy_ResetHeaderMultiError, or nil if none found. -func (m *RetryPolicy_ResetHeader) ValidateAll() error { - return m.validate(true) -} - -func (m *RetryPolicy_ResetHeader) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := RetryPolicy_ResetHeaderValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RetryPolicy_ResetHeader_Name_Pattern.MatchString(m.GetName()) { - err := RetryPolicy_ResetHeaderValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if _, ok := RetryPolicy_ResetHeaderFormat_name[int32(m.GetFormat())]; !ok { - err := RetryPolicy_ResetHeaderValidationError{ - field: "Format", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RetryPolicy_ResetHeaderMultiError(errors) - } - - return nil -} - -// RetryPolicy_ResetHeaderMultiError is an error wrapping multiple validation -// errors returned by RetryPolicy_ResetHeader.ValidateAll() if the designated -// constraints aren't met. -type RetryPolicy_ResetHeaderMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RetryPolicy_ResetHeaderMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RetryPolicy_ResetHeaderMultiError) AllErrors() []error { return m } - -// RetryPolicy_ResetHeaderValidationError is the validation error returned by -// RetryPolicy_ResetHeader.Validate if the designated constraints aren't met. -type RetryPolicy_ResetHeaderValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicy_ResetHeaderValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicy_ResetHeaderValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicy_ResetHeaderValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicy_ResetHeaderValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicy_ResetHeaderValidationError) ErrorName() string { - return "RetryPolicy_ResetHeaderValidationError" -} - -// Error satisfies the builtin error interface -func (e RetryPolicy_ResetHeaderValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy_ResetHeader.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicy_ResetHeaderValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicy_ResetHeaderValidationError{} - -var _RetryPolicy_ResetHeader_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RetryPolicy_RateLimitedRetryBackOff with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RetryPolicy_RateLimitedRetryBackOff) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RetryPolicy_RateLimitedRetryBackOff -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RetryPolicy_RateLimitedRetryBackOffMultiError, or nil if none found. -func (m *RetryPolicy_RateLimitedRetryBackOff) ValidateAll() error { - return m.validate(true) -} - -func (m *RetryPolicy_RateLimitedRetryBackOff) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetResetHeaders()) < 1 { - err := RetryPolicy_RateLimitedRetryBackOffValidationError{ - field: "ResetHeaders", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetResetHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicy_RateLimitedRetryBackOffValidationError{ - field: fmt.Sprintf("ResetHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicy_RateLimitedRetryBackOffValidationError{ - field: fmt.Sprintf("ResetHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicy_RateLimitedRetryBackOffValidationError{ - field: fmt.Sprintf("ResetHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if d := m.GetMaxInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = RetryPolicy_RateLimitedRetryBackOffValidationError{ - field: "MaxInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := RetryPolicy_RateLimitedRetryBackOffValidationError{ - field: "MaxInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if len(errors) > 0 { - return RetryPolicy_RateLimitedRetryBackOffMultiError(errors) - } - - return nil -} - -// RetryPolicy_RateLimitedRetryBackOffMultiError is an error wrapping multiple -// validation errors returned by -// RetryPolicy_RateLimitedRetryBackOff.ValidateAll() if the designated -// constraints aren't met. -type RetryPolicy_RateLimitedRetryBackOffMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RetryPolicy_RateLimitedRetryBackOffMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RetryPolicy_RateLimitedRetryBackOffMultiError) AllErrors() []error { return m } - -// RetryPolicy_RateLimitedRetryBackOffValidationError is the validation error -// returned by RetryPolicy_RateLimitedRetryBackOff.Validate if the designated -// constraints aren't met. -type RetryPolicy_RateLimitedRetryBackOffValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) ErrorName() string { - return "RetryPolicy_RateLimitedRetryBackOffValidationError" -} - -// Error satisfies the builtin error interface -func (e RetryPolicy_RateLimitedRetryBackOffValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy_RateLimitedRetryBackOff.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicy_RateLimitedRetryBackOffValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicy_RateLimitedRetryBackOffValidationError{} - -// Validate checks the field values on RateLimit_Action with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RateLimit_ActionMultiError, or nil if none found. -func (m *RateLimit_Action) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofActionSpecifierPresent := false - switch v := m.ActionSpecifier.(type) { - case *RateLimit_Action_SourceCluster_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetSourceCluster()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "SourceCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "SourceCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourceCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "SourceCluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_DestinationCluster_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetDestinationCluster()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "DestinationCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "DestinationCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDestinationCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "DestinationCluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_RequestHeaders_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetRequestHeaders()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "RequestHeaders", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "RequestHeaders", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "RequestHeaders", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_RemoteAddress_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetRemoteAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "RemoteAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "RemoteAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "RemoteAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_GenericKey_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetGenericKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "GenericKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "GenericKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGenericKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "GenericKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_HeaderValueMatch_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetHeaderValueMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "HeaderValueMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "HeaderValueMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHeaderValueMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "HeaderValueMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_DynamicMetadata: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetDynamicMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_Metadata: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_Extension: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetExtension()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "Extension", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "Extension", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExtension()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "Extension", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_MaskedRemoteAddress_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetMaskedRemoteAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "MaskedRemoteAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "MaskedRemoteAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaskedRemoteAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "MaskedRemoteAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_QueryParameterValueMatch_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetQueryParameterValueMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "QueryParameterValueMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "QueryParameterValueMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetQueryParameterValueMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "QueryParameterValueMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofActionSpecifierPresent { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RateLimit_ActionMultiError(errors) - } - - return nil -} - -// RateLimit_ActionMultiError is an error wrapping multiple validation errors -// returned by RateLimit_Action.ValidateAll() if the designated constraints -// aren't met. -type RateLimit_ActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_ActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_ActionMultiError) AllErrors() []error { return m } - -// RateLimit_ActionValidationError is the validation error returned by -// RateLimit_Action.Validate if the designated constraints aren't met. -type RateLimit_ActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_ActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_ActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_ActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_ActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_ActionValidationError) ErrorName() string { return "RateLimit_ActionValidationError" } - -// Error satisfies the builtin error interface -func (e RateLimit_ActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_ActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_ActionValidationError{} - -// Validate checks the field values on RateLimit_Override with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Override) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Override with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RateLimit_OverrideMultiError, or nil if none found. -func (m *RateLimit_Override) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Override) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofOverrideSpecifierPresent := false - switch v := m.OverrideSpecifier.(type) { - case *RateLimit_Override_DynamicMetadata_: - if v == nil { - err := RateLimit_OverrideValidationError{ - field: "OverrideSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofOverrideSpecifierPresent = true - - if all { - switch v := interface{}(m.GetDynamicMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_OverrideValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_OverrideValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_OverrideValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofOverrideSpecifierPresent { - err := RateLimit_OverrideValidationError{ - field: "OverrideSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RateLimit_OverrideMultiError(errors) - } - - return nil -} - -// RateLimit_OverrideMultiError is an error wrapping multiple validation errors -// returned by RateLimit_Override.ValidateAll() if the designated constraints -// aren't met. -type RateLimit_OverrideMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_OverrideMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_OverrideMultiError) AllErrors() []error { return m } - -// RateLimit_OverrideValidationError is the validation error returned by -// RateLimit_Override.Validate if the designated constraints aren't met. -type RateLimit_OverrideValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_OverrideValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_OverrideValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_OverrideValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_OverrideValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_OverrideValidationError) ErrorName() string { - return "RateLimit_OverrideValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_OverrideValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Override.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_OverrideValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_OverrideValidationError{} - -// Validate checks the field values on RateLimit_Action_SourceCluster with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action_SourceCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_SourceCluster with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_SourceClusterMultiError, or nil if none found. -func (m *RateLimit_Action_SourceCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_SourceCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RateLimit_Action_SourceClusterMultiError(errors) - } - - return nil -} - -// RateLimit_Action_SourceClusterMultiError is an error wrapping multiple -// validation errors returned by RateLimit_Action_SourceCluster.ValidateAll() -// if the designated constraints aren't met. -type RateLimit_Action_SourceClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_SourceClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_SourceClusterMultiError) AllErrors() []error { return m } - -// RateLimit_Action_SourceClusterValidationError is the validation error -// returned by RateLimit_Action_SourceCluster.Validate if the designated -// constraints aren't met. -type RateLimit_Action_SourceClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_SourceClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_SourceClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_SourceClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_SourceClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_SourceClusterValidationError) ErrorName() string { - return "RateLimit_Action_SourceClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_SourceClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_SourceCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_SourceClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_SourceClusterValidationError{} - -// Validate checks the field values on RateLimit_Action_DestinationCluster with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RateLimit_Action_DestinationCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_DestinationCluster -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_DestinationClusterMultiError, or nil if none found. -func (m *RateLimit_Action_DestinationCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_DestinationCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RateLimit_Action_DestinationClusterMultiError(errors) - } - - return nil -} - -// RateLimit_Action_DestinationClusterMultiError is an error wrapping multiple -// validation errors returned by -// RateLimit_Action_DestinationCluster.ValidateAll() if the designated -// constraints aren't met. -type RateLimit_Action_DestinationClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_DestinationClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_DestinationClusterMultiError) AllErrors() []error { return m } - -// RateLimit_Action_DestinationClusterValidationError is the validation error -// returned by RateLimit_Action_DestinationCluster.Validate if the designated -// constraints aren't met. -type RateLimit_Action_DestinationClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_DestinationClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_DestinationClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_DestinationClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_DestinationClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_DestinationClusterValidationError) ErrorName() string { - return "RateLimit_Action_DestinationClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_DestinationClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_DestinationCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_DestinationClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_DestinationClusterValidationError{} - -// Validate checks the field values on RateLimit_Action_RequestHeaders with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action_RequestHeaders) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_RequestHeaders with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_RequestHeadersMultiError, or nil if none found. -func (m *RateLimit_Action_RequestHeaders) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_RequestHeaders) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetHeaderName()) < 1 { - err := RateLimit_Action_RequestHeadersValidationError{ - field: "HeaderName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RateLimit_Action_RequestHeaders_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - err := RateLimit_Action_RequestHeadersValidationError{ - field: "HeaderName", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - err := RateLimit_Action_RequestHeadersValidationError{ - field: "DescriptorKey", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for SkipIfAbsent - - if len(errors) > 0 { - return RateLimit_Action_RequestHeadersMultiError(errors) - } - - return nil -} - -// RateLimit_Action_RequestHeadersMultiError is an error wrapping multiple -// validation errors returned by RateLimit_Action_RequestHeaders.ValidateAll() -// if the designated constraints aren't met. -type RateLimit_Action_RequestHeadersMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_RequestHeadersMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_RequestHeadersMultiError) AllErrors() []error { return m } - -// RateLimit_Action_RequestHeadersValidationError is the validation error -// returned by RateLimit_Action_RequestHeaders.Validate if the designated -// constraints aren't met. -type RateLimit_Action_RequestHeadersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_RequestHeadersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_RequestHeadersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_RequestHeadersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_RequestHeadersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_RequestHeadersValidationError) ErrorName() string { - return "RateLimit_Action_RequestHeadersValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_RequestHeadersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_RequestHeaders.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_RequestHeadersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_RequestHeadersValidationError{} - -var _RateLimit_Action_RequestHeaders_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RateLimit_Action_RemoteAddress with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action_RemoteAddress) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_RemoteAddress with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_RemoteAddressMultiError, or nil if none found. -func (m *RateLimit_Action_RemoteAddress) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_RemoteAddress) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RateLimit_Action_RemoteAddressMultiError(errors) - } - - return nil -} - -// RateLimit_Action_RemoteAddressMultiError is an error wrapping multiple -// validation errors returned by RateLimit_Action_RemoteAddress.ValidateAll() -// if the designated constraints aren't met. -type RateLimit_Action_RemoteAddressMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_RemoteAddressMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_RemoteAddressMultiError) AllErrors() []error { return m } - -// RateLimit_Action_RemoteAddressValidationError is the validation error -// returned by RateLimit_Action_RemoteAddress.Validate if the designated -// constraints aren't met. -type RateLimit_Action_RemoteAddressValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_RemoteAddressValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_RemoteAddressValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_RemoteAddressValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_RemoteAddressValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_RemoteAddressValidationError) ErrorName() string { - return "RateLimit_Action_RemoteAddressValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_RemoteAddressValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_RemoteAddress.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_RemoteAddressValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_RemoteAddressValidationError{} - -// Validate checks the field values on RateLimit_Action_MaskedRemoteAddress -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *RateLimit_Action_MaskedRemoteAddress) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_MaskedRemoteAddress -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_MaskedRemoteAddressMultiError, or nil if none found. -func (m *RateLimit_Action_MaskedRemoteAddress) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_MaskedRemoteAddress) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if wrapper := m.GetV4PrefixMaskLen(); wrapper != nil { - - if wrapper.GetValue() > 32 { - err := RateLimit_Action_MaskedRemoteAddressValidationError{ - field: "V4PrefixMaskLen", - reason: "value must be less than or equal to 32", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetV6PrefixMaskLen(); wrapper != nil { - - if wrapper.GetValue() > 128 { - err := RateLimit_Action_MaskedRemoteAddressValidationError{ - field: "V6PrefixMaskLen", - reason: "value must be less than or equal to 128", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(errors) > 0 { - return RateLimit_Action_MaskedRemoteAddressMultiError(errors) - } - - return nil -} - -// RateLimit_Action_MaskedRemoteAddressMultiError is an error wrapping multiple -// validation errors returned by -// RateLimit_Action_MaskedRemoteAddress.ValidateAll() if the designated -// constraints aren't met. -type RateLimit_Action_MaskedRemoteAddressMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_MaskedRemoteAddressMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_MaskedRemoteAddressMultiError) AllErrors() []error { return m } - -// RateLimit_Action_MaskedRemoteAddressValidationError is the validation error -// returned by RateLimit_Action_MaskedRemoteAddress.Validate if the designated -// constraints aren't met. -type RateLimit_Action_MaskedRemoteAddressValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_MaskedRemoteAddressValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_MaskedRemoteAddressValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_MaskedRemoteAddressValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_MaskedRemoteAddressValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_MaskedRemoteAddressValidationError) ErrorName() string { - return "RateLimit_Action_MaskedRemoteAddressValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_MaskedRemoteAddressValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_MaskedRemoteAddress.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_MaskedRemoteAddressValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_MaskedRemoteAddressValidationError{} - -// Validate checks the field values on RateLimit_Action_GenericKey with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action_GenericKey) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_GenericKey with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RateLimit_Action_GenericKeyMultiError, or nil if none found. -func (m *RateLimit_Action_GenericKey) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_GenericKey) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetDescriptorValue()) < 1 { - err := RateLimit_Action_GenericKeyValidationError{ - field: "DescriptorValue", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for DescriptorKey - - if len(errors) > 0 { - return RateLimit_Action_GenericKeyMultiError(errors) - } - - return nil -} - -// RateLimit_Action_GenericKeyMultiError is an error wrapping multiple -// validation errors returned by RateLimit_Action_GenericKey.ValidateAll() if -// the designated constraints aren't met. -type RateLimit_Action_GenericKeyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_GenericKeyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_GenericKeyMultiError) AllErrors() []error { return m } - -// RateLimit_Action_GenericKeyValidationError is the validation error returned -// by RateLimit_Action_GenericKey.Validate if the designated constraints -// aren't met. -type RateLimit_Action_GenericKeyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_GenericKeyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_GenericKeyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_GenericKeyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_GenericKeyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_GenericKeyValidationError) ErrorName() string { - return "RateLimit_Action_GenericKeyValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_GenericKeyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_GenericKey.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_GenericKeyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_GenericKeyValidationError{} - -// Validate checks the field values on RateLimit_Action_HeaderValueMatch with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RateLimit_Action_HeaderValueMatch) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_HeaderValueMatch -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_HeaderValueMatchMultiError, or nil if none found. -func (m *RateLimit_Action_HeaderValueMatch) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_HeaderValueMatch) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for DescriptorKey - - if utf8.RuneCountInString(m.GetDescriptorValue()) < 1 { - err := RateLimit_Action_HeaderValueMatchValidationError{ - field: "DescriptorValue", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetExpectMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ - field: "ExpectMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ - field: "ExpectMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExpectMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Action_HeaderValueMatchValidationError{ - field: "ExpectMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetHeaders()) < 1 { - err := RateLimit_Action_HeaderValueMatchValidationError{ - field: "Headers", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Action_HeaderValueMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RateLimit_Action_HeaderValueMatchMultiError(errors) - } - - return nil -} - -// RateLimit_Action_HeaderValueMatchMultiError is an error wrapping multiple -// validation errors returned by -// RateLimit_Action_HeaderValueMatch.ValidateAll() if the designated -// constraints aren't met. -type RateLimit_Action_HeaderValueMatchMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_HeaderValueMatchMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_HeaderValueMatchMultiError) AllErrors() []error { return m } - -// RateLimit_Action_HeaderValueMatchValidationError is the validation error -// returned by RateLimit_Action_HeaderValueMatch.Validate if the designated -// constraints aren't met. -type RateLimit_Action_HeaderValueMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_HeaderValueMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_HeaderValueMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_HeaderValueMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_HeaderValueMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_HeaderValueMatchValidationError) ErrorName() string { - return "RateLimit_Action_HeaderValueMatchValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_HeaderValueMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_HeaderValueMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_HeaderValueMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_HeaderValueMatchValidationError{} - -// Validate checks the field values on RateLimit_Action_DynamicMetaData with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RateLimit_Action_DynamicMetaData) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_DynamicMetaData with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_DynamicMetaDataMultiError, or nil if none found. -func (m *RateLimit_Action_DynamicMetaData) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_DynamicMetaData) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - err := RateLimit_Action_DynamicMetaDataValidationError{ - field: "DescriptorKey", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetMetadataKey() == nil { - err := RateLimit_Action_DynamicMetaDataValidationError{ - field: "MetadataKey", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadataKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_Action_DynamicMetaDataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_Action_DynamicMetaDataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Action_DynamicMetaDataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DefaultValue - - if len(errors) > 0 { - return RateLimit_Action_DynamicMetaDataMultiError(errors) - } - - return nil -} - -// RateLimit_Action_DynamicMetaDataMultiError is an error wrapping multiple -// validation errors returned by -// RateLimit_Action_DynamicMetaData.ValidateAll() if the designated -// constraints aren't met. -type RateLimit_Action_DynamicMetaDataMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_DynamicMetaDataMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_DynamicMetaDataMultiError) AllErrors() []error { return m } - -// RateLimit_Action_DynamicMetaDataValidationError is the validation error -// returned by RateLimit_Action_DynamicMetaData.Validate if the designated -// constraints aren't met. -type RateLimit_Action_DynamicMetaDataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_DynamicMetaDataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_DynamicMetaDataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_DynamicMetaDataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_DynamicMetaDataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_DynamicMetaDataValidationError) ErrorName() string { - return "RateLimit_Action_DynamicMetaDataValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_DynamicMetaDataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_DynamicMetaData.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_DynamicMetaDataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_DynamicMetaDataValidationError{} - -// Validate checks the field values on RateLimit_Action_MetaData with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action_MetaData) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_MetaData with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RateLimit_Action_MetaDataMultiError, or nil if none found. -func (m *RateLimit_Action_MetaData) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_MetaData) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - err := RateLimit_Action_MetaDataValidationError{ - field: "DescriptorKey", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetMetadataKey() == nil { - err := RateLimit_Action_MetaDataValidationError{ - field: "MetadataKey", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadataKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_Action_MetaDataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_Action_MetaDataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Action_MetaDataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DefaultValue - - if _, ok := RateLimit_Action_MetaData_Source_name[int32(m.GetSource())]; !ok { - err := RateLimit_Action_MetaDataValidationError{ - field: "Source", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for SkipIfAbsent - - if len(errors) > 0 { - return RateLimit_Action_MetaDataMultiError(errors) - } - - return nil -} - -// RateLimit_Action_MetaDataMultiError is an error wrapping multiple validation -// errors returned by RateLimit_Action_MetaData.ValidateAll() if the -// designated constraints aren't met. -type RateLimit_Action_MetaDataMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_MetaDataMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_MetaDataMultiError) AllErrors() []error { return m } - -// RateLimit_Action_MetaDataValidationError is the validation error returned by -// RateLimit_Action_MetaData.Validate if the designated constraints aren't met. -type RateLimit_Action_MetaDataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_MetaDataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_MetaDataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_MetaDataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_MetaDataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_MetaDataValidationError) ErrorName() string { - return "RateLimit_Action_MetaDataValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_MetaDataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_MetaData.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_MetaDataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_MetaDataValidationError{} - -// Validate checks the field values on -// RateLimit_Action_QueryParameterValueMatch with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action_QueryParameterValueMatch) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// RateLimit_Action_QueryParameterValueMatch with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// RateLimit_Action_QueryParameterValueMatchMultiError, or nil if none found. -func (m *RateLimit_Action_QueryParameterValueMatch) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_QueryParameterValueMatch) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for DescriptorKey - - if utf8.RuneCountInString(m.GetDescriptorValue()) < 1 { - err := RateLimit_Action_QueryParameterValueMatchValidationError{ - field: "DescriptorValue", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetExpectMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_Action_QueryParameterValueMatchValidationError{ - field: "ExpectMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_Action_QueryParameterValueMatchValidationError{ - field: "ExpectMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExpectMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Action_QueryParameterValueMatchValidationError{ - field: "ExpectMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetQueryParameters()) < 1 { - err := RateLimit_Action_QueryParameterValueMatchValidationError{ - field: "QueryParameters", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetQueryParameters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_Action_QueryParameterValueMatchValidationError{ - field: fmt.Sprintf("QueryParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_Action_QueryParameterValueMatchValidationError{ - field: fmt.Sprintf("QueryParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Action_QueryParameterValueMatchValidationError{ - field: fmt.Sprintf("QueryParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RateLimit_Action_QueryParameterValueMatchMultiError(errors) - } - - return nil -} - -// RateLimit_Action_QueryParameterValueMatchMultiError is an error wrapping -// multiple validation errors returned by -// RateLimit_Action_QueryParameterValueMatch.ValidateAll() if the designated -// constraints aren't met. -type RateLimit_Action_QueryParameterValueMatchMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_QueryParameterValueMatchMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_QueryParameterValueMatchMultiError) AllErrors() []error { return m } - -// RateLimit_Action_QueryParameterValueMatchValidationError is the validation -// error returned by RateLimit_Action_QueryParameterValueMatch.Validate if the -// designated constraints aren't met. -type RateLimit_Action_QueryParameterValueMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_QueryParameterValueMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_QueryParameterValueMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_QueryParameterValueMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_QueryParameterValueMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_QueryParameterValueMatchValidationError) ErrorName() string { - return "RateLimit_Action_QueryParameterValueMatchValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_QueryParameterValueMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_QueryParameterValueMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_QueryParameterValueMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_QueryParameterValueMatchValidationError{} - -// Validate checks the field values on RateLimit_Override_DynamicMetadata with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RateLimit_Override_DynamicMetadata) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Override_DynamicMetadata -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RateLimit_Override_DynamicMetadataMultiError, or nil if none found. -func (m *RateLimit_Override_DynamicMetadata) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Override_DynamicMetadata) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetMetadataKey() == nil { - err := RateLimit_Override_DynamicMetadataValidationError{ - field: "MetadataKey", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadataKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_Override_DynamicMetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_Override_DynamicMetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Override_DynamicMetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RateLimit_Override_DynamicMetadataMultiError(errors) - } - - return nil -} - -// RateLimit_Override_DynamicMetadataMultiError is an error wrapping multiple -// validation errors returned by -// RateLimit_Override_DynamicMetadata.ValidateAll() if the designated -// constraints aren't met. -type RateLimit_Override_DynamicMetadataMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Override_DynamicMetadataMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Override_DynamicMetadataMultiError) AllErrors() []error { return m } - -// RateLimit_Override_DynamicMetadataValidationError is the validation error -// returned by RateLimit_Override_DynamicMetadata.Validate if the designated -// constraints aren't met. -type RateLimit_Override_DynamicMetadataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Override_DynamicMetadataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Override_DynamicMetadataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Override_DynamicMetadataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Override_DynamicMetadataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Override_DynamicMetadataValidationError) ErrorName() string { - return "RateLimit_Override_DynamicMetadataValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Override_DynamicMetadataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Override_DynamicMetadata.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Override_DynamicMetadataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Override_DynamicMetadataValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/scoped_route.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/scoped_route.pb.go deleted file mode 100644 index 4a62ded521e..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/scoped_route.pb.go +++ /dev/null @@ -1,469 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/config/route/v3/scoped_route.proto - -package routev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies a routing scope, which associates a -// :ref:`Key` to a -// :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. -// The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` can be obtained dynamically -// via RDS (:ref:`route_configuration_name`) -// or specified inline (:ref:`route_configuration`). -// -// The HTTP connection manager builds up a table consisting of these Key to -// RouteConfiguration mappings, and looks up the RouteConfiguration to use per -// request according to the algorithm specified in the -// :ref:`scope_key_builder` -// assigned to the HttpConnectionManager. -// -// For example, with the following configurations (in YAML): -// -// HttpConnectionManager config: -// -// .. code:: -// -// ... -// scoped_routes: -// name: foo-scoped-routes -// scope_key_builder: -// fragments: -// - header_value_extractor: -// name: X-Route-Selector -// element_separator: "," -// element: -// separator: = -// key: vip -// -// ScopedRouteConfiguration resources (specified statically via -// :ref:`scoped_route_configurations_list` -// or obtained dynamically via SRDS): -// -// .. code:: -// -// (1) -// name: route-scope1 -// route_configuration_name: route-config1 -// key: -// fragments: -// - string_key: 172.10.10.20 -// -// (2) -// name: route-scope2 -// route_configuration_name: route-config2 -// key: -// fragments: -// - string_key: 172.20.20.30 -// -// A request from a client such as: -// -// .. code:: -// -// GET / HTTP/1.1 -// Host: foo.com -// X-Route-Selector: vip=172.10.10.20 -// -// would result in the routing table defined by the “route-config1“ -// RouteConfiguration being assigned to the HTTP request/stream. -// -// [#next-free-field: 6] -type ScopedRouteConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Whether the RouteConfiguration should be loaded on demand. - OnDemand bool `protobuf:"varint,4,opt,name=on_demand,json=onDemand,proto3" json:"on_demand,omitempty"` - // The name assigned to the routing scope. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an - // RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated - // with this scope. - RouteConfigurationName string `protobuf:"bytes,2,opt,name=route_configuration_name,json=routeConfigurationName,proto3" json:"route_configuration_name,omitempty"` - // The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated with the scope. - RouteConfiguration *RouteConfiguration `protobuf:"bytes,5,opt,name=route_configuration,json=routeConfiguration,proto3" json:"route_configuration,omitempty"` - // The key to match against. - Key *ScopedRouteConfiguration_Key `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *ScopedRouteConfiguration) Reset() { - *x = ScopedRouteConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_scoped_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRouteConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRouteConfiguration) ProtoMessage() {} - -func (x *ScopedRouteConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_scoped_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRouteConfiguration.ProtoReflect.Descriptor instead. -func (*ScopedRouteConfiguration) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_scoped_route_proto_rawDescGZIP(), []int{0} -} - -func (x *ScopedRouteConfiguration) GetOnDemand() bool { - if x != nil { - return x.OnDemand - } - return false -} - -func (x *ScopedRouteConfiguration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ScopedRouteConfiguration) GetRouteConfigurationName() string { - if x != nil { - return x.RouteConfigurationName - } - return "" -} - -func (x *ScopedRouteConfiguration) GetRouteConfiguration() *RouteConfiguration { - if x != nil { - return x.RouteConfiguration - } - return nil -} - -func (x *ScopedRouteConfiguration) GetKey() *ScopedRouteConfiguration_Key { - if x != nil { - return x.Key - } - return nil -} - -// Specifies a key which is matched against the output of the -// :ref:`scope_key_builder` -// specified in the HttpConnectionManager. The matching is done per HTTP -// request and is dependent on the order of the fragments contained in the -// Key. -type ScopedRouteConfiguration_Key struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The ordered set of fragments to match against. The order must match the - // fragments in the corresponding - // :ref:`scope_key_builder`. - Fragments []*ScopedRouteConfiguration_Key_Fragment `protobuf:"bytes,1,rep,name=fragments,proto3" json:"fragments,omitempty"` -} - -func (x *ScopedRouteConfiguration_Key) Reset() { - *x = ScopedRouteConfiguration_Key{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_scoped_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRouteConfiguration_Key) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRouteConfiguration_Key) ProtoMessage() {} - -func (x *ScopedRouteConfiguration_Key) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_scoped_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRouteConfiguration_Key.ProtoReflect.Descriptor instead. -func (*ScopedRouteConfiguration_Key) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_scoped_route_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *ScopedRouteConfiguration_Key) GetFragments() []*ScopedRouteConfiguration_Key_Fragment { - if x != nil { - return x.Fragments - } - return nil -} - -type ScopedRouteConfiguration_Key_Fragment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: - // - // *ScopedRouteConfiguration_Key_Fragment_StringKey - Type isScopedRouteConfiguration_Key_Fragment_Type `protobuf_oneof:"type"` -} - -func (x *ScopedRouteConfiguration_Key_Fragment) Reset() { - *x = ScopedRouteConfiguration_Key_Fragment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_route_v3_scoped_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRouteConfiguration_Key_Fragment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRouteConfiguration_Key_Fragment) ProtoMessage() {} - -func (x *ScopedRouteConfiguration_Key_Fragment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_route_v3_scoped_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRouteConfiguration_Key_Fragment.ProtoReflect.Descriptor instead. -func (*ScopedRouteConfiguration_Key_Fragment) Descriptor() ([]byte, []int) { - return file_envoy_config_route_v3_scoped_route_proto_rawDescGZIP(), []int{0, 0, 0} -} - -func (m *ScopedRouteConfiguration_Key_Fragment) GetType() isScopedRouteConfiguration_Key_Fragment_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *ScopedRouteConfiguration_Key_Fragment) GetStringKey() string { - if x, ok := x.GetType().(*ScopedRouteConfiguration_Key_Fragment_StringKey); ok { - return x.StringKey - } - return "" -} - -type isScopedRouteConfiguration_Key_Fragment_Type interface { - isScopedRouteConfiguration_Key_Fragment_Type() -} - -type ScopedRouteConfiguration_Key_Fragment_StringKey struct { - // A string to match against. - StringKey string `protobuf:"bytes,1,opt,name=string_key,json=stringKey,proto3,oneof"` -} - -func (*ScopedRouteConfiguration_Key_Fragment_StringKey) isScopedRouteConfiguration_Key_Fragment_Type() { -} - -var File_envoy_config_route_v3_scoped_route_proto protoreflect.FileDescriptor - -var file_envoy_config_route_v3_scoped_route_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, - 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xaa, 0x05, 0x0a, 0x18, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, - 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x6f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0e, - 0x12, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x14, - 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0e, 0x12, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, - 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x92, 0x02, 0x0a, 0x03, 0x4b, 0x65, - 0x79, 0x12, 0x64, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, - 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, - 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x66, 0x72, - 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x73, 0x0a, 0x08, 0x46, 0x72, 0x61, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x4b, 0x65, 0x79, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, - 0x0b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x30, 0x9a, 0xc5, - 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x3a, 0x2c, - 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x87, 0x01, 0x0a, - 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, - 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, - 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_route_v3_scoped_route_proto_rawDescOnce sync.Once - file_envoy_config_route_v3_scoped_route_proto_rawDescData = file_envoy_config_route_v3_scoped_route_proto_rawDesc -) - -func file_envoy_config_route_v3_scoped_route_proto_rawDescGZIP() []byte { - file_envoy_config_route_v3_scoped_route_proto_rawDescOnce.Do(func() { - file_envoy_config_route_v3_scoped_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_route_v3_scoped_route_proto_rawDescData) - }) - return file_envoy_config_route_v3_scoped_route_proto_rawDescData -} - -var file_envoy_config_route_v3_scoped_route_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_config_route_v3_scoped_route_proto_goTypes = []interface{}{ - (*ScopedRouteConfiguration)(nil), // 0: envoy.config.route.v3.ScopedRouteConfiguration - (*ScopedRouteConfiguration_Key)(nil), // 1: envoy.config.route.v3.ScopedRouteConfiguration.Key - (*ScopedRouteConfiguration_Key_Fragment)(nil), // 2: envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment - (*RouteConfiguration)(nil), // 3: envoy.config.route.v3.RouteConfiguration -} -var file_envoy_config_route_v3_scoped_route_proto_depIdxs = []int32{ - 3, // 0: envoy.config.route.v3.ScopedRouteConfiguration.route_configuration:type_name -> envoy.config.route.v3.RouteConfiguration - 1, // 1: envoy.config.route.v3.ScopedRouteConfiguration.key:type_name -> envoy.config.route.v3.ScopedRouteConfiguration.Key - 2, // 2: envoy.config.route.v3.ScopedRouteConfiguration.Key.fragments:type_name -> envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_config_route_v3_scoped_route_proto_init() } -func file_envoy_config_route_v3_scoped_route_proto_init() { - if File_envoy_config_route_v3_scoped_route_proto != nil { - return - } - file_envoy_config_route_v3_route_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_config_route_v3_scoped_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRouteConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_scoped_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRouteConfiguration_Key); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_route_v3_scoped_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRouteConfiguration_Key_Fragment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_route_v3_scoped_route_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*ScopedRouteConfiguration_Key_Fragment_StringKey)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_route_v3_scoped_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_route_v3_scoped_route_proto_goTypes, - DependencyIndexes: file_envoy_config_route_v3_scoped_route_proto_depIdxs, - MessageInfos: file_envoy_config_route_v3_scoped_route_proto_msgTypes, - }.Build() - File_envoy_config_route_v3_scoped_route_proto = out.File - file_envoy_config_route_v3_scoped_route_proto_rawDesc = nil - file_envoy_config_route_v3_scoped_route_proto_goTypes = nil - file_envoy_config_route_v3_scoped_route_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/scoped_route.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/scoped_route.pb.validate.go deleted file mode 100644 index 5e52729bb82..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/config/route/v3/scoped_route.pb.validate.go +++ /dev/null @@ -1,504 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/route/v3/scoped_route.proto - -package routev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ScopedRouteConfiguration with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ScopedRouteConfiguration) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ScopedRouteConfiguration with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ScopedRouteConfigurationMultiError, or nil if none found. -func (m *ScopedRouteConfiguration) ValidateAll() error { - return m.validate(true) -} - -func (m *ScopedRouteConfiguration) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for OnDemand - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := ScopedRouteConfigurationValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for RouteConfigurationName - - if all { - switch v := interface{}(m.GetRouteConfiguration()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ScopedRouteConfigurationValidationError{ - field: "RouteConfiguration", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ScopedRouteConfigurationValidationError{ - field: "RouteConfiguration", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRouteConfiguration()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ScopedRouteConfigurationValidationError{ - field: "RouteConfiguration", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetKey() == nil { - err := ScopedRouteConfigurationValidationError{ - field: "Key", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ScopedRouteConfigurationValidationError{ - field: "Key", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ScopedRouteConfigurationValidationError{ - field: "Key", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ScopedRouteConfigurationValidationError{ - field: "Key", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ScopedRouteConfigurationMultiError(errors) - } - - return nil -} - -// ScopedRouteConfigurationMultiError is an error wrapping multiple validation -// errors returned by ScopedRouteConfiguration.ValidateAll() if the designated -// constraints aren't met. -type ScopedRouteConfigurationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ScopedRouteConfigurationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ScopedRouteConfigurationMultiError) AllErrors() []error { return m } - -// ScopedRouteConfigurationValidationError is the validation error returned by -// ScopedRouteConfiguration.Validate if the designated constraints aren't met. -type ScopedRouteConfigurationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ScopedRouteConfigurationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ScopedRouteConfigurationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ScopedRouteConfigurationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ScopedRouteConfigurationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ScopedRouteConfigurationValidationError) ErrorName() string { - return "ScopedRouteConfigurationValidationError" -} - -// Error satisfies the builtin error interface -func (e ScopedRouteConfigurationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sScopedRouteConfiguration.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ScopedRouteConfigurationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ScopedRouteConfigurationValidationError{} - -// Validate checks the field values on ScopedRouteConfiguration_Key with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ScopedRouteConfiguration_Key) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ScopedRouteConfiguration_Key with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ScopedRouteConfiguration_KeyMultiError, or nil if none found. -func (m *ScopedRouteConfiguration_Key) ValidateAll() error { - return m.validate(true) -} - -func (m *ScopedRouteConfiguration_Key) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetFragments()) < 1 { - err := ScopedRouteConfiguration_KeyValidationError{ - field: "Fragments", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetFragments() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ScopedRouteConfiguration_KeyValidationError{ - field: fmt.Sprintf("Fragments[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ScopedRouteConfiguration_KeyValidationError{ - field: fmt.Sprintf("Fragments[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ScopedRouteConfiguration_KeyValidationError{ - field: fmt.Sprintf("Fragments[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ScopedRouteConfiguration_KeyMultiError(errors) - } - - return nil -} - -// ScopedRouteConfiguration_KeyMultiError is an error wrapping multiple -// validation errors returned by ScopedRouteConfiguration_Key.ValidateAll() if -// the designated constraints aren't met. -type ScopedRouteConfiguration_KeyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ScopedRouteConfiguration_KeyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ScopedRouteConfiguration_KeyMultiError) AllErrors() []error { return m } - -// ScopedRouteConfiguration_KeyValidationError is the validation error returned -// by ScopedRouteConfiguration_Key.Validate if the designated constraints -// aren't met. -type ScopedRouteConfiguration_KeyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ScopedRouteConfiguration_KeyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ScopedRouteConfiguration_KeyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ScopedRouteConfiguration_KeyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ScopedRouteConfiguration_KeyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ScopedRouteConfiguration_KeyValidationError) ErrorName() string { - return "ScopedRouteConfiguration_KeyValidationError" -} - -// Error satisfies the builtin error interface -func (e ScopedRouteConfiguration_KeyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sScopedRouteConfiguration_Key.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ScopedRouteConfiguration_KeyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ScopedRouteConfiguration_KeyValidationError{} - -// Validate checks the field values on ScopedRouteConfiguration_Key_Fragment -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *ScopedRouteConfiguration_Key_Fragment) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ScopedRouteConfiguration_Key_Fragment -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// ScopedRouteConfiguration_Key_FragmentMultiError, or nil if none found. -func (m *ScopedRouteConfiguration_Key_Fragment) ValidateAll() error { - return m.validate(true) -} - -func (m *ScopedRouteConfiguration_Key_Fragment) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofTypePresent := false - switch v := m.Type.(type) { - case *ScopedRouteConfiguration_Key_Fragment_StringKey: - if v == nil { - err := ScopedRouteConfiguration_Key_FragmentValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTypePresent = true - // no validation rules for StringKey - default: - _ = v // ensures v is used - } - if !oneofTypePresent { - err := ScopedRouteConfiguration_Key_FragmentValidationError{ - field: "Type", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ScopedRouteConfiguration_Key_FragmentMultiError(errors) - } - - return nil -} - -// ScopedRouteConfiguration_Key_FragmentMultiError is an error wrapping -// multiple validation errors returned by -// ScopedRouteConfiguration_Key_Fragment.ValidateAll() if the designated -// constraints aren't met. -type ScopedRouteConfiguration_Key_FragmentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ScopedRouteConfiguration_Key_FragmentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ScopedRouteConfiguration_Key_FragmentMultiError) AllErrors() []error { return m } - -// ScopedRouteConfiguration_Key_FragmentValidationError is the validation error -// returned by ScopedRouteConfiguration_Key_Fragment.Validate if the -// designated constraints aren't met. -type ScopedRouteConfiguration_Key_FragmentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ScopedRouteConfiguration_Key_FragmentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ScopedRouteConfiguration_Key_FragmentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ScopedRouteConfiguration_Key_FragmentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ScopedRouteConfiguration_Key_FragmentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ScopedRouteConfiguration_Key_FragmentValidationError) ErrorName() string { - return "ScopedRouteConfiguration_Key_FragmentValidationError" -} - -// Error satisfies the builtin error interface -func (e ScopedRouteConfiguration_Key_FragmentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sScopedRouteConfiguration_Key_Fragment.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ScopedRouteConfiguration_Key_FragmentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ScopedRouteConfiguration_Key_FragmentValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/ads.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/ads.pb.go deleted file mode 100644 index 99c15a6ff98..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/ads.pb.go +++ /dev/null @@ -1,373 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/service/discovery/v3/ads.proto - -package discoveryv3 - -import ( - context "context" - _ "github.com/cncf/xds/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -type AdsDummy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AdsDummy) Reset() { - *x = AdsDummy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_ads_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AdsDummy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdsDummy) ProtoMessage() {} - -func (x *AdsDummy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_ads_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdsDummy.ProtoReflect.Descriptor instead. -func (*AdsDummy) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_ads_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_service_discovery_v3_ads_proto protoreflect.FileDescriptor - -var file_envoy_service_discovery_v3_ads_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x33, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x36, 0x0a, 0x08, 0x41, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x3a, 0x2a, 0x9a, 0xc5, - 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, - 0x41, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xa6, 0x02, 0x0a, 0x1a, 0x41, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x87, 0x01, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x74, - 0x61, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, - 0x01, 0x42, 0x8d, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x08, - 0x41, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, - 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_discovery_v3_ads_proto_rawDescOnce sync.Once - file_envoy_service_discovery_v3_ads_proto_rawDescData = file_envoy_service_discovery_v3_ads_proto_rawDesc -) - -func file_envoy_service_discovery_v3_ads_proto_rawDescGZIP() []byte { - file_envoy_service_discovery_v3_ads_proto_rawDescOnce.Do(func() { - file_envoy_service_discovery_v3_ads_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_discovery_v3_ads_proto_rawDescData) - }) - return file_envoy_service_discovery_v3_ads_proto_rawDescData -} - -var file_envoy_service_discovery_v3_ads_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_service_discovery_v3_ads_proto_goTypes = []interface{}{ - (*AdsDummy)(nil), // 0: envoy.service.discovery.v3.AdsDummy - (*DiscoveryRequest)(nil), // 1: envoy.service.discovery.v3.DiscoveryRequest - (*DeltaDiscoveryRequest)(nil), // 2: envoy.service.discovery.v3.DeltaDiscoveryRequest - (*DiscoveryResponse)(nil), // 3: envoy.service.discovery.v3.DiscoveryResponse - (*DeltaDiscoveryResponse)(nil), // 4: envoy.service.discovery.v3.DeltaDiscoveryResponse -} -var file_envoy_service_discovery_v3_ads_proto_depIdxs = []int32{ - 1, // 0: envoy.service.discovery.v3.AggregatedDiscoveryService.StreamAggregatedResources:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 2, // 1: envoy.service.discovery.v3.AggregatedDiscoveryService.DeltaAggregatedResources:input_type -> envoy.service.discovery.v3.DeltaDiscoveryRequest - 3, // 2: envoy.service.discovery.v3.AggregatedDiscoveryService.StreamAggregatedResources:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 4, // 3: envoy.service.discovery.v3.AggregatedDiscoveryService.DeltaAggregatedResources:output_type -> envoy.service.discovery.v3.DeltaDiscoveryResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_service_discovery_v3_ads_proto_init() } -func file_envoy_service_discovery_v3_ads_proto_init() { - if File_envoy_service_discovery_v3_ads_proto != nil { - return - } - file_envoy_service_discovery_v3_discovery_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_service_discovery_v3_ads_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AdsDummy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_discovery_v3_ads_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_discovery_v3_ads_proto_goTypes, - DependencyIndexes: file_envoy_service_discovery_v3_ads_proto_depIdxs, - MessageInfos: file_envoy_service_discovery_v3_ads_proto_msgTypes, - }.Build() - File_envoy_service_discovery_v3_ads_proto = out.File - file_envoy_service_discovery_v3_ads_proto_rawDesc = nil - file_envoy_service_discovery_v3_ads_proto_goTypes = nil - file_envoy_service_discovery_v3_ads_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AggregatedDiscoveryServiceClient is the client API for AggregatedDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AggregatedDiscoveryServiceClient interface { - // This is a gRPC-only API. - StreamAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_StreamAggregatedResourcesClient, error) - DeltaAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_DeltaAggregatedResourcesClient, error) -} - -type aggregatedDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAggregatedDiscoveryServiceClient(cc grpc.ClientConnInterface) AggregatedDiscoveryServiceClient { - return &aggregatedDiscoveryServiceClient{cc} -} - -func (c *aggregatedDiscoveryServiceClient) StreamAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_StreamAggregatedResourcesClient, error) { - stream, err := c.cc.NewStream(ctx, &_AggregatedDiscoveryService_serviceDesc.Streams[0], "/envoy.service.discovery.v3.AggregatedDiscoveryService/StreamAggregatedResources", opts...) - if err != nil { - return nil, err - } - x := &aggregatedDiscoveryServiceStreamAggregatedResourcesClient{stream} - return x, nil -} - -type AggregatedDiscoveryService_StreamAggregatedResourcesClient interface { - Send(*DiscoveryRequest) error - Recv() (*DiscoveryResponse, error) - grpc.ClientStream -} - -type aggregatedDiscoveryServiceStreamAggregatedResourcesClient struct { - grpc.ClientStream -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesClient) Send(m *DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesClient) Recv() (*DiscoveryResponse, error) { - m := new(DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *aggregatedDiscoveryServiceClient) DeltaAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_DeltaAggregatedResourcesClient, error) { - stream, err := c.cc.NewStream(ctx, &_AggregatedDiscoveryService_serviceDesc.Streams[1], "/envoy.service.discovery.v3.AggregatedDiscoveryService/DeltaAggregatedResources", opts...) - if err != nil { - return nil, err - } - x := &aggregatedDiscoveryServiceDeltaAggregatedResourcesClient{stream} - return x, nil -} - -type AggregatedDiscoveryService_DeltaAggregatedResourcesClient interface { - Send(*DeltaDiscoveryRequest) error - Recv() (*DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type aggregatedDiscoveryServiceDeltaAggregatedResourcesClient struct { - grpc.ClientStream -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesClient) Send(m *DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesClient) Recv() (*DeltaDiscoveryResponse, error) { - m := new(DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// AggregatedDiscoveryServiceServer is the server API for AggregatedDiscoveryService service. -type AggregatedDiscoveryServiceServer interface { - // This is a gRPC-only API. - StreamAggregatedResources(AggregatedDiscoveryService_StreamAggregatedResourcesServer) error - DeltaAggregatedResources(AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error -} - -// UnimplementedAggregatedDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAggregatedDiscoveryServiceServer struct { -} - -func (*UnimplementedAggregatedDiscoveryServiceServer) StreamAggregatedResources(AggregatedDiscoveryService_StreamAggregatedResourcesServer) error { - return status.Errorf(codes.Unimplemented, "method StreamAggregatedResources not implemented") -} -func (*UnimplementedAggregatedDiscoveryServiceServer) DeltaAggregatedResources(AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaAggregatedResources not implemented") -} - -func RegisterAggregatedDiscoveryServiceServer(s *grpc.Server, srv AggregatedDiscoveryServiceServer) { - s.RegisterService(&_AggregatedDiscoveryService_serviceDesc, srv) -} - -func _AggregatedDiscoveryService_StreamAggregatedResources_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AggregatedDiscoveryServiceServer).StreamAggregatedResources(&aggregatedDiscoveryServiceStreamAggregatedResourcesServer{stream}) -} - -type AggregatedDiscoveryService_StreamAggregatedResourcesServer interface { - Send(*DiscoveryResponse) error - Recv() (*DiscoveryRequest, error) - grpc.ServerStream -} - -type aggregatedDiscoveryServiceStreamAggregatedResourcesServer struct { - grpc.ServerStream -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesServer) Send(m *DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesServer) Recv() (*DiscoveryRequest, error) { - m := new(DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _AggregatedDiscoveryService_DeltaAggregatedResources_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AggregatedDiscoveryServiceServer).DeltaAggregatedResources(&aggregatedDiscoveryServiceDeltaAggregatedResourcesServer{stream}) -} - -type AggregatedDiscoveryService_DeltaAggregatedResourcesServer interface { - Send(*DeltaDiscoveryResponse) error - Recv() (*DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type aggregatedDiscoveryServiceDeltaAggregatedResourcesServer struct { - grpc.ServerStream -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesServer) Send(m *DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesServer) Recv() (*DeltaDiscoveryRequest, error) { - m := new(DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _AggregatedDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.discovery.v3.AggregatedDiscoveryService", - HandlerType: (*AggregatedDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamAggregatedResources", - Handler: _AggregatedDiscoveryService_StreamAggregatedResources_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "DeltaAggregatedResources", - Handler: _AggregatedDiscoveryService_DeltaAggregatedResources_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/discovery/v3/ads.proto", -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/ads.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/ads.pb.validate.go deleted file mode 100644 index 966eb457e13..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/ads.pb.validate.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/discovery/v3/ads.proto - -package discoveryv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on AdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *AdsDummy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AdsDummy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in AdsDummyMultiError, or nil -// if none found. -func (m *AdsDummy) ValidateAll() error { - return m.validate(true) -} - -func (m *AdsDummy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return AdsDummyMultiError(errors) - } - - return nil -} - -// AdsDummyMultiError is an error wrapping multiple validation errors returned -// by AdsDummy.ValidateAll() if the designated constraints aren't met. -type AdsDummyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AdsDummyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AdsDummyMultiError) AllErrors() []error { return m } - -// AdsDummyValidationError is the validation error returned by -// AdsDummy.Validate if the designated constraints aren't met. -type AdsDummyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AdsDummyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AdsDummyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AdsDummyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AdsDummyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AdsDummyValidationError) ErrorName() string { return "AdsDummyValidationError" } - -// Error satisfies the builtin error interface -func (e AdsDummyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAdsDummy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AdsDummyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AdsDummyValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/discovery.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/discovery.pb.go deleted file mode 100644 index 3bfce7e41b0..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/discovery.pb.go +++ /dev/null @@ -1,1698 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/service/discovery/v3/discovery.proto - -package discoveryv3 - -import ( - v3 "github.com/cilium/proxy/go/envoy/config/core/v3" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - status "google.golang.org/genproto/googleapis/rpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies a resource to be subscribed to. -type ResourceLocator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource name to subscribe to. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A set of dynamic parameters used to match against the dynamic parameter - // constraints on the resource. This allows clients to select between - // multiple variants of the same resource. - DynamicParameters map[string]string `protobuf:"bytes,2,rep,name=dynamic_parameters,json=dynamicParameters,proto3" json:"dynamic_parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *ResourceLocator) Reset() { - *x = ResourceLocator{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceLocator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceLocator) ProtoMessage() {} - -func (x *ResourceLocator) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceLocator.ProtoReflect.Descriptor instead. -func (*ResourceLocator) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{0} -} - -func (x *ResourceLocator) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ResourceLocator) GetDynamicParameters() map[string]string { - if x != nil { - return x.DynamicParameters - } - return nil -} - -// Specifies a concrete resource name. -type ResourceName struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the resource. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Dynamic parameter constraints associated with this resource. To be used by client-side caches - // (including xDS proxies) when matching subscribed resource locators. - DynamicParameterConstraints *DynamicParameterConstraints `protobuf:"bytes,2,opt,name=dynamic_parameter_constraints,json=dynamicParameterConstraints,proto3" json:"dynamic_parameter_constraints,omitempty"` -} - -func (x *ResourceName) Reset() { - *x = ResourceName{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceName) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceName) ProtoMessage() {} - -func (x *ResourceName) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceName.ProtoReflect.Descriptor instead. -func (*ResourceName) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{1} -} - -func (x *ResourceName) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ResourceName) GetDynamicParameterConstraints() *DynamicParameterConstraints { - if x != nil { - return x.DynamicParameterConstraints - } - return nil -} - -// A DiscoveryRequest requests a set of versioned resources of the same type for -// a given Envoy node on some API. -// [#next-free-field: 8] -type DiscoveryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The version_info provided in the request messages will be the version_info - // received with the most recent successfully processed response or empty on - // the first request. It is expected that no new request is sent after a - // response is received until the Envoy instance is ready to ACK/NACK the new - // configuration. ACK/NACK takes place by returning the new API config version - // as applied or the previous API config version respectively. Each type_url - // (see below) has an independent version associated with it. - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The node making the request. - Node *v3.Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"` - // List of resources to subscribe to, e.g. list of cluster names or a route - // configuration name. If this is empty, all resources for the API are - // returned. LDS/CDS may have empty resource_names, which will cause all - // resources for the Envoy instance to be returned. The LDS and CDS responses - // will then imply a number of resources that need to be fetched via EDS/RDS, - // which will be explicitly enumerated in resource_names. - ResourceNames []string `protobuf:"bytes,3,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"` - // [#not-implemented-hide:] - // Alternative to “resource_names“ field that allows specifying dynamic - // parameters along with each resource name. Clients that populate this - // field must be able to handle responses from the server where resources - // are wrapped in a Resource message. - // Note that it is legal for a request to have some resources listed - // in “resource_names“ and others in “resource_locators“. - ResourceLocators []*ResourceLocator `protobuf:"bytes,7,rep,name=resource_locators,json=resourceLocators,proto3" json:"resource_locators,omitempty"` - // Type of the resource that is being requested, e.g. - // "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This is implicit - // in requests made via singleton xDS APIs such as CDS, LDS, etc. but is - // required for ADS. - TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // nonce corresponding to DiscoveryResponse being ACK/NACKed. See above - // discussion on version_info and the DiscoveryResponse nonce comment. This - // may be empty only if 1) this is a non-persistent-stream xDS such as HTTP, - // or 2) the client has not yet accepted an update in this xDS stream (unlike - // delta, where it is populated only for new explicit ACKs). - ResponseNonce string `protobuf:"bytes,5,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` - // This is populated when the previous :ref:`DiscoveryResponse ` - // failed to update configuration. The “message“ field in “error_details“ provides the Envoy - // internal exception related to the failure. It is only intended for consumption during manual - // debugging, the string provided is not guaranteed to be stable across Envoy versions. - ErrorDetail *status.Status `protobuf:"bytes,6,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` -} - -func (x *DiscoveryRequest) Reset() { - *x = DiscoveryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DiscoveryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DiscoveryRequest) ProtoMessage() {} - -func (x *DiscoveryRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DiscoveryRequest.ProtoReflect.Descriptor instead. -func (*DiscoveryRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{2} -} - -func (x *DiscoveryRequest) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *DiscoveryRequest) GetNode() *v3.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *DiscoveryRequest) GetResourceNames() []string { - if x != nil { - return x.ResourceNames - } - return nil -} - -func (x *DiscoveryRequest) GetResourceLocators() []*ResourceLocator { - if x != nil { - return x.ResourceLocators - } - return nil -} - -func (x *DiscoveryRequest) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DiscoveryRequest) GetResponseNonce() string { - if x != nil { - return x.ResponseNonce - } - return "" -} - -func (x *DiscoveryRequest) GetErrorDetail() *status.Status { - if x != nil { - return x.ErrorDetail - } - return nil -} - -// [#next-free-field: 7] -type DiscoveryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The version of the response data. - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The response resources. These resources are typed and depend on the API being called. - Resources []*anypb.Any `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` - // [#not-implemented-hide:] - // Canary is used to support two Envoy command line flags: - // - // - --terminate-on-canary-transition-failure. When set, Envoy is able to - // terminate if it detects that configuration is stuck at canary. Consider - // this example sequence of updates: - // - Management server applies a canary config successfully. - // - Management server rolls back to a production config. - // - Envoy rejects the new production config. - // Since there is no sensible way to continue receiving configuration - // updates, Envoy will then terminate and apply production config from a - // clean slate. - // - --dry-run-canary. When set, a canary response will never be applied, only - // validated via a dry run. - Canary bool `protobuf:"varint,3,opt,name=canary,proto3" json:"canary,omitempty"` - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the type_url in the 'resources' repeated Any (if non-empty). - TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // For gRPC based subscriptions, the nonce provides a way to explicitly ack a - // specific DiscoveryResponse in a following DiscoveryRequest. Additional - // messages may have been sent by Envoy to the management server for the - // previous version on the stream prior to this DiscoveryResponse, that were - // unprocessed at response send time. The nonce allows the management server - // to ignore any further DiscoveryRequests for the previous version until a - // DiscoveryRequest bearing the nonce. The nonce is optional and is not - // required for non-stream based xDS implementations. - Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` - // The control plane instance that sent the response. - ControlPlane *v3.ControlPlane `protobuf:"bytes,6,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"` -} - -func (x *DiscoveryResponse) Reset() { - *x = DiscoveryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DiscoveryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DiscoveryResponse) ProtoMessage() {} - -func (x *DiscoveryResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DiscoveryResponse.ProtoReflect.Descriptor instead. -func (*DiscoveryResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{3} -} - -func (x *DiscoveryResponse) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *DiscoveryResponse) GetResources() []*anypb.Any { - if x != nil { - return x.Resources - } - return nil -} - -func (x *DiscoveryResponse) GetCanary() bool { - if x != nil { - return x.Canary - } - return false -} - -func (x *DiscoveryResponse) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DiscoveryResponse) GetNonce() string { - if x != nil { - return x.Nonce - } - return "" -} - -func (x *DiscoveryResponse) GetControlPlane() *v3.ControlPlane { - if x != nil { - return x.ControlPlane - } - return nil -} - -// DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC -// endpoint for Delta xDS. -// -// With Delta xDS, the DeltaDiscoveryResponses do not need to include a full -// snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a -// diff to the state of a xDS client. -// In Delta XDS there are per-resource versions, which allow tracking state at -// the resource granularity. -// An xDS Delta session is always in the context of a gRPC bidirectional -// stream. This allows the xDS server to keep track of the state of xDS clients -// connected to it. -// -// In Delta xDS the nonce field is required and used to pair -// DeltaDiscoveryResponse to a DeltaDiscoveryRequest ACK or NACK. -// Optionally, a response message level system_version_info is present for -// debugging purposes only. -// -// DeltaDiscoveryRequest plays two independent roles. Any DeltaDiscoveryRequest -// can be either or both of: [1] informing the server of what resources the -// client has gained/lost interest in (using resource_names_subscribe and -// resource_names_unsubscribe), or [2] (N)ACKing an earlier resource update from -// the server (using response_nonce, with presence of error_detail making it a NACK). -// Additionally, the first message (for a given type_url) of a reconnected gRPC stream -// has a third role: informing the server of the resources (and their versions) -// that the client already possesses, using the initial_resource_versions field. -// -// As with state-of-the-world, when multiple resource types are multiplexed (ADS), -// all requests/acknowledgments/updates are logically walled off by type_url: -// a Cluster ACK exists in a completely separate world from a prior Route NACK. -// In particular, initial_resource_versions being sent at the "start" of every -// gRPC stream actually entails a message for each type_url, each with its own -// initial_resource_versions. -// [#next-free-field: 10] -type DeltaDiscoveryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The node making the request. - Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // Type of the resource that is being requested, e.g. - // “type.googleapis.com/envoy.api.v2.ClusterLoadAssignment“. This does not need to be set if - // resources are only referenced via “xds_resource_subscribe“ and - // “xds_resources_unsubscribe“. - TypeUrl string `protobuf:"bytes,2,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // DeltaDiscoveryRequests allow the client to add or remove individual - // resources to the set of tracked resources in the context of a stream. - // All resource names in the resource_names_subscribe list are added to the - // set of tracked resources and all resource names in the resource_names_unsubscribe - // list are removed from the set of tracked resources. - // - // *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or - // resource_names_unsubscribe list simply means that no resources are to be - // added or removed to the resource list. - // *Like* state-of-the-world xDS, the server must send updates for all tracked - // resources, but can also send updates for resources the client has not subscribed to. - // - // NOTE: the server must respond with all resources listed in resource_names_subscribe, - // even if it believes the client has the most recent version of them. The reason: - // the client may have dropped them, but then regained interest before it had a chance - // to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd. - // - // These two fields can be set in any DeltaDiscoveryRequest, including ACKs - // and initial_resource_versions. - // - // A list of Resource names to add to the list of tracked resources. - ResourceNamesSubscribe []string `protobuf:"bytes,3,rep,name=resource_names_subscribe,json=resourceNamesSubscribe,proto3" json:"resource_names_subscribe,omitempty"` - // A list of Resource names to remove from the list of tracked resources. - ResourceNamesUnsubscribe []string `protobuf:"bytes,4,rep,name=resource_names_unsubscribe,json=resourceNamesUnsubscribe,proto3" json:"resource_names_unsubscribe,omitempty"` - // [#not-implemented-hide:] - // Alternative to “resource_names_subscribe“ field that allows specifying dynamic parameters - // along with each resource name. - // Note that it is legal for a request to have some resources listed - // in “resource_names_subscribe“ and others in “resource_locators_subscribe“. - ResourceLocatorsSubscribe []*ResourceLocator `protobuf:"bytes,8,rep,name=resource_locators_subscribe,json=resourceLocatorsSubscribe,proto3" json:"resource_locators_subscribe,omitempty"` - // [#not-implemented-hide:] - // Alternative to “resource_names_unsubscribe“ field that allows specifying dynamic parameters - // along with each resource name. - // Note that it is legal for a request to have some resources listed - // in “resource_names_unsubscribe“ and others in “resource_locators_unsubscribe“. - ResourceLocatorsUnsubscribe []*ResourceLocator `protobuf:"bytes,9,rep,name=resource_locators_unsubscribe,json=resourceLocatorsUnsubscribe,proto3" json:"resource_locators_unsubscribe,omitempty"` - // Informs the server of the versions of the resources the xDS client knows of, to enable the - // client to continue the same logical xDS session even in the face of gRPC stream reconnection. - // It will not be populated: [1] in the very first stream of a session, since the client will - // not yet have any resources, [2] in any message after the first in a stream (for a given - // type_url), since the server will already be correctly tracking the client's state. - // (In ADS, the first message *of each type_url* of a reconnected stream populates this map.) - // The map's keys are names of xDS resources known to the xDS client. - // The map's values are opaque resource versions. - InitialResourceVersions map[string]string `protobuf:"bytes,5,rep,name=initial_resource_versions,json=initialResourceVersions,proto3" json:"initial_resource_versions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // When the DeltaDiscoveryRequest is a ACK or NACK message in response - // to a previous DeltaDiscoveryResponse, the response_nonce must be the - // nonce in the DeltaDiscoveryResponse. - // Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted. - ResponseNonce string `protobuf:"bytes,6,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` - // This is populated when the previous :ref:`DiscoveryResponse ` - // failed to update configuration. The “message“ field in “error_details“ - // provides the Envoy internal exception related to the failure. - ErrorDetail *status.Status `protobuf:"bytes,7,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` -} - -func (x *DeltaDiscoveryRequest) Reset() { - *x = DeltaDiscoveryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeltaDiscoveryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeltaDiscoveryRequest) ProtoMessage() {} - -func (x *DeltaDiscoveryRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeltaDiscoveryRequest.ProtoReflect.Descriptor instead. -func (*DeltaDiscoveryRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{4} -} - -func (x *DeltaDiscoveryRequest) GetNode() *v3.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DeltaDiscoveryRequest) GetResourceNamesSubscribe() []string { - if x != nil { - return x.ResourceNamesSubscribe - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetResourceNamesUnsubscribe() []string { - if x != nil { - return x.ResourceNamesUnsubscribe - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetResourceLocatorsSubscribe() []*ResourceLocator { - if x != nil { - return x.ResourceLocatorsSubscribe - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetResourceLocatorsUnsubscribe() []*ResourceLocator { - if x != nil { - return x.ResourceLocatorsUnsubscribe - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetInitialResourceVersions() map[string]string { - if x != nil { - return x.InitialResourceVersions - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetResponseNonce() string { - if x != nil { - return x.ResponseNonce - } - return "" -} - -func (x *DeltaDiscoveryRequest) GetErrorDetail() *status.Status { - if x != nil { - return x.ErrorDetail - } - return nil -} - -// [#next-free-field: 9] -type DeltaDiscoveryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The version of the response data (used for debugging). - SystemVersionInfo string `protobuf:"bytes,1,opt,name=system_version_info,json=systemVersionInfo,proto3" json:"system_version_info,omitempty"` - // The response resources. These are typed resources, whose types must match - // the type_url field. - Resources []*Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the type_url in the Any within 'resources' if 'resources' is non-empty. - TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // Resources names of resources that have be deleted and to be removed from the xDS Client. - // Removed resources for missing resources can be ignored. - RemovedResources []string `protobuf:"bytes,6,rep,name=removed_resources,json=removedResources,proto3" json:"removed_resources,omitempty"` - // Alternative to removed_resources that allows specifying which variant of - // a resource is being removed. This variant must be used for any resource - // for which dynamic parameter constraints were sent to the client. - RemovedResourceNames []*ResourceName `protobuf:"bytes,8,rep,name=removed_resource_names,json=removedResourceNames,proto3" json:"removed_resource_names,omitempty"` - // The nonce provides a way for DeltaDiscoveryRequests to uniquely - // reference a DeltaDiscoveryResponse when (N)ACKing. The nonce is required. - Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` - // [#not-implemented-hide:] - // The control plane instance that sent the response. - ControlPlane *v3.ControlPlane `protobuf:"bytes,7,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"` -} - -func (x *DeltaDiscoveryResponse) Reset() { - *x = DeltaDiscoveryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeltaDiscoveryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeltaDiscoveryResponse) ProtoMessage() {} - -func (x *DeltaDiscoveryResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeltaDiscoveryResponse.ProtoReflect.Descriptor instead. -func (*DeltaDiscoveryResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{5} -} - -func (x *DeltaDiscoveryResponse) GetSystemVersionInfo() string { - if x != nil { - return x.SystemVersionInfo - } - return "" -} - -func (x *DeltaDiscoveryResponse) GetResources() []*Resource { - if x != nil { - return x.Resources - } - return nil -} - -func (x *DeltaDiscoveryResponse) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DeltaDiscoveryResponse) GetRemovedResources() []string { - if x != nil { - return x.RemovedResources - } - return nil -} - -func (x *DeltaDiscoveryResponse) GetRemovedResourceNames() []*ResourceName { - if x != nil { - return x.RemovedResourceNames - } - return nil -} - -func (x *DeltaDiscoveryResponse) GetNonce() string { - if x != nil { - return x.Nonce - } - return "" -} - -func (x *DeltaDiscoveryResponse) GetControlPlane() *v3.ControlPlane { - if x != nil { - return x.ControlPlane - } - return nil -} - -// A set of dynamic parameter constraints associated with a variant of an individual xDS resource. -// These constraints determine whether the resource matches a subscription based on the set of -// dynamic parameters in the subscription, as specified in the -// :ref:`ResourceLocator.dynamic_parameters` -// field. This allows xDS implementations (clients, servers, and caching proxies) to determine -// which variant of a resource is appropriate for a given client. -type DynamicParameterConstraints struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: - // - // *DynamicParameterConstraints_Constraint - // *DynamicParameterConstraints_OrConstraints - // *DynamicParameterConstraints_AndConstraints - // *DynamicParameterConstraints_NotConstraints - Type isDynamicParameterConstraints_Type `protobuf_oneof:"type"` -} - -func (x *DynamicParameterConstraints) Reset() { - *x = DynamicParameterConstraints{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DynamicParameterConstraints) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DynamicParameterConstraints) ProtoMessage() {} - -func (x *DynamicParameterConstraints) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DynamicParameterConstraints.ProtoReflect.Descriptor instead. -func (*DynamicParameterConstraints) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{6} -} - -func (m *DynamicParameterConstraints) GetType() isDynamicParameterConstraints_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *DynamicParameterConstraints) GetConstraint() *DynamicParameterConstraints_SingleConstraint { - if x, ok := x.GetType().(*DynamicParameterConstraints_Constraint); ok { - return x.Constraint - } - return nil -} - -func (x *DynamicParameterConstraints) GetOrConstraints() *DynamicParameterConstraints_ConstraintList { - if x, ok := x.GetType().(*DynamicParameterConstraints_OrConstraints); ok { - return x.OrConstraints - } - return nil -} - -func (x *DynamicParameterConstraints) GetAndConstraints() *DynamicParameterConstraints_ConstraintList { - if x, ok := x.GetType().(*DynamicParameterConstraints_AndConstraints); ok { - return x.AndConstraints - } - return nil -} - -func (x *DynamicParameterConstraints) GetNotConstraints() *DynamicParameterConstraints { - if x, ok := x.GetType().(*DynamicParameterConstraints_NotConstraints); ok { - return x.NotConstraints - } - return nil -} - -type isDynamicParameterConstraints_Type interface { - isDynamicParameterConstraints_Type() -} - -type DynamicParameterConstraints_Constraint struct { - // A single constraint to evaluate. - Constraint *DynamicParameterConstraints_SingleConstraint `protobuf:"bytes,1,opt,name=constraint,proto3,oneof"` -} - -type DynamicParameterConstraints_OrConstraints struct { - // A list of constraints that match if any one constraint in the list - // matches. - OrConstraints *DynamicParameterConstraints_ConstraintList `protobuf:"bytes,2,opt,name=or_constraints,json=orConstraints,proto3,oneof"` -} - -type DynamicParameterConstraints_AndConstraints struct { - // A list of constraints that must all match. - AndConstraints *DynamicParameterConstraints_ConstraintList `protobuf:"bytes,3,opt,name=and_constraints,json=andConstraints,proto3,oneof"` -} - -type DynamicParameterConstraints_NotConstraints struct { - // The inverse (NOT) of a set of constraints. - NotConstraints *DynamicParameterConstraints `protobuf:"bytes,4,opt,name=not_constraints,json=notConstraints,proto3,oneof"` -} - -func (*DynamicParameterConstraints_Constraint) isDynamicParameterConstraints_Type() {} - -func (*DynamicParameterConstraints_OrConstraints) isDynamicParameterConstraints_Type() {} - -func (*DynamicParameterConstraints_AndConstraints) isDynamicParameterConstraints_Type() {} - -func (*DynamicParameterConstraints_NotConstraints) isDynamicParameterConstraints_Type() {} - -// [#next-free-field: 10] -type Resource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource's name, to distinguish it from others of the same type of resource. - // Only one of “name“ or “resource_name“ may be set. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // Alternative to the “name“ field, to be used when the server supports - // multiple variants of the named resource that are differentiated by - // dynamic parameter constraints. - // Only one of “name“ or “resource_name“ may be set. - ResourceName *ResourceName `protobuf:"bytes,8,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"` - // The aliases are a list of other names that this resource can go by. - Aliases []string `protobuf:"bytes,4,rep,name=aliases,proto3" json:"aliases,omitempty"` - // The resource level version. It allows xDS to track the state of individual - // resources. - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // The resource being tracked. - Resource *anypb.Any `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - // Time-to-live value for the resource. For each resource, a timer is started. The timer is - // reset each time the resource is received with a new TTL. If the resource is received with - // no TTL set, the timer is removed for the resource. Upon expiration of the timer, the - // configuration for the resource will be removed. - // - // The TTL can be refreshed or changed by sending a response that doesn't change the resource - // version. In this case the resource field does not need to be populated, which allows for - // light-weight "heartbeat" updates to keep a resource with a TTL alive. - // - // The TTL feature is meant to support configurations that should be removed in the event of - // a management server failure. For example, the feature may be used for fault injection - // testing where the fault injection should be terminated in the event that Envoy loses contact - // with the management server. - Ttl *durationpb.Duration `protobuf:"bytes,6,opt,name=ttl,proto3" json:"ttl,omitempty"` - // Cache control properties for the resource. - // [#not-implemented-hide:] - CacheControl *Resource_CacheControl `protobuf:"bytes,7,opt,name=cache_control,json=cacheControl,proto3" json:"cache_control,omitempty"` - // The Metadata field can be used to provide additional information for the resource. - // E.g. the trace data for debugging. - Metadata *v3.Metadata `protobuf:"bytes,9,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (x *Resource) Reset() { - *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Resource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Resource) ProtoMessage() {} - -func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Resource.ProtoReflect.Descriptor instead. -func (*Resource) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{7} -} - -func (x *Resource) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Resource) GetResourceName() *ResourceName { - if x != nil { - return x.ResourceName - } - return nil -} - -func (x *Resource) GetAliases() []string { - if x != nil { - return x.Aliases - } - return nil -} - -func (x *Resource) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Resource) GetResource() *anypb.Any { - if x != nil { - return x.Resource - } - return nil -} - -func (x *Resource) GetTtl() *durationpb.Duration { - if x != nil { - return x.Ttl - } - return nil -} - -func (x *Resource) GetCacheControl() *Resource_CacheControl { - if x != nil { - return x.CacheControl - } - return nil -} - -func (x *Resource) GetMetadata() *v3.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -// A single constraint for a given key. -type DynamicParameterConstraints_SingleConstraint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key to match against. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Types that are assignable to ConstraintType: - // - // *DynamicParameterConstraints_SingleConstraint_Value - // *DynamicParameterConstraints_SingleConstraint_Exists_ - ConstraintType isDynamicParameterConstraints_SingleConstraint_ConstraintType `protobuf_oneof:"constraint_type"` -} - -func (x *DynamicParameterConstraints_SingleConstraint) Reset() { - *x = DynamicParameterConstraints_SingleConstraint{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DynamicParameterConstraints_SingleConstraint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DynamicParameterConstraints_SingleConstraint) ProtoMessage() {} - -func (x *DynamicParameterConstraints_SingleConstraint) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DynamicParameterConstraints_SingleConstraint.ProtoReflect.Descriptor instead. -func (*DynamicParameterConstraints_SingleConstraint) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *DynamicParameterConstraints_SingleConstraint) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (m *DynamicParameterConstraints_SingleConstraint) GetConstraintType() isDynamicParameterConstraints_SingleConstraint_ConstraintType { - if m != nil { - return m.ConstraintType - } - return nil -} - -func (x *DynamicParameterConstraints_SingleConstraint) GetValue() string { - if x, ok := x.GetConstraintType().(*DynamicParameterConstraints_SingleConstraint_Value); ok { - return x.Value - } - return "" -} - -func (x *DynamicParameterConstraints_SingleConstraint) GetExists() *DynamicParameterConstraints_SingleConstraint_Exists { - if x, ok := x.GetConstraintType().(*DynamicParameterConstraints_SingleConstraint_Exists_); ok { - return x.Exists - } - return nil -} - -type isDynamicParameterConstraints_SingleConstraint_ConstraintType interface { - isDynamicParameterConstraints_SingleConstraint_ConstraintType() -} - -type DynamicParameterConstraints_SingleConstraint_Value struct { - // Matches this exact value. - Value string `protobuf:"bytes,2,opt,name=value,proto3,oneof"` -} - -type DynamicParameterConstraints_SingleConstraint_Exists_ struct { - // Key is present (matches any value except for the key being absent). - // This allows setting a default constraint for clients that do - // not send a key at all, while there may be other clients that need - // special configuration based on that key. - Exists *DynamicParameterConstraints_SingleConstraint_Exists `protobuf:"bytes,3,opt,name=exists,proto3,oneof"` -} - -func (*DynamicParameterConstraints_SingleConstraint_Value) isDynamicParameterConstraints_SingleConstraint_ConstraintType() { -} - -func (*DynamicParameterConstraints_SingleConstraint_Exists_) isDynamicParameterConstraints_SingleConstraint_ConstraintType() { -} - -type DynamicParameterConstraints_ConstraintList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Constraints []*DynamicParameterConstraints `protobuf:"bytes,1,rep,name=constraints,proto3" json:"constraints,omitempty"` -} - -func (x *DynamicParameterConstraints_ConstraintList) Reset() { - *x = DynamicParameterConstraints_ConstraintList{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DynamicParameterConstraints_ConstraintList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DynamicParameterConstraints_ConstraintList) ProtoMessage() {} - -func (x *DynamicParameterConstraints_ConstraintList) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DynamicParameterConstraints_ConstraintList.ProtoReflect.Descriptor instead. -func (*DynamicParameterConstraints_ConstraintList) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{6, 1} -} - -func (x *DynamicParameterConstraints_ConstraintList) GetConstraints() []*DynamicParameterConstraints { - if x != nil { - return x.Constraints - } - return nil -} - -type DynamicParameterConstraints_SingleConstraint_Exists struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DynamicParameterConstraints_SingleConstraint_Exists) Reset() { - *x = DynamicParameterConstraints_SingleConstraint_Exists{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DynamicParameterConstraints_SingleConstraint_Exists) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DynamicParameterConstraints_SingleConstraint_Exists) ProtoMessage() {} - -func (x *DynamicParameterConstraints_SingleConstraint_Exists) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DynamicParameterConstraints_SingleConstraint_Exists.ProtoReflect.Descriptor instead. -func (*DynamicParameterConstraints_SingleConstraint_Exists) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{6, 0, 0} -} - -// Cache control properties for the resource. -// [#not-implemented-hide:] -type Resource_CacheControl struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If true, xDS proxies may not cache this resource. - // Note that this does not apply to clients other than xDS proxies, which must cache resources - // for their own use, regardless of the value of this field. - DoNotCache bool `protobuf:"varint,1,opt,name=do_not_cache,json=doNotCache,proto3" json:"do_not_cache,omitempty"` -} - -func (x *Resource_CacheControl) Reset() { - *x = Resource_CacheControl{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Resource_CacheControl) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Resource_CacheControl) ProtoMessage() {} - -func (x *Resource_CacheControl) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Resource_CacheControl.ProtoReflect.Descriptor instead. -func (*Resource_CacheControl) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *Resource_CacheControl) GetDoNotCache() bool { - if x != nil { - return x.DoNotCache - } - return false -} - -var File_envoy_service_discovery_v3_discovery_proto protoreflect.FileDescriptor - -var file_envoy_service_discovery_v3_discovery_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x71, 0x0a, 0x12, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x11, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x1a, 0x44, 0x0a, 0x16, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9f, 0x01, 0x0a, 0x0c, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x7b, - 0x0a, 0x1d, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x1b, - 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x85, 0x03, 0x0a, 0x10, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x11, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, - 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x3a, 0x24, 0x9a, - 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0xa3, 0x02, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x0a, 0x09, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, - 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, - 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, - 0x6c, 0x61, 0x6e, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, - 0x6e, 0x65, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, 0x06, 0x0a, 0x15, 0x44, 0x65, - 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x38, - 0x0a, 0x18, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x18, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x6b, 0x0a, 0x1b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x19, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x12, 0x6f, 0x0a, 0x1d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x1b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x19, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x17, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x1a, - 0x4a, 0x0a, 0x1c, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x29, 0x9a, 0xc5, 0x88, - 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xbf, 0x03, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x74, 0x61, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x42, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, - 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x5e, 0x0a, - 0x16, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x52, 0x0c, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x3a, 0x2a, 0x9a, 0xc5, - 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, 0x06, 0x0a, 0x1b, 0x44, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x6a, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, - 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, - 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x12, 0x6f, 0x0a, 0x0e, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, - 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x71, 0x0a, 0x0f, 0x61, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, - 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x73, - 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, - 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6e, - 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x0f, 0x6e, 0x6f, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x6e, 0x6f, - 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0xc9, 0x01, 0x0a, - 0x10, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x69, 0x0a, 0x06, 0x65, - 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, - 0x72, 0x61, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x48, 0x00, 0x52, 0x06, - 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x1a, 0x08, 0x0a, 0x06, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, - 0x42, 0x16, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x6b, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, - 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xe4, 0x03, - 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4d, - 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, - 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, 0x6c, - 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x61, - 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x0c, 0x63, 0x61, 0x63, 0x68, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x1a, 0x30, 0x0a, 0x0c, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x63, - 0x61, 0x63, 0x68, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x6f, 0x4e, 0x6f, - 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x42, 0x93, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x33, 0x42, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_service_discovery_v3_discovery_proto_rawDescOnce sync.Once - file_envoy_service_discovery_v3_discovery_proto_rawDescData = file_envoy_service_discovery_v3_discovery_proto_rawDesc -) - -func file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP() []byte { - file_envoy_service_discovery_v3_discovery_proto_rawDescOnce.Do(func() { - file_envoy_service_discovery_v3_discovery_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_discovery_v3_discovery_proto_rawDescData) - }) - return file_envoy_service_discovery_v3_discovery_proto_rawDescData -} - -var file_envoy_service_discovery_v3_discovery_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_envoy_service_discovery_v3_discovery_proto_goTypes = []interface{}{ - (*ResourceLocator)(nil), // 0: envoy.service.discovery.v3.ResourceLocator - (*ResourceName)(nil), // 1: envoy.service.discovery.v3.ResourceName - (*DiscoveryRequest)(nil), // 2: envoy.service.discovery.v3.DiscoveryRequest - (*DiscoveryResponse)(nil), // 3: envoy.service.discovery.v3.DiscoveryResponse - (*DeltaDiscoveryRequest)(nil), // 4: envoy.service.discovery.v3.DeltaDiscoveryRequest - (*DeltaDiscoveryResponse)(nil), // 5: envoy.service.discovery.v3.DeltaDiscoveryResponse - (*DynamicParameterConstraints)(nil), // 6: envoy.service.discovery.v3.DynamicParameterConstraints - (*Resource)(nil), // 7: envoy.service.discovery.v3.Resource - nil, // 8: envoy.service.discovery.v3.ResourceLocator.DynamicParametersEntry - nil, // 9: envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry - (*DynamicParameterConstraints_SingleConstraint)(nil), // 10: envoy.service.discovery.v3.DynamicParameterConstraints.SingleConstraint - (*DynamicParameterConstraints_ConstraintList)(nil), // 11: envoy.service.discovery.v3.DynamicParameterConstraints.ConstraintList - (*DynamicParameterConstraints_SingleConstraint_Exists)(nil), // 12: envoy.service.discovery.v3.DynamicParameterConstraints.SingleConstraint.Exists - (*Resource_CacheControl)(nil), // 13: envoy.service.discovery.v3.Resource.CacheControl - (*v3.Node)(nil), // 14: envoy.config.core.v3.Node - (*status.Status)(nil), // 15: google.rpc.Status - (*anypb.Any)(nil), // 16: google.protobuf.Any - (*v3.ControlPlane)(nil), // 17: envoy.config.core.v3.ControlPlane - (*durationpb.Duration)(nil), // 18: google.protobuf.Duration - (*v3.Metadata)(nil), // 19: envoy.config.core.v3.Metadata -} -var file_envoy_service_discovery_v3_discovery_proto_depIdxs = []int32{ - 8, // 0: envoy.service.discovery.v3.ResourceLocator.dynamic_parameters:type_name -> envoy.service.discovery.v3.ResourceLocator.DynamicParametersEntry - 6, // 1: envoy.service.discovery.v3.ResourceName.dynamic_parameter_constraints:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints - 14, // 2: envoy.service.discovery.v3.DiscoveryRequest.node:type_name -> envoy.config.core.v3.Node - 0, // 3: envoy.service.discovery.v3.DiscoveryRequest.resource_locators:type_name -> envoy.service.discovery.v3.ResourceLocator - 15, // 4: envoy.service.discovery.v3.DiscoveryRequest.error_detail:type_name -> google.rpc.Status - 16, // 5: envoy.service.discovery.v3.DiscoveryResponse.resources:type_name -> google.protobuf.Any - 17, // 6: envoy.service.discovery.v3.DiscoveryResponse.control_plane:type_name -> envoy.config.core.v3.ControlPlane - 14, // 7: envoy.service.discovery.v3.DeltaDiscoveryRequest.node:type_name -> envoy.config.core.v3.Node - 0, // 8: envoy.service.discovery.v3.DeltaDiscoveryRequest.resource_locators_subscribe:type_name -> envoy.service.discovery.v3.ResourceLocator - 0, // 9: envoy.service.discovery.v3.DeltaDiscoveryRequest.resource_locators_unsubscribe:type_name -> envoy.service.discovery.v3.ResourceLocator - 9, // 10: envoy.service.discovery.v3.DeltaDiscoveryRequest.initial_resource_versions:type_name -> envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry - 15, // 11: envoy.service.discovery.v3.DeltaDiscoveryRequest.error_detail:type_name -> google.rpc.Status - 7, // 12: envoy.service.discovery.v3.DeltaDiscoveryResponse.resources:type_name -> envoy.service.discovery.v3.Resource - 1, // 13: envoy.service.discovery.v3.DeltaDiscoveryResponse.removed_resource_names:type_name -> envoy.service.discovery.v3.ResourceName - 17, // 14: envoy.service.discovery.v3.DeltaDiscoveryResponse.control_plane:type_name -> envoy.config.core.v3.ControlPlane - 10, // 15: envoy.service.discovery.v3.DynamicParameterConstraints.constraint:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints.SingleConstraint - 11, // 16: envoy.service.discovery.v3.DynamicParameterConstraints.or_constraints:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints.ConstraintList - 11, // 17: envoy.service.discovery.v3.DynamicParameterConstraints.and_constraints:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints.ConstraintList - 6, // 18: envoy.service.discovery.v3.DynamicParameterConstraints.not_constraints:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints - 1, // 19: envoy.service.discovery.v3.Resource.resource_name:type_name -> envoy.service.discovery.v3.ResourceName - 16, // 20: envoy.service.discovery.v3.Resource.resource:type_name -> google.protobuf.Any - 18, // 21: envoy.service.discovery.v3.Resource.ttl:type_name -> google.protobuf.Duration - 13, // 22: envoy.service.discovery.v3.Resource.cache_control:type_name -> envoy.service.discovery.v3.Resource.CacheControl - 19, // 23: envoy.service.discovery.v3.Resource.metadata:type_name -> envoy.config.core.v3.Metadata - 12, // 24: envoy.service.discovery.v3.DynamicParameterConstraints.SingleConstraint.exists:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints.SingleConstraint.Exists - 6, // 25: envoy.service.discovery.v3.DynamicParameterConstraints.ConstraintList.constraints:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints - 26, // [26:26] is the sub-list for method output_type - 26, // [26:26] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name -} - -func init() { file_envoy_service_discovery_v3_discovery_proto_init() } -func file_envoy_service_discovery_v3_discovery_proto_init() { - if File_envoy_service_discovery_v3_discovery_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_discovery_v3_discovery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceLocator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceName); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DiscoveryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DiscoveryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeltaDiscoveryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeltaDiscoveryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DynamicParameterConstraints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DynamicParameterConstraints_SingleConstraint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DynamicParameterConstraints_ConstraintList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DynamicParameterConstraints_SingleConstraint_Exists); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource_CacheControl); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*DynamicParameterConstraints_Constraint)(nil), - (*DynamicParameterConstraints_OrConstraints)(nil), - (*DynamicParameterConstraints_AndConstraints)(nil), - (*DynamicParameterConstraints_NotConstraints)(nil), - } - file_envoy_service_discovery_v3_discovery_proto_msgTypes[10].OneofWrappers = []interface{}{ - (*DynamicParameterConstraints_SingleConstraint_Value)(nil), - (*DynamicParameterConstraints_SingleConstraint_Exists_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_discovery_v3_discovery_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_service_discovery_v3_discovery_proto_goTypes, - DependencyIndexes: file_envoy_service_discovery_v3_discovery_proto_depIdxs, - MessageInfos: file_envoy_service_discovery_v3_discovery_proto_msgTypes, - }.Build() - File_envoy_service_discovery_v3_discovery_proto = out.File - file_envoy_service_discovery_v3_discovery_proto_rawDesc = nil - file_envoy_service_discovery_v3_discovery_proto_goTypes = nil - file_envoy_service_discovery_v3_discovery_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/discovery.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/discovery.pb.validate.go deleted file mode 100644 index 913cdb6094b..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/service/discovery/v3/discovery.pb.validate.go +++ /dev/null @@ -1,2138 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/discovery/v3/discovery.proto - -package discoveryv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ResourceLocator with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ResourceLocator) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ResourceLocator with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ResourceLocatorMultiError, or nil if none found. -func (m *ResourceLocator) ValidateAll() error { - return m.validate(true) -} - -func (m *ResourceLocator) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - // no validation rules for DynamicParameters - - if len(errors) > 0 { - return ResourceLocatorMultiError(errors) - } - - return nil -} - -// ResourceLocatorMultiError is an error wrapping multiple validation errors -// returned by ResourceLocator.ValidateAll() if the designated constraints -// aren't met. -type ResourceLocatorMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResourceLocatorMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResourceLocatorMultiError) AllErrors() []error { return m } - -// ResourceLocatorValidationError is the validation error returned by -// ResourceLocator.Validate if the designated constraints aren't met. -type ResourceLocatorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourceLocatorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourceLocatorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourceLocatorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourceLocatorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourceLocatorValidationError) ErrorName() string { return "ResourceLocatorValidationError" } - -// Error satisfies the builtin error interface -func (e ResourceLocatorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResourceLocator.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourceLocatorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourceLocatorValidationError{} - -// Validate checks the field values on ResourceName with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ResourceName) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ResourceName with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ResourceNameMultiError, or -// nil if none found. -func (m *ResourceName) ValidateAll() error { - return m.validate(true) -} - -func (m *ResourceName) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - if all { - switch v := interface{}(m.GetDynamicParameterConstraints()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceNameValidationError{ - field: "DynamicParameterConstraints", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceNameValidationError{ - field: "DynamicParameterConstraints", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDynamicParameterConstraints()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceNameValidationError{ - field: "DynamicParameterConstraints", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ResourceNameMultiError(errors) - } - - return nil -} - -// ResourceNameMultiError is an error wrapping multiple validation errors -// returned by ResourceName.ValidateAll() if the designated constraints aren't met. -type ResourceNameMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResourceNameMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResourceNameMultiError) AllErrors() []error { return m } - -// ResourceNameValidationError is the validation error returned by -// ResourceName.Validate if the designated constraints aren't met. -type ResourceNameValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourceNameValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourceNameValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourceNameValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourceNameValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourceNameValidationError) ErrorName() string { return "ResourceNameValidationError" } - -// Error satisfies the builtin error interface -func (e ResourceNameValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResourceName.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourceNameValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourceNameValidationError{} - -// Validate checks the field values on DiscoveryRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *DiscoveryRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DiscoveryRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DiscoveryRequestMultiError, or nil if none found. -func (m *DiscoveryRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DiscoveryRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for VersionInfo - - if all { - switch v := interface{}(m.GetNode()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetResourceLocators() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DiscoveryRequestValidationError{ - field: fmt.Sprintf("ResourceLocators[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DiscoveryRequestValidationError{ - field: fmt.Sprintf("ResourceLocators[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DiscoveryRequestValidationError{ - field: fmt.Sprintf("ResourceLocators[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for TypeUrl - - // no validation rules for ResponseNonce - - if all { - switch v := interface{}(m.GetErrorDetail()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DiscoveryRequestMultiError(errors) - } - - return nil -} - -// DiscoveryRequestMultiError is an error wrapping multiple validation errors -// returned by DiscoveryRequest.ValidateAll() if the designated constraints -// aren't met. -type DiscoveryRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DiscoveryRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DiscoveryRequestMultiError) AllErrors() []error { return m } - -// DiscoveryRequestValidationError is the validation error returned by -// DiscoveryRequest.Validate if the designated constraints aren't met. -type DiscoveryRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DiscoveryRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DiscoveryRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DiscoveryRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DiscoveryRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DiscoveryRequestValidationError) ErrorName() string { return "DiscoveryRequestValidationError" } - -// Error satisfies the builtin error interface -func (e DiscoveryRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDiscoveryRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DiscoveryRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DiscoveryRequestValidationError{} - -// Validate checks the field values on DiscoveryResponse with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *DiscoveryResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DiscoveryResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DiscoveryResponseMultiError, or nil if none found. -func (m *DiscoveryResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DiscoveryResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for VersionInfo - - for idx, item := range m.GetResources() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for Canary - - // no validation rules for TypeUrl - - // no validation rules for Nonce - - if all { - switch v := interface{}(m.GetControlPlane()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DiscoveryResponseValidationError{ - field: "ControlPlane", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DiscoveryResponseValidationError{ - field: "ControlPlane", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetControlPlane()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DiscoveryResponseValidationError{ - field: "ControlPlane", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DiscoveryResponseMultiError(errors) - } - - return nil -} - -// DiscoveryResponseMultiError is an error wrapping multiple validation errors -// returned by DiscoveryResponse.ValidateAll() if the designated constraints -// aren't met. -type DiscoveryResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DiscoveryResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DiscoveryResponseMultiError) AllErrors() []error { return m } - -// DiscoveryResponseValidationError is the validation error returned by -// DiscoveryResponse.Validate if the designated constraints aren't met. -type DiscoveryResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DiscoveryResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DiscoveryResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DiscoveryResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DiscoveryResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DiscoveryResponseValidationError) ErrorName() string { - return "DiscoveryResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DiscoveryResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDiscoveryResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DiscoveryResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DiscoveryResponseValidationError{} - -// Validate checks the field values on DeltaDiscoveryRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeltaDiscoveryRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeltaDiscoveryRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeltaDiscoveryRequestMultiError, or nil if none found. -func (m *DeltaDiscoveryRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DeltaDiscoveryRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetNode()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeltaDiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TypeUrl - - for idx, item := range m.GetResourceLocatorsSubscribe() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: fmt.Sprintf("ResourceLocatorsSubscribe[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: fmt.Sprintf("ResourceLocatorsSubscribe[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeltaDiscoveryRequestValidationError{ - field: fmt.Sprintf("ResourceLocatorsSubscribe[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetResourceLocatorsUnsubscribe() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: fmt.Sprintf("ResourceLocatorsUnsubscribe[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: fmt.Sprintf("ResourceLocatorsUnsubscribe[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeltaDiscoveryRequestValidationError{ - field: fmt.Sprintf("ResourceLocatorsUnsubscribe[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for InitialResourceVersions - - // no validation rules for ResponseNonce - - if all { - switch v := interface{}(m.GetErrorDetail()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeltaDiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DeltaDiscoveryRequestMultiError(errors) - } - - return nil -} - -// DeltaDiscoveryRequestMultiError is an error wrapping multiple validation -// errors returned by DeltaDiscoveryRequest.ValidateAll() if the designated -// constraints aren't met. -type DeltaDiscoveryRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeltaDiscoveryRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeltaDiscoveryRequestMultiError) AllErrors() []error { return m } - -// DeltaDiscoveryRequestValidationError is the validation error returned by -// DeltaDiscoveryRequest.Validate if the designated constraints aren't met. -type DeltaDiscoveryRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeltaDiscoveryRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeltaDiscoveryRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeltaDiscoveryRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeltaDiscoveryRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeltaDiscoveryRequestValidationError) ErrorName() string { - return "DeltaDiscoveryRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DeltaDiscoveryRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeltaDiscoveryRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeltaDiscoveryRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeltaDiscoveryRequestValidationError{} - -// Validate checks the field values on DeltaDiscoveryResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeltaDiscoveryResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeltaDiscoveryResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeltaDiscoveryResponseMultiError, or nil if none found. -func (m *DeltaDiscoveryResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DeltaDiscoveryResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for SystemVersionInfo - - for idx, item := range m.GetResources() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeltaDiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeltaDiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeltaDiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for TypeUrl - - for idx, item := range m.GetRemovedResourceNames() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeltaDiscoveryResponseValidationError{ - field: fmt.Sprintf("RemovedResourceNames[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeltaDiscoveryResponseValidationError{ - field: fmt.Sprintf("RemovedResourceNames[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeltaDiscoveryResponseValidationError{ - field: fmt.Sprintf("RemovedResourceNames[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for Nonce - - if all { - switch v := interface{}(m.GetControlPlane()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeltaDiscoveryResponseValidationError{ - field: "ControlPlane", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeltaDiscoveryResponseValidationError{ - field: "ControlPlane", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetControlPlane()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeltaDiscoveryResponseValidationError{ - field: "ControlPlane", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DeltaDiscoveryResponseMultiError(errors) - } - - return nil -} - -// DeltaDiscoveryResponseMultiError is an error wrapping multiple validation -// errors returned by DeltaDiscoveryResponse.ValidateAll() if the designated -// constraints aren't met. -type DeltaDiscoveryResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeltaDiscoveryResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeltaDiscoveryResponseMultiError) AllErrors() []error { return m } - -// DeltaDiscoveryResponseValidationError is the validation error returned by -// DeltaDiscoveryResponse.Validate if the designated constraints aren't met. -type DeltaDiscoveryResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeltaDiscoveryResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeltaDiscoveryResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeltaDiscoveryResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeltaDiscoveryResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeltaDiscoveryResponseValidationError) ErrorName() string { - return "DeltaDiscoveryResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DeltaDiscoveryResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeltaDiscoveryResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeltaDiscoveryResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeltaDiscoveryResponseValidationError{} - -// Validate checks the field values on DynamicParameterConstraints with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DynamicParameterConstraints) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DynamicParameterConstraints with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DynamicParameterConstraintsMultiError, or nil if none found. -func (m *DynamicParameterConstraints) ValidateAll() error { - return m.validate(true) -} - -func (m *DynamicParameterConstraints) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - switch v := m.Type.(type) { - case *DynamicParameterConstraints_Constraint: - if v == nil { - err := DynamicParameterConstraintsValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetConstraint()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DynamicParameterConstraintsValidationError{ - field: "Constraint", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DynamicParameterConstraintsValidationError{ - field: "Constraint", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConstraint()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DynamicParameterConstraintsValidationError{ - field: "Constraint", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *DynamicParameterConstraints_OrConstraints: - if v == nil { - err := DynamicParameterConstraintsValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetOrConstraints()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DynamicParameterConstraintsValidationError{ - field: "OrConstraints", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DynamicParameterConstraintsValidationError{ - field: "OrConstraints", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOrConstraints()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DynamicParameterConstraintsValidationError{ - field: "OrConstraints", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *DynamicParameterConstraints_AndConstraints: - if v == nil { - err := DynamicParameterConstraintsValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetAndConstraints()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DynamicParameterConstraintsValidationError{ - field: "AndConstraints", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DynamicParameterConstraintsValidationError{ - field: "AndConstraints", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAndConstraints()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DynamicParameterConstraintsValidationError{ - field: "AndConstraints", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *DynamicParameterConstraints_NotConstraints: - if v == nil { - err := DynamicParameterConstraintsValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetNotConstraints()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DynamicParameterConstraintsValidationError{ - field: "NotConstraints", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DynamicParameterConstraintsValidationError{ - field: "NotConstraints", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNotConstraints()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DynamicParameterConstraintsValidationError{ - field: "NotConstraints", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return DynamicParameterConstraintsMultiError(errors) - } - - return nil -} - -// DynamicParameterConstraintsMultiError is an error wrapping multiple -// validation errors returned by DynamicParameterConstraints.ValidateAll() if -// the designated constraints aren't met. -type DynamicParameterConstraintsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DynamicParameterConstraintsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DynamicParameterConstraintsMultiError) AllErrors() []error { return m } - -// DynamicParameterConstraintsValidationError is the validation error returned -// by DynamicParameterConstraints.Validate if the designated constraints -// aren't met. -type DynamicParameterConstraintsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DynamicParameterConstraintsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DynamicParameterConstraintsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DynamicParameterConstraintsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DynamicParameterConstraintsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DynamicParameterConstraintsValidationError) ErrorName() string { - return "DynamicParameterConstraintsValidationError" -} - -// Error satisfies the builtin error interface -func (e DynamicParameterConstraintsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDynamicParameterConstraints.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DynamicParameterConstraintsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DynamicParameterConstraintsValidationError{} - -// Validate checks the field values on Resource with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Resource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Resource with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ResourceMultiError, or nil -// if none found. -func (m *Resource) ValidateAll() error { - return m.validate(true) -} - -func (m *Resource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - if all { - switch v := interface{}(m.GetResourceName()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "ResourceName", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "ResourceName", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResourceName()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "ResourceName", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Version - - if all { - switch v := interface{}(m.GetResource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTtl()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Ttl", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Ttl", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTtl()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "Ttl", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCacheControl()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "CacheControl", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "CacheControl", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCacheControl()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "CacheControl", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ResourceMultiError(errors) - } - - return nil -} - -// ResourceMultiError is an error wrapping multiple validation errors returned -// by Resource.ValidateAll() if the designated constraints aren't met. -type ResourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResourceMultiError) AllErrors() []error { return m } - -// ResourceValidationError is the validation error returned by -// Resource.Validate if the designated constraints aren't met. -type ResourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourceValidationError) ErrorName() string { return "ResourceValidationError" } - -// Error satisfies the builtin error interface -func (e ResourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourceValidationError{} - -// Validate checks the field values on -// DynamicParameterConstraints_SingleConstraint with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DynamicParameterConstraints_SingleConstraint) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// DynamicParameterConstraints_SingleConstraint with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// DynamicParameterConstraints_SingleConstraintMultiError, or nil if none found. -func (m *DynamicParameterConstraints_SingleConstraint) ValidateAll() error { - return m.validate(true) -} - -func (m *DynamicParameterConstraints_SingleConstraint) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Key - - oneofConstraintTypePresent := false - switch v := m.ConstraintType.(type) { - case *DynamicParameterConstraints_SingleConstraint_Value: - if v == nil { - err := DynamicParameterConstraints_SingleConstraintValidationError{ - field: "ConstraintType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofConstraintTypePresent = true - // no validation rules for Value - case *DynamicParameterConstraints_SingleConstraint_Exists_: - if v == nil { - err := DynamicParameterConstraints_SingleConstraintValidationError{ - field: "ConstraintType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofConstraintTypePresent = true - - if all { - switch v := interface{}(m.GetExists()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DynamicParameterConstraints_SingleConstraintValidationError{ - field: "Exists", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DynamicParameterConstraints_SingleConstraintValidationError{ - field: "Exists", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExists()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DynamicParameterConstraints_SingleConstraintValidationError{ - field: "Exists", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofConstraintTypePresent { - err := DynamicParameterConstraints_SingleConstraintValidationError{ - field: "ConstraintType", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return DynamicParameterConstraints_SingleConstraintMultiError(errors) - } - - return nil -} - -// DynamicParameterConstraints_SingleConstraintMultiError is an error wrapping -// multiple validation errors returned by -// DynamicParameterConstraints_SingleConstraint.ValidateAll() if the -// designated constraints aren't met. -type DynamicParameterConstraints_SingleConstraintMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DynamicParameterConstraints_SingleConstraintMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DynamicParameterConstraints_SingleConstraintMultiError) AllErrors() []error { return m } - -// DynamicParameterConstraints_SingleConstraintValidationError is the -// validation error returned by -// DynamicParameterConstraints_SingleConstraint.Validate if the designated -// constraints aren't met. -type DynamicParameterConstraints_SingleConstraintValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DynamicParameterConstraints_SingleConstraintValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DynamicParameterConstraints_SingleConstraintValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DynamicParameterConstraints_SingleConstraintValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DynamicParameterConstraints_SingleConstraintValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DynamicParameterConstraints_SingleConstraintValidationError) ErrorName() string { - return "DynamicParameterConstraints_SingleConstraintValidationError" -} - -// Error satisfies the builtin error interface -func (e DynamicParameterConstraints_SingleConstraintValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDynamicParameterConstraints_SingleConstraint.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DynamicParameterConstraints_SingleConstraintValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DynamicParameterConstraints_SingleConstraintValidationError{} - -// Validate checks the field values on -// DynamicParameterConstraints_ConstraintList with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DynamicParameterConstraints_ConstraintList) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// DynamicParameterConstraints_ConstraintList with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// DynamicParameterConstraints_ConstraintListMultiError, or nil if none found. -func (m *DynamicParameterConstraints_ConstraintList) ValidateAll() error { - return m.validate(true) -} - -func (m *DynamicParameterConstraints_ConstraintList) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetConstraints() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DynamicParameterConstraints_ConstraintListValidationError{ - field: fmt.Sprintf("Constraints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DynamicParameterConstraints_ConstraintListValidationError{ - field: fmt.Sprintf("Constraints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DynamicParameterConstraints_ConstraintListValidationError{ - field: fmt.Sprintf("Constraints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return DynamicParameterConstraints_ConstraintListMultiError(errors) - } - - return nil -} - -// DynamicParameterConstraints_ConstraintListMultiError is an error wrapping -// multiple validation errors returned by -// DynamicParameterConstraints_ConstraintList.ValidateAll() if the designated -// constraints aren't met. -type DynamicParameterConstraints_ConstraintListMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DynamicParameterConstraints_ConstraintListMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DynamicParameterConstraints_ConstraintListMultiError) AllErrors() []error { return m } - -// DynamicParameterConstraints_ConstraintListValidationError is the validation -// error returned by DynamicParameterConstraints_ConstraintList.Validate if -// the designated constraints aren't met. -type DynamicParameterConstraints_ConstraintListValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DynamicParameterConstraints_ConstraintListValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DynamicParameterConstraints_ConstraintListValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DynamicParameterConstraints_ConstraintListValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DynamicParameterConstraints_ConstraintListValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DynamicParameterConstraints_ConstraintListValidationError) ErrorName() string { - return "DynamicParameterConstraints_ConstraintListValidationError" -} - -// Error satisfies the builtin error interface -func (e DynamicParameterConstraints_ConstraintListValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDynamicParameterConstraints_ConstraintList.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DynamicParameterConstraints_ConstraintListValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DynamicParameterConstraints_ConstraintListValidationError{} - -// Validate checks the field values on -// DynamicParameterConstraints_SingleConstraint_Exists with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *DynamicParameterConstraints_SingleConstraint_Exists) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// DynamicParameterConstraints_SingleConstraint_Exists with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in -// DynamicParameterConstraints_SingleConstraint_ExistsMultiError, or nil if -// none found. -func (m *DynamicParameterConstraints_SingleConstraint_Exists) ValidateAll() error { - return m.validate(true) -} - -func (m *DynamicParameterConstraints_SingleConstraint_Exists) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return DynamicParameterConstraints_SingleConstraint_ExistsMultiError(errors) - } - - return nil -} - -// DynamicParameterConstraints_SingleConstraint_ExistsMultiError is an error -// wrapping multiple validation errors returned by -// DynamicParameterConstraints_SingleConstraint_Exists.ValidateAll() if the -// designated constraints aren't met. -type DynamicParameterConstraints_SingleConstraint_ExistsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DynamicParameterConstraints_SingleConstraint_ExistsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DynamicParameterConstraints_SingleConstraint_ExistsMultiError) AllErrors() []error { return m } - -// DynamicParameterConstraints_SingleConstraint_ExistsValidationError is the -// validation error returned by -// DynamicParameterConstraints_SingleConstraint_Exists.Validate if the -// designated constraints aren't met. -type DynamicParameterConstraints_SingleConstraint_ExistsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) ErrorName() string { - return "DynamicParameterConstraints_SingleConstraint_ExistsValidationError" -} - -// Error satisfies the builtin error interface -func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDynamicParameterConstraints_SingleConstraint_Exists.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DynamicParameterConstraints_SingleConstraint_ExistsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DynamicParameterConstraints_SingleConstraint_ExistsValidationError{} - -// Validate checks the field values on Resource_CacheControl with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Resource_CacheControl) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Resource_CacheControl with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Resource_CacheControlMultiError, or nil if none found. -func (m *Resource_CacheControl) ValidateAll() error { - return m.validate(true) -} - -func (m *Resource_CacheControl) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for DoNotCache - - if len(errors) > 0 { - return Resource_CacheControlMultiError(errors) - } - - return nil -} - -// Resource_CacheControlMultiError is an error wrapping multiple validation -// errors returned by Resource_CacheControl.ValidateAll() if the designated -// constraints aren't met. -type Resource_CacheControlMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Resource_CacheControlMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Resource_CacheControlMultiError) AllErrors() []error { return m } - -// Resource_CacheControlValidationError is the validation error returned by -// Resource_CacheControl.Validate if the designated constraints aren't met. -type Resource_CacheControlValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Resource_CacheControlValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Resource_CacheControlValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Resource_CacheControlValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Resource_CacheControlValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Resource_CacheControlValidationError) ErrorName() string { - return "Resource_CacheControlValidationError" -} - -// Error satisfies the builtin error interface -func (e Resource_CacheControlValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResource_CacheControl.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Resource_CacheControlValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Resource_CacheControlValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/filter_state.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/filter_state.pb.go deleted file mode 100644 index 1f6b2398748..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/filter_state.pb.go +++ /dev/null @@ -1,208 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/matcher/v3/filter_state.proto - -package matcherv3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// FilterStateMatcher provides a general interface for matching the filter state objects. -type FilterStateMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The filter state key to retrieve the object. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Types that are assignable to Matcher: - // - // *FilterStateMatcher_StringMatch - Matcher isFilterStateMatcher_Matcher `protobuf_oneof:"matcher"` -} - -func (x *FilterStateMatcher) Reset() { - *x = FilterStateMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_filter_state_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilterStateMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilterStateMatcher) ProtoMessage() {} - -func (x *FilterStateMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_filter_state_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilterStateMatcher.ProtoReflect.Descriptor instead. -func (*FilterStateMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_filter_state_proto_rawDescGZIP(), []int{0} -} - -func (x *FilterStateMatcher) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (m *FilterStateMatcher) GetMatcher() isFilterStateMatcher_Matcher { - if m != nil { - return m.Matcher - } - return nil -} - -func (x *FilterStateMatcher) GetStringMatch() *StringMatcher { - if x, ok := x.GetMatcher().(*FilterStateMatcher_StringMatch); ok { - return x.StringMatch - } - return nil -} - -type isFilterStateMatcher_Matcher interface { - isFilterStateMatcher_Matcher() -} - -type FilterStateMatcher_StringMatch struct { - // Matches the filter state object as a string value. - StringMatch *StringMatcher `protobuf:"bytes,2,opt,name=string_match,json=stringMatch,proto3,oneof"` -} - -func (*FilterStateMatcher_StringMatch) isFilterStateMatcher_Matcher() {} - -var File_envoy_type_matcher_v3_filter_state_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v3_filter_state_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x01, - 0x0a, 0x12, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x49, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x07, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x89, 0x01, 0x0a, 0x23, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x42, 0x10, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, - 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v3_filter_state_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v3_filter_state_proto_rawDescData = file_envoy_type_matcher_v3_filter_state_proto_rawDesc -) - -func file_envoy_type_matcher_v3_filter_state_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v3_filter_state_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v3_filter_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_filter_state_proto_rawDescData) - }) - return file_envoy_type_matcher_v3_filter_state_proto_rawDescData -} - -var file_envoy_type_matcher_v3_filter_state_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_type_matcher_v3_filter_state_proto_goTypes = []interface{}{ - (*FilterStateMatcher)(nil), // 0: envoy.type.matcher.v3.FilterStateMatcher - (*StringMatcher)(nil), // 1: envoy.type.matcher.v3.StringMatcher -} -var file_envoy_type_matcher_v3_filter_state_proto_depIdxs = []int32{ - 1, // 0: envoy.type.matcher.v3.FilterStateMatcher.string_match:type_name -> envoy.type.matcher.v3.StringMatcher - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v3_filter_state_proto_init() } -func file_envoy_type_matcher_v3_filter_state_proto_init() { - if File_envoy_type_matcher_v3_filter_state_proto != nil { - return - } - file_envoy_type_matcher_v3_string_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v3_filter_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterStateMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v3_filter_state_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*FilterStateMatcher_StringMatch)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v3_filter_state_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v3_filter_state_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v3_filter_state_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v3_filter_state_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v3_filter_state_proto = out.File - file_envoy_type_matcher_v3_filter_state_proto_rawDesc = nil - file_envoy_type_matcher_v3_filter_state_proto_goTypes = nil - file_envoy_type_matcher_v3_filter_state_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/filter_state.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/filter_state.pb.validate.go deleted file mode 100644 index 0152061d5be..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/filter_state.pb.validate.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v3/filter_state.proto - -package matcherv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on FilterStateMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FilterStateMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FilterStateMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FilterStateMatcherMultiError, or nil if none found. -func (m *FilterStateMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *FilterStateMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKey()) < 1 { - err := FilterStateMatcherValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - oneofMatcherPresent := false - switch v := m.Matcher.(type) { - case *FilterStateMatcher_StringMatch: - if v == nil { - err := FilterStateMatcherValidationError{ - field: "Matcher", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatcherPresent = true - - if all { - switch v := interface{}(m.GetStringMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterStateMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterStateMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterStateMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofMatcherPresent { - err := FilterStateMatcherValidationError{ - field: "Matcher", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return FilterStateMatcherMultiError(errors) - } - - return nil -} - -// FilterStateMatcherMultiError is an error wrapping multiple validation errors -// returned by FilterStateMatcher.ValidateAll() if the designated constraints -// aren't met. -type FilterStateMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FilterStateMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FilterStateMatcherMultiError) AllErrors() []error { return m } - -// FilterStateMatcherValidationError is the validation error returned by -// FilterStateMatcher.Validate if the designated constraints aren't met. -type FilterStateMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterStateMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterStateMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterStateMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterStateMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterStateMatcherValidationError) ErrorName() string { - return "FilterStateMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e FilterStateMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilterStateMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterStateMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterStateMatcherValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/http_inputs.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/http_inputs.pb.go deleted file mode 100644 index 349cfbfa640..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/http_inputs.pb.go +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/matcher/v3/http_inputs.proto - -package matcherv3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Match input indicates that matching should be done on a specific request header. -// The resulting input string will be all headers for the given key joined by a comma, -// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input -// string will be 'bar,baz'. -// [#comment:TODO(snowp): Link to unified matching docs.] -// [#extension: envoy.matching.inputs.request_headers] -type HttpRequestHeaderMatchInput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The request header to match on. - HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` -} - -func (x *HttpRequestHeaderMatchInput) Reset() { - *x = HttpRequestHeaderMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpRequestHeaderMatchInput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpRequestHeaderMatchInput) ProtoMessage() {} - -func (x *HttpRequestHeaderMatchInput) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpRequestHeaderMatchInput.ProtoReflect.Descriptor instead. -func (*HttpRequestHeaderMatchInput) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{0} -} - -func (x *HttpRequestHeaderMatchInput) GetHeaderName() string { - if x != nil { - return x.HeaderName - } - return "" -} - -// Match input indicates that matching should be done on a specific request trailer. -// The resulting input string will be all headers for the given key joined by a comma, -// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input -// string will be 'bar,baz'. -// [#comment:TODO(snowp): Link to unified matching docs.] -// [#extension: envoy.matching.inputs.request_trailers] -type HttpRequestTrailerMatchInput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The request trailer to match on. - HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` -} - -func (x *HttpRequestTrailerMatchInput) Reset() { - *x = HttpRequestTrailerMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpRequestTrailerMatchInput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpRequestTrailerMatchInput) ProtoMessage() {} - -func (x *HttpRequestTrailerMatchInput) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpRequestTrailerMatchInput.ProtoReflect.Descriptor instead. -func (*HttpRequestTrailerMatchInput) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{1} -} - -func (x *HttpRequestTrailerMatchInput) GetHeaderName() string { - if x != nil { - return x.HeaderName - } - return "" -} - -// Match input indicating that matching should be done on a specific response header. -// The resulting input string will be all headers for the given key joined by a comma, -// e.g. if the response contains two 'foo' headers with value 'bar' and 'baz', the input -// string will be 'bar,baz'. -// [#comment:TODO(snowp): Link to unified matching docs.] -// [#extension: envoy.matching.inputs.response_headers] -type HttpResponseHeaderMatchInput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The response header to match on. - HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` -} - -func (x *HttpResponseHeaderMatchInput) Reset() { - *x = HttpResponseHeaderMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpResponseHeaderMatchInput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpResponseHeaderMatchInput) ProtoMessage() {} - -func (x *HttpResponseHeaderMatchInput) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpResponseHeaderMatchInput.ProtoReflect.Descriptor instead. -func (*HttpResponseHeaderMatchInput) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{2} -} - -func (x *HttpResponseHeaderMatchInput) GetHeaderName() string { - if x != nil { - return x.HeaderName - } - return "" -} - -// Match input indicates that matching should be done on a specific response trailer. -// The resulting input string will be all headers for the given key joined by a comma, -// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input -// string will be 'bar,baz'. -// [#comment:TODO(snowp): Link to unified matching docs.] -// [#extension: envoy.matching.inputs.response_trailers] -type HttpResponseTrailerMatchInput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The response trailer to match on. - HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` -} - -func (x *HttpResponseTrailerMatchInput) Reset() { - *x = HttpResponseTrailerMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpResponseTrailerMatchInput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpResponseTrailerMatchInput) ProtoMessage() {} - -func (x *HttpResponseTrailerMatchInput) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpResponseTrailerMatchInput.ProtoReflect.Descriptor instead. -func (*HttpResponseTrailerMatchInput) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{3} -} - -func (x *HttpResponseTrailerMatchInput) GetHeaderName() string { - if x != nil { - return x.HeaderName - } - return "" -} - -// Match input indicates that matching should be done on a specific query parameter. -// The resulting input string will be the first query parameter for the value -// 'query_param'. -// [#extension: envoy.matching.inputs.query_params] -type HttpRequestQueryParamMatchInput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The query parameter to match on. - QueryParam string `protobuf:"bytes,1,opt,name=query_param,json=queryParam,proto3" json:"query_param,omitempty"` -} - -func (x *HttpRequestQueryParamMatchInput) Reset() { - *x = HttpRequestQueryParamMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpRequestQueryParamMatchInput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpRequestQueryParamMatchInput) ProtoMessage() {} - -func (x *HttpRequestQueryParamMatchInput) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpRequestQueryParamMatchInput.ProtoReflect.Descriptor instead. -func (*HttpRequestQueryParamMatchInput) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{4} -} - -func (x *HttpRequestQueryParamMatchInput) GetQueryParam() string { - if x != nil { - return x.QueryParam - } - return "" -} - -var File_envoy_type_matcher_v3_http_inputs_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v3_http_inputs_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x1b, 0x48, 0x74, 0x74, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, - 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x1c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, - 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x1c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, - 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x4d, 0x0a, 0x1d, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, - 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x22, 0x4b, 0x0a, 0x1f, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x12, 0x28, 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x42, 0x88, 0x01, - 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, - 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, - 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v3_http_inputs_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v3_http_inputs_proto_rawDescData = file_envoy_type_matcher_v3_http_inputs_proto_rawDesc -) - -func file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v3_http_inputs_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v3_http_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_http_inputs_proto_rawDescData) - }) - return file_envoy_type_matcher_v3_http_inputs_proto_rawDescData -} - -var file_envoy_type_matcher_v3_http_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_envoy_type_matcher_v3_http_inputs_proto_goTypes = []interface{}{ - (*HttpRequestHeaderMatchInput)(nil), // 0: envoy.type.matcher.v3.HttpRequestHeaderMatchInput - (*HttpRequestTrailerMatchInput)(nil), // 1: envoy.type.matcher.v3.HttpRequestTrailerMatchInput - (*HttpResponseHeaderMatchInput)(nil), // 2: envoy.type.matcher.v3.HttpResponseHeaderMatchInput - (*HttpResponseTrailerMatchInput)(nil), // 3: envoy.type.matcher.v3.HttpResponseTrailerMatchInput - (*HttpRequestQueryParamMatchInput)(nil), // 4: envoy.type.matcher.v3.HttpRequestQueryParamMatchInput -} -var file_envoy_type_matcher_v3_http_inputs_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v3_http_inputs_proto_init() } -func file_envoy_type_matcher_v3_http_inputs_proto_init() { - if File_envoy_type_matcher_v3_http_inputs_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpRequestHeaderMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpRequestTrailerMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpResponseHeaderMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpResponseTrailerMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpRequestQueryParamMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v3_http_inputs_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v3_http_inputs_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v3_http_inputs_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v3_http_inputs_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v3_http_inputs_proto = out.File - file_envoy_type_matcher_v3_http_inputs_proto_rawDesc = nil - file_envoy_type_matcher_v3_http_inputs_proto_goTypes = nil - file_envoy_type_matcher_v3_http_inputs_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/http_inputs.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/http_inputs.pb.validate.go deleted file mode 100644 index 24950b97ab5..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/http_inputs.pb.validate.go +++ /dev/null @@ -1,614 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v3/http_inputs.proto - -package matcherv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on HttpRequestHeaderMatchInput with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HttpRequestHeaderMatchInput) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpRequestHeaderMatchInput with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HttpRequestHeaderMatchInputMultiError, or nil if none found. -func (m *HttpRequestHeaderMatchInput) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpRequestHeaderMatchInput) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if !_HttpRequestHeaderMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - err := HttpRequestHeaderMatchInputValidationError{ - field: "HeaderName", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HttpRequestHeaderMatchInputMultiError(errors) - } - - return nil -} - -// HttpRequestHeaderMatchInputMultiError is an error wrapping multiple -// validation errors returned by HttpRequestHeaderMatchInput.ValidateAll() if -// the designated constraints aren't met. -type HttpRequestHeaderMatchInputMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpRequestHeaderMatchInputMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpRequestHeaderMatchInputMultiError) AllErrors() []error { return m } - -// HttpRequestHeaderMatchInputValidationError is the validation error returned -// by HttpRequestHeaderMatchInput.Validate if the designated constraints -// aren't met. -type HttpRequestHeaderMatchInputValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpRequestHeaderMatchInputValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpRequestHeaderMatchInputValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpRequestHeaderMatchInputValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpRequestHeaderMatchInputValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpRequestHeaderMatchInputValidationError) ErrorName() string { - return "HttpRequestHeaderMatchInputValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpRequestHeaderMatchInputValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpRequestHeaderMatchInput.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpRequestHeaderMatchInputValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpRequestHeaderMatchInputValidationError{} - -var _HttpRequestHeaderMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on HttpRequestTrailerMatchInput with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HttpRequestTrailerMatchInput) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpRequestTrailerMatchInput with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HttpRequestTrailerMatchInputMultiError, or nil if none found. -func (m *HttpRequestTrailerMatchInput) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpRequestTrailerMatchInput) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if !_HttpRequestTrailerMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - err := HttpRequestTrailerMatchInputValidationError{ - field: "HeaderName", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HttpRequestTrailerMatchInputMultiError(errors) - } - - return nil -} - -// HttpRequestTrailerMatchInputMultiError is an error wrapping multiple -// validation errors returned by HttpRequestTrailerMatchInput.ValidateAll() if -// the designated constraints aren't met. -type HttpRequestTrailerMatchInputMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpRequestTrailerMatchInputMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpRequestTrailerMatchInputMultiError) AllErrors() []error { return m } - -// HttpRequestTrailerMatchInputValidationError is the validation error returned -// by HttpRequestTrailerMatchInput.Validate if the designated constraints -// aren't met. -type HttpRequestTrailerMatchInputValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpRequestTrailerMatchInputValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpRequestTrailerMatchInputValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpRequestTrailerMatchInputValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpRequestTrailerMatchInputValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpRequestTrailerMatchInputValidationError) ErrorName() string { - return "HttpRequestTrailerMatchInputValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpRequestTrailerMatchInputValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpRequestTrailerMatchInput.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpRequestTrailerMatchInputValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpRequestTrailerMatchInputValidationError{} - -var _HttpRequestTrailerMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on HttpResponseHeaderMatchInput with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HttpResponseHeaderMatchInput) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpResponseHeaderMatchInput with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HttpResponseHeaderMatchInputMultiError, or nil if none found. -func (m *HttpResponseHeaderMatchInput) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpResponseHeaderMatchInput) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if !_HttpResponseHeaderMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - err := HttpResponseHeaderMatchInputValidationError{ - field: "HeaderName", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HttpResponseHeaderMatchInputMultiError(errors) - } - - return nil -} - -// HttpResponseHeaderMatchInputMultiError is an error wrapping multiple -// validation errors returned by HttpResponseHeaderMatchInput.ValidateAll() if -// the designated constraints aren't met. -type HttpResponseHeaderMatchInputMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpResponseHeaderMatchInputMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpResponseHeaderMatchInputMultiError) AllErrors() []error { return m } - -// HttpResponseHeaderMatchInputValidationError is the validation error returned -// by HttpResponseHeaderMatchInput.Validate if the designated constraints -// aren't met. -type HttpResponseHeaderMatchInputValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpResponseHeaderMatchInputValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpResponseHeaderMatchInputValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpResponseHeaderMatchInputValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpResponseHeaderMatchInputValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpResponseHeaderMatchInputValidationError) ErrorName() string { - return "HttpResponseHeaderMatchInputValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpResponseHeaderMatchInputValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpResponseHeaderMatchInput.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpResponseHeaderMatchInputValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpResponseHeaderMatchInputValidationError{} - -var _HttpResponseHeaderMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on HttpResponseTrailerMatchInput with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HttpResponseTrailerMatchInput) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpResponseTrailerMatchInput with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// HttpResponseTrailerMatchInputMultiError, or nil if none found. -func (m *HttpResponseTrailerMatchInput) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpResponseTrailerMatchInput) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if !_HttpResponseTrailerMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - err := HttpResponseTrailerMatchInputValidationError{ - field: "HeaderName", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HttpResponseTrailerMatchInputMultiError(errors) - } - - return nil -} - -// HttpResponseTrailerMatchInputMultiError is an error wrapping multiple -// validation errors returned by HttpResponseTrailerMatchInput.ValidateAll() -// if the designated constraints aren't met. -type HttpResponseTrailerMatchInputMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpResponseTrailerMatchInputMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpResponseTrailerMatchInputMultiError) AllErrors() []error { return m } - -// HttpResponseTrailerMatchInputValidationError is the validation error -// returned by HttpResponseTrailerMatchInput.Validate if the designated -// constraints aren't met. -type HttpResponseTrailerMatchInputValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpResponseTrailerMatchInputValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpResponseTrailerMatchInputValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpResponseTrailerMatchInputValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpResponseTrailerMatchInputValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpResponseTrailerMatchInputValidationError) ErrorName() string { - return "HttpResponseTrailerMatchInputValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpResponseTrailerMatchInputValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpResponseTrailerMatchInput.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpResponseTrailerMatchInputValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpResponseTrailerMatchInputValidationError{} - -var _HttpResponseTrailerMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on HttpRequestQueryParamMatchInput with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HttpRequestQueryParamMatchInput) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpRequestQueryParamMatchInput with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// HttpRequestQueryParamMatchInputMultiError, or nil if none found. -func (m *HttpRequestQueryParamMatchInput) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpRequestQueryParamMatchInput) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetQueryParam()) < 1 { - err := HttpRequestQueryParamMatchInputValidationError{ - field: "QueryParam", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HttpRequestQueryParamMatchInputMultiError(errors) - } - - return nil -} - -// HttpRequestQueryParamMatchInputMultiError is an error wrapping multiple -// validation errors returned by HttpRequestQueryParamMatchInput.ValidateAll() -// if the designated constraints aren't met. -type HttpRequestQueryParamMatchInputMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpRequestQueryParamMatchInputMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpRequestQueryParamMatchInputMultiError) AllErrors() []error { return m } - -// HttpRequestQueryParamMatchInputValidationError is the validation error -// returned by HttpRequestQueryParamMatchInput.Validate if the designated -// constraints aren't met. -type HttpRequestQueryParamMatchInputValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpRequestQueryParamMatchInputValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpRequestQueryParamMatchInputValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpRequestQueryParamMatchInputValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpRequestQueryParamMatchInputValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpRequestQueryParamMatchInputValidationError) ErrorName() string { - return "HttpRequestQueryParamMatchInputValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpRequestQueryParamMatchInputValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpRequestQueryParamMatchInput.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpRequestQueryParamMatchInputValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpRequestQueryParamMatchInputValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/metadata.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/metadata.pb.go deleted file mode 100644 index 0c537344a3f..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/metadata.pb.go +++ /dev/null @@ -1,308 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/matcher/v3/metadata.proto - -package matcherv3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// [#next-major-version: MetadataMatcher should use StructMatcher] -type MetadataMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The filter name to retrieve the Struct from the Metadata. - Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` - // The path to retrieve the Value from the Struct. - Path []*MetadataMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` - // The MetadataMatcher is matched if the value retrieved by path is matched to this value. - Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - // If true, the match result will be inverted. - Invert bool `protobuf:"varint,4,opt,name=invert,proto3" json:"invert,omitempty"` -} - -func (x *MetadataMatcher) Reset() { - *x = MetadataMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataMatcher) ProtoMessage() {} - -func (x *MetadataMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataMatcher.ProtoReflect.Descriptor instead. -func (*MetadataMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_metadata_proto_rawDescGZIP(), []int{0} -} - -func (x *MetadataMatcher) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -func (x *MetadataMatcher) GetPath() []*MetadataMatcher_PathSegment { - if x != nil { - return x.Path - } - return nil -} - -func (x *MetadataMatcher) GetValue() *ValueMatcher { - if x != nil { - return x.Value - } - return nil -} - -func (x *MetadataMatcher) GetInvert() bool { - if x != nil { - return x.Invert - } - return false -} - -// Specifies the segment in a path to retrieve value from Metadata. -// Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that -// if the segment key refers to a list, it has to be the last segment in a path. -type MetadataMatcher_PathSegment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Segment: - // - // *MetadataMatcher_PathSegment_Key - Segment isMetadataMatcher_PathSegment_Segment `protobuf_oneof:"segment"` -} - -func (x *MetadataMatcher_PathSegment) Reset() { - *x = MetadataMatcher_PathSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataMatcher_PathSegment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataMatcher_PathSegment) ProtoMessage() {} - -func (x *MetadataMatcher_PathSegment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataMatcher_PathSegment.ProtoReflect.Descriptor instead. -func (*MetadataMatcher_PathSegment) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_metadata_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *MetadataMatcher_PathSegment) GetSegment() isMetadataMatcher_PathSegment_Segment { - if m != nil { - return m.Segment - } - return nil -} - -func (x *MetadataMatcher_PathSegment) GetKey() string { - if x, ok := x.GetSegment().(*MetadataMatcher_PathSegment_Key); ok { - return x.Key - } - return "" -} - -type isMetadataMatcher_PathSegment_Segment interface { - isMetadataMatcher_PathSegment_Segment() -} - -type MetadataMatcher_PathSegment_Key struct { - // If specified, use the key to retrieve the value in a Struct. - Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` -} - -func (*MetadataMatcher_PathSegment_Key) isMetadataMatcher_PathSegment_Segment() {} - -var File_envoy_type_matcher_v3_metadata_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v3_metadata_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x02, 0x0a, 0x0f, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, - 0x1f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x50, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, - 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x1a, - 0x71, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88, - 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, - 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x86, 0x01, - 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, - 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v3_metadata_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v3_metadata_proto_rawDescData = file_envoy_type_matcher_v3_metadata_proto_rawDesc -) - -func file_envoy_type_matcher_v3_metadata_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v3_metadata_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v3_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_metadata_proto_rawDescData) - }) - return file_envoy_type_matcher_v3_metadata_proto_rawDescData -} - -var file_envoy_type_matcher_v3_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_type_matcher_v3_metadata_proto_goTypes = []interface{}{ - (*MetadataMatcher)(nil), // 0: envoy.type.matcher.v3.MetadataMatcher - (*MetadataMatcher_PathSegment)(nil), // 1: envoy.type.matcher.v3.MetadataMatcher.PathSegment - (*ValueMatcher)(nil), // 2: envoy.type.matcher.v3.ValueMatcher -} -var file_envoy_type_matcher_v3_metadata_proto_depIdxs = []int32{ - 1, // 0: envoy.type.matcher.v3.MetadataMatcher.path:type_name -> envoy.type.matcher.v3.MetadataMatcher.PathSegment - 2, // 1: envoy.type.matcher.v3.MetadataMatcher.value:type_name -> envoy.type.matcher.v3.ValueMatcher - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v3_metadata_proto_init() } -func file_envoy_type_matcher_v3_metadata_proto_init() { - if File_envoy_type_matcher_v3_metadata_proto != nil { - return - } - file_envoy_type_matcher_v3_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v3_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataMatcher_PathSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v3_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*MetadataMatcher_PathSegment_Key)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v3_metadata_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v3_metadata_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v3_metadata_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v3_metadata_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v3_metadata_proto = out.File - file_envoy_type_matcher_v3_metadata_proto_rawDesc = nil - file_envoy_type_matcher_v3_metadata_proto_goTypes = nil - file_envoy_type_matcher_v3_metadata_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/metadata.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/metadata.pb.validate.go deleted file mode 100644 index 0a00e4faa31..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/metadata.pb.validate.go +++ /dev/null @@ -1,377 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v3/metadata.proto - -package matcherv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on MetadataMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *MetadataMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataMatcherMultiError, or nil if none found. -func (m *MetadataMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetFilter()) < 1 { - err := MetadataMatcherValidationError{ - field: "Filter", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetPath()) < 1 { - err := MetadataMatcherValidationError{ - field: "Path", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetPath() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataMatcherValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataMatcherValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataMatcherValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if m.GetValue() == nil { - err := MetadataMatcherValidationError{ - field: "Value", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetValue()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataMatcherValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataMatcherValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataMatcherValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Invert - - if len(errors) > 0 { - return MetadataMatcherMultiError(errors) - } - - return nil -} - -// MetadataMatcherMultiError is an error wrapping multiple validation errors -// returned by MetadataMatcher.ValidateAll() if the designated constraints -// aren't met. -type MetadataMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataMatcherMultiError) AllErrors() []error { return m } - -// MetadataMatcherValidationError is the validation error returned by -// MetadataMatcher.Validate if the designated constraints aren't met. -type MetadataMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataMatcherValidationError) ErrorName() string { return "MetadataMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e MetadataMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataMatcherValidationError{} - -// Validate checks the field values on MetadataMatcher_PathSegment with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *MetadataMatcher_PathSegment) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataMatcher_PathSegment with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataMatcher_PathSegmentMultiError, or nil if none found. -func (m *MetadataMatcher_PathSegment) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataMatcher_PathSegment) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofSegmentPresent := false - switch v := m.Segment.(type) { - case *MetadataMatcher_PathSegment_Key: - if v == nil { - err := MetadataMatcher_PathSegmentValidationError{ - field: "Segment", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofSegmentPresent = true - - if utf8.RuneCountInString(m.GetKey()) < 1 { - err := MetadataMatcher_PathSegmentValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - if !oneofSegmentPresent { - err := MetadataMatcher_PathSegmentValidationError{ - field: "Segment", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return MetadataMatcher_PathSegmentMultiError(errors) - } - - return nil -} - -// MetadataMatcher_PathSegmentMultiError is an error wrapping multiple -// validation errors returned by MetadataMatcher_PathSegment.ValidateAll() if -// the designated constraints aren't met. -type MetadataMatcher_PathSegmentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataMatcher_PathSegmentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataMatcher_PathSegmentMultiError) AllErrors() []error { return m } - -// MetadataMatcher_PathSegmentValidationError is the validation error returned -// by MetadataMatcher_PathSegment.Validate if the designated constraints -// aren't met. -type MetadataMatcher_PathSegmentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataMatcher_PathSegmentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataMatcher_PathSegmentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataMatcher_PathSegmentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataMatcher_PathSegmentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataMatcher_PathSegmentValidationError) ErrorName() string { - return "MetadataMatcher_PathSegmentValidationError" -} - -// Error satisfies the builtin error interface -func (e MetadataMatcher_PathSegmentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataMatcher_PathSegment.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataMatcher_PathSegmentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataMatcher_PathSegmentValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/node.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/node.pb.go deleted file mode 100644 index 5278c5c71c4..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/node.pb.go +++ /dev/null @@ -1,194 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/matcher/v3/node.proto - -package matcherv3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the way to match a Node. -// The match follows AND semantics. -type NodeMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies match criteria on the node id. - NodeId *StringMatcher `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // Specifies match criteria on the node metadata. - NodeMetadatas []*StructMatcher `protobuf:"bytes,2,rep,name=node_metadatas,json=nodeMetadatas,proto3" json:"node_metadatas,omitempty"` -} - -func (x *NodeMatcher) Reset() { - *x = NodeMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_node_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeMatcher) ProtoMessage() {} - -func (x *NodeMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_node_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeMatcher.ProtoReflect.Descriptor instead. -func (*NodeMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_node_proto_rawDescGZIP(), []int{0} -} - -func (x *NodeMatcher) GetNodeId() *StringMatcher { - if x != nil { - return x.NodeId - } - return nil -} - -func (x *NodeMatcher) GetNodeMetadatas() []*StructMatcher { - if x != nil { - return x.NodeMetadatas - } - return nil -} - -var File_envoy_type_matcher_v3_node_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v3_node_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, - 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, - 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, 0x3a, - 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x82, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, - 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, - 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v3_node_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v3_node_proto_rawDescData = file_envoy_type_matcher_v3_node_proto_rawDesc -) - -func file_envoy_type_matcher_v3_node_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v3_node_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v3_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_node_proto_rawDescData) - }) - return file_envoy_type_matcher_v3_node_proto_rawDescData -} - -var file_envoy_type_matcher_v3_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_type_matcher_v3_node_proto_goTypes = []interface{}{ - (*NodeMatcher)(nil), // 0: envoy.type.matcher.v3.NodeMatcher - (*StringMatcher)(nil), // 1: envoy.type.matcher.v3.StringMatcher - (*StructMatcher)(nil), // 2: envoy.type.matcher.v3.StructMatcher -} -var file_envoy_type_matcher_v3_node_proto_depIdxs = []int32{ - 1, // 0: envoy.type.matcher.v3.NodeMatcher.node_id:type_name -> envoy.type.matcher.v3.StringMatcher - 2, // 1: envoy.type.matcher.v3.NodeMatcher.node_metadatas:type_name -> envoy.type.matcher.v3.StructMatcher - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v3_node_proto_init() } -func file_envoy_type_matcher_v3_node_proto_init() { - if File_envoy_type_matcher_v3_node_proto != nil { - return - } - file_envoy_type_matcher_v3_string_proto_init() - file_envoy_type_matcher_v3_struct_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v3_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v3_node_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v3_node_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v3_node_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v3_node_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v3_node_proto = out.File - file_envoy_type_matcher_v3_node_proto_rawDesc = nil - file_envoy_type_matcher_v3_node_proto_goTypes = nil - file_envoy_type_matcher_v3_node_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/node.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/node.pb.validate.go deleted file mode 100644 index fb9b77f213c..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/node.pb.validate.go +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v3/node.proto - -package matcherv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on NodeMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *NodeMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on NodeMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in NodeMatcherMultiError, or -// nil if none found. -func (m *NodeMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *NodeMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetNodeId()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NodeMatcherValidationError{ - field: "NodeId", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NodeMatcherValidationError{ - field: "NodeId", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNodeId()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NodeMatcherValidationError{ - field: "NodeId", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetNodeMetadatas() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NodeMatcherValidationError{ - field: fmt.Sprintf("NodeMetadatas[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NodeMatcherValidationError{ - field: fmt.Sprintf("NodeMetadatas[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NodeMatcherValidationError{ - field: fmt.Sprintf("NodeMetadatas[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return NodeMatcherMultiError(errors) - } - - return nil -} - -// NodeMatcherMultiError is an error wrapping multiple validation errors -// returned by NodeMatcher.ValidateAll() if the designated constraints aren't met. -type NodeMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NodeMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m NodeMatcherMultiError) AllErrors() []error { return m } - -// NodeMatcherValidationError is the validation error returned by -// NodeMatcher.Validate if the designated constraints aren't met. -type NodeMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NodeMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NodeMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NodeMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NodeMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NodeMatcherValidationError) ErrorName() string { return "NodeMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e NodeMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNodeMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NodeMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NodeMatcherValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/number.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/number.pb.go deleted file mode 100644 index 344b7704467..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/number.pb.go +++ /dev/null @@ -1,218 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/matcher/v3/number.proto - -package matcherv3 - -import ( - v3 "github.com/cilium/proxy/go/envoy/type/v3" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the way to match a double value. -type DoubleMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatchPattern: - // - // *DoubleMatcher_Range - // *DoubleMatcher_Exact - MatchPattern isDoubleMatcher_MatchPattern `protobuf_oneof:"match_pattern"` -} - -func (x *DoubleMatcher) Reset() { - *x = DoubleMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_number_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoubleMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoubleMatcher) ProtoMessage() {} - -func (x *DoubleMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_number_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoubleMatcher.ProtoReflect.Descriptor instead. -func (*DoubleMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_number_proto_rawDescGZIP(), []int{0} -} - -func (m *DoubleMatcher) GetMatchPattern() isDoubleMatcher_MatchPattern { - if m != nil { - return m.MatchPattern - } - return nil -} - -func (x *DoubleMatcher) GetRange() *v3.DoubleRange { - if x, ok := x.GetMatchPattern().(*DoubleMatcher_Range); ok { - return x.Range - } - return nil -} - -func (x *DoubleMatcher) GetExact() float64 { - if x, ok := x.GetMatchPattern().(*DoubleMatcher_Exact); ok { - return x.Exact - } - return 0 -} - -type isDoubleMatcher_MatchPattern interface { - isDoubleMatcher_MatchPattern() -} - -type DoubleMatcher_Range struct { - // If specified, the input double value must be in the range specified here. - // Note: The range is using half-open interval semantics [start, end). - Range *v3.DoubleRange `protobuf:"bytes,1,opt,name=range,proto3,oneof"` -} - -type DoubleMatcher_Exact struct { - // If specified, the input double value must be equal to the value specified here. - Exact float64 `protobuf:"fixed64,2,opt,name=exact,proto3,oneof"` -} - -func (*DoubleMatcher_Range) isDoubleMatcher_MatchPattern() {} - -func (*DoubleMatcher_Exact) isDoubleMatcher_MatchPattern() {} - -var File_envoy_type_matcher_v3_number_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v3_number_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x19, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x0d, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, - 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x3a, - 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, - 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x84, - 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v3_number_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v3_number_proto_rawDescData = file_envoy_type_matcher_v3_number_proto_rawDesc -) - -func file_envoy_type_matcher_v3_number_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v3_number_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v3_number_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_number_proto_rawDescData) - }) - return file_envoy_type_matcher_v3_number_proto_rawDescData -} - -var file_envoy_type_matcher_v3_number_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_type_matcher_v3_number_proto_goTypes = []interface{}{ - (*DoubleMatcher)(nil), // 0: envoy.type.matcher.v3.DoubleMatcher - (*v3.DoubleRange)(nil), // 1: envoy.type.v3.DoubleRange -} -var file_envoy_type_matcher_v3_number_proto_depIdxs = []int32{ - 1, // 0: envoy.type.matcher.v3.DoubleMatcher.range:type_name -> envoy.type.v3.DoubleRange - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v3_number_proto_init() } -func file_envoy_type_matcher_v3_number_proto_init() { - if File_envoy_type_matcher_v3_number_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v3_number_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoubleMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v3_number_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*DoubleMatcher_Range)(nil), - (*DoubleMatcher_Exact)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v3_number_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v3_number_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v3_number_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v3_number_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v3_number_proto = out.File - file_envoy_type_matcher_v3_number_proto_rawDesc = nil - file_envoy_type_matcher_v3_number_proto_goTypes = nil - file_envoy_type_matcher_v3_number_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/number.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/number.pb.validate.go deleted file mode 100644 index d656d7f445d..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/number.pb.validate.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v3/number.proto - -package matcherv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on DoubleMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DoubleMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DoubleMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DoubleMatcherMultiError, or -// nil if none found. -func (m *DoubleMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *DoubleMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofMatchPatternPresent := false - switch v := m.MatchPattern.(type) { - case *DoubleMatcher_Range: - if v == nil { - err := DoubleMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if all { - switch v := interface{}(m.GetRange()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DoubleMatcherValidationError{ - field: "Range", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DoubleMatcherValidationError{ - field: "Range", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRange()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DoubleMatcherValidationError{ - field: "Range", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *DoubleMatcher_Exact: - if v == nil { - err := DoubleMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - // no validation rules for Exact - default: - _ = v // ensures v is used - } - if !oneofMatchPatternPresent { - err := DoubleMatcherValidationError{ - field: "MatchPattern", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return DoubleMatcherMultiError(errors) - } - - return nil -} - -// DoubleMatcherMultiError is an error wrapping multiple validation errors -// returned by DoubleMatcher.ValidateAll() if the designated constraints -// aren't met. -type DoubleMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DoubleMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DoubleMatcherMultiError) AllErrors() []error { return m } - -// DoubleMatcherValidationError is the validation error returned by -// DoubleMatcher.Validate if the designated constraints aren't met. -type DoubleMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DoubleMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DoubleMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DoubleMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DoubleMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DoubleMatcherValidationError) ErrorName() string { return "DoubleMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e DoubleMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDoubleMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DoubleMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DoubleMatcherValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/path.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/path.pb.go deleted file mode 100644 index 77f8dacd360..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/path.pb.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/matcher/v3/path.proto - -package matcherv3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the way to match a path on HTTP request. -type PathMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Rule: - // - // *PathMatcher_Path - Rule isPathMatcher_Rule `protobuf_oneof:"rule"` -} - -func (x *PathMatcher) Reset() { - *x = PathMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_path_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PathMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PathMatcher) ProtoMessage() {} - -func (x *PathMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_path_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PathMatcher.ProtoReflect.Descriptor instead. -func (*PathMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_path_proto_rawDescGZIP(), []int{0} -} - -func (m *PathMatcher) GetRule() isPathMatcher_Rule { - if m != nil { - return m.Rule - } - return nil -} - -func (x *PathMatcher) GetPath() *StringMatcher { - if x, ok := x.GetRule().(*PathMatcher_Path); ok { - return x.Path - } - return nil -} - -type isPathMatcher_Rule interface { - isPathMatcher_Rule() -} - -type PathMatcher_Path struct { - // The “path“ must match the URL path portion of the :path header. The query and fragment - // string (if present) are removed in the URL path portion. - // For example, the path “/data“ will match the “:path“ header “/data#fragment?param=value“. - Path *StringMatcher `protobuf:"bytes,1,opt,name=path,proto3,oneof"` -} - -func (*PathMatcher_Path) isPathMatcher_Rule() {} - -var File_envoy_type_matcher_v3_path_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v3_path_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, - 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x74, - 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x25, - 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, - 0x42, 0x01, 0x42, 0x82, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x50, 0x61, 0x74, 0x68, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, - 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v3_path_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v3_path_proto_rawDescData = file_envoy_type_matcher_v3_path_proto_rawDesc -) - -func file_envoy_type_matcher_v3_path_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v3_path_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v3_path_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_path_proto_rawDescData) - }) - return file_envoy_type_matcher_v3_path_proto_rawDescData -} - -var file_envoy_type_matcher_v3_path_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_type_matcher_v3_path_proto_goTypes = []interface{}{ - (*PathMatcher)(nil), // 0: envoy.type.matcher.v3.PathMatcher - (*StringMatcher)(nil), // 1: envoy.type.matcher.v3.StringMatcher -} -var file_envoy_type_matcher_v3_path_proto_depIdxs = []int32{ - 1, // 0: envoy.type.matcher.v3.PathMatcher.path:type_name -> envoy.type.matcher.v3.StringMatcher - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v3_path_proto_init() } -func file_envoy_type_matcher_v3_path_proto_init() { - if File_envoy_type_matcher_v3_path_proto != nil { - return - } - file_envoy_type_matcher_v3_string_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v3_path_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PathMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v3_path_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*PathMatcher_Path)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v3_path_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v3_path_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v3_path_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v3_path_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v3_path_proto = out.File - file_envoy_type_matcher_v3_path_proto_rawDesc = nil - file_envoy_type_matcher_v3_path_proto_goTypes = nil - file_envoy_type_matcher_v3_path_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/path.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/path.pb.validate.go deleted file mode 100644 index 524fae95af6..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/path.pb.validate.go +++ /dev/null @@ -1,204 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v3/path.proto - -package matcherv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on PathMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *PathMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PathMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in PathMatcherMultiError, or -// nil if none found. -func (m *PathMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *PathMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofRulePresent := false - switch v := m.Rule.(type) { - case *PathMatcher_Path: - if v == nil { - err := PathMatcherValidationError{ - field: "Rule", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRulePresent = true - - if m.GetPath() == nil { - err := PathMatcherValidationError{ - field: "Path", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetPath()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PathMatcherValidationError{ - field: "Path", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PathMatcherValidationError{ - field: "Path", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPath()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PathMatcherValidationError{ - field: "Path", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofRulePresent { - err := PathMatcherValidationError{ - field: "Rule", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return PathMatcherMultiError(errors) - } - - return nil -} - -// PathMatcherMultiError is an error wrapping multiple validation errors -// returned by PathMatcher.ValidateAll() if the designated constraints aren't met. -type PathMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PathMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PathMatcherMultiError) AllErrors() []error { return m } - -// PathMatcherValidationError is the validation error returned by -// PathMatcher.Validate if the designated constraints aren't met. -type PathMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PathMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PathMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PathMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PathMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PathMatcherValidationError) ErrorName() string { return "PathMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e PathMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPathMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PathMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PathMatcherValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/regex.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/regex.pb.go deleted file mode 100644 index 68dfde79f2b..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/regex.pb.go +++ /dev/null @@ -1,420 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/matcher/v3/regex.proto - -package matcherv3 - -import ( - _ "github.com/cilium/proxy/go/envoy/annotations" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// A regex matcher designed for safety when used with untrusted input. -type RegexMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to EngineType: - // - // *RegexMatcher_GoogleRe2 - EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` - // The regex match string. The string must be supported by the configured engine. The regex is matched - // against the full string, not as a partial match. - Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` -} - -func (x *RegexMatcher) Reset() { - *x = RegexMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegexMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegexMatcher) ProtoMessage() {} - -func (x *RegexMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegexMatcher.ProtoReflect.Descriptor instead. -func (*RegexMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0} -} - -func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType { - if m != nil { - return m.EngineType - } - return nil -} - -// Deprecated: Do not use. -func (x *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2 { - if x, ok := x.GetEngineType().(*RegexMatcher_GoogleRe2); ok { - return x.GoogleRe2 - } - return nil -} - -func (x *RegexMatcher) GetRegex() string { - if x != nil { - return x.Regex - } - return "" -} - -type isRegexMatcher_EngineType interface { - isRegexMatcher_EngineType() -} - -type RegexMatcher_GoogleRe2 struct { - // Google's RE2 regex engine. - // - // Deprecated: Do not use. - GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"` -} - -func (*RegexMatcher_GoogleRe2) isRegexMatcher_EngineType() {} - -// Describes how to match a string and then produce a new string using a regular -// expression and a substitution string. -type RegexMatchAndSubstitute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The regular expression used to find portions of a string (hereafter called - // the "subject string") that should be replaced. When a new string is - // produced during the substitution operation, the new string is initially - // the same as the subject string, but then all matches in the subject string - // are replaced by the substitution string. If replacing all matches isn't - // desired, regular expression anchors can be used to ensure a single match, - // so as to replace just one occurrence of a pattern. Capture groups can be - // used in the pattern to extract portions of the subject string, and then - // referenced in the substitution string. - Pattern *RegexMatcher `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` - // The string that should be substituted into matching portions of the - // subject string during a substitution operation to produce a new string. - // Capture groups in the pattern can be referenced in the substitution - // string. Note, however, that the syntax for referring to capture groups is - // defined by the chosen regular expression engine. Google's `RE2 - // `_ regular expression engine uses a - // backslash followed by the capture group number to denote a numbered - // capture group. E.g., “\1“ refers to capture group 1, and “\2“ refers - // to capture group 2. - Substitution string `protobuf:"bytes,2,opt,name=substitution,proto3" json:"substitution,omitempty"` -} - -func (x *RegexMatchAndSubstitute) Reset() { - *x = RegexMatchAndSubstitute{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegexMatchAndSubstitute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegexMatchAndSubstitute) ProtoMessage() {} - -func (x *RegexMatchAndSubstitute) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegexMatchAndSubstitute.ProtoReflect.Descriptor instead. -func (*RegexMatchAndSubstitute) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_regex_proto_rawDescGZIP(), []int{1} -} - -func (x *RegexMatchAndSubstitute) GetPattern() *RegexMatcher { - if x != nil { - return x.Pattern - } - return nil -} - -func (x *RegexMatchAndSubstitute) GetSubstitution() string { - if x != nil { - return x.Substitution - } - return "" -} - -// Google's `RE2 `_ regex engine. The regex string must adhere to -// the documented `syntax `_. The engine is designed -// to complete execution in linear time as well as limit the amount of memory used. -// -// Envoy supports program size checking via runtime. The runtime keys “re2.max_program_size.error_level“ -// and “re2.max_program_size.warn_level“ can be set to integers as the maximum program size or -// complexity that a compiled regex can have before an exception is thrown or a warning is -// logged, respectively. “re2.max_program_size.error_level“ defaults to 100, and -// “re2.max_program_size.warn_level“ has no default if unset (will not check/log a warning). -// -// Envoy emits two stats for tracking the program size of regexes: the histogram “re2.program_size“, -// which records the program size, and the counter “re2.exceeded_warn_level“, which is incremented -// each time the program size exceeds the warn level threshold. -type RegexMatcher_GoogleRE2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // This field controls the RE2 "program size" which is a rough estimate of how complex a - // compiled regex is to evaluate. A regex that has a program size greater than the configured - // value will fail to compile. In this case, the configured max program size can be increased - // or the regex can be simplified. If not specified, the default is 100. - // - // This field is deprecated; regexp validation should be performed on the management server - // instead of being done by each individual client. - // - // .. note:: - // - // Although this field is deprecated, the program size will still be checked against the - // global ``re2.max_program_size.error_level`` runtime value. - // - // Deprecated: Do not use. - MaxProgramSize *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=max_program_size,json=maxProgramSize,proto3" json:"max_program_size,omitempty"` -} - -func (x *RegexMatcher_GoogleRE2) Reset() { - *x = RegexMatcher_GoogleRE2{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegexMatcher_GoogleRE2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegexMatcher_GoogleRE2) ProtoMessage() {} - -func (x *RegexMatcher_GoogleRE2) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegexMatcher_GoogleRE2.ProtoReflect.Descriptor instead. -func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0, 0} -} - -// Deprecated: Do not use. -func (x *RegexMatcher_GoogleRE2) GetMaxProgramSize() *wrapperspb.UInt32Value { - if x != nil { - return x.MaxProgramSize - } - return nil -} - -var File_envoy_type_matcher_v3_regex_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v3_regex_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x02, 0x0a, 0x0c, 0x52, - 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x0a, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x42, 0x0b, - 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x09, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x32, 0x12, 0x1d, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x1a, 0x92, 0x01, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x52, 0x45, 0x32, 0x12, 0x53, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, - 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x18, - 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, - 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x3a, 0x26, 0x9a, 0xc5, - 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x12, - 0x47, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x2f, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, - 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, - 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0c, 0x73, 0x75, 0x62, - 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, - 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, - 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x42, 0x83, 0x01, 0x0a, - 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x65, 0x67, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, - 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v3_regex_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v3_regex_proto_rawDescData = file_envoy_type_matcher_v3_regex_proto_rawDesc -) - -func file_envoy_type_matcher_v3_regex_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v3_regex_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v3_regex_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_regex_proto_rawDescData) - }) - return file_envoy_type_matcher_v3_regex_proto_rawDescData -} - -var file_envoy_type_matcher_v3_regex_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_type_matcher_v3_regex_proto_goTypes = []interface{}{ - (*RegexMatcher)(nil), // 0: envoy.type.matcher.v3.RegexMatcher - (*RegexMatchAndSubstitute)(nil), // 1: envoy.type.matcher.v3.RegexMatchAndSubstitute - (*RegexMatcher_GoogleRE2)(nil), // 2: envoy.type.matcher.v3.RegexMatcher.GoogleRE2 - (*wrapperspb.UInt32Value)(nil), // 3: google.protobuf.UInt32Value -} -var file_envoy_type_matcher_v3_regex_proto_depIdxs = []int32{ - 2, // 0: envoy.type.matcher.v3.RegexMatcher.google_re2:type_name -> envoy.type.matcher.v3.RegexMatcher.GoogleRE2 - 0, // 1: envoy.type.matcher.v3.RegexMatchAndSubstitute.pattern:type_name -> envoy.type.matcher.v3.RegexMatcher - 3, // 2: envoy.type.matcher.v3.RegexMatcher.GoogleRE2.max_program_size:type_name -> google.protobuf.UInt32Value - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v3_regex_proto_init() } -func file_envoy_type_matcher_v3_regex_proto_init() { - if File_envoy_type_matcher_v3_regex_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v3_regex_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegexMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_regex_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegexMatchAndSubstitute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_regex_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegexMatcher_GoogleRE2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v3_regex_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*RegexMatcher_GoogleRe2)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v3_regex_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v3_regex_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v3_regex_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v3_regex_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v3_regex_proto = out.File - file_envoy_type_matcher_v3_regex_proto_rawDesc = nil - file_envoy_type_matcher_v3_regex_proto_goTypes = nil - file_envoy_type_matcher_v3_regex_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/regex.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/regex.pb.validate.go deleted file mode 100644 index efd4f414465..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/regex.pb.validate.go +++ /dev/null @@ -1,478 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v3/regex.proto - -package matcherv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on RegexMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RegexMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RegexMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RegexMatcherMultiError, or -// nil if none found. -func (m *RegexMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *RegexMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetRegex()) < 1 { - err := RegexMatcherValidationError{ - field: "Regex", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - switch v := m.EngineType.(type) { - case *RegexMatcher_GoogleRe2: - if v == nil { - err := RegexMatcherValidationError{ - field: "EngineType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetGoogleRe2()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RegexMatcherValidationError{ - field: "GoogleRe2", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RegexMatcherValidationError{ - field: "GoogleRe2", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGoogleRe2()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RegexMatcherValidationError{ - field: "GoogleRe2", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return RegexMatcherMultiError(errors) - } - - return nil -} - -// RegexMatcherMultiError is an error wrapping multiple validation errors -// returned by RegexMatcher.ValidateAll() if the designated constraints aren't met. -type RegexMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RegexMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RegexMatcherMultiError) AllErrors() []error { return m } - -// RegexMatcherValidationError is the validation error returned by -// RegexMatcher.Validate if the designated constraints aren't met. -type RegexMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RegexMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RegexMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RegexMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RegexMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RegexMatcherValidationError) ErrorName() string { return "RegexMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e RegexMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRegexMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RegexMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RegexMatcherValidationError{} - -// Validate checks the field values on RegexMatchAndSubstitute with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RegexMatchAndSubstitute) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RegexMatchAndSubstitute with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RegexMatchAndSubstituteMultiError, or nil if none found. -func (m *RegexMatchAndSubstitute) ValidateAll() error { - return m.validate(true) -} - -func (m *RegexMatchAndSubstitute) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetPattern() == nil { - err := RegexMatchAndSubstituteValidationError{ - field: "Pattern", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetPattern()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RegexMatchAndSubstituteValidationError{ - field: "Pattern", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RegexMatchAndSubstituteValidationError{ - field: "Pattern", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPattern()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RegexMatchAndSubstituteValidationError{ - field: "Pattern", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if !_RegexMatchAndSubstitute_Substitution_Pattern.MatchString(m.GetSubstitution()) { - err := RegexMatchAndSubstituteValidationError{ - field: "Substitution", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RegexMatchAndSubstituteMultiError(errors) - } - - return nil -} - -// RegexMatchAndSubstituteMultiError is an error wrapping multiple validation -// errors returned by RegexMatchAndSubstitute.ValidateAll() if the designated -// constraints aren't met. -type RegexMatchAndSubstituteMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RegexMatchAndSubstituteMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RegexMatchAndSubstituteMultiError) AllErrors() []error { return m } - -// RegexMatchAndSubstituteValidationError is the validation error returned by -// RegexMatchAndSubstitute.Validate if the designated constraints aren't met. -type RegexMatchAndSubstituteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RegexMatchAndSubstituteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RegexMatchAndSubstituteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RegexMatchAndSubstituteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RegexMatchAndSubstituteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RegexMatchAndSubstituteValidationError) ErrorName() string { - return "RegexMatchAndSubstituteValidationError" -} - -// Error satisfies the builtin error interface -func (e RegexMatchAndSubstituteValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRegexMatchAndSubstitute.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RegexMatchAndSubstituteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RegexMatchAndSubstituteValidationError{} - -var _RegexMatchAndSubstitute_Substitution_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RegexMatcher_GoogleRE2 with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RegexMatcher_GoogleRE2) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RegexMatcher_GoogleRE2 with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RegexMatcher_GoogleRE2MultiError, or nil if none found. -func (m *RegexMatcher_GoogleRE2) ValidateAll() error { - return m.validate(true) -} - -func (m *RegexMatcher_GoogleRE2) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetMaxProgramSize()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RegexMatcher_GoogleRE2ValidationError{ - field: "MaxProgramSize", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RegexMatcher_GoogleRE2ValidationError{ - field: "MaxProgramSize", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxProgramSize()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RegexMatcher_GoogleRE2ValidationError{ - field: "MaxProgramSize", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RegexMatcher_GoogleRE2MultiError(errors) - } - - return nil -} - -// RegexMatcher_GoogleRE2MultiError is an error wrapping multiple validation -// errors returned by RegexMatcher_GoogleRE2.ValidateAll() if the designated -// constraints aren't met. -type RegexMatcher_GoogleRE2MultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RegexMatcher_GoogleRE2MultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RegexMatcher_GoogleRE2MultiError) AllErrors() []error { return m } - -// RegexMatcher_GoogleRE2ValidationError is the validation error returned by -// RegexMatcher_GoogleRE2.Validate if the designated constraints aren't met. -type RegexMatcher_GoogleRE2ValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RegexMatcher_GoogleRE2ValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RegexMatcher_GoogleRE2ValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RegexMatcher_GoogleRE2ValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RegexMatcher_GoogleRE2ValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RegexMatcher_GoogleRE2ValidationError) ErrorName() string { - return "RegexMatcher_GoogleRE2ValidationError" -} - -// Error satisfies the builtin error interface -func (e RegexMatcher_GoogleRE2ValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRegexMatcher_GoogleRE2.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RegexMatcher_GoogleRE2ValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RegexMatcher_GoogleRE2ValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/status_code_input.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/status_code_input.pb.go deleted file mode 100644 index 6016c21f235..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/status_code_input.pb.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/matcher/v3/status_code_input.proto - -package matcherv3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Match input indicates that matching should be done on the response status -// code. -type HttpResponseStatusCodeMatchInput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *HttpResponseStatusCodeMatchInput) Reset() { - *x = HttpResponseStatusCodeMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpResponseStatusCodeMatchInput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpResponseStatusCodeMatchInput) ProtoMessage() {} - -func (x *HttpResponseStatusCodeMatchInput) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpResponseStatusCodeMatchInput.ProtoReflect.Descriptor instead. -func (*HttpResponseStatusCodeMatchInput) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_status_code_input_proto_rawDescGZIP(), []int{0} -} - -// Match input indicates that the matching should be done on the class of the -// response status code. For eg: 1xx, 2xx, 3xx, 4xx or 5xx. -type HttpResponseStatusCodeClassMatchInput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *HttpResponseStatusCodeClassMatchInput) Reset() { - *x = HttpResponseStatusCodeClassMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpResponseStatusCodeClassMatchInput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpResponseStatusCodeClassMatchInput) ProtoMessage() {} - -func (x *HttpResponseStatusCodeClassMatchInput) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpResponseStatusCodeClassMatchInput.ProtoReflect.Descriptor instead. -func (*HttpResponseStatusCodeClassMatchInput) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_status_code_input_proto_rawDescGZIP(), []int{1} -} - -var File_envoy_type_matcher_v3_status_code_input_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v3_status_code_input_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, 0x0a, 0x20, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x27, 0x0a, 0x25, 0x48, 0x74, 0x74, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, - 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x42, 0x8d, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, - 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v3_status_code_input_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v3_status_code_input_proto_rawDescData = file_envoy_type_matcher_v3_status_code_input_proto_rawDesc -) - -func file_envoy_type_matcher_v3_status_code_input_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v3_status_code_input_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v3_status_code_input_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_status_code_input_proto_rawDescData) - }) - return file_envoy_type_matcher_v3_status_code_input_proto_rawDescData -} - -var file_envoy_type_matcher_v3_status_code_input_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_type_matcher_v3_status_code_input_proto_goTypes = []interface{}{ - (*HttpResponseStatusCodeMatchInput)(nil), // 0: envoy.type.matcher.v3.HttpResponseStatusCodeMatchInput - (*HttpResponseStatusCodeClassMatchInput)(nil), // 1: envoy.type.matcher.v3.HttpResponseStatusCodeClassMatchInput -} -var file_envoy_type_matcher_v3_status_code_input_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v3_status_code_input_proto_init() } -func file_envoy_type_matcher_v3_status_code_input_proto_init() { - if File_envoy_type_matcher_v3_status_code_input_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpResponseStatusCodeMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpResponseStatusCodeClassMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v3_status_code_input_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v3_status_code_input_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v3_status_code_input_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v3_status_code_input_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v3_status_code_input_proto = out.File - file_envoy_type_matcher_v3_status_code_input_proto_rawDesc = nil - file_envoy_type_matcher_v3_status_code_input_proto_goTypes = nil - file_envoy_type_matcher_v3_status_code_input_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/status_code_input.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/status_code_input.pb.validate.go deleted file mode 100644 index 763fa9f334d..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/status_code_input.pb.validate.go +++ /dev/null @@ -1,246 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v3/status_code_input.proto - -package matcherv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on HttpResponseStatusCodeMatchInput with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *HttpResponseStatusCodeMatchInput) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpResponseStatusCodeMatchInput with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// HttpResponseStatusCodeMatchInputMultiError, or nil if none found. -func (m *HttpResponseStatusCodeMatchInput) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpResponseStatusCodeMatchInput) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return HttpResponseStatusCodeMatchInputMultiError(errors) - } - - return nil -} - -// HttpResponseStatusCodeMatchInputMultiError is an error wrapping multiple -// validation errors returned by -// HttpResponseStatusCodeMatchInput.ValidateAll() if the designated -// constraints aren't met. -type HttpResponseStatusCodeMatchInputMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpResponseStatusCodeMatchInputMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpResponseStatusCodeMatchInputMultiError) AllErrors() []error { return m } - -// HttpResponseStatusCodeMatchInputValidationError is the validation error -// returned by HttpResponseStatusCodeMatchInput.Validate if the designated -// constraints aren't met. -type HttpResponseStatusCodeMatchInputValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpResponseStatusCodeMatchInputValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpResponseStatusCodeMatchInputValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpResponseStatusCodeMatchInputValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpResponseStatusCodeMatchInputValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpResponseStatusCodeMatchInputValidationError) ErrorName() string { - return "HttpResponseStatusCodeMatchInputValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpResponseStatusCodeMatchInputValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpResponseStatusCodeMatchInput.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpResponseStatusCodeMatchInputValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpResponseStatusCodeMatchInputValidationError{} - -// Validate checks the field values on HttpResponseStatusCodeClassMatchInput -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *HttpResponseStatusCodeClassMatchInput) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpResponseStatusCodeClassMatchInput -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// HttpResponseStatusCodeClassMatchInputMultiError, or nil if none found. -func (m *HttpResponseStatusCodeClassMatchInput) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpResponseStatusCodeClassMatchInput) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return HttpResponseStatusCodeClassMatchInputMultiError(errors) - } - - return nil -} - -// HttpResponseStatusCodeClassMatchInputMultiError is an error wrapping -// multiple validation errors returned by -// HttpResponseStatusCodeClassMatchInput.ValidateAll() if the designated -// constraints aren't met. -type HttpResponseStatusCodeClassMatchInputMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpResponseStatusCodeClassMatchInputMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpResponseStatusCodeClassMatchInputMultiError) AllErrors() []error { return m } - -// HttpResponseStatusCodeClassMatchInputValidationError is the validation error -// returned by HttpResponseStatusCodeClassMatchInput.Validate if the -// designated constraints aren't met. -type HttpResponseStatusCodeClassMatchInputValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpResponseStatusCodeClassMatchInputValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpResponseStatusCodeClassMatchInputValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpResponseStatusCodeClassMatchInputValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpResponseStatusCodeClassMatchInputValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpResponseStatusCodeClassMatchInputValidationError) ErrorName() string { - return "HttpResponseStatusCodeClassMatchInputValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpResponseStatusCodeClassMatchInputValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpResponseStatusCodeClassMatchInput.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpResponseStatusCodeClassMatchInputValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpResponseStatusCodeClassMatchInputValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/string.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/string.pb.go deleted file mode 100644 index b75e6c8275a..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/string.pb.go +++ /dev/null @@ -1,379 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/matcher/v3/string.proto - -package matcherv3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the way to match a string. -// [#next-free-field: 8] -type StringMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatchPattern: - // - // *StringMatcher_Exact - // *StringMatcher_Prefix - // *StringMatcher_Suffix - // *StringMatcher_SafeRegex - // *StringMatcher_Contains - MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"` - // If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. This - // has no effect for the safe_regex match. - // For example, the matcher “data“ will match both input string “Data“ and “data“ if set to true. - IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"` -} - -func (x *StringMatcher) Reset() { - *x = StringMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_string_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StringMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StringMatcher) ProtoMessage() {} - -func (x *StringMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_string_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StringMatcher.ProtoReflect.Descriptor instead. -func (*StringMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_string_proto_rawDescGZIP(), []int{0} -} - -func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern { - if m != nil { - return m.MatchPattern - } - return nil -} - -func (x *StringMatcher) GetExact() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Exact); ok { - return x.Exact - } - return "" -} - -func (x *StringMatcher) GetPrefix() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Prefix); ok { - return x.Prefix - } - return "" -} - -func (x *StringMatcher) GetSuffix() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Suffix); ok { - return x.Suffix - } - return "" -} - -func (x *StringMatcher) GetSafeRegex() *RegexMatcher { - if x, ok := x.GetMatchPattern().(*StringMatcher_SafeRegex); ok { - return x.SafeRegex - } - return nil -} - -func (x *StringMatcher) GetContains() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Contains); ok { - return x.Contains - } - return "" -} - -func (x *StringMatcher) GetIgnoreCase() bool { - if x != nil { - return x.IgnoreCase - } - return false -} - -type isStringMatcher_MatchPattern interface { - isStringMatcher_MatchPattern() -} - -type StringMatcher_Exact struct { - // The input string must match exactly the string specified here. - // - // Examples: - // - // * “abc“ only matches the value “abc“. - Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"` -} - -type StringMatcher_Prefix struct { - // The input string must have the prefix specified here. - // Note: empty prefix is not allowed, please use regex instead. - // - // Examples: - // - // * “abc“ matches the value “abc.xyz“ - Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"` -} - -type StringMatcher_Suffix struct { - // The input string must have the suffix specified here. - // Note: empty prefix is not allowed, please use regex instead. - // - // Examples: - // - // * “abc“ matches the value “xyz.abc“ - Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3,oneof"` -} - -type StringMatcher_SafeRegex struct { - // The input string must match the regular expression specified here. - SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"` -} - -type StringMatcher_Contains struct { - // The input string must have the substring specified here. - // Note: empty contains match is not allowed, please use regex instead. - // - // Examples: - // - // * “abc“ matches the value “xyz.abc.def“ - Contains string `protobuf:"bytes,7,opt,name=contains,proto3,oneof"` -} - -func (*StringMatcher_Exact) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_Prefix) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_Suffix) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_SafeRegex) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_Contains) isStringMatcher_MatchPattern() {} - -// Specifies a list of ways to match a string. -type ListStringMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"` -} - -func (x *ListStringMatcher) Reset() { - *x = ListStringMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_string_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListStringMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListStringMatcher) ProtoMessage() {} - -func (x *ListStringMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_string_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListStringMatcher.ProtoReflect.Descriptor instead. -func (*ListStringMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_string_proto_rawDescGZIP(), []int{1} -} - -func (x *ListStringMatcher) GetPatterns() []*StringMatcher { - if x != nil { - return x.Patterns - } - return nil -} - -var File_envoy_type_matcher_v3_string_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v3_string_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, - 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x02, 0x0a, 0x0d, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x05, 0x65, - 0x78, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, - 0x61, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, - 0x00, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x4e, 0x0a, 0x0a, 0x73, 0x61, 0x66, - 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, - 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x08, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, - 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61, 0x73, - 0x65, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x22, 0x8c, 0x01, - 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x3a, - 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x84, 0x01, 0x0a, - 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, - 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v3_string_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v3_string_proto_rawDescData = file_envoy_type_matcher_v3_string_proto_rawDesc -) - -func file_envoy_type_matcher_v3_string_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v3_string_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v3_string_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_string_proto_rawDescData) - }) - return file_envoy_type_matcher_v3_string_proto_rawDescData -} - -var file_envoy_type_matcher_v3_string_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_type_matcher_v3_string_proto_goTypes = []interface{}{ - (*StringMatcher)(nil), // 0: envoy.type.matcher.v3.StringMatcher - (*ListStringMatcher)(nil), // 1: envoy.type.matcher.v3.ListStringMatcher - (*RegexMatcher)(nil), // 2: envoy.type.matcher.v3.RegexMatcher -} -var file_envoy_type_matcher_v3_string_proto_depIdxs = []int32{ - 2, // 0: envoy.type.matcher.v3.StringMatcher.safe_regex:type_name -> envoy.type.matcher.v3.RegexMatcher - 0, // 1: envoy.type.matcher.v3.ListStringMatcher.patterns:type_name -> envoy.type.matcher.v3.StringMatcher - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v3_string_proto_init() } -func file_envoy_type_matcher_v3_string_proto_init() { - if File_envoy_type_matcher_v3_string_proto != nil { - return - } - file_envoy_type_matcher_v3_regex_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v3_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StringMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_string_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListStringMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v3_string_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*StringMatcher_Exact)(nil), - (*StringMatcher_Prefix)(nil), - (*StringMatcher_Suffix)(nil), - (*StringMatcher_SafeRegex)(nil), - (*StringMatcher_Contains)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v3_string_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v3_string_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v3_string_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v3_string_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v3_string_proto = out.File - file_envoy_type_matcher_v3_string_proto_rawDesc = nil - file_envoy_type_matcher_v3_string_proto_goTypes = nil - file_envoy_type_matcher_v3_string_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/string.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/string.pb.validate.go deleted file mode 100644 index 9a67d92a628..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/string.pb.validate.go +++ /dev/null @@ -1,439 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v3/string.proto - -package matcherv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on StringMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *StringMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on StringMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in StringMatcherMultiError, or -// nil if none found. -func (m *StringMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *StringMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for IgnoreCase - - oneofMatchPatternPresent := false - switch v := m.MatchPattern.(type) { - case *StringMatcher_Exact: - if v == nil { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - // no validation rules for Exact - case *StringMatcher_Prefix: - if v == nil { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if utf8.RuneCountInString(m.GetPrefix()) < 1 { - err := StringMatcherValidationError{ - field: "Prefix", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *StringMatcher_Suffix: - if v == nil { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if utf8.RuneCountInString(m.GetSuffix()) < 1 { - err := StringMatcherValidationError{ - field: "Suffix", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *StringMatcher_SafeRegex: - if v == nil { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if m.GetSafeRegex() == nil { - err := StringMatcherValidationError{ - field: "SafeRegex", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSafeRegex()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, StringMatcherValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, StringMatcherValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StringMatcherValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *StringMatcher_Contains: - if v == nil { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if utf8.RuneCountInString(m.GetContains()) < 1 { - err := StringMatcherValidationError{ - field: "Contains", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - if !oneofMatchPatternPresent { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return StringMatcherMultiError(errors) - } - - return nil -} - -// StringMatcherMultiError is an error wrapping multiple validation errors -// returned by StringMatcher.ValidateAll() if the designated constraints -// aren't met. -type StringMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m StringMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m StringMatcherMultiError) AllErrors() []error { return m } - -// StringMatcherValidationError is the validation error returned by -// StringMatcher.Validate if the designated constraints aren't met. -type StringMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StringMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StringMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StringMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StringMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StringMatcherValidationError) ErrorName() string { return "StringMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e StringMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStringMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StringMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StringMatcherValidationError{} - -// Validate checks the field values on ListStringMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ListStringMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListStringMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListStringMatcherMultiError, or nil if none found. -func (m *ListStringMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *ListStringMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetPatterns()) < 1 { - err := ListStringMatcherValidationError{ - field: "Patterns", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetPatterns() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListStringMatcherValidationError{ - field: fmt.Sprintf("Patterns[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListStringMatcherValidationError{ - field: fmt.Sprintf("Patterns[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListStringMatcherValidationError{ - field: fmt.Sprintf("Patterns[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ListStringMatcherMultiError(errors) - } - - return nil -} - -// ListStringMatcherMultiError is an error wrapping multiple validation errors -// returned by ListStringMatcher.ValidateAll() if the designated constraints -// aren't met. -type ListStringMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListStringMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListStringMatcherMultiError) AllErrors() []error { return m } - -// ListStringMatcherValidationError is the validation error returned by -// ListStringMatcher.Validate if the designated constraints aren't met. -type ListStringMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListStringMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListStringMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListStringMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListStringMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListStringMatcherValidationError) ErrorName() string { - return "ListStringMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e ListStringMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListStringMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListStringMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListStringMatcherValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/struct.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/struct.pb.go deleted file mode 100644 index 181f1eb6151..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/struct.pb.go +++ /dev/null @@ -1,334 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/matcher/v3/struct.proto - -package matcherv3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// StructMatcher provides a general interface to check if a given value is matched in -// google.protobuf.Struct. It uses “path“ to retrieve the value -// from the struct and then check if it's matched to the specified value. -// -// For example, for the following Struct: -// -// .. code-block:: yaml -// -// fields: -// a: -// struct_value: -// fields: -// b: -// struct_value: -// fields: -// c: -// string_value: pro -// t: -// list_value: -// values: -// - string_value: m -// - string_value: n -// -// The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value "pro" -// from the Metadata which is matched to the specified prefix match. -// -// .. code-block:: yaml -// -// path: -// - key: a -// - key: b -// - key: c -// value: -// string_match: -// prefix: pr -// -// The following StructMatcher is matched as the code will match one of the string values in the -// list at the path [a, t]. -// -// .. code-block:: yaml -// -// path: -// - key: a -// - key: t -// value: -// list_match: -// one_of: -// string_match: -// exact: m -// -// An example use of StructMatcher is to match metadata in envoy.v*.core.Node. -type StructMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The path to retrieve the Value from the Struct. - Path []*StructMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` - // The StructMatcher is matched if the value retrieved by path is matched to this value. - Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *StructMatcher) Reset() { - *x = StructMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StructMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StructMatcher) ProtoMessage() {} - -func (x *StructMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StructMatcher.ProtoReflect.Descriptor instead. -func (*StructMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_struct_proto_rawDescGZIP(), []int{0} -} - -func (x *StructMatcher) GetPath() []*StructMatcher_PathSegment { - if x != nil { - return x.Path - } - return nil -} - -func (x *StructMatcher) GetValue() *ValueMatcher { - if x != nil { - return x.Value - } - return nil -} - -// Specifies the segment in a path to retrieve value from Struct. -type StructMatcher_PathSegment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Segment: - // - // *StructMatcher_PathSegment_Key - Segment isStructMatcher_PathSegment_Segment `protobuf_oneof:"segment"` -} - -func (x *StructMatcher_PathSegment) Reset() { - *x = StructMatcher_PathSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StructMatcher_PathSegment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StructMatcher_PathSegment) ProtoMessage() {} - -func (x *StructMatcher_PathSegment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StructMatcher_PathSegment.ProtoReflect.Descriptor instead. -func (*StructMatcher_PathSegment) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_struct_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *StructMatcher_PathSegment) GetSegment() isStructMatcher_PathSegment_Segment { - if m != nil { - return m.Segment - } - return nil -} - -func (x *StructMatcher_PathSegment) GetKey() string { - if x, ok := x.GetSegment().(*StructMatcher_PathSegment_Key); ok { - return x.Key - } - return "" -} - -type isStructMatcher_PathSegment_Segment interface { - isStructMatcher_PathSegment_Segment() -} - -type StructMatcher_PathSegment_Key struct { - // If specified, use the key to retrieve the value in a Struct. - Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` -} - -func (*StructMatcher_PathSegment_Key) isStructMatcher_PathSegment_Segment() {} - -var File_envoy_type_matcher_v3_struct_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v3_struct_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, - 0x76, 0x33, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x02, 0x0a, 0x0d, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x1a, 0x6f, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x33, 0x9a, 0xc5, - 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, - 0x01, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x84, 0x01, 0x0a, 0x23, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v3_struct_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v3_struct_proto_rawDescData = file_envoy_type_matcher_v3_struct_proto_rawDesc -) - -func file_envoy_type_matcher_v3_struct_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v3_struct_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v3_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_struct_proto_rawDescData) - }) - return file_envoy_type_matcher_v3_struct_proto_rawDescData -} - -var file_envoy_type_matcher_v3_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_type_matcher_v3_struct_proto_goTypes = []interface{}{ - (*StructMatcher)(nil), // 0: envoy.type.matcher.v3.StructMatcher - (*StructMatcher_PathSegment)(nil), // 1: envoy.type.matcher.v3.StructMatcher.PathSegment - (*ValueMatcher)(nil), // 2: envoy.type.matcher.v3.ValueMatcher -} -var file_envoy_type_matcher_v3_struct_proto_depIdxs = []int32{ - 1, // 0: envoy.type.matcher.v3.StructMatcher.path:type_name -> envoy.type.matcher.v3.StructMatcher.PathSegment - 2, // 1: envoy.type.matcher.v3.StructMatcher.value:type_name -> envoy.type.matcher.v3.ValueMatcher - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v3_struct_proto_init() } -func file_envoy_type_matcher_v3_struct_proto_init() { - if File_envoy_type_matcher_v3_struct_proto != nil { - return - } - file_envoy_type_matcher_v3_value_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v3_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StructMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StructMatcher_PathSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v3_struct_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*StructMatcher_PathSegment_Key)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v3_struct_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v3_struct_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v3_struct_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v3_struct_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v3_struct_proto = out.File - file_envoy_type_matcher_v3_struct_proto_rawDesc = nil - file_envoy_type_matcher_v3_struct_proto_goTypes = nil - file_envoy_type_matcher_v3_struct_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/struct.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/struct.pb.validate.go deleted file mode 100644 index 47d7eeb50a4..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/struct.pb.validate.go +++ /dev/null @@ -1,363 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v3/struct.proto - -package matcherv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on StructMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *StructMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on StructMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in StructMatcherMultiError, or -// nil if none found. -func (m *StructMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *StructMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetPath()) < 1 { - err := StructMatcherValidationError{ - field: "Path", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetPath() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, StructMatcherValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, StructMatcherValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StructMatcherValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if m.GetValue() == nil { - err := StructMatcherValidationError{ - field: "Value", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetValue()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, StructMatcherValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, StructMatcherValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StructMatcherValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return StructMatcherMultiError(errors) - } - - return nil -} - -// StructMatcherMultiError is an error wrapping multiple validation errors -// returned by StructMatcher.ValidateAll() if the designated constraints -// aren't met. -type StructMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m StructMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m StructMatcherMultiError) AllErrors() []error { return m } - -// StructMatcherValidationError is the validation error returned by -// StructMatcher.Validate if the designated constraints aren't met. -type StructMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StructMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StructMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StructMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StructMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StructMatcherValidationError) ErrorName() string { return "StructMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e StructMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStructMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StructMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StructMatcherValidationError{} - -// Validate checks the field values on StructMatcher_PathSegment with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *StructMatcher_PathSegment) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on StructMatcher_PathSegment with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// StructMatcher_PathSegmentMultiError, or nil if none found. -func (m *StructMatcher_PathSegment) ValidateAll() error { - return m.validate(true) -} - -func (m *StructMatcher_PathSegment) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofSegmentPresent := false - switch v := m.Segment.(type) { - case *StructMatcher_PathSegment_Key: - if v == nil { - err := StructMatcher_PathSegmentValidationError{ - field: "Segment", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofSegmentPresent = true - - if utf8.RuneCountInString(m.GetKey()) < 1 { - err := StructMatcher_PathSegmentValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - if !oneofSegmentPresent { - err := StructMatcher_PathSegmentValidationError{ - field: "Segment", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return StructMatcher_PathSegmentMultiError(errors) - } - - return nil -} - -// StructMatcher_PathSegmentMultiError is an error wrapping multiple validation -// errors returned by StructMatcher_PathSegment.ValidateAll() if the -// designated constraints aren't met. -type StructMatcher_PathSegmentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m StructMatcher_PathSegmentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m StructMatcher_PathSegmentMultiError) AllErrors() []error { return m } - -// StructMatcher_PathSegmentValidationError is the validation error returned by -// StructMatcher_PathSegment.Validate if the designated constraints aren't met. -type StructMatcher_PathSegmentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StructMatcher_PathSegmentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StructMatcher_PathSegmentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StructMatcher_PathSegmentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StructMatcher_PathSegmentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StructMatcher_PathSegmentValidationError) ErrorName() string { - return "StructMatcher_PathSegmentValidationError" -} - -// Error satisfies the builtin error interface -func (e StructMatcher_PathSegmentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStructMatcher_PathSegment.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StructMatcher_PathSegmentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StructMatcher_PathSegmentValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/value.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/value.pb.go deleted file mode 100644 index 0eef81c5359..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/value.pb.go +++ /dev/null @@ -1,468 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/matcher/v3/value.proto - -package matcherv3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported. -// StructValue is not supported and is always not matched. -// [#next-free-field: 7] -type ValueMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies how to match a value. - // - // Types that are assignable to MatchPattern: - // - // *ValueMatcher_NullMatch_ - // *ValueMatcher_DoubleMatch - // *ValueMatcher_StringMatch - // *ValueMatcher_BoolMatch - // *ValueMatcher_PresentMatch - // *ValueMatcher_ListMatch - MatchPattern isValueMatcher_MatchPattern `protobuf_oneof:"match_pattern"` -} - -func (x *ValueMatcher) Reset() { - *x = ValueMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValueMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValueMatcher) ProtoMessage() {} - -func (x *ValueMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValueMatcher.ProtoReflect.Descriptor instead. -func (*ValueMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_value_proto_rawDescGZIP(), []int{0} -} - -func (m *ValueMatcher) GetMatchPattern() isValueMatcher_MatchPattern { - if m != nil { - return m.MatchPattern - } - return nil -} - -func (x *ValueMatcher) GetNullMatch() *ValueMatcher_NullMatch { - if x, ok := x.GetMatchPattern().(*ValueMatcher_NullMatch_); ok { - return x.NullMatch - } - return nil -} - -func (x *ValueMatcher) GetDoubleMatch() *DoubleMatcher { - if x, ok := x.GetMatchPattern().(*ValueMatcher_DoubleMatch); ok { - return x.DoubleMatch - } - return nil -} - -func (x *ValueMatcher) GetStringMatch() *StringMatcher { - if x, ok := x.GetMatchPattern().(*ValueMatcher_StringMatch); ok { - return x.StringMatch - } - return nil -} - -func (x *ValueMatcher) GetBoolMatch() bool { - if x, ok := x.GetMatchPattern().(*ValueMatcher_BoolMatch); ok { - return x.BoolMatch - } - return false -} - -func (x *ValueMatcher) GetPresentMatch() bool { - if x, ok := x.GetMatchPattern().(*ValueMatcher_PresentMatch); ok { - return x.PresentMatch - } - return false -} - -func (x *ValueMatcher) GetListMatch() *ListMatcher { - if x, ok := x.GetMatchPattern().(*ValueMatcher_ListMatch); ok { - return x.ListMatch - } - return nil -} - -type isValueMatcher_MatchPattern interface { - isValueMatcher_MatchPattern() -} - -type ValueMatcher_NullMatch_ struct { - // If specified, a match occurs if and only if the target value is a NullValue. - NullMatch *ValueMatcher_NullMatch `protobuf:"bytes,1,opt,name=null_match,json=nullMatch,proto3,oneof"` -} - -type ValueMatcher_DoubleMatch struct { - // If specified, a match occurs if and only if the target value is a double value and is - // matched to this field. - DoubleMatch *DoubleMatcher `protobuf:"bytes,2,opt,name=double_match,json=doubleMatch,proto3,oneof"` -} - -type ValueMatcher_StringMatch struct { - // If specified, a match occurs if and only if the target value is a string value and is - // matched to this field. - StringMatch *StringMatcher `protobuf:"bytes,3,opt,name=string_match,json=stringMatch,proto3,oneof"` -} - -type ValueMatcher_BoolMatch struct { - // If specified, a match occurs if and only if the target value is a bool value and is equal - // to this field. - BoolMatch bool `protobuf:"varint,4,opt,name=bool_match,json=boolMatch,proto3,oneof"` -} - -type ValueMatcher_PresentMatch struct { - // If specified, value match will be performed based on whether the path is referring to a - // valid primitive value in the metadata. If the path is referring to a non-primitive value, - // the result is always not matched. - PresentMatch bool `protobuf:"varint,5,opt,name=present_match,json=presentMatch,proto3,oneof"` -} - -type ValueMatcher_ListMatch struct { - // If specified, a match occurs if and only if the target value is a list value and - // is matched to this field. - ListMatch *ListMatcher `protobuf:"bytes,6,opt,name=list_match,json=listMatch,proto3,oneof"` -} - -func (*ValueMatcher_NullMatch_) isValueMatcher_MatchPattern() {} - -func (*ValueMatcher_DoubleMatch) isValueMatcher_MatchPattern() {} - -func (*ValueMatcher_StringMatch) isValueMatcher_MatchPattern() {} - -func (*ValueMatcher_BoolMatch) isValueMatcher_MatchPattern() {} - -func (*ValueMatcher_PresentMatch) isValueMatcher_MatchPattern() {} - -func (*ValueMatcher_ListMatch) isValueMatcher_MatchPattern() {} - -// Specifies the way to match a list value. -type ListMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatchPattern: - // - // *ListMatcher_OneOf - MatchPattern isListMatcher_MatchPattern `protobuf_oneof:"match_pattern"` -} - -func (x *ListMatcher) Reset() { - *x = ListMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMatcher) ProtoMessage() {} - -func (x *ListMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMatcher.ProtoReflect.Descriptor instead. -func (*ListMatcher) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_value_proto_rawDescGZIP(), []int{1} -} - -func (m *ListMatcher) GetMatchPattern() isListMatcher_MatchPattern { - if m != nil { - return m.MatchPattern - } - return nil -} - -func (x *ListMatcher) GetOneOf() *ValueMatcher { - if x, ok := x.GetMatchPattern().(*ListMatcher_OneOf); ok { - return x.OneOf - } - return nil -} - -type isListMatcher_MatchPattern interface { - isListMatcher_MatchPattern() -} - -type ListMatcher_OneOf struct { - // If specified, at least one of the values in the list must match the value specified. - OneOf *ValueMatcher `protobuf:"bytes,1,opt,name=one_of,json=oneOf,proto3,oneof"` -} - -func (*ListMatcher_OneOf) isListMatcher_MatchPattern() {} - -// NullMatch is an empty message to specify a null value. -type ValueMatcher_NullMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ValueMatcher_NullMatch) Reset() { - *x = ValueMatcher_NullMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValueMatcher_NullMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValueMatcher_NullMatch) ProtoMessage() {} - -func (x *ValueMatcher_NullMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValueMatcher_NullMatch.ProtoReflect.Descriptor instead. -func (*ValueMatcher_NullMatch) Descriptor() ([]byte, []int) { - return file_envoy_type_matcher_v3_value_proto_rawDescGZIP(), []int{0, 0} -} - -var File_envoy_type_matcher_v3_value_proto protoreflect.FileDescriptor - -var file_envoy_type_matcher_v3_value_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, - 0x33, 0x2f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x03, - 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4e, - 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x49, - 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x75, - 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, - 0x75, 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x49, 0x0a, 0x0c, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, - 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, 0x0a, 0x0a, - 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x1a, 0x3d, 0x0a, 0x09, 0x4e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x30, - 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x88, - 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3c, - 0x0a, 0x06, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x4f, 0x66, 0x3a, 0x25, 0x9a, 0xc5, - 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x83, 0x01, 0x0a, 0x23, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x42, 0x0a, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_matcher_v3_value_proto_rawDescOnce sync.Once - file_envoy_type_matcher_v3_value_proto_rawDescData = file_envoy_type_matcher_v3_value_proto_rawDesc -) - -func file_envoy_type_matcher_v3_value_proto_rawDescGZIP() []byte { - file_envoy_type_matcher_v3_value_proto_rawDescOnce.Do(func() { - file_envoy_type_matcher_v3_value_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_value_proto_rawDescData) - }) - return file_envoy_type_matcher_v3_value_proto_rawDescData -} - -var file_envoy_type_matcher_v3_value_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_type_matcher_v3_value_proto_goTypes = []interface{}{ - (*ValueMatcher)(nil), // 0: envoy.type.matcher.v3.ValueMatcher - (*ListMatcher)(nil), // 1: envoy.type.matcher.v3.ListMatcher - (*ValueMatcher_NullMatch)(nil), // 2: envoy.type.matcher.v3.ValueMatcher.NullMatch - (*DoubleMatcher)(nil), // 3: envoy.type.matcher.v3.DoubleMatcher - (*StringMatcher)(nil), // 4: envoy.type.matcher.v3.StringMatcher -} -var file_envoy_type_matcher_v3_value_proto_depIdxs = []int32{ - 2, // 0: envoy.type.matcher.v3.ValueMatcher.null_match:type_name -> envoy.type.matcher.v3.ValueMatcher.NullMatch - 3, // 1: envoy.type.matcher.v3.ValueMatcher.double_match:type_name -> envoy.type.matcher.v3.DoubleMatcher - 4, // 2: envoy.type.matcher.v3.ValueMatcher.string_match:type_name -> envoy.type.matcher.v3.StringMatcher - 1, // 3: envoy.type.matcher.v3.ValueMatcher.list_match:type_name -> envoy.type.matcher.v3.ListMatcher - 0, // 4: envoy.type.matcher.v3.ListMatcher.one_of:type_name -> envoy.type.matcher.v3.ValueMatcher - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_envoy_type_matcher_v3_value_proto_init() } -func file_envoy_type_matcher_v3_value_proto_init() { - if File_envoy_type_matcher_v3_value_proto != nil { - return - } - file_envoy_type_matcher_v3_number_proto_init() - file_envoy_type_matcher_v3_string_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_matcher_v3_value_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValueMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_value_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_matcher_v3_value_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValueMatcher_NullMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_matcher_v3_value_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*ValueMatcher_NullMatch_)(nil), - (*ValueMatcher_DoubleMatch)(nil), - (*ValueMatcher_StringMatch)(nil), - (*ValueMatcher_BoolMatch)(nil), - (*ValueMatcher_PresentMatch)(nil), - (*ValueMatcher_ListMatch)(nil), - } - file_envoy_type_matcher_v3_value_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*ListMatcher_OneOf)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_matcher_v3_value_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_matcher_v3_value_proto_goTypes, - DependencyIndexes: file_envoy_type_matcher_v3_value_proto_depIdxs, - MessageInfos: file_envoy_type_matcher_v3_value_proto_msgTypes, - }.Build() - File_envoy_type_matcher_v3_value_proto = out.File - file_envoy_type_matcher_v3_value_proto_rawDesc = nil - file_envoy_type_matcher_v3_value_proto_goTypes = nil - file_envoy_type_matcher_v3_value_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/value.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/value.pb.validate.go deleted file mode 100644 index cff13d9b993..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/v3/value.pb.validate.go +++ /dev/null @@ -1,604 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/matcher/v3/value.proto - -package matcherv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ValueMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ValueMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ValueMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ValueMatcherMultiError, or -// nil if none found. -func (m *ValueMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *ValueMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofMatchPatternPresent := false - switch v := m.MatchPattern.(type) { - case *ValueMatcher_NullMatch_: - if v == nil { - err := ValueMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if all { - switch v := interface{}(m.GetNullMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ValueMatcherValidationError{ - field: "NullMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ValueMatcherValidationError{ - field: "NullMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNullMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ValueMatcherValidationError{ - field: "NullMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ValueMatcher_DoubleMatch: - if v == nil { - err := ValueMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if all { - switch v := interface{}(m.GetDoubleMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ValueMatcherValidationError{ - field: "DoubleMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ValueMatcherValidationError{ - field: "DoubleMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDoubleMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ValueMatcherValidationError{ - field: "DoubleMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ValueMatcher_StringMatch: - if v == nil { - err := ValueMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if all { - switch v := interface{}(m.GetStringMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ValueMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ValueMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ValueMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ValueMatcher_BoolMatch: - if v == nil { - err := ValueMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - // no validation rules for BoolMatch - case *ValueMatcher_PresentMatch: - if v == nil { - err := ValueMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - // no validation rules for PresentMatch - case *ValueMatcher_ListMatch: - if v == nil { - err := ValueMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if all { - switch v := interface{}(m.GetListMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ValueMatcherValidationError{ - field: "ListMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ValueMatcherValidationError{ - field: "ListMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetListMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ValueMatcherValidationError{ - field: "ListMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofMatchPatternPresent { - err := ValueMatcherValidationError{ - field: "MatchPattern", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ValueMatcherMultiError(errors) - } - - return nil -} - -// ValueMatcherMultiError is an error wrapping multiple validation errors -// returned by ValueMatcher.ValidateAll() if the designated constraints aren't met. -type ValueMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ValueMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ValueMatcherMultiError) AllErrors() []error { return m } - -// ValueMatcherValidationError is the validation error returned by -// ValueMatcher.Validate if the designated constraints aren't met. -type ValueMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ValueMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ValueMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ValueMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ValueMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ValueMatcherValidationError) ErrorName() string { return "ValueMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e ValueMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sValueMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ValueMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ValueMatcherValidationError{} - -// Validate checks the field values on ListMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ListMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ListMatcherMultiError, or -// nil if none found. -func (m *ListMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *ListMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofMatchPatternPresent := false - switch v := m.MatchPattern.(type) { - case *ListMatcher_OneOf: - if v == nil { - err := ListMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if all { - switch v := interface{}(m.GetOneOf()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListMatcherValidationError{ - field: "OneOf", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListMatcherValidationError{ - field: "OneOf", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOneOf()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListMatcherValidationError{ - field: "OneOf", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofMatchPatternPresent { - err := ListMatcherValidationError{ - field: "MatchPattern", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ListMatcherMultiError(errors) - } - - return nil -} - -// ListMatcherMultiError is an error wrapping multiple validation errors -// returned by ListMatcher.ValidateAll() if the designated constraints aren't met. -type ListMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListMatcherMultiError) AllErrors() []error { return m } - -// ListMatcherValidationError is the validation error returned by -// ListMatcher.Validate if the designated constraints aren't met. -type ListMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListMatcherValidationError) ErrorName() string { return "ListMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e ListMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListMatcherValidationError{} - -// Validate checks the field values on ValueMatcher_NullMatch with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ValueMatcher_NullMatch) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ValueMatcher_NullMatch with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ValueMatcher_NullMatchMultiError, or nil if none found. -func (m *ValueMatcher_NullMatch) ValidateAll() error { - return m.validate(true) -} - -func (m *ValueMatcher_NullMatch) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return ValueMatcher_NullMatchMultiError(errors) - } - - return nil -} - -// ValueMatcher_NullMatchMultiError is an error wrapping multiple validation -// errors returned by ValueMatcher_NullMatch.ValidateAll() if the designated -// constraints aren't met. -type ValueMatcher_NullMatchMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ValueMatcher_NullMatchMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ValueMatcher_NullMatchMultiError) AllErrors() []error { return m } - -// ValueMatcher_NullMatchValidationError is the validation error returned by -// ValueMatcher_NullMatch.Validate if the designated constraints aren't met. -type ValueMatcher_NullMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ValueMatcher_NullMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ValueMatcher_NullMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ValueMatcher_NullMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ValueMatcher_NullMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ValueMatcher_NullMatchValidationError) ErrorName() string { - return "ValueMatcher_NullMatchValidationError" -} - -// Error satisfies the builtin error interface -func (e ValueMatcher_NullMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sValueMatcher_NullMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ValueMatcher_NullMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ValueMatcher_NullMatchValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/metadata/v3/metadata.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/metadata/v3/metadata.pb.go deleted file mode 100644 index da0949d98c9..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/metadata/v3/metadata.pb.go +++ /dev/null @@ -1,688 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/metadata/v3/metadata.proto - -package metadatav3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// MetadataKey provides a general interface using “key“ and “path“ to retrieve value from -// :ref:`Metadata `. -// -// For example, for the following Metadata: -// -// .. code-block:: yaml -// -// filter_metadata: -// envoy.xxx: -// prop: -// foo: bar -// xyz: -// hello: envoy -// -// The following MetadataKey will retrieve a string value "bar" from the Metadata. -// -// .. code-block:: yaml -// -// key: envoy.xxx -// path: -// - key: prop -// - key: foo -type MetadataKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key name of Metadata to retrieve the Struct from the metadata. - // Typically, it represents a builtin subsystem or custom extension. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // The path to retrieve the Value from the Struct. It can be a prefix or a full path, - // e.g. “[prop, xyz]“ for a struct or “[prop, foo]“ for a string in the example, - // which depends on the particular scenario. - // - // Note: Due to that only the key type segment is supported, the path can not specify a list - // unless the list is the last segment. - Path []*MetadataKey_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` -} - -func (x *MetadataKey) Reset() { - *x = MetadataKey{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKey) ProtoMessage() {} - -func (x *MetadataKey) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKey.ProtoReflect.Descriptor instead. -func (*MetadataKey) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{0} -} - -func (x *MetadataKey) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *MetadataKey) GetPath() []*MetadataKey_PathSegment { - if x != nil { - return x.Path - } - return nil -} - -// Describes what kind of metadata. -type MetadataKind struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Kind: - // - // *MetadataKind_Request_ - // *MetadataKind_Route_ - // *MetadataKind_Cluster_ - // *MetadataKind_Host_ - Kind isMetadataKind_Kind `protobuf_oneof:"kind"` -} - -func (x *MetadataKind) Reset() { - *x = MetadataKind{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKind) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKind) ProtoMessage() {} - -func (x *MetadataKind) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKind.ProtoReflect.Descriptor instead. -func (*MetadataKind) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1} -} - -func (m *MetadataKind) GetKind() isMetadataKind_Kind { - if m != nil { - return m.Kind - } - return nil -} - -func (x *MetadataKind) GetRequest() *MetadataKind_Request { - if x, ok := x.GetKind().(*MetadataKind_Request_); ok { - return x.Request - } - return nil -} - -func (x *MetadataKind) GetRoute() *MetadataKind_Route { - if x, ok := x.GetKind().(*MetadataKind_Route_); ok { - return x.Route - } - return nil -} - -func (x *MetadataKind) GetCluster() *MetadataKind_Cluster { - if x, ok := x.GetKind().(*MetadataKind_Cluster_); ok { - return x.Cluster - } - return nil -} - -func (x *MetadataKind) GetHost() *MetadataKind_Host { - if x, ok := x.GetKind().(*MetadataKind_Host_); ok { - return x.Host - } - return nil -} - -type isMetadataKind_Kind interface { - isMetadataKind_Kind() -} - -type MetadataKind_Request_ struct { - // Request kind of metadata. - Request *MetadataKind_Request `protobuf:"bytes,1,opt,name=request,proto3,oneof"` -} - -type MetadataKind_Route_ struct { - // Route kind of metadata. - Route *MetadataKind_Route `protobuf:"bytes,2,opt,name=route,proto3,oneof"` -} - -type MetadataKind_Cluster_ struct { - // Cluster kind of metadata. - Cluster *MetadataKind_Cluster `protobuf:"bytes,3,opt,name=cluster,proto3,oneof"` -} - -type MetadataKind_Host_ struct { - // Host kind of metadata. - Host *MetadataKind_Host `protobuf:"bytes,4,opt,name=host,proto3,oneof"` -} - -func (*MetadataKind_Request_) isMetadataKind_Kind() {} - -func (*MetadataKind_Route_) isMetadataKind_Kind() {} - -func (*MetadataKind_Cluster_) isMetadataKind_Kind() {} - -func (*MetadataKind_Host_) isMetadataKind_Kind() {} - -// Specifies the segment in a path to retrieve value from Metadata. -// Currently it is only supported to specify the key, i.e. field name, as one segment of a path. -type MetadataKey_PathSegment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Segment: - // - // *MetadataKey_PathSegment_Key - Segment isMetadataKey_PathSegment_Segment `protobuf_oneof:"segment"` -} - -func (x *MetadataKey_PathSegment) Reset() { - *x = MetadataKey_PathSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKey_PathSegment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKey_PathSegment) ProtoMessage() {} - -func (x *MetadataKey_PathSegment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKey_PathSegment.ProtoReflect.Descriptor instead. -func (*MetadataKey_PathSegment) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *MetadataKey_PathSegment) GetSegment() isMetadataKey_PathSegment_Segment { - if m != nil { - return m.Segment - } - return nil -} - -func (x *MetadataKey_PathSegment) GetKey() string { - if x, ok := x.GetSegment().(*MetadataKey_PathSegment_Key); ok { - return x.Key - } - return "" -} - -type isMetadataKey_PathSegment_Segment interface { - isMetadataKey_PathSegment_Segment() -} - -type MetadataKey_PathSegment_Key struct { - // If specified, use the key to retrieve the value in a Struct. - Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` -} - -func (*MetadataKey_PathSegment_Key) isMetadataKey_PathSegment_Segment() {} - -// Represents dynamic metadata associated with the request. -type MetadataKind_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MetadataKind_Request) Reset() { - *x = MetadataKind_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKind_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKind_Request) ProtoMessage() {} - -func (x *MetadataKind_Request) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKind_Request.ProtoReflect.Descriptor instead. -func (*MetadataKind_Request) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 0} -} - -// Represents metadata from :ref:`the route`. -type MetadataKind_Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MetadataKind_Route) Reset() { - *x = MetadataKind_Route{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKind_Route) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKind_Route) ProtoMessage() {} - -func (x *MetadataKind_Route) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKind_Route.ProtoReflect.Descriptor instead. -func (*MetadataKind_Route) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 1} -} - -// Represents metadata from :ref:`the upstream cluster`. -type MetadataKind_Cluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MetadataKind_Cluster) Reset() { - *x = MetadataKind_Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKind_Cluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKind_Cluster) ProtoMessage() {} - -func (x *MetadataKind_Cluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKind_Cluster.ProtoReflect.Descriptor instead. -func (*MetadataKind_Cluster) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 2} -} - -// Represents metadata from :ref:`the upstream -// host`. -type MetadataKind_Host struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MetadataKind_Host) Reset() { - *x = MetadataKind_Host{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKind_Host) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKind_Host) ProtoMessage() {} - -func (x *MetadataKind_Host) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKind_Host.ProtoReflect.Descriptor instead. -func (*MetadataKind_Host) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 3} -} - -var File_envoy_type_metadata_v3_metadata_proto protoreflect.FileDescriptor - -var file_envoy_type_metadata_v3_metadata_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x02, 0x0a, 0x0b, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, - 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x1a, 0x71, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x2e, 0x50, 0x61, 0x74, 0x68, - 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, - 0x65, 0x79, 0x22, 0xd2, 0x04, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, - 0x69, 0x6e, 0x64, 0x12, 0x48, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, - 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, - 0x6e, 0x64, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x12, 0x48, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x04, 0x68, - 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, - 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x1a, 0x3d, 0x0a, 0x07, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, - 0x69, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x0a, 0x05, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x1a, 0x3d, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x37, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x2f, 0x9a, - 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x2a, - 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x42, 0x0b, 0x0a, 0x04, 0x6b, 0x69, - 0x6e, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x89, 0x01, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, - 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, - 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_metadata_v3_metadata_proto_rawDescOnce sync.Once - file_envoy_type_metadata_v3_metadata_proto_rawDescData = file_envoy_type_metadata_v3_metadata_proto_rawDesc -) - -func file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP() []byte { - file_envoy_type_metadata_v3_metadata_proto_rawDescOnce.Do(func() { - file_envoy_type_metadata_v3_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_metadata_v3_metadata_proto_rawDescData) - }) - return file_envoy_type_metadata_v3_metadata_proto_rawDescData -} - -var file_envoy_type_metadata_v3_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_envoy_type_metadata_v3_metadata_proto_goTypes = []interface{}{ - (*MetadataKey)(nil), // 0: envoy.type.metadata.v3.MetadataKey - (*MetadataKind)(nil), // 1: envoy.type.metadata.v3.MetadataKind - (*MetadataKey_PathSegment)(nil), // 2: envoy.type.metadata.v3.MetadataKey.PathSegment - (*MetadataKind_Request)(nil), // 3: envoy.type.metadata.v3.MetadataKind.Request - (*MetadataKind_Route)(nil), // 4: envoy.type.metadata.v3.MetadataKind.Route - (*MetadataKind_Cluster)(nil), // 5: envoy.type.metadata.v3.MetadataKind.Cluster - (*MetadataKind_Host)(nil), // 6: envoy.type.metadata.v3.MetadataKind.Host -} -var file_envoy_type_metadata_v3_metadata_proto_depIdxs = []int32{ - 2, // 0: envoy.type.metadata.v3.MetadataKey.path:type_name -> envoy.type.metadata.v3.MetadataKey.PathSegment - 3, // 1: envoy.type.metadata.v3.MetadataKind.request:type_name -> envoy.type.metadata.v3.MetadataKind.Request - 4, // 2: envoy.type.metadata.v3.MetadataKind.route:type_name -> envoy.type.metadata.v3.MetadataKind.Route - 5, // 3: envoy.type.metadata.v3.MetadataKind.cluster:type_name -> envoy.type.metadata.v3.MetadataKind.Cluster - 6, // 4: envoy.type.metadata.v3.MetadataKind.host:type_name -> envoy.type.metadata.v3.MetadataKind.Host - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_envoy_type_metadata_v3_metadata_proto_init() } -func file_envoy_type_metadata_v3_metadata_proto_init() { - if File_envoy_type_metadata_v3_metadata_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_metadata_v3_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v3_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKind); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v3_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKey_PathSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v3_metadata_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKind_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v3_metadata_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKind_Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v3_metadata_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKind_Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v3_metadata_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKind_Host); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_metadata_v3_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*MetadataKind_Request_)(nil), - (*MetadataKind_Route_)(nil), - (*MetadataKind_Cluster_)(nil), - (*MetadataKind_Host_)(nil), - } - file_envoy_type_metadata_v3_metadata_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*MetadataKey_PathSegment_Key)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_metadata_v3_metadata_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_metadata_v3_metadata_proto_goTypes, - DependencyIndexes: file_envoy_type_metadata_v3_metadata_proto_depIdxs, - MessageInfos: file_envoy_type_metadata_v3_metadata_proto_msgTypes, - }.Build() - File_envoy_type_metadata_v3_metadata_proto = out.File - file_envoy_type_metadata_v3_metadata_proto_rawDesc = nil - file_envoy_type_metadata_v3_metadata_proto_goTypes = nil - file_envoy_type_metadata_v3_metadata_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/metadata/v3/metadata.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/metadata/v3/metadata.pb.validate.go deleted file mode 100644 index 37e45c4f0e3..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/metadata/v3/metadata.pb.validate.go +++ /dev/null @@ -1,1024 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/metadata/v3/metadata.proto - -package metadatav3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on MetadataKey with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *MetadataKey) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKey with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in MetadataKeyMultiError, or -// nil if none found. -func (m *MetadataKey) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKey) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKey()) < 1 { - err := MetadataKeyValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetPath()) < 1 { - err := MetadataKeyValidationError{ - field: "Path", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetPath() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataKeyValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataKeyValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataKeyValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return MetadataKeyMultiError(errors) - } - - return nil -} - -// MetadataKeyMultiError is an error wrapping multiple validation errors -// returned by MetadataKey.ValidateAll() if the designated constraints aren't met. -type MetadataKeyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKeyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKeyMultiError) AllErrors() []error { return m } - -// MetadataKeyValidationError is the validation error returned by -// MetadataKey.Validate if the designated constraints aren't met. -type MetadataKeyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKeyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKeyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKeyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKeyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKeyValidationError) ErrorName() string { return "MetadataKeyValidationError" } - -// Error satisfies the builtin error interface -func (e MetadataKeyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKey.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKeyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKeyValidationError{} - -// Validate checks the field values on MetadataKind with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *MetadataKind) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKind with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in MetadataKindMultiError, or -// nil if none found. -func (m *MetadataKind) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKind) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofKindPresent := false - switch v := m.Kind.(type) { - case *MetadataKind_Request_: - if v == nil { - err := MetadataKindValidationError{ - field: "Kind", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofKindPresent = true - - if all { - switch v := interface{}(m.GetRequest()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Request", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Request", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataKindValidationError{ - field: "Request", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MetadataKind_Route_: - if v == nil { - err := MetadataKindValidationError{ - field: "Kind", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofKindPresent = true - - if all { - switch v := interface{}(m.GetRoute()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataKindValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MetadataKind_Cluster_: - if v == nil { - err := MetadataKindValidationError{ - field: "Kind", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofKindPresent = true - - if all { - switch v := interface{}(m.GetCluster()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Cluster", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Cluster", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataKindValidationError{ - field: "Cluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MetadataKind_Host_: - if v == nil { - err := MetadataKindValidationError{ - field: "Kind", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofKindPresent = true - - if all { - switch v := interface{}(m.GetHost()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Host", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Host", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataKindValidationError{ - field: "Host", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofKindPresent { - err := MetadataKindValidationError{ - field: "Kind", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return MetadataKindMultiError(errors) - } - - return nil -} - -// MetadataKindMultiError is an error wrapping multiple validation errors -// returned by MetadataKind.ValidateAll() if the designated constraints aren't met. -type MetadataKindMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKindMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKindMultiError) AllErrors() []error { return m } - -// MetadataKindValidationError is the validation error returned by -// MetadataKind.Validate if the designated constraints aren't met. -type MetadataKindValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKindValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKindValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKindValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKindValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKindValidationError) ErrorName() string { return "MetadataKindValidationError" } - -// Error satisfies the builtin error interface -func (e MetadataKindValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKind.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKindValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKindValidationError{} - -// Validate checks the field values on MetadataKey_PathSegment with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *MetadataKey_PathSegment) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKey_PathSegment with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataKey_PathSegmentMultiError, or nil if none found. -func (m *MetadataKey_PathSegment) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKey_PathSegment) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofSegmentPresent := false - switch v := m.Segment.(type) { - case *MetadataKey_PathSegment_Key: - if v == nil { - err := MetadataKey_PathSegmentValidationError{ - field: "Segment", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofSegmentPresent = true - - if utf8.RuneCountInString(m.GetKey()) < 1 { - err := MetadataKey_PathSegmentValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - if !oneofSegmentPresent { - err := MetadataKey_PathSegmentValidationError{ - field: "Segment", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return MetadataKey_PathSegmentMultiError(errors) - } - - return nil -} - -// MetadataKey_PathSegmentMultiError is an error wrapping multiple validation -// errors returned by MetadataKey_PathSegment.ValidateAll() if the designated -// constraints aren't met. -type MetadataKey_PathSegmentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKey_PathSegmentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKey_PathSegmentMultiError) AllErrors() []error { return m } - -// MetadataKey_PathSegmentValidationError is the validation error returned by -// MetadataKey_PathSegment.Validate if the designated constraints aren't met. -type MetadataKey_PathSegmentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKey_PathSegmentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKey_PathSegmentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKey_PathSegmentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKey_PathSegmentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKey_PathSegmentValidationError) ErrorName() string { - return "MetadataKey_PathSegmentValidationError" -} - -// Error satisfies the builtin error interface -func (e MetadataKey_PathSegmentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKey_PathSegment.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKey_PathSegmentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKey_PathSegmentValidationError{} - -// Validate checks the field values on MetadataKind_Request with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *MetadataKind_Request) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKind_Request with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataKind_RequestMultiError, or nil if none found. -func (m *MetadataKind_Request) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKind_Request) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return MetadataKind_RequestMultiError(errors) - } - - return nil -} - -// MetadataKind_RequestMultiError is an error wrapping multiple validation -// errors returned by MetadataKind_Request.ValidateAll() if the designated -// constraints aren't met. -type MetadataKind_RequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKind_RequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKind_RequestMultiError) AllErrors() []error { return m } - -// MetadataKind_RequestValidationError is the validation error returned by -// MetadataKind_Request.Validate if the designated constraints aren't met. -type MetadataKind_RequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKind_RequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKind_RequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKind_RequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKind_RequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKind_RequestValidationError) ErrorName() string { - return "MetadataKind_RequestValidationError" -} - -// Error satisfies the builtin error interface -func (e MetadataKind_RequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKind_Request.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKind_RequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKind_RequestValidationError{} - -// Validate checks the field values on MetadataKind_Route with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *MetadataKind_Route) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKind_Route with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataKind_RouteMultiError, or nil if none found. -func (m *MetadataKind_Route) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKind_Route) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return MetadataKind_RouteMultiError(errors) - } - - return nil -} - -// MetadataKind_RouteMultiError is an error wrapping multiple validation errors -// returned by MetadataKind_Route.ValidateAll() if the designated constraints -// aren't met. -type MetadataKind_RouteMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKind_RouteMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKind_RouteMultiError) AllErrors() []error { return m } - -// MetadataKind_RouteValidationError is the validation error returned by -// MetadataKind_Route.Validate if the designated constraints aren't met. -type MetadataKind_RouteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKind_RouteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKind_RouteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKind_RouteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKind_RouteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKind_RouteValidationError) ErrorName() string { - return "MetadataKind_RouteValidationError" -} - -// Error satisfies the builtin error interface -func (e MetadataKind_RouteValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKind_Route.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKind_RouteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKind_RouteValidationError{} - -// Validate checks the field values on MetadataKind_Cluster with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *MetadataKind_Cluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKind_Cluster with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataKind_ClusterMultiError, or nil if none found. -func (m *MetadataKind_Cluster) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKind_Cluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return MetadataKind_ClusterMultiError(errors) - } - - return nil -} - -// MetadataKind_ClusterMultiError is an error wrapping multiple validation -// errors returned by MetadataKind_Cluster.ValidateAll() if the designated -// constraints aren't met. -type MetadataKind_ClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKind_ClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKind_ClusterMultiError) AllErrors() []error { return m } - -// MetadataKind_ClusterValidationError is the validation error returned by -// MetadataKind_Cluster.Validate if the designated constraints aren't met. -type MetadataKind_ClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKind_ClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKind_ClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKind_ClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKind_ClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKind_ClusterValidationError) ErrorName() string { - return "MetadataKind_ClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e MetadataKind_ClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKind_Cluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKind_ClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKind_ClusterValidationError{} - -// Validate checks the field values on MetadataKind_Host with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *MetadataKind_Host) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKind_Host with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataKind_HostMultiError, or nil if none found. -func (m *MetadataKind_Host) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKind_Host) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return MetadataKind_HostMultiError(errors) - } - - return nil -} - -// MetadataKind_HostMultiError is an error wrapping multiple validation errors -// returned by MetadataKind_Host.ValidateAll() if the designated constraints -// aren't met. -type MetadataKind_HostMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKind_HostMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKind_HostMultiError) AllErrors() []error { return m } - -// MetadataKind_HostValidationError is the validation error returned by -// MetadataKind_Host.Validate if the designated constraints aren't met. -type MetadataKind_HostValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKind_HostValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKind_HostValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKind_HostValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKind_HostValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKind_HostValidationError) ErrorName() string { - return "MetadataKind_HostValidationError" -} - -// Error satisfies the builtin error interface -func (e MetadataKind_HostValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKind_Host.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKind_HostValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKind_HostValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/tracing/v3/custom_tag.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/tracing/v3/custom_tag.pb.go deleted file mode 100644 index 62f166de578..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/tracing/v3/custom_tag.pb.go +++ /dev/null @@ -1,614 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/tracing/v3/custom_tag.proto - -package tracingv3 - -import ( - v3 "github.com/cilium/proxy/go/envoy/type/metadata/v3" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Describes custom tags for the active span. -// [#next-free-field: 6] -type CustomTag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Used to populate the tag name. - Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` - // Used to specify what kind of custom tag. - // - // Types that are assignable to Type: - // - // *CustomTag_Literal_ - // *CustomTag_Environment_ - // *CustomTag_RequestHeader - // *CustomTag_Metadata_ - Type isCustomTag_Type `protobuf_oneof:"type"` -} - -func (x *CustomTag) Reset() { - *x = CustomTag{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTag) ProtoMessage() {} - -func (x *CustomTag) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomTag.ProtoReflect.Descriptor instead. -func (*CustomTag) Descriptor() ([]byte, []int) { - return file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP(), []int{0} -} - -func (x *CustomTag) GetTag() string { - if x != nil { - return x.Tag - } - return "" -} - -func (m *CustomTag) GetType() isCustomTag_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *CustomTag) GetLiteral() *CustomTag_Literal { - if x, ok := x.GetType().(*CustomTag_Literal_); ok { - return x.Literal - } - return nil -} - -func (x *CustomTag) GetEnvironment() *CustomTag_Environment { - if x, ok := x.GetType().(*CustomTag_Environment_); ok { - return x.Environment - } - return nil -} - -func (x *CustomTag) GetRequestHeader() *CustomTag_Header { - if x, ok := x.GetType().(*CustomTag_RequestHeader); ok { - return x.RequestHeader - } - return nil -} - -func (x *CustomTag) GetMetadata() *CustomTag_Metadata { - if x, ok := x.GetType().(*CustomTag_Metadata_); ok { - return x.Metadata - } - return nil -} - -type isCustomTag_Type interface { - isCustomTag_Type() -} - -type CustomTag_Literal_ struct { - // A literal custom tag. - Literal *CustomTag_Literal `protobuf:"bytes,2,opt,name=literal,proto3,oneof"` -} - -type CustomTag_Environment_ struct { - // An environment custom tag. - Environment *CustomTag_Environment `protobuf:"bytes,3,opt,name=environment,proto3,oneof"` -} - -type CustomTag_RequestHeader struct { - // A request header custom tag. - RequestHeader *CustomTag_Header `protobuf:"bytes,4,opt,name=request_header,json=requestHeader,proto3,oneof"` -} - -type CustomTag_Metadata_ struct { - // A custom tag to obtain tag value from the metadata. - Metadata *CustomTag_Metadata `protobuf:"bytes,5,opt,name=metadata,proto3,oneof"` -} - -func (*CustomTag_Literal_) isCustomTag_Type() {} - -func (*CustomTag_Environment_) isCustomTag_Type() {} - -func (*CustomTag_RequestHeader) isCustomTag_Type() {} - -func (*CustomTag_Metadata_) isCustomTag_Type() {} - -// Literal type custom tag with static value for the tag value. -type CustomTag_Literal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Static literal value to populate the tag value. - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *CustomTag_Literal) Reset() { - *x = CustomTag_Literal{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTag_Literal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTag_Literal) ProtoMessage() {} - -func (x *CustomTag_Literal) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomTag_Literal.ProtoReflect.Descriptor instead. -func (*CustomTag_Literal) Descriptor() ([]byte, []int) { - return file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *CustomTag_Literal) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// Environment type custom tag with environment name and default value. -type CustomTag_Environment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Environment variable name to obtain the value to populate the tag value. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // When the environment variable is not found, - // the tag value will be populated with this default value if specified, - // otherwise no tag will be populated. - DefaultValue string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` -} - -func (x *CustomTag_Environment) Reset() { - *x = CustomTag_Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTag_Environment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTag_Environment) ProtoMessage() {} - -func (x *CustomTag_Environment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomTag_Environment.ProtoReflect.Descriptor instead. -func (*CustomTag_Environment) Descriptor() ([]byte, []int) { - return file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *CustomTag_Environment) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CustomTag_Environment) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -// Header type custom tag with header name and default value. -type CustomTag_Header struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Header name to obtain the value to populate the tag value. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // When the header does not exist, - // the tag value will be populated with this default value if specified, - // otherwise no tag will be populated. - DefaultValue string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` -} - -func (x *CustomTag_Header) Reset() { - *x = CustomTag_Header{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTag_Header) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTag_Header) ProtoMessage() {} - -func (x *CustomTag_Header) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomTag_Header.ProtoReflect.Descriptor instead. -func (*CustomTag_Header) Descriptor() ([]byte, []int) { - return file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *CustomTag_Header) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CustomTag_Header) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -// Metadata type custom tag using -// :ref:`MetadataKey ` to retrieve the protobuf value -// from :ref:`Metadata `, and populate the tag value with -// `the canonical JSON `_ -// representation of it. -type CustomTag_Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specify what kind of metadata to obtain tag value from. - Kind *v3.MetadataKind `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` - // Metadata key to define the path to retrieve the tag value. - MetadataKey *v3.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` - // When no valid metadata is found, - // the tag value would be populated with this default value if specified, - // otherwise no tag would be populated. - DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` -} - -func (x *CustomTag_Metadata) Reset() { - *x = CustomTag_Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTag_Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTag_Metadata) ProtoMessage() {} - -func (x *CustomTag_Metadata) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomTag_Metadata.ProtoReflect.Descriptor instead. -func (*CustomTag_Metadata) Descriptor() ([]byte, []int) { - return file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP(), []int{0, 3} -} - -func (x *CustomTag_Metadata) GetKind() *v3.MetadataKind { - if x != nil { - return x.Kind - } - return nil -} - -func (x *CustomTag_Metadata) GetMetadataKey() *v3.MetadataKey { - if x != nil { - return x.MetadataKey - } - return nil -} - -func (x *CustomTag_Metadata) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -var File_envoy_type_tracing_v3_custom_tag_proto protoreflect.FileDescriptor - -var file_envoy_type_tracing_v3_custom_tag_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, - 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, - 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x1a, - 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xd4, 0x07, 0x0a, 0x09, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x12, - 0x19, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x44, 0x0a, 0x07, 0x6c, 0x69, - 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x4c, 0x69, - 0x74, 0x65, 0x72, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x07, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, - 0x12, 0x50, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x58, 0x0a, - 0x07, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, - 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x1a, 0x83, 0x01, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x69, - 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, - 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, - 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, - 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x7f, 0x0a, - 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, - 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0xe2, - 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x04, 0x6b, - 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x52, - 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, - 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, - 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x42, 0x0b, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x87, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, - 0x42, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, - 0x3b, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_tracing_v3_custom_tag_proto_rawDescOnce sync.Once - file_envoy_type_tracing_v3_custom_tag_proto_rawDescData = file_envoy_type_tracing_v3_custom_tag_proto_rawDesc -) - -func file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP() []byte { - file_envoy_type_tracing_v3_custom_tag_proto_rawDescOnce.Do(func() { - file_envoy_type_tracing_v3_custom_tag_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_tracing_v3_custom_tag_proto_rawDescData) - }) - return file_envoy_type_tracing_v3_custom_tag_proto_rawDescData -} - -var file_envoy_type_tracing_v3_custom_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_envoy_type_tracing_v3_custom_tag_proto_goTypes = []interface{}{ - (*CustomTag)(nil), // 0: envoy.type.tracing.v3.CustomTag - (*CustomTag_Literal)(nil), // 1: envoy.type.tracing.v3.CustomTag.Literal - (*CustomTag_Environment)(nil), // 2: envoy.type.tracing.v3.CustomTag.Environment - (*CustomTag_Header)(nil), // 3: envoy.type.tracing.v3.CustomTag.Header - (*CustomTag_Metadata)(nil), // 4: envoy.type.tracing.v3.CustomTag.Metadata - (*v3.MetadataKind)(nil), // 5: envoy.type.metadata.v3.MetadataKind - (*v3.MetadataKey)(nil), // 6: envoy.type.metadata.v3.MetadataKey -} -var file_envoy_type_tracing_v3_custom_tag_proto_depIdxs = []int32{ - 1, // 0: envoy.type.tracing.v3.CustomTag.literal:type_name -> envoy.type.tracing.v3.CustomTag.Literal - 2, // 1: envoy.type.tracing.v3.CustomTag.environment:type_name -> envoy.type.tracing.v3.CustomTag.Environment - 3, // 2: envoy.type.tracing.v3.CustomTag.request_header:type_name -> envoy.type.tracing.v3.CustomTag.Header - 4, // 3: envoy.type.tracing.v3.CustomTag.metadata:type_name -> envoy.type.tracing.v3.CustomTag.Metadata - 5, // 4: envoy.type.tracing.v3.CustomTag.Metadata.kind:type_name -> envoy.type.metadata.v3.MetadataKind - 6, // 5: envoy.type.tracing.v3.CustomTag.Metadata.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_type_tracing_v3_custom_tag_proto_init() } -func file_envoy_type_tracing_v3_custom_tag_proto_init() { - if File_envoy_type_tracing_v3_custom_tag_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTag_Literal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTag_Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTag_Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTag_Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*CustomTag_Literal_)(nil), - (*CustomTag_Environment_)(nil), - (*CustomTag_RequestHeader)(nil), - (*CustomTag_Metadata_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_tracing_v3_custom_tag_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_tracing_v3_custom_tag_proto_goTypes, - DependencyIndexes: file_envoy_type_tracing_v3_custom_tag_proto_depIdxs, - MessageInfos: file_envoy_type_tracing_v3_custom_tag_proto_msgTypes, - }.Build() - File_envoy_type_tracing_v3_custom_tag_proto = out.File - file_envoy_type_tracing_v3_custom_tag_proto_rawDesc = nil - file_envoy_type_tracing_v3_custom_tag_proto_goTypes = nil - file_envoy_type_tracing_v3_custom_tag_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/tracing/v3/custom_tag.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/tracing/v3/custom_tag.pb.validate.go deleted file mode 100644 index eeebc9efdeb..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/tracing/v3/custom_tag.pb.validate.go +++ /dev/null @@ -1,846 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/tracing/v3/custom_tag.proto - -package tracingv3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on CustomTag with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *CustomTag) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CustomTag with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in CustomTagMultiError, or nil -// if none found. -func (m *CustomTag) ValidateAll() error { - return m.validate(true) -} - -func (m *CustomTag) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetTag()) < 1 { - err := CustomTagValidationError{ - field: "Tag", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - oneofTypePresent := false - switch v := m.Type.(type) { - case *CustomTag_Literal_: - if v == nil { - err := CustomTagValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTypePresent = true - - if all { - switch v := interface{}(m.GetLiteral()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Literal", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Literal", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLiteral()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTagValidationError{ - field: "Literal", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CustomTag_Environment_: - if v == nil { - err := CustomTagValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTypePresent = true - - if all { - switch v := interface{}(m.GetEnvironment()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Environment", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Environment", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEnvironment()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTagValidationError{ - field: "Environment", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CustomTag_RequestHeader: - if v == nil { - err := CustomTagValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTypePresent = true - - if all { - switch v := interface{}(m.GetRequestHeader()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "RequestHeader", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "RequestHeader", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequestHeader()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTagValidationError{ - field: "RequestHeader", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CustomTag_Metadata_: - if v == nil { - err := CustomTagValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTypePresent = true - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTagValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofTypePresent { - err := CustomTagValidationError{ - field: "Type", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return CustomTagMultiError(errors) - } - - return nil -} - -// CustomTagMultiError is an error wrapping multiple validation errors returned -// by CustomTag.ValidateAll() if the designated constraints aren't met. -type CustomTagMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CustomTagMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CustomTagMultiError) AllErrors() []error { return m } - -// CustomTagValidationError is the validation error returned by -// CustomTag.Validate if the designated constraints aren't met. -type CustomTagValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CustomTagValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CustomTagValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CustomTagValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CustomTagValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CustomTagValidationError) ErrorName() string { return "CustomTagValidationError" } - -// Error satisfies the builtin error interface -func (e CustomTagValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCustomTag.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CustomTagValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CustomTagValidationError{} - -// Validate checks the field values on CustomTag_Literal with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CustomTag_Literal) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CustomTag_Literal with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CustomTag_LiteralMultiError, or nil if none found. -func (m *CustomTag_Literal) ValidateAll() error { - return m.validate(true) -} - -func (m *CustomTag_Literal) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetValue()) < 1 { - err := CustomTag_LiteralValidationError{ - field: "Value", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return CustomTag_LiteralMultiError(errors) - } - - return nil -} - -// CustomTag_LiteralMultiError is an error wrapping multiple validation errors -// returned by CustomTag_Literal.ValidateAll() if the designated constraints -// aren't met. -type CustomTag_LiteralMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CustomTag_LiteralMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CustomTag_LiteralMultiError) AllErrors() []error { return m } - -// CustomTag_LiteralValidationError is the validation error returned by -// CustomTag_Literal.Validate if the designated constraints aren't met. -type CustomTag_LiteralValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CustomTag_LiteralValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CustomTag_LiteralValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CustomTag_LiteralValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CustomTag_LiteralValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CustomTag_LiteralValidationError) ErrorName() string { - return "CustomTag_LiteralValidationError" -} - -// Error satisfies the builtin error interface -func (e CustomTag_LiteralValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCustomTag_Literal.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CustomTag_LiteralValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CustomTag_LiteralValidationError{} - -// Validate checks the field values on CustomTag_Environment with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CustomTag_Environment) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CustomTag_Environment with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CustomTag_EnvironmentMultiError, or nil if none found. -func (m *CustomTag_Environment) ValidateAll() error { - return m.validate(true) -} - -func (m *CustomTag_Environment) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := CustomTag_EnvironmentValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for DefaultValue - - if len(errors) > 0 { - return CustomTag_EnvironmentMultiError(errors) - } - - return nil -} - -// CustomTag_EnvironmentMultiError is an error wrapping multiple validation -// errors returned by CustomTag_Environment.ValidateAll() if the designated -// constraints aren't met. -type CustomTag_EnvironmentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CustomTag_EnvironmentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CustomTag_EnvironmentMultiError) AllErrors() []error { return m } - -// CustomTag_EnvironmentValidationError is the validation error returned by -// CustomTag_Environment.Validate if the designated constraints aren't met. -type CustomTag_EnvironmentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CustomTag_EnvironmentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CustomTag_EnvironmentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CustomTag_EnvironmentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CustomTag_EnvironmentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CustomTag_EnvironmentValidationError) ErrorName() string { - return "CustomTag_EnvironmentValidationError" -} - -// Error satisfies the builtin error interface -func (e CustomTag_EnvironmentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCustomTag_Environment.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CustomTag_EnvironmentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CustomTag_EnvironmentValidationError{} - -// Validate checks the field values on CustomTag_Header with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CustomTag_Header) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CustomTag_Header with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CustomTag_HeaderMultiError, or nil if none found. -func (m *CustomTag_Header) ValidateAll() error { - return m.validate(true) -} - -func (m *CustomTag_Header) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := CustomTag_HeaderValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_CustomTag_Header_Name_Pattern.MatchString(m.GetName()) { - err := CustomTag_HeaderValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for DefaultValue - - if len(errors) > 0 { - return CustomTag_HeaderMultiError(errors) - } - - return nil -} - -// CustomTag_HeaderMultiError is an error wrapping multiple validation errors -// returned by CustomTag_Header.ValidateAll() if the designated constraints -// aren't met. -type CustomTag_HeaderMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CustomTag_HeaderMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CustomTag_HeaderMultiError) AllErrors() []error { return m } - -// CustomTag_HeaderValidationError is the validation error returned by -// CustomTag_Header.Validate if the designated constraints aren't met. -type CustomTag_HeaderValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CustomTag_HeaderValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CustomTag_HeaderValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CustomTag_HeaderValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CustomTag_HeaderValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CustomTag_HeaderValidationError) ErrorName() string { return "CustomTag_HeaderValidationError" } - -// Error satisfies the builtin error interface -func (e CustomTag_HeaderValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCustomTag_Header.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CustomTag_HeaderValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CustomTag_HeaderValidationError{} - -var _CustomTag_Header_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on CustomTag_Metadata with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CustomTag_Metadata) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CustomTag_Metadata with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CustomTag_MetadataMultiError, or nil if none found. -func (m *CustomTag_Metadata) ValidateAll() error { - return m.validate(true) -} - -func (m *CustomTag_Metadata) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetKind()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTag_MetadataValidationError{ - field: "Kind", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTag_MetadataValidationError{ - field: "Kind", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKind()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTag_MetadataValidationError{ - field: "Kind", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadataKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTag_MetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTag_MetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTag_MetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DefaultValue - - if len(errors) > 0 { - return CustomTag_MetadataMultiError(errors) - } - - return nil -} - -// CustomTag_MetadataMultiError is an error wrapping multiple validation errors -// returned by CustomTag_Metadata.ValidateAll() if the designated constraints -// aren't met. -type CustomTag_MetadataMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CustomTag_MetadataMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CustomTag_MetadataMultiError) AllErrors() []error { return m } - -// CustomTag_MetadataValidationError is the validation error returned by -// CustomTag_Metadata.Validate if the designated constraints aren't met. -type CustomTag_MetadataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CustomTag_MetadataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CustomTag_MetadataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CustomTag_MetadataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CustomTag_MetadataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CustomTag_MetadataValidationError) ErrorName() string { - return "CustomTag_MetadataValidationError" -} - -// Error satisfies the builtin error interface -func (e CustomTag_MetadataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCustomTag_Metadata.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CustomTag_MetadataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CustomTag_MetadataValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/hash_policy.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/hash_policy.pb.go deleted file mode 100644 index 2701f733c3e..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/hash_policy.pb.go +++ /dev/null @@ -1,338 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/v3/hash_policy.proto - -package typev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the hash policy -type HashPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to PolicySpecifier: - // - // *HashPolicy_SourceIp_ - // *HashPolicy_FilterState_ - PolicySpecifier isHashPolicy_PolicySpecifier `protobuf_oneof:"policy_specifier"` -} - -func (x *HashPolicy) Reset() { - *x = HashPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HashPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HashPolicy) ProtoMessage() {} - -func (x *HashPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HashPolicy.ProtoReflect.Descriptor instead. -func (*HashPolicy) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_hash_policy_proto_rawDescGZIP(), []int{0} -} - -func (m *HashPolicy) GetPolicySpecifier() isHashPolicy_PolicySpecifier { - if m != nil { - return m.PolicySpecifier - } - return nil -} - -func (x *HashPolicy) GetSourceIp() *HashPolicy_SourceIp { - if x, ok := x.GetPolicySpecifier().(*HashPolicy_SourceIp_); ok { - return x.SourceIp - } - return nil -} - -func (x *HashPolicy) GetFilterState() *HashPolicy_FilterState { - if x, ok := x.GetPolicySpecifier().(*HashPolicy_FilterState_); ok { - return x.FilterState - } - return nil -} - -type isHashPolicy_PolicySpecifier interface { - isHashPolicy_PolicySpecifier() -} - -type HashPolicy_SourceIp_ struct { - SourceIp *HashPolicy_SourceIp `protobuf:"bytes,1,opt,name=source_ip,json=sourceIp,proto3,oneof"` -} - -type HashPolicy_FilterState_ struct { - FilterState *HashPolicy_FilterState `protobuf:"bytes,2,opt,name=filter_state,json=filterState,proto3,oneof"` -} - -func (*HashPolicy_SourceIp_) isHashPolicy_PolicySpecifier() {} - -func (*HashPolicy_FilterState_) isHashPolicy_PolicySpecifier() {} - -// The source IP will be used to compute the hash used by hash-based load balancing -// algorithms. -type HashPolicy_SourceIp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *HashPolicy_SourceIp) Reset() { - *x = HashPolicy_SourceIp{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HashPolicy_SourceIp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HashPolicy_SourceIp) ProtoMessage() {} - -func (x *HashPolicy_SourceIp) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HashPolicy_SourceIp.ProtoReflect.Descriptor instead. -func (*HashPolicy_SourceIp) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_hash_policy_proto_rawDescGZIP(), []int{0, 0} -} - -// An Object in the :ref:`filterState ` will be used -// to compute the hash used by hash-based load balancing algorithms. -type HashPolicy_FilterState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the Object in the filterState, which is an Envoy::Hashable object. If there is no - // data associated with the key, or the stored object is not Envoy::Hashable, no hash will be - // produced. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *HashPolicy_FilterState) Reset() { - *x = HashPolicy_FilterState{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HashPolicy_FilterState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HashPolicy_FilterState) ProtoMessage() {} - -func (x *HashPolicy_FilterState) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HashPolicy_FilterState.ProtoReflect.Descriptor instead. -func (*HashPolicy_FilterState) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_hash_policy_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *HashPolicy_FilterState) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -var File_envoy_type_v3_hash_policy_proto protoreflect.FileDescriptor - -var file_envoy_type_v3_hash_policy_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x02, 0x0a, 0x0a, - 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x41, 0x0a, 0x09, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x61, - 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, - 0x70, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x4a, 0x0a, - 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x31, 0x0a, 0x08, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x49, 0x70, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x1a, 0x28, 0x0a, 0x0b, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x42, 0x17, 0x0a, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x75, 0x0a, - 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48, 0x61, - 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_v3_hash_policy_proto_rawDescOnce sync.Once - file_envoy_type_v3_hash_policy_proto_rawDescData = file_envoy_type_v3_hash_policy_proto_rawDesc -) - -func file_envoy_type_v3_hash_policy_proto_rawDescGZIP() []byte { - file_envoy_type_v3_hash_policy_proto_rawDescOnce.Do(func() { - file_envoy_type_v3_hash_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_hash_policy_proto_rawDescData) - }) - return file_envoy_type_v3_hash_policy_proto_rawDescData -} - -var file_envoy_type_v3_hash_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_type_v3_hash_policy_proto_goTypes = []interface{}{ - (*HashPolicy)(nil), // 0: envoy.type.v3.HashPolicy - (*HashPolicy_SourceIp)(nil), // 1: envoy.type.v3.HashPolicy.SourceIp - (*HashPolicy_FilterState)(nil), // 2: envoy.type.v3.HashPolicy.FilterState -} -var file_envoy_type_v3_hash_policy_proto_depIdxs = []int32{ - 1, // 0: envoy.type.v3.HashPolicy.source_ip:type_name -> envoy.type.v3.HashPolicy.SourceIp - 2, // 1: envoy.type.v3.HashPolicy.filter_state:type_name -> envoy.type.v3.HashPolicy.FilterState - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_type_v3_hash_policy_proto_init() } -func file_envoy_type_v3_hash_policy_proto_init() { - if File_envoy_type_v3_hash_policy_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_v3_hash_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HashPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_v3_hash_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HashPolicy_SourceIp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_v3_hash_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HashPolicy_FilterState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_v3_hash_policy_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*HashPolicy_SourceIp_)(nil), - (*HashPolicy_FilterState_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_v3_hash_policy_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_v3_hash_policy_proto_goTypes, - DependencyIndexes: file_envoy_type_v3_hash_policy_proto_depIdxs, - MessageInfos: file_envoy_type_v3_hash_policy_proto_msgTypes, - }.Build() - File_envoy_type_v3_hash_policy_proto = out.File - file_envoy_type_v3_hash_policy_proto_rawDesc = nil - file_envoy_type_v3_hash_policy_proto_goTypes = nil - file_envoy_type_v3_hash_policy_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/hash_policy.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/hash_policy.pb.validate.go deleted file mode 100644 index 5cb102e8062..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/hash_policy.pb.validate.go +++ /dev/null @@ -1,450 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/v3/hash_policy.proto - -package typev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on HashPolicy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HashPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HashPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HashPolicyMultiError, or -// nil if none found. -func (m *HashPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *HashPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofPolicySpecifierPresent := false - switch v := m.PolicySpecifier.(type) { - case *HashPolicy_SourceIp_: - if v == nil { - err := HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetSourceIp()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HashPolicyValidationError{ - field: "SourceIp", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HashPolicyValidationError{ - field: "SourceIp", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HashPolicyValidationError{ - field: "SourceIp", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HashPolicy_FilterState_: - if v == nil { - err := HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetFilterState()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HashPolicyValidationError{ - field: "FilterState", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HashPolicyValidationError{ - field: "FilterState", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFilterState()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HashPolicyValidationError{ - field: "FilterState", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofPolicySpecifierPresent { - err := HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HashPolicyMultiError(errors) - } - - return nil -} - -// HashPolicyMultiError is an error wrapping multiple validation errors -// returned by HashPolicy.ValidateAll() if the designated constraints aren't met. -type HashPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HashPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HashPolicyMultiError) AllErrors() []error { return m } - -// HashPolicyValidationError is the validation error returned by -// HashPolicy.Validate if the designated constraints aren't met. -type HashPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HashPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HashPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HashPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HashPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HashPolicyValidationError) ErrorName() string { return "HashPolicyValidationError" } - -// Error satisfies the builtin error interface -func (e HashPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHashPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HashPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HashPolicyValidationError{} - -// Validate checks the field values on HashPolicy_SourceIp with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HashPolicy_SourceIp) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HashPolicy_SourceIp with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HashPolicy_SourceIpMultiError, or nil if none found. -func (m *HashPolicy_SourceIp) ValidateAll() error { - return m.validate(true) -} - -func (m *HashPolicy_SourceIp) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return HashPolicy_SourceIpMultiError(errors) - } - - return nil -} - -// HashPolicy_SourceIpMultiError is an error wrapping multiple validation -// errors returned by HashPolicy_SourceIp.ValidateAll() if the designated -// constraints aren't met. -type HashPolicy_SourceIpMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HashPolicy_SourceIpMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HashPolicy_SourceIpMultiError) AllErrors() []error { return m } - -// HashPolicy_SourceIpValidationError is the validation error returned by -// HashPolicy_SourceIp.Validate if the designated constraints aren't met. -type HashPolicy_SourceIpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HashPolicy_SourceIpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HashPolicy_SourceIpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HashPolicy_SourceIpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HashPolicy_SourceIpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HashPolicy_SourceIpValidationError) ErrorName() string { - return "HashPolicy_SourceIpValidationError" -} - -// Error satisfies the builtin error interface -func (e HashPolicy_SourceIpValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHashPolicy_SourceIp.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HashPolicy_SourceIpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HashPolicy_SourceIpValidationError{} - -// Validate checks the field values on HashPolicy_FilterState with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HashPolicy_FilterState) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HashPolicy_FilterState with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HashPolicy_FilterStateMultiError, or nil if none found. -func (m *HashPolicy_FilterState) ValidateAll() error { - return m.validate(true) -} - -func (m *HashPolicy_FilterState) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKey()) < 1 { - err := HashPolicy_FilterStateValidationError{ - field: "Key", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HashPolicy_FilterStateMultiError(errors) - } - - return nil -} - -// HashPolicy_FilterStateMultiError is an error wrapping multiple validation -// errors returned by HashPolicy_FilterState.ValidateAll() if the designated -// constraints aren't met. -type HashPolicy_FilterStateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HashPolicy_FilterStateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HashPolicy_FilterStateMultiError) AllErrors() []error { return m } - -// HashPolicy_FilterStateValidationError is the validation error returned by -// HashPolicy_FilterState.Validate if the designated constraints aren't met. -type HashPolicy_FilterStateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HashPolicy_FilterStateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HashPolicy_FilterStateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HashPolicy_FilterStateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HashPolicy_FilterStateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HashPolicy_FilterStateValidationError) ErrorName() string { - return "HashPolicy_FilterStateValidationError" -} - -// Error satisfies the builtin error interface -func (e HashPolicy_FilterStateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHashPolicy_FilterState.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HashPolicy_FilterStateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HashPolicy_FilterStateValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/http.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/http.pb.go deleted file mode 100644 index 1b390f41494..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/http.pb.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/v3/http.proto - -package typev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type CodecClientType int32 - -const ( - CodecClientType_HTTP1 CodecClientType = 0 - CodecClientType_HTTP2 CodecClientType = 1 - // [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with - // caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient - // to distinguish HTTP1 and HTTP2 traffic. - CodecClientType_HTTP3 CodecClientType = 2 -) - -// Enum value maps for CodecClientType. -var ( - CodecClientType_name = map[int32]string{ - 0: "HTTP1", - 1: "HTTP2", - 2: "HTTP3", - } - CodecClientType_value = map[string]int32{ - "HTTP1": 0, - "HTTP2": 1, - "HTTP3": 2, - } -) - -func (x CodecClientType) Enum() *CodecClientType { - p := new(CodecClientType) - *p = x - return p -} - -func (x CodecClientType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CodecClientType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_type_v3_http_proto_enumTypes[0].Descriptor() -} - -func (CodecClientType) Type() protoreflect.EnumType { - return &file_envoy_type_v3_http_proto_enumTypes[0] -} - -func (x CodecClientType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CodecClientType.Descriptor instead. -func (CodecClientType) EnumDescriptor() ([]byte, []int) { - return file_envoy_type_v3_http_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_type_v3_http_proto protoreflect.FileDescriptor - -var file_envoy_type_v3_http_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x32, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, - 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x48, - 0x54, 0x54, 0x50, 0x31, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x32, 0x10, - 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x33, 0x10, 0x02, 0x42, 0x6f, 0x0a, 0x1b, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x48, 0x74, 0x74, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, - 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, - 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, - 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_v3_http_proto_rawDescOnce sync.Once - file_envoy_type_v3_http_proto_rawDescData = file_envoy_type_v3_http_proto_rawDesc -) - -func file_envoy_type_v3_http_proto_rawDescGZIP() []byte { - file_envoy_type_v3_http_proto_rawDescOnce.Do(func() { - file_envoy_type_v3_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_http_proto_rawDescData) - }) - return file_envoy_type_v3_http_proto_rawDescData -} - -var file_envoy_type_v3_http_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_type_v3_http_proto_goTypes = []interface{}{ - (CodecClientType)(0), // 0: envoy.type.v3.CodecClientType -} -var file_envoy_type_v3_http_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_type_v3_http_proto_init() } -func file_envoy_type_v3_http_proto_init() { - if File_envoy_type_v3_http_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_v3_http_proto_rawDesc, - NumEnums: 1, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_v3_http_proto_goTypes, - DependencyIndexes: file_envoy_type_v3_http_proto_depIdxs, - EnumInfos: file_envoy_type_v3_http_proto_enumTypes, - }.Build() - File_envoy_type_v3_http_proto = out.File - file_envoy_type_v3_http_proto_rawDesc = nil - file_envoy_type_v3_http_proto_goTypes = nil - file_envoy_type_v3_http_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/http.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/http.pb.validate.go deleted file mode 100644 index fff363617da..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/http.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/v3/http.proto - -package typev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/http_status.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/http_status.pb.go deleted file mode 100644 index 178cd4f5265..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/http_status.pb.go +++ /dev/null @@ -1,463 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/v3/http_status.proto - -package typev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// HTTP response codes supported in Envoy. -// For more details: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml -type StatusCode int32 - -const ( - // Empty - This code not part of the HTTP status code specification, but it is needed for proto - // `enum` type. - StatusCode_Empty StatusCode = 0 - StatusCode_Continue StatusCode = 100 - StatusCode_OK StatusCode = 200 - StatusCode_Created StatusCode = 201 - StatusCode_Accepted StatusCode = 202 - StatusCode_NonAuthoritativeInformation StatusCode = 203 - StatusCode_NoContent StatusCode = 204 - StatusCode_ResetContent StatusCode = 205 - StatusCode_PartialContent StatusCode = 206 - StatusCode_MultiStatus StatusCode = 207 - StatusCode_AlreadyReported StatusCode = 208 - StatusCode_IMUsed StatusCode = 226 - StatusCode_MultipleChoices StatusCode = 300 - StatusCode_MovedPermanently StatusCode = 301 - StatusCode_Found StatusCode = 302 - StatusCode_SeeOther StatusCode = 303 - StatusCode_NotModified StatusCode = 304 - StatusCode_UseProxy StatusCode = 305 - StatusCode_TemporaryRedirect StatusCode = 307 - StatusCode_PermanentRedirect StatusCode = 308 - StatusCode_BadRequest StatusCode = 400 - StatusCode_Unauthorized StatusCode = 401 - StatusCode_PaymentRequired StatusCode = 402 - StatusCode_Forbidden StatusCode = 403 - StatusCode_NotFound StatusCode = 404 - StatusCode_MethodNotAllowed StatusCode = 405 - StatusCode_NotAcceptable StatusCode = 406 - StatusCode_ProxyAuthenticationRequired StatusCode = 407 - StatusCode_RequestTimeout StatusCode = 408 - StatusCode_Conflict StatusCode = 409 - StatusCode_Gone StatusCode = 410 - StatusCode_LengthRequired StatusCode = 411 - StatusCode_PreconditionFailed StatusCode = 412 - StatusCode_PayloadTooLarge StatusCode = 413 - StatusCode_URITooLong StatusCode = 414 - StatusCode_UnsupportedMediaType StatusCode = 415 - StatusCode_RangeNotSatisfiable StatusCode = 416 - StatusCode_ExpectationFailed StatusCode = 417 - StatusCode_MisdirectedRequest StatusCode = 421 - StatusCode_UnprocessableEntity StatusCode = 422 - StatusCode_Locked StatusCode = 423 - StatusCode_FailedDependency StatusCode = 424 - StatusCode_UpgradeRequired StatusCode = 426 - StatusCode_PreconditionRequired StatusCode = 428 - StatusCode_TooManyRequests StatusCode = 429 - StatusCode_RequestHeaderFieldsTooLarge StatusCode = 431 - StatusCode_InternalServerError StatusCode = 500 - StatusCode_NotImplemented StatusCode = 501 - StatusCode_BadGateway StatusCode = 502 - StatusCode_ServiceUnavailable StatusCode = 503 - StatusCode_GatewayTimeout StatusCode = 504 - StatusCode_HTTPVersionNotSupported StatusCode = 505 - StatusCode_VariantAlsoNegotiates StatusCode = 506 - StatusCode_InsufficientStorage StatusCode = 507 - StatusCode_LoopDetected StatusCode = 508 - StatusCode_NotExtended StatusCode = 510 - StatusCode_NetworkAuthenticationRequired StatusCode = 511 -) - -// Enum value maps for StatusCode. -var ( - StatusCode_name = map[int32]string{ - 0: "Empty", - 100: "Continue", - 200: "OK", - 201: "Created", - 202: "Accepted", - 203: "NonAuthoritativeInformation", - 204: "NoContent", - 205: "ResetContent", - 206: "PartialContent", - 207: "MultiStatus", - 208: "AlreadyReported", - 226: "IMUsed", - 300: "MultipleChoices", - 301: "MovedPermanently", - 302: "Found", - 303: "SeeOther", - 304: "NotModified", - 305: "UseProxy", - 307: "TemporaryRedirect", - 308: "PermanentRedirect", - 400: "BadRequest", - 401: "Unauthorized", - 402: "PaymentRequired", - 403: "Forbidden", - 404: "NotFound", - 405: "MethodNotAllowed", - 406: "NotAcceptable", - 407: "ProxyAuthenticationRequired", - 408: "RequestTimeout", - 409: "Conflict", - 410: "Gone", - 411: "LengthRequired", - 412: "PreconditionFailed", - 413: "PayloadTooLarge", - 414: "URITooLong", - 415: "UnsupportedMediaType", - 416: "RangeNotSatisfiable", - 417: "ExpectationFailed", - 421: "MisdirectedRequest", - 422: "UnprocessableEntity", - 423: "Locked", - 424: "FailedDependency", - 426: "UpgradeRequired", - 428: "PreconditionRequired", - 429: "TooManyRequests", - 431: "RequestHeaderFieldsTooLarge", - 500: "InternalServerError", - 501: "NotImplemented", - 502: "BadGateway", - 503: "ServiceUnavailable", - 504: "GatewayTimeout", - 505: "HTTPVersionNotSupported", - 506: "VariantAlsoNegotiates", - 507: "InsufficientStorage", - 508: "LoopDetected", - 510: "NotExtended", - 511: "NetworkAuthenticationRequired", - } - StatusCode_value = map[string]int32{ - "Empty": 0, - "Continue": 100, - "OK": 200, - "Created": 201, - "Accepted": 202, - "NonAuthoritativeInformation": 203, - "NoContent": 204, - "ResetContent": 205, - "PartialContent": 206, - "MultiStatus": 207, - "AlreadyReported": 208, - "IMUsed": 226, - "MultipleChoices": 300, - "MovedPermanently": 301, - "Found": 302, - "SeeOther": 303, - "NotModified": 304, - "UseProxy": 305, - "TemporaryRedirect": 307, - "PermanentRedirect": 308, - "BadRequest": 400, - "Unauthorized": 401, - "PaymentRequired": 402, - "Forbidden": 403, - "NotFound": 404, - "MethodNotAllowed": 405, - "NotAcceptable": 406, - "ProxyAuthenticationRequired": 407, - "RequestTimeout": 408, - "Conflict": 409, - "Gone": 410, - "LengthRequired": 411, - "PreconditionFailed": 412, - "PayloadTooLarge": 413, - "URITooLong": 414, - "UnsupportedMediaType": 415, - "RangeNotSatisfiable": 416, - "ExpectationFailed": 417, - "MisdirectedRequest": 421, - "UnprocessableEntity": 422, - "Locked": 423, - "FailedDependency": 424, - "UpgradeRequired": 426, - "PreconditionRequired": 428, - "TooManyRequests": 429, - "RequestHeaderFieldsTooLarge": 431, - "InternalServerError": 500, - "NotImplemented": 501, - "BadGateway": 502, - "ServiceUnavailable": 503, - "GatewayTimeout": 504, - "HTTPVersionNotSupported": 505, - "VariantAlsoNegotiates": 506, - "InsufficientStorage": 507, - "LoopDetected": 508, - "NotExtended": 510, - "NetworkAuthenticationRequired": 511, - } -) - -func (x StatusCode) Enum() *StatusCode { - p := new(StatusCode) - *p = x - return p -} - -func (x StatusCode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (StatusCode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_type_v3_http_status_proto_enumTypes[0].Descriptor() -} - -func (StatusCode) Type() protoreflect.EnumType { - return &file_envoy_type_v3_http_status_proto_enumTypes[0] -} - -func (x StatusCode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use StatusCode.Descriptor instead. -func (StatusCode) EnumDescriptor() ([]byte, []int) { - return file_envoy_type_v3_http_status_proto_rawDescGZIP(), []int{0} -} - -// HTTP status. -type HttpStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Supplies HTTP response code. - Code StatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=envoy.type.v3.StatusCode" json:"code,omitempty"` -} - -func (x *HttpStatus) Reset() { - *x = HttpStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_http_status_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpStatus) ProtoMessage() {} - -func (x *HttpStatus) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_http_status_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpStatus.ProtoReflect.Descriptor instead. -func (*HttpStatus) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_http_status_proto_rawDescGZIP(), []int{0} -} - -func (x *HttpStatus) GetCode() StatusCode { - if x != nil { - return x.Code - } - return StatusCode_Empty -} - -var File_envoy_type_v3_http_status_proto protoreflect.FileDescriptor - -var file_envoy_type_v3_http_status_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x65, 0x0a, 0x0a, 0x48, - 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, - 0x64, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, 0x20, 0x00, 0x52, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2a, 0xb5, 0x09, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, - 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x10, 0x64, 0x12, 0x07, 0x0a, 0x02, 0x4f, 0x4b, - 0x10, 0xc8, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0xc9, - 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x10, 0xca, 0x01, - 0x12, 0x20, 0x0a, 0x1b, 0x4e, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x61, - 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, - 0xcb, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x4e, 0x6f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x10, - 0xcc, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x10, 0xcd, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x10, 0xce, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x10, 0xcf, 0x01, 0x12, 0x14, 0x0a, 0x0f, - 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10, - 0xd0, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x4d, 0x55, 0x73, 0x65, 0x64, 0x10, 0xe2, 0x01, 0x12, - 0x14, 0x0a, 0x0f, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x73, 0x10, 0xac, 0x02, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x6f, 0x76, 0x65, 0x64, 0x50, 0x65, - 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x10, 0xad, 0x02, 0x12, 0x0a, 0x0a, 0x05, - 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xae, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x65, 0x65, 0x4f, - 0x74, 0x68, 0x65, 0x72, 0x10, 0xaf, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0xb0, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x55, 0x73, 0x65, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x10, 0xb1, 0x02, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x65, 0x6d, 0x70, - 0x6f, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x10, 0xb3, 0x02, - 0x12, 0x16, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x10, 0xb4, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x90, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x55, 0x6e, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x10, 0x91, 0x03, 0x12, 0x14, 0x0a, 0x0f, - 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, - 0x92, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x10, - 0x93, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x94, - 0x03, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x6f, 0x74, 0x41, 0x6c, - 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x10, 0x95, 0x03, 0x12, 0x12, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x41, - 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x96, 0x03, 0x12, 0x20, 0x0a, 0x1b, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0x97, 0x03, 0x12, 0x13, - 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x10, 0x98, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x10, - 0x99, 0x03, 0x12, 0x09, 0x0a, 0x04, 0x47, 0x6f, 0x6e, 0x65, 0x10, 0x9a, 0x03, 0x12, 0x13, 0x0a, - 0x0e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, - 0x9b, 0x03, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x9c, 0x03, 0x12, 0x14, 0x0a, 0x0f, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6f, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x10, 0x9d, - 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x55, 0x52, 0x49, 0x54, 0x6f, 0x6f, 0x4c, 0x6f, 0x6e, 0x67, 0x10, - 0x9e, 0x03, 0x12, 0x19, 0x0a, 0x14, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x64, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x10, 0x9f, 0x03, 0x12, 0x18, 0x0a, - 0x13, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x10, 0xa0, 0x03, 0x12, 0x16, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x65, 0x63, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xa1, 0x03, 0x12, - 0x17, 0x0a, 0x12, 0x4d, 0x69, 0x73, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xa5, 0x03, 0x12, 0x18, 0x0a, 0x13, 0x55, 0x6e, 0x70, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x10, - 0xa6, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x10, 0xa7, 0x03, 0x12, - 0x15, 0x0a, 0x10, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, - 0x6e, 0x63, 0x79, 0x10, 0xa8, 0x03, 0x12, 0x14, 0x0a, 0x0f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0xaa, 0x03, 0x12, 0x19, 0x0a, 0x14, - 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x10, 0xac, 0x03, 0x12, 0x14, 0x0a, 0x0f, 0x54, 0x6f, 0x6f, 0x4d, 0x61, - 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x10, 0xad, 0x03, 0x12, 0x20, 0x0a, - 0x1b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x73, 0x54, 0x6f, 0x6f, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x10, 0xaf, 0x03, 0x12, - 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf4, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x4e, 0x6f, 0x74, - 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x10, 0xf5, 0x03, 0x12, 0x0f, - 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x10, 0xf6, 0x03, 0x12, - 0x17, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xf7, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x47, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x10, 0xf8, 0x03, 0x12, 0x1c, 0x0a, - 0x17, 0x48, 0x54, 0x54, 0x50, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x53, - 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10, 0xf9, 0x03, 0x12, 0x1a, 0x0a, 0x15, 0x56, - 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x73, 0x6f, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, - 0x61, 0x74, 0x65, 0x73, 0x10, 0xfa, 0x03, 0x12, 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x75, 0x66, - 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x10, 0xfb, - 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x10, 0xfc, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x64, 0x10, 0xfe, 0x03, 0x12, 0x22, 0x0a, 0x1d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0xff, 0x03, 0x42, 0x75, 0x0a, 0x1b, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, - 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_v3_http_status_proto_rawDescOnce sync.Once - file_envoy_type_v3_http_status_proto_rawDescData = file_envoy_type_v3_http_status_proto_rawDesc -) - -func file_envoy_type_v3_http_status_proto_rawDescGZIP() []byte { - file_envoy_type_v3_http_status_proto_rawDescOnce.Do(func() { - file_envoy_type_v3_http_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_http_status_proto_rawDescData) - }) - return file_envoy_type_v3_http_status_proto_rawDescData -} - -var file_envoy_type_v3_http_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_type_v3_http_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_type_v3_http_status_proto_goTypes = []interface{}{ - (StatusCode)(0), // 0: envoy.type.v3.StatusCode - (*HttpStatus)(nil), // 1: envoy.type.v3.HttpStatus -} -var file_envoy_type_v3_http_status_proto_depIdxs = []int32{ - 0, // 0: envoy.type.v3.HttpStatus.code:type_name -> envoy.type.v3.StatusCode - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_type_v3_http_status_proto_init() } -func file_envoy_type_v3_http_status_proto_init() { - if File_envoy_type_v3_http_status_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_v3_http_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_v3_http_status_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_v3_http_status_proto_goTypes, - DependencyIndexes: file_envoy_type_v3_http_status_proto_depIdxs, - EnumInfos: file_envoy_type_v3_http_status_proto_enumTypes, - MessageInfos: file_envoy_type_v3_http_status_proto_msgTypes, - }.Build() - File_envoy_type_v3_http_status_proto = out.File - file_envoy_type_v3_http_status_proto_rawDesc = nil - file_envoy_type_v3_http_status_proto_goTypes = nil - file_envoy_type_v3_http_status_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/http_status.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/http_status.pb.validate.go deleted file mode 100644 index 985e8d94cee..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/http_status.pb.validate.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/v3/http_status.proto - -package typev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on HttpStatus with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HttpStatus) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpStatus with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HttpStatusMultiError, or -// nil if none found. -func (m *HttpStatus) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpStatus) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := _HttpStatus_Code_NotInLookup[m.GetCode()]; ok { - err := HttpStatusValidationError{ - field: "Code", - reason: "value must not be in list [Empty]", - } - if !all { - return err - } - errors = append(errors, err) - } - - if _, ok := StatusCode_name[int32(m.GetCode())]; !ok { - err := HttpStatusValidationError{ - field: "Code", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return HttpStatusMultiError(errors) - } - - return nil -} - -// HttpStatusMultiError is an error wrapping multiple validation errors -// returned by HttpStatus.ValidateAll() if the designated constraints aren't met. -type HttpStatusMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpStatusMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpStatusMultiError) AllErrors() []error { return m } - -// HttpStatusValidationError is the validation error returned by -// HttpStatus.Validate if the designated constraints aren't met. -type HttpStatusValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpStatusValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpStatusValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpStatusValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpStatusValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpStatusValidationError) ErrorName() string { return "HttpStatusValidationError" } - -// Error satisfies the builtin error interface -func (e HttpStatusValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpStatus.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpStatusValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpStatusValidationError{} - -var _HttpStatus_Code_NotInLookup = map[StatusCode]struct{}{ - 0: {}, -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/percent.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/percent.pb.go deleted file mode 100644 index 69d0e52a5cd..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/percent.pb.go +++ /dev/null @@ -1,321 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/v3/percent.proto - -package typev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Fraction percentages support several fixed denominator values. -type FractionalPercent_DenominatorType int32 - -const ( - // 100. - // - // **Example**: 1/100 = 1%. - FractionalPercent_HUNDRED FractionalPercent_DenominatorType = 0 - // 10,000. - // - // **Example**: 1/10000 = 0.01%. - FractionalPercent_TEN_THOUSAND FractionalPercent_DenominatorType = 1 - // 1,000,000. - // - // **Example**: 1/1000000 = 0.0001%. - FractionalPercent_MILLION FractionalPercent_DenominatorType = 2 -) - -// Enum value maps for FractionalPercent_DenominatorType. -var ( - FractionalPercent_DenominatorType_name = map[int32]string{ - 0: "HUNDRED", - 1: "TEN_THOUSAND", - 2: "MILLION", - } - FractionalPercent_DenominatorType_value = map[string]int32{ - "HUNDRED": 0, - "TEN_THOUSAND": 1, - "MILLION": 2, - } -) - -func (x FractionalPercent_DenominatorType) Enum() *FractionalPercent_DenominatorType { - p := new(FractionalPercent_DenominatorType) - *p = x - return p -} - -func (x FractionalPercent_DenominatorType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FractionalPercent_DenominatorType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_type_v3_percent_proto_enumTypes[0].Descriptor() -} - -func (FractionalPercent_DenominatorType) Type() protoreflect.EnumType { - return &file_envoy_type_v3_percent_proto_enumTypes[0] -} - -func (x FractionalPercent_DenominatorType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use FractionalPercent_DenominatorType.Descriptor instead. -func (FractionalPercent_DenominatorType) EnumDescriptor() ([]byte, []int) { - return file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{1, 0} -} - -// Identifies a percentage, in the range [0.0, 100.0]. -type Percent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Percent) Reset() { - *x = Percent{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_percent_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Percent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Percent) ProtoMessage() {} - -func (x *Percent) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_percent_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Percent.ProtoReflect.Descriptor instead. -func (*Percent) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{0} -} - -func (x *Percent) GetValue() float64 { - if x != nil { - return x.Value - } - return 0 -} - -// A fractional percentage is used in cases in which for performance reasons performing floating -// point to integer conversions during randomness calculations is undesirable. The message includes -// both a numerator and denominator that together determine the final fractional value. -// -// * **Example**: 1/100 = 1%. -// * **Example**: 3/10000 = 0.03%. -type FractionalPercent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the numerator. Defaults to 0. - Numerator uint32 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"` - // Specifies the denominator. If the denominator specified is less than the numerator, the final - // fractional percentage is capped at 1 (100%). - Denominator FractionalPercent_DenominatorType `protobuf:"varint,2,opt,name=denominator,proto3,enum=envoy.type.v3.FractionalPercent_DenominatorType" json:"denominator,omitempty"` -} - -func (x *FractionalPercent) Reset() { - *x = FractionalPercent{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_percent_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FractionalPercent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FractionalPercent) ProtoMessage() {} - -func (x *FractionalPercent) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_percent_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FractionalPercent.ProtoReflect.Descriptor instead. -func (*FractionalPercent) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{1} -} - -func (x *FractionalPercent) GetNumerator() uint32 { - if x != nil { - return x.Numerator - } - return 0 -} - -func (x *FractionalPercent) GetDenominator() FractionalPercent_DenominatorType { - if x != nil { - return x.Denominator - } - return FractionalPercent_HUNDRED -} - -var File_envoy_type_v3_percent_proto protoreflect.FileDescriptor - -var file_envoy_type_v3_percent_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, - 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x07, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, - 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x19, 0x9a, 0xc5, 0x88, 0x1e, 0x14, 0x0a, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0xf3, 0x01, 0x0a, - 0x11, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x5c, 0x0a, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, - 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x3d, - 0x0a, 0x0f, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x55, 0x4e, 0x44, 0x52, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, - 0x0a, 0x0c, 0x54, 0x45, 0x4e, 0x5f, 0x54, 0x48, 0x4f, 0x55, 0x53, 0x41, 0x4e, 0x44, 0x10, 0x01, - 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x3a, 0x23, 0x9a, - 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x42, 0x72, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x33, 0x42, 0x0c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_v3_percent_proto_rawDescOnce sync.Once - file_envoy_type_v3_percent_proto_rawDescData = file_envoy_type_v3_percent_proto_rawDesc -) - -func file_envoy_type_v3_percent_proto_rawDescGZIP() []byte { - file_envoy_type_v3_percent_proto_rawDescOnce.Do(func() { - file_envoy_type_v3_percent_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_percent_proto_rawDescData) - }) - return file_envoy_type_v3_percent_proto_rawDescData -} - -var file_envoy_type_v3_percent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_type_v3_percent_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_type_v3_percent_proto_goTypes = []interface{}{ - (FractionalPercent_DenominatorType)(0), // 0: envoy.type.v3.FractionalPercent.DenominatorType - (*Percent)(nil), // 1: envoy.type.v3.Percent - (*FractionalPercent)(nil), // 2: envoy.type.v3.FractionalPercent -} -var file_envoy_type_v3_percent_proto_depIdxs = []int32{ - 0, // 0: envoy.type.v3.FractionalPercent.denominator:type_name -> envoy.type.v3.FractionalPercent.DenominatorType - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_type_v3_percent_proto_init() } -func file_envoy_type_v3_percent_proto_init() { - if File_envoy_type_v3_percent_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_v3_percent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Percent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_v3_percent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FractionalPercent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_v3_percent_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_v3_percent_proto_goTypes, - DependencyIndexes: file_envoy_type_v3_percent_proto_depIdxs, - EnumInfos: file_envoy_type_v3_percent_proto_enumTypes, - MessageInfos: file_envoy_type_v3_percent_proto_msgTypes, - }.Build() - File_envoy_type_v3_percent_proto = out.File - file_envoy_type_v3_percent_proto_rawDesc = nil - file_envoy_type_v3_percent_proto_goTypes = nil - file_envoy_type_v3_percent_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/percent.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/percent.pb.validate.go deleted file mode 100644 index 25a5815f098..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/percent.pb.validate.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/v3/percent.proto - -package typev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Percent with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Percent) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Percent with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in PercentMultiError, or nil if none found. -func (m *Percent) ValidateAll() error { - return m.validate(true) -} - -func (m *Percent) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if val := m.GetValue(); val < 0 || val > 100 { - err := PercentValidationError{ - field: "Value", - reason: "value must be inside range [0, 100]", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return PercentMultiError(errors) - } - - return nil -} - -// PercentMultiError is an error wrapping multiple validation errors returned -// by Percent.ValidateAll() if the designated constraints aren't met. -type PercentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PercentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PercentMultiError) AllErrors() []error { return m } - -// PercentValidationError is the validation error returned by Percent.Validate -// if the designated constraints aren't met. -type PercentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PercentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PercentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PercentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PercentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PercentValidationError) ErrorName() string { return "PercentValidationError" } - -// Error satisfies the builtin error interface -func (e PercentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPercent.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PercentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PercentValidationError{} - -// Validate checks the field values on FractionalPercent with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *FractionalPercent) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FractionalPercent with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FractionalPercentMultiError, or nil if none found. -func (m *FractionalPercent) ValidateAll() error { - return m.validate(true) -} - -func (m *FractionalPercent) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Numerator - - if _, ok := FractionalPercent_DenominatorType_name[int32(m.GetDenominator())]; !ok { - err := FractionalPercentValidationError{ - field: "Denominator", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return FractionalPercentMultiError(errors) - } - - return nil -} - -// FractionalPercentMultiError is an error wrapping multiple validation errors -// returned by FractionalPercent.ValidateAll() if the designated constraints -// aren't met. -type FractionalPercentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FractionalPercentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FractionalPercentMultiError) AllErrors() []error { return m } - -// FractionalPercentValidationError is the validation error returned by -// FractionalPercent.Validate if the designated constraints aren't met. -type FractionalPercentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FractionalPercentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FractionalPercentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FractionalPercentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FractionalPercentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FractionalPercentValidationError) ErrorName() string { - return "FractionalPercentValidationError" -} - -// Error satisfies the builtin error interface -func (e FractionalPercentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFractionalPercent.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FractionalPercentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FractionalPercentValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/range.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/range.pb.go deleted file mode 100644 index 4a751863a60..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/range.pb.go +++ /dev/null @@ -1,329 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/v3/range.proto - -package typev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Specifies the int64 start and end of the range using half-open interval semantics [start, -// end). -type Int64Range struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // start of the range (inclusive) - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` - // end of the range (exclusive) - End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` -} - -func (x *Int64Range) Reset() { - *x = Int64Range{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_range_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int64Range) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int64Range) ProtoMessage() {} - -func (x *Int64Range) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_range_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int64Range.ProtoReflect.Descriptor instead. -func (*Int64Range) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_range_proto_rawDescGZIP(), []int{0} -} - -func (x *Int64Range) GetStart() int64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *Int64Range) GetEnd() int64 { - if x != nil { - return x.End - } - return 0 -} - -// Specifies the int32 start and end of the range using half-open interval semantics [start, -// end). -type Int32Range struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // start of the range (inclusive) - Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` - // end of the range (exclusive) - End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` -} - -func (x *Int32Range) Reset() { - *x = Int32Range{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_range_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int32Range) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int32Range) ProtoMessage() {} - -func (x *Int32Range) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_range_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int32Range.ProtoReflect.Descriptor instead. -func (*Int32Range) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_range_proto_rawDescGZIP(), []int{1} -} - -func (x *Int32Range) GetStart() int32 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *Int32Range) GetEnd() int32 { - if x != nil { - return x.End - } - return 0 -} - -// Specifies the double start and end of the range using half-open interval semantics [start, -// end). -type DoubleRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // start of the range (inclusive) - Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"` - // end of the range (exclusive) - End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"` -} - -func (x *DoubleRange) Reset() { - *x = DoubleRange{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_range_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoubleRange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoubleRange) ProtoMessage() {} - -func (x *DoubleRange) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_range_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoubleRange.ProtoReflect.Descriptor instead. -func (*DoubleRange) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_range_proto_rawDescGZIP(), []int{2} -} - -func (x *DoubleRange) GetStart() float64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *DoubleRange) GetEnd() float64 { - if x != nil { - return x.End - } - return 0 -} - -var File_envoy_type_v3_range_proto protoreflect.FileDescriptor - -var file_envoy_type_v3_range_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x52, 0x0a, 0x0a, - 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, - 0x6e, 0x64, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x22, 0x52, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x22, 0x54, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x3a, 0x1d, 0x9a, 0xc5, 0x88, - 0x1e, 0x18, 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, - 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x70, 0x0a, 0x1b, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, - 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, - 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_v3_range_proto_rawDescOnce sync.Once - file_envoy_type_v3_range_proto_rawDescData = file_envoy_type_v3_range_proto_rawDesc -) - -func file_envoy_type_v3_range_proto_rawDescGZIP() []byte { - file_envoy_type_v3_range_proto_rawDescOnce.Do(func() { - file_envoy_type_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_range_proto_rawDescData) - }) - return file_envoy_type_v3_range_proto_rawDescData -} - -var file_envoy_type_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_type_v3_range_proto_goTypes = []interface{}{ - (*Int64Range)(nil), // 0: envoy.type.v3.Int64Range - (*Int32Range)(nil), // 1: envoy.type.v3.Int32Range - (*DoubleRange)(nil), // 2: envoy.type.v3.DoubleRange -} -var file_envoy_type_v3_range_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_type_v3_range_proto_init() } -func file_envoy_type_v3_range_proto_init() { - if File_envoy_type_v3_range_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int64Range); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int32Range); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoubleRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_v3_range_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_v3_range_proto_goTypes, - DependencyIndexes: file_envoy_type_v3_range_proto_depIdxs, - MessageInfos: file_envoy_type_v3_range_proto_msgTypes, - }.Build() - File_envoy_type_v3_range_proto = out.File - file_envoy_type_v3_range_proto_rawDesc = nil - file_envoy_type_v3_range_proto_goTypes = nil - file_envoy_type_v3_range_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/range.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/range.pb.validate.go deleted file mode 100644 index b6a0f4ef58f..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/range.pb.validate.go +++ /dev/null @@ -1,345 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/v3/range.proto - -package typev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Int64Range with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Int64Range) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Int64Range with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in Int64RangeMultiError, or -// nil if none found. -func (m *Int64Range) ValidateAll() error { - return m.validate(true) -} - -func (m *Int64Range) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Start - - // no validation rules for End - - if len(errors) > 0 { - return Int64RangeMultiError(errors) - } - - return nil -} - -// Int64RangeMultiError is an error wrapping multiple validation errors -// returned by Int64Range.ValidateAll() if the designated constraints aren't met. -type Int64RangeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Int64RangeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Int64RangeMultiError) AllErrors() []error { return m } - -// Int64RangeValidationError is the validation error returned by -// Int64Range.Validate if the designated constraints aren't met. -type Int64RangeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Int64RangeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Int64RangeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Int64RangeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Int64RangeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Int64RangeValidationError) ErrorName() string { return "Int64RangeValidationError" } - -// Error satisfies the builtin error interface -func (e Int64RangeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInt64Range.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Int64RangeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Int64RangeValidationError{} - -// Validate checks the field values on Int32Range with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Int32Range) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Int32Range with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in Int32RangeMultiError, or -// nil if none found. -func (m *Int32Range) ValidateAll() error { - return m.validate(true) -} - -func (m *Int32Range) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Start - - // no validation rules for End - - if len(errors) > 0 { - return Int32RangeMultiError(errors) - } - - return nil -} - -// Int32RangeMultiError is an error wrapping multiple validation errors -// returned by Int32Range.ValidateAll() if the designated constraints aren't met. -type Int32RangeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Int32RangeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Int32RangeMultiError) AllErrors() []error { return m } - -// Int32RangeValidationError is the validation error returned by -// Int32Range.Validate if the designated constraints aren't met. -type Int32RangeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Int32RangeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Int32RangeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Int32RangeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Int32RangeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Int32RangeValidationError) ErrorName() string { return "Int32RangeValidationError" } - -// Error satisfies the builtin error interface -func (e Int32RangeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInt32Range.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Int32RangeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Int32RangeValidationError{} - -// Validate checks the field values on DoubleRange with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DoubleRange) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DoubleRange with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DoubleRangeMultiError, or -// nil if none found. -func (m *DoubleRange) ValidateAll() error { - return m.validate(true) -} - -func (m *DoubleRange) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Start - - // no validation rules for End - - if len(errors) > 0 { - return DoubleRangeMultiError(errors) - } - - return nil -} - -// DoubleRangeMultiError is an error wrapping multiple validation errors -// returned by DoubleRange.ValidateAll() if the designated constraints aren't met. -type DoubleRangeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DoubleRangeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DoubleRangeMultiError) AllErrors() []error { return m } - -// DoubleRangeValidationError is the validation error returned by -// DoubleRange.Validate if the designated constraints aren't met. -type DoubleRangeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DoubleRangeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DoubleRangeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DoubleRangeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DoubleRangeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DoubleRangeValidationError) ErrorName() string { return "DoubleRangeValidationError" } - -// Error satisfies the builtin error interface -func (e DoubleRangeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDoubleRange.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DoubleRangeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DoubleRangeValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_strategy.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_strategy.pb.go deleted file mode 100644 index 9f82bfa8508..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_strategy.pb.go +++ /dev/null @@ -1,412 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/v3/ratelimit_strategy.proto - -package typev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/cncf/xds/go/xds/annotations/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Choose between allow all and deny all. -type RateLimitStrategy_BlanketRule int32 - -const ( - RateLimitStrategy_ALLOW_ALL RateLimitStrategy_BlanketRule = 0 - RateLimitStrategy_DENY_ALL RateLimitStrategy_BlanketRule = 1 -) - -// Enum value maps for RateLimitStrategy_BlanketRule. -var ( - RateLimitStrategy_BlanketRule_name = map[int32]string{ - 0: "ALLOW_ALL", - 1: "DENY_ALL", - } - RateLimitStrategy_BlanketRule_value = map[string]int32{ - "ALLOW_ALL": 0, - "DENY_ALL": 1, - } -) - -func (x RateLimitStrategy_BlanketRule) Enum() *RateLimitStrategy_BlanketRule { - p := new(RateLimitStrategy_BlanketRule) - *p = x - return p -} - -func (x RateLimitStrategy_BlanketRule) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RateLimitStrategy_BlanketRule) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_type_v3_ratelimit_strategy_proto_enumTypes[0].Descriptor() -} - -func (RateLimitStrategy_BlanketRule) Type() protoreflect.EnumType { - return &file_envoy_type_v3_ratelimit_strategy_proto_enumTypes[0] -} - -func (x RateLimitStrategy_BlanketRule) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RateLimitStrategy_BlanketRule.Descriptor instead. -func (RateLimitStrategy_BlanketRule) EnumDescriptor() ([]byte, []int) { - return file_envoy_type_v3_ratelimit_strategy_proto_rawDescGZIP(), []int{0, 0} -} - -type RateLimitStrategy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Strategy: - // - // *RateLimitStrategy_BlanketRule_ - // *RateLimitStrategy_RequestsPerTimeUnit_ - // *RateLimitStrategy_TokenBucket - Strategy isRateLimitStrategy_Strategy `protobuf_oneof:"strategy"` -} - -func (x *RateLimitStrategy) Reset() { - *x = RateLimitStrategy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitStrategy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitStrategy) ProtoMessage() {} - -func (x *RateLimitStrategy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimitStrategy.ProtoReflect.Descriptor instead. -func (*RateLimitStrategy) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_ratelimit_strategy_proto_rawDescGZIP(), []int{0} -} - -func (m *RateLimitStrategy) GetStrategy() isRateLimitStrategy_Strategy { - if m != nil { - return m.Strategy - } - return nil -} - -func (x *RateLimitStrategy) GetBlanketRule() RateLimitStrategy_BlanketRule { - if x, ok := x.GetStrategy().(*RateLimitStrategy_BlanketRule_); ok { - return x.BlanketRule - } - return RateLimitStrategy_ALLOW_ALL -} - -func (x *RateLimitStrategy) GetRequestsPerTimeUnit() *RateLimitStrategy_RequestsPerTimeUnit { - if x, ok := x.GetStrategy().(*RateLimitStrategy_RequestsPerTimeUnit_); ok { - return x.RequestsPerTimeUnit - } - return nil -} - -func (x *RateLimitStrategy) GetTokenBucket() *TokenBucket { - if x, ok := x.GetStrategy().(*RateLimitStrategy_TokenBucket); ok { - return x.TokenBucket - } - return nil -} - -type isRateLimitStrategy_Strategy interface { - isRateLimitStrategy_Strategy() -} - -type RateLimitStrategy_BlanketRule_ struct { - // Allow or Deny the requests. - // If unset, allow all. - BlanketRule RateLimitStrategy_BlanketRule `protobuf:"varint,1,opt,name=blanket_rule,json=blanketRule,proto3,enum=envoy.type.v3.RateLimitStrategy_BlanketRule,oneof"` -} - -type RateLimitStrategy_RequestsPerTimeUnit_ struct { - // Best-effort limit of the number of requests per time unit, f.e. requests per second. - // Does not prescribe any specific rate limiting algorithm, see :ref:`RequestsPerTimeUnit - // ` for details. - RequestsPerTimeUnit *RateLimitStrategy_RequestsPerTimeUnit `protobuf:"bytes,2,opt,name=requests_per_time_unit,json=requestsPerTimeUnit,proto3,oneof"` -} - -type RateLimitStrategy_TokenBucket struct { - // Limit the requests by consuming tokens from the Token Bucket. - // Allow the same number of requests as the number of tokens available in - // the token bucket. - TokenBucket *TokenBucket `protobuf:"bytes,3,opt,name=token_bucket,json=tokenBucket,proto3,oneof"` -} - -func (*RateLimitStrategy_BlanketRule_) isRateLimitStrategy_Strategy() {} - -func (*RateLimitStrategy_RequestsPerTimeUnit_) isRateLimitStrategy_Strategy() {} - -func (*RateLimitStrategy_TokenBucket) isRateLimitStrategy_Strategy() {} - -// Best-effort limit of the number of requests per time unit. -// -// Allows to specify the desired requests per second (RPS, QPS), requests per minute (QPM, RPM), -// etc., without specifying a rate limiting algorithm implementation. -// -// “RequestsPerTimeUnit“ strategy does not demand any specific rate limiting algorithm to be -// used (in contrast to the :ref:`TokenBucket `, -// for example). It implies that the implementation details of rate limiting algorithm are -// irrelevant as long as the configured number of "requests per time unit" is achieved. -// -// Note that the “TokenBucket“ is still a valid implementation of the “RequestsPerTimeUnit“ -// strategy, and may be chosen to enforce the rate limit. However, there's no guarantee it will be -// the “TokenBucket“ in particular, and not the Leaky Bucket, the Sliding Window, or any other -// rate limiting algorithm that fulfills the requirements. -type RateLimitStrategy_RequestsPerTimeUnit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The desired number of requests per :ref:`time_unit - // ` to allow. - // If set to “0“, deny all (equivalent to “BlanketRule.DENY_ALL“). - // - // .. note:: - // - // Note that the algorithm implementation determines the course of action for the requests - // over the limit. As long as the ``requests_per_time_unit`` converges on the desired value, - // it's allowed to treat this field as a soft-limit: allow bursts, redistribute the allowance - // over time, etc. - RequestsPerTimeUnit uint64 `protobuf:"varint,1,opt,name=requests_per_time_unit,json=requestsPerTimeUnit,proto3" json:"requests_per_time_unit,omitempty"` - // The unit of time. Ignored when :ref:`requests_per_time_unit - // ` - // is “0“ (deny all). - TimeUnit RateLimitUnit `protobuf:"varint,2,opt,name=time_unit,json=timeUnit,proto3,enum=envoy.type.v3.RateLimitUnit" json:"time_unit,omitempty"` -} - -func (x *RateLimitStrategy_RequestsPerTimeUnit) Reset() { - *x = RateLimitStrategy_RequestsPerTimeUnit{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitStrategy_RequestsPerTimeUnit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitStrategy_RequestsPerTimeUnit) ProtoMessage() {} - -func (x *RateLimitStrategy_RequestsPerTimeUnit) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimitStrategy_RequestsPerTimeUnit.ProtoReflect.Descriptor instead. -func (*RateLimitStrategy_RequestsPerTimeUnit) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_ratelimit_strategy_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *RateLimitStrategy_RequestsPerTimeUnit) GetRequestsPerTimeUnit() uint64 { - if x != nil { - return x.RequestsPerTimeUnit - } - return 0 -} - -func (x *RateLimitStrategy_RequestsPerTimeUnit) GetTimeUnit() RateLimitUnit { - if x != nil { - return x.TimeUnit - } - return RateLimitUnit_UNKNOWN -} - -var File_envoy_type_v3_ratelimit_strategy_proto protoreflect.FileDescriptor - -var file_envoy_type_v3_ratelimit_strategy_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, - 0x67, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, - 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, - 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x03, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x5b, 0x0a, 0x0c, - 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x74, 0x72, 0x61, - 0x74, 0x65, 0x67, 0x79, 0x2e, 0x42, 0x6c, 0x61, 0x6e, 0x6b, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x6c, - 0x61, 0x6e, 0x6b, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x6b, 0x0a, 0x16, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, - 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x48, - 0x00, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x54, 0x69, - 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x1a, 0x8f, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12, - 0x33, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, - 0x55, 0x6e, 0x69, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x69, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x55, 0x6e, 0x69, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x08, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x22, 0x2a, 0x0a, 0x0b, 0x42, 0x6c, 0x61, - 0x6e, 0x6b, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4c, 0x4c, 0x4f, - 0x57, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4e, 0x59, 0x5f, - 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x42, 0x0f, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, - 0x79, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x84, 0x01, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_v3_ratelimit_strategy_proto_rawDescOnce sync.Once - file_envoy_type_v3_ratelimit_strategy_proto_rawDescData = file_envoy_type_v3_ratelimit_strategy_proto_rawDesc -) - -func file_envoy_type_v3_ratelimit_strategy_proto_rawDescGZIP() []byte { - file_envoy_type_v3_ratelimit_strategy_proto_rawDescOnce.Do(func() { - file_envoy_type_v3_ratelimit_strategy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_ratelimit_strategy_proto_rawDescData) - }) - return file_envoy_type_v3_ratelimit_strategy_proto_rawDescData -} - -var file_envoy_type_v3_ratelimit_strategy_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_type_v3_ratelimit_strategy_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_type_v3_ratelimit_strategy_proto_goTypes = []interface{}{ - (RateLimitStrategy_BlanketRule)(0), // 0: envoy.type.v3.RateLimitStrategy.BlanketRule - (*RateLimitStrategy)(nil), // 1: envoy.type.v3.RateLimitStrategy - (*RateLimitStrategy_RequestsPerTimeUnit)(nil), // 2: envoy.type.v3.RateLimitStrategy.RequestsPerTimeUnit - (*TokenBucket)(nil), // 3: envoy.type.v3.TokenBucket - (RateLimitUnit)(0), // 4: envoy.type.v3.RateLimitUnit -} -var file_envoy_type_v3_ratelimit_strategy_proto_depIdxs = []int32{ - 0, // 0: envoy.type.v3.RateLimitStrategy.blanket_rule:type_name -> envoy.type.v3.RateLimitStrategy.BlanketRule - 2, // 1: envoy.type.v3.RateLimitStrategy.requests_per_time_unit:type_name -> envoy.type.v3.RateLimitStrategy.RequestsPerTimeUnit - 3, // 2: envoy.type.v3.RateLimitStrategy.token_bucket:type_name -> envoy.type.v3.TokenBucket - 4, // 3: envoy.type.v3.RateLimitStrategy.RequestsPerTimeUnit.time_unit:type_name -> envoy.type.v3.RateLimitUnit - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_envoy_type_v3_ratelimit_strategy_proto_init() } -func file_envoy_type_v3_ratelimit_strategy_proto_init() { - if File_envoy_type_v3_ratelimit_strategy_proto != nil { - return - } - file_envoy_type_v3_ratelimit_unit_proto_init() - file_envoy_type_v3_token_bucket_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitStrategy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitStrategy_RequestsPerTimeUnit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*RateLimitStrategy_BlanketRule_)(nil), - (*RateLimitStrategy_RequestsPerTimeUnit_)(nil), - (*RateLimitStrategy_TokenBucket)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_v3_ratelimit_strategy_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_v3_ratelimit_strategy_proto_goTypes, - DependencyIndexes: file_envoy_type_v3_ratelimit_strategy_proto_depIdxs, - EnumInfos: file_envoy_type_v3_ratelimit_strategy_proto_enumTypes, - MessageInfos: file_envoy_type_v3_ratelimit_strategy_proto_msgTypes, - }.Build() - File_envoy_type_v3_ratelimit_strategy_proto = out.File - file_envoy_type_v3_ratelimit_strategy_proto_rawDesc = nil - file_envoy_type_v3_ratelimit_strategy_proto_goTypes = nil - file_envoy_type_v3_ratelimit_strategy_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_strategy.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_strategy.pb.validate.go deleted file mode 100644 index 1d22adb0982..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_strategy.pb.validate.go +++ /dev/null @@ -1,380 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/v3/ratelimit_strategy.proto - -package typev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on RateLimitStrategy with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *RateLimitStrategy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimitStrategy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RateLimitStrategyMultiError, or nil if none found. -func (m *RateLimitStrategy) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitStrategy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofStrategyPresent := false - switch v := m.Strategy.(type) { - case *RateLimitStrategy_BlanketRule_: - if v == nil { - err := RateLimitStrategyValidationError{ - field: "Strategy", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofStrategyPresent = true - - if _, ok := RateLimitStrategy_BlanketRule_name[int32(m.GetBlanketRule())]; !ok { - err := RateLimitStrategyValidationError{ - field: "BlanketRule", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RateLimitStrategy_RequestsPerTimeUnit_: - if v == nil { - err := RateLimitStrategyValidationError{ - field: "Strategy", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofStrategyPresent = true - - if all { - switch v := interface{}(m.GetRequestsPerTimeUnit()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitStrategyValidationError{ - field: "RequestsPerTimeUnit", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitStrategyValidationError{ - field: "RequestsPerTimeUnit", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequestsPerTimeUnit()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitStrategyValidationError{ - field: "RequestsPerTimeUnit", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimitStrategy_TokenBucket: - if v == nil { - err := RateLimitStrategyValidationError{ - field: "Strategy", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofStrategyPresent = true - - if all { - switch v := interface{}(m.GetTokenBucket()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitStrategyValidationError{ - field: "TokenBucket", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitStrategyValidationError{ - field: "TokenBucket", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTokenBucket()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitStrategyValidationError{ - field: "TokenBucket", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofStrategyPresent { - err := RateLimitStrategyValidationError{ - field: "Strategy", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RateLimitStrategyMultiError(errors) - } - - return nil -} - -// RateLimitStrategyMultiError is an error wrapping multiple validation errors -// returned by RateLimitStrategy.ValidateAll() if the designated constraints -// aren't met. -type RateLimitStrategyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitStrategyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitStrategyMultiError) AllErrors() []error { return m } - -// RateLimitStrategyValidationError is the validation error returned by -// RateLimitStrategy.Validate if the designated constraints aren't met. -type RateLimitStrategyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitStrategyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitStrategyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitStrategyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitStrategyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitStrategyValidationError) ErrorName() string { - return "RateLimitStrategyValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitStrategyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitStrategy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitStrategyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitStrategyValidationError{} - -// Validate checks the field values on RateLimitStrategy_RequestsPerTimeUnit -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *RateLimitStrategy_RequestsPerTimeUnit) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimitStrategy_RequestsPerTimeUnit -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RateLimitStrategy_RequestsPerTimeUnitMultiError, or nil if none found. -func (m *RateLimitStrategy_RequestsPerTimeUnit) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitStrategy_RequestsPerTimeUnit) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for RequestsPerTimeUnit - - if _, ok := RateLimitUnit_name[int32(m.GetTimeUnit())]; !ok { - err := RateLimitStrategy_RequestsPerTimeUnitValidationError{ - field: "TimeUnit", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RateLimitStrategy_RequestsPerTimeUnitMultiError(errors) - } - - return nil -} - -// RateLimitStrategy_RequestsPerTimeUnitMultiError is an error wrapping -// multiple validation errors returned by -// RateLimitStrategy_RequestsPerTimeUnit.ValidateAll() if the designated -// constraints aren't met. -type RateLimitStrategy_RequestsPerTimeUnitMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitStrategy_RequestsPerTimeUnitMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitStrategy_RequestsPerTimeUnitMultiError) AllErrors() []error { return m } - -// RateLimitStrategy_RequestsPerTimeUnitValidationError is the validation error -// returned by RateLimitStrategy_RequestsPerTimeUnit.Validate if the -// designated constraints aren't met. -type RateLimitStrategy_RequestsPerTimeUnitValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) ErrorName() string { - return "RateLimitStrategy_RequestsPerTimeUnitValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitStrategy_RequestsPerTimeUnit.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitStrategy_RequestsPerTimeUnitValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitStrategy_RequestsPerTimeUnitValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_unit.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_unit.pb.go deleted file mode 100644 index cffbf6539fa..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_unit.pb.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/v3/ratelimit_unit.proto - -package typev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Identifies the unit of of time for rate limit. -type RateLimitUnit int32 - -const ( - // The time unit is not known. - RateLimitUnit_UNKNOWN RateLimitUnit = 0 - // The time unit representing a second. - RateLimitUnit_SECOND RateLimitUnit = 1 - // The time unit representing a minute. - RateLimitUnit_MINUTE RateLimitUnit = 2 - // The time unit representing an hour. - RateLimitUnit_HOUR RateLimitUnit = 3 - // The time unit representing a day. - RateLimitUnit_DAY RateLimitUnit = 4 - // The time unit representing a month. - RateLimitUnit_MONTH RateLimitUnit = 5 - // The time unit representing a year. - RateLimitUnit_YEAR RateLimitUnit = 6 -) - -// Enum value maps for RateLimitUnit. -var ( - RateLimitUnit_name = map[int32]string{ - 0: "UNKNOWN", - 1: "SECOND", - 2: "MINUTE", - 3: "HOUR", - 4: "DAY", - 5: "MONTH", - 6: "YEAR", - } - RateLimitUnit_value = map[string]int32{ - "UNKNOWN": 0, - "SECOND": 1, - "MINUTE": 2, - "HOUR": 3, - "DAY": 4, - "MONTH": 5, - "YEAR": 6, - } -) - -func (x RateLimitUnit) Enum() *RateLimitUnit { - p := new(RateLimitUnit) - *p = x - return p -} - -func (x RateLimitUnit) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RateLimitUnit) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_type_v3_ratelimit_unit_proto_enumTypes[0].Descriptor() -} - -func (RateLimitUnit) Type() protoreflect.EnumType { - return &file_envoy_type_v3_ratelimit_unit_proto_enumTypes[0] -} - -func (x RateLimitUnit) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RateLimitUnit.Descriptor instead. -func (RateLimitUnit) EnumDescriptor() ([]byte, []int) { - return file_envoy_type_v3_ratelimit_unit_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_type_v3_ratelimit_unit_proto protoreflect.FileDescriptor - -var file_envoy_type_v3_ratelimit_unit_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2a, 0x5c, 0x0a, 0x0d, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x55, - 0x6e, 0x69, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 0x52, - 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x4d, - 0x4f, 0x4e, 0x54, 0x48, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x59, 0x45, 0x41, 0x52, 0x10, 0x06, - 0x42, 0x78, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, - 0x12, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x55, 0x6e, 0x69, 0x74, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, - 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_type_v3_ratelimit_unit_proto_rawDescOnce sync.Once - file_envoy_type_v3_ratelimit_unit_proto_rawDescData = file_envoy_type_v3_ratelimit_unit_proto_rawDesc -) - -func file_envoy_type_v3_ratelimit_unit_proto_rawDescGZIP() []byte { - file_envoy_type_v3_ratelimit_unit_proto_rawDescOnce.Do(func() { - file_envoy_type_v3_ratelimit_unit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_ratelimit_unit_proto_rawDescData) - }) - return file_envoy_type_v3_ratelimit_unit_proto_rawDescData -} - -var file_envoy_type_v3_ratelimit_unit_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_type_v3_ratelimit_unit_proto_goTypes = []interface{}{ - (RateLimitUnit)(0), // 0: envoy.type.v3.RateLimitUnit -} -var file_envoy_type_v3_ratelimit_unit_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_type_v3_ratelimit_unit_proto_init() } -func file_envoy_type_v3_ratelimit_unit_proto_init() { - if File_envoy_type_v3_ratelimit_unit_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_v3_ratelimit_unit_proto_rawDesc, - NumEnums: 1, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_v3_ratelimit_unit_proto_goTypes, - DependencyIndexes: file_envoy_type_v3_ratelimit_unit_proto_depIdxs, - EnumInfos: file_envoy_type_v3_ratelimit_unit_proto_enumTypes, - }.Build() - File_envoy_type_v3_ratelimit_unit_proto = out.File - file_envoy_type_v3_ratelimit_unit_proto_rawDesc = nil - file_envoy_type_v3_ratelimit_unit_proto_goTypes = nil - file_envoy_type_v3_ratelimit_unit_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_unit.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_unit.pb.validate.go deleted file mode 100644 index 472396797be..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/ratelimit_unit.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/v3/ratelimit_unit.proto - -package typev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/semantic_version.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/semantic_version.pb.go deleted file mode 100644 index c343d9ef0a1..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/semantic_version.pb.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/v3/semantic_version.proto - -package typev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Envoy uses SemVer (https://semver.org/). Major/minor versions indicate -// expected behaviors and APIs, the patch version field is used only -// for security fixes and can be generally ignored. -type SemanticVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MajorNumber uint32 `protobuf:"varint,1,opt,name=major_number,json=majorNumber,proto3" json:"major_number,omitempty"` - MinorNumber uint32 `protobuf:"varint,2,opt,name=minor_number,json=minorNumber,proto3" json:"minor_number,omitempty"` - Patch uint32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"` -} - -func (x *SemanticVersion) Reset() { - *x = SemanticVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_semantic_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SemanticVersion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SemanticVersion) ProtoMessage() {} - -func (x *SemanticVersion) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_semantic_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SemanticVersion.ProtoReflect.Descriptor instead. -func (*SemanticVersion) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_semantic_version_proto_rawDescGZIP(), []int{0} -} - -func (x *SemanticVersion) GetMajorNumber() uint32 { - if x != nil { - return x.MajorNumber - } - return 0 -} - -func (x *SemanticVersion) GetMinorNumber() uint32 { - if x != nil { - return x.MinorNumber - } - return 0 -} - -func (x *SemanticVersion) GetPatch() uint32 { - if x != nil { - return x.Patch - } - return 0 -} - -var File_envoy_type_v3_semantic_version_proto protoreflect.FileDescriptor - -var file_envoy_type_v3_semantic_version_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x6d, 0x61, - 0x6e, 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, - 0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0b, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, - 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, - 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x7a, 0x0a, 0x1b, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x53, 0x65, 0x6d, 0x61, 0x6e, - 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_v3_semantic_version_proto_rawDescOnce sync.Once - file_envoy_type_v3_semantic_version_proto_rawDescData = file_envoy_type_v3_semantic_version_proto_rawDesc -) - -func file_envoy_type_v3_semantic_version_proto_rawDescGZIP() []byte { - file_envoy_type_v3_semantic_version_proto_rawDescOnce.Do(func() { - file_envoy_type_v3_semantic_version_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_semantic_version_proto_rawDescData) - }) - return file_envoy_type_v3_semantic_version_proto_rawDescData -} - -var file_envoy_type_v3_semantic_version_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_type_v3_semantic_version_proto_goTypes = []interface{}{ - (*SemanticVersion)(nil), // 0: envoy.type.v3.SemanticVersion -} -var file_envoy_type_v3_semantic_version_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_type_v3_semantic_version_proto_init() } -func file_envoy_type_v3_semantic_version_proto_init() { - if File_envoy_type_v3_semantic_version_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_v3_semantic_version_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SemanticVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_v3_semantic_version_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_v3_semantic_version_proto_goTypes, - DependencyIndexes: file_envoy_type_v3_semantic_version_proto_depIdxs, - MessageInfos: file_envoy_type_v3_semantic_version_proto_msgTypes, - }.Build() - File_envoy_type_v3_semantic_version_proto = out.File - file_envoy_type_v3_semantic_version_proto_rawDesc = nil - file_envoy_type_v3_semantic_version_proto_goTypes = nil - file_envoy_type_v3_semantic_version_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/semantic_version.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/semantic_version.pb.validate.go deleted file mode 100644 index e0db1e39d25..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/semantic_version.pb.validate.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/v3/semantic_version.proto - -package typev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on SemanticVersion with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *SemanticVersion) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SemanticVersion with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SemanticVersionMultiError, or nil if none found. -func (m *SemanticVersion) ValidateAll() error { - return m.validate(true) -} - -func (m *SemanticVersion) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for MajorNumber - - // no validation rules for MinorNumber - - // no validation rules for Patch - - if len(errors) > 0 { - return SemanticVersionMultiError(errors) - } - - return nil -} - -// SemanticVersionMultiError is an error wrapping multiple validation errors -// returned by SemanticVersion.ValidateAll() if the designated constraints -// aren't met. -type SemanticVersionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SemanticVersionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SemanticVersionMultiError) AllErrors() []error { return m } - -// SemanticVersionValidationError is the validation error returned by -// SemanticVersion.Validate if the designated constraints aren't met. -type SemanticVersionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SemanticVersionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SemanticVersionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SemanticVersionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SemanticVersionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SemanticVersionValidationError) ErrorName() string { return "SemanticVersionValidationError" } - -// Error satisfies the builtin error interface -func (e SemanticVersionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSemanticVersion.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SemanticVersionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SemanticVersionValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/token_bucket.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/token_bucket.pb.go deleted file mode 100644 index d2f15ab08de..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/token_bucket.pb.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v4.23.1 -// source: envoy/type/v3/token_bucket.proto - -package typev3 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Configures a token bucket, typically used for rate limiting. -type TokenBucket struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket - // initially contains. - MaxTokens uint32 `protobuf:"varint,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` - // The number of tokens added to the bucket during each fill interval. If not specified, defaults - // to a single token. - TokensPerFill *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=tokens_per_fill,json=tokensPerFill,proto3" json:"tokens_per_fill,omitempty"` - // The fill interval that tokens are added to the bucket. During each fill interval - // “tokens_per_fill“ are added to the bucket. The bucket will never contain more than - // “max_tokens“ tokens. - FillInterval *durationpb.Duration `protobuf:"bytes,3,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"` -} - -func (x *TokenBucket) Reset() { - *x = TokenBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_v3_token_bucket_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TokenBucket) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TokenBucket) ProtoMessage() {} - -func (x *TokenBucket) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_v3_token_bucket_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TokenBucket.ProtoReflect.Descriptor instead. -func (*TokenBucket) Descriptor() ([]byte, []int) { - return file_envoy_type_v3_token_bucket_proto_rawDescGZIP(), []int{0} -} - -func (x *TokenBucket) GetMaxTokens() uint32 { - if x != nil { - return x.MaxTokens - } - return 0 -} - -func (x *TokenBucket) GetTokensPerFill() *wrapperspb.UInt32Value { - if x != nil { - return x.TokensPerFill - } - return nil -} - -func (x *TokenBucket) GetFillInterval() *durationpb.Duration { - if x != nil { - return x.FillInterval - } - return nil -} - -var File_envoy_type_v3_token_bucket_proto protoreflect.FileDescriptor - -var file_envoy_type_v3_token_bucket_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, - 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x01, 0x0a, - 0x0b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x0a, 0x0a, - 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x70, - 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x50, 0x65, 0x72, 0x46, - 0x69, 0x6c, 0x6c, 0x12, 0x4a, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, - 0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, - 0x1d, 0x9a, 0xc5, 0x88, 0x1e, 0x18, 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x76, - 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_v3_token_bucket_proto_rawDescOnce sync.Once - file_envoy_type_v3_token_bucket_proto_rawDescData = file_envoy_type_v3_token_bucket_proto_rawDesc -) - -func file_envoy_type_v3_token_bucket_proto_rawDescGZIP() []byte { - file_envoy_type_v3_token_bucket_proto_rawDescOnce.Do(func() { - file_envoy_type_v3_token_bucket_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_token_bucket_proto_rawDescData) - }) - return file_envoy_type_v3_token_bucket_proto_rawDescData -} - -var file_envoy_type_v3_token_bucket_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_type_v3_token_bucket_proto_goTypes = []interface{}{ - (*TokenBucket)(nil), // 0: envoy.type.v3.TokenBucket - (*wrapperspb.UInt32Value)(nil), // 1: google.protobuf.UInt32Value - (*durationpb.Duration)(nil), // 2: google.protobuf.Duration -} -var file_envoy_type_v3_token_bucket_proto_depIdxs = []int32{ - 1, // 0: envoy.type.v3.TokenBucket.tokens_per_fill:type_name -> google.protobuf.UInt32Value - 2, // 1: envoy.type.v3.TokenBucket.fill_interval:type_name -> google.protobuf.Duration - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_type_v3_token_bucket_proto_init() } -func file_envoy_type_v3_token_bucket_proto_init() { - if File_envoy_type_v3_token_bucket_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_v3_token_bucket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TokenBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_v3_token_bucket_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_v3_token_bucket_proto_goTypes, - DependencyIndexes: file_envoy_type_v3_token_bucket_proto_depIdxs, - MessageInfos: file_envoy_type_v3_token_bucket_proto_msgTypes, - }.Build() - File_envoy_type_v3_token_bucket_proto = out.File - file_envoy_type_v3_token_bucket_proto_rawDesc = nil - file_envoy_type_v3_token_bucket_proto_goTypes = nil - file_envoy_type_v3_token_bucket_proto_depIdxs = nil -} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/v3/token_bucket.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/v3/token_bucket.pb.validate.go deleted file mode 100644 index dbc6448ac77..00000000000 --- a/vendor/github.com/cilium/proxy/go/envoy/type/v3/token_bucket.pb.validate.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/v3/token_bucket.proto - -package typev3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on TokenBucket with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *TokenBucket) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TokenBucket with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in TokenBucketMultiError, or -// nil if none found. -func (m *TokenBucket) ValidateAll() error { - return m.validate(true) -} - -func (m *TokenBucket) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetMaxTokens() <= 0 { - err := TokenBucketValidationError{ - field: "MaxTokens", - reason: "value must be greater than 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - if wrapper := m.GetTokensPerFill(); wrapper != nil { - - if wrapper.GetValue() <= 0 { - err := TokenBucketValidationError{ - field: "TokensPerFill", - reason: "value must be greater than 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if m.GetFillInterval() == nil { - err := TokenBucketValidationError{ - field: "FillInterval", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if d := m.GetFillInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = TokenBucketValidationError{ - field: "FillInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := TokenBucketValidationError{ - field: "FillInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if len(errors) > 0 { - return TokenBucketMultiError(errors) - } - - return nil -} - -// TokenBucketMultiError is an error wrapping multiple validation errors -// returned by TokenBucket.ValidateAll() if the designated constraints aren't met. -type TokenBucketMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TokenBucketMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TokenBucketMultiError) AllErrors() []error { return m } - -// TokenBucketValidationError is the validation error returned by -// TokenBucket.Validate if the designated constraints aren't met. -type TokenBucketValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TokenBucketValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TokenBucketValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TokenBucketValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TokenBucketValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TokenBucketValidationError) ErrorName() string { return "TokenBucketValidationError" } - -// Error satisfies the builtin error interface -func (e TokenBucketValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTokenBucket.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TokenBucketValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TokenBucketValidationError{} diff --git a/vendor/github.com/cilium/proxy/pkg/policy/api/kafka/doc.go b/vendor/github.com/cilium/proxy/pkg/policy/api/kafka/doc.go deleted file mode 100644 index d7f4fc0cae8..00000000000 --- a/vendor/github.com/cilium/proxy/pkg/policy/api/kafka/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// +k8s:openapi-gen=true -// +deepequal-gen=package - -// Package kafka defines the Kafka API of the Cilium network policy interface -// +groupName=policy -package kafka diff --git a/vendor/github.com/cilium/proxy/pkg/policy/api/kafka/kafka.go b/vendor/github.com/cilium/proxy/pkg/policy/api/kafka/kafka.go deleted file mode 100644 index 606701b7d8b..00000000000 --- a/vendor/github.com/cilium/proxy/pkg/policy/api/kafka/kafka.go +++ /dev/null @@ -1,318 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -package kafka - -import ( - "fmt" - "math" - "regexp" - "strconv" - "strings" -) - -// PortRule is a list of Kafka protocol constraints. All fields are -// optional, if all fields are empty or missing, the rule will match all -// Kafka messages. -type PortRule struct { - // Role is a case-insensitive string and describes a group of API keys - // necessary to perform certain higher-level Kafka operations such as "produce" - // or "consume". A Role automatically expands into all APIKeys required - // to perform the specified higher-level operation. - // - // The following values are supported: - // - "produce": Allow producing to the topics specified in the rule - // - "consume": Allow consuming from the topics specified in the rule - // - // This field is incompatible with the APIKey field, i.e APIKey and Role - // cannot both be specified in the same rule. - // - // If omitted or empty, and if APIKey is not specified, then all keys are - // allowed. - // - // +kubebuilder:validation:Enum=produce;consume - // +kubebuilder:validation:Optional - Role string `json:"role,omitempty"` - - // APIKey is a case-insensitive string matched against the key of a - // request, e.g. "produce", "fetch", "createtopic", "deletetopic", et al - // Reference: https://kafka.apache.org/protocol#protocol_api_keys - // - // If omitted or empty, and if Role is not specified, then all keys are allowed. - // - // +kubebuilder:validation:Optional - APIKey string `json:"apiKey,omitempty"` - - // APIVersion is the version matched against the api version of the - // Kafka message. If set, it has to be a string representing a positive - // integer. - // - // If omitted or empty, all versions are allowed. - // - // +kubebuilder:validation:Optional - APIVersion string `json:"apiVersion,omitempty"` - - // ClientID is the client identifier as provided in the request. - // - // From Kafka protocol documentation: - // This is a user supplied identifier for the client application. The - // user can use any identifier they like and it will be used when - // logging errors, monitoring aggregates, etc. For example, one might - // want to monitor not just the requests per second overall, but the - // number coming from each client application (each of which could - // reside on multiple servers). This id acts as a logical grouping - // across all requests from a particular client. - // - // If omitted or empty, all client identifiers are allowed. - // - // +kubebuilder:validation:Optional - ClientID string `json:"clientID,omitempty"` - - // Topic is the topic name contained in the message. If a Kafka request - // contains multiple topics, then all topics must be allowed or the - // message will be rejected. - // - // This constraint is ignored if the matched request message type - // doesn't contain any topic. Maximum size of Topic can be 249 - // characters as per recent Kafka spec and allowed characters are - // a-z, A-Z, 0-9, -, . and _. - // - // Older Kafka versions had longer topic lengths of 255, but in Kafka 0.10 - // version the length was changed from 255 to 249. For compatibility - // reasons we are using 255. - // - // If omitted or empty, all topics are allowed. - // - // +kubebuilder:validation:MaxLength=255 - // +kubebuilder:validation:Optional - Topic string `json:"topic,omitempty"` -} - -// List of Kafka apiKeys which have a topic in their -// request -const ( - ProduceKey = 0 - FetchKey = 1 - OffsetsKey = 2 - MetadataKey = 3 - LeaderAndIsr = 4 - StopReplica = 5 - UpdateMetadata = 6 - OffsetCommitKey = 8 - OffsetFetchKey = 9 - FindCoordinatorKey = 10 - JoinGroupKey = 11 - CreateTopicsKey = 19 - DeleteTopicsKey = 20 - DeleteRecordsKey = 21 - OffsetForLeaderEpochKey = 23 - AddPartitionsToTxnKey = 24 - WriteTxnMarkersKey = 27 - TxnOffsetCommitKey = 28 - AlterReplicaLogDirsKey = 34 - DescribeLogDirsKey = 35 - CreatePartitionsKey = 37 -) - -// List of Kafka apiKey which are not associated with -// any topic -const ( - HeartbeatKey = 12 - LeaveGroupKey = 13 - SyncgroupKey = 14 - APIVersionsKey = 18 -) - -// List of Kafka Roles -const ( - ProduceRole = "produce" - ConsumeRole = "consume" -) - -// APIKeyMap is the map of all allowed kafka API keys -// with the key values. -// Reference: https://kafka.apache.org/protocol#protocol_api_keys -var APIKeyMap = map[string]int16{ - "produce": 0, /* Produce */ - "fetch": 1, /* Fetch */ - "offsets": 2, /* Offsets */ - "metadata": 3, /* Metadata */ - "leaderandisr": 4, /* LeaderAndIsr */ - "stopreplica": 5, /* StopReplica */ - "updatemetadata": 6, /* UpdateMetadata */ - "controlledshutdown": 7, /* ControlledShutdown */ - "offsetcommit": 8, /* OffsetCommit */ - "offsetfetch": 9, /* OffsetFetch */ - "findcoordinator": 10, /* FindCoordinator */ - "joingroup": 11, /* JoinGroup */ - "heartbeat": 12, /* Heartbeat */ - "leavegroup": 13, /* LeaveGroup */ - "syncgroup": 14, /* SyncGroup */ - "describegroups": 15, /* DescribeGroups */ - "listgroups": 16, /* ListGroups */ - "saslhandshake": 17, /* SaslHandshake */ - "apiversions": 18, /* ApiVersions */ - "createtopics": 19, /* CreateTopics */ - "deletetopics": 20, /* DeleteTopics */ - "deleterecords": 21, /* DeleteRecords */ - "initproducerid": 22, /* InitProducerId */ - "offsetforleaderepoch": 23, /* OffsetForLeaderEpoch */ - "addpartitionstotxn": 24, /* AddPartitionsToTxn */ - "addoffsetstotxn": 25, /* AddOffsetsToTxn */ - "endtxn": 26, /* EndTxn */ - "writetxnmarkers": 27, /* WriteTxnMarkers */ - "txnoffsetcommit": 28, /* TxnOffsetCommit */ - "describeacls": 29, /* DescribeAcls */ - "createacls": 30, /* CreateAcls */ - "deleteacls": 31, /* DeleteAcls */ - "describeconfigs": 32, /* DescribeConfigs */ - "alterconfigs": 33, /* AlterConfigs */ -} - -// ReverseApiKeyMap is the map of all allowed kafka API keys -// with the key values. -// Reference: https://kafka.apache.org/protocol#protocol_api_keys -var ReverseAPIKeyMap = map[int16]string{ - 0: "produce", /* Produce */ - 1: "fetch", /* Fetch */ - 2: "offsets", /* Offsets */ - 3: "metadata", /* Metadata */ - 4: "leaderandisr", /* LeaderAndIsr */ - 5: "stopreplica", /* StopReplica */ - 6: "updatemetadata", /* UpdateMetadata */ - 7: "controlledshutdown", /* ControlledShutdown */ - 8: "offsetcommit", /* OffsetCommit */ - 9: "offsetfetch", /* OffsetFetch */ - 10: "findcoordinator", /* FindCoordinator */ - 11: "joingroup", /* JoinGroup */ - 12: "heartbeat", /* Heartbeat */ - 13: "leavegroup", /* LeaveGroup */ - 14: "syncgroup", /* SyncGroup */ - 15: "describegroups", /* DescribeGroups */ - 16: "listgroups", /* ListGroups */ - 17: "saslhandshake", /* SaslHandshake */ - 18: "apiversions", /* ApiVersions */ - 19: "createtopics", /* CreateTopics */ - 20: "deletetopics", /* DeleteTopics */ - 21: "deleterecords", /* DeleteRecords */ - 22: "initproducerid", /* InitProducerId */ - 23: "offsetforleaderepoch", /* OffsetForLeaderEpoch */ - 24: "addpartitionstotxn", /* AddPartitionsToTxn */ - 25: "addoffsetstotxn", /* AddOffsetsToTxn */ - 26: "endtxn", /* EndTxn */ - 27: "writetxnmarkers", /* WriteTxnMarkers */ - 28: "txnoffsetcommit", /* TxnOffsetCommit */ - 29: "describeacls", /* DescribeAcls */ - 30: "createacls", /* CreateAcls */ - 31: "deleteacls", /* DeleteAcls */ - 32: "describeconfigs", /* DescribeConfigs */ - 33: "alterconfigs", /* AlterConfigs */ -} - -func ApiKeyToString(apiKey int16) string { - if key, ok := ReverseAPIKeyMap[apiKey]; ok { - return key - } - return fmt.Sprintf("%d", apiKey) -} - -// MaxTopicLen is the maximum character len of a topic. -// Older Kafka versions had longer topic lengths of 255, in Kafka 0.10 version -// the length was changed from 255 to 249. For compatibility reasons we are -// using 255 -const ( - MaxTopicLen = 255 -) - -// TopicValidChar is a one-time regex generation of all allowed characters -// in kafka topic name. -var TopicValidChar = regexp.MustCompile(`^[a-zA-Z0-9\\._\\-]+$`) - -// Sanitize sanitizes Kafka rules -// TODO we need to add support to check -// wildcard and prefix/suffix later on. -func (kr *PortRule) Sanitize() error { - if (len(kr.APIKey) > 0) && (len(kr.Role) > 0) { - return fmt.Errorf("cannot set both Role %q and APIKey %q together", kr.Role, kr.APIKey) - } - - if len(kr.APIKey) > 0 { - if _, ok := APIKeyMap[strings.ToLower(kr.APIKey)]; !ok { - return fmt.Errorf("invalid Kafka APIKey %q", kr.APIKey) - } - } - - if len(kr.Role) > 0 { - switch strings.ToLower(kr.Role) { - default: - return fmt.Errorf("invalid Kafka Role %q", kr.Role) - case ProduceRole: - case ConsumeRole: - } - } - - if len(kr.APIVersion) > 0 { - n, err := strconv.ParseInt(kr.APIVersion, 10, 16) - if err != nil || n < 0 || n > math.MaxInt16 { - return fmt.Errorf("invalid Kafka APIVersion %q", kr.APIVersion) - } - } - - if len(kr.Topic) > 0 { - if len(kr.Topic) > MaxTopicLen { - return fmt.Errorf("kafka topic exceeds maximum len of %d", MaxTopicLen) - } - if TopicValidChar.MatchString(kr.Topic) == false { - return fmt.Errorf("invalid Kafka Topic name %q", kr.Topic) - } - } - return nil -} - -// GetAPIVersion() returns the numeric API version for the PortRule -func (kr *PortRule) GetAPIVersion() int32 { - if kr.APIVersion != "" { - n, err := strconv.ParseInt(kr.APIVersion, 10, 16) - if err != nil || n < 0 || n > math.MaxInt16 { - panic(fmt.Sprintf("Unsanitized Kafka PortRule: %v", kr)) - } - return int32(n) - } - return -1 // any version is allowed -} - -// GetAPIKeys() returns a slice of numeric apikeys for the PortRule -func (kr *PortRule) GetAPIKeys() []int32 { - // Expand the kr.apiKeyInt array based on the Role. - // For produce role, we need to add mandatory apiKeys produce, metadata and - // apiversions. While for consume, we need to add mandatory apiKeys like - // fetch, offsets, offsetcommit, offsetfetch, apiversions, metadata, - // findcoordinator, joingroup, heartbeat, - // leavegroup and syncgroup. - switch strings.ToLower(kr.Role) { - case ProduceRole: - return []int32{int32(ProduceKey), int32(MetadataKey), int32(APIVersionsKey)} - case ConsumeRole: - return []int32{int32(FetchKey), int32(OffsetsKey), int32(MetadataKey), - int32(OffsetCommitKey), int32(OffsetFetchKey), int32(FindCoordinatorKey), - int32(JoinGroupKey), int32(HeartbeatKey), int32(LeaveGroupKey), int32(SyncgroupKey), int32(APIVersionsKey)} - default: - if kr.APIKey != "" { - if apiKey, ok := APIKeyMap[strings.ToLower(kr.APIKey)]; ok { - return []int32{int32(apiKey)} - } - } - } - return nil -} - -// Exists returns true if the Kafka rule already exists in the list of rules -func (k *PortRule) Exists(rules []PortRule) bool { - for _, existingRule := range rules { - if *k == existingRule { - return true - } - } - - return false -} diff --git a/vendor/github.com/cilium/proxy/pkg/policy/api/kafka/zz_generated.deepequal.go b/vendor/github.com/cilium/proxy/pkg/policy/api/kafka/zz_generated.deepequal.go deleted file mode 100644 index 3d04ee3324f..00000000000 --- a/vendor/github.com/cilium/proxy/pkg/policy/api/kafka/zz_generated.deepequal.go +++ /dev/null @@ -1,35 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium - -// Code generated by deepequal-gen. DO NOT EDIT. - -package kafka - -// DeepEqual is an autogenerated deepequal function, deeply comparing the -// receiver with other. in must be non-nil. -func (in *PortRule) DeepEqual(other *PortRule) bool { - if other == nil { - return false - } - - if in.Role != other.Role { - return false - } - if in.APIKey != other.APIKey { - return false - } - if in.APIVersion != other.APIVersion { - return false - } - if in.ClientID != other.ClientID { - return false - } - if in.Topic != other.Topic { - return false - } - - return true -} diff --git a/vendor/github.com/cncf/xds/go/LICENSE b/vendor/github.com/cncf/xds/go/LICENSE deleted file mode 100644 index 261eeb9e9f8..00000000000 --- a/vendor/github.com/cncf/xds/go/LICENSE +++ /dev/null @@ -1,201 +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/cncf/xds/go/udpa/annotations/migrate.pb.go b/vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.go deleted file mode 100644 index 7d3e1536b36..00000000000 --- a/vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.go +++ /dev/null @@ -1,411 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: udpa/annotations/migrate.proto - -package annotations - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type MigrateAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` -} - -func (x *MigrateAnnotation) Reset() { - *x = MigrateAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_udpa_annotations_migrate_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MigrateAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MigrateAnnotation) ProtoMessage() {} - -func (x *MigrateAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_udpa_annotations_migrate_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MigrateAnnotation.ProtoReflect.Descriptor instead. -func (*MigrateAnnotation) Descriptor() ([]byte, []int) { - return file_udpa_annotations_migrate_proto_rawDescGZIP(), []int{0} -} - -func (x *MigrateAnnotation) GetRename() string { - if x != nil { - return x.Rename - } - return "" -} - -type FieldMigrateAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` - OneofPromotion string `protobuf:"bytes,2,opt,name=oneof_promotion,json=oneofPromotion,proto3" json:"oneof_promotion,omitempty"` -} - -func (x *FieldMigrateAnnotation) Reset() { - *x = FieldMigrateAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_udpa_annotations_migrate_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldMigrateAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldMigrateAnnotation) ProtoMessage() {} - -func (x *FieldMigrateAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_udpa_annotations_migrate_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldMigrateAnnotation.ProtoReflect.Descriptor instead. -func (*FieldMigrateAnnotation) Descriptor() ([]byte, []int) { - return file_udpa_annotations_migrate_proto_rawDescGZIP(), []int{1} -} - -func (x *FieldMigrateAnnotation) GetRename() string { - if x != nil { - return x.Rename - } - return "" -} - -func (x *FieldMigrateAnnotation) GetOneofPromotion() string { - if x != nil { - return x.OneofPromotion - } - return "" -} - -type FileMigrateAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"` -} - -func (x *FileMigrateAnnotation) Reset() { - *x = FileMigrateAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_udpa_annotations_migrate_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FileMigrateAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileMigrateAnnotation) ProtoMessage() {} - -func (x *FileMigrateAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_udpa_annotations_migrate_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FileMigrateAnnotation.ProtoReflect.Descriptor instead. -func (*FileMigrateAnnotation) Descriptor() ([]byte, []int) { - return file_udpa_annotations_migrate_proto_rawDescGZIP(), []int{2} -} - -func (x *FileMigrateAnnotation) GetMoveToPackage() string { - if x != nil { - return x.MoveToPackage - } - return "" -} - -var file_udpa_annotations_migrate_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*MigrateAnnotation)(nil), - Field: 171962766, - Name: "udpa.annotations.message_migrate", - Tag: "bytes,171962766,opt,name=message_migrate", - Filename: "udpa/annotations/migrate.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*FieldMigrateAnnotation)(nil), - Field: 171962766, - Name: "udpa.annotations.field_migrate", - Tag: "bytes,171962766,opt,name=field_migrate", - Filename: "udpa/annotations/migrate.proto", - }, - { - ExtendedType: (*descriptorpb.EnumOptions)(nil), - ExtensionType: (*MigrateAnnotation)(nil), - Field: 171962766, - Name: "udpa.annotations.enum_migrate", - Tag: "bytes,171962766,opt,name=enum_migrate", - Filename: "udpa/annotations/migrate.proto", - }, - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*MigrateAnnotation)(nil), - Field: 171962766, - Name: "udpa.annotations.enum_value_migrate", - Tag: "bytes,171962766,opt,name=enum_value_migrate", - Filename: "udpa/annotations/migrate.proto", - }, - { - ExtendedType: (*descriptorpb.FileOptions)(nil), - ExtensionType: (*FileMigrateAnnotation)(nil), - Field: 171962766, - Name: "udpa.annotations.file_migrate", - Tag: "bytes,171962766,opt,name=file_migrate", - Filename: "udpa/annotations/migrate.proto", - }, -} - -// Extension fields to descriptorpb.MessageOptions. -var ( - // optional udpa.annotations.MigrateAnnotation message_migrate = 171962766; - E_MessageMigrate = &file_udpa_annotations_migrate_proto_extTypes[0] -) - -// Extension fields to descriptorpb.FieldOptions. -var ( - // optional udpa.annotations.FieldMigrateAnnotation field_migrate = 171962766; - E_FieldMigrate = &file_udpa_annotations_migrate_proto_extTypes[1] -) - -// Extension fields to descriptorpb.EnumOptions. -var ( - // optional udpa.annotations.MigrateAnnotation enum_migrate = 171962766; - E_EnumMigrate = &file_udpa_annotations_migrate_proto_extTypes[2] -) - -// Extension fields to descriptorpb.EnumValueOptions. -var ( - // optional udpa.annotations.MigrateAnnotation enum_value_migrate = 171962766; - E_EnumValueMigrate = &file_udpa_annotations_migrate_proto_extTypes[3] -) - -// Extension fields to descriptorpb.FileOptions. -var ( - // optional udpa.annotations.FileMigrateAnnotation file_migrate = 171962766; - E_FileMigrate = &file_udpa_annotations_migrate_proto_extTypes[4] -) - -var File_udpa_annotations_migrate_proto protoreflect.FileDescriptor - -var file_udpa_annotations_migrate_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x11, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x59, 0x0a, 0x16, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, - 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x6f, - 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x6e, - 0x65, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3f, 0x0a, 0x15, - 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x74, 0x6f, - 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x3a, 0x70, 0x0a, - 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x75, 0x64, 0x70, - 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, - 0x6f, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x3a, 0x67, 0x0a, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x8e, - 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x65, 0x6e, - 0x75, 0x6d, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x77, 0x0a, 0x12, 0x65, 0x6e, 0x75, - 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, - 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x75, 0x64, - 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, - 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x10, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x65, 0x3a, 0x6b, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x75, 0x64, 0x70, 0x61, - 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x69, 0x6c, - 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x42, - 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, - 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_udpa_annotations_migrate_proto_rawDescOnce sync.Once - file_udpa_annotations_migrate_proto_rawDescData = file_udpa_annotations_migrate_proto_rawDesc -) - -func file_udpa_annotations_migrate_proto_rawDescGZIP() []byte { - file_udpa_annotations_migrate_proto_rawDescOnce.Do(func() { - file_udpa_annotations_migrate_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_migrate_proto_rawDescData) - }) - return file_udpa_annotations_migrate_proto_rawDescData -} - -var file_udpa_annotations_migrate_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_udpa_annotations_migrate_proto_goTypes = []interface{}{ - (*MigrateAnnotation)(nil), // 0: udpa.annotations.MigrateAnnotation - (*FieldMigrateAnnotation)(nil), // 1: udpa.annotations.FieldMigrateAnnotation - (*FileMigrateAnnotation)(nil), // 2: udpa.annotations.FileMigrateAnnotation - (*descriptorpb.MessageOptions)(nil), // 3: google.protobuf.MessageOptions - (*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions - (*descriptorpb.EnumOptions)(nil), // 5: google.protobuf.EnumOptions - (*descriptorpb.EnumValueOptions)(nil), // 6: google.protobuf.EnumValueOptions - (*descriptorpb.FileOptions)(nil), // 7: google.protobuf.FileOptions -} -var file_udpa_annotations_migrate_proto_depIdxs = []int32{ - 3, // 0: udpa.annotations.message_migrate:extendee -> google.protobuf.MessageOptions - 4, // 1: udpa.annotations.field_migrate:extendee -> google.protobuf.FieldOptions - 5, // 2: udpa.annotations.enum_migrate:extendee -> google.protobuf.EnumOptions - 6, // 3: udpa.annotations.enum_value_migrate:extendee -> google.protobuf.EnumValueOptions - 7, // 4: udpa.annotations.file_migrate:extendee -> google.protobuf.FileOptions - 0, // 5: udpa.annotations.message_migrate:type_name -> udpa.annotations.MigrateAnnotation - 1, // 6: udpa.annotations.field_migrate:type_name -> udpa.annotations.FieldMigrateAnnotation - 0, // 7: udpa.annotations.enum_migrate:type_name -> udpa.annotations.MigrateAnnotation - 0, // 8: udpa.annotations.enum_value_migrate:type_name -> udpa.annotations.MigrateAnnotation - 2, // 9: udpa.annotations.file_migrate:type_name -> udpa.annotations.FileMigrateAnnotation - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 5, // [5:10] is the sub-list for extension type_name - 0, // [0:5] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_udpa_annotations_migrate_proto_init() } -func file_udpa_annotations_migrate_proto_init() { - if File_udpa_annotations_migrate_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_udpa_annotations_migrate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MigrateAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_udpa_annotations_migrate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldMigrateAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_udpa_annotations_migrate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FileMigrateAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_udpa_annotations_migrate_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 5, - NumServices: 0, - }, - GoTypes: file_udpa_annotations_migrate_proto_goTypes, - DependencyIndexes: file_udpa_annotations_migrate_proto_depIdxs, - MessageInfos: file_udpa_annotations_migrate_proto_msgTypes, - ExtensionInfos: file_udpa_annotations_migrate_proto_extTypes, - }.Build() - File_udpa_annotations_migrate_proto = out.File - file_udpa_annotations_migrate_proto_rawDesc = nil - file_udpa_annotations_migrate_proto_goTypes = nil - file_udpa_annotations_migrate_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.validate.go b/vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.validate.go deleted file mode 100644 index 38196d5eb0f..00000000000 --- a/vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.validate.go +++ /dev/null @@ -1,350 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: udpa/annotations/migrate.proto - -package annotations - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on MigrateAnnotation with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *MigrateAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MigrateAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MigrateAnnotationMultiError, or nil if none found. -func (m *MigrateAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *MigrateAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Rename - - if len(errors) > 0 { - return MigrateAnnotationMultiError(errors) - } - - return nil -} - -// MigrateAnnotationMultiError is an error wrapping multiple validation errors -// returned by MigrateAnnotation.ValidateAll() if the designated constraints -// aren't met. -type MigrateAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MigrateAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MigrateAnnotationMultiError) AllErrors() []error { return m } - -// MigrateAnnotationValidationError is the validation error returned by -// MigrateAnnotation.Validate if the designated constraints aren't met. -type MigrateAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MigrateAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MigrateAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MigrateAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MigrateAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MigrateAnnotationValidationError) ErrorName() string { - return "MigrateAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e MigrateAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMigrateAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MigrateAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MigrateAnnotationValidationError{} - -// Validate checks the field values on FieldMigrateAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FieldMigrateAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FieldMigrateAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FieldMigrateAnnotationMultiError, or nil if none found. -func (m *FieldMigrateAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *FieldMigrateAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Rename - - // no validation rules for OneofPromotion - - if len(errors) > 0 { - return FieldMigrateAnnotationMultiError(errors) - } - - return nil -} - -// FieldMigrateAnnotationMultiError is an error wrapping multiple validation -// errors returned by FieldMigrateAnnotation.ValidateAll() if the designated -// constraints aren't met. -type FieldMigrateAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FieldMigrateAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FieldMigrateAnnotationMultiError) AllErrors() []error { return m } - -// FieldMigrateAnnotationValidationError is the validation error returned by -// FieldMigrateAnnotation.Validate if the designated constraints aren't met. -type FieldMigrateAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FieldMigrateAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FieldMigrateAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FieldMigrateAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FieldMigrateAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FieldMigrateAnnotationValidationError) ErrorName() string { - return "FieldMigrateAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e FieldMigrateAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFieldMigrateAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FieldMigrateAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FieldMigrateAnnotationValidationError{} - -// Validate checks the field values on FileMigrateAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FileMigrateAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FileMigrateAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FileMigrateAnnotationMultiError, or nil if none found. -func (m *FileMigrateAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *FileMigrateAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for MoveToPackage - - if len(errors) > 0 { - return FileMigrateAnnotationMultiError(errors) - } - - return nil -} - -// FileMigrateAnnotationMultiError is an error wrapping multiple validation -// errors returned by FileMigrateAnnotation.ValidateAll() if the designated -// constraints aren't met. -type FileMigrateAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FileMigrateAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FileMigrateAnnotationMultiError) AllErrors() []error { return m } - -// FileMigrateAnnotationValidationError is the validation error returned by -// FileMigrateAnnotation.Validate if the designated constraints aren't met. -type FileMigrateAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FileMigrateAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FileMigrateAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FileMigrateAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FileMigrateAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FileMigrateAnnotationValidationError) ErrorName() string { - return "FileMigrateAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e FileMigrateAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFileMigrateAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FileMigrateAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FileMigrateAnnotationValidationError{} diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.go b/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.go deleted file mode 100644 index 71957789538..00000000000 --- a/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.go +++ /dev/null @@ -1,196 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: udpa/annotations/security.proto - -package annotations - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type FieldSecurityAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConfigureForUntrustedDownstream bool `protobuf:"varint,1,opt,name=configure_for_untrusted_downstream,json=configureForUntrustedDownstream,proto3" json:"configure_for_untrusted_downstream,omitempty"` - ConfigureForUntrustedUpstream bool `protobuf:"varint,2,opt,name=configure_for_untrusted_upstream,json=configureForUntrustedUpstream,proto3" json:"configure_for_untrusted_upstream,omitempty"` -} - -func (x *FieldSecurityAnnotation) Reset() { - *x = FieldSecurityAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_udpa_annotations_security_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldSecurityAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldSecurityAnnotation) ProtoMessage() {} - -func (x *FieldSecurityAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_udpa_annotations_security_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldSecurityAnnotation.ProtoReflect.Descriptor instead. -func (*FieldSecurityAnnotation) Descriptor() ([]byte, []int) { - return file_udpa_annotations_security_proto_rawDescGZIP(), []int{0} -} - -func (x *FieldSecurityAnnotation) GetConfigureForUntrustedDownstream() bool { - if x != nil { - return x.ConfigureForUntrustedDownstream - } - return false -} - -func (x *FieldSecurityAnnotation) GetConfigureForUntrustedUpstream() bool { - if x != nil { - return x.ConfigureForUntrustedUpstream - } - return false -} - -var file_udpa_annotations_security_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*FieldSecurityAnnotation)(nil), - Field: 11122993, - Name: "udpa.annotations.security", - Tag: "bytes,11122993,opt,name=security", - Filename: "udpa/annotations/security.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // optional udpa.annotations.FieldSecurityAnnotation security = 11122993; - E_Security = &file_udpa_annotations_security_proto_extTypes[0] -) - -var File_udpa_annotations_security_proto protoreflect.FileDescriptor - -var file_udpa_annotations_security_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x4b, 0x0a, 0x22, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6f, - 0x72, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x6e, 0x74, 0x72, 0x75, 0x73, - 0x74, 0x65, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x47, 0x0a, - 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75, - 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x55, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x67, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0xb1, 0xf2, 0xa6, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x75, 0x64, 0x70, - 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x42, - 0x31, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, - 0x6f, 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_udpa_annotations_security_proto_rawDescOnce sync.Once - file_udpa_annotations_security_proto_rawDescData = file_udpa_annotations_security_proto_rawDesc -) - -func file_udpa_annotations_security_proto_rawDescGZIP() []byte { - file_udpa_annotations_security_proto_rawDescOnce.Do(func() { - file_udpa_annotations_security_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_security_proto_rawDescData) - }) - return file_udpa_annotations_security_proto_rawDescData -} - -var file_udpa_annotations_security_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_udpa_annotations_security_proto_goTypes = []interface{}{ - (*FieldSecurityAnnotation)(nil), // 0: udpa.annotations.FieldSecurityAnnotation - (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions -} -var file_udpa_annotations_security_proto_depIdxs = []int32{ - 1, // 0: udpa.annotations.security:extendee -> google.protobuf.FieldOptions - 0, // 1: udpa.annotations.security:type_name -> udpa.annotations.FieldSecurityAnnotation - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 1, // [1:2] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_udpa_annotations_security_proto_init() } -func file_udpa_annotations_security_proto_init() { - if File_udpa_annotations_security_proto != nil { - return - } - file_udpa_annotations_status_proto_init() - if !protoimpl.UnsafeEnabled { - file_udpa_annotations_security_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldSecurityAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_udpa_annotations_security_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_udpa_annotations_security_proto_goTypes, - DependencyIndexes: file_udpa_annotations_security_proto_depIdxs, - MessageInfos: file_udpa_annotations_security_proto_msgTypes, - ExtensionInfos: file_udpa_annotations_security_proto_extTypes, - }.Build() - File_udpa_annotations_security_proto = out.File - file_udpa_annotations_security_proto_rawDesc = nil - file_udpa_annotations_security_proto_goTypes = nil - file_udpa_annotations_security_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.validate.go b/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.validate.go deleted file mode 100644 index acc9bd7a129..00000000000 --- a/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.validate.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: udpa/annotations/security.proto - -package annotations - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on FieldSecurityAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FieldSecurityAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FieldSecurityAnnotation with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FieldSecurityAnnotationMultiError, or nil if none found. -func (m *FieldSecurityAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *FieldSecurityAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ConfigureForUntrustedDownstream - - // no validation rules for ConfigureForUntrustedUpstream - - if len(errors) > 0 { - return FieldSecurityAnnotationMultiError(errors) - } - - return nil -} - -// FieldSecurityAnnotationMultiError is an error wrapping multiple validation -// errors returned by FieldSecurityAnnotation.ValidateAll() if the designated -// constraints aren't met. -type FieldSecurityAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FieldSecurityAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FieldSecurityAnnotationMultiError) AllErrors() []error { return m } - -// FieldSecurityAnnotationValidationError is the validation error returned by -// FieldSecurityAnnotation.Validate if the designated constraints aren't met. -type FieldSecurityAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FieldSecurityAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FieldSecurityAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FieldSecurityAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FieldSecurityAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FieldSecurityAnnotationValidationError) ErrorName() string { - return "FieldSecurityAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e FieldSecurityAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFieldSecurityAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FieldSecurityAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FieldSecurityAnnotationValidationError{} diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.go b/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.go deleted file mode 100644 index 8631b8568c1..00000000000 --- a/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: udpa/annotations/sensitive.proto - -package annotations - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var file_udpa_annotations_sensitive_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 76569463, - Name: "udpa.annotations.sensitive", - Tag: "varint,76569463,opt,name=sensitive", - Filename: "udpa/annotations/sensitive.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // optional bool sensitive = 76569463; - E_Sensitive = &file_udpa_annotations_sensitive_proto_extTypes[0] -) - -var File_udpa_annotations_sensitive_proto protoreflect.FileDescriptor - -var file_udpa_annotations_sensitive_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3e, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0xf7, 0xb6, 0xc1, 0x24, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, - 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_udpa_annotations_sensitive_proto_goTypes = []interface{}{ - (*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions -} -var file_udpa_annotations_sensitive_proto_depIdxs = []int32{ - 0, // 0: udpa.annotations.sensitive:extendee -> google.protobuf.FieldOptions - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_udpa_annotations_sensitive_proto_init() } -func file_udpa_annotations_sensitive_proto_init() { - if File_udpa_annotations_sensitive_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_udpa_annotations_sensitive_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_udpa_annotations_sensitive_proto_goTypes, - DependencyIndexes: file_udpa_annotations_sensitive_proto_depIdxs, - ExtensionInfos: file_udpa_annotations_sensitive_proto_extTypes, - }.Build() - File_udpa_annotations_sensitive_proto = out.File - file_udpa_annotations_sensitive_proto_rawDesc = nil - file_udpa_annotations_sensitive_proto_goTypes = nil - file_udpa_annotations_sensitive_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.validate.go b/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.validate.go deleted file mode 100644 index f3fa61974cb..00000000000 --- a/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: udpa/annotations/sensitive.proto - -package annotations - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.go b/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.go deleted file mode 100644 index f2fdc3ca388..00000000000 --- a/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: udpa/annotations/status.proto - -package annotations - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PackageVersionStatus int32 - -const ( - PackageVersionStatus_UNKNOWN PackageVersionStatus = 0 - PackageVersionStatus_FROZEN PackageVersionStatus = 1 - PackageVersionStatus_ACTIVE PackageVersionStatus = 2 - PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE PackageVersionStatus = 3 -) - -// Enum value maps for PackageVersionStatus. -var ( - PackageVersionStatus_name = map[int32]string{ - 0: "UNKNOWN", - 1: "FROZEN", - 2: "ACTIVE", - 3: "NEXT_MAJOR_VERSION_CANDIDATE", - } - PackageVersionStatus_value = map[string]int32{ - "UNKNOWN": 0, - "FROZEN": 1, - "ACTIVE": 2, - "NEXT_MAJOR_VERSION_CANDIDATE": 3, - } -) - -func (x PackageVersionStatus) Enum() *PackageVersionStatus { - p := new(PackageVersionStatus) - *p = x - return p -} - -func (x PackageVersionStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PackageVersionStatus) Descriptor() protoreflect.EnumDescriptor { - return file_udpa_annotations_status_proto_enumTypes[0].Descriptor() -} - -func (PackageVersionStatus) Type() protoreflect.EnumType { - return &file_udpa_annotations_status_proto_enumTypes[0] -} - -func (x PackageVersionStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PackageVersionStatus.Descriptor instead. -func (PackageVersionStatus) EnumDescriptor() ([]byte, []int) { - return file_udpa_annotations_status_proto_rawDescGZIP(), []int{0} -} - -type StatusAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` - PackageVersionStatus PackageVersionStatus `protobuf:"varint,2,opt,name=package_version_status,json=packageVersionStatus,proto3,enum=udpa.annotations.PackageVersionStatus" json:"package_version_status,omitempty"` -} - -func (x *StatusAnnotation) Reset() { - *x = StatusAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_udpa_annotations_status_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatusAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusAnnotation) ProtoMessage() {} - -func (x *StatusAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_udpa_annotations_status_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusAnnotation.ProtoReflect.Descriptor instead. -func (*StatusAnnotation) Descriptor() ([]byte, []int) { - return file_udpa_annotations_status_proto_rawDescGZIP(), []int{0} -} - -func (x *StatusAnnotation) GetWorkInProgress() bool { - if x != nil { - return x.WorkInProgress - } - return false -} - -func (x *StatusAnnotation) GetPackageVersionStatus() PackageVersionStatus { - if x != nil { - return x.PackageVersionStatus - } - return PackageVersionStatus_UNKNOWN -} - -var file_udpa_annotations_status_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FileOptions)(nil), - ExtensionType: (*StatusAnnotation)(nil), - Field: 222707719, - Name: "udpa.annotations.file_status", - Tag: "bytes,222707719,opt,name=file_status", - Filename: "udpa/annotations/status.proto", - }, -} - -// Extension fields to descriptorpb.FileOptions. -var ( - // optional udpa.annotations.StatusAnnotation file_status = 222707719; - E_FileStatus = &file_udpa_annotations_status_proto_extTypes[0] -) - -var File_udpa_annotations_status_proto protoreflect.FileDescriptor - -var file_udpa_annotations_status_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, - 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x5c, 0x0a, 0x16, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x14, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2a, 0x5d, 0x0a, 0x14, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52, 0x4f, 0x5a, 0x45, 0x4e, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x20, 0x0a, - 0x1c, 0x4e, 0x45, 0x58, 0x54, 0x5f, 0x4d, 0x41, 0x4a, 0x4f, 0x52, 0x5f, 0x56, 0x45, 0x52, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x3a, - 0x64, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0x80, 0x99, - 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_udpa_annotations_status_proto_rawDescOnce sync.Once - file_udpa_annotations_status_proto_rawDescData = file_udpa_annotations_status_proto_rawDesc -) - -func file_udpa_annotations_status_proto_rawDescGZIP() []byte { - file_udpa_annotations_status_proto_rawDescOnce.Do(func() { - file_udpa_annotations_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_status_proto_rawDescData) - }) - return file_udpa_annotations_status_proto_rawDescData -} - -var file_udpa_annotations_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_udpa_annotations_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_udpa_annotations_status_proto_goTypes = []interface{}{ - (PackageVersionStatus)(0), // 0: udpa.annotations.PackageVersionStatus - (*StatusAnnotation)(nil), // 1: udpa.annotations.StatusAnnotation - (*descriptorpb.FileOptions)(nil), // 2: google.protobuf.FileOptions -} -var file_udpa_annotations_status_proto_depIdxs = []int32{ - 0, // 0: udpa.annotations.StatusAnnotation.package_version_status:type_name -> udpa.annotations.PackageVersionStatus - 2, // 1: udpa.annotations.file_status:extendee -> google.protobuf.FileOptions - 1, // 2: udpa.annotations.file_status:type_name -> udpa.annotations.StatusAnnotation - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 2, // [2:3] is the sub-list for extension type_name - 1, // [1:2] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_udpa_annotations_status_proto_init() } -func file_udpa_annotations_status_proto_init() { - if File_udpa_annotations_status_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_udpa_annotations_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_udpa_annotations_status_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_udpa_annotations_status_proto_goTypes, - DependencyIndexes: file_udpa_annotations_status_proto_depIdxs, - EnumInfos: file_udpa_annotations_status_proto_enumTypes, - MessageInfos: file_udpa_annotations_status_proto_msgTypes, - ExtensionInfos: file_udpa_annotations_status_proto_extTypes, - }.Build() - File_udpa_annotations_status_proto = out.File - file_udpa_annotations_status_proto_rawDesc = nil - file_udpa_annotations_status_proto_goTypes = nil - file_udpa_annotations_status_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.validate.go b/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.validate.go deleted file mode 100644 index 5633a83831b..00000000000 --- a/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.validate.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: udpa/annotations/status.proto - -package annotations - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on StatusAnnotation with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *StatusAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on StatusAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// StatusAnnotationMultiError, or nil if none found. -func (m *StatusAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *StatusAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for WorkInProgress - - // no validation rules for PackageVersionStatus - - if len(errors) > 0 { - return StatusAnnotationMultiError(errors) - } - - return nil -} - -// StatusAnnotationMultiError is an error wrapping multiple validation errors -// returned by StatusAnnotation.ValidateAll() if the designated constraints -// aren't met. -type StatusAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m StatusAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m StatusAnnotationMultiError) AllErrors() []error { return m } - -// StatusAnnotationValidationError is the validation error returned by -// StatusAnnotation.Validate if the designated constraints aren't met. -type StatusAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StatusAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StatusAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StatusAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StatusAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StatusAnnotationValidationError) ErrorName() string { return "StatusAnnotationValidationError" } - -// Error satisfies the builtin error interface -func (e StatusAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStatusAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StatusAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StatusAnnotationValidationError{} diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.go b/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.go deleted file mode 100644 index df83e0a2eb5..00000000000 --- a/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: udpa/annotations/versioning.proto - -package annotations - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type VersioningAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"` -} - -func (x *VersioningAnnotation) Reset() { - *x = VersioningAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_udpa_annotations_versioning_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VersioningAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersioningAnnotation) ProtoMessage() {} - -func (x *VersioningAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_udpa_annotations_versioning_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersioningAnnotation.ProtoReflect.Descriptor instead. -func (*VersioningAnnotation) Descriptor() ([]byte, []int) { - return file_udpa_annotations_versioning_proto_rawDescGZIP(), []int{0} -} - -func (x *VersioningAnnotation) GetPreviousMessageType() string { - if x != nil { - return x.PreviousMessageType - } - return "" -} - -var file_udpa_annotations_versioning_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*VersioningAnnotation)(nil), - Field: 7881811, - Name: "udpa.annotations.versioning", - Tag: "bytes,7881811,opt,name=versioning", - Filename: "udpa/annotations/versioning.proto", - }, -} - -// Extension fields to descriptorpb.MessageOptions. -var ( - // optional udpa.annotations.VersioningAnnotation versioning = 7881811; - E_Versioning = &file_udpa_annotations_versioning_proto_extTypes[0] -) - -var File_udpa_annotations_versioning_proto protoreflect.FileDescriptor - -var file_udpa_annotations_versioning_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x14, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x32, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, - 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x3a, 0x6a, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0xd3, 0x88, 0xe1, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x75, 0x64, - 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42, - 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, - 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_udpa_annotations_versioning_proto_rawDescOnce sync.Once - file_udpa_annotations_versioning_proto_rawDescData = file_udpa_annotations_versioning_proto_rawDesc -) - -func file_udpa_annotations_versioning_proto_rawDescGZIP() []byte { - file_udpa_annotations_versioning_proto_rawDescOnce.Do(func() { - file_udpa_annotations_versioning_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_versioning_proto_rawDescData) - }) - return file_udpa_annotations_versioning_proto_rawDescData -} - -var file_udpa_annotations_versioning_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_udpa_annotations_versioning_proto_goTypes = []interface{}{ - (*VersioningAnnotation)(nil), // 0: udpa.annotations.VersioningAnnotation - (*descriptorpb.MessageOptions)(nil), // 1: google.protobuf.MessageOptions -} -var file_udpa_annotations_versioning_proto_depIdxs = []int32{ - 1, // 0: udpa.annotations.versioning:extendee -> google.protobuf.MessageOptions - 0, // 1: udpa.annotations.versioning:type_name -> udpa.annotations.VersioningAnnotation - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 1, // [1:2] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_udpa_annotations_versioning_proto_init() } -func file_udpa_annotations_versioning_proto_init() { - if File_udpa_annotations_versioning_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_udpa_annotations_versioning_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersioningAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_udpa_annotations_versioning_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_udpa_annotations_versioning_proto_goTypes, - DependencyIndexes: file_udpa_annotations_versioning_proto_depIdxs, - MessageInfos: file_udpa_annotations_versioning_proto_msgTypes, - ExtensionInfos: file_udpa_annotations_versioning_proto_extTypes, - }.Build() - File_udpa_annotations_versioning_proto = out.File - file_udpa_annotations_versioning_proto_rawDesc = nil - file_udpa_annotations_versioning_proto_goTypes = nil - file_udpa_annotations_versioning_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.validate.go b/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.validate.go deleted file mode 100644 index 5fd86baffd1..00000000000 --- a/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.validate.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: udpa/annotations/versioning.proto - -package annotations - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on VersioningAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *VersioningAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on VersioningAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// VersioningAnnotationMultiError, or nil if none found. -func (m *VersioningAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *VersioningAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for PreviousMessageType - - if len(errors) > 0 { - return VersioningAnnotationMultiError(errors) - } - - return nil -} - -// VersioningAnnotationMultiError is an error wrapping multiple validation -// errors returned by VersioningAnnotation.ValidateAll() if the designated -// constraints aren't met. -type VersioningAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m VersioningAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m VersioningAnnotationMultiError) AllErrors() []error { return m } - -// VersioningAnnotationValidationError is the validation error returned by -// VersioningAnnotation.Validate if the designated constraints aren't met. -type VersioningAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e VersioningAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e VersioningAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e VersioningAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e VersioningAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e VersioningAnnotationValidationError) ErrorName() string { - return "VersioningAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e VersioningAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sVersioningAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = VersioningAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = VersioningAnnotationValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.go deleted file mode 100644 index ad24b1f7f6c..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.go +++ /dev/null @@ -1,412 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/annotations/v3/migrate.proto - -package v3 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type MigrateAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` -} - -func (x *MigrateAnnotation) Reset() { - *x = MigrateAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_annotations_v3_migrate_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MigrateAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MigrateAnnotation) ProtoMessage() {} - -func (x *MigrateAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_xds_annotations_v3_migrate_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MigrateAnnotation.ProtoReflect.Descriptor instead. -func (*MigrateAnnotation) Descriptor() ([]byte, []int) { - return file_xds_annotations_v3_migrate_proto_rawDescGZIP(), []int{0} -} - -func (x *MigrateAnnotation) GetRename() string { - if x != nil { - return x.Rename - } - return "" -} - -type FieldMigrateAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"` - OneofPromotion string `protobuf:"bytes,2,opt,name=oneof_promotion,json=oneofPromotion,proto3" json:"oneof_promotion,omitempty"` -} - -func (x *FieldMigrateAnnotation) Reset() { - *x = FieldMigrateAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_annotations_v3_migrate_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldMigrateAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldMigrateAnnotation) ProtoMessage() {} - -func (x *FieldMigrateAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_xds_annotations_v3_migrate_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldMigrateAnnotation.ProtoReflect.Descriptor instead. -func (*FieldMigrateAnnotation) Descriptor() ([]byte, []int) { - return file_xds_annotations_v3_migrate_proto_rawDescGZIP(), []int{1} -} - -func (x *FieldMigrateAnnotation) GetRename() string { - if x != nil { - return x.Rename - } - return "" -} - -func (x *FieldMigrateAnnotation) GetOneofPromotion() string { - if x != nil { - return x.OneofPromotion - } - return "" -} - -type FileMigrateAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"` -} - -func (x *FileMigrateAnnotation) Reset() { - *x = FileMigrateAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_annotations_v3_migrate_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FileMigrateAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileMigrateAnnotation) ProtoMessage() {} - -func (x *FileMigrateAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_xds_annotations_v3_migrate_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FileMigrateAnnotation.ProtoReflect.Descriptor instead. -func (*FileMigrateAnnotation) Descriptor() ([]byte, []int) { - return file_xds_annotations_v3_migrate_proto_rawDescGZIP(), []int{2} -} - -func (x *FileMigrateAnnotation) GetMoveToPackage() string { - if x != nil { - return x.MoveToPackage - } - return "" -} - -var file_xds_annotations_v3_migrate_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*MigrateAnnotation)(nil), - Field: 112948430, - Name: "xds.annotations.v3.message_migrate", - Tag: "bytes,112948430,opt,name=message_migrate", - Filename: "xds/annotations/v3/migrate.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*FieldMigrateAnnotation)(nil), - Field: 112948430, - Name: "xds.annotations.v3.field_migrate", - Tag: "bytes,112948430,opt,name=field_migrate", - Filename: "xds/annotations/v3/migrate.proto", - }, - { - ExtendedType: (*descriptorpb.EnumOptions)(nil), - ExtensionType: (*MigrateAnnotation)(nil), - Field: 112948430, - Name: "xds.annotations.v3.enum_migrate", - Tag: "bytes,112948430,opt,name=enum_migrate", - Filename: "xds/annotations/v3/migrate.proto", - }, - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*MigrateAnnotation)(nil), - Field: 112948430, - Name: "xds.annotations.v3.enum_value_migrate", - Tag: "bytes,112948430,opt,name=enum_value_migrate", - Filename: "xds/annotations/v3/migrate.proto", - }, - { - ExtendedType: (*descriptorpb.FileOptions)(nil), - ExtensionType: (*FileMigrateAnnotation)(nil), - Field: 112948430, - Name: "xds.annotations.v3.file_migrate", - Tag: "bytes,112948430,opt,name=file_migrate", - Filename: "xds/annotations/v3/migrate.proto", - }, -} - -// Extension fields to descriptorpb.MessageOptions. -var ( - // optional xds.annotations.v3.MigrateAnnotation message_migrate = 112948430; - E_MessageMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[0] -) - -// Extension fields to descriptorpb.FieldOptions. -var ( - // optional xds.annotations.v3.FieldMigrateAnnotation field_migrate = 112948430; - E_FieldMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[1] -) - -// Extension fields to descriptorpb.EnumOptions. -var ( - // optional xds.annotations.v3.MigrateAnnotation enum_migrate = 112948430; - E_EnumMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[2] -) - -// Extension fields to descriptorpb.EnumValueOptions. -var ( - // optional xds.annotations.v3.MigrateAnnotation enum_value_migrate = 112948430; - E_EnumValueMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[3] -) - -// Extension fields to descriptorpb.FileOptions. -var ( - // optional xds.annotations.v3.FileMigrateAnnotation file_migrate = 112948430; - E_FileMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[4] -) - -var File_xds_annotations_v3_migrate_proto protoreflect.FileDescriptor - -var file_xds_annotations_v3_migrate_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x11, 0x4d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, - 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, - 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x59, 0x0a, 0x16, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, - 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x3f, 0x0a, 0x15, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x6f, 0x76, - 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x3a, 0x72, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x67, - 0x72, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x71, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, - 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x69, 0x0a, 0x0c, 0x65, 0x6e, 0x75, 0x6d, - 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x4d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x65, 0x3a, 0x79, 0x0a, 0x12, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed, - 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x65, 0x6e, - 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x6d, - 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed, - 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, - 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x42, 0x2b, 0x5a, - 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, - 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_xds_annotations_v3_migrate_proto_rawDescOnce sync.Once - file_xds_annotations_v3_migrate_proto_rawDescData = file_xds_annotations_v3_migrate_proto_rawDesc -) - -func file_xds_annotations_v3_migrate_proto_rawDescGZIP() []byte { - file_xds_annotations_v3_migrate_proto_rawDescOnce.Do(func() { - file_xds_annotations_v3_migrate_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_migrate_proto_rawDescData) - }) - return file_xds_annotations_v3_migrate_proto_rawDescData -} - -var file_xds_annotations_v3_migrate_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_xds_annotations_v3_migrate_proto_goTypes = []interface{}{ - (*MigrateAnnotation)(nil), // 0: xds.annotations.v3.MigrateAnnotation - (*FieldMigrateAnnotation)(nil), // 1: xds.annotations.v3.FieldMigrateAnnotation - (*FileMigrateAnnotation)(nil), // 2: xds.annotations.v3.FileMigrateAnnotation - (*descriptorpb.MessageOptions)(nil), // 3: google.protobuf.MessageOptions - (*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions - (*descriptorpb.EnumOptions)(nil), // 5: google.protobuf.EnumOptions - (*descriptorpb.EnumValueOptions)(nil), // 6: google.protobuf.EnumValueOptions - (*descriptorpb.FileOptions)(nil), // 7: google.protobuf.FileOptions -} -var file_xds_annotations_v3_migrate_proto_depIdxs = []int32{ - 3, // 0: xds.annotations.v3.message_migrate:extendee -> google.protobuf.MessageOptions - 4, // 1: xds.annotations.v3.field_migrate:extendee -> google.protobuf.FieldOptions - 5, // 2: xds.annotations.v3.enum_migrate:extendee -> google.protobuf.EnumOptions - 6, // 3: xds.annotations.v3.enum_value_migrate:extendee -> google.protobuf.EnumValueOptions - 7, // 4: xds.annotations.v3.file_migrate:extendee -> google.protobuf.FileOptions - 0, // 5: xds.annotations.v3.message_migrate:type_name -> xds.annotations.v3.MigrateAnnotation - 1, // 6: xds.annotations.v3.field_migrate:type_name -> xds.annotations.v3.FieldMigrateAnnotation - 0, // 7: xds.annotations.v3.enum_migrate:type_name -> xds.annotations.v3.MigrateAnnotation - 0, // 8: xds.annotations.v3.enum_value_migrate:type_name -> xds.annotations.v3.MigrateAnnotation - 2, // 9: xds.annotations.v3.file_migrate:type_name -> xds.annotations.v3.FileMigrateAnnotation - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 5, // [5:10] is the sub-list for extension type_name - 0, // [0:5] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_xds_annotations_v3_migrate_proto_init() } -func file_xds_annotations_v3_migrate_proto_init() { - if File_xds_annotations_v3_migrate_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_annotations_v3_migrate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MigrateAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_annotations_v3_migrate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldMigrateAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_annotations_v3_migrate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FileMigrateAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_annotations_v3_migrate_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 5, - NumServices: 0, - }, - GoTypes: file_xds_annotations_v3_migrate_proto_goTypes, - DependencyIndexes: file_xds_annotations_v3_migrate_proto_depIdxs, - MessageInfos: file_xds_annotations_v3_migrate_proto_msgTypes, - ExtensionInfos: file_xds_annotations_v3_migrate_proto_extTypes, - }.Build() - File_xds_annotations_v3_migrate_proto = out.File - file_xds_annotations_v3_migrate_proto_rawDesc = nil - file_xds_annotations_v3_migrate_proto_goTypes = nil - file_xds_annotations_v3_migrate_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.validate.go deleted file mode 100644 index d57d7782472..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.validate.go +++ /dev/null @@ -1,350 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/annotations/v3/migrate.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on MigrateAnnotation with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *MigrateAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MigrateAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MigrateAnnotationMultiError, or nil if none found. -func (m *MigrateAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *MigrateAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Rename - - if len(errors) > 0 { - return MigrateAnnotationMultiError(errors) - } - - return nil -} - -// MigrateAnnotationMultiError is an error wrapping multiple validation errors -// returned by MigrateAnnotation.ValidateAll() if the designated constraints -// aren't met. -type MigrateAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MigrateAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MigrateAnnotationMultiError) AllErrors() []error { return m } - -// MigrateAnnotationValidationError is the validation error returned by -// MigrateAnnotation.Validate if the designated constraints aren't met. -type MigrateAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MigrateAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MigrateAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MigrateAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MigrateAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MigrateAnnotationValidationError) ErrorName() string { - return "MigrateAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e MigrateAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMigrateAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MigrateAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MigrateAnnotationValidationError{} - -// Validate checks the field values on FieldMigrateAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FieldMigrateAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FieldMigrateAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FieldMigrateAnnotationMultiError, or nil if none found. -func (m *FieldMigrateAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *FieldMigrateAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Rename - - // no validation rules for OneofPromotion - - if len(errors) > 0 { - return FieldMigrateAnnotationMultiError(errors) - } - - return nil -} - -// FieldMigrateAnnotationMultiError is an error wrapping multiple validation -// errors returned by FieldMigrateAnnotation.ValidateAll() if the designated -// constraints aren't met. -type FieldMigrateAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FieldMigrateAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FieldMigrateAnnotationMultiError) AllErrors() []error { return m } - -// FieldMigrateAnnotationValidationError is the validation error returned by -// FieldMigrateAnnotation.Validate if the designated constraints aren't met. -type FieldMigrateAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FieldMigrateAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FieldMigrateAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FieldMigrateAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FieldMigrateAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FieldMigrateAnnotationValidationError) ErrorName() string { - return "FieldMigrateAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e FieldMigrateAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFieldMigrateAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FieldMigrateAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FieldMigrateAnnotationValidationError{} - -// Validate checks the field values on FileMigrateAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FileMigrateAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FileMigrateAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FileMigrateAnnotationMultiError, or nil if none found. -func (m *FileMigrateAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *FileMigrateAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for MoveToPackage - - if len(errors) > 0 { - return FileMigrateAnnotationMultiError(errors) - } - - return nil -} - -// FileMigrateAnnotationMultiError is an error wrapping multiple validation -// errors returned by FileMigrateAnnotation.ValidateAll() if the designated -// constraints aren't met. -type FileMigrateAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FileMigrateAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FileMigrateAnnotationMultiError) AllErrors() []error { return m } - -// FileMigrateAnnotationValidationError is the validation error returned by -// FileMigrateAnnotation.Validate if the designated constraints aren't met. -type FileMigrateAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FileMigrateAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FileMigrateAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FileMigrateAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FileMigrateAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FileMigrateAnnotationValidationError) ErrorName() string { - return "FileMigrateAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e FileMigrateAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFileMigrateAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FileMigrateAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FileMigrateAnnotationValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.go deleted file mode 100644 index 61df6890bd3..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/annotations/v3/security.proto - -package v3 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type FieldSecurityAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConfigureForUntrustedDownstream bool `protobuf:"varint,1,opt,name=configure_for_untrusted_downstream,json=configureForUntrustedDownstream,proto3" json:"configure_for_untrusted_downstream,omitempty"` - ConfigureForUntrustedUpstream bool `protobuf:"varint,2,opt,name=configure_for_untrusted_upstream,json=configureForUntrustedUpstream,proto3" json:"configure_for_untrusted_upstream,omitempty"` -} - -func (x *FieldSecurityAnnotation) Reset() { - *x = FieldSecurityAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_annotations_v3_security_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldSecurityAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldSecurityAnnotation) ProtoMessage() {} - -func (x *FieldSecurityAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_xds_annotations_v3_security_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldSecurityAnnotation.ProtoReflect.Descriptor instead. -func (*FieldSecurityAnnotation) Descriptor() ([]byte, []int) { - return file_xds_annotations_v3_security_proto_rawDescGZIP(), []int{0} -} - -func (x *FieldSecurityAnnotation) GetConfigureForUntrustedDownstream() bool { - if x != nil { - return x.ConfigureForUntrustedDownstream - } - return false -} - -func (x *FieldSecurityAnnotation) GetConfigureForUntrustedUpstream() bool { - if x != nil { - return x.ConfigureForUntrustedUpstream - } - return false -} - -var file_xds_annotations_v3_security_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*FieldSecurityAnnotation)(nil), - Field: 99044135, - Name: "xds.annotations.v3.security", - Tag: "bytes,99044135,opt,name=security", - Filename: "xds/annotations/v3/security.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // optional xds.annotations.v3.FieldSecurityAnnotation security = 99044135; - E_Security = &file_xds_annotations_v3_security_proto_extTypes[0] -) - -var File_xds_annotations_v3_security_proto protoreflect.FileDescriptor - -var file_xds_annotations_v3_security_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x22, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, - 0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x1f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x46, 0x6f, 0x72, - 0x55, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x12, 0x47, 0x0a, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, - 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x75, - 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x6e, 0x74, 0x72, 0x75, - 0x73, 0x74, 0x65, 0x64, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x69, 0x0a, 0x08, - 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa7, 0x96, 0x9d, 0x2f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2b, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x42, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, - 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, - 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_annotations_v3_security_proto_rawDescOnce sync.Once - file_xds_annotations_v3_security_proto_rawDescData = file_xds_annotations_v3_security_proto_rawDesc -) - -func file_xds_annotations_v3_security_proto_rawDescGZIP() []byte { - file_xds_annotations_v3_security_proto_rawDescOnce.Do(func() { - file_xds_annotations_v3_security_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_security_proto_rawDescData) - }) - return file_xds_annotations_v3_security_proto_rawDescData -} - -var file_xds_annotations_v3_security_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_xds_annotations_v3_security_proto_goTypes = []interface{}{ - (*FieldSecurityAnnotation)(nil), // 0: xds.annotations.v3.FieldSecurityAnnotation - (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions -} -var file_xds_annotations_v3_security_proto_depIdxs = []int32{ - 1, // 0: xds.annotations.v3.security:extendee -> google.protobuf.FieldOptions - 0, // 1: xds.annotations.v3.security:type_name -> xds.annotations.v3.FieldSecurityAnnotation - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 1, // [1:2] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_xds_annotations_v3_security_proto_init() } -func file_xds_annotations_v3_security_proto_init() { - if File_xds_annotations_v3_security_proto != nil { - return - } - file_xds_annotations_v3_status_proto_init() - if !protoimpl.UnsafeEnabled { - file_xds_annotations_v3_security_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldSecurityAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_annotations_v3_security_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_xds_annotations_v3_security_proto_goTypes, - DependencyIndexes: file_xds_annotations_v3_security_proto_depIdxs, - MessageInfos: file_xds_annotations_v3_security_proto_msgTypes, - ExtensionInfos: file_xds_annotations_v3_security_proto_extTypes, - }.Build() - File_xds_annotations_v3_security_proto = out.File - file_xds_annotations_v3_security_proto_rawDesc = nil - file_xds_annotations_v3_security_proto_goTypes = nil - file_xds_annotations_v3_security_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.validate.go deleted file mode 100644 index ac0143f2772..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.validate.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/annotations/v3/security.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on FieldSecurityAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FieldSecurityAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FieldSecurityAnnotation with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FieldSecurityAnnotationMultiError, or nil if none found. -func (m *FieldSecurityAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *FieldSecurityAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ConfigureForUntrustedDownstream - - // no validation rules for ConfigureForUntrustedUpstream - - if len(errors) > 0 { - return FieldSecurityAnnotationMultiError(errors) - } - - return nil -} - -// FieldSecurityAnnotationMultiError is an error wrapping multiple validation -// errors returned by FieldSecurityAnnotation.ValidateAll() if the designated -// constraints aren't met. -type FieldSecurityAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FieldSecurityAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FieldSecurityAnnotationMultiError) AllErrors() []error { return m } - -// FieldSecurityAnnotationValidationError is the validation error returned by -// FieldSecurityAnnotation.Validate if the designated constraints aren't met. -type FieldSecurityAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FieldSecurityAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FieldSecurityAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FieldSecurityAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FieldSecurityAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FieldSecurityAnnotationValidationError) ErrorName() string { - return "FieldSecurityAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e FieldSecurityAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFieldSecurityAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FieldSecurityAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FieldSecurityAnnotationValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.go deleted file mode 100644 index 274eace058d..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/annotations/v3/sensitive.proto - -package v3 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var file_xds_annotations_v3_sensitive_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 61008053, - Name: "xds.annotations.v3.sensitive", - Tag: "varint,61008053,opt,name=sensitive", - Filename: "xds/annotations/v3/sensitive.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // optional bool sensitive = 61008053; - E_Sensitive = &file_xds_annotations_v3_sensitive_proto_extTypes[0] -) - -var File_xds_annotations_v3_sensitive_proto protoreflect.FileDescriptor - -var file_xds_annotations_v3_sensitive_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3e, 0x0a, 0x09, 0x73, 0x65, - 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb5, 0xd1, 0x8b, 0x1d, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, - 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_xds_annotations_v3_sensitive_proto_goTypes = []interface{}{ - (*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions -} -var file_xds_annotations_v3_sensitive_proto_depIdxs = []int32{ - 0, // 0: xds.annotations.v3.sensitive:extendee -> google.protobuf.FieldOptions - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_xds_annotations_v3_sensitive_proto_init() } -func file_xds_annotations_v3_sensitive_proto_init() { - if File_xds_annotations_v3_sensitive_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_annotations_v3_sensitive_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_xds_annotations_v3_sensitive_proto_goTypes, - DependencyIndexes: file_xds_annotations_v3_sensitive_proto_depIdxs, - ExtensionInfos: file_xds_annotations_v3_sensitive_proto_extTypes, - }.Build() - File_xds_annotations_v3_sensitive_proto = out.File - file_xds_annotations_v3_sensitive_proto_rawDesc = nil - file_xds_annotations_v3_sensitive_proto_goTypes = nil - file_xds_annotations_v3_sensitive_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.validate.go deleted file mode 100644 index c101d3acc47..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/annotations/v3/sensitive.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.go deleted file mode 100644 index 2497e0b2fea..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.go +++ /dev/null @@ -1,495 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/annotations/v3/status.proto - -package v3 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PackageVersionStatus int32 - -const ( - PackageVersionStatus_UNKNOWN PackageVersionStatus = 0 - PackageVersionStatus_FROZEN PackageVersionStatus = 1 - PackageVersionStatus_ACTIVE PackageVersionStatus = 2 - PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE PackageVersionStatus = 3 -) - -// Enum value maps for PackageVersionStatus. -var ( - PackageVersionStatus_name = map[int32]string{ - 0: "UNKNOWN", - 1: "FROZEN", - 2: "ACTIVE", - 3: "NEXT_MAJOR_VERSION_CANDIDATE", - } - PackageVersionStatus_value = map[string]int32{ - "UNKNOWN": 0, - "FROZEN": 1, - "ACTIVE": 2, - "NEXT_MAJOR_VERSION_CANDIDATE": 3, - } -) - -func (x PackageVersionStatus) Enum() *PackageVersionStatus { - p := new(PackageVersionStatus) - *p = x - return p -} - -func (x PackageVersionStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PackageVersionStatus) Descriptor() protoreflect.EnumDescriptor { - return file_xds_annotations_v3_status_proto_enumTypes[0].Descriptor() -} - -func (PackageVersionStatus) Type() protoreflect.EnumType { - return &file_xds_annotations_v3_status_proto_enumTypes[0] -} - -func (x PackageVersionStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PackageVersionStatus.Descriptor instead. -func (PackageVersionStatus) EnumDescriptor() ([]byte, []int) { - return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{0} -} - -type FileStatusAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` -} - -func (x *FileStatusAnnotation) Reset() { - *x = FileStatusAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_annotations_v3_status_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FileStatusAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileStatusAnnotation) ProtoMessage() {} - -func (x *FileStatusAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_xds_annotations_v3_status_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FileStatusAnnotation.ProtoReflect.Descriptor instead. -func (*FileStatusAnnotation) Descriptor() ([]byte, []int) { - return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{0} -} - -func (x *FileStatusAnnotation) GetWorkInProgress() bool { - if x != nil { - return x.WorkInProgress - } - return false -} - -type MessageStatusAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` -} - -func (x *MessageStatusAnnotation) Reset() { - *x = MessageStatusAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_annotations_v3_status_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MessageStatusAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MessageStatusAnnotation) ProtoMessage() {} - -func (x *MessageStatusAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_xds_annotations_v3_status_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MessageStatusAnnotation.ProtoReflect.Descriptor instead. -func (*MessageStatusAnnotation) Descriptor() ([]byte, []int) { - return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{1} -} - -func (x *MessageStatusAnnotation) GetWorkInProgress() bool { - if x != nil { - return x.WorkInProgress - } - return false -} - -type FieldStatusAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` -} - -func (x *FieldStatusAnnotation) Reset() { - *x = FieldStatusAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_annotations_v3_status_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldStatusAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldStatusAnnotation) ProtoMessage() {} - -func (x *FieldStatusAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_xds_annotations_v3_status_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldStatusAnnotation.ProtoReflect.Descriptor instead. -func (*FieldStatusAnnotation) Descriptor() ([]byte, []int) { - return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{2} -} - -func (x *FieldStatusAnnotation) GetWorkInProgress() bool { - if x != nil { - return x.WorkInProgress - } - return false -} - -type StatusAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"` - PackageVersionStatus PackageVersionStatus `protobuf:"varint,2,opt,name=package_version_status,json=packageVersionStatus,proto3,enum=xds.annotations.v3.PackageVersionStatus" json:"package_version_status,omitempty"` -} - -func (x *StatusAnnotation) Reset() { - *x = StatusAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_annotations_v3_status_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatusAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusAnnotation) ProtoMessage() {} - -func (x *StatusAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_xds_annotations_v3_status_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusAnnotation.ProtoReflect.Descriptor instead. -func (*StatusAnnotation) Descriptor() ([]byte, []int) { - return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{3} -} - -func (x *StatusAnnotation) GetWorkInProgress() bool { - if x != nil { - return x.WorkInProgress - } - return false -} - -func (x *StatusAnnotation) GetPackageVersionStatus() PackageVersionStatus { - if x != nil { - return x.PackageVersionStatus - } - return PackageVersionStatus_UNKNOWN -} - -var file_xds_annotations_v3_status_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FileOptions)(nil), - ExtensionType: (*FileStatusAnnotation)(nil), - Field: 226829418, - Name: "xds.annotations.v3.file_status", - Tag: "bytes,226829418,opt,name=file_status", - Filename: "xds/annotations/v3/status.proto", - }, - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*MessageStatusAnnotation)(nil), - Field: 226829418, - Name: "xds.annotations.v3.message_status", - Tag: "bytes,226829418,opt,name=message_status", - Filename: "xds/annotations/v3/status.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*FieldStatusAnnotation)(nil), - Field: 226829418, - Name: "xds.annotations.v3.field_status", - Tag: "bytes,226829418,opt,name=field_status", - Filename: "xds/annotations/v3/status.proto", - }, -} - -// Extension fields to descriptorpb.FileOptions. -var ( - // optional xds.annotations.v3.FileStatusAnnotation file_status = 226829418; - E_FileStatus = &file_xds_annotations_v3_status_proto_extTypes[0] -) - -// Extension fields to descriptorpb.MessageOptions. -var ( - // optional xds.annotations.v3.MessageStatusAnnotation message_status = 226829418; - E_MessageStatus = &file_xds_annotations_v3_status_proto_extTypes[1] -) - -// Extension fields to descriptorpb.FieldOptions. -var ( - // optional xds.annotations.v3.FieldStatusAnnotation field_status = 226829418; - E_FieldStatus = &file_xds_annotations_v3_status_proto_extTypes[2] -) - -var File_xds_annotations_v3_status_proto protoreflect.FileDescriptor - -var file_xds_annotations_v3_status_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x14, 0x46, 0x69, 0x6c, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49, - 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x43, 0x0a, 0x17, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x5f, - 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, - 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x41, - 0x0a, 0x15, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f, - 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, - 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x5e, 0x0a, 0x16, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x14, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2a, 0x5d, 0x0a, 0x14, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52, 0x4f, 0x5a, 0x45, 0x4e, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x20, 0x0a, - 0x1c, 0x4e, 0x45, 0x58, 0x54, 0x5f, 0x4d, 0x41, 0x4a, 0x4f, 0x52, 0x5f, 0x56, 0x45, 0x52, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x3a, - 0x6a, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xea, 0xc8, 0x94, - 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x76, 0x0a, 0x0e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xea, - 0xc8, 0x94, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x3a, 0x6e, 0x0a, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0xea, 0xc8, 0x94, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x78, 0x64, - 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, - 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_annotations_v3_status_proto_rawDescOnce sync.Once - file_xds_annotations_v3_status_proto_rawDescData = file_xds_annotations_v3_status_proto_rawDesc -) - -func file_xds_annotations_v3_status_proto_rawDescGZIP() []byte { - file_xds_annotations_v3_status_proto_rawDescOnce.Do(func() { - file_xds_annotations_v3_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_status_proto_rawDescData) - }) - return file_xds_annotations_v3_status_proto_rawDescData -} - -var file_xds_annotations_v3_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_xds_annotations_v3_status_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_xds_annotations_v3_status_proto_goTypes = []interface{}{ - (PackageVersionStatus)(0), // 0: xds.annotations.v3.PackageVersionStatus - (*FileStatusAnnotation)(nil), // 1: xds.annotations.v3.FileStatusAnnotation - (*MessageStatusAnnotation)(nil), // 2: xds.annotations.v3.MessageStatusAnnotation - (*FieldStatusAnnotation)(nil), // 3: xds.annotations.v3.FieldStatusAnnotation - (*StatusAnnotation)(nil), // 4: xds.annotations.v3.StatusAnnotation - (*descriptorpb.FileOptions)(nil), // 5: google.protobuf.FileOptions - (*descriptorpb.MessageOptions)(nil), // 6: google.protobuf.MessageOptions - (*descriptorpb.FieldOptions)(nil), // 7: google.protobuf.FieldOptions -} -var file_xds_annotations_v3_status_proto_depIdxs = []int32{ - 0, // 0: xds.annotations.v3.StatusAnnotation.package_version_status:type_name -> xds.annotations.v3.PackageVersionStatus - 5, // 1: xds.annotations.v3.file_status:extendee -> google.protobuf.FileOptions - 6, // 2: xds.annotations.v3.message_status:extendee -> google.protobuf.MessageOptions - 7, // 3: xds.annotations.v3.field_status:extendee -> google.protobuf.FieldOptions - 1, // 4: xds.annotations.v3.file_status:type_name -> xds.annotations.v3.FileStatusAnnotation - 2, // 5: xds.annotations.v3.message_status:type_name -> xds.annotations.v3.MessageStatusAnnotation - 3, // 6: xds.annotations.v3.field_status:type_name -> xds.annotations.v3.FieldStatusAnnotation - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 4, // [4:7] is the sub-list for extension type_name - 1, // [1:4] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_xds_annotations_v3_status_proto_init() } -func file_xds_annotations_v3_status_proto_init() { - if File_xds_annotations_v3_status_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_annotations_v3_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FileStatusAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_annotations_v3_status_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageStatusAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_annotations_v3_status_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldStatusAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_annotations_v3_status_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_annotations_v3_status_proto_rawDesc, - NumEnums: 1, - NumMessages: 4, - NumExtensions: 3, - NumServices: 0, - }, - GoTypes: file_xds_annotations_v3_status_proto_goTypes, - DependencyIndexes: file_xds_annotations_v3_status_proto_depIdxs, - EnumInfos: file_xds_annotations_v3_status_proto_enumTypes, - MessageInfos: file_xds_annotations_v3_status_proto_msgTypes, - ExtensionInfos: file_xds_annotations_v3_status_proto_extTypes, - }.Build() - File_xds_annotations_v3_status_proto = out.File - file_xds_annotations_v3_status_proto_rawDesc = nil - file_xds_annotations_v3_status_proto_goTypes = nil - file_xds_annotations_v3_status_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.validate.go deleted file mode 100644 index a87dbee8d85..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.validate.go +++ /dev/null @@ -1,452 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/annotations/v3/status.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on FileStatusAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FileStatusAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FileStatusAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FileStatusAnnotationMultiError, or nil if none found. -func (m *FileStatusAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *FileStatusAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for WorkInProgress - - if len(errors) > 0 { - return FileStatusAnnotationMultiError(errors) - } - - return nil -} - -// FileStatusAnnotationMultiError is an error wrapping multiple validation -// errors returned by FileStatusAnnotation.ValidateAll() if the designated -// constraints aren't met. -type FileStatusAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FileStatusAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FileStatusAnnotationMultiError) AllErrors() []error { return m } - -// FileStatusAnnotationValidationError is the validation error returned by -// FileStatusAnnotation.Validate if the designated constraints aren't met. -type FileStatusAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FileStatusAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FileStatusAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FileStatusAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FileStatusAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FileStatusAnnotationValidationError) ErrorName() string { - return "FileStatusAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e FileStatusAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFileStatusAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FileStatusAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FileStatusAnnotationValidationError{} - -// Validate checks the field values on MessageStatusAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *MessageStatusAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MessageStatusAnnotation with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MessageStatusAnnotationMultiError, or nil if none found. -func (m *MessageStatusAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *MessageStatusAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for WorkInProgress - - if len(errors) > 0 { - return MessageStatusAnnotationMultiError(errors) - } - - return nil -} - -// MessageStatusAnnotationMultiError is an error wrapping multiple validation -// errors returned by MessageStatusAnnotation.ValidateAll() if the designated -// constraints aren't met. -type MessageStatusAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MessageStatusAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MessageStatusAnnotationMultiError) AllErrors() []error { return m } - -// MessageStatusAnnotationValidationError is the validation error returned by -// MessageStatusAnnotation.Validate if the designated constraints aren't met. -type MessageStatusAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MessageStatusAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MessageStatusAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MessageStatusAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MessageStatusAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MessageStatusAnnotationValidationError) ErrorName() string { - return "MessageStatusAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e MessageStatusAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMessageStatusAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MessageStatusAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MessageStatusAnnotationValidationError{} - -// Validate checks the field values on FieldStatusAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FieldStatusAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FieldStatusAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FieldStatusAnnotationMultiError, or nil if none found. -func (m *FieldStatusAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *FieldStatusAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for WorkInProgress - - if len(errors) > 0 { - return FieldStatusAnnotationMultiError(errors) - } - - return nil -} - -// FieldStatusAnnotationMultiError is an error wrapping multiple validation -// errors returned by FieldStatusAnnotation.ValidateAll() if the designated -// constraints aren't met. -type FieldStatusAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FieldStatusAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FieldStatusAnnotationMultiError) AllErrors() []error { return m } - -// FieldStatusAnnotationValidationError is the validation error returned by -// FieldStatusAnnotation.Validate if the designated constraints aren't met. -type FieldStatusAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FieldStatusAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FieldStatusAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FieldStatusAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FieldStatusAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FieldStatusAnnotationValidationError) ErrorName() string { - return "FieldStatusAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e FieldStatusAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFieldStatusAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FieldStatusAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FieldStatusAnnotationValidationError{} - -// Validate checks the field values on StatusAnnotation with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *StatusAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on StatusAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// StatusAnnotationMultiError, or nil if none found. -func (m *StatusAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *StatusAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for WorkInProgress - - // no validation rules for PackageVersionStatus - - if len(errors) > 0 { - return StatusAnnotationMultiError(errors) - } - - return nil -} - -// StatusAnnotationMultiError is an error wrapping multiple validation errors -// returned by StatusAnnotation.ValidateAll() if the designated constraints -// aren't met. -type StatusAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m StatusAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m StatusAnnotationMultiError) AllErrors() []error { return m } - -// StatusAnnotationValidationError is the validation error returned by -// StatusAnnotation.Validate if the designated constraints aren't met. -type StatusAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StatusAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StatusAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StatusAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StatusAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StatusAnnotationValidationError) ErrorName() string { return "StatusAnnotationValidationError" } - -// Error satisfies the builtin error interface -func (e StatusAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStatusAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StatusAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StatusAnnotationValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.go deleted file mode 100644 index 2307dc874a4..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/annotations/v3/versioning.proto - -package v3 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type VersioningAnnotation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"` -} - -func (x *VersioningAnnotation) Reset() { - *x = VersioningAnnotation{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_annotations_v3_versioning_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VersioningAnnotation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersioningAnnotation) ProtoMessage() {} - -func (x *VersioningAnnotation) ProtoReflect() protoreflect.Message { - mi := &file_xds_annotations_v3_versioning_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersioningAnnotation.ProtoReflect.Descriptor instead. -func (*VersioningAnnotation) Descriptor() ([]byte, []int) { - return file_xds_annotations_v3_versioning_proto_rawDescGZIP(), []int{0} -} - -func (x *VersioningAnnotation) GetPreviousMessageType() string { - if x != nil { - return x.PreviousMessageType - } - return "" -} - -var file_xds_annotations_v3_versioning_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*VersioningAnnotation)(nil), - Field: 92389011, - Name: "xds.annotations.v3.versioning", - Tag: "bytes,92389011,opt,name=versioning", - Filename: "xds/annotations/v3/versioning.proto", - }, -} - -// Extension fields to descriptorpb.MessageOptions. -var ( - // optional xds.annotations.v3.VersioningAnnotation versioning = 92389011; - E_Versioning = &file_xds_annotations_v3_versioning_proto_extTypes[0] -) - -var File_xds_annotations_v3_versioning_proto protoreflect.FileDescriptor - -var file_xds_annotations_v3_versioning_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x14, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x6c, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x93, 0xfd, 0x86, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, - 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_annotations_v3_versioning_proto_rawDescOnce sync.Once - file_xds_annotations_v3_versioning_proto_rawDescData = file_xds_annotations_v3_versioning_proto_rawDesc -) - -func file_xds_annotations_v3_versioning_proto_rawDescGZIP() []byte { - file_xds_annotations_v3_versioning_proto_rawDescOnce.Do(func() { - file_xds_annotations_v3_versioning_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_versioning_proto_rawDescData) - }) - return file_xds_annotations_v3_versioning_proto_rawDescData -} - -var file_xds_annotations_v3_versioning_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_xds_annotations_v3_versioning_proto_goTypes = []interface{}{ - (*VersioningAnnotation)(nil), // 0: xds.annotations.v3.VersioningAnnotation - (*descriptorpb.MessageOptions)(nil), // 1: google.protobuf.MessageOptions -} -var file_xds_annotations_v3_versioning_proto_depIdxs = []int32{ - 1, // 0: xds.annotations.v3.versioning:extendee -> google.protobuf.MessageOptions - 0, // 1: xds.annotations.v3.versioning:type_name -> xds.annotations.v3.VersioningAnnotation - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 1, // [1:2] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_xds_annotations_v3_versioning_proto_init() } -func file_xds_annotations_v3_versioning_proto_init() { - if File_xds_annotations_v3_versioning_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_annotations_v3_versioning_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersioningAnnotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_annotations_v3_versioning_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_xds_annotations_v3_versioning_proto_goTypes, - DependencyIndexes: file_xds_annotations_v3_versioning_proto_depIdxs, - MessageInfos: file_xds_annotations_v3_versioning_proto_msgTypes, - ExtensionInfos: file_xds_annotations_v3_versioning_proto_extTypes, - }.Build() - File_xds_annotations_v3_versioning_proto = out.File - file_xds_annotations_v3_versioning_proto_rawDesc = nil - file_xds_annotations_v3_versioning_proto_goTypes = nil - file_xds_annotations_v3_versioning_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.validate.go deleted file mode 100644 index 042c266e13d..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.validate.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/annotations/v3/versioning.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on VersioningAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *VersioningAnnotation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on VersioningAnnotation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// VersioningAnnotationMultiError, or nil if none found. -func (m *VersioningAnnotation) ValidateAll() error { - return m.validate(true) -} - -func (m *VersioningAnnotation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for PreviousMessageType - - if len(errors) > 0 { - return VersioningAnnotationMultiError(errors) - } - - return nil -} - -// VersioningAnnotationMultiError is an error wrapping multiple validation -// errors returned by VersioningAnnotation.ValidateAll() if the designated -// constraints aren't met. -type VersioningAnnotationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m VersioningAnnotationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m VersioningAnnotationMultiError) AllErrors() []error { return m } - -// VersioningAnnotationValidationError is the validation error returned by -// VersioningAnnotation.Validate if the designated constraints aren't met. -type VersioningAnnotationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e VersioningAnnotationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e VersioningAnnotationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e VersioningAnnotationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e VersioningAnnotationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e VersioningAnnotationValidationError) ErrorName() string { - return "VersioningAnnotationValidationError" -} - -// Error satisfies the builtin error interface -func (e VersioningAnnotationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sVersioningAnnotation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = VersioningAnnotationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = VersioningAnnotationValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.go deleted file mode 100644 index 3c361216c0d..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/core/v3/authority.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Authority struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Authority) Reset() { - *x = Authority{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_core_v3_authority_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Authority) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Authority) ProtoMessage() {} - -func (x *Authority) ProtoReflect() protoreflect.Message { - mi := &file_xds_core_v3_authority_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Authority.ProtoReflect.Descriptor instead. -func (*Authority) Descriptor() ([]byte, []int) { - return file_xds_core_v3_authority_proto_rawDescGZIP(), []int{0} -} - -func (x *Authority) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -var File_xds_core_v3_authority_proto protoreflect.FileDescriptor - -var file_xds_core_v3_authority_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, - 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x56, - 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x42, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_core_v3_authority_proto_rawDescOnce sync.Once - file_xds_core_v3_authority_proto_rawDescData = file_xds_core_v3_authority_proto_rawDesc -) - -func file_xds_core_v3_authority_proto_rawDescGZIP() []byte { - file_xds_core_v3_authority_proto_rawDescOnce.Do(func() { - file_xds_core_v3_authority_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_authority_proto_rawDescData) - }) - return file_xds_core_v3_authority_proto_rawDescData -} - -var file_xds_core_v3_authority_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_xds_core_v3_authority_proto_goTypes = []interface{}{ - (*Authority)(nil), // 0: xds.core.v3.Authority -} -var file_xds_core_v3_authority_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_xds_core_v3_authority_proto_init() } -func file_xds_core_v3_authority_proto_init() { - if File_xds_core_v3_authority_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_core_v3_authority_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Authority); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_core_v3_authority_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_core_v3_authority_proto_goTypes, - DependencyIndexes: file_xds_core_v3_authority_proto_depIdxs, - MessageInfos: file_xds_core_v3_authority_proto_msgTypes, - }.Build() - File_xds_core_v3_authority_proto = out.File - file_xds_core_v3_authority_proto_rawDesc = nil - file_xds_core_v3_authority_proto_goTypes = nil - file_xds_core_v3_authority_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.validate.go deleted file mode 100644 index 94317c2af04..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.validate.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/core/v3/authority.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Authority with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Authority) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Authority with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in AuthorityMultiError, or nil -// if none found. -func (m *Authority) ValidateAll() error { - return m.validate(true) -} - -func (m *Authority) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := AuthorityValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return AuthorityMultiError(errors) - } - - return nil -} - -// AuthorityMultiError is an error wrapping multiple validation errors returned -// by Authority.ValidateAll() if the designated constraints aren't met. -type AuthorityMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AuthorityMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AuthorityMultiError) AllErrors() []error { return m } - -// AuthorityValidationError is the validation error returned by -// Authority.Validate if the designated constraints aren't met. -type AuthorityValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AuthorityValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AuthorityValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AuthorityValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AuthorityValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AuthorityValidationError) ErrorName() string { return "AuthorityValidationError" } - -// Error satisfies the builtin error interface -func (e AuthorityValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAuthority.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AuthorityValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AuthorityValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.go deleted file mode 100644 index d7be5c4d27f..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/core/v3/cidr.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CidrRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressPrefix string `protobuf:"bytes,1,opt,name=address_prefix,json=addressPrefix,proto3" json:"address_prefix,omitempty"` - PrefixLen *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` -} - -func (x *CidrRange) Reset() { - *x = CidrRange{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_core_v3_cidr_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CidrRange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CidrRange) ProtoMessage() {} - -func (x *CidrRange) ProtoReflect() protoreflect.Message { - mi := &file_xds_core_v3_cidr_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CidrRange.ProtoReflect.Descriptor instead. -func (*CidrRange) Descriptor() ([]byte, []int) { - return file_xds_core_v3_cidr_proto_rawDescGZIP(), []int{0} -} - -func (x *CidrRange) GetAddressPrefix() string { - if x != nil { - return x.AddressPrefix - } - return "" -} - -func (x *CidrRange) GetPrefixLen() *wrapperspb.UInt32Value { - if x != nil { - return x.PrefixLen - } - return nil -} - -var File_xds_core_v3_cidr_proto protoreflect.FileDescriptor - -var file_xds_core_v3_cidr_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x69, - 0x64, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x82, 0x01, 0x0a, 0x09, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2e, 0x0a, - 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x45, 0x0a, - 0x0a, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x18, 0x80, 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x4c, 0x65, 0x6e, 0x42, 0x56, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, - 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, - 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_core_v3_cidr_proto_rawDescOnce sync.Once - file_xds_core_v3_cidr_proto_rawDescData = file_xds_core_v3_cidr_proto_rawDesc -) - -func file_xds_core_v3_cidr_proto_rawDescGZIP() []byte { - file_xds_core_v3_cidr_proto_rawDescOnce.Do(func() { - file_xds_core_v3_cidr_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_cidr_proto_rawDescData) - }) - return file_xds_core_v3_cidr_proto_rawDescData -} - -var file_xds_core_v3_cidr_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_xds_core_v3_cidr_proto_goTypes = []interface{}{ - (*CidrRange)(nil), // 0: xds.core.v3.CidrRange - (*wrapperspb.UInt32Value)(nil), // 1: google.protobuf.UInt32Value -} -var file_xds_core_v3_cidr_proto_depIdxs = []int32{ - 1, // 0: xds.core.v3.CidrRange.prefix_len:type_name -> google.protobuf.UInt32Value - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_xds_core_v3_cidr_proto_init() } -func file_xds_core_v3_cidr_proto_init() { - if File_xds_core_v3_cidr_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_core_v3_cidr_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CidrRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_core_v3_cidr_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_core_v3_cidr_proto_goTypes, - DependencyIndexes: file_xds_core_v3_cidr_proto_depIdxs, - MessageInfos: file_xds_core_v3_cidr_proto_msgTypes, - }.Build() - File_xds_core_v3_cidr_proto = out.File - file_xds_core_v3_cidr_proto_rawDesc = nil - file_xds_core_v3_cidr_proto_goTypes = nil - file_xds_core_v3_cidr_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.validate.go deleted file mode 100644 index 43327f56b5e..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.validate.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/core/v3/cidr.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on CidrRange with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *CidrRange) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CidrRange with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in CidrRangeMultiError, or nil -// if none found. -func (m *CidrRange) ValidateAll() error { - return m.validate(true) -} - -func (m *CidrRange) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetAddressPrefix()) < 1 { - err := CidrRangeValidationError{ - field: "AddressPrefix", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if wrapper := m.GetPrefixLen(); wrapper != nil { - - if wrapper.GetValue() > 128 { - err := CidrRangeValidationError{ - field: "PrefixLen", - reason: "value must be less than or equal to 128", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(errors) > 0 { - return CidrRangeMultiError(errors) - } - - return nil -} - -// CidrRangeMultiError is an error wrapping multiple validation errors returned -// by CidrRange.ValidateAll() if the designated constraints aren't met. -type CidrRangeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CidrRangeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CidrRangeMultiError) AllErrors() []error { return m } - -// CidrRangeValidationError is the validation error returned by -// CidrRange.Validate if the designated constraints aren't met. -type CidrRangeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CidrRangeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CidrRangeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CidrRangeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CidrRangeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CidrRangeValidationError) ErrorName() string { return "CidrRangeValidationError" } - -// Error satisfies the builtin error interface -func (e CidrRangeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCidrRange.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CidrRangeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CidrRangeValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.go deleted file mode 100644 index 52b520af4ea..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.go +++ /dev/null @@ -1,297 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/core/v3/collection_entry.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CollectionEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ResourceSpecifier: - // - // *CollectionEntry_Locator - // *CollectionEntry_InlineEntry_ - ResourceSpecifier isCollectionEntry_ResourceSpecifier `protobuf_oneof:"resource_specifier"` -} - -func (x *CollectionEntry) Reset() { - *x = CollectionEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_core_v3_collection_entry_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CollectionEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CollectionEntry) ProtoMessage() {} - -func (x *CollectionEntry) ProtoReflect() protoreflect.Message { - mi := &file_xds_core_v3_collection_entry_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CollectionEntry.ProtoReflect.Descriptor instead. -func (*CollectionEntry) Descriptor() ([]byte, []int) { - return file_xds_core_v3_collection_entry_proto_rawDescGZIP(), []int{0} -} - -func (m *CollectionEntry) GetResourceSpecifier() isCollectionEntry_ResourceSpecifier { - if m != nil { - return m.ResourceSpecifier - } - return nil -} - -func (x *CollectionEntry) GetLocator() *ResourceLocator { - if x, ok := x.GetResourceSpecifier().(*CollectionEntry_Locator); ok { - return x.Locator - } - return nil -} - -func (x *CollectionEntry) GetInlineEntry() *CollectionEntry_InlineEntry { - if x, ok := x.GetResourceSpecifier().(*CollectionEntry_InlineEntry_); ok { - return x.InlineEntry - } - return nil -} - -type isCollectionEntry_ResourceSpecifier interface { - isCollectionEntry_ResourceSpecifier() -} - -type CollectionEntry_Locator struct { - Locator *ResourceLocator `protobuf:"bytes,1,opt,name=locator,proto3,oneof"` -} - -type CollectionEntry_InlineEntry_ struct { - InlineEntry *CollectionEntry_InlineEntry `protobuf:"bytes,2,opt,name=inline_entry,json=inlineEntry,proto3,oneof"` -} - -func (*CollectionEntry_Locator) isCollectionEntry_ResourceSpecifier() {} - -func (*CollectionEntry_InlineEntry_) isCollectionEntry_ResourceSpecifier() {} - -type CollectionEntry_InlineEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Resource *anypb.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` -} - -func (x *CollectionEntry_InlineEntry) Reset() { - *x = CollectionEntry_InlineEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_core_v3_collection_entry_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CollectionEntry_InlineEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CollectionEntry_InlineEntry) ProtoMessage() {} - -func (x *CollectionEntry_InlineEntry) ProtoReflect() protoreflect.Message { - mi := &file_xds_core_v3_collection_entry_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CollectionEntry_InlineEntry.ProtoReflect.Descriptor instead. -func (*CollectionEntry_InlineEntry) Descriptor() ([]byte, []int) { - return file_xds_core_v3_collection_entry_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *CollectionEntry_InlineEntry) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CollectionEntry_InlineEntry) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *CollectionEntry_InlineEntry) GetResource() *anypb.Any { - if x != nil { - return x.Resource - } - return nil -} - -var File_xds_core_v3_collection_entry_proto protoreflect.FileDescriptor - -var file_xds_core_v3_collection_entry_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, - 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, - 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x78, - 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x02, 0x0a, 0x0f, 0x43, - 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x38, - 0x0a, 0x07, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, - 0x07, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4d, 0x0a, 0x0c, 0x69, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6c, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x49, 0x6e, 0x6c, - 0x69, 0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x1a, 0x8b, 0x01, 0x0a, 0x0b, 0x49, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1c, 0xfa, 0x42, 0x19, 0x72, 0x17, 0x32, 0x15, 0x5e, 0x5b, - 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x5f, 0x5c, 0x2d, 0x5c, 0x2e, 0x7e, 0x3a, - 0x5d, 0x2b, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x19, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x42, 0x5c, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x42, 0x14, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, - 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_core_v3_collection_entry_proto_rawDescOnce sync.Once - file_xds_core_v3_collection_entry_proto_rawDescData = file_xds_core_v3_collection_entry_proto_rawDesc -) - -func file_xds_core_v3_collection_entry_proto_rawDescGZIP() []byte { - file_xds_core_v3_collection_entry_proto_rawDescOnce.Do(func() { - file_xds_core_v3_collection_entry_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_collection_entry_proto_rawDescData) - }) - return file_xds_core_v3_collection_entry_proto_rawDescData -} - -var file_xds_core_v3_collection_entry_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_xds_core_v3_collection_entry_proto_goTypes = []interface{}{ - (*CollectionEntry)(nil), // 0: xds.core.v3.CollectionEntry - (*CollectionEntry_InlineEntry)(nil), // 1: xds.core.v3.CollectionEntry.InlineEntry - (*ResourceLocator)(nil), // 2: xds.core.v3.ResourceLocator - (*anypb.Any)(nil), // 3: google.protobuf.Any -} -var file_xds_core_v3_collection_entry_proto_depIdxs = []int32{ - 2, // 0: xds.core.v3.CollectionEntry.locator:type_name -> xds.core.v3.ResourceLocator - 1, // 1: xds.core.v3.CollectionEntry.inline_entry:type_name -> xds.core.v3.CollectionEntry.InlineEntry - 3, // 2: xds.core.v3.CollectionEntry.InlineEntry.resource:type_name -> google.protobuf.Any - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_xds_core_v3_collection_entry_proto_init() } -func file_xds_core_v3_collection_entry_proto_init() { - if File_xds_core_v3_collection_entry_proto != nil { - return - } - file_xds_core_v3_resource_locator_proto_init() - if !protoimpl.UnsafeEnabled { - file_xds_core_v3_collection_entry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CollectionEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_core_v3_collection_entry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CollectionEntry_InlineEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_xds_core_v3_collection_entry_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*CollectionEntry_Locator)(nil), - (*CollectionEntry_InlineEntry_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_core_v3_collection_entry_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_core_v3_collection_entry_proto_goTypes, - DependencyIndexes: file_xds_core_v3_collection_entry_proto_depIdxs, - MessageInfos: file_xds_core_v3_collection_entry_proto_msgTypes, - }.Build() - File_xds_core_v3_collection_entry_proto = out.File - file_xds_core_v3_collection_entry_proto_rawDesc = nil - file_xds_core_v3_collection_entry_proto_goTypes = nil - file_xds_core_v3_collection_entry_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.validate.go deleted file mode 100644 index 610990b7fec..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.validate.go +++ /dev/null @@ -1,383 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/core/v3/collection_entry.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on CollectionEntry with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CollectionEntry) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CollectionEntry with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CollectionEntryMultiError, or nil if none found. -func (m *CollectionEntry) ValidateAll() error { - return m.validate(true) -} - -func (m *CollectionEntry) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofResourceSpecifierPresent := false - switch v := m.ResourceSpecifier.(type) { - case *CollectionEntry_Locator: - if v == nil { - err := CollectionEntryValidationError{ - field: "ResourceSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofResourceSpecifierPresent = true - - if all { - switch v := interface{}(m.GetLocator()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CollectionEntryValidationError{ - field: "Locator", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CollectionEntryValidationError{ - field: "Locator", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLocator()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CollectionEntryValidationError{ - field: "Locator", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CollectionEntry_InlineEntry_: - if v == nil { - err := CollectionEntryValidationError{ - field: "ResourceSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofResourceSpecifierPresent = true - - if all { - switch v := interface{}(m.GetInlineEntry()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CollectionEntryValidationError{ - field: "InlineEntry", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CollectionEntryValidationError{ - field: "InlineEntry", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetInlineEntry()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CollectionEntryValidationError{ - field: "InlineEntry", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofResourceSpecifierPresent { - err := CollectionEntryValidationError{ - field: "ResourceSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return CollectionEntryMultiError(errors) - } - - return nil -} - -// CollectionEntryMultiError is an error wrapping multiple validation errors -// returned by CollectionEntry.ValidateAll() if the designated constraints -// aren't met. -type CollectionEntryMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CollectionEntryMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CollectionEntryMultiError) AllErrors() []error { return m } - -// CollectionEntryValidationError is the validation error returned by -// CollectionEntry.Validate if the designated constraints aren't met. -type CollectionEntryValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CollectionEntryValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CollectionEntryValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CollectionEntryValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CollectionEntryValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CollectionEntryValidationError) ErrorName() string { return "CollectionEntryValidationError" } - -// Error satisfies the builtin error interface -func (e CollectionEntryValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCollectionEntry.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CollectionEntryValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CollectionEntryValidationError{} - -// Validate checks the field values on CollectionEntry_InlineEntry with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CollectionEntry_InlineEntry) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CollectionEntry_InlineEntry with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CollectionEntry_InlineEntryMultiError, or nil if none found. -func (m *CollectionEntry_InlineEntry) ValidateAll() error { - return m.validate(true) -} - -func (m *CollectionEntry_InlineEntry) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if !_CollectionEntry_InlineEntry_Name_Pattern.MatchString(m.GetName()) { - err := CollectionEntry_InlineEntryValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^[0-9a-zA-Z_\\\\-\\\\.~:]+$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Version - - if all { - switch v := interface{}(m.GetResource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CollectionEntry_InlineEntryValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CollectionEntry_InlineEntryValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CollectionEntry_InlineEntryValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CollectionEntry_InlineEntryMultiError(errors) - } - - return nil -} - -// CollectionEntry_InlineEntryMultiError is an error wrapping multiple -// validation errors returned by CollectionEntry_InlineEntry.ValidateAll() if -// the designated constraints aren't met. -type CollectionEntry_InlineEntryMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CollectionEntry_InlineEntryMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CollectionEntry_InlineEntryMultiError) AllErrors() []error { return m } - -// CollectionEntry_InlineEntryValidationError is the validation error returned -// by CollectionEntry_InlineEntry.Validate if the designated constraints -// aren't met. -type CollectionEntry_InlineEntryValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CollectionEntry_InlineEntryValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CollectionEntry_InlineEntryValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CollectionEntry_InlineEntryValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CollectionEntry_InlineEntryValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CollectionEntry_InlineEntryValidationError) ErrorName() string { - return "CollectionEntry_InlineEntryValidationError" -} - -// Error satisfies the builtin error interface -func (e CollectionEntry_InlineEntryValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCollectionEntry_InlineEntry.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CollectionEntry_InlineEntryValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CollectionEntry_InlineEntryValidationError{} - -var _CollectionEntry_InlineEntry_Name_Pattern = regexp.MustCompile("^[0-9a-zA-Z_\\-\\.~:]+$") diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.go deleted file mode 100644 index 563775a1fb5..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/core/v3/context_params.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ContextParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Params map[string]string `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *ContextParams) Reset() { - *x = ContextParams{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_core_v3_context_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ContextParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContextParams) ProtoMessage() {} - -func (x *ContextParams) ProtoReflect() protoreflect.Message { - mi := &file_xds_core_v3_context_params_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContextParams.ProtoReflect.Descriptor instead. -func (*ContextParams) Descriptor() ([]byte, []int) { - return file_xds_core_v3_context_params_proto_rawDescGZIP(), []int{0} -} - -func (x *ContextParams) GetParams() map[string]string { - if x != nil { - return x.Params - } - return nil -} - -var File_xds_core_v3_context_params_proto protoreflect.FileDescriptor - -var file_xds_core_v3_context_params_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, - 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x8a, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x5a, 0xd2, - 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, - 0x12, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, - 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_xds_core_v3_context_params_proto_rawDescOnce sync.Once - file_xds_core_v3_context_params_proto_rawDescData = file_xds_core_v3_context_params_proto_rawDesc -) - -func file_xds_core_v3_context_params_proto_rawDescGZIP() []byte { - file_xds_core_v3_context_params_proto_rawDescOnce.Do(func() { - file_xds_core_v3_context_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_context_params_proto_rawDescData) - }) - return file_xds_core_v3_context_params_proto_rawDescData -} - -var file_xds_core_v3_context_params_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_xds_core_v3_context_params_proto_goTypes = []interface{}{ - (*ContextParams)(nil), // 0: xds.core.v3.ContextParams - nil, // 1: xds.core.v3.ContextParams.ParamsEntry -} -var file_xds_core_v3_context_params_proto_depIdxs = []int32{ - 1, // 0: xds.core.v3.ContextParams.params:type_name -> xds.core.v3.ContextParams.ParamsEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_xds_core_v3_context_params_proto_init() } -func file_xds_core_v3_context_params_proto_init() { - if File_xds_core_v3_context_params_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_core_v3_context_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_core_v3_context_params_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_core_v3_context_params_proto_goTypes, - DependencyIndexes: file_xds_core_v3_context_params_proto_depIdxs, - MessageInfos: file_xds_core_v3_context_params_proto_msgTypes, - }.Build() - File_xds_core_v3_context_params_proto = out.File - file_xds_core_v3_context_params_proto_rawDesc = nil - file_xds_core_v3_context_params_proto_goTypes = nil - file_xds_core_v3_context_params_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.validate.go deleted file mode 100644 index 1c9accaa3a0..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.validate.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/core/v3/context_params.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ContextParams with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ContextParams) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ContextParams with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ContextParamsMultiError, or -// nil if none found. -func (m *ContextParams) ValidateAll() error { - return m.validate(true) -} - -func (m *ContextParams) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Params - - if len(errors) > 0 { - return ContextParamsMultiError(errors) - } - - return nil -} - -// ContextParamsMultiError is an error wrapping multiple validation errors -// returned by ContextParams.ValidateAll() if the designated constraints -// aren't met. -type ContextParamsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ContextParamsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ContextParamsMultiError) AllErrors() []error { return m } - -// ContextParamsValidationError is the validation error returned by -// ContextParams.Validate if the designated constraints aren't met. -type ContextParamsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ContextParamsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ContextParamsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ContextParamsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ContextParamsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ContextParamsValidationError) ErrorName() string { return "ContextParamsValidationError" } - -// Error satisfies the builtin error interface -func (e ContextParamsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sContextParams.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ContextParamsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ContextParamsValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.go deleted file mode 100644 index 476fa47c23e..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/core/v3/extension.proto - -package v3 - -import ( - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TypedExtensionConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - TypedConfig *anypb.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` -} - -func (x *TypedExtensionConfig) Reset() { - *x = TypedExtensionConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_core_v3_extension_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TypedExtensionConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TypedExtensionConfig) ProtoMessage() {} - -func (x *TypedExtensionConfig) ProtoReflect() protoreflect.Message { - mi := &file_xds_core_v3_extension_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TypedExtensionConfig.ProtoReflect.Descriptor instead. -func (*TypedExtensionConfig) Descriptor() ([]byte, []int) { - return file_xds_core_v3_extension_proto_rawDescGZIP(), []int{0} -} - -func (x *TypedExtensionConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TypedExtensionConfig) GetTypedConfig() *anypb.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -var File_xds_core_v3_extension_proto protoreflect.FileDescriptor - -var file_xds_core_v3_extension_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, - 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x76, - 0x0a, 0x14, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4e, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x42, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_core_v3_extension_proto_rawDescOnce sync.Once - file_xds_core_v3_extension_proto_rawDescData = file_xds_core_v3_extension_proto_rawDesc -) - -func file_xds_core_v3_extension_proto_rawDescGZIP() []byte { - file_xds_core_v3_extension_proto_rawDescOnce.Do(func() { - file_xds_core_v3_extension_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_extension_proto_rawDescData) - }) - return file_xds_core_v3_extension_proto_rawDescData -} - -var file_xds_core_v3_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_xds_core_v3_extension_proto_goTypes = []interface{}{ - (*TypedExtensionConfig)(nil), // 0: xds.core.v3.TypedExtensionConfig - (*anypb.Any)(nil), // 1: google.protobuf.Any -} -var file_xds_core_v3_extension_proto_depIdxs = []int32{ - 1, // 0: xds.core.v3.TypedExtensionConfig.typed_config:type_name -> google.protobuf.Any - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_xds_core_v3_extension_proto_init() } -func file_xds_core_v3_extension_proto_init() { - if File_xds_core_v3_extension_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_core_v3_extension_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TypedExtensionConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_core_v3_extension_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_core_v3_extension_proto_goTypes, - DependencyIndexes: file_xds_core_v3_extension_proto_depIdxs, - MessageInfos: file_xds_core_v3_extension_proto_msgTypes, - }.Build() - File_xds_core_v3_extension_proto = out.File - file_xds_core_v3_extension_proto_rawDesc = nil - file_xds_core_v3_extension_proto_goTypes = nil - file_xds_core_v3_extension_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.validate.go deleted file mode 100644 index 839f3fef794..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.validate.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/core/v3/extension.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on TypedExtensionConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *TypedExtensionConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TypedExtensionConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// TypedExtensionConfigMultiError, or nil if none found. -func (m *TypedExtensionConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *TypedExtensionConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := TypedExtensionConfigValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetTypedConfig() == nil { - err := TypedExtensionConfigValidationError{ - field: "TypedConfig", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if a := m.GetTypedConfig(); a != nil { - - } - - if len(errors) > 0 { - return TypedExtensionConfigMultiError(errors) - } - - return nil -} - -// TypedExtensionConfigMultiError is an error wrapping multiple validation -// errors returned by TypedExtensionConfig.ValidateAll() if the designated -// constraints aren't met. -type TypedExtensionConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TypedExtensionConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TypedExtensionConfigMultiError) AllErrors() []error { return m } - -// TypedExtensionConfigValidationError is the validation error returned by -// TypedExtensionConfig.Validate if the designated constraints aren't met. -type TypedExtensionConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TypedExtensionConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TypedExtensionConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TypedExtensionConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TypedExtensionConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TypedExtensionConfigValidationError) ErrorName() string { - return "TypedExtensionConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e TypedExtensionConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTypedExtensionConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TypedExtensionConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TypedExtensionConfigValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.go deleted file mode 100644 index 9402230d565..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.go +++ /dev/null @@ -1,182 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/core/v3/resource.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Resource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *ResourceName `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Resource *anypb.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` -} - -func (x *Resource) Reset() { - *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_core_v3_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Resource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Resource) ProtoMessage() {} - -func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_xds_core_v3_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Resource.ProtoReflect.Descriptor instead. -func (*Resource) Descriptor() ([]byte, []int) { - return file_xds_core_v3_resource_proto_rawDescGZIP(), []int{0} -} - -func (x *Resource) GetName() *ResourceName { - if x != nil { - return x.Name - } - return nil -} - -func (x *Resource) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Resource) GetResource() *anypb.Any { - if x != nil { - return x.Resource - } - return nil -} - -var File_xds_core_v3_resource_proto protoreflect.FileDescriptor - -var file_xds_core_v3_resource_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, - 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x55, - 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x42, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, - 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_core_v3_resource_proto_rawDescOnce sync.Once - file_xds_core_v3_resource_proto_rawDescData = file_xds_core_v3_resource_proto_rawDesc -) - -func file_xds_core_v3_resource_proto_rawDescGZIP() []byte { - file_xds_core_v3_resource_proto_rawDescOnce.Do(func() { - file_xds_core_v3_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_resource_proto_rawDescData) - }) - return file_xds_core_v3_resource_proto_rawDescData -} - -var file_xds_core_v3_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_xds_core_v3_resource_proto_goTypes = []interface{}{ - (*Resource)(nil), // 0: xds.core.v3.Resource - (*ResourceName)(nil), // 1: xds.core.v3.ResourceName - (*anypb.Any)(nil), // 2: google.protobuf.Any -} -var file_xds_core_v3_resource_proto_depIdxs = []int32{ - 1, // 0: xds.core.v3.Resource.name:type_name -> xds.core.v3.ResourceName - 2, // 1: xds.core.v3.Resource.resource:type_name -> google.protobuf.Any - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_xds_core_v3_resource_proto_init() } -func file_xds_core_v3_resource_proto_init() { - if File_xds_core_v3_resource_proto != nil { - return - } - file_xds_core_v3_resource_name_proto_init() - if !protoimpl.UnsafeEnabled { - file_xds_core_v3_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_core_v3_resource_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_core_v3_resource_proto_goTypes, - DependencyIndexes: file_xds_core_v3_resource_proto_depIdxs, - MessageInfos: file_xds_core_v3_resource_proto_msgTypes, - }.Build() - File_xds_core_v3_resource_proto = out.File - file_xds_core_v3_resource_proto_rawDesc = nil - file_xds_core_v3_resource_proto_goTypes = nil - file_xds_core_v3_resource_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.validate.go deleted file mode 100644 index dc972171c95..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.validate.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/core/v3/resource.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Resource with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Resource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Resource with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ResourceMultiError, or nil -// if none found. -func (m *Resource) ValidateAll() error { - return m.validate(true) -} - -func (m *Resource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetName()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Name", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Name", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetName()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "Name", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Version - - if all { - switch v := interface{}(m.GetResource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ResourceMultiError(errors) - } - - return nil -} - -// ResourceMultiError is an error wrapping multiple validation errors returned -// by Resource.ValidateAll() if the designated constraints aren't met. -type ResourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResourceMultiError) AllErrors() []error { return m } - -// ResourceValidationError is the validation error returned by -// Resource.Validate if the designated constraints aren't met. -type ResourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourceValidationError) ErrorName() string { return "ResourceValidationError" } - -// Error satisfies the builtin error interface -func (e ResourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourceValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.go deleted file mode 100644 index 50fe599dbfe..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.go +++ /dev/null @@ -1,406 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/core/v3/resource_locator.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ResourceLocator_Scheme int32 - -const ( - ResourceLocator_XDSTP ResourceLocator_Scheme = 0 - ResourceLocator_HTTP ResourceLocator_Scheme = 1 - ResourceLocator_FILE ResourceLocator_Scheme = 2 -) - -// Enum value maps for ResourceLocator_Scheme. -var ( - ResourceLocator_Scheme_name = map[int32]string{ - 0: "XDSTP", - 1: "HTTP", - 2: "FILE", - } - ResourceLocator_Scheme_value = map[string]int32{ - "XDSTP": 0, - "HTTP": 1, - "FILE": 2, - } -) - -func (x ResourceLocator_Scheme) Enum() *ResourceLocator_Scheme { - p := new(ResourceLocator_Scheme) - *p = x - return p -} - -func (x ResourceLocator_Scheme) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ResourceLocator_Scheme) Descriptor() protoreflect.EnumDescriptor { - return file_xds_core_v3_resource_locator_proto_enumTypes[0].Descriptor() -} - -func (ResourceLocator_Scheme) Type() protoreflect.EnumType { - return &file_xds_core_v3_resource_locator_proto_enumTypes[0] -} - -func (x ResourceLocator_Scheme) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ResourceLocator_Scheme.Descriptor instead. -func (ResourceLocator_Scheme) EnumDescriptor() ([]byte, []int) { - return file_xds_core_v3_resource_locator_proto_rawDescGZIP(), []int{0, 0} -} - -type ResourceLocator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Scheme ResourceLocator_Scheme `protobuf:"varint,1,opt,name=scheme,proto3,enum=xds.core.v3.ResourceLocator_Scheme" json:"scheme,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` - ResourceType string `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - // Types that are assignable to ContextParamSpecifier: - // - // *ResourceLocator_ExactContext - ContextParamSpecifier isResourceLocator_ContextParamSpecifier `protobuf_oneof:"context_param_specifier"` - Directives []*ResourceLocator_Directive `protobuf:"bytes,6,rep,name=directives,proto3" json:"directives,omitempty"` -} - -func (x *ResourceLocator) Reset() { - *x = ResourceLocator{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_core_v3_resource_locator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceLocator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceLocator) ProtoMessage() {} - -func (x *ResourceLocator) ProtoReflect() protoreflect.Message { - mi := &file_xds_core_v3_resource_locator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceLocator.ProtoReflect.Descriptor instead. -func (*ResourceLocator) Descriptor() ([]byte, []int) { - return file_xds_core_v3_resource_locator_proto_rawDescGZIP(), []int{0} -} - -func (x *ResourceLocator) GetScheme() ResourceLocator_Scheme { - if x != nil { - return x.Scheme - } - return ResourceLocator_XDSTP -} - -func (x *ResourceLocator) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ResourceLocator) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *ResourceLocator) GetResourceType() string { - if x != nil { - return x.ResourceType - } - return "" -} - -func (m *ResourceLocator) GetContextParamSpecifier() isResourceLocator_ContextParamSpecifier { - if m != nil { - return m.ContextParamSpecifier - } - return nil -} - -func (x *ResourceLocator) GetExactContext() *ContextParams { - if x, ok := x.GetContextParamSpecifier().(*ResourceLocator_ExactContext); ok { - return x.ExactContext - } - return nil -} - -func (x *ResourceLocator) GetDirectives() []*ResourceLocator_Directive { - if x != nil { - return x.Directives - } - return nil -} - -type isResourceLocator_ContextParamSpecifier interface { - isResourceLocator_ContextParamSpecifier() -} - -type ResourceLocator_ExactContext struct { - ExactContext *ContextParams `protobuf:"bytes,5,opt,name=exact_context,json=exactContext,proto3,oneof"` -} - -func (*ResourceLocator_ExactContext) isResourceLocator_ContextParamSpecifier() {} - -type ResourceLocator_Directive struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Directive: - // - // *ResourceLocator_Directive_Alt - // *ResourceLocator_Directive_Entry - Directive isResourceLocator_Directive_Directive `protobuf_oneof:"directive"` -} - -func (x *ResourceLocator_Directive) Reset() { - *x = ResourceLocator_Directive{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_core_v3_resource_locator_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceLocator_Directive) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceLocator_Directive) ProtoMessage() {} - -func (x *ResourceLocator_Directive) ProtoReflect() protoreflect.Message { - mi := &file_xds_core_v3_resource_locator_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceLocator_Directive.ProtoReflect.Descriptor instead. -func (*ResourceLocator_Directive) Descriptor() ([]byte, []int) { - return file_xds_core_v3_resource_locator_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *ResourceLocator_Directive) GetDirective() isResourceLocator_Directive_Directive { - if m != nil { - return m.Directive - } - return nil -} - -func (x *ResourceLocator_Directive) GetAlt() *ResourceLocator { - if x, ok := x.GetDirective().(*ResourceLocator_Directive_Alt); ok { - return x.Alt - } - return nil -} - -func (x *ResourceLocator_Directive) GetEntry() string { - if x, ok := x.GetDirective().(*ResourceLocator_Directive_Entry); ok { - return x.Entry - } - return "" -} - -type isResourceLocator_Directive_Directive interface { - isResourceLocator_Directive_Directive() -} - -type ResourceLocator_Directive_Alt struct { - Alt *ResourceLocator `protobuf:"bytes,1,opt,name=alt,proto3,oneof"` -} - -type ResourceLocator_Directive_Entry struct { - Entry string `protobuf:"bytes,2,opt,name=entry,proto3,oneof"` -} - -func (*ResourceLocator_Directive_Alt) isResourceLocator_Directive_Directive() {} - -func (*ResourceLocator_Directive_Entry) isResourceLocator_Directive_Directive() {} - -var File_xds_core_v3_resource_locator_proto protoreflect.FileDescriptor - -var file_xds_core_v3_resource_locator_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x04, - 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x45, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x23, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, - 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x64, - 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x52, 0x0a, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x73, 0x1a, - 0x88, 0x01, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x30, 0x0a, - 0x03, 0x61, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6c, 0x74, 0x12, - 0x37, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f, - 0xfa, 0x42, 0x1c, 0x72, 0x1a, 0x10, 0x01, 0x32, 0x16, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, - 0x7a, 0x41, 0x2d, 0x5a, 0x5f, 0x5c, 0x2d, 0x5c, 0x2e, 0x2f, 0x7e, 0x3a, 0x5d, 0x2b, 0x24, 0x48, - 0x00, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x10, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x27, 0x0a, 0x06, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x58, 0x44, 0x53, 0x54, 0x50, 0x10, 0x00, 0x12, - 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x49, 0x4c, - 0x45, 0x10, 0x02, 0x42, 0x19, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x5c, - 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, - 0x42, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, - 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_core_v3_resource_locator_proto_rawDescOnce sync.Once - file_xds_core_v3_resource_locator_proto_rawDescData = file_xds_core_v3_resource_locator_proto_rawDesc -) - -func file_xds_core_v3_resource_locator_proto_rawDescGZIP() []byte { - file_xds_core_v3_resource_locator_proto_rawDescOnce.Do(func() { - file_xds_core_v3_resource_locator_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_resource_locator_proto_rawDescData) - }) - return file_xds_core_v3_resource_locator_proto_rawDescData -} - -var file_xds_core_v3_resource_locator_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_xds_core_v3_resource_locator_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_xds_core_v3_resource_locator_proto_goTypes = []interface{}{ - (ResourceLocator_Scheme)(0), // 0: xds.core.v3.ResourceLocator.Scheme - (*ResourceLocator)(nil), // 1: xds.core.v3.ResourceLocator - (*ResourceLocator_Directive)(nil), // 2: xds.core.v3.ResourceLocator.Directive - (*ContextParams)(nil), // 3: xds.core.v3.ContextParams -} -var file_xds_core_v3_resource_locator_proto_depIdxs = []int32{ - 0, // 0: xds.core.v3.ResourceLocator.scheme:type_name -> xds.core.v3.ResourceLocator.Scheme - 3, // 1: xds.core.v3.ResourceLocator.exact_context:type_name -> xds.core.v3.ContextParams - 2, // 2: xds.core.v3.ResourceLocator.directives:type_name -> xds.core.v3.ResourceLocator.Directive - 1, // 3: xds.core.v3.ResourceLocator.Directive.alt:type_name -> xds.core.v3.ResourceLocator - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_xds_core_v3_resource_locator_proto_init() } -func file_xds_core_v3_resource_locator_proto_init() { - if File_xds_core_v3_resource_locator_proto != nil { - return - } - file_xds_core_v3_context_params_proto_init() - if !protoimpl.UnsafeEnabled { - file_xds_core_v3_resource_locator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceLocator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_core_v3_resource_locator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceLocator_Directive); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_xds_core_v3_resource_locator_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*ResourceLocator_ExactContext)(nil), - } - file_xds_core_v3_resource_locator_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*ResourceLocator_Directive_Alt)(nil), - (*ResourceLocator_Directive_Entry)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_core_v3_resource_locator_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_core_v3_resource_locator_proto_goTypes, - DependencyIndexes: file_xds_core_v3_resource_locator_proto_depIdxs, - EnumInfos: file_xds_core_v3_resource_locator_proto_enumTypes, - MessageInfos: file_xds_core_v3_resource_locator_proto_msgTypes, - }.Build() - File_xds_core_v3_resource_locator_proto = out.File - file_xds_core_v3_resource_locator_proto_rawDesc = nil - file_xds_core_v3_resource_locator_proto_goTypes = nil - file_xds_core_v3_resource_locator_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.validate.go deleted file mode 100644 index 1686e98d122..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.validate.go +++ /dev/null @@ -1,439 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/core/v3/resource_locator.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ResourceLocator with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ResourceLocator) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ResourceLocator with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ResourceLocatorMultiError, or nil if none found. -func (m *ResourceLocator) ValidateAll() error { - return m.validate(true) -} - -func (m *ResourceLocator) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := ResourceLocator_Scheme_name[int32(m.GetScheme())]; !ok { - err := ResourceLocatorValidationError{ - field: "Scheme", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Id - - // no validation rules for Authority - - if utf8.RuneCountInString(m.GetResourceType()) < 1 { - err := ResourceLocatorValidationError{ - field: "ResourceType", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetDirectives() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceLocatorValidationError{ - field: fmt.Sprintf("Directives[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceLocatorValidationError{ - field: fmt.Sprintf("Directives[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceLocatorValidationError{ - field: fmt.Sprintf("Directives[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - switch v := m.ContextParamSpecifier.(type) { - case *ResourceLocator_ExactContext: - if v == nil { - err := ResourceLocatorValidationError{ - field: "ContextParamSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetExactContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceLocatorValidationError{ - field: "ExactContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceLocatorValidationError{ - field: "ExactContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExactContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceLocatorValidationError{ - field: "ExactContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return ResourceLocatorMultiError(errors) - } - - return nil -} - -// ResourceLocatorMultiError is an error wrapping multiple validation errors -// returned by ResourceLocator.ValidateAll() if the designated constraints -// aren't met. -type ResourceLocatorMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResourceLocatorMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResourceLocatorMultiError) AllErrors() []error { return m } - -// ResourceLocatorValidationError is the validation error returned by -// ResourceLocator.Validate if the designated constraints aren't met. -type ResourceLocatorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourceLocatorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourceLocatorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourceLocatorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourceLocatorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourceLocatorValidationError) ErrorName() string { return "ResourceLocatorValidationError" } - -// Error satisfies the builtin error interface -func (e ResourceLocatorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResourceLocator.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourceLocatorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourceLocatorValidationError{} - -// Validate checks the field values on ResourceLocator_Directive with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ResourceLocator_Directive) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ResourceLocator_Directive with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ResourceLocator_DirectiveMultiError, or nil if none found. -func (m *ResourceLocator_Directive) ValidateAll() error { - return m.validate(true) -} - -func (m *ResourceLocator_Directive) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofDirectivePresent := false - switch v := m.Directive.(type) { - case *ResourceLocator_Directive_Alt: - if v == nil { - err := ResourceLocator_DirectiveValidationError{ - field: "Directive", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofDirectivePresent = true - - if all { - switch v := interface{}(m.GetAlt()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceLocator_DirectiveValidationError{ - field: "Alt", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceLocator_DirectiveValidationError{ - field: "Alt", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAlt()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceLocator_DirectiveValidationError{ - field: "Alt", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ResourceLocator_Directive_Entry: - if v == nil { - err := ResourceLocator_DirectiveValidationError{ - field: "Directive", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofDirectivePresent = true - - if utf8.RuneCountInString(m.GetEntry()) < 1 { - err := ResourceLocator_DirectiveValidationError{ - field: "Entry", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_ResourceLocator_Directive_Entry_Pattern.MatchString(m.GetEntry()) { - err := ResourceLocator_DirectiveValidationError{ - field: "Entry", - reason: "value does not match regex pattern \"^[0-9a-zA-Z_\\\\-\\\\./~:]+$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - if !oneofDirectivePresent { - err := ResourceLocator_DirectiveValidationError{ - field: "Directive", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ResourceLocator_DirectiveMultiError(errors) - } - - return nil -} - -// ResourceLocator_DirectiveMultiError is an error wrapping multiple validation -// errors returned by ResourceLocator_Directive.ValidateAll() if the -// designated constraints aren't met. -type ResourceLocator_DirectiveMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResourceLocator_DirectiveMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResourceLocator_DirectiveMultiError) AllErrors() []error { return m } - -// ResourceLocator_DirectiveValidationError is the validation error returned by -// ResourceLocator_Directive.Validate if the designated constraints aren't met. -type ResourceLocator_DirectiveValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourceLocator_DirectiveValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourceLocator_DirectiveValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourceLocator_DirectiveValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourceLocator_DirectiveValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourceLocator_DirectiveValidationError) ErrorName() string { - return "ResourceLocator_DirectiveValidationError" -} - -// Error satisfies the builtin error interface -func (e ResourceLocator_DirectiveValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResourceLocator_Directive.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourceLocator_DirectiveValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourceLocator_DirectiveValidationError{} - -var _ResourceLocator_Directive_Entry_Pattern = regexp.MustCompile("^[0-9a-zA-Z_\\-\\./~:]+$") diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.go deleted file mode 100644 index 92d5fa85395..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.go +++ /dev/null @@ -1,190 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/core/v3/resource_name.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ResourceName struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` - ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - Context *ContextParams `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"` -} - -func (x *ResourceName) Reset() { - *x = ResourceName{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_core_v3_resource_name_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceName) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceName) ProtoMessage() {} - -func (x *ResourceName) ProtoReflect() protoreflect.Message { - mi := &file_xds_core_v3_resource_name_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceName.ProtoReflect.Descriptor instead. -func (*ResourceName) Descriptor() ([]byte, []int) { - return file_xds_core_v3_resource_name_proto_rawDescGZIP(), []int{0} -} - -func (x *ResourceName) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *ResourceName) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *ResourceName) GetResourceType() string { - if x != nil { - return x.ResourceType - } - return "" -} - -func (x *ResourceName) GetContext() *ContextParams { - if x != nil { - return x.Context - } - return nil -} - -var File_xds_core_v3_resource_name_proto protoreflect.FileDescriptor - -var file_xds_core_v3_resource_name_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, - 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x20, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x01, 0x0a, 0x0c, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x0d, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x59, 0xd2, - 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, - 0x11, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_core_v3_resource_name_proto_rawDescOnce sync.Once - file_xds_core_v3_resource_name_proto_rawDescData = file_xds_core_v3_resource_name_proto_rawDesc -) - -func file_xds_core_v3_resource_name_proto_rawDescGZIP() []byte { - file_xds_core_v3_resource_name_proto_rawDescOnce.Do(func() { - file_xds_core_v3_resource_name_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_resource_name_proto_rawDescData) - }) - return file_xds_core_v3_resource_name_proto_rawDescData -} - -var file_xds_core_v3_resource_name_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_xds_core_v3_resource_name_proto_goTypes = []interface{}{ - (*ResourceName)(nil), // 0: xds.core.v3.ResourceName - (*ContextParams)(nil), // 1: xds.core.v3.ContextParams -} -var file_xds_core_v3_resource_name_proto_depIdxs = []int32{ - 1, // 0: xds.core.v3.ResourceName.context:type_name -> xds.core.v3.ContextParams - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_xds_core_v3_resource_name_proto_init() } -func file_xds_core_v3_resource_name_proto_init() { - if File_xds_core_v3_resource_name_proto != nil { - return - } - file_xds_core_v3_context_params_proto_init() - if !protoimpl.UnsafeEnabled { - file_xds_core_v3_resource_name_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceName); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_core_v3_resource_name_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_core_v3_resource_name_proto_goTypes, - DependencyIndexes: file_xds_core_v3_resource_name_proto_depIdxs, - MessageInfos: file_xds_core_v3_resource_name_proto_msgTypes, - }.Build() - File_xds_core_v3_resource_name_proto = out.File - file_xds_core_v3_resource_name_proto_rawDesc = nil - file_xds_core_v3_resource_name_proto_goTypes = nil - file_xds_core_v3_resource_name_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.validate.go deleted file mode 100644 index 270e921bc34..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.validate.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/core/v3/resource_name.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ResourceName with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ResourceName) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ResourceName with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ResourceNameMultiError, or -// nil if none found. -func (m *ResourceName) ValidateAll() error { - return m.validate(true) -} - -func (m *ResourceName) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Id - - // no validation rules for Authority - - if utf8.RuneCountInString(m.GetResourceType()) < 1 { - err := ResourceNameValidationError{ - field: "ResourceType", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceNameValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceNameValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceNameValidationError{ - field: "Context", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ResourceNameMultiError(errors) - } - - return nil -} - -// ResourceNameMultiError is an error wrapping multiple validation errors -// returned by ResourceName.ValidateAll() if the designated constraints aren't met. -type ResourceNameMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResourceNameMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResourceNameMultiError) AllErrors() []error { return m } - -// ResourceNameValidationError is the validation error returned by -// ResourceName.Validate if the designated constraints aren't met. -type ResourceNameValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourceNameValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourceNameValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourceNameValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourceNameValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourceNameValidationError) ErrorName() string { return "ResourceNameValidationError" } - -// Error satisfies the builtin error interface -func (e ResourceNameValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResourceName.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourceNameValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourceNameValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go deleted file mode 100644 index 0d9825aff71..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/type/matcher/v3/cel.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - v3 "github.com/cncf/xds/go/xds/type/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CelMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ExprMatch *v3.CelExpression `protobuf:"bytes,1,opt,name=expr_match,json=exprMatch,proto3" json:"expr_match,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *CelMatcher) Reset() { - *x = CelMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_cel_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CelMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CelMatcher) ProtoMessage() {} - -func (x *CelMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_cel_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CelMatcher.ProtoReflect.Descriptor instead. -func (*CelMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_cel_proto_rawDescGZIP(), []int{0} -} - -func (x *CelMatcher) GetExprMatch() *v3.CelExpression { - if x != nil { - return x.ExprMatch - } - return nil -} - -func (x *CelMatcher) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -var File_xds_type_matcher_v3_cel_proto protoreflect.FileDescriptor - -var file_xds_type_matcher_v3_cel_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, - 0x76, 0x33, 0x2f, 0x63, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x73, 0x0a, 0x0a, 0x43, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x65, - 0x78, 0x70, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x60, 0xd2, 0xc6, 0xa4, 0xe1, - 0x06, 0x02, 0x08, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, - 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_type_matcher_v3_cel_proto_rawDescOnce sync.Once - file_xds_type_matcher_v3_cel_proto_rawDescData = file_xds_type_matcher_v3_cel_proto_rawDesc -) - -func file_xds_type_matcher_v3_cel_proto_rawDescGZIP() []byte { - file_xds_type_matcher_v3_cel_proto_rawDescOnce.Do(func() { - file_xds_type_matcher_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_cel_proto_rawDescData) - }) - return file_xds_type_matcher_v3_cel_proto_rawDescData -} - -var file_xds_type_matcher_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_xds_type_matcher_v3_cel_proto_goTypes = []interface{}{ - (*CelMatcher)(nil), // 0: xds.type.matcher.v3.CelMatcher - (*v3.CelExpression)(nil), // 1: xds.type.v3.CelExpression -} -var file_xds_type_matcher_v3_cel_proto_depIdxs = []int32{ - 1, // 0: xds.type.matcher.v3.CelMatcher.expr_match:type_name -> xds.type.v3.CelExpression - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_xds_type_matcher_v3_cel_proto_init() } -func file_xds_type_matcher_v3_cel_proto_init() { - if File_xds_type_matcher_v3_cel_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_type_matcher_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CelMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_type_matcher_v3_cel_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_type_matcher_v3_cel_proto_goTypes, - DependencyIndexes: file_xds_type_matcher_v3_cel_proto_depIdxs, - MessageInfos: file_xds_type_matcher_v3_cel_proto_msgTypes, - }.Build() - File_xds_type_matcher_v3_cel_proto = out.File - file_xds_type_matcher_v3_cel_proto_rawDesc = nil - file_xds_type_matcher_v3_cel_proto_goTypes = nil - file_xds_type_matcher_v3_cel_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go deleted file mode 100644 index 091267b0cd4..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/type/matcher/v3/cel.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on CelMatcher with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *CelMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CelMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in CelMatcherMultiError, or -// nil if none found. -func (m *CelMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *CelMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetExprMatch() == nil { - err := CelMatcherValidationError{ - field: "ExprMatch", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetExprMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CelMatcherValidationError{ - field: "ExprMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CelMatcherValidationError{ - field: "ExprMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExprMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CelMatcherValidationError{ - field: "ExprMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Description - - if len(errors) > 0 { - return CelMatcherMultiError(errors) - } - - return nil -} - -// CelMatcherMultiError is an error wrapping multiple validation errors -// returned by CelMatcher.ValidateAll() if the designated constraints aren't met. -type CelMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CelMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CelMatcherMultiError) AllErrors() []error { return m } - -// CelMatcherValidationError is the validation error returned by -// CelMatcher.Validate if the designated constraints aren't met. -type CelMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CelMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CelMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CelMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CelMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CelMatcherValidationError) ErrorName() string { return "CelMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e CelMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCelMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CelMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CelMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go deleted file mode 100644 index 28a4655ed8a..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go +++ /dev/null @@ -1,242 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/type/matcher/v3/domain.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ServerNameMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DomainMatchers []*ServerNameMatcher_DomainMatcher `protobuf:"bytes,1,rep,name=domain_matchers,json=domainMatchers,proto3" json:"domain_matchers,omitempty"` -} - -func (x *ServerNameMatcher) Reset() { - *x = ServerNameMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerNameMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerNameMatcher) ProtoMessage() {} - -func (x *ServerNameMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerNameMatcher.ProtoReflect.Descriptor instead. -func (*ServerNameMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_domain_proto_rawDescGZIP(), []int{0} -} - -func (x *ServerNameMatcher) GetDomainMatchers() []*ServerNameMatcher_DomainMatcher { - if x != nil { - return x.DomainMatchers - } - return nil -} - -type ServerNameMatcher_DomainMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Domains []string `protobuf:"bytes,1,rep,name=domains,proto3" json:"domains,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` -} - -func (x *ServerNameMatcher_DomainMatcher) Reset() { - *x = ServerNameMatcher_DomainMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerNameMatcher_DomainMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerNameMatcher_DomainMatcher) ProtoMessage() {} - -func (x *ServerNameMatcher_DomainMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerNameMatcher_DomainMatcher.ProtoReflect.Descriptor instead. -func (*ServerNameMatcher_DomainMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_domain_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *ServerNameMatcher_DomainMatcher) GetDomains() []string { - if x != nil { - return x.Domains - } - return nil -} - -func (x *ServerNameMatcher_DomainMatcher) GetOnMatch() *Matcher_OnMatch { - if x != nil { - return x.OnMatch - } - return nil -} - -var File_xds_type_matcher_v3_domain_proto protoreflect.FileDescriptor - -var file_xds_type_matcher_v3_domain_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe8, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x0f, 0x64, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x74, 0x0a, 0x0d, 0x44, 0x6f, 0x6d, - 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x07, 0x64, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x3f, - 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, - 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, - 0x6e, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_type_matcher_v3_domain_proto_rawDescOnce sync.Once - file_xds_type_matcher_v3_domain_proto_rawDescData = file_xds_type_matcher_v3_domain_proto_rawDesc -) - -func file_xds_type_matcher_v3_domain_proto_rawDescGZIP() []byte { - file_xds_type_matcher_v3_domain_proto_rawDescOnce.Do(func() { - file_xds_type_matcher_v3_domain_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_domain_proto_rawDescData) - }) - return file_xds_type_matcher_v3_domain_proto_rawDescData -} - -var file_xds_type_matcher_v3_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_xds_type_matcher_v3_domain_proto_goTypes = []interface{}{ - (*ServerNameMatcher)(nil), // 0: xds.type.matcher.v3.ServerNameMatcher - (*ServerNameMatcher_DomainMatcher)(nil), // 1: xds.type.matcher.v3.ServerNameMatcher.DomainMatcher - (*Matcher_OnMatch)(nil), // 2: xds.type.matcher.v3.Matcher.OnMatch -} -var file_xds_type_matcher_v3_domain_proto_depIdxs = []int32{ - 1, // 0: xds.type.matcher.v3.ServerNameMatcher.domain_matchers:type_name -> xds.type.matcher.v3.ServerNameMatcher.DomainMatcher - 2, // 1: xds.type.matcher.v3.ServerNameMatcher.DomainMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_xds_type_matcher_v3_domain_proto_init() } -func file_xds_type_matcher_v3_domain_proto_init() { - if File_xds_type_matcher_v3_domain_proto != nil { - return - } - file_xds_type_matcher_v3_matcher_proto_init() - if !protoimpl.UnsafeEnabled { - file_xds_type_matcher_v3_domain_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerNameMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_domain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerNameMatcher_DomainMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_type_matcher_v3_domain_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_type_matcher_v3_domain_proto_goTypes, - DependencyIndexes: file_xds_type_matcher_v3_domain_proto_depIdxs, - MessageInfos: file_xds_type_matcher_v3_domain_proto_msgTypes, - }.Build() - File_xds_type_matcher_v3_domain_proto = out.File - file_xds_type_matcher_v3_domain_proto_rawDesc = nil - file_xds_type_matcher_v3_domain_proto_goTypes = nil - file_xds_type_matcher_v3_domain_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go deleted file mode 100644 index e95bdfa28f1..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go +++ /dev/null @@ -1,315 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/type/matcher/v3/domain.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ServerNameMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ServerNameMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ServerNameMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ServerNameMatcherMultiError, or nil if none found. -func (m *ServerNameMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *ServerNameMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetDomainMatchers() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ServerNameMatcherValidationError{ - field: fmt.Sprintf("DomainMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ServerNameMatcherValidationError{ - field: fmt.Sprintf("DomainMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ServerNameMatcherValidationError{ - field: fmt.Sprintf("DomainMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ServerNameMatcherMultiError(errors) - } - - return nil -} - -// ServerNameMatcherMultiError is an error wrapping multiple validation errors -// returned by ServerNameMatcher.ValidateAll() if the designated constraints -// aren't met. -type ServerNameMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ServerNameMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ServerNameMatcherMultiError) AllErrors() []error { return m } - -// ServerNameMatcherValidationError is the validation error returned by -// ServerNameMatcher.Validate if the designated constraints aren't met. -type ServerNameMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ServerNameMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ServerNameMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ServerNameMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ServerNameMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ServerNameMatcherValidationError) ErrorName() string { - return "ServerNameMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e ServerNameMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sServerNameMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ServerNameMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ServerNameMatcherValidationError{} - -// Validate checks the field values on ServerNameMatcher_DomainMatcher with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ServerNameMatcher_DomainMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ServerNameMatcher_DomainMatcher with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// ServerNameMatcher_DomainMatcherMultiError, or nil if none found. -func (m *ServerNameMatcher_DomainMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *ServerNameMatcher_DomainMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetDomains()) < 1 { - err := ServerNameMatcher_DomainMatcherValidationError{ - field: "Domains", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetOnMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ServerNameMatcher_DomainMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ServerNameMatcher_DomainMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ServerNameMatcher_DomainMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ServerNameMatcher_DomainMatcherMultiError(errors) - } - - return nil -} - -// ServerNameMatcher_DomainMatcherMultiError is an error wrapping multiple -// validation errors returned by ServerNameMatcher_DomainMatcher.ValidateAll() -// if the designated constraints aren't met. -type ServerNameMatcher_DomainMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ServerNameMatcher_DomainMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ServerNameMatcher_DomainMatcherMultiError) AllErrors() []error { return m } - -// ServerNameMatcher_DomainMatcherValidationError is the validation error -// returned by ServerNameMatcher_DomainMatcher.Validate if the designated -// constraints aren't met. -type ServerNameMatcher_DomainMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ServerNameMatcher_DomainMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ServerNameMatcher_DomainMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ServerNameMatcher_DomainMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ServerNameMatcher_DomainMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ServerNameMatcher_DomainMatcherValidationError) ErrorName() string { - return "ServerNameMatcher_DomainMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e ServerNameMatcher_DomainMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sServerNameMatcher_DomainMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ServerNameMatcher_DomainMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ServerNameMatcher_DomainMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go deleted file mode 100644 index 40656caf0c2..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/type/matcher/v3/http_inputs.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type HttpAttributesCelMatchInput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *HttpAttributesCelMatchInput) Reset() { - *x = HttpAttributesCelMatchInput{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpAttributesCelMatchInput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpAttributesCelMatchInput) ProtoMessage() {} - -func (x *HttpAttributesCelMatchInput) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpAttributesCelMatchInput.ProtoReflect.Descriptor instead. -func (*HttpAttributesCelMatchInput) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{0} -} - -var File_xds_type_matcher_v3_http_inputs_proto protoreflect.FileDescriptor - -var file_xds_type_matcher_v3_http_inputs_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, - 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1d, 0x0a, - 0x1b, 0x48, 0x74, 0x74, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, - 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x67, 0xd2, 0xc6, - 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x49, 0x6e, 0x70, 0x75, - 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, - 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_type_matcher_v3_http_inputs_proto_rawDescOnce sync.Once - file_xds_type_matcher_v3_http_inputs_proto_rawDescData = file_xds_type_matcher_v3_http_inputs_proto_rawDesc -) - -func file_xds_type_matcher_v3_http_inputs_proto_rawDescGZIP() []byte { - file_xds_type_matcher_v3_http_inputs_proto_rawDescOnce.Do(func() { - file_xds_type_matcher_v3_http_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_http_inputs_proto_rawDescData) - }) - return file_xds_type_matcher_v3_http_inputs_proto_rawDescData -} - -var file_xds_type_matcher_v3_http_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_xds_type_matcher_v3_http_inputs_proto_goTypes = []interface{}{ - (*HttpAttributesCelMatchInput)(nil), // 0: xds.type.matcher.v3.HttpAttributesCelMatchInput -} -var file_xds_type_matcher_v3_http_inputs_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_xds_type_matcher_v3_http_inputs_proto_init() } -func file_xds_type_matcher_v3_http_inputs_proto_init() { - if File_xds_type_matcher_v3_http_inputs_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpAttributesCelMatchInput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_type_matcher_v3_http_inputs_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_type_matcher_v3_http_inputs_proto_goTypes, - DependencyIndexes: file_xds_type_matcher_v3_http_inputs_proto_depIdxs, - MessageInfos: file_xds_type_matcher_v3_http_inputs_proto_msgTypes, - }.Build() - File_xds_type_matcher_v3_http_inputs_proto = out.File - file_xds_type_matcher_v3_http_inputs_proto_rawDesc = nil - file_xds_type_matcher_v3_http_inputs_proto_goTypes = nil - file_xds_type_matcher_v3_http_inputs_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go deleted file mode 100644 index 5d87429279d..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/type/matcher/v3/http_inputs.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on HttpAttributesCelMatchInput with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HttpAttributesCelMatchInput) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpAttributesCelMatchInput with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HttpAttributesCelMatchInputMultiError, or nil if none found. -func (m *HttpAttributesCelMatchInput) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpAttributesCelMatchInput) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return HttpAttributesCelMatchInputMultiError(errors) - } - - return nil -} - -// HttpAttributesCelMatchInputMultiError is an error wrapping multiple -// validation errors returned by HttpAttributesCelMatchInput.ValidateAll() if -// the designated constraints aren't met. -type HttpAttributesCelMatchInputMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpAttributesCelMatchInputMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpAttributesCelMatchInputMultiError) AllErrors() []error { return m } - -// HttpAttributesCelMatchInputValidationError is the validation error returned -// by HttpAttributesCelMatchInput.Validate if the designated constraints -// aren't met. -type HttpAttributesCelMatchInputValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpAttributesCelMatchInputValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpAttributesCelMatchInputValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpAttributesCelMatchInputValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpAttributesCelMatchInputValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpAttributesCelMatchInputValidationError) ErrorName() string { - return "HttpAttributesCelMatchInputValidationError" -} - -// Error satisfies the builtin error interface -func (e HttpAttributesCelMatchInputValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHttpAttributesCelMatchInput.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpAttributesCelMatchInputValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpAttributesCelMatchInputValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go deleted file mode 100644 index 7254d3ba57f..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/type/matcher/v3/ip.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - v3 "github.com/cncf/xds/go/xds/core/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type IPMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RangeMatchers []*IPMatcher_IPRangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` -} - -func (x *IPMatcher) Reset() { - *x = IPMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IPMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IPMatcher) ProtoMessage() {} - -func (x *IPMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IPMatcher.ProtoReflect.Descriptor instead. -func (*IPMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0} -} - -func (x *IPMatcher) GetRangeMatchers() []*IPMatcher_IPRangeMatcher { - if x != nil { - return x.RangeMatchers - } - return nil -} - -type IPMatcher_IPRangeMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ranges []*v3.CidrRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` - Exclusive bool `protobuf:"varint,3,opt,name=exclusive,proto3" json:"exclusive,omitempty"` -} - -func (x *IPMatcher_IPRangeMatcher) Reset() { - *x = IPMatcher_IPRangeMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IPMatcher_IPRangeMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IPMatcher_IPRangeMatcher) ProtoMessage() {} - -func (x *IPMatcher_IPRangeMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IPMatcher_IPRangeMatcher.ProtoReflect.Descriptor instead. -func (*IPMatcher_IPRangeMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *IPMatcher_IPRangeMatcher) GetRanges() []*v3.CidrRange { - if x != nil { - return x.Ranges - } - return nil -} - -func (x *IPMatcher_IPRangeMatcher) GetOnMatch() *Matcher_OnMatch { - if x != nil { - return x.OnMatch - } - return nil -} - -func (x *IPMatcher_IPRangeMatcher) GetExclusive() bool { - if x != nil { - return x.Exclusive - } - return false -} - -var File_xds_type_matcher_v3_ip_proto protoreflect.FileDescriptor - -var file_xds_type_matcher_v3_ip_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, - 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x33, 0x2f, 0x63, 0x69, 0x64, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, - 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, - 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x09, 0x49, 0x50, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, - 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x49, - 0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0xa9, 0x01, 0x0a, - 0x0e, 0x49, 0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, - 0x38, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, - 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, - 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, - 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, - 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x42, 0x66, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, - 0x08, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, - 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x42, 0x0e, 0x49, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_type_matcher_v3_ip_proto_rawDescOnce sync.Once - file_xds_type_matcher_v3_ip_proto_rawDescData = file_xds_type_matcher_v3_ip_proto_rawDesc -) - -func file_xds_type_matcher_v3_ip_proto_rawDescGZIP() []byte { - file_xds_type_matcher_v3_ip_proto_rawDescOnce.Do(func() { - file_xds_type_matcher_v3_ip_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_ip_proto_rawDescData) - }) - return file_xds_type_matcher_v3_ip_proto_rawDescData -} - -var file_xds_type_matcher_v3_ip_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_xds_type_matcher_v3_ip_proto_goTypes = []interface{}{ - (*IPMatcher)(nil), // 0: xds.type.matcher.v3.IPMatcher - (*IPMatcher_IPRangeMatcher)(nil), // 1: xds.type.matcher.v3.IPMatcher.IPRangeMatcher - (*v3.CidrRange)(nil), // 2: xds.core.v3.CidrRange - (*Matcher_OnMatch)(nil), // 3: xds.type.matcher.v3.Matcher.OnMatch -} -var file_xds_type_matcher_v3_ip_proto_depIdxs = []int32{ - 1, // 0: xds.type.matcher.v3.IPMatcher.range_matchers:type_name -> xds.type.matcher.v3.IPMatcher.IPRangeMatcher - 2, // 1: xds.type.matcher.v3.IPMatcher.IPRangeMatcher.ranges:type_name -> xds.core.v3.CidrRange - 3, // 2: xds.type.matcher.v3.IPMatcher.IPRangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_xds_type_matcher_v3_ip_proto_init() } -func file_xds_type_matcher_v3_ip_proto_init() { - if File_xds_type_matcher_v3_ip_proto != nil { - return - } - file_xds_type_matcher_v3_matcher_proto_init() - if !protoimpl.UnsafeEnabled { - file_xds_type_matcher_v3_ip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IPMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_ip_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IPMatcher_IPRangeMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_type_matcher_v3_ip_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_type_matcher_v3_ip_proto_goTypes, - DependencyIndexes: file_xds_type_matcher_v3_ip_proto_depIdxs, - MessageInfos: file_xds_type_matcher_v3_ip_proto_msgTypes, - }.Build() - File_xds_type_matcher_v3_ip_proto = out.File - file_xds_type_matcher_v3_ip_proto_rawDesc = nil - file_xds_type_matcher_v3_ip_proto_goTypes = nil - file_xds_type_matcher_v3_ip_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go deleted file mode 100644 index c1fca03bcbb..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go +++ /dev/null @@ -1,347 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/type/matcher/v3/ip.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on IPMatcher with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *IPMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on IPMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in IPMatcherMultiError, or nil -// if none found. -func (m *IPMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *IPMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetRangeMatchers() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, IPMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, IPMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return IPMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return IPMatcherMultiError(errors) - } - - return nil -} - -// IPMatcherMultiError is an error wrapping multiple validation errors returned -// by IPMatcher.ValidateAll() if the designated constraints aren't met. -type IPMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m IPMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m IPMatcherMultiError) AllErrors() []error { return m } - -// IPMatcherValidationError is the validation error returned by -// IPMatcher.Validate if the designated constraints aren't met. -type IPMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e IPMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e IPMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e IPMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e IPMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e IPMatcherValidationError) ErrorName() string { return "IPMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e IPMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sIPMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = IPMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = IPMatcherValidationError{} - -// Validate checks the field values on IPMatcher_IPRangeMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *IPMatcher_IPRangeMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on IPMatcher_IPRangeMatcher with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// IPMatcher_IPRangeMatcherMultiError, or nil if none found. -func (m *IPMatcher_IPRangeMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *IPMatcher_IPRangeMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetRanges()) < 1 { - err := IPMatcher_IPRangeMatcherValidationError{ - field: "Ranges", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRanges() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, IPMatcher_IPRangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, IPMatcher_IPRangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return IPMatcher_IPRangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetOnMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, IPMatcher_IPRangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, IPMatcher_IPRangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return IPMatcher_IPRangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Exclusive - - if len(errors) > 0 { - return IPMatcher_IPRangeMatcherMultiError(errors) - } - - return nil -} - -// IPMatcher_IPRangeMatcherMultiError is an error wrapping multiple validation -// errors returned by IPMatcher_IPRangeMatcher.ValidateAll() if the designated -// constraints aren't met. -type IPMatcher_IPRangeMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m IPMatcher_IPRangeMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m IPMatcher_IPRangeMatcherMultiError) AllErrors() []error { return m } - -// IPMatcher_IPRangeMatcherValidationError is the validation error returned by -// IPMatcher_IPRangeMatcher.Validate if the designated constraints aren't met. -type IPMatcher_IPRangeMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e IPMatcher_IPRangeMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e IPMatcher_IPRangeMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e IPMatcher_IPRangeMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e IPMatcher_IPRangeMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e IPMatcher_IPRangeMatcherValidationError) ErrorName() string { - return "IPMatcher_IPRangeMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e IPMatcher_IPRangeMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sIPMatcher_IPRangeMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = IPMatcher_IPRangeMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = IPMatcher_IPRangeMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.go deleted file mode 100644 index eff1ce1aa0f..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.go +++ /dev/null @@ -1,1060 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/type/matcher/v3/matcher.proto - -package v3 - -import ( - _ "github.com/cncf/xds/go/xds/annotations/v3" - v3 "github.com/cncf/xds/go/xds/core/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Matcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatcherType: - // - // *Matcher_MatcherList_ - // *Matcher_MatcherTree_ - MatcherType isMatcher_MatcherType `protobuf_oneof:"matcher_type"` - OnNoMatch *Matcher_OnMatch `protobuf:"bytes,3,opt,name=on_no_match,json=onNoMatch,proto3" json:"on_no_match,omitempty"` -} - -func (x *Matcher) Reset() { - *x = Matcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher) ProtoMessage() {} - -func (x *Matcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher.ProtoReflect.Descriptor instead. -func (*Matcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0} -} - -func (m *Matcher) GetMatcherType() isMatcher_MatcherType { - if m != nil { - return m.MatcherType - } - return nil -} - -func (x *Matcher) GetMatcherList() *Matcher_MatcherList { - if x, ok := x.GetMatcherType().(*Matcher_MatcherList_); ok { - return x.MatcherList - } - return nil -} - -func (x *Matcher) GetMatcherTree() *Matcher_MatcherTree { - if x, ok := x.GetMatcherType().(*Matcher_MatcherTree_); ok { - return x.MatcherTree - } - return nil -} - -func (x *Matcher) GetOnNoMatch() *Matcher_OnMatch { - if x != nil { - return x.OnNoMatch - } - return nil -} - -type isMatcher_MatcherType interface { - isMatcher_MatcherType() -} - -type Matcher_MatcherList_ struct { - MatcherList *Matcher_MatcherList `protobuf:"bytes,1,opt,name=matcher_list,json=matcherList,proto3,oneof"` -} - -type Matcher_MatcherTree_ struct { - MatcherTree *Matcher_MatcherTree `protobuf:"bytes,2,opt,name=matcher_tree,json=matcherTree,proto3,oneof"` -} - -func (*Matcher_MatcherList_) isMatcher_MatcherType() {} - -func (*Matcher_MatcherTree_) isMatcher_MatcherType() {} - -type Matcher_OnMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to OnMatch: - // - // *Matcher_OnMatch_Matcher - // *Matcher_OnMatch_Action - OnMatch isMatcher_OnMatch_OnMatch `protobuf_oneof:"on_match"` -} - -func (x *Matcher_OnMatch) Reset() { - *x = Matcher_OnMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_OnMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_OnMatch) ProtoMessage() {} - -func (x *Matcher_OnMatch) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_OnMatch.ProtoReflect.Descriptor instead. -func (*Matcher_OnMatch) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *Matcher_OnMatch) GetOnMatch() isMatcher_OnMatch_OnMatch { - if m != nil { - return m.OnMatch - } - return nil -} - -func (x *Matcher_OnMatch) GetMatcher() *Matcher { - if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Matcher); ok { - return x.Matcher - } - return nil -} - -func (x *Matcher_OnMatch) GetAction() *v3.TypedExtensionConfig { - if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Action); ok { - return x.Action - } - return nil -} - -type isMatcher_OnMatch_OnMatch interface { - isMatcher_OnMatch_OnMatch() -} - -type Matcher_OnMatch_Matcher struct { - Matcher *Matcher `protobuf:"bytes,1,opt,name=matcher,proto3,oneof"` -} - -type Matcher_OnMatch_Action struct { - Action *v3.TypedExtensionConfig `protobuf:"bytes,2,opt,name=action,proto3,oneof"` -} - -func (*Matcher_OnMatch_Matcher) isMatcher_OnMatch_OnMatch() {} - -func (*Matcher_OnMatch_Action) isMatcher_OnMatch_OnMatch() {} - -type Matcher_MatcherList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Matchers []*Matcher_MatcherList_FieldMatcher `protobuf:"bytes,1,rep,name=matchers,proto3" json:"matchers,omitempty"` -} - -func (x *Matcher_MatcherList) Reset() { - *x = Matcher_MatcherList{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherList) ProtoMessage() {} - -func (x *Matcher_MatcherList) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherList.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherList) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *Matcher_MatcherList) GetMatchers() []*Matcher_MatcherList_FieldMatcher { - if x != nil { - return x.Matchers - } - return nil -} - -type Matcher_MatcherTree struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` - // Types that are assignable to TreeType: - // - // *Matcher_MatcherTree_ExactMatchMap - // *Matcher_MatcherTree_PrefixMatchMap - // *Matcher_MatcherTree_CustomMatch - TreeType isMatcher_MatcherTree_TreeType `protobuf_oneof:"tree_type"` -} - -func (x *Matcher_MatcherTree) Reset() { - *x = Matcher_MatcherTree{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherTree) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherTree) ProtoMessage() {} - -func (x *Matcher_MatcherTree) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherTree.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherTree) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *Matcher_MatcherTree) GetInput() *v3.TypedExtensionConfig { - if x != nil { - return x.Input - } - return nil -} - -func (m *Matcher_MatcherTree) GetTreeType() isMatcher_MatcherTree_TreeType { - if m != nil { - return m.TreeType - } - return nil -} - -func (x *Matcher_MatcherTree) GetExactMatchMap() *Matcher_MatcherTree_MatchMap { - if x, ok := x.GetTreeType().(*Matcher_MatcherTree_ExactMatchMap); ok { - return x.ExactMatchMap - } - return nil -} - -func (x *Matcher_MatcherTree) GetPrefixMatchMap() *Matcher_MatcherTree_MatchMap { - if x, ok := x.GetTreeType().(*Matcher_MatcherTree_PrefixMatchMap); ok { - return x.PrefixMatchMap - } - return nil -} - -func (x *Matcher_MatcherTree) GetCustomMatch() *v3.TypedExtensionConfig { - if x, ok := x.GetTreeType().(*Matcher_MatcherTree_CustomMatch); ok { - return x.CustomMatch - } - return nil -} - -type isMatcher_MatcherTree_TreeType interface { - isMatcher_MatcherTree_TreeType() -} - -type Matcher_MatcherTree_ExactMatchMap struct { - ExactMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,2,opt,name=exact_match_map,json=exactMatchMap,proto3,oneof"` -} - -type Matcher_MatcherTree_PrefixMatchMap struct { - PrefixMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,3,opt,name=prefix_match_map,json=prefixMatchMap,proto3,oneof"` -} - -type Matcher_MatcherTree_CustomMatch struct { - CustomMatch *v3.TypedExtensionConfig `protobuf:"bytes,4,opt,name=custom_match,json=customMatch,proto3,oneof"` -} - -func (*Matcher_MatcherTree_ExactMatchMap) isMatcher_MatcherTree_TreeType() {} - -func (*Matcher_MatcherTree_PrefixMatchMap) isMatcher_MatcherTree_TreeType() {} - -func (*Matcher_MatcherTree_CustomMatch) isMatcher_MatcherTree_TreeType() {} - -type Matcher_MatcherList_Predicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatchType: - // - // *Matcher_MatcherList_Predicate_SinglePredicate_ - // *Matcher_MatcherList_Predicate_OrMatcher - // *Matcher_MatcherList_Predicate_AndMatcher - // *Matcher_MatcherList_Predicate_NotMatcher - MatchType isMatcher_MatcherList_Predicate_MatchType `protobuf_oneof:"match_type"` -} - -func (x *Matcher_MatcherList_Predicate) Reset() { - *x = Matcher_MatcherList_Predicate{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherList_Predicate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherList_Predicate) ProtoMessage() {} - -func (x *Matcher_MatcherList_Predicate) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherList_Predicate.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherList_Predicate) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0} -} - -func (m *Matcher_MatcherList_Predicate) GetMatchType() isMatcher_MatcherList_Predicate_MatchType { - if m != nil { - return m.MatchType - } - return nil -} - -func (x *Matcher_MatcherList_Predicate) GetSinglePredicate() *Matcher_MatcherList_Predicate_SinglePredicate { - if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_SinglePredicate_); ok { - return x.SinglePredicate - } - return nil -} - -func (x *Matcher_MatcherList_Predicate) GetOrMatcher() *Matcher_MatcherList_Predicate_PredicateList { - if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_OrMatcher); ok { - return x.OrMatcher - } - return nil -} - -func (x *Matcher_MatcherList_Predicate) GetAndMatcher() *Matcher_MatcherList_Predicate_PredicateList { - if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_AndMatcher); ok { - return x.AndMatcher - } - return nil -} - -func (x *Matcher_MatcherList_Predicate) GetNotMatcher() *Matcher_MatcherList_Predicate { - if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_NotMatcher); ok { - return x.NotMatcher - } - return nil -} - -type isMatcher_MatcherList_Predicate_MatchType interface { - isMatcher_MatcherList_Predicate_MatchType() -} - -type Matcher_MatcherList_Predicate_SinglePredicate_ struct { - SinglePredicate *Matcher_MatcherList_Predicate_SinglePredicate `protobuf:"bytes,1,opt,name=single_predicate,json=singlePredicate,proto3,oneof"` -} - -type Matcher_MatcherList_Predicate_OrMatcher struct { - OrMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,2,opt,name=or_matcher,json=orMatcher,proto3,oneof"` -} - -type Matcher_MatcherList_Predicate_AndMatcher struct { - AndMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,3,opt,name=and_matcher,json=andMatcher,proto3,oneof"` -} - -type Matcher_MatcherList_Predicate_NotMatcher struct { - NotMatcher *Matcher_MatcherList_Predicate `protobuf:"bytes,4,opt,name=not_matcher,json=notMatcher,proto3,oneof"` -} - -func (*Matcher_MatcherList_Predicate_SinglePredicate_) isMatcher_MatcherList_Predicate_MatchType() {} - -func (*Matcher_MatcherList_Predicate_OrMatcher) isMatcher_MatcherList_Predicate_MatchType() {} - -func (*Matcher_MatcherList_Predicate_AndMatcher) isMatcher_MatcherList_Predicate_MatchType() {} - -func (*Matcher_MatcherList_Predicate_NotMatcher) isMatcher_MatcherList_Predicate_MatchType() {} - -type Matcher_MatcherList_FieldMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Predicate *Matcher_MatcherList_Predicate `protobuf:"bytes,1,opt,name=predicate,proto3" json:"predicate,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` -} - -func (x *Matcher_MatcherList_FieldMatcher) Reset() { - *x = Matcher_MatcherList_FieldMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherList_FieldMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherList_FieldMatcher) ProtoMessage() {} - -func (x *Matcher_MatcherList_FieldMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherList_FieldMatcher.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherList_FieldMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 1} -} - -func (x *Matcher_MatcherList_FieldMatcher) GetPredicate() *Matcher_MatcherList_Predicate { - if x != nil { - return x.Predicate - } - return nil -} - -func (x *Matcher_MatcherList_FieldMatcher) GetOnMatch() *Matcher_OnMatch { - if x != nil { - return x.OnMatch - } - return nil -} - -type Matcher_MatcherList_Predicate_SinglePredicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` - // Types that are assignable to Matcher: - // - // *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch - // *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch - Matcher isMatcher_MatcherList_Predicate_SinglePredicate_Matcher `protobuf_oneof:"matcher"` -} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) Reset() { - *x = Matcher_MatcherList_Predicate_SinglePredicate{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherList_Predicate_SinglePredicate) ProtoMessage() {} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherList_Predicate_SinglePredicate.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherList_Predicate_SinglePredicate) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 0} -} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetInput() *v3.TypedExtensionConfig { - if x != nil { - return x.Input - } - return nil -} - -func (m *Matcher_MatcherList_Predicate_SinglePredicate) GetMatcher() isMatcher_MatcherList_Predicate_SinglePredicate_Matcher { - if m != nil { - return m.Matcher - } - return nil -} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetValueMatch() *StringMatcher { - if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch); ok { - return x.ValueMatch - } - return nil -} - -func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetCustomMatch() *v3.TypedExtensionConfig { - if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch); ok { - return x.CustomMatch - } - return nil -} - -type isMatcher_MatcherList_Predicate_SinglePredicate_Matcher interface { - isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() -} - -type Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch struct { - ValueMatch *StringMatcher `protobuf:"bytes,2,opt,name=value_match,json=valueMatch,proto3,oneof"` -} - -type Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch struct { - CustomMatch *v3.TypedExtensionConfig `protobuf:"bytes,3,opt,name=custom_match,json=customMatch,proto3,oneof"` -} - -func (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() { -} - -func (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() { -} - -type Matcher_MatcherList_Predicate_PredicateList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Predicate []*Matcher_MatcherList_Predicate `protobuf:"bytes,1,rep,name=predicate,proto3" json:"predicate,omitempty"` -} - -func (x *Matcher_MatcherList_Predicate_PredicateList) Reset() { - *x = Matcher_MatcherList_Predicate_PredicateList{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherList_Predicate_PredicateList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherList_Predicate_PredicateList) ProtoMessage() {} - -func (x *Matcher_MatcherList_Predicate_PredicateList) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherList_Predicate_PredicateList.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherList_Predicate_PredicateList) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 1} -} - -func (x *Matcher_MatcherList_Predicate_PredicateList) GetPredicate() []*Matcher_MatcherList_Predicate { - if x != nil { - return x.Predicate - } - return nil -} - -type Matcher_MatcherTree_MatchMap struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Map map[string]*Matcher_OnMatch `protobuf:"bytes,1,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Matcher_MatcherTree_MatchMap) Reset() { - *x = Matcher_MatcherTree_MatchMap{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matcher_MatcherTree_MatchMap) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matcher_MatcherTree_MatchMap) ProtoMessage() {} - -func (x *Matcher_MatcherTree_MatchMap) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Matcher_MatcherTree_MatchMap.ProtoReflect.Descriptor instead. -func (*Matcher_MatcherTree_MatchMap) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 2, 0} -} - -func (x *Matcher_MatcherTree_MatchMap) GetMap() map[string]*Matcher_OnMatch { - if x != nil { - return x.Map - } - return nil -} - -var File_xds_type_matcher_v3_matcher_proto protoreflect.FileDescriptor - -var file_xds_type_matcher_v3_matcher_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x80, 0x10, 0x0a, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4d, 0x0a, - 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, - 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x0c, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x48, 0x00, 0x52, 0x0b, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x6f, - 0x6e, 0x5f, 0x6e, 0x6f, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, - 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x09, 0x6f, 0x6e, 0x4e, 0x6f, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x1a, 0x91, 0x01, 0x0a, 0x07, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x38, 0x0a, - 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x06, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xb6, 0x08, 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5b, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, - 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x73, 0x1a, 0x91, 0x06, 0x0a, 0x09, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x12, 0x6f, 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x78, 0x64, 0x73, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, - 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, - 0x52, 0x0f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x12, 0x61, 0x0a, 0x0a, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, - 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x72, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x12, 0x63, 0x0a, 0x0b, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x78, 0x64, 0x73, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, - 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x61, - 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0b, 0x6e, 0x6f, 0x74, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, - 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x1a, 0xf3, 0x01, 0x0a, 0x0f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, - 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x46, - 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x6b, 0x0a, 0x0d, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x78, 0x64, 0x73, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x42, 0x11, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xb5, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x78, 0x64, 0x73, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xa9, - 0x04, 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, 0x41, - 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x12, 0x5b, 0x0a, 0x0f, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x64, 0x73, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x54, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, - 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x12, 0x5d, - 0x0a, 0x10, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6d, - 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, - 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x12, 0x46, 0x0a, - 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xc0, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, - 0x61, 0x70, 0x12, 0x56, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, - 0x61, 0x70, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x9a, 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x1a, 0x5c, 0x0a, 0x08, 0x4d, 0x61, - 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x09, 0x74, 0x72, 0x65, 0x65, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, - 0x06, 0x02, 0x08, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x42, 0x5c, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, - 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, - 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_type_matcher_v3_matcher_proto_rawDescOnce sync.Once - file_xds_type_matcher_v3_matcher_proto_rawDescData = file_xds_type_matcher_v3_matcher_proto_rawDesc -) - -func file_xds_type_matcher_v3_matcher_proto_rawDescGZIP() []byte { - file_xds_type_matcher_v3_matcher_proto_rawDescOnce.Do(func() { - file_xds_type_matcher_v3_matcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_matcher_proto_rawDescData) - }) - return file_xds_type_matcher_v3_matcher_proto_rawDescData -} - -var file_xds_type_matcher_v3_matcher_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_xds_type_matcher_v3_matcher_proto_goTypes = []interface{}{ - (*Matcher)(nil), // 0: xds.type.matcher.v3.Matcher - (*Matcher_OnMatch)(nil), // 1: xds.type.matcher.v3.Matcher.OnMatch - (*Matcher_MatcherList)(nil), // 2: xds.type.matcher.v3.Matcher.MatcherList - (*Matcher_MatcherTree)(nil), // 3: xds.type.matcher.v3.Matcher.MatcherTree - (*Matcher_MatcherList_Predicate)(nil), // 4: xds.type.matcher.v3.Matcher.MatcherList.Predicate - (*Matcher_MatcherList_FieldMatcher)(nil), // 5: xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher - (*Matcher_MatcherList_Predicate_SinglePredicate)(nil), // 6: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate - (*Matcher_MatcherList_Predicate_PredicateList)(nil), // 7: xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList - (*Matcher_MatcherTree_MatchMap)(nil), // 8: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap - nil, // 9: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry - (*v3.TypedExtensionConfig)(nil), // 10: xds.core.v3.TypedExtensionConfig - (*StringMatcher)(nil), // 11: xds.type.matcher.v3.StringMatcher -} -var file_xds_type_matcher_v3_matcher_proto_depIdxs = []int32{ - 2, // 0: xds.type.matcher.v3.Matcher.matcher_list:type_name -> xds.type.matcher.v3.Matcher.MatcherList - 3, // 1: xds.type.matcher.v3.Matcher.matcher_tree:type_name -> xds.type.matcher.v3.Matcher.MatcherTree - 1, // 2: xds.type.matcher.v3.Matcher.on_no_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch - 0, // 3: xds.type.matcher.v3.Matcher.OnMatch.matcher:type_name -> xds.type.matcher.v3.Matcher - 10, // 4: xds.type.matcher.v3.Matcher.OnMatch.action:type_name -> xds.core.v3.TypedExtensionConfig - 5, // 5: xds.type.matcher.v3.Matcher.MatcherList.matchers:type_name -> xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher - 10, // 6: xds.type.matcher.v3.Matcher.MatcherTree.input:type_name -> xds.core.v3.TypedExtensionConfig - 8, // 7: xds.type.matcher.v3.Matcher.MatcherTree.exact_match_map:type_name -> xds.type.matcher.v3.Matcher.MatcherTree.MatchMap - 8, // 8: xds.type.matcher.v3.Matcher.MatcherTree.prefix_match_map:type_name -> xds.type.matcher.v3.Matcher.MatcherTree.MatchMap - 10, // 9: xds.type.matcher.v3.Matcher.MatcherTree.custom_match:type_name -> xds.core.v3.TypedExtensionConfig - 6, // 10: xds.type.matcher.v3.Matcher.MatcherList.Predicate.single_predicate:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate - 7, // 11: xds.type.matcher.v3.Matcher.MatcherList.Predicate.or_matcher:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList - 7, // 12: xds.type.matcher.v3.Matcher.MatcherList.Predicate.and_matcher:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList - 4, // 13: xds.type.matcher.v3.Matcher.MatcherList.Predicate.not_matcher:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate - 4, // 14: xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher.predicate:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate - 1, // 15: xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch - 10, // 16: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.input:type_name -> xds.core.v3.TypedExtensionConfig - 11, // 17: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.value_match:type_name -> xds.type.matcher.v3.StringMatcher - 10, // 18: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.custom_match:type_name -> xds.core.v3.TypedExtensionConfig - 4, // 19: xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList.predicate:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate - 9, // 20: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.map:type_name -> xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry - 1, // 21: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry.value:type_name -> xds.type.matcher.v3.Matcher.OnMatch - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name -} - -func init() { file_xds_type_matcher_v3_matcher_proto_init() } -func file_xds_type_matcher_v3_matcher_proto_init() { - if File_xds_type_matcher_v3_matcher_proto != nil { - return - } - file_xds_type_matcher_v3_string_proto_init() - if !protoimpl.UnsafeEnabled { - file_xds_type_matcher_v3_matcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_OnMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherTree); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherList_Predicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherList_FieldMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherList_Predicate_SinglePredicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherList_Predicate_PredicateList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matcher_MatcherTree_MatchMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Matcher_MatcherList_)(nil), - (*Matcher_MatcherTree_)(nil), - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Matcher_OnMatch_Matcher)(nil), - (*Matcher_OnMatch_Action)(nil), - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*Matcher_MatcherTree_ExactMatchMap)(nil), - (*Matcher_MatcherTree_PrefixMatchMap)(nil), - (*Matcher_MatcherTree_CustomMatch)(nil), - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*Matcher_MatcherList_Predicate_SinglePredicate_)(nil), - (*Matcher_MatcherList_Predicate_OrMatcher)(nil), - (*Matcher_MatcherList_Predicate_AndMatcher)(nil), - (*Matcher_MatcherList_Predicate_NotMatcher)(nil), - } - file_xds_type_matcher_v3_matcher_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch)(nil), - (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_type_matcher_v3_matcher_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_type_matcher_v3_matcher_proto_goTypes, - DependencyIndexes: file_xds_type_matcher_v3_matcher_proto_depIdxs, - MessageInfos: file_xds_type_matcher_v3_matcher_proto_msgTypes, - }.Build() - File_xds_type_matcher_v3_matcher_proto = out.File - file_xds_type_matcher_v3_matcher_proto_rawDesc = nil - file_xds_type_matcher_v3_matcher_proto_goTypes = nil - file_xds_type_matcher_v3_matcher_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.validate.go deleted file mode 100644 index 60b721f5f5a..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.validate.go +++ /dev/null @@ -1,1913 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/type/matcher/v3/matcher.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Matcher with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Matcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Matcher with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in MatcherMultiError, or nil if none found. -func (m *Matcher) ValidateAll() error { - return m.validate(true) -} - -func (m *Matcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetOnNoMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MatcherValidationError{ - field: "OnNoMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MatcherValidationError{ - field: "OnNoMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOnNoMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatcherValidationError{ - field: "OnNoMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch v := m.MatcherType.(type) { - case *Matcher_MatcherList_: - if v == nil { - err := MatcherValidationError{ - field: "MatcherType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMatcherList()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MatcherValidationError{ - field: "MatcherList", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MatcherValidationError{ - field: "MatcherList", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMatcherList()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatcherValidationError{ - field: "MatcherList", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Matcher_MatcherTree_: - if v == nil { - err := MatcherValidationError{ - field: "MatcherType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMatcherTree()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MatcherValidationError{ - field: "MatcherTree", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MatcherValidationError{ - field: "MatcherTree", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMatcherTree()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatcherValidationError{ - field: "MatcherTree", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return MatcherMultiError(errors) - } - - return nil -} - -// MatcherMultiError is an error wrapping multiple validation errors returned -// by Matcher.ValidateAll() if the designated constraints aren't met. -type MatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MatcherMultiError) AllErrors() []error { return m } - -// MatcherValidationError is the validation error returned by Matcher.Validate -// if the designated constraints aren't met. -type MatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MatcherValidationError) ErrorName() string { return "MatcherValidationError" } - -// Error satisfies the builtin error interface -func (e MatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MatcherValidationError{} - -// Validate checks the field values on Matcher_OnMatch with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *Matcher_OnMatch) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Matcher_OnMatch with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Matcher_OnMatchMultiError, or nil if none found. -func (m *Matcher_OnMatch) ValidateAll() error { - return m.validate(true) -} - -func (m *Matcher_OnMatch) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofOnMatchPresent := false - switch v := m.OnMatch.(type) { - case *Matcher_OnMatch_Matcher: - if v == nil { - err := Matcher_OnMatchValidationError{ - field: "OnMatch", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofOnMatchPresent = true - - if all { - switch v := interface{}(m.GetMatcher()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_OnMatchValidationError{ - field: "Matcher", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_OnMatchValidationError{ - field: "Matcher", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_OnMatchValidationError{ - field: "Matcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Matcher_OnMatch_Action: - if v == nil { - err := Matcher_OnMatchValidationError{ - field: "OnMatch", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofOnMatchPresent = true - - if all { - switch v := interface{}(m.GetAction()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_OnMatchValidationError{ - field: "Action", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_OnMatchValidationError{ - field: "Action", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_OnMatchValidationError{ - field: "Action", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofOnMatchPresent { - err := Matcher_OnMatchValidationError{ - field: "OnMatch", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return Matcher_OnMatchMultiError(errors) - } - - return nil -} - -// Matcher_OnMatchMultiError is an error wrapping multiple validation errors -// returned by Matcher_OnMatch.ValidateAll() if the designated constraints -// aren't met. -type Matcher_OnMatchMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Matcher_OnMatchMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Matcher_OnMatchMultiError) AllErrors() []error { return m } - -// Matcher_OnMatchValidationError is the validation error returned by -// Matcher_OnMatch.Validate if the designated constraints aren't met. -type Matcher_OnMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Matcher_OnMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Matcher_OnMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Matcher_OnMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Matcher_OnMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Matcher_OnMatchValidationError) ErrorName() string { return "Matcher_OnMatchValidationError" } - -// Error satisfies the builtin error interface -func (e Matcher_OnMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatcher_OnMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Matcher_OnMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Matcher_OnMatchValidationError{} - -// Validate checks the field values on Matcher_MatcherList with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Matcher_MatcherList) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Matcher_MatcherList with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Matcher_MatcherListMultiError, or nil if none found. -func (m *Matcher_MatcherList) ValidateAll() error { - return m.validate(true) -} - -func (m *Matcher_MatcherList) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetMatchers()) < 1 { - err := Matcher_MatcherListValidationError{ - field: "Matchers", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetMatchers() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherListValidationError{ - field: fmt.Sprintf("Matchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherListValidationError{ - field: fmt.Sprintf("Matchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherListValidationError{ - field: fmt.Sprintf("Matchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return Matcher_MatcherListMultiError(errors) - } - - return nil -} - -// Matcher_MatcherListMultiError is an error wrapping multiple validation -// errors returned by Matcher_MatcherList.ValidateAll() if the designated -// constraints aren't met. -type Matcher_MatcherListMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Matcher_MatcherListMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Matcher_MatcherListMultiError) AllErrors() []error { return m } - -// Matcher_MatcherListValidationError is the validation error returned by -// Matcher_MatcherList.Validate if the designated constraints aren't met. -type Matcher_MatcherListValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Matcher_MatcherListValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Matcher_MatcherListValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Matcher_MatcherListValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Matcher_MatcherListValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Matcher_MatcherListValidationError) ErrorName() string { - return "Matcher_MatcherListValidationError" -} - -// Error satisfies the builtin error interface -func (e Matcher_MatcherListValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatcher_MatcherList.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Matcher_MatcherListValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Matcher_MatcherListValidationError{} - -// Validate checks the field values on Matcher_MatcherTree with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Matcher_MatcherTree) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Matcher_MatcherTree with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Matcher_MatcherTreeMultiError, or nil if none found. -func (m *Matcher_MatcherTree) ValidateAll() error { - return m.validate(true) -} - -func (m *Matcher_MatcherTree) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetInput() == nil { - err := Matcher_MatcherTreeValidationError{ - field: "Input", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetInput()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherTreeValidationError{ - field: "Input", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherTreeValidationError{ - field: "Input", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherTreeValidationError{ - field: "Input", - reason: "embedded message failed validation", - cause: err, - } - } - } - - oneofTreeTypePresent := false - switch v := m.TreeType.(type) { - case *Matcher_MatcherTree_ExactMatchMap: - if v == nil { - err := Matcher_MatcherTreeValidationError{ - field: "TreeType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTreeTypePresent = true - - if all { - switch v := interface{}(m.GetExactMatchMap()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherTreeValidationError{ - field: "ExactMatchMap", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherTreeValidationError{ - field: "ExactMatchMap", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExactMatchMap()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherTreeValidationError{ - field: "ExactMatchMap", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Matcher_MatcherTree_PrefixMatchMap: - if v == nil { - err := Matcher_MatcherTreeValidationError{ - field: "TreeType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTreeTypePresent = true - - if all { - switch v := interface{}(m.GetPrefixMatchMap()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherTreeValidationError{ - field: "PrefixMatchMap", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherTreeValidationError{ - field: "PrefixMatchMap", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPrefixMatchMap()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherTreeValidationError{ - field: "PrefixMatchMap", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Matcher_MatcherTree_CustomMatch: - if v == nil { - err := Matcher_MatcherTreeValidationError{ - field: "TreeType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTreeTypePresent = true - - if all { - switch v := interface{}(m.GetCustomMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherTreeValidationError{ - field: "CustomMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherTreeValidationError{ - field: "CustomMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherTreeValidationError{ - field: "CustomMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofTreeTypePresent { - err := Matcher_MatcherTreeValidationError{ - field: "TreeType", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return Matcher_MatcherTreeMultiError(errors) - } - - return nil -} - -// Matcher_MatcherTreeMultiError is an error wrapping multiple validation -// errors returned by Matcher_MatcherTree.ValidateAll() if the designated -// constraints aren't met. -type Matcher_MatcherTreeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Matcher_MatcherTreeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Matcher_MatcherTreeMultiError) AllErrors() []error { return m } - -// Matcher_MatcherTreeValidationError is the validation error returned by -// Matcher_MatcherTree.Validate if the designated constraints aren't met. -type Matcher_MatcherTreeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Matcher_MatcherTreeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Matcher_MatcherTreeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Matcher_MatcherTreeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Matcher_MatcherTreeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Matcher_MatcherTreeValidationError) ErrorName() string { - return "Matcher_MatcherTreeValidationError" -} - -// Error satisfies the builtin error interface -func (e Matcher_MatcherTreeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatcher_MatcherTree.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Matcher_MatcherTreeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Matcher_MatcherTreeValidationError{} - -// Validate checks the field values on Matcher_MatcherList_Predicate with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Matcher_MatcherList_Predicate) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Matcher_MatcherList_Predicate with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// Matcher_MatcherList_PredicateMultiError, or nil if none found. -func (m *Matcher_MatcherList_Predicate) ValidateAll() error { - return m.validate(true) -} - -func (m *Matcher_MatcherList_Predicate) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofMatchTypePresent := false - switch v := m.MatchType.(type) { - case *Matcher_MatcherList_Predicate_SinglePredicate_: - if v == nil { - err := Matcher_MatcherList_PredicateValidationError{ - field: "MatchType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchTypePresent = true - - if all { - switch v := interface{}(m.GetSinglePredicate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherList_PredicateValidationError{ - field: "SinglePredicate", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherList_PredicateValidationError{ - field: "SinglePredicate", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSinglePredicate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherList_PredicateValidationError{ - field: "SinglePredicate", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Matcher_MatcherList_Predicate_OrMatcher: - if v == nil { - err := Matcher_MatcherList_PredicateValidationError{ - field: "MatchType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchTypePresent = true - - if all { - switch v := interface{}(m.GetOrMatcher()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherList_PredicateValidationError{ - field: "OrMatcher", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherList_PredicateValidationError{ - field: "OrMatcher", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOrMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherList_PredicateValidationError{ - field: "OrMatcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Matcher_MatcherList_Predicate_AndMatcher: - if v == nil { - err := Matcher_MatcherList_PredicateValidationError{ - field: "MatchType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchTypePresent = true - - if all { - switch v := interface{}(m.GetAndMatcher()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherList_PredicateValidationError{ - field: "AndMatcher", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherList_PredicateValidationError{ - field: "AndMatcher", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAndMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherList_PredicateValidationError{ - field: "AndMatcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Matcher_MatcherList_Predicate_NotMatcher: - if v == nil { - err := Matcher_MatcherList_PredicateValidationError{ - field: "MatchType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchTypePresent = true - - if all { - switch v := interface{}(m.GetNotMatcher()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherList_PredicateValidationError{ - field: "NotMatcher", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherList_PredicateValidationError{ - field: "NotMatcher", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNotMatcher()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherList_PredicateValidationError{ - field: "NotMatcher", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofMatchTypePresent { - err := Matcher_MatcherList_PredicateValidationError{ - field: "MatchType", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return Matcher_MatcherList_PredicateMultiError(errors) - } - - return nil -} - -// Matcher_MatcherList_PredicateMultiError is an error wrapping multiple -// validation errors returned by Matcher_MatcherList_Predicate.ValidateAll() -// if the designated constraints aren't met. -type Matcher_MatcherList_PredicateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Matcher_MatcherList_PredicateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Matcher_MatcherList_PredicateMultiError) AllErrors() []error { return m } - -// Matcher_MatcherList_PredicateValidationError is the validation error -// returned by Matcher_MatcherList_Predicate.Validate if the designated -// constraints aren't met. -type Matcher_MatcherList_PredicateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Matcher_MatcherList_PredicateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Matcher_MatcherList_PredicateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Matcher_MatcherList_PredicateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Matcher_MatcherList_PredicateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Matcher_MatcherList_PredicateValidationError) ErrorName() string { - return "Matcher_MatcherList_PredicateValidationError" -} - -// Error satisfies the builtin error interface -func (e Matcher_MatcherList_PredicateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatcher_MatcherList_Predicate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Matcher_MatcherList_PredicateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Matcher_MatcherList_PredicateValidationError{} - -// Validate checks the field values on Matcher_MatcherList_FieldMatcher with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *Matcher_MatcherList_FieldMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Matcher_MatcherList_FieldMatcher with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// Matcher_MatcherList_FieldMatcherMultiError, or nil if none found. -func (m *Matcher_MatcherList_FieldMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *Matcher_MatcherList_FieldMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetPredicate() == nil { - err := Matcher_MatcherList_FieldMatcherValidationError{ - field: "Predicate", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetPredicate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ - field: "Predicate", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ - field: "Predicate", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPredicate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherList_FieldMatcherValidationError{ - field: "Predicate", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetOnMatch() == nil { - err := Matcher_MatcherList_FieldMatcherValidationError{ - field: "OnMatch", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetOnMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherList_FieldMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return Matcher_MatcherList_FieldMatcherMultiError(errors) - } - - return nil -} - -// Matcher_MatcherList_FieldMatcherMultiError is an error wrapping multiple -// validation errors returned by -// Matcher_MatcherList_FieldMatcher.ValidateAll() if the designated -// constraints aren't met. -type Matcher_MatcherList_FieldMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Matcher_MatcherList_FieldMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Matcher_MatcherList_FieldMatcherMultiError) AllErrors() []error { return m } - -// Matcher_MatcherList_FieldMatcherValidationError is the validation error -// returned by Matcher_MatcherList_FieldMatcher.Validate if the designated -// constraints aren't met. -type Matcher_MatcherList_FieldMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Matcher_MatcherList_FieldMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Matcher_MatcherList_FieldMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Matcher_MatcherList_FieldMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Matcher_MatcherList_FieldMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Matcher_MatcherList_FieldMatcherValidationError) ErrorName() string { - return "Matcher_MatcherList_FieldMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e Matcher_MatcherList_FieldMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatcher_MatcherList_FieldMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Matcher_MatcherList_FieldMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Matcher_MatcherList_FieldMatcherValidationError{} - -// Validate checks the field values on -// Matcher_MatcherList_Predicate_SinglePredicate with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Matcher_MatcherList_Predicate_SinglePredicate) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// Matcher_MatcherList_Predicate_SinglePredicate with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// Matcher_MatcherList_Predicate_SinglePredicateMultiError, or nil if none found. -func (m *Matcher_MatcherList_Predicate_SinglePredicate) ValidateAll() error { - return m.validate(true) -} - -func (m *Matcher_MatcherList_Predicate_SinglePredicate) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetInput() == nil { - err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "Input", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetInput()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "Input", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "Input", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "Input", - reason: "embedded message failed validation", - cause: err, - } - } - } - - oneofMatcherPresent := false - switch v := m.Matcher.(type) { - case *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch: - if v == nil { - err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "Matcher", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatcherPresent = true - - if all { - switch v := interface{}(m.GetValueMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "ValueMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "ValueMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValueMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "ValueMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch: - if v == nil { - err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "Matcher", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatcherPresent = true - - if all { - switch v := interface{}(m.GetCustomMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "CustomMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "CustomMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "CustomMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofMatcherPresent { - err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{ - field: "Matcher", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return Matcher_MatcherList_Predicate_SinglePredicateMultiError(errors) - } - - return nil -} - -// Matcher_MatcherList_Predicate_SinglePredicateMultiError is an error wrapping -// multiple validation errors returned by -// Matcher_MatcherList_Predicate_SinglePredicate.ValidateAll() if the -// designated constraints aren't met. -type Matcher_MatcherList_Predicate_SinglePredicateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Matcher_MatcherList_Predicate_SinglePredicateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Matcher_MatcherList_Predicate_SinglePredicateMultiError) AllErrors() []error { return m } - -// Matcher_MatcherList_Predicate_SinglePredicateValidationError is the -// validation error returned by -// Matcher_MatcherList_Predicate_SinglePredicate.Validate if the designated -// constraints aren't met. -type Matcher_MatcherList_Predicate_SinglePredicateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) ErrorName() string { - return "Matcher_MatcherList_Predicate_SinglePredicateValidationError" -} - -// Error satisfies the builtin error interface -func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatcher_MatcherList_Predicate_SinglePredicate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Matcher_MatcherList_Predicate_SinglePredicateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Matcher_MatcherList_Predicate_SinglePredicateValidationError{} - -// Validate checks the field values on -// Matcher_MatcherList_Predicate_PredicateList with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Matcher_MatcherList_Predicate_PredicateList) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// Matcher_MatcherList_Predicate_PredicateList with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// Matcher_MatcherList_Predicate_PredicateListMultiError, or nil if none found. -func (m *Matcher_MatcherList_Predicate_PredicateList) ValidateAll() error { - return m.validate(true) -} - -func (m *Matcher_MatcherList_Predicate_PredicateList) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetPredicate()) < 2 { - err := Matcher_MatcherList_Predicate_PredicateListValidationError{ - field: "Predicate", - reason: "value must contain at least 2 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetPredicate() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherList_Predicate_PredicateListValidationError{ - field: fmt.Sprintf("Predicate[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherList_Predicate_PredicateListValidationError{ - field: fmt.Sprintf("Predicate[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherList_Predicate_PredicateListValidationError{ - field: fmt.Sprintf("Predicate[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return Matcher_MatcherList_Predicate_PredicateListMultiError(errors) - } - - return nil -} - -// Matcher_MatcherList_Predicate_PredicateListMultiError is an error wrapping -// multiple validation errors returned by -// Matcher_MatcherList_Predicate_PredicateList.ValidateAll() if the designated -// constraints aren't met. -type Matcher_MatcherList_Predicate_PredicateListMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Matcher_MatcherList_Predicate_PredicateListMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Matcher_MatcherList_Predicate_PredicateListMultiError) AllErrors() []error { return m } - -// Matcher_MatcherList_Predicate_PredicateListValidationError is the validation -// error returned by Matcher_MatcherList_Predicate_PredicateList.Validate if -// the designated constraints aren't met. -type Matcher_MatcherList_Predicate_PredicateListValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Matcher_MatcherList_Predicate_PredicateListValidationError) ErrorName() string { - return "Matcher_MatcherList_Predicate_PredicateListValidationError" -} - -// Error satisfies the builtin error interface -func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatcher_MatcherList_Predicate_PredicateList.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Matcher_MatcherList_Predicate_PredicateListValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Matcher_MatcherList_Predicate_PredicateListValidationError{} - -// Validate checks the field values on Matcher_MatcherTree_MatchMap with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Matcher_MatcherTree_MatchMap) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Matcher_MatcherTree_MatchMap with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Matcher_MatcherTree_MatchMapMultiError, or nil if none found. -func (m *Matcher_MatcherTree_MatchMap) ValidateAll() error { - return m.validate(true) -} - -func (m *Matcher_MatcherTree_MatchMap) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetMap()) < 1 { - err := Matcher_MatcherTree_MatchMapValidationError{ - field: "Map", - reason: "value must contain at least 1 pair(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - { - sorted_keys := make([]string, len(m.GetMap())) - i := 0 - for key := range m.GetMap() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetMap()[key] - _ = val - - // no validation rules for Map[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Matcher_MatcherTree_MatchMapValidationError{ - field: fmt.Sprintf("Map[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Matcher_MatcherTree_MatchMapValidationError{ - field: fmt.Sprintf("Map[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Matcher_MatcherTree_MatchMapValidationError{ - field: fmt.Sprintf("Map[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(errors) > 0 { - return Matcher_MatcherTree_MatchMapMultiError(errors) - } - - return nil -} - -// Matcher_MatcherTree_MatchMapMultiError is an error wrapping multiple -// validation errors returned by Matcher_MatcherTree_MatchMap.ValidateAll() if -// the designated constraints aren't met. -type Matcher_MatcherTree_MatchMapMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Matcher_MatcherTree_MatchMapMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Matcher_MatcherTree_MatchMapMultiError) AllErrors() []error { return m } - -// Matcher_MatcherTree_MatchMapValidationError is the validation error returned -// by Matcher_MatcherTree_MatchMap.Validate if the designated constraints -// aren't met. -type Matcher_MatcherTree_MatchMapValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Matcher_MatcherTree_MatchMapValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Matcher_MatcherTree_MatchMapValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Matcher_MatcherTree_MatchMapValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Matcher_MatcherTree_MatchMapValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Matcher_MatcherTree_MatchMapValidationError) ErrorName() string { - return "Matcher_MatcherTree_MatchMapValidationError" -} - -// Error satisfies the builtin error interface -func (e Matcher_MatcherTree_MatchMapValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatcher_MatcherTree_MatchMap.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Matcher_MatcherTree_MatchMapValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Matcher_MatcherTree_MatchMapValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go deleted file mode 100644 index d7bc620b91a..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go +++ /dev/null @@ -1,539 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/type/matcher/v3/range.proto - -package v3 - -import ( - v3 "github.com/cncf/xds/go/xds/type/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Int64RangeMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RangeMatchers []*Int64RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` -} - -func (x *Int64RangeMatcher) Reset() { - *x = Int64RangeMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int64RangeMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int64RangeMatcher) ProtoMessage() {} - -func (x *Int64RangeMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int64RangeMatcher.ProtoReflect.Descriptor instead. -func (*Int64RangeMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{0} -} - -func (x *Int64RangeMatcher) GetRangeMatchers() []*Int64RangeMatcher_RangeMatcher { - if x != nil { - return x.RangeMatchers - } - return nil -} - -type Int32RangeMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RangeMatchers []*Int32RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` -} - -func (x *Int32RangeMatcher) Reset() { - *x = Int32RangeMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int32RangeMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int32RangeMatcher) ProtoMessage() {} - -func (x *Int32RangeMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int32RangeMatcher.ProtoReflect.Descriptor instead. -func (*Int32RangeMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{1} -} - -func (x *Int32RangeMatcher) GetRangeMatchers() []*Int32RangeMatcher_RangeMatcher { - if x != nil { - return x.RangeMatchers - } - return nil -} - -type DoubleRangeMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RangeMatchers []*DoubleRangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` -} - -func (x *DoubleRangeMatcher) Reset() { - *x = DoubleRangeMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoubleRangeMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoubleRangeMatcher) ProtoMessage() {} - -func (x *DoubleRangeMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoubleRangeMatcher.ProtoReflect.Descriptor instead. -func (*DoubleRangeMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{2} -} - -func (x *DoubleRangeMatcher) GetRangeMatchers() []*DoubleRangeMatcher_RangeMatcher { - if x != nil { - return x.RangeMatchers - } - return nil -} - -type Int64RangeMatcher_RangeMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ranges []*v3.Int64Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` -} - -func (x *Int64RangeMatcher_RangeMatcher) Reset() { - *x = Int64RangeMatcher_RangeMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int64RangeMatcher_RangeMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int64RangeMatcher_RangeMatcher) ProtoMessage() {} - -func (x *Int64RangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int64RangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead. -func (*Int64RangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Int64RangeMatcher_RangeMatcher) GetRanges() []*v3.Int64Range { - if x != nil { - return x.Ranges - } - return nil -} - -func (x *Int64RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch { - if x != nil { - return x.OnMatch - } - return nil -} - -type Int32RangeMatcher_RangeMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ranges []*v3.Int32Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` -} - -func (x *Int32RangeMatcher_RangeMatcher) Reset() { - *x = Int32RangeMatcher_RangeMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int32RangeMatcher_RangeMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int32RangeMatcher_RangeMatcher) ProtoMessage() {} - -func (x *Int32RangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int32RangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead. -func (*Int32RangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *Int32RangeMatcher_RangeMatcher) GetRanges() []*v3.Int32Range { - if x != nil { - return x.Ranges - } - return nil -} - -func (x *Int32RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch { - if x != nil { - return x.OnMatch - } - return nil -} - -type DoubleRangeMatcher_RangeMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ranges []*v3.DoubleRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` - OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` -} - -func (x *DoubleRangeMatcher_RangeMatcher) Reset() { - *x = DoubleRangeMatcher_RangeMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoubleRangeMatcher_RangeMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoubleRangeMatcher_RangeMatcher) ProtoMessage() {} - -func (x *DoubleRangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_range_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoubleRangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead. -func (*DoubleRangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *DoubleRangeMatcher_RangeMatcher) GetRanges() []*v3.DoubleRange { - if x != nil { - return x.Ranges - } - return nil -} - -func (x *DoubleRangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch { - if x != nil { - return x.OnMatch - } - return nil -} - -var File_xds_type_matcher_v3_range_proto protoreflect.FileDescriptor - -var file_xds_type_matcher_v3_range_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x01, 0x0a, 0x11, - 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x12, 0x5a, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x64, 0x73, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x01, - 0x0a, 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39, - 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, - 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, - 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xfc, 0x01, 0x0a, 0x11, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x12, 0x5a, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x01, 0x0a, - 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, - 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, - 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xff, 0x01, 0x0a, 0x12, 0x44, 0x6f, - 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x12, 0x5b, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8b, 0x01, - 0x0a, 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3a, - 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x75, - 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, - 0x08, 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, - 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x5a, 0x0a, 0x1e, 0x63, - 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, - 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_type_matcher_v3_range_proto_rawDescOnce sync.Once - file_xds_type_matcher_v3_range_proto_rawDescData = file_xds_type_matcher_v3_range_proto_rawDesc -) - -func file_xds_type_matcher_v3_range_proto_rawDescGZIP() []byte { - file_xds_type_matcher_v3_range_proto_rawDescOnce.Do(func() { - file_xds_type_matcher_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_range_proto_rawDescData) - }) - return file_xds_type_matcher_v3_range_proto_rawDescData -} - -var file_xds_type_matcher_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_xds_type_matcher_v3_range_proto_goTypes = []interface{}{ - (*Int64RangeMatcher)(nil), // 0: xds.type.matcher.v3.Int64RangeMatcher - (*Int32RangeMatcher)(nil), // 1: xds.type.matcher.v3.Int32RangeMatcher - (*DoubleRangeMatcher)(nil), // 2: xds.type.matcher.v3.DoubleRangeMatcher - (*Int64RangeMatcher_RangeMatcher)(nil), // 3: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher - (*Int32RangeMatcher_RangeMatcher)(nil), // 4: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher - (*DoubleRangeMatcher_RangeMatcher)(nil), // 5: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher - (*v3.Int64Range)(nil), // 6: xds.type.v3.Int64Range - (*Matcher_OnMatch)(nil), // 7: xds.type.matcher.v3.Matcher.OnMatch - (*v3.Int32Range)(nil), // 8: xds.type.v3.Int32Range - (*v3.DoubleRange)(nil), // 9: xds.type.v3.DoubleRange -} -var file_xds_type_matcher_v3_range_proto_depIdxs = []int32{ - 3, // 0: xds.type.matcher.v3.Int64RangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher - 4, // 1: xds.type.matcher.v3.Int32RangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher - 5, // 2: xds.type.matcher.v3.DoubleRangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher - 6, // 3: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.Int64Range - 7, // 4: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch - 8, // 5: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.Int32Range - 7, // 6: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch - 9, // 7: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.DoubleRange - 7, // 8: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_xds_type_matcher_v3_range_proto_init() } -func file_xds_type_matcher_v3_range_proto_init() { - if File_xds_type_matcher_v3_range_proto != nil { - return - } - file_xds_type_matcher_v3_matcher_proto_init() - if !protoimpl.UnsafeEnabled { - file_xds_type_matcher_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int64RangeMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int32RangeMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoubleRangeMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_range_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int64RangeMatcher_RangeMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_range_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int32RangeMatcher_RangeMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_range_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoubleRangeMatcher_RangeMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_type_matcher_v3_range_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_type_matcher_v3_range_proto_goTypes, - DependencyIndexes: file_xds_type_matcher_v3_range_proto_depIdxs, - MessageInfos: file_xds_type_matcher_v3_range_proto_msgTypes, - }.Build() - File_xds_type_matcher_v3_range_proto = out.File - file_xds_type_matcher_v3_range_proto_rawDesc = nil - file_xds_type_matcher_v3_range_proto_goTypes = nil - file_xds_type_matcher_v3_range_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go deleted file mode 100644 index 8cb5986438a..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go +++ /dev/null @@ -1,975 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/type/matcher/v3/range.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Int64RangeMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *Int64RangeMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Int64RangeMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Int64RangeMatcherMultiError, or nil if none found. -func (m *Int64RangeMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *Int64RangeMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetRangeMatchers() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Int64RangeMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Int64RangeMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Int64RangeMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return Int64RangeMatcherMultiError(errors) - } - - return nil -} - -// Int64RangeMatcherMultiError is an error wrapping multiple validation errors -// returned by Int64RangeMatcher.ValidateAll() if the designated constraints -// aren't met. -type Int64RangeMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Int64RangeMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Int64RangeMatcherMultiError) AllErrors() []error { return m } - -// Int64RangeMatcherValidationError is the validation error returned by -// Int64RangeMatcher.Validate if the designated constraints aren't met. -type Int64RangeMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Int64RangeMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Int64RangeMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Int64RangeMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Int64RangeMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Int64RangeMatcherValidationError) ErrorName() string { - return "Int64RangeMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e Int64RangeMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInt64RangeMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Int64RangeMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Int64RangeMatcherValidationError{} - -// Validate checks the field values on Int32RangeMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *Int32RangeMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Int32RangeMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Int32RangeMatcherMultiError, or nil if none found. -func (m *Int32RangeMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *Int32RangeMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetRangeMatchers() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Int32RangeMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Int32RangeMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Int32RangeMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return Int32RangeMatcherMultiError(errors) - } - - return nil -} - -// Int32RangeMatcherMultiError is an error wrapping multiple validation errors -// returned by Int32RangeMatcher.ValidateAll() if the designated constraints -// aren't met. -type Int32RangeMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Int32RangeMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Int32RangeMatcherMultiError) AllErrors() []error { return m } - -// Int32RangeMatcherValidationError is the validation error returned by -// Int32RangeMatcher.Validate if the designated constraints aren't met. -type Int32RangeMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Int32RangeMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Int32RangeMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Int32RangeMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Int32RangeMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Int32RangeMatcherValidationError) ErrorName() string { - return "Int32RangeMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e Int32RangeMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInt32RangeMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Int32RangeMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Int32RangeMatcherValidationError{} - -// Validate checks the field values on DoubleRangeMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DoubleRangeMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DoubleRangeMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DoubleRangeMatcherMultiError, or nil if none found. -func (m *DoubleRangeMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *DoubleRangeMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetRangeMatchers() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DoubleRangeMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DoubleRangeMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DoubleRangeMatcherValidationError{ - field: fmt.Sprintf("RangeMatchers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return DoubleRangeMatcherMultiError(errors) - } - - return nil -} - -// DoubleRangeMatcherMultiError is an error wrapping multiple validation errors -// returned by DoubleRangeMatcher.ValidateAll() if the designated constraints -// aren't met. -type DoubleRangeMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DoubleRangeMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DoubleRangeMatcherMultiError) AllErrors() []error { return m } - -// DoubleRangeMatcherValidationError is the validation error returned by -// DoubleRangeMatcher.Validate if the designated constraints aren't met. -type DoubleRangeMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DoubleRangeMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DoubleRangeMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DoubleRangeMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DoubleRangeMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DoubleRangeMatcherValidationError) ErrorName() string { - return "DoubleRangeMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e DoubleRangeMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDoubleRangeMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DoubleRangeMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DoubleRangeMatcherValidationError{} - -// Validate checks the field values on Int64RangeMatcher_RangeMatcher with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Int64RangeMatcher_RangeMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Int64RangeMatcher_RangeMatcher with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// Int64RangeMatcher_RangeMatcherMultiError, or nil if none found. -func (m *Int64RangeMatcher_RangeMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *Int64RangeMatcher_RangeMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetRanges()) < 1 { - err := Int64RangeMatcher_RangeMatcherValidationError{ - field: "Ranges", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRanges() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Int64RangeMatcher_RangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Int64RangeMatcher_RangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Int64RangeMatcher_RangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetOnMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Int64RangeMatcher_RangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Int64RangeMatcher_RangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Int64RangeMatcher_RangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return Int64RangeMatcher_RangeMatcherMultiError(errors) - } - - return nil -} - -// Int64RangeMatcher_RangeMatcherMultiError is an error wrapping multiple -// validation errors returned by Int64RangeMatcher_RangeMatcher.ValidateAll() -// if the designated constraints aren't met. -type Int64RangeMatcher_RangeMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Int64RangeMatcher_RangeMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Int64RangeMatcher_RangeMatcherMultiError) AllErrors() []error { return m } - -// Int64RangeMatcher_RangeMatcherValidationError is the validation error -// returned by Int64RangeMatcher_RangeMatcher.Validate if the designated -// constraints aren't met. -type Int64RangeMatcher_RangeMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Int64RangeMatcher_RangeMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Int64RangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Int64RangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Int64RangeMatcher_RangeMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Int64RangeMatcher_RangeMatcherValidationError) ErrorName() string { - return "Int64RangeMatcher_RangeMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e Int64RangeMatcher_RangeMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInt64RangeMatcher_RangeMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Int64RangeMatcher_RangeMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Int64RangeMatcher_RangeMatcherValidationError{} - -// Validate checks the field values on Int32RangeMatcher_RangeMatcher with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Int32RangeMatcher_RangeMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Int32RangeMatcher_RangeMatcher with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// Int32RangeMatcher_RangeMatcherMultiError, or nil if none found. -func (m *Int32RangeMatcher_RangeMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *Int32RangeMatcher_RangeMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetRanges()) < 1 { - err := Int32RangeMatcher_RangeMatcherValidationError{ - field: "Ranges", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRanges() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Int32RangeMatcher_RangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Int32RangeMatcher_RangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Int32RangeMatcher_RangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetOnMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Int32RangeMatcher_RangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Int32RangeMatcher_RangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Int32RangeMatcher_RangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return Int32RangeMatcher_RangeMatcherMultiError(errors) - } - - return nil -} - -// Int32RangeMatcher_RangeMatcherMultiError is an error wrapping multiple -// validation errors returned by Int32RangeMatcher_RangeMatcher.ValidateAll() -// if the designated constraints aren't met. -type Int32RangeMatcher_RangeMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Int32RangeMatcher_RangeMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Int32RangeMatcher_RangeMatcherMultiError) AllErrors() []error { return m } - -// Int32RangeMatcher_RangeMatcherValidationError is the validation error -// returned by Int32RangeMatcher_RangeMatcher.Validate if the designated -// constraints aren't met. -type Int32RangeMatcher_RangeMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Int32RangeMatcher_RangeMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Int32RangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Int32RangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Int32RangeMatcher_RangeMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Int32RangeMatcher_RangeMatcherValidationError) ErrorName() string { - return "Int32RangeMatcher_RangeMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e Int32RangeMatcher_RangeMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInt32RangeMatcher_RangeMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Int32RangeMatcher_RangeMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Int32RangeMatcher_RangeMatcherValidationError{} - -// Validate checks the field values on DoubleRangeMatcher_RangeMatcher with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DoubleRangeMatcher_RangeMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DoubleRangeMatcher_RangeMatcher with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// DoubleRangeMatcher_RangeMatcherMultiError, or nil if none found. -func (m *DoubleRangeMatcher_RangeMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *DoubleRangeMatcher_RangeMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetRanges()) < 1 { - err := DoubleRangeMatcher_RangeMatcherValidationError{ - field: "Ranges", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRanges() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DoubleRangeMatcher_RangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DoubleRangeMatcher_RangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DoubleRangeMatcher_RangeMatcherValidationError{ - field: fmt.Sprintf("Ranges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetOnMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DoubleRangeMatcher_RangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DoubleRangeMatcher_RangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DoubleRangeMatcher_RangeMatcherValidationError{ - field: "OnMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DoubleRangeMatcher_RangeMatcherMultiError(errors) - } - - return nil -} - -// DoubleRangeMatcher_RangeMatcherMultiError is an error wrapping multiple -// validation errors returned by DoubleRangeMatcher_RangeMatcher.ValidateAll() -// if the designated constraints aren't met. -type DoubleRangeMatcher_RangeMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DoubleRangeMatcher_RangeMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DoubleRangeMatcher_RangeMatcherMultiError) AllErrors() []error { return m } - -// DoubleRangeMatcher_RangeMatcherValidationError is the validation error -// returned by DoubleRangeMatcher_RangeMatcher.Validate if the designated -// constraints aren't met. -type DoubleRangeMatcher_RangeMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DoubleRangeMatcher_RangeMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DoubleRangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DoubleRangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DoubleRangeMatcher_RangeMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DoubleRangeMatcher_RangeMatcherValidationError) ErrorName() string { - return "DoubleRangeMatcher_RangeMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e DoubleRangeMatcher_RangeMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDoubleRangeMatcher_RangeMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DoubleRangeMatcher_RangeMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DoubleRangeMatcher_RangeMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.go deleted file mode 100644 index 28d3c8064ff..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.go +++ /dev/null @@ -1,242 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/type/matcher/v3/regex.proto - -package v3 - -import ( - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type RegexMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to EngineType: - // - // *RegexMatcher_GoogleRe2 - EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` - Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` -} - -func (x *RegexMatcher) Reset() { - *x = RegexMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegexMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegexMatcher) ProtoMessage() {} - -func (x *RegexMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegexMatcher.ProtoReflect.Descriptor instead. -func (*RegexMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0} -} - -func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType { - if m != nil { - return m.EngineType - } - return nil -} - -func (x *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2 { - if x, ok := x.GetEngineType().(*RegexMatcher_GoogleRe2); ok { - return x.GoogleRe2 - } - return nil -} - -func (x *RegexMatcher) GetRegex() string { - if x != nil { - return x.Regex - } - return "" -} - -type isRegexMatcher_EngineType interface { - isRegexMatcher_EngineType() -} - -type RegexMatcher_GoogleRe2 struct { - GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"` -} - -func (*RegexMatcher_GoogleRe2) isRegexMatcher_EngineType() {} - -type RegexMatcher_GoogleRE2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RegexMatcher_GoogleRE2) Reset() { - *x = RegexMatcher_GoogleRE2{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegexMatcher_GoogleRE2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegexMatcher_GoogleRE2) ProtoMessage() {} - -func (x *RegexMatcher_GoogleRE2) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegexMatcher_GoogleRE2.ProtoReflect.Descriptor instead. -func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0, 0} -} - -var File_xds_type_matcher_v3_regex_proto protoreflect.FileDescriptor - -var file_xds_type_matcher_v3_regex_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xa6, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x12, 0x56, 0x0a, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x32, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, - 0x32, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x32, 0x12, 0x1d, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x1a, 0x0b, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x52, 0x45, 0x32, 0x42, 0x12, 0x0a, 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x5a, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x65, 0x67, 0x65, - 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, - 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_type_matcher_v3_regex_proto_rawDescOnce sync.Once - file_xds_type_matcher_v3_regex_proto_rawDescData = file_xds_type_matcher_v3_regex_proto_rawDesc -) - -func file_xds_type_matcher_v3_regex_proto_rawDescGZIP() []byte { - file_xds_type_matcher_v3_regex_proto_rawDescOnce.Do(func() { - file_xds_type_matcher_v3_regex_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_regex_proto_rawDescData) - }) - return file_xds_type_matcher_v3_regex_proto_rawDescData -} - -var file_xds_type_matcher_v3_regex_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_xds_type_matcher_v3_regex_proto_goTypes = []interface{}{ - (*RegexMatcher)(nil), // 0: xds.type.matcher.v3.RegexMatcher - (*RegexMatcher_GoogleRE2)(nil), // 1: xds.type.matcher.v3.RegexMatcher.GoogleRE2 -} -var file_xds_type_matcher_v3_regex_proto_depIdxs = []int32{ - 1, // 0: xds.type.matcher.v3.RegexMatcher.google_re2:type_name -> xds.type.matcher.v3.RegexMatcher.GoogleRE2 - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_xds_type_matcher_v3_regex_proto_init() } -func file_xds_type_matcher_v3_regex_proto_init() { - if File_xds_type_matcher_v3_regex_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_type_matcher_v3_regex_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegexMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_regex_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegexMatcher_GoogleRE2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_xds_type_matcher_v3_regex_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*RegexMatcher_GoogleRe2)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_type_matcher_v3_regex_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_type_matcher_v3_regex_proto_goTypes, - DependencyIndexes: file_xds_type_matcher_v3_regex_proto_depIdxs, - MessageInfos: file_xds_type_matcher_v3_regex_proto_msgTypes, - }.Build() - File_xds_type_matcher_v3_regex_proto = out.File - file_xds_type_matcher_v3_regex_proto_rawDesc = nil - file_xds_type_matcher_v3_regex_proto_goTypes = nil - file_xds_type_matcher_v3_regex_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.validate.go deleted file mode 100644 index 8b7682964b9..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.validate.go +++ /dev/null @@ -1,317 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/type/matcher/v3/regex.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on RegexMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RegexMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RegexMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RegexMatcherMultiError, or -// nil if none found. -func (m *RegexMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *RegexMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetRegex()) < 1 { - err := RegexMatcherValidationError{ - field: "Regex", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - oneofEngineTypePresent := false - switch v := m.EngineType.(type) { - case *RegexMatcher_GoogleRe2: - if v == nil { - err := RegexMatcherValidationError{ - field: "EngineType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofEngineTypePresent = true - - if m.GetGoogleRe2() == nil { - err := RegexMatcherValidationError{ - field: "GoogleRe2", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetGoogleRe2()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RegexMatcherValidationError{ - field: "GoogleRe2", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RegexMatcherValidationError{ - field: "GoogleRe2", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGoogleRe2()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RegexMatcherValidationError{ - field: "GoogleRe2", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofEngineTypePresent { - err := RegexMatcherValidationError{ - field: "EngineType", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RegexMatcherMultiError(errors) - } - - return nil -} - -// RegexMatcherMultiError is an error wrapping multiple validation errors -// returned by RegexMatcher.ValidateAll() if the designated constraints aren't met. -type RegexMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RegexMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RegexMatcherMultiError) AllErrors() []error { return m } - -// RegexMatcherValidationError is the validation error returned by -// RegexMatcher.Validate if the designated constraints aren't met. -type RegexMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RegexMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RegexMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RegexMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RegexMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RegexMatcherValidationError) ErrorName() string { return "RegexMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e RegexMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRegexMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RegexMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RegexMatcherValidationError{} - -// Validate checks the field values on RegexMatcher_GoogleRE2 with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RegexMatcher_GoogleRE2) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RegexMatcher_GoogleRE2 with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RegexMatcher_GoogleRE2MultiError, or nil if none found. -func (m *RegexMatcher_GoogleRE2) ValidateAll() error { - return m.validate(true) -} - -func (m *RegexMatcher_GoogleRE2) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RegexMatcher_GoogleRE2MultiError(errors) - } - - return nil -} - -// RegexMatcher_GoogleRE2MultiError is an error wrapping multiple validation -// errors returned by RegexMatcher_GoogleRE2.ValidateAll() if the designated -// constraints aren't met. -type RegexMatcher_GoogleRE2MultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RegexMatcher_GoogleRE2MultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RegexMatcher_GoogleRE2MultiError) AllErrors() []error { return m } - -// RegexMatcher_GoogleRE2ValidationError is the validation error returned by -// RegexMatcher_GoogleRE2.Validate if the designated constraints aren't met. -type RegexMatcher_GoogleRE2ValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RegexMatcher_GoogleRE2ValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RegexMatcher_GoogleRE2ValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RegexMatcher_GoogleRE2ValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RegexMatcher_GoogleRE2ValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RegexMatcher_GoogleRE2ValidationError) ErrorName() string { - return "RegexMatcher_GoogleRE2ValidationError" -} - -// Error satisfies the builtin error interface -func (e RegexMatcher_GoogleRE2ValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRegexMatcher_GoogleRE2.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RegexMatcher_GoogleRE2ValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RegexMatcher_GoogleRE2ValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.go deleted file mode 100644 index 7e1946cb16d..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.go +++ /dev/null @@ -1,353 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/type/matcher/v3/string.proto - -package v3 - -import ( - v3 "github.com/cncf/xds/go/xds/core/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type StringMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MatchPattern: - // - // *StringMatcher_Exact - // *StringMatcher_Prefix - // *StringMatcher_Suffix - // *StringMatcher_SafeRegex - // *StringMatcher_Contains - // *StringMatcher_Custom - MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"` - IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"` -} - -func (x *StringMatcher) Reset() { - *x = StringMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_string_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StringMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StringMatcher) ProtoMessage() {} - -func (x *StringMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_string_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StringMatcher.ProtoReflect.Descriptor instead. -func (*StringMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_string_proto_rawDescGZIP(), []int{0} -} - -func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern { - if m != nil { - return m.MatchPattern - } - return nil -} - -func (x *StringMatcher) GetExact() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Exact); ok { - return x.Exact - } - return "" -} - -func (x *StringMatcher) GetPrefix() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Prefix); ok { - return x.Prefix - } - return "" -} - -func (x *StringMatcher) GetSuffix() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Suffix); ok { - return x.Suffix - } - return "" -} - -func (x *StringMatcher) GetSafeRegex() *RegexMatcher { - if x, ok := x.GetMatchPattern().(*StringMatcher_SafeRegex); ok { - return x.SafeRegex - } - return nil -} - -func (x *StringMatcher) GetContains() string { - if x, ok := x.GetMatchPattern().(*StringMatcher_Contains); ok { - return x.Contains - } - return "" -} - -func (x *StringMatcher) GetCustom() *v3.TypedExtensionConfig { - if x, ok := x.GetMatchPattern().(*StringMatcher_Custom); ok { - return x.Custom - } - return nil -} - -func (x *StringMatcher) GetIgnoreCase() bool { - if x != nil { - return x.IgnoreCase - } - return false -} - -type isStringMatcher_MatchPattern interface { - isStringMatcher_MatchPattern() -} - -type StringMatcher_Exact struct { - Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"` -} - -type StringMatcher_Prefix struct { - Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"` -} - -type StringMatcher_Suffix struct { - Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3,oneof"` -} - -type StringMatcher_SafeRegex struct { - SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"` -} - -type StringMatcher_Contains struct { - Contains string `protobuf:"bytes,7,opt,name=contains,proto3,oneof"` -} - -type StringMatcher_Custom struct { - Custom *v3.TypedExtensionConfig `protobuf:"bytes,8,opt,name=custom,proto3,oneof"` -} - -func (*StringMatcher_Exact) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_Prefix) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_Suffix) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_SafeRegex) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_Contains) isStringMatcher_MatchPattern() {} - -func (*StringMatcher_Custom) isStringMatcher_MatchPattern() {} - -type ListStringMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"` -} - -func (x *ListStringMatcher) Reset() { - *x = ListStringMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_matcher_v3_string_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListStringMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListStringMatcher) ProtoMessage() {} - -func (x *ListStringMatcher) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_matcher_v3_string_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListStringMatcher.ProtoReflect.Descriptor instead. -func (*ListStringMatcher) Descriptor() ([]byte, []int) { - return file_xds_type_matcher_v3_string_proto_rawDescGZIP(), []int{1} -} - -func (x *ListStringMatcher) GetPatterns() []*StringMatcher { - if x != nil { - return x.Patterns - } - return nil -} - -var File_xds_type_matcher_v3_string_proto protoreflect.FileDescriptor - -var file_xds_type_matcher_v3_string_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, - 0x02, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x06, 0x73, - 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x4c, - 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, - 0x00, 0x52, 0x09, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x08, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61, 0x73, - 0x65, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x5d, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x08, - 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x42, 0x5b, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, - 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_type_matcher_v3_string_proto_rawDescOnce sync.Once - file_xds_type_matcher_v3_string_proto_rawDescData = file_xds_type_matcher_v3_string_proto_rawDesc -) - -func file_xds_type_matcher_v3_string_proto_rawDescGZIP() []byte { - file_xds_type_matcher_v3_string_proto_rawDescOnce.Do(func() { - file_xds_type_matcher_v3_string_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_string_proto_rawDescData) - }) - return file_xds_type_matcher_v3_string_proto_rawDescData -} - -var file_xds_type_matcher_v3_string_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_xds_type_matcher_v3_string_proto_goTypes = []interface{}{ - (*StringMatcher)(nil), // 0: xds.type.matcher.v3.StringMatcher - (*ListStringMatcher)(nil), // 1: xds.type.matcher.v3.ListStringMatcher - (*RegexMatcher)(nil), // 2: xds.type.matcher.v3.RegexMatcher - (*v3.TypedExtensionConfig)(nil), // 3: xds.core.v3.TypedExtensionConfig -} -var file_xds_type_matcher_v3_string_proto_depIdxs = []int32{ - 2, // 0: xds.type.matcher.v3.StringMatcher.safe_regex:type_name -> xds.type.matcher.v3.RegexMatcher - 3, // 1: xds.type.matcher.v3.StringMatcher.custom:type_name -> xds.core.v3.TypedExtensionConfig - 0, // 2: xds.type.matcher.v3.ListStringMatcher.patterns:type_name -> xds.type.matcher.v3.StringMatcher - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_xds_type_matcher_v3_string_proto_init() } -func file_xds_type_matcher_v3_string_proto_init() { - if File_xds_type_matcher_v3_string_proto != nil { - return - } - file_xds_type_matcher_v3_regex_proto_init() - if !protoimpl.UnsafeEnabled { - file_xds_type_matcher_v3_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StringMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_matcher_v3_string_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListStringMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_xds_type_matcher_v3_string_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*StringMatcher_Exact)(nil), - (*StringMatcher_Prefix)(nil), - (*StringMatcher_Suffix)(nil), - (*StringMatcher_SafeRegex)(nil), - (*StringMatcher_Contains)(nil), - (*StringMatcher_Custom)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_type_matcher_v3_string_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_type_matcher_v3_string_proto_goTypes, - DependencyIndexes: file_xds_type_matcher_v3_string_proto_depIdxs, - MessageInfos: file_xds_type_matcher_v3_string_proto_msgTypes, - }.Build() - File_xds_type_matcher_v3_string_proto = out.File - file_xds_type_matcher_v3_string_proto_rawDesc = nil - file_xds_type_matcher_v3_string_proto_goTypes = nil - file_xds_type_matcher_v3_string_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.validate.go deleted file mode 100644 index 339d3b631b8..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.validate.go +++ /dev/null @@ -1,481 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/type/matcher/v3/string.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on StringMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *StringMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on StringMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in StringMatcherMultiError, or -// nil if none found. -func (m *StringMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *StringMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for IgnoreCase - - oneofMatchPatternPresent := false - switch v := m.MatchPattern.(type) { - case *StringMatcher_Exact: - if v == nil { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - // no validation rules for Exact - case *StringMatcher_Prefix: - if v == nil { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if utf8.RuneCountInString(m.GetPrefix()) < 1 { - err := StringMatcherValidationError{ - field: "Prefix", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *StringMatcher_Suffix: - if v == nil { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if utf8.RuneCountInString(m.GetSuffix()) < 1 { - err := StringMatcherValidationError{ - field: "Suffix", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *StringMatcher_SafeRegex: - if v == nil { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if m.GetSafeRegex() == nil { - err := StringMatcherValidationError{ - field: "SafeRegex", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSafeRegex()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, StringMatcherValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, StringMatcherValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StringMatcherValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *StringMatcher_Contains: - if v == nil { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if utf8.RuneCountInString(m.GetContains()) < 1 { - err := StringMatcherValidationError{ - field: "Contains", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *StringMatcher_Custom: - if v == nil { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofMatchPatternPresent = true - - if all { - switch v := interface{}(m.GetCustom()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, StringMatcherValidationError{ - field: "Custom", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, StringMatcherValidationError{ - field: "Custom", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCustom()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StringMatcherValidationError{ - field: "Custom", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofMatchPatternPresent { - err := StringMatcherValidationError{ - field: "MatchPattern", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return StringMatcherMultiError(errors) - } - - return nil -} - -// StringMatcherMultiError is an error wrapping multiple validation errors -// returned by StringMatcher.ValidateAll() if the designated constraints -// aren't met. -type StringMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m StringMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m StringMatcherMultiError) AllErrors() []error { return m } - -// StringMatcherValidationError is the validation error returned by -// StringMatcher.Validate if the designated constraints aren't met. -type StringMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StringMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StringMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StringMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StringMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StringMatcherValidationError) ErrorName() string { return "StringMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e StringMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStringMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StringMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StringMatcherValidationError{} - -// Validate checks the field values on ListStringMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ListStringMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListStringMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListStringMatcherMultiError, or nil if none found. -func (m *ListStringMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *ListStringMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetPatterns()) < 1 { - err := ListStringMatcherValidationError{ - field: "Patterns", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetPatterns() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListStringMatcherValidationError{ - field: fmt.Sprintf("Patterns[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListStringMatcherValidationError{ - field: fmt.Sprintf("Patterns[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListStringMatcherValidationError{ - field: fmt.Sprintf("Patterns[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ListStringMatcherMultiError(errors) - } - - return nil -} - -// ListStringMatcherMultiError is an error wrapping multiple validation errors -// returned by ListStringMatcher.ValidateAll() if the designated constraints -// aren't met. -type ListStringMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListStringMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListStringMatcherMultiError) AllErrors() []error { return m } - -// ListStringMatcherValidationError is the validation error returned by -// ListStringMatcher.Validate if the designated constraints aren't met. -type ListStringMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListStringMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListStringMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListStringMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListStringMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListStringMatcherValidationError) ErrorName() string { - return "ListStringMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e ListStringMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListStringMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListStringMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListStringMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go deleted file mode 100644 index ac963e832fd..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go +++ /dev/null @@ -1,330 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/type/v3/cel.proto - -package v3 - -import ( - expr "cel.dev/expr" - _ "github.com/cncf/xds/go/xds/annotations/v3" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CelExpression struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ExprSpecifier: - // - // *CelExpression_ParsedExpr - // *CelExpression_CheckedExpr - ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"` - CelExprParsed *expr.ParsedExpr `protobuf:"bytes,3,opt,name=cel_expr_parsed,json=celExprParsed,proto3" json:"cel_expr_parsed,omitempty"` - CelExprChecked *expr.CheckedExpr `protobuf:"bytes,4,opt,name=cel_expr_checked,json=celExprChecked,proto3" json:"cel_expr_checked,omitempty"` -} - -func (x *CelExpression) Reset() { - *x = CelExpression{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_v3_cel_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CelExpression) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CelExpression) ProtoMessage() {} - -func (x *CelExpression) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_v3_cel_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CelExpression.ProtoReflect.Descriptor instead. -func (*CelExpression) Descriptor() ([]byte, []int) { - return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{0} -} - -func (m *CelExpression) GetExprSpecifier() isCelExpression_ExprSpecifier { - if m != nil { - return m.ExprSpecifier - } - return nil -} - -// Deprecated: Marked as deprecated in xds/type/v3/cel.proto. -func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExpr { - if x, ok := x.GetExprSpecifier().(*CelExpression_ParsedExpr); ok { - return x.ParsedExpr - } - return nil -} - -// Deprecated: Marked as deprecated in xds/type/v3/cel.proto. -func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExpr { - if x, ok := x.GetExprSpecifier().(*CelExpression_CheckedExpr); ok { - return x.CheckedExpr - } - return nil -} - -func (x *CelExpression) GetCelExprParsed() *expr.ParsedExpr { - if x != nil { - return x.CelExprParsed - } - return nil -} - -func (x *CelExpression) GetCelExprChecked() *expr.CheckedExpr { - if x != nil { - return x.CelExprChecked - } - return nil -} - -type isCelExpression_ExprSpecifier interface { - isCelExpression_ExprSpecifier() -} - -type CelExpression_ParsedExpr struct { - // Deprecated: Marked as deprecated in xds/type/v3/cel.proto. - ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"` -} - -type CelExpression_CheckedExpr struct { - // Deprecated: Marked as deprecated in xds/type/v3/cel.proto. - CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"` -} - -func (*CelExpression_ParsedExpr) isCelExpression_ExprSpecifier() {} - -func (*CelExpression_CheckedExpr) isCelExpression_ExprSpecifier() {} - -type CelExtractString struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ExprExtract *CelExpression `protobuf:"bytes,1,opt,name=expr_extract,json=exprExtract,proto3" json:"expr_extract,omitempty"` - DefaultValue *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` -} - -func (x *CelExtractString) Reset() { - *x = CelExtractString{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_v3_cel_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CelExtractString) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CelExtractString) ProtoMessage() {} - -func (x *CelExtractString) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_v3_cel_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CelExtractString.ProtoReflect.Descriptor instead. -func (*CelExtractString) Descriptor() ([]byte, []int) { - return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{1} -} - -func (x *CelExtractString) GetExprExtract() *CelExpression { - if x != nil { - return x.ExprExtract - } - return nil -} - -func (x *CelExtractString) GetDefaultValue() *wrapperspb.StringValue { - if x != nil { - return x.DefaultValue - } - return nil -} - -var File_xds_type_v3_cel_proto protoreflect.FileDescriptor - -var file_xds_type_v3_cel_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65, - 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x65, 0x6c, - 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x02, 0x0a, - 0x0d, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, - 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, - 0x0a, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x4e, 0x0a, 0x0c, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, - 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x3c, 0x0a, 0x0f, 0x63, - 0x65, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, - 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0d, 0x63, 0x65, 0x6c, 0x45, - 0x78, 0x70, 0x72, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x10, 0x63, 0x65, 0x6c, - 0x5f, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0e, 0x63, 0x65, 0x6c, 0x45, - 0x78, 0x70, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x65, 0x78, - 0x70, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x9e, 0x01, 0x0a, - 0x10, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x12, 0x47, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, - 0x78, 0x70, 0x72, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0xd2, - 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, - 0x08, 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, - 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_type_v3_cel_proto_rawDescOnce sync.Once - file_xds_type_v3_cel_proto_rawDescData = file_xds_type_v3_cel_proto_rawDesc -) - -func file_xds_type_v3_cel_proto_rawDescGZIP() []byte { - file_xds_type_v3_cel_proto_rawDescOnce.Do(func() { - file_xds_type_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_cel_proto_rawDescData) - }) - return file_xds_type_v3_cel_proto_rawDescData -} - -var file_xds_type_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_xds_type_v3_cel_proto_goTypes = []interface{}{ - (*CelExpression)(nil), // 0: xds.type.v3.CelExpression - (*CelExtractString)(nil), // 1: xds.type.v3.CelExtractString - (*v1alpha1.ParsedExpr)(nil), // 2: google.api.expr.v1alpha1.ParsedExpr - (*v1alpha1.CheckedExpr)(nil), // 3: google.api.expr.v1alpha1.CheckedExpr - (*expr.ParsedExpr)(nil), // 4: cel.expr.ParsedExpr - (*expr.CheckedExpr)(nil), // 5: cel.expr.CheckedExpr - (*wrapperspb.StringValue)(nil), // 6: google.protobuf.StringValue -} -var file_xds_type_v3_cel_proto_depIdxs = []int32{ - 2, // 0: xds.type.v3.CelExpression.parsed_expr:type_name -> google.api.expr.v1alpha1.ParsedExpr - 3, // 1: xds.type.v3.CelExpression.checked_expr:type_name -> google.api.expr.v1alpha1.CheckedExpr - 4, // 2: xds.type.v3.CelExpression.cel_expr_parsed:type_name -> cel.expr.ParsedExpr - 5, // 3: xds.type.v3.CelExpression.cel_expr_checked:type_name -> cel.expr.CheckedExpr - 0, // 4: xds.type.v3.CelExtractString.expr_extract:type_name -> xds.type.v3.CelExpression - 6, // 5: xds.type.v3.CelExtractString.default_value:type_name -> google.protobuf.StringValue - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_xds_type_v3_cel_proto_init() } -func file_xds_type_v3_cel_proto_init() { - if File_xds_type_v3_cel_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_type_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CelExpression); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_v3_cel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CelExtractString); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_xds_type_v3_cel_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*CelExpression_ParsedExpr)(nil), - (*CelExpression_CheckedExpr)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_type_v3_cel_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_type_v3_cel_proto_goTypes, - DependencyIndexes: file_xds_type_v3_cel_proto_depIdxs, - MessageInfos: file_xds_type_v3_cel_proto_msgTypes, - }.Build() - File_xds_type_v3_cel_proto = out.File - file_xds_type_v3_cel_proto_rawDesc = nil - file_xds_type_v3_cel_proto_goTypes = nil - file_xds_type_v3_cel_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go deleted file mode 100644 index 0855edee9bb..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go +++ /dev/null @@ -1,450 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/type/v3/cel.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on CelExpression with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *CelExpression) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CelExpression with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in CelExpressionMultiError, or -// nil if none found. -func (m *CelExpression) ValidateAll() error { - return m.validate(true) -} - -func (m *CelExpression) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetCelExprParsed()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CelExpressionValidationError{ - field: "CelExprParsed", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CelExpressionValidationError{ - field: "CelExprParsed", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCelExprParsed()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CelExpressionValidationError{ - field: "CelExprParsed", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCelExprChecked()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CelExpressionValidationError{ - field: "CelExprChecked", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CelExpressionValidationError{ - field: "CelExprChecked", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCelExprChecked()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CelExpressionValidationError{ - field: "CelExprChecked", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch v := m.ExprSpecifier.(type) { - case *CelExpression_ParsedExpr: - if v == nil { - err := CelExpressionValidationError{ - field: "ExprSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetParsedExpr()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CelExpressionValidationError{ - field: "ParsedExpr", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CelExpressionValidationError{ - field: "ParsedExpr", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetParsedExpr()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CelExpressionValidationError{ - field: "ParsedExpr", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CelExpression_CheckedExpr: - if v == nil { - err := CelExpressionValidationError{ - field: "ExprSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetCheckedExpr()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CelExpressionValidationError{ - field: "CheckedExpr", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CelExpressionValidationError{ - field: "CheckedExpr", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCheckedExpr()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CelExpressionValidationError{ - field: "CheckedExpr", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return CelExpressionMultiError(errors) - } - - return nil -} - -// CelExpressionMultiError is an error wrapping multiple validation errors -// returned by CelExpression.ValidateAll() if the designated constraints -// aren't met. -type CelExpressionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CelExpressionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CelExpressionMultiError) AllErrors() []error { return m } - -// CelExpressionValidationError is the validation error returned by -// CelExpression.Validate if the designated constraints aren't met. -type CelExpressionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CelExpressionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CelExpressionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CelExpressionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CelExpressionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CelExpressionValidationError) ErrorName() string { return "CelExpressionValidationError" } - -// Error satisfies the builtin error interface -func (e CelExpressionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCelExpression.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CelExpressionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CelExpressionValidationError{} - -// Validate checks the field values on CelExtractString with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CelExtractString) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CelExtractString with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CelExtractStringMultiError, or nil if none found. -func (m *CelExtractString) ValidateAll() error { - return m.validate(true) -} - -func (m *CelExtractString) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetExprExtract() == nil { - err := CelExtractStringValidationError{ - field: "ExprExtract", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetExprExtract()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CelExtractStringValidationError{ - field: "ExprExtract", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CelExtractStringValidationError{ - field: "ExprExtract", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExprExtract()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CelExtractStringValidationError{ - field: "ExprExtract", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetDefaultValue()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CelExtractStringValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CelExtractStringValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CelExtractStringValidationError{ - field: "DefaultValue", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CelExtractStringMultiError(errors) - } - - return nil -} - -// CelExtractStringMultiError is an error wrapping multiple validation errors -// returned by CelExtractString.ValidateAll() if the designated constraints -// aren't met. -type CelExtractStringMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CelExtractStringMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CelExtractStringMultiError) AllErrors() []error { return m } - -// CelExtractStringValidationError is the validation error returned by -// CelExtractString.Validate if the designated constraints aren't met. -type CelExtractStringValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CelExtractStringValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CelExtractStringValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CelExtractStringValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CelExtractStringValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CelExtractStringValidationError) ErrorName() string { return "CelExtractStringValidationError" } - -// Error satisfies the builtin error interface -func (e CelExtractStringValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCelExtractString.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CelExtractStringValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CelExtractStringValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go deleted file mode 100644 index bebf344856b..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go +++ /dev/null @@ -1,298 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/type/v3/range.proto - -package v3 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Int64Range struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` - End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` -} - -func (x *Int64Range) Reset() { - *x = Int64Range{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_v3_range_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int64Range) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int64Range) ProtoMessage() {} - -func (x *Int64Range) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_v3_range_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int64Range.ProtoReflect.Descriptor instead. -func (*Int64Range) Descriptor() ([]byte, []int) { - return file_xds_type_v3_range_proto_rawDescGZIP(), []int{0} -} - -func (x *Int64Range) GetStart() int64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *Int64Range) GetEnd() int64 { - if x != nil { - return x.End - } - return 0 -} - -type Int32Range struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` - End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` -} - -func (x *Int32Range) Reset() { - *x = Int32Range{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_v3_range_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int32Range) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int32Range) ProtoMessage() {} - -func (x *Int32Range) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_v3_range_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int32Range.ProtoReflect.Descriptor instead. -func (*Int32Range) Descriptor() ([]byte, []int) { - return file_xds_type_v3_range_proto_rawDescGZIP(), []int{1} -} - -func (x *Int32Range) GetStart() int32 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *Int32Range) GetEnd() int32 { - if x != nil { - return x.End - } - return 0 -} - -type DoubleRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"` - End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"` -} - -func (x *DoubleRange) Reset() { - *x = DoubleRange{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_v3_range_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoubleRange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoubleRange) ProtoMessage() {} - -func (x *DoubleRange) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_v3_range_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoubleRange.ProtoReflect.Descriptor instead. -func (*DoubleRange) Descriptor() ([]byte, []int) { - return file_xds_type_v3_range_proto_rawDescGZIP(), []int{2} -} - -func (x *DoubleRange) GetStart() float64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *DoubleRange) GetEnd() float64 { - if x != nil { - return x.End - } - return 0 -} - -var File_xds_type_v3_range_proto protoreflect.FileDescriptor - -var file_xds_type_v3_range_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x22, 0x34, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x34, 0x0a, 0x0a, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, - 0x6e, 0x64, 0x22, 0x35, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x4a, 0x0a, 0x16, 0x63, 0x6f, 0x6d, - 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, - 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_type_v3_range_proto_rawDescOnce sync.Once - file_xds_type_v3_range_proto_rawDescData = file_xds_type_v3_range_proto_rawDesc -) - -func file_xds_type_v3_range_proto_rawDescGZIP() []byte { - file_xds_type_v3_range_proto_rawDescOnce.Do(func() { - file_xds_type_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_range_proto_rawDescData) - }) - return file_xds_type_v3_range_proto_rawDescData -} - -var file_xds_type_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_xds_type_v3_range_proto_goTypes = []interface{}{ - (*Int64Range)(nil), // 0: xds.type.v3.Int64Range - (*Int32Range)(nil), // 1: xds.type.v3.Int32Range - (*DoubleRange)(nil), // 2: xds.type.v3.DoubleRange -} -var file_xds_type_v3_range_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_xds_type_v3_range_proto_init() } -func file_xds_type_v3_range_proto_init() { - if File_xds_type_v3_range_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_type_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int64Range); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int32Range); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_xds_type_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoubleRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_type_v3_range_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_type_v3_range_proto_goTypes, - DependencyIndexes: file_xds_type_v3_range_proto_depIdxs, - MessageInfos: file_xds_type_v3_range_proto_msgTypes, - }.Build() - File_xds_type_v3_range_proto = out.File - file_xds_type_v3_range_proto_rawDesc = nil - file_xds_type_v3_range_proto_goTypes = nil - file_xds_type_v3_range_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go deleted file mode 100644 index ccaf418e5df..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go +++ /dev/null @@ -1,345 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/type/v3/range.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Int64Range with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Int64Range) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Int64Range with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in Int64RangeMultiError, or -// nil if none found. -func (m *Int64Range) ValidateAll() error { - return m.validate(true) -} - -func (m *Int64Range) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Start - - // no validation rules for End - - if len(errors) > 0 { - return Int64RangeMultiError(errors) - } - - return nil -} - -// Int64RangeMultiError is an error wrapping multiple validation errors -// returned by Int64Range.ValidateAll() if the designated constraints aren't met. -type Int64RangeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Int64RangeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Int64RangeMultiError) AllErrors() []error { return m } - -// Int64RangeValidationError is the validation error returned by -// Int64Range.Validate if the designated constraints aren't met. -type Int64RangeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Int64RangeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Int64RangeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Int64RangeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Int64RangeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Int64RangeValidationError) ErrorName() string { return "Int64RangeValidationError" } - -// Error satisfies the builtin error interface -func (e Int64RangeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInt64Range.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Int64RangeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Int64RangeValidationError{} - -// Validate checks the field values on Int32Range with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Int32Range) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Int32Range with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in Int32RangeMultiError, or -// nil if none found. -func (m *Int32Range) ValidateAll() error { - return m.validate(true) -} - -func (m *Int32Range) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Start - - // no validation rules for End - - if len(errors) > 0 { - return Int32RangeMultiError(errors) - } - - return nil -} - -// Int32RangeMultiError is an error wrapping multiple validation errors -// returned by Int32Range.ValidateAll() if the designated constraints aren't met. -type Int32RangeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Int32RangeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Int32RangeMultiError) AllErrors() []error { return m } - -// Int32RangeValidationError is the validation error returned by -// Int32Range.Validate if the designated constraints aren't met. -type Int32RangeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Int32RangeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Int32RangeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Int32RangeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Int32RangeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Int32RangeValidationError) ErrorName() string { return "Int32RangeValidationError" } - -// Error satisfies the builtin error interface -func (e Int32RangeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInt32Range.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Int32RangeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Int32RangeValidationError{} - -// Validate checks the field values on DoubleRange with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DoubleRange) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DoubleRange with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DoubleRangeMultiError, or -// nil if none found. -func (m *DoubleRange) ValidateAll() error { - return m.validate(true) -} - -func (m *DoubleRange) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Start - - // no validation rules for End - - if len(errors) > 0 { - return DoubleRangeMultiError(errors) - } - - return nil -} - -// DoubleRangeMultiError is an error wrapping multiple validation errors -// returned by DoubleRange.ValidateAll() if the designated constraints aren't met. -type DoubleRangeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DoubleRangeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DoubleRangeMultiError) AllErrors() []error { return m } - -// DoubleRangeValidationError is the validation error returned by -// DoubleRange.Validate if the designated constraints aren't met. -type DoubleRangeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DoubleRangeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DoubleRangeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DoubleRangeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DoubleRangeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DoubleRangeValidationError) ErrorName() string { return "DoubleRangeValidationError" } - -// Error satisfies the builtin error interface -func (e DoubleRangeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDoubleRange.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DoubleRangeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DoubleRangeValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go deleted file mode 100644 index e02917a8793..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.32.0 -// protoc v3.21.5 -// source: xds/type/v3/typed_struct.proto - -package v3 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TypedStruct struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - Value *structpb.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *TypedStruct) Reset() { - *x = TypedStruct{} - if protoimpl.UnsafeEnabled { - mi := &file_xds_type_v3_typed_struct_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TypedStruct) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TypedStruct) ProtoMessage() {} - -func (x *TypedStruct) ProtoReflect() protoreflect.Message { - mi := &file_xds_type_v3_typed_struct_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TypedStruct.ProtoReflect.Descriptor instead. -func (*TypedStruct) Descriptor() ([]byte, []int) { - return file_xds_type_v3_typed_struct_proto_rawDescGZIP(), []int{0} -} - -func (x *TypedStruct) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *TypedStruct) GetValue() *structpb.Struct { - if x != nil { - return x.Value - } - return nil -} - -var File_xds_type_v3_typed_struct_proto protoreflect.FileDescriptor - -var file_xds_type_v3_typed_struct_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x54, - 0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, - 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, - 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, - 0x54, 0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_xds_type_v3_typed_struct_proto_rawDescOnce sync.Once - file_xds_type_v3_typed_struct_proto_rawDescData = file_xds_type_v3_typed_struct_proto_rawDesc -) - -func file_xds_type_v3_typed_struct_proto_rawDescGZIP() []byte { - file_xds_type_v3_typed_struct_proto_rawDescOnce.Do(func() { - file_xds_type_v3_typed_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_typed_struct_proto_rawDescData) - }) - return file_xds_type_v3_typed_struct_proto_rawDescData -} - -var file_xds_type_v3_typed_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_xds_type_v3_typed_struct_proto_goTypes = []interface{}{ - (*TypedStruct)(nil), // 0: xds.type.v3.TypedStruct - (*structpb.Struct)(nil), // 1: google.protobuf.Struct -} -var file_xds_type_v3_typed_struct_proto_depIdxs = []int32{ - 1, // 0: xds.type.v3.TypedStruct.value:type_name -> google.protobuf.Struct - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_xds_type_v3_typed_struct_proto_init() } -func file_xds_type_v3_typed_struct_proto_init() { - if File_xds_type_v3_typed_struct_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_xds_type_v3_typed_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TypedStruct); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_xds_type_v3_typed_struct_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_xds_type_v3_typed_struct_proto_goTypes, - DependencyIndexes: file_xds_type_v3_typed_struct_proto_depIdxs, - MessageInfos: file_xds_type_v3_typed_struct_proto_msgTypes, - }.Build() - File_xds_type_v3_typed_struct_proto = out.File - file_xds_type_v3_typed_struct_proto_rawDesc = nil - file_xds_type_v3_typed_struct_proto_goTypes = nil - file_xds_type_v3_typed_struct_proto_depIdxs = nil -} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go deleted file mode 100644 index f39bce90661..00000000000 --- a/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: xds/type/v3/typed_struct.proto - -package v3 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on TypedStruct with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *TypedStruct) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TypedStruct with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in TypedStructMultiError, or -// nil if none found. -func (m *TypedStruct) ValidateAll() error { - return m.validate(true) -} - -func (m *TypedStruct) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for TypeUrl - - if all { - switch v := interface{}(m.GetValue()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TypedStructValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TypedStructValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TypedStructValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return TypedStructMultiError(errors) - } - - return nil -} - -// TypedStructMultiError is an error wrapping multiple validation errors -// returned by TypedStruct.ValidateAll() if the designated constraints aren't met. -type TypedStructMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TypedStructMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TypedStructMultiError) AllErrors() []error { return m } - -// TypedStructValidationError is the validation error returned by -// TypedStruct.Validate if the designated constraints aren't met. -type TypedStructValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TypedStructValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TypedStructValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TypedStructValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TypedStructValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TypedStructValidationError) ErrorName() string { return "TypedStructValidationError" } - -// Error satisfies the builtin error interface -func (e TypedStructValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTypedStruct.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TypedStructValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TypedStructValidationError{} diff --git a/vendor/github.com/coreos/go-semver/LICENSE b/vendor/github.com/coreos/go-semver/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/vendor/github.com/coreos/go-semver/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/github.com/coreos/go-semver/NOTICE b/vendor/github.com/coreos/go-semver/NOTICE deleted file mode 100644 index 23a0ada2fbb..00000000000 --- a/vendor/github.com/coreos/go-semver/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -CoreOS Project -Copyright 2018 CoreOS, Inc - -This product includes software developed at CoreOS, Inc. -(http://www.coreos.com/). diff --git a/vendor/github.com/coreos/go-semver/semver/semver.go b/vendor/github.com/coreos/go-semver/semver/semver.go deleted file mode 100644 index eb9fb7ff2d8..00000000000 --- a/vendor/github.com/coreos/go-semver/semver/semver.go +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright 2013-2015 CoreOS, 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. - -// Semantic Versions http://semver.org -package semver - -import ( - "bytes" - "errors" - "fmt" - "regexp" - "strconv" - "strings" -) - -type Version struct { - Major int64 - Minor int64 - Patch int64 - PreRelease PreRelease - Metadata string -} - -type PreRelease string - -func splitOff(input *string, delim string) (val string) { - parts := strings.SplitN(*input, delim, 2) - - if len(parts) == 2 { - *input = parts[0] - val = parts[1] - } - - return val -} - -func New(version string) *Version { - return Must(NewVersion(version)) -} - -func NewVersion(version string) (*Version, error) { - v := Version{} - - if err := v.Set(version); err != nil { - return nil, err - } - - return &v, nil -} - -// Must is a helper for wrapping NewVersion and will panic if err is not nil. -func Must(v *Version, err error) *Version { - if err != nil { - panic(err) - } - return v -} - -// Set parses and updates v from the given version string. Implements flag.Value -func (v *Version) Set(version string) error { - metadata := splitOff(&version, "+") - preRelease := PreRelease(splitOff(&version, "-")) - dotParts := strings.SplitN(version, ".", 3) - - if len(dotParts) != 3 { - return fmt.Errorf("%s is not in dotted-tri format", version) - } - - if err := validateIdentifier(string(preRelease)); err != nil { - return fmt.Errorf("failed to validate pre-release: %v", err) - } - - if err := validateIdentifier(metadata); err != nil { - return fmt.Errorf("failed to validate metadata: %v", err) - } - - parsed := make([]int64, 3) - - for i, v := range dotParts[:3] { - val, err := strconv.ParseInt(v, 10, 64) - parsed[i] = val - if err != nil { - return err - } - } - - v.Metadata = metadata - v.PreRelease = preRelease - v.Major = parsed[0] - v.Minor = parsed[1] - v.Patch = parsed[2] - return nil -} - -func (v Version) String() string { - var buffer bytes.Buffer - - fmt.Fprintf(&buffer, "%d.%d.%d", v.Major, v.Minor, v.Patch) - - if v.PreRelease != "" { - fmt.Fprintf(&buffer, "-%s", v.PreRelease) - } - - if v.Metadata != "" { - fmt.Fprintf(&buffer, "+%s", v.Metadata) - } - - return buffer.String() -} - -func (v *Version) UnmarshalYAML(unmarshal func(interface{}) error) error { - var data string - if err := unmarshal(&data); err != nil { - return err - } - return v.Set(data) -} - -func (v Version) MarshalJSON() ([]byte, error) { - return []byte(`"` + v.String() + `"`), nil -} - -func (v *Version) UnmarshalJSON(data []byte) error { - l := len(data) - if l == 0 || string(data) == `""` { - return nil - } - if l < 2 || data[0] != '"' || data[l-1] != '"' { - return errors.New("invalid semver string") - } - return v.Set(string(data[1 : l-1])) -} - -// Compare tests if v is less than, equal to, or greater than versionB, -// returning -1, 0, or +1 respectively. -func (v Version) Compare(versionB Version) int { - if cmp := recursiveCompare(v.Slice(), versionB.Slice()); cmp != 0 { - return cmp - } - return preReleaseCompare(v, versionB) -} - -// Equal tests if v is equal to versionB. -func (v Version) Equal(versionB Version) bool { - return v.Compare(versionB) == 0 -} - -// LessThan tests if v is less than versionB. -func (v Version) LessThan(versionB Version) bool { - return v.Compare(versionB) < 0 -} - -// Slice converts the comparable parts of the semver into a slice of integers. -func (v Version) Slice() []int64 { - return []int64{v.Major, v.Minor, v.Patch} -} - -func (p PreRelease) Slice() []string { - preRelease := string(p) - return strings.Split(preRelease, ".") -} - -func preReleaseCompare(versionA Version, versionB Version) int { - a := versionA.PreRelease - b := versionB.PreRelease - - /* Handle the case where if two versions are otherwise equal it is the - * one without a PreRelease that is greater */ - if len(a) == 0 && (len(b) > 0) { - return 1 - } else if len(b) == 0 && (len(a) > 0) { - return -1 - } - - // If there is a prerelease, check and compare each part. - return recursivePreReleaseCompare(a.Slice(), b.Slice()) -} - -func recursiveCompare(versionA []int64, versionB []int64) int { - if len(versionA) == 0 { - return 0 - } - - a := versionA[0] - b := versionB[0] - - if a > b { - return 1 - } else if a < b { - return -1 - } - - return recursiveCompare(versionA[1:], versionB[1:]) -} - -func recursivePreReleaseCompare(versionA []string, versionB []string) int { - // A larger set of pre-release fields has a higher precedence than a smaller set, - // if all of the preceding identifiers are equal. - if len(versionA) == 0 { - if len(versionB) > 0 { - return -1 - } - return 0 - } else if len(versionB) == 0 { - // We're longer than versionB so return 1. - return 1 - } - - a := versionA[0] - b := versionB[0] - - aInt := false - bInt := false - - aI, err := strconv.Atoi(versionA[0]) - if err == nil { - aInt = true - } - - bI, err := strconv.Atoi(versionB[0]) - if err == nil { - bInt = true - } - - // Numeric identifiers always have lower precedence than non-numeric identifiers. - if aInt && !bInt { - return -1 - } else if !aInt && bInt { - return 1 - } - - // Handle Integer Comparison - if aInt && bInt { - if aI > bI { - return 1 - } else if aI < bI { - return -1 - } - } - - // Handle String Comparison - if a > b { - return 1 - } else if a < b { - return -1 - } - - return recursivePreReleaseCompare(versionA[1:], versionB[1:]) -} - -// BumpMajor increments the Major field by 1 and resets all other fields to their default values -func (v *Version) BumpMajor() { - v.Major += 1 - v.Minor = 0 - v.Patch = 0 - v.PreRelease = PreRelease("") - v.Metadata = "" -} - -// BumpMinor increments the Minor field by 1 and resets all other fields to their default values -func (v *Version) BumpMinor() { - v.Minor += 1 - v.Patch = 0 - v.PreRelease = PreRelease("") - v.Metadata = "" -} - -// BumpPatch increments the Patch field by 1 and resets all other fields to their default values -func (v *Version) BumpPatch() { - v.Patch += 1 - v.PreRelease = PreRelease("") - v.Metadata = "" -} - -// validateIdentifier makes sure the provided identifier satisfies semver spec -func validateIdentifier(id string) error { - if id != "" && !reIdentifier.MatchString(id) { - return fmt.Errorf("%s is not a valid semver identifier", id) - } - return nil -} - -// reIdentifier is a regular expression used to check that pre-release and metadata -// identifiers satisfy the spec requirements -var reIdentifier = regexp.MustCompile(`^[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*$`) diff --git a/vendor/github.com/coreos/go-semver/semver/sort.go b/vendor/github.com/coreos/go-semver/semver/sort.go deleted file mode 100644 index e256b41a5dd..00000000000 --- a/vendor/github.com/coreos/go-semver/semver/sort.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2013-2015 CoreOS, 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 semver - -import ( - "sort" -) - -type Versions []*Version - -func (s Versions) Len() int { - return len(s) -} - -func (s Versions) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s Versions) Less(i, j int) bool { - return s[i].LessThan(*s[j]) -} - -// Sort sorts the given slice of Version -func Sort(versions []*Version) { - sort.Sort(Versions(versions)) -} diff --git a/vendor/github.com/coreos/go-systemd/v22/journal/journal.go b/vendor/github.com/coreos/go-systemd/v22/journal/journal.go deleted file mode 100644 index ac24c7767d3..00000000000 --- a/vendor/github.com/coreos/go-systemd/v22/journal/journal.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2015 CoreOS, 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 journal provides write bindings to the local systemd journal. -// It is implemented in pure Go and connects to the journal directly over its -// unix socket. -// -// To read from the journal, see the "sdjournal" package, which wraps the -// sd-journal a C API. -// -// http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html -package journal - -import ( - "fmt" -) - -// Priority of a journal message -type Priority int - -const ( - PriEmerg Priority = iota - PriAlert - PriCrit - PriErr - PriWarning - PriNotice - PriInfo - PriDebug -) - -// Print prints a message to the local systemd journal using Send(). -func Print(priority Priority, format string, a ...interface{}) error { - return Send(fmt.Sprintf(format, a...), priority, nil) -} diff --git a/vendor/github.com/coreos/go-systemd/v22/journal/journal_unix.go b/vendor/github.com/coreos/go-systemd/v22/journal/journal_unix.go deleted file mode 100644 index c5b23a81968..00000000000 --- a/vendor/github.com/coreos/go-systemd/v22/journal/journal_unix.go +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2015 CoreOS, 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. - -//go:build !windows -// +build !windows - -// Package journal provides write bindings to the local systemd journal. -// It is implemented in pure Go and connects to the journal directly over its -// unix socket. -// -// To read from the journal, see the "sdjournal" package, which wraps the -// sd-journal a C API. -// -// http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html -package journal - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "io" - "io/ioutil" - "net" - "os" - "strconv" - "strings" - "sync" - "sync/atomic" - "syscall" - "unsafe" -) - -var ( - // This can be overridden at build-time: - // https://github.com/golang/go/wiki/GcToolchainTricks#including-build-information-in-the-executable - journalSocket = "/run/systemd/journal/socket" - - // unixConnPtr atomically holds the local unconnected Unix-domain socket. - // Concrete safe pointer type: *net.UnixConn - unixConnPtr unsafe.Pointer - // onceConn ensures that unixConnPtr is initialized exactly once. - onceConn sync.Once -) - -// Enabled checks whether the local systemd journal is available for logging. -func Enabled() bool { - if c := getOrInitConn(); c == nil { - return false - } - - conn, err := net.Dial("unixgram", journalSocket) - if err != nil { - return false - } - defer conn.Close() - - return true -} - -// StderrIsJournalStream returns whether the process stderr is connected -// to the Journal's stream transport. -// -// This can be used for automatic protocol upgrading described in [Journal Native Protocol]. -// -// Returns true if JOURNAL_STREAM environment variable is present, -// and stderr's device and inode numbers match it. -// -// Error is returned if unexpected error occurs: e.g. if JOURNAL_STREAM environment variable -// is present, but malformed, fstat syscall fails, etc. -// -// [Journal Native Protocol]: https://systemd.io/JOURNAL_NATIVE_PROTOCOL/#automatic-protocol-upgrading -func StderrIsJournalStream() (bool, error) { - return fdIsJournalStream(syscall.Stderr) -} - -// StdoutIsJournalStream returns whether the process stdout is connected -// to the Journal's stream transport. -// -// Returns true if JOURNAL_STREAM environment variable is present, -// and stdout's device and inode numbers match it. -// -// Error is returned if unexpected error occurs: e.g. if JOURNAL_STREAM environment variable -// is present, but malformed, fstat syscall fails, etc. -// -// Most users should probably use [StderrIsJournalStream]. -func StdoutIsJournalStream() (bool, error) { - return fdIsJournalStream(syscall.Stdout) -} - -func fdIsJournalStream(fd int) (bool, error) { - journalStream := os.Getenv("JOURNAL_STREAM") - if journalStream == "" { - return false, nil - } - - var expectedStat syscall.Stat_t - _, err := fmt.Sscanf(journalStream, "%d:%d", &expectedStat.Dev, &expectedStat.Ino) - if err != nil { - return false, fmt.Errorf("failed to parse JOURNAL_STREAM=%q: %v", journalStream, err) - } - - var stat syscall.Stat_t - err = syscall.Fstat(fd, &stat) - if err != nil { - return false, err - } - - match := stat.Dev == expectedStat.Dev && stat.Ino == expectedStat.Ino - return match, nil -} - -// Send a message to the local systemd journal. vars is a map of journald -// fields to values. Fields must be composed of uppercase letters, numbers, -// and underscores, but must not start with an underscore. Within these -// restrictions, any arbitrary field name may be used. Some names have special -// significance: see the journalctl documentation -// (http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html) -// for more details. vars may be nil. -func Send(message string, priority Priority, vars map[string]string) error { - conn := getOrInitConn() - if conn == nil { - return errors.New("could not initialize socket to journald") - } - - socketAddr := &net.UnixAddr{ - Name: journalSocket, - Net: "unixgram", - } - - data := new(bytes.Buffer) - appendVariable(data, "PRIORITY", strconv.Itoa(int(priority))) - appendVariable(data, "MESSAGE", message) - for k, v := range vars { - appendVariable(data, k, v) - } - - _, _, err := conn.WriteMsgUnix(data.Bytes(), nil, socketAddr) - if err == nil { - return nil - } - if !isSocketSpaceError(err) { - return err - } - - // Large log entry, send it via tempfile and ancillary-fd. - file, err := tempFd() - if err != nil { - return err - } - defer file.Close() - _, err = io.Copy(file, data) - if err != nil { - return err - } - rights := syscall.UnixRights(int(file.Fd())) - _, _, err = conn.WriteMsgUnix([]byte{}, rights, socketAddr) - if err != nil { - return err - } - - return nil -} - -// getOrInitConn attempts to get the global `unixConnPtr` socket, initializing if necessary -func getOrInitConn() *net.UnixConn { - conn := (*net.UnixConn)(atomic.LoadPointer(&unixConnPtr)) - if conn != nil { - return conn - } - onceConn.Do(initConn) - return (*net.UnixConn)(atomic.LoadPointer(&unixConnPtr)) -} - -func appendVariable(w io.Writer, name, value string) { - if err := validVarName(name); err != nil { - fmt.Fprintf(os.Stderr, "variable name %s contains invalid character, ignoring\n", name) - } - if strings.ContainsRune(value, '\n') { - /* When the value contains a newline, we write: - * - the variable name, followed by a newline - * - the size (in 64bit little endian format) - * - the data, followed by a newline - */ - fmt.Fprintln(w, name) - binary.Write(w, binary.LittleEndian, uint64(len(value))) - fmt.Fprintln(w, value) - } else { - /* just write the variable and value all on one line */ - fmt.Fprintf(w, "%s=%s\n", name, value) - } -} - -// validVarName validates a variable name to make sure journald will accept it. -// The variable name must be in uppercase and consist only of characters, -// numbers and underscores, and may not begin with an underscore: -// https://www.freedesktop.org/software/systemd/man/sd_journal_print.html -func validVarName(name string) error { - if name == "" { - return errors.New("Empty variable name") - } else if name[0] == '_' { - return errors.New("Variable name begins with an underscore") - } - - for _, c := range name { - if !(('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_') { - return errors.New("Variable name contains invalid characters") - } - } - return nil -} - -// isSocketSpaceError checks whether the error is signaling -// an "overlarge message" condition. -func isSocketSpaceError(err error) bool { - opErr, ok := err.(*net.OpError) - if !ok || opErr == nil { - return false - } - - sysErr, ok := opErr.Err.(*os.SyscallError) - if !ok || sysErr == nil { - return false - } - - return sysErr.Err == syscall.EMSGSIZE || sysErr.Err == syscall.ENOBUFS -} - -// tempFd creates a temporary, unlinked file under `/dev/shm`. -func tempFd() (*os.File, error) { - file, err := ioutil.TempFile("/dev/shm/", "journal.XXXXX") - if err != nil { - return nil, err - } - err = syscall.Unlink(file.Name()) - if err != nil { - return nil, err - } - return file, nil -} - -// initConn initializes the global `unixConnPtr` socket. -// It is automatically called when needed. -func initConn() { - autobind, err := net.ResolveUnixAddr("unixgram", "") - if err != nil { - return - } - - sock, err := net.ListenUnixgram("unixgram", autobind) - if err != nil { - return - } - - atomic.StorePointer(&unixConnPtr, unsafe.Pointer(sock)) -} diff --git a/vendor/github.com/coreos/go-systemd/v22/journal/journal_windows.go b/vendor/github.com/coreos/go-systemd/v22/journal/journal_windows.go deleted file mode 100644 index 322e41e74c3..00000000000 --- a/vendor/github.com/coreos/go-systemd/v22/journal/journal_windows.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2015 CoreOS, 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 journal provides write bindings to the local systemd journal. -// It is implemented in pure Go and connects to the journal directly over its -// unix socket. -// -// To read from the journal, see the "sdjournal" package, which wraps the -// sd-journal a C API. -// -// http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html -package journal - -import ( - "errors" -) - -func Enabled() bool { - return false -} - -func Send(message string, priority Priority, vars map[string]string) error { - return errors.New("could not initialize socket to journald") -} - -func StderrIsJournalStream() (bool, error) { - return false, nil -} - -func StdoutIsJournalStream() (bool, error) { - return false, nil -} diff --git a/vendor/github.com/emicklei/go-restful/v3/CHANGES.md b/vendor/github.com/emicklei/go-restful/v3/CHANGES.md index 5edd5a7ca9a..9e790390b62 100644 --- a/vendor/github.com/emicklei/go-restful/v3/CHANGES.md +++ b/vendor/github.com/emicklei/go-restful/v3/CHANGES.md @@ -1,5 +1,17 @@ # Change history of go-restful + +## [v3.12.0] - 2024-03-11 +- add Flush method #529 (#538) +- fix: Improper handling of empty POST requests (#543) + +## [v3.11.3] - 2024-01-09 +- better not have 2 tags on one commit + +## [v3.11.1, v3.11.2] - 2024-01-09 + +- fix by restoring custom JSON handler functions (Mike Beaumont #540) + ## [v3.11.0] - 2023-08-19 - restored behavior as <= v3.9.0 with option to change path strategy using TrimRightSlashEnabled. diff --git a/vendor/github.com/emicklei/go-restful/v3/README.md b/vendor/github.com/emicklei/go-restful/v3/README.md index 95a05a08944..7234604e47b 100644 --- a/vendor/github.com/emicklei/go-restful/v3/README.md +++ b/vendor/github.com/emicklei/go-restful/v3/README.md @@ -2,7 +2,6 @@ go-restful ========== package for building REST-style Web Services using Google Go -[![Build Status](https://travis-ci.org/emicklei/go-restful.png)](https://travis-ci.org/emicklei/go-restful) [![Go Report Card](https://goreportcard.com/badge/github.com/emicklei/go-restful)](https://goreportcard.com/report/github.com/emicklei/go-restful) [![GoDoc](https://godoc.org/github.com/emicklei/go-restful?status.svg)](https://pkg.go.dev/github.com/emicklei/go-restful) [![codecov](https://codecov.io/gh/emicklei/go-restful/branch/master/graph/badge.svg)](https://codecov.io/gh/emicklei/go-restful) diff --git a/vendor/github.com/emicklei/go-restful/v3/compress.go b/vendor/github.com/emicklei/go-restful/v3/compress.go index 1ff239f99fe..80adf55fdfe 100644 --- a/vendor/github.com/emicklei/go-restful/v3/compress.go +++ b/vendor/github.com/emicklei/go-restful/v3/compress.go @@ -49,6 +49,16 @@ func (c *CompressingResponseWriter) CloseNotify() <-chan bool { return c.writer.(http.CloseNotifier).CloseNotify() } +// Flush is part of http.Flusher interface. Noop if the underlying writer doesn't support it. +func (c *CompressingResponseWriter) Flush() { + flusher, ok := c.writer.(http.Flusher) + if !ok { + // writer doesn't support http.Flusher interface + return + } + flusher.Flush() +} + // Close the underlying compressor func (c *CompressingResponseWriter) Close() error { if c.isCompressorClosed() { diff --git a/vendor/github.com/emicklei/go-restful/v3/jsr311.go b/vendor/github.com/emicklei/go-restful/v3/jsr311.go index 07a0c91e942..a9b3faaa81f 100644 --- a/vendor/github.com/emicklei/go-restful/v3/jsr311.go +++ b/vendor/github.com/emicklei/go-restful/v3/jsr311.go @@ -155,7 +155,7 @@ func (r RouterJSR311) detectRoute(routes []Route, httpRequest *http.Request) (*R method, length := httpRequest.Method, httpRequest.Header.Get("Content-Length") if (method == http.MethodPost || method == http.MethodPut || - method == http.MethodPatch) && length == "" { + method == http.MethodPatch) && (length == "" || length == "0") { return nil, NewError( http.StatusUnsupportedMediaType, fmt.Sprintf("415: Unsupported Media Type\n\nAvailable representations: %s", strings.Join(available, ", ")), diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/LICENSE b/vendor/github.com/envoyproxy/protoc-gen-validate/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/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/github.com/envoyproxy/protoc-gen-validate/validate/BUILD b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD deleted file mode 100644 index a9d38c51b9f..00000000000 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD +++ /dev/null @@ -1,74 +0,0 @@ -load("@com_google_protobuf//:protobuf.bzl", "py_proto_library") -load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") -load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library") -load("@rules_java//java:defs.bzl", "java_proto_library") -load("@rules_proto//proto:defs.bzl", "proto_library") -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -package( - default_visibility = - ["//visibility:public"], -) - -proto_library( - name = "validate_proto", - srcs = ["validate.proto"], - deps = [ - "@com_google_protobuf//:descriptor_proto", - "@com_google_protobuf//:duration_proto", - "@com_google_protobuf//:timestamp_proto", - ], -) - -cc_proto_library( - name = "validate_cc", - deps = [":validate_proto"], -) - -py_proto_library( - name = "validate_py", - srcs = ["validate.proto"], - deps = ["@com_google_protobuf//:protobuf_python"], -) - -go_proto_library( - name = "validate_go_proto", - importpath = "github.com/envoyproxy/protoc-gen-validate/validate", - proto = ":validate_proto", -) - -cc_library( - name = "cc_validate", - hdrs = ["validate.h"], -) - -go_library( - name = "validate_go", - embed = [":validate_go_proto"], - importpath = "github.com/envoyproxy/protoc-gen-validate/validate", -) - -java_proto_library( - name = "validate_java", - deps = [":validate_proto"], -) - -filegroup( - name = "validate_src", - srcs = ["validate.proto"], -) - -alias( - name = "go_default_library", - actual = ":validate", - deprecation = "Use :validate instead of :go_default_library. Details about the new naming convention: https://github.com/bazelbuild/bazel-gazelle/pull/863", - visibility = ["//visibility:public"], -) - -# this alias allows build files generated with Gazelle in other repositories -# to find validate as an external dependency -alias( - name = "validate", - actual = ":validate_go", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h deleted file mode 100644 index d6cf6c9d903..00000000000 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h +++ /dev/null @@ -1,183 +0,0 @@ -#ifndef _VALIDATE_H -#define _VALIDATE_H - -#include -#include -#include -#include -#include -#include -#include - -#if !defined(_WIN32) -#include -#else -#include -#include - -// uses macros to #define a ton of symbols, -// many of which interfere with our code here and down -// the line in various extensions. -#undef DELETE -#undef ERROR -#undef GetMessage -#undef interface -#undef TRUE -#undef min - -#endif - -#include "google/protobuf/message.h" - -namespace pgv { -using std::string; - -class UnimplementedException : public std::runtime_error { -public: - UnimplementedException() : std::runtime_error("not yet implemented") {} - UnimplementedException(const std::string& message) : std::runtime_error(message) {} - // Thrown by C++ validation code that is not yet implemented. -}; - -using ValidationMsg = std::string; - -class BaseValidator { -public: - /** - * Validate/check a generic message object with a registered validator for the concrete message - * type. - * @param m supplies the message to check. - * @param err supplies the place to return error information. - * @return true if the validation passes OR there is no registered validator for the concrete - * message type. false is returned if validation explicitly fails. - */ - static bool AbstractCheckMessage(const google::protobuf::Message& m, ValidationMsg* err) { - // Polymorphic lookup is used to see if there is a matching concrete validator. If so, call it. - // Otherwise return success. - auto it = abstractValidators().find(std::type_index(typeid(m))); - if (it == abstractValidators().end()) { - return true; - } - return it->second(m, err); - } - -protected: - // Used to implement AbstractCheckMessage() above. Every message that is linked into the binary - // will register itself by type_index, allowing for polymorphic lookup later. - static std::unordered_map>& - abstractValidators() { - static auto* validator_map = new std::unordered_map< - std::type_index, std::function>(); - return *validator_map; - } -}; - -template class Validator : public BaseValidator { -public: - Validator(std::function check) : check_(check) { - abstractValidators()[std::type_index(typeid(T))] = [this](const google::protobuf::Message& m, - ValidationMsg* err) -> bool { - return check_(dynamic_cast(m), err); - }; - } - -private: - std::function check_; -}; - -static inline std::string String(const ValidationMsg& msg) { return std::string(msg); } - -static inline bool IsPrefix(const string& maybe_prefix, const string& search_in) { - return search_in.compare(0, maybe_prefix.size(), maybe_prefix) == 0; -} - -static inline bool IsSuffix(const string& maybe_suffix, const string& search_in) { - return maybe_suffix.size() <= search_in.size() && - search_in.compare(search_in.size() - maybe_suffix.size(), maybe_suffix.size(), - maybe_suffix) == 0; -} - -static inline bool Contains(const string& search_in, const string& to_find) { - return search_in.find(to_find) != string::npos; -} - -static inline bool NotContains(const string& search_in, const string& to_find) { - return !Contains(search_in, to_find); -} - -static inline bool IsIpv4(const string& to_validate) { - struct sockaddr_in sa; - return !(inet_pton(AF_INET, to_validate.c_str(), &sa.sin_addr) < 1); -} - -static inline bool IsIpv6(const string& to_validate) { - struct sockaddr_in6 sa_six; - return !(inet_pton(AF_INET6, to_validate.c_str(), &sa_six.sin6_addr) < 1); -} - -static inline bool IsIp(const string& to_validate) { - return IsIpv4(to_validate) || IsIpv6(to_validate); -} - -static inline bool IsHostname(const string& to_validate) { - if (to_validate.length() > 253) { - return false; - } - - const std::regex dot_regex{"\\."}; - const auto iter_end = std::sregex_token_iterator(); - auto iter = std::sregex_token_iterator(to_validate.begin(), to_validate.end(), dot_regex, -1); - for (; iter != iter_end; ++iter) { - const std::string& part = *iter; - if (part.empty() || part.length() > 63) { - return false; - } - if (part.at(0) == '-') { - return false; - } - if (part.at(part.length() - 1) == '-') { - return false; - } - for (const auto& character : part) { - if ((character < 'A' || character > 'Z') && (character < 'a' || character > 'z') && - (character < '0' || character > '9') && character != '-') { - return false; - } - } - } - - return true; -} - -namespace { - -inline int OneCharLen(const char* src) { - return "\1\1\1\1\1\1\1\1\1\1\1\1\2\2\3\4"[(*src & 0xFF) >> 4]; -} - -inline int UTF8FirstLetterNumBytes(const char *utf8_str, int str_len) { - if (str_len == 0) - return 0; - return OneCharLen(utf8_str); -} - -inline size_t Utf8Len(const string& narrow_string) { - const char* str_char = narrow_string.c_str(); - ptrdiff_t byte_len = narrow_string.length(); - size_t unicode_len = 0; - int char_len = 1; - while (byte_len > 0 && char_len > 0) { - char_len = UTF8FirstLetterNumBytes(str_char, byte_len); - str_char += char_len; - byte_len -= char_len; - ++unicode_len; - } - return unicode_len; -} - -} // namespace - -} // namespace pgv - -#endif // _VALIDATE_H diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go deleted file mode 100644 index a31b2e1a3f7..00000000000 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go +++ /dev/null @@ -1,4106 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc v4.22.2 -// source: validate/validate.proto - -package validate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// WellKnownRegex contain some well-known patterns. -type KnownRegex int32 - -const ( - KnownRegex_UNKNOWN KnownRegex = 0 - // HTTP header name as defined by RFC 7230. - KnownRegex_HTTP_HEADER_NAME KnownRegex = 1 - // HTTP header value as defined by RFC 7230. - KnownRegex_HTTP_HEADER_VALUE KnownRegex = 2 -) - -// Enum value maps for KnownRegex. -var ( - KnownRegex_name = map[int32]string{ - 0: "UNKNOWN", - 1: "HTTP_HEADER_NAME", - 2: "HTTP_HEADER_VALUE", - } - KnownRegex_value = map[string]int32{ - "UNKNOWN": 0, - "HTTP_HEADER_NAME": 1, - "HTTP_HEADER_VALUE": 2, - } -) - -func (x KnownRegex) Enum() *KnownRegex { - p := new(KnownRegex) - *p = x - return p -} - -func (x KnownRegex) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (KnownRegex) Descriptor() protoreflect.EnumDescriptor { - return file_validate_validate_proto_enumTypes[0].Descriptor() -} - -func (KnownRegex) Type() protoreflect.EnumType { - return &file_validate_validate_proto_enumTypes[0] -} - -func (x KnownRegex) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *KnownRegex) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = KnownRegex(num) - return nil -} - -// Deprecated: Use KnownRegex.Descriptor instead. -func (KnownRegex) EnumDescriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{0} -} - -// FieldRules encapsulates the rules for each type of field. Depending on the -// field, the correct set should be used to ensure proper validations. -type FieldRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message *MessageRules `protobuf:"bytes,17,opt,name=message" json:"message,omitempty"` - // Types that are assignable to Type: - // - // *FieldRules_Float - // *FieldRules_Double - // *FieldRules_Int32 - // *FieldRules_Int64 - // *FieldRules_Uint32 - // *FieldRules_Uint64 - // *FieldRules_Sint32 - // *FieldRules_Sint64 - // *FieldRules_Fixed32 - // *FieldRules_Fixed64 - // *FieldRules_Sfixed32 - // *FieldRules_Sfixed64 - // *FieldRules_Bool - // *FieldRules_String_ - // *FieldRules_Bytes - // *FieldRules_Enum - // *FieldRules_Repeated - // *FieldRules_Map - // *FieldRules_Any - // *FieldRules_Duration - // *FieldRules_Timestamp - Type isFieldRules_Type `protobuf_oneof:"type"` -} - -func (x *FieldRules) Reset() { - *x = FieldRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldRules) ProtoMessage() {} - -func (x *FieldRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldRules.ProtoReflect.Descriptor instead. -func (*FieldRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{0} -} - -func (x *FieldRules) GetMessage() *MessageRules { - if x != nil { - return x.Message - } - return nil -} - -func (m *FieldRules) GetType() isFieldRules_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *FieldRules) GetFloat() *FloatRules { - if x, ok := x.GetType().(*FieldRules_Float); ok { - return x.Float - } - return nil -} - -func (x *FieldRules) GetDouble() *DoubleRules { - if x, ok := x.GetType().(*FieldRules_Double); ok { - return x.Double - } - return nil -} - -func (x *FieldRules) GetInt32() *Int32Rules { - if x, ok := x.GetType().(*FieldRules_Int32); ok { - return x.Int32 - } - return nil -} - -func (x *FieldRules) GetInt64() *Int64Rules { - if x, ok := x.GetType().(*FieldRules_Int64); ok { - return x.Int64 - } - return nil -} - -func (x *FieldRules) GetUint32() *UInt32Rules { - if x, ok := x.GetType().(*FieldRules_Uint32); ok { - return x.Uint32 - } - return nil -} - -func (x *FieldRules) GetUint64() *UInt64Rules { - if x, ok := x.GetType().(*FieldRules_Uint64); ok { - return x.Uint64 - } - return nil -} - -func (x *FieldRules) GetSint32() *SInt32Rules { - if x, ok := x.GetType().(*FieldRules_Sint32); ok { - return x.Sint32 - } - return nil -} - -func (x *FieldRules) GetSint64() *SInt64Rules { - if x, ok := x.GetType().(*FieldRules_Sint64); ok { - return x.Sint64 - } - return nil -} - -func (x *FieldRules) GetFixed32() *Fixed32Rules { - if x, ok := x.GetType().(*FieldRules_Fixed32); ok { - return x.Fixed32 - } - return nil -} - -func (x *FieldRules) GetFixed64() *Fixed64Rules { - if x, ok := x.GetType().(*FieldRules_Fixed64); ok { - return x.Fixed64 - } - return nil -} - -func (x *FieldRules) GetSfixed32() *SFixed32Rules { - if x, ok := x.GetType().(*FieldRules_Sfixed32); ok { - return x.Sfixed32 - } - return nil -} - -func (x *FieldRules) GetSfixed64() *SFixed64Rules { - if x, ok := x.GetType().(*FieldRules_Sfixed64); ok { - return x.Sfixed64 - } - return nil -} - -func (x *FieldRules) GetBool() *BoolRules { - if x, ok := x.GetType().(*FieldRules_Bool); ok { - return x.Bool - } - return nil -} - -func (x *FieldRules) GetString_() *StringRules { - if x, ok := x.GetType().(*FieldRules_String_); ok { - return x.String_ - } - return nil -} - -func (x *FieldRules) GetBytes() *BytesRules { - if x, ok := x.GetType().(*FieldRules_Bytes); ok { - return x.Bytes - } - return nil -} - -func (x *FieldRules) GetEnum() *EnumRules { - if x, ok := x.GetType().(*FieldRules_Enum); ok { - return x.Enum - } - return nil -} - -func (x *FieldRules) GetRepeated() *RepeatedRules { - if x, ok := x.GetType().(*FieldRules_Repeated); ok { - return x.Repeated - } - return nil -} - -func (x *FieldRules) GetMap() *MapRules { - if x, ok := x.GetType().(*FieldRules_Map); ok { - return x.Map - } - return nil -} - -func (x *FieldRules) GetAny() *AnyRules { - if x, ok := x.GetType().(*FieldRules_Any); ok { - return x.Any - } - return nil -} - -func (x *FieldRules) GetDuration() *DurationRules { - if x, ok := x.GetType().(*FieldRules_Duration); ok { - return x.Duration - } - return nil -} - -func (x *FieldRules) GetTimestamp() *TimestampRules { - if x, ok := x.GetType().(*FieldRules_Timestamp); ok { - return x.Timestamp - } - return nil -} - -type isFieldRules_Type interface { - isFieldRules_Type() -} - -type FieldRules_Float struct { - // Scalar Field Types - Float *FloatRules `protobuf:"bytes,1,opt,name=float,oneof"` -} - -type FieldRules_Double struct { - Double *DoubleRules `protobuf:"bytes,2,opt,name=double,oneof"` -} - -type FieldRules_Int32 struct { - Int32 *Int32Rules `protobuf:"bytes,3,opt,name=int32,oneof"` -} - -type FieldRules_Int64 struct { - Int64 *Int64Rules `protobuf:"bytes,4,opt,name=int64,oneof"` -} - -type FieldRules_Uint32 struct { - Uint32 *UInt32Rules `protobuf:"bytes,5,opt,name=uint32,oneof"` -} - -type FieldRules_Uint64 struct { - Uint64 *UInt64Rules `protobuf:"bytes,6,opt,name=uint64,oneof"` -} - -type FieldRules_Sint32 struct { - Sint32 *SInt32Rules `protobuf:"bytes,7,opt,name=sint32,oneof"` -} - -type FieldRules_Sint64 struct { - Sint64 *SInt64Rules `protobuf:"bytes,8,opt,name=sint64,oneof"` -} - -type FieldRules_Fixed32 struct { - Fixed32 *Fixed32Rules `protobuf:"bytes,9,opt,name=fixed32,oneof"` -} - -type FieldRules_Fixed64 struct { - Fixed64 *Fixed64Rules `protobuf:"bytes,10,opt,name=fixed64,oneof"` -} - -type FieldRules_Sfixed32 struct { - Sfixed32 *SFixed32Rules `protobuf:"bytes,11,opt,name=sfixed32,oneof"` -} - -type FieldRules_Sfixed64 struct { - Sfixed64 *SFixed64Rules `protobuf:"bytes,12,opt,name=sfixed64,oneof"` -} - -type FieldRules_Bool struct { - Bool *BoolRules `protobuf:"bytes,13,opt,name=bool,oneof"` -} - -type FieldRules_String_ struct { - String_ *StringRules `protobuf:"bytes,14,opt,name=string,oneof"` -} - -type FieldRules_Bytes struct { - Bytes *BytesRules `protobuf:"bytes,15,opt,name=bytes,oneof"` -} - -type FieldRules_Enum struct { - // Complex Field Types - Enum *EnumRules `protobuf:"bytes,16,opt,name=enum,oneof"` -} - -type FieldRules_Repeated struct { - Repeated *RepeatedRules `protobuf:"bytes,18,opt,name=repeated,oneof"` -} - -type FieldRules_Map struct { - Map *MapRules `protobuf:"bytes,19,opt,name=map,oneof"` -} - -type FieldRules_Any struct { - // Well-Known Field Types - Any *AnyRules `protobuf:"bytes,20,opt,name=any,oneof"` -} - -type FieldRules_Duration struct { - Duration *DurationRules `protobuf:"bytes,21,opt,name=duration,oneof"` -} - -type FieldRules_Timestamp struct { - Timestamp *TimestampRules `protobuf:"bytes,22,opt,name=timestamp,oneof"` -} - -func (*FieldRules_Float) isFieldRules_Type() {} - -func (*FieldRules_Double) isFieldRules_Type() {} - -func (*FieldRules_Int32) isFieldRules_Type() {} - -func (*FieldRules_Int64) isFieldRules_Type() {} - -func (*FieldRules_Uint32) isFieldRules_Type() {} - -func (*FieldRules_Uint64) isFieldRules_Type() {} - -func (*FieldRules_Sint32) isFieldRules_Type() {} - -func (*FieldRules_Sint64) isFieldRules_Type() {} - -func (*FieldRules_Fixed32) isFieldRules_Type() {} - -func (*FieldRules_Fixed64) isFieldRules_Type() {} - -func (*FieldRules_Sfixed32) isFieldRules_Type() {} - -func (*FieldRules_Sfixed64) isFieldRules_Type() {} - -func (*FieldRules_Bool) isFieldRules_Type() {} - -func (*FieldRules_String_) isFieldRules_Type() {} - -func (*FieldRules_Bytes) isFieldRules_Type() {} - -func (*FieldRules_Enum) isFieldRules_Type() {} - -func (*FieldRules_Repeated) isFieldRules_Type() {} - -func (*FieldRules_Map) isFieldRules_Type() {} - -func (*FieldRules_Any) isFieldRules_Type() {} - -func (*FieldRules_Duration) isFieldRules_Type() {} - -func (*FieldRules_Timestamp) isFieldRules_Type() {} - -// FloatRules describes the constraints applied to `float` values -type FloatRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *float32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *float32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *float32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *float32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *float32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []float32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []float32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *FloatRules) Reset() { - *x = FloatRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FloatRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FloatRules) ProtoMessage() {} - -func (x *FloatRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FloatRules.ProtoReflect.Descriptor instead. -func (*FloatRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{1} -} - -func (x *FloatRules) GetConst() float32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *FloatRules) GetLt() float32 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *FloatRules) GetLte() float32 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *FloatRules) GetGt() float32 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *FloatRules) GetGte() float32 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *FloatRules) GetIn() []float32 { - if x != nil { - return x.In - } - return nil -} - -func (x *FloatRules) GetNotIn() []float32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *FloatRules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// DoubleRules describes the constraints applied to `double` values -type DoubleRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *float64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *float64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *float64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *float64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *float64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []float64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []float64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *DoubleRules) Reset() { - *x = DoubleRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoubleRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoubleRules) ProtoMessage() {} - -func (x *DoubleRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoubleRules.ProtoReflect.Descriptor instead. -func (*DoubleRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{2} -} - -func (x *DoubleRules) GetConst() float64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *DoubleRules) GetLt() float64 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *DoubleRules) GetLte() float64 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *DoubleRules) GetGt() float64 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *DoubleRules) GetGte() float64 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *DoubleRules) GetIn() []float64 { - if x != nil { - return x.In - } - return nil -} - -func (x *DoubleRules) GetNotIn() []float64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *DoubleRules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// Int32Rules describes the constraints applied to `int32` values -type Int32Rules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *int32 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *int32 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *int32 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *int32 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []int32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []int32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *Int32Rules) Reset() { - *x = Int32Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int32Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int32Rules) ProtoMessage() {} - -func (x *Int32Rules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int32Rules.ProtoReflect.Descriptor instead. -func (*Int32Rules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{3} -} - -func (x *Int32Rules) GetConst() int32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *Int32Rules) GetLt() int32 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *Int32Rules) GetLte() int32 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *Int32Rules) GetGt() int32 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *Int32Rules) GetGte() int32 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *Int32Rules) GetIn() []int32 { - if x != nil { - return x.In - } - return nil -} - -func (x *Int32Rules) GetNotIn() []int32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *Int32Rules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// Int64Rules describes the constraints applied to `int64` values -type Int64Rules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *int64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *int64 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *int64 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *int64 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *int64 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []int64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []int64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *Int64Rules) Reset() { - *x = Int64Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int64Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int64Rules) ProtoMessage() {} - -func (x *Int64Rules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int64Rules.ProtoReflect.Descriptor instead. -func (*Int64Rules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{4} -} - -func (x *Int64Rules) GetConst() int64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *Int64Rules) GetLt() int64 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *Int64Rules) GetLte() int64 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *Int64Rules) GetGt() int64 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *Int64Rules) GetGte() int64 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *Int64Rules) GetIn() []int64 { - if x != nil { - return x.In - } - return nil -} - -func (x *Int64Rules) GetNotIn() []int64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *Int64Rules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// UInt32Rules describes the constraints applied to `uint32` values -type UInt32Rules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *uint32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *uint32 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *uint32 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *uint32 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *uint32 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []uint32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []uint32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *UInt32Rules) Reset() { - *x = UInt32Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UInt32Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UInt32Rules) ProtoMessage() {} - -func (x *UInt32Rules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UInt32Rules.ProtoReflect.Descriptor instead. -func (*UInt32Rules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{5} -} - -func (x *UInt32Rules) GetConst() uint32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *UInt32Rules) GetLt() uint32 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *UInt32Rules) GetLte() uint32 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *UInt32Rules) GetGt() uint32 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *UInt32Rules) GetGte() uint32 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *UInt32Rules) GetIn() []uint32 { - if x != nil { - return x.In - } - return nil -} - -func (x *UInt32Rules) GetNotIn() []uint32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *UInt32Rules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// UInt64Rules describes the constraints applied to `uint64` values -type UInt64Rules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *uint64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *uint64 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *uint64 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *uint64 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *uint64 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []uint64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []uint64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *UInt64Rules) Reset() { - *x = UInt64Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UInt64Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UInt64Rules) ProtoMessage() {} - -func (x *UInt64Rules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UInt64Rules.ProtoReflect.Descriptor instead. -func (*UInt64Rules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{6} -} - -func (x *UInt64Rules) GetConst() uint64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *UInt64Rules) GetLt() uint64 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *UInt64Rules) GetLte() uint64 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *UInt64Rules) GetGt() uint64 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *UInt64Rules) GetGte() uint64 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *UInt64Rules) GetIn() []uint64 { - if x != nil { - return x.In - } - return nil -} - -func (x *UInt64Rules) GetNotIn() []uint64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *UInt64Rules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// SInt32Rules describes the constraints applied to `sint32` values -type SInt32Rules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *int32 `protobuf:"zigzag32,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *int32 `protobuf:"zigzag32,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *int32 `protobuf:"zigzag32,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *int32 `protobuf:"zigzag32,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *int32 `protobuf:"zigzag32,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []int32 `protobuf:"zigzag32,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []int32 `protobuf:"zigzag32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *SInt32Rules) Reset() { - *x = SInt32Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SInt32Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SInt32Rules) ProtoMessage() {} - -func (x *SInt32Rules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SInt32Rules.ProtoReflect.Descriptor instead. -func (*SInt32Rules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{7} -} - -func (x *SInt32Rules) GetConst() int32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *SInt32Rules) GetLt() int32 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *SInt32Rules) GetLte() int32 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *SInt32Rules) GetGt() int32 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *SInt32Rules) GetGte() int32 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *SInt32Rules) GetIn() []int32 { - if x != nil { - return x.In - } - return nil -} - -func (x *SInt32Rules) GetNotIn() []int32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *SInt32Rules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// SInt64Rules describes the constraints applied to `sint64` values -type SInt64Rules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *int64 `protobuf:"zigzag64,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *int64 `protobuf:"zigzag64,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *int64 `protobuf:"zigzag64,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *int64 `protobuf:"zigzag64,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *int64 `protobuf:"zigzag64,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []int64 `protobuf:"zigzag64,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []int64 `protobuf:"zigzag64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *SInt64Rules) Reset() { - *x = SInt64Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SInt64Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SInt64Rules) ProtoMessage() {} - -func (x *SInt64Rules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SInt64Rules.ProtoReflect.Descriptor instead. -func (*SInt64Rules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{8} -} - -func (x *SInt64Rules) GetConst() int64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *SInt64Rules) GetLt() int64 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *SInt64Rules) GetLte() int64 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *SInt64Rules) GetGt() int64 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *SInt64Rules) GetGte() int64 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *SInt64Rules) GetIn() []int64 { - if x != nil { - return x.In - } - return nil -} - -func (x *SInt64Rules) GetNotIn() []int64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *SInt64Rules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// Fixed32Rules describes the constraints applied to `fixed32` values -type Fixed32Rules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *uint32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *uint32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *uint32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *uint32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *uint32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []uint32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []uint32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *Fixed32Rules) Reset() { - *x = Fixed32Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Fixed32Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Fixed32Rules) ProtoMessage() {} - -func (x *Fixed32Rules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Fixed32Rules.ProtoReflect.Descriptor instead. -func (*Fixed32Rules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{9} -} - -func (x *Fixed32Rules) GetConst() uint32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *Fixed32Rules) GetLt() uint32 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *Fixed32Rules) GetLte() uint32 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *Fixed32Rules) GetGt() uint32 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *Fixed32Rules) GetGte() uint32 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *Fixed32Rules) GetIn() []uint32 { - if x != nil { - return x.In - } - return nil -} - -func (x *Fixed32Rules) GetNotIn() []uint32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *Fixed32Rules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// Fixed64Rules describes the constraints applied to `fixed64` values -type Fixed64Rules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *uint64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *uint64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *uint64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *uint64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *uint64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []uint64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []uint64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *Fixed64Rules) Reset() { - *x = Fixed64Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Fixed64Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Fixed64Rules) ProtoMessage() {} - -func (x *Fixed64Rules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Fixed64Rules.ProtoReflect.Descriptor instead. -func (*Fixed64Rules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{10} -} - -func (x *Fixed64Rules) GetConst() uint64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *Fixed64Rules) GetLt() uint64 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *Fixed64Rules) GetLte() uint64 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *Fixed64Rules) GetGt() uint64 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *Fixed64Rules) GetGte() uint64 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *Fixed64Rules) GetIn() []uint64 { - if x != nil { - return x.In - } - return nil -} - -func (x *Fixed64Rules) GetNotIn() []uint64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *Fixed64Rules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// SFixed32Rules describes the constraints applied to `sfixed32` values -type SFixed32Rules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *int32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *int32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *int32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *int32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *int32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []int32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []int32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *SFixed32Rules) Reset() { - *x = SFixed32Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SFixed32Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SFixed32Rules) ProtoMessage() {} - -func (x *SFixed32Rules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SFixed32Rules.ProtoReflect.Descriptor instead. -func (*SFixed32Rules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{11} -} - -func (x *SFixed32Rules) GetConst() int32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *SFixed32Rules) GetLt() int32 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *SFixed32Rules) GetLte() int32 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *SFixed32Rules) GetGt() int32 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *SFixed32Rules) GetGte() int32 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *SFixed32Rules) GetIn() []int32 { - if x != nil { - return x.In - } - return nil -} - -func (x *SFixed32Rules) GetNotIn() []int32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *SFixed32Rules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// SFixed64Rules describes the constraints applied to `sfixed64` values -type SFixed64Rules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *int64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *int64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - Lte *int64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - Gt *int64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - Gte *int64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []int64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []int64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *SFixed64Rules) Reset() { - *x = SFixed64Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SFixed64Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SFixed64Rules) ProtoMessage() {} - -func (x *SFixed64Rules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SFixed64Rules.ProtoReflect.Descriptor instead. -func (*SFixed64Rules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{12} -} - -func (x *SFixed64Rules) GetConst() int64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *SFixed64Rules) GetLt() int64 { - if x != nil && x.Lt != nil { - return *x.Lt - } - return 0 -} - -func (x *SFixed64Rules) GetLte() int64 { - if x != nil && x.Lte != nil { - return *x.Lte - } - return 0 -} - -func (x *SFixed64Rules) GetGt() int64 { - if x != nil && x.Gt != nil { - return *x.Gt - } - return 0 -} - -func (x *SFixed64Rules) GetGte() int64 { - if x != nil && x.Gte != nil { - return *x.Gte - } - return 0 -} - -func (x *SFixed64Rules) GetIn() []int64 { - if x != nil { - return x.In - } - return nil -} - -func (x *SFixed64Rules) GetNotIn() []int64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *SFixed64Rules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// BoolRules describes the constraints applied to `bool` values -type BoolRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *bool `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` -} - -func (x *BoolRules) Reset() { - *x = BoolRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BoolRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BoolRules) ProtoMessage() {} - -func (x *BoolRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BoolRules.ProtoReflect.Descriptor instead. -func (*BoolRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{13} -} - -func (x *BoolRules) GetConst() bool { - if x != nil && x.Const != nil { - return *x.Const - } - return false -} - -// StringRules describe the constraints applied to `string` values -type StringRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *string `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` - // Len specifies that this field must be the specified number of - // characters (Unicode code points). Note that the number of - // characters may differ from the number of bytes in the string. - Len *uint64 `protobuf:"varint,19,opt,name=len" json:"len,omitempty"` - // MinLen specifies that this field must be the specified number of - // characters (Unicode code points) at a minimum. Note that the number of - // characters may differ from the number of bytes in the string. - MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` - // MaxLen specifies that this field must be the specified number of - // characters (Unicode code points) at a maximum. Note that the number of - // characters may differ from the number of bytes in the string. - MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` - // LenBytes specifies that this field must be the specified number of bytes - LenBytes *uint64 `protobuf:"varint,20,opt,name=len_bytes,json=lenBytes" json:"len_bytes,omitempty"` - // MinBytes specifies that this field must be the specified number of bytes - // at a minimum - MinBytes *uint64 `protobuf:"varint,4,opt,name=min_bytes,json=minBytes" json:"min_bytes,omitempty"` - // MaxBytes specifies that this field must be the specified number of bytes - // at a maximum - MaxBytes *uint64 `protobuf:"varint,5,opt,name=max_bytes,json=maxBytes" json:"max_bytes,omitempty"` - // Pattern specifes that this field must match against the specified - // regular expression (RE2 syntax). The included expression should elide - // any delimiters. - Pattern *string `protobuf:"bytes,6,opt,name=pattern" json:"pattern,omitempty"` - // Prefix specifies that this field must have the specified substring at - // the beginning of the string. - Prefix *string `protobuf:"bytes,7,opt,name=prefix" json:"prefix,omitempty"` - // Suffix specifies that this field must have the specified substring at - // the end of the string. - Suffix *string `protobuf:"bytes,8,opt,name=suffix" json:"suffix,omitempty"` - // Contains specifies that this field must have the specified substring - // anywhere in the string. - Contains *string `protobuf:"bytes,9,opt,name=contains" json:"contains,omitempty"` - // NotContains specifies that this field cannot have the specified substring - // anywhere in the string. - NotContains *string `protobuf:"bytes,23,opt,name=not_contains,json=notContains" json:"not_contains,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []string `protobuf:"bytes,10,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []string `protobuf:"bytes,11,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // WellKnown rules provide advanced constraints against common string - // patterns - // - // Types that are assignable to WellKnown: - // - // *StringRules_Email - // *StringRules_Hostname - // *StringRules_Ip - // *StringRules_Ipv4 - // *StringRules_Ipv6 - // *StringRules_Uri - // *StringRules_UriRef - // *StringRules_Address - // *StringRules_Uuid - // *StringRules_WellKnownRegex - WellKnown isStringRules_WellKnown `protobuf_oneof:"well_known"` - // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable - // strict header validation. - // By default, this is true, and HTTP header validations are RFC-compliant. - // Setting to false will enable a looser validations that only disallows - // \r\n\0 characters, which can be used to bypass header matching rules. - Strict *bool `protobuf:"varint,25,opt,name=strict,def=1" json:"strict,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,26,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -// Default values for StringRules fields. -const ( - Default_StringRules_Strict = bool(true) -) - -func (x *StringRules) Reset() { - *x = StringRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StringRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StringRules) ProtoMessage() {} - -func (x *StringRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StringRules.ProtoReflect.Descriptor instead. -func (*StringRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{14} -} - -func (x *StringRules) GetConst() string { - if x != nil && x.Const != nil { - return *x.Const - } - return "" -} - -func (x *StringRules) GetLen() uint64 { - if x != nil && x.Len != nil { - return *x.Len - } - return 0 -} - -func (x *StringRules) GetMinLen() uint64 { - if x != nil && x.MinLen != nil { - return *x.MinLen - } - return 0 -} - -func (x *StringRules) GetMaxLen() uint64 { - if x != nil && x.MaxLen != nil { - return *x.MaxLen - } - return 0 -} - -func (x *StringRules) GetLenBytes() uint64 { - if x != nil && x.LenBytes != nil { - return *x.LenBytes - } - return 0 -} - -func (x *StringRules) GetMinBytes() uint64 { - if x != nil && x.MinBytes != nil { - return *x.MinBytes - } - return 0 -} - -func (x *StringRules) GetMaxBytes() uint64 { - if x != nil && x.MaxBytes != nil { - return *x.MaxBytes - } - return 0 -} - -func (x *StringRules) GetPattern() string { - if x != nil && x.Pattern != nil { - return *x.Pattern - } - return "" -} - -func (x *StringRules) GetPrefix() string { - if x != nil && x.Prefix != nil { - return *x.Prefix - } - return "" -} - -func (x *StringRules) GetSuffix() string { - if x != nil && x.Suffix != nil { - return *x.Suffix - } - return "" -} - -func (x *StringRules) GetContains() string { - if x != nil && x.Contains != nil { - return *x.Contains - } - return "" -} - -func (x *StringRules) GetNotContains() string { - if x != nil && x.NotContains != nil { - return *x.NotContains - } - return "" -} - -func (x *StringRules) GetIn() []string { - if x != nil { - return x.In - } - return nil -} - -func (x *StringRules) GetNotIn() []string { - if x != nil { - return x.NotIn - } - return nil -} - -func (m *StringRules) GetWellKnown() isStringRules_WellKnown { - if m != nil { - return m.WellKnown - } - return nil -} - -func (x *StringRules) GetEmail() bool { - if x, ok := x.GetWellKnown().(*StringRules_Email); ok { - return x.Email - } - return false -} - -func (x *StringRules) GetHostname() bool { - if x, ok := x.GetWellKnown().(*StringRules_Hostname); ok { - return x.Hostname - } - return false -} - -func (x *StringRules) GetIp() bool { - if x, ok := x.GetWellKnown().(*StringRules_Ip); ok { - return x.Ip - } - return false -} - -func (x *StringRules) GetIpv4() bool { - if x, ok := x.GetWellKnown().(*StringRules_Ipv4); ok { - return x.Ipv4 - } - return false -} - -func (x *StringRules) GetIpv6() bool { - if x, ok := x.GetWellKnown().(*StringRules_Ipv6); ok { - return x.Ipv6 - } - return false -} - -func (x *StringRules) GetUri() bool { - if x, ok := x.GetWellKnown().(*StringRules_Uri); ok { - return x.Uri - } - return false -} - -func (x *StringRules) GetUriRef() bool { - if x, ok := x.GetWellKnown().(*StringRules_UriRef); ok { - return x.UriRef - } - return false -} - -func (x *StringRules) GetAddress() bool { - if x, ok := x.GetWellKnown().(*StringRules_Address); ok { - return x.Address - } - return false -} - -func (x *StringRules) GetUuid() bool { - if x, ok := x.GetWellKnown().(*StringRules_Uuid); ok { - return x.Uuid - } - return false -} - -func (x *StringRules) GetWellKnownRegex() KnownRegex { - if x, ok := x.GetWellKnown().(*StringRules_WellKnownRegex); ok { - return x.WellKnownRegex - } - return KnownRegex_UNKNOWN -} - -func (x *StringRules) GetStrict() bool { - if x != nil && x.Strict != nil { - return *x.Strict - } - return Default_StringRules_Strict -} - -func (x *StringRules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -type isStringRules_WellKnown interface { - isStringRules_WellKnown() -} - -type StringRules_Email struct { - // Email specifies that the field must be a valid email address as - // defined by RFC 5322 - Email bool `protobuf:"varint,12,opt,name=email,oneof"` -} - -type StringRules_Hostname struct { - // Hostname specifies that the field must be a valid hostname as - // defined by RFC 1034. This constraint does not support - // internationalized domain names (IDNs). - Hostname bool `protobuf:"varint,13,opt,name=hostname,oneof"` -} - -type StringRules_Ip struct { - // Ip specifies that the field must be a valid IP (v4 or v6) address. - // Valid IPv6 addresses should not include surrounding square brackets. - Ip bool `protobuf:"varint,14,opt,name=ip,oneof"` -} - -type StringRules_Ipv4 struct { - // Ipv4 specifies that the field must be a valid IPv4 address. - Ipv4 bool `protobuf:"varint,15,opt,name=ipv4,oneof"` -} - -type StringRules_Ipv6 struct { - // Ipv6 specifies that the field must be a valid IPv6 address. Valid - // IPv6 addresses should not include surrounding square brackets. - Ipv6 bool `protobuf:"varint,16,opt,name=ipv6,oneof"` -} - -type StringRules_Uri struct { - // Uri specifies that the field must be a valid, absolute URI as defined - // by RFC 3986 - Uri bool `protobuf:"varint,17,opt,name=uri,oneof"` -} - -type StringRules_UriRef struct { - // UriRef specifies that the field must be a valid URI as defined by RFC - // 3986 and may be relative or absolute. - UriRef bool `protobuf:"varint,18,opt,name=uri_ref,json=uriRef,oneof"` -} - -type StringRules_Address struct { - // Address specifies that the field must be either a valid hostname as - // defined by RFC 1034 (which does not support internationalized domain - // names or IDNs), or it can be a valid IP (v4 or v6). - Address bool `protobuf:"varint,21,opt,name=address,oneof"` -} - -type StringRules_Uuid struct { - // Uuid specifies that the field must be a valid UUID as defined by - // RFC 4122 - Uuid bool `protobuf:"varint,22,opt,name=uuid,oneof"` -} - -type StringRules_WellKnownRegex struct { - // WellKnownRegex specifies a common well known pattern defined as a regex. - WellKnownRegex KnownRegex `protobuf:"varint,24,opt,name=well_known_regex,json=wellKnownRegex,enum=validate.KnownRegex,oneof"` -} - -func (*StringRules_Email) isStringRules_WellKnown() {} - -func (*StringRules_Hostname) isStringRules_WellKnown() {} - -func (*StringRules_Ip) isStringRules_WellKnown() {} - -func (*StringRules_Ipv4) isStringRules_WellKnown() {} - -func (*StringRules_Ipv6) isStringRules_WellKnown() {} - -func (*StringRules_Uri) isStringRules_WellKnown() {} - -func (*StringRules_UriRef) isStringRules_WellKnown() {} - -func (*StringRules_Address) isStringRules_WellKnown() {} - -func (*StringRules_Uuid) isStringRules_WellKnown() {} - -func (*StringRules_WellKnownRegex) isStringRules_WellKnown() {} - -// BytesRules describe the constraints applied to `bytes` values -type BytesRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const []byte `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` - // Len specifies that this field must be the specified number of bytes - Len *uint64 `protobuf:"varint,13,opt,name=len" json:"len,omitempty"` - // MinLen specifies that this field must be the specified number of bytes - // at a minimum - MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` - // MaxLen specifies that this field must be the specified number of bytes - // at a maximum - MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` - // Pattern specifes that this field must match against the specified - // regular expression (RE2 syntax). The included expression should elide - // any delimiters. - Pattern *string `protobuf:"bytes,4,opt,name=pattern" json:"pattern,omitempty"` - // Prefix specifies that this field must have the specified bytes at the - // beginning of the string. - Prefix []byte `protobuf:"bytes,5,opt,name=prefix" json:"prefix,omitempty"` - // Suffix specifies that this field must have the specified bytes at the - // end of the string. - Suffix []byte `protobuf:"bytes,6,opt,name=suffix" json:"suffix,omitempty"` - // Contains specifies that this field must have the specified bytes - // anywhere in the string. - Contains []byte `protobuf:"bytes,7,opt,name=contains" json:"contains,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In [][]byte `protobuf:"bytes,8,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn [][]byte `protobuf:"bytes,9,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // WellKnown rules provide advanced constraints against common byte - // patterns - // - // Types that are assignable to WellKnown: - // - // *BytesRules_Ip - // *BytesRules_Ipv4 - // *BytesRules_Ipv6 - WellKnown isBytesRules_WellKnown `protobuf_oneof:"well_known"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,14,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *BytesRules) Reset() { - *x = BytesRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BytesRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BytesRules) ProtoMessage() {} - -func (x *BytesRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BytesRules.ProtoReflect.Descriptor instead. -func (*BytesRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{15} -} - -func (x *BytesRules) GetConst() []byte { - if x != nil { - return x.Const - } - return nil -} - -func (x *BytesRules) GetLen() uint64 { - if x != nil && x.Len != nil { - return *x.Len - } - return 0 -} - -func (x *BytesRules) GetMinLen() uint64 { - if x != nil && x.MinLen != nil { - return *x.MinLen - } - return 0 -} - -func (x *BytesRules) GetMaxLen() uint64 { - if x != nil && x.MaxLen != nil { - return *x.MaxLen - } - return 0 -} - -func (x *BytesRules) GetPattern() string { - if x != nil && x.Pattern != nil { - return *x.Pattern - } - return "" -} - -func (x *BytesRules) GetPrefix() []byte { - if x != nil { - return x.Prefix - } - return nil -} - -func (x *BytesRules) GetSuffix() []byte { - if x != nil { - return x.Suffix - } - return nil -} - -func (x *BytesRules) GetContains() []byte { - if x != nil { - return x.Contains - } - return nil -} - -func (x *BytesRules) GetIn() [][]byte { - if x != nil { - return x.In - } - return nil -} - -func (x *BytesRules) GetNotIn() [][]byte { - if x != nil { - return x.NotIn - } - return nil -} - -func (m *BytesRules) GetWellKnown() isBytesRules_WellKnown { - if m != nil { - return m.WellKnown - } - return nil -} - -func (x *BytesRules) GetIp() bool { - if x, ok := x.GetWellKnown().(*BytesRules_Ip); ok { - return x.Ip - } - return false -} - -func (x *BytesRules) GetIpv4() bool { - if x, ok := x.GetWellKnown().(*BytesRules_Ipv4); ok { - return x.Ipv4 - } - return false -} - -func (x *BytesRules) GetIpv6() bool { - if x, ok := x.GetWellKnown().(*BytesRules_Ipv6); ok { - return x.Ipv6 - } - return false -} - -func (x *BytesRules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -type isBytesRules_WellKnown interface { - isBytesRules_WellKnown() -} - -type BytesRules_Ip struct { - // Ip specifies that the field must be a valid IP (v4 or v6) address in - // byte format - Ip bool `protobuf:"varint,10,opt,name=ip,oneof"` -} - -type BytesRules_Ipv4 struct { - // Ipv4 specifies that the field must be a valid IPv4 address in byte - // format - Ipv4 bool `protobuf:"varint,11,opt,name=ipv4,oneof"` -} - -type BytesRules_Ipv6 struct { - // Ipv6 specifies that the field must be a valid IPv6 address in byte - // format - Ipv6 bool `protobuf:"varint,12,opt,name=ipv6,oneof"` -} - -func (*BytesRules_Ip) isBytesRules_WellKnown() {} - -func (*BytesRules_Ipv4) isBytesRules_WellKnown() {} - -func (*BytesRules_Ipv6) isBytesRules_WellKnown() {} - -// EnumRules describe the constraints applied to enum values -type EnumRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Const specifies that this field must be exactly the specified value - Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - // DefinedOnly specifies that this field must be only one of the defined - // values for this enum, failing on any undefined value. - DefinedOnly *bool `protobuf:"varint,2,opt,name=defined_only,json=definedOnly" json:"defined_only,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []int32 `protobuf:"varint,3,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []int32 `protobuf:"varint,4,rep,name=not_in,json=notIn" json:"not_in,omitempty"` -} - -func (x *EnumRules) Reset() { - *x = EnumRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EnumRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnumRules) ProtoMessage() {} - -func (x *EnumRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnumRules.ProtoReflect.Descriptor instead. -func (*EnumRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{16} -} - -func (x *EnumRules) GetConst() int32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *EnumRules) GetDefinedOnly() bool { - if x != nil && x.DefinedOnly != nil { - return *x.DefinedOnly - } - return false -} - -func (x *EnumRules) GetIn() []int32 { - if x != nil { - return x.In - } - return nil -} - -func (x *EnumRules) GetNotIn() []int32 { - if x != nil { - return x.NotIn - } - return nil -} - -// MessageRules describe the constraints applied to embedded message values. -// For message-type fields, validation is performed recursively. -type MessageRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Skip specifies that the validation rules of this field should not be - // evaluated - Skip *bool `protobuf:"varint,1,opt,name=skip" json:"skip,omitempty"` - // Required specifies that this field must be set - Required *bool `protobuf:"varint,2,opt,name=required" json:"required,omitempty"` -} - -func (x *MessageRules) Reset() { - *x = MessageRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MessageRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MessageRules) ProtoMessage() {} - -func (x *MessageRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MessageRules.ProtoReflect.Descriptor instead. -func (*MessageRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{17} -} - -func (x *MessageRules) GetSkip() bool { - if x != nil && x.Skip != nil { - return *x.Skip - } - return false -} - -func (x *MessageRules) GetRequired() bool { - if x != nil && x.Required != nil { - return *x.Required - } - return false -} - -// RepeatedRules describe the constraints applied to `repeated` values -type RepeatedRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // MinItems specifies that this field must have the specified number of - // items at a minimum - MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems" json:"min_items,omitempty"` - // MaxItems specifies that this field must have the specified number of - // items at a maximum - MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` - // Unique specifies that all elements in this field must be unique. This - // contraint is only applicable to scalar and enum types (messages are not - // supported). - Unique *bool `protobuf:"varint,3,opt,name=unique" json:"unique,omitempty"` - // Items specifies the contraints to be applied to each item in the field. - // Repeated message fields will still execute validation against each item - // unless skip is specified here. - Items *FieldRules `protobuf:"bytes,4,opt,name=items" json:"items,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,5,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *RepeatedRules) Reset() { - *x = RepeatedRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RepeatedRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RepeatedRules) ProtoMessage() {} - -func (x *RepeatedRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RepeatedRules.ProtoReflect.Descriptor instead. -func (*RepeatedRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{18} -} - -func (x *RepeatedRules) GetMinItems() uint64 { - if x != nil && x.MinItems != nil { - return *x.MinItems - } - return 0 -} - -func (x *RepeatedRules) GetMaxItems() uint64 { - if x != nil && x.MaxItems != nil { - return *x.MaxItems - } - return 0 -} - -func (x *RepeatedRules) GetUnique() bool { - if x != nil && x.Unique != nil { - return *x.Unique - } - return false -} - -func (x *RepeatedRules) GetItems() *FieldRules { - if x != nil { - return x.Items - } - return nil -} - -func (x *RepeatedRules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// MapRules describe the constraints applied to `map` values -type MapRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // MinPairs specifies that this field must have the specified number of - // KVs at a minimum - MinPairs *uint64 `protobuf:"varint,1,opt,name=min_pairs,json=minPairs" json:"min_pairs,omitempty"` - // MaxPairs specifies that this field must have the specified number of - // KVs at a maximum - MaxPairs *uint64 `protobuf:"varint,2,opt,name=max_pairs,json=maxPairs" json:"max_pairs,omitempty"` - // NoSparse specifies values in this field cannot be unset. This only - // applies to map's with message value types. - NoSparse *bool `protobuf:"varint,3,opt,name=no_sparse,json=noSparse" json:"no_sparse,omitempty"` - // Keys specifies the constraints to be applied to each key in the field. - Keys *FieldRules `protobuf:"bytes,4,opt,name=keys" json:"keys,omitempty"` - // Values specifies the constraints to be applied to the value of each key - // in the field. Message values will still have their validations evaluated - // unless skip is specified here. - Values *FieldRules `protobuf:"bytes,5,opt,name=values" json:"values,omitempty"` - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - IgnoreEmpty *bool `protobuf:"varint,6,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` -} - -func (x *MapRules) Reset() { - *x = MapRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MapRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MapRules) ProtoMessage() {} - -func (x *MapRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MapRules.ProtoReflect.Descriptor instead. -func (*MapRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{19} -} - -func (x *MapRules) GetMinPairs() uint64 { - if x != nil && x.MinPairs != nil { - return *x.MinPairs - } - return 0 -} - -func (x *MapRules) GetMaxPairs() uint64 { - if x != nil && x.MaxPairs != nil { - return *x.MaxPairs - } - return 0 -} - -func (x *MapRules) GetNoSparse() bool { - if x != nil && x.NoSparse != nil { - return *x.NoSparse - } - return false -} - -func (x *MapRules) GetKeys() *FieldRules { - if x != nil { - return x.Keys - } - return nil -} - -func (x *MapRules) GetValues() *FieldRules { - if x != nil { - return x.Values - } - return nil -} - -func (x *MapRules) GetIgnoreEmpty() bool { - if x != nil && x.IgnoreEmpty != nil { - return *x.IgnoreEmpty - } - return false -} - -// AnyRules describe constraints applied exclusively to the -// `google.protobuf.Any` well-known type -type AnyRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required specifies that this field must be set - Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` - // In specifies that this field's `type_url` must be equal to one of the - // specified values. - In []string `protobuf:"bytes,2,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field's `type_url` must not be equal to any of - // the specified values. - NotIn []string `protobuf:"bytes,3,rep,name=not_in,json=notIn" json:"not_in,omitempty"` -} - -func (x *AnyRules) Reset() { - *x = AnyRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AnyRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AnyRules) ProtoMessage() {} - -func (x *AnyRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AnyRules.ProtoReflect.Descriptor instead. -func (*AnyRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{20} -} - -func (x *AnyRules) GetRequired() bool { - if x != nil && x.Required != nil { - return *x.Required - } - return false -} - -func (x *AnyRules) GetIn() []string { - if x != nil { - return x.In - } - return nil -} - -func (x *AnyRules) GetNotIn() []string { - if x != nil { - return x.NotIn - } - return nil -} - -// DurationRules describe the constraints applied exclusively to the -// `google.protobuf.Duration` well-known type -type DurationRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required specifies that this field must be set - Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` - // Const specifies that this field must be exactly the specified value - Const *durationpb.Duration `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *durationpb.Duration `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` - // Lt specifies that this field must be less than the specified value, - // inclusive - Lte *durationpb.Duration `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive - Gt *durationpb.Duration `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than the specified value, - // inclusive - Gte *durationpb.Duration `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"` - // In specifies that this field must be equal to one of the specified - // values - In []*durationpb.Duration `protobuf:"bytes,7,rep,name=in" json:"in,omitempty"` - // NotIn specifies that this field cannot be equal to one of the specified - // values - NotIn []*durationpb.Duration `protobuf:"bytes,8,rep,name=not_in,json=notIn" json:"not_in,omitempty"` -} - -func (x *DurationRules) Reset() { - *x = DurationRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DurationRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DurationRules) ProtoMessage() {} - -func (x *DurationRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DurationRules.ProtoReflect.Descriptor instead. -func (*DurationRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{21} -} - -func (x *DurationRules) GetRequired() bool { - if x != nil && x.Required != nil { - return *x.Required - } - return false -} - -func (x *DurationRules) GetConst() *durationpb.Duration { - if x != nil { - return x.Const - } - return nil -} - -func (x *DurationRules) GetLt() *durationpb.Duration { - if x != nil { - return x.Lt - } - return nil -} - -func (x *DurationRules) GetLte() *durationpb.Duration { - if x != nil { - return x.Lte - } - return nil -} - -func (x *DurationRules) GetGt() *durationpb.Duration { - if x != nil { - return x.Gt - } - return nil -} - -func (x *DurationRules) GetGte() *durationpb.Duration { - if x != nil { - return x.Gte - } - return nil -} - -func (x *DurationRules) GetIn() []*durationpb.Duration { - if x != nil { - return x.In - } - return nil -} - -func (x *DurationRules) GetNotIn() []*durationpb.Duration { - if x != nil { - return x.NotIn - } - return nil -} - -// TimestampRules describe the constraints applied exclusively to the -// `google.protobuf.Timestamp` well-known type -type TimestampRules struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required specifies that this field must be set - Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` - // Const specifies that this field must be exactly the specified value - Const *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` - // Lt specifies that this field must be less than the specified value, - // exclusive - Lt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` - // Lte specifies that this field must be less than the specified value, - // inclusive - Lte *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` - // Gt specifies that this field must be greater than the specified value, - // exclusive - Gt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` - // Gte specifies that this field must be greater than the specified value, - // inclusive - Gte *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"` - // LtNow specifies that this must be less than the current time. LtNow - // can only be used with the Within rule. - LtNow *bool `protobuf:"varint,7,opt,name=lt_now,json=ltNow" json:"lt_now,omitempty"` - // GtNow specifies that this must be greater than the current time. GtNow - // can only be used with the Within rule. - GtNow *bool `protobuf:"varint,8,opt,name=gt_now,json=gtNow" json:"gt_now,omitempty"` - // Within specifies that this field must be within this duration of the - // current time. This constraint can be used alone or with the LtNow and - // GtNow rules. - Within *durationpb.Duration `protobuf:"bytes,9,opt,name=within" json:"within,omitempty"` -} - -func (x *TimestampRules) Reset() { - *x = TimestampRules{} - if protoimpl.UnsafeEnabled { - mi := &file_validate_validate_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TimestampRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimestampRules) ProtoMessage() {} - -func (x *TimestampRules) ProtoReflect() protoreflect.Message { - mi := &file_validate_validate_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimestampRules.ProtoReflect.Descriptor instead. -func (*TimestampRules) Descriptor() ([]byte, []int) { - return file_validate_validate_proto_rawDescGZIP(), []int{22} -} - -func (x *TimestampRules) GetRequired() bool { - if x != nil && x.Required != nil { - return *x.Required - } - return false -} - -func (x *TimestampRules) GetConst() *timestamppb.Timestamp { - if x != nil { - return x.Const - } - return nil -} - -func (x *TimestampRules) GetLt() *timestamppb.Timestamp { - if x != nil { - return x.Lt - } - return nil -} - -func (x *TimestampRules) GetLte() *timestamppb.Timestamp { - if x != nil { - return x.Lte - } - return nil -} - -func (x *TimestampRules) GetGt() *timestamppb.Timestamp { - if x != nil { - return x.Gt - } - return nil -} - -func (x *TimestampRules) GetGte() *timestamppb.Timestamp { - if x != nil { - return x.Gte - } - return nil -} - -func (x *TimestampRules) GetLtNow() bool { - if x != nil && x.LtNow != nil { - return *x.LtNow - } - return false -} - -func (x *TimestampRules) GetGtNow() bool { - if x != nil && x.GtNow != nil { - return *x.GtNow - } - return false -} - -func (x *TimestampRules) GetWithin() *durationpb.Duration { - if x != nil { - return x.Within - } - return nil -} - -var file_validate_validate_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 1071, - Name: "validate.disabled", - Tag: "varint,1071,opt,name=disabled", - Filename: "validate/validate.proto", - }, - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 1072, - Name: "validate.ignored", - Tag: "varint,1072,opt,name=ignored", - Filename: "validate/validate.proto", - }, - { - ExtendedType: (*descriptorpb.OneofOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 1071, - Name: "validate.required", - Tag: "varint,1071,opt,name=required", - Filename: "validate/validate.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*FieldRules)(nil), - Field: 1071, - Name: "validate.rules", - Tag: "bytes,1071,opt,name=rules", - Filename: "validate/validate.proto", - }, -} - -// Extension fields to descriptorpb.MessageOptions. -var ( - // Disabled nullifies any validation rules for this message, including any - // message fields associated with it that do support validation. - // - // optional bool disabled = 1071; - E_Disabled = &file_validate_validate_proto_extTypes[0] - // Ignore skips generation of validation methods for this message. - // - // optional bool ignored = 1072; - E_Ignored = &file_validate_validate_proto_extTypes[1] -) - -// Extension fields to descriptorpb.OneofOptions. -var ( - // Required ensures that exactly one the field options in a oneof is set; - // validation fails if no fields in the oneof are set. - // - // optional bool required = 1071; - E_Required = &file_validate_validate_proto_extTypes[2] -) - -// Extension fields to descriptorpb.FieldOptions. -var ( - // Rules specify the validations to be performed on this field. By default, - // no validation is performed against a field. - // - // optional validate.FieldRules rules = 1071; - E_Rules = &file_validate_validate_proto_extTypes[3] -) - -var File_validate_validate_proto protoreflect.FileDescriptor - -var file_validate_validate_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x08, 0x0a, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, - 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x49, - 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x74, - 0x36, 0x34, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, 0x6e, - 0x74, 0x33, 0x32, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x53, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, - 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x53, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, - 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x32, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, - 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, - 0x00, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x32, 0x0a, 0x07, 0x66, 0x69, - 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, - 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x35, - 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x46, 0x69, 0x78, - 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x73, 0x66, 0x69, - 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, - 0x34, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x53, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x48, 0x00, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x04, - 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, - 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, - 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, - 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, - 0x6d, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x12, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x52, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, - 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, - 0x12, 0x26, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, - 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x16, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, - 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x02, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x02, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x02, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x02, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, - 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x02, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, - 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, - 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, - 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x01, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, - 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x01, 0x52, 0x05, - 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, - 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, - 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb0, 0x01, 0x0a, 0x0a, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, - 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x67, 0x74, 0x12, - 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x67, 0x74, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69, - 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, - 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb0, 0x01, 0x0a, 0x0a, - 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, - 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x6c, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6c, - 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, - 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, - 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, - 0x01, 0x0a, 0x0b, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, - 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, - 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, - 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, - 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x04, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, - 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f, - 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, - 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x53, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x67, 0x74, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x11, 0x52, 0x02, 0x69, 0x6e, - 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x11, - 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, - 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x53, - 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, - 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x02, 0x6c, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x03, 0x6c, - 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x12, 0x52, 0x02, - 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x12, 0x52, - 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x12, - 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x12, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb2, - 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, - 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x07, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x07, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x07, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x07, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, - 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x07, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, - 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0xb2, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, - 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x06, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x06, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x06, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, - 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x06, 0x52, 0x05, - 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, - 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, - 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb3, 0x01, 0x0a, 0x0d, 0x53, 0x46, 0x69, - 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, - 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x02, 0x6c, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x03, 0x6c, - 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x02, - 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0f, 0x52, - 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0f, - 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0f, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb3, - 0x01, 0x0a, 0x0d, 0x53, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x52, - 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x10, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x10, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x10, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x10, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x10, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, - 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x10, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, - 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, - 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x21, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x22, 0xd4, 0x05, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x65, 0x6e, 0x12, - 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, - 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65, - 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x65, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x14, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x65, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, - 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, - 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, - 0x66, 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, - 0x69, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x17, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x0b, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x12, 0x1c, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, - 0x0a, 0x02, 0x69, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, - 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, - 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x12, 0x12, 0x0a, 0x03, - 0x75, 0x72, 0x69, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x69, - 0x12, 0x19, 0x0a, 0x07, 0x75, 0x72, 0x69, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x12, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x00, 0x52, 0x06, 0x75, 0x72, 0x69, 0x52, 0x65, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x40, 0x0a, - 0x10, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x65, - 0x78, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x48, 0x00, 0x52, - 0x0e, 0x77, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, - 0x1c, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x12, 0x21, 0x0a, - 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x1a, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x42, 0x0c, 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x22, 0xe2, - 0x02, 0x0a, 0x0a, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x6f, - 0x6e, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x03, 0x6c, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x12, 0x17, - 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x66, - 0x66, 0x69, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, - 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, - 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x6e, - 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x14, 0x0a, 0x04, - 0x69, 0x70, 0x76, 0x36, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, - 0x76, 0x36, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x22, 0x6b, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, - 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, - 0x5f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, - 0x22, 0x3e, 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, - 0x73, 0x6b, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, - 0x22, 0xb0, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6c, - 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e, - 0x69, 0x71, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0xdc, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1b, 0x0a, - 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x08, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, - 0x5f, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, - 0x6f, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x04, 0x6b, 0x65, 0x79, - 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x4d, 0x0a, 0x08, 0x41, 0x6e, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, - 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, - 0x6e, 0x22, 0xe9, 0x02, 0x0a, 0x0d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, - 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, - 0x2f, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, - 0x12, 0x29, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x6c, - 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x02, 0x67, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x67, 0x74, 0x65, - 0x12, 0x29, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x30, 0x0a, 0x06, 0x6e, - 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x22, 0xf3, 0x02, - 0x0a, 0x0e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x05, - 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x2a, - 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x6c, 0x74, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x02, 0x67, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x67, - 0x74, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x74, 0x5f, 0x6e, 0x6f, 0x77, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x05, 0x6c, 0x74, 0x4e, 0x6f, 0x77, 0x12, 0x15, 0x0a, 0x06, 0x67, 0x74, 0x5f, - 0x6e, 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x67, 0x74, 0x4e, 0x6f, 0x77, - 0x12, 0x31, 0x0a, 0x06, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x77, 0x69, 0x74, - 0x68, 0x69, 0x6e, 0x2a, 0x46, 0x0a, 0x0a, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, - 0x78, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, - 0x0a, 0x10, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x41, - 0x4d, 0x45, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, 0x41, - 0x44, 0x45, 0x52, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x3a, 0x3c, 0x0a, 0x08, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x3a, 0x0a, 0x07, 0x69, 0x67, 0x6e, - 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb0, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x67, - 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x3a, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x64, 0x3a, 0x4a, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x50, 0x0a, - 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, - 0x67, 0x76, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5a, 0x32, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, -} - -var ( - file_validate_validate_proto_rawDescOnce sync.Once - file_validate_validate_proto_rawDescData = file_validate_validate_proto_rawDesc -) - -func file_validate_validate_proto_rawDescGZIP() []byte { - file_validate_validate_proto_rawDescOnce.Do(func() { - file_validate_validate_proto_rawDescData = protoimpl.X.CompressGZIP(file_validate_validate_proto_rawDescData) - }) - return file_validate_validate_proto_rawDescData -} - -var file_validate_validate_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_validate_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 23) -var file_validate_validate_proto_goTypes = []interface{}{ - (KnownRegex)(0), // 0: validate.KnownRegex - (*FieldRules)(nil), // 1: validate.FieldRules - (*FloatRules)(nil), // 2: validate.FloatRules - (*DoubleRules)(nil), // 3: validate.DoubleRules - (*Int32Rules)(nil), // 4: validate.Int32Rules - (*Int64Rules)(nil), // 5: validate.Int64Rules - (*UInt32Rules)(nil), // 6: validate.UInt32Rules - (*UInt64Rules)(nil), // 7: validate.UInt64Rules - (*SInt32Rules)(nil), // 8: validate.SInt32Rules - (*SInt64Rules)(nil), // 9: validate.SInt64Rules - (*Fixed32Rules)(nil), // 10: validate.Fixed32Rules - (*Fixed64Rules)(nil), // 11: validate.Fixed64Rules - (*SFixed32Rules)(nil), // 12: validate.SFixed32Rules - (*SFixed64Rules)(nil), // 13: validate.SFixed64Rules - (*BoolRules)(nil), // 14: validate.BoolRules - (*StringRules)(nil), // 15: validate.StringRules - (*BytesRules)(nil), // 16: validate.BytesRules - (*EnumRules)(nil), // 17: validate.EnumRules - (*MessageRules)(nil), // 18: validate.MessageRules - (*RepeatedRules)(nil), // 19: validate.RepeatedRules - (*MapRules)(nil), // 20: validate.MapRules - (*AnyRules)(nil), // 21: validate.AnyRules - (*DurationRules)(nil), // 22: validate.DurationRules - (*TimestampRules)(nil), // 23: validate.TimestampRules - (*durationpb.Duration)(nil), // 24: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp - (*descriptorpb.MessageOptions)(nil), // 26: google.protobuf.MessageOptions - (*descriptorpb.OneofOptions)(nil), // 27: google.protobuf.OneofOptions - (*descriptorpb.FieldOptions)(nil), // 28: google.protobuf.FieldOptions -} -var file_validate_validate_proto_depIdxs = []int32{ - 18, // 0: validate.FieldRules.message:type_name -> validate.MessageRules - 2, // 1: validate.FieldRules.float:type_name -> validate.FloatRules - 3, // 2: validate.FieldRules.double:type_name -> validate.DoubleRules - 4, // 3: validate.FieldRules.int32:type_name -> validate.Int32Rules - 5, // 4: validate.FieldRules.int64:type_name -> validate.Int64Rules - 6, // 5: validate.FieldRules.uint32:type_name -> validate.UInt32Rules - 7, // 6: validate.FieldRules.uint64:type_name -> validate.UInt64Rules - 8, // 7: validate.FieldRules.sint32:type_name -> validate.SInt32Rules - 9, // 8: validate.FieldRules.sint64:type_name -> validate.SInt64Rules - 10, // 9: validate.FieldRules.fixed32:type_name -> validate.Fixed32Rules - 11, // 10: validate.FieldRules.fixed64:type_name -> validate.Fixed64Rules - 12, // 11: validate.FieldRules.sfixed32:type_name -> validate.SFixed32Rules - 13, // 12: validate.FieldRules.sfixed64:type_name -> validate.SFixed64Rules - 14, // 13: validate.FieldRules.bool:type_name -> validate.BoolRules - 15, // 14: validate.FieldRules.string:type_name -> validate.StringRules - 16, // 15: validate.FieldRules.bytes:type_name -> validate.BytesRules - 17, // 16: validate.FieldRules.enum:type_name -> validate.EnumRules - 19, // 17: validate.FieldRules.repeated:type_name -> validate.RepeatedRules - 20, // 18: validate.FieldRules.map:type_name -> validate.MapRules - 21, // 19: validate.FieldRules.any:type_name -> validate.AnyRules - 22, // 20: validate.FieldRules.duration:type_name -> validate.DurationRules - 23, // 21: validate.FieldRules.timestamp:type_name -> validate.TimestampRules - 0, // 22: validate.StringRules.well_known_regex:type_name -> validate.KnownRegex - 1, // 23: validate.RepeatedRules.items:type_name -> validate.FieldRules - 1, // 24: validate.MapRules.keys:type_name -> validate.FieldRules - 1, // 25: validate.MapRules.values:type_name -> validate.FieldRules - 24, // 26: validate.DurationRules.const:type_name -> google.protobuf.Duration - 24, // 27: validate.DurationRules.lt:type_name -> google.protobuf.Duration - 24, // 28: validate.DurationRules.lte:type_name -> google.protobuf.Duration - 24, // 29: validate.DurationRules.gt:type_name -> google.protobuf.Duration - 24, // 30: validate.DurationRules.gte:type_name -> google.protobuf.Duration - 24, // 31: validate.DurationRules.in:type_name -> google.protobuf.Duration - 24, // 32: validate.DurationRules.not_in:type_name -> google.protobuf.Duration - 25, // 33: validate.TimestampRules.const:type_name -> google.protobuf.Timestamp - 25, // 34: validate.TimestampRules.lt:type_name -> google.protobuf.Timestamp - 25, // 35: validate.TimestampRules.lte:type_name -> google.protobuf.Timestamp - 25, // 36: validate.TimestampRules.gt:type_name -> google.protobuf.Timestamp - 25, // 37: validate.TimestampRules.gte:type_name -> google.protobuf.Timestamp - 24, // 38: validate.TimestampRules.within:type_name -> google.protobuf.Duration - 26, // 39: validate.disabled:extendee -> google.protobuf.MessageOptions - 26, // 40: validate.ignored:extendee -> google.protobuf.MessageOptions - 27, // 41: validate.required:extendee -> google.protobuf.OneofOptions - 28, // 42: validate.rules:extendee -> google.protobuf.FieldOptions - 1, // 43: validate.rules:type_name -> validate.FieldRules - 44, // [44:44] is the sub-list for method output_type - 44, // [44:44] is the sub-list for method input_type - 43, // [43:44] is the sub-list for extension type_name - 39, // [39:43] is the sub-list for extension extendee - 0, // [0:39] is the sub-list for field type_name -} - -func init() { file_validate_validate_proto_init() } -func file_validate_validate_proto_init() { - if File_validate_validate_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_validate_validate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FloatRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoubleRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int32Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int64Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UInt32Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UInt64Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SInt32Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SInt64Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Fixed32Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Fixed64Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SFixed32Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SFixed64Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BoolRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StringRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BytesRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnumRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RepeatedRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MapRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AnyRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DurationRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_validate_validate_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimestampRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_validate_validate_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*FieldRules_Float)(nil), - (*FieldRules_Double)(nil), - (*FieldRules_Int32)(nil), - (*FieldRules_Int64)(nil), - (*FieldRules_Uint32)(nil), - (*FieldRules_Uint64)(nil), - (*FieldRules_Sint32)(nil), - (*FieldRules_Sint64)(nil), - (*FieldRules_Fixed32)(nil), - (*FieldRules_Fixed64)(nil), - (*FieldRules_Sfixed32)(nil), - (*FieldRules_Sfixed64)(nil), - (*FieldRules_Bool)(nil), - (*FieldRules_String_)(nil), - (*FieldRules_Bytes)(nil), - (*FieldRules_Enum)(nil), - (*FieldRules_Repeated)(nil), - (*FieldRules_Map)(nil), - (*FieldRules_Any)(nil), - (*FieldRules_Duration)(nil), - (*FieldRules_Timestamp)(nil), - } - file_validate_validate_proto_msgTypes[14].OneofWrappers = []interface{}{ - (*StringRules_Email)(nil), - (*StringRules_Hostname)(nil), - (*StringRules_Ip)(nil), - (*StringRules_Ipv4)(nil), - (*StringRules_Ipv6)(nil), - (*StringRules_Uri)(nil), - (*StringRules_UriRef)(nil), - (*StringRules_Address)(nil), - (*StringRules_Uuid)(nil), - (*StringRules_WellKnownRegex)(nil), - } - file_validate_validate_proto_msgTypes[15].OneofWrappers = []interface{}{ - (*BytesRules_Ip)(nil), - (*BytesRules_Ipv4)(nil), - (*BytesRules_Ipv6)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_validate_validate_proto_rawDesc, - NumEnums: 1, - NumMessages: 23, - NumExtensions: 4, - NumServices: 0, - }, - GoTypes: file_validate_validate_proto_goTypes, - DependencyIndexes: file_validate_validate_proto_depIdxs, - EnumInfos: file_validate_validate_proto_enumTypes, - MessageInfos: file_validate_validate_proto_msgTypes, - ExtensionInfos: file_validate_validate_proto_extTypes, - }.Build() - File_validate_validate_proto = out.File - file_validate_validate_proto_rawDesc = nil - file_validate_validate_proto_goTypes = nil - file_validate_validate_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto deleted file mode 100644 index 5aa9653938f..00000000000 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto +++ /dev/null @@ -1,862 +0,0 @@ -syntax = "proto2"; -package validate; - -option go_package = "github.com/envoyproxy/protoc-gen-validate/validate"; -option java_package = "io.envoyproxy.pgv.validate"; - -import "google/protobuf/descriptor.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -// Validation rules applied at the message level -extend google.protobuf.MessageOptions { - // Disabled nullifies any validation rules for this message, including any - // message fields associated with it that do support validation. - optional bool disabled = 1071; - // Ignore skips generation of validation methods for this message. - optional bool ignored = 1072; -} - -// Validation rules applied at the oneof level -extend google.protobuf.OneofOptions { - // Required ensures that exactly one the field options in a oneof is set; - // validation fails if no fields in the oneof are set. - optional bool required = 1071; -} - -// Validation rules applied at the field level -extend google.protobuf.FieldOptions { - // Rules specify the validations to be performed on this field. By default, - // no validation is performed against a field. - optional FieldRules rules = 1071; -} - -// FieldRules encapsulates the rules for each type of field. Depending on the -// field, the correct set should be used to ensure proper validations. -message FieldRules { - optional MessageRules message = 17; - oneof type { - // Scalar Field Types - FloatRules float = 1; - DoubleRules double = 2; - Int32Rules int32 = 3; - Int64Rules int64 = 4; - UInt32Rules uint32 = 5; - UInt64Rules uint64 = 6; - SInt32Rules sint32 = 7; - SInt64Rules sint64 = 8; - Fixed32Rules fixed32 = 9; - Fixed64Rules fixed64 = 10; - SFixed32Rules sfixed32 = 11; - SFixed64Rules sfixed64 = 12; - BoolRules bool = 13; - StringRules string = 14; - BytesRules bytes = 15; - - // Complex Field Types - EnumRules enum = 16; - RepeatedRules repeated = 18; - MapRules map = 19; - - // Well-Known Field Types - AnyRules any = 20; - DurationRules duration = 21; - TimestampRules timestamp = 22; - } -} - -// FloatRules describes the constraints applied to `float` values -message FloatRules { - // Const specifies that this field must be exactly the specified value - optional float const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional float lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional float lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional float gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional float gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated float in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated float not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// DoubleRules describes the constraints applied to `double` values -message DoubleRules { - // Const specifies that this field must be exactly the specified value - optional double const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional double lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional double lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional double gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional double gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated double in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated double not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Int32Rules describes the constraints applied to `int32` values -message Int32Rules { - // Const specifies that this field must be exactly the specified value - optional int32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional int32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional int32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional int32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional int32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated int32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Int64Rules describes the constraints applied to `int64` values -message Int64Rules { - // Const specifies that this field must be exactly the specified value - optional int64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional int64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional int64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional int64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional int64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated int64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// UInt32Rules describes the constraints applied to `uint32` values -message UInt32Rules { - // Const specifies that this field must be exactly the specified value - optional uint32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional uint32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional uint32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional uint32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional uint32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated uint32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated uint32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// UInt64Rules describes the constraints applied to `uint64` values -message UInt64Rules { - // Const specifies that this field must be exactly the specified value - optional uint64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional uint64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional uint64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional uint64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional uint64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated uint64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated uint64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SInt32Rules describes the constraints applied to `sint32` values -message SInt32Rules { - // Const specifies that this field must be exactly the specified value - optional sint32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sint32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sint32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sint32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sint32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sint32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sint32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SInt64Rules describes the constraints applied to `sint64` values -message SInt64Rules { - // Const specifies that this field must be exactly the specified value - optional sint64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sint64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sint64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sint64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sint64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sint64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sint64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Fixed32Rules describes the constraints applied to `fixed32` values -message Fixed32Rules { - // Const specifies that this field must be exactly the specified value - optional fixed32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional fixed32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional fixed32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional fixed32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional fixed32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated fixed32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated fixed32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Fixed64Rules describes the constraints applied to `fixed64` values -message Fixed64Rules { - // Const specifies that this field must be exactly the specified value - optional fixed64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional fixed64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional fixed64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional fixed64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional fixed64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated fixed64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated fixed64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SFixed32Rules describes the constraints applied to `sfixed32` values -message SFixed32Rules { - // Const specifies that this field must be exactly the specified value - optional sfixed32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sfixed32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sfixed32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sfixed32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sfixed32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sfixed32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sfixed32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SFixed64Rules describes the constraints applied to `sfixed64` values -message SFixed64Rules { - // Const specifies that this field must be exactly the specified value - optional sfixed64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sfixed64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sfixed64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sfixed64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sfixed64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sfixed64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sfixed64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// BoolRules describes the constraints applied to `bool` values -message BoolRules { - // Const specifies that this field must be exactly the specified value - optional bool const = 1; -} - -// StringRules describe the constraints applied to `string` values -message StringRules { - // Const specifies that this field must be exactly the specified value - optional string const = 1; - - // Len specifies that this field must be the specified number of - // characters (Unicode code points). Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 len = 19; - - // MinLen specifies that this field must be the specified number of - // characters (Unicode code points) at a minimum. Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 min_len = 2; - - // MaxLen specifies that this field must be the specified number of - // characters (Unicode code points) at a maximum. Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 max_len = 3; - - // LenBytes specifies that this field must be the specified number of bytes - optional uint64 len_bytes = 20; - - // MinBytes specifies that this field must be the specified number of bytes - // at a minimum - optional uint64 min_bytes = 4; - - // MaxBytes specifies that this field must be the specified number of bytes - // at a maximum - optional uint64 max_bytes = 5; - - // Pattern specifies that this field must match against the specified - // regular expression (RE2 syntax). The included expression should elide - // any delimiters. - optional string pattern = 6; - - // Prefix specifies that this field must have the specified substring at - // the beginning of the string. - optional string prefix = 7; - - // Suffix specifies that this field must have the specified substring at - // the end of the string. - optional string suffix = 8; - - // Contains specifies that this field must have the specified substring - // anywhere in the string. - optional string contains = 9; - - // NotContains specifies that this field cannot have the specified substring - // anywhere in the string. - optional string not_contains = 23; - - // In specifies that this field must be equal to one of the specified - // values - repeated string in = 10; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated string not_in = 11; - - // WellKnown rules provide advanced constraints against common string - // patterns - oneof well_known { - // Email specifies that the field must be a valid email address as - // defined by RFC 5322 - bool email = 12; - - // Hostname specifies that the field must be a valid hostname as - // defined by RFC 1034. This constraint does not support - // internationalized domain names (IDNs). - bool hostname = 13; - - // Ip specifies that the field must be a valid IP (v4 or v6) address. - // Valid IPv6 addresses should not include surrounding square brackets. - bool ip = 14; - - // Ipv4 specifies that the field must be a valid IPv4 address. - bool ipv4 = 15; - - // Ipv6 specifies that the field must be a valid IPv6 address. Valid - // IPv6 addresses should not include surrounding square brackets. - bool ipv6 = 16; - - // Uri specifies that the field must be a valid, absolute URI as defined - // by RFC 3986 - bool uri = 17; - - // UriRef specifies that the field must be a valid URI as defined by RFC - // 3986 and may be relative or absolute. - bool uri_ref = 18; - - // Address specifies that the field must be either a valid hostname as - // defined by RFC 1034 (which does not support internationalized domain - // names or IDNs), or it can be a valid IP (v4 or v6). - bool address = 21; - - // Uuid specifies that the field must be a valid UUID as defined by - // RFC 4122 - bool uuid = 22; - - // WellKnownRegex specifies a common well known pattern defined as a regex. - KnownRegex well_known_regex = 24; - } - - // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable - // strict header validation. - // By default, this is true, and HTTP header validations are RFC-compliant. - // Setting to false will enable a looser validations that only disallows - // \r\n\0 characters, which can be used to bypass header matching rules. - optional bool strict = 25 [default = true]; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 26; -} - -// WellKnownRegex contain some well-known patterns. -enum KnownRegex { - UNKNOWN = 0; - - // HTTP header name as defined by RFC 7230. - HTTP_HEADER_NAME = 1; - - // HTTP header value as defined by RFC 7230. - HTTP_HEADER_VALUE = 2; -} - -// BytesRules describe the constraints applied to `bytes` values -message BytesRules { - // Const specifies that this field must be exactly the specified value - optional bytes const = 1; - - // Len specifies that this field must be the specified number of bytes - optional uint64 len = 13; - - // MinLen specifies that this field must be the specified number of bytes - // at a minimum - optional uint64 min_len = 2; - - // MaxLen specifies that this field must be the specified number of bytes - // at a maximum - optional uint64 max_len = 3; - - // Pattern specifies that this field must match against the specified - // regular expression (RE2 syntax). The included expression should elide - // any delimiters. - optional string pattern = 4; - - // Prefix specifies that this field must have the specified bytes at the - // beginning of the string. - optional bytes prefix = 5; - - // Suffix specifies that this field must have the specified bytes at the - // end of the string. - optional bytes suffix = 6; - - // Contains specifies that this field must have the specified bytes - // anywhere in the string. - optional bytes contains = 7; - - // In specifies that this field must be equal to one of the specified - // values - repeated bytes in = 8; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated bytes not_in = 9; - - // WellKnown rules provide advanced constraints against common byte - // patterns - oneof well_known { - // Ip specifies that the field must be a valid IP (v4 or v6) address in - // byte format - bool ip = 10; - - // Ipv4 specifies that the field must be a valid IPv4 address in byte - // format - bool ipv4 = 11; - - // Ipv6 specifies that the field must be a valid IPv6 address in byte - // format - bool ipv6 = 12; - } - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 14; -} - -// EnumRules describe the constraints applied to enum values -message EnumRules { - // Const specifies that this field must be exactly the specified value - optional int32 const = 1; - - // DefinedOnly specifies that this field must be only one of the defined - // values for this enum, failing on any undefined value. - optional bool defined_only = 2; - - // In specifies that this field must be equal to one of the specified - // values - repeated int32 in = 3; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int32 not_in = 4; -} - -// MessageRules describe the constraints applied to embedded message values. -// For message-type fields, validation is performed recursively. -message MessageRules { - // Skip specifies that the validation rules of this field should not be - // evaluated - optional bool skip = 1; - - // Required specifies that this field must be set - optional bool required = 2; -} - -// RepeatedRules describe the constraints applied to `repeated` values -message RepeatedRules { - // MinItems specifies that this field must have the specified number of - // items at a minimum - optional uint64 min_items = 1; - - // MaxItems specifies that this field must have the specified number of - // items at a maximum - optional uint64 max_items = 2; - - // Unique specifies that all elements in this field must be unique. This - // constraint is only applicable to scalar and enum types (messages are not - // supported). - optional bool unique = 3; - - // Items specifies the constraints to be applied to each item in the field. - // Repeated message fields will still execute validation against each item - // unless skip is specified here. - optional FieldRules items = 4; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 5; -} - -// MapRules describe the constraints applied to `map` values -message MapRules { - // MinPairs specifies that this field must have the specified number of - // KVs at a minimum - optional uint64 min_pairs = 1; - - // MaxPairs specifies that this field must have the specified number of - // KVs at a maximum - optional uint64 max_pairs = 2; - - // NoSparse specifies values in this field cannot be unset. This only - // applies to map's with message value types. - optional bool no_sparse = 3; - - // Keys specifies the constraints to be applied to each key in the field. - optional FieldRules keys = 4; - - // Values specifies the constraints to be applied to the value of each key - // in the field. Message values will still have their validations evaluated - // unless skip is specified here. - optional FieldRules values = 5; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 6; -} - -// AnyRules describe constraints applied exclusively to the -// `google.protobuf.Any` well-known type -message AnyRules { - // Required specifies that this field must be set - optional bool required = 1; - - // In specifies that this field's `type_url` must be equal to one of the - // specified values. - repeated string in = 2; - - // NotIn specifies that this field's `type_url` must not be equal to any of - // the specified values. - repeated string not_in = 3; -} - -// DurationRules describe the constraints applied exclusively to the -// `google.protobuf.Duration` well-known type -message DurationRules { - // Required specifies that this field must be set - optional bool required = 1; - - // Const specifies that this field must be exactly the specified value - optional google.protobuf.Duration const = 2; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional google.protobuf.Duration lt = 3; - - // Lt specifies that this field must be less than the specified value, - // inclusive - optional google.protobuf.Duration lte = 4; - - // Gt specifies that this field must be greater than the specified value, - // exclusive - optional google.protobuf.Duration gt = 5; - - // Gte specifies that this field must be greater than the specified value, - // inclusive - optional google.protobuf.Duration gte = 6; - - // In specifies that this field must be equal to one of the specified - // values - repeated google.protobuf.Duration in = 7; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated google.protobuf.Duration not_in = 8; -} - -// TimestampRules describe the constraints applied exclusively to the -// `google.protobuf.Timestamp` well-known type -message TimestampRules { - // Required specifies that this field must be set - optional bool required = 1; - - // Const specifies that this field must be exactly the specified value - optional google.protobuf.Timestamp const = 2; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional google.protobuf.Timestamp lt = 3; - - // Lte specifies that this field must be less than the specified value, - // inclusive - optional google.protobuf.Timestamp lte = 4; - - // Gt specifies that this field must be greater than the specified value, - // exclusive - optional google.protobuf.Timestamp gt = 5; - - // Gte specifies that this field must be greater than the specified value, - // inclusive - optional google.protobuf.Timestamp gte = 6; - - // LtNow specifies that this must be less than the current time. LtNow - // can only be used with the Within rule. - optional bool lt_now = 7; - - // GtNow specifies that this must be greater than the current time. GtNow - // can only be used with the Within rule. - optional bool gt_now = 8; - - // Within specifies that this field must be within this duration of the - // current time. This constraint can be used alone or with the LtNow and - // GtNow rules. - optional google.protobuf.Duration within = 9; -} diff --git a/vendor/github.com/evanphx/json-patch/v5/internal/json/decode.go b/vendor/github.com/evanphx/json-patch/v5/internal/json/decode.go new file mode 100644 index 00000000000..e9bb0efe77d --- /dev/null +++ b/vendor/github.com/evanphx/json-patch/v5/internal/json/decode.go @@ -0,0 +1,1385 @@ +// 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 ( + "encoding" + "encoding/base64" + "fmt" + "reflect" + "strconv" + "strings" + "sync" + "unicode" + "unicode/utf16" + "unicode/utf8" +) + +// Unmarshal parses the JSON-encoded data and stores the result +// in the value pointed to by v. If v is nil or not a pointer, +// Unmarshal returns an InvalidUnmarshalError. +// +// 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 value implementing the Unmarshaler interface, +// Unmarshal calls that value's UnmarshalJSON method, including +// when the input is a JSON null. +// Otherwise, if the value implements encoding.TextUnmarshaler +// and the input is a JSON quoted string, Unmarshal calls that value's +// UnmarshalText method with the unquoted form of the string. +// +// 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. By +// default, object keys which don't have a corresponding struct field are +// ignored (see Decoder.DisallowUnknownFields for an alternative). +// +// 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 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. The map's key type must +// either be any string type, an integer, implement json.Unmarshaler, or +// implement encoding.TextUnmarshaler. +// +// If the JSON-encoded data contain a syntax error, Unmarshal returns a SyntaxError. +// +// 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. In any +// case, it's not guaranteed that all the remaining fields following +// the problematic one will be unmarshaled into the target object. +// +// 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 any) error { + // Check for well-formedness. + // Avoids filling out half a data structure + // before discovering a JSON syntax error. + d := ds.Get().(*decodeState) + defer ds.Put(d) + //var d decodeState + d.useNumber = true + err := checkValid(data, &d.scan) + if err != nil { + return err + } + + d.init(data) + return d.unmarshal(v) +} + +var ds = sync.Pool{ + New: func() any { + return new(decodeState) + }, +} + +func UnmarshalWithKeys(data []byte, v any) ([]string, error) { + // Check for well-formedness. + // Avoids filling out half a data structure + // before discovering a JSON syntax error. + + d := ds.Get().(*decodeState) + defer ds.Put(d) + //var d decodeState + d.useNumber = true + err := checkValid(data, &d.scan) + if err != nil { + return nil, err + } + + d.init(data) + err = d.unmarshal(v) + if err != nil { + return nil, err + } + + return d.lastKeys, nil +} + +func UnmarshalValid(data []byte, v any) error { + // Check for well-formedness. + // Avoids filling out half a data structure + // before discovering a JSON syntax error. + d := ds.Get().(*decodeState) + defer ds.Put(d) + //var d decodeState + d.useNumber = true + + d.init(data) + return d.unmarshal(v) +} + +func UnmarshalValidWithKeys(data []byte, v any) ([]string, error) { + // Check for well-formedness. + // Avoids filling out half a data structure + // before discovering a JSON syntax error. + + d := ds.Get().(*decodeState) + defer ds.Put(d) + //var d decodeState + d.useNumber = true + + d.init(data) + err := d.unmarshal(v) + if err != nil { + return nil, err + } + + return d.lastKeys, nil +} + +// Unmarshaler is the interface implemented by types +// 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. +// +// By convention, to approximate the behavior of Unmarshal itself, +// Unmarshalers implement UnmarshalJSON([]byte("null")) as a no-op. +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 + Struct string // name of the struct type containing the field + Field string // the full path from root node to the field +} + +func (e *UnmarshalTypeError) Error() string { + if e.Struct != "" || e.Field != "" { + return "json: cannot unmarshal " + e.Value + " into Go struct field " + e.Struct + "." + e.Field + " of type " + e.Type.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. +// +// Deprecated: 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.Pointer { + return "json: Unmarshal(non-pointer " + e.Type.String() + ")" + } + return "json: Unmarshal(nil " + e.Type.String() + ")" +} + +func (d *decodeState) unmarshal(v any) error { + rv := reflect.ValueOf(v) + if rv.Kind() != reflect.Pointer || rv.IsNil() { + return &InvalidUnmarshalError{reflect.TypeOf(v)} + } + + d.scan.reset() + d.scanWhile(scanSkipSpace) + // We decode rv not rv.Elem because the Unmarshaler interface + // test must be applied at the top level of the value. + err := d.value(rv) + if err != nil { + return d.addErrorContext(err) + } + 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) +} + +// An errorContext provides context for type errors during decoding. +type errorContext struct { + Struct reflect.Type + FieldStack []string +} + +// decodeState represents the state while decoding a JSON value. +type decodeState struct { + data []byte + off int // next read offset in data + opcode int // last read result + scan scanner + errorContext *errorContext + savedError error + useNumber bool + disallowUnknownFields bool + lastKeys []string +} + +// readIndex returns the position of the last byte read. +func (d *decodeState) readIndex() int { + return d.off - 1 +} + +// phasePanicMsg is used as a panic message when we end up with something that +// shouldn't happen. It can indicate a bug in the JSON decoder, or that +// something is editing the data slice while the decoder executes. +const phasePanicMsg = "JSON decoder out of sync - data changing underfoot?" + +func (d *decodeState) init(data []byte) *decodeState { + d.data = data + d.off = 0 + d.savedError = nil + if d.errorContext != nil { + d.errorContext.Struct = nil + // Reuse the allocated space for the FieldStack slice. + d.errorContext.FieldStack = d.errorContext.FieldStack[:0] + } + return d +} + +// 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 = d.addErrorContext(err) + } +} + +// addErrorContext returns a new error enhanced with information from d.errorContext +func (d *decodeState) addErrorContext(err error) error { + if d.errorContext != nil && (d.errorContext.Struct != nil || len(d.errorContext.FieldStack) > 0) { + switch err := err.(type) { + case *UnmarshalTypeError: + err.Struct = d.errorContext.Struct.Name() + err.Field = strings.Join(d.errorContext.FieldStack, ".") + } + } + return err +} + +// skip scans to the end of what was started. +func (d *decodeState) skip() { + s, data, i := &d.scan, d.data, d.off + depth := len(s.parseState) + for { + op := s.step(s, data[i]) + i++ + if len(s.parseState) < depth { + d.off = i + d.opcode = op + return + } + } +} + +// scanNext processes the byte at d.data[d.off]. +func (d *decodeState) scanNext() { + if d.off < len(d.data) { + d.opcode = d.scan.step(&d.scan, d.data[d.off]) + d.off++ + } else { + d.opcode = d.scan.eof() + d.off = len(d.data) + 1 // mark processed EOF with len+1 + } +} + +// scanWhile processes bytes in d.data[d.off:] until it +// receives a scan code not equal to op. +func (d *decodeState) scanWhile(op int) { + s, data, i := &d.scan, d.data, d.off + for i < len(data) { + newOp := s.step(s, data[i]) + i++ + if newOp != op { + d.opcode = newOp + d.off = i + return + } + } + + d.off = len(data) + 1 // mark processed EOF with len+1 + d.opcode = d.scan.eof() +} + +// rescanLiteral is similar to scanWhile(scanContinue), but it specialises the +// common case where we're decoding a literal. The decoder scans the input +// twice, once for syntax errors and to check the length of the value, and the +// second to perform the decoding. +// +// Only in the second step do we use decodeState to tokenize literals, so we +// know there aren't any syntax errors. We can take advantage of that knowledge, +// and scan a literal's bytes much more quickly. +func (d *decodeState) rescanLiteral() { + data, i := d.data, d.off +Switch: + switch data[i-1] { + case '"': // string + for ; i < len(data); i++ { + switch data[i] { + case '\\': + i++ // escaped char + case '"': + i++ // tokenize the closing quote too + break Switch + } + } + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-': // number + for ; i < len(data); i++ { + switch data[i] { + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '.', 'e', 'E', '+', '-': + default: + break Switch + } + } + case 't': // true + i += len("rue") + case 'f': // false + i += len("alse") + case 'n': // null + i += len("ull") + } + if i < len(data) { + d.opcode = stateEndValue(&d.scan, data[i]) + } else { + d.opcode = scanEnd + } + d.off = i + 1 +} + +// value consumes a JSON value from d.data[d.off-1:], decoding into v, and +// reads the following byte ahead. If v is invalid, the value is discarded. +// The first byte of the value has been read already. +func (d *decodeState) value(v reflect.Value) error { + switch d.opcode { + default: + panic(phasePanicMsg) + + case scanBeginArray: + if v.IsValid() { + if err := d.array(v); err != nil { + return err + } + } else { + d.skip() + } + d.scanNext() + + case scanBeginObject: + if v.IsValid() { + if err := d.object(v); err != nil { + return err + } + } else { + d.skip() + } + d.scanNext() + + case scanBeginLiteral: + // All bytes inside literal return scanContinue op code. + start := d.readIndex() + d.rescanLiteral() + + if v.IsValid() { + if err := d.literalStore(d.data[start:d.readIndex()], v, false); err != nil { + return err + } + } + } + return nil +} + +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() any { + switch d.opcode { + default: + panic(phasePanicMsg) + + case scanBeginArray, scanBeginObject: + d.skip() + d.scanNext() + + case scanBeginLiteral: + v := d.literalInterface() + switch v.(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 first settable pointer so it +// can be set to nil. +func indirect(v reflect.Value, decodingNull bool) (Unmarshaler, encoding.TextUnmarshaler, reflect.Value) { + // Issue #24153 indicates that it is generally not a guaranteed property + // that you may round-trip a reflect.Value by calling Value.Addr().Elem() + // and expect the value to still be settable for values derived from + // unexported embedded struct fields. + // + // The logic below effectively does this when it first addresses the value + // (to satisfy possible pointer methods) and continues to dereference + // subsequent pointers as necessary. + // + // After the first round-trip, we set v back to the original value to + // preserve the original RW flags contained in reflect.Value. + v0 := v + haveAddr := false + + // 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.Pointer && v.Type().Name() != "" && v.CanAddr() { + haveAddr = true + 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.Pointer && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Pointer) { + haveAddr = false + v = e + continue + } + } + + if v.Kind() != reflect.Pointer { + break + } + + if decodingNull && v.CanSet() { + break + } + + // Prevent infinite loop if v is an interface pointing to its own address: + // var v interface{} + // v = &v + if v.Elem().Kind() == reflect.Interface && v.Elem().Elem() == v { + v = v.Elem() + break + } + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + if v.Type().NumMethod() > 0 && v.CanInterface() { + if u, ok := v.Interface().(Unmarshaler); ok { + return u, nil, reflect.Value{} + } + if !decodingNull { + if u, ok := v.Interface().(encoding.TextUnmarshaler); ok { + return nil, u, reflect.Value{} + } + } + } + + if haveAddr { + v = v0 // restore original value after round-trip Value.Addr().Elem() + haveAddr = false + } else { + v = v.Elem() + } + } + return nil, nil, v +} + +// array consumes an array from d.data[d.off-1:], decoding into v. +// The first byte of the array ('[') has been read already. +func (d *decodeState) array(v reflect.Value) error { + // Check for unmarshaler. + u, ut, pv := indirect(v, false) + if u != nil { + start := d.readIndex() + d.skip() + return u.UnmarshalJSON(d.data[start:d.off]) + } + if ut != nil { + d.saveError(&UnmarshalTypeError{Value: "array", Type: v.Type(), Offset: int64(d.off)}) + d.skip() + return nil + } + 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. + ai := d.arrayInterface() + v.Set(reflect.ValueOf(ai)) + return nil + } + // Otherwise it's invalid. + fallthrough + default: + d.saveError(&UnmarshalTypeError{Value: "array", Type: v.Type(), Offset: int64(d.off)}) + d.skip() + return nil + case reflect.Array, reflect.Slice: + break + } + + i := 0 + for { + // Look ahead for ] - can only happen on first iteration. + d.scanWhile(scanSkipSpace) + if d.opcode == scanEndArray { + break + } + + // 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. + if err := d.value(v.Index(i)); err != nil { + return err + } + } else { + // Ran out of fixed array: skip. + if err := d.value(reflect.Value{}); err != nil { + return err + } + } + i++ + + // Next token must be , or ]. + if d.opcode == scanSkipSpace { + d.scanWhile(scanSkipSpace) + } + if d.opcode == scanEndArray { + break + } + if d.opcode != scanArrayValue { + panic(phasePanicMsg) + } + } + + 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)) + } + return nil +} + +var nullLiteral = []byte("null") +var textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() + +// object consumes an object from d.data[d.off-1:], decoding into v. +// The first byte ('{') of the object has been read already. +func (d *decodeState) object(v reflect.Value) error { + // Check for unmarshaler. + u, ut, pv := indirect(v, false) + if u != nil { + start := d.readIndex() + d.skip() + return u.UnmarshalJSON(d.data[start:d.off]) + } + if ut != nil { + d.saveError(&UnmarshalTypeError{Value: "object", Type: v.Type(), Offset: int64(d.off)}) + d.skip() + return nil + } + v = pv + t := v.Type() + + // Decoding into nil interface? Switch to non-reflect code. + if v.Kind() == reflect.Interface && v.NumMethod() == 0 { + oi := d.objectInterface() + v.Set(reflect.ValueOf(oi)) + return nil + } + + var fields structFields + + // Check type of target: + // struct or + // map[T1]T2 where T1 is string, an integer type, + // or an encoding.TextUnmarshaler + switch v.Kind() { + case reflect.Map: + // Map key must either have string kind, have an integer kind, + // or be an encoding.TextUnmarshaler. + switch t.Key().Kind() { + case reflect.String, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + default: + if !reflect.PointerTo(t.Key()).Implements(textUnmarshalerType) { + d.saveError(&UnmarshalTypeError{Value: "object", Type: t, Offset: int64(d.off)}) + d.skip() + return nil + } + } + if v.IsNil() { + v.Set(reflect.MakeMap(t)) + } + case reflect.Struct: + fields = cachedTypeFields(t) + // ok + default: + d.saveError(&UnmarshalTypeError{Value: "object", Type: t, Offset: int64(d.off)}) + d.skip() + return nil + } + + var mapElem reflect.Value + var origErrorContext errorContext + if d.errorContext != nil { + origErrorContext = *d.errorContext + } + + var keys []string + + for { + // Read opening " of string key or closing }. + d.scanWhile(scanSkipSpace) + if d.opcode == scanEndObject { + // closing } - can only happen on first iteration. + break + } + if d.opcode != scanBeginLiteral { + panic(phasePanicMsg) + } + + // Read key. + start := d.readIndex() + d.rescanLiteral() + item := d.data[start:d.readIndex()] + key, ok := unquoteBytes(item) + if !ok { + panic(phasePanicMsg) + } + + keys = append(keys, string(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 := t.Elem() + if !mapElem.IsValid() { + mapElem = reflect.New(elemType).Elem() + } else { + mapElem.Set(reflect.Zero(elemType)) + } + subv = mapElem + } else { + var f *field + if i, ok := fields.nameIndex[string(key)]; ok { + // Found an exact name match. + f = &fields.list[i] + } else { + // Fall back to the expensive case-insensitive + // linear search. + for i := range fields.list { + ff := &fields.list[i] + if ff.equalFold(ff.nameBytes, key) { + f = ff + break + } + } + } + if f != nil { + subv = v + destring = f.quoted + for _, i := range f.index { + if subv.Kind() == reflect.Pointer { + if subv.IsNil() { + // If a struct embeds a pointer to an unexported type, + // it is not possible to set a newly allocated value + // since the field is unexported. + // + // See https://golang.org/issue/21357 + if !subv.CanSet() { + d.saveError(fmt.Errorf("json: cannot set embedded pointer to unexported struct: %v", subv.Type().Elem())) + // Invalidate subv to ensure d.value(subv) skips over + // the JSON value without assigning it to subv. + subv = reflect.Value{} + destring = false + break + } + subv.Set(reflect.New(subv.Type().Elem())) + } + subv = subv.Elem() + } + subv = subv.Field(i) + } + if d.errorContext == nil { + d.errorContext = new(errorContext) + } + d.errorContext.FieldStack = append(d.errorContext.FieldStack, f.name) + d.errorContext.Struct = t + } else if d.disallowUnknownFields { + d.saveError(fmt.Errorf("json: unknown field %q", key)) + } + } + + // Read : before value. + if d.opcode == scanSkipSpace { + d.scanWhile(scanSkipSpace) + } + if d.opcode != scanObjectKey { + panic(phasePanicMsg) + } + d.scanWhile(scanSkipSpace) + + if destring { + switch qv := d.valueQuoted().(type) { + case nil: + if err := d.literalStore(nullLiteral, subv, false); err != nil { + return err + } + case string: + if err := d.literalStore([]byte(qv), subv, true); err != nil { + return err + } + default: + d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal unquoted value into %v", subv.Type())) + } + } else { + if err := d.value(subv); err != nil { + return err + } + } + + // Write value back to map; + // if using struct, subv points into struct already. + if v.Kind() == reflect.Map { + kt := t.Key() + var kv reflect.Value + switch { + case reflect.PointerTo(kt).Implements(textUnmarshalerType): + kv = reflect.New(kt) + if err := d.literalStore(item, kv, true); err != nil { + return err + } + kv = kv.Elem() + case kt.Kind() == reflect.String: + kv = reflect.ValueOf(key).Convert(kt) + default: + switch kt.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + s := string(key) + n, err := strconv.ParseInt(s, 10, 64) + if err != nil || reflect.Zero(kt).OverflowInt(n) { + d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: kt, Offset: int64(start + 1)}) + break + } + kv = reflect.ValueOf(n).Convert(kt) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + s := string(key) + n, err := strconv.ParseUint(s, 10, 64) + if err != nil || reflect.Zero(kt).OverflowUint(n) { + d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: kt, Offset: int64(start + 1)}) + break + } + kv = reflect.ValueOf(n).Convert(kt) + default: + panic("json: Unexpected key type") // should never occur + } + } + if kv.IsValid() { + v.SetMapIndex(kv, subv) + } + } + + // Next token must be , or }. + if d.opcode == scanSkipSpace { + d.scanWhile(scanSkipSpace) + } + if d.errorContext != nil { + // Reset errorContext to its original state. + // Keep the same underlying array for FieldStack, to reuse the + // space and avoid unnecessary allocs. + d.errorContext.FieldStack = d.errorContext.FieldStack[:len(origErrorContext.FieldStack)] + d.errorContext.Struct = origErrorContext.Struct + } + if d.opcode == scanEndObject { + break + } + if d.opcode != scanObjectValue { + panic(phasePanicMsg) + } + } + + if v.Kind() == reflect.Map { + d.lastKeys = keys + } + return nil +} + +// 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) (any, error) { + if d.useNumber { + return Number(s), nil + } + f, err := strconv.ParseFloat(s, 64) + if err != nil { + return nil, &UnmarshalTypeError{Value: "number " + s, Type: reflect.TypeOf(0.0), Offset: 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) error { + // 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 nil + } + isNull := item[0] == 'n' // null + u, ut, pv := indirect(v, isNull) + if u != nil { + return u.UnmarshalJSON(item) + } + 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())) + return nil + } + val := "number" + switch item[0] { + case 'n': + val = "null" + case 't', 'f': + val = "bool" + } + d.saveError(&UnmarshalTypeError{Value: val, Type: v.Type(), Offset: int64(d.readIndex())}) + return nil + } + s, ok := unquoteBytes(item) + if !ok { + if fromQuoted { + return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()) + } + panic(phasePanicMsg) + } + return ut.UnmarshalText(s) + } + + v = pv + + switch c := item[0]; c { + case 'n': // null + // The main parser checks that only true and false can reach here, + // but if this was a quoted string input, it could be anything. + if fromQuoted && string(item) != "null" { + d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())) + break + } + switch v.Kind() { + case reflect.Interface, reflect.Pointer, reflect.Map, reflect.Slice: + v.Set(reflect.Zero(v.Type())) + // otherwise, ignore null for primitives/string + } + case 't', 'f': // true, false + value := item[0] == 't' + // The main parser checks that only true and false can reach here, + // but if this was a quoted string input, it could be anything. + if fromQuoted && string(item) != "true" && string(item) != "false" { + d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())) + break + } + 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{Value: "bool", Type: v.Type(), Offset: int64(d.readIndex())}) + } + case reflect.Bool: + v.SetBool(value) + case reflect.Interface: + if v.NumMethod() == 0 { + v.Set(reflect.ValueOf(value)) + } else { + d.saveError(&UnmarshalTypeError{Value: "bool", Type: v.Type(), Offset: int64(d.readIndex())}) + } + } + + case '"': // string + s, ok := unquoteBytes(item) + if !ok { + if fromQuoted { + return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()) + } + panic(phasePanicMsg) + } + switch v.Kind() { + default: + d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())}) + case reflect.Slice: + if v.Type().Elem().Kind() != reflect.Uint8 { + d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())}) + 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: + if v.Type() == numberType && !isValidNumber(string(s)) { + return fmt.Errorf("json: invalid number literal, trying to unmarshal %q into Number", item) + } + v.SetString(string(s)) + case reflect.Interface: + if v.NumMethod() == 0 { + v.Set(reflect.ValueOf(string(s))) + } else { + d.saveError(&UnmarshalTypeError{Value: "string", Type: v.Type(), Offset: int64(d.readIndex())}) + } + } + + default: // number + if c != '-' && (c < '0' || c > '9') { + if fromQuoted { + return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()) + } + panic(phasePanicMsg) + } + s := string(item) + switch v.Kind() { + default: + if v.Kind() == reflect.String && v.Type() == numberType { + // s must be a valid number, because it's + // already been tokenized. + v.SetString(s) + break + } + if fromQuoted { + return fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()) + } + d.saveError(&UnmarshalTypeError{Value: "number", Type: v.Type(), Offset: int64(d.readIndex())}) + case reflect.Interface: + n, err := d.convertNumber(s) + if err != nil { + d.saveError(err) + break + } + if v.NumMethod() != 0 { + d.saveError(&UnmarshalTypeError{Value: "number", Type: v.Type(), Offset: int64(d.readIndex())}) + 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{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())}) + 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{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())}) + 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{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())}) + break + } + v.SetFloat(n) + } + } + return nil +} + +// 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() (val any) { + switch d.opcode { + default: + panic(phasePanicMsg) + case scanBeginArray: + val = d.arrayInterface() + d.scanNext() + case scanBeginObject: + val = d.objectInterface() + d.scanNext() + case scanBeginLiteral: + val = d.literalInterface() + } + return +} + +// arrayInterface is like array but returns []interface{}. +func (d *decodeState) arrayInterface() []any { + var v = make([]any, 0) + for { + // Look ahead for ] - can only happen on first iteration. + d.scanWhile(scanSkipSpace) + if d.opcode == scanEndArray { + break + } + + v = append(v, d.valueInterface()) + + // Next token must be , or ]. + if d.opcode == scanSkipSpace { + d.scanWhile(scanSkipSpace) + } + if d.opcode == scanEndArray { + break + } + if d.opcode != scanArrayValue { + panic(phasePanicMsg) + } + } + return v +} + +// objectInterface is like object but returns map[string]interface{}. +func (d *decodeState) objectInterface() map[string]any { + m := make(map[string]any) + for { + // Read opening " of string key or closing }. + d.scanWhile(scanSkipSpace) + if d.opcode == scanEndObject { + // closing } - can only happen on first iteration. + break + } + if d.opcode != scanBeginLiteral { + panic(phasePanicMsg) + } + + // Read string key. + start := d.readIndex() + d.rescanLiteral() + item := d.data[start:d.readIndex()] + key, ok := unquote(item) + if !ok { + panic(phasePanicMsg) + } + + // Read : before value. + if d.opcode == scanSkipSpace { + d.scanWhile(scanSkipSpace) + } + if d.opcode != scanObjectKey { + panic(phasePanicMsg) + } + d.scanWhile(scanSkipSpace) + + // Read value. + m[key] = d.valueInterface() + + // Next token must be , or }. + if d.opcode == scanSkipSpace { + d.scanWhile(scanSkipSpace) + } + if d.opcode == scanEndObject { + break + } + if d.opcode != scanObjectValue { + panic(phasePanicMsg) + } + } + return m +} + +// literalInterface consumes and returns a literal from d.data[d.off-1:] and +// it reads the following byte ahead. The first byte of the literal has been +// read already (that's how the caller knows it's a literal). +func (d *decodeState) literalInterface() any { + // All bytes inside literal return scanContinue op code. + start := d.readIndex() + d.rescanLiteral() + + item := d.data[start:d.readIndex()] + + 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 { + panic(phasePanicMsg) + } + return s + + default: // number + if c != '-' && (c < '0' || c > '9') { + panic(phasePanicMsg) + } + 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 + } + var r rune + for _, c := range s[2:6] { + switch { + case '0' <= c && c <= '9': + c = c - '0' + case 'a' <= c && c <= 'f': + c = c - 'a' + 10 + case 'A' <= c && c <= 'F': + c = c - 'A' + 10 + default: + return -1 + } + r = r*16 + rune(c) + } + return 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/github.com/evanphx/json-patch/v5/internal/json/encode.go b/vendor/github.com/evanphx/json-patch/v5/internal/json/encode.go new file mode 100644 index 00000000000..2e6eca44878 --- /dev/null +++ b/vendor/github.com/evanphx/json-patch/v5/internal/json/encode.go @@ -0,0 +1,1486 @@ +// 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 as defined in +// RFC 7159. The mapping between JSON 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" + "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 and encodes the result as a JSON string. +// 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. +// So that the JSON will be safe to embed inside HTML - - - - - -` -) diff --git a/vendor/github.com/go-openapi/runtime/middleware/redoc.go b/vendor/github.com/go-openapi/runtime/middleware/redoc.go deleted file mode 100644 index ca1d4edca9a..00000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/redoc.go +++ /dev/null @@ -1,103 +0,0 @@ -//nolint:dupl -package middleware - -import ( - "bytes" - "fmt" - "html/template" - "net/http" - "path" -) - -// RedocOpts configures the Redoc middlewares -type RedocOpts struct { - // BasePath for the UI path, defaults to: / - BasePath string - // Path combines with BasePath for the full UI path, defaults to: docs - Path string - // SpecURL the url to find the spec for - SpecURL string - // RedocURL for the js that generates the redoc site, defaults to: https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js - RedocURL string - // Title for the documentation site, default to: API documentation - Title string -} - -// EnsureDefaults in case some options are missing -func (r *RedocOpts) EnsureDefaults() { - if r.BasePath == "" { - r.BasePath = "/" - } - if r.Path == "" { - r.Path = defaultDocsPath - } - if r.SpecURL == "" { - r.SpecURL = defaultDocsURL - } - if r.RedocURL == "" { - r.RedocURL = redocLatest - } - if r.Title == "" { - r.Title = defaultDocsTitle - } -} - -// Redoc creates a middleware to serve a documentation site for a swagger spec. -// This allows for altering the spec before starting the http listener. -func Redoc(opts RedocOpts, next http.Handler) http.Handler { - opts.EnsureDefaults() - - pth := path.Join(opts.BasePath, opts.Path) - tmpl := template.Must(template.New("redoc").Parse(redocTemplate)) - - buf := bytes.NewBuffer(nil) - _ = tmpl.Execute(buf, opts) - b := buf.Bytes() - - return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { - if r.URL.Path == pth { - rw.Header().Set("Content-Type", "text/html; charset=utf-8") - rw.WriteHeader(http.StatusOK) - - _, _ = rw.Write(b) - return - } - - if next == nil { - rw.Header().Set("Content-Type", "text/plain") - rw.WriteHeader(http.StatusNotFound) - _, _ = rw.Write([]byte(fmt.Sprintf("%q not found", pth))) - return - } - next.ServeHTTP(rw, r) - }) -} - -const ( - redocLatest = "https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js" - redocTemplate = ` - - - {{ .Title }} - - - - - - - - - - - - - -` -) diff --git a/vendor/github.com/go-openapi/runtime/middleware/request.go b/vendor/github.com/go-openapi/runtime/middleware/request.go deleted file mode 100644 index d4b9fc6a29c..00000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/request.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package middleware - -import ( - "net/http" - "reflect" - - "github.com/go-openapi/errors" - "github.com/go-openapi/spec" - "github.com/go-openapi/strfmt" - - "github.com/go-openapi/runtime" -) - -// UntypedRequestBinder binds and validates the data from a http request -type UntypedRequestBinder struct { - Spec *spec.Swagger - Parameters map[string]spec.Parameter - Formats strfmt.Registry - paramBinders map[string]*untypedParamBinder -} - -// NewUntypedRequestBinder creates a new binder for reading a request. -func NewUntypedRequestBinder(parameters map[string]spec.Parameter, spec *spec.Swagger, formats strfmt.Registry) *UntypedRequestBinder { - binders := make(map[string]*untypedParamBinder) - for fieldName, param := range parameters { - binders[fieldName] = newUntypedParamBinder(param, spec, formats) - } - return &UntypedRequestBinder{ - Parameters: parameters, - paramBinders: binders, - Spec: spec, - Formats: formats, - } -} - -// Bind perform the databinding and validation -func (o *UntypedRequestBinder) Bind(request *http.Request, routeParams RouteParams, consumer runtime.Consumer, data interface{}) error { - val := reflect.Indirect(reflect.ValueOf(data)) - isMap := val.Kind() == reflect.Map - var result []error - debugLog("binding %d parameters for %s %s", len(o.Parameters), request.Method, request.URL.EscapedPath()) - for fieldName, param := range o.Parameters { - binder := o.paramBinders[fieldName] - debugLog("binding parameter %s for %s %s", fieldName, request.Method, request.URL.EscapedPath()) - var target reflect.Value - if !isMap { - binder.Name = fieldName - target = val.FieldByName(fieldName) - } - - if isMap { - tpe := binder.Type() - if tpe == nil { - if param.Schema.Type.Contains(typeArray) { - tpe = reflect.TypeOf([]interface{}{}) - } else { - tpe = reflect.TypeOf(map[string]interface{}{}) - } - } - target = reflect.Indirect(reflect.New(tpe)) - } - - if !target.IsValid() { - result = append(result, errors.New(500, "parameter name %q is an unknown field", binder.Name)) - continue - } - - if err := binder.Bind(request, routeParams, consumer, target); err != nil { - result = append(result, err) - continue - } - - if binder.validator != nil { - rr := binder.validator.Validate(target.Interface()) - if rr != nil && rr.HasErrors() { - result = append(result, rr.AsError()) - } - } - - if isMap { - val.SetMapIndex(reflect.ValueOf(param.Name), target) - } - } - - if len(result) > 0 { - return errors.CompositeValidationError(result...) - } - - return nil -} diff --git a/vendor/github.com/go-openapi/runtime/middleware/router.go b/vendor/github.com/go-openapi/runtime/middleware/router.go deleted file mode 100644 index 46b8f87cc72..00000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/router.go +++ /dev/null @@ -1,488 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package middleware - -import ( - "fmt" - "net/http" - fpath "path" - "regexp" - "strings" - - "github.com/go-openapi/runtime/security" - "github.com/go-openapi/swag" - - "github.com/go-openapi/analysis" - "github.com/go-openapi/errors" - "github.com/go-openapi/loads" - "github.com/go-openapi/spec" - "github.com/go-openapi/strfmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware/denco" -) - -// RouteParam is a object to capture route params in a framework agnostic way. -// implementations of the muxer should use these route params to communicate with the -// swagger framework -type RouteParam struct { - Name string - Value string -} - -// RouteParams the collection of route params -type RouteParams []RouteParam - -// Get gets the value for the route param for the specified key -func (r RouteParams) Get(name string) string { - vv, _, _ := r.GetOK(name) - if len(vv) > 0 { - return vv[len(vv)-1] - } - return "" -} - -// GetOK gets the value but also returns booleans to indicate if a key or value -// is present. This aids in validation and satisfies an interface in use there -// -// The returned values are: data, has key, has value -func (r RouteParams) GetOK(name string) ([]string, bool, bool) { - for _, p := range r { - if p.Name == name { - return []string{p.Value}, true, p.Value != "" - } - } - return nil, false, false -} - -// NewRouter creates a new context aware router middleware -func NewRouter(ctx *Context, next http.Handler) http.Handler { - if ctx.router == nil { - ctx.router = DefaultRouter(ctx.spec, ctx.api) - } - - return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { - if _, rCtx, ok := ctx.RouteInfo(r); ok { - next.ServeHTTP(rw, rCtx) - return - } - - // Not found, check if it exists in the other methods first - if others := ctx.AllowedMethods(r); len(others) > 0 { - ctx.Respond(rw, r, ctx.analyzer.RequiredProduces(), nil, errors.MethodNotAllowed(r.Method, others)) - return - } - - ctx.Respond(rw, r, ctx.analyzer.RequiredProduces(), nil, errors.NotFound("path %s was not found", r.URL.EscapedPath())) - }) -} - -// RoutableAPI represents an interface for things that can serve -// as a provider of implementations for the swagger router -type RoutableAPI interface { - HandlerFor(string, string) (http.Handler, bool) - ServeErrorFor(string) func(http.ResponseWriter, *http.Request, error) - ConsumersFor([]string) map[string]runtime.Consumer - ProducersFor([]string) map[string]runtime.Producer - AuthenticatorsFor(map[string]spec.SecurityScheme) map[string]runtime.Authenticator - Authorizer() runtime.Authorizer - Formats() strfmt.Registry - DefaultProduces() string - DefaultConsumes() string -} - -// Router represents a swagger aware router -type Router interface { - Lookup(method, path string) (*MatchedRoute, bool) - OtherMethods(method, path string) []string -} - -type defaultRouteBuilder struct { - spec *loads.Document - analyzer *analysis.Spec - api RoutableAPI - records map[string][]denco.Record -} - -type defaultRouter struct { - spec *loads.Document - routers map[string]*denco.Router -} - -func newDefaultRouteBuilder(spec *loads.Document, api RoutableAPI) *defaultRouteBuilder { - return &defaultRouteBuilder{ - spec: spec, - analyzer: analysis.New(spec.Spec()), - api: api, - records: make(map[string][]denco.Record), - } -} - -// DefaultRouter creates a default implemenation of the router -func DefaultRouter(spec *loads.Document, api RoutableAPI) Router { - builder := newDefaultRouteBuilder(spec, api) - if spec != nil { - for method, paths := range builder.analyzer.Operations() { - for path, operation := range paths { - fp := fpath.Join(spec.BasePath(), path) - debugLog("adding route %s %s %q", method, fp, operation.ID) - builder.AddRoute(method, fp, operation) - } - } - } - return builder.Build() -} - -// RouteAuthenticator is an authenticator that can compose several authenticators together. -// It also knows when it contains an authenticator that allows for anonymous pass through. -// Contains a group of 1 or more authenticators that have a logical AND relationship -type RouteAuthenticator struct { - Authenticator map[string]runtime.Authenticator - Schemes []string - Scopes map[string][]string - allScopes []string - commonScopes []string - allowAnonymous bool -} - -func (ra *RouteAuthenticator) AllowsAnonymous() bool { - return ra.allowAnonymous -} - -// AllScopes returns a list of unique scopes that is the combination -// of all the scopes in the requirements -func (ra *RouteAuthenticator) AllScopes() []string { - return ra.allScopes -} - -// CommonScopes returns a list of unique scopes that are common in all the -// scopes in the requirements -func (ra *RouteAuthenticator) CommonScopes() []string { - return ra.commonScopes -} - -// Authenticate Authenticator interface implementation -func (ra *RouteAuthenticator) Authenticate(req *http.Request, route *MatchedRoute) (bool, interface{}, error) { - if ra.allowAnonymous { - route.Authenticator = ra - return true, nil, nil - } - // iterate in proper order - var lastResult interface{} - for _, scheme := range ra.Schemes { - if authenticator, ok := ra.Authenticator[scheme]; ok { - applies, princ, err := authenticator.Authenticate(&security.ScopedAuthRequest{ - Request: req, - RequiredScopes: ra.Scopes[scheme], - }) - if !applies { - return false, nil, nil - } - if err != nil { - route.Authenticator = ra - return true, nil, err - } - lastResult = princ - } - } - route.Authenticator = ra - return true, lastResult, nil -} - -func stringSliceUnion(slices ...[]string) []string { - unique := make(map[string]struct{}) - var result []string - for _, slice := range slices { - for _, entry := range slice { - if _, ok := unique[entry]; ok { - continue - } - unique[entry] = struct{}{} - result = append(result, entry) - } - } - return result -} - -func stringSliceIntersection(slices ...[]string) []string { - unique := make(map[string]int) - var intersection []string - - total := len(slices) - var emptyCnt int - for _, slice := range slices { - if len(slice) == 0 { - emptyCnt++ - continue - } - - for _, entry := range slice { - unique[entry]++ - if unique[entry] == total-emptyCnt { // this entry appeared in all the non-empty slices - intersection = append(intersection, entry) - } - } - } - - return intersection -} - -// RouteAuthenticators represents a group of authenticators that represent a logical OR -type RouteAuthenticators []RouteAuthenticator - -// AllowsAnonymous returns true when there is an authenticator that means optional auth -func (ras RouteAuthenticators) AllowsAnonymous() bool { - for _, ra := range ras { - if ra.AllowsAnonymous() { - return true - } - } - return false -} - -// Authenticate method implemention so this collection can be used as authenticator -func (ras RouteAuthenticators) Authenticate(req *http.Request, route *MatchedRoute) (bool, interface{}, error) { - var lastError error - var allowsAnon bool - var anonAuth RouteAuthenticator - - for _, ra := range ras { - if ra.AllowsAnonymous() { - anonAuth = ra - allowsAnon = true - continue - } - applies, usr, err := ra.Authenticate(req, route) - if !applies || err != nil || usr == nil { - if err != nil { - lastError = err - } - continue - } - return applies, usr, nil - } - - if allowsAnon && lastError == nil { - route.Authenticator = &anonAuth - return true, nil, lastError - } - return lastError != nil, nil, lastError -} - -type routeEntry struct { - PathPattern string - BasePath string - Operation *spec.Operation - Consumes []string - Consumers map[string]runtime.Consumer - Produces []string - Producers map[string]runtime.Producer - Parameters map[string]spec.Parameter - Handler http.Handler - Formats strfmt.Registry - Binder *UntypedRequestBinder - Authenticators RouteAuthenticators - Authorizer runtime.Authorizer -} - -// MatchedRoute represents the route that was matched in this request -type MatchedRoute struct { - routeEntry - Params RouteParams - Consumer runtime.Consumer - Producer runtime.Producer - Authenticator *RouteAuthenticator -} - -// HasAuth returns true when the route has a security requirement defined -func (m *MatchedRoute) HasAuth() bool { - return len(m.Authenticators) > 0 -} - -// NeedsAuth returns true when the request still -// needs to perform authentication -func (m *MatchedRoute) NeedsAuth() bool { - return m.HasAuth() && m.Authenticator == nil -} - -func (d *defaultRouter) Lookup(method, path string) (*MatchedRoute, bool) { - mth := strings.ToUpper(method) - debugLog("looking up route for %s %s", method, path) - if Debug { - if len(d.routers) == 0 { - debugLog("there are no known routers") - } - for meth := range d.routers { - debugLog("got a router for %s", meth) - } - } - if router, ok := d.routers[mth]; ok { - if m, rp, ok := router.Lookup(fpath.Clean(path)); ok && m != nil { - if entry, ok := m.(*routeEntry); ok { - debugLog("found a route for %s %s with %d parameters", method, path, len(entry.Parameters)) - var params RouteParams - for _, p := range rp { - v, err := pathUnescape(p.Value) - if err != nil { - debugLog("failed to escape %q: %v", p.Value, err) - v = p.Value - } - // a workaround to handle fragment/composing parameters until they are supported in denco router - // check if this parameter is a fragment within a path segment - if xpos := strings.Index(entry.PathPattern, fmt.Sprintf("{%s}", p.Name)) + len(p.Name) + 2; xpos < len(entry.PathPattern) && entry.PathPattern[xpos] != '/' { - // extract fragment parameters - ep := strings.Split(entry.PathPattern[xpos:], "/")[0] - pnames, pvalues := decodeCompositParams(p.Name, v, ep, nil, nil) - for i, pname := range pnames { - params = append(params, RouteParam{Name: pname, Value: pvalues[i]}) - } - } else { - // use the parameter directly - params = append(params, RouteParam{Name: p.Name, Value: v}) - } - } - return &MatchedRoute{routeEntry: *entry, Params: params}, true - } - } else { - debugLog("couldn't find a route by path for %s %s", method, path) - } - } else { - debugLog("couldn't find a route by method for %s %s", method, path) - } - return nil, false -} - -func (d *defaultRouter) OtherMethods(method, path string) []string { - mn := strings.ToUpper(method) - var methods []string - for k, v := range d.routers { - if k != mn { - if _, _, ok := v.Lookup(fpath.Clean(path)); ok { - methods = append(methods, k) - continue - } - } - } - return methods -} - -// convert swagger parameters per path segment into a denco parameter as multiple parameters per segment are not supported in denco -var pathConverter = regexp.MustCompile(`{(.+?)}([^/]*)`) - -func decodeCompositParams(name string, value string, pattern string, names []string, values []string) ([]string, []string) { - pleft := strings.Index(pattern, "{") - names = append(names, name) - if pleft < 0 { - if strings.HasSuffix(value, pattern) { - values = append(values, value[:len(value)-len(pattern)]) - } else { - values = append(values, "") - } - } else { - toskip := pattern[:pleft] - pright := strings.Index(pattern, "}") - vright := strings.Index(value, toskip) - if vright >= 0 { - values = append(values, value[:vright]) - } else { - values = append(values, "") - value = "" - } - return decodeCompositParams(pattern[pleft+1:pright], value[vright+len(toskip):], pattern[pright+1:], names, values) - } - return names, values -} - -func (d *defaultRouteBuilder) AddRoute(method, path string, operation *spec.Operation) { - mn := strings.ToUpper(method) - - bp := fpath.Clean(d.spec.BasePath()) - if len(bp) > 0 && bp[len(bp)-1] == '/' { - bp = bp[:len(bp)-1] - } - - debugLog("operation: %#v", *operation) - if handler, ok := d.api.HandlerFor(method, strings.TrimPrefix(path, bp)); ok { - consumes := d.analyzer.ConsumesFor(operation) - produces := d.analyzer.ProducesFor(operation) - parameters := d.analyzer.ParamsFor(method, strings.TrimPrefix(path, bp)) - - // add API defaults if not part of the spec - if defConsumes := d.api.DefaultConsumes(); defConsumes != "" && !swag.ContainsStringsCI(consumes, defConsumes) { - consumes = append(consumes, defConsumes) - } - - if defProduces := d.api.DefaultProduces(); defProduces != "" && !swag.ContainsStringsCI(produces, defProduces) { - produces = append(produces, defProduces) - } - - record := denco.NewRecord(pathConverter.ReplaceAllString(path, ":$1"), &routeEntry{ - BasePath: bp, - PathPattern: path, - Operation: operation, - Handler: handler, - Consumes: consumes, - Produces: produces, - Consumers: d.api.ConsumersFor(normalizeOffers(consumes)), - Producers: d.api.ProducersFor(normalizeOffers(produces)), - Parameters: parameters, - Formats: d.api.Formats(), - Binder: NewUntypedRequestBinder(parameters, d.spec.Spec(), d.api.Formats()), - Authenticators: d.buildAuthenticators(operation), - Authorizer: d.api.Authorizer(), - }) - d.records[mn] = append(d.records[mn], record) - } -} - -func (d *defaultRouteBuilder) buildAuthenticators(operation *spec.Operation) RouteAuthenticators { - requirements := d.analyzer.SecurityRequirementsFor(operation) - auths := make([]RouteAuthenticator, 0, len(requirements)) - for _, reqs := range requirements { - schemes := make([]string, 0, len(reqs)) - scopes := make(map[string][]string, len(reqs)) - scopeSlices := make([][]string, 0, len(reqs)) - for _, req := range reqs { - schemes = append(schemes, req.Name) - scopes[req.Name] = req.Scopes - scopeSlices = append(scopeSlices, req.Scopes) - } - - definitions := d.analyzer.SecurityDefinitionsForRequirements(reqs) - authenticators := d.api.AuthenticatorsFor(definitions) - auths = append(auths, RouteAuthenticator{ - Authenticator: authenticators, - Schemes: schemes, - Scopes: scopes, - allScopes: stringSliceUnion(scopeSlices...), - commonScopes: stringSliceIntersection(scopeSlices...), - allowAnonymous: len(reqs) == 1 && reqs[0].Name == "", - }) - } - return auths -} - -func (d *defaultRouteBuilder) Build() *defaultRouter { - routers := make(map[string]*denco.Router) - for method, records := range d.records { - router := denco.New() - _ = router.Build(records) - routers[method] = router - } - return &defaultRouter{ - spec: d.spec, - routers: routers, - } -} diff --git a/vendor/github.com/go-openapi/runtime/middleware/security.go b/vendor/github.com/go-openapi/runtime/middleware/security.go deleted file mode 100644 index 2b061caefcb..00000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/security.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package middleware - -import "net/http" - -func newSecureAPI(ctx *Context, next http.Handler) http.Handler { - return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := ctx.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - if route != nil && !route.NeedsAuth() { - next.ServeHTTP(rw, r) - return - } - - _, rCtx, err := ctx.Authorize(r, route) - if err != nil { - ctx.Respond(rw, r, route.Produces, route, err) - return - } - r = rCtx - - next.ServeHTTP(rw, r) - }) -} diff --git a/vendor/github.com/go-openapi/runtime/middleware/spec.go b/vendor/github.com/go-openapi/runtime/middleware/spec.go deleted file mode 100644 index c288a2b1780..00000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/spec.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package middleware - -import ( - "net/http" - "path" -) - -// Spec creates a middleware to serve a swagger spec. -// This allows for altering the spec before starting the http listener. -// This can be useful if you want to serve the swagger spec from another path than /swagger.json -func Spec(basePath string, b []byte, next http.Handler) http.Handler { - if basePath == "" { - basePath = "/" - } - pth := path.Join(basePath, "swagger.json") - - return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { - if r.URL.Path == pth { - rw.Header().Set("Content-Type", "application/json") - rw.WriteHeader(http.StatusOK) - //#nosec - _, _ = rw.Write(b) - return - } - - if next == nil { - rw.Header().Set("Content-Type", "application/json") - rw.WriteHeader(http.StatusNotFound) - return - } - next.ServeHTTP(rw, r) - }) -} diff --git a/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go b/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go deleted file mode 100644 index 846e3cfbb4b..00000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go +++ /dev/null @@ -1,168 +0,0 @@ -package middleware - -import ( - "bytes" - "fmt" - "html/template" - "net/http" - "path" -) - -// SwaggerUIOpts configures the Swaggerui middlewares -type SwaggerUIOpts struct { - // BasePath for the UI path, defaults to: / - BasePath string - // Path combines with BasePath for the full UI path, defaults to: docs - Path string - // SpecURL the url to find the spec for - SpecURL string - // OAuthCallbackURL the url called after OAuth2 login - OAuthCallbackURL string - - // The three components needed to embed swagger-ui - SwaggerURL string - SwaggerPresetURL string - SwaggerStylesURL string - - Favicon32 string - Favicon16 string - - // Title for the documentation site, default to: API documentation - Title string -} - -// EnsureDefaults in case some options are missing -func (r *SwaggerUIOpts) EnsureDefaults() { - if r.BasePath == "" { - r.BasePath = "/" - } - if r.Path == "" { - r.Path = defaultDocsPath - } - if r.SpecURL == "" { - r.SpecURL = defaultDocsURL - } - if r.OAuthCallbackURL == "" { - r.OAuthCallbackURL = path.Join(r.BasePath, r.Path, "oauth2-callback") - } - if r.SwaggerURL == "" { - r.SwaggerURL = swaggerLatest - } - if r.SwaggerPresetURL == "" { - r.SwaggerPresetURL = swaggerPresetLatest - } - if r.SwaggerStylesURL == "" { - r.SwaggerStylesURL = swaggerStylesLatest - } - if r.Favicon16 == "" { - r.Favicon16 = swaggerFavicon16Latest - } - if r.Favicon32 == "" { - r.Favicon32 = swaggerFavicon32Latest - } - if r.Title == "" { - r.Title = defaultDocsTitle - } -} - -// SwaggerUI creates a middleware to serve a documentation site for a swagger spec. -// This allows for altering the spec before starting the http listener. -func SwaggerUI(opts SwaggerUIOpts, next http.Handler) http.Handler { - opts.EnsureDefaults() - - pth := path.Join(opts.BasePath, opts.Path) - tmpl := template.Must(template.New("swaggerui").Parse(swaggeruiTemplate)) - - buf := bytes.NewBuffer(nil) - _ = tmpl.Execute(buf, &opts) - b := buf.Bytes() - - return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { - if path.Join(r.URL.Path) == pth { - rw.Header().Set("Content-Type", "text/html; charset=utf-8") - rw.WriteHeader(http.StatusOK) - - _, _ = rw.Write(b) - return - } - - if next == nil { - rw.Header().Set("Content-Type", "text/plain") - rw.WriteHeader(http.StatusNotFound) - _, _ = rw.Write([]byte(fmt.Sprintf("%q not found", pth))) - return - } - next.ServeHTTP(rw, r) - }) -} - -const ( - swaggerLatest = "https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js" - swaggerPresetLatest = "https://unpkg.com/swagger-ui-dist/swagger-ui-standalone-preset.js" - swaggerStylesLatest = "https://unpkg.com/swagger-ui-dist/swagger-ui.css" - swaggerFavicon32Latest = "https://unpkg.com/swagger-ui-dist/favicon-32x32.png" - swaggerFavicon16Latest = "https://unpkg.com/swagger-ui-dist/favicon-16x16.png" - swaggeruiTemplate = ` - - - - - {{ .Title }} - - - - - - - - -
- - - - - - -` -) diff --git a/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go b/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go deleted file mode 100644 index 576f6003f7b..00000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go +++ /dev/null @@ -1,122 +0,0 @@ -package middleware - -import ( - "bytes" - "fmt" - "net/http" - "path" - "text/template" -) - -func SwaggerUIOAuth2Callback(opts SwaggerUIOpts, next http.Handler) http.Handler { - opts.EnsureDefaults() - - pth := opts.OAuthCallbackURL - tmpl := template.Must(template.New("swaggeroauth").Parse(swaggerOAuthTemplate)) - - buf := bytes.NewBuffer(nil) - _ = tmpl.Execute(buf, &opts) - b := buf.Bytes() - - return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { - if path.Join(r.URL.Path) == pth { - rw.Header().Set("Content-Type", "text/html; charset=utf-8") - rw.WriteHeader(http.StatusOK) - - _, _ = rw.Write(b) - return - } - - if next == nil { - rw.Header().Set("Content-Type", "text/plain") - rw.WriteHeader(http.StatusNotFound) - _, _ = rw.Write([]byte(fmt.Sprintf("%q not found", pth))) - return - } - next.ServeHTTP(rw, r) - }) -} - -const ( - swaggerOAuthTemplate = ` - - - - {{ .Title }} - - - - - -` -) diff --git a/vendor/github.com/go-openapi/runtime/middleware/ui_defaults.go b/vendor/github.com/go-openapi/runtime/middleware/ui_defaults.go deleted file mode 100644 index 25817d20516..00000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/ui_defaults.go +++ /dev/null @@ -1,8 +0,0 @@ -package middleware - -const ( - // constants that are common to all UI-serving middlewares - defaultDocsPath = "docs" - defaultDocsURL = "/swagger.json" - defaultDocsTitle = "API Documentation" -) diff --git a/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go b/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go deleted file mode 100644 index 7b7269bd195..00000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package untyped - -import ( - "fmt" - "net/http" - "sort" - "strings" - - "github.com/go-openapi/analysis" - "github.com/go-openapi/errors" - "github.com/go-openapi/loads" - "github.com/go-openapi/spec" - "github.com/go-openapi/strfmt" - - "github.com/go-openapi/runtime" -) - -// NewAPI creates the default untyped API -func NewAPI(spec *loads.Document) *API { - var an *analysis.Spec - if spec != nil && spec.Spec() != nil { - an = analysis.New(spec.Spec()) - } - api := &API{ - spec: spec, - analyzer: an, - consumers: make(map[string]runtime.Consumer, 10), - producers: make(map[string]runtime.Producer, 10), - authenticators: make(map[string]runtime.Authenticator), - operations: make(map[string]map[string]runtime.OperationHandler), - ServeError: errors.ServeError, - Models: make(map[string]func() interface{}), - formats: strfmt.NewFormats(), - } - return api.WithJSONDefaults() -} - -// API represents an untyped mux for a swagger spec -type API struct { - spec *loads.Document - analyzer *analysis.Spec - DefaultProduces string - DefaultConsumes string - consumers map[string]runtime.Consumer - producers map[string]runtime.Producer - authenticators map[string]runtime.Authenticator - authorizer runtime.Authorizer - operations map[string]map[string]runtime.OperationHandler - ServeError func(http.ResponseWriter, *http.Request, error) - Models map[string]func() interface{} - formats strfmt.Registry -} - -// WithJSONDefaults loads the json defaults for this api -func (d *API) WithJSONDefaults() *API { - d.DefaultConsumes = runtime.JSONMime - d.DefaultProduces = runtime.JSONMime - d.consumers[runtime.JSONMime] = runtime.JSONConsumer() - d.producers[runtime.JSONMime] = runtime.JSONProducer() - return d -} - -// WithoutJSONDefaults clears the json defaults for this api -func (d *API) WithoutJSONDefaults() *API { - d.DefaultConsumes = "" - d.DefaultProduces = "" - delete(d.consumers, runtime.JSONMime) - delete(d.producers, runtime.JSONMime) - return d -} - -// Formats returns the registered string formats -func (d *API) Formats() strfmt.Registry { - if d.formats == nil { - d.formats = strfmt.NewFormats() - } - return d.formats -} - -// RegisterFormat registers a custom format validator -func (d *API) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator) { - if d.formats == nil { - d.formats = strfmt.NewFormats() - } - d.formats.Add(name, format, validator) -} - -// RegisterAuth registers an auth handler in this api -func (d *API) RegisterAuth(scheme string, handler runtime.Authenticator) { - if d.authenticators == nil { - d.authenticators = make(map[string]runtime.Authenticator) - } - d.authenticators[scheme] = handler -} - -// RegisterAuthorizer registers an authorizer handler in this api -func (d *API) RegisterAuthorizer(handler runtime.Authorizer) { - d.authorizer = handler -} - -// RegisterConsumer registers a consumer for a media type. -func (d *API) RegisterConsumer(mediaType string, handler runtime.Consumer) { - if d.consumers == nil { - d.consumers = make(map[string]runtime.Consumer, 10) - } - d.consumers[strings.ToLower(mediaType)] = handler -} - -// RegisterProducer registers a producer for a media type -func (d *API) RegisterProducer(mediaType string, handler runtime.Producer) { - if d.producers == nil { - d.producers = make(map[string]runtime.Producer, 10) - } - d.producers[strings.ToLower(mediaType)] = handler -} - -// RegisterOperation registers an operation handler for an operation name -func (d *API) RegisterOperation(method, path string, handler runtime.OperationHandler) { - if d.operations == nil { - d.operations = make(map[string]map[string]runtime.OperationHandler, 30) - } - um := strings.ToUpper(method) - if b, ok := d.operations[um]; !ok || b == nil { - d.operations[um] = make(map[string]runtime.OperationHandler) - } - d.operations[um][path] = handler -} - -// OperationHandlerFor returns the operation handler for the specified id if it can be found -func (d *API) OperationHandlerFor(method, path string) (runtime.OperationHandler, bool) { - if d.operations == nil { - return nil, false - } - if pi, ok := d.operations[strings.ToUpper(method)]; ok { - h, ok := pi[path] - return h, ok - } - return nil, false -} - -// ConsumersFor gets the consumers for the specified media types -func (d *API) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer { - result := make(map[string]runtime.Consumer) - for _, mt := range mediaTypes { - if consumer, ok := d.consumers[mt]; ok { - result[mt] = consumer - } - } - return result -} - -// ProducersFor gets the producers for the specified media types -func (d *API) ProducersFor(mediaTypes []string) map[string]runtime.Producer { - result := make(map[string]runtime.Producer) - for _, mt := range mediaTypes { - if producer, ok := d.producers[mt]; ok { - result[mt] = producer - } - } - return result -} - -// AuthenticatorsFor gets the authenticators for the specified security schemes -func (d *API) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator { - result := make(map[string]runtime.Authenticator) - for k := range schemes { - if a, ok := d.authenticators[k]; ok { - result[k] = a - } - } - return result -} - -// Authorizer returns the registered authorizer -func (d *API) Authorizer() runtime.Authorizer { - return d.authorizer -} - -// Validate validates this API for any missing items -func (d *API) Validate() error { - return d.validate() -} - -// validateWith validates the registrations in this API against the provided spec analyzer -func (d *API) validate() error { - consumes := make([]string, 0, len(d.consumers)) - for k := range d.consumers { - consumes = append(consumes, k) - } - - produces := make([]string, 0, len(d.producers)) - for k := range d.producers { - produces = append(produces, k) - } - - authenticators := make([]string, 0, len(d.authenticators)) - for k := range d.authenticators { - authenticators = append(authenticators, k) - } - - operations := make([]string, 0, len(d.operations)) - for m, v := range d.operations { - for p := range v { - operations = append(operations, fmt.Sprintf("%s %s", strings.ToUpper(m), p)) - } - } - - secDefinitions := d.spec.Spec().SecurityDefinitions - definedAuths := make([]string, 0, len(secDefinitions)) - for k := range secDefinitions { - definedAuths = append(definedAuths, k) - } - - if err := d.verify("consumes", consumes, d.analyzer.RequiredConsumes()); err != nil { - return err - } - if err := d.verify("produces", produces, d.analyzer.RequiredProduces()); err != nil { - return err - } - if err := d.verify("operation", operations, d.analyzer.OperationMethodPaths()); err != nil { - return err - } - - requiredAuths := d.analyzer.RequiredSecuritySchemes() - if err := d.verify("auth scheme", authenticators, requiredAuths); err != nil { - return err - } - if err := d.verify("security definitions", definedAuths, requiredAuths); err != nil { - return err - } - return nil -} - -func (d *API) verify(name string, registrations []string, expectations []string) error { - sort.Strings(registrations) - sort.Strings(expectations) - - expected := map[string]struct{}{} - seen := map[string]struct{}{} - - for _, v := range expectations { - expected[v] = struct{}{} - } - - var unspecified []string - for _, v := range registrations { - seen[v] = struct{}{} - if _, ok := expected[v]; !ok { - unspecified = append(unspecified, v) - } - } - - for k := range seen { - delete(expected, k) - } - - unregistered := make([]string, 0, len(expected)) - for k := range expected { - unregistered = append(unregistered, k) - } - sort.Strings(unspecified) - sort.Strings(unregistered) - - if len(unregistered) > 0 || len(unspecified) > 0 { - return &errors.APIVerificationFailed{ - Section: name, - MissingSpecification: unspecified, - MissingRegistration: unregistered, - } - } - - return nil -} diff --git a/vendor/github.com/go-openapi/runtime/middleware/validation.go b/vendor/github.com/go-openapi/runtime/middleware/validation.go deleted file mode 100644 index 1f0135b5788..00000000000 --- a/vendor/github.com/go-openapi/runtime/middleware/validation.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package middleware - -import ( - "mime" - "net/http" - "strings" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - - "github.com/go-openapi/runtime" -) - -type validation struct { - context *Context - result []error - request *http.Request - route *MatchedRoute - bound map[string]interface{} -} - -// ContentType validates the content type of a request -func validateContentType(allowed []string, actual string) error { - debugLog("validating content type for %q against [%s]", actual, strings.Join(allowed, ", ")) - if len(allowed) == 0 { - return nil - } - mt, _, err := mime.ParseMediaType(actual) - if err != nil { - return errors.InvalidContentType(actual, allowed) - } - if swag.ContainsStringsCI(allowed, mt) { - return nil - } - if swag.ContainsStringsCI(allowed, "*/*") { - return nil - } - parts := strings.Split(actual, "/") - if len(parts) == 2 && swag.ContainsStringsCI(allowed, parts[0]+"/*") { - return nil - } - return errors.InvalidContentType(actual, allowed) -} - -func validateRequest(ctx *Context, request *http.Request, route *MatchedRoute) *validation { - debugLog("validating request %s %s", request.Method, request.URL.EscapedPath()) - validate := &validation{ - context: ctx, - request: request, - route: route, - bound: make(map[string]interface{}), - } - - validate.contentType() - if len(validate.result) == 0 { - validate.responseFormat() - } - if len(validate.result) == 0 { - validate.parameters() - } - - return validate -} - -func (v *validation) parameters() { - debugLog("validating request parameters for %s %s", v.request.Method, v.request.URL.EscapedPath()) - if result := v.route.Binder.Bind(v.request, v.route.Params, v.route.Consumer, v.bound); result != nil { - if result.Error() == "validation failure list" { - for _, e := range result.(*errors.Validation).Value.([]interface{}) { - v.result = append(v.result, e.(error)) - } - return - } - v.result = append(v.result, result) - } -} - -func (v *validation) contentType() { - if len(v.result) == 0 && runtime.HasBody(v.request) { - debugLog("validating body content type for %s %s", v.request.Method, v.request.URL.EscapedPath()) - ct, _, req, err := v.context.ContentType(v.request) - if err != nil { - v.result = append(v.result, err) - } else { - v.request = req - } - - if len(v.result) == 0 { - if err := validateContentType(v.route.Consumes, ct); err != nil { - v.result = append(v.result, err) - } - } - if ct != "" && v.route.Consumer == nil { - cons, ok := v.route.Consumers[ct] - if !ok { - v.result = append(v.result, errors.New(500, "no consumer registered for %s", ct)) - } else { - v.route.Consumer = cons - } - } - } -} - -func (v *validation) responseFormat() { - // if the route provides values for Produces and no format could be identify then return an error. - // if the route does not specify values for Produces then treat request as valid since the API designer - // choose not to specify the format for responses. - if str, rCtx := v.context.ResponseFormat(v.request, v.route.Produces); str == "" && len(v.route.Produces) > 0 { - v.request = rCtx - v.result = append(v.result, errors.InvalidResponseFormat(v.request.Header.Get(runtime.HeaderAccept), v.route.Produces)) - } -} diff --git a/vendor/github.com/go-openapi/runtime/request.go b/vendor/github.com/go-openapi/runtime/request.go deleted file mode 100644 index 9e3e1ecb148..00000000000 --- a/vendor/github.com/go-openapi/runtime/request.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package runtime - -import ( - "bufio" - "context" - "errors" - "io" - "net/http" - "strings" - - "github.com/go-openapi/swag" -) - -// CanHaveBody returns true if this method can have a body -func CanHaveBody(method string) bool { - mn := strings.ToUpper(method) - return mn == "POST" || mn == "PUT" || mn == "PATCH" || mn == "DELETE" -} - -// IsSafe returns true if this is a request with a safe method -func IsSafe(r *http.Request) bool { - mn := strings.ToUpper(r.Method) - return mn == "GET" || mn == "HEAD" -} - -// AllowsBody returns true if the request allows for a body -func AllowsBody(r *http.Request) bool { - mn := strings.ToUpper(r.Method) - return mn != "HEAD" -} - -// HasBody returns true if this method needs a content-type -func HasBody(r *http.Request) bool { - // happy case: we have a content length set - if r.ContentLength > 0 { - return true - } - - if r.Header.Get("content-length") != "" { - // in this case, no Transfer-Encoding should be present - // we have a header set but it was explicitly set to 0, so we assume no body - return false - } - - rdr := newPeekingReader(r.Body) - r.Body = rdr - return rdr.HasContent() -} - -func newPeekingReader(r io.ReadCloser) *peekingReader { - if r == nil { - return nil - } - return &peekingReader{ - underlying: bufio.NewReader(r), - orig: r, - } -} - -type peekingReader struct { - underlying interface { - Buffered() int - Peek(int) ([]byte, error) - Read([]byte) (int, error) - } - orig io.ReadCloser -} - -func (p *peekingReader) HasContent() bool { - if p == nil { - return false - } - if p.underlying.Buffered() > 0 { - return true - } - b, err := p.underlying.Peek(1) - if err != nil { - return false - } - return len(b) > 0 -} - -func (p *peekingReader) Read(d []byte) (int, error) { - if p == nil { - return 0, io.EOF - } - if p.underlying == nil { - return 0, io.ErrUnexpectedEOF - } - return p.underlying.Read(d) -} - -func (p *peekingReader) Close() error { - if p.underlying == nil { - return errors.New("reader already closed") - } - p.underlying = nil - if p.orig != nil { - return p.orig.Close() - } - return nil -} - -// JSONRequest creates a new http request with json headers set. -// -// It uses context.Background. -func JSONRequest(method, urlStr string, body io.Reader) (*http.Request, error) { - req, err := http.NewRequestWithContext(context.Background(), method, urlStr, body) - if err != nil { - return nil, err - } - req.Header.Add(HeaderContentType, JSONMime) - req.Header.Add(HeaderAccept, JSONMime) - return req, nil -} - -// Gettable for things with a method GetOK(string) (data string, hasKey bool, hasValue bool) -type Gettable interface { - GetOK(string) ([]string, bool, bool) -} - -// ReadSingleValue reads a single value from the source -func ReadSingleValue(values Gettable, name string) string { - vv, _, hv := values.GetOK(name) - if hv { - return vv[len(vv)-1] - } - return "" -} - -// ReadCollectionValue reads a collection value from a string data source -func ReadCollectionValue(values Gettable, name, collectionFormat string) []string { - v := ReadSingleValue(values, name) - return swag.SplitByFormat(v, collectionFormat) -} diff --git a/vendor/github.com/go-openapi/runtime/security/authenticator.go b/vendor/github.com/go-openapi/runtime/security/authenticator.go deleted file mode 100644 index bb30472bbee..00000000000 --- a/vendor/github.com/go-openapi/runtime/security/authenticator.go +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package security - -import ( - "context" - "net/http" - "strings" - - "github.com/go-openapi/errors" - - "github.com/go-openapi/runtime" -) - -const ( - query = "query" - header = "header" - accessTokenParam = "access_token" -) - -// HttpAuthenticator is a function that authenticates a HTTP request -func HttpAuthenticator(handler func(*http.Request) (bool, interface{}, error)) runtime.Authenticator { //nolint:revive,stylecheck - return runtime.AuthenticatorFunc(func(params interface{}) (bool, interface{}, error) { - if request, ok := params.(*http.Request); ok { - return handler(request) - } - if scoped, ok := params.(*ScopedAuthRequest); ok { - return handler(scoped.Request) - } - return false, nil, nil - }) -} - -// ScopedAuthenticator is a function that authenticates a HTTP request against a list of valid scopes -func ScopedAuthenticator(handler func(*ScopedAuthRequest) (bool, interface{}, error)) runtime.Authenticator { - return runtime.AuthenticatorFunc(func(params interface{}) (bool, interface{}, error) { - if request, ok := params.(*ScopedAuthRequest); ok { - return handler(request) - } - return false, nil, nil - }) -} - -// UserPassAuthentication authentication function -type UserPassAuthentication func(string, string) (interface{}, error) - -// UserPassAuthenticationCtx authentication function with context.Context -type UserPassAuthenticationCtx func(context.Context, string, string) (context.Context, interface{}, error) - -// TokenAuthentication authentication function -type TokenAuthentication func(string) (interface{}, error) - -// TokenAuthenticationCtx authentication function with context.Context -type TokenAuthenticationCtx func(context.Context, string) (context.Context, interface{}, error) - -// ScopedTokenAuthentication authentication function -type ScopedTokenAuthentication func(string, []string) (interface{}, error) - -// ScopedTokenAuthenticationCtx authentication function with context.Context -type ScopedTokenAuthenticationCtx func(context.Context, string, []string) (context.Context, interface{}, error) - -var DefaultRealmName = "API" - -type secCtxKey uint8 - -const ( - failedBasicAuth secCtxKey = iota - oauth2SchemeName -) - -func FailedBasicAuth(r *http.Request) string { - return FailedBasicAuthCtx(r.Context()) -} - -func FailedBasicAuthCtx(ctx context.Context) string { - v, ok := ctx.Value(failedBasicAuth).(string) - if !ok { - return "" - } - return v -} - -func OAuth2SchemeName(r *http.Request) string { - return OAuth2SchemeNameCtx(r.Context()) -} - -func OAuth2SchemeNameCtx(ctx context.Context) string { - v, ok := ctx.Value(oauth2SchemeName).(string) - if !ok { - return "" - } - return v -} - -// BasicAuth creates a basic auth authenticator with the provided authentication function -func BasicAuth(authenticate UserPassAuthentication) runtime.Authenticator { - return BasicAuthRealm(DefaultRealmName, authenticate) -} - -// BasicAuthRealm creates a basic auth authenticator with the provided authentication function and realm name -func BasicAuthRealm(realm string, authenticate UserPassAuthentication) runtime.Authenticator { - if realm == "" { - realm = DefaultRealmName - } - - return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { - if usr, pass, ok := r.BasicAuth(); ok { - p, err := authenticate(usr, pass) - if err != nil { - *r = *r.WithContext(context.WithValue(r.Context(), failedBasicAuth, realm)) - } - return true, p, err - } - *r = *r.WithContext(context.WithValue(r.Context(), failedBasicAuth, realm)) - return false, nil, nil - }) -} - -// BasicAuthCtx creates a basic auth authenticator with the provided authentication function with support for context.Context -func BasicAuthCtx(authenticate UserPassAuthenticationCtx) runtime.Authenticator { - return BasicAuthRealmCtx(DefaultRealmName, authenticate) -} - -// BasicAuthRealmCtx creates a basic auth authenticator with the provided authentication function and realm name with support for context.Context -func BasicAuthRealmCtx(realm string, authenticate UserPassAuthenticationCtx) runtime.Authenticator { - if realm == "" { - realm = DefaultRealmName - } - - return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { - if usr, pass, ok := r.BasicAuth(); ok { - ctx, p, err := authenticate(r.Context(), usr, pass) - if err != nil { - ctx = context.WithValue(ctx, failedBasicAuth, realm) - } - *r = *r.WithContext(ctx) - return true, p, err - } - *r = *r.WithContext(context.WithValue(r.Context(), failedBasicAuth, realm)) - return false, nil, nil - }) -} - -// APIKeyAuth creates an authenticator that uses a token for authorization. -// This token can be obtained from either a header or a query string -func APIKeyAuth(name, in string, authenticate TokenAuthentication) runtime.Authenticator { - inl := strings.ToLower(in) - if inl != query && inl != header { - // panic because this is most likely a typo - panic(errors.New(500, "api key auth: in value needs to be either \"query\" or \"header\"")) - } - - var getToken func(*http.Request) string - switch inl { - case header: - getToken = func(r *http.Request) string { return r.Header.Get(name) } - case query: - getToken = func(r *http.Request) string { return r.URL.Query().Get(name) } - } - - return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { - token := getToken(r) - if token == "" { - return false, nil, nil - } - - p, err := authenticate(token) - return true, p, err - }) -} - -// APIKeyAuthCtx creates an authenticator that uses a token for authorization with support for context.Context. -// This token can be obtained from either a header or a query string -func APIKeyAuthCtx(name, in string, authenticate TokenAuthenticationCtx) runtime.Authenticator { - inl := strings.ToLower(in) - if inl != query && inl != header { - // panic because this is most likely a typo - panic(errors.New(500, "api key auth: in value needs to be either \"query\" or \"header\"")) - } - - var getToken func(*http.Request) string - switch inl { - case header: - getToken = func(r *http.Request) string { return r.Header.Get(name) } - case query: - getToken = func(r *http.Request) string { return r.URL.Query().Get(name) } - } - - return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { - token := getToken(r) - if token == "" { - return false, nil, nil - } - - ctx, p, err := authenticate(r.Context(), token) - *r = *r.WithContext(ctx) - return true, p, err - }) -} - -// ScopedAuthRequest contains both a http request and the required scopes for a particular operation -type ScopedAuthRequest struct { - Request *http.Request - RequiredScopes []string -} - -// BearerAuth for use with oauth2 flows -func BearerAuth(name string, authenticate ScopedTokenAuthentication) runtime.Authenticator { - const prefix = "Bearer " - return ScopedAuthenticator(func(r *ScopedAuthRequest) (bool, interface{}, error) { - var token string - hdr := r.Request.Header.Get(runtime.HeaderAuthorization) - if strings.HasPrefix(hdr, prefix) { - token = strings.TrimPrefix(hdr, prefix) - } - if token == "" { - qs := r.Request.URL.Query() - token = qs.Get(accessTokenParam) - } - //#nosec - ct, _, _ := runtime.ContentType(r.Request.Header) - if token == "" && (ct == "application/x-www-form-urlencoded" || ct == "multipart/form-data") { - token = r.Request.FormValue(accessTokenParam) - } - - if token == "" { - return false, nil, nil - } - - rctx := context.WithValue(r.Request.Context(), oauth2SchemeName, name) - *r.Request = *r.Request.WithContext(rctx) - p, err := authenticate(token, r.RequiredScopes) - return true, p, err - }) -} - -// BearerAuthCtx for use with oauth2 flows with support for context.Context. -func BearerAuthCtx(name string, authenticate ScopedTokenAuthenticationCtx) runtime.Authenticator { - const prefix = "Bearer " - return ScopedAuthenticator(func(r *ScopedAuthRequest) (bool, interface{}, error) { - var token string - hdr := r.Request.Header.Get(runtime.HeaderAuthorization) - if strings.HasPrefix(hdr, prefix) { - token = strings.TrimPrefix(hdr, prefix) - } - if token == "" { - qs := r.Request.URL.Query() - token = qs.Get(accessTokenParam) - } - //#nosec - ct, _, _ := runtime.ContentType(r.Request.Header) - if token == "" && (ct == "application/x-www-form-urlencoded" || ct == "multipart/form-data") { - token = r.Request.FormValue(accessTokenParam) - } - - if token == "" { - return false, nil, nil - } - - rctx := context.WithValue(r.Request.Context(), oauth2SchemeName, name) - ctx, p, err := authenticate(rctx, token, r.RequiredScopes) - *r.Request = *r.Request.WithContext(ctx) - return true, p, err - }) -} diff --git a/vendor/github.com/go-openapi/runtime/security/authorizer.go b/vendor/github.com/go-openapi/runtime/security/authorizer.go deleted file mode 100644 index 00c1a4d6a4c..00000000000 --- a/vendor/github.com/go-openapi/runtime/security/authorizer.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package security - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// Authorized provides a default implementation of the Authorizer interface where all -// requests are authorized (successful) -func Authorized() runtime.Authorizer { - return runtime.AuthorizerFunc(func(_ *http.Request, _ interface{}) error { return nil }) -} diff --git a/vendor/github.com/go-openapi/runtime/statuses.go b/vendor/github.com/go-openapi/runtime/statuses.go deleted file mode 100644 index 3b011a0bff1..00000000000 --- a/vendor/github.com/go-openapi/runtime/statuses.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package runtime - -// Statuses lists the most common HTTP status codes to default message -// taken from https://httpstatuses.com/ -var Statuses = map[int]string{ - 100: "Continue", - 101: "Switching Protocols", - 102: "Processing", - 103: "Checkpoint", - 122: "URI too long", - 200: "OK", - 201: "Created", - 202: "Accepted", - 203: "Request Processed", - 204: "No Content", - 205: "Reset Content", - 206: "Partial Content", - 207: "Multi-Status", - 208: "Already Reported", - 226: "IM Used", - 300: "Multiple Choices", - 301: "Moved Permanently", - 302: "Found", - 303: "See Other", - 304: "Not Modified", - 305: "Use Proxy", - 306: "Switch Proxy", - 307: "Temporary Redirect", - 308: "Permanent Redirect", - 400: "Bad Request", - 401: "Unauthorized", - 402: "Payment Required", - 403: "Forbidden", - 404: "Not Found", - 405: "Method Not Allowed", - 406: "Not Acceptable", - 407: "Proxy Authentication Required", - 408: "Request Timeout", - 409: "Conflict", - 410: "Gone", - 411: "Length Required", - 412: "Precondition Failed", - 413: "Request Entity Too Large", - 414: "Request-URI Too Long", - 415: "Unsupported Media Type", - 416: "Request Range Not Satisfiable", - 417: "Expectation Failed", - 418: "I'm a teapot", - 420: "Enhance Your Calm", - 422: "Unprocessable Entity", - 423: "Locked", - 424: "Failed Dependency", - 426: "Upgrade Required", - 428: "Precondition Required", - 429: "Too Many Requests", - 431: "Request Header Fields Too Large", - 444: "No Response", - 449: "Retry With", - 450: "Blocked by Windows Parental Controls", - 451: "Wrong Exchange Server", - 499: "Client Closed Request", - 500: "Internal Server Error", - 501: "Not Implemented", - 502: "Bad Gateway", - 503: "Service Unavailable", - 504: "Gateway Timeout", - 505: "HTTP Version Not Supported", - 506: "Variant Also Negotiates", - 507: "Insufficient Storage", - 508: "Loop Detected", - 509: "Bandwidth Limit Exceeded", - 510: "Not Extended", - 511: "Network Authentication Required", - 598: "Network read timeout error", - 599: "Network connect timeout error", -} diff --git a/vendor/github.com/go-openapi/runtime/text.go b/vendor/github.com/go-openapi/runtime/text.go deleted file mode 100644 index f33320b7dd5..00000000000 --- a/vendor/github.com/go-openapi/runtime/text.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package runtime - -import ( - "bytes" - "encoding" - "errors" - "fmt" - "io" - "reflect" - - "github.com/go-openapi/swag" -) - -// TextConsumer creates a new text consumer -func TextConsumer() Consumer { - return ConsumerFunc(func(reader io.Reader, data interface{}) error { - if reader == nil { - return errors.New("TextConsumer requires a reader") // early exit - } - - buf := new(bytes.Buffer) - _, err := buf.ReadFrom(reader) - if err != nil { - return err - } - b := buf.Bytes() - - // If the buffer is empty, no need to unmarshal it, which causes a panic. - if len(b) == 0 { - return nil - } - - if tu, ok := data.(encoding.TextUnmarshaler); ok { - err := tu.UnmarshalText(b) - if err != nil { - return fmt.Errorf("text consumer: %v", err) - } - - return nil - } - - t := reflect.TypeOf(data) - if data != nil && t.Kind() == reflect.Ptr { - v := reflect.Indirect(reflect.ValueOf(data)) - if t.Elem().Kind() == reflect.String { - v.SetString(string(b)) - return nil - } - } - - return fmt.Errorf("%v (%T) is not supported by the TextConsumer, %s", - data, data, "can be resolved by supporting TextUnmarshaler interface") - }) -} - -// TextProducer creates a new text producer -func TextProducer() Producer { - return ProducerFunc(func(writer io.Writer, data interface{}) error { - if writer == nil { - return errors.New("TextProducer requires a writer") // early exit - } - - if data == nil { - return errors.New("no data given to produce text from") - } - - if tm, ok := data.(encoding.TextMarshaler); ok { - txt, err := tm.MarshalText() - if err != nil { - return fmt.Errorf("text producer: %v", err) - } - _, err = writer.Write(txt) - return err - } - - if str, ok := data.(error); ok { - _, err := writer.Write([]byte(str.Error())) - return err - } - - if str, ok := data.(fmt.Stringer); ok { - _, err := writer.Write([]byte(str.String())) - return err - } - - v := reflect.Indirect(reflect.ValueOf(data)) - if t := v.Type(); t.Kind() == reflect.Struct || t.Kind() == reflect.Slice { - b, err := swag.WriteJSON(data) - if err != nil { - return err - } - _, err = writer.Write(b) - return err - } - if v.Kind() != reflect.String { - return fmt.Errorf("%T is not a supported type by the TextProducer", data) - } - - _, err := writer.Write([]byte(v.String())) - return err - }) -} diff --git a/vendor/github.com/go-openapi/runtime/values.go b/vendor/github.com/go-openapi/runtime/values.go deleted file mode 100644 index 11f5732af4e..00000000000 --- a/vendor/github.com/go-openapi/runtime/values.go +++ /dev/null @@ -1,19 +0,0 @@ -package runtime - -// Values typically represent parameters on a http request. -type Values map[string][]string - -// GetOK returns the values collection for the given key. -// When the key is present in the map it will return true for hasKey. -// When the value is not empty it will return true for hasValue. -func (v Values) GetOK(key string) (value []string, hasKey bool, hasValue bool) { - value, hasKey = v[key] - if !hasKey { - return - } - if len(value) == 0 { - return - } - hasValue = true - return -} diff --git a/vendor/github.com/go-openapi/runtime/xml.go b/vendor/github.com/go-openapi/runtime/xml.go deleted file mode 100644 index 821c7393dfb..00000000000 --- a/vendor/github.com/go-openapi/runtime/xml.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package runtime - -import ( - "encoding/xml" - "io" -) - -// XMLConsumer creates a new XML consumer -func XMLConsumer() Consumer { - return ConsumerFunc(func(reader io.Reader, data interface{}) error { - dec := xml.NewDecoder(reader) - return dec.Decode(data) - }) -} - -// XMLProducer creates a new XML producer -func XMLProducer() Producer { - return ProducerFunc(func(writer io.Writer, data interface{}) error { - enc := xml.NewEncoder(writer) - return enc.Encode(data) - }) -} diff --git a/vendor/github.com/go-openapi/runtime/yamlpc/yaml.go b/vendor/github.com/go-openapi/runtime/yamlpc/yaml.go deleted file mode 100644 index a1a0a589dfa..00000000000 --- a/vendor/github.com/go-openapi/runtime/yamlpc/yaml.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package yamlpc - -import ( - "io" - - "github.com/go-openapi/runtime" - "gopkg.in/yaml.v3" -) - -// YAMLConsumer creates a consumer for yaml data -func YAMLConsumer() runtime.Consumer { - return runtime.ConsumerFunc(func(r io.Reader, v interface{}) error { - dec := yaml.NewDecoder(r) - return dec.Decode(v) - }) -} - -// YAMLProducer creates a producer for yaml data -func YAMLProducer() runtime.Producer { - return runtime.ProducerFunc(func(w io.Writer, v interface{}) error { - enc := yaml.NewEncoder(w) - defer enc.Close() - return enc.Encode(v) - }) -} diff --git a/vendor/github.com/go-openapi/spec/.gitignore b/vendor/github.com/go-openapi/spec/.gitignore index dd91ed6a04e..f47cb2045f1 100644 --- a/vendor/github.com/go-openapi/spec/.gitignore +++ b/vendor/github.com/go-openapi/spec/.gitignore @@ -1,2 +1 @@ -secrets.yml -coverage.out +*.out diff --git a/vendor/github.com/go-openapi/spec/README.md b/vendor/github.com/go-openapi/spec/README.md index 18782c6dafe..7fd2810c698 100644 --- a/vendor/github.com/go-openapi/spec/README.md +++ b/vendor/github.com/go-openapi/spec/README.md @@ -1,8 +1,5 @@ -# OAI object model +# OpenAPI v2 object model [![Build Status](https://github.com/go-openapi/spec/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/spec/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/spec/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/spec) -[![Build Status](https://travis-ci.org/go-openapi/spec.svg?branch=master)](https://travis-ci.org/go-openapi/spec) - -[![codecov](https://codecov.io/gh/go-openapi/spec/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/spec) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/spec/master/LICENSE) [![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/spec.svg)](https://pkg.go.dev/github.com/go-openapi/spec) @@ -32,3 +29,26 @@ The object model for OpenAPI specification documents. > This [discussion thread](https://github.com/go-openapi/spec/issues/21) relates the full story. > > An early attempt to support Swagger 3 may be found at: https://github.com/go-openapi/spec3 + +* Does the unmarshaling support YAML? + +> Not directly. The exposed types know only how to unmarshal from JSON. +> +> In order to load a YAML document as a Swagger spec, you need to use the loaders provided by +> github.com/go-openapi/loads +> +> Take a look at the example there: https://pkg.go.dev/github.com/go-openapi/loads#example-Spec +> +> See also https://github.com/go-openapi/spec/issues/164 + +* How can I validate a spec? + +> Validation is provided by [the validate package](http://github.com/go-openapi/validate) + +* Why do we have an `ID` field for `Schema` which is not part of the swagger spec? + +> We found jsonschema compatibility more important: since `id` in jsonschema influences +> how `$ref` are resolved. +> This `id` does not conflict with any property named `id`. +> +> See also https://github.com/go-openapi/spec/issues/23 diff --git a/vendor/github.com/go-openapi/spec/bindata.go b/vendor/github.com/go-openapi/spec/bindata.go deleted file mode 100644 index afc83850c2e..00000000000 --- a/vendor/github.com/go-openapi/spec/bindata.go +++ /dev/null @@ -1,297 +0,0 @@ -// Code generated by go-bindata. DO NOT EDIT. -// sources: -// schemas/jsonschema-draft-04.json (4.357kB) -// schemas/v2/schema.json (40.248kB) - -package spec - -import ( - "bytes" - "compress/gzip" - "crypto/sha256" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "strings" - "time" -) - -func bindataRead(data []byte, name string) ([]byte, error) { - gz, err := gzip.NewReader(bytes.NewBuffer(data)) - if err != nil { - return nil, fmt.Errorf("read %q: %v", name, err) - } - - var buf bytes.Buffer - _, err = io.Copy(&buf, gz) - clErr := gz.Close() - - if err != nil { - return nil, fmt.Errorf("read %q: %v", name, err) - } - if clErr != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -type asset struct { - bytes []byte - info os.FileInfo - digest [sha256.Size]byte -} - -type bindataFileInfo struct { - name string - size int64 - mode os.FileMode - modTime time.Time -} - -func (fi bindataFileInfo) Name() string { - return fi.name -} -func (fi bindataFileInfo) Size() int64 { - return fi.size -} -func (fi bindataFileInfo) Mode() os.FileMode { - return fi.mode -} -func (fi bindataFileInfo) ModTime() time.Time { - return fi.modTime -} -func (fi bindataFileInfo) IsDir() bool { - return false -} -func (fi bindataFileInfo) Sys() interface{} { - return nil -} - -var _jsonschemaDraft04Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x57\x3d\x6f\xdb\x3c\x10\xde\xf3\x2b\x08\x26\x63\xf2\x2a\x2f\xd0\xc9\x5b\xd1\x2e\x01\x5a\x34\x43\x37\x23\x03\x6d\x9d\x6c\x06\x14\xa9\x50\x54\x60\xc3\xd0\x7f\x2f\x28\x4a\x14\x29\x91\x92\x2d\xa7\x8d\x97\x28\xbc\xaf\xe7\x8e\xf7\xc5\xd3\x0d\x42\x08\x61\x9a\xe2\x15\xc2\x7b\xa5\x8a\x55\x92\xbc\x96\x82\x3f\x94\xdb\x3d\xe4\xe4\x3f\x21\x77\x49\x2a\x49\xa6\x1e\x1e\xbf\x24\xe6\xec\x16\xdf\x1b\xa1\x3b\xf3\xff\x02\xc9\x14\xca\xad\xa4\x85\xa2\x82\x6b\xe9\x6f\x42\x02\x32\x2c\x28\x07\x45\x5a\x15\x3d\x77\x46\x39\xd5\xcc\x25\x5e\x21\x83\xb8\x21\x18\xb6\xaf\x52\x92\xa3\x47\x68\x88\xea\x58\x80\x56\x4e\x1a\xf2\xbd\x4f\xcc\x29\x7f\x52\x90\x6b\x7d\xff\x0f\x48\xb4\x3d\x3f\x21\x7c\x27\x21\xd3\x2a\x6e\x31\xaa\x2d\x53\xdd\xf3\xe3\x42\x94\x54\xd1\x77\x78\xe2\x0a\x76\x20\xe3\x20\x68\xcb\x30\x86\x41\xf3\x2a\xc7\x2b\xf4\x78\x8e\xfe\xef\x90\x91\x8a\xa9\xc7\xb1\x1d\xc2\xd8\x2f\x0d\x75\xed\xc1\x4e\x9c\xc8\x25\x43\xac\xa8\xbe\xd7\xcc\xa9\xd1\xa9\x21\xa0\x1a\xbd\x04\x61\x94\x34\x2f\x18\xfc\x3e\x16\x50\x8e\x4d\x03\x6f\x1c\x58\xdb\x48\x23\xbc\x11\x82\x01\xe1\xfa\xd3\x3a\x8e\x30\xaf\x18\x33\x7f\xf3\x8d\x39\x11\x9b\x57\xd8\x2a\xfd\x55\x2a\x49\xf9\x0e\xc7\xec\x37\xd4\x25\xf7\xec\x5c\x66\xc7\xd7\x99\xaa\xcf\x4f\x89\x8a\xd3\xb7\x0a\x3a\xaa\x92\x15\xf4\x30\x6f\x1c\xb0\xd6\x46\xe7\x98\x39\x2d\xa4\x28\x40\x2a\x3a\x88\x9e\x29\xba\x88\x37\x2d\xca\x60\x38\xfa\xba\x5b\x20\xac\xa8\x62\xb0\x4c\xd4\xaf\xda\x45\x0a\xba\x5c\x3b\xb9\xc7\x79\xc5\x14\x2d\x18\x34\x19\x1c\x51\xdb\x25\x4d\xb4\x7e\x06\x14\x38\x6c\x59\x55\xd2\x77\xf8\x69\x59\xfc\x7b\x73\xed\x93\x43\xcb\x32\x6d\x3c\x28\xdc\x1b\x9a\xd3\x62\xab\xc2\x27\xf7\x41\xc9\x08\x2b\x23\x08\xad\x13\x57\x21\x9c\xd3\x72\x0d\x42\x72\xf8\x01\x7c\xa7\xf6\x83\xce\x39\xd7\x82\x3c\x1f\x2f\xd6\x60\x1b\xa2\xdf\x35\x89\x52\x20\xe7\x73\x74\xe0\x66\x26\x64\x4e\xb4\x97\x58\xc2\x0e\x0e\xe1\x60\x92\x34\x6d\xa0\x10\xd6\xb5\x83\x61\x27\xe6\x47\xd3\x89\xbd\x63\xfd\x3b\x8d\x03\x3d\x6c\x42\x2d\x5b\x70\xee\xe8\xdf\x4b\xf4\x66\x4e\xe1\x01\x45\x17\x80\x74\xad\x4f\xc3\xf3\xae\xc6\x1d\xc6\xd7\xc2\xce\xc9\xe1\x29\x30\x86\x2f\x4a\xa6\x4b\x15\x84\x73\xc9\x6f\xfd\x7f\xa5\x6e\x9e\xbd\xf1\xb0\xd4\xdd\x45\x5a\xc2\x3e\x4b\x78\xab\xa8\x84\x74\x4a\x91\x3b\x92\x23\x05\xf2\x1c\x1e\x7b\xf3\x09\xf8\xcf\xab\x24\xb6\x60\xa2\xe8\x4c\x9f\x75\x77\xaa\x8c\xe6\x01\x45\x36\x86\xcf\xc3\x63\x3a\xea\xd4\x8d\x7e\x06\xac\x14\x0a\xe0\x29\xf0\xed\x07\x22\x1a\x65\xda\x44\xae\xa2\x73\x1a\xe6\x90\x69\xa2\x8c\x46\xb2\x2f\xde\x49\x38\x08\xed\xfe\xfd\x41\xaf\x9f\xa9\x55\xd7\xdd\x22\x8d\xfa\x45\x63\xc5\x0f\x80\xf3\xb4\x08\xd6\x79\x30\x9e\x93\xee\x59\xa6\xd0\x4b\xee\x22\xe3\x33\xc1\x3a\x27\x68\x36\x78\x7e\x87\x0a\x06\xd5\x2e\x20\xd3\xaf\x15\xfb\xd8\x3b\x73\x14\xbb\x92\xed\x05\x5d\x2e\x29\x38\x2c\x94\xe4\x42\x45\x5e\xd3\xb5\x7d\xdf\x47\xca\x38\xb4\x5c\xaf\xfb\x7d\xdd\x6d\xf4\xa1\x2d\x77\xdd\x2f\xce\x6d\xc4\x7b\x8b\x4e\x67\xa9\x6f\xfe\x04\x00\x00\xff\xff\xb1\xd1\x27\x78\x05\x11\x00\x00") - -func jsonschemaDraft04JsonBytes() ([]byte, error) { - return bindataRead( - _jsonschemaDraft04Json, - "jsonschema-draft-04.json", - ) -} - -func jsonschemaDraft04Json() (*asset, error) { - bytes, err := jsonschemaDraft04JsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "jsonschema-draft-04.json", size: 4357, mode: os.FileMode(0640), modTime: time.Unix(1568963823, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe1, 0x48, 0x9d, 0xb, 0x47, 0x55, 0xf0, 0x27, 0x93, 0x30, 0x25, 0x91, 0xd3, 0xfc, 0xb8, 0xf0, 0x7b, 0x68, 0x93, 0xa8, 0x2a, 0x94, 0xf2, 0x48, 0x95, 0xf8, 0xe4, 0xed, 0xf1, 0x1b, 0x82, 0xe2}} - return a, nil -} - -var _v2SchemaJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5d\x4f\x93\xdb\x36\xb2\xbf\xfb\x53\xa0\x14\x57\xd9\xae\xd8\x92\xe3\xf7\x2e\xcf\x97\xd4\xbc\xd8\x49\x66\x37\x5e\x4f\x79\x26\xbb\x87\x78\x5c\x05\x91\x2d\x09\x09\x09\x30\x00\x38\x33\x5a\xef\x7c\xf7\x2d\xf0\x9f\x08\x02\x20\x41\x8a\xd2\xc8\x0e\x0f\xa9\x78\x28\xa0\xd1\xdd\x68\x34\x7e\xdd\xf8\xf7\xf9\x11\x42\x33\x49\x64\x04\xb3\xd7\x68\x76\x86\xfe\x76\xf9\xfe\x1f\xe8\x32\xd8\x40\x8c\xd1\x8a\x71\x74\x79\x8b\xd7\x6b\xe0\xe8\xd5\xfc\x25\x3a\xbb\x38\x9f\xcf\x9e\xab\x0a\x24\x54\xa5\x37\x52\x26\xaf\x17\x0b\x91\x17\x99\x13\xb6\xb8\x79\xb5\x10\x59\xdd\xf9\xef\x82\xd1\x6f\xf2\xc2\x8f\xf3\x4f\xb5\x1a\xea\xc7\x17\x45\x41\xc6\xd7\x8b\x90\xe3\x95\x7c\xf1\xf2\x7f\x8b\xca\x45\x3d\xb9\x4d\x32\xa6\xd8\xf2\x77\x08\x64\xfe\x8d\xc3\x9f\x29\xe1\xa0\x9a\xff\xed\x11\x42\x08\xcd\x8a\xd6\xb3\x9f\x15\x67\x74\xc5\xca\x7f\x27\x58\x6e\xc4\xec\x11\x42\xd7\x59\x5d\x1c\x86\x44\x12\x46\x71\x74\xc1\x59\x02\x5c\x12\x10\xb3\xd7\x68\x85\x23\x01\x59\x81\x04\x4b\x09\x9c\x6a\xbf\x7e\xce\x49\x7d\xba\x7b\x51\xfd\xa1\x44\xe2\xb0\x52\xac\x7d\xb3\x08\x61\x45\x68\x46\x56\x2c\x6e\x80\x86\x8c\xbf\xbd\x93\x40\x05\x61\x74\x96\x95\xbe\x7f\x84\xd0\x7d\x4e\xde\x42\xb7\xe4\xbe\x46\xbb\x14\x5b\x48\x4e\xe8\xba\x90\x05\xa1\x19\xd0\x34\xae\xc4\xce\xbe\xbc\x9a\xbf\x9c\x15\x7f\x5d\x57\xc5\x42\x10\x01\x27\x89\xe2\x48\x51\xb9\xda\x40\xd5\x87\x37\xc0\x15\x5f\x88\xad\x90\xdc\x10\x81\x42\x16\xa4\x31\x50\x39\x2f\x38\xad\xab\xb0\x53\xd8\xac\x94\x56\x6f\xc3\x84\xf4\x11\xa4\x50\xb3\xfa\xe9\xd3\x6f\x9f\x3e\xdf\x2f\xd0\xeb\x8f\x1f\x3f\x7e\xbc\xfe\xf6\xe9\xf7\xaf\x5f\x7f\xfc\x18\x7e\xfb\xec\xfb\xc7\xb3\x36\x79\x54\x43\xe8\x29\xc5\x31\x20\xc6\x11\x49\x9e\xe5\x12\x41\x66\xa0\xe8\xed\x1d\x8e\x93\x08\x5e\xa3\x27\x3b\xc3\x7c\xa2\x73\xba\xc4\x02\x2e\xb0\xdc\xf4\xe5\x76\xd1\xca\x96\xa2\x8a\x94\xcd\x21\xc9\x6c\xec\x2c\x70\x42\x9e\x34\x74\x9d\x19\x7c\xcd\x20\x9c\xea\x2e\x0a\xfe\x42\x84\xd4\x29\x04\x8c\x8a\xb4\x41\xa2\xc1\xdc\x19\x8a\x88\x90\x4a\x49\xef\xce\xdf\xbd\x45\x4a\x52\x81\x70\x10\x40\x22\x21\x44\xcb\x6d\xc5\xec\x4e\x3c\x1c\x45\xef\x57\x9a\xb5\x7d\xae\xfe\xe5\xe4\x31\x86\x90\xe0\xab\x6d\x02\x3b\x2e\xcb\x11\x90\xd9\xa8\xc6\x77\xc2\x59\x98\x06\xfd\xf9\x2e\x78\x45\x01\xa6\xa8\xa0\x71\x5c\xbe\x33\xa7\xd2\xd9\x5f\x95\xef\xd9\xd5\xac\xfd\xdc\x5d\xbf\x5e\xb8\xd1\x3e\xc7\x31\x48\xe0\x5e\x4c\x14\x65\xdf\xb8\xa8\x71\x10\x09\xa3\xc2\xc7\x02\xcb\xa2\x4e\x5a\x02\x82\x94\x13\xb9\xf5\x30\xe6\xb2\xa4\xb5\xfe\x9b\x3e\x7a\xb2\x55\xd2\xa8\x4a\xbc\x16\xb6\x71\x8e\x39\xc7\xdb\x9d\xe1\x10\x09\x71\xbd\x9c\xb3\x41\x89\xd7\xa5\x89\xdc\x57\xb5\x53\x4a\xfe\x4c\xe1\xbc\xa0\x21\x79\x0a\x1a\x0f\x70\xa7\x5c\x08\x8e\xde\xb0\xc0\x43\x24\xad\x74\x63\x0e\xb1\xd9\x90\xe1\xb0\x2d\x13\xa7\x6d\x78\xfd\x04\x14\x38\x8e\x90\xaa\xce\x63\xac\x3e\x23\xbc\x64\xa9\xb4\xf8\x03\x63\xde\xcd\xbe\x16\x13\x4a\x55\xac\x82\x12\xc6\xac\xd4\x35\xf7\x22\xd4\x3a\xff\x22\x73\x0e\x6e\x51\xa0\x75\x1e\xae\x8f\xe8\x5d\xc7\x59\xe6\xe4\x9a\x18\x8d\xd6\x1c\x53\x84\x4d\xb7\x67\x28\x37\x09\x84\x69\x88\x12\x0e\x01\x11\x80\x32\xa2\xf5\xb9\xaa\xc6\xd9\x73\x53\xab\xfb\xb4\x2e\x20\xc6\x54\x92\xa0\x9a\xf3\x69\x1a\x2f\x81\x77\x37\xae\x53\x1a\xce\x40\xc4\xa8\x82\x1c\xb5\xef\xda\x24\x7d\xb9\x61\x69\x14\xa2\x25\xa0\x90\xac\x56\xc0\x81\x4a\xb4\xe2\x2c\xce\x4a\x64\x7a\x9a\x23\xf4\x13\x91\x3f\xa7\x4b\xf4\x63\x84\x6f\x18\x87\x10\xbd\xc3\xfc\x8f\x90\xdd\x52\x44\x04\xc2\x51\xc4\x6e\x21\x74\x48\x21\x81\xc7\xe2\xfd\xea\x12\xf8\x0d\x09\xf6\xe9\x47\x35\xaf\x67\xc4\x14\xf7\x22\x27\x97\xe1\xe2\x76\x2d\x06\x8c\x4a\x1c\x48\x3f\x73\x2d\x0b\x5b\x29\x45\x24\x00\x2a\x0c\x11\xec\x94\xca\xc2\xa6\xc1\x37\x21\x43\x83\x3b\x5f\x97\xf1\x43\x5e\x53\x73\x19\xa5\x36\xd8\x2d\x05\x2e\x34\x0b\xeb\x39\xfc\x1d\x63\x51\x01\xbd\x3d\xbb\x90\x84\x40\x25\x59\x6d\x09\x5d\xa3\x1c\x37\xe6\x5c\x16\x9a\x40\x09\x70\xc1\xe8\x82\xf1\x35\xa6\xe4\xdf\x99\x5c\x8e\x9e\x4d\x79\xb4\x27\x2f\xbf\x7e\xf8\x05\x25\x8c\x50\xa9\x98\x29\x90\x62\x60\xea\x75\xae\x13\xca\xbf\x2b\x1a\x29\x27\x76\xd6\x20\xc6\x64\x5f\xe6\x32\x1a\x08\x87\x21\x07\x21\xbc\xb4\xe4\xe0\x32\x67\xa6\xcd\xf3\x1e\xcd\xd9\x6b\xb6\x6f\x8e\x27\xa7\xed\xdb\xe7\xbc\xcc\x1a\x07\xce\x6f\x87\x33\xf0\xba\x51\x17\x22\x66\x78\x79\x8e\xce\xe5\x13\x81\x80\x06\x2c\xe5\x78\x0d\xa1\xb2\xb8\x54\xa8\x79\x09\xbd\xbf\x3c\x47\x01\x8b\x13\x2c\xc9\x32\xaa\xaa\x1d\xd5\xee\xab\x36\xbd\x6c\xfd\x54\x6c\xc8\x08\x01\x3c\xbd\xe7\x07\x88\xb0\x24\x37\x79\x90\x28\x4a\x1d\x10\x1a\x92\x1b\x12\xa6\x38\x42\x40\xc3\x4c\x43\x62\x8e\xae\x36\xb0\x45\x71\x2a\xa4\x9a\x23\x79\x59\xb1\xa8\xf2\xa4\x0c\x60\x9f\xcc\x8d\x40\xf5\x80\xca\xa8\x99\xc3\xa7\x85\x1f\x31\x25\xa9\x82\xc5\x6d\xbd\xd8\x36\x76\x7c\x02\x28\x97\xf6\x1d\x74\x3b\x11\x7e\x91\xae\x32\xf8\x6c\xf4\xe6\x7b\x9a\xa5\x1f\x62\xc6\x21\xcf\x9a\xe5\xed\x8b\x02\xf3\x2c\x33\x33\xdf\x00\xca\xc9\x09\xb4\x04\xf5\xa5\x08\xd7\xc3\x02\x18\x66\xf1\xab\x1e\x83\x37\x4c\xcd\x12\xc1\x1d\x50\xf6\xaa\xbd\xfe\xe2\x73\x48\x38\x08\xa0\x32\x9b\x18\x44\x86\x0b\x6a\xc1\xaa\x26\x96\x2d\x96\x3c\xa0\x54\x65\x73\xe3\x08\xb5\x8b\x99\xbd\x82\xbc\x9e\xc2\xe8\x53\x46\x83\x3f\x33\x54\x2b\x5b\xad\x92\x79\xd9\x8f\x5d\x93\x98\xf2\xe6\xc6\x1c\xe6\x9a\x9e\xfc\x43\x82\x31\x66\x8e\x53\x77\xfe\x90\xe7\xf3\xf6\xe9\x62\x23\x3f\x10\x93\x18\xae\x72\x1a\x9d\xf9\x48\xcb\xcc\x5a\x65\xc7\x4a\x04\xf0\xf3\xd5\xd5\x05\x8a\x41\x08\xbc\x86\x86\x43\x51\x6c\xe0\x46\x57\xf6\x44\x40\x0d\xfb\xff\xa2\xc3\x7c\x3d\x39\x84\xdc\x09\x22\x64\x4f\x12\xd9\xba\xaa\xf6\xe3\xbd\x56\xdd\x91\x25\x6a\x14\x9c\x89\x34\x8e\x31\xdf\xee\x15\x7e\x2f\x39\x81\x15\x2a\x28\x95\x66\x51\xf5\xfd\x83\xc5\xfe\x15\x07\xcf\xf7\x08\xee\x1d\x8e\xb6\xc5\x52\xcc\x8c\x5a\x93\x66\xc5\xd8\x79\x38\x46\xd6\xa7\x88\x37\xc9\x2e\xe3\xd2\xa5\x7b\x4b\x3a\xdc\xa1\xdc\x9e\x29\xf1\x8c\x8a\x99\x16\x47\x8d\xd4\x78\x8b\xf6\x1c\xe9\x71\x54\x1b\x69\xa8\x4a\x93\x37\xe5\xb2\x2c\x4f\x0c\x92\xab\xa0\x73\x32\x72\x59\xd3\xf0\x2d\x8d\xed\xca\x37\x16\x19\x9e\xdb\x1c\xab\x17\x49\xc3\x0f\x37\xdc\x88\xb1\xb4\xd4\x42\xcb\x58\x5e\x6a\x52\x0b\x15\x10\x0a\xb0\x04\xe7\xf8\x58\x32\x16\x01\xa6\xcd\x01\xb2\xc2\x69\x24\x35\x38\x6f\x30\x6a\xae\x1b\xb4\x71\xaa\xad\x1d\xa0\xd6\x20\x2d\x8b\x3c\xc6\x82\x62\x27\x34\x6d\x15\x84\x7b\x43\xb1\x35\x78\xa6\x24\x77\x28\xc1\x6e\xfc\xe9\x48\x74\xf4\x15\xe3\xe1\x84\x42\x88\x40\x7a\x26\x49\x3b\x48\xb1\xa4\x19\x8e\x0c\xa7\xb5\x01\x6c\x0c\x97\x61\x8a\xc2\x32\xd8\x8c\x44\x69\x24\xbf\x65\x1d\x74\xd6\xe5\x44\xef\xec\x48\x5e\xb7\x8a\xa3\x29\x8e\x41\x64\xce\x1f\x88\xdc\x00\x47\x4b\x40\x98\x6e\xd1\x0d\x8e\x48\x98\x63\x5c\x21\xb1\x4c\x05\x0a\x58\x98\xc5\x6d\x4f\x0a\x77\x53\x4f\x8b\xc4\x44\x1f\xb2\xdf\x8d\x3b\xea\x9f\xfe\xf6\xf2\xc5\xff\x5d\x7f\xfe\x9f\xfb\x67\x8f\xff\xf3\xe9\x69\xd1\xfe\xb3\xc7\xfd\x3c\xf8\x3f\x71\x94\x82\x23\xd1\x72\x00\xb7\x42\x99\x6c\xc0\x60\x7b\x0f\x79\xea\xa8\x53\x4b\x56\x31\xfa\x0b\x52\x9f\x96\xdb\xcd\x2f\xd7\x67\xcd\x04\x19\x85\xfe\xdb\x02\x9a\x59\x03\xad\x63\x3c\xea\xff\x2e\x18\xfd\x00\xd9\xe2\x56\x60\x59\x93\xb9\xb6\xb2\x3e\x3c\x2c\xab\x0f\xa7\xb2\x89\x43\xc7\xf6\xd5\xce\x2e\xad\xa6\xa9\xed\xa6\xc6\x5a\xb4\xa6\x67\xdf\x8c\x26\x7b\x50\x5a\x91\x08\x2e\x6d\xd4\x3a\xc1\x9d\xf2\xdb\xde\x1e\xb2\x2c\x6c\xa5\x64\xc9\x16\xb4\x90\xaa\x4a\xb7\x0c\xde\x13\xc3\x2a\x9a\x11\x9b\x7a\x1b\x3d\x95\x97\x37\x31\x6b\x69\x7e\x34\xc0\x67\x1f\x66\x19\x49\xef\xf1\x25\xf5\xac\x0e\xea\x0a\x28\x8d\x4d\x7e\xd9\x57\x4b\x49\xe5\xc6\xb3\x25\xfd\xe6\x57\x42\x25\xac\xcd\xcf\x36\x74\x8e\xca\x24\x47\xe7\x80\xa8\x92\x72\xbd\x3d\x84\x2d\x65\xe2\x82\x1a\x9c\xc4\x44\x92\x1b\x10\x79\x8a\xc4\x4a\x2f\x60\x51\x04\x81\xaa\xf0\xa3\x95\x27\xd7\x12\x7b\xa3\x96\x03\x45\x96\xc1\x8a\x07\xc9\xb2\xb0\x95\x52\x8c\xef\x48\x9c\xc6\x7e\x94\xca\xc2\x0e\x07\x12\x44\xa9\x20\x37\xf0\xae\x0f\x49\xa3\x96\x9d\x4b\x42\x7b\x70\x59\x14\xee\xe0\xb2\x0f\x49\xa3\x96\x4b\x97\xbf\x00\x5d\x4b\x4f\xfc\xbb\x2b\xee\x92\xb9\x17\xb5\xaa\xb8\x0b\x97\x17\x9b\x43\xfd\xd6\xc2\xb2\xc2\x2e\x29\xcf\xfd\x87\x4a\x55\xda\x25\x63\x1f\x5a\x65\x69\x2b\x2d\x3d\x67\xe9\x41\xae\x5e\xc1\x6e\x2b\xd4\xdb\x3e\xa8\xd3\x26\xd2\x48\x92\x24\xca\x61\x86\x8f\x8c\xbb\xf2\x8e\x91\xdf\x1f\x06\x19\x33\xf3\x03\x4d\xba\xcd\xe2\x2d\xfb\x69\xe9\x16\x15\x13\xd5\x56\x85\x4e\x3c\x5b\x8a\xbf\x25\x72\x83\xee\x5e\x20\x22\xf2\xc8\xaa\x7b\xdb\x8e\xe4\x29\x58\xca\x38\xb7\x3f\x2e\x59\xb8\xbd\xa8\x16\x16\xf7\xdb\x79\x51\x9f\x5a\xb4\x8d\x87\x3a\x6e\xbc\x3e\xc5\xb4\xcd\x58\xf9\xf5\x3c\xb9\x6f\x49\xaf\x57\xc1\xfa\x1c\x5d\x6d\x88\x8a\x8b\xd3\x28\xcc\xb7\xef\x10\x8a\x4a\x74\xa9\x4a\xa7\x62\xbf\x0d\x76\x23\x6f\x59\xd9\x31\xee\x40\x11\xfb\x28\xec\x8d\x22\x1c\x13\x5a\x64\x94\x23\x16\x60\xbb\xd2\x7c\xa0\x98\xb2\xe5\x6e\xbc\x54\x33\xe0\x3e\xb9\x52\x17\xdb\xb7\x1b\xc8\x12\x20\x8c\x23\xca\x64\x7e\x78\xa3\x62\x5b\x75\x56\xd9\x9e\x2a\x91\x27\xb0\x70\x34\x1f\x90\x89\xb5\x86\x73\x7e\x71\xda\x1e\xfb\x3a\x72\xdc\x5e\x79\x88\xcb\x74\x79\xd9\x64\xe4\xd4\xc2\x9e\xce\xb1\xfe\x85\x5a\xc0\xe9\x0c\x34\x3d\xd0\x43\xce\xa1\x36\x39\xd5\xa1\x4e\xf5\xf8\xb1\xa9\x23\x08\x75\x84\xac\x53\x6c\x3a\xc5\xa6\x53\x6c\x3a\xc5\xa6\x7f\xc5\xd8\xf4\x51\xfd\xff\x25\x4e\xfa\x33\x05\xbe\x9d\x60\xd2\x04\x93\x6a\x5f\x33\x9b\x98\x50\xd2\xe1\x50\x52\xc6\xcc\xdb\x38\x91\xdb\xe6\xaa\xa2\x8f\xa1\x6a\xa6\xd4\xc6\x56\xd6\x8c\x40\x02\x68\x48\xe8\x1a\xe1\x9a\xd9\x2e\xb7\x05\xc3\x34\xda\x2a\xbb\xcd\x12\x36\x98\x22\x50\x4c\xa1\x1b\xc5\xd5\x84\xf0\xbe\x24\x84\xf7\x2f\x22\x37\xef\x94\xd7\x9f\xa0\xde\x04\xf5\x26\xa8\x37\x41\x3d\x64\x40\x3d\xe5\xf2\xde\x60\x89\x27\xb4\x37\xa1\xbd\xda\xd7\xd2\x2c\x26\xc0\x37\x01\x3e\x1b\xef\x5f\x06\xe0\x6b\x7c\x5c\x91\x08\x26\x10\x38\x81\xc0\x09\x04\x76\x4a\x3d\x81\xc0\xbf\x12\x08\x4c\xb0\xdc\x7c\x99\x00\xd0\x75\x70\xb4\xf8\x5a\x7c\xea\xde\x3e\x39\x08\x30\x5a\x27\x35\xed\xb4\x65\xad\x69\x74\x10\x88\x79\xe2\x30\x52\x19\xd6\x04\x21\xa7\x95\xd5\x0e\x03\xf8\xda\x20\xd7\x84\xb4\x26\xa4\x35\x21\xad\x09\x69\x21\x03\x69\x51\x46\xff\xff\x18\x9b\x54\xed\x87\x47\x06\x9d\x4e\x73\x6e\x9a\xb3\xa9\xce\x83\x5e\x4b\xc6\x71\x20\x45\xd7\x72\xf5\x40\x72\x0e\x34\x6c\xf4\x6c\xf3\xba\x5e\x4b\x97\x0e\x52\xb8\xbe\x8b\x79\xa0\x10\x86\xa1\x75\xb0\x6f\xec\xc8\xf4\x3d\x4d\x7b\x86\xc2\x02\x31\x12\x51\xbf\x07\x94\xad\x10\xd6\x2e\x79\xcf\xe9\x1c\xf5\x1e\x31\x23\x5c\x18\xfb\x9c\xfb\x70\xe0\x62\xbd\xf7\xb5\x94\xcf\xf3\xf6\xfa\xc5\x4e\x9c\x85\x76\x1d\xae\x37\xbc\xde\xa3\x41\xcb\x29\xd0\x5e\x70\x67\x50\x93\x6d\x98\xa8\xd3\x67\x0f\x68\xb1\xeb\x38\x47\x07\x10\x1b\xd2\xe2\x18\x68\x6d\x40\xbb\xa3\x40\xba\x21\xf2\x8e\x81\xfb\xf6\x92\x77\x2f\x70\xe8\xdb\xb2\x36\xbf\x30\x91\xc5\x21\xe7\x45\xcc\x34\x0c\x48\x8e\xd0\xf2\x9b\x7c\x3c\xbd\x1c\x04\x3e\x07\xe8\x7c\x2f\x84\x7a\x48\x4d\x1f\xba\xe1\x76\x45\x7b\x60\xe0\x01\xca\xee\x04\xca\x31\xbe\x73\x5f\xa3\x70\x0c\xad\x1f\xa5\xf5\x76\xd5\xbb\xd2\x7e\xfb\x30\x90\xcf\xfa\x67\x7a\xe6\xc3\x37\x42\x19\xe2\xc9\x9c\x61\x4c\xe7\xd1\x77\x55\x86\x6e\x8f\x7b\x85\x42\x33\xa3\xaa\x57\xae\xfd\xd5\xcc\x9c\x56\x68\xe2\xde\x0e\xa8\x2c\xa9\xb0\x7d\xf0\x54\x2d\x80\xf2\x48\x39\x3d\x98\x1a\x6d\x0b\x9d\xba\x53\xfb\xce\xf8\xd1\x7e\xbb\x60\x4f\x06\xf5\xce\xda\xab\xeb\xca\xcb\xd5\xac\x20\xda\x72\x3b\xa2\x4b\x38\xd7\xb5\x89\xbe\x42\xd9\xb9\x73\xc4\x0c\x6d\xb7\xd9\xf8\x8d\xbd\x3e\x9c\xf5\x53\x68\x48\x14\x36\x8f\x09\xc5\x92\xf1\x21\xd1\x09\x07\x1c\xbe\xa7\x91\xf3\x6a\xc8\xc1\x57\xb0\xdd\xc5\xc6\x1d\xad\x76\x1d\xa8\x82\x0e\x4c\x38\xfe\xa5\x8c\xc5\x0a\x40\x5d\xa1\xbb\x98\xd1\xfb\x74\x61\xed\x1a\x98\xaf\x3c\x8c\x1e\xe3\xc2\x92\x29\x74\x3e\x99\xd0\xf9\x41\x50\xd0\x38\x4b\x57\x7e\x5b\x7a\x0e\xe6\xce\x4e\xd7\x19\x35\x57\xbb\x3c\x3c\xd2\x5e\x4f\x4b\x4c\xf7\x0f\x4d\x2b\x91\x5d\x94\xa6\x95\xc8\x69\x25\x72\x5a\x89\x7c\xb8\x95\xc8\x07\x80\x8c\xda\x9c\x64\x7b\xb7\x71\xdf\x57\x12\x4b\x9a\x1f\x72\x0c\x13\x03\xad\x3c\xd5\x4e\xde\x8e\x57\x13\x6d\x34\x86\xcf\x97\xe6\xa4\x68\xc4\xb0\xf6\xc9\xc2\xeb\x8d\x0b\xd7\xcd\xfe\xba\xa6\xf5\x30\xeb\x30\x33\xbe\xc7\x56\x27\xab\x08\xd9\x6d\xbb\x09\xee\x7c\x2d\xcf\xee\x87\x38\xac\xc8\xdd\x90\x9a\x58\x4a\x4e\x96\xa9\x79\x79\xf3\xde\x20\xf0\x96\xe3\x24\x19\xeb\xba\xf2\x53\x19\xab\x12\xaf\x47\xb3\xa0\x3e\xef\x9b\x8d\x6d\x6d\x7b\xde\x3b\x3b\x1a\xc0\x3f\x95\x7e\xed\x78\xfb\x76\xb8\xaf\xb3\xdd\xc5\xeb\x95\xed\x5a\x62\x41\x82\xb3\x54\x6e\x80\x4a\x92\x6f\x36\xbd\x34\xae\xde\x6f\xa4\xc0\xbc\x08\xe3\x84\xfc\x1d\xb6\xe3\xd0\x62\x38\x95\x9b\x57\xe7\x71\x12\x91\x80\xc8\x31\x69\x5e\x60\x21\x6e\x19\x0f\xc7\xa4\x79\x96\x28\x3e\x47\x54\x65\x41\x36\x08\x40\x88\x1f\x58\x08\x56\xaa\xd5\xbf\xaf\xad\x96\xd7\xd6\xcf\x87\xf5\x34\x0f\x71\x93\x6e\x26\xed\x98\x5b\x9f\x4f\xcf\x95\x34\xc6\xd7\x11\xfa\xb0\x81\x22\x1a\xdb\xdf\x8e\xdc\xc3\xb9\xf8\xdd\x5d\x3c\x74\xe6\xea\xb7\x8b\xbf\xf5\x6e\xb3\x46\x2e\x64\xf4\xab\x3c\x4e\xcf\x36\x1d\xfe\xfa\xb8\x36\xba\x8a\xd8\xad\xf6\xc6\x41\x2a\x37\x8c\x17\x0f\xda\xfe\xda\xe7\x65\xbc\x71\x2c\x36\x57\x8a\x47\x12\x4c\xf1\xbd\x77\x6b\xa4\x50\x7e\x77\x7b\x22\x60\x89\xef\xcd\xf5\xb9\x0c\x97\x79\x0d\x2b\x35\x43\xcb\x3d\x24\xf1\x78\xfc\xf8\xcb\x1f\x15\x06\xe2\x78\xd8\x51\x21\xd9\x1f\xf0\xf5\x8f\x86\xa4\x50\xfa\xb1\x47\x43\xa5\xdd\x69\x14\xe8\xa3\xc0\x86\x91\xa7\x81\x50\xb4\x7c\xc0\x81\x80\x77\x7a\x9f\xc6\xc2\xa9\x8c\x05\x33\xb0\x3b\x31\xa4\xf4\xd7\x1b\x26\x55\x97\x7c\x65\xf8\x69\x1a\x84\x8e\x41\x78\xd9\xec\xc5\x11\x16\x1e\x74\x91\xf5\x56\xf5\x57\x49\x47\x5c\x92\xa9\x1e\x99\x36\xf4\xdb\xb1\x0e\xd3\x78\x02\xb0\x9b\x25\xcb\xe9\xe9\x1d\x0d\x44\x01\x42\x08\x91\x64\xd9\xdd\x37\x08\x17\xef\xf9\xe5\x0f\xbd\x46\x91\xf5\xf9\x89\x92\x37\xdd\x89\x59\x44\x1f\x9c\xee\x34\x1e\xbe\x47\x83\x32\x72\x8e\x37\xdf\xac\x69\x38\xef\x75\xb0\xda\xdb\xac\x83\x94\x2f\x39\xa6\x62\x05\x1c\x25\x9c\x49\x16\xb0\xa8\x3c\xc7\x7e\x76\x71\x3e\x6f\xb5\x24\xe7\xe8\xb7\xb9\xc7\x6c\x43\x92\xee\x21\xd4\x17\xa1\x7f\xba\x35\xfe\xae\x39\xbc\xde\xba\x69\xd9\x8e\xe1\x62\xde\x64\x7d\x16\x88\x1b\xed\x29\x11\xfd\x4f\xa9\xff\x99\x90\xc4\xf6\xf4\xf9\x6e\xe9\x28\x23\xd7\xca\xe5\xee\xee\x9f\x63\xb1\x5b\xfb\x10\xd7\x2f\x1d\xf2\xe3\xbf\xb9\xb5\x6f\xa4\x6d\x7d\x25\x79\xfb\x24\x31\xea\x56\xbe\x5d\x53\xcd\x2d\x36\xa3\x6d\xdf\xab\x1c\xb8\x6d\x6f\xc0\x98\xa7\xdd\xaa\x86\x8c\x1d\x39\xa3\x9d\x70\x2b\x9b\x68\xd9\xfd\x33\xfe\xa9\xb6\x4a\x2e\x63\x0f\xcf\x68\x27\xd9\x4c\xb9\x46\x6d\xcb\xbe\xa1\xa8\xd6\x5f\xc6\xd6\x9f\xf1\x4f\xf4\xd4\xb4\x78\xd0\xd6\xf4\x13\x3c\x3b\xac\xd0\xdc\x90\x34\xda\xc9\xb4\x9a\x1a\x8d\xbd\x93\x87\xd4\xe2\x21\x1b\xb3\x2b\xd1\xbe\xe7\x69\xd4\x53\x67\xd5\x40\xa0\xe3\x19\x3f\x6d\x1a\xbc\x0e\x86\x3c\x10\xb4\x3d\x2a\xcd\x78\x32\xe6\xab\xbd\x36\xc9\xf4\x3a\x58\xae\xc3\xf4\x47\xea\xbf\xfb\x47\xff\x0d\x00\x00\xff\xff\xd2\x32\x5a\x28\x38\x9d\x00\x00") - -func v2SchemaJsonBytes() ([]byte, error) { - return bindataRead( - _v2SchemaJson, - "v2/schema.json", - ) -} - -func v2SchemaJson() (*asset, error) { - bytes, err := v2SchemaJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "v2/schema.json", size: 40248, mode: os.FileMode(0640), modTime: time.Unix(1568964748, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xab, 0x88, 0x5e, 0xf, 0xbf, 0x17, 0x74, 0x0, 0xb2, 0x5a, 0x7f, 0xbc, 0x58, 0xcd, 0xc, 0x25, 0x73, 0xd5, 0x29, 0x1c, 0x7a, 0xd0, 0xce, 0x79, 0xd4, 0x89, 0x31, 0x27, 0x90, 0xf2, 0xff, 0xe6}} - return a, nil -} - -// Asset loads and returns the asset for the given name. -// It returns an error if the asset could not be found or -// could not be loaded. -func Asset(name string) ([]byte, error) { - canonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[canonicalName]; ok { - a, err := f() - if err != nil { - return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) - } - return a.bytes, nil - } - return nil, fmt.Errorf("Asset %s not found", name) -} - -// AssetString returns the asset contents as a string (instead of a []byte). -func AssetString(name string) (string, error) { - data, err := Asset(name) - return string(data), err -} - -// MustAsset is like Asset but panics when Asset would return an error. -// It simplifies safe initialization of global variables. -func MustAsset(name string) []byte { - a, err := Asset(name) - if err != nil { - panic("asset: Asset(" + name + "): " + err.Error()) - } - - return a -} - -// MustAssetString is like AssetString but panics when Asset would return an -// error. It simplifies safe initialization of global variables. -func MustAssetString(name string) string { - return string(MustAsset(name)) -} - -// AssetInfo loads and returns the asset info for the given name. -// It returns an error if the asset could not be found or -// could not be loaded. -func AssetInfo(name string) (os.FileInfo, error) { - canonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[canonicalName]; ok { - a, err := f() - if err != nil { - return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) - } - return a.info, nil - } - return nil, fmt.Errorf("AssetInfo %s not found", name) -} - -// AssetDigest returns the digest of the file with the given name. It returns an -// error if the asset could not be found or the digest could not be loaded. -func AssetDigest(name string) ([sha256.Size]byte, error) { - canonicalName := strings.Replace(name, "\\", "/", -1) - if f, ok := _bindata[canonicalName]; ok { - a, err := f() - if err != nil { - return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err) - } - return a.digest, nil - } - return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name) -} - -// Digests returns a map of all known files and their checksums. -func Digests() (map[string][sha256.Size]byte, error) { - mp := make(map[string][sha256.Size]byte, len(_bindata)) - for name := range _bindata { - a, err := _bindata[name]() - if err != nil { - return nil, err - } - mp[name] = a.digest - } - return mp, nil -} - -// AssetNames returns the names of the assets. -func AssetNames() []string { - names := make([]string, 0, len(_bindata)) - for name := range _bindata { - names = append(names, name) - } - return names -} - -// _bindata is a table, holding each asset generator, mapped to its name. -var _bindata = map[string]func() (*asset, error){ - "jsonschema-draft-04.json": jsonschemaDraft04Json, - - "v2/schema.json": v2SchemaJson, -} - -// AssetDir returns the file names below a certain -// directory embedded in the file by go-bindata. -// For example if you run go-bindata on data/... and data contains the -// following hierarchy: -// data/ -// foo.txt -// img/ -// a.png -// b.png -// then AssetDir("data") would return []string{"foo.txt", "img"}, -// AssetDir("data/img") would return []string{"a.png", "b.png"}, -// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and -// AssetDir("") will return []string{"data"}. -func AssetDir(name string) ([]string, error) { - node := _bintree - if len(name) != 0 { - canonicalName := strings.Replace(name, "\\", "/", -1) - pathList := strings.Split(canonicalName, "/") - for _, p := range pathList { - node = node.Children[p] - if node == nil { - return nil, fmt.Errorf("Asset %s not found", name) - } - } - } - if node.Func != nil { - return nil, fmt.Errorf("Asset %s not found", name) - } - rv := make([]string, 0, len(node.Children)) - for childName := range node.Children { - rv = append(rv, childName) - } - return rv, nil -} - -type bintree struct { - Func func() (*asset, error) - Children map[string]*bintree -} - -var _bintree = &bintree{nil, map[string]*bintree{ - "jsonschema-draft-04.json": {jsonschemaDraft04Json, map[string]*bintree{}}, - "v2": {nil, map[string]*bintree{ - "schema.json": {v2SchemaJson, map[string]*bintree{}}, - }}, -}} - -// RestoreAsset restores an asset under the given directory. -func RestoreAsset(dir, name string) error { - data, err := Asset(name) - if err != nil { - return err - } - info, err := AssetInfo(name) - if err != nil { - return err - } - err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755)) - if err != nil { - return err - } - err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) - if err != nil { - return err - } - return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) -} - -// RestoreAssets restores an asset under the given directory recursively. -func RestoreAssets(dir, name string) error { - children, err := AssetDir(name) - // File - if err != nil { - return RestoreAsset(dir, name) - } - // Dir - for _, child := range children { - err = RestoreAssets(dir, filepath.Join(name, child)) - if err != nil { - return err - } - } - return nil -} - -func _filePath(dir, name string) string { - canonicalName := strings.Replace(name, "\\", "/", -1) - return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...) -} diff --git a/vendor/github.com/go-openapi/spec/embed.go b/vendor/github.com/go-openapi/spec/embed.go new file mode 100644 index 00000000000..1f4284750ab --- /dev/null +++ b/vendor/github.com/go-openapi/spec/embed.go @@ -0,0 +1,17 @@ +package spec + +import ( + "embed" + "path" +) + +//go:embed schemas/*.json schemas/*/*.json +var assets embed.FS + +func jsonschemaDraft04JSONBytes() ([]byte, error) { + return assets.ReadFile(path.Join("schemas", "jsonschema-draft-04.json")) +} + +func v2SchemaJSONBytes() ([]byte, error) { + return assets.ReadFile(path.Join("schemas", "v2", "schema.json")) +} diff --git a/vendor/github.com/go-openapi/spec/expander.go b/vendor/github.com/go-openapi/spec/expander.go index 012a4627cc4..b81a5699a03 100644 --- a/vendor/github.com/go-openapi/spec/expander.go +++ b/vendor/github.com/go-openapi/spec/expander.go @@ -57,7 +57,7 @@ func ExpandSpec(spec *Swagger, options *ExpandOptions) error { if !options.SkipSchemas { for key, definition := range spec.Definitions { parentRefs := make([]string, 0, 10) - parentRefs = append(parentRefs, fmt.Sprintf("#/definitions/%s", key)) + parentRefs = append(parentRefs, "#/definitions/"+key) def, err := expandSchema(definition, parentRefs, resolver, specBasePath) if resolver.shouldStopOnError(err) { @@ -102,15 +102,21 @@ const rootBase = ".root" // baseForRoot loads in the cache the root document and produces a fake ".root" base path entry // for further $ref resolution -// -// Setting the cache is optional and this parameter may safely be left to nil. func baseForRoot(root interface{}, cache ResolutionCache) string { + // cache the root document to resolve $ref's + normalizedBase := normalizeBase(rootBase) + if root == nil { - return "" + // ensure that we never leave a nil root: always cache the root base pseudo-document + cachedRoot, found := cache.Get(normalizedBase) + if found && cachedRoot != nil { + // the cache is already preloaded with a root + return normalizedBase + } + + root = map[string]interface{}{} } - // cache the root document to resolve $ref's - normalizedBase := normalizeBase(rootBase) cache.Set(normalizedBase, root) return normalizedBase @@ -207,7 +213,19 @@ func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader, ba } if target.Ref.String() != "" { - return expandSchemaRef(target, parentRefs, resolver, basePath) + if !resolver.options.SkipSchemas { + return expandSchemaRef(target, parentRefs, resolver, basePath) + } + + // when "expand" with SkipSchema, we just rebase the existing $ref without replacing + // the full schema. + rebasedRef, err := NewRef(normalizeURI(target.Ref.String(), basePath)) + if err != nil { + return nil, err + } + target.Ref = denormalizeRef(&rebasedRef, resolver.context.basePath, resolver.context.rootID) + + return &target, nil } for k := range target.Definitions { @@ -519,21 +537,25 @@ func getRefAndSchema(input interface{}) (*Ref, *Schema, error) { } func expandParameterOrResponse(input interface{}, resolver *schemaLoader, basePath string) error { - ref, _, err := getRefAndSchema(input) + ref, sch, err := getRefAndSchema(input) if err != nil { return err } - if ref == nil { + if ref == nil && sch == nil { // nothing to do return nil } parentRefs := make([]string, 0, 10) - if err = resolver.deref(input, parentRefs, basePath); resolver.shouldStopOnError(err) { - return err + if ref != nil { + // dereference this $ref + if err = resolver.deref(input, parentRefs, basePath); resolver.shouldStopOnError(err) { + return err + } + + ref, sch, _ = getRefAndSchema(input) } - ref, sch, _ := getRefAndSchema(input) if ref.String() != "" { transitiveResolver := resolver.transitiveResolver(basePath, *ref) basePath = resolver.updateBasePath(transitiveResolver, basePath) @@ -545,6 +567,7 @@ func expandParameterOrResponse(input interface{}, resolver *schemaLoader, basePa if ref != nil { *ref = Ref{} } + return nil } @@ -554,38 +577,29 @@ func expandParameterOrResponse(input interface{}, resolver *schemaLoader, basePa return ern } - switch { - case resolver.isCircular(&rebasedRef, basePath, parentRefs...): + if resolver.isCircular(&rebasedRef, basePath, parentRefs...) { // this is a circular $ref: stop expansion if !resolver.options.AbsoluteCircularRef { sch.Ref = denormalizeRef(&rebasedRef, resolver.context.basePath, resolver.context.rootID) } else { sch.Ref = rebasedRef } - case !resolver.options.SkipSchemas: - // schema expanded to a $ref in another root - sch.Ref = rebasedRef - debugLog("rebased to: %s", sch.Ref.String()) - default: - // skip schema expansion but rebase $ref to schema - sch.Ref = denormalizeRef(&rebasedRef, resolver.context.basePath, resolver.context.rootID) } } + // $ref expansion or rebasing is performed by expandSchema below if ref != nil { *ref = Ref{} } // expand schema - if !resolver.options.SkipSchemas { - s, err := expandSchema(*sch, parentRefs, resolver, basePath) - if resolver.shouldStopOnError(err) { - return err - } - if s == nil { - // guard for when continuing on error - return nil - } + // yes, we do it even if options.SkipSchema is true: we have to go down that rabbit hole and rebase nested $ref) + s, err := expandSchema(*sch, parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return err + } + + if s != nil { // guard for when continuing on error *sch = *s } diff --git a/vendor/github.com/go-openapi/spec/schema_loader.go b/vendor/github.com/go-openapi/spec/schema_loader.go index b81175afdf4..0059b99aed5 100644 --- a/vendor/github.com/go-openapi/spec/schema_loader.go +++ b/vendor/github.com/go-openapi/spec/schema_loader.go @@ -168,14 +168,7 @@ func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error) normalized := normalizeBase(pth) debugLog("loading doc from: %s", normalized) - unescaped, err := url.PathUnescape(normalized) - if err != nil { - return nil, url.URL{}, false, err - } - - u := url.URL{Path: unescaped} - - data, fromCache := r.cache.Get(u.RequestURI()) + data, fromCache := r.cache.Get(normalized) if fromCache { return data, toFetch, fromCache, nil } diff --git a/vendor/github.com/go-openapi/spec/schemas/jsonschema-draft-04.json b/vendor/github.com/go-openapi/spec/schemas/jsonschema-draft-04.json new file mode 100644 index 00000000000..bcbb84743e3 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/schemas/jsonschema-draft-04.json @@ -0,0 +1,149 @@ +{ + "id": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "positiveInteger": { + "type": "integer", + "minimum": 0 + }, + "positiveIntegerDefault0": { + "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ] + }, + "simpleTypes": { + "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1, + "uniqueItems": true + } + }, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "$schema": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": {}, + "multipleOf": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { "$ref": "#/definitions/positiveInteger" }, + "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "items": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/schemaArray" } + ], + "default": {} + }, + "maxItems": { "$ref": "#/definitions/positiveInteger" }, + "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { "$ref": "#/definitions/positiveInteger" }, + "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/stringArray" } + ] + } + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { "type": "string" }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } + }, + "dependencies": { + "exclusiveMaximum": [ "maximum" ], + "exclusiveMinimum": [ "minimum" ] + }, + "default": {} +} diff --git a/vendor/github.com/go-openapi/spec/schemas/v2/schema.json b/vendor/github.com/go-openapi/spec/schemas/v2/schema.json new file mode 100644 index 00000000000..ebe10ed32d6 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/schemas/v2/schema.json @@ -0,0 +1,1607 @@ +{ + "title": "A JSON Schema for Swagger 2.0 API.", + "id": "http://swagger.io/v2/schema.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "required": [ + "swagger", + "info", + "paths" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "swagger": { + "type": "string", + "enum": [ + "2.0" + ], + "description": "The Swagger version of this document." + }, + "info": { + "$ref": "#/definitions/info" + }, + "host": { + "type": "string", + "pattern": "^[^{}/ :\\\\]+(?::\\d+)?$", + "description": "The host (name or ip) of the API. Example: 'swagger.io'" + }, + "basePath": { + "type": "string", + "pattern": "^/", + "description": "The base path to the API. Example: '/api'." + }, + "schemes": { + "$ref": "#/definitions/schemesList" + }, + "consumes": { + "description": "A list of MIME types accepted by the API.", + "allOf": [ + { + "$ref": "#/definitions/mediaTypeList" + } + ] + }, + "produces": { + "description": "A list of MIME types the API can produce.", + "allOf": [ + { + "$ref": "#/definitions/mediaTypeList" + } + ] + }, + "paths": { + "$ref": "#/definitions/paths" + }, + "definitions": { + "$ref": "#/definitions/definitions" + }, + "parameters": { + "$ref": "#/definitions/parameterDefinitions" + }, + "responses": { + "$ref": "#/definitions/responseDefinitions" + }, + "security": { + "$ref": "#/definitions/security" + }, + "securityDefinitions": { + "$ref": "#/definitions/securityDefinitions" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + } + }, + "definitions": { + "info": { + "type": "object", + "description": "General information about the API.", + "required": [ + "version", + "title" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." + }, + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed." + }, + "termsOfService": { + "type": "string", + "description": "The terms of service for the API." + }, + "contact": { + "$ref": "#/definitions/contact" + }, + "license": { + "$ref": "#/definitions/license" + } + } + }, + "contact": { + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "license": { + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "paths": { + "type": "object", + "description": "Relative paths to the individual endpoints. They must be relative to the 'basePath'.", + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + }, + "^/": { + "$ref": "#/definitions/pathItem" + } + }, + "additionalProperties": false + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "description": "One or more JSON objects describing the schemas being consumed and produced by the API." + }, + "parameterDefinitions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/parameter" + }, + "description": "One or more JSON representations for parameters" + }, + "responseDefinitions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/response" + }, + "description": "One or more JSON representations for responses" + }, + "externalDocs": { + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "examples": { + "type": "object", + "additionalProperties": true + }, + "mimeType": { + "type": "string", + "description": "The MIME type of the HTTP message." + }, + "operation": { + "type": "object", + "required": [ + "responses" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the operation." + }, + "description": { + "type": "string", + "description": "A longer description of the operation, GitHub Flavored Markdown is allowed." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "operationId": { + "type": "string", + "description": "A unique identifier of the operation." + }, + "produces": { + "description": "A list of MIME types the API can produce.", + "allOf": [ + { + "$ref": "#/definitions/mediaTypeList" + } + ] + }, + "consumes": { + "description": "A list of MIME types the API can consume.", + "allOf": [ + { + "$ref": "#/definitions/mediaTypeList" + } + ] + }, + "parameters": { + "$ref": "#/definitions/parametersList" + }, + "responses": { + "$ref": "#/definitions/responses" + }, + "schemes": { + "$ref": "#/definitions/schemesList" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "security": { + "$ref": "#/definitions/security" + } + } + }, + "pathItem": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "get": { + "$ref": "#/definitions/operation" + }, + "put": { + "$ref": "#/definitions/operation" + }, + "post": { + "$ref": "#/definitions/operation" + }, + "delete": { + "$ref": "#/definitions/operation" + }, + "options": { + "$ref": "#/definitions/operation" + }, + "head": { + "$ref": "#/definitions/operation" + }, + "patch": { + "$ref": "#/definitions/operation" + }, + "parameters": { + "$ref": "#/definitions/parametersList" + } + } + }, + "responses": { + "type": "object", + "description": "Response objects names can either be any valid HTTP status code or 'default'.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^([0-9]{3})$|^(default)$": { + "$ref": "#/definitions/responseValue" + }, + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "not": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + } + }, + "responseValue": { + "oneOf": [ + { + "$ref": "#/definitions/response" + }, + { + "$ref": "#/definitions/jsonReference" + } + ] + }, + "response": { + "type": "object", + "required": [ + "description" + ], + "properties": { + "description": { + "type": "string" + }, + "schema": { + "oneOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "$ref": "#/definitions/fileSchema" + } + ] + }, + "headers": { + "$ref": "#/definitions/headers" + }, + "examples": { + "$ref": "#/definitions/examples" + } + }, + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/header" + } + }, + "header": { + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "string", + "number", + "integer", + "boolean", + "array" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormat" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "vendorExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + }, + "bodyParameter": { + "type": "object", + "required": [ + "name", + "in", + "schema" + ], + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "in": { + "type": "string", + "description": "Determines the location of the parameter.", + "enum": [ + "body" + ] + }, + "required": { + "type": "boolean", + "description": "Determines whether or not this parameter is required or optional.", + "default": false + }, + "schema": { + "$ref": "#/definitions/schema" + } + }, + "additionalProperties": false + }, + "headerParameterSubSchema": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "required": { + "type": "boolean", + "description": "Determines whether or not this parameter is required or optional.", + "default": false + }, + "in": { + "type": "string", + "description": "Determines the location of the parameter.", + "enum": [ + "header" + ] + }, + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "type": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "integer", + "array" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormat" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + } + } + }, + "queryParameterSubSchema": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "required": { + "type": "boolean", + "description": "Determines whether or not this parameter is required or optional.", + "default": false + }, + "in": { + "type": "string", + "description": "Determines the location of the parameter.", + "enum": [ + "query" + ] + }, + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "allowEmptyValue": { + "type": "boolean", + "default": false, + "description": "allows sending a parameter by name only or with an empty value." + }, + "type": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "integer", + "array" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormatWithMulti" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + } + } + }, + "formDataParameterSubSchema": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "required": { + "type": "boolean", + "description": "Determines whether or not this parameter is required or optional.", + "default": false + }, + "in": { + "type": "string", + "description": "Determines the location of the parameter.", + "enum": [ + "formData" + ] + }, + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "allowEmptyValue": { + "type": "boolean", + "default": false, + "description": "allows sending a parameter by name only or with an empty value." + }, + "type": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "integer", + "array", + "file" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormatWithMulti" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + } + } + }, + "pathParameterSubSchema": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "required": [ + "required" + ], + "properties": { + "required": { + "type": "boolean", + "enum": [ + true + ], + "description": "Determines whether or not this parameter is required or optional." + }, + "in": { + "type": "string", + "description": "Determines the location of the parameter.", + "enum": [ + "path" + ] + }, + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "type": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "integer", + "array" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormat" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + } + } + }, + "nonBodyParameter": { + "type": "object", + "required": [ + "name", + "in", + "type" + ], + "oneOf": [ + { + "$ref": "#/definitions/headerParameterSubSchema" + }, + { + "$ref": "#/definitions/formDataParameterSubSchema" + }, + { + "$ref": "#/definitions/queryParameterSubSchema" + }, + { + "$ref": "#/definitions/pathParameterSubSchema" + } + ] + }, + "parameter": { + "oneOf": [ + { + "$ref": "#/definitions/bodyParameter" + }, + { + "$ref": "#/definitions/nonBodyParameter" + } + ] + }, + "schema": { + "type": "object", + "description": "A deterministic version of a JSON Schema object.", + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "format": { + "type": "string" + }, + "title": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + }, + "description": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + }, + "default": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + }, + "multipleOf": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + }, + "maximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + }, + "exclusiveMaximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + }, + "minimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + }, + "exclusiveMinimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + }, + "maxLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "pattern": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + }, + "maxItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + }, + "maxProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "required": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + }, + "enum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + }, + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "type": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/type" + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "discriminator": { + "type": "string" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/xml" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "example": {} + }, + "additionalProperties": false + }, + "fileSchema": { + "type": "object", + "description": "A deterministic version of a JSON Schema object.", + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "required": [ + "type" + ], + "properties": { + "format": { + "type": "string" + }, + "title": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + }, + "description": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + }, + "default": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + }, + "required": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "example": {} + }, + "additionalProperties": false + }, + "primitivesItems": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "string", + "number", + "integer", + "boolean", + "array" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormat" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/securityRequirement" + }, + "uniqueItems": true + }, + "securityRequirement": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "xml": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "tag": { + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "securityDefinitions": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/basicAuthenticationSecurity" + }, + { + "$ref": "#/definitions/apiKeySecurity" + }, + { + "$ref": "#/definitions/oauth2ImplicitSecurity" + }, + { + "$ref": "#/definitions/oauth2PasswordSecurity" + }, + { + "$ref": "#/definitions/oauth2ApplicationSecurity" + }, + { + "$ref": "#/definitions/oauth2AccessCodeSecurity" + } + ] + } + }, + "basicAuthenticationSecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "basic" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "apiKeySecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "oauth2ImplicitSecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "flow", + "authorizationUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flow": { + "type": "string", + "enum": [ + "implicit" + ] + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + }, + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "oauth2PasswordSecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "flow", + "tokenUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flow": { + "type": "string", + "enum": [ + "password" + ] + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "oauth2ApplicationSecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "flow", + "tokenUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flow": { + "type": "string", + "enum": [ + "application" + ] + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "oauth2AccessCodeSecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "flow", + "authorizationUrl", + "tokenUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flow": { + "type": "string", + "enum": [ + "accessCode" + ] + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + }, + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "mediaTypeList": { + "type": "array", + "items": { + "$ref": "#/definitions/mimeType" + }, + "uniqueItems": true + }, + "parametersList": { + "type": "array", + "description": "The parameters needed to send a valid API call.", + "additionalItems": false, + "items": { + "oneOf": [ + { + "$ref": "#/definitions/parameter" + }, + { + "$ref": "#/definitions/jsonReference" + } + ] + }, + "uniqueItems": true + }, + "schemesList": { + "type": "array", + "description": "The transfer protocol of the API.", + "items": { + "type": "string", + "enum": [ + "http", + "https", + "ws", + "wss" + ] + }, + "uniqueItems": true + }, + "collectionFormat": { + "type": "string", + "enum": [ + "csv", + "ssv", + "tsv", + "pipes" + ], + "default": "csv" + }, + "collectionFormatWithMulti": { + "type": "string", + "enum": [ + "csv", + "ssv", + "tsv", + "pipes", + "multi" + ], + "default": "csv" + }, + "title": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + }, + "description": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + }, + "default": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + }, + "multipleOf": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + }, + "maximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + }, + "exclusiveMaximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + }, + "minimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + }, + "exclusiveMinimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + }, + "maxLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "pattern": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + }, + "maxItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + }, + "enum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + }, + "jsonReference": { + "type": "object", + "required": [ + "$ref" + ], + "additionalProperties": false, + "properties": { + "$ref": { + "type": "string" + } + } + } + } +} diff --git a/vendor/github.com/go-openapi/spec/spec.go b/vendor/github.com/go-openapi/spec/spec.go index b3885034eb7..876aa12759d 100644 --- a/vendor/github.com/go-openapi/spec/spec.go +++ b/vendor/github.com/go-openapi/spec/spec.go @@ -41,7 +41,7 @@ func MustLoadJSONSchemaDraft04() *Schema { // JSONSchemaDraft04 loads the json schema document for json shema draft04 func JSONSchemaDraft04() (*Schema, error) { - b, err := Asset("jsonschema-draft-04.json") + b, err := jsonschemaDraft04JSONBytes() if err != nil { return nil, err } @@ -65,7 +65,7 @@ func MustLoadSwagger20Schema() *Schema { // Swagger20Schema loads the swagger 2.0 schema from the embedded assets func Swagger20Schema() (*Schema, error) { - b, err := Asset("v2/schema.json") + b, err := v2SchemaJSONBytes() if err != nil { return nil, err } diff --git a/vendor/github.com/go-openapi/spec/url_go18.go b/vendor/github.com/go-openapi/spec/url_go18.go deleted file mode 100644 index 60b78515363..00000000000 --- a/vendor/github.com/go-openapi/spec/url_go18.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build !go1.19 -// +build !go1.19 - -package spec - -import "net/url" - -var parseURL = url.Parse diff --git a/vendor/github.com/go-openapi/spec/url_go19.go b/vendor/github.com/go-openapi/spec/url_go19.go index 392e3e6395b..5bdfe40bcc1 100644 --- a/vendor/github.com/go-openapi/spec/url_go19.go +++ b/vendor/github.com/go-openapi/spec/url_go19.go @@ -1,6 +1,3 @@ -//go:build go1.19 -// +build go1.19 - package spec import "net/url" diff --git a/vendor/github.com/go-openapi/swag/BENCHMARK.md b/vendor/github.com/go-openapi/swag/BENCHMARK.md new file mode 100644 index 00000000000..e7f28ed6b78 --- /dev/null +++ b/vendor/github.com/go-openapi/swag/BENCHMARK.md @@ -0,0 +1,52 @@ +# Benchmarks + +## Name mangling utilities + +```bash +go test -bench XXX -run XXX -benchtime 30s +``` + +### Benchmarks at b3e7a5386f996177e4808f11acb2aa93a0f660df + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz +BenchmarkToXXXName/ToGoName-4 862623 44101 ns/op 10450 B/op 732 allocs/op +BenchmarkToXXXName/ToVarName-4 853656 40728 ns/op 10468 B/op 734 allocs/op +BenchmarkToXXXName/ToFileName-4 1268312 27813 ns/op 9785 B/op 617 allocs/op +BenchmarkToXXXName/ToCommandName-4 1276322 27903 ns/op 9785 B/op 617 allocs/op +BenchmarkToXXXName/ToHumanNameLower-4 895334 40354 ns/op 10472 B/op 731 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-4 882441 40678 ns/op 10566 B/op 749 allocs/op +``` + +### Benchmarks after PR #79 + +~ x10 performance improvement and ~ /100 memory allocations. + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz +BenchmarkToXXXName/ToGoName-4 9595830 3991 ns/op 42 B/op 5 allocs/op +BenchmarkToXXXName/ToVarName-4 9194276 3984 ns/op 62 B/op 7 allocs/op +BenchmarkToXXXName/ToFileName-4 17002711 2123 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToCommandName-4 16772926 2111 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToHumanNameLower-4 9788331 3749 ns/op 92 B/op 6 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-4 9188260 3941 ns/op 104 B/op 6 allocs/op +``` + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: AMD Ryzen 7 5800X 8-Core Processor +BenchmarkToXXXName/ToGoName-16 18527378 1972 ns/op 42 B/op 5 allocs/op +BenchmarkToXXXName/ToVarName-16 15552692 2093 ns/op 62 B/op 7 allocs/op +BenchmarkToXXXName/ToFileName-16 32161176 1117 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToCommandName-16 32256634 1137 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToHumanNameLower-16 18599661 1946 ns/op 92 B/op 6 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-16 17581353 2054 ns/op 105 B/op 6 allocs/op +``` diff --git a/vendor/github.com/go-openapi/swag/initialism_index.go b/vendor/github.com/go-openapi/swag/initialism_index.go index 03555184d1b..20a359bb60a 100644 --- a/vendor/github.com/go-openapi/swag/initialism_index.go +++ b/vendor/github.com/go-openapi/swag/initialism_index.go @@ -16,9 +16,130 @@ package swag import ( "sort" + "strings" "sync" ) +var ( + // commonInitialisms are common acronyms that are kept as whole uppercased words. + commonInitialisms *indexOfInitialisms + + // initialisms is a slice of sorted initialisms + initialisms []string + + // a copy of initialisms pre-baked as []rune + initialismsRunes [][]rune + initialismsUpperCased [][]rune + + isInitialism func(string) bool + + maxAllocMatches int +) + +func init() { + // Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769 + configuredInitialisms := map[string]bool{ + "ACL": true, + "API": true, + "ASCII": true, + "CPU": true, + "CSS": true, + "DNS": true, + "EOF": true, + "GUID": true, + "HTML": true, + "HTTPS": true, + "HTTP": true, + "ID": true, + "IP": true, + "IPv4": true, + "IPv6": true, + "JSON": true, + "LHS": true, + "OAI": true, + "QPS": true, + "RAM": true, + "RHS": true, + "RPC": true, + "SLA": true, + "SMTP": true, + "SQL": true, + "SSH": true, + "TCP": true, + "TLS": true, + "TTL": true, + "UDP": true, + "UI": true, + "UID": true, + "UUID": true, + "URI": true, + "URL": true, + "UTF8": true, + "VM": true, + "XML": true, + "XMPP": true, + "XSRF": true, + "XSS": true, + } + + // a thread-safe index of initialisms + commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms) + initialisms = commonInitialisms.sorted() + initialismsRunes = asRunes(initialisms) + initialismsUpperCased = asUpperCased(initialisms) + maxAllocMatches = maxAllocHeuristic(initialismsRunes) + + // a test function + isInitialism = commonInitialisms.isInitialism +} + +func asRunes(in []string) [][]rune { + out := make([][]rune, len(in)) + for i, initialism := range in { + out[i] = []rune(initialism) + } + + return out +} + +func asUpperCased(in []string) [][]rune { + out := make([][]rune, len(in)) + + for i, initialism := range in { + out[i] = []rune(upper(trim(initialism))) + } + + return out +} + +func maxAllocHeuristic(in [][]rune) int { + heuristic := make(map[rune]int) + for _, initialism := range in { + heuristic[initialism[0]]++ + } + + var maxAlloc int + for _, val := range heuristic { + if val > maxAlloc { + maxAlloc = val + } + } + + return maxAlloc +} + +// AddInitialisms add additional initialisms +func AddInitialisms(words ...string) { + for _, word := range words { + // commonInitialisms[upper(word)] = true + commonInitialisms.add(upper(word)) + } + // sort again + initialisms = commonInitialisms.sorted() + initialismsRunes = asRunes(initialisms) + initialismsUpperCased = asUpperCased(initialisms) +} + // indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. // Since go1.9, this may be implemented with sync.Map. type indexOfInitialisms struct { @@ -55,7 +176,7 @@ func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { func (m *indexOfInitialisms) sorted() (result []string) { m.sortMutex.Lock() defer m.sortMutex.Unlock() - m.index.Range(func(key, value interface{}) bool { + m.index.Range(func(key, _ interface{}) bool { k := key.(string) result = append(result, k) return true @@ -63,3 +184,19 @@ func (m *indexOfInitialisms) sorted() (result []string) { sort.Sort(sort.Reverse(byInitialism(result))) return } + +type byInitialism []string + +func (s byInitialism) Len() int { + return len(s) +} +func (s byInitialism) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} +func (s byInitialism) Less(i, j int) bool { + if len(s[i]) != len(s[j]) { + return len(s[i]) < len(s[j]) + } + + return strings.Compare(s[i], s[j]) > 0 +} diff --git a/vendor/github.com/go-openapi/swag/name_lexem.go b/vendor/github.com/go-openapi/swag/name_lexem.go index aa7f6a9bb8e..8bb64ac32f9 100644 --- a/vendor/github.com/go-openapi/swag/name_lexem.go +++ b/vendor/github.com/go-openapi/swag/name_lexem.go @@ -14,74 +14,80 @@ package swag -import "unicode" +import ( + "unicode" + "unicode/utf8" +) type ( - nameLexem interface { - GetUnsafeGoName() string - GetOriginal() string - IsInitialism() bool - } + lexemKind uint8 - initialismNameLexem struct { + nameLexem struct { original string matchedInitialism string + kind lexemKind } +) - casualNameLexem struct { - original string - } +const ( + lexemKindCasualName lexemKind = iota + lexemKindInitialismName ) -func newInitialismNameLexem(original, matchedInitialism string) *initialismNameLexem { - return &initialismNameLexem{ +func newInitialismNameLexem(original, matchedInitialism string) nameLexem { + return nameLexem{ + kind: lexemKindInitialismName, original: original, matchedInitialism: matchedInitialism, } } -func newCasualNameLexem(original string) *casualNameLexem { - return &casualNameLexem{ +func newCasualNameLexem(original string) nameLexem { + return nameLexem{ + kind: lexemKindCasualName, original: original, } } -func (l *initialismNameLexem) GetUnsafeGoName() string { - return l.matchedInitialism -} +func (l nameLexem) GetUnsafeGoName() string { + if l.kind == lexemKindInitialismName { + return l.matchedInitialism + } + + var ( + first rune + rest string + ) -func (l *casualNameLexem) GetUnsafeGoName() string { - var first rune - var rest string for i, orig := range l.original { if i == 0 { first = orig continue } + if i > 0 { rest = l.original[i:] break } } + if len(l.original) > 1 { - return string(unicode.ToUpper(first)) + lower(rest) + b := poolOfBuffers.BorrowBuffer(utf8.UTFMax + len(rest)) + defer func() { + poolOfBuffers.RedeemBuffer(b) + }() + b.WriteRune(unicode.ToUpper(first)) + b.WriteString(lower(rest)) + return b.String() } return l.original } -func (l *initialismNameLexem) GetOriginal() string { +func (l nameLexem) GetOriginal() string { return l.original } -func (l *casualNameLexem) GetOriginal() string { - return l.original -} - -func (l *initialismNameLexem) IsInitialism() bool { - return true -} - -func (l *casualNameLexem) IsInitialism() bool { - return false +func (l nameLexem) IsInitialism() bool { + return l.kind == lexemKindInitialismName } diff --git a/vendor/github.com/go-openapi/swag/split.go b/vendor/github.com/go-openapi/swag/split.go index a1825fb7dc9..274727a866c 100644 --- a/vendor/github.com/go-openapi/swag/split.go +++ b/vendor/github.com/go-openapi/swag/split.go @@ -15,124 +15,269 @@ package swag import ( + "bytes" + "sync" "unicode" + "unicode/utf8" ) -var nameReplaceTable = map[rune]string{ - '@': "At ", - '&': "And ", - '|': "Pipe ", - '$': "Dollar ", - '!': "Bang ", - '-': "", - '_': "", -} - type ( splitter struct { - postSplitInitialismCheck bool initialisms []string + initialismsRunes [][]rune + initialismsUpperCased [][]rune // initialisms cached in their trimmed, upper-cased version + postSplitInitialismCheck bool + } + + splitterOption func(*splitter) + + initialismMatch struct { + body []rune + start, end int + complete bool + } + initialismMatches []initialismMatch +) + +type ( + // memory pools of temporary objects. + // + // These are used to recycle temporarily allocated objects + // and relieve the GC from undue pressure. + + matchesPool struct { + *sync.Pool } - splitterOption func(*splitter) *splitter + buffersPool struct { + *sync.Pool + } + + lexemsPool struct { + *sync.Pool + } + + splittersPool struct { + *sync.Pool + } ) -// split calls the splitter; splitter provides more control and post options +var ( + // poolOfMatches holds temporary slices for recycling during the initialism match process + poolOfMatches = matchesPool{ + Pool: &sync.Pool{ + New: func() any { + s := make(initialismMatches, 0, maxAllocMatches) + + return &s + }, + }, + } + + poolOfBuffers = buffersPool{ + Pool: &sync.Pool{ + New: func() any { + return new(bytes.Buffer) + }, + }, + } + + poolOfLexems = lexemsPool{ + Pool: &sync.Pool{ + New: func() any { + s := make([]nameLexem, 0, maxAllocMatches) + + return &s + }, + }, + } + + poolOfSplitters = splittersPool{ + Pool: &sync.Pool{ + New: func() any { + s := newSplitter() + + return &s + }, + }, + } +) + +// nameReplaceTable finds a word representation for special characters. +func nameReplaceTable(r rune) (string, bool) { + switch r { + case '@': + return "At ", true + case '&': + return "And ", true + case '|': + return "Pipe ", true + case '$': + return "Dollar ", true + case '!': + return "Bang ", true + case '-': + return "", true + case '_': + return "", true + default: + return "", false + } +} + +// split calls the splitter. +// +// Use newSplitter for more control and options func split(str string) []string { - lexems := newSplitter().split(str) - result := make([]string, 0, len(lexems)) + s := poolOfSplitters.BorrowSplitter() + lexems := s.split(str) + result := make([]string, 0, len(*lexems)) - for _, lexem := range lexems { + for _, lexem := range *lexems { result = append(result, lexem.GetOriginal()) } + poolOfLexems.RedeemLexems(lexems) + poolOfSplitters.RedeemSplitter(s) return result } -func (s *splitter) split(str string) []nameLexem { - return s.toNameLexems(str) -} - -func newSplitter(options ...splitterOption) *splitter { - splitter := &splitter{ +func newSplitter(options ...splitterOption) splitter { + s := splitter{ postSplitInitialismCheck: false, initialisms: initialisms, + initialismsRunes: initialismsRunes, + initialismsUpperCased: initialismsUpperCased, } for _, option := range options { - splitter = option(splitter) + option(&s) } - return splitter + return s } // withPostSplitInitialismCheck allows to catch initialisms after main split process -func withPostSplitInitialismCheck(s *splitter) *splitter { +func withPostSplitInitialismCheck(s *splitter) { s.postSplitInitialismCheck = true +} + +func (p matchesPool) BorrowMatches() *initialismMatches { + s := p.Get().(*initialismMatches) + *s = (*s)[:0] // reset slice, keep allocated capacity + return s } -type ( - initialismMatch struct { - start, end int - body []rune - complete bool +func (p buffersPool) BorrowBuffer(size int) *bytes.Buffer { + s := p.Get().(*bytes.Buffer) + s.Reset() + + if s.Cap() < size { + s.Grow(size) } - initialismMatches []*initialismMatch -) -func (s *splitter) toNameLexems(name string) []nameLexem { + return s +} + +func (p lexemsPool) BorrowLexems() *[]nameLexem { + s := p.Get().(*[]nameLexem) + *s = (*s)[:0] // reset slice, keep allocated capacity + + return s +} + +func (p splittersPool) BorrowSplitter(options ...splitterOption) *splitter { + s := p.Get().(*splitter) + s.postSplitInitialismCheck = false // reset options + for _, apply := range options { + apply(s) + } + + return s +} + +func (p matchesPool) RedeemMatches(s *initialismMatches) { + p.Put(s) +} + +func (p buffersPool) RedeemBuffer(s *bytes.Buffer) { + p.Put(s) +} + +func (p lexemsPool) RedeemLexems(s *[]nameLexem) { + p.Put(s) +} + +func (p splittersPool) RedeemSplitter(s *splitter) { + p.Put(s) +} + +func (m initialismMatch) isZero() bool { + return m.start == 0 && m.end == 0 +} + +func (s splitter) split(name string) *[]nameLexem { nameRunes := []rune(name) matches := s.gatherInitialismMatches(nameRunes) + if matches == nil { + return poolOfLexems.BorrowLexems() + } + return s.mapMatchesToNameLexems(nameRunes, matches) } -func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches { - matches := make(initialismMatches, 0) +func (s splitter) gatherInitialismMatches(nameRunes []rune) *initialismMatches { + var matches *initialismMatches for currentRunePosition, currentRune := range nameRunes { - newMatches := make(initialismMatches, 0, len(matches)) + // recycle these allocations as we loop over runes + // with such recycling, only 2 slices should be allocated per call + // instead of o(n). + newMatches := poolOfMatches.BorrowMatches() // check current initialism matches - for _, match := range matches { - if keepCompleteMatch := match.complete; keepCompleteMatch { - newMatches = append(newMatches, match) - continue - } + if matches != nil { // skip first iteration + for _, match := range *matches { + if keepCompleteMatch := match.complete; keepCompleteMatch { + *newMatches = append(*newMatches, match) + continue + } - // drop failed match - currentMatchRune := match.body[currentRunePosition-match.start] - if !s.initialismRuneEqual(currentMatchRune, currentRune) { - continue - } + // drop failed match + currentMatchRune := match.body[currentRunePosition-match.start] + if currentMatchRune != currentRune { + continue + } - // try to complete ongoing match - if currentRunePosition-match.start == len(match.body)-1 { - // we are close; the next step is to check the symbol ahead - // if it is a small letter, then it is not the end of match - // but beginning of the next word - - if currentRunePosition < len(nameRunes)-1 { - nextRune := nameRunes[currentRunePosition+1] - if newWord := unicode.IsLower(nextRune); newWord { - // oh ok, it was the start of a new word - continue + // try to complete ongoing match + if currentRunePosition-match.start == len(match.body)-1 { + // we are close; the next step is to check the symbol ahead + // if it is a small letter, then it is not the end of match + // but beginning of the next word + + if currentRunePosition < len(nameRunes)-1 { + nextRune := nameRunes[currentRunePosition+1] + if newWord := unicode.IsLower(nextRune); newWord { + // oh ok, it was the start of a new word + continue + } } + + match.complete = true + match.end = currentRunePosition } - match.complete = true - match.end = currentRunePosition + *newMatches = append(*newMatches, match) } - - newMatches = append(newMatches, match) } // check for new initialism matches - for _, initialism := range s.initialisms { - initialismRunes := []rune(initialism) - if s.initialismRuneEqual(initialismRunes[0], currentRune) { - newMatches = append(newMatches, &initialismMatch{ + for i := range s.initialisms { + initialismRunes := s.initialismsRunes[i] + if initialismRunes[0] == currentRune { + *newMatches = append(*newMatches, initialismMatch{ start: currentRunePosition, body: initialismRunes, complete: false, @@ -140,24 +285,28 @@ func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches { } } + if matches != nil { + poolOfMatches.RedeemMatches(matches) + } matches = newMatches } + // up to the caller to redeem this last slice return matches } -func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMatches) []nameLexem { - nameLexems := make([]nameLexem, 0) +func (s splitter) mapMatchesToNameLexems(nameRunes []rune, matches *initialismMatches) *[]nameLexem { + nameLexems := poolOfLexems.BorrowLexems() - var lastAcceptedMatch *initialismMatch - for _, match := range matches { + var lastAcceptedMatch initialismMatch + for _, match := range *matches { if !match.complete { continue } - if firstMatch := lastAcceptedMatch == nil; firstMatch { - nameLexems = append(nameLexems, s.breakCasualString(nameRunes[:match.start])...) - nameLexems = append(nameLexems, s.breakInitialism(string(match.body))) + if firstMatch := lastAcceptedMatch.isZero(); firstMatch { + s.appendBrokenDownCasualString(nameLexems, nameRunes[:match.start]) + *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) lastAcceptedMatch = match @@ -169,63 +318,66 @@ func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMa } middle := nameRunes[lastAcceptedMatch.end+1 : match.start] - nameLexems = append(nameLexems, s.breakCasualString(middle)...) - nameLexems = append(nameLexems, s.breakInitialism(string(match.body))) + s.appendBrokenDownCasualString(nameLexems, middle) + *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) lastAcceptedMatch = match } // we have not found any accepted matches - if lastAcceptedMatch == nil { - return s.breakCasualString(nameRunes) - } - - if lastAcceptedMatch.end+1 != len(nameRunes) { + if lastAcceptedMatch.isZero() { + *nameLexems = (*nameLexems)[:0] + s.appendBrokenDownCasualString(nameLexems, nameRunes) + } else if lastAcceptedMatch.end+1 != len(nameRunes) { rest := nameRunes[lastAcceptedMatch.end+1:] - nameLexems = append(nameLexems, s.breakCasualString(rest)...) + s.appendBrokenDownCasualString(nameLexems, rest) } - return nameLexems -} + poolOfMatches.RedeemMatches(matches) -func (s *splitter) initialismRuneEqual(a, b rune) bool { - return a == b + return nameLexems } -func (s *splitter) breakInitialism(original string) nameLexem { +func (s splitter) breakInitialism(original string) nameLexem { return newInitialismNameLexem(original, original) } -func (s *splitter) breakCasualString(str []rune) []nameLexem { - segments := make([]nameLexem, 0) - currentSegment := "" +func (s splitter) appendBrokenDownCasualString(segments *[]nameLexem, str []rune) { + currentSegment := poolOfBuffers.BorrowBuffer(len(str)) // unlike strings.Builder, bytes.Buffer initial storage can reused + defer func() { + poolOfBuffers.RedeemBuffer(currentSegment) + }() addCasualNameLexem := func(original string) { - segments = append(segments, newCasualNameLexem(original)) + *segments = append(*segments, newCasualNameLexem(original)) } addInitialismNameLexem := func(original, match string) { - segments = append(segments, newInitialismNameLexem(original, match)) + *segments = append(*segments, newInitialismNameLexem(original, match)) } - addNameLexem := func(original string) { - if s.postSplitInitialismCheck { - for _, initialism := range s.initialisms { - if upper(initialism) == upper(original) { - addInitialismNameLexem(original, initialism) + var addNameLexem func(string) + if s.postSplitInitialismCheck { + addNameLexem = func(original string) { + for i := range s.initialisms { + if isEqualFoldIgnoreSpace(s.initialismsUpperCased[i], original) { + addInitialismNameLexem(original, s.initialisms[i]) + return } } - } - addCasualNameLexem(original) + addCasualNameLexem(original) + } + } else { + addNameLexem = addCasualNameLexem } - for _, rn := range string(str) { - if replace, found := nameReplaceTable[rn]; found { - if currentSegment != "" { - addNameLexem(currentSegment) - currentSegment = "" + for _, rn := range str { + if replace, found := nameReplaceTable(rn); found { + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) + currentSegment.Reset() } if replace != "" { @@ -236,27 +388,121 @@ func (s *splitter) breakCasualString(str []rune) []nameLexem { } if !unicode.In(rn, unicode.L, unicode.M, unicode.N, unicode.Pc) { - if currentSegment != "" { - addNameLexem(currentSegment) - currentSegment = "" + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) + currentSegment.Reset() } continue } if unicode.IsUpper(rn) { - if currentSegment != "" { - addNameLexem(currentSegment) + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) } - currentSegment = "" + currentSegment.Reset() } - currentSegment += string(rn) + currentSegment.WriteRune(rn) + } + + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) } +} + +// isEqualFoldIgnoreSpace is the same as strings.EqualFold, but +// it ignores leading and trailing blank spaces in the compared +// string. +// +// base is assumed to be composed of upper-cased runes, and be already +// trimmed. +// +// This code is heavily inspired from strings.EqualFold. +func isEqualFoldIgnoreSpace(base []rune, str string) bool { + var i, baseIndex int + // equivalent to b := []byte(str), but without data copy + b := hackStringBytes(str) + + for i < len(b) { + if c := b[i]; c < utf8.RuneSelf { + // fast path for ASCII + if c != ' ' && c != '\t' { + break + } + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if !unicode.IsSpace(r) { + break + } + i += size + } + + if i >= len(b) { + return len(base) == 0 + } + + for _, baseRune := range base { + if i >= len(b) { + break + } + + if c := b[i]; c < utf8.RuneSelf { + // single byte rune case (ASCII) + if baseRune >= utf8.RuneSelf { + return false + } + + baseChar := byte(baseRune) + if c != baseChar && + !('a' <= c && c <= 'z' && c-'a'+'A' == baseChar) { + return false + } + + baseIndex++ + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if unicode.ToUpper(r) != baseRune { + return false + } + baseIndex++ + i += size + } + + if baseIndex != len(base) { + return false + } + + // all passed: now we should only have blanks + for i < len(b) { + if c := b[i]; c < utf8.RuneSelf { + // fast path for ASCII + if c != ' ' && c != '\t' { + return false + } + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if !unicode.IsSpace(r) { + return false + } - if currentSegment != "" { - addNameLexem(currentSegment) + i += size } - return segments + return true } diff --git a/vendor/github.com/go-openapi/swag/string_bytes.go b/vendor/github.com/go-openapi/swag/string_bytes.go new file mode 100644 index 00000000000..90745d5ca9f --- /dev/null +++ b/vendor/github.com/go-openapi/swag/string_bytes.go @@ -0,0 +1,8 @@ +package swag + +import "unsafe" + +// hackStringBytes returns the (unsafe) underlying bytes slice of a string. +func hackStringBytes(str string) []byte { + return unsafe.Slice(unsafe.StringData(str), len(str)) +} diff --git a/vendor/github.com/go-openapi/swag/util.go b/vendor/github.com/go-openapi/swag/util.go index 0413f7447cc..5051401c49f 100644 --- a/vendor/github.com/go-openapi/swag/util.go +++ b/vendor/github.com/go-openapi/swag/util.go @@ -18,76 +18,25 @@ import ( "reflect" "strings" "unicode" + "unicode/utf8" ) -// commonInitialisms are common acronyms that are kept as whole uppercased words. -var commonInitialisms *indexOfInitialisms - -// initialisms is a slice of sorted initialisms -var initialisms []string - -var isInitialism func(string) bool - // GoNamePrefixFunc sets an optional rule to prefix go names // which do not start with a letter. // +// The prefix function is assumed to return a string that starts with an upper case letter. +// // e.g. to help convert "123" into "{prefix}123" // // The default is to prefix with "X" var GoNamePrefixFunc func(string) string -func init() { - // Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769 - var configuredInitialisms = map[string]bool{ - "ACL": true, - "API": true, - "ASCII": true, - "CPU": true, - "CSS": true, - "DNS": true, - "EOF": true, - "GUID": true, - "HTML": true, - "HTTPS": true, - "HTTP": true, - "ID": true, - "IP": true, - "IPv4": true, - "IPv6": true, - "JSON": true, - "LHS": true, - "OAI": true, - "QPS": true, - "RAM": true, - "RHS": true, - "RPC": true, - "SLA": true, - "SMTP": true, - "SQL": true, - "SSH": true, - "TCP": true, - "TLS": true, - "TTL": true, - "UDP": true, - "UI": true, - "UID": true, - "UUID": true, - "URI": true, - "URL": true, - "UTF8": true, - "VM": true, - "XML": true, - "XMPP": true, - "XSRF": true, - "XSS": true, +func prefixFunc(name, in string) string { + if GoNamePrefixFunc == nil { + return "X" + in } - // a thread-safe index of initialisms - commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms) - initialisms = commonInitialisms.sorted() - - // a test function - isInitialism = commonInitialisms.isInitialism + return GoNamePrefixFunc(name) + in } const ( @@ -156,22 +105,6 @@ func SplitByFormat(data, format string) []string { return result } -type byInitialism []string - -func (s byInitialism) Len() int { - return len(s) -} -func (s byInitialism) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} -func (s byInitialism) Less(i, j int) bool { - if len(s[i]) != len(s[j]) { - return len(s[i]) < len(s[j]) - } - - return strings.Compare(s[i], s[j]) > 0 -} - // Removes leading whitespaces func trim(str string) string { return strings.TrimSpace(str) @@ -188,15 +121,20 @@ func lower(str string) string { } // Camelize an uppercased word -func Camelize(word string) (camelized string) { +func Camelize(word string) string { + camelized := poolOfBuffers.BorrowBuffer(len(word)) + defer func() { + poolOfBuffers.RedeemBuffer(camelized) + }() + for pos, ru := range []rune(word) { if pos > 0 { - camelized += string(unicode.ToLower(ru)) + camelized.WriteRune(unicode.ToLower(ru)) } else { - camelized += string(unicode.ToUpper(ru)) + camelized.WriteRune(unicode.ToUpper(ru)) } } - return + return camelized.String() } // ToFileName lowercases and underscores a go type name @@ -224,26 +162,31 @@ func ToCommandName(name string) string { // ToHumanNameLower represents a code name as a human series of words func ToHumanNameLower(name string) string { - in := newSplitter(withPostSplitInitialismCheck).split(name) - out := make([]string, 0, len(in)) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + in := s.split(name) + poolOfSplitters.RedeemSplitter(s) + out := make([]string, 0, len(*in)) - for _, w := range in { + for _, w := range *in { if !w.IsInitialism() { out = append(out, lower(w.GetOriginal())) } else { out = append(out, trim(w.GetOriginal())) } } + poolOfLexems.RedeemLexems(in) return strings.Join(out, " ") } // ToHumanNameTitle represents a code name as a human series of words with the first letters titleized func ToHumanNameTitle(name string) string { - in := newSplitter(withPostSplitInitialismCheck).split(name) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + in := s.split(name) + poolOfSplitters.RedeemSplitter(s) - out := make([]string, 0, len(in)) - for _, w := range in { + out := make([]string, 0, len(*in)) + for _, w := range *in { original := trim(w.GetOriginal()) if !w.IsInitialism() { out = append(out, Camelize(original)) @@ -251,6 +194,8 @@ func ToHumanNameTitle(name string) string { out = append(out, original) } } + poolOfLexems.RedeemLexems(in) + return strings.Join(out, " ") } @@ -283,35 +228,70 @@ func ToVarName(name string) string { // ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes func ToGoName(name string) string { - lexems := newSplitter(withPostSplitInitialismCheck).split(name) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + lexems := s.split(name) + poolOfSplitters.RedeemSplitter(s) + defer func() { + poolOfLexems.RedeemLexems(lexems) + }() + lexemes := *lexems + + if len(lexemes) == 0 { + return "" + } + + result := poolOfBuffers.BorrowBuffer(len(name)) + defer func() { + poolOfBuffers.RedeemBuffer(result) + }() + + // check if not starting with a letter, upper case + firstPart := lexemes[0].GetUnsafeGoName() + if lexemes[0].IsInitialism() { + firstPart = upper(firstPart) + } + + if c := firstPart[0]; c < utf8.RuneSelf { + // ASCII + switch { + case 'A' <= c && c <= 'Z': + result.WriteString(firstPart) + case 'a' <= c && c <= 'z': + result.WriteByte(c - 'a' + 'A') + result.WriteString(firstPart[1:]) + default: + result.WriteString(prefixFunc(name, firstPart)) + // NOTE: no longer check if prefixFunc returns a string that starts with uppercase: + // assume this is always the case + } + } else { + // unicode + firstRune, _ := utf8.DecodeRuneInString(firstPart) + switch { + case !unicode.IsLetter(firstRune): + result.WriteString(prefixFunc(name, firstPart)) + case !unicode.IsUpper(firstRune): + result.WriteString(prefixFunc(name, firstPart)) + /* + result.WriteRune(unicode.ToUpper(firstRune)) + result.WriteString(firstPart[offset:]) + */ + default: + result.WriteString(firstPart) + } + } - result := "" - for _, lexem := range lexems { + for _, lexem := range lexemes[1:] { goName := lexem.GetUnsafeGoName() // to support old behavior if lexem.IsInitialism() { goName = upper(goName) } - result += goName + result.WriteString(goName) } - if len(result) > 0 { - // Only prefix with X when the first character isn't an ascii letter - first := []rune(result)[0] - if !unicode.IsLetter(first) || (first > unicode.MaxASCII && !unicode.IsUpper(first)) { - if GoNamePrefixFunc == nil { - return "X" + result - } - result = GoNamePrefixFunc(name) + result - } - first = []rune(result)[0] - if unicode.IsLetter(first) && !unicode.IsUpper(first) { - result = string(append([]rune{unicode.ToUpper(first)}, []rune(result)[1:]...)) - } - } - - return result + return result.String() } // ContainsStrings searches a slice of strings for a case-sensitive match @@ -376,16 +356,6 @@ func IsZero(data interface{}) bool { } } -// AddInitialisms add additional initialisms -func AddInitialisms(words ...string) { - for _, word := range words { - // commonInitialisms[upper(word)] = true - commonInitialisms.add(upper(word)) - } - // sort again - initialisms = commonInitialisms.sorted() -} - // CommandLineOptionsGroup represents a group of user-defined command line options type CommandLineOptionsGroup struct { ShortDescription string diff --git a/vendor/github.com/go-openapi/swag/yaml.go b/vendor/github.com/go-openapi/swag/yaml.go index a8c4e359ea6..f59e0259320 100644 --- a/vendor/github.com/go-openapi/swag/yaml.go +++ b/vendor/github.com/go-openapi/swag/yaml.go @@ -16,6 +16,7 @@ package swag import ( "encoding/json" + "errors" "fmt" "path/filepath" "reflect" @@ -50,7 +51,7 @@ func BytesToYAMLDoc(data []byte) (interface{}, error) { return nil, err } if document.Kind != yaml.DocumentNode || len(document.Content) != 1 || document.Content[0].Kind != yaml.MappingNode { - return nil, fmt.Errorf("only YAML documents that are objects are supported") + return nil, errors.New("only YAML documents that are objects are supported") } return &document, nil } diff --git a/vendor/github.com/go-openapi/validate/.golangci.yml b/vendor/github.com/go-openapi/validate/.golangci.yml index 348b9b45fa6..22f8d21cca1 100644 --- a/vendor/github.com/go-openapi/validate/.golangci.yml +++ b/vendor/github.com/go-openapi/validate/.golangci.yml @@ -1,12 +1,14 @@ linters-settings: govet: check-shadowing: true + golint: + min-confidence: 0 gocyclo: - min-complexity: 50 + min-complexity: 45 maligned: suggest-new: true dupl: - threshold: 100 + threshold: 200 goconst: min-len: 2 min-occurrences: 3 @@ -15,41 +17,45 @@ linters: enable-all: true disable: - maligned + - unparam - lll + - gochecknoinits + - gochecknoglobals + - funlen - godox - gocognit - whitespace - wsl - - funlen - - gochecknoglobals - - gochecknoinits - - scopelint - wrapcheck - - exhaustivestruct - - exhaustive - - nlreturn - testpackage - - gci - - gofumpt - - goerr113 + - nlreturn - gomnd - - tparallel + - exhaustivestruct + - goerr113 + - errorlint - nestif - godot - - tparallel + - gofumpt - paralleltest - - cyclop # because we have gocyclo already - - depguard # we do not add a config for this - # TODO: review the linters below. We disabled them to make the CI pass first. - - nonamedreturns + - tparallel + - thelper + - ifshort - exhaustruct - - nosnakecase - - nolintlint - - ireturn - varnamelen + - gci + - depguard + - errchkjson + - inamedparam + - nonamedreturns + - musttag + - ireturn - forcetypeassert - - thelper - # Disable deprecated linters. - # They will be removed from golangci-lint in future. + - cyclop + # deprecated linters + - deadcode - interfacer - - golint \ No newline at end of file + - scopelint + - varcheck + - structcheck + - golint + - nosnakecase diff --git a/vendor/github.com/go-openapi/validate/BENCHMARK.md b/vendor/github.com/go-openapi/validate/BENCHMARK.md new file mode 100644 index 00000000000..79cf6a077ba --- /dev/null +++ b/vendor/github.com/go-openapi/validate/BENCHMARK.md @@ -0,0 +1,31 @@ +# Benchmark + +Validating the Kubernetes Swagger API + +## v0.22.6: 60,000,000 allocs +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/validate +cpu: AMD Ryzen 7 5800X 8-Core Processor +Benchmark_KubernetesSpec/validating_kubernetes_API-16 1 8549863982 ns/op 7067424936 B/op 59583275 allocs/op +``` + +## After refact PR: minor but noticable improvements: 25,000,000 allocs +``` +go test -bench Spec +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/validate +cpu: AMD Ryzen 7 5800X 8-Core Processor +Benchmark_KubernetesSpec/validating_kubernetes_API-16 1 4064535557 ns/op 3379715592 B/op 25320330 allocs/op +``` + +## After reduce GC pressure PR: 17,000,000 allocs +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/validate +cpu: AMD Ryzen 7 5800X 8-Core Processor +Benchmark_KubernetesSpec/validating_kubernetes_API-16 1 3758414145 ns/op 2593881496 B/op 17111373 allocs/op +``` diff --git a/vendor/github.com/go-openapi/validate/README.md b/vendor/github.com/go-openapi/validate/README.md index ea2d68cb683..e8e1bb218d9 100644 --- a/vendor/github.com/go-openapi/validate/README.md +++ b/vendor/github.com/go-openapi/validate/README.md @@ -1,7 +1,5 @@ -# Validation helpers -[![Build Status](https://travis-ci.org/go-openapi/validate.svg?branch=master)](https://travis-ci.org/go-openapi/validate) -[![Build status](https://ci.appveyor.com/api/projects/status/d6epy6vipueyh5fs/branch/master?svg=true)](https://ci.appveyor.com/project/fredbi/validate/branch/master) -[![codecov](https://codecov.io/gh/go-openapi/validate/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/validate) +# Validation helpers [![Build Status](https://github.com/go-openapi/validate/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/validate/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/validate/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/validate) + [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/validate/master/LICENSE) [![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/validate.svg)](https://pkg.go.dev/github.com/go-openapi/validate) @@ -24,7 +22,7 @@ Reference can be found here: https://github.com/OAI/OpenAPI-Specification/blob/m * Minimum, Maximum, MultipleOf * FormatOf -[Documentation](https://godoc.org/github.com/go-openapi/validate) +[Documentation](https://pkg.go.dev/github.com/go-openapi/validate) ## FAQ diff --git a/vendor/github.com/go-openapi/validate/default_validator.go b/vendor/github.com/go-openapi/validate/default_validator.go index 670a1773acc..e0dd93839ec 100644 --- a/vendor/github.com/go-openapi/validate/default_validator.go +++ b/vendor/github.com/go-openapi/validate/default_validator.go @@ -25,48 +25,55 @@ import ( // According to Swagger spec, default values MUST validate their schema. type defaultValidator struct { SpecValidator *SpecValidator - visitedSchemas map[string]bool + visitedSchemas map[string]struct{} + schemaOptions *SchemaValidatorOptions } // resetVisited resets the internal state of visited schemas func (d *defaultValidator) resetVisited() { - d.visitedSchemas = map[string]bool{} + if d.visitedSchemas == nil { + d.visitedSchemas = make(map[string]struct{}) + + return + } + + // TODO(go1.21): clear(ex.visitedSchemas) + for k := range d.visitedSchemas { + delete(d.visitedSchemas, k) + } } -func isVisited(path string, visitedSchemas map[string]bool) bool { - found := visitedSchemas[path] - if !found { - // search for overlapping paths - frags := strings.Split(path, ".") - if len(frags) < 2 { - // shortcut exit on smaller paths - return found +func isVisited(path string, visitedSchemas map[string]struct{}) bool { + _, found := visitedSchemas[path] + if found { + return true + } + + // search for overlapping paths + var ( + parent string + suffix string + ) + for i := len(path) - 2; i >= 0; i-- { + r := path[i] + if r != '.' { + continue } - last := len(frags) - 1 - var currentFragStr, parent string - for i := range frags { - if i == 0 { - currentFragStr = frags[last] - } else { - currentFragStr = strings.Join([]string{frags[last-i], currentFragStr}, ".") - } - if i < last { - parent = strings.Join(frags[0:last-i], ".") - } else { - parent = "" - } - if strings.HasSuffix(parent, currentFragStr) { - found = true - break - } + + parent = path[0:i] + suffix = path[i+1:] + + if strings.HasSuffix(parent, suffix) { + return true } } - return found + + return false } // beingVisited asserts a schema is being visited func (d *defaultValidator) beingVisited(path string) { - d.visitedSchemas[path] = true + d.visitedSchemas[path] = struct{}{} } // isVisited tells if a path has already been visited @@ -75,8 +82,9 @@ func (d *defaultValidator) isVisited(path string) bool { } // Validate validates the default values declared in the swagger spec -func (d *defaultValidator) Validate() (errs *Result) { - errs = new(Result) +func (d *defaultValidator) Validate() *Result { + errs := pools.poolOfResults.BorrowResult() // will redeem when merged + if d == nil || d.SpecValidator == nil { return errs } @@ -89,7 +97,7 @@ func (d *defaultValidator) validateDefaultValueValidAgainstSchema() *Result { // every default value that is specified must validate against the schema for that property // headers, items, parameters, schema - res := new(Result) + res := pools.poolOfResults.BorrowResult() // will redeem when merged s := d.SpecValidator for method, pathItem := range s.expandedAnalyzer().Operations() { @@ -107,10 +115,12 @@ func (d *defaultValidator) validateDefaultValueValidAgainstSchema() *Result { // default values provided must validate against their inline definition (no explicit schema) if param.Default != nil && param.Schema == nil { // check param default value is valid - red := NewParamValidator(¶m, s.KnownFormats).Validate(param.Default) //#nosec + red := newParamValidator(¶m, s.KnownFormats, d.schemaOptions).Validate(param.Default) //#nosec if red.HasErrorsOrWarnings() { res.AddErrors(defaultValueDoesNotValidateMsg(param.Name, param.In)) res.Merge(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } @@ -120,6 +130,8 @@ func (d *defaultValidator) validateDefaultValueValidAgainstSchema() *Result { if red.HasErrorsOrWarnings() { res.AddErrors(defaultValueItemsDoesNotValidateMsg(param.Name, param.In)) res.Merge(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } @@ -129,6 +141,8 @@ func (d *defaultValidator) validateDefaultValueValidAgainstSchema() *Result { if red.HasErrorsOrWarnings() { res.AddErrors(defaultValueDoesNotValidateMsg(param.Name, param.In)) res.Merge(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } } @@ -154,7 +168,7 @@ func (d *defaultValidator) validateDefaultValueValidAgainstSchema() *Result { // reset explored schemas to get depth-first recursive-proof exploration d.resetVisited() for nm, sch := range s.spec.Spec().Definitions { - res.Merge(d.validateDefaultValueSchemaAgainstSchema(fmt.Sprintf("definitions.%s", nm), "body", &sch)) //#nosec + res.Merge(d.validateDefaultValueSchemaAgainstSchema("definitions."+nm, "body", &sch)) //#nosec } } return res @@ -170,17 +184,18 @@ func (d *defaultValidator) validateDefaultInResponse(resp *spec.Response, respon responseName, responseCodeAsStr := responseHelp.responseMsgVariants(responseType, responseCode) - //nolint: dupl if response.Headers != nil { // Safeguard for nm, h := range response.Headers { // reset explored schemas to get depth-first recursive-proof exploration d.resetVisited() if h.Default != nil { - red := NewHeaderValidator(nm, &h, s.KnownFormats).Validate(h.Default) //#nosec + red := newHeaderValidator(nm, &h, s.KnownFormats, d.schemaOptions).Validate(h.Default) //#nosec if red.HasErrorsOrWarnings() { res.AddErrors(defaultValueHeaderDoesNotValidateMsg(operationID, nm, responseName)) res.Merge(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } @@ -190,6 +205,8 @@ func (d *defaultValidator) validateDefaultInResponse(resp *spec.Response, respon if red.HasErrorsOrWarnings() { res.AddErrors(defaultValueHeaderItemsDoesNotValidateMsg(operationID, nm, responseName)) res.Merge(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } @@ -209,6 +226,8 @@ func (d *defaultValidator) validateDefaultInResponse(resp *spec.Response, respon // Additional message to make sure the context of the error is not lost res.AddErrors(defaultValueInDoesNotValidateMsg(operationID, responseName)) res.Merge(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } return res @@ -220,11 +239,13 @@ func (d *defaultValidator) validateDefaultValueSchemaAgainstSchema(path, in stri return nil } d.beingVisited(path) - res := new(Result) + res := pools.poolOfResults.BorrowResult() s := d.SpecValidator if schema.Default != nil { - res.Merge(NewSchemaValidator(schema, s.spec.Spec(), path+".default", s.KnownFormats, SwaggerSchema(true)).Validate(schema.Default)) + res.Merge( + newSchemaValidator(schema, s.spec.Spec(), path+".default", s.KnownFormats, d.schemaOptions).Validate(schema.Default), + ) } if schema.Items != nil { if schema.Items.Schema != nil { @@ -242,7 +263,7 @@ func (d *defaultValidator) validateDefaultValueSchemaAgainstSchema(path, in stri } if schema.AdditionalItems != nil && schema.AdditionalItems.Schema != nil { // NOTE: we keep validating values, even though additionalItems is not supported by Swagger 2.0 (and 3.0 as well) - res.Merge(d.validateDefaultValueSchemaAgainstSchema(fmt.Sprintf("%s.additionalItems", path), in, schema.AdditionalItems.Schema)) + res.Merge(d.validateDefaultValueSchemaAgainstSchema(path+".additionalItems", in, schema.AdditionalItems.Schema)) } for propName, prop := range schema.Properties { res.Merge(d.validateDefaultValueSchemaAgainstSchema(path+"."+propName, in, &prop)) //#nosec @@ -251,7 +272,7 @@ func (d *defaultValidator) validateDefaultValueSchemaAgainstSchema(path, in stri res.Merge(d.validateDefaultValueSchemaAgainstSchema(path+"."+propName, in, &prop)) //#nosec } if schema.AdditionalProperties != nil && schema.AdditionalProperties.Schema != nil { - res.Merge(d.validateDefaultValueSchemaAgainstSchema(fmt.Sprintf("%s.additionalProperties", path), in, schema.AdditionalProperties.Schema)) + res.Merge(d.validateDefaultValueSchemaAgainstSchema(path+".additionalProperties", in, schema.AdditionalProperties.Schema)) } if schema.AllOf != nil { for i, aoSch := range schema.AllOf { @@ -263,13 +284,14 @@ func (d *defaultValidator) validateDefaultValueSchemaAgainstSchema(path, in stri // TODO: Temporary duplicated code. Need to refactor with examples -// nolint: dupl func (d *defaultValidator) validateDefaultValueItemsAgainstSchema(path, in string, root interface{}, items *spec.Items) *Result { - res := new(Result) + res := pools.poolOfResults.BorrowResult() s := d.SpecValidator if items != nil { if items.Default != nil { - res.Merge(newItemsValidator(path, in, items, root, s.KnownFormats).Validate(0, items.Default)) + res.Merge( + newItemsValidator(path, in, items, root, s.KnownFormats, d.schemaOptions).Validate(0, items.Default), + ) } if items.Items != nil { res.Merge(d.validateDefaultValueItemsAgainstSchema(path+"[0].default", in, root, items.Items)) diff --git a/vendor/github.com/go-openapi/validate/example_validator.go b/vendor/github.com/go-openapi/validate/example_validator.go index 930b47e5300..d08956973ce 100644 --- a/vendor/github.com/go-openapi/validate/example_validator.go +++ b/vendor/github.com/go-openapi/validate/example_validator.go @@ -23,17 +23,27 @@ import ( // ExampleValidator validates example values defined in a spec type exampleValidator struct { SpecValidator *SpecValidator - visitedSchemas map[string]bool + visitedSchemas map[string]struct{} + schemaOptions *SchemaValidatorOptions } // resetVisited resets the internal state of visited schemas func (ex *exampleValidator) resetVisited() { - ex.visitedSchemas = map[string]bool{} + if ex.visitedSchemas == nil { + ex.visitedSchemas = make(map[string]struct{}) + + return + } + + // TODO(go1.21): clear(ex.visitedSchemas) + for k := range ex.visitedSchemas { + delete(ex.visitedSchemas, k) + } } // beingVisited asserts a schema is being visited func (ex *exampleValidator) beingVisited(path string) { - ex.visitedSchemas[path] = true + ex.visitedSchemas[path] = struct{}{} } // isVisited tells if a path has already been visited @@ -48,8 +58,9 @@ func (ex *exampleValidator) isVisited(path string) bool { // - schemas // - individual property // - responses -func (ex *exampleValidator) Validate() (errs *Result) { - errs = new(Result) +func (ex *exampleValidator) Validate() *Result { + errs := pools.poolOfResults.BorrowResult() + if ex == nil || ex.SpecValidator == nil { return errs } @@ -64,7 +75,7 @@ func (ex *exampleValidator) validateExampleValueValidAgainstSchema() *Result { // in: schemas, properties, object, items // not in: headers, parameters without schema - res := new(Result) + res := pools.poolOfResults.BorrowResult() s := ex.SpecValidator for method, pathItem := range s.expandedAnalyzer().Operations() { @@ -82,10 +93,12 @@ func (ex *exampleValidator) validateExampleValueValidAgainstSchema() *Result { // default values provided must validate against their inline definition (no explicit schema) if param.Example != nil && param.Schema == nil { // check param default value is valid - red := NewParamValidator(¶m, s.KnownFormats).Validate(param.Example) //#nosec + red := newParamValidator(¶m, s.KnownFormats, ex.schemaOptions).Validate(param.Example) //#nosec if red.HasErrorsOrWarnings() { res.AddWarnings(exampleValueDoesNotValidateMsg(param.Name, param.In)) res.MergeAsWarnings(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } @@ -95,6 +108,8 @@ func (ex *exampleValidator) validateExampleValueValidAgainstSchema() *Result { if red.HasErrorsOrWarnings() { res.AddWarnings(exampleValueItemsDoesNotValidateMsg(param.Name, param.In)) res.Merge(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } @@ -104,6 +119,8 @@ func (ex *exampleValidator) validateExampleValueValidAgainstSchema() *Result { if red.HasErrorsOrWarnings() { res.AddWarnings(exampleValueDoesNotValidateMsg(param.Name, param.In)) res.Merge(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } } @@ -129,7 +146,7 @@ func (ex *exampleValidator) validateExampleValueValidAgainstSchema() *Result { // reset explored schemas to get depth-first recursive-proof exploration ex.resetVisited() for nm, sch := range s.spec.Spec().Definitions { - res.Merge(ex.validateExampleValueSchemaAgainstSchema(fmt.Sprintf("definitions.%s", nm), "body", &sch)) //#nosec + res.Merge(ex.validateExampleValueSchemaAgainstSchema("definitions."+nm, "body", &sch)) //#nosec } } return res @@ -145,17 +162,18 @@ func (ex *exampleValidator) validateExampleInResponse(resp *spec.Response, respo responseName, responseCodeAsStr := responseHelp.responseMsgVariants(responseType, responseCode) - // nolint: dupl if response.Headers != nil { // Safeguard for nm, h := range response.Headers { // reset explored schemas to get depth-first recursive-proof exploration ex.resetVisited() if h.Example != nil { - red := NewHeaderValidator(nm, &h, s.KnownFormats).Validate(h.Example) //#nosec + red := newHeaderValidator(nm, &h, s.KnownFormats, ex.schemaOptions).Validate(h.Example) //#nosec if red.HasErrorsOrWarnings() { res.AddWarnings(exampleValueHeaderDoesNotValidateMsg(operationID, nm, responseName)) res.MergeAsWarnings(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } @@ -165,6 +183,8 @@ func (ex *exampleValidator) validateExampleInResponse(resp *spec.Response, respo if red.HasErrorsOrWarnings() { res.AddWarnings(exampleValueHeaderItemsDoesNotValidateMsg(operationID, nm, responseName)) res.MergeAsWarnings(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } @@ -184,13 +204,17 @@ func (ex *exampleValidator) validateExampleInResponse(resp *spec.Response, respo // Additional message to make sure the context of the error is not lost res.AddWarnings(exampleValueInDoesNotValidateMsg(operationID, responseName)) res.Merge(red) + } else if red.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(red) } } if response.Examples != nil { if response.Schema != nil { if example, ok := response.Examples["application/json"]; ok { - res.MergeAsWarnings(NewSchemaValidator(response.Schema, s.spec.Spec(), path+".examples", s.KnownFormats, SwaggerSchema(true)).Validate(example)) + res.MergeAsWarnings( + newSchemaValidator(response.Schema, s.spec.Spec(), path+".examples", s.KnownFormats, s.schemaOptions).Validate(example), + ) } else { // TODO: validate other media types too res.AddWarnings(examplesMimeNotSupportedMsg(operationID, responseName)) @@ -209,10 +233,12 @@ func (ex *exampleValidator) validateExampleValueSchemaAgainstSchema(path, in str } ex.beingVisited(path) s := ex.SpecValidator - res := new(Result) + res := pools.poolOfResults.BorrowResult() if schema.Example != nil { - res.MergeAsWarnings(NewSchemaValidator(schema, s.spec.Spec(), path+".example", s.KnownFormats, SwaggerSchema(true)).Validate(schema.Example)) + res.MergeAsWarnings( + newSchemaValidator(schema, s.spec.Spec(), path+".example", s.KnownFormats, ex.schemaOptions).Validate(schema.Example), + ) } if schema.Items != nil { if schema.Items.Schema != nil { @@ -230,7 +256,7 @@ func (ex *exampleValidator) validateExampleValueSchemaAgainstSchema(path, in str } if schema.AdditionalItems != nil && schema.AdditionalItems.Schema != nil { // NOTE: we keep validating values, even though additionalItems is unsupported in Swagger 2.0 (and 3.0 as well) - res.Merge(ex.validateExampleValueSchemaAgainstSchema(fmt.Sprintf("%s.additionalItems", path), in, schema.AdditionalItems.Schema)) + res.Merge(ex.validateExampleValueSchemaAgainstSchema(path+".additionalItems", in, schema.AdditionalItems.Schema)) } for propName, prop := range schema.Properties { res.Merge(ex.validateExampleValueSchemaAgainstSchema(path+"."+propName, in, &prop)) //#nosec @@ -239,7 +265,7 @@ func (ex *exampleValidator) validateExampleValueSchemaAgainstSchema(path, in str res.Merge(ex.validateExampleValueSchemaAgainstSchema(path+"."+propName, in, &prop)) //#nosec } if schema.AdditionalProperties != nil && schema.AdditionalProperties.Schema != nil { - res.Merge(ex.validateExampleValueSchemaAgainstSchema(fmt.Sprintf("%s.additionalProperties", path), in, schema.AdditionalProperties.Schema)) + res.Merge(ex.validateExampleValueSchemaAgainstSchema(path+".additionalProperties", in, schema.AdditionalProperties.Schema)) } if schema.AllOf != nil { for i, aoSch := range schema.AllOf { @@ -250,13 +276,16 @@ func (ex *exampleValidator) validateExampleValueSchemaAgainstSchema(path, in str } // TODO: Temporary duplicated code. Need to refactor with examples -// nolint: dupl +// + func (ex *exampleValidator) validateExampleValueItemsAgainstSchema(path, in string, root interface{}, items *spec.Items) *Result { - res := new(Result) + res := pools.poolOfResults.BorrowResult() s := ex.SpecValidator if items != nil { if items.Example != nil { - res.MergeAsWarnings(newItemsValidator(path, in, items, root, s.KnownFormats).Validate(0, items.Example)) + res.MergeAsWarnings( + newItemsValidator(path, in, items, root, s.KnownFormats, ex.schemaOptions).Validate(0, items.Example), + ) } if items.Items != nil { res.Merge(ex.validateExampleValueItemsAgainstSchema(path+"[0].example", in, root, items.Items)) @@ -265,5 +294,6 @@ func (ex *exampleValidator) validateExampleValueItemsAgainstSchema(path, in stri res.AddErrors(invalidPatternInMsg(path, in, items.Pattern)) } } + return res } diff --git a/vendor/github.com/go-openapi/validate/formats.go b/vendor/github.com/go-openapi/validate/formats.go index 0ad996cbbc2..f4e35521306 100644 --- a/vendor/github.com/go-openapi/validate/formats.go +++ b/vendor/github.com/go-openapi/validate/formats.go @@ -22,10 +22,32 @@ import ( ) type formatValidator struct { - Format string Path string In string + Format string KnownFormats strfmt.Registry + Options *SchemaValidatorOptions +} + +func newFormatValidator(path, in, format string, formats strfmt.Registry, opts *SchemaValidatorOptions) *formatValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) + } + + var f *formatValidator + if opts.recycleValidators { + f = pools.poolOfFormatValidators.BorrowValidator() + } else { + f = new(formatValidator) + } + + f.Path = path + f.In = in + f.Format = format + f.KnownFormats = formats + f.Options = opts + + return f } func (f *formatValidator) SetPath(path string) { @@ -33,37 +55,45 @@ func (f *formatValidator) SetPath(path string) { } func (f *formatValidator) Applies(source interface{}, kind reflect.Kind) bool { - doit := func() bool { - if source == nil { - return false - } - switch source := source.(type) { - case *spec.Items: - return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) - case *spec.Parameter: - return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) - case *spec.Schema: - return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) - case *spec.Header: - return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) - } + if source == nil || f.KnownFormats == nil { + return false + } + + switch source := source.(type) { + case *spec.Items: + return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) + case *spec.Parameter: + return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) + case *spec.Schema: + return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) + case *spec.Header: + return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) + default: return false } - r := doit() - debugLog("format validator for %q applies %t for %T (kind: %v)\n", f.Path, r, source, kind) - return r } func (f *formatValidator) Validate(val interface{}) *Result { - result := new(Result) - debugLog("validating \"%v\" against format: %s", val, f.Format) + if f.Options.recycleValidators { + defer func() { + f.redeem() + }() + } + + var result *Result + if f.Options.recycleResult { + result = pools.poolOfResults.BorrowResult() + } else { + result = new(Result) + } if err := FormatOf(f.Path, f.In, f.Format, val.(string), f.KnownFormats); err != nil { result.AddErrors(err) } - if result.HasErrors() { - return result - } - return nil + return result +} + +func (f *formatValidator) redeem() { + pools.poolOfFormatValidators.RedeemValidator(f) } diff --git a/vendor/github.com/go-openapi/validate/helpers.go b/vendor/github.com/go-openapi/validate/helpers.go index dc376f7f93d..757e403d912 100644 --- a/vendor/github.com/go-openapi/validate/helpers.go +++ b/vendor/github.com/go-openapi/validate/helpers.go @@ -101,9 +101,17 @@ type errorHelper struct { // A collection of unexported helpers for error construction } -func (h *errorHelper) sErr(err errors.Error) *Result { +func (h *errorHelper) sErr(err errors.Error, recycle bool) *Result { // Builds a Result from standard errors.Error - return &Result{Errors: []error{err}} + var result *Result + if recycle { + result = pools.poolOfResults.BorrowResult() + } else { + result = new(Result) + } + result.Errors = []error{err} + + return result } func (h *errorHelper) addPointerError(res *Result, err error, ref string, fromPath string) *Result { @@ -157,7 +165,7 @@ func (h *valueHelper) asInt64(val interface{}) int64 { // Number conversion function for int64, without error checking // (implements an implicit type upgrade). v := reflect.ValueOf(val) - switch v.Kind() { + switch v.Kind() { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return v.Int() case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: @@ -174,7 +182,7 @@ func (h *valueHelper) asUint64(val interface{}) uint64 { // Number conversion function for uint64, without error checking // (implements an implicit type upgrade). v := reflect.ValueOf(val) - switch v.Kind() { + switch v.Kind() { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return uint64(v.Int()) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: @@ -192,7 +200,7 @@ func (h *valueHelper) asFloat64(val interface{}) float64 { // Number conversion function for float64, without error checking // (implements an implicit type upgrade). v := reflect.ValueOf(val) - switch v.Kind() { + switch v.Kind() { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return float64(v.Int()) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: @@ -225,7 +233,7 @@ func (h *paramHelper) safeExpandedParamsFor(path, method, operationID string, re operation.Parameters = resolvedParams for _, ppr := range s.expandedAnalyzer().SafeParamsFor(method, path, - func(p spec.Parameter, err error) bool { + func(_ spec.Parameter, err error) bool { // since params have already been expanded, there are few causes for error res.AddErrors(someParametersBrokenMsg(path, method, operationID)) // original error from analyzer @@ -306,6 +314,7 @@ func (r *responseHelper) expandResponseRef( errorHelp.addPointerError(res, err, response.Ref.String(), path) return nil, res } + return response, res } diff --git a/vendor/github.com/go-openapi/validate/object_validator.go b/vendor/github.com/go-openapi/validate/object_validator.go index 7bb12615d8e..dff73fa98a1 100644 --- a/vendor/github.com/go-openapi/validate/object_validator.go +++ b/vendor/github.com/go-openapi/validate/object_validator.go @@ -15,8 +15,8 @@ package validate import ( + "fmt" "reflect" - "regexp" "strings" "github.com/go-openapi/errors" @@ -35,62 +35,116 @@ type objectValidator struct { PatternProperties map[string]spec.Schema Root interface{} KnownFormats strfmt.Registry - Options SchemaValidatorOptions + Options *SchemaValidatorOptions + splitPath []string +} + +func newObjectValidator(path, in string, + maxProperties, minProperties *int64, required []string, properties spec.SchemaProperties, + additionalProperties *spec.SchemaOrBool, patternProperties spec.SchemaProperties, + root interface{}, formats strfmt.Registry, opts *SchemaValidatorOptions) *objectValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) + } + + var v *objectValidator + if opts.recycleValidators { + v = pools.poolOfObjectValidators.BorrowValidator() + } else { + v = new(objectValidator) + } + + v.Path = path + v.In = in + v.MaxProperties = maxProperties + v.MinProperties = minProperties + v.Required = required + v.Properties = properties + v.AdditionalProperties = additionalProperties + v.PatternProperties = patternProperties + v.Root = root + v.KnownFormats = formats + v.Options = opts + v.splitPath = strings.Split(v.Path, ".") + + return v } func (o *objectValidator) SetPath(path string) { o.Path = path + o.splitPath = strings.Split(path, ".") } func (o *objectValidator) Applies(source interface{}, kind reflect.Kind) bool { // TODO: this should also work for structs // there is a problem in the type validator where it will be unhappy about null values // so that requires more testing - r := reflect.TypeOf(source) == specSchemaType && (kind == reflect.Map || kind == reflect.Struct) - debugLog("object validator for %q applies %t for %T (kind: %v)\n", o.Path, r, source, kind) - return r + _, isSchema := source.(*spec.Schema) + return isSchema && (kind == reflect.Map || kind == reflect.Struct) } func (o *objectValidator) isProperties() bool { - p := strings.Split(o.Path, ".") + p := o.splitPath return len(p) > 1 && p[len(p)-1] == jsonProperties && p[len(p)-2] != jsonProperties } func (o *objectValidator) isDefault() bool { - p := strings.Split(o.Path, ".") + p := o.splitPath return len(p) > 1 && p[len(p)-1] == jsonDefault && p[len(p)-2] != jsonDefault } func (o *objectValidator) isExample() bool { - p := strings.Split(o.Path, ".") + p := o.splitPath return len(p) > 1 && (p[len(p)-1] == swaggerExample || p[len(p)-1] == swaggerExamples) && p[len(p)-2] != swaggerExample } func (o *objectValidator) checkArrayMustHaveItems(res *Result, val map[string]interface{}) { // for swagger 2.0 schemas, there is an additional constraint to have array items defined explicitly. // with pure jsonschema draft 4, one may have arrays with undefined items (i.e. any type). - if t, typeFound := val[jsonType]; typeFound { - if tpe, ok := t.(string); ok && tpe == arrayType { - if item, itemsKeyFound := val[jsonItems]; !itemsKeyFound { - res.AddErrors(errors.Required(jsonItems, o.Path, item)) - } - } + if val == nil { + return + } + + t, typeFound := val[jsonType] + if !typeFound { + return + } + + tpe, isString := t.(string) + if !isString || tpe != arrayType { + return + } + + item, itemsKeyFound := val[jsonItems] + if itemsKeyFound { + return } + + res.AddErrors(errors.Required(jsonItems, o.Path, item)) } func (o *objectValidator) checkItemsMustBeTypeArray(res *Result, val map[string]interface{}) { - if !o.isProperties() && !o.isDefault() && !o.isExample() { - if _, itemsKeyFound := val[jsonItems]; itemsKeyFound { - t, typeFound := val[jsonType] - if typeFound { - if tpe, ok := t.(string); !ok || tpe != arrayType { - res.AddErrors(errors.InvalidType(o.Path, o.In, arrayType, nil)) - } - } else { - // there is no type - res.AddErrors(errors.Required(jsonType, o.Path, t)) - } - } + if val == nil { + return + } + + if o.isProperties() || o.isDefault() || o.isExample() { + return + } + + _, itemsKeyFound := val[jsonItems] + if !itemsKeyFound { + return + } + + t, typeFound := val[jsonType] + if !typeFound { + // there is no type + res.AddErrors(errors.Required(jsonType, o.Path, t)) + } + + if tpe, isString := t.(string); !isString || tpe != arrayType { + res.AddErrors(errors.InvalidType(o.Path, o.In, arrayType, nil)) } } @@ -104,176 +158,274 @@ func (o *objectValidator) precheck(res *Result, val map[string]interface{}) { } func (o *objectValidator) Validate(data interface{}) *Result { - val := data.(map[string]interface{}) - // TODO: guard against nil data + if o.Options.recycleValidators { + defer func() { + o.redeem() + }() + } + + var val map[string]interface{} + if data != nil { + var ok bool + val, ok = data.(map[string]interface{}) + if !ok { + return errorHelp.sErr(invalidObjectMsg(o.Path, o.In), o.Options.recycleResult) + } + } numKeys := int64(len(val)) if o.MinProperties != nil && numKeys < *o.MinProperties { - return errorHelp.sErr(errors.TooFewProperties(o.Path, o.In, *o.MinProperties)) + return errorHelp.sErr(errors.TooFewProperties(o.Path, o.In, *o.MinProperties), o.Options.recycleResult) } if o.MaxProperties != nil && numKeys > *o.MaxProperties { - return errorHelp.sErr(errors.TooManyProperties(o.Path, o.In, *o.MaxProperties)) + return errorHelp.sErr(errors.TooManyProperties(o.Path, o.In, *o.MaxProperties), o.Options.recycleResult) } - res := new(Result) + var res *Result + if o.Options.recycleResult { + res = pools.poolOfResults.BorrowResult() + } else { + res = new(Result) + } o.precheck(res, val) // check validity of field names if o.AdditionalProperties != nil && !o.AdditionalProperties.Allows { // Case: additionalProperties: false - for k := range val { - _, regularProperty := o.Properties[k] - matched := false - - for pk := range o.PatternProperties { - if matches, _ := regexp.MatchString(pk, k); matches { - matched = true - break - } + o.validateNoAdditionalProperties(val, res) + } else { + // Cases: empty additionalProperties (implying: true), or additionalProperties: true, or additionalProperties: { <> } + o.validateAdditionalProperties(val, res) + } + + o.validatePropertiesSchema(val, res) + + // Check patternProperties + // TODO: it looks like we have done that twice in many cases + for key, value := range val { + _, regularProperty := o.Properties[key] + matched, _, patterns := o.validatePatternProperty(key, value, res) // applies to regular properties as well + if regularProperty || !matched { + continue + } + + for _, pName := range patterns { + if v, ok := o.PatternProperties[pName]; ok { + r := newSchemaValidator(&v, o.Root, o.Path+"."+key, o.KnownFormats, o.Options).Validate(value) + res.mergeForField(data.(map[string]interface{}), key, r) } + } + } - if !regularProperty && k != "$schema" && k != "id" && !matched { - // Special properties "$schema" and "id" are ignored - res.AddErrors(errors.PropertyNotAllowed(o.Path, o.In, k)) - - // BUG(fredbi): This section should move to a part dedicated to spec validation as - // it will conflict with regular schemas where a property "headers" is defined. - - // - // Croaks a more explicit message on top of the standard one - // on some recognized cases. - // - // NOTE: edge cases with invalid type assertion are simply ignored here. - // NOTE: prefix your messages here by "IMPORTANT!" so there are not filtered - // by higher level callers (the IMPORTANT! tag will be eventually - // removed). - if k == "headers" && val[k] != nil { - // $ref is forbidden in header - if headers, mapOk := val[k].(map[string]interface{}); mapOk { - for headerKey, headerBody := range headers { - if headerBody != nil { - if headerSchema, mapOfMapOk := headerBody.(map[string]interface{}); mapOfMapOk { - if _, found := headerSchema["$ref"]; found { - var msg string - if refString, stringOk := headerSchema["$ref"].(string); stringOk { - msg = strings.Join([]string{", one may not use $ref=\":", refString, "\""}, "") - } - res.AddErrors(refNotAllowedInHeaderMsg(o.Path, headerKey, msg)) - } - } - } - } - } - /* - case "$ref": - if val[k] != nil { - // TODO: check context of that ref: warn about siblings, check against invalid context - } - */ - } + return res +} + +func (o *objectValidator) validateNoAdditionalProperties(val map[string]interface{}, res *Result) { + for k := range val { + if k == "$schema" || k == "id" { + // special properties "$schema" and "id" are ignored + continue + } + + _, regularProperty := o.Properties[k] + if regularProperty { + continue + } + + matched := false + for pk := range o.PatternProperties { + re, err := compileRegexp(pk) + if err != nil { + continue + } + if matches := re.MatchString(k); matches { + matched = true + break } } - } else { - // Cases: no additionalProperties (implying: true), or additionalProperties: true, or additionalProperties: { <> } - for key, value := range val { - _, regularProperty := o.Properties[key] - - // Validates property against "patternProperties" if applicable - // BUG(fredbi): succeededOnce is always false - - // NOTE: how about regular properties which do not match patternProperties? - matched, succeededOnce, _ := o.validatePatternProperty(key, value, res) - - if !(regularProperty || matched || succeededOnce) { - - // Cases: properties which are not regular properties and have not been matched by the PatternProperties validator - if o.AdditionalProperties != nil && o.AdditionalProperties.Schema != nil { - // AdditionalProperties as Schema - r := NewSchemaValidator(o.AdditionalProperties.Schema, o.Root, o.Path+"."+key, o.KnownFormats, o.Options.Options()...).Validate(value) - res.mergeForField(data.(map[string]interface{}), key, r) - } else if regularProperty && !(matched || succeededOnce) { - // TODO: this is dead code since regularProperty=false here - res.AddErrors(errors.FailedAllPatternProperties(o.Path, o.In, key)) - } + if matched { + continue + } + + res.AddErrors(errors.PropertyNotAllowed(o.Path, o.In, k)) + + // BUG(fredbi): This section should move to a part dedicated to spec validation as + // it will conflict with regular schemas where a property "headers" is defined. + + // + // Croaks a more explicit message on top of the standard one + // on some recognized cases. + // + // NOTE: edge cases with invalid type assertion are simply ignored here. + // NOTE: prefix your messages here by "IMPORTANT!" so there are not filtered + // by higher level callers (the IMPORTANT! tag will be eventually + // removed). + if k != "headers" || val[k] == nil { + continue + } + + // $ref is forbidden in header + headers, mapOk := val[k].(map[string]interface{}) + if !mapOk { + continue + } + + for headerKey, headerBody := range headers { + if headerBody == nil { + continue + } + + headerSchema, mapOfMapOk := headerBody.(map[string]interface{}) + if !mapOfMapOk { + continue + } + + _, found := headerSchema["$ref"] + if !found { + continue + } + + refString, stringOk := headerSchema["$ref"].(string) + if !stringOk { + continue } + + msg := strings.Join([]string{", one may not use $ref=\":", refString, "\""}, "") + res.AddErrors(refNotAllowedInHeaderMsg(o.Path, headerKey, msg)) + /* + case "$ref": + if val[k] != nil { + // TODO: check context of that ref: warn about siblings, check against invalid context + } + */ + } + } +} + +func (o *objectValidator) validateAdditionalProperties(val map[string]interface{}, res *Result) { + for key, value := range val { + _, regularProperty := o.Properties[key] + if regularProperty { + continue + } + + // Validates property against "patternProperties" if applicable + // BUG(fredbi): succeededOnce is always false + + // NOTE: how about regular properties which do not match patternProperties? + matched, succeededOnce, _ := o.validatePatternProperty(key, value, res) + if matched || succeededOnce { + continue + } + + if o.AdditionalProperties == nil || o.AdditionalProperties.Schema == nil { + continue } - // Valid cases: additionalProperties: true or undefined + + // Cases: properties which are not regular properties and have not been matched by the PatternProperties validator + // AdditionalProperties as Schema + r := newSchemaValidator(o.AdditionalProperties.Schema, o.Root, o.Path+"."+key, o.KnownFormats, o.Options).Validate(value) + res.mergeForField(val, key, r) } + // Valid cases: additionalProperties: true or undefined +} - createdFromDefaults := map[string]bool{} +func (o *objectValidator) validatePropertiesSchema(val map[string]interface{}, res *Result) { + createdFromDefaults := map[string]struct{}{} // Property types: // - regular Property + pSchema := pools.poolOfSchemas.BorrowSchema() // recycle a spec.Schema object which lifespan extends only to the validation of properties + defer func() { + pools.poolOfSchemas.RedeemSchema(pSchema) + }() + for pName := range o.Properties { - pSchema := o.Properties[pName] // one instance per iteration - rName := pName - if o.Path != "" { + *pSchema = o.Properties[pName] + var rName string + if o.Path == "" { + rName = pName + } else { rName = o.Path + "." + pName } // Recursively validates each property against its schema - if v, ok := val[pName]; ok { - r := NewSchemaValidator(&pSchema, o.Root, rName, o.KnownFormats, o.Options.Options()...).Validate(v) - res.mergeForField(data.(map[string]interface{}), pName, r) - } else if pSchema.Default != nil { - // If a default value is defined, creates the property from defaults - // NOTE: JSON schema does not enforce default values to be valid against schema. Swagger does. - createdFromDefaults[pName] = true - res.addPropertySchemata(data.(map[string]interface{}), pName, &pSchema) + v, ok := val[pName] + if ok { + r := newSchemaValidator(pSchema, o.Root, rName, o.KnownFormats, o.Options).Validate(v) + res.mergeForField(val, pName, r) + + continue } - } - // Check required properties - if len(o.Required) > 0 { - for _, k := range o.Required { - if v, ok := val[k]; !ok && !createdFromDefaults[k] { - res.AddErrors(errors.Required(o.Path+"."+k, o.In, v)) - continue + if pSchema.Default != nil { + // if a default value is defined, creates the property from defaults + // NOTE: JSON schema does not enforce default values to be valid against schema. Swagger does. + createdFromDefaults[pName] = struct{}{} + if !o.Options.skipSchemataResult { + res.addPropertySchemata(val, pName, pSchema) // this shallow-clones the content of the pSchema pointer } } } - // Check patternProperties - // TODO: it looks like we have done that twice in many cases - for key, value := range val { - _, regularProperty := o.Properties[key] - matched, _ /*succeededOnce*/, patterns := o.validatePatternProperty(key, value, res) - if !regularProperty && (matched /*|| succeededOnce*/) { - for _, pName := range patterns { - if v, ok := o.PatternProperties[pName]; ok { - r := NewSchemaValidator(&v, o.Root, o.Path+"."+key, o.KnownFormats, o.Options.Options()...).Validate(value) - res.mergeForField(data.(map[string]interface{}), key, r) - } - } + if len(o.Required) == 0 { + return + } + + // Check required properties + for _, k := range o.Required { + v, ok := val[k] + if ok { + continue + } + _, isCreatedFromDefaults := createdFromDefaults[k] + if isCreatedFromDefaults { + continue } + + res.AddErrors(errors.Required(fmt.Sprintf("%s.%s", o.Path, k), o.In, v)) } - return res } // TODO: succeededOnce is not used anywhere func (o *objectValidator) validatePatternProperty(key string, value interface{}, result *Result) (bool, bool, []string) { + if len(o.PatternProperties) == 0 { + return false, false, nil + } + matched := false succeededOnce := false - var patterns []string + patterns := make([]string, 0, len(o.PatternProperties)) - for k, schema := range o.PatternProperties { - sch := schema - if match, _ := regexp.MatchString(k, key); match { - patterns = append(patterns, k) - matched = true - validator := NewSchemaValidator(&sch, o.Root, o.Path+"."+key, o.KnownFormats, o.Options.Options()...) + schema := pools.poolOfSchemas.BorrowSchema() + defer func() { + pools.poolOfSchemas.RedeemSchema(schema) + }() - res := validator.Validate(value) - result.Merge(res) + for k := range o.PatternProperties { + re, err := compileRegexp(k) + if err != nil { + continue } - } - // BUG(fredbi): can't get to here. Should remove dead code (commented out). + match := re.MatchString(key) + if !match { + continue + } - // if succeededOnce { - // result.Inc() - // } + *schema = o.PatternProperties[k] + patterns = append(patterns, k) + matched = true + validator := newSchemaValidator(schema, o.Root, fmt.Sprintf("%s.%s", o.Path, key), o.KnownFormats, o.Options) + + res := validator.Validate(value) + result.Merge(res) + } return matched, succeededOnce, patterns } + +func (o *objectValidator) redeem() { + pools.poolOfObjectValidators.RedeemValidator(o) +} diff --git a/vendor/github.com/go-openapi/validate/options.go b/vendor/github.com/go-openapi/validate/options.go index 8a22ce99114..cfe9b0660f6 100644 --- a/vendor/github.com/go-openapi/validate/options.go +++ b/vendor/github.com/go-openapi/validate/options.go @@ -31,6 +31,7 @@ type Opts struct { // GET:/v1/{shelve} and GET:/v1/{book}, where the IDs are "shelve/*" and // /"shelve/*/book/*" respectively. StrictPathParamUniqueness bool + SkipSchemataResult bool } var ( diff --git a/vendor/github.com/go-openapi/validate/pools.go b/vendor/github.com/go-openapi/validate/pools.go new file mode 100644 index 00000000000..3ddce4dcc2b --- /dev/null +++ b/vendor/github.com/go-openapi/validate/pools.go @@ -0,0 +1,366 @@ +//go:build !validatedebug + +package validate + +import ( + "sync" + + "github.com/go-openapi/spec" +) + +var pools allPools + +func init() { + resetPools() +} + +func resetPools() { + // NOTE: for testing purpose, we might want to reset pools after calling Validate twice. + // The pool is corrupted in that case: calling Put twice inserts a duplicate in the pool + // and further calls to Get are mishandled. + + pools = allPools{ + poolOfSchemaValidators: schemaValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &SchemaValidator{} + + return s + }, + }, + }, + poolOfObjectValidators: objectValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &objectValidator{} + + return s + }, + }, + }, + poolOfSliceValidators: sliceValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &schemaSliceValidator{} + + return s + }, + }, + }, + poolOfItemsValidators: itemsValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &itemsValidator{} + + return s + }, + }, + }, + poolOfBasicCommonValidators: basicCommonValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &basicCommonValidator{} + + return s + }, + }, + }, + poolOfHeaderValidators: headerValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &HeaderValidator{} + + return s + }, + }, + }, + poolOfParamValidators: paramValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &ParamValidator{} + + return s + }, + }, + }, + poolOfBasicSliceValidators: basicSliceValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &basicSliceValidator{} + + return s + }, + }, + }, + poolOfNumberValidators: numberValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &numberValidator{} + + return s + }, + }, + }, + poolOfStringValidators: stringValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &stringValidator{} + + return s + }, + }, + }, + poolOfSchemaPropsValidators: schemaPropsValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &schemaPropsValidator{} + + return s + }, + }, + }, + poolOfFormatValidators: formatValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &formatValidator{} + + return s + }, + }, + }, + poolOfTypeValidators: typeValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &typeValidator{} + + return s + }, + }, + }, + poolOfSchemas: schemasPool{ + Pool: &sync.Pool{ + New: func() any { + s := &spec.Schema{} + + return s + }, + }, + }, + poolOfResults: resultsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &Result{} + + return s + }, + }, + }, + } +} + +type ( + allPools struct { + // memory pools for all validator objects. + // + // Each pool can be borrowed from and redeemed to. + poolOfSchemaValidators schemaValidatorsPool + poolOfObjectValidators objectValidatorsPool + poolOfSliceValidators sliceValidatorsPool + poolOfItemsValidators itemsValidatorsPool + poolOfBasicCommonValidators basicCommonValidatorsPool + poolOfHeaderValidators headerValidatorsPool + poolOfParamValidators paramValidatorsPool + poolOfBasicSliceValidators basicSliceValidatorsPool + poolOfNumberValidators numberValidatorsPool + poolOfStringValidators stringValidatorsPool + poolOfSchemaPropsValidators schemaPropsValidatorsPool + poolOfFormatValidators formatValidatorsPool + poolOfTypeValidators typeValidatorsPool + poolOfSchemas schemasPool + poolOfResults resultsPool + } + + schemaValidatorsPool struct { + *sync.Pool + } + + objectValidatorsPool struct { + *sync.Pool + } + + sliceValidatorsPool struct { + *sync.Pool + } + + itemsValidatorsPool struct { + *sync.Pool + } + + basicCommonValidatorsPool struct { + *sync.Pool + } + + headerValidatorsPool struct { + *sync.Pool + } + + paramValidatorsPool struct { + *sync.Pool + } + + basicSliceValidatorsPool struct { + *sync.Pool + } + + numberValidatorsPool struct { + *sync.Pool + } + + stringValidatorsPool struct { + *sync.Pool + } + + schemaPropsValidatorsPool struct { + *sync.Pool + } + + formatValidatorsPool struct { + *sync.Pool + } + + typeValidatorsPool struct { + *sync.Pool + } + + schemasPool struct { + *sync.Pool + } + + resultsPool struct { + *sync.Pool + } +) + +func (p schemaValidatorsPool) BorrowValidator() *SchemaValidator { + return p.Get().(*SchemaValidator) +} + +func (p schemaValidatorsPool) RedeemValidator(s *SchemaValidator) { + // NOTE: s might be nil. In that case, Put is a noop. + p.Put(s) +} + +func (p objectValidatorsPool) BorrowValidator() *objectValidator { + return p.Get().(*objectValidator) +} + +func (p objectValidatorsPool) RedeemValidator(s *objectValidator) { + p.Put(s) +} + +func (p sliceValidatorsPool) BorrowValidator() *schemaSliceValidator { + return p.Get().(*schemaSliceValidator) +} + +func (p sliceValidatorsPool) RedeemValidator(s *schemaSliceValidator) { + p.Put(s) +} + +func (p itemsValidatorsPool) BorrowValidator() *itemsValidator { + return p.Get().(*itemsValidator) +} + +func (p itemsValidatorsPool) RedeemValidator(s *itemsValidator) { + p.Put(s) +} + +func (p basicCommonValidatorsPool) BorrowValidator() *basicCommonValidator { + return p.Get().(*basicCommonValidator) +} + +func (p basicCommonValidatorsPool) RedeemValidator(s *basicCommonValidator) { + p.Put(s) +} + +func (p headerValidatorsPool) BorrowValidator() *HeaderValidator { + return p.Get().(*HeaderValidator) +} + +func (p headerValidatorsPool) RedeemValidator(s *HeaderValidator) { + p.Put(s) +} + +func (p paramValidatorsPool) BorrowValidator() *ParamValidator { + return p.Get().(*ParamValidator) +} + +func (p paramValidatorsPool) RedeemValidator(s *ParamValidator) { + p.Put(s) +} + +func (p basicSliceValidatorsPool) BorrowValidator() *basicSliceValidator { + return p.Get().(*basicSliceValidator) +} + +func (p basicSliceValidatorsPool) RedeemValidator(s *basicSliceValidator) { + p.Put(s) +} + +func (p numberValidatorsPool) BorrowValidator() *numberValidator { + return p.Get().(*numberValidator) +} + +func (p numberValidatorsPool) RedeemValidator(s *numberValidator) { + p.Put(s) +} + +func (p stringValidatorsPool) BorrowValidator() *stringValidator { + return p.Get().(*stringValidator) +} + +func (p stringValidatorsPool) RedeemValidator(s *stringValidator) { + p.Put(s) +} + +func (p schemaPropsValidatorsPool) BorrowValidator() *schemaPropsValidator { + return p.Get().(*schemaPropsValidator) +} + +func (p schemaPropsValidatorsPool) RedeemValidator(s *schemaPropsValidator) { + p.Put(s) +} + +func (p formatValidatorsPool) BorrowValidator() *formatValidator { + return p.Get().(*formatValidator) +} + +func (p formatValidatorsPool) RedeemValidator(s *formatValidator) { + p.Put(s) +} + +func (p typeValidatorsPool) BorrowValidator() *typeValidator { + return p.Get().(*typeValidator) +} + +func (p typeValidatorsPool) RedeemValidator(s *typeValidator) { + p.Put(s) +} + +func (p schemasPool) BorrowSchema() *spec.Schema { + return p.Get().(*spec.Schema) +} + +func (p schemasPool) RedeemSchema(s *spec.Schema) { + p.Put(s) +} + +func (p resultsPool) BorrowResult() *Result { + return p.Get().(*Result).cleared() +} + +func (p resultsPool) RedeemResult(s *Result) { + if s == emptyResult { + return + } + p.Put(s) +} diff --git a/vendor/github.com/go-openapi/validate/pools_debug.go b/vendor/github.com/go-openapi/validate/pools_debug.go new file mode 100644 index 00000000000..12949f02a7e --- /dev/null +++ b/vendor/github.com/go-openapi/validate/pools_debug.go @@ -0,0 +1,1012 @@ +//go:build validatedebug + +package validate + +import ( + "fmt" + "runtime" + "sync" + "testing" + + "github.com/go-openapi/spec" +) + +// This version of the pools is to be used for debugging and testing, with build tag "validatedebug". +// +// In this mode, the pools are tracked for allocation and redemption of borrowed objects, so we can +// verify a few behaviors of the validators. The debug pools panic when an invalid usage pattern is detected. + +var pools allPools + +func init() { + resetPools() +} + +func resetPools() { + // NOTE: for testing purpose, we might want to reset pools after calling Validate twice. + // The pool is corrupted in that case: calling Put twice inserts a duplicate in the pool + // and further calls to Get are mishandled. + + pools = allPools{ + poolOfSchemaValidators: schemaValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &SchemaValidator{} + + return s + }, + }, + debugMap: make(map[*SchemaValidator]status), + allocMap: make(map[*SchemaValidator]string), + redeemMap: make(map[*SchemaValidator]string), + }, + poolOfObjectValidators: objectValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &objectValidator{} + + return s + }, + }, + debugMap: make(map[*objectValidator]status), + allocMap: make(map[*objectValidator]string), + redeemMap: make(map[*objectValidator]string), + }, + poolOfSliceValidators: sliceValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &schemaSliceValidator{} + + return s + }, + }, + debugMap: make(map[*schemaSliceValidator]status), + allocMap: make(map[*schemaSliceValidator]string), + redeemMap: make(map[*schemaSliceValidator]string), + }, + poolOfItemsValidators: itemsValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &itemsValidator{} + + return s + }, + }, + debugMap: make(map[*itemsValidator]status), + allocMap: make(map[*itemsValidator]string), + redeemMap: make(map[*itemsValidator]string), + }, + poolOfBasicCommonValidators: basicCommonValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &basicCommonValidator{} + + return s + }, + }, + debugMap: make(map[*basicCommonValidator]status), + allocMap: make(map[*basicCommonValidator]string), + redeemMap: make(map[*basicCommonValidator]string), + }, + poolOfHeaderValidators: headerValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &HeaderValidator{} + + return s + }, + }, + debugMap: make(map[*HeaderValidator]status), + allocMap: make(map[*HeaderValidator]string), + redeemMap: make(map[*HeaderValidator]string), + }, + poolOfParamValidators: paramValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &ParamValidator{} + + return s + }, + }, + debugMap: make(map[*ParamValidator]status), + allocMap: make(map[*ParamValidator]string), + redeemMap: make(map[*ParamValidator]string), + }, + poolOfBasicSliceValidators: basicSliceValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &basicSliceValidator{} + + return s + }, + }, + debugMap: make(map[*basicSliceValidator]status), + allocMap: make(map[*basicSliceValidator]string), + redeemMap: make(map[*basicSliceValidator]string), + }, + poolOfNumberValidators: numberValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &numberValidator{} + + return s + }, + }, + debugMap: make(map[*numberValidator]status), + allocMap: make(map[*numberValidator]string), + redeemMap: make(map[*numberValidator]string), + }, + poolOfStringValidators: stringValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &stringValidator{} + + return s + }, + }, + debugMap: make(map[*stringValidator]status), + allocMap: make(map[*stringValidator]string), + redeemMap: make(map[*stringValidator]string), + }, + poolOfSchemaPropsValidators: schemaPropsValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &schemaPropsValidator{} + + return s + }, + }, + debugMap: make(map[*schemaPropsValidator]status), + allocMap: make(map[*schemaPropsValidator]string), + redeemMap: make(map[*schemaPropsValidator]string), + }, + poolOfFormatValidators: formatValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &formatValidator{} + + return s + }, + }, + debugMap: make(map[*formatValidator]status), + allocMap: make(map[*formatValidator]string), + redeemMap: make(map[*formatValidator]string), + }, + poolOfTypeValidators: typeValidatorsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &typeValidator{} + + return s + }, + }, + debugMap: make(map[*typeValidator]status), + allocMap: make(map[*typeValidator]string), + redeemMap: make(map[*typeValidator]string), + }, + poolOfSchemas: schemasPool{ + Pool: &sync.Pool{ + New: func() any { + s := &spec.Schema{} + + return s + }, + }, + debugMap: make(map[*spec.Schema]status), + allocMap: make(map[*spec.Schema]string), + redeemMap: make(map[*spec.Schema]string), + }, + poolOfResults: resultsPool{ + Pool: &sync.Pool{ + New: func() any { + s := &Result{} + + return s + }, + }, + debugMap: make(map[*Result]status), + allocMap: make(map[*Result]string), + redeemMap: make(map[*Result]string), + }, + } +} + +const ( + statusFresh status = iota + 1 + statusRecycled + statusRedeemed +) + +func (s status) String() string { + switch s { + case statusFresh: + return "fresh" + case statusRecycled: + return "recycled" + case statusRedeemed: + return "redeemed" + default: + panic(fmt.Errorf("invalid status: %d", s)) + } +} + +type ( + // Debug + status uint8 + + allPools struct { + // memory pools for all validator objects. + // + // Each pool can be borrowed from and redeemed to. + poolOfSchemaValidators schemaValidatorsPool + poolOfObjectValidators objectValidatorsPool + poolOfSliceValidators sliceValidatorsPool + poolOfItemsValidators itemsValidatorsPool + poolOfBasicCommonValidators basicCommonValidatorsPool + poolOfHeaderValidators headerValidatorsPool + poolOfParamValidators paramValidatorsPool + poolOfBasicSliceValidators basicSliceValidatorsPool + poolOfNumberValidators numberValidatorsPool + poolOfStringValidators stringValidatorsPool + poolOfSchemaPropsValidators schemaPropsValidatorsPool + poolOfFormatValidators formatValidatorsPool + poolOfTypeValidators typeValidatorsPool + poolOfSchemas schemasPool + poolOfResults resultsPool + } + + schemaValidatorsPool struct { + *sync.Pool + debugMap map[*SchemaValidator]status + allocMap map[*SchemaValidator]string + redeemMap map[*SchemaValidator]string + mx sync.Mutex + } + + objectValidatorsPool struct { + *sync.Pool + debugMap map[*objectValidator]status + allocMap map[*objectValidator]string + redeemMap map[*objectValidator]string + mx sync.Mutex + } + + sliceValidatorsPool struct { + *sync.Pool + debugMap map[*schemaSliceValidator]status + allocMap map[*schemaSliceValidator]string + redeemMap map[*schemaSliceValidator]string + mx sync.Mutex + } + + itemsValidatorsPool struct { + *sync.Pool + debugMap map[*itemsValidator]status + allocMap map[*itemsValidator]string + redeemMap map[*itemsValidator]string + mx sync.Mutex + } + + basicCommonValidatorsPool struct { + *sync.Pool + debugMap map[*basicCommonValidator]status + allocMap map[*basicCommonValidator]string + redeemMap map[*basicCommonValidator]string + mx sync.Mutex + } + + headerValidatorsPool struct { + *sync.Pool + debugMap map[*HeaderValidator]status + allocMap map[*HeaderValidator]string + redeemMap map[*HeaderValidator]string + mx sync.Mutex + } + + paramValidatorsPool struct { + *sync.Pool + debugMap map[*ParamValidator]status + allocMap map[*ParamValidator]string + redeemMap map[*ParamValidator]string + mx sync.Mutex + } + + basicSliceValidatorsPool struct { + *sync.Pool + debugMap map[*basicSliceValidator]status + allocMap map[*basicSliceValidator]string + redeemMap map[*basicSliceValidator]string + mx sync.Mutex + } + + numberValidatorsPool struct { + *sync.Pool + debugMap map[*numberValidator]status + allocMap map[*numberValidator]string + redeemMap map[*numberValidator]string + mx sync.Mutex + } + + stringValidatorsPool struct { + *sync.Pool + debugMap map[*stringValidator]status + allocMap map[*stringValidator]string + redeemMap map[*stringValidator]string + mx sync.Mutex + } + + schemaPropsValidatorsPool struct { + *sync.Pool + debugMap map[*schemaPropsValidator]status + allocMap map[*schemaPropsValidator]string + redeemMap map[*schemaPropsValidator]string + mx sync.Mutex + } + + formatValidatorsPool struct { + *sync.Pool + debugMap map[*formatValidator]status + allocMap map[*formatValidator]string + redeemMap map[*formatValidator]string + mx sync.Mutex + } + + typeValidatorsPool struct { + *sync.Pool + debugMap map[*typeValidator]status + allocMap map[*typeValidator]string + redeemMap map[*typeValidator]string + mx sync.Mutex + } + + schemasPool struct { + *sync.Pool + debugMap map[*spec.Schema]status + allocMap map[*spec.Schema]string + redeemMap map[*spec.Schema]string + mx sync.Mutex + } + + resultsPool struct { + *sync.Pool + debugMap map[*Result]status + allocMap map[*Result]string + redeemMap map[*Result]string + mx sync.Mutex + } +) + +func (p *schemaValidatorsPool) BorrowValidator() *SchemaValidator { + s := p.Get().(*SchemaValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled schema should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *schemaValidatorsPool) RedeemValidator(s *SchemaValidator) { + // NOTE: s might be nil. In that case, Put is a noop. + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed schema should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed schema should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *objectValidatorsPool) BorrowValidator() *objectValidator { + s := p.Get().(*objectValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled object should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *objectValidatorsPool) RedeemValidator(s *objectValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed object should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed object should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *sliceValidatorsPool) BorrowValidator() *schemaSliceValidator { + s := p.Get().(*schemaSliceValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled schemaSliceValidator should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *sliceValidatorsPool) RedeemValidator(s *schemaSliceValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed schemaSliceValidator should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed schemaSliceValidator should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *itemsValidatorsPool) BorrowValidator() *itemsValidator { + s := p.Get().(*itemsValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled itemsValidator should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *itemsValidatorsPool) RedeemValidator(s *itemsValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed itemsValidator should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed itemsValidator should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *basicCommonValidatorsPool) BorrowValidator() *basicCommonValidator { + s := p.Get().(*basicCommonValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled basicCommonValidator should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *basicCommonValidatorsPool) RedeemValidator(s *basicCommonValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed basicCommonValidator should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed basicCommonValidator should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *headerValidatorsPool) BorrowValidator() *HeaderValidator { + s := p.Get().(*HeaderValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled HeaderValidator should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *headerValidatorsPool) RedeemValidator(s *HeaderValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed header should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed header should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *paramValidatorsPool) BorrowValidator() *ParamValidator { + s := p.Get().(*ParamValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled param should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *paramValidatorsPool) RedeemValidator(s *ParamValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed param should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed param should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *basicSliceValidatorsPool) BorrowValidator() *basicSliceValidator { + s := p.Get().(*basicSliceValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled basicSliceValidator should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *basicSliceValidatorsPool) RedeemValidator(s *basicSliceValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed basicSliceValidator should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed basicSliceValidator should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *numberValidatorsPool) BorrowValidator() *numberValidator { + s := p.Get().(*numberValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled number should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *numberValidatorsPool) RedeemValidator(s *numberValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed number should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed number should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *stringValidatorsPool) BorrowValidator() *stringValidator { + s := p.Get().(*stringValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled string should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *stringValidatorsPool) RedeemValidator(s *stringValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed string should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed string should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *schemaPropsValidatorsPool) BorrowValidator() *schemaPropsValidator { + s := p.Get().(*schemaPropsValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled param should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *schemaPropsValidatorsPool) RedeemValidator(s *schemaPropsValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed schemaProps should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed schemaProps should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *formatValidatorsPool) BorrowValidator() *formatValidator { + s := p.Get().(*formatValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled format should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *formatValidatorsPool) RedeemValidator(s *formatValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed format should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed format should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *typeValidatorsPool) BorrowValidator() *typeValidator { + s := p.Get().(*typeValidator) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled type should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *typeValidatorsPool) RedeemValidator(s *typeValidator) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed type should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic(fmt.Errorf("redeemed type should have been allocated from a fresh or recycled pointer. Got status %s, already redeamed at: %s", x, p.redeemMap[s])) + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *schemasPool) BorrowSchema() *spec.Schema { + s := p.Get().(*spec.Schema) + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled spec.Schema should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *schemasPool) RedeemSchema(s *spec.Schema) { + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed spec.Schema should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed spec.Schema should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *resultsPool) BorrowResult() *Result { + s := p.Get().(*Result).cleared() + + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + p.debugMap[s] = statusFresh + } else { + if x != statusRedeemed { + panic("recycled result should have been redeemed") + } + p.debugMap[s] = statusRecycled + } + p.allocMap[s] = caller() + + return s +} + +func (p *resultsPool) RedeemResult(s *Result) { + if s == emptyResult { + if len(s.Errors) > 0 || len(s.Warnings) > 0 { + panic("empty result should not mutate") + } + return + } + p.mx.Lock() + defer p.mx.Unlock() + x, ok := p.debugMap[s] + if !ok { + panic("redeemed Result should have been allocated") + } + if x != statusRecycled && x != statusFresh { + panic("redeemed Result should have been allocated from a fresh or recycled pointer") + } + p.debugMap[s] = statusRedeemed + p.redeemMap[s] = caller() + p.Put(s) +} + +func (p *allPools) allIsRedeemed(t testing.TB) bool { + outcome := true + for k, v := range p.poolOfSchemaValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("schemaValidator should be redeemed. Allocated by: %s", p.poolOfSchemaValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfObjectValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("objectValidator should be redeemed. Allocated by: %s", p.poolOfObjectValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfSliceValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("sliceValidator should be redeemed. Allocated by: %s", p.poolOfSliceValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfItemsValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("itemsValidator should be redeemed. Allocated by: %s", p.poolOfItemsValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfBasicCommonValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("basicCommonValidator should be redeemed. Allocated by: %s", p.poolOfBasicCommonValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfHeaderValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("headerValidator should be redeemed. Allocated by: %s", p.poolOfHeaderValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfParamValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("paramValidator should be redeemed. Allocated by: %s", p.poolOfParamValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfBasicSliceValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("basicSliceValidator should be redeemed. Allocated by: %s", p.poolOfBasicSliceValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfNumberValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("numberValidator should be redeemed. Allocated by: %s", p.poolOfNumberValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfStringValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("stringValidator should be redeemed. Allocated by: %s", p.poolOfStringValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfSchemaPropsValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("schemaPropsValidator should be redeemed. Allocated by: %s", p.poolOfSchemaPropsValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfFormatValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("formatValidator should be redeemed. Allocated by: %s", p.poolOfFormatValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfTypeValidators.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("typeValidator should be redeemed. Allocated by: %s", p.poolOfTypeValidators.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfSchemas.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("schemas should be redeemed. Allocated by: %s", p.poolOfSchemas.allocMap[k]) + outcome = false + } + for k, v := range p.poolOfResults.debugMap { + if v == statusRedeemed { + continue + } + t.Logf("result should be redeemed. Allocated by: %s", p.poolOfResults.allocMap[k]) + outcome = false + } + + return outcome +} + +func caller() string { + pc, _, _, _ := runtime.Caller(3) //nolint:dogsled + from, line := runtime.FuncForPC(pc).FileLine(pc) + + return fmt.Sprintf("%s:%d", from, line) +} diff --git a/vendor/github.com/go-openapi/validate/result.go b/vendor/github.com/go-openapi/validate/result.go index 8f5f935e5d1..c80804a93d0 100644 --- a/vendor/github.com/go-openapi/validate/result.go +++ b/vendor/github.com/go-openapi/validate/result.go @@ -15,7 +15,7 @@ package validate import ( - "fmt" + stderrors "errors" "reflect" "strings" @@ -23,6 +23,8 @@ import ( "github.com/go-openapi/spec" ) +var emptyResult = &Result{MatchCount: 1} + // Result represents a validation result set, composed of // errors and warnings. // @@ -50,8 +52,10 @@ type Result struct { // Schemata for slice items itemSchemata []itemSchemata - cachedFieldSchemta map[FieldKey][]*spec.Schema - cachedItemSchemata map[ItemKey][]*spec.Schema + cachedFieldSchemata map[FieldKey][]*spec.Schema + cachedItemSchemata map[ItemKey][]*spec.Schema + + wantsRedeemOnMerge bool } // FieldKey is a pair of an object and a field, usable as a key for a map. @@ -116,6 +120,9 @@ func (r *Result) Merge(others ...*Result) *Result { } r.mergeWithoutRootSchemata(other) r.rootObjectSchemata.Append(other.rootObjectSchemata) + if other.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(other) + } } return r } @@ -132,10 +139,9 @@ func (r *Result) RootObjectSchemata() []*spec.Schema { } // FieldSchemata returns the schemata which apply to fields in objects. -// nolint: dupl func (r *Result) FieldSchemata() map[FieldKey][]*spec.Schema { - if r.cachedFieldSchemta != nil { - return r.cachedFieldSchemta + if r.cachedFieldSchemata != nil { + return r.cachedFieldSchemata } ret := make(map[FieldKey][]*spec.Schema, len(r.fieldSchemata)) @@ -147,12 +153,12 @@ func (r *Result) FieldSchemata() map[FieldKey][]*spec.Schema { ret[key] = append(ret[key], fs.schemata.multiple...) } } - r.cachedFieldSchemta = ret + r.cachedFieldSchemata = ret + return ret } // ItemSchemata returns the schemata which apply to items in slices. -// nolint: dupl func (r *Result) ItemSchemata() map[ItemKey][]*spec.Schema { if r.cachedItemSchemata != nil { return r.cachedItemSchemata @@ -172,12 +178,13 @@ func (r *Result) ItemSchemata() map[ItemKey][]*spec.Schema { } func (r *Result) resetCaches() { - r.cachedFieldSchemta = nil + r.cachedFieldSchemata = nil r.cachedItemSchemata = nil } // mergeForField merges other into r, assigning other's root schemata to the given Object and field name. -// nolint: unparam +// +//nolint:unparam func (r *Result) mergeForField(obj map[string]interface{}, field string, other *Result) *Result { if other == nil { return r @@ -188,18 +195,23 @@ func (r *Result) mergeForField(obj map[string]interface{}, field string, other * if r.fieldSchemata == nil { r.fieldSchemata = make([]fieldSchemata, len(obj)) } + // clone other schemata, as other is about to be redeemed to the pool r.fieldSchemata = append(r.fieldSchemata, fieldSchemata{ obj: obj, field: field, - schemata: other.rootObjectSchemata, + schemata: other.rootObjectSchemata.Clone(), }) } + if other.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(other) + } return r } // mergeForSlice merges other into r, assigning other's root schemata to the given slice and index. -// nolint: unparam +// +//nolint:unparam func (r *Result) mergeForSlice(slice reflect.Value, i int, other *Result) *Result { if other == nil { return r @@ -210,29 +222,38 @@ func (r *Result) mergeForSlice(slice reflect.Value, i int, other *Result) *Resul if r.itemSchemata == nil { r.itemSchemata = make([]itemSchemata, slice.Len()) } + // clone other schemata, as other is about to be redeemed to the pool r.itemSchemata = append(r.itemSchemata, itemSchemata{ slice: slice, index: i, - schemata: other.rootObjectSchemata, + schemata: other.rootObjectSchemata.Clone(), }) } + if other.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(other) + } + return r } // addRootObjectSchemata adds the given schemata for the root object of the result. -// The slice schemata might be reused. I.e. do not modify it after being added to a result. +// +// Since the slice schemata might be reused, it is shallow-cloned before saving it into the result. func (r *Result) addRootObjectSchemata(s *spec.Schema) { - r.rootObjectSchemata.Append(schemata{one: s}) + clone := *s + r.rootObjectSchemata.Append(schemata{one: &clone}) } // addPropertySchemata adds the given schemata for the object and field. -// The slice schemata might be reused. I.e. do not modify it after being added to a result. +// +// Since the slice schemata might be reused, it is shallow-cloned before saving it into the result. func (r *Result) addPropertySchemata(obj map[string]interface{}, fld string, schema *spec.Schema) { if r.fieldSchemata == nil { r.fieldSchemata = make([]fieldSchemata, 0, len(obj)) } - r.fieldSchemata = append(r.fieldSchemata, fieldSchemata{obj: obj, field: fld, schemata: schemata{one: schema}}) + clone := *schema + r.fieldSchemata = append(r.fieldSchemata, fieldSchemata{obj: obj, field: fld, schemata: schemata{one: &clone}}) } /* @@ -255,17 +276,21 @@ func (r *Result) mergeWithoutRootSchemata(other *Result) { if other.fieldSchemata != nil { if r.fieldSchemata == nil { - r.fieldSchemata = other.fieldSchemata - } else { - r.fieldSchemata = append(r.fieldSchemata, other.fieldSchemata...) + r.fieldSchemata = make([]fieldSchemata, 0, len(other.fieldSchemata)) + } + for _, field := range other.fieldSchemata { + field.schemata = field.schemata.Clone() + r.fieldSchemata = append(r.fieldSchemata, field) } } if other.itemSchemata != nil { if r.itemSchemata == nil { - r.itemSchemata = other.itemSchemata - } else { - r.itemSchemata = append(r.itemSchemata, other.itemSchemata...) + r.itemSchemata = make([]itemSchemata, 0, len(other.itemSchemata)) + } + for _, field := range other.itemSchemata { + field.schemata = field.schemata.Clone() + r.itemSchemata = append(r.itemSchemata, field) } } } @@ -280,6 +305,9 @@ func (r *Result) MergeAsErrors(others ...*Result) *Result { r.AddErrors(other.Errors...) r.AddErrors(other.Warnings...) r.MatchCount += other.MatchCount + if other.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(other) + } } } return r @@ -295,6 +323,9 @@ func (r *Result) MergeAsWarnings(others ...*Result) *Result { r.AddWarnings(other.Errors...) r.AddWarnings(other.Warnings...) r.MatchCount += other.MatchCount + if other.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(other) + } } } return r @@ -356,16 +387,21 @@ func (r *Result) keepRelevantErrors() *Result { strippedErrors := []error{} for _, e := range r.Errors { if strings.HasPrefix(e.Error(), "IMPORTANT!") { - strippedErrors = append(strippedErrors, fmt.Errorf(strings.TrimPrefix(e.Error(), "IMPORTANT!"))) + strippedErrors = append(strippedErrors, stderrors.New(strings.TrimPrefix(e.Error(), "IMPORTANT!"))) } } strippedWarnings := []error{} for _, e := range r.Warnings { if strings.HasPrefix(e.Error(), "IMPORTANT!") { - strippedWarnings = append(strippedWarnings, fmt.Errorf(strings.TrimPrefix(e.Error(), "IMPORTANT!"))) + strippedWarnings = append(strippedWarnings, stderrors.New(strings.TrimPrefix(e.Error(), "IMPORTANT!"))) } } - strippedResult := new(Result) + var strippedResult *Result + if r.wantsRedeemOnMerge { + strippedResult = pools.poolOfResults.BorrowResult() + } else { + strippedResult = new(Result) + } strippedResult.Errors = strippedErrors strippedResult.Warnings = strippedWarnings return strippedResult @@ -427,6 +463,27 @@ func (r *Result) AsError() error { return errors.CompositeValidationError(r.Errors...) } +func (r *Result) cleared() *Result { + // clear the Result to be reusable. Keep allocated capacity. + r.Errors = r.Errors[:0] + r.Warnings = r.Warnings[:0] + r.MatchCount = 0 + r.data = nil + r.rootObjectSchemata.one = nil + r.rootObjectSchemata.multiple = r.rootObjectSchemata.multiple[:0] + r.fieldSchemata = r.fieldSchemata[:0] + r.itemSchemata = r.itemSchemata[:0] + for k := range r.cachedFieldSchemata { + delete(r.cachedFieldSchemata, k) + } + for k := range r.cachedItemSchemata { + delete(r.cachedItemSchemata, k) + } + r.wantsRedeemOnMerge = true // mark this result as eligible for redeem when merged into another + + return r +} + // schemata is an arbitrary number of schemata. It does a distinction between zero, // one and many schemata to avoid slice allocations. type schemata struct { @@ -453,7 +510,7 @@ func (s *schemata) Slice() []*spec.Schema { return s.multiple } -// appendSchemata appends the schemata in other to s. It mutated s in-place. +// appendSchemata appends the schemata in other to s. It mutates s in-place. func (s *schemata) Append(other schemata) { if other.one == nil && len(other.multiple) == 0 { return @@ -484,3 +541,23 @@ func (s *schemata) Append(other schemata) { } } } + +func (s schemata) Clone() schemata { + var clone schemata + + if s.one != nil { + clone.one = new(spec.Schema) + *clone.one = *s.one + } + + if len(s.multiple) > 0 { + clone.multiple = make([]*spec.Schema, len(s.multiple)) + for idx := 0; idx < len(s.multiple); idx++ { + sp := new(spec.Schema) + *sp = *s.multiple[idx] + clone.multiple[idx] = sp + } + } + + return clone +} diff --git a/vendor/github.com/go-openapi/validate/schema.go b/vendor/github.com/go-openapi/validate/schema.go index 62b91dc5b0f..db65264fd10 100644 --- a/vendor/github.com/go-openapi/validate/schema.go +++ b/vendor/github.com/go-openapi/validate/schema.go @@ -24,32 +24,32 @@ import ( "github.com/go-openapi/swag" ) -var ( - specSchemaType = reflect.TypeOf(&spec.Schema{}) - specParameterType = reflect.TypeOf(&spec.Parameter{}) - specHeaderType = reflect.TypeOf(&spec.Header{}) - // specItemsType = reflect.TypeOf(&spec.Items{}) -) - // SchemaValidator validates data against a JSON schema type SchemaValidator struct { Path string in string Schema *spec.Schema - validators []valueValidator + validators [8]valueValidator Root interface{} KnownFormats strfmt.Registry - Options SchemaValidatorOptions + Options *SchemaValidatorOptions } // AgainstSchema validates the specified data against the provided schema, using a registry of supported formats. // // When no pre-parsed *spec.Schema structure is provided, it uses a JSON schema as default. See example. func AgainstSchema(schema *spec.Schema, data interface{}, formats strfmt.Registry, options ...Option) error { - res := NewSchemaValidator(schema, nil, "", formats, options...).Validate(data) + res := NewSchemaValidator(schema, nil, "", formats, + append(options, WithRecycleValidators(true), withRecycleResults(true))..., + ).Validate(data) + defer func() { + pools.poolOfResults.RedeemResult(res) + }() + if res.HasErrors() { return errors.CompositeValidationError(res.Errors...) } + return nil } @@ -57,6 +57,15 @@ func AgainstSchema(schema *spec.Schema, data interface{}, formats strfmt.Registr // // Panics if the provided schema is invalid. func NewSchemaValidator(schema *spec.Schema, rootSchema interface{}, root string, formats strfmt.Registry, options ...Option) *SchemaValidator { + opts := new(SchemaValidatorOptions) + for _, o := range options { + o(opts) + } + + return newSchemaValidator(schema, rootSchema, root, formats, opts) +} + +func newSchemaValidator(schema *spec.Schema, rootSchema interface{}, root string, formats strfmt.Registry, opts *SchemaValidatorOptions) *SchemaValidator { if schema == nil { return nil } @@ -72,17 +81,26 @@ func NewSchemaValidator(schema *spec.Schema, rootSchema interface{}, root string panic(msg) } } - s := SchemaValidator{ - Path: root, - in: "body", - Schema: schema, - Root: rootSchema, - KnownFormats: formats, - Options: SchemaValidatorOptions{}} - for _, o := range options { - o(&s.Options) + + if opts == nil { + opts = new(SchemaValidatorOptions) } - s.validators = []valueValidator{ + + var s *SchemaValidator + if opts.recycleValidators { + s = pools.poolOfSchemaValidators.BorrowValidator() + } else { + s = new(SchemaValidator) + } + + s.Path = root + s.in = "body" + s.Schema = schema + s.Root = rootSchema + s.Options = opts + s.KnownFormats = formats + + s.validators = [8]valueValidator{ s.typeValidator(), s.schemaPropsValidator(), s.stringValidator(), @@ -92,7 +110,8 @@ func NewSchemaValidator(schema *spec.Schema, rootSchema interface{}, root string s.commonValidator(), s.objectValidator(), } - return &s + + return s } // SetPath sets the path for this schema valdiator @@ -108,17 +127,39 @@ func (s *SchemaValidator) Applies(source interface{}, _ reflect.Kind) bool { // Validate validates the data against the schema func (s *SchemaValidator) Validate(data interface{}) *Result { - result := &Result{data: data} if s == nil { - return result + return emptyResult } - if s.Schema != nil { + + if s.Options.recycleValidators { + defer func() { + s.redeemChildren() + s.redeem() // one-time use validator + }() + } + + var result *Result + if s.Options.recycleResult { + result = pools.poolOfResults.BorrowResult() + result.data = data + } else { + result = &Result{data: data} + } + + if s.Schema != nil && !s.Options.skipSchemataResult { result.addRootObjectSchemata(s.Schema) } if data == nil { + // early exit with minimal validation result.Merge(s.validators[0].Validate(data)) // type validator result.Merge(s.validators[6].Validate(data)) // common validator + + if s.Options.recycleValidators { + s.validators[0] = nil + s.validators[6] = nil + } + return result } @@ -147,6 +188,7 @@ func (s *SchemaValidator) Validate(data interface{}) *Result { if erri != nil { result.AddErrors(invalidTypeConversionMsg(s.Path, erri)) result.Inc() + return result } d = in @@ -155,6 +197,7 @@ func (s *SchemaValidator) Validate(data interface{}) *Result { if errf != nil { result.AddErrors(invalidTypeConversionMsg(s.Path, errf)) result.Inc() + return result } d = nf @@ -164,14 +207,26 @@ func (s *SchemaValidator) Validate(data interface{}) *Result { kind = tpe.Kind() } - for _, v := range s.validators { + for idx, v := range s.validators { if !v.Applies(s.Schema, kind) { - debugLog("%T does not apply for %v", v, kind) + if s.Options.recycleValidators { + // Validate won't be called, so relinquish this validator + if redeemableChildren, ok := v.(interface{ redeemChildren() }); ok { + redeemableChildren.redeemChildren() + } + if redeemable, ok := v.(interface{ redeem() }); ok { + redeemable.redeem() + } + s.validators[idx] = nil // prevents further (unsafe) usage + } + continue } - err := v.Validate(d) - result.Merge(err) + result.Merge(v.Validate(d)) + if s.Options.recycleValidators { + s.validators[idx] = nil // prevents further (unsafe) usage + } result.Inc() } result.Inc() @@ -180,81 +235,120 @@ func (s *SchemaValidator) Validate(data interface{}) *Result { } func (s *SchemaValidator) typeValidator() valueValidator { - return &typeValidator{Type: s.Schema.Type, Nullable: s.Schema.Nullable, Format: s.Schema.Format, In: s.in, Path: s.Path} + return newTypeValidator( + s.Path, + s.in, + s.Schema.Type, + s.Schema.Nullable, + s.Schema.Format, + s.Options, + ) } func (s *SchemaValidator) commonValidator() valueValidator { - return &basicCommonValidator{ - Path: s.Path, - In: s.in, - Enum: s.Schema.Enum, - } + return newBasicCommonValidator( + s.Path, + s.in, + s.Schema.Default, + s.Schema.Enum, + s.Options, + ) } func (s *SchemaValidator) sliceValidator() valueValidator { - return &schemaSliceValidator{ - Path: s.Path, - In: s.in, - MaxItems: s.Schema.MaxItems, - MinItems: s.Schema.MinItems, - UniqueItems: s.Schema.UniqueItems, - AdditionalItems: s.Schema.AdditionalItems, - Items: s.Schema.Items, - Root: s.Root, - KnownFormats: s.KnownFormats, - Options: s.Options, - } + return newSliceValidator( + s.Path, + s.in, + s.Schema.MaxItems, + s.Schema.MinItems, + s.Schema.UniqueItems, + s.Schema.AdditionalItems, + s.Schema.Items, + s.Root, + s.KnownFormats, + s.Options, + ) } func (s *SchemaValidator) numberValidator() valueValidator { - return &numberValidator{ - Path: s.Path, - In: s.in, - Default: s.Schema.Default, - MultipleOf: s.Schema.MultipleOf, - Maximum: s.Schema.Maximum, - ExclusiveMaximum: s.Schema.ExclusiveMaximum, - Minimum: s.Schema.Minimum, - ExclusiveMinimum: s.Schema.ExclusiveMinimum, - } + return newNumberValidator( + s.Path, + s.in, + s.Schema.Default, + s.Schema.MultipleOf, + s.Schema.Maximum, + s.Schema.ExclusiveMaximum, + s.Schema.Minimum, + s.Schema.ExclusiveMinimum, + "", + "", + s.Options, + ) } func (s *SchemaValidator) stringValidator() valueValidator { - return &stringValidator{ - Path: s.Path, - In: s.in, - MaxLength: s.Schema.MaxLength, - MinLength: s.Schema.MinLength, - Pattern: s.Schema.Pattern, - } + return newStringValidator( + s.Path, + s.in, + nil, + false, + false, + s.Schema.MaxLength, + s.Schema.MinLength, + s.Schema.Pattern, + s.Options, + ) } func (s *SchemaValidator) formatValidator() valueValidator { - return &formatValidator{ - Path: s.Path, - In: s.in, - Format: s.Schema.Format, - KnownFormats: s.KnownFormats, - } + return newFormatValidator( + s.Path, + s.in, + s.Schema.Format, + s.KnownFormats, + s.Options, + ) } func (s *SchemaValidator) schemaPropsValidator() valueValidator { sch := s.Schema - return newSchemaPropsValidator(s.Path, s.in, sch.AllOf, sch.OneOf, sch.AnyOf, sch.Not, sch.Dependencies, s.Root, s.KnownFormats, s.Options.Options()...) + return newSchemaPropsValidator( + s.Path, s.in, sch.AllOf, sch.OneOf, sch.AnyOf, sch.Not, sch.Dependencies, s.Root, s.KnownFormats, + s.Options, + ) } func (s *SchemaValidator) objectValidator() valueValidator { - return &objectValidator{ - Path: s.Path, - In: s.in, - MaxProperties: s.Schema.MaxProperties, - MinProperties: s.Schema.MinProperties, - Required: s.Schema.Required, - Properties: s.Schema.Properties, - AdditionalProperties: s.Schema.AdditionalProperties, - PatternProperties: s.Schema.PatternProperties, - Root: s.Root, - KnownFormats: s.KnownFormats, - Options: s.Options, + return newObjectValidator( + s.Path, + s.in, + s.Schema.MaxProperties, + s.Schema.MinProperties, + s.Schema.Required, + s.Schema.Properties, + s.Schema.AdditionalProperties, + s.Schema.PatternProperties, + s.Root, + s.KnownFormats, + s.Options, + ) +} + +func (s *SchemaValidator) redeem() { + pools.poolOfSchemaValidators.RedeemValidator(s) +} + +func (s *SchemaValidator) redeemChildren() { + for i, validator := range s.validators { + if validator == nil { + continue + } + if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { + redeemableChildren.redeemChildren() + } + if redeemable, ok := validator.(interface{ redeem() }); ok { + redeemable.redeem() + } + s.validators[i] = nil // free up allocated children if not in pool } } diff --git a/vendor/github.com/go-openapi/validate/schema_option.go b/vendor/github.com/go-openapi/validate/schema_option.go index 4b4879de8b1..65eeebeaab3 100644 --- a/vendor/github.com/go-openapi/validate/schema_option.go +++ b/vendor/github.com/go-openapi/validate/schema_option.go @@ -18,6 +18,9 @@ package validate type SchemaValidatorOptions struct { EnableObjectArrayTypeCheck bool EnableArrayMustHaveItemsCheck bool + recycleValidators bool + recycleResult bool + skipSchemataResult bool } // Option sets optional rules for schema validation @@ -45,10 +48,36 @@ func SwaggerSchema(enable bool) Option { } } -// Options returns current options +// WithRecycleValidators saves memory allocations and makes validators +// available for a single use of Validate() only. +// +// When a validator is recycled, called MUST not call the Validate() method twice. +func WithRecycleValidators(enable bool) Option { + return func(svo *SchemaValidatorOptions) { + svo.recycleValidators = enable + } +} + +func withRecycleResults(enable bool) Option { + return func(svo *SchemaValidatorOptions) { + svo.recycleResult = enable + } +} + +// WithSkipSchemataResult skips the deep audit payload stored in validation Result +func WithSkipSchemataResult(enable bool) Option { + return func(svo *SchemaValidatorOptions) { + svo.skipSchemataResult = enable + } +} + +// Options returns the current set of options func (svo SchemaValidatorOptions) Options() []Option { return []Option{ EnableObjectArrayTypeCheck(svo.EnableObjectArrayTypeCheck), EnableArrayMustHaveItemsCheck(svo.EnableArrayMustHaveItemsCheck), + WithRecycleValidators(svo.recycleValidators), + withRecycleResults(svo.recycleResult), + WithSkipSchemataResult(svo.skipSchemataResult), } } diff --git a/vendor/github.com/go-openapi/validate/schema_props.go b/vendor/github.com/go-openapi/validate/schema_props.go index 9bac3d29fb9..1ca379244dc 100644 --- a/vendor/github.com/go-openapi/validate/schema_props.go +++ b/vendor/github.com/go-openapi/validate/schema_props.go @@ -30,211 +30,327 @@ type schemaPropsValidator struct { AnyOf []spec.Schema Not *spec.Schema Dependencies spec.Dependencies - anyOfValidators []SchemaValidator - allOfValidators []SchemaValidator - oneOfValidators []SchemaValidator + anyOfValidators []*SchemaValidator + allOfValidators []*SchemaValidator + oneOfValidators []*SchemaValidator notValidator *SchemaValidator Root interface{} KnownFormats strfmt.Registry - Options SchemaValidatorOptions + Options *SchemaValidatorOptions } func (s *schemaPropsValidator) SetPath(path string) { s.Path = path } -func newSchemaPropsValidator(path string, in string, allOf, oneOf, anyOf []spec.Schema, not *spec.Schema, deps spec.Dependencies, root interface{}, formats strfmt.Registry, options ...Option) *schemaPropsValidator { - anyValidators := make([]SchemaValidator, 0, len(anyOf)) - for _, v := range anyOf { - v := v - anyValidators = append(anyValidators, *NewSchemaValidator(&v, root, path, formats, options...)) +func newSchemaPropsValidator( + path string, in string, allOf, oneOf, anyOf []spec.Schema, not *spec.Schema, deps spec.Dependencies, root interface{}, formats strfmt.Registry, + opts *SchemaValidatorOptions) *schemaPropsValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) } - allValidators := make([]SchemaValidator, 0, len(allOf)) - for _, v := range allOf { - v := v - allValidators = append(allValidators, *NewSchemaValidator(&v, root, path, formats, options...)) + + anyValidators := make([]*SchemaValidator, 0, len(anyOf)) + for i := range anyOf { + anyValidators = append(anyValidators, newSchemaValidator(&anyOf[i], root, path, formats, opts)) + } + allValidators := make([]*SchemaValidator, 0, len(allOf)) + for i := range allOf { + allValidators = append(allValidators, newSchemaValidator(&allOf[i], root, path, formats, opts)) } - oneValidators := make([]SchemaValidator, 0, len(oneOf)) - for _, v := range oneOf { - v := v - oneValidators = append(oneValidators, *NewSchemaValidator(&v, root, path, formats, options...)) + oneValidators := make([]*SchemaValidator, 0, len(oneOf)) + for i := range oneOf { + oneValidators = append(oneValidators, newSchemaValidator(&oneOf[i], root, path, formats, opts)) } var notValidator *SchemaValidator if not != nil { - notValidator = NewSchemaValidator(not, root, path, formats, options...) - } - - schOptions := &SchemaValidatorOptions{} - for _, o := range options { - o(schOptions) - } - return &schemaPropsValidator{ - Path: path, - In: in, - AllOf: allOf, - OneOf: oneOf, - AnyOf: anyOf, - Not: not, - Dependencies: deps, - anyOfValidators: anyValidators, - allOfValidators: allValidators, - oneOfValidators: oneValidators, - notValidator: notValidator, - Root: root, - KnownFormats: formats, - Options: *schOptions, + notValidator = newSchemaValidator(not, root, path, formats, opts) + } + + var s *schemaPropsValidator + if opts.recycleValidators { + s = pools.poolOfSchemaPropsValidators.BorrowValidator() + } else { + s = new(schemaPropsValidator) } + + s.Path = path + s.In = in + s.AllOf = allOf + s.OneOf = oneOf + s.AnyOf = anyOf + s.Not = not + s.Dependencies = deps + s.anyOfValidators = anyValidators + s.allOfValidators = allValidators + s.oneOfValidators = oneValidators + s.notValidator = notValidator + s.Root = root + s.KnownFormats = formats + s.Options = opts + + return s } -func (s *schemaPropsValidator) Applies(source interface{}, kind reflect.Kind) bool { - r := reflect.TypeOf(source) == specSchemaType - debugLog("schema props validator for %q applies %t for %T (kind: %v)\n", s.Path, r, source, kind) - return r +func (s *schemaPropsValidator) Applies(source interface{}, _ reflect.Kind) bool { + _, isSchema := source.(*spec.Schema) + return isSchema } func (s *schemaPropsValidator) Validate(data interface{}) *Result { - mainResult := new(Result) + var mainResult *Result + if s.Options.recycleResult { + mainResult = pools.poolOfResults.BorrowResult() + } else { + mainResult = new(Result) + } // Intermediary error results // IMPORTANT! messages from underlying validators - keepResultAnyOf := new(Result) - keepResultOneOf := new(Result) - keepResultAllOf := new(Result) + var keepResultAnyOf, keepResultOneOf, keepResultAllOf *Result + + if s.Options.recycleValidators { + defer func() { + s.redeemChildren() + s.redeem() + + // results are redeemed when merged + }() + } - // Validates at least one in anyOf schemas - var firstSuccess *Result if len(s.anyOfValidators) > 0 { - var bestFailures *Result - succeededOnce := false - for _, anyOfSchema := range s.anyOfValidators { - result := anyOfSchema.Validate(data) - // We keep inner IMPORTANT! errors no matter what MatchCount tells us - keepResultAnyOf.Merge(result.keepRelevantErrors()) - if result.IsValid() { - bestFailures = nil - succeededOnce = true - if firstSuccess == nil { - firstSuccess = result - } - keepResultAnyOf = new(Result) - break - } - // MatchCount is used to select errors from the schema with most positive checks - if bestFailures == nil || result.MatchCount > bestFailures.MatchCount { - bestFailures = result + keepResultAnyOf = pools.poolOfResults.BorrowResult() + s.validateAnyOf(data, mainResult, keepResultAnyOf) + } + + if len(s.oneOfValidators) > 0 { + keepResultOneOf = pools.poolOfResults.BorrowResult() + s.validateOneOf(data, mainResult, keepResultOneOf) + } + + if len(s.allOfValidators) > 0 { + keepResultAllOf = pools.poolOfResults.BorrowResult() + s.validateAllOf(data, mainResult, keepResultAllOf) + } + + if s.notValidator != nil { + s.validateNot(data, mainResult) + } + + if s.Dependencies != nil && len(s.Dependencies) > 0 && reflect.TypeOf(data).Kind() == reflect.Map { + s.validateDependencies(data, mainResult) + } + + mainResult.Inc() + + // In the end we retain best failures for schema validation + // plus, if any, composite errors which may explain special cases (tagged as IMPORTANT!). + return mainResult.Merge(keepResultAllOf, keepResultOneOf, keepResultAnyOf) +} + +func (s *schemaPropsValidator) validateAnyOf(data interface{}, mainResult, keepResultAnyOf *Result) { + // Validates at least one in anyOf schemas + var bestFailures *Result + + for i, anyOfSchema := range s.anyOfValidators { + result := anyOfSchema.Validate(data) + if s.Options.recycleValidators { + s.anyOfValidators[i] = nil + } + // We keep inner IMPORTANT! errors no matter what MatchCount tells us + keepResultAnyOf.Merge(result.keepRelevantErrors()) // merges (and redeems) a new instance of Result + + if result.IsValid() { + if bestFailures != nil && bestFailures.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(bestFailures) } + + _ = keepResultAnyOf.cleared() + mainResult.Merge(result) + + return } - if !succeededOnce { - mainResult.AddErrors(mustValidateAtLeastOneSchemaMsg(s.Path)) + // MatchCount is used to select errors from the schema with most positive checks + if bestFailures == nil || result.MatchCount > bestFailures.MatchCount { + if bestFailures != nil && bestFailures.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(bestFailures) + } + bestFailures = result + + continue } - if bestFailures != nil { - mainResult.Merge(bestFailures) - } else if firstSuccess != nil { - mainResult.Merge(firstSuccess) + + if result.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(result) // this result is ditched } } + mainResult.AddErrors(mustValidateAtLeastOneSchemaMsg(s.Path)) + mainResult.Merge(bestFailures) +} + +func (s *schemaPropsValidator) validateOneOf(data interface{}, mainResult, keepResultOneOf *Result) { // Validates exactly one in oneOf schemas - if len(s.oneOfValidators) > 0 { - var bestFailures *Result - var firstSuccess *Result - validated := 0 - - for _, oneOfSchema := range s.oneOfValidators { - result := oneOfSchema.Validate(data) - // We keep inner IMPORTANT! errors no matter what MatchCount tells us - keepResultOneOf.Merge(result.keepRelevantErrors()) - if result.IsValid() { - validated++ - bestFailures = nil - if firstSuccess == nil { - firstSuccess = result - } - keepResultOneOf = new(Result) - continue - } - // MatchCount is used to select errors from the schema with most positive checks - if validated == 0 && (bestFailures == nil || result.MatchCount > bestFailures.MatchCount) { - bestFailures = result - } + var ( + firstSuccess, bestFailures *Result + validated int + ) + + for i, oneOfSchema := range s.oneOfValidators { + result := oneOfSchema.Validate(data) + if s.Options.recycleValidators { + s.oneOfValidators[i] = nil } - if validated != 1 { - var additionalMsg string - if validated == 0 { - additionalMsg = "Found none valid" - } else { - additionalMsg = fmt.Sprintf("Found %d valid alternatives", validated) - } + // We keep inner IMPORTANT! errors no matter what MatchCount tells us + keepResultOneOf.Merge(result.keepRelevantErrors()) // merges (and redeems) a new instance of Result - mainResult.AddErrors(mustValidateOnlyOneSchemaMsg(s.Path, additionalMsg)) - if bestFailures != nil { - mainResult.Merge(bestFailures) - } - } else if firstSuccess != nil { - mainResult.Merge(firstSuccess) - } - } + if result.IsValid() { + validated++ + _ = keepResultOneOf.cleared() - // Validates all of allOf schemas - if len(s.allOfValidators) > 0 { - validated := 0 - - for _, allOfSchema := range s.allOfValidators { - result := allOfSchema.Validate(data) - // We keep inner IMPORTANT! errors no matter what MatchCount tells us - keepResultAllOf.Merge(result.keepRelevantErrors()) - // keepResultAllOf.Merge(result) - if result.IsValid() { - validated++ + if firstSuccess == nil { + firstSuccess = result + } else if result.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(result) // this result is ditched } - mainResult.Merge(result) + + continue } - if validated != len(s.allOfValidators) { - additionalMsg := "" - if validated == 0 { - additionalMsg = ". None validated" + // MatchCount is used to select errors from the schema with most positive checks + if validated == 0 && (bestFailures == nil || result.MatchCount > bestFailures.MatchCount) { + if bestFailures != nil && bestFailures.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(bestFailures) } + bestFailures = result + } else if result.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(result) // this result is ditched + } + } - mainResult.AddErrors(mustValidateAllSchemasMsg(s.Path, additionalMsg)) + switch validated { + case 0: + mainResult.AddErrors(mustValidateOnlyOneSchemaMsg(s.Path, "Found none valid")) + mainResult.Merge(bestFailures) + // firstSucess necessarily nil + case 1: + mainResult.Merge(firstSuccess) + if bestFailures != nil && bestFailures.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(bestFailures) + } + default: + mainResult.AddErrors(mustValidateOnlyOneSchemaMsg(s.Path, fmt.Sprintf("Found %d valid alternatives", validated))) + mainResult.Merge(bestFailures) + if firstSuccess != nil && firstSuccess.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(firstSuccess) } } +} - if s.notValidator != nil { - result := s.notValidator.Validate(data) +func (s *schemaPropsValidator) validateAllOf(data interface{}, mainResult, keepResultAllOf *Result) { + // Validates all of allOf schemas + var validated int + + for i, allOfSchema := range s.allOfValidators { + result := allOfSchema.Validate(data) + if s.Options.recycleValidators { + s.allOfValidators[i] = nil + } // We keep inner IMPORTANT! errors no matter what MatchCount tells us + keepResultAllOf.Merge(result.keepRelevantErrors()) if result.IsValid() { - mainResult.AddErrors(mustNotValidatechemaMsg(s.Path)) + validated++ } + mainResult.Merge(result) } - if s.Dependencies != nil && len(s.Dependencies) > 0 && reflect.TypeOf(data).Kind() == reflect.Map { - val := data.(map[string]interface{}) - for key := range val { - if dep, ok := s.Dependencies[key]; ok { + switch validated { + case 0: + mainResult.AddErrors(mustValidateAllSchemasMsg(s.Path, ". None validated")) + case len(s.allOfValidators): + default: + mainResult.AddErrors(mustValidateAllSchemasMsg(s.Path, "")) + } +} - if dep.Schema != nil { - mainResult.Merge(NewSchemaValidator(dep.Schema, s.Root, s.Path+"."+key, s.KnownFormats, s.Options.Options()...).Validate(data)) - continue - } +func (s *schemaPropsValidator) validateNot(data interface{}, mainResult *Result) { + result := s.notValidator.Validate(data) + if s.Options.recycleValidators { + s.notValidator = nil + } + // We keep inner IMPORTANT! errors no matter what MatchCount tells us + if result.IsValid() { + mainResult.AddErrors(mustNotValidatechemaMsg(s.Path)) + } + if result.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(result) // this result is ditched + } +} + +func (s *schemaPropsValidator) validateDependencies(data interface{}, mainResult *Result) { + val := data.(map[string]interface{}) + for key := range val { + dep, ok := s.Dependencies[key] + if !ok { + continue + } + + if dep.Schema != nil { + mainResult.Merge( + newSchemaValidator(dep.Schema, s.Root, s.Path+"."+key, s.KnownFormats, s.Options).Validate(data), + ) + continue + } - if len(dep.Property) > 0 { - for _, depKey := range dep.Property { - if _, ok := val[depKey]; !ok { - mainResult.AddErrors(hasADependencyMsg(s.Path, depKey)) - } - } + if len(dep.Property) > 0 { + for _, depKey := range dep.Property { + if _, ok := val[depKey]; !ok { + mainResult.AddErrors(hasADependencyMsg(s.Path, depKey)) } } } } +} - mainResult.Inc() - // In the end we retain best failures for schema validation - // plus, if any, composite errors which may explain special cases (tagged as IMPORTANT!). - return mainResult.Merge(keepResultAllOf, keepResultOneOf, keepResultAnyOf) +func (s *schemaPropsValidator) redeem() { + pools.poolOfSchemaPropsValidators.RedeemValidator(s) +} + +func (s *schemaPropsValidator) redeemChildren() { + for _, v := range s.anyOfValidators { + if v == nil { + continue + } + v.redeemChildren() + v.redeem() + } + s.anyOfValidators = nil + + for _, v := range s.allOfValidators { + if v == nil { + continue + } + v.redeemChildren() + v.redeem() + } + s.allOfValidators = nil + + for _, v := range s.oneOfValidators { + if v == nil { + continue + } + v.redeemChildren() + v.redeem() + } + s.oneOfValidators = nil + + if s.notValidator != nil { + s.notValidator.redeemChildren() + s.notValidator.redeem() + s.notValidator = nil + } } diff --git a/vendor/github.com/go-openapi/validate/slice_validator.go b/vendor/github.com/go-openapi/validate/slice_validator.go index aa429f5184e..13bb02087d9 100644 --- a/vendor/github.com/go-openapi/validate/slice_validator.go +++ b/vendor/github.com/go-openapi/validate/slice_validator.go @@ -32,7 +32,36 @@ type schemaSliceValidator struct { Items *spec.SchemaOrArray Root interface{} KnownFormats strfmt.Registry - Options SchemaValidatorOptions + Options *SchemaValidatorOptions +} + +func newSliceValidator(path, in string, + maxItems, minItems *int64, uniqueItems bool, + additionalItems *spec.SchemaOrBool, items *spec.SchemaOrArray, + root interface{}, formats strfmt.Registry, opts *SchemaValidatorOptions) *schemaSliceValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) + } + + var v *schemaSliceValidator + if opts.recycleValidators { + v = pools.poolOfSliceValidators.BorrowValidator() + } else { + v = new(schemaSliceValidator) + } + + v.Path = path + v.In = in + v.MaxItems = maxItems + v.MinItems = minItems + v.UniqueItems = uniqueItems + v.AdditionalItems = additionalItems + v.Items = items + v.Root = root + v.KnownFormats = formats + v.Options = opts + + return v } func (s *schemaSliceValidator) SetPath(path string) { @@ -46,7 +75,18 @@ func (s *schemaSliceValidator) Applies(source interface{}, kind reflect.Kind) bo } func (s *schemaSliceValidator) Validate(data interface{}) *Result { - result := new(Result) + if s.Options.recycleValidators { + defer func() { + s.redeem() + }() + } + + var result *Result + if s.Options.recycleResult { + result = pools.poolOfResults.BorrowResult() + } else { + result = new(Result) + } if data == nil { return result } @@ -54,8 +94,8 @@ func (s *schemaSliceValidator) Validate(data interface{}) *Result { size := val.Len() if s.Items != nil && s.Items.Schema != nil { - validator := NewSchemaValidator(s.Items.Schema, s.Root, s.Path, s.KnownFormats, s.Options.Options()...) for i := 0; i < size; i++ { + validator := newSchemaValidator(s.Items.Schema, s.Root, s.Path, s.KnownFormats, s.Options) validator.SetPath(fmt.Sprintf("%s.%d", s.Path, i)) value := val.Index(i) result.mergeForSlice(val, i, validator.Validate(value.Interface())) @@ -66,10 +106,11 @@ func (s *schemaSliceValidator) Validate(data interface{}) *Result { if s.Items != nil && len(s.Items.Schemas) > 0 { itemsSize = len(s.Items.Schemas) for i := 0; i < itemsSize; i++ { - validator := NewSchemaValidator(&s.Items.Schemas[i], s.Root, fmt.Sprintf("%s.%d", s.Path, i), s.KnownFormats, s.Options.Options()...) - if val.Len() <= i { + if size <= i { break } + + validator := newSchemaValidator(&s.Items.Schemas[i], s.Root, fmt.Sprintf("%s.%d", s.Path, i), s.KnownFormats, s.Options) result.mergeForSlice(val, i, validator.Validate(val.Index(i).Interface())) } } @@ -79,7 +120,7 @@ func (s *schemaSliceValidator) Validate(data interface{}) *Result { } if s.AdditionalItems.Schema != nil { for i := itemsSize; i < size-itemsSize+1; i++ { - validator := NewSchemaValidator(s.AdditionalItems.Schema, s.Root, fmt.Sprintf("%s.%d", s.Path, i), s.KnownFormats, s.Options.Options()...) + validator := newSchemaValidator(s.AdditionalItems.Schema, s.Root, fmt.Sprintf("%s.%d", s.Path, i), s.KnownFormats, s.Options) result.mergeForSlice(val, i, validator.Validate(val.Index(i).Interface())) } } @@ -103,3 +144,7 @@ func (s *schemaSliceValidator) Validate(data interface{}) *Result { result.Inc() return result } + +func (s *schemaSliceValidator) redeem() { + pools.poolOfSliceValidators.RedeemValidator(s) +} diff --git a/vendor/github.com/go-openapi/validate/spec.go b/vendor/github.com/go-openapi/validate/spec.go index 5b867dd59fc..965452566e1 100644 --- a/vendor/github.com/go-openapi/validate/spec.go +++ b/vendor/github.com/go-openapi/validate/spec.go @@ -15,6 +15,8 @@ package validate import ( + "bytes" + "encoding/gob" "encoding/json" "fmt" "sort" @@ -26,6 +28,7 @@ import ( "github.com/go-openapi/loads" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // Spec validates an OpenAPI 2.0 specification document. @@ -52,25 +55,38 @@ func Spec(doc *loads.Document, formats strfmt.Registry) error { // SpecValidator validates a swagger 2.0 spec type SpecValidator struct { - schema *spec.Schema // swagger 2.0 schema - spec *loads.Document - analyzer *analysis.Spec - expanded *loads.Document - KnownFormats strfmt.Registry - Options Opts // validation options + schema *spec.Schema // swagger 2.0 schema + spec *loads.Document + analyzer *analysis.Spec + expanded *loads.Document + KnownFormats strfmt.Registry + Options Opts // validation options + schemaOptions *SchemaValidatorOptions } // NewSpecValidator creates a new swagger spec validator instance func NewSpecValidator(schema *spec.Schema, formats strfmt.Registry) *SpecValidator { + // schema options that apply to all called validators + schemaOptions := new(SchemaValidatorOptions) + for _, o := range []Option{ + SwaggerSchema(true), + WithRecycleValidators(true), + // withRecycleResults(true), + } { + o(schemaOptions) + } + return &SpecValidator{ - schema: schema, - KnownFormats: formats, - Options: defaultOpts, + schema: schema, + KnownFormats: formats, + Options: defaultOpts, + schemaOptions: schemaOptions, } } // Validate validates the swagger spec func (s *SpecValidator) Validate(data interface{}) (*Result, *Result) { + s.schemaOptions.skipSchemataResult = s.Options.SkipSchemataResult var sd *loads.Document errs, warnings := new(Result), new(Result) @@ -84,11 +100,8 @@ func (s *SpecValidator) Validate(data interface{}) (*Result, *Result) { s.spec = sd s.analyzer = analysis.New(sd.Spec()) - // Swagger schema validator - schv := NewSchemaValidator(s.schema, nil, "", s.KnownFormats, SwaggerSchema(true)) - var obj interface{} - // Raw spec unmarshalling errors + var obj interface{} if err := json.Unmarshal(sd.Raw(), &obj); err != nil { // NOTE: under normal conditions, the *load.Document has been already unmarshalled // So this one is just a paranoid check on the behavior of the spec package @@ -102,6 +115,8 @@ func (s *SpecValidator) Validate(data interface{}) (*Result, *Result) { warnings.AddErrors(errs.Warnings...) }() + // Swagger schema validator + schv := newSchemaValidator(s.schema, nil, "", s.KnownFormats, s.schemaOptions) errs.Merge(schv.Validate(obj)) // error - // There may be a point in continuing to try and determine more accurate errors if !s.Options.ContinueOnErrors && errs.HasErrors() { @@ -129,13 +144,13 @@ func (s *SpecValidator) Validate(data interface{}) (*Result, *Result) { } // Values provided as default MUST validate their schema - df := &defaultValidator{SpecValidator: s} + df := &defaultValidator{SpecValidator: s, schemaOptions: s.schemaOptions} errs.Merge(df.Validate()) // Values provided as examples MUST validate their schema // Value provided as examples in a response without schema generate a warning // Known limitations: examples in responses for mime type not application/json are ignored (warning) - ex := &exampleValidator{SpecValidator: s} + ex := &exampleValidator{SpecValidator: s, schemaOptions: s.schemaOptions} errs.Merge(ex.Validate()) errs.Merge(s.validateNonEmptyPathParamNames()) @@ -147,22 +162,27 @@ func (s *SpecValidator) Validate(data interface{}) (*Result, *Result) { } func (s *SpecValidator) validateNonEmptyPathParamNames() *Result { - res := new(Result) + res := pools.poolOfResults.BorrowResult() if s.spec.Spec().Paths == nil { // There is no Paths object: error res.AddErrors(noValidPathMsg()) - } else { - if s.spec.Spec().Paths.Paths == nil { - // Paths may be empty: warning - res.AddWarnings(noValidPathMsg()) - } else { - for k := range s.spec.Spec().Paths.Paths { - if strings.Contains(k, "{}") { - res.AddErrors(emptyPathParameterMsg(k)) - } - } + + return res + } + + if s.spec.Spec().Paths.Paths == nil { + // Paths may be empty: warning + res.AddWarnings(noValidPathMsg()) + + return res + } + + for k := range s.spec.Spec().Paths.Paths { + if strings.Contains(k, "{}") { + res.AddErrors(emptyPathParameterMsg(k)) } } + return res } @@ -176,7 +196,7 @@ func (s *SpecValidator) validateDuplicateOperationIDs() *Result { // fallback on possible incomplete picture because of previous errors analyzer = s.analyzer } - res := new(Result) + res := pools.poolOfResults.BorrowResult() known := make(map[string]int) for _, v := range analyzer.OperationIDs() { if v != "" { @@ -198,7 +218,7 @@ type dupProp struct { func (s *SpecValidator) validateDuplicatePropertyNames() *Result { // definition can't declare a property that's already defined by one of its ancestors - res := new(Result) + res := pools.poolOfResults.BorrowResult() for k, sch := range s.spec.Spec().Definitions { if len(sch.AllOf) == 0 { continue @@ -247,7 +267,7 @@ func (s *SpecValidator) validateSchemaPropertyNames(nm string, sch spec.Schema, schn := nm schc := &sch - res := new(Result) + res := pools.poolOfResults.BorrowResult() for schc.Ref.String() != "" { // gather property names @@ -284,7 +304,7 @@ func (s *SpecValidator) validateSchemaPropertyNames(nm string, sch spec.Schema, } func (s *SpecValidator) validateCircularAncestry(nm string, sch spec.Schema, knowns map[string]struct{}) ([]string, *Result) { - res := new(Result) + res := pools.poolOfResults.BorrowResult() if sch.Ref.String() == "" && len(sch.AllOf) == 0 { // Safeguard. We should not be able to actually get there return nil, res @@ -334,7 +354,7 @@ func (s *SpecValidator) validateCircularAncestry(nm string, sch spec.Schema, kno func (s *SpecValidator) validateItems() *Result { // validate parameter, items, schema and response objects for presence of item if type is array - res := new(Result) + res := pools.poolOfResults.BorrowResult() for method, pi := range s.analyzer.Operations() { for path, op := range pi { @@ -393,7 +413,7 @@ func (s *SpecValidator) validateItems() *Result { // Verifies constraints on array type func (s *SpecValidator) validateSchemaItems(schema spec.Schema, prefix, opID string) *Result { - res := new(Result) + res := pools.poolOfResults.BorrowResult() if !schema.Type.Contains(arrayType) { return res } @@ -417,7 +437,7 @@ func (s *SpecValidator) validateSchemaItems(schema spec.Schema, prefix, opID str func (s *SpecValidator) validatePathParamPresence(path string, fromPath, fromOperation []string) *Result { // Each defined operation path parameters must correspond to a named element in the API's path pattern. // (For example, you cannot have a path parameter named id for the following path /pets/{petId} but you must have a path parameter named petId.) - res := new(Result) + res := pools.poolOfResults.BorrowResult() for _, l := range fromPath { var matched bool for _, r := range fromOperation { @@ -455,7 +475,6 @@ func (s *SpecValidator) validateReferenced() *Result { return &res } -// nolint: dupl func (s *SpecValidator) validateReferencedParameters() *Result { // Each referenceable definition should have references. params := s.spec.Spec().Parameters @@ -474,14 +493,13 @@ func (s *SpecValidator) validateReferencedParameters() *Result { if len(expected) == 0 { return nil } - result := new(Result) + result := pools.poolOfResults.BorrowResult() for k := range expected { result.AddWarnings(unusedParamMsg(k)) } return result } -// nolint: dupl func (s *SpecValidator) validateReferencedResponses() *Result { // Each referenceable definition should have references. responses := s.spec.Spec().Responses @@ -500,14 +518,13 @@ func (s *SpecValidator) validateReferencedResponses() *Result { if len(expected) == 0 { return nil } - result := new(Result) + result := pools.poolOfResults.BorrowResult() for k := range expected { result.AddWarnings(unusedResponseMsg(k)) } return result } -// nolint: dupl func (s *SpecValidator) validateReferencedDefinitions() *Result { // Each referenceable definition must have references. defs := s.spec.Spec().Definitions @@ -536,7 +553,7 @@ func (s *SpecValidator) validateReferencedDefinitions() *Result { func (s *SpecValidator) validateRequiredDefinitions() *Result { // Each property listed in the required array must be defined in the properties of the model - res := new(Result) + res := pools.poolOfResults.BorrowResult() DEFINITIONS: for d, schema := range s.spec.Spec().Definitions { @@ -555,7 +572,7 @@ DEFINITIONS: func (s *SpecValidator) validateRequiredProperties(path, in string, v *spec.Schema) *Result { // Takes care of recursive property definitions, which may be nested in additionalProperties schemas - res := new(Result) + res := pools.poolOfResults.BorrowResult() propertyMatch := false patternMatch := false additionalPropertiesMatch := false @@ -621,7 +638,7 @@ func (s *SpecValidator) validateParameters() *Result { // - parameters with pattern property must specify valid patterns // - $ref in parameters must resolve // - path param must be required - res := new(Result) + res := pools.poolOfResults.BorrowResult() rexGarbledPathSegment := mustCompileRegexp(`.*[{}\s]+.*`) for method, pi := range s.expandedAnalyzer().Operations() { methodPaths := make(map[string]map[string]string) @@ -660,7 +677,23 @@ func (s *SpecValidator) validateParameters() *Result { // TODO: should be done after param expansion res.Merge(s.checkUniqueParams(path, method, op)) + // pick the root schema from the swagger specification which describes a parameter + origSchema, ok := s.schema.Definitions["parameter"] + if !ok { + panic("unexpected swagger schema: missing #/definitions/parameter") + } + // clone it once to avoid expanding a global schema (e.g. swagger spec) + paramSchema, err := deepCloneSchema(origSchema) + if err != nil { + panic(fmt.Errorf("can't clone schema: %v", err)) + } + for _, pr := range paramHelp.safeExpandedParamsFor(path, method, op.ID, res, s) { + // An expanded parameter must validate the Parameter schema (an unexpanded $ref always passes high-level schema validation) + schv := newSchemaValidator(¶mSchema, s.schema, fmt.Sprintf("%s.%s.parameters.%s", path, method, pr.Name), s.KnownFormats, s.schemaOptions) + obj := swag.ToDynamicJSON(pr) + res.Merge(schv.Validate(obj)) + // Validate pattern regexp for parameters with a Pattern property if _, err := compileRegexp(pr.Pattern); err != nil { res.AddErrors(invalidPatternInParamMsg(op.ID, pr.Name, pr.Pattern)) @@ -742,7 +775,7 @@ func (s *SpecValidator) validateParameters() *Result { func (s *SpecValidator) validateReferencesValid() *Result { // each reference must point to a valid object - res := new(Result) + res := pools.poolOfResults.BorrowResult() for _, r := range s.analyzer.AllRefs() { if !r.IsValidURI(s.spec.SpecFilePath()) { // Safeguard - spec should always yield a valid URI res.AddErrors(invalidRefMsg(r.String())) @@ -768,7 +801,7 @@ func (s *SpecValidator) checkUniqueParams(path, method string, op *spec.Operatio // However, there are some issues with such a factorization: // - analysis does not seem to fully expand params // - param keys may be altered by x-go-name - res := new(Result) + res := pools.poolOfResults.BorrowResult() pnames := make(map[string]struct{}) if op.Parameters != nil { // Safeguard @@ -803,3 +836,17 @@ func (s *SpecValidator) expandedAnalyzer() *analysis.Spec { } return s.analyzer } + +func deepCloneSchema(src spec.Schema) (spec.Schema, error) { + var b bytes.Buffer + if err := gob.NewEncoder(&b).Encode(src); err != nil { + return spec.Schema{}, err + } + + var dst spec.Schema + if err := gob.NewDecoder(&b).Decode(&dst); err != nil { + return spec.Schema{}, err + } + + return dst, nil +} diff --git a/vendor/github.com/go-openapi/validate/spec_messages.go b/vendor/github.com/go-openapi/validate/spec_messages.go index 5398679bffe..6d1f0f819cb 100644 --- a/vendor/github.com/go-openapi/validate/spec_messages.go +++ b/vendor/github.com/go-openapi/validate/spec_messages.go @@ -187,6 +187,8 @@ const ( // UnusedResponseWarning ... UnusedResponseWarning = "response %q is not used anywhere" + + InvalidObject = "expected an object in %q.%s" ) // Additional error codes @@ -347,6 +349,9 @@ func invalidParameterDefinitionAsSchemaMsg(path, method, operationID string) err func parameterValidationTypeMismatchMsg(param, path, typ string) errors.Error { return errors.New(errors.CompositeErrorCode, ParamValidationTypeMismatch, param, path, typ) } +func invalidObjectMsg(path, in string) errors.Error { + return errors.New(errors.CompositeErrorCode, InvalidObject, path, in) +} // disabled // diff --git a/vendor/github.com/go-openapi/validate/type.go b/vendor/github.com/go-openapi/validate/type.go index 876467588f5..f87abb3d560 100644 --- a/vendor/github.com/go-openapi/validate/type.go +++ b/vendor/github.com/go-openapi/validate/type.go @@ -25,11 +25,34 @@ import ( ) type typeValidator struct { + Path string + In string Type spec.StringOrArray Nullable bool Format string - In string - Path string + Options *SchemaValidatorOptions +} + +func newTypeValidator(path, in string, typ spec.StringOrArray, nullable bool, format string, opts *SchemaValidatorOptions) *typeValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) + } + + var t *typeValidator + if opts.recycleValidators { + t = pools.poolOfTypeValidators.BorrowValidator() + } else { + t = new(typeValidator) + } + + t.Path = path + t.In = in + t.Type = typ + t.Nullable = nullable + t.Format = format + t.Options = opts + + return t } func (t *typeValidator) schemaInfoForType(data interface{}) (string, string) { @@ -90,7 +113,7 @@ func (t *typeValidator) schemaInfoForType(data interface{}) (string, string) { default: val := reflect.ValueOf(data) tpe := val.Type() - switch tpe.Kind() { + switch tpe.Kind() { //nolint:exhaustive case reflect.Bool: return booleanType, "" case reflect.String: @@ -125,23 +148,33 @@ func (t *typeValidator) SetPath(path string) { t.Path = path } -func (t *typeValidator) Applies(source interface{}, kind reflect.Kind) bool { +func (t *typeValidator) Applies(source interface{}, _ reflect.Kind) bool { // typeValidator applies to Schema, Parameter and Header objects - stpe := reflect.TypeOf(source) - r := (len(t.Type) > 0 || t.Format != "") && (stpe == specSchemaType || stpe == specParameterType || stpe == specHeaderType) - debugLog("type validator for %q applies %t for %T (kind: %v)\n", t.Path, r, source, kind) - return r + switch source.(type) { + case *spec.Schema: + case *spec.Parameter: + case *spec.Header: + default: + return false + } + + return (len(t.Type) > 0 || t.Format != "") } func (t *typeValidator) Validate(data interface{}) *Result { - result := new(Result) - result.Inc() + if t.Options.recycleValidators { + defer func() { + t.redeem() + }() + } + if data == nil { // nil or zero value for the passed structure require Type: null if len(t.Type) > 0 && !t.Type.Contains(nullType) && !t.Nullable { // TODO: if a property is not required it also passes this - return errorHelp.sErr(errors.InvalidType(t.Path, t.In, strings.Join(t.Type, ","), nullType)) + return errorHelp.sErr(errors.InvalidType(t.Path, t.In, strings.Join(t.Type, ","), nullType), t.Options.recycleResult) } - return result + + return emptyResult } // check if the type matches, should be used in every validator chain as first item @@ -151,8 +184,6 @@ func (t *typeValidator) Validate(data interface{}) *Result { // infer schema type (JSON) and format from passed data type schType, format := t.schemaInfoForType(data) - debugLog("path: %s, schType: %s, format: %s, expType: %s, expFmt: %s, kind: %s", t.Path, schType, format, t.Type, t.Format, val.Kind().String()) - // check numerical types // TODO: check unsigned ints // TODO: check json.Number (see schema.go) @@ -163,15 +194,20 @@ func (t *typeValidator) Validate(data interface{}) *Result { if kind != reflect.String && kind != reflect.Slice && t.Format != "" && !(t.Type.Contains(schType) || format == t.Format || isFloatInt || isIntFloat || isLowerInt || isLowerFloat) { // TODO: test case - return errorHelp.sErr(errors.InvalidType(t.Path, t.In, t.Format, format)) + return errorHelp.sErr(errors.InvalidType(t.Path, t.In, t.Format, format), t.Options.recycleResult) } if !(t.Type.Contains(numberType) || t.Type.Contains(integerType)) && t.Format != "" && (kind == reflect.String || kind == reflect.Slice) { - return result + return emptyResult } if !(t.Type.Contains(schType) || isFloatInt || isIntFloat) { - return errorHelp.sErr(errors.InvalidType(t.Path, t.In, strings.Join(t.Type, ","), schType)) + return errorHelp.sErr(errors.InvalidType(t.Path, t.In, strings.Join(t.Type, ","), schType), t.Options.recycleResult) } - return result + + return emptyResult +} + +func (t *typeValidator) redeem() { + pools.poolOfTypeValidators.RedeemValidator(t) } diff --git a/vendor/github.com/go-openapi/validate/validator.go b/vendor/github.com/go-openapi/validate/validator.go index ee01f2a7b75..c083aecc9da 100644 --- a/vendor/github.com/go-openapi/validate/validator.go +++ b/vendor/github.com/go-openapi/validate/validator.go @@ -39,20 +39,31 @@ type itemsValidator struct { root interface{} path string in string - validators []valueValidator + validators [6]valueValidator KnownFormats strfmt.Registry + Options *SchemaValidatorOptions } -func newItemsValidator(path, in string, items *spec.Items, root interface{}, formats strfmt.Registry) *itemsValidator { - iv := &itemsValidator{path: path, in: in, items: items, root: root, KnownFormats: formats} - iv.validators = []valueValidator{ - &typeValidator{ - Type: spec.StringOrArray([]string{items.Type}), - Nullable: items.Nullable, - Format: items.Format, - In: in, - Path: path, - }, +func newItemsValidator(path, in string, items *spec.Items, root interface{}, formats strfmt.Registry, opts *SchemaValidatorOptions) *itemsValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) + } + + var iv *itemsValidator + if opts.recycleValidators { + iv = pools.poolOfItemsValidators.BorrowValidator() + } else { + iv = new(itemsValidator) + } + + iv.path = path + iv.in = in + iv.items = items + iv.root = root + iv.KnownFormats = formats + iv.Options = opts + iv.validators = [6]valueValidator{ + iv.typeValidator(), iv.stringValidator(), iv.formatValidator(), iv.numberValidator(), @@ -63,77 +74,152 @@ func newItemsValidator(path, in string, items *spec.Items, root interface{}, for } func (i *itemsValidator) Validate(index int, data interface{}) *Result { + if i.Options.recycleValidators { + defer func() { + i.redeemChildren() + i.redeem() + }() + } + tpe := reflect.TypeOf(data) kind := tpe.Kind() - mainResult := new(Result) + var result *Result + if i.Options.recycleResult { + result = pools.poolOfResults.BorrowResult() + } else { + result = new(Result) + } + path := fmt.Sprintf("%s.%d", i.path, index) - for _, validator := range i.validators { + for idx, validator := range i.validators { + if !validator.Applies(i.root, kind) { + if i.Options.recycleValidators { + // Validate won't be called, so relinquish this validator + if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { + redeemableChildren.redeemChildren() + } + if redeemable, ok := validator.(interface{ redeem() }); ok { + redeemable.redeem() + } + i.validators[idx] = nil // prevents further (unsafe) usage + } + + continue + } + validator.SetPath(path) - if validator.Applies(i.root, kind) { - result := validator.Validate(data) - mainResult.Merge(result) - mainResult.Inc() - if result != nil && result.HasErrors() { - return mainResult + err := validator.Validate(data) + if i.Options.recycleValidators { + i.validators[idx] = nil // prevents further (unsafe) usage + } + if err != nil { + result.Inc() + if err.HasErrors() { + result.Merge(err) + + break } + + result.Merge(err) } } - return mainResult + + return result +} + +func (i *itemsValidator) typeValidator() valueValidator { + return newTypeValidator( + i.path, + i.in, + spec.StringOrArray([]string{i.items.Type}), + i.items.Nullable, + i.items.Format, + i.Options, + ) } func (i *itemsValidator) commonValidator() valueValidator { - return &basicCommonValidator{ - In: i.in, - Default: i.items.Default, - Enum: i.items.Enum, - } + return newBasicCommonValidator( + "", + i.in, + i.items.Default, + i.items.Enum, + i.Options, + ) } func (i *itemsValidator) sliceValidator() valueValidator { - return &basicSliceValidator{ - In: i.in, - Default: i.items.Default, - MaxItems: i.items.MaxItems, - MinItems: i.items.MinItems, - UniqueItems: i.items.UniqueItems, - Source: i.root, - Items: i.items.Items, - KnownFormats: i.KnownFormats, - } + return newBasicSliceValidator( + "", + i.in, + i.items.Default, + i.items.MaxItems, + i.items.MinItems, + i.items.UniqueItems, + i.items.Items, + i.root, + i.KnownFormats, + i.Options, + ) } func (i *itemsValidator) numberValidator() valueValidator { - return &numberValidator{ - In: i.in, - Default: i.items.Default, - MultipleOf: i.items.MultipleOf, - Maximum: i.items.Maximum, - ExclusiveMaximum: i.items.ExclusiveMaximum, - Minimum: i.items.Minimum, - ExclusiveMinimum: i.items.ExclusiveMinimum, - Type: i.items.Type, - Format: i.items.Format, - } + return newNumberValidator( + "", + i.in, + i.items.Default, + i.items.MultipleOf, + i.items.Maximum, + i.items.ExclusiveMaximum, + i.items.Minimum, + i.items.ExclusiveMinimum, + i.items.Type, + i.items.Format, + i.Options, + ) } func (i *itemsValidator) stringValidator() valueValidator { - return &stringValidator{ - In: i.in, - Default: i.items.Default, - MaxLength: i.items.MaxLength, - MinLength: i.items.MinLength, - Pattern: i.items.Pattern, - AllowEmptyValue: false, - } + return newStringValidator( + "", + i.in, + i.items.Default, + false, // Required + false, // AllowEmpty + i.items.MaxLength, + i.items.MinLength, + i.items.Pattern, + i.Options, + ) } func (i *itemsValidator) formatValidator() valueValidator { - return &formatValidator{ - In: i.in, - //Default: i.items.Default, - Format: i.items.Format, - KnownFormats: i.KnownFormats, + return newFormatValidator( + "", + i.in, + i.items.Format, + i.KnownFormats, + i.Options, + ) +} + +func (i *itemsValidator) redeem() { + pools.poolOfItemsValidators.RedeemValidator(i) +} + +func (i *itemsValidator) redeemChildren() { + for idx, validator := range i.validators { + if validator == nil { + continue + } + if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { + redeemableChildren.redeemChildren() + } + if redeemable, ok := validator.(interface{ redeem() }); ok { + redeemable.redeem() + } + i.validators[idx] = nil // free up allocated children if not in pool } } @@ -142,6 +228,28 @@ type basicCommonValidator struct { In string Default interface{} Enum []interface{} + Options *SchemaValidatorOptions +} + +func newBasicCommonValidator(path, in string, def interface{}, enum []interface{}, opts *SchemaValidatorOptions) *basicCommonValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) + } + + var b *basicCommonValidator + if opts.recycleValidators { + b = pools.poolOfBasicCommonValidators.BorrowValidator() + } else { + b = new(basicCommonValidator) + } + + b.Path = path + b.In = in + b.Default = def + b.Enum = enum + b.Options = opts + + return b } func (b *basicCommonValidator) SetPath(path string) { @@ -152,255 +260,469 @@ func (b *basicCommonValidator) Applies(source interface{}, _ reflect.Kind) bool switch source.(type) { case *spec.Parameter, *spec.Schema, *spec.Header: return true + default: + return false } - return false } func (b *basicCommonValidator) Validate(data interface{}) (res *Result) { - if len(b.Enum) > 0 { - for _, enumValue := range b.Enum { - actualType := reflect.TypeOf(enumValue) - if actualType != nil { // Safeguard - expectedValue := reflect.ValueOf(data) - if expectedValue.IsValid() && expectedValue.Type().ConvertibleTo(actualType) { - if reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), enumValue) { - return nil - } - } - } + if b.Options.recycleValidators { + defer func() { + b.redeem() + }() + } + + if len(b.Enum) == 0 { + return nil + } + + for _, enumValue := range b.Enum { + actualType := reflect.TypeOf(enumValue) + if actualType == nil { // Safeguard + continue + } + + expectedValue := reflect.ValueOf(data) + if expectedValue.IsValid() && + expectedValue.Type().ConvertibleTo(actualType) && + reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), enumValue) { + return nil } - return errorHelp.sErr(errors.EnumFail(b.Path, b.In, data, b.Enum)) } - return nil + + return errorHelp.sErr(errors.EnumFail(b.Path, b.In, data, b.Enum), b.Options.recycleResult) +} + +func (b *basicCommonValidator) redeem() { + pools.poolOfBasicCommonValidators.RedeemValidator(b) } // A HeaderValidator has very limited subset of validations to apply type HeaderValidator struct { name string header *spec.Header - validators []valueValidator + validators [6]valueValidator KnownFormats strfmt.Registry + Options *SchemaValidatorOptions } // NewHeaderValidator creates a new header validator object -func NewHeaderValidator(name string, header *spec.Header, formats strfmt.Registry) *HeaderValidator { - p := &HeaderValidator{name: name, header: header, KnownFormats: formats} - p.validators = []valueValidator{ - &typeValidator{ - Type: spec.StringOrArray([]string{header.Type}), - Nullable: header.Nullable, - Format: header.Format, - In: "header", - Path: name, - }, +func NewHeaderValidator(name string, header *spec.Header, formats strfmt.Registry, options ...Option) *HeaderValidator { + opts := new(SchemaValidatorOptions) + for _, o := range options { + o(opts) + } + + return newHeaderValidator(name, header, formats, opts) +} + +func newHeaderValidator(name string, header *spec.Header, formats strfmt.Registry, opts *SchemaValidatorOptions) *HeaderValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) + } + + var p *HeaderValidator + if opts.recycleValidators { + p = pools.poolOfHeaderValidators.BorrowValidator() + } else { + p = new(HeaderValidator) + } + + p.name = name + p.header = header + p.KnownFormats = formats + p.Options = opts + p.validators = [6]valueValidator{ + newTypeValidator( + name, + "header", + spec.StringOrArray([]string{header.Type}), + header.Nullable, + header.Format, + p.Options, + ), p.stringValidator(), p.formatValidator(), p.numberValidator(), p.sliceValidator(), p.commonValidator(), } + return p } // Validate the value of the header against its schema func (p *HeaderValidator) Validate(data interface{}) *Result { - result := new(Result) + if p.Options.recycleValidators { + defer func() { + p.redeemChildren() + p.redeem() + }() + } + + if data == nil { + return nil + } + + var result *Result + if p.Options.recycleResult { + result = pools.poolOfResults.BorrowResult() + } else { + result = new(Result) + } + tpe := reflect.TypeOf(data) kind := tpe.Kind() - for _, validator := range p.validators { - if validator.Applies(p.header, kind) { - if err := validator.Validate(data); err != nil { - result.Merge(err) - if err.HasErrors() { - return result + for idx, validator := range p.validators { + if !validator.Applies(p.header, kind) { + if p.Options.recycleValidators { + // Validate won't be called, so relinquish this validator + if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { + redeemableChildren.redeemChildren() + } + if redeemable, ok := validator.(interface{ redeem() }); ok { + redeemable.redeem() } + p.validators[idx] = nil // prevents further (unsafe) usage } + + continue + } + + err := validator.Validate(data) + if p.Options.recycleValidators { + p.validators[idx] = nil // prevents further (unsafe) usage + } + if err != nil { + if err.HasErrors() { + result.Merge(err) + break + } + result.Merge(err) } } - return nil + + return result } func (p *HeaderValidator) commonValidator() valueValidator { - return &basicCommonValidator{ - Path: p.name, - In: "response", - Default: p.header.Default, - Enum: p.header.Enum, - } + return newBasicCommonValidator( + p.name, + "response", + p.header.Default, + p.header.Enum, + p.Options, + ) } func (p *HeaderValidator) sliceValidator() valueValidator { - return &basicSliceValidator{ - Path: p.name, - In: "response", - Default: p.header.Default, - MaxItems: p.header.MaxItems, - MinItems: p.header.MinItems, - UniqueItems: p.header.UniqueItems, - Items: p.header.Items, - Source: p.header, - KnownFormats: p.KnownFormats, - } + return newBasicSliceValidator( + p.name, + "response", + p.header.Default, + p.header.MaxItems, + p.header.MinItems, + p.header.UniqueItems, + p.header.Items, + p.header, + p.KnownFormats, + p.Options, + ) } func (p *HeaderValidator) numberValidator() valueValidator { - return &numberValidator{ - Path: p.name, - In: "response", - Default: p.header.Default, - MultipleOf: p.header.MultipleOf, - Maximum: p.header.Maximum, - ExclusiveMaximum: p.header.ExclusiveMaximum, - Minimum: p.header.Minimum, - ExclusiveMinimum: p.header.ExclusiveMinimum, - Type: p.header.Type, - Format: p.header.Format, - } + return newNumberValidator( + p.name, + "response", + p.header.Default, + p.header.MultipleOf, + p.header.Maximum, + p.header.ExclusiveMaximum, + p.header.Minimum, + p.header.ExclusiveMinimum, + p.header.Type, + p.header.Format, + p.Options, + ) } func (p *HeaderValidator) stringValidator() valueValidator { - return &stringValidator{ - Path: p.name, - In: "response", - Default: p.header.Default, - Required: true, - MaxLength: p.header.MaxLength, - MinLength: p.header.MinLength, - Pattern: p.header.Pattern, - AllowEmptyValue: false, - } + return newStringValidator( + p.name, + "response", + p.header.Default, + true, + false, + p.header.MaxLength, + p.header.MinLength, + p.header.Pattern, + p.Options, + ) } func (p *HeaderValidator) formatValidator() valueValidator { - return &formatValidator{ - Path: p.name, - In: "response", - //Default: p.header.Default, - Format: p.header.Format, - KnownFormats: p.KnownFormats, + return newFormatValidator( + p.name, + "response", + p.header.Format, + p.KnownFormats, + p.Options, + ) +} + +func (p *HeaderValidator) redeem() { + pools.poolOfHeaderValidators.RedeemValidator(p) +} + +func (p *HeaderValidator) redeemChildren() { + for idx, validator := range p.validators { + if validator == nil { + continue + } + if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { + redeemableChildren.redeemChildren() + } + if redeemable, ok := validator.(interface{ redeem() }); ok { + redeemable.redeem() + } + p.validators[idx] = nil // free up allocated children if not in pool } } // A ParamValidator has very limited subset of validations to apply type ParamValidator struct { param *spec.Parameter - validators []valueValidator + validators [6]valueValidator KnownFormats strfmt.Registry + Options *SchemaValidatorOptions } // NewParamValidator creates a new param validator object -func NewParamValidator(param *spec.Parameter, formats strfmt.Registry) *ParamValidator { - p := &ParamValidator{param: param, KnownFormats: formats} - p.validators = []valueValidator{ - &typeValidator{ - Type: spec.StringOrArray([]string{param.Type}), - Nullable: param.Nullable, - Format: param.Format, - In: param.In, - Path: param.Name, - }, +func NewParamValidator(param *spec.Parameter, formats strfmt.Registry, options ...Option) *ParamValidator { + opts := new(SchemaValidatorOptions) + for _, o := range options { + o(opts) + } + + return newParamValidator(param, formats, opts) +} + +func newParamValidator(param *spec.Parameter, formats strfmt.Registry, opts *SchemaValidatorOptions) *ParamValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) + } + + var p *ParamValidator + if opts.recycleValidators { + p = pools.poolOfParamValidators.BorrowValidator() + } else { + p = new(ParamValidator) + } + + p.param = param + p.KnownFormats = formats + p.Options = opts + p.validators = [6]valueValidator{ + newTypeValidator( + param.Name, + param.In, + spec.StringOrArray([]string{param.Type}), + param.Nullable, + param.Format, + p.Options, + ), p.stringValidator(), p.formatValidator(), p.numberValidator(), p.sliceValidator(), p.commonValidator(), } + return p } // Validate the data against the description of the parameter func (p *ParamValidator) Validate(data interface{}) *Result { - result := new(Result) + if data == nil { + return nil + } + + var result *Result + if p.Options.recycleResult { + result = pools.poolOfResults.BorrowResult() + } else { + result = new(Result) + } + tpe := reflect.TypeOf(data) kind := tpe.Kind() + if p.Options.recycleValidators { + defer func() { + p.redeemChildren() + p.redeem() + }() + } + // TODO: validate type - for _, validator := range p.validators { - if validator.Applies(p.param, kind) { - if err := validator.Validate(data); err != nil { - result.Merge(err) - if err.HasErrors() { - return result + for idx, validator := range p.validators { + if !validator.Applies(p.param, kind) { + if p.Options.recycleValidators { + // Validate won't be called, so relinquish this validator + if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { + redeemableChildren.redeemChildren() + } + if redeemable, ok := validator.(interface{ redeem() }); ok { + redeemable.redeem() } + p.validators[idx] = nil // prevents further (unsafe) usage } + + continue + } + + err := validator.Validate(data) + if p.Options.recycleValidators { + p.validators[idx] = nil // prevents further (unsafe) usage + } + if err != nil { + if err.HasErrors() { + result.Merge(err) + break + } + result.Merge(err) } } - return nil + + return result } func (p *ParamValidator) commonValidator() valueValidator { - return &basicCommonValidator{ - Path: p.param.Name, - In: p.param.In, - Default: p.param.Default, - Enum: p.param.Enum, - } + return newBasicCommonValidator( + p.param.Name, + p.param.In, + p.param.Default, + p.param.Enum, + p.Options, + ) } func (p *ParamValidator) sliceValidator() valueValidator { - return &basicSliceValidator{ - Path: p.param.Name, - In: p.param.In, - Default: p.param.Default, - MaxItems: p.param.MaxItems, - MinItems: p.param.MinItems, - UniqueItems: p.param.UniqueItems, - Items: p.param.Items, - Source: p.param, - KnownFormats: p.KnownFormats, - } + return newBasicSliceValidator( + p.param.Name, + p.param.In, + p.param.Default, + p.param.MaxItems, + p.param.MinItems, + p.param.UniqueItems, + p.param.Items, + p.param, + p.KnownFormats, + p.Options, + ) } func (p *ParamValidator) numberValidator() valueValidator { - return &numberValidator{ - Path: p.param.Name, - In: p.param.In, - Default: p.param.Default, - MultipleOf: p.param.MultipleOf, - Maximum: p.param.Maximum, - ExclusiveMaximum: p.param.ExclusiveMaximum, - Minimum: p.param.Minimum, - ExclusiveMinimum: p.param.ExclusiveMinimum, - Type: p.param.Type, - Format: p.param.Format, - } + return newNumberValidator( + p.param.Name, + p.param.In, + p.param.Default, + p.param.MultipleOf, + p.param.Maximum, + p.param.ExclusiveMaximum, + p.param.Minimum, + p.param.ExclusiveMinimum, + p.param.Type, + p.param.Format, + p.Options, + ) } func (p *ParamValidator) stringValidator() valueValidator { - return &stringValidator{ - Path: p.param.Name, - In: p.param.In, - Default: p.param.Default, - AllowEmptyValue: p.param.AllowEmptyValue, - Required: p.param.Required, - MaxLength: p.param.MaxLength, - MinLength: p.param.MinLength, - Pattern: p.param.Pattern, - } + return newStringValidator( + p.param.Name, + p.param.In, + p.param.Default, + p.param.Required, + p.param.AllowEmptyValue, + p.param.MaxLength, + p.param.MinLength, + p.param.Pattern, + p.Options, + ) } func (p *ParamValidator) formatValidator() valueValidator { - return &formatValidator{ - Path: p.param.Name, - In: p.param.In, - //Default: p.param.Default, - Format: p.param.Format, - KnownFormats: p.KnownFormats, + return newFormatValidator( + p.param.Name, + p.param.In, + p.param.Format, + p.KnownFormats, + p.Options, + ) +} + +func (p *ParamValidator) redeem() { + pools.poolOfParamValidators.RedeemValidator(p) +} + +func (p *ParamValidator) redeemChildren() { + for idx, validator := range p.validators { + if validator == nil { + continue + } + if redeemableChildren, ok := validator.(interface{ redeemChildren() }); ok { + redeemableChildren.redeemChildren() + } + if redeemable, ok := validator.(interface{ redeem() }); ok { + redeemable.redeem() + } + p.validators[idx] = nil // free up allocated children if not in pool } } type basicSliceValidator struct { - Path string - In string - Default interface{} - MaxItems *int64 - MinItems *int64 - UniqueItems bool - Items *spec.Items - Source interface{} - itemsValidator *itemsValidator - KnownFormats strfmt.Registry + Path string + In string + Default interface{} + MaxItems *int64 + MinItems *int64 + UniqueItems bool + Items *spec.Items + Source interface{} + KnownFormats strfmt.Registry + Options *SchemaValidatorOptions +} + +func newBasicSliceValidator( + path, in string, + def interface{}, maxItems, minItems *int64, uniqueItems bool, items *spec.Items, + source interface{}, formats strfmt.Registry, + opts *SchemaValidatorOptions) *basicSliceValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) + } + + var s *basicSliceValidator + if opts.recycleValidators { + s = pools.poolOfBasicSliceValidators.BorrowValidator() + } else { + s = new(basicSliceValidator) + } + + s.Path = path + s.In = in + s.Default = def + s.MaxItems = maxItems + s.MinItems = minItems + s.UniqueItems = uniqueItems + s.Items = items + s.Source = source + s.KnownFormats = formats + s.Options = opts + + return s } func (s *basicSliceValidator) SetPath(path string) { @@ -411,60 +733,61 @@ func (s *basicSliceValidator) Applies(source interface{}, kind reflect.Kind) boo switch source.(type) { case *spec.Parameter, *spec.Items, *spec.Header: return kind == reflect.Slice + default: + return false } - return false } func (s *basicSliceValidator) Validate(data interface{}) *Result { + if s.Options.recycleValidators { + defer func() { + s.redeem() + }() + } val := reflect.ValueOf(data) size := int64(val.Len()) if s.MinItems != nil { if err := MinItems(s.Path, s.In, size, *s.MinItems); err != nil { - return errorHelp.sErr(err) + return errorHelp.sErr(err, s.Options.recycleResult) } } if s.MaxItems != nil { if err := MaxItems(s.Path, s.In, size, *s.MaxItems); err != nil { - return errorHelp.sErr(err) + return errorHelp.sErr(err, s.Options.recycleResult) } } if s.UniqueItems { if err := UniqueItems(s.Path, s.In, data); err != nil { - return errorHelp.sErr(err) + return errorHelp.sErr(err, s.Options.recycleResult) } } - if s.itemsValidator == nil && s.Items != nil { - s.itemsValidator = newItemsValidator(s.Path, s.In, s.Items, s.Source, s.KnownFormats) + if s.Items == nil { + return nil } - if s.itemsValidator != nil { - for i := 0; i < int(size); i++ { - ele := val.Index(i) - if err := s.itemsValidator.Validate(i, ele.Interface()); err != nil && err.HasErrors() { + for i := 0; i < int(size); i++ { + itemsValidator := newItemsValidator(s.Path, s.In, s.Items, s.Source, s.KnownFormats, s.Options) + ele := val.Index(i) + if err := itemsValidator.Validate(i, ele.Interface()); err != nil { + if err.HasErrors() { return err } + if err.wantsRedeemOnMerge { + pools.poolOfResults.RedeemResult(err) + } } } + return nil } -/* unused -func (s *basicSliceValidator) hasDuplicates(value reflect.Value, size int) bool { - dict := make(map[interface{}]struct{}) - for i := 0; i < size; i++ { - ele := value.Index(i) - if _, ok := dict[ele.Interface()]; ok { - return true - } - dict[ele.Interface()] = struct{}{} - } - return false +func (s *basicSliceValidator) redeem() { + pools.poolOfBasicSliceValidators.RedeemValidator(s) } -*/ type numberValidator struct { Path string @@ -476,8 +799,40 @@ type numberValidator struct { Minimum *float64 ExclusiveMinimum bool // Allows for more accurate behavior regarding integers - Type string - Format string + Type string + Format string + Options *SchemaValidatorOptions +} + +func newNumberValidator( + path, in string, def interface{}, + multipleOf, maximum *float64, exclusiveMaximum bool, minimum *float64, exclusiveMinimum bool, + typ, format string, + opts *SchemaValidatorOptions) *numberValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) + } + + var n *numberValidator + if opts.recycleValidators { + n = pools.poolOfNumberValidators.BorrowValidator() + } else { + n = new(numberValidator) + } + + n.Path = path + n.In = in + n.Default = def + n.MultipleOf = multipleOf + n.Maximum = maximum + n.ExclusiveMaximum = exclusiveMaximum + n.Minimum = minimum + n.ExclusiveMinimum = exclusiveMinimum + n.Type = typ + n.Format = format + n.Options = opts + + return n } func (n *numberValidator) SetPath(path string) { @@ -489,12 +844,10 @@ func (n *numberValidator) Applies(source interface{}, kind reflect.Kind) bool { case *spec.Parameter, *spec.Schema, *spec.Items, *spec.Header: isInt := kind >= reflect.Int && kind <= reflect.Uint64 isFloat := kind == reflect.Float32 || kind == reflect.Float64 - r := isInt || isFloat - debugLog("schema props validator for %q applies %t for %T (kind: %v) isInt=%t, isFloat=%t\n", n.Path, r, source, kind, isInt, isFloat) - return r + return isInt || isFloat + default: + return false } - debugLog("schema props validator for %q applies %t for %T (kind: %v)\n", n.Path, false, source, kind) - return false } // Validate provides a validator for generic JSON numbers, @@ -519,11 +872,18 @@ func (n *numberValidator) Applies(source interface{}, kind reflect.Kind) bool { // // TODO: default boundaries with MAX_SAFE_INTEGER are not checked (specific to json.Number?) func (n *numberValidator) Validate(val interface{}) *Result { - res := new(Result) + if n.Options.recycleValidators { + defer func() { + n.redeem() + }() + } - resMultiple := new(Result) - resMinimum := new(Result) - resMaximum := new(Result) + var res, resMultiple, resMinimum, resMaximum *Result + if n.Options.recycleResult { + res = pools.poolOfResults.BorrowResult() + } else { + res = new(Result) + } // Used only to attempt to validate constraint on value, // even though value or constraint specified do not match type and format @@ -533,68 +893,106 @@ func (n *numberValidator) Validate(val interface{}) *Result { res.AddErrors(IsValueValidAgainstRange(val, n.Type, n.Format, "Checked", n.Path)) if n.MultipleOf != nil { + resMultiple = pools.poolOfResults.BorrowResult() + // Is the constraint specifier within the range of the specific numeric type and format? resMultiple.AddErrors(IsValueValidAgainstRange(*n.MultipleOf, n.Type, n.Format, "MultipleOf", n.Path)) if resMultiple.IsValid() { // Constraint validated with compatible types if err := MultipleOfNativeType(n.Path, n.In, val, *n.MultipleOf); err != nil { - resMultiple.Merge(errorHelp.sErr(err)) + resMultiple.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } else { // Constraint nevertheless validated, converted as general number if err := MultipleOf(n.Path, n.In, data, *n.MultipleOf); err != nil { - resMultiple.Merge(errorHelp.sErr(err)) + resMultiple.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } } - // nolint: dupl if n.Maximum != nil { + resMaximum = pools.poolOfResults.BorrowResult() + // Is the constraint specifier within the range of the specific numeric type and format? resMaximum.AddErrors(IsValueValidAgainstRange(*n.Maximum, n.Type, n.Format, "Maximum boundary", n.Path)) if resMaximum.IsValid() { // Constraint validated with compatible types if err := MaximumNativeType(n.Path, n.In, val, *n.Maximum, n.ExclusiveMaximum); err != nil { - resMaximum.Merge(errorHelp.sErr(err)) + resMaximum.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } else { // Constraint nevertheless validated, converted as general number if err := Maximum(n.Path, n.In, data, *n.Maximum, n.ExclusiveMaximum); err != nil { - resMaximum.Merge(errorHelp.sErr(err)) + resMaximum.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } } - // nolint: dupl if n.Minimum != nil { + resMinimum = pools.poolOfResults.BorrowResult() + // Is the constraint specifier within the range of the specific numeric type and format? resMinimum.AddErrors(IsValueValidAgainstRange(*n.Minimum, n.Type, n.Format, "Minimum boundary", n.Path)) if resMinimum.IsValid() { // Constraint validated with compatible types if err := MinimumNativeType(n.Path, n.In, val, *n.Minimum, n.ExclusiveMinimum); err != nil { - resMinimum.Merge(errorHelp.sErr(err)) + resMinimum.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } else { // Constraint nevertheless validated, converted as general number if err := Minimum(n.Path, n.In, data, *n.Minimum, n.ExclusiveMinimum); err != nil { - resMinimum.Merge(errorHelp.sErr(err)) + resMinimum.Merge(errorHelp.sErr(err, n.Options.recycleResult)) } } } res.Merge(resMultiple, resMinimum, resMaximum) res.Inc() + return res } +func (n *numberValidator) redeem() { + pools.poolOfNumberValidators.RedeemValidator(n) +} + type stringValidator struct { + Path string + In string Default interface{} Required bool AllowEmptyValue bool MaxLength *int64 MinLength *int64 Pattern string - Path string - In string + Options *SchemaValidatorOptions +} + +func newStringValidator( + path, in string, + def interface{}, required, allowEmpty bool, maxLength, minLength *int64, pattern string, + opts *SchemaValidatorOptions) *stringValidator { + if opts == nil { + opts = new(SchemaValidatorOptions) + } + + var s *stringValidator + if opts.recycleValidators { + s = pools.poolOfStringValidators.BorrowValidator() + } else { + s = new(stringValidator) + } + + s.Path = path + s.In = in + s.Default = def + s.Required = required + s.AllowEmptyValue = allowEmpty + s.MaxLength = maxLength + s.MinLength = minLength + s.Pattern = pattern + s.Options = opts + + return s } func (s *stringValidator) SetPath(path string) { @@ -604,42 +1002,50 @@ func (s *stringValidator) SetPath(path string) { func (s *stringValidator) Applies(source interface{}, kind reflect.Kind) bool { switch source.(type) { case *spec.Parameter, *spec.Schema, *spec.Items, *spec.Header: - r := kind == reflect.String - debugLog("string validator for %q applies %t for %T (kind: %v)\n", s.Path, r, source, kind) - return r + return kind == reflect.String + default: + return false } - debugLog("string validator for %q applies %t for %T (kind: %v)\n", s.Path, false, source, kind) - return false } func (s *stringValidator) Validate(val interface{}) *Result { + if s.Options.recycleValidators { + defer func() { + s.redeem() + }() + } + data, ok := val.(string) if !ok { - return errorHelp.sErr(errors.InvalidType(s.Path, s.In, stringType, val)) + return errorHelp.sErr(errors.InvalidType(s.Path, s.In, stringType, val), s.Options.recycleResult) } if s.Required && !s.AllowEmptyValue && (s.Default == nil || s.Default == "") { if err := RequiredString(s.Path, s.In, data); err != nil { - return errorHelp.sErr(err) + return errorHelp.sErr(err, s.Options.recycleResult) } } if s.MaxLength != nil { if err := MaxLength(s.Path, s.In, data, *s.MaxLength); err != nil { - return errorHelp.sErr(err) + return errorHelp.sErr(err, s.Options.recycleResult) } } if s.MinLength != nil { if err := MinLength(s.Path, s.In, data, *s.MinLength); err != nil { - return errorHelp.sErr(err) + return errorHelp.sErr(err, s.Options.recycleResult) } } if s.Pattern != "" { if err := Pattern(s.Path, s.In, data, s.Pattern); err != nil { - return errorHelp.sErr(err) + return errorHelp.sErr(err, s.Options.recycleResult) } } return nil } + +func (s *stringValidator) redeem() { + pools.poolOfStringValidators.RedeemValidator(s) +} diff --git a/vendor/github.com/go-openapi/validate/values.go b/vendor/github.com/go-openapi/validate/values.go index 080fe213243..5f6f5ee61e5 100644 --- a/vendor/github.com/go-openapi/validate/values.go +++ b/vendor/github.com/go-openapi/validate/values.go @@ -315,7 +315,7 @@ func FormatOf(path, in, format, data string, registry strfmt.Registry) *errors.V // TODO: Normally, a JSON MAX_SAFE_INTEGER check would ensure conversion remains loss-free func MaximumNativeType(path, in string, val interface{}, max float64, exclusive bool) *errors.Validation { kind := reflect.ValueOf(val).Type().Kind() - switch kind { + switch kind { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: value := valueHelp.asInt64(val) return MaximumInt(path, in, value, int64(max), exclusive) @@ -345,7 +345,7 @@ func MaximumNativeType(path, in string, val interface{}, max float64, exclusive // TODO: Normally, a JSON MAX_SAFE_INTEGER check would ensure conversion remains loss-free func MinimumNativeType(path, in string, val interface{}, min float64, exclusive bool) *errors.Validation { kind := reflect.ValueOf(val).Type().Kind() - switch kind { + switch kind { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: value := valueHelp.asInt64(val) return MinimumInt(path, in, value, int64(min), exclusive) @@ -375,7 +375,7 @@ func MinimumNativeType(path, in string, val interface{}, min float64, exclusive // TODO: Normally, a JSON MAX_SAFE_INTEGER check would ensure conversion remains loss-free func MultipleOfNativeType(path, in string, val interface{}, multipleOf float64) *errors.Validation { kind := reflect.ValueOf(val).Type().Kind() - switch kind { + switch kind { //nolint:exhaustive case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: value := valueHelp.asInt64(val) return MultipleOfInt(path, in, value, int64(multipleOf)) @@ -399,7 +399,7 @@ func IsValueValidAgainstRange(val interface{}, typeName, format, prefix, path st // What is the string representation of val var stringRep string - switch kind { + switch kind { //nolint:exhaustive case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: stringRep = swag.FormatUint64(valueHelp.asUint64(val)) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: diff --git a/vendor/github.com/google/cel-go/cel/BUILD.bazel b/vendor/github.com/google/cel-go/cel/BUILD.bazel index 0905f635395..6e2fc073d4d 100644 --- a/vendor/github.com/google/cel-go/cel/BUILD.bazel +++ b/vendor/github.com/google/cel-go/cel/BUILD.bazel @@ -10,9 +10,12 @@ go_library( "cel.go", "decls.go", "env.go", + "folding.go", "io.go", + "inlining.go", "library.go", "macro.go", + "optimizer.go", "options.go", "program.go", "validator.go", @@ -56,7 +59,11 @@ go_test( "cel_test.go", "decls_test.go", "env_test.go", + "folding_test.go", "io_test.go", + "inlining_test.go", + "optimizer_test.go", + "validator_test.go", ], data = [ "//cel/testdata:gen_test_fds", @@ -70,6 +77,7 @@ go_test( "//common/types:go_default_library", "//common/types/ref:go_default_library", "//common/types/traits:go_default_library", + "//ext:go_default_library", "//test:go_default_library", "//test/proto2pb:go_default_library", "//test/proto3pb:go_default_library", diff --git a/vendor/github.com/google/cel-go/cel/decls.go b/vendor/github.com/google/cel-go/cel/decls.go index 0f9501341b4..b59e3708de6 100644 --- a/vendor/github.com/google/cel-go/cel/decls.go +++ b/vendor/github.com/google/cel-go/cel/decls.go @@ -353,43 +353,3 @@ func ExprDeclToDeclaration(d *exprpb.Decl) (EnvOption, error) { return nil, fmt.Errorf("unsupported decl: %v", d) } } - -func typeValueToKind(tv ref.Type) (Kind, error) { - switch tv { - case types.BoolType: - return BoolKind, nil - case types.DoubleType: - return DoubleKind, nil - case types.IntType: - return IntKind, nil - case types.UintType: - return UintKind, nil - case types.ListType: - return ListKind, nil - case types.MapType: - return MapKind, nil - case types.StringType: - return StringKind, nil - case types.BytesType: - return BytesKind, nil - case types.DurationType: - return DurationKind, nil - case types.TimestampType: - return TimestampKind, nil - case types.NullType: - return NullTypeKind, nil - case types.TypeType: - return TypeKind, nil - default: - switch tv.TypeName() { - case "dyn": - return DynKind, nil - case "google.protobuf.Any": - return AnyKind, nil - case "optional": - return OpaqueKind, nil - default: - return 0, fmt.Errorf("no known conversion for type of %s", tv.TypeName()) - } - } -} diff --git a/vendor/github.com/google/cel-go/cel/env.go b/vendor/github.com/google/cel-go/cel/env.go index b5c3b4cc556..6568a8b8092 100644 --- a/vendor/github.com/google/cel-go/cel/env.go +++ b/vendor/github.com/google/cel-go/cel/env.go @@ -38,26 +38,42 @@ type Source = common.Source // Ast representing the checked or unchecked expression, its source, and related metadata such as // source position information. type Ast struct { - expr *exprpb.Expr - info *exprpb.SourceInfo - source Source - refMap map[int64]*celast.ReferenceInfo - typeMap map[int64]*types.Type + source Source + impl *celast.AST +} + +// NativeRep converts the AST to a Go-native representation. +func (ast *Ast) NativeRep() *celast.AST { + return ast.impl } // Expr returns the proto serializable instance of the parsed/checked expression. +// +// Deprecated: prefer cel.AstToCheckedExpr() or cel.AstToParsedExpr() and call GetExpr() +// the result instead. func (ast *Ast) Expr() *exprpb.Expr { - return ast.expr + if ast == nil { + return nil + } + pbExpr, _ := celast.ExprToProto(ast.impl.Expr()) + return pbExpr } // IsChecked returns whether the Ast value has been successfully type-checked. func (ast *Ast) IsChecked() bool { - return ast.typeMap != nil && len(ast.typeMap) > 0 + if ast == nil { + return false + } + return ast.impl.IsChecked() } // SourceInfo returns character offset and newline position information about expression elements. func (ast *Ast) SourceInfo() *exprpb.SourceInfo { - return ast.info + if ast == nil { + return nil + } + pbInfo, _ := celast.SourceInfoToProto(ast.impl.SourceInfo()) + return pbInfo } // ResultType returns the output type of the expression if the Ast has been type-checked, else @@ -65,9 +81,6 @@ func (ast *Ast) SourceInfo() *exprpb.SourceInfo { // // Deprecated: use OutputType func (ast *Ast) ResultType() *exprpb.Type { - if !ast.IsChecked() { - return chkdecls.Dyn - } out := ast.OutputType() t, err := TypeToExprType(out) if err != nil { @@ -79,16 +92,18 @@ func (ast *Ast) ResultType() *exprpb.Type { // OutputType returns the output type of the expression if the Ast has been type-checked, else // returns cel.DynType as the parse step cannot infer types. func (ast *Ast) OutputType() *Type { - t, found := ast.typeMap[ast.expr.GetId()] - if !found { - return DynType + if ast == nil { + return types.ErrorType } - return t + return ast.impl.GetType(ast.impl.Expr().ID()) } // Source returns a view of the input used to create the Ast. This source may be complete or // constructed from the SourceInfo. func (ast *Ast) Source() Source { + if ast == nil { + return nil + } return ast.source } @@ -198,29 +213,28 @@ func NewCustomEnv(opts ...EnvOption) (*Env, error) { // It is possible to have both non-nil Ast and Issues values returned from this call: however, // the mere presence of an Ast does not imply that it is valid for use. func (e *Env) Check(ast *Ast) (*Ast, *Issues) { - // Note, errors aren't currently possible on the Ast to ParsedExpr conversion. - pe, _ := AstToParsedExpr(ast) - // Construct the internal checker env, erroring if there is an issue adding the declarations. chk, err := e.initChecker() if err != nil { errs := common.NewErrors(ast.Source()) errs.ReportError(common.NoLocation, err.Error()) - return nil, NewIssuesWithSourceInfo(errs, ast.SourceInfo()) + return nil, NewIssuesWithSourceInfo(errs, ast.impl.SourceInfo()) } - res, errs := checker.Check(pe, ast.Source(), chk) + checked, errs := checker.Check(ast.impl, ast.Source(), chk) if len(errs.GetErrors()) > 0 { - return nil, NewIssuesWithSourceInfo(errs, ast.SourceInfo()) + return nil, NewIssuesWithSourceInfo(errs, ast.impl.SourceInfo()) } // Manually create the Ast to ensure that the Ast source information (which may be more // detailed than the information provided by Check), is returned to the caller. ast = &Ast{ - source: ast.Source(), - expr: res.Expr, - info: res.SourceInfo, - refMap: res.ReferenceMap, - typeMap: res.TypeMap} + source: ast.Source(), + impl: checked} + + // Avoid creating a validator config if it's not needed. + if len(e.validators) == 0 { + return ast, nil + } // Generate a validator configuration from the set of configured validators. vConfig := newValidatorConfig() @@ -230,9 +244,9 @@ func (e *Env) Check(ast *Ast) (*Ast, *Issues) { } } // Apply additional validators on the type-checked result. - iss := NewIssuesWithSourceInfo(errs, ast.SourceInfo()) + iss := NewIssuesWithSourceInfo(errs, ast.impl.SourceInfo()) for _, v := range e.validators { - v.Validate(e, vConfig, res, iss) + v.Validate(e, vConfig, checked, iss) } if iss.Err() != nil { return nil, iss @@ -429,16 +443,11 @@ func (e *Env) Parse(txt string) (*Ast, *Issues) { // It is possible to have both non-nil Ast and Issues values returned from this call; however, // the mere presence of an Ast does not imply that it is valid for use. func (e *Env) ParseSource(src Source) (*Ast, *Issues) { - res, errs := e.prsr.Parse(src) + parsed, errs := e.prsr.Parse(src) if len(errs.GetErrors()) > 0 { return nil, &Issues{errs: errs} } - // Manually create the Ast to ensure that the text source information is propagated on - // subsequent calls to Check. - return &Ast{ - source: src, - expr: res.GetExpr(), - info: res.GetSourceInfo()}, nil + return &Ast{source: src, impl: parsed}, nil } // Program generates an evaluable instance of the Ast within the environment (Env). @@ -534,8 +543,9 @@ func (e *Env) PartialVars(vars any) (interpreter.PartialActivation, error) { // TODO: Consider adding an option to generate a Program.Residual to avoid round-tripping to an // Ast format and then Program again. func (e *Env) ResidualAst(a *Ast, details *EvalDetails) (*Ast, error) { - pruned := interpreter.PruneAst(a.Expr(), a.SourceInfo().GetMacroCalls(), details.State()) - expr, err := AstToString(ParsedExprToAst(pruned)) + pruned := interpreter.PruneAst(a.impl.Expr(), a.impl.SourceInfo().MacroCalls(), details.State()) + newAST := &Ast{source: a.Source(), impl: pruned} + expr, err := AstToString(newAST) if err != nil { return nil, err } @@ -556,16 +566,10 @@ func (e *Env) ResidualAst(a *Ast, details *EvalDetails) (*Ast, error) { // EstimateCost estimates the cost of a type checked CEL expression using the length estimates of input data and // extension functions provided by estimator. func (e *Env) EstimateCost(ast *Ast, estimator checker.CostEstimator, opts ...checker.CostOption) (checker.CostEstimate, error) { - checked := &celast.CheckedAST{ - Expr: ast.Expr(), - SourceInfo: ast.SourceInfo(), - TypeMap: ast.typeMap, - ReferenceMap: ast.refMap, - } extendedOpts := make([]checker.CostOption, 0, len(e.costOptions)) extendedOpts = append(extendedOpts, opts...) extendedOpts = append(extendedOpts, e.costOptions...) - return checker.Cost(checked, estimator, extendedOpts...) + return checker.Cost(ast.impl, estimator, extendedOpts...) } // configure applies a series of EnvOptions to the current environment. @@ -707,7 +711,7 @@ type Error = common.Error // Note: in the future, non-fatal warnings and notices may be inspectable via the Issues struct. type Issues struct { errs *common.Errors - info *exprpb.SourceInfo + info *celast.SourceInfo } // NewIssues returns an Issues struct from a common.Errors object. @@ -718,7 +722,7 @@ func NewIssues(errs *common.Errors) *Issues { // NewIssuesWithSourceInfo returns an Issues struct from a common.Errors object with SourceInfo metatata // which can be used with the `ReportErrorAtID` method for additional error reports within the context // information that's inferred from an expression id. -func NewIssuesWithSourceInfo(errs *common.Errors, info *exprpb.SourceInfo) *Issues { +func NewIssuesWithSourceInfo(errs *common.Errors, info *celast.SourceInfo) *Issues { return &Issues{ errs: errs, info: info, @@ -768,30 +772,7 @@ func (i *Issues) String() string { // The source metadata for the expression at `id`, if present, is attached to the error report. // To ensure that source metadata is attached to error reports, use NewIssuesWithSourceInfo. func (i *Issues) ReportErrorAtID(id int64, message string, args ...any) { - i.errs.ReportErrorAtID(id, locationByID(id, i.info), message, args...) -} - -// locationByID returns a common.Location given an expression id. -// -// TODO: move this functionality into the native SourceInfo and an overhaul of the common.Source -// as this implementation relies on the abstractions present in the protobuf SourceInfo object, -// and is replicated in the checker. -func locationByID(id int64, sourceInfo *exprpb.SourceInfo) common.Location { - positions := sourceInfo.GetPositions() - var line = 1 - if offset, found := positions[id]; found { - col := int(offset) - for _, lineOffset := range sourceInfo.GetLineOffsets() { - if lineOffset < offset { - line++ - col = int(offset - lineOffset) - } else { - break - } - } - return common.NewLocation(line, col) - } - return common.NoLocation + i.errs.ReportErrorAtID(id, i.info.GetStartLocation(id), message, args...) } // getStdEnv lazy initializes the CEL standard environment. @@ -822,6 +803,13 @@ func (p *interopCELTypeProvider) FindStructType(typeName string) (*types.Type, b return nil, false } +// FindStructFieldNames returns an empty set of field for the interop provider. +// +// To inspect the field names, migrate to a `types.Provider` implementation. +func (p *interopCELTypeProvider) FindStructFieldNames(typeName string) ([]string, bool) { + return []string{}, false +} + // FindStructFieldType returns a types.FieldType instance for the given fully-qualified typeName and field // name, if one exists. // diff --git a/vendor/github.com/google/cel-go/cel/folding.go b/vendor/github.com/google/cel-go/cel/folding.go new file mode 100644 index 00000000000..d7060896d37 --- /dev/null +++ b/vendor/github.com/google/cel-go/cel/folding.go @@ -0,0 +1,559 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cel + +import ( + "fmt" + + "github.com/google/cel-go/common/ast" + "github.com/google/cel-go/common/operators" + "github.com/google/cel-go/common/overloads" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" + "github.com/google/cel-go/common/types/traits" +) + +// ConstantFoldingOption defines a functional option for configuring constant folding. +type ConstantFoldingOption func(opt *constantFoldingOptimizer) (*constantFoldingOptimizer, error) + +// MaxConstantFoldIterations limits the number of times literals may be folding during optimization. +// +// Defaults to 100 if not set. +func MaxConstantFoldIterations(limit int) ConstantFoldingOption { + return func(opt *constantFoldingOptimizer) (*constantFoldingOptimizer, error) { + opt.maxFoldIterations = limit + return opt, nil + } +} + +// NewConstantFoldingOptimizer creates an optimizer which inlines constant scalar an aggregate +// literal values within function calls and select statements with their evaluated result. +func NewConstantFoldingOptimizer(opts ...ConstantFoldingOption) (ASTOptimizer, error) { + folder := &constantFoldingOptimizer{ + maxFoldIterations: defaultMaxConstantFoldIterations, + } + var err error + for _, o := range opts { + folder, err = o(folder) + if err != nil { + return nil, err + } + } + return folder, nil +} + +type constantFoldingOptimizer struct { + maxFoldIterations int +} + +// Optimize queries the expression graph for scalar and aggregate literal expressions within call and +// select statements and then evaluates them and replaces the call site with the literal result. +// +// Note: only values which can be represented as literals in CEL syntax are supported. +func (opt *constantFoldingOptimizer) Optimize(ctx *OptimizerContext, a *ast.AST) *ast.AST { + root := ast.NavigateAST(a) + + // Walk the list of foldable expression and continue to fold until there are no more folds left. + // All of the fold candidates returned by the constantExprMatcher should succeed unless there's + // a logic bug with the selection of expressions. + foldableExprs := ast.MatchDescendants(root, constantExprMatcher) + foldCount := 0 + for len(foldableExprs) != 0 && foldCount < opt.maxFoldIterations { + for _, fold := range foldableExprs { + // If the expression could be folded because it's a non-strict call, and the + // branches are pruned, continue to the next fold. + if fold.Kind() == ast.CallKind && maybePruneBranches(ctx, fold) { + continue + } + // Otherwise, assume all context is needed to evaluate the expression. + err := tryFold(ctx, a, fold) + if err != nil { + ctx.ReportErrorAtID(fold.ID(), "constant-folding evaluation failed: %v", err.Error()) + return a + } + } + foldCount++ + foldableExprs = ast.MatchDescendants(root, constantExprMatcher) + } + // Once all of the constants have been folded, try to run through the remaining comprehensions + // one last time. In this case, there's no guarantee they'll run, so we only update the + // target comprehension node with the literal value if the evaluation succeeds. + for _, compre := range ast.MatchDescendants(root, ast.KindMatcher(ast.ComprehensionKind)) { + tryFold(ctx, a, compre) + } + + // If the output is a list, map, or struct which contains optional entries, then prune it + // to make sure that the optionals, if resolved, do not surface in the output literal. + pruneOptionalElements(ctx, root) + + // Ensure that all intermediate values in the folded expression can be represented as valid + // CEL literals within the AST structure. Use `PostOrderVisit` rather than `MatchDescendents` + // to avoid extra allocations during this final pass through the AST. + ast.PostOrderVisit(root, ast.NewExprVisitor(func(e ast.Expr) { + if e.Kind() != ast.LiteralKind { + return + } + val := e.AsLiteral() + adapted, err := adaptLiteral(ctx, val) + if err != nil { + ctx.ReportErrorAtID(root.ID(), "constant-folding evaluation failed: %v", err.Error()) + return + } + ctx.UpdateExpr(e, adapted) + })) + + return a +} + +// tryFold attempts to evaluate a sub-expression to a literal. +// +// If the evaluation succeeds, the input expr value will be modified to become a literal, otherwise +// the method will return an error. +func tryFold(ctx *OptimizerContext, a *ast.AST, expr ast.Expr) error { + // Assume all context is needed to evaluate the expression. + subAST := &Ast{ + impl: ast.NewCheckedAST(ast.NewAST(expr, a.SourceInfo()), a.TypeMap(), a.ReferenceMap()), + } + prg, err := ctx.Program(subAST) + if err != nil { + return err + } + out, _, err := prg.Eval(NoVars()) + if err != nil { + return err + } + // Update the fold expression to be a literal. + ctx.UpdateExpr(expr, ctx.NewLiteral(out)) + return nil +} + +// maybePruneBranches inspects the non-strict call expression to determine whether +// a branch can be removed. Evaluation will naturally prune logical and / or calls, +// but conditional will not be pruned cleanly, so this is one small area where the +// constant folding step reimplements a portion of the evaluator. +func maybePruneBranches(ctx *OptimizerContext, expr ast.NavigableExpr) bool { + call := expr.AsCall() + args := call.Args() + switch call.FunctionName() { + case operators.LogicalAnd, operators.LogicalOr: + return maybeShortcircuitLogic(ctx, call.FunctionName(), args, expr) + case operators.Conditional: + cond := args[0] + truthy := args[1] + falsy := args[2] + if cond.Kind() != ast.LiteralKind { + return false + } + if cond.AsLiteral() == types.True { + ctx.UpdateExpr(expr, truthy) + } else { + ctx.UpdateExpr(expr, falsy) + } + return true + case operators.In: + haystack := args[1] + if haystack.Kind() == ast.ListKind && haystack.AsList().Size() == 0 { + ctx.UpdateExpr(expr, ctx.NewLiteral(types.False)) + return true + } + needle := args[0] + if needle.Kind() == ast.LiteralKind && haystack.Kind() == ast.ListKind { + needleValue := needle.AsLiteral() + list := haystack.AsList() + for _, e := range list.Elements() { + if e.Kind() == ast.LiteralKind && e.AsLiteral().Equal(needleValue) == types.True { + ctx.UpdateExpr(expr, ctx.NewLiteral(types.True)) + return true + } + } + } + } + return false +} + +func maybeShortcircuitLogic(ctx *OptimizerContext, function string, args []ast.Expr, expr ast.NavigableExpr) bool { + shortcircuit := types.False + skip := types.True + if function == operators.LogicalOr { + shortcircuit = types.True + skip = types.False + } + newArgs := []ast.Expr{} + for _, arg := range args { + if arg.Kind() != ast.LiteralKind { + newArgs = append(newArgs, arg) + continue + } + if arg.AsLiteral() == skip { + continue + } + if arg.AsLiteral() == shortcircuit { + ctx.UpdateExpr(expr, arg) + return true + } + } + if len(newArgs) == 0 { + newArgs = append(newArgs, args[0]) + ctx.UpdateExpr(expr, newArgs[0]) + return true + } + if len(newArgs) == 1 { + ctx.UpdateExpr(expr, newArgs[0]) + return true + } + ctx.UpdateExpr(expr, ctx.NewCall(function, newArgs...)) + return true +} + +// pruneOptionalElements works from the bottom up to resolve optional elements within +// aggregate literals. +// +// Note, many aggregate literals will be resolved as arguments to functions or select +// statements, so this method exists to handle the case where the literal could not be +// fully resolved or exists outside of a call, select, or comprehension context. +func pruneOptionalElements(ctx *OptimizerContext, root ast.NavigableExpr) { + aggregateLiterals := ast.MatchDescendants(root, aggregateLiteralMatcher) + for _, lit := range aggregateLiterals { + switch lit.Kind() { + case ast.ListKind: + pruneOptionalListElements(ctx, lit) + case ast.MapKind: + pruneOptionalMapEntries(ctx, lit) + case ast.StructKind: + pruneOptionalStructFields(ctx, lit) + } + } +} + +func pruneOptionalListElements(ctx *OptimizerContext, e ast.Expr) { + l := e.AsList() + elems := l.Elements() + optIndices := l.OptionalIndices() + if len(optIndices) == 0 { + return + } + updatedElems := []ast.Expr{} + updatedIndices := []int32{} + newOptIndex := -1 + for _, e := range elems { + newOptIndex++ + if !l.IsOptional(int32(newOptIndex)) { + updatedElems = append(updatedElems, e) + continue + } + if e.Kind() != ast.LiteralKind { + updatedElems = append(updatedElems, e) + updatedIndices = append(updatedIndices, int32(newOptIndex)) + continue + } + optElemVal, ok := e.AsLiteral().(*types.Optional) + if !ok { + updatedElems = append(updatedElems, e) + updatedIndices = append(updatedIndices, int32(newOptIndex)) + continue + } + if !optElemVal.HasValue() { + newOptIndex-- // Skipping causes the list to get smaller. + continue + } + ctx.UpdateExpr(e, ctx.NewLiteral(optElemVal.GetValue())) + updatedElems = append(updatedElems, e) + } + ctx.UpdateExpr(e, ctx.NewList(updatedElems, updatedIndices)) +} + +func pruneOptionalMapEntries(ctx *OptimizerContext, e ast.Expr) { + m := e.AsMap() + entries := m.Entries() + updatedEntries := []ast.EntryExpr{} + modified := false + for _, e := range entries { + entry := e.AsMapEntry() + key := entry.Key() + val := entry.Value() + // If the entry is not optional, or the value-side of the optional hasn't + // been resolved to a literal, then preserve the entry as-is. + if !entry.IsOptional() || val.Kind() != ast.LiteralKind { + updatedEntries = append(updatedEntries, e) + continue + } + optElemVal, ok := val.AsLiteral().(*types.Optional) + if !ok { + updatedEntries = append(updatedEntries, e) + continue + } + // When the key is not a literal, but the value is, then it needs to be + // restored to an optional value. + if key.Kind() != ast.LiteralKind { + undoOptVal, err := adaptLiteral(ctx, optElemVal) + if err != nil { + ctx.ReportErrorAtID(val.ID(), "invalid map value literal %v: %v", optElemVal, err) + } + ctx.UpdateExpr(val, undoOptVal) + updatedEntries = append(updatedEntries, e) + continue + } + modified = true + if !optElemVal.HasValue() { + continue + } + ctx.UpdateExpr(val, ctx.NewLiteral(optElemVal.GetValue())) + updatedEntry := ctx.NewMapEntry(key, val, false) + updatedEntries = append(updatedEntries, updatedEntry) + } + if modified { + ctx.UpdateExpr(e, ctx.NewMap(updatedEntries)) + } +} + +func pruneOptionalStructFields(ctx *OptimizerContext, e ast.Expr) { + s := e.AsStruct() + fields := s.Fields() + updatedFields := []ast.EntryExpr{} + modified := false + for _, f := range fields { + field := f.AsStructField() + val := field.Value() + if !field.IsOptional() || val.Kind() != ast.LiteralKind { + updatedFields = append(updatedFields, f) + continue + } + optElemVal, ok := val.AsLiteral().(*types.Optional) + if !ok { + updatedFields = append(updatedFields, f) + continue + } + modified = true + if !optElemVal.HasValue() { + continue + } + ctx.UpdateExpr(val, ctx.NewLiteral(optElemVal.GetValue())) + updatedField := ctx.NewStructField(field.Name(), val, false) + updatedFields = append(updatedFields, updatedField) + } + if modified { + ctx.UpdateExpr(e, ctx.NewStruct(s.TypeName(), updatedFields)) + } +} + +// adaptLiteral converts a runtime CEL value to its equivalent literal expression. +// +// For strongly typed values, the type-provider will be used to reconstruct the fields +// which are present in the literal and their equivalent initialization values. +func adaptLiteral(ctx *OptimizerContext, val ref.Val) (ast.Expr, error) { + switch t := val.Type().(type) { + case *types.Type: + switch t { + case types.BoolType, types.BytesType, types.DoubleType, types.IntType, + types.NullType, types.StringType, types.UintType: + return ctx.NewLiteral(val), nil + case types.DurationType: + return ctx.NewCall( + overloads.TypeConvertDuration, + ctx.NewLiteral(val.ConvertToType(types.StringType)), + ), nil + case types.TimestampType: + return ctx.NewCall( + overloads.TypeConvertTimestamp, + ctx.NewLiteral(val.ConvertToType(types.StringType)), + ), nil + case types.OptionalType: + opt := val.(*types.Optional) + if !opt.HasValue() { + return ctx.NewCall("optional.none"), nil + } + target, err := adaptLiteral(ctx, opt.GetValue()) + if err != nil { + return nil, err + } + return ctx.NewCall("optional.of", target), nil + case types.TypeType: + return ctx.NewIdent(val.(*types.Type).TypeName()), nil + case types.ListType: + l, ok := val.(traits.Lister) + if !ok { + return nil, fmt.Errorf("failed to adapt %v to literal", val) + } + elems := make([]ast.Expr, l.Size().(types.Int)) + idx := 0 + it := l.Iterator() + for it.HasNext() == types.True { + elemVal := it.Next() + elemExpr, err := adaptLiteral(ctx, elemVal) + if err != nil { + return nil, err + } + elems[idx] = elemExpr + idx++ + } + return ctx.NewList(elems, []int32{}), nil + case types.MapType: + m, ok := val.(traits.Mapper) + if !ok { + return nil, fmt.Errorf("failed to adapt %v to literal", val) + } + entries := make([]ast.EntryExpr, m.Size().(types.Int)) + idx := 0 + it := m.Iterator() + for it.HasNext() == types.True { + keyVal := it.Next() + keyExpr, err := adaptLiteral(ctx, keyVal) + if err != nil { + return nil, err + } + valVal := m.Get(keyVal) + valExpr, err := adaptLiteral(ctx, valVal) + if err != nil { + return nil, err + } + entries[idx] = ctx.NewMapEntry(keyExpr, valExpr, false) + idx++ + } + return ctx.NewMap(entries), nil + default: + provider := ctx.CELTypeProvider() + fields, found := provider.FindStructFieldNames(t.TypeName()) + if !found { + return nil, fmt.Errorf("failed to adapt %v to literal", val) + } + tester := val.(traits.FieldTester) + indexer := val.(traits.Indexer) + fieldInits := []ast.EntryExpr{} + for _, f := range fields { + field := types.String(f) + if tester.IsSet(field) != types.True { + continue + } + fieldVal := indexer.Get(field) + fieldExpr, err := adaptLiteral(ctx, fieldVal) + if err != nil { + return nil, err + } + fieldInits = append(fieldInits, ctx.NewStructField(f, fieldExpr, false)) + } + return ctx.NewStruct(t.TypeName(), fieldInits), nil + } + } + return nil, fmt.Errorf("failed to adapt %v to literal", val) +} + +// constantExprMatcher matches calls, select statements, and comprehensions whose arguments +// are all constant scalar or aggregate literal values. +// +// Only comprehensions which are not nested are included as possible constant folds, and only +// if all variables referenced in the comprehension stack exist are only iteration or +// accumulation variables. +func constantExprMatcher(e ast.NavigableExpr) bool { + switch e.Kind() { + case ast.CallKind: + return constantCallMatcher(e) + case ast.SelectKind: + sel := e.AsSelect() // guaranteed to be a navigable value + return constantMatcher(sel.Operand().(ast.NavigableExpr)) + case ast.ComprehensionKind: + if isNestedComprehension(e) { + return false + } + vars := map[string]bool{} + constantExprs := true + visitor := ast.NewExprVisitor(func(e ast.Expr) { + if e.Kind() == ast.ComprehensionKind { + nested := e.AsComprehension() + vars[nested.AccuVar()] = true + vars[nested.IterVar()] = true + } + if e.Kind() == ast.IdentKind && !vars[e.AsIdent()] { + constantExprs = false + } + }) + ast.PreOrderVisit(e, visitor) + return constantExprs + default: + return false + } +} + +// constantCallMatcher identifies strict and non-strict calls which can be folded. +func constantCallMatcher(e ast.NavigableExpr) bool { + call := e.AsCall() + children := e.Children() + fnName := call.FunctionName() + if fnName == operators.LogicalAnd { + for _, child := range children { + if child.Kind() == ast.LiteralKind { + return true + } + } + } + if fnName == operators.LogicalOr { + for _, child := range children { + if child.Kind() == ast.LiteralKind { + return true + } + } + } + if fnName == operators.Conditional { + cond := children[0] + if cond.Kind() == ast.LiteralKind && cond.AsLiteral().Type() == types.BoolType { + return true + } + } + if fnName == operators.In { + haystack := children[1] + if haystack.Kind() == ast.ListKind && haystack.AsList().Size() == 0 { + return true + } + needle := children[0] + if needle.Kind() == ast.LiteralKind && haystack.Kind() == ast.ListKind { + needleValue := needle.AsLiteral() + list := haystack.AsList() + for _, e := range list.Elements() { + if e.Kind() == ast.LiteralKind && e.AsLiteral().Equal(needleValue) == types.True { + return true + } + } + } + } + // convert all other calls with constant arguments + for _, child := range children { + if !constantMatcher(child) { + return false + } + } + return true +} + +func isNestedComprehension(e ast.NavigableExpr) bool { + parent, found := e.Parent() + for found { + if parent.Kind() == ast.ComprehensionKind { + return true + } + parent, found = parent.Parent() + } + return false +} + +func aggregateLiteralMatcher(e ast.NavigableExpr) bool { + return e.Kind() == ast.ListKind || e.Kind() == ast.MapKind || e.Kind() == ast.StructKind +} + +var ( + constantMatcher = ast.ConstantValueMatcher() +) + +const ( + defaultMaxConstantFoldIterations = 100 +) diff --git a/vendor/github.com/google/cel-go/cel/inlining.go b/vendor/github.com/google/cel-go/cel/inlining.go new file mode 100644 index 00000000000..78d5bea65b1 --- /dev/null +++ b/vendor/github.com/google/cel-go/cel/inlining.go @@ -0,0 +1,228 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cel + +import ( + "github.com/google/cel-go/common/ast" + "github.com/google/cel-go/common/containers" + "github.com/google/cel-go/common/operators" + "github.com/google/cel-go/common/overloads" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/traits" +) + +// InlineVariable holds a variable name to be matched and an AST representing +// the expression graph which should be used to replace it. +type InlineVariable struct { + name string + alias string + def *ast.AST +} + +// Name returns the qualified variable or field selection to replace. +func (v *InlineVariable) Name() string { + return v.name +} + +// Alias returns the alias to use when performing cel.bind() calls during inlining. +func (v *InlineVariable) Alias() string { + return v.alias +} + +// Expr returns the inlined expression value. +func (v *InlineVariable) Expr() ast.Expr { + return v.def.Expr() +} + +// Type indicates the inlined expression type. +func (v *InlineVariable) Type() *Type { + return v.def.GetType(v.def.Expr().ID()) +} + +// NewInlineVariable declares a variable name to be replaced by a checked expression. +func NewInlineVariable(name string, definition *Ast) *InlineVariable { + return NewInlineVariableWithAlias(name, name, definition) +} + +// NewInlineVariableWithAlias declares a variable name to be replaced by a checked expression. +// If the variable occurs more than once, the provided alias will be used to replace the expressions +// where the variable name occurs. +func NewInlineVariableWithAlias(name, alias string, definition *Ast) *InlineVariable { + return &InlineVariable{name: name, alias: alias, def: definition.impl} +} + +// NewInliningOptimizer creates and optimizer which replaces variables with expression definitions. +// +// If a variable occurs one time, the variable is replaced by the inline definition. If the +// variable occurs more than once, the variable occurences are replaced by a cel.bind() call. +func NewInliningOptimizer(inlineVars ...*InlineVariable) ASTOptimizer { + return &inliningOptimizer{variables: inlineVars} +} + +type inliningOptimizer struct { + variables []*InlineVariable +} + +func (opt *inliningOptimizer) Optimize(ctx *OptimizerContext, a *ast.AST) *ast.AST { + root := ast.NavigateAST(a) + for _, inlineVar := range opt.variables { + matches := ast.MatchDescendants(root, opt.matchVariable(inlineVar.Name())) + // Skip cases where the variable isn't in the expression graph + if len(matches) == 0 { + continue + } + + // For a single match, do a direct replacement of the expression sub-graph. + if len(matches) == 1 || !isBindable(matches, inlineVar.Expr(), inlineVar.Type()) { + for _, match := range matches { + // Copy the inlined AST expr and source info. + copyExpr := ctx.CopyASTAndMetadata(inlineVar.def) + opt.inlineExpr(ctx, match, copyExpr, inlineVar.Type()) + } + continue + } + + // For multiple matches, find the least common ancestor (lca) and insert the + // variable as a cel.bind() macro. + var lca ast.NavigableExpr = root + lcaAncestorCount := 0 + ancestors := map[int64]int{} + for _, match := range matches { + // Update the identifier matches with the provided alias. + parent, found := match, true + for found { + ancestorCount, hasAncestor := ancestors[parent.ID()] + if !hasAncestor { + ancestors[parent.ID()] = 1 + parent, found = parent.Parent() + continue + } + if lcaAncestorCount < ancestorCount || (lcaAncestorCount == ancestorCount && lca.Depth() < parent.Depth()) { + lca = parent + lcaAncestorCount = ancestorCount + } + ancestors[parent.ID()] = ancestorCount + 1 + parent, found = parent.Parent() + } + aliasExpr := ctx.NewIdent(inlineVar.Alias()) + opt.inlineExpr(ctx, match, aliasExpr, inlineVar.Type()) + } + + // Copy the inlined AST expr and source info. + copyExpr := ctx.CopyASTAndMetadata(inlineVar.def) + // Update the least common ancestor by inserting a cel.bind() call to the alias. + inlined, bindMacro := ctx.NewBindMacro(lca.ID(), inlineVar.Alias(), copyExpr, lca) + opt.inlineExpr(ctx, lca, inlined, inlineVar.Type()) + ctx.SetMacroCall(lca.ID(), bindMacro) + } + return a +} + +// inlineExpr replaces the current expression with the inlined one, unless the location of the inlining +// happens within a presence test, e.g. has(a.b.c) -> inline alpha for a.b.c in which case an attempt is +// made to determine whether the inlined value can be presence or existence tested. +func (opt *inliningOptimizer) inlineExpr(ctx *OptimizerContext, prev ast.NavigableExpr, inlined ast.Expr, inlinedType *Type) { + switch prev.Kind() { + case ast.SelectKind: + sel := prev.AsSelect() + if !sel.IsTestOnly() { + ctx.UpdateExpr(prev, inlined) + return + } + opt.rewritePresenceExpr(ctx, prev, inlined, inlinedType) + default: + ctx.UpdateExpr(prev, inlined) + } +} + +// rewritePresenceExpr converts the inlined expression, when it occurs within a has() macro, to type-safe +// expression appropriate for the inlined type, if possible. +// +// If the rewrite is not possible an error is reported at the inline expression site. +func (opt *inliningOptimizer) rewritePresenceExpr(ctx *OptimizerContext, prev, inlined ast.Expr, inlinedType *Type) { + // If the input inlined expression is not a select expression it won't work with the has() + // macro. Attempt to rewrite the presence test in terms of the typed input, otherwise error. + if inlined.Kind() == ast.SelectKind { + presenceTest, hasMacro := ctx.NewHasMacro(prev.ID(), inlined) + ctx.UpdateExpr(prev, presenceTest) + ctx.SetMacroCall(prev.ID(), hasMacro) + return + } + + ctx.ClearMacroCall(prev.ID()) + if inlinedType.IsAssignableType(NullType) { + ctx.UpdateExpr(prev, + ctx.NewCall(operators.NotEquals, + inlined, + ctx.NewLiteral(types.NullValue), + )) + return + } + if inlinedType.HasTrait(traits.SizerType) { + ctx.UpdateExpr(prev, + ctx.NewCall(operators.NotEquals, + ctx.NewMemberCall(overloads.Size, inlined), + ctx.NewLiteral(types.IntZero), + )) + return + } + ctx.ReportErrorAtID(prev.ID(), "unable to inline expression type %v into presence test", inlinedType) +} + +// isBindable indicates whether the inlined type can be used within a cel.bind() if the expression +// being replaced occurs within a presence test. Value types with a size() method or field selection +// support can be bound. +// +// In future iterations, support may also be added for indexer types which can be rewritten as an `in` +// expression; however, this would imply a rewrite of the inlined expression that may not be necessary +// in most cases. +func isBindable(matches []ast.NavigableExpr, inlined ast.Expr, inlinedType *Type) bool { + if inlinedType.IsAssignableType(NullType) || + inlinedType.HasTrait(traits.SizerType) { + return true + } + for _, m := range matches { + if m.Kind() != ast.SelectKind { + continue + } + sel := m.AsSelect() + if sel.IsTestOnly() { + return false + } + } + return true +} + +// matchVariable matches simple identifiers, select expressions, and presence test expressions +// which match the (potentially) qualified variable name provided as input. +// +// Note, this function does not support inlining against select expressions which includes optional +// field selection. This may be a future refinement. +func (opt *inliningOptimizer) matchVariable(varName string) ast.ExprMatcher { + return func(e ast.NavigableExpr) bool { + if e.Kind() == ast.IdentKind && e.AsIdent() == varName { + return true + } + if e.Kind() == ast.SelectKind { + sel := e.AsSelect() + // While the `ToQualifiedName` call could take the select directly, this + // would skip presence tests from possible matches, which we would like + // to include. + qualName, found := containers.ToQualifiedName(sel.Operand()) + return found && qualName+"."+sel.FieldName() == varName + } + return false + } +} diff --git a/vendor/github.com/google/cel-go/cel/io.go b/vendor/github.com/google/cel-go/cel/io.go index 80f63140e30..3133fb9d7d6 100644 --- a/vendor/github.com/google/cel-go/cel/io.go +++ b/vendor/github.com/google/cel-go/cel/io.go @@ -47,17 +47,11 @@ func CheckedExprToAst(checkedExpr *exprpb.CheckedExpr) *Ast { // // Prefer CheckedExprToAst if loading expressions from storage. func CheckedExprToAstWithSource(checkedExpr *exprpb.CheckedExpr, src Source) (*Ast, error) { - checkedAST, err := ast.CheckedExprToCheckedAST(checkedExpr) + checked, err := ast.ToAST(checkedExpr) if err != nil { return nil, err } - return &Ast{ - expr: checkedAST.Expr, - info: checkedAST.SourceInfo, - source: src, - refMap: checkedAST.ReferenceMap, - typeMap: checkedAST.TypeMap, - }, nil + return &Ast{source: src, impl: checked}, nil } // AstToCheckedExpr converts an Ast to an protobuf CheckedExpr value. @@ -67,13 +61,7 @@ func AstToCheckedExpr(a *Ast) (*exprpb.CheckedExpr, error) { if !a.IsChecked() { return nil, fmt.Errorf("cannot convert unchecked ast") } - cAst := &ast.CheckedAST{ - Expr: a.expr, - SourceInfo: a.info, - ReferenceMap: a.refMap, - TypeMap: a.typeMap, - } - return ast.CheckedASTToCheckedExpr(cAst) + return ast.ToProto(a.impl) } // ParsedExprToAst converts a parsed expression proto message to an Ast. @@ -89,18 +77,12 @@ func ParsedExprToAst(parsedExpr *exprpb.ParsedExpr) *Ast { // // Prefer ParsedExprToAst if loading expressions from storage. func ParsedExprToAstWithSource(parsedExpr *exprpb.ParsedExpr, src Source) *Ast { - si := parsedExpr.GetSourceInfo() - if si == nil { - si = &exprpb.SourceInfo{} - } + info, _ := ast.ProtoToSourceInfo(parsedExpr.GetSourceInfo()) if src == nil { - src = common.NewInfoSource(si) - } - return &Ast{ - expr: parsedExpr.GetExpr(), - info: si, - source: src, + src = common.NewInfoSource(parsedExpr.GetSourceInfo()) } + e, _ := ast.ProtoToExpr(parsedExpr.GetExpr()) + return &Ast{source: src, impl: ast.NewAST(e, info)} } // AstToParsedExpr converts an Ast to an protobuf ParsedExpr value. @@ -116,9 +98,7 @@ func AstToParsedExpr(a *Ast) (*exprpb.ParsedExpr, error) { // Note, the conversion may not be an exact replica of the original expression, but will produce // a string that is semantically equivalent and whose textual representation is stable. func AstToString(a *Ast) (string, error) { - expr := a.Expr() - info := a.SourceInfo() - return parser.Unparse(expr, info) + return parser.Unparse(a.impl.Expr(), a.impl.SourceInfo()) } // RefValueToValue converts between ref.Val and api.expr.Value. diff --git a/vendor/github.com/google/cel-go/cel/library.go b/vendor/github.com/google/cel-go/cel/library.go index 4d232085c24..deddc14e59a 100644 --- a/vendor/github.com/google/cel-go/cel/library.go +++ b/vendor/github.com/google/cel-go/cel/library.go @@ -20,6 +20,7 @@ import ( "strings" "time" + "github.com/google/cel-go/common/ast" "github.com/google/cel-go/common/operators" "github.com/google/cel-go/common/overloads" "github.com/google/cel-go/common/stdlib" @@ -28,8 +29,6 @@ import ( "github.com/google/cel-go/common/types/traits" "github.com/google/cel-go/interpreter" "github.com/google/cel-go/parser" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" ) const ( @@ -313,7 +312,7 @@ func (lib *optionalLib) CompileOptions() []EnvOption { Types(types.OptionalType), // Configure the optMap and optFlatMap macros. - Macros(NewReceiverMacro(optMapMacro, 2, optMap)), + Macros(ReceiverMacro(optMapMacro, 2, optMap)), // Global and member functions for working with optional values. Function(optionalOfFunc, @@ -374,7 +373,7 @@ func (lib *optionalLib) CompileOptions() []EnvOption { Overload("optional_map_index_value", []*Type{OptionalType(mapTypeKV), paramTypeK}, optionalTypeV)), } if lib.version >= 1 { - opts = append(opts, Macros(NewReceiverMacro(optFlatMapMacro, 2, optFlatMap))) + opts = append(opts, Macros(ReceiverMacro(optFlatMapMacro, 2, optFlatMap))) } return opts } @@ -386,57 +385,57 @@ func (lib *optionalLib) ProgramOptions() []ProgramOption { } } -func optMap(meh MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *Error) { +func optMap(meh MacroExprFactory, target ast.Expr, args []ast.Expr) (ast.Expr, *Error) { varIdent := args[0] varName := "" - switch varIdent.GetExprKind().(type) { - case *exprpb.Expr_IdentExpr: - varName = varIdent.GetIdentExpr().GetName() + switch varIdent.Kind() { + case ast.IdentKind: + varName = varIdent.AsIdent() default: - return nil, meh.NewError(varIdent.GetId(), "optMap() variable name must be a simple identifier") + return nil, meh.NewError(varIdent.ID(), "optMap() variable name must be a simple identifier") } mapExpr := args[1] - return meh.GlobalCall( + return meh.NewCall( operators.Conditional, - meh.ReceiverCall(hasValueFunc, target), - meh.GlobalCall(optionalOfFunc, - meh.Fold( - unusedIterVar, + meh.NewMemberCall(hasValueFunc, target), + meh.NewCall(optionalOfFunc, + meh.NewComprehension( meh.NewList(), + unusedIterVar, varName, - meh.ReceiverCall(valueFunc, target), - meh.LiteralBool(false), - meh.Ident(varName), + meh.NewMemberCall(valueFunc, target), + meh.NewLiteral(types.False), + meh.NewIdent(varName), mapExpr, ), ), - meh.GlobalCall(optionalNoneFunc), + meh.NewCall(optionalNoneFunc), ), nil } -func optFlatMap(meh MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *Error) { +func optFlatMap(meh MacroExprFactory, target ast.Expr, args []ast.Expr) (ast.Expr, *Error) { varIdent := args[0] varName := "" - switch varIdent.GetExprKind().(type) { - case *exprpb.Expr_IdentExpr: - varName = varIdent.GetIdentExpr().GetName() + switch varIdent.Kind() { + case ast.IdentKind: + varName = varIdent.AsIdent() default: - return nil, meh.NewError(varIdent.GetId(), "optFlatMap() variable name must be a simple identifier") + return nil, meh.NewError(varIdent.ID(), "optFlatMap() variable name must be a simple identifier") } mapExpr := args[1] - return meh.GlobalCall( + return meh.NewCall( operators.Conditional, - meh.ReceiverCall(hasValueFunc, target), - meh.Fold( - unusedIterVar, + meh.NewMemberCall(hasValueFunc, target), + meh.NewComprehension( meh.NewList(), + unusedIterVar, varName, - meh.ReceiverCall(valueFunc, target), - meh.LiteralBool(false), - meh.Ident(varName), + meh.NewMemberCall(valueFunc, target), + meh.NewLiteral(types.False), + meh.NewIdent(varName), mapExpr, ), - meh.GlobalCall(optionalNoneFunc), + meh.NewCall(optionalNoneFunc), ), nil } diff --git a/vendor/github.com/google/cel-go/cel/macro.go b/vendor/github.com/google/cel-go/cel/macro.go index 1eb414c8be4..4db1fd57a9c 100644 --- a/vendor/github.com/google/cel-go/cel/macro.go +++ b/vendor/github.com/google/cel-go/cel/macro.go @@ -15,6 +15,11 @@ package cel import ( + "fmt" + + "github.com/google/cel-go/common" + "github.com/google/cel-go/common/ast" + "github.com/google/cel-go/common/types" "github.com/google/cel-go/parser" exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" @@ -26,7 +31,14 @@ import ( // a Macro should be created per arg-count or as a var arg macro. type Macro = parser.Macro -// MacroExpander converts a call and its associated arguments into a new CEL abstract syntax tree. +// MacroFactory defines an expansion function which converts a call and its arguments to a cel.Expr value. +type MacroFactory = parser.MacroExpander + +// MacroExprFactory assists with the creation of Expr values in a manner which is consistent +// the internal semantics and id generation behaviors of the parser and checker libraries. +type MacroExprFactory = parser.ExprHelper + +// MacroExpander converts a call and its associated arguments into a protobuf Expr representation. // // If the MacroExpander determines within the implementation that an expansion is not needed it may return // a nil Expr value to indicate a non-match. However, if an expansion is to be performed, but the arguments @@ -36,48 +48,197 @@ type Macro = parser.Macro // and produces as output an Expr ast node. // // Note: when the Macro.IsReceiverStyle() method returns true, the target argument will be nil. -type MacroExpander = parser.MacroExpander +type MacroExpander func(eh MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *Error) // MacroExprHelper exposes helper methods for creating new expressions within a CEL abstract syntax tree. -type MacroExprHelper = parser.ExprHelper +// ExprHelper assists with the manipulation of proto-based Expr values in a manner which is +// consistent with the source position and expression id generation code leveraged by both +// the parser and type-checker. +type MacroExprHelper interface { + // Copy the input expression with a brand new set of identifiers. + Copy(*exprpb.Expr) *exprpb.Expr + + // LiteralBool creates an Expr value for a bool literal. + LiteralBool(value bool) *exprpb.Expr + + // LiteralBytes creates an Expr value for a byte literal. + LiteralBytes(value []byte) *exprpb.Expr + + // LiteralDouble creates an Expr value for double literal. + LiteralDouble(value float64) *exprpb.Expr + + // LiteralInt creates an Expr value for an int literal. + LiteralInt(value int64) *exprpb.Expr + + // LiteralString creates am Expr value for a string literal. + LiteralString(value string) *exprpb.Expr + + // LiteralUint creates an Expr value for a uint literal. + LiteralUint(value uint64) *exprpb.Expr + + // NewList creates a CreateList instruction where the list is comprised of the optional set + // of elements provided as arguments. + NewList(elems ...*exprpb.Expr) *exprpb.Expr + + // NewMap creates a CreateStruct instruction for a map where the map is comprised of the + // optional set of key, value entries. + NewMap(entries ...*exprpb.Expr_CreateStruct_Entry) *exprpb.Expr + + // NewMapEntry creates a Map Entry for the key, value pair. + NewMapEntry(key *exprpb.Expr, val *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry + + // NewObject creates a CreateStruct instruction for an object with a given type name and + // optional set of field initializers. + NewObject(typeName string, fieldInits ...*exprpb.Expr_CreateStruct_Entry) *exprpb.Expr + + // NewObjectFieldInit creates a new Object field initializer from the field name and value. + NewObjectFieldInit(field string, init *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry + + // Fold creates a fold comprehension instruction. + // + // - iterVar is the iteration variable name. + // - iterRange represents the expression that resolves to a list or map where the elements or + // keys (respectively) will be iterated over. + // - accuVar is the accumulation variable name, typically parser.AccumulatorName. + // - accuInit is the initial expression whose value will be set for the accuVar prior to + // folding. + // - condition is the expression to test to determine whether to continue folding. + // - step is the expression to evaluation at the conclusion of a single fold iteration. + // - result is the computation to evaluate at the conclusion of the fold. + // + // The accuVar should not shadow variable names that you would like to reference within the + // environment in the step and condition expressions. Presently, the name __result__ is commonly + // used by built-in macros but this may change in the future. + Fold(iterVar string, + iterRange *exprpb.Expr, + accuVar string, + accuInit *exprpb.Expr, + condition *exprpb.Expr, + step *exprpb.Expr, + result *exprpb.Expr) *exprpb.Expr + + // Ident creates an identifier Expr value. + Ident(name string) *exprpb.Expr + + // AccuIdent returns an accumulator identifier for use with comprehension results. + AccuIdent() *exprpb.Expr + + // GlobalCall creates a function call Expr value for a global (free) function. + GlobalCall(function string, args ...*exprpb.Expr) *exprpb.Expr + + // ReceiverCall creates a function call Expr value for a receiver-style function. + ReceiverCall(function string, target *exprpb.Expr, args ...*exprpb.Expr) *exprpb.Expr + + // PresenceTest creates a Select TestOnly Expr value for modelling has() semantics. + PresenceTest(operand *exprpb.Expr, field string) *exprpb.Expr + + // Select create a field traversal Expr value. + Select(operand *exprpb.Expr, field string) *exprpb.Expr + + // OffsetLocation returns the Location of the expression identifier. + OffsetLocation(exprID int64) common.Location + + // NewError associates an error message with a given expression id. + NewError(exprID int64, message string) *Error +} + +// GlobalMacro creates a Macro for a global function with the specified arg count. +func GlobalMacro(function string, argCount int, factory MacroFactory) Macro { + return parser.NewGlobalMacro(function, argCount, factory) +} + +// ReceiverMacro creates a Macro for a receiver function matching the specified arg count. +func ReceiverMacro(function string, argCount int, factory MacroFactory) Macro { + return parser.NewReceiverMacro(function, argCount, factory) +} + +// GlobalVarArgMacro creates a Macro for a global function with a variable arg count. +func GlobalVarArgMacro(function string, factory MacroFactory) Macro { + return parser.NewGlobalVarArgMacro(function, factory) +} + +// ReceiverVarArgMacro creates a Macro for a receiver function matching a variable arg count. +func ReceiverVarArgMacro(function string, factory MacroFactory) Macro { + return parser.NewReceiverVarArgMacro(function, factory) +} // NewGlobalMacro creates a Macro for a global function with the specified arg count. +// +// Deprecated: use GlobalMacro func NewGlobalMacro(function string, argCount int, expander MacroExpander) Macro { - return parser.NewGlobalMacro(function, argCount, expander) + expand := adaptingExpander{expander} + return parser.NewGlobalMacro(function, argCount, expand.Expander) } // NewReceiverMacro creates a Macro for a receiver function matching the specified arg count. +// +// Deprecated: use ReceiverMacro func NewReceiverMacro(function string, argCount int, expander MacroExpander) Macro { - return parser.NewReceiverMacro(function, argCount, expander) + expand := adaptingExpander{expander} + return parser.NewReceiverMacro(function, argCount, expand.Expander) } // NewGlobalVarArgMacro creates a Macro for a global function with a variable arg count. +// +// Deprecated: use GlobalVarArgMacro func NewGlobalVarArgMacro(function string, expander MacroExpander) Macro { - return parser.NewGlobalVarArgMacro(function, expander) + expand := adaptingExpander{expander} + return parser.NewGlobalVarArgMacro(function, expand.Expander) } // NewReceiverVarArgMacro creates a Macro for a receiver function matching a variable arg count. +// +// Deprecated: use ReceiverVarArgMacro func NewReceiverVarArgMacro(function string, expander MacroExpander) Macro { - return parser.NewReceiverVarArgMacro(function, expander) + expand := adaptingExpander{expander} + return parser.NewReceiverVarArgMacro(function, expand.Expander) } // HasMacroExpander expands the input call arguments into a presence test, e.g. has(.field) func HasMacroExpander(meh MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *Error) { - return parser.MakeHas(meh, target, args) + ph, err := toParserHelper(meh) + if err != nil { + return nil, err + } + arg, err := adaptToExpr(args[0]) + if err != nil { + return nil, err + } + if arg.Kind() == ast.SelectKind { + s := arg.AsSelect() + return adaptToProto(ph.NewPresenceTest(s.Operand(), s.FieldName())) + } + return nil, ph.NewError(arg.ID(), "invalid argument to has() macro") } // ExistsMacroExpander expands the input call arguments into a comprehension that returns true if any of the // elements in the range match the predicate expressions: // .exists(, ) func ExistsMacroExpander(meh MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *Error) { - return parser.MakeExists(meh, target, args) + ph, err := toParserHelper(meh) + if err != nil { + return nil, err + } + out, err := parser.MakeExists(ph, mustAdaptToExpr(target), mustAdaptToExprs(args)) + if err != nil { + return nil, err + } + return adaptToProto(out) } // ExistsOneMacroExpander expands the input call arguments into a comprehension that returns true if exactly // one of the elements in the range match the predicate expressions: // .exists_one(, ) func ExistsOneMacroExpander(meh MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *Error) { - return parser.MakeExistsOne(meh, target, args) + ph, err := toParserHelper(meh) + if err != nil { + return nil, err + } + out, err := parser.MakeExistsOne(ph, mustAdaptToExpr(target), mustAdaptToExprs(args)) + if err != nil { + return nil, err + } + return adaptToProto(out) } // MapMacroExpander expands the input call arguments into a comprehension that transforms each element in the @@ -91,14 +252,30 @@ func ExistsOneMacroExpander(meh MacroExprHelper, target *exprpb.Expr, args []*ex // In the second form only iterVar values which return true when provided to the predicate expression // are transformed. func MapMacroExpander(meh MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *Error) { - return parser.MakeMap(meh, target, args) + ph, err := toParserHelper(meh) + if err != nil { + return nil, err + } + out, err := parser.MakeMap(ph, mustAdaptToExpr(target), mustAdaptToExprs(args)) + if err != nil { + return nil, err + } + return adaptToProto(out) } // FilterMacroExpander expands the input call arguments into a comprehension which produces a list which contains // only elements which match the provided predicate expression: // .filter(, ) func FilterMacroExpander(meh MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *Error) { - return parser.MakeFilter(meh, target, args) + ph, err := toParserHelper(meh) + if err != nil { + return nil, err + } + out, err := parser.MakeFilter(ph, mustAdaptToExpr(target), mustAdaptToExprs(args)) + if err != nil { + return nil, err + } + return adaptToProto(out) } var ( @@ -142,3 +319,258 @@ var ( // NoMacros provides an alias to an empty list of macros NoMacros = []Macro{} ) + +type adaptingExpander struct { + legacyExpander MacroExpander +} + +func (adapt *adaptingExpander) Expander(eh parser.ExprHelper, target ast.Expr, args []ast.Expr) (ast.Expr, *common.Error) { + var legacyTarget *exprpb.Expr = nil + var err *Error = nil + if target != nil { + legacyTarget, err = adaptToProto(target) + if err != nil { + return nil, err + } + } + legacyArgs := make([]*exprpb.Expr, len(args)) + for i, arg := range args { + legacyArgs[i], err = adaptToProto(arg) + if err != nil { + return nil, err + } + } + ah := &adaptingHelper{modernHelper: eh} + legacyExpr, err := adapt.legacyExpander(ah, legacyTarget, legacyArgs) + if err != nil { + return nil, err + } + ex, err := adaptToExpr(legacyExpr) + if err != nil { + return nil, err + } + return ex, nil +} + +func wrapErr(id int64, message string, err error) *common.Error { + return &common.Error{ + Location: common.NoLocation, + Message: fmt.Sprintf("%s: %v", message, err), + ExprID: id, + } +} + +type adaptingHelper struct { + modernHelper parser.ExprHelper +} + +// Copy the input expression with a brand new set of identifiers. +func (ah *adaptingHelper) Copy(e *exprpb.Expr) *exprpb.Expr { + return mustAdaptToProto(ah.modernHelper.Copy(mustAdaptToExpr(e))) +} + +// LiteralBool creates an Expr value for a bool literal. +func (ah *adaptingHelper) LiteralBool(value bool) *exprpb.Expr { + return mustAdaptToProto(ah.modernHelper.NewLiteral(types.Bool(value))) +} + +// LiteralBytes creates an Expr value for a byte literal. +func (ah *adaptingHelper) LiteralBytes(value []byte) *exprpb.Expr { + return mustAdaptToProto(ah.modernHelper.NewLiteral(types.Bytes(value))) +} + +// LiteralDouble creates an Expr value for double literal. +func (ah *adaptingHelper) LiteralDouble(value float64) *exprpb.Expr { + return mustAdaptToProto(ah.modernHelper.NewLiteral(types.Double(value))) +} + +// LiteralInt creates an Expr value for an int literal. +func (ah *adaptingHelper) LiteralInt(value int64) *exprpb.Expr { + return mustAdaptToProto(ah.modernHelper.NewLiteral(types.Int(value))) +} + +// LiteralString creates am Expr value for a string literal. +func (ah *adaptingHelper) LiteralString(value string) *exprpb.Expr { + return mustAdaptToProto(ah.modernHelper.NewLiteral(types.String(value))) +} + +// LiteralUint creates an Expr value for a uint literal. +func (ah *adaptingHelper) LiteralUint(value uint64) *exprpb.Expr { + return mustAdaptToProto(ah.modernHelper.NewLiteral(types.Uint(value))) +} + +// NewList creates a CreateList instruction where the list is comprised of the optional set +// of elements provided as arguments. +func (ah *adaptingHelper) NewList(elems ...*exprpb.Expr) *exprpb.Expr { + return mustAdaptToProto(ah.modernHelper.NewList(mustAdaptToExprs(elems)...)) +} + +// NewMap creates a CreateStruct instruction for a map where the map is comprised of the +// optional set of key, value entries. +func (ah *adaptingHelper) NewMap(entries ...*exprpb.Expr_CreateStruct_Entry) *exprpb.Expr { + adaptedEntries := make([]ast.EntryExpr, len(entries)) + for i, e := range entries { + adaptedEntries[i] = mustAdaptToEntryExpr(e) + } + return mustAdaptToProto(ah.modernHelper.NewMap(adaptedEntries...)) +} + +// NewMapEntry creates a Map Entry for the key, value pair. +func (ah *adaptingHelper) NewMapEntry(key *exprpb.Expr, val *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry { + return mustAdaptToProtoEntry( + ah.modernHelper.NewMapEntry(mustAdaptToExpr(key), mustAdaptToExpr(val), optional)) +} + +// NewObject creates a CreateStruct instruction for an object with a given type name and +// optional set of field initializers. +func (ah *adaptingHelper) NewObject(typeName string, fieldInits ...*exprpb.Expr_CreateStruct_Entry) *exprpb.Expr { + adaptedEntries := make([]ast.EntryExpr, len(fieldInits)) + for i, e := range fieldInits { + adaptedEntries[i] = mustAdaptToEntryExpr(e) + } + return mustAdaptToProto(ah.modernHelper.NewStruct(typeName, adaptedEntries...)) +} + +// NewObjectFieldInit creates a new Object field initializer from the field name and value. +func (ah *adaptingHelper) NewObjectFieldInit(field string, init *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry { + return mustAdaptToProtoEntry( + ah.modernHelper.NewStructField(field, mustAdaptToExpr(init), optional)) +} + +// Fold creates a fold comprehension instruction. +// +// - iterVar is the iteration variable name. +// - iterRange represents the expression that resolves to a list or map where the elements or +// keys (respectively) will be iterated over. +// - accuVar is the accumulation variable name, typically parser.AccumulatorName. +// - accuInit is the initial expression whose value will be set for the accuVar prior to +// folding. +// - condition is the expression to test to determine whether to continue folding. +// - step is the expression to evaluation at the conclusion of a single fold iteration. +// - result is the computation to evaluate at the conclusion of the fold. +// +// The accuVar should not shadow variable names that you would like to reference within the +// environment in the step and condition expressions. Presently, the name __result__ is commonly +// used by built-in macros but this may change in the future. +func (ah *adaptingHelper) Fold(iterVar string, + iterRange *exprpb.Expr, + accuVar string, + accuInit *exprpb.Expr, + condition *exprpb.Expr, + step *exprpb.Expr, + result *exprpb.Expr) *exprpb.Expr { + return mustAdaptToProto( + ah.modernHelper.NewComprehension( + mustAdaptToExpr(iterRange), + iterVar, + accuVar, + mustAdaptToExpr(accuInit), + mustAdaptToExpr(condition), + mustAdaptToExpr(step), + mustAdaptToExpr(result), + ), + ) +} + +// Ident creates an identifier Expr value. +func (ah *adaptingHelper) Ident(name string) *exprpb.Expr { + return mustAdaptToProto(ah.modernHelper.NewIdent(name)) +} + +// AccuIdent returns an accumulator identifier for use with comprehension results. +func (ah *adaptingHelper) AccuIdent() *exprpb.Expr { + return mustAdaptToProto(ah.modernHelper.NewAccuIdent()) +} + +// GlobalCall creates a function call Expr value for a global (free) function. +func (ah *adaptingHelper) GlobalCall(function string, args ...*exprpb.Expr) *exprpb.Expr { + return mustAdaptToProto(ah.modernHelper.NewCall(function, mustAdaptToExprs(args)...)) +} + +// ReceiverCall creates a function call Expr value for a receiver-style function. +func (ah *adaptingHelper) ReceiverCall(function string, target *exprpb.Expr, args ...*exprpb.Expr) *exprpb.Expr { + return mustAdaptToProto( + ah.modernHelper.NewMemberCall(function, mustAdaptToExpr(target), mustAdaptToExprs(args)...)) +} + +// PresenceTest creates a Select TestOnly Expr value for modelling has() semantics. +func (ah *adaptingHelper) PresenceTest(operand *exprpb.Expr, field string) *exprpb.Expr { + op := mustAdaptToExpr(operand) + return mustAdaptToProto(ah.modernHelper.NewPresenceTest(op, field)) +} + +// Select create a field traversal Expr value. +func (ah *adaptingHelper) Select(operand *exprpb.Expr, field string) *exprpb.Expr { + op := mustAdaptToExpr(operand) + return mustAdaptToProto(ah.modernHelper.NewSelect(op, field)) +} + +// OffsetLocation returns the Location of the expression identifier. +func (ah *adaptingHelper) OffsetLocation(exprID int64) common.Location { + return ah.modernHelper.OffsetLocation(exprID) +} + +// NewError associates an error message with a given expression id. +func (ah *adaptingHelper) NewError(exprID int64, message string) *Error { + return ah.modernHelper.NewError(exprID, message) +} + +func mustAdaptToExprs(exprs []*exprpb.Expr) []ast.Expr { + adapted := make([]ast.Expr, len(exprs)) + for i, e := range exprs { + adapted[i] = mustAdaptToExpr(e) + } + return adapted +} + +func mustAdaptToExpr(e *exprpb.Expr) ast.Expr { + out, _ := adaptToExpr(e) + return out +} + +func adaptToExpr(e *exprpb.Expr) (ast.Expr, *Error) { + if e == nil { + return nil, nil + } + out, err := ast.ProtoToExpr(e) + if err != nil { + return nil, wrapErr(e.GetId(), "proto conversion failure", err) + } + return out, nil +} + +func mustAdaptToEntryExpr(e *exprpb.Expr_CreateStruct_Entry) ast.EntryExpr { + out, _ := ast.ProtoToEntryExpr(e) + return out +} + +func mustAdaptToProto(e ast.Expr) *exprpb.Expr { + out, _ := adaptToProto(e) + return out +} + +func adaptToProto(e ast.Expr) (*exprpb.Expr, *Error) { + if e == nil { + return nil, nil + } + out, err := ast.ExprToProto(e) + if err != nil { + return nil, wrapErr(e.ID(), "expr conversion failure", err) + } + return out, nil +} + +func mustAdaptToProtoEntry(e ast.EntryExpr) *exprpb.Expr_CreateStruct_Entry { + out, _ := ast.EntryExprToProto(e) + return out +} + +func toParserHelper(meh MacroExprHelper) (parser.ExprHelper, *Error) { + ah, ok := meh.(*adaptingHelper) + if !ok { + return nil, common.NewError(0, + fmt.Sprintf("unsupported macro helper: %v (%T)", meh, meh), + common.NoLocation) + } + return ah.modernHelper, nil +} diff --git a/vendor/github.com/google/cel-go/cel/optimizer.go b/vendor/github.com/google/cel-go/cel/optimizer.go new file mode 100644 index 00000000000..f26df462344 --- /dev/null +++ b/vendor/github.com/google/cel-go/cel/optimizer.go @@ -0,0 +1,509 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cel + +import ( + "github.com/google/cel-go/common" + "github.com/google/cel-go/common/ast" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" +) + +// StaticOptimizer contains a sequence of ASTOptimizer instances which will be applied in order. +// +// The static optimizer normalizes expression ids and type-checking run between optimization +// passes to ensure that the final optimized output is a valid expression with metadata consistent +// with what would have been generated from a parsed and checked expression. +// +// Note: source position information is best-effort and likely wrong, but optimized expressions +// should be suitable for calls to parser.Unparse. +type StaticOptimizer struct { + optimizers []ASTOptimizer +} + +// NewStaticOptimizer creates a StaticOptimizer with a sequence of ASTOptimizer's to be applied +// to a checked expression. +func NewStaticOptimizer(optimizers ...ASTOptimizer) *StaticOptimizer { + return &StaticOptimizer{ + optimizers: optimizers, + } +} + +// Optimize applies a sequence of optimizations to an Ast within a given environment. +// +// If issues are encountered, the Issues.Err() return value will be non-nil. +func (opt *StaticOptimizer) Optimize(env *Env, a *Ast) (*Ast, *Issues) { + // Make a copy of the AST to be optimized. + optimized := ast.Copy(a.impl) + ids := newIDGenerator(ast.MaxID(a.impl)) + + // Create the optimizer context, could be pooled in the future. + issues := NewIssues(common.NewErrors(a.Source())) + baseFac := ast.NewExprFactory() + exprFac := &optimizerExprFactory{ + idGenerator: ids, + fac: baseFac, + sourceInfo: optimized.SourceInfo(), + } + ctx := &OptimizerContext{ + optimizerExprFactory: exprFac, + Env: env, + Issues: issues, + } + + // Apply the optimizations sequentially. + for _, o := range opt.optimizers { + optimized = o.Optimize(ctx, optimized) + if issues.Err() != nil { + return nil, issues + } + // Normalize expression id metadata including coordination with macro call metadata. + freshIDGen := newIDGenerator(0) + info := optimized.SourceInfo() + expr := optimized.Expr() + normalizeIDs(freshIDGen.renumberStable, expr, info) + cleanupMacroRefs(expr, info) + + // Recheck the updated expression for any possible type-agreement or validation errors. + parsed := &Ast{ + source: a.Source(), + impl: ast.NewAST(expr, info)} + checked, iss := ctx.Check(parsed) + if iss.Err() != nil { + return nil, iss + } + optimized = checked.impl + } + + // Return the optimized result. + return &Ast{ + source: a.Source(), + impl: optimized, + }, nil +} + +// normalizeIDs ensures that the metadata present with an AST is reset in a manner such +// that the ids within the expression correspond to the ids within macros. +func normalizeIDs(idGen ast.IDGenerator, optimized ast.Expr, info *ast.SourceInfo) { + optimized.RenumberIDs(idGen) + + if len(info.MacroCalls()) == 0 { + return + } + + // First, update the macro call ids themselves. + callIDMap := map[int64]int64{} + for id := range info.MacroCalls() { + callIDMap[id] = idGen(id) + } + // Then update the macro call definitions which refer to these ids, but + // ensure that the updates don't collide and remove macro entries which haven't + // been visited / updated yet. + type macroUpdate struct { + id int64 + call ast.Expr + } + macroUpdates := []macroUpdate{} + for oldID, newID := range callIDMap { + call, found := info.GetMacroCall(oldID) + if !found { + continue + } + call.RenumberIDs(idGen) + macroUpdates = append(macroUpdates, macroUpdate{id: newID, call: call}) + info.ClearMacroCall(oldID) + } + for _, u := range macroUpdates { + info.SetMacroCall(u.id, u.call) + } +} + +func cleanupMacroRefs(expr ast.Expr, info *ast.SourceInfo) { + if len(info.MacroCalls()) == 0 { + return + } + // Sanitize the macro call references once the optimized expression has been computed + // and the ids normalized between the expression and the macros. + exprRefMap := make(map[int64]struct{}) + ast.PostOrderVisit(expr, ast.NewExprVisitor(func(e ast.Expr) { + if e.ID() == 0 { + return + } + exprRefMap[e.ID()] = struct{}{} + })) + // Update the macro call id references to ensure that macro pointers are + // updated consistently across macros. + for _, call := range info.MacroCalls() { + ast.PostOrderVisit(call, ast.NewExprVisitor(func(e ast.Expr) { + if e.ID() == 0 { + return + } + exprRefMap[e.ID()] = struct{}{} + })) + } + for id := range info.MacroCalls() { + if _, found := exprRefMap[id]; !found { + info.ClearMacroCall(id) + } + } +} + +// newIDGenerator ensures that new ids are only created the first time they are encountered. +func newIDGenerator(seed int64) *idGenerator { + return &idGenerator{ + idMap: make(map[int64]int64), + seed: seed, + } +} + +type idGenerator struct { + idMap map[int64]int64 + seed int64 +} + +func (gen *idGenerator) nextID() int64 { + gen.seed++ + return gen.seed +} + +func (gen *idGenerator) renumberStable(id int64) int64 { + if id == 0 { + return 0 + } + if newID, found := gen.idMap[id]; found { + return newID + } + nextID := gen.nextID() + gen.idMap[id] = nextID + return nextID +} + +// OptimizerContext embeds Env and Issues instances to make it easy to type-check and evaluate +// subexpressions and report any errors encountered along the way. The context also embeds the +// optimizerExprFactory which can be used to generate new sub-expressions with expression ids +// consistent with the expectations of a parsed expression. +type OptimizerContext struct { + *Env + *optimizerExprFactory + *Issues +} + +// ASTOptimizer applies an optimization over an AST and returns the optimized result. +type ASTOptimizer interface { + // Optimize optimizes a type-checked AST within an Environment and accumulates any issues. + Optimize(*OptimizerContext, *ast.AST) *ast.AST +} + +type optimizerExprFactory struct { + *idGenerator + fac ast.ExprFactory + sourceInfo *ast.SourceInfo +} + +// NewAST creates an AST from the current expression using the tracked source info which +// is modified and managed by the OptimizerContext. +func (opt *optimizerExprFactory) NewAST(expr ast.Expr) *ast.AST { + return ast.NewAST(expr, opt.sourceInfo) +} + +// CopyAST creates a renumbered copy of `Expr` and `SourceInfo` values of the input AST, where the +// renumbering uses the same scheme as the core optimizer logic ensuring there are no collisions +// between copies. +// +// Use this method before attempting to merge the expression from AST into another. +func (opt *optimizerExprFactory) CopyAST(a *ast.AST) (ast.Expr, *ast.SourceInfo) { + idGen := newIDGenerator(opt.nextID()) + defer func() { opt.seed = idGen.nextID() }() + copyExpr := opt.fac.CopyExpr(a.Expr()) + copyInfo := ast.CopySourceInfo(a.SourceInfo()) + normalizeIDs(idGen.renumberStable, copyExpr, copyInfo) + return copyExpr, copyInfo +} + +// CopyASTAndMetadata copies the input AST and propagates the macro metadata into the AST being +// optimized. +func (opt *optimizerExprFactory) CopyASTAndMetadata(a *ast.AST) ast.Expr { + copyExpr, copyInfo := opt.CopyAST(a) + for macroID, call := range copyInfo.MacroCalls() { + opt.SetMacroCall(macroID, call) + } + return copyExpr +} + +// ClearMacroCall clears the macro at the given expression id. +func (opt *optimizerExprFactory) ClearMacroCall(id int64) { + opt.sourceInfo.ClearMacroCall(id) +} + +// SetMacroCall sets the macro call metadata for the given macro id within the tracked source info +// metadata. +func (opt *optimizerExprFactory) SetMacroCall(id int64, expr ast.Expr) { + opt.sourceInfo.SetMacroCall(id, expr) +} + +// NewBindMacro creates an AST expression representing the expanded bind() macro, and a macro expression +// representing the unexpanded call signature to be inserted into the source info macro call metadata. +func (opt *optimizerExprFactory) NewBindMacro(macroID int64, varName string, varInit, remaining ast.Expr) (astExpr, macroExpr ast.Expr) { + varID := opt.nextID() + remainingID := opt.nextID() + remaining = opt.fac.CopyExpr(remaining) + remaining.RenumberIDs(func(id int64) int64 { + if id == macroID { + return remainingID + } + return id + }) + if call, exists := opt.sourceInfo.GetMacroCall(macroID); exists { + opt.SetMacroCall(remainingID, opt.fac.CopyExpr(call)) + } + + astExpr = opt.fac.NewComprehension(macroID, + opt.fac.NewList(opt.nextID(), []ast.Expr{}, []int32{}), + "#unused", + varName, + opt.fac.CopyExpr(varInit), + opt.fac.NewLiteral(opt.nextID(), types.False), + opt.fac.NewIdent(varID, varName), + remaining) + + macroExpr = opt.fac.NewMemberCall(0, "bind", + opt.fac.NewIdent(opt.nextID(), "cel"), + opt.fac.NewIdent(varID, varName), + opt.fac.CopyExpr(varInit), + opt.fac.CopyExpr(remaining)) + opt.sanitizeMacro(macroID, macroExpr) + return +} + +// NewCall creates a global function call invocation expression. +// +// Example: +// +// countByField(list, fieldName) +// - function: countByField +// - args: [list, fieldName] +func (opt *optimizerExprFactory) NewCall(function string, args ...ast.Expr) ast.Expr { + return opt.fac.NewCall(opt.nextID(), function, args...) +} + +// NewMemberCall creates a member function call invocation expression where 'target' is the receiver of the call. +// +// Example: +// +// list.countByField(fieldName) +// - function: countByField +// - target: list +// - args: [fieldName] +func (opt *optimizerExprFactory) NewMemberCall(function string, target ast.Expr, args ...ast.Expr) ast.Expr { + return opt.fac.NewMemberCall(opt.nextID(), function, target, args...) +} + +// NewIdent creates a new identifier expression. +// +// Examples: +// +// - simple_var_name +// - qualified.subpackage.var_name +func (opt *optimizerExprFactory) NewIdent(name string) ast.Expr { + return opt.fac.NewIdent(opt.nextID(), name) +} + +// NewLiteral creates a new literal expression value. +// +// The range of valid values for a literal generated during optimization is different than for expressions +// generated via parsing / type-checking, as the ref.Val may be _any_ CEL value so long as the value can +// be converted back to a literal-like form. +func (opt *optimizerExprFactory) NewLiteral(value ref.Val) ast.Expr { + return opt.fac.NewLiteral(opt.nextID(), value) +} + +// NewList creates a list expression with a set of optional indices. +// +// Examples: +// +// [a, b] +// - elems: [a, b] +// - optIndices: [] +// +// [a, ?b, ?c] +// - elems: [a, b, c] +// - optIndices: [1, 2] +func (opt *optimizerExprFactory) NewList(elems []ast.Expr, optIndices []int32) ast.Expr { + return opt.fac.NewList(opt.nextID(), elems, optIndices) +} + +// NewMap creates a map from a set of entry expressions which contain a key and value expression. +func (opt *optimizerExprFactory) NewMap(entries []ast.EntryExpr) ast.Expr { + return opt.fac.NewMap(opt.nextID(), entries) +} + +// NewMapEntry creates a map entry with a key and value expression and a flag to indicate whether the +// entry is optional. +// +// Examples: +// +// {a: b} +// - key: a +// - value: b +// - optional: false +// +// {?a: ?b} +// - key: a +// - value: b +// - optional: true +func (opt *optimizerExprFactory) NewMapEntry(key, value ast.Expr, isOptional bool) ast.EntryExpr { + return opt.fac.NewMapEntry(opt.nextID(), key, value, isOptional) +} + +// NewHasMacro generates a test-only select expression to be included within an AST and an unexpanded +// has() macro call signature to be inserted into the source info macro call metadata. +func (opt *optimizerExprFactory) NewHasMacro(macroID int64, s ast.Expr) (astExpr, macroExpr ast.Expr) { + sel := s.AsSelect() + astExpr = opt.fac.NewPresenceTest(macroID, sel.Operand(), sel.FieldName()) + macroExpr = opt.fac.NewCall(0, "has", + opt.NewSelect(opt.fac.CopyExpr(sel.Operand()), sel.FieldName())) + opt.sanitizeMacro(macroID, macroExpr) + return +} + +// NewSelect creates a select expression where a field value is selected from an operand. +// +// Example: +// +// msg.field_name +// - operand: msg +// - field: field_name +func (opt *optimizerExprFactory) NewSelect(operand ast.Expr, field string) ast.Expr { + return opt.fac.NewSelect(opt.nextID(), operand, field) +} + +// NewStruct creates a new typed struct value with an set of field initializations. +// +// Example: +// +// pkg.TypeName{field: value} +// - typeName: pkg.TypeName +// - fields: [{field: value}] +func (opt *optimizerExprFactory) NewStruct(typeName string, fields []ast.EntryExpr) ast.Expr { + return opt.fac.NewStruct(opt.nextID(), typeName, fields) +} + +// NewStructField creates a struct field initialization. +// +// Examples: +// +// {count: 3u} +// - field: count +// - value: 3u +// - optional: false +// +// {?count: x} +// - field: count +// - value: x +// - optional: true +func (opt *optimizerExprFactory) NewStructField(field string, value ast.Expr, isOptional bool) ast.EntryExpr { + return opt.fac.NewStructField(opt.nextID(), field, value, isOptional) +} + +// UpdateExpr updates the target expression with the updated content while preserving macro metadata. +// +// There are four scenarios during the update to consider: +// 1. target is not macro, updated is not macro +// 2. target is macro, updated is not macro +// 3. target is macro, updated is macro +// 4. target is not macro, updated is macro +// +// When the target is a macro already, it may either be updated to a new macro function +// body if the update is also a macro, or it may be removed altogether if the update is +// a macro. +// +// When the update is a macro, then the target references within other macros must be +// updated to point to the new updated macro. Otherwise, other macros which pointed to +// the target body must be replaced with copies of the updated expression body. +func (opt *optimizerExprFactory) UpdateExpr(target, updated ast.Expr) { + // Update the expression + target.SetKindCase(updated) + + // Early return if there's no macros present sa the source info reflects the + // macro set from the target and updated expressions. + if len(opt.sourceInfo.MacroCalls()) == 0 { + return + } + // Determine whether the target expression was a macro. + _, targetIsMacro := opt.sourceInfo.GetMacroCall(target.ID()) + + // Determine whether the updated expression was a macro. + updatedMacro, updatedIsMacro := opt.sourceInfo.GetMacroCall(updated.ID()) + + if updatedIsMacro { + // If the updated call was a macro, then updated id maps to target id, + // and the updated macro moves into the target id slot. + opt.sourceInfo.ClearMacroCall(updated.ID()) + opt.sourceInfo.SetMacroCall(target.ID(), updatedMacro) + } else if targetIsMacro { + // Otherwise if the target expr was a macro, but is no longer, clear + // the macro reference. + opt.sourceInfo.ClearMacroCall(target.ID()) + } + + // Punch holes in the updated value where macros references exist. + macroExpr := opt.fac.CopyExpr(target) + macroRefVisitor := ast.NewExprVisitor(func(e ast.Expr) { + if _, exists := opt.sourceInfo.GetMacroCall(e.ID()); exists { + e.SetKindCase(nil) + } + }) + ast.PostOrderVisit(macroExpr, macroRefVisitor) + + // Update any references to the expression within a macro + macroVisitor := ast.NewExprVisitor(func(call ast.Expr) { + // Update the target expression to point to the macro expression which + // will be empty if the updated expression was a macro. + if call.ID() == target.ID() { + call.SetKindCase(opt.fac.CopyExpr(macroExpr)) + } + // Update the macro call expression if it refers to the updated expression + // id which has since been remapped to the target id. + if call.ID() == updated.ID() { + // Either ensure the expression is a macro reference or a populated with + // the relevant sub-expression if the updated expr was not a macro. + if updatedIsMacro { + call.SetKindCase(nil) + } else { + call.SetKindCase(opt.fac.CopyExpr(macroExpr)) + } + // Since SetKindCase does not renumber the id, ensure the references to + // the old 'updated' id are mapped to the target id. + call.RenumberIDs(func(id int64) int64 { + if id == updated.ID() { + return target.ID() + } + return id + }) + } + }) + for _, call := range opt.sourceInfo.MacroCalls() { + ast.PostOrderVisit(call, macroVisitor) + } +} + +func (opt *optimizerExprFactory) sanitizeMacro(macroID int64, macroExpr ast.Expr) { + macroRefVisitor := ast.NewExprVisitor(func(e ast.Expr) { + if _, exists := opt.sourceInfo.GetMacroCall(e.ID()); exists && e.ID() != macroID { + e.SetKindCase(nil) + } + }) + ast.PostOrderVisit(macroExpr, macroRefVisitor) +} diff --git a/vendor/github.com/google/cel-go/cel/options.go b/vendor/github.com/google/cel-go/cel/options.go index 05867730d36..3c53e21afa8 100644 --- a/vendor/github.com/google/cel-go/cel/options.go +++ b/vendor/github.com/google/cel-go/cel/options.go @@ -448,6 +448,8 @@ const ( OptTrackCost EvalOption = 1 << iota // OptCheckStringFormat enables compile-time checking of string.format calls for syntax/cardinality. + // + // Deprecated: use ext.StringsValidateFormatCalls() as this option is now a no-op. OptCheckStringFormat EvalOption = 1 << iota ) diff --git a/vendor/github.com/google/cel-go/cel/program.go b/vendor/github.com/google/cel-go/cel/program.go index 2dd72f75010..ece9fbdafa9 100644 --- a/vendor/github.com/google/cel-go/cel/program.go +++ b/vendor/github.com/google/cel-go/cel/program.go @@ -19,7 +19,6 @@ import ( "fmt" "sync" - celast "github.com/google/cel-go/common/ast" "github.com/google/cel-go/common/types" "github.com/google/cel-go/common/types/ref" "github.com/google/cel-go/interpreter" @@ -152,7 +151,7 @@ func (p *prog) clone() *prog { // ProgramOption values. // // If the program cannot be configured the prog will be nil, with a non-nil error response. -func newProgram(e *Env, ast *Ast, opts []ProgramOption) (Program, error) { +func newProgram(e *Env, a *Ast, opts []ProgramOption) (Program, error) { // Build the dispatcher, interpreter, and default program value. disp := interpreter.NewDispatcher() @@ -213,34 +212,6 @@ func newProgram(e *Env, ast *Ast, opts []ProgramOption) (Program, error) { if len(p.regexOptimizations) > 0 { decorators = append(decorators, interpreter.CompileRegexConstants(p.regexOptimizations...)) } - // Enable compile-time checking of syntax/cardinality for string.format calls. - if p.evalOpts&OptCheckStringFormat == OptCheckStringFormat { - var isValidType func(id int64, validTypes ...ref.Type) (bool, error) - if ast.IsChecked() { - isValidType = func(id int64, validTypes ...ref.Type) (bool, error) { - t := ast.typeMap[id] - if t.Kind() == DynKind { - return true, nil - } - for _, vt := range validTypes { - k, err := typeValueToKind(vt) - if err != nil { - return false, err - } - if t.Kind() == k { - return true, nil - } - } - return false, nil - } - } else { - // if the AST isn't type-checked, short-circuit validation - isValidType = func(id int64, validTypes ...ref.Type) (bool, error) { - return true, nil - } - } - decorators = append(decorators, interpreter.InterpolateFormattedString(isValidType)) - } // Enable exhaustive eval, state tracking and cost tracking last since they require a factory. if p.evalOpts&(OptExhaustiveEval|OptTrackState|OptTrackCost) != 0 { @@ -274,33 +245,16 @@ func newProgram(e *Env, ast *Ast, opts []ProgramOption) (Program, error) { decs = append(decs, interpreter.Observe(observers...)) } - return p.clone().initInterpretable(ast, decs) + return p.clone().initInterpretable(a, decs) } return newProgGen(factory) } - return p.initInterpretable(ast, decorators) + return p.initInterpretable(a, decorators) } -func (p *prog) initInterpretable(ast *Ast, decs []interpreter.InterpretableDecorator) (*prog, error) { - // Unchecked programs do not contain type and reference information and may be slower to execute. - if !ast.IsChecked() { - interpretable, err := - p.interpreter.NewUncheckedInterpretable(ast.Expr(), decs...) - if err != nil { - return nil, err - } - p.interpretable = interpretable - return p, nil - } - - // When the AST has been checked it contains metadata that can be used to speed up program execution. - checked := &celast.CheckedAST{ - Expr: ast.Expr(), - SourceInfo: ast.SourceInfo(), - TypeMap: ast.typeMap, - ReferenceMap: ast.refMap, - } - interpretable, err := p.interpreter.NewInterpretable(checked, decs...) +func (p *prog) initInterpretable(a *Ast, decs []interpreter.InterpretableDecorator) (*prog, error) { + // When the AST has been exprAST it contains metadata that can be used to speed up program execution. + interpretable, err := p.interpreter.NewInterpretable(a.impl, decs...) if err != nil { return nil, err } @@ -580,8 +534,6 @@ func (p *evalActivationPool) Put(value any) { } var ( - emptyEvalState = interpreter.NewEvalState() - // activationPool is an internally managed pool of Activation values that wrap map[string]any inputs activationPool = newEvalActivationPool() diff --git a/vendor/github.com/google/cel-go/cel/validator.go b/vendor/github.com/google/cel-go/cel/validator.go index 78b31138186..b50c674520a 100644 --- a/vendor/github.com/google/cel-go/cel/validator.go +++ b/vendor/github.com/google/cel-go/cel/validator.go @@ -21,8 +21,6 @@ import ( "github.com/google/cel-go/common/ast" "github.com/google/cel-go/common/overloads" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" ) const ( @@ -69,7 +67,7 @@ type ASTValidator interface { // // See individual validators for more information on their configuration keys and configuration // properties. - Validate(*Env, ValidatorConfig, *ast.CheckedAST, *Issues) + Validate(*Env, ValidatorConfig, *ast.AST, *Issues) } // ValidatorConfig provides an accessor method for querying validator configuration state. @@ -180,7 +178,7 @@ func ValidateComprehensionNestingLimit(limit int) ASTValidator { return nestingLimitValidator{limit: limit} } -type argChecker func(env *Env, call, arg ast.NavigableExpr) error +type argChecker func(env *Env, call, arg ast.Expr) error func newFormatValidator(funcName string, argNum int, check argChecker) formatValidator { return formatValidator{ @@ -203,8 +201,8 @@ func (v formatValidator) Name() string { // Validate searches the AST for uses of a given function name with a constant argument and performs a check // on whether the argument is a valid literal value. -func (v formatValidator) Validate(e *Env, _ ValidatorConfig, a *ast.CheckedAST, iss *Issues) { - root := ast.NavigateCheckedAST(a) +func (v formatValidator) Validate(e *Env, _ ValidatorConfig, a *ast.AST, iss *Issues) { + root := ast.NavigateAST(a) funcCalls := ast.MatchDescendants(root, ast.FunctionMatcher(v.funcName)) for _, call := range funcCalls { callArgs := call.AsCall().Args() @@ -221,8 +219,8 @@ func (v formatValidator) Validate(e *Env, _ ValidatorConfig, a *ast.CheckedAST, } } -func evalCall(env *Env, call, arg ast.NavigableExpr) error { - ast := ParsedExprToAst(&exprpb.ParsedExpr{Expr: call.ToExpr()}) +func evalCall(env *Env, call, arg ast.Expr) error { + ast := &Ast{impl: ast.NewAST(call, ast.NewSourceInfo(nil))} prg, err := env.Program(ast) if err != nil { return err @@ -231,7 +229,7 @@ func evalCall(env *Env, call, arg ast.NavigableExpr) error { return err } -func compileRegex(_ *Env, _, arg ast.NavigableExpr) error { +func compileRegex(_ *Env, _, arg ast.Expr) error { pattern := arg.AsLiteral().Value().(string) _, err := regexp.Compile(pattern) return err @@ -244,25 +242,14 @@ func (homogeneousAggregateLiteralValidator) Name() string { return homogeneousValidatorName } -// Configure implements the ASTValidatorConfigurer interface and currently sets the list of standard -// and exempt functions from homogeneous aggregate literal checks. -// -// TODO: Move this call into the string.format() ASTValidator once ported. -func (homogeneousAggregateLiteralValidator) Configure(c MutableValidatorConfig) error { - emptyList := []string{} - exemptFunctions := c.GetOrDefault(HomogeneousAggregateLiteralExemptFunctions, emptyList).([]string) - exemptFunctions = append(exemptFunctions, "format") - return c.Set(HomogeneousAggregateLiteralExemptFunctions, exemptFunctions) -} - // Validate validates that all lists and map literals have homogeneous types, i.e. don't contain dyn types. // // This validator makes an exception for list and map literals which occur at any level of nesting within // string format calls. -func (v homogeneousAggregateLiteralValidator) Validate(_ *Env, c ValidatorConfig, a *ast.CheckedAST, iss *Issues) { +func (v homogeneousAggregateLiteralValidator) Validate(_ *Env, c ValidatorConfig, a *ast.AST, iss *Issues) { var exemptedFunctions []string exemptedFunctions = c.GetOrDefault(HomogeneousAggregateLiteralExemptFunctions, exemptedFunctions).([]string) - root := ast.NavigateCheckedAST(a) + root := ast.NavigateAST(a) listExprs := ast.MatchDescendants(root, ast.KindMatcher(ast.ListKind)) for _, listExpr := range listExprs { if inExemptFunction(listExpr, exemptedFunctions) { @@ -273,7 +260,7 @@ func (v homogeneousAggregateLiteralValidator) Validate(_ *Env, c ValidatorConfig optIndices := l.OptionalIndices() var elemType *Type for i, e := range elements { - et := e.Type() + et := a.GetType(e.ID()) if isOptionalIndex(i, optIndices) { et = et.Parameters()[0] } @@ -296,9 +283,10 @@ func (v homogeneousAggregateLiteralValidator) Validate(_ *Env, c ValidatorConfig entries := m.Entries() var keyType, valType *Type for _, e := range entries { - key, val := e.Key(), e.Value() - kt, vt := key.Type(), val.Type() - if e.IsOptional() { + mapEntry := e.AsMapEntry() + key, val := mapEntry.Key(), mapEntry.Value() + kt, vt := a.GetType(key.ID()), a.GetType(val.ID()) + if mapEntry.IsOptional() { vt = vt.Parameters()[0] } if keyType == nil && valType == nil { @@ -316,7 +304,8 @@ func (v homogeneousAggregateLiteralValidator) Validate(_ *Env, c ValidatorConfig } func inExemptFunction(e ast.NavigableExpr, exemptFunctions []string) bool { - if parent, found := e.Parent(); found { + parent, found := e.Parent() + for found { if parent.Kind() == ast.CallKind { fnName := parent.AsCall().FunctionName() for _, exempt := range exemptFunctions { @@ -325,9 +314,7 @@ func inExemptFunction(e ast.NavigableExpr, exemptFunctions []string) bool { } } } - if parent.Kind() == ast.ListKind || parent.Kind() == ast.MapKind { - return inExemptFunction(parent, exemptFunctions) - } + parent, found = parent.Parent() } return false } @@ -353,8 +340,8 @@ func (v nestingLimitValidator) Name() string { return "cel.lib.std.validate.comprehension_nesting_limit" } -func (v nestingLimitValidator) Validate(e *Env, _ ValidatorConfig, a *ast.CheckedAST, iss *Issues) { - root := ast.NavigateCheckedAST(a) +func (v nestingLimitValidator) Validate(e *Env, _ ValidatorConfig, a *ast.AST, iss *Issues) { + root := ast.NavigateAST(a) comprehensions := ast.MatchDescendants(root, ast.KindMatcher(ast.ComprehensionKind)) if len(comprehensions) <= v.limit { return diff --git a/vendor/github.com/google/cel-go/checker/BUILD.bazel b/vendor/github.com/google/cel-go/checker/BUILD.bazel index 0459d35239f..997fa91d15d 100644 --- a/vendor/github.com/google/cel-go/checker/BUILD.bazel +++ b/vendor/github.com/google/cel-go/checker/BUILD.bazel @@ -60,7 +60,6 @@ go_test( "//test:go_default_library", "//test/proto2pb:go_default_library", "//test/proto3pb:go_default_library", - "@com_github_antlr_antlr4_runtime_go_antlr_v4//:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", ], ) diff --git a/vendor/github.com/google/cel-go/checker/checker.go b/vendor/github.com/google/cel-go/checker/checker.go index 720e4fa968f..57fb3ce5ea1 100644 --- a/vendor/github.com/google/cel-go/checker/checker.go +++ b/vendor/github.com/google/cel-go/checker/checker.go @@ -18,6 +18,7 @@ package checker import ( "fmt" + "reflect" "github.com/google/cel-go/common" "github.com/google/cel-go/common/ast" @@ -25,139 +26,98 @@ import ( "github.com/google/cel-go/common/decls" "github.com/google/cel-go/common/operators" "github.com/google/cel-go/common/types" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + "github.com/google/cel-go/common/types/ref" ) type checker struct { + *ast.AST + ast.ExprFactory env *Env errors *typeErrors mappings *mapping freeTypeVarCounter int - sourceInfo *exprpb.SourceInfo - types map[int64]*types.Type - references map[int64]*ast.ReferenceInfo } // Check performs type checking, giving a typed AST. -// The input is a ParsedExpr proto and an env which encapsulates -// type binding of variables, declarations of built-in functions, -// descriptions of protocol buffers, and a registry for errors. -// Returns a CheckedExpr proto, which might not be usable if -// there are errors in the error registry. -func Check(parsedExpr *exprpb.ParsedExpr, source common.Source, env *Env) (*ast.CheckedAST, *common.Errors) { +// +// The input is a parsed AST and an env which encapsulates type binding of variables, +// declarations of built-in functions, descriptions of protocol buffers, and a registry for +// errors. +// +// Returns a type-checked AST, which might not be usable if there are errors in the error +// registry. +func Check(parsed *ast.AST, source common.Source, env *Env) (*ast.AST, *common.Errors) { errs := common.NewErrors(source) + typeMap := make(map[int64]*types.Type) + refMap := make(map[int64]*ast.ReferenceInfo) c := checker{ + AST: ast.NewCheckedAST(parsed, typeMap, refMap), + ExprFactory: ast.NewExprFactory(), env: env, errors: &typeErrors{errs: errs}, mappings: newMapping(), freeTypeVarCounter: 0, - sourceInfo: parsedExpr.GetSourceInfo(), - types: make(map[int64]*types.Type), - references: make(map[int64]*ast.ReferenceInfo), } - c.check(parsedExpr.GetExpr()) + c.check(c.Expr()) - // Walk over the final type map substituting any type parameters either by their bound value or - // by DYN. - m := make(map[int64]*types.Type) - for id, t := range c.types { - m[id] = substitute(c.mappings, t, true) + // Walk over the final type map substituting any type parameters either by their bound value + // or by DYN. + for id, t := range c.TypeMap() { + c.SetType(id, substitute(c.mappings, t, true)) } - - return &ast.CheckedAST{ - Expr: parsedExpr.GetExpr(), - SourceInfo: parsedExpr.GetSourceInfo(), - TypeMap: m, - ReferenceMap: c.references, - }, errs + return c.AST, errs } -func (c *checker) check(e *exprpb.Expr) { +func (c *checker) check(e ast.Expr) { if e == nil { return } - switch e.GetExprKind().(type) { - case *exprpb.Expr_ConstExpr: - literal := e.GetConstExpr() - switch literal.GetConstantKind().(type) { - case *exprpb.Constant_BoolValue: - c.checkBoolLiteral(e) - case *exprpb.Constant_BytesValue: - c.checkBytesLiteral(e) - case *exprpb.Constant_DoubleValue: - c.checkDoubleLiteral(e) - case *exprpb.Constant_Int64Value: - c.checkInt64Literal(e) - case *exprpb.Constant_NullValue: - c.checkNullLiteral(e) - case *exprpb.Constant_StringValue: - c.checkStringLiteral(e) - case *exprpb.Constant_Uint64Value: - c.checkUint64Literal(e) + switch e.Kind() { + case ast.LiteralKind: + literal := ref.Val(e.AsLiteral()) + switch literal.Type() { + case types.BoolType, types.BytesType, types.DoubleType, types.IntType, + types.NullType, types.StringType, types.UintType: + c.setType(e, literal.Type().(*types.Type)) + default: + c.errors.unexpectedASTType(e.ID(), c.location(e), "literal", literal.Type().TypeName()) } - case *exprpb.Expr_IdentExpr: + case ast.IdentKind: c.checkIdent(e) - case *exprpb.Expr_SelectExpr: + case ast.SelectKind: c.checkSelect(e) - case *exprpb.Expr_CallExpr: + case ast.CallKind: c.checkCall(e) - case *exprpb.Expr_ListExpr: + case ast.ListKind: c.checkCreateList(e) - case *exprpb.Expr_StructExpr: + case ast.MapKind: + c.checkCreateMap(e) + case ast.StructKind: c.checkCreateStruct(e) - case *exprpb.Expr_ComprehensionExpr: + case ast.ComprehensionKind: c.checkComprehension(e) default: - c.errors.unexpectedASTType(e.GetId(), c.location(e), e) + c.errors.unexpectedASTType(e.ID(), c.location(e), "unspecified", reflect.TypeOf(e).Name()) } } -func (c *checker) checkInt64Literal(e *exprpb.Expr) { - c.setType(e, types.IntType) -} - -func (c *checker) checkUint64Literal(e *exprpb.Expr) { - c.setType(e, types.UintType) -} - -func (c *checker) checkStringLiteral(e *exprpb.Expr) { - c.setType(e, types.StringType) -} - -func (c *checker) checkBytesLiteral(e *exprpb.Expr) { - c.setType(e, types.BytesType) -} - -func (c *checker) checkDoubleLiteral(e *exprpb.Expr) { - c.setType(e, types.DoubleType) -} - -func (c *checker) checkBoolLiteral(e *exprpb.Expr) { - c.setType(e, types.BoolType) -} - -func (c *checker) checkNullLiteral(e *exprpb.Expr) { - c.setType(e, types.NullType) -} - -func (c *checker) checkIdent(e *exprpb.Expr) { - identExpr := e.GetIdentExpr() +func (c *checker) checkIdent(e ast.Expr) { + identName := e.AsIdent() // Check to see if the identifier is declared. - if ident := c.env.LookupIdent(identExpr.GetName()); ident != nil { + if ident := c.env.LookupIdent(identName); ident != nil { c.setType(e, ident.Type()) c.setReference(e, ast.NewIdentReference(ident.Name(), ident.Value())) // Overwrite the identifier with its fully qualified name. - identExpr.Name = ident.Name() + e.SetKindCase(c.NewIdent(e.ID(), ident.Name())) return } c.setType(e, types.ErrorType) - c.errors.undeclaredReference(e.GetId(), c.location(e), c.env.container.Name(), identExpr.GetName()) + c.errors.undeclaredReference(e.ID(), c.location(e), c.env.container.Name(), identName) } -func (c *checker) checkSelect(e *exprpb.Expr) { - sel := e.GetSelectExpr() +func (c *checker) checkSelect(e ast.Expr) { + sel := e.AsSelect() // Before traversing down the tree, try to interpret as qualified name. qname, found := containers.ToQualifiedName(e) if found { @@ -170,31 +130,26 @@ func (c *checker) checkSelect(e *exprpb.Expr) { // variable name. c.setType(e, ident.Type()) c.setReference(e, ast.NewIdentReference(ident.Name(), ident.Value())) - identName := ident.Name() - e.ExprKind = &exprpb.Expr_IdentExpr{ - IdentExpr: &exprpb.Expr_Ident{ - Name: identName, - }, - } + e.SetKindCase(c.NewIdent(e.ID(), ident.Name())) return } } - resultType := c.checkSelectField(e, sel.GetOperand(), sel.GetField(), false) - if sel.TestOnly { + resultType := c.checkSelectField(e, sel.Operand(), sel.FieldName(), false) + if sel.IsTestOnly() { resultType = types.BoolType } c.setType(e, substitute(c.mappings, resultType, false)) } -func (c *checker) checkOptSelect(e *exprpb.Expr) { +func (c *checker) checkOptSelect(e ast.Expr) { // Collect metadata related to the opt select call packaged by the parser. - call := e.GetCallExpr() - operand := call.GetArgs()[0] - field := call.GetArgs()[1] + call := e.AsCall() + operand := call.Args()[0] + field := call.Args()[1] fieldName, isString := maybeUnwrapString(field) if !isString { - c.errors.notAnOptionalFieldSelection(field.GetId(), c.location(field), field) + c.errors.notAnOptionalFieldSelection(field.ID(), c.location(field), field) return } @@ -204,7 +159,7 @@ func (c *checker) checkOptSelect(e *exprpb.Expr) { c.setReference(e, ast.NewFunctionReference("select_optional_field")) } -func (c *checker) checkSelectField(e, operand *exprpb.Expr, field string, optional bool) *types.Type { +func (c *checker) checkSelectField(e, operand ast.Expr, field string, optional bool) *types.Type { // Interpret as field selection, first traversing down the operand. c.check(operand) operandType := substitute(c.mappings, c.getType(operand), false) @@ -222,7 +177,7 @@ func (c *checker) checkSelectField(e, operand *exprpb.Expr, field string, option // Objects yield their field type declaration as the selection result type, but only if // the field is defined. messageType := targetType - if fieldType, found := c.lookupFieldType(e.GetId(), messageType.TypeName(), field); found { + if fieldType, found := c.lookupFieldType(e.ID(), messageType.TypeName(), field); found { resultType = fieldType } case types.TypeParamKind: @@ -236,7 +191,7 @@ func (c *checker) checkSelectField(e, operand *exprpb.Expr, field string, option // Dynamic / error values are treated as DYN type. Errors are handled this way as well // in order to allow forward progress on the check. if !isDynOrError(targetType) { - c.errors.typeDoesNotSupportFieldSelection(e.GetId(), c.location(e), targetType) + c.errors.typeDoesNotSupportFieldSelection(e.ID(), c.location(e), targetType) } resultType = types.DynType } @@ -248,35 +203,34 @@ func (c *checker) checkSelectField(e, operand *exprpb.Expr, field string, option return resultType } -func (c *checker) checkCall(e *exprpb.Expr) { +func (c *checker) checkCall(e ast.Expr) { // Note: similar logic exists within the `interpreter/planner.go`. If making changes here // please consider the impact on planner.go and consolidate implementations or mirror code // as appropriate. - call := e.GetCallExpr() - fnName := call.GetFunction() + call := e.AsCall() + fnName := call.FunctionName() if fnName == operators.OptSelect { c.checkOptSelect(e) return } - args := call.GetArgs() + args := call.Args() // Traverse arguments. for _, arg := range args { c.check(arg) } - target := call.GetTarget() // Regular static call with simple name. - if target == nil { + if !call.IsMemberFunction() { // Check for the existence of the function. fn := c.env.LookupFunction(fnName) if fn == nil { - c.errors.undeclaredReference(e.GetId(), c.location(e), c.env.container.Name(), fnName) + c.errors.undeclaredReference(e.ID(), c.location(e), c.env.container.Name(), fnName) c.setType(e, types.ErrorType) return } // Overwrite the function name with its fully qualified resolved name. - call.Function = fn.Name() + e.SetKindCase(c.NewCall(e.ID(), fn.Name(), args...)) // Check to see whether the overload resolves. c.resolveOverloadOrError(e, fn, nil, args) return @@ -287,6 +241,7 @@ func (c *checker) checkCall(e *exprpb.Expr) { // target a.b. // // Check whether the target is a namespaced function name. + target := call.Target() qualifiedPrefix, maybeQualified := containers.ToQualifiedName(target) if maybeQualified { maybeQualifiedName := qualifiedPrefix + "." + fnName @@ -295,15 +250,14 @@ func (c *checker) checkCall(e *exprpb.Expr) { // The function name is namespaced and so preserving the target operand would // be an inaccurate representation of the desired evaluation behavior. // Overwrite with fully-qualified resolved function name sans receiver target. - call.Target = nil - call.Function = fn.Name() + e.SetKindCase(c.NewCall(e.ID(), fn.Name(), args...)) c.resolveOverloadOrError(e, fn, nil, args) return } } // Regular instance call. - c.check(call.Target) + c.check(target) fn := c.env.LookupFunction(fnName) // Function found, attempt overload resolution. if fn != nil { @@ -312,11 +266,11 @@ func (c *checker) checkCall(e *exprpb.Expr) { } // Function name not declared, record error. c.setType(e, types.ErrorType) - c.errors.undeclaredReference(e.GetId(), c.location(e), c.env.container.Name(), fnName) + c.errors.undeclaredReference(e.ID(), c.location(e), c.env.container.Name(), fnName) } func (c *checker) resolveOverloadOrError( - e *exprpb.Expr, fn *decls.FunctionDecl, target *exprpb.Expr, args []*exprpb.Expr) { + e ast.Expr, fn *decls.FunctionDecl, target ast.Expr, args []ast.Expr) { // Attempt to resolve the overload. resolution := c.resolveOverload(e, fn, target, args) // No such overload, error noted in the resolveOverload call, type recorded here. @@ -330,7 +284,7 @@ func (c *checker) resolveOverloadOrError( } func (c *checker) resolveOverload( - call *exprpb.Expr, fn *decls.FunctionDecl, target *exprpb.Expr, args []*exprpb.Expr) *overloadResolution { + call ast.Expr, fn *decls.FunctionDecl, target ast.Expr, args []ast.Expr) *overloadResolution { var argTypes []*types.Type if target != nil { @@ -362,8 +316,8 @@ func (c *checker) resolveOverload( for i, argType := range argTypes { if !c.isAssignable(argType, types.BoolType) { c.errors.typeMismatch( - args[i].GetId(), - c.locationByID(args[i].GetId()), + args[i].ID(), + c.locationByID(args[i].ID()), types.BoolType, argType) resultType = types.ErrorType @@ -408,29 +362,29 @@ func (c *checker) resolveOverload( for i, argType := range argTypes { argTypes[i] = substitute(c.mappings, argType, true) } - c.errors.noMatchingOverload(call.GetId(), c.location(call), fn.Name(), argTypes, target != nil) + c.errors.noMatchingOverload(call.ID(), c.location(call), fn.Name(), argTypes, target != nil) return nil } return newResolution(checkedRef, resultType) } -func (c *checker) checkCreateList(e *exprpb.Expr) { - create := e.GetListExpr() +func (c *checker) checkCreateList(e ast.Expr) { + create := e.AsList() var elemsType *types.Type - optionalIndices := create.GetOptionalIndices() + optionalIndices := create.OptionalIndices() optionals := make(map[int32]bool, len(optionalIndices)) for _, optInd := range optionalIndices { optionals[optInd] = true } - for i, e := range create.GetElements() { + for i, e := range create.Elements() { c.check(e) elemType := c.getType(e) if optionals[int32(i)] { var isOptional bool elemType, isOptional = maybeUnwrapOptional(elemType) if !isOptional && !isDyn(elemType) { - c.errors.typeMismatch(e.GetId(), c.location(e), types.NewOptionalType(elemType), elemType) + c.errors.typeMismatch(e.ID(), c.location(e), types.NewOptionalType(elemType), elemType) } } elemsType = c.joinTypes(e, elemsType, elemType) @@ -442,32 +396,24 @@ func (c *checker) checkCreateList(e *exprpb.Expr) { c.setType(e, types.NewListType(elemsType)) } -func (c *checker) checkCreateStruct(e *exprpb.Expr) { - str := e.GetStructExpr() - if str.GetMessageName() != "" { - c.checkCreateMessage(e) - } else { - c.checkCreateMap(e) - } -} - -func (c *checker) checkCreateMap(e *exprpb.Expr) { - mapVal := e.GetStructExpr() +func (c *checker) checkCreateMap(e ast.Expr) { + mapVal := e.AsMap() var mapKeyType *types.Type var mapValueType *types.Type - for _, ent := range mapVal.GetEntries() { - key := ent.GetMapKey() + for _, e := range mapVal.Entries() { + entry := e.AsMapEntry() + key := entry.Key() c.check(key) mapKeyType = c.joinTypes(key, mapKeyType, c.getType(key)) - val := ent.GetValue() + val := entry.Value() c.check(val) valType := c.getType(val) - if ent.GetOptionalEntry() { + if entry.IsOptional() { var isOptional bool valType, isOptional = maybeUnwrapOptional(valType) if !isOptional && !isDyn(valType) { - c.errors.typeMismatch(val.GetId(), c.location(val), types.NewOptionalType(valType), valType) + c.errors.typeMismatch(val.ID(), c.location(val), types.NewOptionalType(valType), valType) } } mapValueType = c.joinTypes(val, mapValueType, valType) @@ -480,25 +426,28 @@ func (c *checker) checkCreateMap(e *exprpb.Expr) { c.setType(e, types.NewMapType(mapKeyType, mapValueType)) } -func (c *checker) checkCreateMessage(e *exprpb.Expr) { - msgVal := e.GetStructExpr() +func (c *checker) checkCreateStruct(e ast.Expr) { + msgVal := e.AsStruct() // Determine the type of the message. resultType := types.ErrorType - ident := c.env.LookupIdent(msgVal.GetMessageName()) + ident := c.env.LookupIdent(msgVal.TypeName()) if ident == nil { c.errors.undeclaredReference( - e.GetId(), c.location(e), c.env.container.Name(), msgVal.GetMessageName()) + e.ID(), c.location(e), c.env.container.Name(), msgVal.TypeName()) c.setType(e, types.ErrorType) return } // Ensure the type name is fully qualified in the AST. typeName := ident.Name() - msgVal.MessageName = typeName - c.setReference(e, ast.NewIdentReference(ident.Name(), nil)) + if msgVal.TypeName() != typeName { + e.SetKindCase(c.NewStruct(e.ID(), typeName, msgVal.Fields())) + msgVal = e.AsStruct() + } + c.setReference(e, ast.NewIdentReference(typeName, nil)) identKind := ident.Type().Kind() if identKind != types.ErrorKind { if identKind != types.TypeKind { - c.errors.notAType(e.GetId(), c.location(e), ident.Type().DeclaredTypeName()) + c.errors.notAType(e.ID(), c.location(e), ident.Type().DeclaredTypeName()) } else { resultType = ident.Type().Parameters()[0] // Backwards compatibility test between well-known types and message types @@ -509,7 +458,7 @@ func (c *checker) checkCreateMessage(e *exprpb.Expr) { } else if resultType.Kind() == types.StructKind { typeName = resultType.DeclaredTypeName() } else { - c.errors.notAMessageType(e.GetId(), c.location(e), resultType.DeclaredTypeName()) + c.errors.notAMessageType(e.ID(), c.location(e), resultType.DeclaredTypeName()) resultType = types.ErrorType } } @@ -517,37 +466,38 @@ func (c *checker) checkCreateMessage(e *exprpb.Expr) { c.setType(e, resultType) // Check the field initializers. - for _, ent := range msgVal.GetEntries() { - field := ent.GetFieldKey() - value := ent.GetValue() + for _, f := range msgVal.Fields() { + field := f.AsStructField() + fieldName := field.Name() + value := field.Value() c.check(value) fieldType := types.ErrorType - ft, found := c.lookupFieldType(ent.GetId(), typeName, field) + ft, found := c.lookupFieldType(f.ID(), typeName, fieldName) if found { fieldType = ft } valType := c.getType(value) - if ent.GetOptionalEntry() { + if field.IsOptional() { var isOptional bool valType, isOptional = maybeUnwrapOptional(valType) if !isOptional && !isDyn(valType) { - c.errors.typeMismatch(value.GetId(), c.location(value), types.NewOptionalType(valType), valType) + c.errors.typeMismatch(value.ID(), c.location(value), types.NewOptionalType(valType), valType) } } if !c.isAssignable(fieldType, valType) { - c.errors.fieldTypeMismatch(ent.GetId(), c.locationByID(ent.GetId()), field, fieldType, valType) + c.errors.fieldTypeMismatch(f.ID(), c.locationByID(f.ID()), fieldName, fieldType, valType) } } } -func (c *checker) checkComprehension(e *exprpb.Expr) { - comp := e.GetComprehensionExpr() - c.check(comp.GetIterRange()) - c.check(comp.GetAccuInit()) - accuType := c.getType(comp.GetAccuInit()) - rangeType := substitute(c.mappings, c.getType(comp.GetIterRange()), false) +func (c *checker) checkComprehension(e ast.Expr) { + comp := e.AsComprehension() + c.check(comp.IterRange()) + c.check(comp.AccuInit()) + accuType := c.getType(comp.AccuInit()) + rangeType := substitute(c.mappings, c.getType(comp.IterRange()), false) var varType *types.Type switch rangeType.Kind() { @@ -564,32 +514,32 @@ func (c *checker) checkComprehension(e *exprpb.Expr) { // Set the range iteration variable to type DYN as well. varType = types.DynType default: - c.errors.notAComprehensionRange(comp.GetIterRange().GetId(), c.location(comp.GetIterRange()), rangeType) + c.errors.notAComprehensionRange(comp.IterRange().ID(), c.location(comp.IterRange()), rangeType) varType = types.ErrorType } // Create a scope for the comprehension since it has a local accumulation variable. // This scope will contain the accumulation variable used to compute the result. c.env = c.env.enterScope() - c.env.AddIdents(decls.NewVariable(comp.GetAccuVar(), accuType)) + c.env.AddIdents(decls.NewVariable(comp.AccuVar(), accuType)) // Create a block scope for the loop. c.env = c.env.enterScope() - c.env.AddIdents(decls.NewVariable(comp.GetIterVar(), varType)) + c.env.AddIdents(decls.NewVariable(comp.IterVar(), varType)) // Check the variable references in the condition and step. - c.check(comp.GetLoopCondition()) - c.assertType(comp.GetLoopCondition(), types.BoolType) - c.check(comp.GetLoopStep()) - c.assertType(comp.GetLoopStep(), accuType) + c.check(comp.LoopCondition()) + c.assertType(comp.LoopCondition(), types.BoolType) + c.check(comp.LoopStep()) + c.assertType(comp.LoopStep(), accuType) // Exit the loop's block scope before checking the result. c.env = c.env.exitScope() - c.check(comp.GetResult()) + c.check(comp.Result()) // Exit the comprehension scope. c.env = c.env.exitScope() - c.setType(e, substitute(c.mappings, c.getType(comp.GetResult()), false)) + c.setType(e, substitute(c.mappings, c.getType(comp.Result()), false)) } // Checks compatibility of joined types, and returns the most general common type. -func (c *checker) joinTypes(e *exprpb.Expr, previous, current *types.Type) *types.Type { +func (c *checker) joinTypes(e ast.Expr, previous, current *types.Type) *types.Type { if previous == nil { return current } @@ -599,7 +549,7 @@ func (c *checker) joinTypes(e *exprpb.Expr, previous, current *types.Type) *type if c.dynAggregateLiteralElementTypesEnabled() { return types.DynType } - c.errors.typeMismatch(e.GetId(), c.location(e), previous, current) + c.errors.typeMismatch(e.ID(), c.location(e), previous, current) return types.ErrorType } @@ -633,41 +583,41 @@ func (c *checker) isAssignableList(l1, l2 []*types.Type) bool { return false } -func maybeUnwrapString(e *exprpb.Expr) (string, bool) { - switch e.GetExprKind().(type) { - case *exprpb.Expr_ConstExpr: - literal := e.GetConstExpr() - switch literal.GetConstantKind().(type) { - case *exprpb.Constant_StringValue: - return literal.GetStringValue(), true +func maybeUnwrapString(e ast.Expr) (string, bool) { + switch e.Kind() { + case ast.LiteralKind: + literal := e.AsLiteral() + switch v := literal.(type) { + case types.String: + return string(v), true } } return "", false } -func (c *checker) setType(e *exprpb.Expr, t *types.Type) { - if old, found := c.types[e.GetId()]; found && !old.IsExactType(t) { - c.errors.incompatibleType(e.GetId(), c.location(e), e, old, t) +func (c *checker) setType(e ast.Expr, t *types.Type) { + if old, found := c.TypeMap()[e.ID()]; found && !old.IsExactType(t) { + c.errors.incompatibleType(e.ID(), c.location(e), e, old, t) return } - c.types[e.GetId()] = t + c.SetType(e.ID(), t) } -func (c *checker) getType(e *exprpb.Expr) *types.Type { - return c.types[e.GetId()] +func (c *checker) getType(e ast.Expr) *types.Type { + return c.TypeMap()[e.ID()] } -func (c *checker) setReference(e *exprpb.Expr, r *ast.ReferenceInfo) { - if old, found := c.references[e.GetId()]; found && !old.Equals(r) { - c.errors.referenceRedefinition(e.GetId(), c.location(e), e, old, r) +func (c *checker) setReference(e ast.Expr, r *ast.ReferenceInfo) { + if old, found := c.ReferenceMap()[e.ID()]; found && !old.Equals(r) { + c.errors.referenceRedefinition(e.ID(), c.location(e), e, old, r) return } - c.references[e.GetId()] = r + c.SetReference(e.ID(), r) } -func (c *checker) assertType(e *exprpb.Expr, t *types.Type) { +func (c *checker) assertType(e ast.Expr, t *types.Type) { if !c.isAssignable(t, c.getType(e)) { - c.errors.typeMismatch(e.GetId(), c.location(e), t, c.getType(e)) + c.errors.typeMismatch(e.ID(), c.location(e), t, c.getType(e)) } } @@ -683,26 +633,12 @@ func newResolution(r *ast.ReferenceInfo, t *types.Type) *overloadResolution { } } -func (c *checker) location(e *exprpb.Expr) common.Location { - return c.locationByID(e.GetId()) +func (c *checker) location(e ast.Expr) common.Location { + return c.locationByID(e.ID()) } func (c *checker) locationByID(id int64) common.Location { - positions := c.sourceInfo.GetPositions() - var line = 1 - if offset, found := positions[id]; found { - col := int(offset) - for _, lineOffset := range c.sourceInfo.GetLineOffsets() { - if lineOffset < offset { - line++ - col = int(offset - lineOffset) - } else { - break - } - } - return common.NewLocation(line, col) - } - return common.NoLocation + return c.SourceInfo().GetStartLocation(id) } func (c *checker) lookupFieldType(exprID int64, structType, fieldName string) (*types.Type, bool) { diff --git a/vendor/github.com/google/cel-go/checker/cost.go b/vendor/github.com/google/cel-go/checker/cost.go index f232f30daca..04244694d81 100644 --- a/vendor/github.com/google/cel-go/checker/cost.go +++ b/vendor/github.com/google/cel-go/checker/cost.go @@ -22,8 +22,6 @@ import ( "github.com/google/cel-go/common/overloads" "github.com/google/cel-go/common/types" "github.com/google/cel-go/parser" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" ) // WARNING: Any changes to cost calculations in this file require a corresponding change in interpreter/runtimecost.go @@ -58,7 +56,7 @@ type AstNode interface { // Type returns the deduced type of the AstNode. Type() *types.Type // Expr returns the expression of the AstNode. - Expr() *exprpb.Expr + Expr() ast.Expr // ComputedSize returns a size estimate of the AstNode derived from information available in the CEL expression. // For constants and inline list and map declarations, the exact size is returned. For concatenated list, strings // and bytes, the size is derived from the size estimates of the operands. nil is returned if there is no @@ -69,7 +67,7 @@ type AstNode interface { type astNode struct { path []string t *types.Type - expr *exprpb.Expr + expr ast.Expr derivedSize *SizeEstimate } @@ -81,7 +79,7 @@ func (e astNode) Type() *types.Type { return e.t } -func (e astNode) Expr() *exprpb.Expr { +func (e astNode) Expr() ast.Expr { return e.expr } @@ -90,29 +88,27 @@ func (e astNode) ComputedSize() *SizeEstimate { return e.derivedSize } var v uint64 - switch ek := e.expr.GetExprKind().(type) { - case *exprpb.Expr_ConstExpr: - switch ck := ek.ConstExpr.GetConstantKind().(type) { - case *exprpb.Constant_StringValue: + switch e.expr.Kind() { + case ast.LiteralKind: + switch ck := e.expr.AsLiteral().(type) { + case types.String: // converting to runes here is an O(n) operation, but // this is consistent with how size is computed at runtime, // and how the language definition defines string size - v = uint64(len([]rune(ck.StringValue))) - case *exprpb.Constant_BytesValue: - v = uint64(len(ck.BytesValue)) - case *exprpb.Constant_BoolValue, *exprpb.Constant_DoubleValue, *exprpb.Constant_DurationValue, - *exprpb.Constant_Int64Value, *exprpb.Constant_TimestampValue, *exprpb.Constant_Uint64Value, - *exprpb.Constant_NullValue: + v = uint64(len([]rune(ck))) + case types.Bytes: + v = uint64(len(ck)) + case types.Bool, types.Double, types.Duration, + types.Int, types.Timestamp, types.Uint, + types.Null: v = uint64(1) default: return nil } - case *exprpb.Expr_ListExpr: - v = uint64(len(ek.ListExpr.GetElements())) - case *exprpb.Expr_StructExpr: - if ek.StructExpr.GetMessageName() == "" { - v = uint64(len(ek.StructExpr.GetEntries())) - } + case ast.ListKind: + v = uint64(e.expr.AsList().Size()) + case ast.MapKind: + v = uint64(e.expr.AsMap().Size()) default: return nil } @@ -265,7 +261,7 @@ type coster struct { iterRanges iterRangeScopes // computedSizes tracks the computed sizes of call results. computedSizes map[int64]SizeEstimate - checkedAST *ast.CheckedAST + checkedAST *ast.AST estimator CostEstimator overloadEstimators map[string]FunctionEstimator // presenceTestCost will either be a zero or one based on whether has() macros count against cost computations. @@ -275,8 +271,8 @@ type coster struct { // Use a stack of iterVar -> iterRange Expr Ids to handle shadowed variable names. type iterRangeScopes map[string][]int64 -func (vs iterRangeScopes) push(varName string, expr *exprpb.Expr) { - vs[varName] = append(vs[varName], expr.GetId()) +func (vs iterRangeScopes) push(varName string, expr ast.Expr) { + vs[varName] = append(vs[varName], expr.ID()) } func (vs iterRangeScopes) pop(varName string) { @@ -324,9 +320,9 @@ func OverloadCostEstimate(overloadID string, functionCoster FunctionEstimator) C } // Cost estimates the cost of the parsed and type checked CEL expression. -func Cost(checker *ast.CheckedAST, estimator CostEstimator, opts ...CostOption) (CostEstimate, error) { +func Cost(checked *ast.AST, estimator CostEstimator, opts ...CostOption) (CostEstimate, error) { c := &coster{ - checkedAST: checker, + checkedAST: checked, estimator: estimator, overloadEstimators: map[string]FunctionEstimator{}, exprPath: map[int64][]string{}, @@ -340,28 +336,30 @@ func Cost(checker *ast.CheckedAST, estimator CostEstimator, opts ...CostOption) return CostEstimate{}, err } } - return c.cost(checker.Expr), nil + return c.cost(checked.Expr()), nil } -func (c *coster) cost(e *exprpb.Expr) CostEstimate { +func (c *coster) cost(e ast.Expr) CostEstimate { if e == nil { return CostEstimate{} } var cost CostEstimate - switch e.GetExprKind().(type) { - case *exprpb.Expr_ConstExpr: + switch e.Kind() { + case ast.LiteralKind: cost = constCost - case *exprpb.Expr_IdentExpr: + case ast.IdentKind: cost = c.costIdent(e) - case *exprpb.Expr_SelectExpr: + case ast.SelectKind: cost = c.costSelect(e) - case *exprpb.Expr_CallExpr: + case ast.CallKind: cost = c.costCall(e) - case *exprpb.Expr_ListExpr: + case ast.ListKind: cost = c.costCreateList(e) - case *exprpb.Expr_StructExpr: + case ast.MapKind: + cost = c.costCreateMap(e) + case ast.StructKind: cost = c.costCreateStruct(e) - case *exprpb.Expr_ComprehensionExpr: + case ast.ComprehensionKind: cost = c.costComprehension(e) default: return CostEstimate{} @@ -369,53 +367,51 @@ func (c *coster) cost(e *exprpb.Expr) CostEstimate { return cost } -func (c *coster) costIdent(e *exprpb.Expr) CostEstimate { - identExpr := e.GetIdentExpr() - +func (c *coster) costIdent(e ast.Expr) CostEstimate { + identName := e.AsIdent() // build and track the field path - if iterRange, ok := c.iterRanges.peek(identExpr.GetName()); ok { - switch c.checkedAST.TypeMap[iterRange].Kind() { + if iterRange, ok := c.iterRanges.peek(identName); ok { + switch c.checkedAST.GetType(iterRange).Kind() { case types.ListKind: c.addPath(e, append(c.exprPath[iterRange], "@items")) case types.MapKind: c.addPath(e, append(c.exprPath[iterRange], "@keys")) } } else { - c.addPath(e, []string{identExpr.GetName()}) + c.addPath(e, []string{identName}) } return selectAndIdentCost } -func (c *coster) costSelect(e *exprpb.Expr) CostEstimate { - sel := e.GetSelectExpr() +func (c *coster) costSelect(e ast.Expr) CostEstimate { + sel := e.AsSelect() var sum CostEstimate - if sel.GetTestOnly() { + if sel.IsTestOnly() { // recurse, but do not add any cost // this is equivalent to how evalTestOnly increments the runtime cost counter // but does not add any additional cost for the qualifier, except here we do // the reverse (ident adds cost) sum = sum.Add(c.presenceTestCost) - sum = sum.Add(c.cost(sel.GetOperand())) + sum = sum.Add(c.cost(sel.Operand())) return sum } - sum = sum.Add(c.cost(sel.GetOperand())) - targetType := c.getType(sel.GetOperand()) + sum = sum.Add(c.cost(sel.Operand())) + targetType := c.getType(sel.Operand()) switch targetType.Kind() { case types.MapKind, types.StructKind, types.TypeParamKind: sum = sum.Add(selectAndIdentCost) } // build and track the field path - c.addPath(e, append(c.getPath(sel.GetOperand()), sel.GetField())) + c.addPath(e, append(c.getPath(sel.Operand()), sel.FieldName())) return sum } -func (c *coster) costCall(e *exprpb.Expr) CostEstimate { - call := e.GetCallExpr() - target := call.GetTarget() - args := call.GetArgs() +func (c *coster) costCall(e ast.Expr) CostEstimate { + call := e.AsCall() + args := call.Args() var sum CostEstimate @@ -426,22 +422,20 @@ func (c *coster) costCall(e *exprpb.Expr) CostEstimate { argTypes[i] = c.newAstNode(arg) } - ref := c.checkedAST.ReferenceMap[e.GetId()] - if ref == nil || len(ref.OverloadIDs) == 0 { + overloadIDs := c.checkedAST.GetOverloadIDs(e.ID()) + if len(overloadIDs) == 0 { return CostEstimate{} } var targetType AstNode - if target != nil { - if call.Target != nil { - sum = sum.Add(c.cost(call.GetTarget())) - targetType = c.newAstNode(call.GetTarget()) - } + if call.IsMemberFunction() { + sum = sum.Add(c.cost(call.Target())) + targetType = c.newAstNode(call.Target()) } // Pick a cost estimate range that covers all the overload cost estimation ranges fnCost := CostEstimate{Min: uint64(math.MaxUint64), Max: 0} var resultSize *SizeEstimate - for _, overload := range ref.OverloadIDs { - overloadCost := c.functionCost(call.GetFunction(), overload, &targetType, argTypes, argCosts) + for _, overload := range overloadIDs { + overloadCost := c.functionCost(call.FunctionName(), overload, &targetType, argTypes, argCosts) fnCost = fnCost.Union(overloadCost.CostEstimate) if overloadCost.ResultSize != nil { if resultSize == nil { @@ -464,62 +458,57 @@ func (c *coster) costCall(e *exprpb.Expr) CostEstimate { } } if resultSize != nil { - c.computedSizes[e.GetId()] = *resultSize + c.computedSizes[e.ID()] = *resultSize } return sum.Add(fnCost) } -func (c *coster) costCreateList(e *exprpb.Expr) CostEstimate { - create := e.GetListExpr() +func (c *coster) costCreateList(e ast.Expr) CostEstimate { + create := e.AsList() var sum CostEstimate - for _, e := range create.GetElements() { + for _, e := range create.Elements() { sum = sum.Add(c.cost(e)) } return sum.Add(createListBaseCost) } -func (c *coster) costCreateStruct(e *exprpb.Expr) CostEstimate { - str := e.GetStructExpr() - if str.MessageName != "" { - return c.costCreateMessage(e) - } - return c.costCreateMap(e) -} - -func (c *coster) costCreateMap(e *exprpb.Expr) CostEstimate { - mapVal := e.GetStructExpr() +func (c *coster) costCreateMap(e ast.Expr) CostEstimate { + mapVal := e.AsMap() var sum CostEstimate - for _, ent := range mapVal.GetEntries() { - key := ent.GetMapKey() - sum = sum.Add(c.cost(key)) - - sum = sum.Add(c.cost(ent.GetValue())) + for _, ent := range mapVal.Entries() { + entry := ent.AsMapEntry() + sum = sum.Add(c.cost(entry.Key())) + sum = sum.Add(c.cost(entry.Value())) } return sum.Add(createMapBaseCost) } -func (c *coster) costCreateMessage(e *exprpb.Expr) CostEstimate { - msgVal := e.GetStructExpr() +func (c *coster) costCreateStruct(e ast.Expr) CostEstimate { + msgVal := e.AsStruct() var sum CostEstimate - for _, ent := range msgVal.GetEntries() { - sum = sum.Add(c.cost(ent.GetValue())) + for _, ent := range msgVal.Fields() { + field := ent.AsStructField() + sum = sum.Add(c.cost(field.Value())) } return sum.Add(createMessageBaseCost) } -func (c *coster) costComprehension(e *exprpb.Expr) CostEstimate { - comp := e.GetComprehensionExpr() +func (c *coster) costComprehension(e ast.Expr) CostEstimate { + comp := e.AsComprehension() var sum CostEstimate - sum = sum.Add(c.cost(comp.GetIterRange())) - sum = sum.Add(c.cost(comp.GetAccuInit())) + sum = sum.Add(c.cost(comp.IterRange())) + sum = sum.Add(c.cost(comp.AccuInit())) // Track the iterRange of each IterVar for field path construction - c.iterRanges.push(comp.GetIterVar(), comp.GetIterRange()) - loopCost := c.cost(comp.GetLoopCondition()) - stepCost := c.cost(comp.GetLoopStep()) - c.iterRanges.pop(comp.GetIterVar()) - sum = sum.Add(c.cost(comp.Result)) - rangeCnt := c.sizeEstimate(c.newAstNode(comp.GetIterRange())) + c.iterRanges.push(comp.IterVar(), comp.IterRange()) + loopCost := c.cost(comp.LoopCondition()) + stepCost := c.cost(comp.LoopStep()) + c.iterRanges.pop(comp.IterVar()) + sum = sum.Add(c.cost(comp.Result())) + rangeCnt := c.sizeEstimate(c.newAstNode(comp.IterRange())) + + c.computedSizes[e.ID()] = rangeCnt + rangeCost := rangeCnt.MultiplyByCost(stepCost.Add(loopCost)) sum = sum.Add(rangeCost) @@ -671,26 +660,26 @@ func (c *coster) functionCost(function, overloadID string, target *AstNode, args return CallEstimate{CostEstimate: CostEstimate{Min: 1, Max: 1}.Add(argCostSum())} } -func (c *coster) getType(e *exprpb.Expr) *types.Type { - return c.checkedAST.TypeMap[e.GetId()] +func (c *coster) getType(e ast.Expr) *types.Type { + return c.checkedAST.GetType(e.ID()) } -func (c *coster) getPath(e *exprpb.Expr) []string { - return c.exprPath[e.GetId()] +func (c *coster) getPath(e ast.Expr) []string { + return c.exprPath[e.ID()] } -func (c *coster) addPath(e *exprpb.Expr, path []string) { - c.exprPath[e.GetId()] = path +func (c *coster) addPath(e ast.Expr, path []string) { + c.exprPath[e.ID()] = path } -func (c *coster) newAstNode(e *exprpb.Expr) *astNode { +func (c *coster) newAstNode(e ast.Expr) *astNode { path := c.getPath(e) if len(path) > 0 && path[0] == parser.AccumulatorName { // only provide paths to root vars; omit accumulator vars path = nil } var derivedSize *SizeEstimate - if size, ok := c.computedSizes[e.GetId()]; ok { + if size, ok := c.computedSizes[e.ID()]; ok { derivedSize = &size } return &astNode{ diff --git a/vendor/github.com/google/cel-go/checker/decls/decls.go b/vendor/github.com/google/cel-go/checker/decls/decls.go index 0d91bef5145..c0e5de469f5 100644 --- a/vendor/github.com/google/cel-go/checker/decls/decls.go +++ b/vendor/github.com/google/cel-go/checker/decls/decls.go @@ -67,7 +67,7 @@ func NewAbstractType(name string, paramTypes ...*exprpb.Type) *exprpb.Type { // NewOptionalType constructs an abstract type indicating that the parameterized type // may be contained within the object. func NewOptionalType(paramType *exprpb.Type) *exprpb.Type { - return NewAbstractType("optional", paramType) + return NewAbstractType("optional_type", paramType) } // NewFunctionType creates a function invocation contract, typically only used diff --git a/vendor/github.com/google/cel-go/checker/env.go b/vendor/github.com/google/cel-go/checker/env.go index 70682b17c6b..d5ac05014ee 100644 --- a/vendor/github.com/google/cel-go/checker/env.go +++ b/vendor/github.com/google/cel-go/checker/env.go @@ -146,6 +146,14 @@ func (e *Env) LookupIdent(name string) *decls.VariableDecl { return decl } + if i, found := e.provider.FindIdent(candidate); found { + if t, ok := i.(*types.Type); ok { + decl := decls.NewVariable(candidate, types.NewTypeTypeWithParam(t)) + e.declarations.AddIdent(decl) + return decl + } + } + // Next try to import this as an enum value by splitting the name in a type prefix and // the enum inside. if enumValue := e.provider.EnumValue(candidate); enumValue.Type() != types.ErrType { diff --git a/vendor/github.com/google/cel-go/checker/errors.go b/vendor/github.com/google/cel-go/checker/errors.go index c2b96498d1d..8b3bf0b8b64 100644 --- a/vendor/github.com/google/cel-go/checker/errors.go +++ b/vendor/github.com/google/cel-go/checker/errors.go @@ -15,13 +15,9 @@ package checker import ( - "reflect" - "github.com/google/cel-go/common" "github.com/google/cel-go/common/ast" "github.com/google/cel-go/common/types" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" ) // typeErrors is a specialization of Errors. @@ -34,9 +30,9 @@ func (e *typeErrors) fieldTypeMismatch(id int64, l common.Location, name string, name, FormatCELType(field), FormatCELType(value)) } -func (e *typeErrors) incompatibleType(id int64, l common.Location, ex *exprpb.Expr, prev, next *types.Type) { +func (e *typeErrors) incompatibleType(id int64, l common.Location, ex ast.Expr, prev, next *types.Type) { e.errs.ReportErrorAtID(id, l, - "incompatible type already exists for expression: %v(%d) old:%v, new:%v", ex, ex.GetId(), prev, next) + "incompatible type already exists for expression: %v(%d) old:%v, new:%v", ex, ex.ID(), prev, next) } func (e *typeErrors) noMatchingOverload(id int64, l common.Location, name string, args []*types.Type, isInstance bool) { @@ -49,7 +45,7 @@ func (e *typeErrors) notAComprehensionRange(id int64, l common.Location, t *type FormatCELType(t)) } -func (e *typeErrors) notAnOptionalFieldSelection(id int64, l common.Location, field *exprpb.Expr) { +func (e *typeErrors) notAnOptionalFieldSelection(id int64, l common.Location, field ast.Expr) { e.errs.ReportErrorAtID(id, l, "unsupported optional field selection: %v", field) } @@ -61,9 +57,9 @@ func (e *typeErrors) notAMessageType(id int64, l common.Location, typeName strin e.errs.ReportErrorAtID(id, l, "'%s' is not a message type", typeName) } -func (e *typeErrors) referenceRedefinition(id int64, l common.Location, ex *exprpb.Expr, prev, next *ast.ReferenceInfo) { +func (e *typeErrors) referenceRedefinition(id int64, l common.Location, ex ast.Expr, prev, next *ast.ReferenceInfo) { e.errs.ReportErrorAtID(id, l, - "reference already exists for expression: %v(%d) old:%v, new:%v", ex, ex.GetId(), prev, next) + "reference already exists for expression: %v(%d) old:%v, new:%v", ex, ex.ID(), prev, next) } func (e *typeErrors) typeDoesNotSupportFieldSelection(id int64, l common.Location, t *types.Type) { @@ -87,6 +83,6 @@ func (e *typeErrors) unexpectedFailedResolution(id int64, l common.Location, typ e.errs.ReportErrorAtID(id, l, "unexpected failed resolution of '%s'", typeName) } -func (e *typeErrors) unexpectedASTType(id int64, l common.Location, ex *exprpb.Expr) { - e.errs.ReportErrorAtID(id, l, "unrecognized ast type: %v", reflect.TypeOf(ex)) +func (e *typeErrors) unexpectedASTType(id int64, l common.Location, kind, typeName string) { + e.errs.ReportErrorAtID(id, l, "unexpected %s type: %v", kind, typeName) } diff --git a/vendor/github.com/google/cel-go/checker/printer.go b/vendor/github.com/google/cel-go/checker/printer.go index 15cba06ee97..7a3984f02ce 100644 --- a/vendor/github.com/google/cel-go/checker/printer.go +++ b/vendor/github.com/google/cel-go/checker/printer.go @@ -17,40 +17,40 @@ package checker import ( "sort" + "github.com/google/cel-go/common/ast" "github.com/google/cel-go/common/debug" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" ) type semanticAdorner struct { - checks *exprpb.CheckedExpr + checked *ast.AST } var _ debug.Adorner = &semanticAdorner{} func (a *semanticAdorner) GetMetadata(elem any) string { result := "" - e, isExpr := elem.(*exprpb.Expr) + e, isExpr := elem.(ast.Expr) if !isExpr { return result } - t := a.checks.TypeMap[e.GetId()] + t := a.checked.TypeMap()[e.ID()] if t != nil { result += "~" - result += FormatCheckedType(t) + result += FormatCELType(t) } - switch e.GetExprKind().(type) { - case *exprpb.Expr_IdentExpr, - *exprpb.Expr_CallExpr, - *exprpb.Expr_StructExpr, - *exprpb.Expr_SelectExpr: - if ref, found := a.checks.ReferenceMap[e.GetId()]; found { - if len(ref.GetOverloadId()) == 0 { + switch e.Kind() { + case ast.IdentKind, + ast.CallKind, + ast.ListKind, + ast.StructKind, + ast.SelectKind: + if ref, found := a.checked.ReferenceMap()[e.ID()]; found { + if len(ref.OverloadIDs) == 0 { result += "^" + ref.Name } else { - sort.Strings(ref.GetOverloadId()) - for i, overload := range ref.GetOverloadId() { + sort.Strings(ref.OverloadIDs) + for i, overload := range ref.OverloadIDs { if i == 0 { result += "^" } else { @@ -68,7 +68,7 @@ func (a *semanticAdorner) GetMetadata(elem any) string { // Print returns a string representation of the Expr message, // annotated with types from the CheckedExpr. The Expr must // be a sub-expression embedded in the CheckedExpr. -func Print(e *exprpb.Expr, checks *exprpb.CheckedExpr) string { - a := &semanticAdorner{checks: checks} +func Print(e ast.Expr, checked *ast.AST) string { + a := &semanticAdorner{checked: checked} return debug.ToAdornedDebugString(e, a) } diff --git a/vendor/github.com/google/cel-go/checker/types.go b/vendor/github.com/google/cel-go/checker/types.go index e2373d1b7cb..4c65b2737cd 100644 --- a/vendor/github.com/google/cel-go/checker/types.go +++ b/vendor/github.com/google/cel-go/checker/types.go @@ -41,7 +41,7 @@ func isError(t *types.Type) bool { func isOptional(t *types.Type) bool { if t.Kind() == types.OpaqueKind { - return t.TypeName() == "optional" + return t.TypeName() == "optional_type" } return false } @@ -137,7 +137,11 @@ func internalIsAssignable(m *mapping, t1, t2 *types.Type) bool { case types.BoolKind, types.BytesKind, types.DoubleKind, types.IntKind, types.StringKind, types.UintKind, types.AnyKind, types.DurationKind, types.TimestampKind, types.StructKind: - return t1.IsAssignableType(t2) + // Test whether t2 is assignable from t1. The order of this check won't usually matter; + // however, there may be cases where type capabilities are expanded beyond what is supported + // in the current common/types package. For example, an interface designation for a group of + // Struct types. + return t2.IsAssignableType(t1) case types.TypeKind: return kind2 == types.TypeKind case types.OpaqueKind, types.ListKind, types.MapKind: @@ -256,7 +260,7 @@ func notReferencedIn(m *mapping, t, withinType *types.Type) bool { return true } return notReferencedIn(m, t, wtSub) - case types.OpaqueKind, types.ListKind, types.MapKind: + case types.OpaqueKind, types.ListKind, types.MapKind, types.TypeKind: for _, pt := range withinType.Parameters() { if !notReferencedIn(m, t, pt) { return false @@ -288,7 +292,8 @@ func substitute(m *mapping, t *types.Type, typeParamToDyn bool) *types.Type { substitute(m, t.Parameters()[1], typeParamToDyn)) case types.TypeKind: if len(t.Parameters()) > 0 { - return types.NewTypeTypeWithParam(substitute(m, t.Parameters()[0], typeParamToDyn)) + tParam := t.Parameters()[0] + return types.NewTypeTypeWithParam(substitute(m, tParam, typeParamToDyn)) } return t default: diff --git a/vendor/github.com/google/cel-go/common/ast/BUILD.bazel b/vendor/github.com/google/cel-go/common/ast/BUILD.bazel index 7269cdff5f7..5c40c37813b 100644 --- a/vendor/github.com/google/cel-go/common/ast/BUILD.bazel +++ b/vendor/github.com/google/cel-go/common/ast/BUILD.bazel @@ -1,12 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") package( - default_visibility = [ - "//cel:__subpackages__", - "//checker:__subpackages__", - "//common:__subpackages__", - "//interpreter:__subpackages__", - ], + default_visibility = ["//visibility:public"], licenses = ["notice"], # Apache 2.0 ) @@ -14,10 +9,14 @@ go_library( name = "go_default_library", srcs = [ "ast.go", + "conversion.go", "expr.go", + "factory.go", + "navigable.go", ], importpath = "github.com/google/cel-go/common/ast", deps = [ + "//common:go_default_library", "//common/types:go_default_library", "//common/types/ref:go_default_library", "@org_golang_google_genproto_googleapis_api//expr/v1alpha1:go_default_library", @@ -29,7 +28,9 @@ go_test( name = "go_default_test", srcs = [ "ast_test.go", + "conversion_test.go", "expr_test.go", + "navigable_test.go", ], embed = [ ":go_default_library", @@ -48,5 +49,6 @@ go_test( "//test/proto3pb:go_default_library", "@org_golang_google_genproto_googleapis_api//expr/v1alpha1:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", + "@org_golang_google_protobuf//encoding/prototext:go_default_library", ], -) \ No newline at end of file +) diff --git a/vendor/github.com/google/cel-go/common/ast/ast.go b/vendor/github.com/google/cel-go/common/ast/ast.go index b3c150793a9..355ddd49a2b 100644 --- a/vendor/github.com/google/cel-go/common/ast/ast.go +++ b/vendor/github.com/google/cel-go/common/ast/ast.go @@ -16,74 +16,361 @@ package ast import ( - "fmt" - + "github.com/google/cel-go/common" "github.com/google/cel-go/common/types" "github.com/google/cel-go/common/types/ref" +) - structpb "google.golang.org/protobuf/types/known/structpb" +// AST contains a protobuf expression and source info along with CEL-native type and reference information. +type AST struct { + expr Expr + sourceInfo *SourceInfo + typeMap map[int64]*types.Type + refMap map[int64]*ReferenceInfo +} - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" -) +// Expr returns the root ast.Expr value in the AST. +func (a *AST) Expr() Expr { + if a == nil { + return nilExpr + } + return a.expr +} + +// SourceInfo returns the source metadata associated with the parse / type-check passes. +func (a *AST) SourceInfo() *SourceInfo { + if a == nil { + return nil + } + return a.sourceInfo +} -// CheckedAST contains a protobuf expression and source info along with CEL-native type and reference information. -type CheckedAST struct { - Expr *exprpb.Expr - SourceInfo *exprpb.SourceInfo - TypeMap map[int64]*types.Type - ReferenceMap map[int64]*ReferenceInfo -} - -// CheckedASTToCheckedExpr converts a CheckedAST to a CheckedExpr protobouf. -func CheckedASTToCheckedExpr(ast *CheckedAST) (*exprpb.CheckedExpr, error) { - refMap := make(map[int64]*exprpb.Reference, len(ast.ReferenceMap)) - for id, ref := range ast.ReferenceMap { - r, err := ReferenceInfoToReferenceExpr(ref) - if err != nil { - return nil, err +// GetType returns the type for the expression at the given id, if one exists, else types.DynType. +func (a *AST) GetType(id int64) *types.Type { + if t, found := a.TypeMap()[id]; found { + return t + } + return types.DynType +} + +// SetType sets the type of the expression node at the given id. +func (a *AST) SetType(id int64, t *types.Type) { + if a == nil { + return + } + a.typeMap[id] = t +} + +// TypeMap returns the map of expression ids to type-checked types. +// +// If the AST is not type-checked, the map will be empty. +func (a *AST) TypeMap() map[int64]*types.Type { + if a == nil { + return map[int64]*types.Type{} + } + return a.typeMap +} + +// GetOverloadIDs returns the set of overload function names for a given expression id. +// +// If the expression id is not a function call, or the AST is not type-checked, the result will be empty. +func (a *AST) GetOverloadIDs(id int64) []string { + if ref, found := a.ReferenceMap()[id]; found { + return ref.OverloadIDs + } + return []string{} +} + +// ReferenceMap returns the map of expression id to identifier, constant, and function references. +func (a *AST) ReferenceMap() map[int64]*ReferenceInfo { + if a == nil { + return map[int64]*ReferenceInfo{} + } + return a.refMap +} + +// SetReference adds a reference to the checked AST type map. +func (a *AST) SetReference(id int64, r *ReferenceInfo) { + if a == nil { + return + } + a.refMap[id] = r +} + +// IsChecked returns whether the AST is type-checked. +func (a *AST) IsChecked() bool { + return a != nil && len(a.TypeMap()) > 0 +} + +// NewAST creates a base AST instance with an ast.Expr and ast.SourceInfo value. +func NewAST(e Expr, sourceInfo *SourceInfo) *AST { + if e == nil { + e = nilExpr + } + return &AST{ + expr: e, + sourceInfo: sourceInfo, + typeMap: make(map[int64]*types.Type), + refMap: make(map[int64]*ReferenceInfo), + } +} + +// NewCheckedAST wraps an parsed AST and augments it with type and reference metadata. +func NewCheckedAST(parsed *AST, typeMap map[int64]*types.Type, refMap map[int64]*ReferenceInfo) *AST { + return &AST{ + expr: parsed.Expr(), + sourceInfo: parsed.SourceInfo(), + typeMap: typeMap, + refMap: refMap, + } +} + +// Copy creates a deep copy of the Expr and SourceInfo values in the input AST. +// +// Copies of the Expr value are generated using an internal default ExprFactory. +func Copy(a *AST) *AST { + if a == nil { + return nil + } + e := defaultFactory.CopyExpr(a.expr) + if !a.IsChecked() { + return NewAST(e, CopySourceInfo(a.SourceInfo())) + } + typesCopy := make(map[int64]*types.Type, len(a.typeMap)) + for id, t := range a.typeMap { + typesCopy[id] = t + } + refsCopy := make(map[int64]*ReferenceInfo, len(a.refMap)) + for id, r := range a.refMap { + refsCopy[id] = r + } + return NewCheckedAST(NewAST(e, CopySourceInfo(a.SourceInfo())), typesCopy, refsCopy) +} + +// MaxID returns the upper-bound, non-inclusive, of ids present within the AST's Expr value. +func MaxID(a *AST) int64 { + visitor := &maxIDVisitor{maxID: 1} + PostOrderVisit(a.Expr(), visitor) + for id, call := range a.SourceInfo().MacroCalls() { + PostOrderVisit(call, visitor) + if id > visitor.maxID { + visitor.maxID = id + 1 } - refMap[id] = r } - typeMap := make(map[int64]*exprpb.Type, len(ast.TypeMap)) - for id, typ := range ast.TypeMap { - t, err := types.TypeToExprType(typ) - if err != nil { - return nil, err + return visitor.maxID + 1 +} + +// NewSourceInfo creates a simple SourceInfo object from an input common.Source value. +func NewSourceInfo(src common.Source) *SourceInfo { + var lineOffsets []int32 + var desc string + baseLine := int32(0) + baseCol := int32(0) + if src != nil { + desc = src.Description() + lineOffsets = src.LineOffsets() + // Determine whether the source metadata should be computed relative + // to a base line and column value. This can be determined by requesting + // the location for offset 0 from the source object. + if loc, found := src.OffsetLocation(0); found { + baseLine = int32(loc.Line()) - 1 + baseCol = int32(loc.Column()) } - typeMap[id] = t - } - return &exprpb.CheckedExpr{ - Expr: ast.Expr, - SourceInfo: ast.SourceInfo, - ReferenceMap: refMap, - TypeMap: typeMap, - }, nil -} - -// CheckedExprToCheckedAST converts a CheckedExpr protobuf to a CheckedAST instance. -func CheckedExprToCheckedAST(checked *exprpb.CheckedExpr) (*CheckedAST, error) { - refMap := make(map[int64]*ReferenceInfo, len(checked.GetReferenceMap())) - for id, ref := range checked.GetReferenceMap() { - r, err := ReferenceExprToReferenceInfo(ref) - if err != nil { - return nil, err + } + return &SourceInfo{ + desc: desc, + lines: lineOffsets, + baseLine: baseLine, + baseCol: baseCol, + offsetRanges: make(map[int64]OffsetRange), + macroCalls: make(map[int64]Expr), + } +} + +// CopySourceInfo creates a deep copy of the MacroCalls within the input SourceInfo. +// +// Copies of macro Expr values are generated using an internal default ExprFactory. +func CopySourceInfo(info *SourceInfo) *SourceInfo { + if info == nil { + return nil + } + rangesCopy := make(map[int64]OffsetRange, len(info.offsetRanges)) + for id, off := range info.offsetRanges { + rangesCopy[id] = off + } + callsCopy := make(map[int64]Expr, len(info.macroCalls)) + for id, call := range info.macroCalls { + callsCopy[id] = defaultFactory.CopyExpr(call) + } + return &SourceInfo{ + syntax: info.syntax, + desc: info.desc, + lines: info.lines, + baseLine: info.baseLine, + baseCol: info.baseCol, + offsetRanges: rangesCopy, + macroCalls: callsCopy, + } +} + +// SourceInfo records basic information about the expression as a textual input and +// as a parsed expression value. +type SourceInfo struct { + syntax string + desc string + lines []int32 + baseLine int32 + baseCol int32 + offsetRanges map[int64]OffsetRange + macroCalls map[int64]Expr +} + +// SyntaxVersion returns the syntax version associated with the text expression. +func (s *SourceInfo) SyntaxVersion() string { + if s == nil { + return "" + } + return s.syntax +} + +// Description provides information about where the expression came from. +func (s *SourceInfo) Description() string { + if s == nil { + return "" + } + return s.desc +} + +// LineOffsets returns a list of the 0-based character offsets in the input text where newlines appear. +func (s *SourceInfo) LineOffsets() []int32 { + if s == nil { + return []int32{} + } + return s.lines +} + +// MacroCalls returns a map of expression id to ast.Expr value where the id represents the expression +// node where the macro was inserted into the AST, and the ast.Expr value represents the original call +// signature which was replaced. +func (s *SourceInfo) MacroCalls() map[int64]Expr { + if s == nil { + return map[int64]Expr{} + } + return s.macroCalls +} + +// GetMacroCall returns the original ast.Expr value for the given expression if it was generated via +// a macro replacement. +// +// Note, parsing options must be enabled to track macro calls before this method will return a value. +func (s *SourceInfo) GetMacroCall(id int64) (Expr, bool) { + e, found := s.MacroCalls()[id] + return e, found +} + +// SetMacroCall records a macro call at a specific location. +func (s *SourceInfo) SetMacroCall(id int64, e Expr) { + if s != nil { + s.macroCalls[id] = e + } +} + +// ClearMacroCall removes the macro call at the given expression id. +func (s *SourceInfo) ClearMacroCall(id int64) { + if s != nil { + delete(s.macroCalls, id) + } +} + +// OffsetRanges returns a map of expression id to OffsetRange values where the range indicates either: +// the start and end position in the input stream where the expression occurs, or the start position +// only. If the range only captures start position, the stop position of the range will be equal to +// the start. +func (s *SourceInfo) OffsetRanges() map[int64]OffsetRange { + if s == nil { + return map[int64]OffsetRange{} + } + return s.offsetRanges +} + +// GetOffsetRange retrieves an OffsetRange for the given expression id if one exists. +func (s *SourceInfo) GetOffsetRange(id int64) (OffsetRange, bool) { + if s == nil { + return OffsetRange{}, false + } + o, found := s.offsetRanges[id] + return o, found +} + +// SetOffsetRange sets the OffsetRange for the given expression id. +func (s *SourceInfo) SetOffsetRange(id int64, o OffsetRange) { + if s == nil { + return + } + s.offsetRanges[id] = o +} + +// GetStartLocation calculates the human-readable 1-based line and 0-based column of the first character +// of the expression node at the id. +func (s *SourceInfo) GetStartLocation(id int64) common.Location { + if o, found := s.GetOffsetRange(id); found { + line := 1 + col := int(o.Start) + for _, lineOffset := range s.LineOffsets() { + if lineOffset < o.Start { + line++ + col = int(o.Start - lineOffset) + } else { + break + } } - refMap[id] = r + return common.NewLocation(line, col) } - typeMap := make(map[int64]*types.Type, len(checked.GetTypeMap())) - for id, typ := range checked.GetTypeMap() { - t, err := types.ExprTypeToType(typ) - if err != nil { - return nil, err + return common.NoLocation +} + +// GetStopLocation calculates the human-readable 1-based line and 0-based column of the last character for +// the expression node at the given id. +// +// If the SourceInfo was generated from a serialized protobuf representation, the stop location will +// be identical to the start location for the expression. +func (s *SourceInfo) GetStopLocation(id int64) common.Location { + if o, found := s.GetOffsetRange(id); found { + line := 1 + col := int(o.Stop) + for _, lineOffset := range s.LineOffsets() { + if lineOffset < o.Stop { + line++ + col = int(o.Stop - lineOffset) + } else { + break + } } - typeMap[id] = t + return common.NewLocation(line, col) } - return &CheckedAST{ - Expr: checked.GetExpr(), - SourceInfo: checked.GetSourceInfo(), - ReferenceMap: refMap, - TypeMap: typeMap, - }, nil + return common.NoLocation +} + +// ComputeOffset calculates the 0-based character offset from a 1-based line and 0-based column. +func (s *SourceInfo) ComputeOffset(line, col int32) int32 { + if s != nil { + line = s.baseLine + line + col = s.baseCol + col + } + if line == 1 { + return col + } + if line < 1 || line > int32(len(s.LineOffsets())) { + return -1 + } + offset := s.LineOffsets()[line-2] + return offset + col +} + +// OffsetRange captures the start and stop positions of a section of text in the input expression. +type OffsetRange struct { + Start int32 + Stop int32 } // ReferenceInfo contains a CEL native representation of an identifier reference which may refer to @@ -149,78 +436,21 @@ func (r *ReferenceInfo) Equals(other *ReferenceInfo) bool { return true } -// ReferenceInfoToReferenceExpr converts a ReferenceInfo instance to a protobuf Reference suitable for serialization. -func ReferenceInfoToReferenceExpr(info *ReferenceInfo) (*exprpb.Reference, error) { - c, err := ValToConstant(info.Value) - if err != nil { - return nil, err - } - return &exprpb.Reference{ - Name: info.Name, - OverloadId: info.OverloadIDs, - Value: c, - }, nil +type maxIDVisitor struct { + maxID int64 + *baseVisitor } -// ReferenceExprToReferenceInfo converts a protobuf Reference into a CEL-native ReferenceInfo instance. -func ReferenceExprToReferenceInfo(ref *exprpb.Reference) (*ReferenceInfo, error) { - v, err := ConstantToVal(ref.GetValue()) - if err != nil { - return nil, err +// VisitExpr updates the max identifier if the incoming expression id is greater than previously observed. +func (v *maxIDVisitor) VisitExpr(e Expr) { + if v.maxID < e.ID() { + v.maxID = e.ID() } - return &ReferenceInfo{ - Name: ref.GetName(), - OverloadIDs: ref.GetOverloadId(), - Value: v, - }, nil } -// ValToConstant converts a CEL-native ref.Val to a protobuf Constant. -// -// Only simple scalar types are supported by this method. -func ValToConstant(v ref.Val) (*exprpb.Constant, error) { - if v == nil { - return nil, nil - } - switch v.Type() { - case types.BoolType: - return &exprpb.Constant{ConstantKind: &exprpb.Constant_BoolValue{BoolValue: v.Value().(bool)}}, nil - case types.BytesType: - return &exprpb.Constant{ConstantKind: &exprpb.Constant_BytesValue{BytesValue: v.Value().([]byte)}}, nil - case types.DoubleType: - return &exprpb.Constant{ConstantKind: &exprpb.Constant_DoubleValue{DoubleValue: v.Value().(float64)}}, nil - case types.IntType: - return &exprpb.Constant{ConstantKind: &exprpb.Constant_Int64Value{Int64Value: v.Value().(int64)}}, nil - case types.NullType: - return &exprpb.Constant{ConstantKind: &exprpb.Constant_NullValue{NullValue: structpb.NullValue_NULL_VALUE}}, nil - case types.StringType: - return &exprpb.Constant{ConstantKind: &exprpb.Constant_StringValue{StringValue: v.Value().(string)}}, nil - case types.UintType: - return &exprpb.Constant{ConstantKind: &exprpb.Constant_Uint64Value{Uint64Value: v.Value().(uint64)}}, nil - } - return nil, fmt.Errorf("unsupported constant kind: %v", v.Type()) -} - -// ConstantToVal converts a protobuf Constant to a CEL-native ref.Val. -func ConstantToVal(c *exprpb.Constant) (ref.Val, error) { - if c == nil { - return nil, nil - } - switch c.GetConstantKind().(type) { - case *exprpb.Constant_BoolValue: - return types.Bool(c.GetBoolValue()), nil - case *exprpb.Constant_BytesValue: - return types.Bytes(c.GetBytesValue()), nil - case *exprpb.Constant_DoubleValue: - return types.Double(c.GetDoubleValue()), nil - case *exprpb.Constant_Int64Value: - return types.Int(c.GetInt64Value()), nil - case *exprpb.Constant_NullValue: - return types.NullValue, nil - case *exprpb.Constant_StringValue: - return types.String(c.GetStringValue()), nil - case *exprpb.Constant_Uint64Value: - return types.Uint(c.GetUint64Value()), nil - } - return nil, fmt.Errorf("unsupported constant kind: %v", c.GetConstantKind()) +// VisitEntryExpr updates the max identifier if the incoming entry id is greater than previously observed. +func (v *maxIDVisitor) VisitEntryExpr(e EntryExpr) { + if v.maxID < e.ID() { + v.maxID = e.ID() + } } diff --git a/vendor/github.com/google/cel-go/common/ast/conversion.go b/vendor/github.com/google/cel-go/common/ast/conversion.go new file mode 100644 index 00000000000..8f2c4bd1e64 --- /dev/null +++ b/vendor/github.com/google/cel-go/common/ast/conversion.go @@ -0,0 +1,632 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +import ( + "fmt" + + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" + + structpb "google.golang.org/protobuf/types/known/structpb" + + exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" +) + +// ToProto converts an AST to a CheckedExpr protobouf. +func ToProto(ast *AST) (*exprpb.CheckedExpr, error) { + refMap := make(map[int64]*exprpb.Reference, len(ast.ReferenceMap())) + for id, ref := range ast.ReferenceMap() { + r, err := ReferenceInfoToProto(ref) + if err != nil { + return nil, err + } + refMap[id] = r + } + typeMap := make(map[int64]*exprpb.Type, len(ast.TypeMap())) + for id, typ := range ast.TypeMap() { + t, err := types.TypeToExprType(typ) + if err != nil { + return nil, err + } + typeMap[id] = t + } + e, err := ExprToProto(ast.Expr()) + if err != nil { + return nil, err + } + info, err := SourceInfoToProto(ast.SourceInfo()) + if err != nil { + return nil, err + } + return &exprpb.CheckedExpr{ + Expr: e, + SourceInfo: info, + ReferenceMap: refMap, + TypeMap: typeMap, + }, nil +} + +// ToAST converts a CheckedExpr protobuf to an AST instance. +func ToAST(checked *exprpb.CheckedExpr) (*AST, error) { + refMap := make(map[int64]*ReferenceInfo, len(checked.GetReferenceMap())) + for id, ref := range checked.GetReferenceMap() { + r, err := ProtoToReferenceInfo(ref) + if err != nil { + return nil, err + } + refMap[id] = r + } + typeMap := make(map[int64]*types.Type, len(checked.GetTypeMap())) + for id, typ := range checked.GetTypeMap() { + t, err := types.ExprTypeToType(typ) + if err != nil { + return nil, err + } + typeMap[id] = t + } + info, err := ProtoToSourceInfo(checked.GetSourceInfo()) + if err != nil { + return nil, err + } + root, err := ProtoToExpr(checked.GetExpr()) + if err != nil { + return nil, err + } + ast := NewCheckedAST(NewAST(root, info), typeMap, refMap) + return ast, nil +} + +// ProtoToExpr converts a protobuf Expr value to an ast.Expr value. +func ProtoToExpr(e *exprpb.Expr) (Expr, error) { + factory := NewExprFactory() + return exprInternal(factory, e) +} + +// ProtoToEntryExpr converts a protobuf struct/map entry to an ast.EntryExpr +func ProtoToEntryExpr(e *exprpb.Expr_CreateStruct_Entry) (EntryExpr, error) { + factory := NewExprFactory() + switch e.GetKeyKind().(type) { + case *exprpb.Expr_CreateStruct_Entry_FieldKey: + return exprStructField(factory, e.GetId(), e) + case *exprpb.Expr_CreateStruct_Entry_MapKey: + return exprMapEntry(factory, e.GetId(), e) + } + return nil, fmt.Errorf("unsupported expr entry kind: %v", e) +} + +func exprInternal(factory ExprFactory, e *exprpb.Expr) (Expr, error) { + id := e.GetId() + switch e.GetExprKind().(type) { + case *exprpb.Expr_CallExpr: + return exprCall(factory, id, e.GetCallExpr()) + case *exprpb.Expr_ComprehensionExpr: + return exprComprehension(factory, id, e.GetComprehensionExpr()) + case *exprpb.Expr_ConstExpr: + return exprLiteral(factory, id, e.GetConstExpr()) + case *exprpb.Expr_IdentExpr: + return exprIdent(factory, id, e.GetIdentExpr()) + case *exprpb.Expr_ListExpr: + return exprList(factory, id, e.GetListExpr()) + case *exprpb.Expr_SelectExpr: + return exprSelect(factory, id, e.GetSelectExpr()) + case *exprpb.Expr_StructExpr: + s := e.GetStructExpr() + if s.GetMessageName() != "" { + return exprStruct(factory, id, s) + } + return exprMap(factory, id, s) + } + return factory.NewUnspecifiedExpr(id), nil +} + +func exprCall(factory ExprFactory, id int64, call *exprpb.Expr_Call) (Expr, error) { + var err error + args := make([]Expr, len(call.GetArgs())) + for i, a := range call.GetArgs() { + args[i], err = exprInternal(factory, a) + if err != nil { + return nil, err + } + } + if call.GetTarget() == nil { + return factory.NewCall(id, call.GetFunction(), args...), nil + } + + target, err := exprInternal(factory, call.GetTarget()) + if err != nil { + return nil, err + } + return factory.NewMemberCall(id, call.GetFunction(), target, args...), nil +} + +func exprComprehension(factory ExprFactory, id int64, comp *exprpb.Expr_Comprehension) (Expr, error) { + iterRange, err := exprInternal(factory, comp.GetIterRange()) + if err != nil { + return nil, err + } + accuInit, err := exprInternal(factory, comp.GetAccuInit()) + if err != nil { + return nil, err + } + loopCond, err := exprInternal(factory, comp.GetLoopCondition()) + if err != nil { + return nil, err + } + loopStep, err := exprInternal(factory, comp.GetLoopStep()) + if err != nil { + return nil, err + } + result, err := exprInternal(factory, comp.GetResult()) + if err != nil { + return nil, err + } + return factory.NewComprehension(id, + iterRange, + comp.GetIterVar(), + comp.GetAccuVar(), + accuInit, + loopCond, + loopStep, + result), nil +} + +func exprLiteral(factory ExprFactory, id int64, c *exprpb.Constant) (Expr, error) { + val, err := ConstantToVal(c) + if err != nil { + return nil, err + } + return factory.NewLiteral(id, val), nil +} + +func exprIdent(factory ExprFactory, id int64, i *exprpb.Expr_Ident) (Expr, error) { + return factory.NewIdent(id, i.GetName()), nil +} + +func exprList(factory ExprFactory, id int64, l *exprpb.Expr_CreateList) (Expr, error) { + elems := make([]Expr, len(l.GetElements())) + for i, e := range l.GetElements() { + elem, err := exprInternal(factory, e) + if err != nil { + return nil, err + } + elems[i] = elem + } + return factory.NewList(id, elems, l.GetOptionalIndices()), nil +} + +func exprMap(factory ExprFactory, id int64, s *exprpb.Expr_CreateStruct) (Expr, error) { + entries := make([]EntryExpr, len(s.GetEntries())) + var err error + for i, entry := range s.GetEntries() { + entries[i], err = exprMapEntry(factory, entry.GetId(), entry) + if err != nil { + return nil, err + } + } + return factory.NewMap(id, entries), nil +} + +func exprMapEntry(factory ExprFactory, id int64, e *exprpb.Expr_CreateStruct_Entry) (EntryExpr, error) { + k, err := exprInternal(factory, e.GetMapKey()) + if err != nil { + return nil, err + } + v, err := exprInternal(factory, e.GetValue()) + if err != nil { + return nil, err + } + return factory.NewMapEntry(id, k, v, e.GetOptionalEntry()), nil +} + +func exprSelect(factory ExprFactory, id int64, s *exprpb.Expr_Select) (Expr, error) { + op, err := exprInternal(factory, s.GetOperand()) + if err != nil { + return nil, err + } + if s.GetTestOnly() { + return factory.NewPresenceTest(id, op, s.GetField()), nil + } + return factory.NewSelect(id, op, s.GetField()), nil +} + +func exprStruct(factory ExprFactory, id int64, s *exprpb.Expr_CreateStruct) (Expr, error) { + fields := make([]EntryExpr, len(s.GetEntries())) + var err error + for i, field := range s.GetEntries() { + fields[i], err = exprStructField(factory, field.GetId(), field) + if err != nil { + return nil, err + } + } + return factory.NewStruct(id, s.GetMessageName(), fields), nil +} + +func exprStructField(factory ExprFactory, id int64, f *exprpb.Expr_CreateStruct_Entry) (EntryExpr, error) { + v, err := exprInternal(factory, f.GetValue()) + if err != nil { + return nil, err + } + return factory.NewStructField(id, f.GetFieldKey(), v, f.GetOptionalEntry()), nil +} + +// ExprToProto serializes an ast.Expr value to a protobuf Expr representation. +func ExprToProto(e Expr) (*exprpb.Expr, error) { + if e == nil { + return &exprpb.Expr{}, nil + } + switch e.Kind() { + case CallKind: + return protoCall(e.ID(), e.AsCall()) + case ComprehensionKind: + return protoComprehension(e.ID(), e.AsComprehension()) + case IdentKind: + return protoIdent(e.ID(), e.AsIdent()) + case ListKind: + return protoList(e.ID(), e.AsList()) + case LiteralKind: + return protoLiteral(e.ID(), e.AsLiteral()) + case MapKind: + return protoMap(e.ID(), e.AsMap()) + case SelectKind: + return protoSelect(e.ID(), e.AsSelect()) + case StructKind: + return protoStruct(e.ID(), e.AsStruct()) + case UnspecifiedExprKind: + // Handle the case where a macro reference may be getting translated. + // A nested macro 'pointer' is a non-zero expression id with no kind set. + if e.ID() != 0 { + return &exprpb.Expr{Id: e.ID()}, nil + } + return &exprpb.Expr{}, nil + } + return nil, fmt.Errorf("unsupported expr kind: %v", e) +} + +// EntryExprToProto converts an ast.EntryExpr to a protobuf CreateStruct entry +func EntryExprToProto(e EntryExpr) (*exprpb.Expr_CreateStruct_Entry, error) { + switch e.Kind() { + case MapEntryKind: + return protoMapEntry(e.ID(), e.AsMapEntry()) + case StructFieldKind: + return protoStructField(e.ID(), e.AsStructField()) + case UnspecifiedEntryExprKind: + return &exprpb.Expr_CreateStruct_Entry{}, nil + } + return nil, fmt.Errorf("unsupported expr entry kind: %v", e) +} + +func protoCall(id int64, call CallExpr) (*exprpb.Expr, error) { + var err error + var target *exprpb.Expr + if call.IsMemberFunction() { + target, err = ExprToProto(call.Target()) + if err != nil { + return nil, err + } + } + callArgs := call.Args() + args := make([]*exprpb.Expr, len(callArgs)) + for i, a := range callArgs { + args[i], err = ExprToProto(a) + if err != nil { + return nil, err + } + } + return &exprpb.Expr{ + Id: id, + ExprKind: &exprpb.Expr_CallExpr{ + CallExpr: &exprpb.Expr_Call{ + Function: call.FunctionName(), + Target: target, + Args: args, + }, + }, + }, nil +} + +func protoComprehension(id int64, comp ComprehensionExpr) (*exprpb.Expr, error) { + iterRange, err := ExprToProto(comp.IterRange()) + if err != nil { + return nil, err + } + accuInit, err := ExprToProto(comp.AccuInit()) + if err != nil { + return nil, err + } + loopCond, err := ExprToProto(comp.LoopCondition()) + if err != nil { + return nil, err + } + loopStep, err := ExprToProto(comp.LoopStep()) + if err != nil { + return nil, err + } + result, err := ExprToProto(comp.Result()) + if err != nil { + return nil, err + } + return &exprpb.Expr{ + Id: id, + ExprKind: &exprpb.Expr_ComprehensionExpr{ + ComprehensionExpr: &exprpb.Expr_Comprehension{ + IterVar: comp.IterVar(), + IterRange: iterRange, + AccuVar: comp.AccuVar(), + AccuInit: accuInit, + LoopCondition: loopCond, + LoopStep: loopStep, + Result: result, + }, + }, + }, nil +} + +func protoIdent(id int64, name string) (*exprpb.Expr, error) { + return &exprpb.Expr{ + Id: id, + ExprKind: &exprpb.Expr_IdentExpr{ + IdentExpr: &exprpb.Expr_Ident{ + Name: name, + }, + }, + }, nil +} + +func protoList(id int64, list ListExpr) (*exprpb.Expr, error) { + var err error + elems := make([]*exprpb.Expr, list.Size()) + for i, e := range list.Elements() { + elems[i], err = ExprToProto(e) + if err != nil { + return nil, err + } + } + return &exprpb.Expr{ + Id: id, + ExprKind: &exprpb.Expr_ListExpr{ + ListExpr: &exprpb.Expr_CreateList{ + Elements: elems, + OptionalIndices: list.OptionalIndices(), + }, + }, + }, nil +} + +func protoLiteral(id int64, val ref.Val) (*exprpb.Expr, error) { + c, err := ValToConstant(val) + if err != nil { + return nil, err + } + return &exprpb.Expr{ + Id: id, + ExprKind: &exprpb.Expr_ConstExpr{ + ConstExpr: c, + }, + }, nil +} + +func protoMap(id int64, m MapExpr) (*exprpb.Expr, error) { + entries := make([]*exprpb.Expr_CreateStruct_Entry, len(m.Entries())) + var err error + for i, e := range m.Entries() { + entries[i], err = EntryExprToProto(e) + if err != nil { + return nil, err + } + } + return &exprpb.Expr{ + Id: id, + ExprKind: &exprpb.Expr_StructExpr{ + StructExpr: &exprpb.Expr_CreateStruct{ + Entries: entries, + }, + }, + }, nil +} + +func protoMapEntry(id int64, e MapEntry) (*exprpb.Expr_CreateStruct_Entry, error) { + k, err := ExprToProto(e.Key()) + if err != nil { + return nil, err + } + v, err := ExprToProto(e.Value()) + if err != nil { + return nil, err + } + return &exprpb.Expr_CreateStruct_Entry{ + Id: id, + KeyKind: &exprpb.Expr_CreateStruct_Entry_MapKey{ + MapKey: k, + }, + Value: v, + OptionalEntry: e.IsOptional(), + }, nil +} + +func protoSelect(id int64, s SelectExpr) (*exprpb.Expr, error) { + op, err := ExprToProto(s.Operand()) + if err != nil { + return nil, err + } + return &exprpb.Expr{ + Id: id, + ExprKind: &exprpb.Expr_SelectExpr{ + SelectExpr: &exprpb.Expr_Select{ + Operand: op, + Field: s.FieldName(), + TestOnly: s.IsTestOnly(), + }, + }, + }, nil +} + +func protoStruct(id int64, s StructExpr) (*exprpb.Expr, error) { + entries := make([]*exprpb.Expr_CreateStruct_Entry, len(s.Fields())) + var err error + for i, e := range s.Fields() { + entries[i], err = EntryExprToProto(e) + if err != nil { + return nil, err + } + } + return &exprpb.Expr{ + Id: id, + ExprKind: &exprpb.Expr_StructExpr{ + StructExpr: &exprpb.Expr_CreateStruct{ + MessageName: s.TypeName(), + Entries: entries, + }, + }, + }, nil +} + +func protoStructField(id int64, f StructField) (*exprpb.Expr_CreateStruct_Entry, error) { + v, err := ExprToProto(f.Value()) + if err != nil { + return nil, err + } + return &exprpb.Expr_CreateStruct_Entry{ + Id: id, + KeyKind: &exprpb.Expr_CreateStruct_Entry_FieldKey{ + FieldKey: f.Name(), + }, + Value: v, + OptionalEntry: f.IsOptional(), + }, nil +} + +// SourceInfoToProto serializes an ast.SourceInfo value to a protobuf SourceInfo object. +func SourceInfoToProto(info *SourceInfo) (*exprpb.SourceInfo, error) { + if info == nil { + return &exprpb.SourceInfo{}, nil + } + sourceInfo := &exprpb.SourceInfo{ + SyntaxVersion: info.SyntaxVersion(), + Location: info.Description(), + LineOffsets: info.LineOffsets(), + Positions: make(map[int64]int32, len(info.OffsetRanges())), + MacroCalls: make(map[int64]*exprpb.Expr, len(info.MacroCalls())), + } + for id, offset := range info.OffsetRanges() { + sourceInfo.Positions[id] = offset.Start + } + for id, e := range info.MacroCalls() { + call, err := ExprToProto(e) + if err != nil { + return nil, err + } + sourceInfo.MacroCalls[id] = call + } + return sourceInfo, nil +} + +// ProtoToSourceInfo deserializes the protobuf into a native SourceInfo value. +func ProtoToSourceInfo(info *exprpb.SourceInfo) (*SourceInfo, error) { + sourceInfo := &SourceInfo{ + syntax: info.GetSyntaxVersion(), + desc: info.GetLocation(), + lines: info.GetLineOffsets(), + offsetRanges: make(map[int64]OffsetRange, len(info.GetPositions())), + macroCalls: make(map[int64]Expr, len(info.GetMacroCalls())), + } + for id, offset := range info.GetPositions() { + sourceInfo.SetOffsetRange(id, OffsetRange{Start: offset, Stop: offset}) + } + for id, e := range info.GetMacroCalls() { + call, err := ProtoToExpr(e) + if err != nil { + return nil, err + } + sourceInfo.SetMacroCall(id, call) + } + return sourceInfo, nil +} + +// ReferenceInfoToProto converts a ReferenceInfo instance to a protobuf Reference suitable for serialization. +func ReferenceInfoToProto(info *ReferenceInfo) (*exprpb.Reference, error) { + c, err := ValToConstant(info.Value) + if err != nil { + return nil, err + } + return &exprpb.Reference{ + Name: info.Name, + OverloadId: info.OverloadIDs, + Value: c, + }, nil +} + +// ProtoToReferenceInfo converts a protobuf Reference into a CEL-native ReferenceInfo instance. +func ProtoToReferenceInfo(ref *exprpb.Reference) (*ReferenceInfo, error) { + v, err := ConstantToVal(ref.GetValue()) + if err != nil { + return nil, err + } + return &ReferenceInfo{ + Name: ref.GetName(), + OverloadIDs: ref.GetOverloadId(), + Value: v, + }, nil +} + +// ValToConstant converts a CEL-native ref.Val to a protobuf Constant. +// +// Only simple scalar types are supported by this method. +func ValToConstant(v ref.Val) (*exprpb.Constant, error) { + if v == nil { + return nil, nil + } + switch v.Type() { + case types.BoolType: + return &exprpb.Constant{ConstantKind: &exprpb.Constant_BoolValue{BoolValue: v.Value().(bool)}}, nil + case types.BytesType: + return &exprpb.Constant{ConstantKind: &exprpb.Constant_BytesValue{BytesValue: v.Value().([]byte)}}, nil + case types.DoubleType: + return &exprpb.Constant{ConstantKind: &exprpb.Constant_DoubleValue{DoubleValue: v.Value().(float64)}}, nil + case types.IntType: + return &exprpb.Constant{ConstantKind: &exprpb.Constant_Int64Value{Int64Value: v.Value().(int64)}}, nil + case types.NullType: + return &exprpb.Constant{ConstantKind: &exprpb.Constant_NullValue{NullValue: structpb.NullValue_NULL_VALUE}}, nil + case types.StringType: + return &exprpb.Constant{ConstantKind: &exprpb.Constant_StringValue{StringValue: v.Value().(string)}}, nil + case types.UintType: + return &exprpb.Constant{ConstantKind: &exprpb.Constant_Uint64Value{Uint64Value: v.Value().(uint64)}}, nil + } + return nil, fmt.Errorf("unsupported constant kind: %v", v.Type()) +} + +// ConstantToVal converts a protobuf Constant to a CEL-native ref.Val. +func ConstantToVal(c *exprpb.Constant) (ref.Val, error) { + if c == nil { + return nil, nil + } + switch c.GetConstantKind().(type) { + case *exprpb.Constant_BoolValue: + return types.Bool(c.GetBoolValue()), nil + case *exprpb.Constant_BytesValue: + return types.Bytes(c.GetBytesValue()), nil + case *exprpb.Constant_DoubleValue: + return types.Double(c.GetDoubleValue()), nil + case *exprpb.Constant_Int64Value: + return types.Int(c.GetInt64Value()), nil + case *exprpb.Constant_NullValue: + return types.NullValue, nil + case *exprpb.Constant_StringValue: + return types.String(c.GetStringValue()), nil + case *exprpb.Constant_Uint64Value: + return types.Uint(c.GetUint64Value()), nil + } + return nil, fmt.Errorf("unsupported constant kind: %v", c.GetConstantKind()) +} diff --git a/vendor/github.com/google/cel-go/common/ast/expr.go b/vendor/github.com/google/cel-go/common/ast/expr.go index b63884a6028..c9d88bbaab7 100644 --- a/vendor/github.com/google/cel-go/common/ast/expr.go +++ b/vendor/github.com/google/cel-go/common/ast/expr.go @@ -15,168 +15,61 @@ package ast import ( - "github.com/google/cel-go/common/types" "github.com/google/cel-go/common/types/ref" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" ) // ExprKind represents the expression node kind. type ExprKind int const ( - // UnspecifiedKind represents an unset expression with no specified properties. - UnspecifiedKind ExprKind = iota + // UnspecifiedExprKind represents an unset expression with no specified properties. + UnspecifiedExprKind ExprKind = iota - // LiteralKind represents a primitive scalar literal. - LiteralKind + // CallKind represents a function call. + CallKind + + // ComprehensionKind represents a comprehension expression generated by a macro. + ComprehensionKind // IdentKind represents a simple variable, constant, or type identifier. IdentKind - // SelectKind represents a field selection expression. - SelectKind - - // CallKind represents a function call. - CallKind - // ListKind represents a list literal expression. ListKind + // LiteralKind represents a primitive scalar literal. + LiteralKind + // MapKind represents a map literal expression. MapKind + // SelectKind represents a field selection expression. + SelectKind + // StructKind represents a struct literal expression. StructKind - - // ComprehensionKind represents a comprehension expression generated by a macro. - ComprehensionKind ) -// NavigateCheckedAST converts a CheckedAST to a NavigableExpr -func NavigateCheckedAST(ast *CheckedAST) NavigableExpr { - return newNavigableExpr(nil, ast.Expr, ast.TypeMap) -} - -// ExprMatcher takes a NavigableExpr in and indicates whether the value is a match. +// Expr represents the base expression node in a CEL abstract syntax tree. // -// This function type should be use with the `Match` and `MatchList` calls. -type ExprMatcher func(NavigableExpr) bool - -// ConstantValueMatcher returns an ExprMatcher which will return true if the input NavigableExpr -// is comprised of all constant values, such as a simple literal or even list and map literal. -func ConstantValueMatcher() ExprMatcher { - return matchIsConstantValue -} - -// KindMatcher returns an ExprMatcher which will return true if the input NavigableExpr.Kind() matches -// the specified `kind`. -func KindMatcher(kind ExprKind) ExprMatcher { - return func(e NavigableExpr) bool { - return e.Kind() == kind - } -} - -// FunctionMatcher returns an ExprMatcher which will match NavigableExpr nodes of CallKind type whose -// function name is equal to `funcName`. -func FunctionMatcher(funcName string) ExprMatcher { - return func(e NavigableExpr) bool { - if e.Kind() != CallKind { - return false - } - return e.AsCall().FunctionName() == funcName - } -} - -// AllMatcher returns true for all descendants of a NavigableExpr, effectively flattening them into a list. -// -// Such a result would work well with subsequent MatchList calls. -func AllMatcher() ExprMatcher { - return func(NavigableExpr) bool { - return true - } -} - -// MatchDescendants takes a NavigableExpr and ExprMatcher and produces a list of NavigableExpr values of the -// descendants which match. -func MatchDescendants(expr NavigableExpr, matcher ExprMatcher) []NavigableExpr { - return matchListInternal([]NavigableExpr{expr}, matcher, true) -} - -// MatchSubset applies an ExprMatcher to a list of NavigableExpr values and their descendants, producing a -// subset of NavigableExpr values which match. -func MatchSubset(exprs []NavigableExpr, matcher ExprMatcher) []NavigableExpr { - visit := make([]NavigableExpr, len(exprs)) - copy(visit, exprs) - return matchListInternal(visit, matcher, false) -} - -func matchListInternal(visit []NavigableExpr, matcher ExprMatcher, visitDescendants bool) []NavigableExpr { - var matched []NavigableExpr - for len(visit) != 0 { - e := visit[0] - if matcher(e) { - matched = append(matched, e) - } - if visitDescendants { - visit = append(visit[1:], e.Children()...) - } else { - visit = visit[1:] - } - } - return matched -} - -func matchIsConstantValue(e NavigableExpr) bool { - if e.Kind() == LiteralKind { - return true - } - if e.Kind() == StructKind || e.Kind() == MapKind || e.Kind() == ListKind { - for _, child := range e.Children() { - if !matchIsConstantValue(child) { - return false - } - } - return true - } - return false -} - -// NavigableExpr represents the base navigable expression value. -// -// Depending on the `Kind()` value, the NavigableExpr may be converted to a concrete expression types +// Depending on the `Kind()` value, the Expr may be converted to a concrete expression types // as indicated by the `As` methods. -// -// NavigableExpr values and their concrete expression types should be nil-safe. Conversion of an expr -// to the wrong kind should produce a nil value. -type NavigableExpr interface { +type Expr interface { // ID of the expression as it appears in the AST ID() int64 // Kind of the expression node. See ExprKind for the valid enum values. Kind() ExprKind - // Type of the expression node. - Type() *types.Type - - // Parent returns the parent expression node, if one exists. - Parent() (NavigableExpr, bool) - - // Children returns a list of child expression nodes. - Children() []NavigableExpr - - // ToExpr adapts this NavigableExpr to a protobuf representation. - ToExpr() *exprpb.Expr - - // AsCall adapts the expr into a NavigableCallExpr + // AsCall adapts the expr into a CallExpr // // The Kind() must be equal to a CallKind for the conversion to be well-defined. - AsCall() NavigableCallExpr + AsCall() CallExpr - // AsComprehension adapts the expr into a NavigableComprehensionExpr. + // AsComprehension adapts the expr into a ComprehensionExpr. // // The Kind() must be equal to a ComprehensionKind for the conversion to be well-defined. - AsComprehension() NavigableComprehensionExpr + AsComprehension() ComprehensionExpr // AsIdent adapts the expr into an identifier string. // @@ -188,67 +81,123 @@ type NavigableExpr interface { // The Kind() must be equal to a LiteralKind for the conversion to be well-defined. AsLiteral() ref.Val - // AsList adapts the expr into a NavigableListExpr. + // AsList adapts the expr into a ListExpr. // // The Kind() must be equal to a ListKind for the conversion to be well-defined. - AsList() NavigableListExpr + AsList() ListExpr - // AsMap adapts the expr into a NavigableMapExpr. + // AsMap adapts the expr into a MapExpr. // // The Kind() must be equal to a MapKind for the conversion to be well-defined. - AsMap() NavigableMapExpr + AsMap() MapExpr - // AsSelect adapts the expr into a NavigableSelectExpr. + // AsSelect adapts the expr into a SelectExpr. // // The Kind() must be equal to a SelectKind for the conversion to be well-defined. - AsSelect() NavigableSelectExpr + AsSelect() SelectExpr - // AsStruct adapts the expr into a NavigableStructExpr. + // AsStruct adapts the expr into a StructExpr. // // The Kind() must be equal to a StructKind for the conversion to be well-defined. - AsStruct() NavigableStructExpr + AsStruct() StructExpr - // marker interface method - isNavigable() + // RenumberIDs performs an in-place update of the expression and all of its descendents numeric ids. + RenumberIDs(IDGenerator) + + // SetKindCase replaces the contents of the current expression with the contents of the other. + // + // The SetKindCase takes ownership of any expression instances references within the input Expr. + // A shallow copy is made of the Expr value itself, but not a deep one. + // + // This method should only be used during AST rewrites using temporary Expr values. + SetKindCase(Expr) + + // isExpr is a marker interface. + isExpr() } -// NavigableCallExpr defines an interface for inspecting a function call and its arugments. -type NavigableCallExpr interface { +// EntryExprKind represents the possible EntryExpr kinds. +type EntryExprKind int + +const ( + // UnspecifiedEntryExprKind indicates that the entry expr is not set. + UnspecifiedEntryExprKind EntryExprKind = iota + + // MapEntryKind indicates that the entry is a MapEntry type with key and value expressions. + MapEntryKind + + // StructFieldKind indicates that the entry is a StructField with a field name and initializer + // expression. + StructFieldKind +) + +// EntryExpr represents the base entry expression in a CEL map or struct literal. +type EntryExpr interface { + // ID of the entry as it appears in the AST. + ID() int64 + + // Kind of the entry expression node. See EntryExprKind for valid enum values. + Kind() EntryExprKind + + // AsMapEntry casts the EntryExpr to a MapEntry. + // + // The Kind() must be equal to MapEntryKind for the conversion to be well-defined. + AsMapEntry() MapEntry + + // AsStructField casts the EntryExpr to a StructField + // + // The Kind() must be equal to StructFieldKind for the conversion to be well-defined. + AsStructField() StructField + + // RenumberIDs performs an in-place update of the expression and all of its descendents numeric ids. + RenumberIDs(IDGenerator) + + isEntryExpr() +} + +// IDGenerator produces unique ids suitable for tagging expression nodes +type IDGenerator func(originalID int64) int64 + +// CallExpr defines an interface for inspecting a function call and its arugments. +type CallExpr interface { // FunctionName returns the name of the function. FunctionName() string + // IsMemberFunction returns whether the call has a non-nil target indicating it is a member function + IsMemberFunction() bool + // Target returns the target of the expression if one is present. - Target() NavigableExpr + Target() Expr // Args returns the list of call arguments, excluding the target. - Args() []NavigableExpr - - // ReturnType returns the result type of the call. - ReturnType() *types.Type + Args() []Expr // marker interface method - isNavigable() + isExpr() } -// NavigableListExpr defines an interface for inspecting a list literal expression. -type NavigableListExpr interface { +// ListExpr defines an interface for inspecting a list literal expression. +type ListExpr interface { // Elements returns the list elements as navigable expressions. - Elements() []NavigableExpr + Elements() []Expr // OptionalIndicies returns the list of optional indices in the list literal. OptionalIndices() []int32 + // IsOptional indicates whether the given element index is optional. + IsOptional(int32) bool + // Size returns the number of elements in the list. Size() int // marker interface method - isNavigable() + isExpr() } -// NavigableSelectExpr defines an interface for inspecting a select expression. -type NavigableSelectExpr interface { +// SelectExpr defines an interface for inspecting a select expression. +type SelectExpr interface { // Operand returns the selection operand expression. - Operand() NavigableExpr + Operand() Expr // FieldName returns the field name being selected from the operand. FieldName() string @@ -257,67 +206,67 @@ type NavigableSelectExpr interface { IsTestOnly() bool // marker interface method - isNavigable() + isExpr() } -// NavigableMapExpr defines an interface for inspecting a map expression. -type NavigableMapExpr interface { - // Entries returns the map key value pairs as NavigableEntry values. - Entries() []NavigableEntry +// MapExpr defines an interface for inspecting a map expression. +type MapExpr interface { + // Entries returns the map key value pairs as EntryExpr values. + Entries() []EntryExpr // Size returns the number of entries in the map. Size() int // marker interface method - isNavigable() + isExpr() } -// NavigableEntry defines an interface for inspecting a map entry. -type NavigableEntry interface { +// MapEntry defines an interface for inspecting a map entry. +type MapEntry interface { // Key returns the map entry key expression. - Key() NavigableExpr + Key() Expr // Value returns the map entry value expression. - Value() NavigableExpr + Value() Expr // IsOptional returns whether the entry is optional. IsOptional() bool // marker interface method - isNavigable() + isEntryExpr() } -// NavigableStructExpr defines an interfaces for inspecting a struct and its field initializers. -type NavigableStructExpr interface { +// StructExpr defines an interfaces for inspecting a struct and its field initializers. +type StructExpr interface { // TypeName returns the struct type name. TypeName() string - // Fields returns the set of field initializers in the struct expression as NavigableField values. - Fields() []NavigableField + // Fields returns the set of field initializers in the struct expression as EntryExpr values. + Fields() []EntryExpr // marker interface method - isNavigable() + isExpr() } -// NavigableField defines an interface for inspecting a struct field initialization. -type NavigableField interface { - // FieldName returns the name of the field. - FieldName() string +// StructField defines an interface for inspecting a struct field initialization. +type StructField interface { + // Name returns the name of the field. + Name() string // Value returns the field initialization expression. - Value() NavigableExpr + Value() Expr // IsOptional returns whether the field is optional. IsOptional() bool // marker interface method - isNavigable() + isEntryExpr() } -// NavigableComprehensionExpr defines an interface for inspecting a comprehension expression. -type NavigableComprehensionExpr interface { +// ComprehensionExpr defines an interface for inspecting a comprehension expression. +type ComprehensionExpr interface { // IterRange returns the iteration range expression. - IterRange() NavigableExpr + IterRange() Expr // IterVar returns the iteration variable name. IterVar() string @@ -326,384 +275,586 @@ type NavigableComprehensionExpr interface { AccuVar() string // AccuInit returns the accumulation variable initialization expression. - AccuInit() NavigableExpr + AccuInit() Expr // LoopCondition returns the loop condition expression. - LoopCondition() NavigableExpr + LoopCondition() Expr // LoopStep returns the loop step expression. - LoopStep() NavigableExpr + LoopStep() Expr // Result returns the comprehension result expression. - Result() NavigableExpr + Result() Expr // marker interface method - isNavigable() + isExpr() } -func newNavigableExpr(parent NavigableExpr, expr *exprpb.Expr, typeMap map[int64]*types.Type) NavigableExpr { - kind, factory := kindOf(expr) - nav := &navigableExprImpl{ - parent: parent, - kind: kind, - expr: expr, - typeMap: typeMap, - createChildren: factory, +var _ Expr = &expr{} + +type expr struct { + id int64 + exprKindCase +} + +type exprKindCase interface { + Kind() ExprKind + + renumberIDs(IDGenerator) + + isExpr() +} + +func (e *expr) ID() int64 { + if e == nil { + return 0 } - return nav + return e.id } -type navigableExprImpl struct { - parent NavigableExpr - kind ExprKind - expr *exprpb.Expr - typeMap map[int64]*types.Type - createChildren childFactory +func (e *expr) Kind() ExprKind { + if e == nil || e.exprKindCase == nil { + return UnspecifiedExprKind + } + return e.exprKindCase.Kind() } -func (nav *navigableExprImpl) ID() int64 { - return nav.ToExpr().GetId() +func (e *expr) AsCall() CallExpr { + if e.Kind() != CallKind { + return nilCall + } + return e.exprKindCase.(CallExpr) } -func (nav *navigableExprImpl) Kind() ExprKind { - return nav.kind +func (e *expr) AsComprehension() ComprehensionExpr { + if e.Kind() != ComprehensionKind { + return nilCompre + } + return e.exprKindCase.(ComprehensionExpr) } -func (nav *navigableExprImpl) Type() *types.Type { - if t, found := nav.typeMap[nav.ID()]; found { - return t +func (e *expr) AsIdent() string { + if e.Kind() != IdentKind { + return "" } - return types.DynType + return string(e.exprKindCase.(baseIdentExpr)) } -func (nav *navigableExprImpl) Parent() (NavigableExpr, bool) { - if nav.parent != nil { - return nav.parent, true +func (e *expr) AsLiteral() ref.Val { + if e.Kind() != LiteralKind { + return nil } - return nil, false + return e.exprKindCase.(*baseLiteral).Val } -func (nav *navigableExprImpl) Children() []NavigableExpr { - return nav.createChildren(nav) +func (e *expr) AsList() ListExpr { + if e.Kind() != ListKind { + return nilList + } + return e.exprKindCase.(ListExpr) } -func (nav *navigableExprImpl) ToExpr() *exprpb.Expr { - return nav.expr +func (e *expr) AsMap() MapExpr { + if e.Kind() != MapKind { + return nilMap + } + return e.exprKindCase.(MapExpr) } -func (nav *navigableExprImpl) AsCall() NavigableCallExpr { - return navigableCallImpl{navigableExprImpl: nav} +func (e *expr) AsSelect() SelectExpr { + if e.Kind() != SelectKind { + return nilSel + } + return e.exprKindCase.(SelectExpr) } -func (nav *navigableExprImpl) AsComprehension() NavigableComprehensionExpr { - return navigableComprehensionImpl{navigableExprImpl: nav} +func (e *expr) AsStruct() StructExpr { + if e.Kind() != StructKind { + return nilStruct + } + return e.exprKindCase.(StructExpr) } -func (nav *navigableExprImpl) AsIdent() string { - return nav.ToExpr().GetIdentExpr().GetName() +func (e *expr) SetKindCase(other Expr) { + if e == nil { + return + } + if other == nil { + e.exprKindCase = nil + return + } + switch other.Kind() { + case CallKind: + c := other.AsCall() + e.exprKindCase = &baseCallExpr{ + function: c.FunctionName(), + target: c.Target(), + args: c.Args(), + isMember: c.IsMemberFunction(), + } + case ComprehensionKind: + c := other.AsComprehension() + e.exprKindCase = &baseComprehensionExpr{ + iterRange: c.IterRange(), + iterVar: c.IterVar(), + accuVar: c.AccuVar(), + accuInit: c.AccuInit(), + loopCond: c.LoopCondition(), + loopStep: c.LoopStep(), + result: c.Result(), + } + case IdentKind: + e.exprKindCase = baseIdentExpr(other.AsIdent()) + case ListKind: + l := other.AsList() + optIndexMap := make(map[int32]struct{}, len(l.OptionalIndices())) + for _, idx := range l.OptionalIndices() { + optIndexMap[idx] = struct{}{} + } + e.exprKindCase = &baseListExpr{ + elements: l.Elements(), + optIndices: l.OptionalIndices(), + optIndexMap: optIndexMap, + } + case LiteralKind: + e.exprKindCase = &baseLiteral{Val: other.AsLiteral()} + case MapKind: + e.exprKindCase = &baseMapExpr{ + entries: other.AsMap().Entries(), + } + case SelectKind: + s := other.AsSelect() + e.exprKindCase = &baseSelectExpr{ + operand: s.Operand(), + field: s.FieldName(), + testOnly: s.IsTestOnly(), + } + case StructKind: + s := other.AsStruct() + e.exprKindCase = &baseStructExpr{ + typeName: s.TypeName(), + fields: s.Fields(), + } + case UnspecifiedExprKind: + e.exprKindCase = nil + } } -func (nav *navigableExprImpl) AsLiteral() ref.Val { - if nav.Kind() != LiteralKind { - return nil +func (e *expr) RenumberIDs(idGen IDGenerator) { + if e == nil { + return } - val, err := ConstantToVal(nav.ToExpr().GetConstExpr()) - if err != nil { - panic(err) + e.id = idGen(e.id) + if e.exprKindCase != nil { + e.exprKindCase.renumberIDs(idGen) } - return val } -func (nav *navigableExprImpl) AsList() NavigableListExpr { - return navigableListImpl{navigableExprImpl: nav} +type baseCallExpr struct { + function string + target Expr + args []Expr + isMember bool } -func (nav *navigableExprImpl) AsMap() NavigableMapExpr { - return navigableMapImpl{navigableExprImpl: nav} +func (*baseCallExpr) Kind() ExprKind { + return CallKind } -func (nav *navigableExprImpl) AsSelect() NavigableSelectExpr { - return navigableSelectImpl{navigableExprImpl: nav} +func (e *baseCallExpr) FunctionName() string { + if e == nil { + return "" + } + return e.function } -func (nav *navigableExprImpl) AsStruct() NavigableStructExpr { - return navigableStructImpl{navigableExprImpl: nav} +func (e *baseCallExpr) IsMemberFunction() bool { + if e == nil { + return false + } + return e.isMember } -func (nav *navigableExprImpl) createChild(e *exprpb.Expr) NavigableExpr { - return newNavigableExpr(nav, e, nav.typeMap) +func (e *baseCallExpr) Target() Expr { + if e == nil || !e.IsMemberFunction() { + return nilExpr + } + return e.target } -func (nav *navigableExprImpl) isNavigable() {} +func (e *baseCallExpr) Args() []Expr { + if e == nil { + return []Expr{} + } + return e.args +} -type navigableCallImpl struct { - *navigableExprImpl +func (e *baseCallExpr) renumberIDs(idGen IDGenerator) { + if e.IsMemberFunction() { + e.Target().RenumberIDs(idGen) + } + for _, arg := range e.Args() { + arg.RenumberIDs(idGen) + } } -func (call navigableCallImpl) FunctionName() string { - return call.ToExpr().GetCallExpr().GetFunction() +func (*baseCallExpr) isExpr() {} + +var _ ComprehensionExpr = &baseComprehensionExpr{} + +type baseComprehensionExpr struct { + iterRange Expr + iterVar string + accuVar string + accuInit Expr + loopCond Expr + loopStep Expr + result Expr } -func (call navigableCallImpl) Target() NavigableExpr { - t := call.ToExpr().GetCallExpr().GetTarget() - if t != nil { - return call.createChild(t) - } - return nil +func (*baseComprehensionExpr) Kind() ExprKind { + return ComprehensionKind } -func (call navigableCallImpl) Args() []NavigableExpr { - args := call.ToExpr().GetCallExpr().GetArgs() - navArgs := make([]NavigableExpr, len(args)) - for i, a := range args { - navArgs[i] = call.createChild(a) +func (e *baseComprehensionExpr) IterRange() Expr { + if e == nil { + return nilExpr } - return navArgs + return e.iterRange } -func (call navigableCallImpl) ReturnType() *types.Type { - return call.Type() +func (e *baseComprehensionExpr) IterVar() string { + return e.iterVar } -type navigableComprehensionImpl struct { - *navigableExprImpl +func (e *baseComprehensionExpr) AccuVar() string { + return e.accuVar } -func (comp navigableComprehensionImpl) IterRange() NavigableExpr { - return comp.createChild(comp.ToExpr().GetComprehensionExpr().GetIterRange()) +func (e *baseComprehensionExpr) AccuInit() Expr { + if e == nil { + return nilExpr + } + return e.accuInit } -func (comp navigableComprehensionImpl) IterVar() string { - return comp.ToExpr().GetComprehensionExpr().GetIterVar() +func (e *baseComprehensionExpr) LoopCondition() Expr { + if e == nil { + return nilExpr + } + return e.loopCond } -func (comp navigableComprehensionImpl) AccuVar() string { - return comp.ToExpr().GetComprehensionExpr().GetAccuVar() +func (e *baseComprehensionExpr) LoopStep() Expr { + if e == nil { + return nilExpr + } + return e.loopStep } -func (comp navigableComprehensionImpl) AccuInit() NavigableExpr { - return comp.createChild(comp.ToExpr().GetComprehensionExpr().GetAccuInit()) +func (e *baseComprehensionExpr) Result() Expr { + if e == nil { + return nilExpr + } + return e.result } -func (comp navigableComprehensionImpl) LoopCondition() NavigableExpr { - return comp.createChild(comp.ToExpr().GetComprehensionExpr().GetLoopCondition()) +func (e *baseComprehensionExpr) renumberIDs(idGen IDGenerator) { + e.IterRange().RenumberIDs(idGen) + e.AccuInit().RenumberIDs(idGen) + e.LoopCondition().RenumberIDs(idGen) + e.LoopStep().RenumberIDs(idGen) + e.Result().RenumberIDs(idGen) } -func (comp navigableComprehensionImpl) LoopStep() NavigableExpr { - return comp.createChild(comp.ToExpr().GetComprehensionExpr().GetLoopStep()) +func (*baseComprehensionExpr) isExpr() {} + +var _ exprKindCase = baseIdentExpr("") + +type baseIdentExpr string + +func (baseIdentExpr) Kind() ExprKind { + return IdentKind } -func (comp navigableComprehensionImpl) Result() NavigableExpr { - return comp.createChild(comp.ToExpr().GetComprehensionExpr().GetResult()) +func (e baseIdentExpr) renumberIDs(IDGenerator) {} + +func (baseIdentExpr) isExpr() {} + +var _ exprKindCase = &baseLiteral{} +var _ ref.Val = &baseLiteral{} + +type baseLiteral struct { + ref.Val } -type navigableListImpl struct { - *navigableExprImpl +func (*baseLiteral) Kind() ExprKind { + return LiteralKind } -func (l navigableListImpl) Elements() []NavigableExpr { - return l.Children() +func (l *baseLiteral) renumberIDs(IDGenerator) {} + +func (*baseLiteral) isExpr() {} + +var _ ListExpr = &baseListExpr{} + +type baseListExpr struct { + elements []Expr + optIndices []int32 + optIndexMap map[int32]struct{} } -func (l navigableListImpl) OptionalIndices() []int32 { - return l.ToExpr().GetListExpr().GetOptionalIndices() +func (*baseListExpr) Kind() ExprKind { + return ListKind } -func (l navigableListImpl) Size() int { - return len(l.ToExpr().GetListExpr().GetElements()) +func (e *baseListExpr) Elements() []Expr { + if e == nil { + return []Expr{} + } + return e.elements } -type navigableMapImpl struct { - *navigableExprImpl +func (e *baseListExpr) IsOptional(index int32) bool { + _, found := e.optIndexMap[index] + return found } -func (m navigableMapImpl) Entries() []NavigableEntry { - mapExpr := m.ToExpr().GetStructExpr() - entries := make([]NavigableEntry, len(mapExpr.GetEntries())) - for i, e := range mapExpr.GetEntries() { - entries[i] = navigableEntryImpl{ - key: m.createChild(e.GetMapKey()), - val: m.createChild(e.GetValue()), - isOpt: e.GetOptionalEntry(), - } +func (e *baseListExpr) OptionalIndices() []int32 { + if e == nil { + return []int32{} } - return entries + return e.optIndices } -func (m navigableMapImpl) Size() int { - return len(m.ToExpr().GetStructExpr().GetEntries()) +func (e *baseListExpr) Size() int { + return len(e.Elements()) } -type navigableEntryImpl struct { - key NavigableExpr - val NavigableExpr - isOpt bool +func (e *baseListExpr) renumberIDs(idGen IDGenerator) { + for _, elem := range e.Elements() { + elem.RenumberIDs(idGen) + } } -func (e navigableEntryImpl) Key() NavigableExpr { - return e.key -} +func (*baseListExpr) isExpr() {} -func (e navigableEntryImpl) Value() NavigableExpr { - return e.val +type baseMapExpr struct { + entries []EntryExpr } -func (e navigableEntryImpl) IsOptional() bool { - return e.isOpt +func (*baseMapExpr) Kind() ExprKind { + return MapKind } -func (e navigableEntryImpl) isNavigable() {} +func (e *baseMapExpr) Entries() []EntryExpr { + if e == nil { + return []EntryExpr{} + } + return e.entries +} -type navigableSelectImpl struct { - *navigableExprImpl +func (e *baseMapExpr) Size() int { + return len(e.Entries()) } -func (sel navigableSelectImpl) FieldName() string { - return sel.ToExpr().GetSelectExpr().GetField() +func (e *baseMapExpr) renumberIDs(idGen IDGenerator) { + for _, entry := range e.Entries() { + entry.RenumberIDs(idGen) + } } -func (sel navigableSelectImpl) IsTestOnly() bool { - return sel.ToExpr().GetSelectExpr().GetTestOnly() +func (*baseMapExpr) isExpr() {} + +type baseSelectExpr struct { + operand Expr + field string + testOnly bool } -func (sel navigableSelectImpl) Operand() NavigableExpr { - return sel.createChild(sel.ToExpr().GetSelectExpr().GetOperand()) +func (*baseSelectExpr) Kind() ExprKind { + return SelectKind } -type navigableStructImpl struct { - *navigableExprImpl +func (e *baseSelectExpr) Operand() Expr { + if e == nil || e.operand == nil { + return nilExpr + } + return e.operand } -func (s navigableStructImpl) TypeName() string { - return s.ToExpr().GetStructExpr().GetMessageName() +func (e *baseSelectExpr) FieldName() string { + if e == nil { + return "" + } + return e.field } -func (s navigableStructImpl) Fields() []NavigableField { - fieldInits := s.ToExpr().GetStructExpr().GetEntries() - fields := make([]NavigableField, len(fieldInits)) - for i, f := range fieldInits { - fields[i] = navigableFieldImpl{ - name: f.GetFieldKey(), - val: s.createChild(f.GetValue()), - isOpt: f.GetOptionalEntry(), - } +func (e *baseSelectExpr) IsTestOnly() bool { + if e == nil { + return false } - return fields + return e.testOnly } -type navigableFieldImpl struct { - name string - val NavigableExpr - isOpt bool +func (e *baseSelectExpr) renumberIDs(idGen IDGenerator) { + e.Operand().RenumberIDs(idGen) } -func (f navigableFieldImpl) FieldName() string { - return f.name +func (*baseSelectExpr) isExpr() {} + +type baseStructExpr struct { + typeName string + fields []EntryExpr } -func (f navigableFieldImpl) Value() NavigableExpr { - return f.val +func (*baseStructExpr) Kind() ExprKind { + return StructKind } -func (f navigableFieldImpl) IsOptional() bool { - return f.isOpt +func (e *baseStructExpr) TypeName() string { + if e == nil { + return "" + } + return e.typeName } -func (f navigableFieldImpl) isNavigable() {} +func (e *baseStructExpr) Fields() []EntryExpr { + if e == nil { + return []EntryExpr{} + } + return e.fields +} -func kindOf(expr *exprpb.Expr) (ExprKind, childFactory) { - switch expr.GetExprKind().(type) { - case *exprpb.Expr_ConstExpr: - return LiteralKind, noopFactory - case *exprpb.Expr_IdentExpr: - return IdentKind, noopFactory - case *exprpb.Expr_SelectExpr: - return SelectKind, selectFactory - case *exprpb.Expr_CallExpr: - return CallKind, callArgFactory - case *exprpb.Expr_ListExpr: - return ListKind, listElemFactory - case *exprpb.Expr_StructExpr: - if expr.GetStructExpr().GetMessageName() != "" { - return StructKind, structEntryFactory - } - return MapKind, mapEntryFactory - case *exprpb.Expr_ComprehensionExpr: - return ComprehensionKind, comprehensionFactory - default: - return UnspecifiedKind, noopFactory +func (e *baseStructExpr) renumberIDs(idGen IDGenerator) { + for _, f := range e.Fields() { + f.RenumberIDs(idGen) } } -type childFactory func(*navigableExprImpl) []NavigableExpr +func (*baseStructExpr) isExpr() {} + +type entryExprKindCase interface { + Kind() EntryExprKind + + renumberIDs(IDGenerator) + + isEntryExpr() +} + +var _ EntryExpr = &entryExpr{} + +type entryExpr struct { + id int64 + entryExprKindCase +} -func noopFactory(*navigableExprImpl) []NavigableExpr { - return nil +func (e *entryExpr) ID() int64 { + return e.id } -func selectFactory(nav *navigableExprImpl) []NavigableExpr { - return []NavigableExpr{ - nav.createChild(nav.ToExpr().GetSelectExpr().GetOperand()), +func (e *entryExpr) AsMapEntry() MapEntry { + if e.Kind() != MapEntryKind { + return nilMapEntry } + return e.entryExprKindCase.(MapEntry) } -func callArgFactory(nav *navigableExprImpl) []NavigableExpr { - call := nav.ToExpr().GetCallExpr() - argCount := len(call.GetArgs()) - if call.GetTarget() != nil { - argCount++ +func (e *entryExpr) AsStructField() StructField { + if e.Kind() != StructFieldKind { + return nilStructField } - navExprs := make([]NavigableExpr, argCount) - i := 0 - if call.GetTarget() != nil { - navExprs[i] = nav.createChild(call.GetTarget()) - i++ + return e.entryExprKindCase.(StructField) +} + +func (e *entryExpr) RenumberIDs(idGen IDGenerator) { + e.id = idGen(e.id) + e.entryExprKindCase.renumberIDs(idGen) +} + +type baseMapEntry struct { + key Expr + value Expr + isOptional bool +} + +func (e *baseMapEntry) Kind() EntryExprKind { + return MapEntryKind +} + +func (e *baseMapEntry) Key() Expr { + if e == nil { + return nilExpr } - for _, arg := range call.GetArgs() { - navExprs[i] = nav.createChild(arg) - i++ + return e.key +} + +func (e *baseMapEntry) Value() Expr { + if e == nil { + return nilExpr } - return navExprs + return e.value } -func listElemFactory(nav *navigableExprImpl) []NavigableExpr { - l := nav.ToExpr().GetListExpr() - navExprs := make([]NavigableExpr, len(l.GetElements())) - for i, e := range l.GetElements() { - navExprs[i] = nav.createChild(e) +func (e *baseMapEntry) IsOptional() bool { + if e == nil { + return false } - return navExprs + return e.isOptional } -func structEntryFactory(nav *navigableExprImpl) []NavigableExpr { - s := nav.ToExpr().GetStructExpr() - entries := make([]NavigableExpr, len(s.GetEntries())) - for i, e := range s.GetEntries() { +func (e *baseMapEntry) renumberIDs(idGen IDGenerator) { + e.Key().RenumberIDs(idGen) + e.Value().RenumberIDs(idGen) +} + +func (*baseMapEntry) isEntryExpr() {} + +type baseStructField struct { + field string + value Expr + isOptional bool +} + +func (f *baseStructField) Kind() EntryExprKind { + return StructFieldKind +} - entries[i] = nav.createChild(e.GetValue()) +func (f *baseStructField) Name() string { + if f == nil { + return "" } - return entries + return f.field } -func mapEntryFactory(nav *navigableExprImpl) []NavigableExpr { - s := nav.ToExpr().GetStructExpr() - entries := make([]NavigableExpr, len(s.GetEntries())*2) - j := 0 - for _, e := range s.GetEntries() { - entries[j] = nav.createChild(e.GetMapKey()) - entries[j+1] = nav.createChild(e.GetValue()) - j += 2 +func (f *baseStructField) Value() Expr { + if f == nil { + return nilExpr } - return entries + return f.value } -func comprehensionFactory(nav *navigableExprImpl) []NavigableExpr { - compre := nav.ToExpr().GetComprehensionExpr() - return []NavigableExpr{ - nav.createChild(compre.GetIterRange()), - nav.createChild(compre.GetAccuInit()), - nav.createChild(compre.GetLoopCondition()), - nav.createChild(compre.GetLoopStep()), - nav.createChild(compre.GetResult()), +func (f *baseStructField) IsOptional() bool { + if f == nil { + return false } + return f.isOptional } + +func (f *baseStructField) renumberIDs(idGen IDGenerator) { + f.Value().RenumberIDs(idGen) +} + +func (*baseStructField) isEntryExpr() {} + +var ( + nilExpr *expr = nil + nilCall *baseCallExpr = nil + nilCompre *baseComprehensionExpr = nil + nilList *baseListExpr = nil + nilMap *baseMapExpr = nil + nilMapEntry *baseMapEntry = nil + nilSel *baseSelectExpr = nil + nilStruct *baseStructExpr = nil + nilStructField *baseStructField = nil +) diff --git a/vendor/github.com/google/cel-go/common/ast/factory.go b/vendor/github.com/google/cel-go/common/ast/factory.go new file mode 100644 index 00000000000..b7f36e72a49 --- /dev/null +++ b/vendor/github.com/google/cel-go/common/ast/factory.go @@ -0,0 +1,303 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +import "github.com/google/cel-go/common/types/ref" + +// ExprFactory interfaces defines a set of methods necessary for building native expression values. +type ExprFactory interface { + // CopyExpr creates a deep copy of the input Expr value. + CopyExpr(Expr) Expr + + // CopyEntryExpr creates a deep copy of the input EntryExpr value. + CopyEntryExpr(EntryExpr) EntryExpr + + // NewCall creates an Expr value representing a global function call. + NewCall(id int64, function string, args ...Expr) Expr + + // NewComprehension creates an Expr value representing a comprehension over a value range. + NewComprehension(id int64, iterRange Expr, iterVar, accuVar string, accuInit, loopCondition, loopStep, result Expr) Expr + + // NewMemberCall creates an Expr value representing a member function call. + NewMemberCall(id int64, function string, receiver Expr, args ...Expr) Expr + + // NewIdent creates an Expr value representing an identifier. + NewIdent(id int64, name string) Expr + + // NewAccuIdent creates an Expr value representing an accumulator identifier within a + //comprehension. + NewAccuIdent(id int64) Expr + + // NewLiteral creates an Expr value representing a literal value, such as a string or integer. + NewLiteral(id int64, value ref.Val) Expr + + // NewList creates an Expr value representing a list literal expression with optional indices. + // + // Optional indicies will typically be empty unless the CEL optional types are enabled. + NewList(id int64, elems []Expr, optIndices []int32) Expr + + // NewMap creates an Expr value representing a map literal expression + NewMap(id int64, entries []EntryExpr) Expr + + // NewMapEntry creates a MapEntry with a given key, value, and a flag indicating whether + // the key is optionally set. + NewMapEntry(id int64, key, value Expr, isOptional bool) EntryExpr + + // NewPresenceTest creates an Expr representing a field presence test on an operand expression. + NewPresenceTest(id int64, operand Expr, field string) Expr + + // NewSelect creates an Expr representing a field selection on an operand expression. + NewSelect(id int64, operand Expr, field string) Expr + + // NewStruct creates an Expr value representing a struct literal with a given type name and a + // set of field initializers. + NewStruct(id int64, typeName string, fields []EntryExpr) Expr + + // NewStructField creates a StructField with a given field name, value, and a flag indicating + // whether the field is optionally set. + NewStructField(id int64, field string, value Expr, isOptional bool) EntryExpr + + // NewUnspecifiedExpr creates an empty expression node. + NewUnspecifiedExpr(id int64) Expr + + isExprFactory() +} + +type baseExprFactory struct{} + +// NewExprFactory creates an ExprFactory instance. +func NewExprFactory() ExprFactory { + return &baseExprFactory{} +} + +func (fac *baseExprFactory) NewCall(id int64, function string, args ...Expr) Expr { + if len(args) == 0 { + args = []Expr{} + } + return fac.newExpr( + id, + &baseCallExpr{ + function: function, + target: nilExpr, + args: args, + isMember: false, + }) +} + +func (fac *baseExprFactory) NewMemberCall(id int64, function string, target Expr, args ...Expr) Expr { + if len(args) == 0 { + args = []Expr{} + } + return fac.newExpr( + id, + &baseCallExpr{ + function: function, + target: target, + args: args, + isMember: true, + }) +} + +func (fac *baseExprFactory) NewComprehension(id int64, iterRange Expr, iterVar, accuVar string, accuInit, loopCond, loopStep, result Expr) Expr { + return fac.newExpr( + id, + &baseComprehensionExpr{ + iterRange: iterRange, + iterVar: iterVar, + accuVar: accuVar, + accuInit: accuInit, + loopCond: loopCond, + loopStep: loopStep, + result: result, + }) +} + +func (fac *baseExprFactory) NewIdent(id int64, name string) Expr { + return fac.newExpr(id, baseIdentExpr(name)) +} + +func (fac *baseExprFactory) NewAccuIdent(id int64) Expr { + return fac.NewIdent(id, "__result__") +} + +func (fac *baseExprFactory) NewLiteral(id int64, value ref.Val) Expr { + return fac.newExpr(id, &baseLiteral{Val: value}) +} + +func (fac *baseExprFactory) NewList(id int64, elems []Expr, optIndices []int32) Expr { + optIndexMap := make(map[int32]struct{}, len(optIndices)) + for _, idx := range optIndices { + optIndexMap[idx] = struct{}{} + } + return fac.newExpr(id, + &baseListExpr{ + elements: elems, + optIndices: optIndices, + optIndexMap: optIndexMap, + }) +} + +func (fac *baseExprFactory) NewMap(id int64, entries []EntryExpr) Expr { + return fac.newExpr(id, &baseMapExpr{entries: entries}) +} + +func (fac *baseExprFactory) NewMapEntry(id int64, key, value Expr, isOptional bool) EntryExpr { + return fac.newEntryExpr( + id, + &baseMapEntry{ + key: key, + value: value, + isOptional: isOptional, + }) +} + +func (fac *baseExprFactory) NewPresenceTest(id int64, operand Expr, field string) Expr { + return fac.newExpr( + id, + &baseSelectExpr{ + operand: operand, + field: field, + testOnly: true, + }) +} + +func (fac *baseExprFactory) NewSelect(id int64, operand Expr, field string) Expr { + return fac.newExpr( + id, + &baseSelectExpr{ + operand: operand, + field: field, + }) +} + +func (fac *baseExprFactory) NewStruct(id int64, typeName string, fields []EntryExpr) Expr { + return fac.newExpr( + id, + &baseStructExpr{ + typeName: typeName, + fields: fields, + }) +} + +func (fac *baseExprFactory) NewStructField(id int64, field string, value Expr, isOptional bool) EntryExpr { + return fac.newEntryExpr( + id, + &baseStructField{ + field: field, + value: value, + isOptional: isOptional, + }) +} + +func (fac *baseExprFactory) NewUnspecifiedExpr(id int64) Expr { + return fac.newExpr(id, nil) +} + +func (fac *baseExprFactory) CopyExpr(e Expr) Expr { + // unwrap navigable expressions to avoid unnecessary allocations during copying. + if nav, ok := e.(*navigableExprImpl); ok { + e = nav.Expr + } + switch e.Kind() { + case CallKind: + c := e.AsCall() + argsCopy := make([]Expr, len(c.Args())) + for i, arg := range c.Args() { + argsCopy[i] = fac.CopyExpr(arg) + } + if !c.IsMemberFunction() { + return fac.NewCall(e.ID(), c.FunctionName(), argsCopy...) + } + return fac.NewMemberCall(e.ID(), c.FunctionName(), fac.CopyExpr(c.Target()), argsCopy...) + case ComprehensionKind: + compre := e.AsComprehension() + return fac.NewComprehension(e.ID(), + fac.CopyExpr(compre.IterRange()), + compre.IterVar(), + compre.AccuVar(), + fac.CopyExpr(compre.AccuInit()), + fac.CopyExpr(compre.LoopCondition()), + fac.CopyExpr(compre.LoopStep()), + fac.CopyExpr(compre.Result())) + case IdentKind: + return fac.NewIdent(e.ID(), e.AsIdent()) + case ListKind: + l := e.AsList() + elemsCopy := make([]Expr, l.Size()) + for i, elem := range l.Elements() { + elemsCopy[i] = fac.CopyExpr(elem) + } + return fac.NewList(e.ID(), elemsCopy, l.OptionalIndices()) + case LiteralKind: + return fac.NewLiteral(e.ID(), e.AsLiteral()) + case MapKind: + m := e.AsMap() + entriesCopy := make([]EntryExpr, m.Size()) + for i, entry := range m.Entries() { + entriesCopy[i] = fac.CopyEntryExpr(entry) + } + return fac.NewMap(e.ID(), entriesCopy) + case SelectKind: + s := e.AsSelect() + if s.IsTestOnly() { + return fac.NewPresenceTest(e.ID(), fac.CopyExpr(s.Operand()), s.FieldName()) + } + return fac.NewSelect(e.ID(), fac.CopyExpr(s.Operand()), s.FieldName()) + case StructKind: + s := e.AsStruct() + fieldsCopy := make([]EntryExpr, len(s.Fields())) + for i, field := range s.Fields() { + fieldsCopy[i] = fac.CopyEntryExpr(field) + } + return fac.NewStruct(e.ID(), s.TypeName(), fieldsCopy) + default: + return fac.NewUnspecifiedExpr(e.ID()) + } +} + +func (fac *baseExprFactory) CopyEntryExpr(e EntryExpr) EntryExpr { + switch e.Kind() { + case MapEntryKind: + entry := e.AsMapEntry() + return fac.NewMapEntry(e.ID(), + fac.CopyExpr(entry.Key()), fac.CopyExpr(entry.Value()), entry.IsOptional()) + case StructFieldKind: + field := e.AsStructField() + return fac.NewStructField(e.ID(), + field.Name(), fac.CopyExpr(field.Value()), field.IsOptional()) + default: + return fac.newEntryExpr(e.ID(), nil) + } +} + +func (*baseExprFactory) isExprFactory() {} + +func (fac *baseExprFactory) newExpr(id int64, e exprKindCase) Expr { + return &expr{ + id: id, + exprKindCase: e, + } +} + +func (fac *baseExprFactory) newEntryExpr(id int64, e entryExprKindCase) EntryExpr { + return &entryExpr{ + id: id, + entryExprKindCase: e, + } +} + +var ( + defaultFactory = &baseExprFactory{} +) diff --git a/vendor/github.com/google/cel-go/common/ast/navigable.go b/vendor/github.com/google/cel-go/common/ast/navigable.go new file mode 100644 index 00000000000..f5ddf6aac66 --- /dev/null +++ b/vendor/github.com/google/cel-go/common/ast/navigable.go @@ -0,0 +1,652 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +import ( + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" +) + +// NavigableExpr represents the base navigable expression value with methods to inspect the +// parent and child expressions. +type NavigableExpr interface { + Expr + + // Type of the expression. + // + // If the expression is type-checked, the type check metadata is returned. If the expression + // has not been type-checked, the types.DynType value is returned. + Type() *types.Type + + // Parent returns the parent expression node, if one exists. + Parent() (NavigableExpr, bool) + + // Children returns a list of child expression nodes. + Children() []NavigableExpr + + // Depth indicates the depth in the expression tree. + // + // The root expression has depth 0. + Depth() int +} + +// NavigateAST converts an AST to a NavigableExpr +func NavigateAST(ast *AST) NavigableExpr { + return NavigateExpr(ast, ast.Expr()) +} + +// NavigateExpr creates a NavigableExpr whose type information is backed by the input AST. +// +// If the expression is already a NavigableExpr, the parent and depth information will be +// propagated on the new NavigableExpr value; otherwise, the expr value will be treated +// as though it is the root of the expression graph with a depth of 0. +func NavigateExpr(ast *AST, expr Expr) NavigableExpr { + depth := 0 + var parent NavigableExpr = nil + if nav, ok := expr.(NavigableExpr); ok { + depth = nav.Depth() + parent, _ = nav.Parent() + } + return newNavigableExpr(ast, parent, expr, depth) +} + +// ExprMatcher takes a NavigableExpr in and indicates whether the value is a match. +// +// This function type should be use with the `Match` and `MatchList` calls. +type ExprMatcher func(NavigableExpr) bool + +// ConstantValueMatcher returns an ExprMatcher which will return true if the input NavigableExpr +// is comprised of all constant values, such as a simple literal or even list and map literal. +func ConstantValueMatcher() ExprMatcher { + return matchIsConstantValue +} + +// KindMatcher returns an ExprMatcher which will return true if the input NavigableExpr.Kind() matches +// the specified `kind`. +func KindMatcher(kind ExprKind) ExprMatcher { + return func(e NavigableExpr) bool { + return e.Kind() == kind + } +} + +// FunctionMatcher returns an ExprMatcher which will match NavigableExpr nodes of CallKind type whose +// function name is equal to `funcName`. +func FunctionMatcher(funcName string) ExprMatcher { + return func(e NavigableExpr) bool { + if e.Kind() != CallKind { + return false + } + return e.AsCall().FunctionName() == funcName + } +} + +// AllMatcher returns true for all descendants of a NavigableExpr, effectively flattening them into a list. +// +// Such a result would work well with subsequent MatchList calls. +func AllMatcher() ExprMatcher { + return func(NavigableExpr) bool { + return true + } +} + +// MatchDescendants takes a NavigableExpr and ExprMatcher and produces a list of NavigableExpr values +// matching the input criteria in post-order (bottom up). +func MatchDescendants(expr NavigableExpr, matcher ExprMatcher) []NavigableExpr { + matches := []NavigableExpr{} + navVisitor := &baseVisitor{ + visitExpr: func(e Expr) { + nav := e.(NavigableExpr) + if matcher(nav) { + matches = append(matches, nav) + } + }, + } + visit(expr, navVisitor, postOrder, 0, 0) + return matches +} + +// MatchSubset applies an ExprMatcher to a list of NavigableExpr values and their descendants, producing a +// subset of NavigableExpr values which match. +func MatchSubset(exprs []NavigableExpr, matcher ExprMatcher) []NavigableExpr { + matches := []NavigableExpr{} + navVisitor := &baseVisitor{ + visitExpr: func(e Expr) { + nav := e.(NavigableExpr) + if matcher(nav) { + matches = append(matches, nav) + } + }, + } + for _, expr := range exprs { + visit(expr, navVisitor, postOrder, 0, 1) + } + return matches +} + +// Visitor defines an object for visiting Expr and EntryExpr nodes within an expression graph. +type Visitor interface { + // VisitExpr visits the input expression. + VisitExpr(Expr) + + // VisitEntryExpr visits the input entry expression, i.e. a struct field or map entry. + VisitEntryExpr(EntryExpr) +} + +type baseVisitor struct { + visitExpr func(Expr) + visitEntryExpr func(EntryExpr) +} + +// VisitExpr visits the Expr if the internal expr visitor has been configured. +func (v *baseVisitor) VisitExpr(e Expr) { + if v.visitExpr != nil { + v.visitExpr(e) + } +} + +// VisitEntryExpr visits the entry if the internal expr entry visitor has been configured. +func (v *baseVisitor) VisitEntryExpr(e EntryExpr) { + if v.visitEntryExpr != nil { + v.visitEntryExpr(e) + } +} + +// NewExprVisitor creates a visitor which only visits expression nodes. +func NewExprVisitor(v func(Expr)) Visitor { + return &baseVisitor{ + visitExpr: v, + visitEntryExpr: nil, + } +} + +// PostOrderVisit walks the expression graph and calls the visitor in post-order (bottom-up). +func PostOrderVisit(expr Expr, visitor Visitor) { + visit(expr, visitor, postOrder, 0, 0) +} + +// PreOrderVisit walks the expression graph and calls the visitor in pre-order (top-down). +func PreOrderVisit(expr Expr, visitor Visitor) { + visit(expr, visitor, preOrder, 0, 0) +} + +type visitOrder int + +const ( + preOrder = iota + 1 + postOrder +) + +// TODO: consider exposing a way to configure a limit for the max visit depth. +// It's possible that we could want to configure this on the NewExprVisitor() +// and through MatchDescendents() / MaxID(). +func visit(expr Expr, visitor Visitor, order visitOrder, depth, maxDepth int) { + if maxDepth > 0 && depth == maxDepth { + return + } + if order == preOrder { + visitor.VisitExpr(expr) + } + switch expr.Kind() { + case CallKind: + c := expr.AsCall() + if c.IsMemberFunction() { + visit(c.Target(), visitor, order, depth+1, maxDepth) + } + for _, arg := range c.Args() { + visit(arg, visitor, order, depth+1, maxDepth) + } + case ComprehensionKind: + c := expr.AsComprehension() + visit(c.IterRange(), visitor, order, depth+1, maxDepth) + visit(c.AccuInit(), visitor, order, depth+1, maxDepth) + visit(c.LoopCondition(), visitor, order, depth+1, maxDepth) + visit(c.LoopStep(), visitor, order, depth+1, maxDepth) + visit(c.Result(), visitor, order, depth+1, maxDepth) + case ListKind: + l := expr.AsList() + for _, elem := range l.Elements() { + visit(elem, visitor, order, depth+1, maxDepth) + } + case MapKind: + m := expr.AsMap() + for _, e := range m.Entries() { + if order == preOrder { + visitor.VisitEntryExpr(e) + } + entry := e.AsMapEntry() + visit(entry.Key(), visitor, order, depth+1, maxDepth) + visit(entry.Value(), visitor, order, depth+1, maxDepth) + if order == postOrder { + visitor.VisitEntryExpr(e) + } + } + case SelectKind: + visit(expr.AsSelect().Operand(), visitor, order, depth+1, maxDepth) + case StructKind: + s := expr.AsStruct() + for _, f := range s.Fields() { + visitor.VisitEntryExpr(f) + visit(f.AsStructField().Value(), visitor, order, depth+1, maxDepth) + } + } + if order == postOrder { + visitor.VisitExpr(expr) + } +} + +func matchIsConstantValue(e NavigableExpr) bool { + if e.Kind() == LiteralKind { + return true + } + if e.Kind() == StructKind || e.Kind() == MapKind || e.Kind() == ListKind { + for _, child := range e.Children() { + if !matchIsConstantValue(child) { + return false + } + } + return true + } + return false +} + +func newNavigableExpr(ast *AST, parent NavigableExpr, expr Expr, depth int) NavigableExpr { + // Reduce navigable expression nesting by unwrapping the embedded Expr value. + if nav, ok := expr.(*navigableExprImpl); ok { + expr = nav.Expr + } + nav := &navigableExprImpl{ + Expr: expr, + depth: depth, + ast: ast, + parent: parent, + createChildren: getChildFactory(expr), + } + return nav +} + +type navigableExprImpl struct { + Expr + depth int + ast *AST + parent NavigableExpr + createChildren childFactory +} + +func (nav *navigableExprImpl) Parent() (NavigableExpr, bool) { + if nav.parent != nil { + return nav.parent, true + } + return nil, false +} + +func (nav *navigableExprImpl) ID() int64 { + return nav.Expr.ID() +} + +func (nav *navigableExprImpl) Kind() ExprKind { + return nav.Expr.Kind() +} + +func (nav *navigableExprImpl) Type() *types.Type { + return nav.ast.GetType(nav.ID()) +} + +func (nav *navigableExprImpl) Children() []NavigableExpr { + return nav.createChildren(nav) +} + +func (nav *navigableExprImpl) Depth() int { + return nav.depth +} + +func (nav *navigableExprImpl) AsCall() CallExpr { + return navigableCallImpl{navigableExprImpl: nav} +} + +func (nav *navigableExprImpl) AsComprehension() ComprehensionExpr { + return navigableComprehensionImpl{navigableExprImpl: nav} +} + +func (nav *navigableExprImpl) AsIdent() string { + return nav.Expr.AsIdent() +} + +func (nav *navigableExprImpl) AsList() ListExpr { + return navigableListImpl{navigableExprImpl: nav} +} + +func (nav *navigableExprImpl) AsLiteral() ref.Val { + return nav.Expr.AsLiteral() +} + +func (nav *navigableExprImpl) AsMap() MapExpr { + return navigableMapImpl{navigableExprImpl: nav} +} + +func (nav *navigableExprImpl) AsSelect() SelectExpr { + return navigableSelectImpl{navigableExprImpl: nav} +} + +func (nav *navigableExprImpl) AsStruct() StructExpr { + return navigableStructImpl{navigableExprImpl: nav} +} + +func (nav *navigableExprImpl) createChild(e Expr) NavigableExpr { + return newNavigableExpr(nav.ast, nav, e, nav.depth+1) +} + +func (nav *navigableExprImpl) isExpr() {} + +type navigableCallImpl struct { + *navigableExprImpl +} + +func (call navigableCallImpl) FunctionName() string { + return call.Expr.AsCall().FunctionName() +} + +func (call navigableCallImpl) IsMemberFunction() bool { + return call.Expr.AsCall().IsMemberFunction() +} + +func (call navigableCallImpl) Target() Expr { + t := call.Expr.AsCall().Target() + if t != nil { + return call.createChild(t) + } + return nil +} + +func (call navigableCallImpl) Args() []Expr { + args := call.Expr.AsCall().Args() + navArgs := make([]Expr, len(args)) + for i, a := range args { + navArgs[i] = call.createChild(a) + } + return navArgs +} + +type navigableComprehensionImpl struct { + *navigableExprImpl +} + +func (comp navigableComprehensionImpl) IterRange() Expr { + return comp.createChild(comp.Expr.AsComprehension().IterRange()) +} + +func (comp navigableComprehensionImpl) IterVar() string { + return comp.Expr.AsComprehension().IterVar() +} + +func (comp navigableComprehensionImpl) AccuVar() string { + return comp.Expr.AsComprehension().AccuVar() +} + +func (comp navigableComprehensionImpl) AccuInit() Expr { + return comp.createChild(comp.Expr.AsComprehension().AccuInit()) +} + +func (comp navigableComprehensionImpl) LoopCondition() Expr { + return comp.createChild(comp.Expr.AsComprehension().LoopCondition()) +} + +func (comp navigableComprehensionImpl) LoopStep() Expr { + return comp.createChild(comp.Expr.AsComprehension().LoopStep()) +} + +func (comp navigableComprehensionImpl) Result() Expr { + return comp.createChild(comp.Expr.AsComprehension().Result()) +} + +type navigableListImpl struct { + *navigableExprImpl +} + +func (l navigableListImpl) Elements() []Expr { + pbElems := l.Expr.AsList().Elements() + elems := make([]Expr, len(pbElems)) + for i := 0; i < len(pbElems); i++ { + elems[i] = l.createChild(pbElems[i]) + } + return elems +} + +func (l navigableListImpl) IsOptional(index int32) bool { + return l.Expr.AsList().IsOptional(index) +} + +func (l navigableListImpl) OptionalIndices() []int32 { + return l.Expr.AsList().OptionalIndices() +} + +func (l navigableListImpl) Size() int { + return l.Expr.AsList().Size() +} + +type navigableMapImpl struct { + *navigableExprImpl +} + +func (m navigableMapImpl) Entries() []EntryExpr { + mapExpr := m.Expr.AsMap() + entries := make([]EntryExpr, len(mapExpr.Entries())) + for i, e := range mapExpr.Entries() { + entry := e.AsMapEntry() + entries[i] = &entryExpr{ + id: e.ID(), + entryExprKindCase: navigableEntryImpl{ + key: m.createChild(entry.Key()), + val: m.createChild(entry.Value()), + isOpt: entry.IsOptional(), + }, + } + } + return entries +} + +func (m navigableMapImpl) Size() int { + return m.Expr.AsMap().Size() +} + +type navigableEntryImpl struct { + key NavigableExpr + val NavigableExpr + isOpt bool +} + +func (e navigableEntryImpl) Kind() EntryExprKind { + return MapEntryKind +} + +func (e navigableEntryImpl) Key() Expr { + return e.key +} + +func (e navigableEntryImpl) Value() Expr { + return e.val +} + +func (e navigableEntryImpl) IsOptional() bool { + return e.isOpt +} + +func (e navigableEntryImpl) renumberIDs(IDGenerator) {} + +func (e navigableEntryImpl) isEntryExpr() {} + +type navigableSelectImpl struct { + *navigableExprImpl +} + +func (sel navigableSelectImpl) FieldName() string { + return sel.Expr.AsSelect().FieldName() +} + +func (sel navigableSelectImpl) IsTestOnly() bool { + return sel.Expr.AsSelect().IsTestOnly() +} + +func (sel navigableSelectImpl) Operand() Expr { + return sel.createChild(sel.Expr.AsSelect().Operand()) +} + +type navigableStructImpl struct { + *navigableExprImpl +} + +func (s navigableStructImpl) TypeName() string { + return s.Expr.AsStruct().TypeName() +} + +func (s navigableStructImpl) Fields() []EntryExpr { + fieldInits := s.Expr.AsStruct().Fields() + fields := make([]EntryExpr, len(fieldInits)) + for i, f := range fieldInits { + field := f.AsStructField() + fields[i] = &entryExpr{ + id: f.ID(), + entryExprKindCase: navigableFieldImpl{ + name: field.Name(), + val: s.createChild(field.Value()), + isOpt: field.IsOptional(), + }, + } + } + return fields +} + +type navigableFieldImpl struct { + name string + val NavigableExpr + isOpt bool +} + +func (f navigableFieldImpl) Kind() EntryExprKind { + return StructFieldKind +} + +func (f navigableFieldImpl) Name() string { + return f.name +} + +func (f navigableFieldImpl) Value() Expr { + return f.val +} + +func (f navigableFieldImpl) IsOptional() bool { + return f.isOpt +} + +func (f navigableFieldImpl) renumberIDs(IDGenerator) {} + +func (f navigableFieldImpl) isEntryExpr() {} + +func getChildFactory(expr Expr) childFactory { + if expr == nil { + return noopFactory + } + switch expr.Kind() { + case LiteralKind: + return noopFactory + case IdentKind: + return noopFactory + case SelectKind: + return selectFactory + case CallKind: + return callArgFactory + case ListKind: + return listElemFactory + case MapKind: + return mapEntryFactory + case StructKind: + return structEntryFactory + case ComprehensionKind: + return comprehensionFactory + default: + return noopFactory + } +} + +type childFactory func(*navigableExprImpl) []NavigableExpr + +func noopFactory(*navigableExprImpl) []NavigableExpr { + return nil +} + +func selectFactory(nav *navigableExprImpl) []NavigableExpr { + return []NavigableExpr{nav.createChild(nav.AsSelect().Operand())} +} + +func callArgFactory(nav *navigableExprImpl) []NavigableExpr { + call := nav.Expr.AsCall() + argCount := len(call.Args()) + if call.IsMemberFunction() { + argCount++ + } + navExprs := make([]NavigableExpr, argCount) + i := 0 + if call.IsMemberFunction() { + navExprs[i] = nav.createChild(call.Target()) + i++ + } + for _, arg := range call.Args() { + navExprs[i] = nav.createChild(arg) + i++ + } + return navExprs +} + +func listElemFactory(nav *navigableExprImpl) []NavigableExpr { + l := nav.Expr.AsList() + navExprs := make([]NavigableExpr, len(l.Elements())) + for i, e := range l.Elements() { + navExprs[i] = nav.createChild(e) + } + return navExprs +} + +func structEntryFactory(nav *navigableExprImpl) []NavigableExpr { + s := nav.Expr.AsStruct() + entries := make([]NavigableExpr, len(s.Fields())) + for i, e := range s.Fields() { + f := e.AsStructField() + entries[i] = nav.createChild(f.Value()) + } + return entries +} + +func mapEntryFactory(nav *navigableExprImpl) []NavigableExpr { + m := nav.Expr.AsMap() + entries := make([]NavigableExpr, len(m.Entries())*2) + j := 0 + for _, e := range m.Entries() { + mapEntry := e.AsMapEntry() + entries[j] = nav.createChild(mapEntry.Key()) + entries[j+1] = nav.createChild(mapEntry.Value()) + j += 2 + } + return entries +} + +func comprehensionFactory(nav *navigableExprImpl) []NavigableExpr { + compre := nav.Expr.AsComprehension() + return []NavigableExpr{ + nav.createChild(compre.IterRange()), + nav.createChild(compre.AccuInit()), + nav.createChild(compre.LoopCondition()), + nav.createChild(compre.LoopStep()), + nav.createChild(compre.Result()), + } +} diff --git a/vendor/github.com/google/cel-go/common/containers/BUILD.bazel b/vendor/github.com/google/cel-go/common/containers/BUILD.bazel index 3f3f0788712..81197f0641c 100644 --- a/vendor/github.com/google/cel-go/common/containers/BUILD.bazel +++ b/vendor/github.com/google/cel-go/common/containers/BUILD.bazel @@ -12,7 +12,7 @@ go_library( ], importpath = "github.com/google/cel-go/common/containers", deps = [ - "@org_golang_google_genproto_googleapis_api//expr/v1alpha1:go_default_library", + "//common/ast:go_default_library", ], ) @@ -26,6 +26,6 @@ go_test( ":go_default_library", ], deps = [ - "@org_golang_google_genproto_googleapis_api//expr/v1alpha1:go_default_library", + "//common/ast:go_default_library", ], ) diff --git a/vendor/github.com/google/cel-go/common/containers/container.go b/vendor/github.com/google/cel-go/common/containers/container.go index d46698d3cdf..52153d4cd18 100644 --- a/vendor/github.com/google/cel-go/common/containers/container.go +++ b/vendor/github.com/google/cel-go/common/containers/container.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + "github.com/google/cel-go/common/ast" ) var ( @@ -297,19 +297,19 @@ func Name(name string) ContainerOption { // ToQualifiedName converts an expression AST into a qualified name if possible, with a boolean // 'found' value that indicates if the conversion is successful. -func ToQualifiedName(e *exprpb.Expr) (string, bool) { - switch e.GetExprKind().(type) { - case *exprpb.Expr_IdentExpr: - id := e.GetIdentExpr() - return id.GetName(), true - case *exprpb.Expr_SelectExpr: - sel := e.GetSelectExpr() +func ToQualifiedName(e ast.Expr) (string, bool) { + switch e.Kind() { + case ast.IdentKind: + id := e.AsIdent() + return id, true + case ast.SelectKind: + sel := e.AsSelect() // Test only expressions are not valid as qualified names. - if sel.GetTestOnly() { + if sel.IsTestOnly() { return "", false } - if qual, found := ToQualifiedName(sel.GetOperand()); found { - return qual + "." + sel.GetField(), true + if qual, found := ToQualifiedName(sel.Operand()); found { + return qual + "." + sel.FieldName(), true } } return "", false diff --git a/vendor/github.com/google/cel-go/common/debug/BUILD.bazel b/vendor/github.com/google/cel-go/common/debug/BUILD.bazel index 1f029839c71..724ed340458 100644 --- a/vendor/github.com/google/cel-go/common/debug/BUILD.bazel +++ b/vendor/github.com/google/cel-go/common/debug/BUILD.bazel @@ -13,6 +13,8 @@ go_library( importpath = "github.com/google/cel-go/common/debug", deps = [ "//common:go_default_library", - "@org_golang_google_genproto_googleapis_api//expr/v1alpha1:go_default_library", + "//common/ast:go_default_library", + "//common/types:go_default_library", + "//common/types/ref:go_default_library", ], ) diff --git a/vendor/github.com/google/cel-go/common/debug/debug.go b/vendor/github.com/google/cel-go/common/debug/debug.go index 5dab156ef36..e4c01ac6ed2 100644 --- a/vendor/github.com/google/cel-go/common/debug/debug.go +++ b/vendor/github.com/google/cel-go/common/debug/debug.go @@ -22,7 +22,9 @@ import ( "strconv" "strings" - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + "github.com/google/cel-go/common/ast" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" ) // Adorner returns debug metadata that will be tacked on to the string @@ -38,7 +40,7 @@ type Writer interface { // Buffer pushes an expression into an internal queue of expressions to // write to a string. - Buffer(e *exprpb.Expr) + Buffer(e ast.Expr) } type emptyDebugAdorner struct { @@ -51,12 +53,12 @@ func (a *emptyDebugAdorner) GetMetadata(e any) string { } // ToDebugString gives the unadorned string representation of the Expr. -func ToDebugString(e *exprpb.Expr) string { +func ToDebugString(e ast.Expr) string { return ToAdornedDebugString(e, emptyAdorner) } // ToAdornedDebugString gives the adorned string representation of the Expr. -func ToAdornedDebugString(e *exprpb.Expr, adorner Adorner) string { +func ToAdornedDebugString(e ast.Expr, adorner Adorner) string { w := newDebugWriter(adorner) w.Buffer(e) return w.String() @@ -78,49 +80,51 @@ func newDebugWriter(a Adorner) *debugWriter { } } -func (w *debugWriter) Buffer(e *exprpb.Expr) { +func (w *debugWriter) Buffer(e ast.Expr) { if e == nil { return } - switch e.ExprKind.(type) { - case *exprpb.Expr_ConstExpr: - w.append(formatLiteral(e.GetConstExpr())) - case *exprpb.Expr_IdentExpr: - w.append(e.GetIdentExpr().Name) - case *exprpb.Expr_SelectExpr: - w.appendSelect(e.GetSelectExpr()) - case *exprpb.Expr_CallExpr: - w.appendCall(e.GetCallExpr()) - case *exprpb.Expr_ListExpr: - w.appendList(e.GetListExpr()) - case *exprpb.Expr_StructExpr: - w.appendStruct(e.GetStructExpr()) - case *exprpb.Expr_ComprehensionExpr: - w.appendComprehension(e.GetComprehensionExpr()) + switch e.Kind() { + case ast.LiteralKind: + w.append(formatLiteral(e.AsLiteral())) + case ast.IdentKind: + w.append(e.AsIdent()) + case ast.SelectKind: + w.appendSelect(e.AsSelect()) + case ast.CallKind: + w.appendCall(e.AsCall()) + case ast.ListKind: + w.appendList(e.AsList()) + case ast.MapKind: + w.appendMap(e.AsMap()) + case ast.StructKind: + w.appendStruct(e.AsStruct()) + case ast.ComprehensionKind: + w.appendComprehension(e.AsComprehension()) } w.adorn(e) } -func (w *debugWriter) appendSelect(sel *exprpb.Expr_Select) { - w.Buffer(sel.GetOperand()) +func (w *debugWriter) appendSelect(sel ast.SelectExpr) { + w.Buffer(sel.Operand()) w.append(".") - w.append(sel.GetField()) - if sel.TestOnly { + w.append(sel.FieldName()) + if sel.IsTestOnly() { w.append("~test-only~") } } -func (w *debugWriter) appendCall(call *exprpb.Expr_Call) { - if call.Target != nil { - w.Buffer(call.GetTarget()) +func (w *debugWriter) appendCall(call ast.CallExpr) { + if call.IsMemberFunction() { + w.Buffer(call.Target()) w.append(".") } - w.append(call.GetFunction()) + w.append(call.FunctionName()) w.append("(") - if len(call.GetArgs()) > 0 { + if len(call.Args()) > 0 { w.addIndent() w.appendLine() - for i, arg := range call.GetArgs() { + for i, arg := range call.Args() { if i > 0 { w.append(",") w.appendLine() @@ -133,12 +137,12 @@ func (w *debugWriter) appendCall(call *exprpb.Expr_Call) { w.append(")") } -func (w *debugWriter) appendList(list *exprpb.Expr_CreateList) { +func (w *debugWriter) appendList(list ast.ListExpr) { w.append("[") - if len(list.GetElements()) > 0 { + if len(list.Elements()) > 0 { w.appendLine() w.addIndent() - for i, elem := range list.GetElements() { + for i, elem := range list.Elements() { if i > 0 { w.append(",") w.appendLine() @@ -151,32 +155,25 @@ func (w *debugWriter) appendList(list *exprpb.Expr_CreateList) { w.append("]") } -func (w *debugWriter) appendStruct(obj *exprpb.Expr_CreateStruct) { - if obj.MessageName != "" { - w.appendObject(obj) - } else { - w.appendMap(obj) - } -} - -func (w *debugWriter) appendObject(obj *exprpb.Expr_CreateStruct) { - w.append(obj.GetMessageName()) +func (w *debugWriter) appendStruct(obj ast.StructExpr) { + w.append(obj.TypeName()) w.append("{") - if len(obj.GetEntries()) > 0 { + if len(obj.Fields()) > 0 { w.appendLine() w.addIndent() - for i, entry := range obj.GetEntries() { + for i, f := range obj.Fields() { + field := f.AsStructField() if i > 0 { w.append(",") w.appendLine() } - if entry.GetOptionalEntry() { + if field.IsOptional() { w.append("?") } - w.append(entry.GetFieldKey()) + w.append(field.Name()) w.append(":") - w.Buffer(entry.GetValue()) - w.adorn(entry) + w.Buffer(field.Value()) + w.adorn(f) } w.removeIndent() w.appendLine() @@ -184,23 +181,24 @@ func (w *debugWriter) appendObject(obj *exprpb.Expr_CreateStruct) { w.append("}") } -func (w *debugWriter) appendMap(obj *exprpb.Expr_CreateStruct) { +func (w *debugWriter) appendMap(m ast.MapExpr) { w.append("{") - if len(obj.GetEntries()) > 0 { + if m.Size() > 0 { w.appendLine() w.addIndent() - for i, entry := range obj.GetEntries() { + for i, e := range m.Entries() { + entry := e.AsMapEntry() if i > 0 { w.append(",") w.appendLine() } - if entry.GetOptionalEntry() { + if entry.IsOptional() { w.append("?") } - w.Buffer(entry.GetMapKey()) + w.Buffer(entry.Key()) w.append(":") - w.Buffer(entry.GetValue()) - w.adorn(entry) + w.Buffer(entry.Value()) + w.adorn(e) } w.removeIndent() w.appendLine() @@ -208,62 +206,62 @@ func (w *debugWriter) appendMap(obj *exprpb.Expr_CreateStruct) { w.append("}") } -func (w *debugWriter) appendComprehension(comprehension *exprpb.Expr_Comprehension) { +func (w *debugWriter) appendComprehension(comprehension ast.ComprehensionExpr) { w.append("__comprehension__(") w.addIndent() w.appendLine() w.append("// Variable") w.appendLine() - w.append(comprehension.GetIterVar()) + w.append(comprehension.IterVar()) w.append(",") w.appendLine() w.append("// Target") w.appendLine() - w.Buffer(comprehension.GetIterRange()) + w.Buffer(comprehension.IterRange()) w.append(",") w.appendLine() w.append("// Accumulator") w.appendLine() - w.append(comprehension.GetAccuVar()) + w.append(comprehension.AccuVar()) w.append(",") w.appendLine() w.append("// Init") w.appendLine() - w.Buffer(comprehension.GetAccuInit()) + w.Buffer(comprehension.AccuInit()) w.append(",") w.appendLine() w.append("// LoopCondition") w.appendLine() - w.Buffer(comprehension.GetLoopCondition()) + w.Buffer(comprehension.LoopCondition()) w.append(",") w.appendLine() w.append("// LoopStep") w.appendLine() - w.Buffer(comprehension.GetLoopStep()) + w.Buffer(comprehension.LoopStep()) w.append(",") w.appendLine() w.append("// Result") w.appendLine() - w.Buffer(comprehension.GetResult()) + w.Buffer(comprehension.Result()) w.append(")") w.removeIndent() } -func formatLiteral(c *exprpb.Constant) string { - switch c.GetConstantKind().(type) { - case *exprpb.Constant_BoolValue: - return fmt.Sprintf("%t", c.GetBoolValue()) - case *exprpb.Constant_BytesValue: - return fmt.Sprintf("b\"%s\"", string(c.GetBytesValue())) - case *exprpb.Constant_DoubleValue: - return fmt.Sprintf("%v", c.GetDoubleValue()) - case *exprpb.Constant_Int64Value: - return fmt.Sprintf("%d", c.GetInt64Value()) - case *exprpb.Constant_StringValue: - return strconv.Quote(c.GetStringValue()) - case *exprpb.Constant_Uint64Value: - return fmt.Sprintf("%du", c.GetUint64Value()) - case *exprpb.Constant_NullValue: +func formatLiteral(c ref.Val) string { + switch v := c.(type) { + case types.Bool: + return fmt.Sprintf("%t", v) + case types.Bytes: + return fmt.Sprintf("b\"%s\"", string(v)) + case types.Double: + return fmt.Sprintf("%v", float64(v)) + case types.Int: + return fmt.Sprintf("%d", int64(v)) + case types.String: + return strconv.Quote(string(v)) + case types.Uint: + return fmt.Sprintf("%du", uint64(v)) + case types.Null: return "null" default: panic("Unknown constant type") diff --git a/vendor/github.com/google/cel-go/common/errors.go b/vendor/github.com/google/cel-go/common/errors.go index 63919714ea7..25adc73d8e0 100644 --- a/vendor/github.com/google/cel-go/common/errors.go +++ b/vendor/github.com/google/cel-go/common/errors.go @@ -64,7 +64,7 @@ func (e *Errors) GetErrors() []*Error { // Append creates a new Errors object with the current and input errors. func (e *Errors) Append(errs []*Error) *Errors { return &Errors{ - errors: append(e.errors, errs...), + errors: append(e.errors[:], errs...), source: e.source, numErrors: e.numErrors + len(errs), maxErrorsToReport: e.maxErrorsToReport, diff --git a/vendor/github.com/google/cel-go/common/types/err.go b/vendor/github.com/google/cel-go/common/types/err.go index aa8f94b4f85..9c9d9e21efb 100644 --- a/vendor/github.com/google/cel-go/common/types/err.go +++ b/vendor/github.com/google/cel-go/common/types/err.go @@ -31,6 +31,7 @@ type Error interface { // Err type which extends the built-in go error and implements ref.Val. type Err struct { error + id int64 } var ( @@ -58,7 +59,24 @@ var ( // NewErr creates a new Err described by the format string and args. // TODO: Audit the use of this function and standardize the error messages and codes. func NewErr(format string, args ...any) ref.Val { - return &Err{fmt.Errorf(format, args...)} + return &Err{error: fmt.Errorf(format, args...)} +} + +// NewErrWithNodeID creates a new Err described by the format string and args. +// TODO: Audit the use of this function and standardize the error messages and codes. +func NewErrWithNodeID(id int64, format string, args ...any) ref.Val { + return &Err{error: fmt.Errorf(format, args...), id: id} +} + +// LabelErrNode returns val unaltered it is not an Err or if the error has a non-zero +// AST node ID already present. Otherwise the id is added to the error for +// recovery with the Err.NodeID method. +func LabelErrNode(id int64, val ref.Val) ref.Val { + if err, ok := val.(*Err); ok && err.id == 0 { + err.id = id + return err + } + return val } // NoSuchOverloadErr returns a new types.Err instance with a no such overload message. @@ -124,6 +142,11 @@ func (e *Err) Value() any { return e.error } +// NodeID returns the AST node ID of the expression that returned the error. +func (e *Err) NodeID() int64 { + return e.id +} + // Is implements errors.Is. func (e *Err) Is(target error) bool { return e.error.Error() == target.Error() diff --git a/vendor/github.com/google/cel-go/common/types/int.go b/vendor/github.com/google/cel-go/common/types/int.go index 940772aed1f..0ae9507c396 100644 --- a/vendor/github.com/google/cel-go/common/types/int.go +++ b/vendor/github.com/google/cel-go/common/types/int.go @@ -90,6 +90,18 @@ func (i Int) ConvertToNative(typeDesc reflect.Type) (any, error) { return nil, err } return reflect.ValueOf(v).Convert(typeDesc).Interface(), nil + case reflect.Int8: + v, err := int64ToInt8Checked(int64(i)) + if err != nil { + return nil, err + } + return reflect.ValueOf(v).Convert(typeDesc).Interface(), nil + case reflect.Int16: + v, err := int64ToInt16Checked(int64(i)) + if err != nil { + return nil, err + } + return reflect.ValueOf(v).Convert(typeDesc).Interface(), nil case reflect.Int64: return reflect.ValueOf(i).Convert(typeDesc).Interface(), nil case reflect.Ptr: diff --git a/vendor/github.com/google/cel-go/common/types/list.go b/vendor/github.com/google/cel-go/common/types/list.go index d4932b4a90c..06f48dde75f 100644 --- a/vendor/github.com/google/cel-go/common/types/list.go +++ b/vendor/github.com/google/cel-go/common/types/list.go @@ -190,7 +190,13 @@ func (l *baseList) ConvertToNative(typeDesc reflect.Type) (any, error) { // Allow the element ConvertToNative() function to determine whether conversion is possible. otherElemType := typeDesc.Elem() elemCount := l.size - nativeList := reflect.MakeSlice(typeDesc, elemCount, elemCount) + var nativeList reflect.Value + if typeDesc.Kind() == reflect.Array { + nativeList = reflect.New(reflect.ArrayOf(elemCount, typeDesc)).Elem().Index(0) + } else { + nativeList = reflect.MakeSlice(typeDesc, elemCount, elemCount) + + } for i := 0; i < elemCount; i++ { elem := l.NativeToValue(l.get(i)) nativeElemVal, err := elem.ConvertToNative(otherElemType) diff --git a/vendor/github.com/google/cel-go/common/types/optional.go b/vendor/github.com/google/cel-go/common/types/optional.go index a9f30aed015..97845a740c8 100644 --- a/vendor/github.com/google/cel-go/common/types/optional.go +++ b/vendor/github.com/google/cel-go/common/types/optional.go @@ -24,7 +24,7 @@ import ( var ( // OptionalType indicates the runtime type of an optional value. - OptionalType = NewOpaqueType("optional") + OptionalType = NewOpaqueType("optional_type") // OptionalNone is a sentinel value which is used to indicate an empty optional value. OptionalNone = &Optional{} diff --git a/vendor/github.com/google/cel-go/common/types/overflow.go b/vendor/github.com/google/cel-go/common/types/overflow.go index c68a921826b..dcb66ef5961 100644 --- a/vendor/github.com/google/cel-go/common/types/overflow.go +++ b/vendor/github.com/google/cel-go/common/types/overflow.go @@ -326,6 +326,26 @@ func int64ToUint64Checked(v int64) (uint64, error) { return uint64(v), nil } +// int64ToInt8Checked converts an int64 to an int8 value. +// +// If the conversion fails due to overflow the error return value will be non-nil. +func int64ToInt8Checked(v int64) (int8, error) { + if v < math.MinInt8 || v > math.MaxInt8 { + return 0, errIntOverflow + } + return int8(v), nil +} + +// int64ToInt16Checked converts an int64 to an int16 value. +// +// If the conversion fails due to overflow the error return value will be non-nil. +func int64ToInt16Checked(v int64) (int16, error) { + if v < math.MinInt16 || v > math.MaxInt16 { + return 0, errIntOverflow + } + return int16(v), nil +} + // int64ToInt32Checked converts an int64 to an int32 value. // // If the conversion fails due to overflow the error return value will be non-nil. @@ -336,6 +356,26 @@ func int64ToInt32Checked(v int64) (int32, error) { return int32(v), nil } +// uint64ToUint8Checked converts a uint64 to a uint8 value. +// +// If the conversion fails due to overflow the error return value will be non-nil. +func uint64ToUint8Checked(v uint64) (uint8, error) { + if v > math.MaxUint8 { + return 0, errUintOverflow + } + return uint8(v), nil +} + +// uint64ToUint16Checked converts a uint64 to a uint16 value. +// +// If the conversion fails due to overflow the error return value will be non-nil. +func uint64ToUint16Checked(v uint64) (uint16, error) { + if v > math.MaxUint16 { + return 0, errUintOverflow + } + return uint16(v), nil +} + // uint64ToUint32Checked converts a uint64 to a uint32 value. // // If the conversion fails due to overflow the error return value will be non-nil. diff --git a/vendor/github.com/google/cel-go/common/types/provider.go b/vendor/github.com/google/cel-go/common/types/provider.go index e80b4622e24..c5ff05fdb96 100644 --- a/vendor/github.com/google/cel-go/common/types/provider.go +++ b/vendor/github.com/google/cel-go/common/types/provider.go @@ -54,6 +54,10 @@ type Provider interface { // Returns false if not found. FindStructType(structType string) (*Type, bool) + // FindStructFieldNames returns thet field names associated with the type, if the type + // is found. + FindStructFieldNames(structType string) ([]string, bool) + // FieldStructFieldType returns the field type for a checked type value. Returns // false if the field could not be found. FindStructFieldType(structType, fieldName string) (*FieldType, bool) @@ -154,7 +158,7 @@ func (p *Registry) EnumValue(enumName string) ref.Val { return Int(enumVal.Value()) } -// FieldFieldType returns the field type for a checked type value. Returns false if +// FindFieldType returns the field type for a checked type value. Returns false if // the field could not be found. // // Deprecated: use FindStructFieldType @@ -173,7 +177,24 @@ func (p *Registry) FindFieldType(structType, fieldName string) (*ref.FieldType, GetFrom: field.GetFrom}, true } -// FieldStructFieldType returns the field type for a checked type value. Returns +// FindStructFieldNames returns the set of field names for the given struct type, +// if the type exists in the registry. +func (p *Registry) FindStructFieldNames(structType string) ([]string, bool) { + msgType, found := p.pbdb.DescribeType(structType) + if !found { + return []string{}, false + } + fieldMap := msgType.FieldMap() + fields := make([]string, len(fieldMap)) + idx := 0 + for f := range fieldMap { + fields[idx] = f + idx++ + } + return fields, true +} + +// FindStructFieldType returns the field type for a checked type value. Returns // false if the field could not be found. func (p *Registry) FindStructFieldType(structType, fieldName string) (*FieldType, bool) { msgType, found := p.pbdb.DescribeType(structType) @@ -255,7 +276,7 @@ func (p *Registry) NewValue(structType string, fields map[string]ref.Val) ref.Va } err := msgSetField(msg, field, value) if err != nil { - return &Err{err} + return &Err{error: err} } } return p.NativeToValue(msg.Interface()) @@ -569,12 +590,33 @@ func nativeToValue(a Adapter, value any) (ref.Val, bool) { return NewDynamicMap(a, v), true // type aliases of primitive types cannot be asserted as that type, but rather need // to be downcast to int32 before being converted to a CEL representation. + case reflect.Bool: + boolTupe := reflect.TypeOf(false) + return Bool(refValue.Convert(boolTupe).Interface().(bool)), true + case reflect.Int: + intType := reflect.TypeOf(int(0)) + return Int(refValue.Convert(intType).Interface().(int)), true + case reflect.Int8: + intType := reflect.TypeOf(int8(0)) + return Int(refValue.Convert(intType).Interface().(int8)), true + case reflect.Int16: + intType := reflect.TypeOf(int16(0)) + return Int(refValue.Convert(intType).Interface().(int16)), true case reflect.Int32: intType := reflect.TypeOf(int32(0)) return Int(refValue.Convert(intType).Interface().(int32)), true case reflect.Int64: intType := reflect.TypeOf(int64(0)) return Int(refValue.Convert(intType).Interface().(int64)), true + case reflect.Uint: + uintType := reflect.TypeOf(uint(0)) + return Uint(refValue.Convert(uintType).Interface().(uint)), true + case reflect.Uint8: + uintType := reflect.TypeOf(uint8(0)) + return Uint(refValue.Convert(uintType).Interface().(uint8)), true + case reflect.Uint16: + uintType := reflect.TypeOf(uint16(0)) + return Uint(refValue.Convert(uintType).Interface().(uint16)), true case reflect.Uint32: uintType := reflect.TypeOf(uint32(0)) return Uint(refValue.Convert(uintType).Interface().(uint32)), true @@ -587,6 +629,9 @@ func nativeToValue(a Adapter, value any) (ref.Val, bool) { case reflect.Float64: doubleType := reflect.TypeOf(float64(0)) return Double(refValue.Convert(doubleType).Interface().(float64)), true + case reflect.String: + stringType := reflect.TypeOf("") + return String(refValue.Convert(stringType).Interface().(string)), true } } return nil, false diff --git a/vendor/github.com/google/cel-go/common/types/string.go b/vendor/github.com/google/cel-go/common/types/string.go index 028e6824d22..3a93743f24e 100644 --- a/vendor/github.com/google/cel-go/common/types/string.go +++ b/vendor/github.com/google/cel-go/common/types/string.go @@ -66,10 +66,7 @@ func (s String) Compare(other ref.Val) ref.Val { func (s String) ConvertToNative(typeDesc reflect.Type) (any, error) { switch typeDesc.Kind() { case reflect.String: - if reflect.TypeOf(s).AssignableTo(typeDesc) { - return s, nil - } - return s.Value(), nil + return reflect.ValueOf(s).Convert(typeDesc).Interface(), nil case reflect.Ptr: switch typeDesc { case anyValueType: @@ -158,7 +155,7 @@ func (s String) Match(pattern ref.Val) ref.Val { } matched, err := regexp.MatchString(pat.Value().(string), s.Value().(string)) if err != nil { - return &Err{err} + return &Err{error: err} } return Bool(matched) } diff --git a/vendor/github.com/google/cel-go/common/types/types.go b/vendor/github.com/google/cel-go/common/types/types.go index 76624eefdee..6c3d5f719ba 100644 --- a/vendor/github.com/google/cel-go/common/types/types.go +++ b/vendor/github.com/google/cel-go/common/types/types.go @@ -373,6 +373,23 @@ func (t *Type) TypeName() string { return t.runtimeTypeName } +// WithTraits creates a copy of the current Type and sets the trait mask to the traits parameter. +// +// This method should be used with Opaque types where the type acts like a container, e.g. vector. +func (t *Type) WithTraits(traits int) *Type { + if t == nil { + return nil + } + return &Type{ + kind: t.kind, + parameters: t.parameters, + runtimeTypeName: t.runtimeTypeName, + isAssignableType: t.isAssignableType, + isAssignableRuntimeType: t.isAssignableRuntimeType, + traitMask: traits, + } +} + // String returns a human-readable definition of the type name. func (t *Type) String() string { if len(t.Parameters()) == 0 { @@ -496,7 +513,7 @@ func NewNullableType(wrapped *Type) *Type { // NewOptionalType creates an abstract parameterized type instance corresponding to CEL's notion of optional. func NewOptionalType(param *Type) *Type { - return NewOpaqueType("optional", param) + return NewOpaqueType("optional_type", param) } // NewOpaqueType creates an abstract parameterized type with a given name. diff --git a/vendor/github.com/google/cel-go/common/types/uint.go b/vendor/github.com/google/cel-go/common/types/uint.go index 3257f9ade97..6d74f30d884 100644 --- a/vendor/github.com/google/cel-go/common/types/uint.go +++ b/vendor/github.com/google/cel-go/common/types/uint.go @@ -80,6 +80,18 @@ func (i Uint) ConvertToNative(typeDesc reflect.Type) (any, error) { return 0, err } return reflect.ValueOf(v).Convert(typeDesc).Interface(), nil + case reflect.Uint8: + v, err := uint64ToUint8Checked(uint64(i)) + if err != nil { + return 0, err + } + return reflect.ValueOf(v).Convert(typeDesc).Interface(), nil + case reflect.Uint16: + v, err := uint64ToUint16Checked(uint64(i)) + if err != nil { + return 0, err + } + return reflect.ValueOf(v).Convert(typeDesc).Interface(), nil case reflect.Uint64: return reflect.ValueOf(i).Convert(typeDesc).Interface(), nil case reflect.Ptr: diff --git a/vendor/github.com/google/cel-go/ext/BUILD.bazel b/vendor/github.com/google/cel-go/ext/BUILD.bazel index 6fdcc60c658..db223da2f7b 100644 --- a/vendor/github.com/google/cel-go/ext/BUILD.bazel +++ b/vendor/github.com/google/cel-go/ext/BUILD.bazel @@ -7,7 +7,9 @@ package( go_library( name = "go_default_library", srcs = [ + "bindings.go", "encoders.go", + "formatting.go", "guards.go", "lists.go", "math.go", @@ -21,14 +23,14 @@ go_library( deps = [ "//cel:go_default_library", "//checker:go_default_library", - "//checker/decls:go_default_library", + "//common/ast:go_default_library", "//common/overloads:go_default_library", + "//common/operators:go_default_library", "//common/types:go_default_library", "//common/types/pb:go_default_library", "//common/types/ref:go_default_library", "//common/types/traits:go_default_library", "//interpreter:go_default_library", - "@org_golang_google_genproto_googleapis_api//expr/v1alpha1:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", "@org_golang_google_protobuf//reflect/protoreflect:go_default_library", "@org_golang_google_protobuf//types/known/structpb", @@ -61,7 +63,6 @@ go_test( "//test:go_default_library", "//test/proto2pb:go_default_library", "//test/proto3pb:go_default_library", - "@org_golang_google_genproto_googleapis_api//expr/v1alpha1:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", "@org_golang_google_protobuf//types/known/wrapperspb:go_default_library", "@org_golang_google_protobuf//encoding/protojson:go_default_library", diff --git a/vendor/github.com/google/cel-go/ext/README.md b/vendor/github.com/google/cel-go/ext/README.md index 6f621ac4af6..2fac0cb22ba 100644 --- a/vendor/github.com/google/cel-go/ext/README.md +++ b/vendor/github.com/google/cel-go/ext/README.md @@ -414,3 +414,17 @@ Examples: 'TacoCat'.upperAscii() // returns 'TACOCAT' 'TacoCÆt Xii'.upperAscii() // returns 'TACOCÆT XII' + +### Reverse + +Returns a new string whose characters are the same as the target string, only formatted in +reverse order. +This function relies on converting strings to rune arrays in order to reverse. +It can be located in Version 3 of strings. + + .reverse() -> + +Examples: + + 'gums'.reverse() // returns 'smug' + 'John Smith'.reverse() // returns 'htimS nhoJ' \ No newline at end of file diff --git a/vendor/github.com/google/cel-go/ext/bindings.go b/vendor/github.com/google/cel-go/ext/bindings.go index 4ac9a7f07fc..2c6cc627fab 100644 --- a/vendor/github.com/google/cel-go/ext/bindings.go +++ b/vendor/github.com/google/cel-go/ext/bindings.go @@ -16,8 +16,8 @@ package ext import ( "github.com/google/cel-go/cel" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + "github.com/google/cel-go/common/ast" + "github.com/google/cel-go/common/types" ) // Bindings returns a cel.EnvOption to configure support for local variable @@ -61,7 +61,7 @@ func (celBindings) CompileOptions() []cel.EnvOption { return []cel.EnvOption{ cel.Macros( // cel.bind(var, , ) - cel.NewReceiverMacro(bindMacro, 3, celBind), + cel.ReceiverMacro(bindMacro, 3, celBind), ), } } @@ -70,27 +70,27 @@ func (celBindings) ProgramOptions() []cel.ProgramOption { return []cel.ProgramOption{} } -func celBind(meh cel.MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *cel.Error) { +func celBind(mef cel.MacroExprFactory, target ast.Expr, args []ast.Expr) (ast.Expr, *cel.Error) { if !macroTargetMatchesNamespace(celNamespace, target) { return nil, nil } varIdent := args[0] varName := "" - switch varIdent.GetExprKind().(type) { - case *exprpb.Expr_IdentExpr: - varName = varIdent.GetIdentExpr().GetName() + switch varIdent.Kind() { + case ast.IdentKind: + varName = varIdent.AsIdent() default: - return nil, meh.NewError(varIdent.GetId(), "cel.bind() variable names must be simple identifiers") + return nil, mef.NewError(varIdent.ID(), "cel.bind() variable names must be simple identifiers") } varInit := args[1] resultExpr := args[2] - return meh.Fold( + return mef.NewComprehension( + mef.NewList(), unusedIterVar, - meh.NewList(), varName, varInit, - meh.LiteralBool(false), - meh.Ident(varName), + mef.NewLiteral(types.False), + mef.NewIdent(varName), resultExpr, ), nil } diff --git a/vendor/github.com/google/cel-go/ext/formatting.go b/vendor/github.com/google/cel-go/ext/formatting.go new file mode 100644 index 00000000000..2f35b996cb8 --- /dev/null +++ b/vendor/github.com/google/cel-go/ext/formatting.go @@ -0,0 +1,904 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package ext + +import ( + "errors" + "fmt" + "math" + "sort" + "strconv" + "strings" + "unicode" + + "golang.org/x/text/language" + "golang.org/x/text/message" + + "github.com/google/cel-go/cel" + "github.com/google/cel-go/common/ast" + "github.com/google/cel-go/common/overloads" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" + "github.com/google/cel-go/common/types/traits" +) + +type clauseImpl func(ref.Val, string) (string, error) + +func clauseForType(argType ref.Type) (clauseImpl, error) { + switch argType { + case types.IntType, types.UintType: + return formatDecimal, nil + case types.StringType, types.BytesType, types.BoolType, types.NullType, types.TypeType: + return FormatString, nil + case types.TimestampType, types.DurationType: + // special case to ensure timestamps/durations get printed as CEL literals + return func(arg ref.Val, locale string) (string, error) { + argStrVal := arg.ConvertToType(types.StringType) + argStr := argStrVal.Value().(string) + if arg.Type() == types.TimestampType { + return fmt.Sprintf("timestamp(%q)", argStr), nil + } + if arg.Type() == types.DurationType { + return fmt.Sprintf("duration(%q)", argStr), nil + } + return "", fmt.Errorf("cannot convert argument of type %s to timestamp/duration", arg.Type().TypeName()) + }, nil + case types.ListType: + return formatList, nil + case types.MapType: + return formatMap, nil + case types.DoubleType: + // avoid formatFixed so we can output a period as the decimal separator in order + // to always be a valid CEL literal + return func(arg ref.Val, locale string) (string, error) { + argDouble, ok := arg.Value().(float64) + if !ok { + return "", fmt.Errorf("couldn't convert %s to float64", arg.Type().TypeName()) + } + fmtStr := fmt.Sprintf("%%.%df", defaultPrecision) + return fmt.Sprintf(fmtStr, argDouble), nil + }, nil + case types.TypeType: + return func(arg ref.Val, locale string) (string, error) { + return fmt.Sprintf("type(%s)", arg.Value().(string)), nil + }, nil + default: + return nil, fmt.Errorf("no formatting function for %s", argType.TypeName()) + } +} + +func formatList(arg ref.Val, locale string) (string, error) { + argList := arg.(traits.Lister) + argIterator := argList.Iterator() + var listStrBuilder strings.Builder + _, err := listStrBuilder.WriteRune('[') + if err != nil { + return "", fmt.Errorf("error writing to list string: %w", err) + } + for argIterator.HasNext() == types.True { + member := argIterator.Next() + memberFormat, err := clauseForType(member.Type()) + if err != nil { + return "", err + } + unquotedStr, err := memberFormat(member, locale) + if err != nil { + return "", err + } + str := quoteForCEL(member, unquotedStr) + _, err = listStrBuilder.WriteString(str) + if err != nil { + return "", fmt.Errorf("error writing to list string: %w", err) + } + if argIterator.HasNext() == types.True { + _, err = listStrBuilder.WriteString(", ") + if err != nil { + return "", fmt.Errorf("error writing to list string: %w", err) + } + } + } + _, err = listStrBuilder.WriteRune(']') + if err != nil { + return "", fmt.Errorf("error writing to list string: %w", err) + } + return listStrBuilder.String(), nil +} + +func formatMap(arg ref.Val, locale string) (string, error) { + argMap := arg.(traits.Mapper) + argIterator := argMap.Iterator() + type mapPair struct { + key string + value string + } + argPairs := make([]mapPair, argMap.Size().Value().(int64)) + i := 0 + for argIterator.HasNext() == types.True { + key := argIterator.Next() + var keyFormat clauseImpl + switch key.Type() { + case types.StringType, types.BoolType: + keyFormat = FormatString + case types.IntType, types.UintType: + keyFormat = formatDecimal + default: + return "", fmt.Errorf("no formatting function for map key of type %s", key.Type().TypeName()) + } + unquotedKeyStr, err := keyFormat(key, locale) + if err != nil { + return "", err + } + keyStr := quoteForCEL(key, unquotedKeyStr) + value, found := argMap.Find(key) + if !found { + return "", fmt.Errorf("could not find key: %q", key) + } + valueFormat, err := clauseForType(value.Type()) + if err != nil { + return "", err + } + unquotedValueStr, err := valueFormat(value, locale) + if err != nil { + return "", err + } + valueStr := quoteForCEL(value, unquotedValueStr) + argPairs[i] = mapPair{keyStr, valueStr} + i++ + } + sort.SliceStable(argPairs, func(x, y int) bool { + return argPairs[x].key < argPairs[y].key + }) + var mapStrBuilder strings.Builder + _, err := mapStrBuilder.WriteRune('{') + if err != nil { + return "", fmt.Errorf("error writing to map string: %w", err) + } + for i, entry := range argPairs { + _, err = mapStrBuilder.WriteString(fmt.Sprintf("%s:%s", entry.key, entry.value)) + if err != nil { + return "", fmt.Errorf("error writing to map string: %w", err) + } + if i < len(argPairs)-1 { + _, err = mapStrBuilder.WriteString(", ") + if err != nil { + return "", fmt.Errorf("error writing to map string: %w", err) + } + } + } + _, err = mapStrBuilder.WriteRune('}') + if err != nil { + return "", fmt.Errorf("error writing to map string: %w", err) + } + return mapStrBuilder.String(), nil +} + +// quoteForCEL takes a formatted, unquoted value and quotes it in a manner suitable +// for embedding directly in CEL. +func quoteForCEL(refVal ref.Val, unquotedValue string) string { + switch refVal.Type() { + case types.StringType: + return fmt.Sprintf("%q", unquotedValue) + case types.BytesType: + return fmt.Sprintf("b%q", unquotedValue) + case types.DoubleType: + // special case to handle infinity/NaN + num := refVal.Value().(float64) + if math.IsInf(num, 1) || math.IsInf(num, -1) || math.IsNaN(num) { + return fmt.Sprintf("%q", unquotedValue) + } + return unquotedValue + default: + return unquotedValue + } +} + +// FormatString returns the string representation of a CEL value. +// +// It is used to implement the %s specifier in the (string).format() extension function. +func FormatString(arg ref.Val, locale string) (string, error) { + switch arg.Type() { + case types.ListType: + return formatList(arg, locale) + case types.MapType: + return formatMap(arg, locale) + case types.IntType, types.UintType, types.DoubleType, + types.BoolType, types.StringType, types.TimestampType, types.BytesType, types.DurationType, types.TypeType: + argStrVal := arg.ConvertToType(types.StringType) + argStr, ok := argStrVal.Value().(string) + if !ok { + return "", fmt.Errorf("could not convert argument %q to string", argStrVal) + } + return argStr, nil + case types.NullType: + return "null", nil + default: + return "", stringFormatError(runtimeID, arg.Type().TypeName()) + } +} + +func formatDecimal(arg ref.Val, locale string) (string, error) { + switch arg.Type() { + case types.IntType: + argInt, ok := arg.ConvertToType(types.IntType).Value().(int64) + if !ok { + return "", fmt.Errorf("could not convert \"%s\" to int64", arg.Value()) + } + return fmt.Sprintf("%d", argInt), nil + case types.UintType: + argInt, ok := arg.ConvertToType(types.UintType).Value().(uint64) + if !ok { + return "", fmt.Errorf("could not convert \"%s\" to uint64", arg.Value()) + } + return fmt.Sprintf("%d", argInt), nil + default: + return "", decimalFormatError(runtimeID, arg.Type().TypeName()) + } +} + +func matchLanguage(locale string) (language.Tag, error) { + matcher, err := makeMatcher(locale) + if err != nil { + return language.Und, err + } + tag, _ := language.MatchStrings(matcher, locale) + return tag, nil +} + +func makeMatcher(locale string) (language.Matcher, error) { + tags := make([]language.Tag, 0) + tag, err := language.Parse(locale) + if err != nil { + return nil, err + } + tags = append(tags, tag) + return language.NewMatcher(tags), nil +} + +type stringFormatter struct{} + +func (c *stringFormatter) String(arg ref.Val, locale string) (string, error) { + return FormatString(arg, locale) +} + +func (c *stringFormatter) Decimal(arg ref.Val, locale string) (string, error) { + return formatDecimal(arg, locale) +} + +func (c *stringFormatter) Fixed(precision *int) func(ref.Val, string) (string, error) { + if precision == nil { + precision = new(int) + *precision = defaultPrecision + } + return func(arg ref.Val, locale string) (string, error) { + strException := false + if arg.Type() == types.StringType { + argStr := arg.Value().(string) + if argStr == "NaN" || argStr == "Infinity" || argStr == "-Infinity" { + strException = true + } + } + if arg.Type() != types.DoubleType && !strException { + return "", fixedPointFormatError(runtimeID, arg.Type().TypeName()) + } + argFloatVal := arg.ConvertToType(types.DoubleType) + argFloat, ok := argFloatVal.Value().(float64) + if !ok { + return "", fmt.Errorf("could not convert \"%s\" to float64", argFloatVal.Value()) + } + fmtStr := fmt.Sprintf("%%.%df", *precision) + + matchedLocale, err := matchLanguage(locale) + if err != nil { + return "", fmt.Errorf("error matching locale: %w", err) + } + return message.NewPrinter(matchedLocale).Sprintf(fmtStr, argFloat), nil + } +} + +func (c *stringFormatter) Scientific(precision *int) func(ref.Val, string) (string, error) { + if precision == nil { + precision = new(int) + *precision = defaultPrecision + } + return func(arg ref.Val, locale string) (string, error) { + strException := false + if arg.Type() == types.StringType { + argStr := arg.Value().(string) + if argStr == "NaN" || argStr == "Infinity" || argStr == "-Infinity" { + strException = true + } + } + if arg.Type() != types.DoubleType && !strException { + return "", scientificFormatError(runtimeID, arg.Type().TypeName()) + } + argFloatVal := arg.ConvertToType(types.DoubleType) + argFloat, ok := argFloatVal.Value().(float64) + if !ok { + return "", fmt.Errorf("could not convert \"%v\" to float64", argFloatVal.Value()) + } + matchedLocale, err := matchLanguage(locale) + if err != nil { + return "", fmt.Errorf("error matching locale: %w", err) + } + fmtStr := fmt.Sprintf("%%%de", *precision) + return message.NewPrinter(matchedLocale).Sprintf(fmtStr, argFloat), nil + } +} + +func (c *stringFormatter) Binary(arg ref.Val, locale string) (string, error) { + switch arg.Type() { + case types.IntType: + argInt := arg.Value().(int64) + // locale is intentionally unused as integers formatted as binary + // strings are locale-independent + return fmt.Sprintf("%b", argInt), nil + case types.UintType: + argInt := arg.Value().(uint64) + return fmt.Sprintf("%b", argInt), nil + case types.BoolType: + argBool := arg.Value().(bool) + if argBool { + return "1", nil + } + return "0", nil + default: + return "", binaryFormatError(runtimeID, arg.Type().TypeName()) + } +} + +func (c *stringFormatter) Hex(useUpper bool) func(ref.Val, string) (string, error) { + return func(arg ref.Val, locale string) (string, error) { + fmtStr := "%x" + if useUpper { + fmtStr = "%X" + } + switch arg.Type() { + case types.StringType, types.BytesType: + if arg.Type() == types.BytesType { + return fmt.Sprintf(fmtStr, arg.Value().([]byte)), nil + } + return fmt.Sprintf(fmtStr, arg.Value().(string)), nil + case types.IntType: + argInt, ok := arg.Value().(int64) + if !ok { + return "", fmt.Errorf("could not convert \"%s\" to int64", arg.Value()) + } + return fmt.Sprintf(fmtStr, argInt), nil + case types.UintType: + argInt, ok := arg.Value().(uint64) + if !ok { + return "", fmt.Errorf("could not convert \"%s\" to uint64", arg.Value()) + } + return fmt.Sprintf(fmtStr, argInt), nil + default: + return "", hexFormatError(runtimeID, arg.Type().TypeName()) + } + } +} + +func (c *stringFormatter) Octal(arg ref.Val, locale string) (string, error) { + switch arg.Type() { + case types.IntType: + argInt := arg.Value().(int64) + return fmt.Sprintf("%o", argInt), nil + case types.UintType: + argInt := arg.Value().(uint64) + return fmt.Sprintf("%o", argInt), nil + default: + return "", octalFormatError(runtimeID, arg.Type().TypeName()) + } +} + +// stringFormatValidator implements the cel.ASTValidator interface allowing for static validation +// of string.format calls. +type stringFormatValidator struct{} + +// Name returns the name of the validator. +func (stringFormatValidator) Name() string { + return "cel.lib.ext.validate.functions.string.format" +} + +// Configure implements the ASTValidatorConfigurer interface and augments the list of functions to skip +// during homogeneous aggregate literal type-checks. +func (stringFormatValidator) Configure(config cel.MutableValidatorConfig) error { + functions := config.GetOrDefault(cel.HomogeneousAggregateLiteralExemptFunctions, []string{}).([]string) + functions = append(functions, "format") + return config.Set(cel.HomogeneousAggregateLiteralExemptFunctions, functions) +} + +// Validate parses all literal format strings and type checks the format clause against the argument +// at the corresponding ordinal within the list literal argument to the function, if one is specified. +func (stringFormatValidator) Validate(env *cel.Env, _ cel.ValidatorConfig, a *ast.AST, iss *cel.Issues) { + root := ast.NavigateAST(a) + formatCallExprs := ast.MatchDescendants(root, matchConstantFormatStringWithListLiteralArgs(a)) + for _, e := range formatCallExprs { + call := e.AsCall() + formatStr := call.Target().AsLiteral().Value().(string) + args := call.Args()[0].AsList().Elements() + formatCheck := &stringFormatChecker{ + args: args, + ast: a, + } + // use a placeholder locale, since locale doesn't affect syntax + _, err := parseFormatString(formatStr, formatCheck, formatCheck, "en_US") + if err != nil { + iss.ReportErrorAtID(getErrorExprID(e.ID(), err), err.Error()) + continue + } + seenArgs := formatCheck.argsRequested + if len(args) > seenArgs { + iss.ReportErrorAtID(e.ID(), + "too many arguments supplied to string.format (expected %d, got %d)", seenArgs, len(args)) + } + } +} + +// getErrorExprID determines which list literal argument triggered a type-disagreement for the +// purposes of more accurate error message reports. +func getErrorExprID(id int64, err error) int64 { + fmtErr, ok := err.(formatError) + if ok { + return fmtErr.id + } + wrapped := errors.Unwrap(err) + if wrapped != nil { + return getErrorExprID(id, wrapped) + } + return id +} + +// matchConstantFormatStringWithListLiteralArgs matches all valid expression nodes for string +// format checking. +func matchConstantFormatStringWithListLiteralArgs(a *ast.AST) ast.ExprMatcher { + return func(e ast.NavigableExpr) bool { + if e.Kind() != ast.CallKind { + return false + } + call := e.AsCall() + if !call.IsMemberFunction() || call.FunctionName() != "format" { + return false + } + overloadIDs := a.GetOverloadIDs(e.ID()) + if len(overloadIDs) != 0 { + found := false + for _, overload := range overloadIDs { + if overload == overloads.ExtFormatString { + found = true + break + } + } + if !found { + return false + } + } + formatString := call.Target() + if formatString.Kind() != ast.LiteralKind && formatString.AsLiteral().Type() != cel.StringType { + return false + } + args := call.Args() + if len(args) != 1 { + return false + } + formatArgs := args[0] + return formatArgs.Kind() == ast.ListKind + } +} + +// stringFormatChecker implements the formatStringInterpolater interface +type stringFormatChecker struct { + args []ast.Expr + argsRequested int + currArgIndex int64 + ast *ast.AST +} + +func (c *stringFormatChecker) String(arg ref.Val, locale string) (string, error) { + formatArg := c.args[c.currArgIndex] + valid, badID := c.verifyString(formatArg) + if !valid { + return "", stringFormatError(badID, c.typeOf(badID).TypeName()) + } + return "", nil +} + +func (c *stringFormatChecker) Decimal(arg ref.Val, locale string) (string, error) { + id := c.args[c.currArgIndex].ID() + valid := c.verifyTypeOneOf(id, types.IntType, types.UintType) + if !valid { + return "", decimalFormatError(id, c.typeOf(id).TypeName()) + } + return "", nil +} + +func (c *stringFormatChecker) Fixed(precision *int) func(ref.Val, string) (string, error) { + return func(arg ref.Val, locale string) (string, error) { + id := c.args[c.currArgIndex].ID() + // we allow StringType since "NaN", "Infinity", and "-Infinity" are also valid values + valid := c.verifyTypeOneOf(id, types.DoubleType, types.StringType) + if !valid { + return "", fixedPointFormatError(id, c.typeOf(id).TypeName()) + } + return "", nil + } +} + +func (c *stringFormatChecker) Scientific(precision *int) func(ref.Val, string) (string, error) { + return func(arg ref.Val, locale string) (string, error) { + id := c.args[c.currArgIndex].ID() + valid := c.verifyTypeOneOf(id, types.DoubleType, types.StringType) + if !valid { + return "", scientificFormatError(id, c.typeOf(id).TypeName()) + } + return "", nil + } +} + +func (c *stringFormatChecker) Binary(arg ref.Val, locale string) (string, error) { + id := c.args[c.currArgIndex].ID() + valid := c.verifyTypeOneOf(id, types.IntType, types.UintType, types.BoolType) + if !valid { + return "", binaryFormatError(id, c.typeOf(id).TypeName()) + } + return "", nil +} + +func (c *stringFormatChecker) Hex(useUpper bool) func(ref.Val, string) (string, error) { + return func(arg ref.Val, locale string) (string, error) { + id := c.args[c.currArgIndex].ID() + valid := c.verifyTypeOneOf(id, types.IntType, types.UintType, types.StringType, types.BytesType) + if !valid { + return "", hexFormatError(id, c.typeOf(id).TypeName()) + } + return "", nil + } +} + +func (c *stringFormatChecker) Octal(arg ref.Val, locale string) (string, error) { + id := c.args[c.currArgIndex].ID() + valid := c.verifyTypeOneOf(id, types.IntType, types.UintType) + if !valid { + return "", octalFormatError(id, c.typeOf(id).TypeName()) + } + return "", nil +} + +func (c *stringFormatChecker) Arg(index int64) (ref.Val, error) { + c.argsRequested++ + c.currArgIndex = index + // return a dummy value - this is immediately passed to back to us + // through one of the FormatCallback functions, so anything will do + return types.Int(0), nil +} + +func (c *stringFormatChecker) Size() int64 { + return int64(len(c.args)) +} + +func (c *stringFormatChecker) typeOf(id int64) *cel.Type { + return c.ast.GetType(id) +} + +func (c *stringFormatChecker) verifyTypeOneOf(id int64, validTypes ...*cel.Type) bool { + t := c.typeOf(id) + if t == cel.DynType { + return true + } + for _, vt := range validTypes { + // Only check runtime type compatibility without delving deeper into parameterized types + if t.Kind() == vt.Kind() { + return true + } + } + return false +} + +func (c *stringFormatChecker) verifyString(sub ast.Expr) (bool, int64) { + paramA := cel.TypeParamType("A") + paramB := cel.TypeParamType("B") + subVerified := c.verifyTypeOneOf(sub.ID(), + cel.ListType(paramA), cel.MapType(paramA, paramB), + cel.IntType, cel.UintType, cel.DoubleType, cel.BoolType, cel.StringType, + cel.TimestampType, cel.BytesType, cel.DurationType, cel.TypeType, cel.NullType) + if !subVerified { + return false, sub.ID() + } + switch sub.Kind() { + case ast.ListKind: + for _, e := range sub.AsList().Elements() { + // recursively verify if we're dealing with a list/map + verified, id := c.verifyString(e) + if !verified { + return false, id + } + } + return true, sub.ID() + case ast.MapKind: + for _, e := range sub.AsMap().Entries() { + // recursively verify if we're dealing with a list/map + entry := e.AsMapEntry() + verified, id := c.verifyString(entry.Key()) + if !verified { + return false, id + } + verified, id = c.verifyString(entry.Value()) + if !verified { + return false, id + } + } + return true, sub.ID() + default: + return true, sub.ID() + } +} + +// helper routines for reporting common errors during string formatting static validation and +// runtime execution. + +func binaryFormatError(id int64, badType string) error { + return newFormatError(id, "only integers and bools can be formatted as binary, was given %s", badType) +} + +func decimalFormatError(id int64, badType string) error { + return newFormatError(id, "decimal clause can only be used on integers, was given %s", badType) +} + +func fixedPointFormatError(id int64, badType string) error { + return newFormatError(id, "fixed-point clause can only be used on doubles, was given %s", badType) +} + +func hexFormatError(id int64, badType string) error { + return newFormatError(id, "only integers, byte buffers, and strings can be formatted as hex, was given %s", badType) +} + +func octalFormatError(id int64, badType string) error { + return newFormatError(id, "octal clause can only be used on integers, was given %s", badType) +} + +func scientificFormatError(id int64, badType string) error { + return newFormatError(id, "scientific clause can only be used on doubles, was given %s", badType) +} + +func stringFormatError(id int64, badType string) error { + return newFormatError(id, "string clause can only be used on strings, bools, bytes, ints, doubles, maps, lists, types, durations, and timestamps, was given %s", badType) +} + +type formatError struct { + id int64 + msg string +} + +func newFormatError(id int64, msg string, args ...any) error { + return formatError{ + id: id, + msg: fmt.Sprintf(msg, args...), + } +} + +func (e formatError) Error() string { + return e.msg +} + +func (e formatError) Is(target error) bool { + return e.msg == target.Error() +} + +// stringArgList implements the formatListArgs interface. +type stringArgList struct { + args traits.Lister +} + +func (c *stringArgList) Arg(index int64) (ref.Val, error) { + if index >= c.args.Size().Value().(int64) { + return nil, fmt.Errorf("index %d out of range", index) + } + return c.args.Get(types.Int(index)), nil +} + +func (c *stringArgList) Size() int64 { + return c.args.Size().Value().(int64) +} + +// formatStringInterpolator is an interface that allows user-defined behavior +// for formatting clause implementations, as well as argument retrieval. +// Each function is expected to support the appropriate types as laid out in +// the string.format documentation, and to return an error if given an inappropriate type. +type formatStringInterpolator interface { + // String takes a ref.Val and a string representing the current locale identifier + // and returns the Val formatted as a string, or an error if one occurred. + String(ref.Val, string) (string, error) + + // Decimal takes a ref.Val and a string representing the current locale identifier + // and returns the Val formatted as a decimal integer, or an error if one occurred. + Decimal(ref.Val, string) (string, error) + + // Fixed takes an int pointer representing precision (or nil if none was given) and + // returns a function operating in a similar manner to String and Decimal, taking a + // ref.Val and locale and returning the appropriate string. A closure is returned + // so precision can be set without needing an additional function call/configuration. + Fixed(*int) func(ref.Val, string) (string, error) + + // Scientific functions identically to Fixed, except the string returned from the closure + // is expected to be in scientific notation. + Scientific(*int) func(ref.Val, string) (string, error) + + // Binary takes a ref.Val and a string representing the current locale identifier + // and returns the Val formatted as a binary integer, or an error if one occurred. + Binary(ref.Val, string) (string, error) + + // Hex takes a boolean that, if true, indicates the hex string output by the returned + // closure should use uppercase letters for A-F. + Hex(bool) func(ref.Val, string) (string, error) + + // Octal takes a ref.Val and a string representing the current locale identifier and + // returns the Val formatted in octal, or an error if one occurred. + Octal(ref.Val, string) (string, error) +} + +// formatListArgs is an interface that allows user-defined list-like datatypes to be used +// for formatting clause implementations. +type formatListArgs interface { + // Arg returns the ref.Val at the given index, or an error if one occurred. + Arg(int64) (ref.Val, error) + + // Size returns the length of the argument list. + Size() int64 +} + +// parseFormatString formats a string according to the string.format syntax, taking the clause implementations +// from the provided FormatCallback and the args from the given FormatList. +func parseFormatString(formatStr string, callback formatStringInterpolator, list formatListArgs, locale string) (string, error) { + i := 0 + argIndex := 0 + var builtStr strings.Builder + for i < len(formatStr) { + if formatStr[i] == '%' { + if i+1 < len(formatStr) && formatStr[i+1] == '%' { + err := builtStr.WriteByte('%') + if err != nil { + return "", fmt.Errorf("error writing format string: %w", err) + } + i += 2 + continue + } else { + argAny, err := list.Arg(int64(argIndex)) + if err != nil { + return "", err + } + if i+1 >= len(formatStr) { + return "", errors.New("unexpected end of string") + } + if int64(argIndex) >= list.Size() { + return "", fmt.Errorf("index %d out of range", argIndex) + } + numRead, val, refErr := parseAndFormatClause(formatStr[i:], argAny, callback, list, locale) + if refErr != nil { + return "", refErr + } + _, err = builtStr.WriteString(val) + if err != nil { + return "", fmt.Errorf("error writing format string: %w", err) + } + i += numRead + argIndex++ + } + } else { + err := builtStr.WriteByte(formatStr[i]) + if err != nil { + return "", fmt.Errorf("error writing format string: %w", err) + } + i++ + } + } + return builtStr.String(), nil +} + +// parseAndFormatClause parses the format clause at the start of the given string with val, and returns +// how many characters were consumed and the substituted string form of val, or an error if one occurred. +func parseAndFormatClause(formatStr string, val ref.Val, callback formatStringInterpolator, list formatListArgs, locale string) (int, string, error) { + i := 1 + read, formatter, err := parseFormattingClause(formatStr[i:], callback) + i += read + if err != nil { + return -1, "", newParseFormatError("could not parse formatting clause", err) + } + + valStr, err := formatter(val, locale) + if err != nil { + return -1, "", newParseFormatError("error during formatting", err) + } + return i, valStr, nil +} + +func parseFormattingClause(formatStr string, callback formatStringInterpolator) (int, clauseImpl, error) { + i := 0 + read, precision, err := parsePrecision(formatStr[i:]) + i += read + if err != nil { + return -1, nil, fmt.Errorf("error while parsing precision: %w", err) + } + r := rune(formatStr[i]) + i++ + switch r { + case 's': + return i, callback.String, nil + case 'd': + return i, callback.Decimal, nil + case 'f': + return i, callback.Fixed(precision), nil + case 'e': + return i, callback.Scientific(precision), nil + case 'b': + return i, callback.Binary, nil + case 'x', 'X': + return i, callback.Hex(unicode.IsUpper(r)), nil + case 'o': + return i, callback.Octal, nil + default: + return -1, nil, fmt.Errorf("unrecognized formatting clause \"%c\"", r) + } +} + +func parsePrecision(formatStr string) (int, *int, error) { + i := 0 + if formatStr[i] != '.' { + return i, nil, nil + } + i++ + var buffer strings.Builder + for { + if i >= len(formatStr) { + return -1, nil, errors.New("could not find end of precision specifier") + } + if !isASCIIDigit(rune(formatStr[i])) { + break + } + buffer.WriteByte(formatStr[i]) + i++ + } + precision, err := strconv.Atoi(buffer.String()) + if err != nil { + return -1, nil, fmt.Errorf("error while converting precision to integer: %w", err) + } + return i, &precision, nil +} + +func isASCIIDigit(r rune) bool { + return r <= unicode.MaxASCII && unicode.IsDigit(r) +} + +type parseFormatError struct { + msg string + wrapped error +} + +func newParseFormatError(msg string, wrapped error) error { + return parseFormatError{msg: msg, wrapped: wrapped} +} + +func (e parseFormatError) Error() string { + return fmt.Sprintf("%s: %s", e.msg, e.wrapped.Error()) +} + +func (e parseFormatError) Is(target error) bool { + return e.Error() == target.Error() +} + +func (e parseFormatError) Unwrap() error { + return e.wrapped +} + +const ( + runtimeID = int64(-1) +) diff --git a/vendor/github.com/google/cel-go/ext/guards.go b/vendor/github.com/google/cel-go/ext/guards.go index 785c8675bbf..2c00bfe3a87 100644 --- a/vendor/github.com/google/cel-go/ext/guards.go +++ b/vendor/github.com/google/cel-go/ext/guards.go @@ -15,10 +15,9 @@ package ext import ( + "github.com/google/cel-go/common/ast" "github.com/google/cel-go/common/types" "github.com/google/cel-go/common/types/ref" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" ) // function invocation guards for common call signatures within extension functions. @@ -51,10 +50,10 @@ func listStringOrError(strs []string, err error) ref.Val { return types.DefaultTypeAdapter.NativeToValue(strs) } -func macroTargetMatchesNamespace(ns string, target *exprpb.Expr) bool { - switch target.GetExprKind().(type) { - case *exprpb.Expr_IdentExpr: - if target.GetIdentExpr().GetName() != ns { +func macroTargetMatchesNamespace(ns string, target ast.Expr) bool { + switch target.Kind() { + case ast.IdentKind: + if target.AsIdent() != ns { return false } return true diff --git a/vendor/github.com/google/cel-go/ext/math.go b/vendor/github.com/google/cel-go/ext/math.go index 0b9a3610314..65d7e2eb076 100644 --- a/vendor/github.com/google/cel-go/ext/math.go +++ b/vendor/github.com/google/cel-go/ext/math.go @@ -19,11 +19,10 @@ import ( "strings" "github.com/google/cel-go/cel" + "github.com/google/cel-go/common/ast" "github.com/google/cel-go/common/types" "github.com/google/cel-go/common/types/ref" "github.com/google/cel-go/common/types/traits" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" ) // Math returns a cel.EnvOption to configure namespaced math helper macros and @@ -111,9 +110,9 @@ func (mathLib) CompileOptions() []cel.EnvOption { return []cel.EnvOption{ cel.Macros( // math.least(num, ...) - cel.NewReceiverVarArgMacro(leastMacro, mathLeast), + cel.ReceiverVarArgMacro(leastMacro, mathLeast), // math.greatest(num, ...) - cel.NewReceiverVarArgMacro(greatestMacro, mathGreatest), + cel.ReceiverVarArgMacro(greatestMacro, mathGreatest), ), cel.Function(minFunc, cel.Overload("math_@min_double", []*cel.Type{cel.DoubleType}, cel.DoubleType, @@ -187,57 +186,57 @@ func (mathLib) ProgramOptions() []cel.ProgramOption { return []cel.ProgramOption{} } -func mathLeast(meh cel.MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *cel.Error) { +func mathLeast(meh cel.MacroExprFactory, target ast.Expr, args []ast.Expr) (ast.Expr, *cel.Error) { if !macroTargetMatchesNamespace(mathNamespace, target) { return nil, nil } switch len(args) { case 0: - return nil, meh.NewError(target.GetId(), "math.least() requires at least one argument") + return nil, meh.NewError(target.ID(), "math.least() requires at least one argument") case 1: if isListLiteralWithValidArgs(args[0]) || isValidArgType(args[0]) { - return meh.GlobalCall(minFunc, args[0]), nil + return meh.NewCall(minFunc, args[0]), nil } - return nil, meh.NewError(args[0].GetId(), "math.least() invalid single argument value") + return nil, meh.NewError(args[0].ID(), "math.least() invalid single argument value") case 2: err := checkInvalidArgs(meh, "math.least()", args) if err != nil { return nil, err } - return meh.GlobalCall(minFunc, args...), nil + return meh.NewCall(minFunc, args...), nil default: err := checkInvalidArgs(meh, "math.least()", args) if err != nil { return nil, err } - return meh.GlobalCall(minFunc, meh.NewList(args...)), nil + return meh.NewCall(minFunc, meh.NewList(args...)), nil } } -func mathGreatest(meh cel.MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *cel.Error) { +func mathGreatest(mef cel.MacroExprFactory, target ast.Expr, args []ast.Expr) (ast.Expr, *cel.Error) { if !macroTargetMatchesNamespace(mathNamespace, target) { return nil, nil } switch len(args) { case 0: - return nil, meh.NewError(target.GetId(), "math.greatest() requires at least one argument") + return nil, mef.NewError(target.ID(), "math.greatest() requires at least one argument") case 1: if isListLiteralWithValidArgs(args[0]) || isValidArgType(args[0]) { - return meh.GlobalCall(maxFunc, args[0]), nil + return mef.NewCall(maxFunc, args[0]), nil } - return nil, meh.NewError(args[0].GetId(), "math.greatest() invalid single argument value") + return nil, mef.NewError(args[0].ID(), "math.greatest() invalid single argument value") case 2: - err := checkInvalidArgs(meh, "math.greatest()", args) + err := checkInvalidArgs(mef, "math.greatest()", args) if err != nil { return nil, err } - return meh.GlobalCall(maxFunc, args...), nil + return mef.NewCall(maxFunc, args...), nil default: - err := checkInvalidArgs(meh, "math.greatest()", args) + err := checkInvalidArgs(mef, "math.greatest()", args) if err != nil { return nil, err } - return meh.GlobalCall(maxFunc, meh.NewList(args...)), nil + return mef.NewCall(maxFunc, mef.NewList(args...)), nil } } @@ -311,48 +310,48 @@ func maxList(numList ref.Val) ref.Val { } } -func checkInvalidArgs(meh cel.MacroExprHelper, funcName string, args []*exprpb.Expr) *cel.Error { +func checkInvalidArgs(meh cel.MacroExprFactory, funcName string, args []ast.Expr) *cel.Error { for _, arg := range args { err := checkInvalidArgLiteral(funcName, arg) if err != nil { - return meh.NewError(arg.GetId(), err.Error()) + return meh.NewError(arg.ID(), err.Error()) } } return nil } -func checkInvalidArgLiteral(funcName string, arg *exprpb.Expr) error { +func checkInvalidArgLiteral(funcName string, arg ast.Expr) error { if !isValidArgType(arg) { return fmt.Errorf("%s simple literal arguments must be numeric", funcName) } return nil } -func isValidArgType(arg *exprpb.Expr) bool { - switch arg.GetExprKind().(type) { - case *exprpb.Expr_ConstExpr: - c := arg.GetConstExpr() - switch c.GetConstantKind().(type) { - case *exprpb.Constant_DoubleValue, *exprpb.Constant_Int64Value, *exprpb.Constant_Uint64Value: +func isValidArgType(arg ast.Expr) bool { + switch arg.Kind() { + case ast.LiteralKind: + c := ref.Val(arg.AsLiteral()) + switch c.(type) { + case types.Double, types.Int, types.Uint: return true default: return false } - case *exprpb.Expr_ListExpr, *exprpb.Expr_StructExpr: + case ast.ListKind, ast.MapKind, ast.StructKind: return false default: return true } } -func isListLiteralWithValidArgs(arg *exprpb.Expr) bool { - switch arg.GetExprKind().(type) { - case *exprpb.Expr_ListExpr: - list := arg.GetListExpr() - if len(list.GetElements()) == 0 { +func isListLiteralWithValidArgs(arg ast.Expr) bool { + switch arg.Kind() { + case ast.ListKind: + list := arg.AsList() + if list.Size() == 0 { return false } - for _, e := range list.GetElements() { + for _, e := range list.Elements() { if !isValidArgType(e) { return false } diff --git a/vendor/github.com/google/cel-go/ext/native.go b/vendor/github.com/google/cel-go/ext/native.go index 0b5fc38ca97..d1b7877758c 100644 --- a/vendor/github.com/google/cel-go/ext/native.go +++ b/vendor/github.com/google/cel-go/ext/native.go @@ -96,17 +96,21 @@ func newNativeTypeProvider(adapter types.Adapter, provider types.Provider, refTy for _, refType := range refTypes { switch rt := refType.(type) { case reflect.Type: - t, err := newNativeType(rt) + result, err := newNativeTypes(rt) if err != nil { return nil, err } - nativeTypes[t.TypeName()] = t + for idx := range result { + nativeTypes[result[idx].TypeName()] = result[idx] + } case reflect.Value: - t, err := newNativeType(rt.Type()) + result, err := newNativeTypes(rt.Type()) if err != nil { return nil, err } - nativeTypes[t.TypeName()] = t + for idx := range result { + nativeTypes[result[idx].TypeName()] = result[idx] + } default: return nil, fmt.Errorf("unsupported native type: %v (%T) must be reflect.Type or reflect.Value", rt, rt) } @@ -151,6 +155,24 @@ func (tp *nativeTypeProvider) FindStructType(typeName string) (*types.Type, bool return tp.baseProvider.FindStructType(typeName) } +// FindStructFieldNames looks up the type definition first from the native types, then from +// the backing provider type set. If found, a set of field names corresponding to the type +// will be returned. +func (tp *nativeTypeProvider) FindStructFieldNames(typeName string) ([]string, bool) { + if t, found := tp.nativeTypes[typeName]; found { + fieldCount := t.refType.NumField() + fields := make([]string, fieldCount) + for i := 0; i < fieldCount; i++ { + fields[i] = t.refType.Field(i).Name + } + return fields, true + } + if celTypeFields, found := tp.baseProvider.FindStructFieldNames(typeName); found { + return celTypeFields, true + } + return tp.baseProvider.FindStructFieldNames(typeName) +} + // FindStructFieldType looks up a native type's field definition, and if the type name is not a native // type then proxies to the composed types.Provider func (tp *nativeTypeProvider) FindStructFieldType(typeName, fieldName string) (*types.FieldType, bool) { @@ -447,6 +469,42 @@ func (o *nativeObj) Value() any { return o.val } +func newNativeTypes(rawType reflect.Type) ([]*nativeType, error) { + nt, err := newNativeType(rawType) + if err != nil { + return nil, err + } + result := []*nativeType{nt} + + alreadySeen := make(map[string]struct{}) + var iterateStructMembers func(reflect.Type) + iterateStructMembers = func(t reflect.Type) { + if k := t.Kind(); k == reflect.Pointer || k == reflect.Slice || k == reflect.Array || k == reflect.Map { + t = t.Elem() + } + if t.Kind() != reflect.Struct { + return + } + if _, seen := alreadySeen[t.String()]; seen { + return + } + alreadySeen[t.String()] = struct{}{} + nt, ntErr := newNativeType(t) + if ntErr != nil { + err = ntErr + return + } + result = append(result, nt) + + for idx := 0; idx < t.NumField(); idx++ { + iterateStructMembers(t.Field(idx).Type) + } + } + iterateStructMembers(rawType) + + return result, err +} + func newNativeType(rawType reflect.Type) (*nativeType, error) { refType := rawType if refType.Kind() == reflect.Pointer { diff --git a/vendor/github.com/google/cel-go/ext/protos.go b/vendor/github.com/google/cel-go/ext/protos.go index a7ca27a6a27..68796f60ada 100644 --- a/vendor/github.com/google/cel-go/ext/protos.go +++ b/vendor/github.com/google/cel-go/ext/protos.go @@ -16,8 +16,7 @@ package ext import ( "github.com/google/cel-go/cel" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + "github.com/google/cel-go/common/ast" ) // Protos returns a cel.EnvOption to configure extended macros and functions for @@ -72,9 +71,9 @@ func (protoLib) CompileOptions() []cel.EnvOption { return []cel.EnvOption{ cel.Macros( // proto.getExt(msg, select_expression) - cel.NewReceiverMacro(getExtension, 2, getProtoExt), + cel.ReceiverMacro(getExtension, 2, getProtoExt), // proto.hasExt(msg, select_expression) - cel.NewReceiverMacro(hasExtension, 2, hasProtoExt), + cel.ReceiverMacro(hasExtension, 2, hasProtoExt), ), } } @@ -85,56 +84,56 @@ func (protoLib) ProgramOptions() []cel.ProgramOption { } // hasProtoExt generates a test-only select expression for a fully-qualified extension name on a protobuf message. -func hasProtoExt(meh cel.MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *cel.Error) { +func hasProtoExt(mef cel.MacroExprFactory, target ast.Expr, args []ast.Expr) (ast.Expr, *cel.Error) { if !macroTargetMatchesNamespace(protoNamespace, target) { return nil, nil } - extensionField, err := getExtFieldName(meh, args[1]) + extensionField, err := getExtFieldName(mef, args[1]) if err != nil { return nil, err } - return meh.PresenceTest(args[0], extensionField), nil + return mef.NewPresenceTest(args[0], extensionField), nil } // getProtoExt generates a select expression for a fully-qualified extension name on a protobuf message. -func getProtoExt(meh cel.MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *cel.Error) { +func getProtoExt(mef cel.MacroExprFactory, target ast.Expr, args []ast.Expr) (ast.Expr, *cel.Error) { if !macroTargetMatchesNamespace(protoNamespace, target) { return nil, nil } - extFieldName, err := getExtFieldName(meh, args[1]) + extFieldName, err := getExtFieldName(mef, args[1]) if err != nil { return nil, err } - return meh.Select(args[0], extFieldName), nil + return mef.NewSelect(args[0], extFieldName), nil } -func getExtFieldName(meh cel.MacroExprHelper, expr *exprpb.Expr) (string, *cel.Error) { +func getExtFieldName(mef cel.MacroExprFactory, expr ast.Expr) (string, *cel.Error) { isValid := false extensionField := "" - switch expr.GetExprKind().(type) { - case *exprpb.Expr_SelectExpr: + switch expr.Kind() { + case ast.SelectKind: extensionField, isValid = validateIdentifier(expr) } if !isValid { - return "", meh.NewError(expr.GetId(), "invalid extension field") + return "", mef.NewError(expr.ID(), "invalid extension field") } return extensionField, nil } -func validateIdentifier(expr *exprpb.Expr) (string, bool) { - switch expr.GetExprKind().(type) { - case *exprpb.Expr_IdentExpr: - return expr.GetIdentExpr().GetName(), true - case *exprpb.Expr_SelectExpr: - sel := expr.GetSelectExpr() - if sel.GetTestOnly() { +func validateIdentifier(expr ast.Expr) (string, bool) { + switch expr.Kind() { + case ast.IdentKind: + return expr.AsIdent(), true + case ast.SelectKind: + sel := expr.AsSelect() + if sel.IsTestOnly() { return "", false } - opStr, isIdent := validateIdentifier(sel.GetOperand()) + opStr, isIdent := validateIdentifier(sel.Operand()) if !isIdent { return "", false } - return opStr + "." + sel.GetField(), true + return opStr + "." + sel.FieldName(), true default: return "", false } diff --git a/vendor/github.com/google/cel-go/ext/sets.go b/vendor/github.com/google/cel-go/ext/sets.go index 833c15f616f..7e941665521 100644 --- a/vendor/github.com/google/cel-go/ext/sets.go +++ b/vendor/github.com/google/cel-go/ext/sets.go @@ -19,6 +19,8 @@ import ( "github.com/google/cel-go/cel" "github.com/google/cel-go/checker" + "github.com/google/cel-go/common/ast" + "github.com/google/cel-go/common/operators" "github.com/google/cel-go/common/types" "github.com/google/cel-go/common/types/ref" "github.com/google/cel-go/common/types/traits" @@ -119,6 +121,68 @@ func (setsLib) ProgramOptions() []cel.ProgramOption { } } +// NewSetMembershipOptimizer rewrites set membership tests using the `in` operator against a list +// of constant values of enum, int, uint, string, or boolean type into a set membership test against +// a map where the map keys are the elements of the list. +func NewSetMembershipOptimizer() (cel.ASTOptimizer, error) { + return setsLib{}, nil +} + +func (setsLib) Optimize(ctx *cel.OptimizerContext, a *ast.AST) *ast.AST { + root := ast.NavigateAST(a) + matches := ast.MatchDescendants(root, matchInConstantList(a)) + for _, match := range matches { + call := match.AsCall() + listArg := call.Args()[1] + entries := make([]ast.EntryExpr, len(listArg.AsList().Elements())) + for i, elem := range listArg.AsList().Elements() { + var entry ast.EntryExpr + if r, found := a.ReferenceMap()[elem.ID()]; found && r.Value != nil { + entry = ctx.NewMapEntry(ctx.NewLiteral(r.Value), ctx.NewLiteral(types.True), false) + } else { + entry = ctx.NewMapEntry(elem, ctx.NewLiteral(types.True), false) + } + entries[i] = entry + } + mapArg := ctx.NewMap(entries) + ctx.UpdateExpr(listArg, mapArg) + } + return a +} + +func matchInConstantList(a *ast.AST) ast.ExprMatcher { + return func(e ast.NavigableExpr) bool { + if e.Kind() != ast.CallKind { + return false + } + call := e.AsCall() + if call.FunctionName() != operators.In { + return false + } + aggregateVal := call.Args()[1] + if aggregateVal.Kind() != ast.ListKind { + return false + } + listVal := aggregateVal.AsList() + for _, elem := range listVal.Elements() { + if r, found := a.ReferenceMap()[elem.ID()]; found { + if r.Value != nil { + continue + } + } + if elem.Kind() != ast.LiteralKind { + return false + } + lit := elem.AsLiteral() + if !(lit.Type() == cel.StringType || lit.Type() == cel.IntType || + lit.Type() == cel.UintType || lit.Type() == cel.BoolType) { + return false + } + } + return true + } +} + func setsIntersects(listA, listB ref.Val) ref.Val { lA := listA.(traits.Lister) lB := listB.(traits.Lister) diff --git a/vendor/github.com/google/cel-go/ext/strings.go b/vendor/github.com/google/cel-go/ext/strings.go index 88c119f2b0b..2e20f1e4c42 100644 --- a/vendor/github.com/google/cel-go/ext/strings.go +++ b/vendor/github.com/google/cel-go/ext/strings.go @@ -21,19 +21,16 @@ import ( "fmt" "math" "reflect" - "sort" "strings" "unicode" "unicode/utf8" "golang.org/x/text/language" - "golang.org/x/text/message" "github.com/google/cel-go/cel" "github.com/google/cel-go/common/types" "github.com/google/cel-go/common/types/ref" "github.com/google/cel-go/common/types/traits" - "github.com/google/cel-go/interpreter" ) const ( @@ -99,7 +96,7 @@ const ( // "a map inside a list: %s".format([[1, 2, 3, {"a": "x", "b": "y", "c": "z"}]]) // returns "a map inside a list: [1, 2, 3, {"a":"x", "b":"y", "c":"d"}]" // "true bool: %s - false bool: %s\nbinary bool: %b".format([true, false, true]) // returns "true bool: true - false bool: false\nbinary bool: 1" // -// Passing an incorrect type (an integer to `%s`) is considered an error, as well as attempting +// Passing an incorrect type (a string to `%b`) is considered an error, as well as attempting // to use more formatting clauses than there are arguments (`%d %d %d` while passing two ints, for instance). // If compile-time checking is enabled, and the formatting string is a constant, and the argument list is a literal, // then letting any arguments go unused/unformatted is also considered an error. @@ -205,6 +202,8 @@ const ( // 'hello hello'.replace('he', 'we', -1) // returns 'wello wello' // 'hello hello'.replace('he', 'we', 1) // returns 'wello hello' // 'hello hello'.replace('he', 'we', 0) // returns 'hello hello' +// 'hello hello'.replace('', '_') // returns '_h_e_l_l_o_ _h_e_l_l_o_' +// 'hello hello'.replace('h', '') // returns 'ello ello' // // # Split // @@ -270,8 +269,26 @@ const ( // // 'TacoCat'.upperAscii() // returns 'TACOCAT' // 'TacoCÆt Xii'.upperAscii() // returns 'TACOCÆT XII' +// +// # Reverse +// +// Introduced at version: 3 +// +// Returns a new string whose characters are the same as the target string, only formatted in +// reverse order. +// This function relies on converting strings to rune arrays in order to reverse +// +// .reverse() -> +// +// Examples: +// +// 'gums'.reverse() // returns 'smug' +// 'John Smith'.reverse() // returns 'htimS nhoJ' func Strings(options ...StringsOption) cel.EnvOption { - s := &stringLib{version: math.MaxUint32} + s := &stringLib{ + version: math.MaxUint32, + validateFormat: true, + } for _, o := range options { s = o(s) } @@ -279,8 +296,9 @@ func Strings(options ...StringsOption) cel.EnvOption { } type stringLib struct { - locale string - version uint32 + locale string + version uint32 + validateFormat bool } // LibraryName implements the SingletonLibrary interface method. @@ -317,6 +335,17 @@ func StringsVersion(version uint32) StringsOption { } } +// StringsValidateFormatCalls validates type-checked ASTs to ensure that string.format() calls have +// valid formatting clauses and valid argument types for each clause. +// +// Enabled by default. +func StringsValidateFormatCalls(value bool) StringsOption { + return func(s *stringLib) *stringLib { + s.validateFormat = value + return s + } +} + // CompileOptions implements the Library interface method. func (lib *stringLib) CompileOptions() []cel.EnvOption { formatLocale := "en_US" @@ -440,13 +469,15 @@ func (lib *stringLib) CompileOptions() []cel.EnvOption { cel.FunctionBinding(func(args ...ref.Val) ref.Val { s := string(args[0].(types.String)) formatArgs := args[1].(traits.Lister) - return stringOrError(interpreter.ParseFormatString(s, &stringFormatter{}, &stringArgList{formatArgs}, formatLocale)) + return stringOrError(parseFormatString(s, &stringFormatter{}, &stringArgList{formatArgs}, formatLocale)) }))), cel.Function("strings.quote", cel.Overload("strings_quote", []*cel.Type{cel.StringType}, cel.StringType, cel.UnaryBinding(func(str ref.Val) ref.Val { s := str.(types.String) return stringOrError(quote(string(s))) - })))) + }))), + + cel.ASTValidators(stringFormatValidator{})) } if lib.version >= 2 { @@ -471,7 +502,7 @@ func (lib *stringLib) CompileOptions() []cel.EnvOption { cel.UnaryBinding(func(list ref.Val) ref.Val { l, err := list.ConvertToNative(stringListType) if err != nil { - return types.NewErr(err.Error()) + return types.WrapErr(err) } return stringOrError(join(l.([]string))) })), @@ -479,13 +510,26 @@ func (lib *stringLib) CompileOptions() []cel.EnvOption { cel.BinaryBinding(func(list, delim ref.Val) ref.Val { l, err := list.ConvertToNative(stringListType) if err != nil { - return types.NewErr(err.Error()) + return types.WrapErr(err) } d := delim.(types.String) return stringOrError(joinSeparator(l.([]string), string(d))) }))), ) } + if lib.version >= 3 { + opts = append(opts, + cel.Function("reverse", + cel.MemberOverload("reverse", []*cel.Type{cel.StringType}, cel.StringType, + cel.UnaryBinding(func(str ref.Val) ref.Val { + s := str.(types.String) + return stringOrError(reverse(string(s))) + }))), + ) + } + if lib.validateFormat { + opts = append(opts, cel.ASTValidators(stringFormatValidator{})) + } return opts } @@ -636,6 +680,14 @@ func upperASCII(str string) (string, error) { return string(runes), nil } +func reverse(str string) (string, error) { + chars := []rune(str) + for i, j := 0, len(chars)-1; i < j; i, j = i+1, j-1 { + chars[i], chars[j] = chars[j], chars[i] + } + return string(chars), nil +} + func joinSeparator(strs []string, separator string) (string, error) { return strings.Join(strs, separator), nil } @@ -661,238 +713,6 @@ func joinValSeparator(strs traits.Lister, separator string) (string, error) { return sb.String(), nil } -type clauseImpl func(ref.Val, string) (string, error) - -func clauseForType(argType ref.Type) (clauseImpl, error) { - switch argType { - case types.IntType, types.UintType: - return formatDecimal, nil - case types.StringType, types.BytesType, types.BoolType, types.NullType, types.TypeType: - return FormatString, nil - case types.TimestampType, types.DurationType: - // special case to ensure timestamps/durations get printed as CEL literals - return func(arg ref.Val, locale string) (string, error) { - argStrVal := arg.ConvertToType(types.StringType) - argStr := argStrVal.Value().(string) - if arg.Type() == types.TimestampType { - return fmt.Sprintf("timestamp(%q)", argStr), nil - } - if arg.Type() == types.DurationType { - return fmt.Sprintf("duration(%q)", argStr), nil - } - return "", fmt.Errorf("cannot convert argument of type %s to timestamp/duration", arg.Type().TypeName()) - }, nil - case types.ListType: - return formatList, nil - case types.MapType: - return formatMap, nil - case types.DoubleType: - // avoid formatFixed so we can output a period as the decimal separator in order - // to always be a valid CEL literal - return func(arg ref.Val, locale string) (string, error) { - argDouble, ok := arg.Value().(float64) - if !ok { - return "", fmt.Errorf("couldn't convert %s to float64", arg.Type().TypeName()) - } - fmtStr := fmt.Sprintf("%%.%df", defaultPrecision) - return fmt.Sprintf(fmtStr, argDouble), nil - }, nil - case types.TypeType: - return func(arg ref.Val, locale string) (string, error) { - return fmt.Sprintf("type(%s)", arg.Value().(string)), nil - }, nil - default: - return nil, fmt.Errorf("no formatting function for %s", argType.TypeName()) - } -} - -func formatList(arg ref.Val, locale string) (string, error) { - argList := arg.(traits.Lister) - argIterator := argList.Iterator() - var listStrBuilder strings.Builder - _, err := listStrBuilder.WriteRune('[') - if err != nil { - return "", fmt.Errorf("error writing to list string: %w", err) - } - for argIterator.HasNext() == types.True { - member := argIterator.Next() - memberFormat, err := clauseForType(member.Type()) - if err != nil { - return "", err - } - unquotedStr, err := memberFormat(member, locale) - if err != nil { - return "", err - } - str := quoteForCEL(member, unquotedStr) - _, err = listStrBuilder.WriteString(str) - if err != nil { - return "", fmt.Errorf("error writing to list string: %w", err) - } - if argIterator.HasNext() == types.True { - _, err = listStrBuilder.WriteString(", ") - if err != nil { - return "", fmt.Errorf("error writing to list string: %w", err) - } - } - } - _, err = listStrBuilder.WriteRune(']') - if err != nil { - return "", fmt.Errorf("error writing to list string: %w", err) - } - return listStrBuilder.String(), nil -} - -func formatMap(arg ref.Val, locale string) (string, error) { - argMap := arg.(traits.Mapper) - argIterator := argMap.Iterator() - type mapPair struct { - key string - value string - } - argPairs := make([]mapPair, argMap.Size().Value().(int64)) - i := 0 - for argIterator.HasNext() == types.True { - key := argIterator.Next() - var keyFormat clauseImpl - switch key.Type() { - case types.StringType, types.BoolType: - keyFormat = FormatString - case types.IntType, types.UintType: - keyFormat = formatDecimal - default: - return "", fmt.Errorf("no formatting function for map key of type %s", key.Type().TypeName()) - } - unquotedKeyStr, err := keyFormat(key, locale) - if err != nil { - return "", err - } - keyStr := quoteForCEL(key, unquotedKeyStr) - value, found := argMap.Find(key) - if !found { - return "", fmt.Errorf("could not find key: %q", key) - } - valueFormat, err := clauseForType(value.Type()) - if err != nil { - return "", err - } - unquotedValueStr, err := valueFormat(value, locale) - if err != nil { - return "", err - } - valueStr := quoteForCEL(value, unquotedValueStr) - argPairs[i] = mapPair{keyStr, valueStr} - i++ - } - sort.SliceStable(argPairs, func(x, y int) bool { - return argPairs[x].key < argPairs[y].key - }) - var mapStrBuilder strings.Builder - _, err := mapStrBuilder.WriteRune('{') - if err != nil { - return "", fmt.Errorf("error writing to map string: %w", err) - } - for i, entry := range argPairs { - _, err = mapStrBuilder.WriteString(fmt.Sprintf("%s:%s", entry.key, entry.value)) - if err != nil { - return "", fmt.Errorf("error writing to map string: %w", err) - } - if i < len(argPairs)-1 { - _, err = mapStrBuilder.WriteString(", ") - if err != nil { - return "", fmt.Errorf("error writing to map string: %w", err) - } - } - } - _, err = mapStrBuilder.WriteRune('}') - if err != nil { - return "", fmt.Errorf("error writing to map string: %w", err) - } - return mapStrBuilder.String(), nil -} - -// quoteForCEL takes a formatted, unquoted value and quotes it in a manner -// suitable for embedding directly in CEL. -func quoteForCEL(refVal ref.Val, unquotedValue string) string { - switch refVal.Type() { - case types.StringType: - return fmt.Sprintf("%q", unquotedValue) - case types.BytesType: - return fmt.Sprintf("b%q", unquotedValue) - case types.DoubleType: - // special case to handle infinity/NaN - num := refVal.Value().(float64) - if math.IsInf(num, 1) || math.IsInf(num, -1) || math.IsNaN(num) { - return fmt.Sprintf("%q", unquotedValue) - } - return unquotedValue - default: - return unquotedValue - } -} - -// FormatString returns the string representation of a CEL value. -// It is used to implement the %s specifier in the (string).format() extension -// function. -func FormatString(arg ref.Val, locale string) (string, error) { - switch arg.Type() { - case types.ListType: - return formatList(arg, locale) - case types.MapType: - return formatMap(arg, locale) - case types.IntType, types.UintType, types.DoubleType, - types.BoolType, types.StringType, types.TimestampType, types.BytesType, types.DurationType, types.TypeType: - argStrVal := arg.ConvertToType(types.StringType) - argStr, ok := argStrVal.Value().(string) - if !ok { - return "", fmt.Errorf("could not convert argument %q to string", argStrVal) - } - return argStr, nil - case types.NullType: - return "null", nil - default: - return "", fmt.Errorf("string clause can only be used on strings, bools, bytes, ints, doubles, maps, lists, types, durations, and timestamps, was given %s", arg.Type().TypeName()) - } -} - -func formatDecimal(arg ref.Val, locale string) (string, error) { - switch arg.Type() { - case types.IntType: - argInt, ok := arg.ConvertToType(types.IntType).Value().(int64) - if !ok { - return "", fmt.Errorf("could not convert \"%s\" to int64", arg.Value()) - } - return fmt.Sprintf("%d", argInt), nil - case types.UintType: - argInt, ok := arg.ConvertToType(types.UintType).Value().(uint64) - if !ok { - return "", fmt.Errorf("could not convert \"%s\" to uint64", arg.Value()) - } - return fmt.Sprintf("%d", argInt), nil - default: - return "", fmt.Errorf("decimal clause can only be used on integers, was given %s", arg.Type().TypeName()) - } -} - -func matchLanguage(locale string) (language.Tag, error) { - matcher, err := makeMatcher(locale) - if err != nil { - return language.Und, err - } - tag, _ := language.MatchStrings(matcher, locale) - return tag, nil -} - -func makeMatcher(locale string) (language.Matcher, error) { - tags := make([]language.Tag, 0) - tag, err := language.Parse(locale) - if err != nil { - return nil, err - } - tags = append(tags, tag) - return language.NewMatcher(tags), nil -} - // quote implements a string quoting function. The string will be wrapped in // double quotes, and all valid CEL escape sequences will be escaped to show up // literally if printed. If the input contains any invalid UTF-8, the invalid runes @@ -940,156 +760,6 @@ func sanitize(s string) string { return sanitizedStringBuilder.String() } -type stringFormatter struct{} - -func (c *stringFormatter) String(arg ref.Val, locale string) (string, error) { - return FormatString(arg, locale) -} - -func (c *stringFormatter) Decimal(arg ref.Val, locale string) (string, error) { - return formatDecimal(arg, locale) -} - -func (c *stringFormatter) Fixed(precision *int) func(ref.Val, string) (string, error) { - if precision == nil { - precision = new(int) - *precision = defaultPrecision - } - return func(arg ref.Val, locale string) (string, error) { - strException := false - if arg.Type() == types.StringType { - argStr := arg.Value().(string) - if argStr == "NaN" || argStr == "Infinity" || argStr == "-Infinity" { - strException = true - } - } - if arg.Type() != types.DoubleType && !strException { - return "", fmt.Errorf("fixed-point clause can only be used on doubles, was given %s", arg.Type().TypeName()) - } - argFloatVal := arg.ConvertToType(types.DoubleType) - argFloat, ok := argFloatVal.Value().(float64) - if !ok { - return "", fmt.Errorf("could not convert \"%s\" to float64", argFloatVal.Value()) - } - fmtStr := fmt.Sprintf("%%.%df", *precision) - - matchedLocale, err := matchLanguage(locale) - if err != nil { - return "", fmt.Errorf("error matching locale: %w", err) - } - return message.NewPrinter(matchedLocale).Sprintf(fmtStr, argFloat), nil - } -} - -func (c *stringFormatter) Scientific(precision *int) func(ref.Val, string) (string, error) { - if precision == nil { - precision = new(int) - *precision = defaultPrecision - } - return func(arg ref.Val, locale string) (string, error) { - strException := false - if arg.Type() == types.StringType { - argStr := arg.Value().(string) - if argStr == "NaN" || argStr == "Infinity" || argStr == "-Infinity" { - strException = true - } - } - if arg.Type() != types.DoubleType && !strException { - return "", fmt.Errorf("scientific clause can only be used on doubles, was given %s", arg.Type().TypeName()) - } - argFloatVal := arg.ConvertToType(types.DoubleType) - argFloat, ok := argFloatVal.Value().(float64) - if !ok { - return "", fmt.Errorf("could not convert \"%s\" to float64", argFloatVal.Value()) - } - matchedLocale, err := matchLanguage(locale) - if err != nil { - return "", fmt.Errorf("error matching locale: %w", err) - } - fmtStr := fmt.Sprintf("%%%de", *precision) - return message.NewPrinter(matchedLocale).Sprintf(fmtStr, argFloat), nil - } -} - -func (c *stringFormatter) Binary(arg ref.Val, locale string) (string, error) { - switch arg.Type() { - case types.IntType: - argInt := arg.Value().(int64) - // locale is intentionally unused as integers formatted as binary - // strings are locale-independent - return fmt.Sprintf("%b", argInt), nil - case types.UintType: - argInt := arg.Value().(uint64) - return fmt.Sprintf("%b", argInt), nil - case types.BoolType: - argBool := arg.Value().(bool) - if argBool { - return "1", nil - } - return "0", nil - default: - return "", fmt.Errorf("only integers and bools can be formatted as binary, was given %s", arg.Type().TypeName()) - } -} - -func (c *stringFormatter) Hex(useUpper bool) func(ref.Val, string) (string, error) { - return func(arg ref.Val, locale string) (string, error) { - fmtStr := "%x" - if useUpper { - fmtStr = "%X" - } - switch arg.Type() { - case types.StringType, types.BytesType: - if arg.Type() == types.BytesType { - return fmt.Sprintf(fmtStr, arg.Value().([]byte)), nil - } - return fmt.Sprintf(fmtStr, arg.Value().(string)), nil - case types.IntType: - argInt, ok := arg.Value().(int64) - if !ok { - return "", fmt.Errorf("could not convert \"%s\" to int64", arg.Value()) - } - return fmt.Sprintf(fmtStr, argInt), nil - case types.UintType: - argInt, ok := arg.Value().(uint64) - if !ok { - return "", fmt.Errorf("could not convert \"%s\" to uint64", arg.Value()) - } - return fmt.Sprintf(fmtStr, argInt), nil - default: - return "", fmt.Errorf("only integers, byte buffers, and strings can be formatted as hex, was given %s", arg.Type().TypeName()) - } - } -} - -func (c *stringFormatter) Octal(arg ref.Val, locale string) (string, error) { - switch arg.Type() { - case types.IntType: - argInt := arg.Value().(int64) - return fmt.Sprintf("%o", argInt), nil - case types.UintType: - argInt := arg.Value().(uint64) - return fmt.Sprintf("%o", argInt), nil - default: - return "", fmt.Errorf("octal clause can only be used on integers, was given %s", arg.Type().TypeName()) - } -} - -type stringArgList struct { - args traits.Lister -} - -func (c *stringArgList) Arg(index int64) (ref.Val, error) { - if index >= c.args.Size().Value().(int64) { - return nil, fmt.Errorf("index %d out of range", index) - } - return c.args.Get(types.Int(index)), nil -} - -func (c *stringArgList) ArgSize() int64 { - return c.args.Size().Value().(int64) -} - var ( stringListType = reflect.TypeOf([]string{}) ) diff --git a/vendor/github.com/google/cel-go/interpreter/BUILD.bazel b/vendor/github.com/google/cel-go/interpreter/BUILD.bazel index 3a5219eb5f6..220e23d4752 100644 --- a/vendor/github.com/google/cel-go/interpreter/BUILD.bazel +++ b/vendor/github.com/google/cel-go/interpreter/BUILD.bazel @@ -14,7 +14,6 @@ go_library( "decorators.go", "dispatcher.go", "evalstate.go", - "formatting.go", "interpretable.go", "interpreter.go", "optimizations.go", diff --git a/vendor/github.com/google/cel-go/interpreter/attributes.go b/vendor/github.com/google/cel-go/interpreter/attributes.go index ca97bdfcf14..0098750dd77 100644 --- a/vendor/github.com/google/cel-go/interpreter/attributes.go +++ b/vendor/github.com/google/cel-go/interpreter/attributes.go @@ -287,6 +287,9 @@ func (a *absoluteAttribute) Resolve(vars Activation) (any, error) { // determine whether the type is unknown before returning. obj, found := vars.ResolveName(nm) if found { + if celErr, ok := obj.(*types.Err); ok { + return nil, celErr.Unwrap() + } obj, isOpt, err := applyQualifiers(vars, obj, a.qualifiers) if err != nil { return nil, err diff --git a/vendor/github.com/google/cel-go/interpreter/formatting.go b/vendor/github.com/google/cel-go/interpreter/formatting.go deleted file mode 100644 index e3f7533745e..00000000000 --- a/vendor/github.com/google/cel-go/interpreter/formatting.go +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package interpreter - -import ( - "errors" - "fmt" - "strconv" - "strings" - "unicode" - - "github.com/google/cel-go/common/types" - "github.com/google/cel-go/common/types/ref" -) - -type typeVerifier func(int64, ...ref.Type) (bool, error) - -// InterpolateFormattedString checks the syntax and cardinality of any string.format calls present in the expression and reports -// any errors at compile time. -func InterpolateFormattedString(verifier typeVerifier) InterpretableDecorator { - return func(inter Interpretable) (Interpretable, error) { - call, ok := inter.(InterpretableCall) - if !ok { - return inter, nil - } - if call.OverloadID() != "string_format" { - return inter, nil - } - args := call.Args() - if len(args) != 2 { - return nil, fmt.Errorf("wrong number of arguments to string.format (expected 2, got %d)", len(args)) - } - fmtStrInter, ok := args[0].(InterpretableConst) - if !ok { - return inter, nil - } - var fmtArgsInter InterpretableConstructor - fmtArgsInter, ok = args[1].(InterpretableConstructor) - if !ok { - return inter, nil - } - if fmtArgsInter.Type() != types.ListType { - // don't necessarily return an error since the list may be DynType - return inter, nil - } - formatStr := fmtStrInter.Value().Value().(string) - initVals := fmtArgsInter.InitVals() - - formatCheck := &formatCheck{ - args: initVals, - verifier: verifier, - } - // use a placeholder locale, since locale doesn't affect syntax - _, err := ParseFormatString(formatStr, formatCheck, formatCheck, "en_US") - if err != nil { - return nil, err - } - seenArgs := formatCheck.argsRequested - if len(initVals) > seenArgs { - return nil, fmt.Errorf("too many arguments supplied to string.format (expected %d, got %d)", seenArgs, len(initVals)) - } - return inter, nil - } -} - -type formatCheck struct { - args []Interpretable - argsRequested int - curArgIndex int64 - enableCheckArgTypes bool - verifier typeVerifier -} - -func (c *formatCheck) String(arg ref.Val, locale string) (string, error) { - valid, err := verifyString(c.args[c.curArgIndex], c.verifier) - if err != nil { - return "", err - } - if !valid { - return "", errors.New("string clause can only be used on strings, bools, bytes, ints, doubles, maps, lists, types, durations, and timestamps") - } - return "", nil -} - -func (c *formatCheck) Decimal(arg ref.Val, locale string) (string, error) { - id := c.args[c.curArgIndex].ID() - valid, err := c.verifier(id, types.IntType, types.UintType) - if err != nil { - return "", err - } - if !valid { - return "", errors.New("integer clause can only be used on integers") - } - return "", nil -} - -func (c *formatCheck) Fixed(precision *int) func(ref.Val, string) (string, error) { - return func(arg ref.Val, locale string) (string, error) { - id := c.args[c.curArgIndex].ID() - // we allow StringType since "NaN", "Infinity", and "-Infinity" are also valid values - valid, err := c.verifier(id, types.DoubleType, types.StringType) - if err != nil { - return "", err - } - if !valid { - return "", errors.New("fixed-point clause can only be used on doubles") - } - return "", nil - } -} - -func (c *formatCheck) Scientific(precision *int) func(ref.Val, string) (string, error) { - return func(arg ref.Val, locale string) (string, error) { - id := c.args[c.curArgIndex].ID() - valid, err := c.verifier(id, types.DoubleType, types.StringType) - if err != nil { - return "", err - } - if !valid { - return "", errors.New("scientific clause can only be used on doubles") - } - return "", nil - } -} - -func (c *formatCheck) Binary(arg ref.Val, locale string) (string, error) { - id := c.args[c.curArgIndex].ID() - valid, err := c.verifier(id, types.IntType, types.UintType, types.BoolType) - if err != nil { - return "", err - } - if !valid { - return "", errors.New("only integers and bools can be formatted as binary") - } - return "", nil -} - -func (c *formatCheck) Hex(useUpper bool) func(ref.Val, string) (string, error) { - return func(arg ref.Val, locale string) (string, error) { - id := c.args[c.curArgIndex].ID() - valid, err := c.verifier(id, types.IntType, types.UintType, types.StringType, types.BytesType) - if err != nil { - return "", err - } - if !valid { - return "", errors.New("only integers, byte buffers, and strings can be formatted as hex") - } - return "", nil - } -} - -func (c *formatCheck) Octal(arg ref.Val, locale string) (string, error) { - id := c.args[c.curArgIndex].ID() - valid, err := c.verifier(id, types.IntType, types.UintType) - if err != nil { - return "", err - } - if !valid { - return "", errors.New("octal clause can only be used on integers") - } - return "", nil -} - -func (c *formatCheck) Arg(index int64) (ref.Val, error) { - c.argsRequested++ - c.curArgIndex = index - // return a dummy value - this is immediately passed to back to us - // through one of the FormatCallback functions, so anything will do - return types.Int(0), nil -} - -func (c *formatCheck) ArgSize() int64 { - return int64(len(c.args)) -} - -func verifyString(sub Interpretable, verifier typeVerifier) (bool, error) { - subVerified, err := verifier(sub.ID(), - types.ListType, types.MapType, types.IntType, types.UintType, types.DoubleType, - types.BoolType, types.StringType, types.TimestampType, types.BytesType, types.DurationType, types.TypeType, types.NullType) - if err != nil { - return false, err - } - if !subVerified { - return false, nil - } - con, ok := sub.(InterpretableConstructor) - if ok { - members := con.InitVals() - for _, m := range members { - // recursively verify if we're dealing with a list/map - verified, err := verifyString(m, verifier) - if err != nil { - return false, err - } - if !verified { - return false, nil - } - } - } - return true, nil - -} - -// FormatStringInterpolator is an interface that allows user-defined behavior -// for formatting clause implementations, as well as argument retrieval. -// Each function is expected to support the appropriate types as laid out in -// the string.format documentation, and to return an error if given an inappropriate type. -type FormatStringInterpolator interface { - // String takes a ref.Val and a string representing the current locale identifier - // and returns the Val formatted as a string, or an error if one occurred. - String(ref.Val, string) (string, error) - - // Decimal takes a ref.Val and a string representing the current locale identifier - // and returns the Val formatted as a decimal integer, or an error if one occurred. - Decimal(ref.Val, string) (string, error) - - // Fixed takes an int pointer representing precision (or nil if none was given) and - // returns a function operating in a similar manner to String and Decimal, taking a - // ref.Val and locale and returning the appropriate string. A closure is returned - // so precision can be set without needing an additional function call/configuration. - Fixed(*int) func(ref.Val, string) (string, error) - - // Scientific functions identically to Fixed, except the string returned from the closure - // is expected to be in scientific notation. - Scientific(*int) func(ref.Val, string) (string, error) - - // Binary takes a ref.Val and a string representing the current locale identifier - // and returns the Val formatted as a binary integer, or an error if one occurred. - Binary(ref.Val, string) (string, error) - - // Hex takes a boolean that, if true, indicates the hex string output by the returned - // closure should use uppercase letters for A-F. - Hex(bool) func(ref.Val, string) (string, error) - - // Octal takes a ref.Val and a string representing the current locale identifier and - // returns the Val formatted in octal, or an error if one occurred. - Octal(ref.Val, string) (string, error) -} - -// FormatList is an interface that allows user-defined list-like datatypes to be used -// for formatting clause implementations. -type FormatList interface { - // Arg returns the ref.Val at the given index, or an error if one occurred. - Arg(int64) (ref.Val, error) - // ArgSize returns the length of the argument list. - ArgSize() int64 -} - -type clauseImpl func(ref.Val, string) (string, error) - -// ParseFormatString formats a string according to the string.format syntax, taking the clause implementations -// from the provided FormatCallback and the args from the given FormatList. -func ParseFormatString(formatStr string, callback FormatStringInterpolator, list FormatList, locale string) (string, error) { - i := 0 - argIndex := 0 - var builtStr strings.Builder - for i < len(formatStr) { - if formatStr[i] == '%' { - if i+1 < len(formatStr) && formatStr[i+1] == '%' { - err := builtStr.WriteByte('%') - if err != nil { - return "", fmt.Errorf("error writing format string: %w", err) - } - i += 2 - continue - } else { - argAny, err := list.Arg(int64(argIndex)) - if err != nil { - return "", err - } - if i+1 >= len(formatStr) { - return "", errors.New("unexpected end of string") - } - if int64(argIndex) >= list.ArgSize() { - return "", fmt.Errorf("index %d out of range", argIndex) - } - numRead, val, refErr := parseAndFormatClause(formatStr[i:], argAny, callback, list, locale) - if refErr != nil { - return "", refErr - } - _, err = builtStr.WriteString(val) - if err != nil { - return "", fmt.Errorf("error writing format string: %w", err) - } - i += numRead - argIndex++ - } - } else { - err := builtStr.WriteByte(formatStr[i]) - if err != nil { - return "", fmt.Errorf("error writing format string: %w", err) - } - i++ - } - } - return builtStr.String(), nil -} - -// parseAndFormatClause parses the format clause at the start of the given string with val, and returns -// how many characters were consumed and the substituted string form of val, or an error if one occurred. -func parseAndFormatClause(formatStr string, val ref.Val, callback FormatStringInterpolator, list FormatList, locale string) (int, string, error) { - i := 1 - read, formatter, err := parseFormattingClause(formatStr[i:], callback) - i += read - if err != nil { - return -1, "", fmt.Errorf("could not parse formatting clause: %s", err) - } - - valStr, err := formatter(val, locale) - if err != nil { - return -1, "", fmt.Errorf("error during formatting: %s", err) - } - return i, valStr, nil -} - -func parseFormattingClause(formatStr string, callback FormatStringInterpolator) (int, clauseImpl, error) { - i := 0 - read, precision, err := parsePrecision(formatStr[i:]) - i += read - if err != nil { - return -1, nil, fmt.Errorf("error while parsing precision: %w", err) - } - r := rune(formatStr[i]) - i++ - switch r { - case 's': - return i, callback.String, nil - case 'd': - return i, callback.Decimal, nil - case 'f': - return i, callback.Fixed(precision), nil - case 'e': - return i, callback.Scientific(precision), nil - case 'b': - return i, callback.Binary, nil - case 'x', 'X': - return i, callback.Hex(unicode.IsUpper(r)), nil - case 'o': - return i, callback.Octal, nil - default: - return -1, nil, fmt.Errorf("unrecognized formatting clause \"%c\"", r) - } -} - -func parsePrecision(formatStr string) (int, *int, error) { - i := 0 - if formatStr[i] != '.' { - return i, nil, nil - } - i++ - var buffer strings.Builder - for { - if i >= len(formatStr) { - return -1, nil, errors.New("could not find end of precision specifier") - } - if !isASCIIDigit(rune(formatStr[i])) { - break - } - buffer.WriteByte(formatStr[i]) - i++ - } - precision, err := strconv.Atoi(buffer.String()) - if err != nil { - return -1, nil, fmt.Errorf("error while converting precision to integer: %w", err) - } - return i, &precision, nil -} - -func isASCIIDigit(r rune) bool { - return r <= unicode.MaxASCII && unicode.IsDigit(r) -} diff --git a/vendor/github.com/google/cel-go/interpreter/interpretable.go b/vendor/github.com/google/cel-go/interpreter/interpretable.go index c4598dfa73b..56123840747 100644 --- a/vendor/github.com/google/cel-go/interpreter/interpretable.go +++ b/vendor/github.com/google/cel-go/interpreter/interpretable.go @@ -125,7 +125,7 @@ func (test *evalTestOnly) Eval(ctx Activation) ref.Val { val, err := test.Resolve(ctx) // Return an error if the resolve step fails if err != nil { - return types.WrapErr(err) + return types.LabelErrNode(test.id, types.WrapErr(err)) } if optVal, isOpt := val.(*types.Optional); isOpt { return types.Bool(optVal.HasValue()) @@ -231,6 +231,7 @@ func (or *evalOr) Eval(ctx Activation) ref.Val { } else { err = types.MaybeNoSuchOverloadErr(val) } + err = types.LabelErrNode(or.id, err) } } } @@ -273,6 +274,7 @@ func (and *evalAnd) Eval(ctx Activation) ref.Val { } else { err = types.MaybeNoSuchOverloadErr(val) } + err = types.LabelErrNode(and.id, err) } } } @@ -377,7 +379,7 @@ func (zero *evalZeroArity) ID() int64 { // Eval implements the Interpretable interface method. func (zero *evalZeroArity) Eval(ctx Activation) ref.Val { - return zero.impl() + return types.LabelErrNode(zero.id, zero.impl()) } // Function implements the InterpretableCall interface method. @@ -421,14 +423,14 @@ func (un *evalUnary) Eval(ctx Activation) ref.Val { // If the implementation is bound and the argument value has the right traits required to // invoke it, then call the implementation. if un.impl != nil && (un.trait == 0 || (!strict && types.IsUnknownOrError(argVal)) || argVal.Type().HasTrait(un.trait)) { - return un.impl(argVal) + return types.LabelErrNode(un.id, un.impl(argVal)) } // Otherwise, if the argument is a ReceiverType attempt to invoke the receiver method on the // operand (arg0). if argVal.Type().HasTrait(traits.ReceiverType) { - return argVal.(traits.Receiver).Receive(un.function, un.overload, []ref.Val{}) + return types.LabelErrNode(un.id, argVal.(traits.Receiver).Receive(un.function, un.overload, []ref.Val{})) } - return types.NewErr("no such overload: %s", un.function) + return types.NewErrWithNodeID(un.id, "no such overload: %s", un.function) } // Function implements the InterpretableCall interface method. @@ -479,14 +481,14 @@ func (bin *evalBinary) Eval(ctx Activation) ref.Val { // If the implementation is bound and the argument value has the right traits required to // invoke it, then call the implementation. if bin.impl != nil && (bin.trait == 0 || (!strict && types.IsUnknownOrError(lVal)) || lVal.Type().HasTrait(bin.trait)) { - return bin.impl(lVal, rVal) + return types.LabelErrNode(bin.id, bin.impl(lVal, rVal)) } // Otherwise, if the argument is a ReceiverType attempt to invoke the receiver method on the // operand (arg0). if lVal.Type().HasTrait(traits.ReceiverType) { - return lVal.(traits.Receiver).Receive(bin.function, bin.overload, []ref.Val{rVal}) + return types.LabelErrNode(bin.id, lVal.(traits.Receiver).Receive(bin.function, bin.overload, []ref.Val{rVal})) } - return types.NewErr("no such overload: %s", bin.function) + return types.NewErrWithNodeID(bin.id, "no such overload: %s", bin.function) } // Function implements the InterpretableCall interface method. @@ -545,14 +547,14 @@ func (fn *evalVarArgs) Eval(ctx Activation) ref.Val { // invoke it, then call the implementation. arg0 := argVals[0] if fn.impl != nil && (fn.trait == 0 || (!strict && types.IsUnknownOrError(arg0)) || arg0.Type().HasTrait(fn.trait)) { - return fn.impl(argVals...) + return types.LabelErrNode(fn.id, fn.impl(argVals...)) } // Otherwise, if the argument is a ReceiverType attempt to invoke the receiver method on the // operand (arg0). if arg0.Type().HasTrait(traits.ReceiverType) { - return arg0.(traits.Receiver).Receive(fn.function, fn.overload, argVals[1:]) + return types.LabelErrNode(fn.id, arg0.(traits.Receiver).Receive(fn.function, fn.overload, argVals[1:])) } - return types.NewErr("no such overload: %s", fn.function) + return types.NewErrWithNodeID(fn.id, "no such overload: %s %d", fn.function, fn.id) } // Function implements the InterpretableCall interface method. @@ -595,7 +597,7 @@ func (l *evalList) Eval(ctx Activation) ref.Val { if l.hasOptionals && l.optionals[i] { optVal, ok := elemVal.(*types.Optional) if !ok { - return invalidOptionalElementInit(elemVal) + return types.LabelErrNode(l.id, invalidOptionalElementInit(elemVal)) } if !optVal.HasValue() { continue @@ -645,7 +647,7 @@ func (m *evalMap) Eval(ctx Activation) ref.Val { if m.hasOptionals && m.optionals[i] { optVal, ok := valVal.(*types.Optional) if !ok { - return invalidOptionalEntryInit(keyVal, valVal) + return types.LabelErrNode(m.id, invalidOptionalEntryInit(keyVal, valVal)) } if !optVal.HasValue() { delete(entries, keyVal) @@ -705,7 +707,7 @@ func (o *evalObj) Eval(ctx Activation) ref.Val { if o.hasOptionals && o.optionals[i] { optVal, ok := val.(*types.Optional) if !ok { - return invalidOptionalEntryInit(field, val) + return types.LabelErrNode(o.id, invalidOptionalEntryInit(field, val)) } if !optVal.HasValue() { delete(fieldVals, field) @@ -715,7 +717,7 @@ func (o *evalObj) Eval(ctx Activation) ref.Val { } fieldVals[field] = val } - return o.provider.NewValue(o.typeName, fieldVals) + return types.LabelErrNode(o.id, o.provider.NewValue(o.typeName, fieldVals)) } func (o *evalObj) InitVals() []Interpretable { @@ -921,7 +923,7 @@ func (e *evalWatchConstQual) Qualify(vars Activation, obj any) (any, error) { out, err := e.ConstantQualifier.Qualify(vars, obj) var val ref.Val if err != nil { - val = types.WrapErr(err) + val = types.LabelErrNode(e.ID(), types.WrapErr(err)) } else { val = e.adapter.NativeToValue(out) } @@ -934,7 +936,7 @@ func (e *evalWatchConstQual) QualifyIfPresent(vars Activation, obj any, presence out, present, err := e.ConstantQualifier.QualifyIfPresent(vars, obj, presenceOnly) var val ref.Val if err != nil { - val = types.WrapErr(err) + val = types.LabelErrNode(e.ID(), types.WrapErr(err)) } else if out != nil { val = e.adapter.NativeToValue(out) } else if presenceOnly { @@ -964,7 +966,7 @@ func (e *evalWatchAttrQual) Qualify(vars Activation, obj any) (any, error) { out, err := e.Attribute.Qualify(vars, obj) var val ref.Val if err != nil { - val = types.WrapErr(err) + val = types.LabelErrNode(e.ID(), types.WrapErr(err)) } else { val = e.adapter.NativeToValue(out) } @@ -977,7 +979,7 @@ func (e *evalWatchAttrQual) QualifyIfPresent(vars Activation, obj any, presenceO out, present, err := e.Attribute.QualifyIfPresent(vars, obj, presenceOnly) var val ref.Val if err != nil { - val = types.WrapErr(err) + val = types.LabelErrNode(e.ID(), types.WrapErr(err)) } else if out != nil { val = e.adapter.NativeToValue(out) } else if presenceOnly { @@ -1001,7 +1003,7 @@ func (e *evalWatchQual) Qualify(vars Activation, obj any) (any, error) { out, err := e.Qualifier.Qualify(vars, obj) var val ref.Val if err != nil { - val = types.WrapErr(err) + val = types.LabelErrNode(e.ID(), types.WrapErr(err)) } else { val = e.adapter.NativeToValue(out) } @@ -1014,7 +1016,7 @@ func (e *evalWatchQual) QualifyIfPresent(vars Activation, obj any, presenceOnly out, present, err := e.Qualifier.QualifyIfPresent(vars, obj, presenceOnly) var val ref.Val if err != nil { - val = types.WrapErr(err) + val = types.LabelErrNode(e.ID(), types.WrapErr(err)) } else if out != nil { val = e.adapter.NativeToValue(out) } else if presenceOnly { @@ -1157,12 +1159,12 @@ func (cond *evalExhaustiveConditional) Eval(ctx Activation) ref.Val { } if cBool { if tErr != nil { - return types.WrapErr(tErr) + return types.LabelErrNode(cond.id, types.WrapErr(tErr)) } return cond.adapter.NativeToValue(tVal) } if fErr != nil { - return types.WrapErr(fErr) + return types.LabelErrNode(cond.id, types.WrapErr(fErr)) } return cond.adapter.NativeToValue(fVal) } @@ -1202,7 +1204,7 @@ func (a *evalAttr) Adapter() types.Adapter { func (a *evalAttr) Eval(ctx Activation) ref.Val { v, err := a.attr.Resolve(ctx) if err != nil { - return types.WrapErr(err) + return types.LabelErrNode(a.ID(), types.WrapErr(err)) } return a.adapter.NativeToValue(v) } diff --git a/vendor/github.com/google/cel-go/interpreter/interpreter.go b/vendor/github.com/google/cel-go/interpreter/interpreter.go index 00fc74732c6..0aca74d88b9 100644 --- a/vendor/github.com/google/cel-go/interpreter/interpreter.go +++ b/vendor/github.com/google/cel-go/interpreter/interpreter.go @@ -22,19 +22,13 @@ import ( "github.com/google/cel-go/common/containers" "github.com/google/cel-go/common/types" "github.com/google/cel-go/common/types/ref" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" ) // Interpreter generates a new Interpretable from a checked or unchecked expression. type Interpreter interface { // NewInterpretable creates an Interpretable from a checked expression and an // optional list of InterpretableDecorator values. - NewInterpretable(checked *ast.CheckedAST, decorators ...InterpretableDecorator) (Interpretable, error) - - // NewUncheckedInterpretable returns an Interpretable from a parsed expression - // and an optional list of InterpretableDecorator values. - NewUncheckedInterpretable(expr *exprpb.Expr, decorators ...InterpretableDecorator) (Interpretable, error) + NewInterpretable(exprAST *ast.AST, decorators ...InterpretableDecorator) (Interpretable, error) } // EvalObserver is a functional interface that accepts an expression id and an observed value. @@ -177,7 +171,7 @@ func NewInterpreter(dispatcher Dispatcher, // NewIntepretable implements the Interpreter interface method. func (i *exprInterpreter) NewInterpretable( - checked *ast.CheckedAST, + checked *ast.AST, decorators ...InterpretableDecorator) (Interpretable, error) { p := newPlanner( i.dispatcher, @@ -187,19 +181,5 @@ func (i *exprInterpreter) NewInterpretable( i.container, checked, decorators...) - return p.Plan(checked.Expr) -} - -// NewUncheckedIntepretable implements the Interpreter interface method. -func (i *exprInterpreter) NewUncheckedInterpretable( - expr *exprpb.Expr, - decorators ...InterpretableDecorator) (Interpretable, error) { - p := newUncheckedPlanner( - i.dispatcher, - i.provider, - i.adapter, - i.attrFactory, - i.container, - decorators...) - return p.Plan(expr) + return p.Plan(checked.Expr()) } diff --git a/vendor/github.com/google/cel-go/interpreter/planner.go b/vendor/github.com/google/cel-go/interpreter/planner.go index 757cd080e5c..cf371f95d51 100644 --- a/vendor/github.com/google/cel-go/interpreter/planner.go +++ b/vendor/github.com/google/cel-go/interpreter/planner.go @@ -23,15 +23,12 @@ import ( "github.com/google/cel-go/common/functions" "github.com/google/cel-go/common/operators" "github.com/google/cel-go/common/types" - "github.com/google/cel-go/common/types/ref" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" ) // interpretablePlanner creates an Interpretable evaluation plan from a proto Expr value. type interpretablePlanner interface { // Plan generates an Interpretable value (or error) from the input proto Expr. - Plan(expr *exprpb.Expr) (Interpretable, error) + Plan(expr ast.Expr) (Interpretable, error) } // newPlanner creates an interpretablePlanner which references a Dispatcher, TypeProvider, @@ -43,28 +40,7 @@ func newPlanner(disp Dispatcher, adapter types.Adapter, attrFactory AttributeFactory, cont *containers.Container, - checked *ast.CheckedAST, - decorators ...InterpretableDecorator) interpretablePlanner { - return &planner{ - disp: disp, - provider: provider, - adapter: adapter, - attrFactory: attrFactory, - container: cont, - refMap: checked.ReferenceMap, - typeMap: checked.TypeMap, - decorators: decorators, - } -} - -// newUncheckedPlanner creates an interpretablePlanner which references a Dispatcher, TypeProvider, -// TypeAdapter, and Container to resolve functions and types at plan time. Namespaces present in -// Select expressions are resolved lazily at evaluation time. -func newUncheckedPlanner(disp Dispatcher, - provider types.Provider, - adapter types.Adapter, - attrFactory AttributeFactory, - cont *containers.Container, + exprAST *ast.AST, decorators ...InterpretableDecorator) interpretablePlanner { return &planner{ disp: disp, @@ -72,8 +48,8 @@ func newUncheckedPlanner(disp Dispatcher, adapter: adapter, attrFactory: attrFactory, container: cont, - refMap: make(map[int64]*ast.ReferenceInfo), - typeMap: make(map[int64]*types.Type), + refMap: exprAST.ReferenceMap(), + typeMap: exprAST.TypeMap(), decorators: decorators, } } @@ -95,22 +71,24 @@ type planner struct { // useful for layering functionality into the evaluation that is not natively understood by CEL, // such as state-tracking, expression re-write, and possibly efficient thread-safe memoization of // repeated expressions. -func (p *planner) Plan(expr *exprpb.Expr) (Interpretable, error) { - switch expr.GetExprKind().(type) { - case *exprpb.Expr_CallExpr: +func (p *planner) Plan(expr ast.Expr) (Interpretable, error) { + switch expr.Kind() { + case ast.CallKind: return p.decorate(p.planCall(expr)) - case *exprpb.Expr_IdentExpr: + case ast.IdentKind: return p.decorate(p.planIdent(expr)) - case *exprpb.Expr_SelectExpr: + case ast.LiteralKind: + return p.decorate(p.planConst(expr)) + case ast.SelectKind: return p.decorate(p.planSelect(expr)) - case *exprpb.Expr_ListExpr: + case ast.ListKind: return p.decorate(p.planCreateList(expr)) - case *exprpb.Expr_StructExpr: + case ast.MapKind: + return p.decorate(p.planCreateMap(expr)) + case ast.StructKind: return p.decorate(p.planCreateStruct(expr)) - case *exprpb.Expr_ComprehensionExpr: + case ast.ComprehensionKind: return p.decorate(p.planComprehension(expr)) - case *exprpb.Expr_ConstExpr: - return p.decorate(p.planConst(expr)) } return nil, fmt.Errorf("unsupported expr: %v", expr) } @@ -132,16 +110,16 @@ func (p *planner) decorate(i Interpretable, err error) (Interpretable, error) { } // planIdent creates an Interpretable that resolves an identifier from an Activation. -func (p *planner) planIdent(expr *exprpb.Expr) (Interpretable, error) { +func (p *planner) planIdent(expr ast.Expr) (Interpretable, error) { // Establish whether the identifier is in the reference map. - if identRef, found := p.refMap[expr.GetId()]; found { - return p.planCheckedIdent(expr.GetId(), identRef) + if identRef, found := p.refMap[expr.ID()]; found { + return p.planCheckedIdent(expr.ID(), identRef) } // Create the possible attribute list for the unresolved reference. - ident := expr.GetIdentExpr() + ident := expr.AsIdent() return &evalAttr{ adapter: p.adapter, - attr: p.attrFactory.MaybeAttribute(expr.GetId(), ident.Name), + attr: p.attrFactory.MaybeAttribute(expr.ID(), ident), }, nil } @@ -174,20 +152,20 @@ func (p *planner) planCheckedIdent(id int64, identRef *ast.ReferenceInfo) (Inter // a) selects a field from a map or proto. // b) creates a field presence test for a select within a has() macro. // c) resolves the select expression to a namespaced identifier. -func (p *planner) planSelect(expr *exprpb.Expr) (Interpretable, error) { +func (p *planner) planSelect(expr ast.Expr) (Interpretable, error) { // If the Select id appears in the reference map from the CheckedExpr proto then it is either // a namespaced identifier or enum value. - if identRef, found := p.refMap[expr.GetId()]; found { - return p.planCheckedIdent(expr.GetId(), identRef) + if identRef, found := p.refMap[expr.ID()]; found { + return p.planCheckedIdent(expr.ID(), identRef) } - sel := expr.GetSelectExpr() + sel := expr.AsSelect() // Plan the operand evaluation. - op, err := p.Plan(sel.GetOperand()) + op, err := p.Plan(sel.Operand()) if err != nil { return nil, err } - opType := p.typeMap[sel.GetOperand().GetId()] + opType := p.typeMap[sel.Operand().ID()] // If the Select was marked TestOnly, this is a presence test. // @@ -211,14 +189,14 @@ func (p *planner) planSelect(expr *exprpb.Expr) (Interpretable, error) { } // Build a qualifier for the attribute. - qual, err := p.attrFactory.NewQualifier(opType, expr.GetId(), sel.GetField(), false) + qual, err := p.attrFactory.NewQualifier(opType, expr.ID(), sel.FieldName(), false) if err != nil { return nil, err } // Modify the attribute to be test-only. - if sel.GetTestOnly() { + if sel.IsTestOnly() { attr = &evalTestOnly{ - id: expr.GetId(), + id: expr.ID(), InterpretableAttribute: attr, } } @@ -230,10 +208,10 @@ func (p *planner) planSelect(expr *exprpb.Expr) (Interpretable, error) { // planCall creates a callable Interpretable while specializing for common functions and invocation // patterns. Specifically, conditional operators &&, ||, ?:, and (in)equality functions result in // optimized Interpretable values. -func (p *planner) planCall(expr *exprpb.Expr) (Interpretable, error) { - call := expr.GetCallExpr() +func (p *planner) planCall(expr ast.Expr) (Interpretable, error) { + call := expr.AsCall() target, fnName, oName := p.resolveFunction(expr) - argCount := len(call.GetArgs()) + argCount := len(call.Args()) var offset int if target != nil { argCount++ @@ -248,7 +226,7 @@ func (p *planner) planCall(expr *exprpb.Expr) (Interpretable, error) { } args[0] = arg } - for i, argExpr := range call.GetArgs() { + for i, argExpr := range call.Args() { arg, err := p.Plan(argExpr) if err != nil { return nil, err @@ -307,7 +285,7 @@ func (p *planner) planCall(expr *exprpb.Expr) (Interpretable, error) { } // planCallZero generates a zero-arity callable Interpretable. -func (p *planner) planCallZero(expr *exprpb.Expr, +func (p *planner) planCallZero(expr ast.Expr, function string, overload string, impl *functions.Overload) (Interpretable, error) { @@ -315,7 +293,7 @@ func (p *planner) planCallZero(expr *exprpb.Expr, return nil, fmt.Errorf("no such overload: %s()", function) } return &evalZeroArity{ - id: expr.GetId(), + id: expr.ID(), function: function, overload: overload, impl: impl.Function, @@ -323,7 +301,7 @@ func (p *planner) planCallZero(expr *exprpb.Expr, } // planCallUnary generates a unary callable Interpretable. -func (p *planner) planCallUnary(expr *exprpb.Expr, +func (p *planner) planCallUnary(expr ast.Expr, function string, overload string, impl *functions.Overload, @@ -340,7 +318,7 @@ func (p *planner) planCallUnary(expr *exprpb.Expr, nonStrict = impl.NonStrict } return &evalUnary{ - id: expr.GetId(), + id: expr.ID(), function: function, overload: overload, arg: args[0], @@ -351,7 +329,7 @@ func (p *planner) planCallUnary(expr *exprpb.Expr, } // planCallBinary generates a binary callable Interpretable. -func (p *planner) planCallBinary(expr *exprpb.Expr, +func (p *planner) planCallBinary(expr ast.Expr, function string, overload string, impl *functions.Overload, @@ -368,7 +346,7 @@ func (p *planner) planCallBinary(expr *exprpb.Expr, nonStrict = impl.NonStrict } return &evalBinary{ - id: expr.GetId(), + id: expr.ID(), function: function, overload: overload, lhs: args[0], @@ -380,7 +358,7 @@ func (p *planner) planCallBinary(expr *exprpb.Expr, } // planCallVarArgs generates a variable argument callable Interpretable. -func (p *planner) planCallVarArgs(expr *exprpb.Expr, +func (p *planner) planCallVarArgs(expr ast.Expr, function string, overload string, impl *functions.Overload, @@ -397,7 +375,7 @@ func (p *planner) planCallVarArgs(expr *exprpb.Expr, nonStrict = impl.NonStrict } return &evalVarArgs{ - id: expr.GetId(), + id: expr.ID(), function: function, overload: overload, args: args, @@ -408,41 +386,41 @@ func (p *planner) planCallVarArgs(expr *exprpb.Expr, } // planCallEqual generates an equals (==) Interpretable. -func (p *planner) planCallEqual(expr *exprpb.Expr, args []Interpretable) (Interpretable, error) { +func (p *planner) planCallEqual(expr ast.Expr, args []Interpretable) (Interpretable, error) { return &evalEq{ - id: expr.GetId(), + id: expr.ID(), lhs: args[0], rhs: args[1], }, nil } // planCallNotEqual generates a not equals (!=) Interpretable. -func (p *planner) planCallNotEqual(expr *exprpb.Expr, args []Interpretable) (Interpretable, error) { +func (p *planner) planCallNotEqual(expr ast.Expr, args []Interpretable) (Interpretable, error) { return &evalNe{ - id: expr.GetId(), + id: expr.ID(), lhs: args[0], rhs: args[1], }, nil } // planCallLogicalAnd generates a logical and (&&) Interpretable. -func (p *planner) planCallLogicalAnd(expr *exprpb.Expr, args []Interpretable) (Interpretable, error) { +func (p *planner) planCallLogicalAnd(expr ast.Expr, args []Interpretable) (Interpretable, error) { return &evalAnd{ - id: expr.GetId(), + id: expr.ID(), terms: args, }, nil } // planCallLogicalOr generates a logical or (||) Interpretable. -func (p *planner) planCallLogicalOr(expr *exprpb.Expr, args []Interpretable) (Interpretable, error) { +func (p *planner) planCallLogicalOr(expr ast.Expr, args []Interpretable) (Interpretable, error) { return &evalOr{ - id: expr.GetId(), + id: expr.ID(), terms: args, }, nil } // planCallConditional generates a conditional / ternary (c ? t : f) Interpretable. -func (p *planner) planCallConditional(expr *exprpb.Expr, args []Interpretable) (Interpretable, error) { +func (p *planner) planCallConditional(expr ast.Expr, args []Interpretable) (Interpretable, error) { cond := args[0] t := args[1] var tAttr Attribute @@ -464,13 +442,13 @@ func (p *planner) planCallConditional(expr *exprpb.Expr, args []Interpretable) ( return &evalAttr{ adapter: p.adapter, - attr: p.attrFactory.ConditionalAttribute(expr.GetId(), cond, tAttr, fAttr), + attr: p.attrFactory.ConditionalAttribute(expr.ID(), cond, tAttr, fAttr), }, nil } // planCallIndex either extends an attribute with the argument to the index operation, or creates // a relative attribute based on the return of a function call or operation. -func (p *planner) planCallIndex(expr *exprpb.Expr, args []Interpretable, optional bool) (Interpretable, error) { +func (p *planner) planCallIndex(expr ast.Expr, args []Interpretable, optional bool) (Interpretable, error) { op := args[0] ind := args[1] opType := p.typeMap[op.ID()] @@ -489,11 +467,11 @@ func (p *planner) planCallIndex(expr *exprpb.Expr, args []Interpretable, optiona var qual Qualifier switch ind := ind.(type) { case InterpretableConst: - qual, err = p.attrFactory.NewQualifier(opType, expr.GetId(), ind.Value(), optional) + qual, err = p.attrFactory.NewQualifier(opType, expr.ID(), ind.Value(), optional) case InterpretableAttribute: - qual, err = p.attrFactory.NewQualifier(opType, expr.GetId(), ind, optional) + qual, err = p.attrFactory.NewQualifier(opType, expr.ID(), ind, optional) default: - qual, err = p.relativeAttr(expr.GetId(), ind, optional) + qual, err = p.relativeAttr(expr.ID(), ind, optional) } if err != nil { return nil, err @@ -505,10 +483,10 @@ func (p *planner) planCallIndex(expr *exprpb.Expr, args []Interpretable, optiona } // planCreateList generates a list construction Interpretable. -func (p *planner) planCreateList(expr *exprpb.Expr) (Interpretable, error) { - list := expr.GetListExpr() - optionalIndices := list.GetOptionalIndices() - elements := list.GetElements() +func (p *planner) planCreateList(expr ast.Expr) (Interpretable, error) { + list := expr.AsList() + optionalIndices := list.OptionalIndices() + elements := list.Elements() optionals := make([]bool, len(elements)) for _, index := range optionalIndices { if index < 0 || index >= int32(len(elements)) { @@ -525,7 +503,7 @@ func (p *planner) planCreateList(expr *exprpb.Expr) (Interpretable, error) { elems[i] = elemVal } return &evalList{ - id: expr.GetId(), + id: expr.ID(), elems: elems, optionals: optionals, hasOptionals: len(optionals) != 0, @@ -534,31 +512,29 @@ func (p *planner) planCreateList(expr *exprpb.Expr) (Interpretable, error) { } // planCreateStruct generates a map or object construction Interpretable. -func (p *planner) planCreateStruct(expr *exprpb.Expr) (Interpretable, error) { - str := expr.GetStructExpr() - if len(str.MessageName) != 0 { - return p.planCreateObj(expr) - } - entries := str.GetEntries() +func (p *planner) planCreateMap(expr ast.Expr) (Interpretable, error) { + m := expr.AsMap() + entries := m.Entries() optionals := make([]bool, len(entries)) keys := make([]Interpretable, len(entries)) vals := make([]Interpretable, len(entries)) - for i, entry := range entries { - keyVal, err := p.Plan(entry.GetMapKey()) + for i, e := range entries { + entry := e.AsMapEntry() + keyVal, err := p.Plan(entry.Key()) if err != nil { return nil, err } keys[i] = keyVal - valVal, err := p.Plan(entry.GetValue()) + valVal, err := p.Plan(entry.Value()) if err != nil { return nil, err } vals[i] = valVal - optionals[i] = entry.GetOptionalEntry() + optionals[i] = entry.IsOptional() } return &evalMap{ - id: expr.GetId(), + id: expr.ID(), keys: keys, vals: vals, optionals: optionals, @@ -568,27 +544,28 @@ func (p *planner) planCreateStruct(expr *exprpb.Expr) (Interpretable, error) { } // planCreateObj generates an object construction Interpretable. -func (p *planner) planCreateObj(expr *exprpb.Expr) (Interpretable, error) { - obj := expr.GetStructExpr() - typeName, defined := p.resolveTypeName(obj.GetMessageName()) +func (p *planner) planCreateStruct(expr ast.Expr) (Interpretable, error) { + obj := expr.AsStruct() + typeName, defined := p.resolveTypeName(obj.TypeName()) if !defined { - return nil, fmt.Errorf("unknown type: %s", obj.GetMessageName()) - } - entries := obj.GetEntries() - optionals := make([]bool, len(entries)) - fields := make([]string, len(entries)) - vals := make([]Interpretable, len(entries)) - for i, entry := range entries { - fields[i] = entry.GetFieldKey() - val, err := p.Plan(entry.GetValue()) + return nil, fmt.Errorf("unknown type: %s", obj.TypeName()) + } + objFields := obj.Fields() + optionals := make([]bool, len(objFields)) + fields := make([]string, len(objFields)) + vals := make([]Interpretable, len(objFields)) + for i, f := range objFields { + field := f.AsStructField() + fields[i] = field.Name() + val, err := p.Plan(field.Value()) if err != nil { return nil, err } vals[i] = val - optionals[i] = entry.GetOptionalEntry() + optionals[i] = field.IsOptional() } return &evalObj{ - id: expr.GetId(), + id: expr.ID(), typeName: typeName, fields: fields, vals: vals, @@ -599,33 +576,33 @@ func (p *planner) planCreateObj(expr *exprpb.Expr) (Interpretable, error) { } // planComprehension generates an Interpretable fold operation. -func (p *planner) planComprehension(expr *exprpb.Expr) (Interpretable, error) { - fold := expr.GetComprehensionExpr() - accu, err := p.Plan(fold.GetAccuInit()) +func (p *planner) planComprehension(expr ast.Expr) (Interpretable, error) { + fold := expr.AsComprehension() + accu, err := p.Plan(fold.AccuInit()) if err != nil { return nil, err } - iterRange, err := p.Plan(fold.GetIterRange()) + iterRange, err := p.Plan(fold.IterRange()) if err != nil { return nil, err } - cond, err := p.Plan(fold.GetLoopCondition()) + cond, err := p.Plan(fold.LoopCondition()) if err != nil { return nil, err } - step, err := p.Plan(fold.GetLoopStep()) + step, err := p.Plan(fold.LoopStep()) if err != nil { return nil, err } - result, err := p.Plan(fold.GetResult()) + result, err := p.Plan(fold.Result()) if err != nil { return nil, err } return &evalFold{ - id: expr.GetId(), - accuVar: fold.AccuVar, + id: expr.ID(), + accuVar: fold.AccuVar(), accu: accu, - iterVar: fold.IterVar, + iterVar: fold.IterVar(), iterRange: iterRange, cond: cond, step: step, @@ -635,37 +612,8 @@ func (p *planner) planComprehension(expr *exprpb.Expr) (Interpretable, error) { } // planConst generates a constant valued Interpretable. -func (p *planner) planConst(expr *exprpb.Expr) (Interpretable, error) { - val, err := p.constValue(expr.GetConstExpr()) - if err != nil { - return nil, err - } - return NewConstValue(expr.GetId(), val), nil -} - -// constValue converts a proto Constant value to a ref.Val. -func (p *planner) constValue(c *exprpb.Constant) (ref.Val, error) { - switch c.GetConstantKind().(type) { - case *exprpb.Constant_BoolValue: - return p.adapter.NativeToValue(c.GetBoolValue()), nil - case *exprpb.Constant_BytesValue: - return p.adapter.NativeToValue(c.GetBytesValue()), nil - case *exprpb.Constant_DoubleValue: - return p.adapter.NativeToValue(c.GetDoubleValue()), nil - case *exprpb.Constant_DurationValue: - return p.adapter.NativeToValue(c.GetDurationValue().AsDuration()), nil - case *exprpb.Constant_Int64Value: - return p.adapter.NativeToValue(c.GetInt64Value()), nil - case *exprpb.Constant_NullValue: - return p.adapter.NativeToValue(c.GetNullValue()), nil - case *exprpb.Constant_StringValue: - return p.adapter.NativeToValue(c.GetStringValue()), nil - case *exprpb.Constant_TimestampValue: - return p.adapter.NativeToValue(c.GetTimestampValue().AsTime()), nil - case *exprpb.Constant_Uint64Value: - return p.adapter.NativeToValue(c.GetUint64Value()), nil - } - return nil, fmt.Errorf("unknown constant type: %v", c) +func (p *planner) planConst(expr ast.Expr) (Interpretable, error) { + return NewConstValue(expr.ID(), expr.AsLiteral()), nil } // resolveTypeName takes a qualified string constructed at parse time, applies the proto @@ -687,17 +635,20 @@ func (p *planner) resolveTypeName(typeName string) (string, bool) { // - The target expression may only consist of ident and select expressions. // - The function is declared in the environment using its fully-qualified name. // - The fully-qualified function name matches the string serialized target value. -func (p *planner) resolveFunction(expr *exprpb.Expr) (*exprpb.Expr, string, string) { +func (p *planner) resolveFunction(expr ast.Expr) (ast.Expr, string, string) { // Note: similar logic exists within the `checker/checker.go`. If making changes here // please consider the impact on checker.go and consolidate implementations or mirror code // as appropriate. - call := expr.GetCallExpr() - target := call.GetTarget() - fnName := call.GetFunction() + call := expr.AsCall() + var target ast.Expr = nil + if call.IsMemberFunction() { + target = call.Target() + } + fnName := call.FunctionName() // Checked expressions always have a reference map entry, and _should_ have the fully qualified // function name as the fnName value. - oRef, hasOverload := p.refMap[expr.GetId()] + oRef, hasOverload := p.refMap[expr.ID()] if hasOverload { if len(oRef.OverloadIDs) == 1 { return target, fnName, oRef.OverloadIDs[0] @@ -771,16 +722,30 @@ func (p *planner) relativeAttr(id int64, eval Interpretable, opt bool) (Interpre // toQualifiedName converts an expression AST into a qualified name if possible, with a boolean // 'found' value that indicates if the conversion is successful. -func (p *planner) toQualifiedName(operand *exprpb.Expr) (string, bool) { +func (p *planner) toQualifiedName(operand ast.Expr) (string, bool) { // If the checker identified the expression as an attribute by the type-checker, then it can't // possibly be part of qualified name in a namespace. - _, isAttr := p.refMap[operand.GetId()] + _, isAttr := p.refMap[operand.ID()] if isAttr { return "", false } // Since functions cannot be both namespaced and receiver functions, if the operand is not an // qualified variable name, return the (possibly) qualified name given the expressions. - return containers.ToQualifiedName(operand) + switch operand.Kind() { + case ast.IdentKind: + id := operand.AsIdent() + return id, true + case ast.SelectKind: + sel := operand.AsSelect() + // Test only expressions are not valid as qualified names. + if sel.IsTestOnly() { + return "", false + } + if qual, found := p.toQualifiedName(sel.Operand()); found { + return qual + "." + sel.FieldName(), true + } + } + return "", false } func stripLeadingDot(name string) string { diff --git a/vendor/github.com/google/cel-go/interpreter/prune.go b/vendor/github.com/google/cel-go/interpreter/prune.go index b8834b1cb85..410d80dc43c 100644 --- a/vendor/github.com/google/cel-go/interpreter/prune.go +++ b/vendor/github.com/google/cel-go/interpreter/prune.go @@ -15,19 +15,18 @@ package interpreter import ( + "github.com/google/cel-go/common/ast" "github.com/google/cel-go/common/operators" "github.com/google/cel-go/common/overloads" "github.com/google/cel-go/common/types" "github.com/google/cel-go/common/types/ref" "github.com/google/cel-go/common/types/traits" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" - structpb "google.golang.org/protobuf/types/known/structpb" ) type astPruner struct { - expr *exprpb.Expr - macroCalls map[int64]*exprpb.Expr + ast.ExprFactory + expr ast.Expr + macroCalls map[int64]ast.Expr state EvalState nextExprID int64 } @@ -67,84 +66,44 @@ type astPruner struct { // compiled and constant folded expressions, but is not willing to constant // fold(and thus cache results of) some external calls, then they can prepare // the overloads accordingly. -func PruneAst(expr *exprpb.Expr, macroCalls map[int64]*exprpb.Expr, state EvalState) *exprpb.ParsedExpr { +func PruneAst(expr ast.Expr, macroCalls map[int64]ast.Expr, state EvalState) *ast.AST { pruneState := NewEvalState() for _, id := range state.IDs() { v, _ := state.Value(id) pruneState.SetValue(id, v) } pruner := &astPruner{ - expr: expr, - macroCalls: macroCalls, - state: pruneState, - nextExprID: getMaxID(expr)} + ExprFactory: ast.NewExprFactory(), + expr: expr, + macroCalls: macroCalls, + state: pruneState, + nextExprID: getMaxID(expr)} newExpr, _ := pruner.maybePrune(expr) - return &exprpb.ParsedExpr{ - Expr: newExpr, - SourceInfo: &exprpb.SourceInfo{MacroCalls: pruner.macroCalls}, - } -} - -func (p *astPruner) createLiteral(id int64, val *exprpb.Constant) *exprpb.Expr { - return &exprpb.Expr{ - Id: id, - ExprKind: &exprpb.Expr_ConstExpr{ - ConstExpr: val, - }, + newInfo := ast.NewSourceInfo(nil) + for id, call := range pruner.macroCalls { + newInfo.SetMacroCall(id, call) } + return ast.NewAST(newExpr, newInfo) } -func (p *astPruner) maybeCreateLiteral(id int64, val ref.Val) (*exprpb.Expr, bool) { +func (p *astPruner) maybeCreateLiteral(id int64, val ref.Val) (ast.Expr, bool) { switch v := val.(type) { - case types.Bool: - p.state.SetValue(id, val) - return p.createLiteral(id, - &exprpb.Constant{ConstantKind: &exprpb.Constant_BoolValue{BoolValue: bool(v)}}), true - case types.Bytes: + case types.Bool, types.Bytes, types.Double, types.Int, types.Null, types.String, types.Uint: p.state.SetValue(id, val) - return p.createLiteral(id, - &exprpb.Constant{ConstantKind: &exprpb.Constant_BytesValue{BytesValue: []byte(v)}}), true - case types.Double: - p.state.SetValue(id, val) - return p.createLiteral(id, - &exprpb.Constant{ConstantKind: &exprpb.Constant_DoubleValue{DoubleValue: float64(v)}}), true + return p.NewLiteral(id, val), true case types.Duration: p.state.SetValue(id, val) - durationString := string(v.ConvertToType(types.StringType).(types.String)) - return &exprpb.Expr{ - Id: id, - ExprKind: &exprpb.Expr_CallExpr{ - CallExpr: &exprpb.Expr_Call{ - Function: overloads.TypeConvertDuration, - Args: []*exprpb.Expr{ - p.createLiteral(p.nextID(), - &exprpb.Constant{ConstantKind: &exprpb.Constant_StringValue{StringValue: durationString}}), - }, - }, - }, - }, true - case types.Int: - p.state.SetValue(id, val) - return p.createLiteral(id, - &exprpb.Constant{ConstantKind: &exprpb.Constant_Int64Value{Int64Value: int64(v)}}), true - case types.Uint: - p.state.SetValue(id, val) - return p.createLiteral(id, - &exprpb.Constant{ConstantKind: &exprpb.Constant_Uint64Value{Uint64Value: uint64(v)}}), true - case types.String: - p.state.SetValue(id, val) - return p.createLiteral(id, - &exprpb.Constant{ConstantKind: &exprpb.Constant_StringValue{StringValue: string(v)}}), true - case types.Null: - p.state.SetValue(id, val) - return p.createLiteral(id, - &exprpb.Constant{ConstantKind: &exprpb.Constant_NullValue{NullValue: v.Value().(structpb.NullValue)}}), true + durationString := v.ConvertToType(types.StringType).(types.String) + return p.NewCall(id, overloads.TypeConvertDuration, p.NewLiteral(p.nextID(), durationString)), true + case types.Timestamp: + timestampString := v.ConvertToType(types.StringType).(types.String) + return p.NewCall(id, overloads.TypeConvertTimestamp, p.NewLiteral(p.nextID(), timestampString)), true } // Attempt to build a list literal. if list, isList := val.(traits.Lister); isList { sz := list.Size().(types.Int) - elemExprs := make([]*exprpb.Expr, sz) + elemExprs := make([]ast.Expr, sz) for i := types.Int(0); i < sz; i++ { elem := list.Get(i) if types.IsUnknownOrError(elem) { @@ -157,20 +116,13 @@ func (p *astPruner) maybeCreateLiteral(id int64, val ref.Val) (*exprpb.Expr, boo elemExprs[i] = elemExpr } p.state.SetValue(id, val) - return &exprpb.Expr{ - Id: id, - ExprKind: &exprpb.Expr_ListExpr{ - ListExpr: &exprpb.Expr_CreateList{ - Elements: elemExprs, - }, - }, - }, true + return p.NewList(id, elemExprs, []int32{}), true } // Create a map literal if possible. if mp, isMap := val.(traits.Mapper); isMap { it := mp.Iterator() - entries := make([]*exprpb.Expr_CreateStruct_Entry, mp.Size().(types.Int)) + entries := make([]ast.EntryExpr, mp.Size().(types.Int)) i := 0 for it.HasNext() != types.False { key := it.Next() @@ -186,25 +138,12 @@ func (p *astPruner) maybeCreateLiteral(id int64, val ref.Val) (*exprpb.Expr, boo if !ok { return nil, false } - entry := &exprpb.Expr_CreateStruct_Entry{ - Id: p.nextID(), - KeyKind: &exprpb.Expr_CreateStruct_Entry_MapKey{ - MapKey: keyExpr, - }, - Value: valExpr, - } + entry := p.NewMapEntry(p.nextID(), keyExpr, valExpr, false) entries[i] = entry i++ } p.state.SetValue(id, val) - return &exprpb.Expr{ - Id: id, - ExprKind: &exprpb.Expr_StructExpr{ - StructExpr: &exprpb.Expr_CreateStruct{ - Entries: entries, - }, - }, - }, true + return p.NewMap(id, entries), true } // TODO(issues/377) To construct message literals, the type provider will need to support @@ -212,215 +151,206 @@ func (p *astPruner) maybeCreateLiteral(id int64, val ref.Val) (*exprpb.Expr, boo return nil, false } -func (p *astPruner) maybePruneOptional(elem *exprpb.Expr) (*exprpb.Expr, bool) { - elemVal, found := p.value(elem.GetId()) +func (p *astPruner) maybePruneOptional(elem ast.Expr) (ast.Expr, bool) { + elemVal, found := p.value(elem.ID()) if found && elemVal.Type() == types.OptionalType { opt := elemVal.(*types.Optional) if !opt.HasValue() { return nil, true } - if newElem, pruned := p.maybeCreateLiteral(elem.GetId(), opt.GetValue()); pruned { + if newElem, pruned := p.maybeCreateLiteral(elem.ID(), opt.GetValue()); pruned { return newElem, true } } return elem, false } -func (p *astPruner) maybePruneIn(node *exprpb.Expr) (*exprpb.Expr, bool) { +func (p *astPruner) maybePruneIn(node ast.Expr) (ast.Expr, bool) { // elem in list - call := node.GetCallExpr() - val, exists := p.maybeValue(call.GetArgs()[1].GetId()) + call := node.AsCall() + val, exists := p.maybeValue(call.Args()[1].ID()) if !exists { return nil, false } if sz, ok := val.(traits.Sizer); ok && sz.Size() == types.IntZero { - return p.maybeCreateLiteral(node.GetId(), types.False) + return p.maybeCreateLiteral(node.ID(), types.False) } return nil, false } -func (p *astPruner) maybePruneLogicalNot(node *exprpb.Expr) (*exprpb.Expr, bool) { - call := node.GetCallExpr() - arg := call.GetArgs()[0] - val, exists := p.maybeValue(arg.GetId()) +func (p *astPruner) maybePruneLogicalNot(node ast.Expr) (ast.Expr, bool) { + call := node.AsCall() + arg := call.Args()[0] + val, exists := p.maybeValue(arg.ID()) if !exists { return nil, false } if b, ok := val.(types.Bool); ok { - return p.maybeCreateLiteral(node.GetId(), !b) + return p.maybeCreateLiteral(node.ID(), !b) } return nil, false } -func (p *astPruner) maybePruneOr(node *exprpb.Expr) (*exprpb.Expr, bool) { - call := node.GetCallExpr() +func (p *astPruner) maybePruneOr(node ast.Expr) (ast.Expr, bool) { + call := node.AsCall() // We know result is unknown, so we have at least one unknown arg // and if one side is a known value, we know we can ignore it. - if v, exists := p.maybeValue(call.GetArgs()[0].GetId()); exists { + if v, exists := p.maybeValue(call.Args()[0].ID()); exists { if v == types.True { - return p.maybeCreateLiteral(node.GetId(), types.True) + return p.maybeCreateLiteral(node.ID(), types.True) } - return call.GetArgs()[1], true + return call.Args()[1], true } - if v, exists := p.maybeValue(call.GetArgs()[1].GetId()); exists { + if v, exists := p.maybeValue(call.Args()[1].ID()); exists { if v == types.True { - return p.maybeCreateLiteral(node.GetId(), types.True) + return p.maybeCreateLiteral(node.ID(), types.True) } - return call.GetArgs()[0], true + return call.Args()[0], true } return nil, false } -func (p *astPruner) maybePruneAnd(node *exprpb.Expr) (*exprpb.Expr, bool) { - call := node.GetCallExpr() +func (p *astPruner) maybePruneAnd(node ast.Expr) (ast.Expr, bool) { + call := node.AsCall() // We know result is unknown, so we have at least one unknown arg // and if one side is a known value, we know we can ignore it. - if v, exists := p.maybeValue(call.GetArgs()[0].GetId()); exists { + if v, exists := p.maybeValue(call.Args()[0].ID()); exists { if v == types.False { - return p.maybeCreateLiteral(node.GetId(), types.False) + return p.maybeCreateLiteral(node.ID(), types.False) } - return call.GetArgs()[1], true + return call.Args()[1], true } - if v, exists := p.maybeValue(call.GetArgs()[1].GetId()); exists { + if v, exists := p.maybeValue(call.Args()[1].ID()); exists { if v == types.False { - return p.maybeCreateLiteral(node.GetId(), types.False) + return p.maybeCreateLiteral(node.ID(), types.False) } - return call.GetArgs()[0], true + return call.Args()[0], true } return nil, false } -func (p *astPruner) maybePruneConditional(node *exprpb.Expr) (*exprpb.Expr, bool) { - call := node.GetCallExpr() - cond, exists := p.maybeValue(call.GetArgs()[0].GetId()) +func (p *astPruner) maybePruneConditional(node ast.Expr) (ast.Expr, bool) { + call := node.AsCall() + cond, exists := p.maybeValue(call.Args()[0].ID()) if !exists { return nil, false } if cond.Value().(bool) { - return call.GetArgs()[1], true + return call.Args()[1], true } - return call.GetArgs()[2], true + return call.Args()[2], true } -func (p *astPruner) maybePruneFunction(node *exprpb.Expr) (*exprpb.Expr, bool) { - if _, exists := p.value(node.GetId()); !exists { +func (p *astPruner) maybePruneFunction(node ast.Expr) (ast.Expr, bool) { + if _, exists := p.value(node.ID()); !exists { return nil, false } - call := node.GetCallExpr() - if call.Function == operators.LogicalOr { + call := node.AsCall() + if call.FunctionName() == operators.LogicalOr { return p.maybePruneOr(node) } - if call.Function == operators.LogicalAnd { + if call.FunctionName() == operators.LogicalAnd { return p.maybePruneAnd(node) } - if call.Function == operators.Conditional { + if call.FunctionName() == operators.Conditional { return p.maybePruneConditional(node) } - if call.Function == operators.In { + if call.FunctionName() == operators.In { return p.maybePruneIn(node) } - if call.Function == operators.LogicalNot { + if call.FunctionName() == operators.LogicalNot { return p.maybePruneLogicalNot(node) } return nil, false } -func (p *astPruner) maybePrune(node *exprpb.Expr) (*exprpb.Expr, bool) { +func (p *astPruner) maybePrune(node ast.Expr) (ast.Expr, bool) { return p.prune(node) } -func (p *astPruner) prune(node *exprpb.Expr) (*exprpb.Expr, bool) { +func (p *astPruner) prune(node ast.Expr) (ast.Expr, bool) { if node == nil { return node, false } - val, valueExists := p.maybeValue(node.GetId()) + val, valueExists := p.maybeValue(node.ID()) if valueExists { - if newNode, ok := p.maybeCreateLiteral(node.GetId(), val); ok { - delete(p.macroCalls, node.GetId()) + if newNode, ok := p.maybeCreateLiteral(node.ID(), val); ok { + delete(p.macroCalls, node.ID()) return newNode, true } } - if macro, found := p.macroCalls[node.GetId()]; found { + if macro, found := p.macroCalls[node.ID()]; found { // Ensure that intermediate values for the comprehension are cleared during pruning - compre := node.GetComprehensionExpr() - if compre != nil { - visit(macro, clearIterVarVisitor(compre.IterVar, p.state)) + if node.Kind() == ast.ComprehensionKind { + compre := node.AsComprehension() + visit(macro, clearIterVarVisitor(compre.IterVar(), p.state)) } // prune the expression in terms of the macro call instead of the expanded form. if newMacro, pruned := p.prune(macro); pruned { - p.macroCalls[node.GetId()] = newMacro + p.macroCalls[node.ID()] = newMacro } } // We have either an unknown/error value, or something we don't want to // transform, or expression was not evaluated. If possible, drill down // more. - switch node.GetExprKind().(type) { - case *exprpb.Expr_SelectExpr: - if operand, pruned := p.maybePrune(node.GetSelectExpr().GetOperand()); pruned { - return &exprpb.Expr{ - Id: node.GetId(), - ExprKind: &exprpb.Expr_SelectExpr{ - SelectExpr: &exprpb.Expr_Select{ - Operand: operand, - Field: node.GetSelectExpr().GetField(), - TestOnly: node.GetSelectExpr().GetTestOnly(), - }, - }, - }, true - } - case *exprpb.Expr_CallExpr: - var prunedCall bool - call := node.GetCallExpr() - args := call.GetArgs() - newArgs := make([]*exprpb.Expr, len(args)) - newCall := &exprpb.Expr_Call{ - Function: call.GetFunction(), - Target: call.GetTarget(), - Args: newArgs, - } - for i, arg := range args { - newArgs[i] = arg - if newArg, prunedArg := p.maybePrune(arg); prunedArg { - prunedCall = true - newArgs[i] = newArg + switch node.Kind() { + case ast.SelectKind: + sel := node.AsSelect() + if operand, isPruned := p.maybePrune(sel.Operand()); isPruned { + if sel.IsTestOnly() { + return p.NewPresenceTest(node.ID(), operand, sel.FieldName()), true } + return p.NewSelect(node.ID(), operand, sel.FieldName()), true } - if newTarget, prunedTarget := p.maybePrune(call.GetTarget()); prunedTarget { - prunedCall = true - newCall.Target = newTarget + case ast.CallKind: + argsPruned := false + call := node.AsCall() + args := call.Args() + newArgs := make([]ast.Expr, len(args)) + for i, a := range args { + newArgs[i] = a + if arg, isPruned := p.maybePrune(a); isPruned { + argsPruned = true + newArgs[i] = arg + } } - newNode := &exprpb.Expr{ - Id: node.GetId(), - ExprKind: &exprpb.Expr_CallExpr{ - CallExpr: newCall, - }, + if !call.IsMemberFunction() { + newCall := p.NewCall(node.ID(), call.FunctionName(), newArgs...) + if prunedCall, isPruned := p.maybePruneFunction(newCall); isPruned { + return prunedCall, true + } + return newCall, argsPruned } - if newExpr, pruned := p.maybePruneFunction(newNode); pruned { - newExpr, _ = p.maybePrune(newExpr) - return newExpr, true + newTarget := call.Target() + targetPruned := false + if prunedTarget, isPruned := p.maybePrune(call.Target()); isPruned { + targetPruned = true + newTarget = prunedTarget } - if prunedCall { - return newNode, true + newCall := p.NewMemberCall(node.ID(), call.FunctionName(), newTarget, newArgs...) + if prunedCall, isPruned := p.maybePruneFunction(newCall); isPruned { + return prunedCall, true } - case *exprpb.Expr_ListExpr: - elems := node.GetListExpr().GetElements() - optIndices := node.GetListExpr().GetOptionalIndices() + return newCall, targetPruned || argsPruned + case ast.ListKind: + l := node.AsList() + elems := l.Elements() + optIndices := l.OptionalIndices() optIndexMap := map[int32]bool{} for _, i := range optIndices { optIndexMap[i] = true } newOptIndexMap := make(map[int32]bool, len(optIndexMap)) - newElems := make([]*exprpb.Expr, 0, len(elems)) - var prunedList bool - + newElems := make([]ast.Expr, 0, len(elems)) + var listPruned bool prunedIdx := 0 for i, elem := range elems { _, isOpt := optIndexMap[int32(i)] if isOpt { newElem, pruned := p.maybePruneOptional(elem) if pruned { - prunedList = true + listPruned = true if newElem != nil { newElems = append(newElems, newElem) prunedIdx++ @@ -431,7 +361,7 @@ func (p *astPruner) prune(node *exprpb.Expr) (*exprpb.Expr, bool) { } if newElem, prunedElem := p.maybePrune(elem); prunedElem { newElems = append(newElems, newElem) - prunedList = true + listPruned = true } else { newElems = append(newElems, elem) } @@ -443,76 +373,64 @@ func (p *astPruner) prune(node *exprpb.Expr) (*exprpb.Expr, bool) { optIndices[idx] = i idx++ } - if prunedList { - return &exprpb.Expr{ - Id: node.GetId(), - ExprKind: &exprpb.Expr_ListExpr{ - ListExpr: &exprpb.Expr_CreateList{ - Elements: newElems, - OptionalIndices: optIndices, - }, - }, - }, true + if listPruned { + return p.NewList(node.ID(), newElems, optIndices), true } - case *exprpb.Expr_StructExpr: - var prunedStruct bool - entries := node.GetStructExpr().GetEntries() - messageType := node.GetStructExpr().GetMessageName() - newEntries := make([]*exprpb.Expr_CreateStruct_Entry, len(entries)) + case ast.MapKind: + var mapPruned bool + m := node.AsMap() + entries := m.Entries() + newEntries := make([]ast.EntryExpr, len(entries)) for i, entry := range entries { newEntries[i] = entry - newKey, prunedKey := p.maybePrune(entry.GetMapKey()) - newValue, prunedValue := p.maybePrune(entry.GetValue()) - if !prunedKey && !prunedValue { + e := entry.AsMapEntry() + newKey, keyPruned := p.maybePrune(e.Key()) + newValue, valuePruned := p.maybePrune(e.Value()) + if !keyPruned && !valuePruned { continue } - prunedStruct = true - newEntry := &exprpb.Expr_CreateStruct_Entry{ - Value: newValue, - } - if messageType != "" { - newEntry.KeyKind = &exprpb.Expr_CreateStruct_Entry_FieldKey{ - FieldKey: entry.GetFieldKey(), - } - } else { - newEntry.KeyKind = &exprpb.Expr_CreateStruct_Entry_MapKey{ - MapKey: newKey, - } - } - newEntry.OptionalEntry = entry.GetOptionalEntry() + mapPruned = true + newEntry := p.NewMapEntry(entry.ID(), newKey, newValue, e.IsOptional()) newEntries[i] = newEntry } - if prunedStruct { - return &exprpb.Expr{ - Id: node.GetId(), - ExprKind: &exprpb.Expr_StructExpr{ - StructExpr: &exprpb.Expr_CreateStruct{ - MessageName: messageType, - Entries: newEntries, - }, - }, - }, true + if mapPruned { + return p.NewMap(node.ID(), newEntries), true } - case *exprpb.Expr_ComprehensionExpr: - compre := node.GetComprehensionExpr() + case ast.StructKind: + var structPruned bool + obj := node.AsStruct() + fields := obj.Fields() + newFields := make([]ast.EntryExpr, len(fields)) + for i, field := range fields { + newFields[i] = field + f := field.AsStructField() + newValue, prunedValue := p.maybePrune(f.Value()) + if !prunedValue { + continue + } + structPruned = true + newEntry := p.NewStructField(field.ID(), f.Name(), newValue, f.IsOptional()) + newFields[i] = newEntry + } + if structPruned { + return p.NewStruct(node.ID(), obj.TypeName(), newFields), true + } + case ast.ComprehensionKind: + compre := node.AsComprehension() // Only the range of the comprehension is pruned since the state tracking only records // the last iteration of the comprehension and not each step in the evaluation which // means that the any residuals computed in between might be inaccurate. - if newRange, pruned := p.maybePrune(compre.GetIterRange()); pruned { - return &exprpb.Expr{ - Id: node.GetId(), - ExprKind: &exprpb.Expr_ComprehensionExpr{ - ComprehensionExpr: &exprpb.Expr_Comprehension{ - IterVar: compre.GetIterVar(), - IterRange: newRange, - AccuVar: compre.GetAccuVar(), - AccuInit: compre.GetAccuInit(), - LoopCondition: compre.GetLoopCondition(), - LoopStep: compre.GetLoopStep(), - Result: compre.GetResult(), - }, - }, - }, true + if newRange, pruned := p.maybePrune(compre.IterRange()); pruned { + return p.NewComprehension( + node.ID(), + newRange, + compre.IterVar(), + compre.AccuVar(), + compre.AccuInit(), + compre.LoopCondition(), + compre.LoopStep(), + compre.Result(), + ), true } } return node, false @@ -539,12 +457,12 @@ func (p *astPruner) nextID() int64 { type astVisitor struct { // visitEntry is called on every expr node, including those within a map/struct entry. - visitExpr func(expr *exprpb.Expr) + visitExpr func(expr ast.Expr) // visitEntry is called before entering the key, value of a map/struct entry. - visitEntry func(entry *exprpb.Expr_CreateStruct_Entry) + visitEntry func(entry ast.EntryExpr) } -func getMaxID(expr *exprpb.Expr) int64 { +func getMaxID(expr ast.Expr) int64 { maxID := int64(1) visit(expr, maxIDVisitor(&maxID)) return maxID @@ -552,10 +470,9 @@ func getMaxID(expr *exprpb.Expr) int64 { func clearIterVarVisitor(varName string, state EvalState) astVisitor { return astVisitor{ - visitExpr: func(e *exprpb.Expr) { - ident := e.GetIdentExpr() - if ident != nil && ident.GetName() == varName { - state.SetValue(e.GetId(), nil) + visitExpr: func(e ast.Expr) { + if e.Kind() == ast.IdentKind && e.AsIdent() == varName { + state.SetValue(e.ID(), nil) } }, } @@ -563,56 +480,63 @@ func clearIterVarVisitor(varName string, state EvalState) astVisitor { func maxIDVisitor(maxID *int64) astVisitor { return astVisitor{ - visitExpr: func(e *exprpb.Expr) { - if e.GetId() >= *maxID { - *maxID = e.GetId() + 1 + visitExpr: func(e ast.Expr) { + if e.ID() >= *maxID { + *maxID = e.ID() + 1 } }, - visitEntry: func(e *exprpb.Expr_CreateStruct_Entry) { - if e.GetId() >= *maxID { - *maxID = e.GetId() + 1 + visitEntry: func(e ast.EntryExpr) { + if e.ID() >= *maxID { + *maxID = e.ID() + 1 } }, } } -func visit(expr *exprpb.Expr, visitor astVisitor) { - exprs := []*exprpb.Expr{expr} +func visit(expr ast.Expr, visitor astVisitor) { + exprs := []ast.Expr{expr} for len(exprs) != 0 { e := exprs[0] if visitor.visitExpr != nil { visitor.visitExpr(e) } exprs = exprs[1:] - switch e.GetExprKind().(type) { - case *exprpb.Expr_SelectExpr: - exprs = append(exprs, e.GetSelectExpr().GetOperand()) - case *exprpb.Expr_CallExpr: - call := e.GetCallExpr() - if call.GetTarget() != nil { - exprs = append(exprs, call.GetTarget()) + switch e.Kind() { + case ast.SelectKind: + exprs = append(exprs, e.AsSelect().Operand()) + case ast.CallKind: + call := e.AsCall() + if call.Target() != nil { + exprs = append(exprs, call.Target()) } - exprs = append(exprs, call.GetArgs()...) - case *exprpb.Expr_ComprehensionExpr: - compre := e.GetComprehensionExpr() + exprs = append(exprs, call.Args()...) + case ast.ComprehensionKind: + compre := e.AsComprehension() exprs = append(exprs, - compre.GetIterRange(), - compre.GetAccuInit(), - compre.GetLoopCondition(), - compre.GetLoopStep(), - compre.GetResult()) - case *exprpb.Expr_ListExpr: - list := e.GetListExpr() - exprs = append(exprs, list.GetElements()...) - case *exprpb.Expr_StructExpr: - for _, entry := range e.GetStructExpr().GetEntries() { + compre.IterRange(), + compre.AccuInit(), + compre.LoopCondition(), + compre.LoopStep(), + compre.Result()) + case ast.ListKind: + list := e.AsList() + exprs = append(exprs, list.Elements()...) + case ast.MapKind: + for _, entry := range e.AsMap().Entries() { + e := entry.AsMapEntry() if visitor.visitEntry != nil { visitor.visitEntry(entry) } - if entry.GetMapKey() != nil { - exprs = append(exprs, entry.GetMapKey()) + exprs = append(exprs, e.Key()) + exprs = append(exprs, e.Value()) + } + case ast.StructKind: + for _, entry := range e.AsStruct().Fields() { + f := entry.AsStructField() + if visitor.visitEntry != nil { + visitor.visitEntry(entry) } - exprs = append(exprs, entry.GetValue()) + exprs = append(exprs, f.Value()) } } } diff --git a/vendor/github.com/google/cel-go/parser/BUILD.bazel b/vendor/github.com/google/cel-go/parser/BUILD.bazel index 67ecc955439..97bc9bd4344 100644 --- a/vendor/github.com/google/cel-go/parser/BUILD.bazel +++ b/vendor/github.com/google/cel-go/parser/BUILD.bazel @@ -20,10 +20,13 @@ go_library( visibility = ["//visibility:public"], deps = [ "//common:go_default_library", + "//common/ast:go_default_library", "//common/operators:go_default_library", "//common/runes:go_default_library", + "//common/types:go_default_library", + "//common/types/ref:go_default_library", "//parser/gen:go_default_library", - "@com_github_antlr_antlr4_runtime_go_antlr_v4//:go_default_library", + "@com_github_antlr4_go_antlr_v4//:go_default_library", "@org_golang_google_genproto_googleapis_api//expr/v1alpha1:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", "@org_golang_google_protobuf//types/known/structpb:go_default_library", @@ -43,10 +46,12 @@ go_test( ":go_default_library", ], deps = [ + "//common/ast:go_default_library", "//common/debug:go_default_library", + "//common/types:go_default_library", "//parser/gen:go_default_library", "//test:go_default_library", - "@com_github_antlr_antlr4_runtime_go_antlr_v4//:go_default_library", + "@com_github_antlr4_go_antlr_v4//:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", "@org_golang_google_protobuf//testing/protocmp:go_default_library", ], diff --git a/vendor/github.com/google/cel-go/parser/gen/BUILD.bazel b/vendor/github.com/google/cel-go/parser/gen/BUILD.bazel index 654d1de7aad..e7043348347 100644 --- a/vendor/github.com/google/cel-go/parser/gen/BUILD.bazel +++ b/vendor/github.com/google/cel-go/parser/gen/BUILD.bazel @@ -21,6 +21,6 @@ go_library( ], importpath = "github.com/google/cel-go/parser/gen", deps = [ - "@com_github_antlr_antlr4_runtime_go_antlr_v4//:go_default_library", + "@com_github_antlr4_go_antlr_v4//:go_default_library", ], ) diff --git a/vendor/github.com/google/cel-go/parser/gen/cel_base_listener.go b/vendor/github.com/google/cel-go/parser/gen/cel_base_listener.go index 0247f470a7c..c49d038676b 100644 --- a/vendor/github.com/google/cel-go/parser/gen/cel_base_listener.go +++ b/vendor/github.com/google/cel-go/parser/gen/cel_base_listener.go @@ -1,7 +1,7 @@ -// Code generated from /Users/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.12.0. DO NOT EDIT. +// Code generated from /usr/local/google/home/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.13.1. DO NOT EDIT. package gen // CEL -import "github.com/antlr/antlr4/runtime/Go/antlr/v4" +import "github.com/antlr4-go/antlr/v4" // BaseCELListener is a complete listener for a parse tree produced by CELParser. type BaseCELListener struct{} diff --git a/vendor/github.com/google/cel-go/parser/gen/cel_base_visitor.go b/vendor/github.com/google/cel-go/parser/gen/cel_base_visitor.go index 52a7f4dc57e..b2c0783d390 100644 --- a/vendor/github.com/google/cel-go/parser/gen/cel_base_visitor.go +++ b/vendor/github.com/google/cel-go/parser/gen/cel_base_visitor.go @@ -1,7 +1,8 @@ -// Code generated from /Users/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.12.0. DO NOT EDIT. +// Code generated from /usr/local/google/home/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.13.1. DO NOT EDIT. package gen // CEL -import "github.com/antlr/antlr4/runtime/Go/antlr/v4" +import "github.com/antlr4-go/antlr/v4" + type BaseCELVisitor struct { *antlr.BaseParseTreeVisitor diff --git a/vendor/github.com/google/cel-go/parser/gen/cel_lexer.go b/vendor/github.com/google/cel-go/parser/gen/cel_lexer.go index 98ddc06d0bd..e026cc46f0f 100644 --- a/vendor/github.com/google/cel-go/parser/gen/cel_lexer.go +++ b/vendor/github.com/google/cel-go/parser/gen/cel_lexer.go @@ -1,280 +1,278 @@ -// Code generated from /Users/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.12.0. DO NOT EDIT. +// Code generated from /usr/local/google/home/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.13.1. DO NOT EDIT. package gen - import ( "fmt" - "sync" + "sync" "unicode" - - "github.com/antlr/antlr4/runtime/Go/antlr/v4" + "github.com/antlr4-go/antlr/v4" ) - // Suppress unused import error var _ = fmt.Printf var _ = sync.Once{} var _ = unicode.IsLetter + type CELLexer struct { *antlr.BaseLexer channelNames []string - modeNames []string + modeNames []string // TODO: EOF string } -var cellexerLexerStaticData struct { - once sync.Once - serializedATN []int32 - channelNames []string - modeNames []string - literalNames []string - symbolicNames []string - ruleNames []string - predictionContextCache *antlr.PredictionContextCache - atn *antlr.ATN - decisionToDFA []*antlr.DFA +var CELLexerLexerStaticData struct { + once sync.Once + serializedATN []int32 + ChannelNames []string + ModeNames []string + LiteralNames []string + SymbolicNames []string + RuleNames []string + PredictionContextCache *antlr.PredictionContextCache + atn *antlr.ATN + decisionToDFA []*antlr.DFA } func cellexerLexerInit() { - staticData := &cellexerLexerStaticData - staticData.channelNames = []string{ - "DEFAULT_TOKEN_CHANNEL", "HIDDEN", - } - staticData.modeNames = []string{ - "DEFAULT_MODE", - } - staticData.literalNames = []string{ - "", "'=='", "'!='", "'in'", "'<'", "'<='", "'>='", "'>'", "'&&'", "'||'", - "'['", "']'", "'{'", "'}'", "'('", "')'", "'.'", "','", "'-'", "'!'", - "'?'", "':'", "'+'", "'*'", "'/'", "'%'", "'true'", "'false'", "'null'", - } - staticData.symbolicNames = []string{ - "", "EQUALS", "NOT_EQUALS", "IN", "LESS", "LESS_EQUALS", "GREATER_EQUALS", - "GREATER", "LOGICAL_AND", "LOGICAL_OR", "LBRACKET", "RPRACKET", "LBRACE", - "RBRACE", "LPAREN", "RPAREN", "DOT", "COMMA", "MINUS", "EXCLAM", "QUESTIONMARK", - "COLON", "PLUS", "STAR", "SLASH", "PERCENT", "CEL_TRUE", "CEL_FALSE", - "NUL", "WHITESPACE", "COMMENT", "NUM_FLOAT", "NUM_INT", "NUM_UINT", - "STRING", "BYTES", "IDENTIFIER", - } - staticData.ruleNames = []string{ - "EQUALS", "NOT_EQUALS", "IN", "LESS", "LESS_EQUALS", "GREATER_EQUALS", - "GREATER", "LOGICAL_AND", "LOGICAL_OR", "LBRACKET", "RPRACKET", "LBRACE", - "RBRACE", "LPAREN", "RPAREN", "DOT", "COMMA", "MINUS", "EXCLAM", "QUESTIONMARK", - "COLON", "PLUS", "STAR", "SLASH", "PERCENT", "CEL_TRUE", "CEL_FALSE", - "NUL", "BACKSLASH", "LETTER", "DIGIT", "EXPONENT", "HEXDIGIT", "RAW", - "ESC_SEQ", "ESC_CHAR_SEQ", "ESC_OCT_SEQ", "ESC_BYTE_SEQ", "ESC_UNI_SEQ", - "WHITESPACE", "COMMENT", "NUM_FLOAT", "NUM_INT", "NUM_UINT", "STRING", - "BYTES", "IDENTIFIER", - } - staticData.predictionContextCache = antlr.NewPredictionContextCache() - staticData.serializedATN = []int32{ - 4, 0, 36, 423, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, - 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, - 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, - 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, - 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, - 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, - 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, - 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, - 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, - 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, - 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, - 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, - 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, - 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, - 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, - 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, - 1, 30, 1, 30, 1, 31, 1, 31, 3, 31, 177, 8, 31, 1, 31, 4, 31, 180, 8, 31, - 11, 31, 12, 31, 181, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, - 34, 3, 34, 192, 8, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, - 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, - 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, - 1, 38, 1, 38, 1, 38, 3, 38, 225, 8, 38, 1, 39, 4, 39, 228, 8, 39, 11, 39, - 12, 39, 229, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 5, 40, 238, 8, 40, - 10, 40, 12, 40, 241, 9, 40, 1, 40, 1, 40, 1, 41, 4, 41, 246, 8, 41, 11, - 41, 12, 41, 247, 1, 41, 1, 41, 4, 41, 252, 8, 41, 11, 41, 12, 41, 253, - 1, 41, 3, 41, 257, 8, 41, 1, 41, 4, 41, 260, 8, 41, 11, 41, 12, 41, 261, - 1, 41, 1, 41, 1, 41, 1, 41, 4, 41, 268, 8, 41, 11, 41, 12, 41, 269, 1, - 41, 3, 41, 273, 8, 41, 3, 41, 275, 8, 41, 1, 42, 4, 42, 278, 8, 42, 11, - 42, 12, 42, 279, 1, 42, 1, 42, 1, 42, 1, 42, 4, 42, 286, 8, 42, 11, 42, - 12, 42, 287, 3, 42, 290, 8, 42, 1, 43, 4, 43, 293, 8, 43, 11, 43, 12, 43, - 294, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 4, 43, 303, 8, 43, 11, 43, - 12, 43, 304, 1, 43, 1, 43, 3, 43, 309, 8, 43, 1, 44, 1, 44, 1, 44, 5, 44, - 314, 8, 44, 10, 44, 12, 44, 317, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, - 44, 323, 8, 44, 10, 44, 12, 44, 326, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, - 1, 44, 1, 44, 1, 44, 5, 44, 335, 8, 44, 10, 44, 12, 44, 338, 9, 44, 1, - 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 349, - 8, 44, 10, 44, 12, 44, 352, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, - 44, 5, 44, 360, 8, 44, 10, 44, 12, 44, 363, 9, 44, 1, 44, 1, 44, 1, 44, - 1, 44, 1, 44, 5, 44, 370, 8, 44, 10, 44, 12, 44, 373, 9, 44, 1, 44, 1, - 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 383, 8, 44, 10, 44, - 12, 44, 386, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, - 44, 1, 44, 1, 44, 5, 44, 398, 8, 44, 10, 44, 12, 44, 401, 9, 44, 1, 44, - 1, 44, 1, 44, 1, 44, 3, 44, 407, 8, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, - 46, 3, 46, 414, 8, 46, 1, 46, 1, 46, 1, 46, 5, 46, 419, 8, 46, 10, 46, - 12, 46, 422, 9, 46, 4, 336, 350, 384, 399, 0, 47, 1, 1, 3, 2, 5, 3, 7, - 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, - 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, - 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 0, 59, 0, 61, 0, 63, 0, - 65, 0, 67, 0, 69, 0, 71, 0, 73, 0, 75, 0, 77, 0, 79, 29, 81, 30, 83, 31, - 85, 32, 87, 33, 89, 34, 91, 35, 93, 36, 1, 0, 16, 2, 0, 65, 90, 97, 122, - 2, 0, 69, 69, 101, 101, 2, 0, 43, 43, 45, 45, 3, 0, 48, 57, 65, 70, 97, - 102, 2, 0, 82, 82, 114, 114, 10, 0, 34, 34, 39, 39, 63, 63, 92, 92, 96, - 98, 102, 102, 110, 110, 114, 114, 116, 116, 118, 118, 2, 0, 88, 88, 120, - 120, 3, 0, 9, 10, 12, 13, 32, 32, 1, 0, 10, 10, 2, 0, 85, 85, 117, 117, - 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 4, 0, 10, 10, 13, 13, 39, 39, 92, - 92, 1, 0, 92, 92, 3, 0, 10, 10, 13, 13, 34, 34, 3, 0, 10, 10, 13, 13, 39, - 39, 2, 0, 66, 66, 98, 98, 456, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, - 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, - 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, - 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, - 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, - 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, - 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, - 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, - 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, - 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 1, 95, 1, 0, 0, 0, - 3, 98, 1, 0, 0, 0, 5, 101, 1, 0, 0, 0, 7, 104, 1, 0, 0, 0, 9, 106, 1, 0, - 0, 0, 11, 109, 1, 0, 0, 0, 13, 112, 1, 0, 0, 0, 15, 114, 1, 0, 0, 0, 17, - 117, 1, 0, 0, 0, 19, 120, 1, 0, 0, 0, 21, 122, 1, 0, 0, 0, 23, 124, 1, - 0, 0, 0, 25, 126, 1, 0, 0, 0, 27, 128, 1, 0, 0, 0, 29, 130, 1, 0, 0, 0, - 31, 132, 1, 0, 0, 0, 33, 134, 1, 0, 0, 0, 35, 136, 1, 0, 0, 0, 37, 138, - 1, 0, 0, 0, 39, 140, 1, 0, 0, 0, 41, 142, 1, 0, 0, 0, 43, 144, 1, 0, 0, - 0, 45, 146, 1, 0, 0, 0, 47, 148, 1, 0, 0, 0, 49, 150, 1, 0, 0, 0, 51, 152, - 1, 0, 0, 0, 53, 157, 1, 0, 0, 0, 55, 163, 1, 0, 0, 0, 57, 168, 1, 0, 0, - 0, 59, 170, 1, 0, 0, 0, 61, 172, 1, 0, 0, 0, 63, 174, 1, 0, 0, 0, 65, 183, - 1, 0, 0, 0, 67, 185, 1, 0, 0, 0, 69, 191, 1, 0, 0, 0, 71, 193, 1, 0, 0, - 0, 73, 196, 1, 0, 0, 0, 75, 201, 1, 0, 0, 0, 77, 224, 1, 0, 0, 0, 79, 227, - 1, 0, 0, 0, 81, 233, 1, 0, 0, 0, 83, 274, 1, 0, 0, 0, 85, 289, 1, 0, 0, - 0, 87, 308, 1, 0, 0, 0, 89, 406, 1, 0, 0, 0, 91, 408, 1, 0, 0, 0, 93, 413, - 1, 0, 0, 0, 95, 96, 5, 61, 0, 0, 96, 97, 5, 61, 0, 0, 97, 2, 1, 0, 0, 0, - 98, 99, 5, 33, 0, 0, 99, 100, 5, 61, 0, 0, 100, 4, 1, 0, 0, 0, 101, 102, - 5, 105, 0, 0, 102, 103, 5, 110, 0, 0, 103, 6, 1, 0, 0, 0, 104, 105, 5, - 60, 0, 0, 105, 8, 1, 0, 0, 0, 106, 107, 5, 60, 0, 0, 107, 108, 5, 61, 0, - 0, 108, 10, 1, 0, 0, 0, 109, 110, 5, 62, 0, 0, 110, 111, 5, 61, 0, 0, 111, - 12, 1, 0, 0, 0, 112, 113, 5, 62, 0, 0, 113, 14, 1, 0, 0, 0, 114, 115, 5, - 38, 0, 0, 115, 116, 5, 38, 0, 0, 116, 16, 1, 0, 0, 0, 117, 118, 5, 124, - 0, 0, 118, 119, 5, 124, 0, 0, 119, 18, 1, 0, 0, 0, 120, 121, 5, 91, 0, - 0, 121, 20, 1, 0, 0, 0, 122, 123, 5, 93, 0, 0, 123, 22, 1, 0, 0, 0, 124, - 125, 5, 123, 0, 0, 125, 24, 1, 0, 0, 0, 126, 127, 5, 125, 0, 0, 127, 26, - 1, 0, 0, 0, 128, 129, 5, 40, 0, 0, 129, 28, 1, 0, 0, 0, 130, 131, 5, 41, - 0, 0, 131, 30, 1, 0, 0, 0, 132, 133, 5, 46, 0, 0, 133, 32, 1, 0, 0, 0, - 134, 135, 5, 44, 0, 0, 135, 34, 1, 0, 0, 0, 136, 137, 5, 45, 0, 0, 137, - 36, 1, 0, 0, 0, 138, 139, 5, 33, 0, 0, 139, 38, 1, 0, 0, 0, 140, 141, 5, - 63, 0, 0, 141, 40, 1, 0, 0, 0, 142, 143, 5, 58, 0, 0, 143, 42, 1, 0, 0, - 0, 144, 145, 5, 43, 0, 0, 145, 44, 1, 0, 0, 0, 146, 147, 5, 42, 0, 0, 147, - 46, 1, 0, 0, 0, 148, 149, 5, 47, 0, 0, 149, 48, 1, 0, 0, 0, 150, 151, 5, - 37, 0, 0, 151, 50, 1, 0, 0, 0, 152, 153, 5, 116, 0, 0, 153, 154, 5, 114, - 0, 0, 154, 155, 5, 117, 0, 0, 155, 156, 5, 101, 0, 0, 156, 52, 1, 0, 0, - 0, 157, 158, 5, 102, 0, 0, 158, 159, 5, 97, 0, 0, 159, 160, 5, 108, 0, - 0, 160, 161, 5, 115, 0, 0, 161, 162, 5, 101, 0, 0, 162, 54, 1, 0, 0, 0, - 163, 164, 5, 110, 0, 0, 164, 165, 5, 117, 0, 0, 165, 166, 5, 108, 0, 0, - 166, 167, 5, 108, 0, 0, 167, 56, 1, 0, 0, 0, 168, 169, 5, 92, 0, 0, 169, - 58, 1, 0, 0, 0, 170, 171, 7, 0, 0, 0, 171, 60, 1, 0, 0, 0, 172, 173, 2, - 48, 57, 0, 173, 62, 1, 0, 0, 0, 174, 176, 7, 1, 0, 0, 175, 177, 7, 2, 0, - 0, 176, 175, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 179, 1, 0, 0, 0, 178, - 180, 3, 61, 30, 0, 179, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 179, - 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 64, 1, 0, 0, 0, 183, 184, 7, 3, - 0, 0, 184, 66, 1, 0, 0, 0, 185, 186, 7, 4, 0, 0, 186, 68, 1, 0, 0, 0, 187, - 192, 3, 71, 35, 0, 188, 192, 3, 75, 37, 0, 189, 192, 3, 77, 38, 0, 190, - 192, 3, 73, 36, 0, 191, 187, 1, 0, 0, 0, 191, 188, 1, 0, 0, 0, 191, 189, - 1, 0, 0, 0, 191, 190, 1, 0, 0, 0, 192, 70, 1, 0, 0, 0, 193, 194, 3, 57, - 28, 0, 194, 195, 7, 5, 0, 0, 195, 72, 1, 0, 0, 0, 196, 197, 3, 57, 28, - 0, 197, 198, 2, 48, 51, 0, 198, 199, 2, 48, 55, 0, 199, 200, 2, 48, 55, - 0, 200, 74, 1, 0, 0, 0, 201, 202, 3, 57, 28, 0, 202, 203, 7, 6, 0, 0, 203, - 204, 3, 65, 32, 0, 204, 205, 3, 65, 32, 0, 205, 76, 1, 0, 0, 0, 206, 207, - 3, 57, 28, 0, 207, 208, 5, 117, 0, 0, 208, 209, 3, 65, 32, 0, 209, 210, - 3, 65, 32, 0, 210, 211, 3, 65, 32, 0, 211, 212, 3, 65, 32, 0, 212, 225, - 1, 0, 0, 0, 213, 214, 3, 57, 28, 0, 214, 215, 5, 85, 0, 0, 215, 216, 3, - 65, 32, 0, 216, 217, 3, 65, 32, 0, 217, 218, 3, 65, 32, 0, 218, 219, 3, - 65, 32, 0, 219, 220, 3, 65, 32, 0, 220, 221, 3, 65, 32, 0, 221, 222, 3, - 65, 32, 0, 222, 223, 3, 65, 32, 0, 223, 225, 1, 0, 0, 0, 224, 206, 1, 0, - 0, 0, 224, 213, 1, 0, 0, 0, 225, 78, 1, 0, 0, 0, 226, 228, 7, 7, 0, 0, - 227, 226, 1, 0, 0, 0, 228, 229, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, - 230, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 6, 39, 0, 0, 232, 80, - 1, 0, 0, 0, 233, 234, 5, 47, 0, 0, 234, 235, 5, 47, 0, 0, 235, 239, 1, - 0, 0, 0, 236, 238, 8, 8, 0, 0, 237, 236, 1, 0, 0, 0, 238, 241, 1, 0, 0, - 0, 239, 237, 1, 0, 0, 0, 239, 240, 1, 0, 0, 0, 240, 242, 1, 0, 0, 0, 241, - 239, 1, 0, 0, 0, 242, 243, 6, 40, 0, 0, 243, 82, 1, 0, 0, 0, 244, 246, - 3, 61, 30, 0, 245, 244, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 245, 1, - 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 251, 5, 46, 0, - 0, 250, 252, 3, 61, 30, 0, 251, 250, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, - 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 256, 1, 0, 0, 0, 255, - 257, 3, 63, 31, 0, 256, 255, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 275, - 1, 0, 0, 0, 258, 260, 3, 61, 30, 0, 259, 258, 1, 0, 0, 0, 260, 261, 1, - 0, 0, 0, 261, 259, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 263, 1, 0, 0, - 0, 263, 264, 3, 63, 31, 0, 264, 275, 1, 0, 0, 0, 265, 267, 5, 46, 0, 0, - 266, 268, 3, 61, 30, 0, 267, 266, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, - 267, 1, 0, 0, 0, 269, 270, 1, 0, 0, 0, 270, 272, 1, 0, 0, 0, 271, 273, - 3, 63, 31, 0, 272, 271, 1, 0, 0, 0, 272, 273, 1, 0, 0, 0, 273, 275, 1, - 0, 0, 0, 274, 245, 1, 0, 0, 0, 274, 259, 1, 0, 0, 0, 274, 265, 1, 0, 0, - 0, 275, 84, 1, 0, 0, 0, 276, 278, 3, 61, 30, 0, 277, 276, 1, 0, 0, 0, 278, - 279, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 290, - 1, 0, 0, 0, 281, 282, 5, 48, 0, 0, 282, 283, 5, 120, 0, 0, 283, 285, 1, - 0, 0, 0, 284, 286, 3, 65, 32, 0, 285, 284, 1, 0, 0, 0, 286, 287, 1, 0, - 0, 0, 287, 285, 1, 0, 0, 0, 287, 288, 1, 0, 0, 0, 288, 290, 1, 0, 0, 0, - 289, 277, 1, 0, 0, 0, 289, 281, 1, 0, 0, 0, 290, 86, 1, 0, 0, 0, 291, 293, - 3, 61, 30, 0, 292, 291, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 292, 1, - 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 296, 1, 0, 0, 0, 296, 297, 7, 9, 0, - 0, 297, 309, 1, 0, 0, 0, 298, 299, 5, 48, 0, 0, 299, 300, 5, 120, 0, 0, - 300, 302, 1, 0, 0, 0, 301, 303, 3, 65, 32, 0, 302, 301, 1, 0, 0, 0, 303, - 304, 1, 0, 0, 0, 304, 302, 1, 0, 0, 0, 304, 305, 1, 0, 0, 0, 305, 306, - 1, 0, 0, 0, 306, 307, 7, 9, 0, 0, 307, 309, 1, 0, 0, 0, 308, 292, 1, 0, - 0, 0, 308, 298, 1, 0, 0, 0, 309, 88, 1, 0, 0, 0, 310, 315, 5, 34, 0, 0, - 311, 314, 3, 69, 34, 0, 312, 314, 8, 10, 0, 0, 313, 311, 1, 0, 0, 0, 313, - 312, 1, 0, 0, 0, 314, 317, 1, 0, 0, 0, 315, 313, 1, 0, 0, 0, 315, 316, - 1, 0, 0, 0, 316, 318, 1, 0, 0, 0, 317, 315, 1, 0, 0, 0, 318, 407, 5, 34, - 0, 0, 319, 324, 5, 39, 0, 0, 320, 323, 3, 69, 34, 0, 321, 323, 8, 11, 0, - 0, 322, 320, 1, 0, 0, 0, 322, 321, 1, 0, 0, 0, 323, 326, 1, 0, 0, 0, 324, - 322, 1, 0, 0, 0, 324, 325, 1, 0, 0, 0, 325, 327, 1, 0, 0, 0, 326, 324, - 1, 0, 0, 0, 327, 407, 5, 39, 0, 0, 328, 329, 5, 34, 0, 0, 329, 330, 5, - 34, 0, 0, 330, 331, 5, 34, 0, 0, 331, 336, 1, 0, 0, 0, 332, 335, 3, 69, - 34, 0, 333, 335, 8, 12, 0, 0, 334, 332, 1, 0, 0, 0, 334, 333, 1, 0, 0, - 0, 335, 338, 1, 0, 0, 0, 336, 337, 1, 0, 0, 0, 336, 334, 1, 0, 0, 0, 337, - 339, 1, 0, 0, 0, 338, 336, 1, 0, 0, 0, 339, 340, 5, 34, 0, 0, 340, 341, - 5, 34, 0, 0, 341, 407, 5, 34, 0, 0, 342, 343, 5, 39, 0, 0, 343, 344, 5, - 39, 0, 0, 344, 345, 5, 39, 0, 0, 345, 350, 1, 0, 0, 0, 346, 349, 3, 69, - 34, 0, 347, 349, 8, 12, 0, 0, 348, 346, 1, 0, 0, 0, 348, 347, 1, 0, 0, - 0, 349, 352, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 351, - 353, 1, 0, 0, 0, 352, 350, 1, 0, 0, 0, 353, 354, 5, 39, 0, 0, 354, 355, - 5, 39, 0, 0, 355, 407, 5, 39, 0, 0, 356, 357, 3, 67, 33, 0, 357, 361, 5, - 34, 0, 0, 358, 360, 8, 13, 0, 0, 359, 358, 1, 0, 0, 0, 360, 363, 1, 0, - 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 364, 1, 0, 0, 0, - 363, 361, 1, 0, 0, 0, 364, 365, 5, 34, 0, 0, 365, 407, 1, 0, 0, 0, 366, - 367, 3, 67, 33, 0, 367, 371, 5, 39, 0, 0, 368, 370, 8, 14, 0, 0, 369, 368, - 1, 0, 0, 0, 370, 373, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 371, 372, 1, 0, - 0, 0, 372, 374, 1, 0, 0, 0, 373, 371, 1, 0, 0, 0, 374, 375, 5, 39, 0, 0, - 375, 407, 1, 0, 0, 0, 376, 377, 3, 67, 33, 0, 377, 378, 5, 34, 0, 0, 378, - 379, 5, 34, 0, 0, 379, 380, 5, 34, 0, 0, 380, 384, 1, 0, 0, 0, 381, 383, - 9, 0, 0, 0, 382, 381, 1, 0, 0, 0, 383, 386, 1, 0, 0, 0, 384, 385, 1, 0, - 0, 0, 384, 382, 1, 0, 0, 0, 385, 387, 1, 0, 0, 0, 386, 384, 1, 0, 0, 0, - 387, 388, 5, 34, 0, 0, 388, 389, 5, 34, 0, 0, 389, 390, 5, 34, 0, 0, 390, - 407, 1, 0, 0, 0, 391, 392, 3, 67, 33, 0, 392, 393, 5, 39, 0, 0, 393, 394, - 5, 39, 0, 0, 394, 395, 5, 39, 0, 0, 395, 399, 1, 0, 0, 0, 396, 398, 9, - 0, 0, 0, 397, 396, 1, 0, 0, 0, 398, 401, 1, 0, 0, 0, 399, 400, 1, 0, 0, - 0, 399, 397, 1, 0, 0, 0, 400, 402, 1, 0, 0, 0, 401, 399, 1, 0, 0, 0, 402, - 403, 5, 39, 0, 0, 403, 404, 5, 39, 0, 0, 404, 405, 5, 39, 0, 0, 405, 407, - 1, 0, 0, 0, 406, 310, 1, 0, 0, 0, 406, 319, 1, 0, 0, 0, 406, 328, 1, 0, - 0, 0, 406, 342, 1, 0, 0, 0, 406, 356, 1, 0, 0, 0, 406, 366, 1, 0, 0, 0, - 406, 376, 1, 0, 0, 0, 406, 391, 1, 0, 0, 0, 407, 90, 1, 0, 0, 0, 408, 409, - 7, 15, 0, 0, 409, 410, 3, 89, 44, 0, 410, 92, 1, 0, 0, 0, 411, 414, 3, - 59, 29, 0, 412, 414, 5, 95, 0, 0, 413, 411, 1, 0, 0, 0, 413, 412, 1, 0, - 0, 0, 414, 420, 1, 0, 0, 0, 415, 419, 3, 59, 29, 0, 416, 419, 3, 61, 30, - 0, 417, 419, 5, 95, 0, 0, 418, 415, 1, 0, 0, 0, 418, 416, 1, 0, 0, 0, 418, - 417, 1, 0, 0, 0, 419, 422, 1, 0, 0, 0, 420, 418, 1, 0, 0, 0, 420, 421, - 1, 0, 0, 0, 421, 94, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 36, 0, 176, 181, - 191, 224, 229, 239, 247, 253, 256, 261, 269, 272, 274, 279, 287, 289, 294, - 304, 308, 313, 315, 322, 324, 334, 336, 348, 350, 361, 371, 384, 399, 406, - 413, 418, 420, 1, 0, 1, 0, - } - deserializer := antlr.NewATNDeserializer(nil) - staticData.atn = deserializer.Deserialize(staticData.serializedATN) - atn := staticData.atn - staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState)) - decisionToDFA := staticData.decisionToDFA - for index, state := range atn.DecisionToState { - decisionToDFA[index] = antlr.NewDFA(state, index) - } + staticData := &CELLexerLexerStaticData + staticData.ChannelNames = []string{ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", + } + staticData.ModeNames = []string{ + "DEFAULT_MODE", + } + staticData.LiteralNames = []string{ + "", "'=='", "'!='", "'in'", "'<'", "'<='", "'>='", "'>'", "'&&'", "'||'", + "'['", "']'", "'{'", "'}'", "'('", "')'", "'.'", "','", "'-'", "'!'", + "'?'", "':'", "'+'", "'*'", "'/'", "'%'", "'true'", "'false'", "'null'", + } + staticData.SymbolicNames = []string{ + "", "EQUALS", "NOT_EQUALS", "IN", "LESS", "LESS_EQUALS", "GREATER_EQUALS", + "GREATER", "LOGICAL_AND", "LOGICAL_OR", "LBRACKET", "RPRACKET", "LBRACE", + "RBRACE", "LPAREN", "RPAREN", "DOT", "COMMA", "MINUS", "EXCLAM", "QUESTIONMARK", + "COLON", "PLUS", "STAR", "SLASH", "PERCENT", "CEL_TRUE", "CEL_FALSE", + "NUL", "WHITESPACE", "COMMENT", "NUM_FLOAT", "NUM_INT", "NUM_UINT", + "STRING", "BYTES", "IDENTIFIER", + } + staticData.RuleNames = []string{ + "EQUALS", "NOT_EQUALS", "IN", "LESS", "LESS_EQUALS", "GREATER_EQUALS", + "GREATER", "LOGICAL_AND", "LOGICAL_OR", "LBRACKET", "RPRACKET", "LBRACE", + "RBRACE", "LPAREN", "RPAREN", "DOT", "COMMA", "MINUS", "EXCLAM", "QUESTIONMARK", + "COLON", "PLUS", "STAR", "SLASH", "PERCENT", "CEL_TRUE", "CEL_FALSE", + "NUL", "BACKSLASH", "LETTER", "DIGIT", "EXPONENT", "HEXDIGIT", "RAW", + "ESC_SEQ", "ESC_CHAR_SEQ", "ESC_OCT_SEQ", "ESC_BYTE_SEQ", "ESC_UNI_SEQ", + "WHITESPACE", "COMMENT", "NUM_FLOAT", "NUM_INT", "NUM_UINT", "STRING", + "BYTES", "IDENTIFIER", + } + staticData.PredictionContextCache = antlr.NewPredictionContextCache() + staticData.serializedATN = []int32{ + 4, 0, 36, 423, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, + 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, + 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, + 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, + 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, + 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, + 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, + 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, + 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, + 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, + 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, + 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, + 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, + 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, + 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, + 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, + 1, 30, 1, 30, 1, 31, 1, 31, 3, 31, 177, 8, 31, 1, 31, 4, 31, 180, 8, 31, + 11, 31, 12, 31, 181, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, + 34, 3, 34, 192, 8, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, + 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, + 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, + 1, 38, 1, 38, 1, 38, 3, 38, 225, 8, 38, 1, 39, 4, 39, 228, 8, 39, 11, 39, + 12, 39, 229, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 5, 40, 238, 8, 40, + 10, 40, 12, 40, 241, 9, 40, 1, 40, 1, 40, 1, 41, 4, 41, 246, 8, 41, 11, + 41, 12, 41, 247, 1, 41, 1, 41, 4, 41, 252, 8, 41, 11, 41, 12, 41, 253, + 1, 41, 3, 41, 257, 8, 41, 1, 41, 4, 41, 260, 8, 41, 11, 41, 12, 41, 261, + 1, 41, 1, 41, 1, 41, 1, 41, 4, 41, 268, 8, 41, 11, 41, 12, 41, 269, 1, + 41, 3, 41, 273, 8, 41, 3, 41, 275, 8, 41, 1, 42, 4, 42, 278, 8, 42, 11, + 42, 12, 42, 279, 1, 42, 1, 42, 1, 42, 1, 42, 4, 42, 286, 8, 42, 11, 42, + 12, 42, 287, 3, 42, 290, 8, 42, 1, 43, 4, 43, 293, 8, 43, 11, 43, 12, 43, + 294, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 4, 43, 303, 8, 43, 11, 43, + 12, 43, 304, 1, 43, 1, 43, 3, 43, 309, 8, 43, 1, 44, 1, 44, 1, 44, 5, 44, + 314, 8, 44, 10, 44, 12, 44, 317, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, + 44, 323, 8, 44, 10, 44, 12, 44, 326, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, + 1, 44, 1, 44, 1, 44, 5, 44, 335, 8, 44, 10, 44, 12, 44, 338, 9, 44, 1, + 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 349, + 8, 44, 10, 44, 12, 44, 352, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, + 44, 5, 44, 360, 8, 44, 10, 44, 12, 44, 363, 9, 44, 1, 44, 1, 44, 1, 44, + 1, 44, 1, 44, 5, 44, 370, 8, 44, 10, 44, 12, 44, 373, 9, 44, 1, 44, 1, + 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 383, 8, 44, 10, 44, + 12, 44, 386, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, + 44, 1, 44, 1, 44, 5, 44, 398, 8, 44, 10, 44, 12, 44, 401, 9, 44, 1, 44, + 1, 44, 1, 44, 1, 44, 3, 44, 407, 8, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, + 46, 3, 46, 414, 8, 46, 1, 46, 1, 46, 1, 46, 5, 46, 419, 8, 46, 10, 46, + 12, 46, 422, 9, 46, 4, 336, 350, 384, 399, 0, 47, 1, 1, 3, 2, 5, 3, 7, + 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, + 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, + 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 0, 59, 0, 61, 0, 63, 0, + 65, 0, 67, 0, 69, 0, 71, 0, 73, 0, 75, 0, 77, 0, 79, 29, 81, 30, 83, 31, + 85, 32, 87, 33, 89, 34, 91, 35, 93, 36, 1, 0, 16, 2, 0, 65, 90, 97, 122, + 2, 0, 69, 69, 101, 101, 2, 0, 43, 43, 45, 45, 3, 0, 48, 57, 65, 70, 97, + 102, 2, 0, 82, 82, 114, 114, 10, 0, 34, 34, 39, 39, 63, 63, 92, 92, 96, + 98, 102, 102, 110, 110, 114, 114, 116, 116, 118, 118, 2, 0, 88, 88, 120, + 120, 3, 0, 9, 10, 12, 13, 32, 32, 1, 0, 10, 10, 2, 0, 85, 85, 117, 117, + 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 4, 0, 10, 10, 13, 13, 39, 39, 92, + 92, 1, 0, 92, 92, 3, 0, 10, 10, 13, 13, 34, 34, 3, 0, 10, 10, 13, 13, 39, + 39, 2, 0, 66, 66, 98, 98, 456, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, + 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, + 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, + 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, + 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, + 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, + 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, + 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, + 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, + 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 1, 95, 1, 0, 0, 0, + 3, 98, 1, 0, 0, 0, 5, 101, 1, 0, 0, 0, 7, 104, 1, 0, 0, 0, 9, 106, 1, 0, + 0, 0, 11, 109, 1, 0, 0, 0, 13, 112, 1, 0, 0, 0, 15, 114, 1, 0, 0, 0, 17, + 117, 1, 0, 0, 0, 19, 120, 1, 0, 0, 0, 21, 122, 1, 0, 0, 0, 23, 124, 1, + 0, 0, 0, 25, 126, 1, 0, 0, 0, 27, 128, 1, 0, 0, 0, 29, 130, 1, 0, 0, 0, + 31, 132, 1, 0, 0, 0, 33, 134, 1, 0, 0, 0, 35, 136, 1, 0, 0, 0, 37, 138, + 1, 0, 0, 0, 39, 140, 1, 0, 0, 0, 41, 142, 1, 0, 0, 0, 43, 144, 1, 0, 0, + 0, 45, 146, 1, 0, 0, 0, 47, 148, 1, 0, 0, 0, 49, 150, 1, 0, 0, 0, 51, 152, + 1, 0, 0, 0, 53, 157, 1, 0, 0, 0, 55, 163, 1, 0, 0, 0, 57, 168, 1, 0, 0, + 0, 59, 170, 1, 0, 0, 0, 61, 172, 1, 0, 0, 0, 63, 174, 1, 0, 0, 0, 65, 183, + 1, 0, 0, 0, 67, 185, 1, 0, 0, 0, 69, 191, 1, 0, 0, 0, 71, 193, 1, 0, 0, + 0, 73, 196, 1, 0, 0, 0, 75, 201, 1, 0, 0, 0, 77, 224, 1, 0, 0, 0, 79, 227, + 1, 0, 0, 0, 81, 233, 1, 0, 0, 0, 83, 274, 1, 0, 0, 0, 85, 289, 1, 0, 0, + 0, 87, 308, 1, 0, 0, 0, 89, 406, 1, 0, 0, 0, 91, 408, 1, 0, 0, 0, 93, 413, + 1, 0, 0, 0, 95, 96, 5, 61, 0, 0, 96, 97, 5, 61, 0, 0, 97, 2, 1, 0, 0, 0, + 98, 99, 5, 33, 0, 0, 99, 100, 5, 61, 0, 0, 100, 4, 1, 0, 0, 0, 101, 102, + 5, 105, 0, 0, 102, 103, 5, 110, 0, 0, 103, 6, 1, 0, 0, 0, 104, 105, 5, + 60, 0, 0, 105, 8, 1, 0, 0, 0, 106, 107, 5, 60, 0, 0, 107, 108, 5, 61, 0, + 0, 108, 10, 1, 0, 0, 0, 109, 110, 5, 62, 0, 0, 110, 111, 5, 61, 0, 0, 111, + 12, 1, 0, 0, 0, 112, 113, 5, 62, 0, 0, 113, 14, 1, 0, 0, 0, 114, 115, 5, + 38, 0, 0, 115, 116, 5, 38, 0, 0, 116, 16, 1, 0, 0, 0, 117, 118, 5, 124, + 0, 0, 118, 119, 5, 124, 0, 0, 119, 18, 1, 0, 0, 0, 120, 121, 5, 91, 0, + 0, 121, 20, 1, 0, 0, 0, 122, 123, 5, 93, 0, 0, 123, 22, 1, 0, 0, 0, 124, + 125, 5, 123, 0, 0, 125, 24, 1, 0, 0, 0, 126, 127, 5, 125, 0, 0, 127, 26, + 1, 0, 0, 0, 128, 129, 5, 40, 0, 0, 129, 28, 1, 0, 0, 0, 130, 131, 5, 41, + 0, 0, 131, 30, 1, 0, 0, 0, 132, 133, 5, 46, 0, 0, 133, 32, 1, 0, 0, 0, + 134, 135, 5, 44, 0, 0, 135, 34, 1, 0, 0, 0, 136, 137, 5, 45, 0, 0, 137, + 36, 1, 0, 0, 0, 138, 139, 5, 33, 0, 0, 139, 38, 1, 0, 0, 0, 140, 141, 5, + 63, 0, 0, 141, 40, 1, 0, 0, 0, 142, 143, 5, 58, 0, 0, 143, 42, 1, 0, 0, + 0, 144, 145, 5, 43, 0, 0, 145, 44, 1, 0, 0, 0, 146, 147, 5, 42, 0, 0, 147, + 46, 1, 0, 0, 0, 148, 149, 5, 47, 0, 0, 149, 48, 1, 0, 0, 0, 150, 151, 5, + 37, 0, 0, 151, 50, 1, 0, 0, 0, 152, 153, 5, 116, 0, 0, 153, 154, 5, 114, + 0, 0, 154, 155, 5, 117, 0, 0, 155, 156, 5, 101, 0, 0, 156, 52, 1, 0, 0, + 0, 157, 158, 5, 102, 0, 0, 158, 159, 5, 97, 0, 0, 159, 160, 5, 108, 0, + 0, 160, 161, 5, 115, 0, 0, 161, 162, 5, 101, 0, 0, 162, 54, 1, 0, 0, 0, + 163, 164, 5, 110, 0, 0, 164, 165, 5, 117, 0, 0, 165, 166, 5, 108, 0, 0, + 166, 167, 5, 108, 0, 0, 167, 56, 1, 0, 0, 0, 168, 169, 5, 92, 0, 0, 169, + 58, 1, 0, 0, 0, 170, 171, 7, 0, 0, 0, 171, 60, 1, 0, 0, 0, 172, 173, 2, + 48, 57, 0, 173, 62, 1, 0, 0, 0, 174, 176, 7, 1, 0, 0, 175, 177, 7, 2, 0, + 0, 176, 175, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 179, 1, 0, 0, 0, 178, + 180, 3, 61, 30, 0, 179, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 179, + 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 64, 1, 0, 0, 0, 183, 184, 7, 3, + 0, 0, 184, 66, 1, 0, 0, 0, 185, 186, 7, 4, 0, 0, 186, 68, 1, 0, 0, 0, 187, + 192, 3, 71, 35, 0, 188, 192, 3, 75, 37, 0, 189, 192, 3, 77, 38, 0, 190, + 192, 3, 73, 36, 0, 191, 187, 1, 0, 0, 0, 191, 188, 1, 0, 0, 0, 191, 189, + 1, 0, 0, 0, 191, 190, 1, 0, 0, 0, 192, 70, 1, 0, 0, 0, 193, 194, 3, 57, + 28, 0, 194, 195, 7, 5, 0, 0, 195, 72, 1, 0, 0, 0, 196, 197, 3, 57, 28, + 0, 197, 198, 2, 48, 51, 0, 198, 199, 2, 48, 55, 0, 199, 200, 2, 48, 55, + 0, 200, 74, 1, 0, 0, 0, 201, 202, 3, 57, 28, 0, 202, 203, 7, 6, 0, 0, 203, + 204, 3, 65, 32, 0, 204, 205, 3, 65, 32, 0, 205, 76, 1, 0, 0, 0, 206, 207, + 3, 57, 28, 0, 207, 208, 5, 117, 0, 0, 208, 209, 3, 65, 32, 0, 209, 210, + 3, 65, 32, 0, 210, 211, 3, 65, 32, 0, 211, 212, 3, 65, 32, 0, 212, 225, + 1, 0, 0, 0, 213, 214, 3, 57, 28, 0, 214, 215, 5, 85, 0, 0, 215, 216, 3, + 65, 32, 0, 216, 217, 3, 65, 32, 0, 217, 218, 3, 65, 32, 0, 218, 219, 3, + 65, 32, 0, 219, 220, 3, 65, 32, 0, 220, 221, 3, 65, 32, 0, 221, 222, 3, + 65, 32, 0, 222, 223, 3, 65, 32, 0, 223, 225, 1, 0, 0, 0, 224, 206, 1, 0, + 0, 0, 224, 213, 1, 0, 0, 0, 225, 78, 1, 0, 0, 0, 226, 228, 7, 7, 0, 0, + 227, 226, 1, 0, 0, 0, 228, 229, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, + 230, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 6, 39, 0, 0, 232, 80, + 1, 0, 0, 0, 233, 234, 5, 47, 0, 0, 234, 235, 5, 47, 0, 0, 235, 239, 1, + 0, 0, 0, 236, 238, 8, 8, 0, 0, 237, 236, 1, 0, 0, 0, 238, 241, 1, 0, 0, + 0, 239, 237, 1, 0, 0, 0, 239, 240, 1, 0, 0, 0, 240, 242, 1, 0, 0, 0, 241, + 239, 1, 0, 0, 0, 242, 243, 6, 40, 0, 0, 243, 82, 1, 0, 0, 0, 244, 246, + 3, 61, 30, 0, 245, 244, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 245, 1, + 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 251, 5, 46, 0, + 0, 250, 252, 3, 61, 30, 0, 251, 250, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, + 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 256, 1, 0, 0, 0, 255, + 257, 3, 63, 31, 0, 256, 255, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 275, + 1, 0, 0, 0, 258, 260, 3, 61, 30, 0, 259, 258, 1, 0, 0, 0, 260, 261, 1, + 0, 0, 0, 261, 259, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 263, 1, 0, 0, + 0, 263, 264, 3, 63, 31, 0, 264, 275, 1, 0, 0, 0, 265, 267, 5, 46, 0, 0, + 266, 268, 3, 61, 30, 0, 267, 266, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, + 267, 1, 0, 0, 0, 269, 270, 1, 0, 0, 0, 270, 272, 1, 0, 0, 0, 271, 273, + 3, 63, 31, 0, 272, 271, 1, 0, 0, 0, 272, 273, 1, 0, 0, 0, 273, 275, 1, + 0, 0, 0, 274, 245, 1, 0, 0, 0, 274, 259, 1, 0, 0, 0, 274, 265, 1, 0, 0, + 0, 275, 84, 1, 0, 0, 0, 276, 278, 3, 61, 30, 0, 277, 276, 1, 0, 0, 0, 278, + 279, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 290, + 1, 0, 0, 0, 281, 282, 5, 48, 0, 0, 282, 283, 5, 120, 0, 0, 283, 285, 1, + 0, 0, 0, 284, 286, 3, 65, 32, 0, 285, 284, 1, 0, 0, 0, 286, 287, 1, 0, + 0, 0, 287, 285, 1, 0, 0, 0, 287, 288, 1, 0, 0, 0, 288, 290, 1, 0, 0, 0, + 289, 277, 1, 0, 0, 0, 289, 281, 1, 0, 0, 0, 290, 86, 1, 0, 0, 0, 291, 293, + 3, 61, 30, 0, 292, 291, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 292, 1, + 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 296, 1, 0, 0, 0, 296, 297, 7, 9, 0, + 0, 297, 309, 1, 0, 0, 0, 298, 299, 5, 48, 0, 0, 299, 300, 5, 120, 0, 0, + 300, 302, 1, 0, 0, 0, 301, 303, 3, 65, 32, 0, 302, 301, 1, 0, 0, 0, 303, + 304, 1, 0, 0, 0, 304, 302, 1, 0, 0, 0, 304, 305, 1, 0, 0, 0, 305, 306, + 1, 0, 0, 0, 306, 307, 7, 9, 0, 0, 307, 309, 1, 0, 0, 0, 308, 292, 1, 0, + 0, 0, 308, 298, 1, 0, 0, 0, 309, 88, 1, 0, 0, 0, 310, 315, 5, 34, 0, 0, + 311, 314, 3, 69, 34, 0, 312, 314, 8, 10, 0, 0, 313, 311, 1, 0, 0, 0, 313, + 312, 1, 0, 0, 0, 314, 317, 1, 0, 0, 0, 315, 313, 1, 0, 0, 0, 315, 316, + 1, 0, 0, 0, 316, 318, 1, 0, 0, 0, 317, 315, 1, 0, 0, 0, 318, 407, 5, 34, + 0, 0, 319, 324, 5, 39, 0, 0, 320, 323, 3, 69, 34, 0, 321, 323, 8, 11, 0, + 0, 322, 320, 1, 0, 0, 0, 322, 321, 1, 0, 0, 0, 323, 326, 1, 0, 0, 0, 324, + 322, 1, 0, 0, 0, 324, 325, 1, 0, 0, 0, 325, 327, 1, 0, 0, 0, 326, 324, + 1, 0, 0, 0, 327, 407, 5, 39, 0, 0, 328, 329, 5, 34, 0, 0, 329, 330, 5, + 34, 0, 0, 330, 331, 5, 34, 0, 0, 331, 336, 1, 0, 0, 0, 332, 335, 3, 69, + 34, 0, 333, 335, 8, 12, 0, 0, 334, 332, 1, 0, 0, 0, 334, 333, 1, 0, 0, + 0, 335, 338, 1, 0, 0, 0, 336, 337, 1, 0, 0, 0, 336, 334, 1, 0, 0, 0, 337, + 339, 1, 0, 0, 0, 338, 336, 1, 0, 0, 0, 339, 340, 5, 34, 0, 0, 340, 341, + 5, 34, 0, 0, 341, 407, 5, 34, 0, 0, 342, 343, 5, 39, 0, 0, 343, 344, 5, + 39, 0, 0, 344, 345, 5, 39, 0, 0, 345, 350, 1, 0, 0, 0, 346, 349, 3, 69, + 34, 0, 347, 349, 8, 12, 0, 0, 348, 346, 1, 0, 0, 0, 348, 347, 1, 0, 0, + 0, 349, 352, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 351, + 353, 1, 0, 0, 0, 352, 350, 1, 0, 0, 0, 353, 354, 5, 39, 0, 0, 354, 355, + 5, 39, 0, 0, 355, 407, 5, 39, 0, 0, 356, 357, 3, 67, 33, 0, 357, 361, 5, + 34, 0, 0, 358, 360, 8, 13, 0, 0, 359, 358, 1, 0, 0, 0, 360, 363, 1, 0, + 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 364, 1, 0, 0, 0, + 363, 361, 1, 0, 0, 0, 364, 365, 5, 34, 0, 0, 365, 407, 1, 0, 0, 0, 366, + 367, 3, 67, 33, 0, 367, 371, 5, 39, 0, 0, 368, 370, 8, 14, 0, 0, 369, 368, + 1, 0, 0, 0, 370, 373, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 371, 372, 1, 0, + 0, 0, 372, 374, 1, 0, 0, 0, 373, 371, 1, 0, 0, 0, 374, 375, 5, 39, 0, 0, + 375, 407, 1, 0, 0, 0, 376, 377, 3, 67, 33, 0, 377, 378, 5, 34, 0, 0, 378, + 379, 5, 34, 0, 0, 379, 380, 5, 34, 0, 0, 380, 384, 1, 0, 0, 0, 381, 383, + 9, 0, 0, 0, 382, 381, 1, 0, 0, 0, 383, 386, 1, 0, 0, 0, 384, 385, 1, 0, + 0, 0, 384, 382, 1, 0, 0, 0, 385, 387, 1, 0, 0, 0, 386, 384, 1, 0, 0, 0, + 387, 388, 5, 34, 0, 0, 388, 389, 5, 34, 0, 0, 389, 390, 5, 34, 0, 0, 390, + 407, 1, 0, 0, 0, 391, 392, 3, 67, 33, 0, 392, 393, 5, 39, 0, 0, 393, 394, + 5, 39, 0, 0, 394, 395, 5, 39, 0, 0, 395, 399, 1, 0, 0, 0, 396, 398, 9, + 0, 0, 0, 397, 396, 1, 0, 0, 0, 398, 401, 1, 0, 0, 0, 399, 400, 1, 0, 0, + 0, 399, 397, 1, 0, 0, 0, 400, 402, 1, 0, 0, 0, 401, 399, 1, 0, 0, 0, 402, + 403, 5, 39, 0, 0, 403, 404, 5, 39, 0, 0, 404, 405, 5, 39, 0, 0, 405, 407, + 1, 0, 0, 0, 406, 310, 1, 0, 0, 0, 406, 319, 1, 0, 0, 0, 406, 328, 1, 0, + 0, 0, 406, 342, 1, 0, 0, 0, 406, 356, 1, 0, 0, 0, 406, 366, 1, 0, 0, 0, + 406, 376, 1, 0, 0, 0, 406, 391, 1, 0, 0, 0, 407, 90, 1, 0, 0, 0, 408, 409, + 7, 15, 0, 0, 409, 410, 3, 89, 44, 0, 410, 92, 1, 0, 0, 0, 411, 414, 3, + 59, 29, 0, 412, 414, 5, 95, 0, 0, 413, 411, 1, 0, 0, 0, 413, 412, 1, 0, + 0, 0, 414, 420, 1, 0, 0, 0, 415, 419, 3, 59, 29, 0, 416, 419, 3, 61, 30, + 0, 417, 419, 5, 95, 0, 0, 418, 415, 1, 0, 0, 0, 418, 416, 1, 0, 0, 0, 418, + 417, 1, 0, 0, 0, 419, 422, 1, 0, 0, 0, 420, 418, 1, 0, 0, 0, 420, 421, + 1, 0, 0, 0, 421, 94, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 36, 0, 176, 181, + 191, 224, 229, 239, 247, 253, 256, 261, 269, 272, 274, 279, 287, 289, 294, + 304, 308, 313, 315, 322, 324, 334, 336, 348, 350, 361, 371, 384, 399, 406, + 413, 418, 420, 1, 0, 1, 0, +} + deserializer := antlr.NewATNDeserializer(nil) + staticData.atn = deserializer.Deserialize(staticData.serializedATN) + atn := staticData.atn + staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState)) + decisionToDFA := staticData.decisionToDFA + for index, state := range atn.DecisionToState { + decisionToDFA[index] = antlr.NewDFA(state, index) + } } // CELLexerInit initializes any static state used to implement CELLexer. By default the @@ -282,22 +280,22 @@ func cellexerLexerInit() { // NewCELLexer(). You can call this function if you wish to initialize the static state ahead // of time. func CELLexerInit() { - staticData := &cellexerLexerStaticData - staticData.once.Do(cellexerLexerInit) + staticData := &CELLexerLexerStaticData + staticData.once.Do(cellexerLexerInit) } // NewCELLexer produces a new lexer instance for the optional input antlr.CharStream. func NewCELLexer(input antlr.CharStream) *CELLexer { - CELLexerInit() + CELLexerInit() l := new(CELLexer) l.BaseLexer = antlr.NewBaseLexer(input) - staticData := &cellexerLexerStaticData - l.Interpreter = antlr.NewLexerATNSimulator(l, staticData.atn, staticData.decisionToDFA, staticData.predictionContextCache) - l.channelNames = staticData.channelNames - l.modeNames = staticData.modeNames - l.RuleNames = staticData.ruleNames - l.LiteralNames = staticData.literalNames - l.SymbolicNames = staticData.symbolicNames + staticData := &CELLexerLexerStaticData + l.Interpreter = antlr.NewLexerATNSimulator(l, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache) + l.channelNames = staticData.ChannelNames + l.modeNames = staticData.ModeNames + l.RuleNames = staticData.RuleNames + l.LiteralNames = staticData.LiteralNames + l.SymbolicNames = staticData.SymbolicNames l.GrammarFileName = "CEL.g4" // TODO: l.EOF = antlr.TokenEOF @@ -306,40 +304,41 @@ func NewCELLexer(input antlr.CharStream) *CELLexer { // CELLexer tokens. const ( - CELLexerEQUALS = 1 - CELLexerNOT_EQUALS = 2 - CELLexerIN = 3 - CELLexerLESS = 4 - CELLexerLESS_EQUALS = 5 + CELLexerEQUALS = 1 + CELLexerNOT_EQUALS = 2 + CELLexerIN = 3 + CELLexerLESS = 4 + CELLexerLESS_EQUALS = 5 CELLexerGREATER_EQUALS = 6 - CELLexerGREATER = 7 - CELLexerLOGICAL_AND = 8 - CELLexerLOGICAL_OR = 9 - CELLexerLBRACKET = 10 - CELLexerRPRACKET = 11 - CELLexerLBRACE = 12 - CELLexerRBRACE = 13 - CELLexerLPAREN = 14 - CELLexerRPAREN = 15 - CELLexerDOT = 16 - CELLexerCOMMA = 17 - CELLexerMINUS = 18 - CELLexerEXCLAM = 19 - CELLexerQUESTIONMARK = 20 - CELLexerCOLON = 21 - CELLexerPLUS = 22 - CELLexerSTAR = 23 - CELLexerSLASH = 24 - CELLexerPERCENT = 25 - CELLexerCEL_TRUE = 26 - CELLexerCEL_FALSE = 27 - CELLexerNUL = 28 - CELLexerWHITESPACE = 29 - CELLexerCOMMENT = 30 - CELLexerNUM_FLOAT = 31 - CELLexerNUM_INT = 32 - CELLexerNUM_UINT = 33 - CELLexerSTRING = 34 - CELLexerBYTES = 35 - CELLexerIDENTIFIER = 36 + CELLexerGREATER = 7 + CELLexerLOGICAL_AND = 8 + CELLexerLOGICAL_OR = 9 + CELLexerLBRACKET = 10 + CELLexerRPRACKET = 11 + CELLexerLBRACE = 12 + CELLexerRBRACE = 13 + CELLexerLPAREN = 14 + CELLexerRPAREN = 15 + CELLexerDOT = 16 + CELLexerCOMMA = 17 + CELLexerMINUS = 18 + CELLexerEXCLAM = 19 + CELLexerQUESTIONMARK = 20 + CELLexerCOLON = 21 + CELLexerPLUS = 22 + CELLexerSTAR = 23 + CELLexerSLASH = 24 + CELLexerPERCENT = 25 + CELLexerCEL_TRUE = 26 + CELLexerCEL_FALSE = 27 + CELLexerNUL = 28 + CELLexerWHITESPACE = 29 + CELLexerCOMMENT = 30 + CELLexerNUM_FLOAT = 31 + CELLexerNUM_INT = 32 + CELLexerNUM_UINT = 33 + CELLexerSTRING = 34 + CELLexerBYTES = 35 + CELLexerIDENTIFIER = 36 ) + diff --git a/vendor/github.com/google/cel-go/parser/gen/cel_listener.go b/vendor/github.com/google/cel-go/parser/gen/cel_listener.go index 73b7f1d39fa..22dc9978989 100644 --- a/vendor/github.com/google/cel-go/parser/gen/cel_listener.go +++ b/vendor/github.com/google/cel-go/parser/gen/cel_listener.go @@ -1,7 +1,8 @@ -// Code generated from /Users/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.12.0. DO NOT EDIT. +// Code generated from /usr/local/google/home/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.13.1. DO NOT EDIT. package gen // CEL -import "github.com/antlr/antlr4/runtime/Go/antlr/v4" +import "github.com/antlr4-go/antlr/v4" + // CELListener is a complete listener for a parse tree produced by CELParser. type CELListener interface { diff --git a/vendor/github.com/google/cel-go/parser/gen/cel_parser.go b/vendor/github.com/google/cel-go/parser/gen/cel_parser.go index 0cb6c8eae88..35334af615b 100644 --- a/vendor/github.com/google/cel-go/parser/gen/cel_parser.go +++ b/vendor/github.com/google/cel-go/parser/gen/cel_parser.go @@ -1,12 +1,12 @@ -// Code generated from /Users/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.12.0. DO NOT EDIT. +// Code generated from /usr/local/google/home/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.13.1. DO NOT EDIT. package gen // CEL import ( "fmt" "strconv" - "sync" + "sync" - "github.com/antlr/antlr4/runtime/Go/antlr/v4" + "github.com/antlr4-go/antlr/v4" ) // Suppress unused import errors @@ -14,166 +14,167 @@ var _ = fmt.Printf var _ = strconv.Itoa var _ = sync.Once{} + type CELParser struct { *antlr.BaseParser } -var celParserStaticData struct { - once sync.Once - serializedATN []int32 - literalNames []string - symbolicNames []string - ruleNames []string - predictionContextCache *antlr.PredictionContextCache - atn *antlr.ATN - decisionToDFA []*antlr.DFA +var CELParserStaticData struct { + once sync.Once + serializedATN []int32 + LiteralNames []string + SymbolicNames []string + RuleNames []string + PredictionContextCache *antlr.PredictionContextCache + atn *antlr.ATN + decisionToDFA []*antlr.DFA } func celParserInit() { - staticData := &celParserStaticData - staticData.literalNames = []string{ - "", "'=='", "'!='", "'in'", "'<'", "'<='", "'>='", "'>'", "'&&'", "'||'", - "'['", "']'", "'{'", "'}'", "'('", "')'", "'.'", "','", "'-'", "'!'", - "'?'", "':'", "'+'", "'*'", "'/'", "'%'", "'true'", "'false'", "'null'", - } - staticData.symbolicNames = []string{ - "", "EQUALS", "NOT_EQUALS", "IN", "LESS", "LESS_EQUALS", "GREATER_EQUALS", - "GREATER", "LOGICAL_AND", "LOGICAL_OR", "LBRACKET", "RPRACKET", "LBRACE", - "RBRACE", "LPAREN", "RPAREN", "DOT", "COMMA", "MINUS", "EXCLAM", "QUESTIONMARK", - "COLON", "PLUS", "STAR", "SLASH", "PERCENT", "CEL_TRUE", "CEL_FALSE", - "NUL", "WHITESPACE", "COMMENT", "NUM_FLOAT", "NUM_INT", "NUM_UINT", - "STRING", "BYTES", "IDENTIFIER", - } - staticData.ruleNames = []string{ - "start", "expr", "conditionalOr", "conditionalAnd", "relation", "calc", - "unary", "member", "primary", "exprList", "listInit", "fieldInitializerList", - "optField", "mapInitializerList", "optExpr", "literal", - } - staticData.predictionContextCache = antlr.NewPredictionContextCache() - staticData.serializedATN = []int32{ - 4, 1, 36, 251, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, - 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, - 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, - 1, 0, 1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9, 186, - 8, 9, 10, 9, 12, 9, 189, 9, 9, 1, 10, 1, 10, 1, 10, 5, 10, 194, 8, 10, - 10, 10, 12, 10, 197, 9, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, - 11, 1, 11, 5, 11, 207, 8, 11, 10, 11, 12, 11, 210, 9, 11, 1, 12, 3, 12, - 213, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, - 13, 1, 13, 5, 13, 225, 8, 13, 10, 13, 12, 13, 228, 9, 13, 1, 14, 3, 14, - 231, 8, 14, 1, 14, 1, 14, 1, 15, 3, 15, 236, 8, 15, 1, 15, 1, 15, 1, 15, - 3, 15, 241, 8, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 249, - 8, 15, 1, 15, 0, 3, 8, 10, 14, 16, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, - 22, 24, 26, 28, 30, 0, 3, 1, 0, 1, 7, 1, 0, 23, 25, 2, 0, 18, 18, 22, 22, - 281, 0, 32, 1, 0, 0, 0, 2, 35, 1, 0, 0, 0, 4, 43, 1, 0, 0, 0, 6, 51, 1, - 0, 0, 0, 8, 59, 1, 0, 0, 0, 10, 70, 1, 0, 0, 0, 12, 97, 1, 0, 0, 0, 14, - 99, 1, 0, 0, 0, 16, 180, 1, 0, 0, 0, 18, 182, 1, 0, 0, 0, 20, 190, 1, 0, - 0, 0, 22, 198, 1, 0, 0, 0, 24, 212, 1, 0, 0, 0, 26, 216, 1, 0, 0, 0, 28, - 230, 1, 0, 0, 0, 30, 248, 1, 0, 0, 0, 32, 33, 3, 2, 1, 0, 33, 34, 5, 0, - 0, 1, 34, 1, 1, 0, 0, 0, 35, 41, 3, 4, 2, 0, 36, 37, 5, 20, 0, 0, 37, 38, - 3, 4, 2, 0, 38, 39, 5, 21, 0, 0, 39, 40, 3, 2, 1, 0, 40, 42, 1, 0, 0, 0, - 41, 36, 1, 0, 0, 0, 41, 42, 1, 0, 0, 0, 42, 3, 1, 0, 0, 0, 43, 48, 3, 6, - 3, 0, 44, 45, 5, 9, 0, 0, 45, 47, 3, 6, 3, 0, 46, 44, 1, 0, 0, 0, 47, 50, - 1, 0, 0, 0, 48, 46, 1, 0, 0, 0, 48, 49, 1, 0, 0, 0, 49, 5, 1, 0, 0, 0, - 50, 48, 1, 0, 0, 0, 51, 56, 3, 8, 4, 0, 52, 53, 5, 8, 0, 0, 53, 55, 3, - 8, 4, 0, 54, 52, 1, 0, 0, 0, 55, 58, 1, 0, 0, 0, 56, 54, 1, 0, 0, 0, 56, - 57, 1, 0, 0, 0, 57, 7, 1, 0, 0, 0, 58, 56, 1, 0, 0, 0, 59, 60, 6, 4, -1, - 0, 60, 61, 3, 10, 5, 0, 61, 67, 1, 0, 0, 0, 62, 63, 10, 1, 0, 0, 63, 64, - 7, 0, 0, 0, 64, 66, 3, 8, 4, 2, 65, 62, 1, 0, 0, 0, 66, 69, 1, 0, 0, 0, - 67, 65, 1, 0, 0, 0, 67, 68, 1, 0, 0, 0, 68, 9, 1, 0, 0, 0, 69, 67, 1, 0, - 0, 0, 70, 71, 6, 5, -1, 0, 71, 72, 3, 12, 6, 0, 72, 81, 1, 0, 0, 0, 73, - 74, 10, 2, 0, 0, 74, 75, 7, 1, 0, 0, 75, 80, 3, 10, 5, 3, 76, 77, 10, 1, - 0, 0, 77, 78, 7, 2, 0, 0, 78, 80, 3, 10, 5, 2, 79, 73, 1, 0, 0, 0, 79, - 76, 1, 0, 0, 0, 80, 83, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 81, 82, 1, 0, 0, - 0, 82, 11, 1, 0, 0, 0, 83, 81, 1, 0, 0, 0, 84, 98, 3, 14, 7, 0, 85, 87, - 5, 19, 0, 0, 86, 85, 1, 0, 0, 0, 87, 88, 1, 0, 0, 0, 88, 86, 1, 0, 0, 0, - 88, 89, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 98, 3, 14, 7, 0, 91, 93, 5, - 18, 0, 0, 92, 91, 1, 0, 0, 0, 93, 94, 1, 0, 0, 0, 94, 92, 1, 0, 0, 0, 94, - 95, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 98, 3, 14, 7, 0, 97, 84, 1, 0, - 0, 0, 97, 86, 1, 0, 0, 0, 97, 92, 1, 0, 0, 0, 98, 13, 1, 0, 0, 0, 99, 100, - 6, 7, -1, 0, 100, 101, 3, 16, 8, 0, 101, 126, 1, 0, 0, 0, 102, 103, 10, - 3, 0, 0, 103, 105, 5, 16, 0, 0, 104, 106, 5, 20, 0, 0, 105, 104, 1, 0, - 0, 0, 105, 106, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 125, 5, 36, 0, 0, - 108, 109, 10, 2, 0, 0, 109, 110, 5, 16, 0, 0, 110, 111, 5, 36, 0, 0, 111, - 113, 5, 14, 0, 0, 112, 114, 3, 18, 9, 0, 113, 112, 1, 0, 0, 0, 113, 114, - 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 125, 5, 15, 0, 0, 116, 117, 10, - 1, 0, 0, 117, 119, 5, 10, 0, 0, 118, 120, 5, 20, 0, 0, 119, 118, 1, 0, - 0, 0, 119, 120, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 122, 3, 2, 1, 0, - 122, 123, 5, 11, 0, 0, 123, 125, 1, 0, 0, 0, 124, 102, 1, 0, 0, 0, 124, - 108, 1, 0, 0, 0, 124, 116, 1, 0, 0, 0, 125, 128, 1, 0, 0, 0, 126, 124, - 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 15, 1, 0, 0, 0, 128, 126, 1, 0, - 0, 0, 129, 131, 5, 16, 0, 0, 130, 129, 1, 0, 0, 0, 130, 131, 1, 0, 0, 0, - 131, 132, 1, 0, 0, 0, 132, 138, 5, 36, 0, 0, 133, 135, 5, 14, 0, 0, 134, - 136, 3, 18, 9, 0, 135, 134, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, - 1, 0, 0, 0, 137, 139, 5, 15, 0, 0, 138, 133, 1, 0, 0, 0, 138, 139, 1, 0, - 0, 0, 139, 181, 1, 0, 0, 0, 140, 141, 5, 14, 0, 0, 141, 142, 3, 2, 1, 0, - 142, 143, 5, 15, 0, 0, 143, 181, 1, 0, 0, 0, 144, 146, 5, 10, 0, 0, 145, - 147, 3, 20, 10, 0, 146, 145, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 149, - 1, 0, 0, 0, 148, 150, 5, 17, 0, 0, 149, 148, 1, 0, 0, 0, 149, 150, 1, 0, - 0, 0, 150, 151, 1, 0, 0, 0, 151, 181, 5, 11, 0, 0, 152, 154, 5, 12, 0, - 0, 153, 155, 3, 26, 13, 0, 154, 153, 1, 0, 0, 0, 154, 155, 1, 0, 0, 0, - 155, 157, 1, 0, 0, 0, 156, 158, 5, 17, 0, 0, 157, 156, 1, 0, 0, 0, 157, - 158, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 181, 5, 13, 0, 0, 160, 162, - 5, 16, 0, 0, 161, 160, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 163, 1, 0, - 0, 0, 163, 168, 5, 36, 0, 0, 164, 165, 5, 16, 0, 0, 165, 167, 5, 36, 0, - 0, 166, 164, 1, 0, 0, 0, 167, 170, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 168, - 169, 1, 0, 0, 0, 169, 171, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 171, 173, - 5, 12, 0, 0, 172, 174, 3, 22, 11, 0, 173, 172, 1, 0, 0, 0, 173, 174, 1, - 0, 0, 0, 174, 176, 1, 0, 0, 0, 175, 177, 5, 17, 0, 0, 176, 175, 1, 0, 0, - 0, 176, 177, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 181, 5, 13, 0, 0, 179, - 181, 3, 30, 15, 0, 180, 130, 1, 0, 0, 0, 180, 140, 1, 0, 0, 0, 180, 144, - 1, 0, 0, 0, 180, 152, 1, 0, 0, 0, 180, 161, 1, 0, 0, 0, 180, 179, 1, 0, - 0, 0, 181, 17, 1, 0, 0, 0, 182, 187, 3, 2, 1, 0, 183, 184, 5, 17, 0, 0, - 184, 186, 3, 2, 1, 0, 185, 183, 1, 0, 0, 0, 186, 189, 1, 0, 0, 0, 187, - 185, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 19, 1, 0, 0, 0, 189, 187, 1, - 0, 0, 0, 190, 195, 3, 28, 14, 0, 191, 192, 5, 17, 0, 0, 192, 194, 3, 28, - 14, 0, 193, 191, 1, 0, 0, 0, 194, 197, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, - 195, 196, 1, 0, 0, 0, 196, 21, 1, 0, 0, 0, 197, 195, 1, 0, 0, 0, 198, 199, - 3, 24, 12, 0, 199, 200, 5, 21, 0, 0, 200, 208, 3, 2, 1, 0, 201, 202, 5, - 17, 0, 0, 202, 203, 3, 24, 12, 0, 203, 204, 5, 21, 0, 0, 204, 205, 3, 2, - 1, 0, 205, 207, 1, 0, 0, 0, 206, 201, 1, 0, 0, 0, 207, 210, 1, 0, 0, 0, - 208, 206, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 23, 1, 0, 0, 0, 210, 208, - 1, 0, 0, 0, 211, 213, 5, 20, 0, 0, 212, 211, 1, 0, 0, 0, 212, 213, 1, 0, - 0, 0, 213, 214, 1, 0, 0, 0, 214, 215, 5, 36, 0, 0, 215, 25, 1, 0, 0, 0, - 216, 217, 3, 28, 14, 0, 217, 218, 5, 21, 0, 0, 218, 226, 3, 2, 1, 0, 219, - 220, 5, 17, 0, 0, 220, 221, 3, 28, 14, 0, 221, 222, 5, 21, 0, 0, 222, 223, - 3, 2, 1, 0, 223, 225, 1, 0, 0, 0, 224, 219, 1, 0, 0, 0, 225, 228, 1, 0, - 0, 0, 226, 224, 1, 0, 0, 0, 226, 227, 1, 0, 0, 0, 227, 27, 1, 0, 0, 0, - 228, 226, 1, 0, 0, 0, 229, 231, 5, 20, 0, 0, 230, 229, 1, 0, 0, 0, 230, - 231, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 233, 3, 2, 1, 0, 233, 29, 1, - 0, 0, 0, 234, 236, 5, 18, 0, 0, 235, 234, 1, 0, 0, 0, 235, 236, 1, 0, 0, - 0, 236, 237, 1, 0, 0, 0, 237, 249, 5, 32, 0, 0, 238, 249, 5, 33, 0, 0, - 239, 241, 5, 18, 0, 0, 240, 239, 1, 0, 0, 0, 240, 241, 1, 0, 0, 0, 241, - 242, 1, 0, 0, 0, 242, 249, 5, 31, 0, 0, 243, 249, 5, 34, 0, 0, 244, 249, - 5, 35, 0, 0, 245, 249, 5, 26, 0, 0, 246, 249, 5, 27, 0, 0, 247, 249, 5, - 28, 0, 0, 248, 235, 1, 0, 0, 0, 248, 238, 1, 0, 0, 0, 248, 240, 1, 0, 0, - 0, 248, 243, 1, 0, 0, 0, 248, 244, 1, 0, 0, 0, 248, 245, 1, 0, 0, 0, 248, - 246, 1, 0, 0, 0, 248, 247, 1, 0, 0, 0, 249, 31, 1, 0, 0, 0, 35, 41, 48, - 56, 67, 79, 81, 88, 94, 97, 105, 113, 119, 124, 126, 130, 135, 138, 146, - 149, 154, 157, 161, 168, 173, 176, 180, 187, 195, 208, 212, 226, 230, 235, - 240, 248, - } - deserializer := antlr.NewATNDeserializer(nil) - staticData.atn = deserializer.Deserialize(staticData.serializedATN) - atn := staticData.atn - staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState)) - decisionToDFA := staticData.decisionToDFA - for index, state := range atn.DecisionToState { - decisionToDFA[index] = antlr.NewDFA(state, index) - } + staticData := &CELParserStaticData + staticData.LiteralNames = []string{ + "", "'=='", "'!='", "'in'", "'<'", "'<='", "'>='", "'>'", "'&&'", "'||'", + "'['", "']'", "'{'", "'}'", "'('", "')'", "'.'", "','", "'-'", "'!'", + "'?'", "':'", "'+'", "'*'", "'/'", "'%'", "'true'", "'false'", "'null'", + } + staticData.SymbolicNames = []string{ + "", "EQUALS", "NOT_EQUALS", "IN", "LESS", "LESS_EQUALS", "GREATER_EQUALS", + "GREATER", "LOGICAL_AND", "LOGICAL_OR", "LBRACKET", "RPRACKET", "LBRACE", + "RBRACE", "LPAREN", "RPAREN", "DOT", "COMMA", "MINUS", "EXCLAM", "QUESTIONMARK", + "COLON", "PLUS", "STAR", "SLASH", "PERCENT", "CEL_TRUE", "CEL_FALSE", + "NUL", "WHITESPACE", "COMMENT", "NUM_FLOAT", "NUM_INT", "NUM_UINT", + "STRING", "BYTES", "IDENTIFIER", + } + staticData.RuleNames = []string{ + "start", "expr", "conditionalOr", "conditionalAnd", "relation", "calc", + "unary", "member", "primary", "exprList", "listInit", "fieldInitializerList", + "optField", "mapInitializerList", "optExpr", "literal", + } + staticData.PredictionContextCache = antlr.NewPredictionContextCache() + staticData.serializedATN = []int32{ + 4, 1, 36, 251, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, + 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, + 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, + 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 42, 8, 1, 1, + 2, 1, 2, 1, 2, 5, 2, 47, 8, 2, 10, 2, 12, 2, 50, 9, 2, 1, 3, 1, 3, 1, 3, + 5, 3, 55, 8, 3, 10, 3, 12, 3, 58, 9, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, + 4, 5, 4, 66, 8, 4, 10, 4, 12, 4, 69, 9, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, + 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 80, 8, 5, 10, 5, 12, 5, 83, 9, 5, 1, 6, 1, + 6, 4, 6, 87, 8, 6, 11, 6, 12, 6, 88, 1, 6, 1, 6, 4, 6, 93, 8, 6, 11, 6, + 12, 6, 94, 1, 6, 3, 6, 98, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, + 7, 106, 8, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 114, 8, 7, 1, 7, + 1, 7, 1, 7, 1, 7, 3, 7, 120, 8, 7, 1, 7, 1, 7, 1, 7, 5, 7, 125, 8, 7, 10, + 7, 12, 7, 128, 9, 7, 1, 8, 3, 8, 131, 8, 8, 1, 8, 1, 8, 1, 8, 3, 8, 136, + 8, 8, 1, 8, 3, 8, 139, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, + 147, 8, 8, 1, 8, 3, 8, 150, 8, 8, 1, 8, 1, 8, 1, 8, 3, 8, 155, 8, 8, 1, + 8, 3, 8, 158, 8, 8, 1, 8, 1, 8, 3, 8, 162, 8, 8, 1, 8, 1, 8, 1, 8, 5, 8, + 167, 8, 8, 10, 8, 12, 8, 170, 9, 8, 1, 8, 1, 8, 3, 8, 174, 8, 8, 1, 8, + 3, 8, 177, 8, 8, 1, 8, 1, 8, 3, 8, 181, 8, 8, 1, 9, 1, 9, 1, 9, 5, 9, 186, + 8, 9, 10, 9, 12, 9, 189, 9, 9, 1, 10, 1, 10, 1, 10, 5, 10, 194, 8, 10, + 10, 10, 12, 10, 197, 9, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, + 11, 1, 11, 5, 11, 207, 8, 11, 10, 11, 12, 11, 210, 9, 11, 1, 12, 3, 12, + 213, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, + 13, 1, 13, 5, 13, 225, 8, 13, 10, 13, 12, 13, 228, 9, 13, 1, 14, 3, 14, + 231, 8, 14, 1, 14, 1, 14, 1, 15, 3, 15, 236, 8, 15, 1, 15, 1, 15, 1, 15, + 3, 15, 241, 8, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 249, + 8, 15, 1, 15, 0, 3, 8, 10, 14, 16, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, + 22, 24, 26, 28, 30, 0, 3, 1, 0, 1, 7, 1, 0, 23, 25, 2, 0, 18, 18, 22, 22, + 281, 0, 32, 1, 0, 0, 0, 2, 35, 1, 0, 0, 0, 4, 43, 1, 0, 0, 0, 6, 51, 1, + 0, 0, 0, 8, 59, 1, 0, 0, 0, 10, 70, 1, 0, 0, 0, 12, 97, 1, 0, 0, 0, 14, + 99, 1, 0, 0, 0, 16, 180, 1, 0, 0, 0, 18, 182, 1, 0, 0, 0, 20, 190, 1, 0, + 0, 0, 22, 198, 1, 0, 0, 0, 24, 212, 1, 0, 0, 0, 26, 216, 1, 0, 0, 0, 28, + 230, 1, 0, 0, 0, 30, 248, 1, 0, 0, 0, 32, 33, 3, 2, 1, 0, 33, 34, 5, 0, + 0, 1, 34, 1, 1, 0, 0, 0, 35, 41, 3, 4, 2, 0, 36, 37, 5, 20, 0, 0, 37, 38, + 3, 4, 2, 0, 38, 39, 5, 21, 0, 0, 39, 40, 3, 2, 1, 0, 40, 42, 1, 0, 0, 0, + 41, 36, 1, 0, 0, 0, 41, 42, 1, 0, 0, 0, 42, 3, 1, 0, 0, 0, 43, 48, 3, 6, + 3, 0, 44, 45, 5, 9, 0, 0, 45, 47, 3, 6, 3, 0, 46, 44, 1, 0, 0, 0, 47, 50, + 1, 0, 0, 0, 48, 46, 1, 0, 0, 0, 48, 49, 1, 0, 0, 0, 49, 5, 1, 0, 0, 0, + 50, 48, 1, 0, 0, 0, 51, 56, 3, 8, 4, 0, 52, 53, 5, 8, 0, 0, 53, 55, 3, + 8, 4, 0, 54, 52, 1, 0, 0, 0, 55, 58, 1, 0, 0, 0, 56, 54, 1, 0, 0, 0, 56, + 57, 1, 0, 0, 0, 57, 7, 1, 0, 0, 0, 58, 56, 1, 0, 0, 0, 59, 60, 6, 4, -1, + 0, 60, 61, 3, 10, 5, 0, 61, 67, 1, 0, 0, 0, 62, 63, 10, 1, 0, 0, 63, 64, + 7, 0, 0, 0, 64, 66, 3, 8, 4, 2, 65, 62, 1, 0, 0, 0, 66, 69, 1, 0, 0, 0, + 67, 65, 1, 0, 0, 0, 67, 68, 1, 0, 0, 0, 68, 9, 1, 0, 0, 0, 69, 67, 1, 0, + 0, 0, 70, 71, 6, 5, -1, 0, 71, 72, 3, 12, 6, 0, 72, 81, 1, 0, 0, 0, 73, + 74, 10, 2, 0, 0, 74, 75, 7, 1, 0, 0, 75, 80, 3, 10, 5, 3, 76, 77, 10, 1, + 0, 0, 77, 78, 7, 2, 0, 0, 78, 80, 3, 10, 5, 2, 79, 73, 1, 0, 0, 0, 79, + 76, 1, 0, 0, 0, 80, 83, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 81, 82, 1, 0, 0, + 0, 82, 11, 1, 0, 0, 0, 83, 81, 1, 0, 0, 0, 84, 98, 3, 14, 7, 0, 85, 87, + 5, 19, 0, 0, 86, 85, 1, 0, 0, 0, 87, 88, 1, 0, 0, 0, 88, 86, 1, 0, 0, 0, + 88, 89, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 98, 3, 14, 7, 0, 91, 93, 5, + 18, 0, 0, 92, 91, 1, 0, 0, 0, 93, 94, 1, 0, 0, 0, 94, 92, 1, 0, 0, 0, 94, + 95, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 98, 3, 14, 7, 0, 97, 84, 1, 0, + 0, 0, 97, 86, 1, 0, 0, 0, 97, 92, 1, 0, 0, 0, 98, 13, 1, 0, 0, 0, 99, 100, + 6, 7, -1, 0, 100, 101, 3, 16, 8, 0, 101, 126, 1, 0, 0, 0, 102, 103, 10, + 3, 0, 0, 103, 105, 5, 16, 0, 0, 104, 106, 5, 20, 0, 0, 105, 104, 1, 0, + 0, 0, 105, 106, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 125, 5, 36, 0, 0, + 108, 109, 10, 2, 0, 0, 109, 110, 5, 16, 0, 0, 110, 111, 5, 36, 0, 0, 111, + 113, 5, 14, 0, 0, 112, 114, 3, 18, 9, 0, 113, 112, 1, 0, 0, 0, 113, 114, + 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 125, 5, 15, 0, 0, 116, 117, 10, + 1, 0, 0, 117, 119, 5, 10, 0, 0, 118, 120, 5, 20, 0, 0, 119, 118, 1, 0, + 0, 0, 119, 120, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 122, 3, 2, 1, 0, + 122, 123, 5, 11, 0, 0, 123, 125, 1, 0, 0, 0, 124, 102, 1, 0, 0, 0, 124, + 108, 1, 0, 0, 0, 124, 116, 1, 0, 0, 0, 125, 128, 1, 0, 0, 0, 126, 124, + 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 15, 1, 0, 0, 0, 128, 126, 1, 0, + 0, 0, 129, 131, 5, 16, 0, 0, 130, 129, 1, 0, 0, 0, 130, 131, 1, 0, 0, 0, + 131, 132, 1, 0, 0, 0, 132, 138, 5, 36, 0, 0, 133, 135, 5, 14, 0, 0, 134, + 136, 3, 18, 9, 0, 135, 134, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, + 1, 0, 0, 0, 137, 139, 5, 15, 0, 0, 138, 133, 1, 0, 0, 0, 138, 139, 1, 0, + 0, 0, 139, 181, 1, 0, 0, 0, 140, 141, 5, 14, 0, 0, 141, 142, 3, 2, 1, 0, + 142, 143, 5, 15, 0, 0, 143, 181, 1, 0, 0, 0, 144, 146, 5, 10, 0, 0, 145, + 147, 3, 20, 10, 0, 146, 145, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 149, + 1, 0, 0, 0, 148, 150, 5, 17, 0, 0, 149, 148, 1, 0, 0, 0, 149, 150, 1, 0, + 0, 0, 150, 151, 1, 0, 0, 0, 151, 181, 5, 11, 0, 0, 152, 154, 5, 12, 0, + 0, 153, 155, 3, 26, 13, 0, 154, 153, 1, 0, 0, 0, 154, 155, 1, 0, 0, 0, + 155, 157, 1, 0, 0, 0, 156, 158, 5, 17, 0, 0, 157, 156, 1, 0, 0, 0, 157, + 158, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 181, 5, 13, 0, 0, 160, 162, + 5, 16, 0, 0, 161, 160, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 163, 1, 0, + 0, 0, 163, 168, 5, 36, 0, 0, 164, 165, 5, 16, 0, 0, 165, 167, 5, 36, 0, + 0, 166, 164, 1, 0, 0, 0, 167, 170, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 168, + 169, 1, 0, 0, 0, 169, 171, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 171, 173, + 5, 12, 0, 0, 172, 174, 3, 22, 11, 0, 173, 172, 1, 0, 0, 0, 173, 174, 1, + 0, 0, 0, 174, 176, 1, 0, 0, 0, 175, 177, 5, 17, 0, 0, 176, 175, 1, 0, 0, + 0, 176, 177, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 181, 5, 13, 0, 0, 179, + 181, 3, 30, 15, 0, 180, 130, 1, 0, 0, 0, 180, 140, 1, 0, 0, 0, 180, 144, + 1, 0, 0, 0, 180, 152, 1, 0, 0, 0, 180, 161, 1, 0, 0, 0, 180, 179, 1, 0, + 0, 0, 181, 17, 1, 0, 0, 0, 182, 187, 3, 2, 1, 0, 183, 184, 5, 17, 0, 0, + 184, 186, 3, 2, 1, 0, 185, 183, 1, 0, 0, 0, 186, 189, 1, 0, 0, 0, 187, + 185, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 19, 1, 0, 0, 0, 189, 187, 1, + 0, 0, 0, 190, 195, 3, 28, 14, 0, 191, 192, 5, 17, 0, 0, 192, 194, 3, 28, + 14, 0, 193, 191, 1, 0, 0, 0, 194, 197, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, + 195, 196, 1, 0, 0, 0, 196, 21, 1, 0, 0, 0, 197, 195, 1, 0, 0, 0, 198, 199, + 3, 24, 12, 0, 199, 200, 5, 21, 0, 0, 200, 208, 3, 2, 1, 0, 201, 202, 5, + 17, 0, 0, 202, 203, 3, 24, 12, 0, 203, 204, 5, 21, 0, 0, 204, 205, 3, 2, + 1, 0, 205, 207, 1, 0, 0, 0, 206, 201, 1, 0, 0, 0, 207, 210, 1, 0, 0, 0, + 208, 206, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 23, 1, 0, 0, 0, 210, 208, + 1, 0, 0, 0, 211, 213, 5, 20, 0, 0, 212, 211, 1, 0, 0, 0, 212, 213, 1, 0, + 0, 0, 213, 214, 1, 0, 0, 0, 214, 215, 5, 36, 0, 0, 215, 25, 1, 0, 0, 0, + 216, 217, 3, 28, 14, 0, 217, 218, 5, 21, 0, 0, 218, 226, 3, 2, 1, 0, 219, + 220, 5, 17, 0, 0, 220, 221, 3, 28, 14, 0, 221, 222, 5, 21, 0, 0, 222, 223, + 3, 2, 1, 0, 223, 225, 1, 0, 0, 0, 224, 219, 1, 0, 0, 0, 225, 228, 1, 0, + 0, 0, 226, 224, 1, 0, 0, 0, 226, 227, 1, 0, 0, 0, 227, 27, 1, 0, 0, 0, + 228, 226, 1, 0, 0, 0, 229, 231, 5, 20, 0, 0, 230, 229, 1, 0, 0, 0, 230, + 231, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 233, 3, 2, 1, 0, 233, 29, 1, + 0, 0, 0, 234, 236, 5, 18, 0, 0, 235, 234, 1, 0, 0, 0, 235, 236, 1, 0, 0, + 0, 236, 237, 1, 0, 0, 0, 237, 249, 5, 32, 0, 0, 238, 249, 5, 33, 0, 0, + 239, 241, 5, 18, 0, 0, 240, 239, 1, 0, 0, 0, 240, 241, 1, 0, 0, 0, 241, + 242, 1, 0, 0, 0, 242, 249, 5, 31, 0, 0, 243, 249, 5, 34, 0, 0, 244, 249, + 5, 35, 0, 0, 245, 249, 5, 26, 0, 0, 246, 249, 5, 27, 0, 0, 247, 249, 5, + 28, 0, 0, 248, 235, 1, 0, 0, 0, 248, 238, 1, 0, 0, 0, 248, 240, 1, 0, 0, + 0, 248, 243, 1, 0, 0, 0, 248, 244, 1, 0, 0, 0, 248, 245, 1, 0, 0, 0, 248, + 246, 1, 0, 0, 0, 248, 247, 1, 0, 0, 0, 249, 31, 1, 0, 0, 0, 35, 41, 48, + 56, 67, 79, 81, 88, 94, 97, 105, 113, 119, 124, 126, 130, 135, 138, 146, + 149, 154, 157, 161, 168, 173, 176, 180, 187, 195, 208, 212, 226, 230, 235, + 240, 248, +} + deserializer := antlr.NewATNDeserializer(nil) + staticData.atn = deserializer.Deserialize(staticData.serializedATN) + atn := staticData.atn + staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState)) + decisionToDFA := staticData.decisionToDFA + for index, state := range atn.DecisionToState { + decisionToDFA[index] = antlr.NewDFA(state, index) + } } // CELParserInit initializes any static state used to implement CELParser. By default the @@ -181,8 +182,8 @@ func celParserInit() { // NewCELParser(). You can call this function if you wish to initialize the static state ahead // of time. func CELParserInit() { - staticData := &celParserStaticData - staticData.once.Do(celParserInit) + staticData := &CELParserStaticData + staticData.once.Do(celParserInit) } // NewCELParser produces a new parser instance for the optional input antlr.TokenStream. @@ -190,75 +191,76 @@ func NewCELParser(input antlr.TokenStream) *CELParser { CELParserInit() this := new(CELParser) this.BaseParser = antlr.NewBaseParser(input) - staticData := &celParserStaticData - this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.predictionContextCache) - this.RuleNames = staticData.ruleNames - this.LiteralNames = staticData.literalNames - this.SymbolicNames = staticData.symbolicNames + staticData := &CELParserStaticData + this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache) + this.RuleNames = staticData.RuleNames + this.LiteralNames = staticData.LiteralNames + this.SymbolicNames = staticData.SymbolicNames this.GrammarFileName = "CEL.g4" return this } + // CELParser tokens. const ( - CELParserEOF = antlr.TokenEOF - CELParserEQUALS = 1 - CELParserNOT_EQUALS = 2 - CELParserIN = 3 - CELParserLESS = 4 - CELParserLESS_EQUALS = 5 + CELParserEOF = antlr.TokenEOF + CELParserEQUALS = 1 + CELParserNOT_EQUALS = 2 + CELParserIN = 3 + CELParserLESS = 4 + CELParserLESS_EQUALS = 5 CELParserGREATER_EQUALS = 6 - CELParserGREATER = 7 - CELParserLOGICAL_AND = 8 - CELParserLOGICAL_OR = 9 - CELParserLBRACKET = 10 - CELParserRPRACKET = 11 - CELParserLBRACE = 12 - CELParserRBRACE = 13 - CELParserLPAREN = 14 - CELParserRPAREN = 15 - CELParserDOT = 16 - CELParserCOMMA = 17 - CELParserMINUS = 18 - CELParserEXCLAM = 19 - CELParserQUESTIONMARK = 20 - CELParserCOLON = 21 - CELParserPLUS = 22 - CELParserSTAR = 23 - CELParserSLASH = 24 - CELParserPERCENT = 25 - CELParserCEL_TRUE = 26 - CELParserCEL_FALSE = 27 - CELParserNUL = 28 - CELParserWHITESPACE = 29 - CELParserCOMMENT = 30 - CELParserNUM_FLOAT = 31 - CELParserNUM_INT = 32 - CELParserNUM_UINT = 33 - CELParserSTRING = 34 - CELParserBYTES = 35 - CELParserIDENTIFIER = 36 + CELParserGREATER = 7 + CELParserLOGICAL_AND = 8 + CELParserLOGICAL_OR = 9 + CELParserLBRACKET = 10 + CELParserRPRACKET = 11 + CELParserLBRACE = 12 + CELParserRBRACE = 13 + CELParserLPAREN = 14 + CELParserRPAREN = 15 + CELParserDOT = 16 + CELParserCOMMA = 17 + CELParserMINUS = 18 + CELParserEXCLAM = 19 + CELParserQUESTIONMARK = 20 + CELParserCOLON = 21 + CELParserPLUS = 22 + CELParserSTAR = 23 + CELParserSLASH = 24 + CELParserPERCENT = 25 + CELParserCEL_TRUE = 26 + CELParserCEL_FALSE = 27 + CELParserNUL = 28 + CELParserWHITESPACE = 29 + CELParserCOMMENT = 30 + CELParserNUM_FLOAT = 31 + CELParserNUM_INT = 32 + CELParserNUM_UINT = 33 + CELParserSTRING = 34 + CELParserBYTES = 35 + CELParserIDENTIFIER = 36 ) // CELParser rules. const ( - CELParserRULE_start = 0 - CELParserRULE_expr = 1 - CELParserRULE_conditionalOr = 2 - CELParserRULE_conditionalAnd = 3 - CELParserRULE_relation = 4 - CELParserRULE_calc = 5 - CELParserRULE_unary = 6 - CELParserRULE_member = 7 - CELParserRULE_primary = 8 - CELParserRULE_exprList = 9 - CELParserRULE_listInit = 10 + CELParserRULE_start = 0 + CELParserRULE_expr = 1 + CELParserRULE_conditionalOr = 2 + CELParserRULE_conditionalAnd = 3 + CELParserRULE_relation = 4 + CELParserRULE_calc = 5 + CELParserRULE_unary = 6 + CELParserRULE_member = 7 + CELParserRULE_primary = 8 + CELParserRULE_exprList = 9 + CELParserRULE_listInit = 10 CELParserRULE_fieldInitializerList = 11 - CELParserRULE_optField = 12 - CELParserRULE_mapInitializerList = 13 - CELParserRULE_optExpr = 14 - CELParserRULE_literal = 15 + CELParserRULE_optField = 12 + CELParserRULE_mapInitializerList = 13 + CELParserRULE_optExpr = 14 + CELParserRULE_literal = 15 ) // IStartContext is an interface to support dynamic dispatch. @@ -271,9 +273,11 @@ type IStartContext interface { // GetE returns the e rule contexts. GetE() IExprContext + // SetE sets the e rule contexts. SetE(IExprContext) + // Getter signatures EOF() antlr.TerminalNode Expr() IExprContext @@ -283,24 +287,29 @@ type IStartContext interface { } type StartContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser - e IExprContext + e IExprContext } func NewEmptyStartContext() *StartContext { var p = new(StartContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_start return p } +func InitEmptyStartContext(p *StartContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_start +} + func (*StartContext) IsStartContext() {} func NewStartContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StartContext { var p = new(StartContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_start @@ -312,17 +321,19 @@ func (s *StartContext) GetParser() antlr.Parser { return s.parser } func (s *StartContext) GetE() IExprContext { return s.e } + func (s *StartContext) SetE(v IExprContext) { s.e = v } + func (s *StartContext) EOF() antlr.TerminalNode { return s.GetToken(CELParserEOF, 0) } func (s *StartContext) Expr() IExprContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -342,6 +353,7 @@ func (s *StartContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *StartContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterStart(s) @@ -364,45 +376,46 @@ func (s *StartContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } -func (p *CELParser) Start() (localctx IStartContext) { - this := p - _ = this - localctx = NewStartContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 0, CELParserRULE_start) - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() +func (p *CELParser) Start_() (localctx IStartContext) { + localctx = NewStartContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 0, CELParserRULE_start) p.EnterOuterAlt(localctx, 1) { p.SetState(32) var _x = p.Expr() + localctx.(*StartContext).e = _x } { p.SetState(33) p.Match(CELParserEOF) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IExprContext is an interface to support dynamic dispatch. type IExprContext interface { antlr.ParserRuleContext @@ -411,10 +424,12 @@ type IExprContext interface { GetParser() antlr.Parser // GetOp returns the op token. - GetOp() antlr.Token + GetOp() antlr.Token + // SetOp sets the op token. - SetOp(antlr.Token) + SetOp(antlr.Token) + // GetE returns the e rule contexts. GetE() IConditionalOrContext @@ -425,6 +440,7 @@ type IExprContext interface { // GetE2 returns the e2 rule contexts. GetE2() IExprContext + // SetE sets the e rule contexts. SetE(IConditionalOrContext) @@ -434,6 +450,7 @@ type IExprContext interface { // SetE2 sets the e2 rule contexts. SetE2(IExprContext) + // Getter signatures AllConditionalOr() []IConditionalOrContext ConditionalOr(i int) IConditionalOrContext @@ -446,27 +463,32 @@ type IExprContext interface { } type ExprContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser - e IConditionalOrContext - op antlr.Token - e1 IConditionalOrContext - e2 IExprContext + e IConditionalOrContext + op antlr.Token + e1 IConditionalOrContext + e2 IExprContext } func NewEmptyExprContext() *ExprContext { var p = new(ExprContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_expr return p } +func InitEmptyExprContext(p *ExprContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_expr +} + func (*ExprContext) IsExprContext() {} func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprContext { var p = new(ExprContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_expr @@ -478,20 +500,24 @@ func (s *ExprContext) GetParser() antlr.Parser { return s.parser } func (s *ExprContext) GetOp() antlr.Token { return s.op } + func (s *ExprContext) SetOp(v antlr.Token) { s.op = v } + func (s *ExprContext) GetE() IConditionalOrContext { return s.e } func (s *ExprContext) GetE1() IConditionalOrContext { return s.e1 } func (s *ExprContext) GetE2() IExprContext { return s.e2 } + func (s *ExprContext) SetE(v IConditionalOrContext) { s.e = v } func (s *ExprContext) SetE1(v IConditionalOrContext) { s.e1 = v } func (s *ExprContext) SetE2(v IExprContext) { s.e2 = v } + func (s *ExprContext) AllConditionalOr() []IConditionalOrContext { children := s.GetChildren() len := 0 @@ -514,12 +540,12 @@ func (s *ExprContext) AllConditionalOr() []IConditionalOrContext { } func (s *ExprContext) ConditionalOr(i int) IConditionalOrContext { - var t antlr.RuleContext + var t antlr.RuleContext; j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IConditionalOrContext); ok { if j == i { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } j++ @@ -542,10 +568,10 @@ func (s *ExprContext) QUESTIONMARK() antlr.TerminalNode { } func (s *ExprContext) Expr() IExprContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -565,6 +591,7 @@ func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) s return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *ExprContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterExpr(s) @@ -587,42 +614,31 @@ func (s *ExprContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } -func (p *CELParser) Expr() (localctx IExprContext) { - this := p - _ = this + + +func (p *CELParser) Expr() (localctx IExprContext) { localctx = NewExprContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 2, CELParserRULE_expr) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(35) var _x = p.ConditionalOr() + localctx.(*ExprContext).e = _x } p.SetState(41) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserQUESTIONMARK { { p.SetState(36) @@ -630,31 +646,54 @@ func (p *CELParser) Expr() (localctx IExprContext) { var _m = p.Match(CELParserQUESTIONMARK) localctx.(*ExprContext).op = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(37) var _x = p.ConditionalOr() + localctx.(*ExprContext).e1 = _x } { p.SetState(38) p.Match(CELParserCOLON) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(39) var _x = p.Expr() + localctx.(*ExprContext).e2 = _x } } + + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IConditionalOrContext is an interface to support dynamic dispatch. type IConditionalOrContext interface { antlr.ParserRuleContext @@ -663,34 +702,42 @@ type IConditionalOrContext interface { GetParser() antlr.Parser // GetS9 returns the s9 token. - GetS9() antlr.Token + GetS9() antlr.Token + // SetS9 sets the s9 token. - SetS9(antlr.Token) + SetS9(antlr.Token) + // GetOps returns the ops token list. GetOps() []antlr.Token + // SetOps sets the ops token list. SetOps([]antlr.Token) + // GetE returns the e rule contexts. GetE() IConditionalAndContext // Get_conditionalAnd returns the _conditionalAnd rule contexts. Get_conditionalAnd() IConditionalAndContext + // SetE sets the e rule contexts. SetE(IConditionalAndContext) // Set_conditionalAnd sets the _conditionalAnd rule contexts. Set_conditionalAnd(IConditionalAndContext) + // GetE1 returns the e1 rule context list. GetE1() []IConditionalAndContext + // SetE1 sets the e1 rule context list. - SetE1([]IConditionalAndContext) + SetE1([]IConditionalAndContext) + // Getter signatures AllConditionalAnd() []IConditionalAndContext @@ -703,28 +750,33 @@ type IConditionalOrContext interface { } type ConditionalOrContext struct { - *antlr.BaseParserRuleContext - parser antlr.Parser - e IConditionalAndContext - s9 antlr.Token - ops []antlr.Token - _conditionalAnd IConditionalAndContext - e1 []IConditionalAndContext + antlr.BaseParserRuleContext + parser antlr.Parser + e IConditionalAndContext + s9 antlr.Token + ops []antlr.Token + _conditionalAnd IConditionalAndContext + e1 []IConditionalAndContext } func NewEmptyConditionalOrContext() *ConditionalOrContext { var p = new(ConditionalOrContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_conditionalOr return p } +func InitEmptyConditionalOrContext(p *ConditionalOrContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_conditionalOr +} + func (*ConditionalOrContext) IsConditionalOrContext() {} func NewConditionalOrContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ConditionalOrContext { var p = new(ConditionalOrContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_conditionalOr @@ -736,24 +788,32 @@ func (s *ConditionalOrContext) GetParser() antlr.Parser { return s.parser } func (s *ConditionalOrContext) GetS9() antlr.Token { return s.s9 } + func (s *ConditionalOrContext) SetS9(v antlr.Token) { s.s9 = v } + func (s *ConditionalOrContext) GetOps() []antlr.Token { return s.ops } + func (s *ConditionalOrContext) SetOps(v []antlr.Token) { s.ops = v } + func (s *ConditionalOrContext) GetE() IConditionalAndContext { return s.e } func (s *ConditionalOrContext) Get_conditionalAnd() IConditionalAndContext { return s._conditionalAnd } + func (s *ConditionalOrContext) SetE(v IConditionalAndContext) { s.e = v } func (s *ConditionalOrContext) Set_conditionalAnd(v IConditionalAndContext) { s._conditionalAnd = v } + func (s *ConditionalOrContext) GetE1() []IConditionalAndContext { return s.e1 } + func (s *ConditionalOrContext) SetE1(v []IConditionalAndContext) { s.e1 = v } + func (s *ConditionalOrContext) AllConditionalAnd() []IConditionalAndContext { children := s.GetChildren() len := 0 @@ -776,12 +836,12 @@ func (s *ConditionalOrContext) AllConditionalAnd() []IConditionalAndContext { } func (s *ConditionalOrContext) ConditionalAnd(i int) IConditionalAndContext { - var t antlr.RuleContext + var t antlr.RuleContext; j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IConditionalAndContext); ok { if j == i { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } j++ @@ -811,6 +871,7 @@ func (s *ConditionalOrContext) ToStringTree(ruleNames []string, recog antlr.Reco return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *ConditionalOrContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterConditionalOr(s) @@ -833,42 +894,31 @@ func (s *ConditionalOrContext) Accept(visitor antlr.ParseTreeVisitor) interface{ } } -func (p *CELParser) ConditionalOr() (localctx IConditionalOrContext) { - this := p - _ = this + + +func (p *CELParser) ConditionalOr() (localctx IConditionalOrContext) { localctx = NewConditionalOrContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 4, CELParserRULE_conditionalOr) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(43) var _x = p.ConditionalAnd() + localctx.(*ConditionalOrContext).e = _x } p.SetState(48) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + for _la == CELParserLOGICAL_OR { { p.SetState(44) @@ -876,6 +926,10 @@ func (p *CELParser) ConditionalOr() (localctx IConditionalOrContext) { var _m = p.Match(CELParserLOGICAL_OR) localctx.(*ConditionalOrContext).s9 = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } localctx.(*ConditionalOrContext).ops = append(localctx.(*ConditionalOrContext).ops, localctx.(*ConditionalOrContext).s9) { @@ -883,18 +937,36 @@ func (p *CELParser) ConditionalOr() (localctx IConditionalOrContext) { var _x = p.ConditionalAnd() + localctx.(*ConditionalOrContext)._conditionalAnd = _x } localctx.(*ConditionalOrContext).e1 = append(localctx.(*ConditionalOrContext).e1, localctx.(*ConditionalOrContext)._conditionalAnd) + p.SetState(50) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } + + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IConditionalAndContext is an interface to support dynamic dispatch. type IConditionalAndContext interface { antlr.ParserRuleContext @@ -903,34 +975,42 @@ type IConditionalAndContext interface { GetParser() antlr.Parser // GetS8 returns the s8 token. - GetS8() antlr.Token + GetS8() antlr.Token + // SetS8 sets the s8 token. - SetS8(antlr.Token) + SetS8(antlr.Token) + // GetOps returns the ops token list. GetOps() []antlr.Token + // SetOps sets the ops token list. SetOps([]antlr.Token) + // GetE returns the e rule contexts. GetE() IRelationContext // Get_relation returns the _relation rule contexts. Get_relation() IRelationContext + // SetE sets the e rule contexts. SetE(IRelationContext) // Set_relation sets the _relation rule contexts. Set_relation(IRelationContext) + // GetE1 returns the e1 rule context list. GetE1() []IRelationContext + // SetE1 sets the e1 rule context list. - SetE1([]IRelationContext) + SetE1([]IRelationContext) + // Getter signatures AllRelation() []IRelationContext @@ -943,28 +1023,33 @@ type IConditionalAndContext interface { } type ConditionalAndContext struct { - *antlr.BaseParserRuleContext - parser antlr.Parser - e IRelationContext - s8 antlr.Token - ops []antlr.Token - _relation IRelationContext - e1 []IRelationContext + antlr.BaseParserRuleContext + parser antlr.Parser + e IRelationContext + s8 antlr.Token + ops []antlr.Token + _relation IRelationContext + e1 []IRelationContext } func NewEmptyConditionalAndContext() *ConditionalAndContext { var p = new(ConditionalAndContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_conditionalAnd return p } +func InitEmptyConditionalAndContext(p *ConditionalAndContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_conditionalAnd +} + func (*ConditionalAndContext) IsConditionalAndContext() {} func NewConditionalAndContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ConditionalAndContext { var p = new(ConditionalAndContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_conditionalAnd @@ -976,24 +1061,32 @@ func (s *ConditionalAndContext) GetParser() antlr.Parser { return s.parser } func (s *ConditionalAndContext) GetS8() antlr.Token { return s.s8 } + func (s *ConditionalAndContext) SetS8(v antlr.Token) { s.s8 = v } + func (s *ConditionalAndContext) GetOps() []antlr.Token { return s.ops } + func (s *ConditionalAndContext) SetOps(v []antlr.Token) { s.ops = v } + func (s *ConditionalAndContext) GetE() IRelationContext { return s.e } func (s *ConditionalAndContext) Get_relation() IRelationContext { return s._relation } + func (s *ConditionalAndContext) SetE(v IRelationContext) { s.e = v } func (s *ConditionalAndContext) Set_relation(v IRelationContext) { s._relation = v } + func (s *ConditionalAndContext) GetE1() []IRelationContext { return s.e1 } + func (s *ConditionalAndContext) SetE1(v []IRelationContext) { s.e1 = v } + func (s *ConditionalAndContext) AllRelation() []IRelationContext { children := s.GetChildren() len := 0 @@ -1016,12 +1109,12 @@ func (s *ConditionalAndContext) AllRelation() []IRelationContext { } func (s *ConditionalAndContext) Relation(i int) IRelationContext { - var t antlr.RuleContext + var t antlr.RuleContext; j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IRelationContext); ok { if j == i { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } j++ @@ -1051,6 +1144,7 @@ func (s *ConditionalAndContext) ToStringTree(ruleNames []string, recog antlr.Rec return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *ConditionalAndContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterConditionalAnd(s) @@ -1073,30 +1167,14 @@ func (s *ConditionalAndContext) Accept(visitor antlr.ParseTreeVisitor) interface } } -func (p *CELParser) ConditionalAnd() (localctx IConditionalAndContext) { - this := p - _ = this + + +func (p *CELParser) ConditionalAnd() (localctx IConditionalAndContext) { localctx = NewConditionalAndContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 6, CELParserRULE_conditionalAnd) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(51) @@ -1107,8 +1185,12 @@ func (p *CELParser) ConditionalAnd() (localctx IConditionalAndContext) { } p.SetState(56) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + for _la == CELParserLOGICAL_AND { { p.SetState(52) @@ -1116,6 +1198,10 @@ func (p *CELParser) ConditionalAnd() (localctx IConditionalAndContext) { var _m = p.Match(CELParserLOGICAL_AND) localctx.(*ConditionalAndContext).s8 = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } localctx.(*ConditionalAndContext).ops = append(localctx.(*ConditionalAndContext).ops, localctx.(*ConditionalAndContext).s8) { @@ -1127,14 +1213,31 @@ func (p *CELParser) ConditionalAnd() (localctx IConditionalAndContext) { } localctx.(*ConditionalAndContext).e1 = append(localctx.(*ConditionalAndContext).e1, localctx.(*ConditionalAndContext)._relation) + p.SetState(58) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } + + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IRelationContext is an interface to support dynamic dispatch. type IRelationContext interface { antlr.ParserRuleContext @@ -1143,10 +1246,12 @@ type IRelationContext interface { GetParser() antlr.Parser // GetOp returns the op token. - GetOp() antlr.Token + GetOp() antlr.Token + // SetOp sets the op token. - SetOp(antlr.Token) + SetOp(antlr.Token) + // Getter signatures Calc() ICalcContext @@ -1165,24 +1270,29 @@ type IRelationContext interface { } type RelationContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser - op antlr.Token + op antlr.Token } func NewEmptyRelationContext() *RelationContext { var p = new(RelationContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_relation return p } +func InitEmptyRelationContext(p *RelationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_relation +} + func (*RelationContext) IsRelationContext() {} func NewRelationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RelationContext { var p = new(RelationContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_relation @@ -1194,13 +1304,15 @@ func (s *RelationContext) GetParser() antlr.Parser { return s.parser } func (s *RelationContext) GetOp() antlr.Token { return s.op } + func (s *RelationContext) SetOp(v antlr.Token) { s.op = v } + func (s *RelationContext) Calc() ICalcContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICalcContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -1234,12 +1346,12 @@ func (s *RelationContext) AllRelation() []IRelationContext { } func (s *RelationContext) Relation(i int) IRelationContext { - var t antlr.RuleContext + var t antlr.RuleContext; j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IRelationContext); ok { if j == i { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } j++ @@ -1289,6 +1401,7 @@ func (s *RelationContext) ToStringTree(ruleNames []string, recog antlr.Recognize return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *RelationContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterRelation(s) @@ -1311,15 +1424,17 @@ func (s *RelationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + + + + func (p *CELParser) Relation() (localctx IRelationContext) { return p.relation(0) } func (p *CELParser) relation(_p int) (localctx IRelationContext) { - this := p - _ = this - var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + _parentState := p.GetState() localctx = NewRelationContext(p, p.GetParserRuleContext(), _parentState) var _prevctx IRelationContext = localctx @@ -1328,22 +1443,6 @@ func (p *CELParser) relation(_p int) (localctx IRelationContext) { p.EnterRecursionRule(localctx, 8, CELParserRULE_relation, _p) var _la int - defer func() { - p.UnrollRecursionContexts(_parentctx) - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - var _alt int p.EnterOuterAlt(localctx, 1) @@ -1355,8 +1454,13 @@ func (p *CELParser) relation(_p int) (localctx IRelationContext) { p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) p.SetState(67) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) - + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 3, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { if p.GetParseListeners() != nil { @@ -1368,7 +1472,8 @@ func (p *CELParser) relation(_p int) (localctx IRelationContext) { p.SetState(62) if !(p.Precpred(p.GetParserRuleContext(), 1)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) + goto errorExit } { p.SetState(63) @@ -1379,7 +1484,7 @@ func (p *CELParser) relation(_p int) (localctx IRelationContext) { _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&254) != 0) { + if !(((int64(_la) & ^0x3f) == 0 && ((int64(1) << _la) & 254) != 0)) { var _ri = p.GetErrorHandler().RecoverInline(p) localctx.(*RelationContext).op = _ri @@ -1393,15 +1498,35 @@ func (p *CELParser) relation(_p int) (localctx IRelationContext) { p.relation(2) } + } p.SetState(69) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 3, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } + + + errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.UnrollRecursionContexts(_parentctx) return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // ICalcContext is an interface to support dynamic dispatch. type ICalcContext interface { antlr.ParserRuleContext @@ -1410,10 +1535,12 @@ type ICalcContext interface { GetParser() antlr.Parser // GetOp returns the op token. - GetOp() antlr.Token + GetOp() antlr.Token + // SetOp sets the op token. - SetOp(antlr.Token) + SetOp(antlr.Token) + // Getter signatures Unary() IUnaryContext @@ -1430,24 +1557,29 @@ type ICalcContext interface { } type CalcContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser - op antlr.Token + op antlr.Token } func NewEmptyCalcContext() *CalcContext { var p = new(CalcContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_calc return p } +func InitEmptyCalcContext(p *CalcContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_calc +} + func (*CalcContext) IsCalcContext() {} func NewCalcContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CalcContext { var p = new(CalcContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_calc @@ -1459,13 +1591,15 @@ func (s *CalcContext) GetParser() antlr.Parser { return s.parser } func (s *CalcContext) GetOp() antlr.Token { return s.op } + func (s *CalcContext) SetOp(v antlr.Token) { s.op = v } + func (s *CalcContext) Unary() IUnaryContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IUnaryContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -1499,12 +1633,12 @@ func (s *CalcContext) AllCalc() []ICalcContext { } func (s *CalcContext) Calc(i int) ICalcContext { - var t antlr.RuleContext + var t antlr.RuleContext; j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICalcContext); ok { if j == i { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } j++ @@ -1546,6 +1680,7 @@ func (s *CalcContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) s return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *CalcContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterCalc(s) @@ -1568,15 +1703,17 @@ func (s *CalcContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + + + + func (p *CELParser) Calc() (localctx ICalcContext) { return p.calc(0) } func (p *CELParser) calc(_p int) (localctx ICalcContext) { - this := p - _ = this - var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + _parentState := p.GetState() localctx = NewCalcContext(p, p.GetParserRuleContext(), _parentState) var _prevctx ICalcContext = localctx @@ -1585,22 +1722,6 @@ func (p *CELParser) calc(_p int) (localctx ICalcContext) { p.EnterRecursionRule(localctx, 10, CELParserRULE_calc, _p) var _la int - defer func() { - p.UnrollRecursionContexts(_parentctx) - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - var _alt int p.EnterOuterAlt(localctx, 1) @@ -1612,8 +1733,13 @@ func (p *CELParser) calc(_p int) (localctx ICalcContext) { p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) p.SetState(81) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 5, p.GetParserRuleContext()) - + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 5, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { if p.GetParseListeners() != nil { @@ -1622,14 +1748,19 @@ func (p *CELParser) calc(_p int) (localctx ICalcContext) { _prevctx = localctx p.SetState(79) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 4, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 4, p.GetParserRuleContext()) { case 1: localctx = NewCalcContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CELParserRULE_calc) p.SetState(73) if !(p.Precpred(p.GetParserRuleContext(), 2)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) + goto errorExit } { p.SetState(74) @@ -1640,7 +1771,7 @@ func (p *CELParser) calc(_p int) (localctx ICalcContext) { _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&58720256) != 0) { + if !(((int64(_la) & ^0x3f) == 0 && ((int64(1) << _la) & 58720256) != 0)) { var _ri = p.GetErrorHandler().RecoverInline(p) localctx.(*CalcContext).op = _ri @@ -1654,13 +1785,15 @@ func (p *CELParser) calc(_p int) (localctx ICalcContext) { p.calc(3) } + case 2: localctx = NewCalcContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CELParserRULE_calc) p.SetState(76) if !(p.Precpred(p.GetParserRuleContext(), 1)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) + goto errorExit } { p.SetState(77) @@ -1685,17 +1818,38 @@ func (p *CELParser) calc(_p int) (localctx ICalcContext) { p.calc(2) } + case antlr.ATNInvalidAltNumber: + goto errorExit } } p.SetState(83) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 5, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 5, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } + + + errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.UnrollRecursionContexts(_parentctx) return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IUnaryContext is an interface to support dynamic dispatch. type IUnaryContext interface { antlr.ParserRuleContext @@ -1707,23 +1861,28 @@ type IUnaryContext interface { } type UnaryContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyUnaryContext() *UnaryContext { var p = new(UnaryContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_unary return p } +func InitEmptyUnaryContext(p *UnaryContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_unary +} + func (*UnaryContext) IsUnaryContext() {} func NewUnaryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *UnaryContext { var p = new(UnaryContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_unary @@ -1733,8 +1892,8 @@ func NewUnaryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invoki func (s *UnaryContext) GetParser() antlr.Parser { return s.parser } -func (s *UnaryContext) CopyFrom(ctx *UnaryContext) { - s.BaseParserRuleContext.CopyFrom(ctx.BaseParserRuleContext) +func (s *UnaryContext) CopyAll(ctx *UnaryContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) } func (s *UnaryContext) GetRuleContext() antlr.RuleContext { @@ -1745,8 +1904,11 @@ func (s *UnaryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) return antlr.TreesStringTree(s, ruleNames, recog) } + + + type LogicalNotContext struct { - *UnaryContext + UnaryContext s19 antlr.Token ops []antlr.Token } @@ -1754,19 +1916,23 @@ type LogicalNotContext struct { func NewLogicalNotContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LogicalNotContext { var p = new(LogicalNotContext) - p.UnaryContext = NewEmptyUnaryContext() + InitEmptyUnaryContext(&p.UnaryContext) p.parser = parser - p.CopyFrom(ctx.(*UnaryContext)) + p.CopyAll(ctx.(*UnaryContext)) return p } + func (s *LogicalNotContext) GetS19() antlr.Token { return s.s19 } + func (s *LogicalNotContext) SetS19(v antlr.Token) { s.s19 = v } + func (s *LogicalNotContext) GetOps() []antlr.Token { return s.ops } + func (s *LogicalNotContext) SetOps(v []antlr.Token) { s.ops = v } func (s *LogicalNotContext) GetRuleContext() antlr.RuleContext { @@ -1774,10 +1940,10 @@ func (s *LogicalNotContext) GetRuleContext() antlr.RuleContext { } func (s *LogicalNotContext) Member() IMemberContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IMemberContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -1797,6 +1963,7 @@ func (s *LogicalNotContext) EXCLAM(i int) antlr.TerminalNode { return s.GetToken(CELParserEXCLAM, i) } + func (s *LogicalNotContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterLogicalNot(s) @@ -1819,16 +1986,17 @@ func (s *LogicalNotContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type MemberExprContext struct { - *UnaryContext + UnaryContext } func NewMemberExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MemberExprContext { var p = new(MemberExprContext) - p.UnaryContext = NewEmptyUnaryContext() + InitEmptyUnaryContext(&p.UnaryContext) p.parser = parser - p.CopyFrom(ctx.(*UnaryContext)) + p.CopyAll(ctx.(*UnaryContext)) return p } @@ -1838,10 +2006,10 @@ func (s *MemberExprContext) GetRuleContext() antlr.RuleContext { } func (s *MemberExprContext) Member() IMemberContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IMemberContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -1853,6 +2021,7 @@ func (s *MemberExprContext) Member() IMemberContext { return t.(IMemberContext) } + func (s *MemberExprContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterMemberExpr(s) @@ -1875,8 +2044,9 @@ func (s *MemberExprContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type NegateContext struct { - *UnaryContext + UnaryContext s18 antlr.Token ops []antlr.Token } @@ -1884,19 +2054,23 @@ type NegateContext struct { func NewNegateContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *NegateContext { var p = new(NegateContext) - p.UnaryContext = NewEmptyUnaryContext() + InitEmptyUnaryContext(&p.UnaryContext) p.parser = parser - p.CopyFrom(ctx.(*UnaryContext)) + p.CopyAll(ctx.(*UnaryContext)) return p } + func (s *NegateContext) GetS18() antlr.Token { return s.s18 } + func (s *NegateContext) SetS18(v antlr.Token) { s.s18 = v } + func (s *NegateContext) GetOps() []antlr.Token { return s.ops } + func (s *NegateContext) SetOps(v []antlr.Token) { s.ops = v } func (s *NegateContext) GetRuleContext() antlr.RuleContext { @@ -1904,10 +2078,10 @@ func (s *NegateContext) GetRuleContext() antlr.RuleContext { } func (s *NegateContext) Member() IMemberContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IMemberContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -1927,6 +2101,7 @@ func (s *NegateContext) MINUS(i int) antlr.TerminalNode { return s.GetToken(CELParserMINUS, i) } + func (s *NegateContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterNegate(s) @@ -1949,35 +2124,22 @@ func (s *NegateContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } -func (p *CELParser) Unary() (localctx IUnaryContext) { - this := p - _ = this + +func (p *CELParser) Unary() (localctx IUnaryContext) { localctx = NewUnaryContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 12, CELParserRULE_unary) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - var _alt int p.SetState(97) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 8, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext()) { case 1: localctx = NewMemberExprContext(p, localctx) p.EnterOuterAlt(localctx, 1) @@ -1986,13 +2148,18 @@ func (p *CELParser) Unary() (localctx IUnaryContext) { p.member(0) } + case 2: localctx = NewLogicalNotContext(p, localctx) p.EnterOuterAlt(localctx, 2) p.SetState(86) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + for ok := true; ok; ok = _la == CELParserEXCLAM { { p.SetState(85) @@ -2000,11 +2167,19 @@ func (p *CELParser) Unary() (localctx IUnaryContext) { var _m = p.Match(CELParserEXCLAM) localctx.(*LogicalNotContext).s19 = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } localctx.(*LogicalNotContext).ops = append(localctx.(*LogicalNotContext).ops, localctx.(*LogicalNotContext).s19) + p.SetState(88) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { @@ -2012,42 +2187,71 @@ func (p *CELParser) Unary() (localctx IUnaryContext) { p.member(0) } + case 3: localctx = NewNegateContext(p, localctx) p.EnterOuterAlt(localctx, 3) p.SetState(92) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _alt = 1 for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber { switch _alt { case 1: - { - p.SetState(91) + { + p.SetState(91) + + var _m = p.Match(CELParserMINUS) + + localctx.(*NegateContext).s18 = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + localctx.(*NegateContext).ops = append(localctx.(*NegateContext).ops, localctx.(*NegateContext).s18) + - var _m = p.Match(CELParserMINUS) - localctx.(*NegateContext).s18 = _m - } - localctx.(*NegateContext).ops = append(localctx.(*NegateContext).ops, localctx.(*NegateContext).s18) default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } p.SetState(94) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 7, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 7, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } { p.SetState(96) p.member(0) } + case antlr.ATNInvalidAltNumber: + goto errorExit } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IMemberContext is an interface to support dynamic dispatch. type IMemberContext interface { antlr.ParserRuleContext @@ -2059,23 +2263,28 @@ type IMemberContext interface { } type MemberContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyMemberContext() *MemberContext { var p = new(MemberContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_member return p } +func InitEmptyMemberContext(p *MemberContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_member +} + func (*MemberContext) IsMemberContext() {} func NewMemberContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MemberContext { var p = new(MemberContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_member @@ -2085,8 +2294,8 @@ func NewMemberContext(parser antlr.Parser, parent antlr.ParserRuleContext, invok func (s *MemberContext) GetParser() antlr.Parser { return s.parser } -func (s *MemberContext) CopyFrom(ctx *MemberContext) { - s.BaseParserRuleContext.CopyFrom(ctx.BaseParserRuleContext) +func (s *MemberContext) CopyAll(ctx *MemberContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) } func (s *MemberContext) GetRuleContext() antlr.RuleContext { @@ -2097,38 +2306,46 @@ func (s *MemberContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) return antlr.TreesStringTree(s, ruleNames, recog) } + + + + type MemberCallContext struct { - *MemberContext - op antlr.Token - id antlr.Token + MemberContext + op antlr.Token + id antlr.Token open antlr.Token - args IExprListContext + args IExprListContext } func NewMemberCallContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MemberCallContext { var p = new(MemberCallContext) - p.MemberContext = NewEmptyMemberContext() + InitEmptyMemberContext(&p.MemberContext) p.parser = parser - p.CopyFrom(ctx.(*MemberContext)) + p.CopyAll(ctx.(*MemberContext)) return p } + func (s *MemberCallContext) GetOp() antlr.Token { return s.op } func (s *MemberCallContext) GetId() antlr.Token { return s.id } func (s *MemberCallContext) GetOpen() antlr.Token { return s.open } + func (s *MemberCallContext) SetOp(v antlr.Token) { s.op = v } func (s *MemberCallContext) SetId(v antlr.Token) { s.id = v } func (s *MemberCallContext) SetOpen(v antlr.Token) { s.open = v } + func (s *MemberCallContext) GetArgs() IExprListContext { return s.args } + func (s *MemberCallContext) SetArgs(v IExprListContext) { s.args = v } func (s *MemberCallContext) GetRuleContext() antlr.RuleContext { @@ -2136,10 +2353,10 @@ func (s *MemberCallContext) GetRuleContext() antlr.RuleContext { } func (s *MemberCallContext) Member() IMemberContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IMemberContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -2168,10 +2385,10 @@ func (s *MemberCallContext) LPAREN() antlr.TerminalNode { } func (s *MemberCallContext) ExprList() IExprListContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprListContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -2183,6 +2400,7 @@ func (s *MemberCallContext) ExprList() IExprListContext { return t.(IExprListContext) } + func (s *MemberCallContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterMemberCall(s) @@ -2205,29 +2423,32 @@ func (s *MemberCallContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type SelectContext struct { - *MemberContext - op antlr.Token + MemberContext + op antlr.Token opt antlr.Token - id antlr.Token + id antlr.Token } func NewSelectContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SelectContext { var p = new(SelectContext) - p.MemberContext = NewEmptyMemberContext() + InitEmptyMemberContext(&p.MemberContext) p.parser = parser - p.CopyFrom(ctx.(*MemberContext)) + p.CopyAll(ctx.(*MemberContext)) return p } + func (s *SelectContext) GetOp() antlr.Token { return s.op } func (s *SelectContext) GetOpt() antlr.Token { return s.opt } func (s *SelectContext) GetId() antlr.Token { return s.id } + func (s *SelectContext) SetOp(v antlr.Token) { s.op = v } func (s *SelectContext) SetOpt(v antlr.Token) { s.opt = v } @@ -2239,10 +2460,10 @@ func (s *SelectContext) GetRuleContext() antlr.RuleContext { } func (s *SelectContext) Member() IMemberContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IMemberContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -2266,6 +2487,7 @@ func (s *SelectContext) QUESTIONMARK() antlr.TerminalNode { return s.GetToken(CELParserQUESTIONMARK, 0) } + func (s *SelectContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterSelect(s) @@ -2288,16 +2510,17 @@ func (s *SelectContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type PrimaryExprContext struct { - *MemberContext + MemberContext } func NewPrimaryExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PrimaryExprContext { var p = new(PrimaryExprContext) - p.MemberContext = NewEmptyMemberContext() + InitEmptyMemberContext(&p.MemberContext) p.parser = parser - p.CopyFrom(ctx.(*MemberContext)) + p.CopyAll(ctx.(*MemberContext)) return p } @@ -2307,10 +2530,10 @@ func (s *PrimaryExprContext) GetRuleContext() antlr.RuleContext { } func (s *PrimaryExprContext) Primary() IPrimaryContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IPrimaryContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -2322,6 +2545,7 @@ func (s *PrimaryExprContext) Primary() IPrimaryContext { return t.(IPrimaryContext) } + func (s *PrimaryExprContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterPrimaryExpr(s) @@ -2344,33 +2568,38 @@ func (s *PrimaryExprContext) Accept(visitor antlr.ParseTreeVisitor) interface{} } } + type IndexContext struct { - *MemberContext - op antlr.Token - opt antlr.Token - index IExprContext + MemberContext + op antlr.Token + opt antlr.Token + index IExprContext } func NewIndexContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IndexContext { var p = new(IndexContext) - p.MemberContext = NewEmptyMemberContext() + InitEmptyMemberContext(&p.MemberContext) p.parser = parser - p.CopyFrom(ctx.(*MemberContext)) + p.CopyAll(ctx.(*MemberContext)) return p } + func (s *IndexContext) GetOp() antlr.Token { return s.op } func (s *IndexContext) GetOpt() antlr.Token { return s.opt } + func (s *IndexContext) SetOp(v antlr.Token) { s.op = v } func (s *IndexContext) SetOpt(v antlr.Token) { s.opt = v } + func (s *IndexContext) GetIndex() IExprContext { return s.index } + func (s *IndexContext) SetIndex(v IExprContext) { s.index = v } func (s *IndexContext) GetRuleContext() antlr.RuleContext { @@ -2378,10 +2607,10 @@ func (s *IndexContext) GetRuleContext() antlr.RuleContext { } func (s *IndexContext) Member() IMemberContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IMemberContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -2402,10 +2631,10 @@ func (s *IndexContext) LBRACKET() antlr.TerminalNode { } func (s *IndexContext) Expr() IExprContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -2421,6 +2650,7 @@ func (s *IndexContext) QUESTIONMARK() antlr.TerminalNode { return s.GetToken(CELParserQUESTIONMARK, 0) } + func (s *IndexContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterIndex(s) @@ -2443,15 +2673,15 @@ func (s *IndexContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + + func (p *CELParser) Member() (localctx IMemberContext) { return p.member(0) } func (p *CELParser) member(_p int) (localctx IMemberContext) { - this := p - _ = this - var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + _parentState := p.GetState() localctx = NewMemberContext(p, p.GetParserRuleContext(), _parentState) var _prevctx IMemberContext = localctx @@ -2460,22 +2690,6 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { p.EnterRecursionRule(localctx, 14, CELParserRULE_member, _p) var _la int - defer func() { - p.UnrollRecursionContexts(_parentctx) - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - var _alt int p.EnterOuterAlt(localctx, 1) @@ -2491,8 +2705,13 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) p.SetState(126) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 13, p.GetParserRuleContext()) - + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 13, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { if p.GetParseListeners() != nil { @@ -2501,14 +2720,19 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { _prevctx = localctx p.SetState(124) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 12, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 12, p.GetParserRuleContext()) { case 1: localctx = NewSelectContext(p, NewMemberContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, CELParserRULE_member) p.SetState(102) if !(p.Precpred(p.GetParserRuleContext(), 3)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", "")) + goto errorExit } { p.SetState(103) @@ -2516,11 +2740,19 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { var _m = p.Match(CELParserDOT) localctx.(*SelectContext).op = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(105) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserQUESTIONMARK { { p.SetState(104) @@ -2528,6 +2760,10 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { var _m = p.Match(CELParserQUESTIONMARK) localctx.(*SelectContext).opt = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -2537,15 +2773,21 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { var _m = p.Match(CELParserIDENTIFIER) localctx.(*SelectContext).id = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 2: localctx = NewMemberCallContext(p, NewMemberContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, CELParserRULE_member) p.SetState(108) if !(p.Precpred(p.GetParserRuleContext(), 2)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) + goto errorExit } { p.SetState(109) @@ -2553,6 +2795,10 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { var _m = p.Match(CELParserDOT) localctx.(*MemberCallContext).op = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(110) @@ -2560,6 +2806,10 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { var _m = p.Match(CELParserIDENTIFIER) localctx.(*MemberCallContext).id = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(111) @@ -2567,17 +2817,26 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { var _m = p.Match(CELParserLPAREN) localctx.(*MemberCallContext).open = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(113) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - if (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&135762105344) != 0 { + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1) << _la) & 135762105344) != 0) { { p.SetState(112) var _x = p.ExprList() + localctx.(*MemberCallContext).args = _x } @@ -2585,15 +2844,21 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { { p.SetState(115) p.Match(CELParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 3: localctx = NewIndexContext(p, NewMemberContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, CELParserRULE_member) p.SetState(116) if !(p.Precpred(p.GetParserRuleContext(), 1)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) + goto errorExit } { p.SetState(117) @@ -2601,11 +2866,19 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { var _m = p.Match(CELParserLBRACKET) localctx.(*IndexContext).op = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(119) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserQUESTIONMARK { { p.SetState(118) @@ -2613,6 +2886,10 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { var _m = p.Match(CELParserQUESTIONMARK) localctx.(*IndexContext).opt = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -2621,24 +2898,50 @@ func (p *CELParser) member(_p int) (localctx IMemberContext) { var _x = p.Expr() + localctx.(*IndexContext).index = _x } { p.SetState(122) p.Match(CELParserRPRACKET) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case antlr.ATNInvalidAltNumber: + goto errorExit } } p.SetState(128) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 13, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 13, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } + + + errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.UnrollRecursionContexts(_parentctx) return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IPrimaryContext is an interface to support dynamic dispatch. type IPrimaryContext interface { antlr.ParserRuleContext @@ -2650,23 +2953,28 @@ type IPrimaryContext interface { } type PrimaryContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyPrimaryContext() *PrimaryContext { var p = new(PrimaryContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_primary return p } +func InitEmptyPrimaryContext(p *PrimaryContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_primary +} + func (*PrimaryContext) IsPrimaryContext() {} func NewPrimaryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PrimaryContext { var p = new(PrimaryContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_primary @@ -2676,8 +2984,8 @@ func NewPrimaryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invo func (s *PrimaryContext) GetParser() antlr.Parser { return s.parser } -func (s *PrimaryContext) CopyFrom(ctx *PrimaryContext) { - s.BaseParserRuleContext.CopyFrom(ctx.BaseParserRuleContext) +func (s *PrimaryContext) CopyAll(ctx *PrimaryContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) } func (s *PrimaryContext) GetRuleContext() antlr.RuleContext { @@ -2688,28 +2996,35 @@ func (s *PrimaryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer return antlr.TreesStringTree(s, ruleNames, recog) } + + + type CreateListContext struct { - *PrimaryContext - op antlr.Token - elems IListInitContext + PrimaryContext + op antlr.Token + elems IListInitContext } func NewCreateListContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CreateListContext { var p = new(CreateListContext) - p.PrimaryContext = NewEmptyPrimaryContext() + InitEmptyPrimaryContext(&p.PrimaryContext) p.parser = parser - p.CopyFrom(ctx.(*PrimaryContext)) + p.CopyAll(ctx.(*PrimaryContext)) return p } + func (s *CreateListContext) GetOp() antlr.Token { return s.op } + func (s *CreateListContext) SetOp(v antlr.Token) { s.op = v } + func (s *CreateListContext) GetElems() IListInitContext { return s.elems } + func (s *CreateListContext) SetElems(v IListInitContext) { s.elems = v } func (s *CreateListContext) GetRuleContext() antlr.RuleContext { @@ -2729,10 +3044,10 @@ func (s *CreateListContext) COMMA() antlr.TerminalNode { } func (s *CreateListContext) ListInit() IListInitContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IListInitContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -2744,6 +3059,7 @@ func (s *CreateListContext) ListInit() IListInitContext { return t.(IListInitContext) } + func (s *CreateListContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterCreateList(s) @@ -2766,28 +3082,33 @@ func (s *CreateListContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type CreateStructContext struct { - *PrimaryContext - op antlr.Token - entries IMapInitializerListContext + PrimaryContext + op antlr.Token + entries IMapInitializerListContext } func NewCreateStructContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CreateStructContext { var p = new(CreateStructContext) - p.PrimaryContext = NewEmptyPrimaryContext() + InitEmptyPrimaryContext(&p.PrimaryContext) p.parser = parser - p.CopyFrom(ctx.(*PrimaryContext)) + p.CopyAll(ctx.(*PrimaryContext)) return p } + func (s *CreateStructContext) GetOp() antlr.Token { return s.op } + func (s *CreateStructContext) SetOp(v antlr.Token) { s.op = v } + func (s *CreateStructContext) GetEntries() IMapInitializerListContext { return s.entries } + func (s *CreateStructContext) SetEntries(v IMapInitializerListContext) { s.entries = v } func (s *CreateStructContext) GetRuleContext() antlr.RuleContext { @@ -2807,10 +3128,10 @@ func (s *CreateStructContext) COMMA() antlr.TerminalNode { } func (s *CreateStructContext) MapInitializerList() IMapInitializerListContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IMapInitializerListContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -2822,6 +3143,7 @@ func (s *CreateStructContext) MapInitializerList() IMapInitializerListContext { return t.(IMapInitializerListContext) } + func (s *CreateStructContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterCreateStruct(s) @@ -2844,16 +3166,17 @@ func (s *CreateStructContext) Accept(visitor antlr.ParseTreeVisitor) interface{} } } + type ConstantLiteralContext struct { - *PrimaryContext + PrimaryContext } func NewConstantLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ConstantLiteralContext { var p = new(ConstantLiteralContext) - p.PrimaryContext = NewEmptyPrimaryContext() + InitEmptyPrimaryContext(&p.PrimaryContext) p.parser = parser - p.CopyFrom(ctx.(*PrimaryContext)) + p.CopyAll(ctx.(*PrimaryContext)) return p } @@ -2863,10 +3186,10 @@ func (s *ConstantLiteralContext) GetRuleContext() antlr.RuleContext { } func (s *ConstantLiteralContext) Literal() ILiteralContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(ILiteralContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -2878,6 +3201,7 @@ func (s *ConstantLiteralContext) Literal() ILiteralContext { return t.(ILiteralContext) } + func (s *ConstantLiteralContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterConstantLiteral(s) @@ -2900,23 +3224,26 @@ func (s *ConstantLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interfac } } + type NestedContext struct { - *PrimaryContext - e IExprContext + PrimaryContext + e IExprContext } func NewNestedContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *NestedContext { var p = new(NestedContext) - p.PrimaryContext = NewEmptyPrimaryContext() + InitEmptyPrimaryContext(&p.PrimaryContext) p.parser = parser - p.CopyFrom(ctx.(*PrimaryContext)) + p.CopyAll(ctx.(*PrimaryContext)) return p } + func (s *NestedContext) GetE() IExprContext { return s.e } + func (s *NestedContext) SetE(v IExprContext) { s.e = v } func (s *NestedContext) GetRuleContext() antlr.RuleContext { @@ -2932,10 +3259,10 @@ func (s *NestedContext) RPAREN() antlr.TerminalNode { } func (s *NestedContext) Expr() IExprContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -2947,6 +3274,7 @@ func (s *NestedContext) Expr() IExprContext { return t.(IExprContext) } + func (s *NestedContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterNested(s) @@ -2969,27 +3297,29 @@ func (s *NestedContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type CreateMessageContext struct { - *PrimaryContext - leadingDot antlr.Token + PrimaryContext + leadingDot antlr.Token _IDENTIFIER antlr.Token - ids []antlr.Token - s16 antlr.Token - ops []antlr.Token - op antlr.Token - entries IFieldInitializerListContext + ids []antlr.Token + s16 antlr.Token + ops []antlr.Token + op antlr.Token + entries IFieldInitializerListContext } func NewCreateMessageContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CreateMessageContext { var p = new(CreateMessageContext) - p.PrimaryContext = NewEmptyPrimaryContext() + InitEmptyPrimaryContext(&p.PrimaryContext) p.parser = parser - p.CopyFrom(ctx.(*PrimaryContext)) + p.CopyAll(ctx.(*PrimaryContext)) return p } + func (s *CreateMessageContext) GetLeadingDot() antlr.Token { return s.leadingDot } func (s *CreateMessageContext) Get_IDENTIFIER() antlr.Token { return s._IDENTIFIER } @@ -2998,6 +3328,7 @@ func (s *CreateMessageContext) GetS16() antlr.Token { return s.s16 } func (s *CreateMessageContext) GetOp() antlr.Token { return s.op } + func (s *CreateMessageContext) SetLeadingDot(v antlr.Token) { s.leadingDot = v } func (s *CreateMessageContext) Set_IDENTIFIER(v antlr.Token) { s._IDENTIFIER = v } @@ -3006,16 +3337,20 @@ func (s *CreateMessageContext) SetS16(v antlr.Token) { s.s16 = v } func (s *CreateMessageContext) SetOp(v antlr.Token) { s.op = v } + func (s *CreateMessageContext) GetIds() []antlr.Token { return s.ids } func (s *CreateMessageContext) GetOps() []antlr.Token { return s.ops } + func (s *CreateMessageContext) SetIds(v []antlr.Token) { s.ids = v } func (s *CreateMessageContext) SetOps(v []antlr.Token) { s.ops = v } + func (s *CreateMessageContext) GetEntries() IFieldInitializerListContext { return s.entries } + func (s *CreateMessageContext) SetEntries(v IFieldInitializerListContext) { s.entries = v } func (s *CreateMessageContext) GetRuleContext() antlr.RuleContext { @@ -3051,10 +3386,10 @@ func (s *CreateMessageContext) DOT(i int) antlr.TerminalNode { } func (s *CreateMessageContext) FieldInitializerList() IFieldInitializerListContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFieldInitializerListContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -3066,6 +3401,7 @@ func (s *CreateMessageContext) FieldInitializerList() IFieldInitializerListConte return t.(IFieldInitializerListContext) } + func (s *CreateMessageContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterCreateMessage(s) @@ -3088,38 +3424,43 @@ func (s *CreateMessageContext) Accept(visitor antlr.ParseTreeVisitor) interface{ } } + type IdentOrGlobalCallContext struct { - *PrimaryContext + PrimaryContext leadingDot antlr.Token - id antlr.Token - op antlr.Token - args IExprListContext + id antlr.Token + op antlr.Token + args IExprListContext } func NewIdentOrGlobalCallContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IdentOrGlobalCallContext { var p = new(IdentOrGlobalCallContext) - p.PrimaryContext = NewEmptyPrimaryContext() + InitEmptyPrimaryContext(&p.PrimaryContext) p.parser = parser - p.CopyFrom(ctx.(*PrimaryContext)) + p.CopyAll(ctx.(*PrimaryContext)) return p } + func (s *IdentOrGlobalCallContext) GetLeadingDot() antlr.Token { return s.leadingDot } func (s *IdentOrGlobalCallContext) GetId() antlr.Token { return s.id } func (s *IdentOrGlobalCallContext) GetOp() antlr.Token { return s.op } + func (s *IdentOrGlobalCallContext) SetLeadingDot(v antlr.Token) { s.leadingDot = v } func (s *IdentOrGlobalCallContext) SetId(v antlr.Token) { s.id = v } func (s *IdentOrGlobalCallContext) SetOp(v antlr.Token) { s.op = v } + func (s *IdentOrGlobalCallContext) GetArgs() IExprListContext { return s.args } + func (s *IdentOrGlobalCallContext) SetArgs(v IExprListContext) { s.args = v } func (s *IdentOrGlobalCallContext) GetRuleContext() antlr.RuleContext { @@ -3143,10 +3484,10 @@ func (s *IdentOrGlobalCallContext) LPAREN() antlr.TerminalNode { } func (s *IdentOrGlobalCallContext) ExprList() IExprListContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprListContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -3158,6 +3499,7 @@ func (s *IdentOrGlobalCallContext) ExprList() IExprListContext { return t.(IExprListContext) } + func (s *IdentOrGlobalCallContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterIdentOrGlobalCall(s) @@ -3180,40 +3522,31 @@ func (s *IdentOrGlobalCallContext) Accept(visitor antlr.ParseTreeVisitor) interf } } -func (p *CELParser) Primary() (localctx IPrimaryContext) { - this := p - _ = this + +func (p *CELParser) Primary() (localctx IPrimaryContext) { localctx = NewPrimaryContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 16, CELParserRULE_primary) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.SetState(180) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 25, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 25, p.GetParserRuleContext()) { case 1: localctx = NewIdentOrGlobalCallContext(p, localctx) p.EnterOuterAlt(localctx, 1) p.SetState(130) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserDOT { { p.SetState(129) @@ -3221,6 +3554,10 @@ func (p *CELParser) Primary() (localctx IPrimaryContext) { var _m = p.Match(CELParserDOT) localctx.(*IdentOrGlobalCallContext).leadingDot = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -3230,28 +3567,42 @@ func (p *CELParser) Primary() (localctx IPrimaryContext) { var _m = p.Match(CELParserIDENTIFIER) localctx.(*IdentOrGlobalCallContext).id = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(138) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 16, p.GetParserRuleContext()) == 1 { + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 16, p.GetParserRuleContext()) == 1 { { p.SetState(133) var _m = p.Match(CELParserLPAREN) localctx.(*IdentOrGlobalCallContext).op = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(135) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - if (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&135762105344) != 0 { + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1) << _la) & 135762105344) != 0) { { p.SetState(134) var _x = p.ExprList() + localctx.(*IdentOrGlobalCallContext).args = _x } @@ -3259,29 +3610,46 @@ func (p *CELParser) Primary() (localctx IPrimaryContext) { { p.SetState(137) p.Match(CELParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + } else if p.HasError() { // JIM + goto errorExit } + case 2: localctx = NewNestedContext(p, localctx) p.EnterOuterAlt(localctx, 2) { p.SetState(140) p.Match(CELParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(141) var _x = p.Expr() + localctx.(*NestedContext).e = _x } { p.SetState(142) p.Match(CELParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 3: localctx = NewCreateListContext(p, localctx) p.EnterOuterAlt(localctx, 3) @@ -3291,37 +3659,59 @@ func (p *CELParser) Primary() (localctx IPrimaryContext) { var _m = p.Match(CELParserLBRACKET) localctx.(*CreateListContext).op = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(146) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - if (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&135763153920) != 0 { + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1) << _la) & 135763153920) != 0) { { p.SetState(145) var _x = p.ListInit() + localctx.(*CreateListContext).elems = _x } } p.SetState(149) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserCOMMA { { p.SetState(148) p.Match(CELParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { p.SetState(151) p.Match(CELParserRPRACKET) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 4: localctx = NewCreateStructContext(p, localctx) p.EnterOuterAlt(localctx, 4) @@ -3331,44 +3721,70 @@ func (p *CELParser) Primary() (localctx IPrimaryContext) { var _m = p.Match(CELParserLBRACE) localctx.(*CreateStructContext).op = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(154) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) - if (int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&135763153920) != 0 { + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1) << _la) & 135763153920) != 0) { { p.SetState(153) var _x = p.MapInitializerList() + localctx.(*CreateStructContext).entries = _x } } p.SetState(157) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserCOMMA { { p.SetState(156) p.Match(CELParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { p.SetState(159) p.Match(CELParserRBRACE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 5: localctx = NewCreateMessageContext(p, localctx) p.EnterOuterAlt(localctx, 5) p.SetState(161) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserDOT { { p.SetState(160) @@ -3376,6 +3792,10 @@ func (p *CELParser) Primary() (localctx IPrimaryContext) { var _m = p.Match(CELParserDOT) localctx.(*CreateMessageContext).leadingDot = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -3385,12 +3805,20 @@ func (p *CELParser) Primary() (localctx IPrimaryContext) { var _m = p.Match(CELParserIDENTIFIER) localctx.(*CreateMessageContext)._IDENTIFIER = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } localctx.(*CreateMessageContext).ids = append(localctx.(*CreateMessageContext).ids, localctx.(*CreateMessageContext)._IDENTIFIER) p.SetState(168) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + for _la == CELParserDOT { { p.SetState(164) @@ -3398,6 +3826,10 @@ func (p *CELParser) Primary() (localctx IPrimaryContext) { var _m = p.Match(CELParserDOT) localctx.(*CreateMessageContext).s16 = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } localctx.(*CreateMessageContext).ops = append(localctx.(*CreateMessageContext).ops, localctx.(*CreateMessageContext).s16) { @@ -3406,11 +3838,19 @@ func (p *CELParser) Primary() (localctx IPrimaryContext) { var _m = p.Match(CELParserIDENTIFIER) localctx.(*CreateMessageContext)._IDENTIFIER = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } localctx.(*CreateMessageContext).ids = append(localctx.(*CreateMessageContext).ids, localctx.(*CreateMessageContext)._IDENTIFIER) + p.SetState(170) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } { @@ -3419,37 +3859,59 @@ func (p *CELParser) Primary() (localctx IPrimaryContext) { var _m = p.Match(CELParserLBRACE) localctx.(*CreateMessageContext).op = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } p.SetState(173) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserQUESTIONMARK || _la == CELParserIDENTIFIER { { p.SetState(172) var _x = p.FieldInitializerList() + localctx.(*CreateMessageContext).entries = _x } } p.SetState(176) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserCOMMA { { p.SetState(175) p.Match(CELParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { p.SetState(178) p.Match(CELParserRBRACE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 6: localctx = NewConstantLiteralContext(p, localctx) p.EnterOuterAlt(localctx, 6) @@ -3458,11 +3920,25 @@ func (p *CELParser) Primary() (localctx IPrimaryContext) { p.Literal() } + case antlr.ATNInvalidAltNumber: + goto errorExit } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IExprListContext is an interface to support dynamic dispatch. type IExprListContext interface { antlr.ParserRuleContext @@ -3473,14 +3949,18 @@ type IExprListContext interface { // Get_expr returns the _expr rule contexts. Get_expr() IExprContext + // Set_expr sets the _expr rule contexts. Set_expr(IExprContext) + // GetE returns the e rule context list. GetE() []IExprContext + // SetE sets the e rule context list. - SetE([]IExprContext) + SetE([]IExprContext) + // Getter signatures AllExpr() []IExprContext @@ -3493,25 +3973,30 @@ type IExprListContext interface { } type ExprListContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser - _expr IExprContext - e []IExprContext + _expr IExprContext + e []IExprContext } func NewEmptyExprListContext() *ExprListContext { var p = new(ExprListContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_exprList return p } +func InitEmptyExprListContext(p *ExprListContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_exprList +} + func (*ExprListContext) IsExprListContext() {} func NewExprListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprListContext { var p = new(ExprListContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_exprList @@ -3523,12 +4008,16 @@ func (s *ExprListContext) GetParser() antlr.Parser { return s.parser } func (s *ExprListContext) Get_expr() IExprContext { return s._expr } + func (s *ExprListContext) Set_expr(v IExprContext) { s._expr = v } + func (s *ExprListContext) GetE() []IExprContext { return s.e } + func (s *ExprListContext) SetE(v []IExprContext) { s.e = v } + func (s *ExprListContext) AllExpr() []IExprContext { children := s.GetChildren() len := 0 @@ -3551,12 +4040,12 @@ func (s *ExprListContext) AllExpr() []IExprContext { } func (s *ExprListContext) Expr(i int) IExprContext { - var t antlr.RuleContext + var t antlr.RuleContext; j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { if j == i { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } j++ @@ -3586,6 +4075,7 @@ func (s *ExprListContext) ToStringTree(ruleNames []string, recog antlr.Recognize return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *ExprListContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterExprList(s) @@ -3608,65 +4098,76 @@ func (s *ExprListContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } -func (p *CELParser) ExprList() (localctx IExprListContext) { - this := p - _ = this + + +func (p *CELParser) ExprList() (localctx IExprListContext) { localctx = NewExprListContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 18, CELParserRULE_exprList) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) { p.SetState(182) var _x = p.Expr() + localctx.(*ExprListContext)._expr = _x } localctx.(*ExprListContext).e = append(localctx.(*ExprListContext).e, localctx.(*ExprListContext)._expr) p.SetState(187) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + for _la == CELParserCOMMA { { p.SetState(183) p.Match(CELParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(184) var _x = p.Expr() + localctx.(*ExprListContext)._expr = _x } localctx.(*ExprListContext).e = append(localctx.(*ExprListContext).e, localctx.(*ExprListContext)._expr) + p.SetState(189) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) } + + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IListInitContext is an interface to support dynamic dispatch. type IListInitContext interface { antlr.ParserRuleContext @@ -3677,14 +4178,18 @@ type IListInitContext interface { // Get_optExpr returns the _optExpr rule contexts. Get_optExpr() IOptExprContext + // Set_optExpr sets the _optExpr rule contexts. Set_optExpr(IOptExprContext) + // GetElems returns the elems rule context list. GetElems() []IOptExprContext + // SetElems sets the elems rule context list. - SetElems([]IOptExprContext) + SetElems([]IOptExprContext) + // Getter signatures AllOptExpr() []IOptExprContext @@ -3697,25 +4202,30 @@ type IListInitContext interface { } type ListInitContext struct { - *antlr.BaseParserRuleContext - parser antlr.Parser - _optExpr IOptExprContext - elems []IOptExprContext + antlr.BaseParserRuleContext + parser antlr.Parser + _optExpr IOptExprContext + elems []IOptExprContext } func NewEmptyListInitContext() *ListInitContext { var p = new(ListInitContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_listInit return p } +func InitEmptyListInitContext(p *ListInitContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_listInit +} + func (*ListInitContext) IsListInitContext() {} func NewListInitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ListInitContext { var p = new(ListInitContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_listInit @@ -3727,12 +4237,16 @@ func (s *ListInitContext) GetParser() antlr.Parser { return s.parser } func (s *ListInitContext) Get_optExpr() IOptExprContext { return s._optExpr } + func (s *ListInitContext) Set_optExpr(v IOptExprContext) { s._optExpr = v } + func (s *ListInitContext) GetElems() []IOptExprContext { return s.elems } + func (s *ListInitContext) SetElems(v []IOptExprContext) { s.elems = v } + func (s *ListInitContext) AllOptExpr() []IOptExprContext { children := s.GetChildren() len := 0 @@ -3755,12 +4269,12 @@ func (s *ListInitContext) AllOptExpr() []IOptExprContext { } func (s *ListInitContext) OptExpr(i int) IOptExprContext { - var t antlr.RuleContext + var t antlr.RuleContext; j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOptExprContext); ok { if j == i { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } j++ @@ -3790,6 +4304,7 @@ func (s *ListInitContext) ToStringTree(ruleNames []string, recog antlr.Recognize return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *ListInitContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterListInit(s) @@ -3812,29 +4327,12 @@ func (s *ListInitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } -func (p *CELParser) ListInit() (localctx IListInitContext) { - this := p - _ = this - localctx = NewListInitContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 20, CELParserRULE_listInit) - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() +func (p *CELParser) ListInit() (localctx IListInitContext) { + localctx = NewListInitContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 20, CELParserRULE_listInit) var _alt int p.EnterOuterAlt(localctx, 1) @@ -3843,37 +4341,68 @@ func (p *CELParser) ListInit() (localctx IListInitContext) { var _x = p.OptExpr() + localctx.(*ListInitContext)._optExpr = _x } localctx.(*ListInitContext).elems = append(localctx.(*ListInitContext).elems, localctx.(*ListInitContext)._optExpr) p.SetState(195) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 27, p.GetParserRuleContext()) - + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { { p.SetState(191) p.Match(CELParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(192) var _x = p.OptExpr() + localctx.(*ListInitContext)._optExpr = _x } localctx.(*ListInitContext).elems = append(localctx.(*ListInitContext).elems, localctx.(*ListInitContext)._optExpr) + } p.SetState(197) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 27, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } + + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IFieldInitializerListContext is an interface to support dynamic dispatch. type IFieldInitializerListContext interface { antlr.ParserRuleContext @@ -3882,40 +4411,48 @@ type IFieldInitializerListContext interface { GetParser() antlr.Parser // GetS21 returns the s21 token. - GetS21() antlr.Token + GetS21() antlr.Token + // SetS21 sets the s21 token. - SetS21(antlr.Token) + SetS21(antlr.Token) + // GetCols returns the cols token list. GetCols() []antlr.Token + // SetCols sets the cols token list. SetCols([]antlr.Token) + // Get_optField returns the _optField rule contexts. Get_optField() IOptFieldContext // Get_expr returns the _expr rule contexts. Get_expr() IExprContext + // Set_optField sets the _optField rule contexts. Set_optField(IOptFieldContext) // Set_expr sets the _expr rule contexts. Set_expr(IExprContext) + // GetFields returns the fields rule context list. GetFields() []IOptFieldContext // GetValues returns the values rule context list. GetValues() []IExprContext + // SetFields sets the fields rule context list. - SetFields([]IOptFieldContext) + SetFields([]IOptFieldContext) // SetValues sets the values rule context list. - SetValues([]IExprContext) + SetValues([]IExprContext) + // Getter signatures AllOptField() []IOptFieldContext @@ -3932,29 +4469,34 @@ type IFieldInitializerListContext interface { } type FieldInitializerListContext struct { - *antlr.BaseParserRuleContext - parser antlr.Parser - _optField IOptFieldContext - fields []IOptFieldContext - s21 antlr.Token - cols []antlr.Token - _expr IExprContext - values []IExprContext + antlr.BaseParserRuleContext + parser antlr.Parser + _optField IOptFieldContext + fields []IOptFieldContext + s21 antlr.Token + cols []antlr.Token + _expr IExprContext + values []IExprContext } func NewEmptyFieldInitializerListContext() *FieldInitializerListContext { var p = new(FieldInitializerListContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_fieldInitializerList return p } +func InitEmptyFieldInitializerListContext(p *FieldInitializerListContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_fieldInitializerList +} + func (*FieldInitializerListContext) IsFieldInitializerListContext() {} func NewFieldInitializerListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FieldInitializerListContext { var p = new(FieldInitializerListContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_fieldInitializerList @@ -3966,28 +4508,36 @@ func (s *FieldInitializerListContext) GetParser() antlr.Parser { return s.parser func (s *FieldInitializerListContext) GetS21() antlr.Token { return s.s21 } + func (s *FieldInitializerListContext) SetS21(v antlr.Token) { s.s21 = v } + func (s *FieldInitializerListContext) GetCols() []antlr.Token { return s.cols } + func (s *FieldInitializerListContext) SetCols(v []antlr.Token) { s.cols = v } + func (s *FieldInitializerListContext) Get_optField() IOptFieldContext { return s._optField } func (s *FieldInitializerListContext) Get_expr() IExprContext { return s._expr } + func (s *FieldInitializerListContext) Set_optField(v IOptFieldContext) { s._optField = v } func (s *FieldInitializerListContext) Set_expr(v IExprContext) { s._expr = v } + func (s *FieldInitializerListContext) GetFields() []IOptFieldContext { return s.fields } func (s *FieldInitializerListContext) GetValues() []IExprContext { return s.values } + func (s *FieldInitializerListContext) SetFields(v []IOptFieldContext) { s.fields = v } func (s *FieldInitializerListContext) SetValues(v []IExprContext) { s.values = v } + func (s *FieldInitializerListContext) AllOptField() []IOptFieldContext { children := s.GetChildren() len := 0 @@ -4010,12 +4560,12 @@ func (s *FieldInitializerListContext) AllOptField() []IOptFieldContext { } func (s *FieldInitializerListContext) OptField(i int) IOptFieldContext { - var t antlr.RuleContext + var t antlr.RuleContext; j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOptFieldContext); ok { if j == i { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } j++ @@ -4059,12 +4609,12 @@ func (s *FieldInitializerListContext) AllExpr() []IExprContext { } func (s *FieldInitializerListContext) Expr(i int) IExprContext { - var t antlr.RuleContext + var t antlr.RuleContext; j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { if j == i { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } j++ @@ -4094,6 +4644,7 @@ func (s *FieldInitializerListContext) ToStringTree(ruleNames []string, recog ant return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *FieldInitializerListContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterFieldInitializerList(s) @@ -4116,29 +4667,12 @@ func (s *FieldInitializerListContext) Accept(visitor antlr.ParseTreeVisitor) int } } -func (p *CELParser) FieldInitializerList() (localctx IFieldInitializerListContext) { - this := p - _ = this - localctx = NewFieldInitializerListContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 22, CELParserRULE_fieldInitializerList) - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() +func (p *CELParser) FieldInitializerList() (localctx IFieldInitializerListContext) { + localctx = NewFieldInitializerListContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 22, CELParserRULE_fieldInitializerList) var _alt int p.EnterOuterAlt(localctx, 1) @@ -4147,6 +4681,7 @@ func (p *CELParser) FieldInitializerList() (localctx IFieldInitializerListContex var _x = p.OptField() + localctx.(*FieldInitializerListContext)._optField = _x } localctx.(*FieldInitializerListContext).fields = append(localctx.(*FieldInitializerListContext).fields, localctx.(*FieldInitializerListContext)._optField) @@ -4156,6 +4691,10 @@ func (p *CELParser) FieldInitializerList() (localctx IFieldInitializerListContex var _m = p.Match(CELParserCOLON) localctx.(*FieldInitializerListContext).s21 = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } localctx.(*FieldInitializerListContext).cols = append(localctx.(*FieldInitializerListContext).cols, localctx.(*FieldInitializerListContext).s21) { @@ -4163,24 +4702,35 @@ func (p *CELParser) FieldInitializerList() (localctx IFieldInitializerListContex var _x = p.Expr() + localctx.(*FieldInitializerListContext)._expr = _x } localctx.(*FieldInitializerListContext).values = append(localctx.(*FieldInitializerListContext).values, localctx.(*FieldInitializerListContext)._expr) p.SetState(208) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 28, p.GetParserRuleContext()) - + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 28, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { { p.SetState(201) p.Match(CELParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(202) var _x = p.OptField() + localctx.(*FieldInitializerListContext)._optField = _x } localctx.(*FieldInitializerListContext).fields = append(localctx.(*FieldInitializerListContext).fields, localctx.(*FieldInitializerListContext)._optField) @@ -4190,6 +4740,10 @@ func (p *CELParser) FieldInitializerList() (localctx IFieldInitializerListContex var _m = p.Match(CELParserCOLON) localctx.(*FieldInitializerListContext).s21 = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } localctx.(*FieldInitializerListContext).cols = append(localctx.(*FieldInitializerListContext).cols, localctx.(*FieldInitializerListContext).s21) { @@ -4197,19 +4751,40 @@ func (p *CELParser) FieldInitializerList() (localctx IFieldInitializerListContex var _x = p.Expr() + localctx.(*FieldInitializerListContext)._expr = _x } localctx.(*FieldInitializerListContext).values = append(localctx.(*FieldInitializerListContext).values, localctx.(*FieldInitializerListContext)._expr) + } p.SetState(210) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 28, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 28, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } + + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IOptFieldContext is an interface to support dynamic dispatch. type IOptFieldContext interface { antlr.ParserRuleContext @@ -4218,10 +4793,12 @@ type IOptFieldContext interface { GetParser() antlr.Parser // GetOpt returns the opt token. - GetOpt() antlr.Token + GetOpt() antlr.Token + // SetOpt sets the opt token. - SetOpt(antlr.Token) + SetOpt(antlr.Token) + // Getter signatures IDENTIFIER() antlr.TerminalNode @@ -4232,24 +4809,29 @@ type IOptFieldContext interface { } type OptFieldContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser - opt antlr.Token + opt antlr.Token } func NewEmptyOptFieldContext() *OptFieldContext { var p = new(OptFieldContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_optField return p } +func InitEmptyOptFieldContext(p *OptFieldContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_optField +} + func (*OptFieldContext) IsOptFieldContext() {} func NewOptFieldContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *OptFieldContext { var p = new(OptFieldContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_optField @@ -4261,8 +4843,10 @@ func (s *OptFieldContext) GetParser() antlr.Parser { return s.parser } func (s *OptFieldContext) GetOpt() antlr.Token { return s.opt } + func (s *OptFieldContext) SetOpt(v antlr.Token) { s.opt = v } + func (s *OptFieldContext) IDENTIFIER() antlr.TerminalNode { return s.GetToken(CELParserIDENTIFIER, 0) } @@ -4279,6 +4863,7 @@ func (s *OptFieldContext) ToStringTree(ruleNames []string, recog antlr.Recognize return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *OptFieldContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterOptField(s) @@ -4301,35 +4886,23 @@ func (s *OptFieldContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } -func (p *CELParser) OptField() (localctx IOptFieldContext) { - this := p - _ = this + + +func (p *CELParser) OptField() (localctx IOptFieldContext) { localctx = NewOptFieldContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 24, CELParserRULE_optField) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) p.SetState(212) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserQUESTIONMARK { { p.SetState(211) @@ -4337,17 +4910,38 @@ func (p *CELParser) OptField() (localctx IOptFieldContext) { var _m = p.Match(CELParserQUESTIONMARK) localctx.(*OptFieldContext).opt = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } { p.SetState(214) p.Match(CELParserIDENTIFIER) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IMapInitializerListContext is an interface to support dynamic dispatch. type IMapInitializerListContext interface { antlr.ParserRuleContext @@ -4356,40 +4950,48 @@ type IMapInitializerListContext interface { GetParser() antlr.Parser // GetS21 returns the s21 token. - GetS21() antlr.Token + GetS21() antlr.Token + // SetS21 sets the s21 token. - SetS21(antlr.Token) + SetS21(antlr.Token) + // GetCols returns the cols token list. GetCols() []antlr.Token + // SetCols sets the cols token list. SetCols([]antlr.Token) + // Get_optExpr returns the _optExpr rule contexts. Get_optExpr() IOptExprContext // Get_expr returns the _expr rule contexts. Get_expr() IExprContext + // Set_optExpr sets the _optExpr rule contexts. Set_optExpr(IOptExprContext) // Set_expr sets the _expr rule contexts. Set_expr(IExprContext) + // GetKeys returns the keys rule context list. GetKeys() []IOptExprContext // GetValues returns the values rule context list. GetValues() []IExprContext + // SetKeys sets the keys rule context list. - SetKeys([]IOptExprContext) + SetKeys([]IOptExprContext) // SetValues sets the values rule context list. - SetValues([]IExprContext) + SetValues([]IExprContext) + // Getter signatures AllOptExpr() []IOptExprContext @@ -4406,29 +5008,34 @@ type IMapInitializerListContext interface { } type MapInitializerListContext struct { - *antlr.BaseParserRuleContext - parser antlr.Parser - _optExpr IOptExprContext - keys []IOptExprContext - s21 antlr.Token - cols []antlr.Token - _expr IExprContext - values []IExprContext + antlr.BaseParserRuleContext + parser antlr.Parser + _optExpr IOptExprContext + keys []IOptExprContext + s21 antlr.Token + cols []antlr.Token + _expr IExprContext + values []IExprContext } func NewEmptyMapInitializerListContext() *MapInitializerListContext { var p = new(MapInitializerListContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_mapInitializerList return p } +func InitEmptyMapInitializerListContext(p *MapInitializerListContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_mapInitializerList +} + func (*MapInitializerListContext) IsMapInitializerListContext() {} func NewMapInitializerListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MapInitializerListContext { var p = new(MapInitializerListContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_mapInitializerList @@ -4440,28 +5047,36 @@ func (s *MapInitializerListContext) GetParser() antlr.Parser { return s.parser } func (s *MapInitializerListContext) GetS21() antlr.Token { return s.s21 } + func (s *MapInitializerListContext) SetS21(v antlr.Token) { s.s21 = v } + func (s *MapInitializerListContext) GetCols() []antlr.Token { return s.cols } + func (s *MapInitializerListContext) SetCols(v []antlr.Token) { s.cols = v } + func (s *MapInitializerListContext) Get_optExpr() IOptExprContext { return s._optExpr } func (s *MapInitializerListContext) Get_expr() IExprContext { return s._expr } + func (s *MapInitializerListContext) Set_optExpr(v IOptExprContext) { s._optExpr = v } func (s *MapInitializerListContext) Set_expr(v IExprContext) { s._expr = v } + func (s *MapInitializerListContext) GetKeys() []IOptExprContext { return s.keys } func (s *MapInitializerListContext) GetValues() []IExprContext { return s.values } + func (s *MapInitializerListContext) SetKeys(v []IOptExprContext) { s.keys = v } func (s *MapInitializerListContext) SetValues(v []IExprContext) { s.values = v } + func (s *MapInitializerListContext) AllOptExpr() []IOptExprContext { children := s.GetChildren() len := 0 @@ -4484,12 +5099,12 @@ func (s *MapInitializerListContext) AllOptExpr() []IOptExprContext { } func (s *MapInitializerListContext) OptExpr(i int) IOptExprContext { - var t antlr.RuleContext + var t antlr.RuleContext; j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOptExprContext); ok { if j == i { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } j++ @@ -4533,12 +5148,12 @@ func (s *MapInitializerListContext) AllExpr() []IExprContext { } func (s *MapInitializerListContext) Expr(i int) IExprContext { - var t antlr.RuleContext + var t antlr.RuleContext; j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { if j == i { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } j++ @@ -4568,6 +5183,7 @@ func (s *MapInitializerListContext) ToStringTree(ruleNames []string, recog antlr return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *MapInitializerListContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterMapInitializerList(s) @@ -4590,29 +5206,12 @@ func (s *MapInitializerListContext) Accept(visitor antlr.ParseTreeVisitor) inter } } -func (p *CELParser) MapInitializerList() (localctx IMapInitializerListContext) { - this := p - _ = this - localctx = NewMapInitializerListContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 26, CELParserRULE_mapInitializerList) - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() +func (p *CELParser) MapInitializerList() (localctx IMapInitializerListContext) { + localctx = NewMapInitializerListContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 26, CELParserRULE_mapInitializerList) var _alt int p.EnterOuterAlt(localctx, 1) @@ -4621,6 +5220,7 @@ func (p *CELParser) MapInitializerList() (localctx IMapInitializerListContext) { var _x = p.OptExpr() + localctx.(*MapInitializerListContext)._optExpr = _x } localctx.(*MapInitializerListContext).keys = append(localctx.(*MapInitializerListContext).keys, localctx.(*MapInitializerListContext)._optExpr) @@ -4630,6 +5230,10 @@ func (p *CELParser) MapInitializerList() (localctx IMapInitializerListContext) { var _m = p.Match(CELParserCOLON) localctx.(*MapInitializerListContext).s21 = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } localctx.(*MapInitializerListContext).cols = append(localctx.(*MapInitializerListContext).cols, localctx.(*MapInitializerListContext).s21) { @@ -4637,24 +5241,35 @@ func (p *CELParser) MapInitializerList() (localctx IMapInitializerListContext) { var _x = p.Expr() + localctx.(*MapInitializerListContext)._expr = _x } localctx.(*MapInitializerListContext).values = append(localctx.(*MapInitializerListContext).values, localctx.(*MapInitializerListContext)._expr) p.SetState(226) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 30, p.GetParserRuleContext()) - + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 30, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { { p.SetState(219) p.Match(CELParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { p.SetState(220) var _x = p.OptExpr() + localctx.(*MapInitializerListContext)._optExpr = _x } localctx.(*MapInitializerListContext).keys = append(localctx.(*MapInitializerListContext).keys, localctx.(*MapInitializerListContext)._optExpr) @@ -4664,6 +5279,10 @@ func (p *CELParser) MapInitializerList() (localctx IMapInitializerListContext) { var _m = p.Match(CELParserCOLON) localctx.(*MapInitializerListContext).s21 = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } localctx.(*MapInitializerListContext).cols = append(localctx.(*MapInitializerListContext).cols, localctx.(*MapInitializerListContext).s21) { @@ -4671,19 +5290,40 @@ func (p *CELParser) MapInitializerList() (localctx IMapInitializerListContext) { var _x = p.Expr() + localctx.(*MapInitializerListContext)._expr = _x } localctx.(*MapInitializerListContext).values = append(localctx.(*MapInitializerListContext).values, localctx.(*MapInitializerListContext)._expr) + } p.SetState(228) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 30, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 30, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } } + + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // IOptExprContext is an interface to support dynamic dispatch. type IOptExprContext interface { antlr.ParserRuleContext @@ -4692,17 +5332,21 @@ type IOptExprContext interface { GetParser() antlr.Parser // GetOpt returns the opt token. - GetOpt() antlr.Token + GetOpt() antlr.Token + // SetOpt sets the opt token. - SetOpt(antlr.Token) + SetOpt(antlr.Token) + // GetE returns the e rule contexts. GetE() IExprContext + // SetE sets the e rule contexts. SetE(IExprContext) + // Getter signatures Expr() IExprContext QUESTIONMARK() antlr.TerminalNode @@ -4712,25 +5356,30 @@ type IOptExprContext interface { } type OptExprContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser - opt antlr.Token - e IExprContext + opt antlr.Token + e IExprContext } func NewEmptyOptExprContext() *OptExprContext { var p = new(OptExprContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_optExpr return p } +func InitEmptyOptExprContext(p *OptExprContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_optExpr +} + func (*OptExprContext) IsOptExprContext() {} func NewOptExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *OptExprContext { var p = new(OptExprContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_optExpr @@ -4742,17 +5391,21 @@ func (s *OptExprContext) GetParser() antlr.Parser { return s.parser } func (s *OptExprContext) GetOpt() antlr.Token { return s.opt } + func (s *OptExprContext) SetOpt(v antlr.Token) { s.opt = v } + func (s *OptExprContext) GetE() IExprContext { return s.e } + func (s *OptExprContext) SetE(v IExprContext) { s.e = v } + func (s *OptExprContext) Expr() IExprContext { - var t antlr.RuleContext + var t antlr.RuleContext; for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) + t = ctx.(antlr.RuleContext); break } } @@ -4776,6 +5429,7 @@ func (s *OptExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer return antlr.TreesStringTree(s, ruleNames, recog) } + func (s *OptExprContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterOptExpr(s) @@ -4798,35 +5452,23 @@ func (s *OptExprContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } -func (p *CELParser) OptExpr() (localctx IOptExprContext) { - this := p - _ = this + + +func (p *CELParser) OptExpr() (localctx IOptExprContext) { localctx = NewOptExprContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 28, CELParserRULE_optExpr) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.EnterOuterAlt(localctx, 1) p.SetState(230) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserQUESTIONMARK { { p.SetState(229) @@ -4834,6 +5476,10 @@ func (p *CELParser) OptExpr() (localctx IOptExprContext) { var _m = p.Match(CELParserQUESTIONMARK) localctx.(*OptExprContext).opt = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -4842,12 +5488,26 @@ func (p *CELParser) OptExpr() (localctx IOptExprContext) { var _x = p.Expr() + localctx.(*OptExprContext).e = _x } + + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + // ILiteralContext is an interface to support dynamic dispatch. type ILiteralContext interface { antlr.ParserRuleContext @@ -4859,23 +5519,28 @@ type ILiteralContext interface { } type LiteralContext struct { - *antlr.BaseParserRuleContext + antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyLiteralContext() *LiteralContext { var p = new(LiteralContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) p.RuleIndex = CELParserRULE_literal return p } +func InitEmptyLiteralContext(p *LiteralContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = CELParserRULE_literal +} + func (*LiteralContext) IsLiteralContext() {} func NewLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LiteralContext { var p = new(LiteralContext) - p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = CELParserRULE_literal @@ -4885,8 +5550,8 @@ func NewLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invo func (s *LiteralContext) GetParser() antlr.Parser { return s.parser } -func (s *LiteralContext) CopyFrom(ctx *LiteralContext) { - s.BaseParserRuleContext.CopyFrom(ctx.BaseParserRuleContext) +func (s *LiteralContext) CopyAll(ctx *LiteralContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) } func (s *LiteralContext) GetRuleContext() antlr.RuleContext { @@ -4897,23 +5562,28 @@ func (s *LiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer return antlr.TreesStringTree(s, ruleNames, recog) } + + + type BytesContext struct { - *LiteralContext + LiteralContext tok antlr.Token } func NewBytesContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BytesContext { var p = new(BytesContext) - p.LiteralContext = NewEmptyLiteralContext() + InitEmptyLiteralContext(&p.LiteralContext) p.parser = parser - p.CopyFrom(ctx.(*LiteralContext)) + p.CopyAll(ctx.(*LiteralContext)) return p } + func (s *BytesContext) GetTok() antlr.Token { return s.tok } + func (s *BytesContext) SetTok(v antlr.Token) { s.tok = v } func (s *BytesContext) GetRuleContext() antlr.RuleContext { @@ -4924,6 +5594,7 @@ func (s *BytesContext) BYTES() antlr.TerminalNode { return s.GetToken(CELParserBYTES, 0) } + func (s *BytesContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterBytes(s) @@ -4946,23 +5617,26 @@ func (s *BytesContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type UintContext struct { - *LiteralContext + LiteralContext tok antlr.Token } func NewUintContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UintContext { var p = new(UintContext) - p.LiteralContext = NewEmptyLiteralContext() + InitEmptyLiteralContext(&p.LiteralContext) p.parser = parser - p.CopyFrom(ctx.(*LiteralContext)) + p.CopyAll(ctx.(*LiteralContext)) return p } + func (s *UintContext) GetTok() antlr.Token { return s.tok } + func (s *UintContext) SetTok(v antlr.Token) { s.tok = v } func (s *UintContext) GetRuleContext() antlr.RuleContext { @@ -4973,6 +5647,7 @@ func (s *UintContext) NUM_UINT() antlr.TerminalNode { return s.GetToken(CELParserNUM_UINT, 0) } + func (s *UintContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterUint(s) @@ -4995,23 +5670,26 @@ func (s *UintContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type NullContext struct { - *LiteralContext + LiteralContext tok antlr.Token } func NewNullContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *NullContext { var p = new(NullContext) - p.LiteralContext = NewEmptyLiteralContext() + InitEmptyLiteralContext(&p.LiteralContext) p.parser = parser - p.CopyFrom(ctx.(*LiteralContext)) + p.CopyAll(ctx.(*LiteralContext)) return p } + func (s *NullContext) GetTok() antlr.Token { return s.tok } + func (s *NullContext) SetTok(v antlr.Token) { s.tok = v } func (s *NullContext) GetRuleContext() antlr.RuleContext { @@ -5022,6 +5700,7 @@ func (s *NullContext) NUL() antlr.TerminalNode { return s.GetToken(CELParserNUL, 0) } + func (s *NullContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterNull(s) @@ -5044,23 +5723,26 @@ func (s *NullContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type BoolFalseContext struct { - *LiteralContext + LiteralContext tok antlr.Token } func NewBoolFalseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BoolFalseContext { var p = new(BoolFalseContext) - p.LiteralContext = NewEmptyLiteralContext() + InitEmptyLiteralContext(&p.LiteralContext) p.parser = parser - p.CopyFrom(ctx.(*LiteralContext)) + p.CopyAll(ctx.(*LiteralContext)) return p } + func (s *BoolFalseContext) GetTok() antlr.Token { return s.tok } + func (s *BoolFalseContext) SetTok(v antlr.Token) { s.tok = v } func (s *BoolFalseContext) GetRuleContext() antlr.RuleContext { @@ -5071,6 +5753,7 @@ func (s *BoolFalseContext) CEL_FALSE() antlr.TerminalNode { return s.GetToken(CELParserCEL_FALSE, 0) } + func (s *BoolFalseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterBoolFalse(s) @@ -5093,23 +5776,26 @@ func (s *BoolFalseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type StringContext struct { - *LiteralContext + LiteralContext tok antlr.Token } func NewStringContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *StringContext { var p = new(StringContext) - p.LiteralContext = NewEmptyLiteralContext() + InitEmptyLiteralContext(&p.LiteralContext) p.parser = parser - p.CopyFrom(ctx.(*LiteralContext)) + p.CopyAll(ctx.(*LiteralContext)) return p } + func (s *StringContext) GetTok() antlr.Token { return s.tok } + func (s *StringContext) SetTok(v antlr.Token) { s.tok = v } func (s *StringContext) GetRuleContext() antlr.RuleContext { @@ -5120,6 +5806,7 @@ func (s *StringContext) STRING() antlr.TerminalNode { return s.GetToken(CELParserSTRING, 0) } + func (s *StringContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterString(s) @@ -5142,26 +5829,29 @@ func (s *StringContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type DoubleContext struct { - *LiteralContext + LiteralContext sign antlr.Token - tok antlr.Token + tok antlr.Token } func NewDoubleContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DoubleContext { var p = new(DoubleContext) - p.LiteralContext = NewEmptyLiteralContext() + InitEmptyLiteralContext(&p.LiteralContext) p.parser = parser - p.CopyFrom(ctx.(*LiteralContext)) + p.CopyAll(ctx.(*LiteralContext)) return p } + func (s *DoubleContext) GetSign() antlr.Token { return s.sign } func (s *DoubleContext) GetTok() antlr.Token { return s.tok } + func (s *DoubleContext) SetSign(v antlr.Token) { s.sign = v } func (s *DoubleContext) SetTok(v antlr.Token) { s.tok = v } @@ -5178,6 +5868,7 @@ func (s *DoubleContext) MINUS() antlr.TerminalNode { return s.GetToken(CELParserMINUS, 0) } + func (s *DoubleContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterDouble(s) @@ -5200,23 +5891,26 @@ func (s *DoubleContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type BoolTrueContext struct { - *LiteralContext + LiteralContext tok antlr.Token } func NewBoolTrueContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BoolTrueContext { var p = new(BoolTrueContext) - p.LiteralContext = NewEmptyLiteralContext() + InitEmptyLiteralContext(&p.LiteralContext) p.parser = parser - p.CopyFrom(ctx.(*LiteralContext)) + p.CopyAll(ctx.(*LiteralContext)) return p } + func (s *BoolTrueContext) GetTok() antlr.Token { return s.tok } + func (s *BoolTrueContext) SetTok(v antlr.Token) { s.tok = v } func (s *BoolTrueContext) GetRuleContext() antlr.RuleContext { @@ -5227,6 +5921,7 @@ func (s *BoolTrueContext) CEL_TRUE() antlr.TerminalNode { return s.GetToken(CELParserCEL_TRUE, 0) } + func (s *BoolTrueContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterBoolTrue(s) @@ -5249,26 +5944,29 @@ func (s *BoolTrueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } + type IntContext struct { - *LiteralContext + LiteralContext sign antlr.Token - tok antlr.Token + tok antlr.Token } func NewIntContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IntContext { var p = new(IntContext) - p.LiteralContext = NewEmptyLiteralContext() + InitEmptyLiteralContext(&p.LiteralContext) p.parser = parser - p.CopyFrom(ctx.(*LiteralContext)) + p.CopyAll(ctx.(*LiteralContext)) return p } + func (s *IntContext) GetSign() antlr.Token { return s.sign } func (s *IntContext) GetTok() antlr.Token { return s.tok } + func (s *IntContext) SetSign(v antlr.Token) { s.sign = v } func (s *IntContext) SetTok(v antlr.Token) { s.tok = v } @@ -5285,6 +5983,7 @@ func (s *IntContext) MINUS() antlr.TerminalNode { return s.GetToken(CELParserMINUS, 0) } + func (s *IntContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CELListener); ok { listenerT.EnterInt(s) @@ -5307,40 +6006,31 @@ func (s *IntContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } -func (p *CELParser) Literal() (localctx ILiteralContext) { - this := p - _ = this + +func (p *CELParser) Literal() (localctx ILiteralContext) { localctx = NewLiteralContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 30, CELParserRULE_literal) var _la int - defer func() { - p.ExitRule() - }() - - defer func() { - if err := recover(); err != nil { - if v, ok := err.(antlr.RecognitionException); ok { - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - } else { - panic(err) - } - } - }() - p.SetState(248) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 34, p.GetParserRuleContext()) { + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 34, p.GetParserRuleContext()) { case 1: localctx = NewIntContext(p, localctx) p.EnterOuterAlt(localctx, 1) p.SetState(235) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserMINUS { { p.SetState(234) @@ -5348,6 +6038,10 @@ func (p *CELParser) Literal() (localctx ILiteralContext) { var _m = p.Match(CELParserMINUS) localctx.(*IntContext).sign = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -5357,8 +6051,13 @@ func (p *CELParser) Literal() (localctx ILiteralContext) { var _m = p.Match(CELParserNUM_INT) localctx.(*IntContext).tok = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 2: localctx = NewUintContext(p, localctx) p.EnterOuterAlt(localctx, 2) @@ -5368,15 +6067,24 @@ func (p *CELParser) Literal() (localctx ILiteralContext) { var _m = p.Match(CELParserNUM_UINT) localctx.(*UintContext).tok = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 3: localctx = NewDoubleContext(p, localctx) p.EnterOuterAlt(localctx, 3) p.SetState(240) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } _la = p.GetTokenStream().LA(1) + if _la == CELParserMINUS { { p.SetState(239) @@ -5384,6 +6092,10 @@ func (p *CELParser) Literal() (localctx ILiteralContext) { var _m = p.Match(CELParserMINUS) localctx.(*DoubleContext).sign = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } } @@ -5393,8 +6105,13 @@ func (p *CELParser) Literal() (localctx ILiteralContext) { var _m = p.Match(CELParserNUM_FLOAT) localctx.(*DoubleContext).tok = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 4: localctx = NewStringContext(p, localctx) p.EnterOuterAlt(localctx, 4) @@ -5404,8 +6121,13 @@ func (p *CELParser) Literal() (localctx ILiteralContext) { var _m = p.Match(CELParserSTRING) localctx.(*StringContext).tok = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 5: localctx = NewBytesContext(p, localctx) p.EnterOuterAlt(localctx, 5) @@ -5415,8 +6137,13 @@ func (p *CELParser) Literal() (localctx ILiteralContext) { var _m = p.Match(CELParserBYTES) localctx.(*BytesContext).tok = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 6: localctx = NewBoolTrueContext(p, localctx) p.EnterOuterAlt(localctx, 6) @@ -5426,8 +6153,13 @@ func (p *CELParser) Literal() (localctx ILiteralContext) { var _m = p.Match(CELParserCEL_TRUE) localctx.(*BoolTrueContext).tok = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 7: localctx = NewBoolFalseContext(p, localctx) p.EnterOuterAlt(localctx, 7) @@ -5437,8 +6169,13 @@ func (p *CELParser) Literal() (localctx ILiteralContext) { var _m = p.Match(CELParserCEL_FALSE) localctx.(*BoolFalseContext).tok = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case 8: localctx = NewNullContext(p, localctx) p.EnterOuterAlt(localctx, 8) @@ -5448,35 +6185,48 @@ func (p *CELParser) Literal() (localctx ILiteralContext) { var _m = p.Match(CELParserNUL) localctx.(*NullContext).tok = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + case antlr.ATNInvalidAltNumber: + goto errorExit } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() return localctx + goto errorExit // Trick to prevent compiler error if the label is not used } + func (p *CELParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool { switch ruleIndex { case 4: - var t *RelationContext = nil - if localctx != nil { - t = localctx.(*RelationContext) - } - return p.Relation_Sempred(t, predIndex) + var t *RelationContext = nil + if localctx != nil { t = localctx.(*RelationContext) } + return p.Relation_Sempred(t, predIndex) case 5: - var t *CalcContext = nil - if localctx != nil { - t = localctx.(*CalcContext) - } - return p.Calc_Sempred(t, predIndex) + var t *CalcContext = nil + if localctx != nil { t = localctx.(*CalcContext) } + return p.Calc_Sempred(t, predIndex) case 7: - var t *MemberContext = nil - if localctx != nil { - t = localctx.(*MemberContext) - } - return p.Member_Sempred(t, predIndex) + var t *MemberContext = nil + if localctx != nil { t = localctx.(*MemberContext) } + return p.Member_Sempred(t, predIndex) + default: panic("No predicate with index: " + fmt.Sprint(ruleIndex)) @@ -5484,12 +6234,9 @@ func (p *CELParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int } func (p *CELParser) Relation_Sempred(localctx antlr.RuleContext, predIndex int) bool { - this := p - _ = this - switch predIndex { case 0: - return p.Precpred(p.GetParserRuleContext(), 1) + return p.Precpred(p.GetParserRuleContext(), 1) default: panic("No predicate with index: " + fmt.Sprint(predIndex)) @@ -5497,15 +6244,12 @@ func (p *CELParser) Relation_Sempred(localctx antlr.RuleContext, predIndex int) } func (p *CELParser) Calc_Sempred(localctx antlr.RuleContext, predIndex int) bool { - this := p - _ = this - switch predIndex { case 1: - return p.Precpred(p.GetParserRuleContext(), 2) + return p.Precpred(p.GetParserRuleContext(), 2) case 2: - return p.Precpred(p.GetParserRuleContext(), 1) + return p.Precpred(p.GetParserRuleContext(), 1) default: panic("No predicate with index: " + fmt.Sprint(predIndex)) @@ -5513,20 +6257,18 @@ func (p *CELParser) Calc_Sempred(localctx antlr.RuleContext, predIndex int) bool } func (p *CELParser) Member_Sempred(localctx antlr.RuleContext, predIndex int) bool { - this := p - _ = this - switch predIndex { case 3: - return p.Precpred(p.GetParserRuleContext(), 3) + return p.Precpred(p.GetParserRuleContext(), 3) case 4: - return p.Precpred(p.GetParserRuleContext(), 2) + return p.Precpred(p.GetParserRuleContext(), 2) case 5: - return p.Precpred(p.GetParserRuleContext(), 1) + return p.Precpred(p.GetParserRuleContext(), 1) default: panic("No predicate with index: " + fmt.Sprint(predIndex)) } } + diff --git a/vendor/github.com/google/cel-go/parser/gen/cel_visitor.go b/vendor/github.com/google/cel-go/parser/gen/cel_visitor.go index 2c54e2cb02e..d2fbd563ab7 100644 --- a/vendor/github.com/google/cel-go/parser/gen/cel_visitor.go +++ b/vendor/github.com/google/cel-go/parser/gen/cel_visitor.go @@ -1,7 +1,8 @@ -// Code generated from /Users/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.12.0. DO NOT EDIT. +// Code generated from /usr/local/google/home/tswadell/go/src/github.com/google/cel-go/parser/gen/CEL.g4 by ANTLR 4.13.1. DO NOT EDIT. package gen // CEL -import "github.com/antlr/antlr4/runtime/Go/antlr/v4" +import "github.com/antlr4-go/antlr/v4" + // A complete Visitor for a parse tree produced by CELParser. type CELVisitor interface { @@ -105,4 +106,5 @@ type CELVisitor interface { // Visit a parse tree produced by CELParser#Null. VisitNull(ctx *NullContext) interface{} -} + +} \ No newline at end of file diff --git a/vendor/github.com/google/cel-go/parser/gen/generate.sh b/vendor/github.com/google/cel-go/parser/gen/generate.sh index 389107c6a57..27a9559f7c4 100644 --- a/vendor/github.com/google/cel-go/parser/gen/generate.sh +++ b/vendor/github.com/google/cel-go/parser/gen/generate.sh @@ -27,7 +27,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Generate AntLR artifacts. -java -Xmx500M -cp ${DIR}/antlr-4.12.0-complete.jar org.antlr.v4.Tool \ +java -Xmx500M -cp ${DIR}/antlr-4.13.1-complete.jar org.antlr.v4.Tool \ -Dlanguage=Go \ -package gen \ -o ${DIR} \ diff --git a/vendor/github.com/google/cel-go/parser/helper.go b/vendor/github.com/google/cel-go/parser/helper.go index a5f29e3d7ae..182ff034c22 100644 --- a/vendor/github.com/google/cel-go/parser/helper.go +++ b/vendor/github.com/google/cel-go/parser/helper.go @@ -17,284 +17,209 @@ package parser import ( "sync" - antlr "github.com/antlr/antlr4/runtime/Go/antlr/v4" + antlr "github.com/antlr4-go/antlr/v4" "github.com/google/cel-go/common" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + "github.com/google/cel-go/common/ast" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" ) type parserHelper struct { - source common.Source - nextID int64 - positions map[int64]int32 - macroCalls map[int64]*exprpb.Expr + exprFactory ast.ExprFactory + source common.Source + sourceInfo *ast.SourceInfo + nextID int64 } -func newParserHelper(source common.Source) *parserHelper { +func newParserHelper(source common.Source, fac ast.ExprFactory) *parserHelper { return &parserHelper{ - source: source, - nextID: 1, - positions: make(map[int64]int32), - macroCalls: make(map[int64]*exprpb.Expr), + exprFactory: fac, + source: source, + sourceInfo: ast.NewSourceInfo(source), + nextID: 1, } } -func (p *parserHelper) getSourceInfo() *exprpb.SourceInfo { - return &exprpb.SourceInfo{ - Location: p.source.Description(), - Positions: p.positions, - LineOffsets: p.source.LineOffsets(), - MacroCalls: p.macroCalls} +func (p *parserHelper) getSourceInfo() *ast.SourceInfo { + return p.sourceInfo } -func (p *parserHelper) newLiteral(ctx any, value *exprpb.Constant) *exprpb.Expr { - exprNode := p.newExpr(ctx) - exprNode.ExprKind = &exprpb.Expr_ConstExpr{ConstExpr: value} - return exprNode +func (p *parserHelper) newLiteral(ctx any, value ref.Val) ast.Expr { + return p.exprFactory.NewLiteral(p.newID(ctx), value) } -func (p *parserHelper) newLiteralBool(ctx any, value bool) *exprpb.Expr { - return p.newLiteral(ctx, - &exprpb.Constant{ConstantKind: &exprpb.Constant_BoolValue{BoolValue: value}}) +func (p *parserHelper) newLiteralBool(ctx any, value bool) ast.Expr { + return p.newLiteral(ctx, types.Bool(value)) } -func (p *parserHelper) newLiteralString(ctx any, value string) *exprpb.Expr { - return p.newLiteral(ctx, - &exprpb.Constant{ConstantKind: &exprpb.Constant_StringValue{StringValue: value}}) +func (p *parserHelper) newLiteralString(ctx any, value string) ast.Expr { + return p.newLiteral(ctx, types.String(value)) } -func (p *parserHelper) newLiteralBytes(ctx any, value []byte) *exprpb.Expr { - return p.newLiteral(ctx, - &exprpb.Constant{ConstantKind: &exprpb.Constant_BytesValue{BytesValue: value}}) +func (p *parserHelper) newLiteralBytes(ctx any, value []byte) ast.Expr { + return p.newLiteral(ctx, types.Bytes(value)) } -func (p *parserHelper) newLiteralInt(ctx any, value int64) *exprpb.Expr { - return p.newLiteral(ctx, - &exprpb.Constant{ConstantKind: &exprpb.Constant_Int64Value{Int64Value: value}}) +func (p *parserHelper) newLiteralInt(ctx any, value int64) ast.Expr { + return p.newLiteral(ctx, types.Int(value)) } -func (p *parserHelper) newLiteralUint(ctx any, value uint64) *exprpb.Expr { - return p.newLiteral(ctx, &exprpb.Constant{ConstantKind: &exprpb.Constant_Uint64Value{Uint64Value: value}}) +func (p *parserHelper) newLiteralUint(ctx any, value uint64) ast.Expr { + return p.newLiteral(ctx, types.Uint(value)) } -func (p *parserHelper) newLiteralDouble(ctx any, value float64) *exprpb.Expr { - return p.newLiteral(ctx, - &exprpb.Constant{ConstantKind: &exprpb.Constant_DoubleValue{DoubleValue: value}}) +func (p *parserHelper) newLiteralDouble(ctx any, value float64) ast.Expr { + return p.newLiteral(ctx, types.Double(value)) } -func (p *parserHelper) newIdent(ctx any, name string) *exprpb.Expr { - exprNode := p.newExpr(ctx) - exprNode.ExprKind = &exprpb.Expr_IdentExpr{IdentExpr: &exprpb.Expr_Ident{Name: name}} - return exprNode +func (p *parserHelper) newIdent(ctx any, name string) ast.Expr { + return p.exprFactory.NewIdent(p.newID(ctx), name) } -func (p *parserHelper) newSelect(ctx any, operand *exprpb.Expr, field string) *exprpb.Expr { - exprNode := p.newExpr(ctx) - exprNode.ExprKind = &exprpb.Expr_SelectExpr{ - SelectExpr: &exprpb.Expr_Select{Operand: operand, Field: field}} - return exprNode +func (p *parserHelper) newSelect(ctx any, operand ast.Expr, field string) ast.Expr { + return p.exprFactory.NewSelect(p.newID(ctx), operand, field) } -func (p *parserHelper) newPresenceTest(ctx any, operand *exprpb.Expr, field string) *exprpb.Expr { - exprNode := p.newExpr(ctx) - exprNode.ExprKind = &exprpb.Expr_SelectExpr{ - SelectExpr: &exprpb.Expr_Select{Operand: operand, Field: field, TestOnly: true}} - return exprNode +func (p *parserHelper) newPresenceTest(ctx any, operand ast.Expr, field string) ast.Expr { + return p.exprFactory.NewPresenceTest(p.newID(ctx), operand, field) } -func (p *parserHelper) newGlobalCall(ctx any, function string, args ...*exprpb.Expr) *exprpb.Expr { - exprNode := p.newExpr(ctx) - exprNode.ExprKind = &exprpb.Expr_CallExpr{ - CallExpr: &exprpb.Expr_Call{Function: function, Args: args}} - return exprNode +func (p *parserHelper) newGlobalCall(ctx any, function string, args ...ast.Expr) ast.Expr { + return p.exprFactory.NewCall(p.newID(ctx), function, args...) } -func (p *parserHelper) newReceiverCall(ctx any, function string, target *exprpb.Expr, args ...*exprpb.Expr) *exprpb.Expr { - exprNode := p.newExpr(ctx) - exprNode.ExprKind = &exprpb.Expr_CallExpr{ - CallExpr: &exprpb.Expr_Call{Function: function, Target: target, Args: args}} - return exprNode +func (p *parserHelper) newReceiverCall(ctx any, function string, target ast.Expr, args ...ast.Expr) ast.Expr { + return p.exprFactory.NewMemberCall(p.newID(ctx), function, target, args...) } -func (p *parserHelper) newList(ctx any, elements []*exprpb.Expr, optionals ...int32) *exprpb.Expr { - exprNode := p.newExpr(ctx) - exprNode.ExprKind = &exprpb.Expr_ListExpr{ - ListExpr: &exprpb.Expr_CreateList{ - Elements: elements, - OptionalIndices: optionals, - }} - return exprNode +func (p *parserHelper) newList(ctx any, elements []ast.Expr, optionals ...int32) ast.Expr { + return p.exprFactory.NewList(p.newID(ctx), elements, optionals) } -func (p *parserHelper) newMap(ctx any, entries ...*exprpb.Expr_CreateStruct_Entry) *exprpb.Expr { - exprNode := p.newExpr(ctx) - exprNode.ExprKind = &exprpb.Expr_StructExpr{ - StructExpr: &exprpb.Expr_CreateStruct{Entries: entries}} - return exprNode +func (p *parserHelper) newMap(ctx any, entries ...ast.EntryExpr) ast.Expr { + return p.exprFactory.NewMap(p.newID(ctx), entries) } -func (p *parserHelper) newMapEntry(entryID int64, key *exprpb.Expr, value *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry { - return &exprpb.Expr_CreateStruct_Entry{ - Id: entryID, - KeyKind: &exprpb.Expr_CreateStruct_Entry_MapKey{MapKey: key}, - Value: value, - OptionalEntry: optional, - } +func (p *parserHelper) newMapEntry(entryID int64, key ast.Expr, value ast.Expr, optional bool) ast.EntryExpr { + return p.exprFactory.NewMapEntry(entryID, key, value, optional) } -func (p *parserHelper) newObject(ctx any, typeName string, entries ...*exprpb.Expr_CreateStruct_Entry) *exprpb.Expr { - exprNode := p.newExpr(ctx) - exprNode.ExprKind = &exprpb.Expr_StructExpr{ - StructExpr: &exprpb.Expr_CreateStruct{ - MessageName: typeName, - Entries: entries, - }, - } - return exprNode +func (p *parserHelper) newObject(ctx any, typeName string, fields ...ast.EntryExpr) ast.Expr { + return p.exprFactory.NewStruct(p.newID(ctx), typeName, fields) } -func (p *parserHelper) newObjectField(fieldID int64, field string, value *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry { - return &exprpb.Expr_CreateStruct_Entry{ - Id: fieldID, - KeyKind: &exprpb.Expr_CreateStruct_Entry_FieldKey{FieldKey: field}, - Value: value, - OptionalEntry: optional, - } +func (p *parserHelper) newObjectField(fieldID int64, field string, value ast.Expr, optional bool) ast.EntryExpr { + return p.exprFactory.NewStructField(fieldID, field, value, optional) } -func (p *parserHelper) newComprehension(ctx any, iterVar string, - iterRange *exprpb.Expr, +func (p *parserHelper) newComprehension(ctx any, + iterRange ast.Expr, + iterVar string, accuVar string, - accuInit *exprpb.Expr, - condition *exprpb.Expr, - step *exprpb.Expr, - result *exprpb.Expr) *exprpb.Expr { - exprNode := p.newExpr(ctx) - exprNode.ExprKind = &exprpb.Expr_ComprehensionExpr{ - ComprehensionExpr: &exprpb.Expr_Comprehension{ - AccuVar: accuVar, - AccuInit: accuInit, - IterVar: iterVar, - IterRange: iterRange, - LoopCondition: condition, - LoopStep: step, - Result: result}} - return exprNode -} - -func (p *parserHelper) newExpr(ctx any) *exprpb.Expr { - id, isID := ctx.(int64) - if isID { - return &exprpb.Expr{Id: id} + accuInit ast.Expr, + condition ast.Expr, + step ast.Expr, + result ast.Expr) ast.Expr { + return p.exprFactory.NewComprehension( + p.newID(ctx), iterRange, iterVar, accuVar, accuInit, condition, step, result) +} + +func (p *parserHelper) newID(ctx any) int64 { + if id, isID := ctx.(int64); isID { + return id } - return &exprpb.Expr{Id: p.id(ctx)} + return p.id(ctx) +} + +func (p *parserHelper) newExpr(ctx any) ast.Expr { + return p.exprFactory.NewUnspecifiedExpr(p.newID(ctx)) } func (p *parserHelper) id(ctx any) int64 { - var location common.Location + var offset ast.OffsetRange switch c := ctx.(type) { case antlr.ParserRuleContext: - token := c.GetStart() - location = p.source.NewLocation(token.GetLine(), token.GetColumn()) + start, stop := c.GetStart(), c.GetStop() + if stop == nil { + stop = start + } + offset.Start = p.sourceInfo.ComputeOffset(int32(start.GetLine()), int32(start.GetColumn())) + offset.Stop = p.sourceInfo.ComputeOffset(int32(stop.GetLine()), int32(stop.GetColumn())) case antlr.Token: - token := c - location = p.source.NewLocation(token.GetLine(), token.GetColumn()) + offset.Start = p.sourceInfo.ComputeOffset(int32(c.GetLine()), int32(c.GetColumn())) + offset.Stop = offset.Start case common.Location: - location = c + offset.Start = p.sourceInfo.ComputeOffset(int32(c.Line()), int32(c.Column())) + offset.Stop = offset.Start + case ast.OffsetRange: + offset = c default: // This should only happen if the ctx is nil return -1 } id := p.nextID - p.positions[id], _ = p.source.LocationOffset(location) + p.sourceInfo.SetOffsetRange(id, offset) p.nextID++ return id } func (p *parserHelper) getLocation(id int64) common.Location { - characterOffset := p.positions[id] - location, _ := p.source.OffsetLocation(characterOffset) - return location + return p.sourceInfo.GetStartLocation(id) } // buildMacroCallArg iterates the expression and returns a new expression // where all macros have been replaced by their IDs in MacroCalls -func (p *parserHelper) buildMacroCallArg(expr *exprpb.Expr) *exprpb.Expr { - if _, found := p.macroCalls[expr.GetId()]; found { - return &exprpb.Expr{Id: expr.GetId()} +func (p *parserHelper) buildMacroCallArg(expr ast.Expr) ast.Expr { + if _, found := p.sourceInfo.GetMacroCall(expr.ID()); found { + return p.exprFactory.NewUnspecifiedExpr(expr.ID()) } - switch expr.GetExprKind().(type) { - case *exprpb.Expr_CallExpr: + switch expr.Kind() { + case ast.CallKind: // Iterate the AST from `expr` recursively looking for macros. Because we are at most // starting from the top level macro, this recursion is bounded by the size of the AST. This // means that the depth check on the AST during parsing will catch recursion overflows // before we get to here. - macroTarget := expr.GetCallExpr().GetTarget() - if macroTarget != nil { - macroTarget = p.buildMacroCallArg(macroTarget) - } - macroArgs := make([]*exprpb.Expr, len(expr.GetCallExpr().GetArgs())) - for index, arg := range expr.GetCallExpr().GetArgs() { + call := expr.AsCall() + macroArgs := make([]ast.Expr, len(call.Args())) + for index, arg := range call.Args() { macroArgs[index] = p.buildMacroCallArg(arg) } - return &exprpb.Expr{ - Id: expr.GetId(), - ExprKind: &exprpb.Expr_CallExpr{ - CallExpr: &exprpb.Expr_Call{ - Target: macroTarget, - Function: expr.GetCallExpr().GetFunction(), - Args: macroArgs, - }, - }, + if !call.IsMemberFunction() { + return p.exprFactory.NewCall(expr.ID(), call.FunctionName(), macroArgs...) } - case *exprpb.Expr_ListExpr: - listExpr := expr.GetListExpr() - macroListArgs := make([]*exprpb.Expr, len(listExpr.GetElements())) - for i, elem := range listExpr.GetElements() { + macroTarget := p.buildMacroCallArg(call.Target()) + return p.exprFactory.NewMemberCall(expr.ID(), call.FunctionName(), macroTarget, macroArgs...) + case ast.ListKind: + list := expr.AsList() + macroListArgs := make([]ast.Expr, list.Size()) + for i, elem := range list.Elements() { macroListArgs[i] = p.buildMacroCallArg(elem) } - return &exprpb.Expr{ - Id: expr.GetId(), - ExprKind: &exprpb.Expr_ListExpr{ - ListExpr: &exprpb.Expr_CreateList{ - Elements: macroListArgs, - OptionalIndices: listExpr.GetOptionalIndices(), - }, - }, - } + return p.exprFactory.NewList(expr.ID(), macroListArgs, list.OptionalIndices()) } - return expr } // addMacroCall adds the macro the the MacroCalls map in source info. If a macro has args/subargs/target // that are macros, their ID will be stored instead for later self-lookups. -func (p *parserHelper) addMacroCall(exprID int64, function string, target *exprpb.Expr, args ...*exprpb.Expr) { - macroTarget := target - if target != nil { - if _, found := p.macroCalls[target.GetId()]; found { - macroTarget = &exprpb.Expr{Id: target.GetId()} - } else { - macroTarget = p.buildMacroCallArg(target) - } - } - - macroArgs := make([]*exprpb.Expr, len(args)) +func (p *parserHelper) addMacroCall(exprID int64, function string, target ast.Expr, args ...ast.Expr) { + macroArgs := make([]ast.Expr, len(args)) for index, arg := range args { macroArgs[index] = p.buildMacroCallArg(arg) } - - p.macroCalls[exprID] = &exprpb.Expr{ - ExprKind: &exprpb.Expr_CallExpr{ - CallExpr: &exprpb.Expr_Call{ - Target: macroTarget, - Function: function, - Args: macroArgs, - }, - }, + if target == nil { + p.sourceInfo.SetMacroCall(exprID, p.exprFactory.NewCall(0, function, macroArgs...)) + return } + macroTarget := target + if _, found := p.sourceInfo.GetMacroCall(target.ID()); found { + macroTarget = p.exprFactory.NewUnspecifiedExpr(target.ID()) + } else { + macroTarget = p.buildMacroCallArg(target) + } + p.sourceInfo.SetMacroCall(exprID, p.exprFactory.NewMemberCall(0, function, macroTarget, macroArgs...)) } // logicManager compacts logical trees into a more efficient structure which is semantically @@ -309,71 +234,71 @@ func (p *parserHelper) addMacroCall(exprID int64, function string, target *exprp // controversial choice as it alters the traditional order of execution assumptions present in most // expressions. type logicManager struct { - helper *parserHelper + exprFactory ast.ExprFactory function string - terms []*exprpb.Expr + terms []ast.Expr ops []int64 variadicASTs bool } // newVariadicLogicManager creates a logic manager instance bound to a specific function and its first term. -func newVariadicLogicManager(h *parserHelper, function string, term *exprpb.Expr) *logicManager { +func newVariadicLogicManager(fac ast.ExprFactory, function string, term ast.Expr) *logicManager { return &logicManager{ - helper: h, + exprFactory: fac, function: function, - terms: []*exprpb.Expr{term}, + terms: []ast.Expr{term}, ops: []int64{}, variadicASTs: true, } } // newBalancingLogicManager creates a logic manager instance bound to a specific function and its first term. -func newBalancingLogicManager(h *parserHelper, function string, term *exprpb.Expr) *logicManager { +func newBalancingLogicManager(fac ast.ExprFactory, function string, term ast.Expr) *logicManager { return &logicManager{ - helper: h, + exprFactory: fac, function: function, - terms: []*exprpb.Expr{term}, + terms: []ast.Expr{term}, ops: []int64{}, variadicASTs: false, } } // addTerm adds an operation identifier and term to the set of terms to be balanced. -func (l *logicManager) addTerm(op int64, term *exprpb.Expr) { +func (l *logicManager) addTerm(op int64, term ast.Expr) { l.terms = append(l.terms, term) l.ops = append(l.ops, op) } // toExpr renders the logic graph into an Expr value, either balancing a tree of logical // operations or creating a variadic representation of the logical operator. -func (l *logicManager) toExpr() *exprpb.Expr { +func (l *logicManager) toExpr() ast.Expr { if len(l.terms) == 1 { return l.terms[0] } if l.variadicASTs { - return l.helper.newGlobalCall(l.ops[0], l.function, l.terms...) + return l.exprFactory.NewCall(l.ops[0], l.function, l.terms...) } return l.balancedTree(0, len(l.ops)-1) } // balancedTree recursively balances the terms provided to a commutative operator. -func (l *logicManager) balancedTree(lo, hi int) *exprpb.Expr { +func (l *logicManager) balancedTree(lo, hi int) ast.Expr { mid := (lo + hi + 1) / 2 - var left *exprpb.Expr + var left ast.Expr if mid == lo { left = l.terms[mid] } else { left = l.balancedTree(lo, mid-1) } - var right *exprpb.Expr + var right ast.Expr if mid == hi { right = l.terms[mid+1] } else { right = l.balancedTree(mid+1, hi) } - return l.helper.newGlobalCall(l.ops[mid], l.function, left, right) + return l.exprFactory.NewCall(l.ops[mid], l.function, left, right) } type exprHelper struct { @@ -387,202 +312,151 @@ func (e *exprHelper) nextMacroID() int64 { // Copy implements the ExprHelper interface method by producing a copy of the input Expr value // with a fresh set of numeric identifiers the Expr and all its descendants. -func (e *exprHelper) Copy(expr *exprpb.Expr) *exprpb.Expr { - copy := e.parserHelper.newExpr(e.parserHelper.getLocation(expr.GetId())) - switch expr.GetExprKind().(type) { - case *exprpb.Expr_ConstExpr: - copy.ExprKind = &exprpb.Expr_ConstExpr{ConstExpr: expr.GetConstExpr()} - case *exprpb.Expr_IdentExpr: - copy.ExprKind = &exprpb.Expr_IdentExpr{IdentExpr: expr.GetIdentExpr()} - case *exprpb.Expr_SelectExpr: - op := expr.GetSelectExpr().GetOperand() - copy.ExprKind = &exprpb.Expr_SelectExpr{SelectExpr: &exprpb.Expr_Select{ - Operand: e.Copy(op), - Field: expr.GetSelectExpr().GetField(), - TestOnly: expr.GetSelectExpr().GetTestOnly(), - }} - case *exprpb.Expr_CallExpr: - call := expr.GetCallExpr() - target := call.GetTarget() - if target != nil { - target = e.Copy(target) +func (e *exprHelper) Copy(expr ast.Expr) ast.Expr { + offsetRange, _ := e.parserHelper.sourceInfo.GetOffsetRange(expr.ID()) + copyID := e.parserHelper.newID(offsetRange) + switch expr.Kind() { + case ast.LiteralKind: + return e.exprFactory.NewLiteral(copyID, expr.AsLiteral()) + case ast.IdentKind: + return e.exprFactory.NewIdent(copyID, expr.AsIdent()) + case ast.SelectKind: + sel := expr.AsSelect() + op := e.Copy(sel.Operand()) + if sel.IsTestOnly() { + return e.exprFactory.NewPresenceTest(copyID, op, sel.FieldName()) } - args := call.GetArgs() - argsCopy := make([]*exprpb.Expr, len(args)) + return e.exprFactory.NewSelect(copyID, op, sel.FieldName()) + case ast.CallKind: + call := expr.AsCall() + args := call.Args() + argsCopy := make([]ast.Expr, len(args)) for i, arg := range args { argsCopy[i] = e.Copy(arg) } - copy.ExprKind = &exprpb.Expr_CallExpr{ - CallExpr: &exprpb.Expr_Call{ - Function: call.GetFunction(), - Target: target, - Args: argsCopy, - }, + if !call.IsMemberFunction() { + return e.exprFactory.NewCall(copyID, call.FunctionName(), argsCopy...) } - case *exprpb.Expr_ListExpr: - elems := expr.GetListExpr().GetElements() - elemsCopy := make([]*exprpb.Expr, len(elems)) + return e.exprFactory.NewMemberCall(copyID, call.FunctionName(), e.Copy(call.Target()), argsCopy...) + case ast.ListKind: + list := expr.AsList() + elems := list.Elements() + elemsCopy := make([]ast.Expr, len(elems)) for i, elem := range elems { elemsCopy[i] = e.Copy(elem) } - copy.ExprKind = &exprpb.Expr_ListExpr{ - ListExpr: &exprpb.Expr_CreateList{Elements: elemsCopy}, - } - case *exprpb.Expr_StructExpr: - entries := expr.GetStructExpr().GetEntries() - entriesCopy := make([]*exprpb.Expr_CreateStruct_Entry, len(entries)) - for i, entry := range entries { - entryCopy := &exprpb.Expr_CreateStruct_Entry{} - entryCopy.Id = e.nextMacroID() - switch entry.GetKeyKind().(type) { - case *exprpb.Expr_CreateStruct_Entry_FieldKey: - entryCopy.KeyKind = &exprpb.Expr_CreateStruct_Entry_FieldKey{ - FieldKey: entry.GetFieldKey(), - } - case *exprpb.Expr_CreateStruct_Entry_MapKey: - entryCopy.KeyKind = &exprpb.Expr_CreateStruct_Entry_MapKey{ - MapKey: e.Copy(entry.GetMapKey()), - } - } - entryCopy.Value = e.Copy(entry.GetValue()) - entriesCopy[i] = entryCopy + return e.exprFactory.NewList(copyID, elemsCopy, list.OptionalIndices()) + case ast.MapKind: + m := expr.AsMap() + entries := m.Entries() + entriesCopy := make([]ast.EntryExpr, len(entries)) + for i, en := range entries { + entry := en.AsMapEntry() + entryID := e.nextMacroID() + entriesCopy[i] = e.exprFactory.NewMapEntry(entryID, + e.Copy(entry.Key()), e.Copy(entry.Value()), entry.IsOptional()) } - copy.ExprKind = &exprpb.Expr_StructExpr{ - StructExpr: &exprpb.Expr_CreateStruct{ - MessageName: expr.GetStructExpr().GetMessageName(), - Entries: entriesCopy, - }, - } - case *exprpb.Expr_ComprehensionExpr: - iterRange := e.Copy(expr.GetComprehensionExpr().GetIterRange()) - accuInit := e.Copy(expr.GetComprehensionExpr().GetAccuInit()) - cond := e.Copy(expr.GetComprehensionExpr().GetLoopCondition()) - step := e.Copy(expr.GetComprehensionExpr().GetLoopStep()) - result := e.Copy(expr.GetComprehensionExpr().GetResult()) - copy.ExprKind = &exprpb.Expr_ComprehensionExpr{ - ComprehensionExpr: &exprpb.Expr_Comprehension{ - IterRange: iterRange, - IterVar: expr.GetComprehensionExpr().GetIterVar(), - AccuInit: accuInit, - AccuVar: expr.GetComprehensionExpr().GetAccuVar(), - LoopCondition: cond, - LoopStep: step, - Result: result, - }, + return e.exprFactory.NewMap(copyID, entriesCopy) + case ast.StructKind: + s := expr.AsStruct() + fields := s.Fields() + fieldsCopy := make([]ast.EntryExpr, len(fields)) + for i, f := range fields { + field := f.AsStructField() + fieldID := e.nextMacroID() + fieldsCopy[i] = e.exprFactory.NewStructField(fieldID, + field.Name(), e.Copy(field.Value()), field.IsOptional()) } + return e.exprFactory.NewStruct(copyID, s.TypeName(), fieldsCopy) + case ast.ComprehensionKind: + compre := expr.AsComprehension() + iterRange := e.Copy(compre.IterRange()) + accuInit := e.Copy(compre.AccuInit()) + cond := e.Copy(compre.LoopCondition()) + step := e.Copy(compre.LoopStep()) + result := e.Copy(compre.Result()) + return e.exprFactory.NewComprehension(copyID, + iterRange, compre.IterVar(), compre.AccuVar(), accuInit, cond, step, result) } - return copy -} - -// LiteralBool implements the ExprHelper interface method. -func (e *exprHelper) LiteralBool(value bool) *exprpb.Expr { - return e.parserHelper.newLiteralBool(e.nextMacroID(), value) -} - -// LiteralBytes implements the ExprHelper interface method. -func (e *exprHelper) LiteralBytes(value []byte) *exprpb.Expr { - return e.parserHelper.newLiteralBytes(e.nextMacroID(), value) -} - -// LiteralDouble implements the ExprHelper interface method. -func (e *exprHelper) LiteralDouble(value float64) *exprpb.Expr { - return e.parserHelper.newLiteralDouble(e.nextMacroID(), value) -} - -// LiteralInt implements the ExprHelper interface method. -func (e *exprHelper) LiteralInt(value int64) *exprpb.Expr { - return e.parserHelper.newLiteralInt(e.nextMacroID(), value) + return e.exprFactory.NewUnspecifiedExpr(copyID) } -// LiteralString implements the ExprHelper interface method. -func (e *exprHelper) LiteralString(value string) *exprpb.Expr { - return e.parserHelper.newLiteralString(e.nextMacroID(), value) -} - -// LiteralUint implements the ExprHelper interface method. -func (e *exprHelper) LiteralUint(value uint64) *exprpb.Expr { - return e.parserHelper.newLiteralUint(e.nextMacroID(), value) +// NewLiteral implements the ExprHelper interface method. +func (e *exprHelper) NewLiteral(value ref.Val) ast.Expr { + return e.exprFactory.NewLiteral(e.nextMacroID(), value) } // NewList implements the ExprHelper interface method. -func (e *exprHelper) NewList(elems ...*exprpb.Expr) *exprpb.Expr { - return e.parserHelper.newList(e.nextMacroID(), elems) +func (e *exprHelper) NewList(elems ...ast.Expr) ast.Expr { + return e.exprFactory.NewList(e.nextMacroID(), elems, []int32{}) } // NewMap implements the ExprHelper interface method. -func (e *exprHelper) NewMap(entries ...*exprpb.Expr_CreateStruct_Entry) *exprpb.Expr { - return e.parserHelper.newMap(e.nextMacroID(), entries...) +func (e *exprHelper) NewMap(entries ...ast.EntryExpr) ast.Expr { + return e.exprFactory.NewMap(e.nextMacroID(), entries) } // NewMapEntry implements the ExprHelper interface method. -func (e *exprHelper) NewMapEntry(key *exprpb.Expr, val *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry { - return e.parserHelper.newMapEntry(e.nextMacroID(), key, val, optional) +func (e *exprHelper) NewMapEntry(key ast.Expr, val ast.Expr, optional bool) ast.EntryExpr { + return e.exprFactory.NewMapEntry(e.nextMacroID(), key, val, optional) } -// NewObject implements the ExprHelper interface method. -func (e *exprHelper) NewObject(typeName string, fieldInits ...*exprpb.Expr_CreateStruct_Entry) *exprpb.Expr { - return e.parserHelper.newObject(e.nextMacroID(), typeName, fieldInits...) +// NewStruct implements the ExprHelper interface method. +func (e *exprHelper) NewStruct(typeName string, fieldInits ...ast.EntryExpr) ast.Expr { + return e.exprFactory.NewStruct(e.nextMacroID(), typeName, fieldInits) } -// NewObjectFieldInit implements the ExprHelper interface method. -func (e *exprHelper) NewObjectFieldInit(field string, init *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry { - return e.parserHelper.newObjectField(e.nextMacroID(), field, init, optional) +// NewStructField implements the ExprHelper interface method. +func (e *exprHelper) NewStructField(field string, init ast.Expr, optional bool) ast.EntryExpr { + return e.exprFactory.NewStructField(e.nextMacroID(), field, init, optional) } -// Fold implements the ExprHelper interface method. -func (e *exprHelper) Fold(iterVar string, - iterRange *exprpb.Expr, +// NewComprehension implements the ExprHelper interface method. +func (e *exprHelper) NewComprehension( + iterRange ast.Expr, + iterVar string, accuVar string, - accuInit *exprpb.Expr, - condition *exprpb.Expr, - step *exprpb.Expr, - result *exprpb.Expr) *exprpb.Expr { - return e.parserHelper.newComprehension( - e.nextMacroID(), iterVar, iterRange, accuVar, accuInit, condition, step, result) + accuInit ast.Expr, + condition ast.Expr, + step ast.Expr, + result ast.Expr) ast.Expr { + return e.exprFactory.NewComprehension( + e.nextMacroID(), iterRange, iterVar, accuVar, accuInit, condition, step, result) } -// Ident implements the ExprHelper interface method. -func (e *exprHelper) Ident(name string) *exprpb.Expr { - return e.parserHelper.newIdent(e.nextMacroID(), name) +// NewIdent implements the ExprHelper interface method. +func (e *exprHelper) NewIdent(name string) ast.Expr { + return e.exprFactory.NewIdent(e.nextMacroID(), name) } -// AccuIdent implements the ExprHelper interface method. -func (e *exprHelper) AccuIdent() *exprpb.Expr { - return e.parserHelper.newIdent(e.nextMacroID(), AccumulatorName) +// NewAccuIdent implements the ExprHelper interface method. +func (e *exprHelper) NewAccuIdent() ast.Expr { + return e.exprFactory.NewAccuIdent(e.nextMacroID()) } -// GlobalCall implements the ExprHelper interface method. -func (e *exprHelper) GlobalCall(function string, args ...*exprpb.Expr) *exprpb.Expr { - return e.parserHelper.newGlobalCall(e.nextMacroID(), function, args...) +// NewGlobalCall implements the ExprHelper interface method. +func (e *exprHelper) NewCall(function string, args ...ast.Expr) ast.Expr { + return e.exprFactory.NewCall(e.nextMacroID(), function, args...) } -// ReceiverCall implements the ExprHelper interface method. -func (e *exprHelper) ReceiverCall(function string, - target *exprpb.Expr, args ...*exprpb.Expr) *exprpb.Expr { - return e.parserHelper.newReceiverCall(e.nextMacroID(), function, target, args...) +// NewMemberCall implements the ExprHelper interface method. +func (e *exprHelper) NewMemberCall(function string, target ast.Expr, args ...ast.Expr) ast.Expr { + return e.exprFactory.NewMemberCall(e.nextMacroID(), function, target, args...) } -// PresenceTest implements the ExprHelper interface method. -func (e *exprHelper) PresenceTest(operand *exprpb.Expr, field string) *exprpb.Expr { - return e.parserHelper.newPresenceTest(e.nextMacroID(), operand, field) +// NewPresenceTest implements the ExprHelper interface method. +func (e *exprHelper) NewPresenceTest(operand ast.Expr, field string) ast.Expr { + return e.exprFactory.NewPresenceTest(e.nextMacroID(), operand, field) } -// Select implements the ExprHelper interface method. -func (e *exprHelper) Select(operand *exprpb.Expr, field string) *exprpb.Expr { - return e.parserHelper.newSelect(e.nextMacroID(), operand, field) +// NewSelect implements the ExprHelper interface method. +func (e *exprHelper) NewSelect(operand ast.Expr, field string) ast.Expr { + return e.exprFactory.NewSelect(e.nextMacroID(), operand, field) } // OffsetLocation implements the ExprHelper interface method. func (e *exprHelper) OffsetLocation(exprID int64) common.Location { - offset, found := e.parserHelper.positions[exprID] - if !found { - return common.NoLocation - } - location, found := e.parserHelper.source.OffsetLocation(offset) - if !found { - return common.NoLocation - } - return location + return e.parserHelper.sourceInfo.GetStartLocation(exprID) } // NewError associates an error message with a given expression id, populating the source offset location of the error if possible. diff --git a/vendor/github.com/google/cel-go/parser/input.go b/vendor/github.com/google/cel-go/parser/input.go index 810eaff218d..44792455d8b 100644 --- a/vendor/github.com/google/cel-go/parser/input.go +++ b/vendor/github.com/google/cel-go/parser/input.go @@ -15,7 +15,7 @@ package parser import ( - antlr "github.com/antlr/antlr4/runtime/Go/antlr/v4" + antlr "github.com/antlr4-go/antlr/v4" "github.com/google/cel-go/common/runes" ) @@ -110,7 +110,7 @@ func (c *charStream) GetTextFromTokens(start, stop antlr.Token) string { } // GetTextFromInterval implements (antlr.CharStream).GetTextFromInterval. -func (c *charStream) GetTextFromInterval(i *antlr.Interval) string { +func (c *charStream) GetTextFromInterval(i antlr.Interval) string { return c.GetText(i.Start, i.Stop) } diff --git a/vendor/github.com/google/cel-go/parser/macro.go b/vendor/github.com/google/cel-go/parser/macro.go index 6066e8ef4f8..1f4c847e0d4 100644 --- a/vendor/github.com/google/cel-go/parser/macro.go +++ b/vendor/github.com/google/cel-go/parser/macro.go @@ -18,9 +18,10 @@ import ( "fmt" "github.com/google/cel-go/common" + "github.com/google/cel-go/common/ast" "github.com/google/cel-go/common/operators" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" ) // NewGlobalMacro creates a Macro for a global function with the specified arg count. @@ -142,58 +143,38 @@ func makeVarArgMacroKey(name string, receiverStyle bool) string { // and produces as output an Expr ast node. // // Note: when the Macro.IsReceiverStyle() method returns true, the target argument will be nil. -type MacroExpander func(eh ExprHelper, - target *exprpb.Expr, - args []*exprpb.Expr) (*exprpb.Expr, *common.Error) +type MacroExpander func(eh ExprHelper, target ast.Expr, args []ast.Expr) (ast.Expr, *common.Error) -// ExprHelper assists with the manipulation of proto-based Expr values in a manner which is -// consistent with the source position and expression id generation code leveraged by both -// the parser and type-checker. +// ExprHelper assists with the creation of Expr values in a manner which is consistent +// the internal semantics and id generation behaviors of the parser and checker libraries. type ExprHelper interface { // Copy the input expression with a brand new set of identifiers. - Copy(*exprpb.Expr) *exprpb.Expr - - // LiteralBool creates an Expr value for a bool literal. - LiteralBool(value bool) *exprpb.Expr - - // LiteralBytes creates an Expr value for a byte literal. - LiteralBytes(value []byte) *exprpb.Expr - - // LiteralDouble creates an Expr value for double literal. - LiteralDouble(value float64) *exprpb.Expr + Copy(ast.Expr) ast.Expr - // LiteralInt creates an Expr value for an int literal. - LiteralInt(value int64) *exprpb.Expr + // Literal creates an Expr value for a scalar literal value. + NewLiteral(value ref.Val) ast.Expr - // LiteralString creates am Expr value for a string literal. - LiteralString(value string) *exprpb.Expr - - // LiteralUint creates an Expr value for a uint literal. - LiteralUint(value uint64) *exprpb.Expr - - // NewList creates a CreateList instruction where the list is comprised of the optional set - // of elements provided as arguments. - NewList(elems ...*exprpb.Expr) *exprpb.Expr + // NewList creates a list literal instruction with an optional set of elements. + NewList(elems ...ast.Expr) ast.Expr // NewMap creates a CreateStruct instruction for a map where the map is comprised of the // optional set of key, value entries. - NewMap(entries ...*exprpb.Expr_CreateStruct_Entry) *exprpb.Expr + NewMap(entries ...ast.EntryExpr) ast.Expr // NewMapEntry creates a Map Entry for the key, value pair. - NewMapEntry(key *exprpb.Expr, val *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry + NewMapEntry(key ast.Expr, val ast.Expr, optional bool) ast.EntryExpr - // NewObject creates a CreateStruct instruction for an object with a given type name and - // optional set of field initializers. - NewObject(typeName string, fieldInits ...*exprpb.Expr_CreateStruct_Entry) *exprpb.Expr + // NewStruct creates a struct literal expression with an optional set of field initializers. + NewStruct(typeName string, fieldInits ...ast.EntryExpr) ast.Expr - // NewObjectFieldInit creates a new Object field initializer from the field name and value. - NewObjectFieldInit(field string, init *exprpb.Expr, optional bool) *exprpb.Expr_CreateStruct_Entry + // NewStructField creates a new struct field initializer from the field name and value. + NewStructField(field string, init ast.Expr, optional bool) ast.EntryExpr - // Fold creates a fold comprehension instruction. + // NewComprehension creates a new comprehension instruction. // - // - iterVar is the iteration variable name. // - iterRange represents the expression that resolves to a list or map where the elements or // keys (respectively) will be iterated over. + // - iterVar is the iteration variable name. // - accuVar is the accumulation variable name, typically parser.AccumulatorName. // - accuInit is the initial expression whose value will be set for the accuVar prior to // folding. @@ -204,31 +185,31 @@ type ExprHelper interface { // The accuVar should not shadow variable names that you would like to reference within the // environment in the step and condition expressions. Presently, the name __result__ is commonly // used by built-in macros but this may change in the future. - Fold(iterVar string, - iterRange *exprpb.Expr, + NewComprehension(iterRange ast.Expr, + iterVar string, accuVar string, - accuInit *exprpb.Expr, - condition *exprpb.Expr, - step *exprpb.Expr, - result *exprpb.Expr) *exprpb.Expr + accuInit ast.Expr, + condition ast.Expr, + step ast.Expr, + result ast.Expr) ast.Expr - // Ident creates an identifier Expr value. - Ident(name string) *exprpb.Expr + // NewIdent creates an identifier Expr value. + NewIdent(name string) ast.Expr - // AccuIdent returns an accumulator identifier for use with comprehension results. - AccuIdent() *exprpb.Expr + // NewAccuIdent returns an accumulator identifier for use with comprehension results. + NewAccuIdent() ast.Expr - // GlobalCall creates a function call Expr value for a global (free) function. - GlobalCall(function string, args ...*exprpb.Expr) *exprpb.Expr + // NewCall creates a function call Expr value for a global (free) function. + NewCall(function string, args ...ast.Expr) ast.Expr - // ReceiverCall creates a function call Expr value for a receiver-style function. - ReceiverCall(function string, target *exprpb.Expr, args ...*exprpb.Expr) *exprpb.Expr + // NewMemberCall creates a function call Expr value for a receiver-style function. + NewMemberCall(function string, target ast.Expr, args ...ast.Expr) ast.Expr - // PresenceTest creates a Select TestOnly Expr value for modelling has() semantics. - PresenceTest(operand *exprpb.Expr, field string) *exprpb.Expr + // NewPresenceTest creates a Select TestOnly Expr value for modelling has() semantics. + NewPresenceTest(operand ast.Expr, field string) ast.Expr - // Select create a field traversal Expr value. - Select(operand *exprpb.Expr, field string) *exprpb.Expr + // NewSelect create a field traversal Expr value. + NewSelect(operand ast.Expr, field string) ast.Expr // OffsetLocation returns the Location of the expression identifier. OffsetLocation(exprID int64) common.Location @@ -296,21 +277,21 @@ const ( // MakeAll expands the input call arguments into a comprehension that returns true if all of the // elements in the range match the predicate expressions: // .all(, ) -func MakeAll(eh ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) { +func MakeAll(eh ExprHelper, target ast.Expr, args []ast.Expr) (ast.Expr, *common.Error) { return makeQuantifier(quantifierAll, eh, target, args) } // MakeExists expands the input call arguments into a comprehension that returns true if any of the // elements in the range match the predicate expressions: // .exists(, ) -func MakeExists(eh ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) { +func MakeExists(eh ExprHelper, target ast.Expr, args []ast.Expr) (ast.Expr, *common.Error) { return makeQuantifier(quantifierExists, eh, target, args) } // MakeExistsOne expands the input call arguments into a comprehension that returns true if exactly // one of the elements in the range match the predicate expressions: // .exists_one(, ) -func MakeExistsOne(eh ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) { +func MakeExistsOne(eh ExprHelper, target ast.Expr, args []ast.Expr) (ast.Expr, *common.Error) { return makeQuantifier(quantifierExistsOne, eh, target, args) } @@ -324,14 +305,14 @@ func MakeExistsOne(eh ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*ex // // In the second form only iterVar values which return true when provided to the predicate expression // are transformed. -func MakeMap(eh ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) { +func MakeMap(eh ExprHelper, target ast.Expr, args []ast.Expr) (ast.Expr, *common.Error) { v, found := extractIdent(args[0]) if !found { - return nil, eh.NewError(args[0].GetId(), "argument is not an identifier") + return nil, eh.NewError(args[0].ID(), "argument is not an identifier") } - var fn *exprpb.Expr - var filter *exprpb.Expr + var fn ast.Expr + var filter ast.Expr if len(args) == 3 { filter = args[1] @@ -341,84 +322,83 @@ func MakeMap(eh ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.E fn = args[1] } - accuExpr := eh.Ident(AccumulatorName) init := eh.NewList() - condition := eh.LiteralBool(true) - step := eh.GlobalCall(operators.Add, accuExpr, eh.NewList(fn)) + condition := eh.NewLiteral(types.True) + step := eh.NewCall(operators.Add, eh.NewAccuIdent(), eh.NewList(fn)) if filter != nil { - step = eh.GlobalCall(operators.Conditional, filter, step, accuExpr) + step = eh.NewCall(operators.Conditional, filter, step, eh.NewAccuIdent()) } - return eh.Fold(v, target, AccumulatorName, init, condition, step, accuExpr), nil + return eh.NewComprehension(target, v, AccumulatorName, init, condition, step, eh.NewAccuIdent()), nil } // MakeFilter expands the input call arguments into a comprehension which produces a list which contains // only elements which match the provided predicate expression: // .filter(, ) -func MakeFilter(eh ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) { +func MakeFilter(eh ExprHelper, target ast.Expr, args []ast.Expr) (ast.Expr, *common.Error) { v, found := extractIdent(args[0]) if !found { - return nil, eh.NewError(args[0].GetId(), "argument is not an identifier") + return nil, eh.NewError(args[0].ID(), "argument is not an identifier") } filter := args[1] - accuExpr := eh.Ident(AccumulatorName) init := eh.NewList() - condition := eh.LiteralBool(true) - step := eh.GlobalCall(operators.Add, accuExpr, eh.NewList(args[0])) - step = eh.GlobalCall(operators.Conditional, filter, step, accuExpr) - return eh.Fold(v, target, AccumulatorName, init, condition, step, accuExpr), nil + condition := eh.NewLiteral(types.True) + step := eh.NewCall(operators.Add, eh.NewAccuIdent(), eh.NewList(args[0])) + step = eh.NewCall(operators.Conditional, filter, step, eh.NewAccuIdent()) + return eh.NewComprehension(target, v, AccumulatorName, init, condition, step, eh.NewAccuIdent()), nil } // MakeHas expands the input call arguments into a presence test, e.g. has(.field) -func MakeHas(eh ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) { - if s, ok := args[0].ExprKind.(*exprpb.Expr_SelectExpr); ok { - return eh.PresenceTest(s.SelectExpr.GetOperand(), s.SelectExpr.GetField()), nil +func MakeHas(eh ExprHelper, target ast.Expr, args []ast.Expr) (ast.Expr, *common.Error) { + if args[0].Kind() == ast.SelectKind { + s := args[0].AsSelect() + return eh.NewPresenceTest(s.Operand(), s.FieldName()), nil } - return nil, eh.NewError(args[0].GetId(), "invalid argument to has() macro") + return nil, eh.NewError(args[0].ID(), "invalid argument to has() macro") } -func makeQuantifier(kind quantifierKind, eh ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) { +func makeQuantifier(kind quantifierKind, eh ExprHelper, target ast.Expr, args []ast.Expr) (ast.Expr, *common.Error) { v, found := extractIdent(args[0]) if !found { - return nil, eh.NewError(args[0].GetId(), "argument must be a simple name") + return nil, eh.NewError(args[0].ID(), "argument must be a simple name") } - var init *exprpb.Expr - var condition *exprpb.Expr - var step *exprpb.Expr - var result *exprpb.Expr + var init ast.Expr + var condition ast.Expr + var step ast.Expr + var result ast.Expr switch kind { case quantifierAll: - init = eh.LiteralBool(true) - condition = eh.GlobalCall(operators.NotStrictlyFalse, eh.AccuIdent()) - step = eh.GlobalCall(operators.LogicalAnd, eh.AccuIdent(), args[1]) - result = eh.AccuIdent() + init = eh.NewLiteral(types.True) + condition = eh.NewCall(operators.NotStrictlyFalse, eh.NewAccuIdent()) + step = eh.NewCall(operators.LogicalAnd, eh.NewAccuIdent(), args[1]) + result = eh.NewAccuIdent() case quantifierExists: - init = eh.LiteralBool(false) - condition = eh.GlobalCall( + init = eh.NewLiteral(types.False) + condition = eh.NewCall( operators.NotStrictlyFalse, - eh.GlobalCall(operators.LogicalNot, eh.AccuIdent())) - step = eh.GlobalCall(operators.LogicalOr, eh.AccuIdent(), args[1]) - result = eh.AccuIdent() + eh.NewCall(operators.LogicalNot, eh.NewAccuIdent())) + step = eh.NewCall(operators.LogicalOr, eh.NewAccuIdent(), args[1]) + result = eh.NewAccuIdent() case quantifierExistsOne: - zeroExpr := eh.LiteralInt(0) - oneExpr := eh.LiteralInt(1) + zeroExpr := eh.NewLiteral(types.Int(0)) + oneExpr := eh.NewLiteral(types.Int(1)) init = zeroExpr - condition = eh.LiteralBool(true) - step = eh.GlobalCall(operators.Conditional, args[1], - eh.GlobalCall(operators.Add, eh.AccuIdent(), oneExpr), eh.AccuIdent()) - result = eh.GlobalCall(operators.Equals, eh.AccuIdent(), oneExpr) + condition = eh.NewLiteral(types.True) + step = eh.NewCall(operators.Conditional, args[1], + eh.NewCall(operators.Add, eh.NewAccuIdent(), oneExpr), eh.NewAccuIdent()) + result = eh.NewCall(operators.Equals, eh.NewAccuIdent(), oneExpr) default: - return nil, eh.NewError(args[0].GetId(), fmt.Sprintf("unrecognized quantifier '%v'", kind)) + return nil, eh.NewError(args[0].ID(), fmt.Sprintf("unrecognized quantifier '%v'", kind)) } - return eh.Fold(v, target, AccumulatorName, init, condition, step, result), nil + return eh.NewComprehension(target, v, AccumulatorName, init, condition, step, result), nil } -func extractIdent(e *exprpb.Expr) (string, bool) { - switch e.ExprKind.(type) { - case *exprpb.Expr_IdentExpr: - return e.GetIdentExpr().GetName(), true +func extractIdent(e ast.Expr) (string, bool) { + switch e.Kind() { + case ast.IdentKind: + return e.AsIdent(), true } return "", false } diff --git a/vendor/github.com/google/cel-go/parser/parser.go b/vendor/github.com/google/cel-go/parser/parser.go index 109326a9399..cb753df73d2 100644 --- a/vendor/github.com/google/cel-go/parser/parser.go +++ b/vendor/github.com/google/cel-go/parser/parser.go @@ -21,17 +21,15 @@ import ( "regexp" "strconv" "strings" - "sync" - antlr "github.com/antlr/antlr4/runtime/Go/antlr/v4" + antlr "github.com/antlr4-go/antlr/v4" "github.com/google/cel-go/common" + "github.com/google/cel-go/common/ast" "github.com/google/cel-go/common/operators" "github.com/google/cel-go/common/runes" + "github.com/google/cel-go/common/types" "github.com/google/cel-go/parser/gen" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" - structpb "google.golang.org/protobuf/types/known/structpb" ) // Parser encapsulates the context necessary to perform parsing for different expressions. @@ -88,11 +86,13 @@ func mustNewParser(opts ...Option) *Parser { } // Parse parses the expression represented by source and returns the result. -func (p *Parser) Parse(source common.Source) (*exprpb.ParsedExpr, *common.Errors) { +func (p *Parser) Parse(source common.Source) (*ast.AST, *common.Errors) { errs := common.NewErrors(source) + fac := ast.NewExprFactory() impl := parser{ errors: &parseErrors{errs}, - helper: newParserHelper(source), + exprFactory: fac, + helper: newParserHelper(source, fac), macros: p.macros, maxRecursionDepth: p.maxRecursionDepth, errorReportingLimit: p.errorReportingLimit, @@ -106,18 +106,15 @@ func (p *Parser) Parse(source common.Source) (*exprpb.ParsedExpr, *common.Errors if !ok { buf = runes.NewBuffer(source.Content()) } - var e *exprpb.Expr + var out ast.Expr if buf.Len() > p.expressionSizeCodePointLimit { - e = impl.reportError(common.NoLocation, + out = impl.reportError(common.NoLocation, "expression code point size exceeds limit: size: %d, limit %d", buf.Len(), p.expressionSizeCodePointLimit) } else { - e = impl.parse(buf, source.Description()) + out = impl.parse(buf, source.Description()) } - return &exprpb.ParsedExpr{ - Expr: e, - SourceInfo: impl.helper.getSourceInfo(), - }, errs + return ast.NewAST(out, impl.helper.getSourceInfo()), errs } // reservedIds are not legal to use as variables. We exclude them post-parse, as they *are* valid @@ -150,7 +147,7 @@ var reservedIds = map[string]struct{}{ // This function calls ParseWithMacros with AllMacros. // // Deprecated: Use NewParser().Parse() instead. -func Parse(source common.Source) (*exprpb.ParsedExpr, *common.Errors) { +func Parse(source common.Source) (*ast.AST, *common.Errors) { return mustNewParser(Macros(AllMacros...)).Parse(source) } @@ -287,6 +284,7 @@ var _ antlr.ErrorStrategy = &recoveryLimitErrorStrategy{} type parser struct { gen.BaseCELVisitor errors *parseErrors + exprFactory ast.ExprFactory helper *parserHelper macros map[string]Macro recursionDepth int @@ -300,53 +298,21 @@ type parser struct { enableVariadicOperatorASTs bool } -var ( - _ gen.CELVisitor = (*parser)(nil) - - lexerPool *sync.Pool = &sync.Pool{ - New: func() any { - l := gen.NewCELLexer(nil) - l.RemoveErrorListeners() - return l - }, - } +var _ gen.CELVisitor = (*parser)(nil) - parserPool *sync.Pool = &sync.Pool{ - New: func() any { - p := gen.NewCELParser(nil) - p.RemoveErrorListeners() - return p - }, - } -) +func (p *parser) parse(expr runes.Buffer, desc string) ast.Expr { + lexer := gen.NewCELLexer(newCharStream(expr, desc)) + lexer.RemoveErrorListeners() + lexer.AddErrorListener(p) -func (p *parser) parse(expr runes.Buffer, desc string) *exprpb.Expr { - // TODO: get rid of these pools once https://github.com/antlr/antlr4/pull/3571 is in a release - lexer := lexerPool.Get().(*gen.CELLexer) - prsr := parserPool.Get().(*gen.CELParser) + prsr := gen.NewCELParser(antlr.NewCommonTokenStream(lexer, 0)) + prsr.RemoveErrorListeners() prsrListener := &recursionListener{ maxDepth: p.maxRecursionDepth, ruleTypeDepth: map[int]*int{}, } - defer func() { - // Unfortunately ANTLR Go runtime is missing (*antlr.BaseParser).RemoveParseListeners, - // so this is good enough until that is exported. - // Reset the lexer and parser before putting them back in the pool. - lexer.RemoveErrorListeners() - prsr.RemoveParseListener(prsrListener) - prsr.RemoveErrorListeners() - lexer.SetInputStream(nil) - prsr.SetInputStream(nil) - lexerPool.Put(lexer) - parserPool.Put(prsr) - }() - - lexer.SetInputStream(newCharStream(expr, desc)) - prsr.SetInputStream(antlr.NewCommonTokenStream(lexer, 0)) - - lexer.AddErrorListener(p) prsr.AddErrorListener(p) prsr.AddParseListener(prsrListener) @@ -373,7 +339,7 @@ func (p *parser) parse(expr runes.Buffer, desc string) *exprpb.Expr { } }() - return p.Visit(prsr.Start()).(*exprpb.Expr) + return p.Visit(prsr.Start_()).(ast.Expr) } // Visitor implementations. @@ -470,26 +436,26 @@ func (p *parser) VisitStart(ctx *gen.StartContext) any { // Visit a parse tree produced by CELParser#expr. func (p *parser) VisitExpr(ctx *gen.ExprContext) any { - result := p.Visit(ctx.GetE()).(*exprpb.Expr) + result := p.Visit(ctx.GetE()).(ast.Expr) if ctx.GetOp() == nil { return result } opID := p.helper.id(ctx.GetOp()) - ifTrue := p.Visit(ctx.GetE1()).(*exprpb.Expr) - ifFalse := p.Visit(ctx.GetE2()).(*exprpb.Expr) + ifTrue := p.Visit(ctx.GetE1()).(ast.Expr) + ifFalse := p.Visit(ctx.GetE2()).(ast.Expr) return p.globalCallOrMacro(opID, operators.Conditional, result, ifTrue, ifFalse) } // Visit a parse tree produced by CELParser#conditionalOr. func (p *parser) VisitConditionalOr(ctx *gen.ConditionalOrContext) any { - result := p.Visit(ctx.GetE()).(*exprpb.Expr) + result := p.Visit(ctx.GetE()).(ast.Expr) l := p.newLogicManager(operators.LogicalOr, result) rest := ctx.GetE1() for i, op := range ctx.GetOps() { if i >= len(rest) { return p.reportError(ctx, "unexpected character, wanted '||'") } - next := p.Visit(rest[i]).(*exprpb.Expr) + next := p.Visit(rest[i]).(ast.Expr) opID := p.helper.id(op) l.addTerm(opID, next) } @@ -498,14 +464,14 @@ func (p *parser) VisitConditionalOr(ctx *gen.ConditionalOrContext) any { // Visit a parse tree produced by CELParser#conditionalAnd. func (p *parser) VisitConditionalAnd(ctx *gen.ConditionalAndContext) any { - result := p.Visit(ctx.GetE()).(*exprpb.Expr) + result := p.Visit(ctx.GetE()).(ast.Expr) l := p.newLogicManager(operators.LogicalAnd, result) rest := ctx.GetE1() for i, op := range ctx.GetOps() { if i >= len(rest) { return p.reportError(ctx, "unexpected character, wanted '&&'") } - next := p.Visit(rest[i]).(*exprpb.Expr) + next := p.Visit(rest[i]).(ast.Expr) opID := p.helper.id(op) l.addTerm(opID, next) } @@ -519,9 +485,9 @@ func (p *parser) VisitRelation(ctx *gen.RelationContext) any { opText = ctx.GetOp().GetText() } if op, found := operators.Find(opText); found { - lhs := p.Visit(ctx.Relation(0)).(*exprpb.Expr) + lhs := p.Visit(ctx.Relation(0)).(ast.Expr) opID := p.helper.id(ctx.GetOp()) - rhs := p.Visit(ctx.Relation(1)).(*exprpb.Expr) + rhs := p.Visit(ctx.Relation(1)).(ast.Expr) return p.globalCallOrMacro(opID, op, lhs, rhs) } return p.reportError(ctx, "operator not found") @@ -534,9 +500,9 @@ func (p *parser) VisitCalc(ctx *gen.CalcContext) any { opText = ctx.GetOp().GetText() } if op, found := operators.Find(opText); found { - lhs := p.Visit(ctx.Calc(0)).(*exprpb.Expr) + lhs := p.Visit(ctx.Calc(0)).(ast.Expr) opID := p.helper.id(ctx.GetOp()) - rhs := p.Visit(ctx.Calc(1)).(*exprpb.Expr) + rhs := p.Visit(ctx.Calc(1)).(ast.Expr) return p.globalCallOrMacro(opID, op, lhs, rhs) } return p.reportError(ctx, "operator not found") @@ -552,7 +518,7 @@ func (p *parser) VisitLogicalNot(ctx *gen.LogicalNotContext) any { return p.Visit(ctx.Member()) } opID := p.helper.id(ctx.GetOps()[0]) - target := p.Visit(ctx.Member()).(*exprpb.Expr) + target := p.Visit(ctx.Member()).(ast.Expr) return p.globalCallOrMacro(opID, operators.LogicalNot, target) } @@ -561,13 +527,13 @@ func (p *parser) VisitNegate(ctx *gen.NegateContext) any { return p.Visit(ctx.Member()) } opID := p.helper.id(ctx.GetOps()[0]) - target := p.Visit(ctx.Member()).(*exprpb.Expr) + target := p.Visit(ctx.Member()).(ast.Expr) return p.globalCallOrMacro(opID, operators.Negate, target) } // VisitSelect visits a parse tree produced by CELParser#Select. func (p *parser) VisitSelect(ctx *gen.SelectContext) any { - operand := p.Visit(ctx.Member()).(*exprpb.Expr) + operand := p.Visit(ctx.Member()).(ast.Expr) // Handle the error case where no valid identifier is specified. if ctx.GetId() == nil || ctx.GetOp() == nil { return p.helper.newExpr(ctx) @@ -588,7 +554,7 @@ func (p *parser) VisitSelect(ctx *gen.SelectContext) any { // VisitMemberCall visits a parse tree produced by CELParser#MemberCall. func (p *parser) VisitMemberCall(ctx *gen.MemberCallContext) any { - operand := p.Visit(ctx.Member()).(*exprpb.Expr) + operand := p.Visit(ctx.Member()).(ast.Expr) // Handle the error case where no valid identifier is specified. if ctx.GetId() == nil { return p.helper.newExpr(ctx) @@ -600,13 +566,13 @@ func (p *parser) VisitMemberCall(ctx *gen.MemberCallContext) any { // Visit a parse tree produced by CELParser#Index. func (p *parser) VisitIndex(ctx *gen.IndexContext) any { - target := p.Visit(ctx.Member()).(*exprpb.Expr) + target := p.Visit(ctx.Member()).(ast.Expr) // Handle the error case where no valid identifier is specified. if ctx.GetOp() == nil { return p.helper.newExpr(ctx) } opID := p.helper.id(ctx.GetOp()) - index := p.Visit(ctx.GetIndex()).(*exprpb.Expr) + index := p.Visit(ctx.GetIndex()).(ast.Expr) operator := operators.Index if ctx.GetOpt() != nil { if !p.enableOptionalSyntax { @@ -630,7 +596,7 @@ func (p *parser) VisitCreateMessage(ctx *gen.CreateMessageContext) any { messageName = "." + messageName } objID := p.helper.id(ctx.GetOp()) - entries := p.VisitIFieldInitializerList(ctx.GetEntries()).([]*exprpb.Expr_CreateStruct_Entry) + entries := p.VisitIFieldInitializerList(ctx.GetEntries()).([]ast.EntryExpr) return p.helper.newObject(objID, messageName, entries...) } @@ -638,16 +604,16 @@ func (p *parser) VisitCreateMessage(ctx *gen.CreateMessageContext) any { func (p *parser) VisitIFieldInitializerList(ctx gen.IFieldInitializerListContext) any { if ctx == nil || ctx.GetFields() == nil { // This is the result of a syntax error handled elswhere, return empty. - return []*exprpb.Expr_CreateStruct_Entry{} + return []ast.EntryExpr{} } - result := make([]*exprpb.Expr_CreateStruct_Entry, len(ctx.GetFields())) + result := make([]ast.EntryExpr, len(ctx.GetFields())) cols := ctx.GetCols() vals := ctx.GetValues() for i, f := range ctx.GetFields() { if i >= len(cols) || i >= len(vals) { // This is the result of a syntax error detected elsewhere. - return []*exprpb.Expr_CreateStruct_Entry{} + return []ast.EntryExpr{} } initID := p.helper.id(cols[i]) optField := f.(*gen.OptFieldContext) @@ -659,10 +625,10 @@ func (p *parser) VisitIFieldInitializerList(ctx gen.IFieldInitializerListContext // The field may be empty due to a prior error. id := optField.IDENTIFIER() if id == nil { - return []*exprpb.Expr_CreateStruct_Entry{} + return []ast.EntryExpr{} } fieldName := id.GetText() - value := p.Visit(vals[i]).(*exprpb.Expr) + value := p.Visit(vals[i]).(ast.Expr) field := p.helper.newObjectField(initID, fieldName, value, optional) result[i] = field } @@ -702,9 +668,9 @@ func (p *parser) VisitCreateList(ctx *gen.CreateListContext) any { // Visit a parse tree produced by CELParser#CreateStruct. func (p *parser) VisitCreateStruct(ctx *gen.CreateStructContext) any { structID := p.helper.id(ctx.GetOp()) - entries := []*exprpb.Expr_CreateStruct_Entry{} + entries := []ast.EntryExpr{} if ctx.GetEntries() != nil { - entries = p.Visit(ctx.GetEntries()).([]*exprpb.Expr_CreateStruct_Entry) + entries = p.Visit(ctx.GetEntries()).([]ast.EntryExpr) } return p.helper.newMap(structID, entries...) } @@ -713,17 +679,17 @@ func (p *parser) VisitCreateStruct(ctx *gen.CreateStructContext) any { func (p *parser) VisitMapInitializerList(ctx *gen.MapInitializerListContext) any { if ctx == nil || ctx.GetKeys() == nil { // This is the result of a syntax error handled elswhere, return empty. - return []*exprpb.Expr_CreateStruct_Entry{} + return []ast.EntryExpr{} } - result := make([]*exprpb.Expr_CreateStruct_Entry, len(ctx.GetCols())) + result := make([]ast.EntryExpr, len(ctx.GetCols())) keys := ctx.GetKeys() vals := ctx.GetValues() for i, col := range ctx.GetCols() { colID := p.helper.id(col) if i >= len(keys) || i >= len(vals) { // This is the result of a syntax error detected elsewhere. - return []*exprpb.Expr_CreateStruct_Entry{} + return []ast.EntryExpr{} } optKey := keys[i] optional := optKey.GetOpt() != nil @@ -731,8 +697,8 @@ func (p *parser) VisitMapInitializerList(ctx *gen.MapInitializerListContext) any p.reportError(optKey, "unsupported syntax '?'") continue } - key := p.Visit(optKey.GetE()).(*exprpb.Expr) - value := p.Visit(vals[i]).(*exprpb.Expr) + key := p.Visit(optKey.GetE()).(ast.Expr) + value := p.Visit(vals[i]).(ast.Expr) entry := p.helper.newMapEntry(colID, key, value, optional) result[i] = entry } @@ -812,30 +778,27 @@ func (p *parser) VisitBoolFalse(ctx *gen.BoolFalseContext) any { // Visit a parse tree produced by CELParser#Null. func (p *parser) VisitNull(ctx *gen.NullContext) any { - return p.helper.newLiteral(ctx, - &exprpb.Constant{ - ConstantKind: &exprpb.Constant_NullValue{ - NullValue: structpb.NullValue_NULL_VALUE}}) + return p.helper.exprFactory.NewLiteral(p.helper.newID(ctx), types.NullValue) } -func (p *parser) visitExprList(ctx gen.IExprListContext) []*exprpb.Expr { +func (p *parser) visitExprList(ctx gen.IExprListContext) []ast.Expr { if ctx == nil { - return []*exprpb.Expr{} + return []ast.Expr{} } return p.visitSlice(ctx.GetE()) } -func (p *parser) visitListInit(ctx gen.IListInitContext) ([]*exprpb.Expr, []int32) { +func (p *parser) visitListInit(ctx gen.IListInitContext) ([]ast.Expr, []int32) { if ctx == nil { - return []*exprpb.Expr{}, []int32{} + return []ast.Expr{}, []int32{} } elements := ctx.GetElems() - result := make([]*exprpb.Expr, len(elements)) + result := make([]ast.Expr, len(elements)) optionals := []int32{} for i, e := range elements { - ex := p.Visit(e.GetE()).(*exprpb.Expr) + ex := p.Visit(e.GetE()).(ast.Expr) if ex == nil { - return []*exprpb.Expr{}, []int32{} + return []ast.Expr{}, []int32{} } result[i] = ex if e.GetOpt() != nil { @@ -849,13 +812,13 @@ func (p *parser) visitListInit(ctx gen.IListInitContext) ([]*exprpb.Expr, []int3 return result, optionals } -func (p *parser) visitSlice(expressions []gen.IExprContext) []*exprpb.Expr { +func (p *parser) visitSlice(expressions []gen.IExprContext) []ast.Expr { if expressions == nil { - return []*exprpb.Expr{} + return []ast.Expr{} } - result := make([]*exprpb.Expr, len(expressions)) + result := make([]ast.Expr, len(expressions)) for i, e := range expressions { - ex := p.Visit(e).(*exprpb.Expr) + ex := p.Visit(e).(ast.Expr) result[i] = ex } return result @@ -870,24 +833,24 @@ func (p *parser) unquote(ctx any, value string, isBytes bool) string { return text } -func (p *parser) newLogicManager(function string, term *exprpb.Expr) *logicManager { +func (p *parser) newLogicManager(function string, term ast.Expr) *logicManager { if p.enableVariadicOperatorASTs { - return newVariadicLogicManager(p.helper, function, term) + return newVariadicLogicManager(p.exprFactory, function, term) } - return newBalancingLogicManager(p.helper, function, term) + return newBalancingLogicManager(p.exprFactory, function, term) } -func (p *parser) reportError(ctx any, format string, args ...any) *exprpb.Expr { +func (p *parser) reportError(ctx any, format string, args ...any) ast.Expr { var location common.Location err := p.helper.newExpr(ctx) switch c := ctx.(type) { case common.Location: location = c case antlr.Token, antlr.ParserRuleContext: - location = p.helper.getLocation(err.GetId()) + location = p.helper.getLocation(err.ID()) } // Provide arguments to the report error. - p.errors.reportErrorAtID(err.GetId(), location, format, args...) + p.errors.reportErrorAtID(err.ID(), location, format, args...) return err } @@ -912,33 +875,33 @@ func (p *parser) SyntaxError(recognizer antlr.Recognizer, offendingSymbol any, l } } -func (p *parser) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs antlr.ATNConfigSet) { +func (p *parser) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs *antlr.ATNConfigSet) { // Intentional } -func (p *parser) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs antlr.ATNConfigSet) { +func (p *parser) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs *antlr.ATNConfigSet) { // Intentional } -func (p *parser) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs antlr.ATNConfigSet) { +func (p *parser) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs *antlr.ATNConfigSet) { // Intentional } -func (p *parser) globalCallOrMacro(exprID int64, function string, args ...*exprpb.Expr) *exprpb.Expr { +func (p *parser) globalCallOrMacro(exprID int64, function string, args ...ast.Expr) ast.Expr { if expr, found := p.expandMacro(exprID, function, nil, args...); found { return expr } return p.helper.newGlobalCall(exprID, function, args...) } -func (p *parser) receiverCallOrMacro(exprID int64, function string, target *exprpb.Expr, args ...*exprpb.Expr) *exprpb.Expr { +func (p *parser) receiverCallOrMacro(exprID int64, function string, target ast.Expr, args ...ast.Expr) ast.Expr { if expr, found := p.expandMacro(exprID, function, target, args...); found { return expr } return p.helper.newReceiverCall(exprID, function, target, args...) } -func (p *parser) expandMacro(exprID int64, function string, target *exprpb.Expr, args ...*exprpb.Expr) (*exprpb.Expr, bool) { +func (p *parser) expandMacro(exprID int64, function string, target ast.Expr, args ...ast.Expr) (ast.Expr, bool) { macro, found := p.macros[makeMacroKey(function, len(args), target != nil)] if !found { macro, found = p.macros[makeVarArgMacroKey(function, target != nil)] @@ -964,7 +927,7 @@ func (p *parser) expandMacro(exprID int64, function string, target *exprpb.Expr, return nil, false } if p.populateMacroCalls { - p.helper.addMacroCall(expr.GetId(), function, target, args...) + p.helper.addMacroCall(expr.ID(), function, target, args...) } return expr, true } diff --git a/vendor/github.com/google/cel-go/parser/unparser.go b/vendor/github.com/google/cel-go/parser/unparser.go index c3c40a0dd36..91cf7294475 100644 --- a/vendor/github.com/google/cel-go/parser/unparser.go +++ b/vendor/github.com/google/cel-go/parser/unparser.go @@ -20,9 +20,9 @@ import ( "strconv" "strings" + "github.com/google/cel-go/common/ast" "github.com/google/cel-go/common/operators" - - exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + "github.com/google/cel-go/common/types" ) // Unparse takes an input expression and source position information and generates a human-readable @@ -39,7 +39,7 @@ import ( // // This function optionally takes in one or more UnparserOption to alter the unparsing behavior, such as // performing word wrapping on expressions. -func Unparse(expr *exprpb.Expr, info *exprpb.SourceInfo, opts ...UnparserOption) (string, error) { +func Unparse(expr ast.Expr, info *ast.SourceInfo, opts ...UnparserOption) (string, error) { unparserOpts := &unparserOption{ wrapOnColumn: defaultWrapOnColumn, wrapAfterColumnLimit: defaultWrapAfterColumnLimit, @@ -68,12 +68,12 @@ func Unparse(expr *exprpb.Expr, info *exprpb.SourceInfo, opts ...UnparserOption) // unparser visits an expression to reconstruct a human-readable string from an AST. type unparser struct { str strings.Builder - info *exprpb.SourceInfo + info *ast.SourceInfo options *unparserOption lastWrappedIndex int } -func (un *unparser) visit(expr *exprpb.Expr) error { +func (un *unparser) visit(expr ast.Expr) error { if expr == nil { return errors.New("unsupported expression") } @@ -81,27 +81,29 @@ func (un *unparser) visit(expr *exprpb.Expr) error { if visited || err != nil { return err } - switch expr.GetExprKind().(type) { - case *exprpb.Expr_CallExpr: + switch expr.Kind() { + case ast.CallKind: return un.visitCall(expr) - case *exprpb.Expr_ConstExpr: + case ast.LiteralKind: return un.visitConst(expr) - case *exprpb.Expr_IdentExpr: + case ast.IdentKind: return un.visitIdent(expr) - case *exprpb.Expr_ListExpr: + case ast.ListKind: return un.visitList(expr) - case *exprpb.Expr_SelectExpr: + case ast.MapKind: + return un.visitStructMap(expr) + case ast.SelectKind: return un.visitSelect(expr) - case *exprpb.Expr_StructExpr: - return un.visitStruct(expr) + case ast.StructKind: + return un.visitStructMsg(expr) default: return fmt.Errorf("unsupported expression: %v", expr) } } -func (un *unparser) visitCall(expr *exprpb.Expr) error { - c := expr.GetCallExpr() - fun := c.GetFunction() +func (un *unparser) visitCall(expr ast.Expr) error { + c := expr.AsCall() + fun := c.FunctionName() switch fun { // ternary operator case operators.Conditional: @@ -141,10 +143,10 @@ func (un *unparser) visitCall(expr *exprpb.Expr) error { } } -func (un *unparser) visitCallBinary(expr *exprpb.Expr) error { - c := expr.GetCallExpr() - fun := c.GetFunction() - args := c.GetArgs() +func (un *unparser) visitCallBinary(expr ast.Expr) error { + c := expr.AsCall() + fun := c.FunctionName() + args := c.Args() lhs := args[0] // add parens if the current operator is lower precedence than the lhs expr operator. lhsParen := isComplexOperatorWithRespectTo(fun, lhs) @@ -168,9 +170,9 @@ func (un *unparser) visitCallBinary(expr *exprpb.Expr) error { return un.visitMaybeNested(rhs, rhsParen) } -func (un *unparser) visitCallConditional(expr *exprpb.Expr) error { - c := expr.GetCallExpr() - args := c.GetArgs() +func (un *unparser) visitCallConditional(expr ast.Expr) error { + c := expr.AsCall() + args := c.Args() // add parens if operand is a conditional itself. nested := isSamePrecedence(operators.Conditional, args[0]) || isComplexOperator(args[0]) @@ -196,13 +198,13 @@ func (un *unparser) visitCallConditional(expr *exprpb.Expr) error { return un.visitMaybeNested(args[2], nested) } -func (un *unparser) visitCallFunc(expr *exprpb.Expr) error { - c := expr.GetCallExpr() - fun := c.GetFunction() - args := c.GetArgs() - if c.GetTarget() != nil { - nested := isBinaryOrTernaryOperator(c.GetTarget()) - err := un.visitMaybeNested(c.GetTarget(), nested) +func (un *unparser) visitCallFunc(expr ast.Expr) error { + c := expr.AsCall() + fun := c.FunctionName() + args := c.Args() + if c.IsMemberFunction() { + nested := isBinaryOrTernaryOperator(c.Target()) + err := un.visitMaybeNested(c.Target(), nested) if err != nil { return err } @@ -223,17 +225,17 @@ func (un *unparser) visitCallFunc(expr *exprpb.Expr) error { return nil } -func (un *unparser) visitCallIndex(expr *exprpb.Expr) error { +func (un *unparser) visitCallIndex(expr ast.Expr) error { return un.visitCallIndexInternal(expr, "[") } -func (un *unparser) visitCallOptIndex(expr *exprpb.Expr) error { +func (un *unparser) visitCallOptIndex(expr ast.Expr) error { return un.visitCallIndexInternal(expr, "[?") } -func (un *unparser) visitCallIndexInternal(expr *exprpb.Expr, op string) error { - c := expr.GetCallExpr() - args := c.GetArgs() +func (un *unparser) visitCallIndexInternal(expr ast.Expr, op string) error { + c := expr.AsCall() + args := c.Args() nested := isBinaryOrTernaryOperator(args[0]) err := un.visitMaybeNested(args[0], nested) if err != nil { @@ -248,10 +250,10 @@ func (un *unparser) visitCallIndexInternal(expr *exprpb.Expr, op string) error { return nil } -func (un *unparser) visitCallUnary(expr *exprpb.Expr) error { - c := expr.GetCallExpr() - fun := c.GetFunction() - args := c.GetArgs() +func (un *unparser) visitCallUnary(expr ast.Expr) error { + c := expr.AsCall() + fun := c.FunctionName() + args := c.Args() unmangled, found := operators.FindReverse(fun) if !found { return fmt.Errorf("cannot unmangle operator: %s", fun) @@ -261,35 +263,34 @@ func (un *unparser) visitCallUnary(expr *exprpb.Expr) error { return un.visitMaybeNested(args[0], nested) } -func (un *unparser) visitConst(expr *exprpb.Expr) error { - c := expr.GetConstExpr() - switch c.GetConstantKind().(type) { - case *exprpb.Constant_BoolValue: - un.str.WriteString(strconv.FormatBool(c.GetBoolValue())) - case *exprpb.Constant_BytesValue: +func (un *unparser) visitConst(expr ast.Expr) error { + val := expr.AsLiteral() + switch val := val.(type) { + case types.Bool: + un.str.WriteString(strconv.FormatBool(bool(val))) + case types.Bytes: // bytes constants are surrounded with b"" - b := c.GetBytesValue() un.str.WriteString(`b"`) - un.str.WriteString(bytesToOctets(b)) + un.str.WriteString(bytesToOctets([]byte(val))) un.str.WriteString(`"`) - case *exprpb.Constant_DoubleValue: + case types.Double: // represent the float using the minimum required digits - d := strconv.FormatFloat(c.GetDoubleValue(), 'g', -1, 64) + d := strconv.FormatFloat(float64(val), 'g', -1, 64) un.str.WriteString(d) if !strings.Contains(d, ".") { un.str.WriteString(".0") } - case *exprpb.Constant_Int64Value: - i := strconv.FormatInt(c.GetInt64Value(), 10) + case types.Int: + i := strconv.FormatInt(int64(val), 10) un.str.WriteString(i) - case *exprpb.Constant_NullValue: + case types.Null: un.str.WriteString("null") - case *exprpb.Constant_StringValue: + case types.String: // strings will be double quoted with quotes escaped. - un.str.WriteString(strconv.Quote(c.GetStringValue())) - case *exprpb.Constant_Uint64Value: + un.str.WriteString(strconv.Quote(string(val))) + case types.Uint: // uint literals have a 'u' suffix. - ui := strconv.FormatUint(c.GetUint64Value(), 10) + ui := strconv.FormatUint(uint64(val), 10) un.str.WriteString(ui) un.str.WriteString("u") default: @@ -298,16 +299,16 @@ func (un *unparser) visitConst(expr *exprpb.Expr) error { return nil } -func (un *unparser) visitIdent(expr *exprpb.Expr) error { - un.str.WriteString(expr.GetIdentExpr().GetName()) +func (un *unparser) visitIdent(expr ast.Expr) error { + un.str.WriteString(expr.AsIdent()) return nil } -func (un *unparser) visitList(expr *exprpb.Expr) error { - l := expr.GetListExpr() - elems := l.GetElements() +func (un *unparser) visitList(expr ast.Expr) error { + l := expr.AsList() + elems := l.Elements() optIndices := make(map[int]bool, len(elems)) - for _, idx := range l.GetOptionalIndices() { + for _, idx := range l.OptionalIndices() { optIndices[int(idx)] = true } un.str.WriteString("[") @@ -327,20 +328,20 @@ func (un *unparser) visitList(expr *exprpb.Expr) error { return nil } -func (un *unparser) visitOptSelect(expr *exprpb.Expr) error { - c := expr.GetCallExpr() - args := c.GetArgs() +func (un *unparser) visitOptSelect(expr ast.Expr) error { + c := expr.AsCall() + args := c.Args() operand := args[0] - field := args[1].GetConstExpr().GetStringValue() - return un.visitSelectInternal(operand, false, ".?", field) + field := args[1].AsLiteral().(types.String) + return un.visitSelectInternal(operand, false, ".?", string(field)) } -func (un *unparser) visitSelect(expr *exprpb.Expr) error { - sel := expr.GetSelectExpr() - return un.visitSelectInternal(sel.GetOperand(), sel.GetTestOnly(), ".", sel.GetField()) +func (un *unparser) visitSelect(expr ast.Expr) error { + sel := expr.AsSelect() + return un.visitSelectInternal(sel.Operand(), sel.IsTestOnly(), ".", sel.FieldName()) } -func (un *unparser) visitSelectInternal(operand *exprpb.Expr, testOnly bool, op string, field string) error { +func (un *unparser) visitSelectInternal(operand ast.Expr, testOnly bool, op string, field string) error { // handle the case when the select expression was generated by the has() macro. if testOnly { un.str.WriteString("has(") @@ -358,34 +359,25 @@ func (un *unparser) visitSelectInternal(operand *exprpb.Expr, testOnly bool, op return nil } -func (un *unparser) visitStruct(expr *exprpb.Expr) error { - s := expr.GetStructExpr() - // If the message name is non-empty, then this should be treated as message construction. - if s.GetMessageName() != "" { - return un.visitStructMsg(expr) - } - // Otherwise, build a map. - return un.visitStructMap(expr) -} - -func (un *unparser) visitStructMsg(expr *exprpb.Expr) error { - m := expr.GetStructExpr() - entries := m.GetEntries() - un.str.WriteString(m.GetMessageName()) +func (un *unparser) visitStructMsg(expr ast.Expr) error { + m := expr.AsStruct() + fields := m.Fields() + un.str.WriteString(m.TypeName()) un.str.WriteString("{") - for i, entry := range entries { - f := entry.GetFieldKey() - if entry.GetOptionalEntry() { + for i, f := range fields { + field := f.AsStructField() + f := field.Name() + if field.IsOptional() { un.str.WriteString("?") } un.str.WriteString(f) un.str.WriteString(": ") - v := entry.GetValue() + v := field.Value() err := un.visit(v) if err != nil { return err } - if i < len(entries)-1 { + if i < len(fields)-1 { un.str.WriteString(", ") } } @@ -393,13 +385,14 @@ func (un *unparser) visitStructMsg(expr *exprpb.Expr) error { return nil } -func (un *unparser) visitStructMap(expr *exprpb.Expr) error { - m := expr.GetStructExpr() - entries := m.GetEntries() +func (un *unparser) visitStructMap(expr ast.Expr) error { + m := expr.AsMap() + entries := m.Entries() un.str.WriteString("{") - for i, entry := range entries { - k := entry.GetMapKey() - if entry.GetOptionalEntry() { + for i, e := range entries { + entry := e.AsMapEntry() + k := entry.Key() + if entry.IsOptional() { un.str.WriteString("?") } err := un.visit(k) @@ -407,7 +400,7 @@ func (un *unparser) visitStructMap(expr *exprpb.Expr) error { return err } un.str.WriteString(": ") - v := entry.GetValue() + v := entry.Value() err = un.visit(v) if err != nil { return err @@ -420,16 +413,15 @@ func (un *unparser) visitStructMap(expr *exprpb.Expr) error { return nil } -func (un *unparser) visitMaybeMacroCall(expr *exprpb.Expr) (bool, error) { - macroCalls := un.info.GetMacroCalls() - call, found := macroCalls[expr.GetId()] +func (un *unparser) visitMaybeMacroCall(expr ast.Expr) (bool, error) { + call, found := un.info.GetMacroCall(expr.ID()) if !found { return false, nil } return true, un.visit(call) } -func (un *unparser) visitMaybeNested(expr *exprpb.Expr, nested bool) error { +func (un *unparser) visitMaybeNested(expr ast.Expr, nested bool) error { if nested { un.str.WriteString("(") } @@ -453,12 +445,12 @@ func isLeftRecursive(op string) bool { // precedence of the (possible) operation represented in the input Expr. // // If the expr is not a Call, the result is false. -func isSamePrecedence(op string, expr *exprpb.Expr) bool { - if expr.GetCallExpr() == nil { +func isSamePrecedence(op string, expr ast.Expr) bool { + if expr.Kind() != ast.CallKind { return false } - c := expr.GetCallExpr() - other := c.GetFunction() + c := expr.AsCall() + other := c.FunctionName() return operators.Precedence(op) == operators.Precedence(other) } @@ -466,16 +458,16 @@ func isSamePrecedence(op string, expr *exprpb.Expr) bool { // than the (possible) operation represented in the input Expr. // // If the expr is not a Call, the result is false. -func isLowerPrecedence(op string, expr *exprpb.Expr) bool { - c := expr.GetCallExpr() - other := c.GetFunction() +func isLowerPrecedence(op string, expr ast.Expr) bool { + c := expr.AsCall() + other := c.FunctionName() return operators.Precedence(op) < operators.Precedence(other) } // Indicates whether the expr is a complex operator, i.e., a call expression // with 2 or more arguments. -func isComplexOperator(expr *exprpb.Expr) bool { - if expr.GetCallExpr() != nil && len(expr.GetCallExpr().GetArgs()) >= 2 { +func isComplexOperator(expr ast.Expr) bool { + if expr.Kind() == ast.CallKind && len(expr.AsCall().Args()) >= 2 { return true } return false @@ -484,19 +476,19 @@ func isComplexOperator(expr *exprpb.Expr) bool { // Indicates whether it is a complex operation compared to another. // expr is *not* considered complex if it is not a call expression or has // less than two arguments, or if it has a higher precedence than op. -func isComplexOperatorWithRespectTo(op string, expr *exprpb.Expr) bool { - if expr.GetCallExpr() == nil || len(expr.GetCallExpr().GetArgs()) < 2 { +func isComplexOperatorWithRespectTo(op string, expr ast.Expr) bool { + if expr.Kind() != ast.CallKind || len(expr.AsCall().Args()) < 2 { return false } return isLowerPrecedence(op, expr) } // Indicate whether this is a binary or ternary operator. -func isBinaryOrTernaryOperator(expr *exprpb.Expr) bool { - if expr.GetCallExpr() == nil || len(expr.GetCallExpr().GetArgs()) < 2 { +func isBinaryOrTernaryOperator(expr ast.Expr) bool { + if expr.Kind() != ast.CallKind || len(expr.AsCall().Args()) < 2 { return false } - _, isBinaryOp := operators.FindReverseBinaryOperator(expr.GetCallExpr().GetFunction()) + _, isBinaryOp := operators.FindReverseBinaryOperator(expr.AsCall().FunctionName()) return isBinaryOp || isSamePrecedence(operators.Conditional, expr) } diff --git a/vendor/github.com/google/gopacket/.gitignore b/vendor/github.com/google/gopacket/.gitignore deleted file mode 100644 index 149266fdb65..00000000000 --- a/vendor/github.com/google/gopacket/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -#* -*~ - -# examples binaries -examples/synscan/synscan -examples/pfdump/pfdump -examples/pcapdump/pcapdump -examples/httpassembly/httpassembly -examples/statsassembly/statsassembly -examples/arpscan/arpscan -examples/bidirectional/bidirectional -examples/bytediff/bytediff -examples/reassemblydump/reassemblydump -layers/gen -macs/gen -pcap/pcap_tester diff --git a/vendor/github.com/google/gopacket/.travis.gofmt.sh b/vendor/github.com/google/gopacket/.travis.gofmt.sh deleted file mode 100644 index e341a1cb78f..00000000000 --- a/vendor/github.com/google/gopacket/.travis.gofmt.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -cd "$(dirname $0)" -if [ -n "$(go fmt ./...)" ]; then - echo "Go code is not formatted, run 'go fmt github.com/google/stenographer/...'" >&2 - exit 1 -fi diff --git a/vendor/github.com/google/gopacket/.travis.golint.sh b/vendor/github.com/google/gopacket/.travis.golint.sh deleted file mode 100644 index 0e267f5216a..00000000000 --- a/vendor/github.com/google/gopacket/.travis.golint.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -cd "$(dirname $0)" - -go get golang.org/x/lint/golint -DIRS=". tcpassembly tcpassembly/tcpreader ip4defrag reassembly macs pcapgo pcap afpacket pfring routing defrag/lcmdefrag" -# Add subdirectories here as we clean up golint on each. -for subdir in $DIRS; do - pushd $subdir - if golint | - grep -v CannotSetRFMon | # pcap exported error name - grep -v DataLost | # tcpassembly/tcpreader exported error name - grep .; then - exit 1 - fi - popd -done - -pushd layers -for file in *.go; do - if cat .lint_blacklist | grep -q $file; then - echo "Skipping lint of $file due to .lint_blacklist" - elif golint $file | grep .; then - echo "Lint error in file $file" - exit 1 - fi -done -popd diff --git a/vendor/github.com/google/gopacket/.travis.govet.sh b/vendor/github.com/google/gopacket/.travis.govet.sh deleted file mode 100644 index a5c13544ca2..00000000000 --- a/vendor/github.com/google/gopacket/.travis.govet.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -cd "$(dirname $0)" -DIRS=". layers pcap pcapgo tcpassembly tcpassembly/tcpreader routing ip4defrag bytediff macs defrag/lcmdefrag" -set -e -for subdir in $DIRS; do - pushd $subdir - go vet - popd -done diff --git a/vendor/github.com/google/gopacket/.travis.install.sh b/vendor/github.com/google/gopacket/.travis.install.sh deleted file mode 100644 index 648c901638d..00000000000 --- a/vendor/github.com/google/gopacket/.travis.install.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -ev - -go get github.com/google/gopacket -go get github.com/google/gopacket/layers -go get github.com/google/gopacket/tcpassembly -go get github.com/google/gopacket/reassembly -go get github.com/google/gopacket/pcapgo diff --git a/vendor/github.com/google/gopacket/.travis.script.sh b/vendor/github.com/google/gopacket/.travis.script.sh deleted file mode 100644 index a483f4f7c6c..00000000000 --- a/vendor/github.com/google/gopacket/.travis.script.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -set -ev - -go test github.com/google/gopacket -go test github.com/google/gopacket/layers -go test github.com/google/gopacket/tcpassembly -go test github.com/google/gopacket/reassembly -go test github.com/google/gopacket/pcapgo -go test github.com/google/gopacket/pcap diff --git a/vendor/github.com/google/gopacket/.travis.yml b/vendor/github.com/google/gopacket/.travis.yml deleted file mode 100644 index 84f1f4945ab..00000000000 --- a/vendor/github.com/google/gopacket/.travis.yml +++ /dev/null @@ -1,57 +0,0 @@ -language: go -go: - - 1.11.x - - 1.12.x - - 1.13.x - - master - -addons: - apt: - packages: - libpcap-dev - -# use modules except for older versions (see below) -install: true - -env: - - GO111MODULE=on - -script: ./.travis.script.sh - -matrix: - fast_finish: true - allow_failures: - - go: master - -jobs: - include: - - go: 1.5.x - install: ./.travis.install.sh - - go: 1.6.x - install: ./.travis.install.sh - - go: 1.7.x - install: ./.travis.install.sh - - go: 1.8.x - install: ./.travis.install.sh - - go: 1.9.x - install: ./.travis.install.sh - - go: 1.10.x - install: ./.travis.install.sh - - os: osx - go: 1.x -# windows doesn't work on travis (package installation just hangs and then errors out) -# - os: windows -# go: 1.x -# # We don't need nmap - but that's the only way to get npcap: -# before_install: choco install npcap --version 0.86 -y - - stage: style - name: "fmt/vet/lint" - go: 1.x - script: - - ./.travis.gofmt.sh - - ./.travis.govet.sh - - ./.travis.golint.sh - -stages: - - style - - test diff --git a/vendor/github.com/google/gopacket/AUTHORS b/vendor/github.com/google/gopacket/AUTHORS deleted file mode 100644 index 24e834e4512..00000000000 --- a/vendor/github.com/google/gopacket/AUTHORS +++ /dev/null @@ -1,54 +0,0 @@ -AUTHORS AND MAINTAINERS: - -MAIN DEVELOPERS: -Graeme Connell - -AUTHORS: -Nigel Tao -Cole Mickens -Ben Daglish -Luis Martinez -Remco Verhoef -Hiroaki Kawai -Lukas Lueg -Laurent Hausermann -Bill Green -Christian Mäder -Gernot Vormayr -Vitor Garcia Graveto -Elias Chavarria Reyes -Daniel Rittweiler - -CONTRIBUTORS: -Attila Oláh -Vittus Mikiassen -Matthias Radestock -Matthew Sackman -Loic Prylli -Alexandre Fiori -Adrian Tam -Satoshi Matsumoto -David Stainton -Jesse Ward -Kane Mathers -Jose Selvi -Yerden Zhumabekov -Jensen Hwa - ------------------------------------------------ -FORKED FROM github.com/akrennmair/gopcap -ALL THE FOLLOWING ARE FOR THAT PROJECT - -MAIN DEVELOPERS: -Andreas Krennmair - -CONTRIBUTORS: -Andrea Nall -Daniel Arndt -Dustin Sallings -Graeme Connell -Guillaume Savary -Mark Smith -Miek Gieben -Mike Bell -Trevor Strohman diff --git a/vendor/github.com/google/gopacket/CONTRIBUTING.md b/vendor/github.com/google/gopacket/CONTRIBUTING.md deleted file mode 100644 index 99ab7a2e4fb..00000000000 --- a/vendor/github.com/google/gopacket/CONTRIBUTING.md +++ /dev/null @@ -1,215 +0,0 @@ -Contributing To gopacket -======================== - -So you've got some code and you'd like it to be part of gopacket... wonderful! -We're happy to accept contributions, whether they're fixes to old protocols, new -protocols entirely, or anything else you think would improve the gopacket -library. This document is designed to help you to do just that. - -The first section deals with the plumbing: how to actually get a change -submitted. - -The second section deals with coding style... Go is great in that it -has a uniform style implemented by 'go fmt', but there's still some decisions -we've made that go above and beyond, and if you follow them, they won't come up -in your code review. - -The third section deals with some of the implementation decisions we've made, -which may help you to understand the current code and which we may ask you to -conform to (or provide compelling reasons for ignoring). - -Overall, we hope this document will help you to understand our system and write -great code which fits in, and help us to turn around on your code review quickly -so the code can make it into the master branch as quickly as possible. - - -How To Submit Code ------------------- - -We use github.com's Pull Request feature to receive code contributions from -external contributors. See -https://help.github.com/articles/creating-a-pull-request/ for details on -how to create a request. - -Also, there's a local script `gc` in the base directory of GoPacket that -runs a local set of checks, which should give you relatively high confidence -that your pull won't fail github pull checks. - -```sh -go get github.com/google/gopacket -cd $GOROOT/src/pkg/github.com/google/gopacket -git checkout -b # create a new branch to work from -... code code code ... -./gc # Run this to do local commits, it performs a number of checks -``` - -To sum up: - -* DO - + Pull down the latest version. - + Make a feature-specific branch. - + Code using the style and methods discussed in the rest of this document. - + Use the ./gc command to do local commits or check correctness. - + Push your new feature branch up to github.com, as a pull request. - + Handle comments and requests from reviewers, pushing new commits up to - your feature branch as problems are addressed. - + Put interesting comments and discussions into commit comments. -* DON'T - + Push to someone else's branch without their permission. - - -Coding Style ------------- - -* Go code must be run through `go fmt`, `go vet`, and `golint` -* Follow http://golang.org/doc/effective_go.html as much as possible. - + In particular, http://golang.org/doc/effective_go.html#mixed-caps. Enums - should be be CamelCase, with acronyms capitalized (TCPSourcePort, vs. - TcpSourcePort or TCP_SOURCE_PORT). -* Bonus points for giving enum types a String() field. -* Any exported types or functions should have commentary - (http://golang.org/doc/effective_go.html#commentary) - - -Coding Methods And Implementation Notes ---------------------------------------- - -### Error Handling - -Many times, you'll be decoding a protocol and run across something bad, a packet -corruption or the like. How do you handle this? First off, ALWAYS report the -error. You can do this either by returning the error from the decode() function -(most common), or if you're up for it you can implement and add an ErrorLayer -through the packet builder (the first method is a simple shortcut that does -exactly this, then stops any future decoding). - -Often, you'll already have decode some part of your protocol by the time you hit -your error. Use your own discretion to determine whether the stuff you've -already decoded should be returned to the caller or not: - -```go -func decodeMyProtocol(data []byte, p gopacket.PacketBuilder) error { - prot := &MyProtocol{} - if len(data) < 10 { - // This error occurred before we did ANYTHING, so there's nothing in my - // protocol that the caller could possibly want. Just return the error. - return fmt.Errorf("Length %d less than 10", len(data)) - } - prot.ImportantField1 = data[:5] - prot.ImportantField2 = data[5:10] - // At this point, we've already got enough information in 'prot' to - // warrant returning it to the caller, so we'll add it now. - p.AddLayer(prot) - if len(data) < 15 { - // We encountered an error later in the packet, but the caller already - // has the important info we've gleaned so far. - return fmt.Errorf("Length %d less than 15", len(data)) - } - prot.ImportantField3 = data[10:15] - return nil // We've already added the layer, we can just return success. -} -``` - -In general, our code follows the approach of returning the first error it -encounters. In general, we don't trust any bytes after the first error we see. - -### What Is A Layer? - -The definition of a layer is up to the discretion of the coder. It should be -something important enough that it's actually useful to the caller (IE: every -TLV value should probably NOT be a layer). However, it can be more granular -than a single protocol... IPv6 and SCTP both implement many layers to handle the -various parts of the protocol. Use your best judgement, and prepare to defend -your decisions during code review. ;) - -### Performance - -We strive to make gopacket as fast as possible while still providing lots of -features. In general, this means: - -* Focus performance tuning on common protocols (IP4/6, TCP, etc), and optimize - others on an as-needed basis (tons of MPLS on your network? Time to optimize - MPLS!) -* Use fast operations. See the toplevel benchmark_test for benchmarks of some - of Go's underlying features and types. -* Test your performance changes! You should use the ./gc script's --benchmark - flag to submit any performance-related changes. Use pcap/gopacket_benchmark - to test your change against a PCAP file based on your traffic patterns. -* Don't be TOO hacky. Sometimes, removing an unused struct from a field causes - a huge performance hit, due to the way that Go currently handles its segmented - stack... don't be afraid to clean it up anyway. We'll trust the Go compiler - to get good enough over time to handle this. Also, this type of - compiler-specific optimization is very fragile; someone adding a field to an - entirely different struct elsewhere in the codebase could reverse any gains - you might achieve by aligning your allocations. -* Try to minimize memory allocations. If possible, use []byte to reference - pieces of the input, instead of using string, which requires copying the bytes - into a new memory allocation. -* Think hard about what should be evaluated lazily vs. not. In general, a - layer's struct should almost exactly mirror the layer's frame. Anything - that's more interesting should be a function. This may not always be - possible, but it's a good rule of thumb. -* Don't fear micro-optimizations. With the above in mind, we welcome - micro-optimizations that we think will have positive/neutral impacts on the - majority of workloads. A prime example of this is pre-allocating certain - structs within a larger one: - -```go -type MyProtocol struct { - // Most packets have 1-4 of VeryCommon, so we preallocate it here. - initialAllocation [4]uint32 - VeryCommon []uint32 -} - -func decodeMyProtocol(data []byte, p gopacket.PacketBuilder) error { - prot := &MyProtocol{} - prot.VeryCommon = proto.initialAllocation[:0] - for len(data) > 4 { - field := binary.BigEndian.Uint32(data[:4]) - data = data[4:] - // Since we're using the underlying initialAllocation, we won't need to - // allocate new memory for the following append unless we more than 16 - // bytes of data, which should be the uncommon case. - prot.VeryCommon = append(prot.VeryCommon, field) - } - p.AddLayer(prot) - if len(data) > 0 { - return fmt.Errorf("MyProtocol packet has %d bytes left after decoding", len(data)) - } - return nil -} -``` - -### Slices And Data - -If you're pulling a slice from the data you're decoding, don't copy it. Just -use the slice itself. - -```go -type MyProtocol struct { - A, B net.IP -} -func decodeMyProtocol(data []byte, p gopacket.PacketBuilder) error { - p.AddLayer(&MyProtocol{ - A: data[:4], - B: data[4:8], - }) - return nil -} -``` - -The caller has already agreed, by using this library, that they won't modify the -set of bytes they pass in to the decoder, or the library has already copied the -set of bytes to a read-only location. See DecodeOptions.NoCopy for more -information. - -### Enums/Types - -If a protocol has an integer field (uint8, uint16, etc) with a couple of known -values that mean something special, make it a type. This allows us to do really -nice things like adding a String() function to them, so we can more easily -display those to users. Check out layers/enums.go for one example, as well as -layers/icmp.go for layer-specific enums. - -When naming things, try for descriptiveness over suscinctness. For example, -choose DNSResponseRecord over DNSRR. diff --git a/vendor/github.com/google/gopacket/LICENSE b/vendor/github.com/google/gopacket/LICENSE deleted file mode 100644 index 2100d524d9e..00000000000 --- a/vendor/github.com/google/gopacket/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Google, Inc. All rights reserved. -Copyright (c) 2009-2011 Andreas Krennmair. 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 Andreas Krennmair, Google, 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/google/gopacket/README.md b/vendor/github.com/google/gopacket/README.md deleted file mode 100644 index efe462ee100..00000000000 --- a/vendor/github.com/google/gopacket/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# GoPacket - -This library provides packet decoding capabilities for Go. -See [godoc](https://godoc.org/github.com/google/gopacket) for more details. - -[![Build Status](https://travis-ci.org/google/gopacket.svg?branch=master)](https://travis-ci.org/google/gopacket) -[![GoDoc](https://godoc.org/github.com/google/gopacket?status.svg)](https://godoc.org/github.com/google/gopacket) - -Minimum Go version required is 1.5 except for pcapgo/EthernetHandle, afpacket, and bsdbpf which need at least 1.9 due to x/sys/unix dependencies. - -Originally forked from the gopcap project written by Andreas -Krennmair (http://github.com/akrennmair/gopcap). diff --git a/vendor/github.com/google/gopacket/base.go b/vendor/github.com/google/gopacket/base.go deleted file mode 100644 index 91e150c215b..00000000000 --- a/vendor/github.com/google/gopacket/base.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package gopacket - -import ( - "fmt" -) - -// Layer represents a single decoded packet layer (using either the -// OSI or TCP/IP definition of a layer). When decoding, a packet's data is -// broken up into a number of layers. The caller may call LayerType() to -// figure out which type of layer they've received from the packet. Optionally, -// they may then use a type assertion to get the actual layer type for deep -// inspection of the data. -type Layer interface { - // LayerType is the gopacket type for this layer. - LayerType() LayerType - // LayerContents returns the set of bytes that make up this layer. - LayerContents() []byte - // LayerPayload returns the set of bytes contained within this layer, not - // including the layer itself. - LayerPayload() []byte -} - -// Payload is a Layer containing the payload of a packet. The definition of -// what constitutes the payload of a packet depends on previous layers; for -// TCP and UDP, we stop decoding above layer 4 and return the remaining -// bytes as a Payload. Payload is an ApplicationLayer. -type Payload []byte - -// LayerType returns LayerTypePayload -func (p Payload) LayerType() LayerType { return LayerTypePayload } - -// LayerContents returns the bytes making up this layer. -func (p Payload) LayerContents() []byte { return []byte(p) } - -// LayerPayload returns the payload within this layer. -func (p Payload) LayerPayload() []byte { return nil } - -// Payload returns this layer as bytes. -func (p Payload) Payload() []byte { return []byte(p) } - -// String implements fmt.Stringer. -func (p Payload) String() string { return fmt.Sprintf("%d byte(s)", len(p)) } - -// GoString implements fmt.GoStringer. -func (p Payload) GoString() string { return LongBytesGoString([]byte(p)) } - -// CanDecode implements DecodingLayer. -func (p Payload) CanDecode() LayerClass { return LayerTypePayload } - -// NextLayerType implements DecodingLayer. -func (p Payload) NextLayerType() LayerType { return LayerTypeZero } - -// DecodeFromBytes implements DecodingLayer. -func (p *Payload) DecodeFromBytes(data []byte, df DecodeFeedback) error { - *p = Payload(data) - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (p Payload) SerializeTo(b SerializeBuffer, opts SerializeOptions) error { - bytes, err := b.PrependBytes(len(p)) - if err != nil { - return err - } - copy(bytes, p) - return nil -} - -// decodePayload decodes data by returning it all in a Payload layer. -func decodePayload(data []byte, p PacketBuilder) error { - payload := &Payload{} - if err := payload.DecodeFromBytes(data, p); err != nil { - return err - } - p.AddLayer(payload) - p.SetApplicationLayer(payload) - return nil -} - -// Fragment is a Layer containing a fragment of a larger frame, used by layers -// like IPv4 and IPv6 that allow for fragmentation of their payloads. -type Fragment []byte - -// LayerType returns LayerTypeFragment -func (p *Fragment) LayerType() LayerType { return LayerTypeFragment } - -// LayerContents implements Layer. -func (p *Fragment) LayerContents() []byte { return []byte(*p) } - -// LayerPayload implements Layer. -func (p *Fragment) LayerPayload() []byte { return nil } - -// Payload returns this layer as a byte slice. -func (p *Fragment) Payload() []byte { return []byte(*p) } - -// String implements fmt.Stringer. -func (p *Fragment) String() string { return fmt.Sprintf("%d byte(s)", len(*p)) } - -// CanDecode implements DecodingLayer. -func (p *Fragment) CanDecode() LayerClass { return LayerTypeFragment } - -// NextLayerType implements DecodingLayer. -func (p *Fragment) NextLayerType() LayerType { return LayerTypeZero } - -// DecodeFromBytes implements DecodingLayer. -func (p *Fragment) DecodeFromBytes(data []byte, df DecodeFeedback) error { - *p = Fragment(data) - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (p *Fragment) SerializeTo(b SerializeBuffer, opts SerializeOptions) error { - bytes, err := b.PrependBytes(len(*p)) - if err != nil { - return err - } - copy(bytes, *p) - return nil -} - -// decodeFragment decodes data by returning it all in a Fragment layer. -func decodeFragment(data []byte, p PacketBuilder) error { - payload := &Fragment{} - if err := payload.DecodeFromBytes(data, p); err != nil { - return err - } - p.AddLayer(payload) - p.SetApplicationLayer(payload) - return nil -} - -// These layers correspond to Internet Protocol Suite (TCP/IP) layers, and their -// corresponding OSI layers, as best as possible. - -// LinkLayer is the packet layer corresponding to TCP/IP layer 1 (OSI layer 2) -type LinkLayer interface { - Layer - LinkFlow() Flow -} - -// NetworkLayer is the packet layer corresponding to TCP/IP layer 2 (OSI -// layer 3) -type NetworkLayer interface { - Layer - NetworkFlow() Flow -} - -// TransportLayer is the packet layer corresponding to the TCP/IP layer 3 (OSI -// layer 4) -type TransportLayer interface { - Layer - TransportFlow() Flow -} - -// ApplicationLayer is the packet layer corresponding to the TCP/IP layer 4 (OSI -// layer 7), also known as the packet payload. -type ApplicationLayer interface { - Layer - Payload() []byte -} - -// ErrorLayer is a packet layer created when decoding of the packet has failed. -// Its payload is all the bytes that we were unable to decode, and the returned -// error details why the decoding failed. -type ErrorLayer interface { - Layer - Error() error -} diff --git a/vendor/github.com/google/gopacket/decode.go b/vendor/github.com/google/gopacket/decode.go deleted file mode 100644 index 2633f848ede..00000000000 --- a/vendor/github.com/google/gopacket/decode.go +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package gopacket - -import ( - "errors" -) - -// DecodeFeedback is used by DecodingLayer layers to provide decoding metadata. -type DecodeFeedback interface { - // SetTruncated should be called if during decoding you notice that a packet - // is shorter than internal layer variables (HeaderLength, or the like) say it - // should be. It sets packet.Metadata().Truncated. - SetTruncated() -} - -type nilDecodeFeedback struct{} - -func (nilDecodeFeedback) SetTruncated() {} - -// NilDecodeFeedback implements DecodeFeedback by doing nothing. -var NilDecodeFeedback DecodeFeedback = nilDecodeFeedback{} - -// PacketBuilder is used by layer decoders to store the layers they've decoded, -// and to defer future decoding via NextDecoder. -// Typically, the pattern for use is: -// func (m *myDecoder) Decode(data []byte, p PacketBuilder) error { -// if myLayer, err := myDecodingLogic(data); err != nil { -// return err -// } else { -// p.AddLayer(myLayer) -// } -// // maybe do this, if myLayer is a LinkLayer -// p.SetLinkLayer(myLayer) -// return p.NextDecoder(nextDecoder) -// } -type PacketBuilder interface { - DecodeFeedback - // AddLayer should be called by a decoder immediately upon successful - // decoding of a layer. - AddLayer(l Layer) - // The following functions set the various specific layers in the final - // packet. Note that if many layers call SetX, the first call is kept and all - // other calls are ignored. - SetLinkLayer(LinkLayer) - SetNetworkLayer(NetworkLayer) - SetTransportLayer(TransportLayer) - SetApplicationLayer(ApplicationLayer) - SetErrorLayer(ErrorLayer) - // NextDecoder should be called by a decoder when they're done decoding a - // packet layer but not done with decoding the entire packet. The next - // decoder will be called to decode the last AddLayer's LayerPayload. - // Because of this, NextDecoder must only be called once all other - // PacketBuilder calls have been made. Set*Layer and AddLayer calls after - // NextDecoder calls will behave incorrectly. - NextDecoder(next Decoder) error - // DumpPacketData is used solely for decoding. If you come across an error - // you need to diagnose while processing a packet, call this and your packet's - // data will be dumped to stderr so you can create a test. This should never - // be called from a production decoder. - DumpPacketData() - // DecodeOptions returns the decode options - DecodeOptions() *DecodeOptions -} - -// Decoder is an interface for logic to decode a packet layer. Users may -// implement a Decoder to handle their own strange packet types, or may use one -// of the many decoders available in the 'layers' subpackage to decode things -// for them. -type Decoder interface { - // Decode decodes the bytes of a packet, sending decoded values and other - // information to PacketBuilder, and returning an error if unsuccessful. See - // the PacketBuilder documentation for more details. - Decode([]byte, PacketBuilder) error -} - -// DecodeFunc wraps a function to make it a Decoder. -type DecodeFunc func([]byte, PacketBuilder) error - -// Decode implements Decoder by calling itself. -func (d DecodeFunc) Decode(data []byte, p PacketBuilder) error { - // function, call thyself. - return d(data, p) -} - -// DecodePayload is a Decoder that returns a Payload layer containing all -// remaining bytes. -var DecodePayload Decoder = DecodeFunc(decodePayload) - -// DecodeUnknown is a Decoder that returns an Unknown layer containing all -// remaining bytes, useful if you run up against a layer that you're unable to -// decode yet. This layer is considered an ErrorLayer. -var DecodeUnknown Decoder = DecodeFunc(decodeUnknown) - -// DecodeFragment is a Decoder that returns a Fragment layer containing all -// remaining bytes. -var DecodeFragment Decoder = DecodeFunc(decodeFragment) - -// LayerTypeZero is an invalid layer type, but can be used to determine whether -// layer type has actually been set correctly. -var LayerTypeZero = RegisterLayerType(0, LayerTypeMetadata{Name: "Unknown", Decoder: DecodeUnknown}) - -// LayerTypeDecodeFailure is the layer type for the default error layer. -var LayerTypeDecodeFailure = RegisterLayerType(1, LayerTypeMetadata{Name: "DecodeFailure", Decoder: DecodeUnknown}) - -// LayerTypePayload is the layer type for a payload that we don't try to decode -// but treat as a success, IE: an application-level payload. -var LayerTypePayload = RegisterLayerType(2, LayerTypeMetadata{Name: "Payload", Decoder: DecodePayload}) - -// LayerTypeFragment is the layer type for a fragment of a layer transported -// by an underlying layer that supports fragmentation. -var LayerTypeFragment = RegisterLayerType(3, LayerTypeMetadata{Name: "Fragment", Decoder: DecodeFragment}) - -// DecodeFailure is a packet layer created if decoding of the packet data failed -// for some reason. It implements ErrorLayer. LayerContents will be the entire -// set of bytes that failed to parse, and Error will return the reason parsing -// failed. -type DecodeFailure struct { - data []byte - err error - stack []byte -} - -// Error returns the error encountered during decoding. -func (d *DecodeFailure) Error() error { return d.err } - -// LayerContents implements Layer. -func (d *DecodeFailure) LayerContents() []byte { return d.data } - -// LayerPayload implements Layer. -func (d *DecodeFailure) LayerPayload() []byte { return nil } - -// String implements fmt.Stringer. -func (d *DecodeFailure) String() string { - return "Packet decoding error: " + d.Error().Error() -} - -// Dump implements Dumper. -func (d *DecodeFailure) Dump() (s string) { - if d.stack != nil { - s = string(d.stack) - } - return -} - -// LayerType returns LayerTypeDecodeFailure -func (d *DecodeFailure) LayerType() LayerType { return LayerTypeDecodeFailure } - -// decodeUnknown "decodes" unsupported data types by returning an error. -// This decoder will thus always return a DecodeFailure layer. -func decodeUnknown(data []byte, p PacketBuilder) error { - return errors.New("Layer type not currently supported") -} diff --git a/vendor/github.com/google/gopacket/doc.go b/vendor/github.com/google/gopacket/doc.go deleted file mode 100644 index b46e43dfa53..00000000000 --- a/vendor/github.com/google/gopacket/doc.go +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -/* -Package gopacket provides packet decoding for the Go language. - -gopacket contains many sub-packages with additional functionality you may find -useful, including: - - * layers: You'll probably use this every time. This contains of the logic - built into gopacket for decoding packet protocols. Note that all example - code below assumes that you have imported both gopacket and - gopacket/layers. - * pcap: C bindings to use libpcap to read packets off the wire. - * pfring: C bindings to use PF_RING to read packets off the wire. - * afpacket: C bindings for Linux's AF_PACKET to read packets off the wire. - * tcpassembly: TCP stream reassembly - -Also, if you're looking to dive right into code, see the examples subdirectory -for numerous simple binaries built using gopacket libraries. - -Minimum go version required is 1.5 except for pcapgo/EthernetHandle, afpacket, -and bsdbpf which need at least 1.7 due to x/sys/unix dependencies. - -Basic Usage - -gopacket takes in packet data as a []byte and decodes it into a packet with -a non-zero number of "layers". Each layer corresponds to a protocol -within the bytes. Once a packet has been decoded, the layers of the packet -can be requested from the packet. - - // Decode a packet - packet := gopacket.NewPacket(myPacketData, layers.LayerTypeEthernet, gopacket.Default) - // Get the TCP layer from this packet - if tcpLayer := packet.Layer(layers.LayerTypeTCP); tcpLayer != nil { - fmt.Println("This is a TCP packet!") - // Get actual TCP data from this layer - tcp, _ := tcpLayer.(*layers.TCP) - fmt.Printf("From src port %d to dst port %d\n", tcp.SrcPort, tcp.DstPort) - } - // Iterate over all layers, printing out each layer type - for _, layer := range packet.Layers() { - fmt.Println("PACKET LAYER:", layer.LayerType()) - } - -Packets can be decoded from a number of starting points. Many of our base -types implement Decoder, which allow us to decode packets for which -we don't have full data. - - // Decode an ethernet packet - ethP := gopacket.NewPacket(p1, layers.LayerTypeEthernet, gopacket.Default) - // Decode an IPv6 header and everything it contains - ipP := gopacket.NewPacket(p2, layers.LayerTypeIPv6, gopacket.Default) - // Decode a TCP header and its payload - tcpP := gopacket.NewPacket(p3, layers.LayerTypeTCP, gopacket.Default) - - -Reading Packets From A Source - -Most of the time, you won't just have a []byte of packet data lying around. -Instead, you'll want to read packets in from somewhere (file, interface, etc) -and process them. To do that, you'll want to build a PacketSource. - -First, you'll need to construct an object that implements the PacketDataSource -interface. There are implementations of this interface bundled with gopacket -in the gopacket/pcap and gopacket/pfring subpackages... see their documentation -for more information on their usage. Once you have a PacketDataSource, you can -pass it into NewPacketSource, along with a Decoder of your choice, to create -a PacketSource. - -Once you have a PacketSource, you can read packets from it in multiple ways. -See the docs for PacketSource for more details. The easiest method is the -Packets function, which returns a channel, then asynchronously writes new -packets into that channel, closing the channel if the packetSource hits an -end-of-file. - - packetSource := ... // construct using pcap or pfring - for packet := range packetSource.Packets() { - handlePacket(packet) // do something with each packet - } - -You can change the decoding options of the packetSource by setting fields in -packetSource.DecodeOptions... see the following sections for more details. - - -Lazy Decoding - -gopacket optionally decodes packet data lazily, meaning it -only decodes a packet layer when it needs to handle a function call. - - // Create a packet, but don't actually decode anything yet - packet := gopacket.NewPacket(myPacketData, layers.LayerTypeEthernet, gopacket.Lazy) - // Now, decode the packet up to the first IPv4 layer found but no further. - // If no IPv4 layer was found, the whole packet will be decoded looking for - // it. - ip4 := packet.Layer(layers.LayerTypeIPv4) - // Decode all layers and return them. The layers up to the first IPv4 layer - // are already decoded, and will not require decoding a second time. - layers := packet.Layers() - -Lazily-decoded packets are not concurrency-safe. Since layers have not all been -decoded, each call to Layer() or Layers() has the potential to mutate the packet -in order to decode the next layer. If a packet is used -in multiple goroutines concurrently, don't use gopacket.Lazy. Then gopacket -will decode the packet fully, and all future function calls won't mutate the -object. - - -NoCopy Decoding - -By default, gopacket will copy the slice passed to NewPacket and store the -copy within the packet, so future mutations to the bytes underlying the slice -don't affect the packet and its layers. If you can guarantee that the -underlying slice bytes won't be changed, you can use NoCopy to tell -gopacket.NewPacket, and it'll use the passed-in slice itself. - - // This channel returns new byte slices, each of which points to a new - // memory location that's guaranteed immutable for the duration of the - // packet. - for data := range myByteSliceChannel { - p := gopacket.NewPacket(data, layers.LayerTypeEthernet, gopacket.NoCopy) - doSomethingWithPacket(p) - } - -The fastest method of decoding is to use both Lazy and NoCopy, but note from -the many caveats above that for some implementations either or both may be -dangerous. - - -Pointers To Known Layers - -During decoding, certain layers are stored in the packet as well-known -layer types. For example, IPv4 and IPv6 are both considered NetworkLayer -layers, while TCP and UDP are both TransportLayer layers. We support 4 -layers, corresponding to the 4 layers of the TCP/IP layering scheme (roughly -anagalous to layers 2, 3, 4, and 7 of the OSI model). To access these, -you can use the packet.LinkLayer, packet.NetworkLayer, -packet.TransportLayer, and packet.ApplicationLayer functions. Each of -these functions returns a corresponding interface -(gopacket.{Link,Network,Transport,Application}Layer). The first three -provide methods for getting src/dst addresses for that particular layer, -while the final layer provides a Payload function to get payload data. -This is helpful, for example, to get payloads for all packets regardless -of their underlying data type: - - // Get packets from some source - for packet := range someSource { - if app := packet.ApplicationLayer(); app != nil { - if strings.Contains(string(app.Payload()), "magic string") { - fmt.Println("Found magic string in a packet!") - } - } - } - -A particularly useful layer is ErrorLayer, which is set whenever there's -an error parsing part of the packet. - - packet := gopacket.NewPacket(myPacketData, layers.LayerTypeEthernet, gopacket.Default) - if err := packet.ErrorLayer(); err != nil { - fmt.Println("Error decoding some part of the packet:", err) - } - -Note that we don't return an error from NewPacket because we may have decoded -a number of layers successfully before running into our erroneous layer. You -may still be able to get your Ethernet and IPv4 layers correctly, even if -your TCP layer is malformed. - - -Flow And Endpoint - -gopacket has two useful objects, Flow and Endpoint, for communicating in a protocol -independent manner the fact that a packet is coming from A and going to B. -The general layer types LinkLayer, NetworkLayer, and TransportLayer all provide -methods for extracting their flow information, without worrying about the type -of the underlying Layer. - -A Flow is a simple object made up of a set of two Endpoints, one source and one -destination. It details the sender and receiver of the Layer of the Packet. - -An Endpoint is a hashable representation of a source or destination. For -example, for LayerTypeIPv4, an Endpoint contains the IP address bytes for a v4 -IP packet. A Flow can be broken into Endpoints, and Endpoints can be combined -into Flows: - - packet := gopacket.NewPacket(myPacketData, layers.LayerTypeEthernet, gopacket.Lazy) - netFlow := packet.NetworkLayer().NetworkFlow() - src, dst := netFlow.Endpoints() - reverseFlow := gopacket.NewFlow(dst, src) - -Both Endpoint and Flow objects can be used as map keys, and the equality -operator can compare them, so you can easily group together all packets -based on endpoint criteria: - - flows := map[gopacket.Endpoint]chan gopacket.Packet - packet := gopacket.NewPacket(myPacketData, layers.LayerTypeEthernet, gopacket.Lazy) - // Send all TCP packets to channels based on their destination port. - if tcp := packet.Layer(layers.LayerTypeTCP); tcp != nil { - flows[tcp.TransportFlow().Dst()] <- packet - } - // Look for all packets with the same source and destination network address - if net := packet.NetworkLayer(); net != nil { - src, dst := net.NetworkFlow().Endpoints() - if src == dst { - fmt.Println("Fishy packet has same network source and dst: %s", src) - } - } - // Find all packets coming from UDP port 1000 to UDP port 500 - interestingFlow := gopacket.FlowFromEndpoints(layers.NewUDPPortEndpoint(1000), layers.NewUDPPortEndpoint(500)) - if t := packet.NetworkLayer(); t != nil && t.TransportFlow() == interestingFlow { - fmt.Println("Found that UDP flow I was looking for!") - } - -For load-balancing purposes, both Flow and Endpoint have FastHash() functions, -which provide quick, non-cryptographic hashes of their contents. Of particular -importance is the fact that Flow FastHash() is symmetric: A->B will have the same -hash as B->A. An example usage could be: - - channels := [8]chan gopacket.Packet - for i := 0; i < 8; i++ { - channels[i] = make(chan gopacket.Packet) - go packetHandler(channels[i]) - } - for packet := range getPackets() { - if net := packet.NetworkLayer(); net != nil { - channels[int(net.NetworkFlow().FastHash()) & 0x7] <- packet - } - } - -This allows us to split up a packet stream while still making sure that each -stream sees all packets for a flow (and its bidirectional opposite). - - -Implementing Your Own Decoder - -If your network has some strange encapsulation, you can implement your own -decoder. In this example, we handle Ethernet packets which are encapsulated -in a 4-byte header. - - // Create a layer type, should be unique and high, so it doesn't conflict, - // giving it a name and a decoder to use. - var MyLayerType = gopacket.RegisterLayerType(12345, gopacket.LayerTypeMetadata{Name: "MyLayerType", Decoder: gopacket.DecodeFunc(decodeMyLayer)}) - - // Implement my layer - type MyLayer struct { - StrangeHeader []byte - payload []byte - } - func (m MyLayer) LayerType() gopacket.LayerType { return MyLayerType } - func (m MyLayer) LayerContents() []byte { return m.StrangeHeader } - func (m MyLayer) LayerPayload() []byte { return m.payload } - - // Now implement a decoder... this one strips off the first 4 bytes of the - // packet. - func decodeMyLayer(data []byte, p gopacket.PacketBuilder) error { - // Create my layer - p.AddLayer(&MyLayer{data[:4], data[4:]}) - // Determine how to handle the rest of the packet - return p.NextDecoder(layers.LayerTypeEthernet) - } - - // Finally, decode your packets: - p := gopacket.NewPacket(data, MyLayerType, gopacket.Lazy) - -See the docs for Decoder and PacketBuilder for more details on how coding -decoders works, or look at RegisterLayerType and RegisterEndpointType to see how -to add layer/endpoint types to gopacket. - - -Fast Decoding With DecodingLayerParser - -TLDR: DecodingLayerParser takes about 10% of the time as NewPacket to decode -packet data, but only for known packet stacks. - -Basic decoding using gopacket.NewPacket or PacketSource.Packets is somewhat slow -due to its need to allocate a new packet and every respective layer. It's very -versatile and can handle all known layer types, but sometimes you really only -care about a specific set of layers regardless, so that versatility is wasted. - -DecodingLayerParser avoids memory allocation altogether by decoding packet -layers directly into preallocated objects, which you can then reference to get -the packet's information. A quick example: - - func main() { - var eth layers.Ethernet - var ip4 layers.IPv4 - var ip6 layers.IPv6 - var tcp layers.TCP - parser := gopacket.NewDecodingLayerParser(layers.LayerTypeEthernet, ð, &ip4, &ip6, &tcp) - decoded := []gopacket.LayerType{} - for packetData := range somehowGetPacketData() { - if err := parser.DecodeLayers(packetData, &decoded); err != nil { - fmt.Fprintf(os.Stderr, "Could not decode layers: %v\n", err) - continue - } - for _, layerType := range decoded { - switch layerType { - case layers.LayerTypeIPv6: - fmt.Println(" IP6 ", ip6.SrcIP, ip6.DstIP) - case layers.LayerTypeIPv4: - fmt.Println(" IP4 ", ip4.SrcIP, ip4.DstIP) - } - } - } - } - -The important thing to note here is that the parser is modifying the passed in -layers (eth, ip4, ip6, tcp) instead of allocating new ones, thus greatly -speeding up the decoding process. It's even branching based on layer type... -it'll handle an (eth, ip4, tcp) or (eth, ip6, tcp) stack. However, it won't -handle any other type... since no other decoders were passed in, an (eth, ip4, -udp) stack will stop decoding after ip4, and only pass back [LayerTypeEthernet, -LayerTypeIPv4] through the 'decoded' slice (along with an error saying it can't -decode a UDP packet). - -Unfortunately, not all layers can be used by DecodingLayerParser... only those -implementing the DecodingLayer interface are usable. Also, it's possible to -create DecodingLayers that are not themselves Layers... see -layers.IPv6ExtensionSkipper for an example of this. - -Faster And Customized Decoding with DecodingLayerContainer - -By default, DecodingLayerParser uses native map to store and search for a layer -to decode. Though being versatile, in some cases this solution may be not so -optimal. For example, if you have only few layers faster operations may be -provided by sparse array indexing or linear array scan. - -To accomodate these scenarios, DecodingLayerContainer interface is introduced -along with its implementations: DecodingLayerSparse, DecodingLayerArray and -DecodingLayerMap. You can specify a container implementation to -DecodingLayerParser with SetDecodingLayerContainer method. Example: - - dlp := gopacket.NewDecodingLayerParser(LayerTypeEthernet) - dlp.SetDecodingLayerContainer(gopacket.DecodingLayerSparse(nil)) - var eth layers.Ethernet - dlp.AddDecodingLayer(ð) - // ... add layers and use DecodingLayerParser as usual... - -To skip one level of indirection (though sacrificing some capabilities) you may -also use DecodingLayerContainer as a decoding tool as it is. In this case you have to -handle unknown layer types and layer panics by yourself. Example: - - func main() { - var eth layers.Ethernet - var ip4 layers.IPv4 - var ip6 layers.IPv6 - var tcp layers.TCP - dlc := gopacket.DecodingLayerContainer(gopacket.DecodingLayerArray(nil)) - dlc = dlc.Put(ð) - dlc = dlc.Put(&ip4) - dlc = dlc.Put(&ip6) - dlc = dlc.Put(&tcp) - // you may specify some meaningful DecodeFeedback - decoder := dlc.LayersDecoder(LayerTypeEthernet, gopacket.NilDecodeFeedback) - decoded := make([]gopacket.LayerType, 0, 20) - for packetData := range somehowGetPacketData() { - lt, err := decoder(packetData, &decoded) - if err != nil { - fmt.Fprintf(os.Stderr, "Could not decode layers: %v\n", err) - continue - } - if lt != gopacket.LayerTypeZero { - fmt.Fprintf(os.Stderr, "unknown layer type: %v\n", lt) - continue - } - for _, layerType := range decoded { - // examine decoded layertypes just as already shown above - } - } - } - -DecodingLayerSparse is the fastest but most effective when LayerType values -that layers in use can decode are not large because otherwise that would lead -to bigger memory footprint. DecodingLayerArray is very compact and primarily -usable if the number of decoding layers is not big (up to ~10-15, but please do -your own benchmarks). DecodingLayerMap is the most versatile one and used by -DecodingLayerParser by default. Please refer to tests and benchmarks in layers -subpackage to further examine usage examples and performance measurements. - -You may also choose to implement your own DecodingLayerContainer if you want to -make use of your own internal packet decoding logic. - -Creating Packet Data - -As well as offering the ability to decode packet data, gopacket will allow you -to create packets from scratch, as well. A number of gopacket layers implement -the SerializableLayer interface; these layers can be serialized to a []byte in -the following manner: - - ip := &layers.IPv4{ - SrcIP: net.IP{1, 2, 3, 4}, - DstIP: net.IP{5, 6, 7, 8}, - // etc... - } - buf := gopacket.NewSerializeBuffer() - opts := gopacket.SerializeOptions{} // See SerializeOptions for more details. - err := ip.SerializeTo(buf, opts) - if err != nil { panic(err) } - fmt.Println(buf.Bytes()) // prints out a byte slice containing the serialized IPv4 layer. - -SerializeTo PREPENDS the given layer onto the SerializeBuffer, and they treat -the current buffer's Bytes() slice as the payload of the serializing layer. -Therefore, you can serialize an entire packet by serializing a set of layers in -reverse order (Payload, then TCP, then IP, then Ethernet, for example). The -SerializeBuffer's SerializeLayers function is a helper that does exactly that. - -To generate a (empty and useless, because no fields are set) -Ethernet(IPv4(TCP(Payload))) packet, for example, you can run: - - buf := gopacket.NewSerializeBuffer() - opts := gopacket.SerializeOptions{} - gopacket.SerializeLayers(buf, opts, - &layers.Ethernet{}, - &layers.IPv4{}, - &layers.TCP{}, - gopacket.Payload([]byte{1, 2, 3, 4})) - packetData := buf.Bytes() - -A Final Note - -If you use gopacket, you'll almost definitely want to make sure gopacket/layers -is imported, since when imported it sets all the LayerType variables and fills -in a lot of interesting variables/maps (DecodersByLayerName, etc). Therefore, -it's recommended that even if you don't use any layers functions directly, you still import with: - - import ( - _ "github.com/google/gopacket/layers" - ) -*/ -package gopacket diff --git a/vendor/github.com/google/gopacket/flows.go b/vendor/github.com/google/gopacket/flows.go deleted file mode 100644 index a00c88398e5..00000000000 --- a/vendor/github.com/google/gopacket/flows.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package gopacket - -import ( - "bytes" - "fmt" - "strconv" -) - -// MaxEndpointSize determines the maximum size in bytes of an endpoint address. -// -// Endpoints/Flows have a problem: They need to be hashable. Therefore, they -// can't use a byte slice. The two obvious choices are to use a string or a -// byte array. Strings work great, but string creation requires memory -// allocation, which can be slow. Arrays work great, but have a fixed size. We -// originally used the former, now we've switched to the latter. Use of a fixed -// byte-array doubles the speed of constructing a flow (due to not needing to -// allocate). This is a huge increase... too much for us to pass up. -// -// The end result of this, though, is that an endpoint/flow can't be created -// using more than MaxEndpointSize bytes per address. -const MaxEndpointSize = 16 - -// Endpoint is the set of bytes used to address packets at various layers. -// See LinkLayer, NetworkLayer, and TransportLayer specifications. -// Endpoints are usable as map keys. -type Endpoint struct { - typ EndpointType - len int - raw [MaxEndpointSize]byte -} - -// EndpointType returns the endpoint type associated with this endpoint. -func (a Endpoint) EndpointType() EndpointType { return a.typ } - -// Raw returns the raw bytes of this endpoint. These aren't human-readable -// most of the time, but they are faster than calling String. -func (a Endpoint) Raw() []byte { return a.raw[:a.len] } - -// LessThan provides a stable ordering for all endpoints. It sorts first based -// on the EndpointType of an endpoint, then based on the raw bytes of that -// endpoint. -// -// For some endpoints, the actual comparison may not make sense, however this -// ordering does provide useful information for most Endpoint types. -// Ordering is based first on endpoint type, then on raw endpoint bytes. -// Endpoint bytes are sorted lexicographically. -func (a Endpoint) LessThan(b Endpoint) bool { - return a.typ < b.typ || (a.typ == b.typ && bytes.Compare(a.raw[:a.len], b.raw[:b.len]) < 0) -} - -// fnvHash is used by our FastHash functions, and implements the FNV hash -// created by Glenn Fowler, Landon Curt Noll, and Phong Vo. -// See http://isthe.com/chongo/tech/comp/fnv/. -func fnvHash(s []byte) (h uint64) { - h = fnvBasis - for i := 0; i < len(s); i++ { - h ^= uint64(s[i]) - h *= fnvPrime - } - return -} - -const fnvBasis = 14695981039346656037 -const fnvPrime = 1099511628211 - -// FastHash provides a quick hashing function for an endpoint, useful if you'd -// like to split up endpoints by modulos or other load-balancing techniques. -// It uses a variant of Fowler-Noll-Vo hashing. -// -// The output of FastHash is not guaranteed to remain the same through future -// code revisions, so should not be used to key values in persistent storage. -func (a Endpoint) FastHash() (h uint64) { - h = fnvHash(a.raw[:a.len]) - h ^= uint64(a.typ) - h *= fnvPrime - return -} - -// NewEndpoint creates a new Endpoint object. -// -// The size of raw must be less than MaxEndpointSize, otherwise this function -// will panic. -func NewEndpoint(typ EndpointType, raw []byte) (e Endpoint) { - e.len = len(raw) - if e.len > MaxEndpointSize { - panic("raw byte length greater than MaxEndpointSize") - } - e.typ = typ - copy(e.raw[:], raw) - return -} - -// EndpointTypeMetadata is used to register a new endpoint type. -type EndpointTypeMetadata struct { - // Name is the string returned by an EndpointType's String function. - Name string - // Formatter is called from an Endpoint's String function to format the raw - // bytes in an Endpoint into a human-readable string. - Formatter func([]byte) string -} - -// EndpointType is the type of a gopacket Endpoint. This type determines how -// the bytes stored in the endpoint should be interpreted. -type EndpointType int64 - -var endpointTypes = map[EndpointType]EndpointTypeMetadata{} - -// RegisterEndpointType creates a new EndpointType and registers it globally. -// It MUST be passed a unique number, or it will panic. Numbers 0-999 are -// reserved for gopacket's use. -func RegisterEndpointType(num int, meta EndpointTypeMetadata) EndpointType { - t := EndpointType(num) - if _, ok := endpointTypes[t]; ok { - panic("Endpoint type number already in use") - } - endpointTypes[t] = meta - return t -} - -func (e EndpointType) String() string { - if t, ok := endpointTypes[e]; ok { - return t.Name - } - return strconv.Itoa(int(e)) -} - -func (a Endpoint) String() string { - if t, ok := endpointTypes[a.typ]; ok && t.Formatter != nil { - return t.Formatter(a.raw[:a.len]) - } - return fmt.Sprintf("%v:%v", a.typ, a.raw) -} - -// Flow represents the direction of traffic for a packet layer, as a source and destination Endpoint. -// Flows are usable as map keys. -type Flow struct { - typ EndpointType - slen, dlen int - src, dst [MaxEndpointSize]byte -} - -// FlowFromEndpoints creates a new flow by pasting together two endpoints. -// The endpoints must have the same EndpointType, or this function will return -// an error. -func FlowFromEndpoints(src, dst Endpoint) (_ Flow, err error) { - if src.typ != dst.typ { - err = fmt.Errorf("Mismatched endpoint types: %v->%v", src.typ, dst.typ) - return - } - return Flow{src.typ, src.len, dst.len, src.raw, dst.raw}, nil -} - -// FastHash provides a quick hashing function for a flow, useful if you'd -// like to split up flows by modulos or other load-balancing techniques. -// It uses a variant of Fowler-Noll-Vo hashing, and is guaranteed to collide -// with its reverse flow. IE: the flow A->B will have the same hash as the flow -// B->A. -// -// The output of FastHash is not guaranteed to remain the same through future -// code revisions, so should not be used to key values in persistent storage. -func (f Flow) FastHash() (h uint64) { - // This combination must be commutative. We don't use ^, since that would - // give the same hash for all A->A flows. - h = fnvHash(f.src[:f.slen]) + fnvHash(f.dst[:f.dlen]) - h ^= uint64(f.typ) - h *= fnvPrime - return -} - -// String returns a human-readable representation of this flow, in the form -// "Src->Dst" -func (f Flow) String() string { - s, d := f.Endpoints() - return fmt.Sprintf("%v->%v", s, d) -} - -// EndpointType returns the EndpointType for this Flow. -func (f Flow) EndpointType() EndpointType { - return f.typ -} - -// Endpoints returns the two Endpoints for this flow. -func (f Flow) Endpoints() (src, dst Endpoint) { - return Endpoint{f.typ, f.slen, f.src}, Endpoint{f.typ, f.dlen, f.dst} -} - -// Src returns the source Endpoint for this flow. -func (f Flow) Src() (src Endpoint) { - src, _ = f.Endpoints() - return -} - -// Dst returns the destination Endpoint for this flow. -func (f Flow) Dst() (dst Endpoint) { - _, dst = f.Endpoints() - return -} - -// Reverse returns a new flow with endpoints reversed. -func (f Flow) Reverse() Flow { - return Flow{f.typ, f.dlen, f.slen, f.dst, f.src} -} - -// NewFlow creates a new flow. -// -// src and dst must have length <= MaxEndpointSize, otherwise NewFlow will -// panic. -func NewFlow(t EndpointType, src, dst []byte) (f Flow) { - f.slen = len(src) - f.dlen = len(dst) - if f.slen > MaxEndpointSize || f.dlen > MaxEndpointSize { - panic("flow raw byte length greater than MaxEndpointSize") - } - f.typ = t - copy(f.src[:], src) - copy(f.dst[:], dst) - return -} - -// EndpointInvalid is an endpoint type used for invalid endpoints, IE endpoints -// that are specified incorrectly during creation. -var EndpointInvalid = RegisterEndpointType(0, EndpointTypeMetadata{Name: "invalid", Formatter: func(b []byte) string { - return fmt.Sprintf("%v", b) -}}) - -// InvalidEndpoint is a singleton Endpoint of type EndpointInvalid. -var InvalidEndpoint = NewEndpoint(EndpointInvalid, nil) - -// InvalidFlow is a singleton Flow of type EndpointInvalid. -var InvalidFlow = NewFlow(EndpointInvalid, nil, nil) diff --git a/vendor/github.com/google/gopacket/gc b/vendor/github.com/google/gopacket/gc deleted file mode 100644 index b1d8d2e1f67..00000000000 --- a/vendor/github.com/google/gopacket/gc +++ /dev/null @@ -1,288 +0,0 @@ -#!/bin/bash -# Copyright 2012 Google, Inc. All rights reserved. - -# This script provides a simple way to run benchmarks against previous code and -# keep a log of how benchmarks change over time. When used with the --benchmark -# flag, it runs benchmarks from the current code and from the last commit run -# with --benchmark, then stores the results in the git commit description. We -# rerun the old benchmarks along with the new ones, since there's no guarantee -# that git commits will happen on the same machine, so machine differences could -# cause wildly inaccurate results. -# -# If you're making changes to 'gopacket' which could cause performance changes, -# you may be requested to use this commit script to make sure your changes don't -# have large detrimental effects (or to show off how awesome your performance -# improvements are). -# -# If not run with the --benchmark flag, this script is still very useful... it -# makes sure all the correct go formatting, building, and testing work as -# expected. - -function Usage { - cat < - ---benchmark: Run benchmark comparisons against last benchmark'd commit ---root: Run tests that require root priviledges ---gen: Generate code for MACs/ports by pulling down external data - -Note, some 'git commit' flags are necessary, if all else fails, pass in -a -EOF - exit 1 -} - -BENCH="" -GEN="" -ROOT="" -while [ ! -z "$1" ]; do - case "$1" in - "--benchmark") - BENCH="$2" - shift - shift - ;; - "--gen") - GEN="yes" - shift - ;; - "--root") - ROOT="yes" - shift - ;; - "--help") - Usage - ;; - "-h") - Usage - ;; - "help") - Usage - ;; - *) - break - ;; - esac -done - -function Root { - if [ ! -z "$ROOT" ]; then - local exec="$1" - # Some folks (like me) keep source code in places inaccessible by root (like - # NFS), so to make sure things run smoothly we copy them to a /tmp location. - local tmpfile="$(mktemp -t gopacket_XXXXXXXX)" - echo "Running root test executable $exec as $tmpfile" - cp "$exec" "$tmpfile" - chmod a+x "$tmpfile" - shift - sudo "$tmpfile" "$@" - fi -} - -if [ "$#" -eq "0" ]; then - Usage -fi - -cd $(dirname $0) - -# Check for copyright notices. -for filename in $(find ./ -type f -name '*.go'); do - if ! head -n 1 "$filename" | grep -q Copyright; then - echo "File '$filename' may not have copyright notice" - exit 1 - fi -done - -set -e -set -x - -if [ ! -z "$ROOT" ]; then - echo "Running SUDO to get root priviledges for root tests" - sudo echo "have root" -fi - -if [ ! -z "$GEN" ]; then - pushd macs - go run gen.go | gofmt > valid_mac_prefixes.go - popd - pushd layers - go run gen.go | gofmt > iana_ports.go - go run gen2.go | gofmt > enums_generated.go - popd -fi - -# Make sure everything is formatted, compiles, and tests pass. -go fmt ./... -go test -i ./... 2>/dev/null >/dev/null || true -go test -go build -pushd examples/bytediff -go build -popd -if [ -f /usr/include/pcap.h ]; then - pushd pcap - go test ./... - go build ./... - go build pcap_tester.go - Root pcap_tester --mode=basic - Root pcap_tester --mode=filtered - Root pcap_tester --mode=timestamp || echo "You might not support timestamp sources" - popd - pushd examples/afpacket - go build - popd - pushd examples/pcapdump - go build - popd - pushd examples/arpscan - go build - popd - pushd examples/bidirectional - go build - popd - pushd examples/synscan - go build - popd - pushd examples/httpassembly - go build - popd - pushd examples/statsassembly - go build - popd -fi -pushd macs -go test ./... -gofmt -w gen.go -go build gen.go -popd -pushd tcpassembly -go test ./... -popd -pushd reassembly -go test ./... -popd -pushd layers -gofmt -w gen.go -go build gen.go -go test ./... -popd -pushd pcapgo -go test ./... -go build ./... -popd -if [ -f /usr/include/linux/if_packet.h ]; then - if grep -q TPACKET_V3 /usr/include/linux/if_packet.h; then - pushd afpacket - go build ./... - go test ./... - popd - fi -fi -if [ -f /usr/include/pfring.h ]; then - pushd pfring - go test ./... - go build ./... - popd - pushd examples/pfdump - go build - popd -fi -pushd ip4defrag -go test ./... -popd -pushd defrag -go test ./... -popd - -for travis_script in `ls .travis.*.sh`; do - ./$travis_script -done - -# Run our initial commit -git commit "$@" - -if [ -z "$BENCH" ]; then - set +x - echo "We're not benchmarking and we've committed... we're done!" - exit -fi - -### If we get here, we want to run benchmarks from current commit, and compare -### then to benchmarks from the last --benchmark commit. - -# Get our current branch. -BRANCH="$(git branch | grep '^*' | awk '{print $2}')" - -# File we're going to build our commit description in. -COMMIT_FILE="$(mktemp /tmp/tmp.XXXXXXXX)" - -# Add the word "BENCH" to the start of the git commit. -echo -n "BENCH " > $COMMIT_FILE - -# Get the current description... there must be an easier way. -git log -n 1 | grep '^ ' | sed 's/^ //' >> $COMMIT_FILE - -# Get the commit sha for the last benchmark commit -PREV=$(git log -n 1 --grep='BENCHMARK_MARKER_DO_NOT_CHANGE' | head -n 1 | awk '{print $2}') - -## Run current benchmarks - -cat >> $COMMIT_FILE <&1 | tee -a $COMMIT_FILE -pushd layers -go test --test.bench="$BENCH" 2>&1 | tee -a $COMMIT_FILE -popd -cat >> $COMMIT_FILE <&1 | tee -a $COMMIT_FILE -fi - - - -## Reset to last benchmark commit, run benchmarks - -git checkout $PREV - -cat >> $COMMIT_FILE <&1 | tee -a $COMMIT_FILE -pushd layers -go test --test.bench="$BENCH" 2>&1 | tee -a $COMMIT_FILE -popd -cat >> $COMMIT_FILE <&1 | tee -a $COMMIT_FILE -fi - - - -## Reset back to the most recent commit, edit the commit message by appending -## benchmark results. -git checkout $BRANCH -git commit --amend -F $COMMIT_FILE diff --git a/vendor/github.com/google/gopacket/layerclass.go b/vendor/github.com/google/gopacket/layerclass.go deleted file mode 100644 index 775cd098770..00000000000 --- a/vendor/github.com/google/gopacket/layerclass.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package gopacket - -// LayerClass is a set of LayerTypes, used for grabbing one of a number of -// different types from a packet. -type LayerClass interface { - // Contains returns true if the given layer type should be considered part - // of this layer class. - Contains(LayerType) bool - // LayerTypes returns the set of all layer types in this layer class. - // Note that this may not be a fast operation on all LayerClass - // implementations. - LayerTypes() []LayerType -} - -// Contains implements LayerClass. -func (l LayerType) Contains(a LayerType) bool { - return l == a -} - -// LayerTypes implements LayerClass. -func (l LayerType) LayerTypes() []LayerType { - return []LayerType{l} -} - -// LayerClassSlice implements a LayerClass with a slice. -type LayerClassSlice []bool - -// Contains returns true if the given layer type should be considered part -// of this layer class. -func (s LayerClassSlice) Contains(t LayerType) bool { - return int(t) < len(s) && s[t] -} - -// LayerTypes returns all layer types in this LayerClassSlice. -// Because of LayerClassSlice's implementation, this could be quite slow. -func (s LayerClassSlice) LayerTypes() (all []LayerType) { - for i := 0; i < len(s); i++ { - if s[i] { - all = append(all, LayerType(i)) - } - } - return -} - -// NewLayerClassSlice creates a new LayerClassSlice by creating a slice of -// size max(types) and setting slice[t] to true for each type t. Note, if -// you implement your own LayerType and give it a high value, this WILL create -// a very large slice. -func NewLayerClassSlice(types []LayerType) LayerClassSlice { - var max LayerType - for _, typ := range types { - if typ > max { - max = typ - } - } - t := make([]bool, int(max+1)) - for _, typ := range types { - t[typ] = true - } - return t -} - -// LayerClassMap implements a LayerClass with a map. -type LayerClassMap map[LayerType]bool - -// Contains returns true if the given layer type should be considered part -// of this layer class. -func (m LayerClassMap) Contains(t LayerType) bool { - return m[t] -} - -// LayerTypes returns all layer types in this LayerClassMap. -func (m LayerClassMap) LayerTypes() (all []LayerType) { - for t := range m { - all = append(all, t) - } - return -} - -// NewLayerClassMap creates a LayerClassMap and sets map[t] to true for each -// type in types. -func NewLayerClassMap(types []LayerType) LayerClassMap { - m := LayerClassMap{} - for _, typ := range types { - m[typ] = true - } - return m -} - -// NewLayerClass creates a LayerClass, attempting to be smart about which type -// it creates based on which types are passed in. -func NewLayerClass(types []LayerType) LayerClass { - for _, typ := range types { - if typ > maxLayerType { - // NewLayerClassSlice could create a very large object, so instead create - // a map. - return NewLayerClassMap(types) - } - } - return NewLayerClassSlice(types) -} diff --git a/vendor/github.com/google/gopacket/layers/.lint_blacklist b/vendor/github.com/google/gopacket/layers/.lint_blacklist deleted file mode 100644 index fded4f6650f..00000000000 --- a/vendor/github.com/google/gopacket/layers/.lint_blacklist +++ /dev/null @@ -1,39 +0,0 @@ -dot11.go -eap.go -endpoints.go -enums_generated.go -enums.go -ethernet.go -geneve.go -icmp4.go -icmp6.go -igmp.go -ip4.go -ip6.go -layertypes.go -linux_sll.go -llc.go -lldp.go -mpls.go -ndp.go -ntp.go -ospf.go -pflog.go -pppoe.go -prism.go -radiotap.go -rudp.go -sctp.go -sflow.go -tcp.go -tcpip.go -tls.go -tls_alert.go -tls_appdata.go -tls_cipherspec.go -tls_hanshake.go -tls_test.go -udp.go -udplite.go -usb.go -vrrp.go diff --git a/vendor/github.com/google/gopacket/layers/arp.go b/vendor/github.com/google/gopacket/layers/arp.go deleted file mode 100644 index 0775ac0b6d4..00000000000 --- a/vendor/github.com/google/gopacket/layers/arp.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - - "github.com/google/gopacket" -) - -// Potential values for ARP.Operation. -const ( - ARPRequest = 1 - ARPReply = 2 -) - -// ARP is a ARP packet header. -type ARP struct { - BaseLayer - AddrType LinkType - Protocol EthernetType - HwAddressSize uint8 - ProtAddressSize uint8 - Operation uint16 - SourceHwAddress []byte - SourceProtAddress []byte - DstHwAddress []byte - DstProtAddress []byte -} - -// LayerType returns LayerTypeARP -func (arp *ARP) LayerType() gopacket.LayerType { return LayerTypeARP } - -// DecodeFromBytes decodes the given bytes into this layer. -func (arp *ARP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 8 { - df.SetTruncated() - return fmt.Errorf("ARP length %d too short", len(data)) - } - arp.AddrType = LinkType(binary.BigEndian.Uint16(data[0:2])) - arp.Protocol = EthernetType(binary.BigEndian.Uint16(data[2:4])) - arp.HwAddressSize = data[4] - arp.ProtAddressSize = data[5] - arp.Operation = binary.BigEndian.Uint16(data[6:8]) - arpLength := 8 + 2*arp.HwAddressSize + 2*arp.ProtAddressSize - if len(data) < int(arpLength) { - df.SetTruncated() - return fmt.Errorf("ARP length %d too short, %d expected", len(data), arpLength) - } - arp.SourceHwAddress = data[8 : 8+arp.HwAddressSize] - arp.SourceProtAddress = data[8+arp.HwAddressSize : 8+arp.HwAddressSize+arp.ProtAddressSize] - arp.DstHwAddress = data[8+arp.HwAddressSize+arp.ProtAddressSize : 8+2*arp.HwAddressSize+arp.ProtAddressSize] - arp.DstProtAddress = data[8+2*arp.HwAddressSize+arp.ProtAddressSize : 8+2*arp.HwAddressSize+2*arp.ProtAddressSize] - - arp.Contents = data[:arpLength] - arp.Payload = data[arpLength:] - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (arp *ARP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - size := 8 + len(arp.SourceHwAddress) + len(arp.SourceProtAddress) + len(arp.DstHwAddress) + len(arp.DstProtAddress) - bytes, err := b.PrependBytes(size) - if err != nil { - return err - } - if opts.FixLengths { - if len(arp.SourceHwAddress) != len(arp.DstHwAddress) { - return errors.New("mismatched hardware address sizes") - } - arp.HwAddressSize = uint8(len(arp.SourceHwAddress)) - if len(arp.SourceProtAddress) != len(arp.DstProtAddress) { - return errors.New("mismatched prot address sizes") - } - arp.ProtAddressSize = uint8(len(arp.SourceProtAddress)) - } - binary.BigEndian.PutUint16(bytes, uint16(arp.AddrType)) - binary.BigEndian.PutUint16(bytes[2:], uint16(arp.Protocol)) - bytes[4] = arp.HwAddressSize - bytes[5] = arp.ProtAddressSize - binary.BigEndian.PutUint16(bytes[6:], arp.Operation) - start := 8 - for _, addr := range [][]byte{ - arp.SourceHwAddress, - arp.SourceProtAddress, - arp.DstHwAddress, - arp.DstProtAddress, - } { - copy(bytes[start:], addr) - start += len(addr) - } - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (arp *ARP) CanDecode() gopacket.LayerClass { - return LayerTypeARP -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (arp *ARP) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -func decodeARP(data []byte, p gopacket.PacketBuilder) error { - - arp := &ARP{} - return decodingLayerDecoder(arp, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/asf.go b/vendor/github.com/google/gopacket/layers/asf.go deleted file mode 100644 index d698bd0e53a..00000000000 --- a/vendor/github.com/google/gopacket/layers/asf.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2019 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be found -// in the LICENSE file in the root of the source tree. - -package layers - -// This file implements the ASF RMCP payload specified in section 3.2.2.3 of -// https://www.dmtf.org/sites/default/files/standards/documents/DSP0136.pdf - -import ( - "encoding/binary" - "fmt" - - "github.com/google/gopacket" -) - -const ( - // ASFRMCPEnterprise is the IANA-assigned Enterprise Number of the ASF-RMCP. - ASFRMCPEnterprise uint32 = 4542 -) - -// ASFDataIdentifier encapsulates fields used to uniquely identify the format of -// the data block. -// -// While the enterprise number is almost always 4542 (ASF-RMCP), we support -// registering layers using structs of this type as a key in case any users are -// using OEM-extensions. -type ASFDataIdentifier struct { - - // Enterprise is the IANA Enterprise Number associated with the entity that - // defines the message type. A list can be found at - // https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers. - // This can be thought of as the namespace for the message type. - Enterprise uint32 - - // Type is the message type, defined by the entity associated with the - // enterprise above. No pressure, but in the context of EN 4542, 1 byte is - // the difference between sending a ping and telling a machine to do an - // unconditional power down (0x80 and 0x12 respectively). - Type uint8 -} - -// LayerType returns the payload layer type corresponding to an ASF message -// type. -func (a ASFDataIdentifier) LayerType() gopacket.LayerType { - if lt := asfDataLayerTypes[a]; lt != 0 { - return lt - } - - // some layer types don't have a payload, e.g. ASF-RMCP Presence Ping. - return gopacket.LayerTypePayload -} - -// RegisterASFLayerType allows specifying that the data block of ASF packets -// with a given enterprise number and type should be processed by a given layer -// type. This overrides any existing registrations, including defaults. -func RegisterASFLayerType(a ASFDataIdentifier, l gopacket.LayerType) { - asfDataLayerTypes[a] = l -} - -var ( - // ASFDataIdentifierPresencePong is the message type of the response to a - // Presence Ping message. It indicates the sender is ASF-RMCP-aware. - ASFDataIdentifierPresencePong = ASFDataIdentifier{ - Enterprise: ASFRMCPEnterprise, - Type: 0x40, - } - - // ASFDataIdentifierPresencePing is a message type sent to a managed client - // to solicit a Presence Pong response. Clients may ignore this if the RMCP - // version is unsupported. Sending this message with a sequence number <255 - // is the recommended way of finding out whether an implementation sends - // RMCP ACKs (e.g. iDRAC does, Super Micro does not). - // - // Systems implementing IPMI must respond to this ping to conform to the - // spec, so it is a good substitute for an ICMP ping. - ASFDataIdentifierPresencePing = ASFDataIdentifier{ - Enterprise: ASFRMCPEnterprise, - Type: 0x80, - } - - // asfDataLayerTypes is used to find the next layer for a given ASF header. - asfDataLayerTypes = map[ASFDataIdentifier]gopacket.LayerType{ - ASFDataIdentifierPresencePong: LayerTypeASFPresencePong, - } -) - -// ASF defines ASF's generic RMCP message Data block format. See section -// 3.2.2.3. -type ASF struct { - BaseLayer - ASFDataIdentifier - - // Tag is used to match request/response pairs. The tag of a response is set - // to that of the message it is responding to. If a message is - // unidirectional, i.e. not part of a request/response pair, this is set to - // 255. - Tag uint8 - - // 1 byte reserved, set to 0x00. - - // Length is the length of this layer's payload in bytes. - Length uint8 -} - -// LayerType returns LayerTypeASF. It partially satisfies Layer and -// SerializableLayer. -func (*ASF) LayerType() gopacket.LayerType { - return LayerTypeASF -} - -// CanDecode returns LayerTypeASF. It partially satisfies DecodingLayer. -func (a *ASF) CanDecode() gopacket.LayerClass { - return a.LayerType() -} - -// DecodeFromBytes makes the layer represent the provided bytes. It partially -// satisfies DecodingLayer. -func (a *ASF) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 8 { - df.SetTruncated() - return fmt.Errorf("invalid ASF data header, length %v less than 8", - len(data)) - } - - a.BaseLayer.Contents = data[:8] - a.BaseLayer.Payload = data[8:] - - a.Enterprise = binary.BigEndian.Uint32(data[:4]) - a.Type = uint8(data[4]) - a.Tag = uint8(data[5]) - // 1 byte reserved - a.Length = uint8(data[7]) - return nil -} - -// NextLayerType returns the layer type corresponding to the message type of -// this ASF data layer. This partially satisfies DecodingLayer. -func (a *ASF) NextLayerType() gopacket.LayerType { - return a.ASFDataIdentifier.LayerType() -} - -// SerializeTo writes the serialized fom of this layer into the SerializeBuffer, -// partially satisfying SerializableLayer. -func (a *ASF) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - payload := b.Bytes() - bytes, err := b.PrependBytes(8) - if err != nil { - return err - } - binary.BigEndian.PutUint32(bytes[:4], a.Enterprise) - bytes[4] = uint8(a.Type) - bytes[5] = a.Tag - bytes[6] = 0x00 - if opts.FixLengths { - a.Length = uint8(len(payload)) - } - bytes[7] = a.Length - return nil -} - -// decodeASF decodes the byte slice into an RMCP-ASF data struct. -func decodeASF(data []byte, p gopacket.PacketBuilder) error { - return decodingLayerDecoder(&ASF{}, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/asf_presencepong.go b/vendor/github.com/google/gopacket/layers/asf_presencepong.go deleted file mode 100644 index e9a8baf16c5..00000000000 --- a/vendor/github.com/google/gopacket/layers/asf_presencepong.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2019 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be found -// in the LICENSE file in the root of the source tree. - -package layers - -// This file implements the RMCP ASF Presence Pong message, specified in section -// 3.2.4.3 of -// https://www.dmtf.org/sites/default/files/standards/documents/DSP0136.pdf. It -// also contains non-competing elements from IPMI v2.0, specified in section -// 13.2.4 of -// https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/ipmi-intelligent-platform-mgt-interface-spec-2nd-gen-v2-0-spec-update.pdf. - -import ( - "encoding/binary" - "fmt" - - "github.com/google/gopacket" -) - -type ( - // ASFEntity is the type of individual entities that a Presence Pong - // response can indicate support of. The entities currently implemented by - // the spec are IPMI and ASFv1. - ASFEntity uint8 - - // ASFInteraction is the type of individual interactions that a Presence - // Pong response can indicate support for. The interactions currently - // implemented by the spec are RMCP security extensions. Although not - // specified, IPMI uses this field to indicate support for DASH, which is - // supported as well. - ASFInteraction uint8 -) - -const ( - // ASFDCMIEnterprise is the IANA-assigned Enterprise Number of the Data - // Center Manageability Interface Forum. The Presence Pong response's - // Enterprise field being set to this value indicates support for DCMI. The - // DCMI spec regards the OEM field as reserved, so these should be null. - ASFDCMIEnterprise uint32 = 36465 - - // ASFPresencePongEntityIPMI ANDs with Presence Pong's supported entities - // field if the managed system supports IPMI. - ASFPresencePongEntityIPMI ASFEntity = 1 << 7 - - // ASFPresencePongEntityASFv1 ANDs with Presence Pong's supported entities - // field if the managed system supports ASF v1.0. - ASFPresencePongEntityASFv1 ASFEntity = 1 - - // ASFPresencePongInteractionSecurityExtensions ANDs with Presence Pong's - // supported interactions field if the managed system supports RMCP v2.0 - // security extensions. See section 3.2.3. - ASFPresencePongInteractionSecurityExtensions ASFInteraction = 1 << 7 - - // ASFPresencePongInteractionDASH ANDs with Presence Pong's supported - // interactions field if the managed system supports DMTF DASH. See - // https://www.dmtf.org/standards/dash. - ASFPresencePongInteractionDASH ASFInteraction = 1 << 5 -) - -// ASFPresencePong defines the structure of a Presence Pong message's payload. -// See section 3.2.4.3. -type ASFPresencePong struct { - BaseLayer - - // Enterprise is the IANA Enterprise Number of an entity that has defined - // OEM-specific capabilities for the managed client. If no such capabilities - // exist, this is set to ASF's IANA Enterprise Number. - Enterprise uint32 - - // OEM identifies OEM-specific capabilities. Its structure is defined by the - // OEM. This is set to 0s if no OEM-specific capabilities exist. This - // implementation does not change byte order from the wire for this field. - OEM [4]byte - - // We break out entities and interactions into separate booleans as - // discovery is the entire point of this type of message, so we assume they - // are accessed. It also makes gopacket's default layer printing more - // useful. - - // IPMI is true if IPMI is supported by the managed system. There is no - // explicit version in the specification, however given the dates, this is - // assumed to be IPMI v1.0. Support for IPMI is contained in the "supported - // entities" field of the presence pong payload. - IPMI bool - - // ASFv1 indicates support for ASF v1.0. This seems somewhat redundant as - // ASF must be supported in order to receive a response. This is contained - // in the "supported entities" field of the presence pong payload. - ASFv1 bool - - // SecurityExtensions indicates support for RMCP Security Extensions, - // specified in ASF v2.0. This will always be false for v1.x - // implementations. This is contained in the "supported interactions" field - // of the presence pong payload. This field is defined in ASF v1.0, but has - // no useful value. - SecurityExtensions bool - - // DASH is true if DMTF DASH is supported. This is not specified in ASF - // v2.0, but in IPMI v2.0, however the former does not preclude it, so we - // support it. - DASH bool - - // 6 bytes reserved after the entities and interactions fields, set to 0s. -} - -// SupportsDCMI returns whether the Presence Pong message indicates support for -// the Data Center Management Interface, which is an extension of IPMI v2.0. -func (a *ASFPresencePong) SupportsDCMI() bool { - return a.Enterprise == ASFDCMIEnterprise && a.IPMI && a.ASFv1 -} - -// LayerType returns LayerTypeASFPresencePong. It partially satisfies Layer and -// SerializableLayer. -func (*ASFPresencePong) LayerType() gopacket.LayerType { - return LayerTypeASFPresencePong -} - -// CanDecode returns LayerTypeASFPresencePong. It partially satisfies -// DecodingLayer. -func (a *ASFPresencePong) CanDecode() gopacket.LayerClass { - return a.LayerType() -} - -// DecodeFromBytes makes the layer represent the provided bytes. It partially -// satisfies DecodingLayer. -func (a *ASFPresencePong) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 16 { - df.SetTruncated() - return fmt.Errorf("invalid ASF presence pong payload, length %v less than 16", - len(data)) - } - - a.BaseLayer.Contents = data[:16] - a.BaseLayer.Payload = data[16:] - - a.Enterprise = binary.BigEndian.Uint32(data[:4]) - copy(a.OEM[:], data[4:8]) // N.B. no byte order change - a.IPMI = data[8]&uint8(ASFPresencePongEntityIPMI) != 0 - a.ASFv1 = data[8]&uint8(ASFPresencePongEntityASFv1) != 0 - a.SecurityExtensions = data[9]&uint8(ASFPresencePongInteractionSecurityExtensions) != 0 - a.DASH = data[9]&uint8(ASFPresencePongInteractionDASH) != 0 - // ignore remaining 6 bytes; should be set to 0s - return nil -} - -// NextLayerType returns LayerTypePayload, as there are no further layers to -// decode. This partially satisfies DecodingLayer. -func (a *ASFPresencePong) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -// SerializeTo writes the serialized fom of this layer into the SerializeBuffer, -// partially satisfying SerializableLayer. -func (a *ASFPresencePong) SerializeTo(b gopacket.SerializeBuffer, _ gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(16) - if err != nil { - return err - } - - binary.BigEndian.PutUint32(bytes[:4], a.Enterprise) - - copy(bytes[4:8], a.OEM[:]) - - bytes[8] = 0 - if a.IPMI { - bytes[8] |= uint8(ASFPresencePongEntityIPMI) - } - if a.ASFv1 { - bytes[8] |= uint8(ASFPresencePongEntityASFv1) - } - - bytes[9] = 0 - if a.SecurityExtensions { - bytes[9] |= uint8(ASFPresencePongInteractionSecurityExtensions) - } - if a.DASH { - bytes[9] |= uint8(ASFPresencePongInteractionDASH) - } - - // zero-out remaining 6 bytes - for i := 10; i < len(bytes); i++ { - bytes[i] = 0x00 - } - - return nil -} - -// decodeASFPresencePong decodes the byte slice into an RMCP-ASF Presence Pong -// struct. -func decodeASFPresencePong(data []byte, p gopacket.PacketBuilder) error { - return decodingLayerDecoder(&ASFPresencePong{}, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/base.go b/vendor/github.com/google/gopacket/layers/base.go deleted file mode 100644 index cd59b467861..00000000000 --- a/vendor/github.com/google/gopacket/layers/base.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "github.com/google/gopacket" -) - -// BaseLayer is a convenience struct which implements the LayerData and -// LayerPayload functions of the Layer interface. -type BaseLayer struct { - // Contents is the set of bytes that make up this layer. IE: for an - // Ethernet packet, this would be the set of bytes making up the - // Ethernet frame. - Contents []byte - // Payload is the set of bytes contained by (but not part of) this - // Layer. Again, to take Ethernet as an example, this would be the - // set of bytes encapsulated by the Ethernet protocol. - Payload []byte -} - -// LayerContents returns the bytes of the packet layer. -func (b *BaseLayer) LayerContents() []byte { return b.Contents } - -// LayerPayload returns the bytes contained within the packet layer. -func (b *BaseLayer) LayerPayload() []byte { return b.Payload } - -type layerDecodingLayer interface { - gopacket.Layer - DecodeFromBytes([]byte, gopacket.DecodeFeedback) error - NextLayerType() gopacket.LayerType -} - -func decodingLayerDecoder(d layerDecodingLayer, data []byte, p gopacket.PacketBuilder) error { - err := d.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(d) - next := d.NextLayerType() - if next == gopacket.LayerTypeZero { - return nil - } - return p.NextDecoder(next) -} - -// hacky way to zero out memory... there must be a better way? -var lotsOfZeros [1024]byte diff --git a/vendor/github.com/google/gopacket/layers/bfd.go b/vendor/github.com/google/gopacket/layers/bfd.go deleted file mode 100644 index 43030fb6a55..00000000000 --- a/vendor/github.com/google/gopacket/layers/bfd.go +++ /dev/null @@ -1,481 +0,0 @@ -// Copyright 2017 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. -// - -package layers - -import ( - "encoding/binary" - "errors" - - "github.com/google/gopacket" -) - -// BFD Control Packet Format -// ------------------------- -// The current version of BFD's RFC (RFC 5880) contains the following -// diagram for the BFD Control packet format: -// -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// |Vers | Diag |Sta|P|F|C|A|D|M| Detect Mult | Length | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | My Discriminator | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Your Discriminator | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Desired Min TX Interval | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Required Min RX Interval | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Required Min Echo RX Interval | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// -// An optional Authentication Section MAY be present: -// -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Auth Type | Auth Len | Authentication Data... | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// -// -// Simple Password Authentication Section Format -// --------------------------------------------- -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Auth Type | Auth Len | Auth Key ID | Password... | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | ... | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// -// -// Keyed MD5 and Meticulous Keyed MD5 Authentication Section Format -// ---------------------------------------------------------------- -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Auth Type | Auth Len | Auth Key ID | Reserved | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Sequence Number | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Auth Key/Digest... | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | ... | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// -// -// Keyed SHA1 and Meticulous Keyed SHA1 Authentication Section Format -// ------------------------------------------------------------------ -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Auth Type | Auth Len | Auth Key ID | Reserved | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Sequence Number | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Auth Key/Hash... | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | ... | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// -// From https://tools.ietf.org/rfc/rfc5880.txt -const bfdMinimumRecordSizeInBytes int = 24 - -// BFDVersion represents the version as decoded from the BFD control message -type BFDVersion uint8 - -// BFDDiagnostic represents diagnostic infomation about a BFD session -type BFDDiagnostic uint8 - -// constants that define BFDDiagnostic flags -const ( - BFDDiagnosticNone BFDDiagnostic = 0 // No Diagnostic - BFDDiagnosticTimeExpired BFDDiagnostic = 1 // Control Detection Time Expired - BFDDiagnosticEchoFailed BFDDiagnostic = 2 // Echo Function Failed - BFDDiagnosticNeighborSignalDown BFDDiagnostic = 3 // Neighbor Signaled Session Down - BFDDiagnosticForwardPlaneReset BFDDiagnostic = 4 // Forwarding Plane Reset - BFDDiagnosticPathDown BFDDiagnostic = 5 // Path Down - BFDDiagnosticConcatPathDown BFDDiagnostic = 6 // Concatenated Path Down - BFDDiagnosticAdminDown BFDDiagnostic = 7 // Administratively Down - BFDDiagnosticRevConcatPathDown BFDDiagnostic = 8 // Reverse Concatenated Path Dow -) - -// String returns a string version of BFDDiagnostic -func (bd BFDDiagnostic) String() string { - switch bd { - default: - return "Unknown" - case BFDDiagnosticNone: - return "None" - case BFDDiagnosticTimeExpired: - return "Control Detection Time Expired" - case BFDDiagnosticEchoFailed: - return "Echo Function Failed" - case BFDDiagnosticNeighborSignalDown: - return "Neighbor Signaled Session Down" - case BFDDiagnosticForwardPlaneReset: - return "Forwarding Plane Reset" - case BFDDiagnosticPathDown: - return "Path Down" - case BFDDiagnosticConcatPathDown: - return "Concatenated Path Down" - case BFDDiagnosticAdminDown: - return "Administratively Down" - case BFDDiagnosticRevConcatPathDown: - return "Reverse Concatenated Path Down" - } -} - -// BFDState represents the state of a BFD session -type BFDState uint8 - -// constants that define BFDState -const ( - BFDStateAdminDown BFDState = 0 - BFDStateDown BFDState = 1 - BFDStateInit BFDState = 2 - BFDStateUp BFDState = 3 -) - -// String returns a string version of BFDState -func (s BFDState) String() string { - switch s { - default: - return "Unknown" - case BFDStateAdminDown: - return "Admin Down" - case BFDStateDown: - return "Down" - case BFDStateInit: - return "Init" - case BFDStateUp: - return "Up" - } -} - -// BFDDetectMultiplier represents the negotiated transmit interval, -// multiplied by this value, provides the Detection Time for the -// receiving system in Asynchronous mode. -type BFDDetectMultiplier uint8 - -// BFDDiscriminator is a unique, nonzero discriminator value used -// to demultiplex multiple BFD sessions between the same pair of systems. -type BFDDiscriminator uint32 - -// BFDTimeInterval represents a time interval in microseconds -type BFDTimeInterval uint32 - -// BFDAuthType represents the authentication used in the BFD session -type BFDAuthType uint8 - -// constants that define the BFDAuthType -const ( - BFDAuthTypeNone BFDAuthType = 0 // No Auth - BFDAuthTypePassword BFDAuthType = 1 // Simple Password - BFDAuthTypeKeyedMD5 BFDAuthType = 2 // Keyed MD5 - BFDAuthTypeMeticulousKeyedMD5 BFDAuthType = 3 // Meticulous Keyed MD5 - BFDAuthTypeKeyedSHA1 BFDAuthType = 4 // Keyed SHA1 - BFDAuthTypeMeticulousKeyedSHA1 BFDAuthType = 5 // Meticulous Keyed SHA1 -) - -// String returns a string version of BFDAuthType -func (at BFDAuthType) String() string { - switch at { - default: - return "Unknown" - case BFDAuthTypeNone: - return "No Authentication" - case BFDAuthTypePassword: - return "Simple Password" - case BFDAuthTypeKeyedMD5: - return "Keyed MD5" - case BFDAuthTypeMeticulousKeyedMD5: - return "Meticulous Keyed MD5" - case BFDAuthTypeKeyedSHA1: - return "Keyed SHA1" - case BFDAuthTypeMeticulousKeyedSHA1: - return "Meticulous Keyed SHA1" - } -} - -// BFDAuthKeyID represents the authentication key ID in use for -// this packet. This allows multiple keys to be active simultaneously. -type BFDAuthKeyID uint8 - -// BFDAuthSequenceNumber represents the sequence number for this packet. -// For Keyed Authentication, this value is incremented occasionally. For -// Meticulous Keyed Authentication, this value is incremented for each -// successive packet transmitted for a session. This provides protection -// against replay attacks. -type BFDAuthSequenceNumber uint32 - -// BFDAuthData represents the authentication key or digest -type BFDAuthData []byte - -// BFDAuthHeader represents authentication data used in the BFD session -type BFDAuthHeader struct { - AuthType BFDAuthType - KeyID BFDAuthKeyID - SequenceNumber BFDAuthSequenceNumber - Data BFDAuthData -} - -// Length returns the data length of the BFDAuthHeader based on the -// authentication type -func (h *BFDAuthHeader) Length() int { - switch h.AuthType { - case BFDAuthTypePassword: - return 3 + len(h.Data) - case BFDAuthTypeKeyedMD5, BFDAuthTypeMeticulousKeyedMD5: - return 8 + len(h.Data) - case BFDAuthTypeKeyedSHA1, BFDAuthTypeMeticulousKeyedSHA1: - return 8 + len(h.Data) - default: - return 0 - } -} - -// BFD represents a BFD control message packet whose payload contains -// the control information required to for a BFD session. -// -// References -// ---------- -// -// Wikipedia's BFD entry: -// https://en.wikipedia.org/wiki/Bidirectional_Forwarding_Detection -// This is the best place to get an overview of BFD. -// -// RFC 5880 "Bidirectional Forwarding Detection (BFD)" (2010) -// https://tools.ietf.org/html/rfc5880 -// This is the original BFD specification. -// -// RFC 5881 "Bidirectional Forwarding Detection (BFD) for IPv4 and IPv6 (Single Hop)" (2010) -// https://tools.ietf.org/html/rfc5881 -// Describes the use of the Bidirectional Forwarding Detection (BFD) -// protocol over IPv4 and IPv6 for single IP hops. -type BFD struct { - BaseLayer // Stores the packet bytes and payload bytes. - - Version BFDVersion // Version of the BFD protocol. - Diagnostic BFDDiagnostic // Diagnostic code for last state change - State BFDState // Current state - Poll bool // Requesting verification - Final bool // Responding to a received BFD Control packet that had the Poll (P) bit set. - ControlPlaneIndependent bool // BFD implementation does not share fate with its control plane - AuthPresent bool // Authentication Section is present and the session is to be authenticated - Demand bool // Demand mode is active - Multipoint bool // For future point-to-multipoint extensions. Must always be zero - DetectMultiplier BFDDetectMultiplier // Detection time multiplier - MyDiscriminator BFDDiscriminator // A unique, nonzero discriminator value - YourDiscriminator BFDDiscriminator // discriminator received from the remote system. - DesiredMinTxInterval BFDTimeInterval // Minimum interval, in microseconds, the local system would like to use when transmitting BFD Control packets - RequiredMinRxInterval BFDTimeInterval // Minimum interval, in microseconds, between received BFD Control packets that this system is capable of supporting - RequiredMinEchoRxInterval BFDTimeInterval // Minimum interval, in microseconds, between received BFD Echo packets that this system is capable of supporting - AuthHeader *BFDAuthHeader // Authentication data, variable length. -} - -// Length returns the data length of a BFD Control message which -// changes based on the presence and type of authentication -// contained in the message -func (d *BFD) Length() int { - if d.AuthPresent && (d.AuthHeader != nil) { - return bfdMinimumRecordSizeInBytes + d.AuthHeader.Length() - } - - return bfdMinimumRecordSizeInBytes -} - -// LayerType returns the layer type of the BFD object, which is LayerTypeBFD. -func (d *BFD) LayerType() gopacket.LayerType { - return LayerTypeBFD -} - -// decodeBFD analyses a byte slice and attempts to decode it as a BFD -// control packet -// -// If it succeeds, it loads p with information about the packet and returns nil. -// If it fails, it returns an error (non nil). -// -// This function is employed in layertypes.go to register the BFD layer. -func decodeBFD(data []byte, p gopacket.PacketBuilder) error { - - // Attempt to decode the byte slice. - d := &BFD{} - err := d.DecodeFromBytes(data, p) - if err != nil { - return err - } - - // If the decoding worked, add the layer to the packet and set it - // as the application layer too, if there isn't already one. - p.AddLayer(d) - p.SetApplicationLayer(d) - - return nil -} - -// DecodeFromBytes analyses a byte slice and attempts to decode it as a BFD -// control packet. -// -// Upon succeeds, it loads the BFD object with information about the packet -// and returns nil. -// Upon failure, it returns an error (non nil). -func (d *BFD) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - - // If the data block is too short to be a BFD record, then return an error. - if len(data) < bfdMinimumRecordSizeInBytes { - df.SetTruncated() - return errors.New("BFD packet too short") - } - - pLen := uint8(data[3]) - if len(data) != int(pLen) { - return errors.New("BFD packet length does not match") - } - - // BFD type embeds type BaseLayer which contains two fields: - // Contents is supposed to contain the bytes of the data at this level. - // Payload is supposed to contain the payload of this level. - // Here we set the baselayer to be the bytes of the BFD record. - d.BaseLayer = BaseLayer{Contents: data[:len(data)]} - - // Extract the fields from the block of bytes. - // To make sense of this, refer to the packet diagram - // above and the section on endian conventions. - - // The first few fields are all packed into the first 32 bits. Unpack them. - d.Version = BFDVersion(((data[0] & 0xE0) >> 5)) - d.Diagnostic = BFDDiagnostic(data[0] & 0x1F) - data = data[1:] - - d.State = BFDState((data[0] & 0xC0) >> 6) - d.Poll = data[0]&0x20 != 0 - d.Final = data[0]&0x10 != 0 - d.ControlPlaneIndependent = data[0]&0x08 != 0 - d.AuthPresent = data[0]&0x04 != 0 - d.Demand = data[0]&0x02 != 0 - d.Multipoint = data[0]&0x01 != 0 - data = data[1:] - - data, d.DetectMultiplier = data[1:], BFDDetectMultiplier(data[0]) - data, _ = data[1:], uint8(data[0]) // Consume length - - // The remaining fields can just be copied in big endian order. - data, d.MyDiscriminator = data[4:], BFDDiscriminator(binary.BigEndian.Uint32(data[:4])) - data, d.YourDiscriminator = data[4:], BFDDiscriminator(binary.BigEndian.Uint32(data[:4])) - data, d.DesiredMinTxInterval = data[4:], BFDTimeInterval(binary.BigEndian.Uint32(data[:4])) - data, d.RequiredMinRxInterval = data[4:], BFDTimeInterval(binary.BigEndian.Uint32(data[:4])) - data, d.RequiredMinEchoRxInterval = data[4:], BFDTimeInterval(binary.BigEndian.Uint32(data[:4])) - - if d.AuthPresent && (len(data) > 2) { - d.AuthHeader = &BFDAuthHeader{} - data, d.AuthHeader.AuthType = data[1:], BFDAuthType(data[0]) - data, _ = data[1:], uint8(data[0]) // Consume length - data, d.AuthHeader.KeyID = data[1:], BFDAuthKeyID(data[0]) - - switch d.AuthHeader.AuthType { - case BFDAuthTypePassword: - d.AuthHeader.Data = BFDAuthData(data) - case BFDAuthTypeKeyedMD5, BFDAuthTypeMeticulousKeyedMD5: - // Skipped reserved byte - data, d.AuthHeader.SequenceNumber = data[5:], BFDAuthSequenceNumber(binary.BigEndian.Uint32(data[1:5])) - d.AuthHeader.Data = BFDAuthData(data) - case BFDAuthTypeKeyedSHA1, BFDAuthTypeMeticulousKeyedSHA1: - // Skipped reserved byte - data, d.AuthHeader.SequenceNumber = data[5:], BFDAuthSequenceNumber(binary.BigEndian.Uint32(data[1:5])) - d.AuthHeader.Data = BFDAuthData(data) - } - } - - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (d *BFD) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - data, err := b.PrependBytes(bfdMinimumRecordSizeInBytes) - if err != nil { - return err - } - - // Pack the first few fields into the first 32 bits. - data[0] = byte(byte(d.Version<<5) | byte(d.Diagnostic)) - h := uint8(0) - h |= (uint8(d.State) << 6) - h |= (uint8(bool2uint8(d.Poll)) << 5) - h |= (uint8(bool2uint8(d.Final)) << 4) - h |= (uint8(bool2uint8(d.ControlPlaneIndependent)) << 3) - h |= (uint8(bool2uint8(d.AuthPresent)) << 2) - h |= (uint8(bool2uint8(d.Demand)) << 1) - h |= uint8(bool2uint8(d.Multipoint)) - data[1] = byte(h) - data[2] = byte(d.DetectMultiplier) - data[3] = byte(d.Length()) - - // The remaining fields can just be copied in big endian order. - binary.BigEndian.PutUint32(data[4:], uint32(d.MyDiscriminator)) - binary.BigEndian.PutUint32(data[8:], uint32(d.YourDiscriminator)) - binary.BigEndian.PutUint32(data[12:], uint32(d.DesiredMinTxInterval)) - binary.BigEndian.PutUint32(data[16:], uint32(d.RequiredMinRxInterval)) - binary.BigEndian.PutUint32(data[20:], uint32(d.RequiredMinEchoRxInterval)) - - if d.AuthPresent && (d.AuthHeader != nil) { - auth, err := b.AppendBytes(int(d.AuthHeader.Length())) - if err != nil { - return err - } - - auth[0] = byte(d.AuthHeader.AuthType) - auth[1] = byte(d.AuthHeader.Length()) - auth[2] = byte(d.AuthHeader.KeyID) - - switch d.AuthHeader.AuthType { - case BFDAuthTypePassword: - copy(auth[3:], d.AuthHeader.Data) - case BFDAuthTypeKeyedMD5, BFDAuthTypeMeticulousKeyedMD5: - auth[3] = byte(0) - binary.BigEndian.PutUint32(auth[4:], uint32(d.AuthHeader.SequenceNumber)) - copy(auth[8:], d.AuthHeader.Data) - case BFDAuthTypeKeyedSHA1, BFDAuthTypeMeticulousKeyedSHA1: - auth[3] = byte(0) - binary.BigEndian.PutUint32(auth[4:], uint32(d.AuthHeader.SequenceNumber)) - copy(auth[8:], d.AuthHeader.Data) - } - } - - return nil -} - -// CanDecode returns a set of layers that BFD objects can decode. -// As BFD objects can only decide the BFD layer, we can return just that layer. -// Apparently a single layer type implements LayerClass. -func (d *BFD) CanDecode() gopacket.LayerClass { - return LayerTypeBFD -} - -// NextLayerType specifies the next layer that GoPacket should attempt to -// analyse after this (BFD) layer. As BFD packets do not contain any payload -// bytes, there are no further layers to analyse. -func (d *BFD) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypeZero -} - -// Payload returns an empty byte slice as BFD packets do not carry a payload -func (d *BFD) Payload() []byte { - return nil -} - -// bool2uint8 converts a bool to uint8 -func bool2uint8(b bool) uint8 { - if b { - return 1 - } - return 0 -} diff --git a/vendor/github.com/google/gopacket/layers/cdp.go b/vendor/github.com/google/gopacket/layers/cdp.go deleted file mode 100644 index 095f9261250..00000000000 --- a/vendor/github.com/google/gopacket/layers/cdp.go +++ /dev/null @@ -1,659 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -// Enum types courtesy of... -// http://search.cpan.org/~mchapman/Net-CDP-0.09/lib/Net/CDP.pm -// https://code.google.com/p/ladvd/ -// http://anonsvn.wireshark.org/viewvc/releases/wireshark-1.8.6/epan/dissectors/packet-cdp.c - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "net" - - "github.com/google/gopacket" -) - -// CDPTLVType is the type of each TLV value in a CiscoDiscovery packet. -type CDPTLVType uint16 - -// CDPTLVType values. -const ( - CDPTLVDevID CDPTLVType = 0x0001 - CDPTLVAddress CDPTLVType = 0x0002 - CDPTLVPortID CDPTLVType = 0x0003 - CDPTLVCapabilities CDPTLVType = 0x0004 - CDPTLVVersion CDPTLVType = 0x0005 - CDPTLVPlatform CDPTLVType = 0x0006 - CDPTLVIPPrefix CDPTLVType = 0x0007 - CDPTLVHello CDPTLVType = 0x0008 - CDPTLVVTPDomain CDPTLVType = 0x0009 - CDPTLVNativeVLAN CDPTLVType = 0x000a - CDPTLVFullDuplex CDPTLVType = 0x000b - CDPTLVVLANReply CDPTLVType = 0x000e - CDPTLVVLANQuery CDPTLVType = 0x000f - CDPTLVPower CDPTLVType = 0x0010 - CDPTLVMTU CDPTLVType = 0x0011 - CDPTLVExtendedTrust CDPTLVType = 0x0012 - CDPTLVUntrustedCOS CDPTLVType = 0x0013 - CDPTLVSysName CDPTLVType = 0x0014 - CDPTLVSysOID CDPTLVType = 0x0015 - CDPTLVMgmtAddresses CDPTLVType = 0x0016 - CDPTLVLocation CDPTLVType = 0x0017 - CDPTLVExternalPortID CDPTLVType = 0x0018 - CDPTLVPowerRequested CDPTLVType = 0x0019 - CDPTLVPowerAvailable CDPTLVType = 0x001a - CDPTLVPortUnidirectional CDPTLVType = 0x001b - CDPTLVEnergyWise CDPTLVType = 0x001d - CDPTLVSparePairPOE CDPTLVType = 0x001f -) - -// CiscoDiscoveryValue is a TLV value inside a CiscoDiscovery packet layer. -type CiscoDiscoveryValue struct { - Type CDPTLVType - Length uint16 - Value []byte -} - -// CiscoDiscovery is a packet layer containing the Cisco Discovery Protocol. -// See http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm#31885 -type CiscoDiscovery struct { - BaseLayer - Version byte - TTL byte - Checksum uint16 - Values []CiscoDiscoveryValue -} - -// CDPCapability is the set of capabilities advertised by a CDP device. -type CDPCapability uint32 - -// CDPCapability values. -const ( - CDPCapMaskRouter CDPCapability = 0x0001 - CDPCapMaskTBBridge CDPCapability = 0x0002 - CDPCapMaskSPBridge CDPCapability = 0x0004 - CDPCapMaskSwitch CDPCapability = 0x0008 - CDPCapMaskHost CDPCapability = 0x0010 - CDPCapMaskIGMPFilter CDPCapability = 0x0020 - CDPCapMaskRepeater CDPCapability = 0x0040 - CDPCapMaskPhone CDPCapability = 0x0080 - CDPCapMaskRemote CDPCapability = 0x0100 -) - -// CDPCapabilities represents the capabilities of a device -type CDPCapabilities struct { - L3Router bool - TBBridge bool - SPBridge bool - L2Switch bool - IsHost bool - IGMPFilter bool - L1Repeater bool - IsPhone bool - RemotelyManaged bool -} - -// CDP Power-over-Ethernet values. -const ( - CDPPoEFourWire byte = 0x01 - CDPPoEPDArch byte = 0x02 - CDPPoEPDRequest byte = 0x04 - CDPPoEPSE byte = 0x08 -) - -// CDPSparePairPoE provides information on PoE. -type CDPSparePairPoE struct { - PSEFourWire bool // Supported / Not supported - PDArchShared bool // Shared / Independent - PDRequestOn bool // On / Off - PSEOn bool // On / Off -} - -// CDPVLANDialogue encapsulates a VLAN Query/Reply -type CDPVLANDialogue struct { - ID uint8 - VLAN uint16 -} - -// CDPPowerDialogue encapsulates a Power Query/Reply -type CDPPowerDialogue struct { - ID uint16 - MgmtID uint16 - Values []uint32 -} - -// CDPLocation provides location information for a CDP device. -type CDPLocation struct { - Type uint8 // Undocumented - Location string -} - -// CDPHello is a Cisco Hello message (undocumented, hence the "Unknown" fields) -type CDPHello struct { - OUI []byte - ProtocolID uint16 - ClusterMaster net.IP - Unknown1 net.IP - Version byte - SubVersion byte - Status byte - Unknown2 byte - ClusterCommander net.HardwareAddr - SwitchMAC net.HardwareAddr - Unknown3 byte - ManagementVLAN uint16 -} - -// CDPEnergyWiseSubtype is used within CDP to define TLV values. -type CDPEnergyWiseSubtype uint32 - -// CDPEnergyWiseSubtype values. -const ( - CDPEnergyWiseRole CDPEnergyWiseSubtype = 0x00000007 - CDPEnergyWiseDomain CDPEnergyWiseSubtype = 0x00000008 - CDPEnergyWiseName CDPEnergyWiseSubtype = 0x00000009 - CDPEnergyWiseReplyTo CDPEnergyWiseSubtype = 0x00000017 -) - -// CDPEnergyWise is used by CDP to monitor and control power usage. -type CDPEnergyWise struct { - EncryptedData []byte - Unknown1 uint32 - SequenceNumber uint32 - ModelNumber string - Unknown2 uint16 - HardwareID string - SerialNum string - Unknown3 []byte - Role string - Domain string - Name string - ReplyUnknown1 []byte - ReplyPort []byte - ReplyAddress []byte - ReplyUnknown2 []byte - ReplyUnknown3 []byte -} - -// CiscoDiscoveryInfo represents the decoded details for a set of CiscoDiscoveryValues -type CiscoDiscoveryInfo struct { - BaseLayer - CDPHello - DeviceID string - Addresses []net.IP - PortID string - Capabilities CDPCapabilities - Version string - Platform string - IPPrefixes []net.IPNet - VTPDomain string - NativeVLAN uint16 - FullDuplex bool - VLANReply CDPVLANDialogue - VLANQuery CDPVLANDialogue - PowerConsumption uint16 - MTU uint32 - ExtendedTrust uint8 - UntrustedCOS uint8 - SysName string - SysOID string - MgmtAddresses []net.IP - Location CDPLocation - PowerRequest CDPPowerDialogue - PowerAvailable CDPPowerDialogue - SparePairPoe CDPSparePairPoE - EnergyWise CDPEnergyWise - Unknown []CiscoDiscoveryValue -} - -// LayerType returns gopacket.LayerTypeCiscoDiscovery. -func (c *CiscoDiscovery) LayerType() gopacket.LayerType { - return LayerTypeCiscoDiscovery -} - -func decodeCiscoDiscovery(data []byte, p gopacket.PacketBuilder) error { - c := &CiscoDiscovery{ - Version: data[0], - TTL: data[1], - Checksum: binary.BigEndian.Uint16(data[2:4]), - } - if c.Version != 1 && c.Version != 2 { - return fmt.Errorf("Invalid CiscoDiscovery version number %d", c.Version) - } - var err error - c.Values, err = decodeCiscoDiscoveryTLVs(data[4:], p) - if err != nil { - return err - } - c.Contents = data[0:4] - c.Payload = data[4:] - p.AddLayer(c) - return p.NextDecoder(gopacket.DecodeFunc(decodeCiscoDiscoveryInfo)) -} - -// LayerType returns gopacket.LayerTypeCiscoDiscoveryInfo. -func (c *CiscoDiscoveryInfo) LayerType() gopacket.LayerType { - return LayerTypeCiscoDiscoveryInfo -} - -func decodeCiscoDiscoveryTLVs(data []byte, p gopacket.PacketBuilder) (values []CiscoDiscoveryValue, err error) { - for len(data) > 0 { - if len(data) < 4 { - p.SetTruncated() - return nil, errors.New("CDP TLV < 4 bytes") - } - val := CiscoDiscoveryValue{ - Type: CDPTLVType(binary.BigEndian.Uint16(data[:2])), - Length: binary.BigEndian.Uint16(data[2:4]), - } - if val.Length < 4 { - err = fmt.Errorf("Invalid CiscoDiscovery value length %d", val.Length) - break - } else if len(data) < int(val.Length) { - p.SetTruncated() - return nil, fmt.Errorf("CDP TLV < length %d", val.Length) - } - val.Value = data[4:val.Length] - values = append(values, val) - data = data[val.Length:] - } - return -} - -func decodeCiscoDiscoveryInfo(data []byte, p gopacket.PacketBuilder) error { - var err error - info := &CiscoDiscoveryInfo{BaseLayer: BaseLayer{Contents: data}} - p.AddLayer(info) - values, err := decodeCiscoDiscoveryTLVs(data, p) - if err != nil { // Unlikely, as parent decode will fail, but better safe... - return err - } - for _, val := range values { - switch val.Type { - case CDPTLVDevID: - info.DeviceID = string(val.Value) - case CDPTLVAddress: - if err = checkCDPTLVLen(val, 4); err != nil { - return err - } - info.Addresses, err = decodeAddresses(val.Value) - if err != nil { - return err - } - case CDPTLVPortID: - info.PortID = string(val.Value) - case CDPTLVCapabilities: - if err = checkCDPTLVLen(val, 4); err != nil { - return err - } - val := CDPCapability(binary.BigEndian.Uint32(val.Value[0:4])) - info.Capabilities.L3Router = (val&CDPCapMaskRouter > 0) - info.Capabilities.TBBridge = (val&CDPCapMaskTBBridge > 0) - info.Capabilities.SPBridge = (val&CDPCapMaskSPBridge > 0) - info.Capabilities.L2Switch = (val&CDPCapMaskSwitch > 0) - info.Capabilities.IsHost = (val&CDPCapMaskHost > 0) - info.Capabilities.IGMPFilter = (val&CDPCapMaskIGMPFilter > 0) - info.Capabilities.L1Repeater = (val&CDPCapMaskRepeater > 0) - info.Capabilities.IsPhone = (val&CDPCapMaskPhone > 0) - info.Capabilities.RemotelyManaged = (val&CDPCapMaskRemote > 0) - case CDPTLVVersion: - info.Version = string(val.Value) - case CDPTLVPlatform: - info.Platform = string(val.Value) - case CDPTLVIPPrefix: - v := val.Value - l := len(v) - if l%5 == 0 && l >= 5 { - for len(v) > 0 { - _, ipnet, _ := net.ParseCIDR(fmt.Sprintf("%d.%d.%d.%d/%d", v[0], v[1], v[2], v[3], v[4])) - info.IPPrefixes = append(info.IPPrefixes, *ipnet) - v = v[5:] - } - } else { - return fmt.Errorf("Invalid TLV %v length %d", val.Type, len(val.Value)) - } - case CDPTLVHello: - if err = checkCDPTLVLen(val, 32); err != nil { - return err - } - v := val.Value - info.CDPHello.OUI = v[0:3] - info.CDPHello.ProtocolID = binary.BigEndian.Uint16(v[3:5]) - info.CDPHello.ClusterMaster = v[5:9] - info.CDPHello.Unknown1 = v[9:13] - info.CDPHello.Version = v[13] - info.CDPHello.SubVersion = v[14] - info.CDPHello.Status = v[15] - info.CDPHello.Unknown2 = v[16] - info.CDPHello.ClusterCommander = v[17:23] - info.CDPHello.SwitchMAC = v[23:29] - info.CDPHello.Unknown3 = v[29] - info.CDPHello.ManagementVLAN = binary.BigEndian.Uint16(v[30:32]) - case CDPTLVVTPDomain: - info.VTPDomain = string(val.Value) - case CDPTLVNativeVLAN: - if err = checkCDPTLVLen(val, 2); err != nil { - return err - } - info.NativeVLAN = binary.BigEndian.Uint16(val.Value[0:2]) - case CDPTLVFullDuplex: - if err = checkCDPTLVLen(val, 1); err != nil { - return err - } - info.FullDuplex = (val.Value[0] == 1) - case CDPTLVVLANReply: - if err = checkCDPTLVLen(val, 3); err != nil { - return err - } - info.VLANReply.ID = uint8(val.Value[0]) - info.VLANReply.VLAN = binary.BigEndian.Uint16(val.Value[1:3]) - case CDPTLVVLANQuery: - if err = checkCDPTLVLen(val, 3); err != nil { - return err - } - info.VLANQuery.ID = uint8(val.Value[0]) - info.VLANQuery.VLAN = binary.BigEndian.Uint16(val.Value[1:3]) - case CDPTLVPower: - if err = checkCDPTLVLen(val, 2); err != nil { - return err - } - info.PowerConsumption = binary.BigEndian.Uint16(val.Value[0:2]) - case CDPTLVMTU: - if err = checkCDPTLVLen(val, 4); err != nil { - return err - } - info.MTU = binary.BigEndian.Uint32(val.Value[0:4]) - case CDPTLVExtendedTrust: - if err = checkCDPTLVLen(val, 1); err != nil { - return err - } - info.ExtendedTrust = uint8(val.Value[0]) - case CDPTLVUntrustedCOS: - if err = checkCDPTLVLen(val, 1); err != nil { - return err - } - info.UntrustedCOS = uint8(val.Value[0]) - case CDPTLVSysName: - info.SysName = string(val.Value) - case CDPTLVSysOID: - info.SysOID = string(val.Value) - case CDPTLVMgmtAddresses: - if err = checkCDPTLVLen(val, 4); err != nil { - return err - } - info.MgmtAddresses, err = decodeAddresses(val.Value) - if err != nil { - return err - } - case CDPTLVLocation: - if err = checkCDPTLVLen(val, 2); err != nil { - return err - } - info.Location.Type = uint8(val.Value[0]) - info.Location.Location = string(val.Value[1:]) - - // case CDPTLVLExternalPortID: - // Undocumented - case CDPTLVPowerRequested: - if err = checkCDPTLVLen(val, 4); err != nil { - return err - } - info.PowerRequest.ID = binary.BigEndian.Uint16(val.Value[0:2]) - info.PowerRequest.MgmtID = binary.BigEndian.Uint16(val.Value[2:4]) - for n := 4; n < len(val.Value); n += 4 { - info.PowerRequest.Values = append(info.PowerRequest.Values, binary.BigEndian.Uint32(val.Value[n:n+4])) - } - case CDPTLVPowerAvailable: - if err = checkCDPTLVLen(val, 4); err != nil { - return err - } - info.PowerAvailable.ID = binary.BigEndian.Uint16(val.Value[0:2]) - info.PowerAvailable.MgmtID = binary.BigEndian.Uint16(val.Value[2:4]) - for n := 4; n < len(val.Value); n += 4 { - info.PowerAvailable.Values = append(info.PowerAvailable.Values, binary.BigEndian.Uint32(val.Value[n:n+4])) - } - // case CDPTLVPortUnidirectional - // Undocumented - case CDPTLVEnergyWise: - if err = checkCDPTLVLen(val, 72); err != nil { - return err - } - info.EnergyWise.EncryptedData = val.Value[0:20] - info.EnergyWise.Unknown1 = binary.BigEndian.Uint32(val.Value[20:24]) - info.EnergyWise.SequenceNumber = binary.BigEndian.Uint32(val.Value[24:28]) - info.EnergyWise.ModelNumber = string(val.Value[28:44]) - info.EnergyWise.Unknown2 = binary.BigEndian.Uint16(val.Value[44:46]) - info.EnergyWise.HardwareID = string(val.Value[46:49]) - info.EnergyWise.SerialNum = string(val.Value[49:60]) - info.EnergyWise.Unknown3 = val.Value[60:68] - tlvLen := binary.BigEndian.Uint16(val.Value[68:70]) - tlvNum := binary.BigEndian.Uint16(val.Value[70:72]) - data := val.Value[72:] - if len(data) < int(tlvLen) { - return fmt.Errorf("Invalid TLV length %d vs %d", tlvLen, len(data)) - } - numSeen := 0 - for len(data) > 8 { - numSeen++ - if numSeen > int(tlvNum) { // Too many TLV's ? - return fmt.Errorf("Too many TLV's - wanted %d, saw %d", tlvNum, numSeen) - } - tType := CDPEnergyWiseSubtype(binary.BigEndian.Uint32(data[0:4])) - tLen := int(binary.BigEndian.Uint32(data[4:8])) - if tLen > len(data)-8 { - return fmt.Errorf("Invalid TLV length %d vs %d", tLen, len(data)-8) - } - data = data[8:] - switch tType { - case CDPEnergyWiseRole: - info.EnergyWise.Role = string(data[:]) - case CDPEnergyWiseDomain: - info.EnergyWise.Domain = string(data[:]) - case CDPEnergyWiseName: - info.EnergyWise.Name = string(data[:]) - case CDPEnergyWiseReplyTo: - if len(data) >= 18 { - info.EnergyWise.ReplyUnknown1 = data[0:2] - info.EnergyWise.ReplyPort = data[2:4] - info.EnergyWise.ReplyAddress = data[4:8] - info.EnergyWise.ReplyUnknown2 = data[8:10] - info.EnergyWise.ReplyUnknown3 = data[10:14] - } - } - data = data[tLen:] - } - case CDPTLVSparePairPOE: - if err = checkCDPTLVLen(val, 1); err != nil { - return err - } - v := val.Value[0] - info.SparePairPoe.PSEFourWire = (v&CDPPoEFourWire > 0) - info.SparePairPoe.PDArchShared = (v&CDPPoEPDArch > 0) - info.SparePairPoe.PDRequestOn = (v&CDPPoEPDRequest > 0) - info.SparePairPoe.PSEOn = (v&CDPPoEPSE > 0) - default: - info.Unknown = append(info.Unknown, val) - } - } - return nil -} - -// CDP Protocol Types -const ( - CDPProtocolTypeNLPID byte = 1 - CDPProtocolType802_2 byte = 2 -) - -// CDPAddressType is used to define TLV values within CDP addresses. -type CDPAddressType uint64 - -// CDP Address types. -const ( - CDPAddressTypeCLNP CDPAddressType = 0x81 - CDPAddressTypeIPV4 CDPAddressType = 0xcc - CDPAddressTypeIPV6 CDPAddressType = 0xaaaa030000000800 - CDPAddressTypeDECNET CDPAddressType = 0xaaaa030000006003 - CDPAddressTypeAPPLETALK CDPAddressType = 0xaaaa03000000809b - CDPAddressTypeIPX CDPAddressType = 0xaaaa030000008137 - CDPAddressTypeVINES CDPAddressType = 0xaaaa0300000080c4 - CDPAddressTypeXNS CDPAddressType = 0xaaaa030000000600 - CDPAddressTypeAPOLLO CDPAddressType = 0xaaaa030000008019 -) - -func decodeAddresses(v []byte) (addresses []net.IP, err error) { - numaddr := int(binary.BigEndian.Uint32(v[0:4])) - if numaddr < 1 { - return nil, fmt.Errorf("Invalid Address TLV number %d", numaddr) - } - v = v[4:] - if len(v) < numaddr*8 { - return nil, fmt.Errorf("Invalid Address TLV length %d", len(v)) - } - for i := 0; i < numaddr; i++ { - prottype := v[0] - if prottype != CDPProtocolTypeNLPID && prottype != CDPProtocolType802_2 { // invalid protocol type - return nil, fmt.Errorf("Invalid Address Protocol %d", prottype) - } - protlen := int(v[1]) - if (prottype == CDPProtocolTypeNLPID && protlen != 1) || - (prottype == CDPProtocolType802_2 && protlen != 3 && protlen != 8) { // invalid length - return nil, fmt.Errorf("Invalid Address Protocol length %d", protlen) - } - plen := make([]byte, 8) - copy(plen[8-protlen:], v[2:2+protlen]) - protocol := CDPAddressType(binary.BigEndian.Uint64(plen)) - v = v[2+protlen:] - addrlen := binary.BigEndian.Uint16(v[0:2]) - ab := v[2 : 2+addrlen] - if protocol == CDPAddressTypeIPV4 && addrlen == 4 { - addresses = append(addresses, net.IPv4(ab[0], ab[1], ab[2], ab[3])) - } else if protocol == CDPAddressTypeIPV6 && addrlen == 16 { - addresses = append(addresses, net.IP(ab)) - } else { - // only handle IPV4 & IPV6 for now - } - v = v[2+addrlen:] - if len(v) < 8 { - break - } - } - return -} - -func (t CDPTLVType) String() (s string) { - switch t { - case CDPTLVDevID: - s = "Device ID" - case CDPTLVAddress: - s = "Addresses" - case CDPTLVPortID: - s = "Port ID" - case CDPTLVCapabilities: - s = "Capabilities" - case CDPTLVVersion: - s = "Software Version" - case CDPTLVPlatform: - s = "Platform" - case CDPTLVIPPrefix: - s = "IP Prefix" - case CDPTLVHello: - s = "Protocol Hello" - case CDPTLVVTPDomain: - s = "VTP Management Domain" - case CDPTLVNativeVLAN: - s = "Native VLAN" - case CDPTLVFullDuplex: - s = "Full Duplex" - case CDPTLVVLANReply: - s = "VoIP VLAN Reply" - case CDPTLVVLANQuery: - s = "VLANQuery" - case CDPTLVPower: - s = "Power consumption" - case CDPTLVMTU: - s = "MTU" - case CDPTLVExtendedTrust: - s = "Extended Trust Bitmap" - case CDPTLVUntrustedCOS: - s = "Untrusted Port CoS" - case CDPTLVSysName: - s = "System Name" - case CDPTLVSysOID: - s = "System OID" - case CDPTLVMgmtAddresses: - s = "Management Addresses" - case CDPTLVLocation: - s = "Location" - case CDPTLVExternalPortID: - s = "External Port ID" - case CDPTLVPowerRequested: - s = "Power Requested" - case CDPTLVPowerAvailable: - s = "Power Available" - case CDPTLVPortUnidirectional: - s = "Port Unidirectional" - case CDPTLVEnergyWise: - s = "Energy Wise" - case CDPTLVSparePairPOE: - s = "Spare Pair POE" - default: - s = "Unknown" - } - return -} - -func (a CDPAddressType) String() (s string) { - switch a { - case CDPAddressTypeCLNP: - s = "Connectionless Network Protocol" - case CDPAddressTypeIPV4: - s = "IPv4" - case CDPAddressTypeIPV6: - s = "IPv6" - case CDPAddressTypeDECNET: - s = "DECnet Phase IV" - case CDPAddressTypeAPPLETALK: - s = "Apple Talk" - case CDPAddressTypeIPX: - s = "Novell IPX" - case CDPAddressTypeVINES: - s = "Banyan VINES" - case CDPAddressTypeXNS: - s = "Xerox Network Systems" - case CDPAddressTypeAPOLLO: - s = "Apollo" - default: - s = "Unknown" - } - return -} - -func (t CDPEnergyWiseSubtype) String() (s string) { - switch t { - case CDPEnergyWiseRole: - s = "Role" - case CDPEnergyWiseDomain: - s = "Domain" - case CDPEnergyWiseName: - s = "Name" - case CDPEnergyWiseReplyTo: - s = "ReplyTo" - default: - s = "Unknown" - } - return -} - -func checkCDPTLVLen(v CiscoDiscoveryValue, l int) (err error) { - if len(v.Value) < l { - err = fmt.Errorf("Invalid TLV %v length %d", v.Type, len(v.Value)) - } - return -} diff --git a/vendor/github.com/google/gopacket/layers/ctp.go b/vendor/github.com/google/gopacket/layers/ctp.go deleted file mode 100644 index 82875845a72..00000000000 --- a/vendor/github.com/google/gopacket/layers/ctp.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "fmt" - "github.com/google/gopacket" -) - -// EthernetCTPFunction is the function code used by the EthernetCTP protocol to identify each -// EthernetCTP layer. -type EthernetCTPFunction uint16 - -// EthernetCTPFunction values. -const ( - EthernetCTPFunctionReply EthernetCTPFunction = 1 - EthernetCTPFunctionForwardData EthernetCTPFunction = 2 -) - -// EthernetCTP implements the EthernetCTP protocol, see http://www.mit.edu/people/jhawk/ctp.html. -// We split EthernetCTP up into the top-level EthernetCTP layer, followed by zero or more -// EthernetCTPForwardData layers, followed by a final EthernetCTPReply layer. -type EthernetCTP struct { - BaseLayer - SkipCount uint16 -} - -// LayerType returns gopacket.LayerTypeEthernetCTP. -func (c *EthernetCTP) LayerType() gopacket.LayerType { - return LayerTypeEthernetCTP -} - -// EthernetCTPForwardData is the ForwardData layer inside EthernetCTP. See EthernetCTP's docs for more -// details. -type EthernetCTPForwardData struct { - BaseLayer - Function EthernetCTPFunction - ForwardAddress []byte -} - -// LayerType returns gopacket.LayerTypeEthernetCTPForwardData. -func (c *EthernetCTPForwardData) LayerType() gopacket.LayerType { - return LayerTypeEthernetCTPForwardData -} - -// ForwardEndpoint returns the EthernetCTPForwardData ForwardAddress as an endpoint. -func (c *EthernetCTPForwardData) ForwardEndpoint() gopacket.Endpoint { - return gopacket.NewEndpoint(EndpointMAC, c.ForwardAddress) -} - -// EthernetCTPReply is the Reply layer inside EthernetCTP. See EthernetCTP's docs for more details. -type EthernetCTPReply struct { - BaseLayer - Function EthernetCTPFunction - ReceiptNumber uint16 - Data []byte -} - -// LayerType returns gopacket.LayerTypeEthernetCTPReply. -func (c *EthernetCTPReply) LayerType() gopacket.LayerType { - return LayerTypeEthernetCTPReply -} - -// Payload returns the EthernetCTP reply's Data bytes. -func (c *EthernetCTPReply) Payload() []byte { return c.Data } - -func decodeEthernetCTP(data []byte, p gopacket.PacketBuilder) error { - c := &EthernetCTP{ - SkipCount: binary.LittleEndian.Uint16(data[:2]), - BaseLayer: BaseLayer{data[:2], data[2:]}, - } - if c.SkipCount%2 != 0 { - return fmt.Errorf("EthernetCTP skip count is odd: %d", c.SkipCount) - } - p.AddLayer(c) - return p.NextDecoder(gopacket.DecodeFunc(decodeEthernetCTPFromFunctionType)) -} - -// decodeEthernetCTPFromFunctionType reads in the first 2 bytes to determine the EthernetCTP -// layer type to decode next, then decodes based on that. -func decodeEthernetCTPFromFunctionType(data []byte, p gopacket.PacketBuilder) error { - function := EthernetCTPFunction(binary.LittleEndian.Uint16(data[:2])) - switch function { - case EthernetCTPFunctionReply: - reply := &EthernetCTPReply{ - Function: function, - ReceiptNumber: binary.LittleEndian.Uint16(data[2:4]), - Data: data[4:], - BaseLayer: BaseLayer{data, nil}, - } - p.AddLayer(reply) - p.SetApplicationLayer(reply) - return nil - case EthernetCTPFunctionForwardData: - forward := &EthernetCTPForwardData{ - Function: function, - ForwardAddress: data[2:8], - BaseLayer: BaseLayer{data[:8], data[8:]}, - } - p.AddLayer(forward) - return p.NextDecoder(gopacket.DecodeFunc(decodeEthernetCTPFromFunctionType)) - } - return fmt.Errorf("Unknown EthernetCTP function type %v", function) -} diff --git a/vendor/github.com/google/gopacket/layers/dhcpv4.go b/vendor/github.com/google/gopacket/layers/dhcpv4.go deleted file mode 100644 index d79c5915043..00000000000 --- a/vendor/github.com/google/gopacket/layers/dhcpv4.go +++ /dev/null @@ -1,592 +0,0 @@ -// Copyright 2016 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "bytes" - "encoding/binary" - "fmt" - "net" - - "github.com/google/gopacket" -) - -// DHCPOp rerprents a bootp operation -type DHCPOp byte - -// bootp operations -const ( - DHCPOpRequest DHCPOp = 1 - DHCPOpReply DHCPOp = 2 -) - -// String returns a string version of a DHCPOp. -func (o DHCPOp) String() string { - switch o { - case DHCPOpRequest: - return "Request" - case DHCPOpReply: - return "Reply" - default: - return "Unknown" - } -} - -// DHCPMsgType represents a DHCP operation -type DHCPMsgType byte - -// Constants that represent DHCP operations -const ( - DHCPMsgTypeUnspecified DHCPMsgType = iota - DHCPMsgTypeDiscover - DHCPMsgTypeOffer - DHCPMsgTypeRequest - DHCPMsgTypeDecline - DHCPMsgTypeAck - DHCPMsgTypeNak - DHCPMsgTypeRelease - DHCPMsgTypeInform -) - -// String returns a string version of a DHCPMsgType. -func (o DHCPMsgType) String() string { - switch o { - case DHCPMsgTypeUnspecified: - return "Unspecified" - case DHCPMsgTypeDiscover: - return "Discover" - case DHCPMsgTypeOffer: - return "Offer" - case DHCPMsgTypeRequest: - return "Request" - case DHCPMsgTypeDecline: - return "Decline" - case DHCPMsgTypeAck: - return "Ack" - case DHCPMsgTypeNak: - return "Nak" - case DHCPMsgTypeRelease: - return "Release" - case DHCPMsgTypeInform: - return "Inform" - default: - return "Unknown" - } -} - -//DHCPMagic is the RFC 2131 "magic cooke" for DHCP. -var DHCPMagic uint32 = 0x63825363 - -// DHCPv4 contains data for a single DHCP packet. -type DHCPv4 struct { - BaseLayer - Operation DHCPOp - HardwareType LinkType - HardwareLen uint8 - HardwareOpts uint8 - Xid uint32 - Secs uint16 - Flags uint16 - ClientIP net.IP - YourClientIP net.IP - NextServerIP net.IP - RelayAgentIP net.IP - ClientHWAddr net.HardwareAddr - ServerName []byte - File []byte - Options DHCPOptions -} - -// DHCPOptions is used to get nicely printed option lists which would normally -// be cut off after 5 options. -type DHCPOptions []DHCPOption - -// String returns a string version of the options list. -func (o DHCPOptions) String() string { - buf := &bytes.Buffer{} - buf.WriteByte('[') - for i, opt := range o { - buf.WriteString(opt.String()) - if i+1 != len(o) { - buf.WriteString(", ") - } - } - buf.WriteByte(']') - return buf.String() -} - -// LayerType returns gopacket.LayerTypeDHCPv4 -func (d *DHCPv4) LayerType() gopacket.LayerType { return LayerTypeDHCPv4 } - -// DecodeFromBytes decodes the given bytes into this layer. -func (d *DHCPv4) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 240 { - df.SetTruncated() - return fmt.Errorf("DHCPv4 length %d too short", len(data)) - } - d.Options = d.Options[:0] - d.Operation = DHCPOp(data[0]) - d.HardwareType = LinkType(data[1]) - d.HardwareLen = data[2] - d.HardwareOpts = data[3] - d.Xid = binary.BigEndian.Uint32(data[4:8]) - d.Secs = binary.BigEndian.Uint16(data[8:10]) - d.Flags = binary.BigEndian.Uint16(data[10:12]) - d.ClientIP = net.IP(data[12:16]) - d.YourClientIP = net.IP(data[16:20]) - d.NextServerIP = net.IP(data[20:24]) - d.RelayAgentIP = net.IP(data[24:28]) - d.ClientHWAddr = net.HardwareAddr(data[28 : 28+d.HardwareLen]) - d.ServerName = data[44:108] - d.File = data[108:236] - if binary.BigEndian.Uint32(data[236:240]) != DHCPMagic { - return InvalidMagicCookie - } - - if len(data) <= 240 { - // DHCP Packet could have no option (??) - return nil - } - - options := data[240:] - - stop := len(options) - start := 0 - for start < stop { - o := DHCPOption{} - if err := o.decode(options[start:]); err != nil { - return err - } - if o.Type == DHCPOptEnd { - break - } - d.Options = append(d.Options, o) - // Check if the option is a single byte pad - if o.Type == DHCPOptPad { - start++ - } else { - start += int(o.Length) + 2 - } - } - - d.Contents = data - - return nil -} - -// Len returns the length of a DHCPv4 packet. -func (d *DHCPv4) Len() uint16 { - n := uint16(240) - for _, o := range d.Options { - if o.Type == DHCPOptPad { - n++ - } else { - n += uint16(o.Length) + 2 - } - } - n++ // for opt end - return n -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (d *DHCPv4) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - plen := int(d.Len()) - - data, err := b.PrependBytes(plen) - if err != nil { - return err - } - - data[0] = byte(d.Operation) - data[1] = byte(d.HardwareType) - if opts.FixLengths { - d.HardwareLen = uint8(len(d.ClientHWAddr)) - } - data[2] = d.HardwareLen - data[3] = d.HardwareOpts - binary.BigEndian.PutUint32(data[4:8], d.Xid) - binary.BigEndian.PutUint16(data[8:10], d.Secs) - binary.BigEndian.PutUint16(data[10:12], d.Flags) - copy(data[12:16], d.ClientIP.To4()) - copy(data[16:20], d.YourClientIP.To4()) - copy(data[20:24], d.NextServerIP.To4()) - copy(data[24:28], d.RelayAgentIP.To4()) - copy(data[28:44], d.ClientHWAddr) - copy(data[44:108], d.ServerName) - copy(data[108:236], d.File) - binary.BigEndian.PutUint32(data[236:240], DHCPMagic) - - if len(d.Options) > 0 { - offset := 240 - for _, o := range d.Options { - if err := o.encode(data[offset:]); err != nil { - return err - } - // A pad option is only a single byte - if o.Type == DHCPOptPad { - offset++ - } else { - offset += 2 + len(o.Data) - } - } - optend := NewDHCPOption(DHCPOptEnd, nil) - if err := optend.encode(data[offset:]); err != nil { - return err - } - } - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (d *DHCPv4) CanDecode() gopacket.LayerClass { - return LayerTypeDHCPv4 -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (d *DHCPv4) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -func decodeDHCPv4(data []byte, p gopacket.PacketBuilder) error { - dhcp := &DHCPv4{} - err := dhcp.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(dhcp) - return p.NextDecoder(gopacket.LayerTypePayload) -} - -// DHCPOpt represents a DHCP option or parameter from RFC-2132 -type DHCPOpt byte - -// Constants for the DHCPOpt options. -const ( - DHCPOptPad DHCPOpt = 0 - DHCPOptSubnetMask DHCPOpt = 1 // 4, net.IP - DHCPOptTimeOffset DHCPOpt = 2 // 4, int32 (signed seconds from UTC) - DHCPOptRouter DHCPOpt = 3 // n*4, [n]net.IP - DHCPOptTimeServer DHCPOpt = 4 // n*4, [n]net.IP - DHCPOptNameServer DHCPOpt = 5 // n*4, [n]net.IP - DHCPOptDNS DHCPOpt = 6 // n*4, [n]net.IP - DHCPOptLogServer DHCPOpt = 7 // n*4, [n]net.IP - DHCPOptCookieServer DHCPOpt = 8 // n*4, [n]net.IP - DHCPOptLPRServer DHCPOpt = 9 // n*4, [n]net.IP - DHCPOptImpressServer DHCPOpt = 10 // n*4, [n]net.IP - DHCPOptResLocServer DHCPOpt = 11 // n*4, [n]net.IP - DHCPOptHostname DHCPOpt = 12 // n, string - DHCPOptBootfileSize DHCPOpt = 13 // 2, uint16 - DHCPOptMeritDumpFile DHCPOpt = 14 // >1, string - DHCPOptDomainName DHCPOpt = 15 // n, string - DHCPOptSwapServer DHCPOpt = 16 // n*4, [n]net.IP - DHCPOptRootPath DHCPOpt = 17 // n, string - DHCPOptExtensionsPath DHCPOpt = 18 // n, string - DHCPOptIPForwarding DHCPOpt = 19 // 1, bool - DHCPOptSourceRouting DHCPOpt = 20 // 1, bool - DHCPOptPolicyFilter DHCPOpt = 21 // 8*n, [n]{net.IP/net.IP} - DHCPOptDatagramMTU DHCPOpt = 22 // 2, uint16 - DHCPOptDefaultTTL DHCPOpt = 23 // 1, byte - DHCPOptPathMTUAgingTimeout DHCPOpt = 24 // 4, uint32 - DHCPOptPathPlateuTableOption DHCPOpt = 25 // 2*n, []uint16 - DHCPOptInterfaceMTU DHCPOpt = 26 // 2, uint16 - DHCPOptAllSubsLocal DHCPOpt = 27 // 1, bool - DHCPOptBroadcastAddr DHCPOpt = 28 // 4, net.IP - DHCPOptMaskDiscovery DHCPOpt = 29 // 1, bool - DHCPOptMaskSupplier DHCPOpt = 30 // 1, bool - DHCPOptRouterDiscovery DHCPOpt = 31 // 1, bool - DHCPOptSolicitAddr DHCPOpt = 32 // 4, net.IP - DHCPOptStaticRoute DHCPOpt = 33 // n*8, [n]{net.IP/net.IP} -- note the 2nd is router not mask - DHCPOptARPTrailers DHCPOpt = 34 // 1, bool - DHCPOptARPTimeout DHCPOpt = 35 // 4, uint32 - DHCPOptEthernetEncap DHCPOpt = 36 // 1, bool - DHCPOptTCPTTL DHCPOpt = 37 // 1, byte - DHCPOptTCPKeepAliveInt DHCPOpt = 38 // 4, uint32 - DHCPOptTCPKeepAliveGarbage DHCPOpt = 39 // 1, bool - DHCPOptNISDomain DHCPOpt = 40 // n, string - DHCPOptNISServers DHCPOpt = 41 // 4*n, [n]net.IP - DHCPOptNTPServers DHCPOpt = 42 // 4*n, [n]net.IP - DHCPOptVendorOption DHCPOpt = 43 // n, [n]byte // may be encapsulated. - DHCPOptNetBIOSTCPNS DHCPOpt = 44 // 4*n, [n]net.IP - DHCPOptNetBIOSTCPDDS DHCPOpt = 45 // 4*n, [n]net.IP - DHCPOptNETBIOSTCPNodeType DHCPOpt = 46 // 1, magic byte - DHCPOptNetBIOSTCPScope DHCPOpt = 47 // n, string - DHCPOptXFontServer DHCPOpt = 48 // n, string - DHCPOptXDisplayManager DHCPOpt = 49 // n, string - DHCPOptRequestIP DHCPOpt = 50 // 4, net.IP - DHCPOptLeaseTime DHCPOpt = 51 // 4, uint32 - DHCPOptExtOptions DHCPOpt = 52 // 1, 1/2/3 - DHCPOptMessageType DHCPOpt = 53 // 1, 1-7 - DHCPOptServerID DHCPOpt = 54 // 4, net.IP - DHCPOptParamsRequest DHCPOpt = 55 // n, []byte - DHCPOptMessage DHCPOpt = 56 // n, 3 - DHCPOptMaxMessageSize DHCPOpt = 57 // 2, uint16 - DHCPOptT1 DHCPOpt = 58 // 4, uint32 - DHCPOptT2 DHCPOpt = 59 // 4, uint32 - DHCPOptClassID DHCPOpt = 60 // n, []byte - DHCPOptClientID DHCPOpt = 61 // n >= 2, []byte - DHCPOptDomainSearch DHCPOpt = 119 // n, string - DHCPOptSIPServers DHCPOpt = 120 // n, url - DHCPOptClasslessStaticRoute DHCPOpt = 121 // - DHCPOptEnd DHCPOpt = 255 -) - -// String returns a string version of a DHCPOpt. -func (o DHCPOpt) String() string { - switch o { - case DHCPOptPad: - return "(padding)" - case DHCPOptSubnetMask: - return "SubnetMask" - case DHCPOptTimeOffset: - return "TimeOffset" - case DHCPOptRouter: - return "Router" - case DHCPOptTimeServer: - return "rfc868" // old time server protocol stringified to dissuade confusion w. NTP - case DHCPOptNameServer: - return "ien116" // obscure nameserver protocol stringified to dissuade confusion w. DNS - case DHCPOptDNS: - return "DNS" - case DHCPOptLogServer: - return "mitLCS" // MIT LCS server protocol yada yada w. Syslog - case DHCPOptCookieServer: - return "CookieServer" - case DHCPOptLPRServer: - return "LPRServer" - case DHCPOptImpressServer: - return "ImpressServer" - case DHCPOptResLocServer: - return "ResourceLocationServer" - case DHCPOptHostname: - return "Hostname" - case DHCPOptBootfileSize: - return "BootfileSize" - case DHCPOptMeritDumpFile: - return "MeritDumpFile" - case DHCPOptDomainName: - return "DomainName" - case DHCPOptSwapServer: - return "SwapServer" - case DHCPOptRootPath: - return "RootPath" - case DHCPOptExtensionsPath: - return "ExtensionsPath" - case DHCPOptIPForwarding: - return "IPForwarding" - case DHCPOptSourceRouting: - return "SourceRouting" - case DHCPOptPolicyFilter: - return "PolicyFilter" - case DHCPOptDatagramMTU: - return "DatagramMTU" - case DHCPOptDefaultTTL: - return "DefaultTTL" - case DHCPOptPathMTUAgingTimeout: - return "PathMTUAgingTimeout" - case DHCPOptPathPlateuTableOption: - return "PathPlateuTableOption" - case DHCPOptInterfaceMTU: - return "InterfaceMTU" - case DHCPOptAllSubsLocal: - return "AllSubsLocal" - case DHCPOptBroadcastAddr: - return "BroadcastAddress" - case DHCPOptMaskDiscovery: - return "MaskDiscovery" - case DHCPOptMaskSupplier: - return "MaskSupplier" - case DHCPOptRouterDiscovery: - return "RouterDiscovery" - case DHCPOptSolicitAddr: - return "SolicitAddr" - case DHCPOptStaticRoute: - return "StaticRoute" - case DHCPOptARPTrailers: - return "ARPTrailers" - case DHCPOptARPTimeout: - return "ARPTimeout" - case DHCPOptEthernetEncap: - return "EthernetEncap" - case DHCPOptTCPTTL: - return "TCPTTL" - case DHCPOptTCPKeepAliveInt: - return "TCPKeepAliveInt" - case DHCPOptTCPKeepAliveGarbage: - return "TCPKeepAliveGarbage" - case DHCPOptNISDomain: - return "NISDomain" - case DHCPOptNISServers: - return "NISServers" - case DHCPOptNTPServers: - return "NTPServers" - case DHCPOptVendorOption: - return "VendorOption" - case DHCPOptNetBIOSTCPNS: - return "NetBIOSOverTCPNS" - case DHCPOptNetBIOSTCPDDS: - return "NetBiosOverTCPDDS" - case DHCPOptNETBIOSTCPNodeType: - return "NetBIOSOverTCPNodeType" - case DHCPOptNetBIOSTCPScope: - return "NetBIOSOverTCPScope" - case DHCPOptXFontServer: - return "XFontServer" - case DHCPOptXDisplayManager: - return "XDisplayManager" - case DHCPOptEnd: - return "(end)" - case DHCPOptSIPServers: - return "SipServers" - case DHCPOptRequestIP: - return "RequestIP" - case DHCPOptLeaseTime: - return "LeaseTime" - case DHCPOptExtOptions: - return "ExtOpts" - case DHCPOptMessageType: - return "MessageType" - case DHCPOptServerID: - return "ServerID" - case DHCPOptParamsRequest: - return "ParamsRequest" - case DHCPOptMessage: - return "Message" - case DHCPOptMaxMessageSize: - return "MaxDHCPSize" - case DHCPOptT1: - return "Timer1" - case DHCPOptT2: - return "Timer2" - case DHCPOptClassID: - return "ClassID" - case DHCPOptClientID: - return "ClientID" - case DHCPOptDomainSearch: - return "DomainSearch" - case DHCPOptClasslessStaticRoute: - return "ClasslessStaticRoute" - default: - return "Unknown" - } -} - -// DHCPOption rerpresents a DHCP option. -type DHCPOption struct { - Type DHCPOpt - Length uint8 - Data []byte -} - -// String returns a string version of a DHCP Option. -func (o DHCPOption) String() string { - switch o.Type { - - case DHCPOptHostname, DHCPOptMeritDumpFile, DHCPOptDomainName, DHCPOptRootPath, - DHCPOptExtensionsPath, DHCPOptNISDomain, DHCPOptNetBIOSTCPScope, DHCPOptXFontServer, - DHCPOptXDisplayManager, DHCPOptMessage, DHCPOptDomainSearch: // string - return fmt.Sprintf("Option(%s:%s)", o.Type, string(o.Data)) - - case DHCPOptMessageType: - if len(o.Data) != 1 { - return fmt.Sprintf("Option(%s:INVALID)", o.Type) - } - return fmt.Sprintf("Option(%s:%s)", o.Type, DHCPMsgType(o.Data[0])) - - case DHCPOptSubnetMask, DHCPOptServerID, DHCPOptBroadcastAddr, - DHCPOptSolicitAddr, DHCPOptRequestIP: // net.IP - if len(o.Data) < 4 { - return fmt.Sprintf("Option(%s:INVALID)", o.Type) - } - return fmt.Sprintf("Option(%s:%s)", o.Type, net.IP(o.Data)) - - case DHCPOptT1, DHCPOptT2, DHCPOptLeaseTime, DHCPOptPathMTUAgingTimeout, - DHCPOptARPTimeout, DHCPOptTCPKeepAliveInt: // uint32 - if len(o.Data) != 4 { - return fmt.Sprintf("Option(%s:INVALID)", o.Type) - } - return fmt.Sprintf("Option(%s:%d)", o.Type, - uint32(o.Data[0])<<24|uint32(o.Data[1])<<16|uint32(o.Data[2])<<8|uint32(o.Data[3])) - - case DHCPOptParamsRequest: - buf := &bytes.Buffer{} - buf.WriteString(fmt.Sprintf("Option(%s:", o.Type)) - for i, v := range o.Data { - buf.WriteString(DHCPOpt(v).String()) - if i+1 != len(o.Data) { - buf.WriteByte(',') - } - } - buf.WriteString(")") - return buf.String() - - default: - return fmt.Sprintf("Option(%s:%v)", o.Type, o.Data) - } -} - -// NewDHCPOption constructs a new DHCPOption with a given type and data. -func NewDHCPOption(t DHCPOpt, data []byte) DHCPOption { - o := DHCPOption{Type: t} - if data != nil { - o.Data = data - o.Length = uint8(len(data)) - } - return o -} - -func (o *DHCPOption) encode(b []byte) error { - switch o.Type { - case DHCPOptPad, DHCPOptEnd: - b[0] = byte(o.Type) - default: - b[0] = byte(o.Type) - b[1] = o.Length - copy(b[2:], o.Data) - } - return nil -} - -func (o *DHCPOption) decode(data []byte) error { - if len(data) < 1 { - // Pad/End have a length of 1 - return DecOptionNotEnoughData - } - o.Type = DHCPOpt(data[0]) - switch o.Type { - case DHCPOptPad, DHCPOptEnd: - o.Data = nil - default: - if len(data) < 2 { - return DecOptionNotEnoughData - } - o.Length = data[1] - if int(o.Length) > len(data[2:]) { - return DecOptionMalformed - } - o.Data = data[2 : 2+int(o.Length)] - } - return nil -} - -// DHCPv4Error is used for constant errors for DHCPv4. It is needed for test asserts. -type DHCPv4Error string - -// DHCPv4Error implements error interface. -func (d DHCPv4Error) Error() string { - return string(d) -} - -const ( - // DecOptionNotEnoughData is returned when there is not enough data during option's decode process - DecOptionNotEnoughData = DHCPv4Error("Not enough data to decode") - // DecOptionMalformed is returned when the option is malformed - DecOptionMalformed = DHCPv4Error("Option is malformed") - // InvalidMagicCookie is returned when Magic cookie is missing into BOOTP header - InvalidMagicCookie = DHCPv4Error("Bad DHCP header") -) diff --git a/vendor/github.com/google/gopacket/layers/dhcpv6.go b/vendor/github.com/google/gopacket/layers/dhcpv6.go deleted file mode 100644 index 2698cfb196d..00000000000 --- a/vendor/github.com/google/gopacket/layers/dhcpv6.go +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright 2018 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "fmt" - "net" - - "github.com/google/gopacket" -) - -// DHCPv6MsgType represents a DHCPv6 operation -type DHCPv6MsgType byte - -// Constants that represent DHCP operations -const ( - DHCPv6MsgTypeUnspecified DHCPv6MsgType = iota - DHCPv6MsgTypeSolicit - DHCPv6MsgTypeAdverstise - DHCPv6MsgTypeRequest - DHCPv6MsgTypeConfirm - DHCPv6MsgTypeRenew - DHCPv6MsgTypeRebind - DHCPv6MsgTypeReply - DHCPv6MsgTypeRelease - DHCPv6MsgTypeDecline - DHCPv6MsgTypeReconfigure - DHCPv6MsgTypeInformationRequest - DHCPv6MsgTypeRelayForward - DHCPv6MsgTypeRelayReply -) - -// String returns a string version of a DHCPv6MsgType. -func (o DHCPv6MsgType) String() string { - switch o { - case DHCPv6MsgTypeUnspecified: - return "Unspecified" - case DHCPv6MsgTypeSolicit: - return "Solicit" - case DHCPv6MsgTypeAdverstise: - return "Adverstise" - case DHCPv6MsgTypeRequest: - return "Request" - case DHCPv6MsgTypeConfirm: - return "Confirm" - case DHCPv6MsgTypeRenew: - return "Renew" - case DHCPv6MsgTypeRebind: - return "Rebind" - case DHCPv6MsgTypeReply: - return "Reply" - case DHCPv6MsgTypeRelease: - return "Release" - case DHCPv6MsgTypeDecline: - return "Decline" - case DHCPv6MsgTypeReconfigure: - return "Reconfigure" - case DHCPv6MsgTypeInformationRequest: - return "InformationRequest" - case DHCPv6MsgTypeRelayForward: - return "RelayForward" - case DHCPv6MsgTypeRelayReply: - return "RelayReply" - default: - return "Unknown" - } -} - -// DHCPv6 contains data for a single DHCP packet. -type DHCPv6 struct { - BaseLayer - MsgType DHCPv6MsgType - HopCount uint8 - LinkAddr net.IP - PeerAddr net.IP - TransactionID []byte - Options DHCPv6Options -} - -// LayerType returns gopacket.LayerTypeDHCPv6 -func (d *DHCPv6) LayerType() gopacket.LayerType { return LayerTypeDHCPv6 } - -// DecodeFromBytes decodes the given bytes into this layer. -func (d *DHCPv6) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 4 { - df.SetTruncated() - return fmt.Errorf("DHCPv6 length %d too short", len(data)) - } - d.BaseLayer = BaseLayer{Contents: data} - d.Options = d.Options[:0] - d.MsgType = DHCPv6MsgType(data[0]) - - offset := 0 - if d.MsgType == DHCPv6MsgTypeRelayForward || d.MsgType == DHCPv6MsgTypeRelayReply { - if len(data) < 34 { - df.SetTruncated() - return fmt.Errorf("DHCPv6 length %d too short for message type %d", len(data), d.MsgType) - } - d.HopCount = data[1] - d.LinkAddr = net.IP(data[2:18]) - d.PeerAddr = net.IP(data[18:34]) - offset = 34 - } else { - d.TransactionID = data[1:4] - offset = 4 - } - - stop := len(data) - for offset < stop { - o := DHCPv6Option{} - if err := o.decode(data[offset:]); err != nil { - return err - } - d.Options = append(d.Options, o) - offset += int(o.Length) + 4 // 2 from option code, 2 from option length - } - - return nil -} - -// Len returns the length of a DHCPv6 packet. -func (d *DHCPv6) Len() int { - n := 1 - if d.MsgType == DHCPv6MsgTypeRelayForward || d.MsgType == DHCPv6MsgTypeRelayReply { - n += 33 - } else { - n += 3 - } - - for _, o := range d.Options { - n += int(o.Length) + 4 // 2 from option code, 2 from option length - } - - return n -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (d *DHCPv6) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - plen := int(d.Len()) - - data, err := b.PrependBytes(plen) - if err != nil { - return err - } - - offset := 0 - data[0] = byte(d.MsgType) - if d.MsgType == DHCPv6MsgTypeRelayForward || d.MsgType == DHCPv6MsgTypeRelayReply { - data[1] = byte(d.HopCount) - copy(data[2:18], d.LinkAddr.To16()) - copy(data[18:34], d.PeerAddr.To16()) - offset = 34 - } else { - copy(data[1:4], d.TransactionID) - offset = 4 - } - - if len(d.Options) > 0 { - for _, o := range d.Options { - if err := o.encode(data[offset:], opts); err != nil { - return err - } - offset += int(o.Length) + 4 // 2 from option code, 2 from option length - } - } - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (d *DHCPv6) CanDecode() gopacket.LayerClass { - return LayerTypeDHCPv6 -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (d *DHCPv6) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -func decodeDHCPv6(data []byte, p gopacket.PacketBuilder) error { - dhcp := &DHCPv6{} - err := dhcp.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(dhcp) - return p.NextDecoder(gopacket.LayerTypePayload) -} - -// DHCPv6StatusCode represents a DHCP status code - RFC-3315 -type DHCPv6StatusCode uint16 - -// Constants for the DHCPv6StatusCode. -const ( - DHCPv6StatusCodeSuccess DHCPv6StatusCode = iota - DHCPv6StatusCodeUnspecFail - DHCPv6StatusCodeNoAddrsAvail - DHCPv6StatusCodeNoBinding - DHCPv6StatusCodeNotOnLink - DHCPv6StatusCodeUseMulticast -) - -// String returns a string version of a DHCPv6StatusCode. -func (o DHCPv6StatusCode) String() string { - switch o { - case DHCPv6StatusCodeSuccess: - return "Success" - case DHCPv6StatusCodeUnspecFail: - return "UnspecifiedFailure" - case DHCPv6StatusCodeNoAddrsAvail: - return "NoAddressAvailable" - case DHCPv6StatusCodeNoBinding: - return "NoBinding" - case DHCPv6StatusCodeNotOnLink: - return "NotOnLink" - case DHCPv6StatusCodeUseMulticast: - return "UseMulticast" - default: - return "Unknown" - } -} - -// DHCPv6DUIDType represents a DHCP DUID - RFC-3315 -type DHCPv6DUIDType uint16 - -// Constants for the DHCPv6DUIDType. -const ( - DHCPv6DUIDTypeLLT DHCPv6DUIDType = iota + 1 - DHCPv6DUIDTypeEN - DHCPv6DUIDTypeLL -) - -// String returns a string version of a DHCPv6DUIDType. -func (o DHCPv6DUIDType) String() string { - switch o { - case DHCPv6DUIDTypeLLT: - return "LLT" - case DHCPv6DUIDTypeEN: - return "EN" - case DHCPv6DUIDTypeLL: - return "LL" - default: - return "Unknown" - } -} - -// DHCPv6DUID means DHCP Unique Identifier as stated in RFC 3315, section 9 (https://tools.ietf.org/html/rfc3315#page-19) -type DHCPv6DUID struct { - Type DHCPv6DUIDType - // LLT, LL - HardwareType []byte - // EN - EnterpriseNumber []byte - // LLT - Time []byte - // LLT, LL - LinkLayerAddress net.HardwareAddr - // EN - Identifier []byte -} - -// DecodeFromBytes decodes the given bytes into a DHCPv6DUID -func (d *DHCPv6DUID) DecodeFromBytes(data []byte) error { - if len(data) < 2 { - return fmt.Errorf("Not enough bytes to decode: %d", len(data)) - } - - d.Type = DHCPv6DUIDType(binary.BigEndian.Uint16(data[:2])) - if d.Type == DHCPv6DUIDTypeLLT || d.Type == DHCPv6DUIDTypeLL { - if len(data) < 4 { - return fmt.Errorf("Not enough bytes to decode: %d", len(data)) - } - d.HardwareType = data[2:4] - } - - if d.Type == DHCPv6DUIDTypeLLT { - if len(data) < 8 { - return fmt.Errorf("Not enough bytes to decode: %d", len(data)) - } - d.Time = data[4:8] - d.LinkLayerAddress = net.HardwareAddr(data[8:]) - } else if d.Type == DHCPv6DUIDTypeEN { - if len(data) < 6 { - return fmt.Errorf("Not enough bytes to decode: %d", len(data)) - } - d.EnterpriseNumber = data[2:6] - d.Identifier = data[6:] - } else { // DHCPv6DUIDTypeLL - if len(data) < 4 { - return fmt.Errorf("Not enough bytes to decode: %d", len(data)) - } - d.LinkLayerAddress = net.HardwareAddr(data[4:]) - } - - return nil -} - -// Encode encodes the DHCPv6DUID in a slice of bytes -func (d *DHCPv6DUID) Encode() []byte { - length := d.Len() - data := make([]byte, length) - binary.BigEndian.PutUint16(data[0:2], uint16(d.Type)) - - if d.Type == DHCPv6DUIDTypeLLT || d.Type == DHCPv6DUIDTypeLL { - copy(data[2:4], d.HardwareType) - } - - if d.Type == DHCPv6DUIDTypeLLT { - copy(data[4:8], d.Time) - copy(data[8:], d.LinkLayerAddress) - } else if d.Type == DHCPv6DUIDTypeEN { - copy(data[2:6], d.EnterpriseNumber) - copy(data[6:], d.Identifier) - } else { - copy(data[4:], d.LinkLayerAddress) - } - - return data -} - -// Len returns the length of the DHCPv6DUID, respecting the type -func (d *DHCPv6DUID) Len() int { - length := 2 // d.Type - if d.Type == DHCPv6DUIDTypeLLT { - length += 2 /*HardwareType*/ + 4 /*d.Time*/ + len(d.LinkLayerAddress) - } else if d.Type == DHCPv6DUIDTypeEN { - length += 4 /*d.EnterpriseNumber*/ + len(d.Identifier) - } else { // LL - length += 2 /*d.HardwareType*/ + len(d.LinkLayerAddress) - } - - return length -} - -func (d *DHCPv6DUID) String() string { - duid := "Type: " + d.Type.String() + ", " - if d.Type == DHCPv6DUIDTypeLLT { - duid += fmt.Sprintf("HardwareType: %v, Time: %v, LinkLayerAddress: %v", d.HardwareType, d.Time, d.LinkLayerAddress) - } else if d.Type == DHCPv6DUIDTypeEN { - duid += fmt.Sprintf("EnterpriseNumber: %v, Identifier: %v", d.EnterpriseNumber, d.Identifier) - } else { // DHCPv6DUIDTypeLL - duid += fmt.Sprintf("HardwareType: %v, LinkLayerAddress: %v", d.HardwareType, d.LinkLayerAddress) - } - return duid -} - -func decodeDHCPv6DUID(data []byte) (*DHCPv6DUID, error) { - duid := &DHCPv6DUID{} - err := duid.DecodeFromBytes(data) - if err != nil { - return nil, err - } - return duid, nil -} diff --git a/vendor/github.com/google/gopacket/layers/dhcpv6_options.go b/vendor/github.com/google/gopacket/layers/dhcpv6_options.go deleted file mode 100644 index 5a1f9919b1f..00000000000 --- a/vendor/github.com/google/gopacket/layers/dhcpv6_options.go +++ /dev/null @@ -1,621 +0,0 @@ -// Copyright 2018 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "github.com/google/gopacket" -) - -// DHCPv6Opt represents a DHCP option or parameter from RFC-3315 -type DHCPv6Opt uint16 - -// Constants for the DHCPv6Opt options. -const ( - DHCPv6OptClientID DHCPv6Opt = 1 - DHCPv6OptServerID DHCPv6Opt = 2 - DHCPv6OptIANA DHCPv6Opt = 3 - DHCPv6OptIATA DHCPv6Opt = 4 - DHCPv6OptIAAddr DHCPv6Opt = 5 - DHCPv6OptOro DHCPv6Opt = 6 - DHCPv6OptPreference DHCPv6Opt = 7 - DHCPv6OptElapsedTime DHCPv6Opt = 8 - DHCPv6OptRelayMessage DHCPv6Opt = 9 - DHCPv6OptAuth DHCPv6Opt = 11 - DHCPv6OptUnicast DHCPv6Opt = 12 - DHCPv6OptStatusCode DHCPv6Opt = 13 - DHCPv6OptRapidCommit DHCPv6Opt = 14 - DHCPv6OptUserClass DHCPv6Opt = 15 - DHCPv6OptVendorClass DHCPv6Opt = 16 - DHCPv6OptVendorOpts DHCPv6Opt = 17 - DHCPv6OptInterfaceID DHCPv6Opt = 18 - DHCPv6OptReconfigureMessage DHCPv6Opt = 19 - DHCPv6OptReconfigureAccept DHCPv6Opt = 20 - - // RFC 3319 Session Initiation Protocol (SIP) - DHCPv6OptSIPServersDomainList DHCPv6Opt = 21 - DHCPv6OptSIPServersAddressList DHCPv6Opt = 22 - - // RFC 3646 DNS Configuration - DHCPv6OptDNSServers DHCPv6Opt = 23 - DHCPv6OptDomainList DHCPv6Opt = 24 - - // RFC 3633 Prefix Delegation - DHCPv6OptIAPD DHCPv6Opt = 25 - DHCPv6OptIAPrefix DHCPv6Opt = 26 - - // RFC 3898 Network Information Service (NIS) - DHCPv6OptNISServers DHCPv6Opt = 27 - DHCPv6OptNISPServers DHCPv6Opt = 28 - DHCPv6OptNISDomainName DHCPv6Opt = 29 - DHCPv6OptNISPDomainName DHCPv6Opt = 30 - - // RFC 4075 Simple Network Time Protocol (SNTP) - DHCPv6OptSNTPServers DHCPv6Opt = 31 - - // RFC 4242 Information Refresh Time Option - DHCPv6OptInformationRefreshTime DHCPv6Opt = 32 - - // RFC 4280 Broadcast and Multicast Control Servers - DHCPv6OptBCMCSServerDomainNameList DHCPv6Opt = 33 - DHCPv6OptBCMCSServerAddressList DHCPv6Opt = 34 - - // RFC 4776 Civic Address ConfigurationOption - DHCPv6OptGeoconfCivic DHCPv6Opt = 36 - - // RFC 4649 Relay Agent Remote-ID - DHCPv6OptRemoteID DHCPv6Opt = 37 - - // RFC 4580 Relay Agent Subscriber-ID - DHCPv6OptSubscriberID DHCPv6Opt = 38 - - // RFC 4704 Client Full Qualified Domain Name (FQDN) - DHCPv6OptClientFQDN DHCPv6Opt = 39 - - // RFC 5192 Protocol for Carrying Authentication for Network Access (PANA) - DHCPv6OptPanaAgent DHCPv6Opt = 40 - - // RFC 4833 Timezone Options - DHCPv6OptNewPOSIXTimezone DHCPv6Opt = 41 - DHCPv6OptNewTZDBTimezone DHCPv6Opt = 42 - - // RFC 4994 Relay Agent Echo Request - DHCPv6OptEchoRequestOption DHCPv6Opt = 43 - - // RFC 5007 Leasequery - DHCPv6OptLQQuery DHCPv6Opt = 44 - DHCPv6OptCLTTime DHCPv6Opt = 45 - DHCPv6OptClientData DHCPv6Opt = 46 - DHCPv6OptLQRelayData DHCPv6Opt = 47 - DHCPv6OptLQClientLink DHCPv6Opt = 48 - - // RFC 6610 Home Information Discovery in Mobile IPv6 (MIPv6) - DHCPv6OptMIP6HNIDF DHCPv6Opt = 49 - DHCPv6OptMIP6VDINF DHCPv6Opt = 50 - DHCPv6OptMIP6IDINF DHCPv6Opt = 69 - DHCPv6OptMIP6UDINF DHCPv6Opt = 70 - DHCPv6OptMIP6HNP DHCPv6Opt = 71 - DHCPv6OptMIP6HAA DHCPv6Opt = 72 - DHCPv6OptMIP6HAF DHCPv6Opt = 73 - - // RFC 5223 Discovering Location-to-Service Translation (LoST) Servers - DHCPv6OptV6LOST DHCPv6Opt = 51 - - // RFC 5417 Control And Provisioning of Wireless Access Points (CAPWAP) - DHCPv6OptCAPWAPACV6 DHCPv6Opt = 52 - - // RFC 5460 Bulk Leasequery - DHCPv6OptRelayID DHCPv6Opt = 53 - - // RFC 5678 IEEE 802.21 Mobility Services (MoS) Discovery - DHCPv6OptIPv6AddressMoS DHCPv6Opt = 54 - DHCPv6OptIPv6FQDNMoS DHCPv6Opt = 55 - - // RFC 5908 NTP Server Option - DHCPv6OptNTPServer DHCPv6Opt = 56 - - // RFC 5986 Discovering the Local Location Information Server (LIS) - DHCPv6OptV6AccessDomain DHCPv6Opt = 57 - - // RFC 5986 SIP User Agent - DHCPv6OptSIPUACSList DHCPv6Opt = 58 - - // RFC 5970 Options for Network Boot - DHCPv6OptBootFileURL DHCPv6Opt = 59 - DHCPv6OptBootFileParam DHCPv6Opt = 60 - DHCPv6OptClientArchType DHCPv6Opt = 61 - DHCPv6OptNII DHCPv6Opt = 62 - - // RFC 6225 Coordinate-Based Location Configuration Information - DHCPv6OptGeolocation DHCPv6Opt = 63 - - // RFC 6334 Dual-Stack Lite - DHCPv6OptAFTRName DHCPv6Opt = 64 - - // RFC 6440 EAP Re-authentication Protocol (ERP) - DHCPv6OptERPLocalDomainName DHCPv6Opt = 65 - - // RFC 6422 Relay-Supplied DHCP Options - DHCPv6OptRSOO DHCPv6Opt = 66 - - // RFC 6603 Prefix Exclude Option for DHCPv6-based Prefix Delegation - DHCPv6OptPDExclude DHCPv6Opt = 67 - - // RFC 6607 Virtual Subnet Selection - DHCPv6OptVSS DHCPv6Opt = 68 - - // RFC 6731 Improved Recursive DNS Server Selection for Multi-Interfaced Nodes - DHCPv6OptRDNSSSelection DHCPv6Opt = 74 - - // RFC 6784 Kerberos Options for DHCPv6 - DHCPv6OptKRBPrincipalName DHCPv6Opt = 75 - DHCPv6OptKRBRealmName DHCPv6Opt = 76 - DHCPv6OptKRBKDC DHCPv6Opt = 77 - - // RFC 6939 Client Link-Layer Address Option - DHCPv6OptClientLinkLayerAddress DHCPv6Opt = 79 - - // RFC 6977 Triggering DHCPv6 Reconfiguration from Relay Agents - DHCPv6OptLinkAddress DHCPv6Opt = 80 - - // RFC 7037 RADIUS Option for the DHCPv6 Relay Agent - DHCPv6OptRADIUS DHCPv6Opt = 81 - - // RFC 7083 Modification to Default Values of SOL_MAX_RT and INF_MAX_RT - DHCPv6OptSolMaxRt DHCPv6Opt = 82 - DHCPv6OptInfMaxRt DHCPv6Opt = 83 - - // RFC 7078 Distributing Address Selection Policy - DHCPv6OptAddrSel DHCPv6Opt = 84 - DHCPv6OptAddrSelTable DHCPv6Opt = 85 - - // RFC 7291 DHCP Options for the Port Control Protocol (PCP) - DHCPv6OptV6PCPServer DHCPv6Opt = 86 - - // RFC 7341 DHCPv4-over-DHCPv6 (DHCP 4o6) Transport - DHCPv6OptDHCPv4Message DHCPv6Opt = 87 - DHCPv6OptDHCPv4OverDHCPv6Server DHCPv6Opt = 88 - - // RFC 7598 Configuration of Softwire Address and Port-Mapped Clients - DHCPv6OptS46Rule DHCPv6Opt = 89 - DHCPv6OptS46BR DHCPv6Opt = 90 - DHCPv6OptS46DMR DHCPv6Opt = 91 - DHCPv6OptS46V4V4Bind DHCPv6Opt = 92 - DHCPv6OptS46PortParameters DHCPv6Opt = 93 - DHCPv6OptS46ContMAPE DHCPv6Opt = 94 - DHCPv6OptS46ContMAPT DHCPv6Opt = 95 - DHCPv6OptS46ContLW DHCPv6Opt = 96 - - // RFC 7600 IPv4 Residual Deployment via IPv6 - DHCPv6Opt4RD DHCPv6Opt = 97 - DHCPv6Opt4RDMapRule DHCPv6Opt = 98 - DHCPv6Opt4RDNonMapRule DHCPv6Opt = 99 - - // RFC 7653 Active Leasequery - DHCPv6OptLQBaseTime DHCPv6Opt = 100 - DHCPv6OptLQStartTime DHCPv6Opt = 101 - DHCPv6OptLQEndTime DHCPv6Opt = 102 - - // RFC 7710 Captive-Portal Identification - DHCPv6OptCaptivePortal DHCPv6Opt = 103 - - // RFC 7774 Multicast Protocol for Low-Power and Lossy Networks (MPL) Parameter Configuration - DHCPv6OptMPLParameters DHCPv6Opt = 104 - - // RFC 7839 Access-Network-Identifier (ANI) - DHCPv6OptANIATT DHCPv6Opt = 105 - DHCPv6OptANINetworkName DHCPv6Opt = 106 - DHCPv6OptANIAPName DHCPv6Opt = 107 - DHCPv6OptANIAPBSSID DHCPv6Opt = 108 - DHCPv6OptANIOperatorID DHCPv6Opt = 109 - DHCPv6OptANIOperatorRealm DHCPv6Opt = 110 - - // RFC 8026 Unified IPv4-in-IPv6 Softwire Customer Premises Equipment (CPE) - DHCPv6OptS46Priority DHCPv6Opt = 111 - - // draft-ietf-opsawg-mud-25 Manufacturer Usage Description (MUD) - DHCPv6OptMUDURLV6 DHCPv6Opt = 112 - - // RFC 8115 IPv4-Embedded Multicast and Unicast IPv6 Prefixes - DHCPv6OptV6Prefix64 DHCPv6Opt = 113 - - // RFC 8156 DHCPv6 Failover Protocol - DHCPv6OptFBindingStatus DHCPv6Opt = 114 - DHCPv6OptFConnectFlags DHCPv6Opt = 115 - DHCPv6OptFDNSRemovalInfo DHCPv6Opt = 116 - DHCPv6OptFDNSHostName DHCPv6Opt = 117 - DHCPv6OptFDNSZoneName DHCPv6Opt = 118 - DHCPv6OptFDNSFlags DHCPv6Opt = 119 - DHCPv6OptFExpirationTime DHCPv6Opt = 120 - DHCPv6OptFMaxUnacknowledgedBNDUPD DHCPv6Opt = 121 - DHCPv6OptFMCLT DHCPv6Opt = 122 - DHCPv6OptFPartnerLifetime DHCPv6Opt = 123 - DHCPv6OptFPartnerLifetimeSent DHCPv6Opt = 124 - DHCPv6OptFPartnerDownTime DHCPv6Opt = 125 - DHCPv6OptFPartnerRawCltTime DHCPv6Opt = 126 - DHCPv6OptFProtocolVersion DHCPv6Opt = 127 - DHCPv6OptFKeepaliveTime DHCPv6Opt = 128 - DHCPv6OptFReconfigureData DHCPv6Opt = 129 - DHCPv6OptFRelationshipName DHCPv6Opt = 130 - DHCPv6OptFServerFlags DHCPv6Opt = 131 - DHCPv6OptFServerState DHCPv6Opt = 132 - DHCPv6OptFStartTimeOfState DHCPv6Opt = 133 - DHCPv6OptFStateExpirationTime DHCPv6Opt = 134 - - // RFC 8357 Generalized UDP Source Port for DHCP Relay - DHCPv6OptRelayPort DHCPv6Opt = 135 - - // draft-ietf-netconf-zerotouch-25 Zero Touch Provisioning for Networking Devices - DHCPv6OptV6ZeroTouchRedirect DHCPv6Opt = 136 - - // RFC 6153 Access Network Discovery and Selection Function (ANDSF) Discovery - DHCPv6OptIPV6AddressANDSF DHCPv6Opt = 143 -) - -// String returns a string version of a DHCPv6Opt. -func (o DHCPv6Opt) String() string { - switch o { - case DHCPv6OptClientID: - return "ClientID" - case DHCPv6OptServerID: - return "ServerID" - case DHCPv6OptIANA: - return "IA_NA" - case DHCPv6OptIATA: - return "IA_TA" - case DHCPv6OptIAAddr: - return "IAAddr" - case DHCPv6OptOro: - return "Oro" - case DHCPv6OptPreference: - return "Preference" - case DHCPv6OptElapsedTime: - return "ElapsedTime" - case DHCPv6OptRelayMessage: - return "RelayMessage" - case DHCPv6OptAuth: - return "Auth" - case DHCPv6OptUnicast: - return "Unicast" - case DHCPv6OptStatusCode: - return "StatusCode" - case DHCPv6OptRapidCommit: - return "RapidCommit" - case DHCPv6OptUserClass: - return "UserClass" - case DHCPv6OptVendorClass: - return "VendorClass" - case DHCPv6OptVendorOpts: - return "VendorOpts" - case DHCPv6OptInterfaceID: - return "InterfaceID" - case DHCPv6OptReconfigureMessage: - return "ReconfigureMessage" - case DHCPv6OptReconfigureAccept: - return "ReconfigureAccept" - case DHCPv6OptSIPServersDomainList: - return "SIPServersDomainList" - case DHCPv6OptSIPServersAddressList: - return "SIPServersAddressList" - case DHCPv6OptDNSServers: - return "DNSRecursiveNameServer" - case DHCPv6OptDomainList: - return "DomainSearchList" - case DHCPv6OptIAPD: - return "IdentityAssociationPrefixDelegation" - case DHCPv6OptIAPrefix: - return "IAPDPrefix" - case DHCPv6OptNISServers: - return "NISServers" - case DHCPv6OptNISPServers: - return "NISv2Servers" - case DHCPv6OptNISDomainName: - return "NISDomainName" - case DHCPv6OptNISPDomainName: - return "NISv2DomainName" - case DHCPv6OptSNTPServers: - return "SNTPServers" - case DHCPv6OptInformationRefreshTime: - return "InformationRefreshTime" - case DHCPv6OptBCMCSServerDomainNameList: - return "BCMCSControlServersDomainNameList" - case DHCPv6OptBCMCSServerAddressList: - return "BCMCSControlServersAddressList" - case DHCPv6OptGeoconfCivic: - return "CivicAddress" - case DHCPv6OptRemoteID: - return "RelayAgentRemoteID" - case DHCPv6OptSubscriberID: - return "RelayAgentSubscriberID" - case DHCPv6OptClientFQDN: - return "ClientFQDN" - case DHCPv6OptPanaAgent: - return "PANAAuthenticationAgent" - case DHCPv6OptNewPOSIXTimezone: - return "NewPOSIXTimezone" - case DHCPv6OptNewTZDBTimezone: - return "NewTZDBTimezone" - case DHCPv6OptEchoRequestOption: - return "EchoRequest" - case DHCPv6OptLQQuery: - return "LeasequeryQuery" - case DHCPv6OptClientData: - return "LeasequeryClientData" - case DHCPv6OptCLTTime: - return "LeasequeryClientLastTransactionTime" - case DHCPv6OptLQRelayData: - return "LeasequeryRelayData" - case DHCPv6OptLQClientLink: - return "LeasequeryClientLink" - case DHCPv6OptMIP6HNIDF: - return "MIPv6HomeNetworkIDFQDN" - case DHCPv6OptMIP6VDINF: - return "MIPv6VisitedHomeNetworkInformation" - case DHCPv6OptMIP6IDINF: - return "MIPv6IdentifiedHomeNetworkInformation" - case DHCPv6OptMIP6UDINF: - return "MIPv6UnrestrictedHomeNetworkInformation" - case DHCPv6OptMIP6HNP: - return "MIPv6HomeNetworkPrefix" - case DHCPv6OptMIP6HAA: - return "MIPv6HomeAgentAddress" - case DHCPv6OptMIP6HAF: - return "MIPv6HomeAgentFQDN" - case DHCPv6OptV6LOST: - return "LoST Server" - case DHCPv6OptCAPWAPACV6: - return "CAPWAPAccessControllerV6" - case DHCPv6OptRelayID: - return "LeasequeryRelayID" - case DHCPv6OptIPv6AddressMoS: - return "MoSIPv6Address" - case DHCPv6OptIPv6FQDNMoS: - return "MoSDomainNameList" - case DHCPv6OptNTPServer: - return "NTPServer" - case DHCPv6OptV6AccessDomain: - return "AccessNetworkDomainName" - case DHCPv6OptSIPUACSList: - return "SIPUserAgentConfigurationServiceDomains" - case DHCPv6OptBootFileURL: - return "BootFileURL" - case DHCPv6OptBootFileParam: - return "BootFileParameters" - case DHCPv6OptClientArchType: - return "ClientSystemArchitectureType" - case DHCPv6OptNII: - return "ClientNetworkInterfaceIdentifier" - case DHCPv6OptGeolocation: - return "Geolocation" - case DHCPv6OptAFTRName: - return "AFTRName" - case DHCPv6OptERPLocalDomainName: - return "AFTRName" - case DHCPv6OptRSOO: - return "RSOOption" - case DHCPv6OptPDExclude: - return "PrefixExclude" - case DHCPv6OptVSS: - return "VirtualSubnetSelection" - case DHCPv6OptRDNSSSelection: - return "RDNSSSelection" - case DHCPv6OptKRBPrincipalName: - return "KerberosPrincipalName" - case DHCPv6OptKRBRealmName: - return "KerberosRealmName" - case DHCPv6OptKRBKDC: - return "KerberosKDC" - case DHCPv6OptClientLinkLayerAddress: - return "ClientLinkLayerAddress" - case DHCPv6OptLinkAddress: - return "LinkAddress" - case DHCPv6OptRADIUS: - return "RADIUS" - case DHCPv6OptSolMaxRt: - return "SolMaxRt" - case DHCPv6OptInfMaxRt: - return "InfMaxRt" - case DHCPv6OptAddrSel: - return "AddressSelection" - case DHCPv6OptAddrSelTable: - return "AddressSelectionTable" - case DHCPv6OptV6PCPServer: - return "PCPServer" - case DHCPv6OptDHCPv4Message: - return "DHCPv4Message" - case DHCPv6OptDHCPv4OverDHCPv6Server: - return "DHCP4o6ServerAddress" - case DHCPv6OptS46Rule: - return "S46Rule" - case DHCPv6OptS46BR: - return "S46BR" - case DHCPv6OptS46DMR: - return "S46DMR" - case DHCPv6OptS46V4V4Bind: - return "S46IPv4IPv6AddressBinding" - case DHCPv6OptS46PortParameters: - return "S46PortParameters" - case DHCPv6OptS46ContMAPE: - return "S46MAPEContainer" - case DHCPv6OptS46ContMAPT: - return "S46MAPTContainer" - case DHCPv6OptS46ContLW: - return "S46Lightweight4Over6Container" - case DHCPv6Opt4RD: - return "4RD" - case DHCPv6Opt4RDMapRule: - return "4RDMapRule" - case DHCPv6Opt4RDNonMapRule: - return "4RDNonMapRule" - case DHCPv6OptLQBaseTime: - return "LQBaseTime" - case DHCPv6OptLQStartTime: - return "LQStartTime" - case DHCPv6OptLQEndTime: - return "LQEndTime" - case DHCPv6OptCaptivePortal: - return "CaptivePortal" - case DHCPv6OptMPLParameters: - return "MPLParameterConfiguration" - case DHCPv6OptANIATT: - return "ANIAccessTechnologyType" - case DHCPv6OptANINetworkName: - return "ANINetworkName" - case DHCPv6OptANIAPName: - return "ANIAccessPointName" - case DHCPv6OptANIAPBSSID: - return "ANIAccessPointBSSID" - case DHCPv6OptANIOperatorID: - return "ANIOperatorIdentifier" - case DHCPv6OptANIOperatorRealm: - return "ANIOperatorRealm" - case DHCPv6OptS46Priority: - return "S64Priority" - case DHCPv6OptMUDURLV6: - return "ManufacturerUsageDescriptionURL" - case DHCPv6OptV6Prefix64: - return "V6Prefix64" - case DHCPv6OptFBindingStatus: - return "FailoverBindingStatus" - case DHCPv6OptFConnectFlags: - return "FailoverConnectFlags" - case DHCPv6OptFDNSRemovalInfo: - return "FailoverDNSRemovalInfo" - case DHCPv6OptFDNSHostName: - return "FailoverDNSHostName" - case DHCPv6OptFDNSZoneName: - return "FailoverDNSZoneName" - case DHCPv6OptFDNSFlags: - return "FailoverDNSFlags" - case DHCPv6OptFExpirationTime: - return "FailoverExpirationTime" - case DHCPv6OptFMaxUnacknowledgedBNDUPD: - return "FailoverMaxUnacknowledgedBNDUPDMessages" - case DHCPv6OptFMCLT: - return "FailoverMaximumClientLeadTime" - case DHCPv6OptFPartnerLifetime: - return "FailoverPartnerLifetime" - case DHCPv6OptFPartnerLifetimeSent: - return "FailoverPartnerLifetimeSent" - case DHCPv6OptFPartnerDownTime: - return "FailoverPartnerDownTime" - case DHCPv6OptFPartnerRawCltTime: - return "FailoverPartnerRawClientLeadTime" - case DHCPv6OptFProtocolVersion: - return "FailoverProtocolVersion" - case DHCPv6OptFKeepaliveTime: - return "FailoverKeepaliveTime" - case DHCPv6OptFReconfigureData: - return "FailoverReconfigureData" - case DHCPv6OptFRelationshipName: - return "FailoverRelationshipName" - case DHCPv6OptFServerFlags: - return "FailoverServerFlags" - case DHCPv6OptFServerState: - return "FailoverServerState" - case DHCPv6OptFStartTimeOfState: - return "FailoverStartTimeOfState" - case DHCPv6OptFStateExpirationTime: - return "FailoverStateExpirationTime" - case DHCPv6OptRelayPort: - return "RelayPort" - case DHCPv6OptV6ZeroTouchRedirect: - return "ZeroTouch" - case DHCPv6OptIPV6AddressANDSF: - return "ANDSFIPv6Address" - default: - return fmt.Sprintf("Unknown(%d)", uint16(o)) - } -} - -// DHCPv6Options is used to get nicely printed option lists which would normally -// be cut off after 5 options. -type DHCPv6Options []DHCPv6Option - -// String returns a string version of the options list. -func (o DHCPv6Options) String() string { - buf := &bytes.Buffer{} - buf.WriteByte('[') - for i, opt := range o { - buf.WriteString(opt.String()) - if i+1 != len(o) { - buf.WriteString(", ") - } - } - buf.WriteByte(']') - return buf.String() -} - -// DHCPv6Option rerpresents a DHCP option. -type DHCPv6Option struct { - Code DHCPv6Opt - Length uint16 - Data []byte -} - -// String returns a string version of a DHCP Option. -func (o DHCPv6Option) String() string { - switch o.Code { - case DHCPv6OptClientID, DHCPv6OptServerID: - duid, err := decodeDHCPv6DUID(o.Data) - if err != nil { - return fmt.Sprintf("Option(%s:INVALID)", o.Code) - } - return fmt.Sprintf("Option(%s:[%s])", o.Code, duid.String()) - case DHCPv6OptOro: - options := "" - for i := 0; i < int(o.Length); i += 2 { - if options != "" { - options += "," - } - option := DHCPv6Opt(binary.BigEndian.Uint16(o.Data[i : i+2])) - options += option.String() - } - return fmt.Sprintf("Option(%s:[%s])", o.Code, options) - default: - return fmt.Sprintf("Option(%s:%v)", o.Code, o.Data) - } -} - -// NewDHCPv6Option constructs a new DHCPv6Option with a given type and data. -func NewDHCPv6Option(code DHCPv6Opt, data []byte) DHCPv6Option { - o := DHCPv6Option{Code: code} - if data != nil { - o.Data = data - o.Length = uint16(len(data)) - } - - return o -} - -func (o *DHCPv6Option) encode(b []byte, opts gopacket.SerializeOptions) error { - binary.BigEndian.PutUint16(b[0:2], uint16(o.Code)) - if opts.FixLengths { - binary.BigEndian.PutUint16(b[2:4], uint16(len(o.Data))) - } else { - binary.BigEndian.PutUint16(b[2:4], o.Length) - } - copy(b[4:], o.Data) - - return nil -} - -func (o *DHCPv6Option) decode(data []byte) error { - if len(data) < 4 { - return errors.New("not enough data to decode") - } - o.Code = DHCPv6Opt(binary.BigEndian.Uint16(data[0:2])) - o.Length = binary.BigEndian.Uint16(data[2:4]) - if len(data) < 4+int(o.Length) { - return fmt.Errorf("dhcpv6 option size < length %d", 4+o.Length) - } - o.Data = data[4 : 4+o.Length] - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/dns.go b/vendor/github.com/google/gopacket/layers/dns.go deleted file mode 100644 index de55294b5bb..00000000000 --- a/vendor/github.com/google/gopacket/layers/dns.go +++ /dev/null @@ -1,1098 +0,0 @@ -// Copyright 2014, 2018 GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "net" - "strings" - - "github.com/google/gopacket" -) - -// DNSClass defines the class associated with a request/response. Different DNS -// classes can be thought of as an array of parallel namespace trees. -type DNSClass uint16 - -// DNSClass known values. -const ( - DNSClassIN DNSClass = 1 // Internet - DNSClassCS DNSClass = 2 // the CSNET class (Obsolete) - DNSClassCH DNSClass = 3 // the CHAOS class - DNSClassHS DNSClass = 4 // Hesiod [Dyer 87] - DNSClassAny DNSClass = 255 // AnyClass -) - -func (dc DNSClass) String() string { - switch dc { - default: - return "Unknown" - case DNSClassIN: - return "IN" - case DNSClassCS: - return "CS" - case DNSClassCH: - return "CH" - case DNSClassHS: - return "HS" - case DNSClassAny: - return "Any" - } -} - -// DNSType defines the type of data being requested/returned in a -// question/answer. -type DNSType uint16 - -// DNSType known values. -const ( - DNSTypeA DNSType = 1 // a host address - DNSTypeNS DNSType = 2 // an authoritative name server - DNSTypeMD DNSType = 3 // a mail destination (Obsolete - use MX) - DNSTypeMF DNSType = 4 // a mail forwarder (Obsolete - use MX) - DNSTypeCNAME DNSType = 5 // the canonical name for an alias - DNSTypeSOA DNSType = 6 // marks the start of a zone of authority - DNSTypeMB DNSType = 7 // a mailbox domain name (EXPERIMENTAL) - DNSTypeMG DNSType = 8 // a mail group member (EXPERIMENTAL) - DNSTypeMR DNSType = 9 // a mail rename domain name (EXPERIMENTAL) - DNSTypeNULL DNSType = 10 // a null RR (EXPERIMENTAL) - DNSTypeWKS DNSType = 11 // a well known service description - DNSTypePTR DNSType = 12 // a domain name pointer - DNSTypeHINFO DNSType = 13 // host information - DNSTypeMINFO DNSType = 14 // mailbox or mail list information - DNSTypeMX DNSType = 15 // mail exchange - DNSTypeTXT DNSType = 16 // text strings - DNSTypeAAAA DNSType = 28 // a IPv6 host address [RFC3596] - DNSTypeSRV DNSType = 33 // server discovery [RFC2782] [RFC6195] - DNSTypeOPT DNSType = 41 // OPT Pseudo-RR [RFC6891] - DNSTypeURI DNSType = 256 // URI RR [RFC7553] -) - -func (dt DNSType) String() string { - switch dt { - default: - return "Unknown" - case DNSTypeA: - return "A" - case DNSTypeNS: - return "NS" - case DNSTypeMD: - return "MD" - case DNSTypeMF: - return "MF" - case DNSTypeCNAME: - return "CNAME" - case DNSTypeSOA: - return "SOA" - case DNSTypeMB: - return "MB" - case DNSTypeMG: - return "MG" - case DNSTypeMR: - return "MR" - case DNSTypeNULL: - return "NULL" - case DNSTypeWKS: - return "WKS" - case DNSTypePTR: - return "PTR" - case DNSTypeHINFO: - return "HINFO" - case DNSTypeMINFO: - return "MINFO" - case DNSTypeMX: - return "MX" - case DNSTypeTXT: - return "TXT" - case DNSTypeAAAA: - return "AAAA" - case DNSTypeSRV: - return "SRV" - case DNSTypeOPT: - return "OPT" - case DNSTypeURI: - return "URI" - } -} - -// DNSResponseCode provides response codes for question answers. -type DNSResponseCode uint8 - -// DNSResponseCode known values. -const ( - DNSResponseCodeNoErr DNSResponseCode = 0 // No error - DNSResponseCodeFormErr DNSResponseCode = 1 // Format Error [RFC1035] - DNSResponseCodeServFail DNSResponseCode = 2 // Server Failure [RFC1035] - DNSResponseCodeNXDomain DNSResponseCode = 3 // Non-Existent Domain [RFC1035] - DNSResponseCodeNotImp DNSResponseCode = 4 // Not Implemented [RFC1035] - DNSResponseCodeRefused DNSResponseCode = 5 // Query Refused [RFC1035] - DNSResponseCodeYXDomain DNSResponseCode = 6 // Name Exists when it should not [RFC2136] - DNSResponseCodeYXRRSet DNSResponseCode = 7 // RR Set Exists when it should not [RFC2136] - DNSResponseCodeNXRRSet DNSResponseCode = 8 // RR Set that should exist does not [RFC2136] - DNSResponseCodeNotAuth DNSResponseCode = 9 // Server Not Authoritative for zone [RFC2136] - DNSResponseCodeNotZone DNSResponseCode = 10 // Name not contained in zone [RFC2136] - DNSResponseCodeBadVers DNSResponseCode = 16 // Bad OPT Version [RFC2671] - DNSResponseCodeBadSig DNSResponseCode = 16 // TSIG Signature Failure [RFC2845] - DNSResponseCodeBadKey DNSResponseCode = 17 // Key not recognized [RFC2845] - DNSResponseCodeBadTime DNSResponseCode = 18 // Signature out of time window [RFC2845] - DNSResponseCodeBadMode DNSResponseCode = 19 // Bad TKEY Mode [RFC2930] - DNSResponseCodeBadName DNSResponseCode = 20 // Duplicate key name [RFC2930] - DNSResponseCodeBadAlg DNSResponseCode = 21 // Algorithm not supported [RFC2930] - DNSResponseCodeBadTruc DNSResponseCode = 22 // Bad Truncation [RFC4635] - DNSResponseCodeBadCookie DNSResponseCode = 23 // Bad/missing Server Cookie [RFC7873] -) - -func (drc DNSResponseCode) String() string { - switch drc { - default: - return "Unknown" - case DNSResponseCodeNoErr: - return "No Error" - case DNSResponseCodeFormErr: - return "Format Error" - case DNSResponseCodeServFail: - return "Server Failure " - case DNSResponseCodeNXDomain: - return "Non-Existent Domain" - case DNSResponseCodeNotImp: - return "Not Implemented" - case DNSResponseCodeRefused: - return "Query Refused" - case DNSResponseCodeYXDomain: - return "Name Exists when it should not" - case DNSResponseCodeYXRRSet: - return "RR Set Exists when it should not" - case DNSResponseCodeNXRRSet: - return "RR Set that should exist does not" - case DNSResponseCodeNotAuth: - return "Server Not Authoritative for zone" - case DNSResponseCodeNotZone: - return "Name not contained in zone" - case DNSResponseCodeBadVers: - return "Bad OPT Version" - case DNSResponseCodeBadKey: - return "Key not recognized" - case DNSResponseCodeBadTime: - return "Signature out of time window" - case DNSResponseCodeBadMode: - return "Bad TKEY Mode" - case DNSResponseCodeBadName: - return "Duplicate key name" - case DNSResponseCodeBadAlg: - return "Algorithm not supported" - case DNSResponseCodeBadTruc: - return "Bad Truncation" - case DNSResponseCodeBadCookie: - return "Bad Cookie" - } -} - -// DNSOpCode defines a set of different operation types. -type DNSOpCode uint8 - -// DNSOpCode known values. -const ( - DNSOpCodeQuery DNSOpCode = 0 // Query [RFC1035] - DNSOpCodeIQuery DNSOpCode = 1 // Inverse Query Obsolete [RFC3425] - DNSOpCodeStatus DNSOpCode = 2 // Status [RFC1035] - DNSOpCodeNotify DNSOpCode = 4 // Notify [RFC1996] - DNSOpCodeUpdate DNSOpCode = 5 // Update [RFC2136] -) - -func (doc DNSOpCode) String() string { - switch doc { - default: - return "Unknown" - case DNSOpCodeQuery: - return "Query" - case DNSOpCodeIQuery: - return "Inverse Query" - case DNSOpCodeStatus: - return "Status" - case DNSOpCodeNotify: - return "Notify" - case DNSOpCodeUpdate: - return "Update" - } -} - -// DNS is specified in RFC 1034 / RFC 1035 -// +---------------------+ -// | Header | -// +---------------------+ -// | Question | the question for the name server -// +---------------------+ -// | Answer | RRs answering the question -// +---------------------+ -// | Authority | RRs pointing toward an authority -// +---------------------+ -// | Additional | RRs holding additional information -// +---------------------+ -// -// DNS Header -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | ID | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// |QR| Opcode |AA|TC|RD|RA| Z | RCODE | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | QDCOUNT | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | ANCOUNT | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | NSCOUNT | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | ARCOUNT | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -// DNS contains data from a single Domain Name Service packet. -type DNS struct { - BaseLayer - - // Header fields - ID uint16 - QR bool - OpCode DNSOpCode - - AA bool // Authoritative answer - TC bool // Truncated - RD bool // Recursion desired - RA bool // Recursion available - Z uint8 // Reserved for future use - - ResponseCode DNSResponseCode - QDCount uint16 // Number of questions to expect - ANCount uint16 // Number of answers to expect - NSCount uint16 // Number of authorities to expect - ARCount uint16 // Number of additional records to expect - - // Entries - Questions []DNSQuestion - Answers []DNSResourceRecord - Authorities []DNSResourceRecord - Additionals []DNSResourceRecord - - // buffer for doing name decoding. We use a single reusable buffer to avoid - // name decoding on a single object via multiple DecodeFromBytes calls - // requiring constant allocation of small byte slices. - buffer []byte -} - -// LayerType returns gopacket.LayerTypeDNS. -func (d *DNS) LayerType() gopacket.LayerType { return LayerTypeDNS } - -// decodeDNS decodes the byte slice into a DNS type. It also -// setups the application Layer in PacketBuilder. -func decodeDNS(data []byte, p gopacket.PacketBuilder) error { - d := &DNS{} - err := d.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(d) - p.SetApplicationLayer(d) - return nil -} - -// DecodeFromBytes decodes the slice into the DNS struct. -func (d *DNS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - d.buffer = d.buffer[:0] - - if len(data) < 12 { - df.SetTruncated() - return errDNSPacketTooShort - } - - // since there are no further layers, the baselayer's content is - // pointing to this layer - d.BaseLayer = BaseLayer{Contents: data[:len(data)]} - d.ID = binary.BigEndian.Uint16(data[:2]) - d.QR = data[2]&0x80 != 0 - d.OpCode = DNSOpCode(data[2]>>3) & 0x0F - d.AA = data[2]&0x04 != 0 - d.TC = data[2]&0x02 != 0 - d.RD = data[2]&0x01 != 0 - d.RA = data[3]&0x80 != 0 - d.Z = uint8(data[3]>>4) & 0x7 - d.ResponseCode = DNSResponseCode(data[3] & 0xF) - d.QDCount = binary.BigEndian.Uint16(data[4:6]) - d.ANCount = binary.BigEndian.Uint16(data[6:8]) - d.NSCount = binary.BigEndian.Uint16(data[8:10]) - d.ARCount = binary.BigEndian.Uint16(data[10:12]) - - d.Questions = d.Questions[:0] - d.Answers = d.Answers[:0] - d.Authorities = d.Authorities[:0] - d.Additionals = d.Additionals[:0] - - offset := 12 - var err error - for i := 0; i < int(d.QDCount); i++ { - var q DNSQuestion - if offset, err = q.decode(data, offset, df, &d.buffer); err != nil { - return err - } - d.Questions = append(d.Questions, q) - } - - // For some horrible reason, if we do the obvious thing in this loop: - // var r DNSResourceRecord - // if blah := r.decode(blah); err != nil { - // return err - // } - // d.Foo = append(d.Foo, r) - // the Go compiler thinks that 'r' escapes to the heap, causing a malloc for - // every Answer, Authority, and Additional. To get around this, we do - // something really silly: we append an empty resource record to our slice, - // then use the last value in the slice to call decode. Since the value is - // already in the slice, there's no WAY it can escape... on the other hand our - // code is MUCH uglier :( - for i := 0; i < int(d.ANCount); i++ { - d.Answers = append(d.Answers, DNSResourceRecord{}) - if offset, err = d.Answers[i].decode(data, offset, df, &d.buffer); err != nil { - d.Answers = d.Answers[:i] // strip off erroneous value - return err - } - } - for i := 0; i < int(d.NSCount); i++ { - d.Authorities = append(d.Authorities, DNSResourceRecord{}) - if offset, err = d.Authorities[i].decode(data, offset, df, &d.buffer); err != nil { - d.Authorities = d.Authorities[:i] // strip off erroneous value - return err - } - } - for i := 0; i < int(d.ARCount); i++ { - d.Additionals = append(d.Additionals, DNSResourceRecord{}) - if offset, err = d.Additionals[i].decode(data, offset, df, &d.buffer); err != nil { - d.Additionals = d.Additionals[:i] // strip off erroneous value - return err - } - // extract extended RCODE from OPT RRs, RFC 6891 section 6.1.3 - if d.Additionals[i].Type == DNSTypeOPT { - d.ResponseCode = DNSResponseCode(uint8(d.ResponseCode) | uint8(d.Additionals[i].TTL>>20&0xF0)) - } - } - - if uint16(len(d.Questions)) != d.QDCount { - return errDecodeQueryBadQDCount - } else if uint16(len(d.Answers)) != d.ANCount { - return errDecodeQueryBadANCount - } else if uint16(len(d.Authorities)) != d.NSCount { - return errDecodeQueryBadNSCount - } else if uint16(len(d.Additionals)) != d.ARCount { - return errDecodeQueryBadARCount - } - return nil -} - -// CanDecode implements gopacket.DecodingLayer. -func (d *DNS) CanDecode() gopacket.LayerClass { - return LayerTypeDNS -} - -// NextLayerType implements gopacket.DecodingLayer. -func (d *DNS) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -// Payload returns nil. -func (d *DNS) Payload() []byte { - return nil -} - -func b2i(b bool) int { - if b { - return 1 - } - return 0 -} - -func recSize(rr *DNSResourceRecord) int { - switch rr.Type { - case DNSTypeA: - return 4 - case DNSTypeAAAA: - return 16 - case DNSTypeNS: - return len(rr.NS) + 2 - case DNSTypeCNAME: - return len(rr.CNAME) + 2 - case DNSTypePTR: - return len(rr.PTR) + 2 - case DNSTypeSOA: - return len(rr.SOA.MName) + 2 + len(rr.SOA.RName) + 2 + 20 - case DNSTypeMX: - return 2 + len(rr.MX.Name) + 2 - case DNSTypeTXT: - l := len(rr.TXTs) - for _, txt := range rr.TXTs { - l += len(txt) - } - return l - case DNSTypeSRV: - return 6 + len(rr.SRV.Name) + 2 - case DNSTypeURI: - return 4 + len(rr.URI.Target) - case DNSTypeOPT: - l := len(rr.OPT) * 4 - for _, opt := range rr.OPT { - l += len(opt.Data) - } - return l - } - - return 0 -} - -func computeSize(recs []DNSResourceRecord) int { - sz := 0 - for _, rr := range recs { - v := len(rr.Name) - - if v == 0 { - sz += v + 11 - } else { - sz += v + 12 - } - - sz += recSize(&rr) - } - return sz -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -func (d *DNS) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - dsz := 0 - for _, q := range d.Questions { - dsz += len(q.Name) + 6 - } - dsz += computeSize(d.Answers) - dsz += computeSize(d.Authorities) - dsz += computeSize(d.Additionals) - - bytes, err := b.PrependBytes(12 + dsz) - if err != nil { - return err - } - binary.BigEndian.PutUint16(bytes, d.ID) - bytes[2] = byte((b2i(d.QR) << 7) | (int(d.OpCode) << 3) | (b2i(d.AA) << 2) | (b2i(d.TC) << 1) | b2i(d.RD)) - bytes[3] = byte((b2i(d.RA) << 7) | (int(d.Z) << 4) | int(d.ResponseCode)) - - if opts.FixLengths { - d.QDCount = uint16(len(d.Questions)) - d.ANCount = uint16(len(d.Answers)) - d.NSCount = uint16(len(d.Authorities)) - d.ARCount = uint16(len(d.Additionals)) - } - binary.BigEndian.PutUint16(bytes[4:], d.QDCount) - binary.BigEndian.PutUint16(bytes[6:], d.ANCount) - binary.BigEndian.PutUint16(bytes[8:], d.NSCount) - binary.BigEndian.PutUint16(bytes[10:], d.ARCount) - - off := 12 - for _, qd := range d.Questions { - n := qd.encode(bytes, off) - off += n - } - - for i := range d.Answers { - // done this way so we can modify DNSResourceRecord to fix - // lengths if requested - qa := &d.Answers[i] - n, err := qa.encode(bytes, off, opts) - if err != nil { - return err - } - off += n - } - - for i := range d.Authorities { - qa := &d.Authorities[i] - n, err := qa.encode(bytes, off, opts) - if err != nil { - return err - } - off += n - } - for i := range d.Additionals { - qa := &d.Additionals[i] - n, err := qa.encode(bytes, off, opts) - if err != nil { - return err - } - off += n - } - - return nil -} - -const maxRecursionLevel = 255 - -func decodeName(data []byte, offset int, buffer *[]byte, level int) ([]byte, int, error) { - if level > maxRecursionLevel { - return nil, 0, errMaxRecursion - } else if offset >= len(data) { - return nil, 0, errDNSNameOffsetTooHigh - } else if offset < 0 { - return nil, 0, errDNSNameOffsetNegative - } - start := len(*buffer) - index := offset - if data[index] == 0x00 { - return nil, index + 1, nil - } -loop: - for data[index] != 0x00 { - switch data[index] & 0xc0 { - default: - /* RFC 1035 - A domain name represented as a sequence of labels, where - each label consists of a length octet followed by that - number of octets. The domain name terminates with the - zero length octet for the null label of the root. Note - that this field may be an odd number of octets; no - padding is used. - */ - index2 := index + int(data[index]) + 1 - if index2-offset > 255 { - return nil, 0, errDNSNameTooLong - } else if index2 < index+1 || index2 > len(data) { - return nil, 0, errDNSNameInvalidIndex - } - *buffer = append(*buffer, '.') - *buffer = append(*buffer, data[index+1:index2]...) - index = index2 - - case 0xc0: - /* RFC 1035 - The pointer takes the form of a two octet sequence. - - The first two bits are ones. This allows a pointer to - be distinguished from a label, since the label must - begin with two zero bits because labels are restricted - to 63 octets or less. (The 10 and 01 combinations are - reserved for future use.) The OFFSET field specifies - an offset from the start of the message (i.e., the - first octet of the ID field in the domain header). A - zero offset specifies the first byte of the ID field, - etc. - - The compression scheme allows a domain name in a message to be - represented as either: - - a sequence of labels ending in a zero octet - - a pointer - - a sequence of labels ending with a pointer - */ - if index+2 > len(data) { - return nil, 0, errDNSPointerOffsetTooHigh - } - offsetp := int(binary.BigEndian.Uint16(data[index:index+2]) & 0x3fff) - if offsetp > len(data) { - return nil, 0, errDNSPointerOffsetTooHigh - } - // This looks a little tricky, but actually isn't. Because of how - // decodeName is written, calling it appends the decoded name to the - // current buffer. We already have the start of the buffer, then, so - // once this call is done buffer[start:] will contain our full name. - _, _, err := decodeName(data, offsetp, buffer, level+1) - if err != nil { - return nil, 0, err - } - index++ // pointer is two bytes, so add an extra byte here. - break loop - /* EDNS, or other DNS option ? */ - case 0x40: // RFC 2673 - return nil, 0, fmt.Errorf("qname '0x40' - RFC 2673 unsupported yet (data=%x index=%d)", - data[index], index) - - case 0x80: - return nil, 0, fmt.Errorf("qname '0x80' unsupported yet (data=%x index=%d)", - data[index], index) - } - if index >= len(data) { - return nil, 0, errDNSIndexOutOfRange - } - } - if len(*buffer) <= start { - return (*buffer)[start:], index + 1, nil - } - return (*buffer)[start+1:], index + 1, nil -} - -// DNSQuestion wraps a single request (question) within a DNS query. -type DNSQuestion struct { - Name []byte - Type DNSType - Class DNSClass -} - -func (q *DNSQuestion) decode(data []byte, offset int, df gopacket.DecodeFeedback, buffer *[]byte) (int, error) { - name, endq, err := decodeName(data, offset, buffer, 1) - if err != nil { - return 0, err - } - - q.Name = name - q.Type = DNSType(binary.BigEndian.Uint16(data[endq : endq+2])) - q.Class = DNSClass(binary.BigEndian.Uint16(data[endq+2 : endq+4])) - - return endq + 4, nil -} - -func (q *DNSQuestion) encode(data []byte, offset int) int { - noff := encodeName(q.Name, data, offset) - nSz := noff - offset - binary.BigEndian.PutUint16(data[noff:], uint16(q.Type)) - binary.BigEndian.PutUint16(data[noff+2:], uint16(q.Class)) - return nSz + 4 -} - -// DNSResourceRecord -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | | -// / / -// / NAME / -// | | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | TYPE | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | CLASS | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | TTL | -// | | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | RDLENGTH | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| -// / RDATA / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -// DNSResourceRecord wraps the data from a single DNS resource within a -// response. -type DNSResourceRecord struct { - // Header - Name []byte - Type DNSType - Class DNSClass - TTL uint32 - - // RDATA Raw Values - DataLength uint16 - Data []byte - - // RDATA Decoded Values - IP net.IP - NS, CNAME, PTR []byte - TXTs [][]byte - SOA DNSSOA - SRV DNSSRV - MX DNSMX - OPT []DNSOPT // See RFC 6891, section 6.1.2 - URI DNSURI - - // Undecoded TXT for backward compatibility - TXT []byte -} - -// decode decodes the resource record, returning the total length of the record. -func (rr *DNSResourceRecord) decode(data []byte, offset int, df gopacket.DecodeFeedback, buffer *[]byte) (int, error) { - name, endq, err := decodeName(data, offset, buffer, 1) - if err != nil { - return 0, err - } - - rr.Name = name - rr.Type = DNSType(binary.BigEndian.Uint16(data[endq : endq+2])) - rr.Class = DNSClass(binary.BigEndian.Uint16(data[endq+2 : endq+4])) - rr.TTL = binary.BigEndian.Uint32(data[endq+4 : endq+8]) - rr.DataLength = binary.BigEndian.Uint16(data[endq+8 : endq+10]) - end := endq + 10 + int(rr.DataLength) - if end > len(data) { - return 0, errDecodeRecordLength - } - rr.Data = data[endq+10 : end] - - if err = rr.decodeRData(data[:end], endq+10, buffer); err != nil { - return 0, err - } - - return endq + 10 + int(rr.DataLength), nil -} - -func encodeName(name []byte, data []byte, offset int) int { - l := 0 - for i := range name { - if name[i] == '.' { - data[offset+i-l] = byte(l) - l = 0 - } else { - // skip one to write the length - data[offset+i+1] = name[i] - l++ - } - } - - if len(name) == 0 { - data[offset] = 0x00 // terminal - return offset + 1 - } - - // length for final portion - data[offset+len(name)-l] = byte(l) - data[offset+len(name)+1] = 0x00 // terminal - return offset + len(name) + 2 -} - -func (rr *DNSResourceRecord) encode(data []byte, offset int, opts gopacket.SerializeOptions) (int, error) { - - noff := encodeName(rr.Name, data, offset) - nSz := noff - offset - - binary.BigEndian.PutUint16(data[noff:], uint16(rr.Type)) - binary.BigEndian.PutUint16(data[noff+2:], uint16(rr.Class)) - binary.BigEndian.PutUint32(data[noff+4:], uint32(rr.TTL)) - - switch rr.Type { - case DNSTypeA: - copy(data[noff+10:], rr.IP.To4()) - case DNSTypeAAAA: - copy(data[noff+10:], rr.IP) - case DNSTypeNS: - encodeName(rr.NS, data, noff+10) - case DNSTypeCNAME: - encodeName(rr.CNAME, data, noff+10) - case DNSTypePTR: - encodeName(rr.PTR, data, noff+10) - case DNSTypeSOA: - noff2 := encodeName(rr.SOA.MName, data, noff+10) - noff2 = encodeName(rr.SOA.RName, data, noff2) - binary.BigEndian.PutUint32(data[noff2:], rr.SOA.Serial) - binary.BigEndian.PutUint32(data[noff2+4:], rr.SOA.Refresh) - binary.BigEndian.PutUint32(data[noff2+8:], rr.SOA.Retry) - binary.BigEndian.PutUint32(data[noff2+12:], rr.SOA.Expire) - binary.BigEndian.PutUint32(data[noff2+16:], rr.SOA.Minimum) - case DNSTypeMX: - binary.BigEndian.PutUint16(data[noff+10:], rr.MX.Preference) - encodeName(rr.MX.Name, data, noff+12) - case DNSTypeTXT: - noff2 := noff + 10 - for _, txt := range rr.TXTs { - data[noff2] = byte(len(txt)) - copy(data[noff2+1:], txt) - noff2 += 1 + len(txt) - } - case DNSTypeSRV: - binary.BigEndian.PutUint16(data[noff+10:], rr.SRV.Priority) - binary.BigEndian.PutUint16(data[noff+12:], rr.SRV.Weight) - binary.BigEndian.PutUint16(data[noff+14:], rr.SRV.Port) - encodeName(rr.SRV.Name, data, noff+16) - case DNSTypeURI: - binary.BigEndian.PutUint16(data[noff+10:], rr.URI.Priority) - binary.BigEndian.PutUint16(data[noff+12:], rr.URI.Weight) - copy(data[noff+14:], rr.URI.Target) - case DNSTypeOPT: - noff2 := noff + 10 - for _, opt := range rr.OPT { - binary.BigEndian.PutUint16(data[noff2:], uint16(opt.Code)) - binary.BigEndian.PutUint16(data[noff2+2:], uint16(len(opt.Data))) - copy(data[noff2+4:], opt.Data) - noff2 += 4 + len(opt.Data) - } - default: - return 0, fmt.Errorf("serializing resource record of type %v not supported", rr.Type) - } - - // DataLength - dSz := recSize(rr) - binary.BigEndian.PutUint16(data[noff+8:], uint16(dSz)) - - if opts.FixLengths { - rr.DataLength = uint16(dSz) - } - - return nSz + 10 + dSz, nil -} - -func (rr *DNSResourceRecord) String() string { - - if rr.Type == DNSTypeOPT { - opts := make([]string, len(rr.OPT)) - for i, opt := range rr.OPT { - opts[i] = opt.String() - } - return "OPT " + strings.Join(opts, ",") - } - if rr.Type == DNSTypeURI { - return fmt.Sprintf("URI %d %d %s", rr.URI.Priority, rr.URI.Weight, string(rr.URI.Target)) - } - if rr.Class == DNSClassIN { - switch rr.Type { - case DNSTypeA, DNSTypeAAAA: - return rr.IP.String() - case DNSTypeNS: - return "NS " + string(rr.NS) - case DNSTypeCNAME: - return "CNAME " + string(rr.CNAME) - case DNSTypePTR: - return "PTR " + string(rr.PTR) - case DNSTypeTXT: - return "TXT " + string(rr.TXT) - } - } - - return fmt.Sprintf("<%v, %v>", rr.Class, rr.Type) -} - -func decodeCharacterStrings(data []byte) ([][]byte, error) { - strings := make([][]byte, 0, 1) - end := len(data) - for index, index2 := 0, 0; index != end; index = index2 { - index2 = index + 1 + int(data[index]) // index increases by 1..256 and does not overflow - if index2 > end { - return nil, errCharStringMissData - } - strings = append(strings, data[index+1:index2]) - } - return strings, nil -} - -func decodeOPTs(data []byte, offset int) ([]DNSOPT, error) { - allOPT := []DNSOPT{} - end := len(data) - - if offset == end { - return allOPT, nil // There is no data to read - } - - if offset+4 > end { - return allOPT, fmt.Errorf("DNSOPT record is of length %d, it should be at least length 4", end-offset) - } - - for i := offset; i < end; { - opt := DNSOPT{} - if len(data) < i+4 { - return allOPT, fmt.Errorf("Malformed DNSOPT record. Length %d < %d", len(data), i+4) - } - opt.Code = DNSOptionCode(binary.BigEndian.Uint16(data[i : i+2])) - l := binary.BigEndian.Uint16(data[i+2 : i+4]) - if i+4+int(l) > end { - return allOPT, fmt.Errorf("Malformed DNSOPT record. The length (%d) field implies a packet larger than the one received", l) - } - opt.Data = data[i+4 : i+4+int(l)] - allOPT = append(allOPT, opt) - i += int(l) + 4 - } - return allOPT, nil -} - -func (rr *DNSResourceRecord) decodeRData(data []byte, offset int, buffer *[]byte) error { - switch rr.Type { - case DNSTypeA: - rr.IP = rr.Data - case DNSTypeAAAA: - rr.IP = rr.Data - case DNSTypeTXT, DNSTypeHINFO: - rr.TXT = rr.Data - txts, err := decodeCharacterStrings(rr.Data) - if err != nil { - return err - } - rr.TXTs = txts - case DNSTypeNS: - name, _, err := decodeName(data, offset, buffer, 1) - if err != nil { - return err - } - rr.NS = name - case DNSTypeCNAME: - name, _, err := decodeName(data, offset, buffer, 1) - if err != nil { - return err - } - rr.CNAME = name - case DNSTypePTR: - name, _, err := decodeName(data, offset, buffer, 1) - if err != nil { - return err - } - rr.PTR = name - case DNSTypeSOA: - name, endq, err := decodeName(data, offset, buffer, 1) - if err != nil { - return err - } - rr.SOA.MName = name - name, endq, err = decodeName(data, endq, buffer, 1) - if err != nil { - return err - } - if len(data) < endq+20 { - return errors.New("SOA too small") - } - rr.SOA.RName = name - rr.SOA.Serial = binary.BigEndian.Uint32(data[endq : endq+4]) - rr.SOA.Refresh = binary.BigEndian.Uint32(data[endq+4 : endq+8]) - rr.SOA.Retry = binary.BigEndian.Uint32(data[endq+8 : endq+12]) - rr.SOA.Expire = binary.BigEndian.Uint32(data[endq+12 : endq+16]) - rr.SOA.Minimum = binary.BigEndian.Uint32(data[endq+16 : endq+20]) - case DNSTypeMX: - if len(data) < offset+2 { - return errors.New("MX too small") - } - rr.MX.Preference = binary.BigEndian.Uint16(data[offset : offset+2]) - name, _, err := decodeName(data, offset+2, buffer, 1) - if err != nil { - return err - } - rr.MX.Name = name - case DNSTypeURI: - if len(rr.Data) < 4 { - return errors.New("URI too small") - } - rr.URI.Priority = binary.BigEndian.Uint16(data[offset : offset+2]) - rr.URI.Weight = binary.BigEndian.Uint16(data[offset+2 : offset+4]) - rr.URI.Target = rr.Data[4:] - case DNSTypeSRV: - if len(data) < offset+6 { - return errors.New("SRV too small") - } - rr.SRV.Priority = binary.BigEndian.Uint16(data[offset : offset+2]) - rr.SRV.Weight = binary.BigEndian.Uint16(data[offset+2 : offset+4]) - rr.SRV.Port = binary.BigEndian.Uint16(data[offset+4 : offset+6]) - name, _, err := decodeName(data, offset+6, buffer, 1) - if err != nil { - return err - } - rr.SRV.Name = name - case DNSTypeOPT: - allOPT, err := decodeOPTs(data, offset) - if err != nil { - return err - } - rr.OPT = allOPT - } - return nil -} - -// DNSSOA is a Start of Authority record. Each domain requires a SOA record at -// the cutover where a domain is delegated from its parent. -type DNSSOA struct { - MName, RName []byte - Serial, Refresh, Retry, Expire, Minimum uint32 -} - -// DNSSRV is a Service record, defining a location (hostname/port) of a -// server/service. -type DNSSRV struct { - Priority, Weight, Port uint16 - Name []byte -} - -// DNSMX is a mail exchange record, defining a mail server for a recipient's -// domain. -type DNSMX struct { - Preference uint16 - Name []byte -} - -// DNSURI is a URI record, defining a target (URI) of a server/service -type DNSURI struct { - Priority, Weight uint16 - Target []byte -} - -// DNSOptionCode represents the code of a DNS Option, see RFC6891, section 6.1.2 -type DNSOptionCode uint16 - -func (doc DNSOptionCode) String() string { - switch doc { - default: - return "Unknown" - case DNSOptionCodeNSID: - return "NSID" - case DNSOptionCodeDAU: - return "DAU" - case DNSOptionCodeDHU: - return "DHU" - case DNSOptionCodeN3U: - return "N3U" - case DNSOptionCodeEDNSClientSubnet: - return "EDNSClientSubnet" - case DNSOptionCodeEDNSExpire: - return "EDNSExpire" - case DNSOptionCodeCookie: - return "Cookie" - case DNSOptionCodeEDNSKeepAlive: - return "EDNSKeepAlive" - case DNSOptionCodePadding: - return "CodePadding" - case DNSOptionCodeChain: - return "CodeChain" - case DNSOptionCodeEDNSKeyTag: - return "CodeEDNSKeyTag" - case DNSOptionCodeEDNSClientTag: - return "EDNSClientTag" - case DNSOptionCodeEDNSServerTag: - return "EDNSServerTag" - case DNSOptionCodeDeviceID: - return "DeviceID" - } -} - -// DNSOptionCode known values. See IANA -const ( - DNSOptionCodeNSID DNSOptionCode = 3 - DNSOptionCodeDAU DNSOptionCode = 5 - DNSOptionCodeDHU DNSOptionCode = 6 - DNSOptionCodeN3U DNSOptionCode = 7 - DNSOptionCodeEDNSClientSubnet DNSOptionCode = 8 - DNSOptionCodeEDNSExpire DNSOptionCode = 9 - DNSOptionCodeCookie DNSOptionCode = 10 - DNSOptionCodeEDNSKeepAlive DNSOptionCode = 11 - DNSOptionCodePadding DNSOptionCode = 12 - DNSOptionCodeChain DNSOptionCode = 13 - DNSOptionCodeEDNSKeyTag DNSOptionCode = 14 - DNSOptionCodeEDNSClientTag DNSOptionCode = 16 - DNSOptionCodeEDNSServerTag DNSOptionCode = 17 - DNSOptionCodeDeviceID DNSOptionCode = 26946 -) - -// DNSOPT is a DNS Option, see RFC6891, section 6.1.2 -type DNSOPT struct { - Code DNSOptionCode - Data []byte -} - -func (opt DNSOPT) String() string { - return fmt.Sprintf("%s=%x", opt.Code, opt.Data) -} - -var ( - errMaxRecursion = errors.New("max DNS recursion level hit") - - errDNSNameOffsetTooHigh = errors.New("dns name offset too high") - errDNSNameOffsetNegative = errors.New("dns name offset is negative") - errDNSPacketTooShort = errors.New("DNS packet too short") - errDNSNameTooLong = errors.New("dns name is too long") - errDNSNameInvalidIndex = errors.New("dns name uncomputable: invalid index") - errDNSPointerOffsetTooHigh = errors.New("dns offset pointer too high") - errDNSIndexOutOfRange = errors.New("dns index walked out of range") - errDNSNameHasNoData = errors.New("no dns data found for name") - - errCharStringMissData = errors.New("Insufficient data for a ") - - errDecodeRecordLength = errors.New("resource record length exceeds data") - - errDecodeQueryBadQDCount = errors.New("Invalid query decoding, not the right number of questions") - errDecodeQueryBadANCount = errors.New("Invalid query decoding, not the right number of answers") - errDecodeQueryBadNSCount = errors.New("Invalid query decoding, not the right number of authorities") - errDecodeQueryBadARCount = errors.New("Invalid query decoding, not the right number of additionals info") -) diff --git a/vendor/github.com/google/gopacket/layers/doc.go b/vendor/github.com/google/gopacket/layers/doc.go deleted file mode 100644 index 3c882c3fa0d..00000000000 --- a/vendor/github.com/google/gopacket/layers/doc.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -/* -Package layers provides decoding layers for many common protocols. - -The layers package contains decode implementations for a number of different -types of packet layers. Users of gopacket will almost always want to also use -layers to actually decode packet data into useful pieces. To see the set of -protocols that gopacket/layers is currently able to decode, -look at the set of LayerTypes defined in the Variables sections. The -layers package also defines endpoints for many of the common packet layers -that have source/destination addresses associated with them, for example IPv4/6 -(IPs) and TCP/UDP (ports). -Finally, layers contains a number of useful enumerations (IPProtocol, -EthernetType, LinkType, PPPType, etc...). Many of these implement the -gopacket.Decoder interface, so they can be passed into gopacket as decoders. - -Most common protocol layers are named using acronyms or other industry-common -names (IPv4, TCP, PPP). Some of the less common ones have their names expanded -(CiscoDiscoveryProtocol). -For certain protocols, sub-parts of the protocol are split out into their own -layers (SCTP, for example). This is done mostly in cases where portions of the -protocol may fulfill the capabilities of interesting layers (SCTPData implements -ApplicationLayer, while base SCTP implements TransportLayer), or possibly -because splitting a protocol into a few layers makes decoding easier. - -This package is meant to be used with its parent, -http://github.com/google/gopacket. - -Port Types - -Instead of using raw uint16 or uint8 values for ports, we use a different port -type for every protocol, for example TCPPort and UDPPort. This allows us to -override string behavior for each port, which we do by setting up port name -maps (TCPPortNames, UDPPortNames, etc...). Well-known ports are annotated with -their protocol names, and their String function displays these names: - - p := TCPPort(80) - fmt.Printf("Number: %d String: %v", p, p) - // Prints: "Number: 80 String: 80(http)" - -Modifying Decode Behavior - -layers links together decoding through its enumerations. For example, after -decoding layer type Ethernet, it uses Ethernet.EthernetType as its next decoder. -All enumerations that act as decoders, like EthernetType, can be modified by -users depending on their preferences. For example, if you have a spiffy new -IPv4 decoder that works way better than the one built into layers, you can do -this: - - var mySpiffyIPv4Decoder gopacket.Decoder = ... - layers.EthernetTypeMetadata[EthernetTypeIPv4].DecodeWith = mySpiffyIPv4Decoder - -This will make all future ethernet packets use your new decoder to decode IPv4 -packets, instead of the built-in decoder used by gopacket. -*/ -package layers diff --git a/vendor/github.com/google/gopacket/layers/dot11.go b/vendor/github.com/google/gopacket/layers/dot11.go deleted file mode 100644 index 3e649106105..00000000000 --- a/vendor/github.com/google/gopacket/layers/dot11.go +++ /dev/null @@ -1,2118 +0,0 @@ -// Copyright 2014 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -// See http://standards.ieee.org/findstds/standard/802.11-2012.html for info on -// all of the layers in this file. - -package layers - -import ( - "bytes" - "encoding/binary" - "fmt" - "hash/crc32" - "net" - - "github.com/google/gopacket" -) - -// Dot11Flags contains the set of 8 flags in the IEEE 802.11 frame control -// header, all in one place. -type Dot11Flags uint8 - -const ( - Dot11FlagsToDS Dot11Flags = 1 << iota - Dot11FlagsFromDS - Dot11FlagsMF - Dot11FlagsRetry - Dot11FlagsPowerManagement - Dot11FlagsMD - Dot11FlagsWEP - Dot11FlagsOrder -) - -func (d Dot11Flags) ToDS() bool { - return d&Dot11FlagsToDS != 0 -} -func (d Dot11Flags) FromDS() bool { - return d&Dot11FlagsFromDS != 0 -} -func (d Dot11Flags) MF() bool { - return d&Dot11FlagsMF != 0 -} -func (d Dot11Flags) Retry() bool { - return d&Dot11FlagsRetry != 0 -} -func (d Dot11Flags) PowerManagement() bool { - return d&Dot11FlagsPowerManagement != 0 -} -func (d Dot11Flags) MD() bool { - return d&Dot11FlagsMD != 0 -} -func (d Dot11Flags) WEP() bool { - return d&Dot11FlagsWEP != 0 -} -func (d Dot11Flags) Order() bool { - return d&Dot11FlagsOrder != 0 -} - -// String provides a human readable string for Dot11Flags. -// This string is possibly subject to change over time; if you're storing this -// persistently, you should probably store the Dot11Flags value, not its string. -func (a Dot11Flags) String() string { - var out bytes.Buffer - if a.ToDS() { - out.WriteString("TO-DS,") - } - if a.FromDS() { - out.WriteString("FROM-DS,") - } - if a.MF() { - out.WriteString("MF,") - } - if a.Retry() { - out.WriteString("Retry,") - } - if a.PowerManagement() { - out.WriteString("PowerManagement,") - } - if a.MD() { - out.WriteString("MD,") - } - if a.WEP() { - out.WriteString("WEP,") - } - if a.Order() { - out.WriteString("Order,") - } - - if length := out.Len(); length > 0 { - return string(out.Bytes()[:length-1]) // strip final comma - } - return "" -} - -type Dot11Reason uint16 - -// TODO: Verify these reasons, and append more reasons if necessary. - -const ( - Dot11ReasonReserved Dot11Reason = 1 - Dot11ReasonUnspecified Dot11Reason = 2 - Dot11ReasonAuthExpired Dot11Reason = 3 - Dot11ReasonDeauthStLeaving Dot11Reason = 4 - Dot11ReasonInactivity Dot11Reason = 5 - Dot11ReasonApFull Dot11Reason = 6 - Dot11ReasonClass2FromNonAuth Dot11Reason = 7 - Dot11ReasonClass3FromNonAss Dot11Reason = 8 - Dot11ReasonDisasStLeaving Dot11Reason = 9 - Dot11ReasonStNotAuth Dot11Reason = 10 -) - -// String provides a human readable string for Dot11Reason. -// This string is possibly subject to change over time; if you're storing this -// persistently, you should probably store the Dot11Reason value, not its string. -func (a Dot11Reason) String() string { - switch a { - case Dot11ReasonReserved: - return "Reserved" - case Dot11ReasonUnspecified: - return "Unspecified" - case Dot11ReasonAuthExpired: - return "Auth. expired" - case Dot11ReasonDeauthStLeaving: - return "Deauth. st. leaving" - case Dot11ReasonInactivity: - return "Inactivity" - case Dot11ReasonApFull: - return "Ap. full" - case Dot11ReasonClass2FromNonAuth: - return "Class2 from non auth." - case Dot11ReasonClass3FromNonAss: - return "Class3 from non ass." - case Dot11ReasonDisasStLeaving: - return "Disass st. leaving" - case Dot11ReasonStNotAuth: - return "St. not auth." - default: - return "Unknown reason" - } -} - -type Dot11Status uint16 - -const ( - Dot11StatusSuccess Dot11Status = 0 - Dot11StatusFailure Dot11Status = 1 // Unspecified failure - Dot11StatusCannotSupportAllCapabilities Dot11Status = 10 // Cannot support all requested capabilities in the Capability Information field - Dot11StatusInabilityExistsAssociation Dot11Status = 11 // Reassociation denied due to inability to confirm that association exists - Dot11StatusAssociationDenied Dot11Status = 12 // Association denied due to reason outside the scope of this standard - Dot11StatusAlgorithmUnsupported Dot11Status = 13 // Responding station does not support the specified authentication algorithm - Dot11StatusOufOfExpectedSequence Dot11Status = 14 // Received an Authentication frame with authentication transaction sequence number out of expected sequence - Dot11StatusChallengeFailure Dot11Status = 15 // Authentication rejected because of challenge failure - Dot11StatusTimeout Dot11Status = 16 // Authentication rejected due to timeout waiting for next frame in sequence - Dot11StatusAPUnableToHandle Dot11Status = 17 // Association denied because AP is unable to handle additional associated stations - Dot11StatusRateUnsupported Dot11Status = 18 // Association denied due to requesting station not supporting all of the data rates in the BSSBasicRateSet parameter -) - -// String provides a human readable string for Dot11Status. -// This string is possibly subject to change over time; if you're storing this -// persistently, you should probably store the Dot11Status value, not its string. -func (a Dot11Status) String() string { - switch a { - case Dot11StatusSuccess: - return "success" - case Dot11StatusFailure: - return "failure" - case Dot11StatusCannotSupportAllCapabilities: - return "cannot-support-all-capabilities" - case Dot11StatusInabilityExistsAssociation: - return "inability-exists-association" - case Dot11StatusAssociationDenied: - return "association-denied" - case Dot11StatusAlgorithmUnsupported: - return "algorithm-unsupported" - case Dot11StatusOufOfExpectedSequence: - return "out-of-expected-sequence" - case Dot11StatusChallengeFailure: - return "challenge-failure" - case Dot11StatusTimeout: - return "timeout" - case Dot11StatusAPUnableToHandle: - return "ap-unable-to-handle" - case Dot11StatusRateUnsupported: - return "rate-unsupported" - default: - return "unknown status" - } -} - -type Dot11AckPolicy uint8 - -const ( - Dot11AckPolicyNormal Dot11AckPolicy = 0 - Dot11AckPolicyNone Dot11AckPolicy = 1 - Dot11AckPolicyNoExplicit Dot11AckPolicy = 2 - Dot11AckPolicyBlock Dot11AckPolicy = 3 -) - -// String provides a human readable string for Dot11AckPolicy. -// This string is possibly subject to change over time; if you're storing this -// persistently, you should probably store the Dot11AckPolicy value, not its string. -func (a Dot11AckPolicy) String() string { - switch a { - case Dot11AckPolicyNormal: - return "normal-ack" - case Dot11AckPolicyNone: - return "no-ack" - case Dot11AckPolicyNoExplicit: - return "no-explicit-ack" - case Dot11AckPolicyBlock: - return "block-ack" - default: - return "unknown-ack-policy" - } -} - -type Dot11Algorithm uint16 - -const ( - Dot11AlgorithmOpen Dot11Algorithm = 0 - Dot11AlgorithmSharedKey Dot11Algorithm = 1 -) - -// String provides a human readable string for Dot11Algorithm. -// This string is possibly subject to change over time; if you're storing this -// persistently, you should probably store the Dot11Algorithm value, not its string. -func (a Dot11Algorithm) String() string { - switch a { - case Dot11AlgorithmOpen: - return "open" - case Dot11AlgorithmSharedKey: - return "shared-key" - default: - return "unknown-algorithm" - } -} - -type Dot11InformationElementID uint8 - -const ( - Dot11InformationElementIDSSID Dot11InformationElementID = 0 - Dot11InformationElementIDRates Dot11InformationElementID = 1 - Dot11InformationElementIDFHSet Dot11InformationElementID = 2 - Dot11InformationElementIDDSSet Dot11InformationElementID = 3 - Dot11InformationElementIDCFSet Dot11InformationElementID = 4 - Dot11InformationElementIDTIM Dot11InformationElementID = 5 - Dot11InformationElementIDIBSSSet Dot11InformationElementID = 6 - Dot11InformationElementIDCountryInfo Dot11InformationElementID = 7 - Dot11InformationElementIDHoppingPatternParam Dot11InformationElementID = 8 - Dot11InformationElementIDHoppingPatternTable Dot11InformationElementID = 9 - Dot11InformationElementIDRequest Dot11InformationElementID = 10 - Dot11InformationElementIDQBSSLoadElem Dot11InformationElementID = 11 - Dot11InformationElementIDEDCAParamSet Dot11InformationElementID = 12 - Dot11InformationElementIDTrafficSpec Dot11InformationElementID = 13 - Dot11InformationElementIDTrafficClass Dot11InformationElementID = 14 - Dot11InformationElementIDSchedule Dot11InformationElementID = 15 - Dot11InformationElementIDChallenge Dot11InformationElementID = 16 - Dot11InformationElementIDPowerConst Dot11InformationElementID = 32 - Dot11InformationElementIDPowerCapability Dot11InformationElementID = 33 - Dot11InformationElementIDTPCRequest Dot11InformationElementID = 34 - Dot11InformationElementIDTPCReport Dot11InformationElementID = 35 - Dot11InformationElementIDSupportedChannels Dot11InformationElementID = 36 - Dot11InformationElementIDSwitchChannelAnnounce Dot11InformationElementID = 37 - Dot11InformationElementIDMeasureRequest Dot11InformationElementID = 38 - Dot11InformationElementIDMeasureReport Dot11InformationElementID = 39 - Dot11InformationElementIDQuiet Dot11InformationElementID = 40 - Dot11InformationElementIDIBSSDFS Dot11InformationElementID = 41 - Dot11InformationElementIDERPInfo Dot11InformationElementID = 42 - Dot11InformationElementIDTSDelay Dot11InformationElementID = 43 - Dot11InformationElementIDTCLASProcessing Dot11InformationElementID = 44 - Dot11InformationElementIDHTCapabilities Dot11InformationElementID = 45 - Dot11InformationElementIDQOSCapability Dot11InformationElementID = 46 - Dot11InformationElementIDERPInfo2 Dot11InformationElementID = 47 - Dot11InformationElementIDRSNInfo Dot11InformationElementID = 48 - Dot11InformationElementIDESRates Dot11InformationElementID = 50 - Dot11InformationElementIDAPChannelReport Dot11InformationElementID = 51 - Dot11InformationElementIDNeighborReport Dot11InformationElementID = 52 - Dot11InformationElementIDRCPI Dot11InformationElementID = 53 - Dot11InformationElementIDMobilityDomain Dot11InformationElementID = 54 - Dot11InformationElementIDFastBSSTrans Dot11InformationElementID = 55 - Dot11InformationElementIDTimeoutInt Dot11InformationElementID = 56 - Dot11InformationElementIDRICData Dot11InformationElementID = 57 - Dot11InformationElementIDDSERegisteredLoc Dot11InformationElementID = 58 - Dot11InformationElementIDSuppOperatingClass Dot11InformationElementID = 59 - Dot11InformationElementIDExtChanSwitchAnnounce Dot11InformationElementID = 60 - Dot11InformationElementIDHTInfo Dot11InformationElementID = 61 - Dot11InformationElementIDSecChanOffset Dot11InformationElementID = 62 - Dot11InformationElementIDBSSAverageAccessDelay Dot11InformationElementID = 63 - Dot11InformationElementIDAntenna Dot11InformationElementID = 64 - Dot11InformationElementIDRSNI Dot11InformationElementID = 65 - Dot11InformationElementIDMeasurePilotTrans Dot11InformationElementID = 66 - Dot11InformationElementIDBSSAvailAdmCapacity Dot11InformationElementID = 67 - Dot11InformationElementIDBSSACAccDelayWAPIParam Dot11InformationElementID = 68 - Dot11InformationElementIDTimeAdvertisement Dot11InformationElementID = 69 - Dot11InformationElementIDRMEnabledCapabilities Dot11InformationElementID = 70 - Dot11InformationElementIDMultipleBSSID Dot11InformationElementID = 71 - Dot11InformationElementID2040BSSCoExist Dot11InformationElementID = 72 - Dot11InformationElementID2040BSSIntChanReport Dot11InformationElementID = 73 - Dot11InformationElementIDOverlapBSSScanParam Dot11InformationElementID = 74 - Dot11InformationElementIDRICDescriptor Dot11InformationElementID = 75 - Dot11InformationElementIDManagementMIC Dot11InformationElementID = 76 - Dot11InformationElementIDEventRequest Dot11InformationElementID = 78 - Dot11InformationElementIDEventReport Dot11InformationElementID = 79 - Dot11InformationElementIDDiagnosticRequest Dot11InformationElementID = 80 - Dot11InformationElementIDDiagnosticReport Dot11InformationElementID = 81 - Dot11InformationElementIDLocationParam Dot11InformationElementID = 82 - Dot11InformationElementIDNonTransBSSIDCapability Dot11InformationElementID = 83 - Dot11InformationElementIDSSIDList Dot11InformationElementID = 84 - Dot11InformationElementIDMultipleBSSIDIndex Dot11InformationElementID = 85 - Dot11InformationElementIDFMSDescriptor Dot11InformationElementID = 86 - Dot11InformationElementIDFMSRequest Dot11InformationElementID = 87 - Dot11InformationElementIDFMSResponse Dot11InformationElementID = 88 - Dot11InformationElementIDQOSTrafficCapability Dot11InformationElementID = 89 - Dot11InformationElementIDBSSMaxIdlePeriod Dot11InformationElementID = 90 - Dot11InformationElementIDTFSRequest Dot11InformationElementID = 91 - Dot11InformationElementIDTFSResponse Dot11InformationElementID = 92 - Dot11InformationElementIDWNMSleepMode Dot11InformationElementID = 93 - Dot11InformationElementIDTIMBroadcastRequest Dot11InformationElementID = 94 - Dot11InformationElementIDTIMBroadcastResponse Dot11InformationElementID = 95 - Dot11InformationElementIDCollInterferenceReport Dot11InformationElementID = 96 - Dot11InformationElementIDChannelUsage Dot11InformationElementID = 97 - Dot11InformationElementIDTimeZone Dot11InformationElementID = 98 - Dot11InformationElementIDDMSRequest Dot11InformationElementID = 99 - Dot11InformationElementIDDMSResponse Dot11InformationElementID = 100 - Dot11InformationElementIDLinkIdentifier Dot11InformationElementID = 101 - Dot11InformationElementIDWakeupSchedule Dot11InformationElementID = 102 - Dot11InformationElementIDChannelSwitchTiming Dot11InformationElementID = 104 - Dot11InformationElementIDPTIControl Dot11InformationElementID = 105 - Dot11InformationElementIDPUBufferStatus Dot11InformationElementID = 106 - Dot11InformationElementIDInterworking Dot11InformationElementID = 107 - Dot11InformationElementIDAdvertisementProtocol Dot11InformationElementID = 108 - Dot11InformationElementIDExpBWRequest Dot11InformationElementID = 109 - Dot11InformationElementIDQOSMapSet Dot11InformationElementID = 110 - Dot11InformationElementIDRoamingConsortium Dot11InformationElementID = 111 - Dot11InformationElementIDEmergencyAlertIdentifier Dot11InformationElementID = 112 - Dot11InformationElementIDMeshConfiguration Dot11InformationElementID = 113 - Dot11InformationElementIDMeshID Dot11InformationElementID = 114 - Dot11InformationElementIDMeshLinkMetricReport Dot11InformationElementID = 115 - Dot11InformationElementIDCongestionNotification Dot11InformationElementID = 116 - Dot11InformationElementIDMeshPeeringManagement Dot11InformationElementID = 117 - Dot11InformationElementIDMeshChannelSwitchParam Dot11InformationElementID = 118 - Dot11InformationElementIDMeshAwakeWindows Dot11InformationElementID = 119 - Dot11InformationElementIDBeaconTiming Dot11InformationElementID = 120 - Dot11InformationElementIDMCCAOPSetupRequest Dot11InformationElementID = 121 - Dot11InformationElementIDMCCAOPSetupReply Dot11InformationElementID = 122 - Dot11InformationElementIDMCCAOPAdvertisement Dot11InformationElementID = 123 - Dot11InformationElementIDMCCAOPTeardown Dot11InformationElementID = 124 - Dot11InformationElementIDGateAnnouncement Dot11InformationElementID = 125 - Dot11InformationElementIDRootAnnouncement Dot11InformationElementID = 126 - Dot11InformationElementIDExtCapability Dot11InformationElementID = 127 - Dot11InformationElementIDAgereProprietary Dot11InformationElementID = 128 - Dot11InformationElementIDPathRequest Dot11InformationElementID = 130 - Dot11InformationElementIDPathReply Dot11InformationElementID = 131 - Dot11InformationElementIDPathError Dot11InformationElementID = 132 - Dot11InformationElementIDCiscoCCX1CKIPDeviceName Dot11InformationElementID = 133 - Dot11InformationElementIDCiscoCCX2 Dot11InformationElementID = 136 - Dot11InformationElementIDProxyUpdate Dot11InformationElementID = 137 - Dot11InformationElementIDProxyUpdateConfirmation Dot11InformationElementID = 138 - Dot11InformationElementIDAuthMeshPerringExch Dot11InformationElementID = 139 - Dot11InformationElementIDMIC Dot11InformationElementID = 140 - Dot11InformationElementIDDestinationURI Dot11InformationElementID = 141 - Dot11InformationElementIDUAPSDCoexistence Dot11InformationElementID = 142 - Dot11InformationElementIDWakeupSchedule80211ad Dot11InformationElementID = 143 - Dot11InformationElementIDExtendedSchedule Dot11InformationElementID = 144 - Dot11InformationElementIDSTAAvailability Dot11InformationElementID = 145 - Dot11InformationElementIDDMGTSPEC Dot11InformationElementID = 146 - Dot11InformationElementIDNextDMGATI Dot11InformationElementID = 147 - Dot11InformationElementIDDMSCapabilities Dot11InformationElementID = 148 - Dot11InformationElementIDCiscoUnknown95 Dot11InformationElementID = 149 - Dot11InformationElementIDVendor2 Dot11InformationElementID = 150 - Dot11InformationElementIDDMGOperating Dot11InformationElementID = 151 - Dot11InformationElementIDDMGBSSParamChange Dot11InformationElementID = 152 - Dot11InformationElementIDDMGBeamRefinement Dot11InformationElementID = 153 - Dot11InformationElementIDChannelMeasFeedback Dot11InformationElementID = 154 - Dot11InformationElementIDAwakeWindow Dot11InformationElementID = 157 - Dot11InformationElementIDMultiBand Dot11InformationElementID = 158 - Dot11InformationElementIDADDBAExtension Dot11InformationElementID = 159 - Dot11InformationElementIDNEXTPCPList Dot11InformationElementID = 160 - Dot11InformationElementIDPCPHandover Dot11InformationElementID = 161 - Dot11InformationElementIDDMGLinkMargin Dot11InformationElementID = 162 - Dot11InformationElementIDSwitchingStream Dot11InformationElementID = 163 - Dot11InformationElementIDSessionTransmission Dot11InformationElementID = 164 - Dot11InformationElementIDDynamicTonePairReport Dot11InformationElementID = 165 - Dot11InformationElementIDClusterReport Dot11InformationElementID = 166 - Dot11InformationElementIDRelayCapabilities Dot11InformationElementID = 167 - Dot11InformationElementIDRelayTransferParameter Dot11InformationElementID = 168 - Dot11InformationElementIDBeamlinkMaintenance Dot11InformationElementID = 169 - Dot11InformationElementIDMultipleMacSublayers Dot11InformationElementID = 170 - Dot11InformationElementIDUPID Dot11InformationElementID = 171 - Dot11InformationElementIDDMGLinkAdaptionAck Dot11InformationElementID = 172 - Dot11InformationElementIDSymbolProprietary Dot11InformationElementID = 173 - Dot11InformationElementIDMCCAOPAdvertOverview Dot11InformationElementID = 174 - Dot11InformationElementIDQuietPeriodRequest Dot11InformationElementID = 175 - Dot11InformationElementIDQuietPeriodResponse Dot11InformationElementID = 177 - Dot11InformationElementIDECPACPolicy Dot11InformationElementID = 182 - Dot11InformationElementIDClusterTimeOffset Dot11InformationElementID = 183 - Dot11InformationElementIDAntennaSectorID Dot11InformationElementID = 190 - Dot11InformationElementIDVHTCapabilities Dot11InformationElementID = 191 - Dot11InformationElementIDVHTOperation Dot11InformationElementID = 192 - Dot11InformationElementIDExtendedBSSLoad Dot11InformationElementID = 193 - Dot11InformationElementIDWideBWChannelSwitch Dot11InformationElementID = 194 - Dot11InformationElementIDVHTTxPowerEnvelope Dot11InformationElementID = 195 - Dot11InformationElementIDChannelSwitchWrapper Dot11InformationElementID = 196 - Dot11InformationElementIDOperatingModeNotification Dot11InformationElementID = 199 - Dot11InformationElementIDUPSIM Dot11InformationElementID = 200 - Dot11InformationElementIDReducedNeighborReport Dot11InformationElementID = 201 - Dot11InformationElementIDTVHTOperation Dot11InformationElementID = 202 - Dot11InformationElementIDDeviceLocation Dot11InformationElementID = 204 - Dot11InformationElementIDWhiteSpaceMap Dot11InformationElementID = 205 - Dot11InformationElementIDFineTuningMeasureParams Dot11InformationElementID = 206 - Dot11InformationElementIDVendor Dot11InformationElementID = 221 -) - -// String provides a human readable string for Dot11InformationElementID. -// This string is possibly subject to change over time; if you're storing this -// persistently, you should probably store the Dot11InformationElementID value, -// not its string. -func (a Dot11InformationElementID) String() string { - switch a { - case Dot11InformationElementIDSSID: - return "SSID parameter set" - case Dot11InformationElementIDRates: - return "Supported Rates" - case Dot11InformationElementIDFHSet: - return "FH Parameter set" - case Dot11InformationElementIDDSSet: - return "DS Parameter set" - case Dot11InformationElementIDCFSet: - return "CF Parameter set" - case Dot11InformationElementIDTIM: - return "Traffic Indication Map (TIM)" - case Dot11InformationElementIDIBSSSet: - return "IBSS Parameter set" - case Dot11InformationElementIDCountryInfo: - return "Country Information" - case Dot11InformationElementIDHoppingPatternParam: - return "Hopping Pattern Parameters" - case Dot11InformationElementIDHoppingPatternTable: - return "Hopping Pattern Table" - case Dot11InformationElementIDRequest: - return "Request" - case Dot11InformationElementIDQBSSLoadElem: - return "QBSS Load Element" - case Dot11InformationElementIDEDCAParamSet: - return "EDCA Parameter Set" - case Dot11InformationElementIDTrafficSpec: - return "Traffic Specification" - case Dot11InformationElementIDTrafficClass: - return "Traffic Classification" - case Dot11InformationElementIDSchedule: - return "Schedule" - case Dot11InformationElementIDChallenge: - return "Challenge text" - case Dot11InformationElementIDPowerConst: - return "Power Constraint" - case Dot11InformationElementIDPowerCapability: - return "Power Capability" - case Dot11InformationElementIDTPCRequest: - return "TPC Request" - case Dot11InformationElementIDTPCReport: - return "TPC Report" - case Dot11InformationElementIDSupportedChannels: - return "Supported Channels" - case Dot11InformationElementIDSwitchChannelAnnounce: - return "Channel Switch Announcement" - case Dot11InformationElementIDMeasureRequest: - return "Measurement Request" - case Dot11InformationElementIDMeasureReport: - return "Measurement Report" - case Dot11InformationElementIDQuiet: - return "Quiet" - case Dot11InformationElementIDIBSSDFS: - return "IBSS DFS" - case Dot11InformationElementIDERPInfo: - return "ERP Information" - case Dot11InformationElementIDTSDelay: - return "TS Delay" - case Dot11InformationElementIDTCLASProcessing: - return "TCLAS Processing" - case Dot11InformationElementIDHTCapabilities: - return "HT Capabilities (802.11n D1.10)" - case Dot11InformationElementIDQOSCapability: - return "QOS Capability" - case Dot11InformationElementIDERPInfo2: - return "ERP Information-2" - case Dot11InformationElementIDRSNInfo: - return "RSN Information" - case Dot11InformationElementIDESRates: - return "Extended Supported Rates" - case Dot11InformationElementIDAPChannelReport: - return "AP Channel Report" - case Dot11InformationElementIDNeighborReport: - return "Neighbor Report" - case Dot11InformationElementIDRCPI: - return "RCPI" - case Dot11InformationElementIDMobilityDomain: - return "Mobility Domain" - case Dot11InformationElementIDFastBSSTrans: - return "Fast BSS Transition" - case Dot11InformationElementIDTimeoutInt: - return "Timeout Interval" - case Dot11InformationElementIDRICData: - return "RIC Data" - case Dot11InformationElementIDDSERegisteredLoc: - return "DSE Registered Location" - case Dot11InformationElementIDSuppOperatingClass: - return "Supported Operating Classes" - case Dot11InformationElementIDExtChanSwitchAnnounce: - return "Extended Channel Switch Announcement" - case Dot11InformationElementIDHTInfo: - return "HT Information (802.11n D1.10)" - case Dot11InformationElementIDSecChanOffset: - return "Secondary Channel Offset (802.11n D1.10)" - case Dot11InformationElementIDBSSAverageAccessDelay: - return "BSS Average Access Delay" - case Dot11InformationElementIDAntenna: - return "Antenna" - case Dot11InformationElementIDRSNI: - return "RSNI" - case Dot11InformationElementIDMeasurePilotTrans: - return "Measurement Pilot Transmission" - case Dot11InformationElementIDBSSAvailAdmCapacity: - return "BSS Available Admission Capacity" - case Dot11InformationElementIDBSSACAccDelayWAPIParam: - return "BSS AC Access Delay/WAPI Parameter Set" - case Dot11InformationElementIDTimeAdvertisement: - return "Time Advertisement" - case Dot11InformationElementIDRMEnabledCapabilities: - return "RM Enabled Capabilities" - case Dot11InformationElementIDMultipleBSSID: - return "Multiple BSSID" - case Dot11InformationElementID2040BSSCoExist: - return "20/40 BSS Coexistence" - case Dot11InformationElementID2040BSSIntChanReport: - return "20/40 BSS Intolerant Channel Report" - case Dot11InformationElementIDOverlapBSSScanParam: - return "Overlapping BSS Scan Parameters" - case Dot11InformationElementIDRICDescriptor: - return "RIC Descriptor" - case Dot11InformationElementIDManagementMIC: - return "Management MIC" - case Dot11InformationElementIDEventRequest: - return "Event Request" - case Dot11InformationElementIDEventReport: - return "Event Report" - case Dot11InformationElementIDDiagnosticRequest: - return "Diagnostic Request" - case Dot11InformationElementIDDiagnosticReport: - return "Diagnostic Report" - case Dot11InformationElementIDLocationParam: - return "Location Parameters" - case Dot11InformationElementIDNonTransBSSIDCapability: - return "Non Transmitted BSSID Capability" - case Dot11InformationElementIDSSIDList: - return "SSID List" - case Dot11InformationElementIDMultipleBSSIDIndex: - return "Multiple BSSID Index" - case Dot11InformationElementIDFMSDescriptor: - return "FMS Descriptor" - case Dot11InformationElementIDFMSRequest: - return "FMS Request" - case Dot11InformationElementIDFMSResponse: - return "FMS Response" - case Dot11InformationElementIDQOSTrafficCapability: - return "QoS Traffic Capability" - case Dot11InformationElementIDBSSMaxIdlePeriod: - return "BSS Max Idle Period" - case Dot11InformationElementIDTFSRequest: - return "TFS Request" - case Dot11InformationElementIDTFSResponse: - return "TFS Response" - case Dot11InformationElementIDWNMSleepMode: - return "WNM-Sleep Mode" - case Dot11InformationElementIDTIMBroadcastRequest: - return "TIM Broadcast Request" - case Dot11InformationElementIDTIMBroadcastResponse: - return "TIM Broadcast Response" - case Dot11InformationElementIDCollInterferenceReport: - return "Collocated Interference Report" - case Dot11InformationElementIDChannelUsage: - return "Channel Usage" - case Dot11InformationElementIDTimeZone: - return "Time Zone" - case Dot11InformationElementIDDMSRequest: - return "DMS Request" - case Dot11InformationElementIDDMSResponse: - return "DMS Response" - case Dot11InformationElementIDLinkIdentifier: - return "Link Identifier" - case Dot11InformationElementIDWakeupSchedule: - return "Wakeup Schedule" - case Dot11InformationElementIDChannelSwitchTiming: - return "Channel Switch Timing" - case Dot11InformationElementIDPTIControl: - return "PTI Control" - case Dot11InformationElementIDPUBufferStatus: - return "PU Buffer Status" - case Dot11InformationElementIDInterworking: - return "Interworking" - case Dot11InformationElementIDAdvertisementProtocol: - return "Advertisement Protocol" - case Dot11InformationElementIDExpBWRequest: - return "Expedited Bandwidth Request" - case Dot11InformationElementIDQOSMapSet: - return "QoS Map Set" - case Dot11InformationElementIDRoamingConsortium: - return "Roaming Consortium" - case Dot11InformationElementIDEmergencyAlertIdentifier: - return "Emergency Alert Identifier" - case Dot11InformationElementIDMeshConfiguration: - return "Mesh Configuration" - case Dot11InformationElementIDMeshID: - return "Mesh ID" - case Dot11InformationElementIDMeshLinkMetricReport: - return "Mesh Link Metric Report" - case Dot11InformationElementIDCongestionNotification: - return "Congestion Notification" - case Dot11InformationElementIDMeshPeeringManagement: - return "Mesh Peering Management" - case Dot11InformationElementIDMeshChannelSwitchParam: - return "Mesh Channel Switch Parameters" - case Dot11InformationElementIDMeshAwakeWindows: - return "Mesh Awake Windows" - case Dot11InformationElementIDBeaconTiming: - return "Beacon Timing" - case Dot11InformationElementIDMCCAOPSetupRequest: - return "MCCAOP Setup Request" - case Dot11InformationElementIDMCCAOPSetupReply: - return "MCCAOP SETUP Reply" - case Dot11InformationElementIDMCCAOPAdvertisement: - return "MCCAOP Advertisement" - case Dot11InformationElementIDMCCAOPTeardown: - return "MCCAOP Teardown" - case Dot11InformationElementIDGateAnnouncement: - return "Gate Announcement" - case Dot11InformationElementIDRootAnnouncement: - return "Root Announcement" - case Dot11InformationElementIDExtCapability: - return "Extended Capabilities" - case Dot11InformationElementIDAgereProprietary: - return "Agere Proprietary" - case Dot11InformationElementIDPathRequest: - return "Path Request" - case Dot11InformationElementIDPathReply: - return "Path Reply" - case Dot11InformationElementIDPathError: - return "Path Error" - case Dot11InformationElementIDCiscoCCX1CKIPDeviceName: - return "Cisco CCX1 CKIP + Device Name" - case Dot11InformationElementIDCiscoCCX2: - return "Cisco CCX2" - case Dot11InformationElementIDProxyUpdate: - return "Proxy Update" - case Dot11InformationElementIDProxyUpdateConfirmation: - return "Proxy Update Confirmation" - case Dot11InformationElementIDAuthMeshPerringExch: - return "Auhenticated Mesh Perring Exchange" - case Dot11InformationElementIDMIC: - return "MIC (Message Integrity Code)" - case Dot11InformationElementIDDestinationURI: - return "Destination URI" - case Dot11InformationElementIDUAPSDCoexistence: - return "U-APSD Coexistence" - case Dot11InformationElementIDWakeupSchedule80211ad: - return "Wakeup Schedule 802.11ad" - case Dot11InformationElementIDExtendedSchedule: - return "Extended Schedule" - case Dot11InformationElementIDSTAAvailability: - return "STA Availability" - case Dot11InformationElementIDDMGTSPEC: - return "DMG TSPEC" - case Dot11InformationElementIDNextDMGATI: - return "Next DMG ATI" - case Dot11InformationElementIDDMSCapabilities: - return "DMG Capabilities" - case Dot11InformationElementIDCiscoUnknown95: - return "Cisco Unknown 95" - case Dot11InformationElementIDVendor2: - return "Vendor Specific" - case Dot11InformationElementIDDMGOperating: - return "DMG Operating" - case Dot11InformationElementIDDMGBSSParamChange: - return "DMG BSS Parameter Change" - case Dot11InformationElementIDDMGBeamRefinement: - return "DMG Beam Refinement" - case Dot11InformationElementIDChannelMeasFeedback: - return "Channel Measurement Feedback" - case Dot11InformationElementIDAwakeWindow: - return "Awake Window" - case Dot11InformationElementIDMultiBand: - return "Multi Band" - case Dot11InformationElementIDADDBAExtension: - return "ADDBA Extension" - case Dot11InformationElementIDNEXTPCPList: - return "NEXTPCP List" - case Dot11InformationElementIDPCPHandover: - return "PCP Handover" - case Dot11InformationElementIDDMGLinkMargin: - return "DMG Link Margin" - case Dot11InformationElementIDSwitchingStream: - return "Switching Stream" - case Dot11InformationElementIDSessionTransmission: - return "Session Transmission" - case Dot11InformationElementIDDynamicTonePairReport: - return "Dynamic Tone Pairing Report" - case Dot11InformationElementIDClusterReport: - return "Cluster Report" - case Dot11InformationElementIDRelayCapabilities: - return "Relay Capabilities" - case Dot11InformationElementIDRelayTransferParameter: - return "Relay Transfer Parameter" - case Dot11InformationElementIDBeamlinkMaintenance: - return "Beamlink Maintenance" - case Dot11InformationElementIDMultipleMacSublayers: - return "Multiple MAC Sublayers" - case Dot11InformationElementIDUPID: - return "U-PID" - case Dot11InformationElementIDDMGLinkAdaptionAck: - return "DMG Link Adaption Acknowledgment" - case Dot11InformationElementIDSymbolProprietary: - return "Symbol Proprietary" - case Dot11InformationElementIDMCCAOPAdvertOverview: - return "MCCAOP Advertisement Overview" - case Dot11InformationElementIDQuietPeriodRequest: - return "Quiet Period Request" - case Dot11InformationElementIDQuietPeriodResponse: - return "Quiet Period Response" - case Dot11InformationElementIDECPACPolicy: - return "ECPAC Policy" - case Dot11InformationElementIDClusterTimeOffset: - return "Cluster Time Offset" - case Dot11InformationElementIDAntennaSectorID: - return "Antenna Sector ID" - case Dot11InformationElementIDVHTCapabilities: - return "VHT Capabilities (IEEE Std 802.11ac/D3.1)" - case Dot11InformationElementIDVHTOperation: - return "VHT Operation (IEEE Std 802.11ac/D3.1)" - case Dot11InformationElementIDExtendedBSSLoad: - return "Extended BSS Load" - case Dot11InformationElementIDWideBWChannelSwitch: - return "Wide Bandwidth Channel Switch" - case Dot11InformationElementIDVHTTxPowerEnvelope: - return "VHT Tx Power Envelope (IEEE Std 802.11ac/D5.0)" - case Dot11InformationElementIDChannelSwitchWrapper: - return "Channel Switch Wrapper" - case Dot11InformationElementIDOperatingModeNotification: - return "Operating Mode Notification" - case Dot11InformationElementIDUPSIM: - return "UP SIM" - case Dot11InformationElementIDReducedNeighborReport: - return "Reduced Neighbor Report" - case Dot11InformationElementIDTVHTOperation: - return "TVHT Op" - case Dot11InformationElementIDDeviceLocation: - return "Device Location" - case Dot11InformationElementIDWhiteSpaceMap: - return "White Space Map" - case Dot11InformationElementIDFineTuningMeasureParams: - return "Fine Tuning Measure Parameters" - case Dot11InformationElementIDVendor: - return "Vendor" - default: - return "Unknown information element id" - } -} - -// Dot11 provides an IEEE 802.11 base packet header. -// See http://standards.ieee.org/findstds/standard/802.11-2012.html -// for excruciating detail. -type Dot11 struct { - BaseLayer - Type Dot11Type - Proto uint8 - Flags Dot11Flags - DurationID uint16 - Address1 net.HardwareAddr - Address2 net.HardwareAddr - Address3 net.HardwareAddr - Address4 net.HardwareAddr - SequenceNumber uint16 - FragmentNumber uint16 - Checksum uint32 - QOS *Dot11QOS - HTControl *Dot11HTControl - DataLayer gopacket.Layer -} - -type Dot11QOS struct { - TID uint8 /* Traffic IDentifier */ - EOSP bool /* End of service period */ - AckPolicy Dot11AckPolicy - TXOP uint8 -} - -type Dot11HTControl struct { - ACConstraint bool - RDGMorePPDU bool - - VHT *Dot11HTControlVHT - HT *Dot11HTControlHT -} - -type Dot11HTControlHT struct { - LinkAdapationControl *Dot11LinkAdapationControl - CalibrationPosition uint8 - CalibrationSequence uint8 - CSISteering uint8 - NDPAnnouncement bool - DEI bool -} - -type Dot11HTControlVHT struct { - MRQ bool - UnsolicitedMFB bool - MSI *uint8 - MFB Dot11HTControlMFB - CompressedMSI *uint8 - STBCIndication bool - MFSI *uint8 - GID *uint8 - CodingType *Dot11CodingType - FbTXBeamformed bool -} - -type Dot11HTControlMFB struct { - NumSTS uint8 - VHTMCS uint8 - BW uint8 - SNR int8 -} - -type Dot11LinkAdapationControl struct { - TRQ bool - MRQ bool - MSI uint8 - MFSI uint8 - ASEL *Dot11ASEL - MFB *uint8 -} - -type Dot11ASEL struct { - Command uint8 - Data uint8 -} - -type Dot11CodingType uint8 - -const ( - Dot11CodingTypeBCC = 0 - Dot11CodingTypeLDPC = 1 -) - -func (a Dot11CodingType) String() string { - switch a { - case Dot11CodingTypeBCC: - return "BCC" - case Dot11CodingTypeLDPC: - return "LDPC" - default: - return "Unknown coding type" - } -} - -func (m *Dot11HTControlMFB) NoFeedBackPresent() bool { - return m.VHTMCS == 15 && m.NumSTS == 7 -} - -func decodeDot11(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11{} - err := d.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(d) - if d.DataLayer != nil { - p.AddLayer(d.DataLayer) - } - return p.NextDecoder(d.NextLayerType()) -} - -func (m *Dot11) LayerType() gopacket.LayerType { return LayerTypeDot11 } -func (m *Dot11) CanDecode() gopacket.LayerClass { return LayerTypeDot11 } -func (m *Dot11) NextLayerType() gopacket.LayerType { - if m.DataLayer != nil { - if m.Flags.WEP() { - return LayerTypeDot11WEP - } - return m.DataLayer.(gopacket.DecodingLayer).NextLayerType() - } - return m.Type.LayerType() -} - -func createU8(x uint8) *uint8 { - return &x -} - -var dataDecodeMap = map[Dot11Type]func() gopacket.DecodingLayer{ - Dot11TypeData: func() gopacket.DecodingLayer { return &Dot11Data{} }, - Dot11TypeDataCFAck: func() gopacket.DecodingLayer { return &Dot11DataCFAck{} }, - Dot11TypeDataCFPoll: func() gopacket.DecodingLayer { return &Dot11DataCFPoll{} }, - Dot11TypeDataCFAckPoll: func() gopacket.DecodingLayer { return &Dot11DataCFAckPoll{} }, - Dot11TypeDataNull: func() gopacket.DecodingLayer { return &Dot11DataNull{} }, - Dot11TypeDataCFAckNoData: func() gopacket.DecodingLayer { return &Dot11DataCFAckNoData{} }, - Dot11TypeDataCFPollNoData: func() gopacket.DecodingLayer { return &Dot11DataCFPollNoData{} }, - Dot11TypeDataCFAckPollNoData: func() gopacket.DecodingLayer { return &Dot11DataCFAckPollNoData{} }, - Dot11TypeDataQOSData: func() gopacket.DecodingLayer { return &Dot11DataQOSData{} }, - Dot11TypeDataQOSDataCFAck: func() gopacket.DecodingLayer { return &Dot11DataQOSDataCFAck{} }, - Dot11TypeDataQOSDataCFPoll: func() gopacket.DecodingLayer { return &Dot11DataQOSDataCFPoll{} }, - Dot11TypeDataQOSDataCFAckPoll: func() gopacket.DecodingLayer { return &Dot11DataQOSDataCFAckPoll{} }, - Dot11TypeDataQOSNull: func() gopacket.DecodingLayer { return &Dot11DataQOSNull{} }, - Dot11TypeDataQOSCFPollNoData: func() gopacket.DecodingLayer { return &Dot11DataQOSCFPollNoData{} }, - Dot11TypeDataQOSCFAckPollNoData: func() gopacket.DecodingLayer { return &Dot11DataQOSCFAckPollNoData{} }, -} - -func (m *Dot11) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 10 { - df.SetTruncated() - return fmt.Errorf("Dot11 length %v too short, %v required", len(data), 10) - } - m.Type = Dot11Type((data[0])&0xFC) >> 2 - - m.DataLayer = nil - m.Proto = uint8(data[0]) & 0x0003 - m.Flags = Dot11Flags(data[1]) - m.DurationID = binary.LittleEndian.Uint16(data[2:4]) - m.Address1 = net.HardwareAddr(data[4:10]) - - offset := 10 - - mainType := m.Type.MainType() - - switch mainType { - case Dot11TypeCtrl: - switch m.Type { - case Dot11TypeCtrlRTS, Dot11TypeCtrlPowersavePoll, Dot11TypeCtrlCFEnd, Dot11TypeCtrlCFEndAck: - if len(data) < offset+6 { - df.SetTruncated() - return fmt.Errorf("Dot11 length %v too short, %v required", len(data), offset+6) - } - m.Address2 = net.HardwareAddr(data[offset : offset+6]) - offset += 6 - } - case Dot11TypeMgmt, Dot11TypeData: - if len(data) < offset+14 { - df.SetTruncated() - return fmt.Errorf("Dot11 length %v too short, %v required", len(data), offset+14) - } - m.Address2 = net.HardwareAddr(data[offset : offset+6]) - offset += 6 - m.Address3 = net.HardwareAddr(data[offset : offset+6]) - offset += 6 - - m.SequenceNumber = (binary.LittleEndian.Uint16(data[offset:offset+2]) & 0xFFF0) >> 4 - m.FragmentNumber = (binary.LittleEndian.Uint16(data[offset:offset+2]) & 0x000F) - offset += 2 - } - - if mainType == Dot11TypeData && m.Flags.FromDS() && m.Flags.ToDS() { - if len(data) < offset+6 { - df.SetTruncated() - return fmt.Errorf("Dot11 length %v too short, %v required", len(data), offset+6) - } - m.Address4 = net.HardwareAddr(data[offset : offset+6]) - offset += 6 - } - - if m.Type.QOS() { - if len(data) < offset+2 { - df.SetTruncated() - return fmt.Errorf("Dot11 length %v too short, %v required", len(data), offset+6) - } - m.QOS = &Dot11QOS{ - TID: (uint8(data[offset]) & 0x0F), - EOSP: (uint8(data[offset]) & 0x10) == 0x10, - AckPolicy: Dot11AckPolicy((uint8(data[offset]) & 0x60) >> 5), - TXOP: uint8(data[offset+1]), - } - offset += 2 - } - if m.Flags.Order() && (m.Type.QOS() || mainType == Dot11TypeMgmt) { - if len(data) < offset+4 { - df.SetTruncated() - return fmt.Errorf("Dot11 length %v too short, %v required", len(data), offset+6) - } - - htc := &Dot11HTControl{ - ACConstraint: data[offset+3]&0x40 != 0, - RDGMorePPDU: data[offset+3]&0x80 != 0, - } - m.HTControl = htc - - if data[offset]&0x1 != 0 { // VHT Variant - vht := &Dot11HTControlVHT{} - htc.VHT = vht - vht.MRQ = data[offset]&0x4 != 0 - vht.UnsolicitedMFB = data[offset+3]&0x20 != 0 - vht.MFB = Dot11HTControlMFB{ - NumSTS: uint8(data[offset+1] >> 1 & 0x7), - VHTMCS: uint8(data[offset+1] >> 4 & 0xF), - BW: uint8(data[offset+2] & 0x3), - SNR: int8((-(data[offset+2] >> 2 & 0x20))+data[offset+2]>>2&0x1F) + 22, - } - - if vht.UnsolicitedMFB { - if !vht.MFB.NoFeedBackPresent() { - vht.CompressedMSI = createU8(data[offset] >> 3 & 0x3) - vht.STBCIndication = data[offset]&0x20 != 0 - vht.CodingType = (*Dot11CodingType)(createU8(data[offset+3] >> 3 & 0x1)) - vht.FbTXBeamformed = data[offset+3]&0x10 != 0 - vht.GID = createU8( - data[offset]>>6 + - (data[offset+1] & 0x1 << 2) + - data[offset+3]&0x7<<3) - } - } else { - if vht.MRQ { - vht.MSI = createU8((data[offset] >> 3) & 0x07) - } - vht.MFSI = createU8(data[offset]>>6 + (data[offset+1] & 0x1 << 2)) - } - - } else { // HT Variant - ht := &Dot11HTControlHT{} - htc.HT = ht - - lac := &Dot11LinkAdapationControl{} - ht.LinkAdapationControl = lac - lac.TRQ = data[offset]&0x2 != 0 - lac.MFSI = data[offset]>>6&0x3 + data[offset+1]&0x1<<3 - if data[offset]&0x3C == 0x38 { // ASEL - lac.ASEL = &Dot11ASEL{ - Command: data[offset+1] >> 1 & 0x7, - Data: data[offset+1] >> 4 & 0xF, - } - } else { - lac.MRQ = data[offset]&0x4 != 0 - if lac.MRQ { - lac.MSI = data[offset] >> 3 & 0x7 - } - lac.MFB = createU8(data[offset+1] >> 1) - } - ht.CalibrationPosition = data[offset+2] & 0x3 - ht.CalibrationSequence = data[offset+2] >> 2 & 0x3 - ht.CSISteering = data[offset+2] >> 6 & 0x3 - ht.NDPAnnouncement = data[offset+3]&0x1 != 0 - if mainType != Dot11TypeMgmt { - ht.DEI = data[offset+3]&0x20 != 0 - } - } - - offset += 4 - } - - if len(data) < offset+4 { - df.SetTruncated() - return fmt.Errorf("Dot11 length %v too short, %v required", len(data), offset+4) - } - - m.BaseLayer = BaseLayer{ - Contents: data[0:offset], - Payload: data[offset : len(data)-4], - } - - if mainType == Dot11TypeData { - d := dataDecodeMap[m.Type] - if d == nil { - return fmt.Errorf("unsupported type: %v", m.Type) - } - l := d() - err := l.DecodeFromBytes(m.BaseLayer.Payload, df) - if err != nil { - return err - } - m.DataLayer = l.(gopacket.Layer) - } - - m.Checksum = binary.LittleEndian.Uint32(data[len(data)-4 : len(data)]) - return nil -} - -func (m *Dot11) ChecksumValid() bool { - // only for CTRL and MGMT frames - h := crc32.NewIEEE() - h.Write(m.Contents) - h.Write(m.Payload) - return m.Checksum == h.Sum32() -} - -func (m Dot11) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(24) - - if err != nil { - return err - } - - buf[0] = (uint8(m.Type) << 2) | m.Proto - buf[1] = uint8(m.Flags) - - binary.LittleEndian.PutUint16(buf[2:4], m.DurationID) - - copy(buf[4:10], m.Address1) - - offset := 10 - - switch m.Type.MainType() { - case Dot11TypeCtrl: - switch m.Type { - case Dot11TypeCtrlRTS, Dot11TypeCtrlPowersavePoll, Dot11TypeCtrlCFEnd, Dot11TypeCtrlCFEndAck: - copy(buf[offset:offset+6], m.Address2) - offset += 6 - } - case Dot11TypeMgmt, Dot11TypeData: - copy(buf[offset:offset+6], m.Address2) - offset += 6 - copy(buf[offset:offset+6], m.Address3) - offset += 6 - - binary.LittleEndian.PutUint16(buf[offset:offset+2], (m.SequenceNumber<<4)|m.FragmentNumber) - offset += 2 - } - - if m.Type.MainType() == Dot11TypeData && m.Flags.FromDS() && m.Flags.ToDS() { - copy(buf[offset:offset+6], m.Address4) - offset += 6 - } - - return nil -} - -// Dot11Mgmt is a base for all IEEE 802.11 management layers. -type Dot11Mgmt struct { - BaseLayer -} - -func (m *Dot11Mgmt) NextLayerType() gopacket.LayerType { return gopacket.LayerTypePayload } -func (m *Dot11Mgmt) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - m.Contents = data - return nil -} - -// Dot11Ctrl is a base for all IEEE 802.11 control layers. -type Dot11Ctrl struct { - BaseLayer -} - -func (m *Dot11Ctrl) NextLayerType() gopacket.LayerType { return gopacket.LayerTypePayload } - -func (m *Dot11Ctrl) LayerType() gopacket.LayerType { return LayerTypeDot11Ctrl } -func (m *Dot11Ctrl) CanDecode() gopacket.LayerClass { return LayerTypeDot11Ctrl } -func (m *Dot11Ctrl) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - m.Contents = data - return nil -} - -func decodeDot11Ctrl(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11Ctrl{} - return decodingLayerDecoder(d, data, p) -} - -// Dot11WEP contains WEP encrpted IEEE 802.11 data. -type Dot11WEP struct { - BaseLayer -} - -func (m *Dot11WEP) NextLayerType() gopacket.LayerType { return gopacket.LayerTypePayload } - -func (m *Dot11WEP) LayerType() gopacket.LayerType { return LayerTypeDot11WEP } -func (m *Dot11WEP) CanDecode() gopacket.LayerClass { return LayerTypeDot11WEP } -func (m *Dot11WEP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - m.Contents = data - return nil -} - -func decodeDot11WEP(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11WEP{} - return decodingLayerDecoder(d, data, p) -} - -// Dot11Data is a base for all IEEE 802.11 data layers. -type Dot11Data struct { - BaseLayer -} - -func (m *Dot11Data) NextLayerType() gopacket.LayerType { - return LayerTypeLLC -} - -func (m *Dot11Data) LayerType() gopacket.LayerType { return LayerTypeDot11Data } -func (m *Dot11Data) CanDecode() gopacket.LayerClass { return LayerTypeDot11Data } -func (m *Dot11Data) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - m.Payload = data - return nil -} - -func decodeDot11Data(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11Data{} - return decodingLayerDecoder(d, data, p) -} - -type Dot11DataCFAck struct { - Dot11Data -} - -func decodeDot11DataCFAck(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataCFAck{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataCFAck) LayerType() gopacket.LayerType { return LayerTypeDot11DataCFAck } -func (m *Dot11DataCFAck) CanDecode() gopacket.LayerClass { return LayerTypeDot11DataCFAck } -func (m *Dot11DataCFAck) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Data.DecodeFromBytes(data, df) -} - -type Dot11DataCFPoll struct { - Dot11Data -} - -func decodeDot11DataCFPoll(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataCFPoll{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataCFPoll) LayerType() gopacket.LayerType { return LayerTypeDot11DataCFPoll } -func (m *Dot11DataCFPoll) CanDecode() gopacket.LayerClass { return LayerTypeDot11DataCFPoll } -func (m *Dot11DataCFPoll) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Data.DecodeFromBytes(data, df) -} - -type Dot11DataCFAckPoll struct { - Dot11Data -} - -func decodeDot11DataCFAckPoll(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataCFAckPoll{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataCFAckPoll) LayerType() gopacket.LayerType { return LayerTypeDot11DataCFAckPoll } -func (m *Dot11DataCFAckPoll) CanDecode() gopacket.LayerClass { return LayerTypeDot11DataCFAckPoll } -func (m *Dot11DataCFAckPoll) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Data.DecodeFromBytes(data, df) -} - -type Dot11DataNull struct { - Dot11Data -} - -func decodeDot11DataNull(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataNull{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataNull) LayerType() gopacket.LayerType { return LayerTypeDot11DataNull } -func (m *Dot11DataNull) CanDecode() gopacket.LayerClass { return LayerTypeDot11DataNull } -func (m *Dot11DataNull) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Data.DecodeFromBytes(data, df) -} - -type Dot11DataCFAckNoData struct { - Dot11Data -} - -func decodeDot11DataCFAckNoData(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataCFAckNoData{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataCFAckNoData) LayerType() gopacket.LayerType { return LayerTypeDot11DataCFAckNoData } -func (m *Dot11DataCFAckNoData) CanDecode() gopacket.LayerClass { return LayerTypeDot11DataCFAckNoData } -func (m *Dot11DataCFAckNoData) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Data.DecodeFromBytes(data, df) -} - -type Dot11DataCFPollNoData struct { - Dot11Data -} - -func decodeDot11DataCFPollNoData(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataCFPollNoData{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataCFPollNoData) LayerType() gopacket.LayerType { return LayerTypeDot11DataCFPollNoData } -func (m *Dot11DataCFPollNoData) CanDecode() gopacket.LayerClass { - return LayerTypeDot11DataCFPollNoData -} -func (m *Dot11DataCFPollNoData) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Data.DecodeFromBytes(data, df) -} - -type Dot11DataCFAckPollNoData struct { - Dot11Data -} - -func decodeDot11DataCFAckPollNoData(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataCFAckPollNoData{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataCFAckPollNoData) LayerType() gopacket.LayerType { - return LayerTypeDot11DataCFAckPollNoData -} -func (m *Dot11DataCFAckPollNoData) CanDecode() gopacket.LayerClass { - return LayerTypeDot11DataCFAckPollNoData -} -func (m *Dot11DataCFAckPollNoData) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Data.DecodeFromBytes(data, df) -} - -type Dot11DataQOS struct { - Dot11Ctrl -} - -func (m *Dot11DataQOS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - m.BaseLayer = BaseLayer{Payload: data} - return nil -} - -type Dot11DataQOSData struct { - Dot11DataQOS -} - -func decodeDot11DataQOSData(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataQOSData{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataQOSData) LayerType() gopacket.LayerType { return LayerTypeDot11DataQOSData } -func (m *Dot11DataQOSData) CanDecode() gopacket.LayerClass { return LayerTypeDot11DataQOSData } - -func (m *Dot11DataQOSData) NextLayerType() gopacket.LayerType { - return LayerTypeDot11Data -} - -type Dot11DataQOSDataCFAck struct { - Dot11DataQOS -} - -func decodeDot11DataQOSDataCFAck(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataQOSDataCFAck{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataQOSDataCFAck) LayerType() gopacket.LayerType { return LayerTypeDot11DataQOSDataCFAck } -func (m *Dot11DataQOSDataCFAck) CanDecode() gopacket.LayerClass { - return LayerTypeDot11DataQOSDataCFAck -} -func (m *Dot11DataQOSDataCFAck) NextLayerType() gopacket.LayerType { return LayerTypeDot11DataCFAck } - -type Dot11DataQOSDataCFPoll struct { - Dot11DataQOS -} - -func decodeDot11DataQOSDataCFPoll(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataQOSDataCFPoll{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataQOSDataCFPoll) LayerType() gopacket.LayerType { - return LayerTypeDot11DataQOSDataCFPoll -} -func (m *Dot11DataQOSDataCFPoll) CanDecode() gopacket.LayerClass { - return LayerTypeDot11DataQOSDataCFPoll -} -func (m *Dot11DataQOSDataCFPoll) NextLayerType() gopacket.LayerType { return LayerTypeDot11DataCFPoll } - -type Dot11DataQOSDataCFAckPoll struct { - Dot11DataQOS -} - -func decodeDot11DataQOSDataCFAckPoll(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataQOSDataCFAckPoll{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataQOSDataCFAckPoll) LayerType() gopacket.LayerType { - return LayerTypeDot11DataQOSDataCFAckPoll -} -func (m *Dot11DataQOSDataCFAckPoll) CanDecode() gopacket.LayerClass { - return LayerTypeDot11DataQOSDataCFAckPoll -} -func (m *Dot11DataQOSDataCFAckPoll) NextLayerType() gopacket.LayerType { - return LayerTypeDot11DataCFAckPoll -} - -type Dot11DataQOSNull struct { - Dot11DataQOS -} - -func decodeDot11DataQOSNull(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataQOSNull{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataQOSNull) LayerType() gopacket.LayerType { return LayerTypeDot11DataQOSNull } -func (m *Dot11DataQOSNull) CanDecode() gopacket.LayerClass { return LayerTypeDot11DataQOSNull } -func (m *Dot11DataQOSNull) NextLayerType() gopacket.LayerType { return LayerTypeDot11DataNull } - -type Dot11DataQOSCFPollNoData struct { - Dot11DataQOS -} - -func decodeDot11DataQOSCFPollNoData(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataQOSCFPollNoData{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataQOSCFPollNoData) LayerType() gopacket.LayerType { - return LayerTypeDot11DataQOSCFPollNoData -} -func (m *Dot11DataQOSCFPollNoData) CanDecode() gopacket.LayerClass { - return LayerTypeDot11DataQOSCFPollNoData -} -func (m *Dot11DataQOSCFPollNoData) NextLayerType() gopacket.LayerType { - return LayerTypeDot11DataCFPollNoData -} - -type Dot11DataQOSCFAckPollNoData struct { - Dot11DataQOS -} - -func decodeDot11DataQOSCFAckPollNoData(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11DataQOSCFAckPollNoData{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11DataQOSCFAckPollNoData) LayerType() gopacket.LayerType { - return LayerTypeDot11DataQOSCFAckPollNoData -} -func (m *Dot11DataQOSCFAckPollNoData) CanDecode() gopacket.LayerClass { - return LayerTypeDot11DataQOSCFAckPollNoData -} -func (m *Dot11DataQOSCFAckPollNoData) NextLayerType() gopacket.LayerType { - return LayerTypeDot11DataCFAckPollNoData -} - -type Dot11InformationElement struct { - BaseLayer - ID Dot11InformationElementID - Length uint8 - OUI []byte - Info []byte -} - -func (m *Dot11InformationElement) LayerType() gopacket.LayerType { - return LayerTypeDot11InformationElement -} -func (m *Dot11InformationElement) CanDecode() gopacket.LayerClass { - return LayerTypeDot11InformationElement -} - -func (m *Dot11InformationElement) NextLayerType() gopacket.LayerType { - return LayerTypeDot11InformationElement -} - -func (m *Dot11InformationElement) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 2 { - df.SetTruncated() - return fmt.Errorf("Dot11InformationElement length %v too short, %v required", len(data), 2) - } - m.ID = Dot11InformationElementID(data[0]) - m.Length = data[1] - offset := int(2) - - if len(data) < offset+int(m.Length) { - df.SetTruncated() - return fmt.Errorf("Dot11InformationElement length %v too short, %v required", len(data), offset+int(m.Length)) - } - if len(data) < offset+4 { - df.SetTruncated() - return fmt.Errorf("vendor extension size < %d", offset+int(m.Length)) - } - if m.ID == 221 { - // Vendor extension - m.OUI = data[offset : offset+4] - m.Info = data[offset+4 : offset+int(m.Length)] - } else { - m.Info = data[offset : offset+int(m.Length)] - } - - offset += int(m.Length) - - m.BaseLayer = BaseLayer{Contents: data[:offset], Payload: data[offset:]} - return nil -} - -func (d *Dot11InformationElement) String() string { - if d.ID == 0 { - return fmt.Sprintf("802.11 Information Element (ID: %v, Length: %v, SSID: %v)", d.ID, d.Length, string(d.Info)) - } else if d.ID == 1 { - rates := "" - for i := 0; i < len(d.Info); i++ { - if d.Info[i]&0x80 == 0 { - rates += fmt.Sprintf("%.1f ", float32(d.Info[i])*0.5) - } else { - rates += fmt.Sprintf("%.1f* ", float32(d.Info[i]&0x7F)*0.5) - } - } - return fmt.Sprintf("802.11 Information Element (ID: %v, Length: %v, Rates: %s Mbit)", d.ID, d.Length, rates) - } else if d.ID == 221 { - return fmt.Sprintf("802.11 Information Element (ID: %v, Length: %v, OUI: %X, Info: %X)", d.ID, d.Length, d.OUI, d.Info) - } else { - return fmt.Sprintf("802.11 Information Element (ID: %v, Length: %v, Info: %X)", d.ID, d.Length, d.Info) - } -} - -func (m Dot11InformationElement) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - length := len(m.Info) + len(m.OUI) - if buf, err := b.PrependBytes(2 + length); err != nil { - return err - } else { - buf[0] = uint8(m.ID) - buf[1] = uint8(length) - copy(buf[2:], m.OUI) - copy(buf[2+len(m.OUI):], m.Info) - } - return nil -} - -func decodeDot11InformationElement(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11InformationElement{} - return decodingLayerDecoder(d, data, p) -} - -type Dot11CtrlCTS struct { - Dot11Ctrl -} - -func decodeDot11CtrlCTS(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11CtrlCTS{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11CtrlCTS) LayerType() gopacket.LayerType { - return LayerTypeDot11CtrlCTS -} -func (m *Dot11CtrlCTS) CanDecode() gopacket.LayerClass { - return LayerTypeDot11CtrlCTS -} -func (m *Dot11CtrlCTS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Ctrl.DecodeFromBytes(data, df) -} - -type Dot11CtrlRTS struct { - Dot11Ctrl -} - -func decodeDot11CtrlRTS(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11CtrlRTS{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11CtrlRTS) LayerType() gopacket.LayerType { - return LayerTypeDot11CtrlRTS -} -func (m *Dot11CtrlRTS) CanDecode() gopacket.LayerClass { - return LayerTypeDot11CtrlRTS -} -func (m *Dot11CtrlRTS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Ctrl.DecodeFromBytes(data, df) -} - -type Dot11CtrlBlockAckReq struct { - Dot11Ctrl -} - -func decodeDot11CtrlBlockAckReq(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11CtrlBlockAckReq{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11CtrlBlockAckReq) LayerType() gopacket.LayerType { - return LayerTypeDot11CtrlBlockAckReq -} -func (m *Dot11CtrlBlockAckReq) CanDecode() gopacket.LayerClass { - return LayerTypeDot11CtrlBlockAckReq -} -func (m *Dot11CtrlBlockAckReq) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Ctrl.DecodeFromBytes(data, df) -} - -type Dot11CtrlBlockAck struct { - Dot11Ctrl -} - -func decodeDot11CtrlBlockAck(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11CtrlBlockAck{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11CtrlBlockAck) LayerType() gopacket.LayerType { return LayerTypeDot11CtrlBlockAck } -func (m *Dot11CtrlBlockAck) CanDecode() gopacket.LayerClass { return LayerTypeDot11CtrlBlockAck } -func (m *Dot11CtrlBlockAck) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Ctrl.DecodeFromBytes(data, df) -} - -type Dot11CtrlPowersavePoll struct { - Dot11Ctrl -} - -func decodeDot11CtrlPowersavePoll(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11CtrlPowersavePoll{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11CtrlPowersavePoll) LayerType() gopacket.LayerType { - return LayerTypeDot11CtrlPowersavePoll -} -func (m *Dot11CtrlPowersavePoll) CanDecode() gopacket.LayerClass { - return LayerTypeDot11CtrlPowersavePoll -} -func (m *Dot11CtrlPowersavePoll) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Ctrl.DecodeFromBytes(data, df) -} - -type Dot11CtrlAck struct { - Dot11Ctrl -} - -func decodeDot11CtrlAck(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11CtrlAck{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11CtrlAck) LayerType() gopacket.LayerType { return LayerTypeDot11CtrlAck } -func (m *Dot11CtrlAck) CanDecode() gopacket.LayerClass { return LayerTypeDot11CtrlAck } -func (m *Dot11CtrlAck) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Ctrl.DecodeFromBytes(data, df) -} - -type Dot11CtrlCFEnd struct { - Dot11Ctrl -} - -func decodeDot11CtrlCFEnd(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11CtrlCFEnd{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11CtrlCFEnd) LayerType() gopacket.LayerType { - return LayerTypeDot11CtrlCFEnd -} -func (m *Dot11CtrlCFEnd) CanDecode() gopacket.LayerClass { - return LayerTypeDot11CtrlCFEnd -} -func (m *Dot11CtrlCFEnd) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Ctrl.DecodeFromBytes(data, df) -} - -type Dot11CtrlCFEndAck struct { - Dot11Ctrl -} - -func decodeDot11CtrlCFEndAck(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11CtrlCFEndAck{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11CtrlCFEndAck) LayerType() gopacket.LayerType { - return LayerTypeDot11CtrlCFEndAck -} -func (m *Dot11CtrlCFEndAck) CanDecode() gopacket.LayerClass { - return LayerTypeDot11CtrlCFEndAck -} -func (m *Dot11CtrlCFEndAck) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - return m.Dot11Ctrl.DecodeFromBytes(data, df) -} - -type Dot11MgmtAssociationReq struct { - Dot11Mgmt - CapabilityInfo uint16 - ListenInterval uint16 -} - -func decodeDot11MgmtAssociationReq(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtAssociationReq{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtAssociationReq) LayerType() gopacket.LayerType { - return LayerTypeDot11MgmtAssociationReq -} -func (m *Dot11MgmtAssociationReq) CanDecode() gopacket.LayerClass { - return LayerTypeDot11MgmtAssociationReq -} -func (m *Dot11MgmtAssociationReq) NextLayerType() gopacket.LayerType { - return LayerTypeDot11InformationElement -} -func (m *Dot11MgmtAssociationReq) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 4 { - df.SetTruncated() - return fmt.Errorf("Dot11MgmtAssociationReq length %v too short, %v required", len(data), 4) - } - m.CapabilityInfo = binary.LittleEndian.Uint16(data[0:2]) - m.ListenInterval = binary.LittleEndian.Uint16(data[2:4]) - m.Payload = data[4:] - return m.Dot11Mgmt.DecodeFromBytes(data, df) -} - -func (m Dot11MgmtAssociationReq) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(4) - - if err != nil { - return err - } - - binary.LittleEndian.PutUint16(buf[0:2], m.CapabilityInfo) - binary.LittleEndian.PutUint16(buf[2:4], m.ListenInterval) - - return nil -} - -type Dot11MgmtAssociationResp struct { - Dot11Mgmt - CapabilityInfo uint16 - Status Dot11Status - AID uint16 -} - -func decodeDot11MgmtAssociationResp(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtAssociationResp{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtAssociationResp) CanDecode() gopacket.LayerClass { - return LayerTypeDot11MgmtAssociationResp -} -func (m *Dot11MgmtAssociationResp) LayerType() gopacket.LayerType { - return LayerTypeDot11MgmtAssociationResp -} -func (m *Dot11MgmtAssociationResp) NextLayerType() gopacket.LayerType { - return LayerTypeDot11InformationElement -} -func (m *Dot11MgmtAssociationResp) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 6 { - df.SetTruncated() - return fmt.Errorf("Dot11MgmtAssociationResp length %v too short, %v required", len(data), 6) - } - m.CapabilityInfo = binary.LittleEndian.Uint16(data[0:2]) - m.Status = Dot11Status(binary.LittleEndian.Uint16(data[2:4])) - m.AID = binary.LittleEndian.Uint16(data[4:6]) - m.Payload = data[6:] - return m.Dot11Mgmt.DecodeFromBytes(data, df) -} - -func (m Dot11MgmtAssociationResp) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(6) - - if err != nil { - return err - } - - binary.LittleEndian.PutUint16(buf[0:2], m.CapabilityInfo) - binary.LittleEndian.PutUint16(buf[2:4], uint16(m.Status)) - binary.LittleEndian.PutUint16(buf[4:6], m.AID) - - return nil -} - -type Dot11MgmtReassociationReq struct { - Dot11Mgmt - CapabilityInfo uint16 - ListenInterval uint16 - CurrentApAddress net.HardwareAddr -} - -func decodeDot11MgmtReassociationReq(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtReassociationReq{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtReassociationReq) LayerType() gopacket.LayerType { - return LayerTypeDot11MgmtReassociationReq -} -func (m *Dot11MgmtReassociationReq) CanDecode() gopacket.LayerClass { - return LayerTypeDot11MgmtReassociationReq -} -func (m *Dot11MgmtReassociationReq) NextLayerType() gopacket.LayerType { - return LayerTypeDot11InformationElement -} -func (m *Dot11MgmtReassociationReq) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 10 { - df.SetTruncated() - return fmt.Errorf("Dot11MgmtReassociationReq length %v too short, %v required", len(data), 10) - } - m.CapabilityInfo = binary.LittleEndian.Uint16(data[0:2]) - m.ListenInterval = binary.LittleEndian.Uint16(data[2:4]) - m.CurrentApAddress = net.HardwareAddr(data[4:10]) - m.Payload = data[10:] - return m.Dot11Mgmt.DecodeFromBytes(data, df) -} - -func (m Dot11MgmtReassociationReq) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(10) - - if err != nil { - return err - } - - binary.LittleEndian.PutUint16(buf[0:2], m.CapabilityInfo) - binary.LittleEndian.PutUint16(buf[2:4], m.ListenInterval) - - copy(buf[4:10], m.CurrentApAddress) - - return nil -} - -type Dot11MgmtReassociationResp struct { - Dot11Mgmt -} - -func decodeDot11MgmtReassociationResp(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtReassociationResp{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtReassociationResp) LayerType() gopacket.LayerType { - return LayerTypeDot11MgmtReassociationResp -} -func (m *Dot11MgmtReassociationResp) CanDecode() gopacket.LayerClass { - return LayerTypeDot11MgmtReassociationResp -} -func (m *Dot11MgmtReassociationResp) NextLayerType() gopacket.LayerType { - return LayerTypeDot11InformationElement -} - -type Dot11MgmtProbeReq struct { - Dot11Mgmt -} - -func decodeDot11MgmtProbeReq(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtProbeReq{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtProbeReq) LayerType() gopacket.LayerType { return LayerTypeDot11MgmtProbeReq } -func (m *Dot11MgmtProbeReq) CanDecode() gopacket.LayerClass { return LayerTypeDot11MgmtProbeReq } -func (m *Dot11MgmtProbeReq) NextLayerType() gopacket.LayerType { - return LayerTypeDot11InformationElement -} - -type Dot11MgmtProbeResp struct { - Dot11Mgmt - Timestamp uint64 - Interval uint16 - Flags uint16 -} - -func decodeDot11MgmtProbeResp(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtProbeResp{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtProbeResp) LayerType() gopacket.LayerType { return LayerTypeDot11MgmtProbeResp } -func (m *Dot11MgmtProbeResp) CanDecode() gopacket.LayerClass { return LayerTypeDot11MgmtProbeResp } -func (m *Dot11MgmtProbeResp) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 12 { - df.SetTruncated() - - return fmt.Errorf("Dot11MgmtProbeResp length %v too short, %v required", len(data), 12) - } - - m.Timestamp = binary.LittleEndian.Uint64(data[0:8]) - m.Interval = binary.LittleEndian.Uint16(data[8:10]) - m.Flags = binary.LittleEndian.Uint16(data[10:12]) - m.Payload = data[12:] - - return m.Dot11Mgmt.DecodeFromBytes(data, df) -} - -func (m *Dot11MgmtProbeResp) NextLayerType() gopacket.LayerType { - return LayerTypeDot11InformationElement -} - -func (m Dot11MgmtProbeResp) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(12) - - if err != nil { - return err - } - - binary.LittleEndian.PutUint64(buf[0:8], m.Timestamp) - binary.LittleEndian.PutUint16(buf[8:10], m.Interval) - binary.LittleEndian.PutUint16(buf[10:12], m.Flags) - - return nil -} - -type Dot11MgmtMeasurementPilot struct { - Dot11Mgmt -} - -func decodeDot11MgmtMeasurementPilot(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtMeasurementPilot{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtMeasurementPilot) LayerType() gopacket.LayerType { - return LayerTypeDot11MgmtMeasurementPilot -} -func (m *Dot11MgmtMeasurementPilot) CanDecode() gopacket.LayerClass { - return LayerTypeDot11MgmtMeasurementPilot -} - -type Dot11MgmtBeacon struct { - Dot11Mgmt - Timestamp uint64 - Interval uint16 - Flags uint16 -} - -func decodeDot11MgmtBeacon(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtBeacon{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtBeacon) LayerType() gopacket.LayerType { return LayerTypeDot11MgmtBeacon } -func (m *Dot11MgmtBeacon) CanDecode() gopacket.LayerClass { return LayerTypeDot11MgmtBeacon } -func (m *Dot11MgmtBeacon) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 12 { - df.SetTruncated() - return fmt.Errorf("Dot11MgmtBeacon length %v too short, %v required", len(data), 12) - } - m.Timestamp = binary.LittleEndian.Uint64(data[0:8]) - m.Interval = binary.LittleEndian.Uint16(data[8:10]) - m.Flags = binary.LittleEndian.Uint16(data[10:12]) - m.Payload = data[12:] - return m.Dot11Mgmt.DecodeFromBytes(data, df) -} - -func (m *Dot11MgmtBeacon) NextLayerType() gopacket.LayerType { return LayerTypeDot11InformationElement } - -func (m Dot11MgmtBeacon) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(12) - - if err != nil { - return err - } - - binary.LittleEndian.PutUint64(buf[0:8], m.Timestamp) - binary.LittleEndian.PutUint16(buf[8:10], m.Interval) - binary.LittleEndian.PutUint16(buf[10:12], m.Flags) - - return nil -} - -type Dot11MgmtATIM struct { - Dot11Mgmt -} - -func decodeDot11MgmtATIM(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtATIM{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtATIM) LayerType() gopacket.LayerType { return LayerTypeDot11MgmtATIM } -func (m *Dot11MgmtATIM) CanDecode() gopacket.LayerClass { return LayerTypeDot11MgmtATIM } - -type Dot11MgmtDisassociation struct { - Dot11Mgmt - Reason Dot11Reason -} - -func decodeDot11MgmtDisassociation(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtDisassociation{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtDisassociation) LayerType() gopacket.LayerType { - return LayerTypeDot11MgmtDisassociation -} -func (m *Dot11MgmtDisassociation) CanDecode() gopacket.LayerClass { - return LayerTypeDot11MgmtDisassociation -} -func (m *Dot11MgmtDisassociation) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 2 { - df.SetTruncated() - return fmt.Errorf("Dot11MgmtDisassociation length %v too short, %v required", len(data), 2) - } - m.Reason = Dot11Reason(binary.LittleEndian.Uint16(data[0:2])) - return m.Dot11Mgmt.DecodeFromBytes(data, df) -} - -func (m Dot11MgmtDisassociation) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(2) - - if err != nil { - return err - } - - binary.LittleEndian.PutUint16(buf[0:2], uint16(m.Reason)) - - return nil -} - -type Dot11MgmtAuthentication struct { - Dot11Mgmt - Algorithm Dot11Algorithm - Sequence uint16 - Status Dot11Status -} - -func decodeDot11MgmtAuthentication(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtAuthentication{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtAuthentication) LayerType() gopacket.LayerType { - return LayerTypeDot11MgmtAuthentication -} -func (m *Dot11MgmtAuthentication) CanDecode() gopacket.LayerClass { - return LayerTypeDot11MgmtAuthentication -} -func (m *Dot11MgmtAuthentication) NextLayerType() gopacket.LayerType { - return LayerTypeDot11InformationElement -} -func (m *Dot11MgmtAuthentication) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 6 { - df.SetTruncated() - return fmt.Errorf("Dot11MgmtAuthentication length %v too short, %v required", len(data), 6) - } - m.Algorithm = Dot11Algorithm(binary.LittleEndian.Uint16(data[0:2])) - m.Sequence = binary.LittleEndian.Uint16(data[2:4]) - m.Status = Dot11Status(binary.LittleEndian.Uint16(data[4:6])) - m.Payload = data[6:] - return m.Dot11Mgmt.DecodeFromBytes(data, df) -} - -func (m Dot11MgmtAuthentication) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(6) - - if err != nil { - return err - } - - binary.LittleEndian.PutUint16(buf[0:2], uint16(m.Algorithm)) - binary.LittleEndian.PutUint16(buf[2:4], m.Sequence) - binary.LittleEndian.PutUint16(buf[4:6], uint16(m.Status)) - - return nil -} - -type Dot11MgmtDeauthentication struct { - Dot11Mgmt - Reason Dot11Reason -} - -func decodeDot11MgmtDeauthentication(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtDeauthentication{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtDeauthentication) LayerType() gopacket.LayerType { - return LayerTypeDot11MgmtDeauthentication -} -func (m *Dot11MgmtDeauthentication) CanDecode() gopacket.LayerClass { - return LayerTypeDot11MgmtDeauthentication -} -func (m *Dot11MgmtDeauthentication) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 2 { - df.SetTruncated() - return fmt.Errorf("Dot11MgmtDeauthentication length %v too short, %v required", len(data), 2) - } - m.Reason = Dot11Reason(binary.LittleEndian.Uint16(data[0:2])) - return m.Dot11Mgmt.DecodeFromBytes(data, df) -} - -func (m Dot11MgmtDeauthentication) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(2) - - if err != nil { - return err - } - - binary.LittleEndian.PutUint16(buf[0:2], uint16(m.Reason)) - - return nil -} - -type Dot11MgmtAction struct { - Dot11Mgmt -} - -func decodeDot11MgmtAction(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtAction{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtAction) LayerType() gopacket.LayerType { return LayerTypeDot11MgmtAction } -func (m *Dot11MgmtAction) CanDecode() gopacket.LayerClass { return LayerTypeDot11MgmtAction } - -type Dot11MgmtActionNoAck struct { - Dot11Mgmt -} - -func decodeDot11MgmtActionNoAck(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtActionNoAck{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtActionNoAck) LayerType() gopacket.LayerType { return LayerTypeDot11MgmtActionNoAck } -func (m *Dot11MgmtActionNoAck) CanDecode() gopacket.LayerClass { return LayerTypeDot11MgmtActionNoAck } - -type Dot11MgmtArubaWLAN struct { - Dot11Mgmt -} - -func decodeDot11MgmtArubaWLAN(data []byte, p gopacket.PacketBuilder) error { - d := &Dot11MgmtArubaWLAN{} - return decodingLayerDecoder(d, data, p) -} - -func (m *Dot11MgmtArubaWLAN) LayerType() gopacket.LayerType { return LayerTypeDot11MgmtArubaWLAN } -func (m *Dot11MgmtArubaWLAN) CanDecode() gopacket.LayerClass { return LayerTypeDot11MgmtArubaWLAN } diff --git a/vendor/github.com/google/gopacket/layers/dot1q.go b/vendor/github.com/google/gopacket/layers/dot1q.go deleted file mode 100644 index 5cdd2f8d683..00000000000 --- a/vendor/github.com/google/gopacket/layers/dot1q.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "fmt" - "github.com/google/gopacket" -) - -// Dot1Q is the packet layer for 802.1Q VLAN headers. -type Dot1Q struct { - BaseLayer - Priority uint8 - DropEligible bool - VLANIdentifier uint16 - Type EthernetType -} - -// LayerType returns gopacket.LayerTypeDot1Q -func (d *Dot1Q) LayerType() gopacket.LayerType { return LayerTypeDot1Q } - -// DecodeFromBytes decodes the given bytes into this layer. -func (d *Dot1Q) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 4 { - df.SetTruncated() - return fmt.Errorf("802.1Q tag length %d too short", len(data)) - } - d.Priority = (data[0] & 0xE0) >> 5 - d.DropEligible = data[0]&0x10 != 0 - d.VLANIdentifier = binary.BigEndian.Uint16(data[:2]) & 0x0FFF - d.Type = EthernetType(binary.BigEndian.Uint16(data[2:4])) - d.BaseLayer = BaseLayer{Contents: data[:4], Payload: data[4:]} - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (d *Dot1Q) CanDecode() gopacket.LayerClass { - return LayerTypeDot1Q -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (d *Dot1Q) NextLayerType() gopacket.LayerType { - return d.Type.LayerType() -} - -func decodeDot1Q(data []byte, p gopacket.PacketBuilder) error { - d := &Dot1Q{} - return decodingLayerDecoder(d, data, p) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (d *Dot1Q) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(4) - if err != nil { - return err - } - if d.VLANIdentifier > 0xFFF { - return fmt.Errorf("vlan identifier %v is too high", d.VLANIdentifier) - } - firstBytes := uint16(d.Priority)<<13 | d.VLANIdentifier - if d.DropEligible { - firstBytes |= 0x1000 - } - binary.BigEndian.PutUint16(bytes, firstBytes) - binary.BigEndian.PutUint16(bytes[2:], uint16(d.Type)) - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/eap.go b/vendor/github.com/google/gopacket/layers/eap.go deleted file mode 100644 index 54238e8c73b..00000000000 --- a/vendor/github.com/google/gopacket/layers/eap.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "fmt" - "github.com/google/gopacket" -) - -type EAPCode uint8 -type EAPType uint8 - -const ( - EAPCodeRequest EAPCode = 1 - EAPCodeResponse EAPCode = 2 - EAPCodeSuccess EAPCode = 3 - EAPCodeFailure EAPCode = 4 - - // EAPTypeNone means that this EAP layer has no Type or TypeData. - // Success and Failure EAPs will have this set. - EAPTypeNone EAPType = 0 - - EAPTypeIdentity EAPType = 1 - EAPTypeNotification EAPType = 2 - EAPTypeNACK EAPType = 3 - EAPTypeOTP EAPType = 4 - EAPTypeTokenCard EAPType = 5 -) - -// EAP defines an Extensible Authentication Protocol (rfc 3748) layer. -type EAP struct { - BaseLayer - Code EAPCode - Id uint8 - Length uint16 - Type EAPType - TypeData []byte -} - -// LayerType returns LayerTypeEAP. -func (e *EAP) LayerType() gopacket.LayerType { return LayerTypeEAP } - -// DecodeFromBytes decodes the given bytes into this layer. -func (e *EAP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 4 { - df.SetTruncated() - return fmt.Errorf("EAP length %d too short", len(data)) - } - e.Code = EAPCode(data[0]) - e.Id = data[1] - e.Length = binary.BigEndian.Uint16(data[2:4]) - if len(data) < int(e.Length) { - df.SetTruncated() - return fmt.Errorf("EAP length %d too short, %d expected", len(data), e.Length) - } - switch { - case e.Length > 4: - e.Type = EAPType(data[4]) - e.TypeData = data[5:] - case e.Length == 4: - e.Type = 0 - e.TypeData = nil - default: - return fmt.Errorf("invalid EAP length %d", e.Length) - } - e.BaseLayer.Contents = data[:e.Length] - e.BaseLayer.Payload = data[e.Length:] // Should be 0 bytes - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (e *EAP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if opts.FixLengths { - e.Length = uint16(len(e.TypeData) + 1) - } - size := len(e.TypeData) + 4 - if size > 4 { - size++ - } - bytes, err := b.PrependBytes(size) - if err != nil { - return err - } - bytes[0] = byte(e.Code) - bytes[1] = e.Id - binary.BigEndian.PutUint16(bytes[2:], e.Length) - if size > 4 { - bytes[4] = byte(e.Type) - copy(bytes[5:], e.TypeData) - } - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (e *EAP) CanDecode() gopacket.LayerClass { - return LayerTypeEAP -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (e *EAP) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypeZero -} - -func decodeEAP(data []byte, p gopacket.PacketBuilder) error { - e := &EAP{} - return decodingLayerDecoder(e, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/eapol.go b/vendor/github.com/google/gopacket/layers/eapol.go deleted file mode 100644 index 902598a2069..00000000000 --- a/vendor/github.com/google/gopacket/layers/eapol.go +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "fmt" - "github.com/google/gopacket" -) - -// EAPOL defines an EAP over LAN (802.1x) layer. -type EAPOL struct { - BaseLayer - Version uint8 - Type EAPOLType - Length uint16 -} - -// LayerType returns LayerTypeEAPOL. -func (e *EAPOL) LayerType() gopacket.LayerType { return LayerTypeEAPOL } - -// DecodeFromBytes decodes the given bytes into this layer. -func (e *EAPOL) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 4 { - df.SetTruncated() - return fmt.Errorf("EAPOL length %d too short", len(data)) - } - e.Version = data[0] - e.Type = EAPOLType(data[1]) - e.Length = binary.BigEndian.Uint16(data[2:4]) - e.BaseLayer = BaseLayer{data[:4], data[4:]} - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer -func (e *EAPOL) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, _ := b.PrependBytes(4) - bytes[0] = e.Version - bytes[1] = byte(e.Type) - binary.BigEndian.PutUint16(bytes[2:], e.Length) - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (e *EAPOL) CanDecode() gopacket.LayerClass { - return LayerTypeEAPOL -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (e *EAPOL) NextLayerType() gopacket.LayerType { - return e.Type.LayerType() -} - -func decodeEAPOL(data []byte, p gopacket.PacketBuilder) error { - e := &EAPOL{} - return decodingLayerDecoder(e, data, p) -} - -// EAPOLKeyDescriptorType is an enumeration of key descriptor types -// as specified by 802.1x in the EAPOL-Key frame -type EAPOLKeyDescriptorType uint8 - -// Enumeration of EAPOLKeyDescriptorType -const ( - EAPOLKeyDescriptorTypeRC4 EAPOLKeyDescriptorType = 1 - EAPOLKeyDescriptorTypeDot11 EAPOLKeyDescriptorType = 2 - EAPOLKeyDescriptorTypeWPA EAPOLKeyDescriptorType = 254 -) - -func (kdt EAPOLKeyDescriptorType) String() string { - switch kdt { - case EAPOLKeyDescriptorTypeRC4: - return "RC4" - case EAPOLKeyDescriptorTypeDot11: - return "802.11" - case EAPOLKeyDescriptorTypeWPA: - return "WPA" - default: - return fmt.Sprintf("unknown descriptor type %d", kdt) - } -} - -// EAPOLKeyDescriptorVersion is an enumeration of versions specifying the -// encryption algorithm for the key data and the authentication for the -// message integrity code (MIC) -type EAPOLKeyDescriptorVersion uint8 - -// Enumeration of EAPOLKeyDescriptorVersion -const ( - EAPOLKeyDescriptorVersionOther EAPOLKeyDescriptorVersion = 0 - EAPOLKeyDescriptorVersionRC4HMACMD5 EAPOLKeyDescriptorVersion = 1 - EAPOLKeyDescriptorVersionAESHMACSHA1 EAPOLKeyDescriptorVersion = 2 - EAPOLKeyDescriptorVersionAES128CMAC EAPOLKeyDescriptorVersion = 3 -) - -func (v EAPOLKeyDescriptorVersion) String() string { - switch v { - case EAPOLKeyDescriptorVersionOther: - return "Other" - case EAPOLKeyDescriptorVersionRC4HMACMD5: - return "RC4-HMAC-MD5" - case EAPOLKeyDescriptorVersionAESHMACSHA1: - return "AES-HMAC-SHA1-128" - case EAPOLKeyDescriptorVersionAES128CMAC: - return "AES-128-CMAC" - default: - return fmt.Sprintf("unknown version %d", v) - } -} - -// EAPOLKeyType is an enumeration of key derivation types describing -// the purpose of the keys being derived. -type EAPOLKeyType uint8 - -// Enumeration of EAPOLKeyType -const ( - EAPOLKeyTypeGroupSMK EAPOLKeyType = 0 - EAPOLKeyTypePairwise EAPOLKeyType = 1 -) - -func (kt EAPOLKeyType) String() string { - switch kt { - case EAPOLKeyTypeGroupSMK: - return "Group/SMK" - case EAPOLKeyTypePairwise: - return "Pairwise" - default: - return fmt.Sprintf("unknown key type %d", kt) - } -} - -// EAPOLKey defines an EAPOL-Key frame for 802.1x authentication -type EAPOLKey struct { - BaseLayer - KeyDescriptorType EAPOLKeyDescriptorType - KeyDescriptorVersion EAPOLKeyDescriptorVersion - KeyType EAPOLKeyType - KeyIndex uint8 - Install bool - KeyACK bool - KeyMIC bool - Secure bool - MICError bool - Request bool - HasEncryptedKeyData bool - SMKMessage bool - KeyLength uint16 - ReplayCounter uint64 - Nonce []byte - IV []byte - RSC uint64 - ID uint64 - MIC []byte - KeyDataLength uint16 - EncryptedKeyData []byte -} - -// LayerType returns LayerTypeEAPOLKey. -func (ek *EAPOLKey) LayerType() gopacket.LayerType { - return LayerTypeEAPOLKey -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (ek *EAPOLKey) CanDecode() gopacket.LayerType { - return LayerTypeEAPOLKey -} - -// NextLayerType returns layers.LayerTypeDot11InformationElement if the key -// data exists and is unencrypted, otherwise it does not expect a next layer. -func (ek *EAPOLKey) NextLayerType() gopacket.LayerType { - if !ek.HasEncryptedKeyData && ek.KeyDataLength > 0 { - return LayerTypeDot11InformationElement - } - return gopacket.LayerTypePayload -} - -const eapolKeyFrameLen = 95 - -// DecodeFromBytes decodes the given bytes into this layer. -func (ek *EAPOLKey) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < eapolKeyFrameLen { - df.SetTruncated() - return fmt.Errorf("EAPOLKey length %v too short, %v required", - len(data), eapolKeyFrameLen) - } - - ek.KeyDescriptorType = EAPOLKeyDescriptorType(data[0]) - - info := binary.BigEndian.Uint16(data[1:3]) - ek.KeyDescriptorVersion = EAPOLKeyDescriptorVersion(info & 0x0007) - ek.KeyType = EAPOLKeyType((info & 0x0008) >> 3) - ek.KeyIndex = uint8((info & 0x0030) >> 4) - ek.Install = (info & 0x0040) != 0 - ek.KeyACK = (info & 0x0080) != 0 - ek.KeyMIC = (info & 0x0100) != 0 - ek.Secure = (info & 0x0200) != 0 - ek.MICError = (info & 0x0400) != 0 - ek.Request = (info & 0x0800) != 0 - ek.HasEncryptedKeyData = (info & 0x1000) != 0 - ek.SMKMessage = (info & 0x2000) != 0 - - ek.KeyLength = binary.BigEndian.Uint16(data[3:5]) - ek.ReplayCounter = binary.BigEndian.Uint64(data[5:13]) - - ek.Nonce = data[13:45] - ek.IV = data[45:61] - ek.RSC = binary.BigEndian.Uint64(data[61:69]) - ek.ID = binary.BigEndian.Uint64(data[69:77]) - ek.MIC = data[77:93] - - ek.KeyDataLength = binary.BigEndian.Uint16(data[93:95]) - - totalLength := eapolKeyFrameLen + int(ek.KeyDataLength) - if len(data) < totalLength { - df.SetTruncated() - return fmt.Errorf("EAPOLKey data length %d too short, %d required", - len(data)-eapolKeyFrameLen, ek.KeyDataLength) - } - - if ek.HasEncryptedKeyData { - ek.EncryptedKeyData = data[eapolKeyFrameLen:totalLength] - ek.BaseLayer = BaseLayer{ - Contents: data[:totalLength], - Payload: data[totalLength:], - } - } else { - ek.BaseLayer = BaseLayer{ - Contents: data[:eapolKeyFrameLen], - Payload: data[eapolKeyFrameLen:], - } - } - - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (ek *EAPOLKey) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(eapolKeyFrameLen + len(ek.EncryptedKeyData)) - if err != nil { - return err - } - - buf[0] = byte(ek.KeyDescriptorType) - - var info uint16 - info |= uint16(ek.KeyDescriptorVersion) - info |= uint16(ek.KeyType) << 3 - info |= uint16(ek.KeyIndex) << 4 - if ek.Install { - info |= 0x0040 - } - if ek.KeyACK { - info |= 0x0080 - } - if ek.KeyMIC { - info |= 0x0100 - } - if ek.Secure { - info |= 0x0200 - } - if ek.MICError { - info |= 0x0400 - } - if ek.Request { - info |= 0x0800 - } - if ek.HasEncryptedKeyData { - info |= 0x1000 - } - if ek.SMKMessage { - info |= 0x2000 - } - binary.BigEndian.PutUint16(buf[1:3], info) - - binary.BigEndian.PutUint16(buf[3:5], ek.KeyLength) - binary.BigEndian.PutUint64(buf[5:13], ek.ReplayCounter) - - copy(buf[13:45], ek.Nonce) - copy(buf[45:61], ek.IV) - binary.BigEndian.PutUint64(buf[61:69], ek.RSC) - binary.BigEndian.PutUint64(buf[69:77], ek.ID) - copy(buf[77:93], ek.MIC) - - binary.BigEndian.PutUint16(buf[93:95], ek.KeyDataLength) - if len(ek.EncryptedKeyData) > 0 { - copy(buf[95:95+len(ek.EncryptedKeyData)], ek.EncryptedKeyData) - } - - return nil -} - -func decodeEAPOLKey(data []byte, p gopacket.PacketBuilder) error { - ek := &EAPOLKey{} - return decodingLayerDecoder(ek, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/endpoints.go b/vendor/github.com/google/gopacket/layers/endpoints.go deleted file mode 100644 index 4c91cc33247..00000000000 --- a/vendor/github.com/google/gopacket/layers/endpoints.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "github.com/google/gopacket" - "net" - "strconv" -) - -var ( - // We use two different endpoint types for IPv4 vs IPv6 addresses, so that - // ordering with endpointA.LessThan(endpointB) sanely groups all IPv4 - // addresses and all IPv6 addresses, such that IPv6 > IPv4 for all addresses. - EndpointIPv4 = gopacket.RegisterEndpointType(1, gopacket.EndpointTypeMetadata{Name: "IPv4", Formatter: func(b []byte) string { - return net.IP(b).String() - }}) - EndpointIPv6 = gopacket.RegisterEndpointType(2, gopacket.EndpointTypeMetadata{Name: "IPv6", Formatter: func(b []byte) string { - return net.IP(b).String() - }}) - - EndpointMAC = gopacket.RegisterEndpointType(3, gopacket.EndpointTypeMetadata{Name: "MAC", Formatter: func(b []byte) string { - return net.HardwareAddr(b).String() - }}) - EndpointTCPPort = gopacket.RegisterEndpointType(4, gopacket.EndpointTypeMetadata{Name: "TCP", Formatter: func(b []byte) string { - return strconv.Itoa(int(binary.BigEndian.Uint16(b))) - }}) - EndpointUDPPort = gopacket.RegisterEndpointType(5, gopacket.EndpointTypeMetadata{Name: "UDP", Formatter: func(b []byte) string { - return strconv.Itoa(int(binary.BigEndian.Uint16(b))) - }}) - EndpointSCTPPort = gopacket.RegisterEndpointType(6, gopacket.EndpointTypeMetadata{Name: "SCTP", Formatter: func(b []byte) string { - return strconv.Itoa(int(binary.BigEndian.Uint16(b))) - }}) - EndpointRUDPPort = gopacket.RegisterEndpointType(7, gopacket.EndpointTypeMetadata{Name: "RUDP", Formatter: func(b []byte) string { - return strconv.Itoa(int(b[0])) - }}) - EndpointUDPLitePort = gopacket.RegisterEndpointType(8, gopacket.EndpointTypeMetadata{Name: "UDPLite", Formatter: func(b []byte) string { - return strconv.Itoa(int(binary.BigEndian.Uint16(b))) - }}) - EndpointPPP = gopacket.RegisterEndpointType(9, gopacket.EndpointTypeMetadata{Name: "PPP", Formatter: func([]byte) string { - return "point" - }}) -) - -// NewIPEndpoint creates a new IP (v4 or v6) endpoint from a net.IP address. -// It returns gopacket.InvalidEndpoint if the IP address is invalid. -func NewIPEndpoint(a net.IP) gopacket.Endpoint { - ipv4 := a.To4() - if ipv4 != nil { - return gopacket.NewEndpoint(EndpointIPv4, []byte(ipv4)) - } - - ipv6 := a.To16() - if ipv6 != nil { - return gopacket.NewEndpoint(EndpointIPv6, []byte(ipv6)) - } - - return gopacket.InvalidEndpoint -} - -// NewMACEndpoint returns a new MAC address endpoint. -func NewMACEndpoint(a net.HardwareAddr) gopacket.Endpoint { - return gopacket.NewEndpoint(EndpointMAC, []byte(a)) -} -func newPortEndpoint(t gopacket.EndpointType, p uint16) gopacket.Endpoint { - return gopacket.NewEndpoint(t, []byte{byte(p >> 8), byte(p)}) -} - -// NewTCPPortEndpoint returns an endpoint based on a TCP port. -func NewTCPPortEndpoint(p TCPPort) gopacket.Endpoint { - return newPortEndpoint(EndpointTCPPort, uint16(p)) -} - -// NewUDPPortEndpoint returns an endpoint based on a UDP port. -func NewUDPPortEndpoint(p UDPPort) gopacket.Endpoint { - return newPortEndpoint(EndpointUDPPort, uint16(p)) -} - -// NewSCTPPortEndpoint returns an endpoint based on a SCTP port. -func NewSCTPPortEndpoint(p SCTPPort) gopacket.Endpoint { - return newPortEndpoint(EndpointSCTPPort, uint16(p)) -} - -// NewRUDPPortEndpoint returns an endpoint based on a RUDP port. -func NewRUDPPortEndpoint(p RUDPPort) gopacket.Endpoint { - return gopacket.NewEndpoint(EndpointRUDPPort, []byte{byte(p)}) -} - -// NewUDPLitePortEndpoint returns an endpoint based on a UDPLite port. -func NewUDPLitePortEndpoint(p UDPLitePort) gopacket.Endpoint { - return newPortEndpoint(EndpointUDPLitePort, uint16(p)) -} diff --git a/vendor/github.com/google/gopacket/layers/enums.go b/vendor/github.com/google/gopacket/layers/enums.go deleted file mode 100644 index 8427bdaf47d..00000000000 --- a/vendor/github.com/google/gopacket/layers/enums.go +++ /dev/null @@ -1,443 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "fmt" - "runtime" - - "github.com/google/gopacket" -) - -// EnumMetadata keeps track of a set of metadata for each enumeration value -// for protocol enumerations. -type EnumMetadata struct { - // DecodeWith is the decoder to use to decode this protocol's data. - DecodeWith gopacket.Decoder - // Name is the name of the enumeration value. - Name string - // LayerType is the layer type implied by the given enum. - LayerType gopacket.LayerType -} - -// EthernetType is an enumeration of ethernet type values, and acts as a decoder -// for any type it supports. -type EthernetType uint16 - -const ( - // EthernetTypeLLC is not an actual ethernet type. It is instead a - // placeholder we use in Ethernet frames that use the 802.3 standard of - // srcmac|dstmac|length|LLC instead of srcmac|dstmac|ethertype. - EthernetTypeLLC EthernetType = 0 - EthernetTypeIPv4 EthernetType = 0x0800 - EthernetTypeARP EthernetType = 0x0806 - EthernetTypeIPv6 EthernetType = 0x86DD - EthernetTypeCiscoDiscovery EthernetType = 0x2000 - EthernetTypeNortelDiscovery EthernetType = 0x01a2 - EthernetTypeTransparentEthernetBridging EthernetType = 0x6558 - EthernetTypeDot1Q EthernetType = 0x8100 - EthernetTypePPP EthernetType = 0x880b - EthernetTypePPPoEDiscovery EthernetType = 0x8863 - EthernetTypePPPoESession EthernetType = 0x8864 - EthernetTypeMPLSUnicast EthernetType = 0x8847 - EthernetTypeMPLSMulticast EthernetType = 0x8848 - EthernetTypeEAPOL EthernetType = 0x888e - EthernetTypeERSPAN EthernetType = 0x88be - EthernetTypeQinQ EthernetType = 0x88a8 - EthernetTypeLinkLayerDiscovery EthernetType = 0x88cc - EthernetTypeEthernetCTP EthernetType = 0x9000 -) - -// IPProtocol is an enumeration of IP protocol values, and acts as a decoder -// for any type it supports. -type IPProtocol uint8 - -const ( - IPProtocolIPv6HopByHop IPProtocol = 0 - IPProtocolICMPv4 IPProtocol = 1 - IPProtocolIGMP IPProtocol = 2 - IPProtocolIPv4 IPProtocol = 4 - IPProtocolTCP IPProtocol = 6 - IPProtocolUDP IPProtocol = 17 - IPProtocolRUDP IPProtocol = 27 - IPProtocolIPv6 IPProtocol = 41 - IPProtocolIPv6Routing IPProtocol = 43 - IPProtocolIPv6Fragment IPProtocol = 44 - IPProtocolGRE IPProtocol = 47 - IPProtocolESP IPProtocol = 50 - IPProtocolAH IPProtocol = 51 - IPProtocolICMPv6 IPProtocol = 58 - IPProtocolNoNextHeader IPProtocol = 59 - IPProtocolIPv6Destination IPProtocol = 60 - IPProtocolOSPF IPProtocol = 89 - IPProtocolIPIP IPProtocol = 94 - IPProtocolEtherIP IPProtocol = 97 - IPProtocolVRRP IPProtocol = 112 - IPProtocolSCTP IPProtocol = 132 - IPProtocolUDPLite IPProtocol = 136 - IPProtocolMPLSInIP IPProtocol = 137 -) - -// LinkType is an enumeration of link types, and acts as a decoder for any -// link type it supports. -type LinkType uint8 - -const ( - // According to pcap-linktype(7) and http://www.tcpdump.org/linktypes.html - LinkTypeNull LinkType = 0 - LinkTypeEthernet LinkType = 1 - LinkTypeAX25 LinkType = 3 - LinkTypeTokenRing LinkType = 6 - LinkTypeArcNet LinkType = 7 - LinkTypeSLIP LinkType = 8 - LinkTypePPP LinkType = 9 - LinkTypeFDDI LinkType = 10 - LinkTypePPP_HDLC LinkType = 50 - LinkTypePPPEthernet LinkType = 51 - LinkTypeATM_RFC1483 LinkType = 100 - LinkTypeRaw LinkType = 101 - LinkTypeC_HDLC LinkType = 104 - LinkTypeIEEE802_11 LinkType = 105 - LinkTypeFRelay LinkType = 107 - LinkTypeLoop LinkType = 108 - LinkTypeLinuxSLL LinkType = 113 - LinkTypeLTalk LinkType = 114 - LinkTypePFLog LinkType = 117 - LinkTypePrismHeader LinkType = 119 - LinkTypeIPOverFC LinkType = 122 - LinkTypeSunATM LinkType = 123 - LinkTypeIEEE80211Radio LinkType = 127 - LinkTypeARCNetLinux LinkType = 129 - LinkTypeIPOver1394 LinkType = 138 - LinkTypeMTP2Phdr LinkType = 139 - LinkTypeMTP2 LinkType = 140 - LinkTypeMTP3 LinkType = 141 - LinkTypeSCCP LinkType = 142 - LinkTypeDOCSIS LinkType = 143 - LinkTypeLinuxIRDA LinkType = 144 - LinkTypeLinuxLAPD LinkType = 177 - LinkTypeLinuxUSB LinkType = 220 - LinkTypeFC2 LinkType = 224 - LinkTypeFC2Framed LinkType = 225 - LinkTypeIPv4 LinkType = 228 - LinkTypeIPv6 LinkType = 229 -) - -// PPPoECode is the PPPoE code enum, taken from http://tools.ietf.org/html/rfc2516 -type PPPoECode uint8 - -const ( - PPPoECodePADI PPPoECode = 0x09 - PPPoECodePADO PPPoECode = 0x07 - PPPoECodePADR PPPoECode = 0x19 - PPPoECodePADS PPPoECode = 0x65 - PPPoECodePADT PPPoECode = 0xA7 - PPPoECodeSession PPPoECode = 0x00 -) - -// PPPType is an enumeration of PPP type values, and acts as a decoder for any -// type it supports. -type PPPType uint16 - -const ( - PPPTypeIPv4 PPPType = 0x0021 - PPPTypeIPv6 PPPType = 0x0057 - PPPTypeMPLSUnicast PPPType = 0x0281 - PPPTypeMPLSMulticast PPPType = 0x0283 -) - -// SCTPChunkType is an enumeration of chunk types inside SCTP packets. -type SCTPChunkType uint8 - -const ( - SCTPChunkTypeData SCTPChunkType = 0 - SCTPChunkTypeInit SCTPChunkType = 1 - SCTPChunkTypeInitAck SCTPChunkType = 2 - SCTPChunkTypeSack SCTPChunkType = 3 - SCTPChunkTypeHeartbeat SCTPChunkType = 4 - SCTPChunkTypeHeartbeatAck SCTPChunkType = 5 - SCTPChunkTypeAbort SCTPChunkType = 6 - SCTPChunkTypeShutdown SCTPChunkType = 7 - SCTPChunkTypeShutdownAck SCTPChunkType = 8 - SCTPChunkTypeError SCTPChunkType = 9 - SCTPChunkTypeCookieEcho SCTPChunkType = 10 - SCTPChunkTypeCookieAck SCTPChunkType = 11 - SCTPChunkTypeShutdownComplete SCTPChunkType = 14 -) - -// FDDIFrameControl is an enumeration of FDDI frame control bytes. -type FDDIFrameControl uint8 - -const ( - FDDIFrameControlLLC FDDIFrameControl = 0x50 -) - -// EAPOLType is an enumeration of EAPOL packet types. -type EAPOLType uint8 - -const ( - EAPOLTypeEAP EAPOLType = 0 - EAPOLTypeStart EAPOLType = 1 - EAPOLTypeLogOff EAPOLType = 2 - EAPOLTypeKey EAPOLType = 3 - EAPOLTypeASFAlert EAPOLType = 4 -) - -// ProtocolFamily is the set of values defined as PF_* in sys/socket.h -type ProtocolFamily uint8 - -const ( - ProtocolFamilyIPv4 ProtocolFamily = 2 - // BSDs use different values for INET6... glory be. These values taken from - // tcpdump 4.3.0. - ProtocolFamilyIPv6BSD ProtocolFamily = 24 - ProtocolFamilyIPv6FreeBSD ProtocolFamily = 28 - ProtocolFamilyIPv6Darwin ProtocolFamily = 30 - ProtocolFamilyIPv6Linux ProtocolFamily = 10 -) - -// Dot11Type is a combination of IEEE 802.11 frame's Type and Subtype fields. -// By combining these two fields together into a single type, we're able to -// provide a String function that correctly displays the subtype given the -// top-level type. -// -// If you just care about the top-level type, use the MainType function. -type Dot11Type uint8 - -// MainType strips the subtype information from the given type, -// returning just the overarching type (Mgmt, Ctrl, Data, Reserved). -func (d Dot11Type) MainType() Dot11Type { - return d & dot11TypeMask -} - -func (d Dot11Type) QOS() bool { - return d&dot11QOSMask == Dot11TypeDataQOSData -} - -const ( - Dot11TypeMgmt Dot11Type = 0x00 - Dot11TypeCtrl Dot11Type = 0x01 - Dot11TypeData Dot11Type = 0x02 - Dot11TypeReserved Dot11Type = 0x03 - dot11TypeMask = 0x03 - dot11QOSMask = 0x23 - - // The following are type/subtype conglomerations. - - // Management - Dot11TypeMgmtAssociationReq Dot11Type = 0x00 - Dot11TypeMgmtAssociationResp Dot11Type = 0x04 - Dot11TypeMgmtReassociationReq Dot11Type = 0x08 - Dot11TypeMgmtReassociationResp Dot11Type = 0x0c - Dot11TypeMgmtProbeReq Dot11Type = 0x10 - Dot11TypeMgmtProbeResp Dot11Type = 0x14 - Dot11TypeMgmtMeasurementPilot Dot11Type = 0x18 - Dot11TypeMgmtBeacon Dot11Type = 0x20 - Dot11TypeMgmtATIM Dot11Type = 0x24 - Dot11TypeMgmtDisassociation Dot11Type = 0x28 - Dot11TypeMgmtAuthentication Dot11Type = 0x2c - Dot11TypeMgmtDeauthentication Dot11Type = 0x30 - Dot11TypeMgmtAction Dot11Type = 0x34 - Dot11TypeMgmtActionNoAck Dot11Type = 0x38 - - // Control - Dot11TypeCtrlWrapper Dot11Type = 0x1d - Dot11TypeCtrlBlockAckReq Dot11Type = 0x21 - Dot11TypeCtrlBlockAck Dot11Type = 0x25 - Dot11TypeCtrlPowersavePoll Dot11Type = 0x29 - Dot11TypeCtrlRTS Dot11Type = 0x2d - Dot11TypeCtrlCTS Dot11Type = 0x31 - Dot11TypeCtrlAck Dot11Type = 0x35 - Dot11TypeCtrlCFEnd Dot11Type = 0x39 - Dot11TypeCtrlCFEndAck Dot11Type = 0x3d - - // Data - Dot11TypeDataCFAck Dot11Type = 0x06 - Dot11TypeDataCFPoll Dot11Type = 0x0a - Dot11TypeDataCFAckPoll Dot11Type = 0x0e - Dot11TypeDataNull Dot11Type = 0x12 - Dot11TypeDataCFAckNoData Dot11Type = 0x16 - Dot11TypeDataCFPollNoData Dot11Type = 0x1a - Dot11TypeDataCFAckPollNoData Dot11Type = 0x1e - Dot11TypeDataQOSData Dot11Type = 0x22 - Dot11TypeDataQOSDataCFAck Dot11Type = 0x26 - Dot11TypeDataQOSDataCFPoll Dot11Type = 0x2a - Dot11TypeDataQOSDataCFAckPoll Dot11Type = 0x2e - Dot11TypeDataQOSNull Dot11Type = 0x32 - Dot11TypeDataQOSCFPollNoData Dot11Type = 0x3a - Dot11TypeDataQOSCFAckPollNoData Dot11Type = 0x3e -) - -// Decode a raw v4 or v6 IP packet. -func decodeIPv4or6(data []byte, p gopacket.PacketBuilder) error { - version := data[0] >> 4 - switch version { - case 4: - return decodeIPv4(data, p) - case 6: - return decodeIPv6(data, p) - } - return fmt.Errorf("Invalid IP packet version %v", version) -} - -func initActualTypeData() { - // Each of the XXXTypeMetadata arrays contains mappings of how to handle enum - // values for various enum types in gopacket/layers. - // These arrays are actually created by gen2.go and stored in - // enums_generated.go. - // - // So, EthernetTypeMetadata[2] contains information on how to handle EthernetType - // 2, including which name to give it and which decoder to use to decode - // packet data of that type. These arrays are filled by default with all of the - // protocols gopacket/layers knows how to handle, but users of the library can - // add new decoders or override existing ones. For example, if you write a better - // TCP decoder, you can override IPProtocolMetadata[IPProtocolTCP].DecodeWith - // with your new decoder, and all gopacket/layers decoding will use your new - // decoder whenever they encounter that IPProtocol. - - // Here we link up all enumerations with their respective names and decoders. - EthernetTypeMetadata[EthernetTypeLLC] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeLLC), Name: "LLC", LayerType: LayerTypeLLC} - EthernetTypeMetadata[EthernetTypeIPv4] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv4), Name: "IPv4", LayerType: LayerTypeIPv4} - EthernetTypeMetadata[EthernetTypeIPv6] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv6), Name: "IPv6", LayerType: LayerTypeIPv6} - EthernetTypeMetadata[EthernetTypeARP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeARP), Name: "ARP", LayerType: LayerTypeARP} - EthernetTypeMetadata[EthernetTypeDot1Q] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot1Q), Name: "Dot1Q", LayerType: LayerTypeDot1Q} - EthernetTypeMetadata[EthernetTypePPP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodePPP), Name: "PPP", LayerType: LayerTypePPP} - EthernetTypeMetadata[EthernetTypePPPoEDiscovery] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodePPPoE), Name: "PPPoEDiscovery", LayerType: LayerTypePPPoE} - EthernetTypeMetadata[EthernetTypePPPoESession] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodePPPoE), Name: "PPPoESession", LayerType: LayerTypePPPoE} - EthernetTypeMetadata[EthernetTypeEthernetCTP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeEthernetCTP), Name: "EthernetCTP", LayerType: LayerTypeEthernetCTP} - EthernetTypeMetadata[EthernetTypeCiscoDiscovery] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeCiscoDiscovery), Name: "CiscoDiscovery", LayerType: LayerTypeCiscoDiscovery} - EthernetTypeMetadata[EthernetTypeNortelDiscovery] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeNortelDiscovery), Name: "NortelDiscovery", LayerType: LayerTypeNortelDiscovery} - EthernetTypeMetadata[EthernetTypeLinkLayerDiscovery] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeLinkLayerDiscovery), Name: "LinkLayerDiscovery", LayerType: LayerTypeLinkLayerDiscovery} - EthernetTypeMetadata[EthernetTypeMPLSUnicast] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeMPLS), Name: "MPLSUnicast", LayerType: LayerTypeMPLS} - EthernetTypeMetadata[EthernetTypeMPLSMulticast] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeMPLS), Name: "MPLSMulticast", LayerType: LayerTypeMPLS} - EthernetTypeMetadata[EthernetTypeEAPOL] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeEAPOL), Name: "EAPOL", LayerType: LayerTypeEAPOL} - EthernetTypeMetadata[EthernetTypeQinQ] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot1Q), Name: "Dot1Q", LayerType: LayerTypeDot1Q} - EthernetTypeMetadata[EthernetTypeTransparentEthernetBridging] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeEthernet), Name: "TransparentEthernetBridging", LayerType: LayerTypeEthernet} - EthernetTypeMetadata[EthernetTypeERSPAN] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeERSPANII), Name: "ERSPAN Type II", LayerType: LayerTypeERSPANII} - - IPProtocolMetadata[IPProtocolIPv4] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv4), Name: "IPv4", LayerType: LayerTypeIPv4} - IPProtocolMetadata[IPProtocolTCP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeTCP), Name: "TCP", LayerType: LayerTypeTCP} - IPProtocolMetadata[IPProtocolUDP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeUDP), Name: "UDP", LayerType: LayerTypeUDP} - IPProtocolMetadata[IPProtocolICMPv4] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeICMPv4), Name: "ICMPv4", LayerType: LayerTypeICMPv4} - IPProtocolMetadata[IPProtocolICMPv6] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeICMPv6), Name: "ICMPv6", LayerType: LayerTypeICMPv6} - IPProtocolMetadata[IPProtocolSCTP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTP), Name: "SCTP", LayerType: LayerTypeSCTP} - IPProtocolMetadata[IPProtocolIPv6] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv6), Name: "IPv6", LayerType: LayerTypeIPv6} - IPProtocolMetadata[IPProtocolIPIP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv4), Name: "IPv4", LayerType: LayerTypeIPv4} - IPProtocolMetadata[IPProtocolEtherIP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeEtherIP), Name: "EtherIP", LayerType: LayerTypeEtherIP} - IPProtocolMetadata[IPProtocolRUDP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeRUDP), Name: "RUDP", LayerType: LayerTypeRUDP} - IPProtocolMetadata[IPProtocolGRE] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeGRE), Name: "GRE", LayerType: LayerTypeGRE} - IPProtocolMetadata[IPProtocolIPv6HopByHop] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv6HopByHop), Name: "IPv6HopByHop", LayerType: LayerTypeIPv6HopByHop} - IPProtocolMetadata[IPProtocolIPv6Routing] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv6Routing), Name: "IPv6Routing", LayerType: LayerTypeIPv6Routing} - IPProtocolMetadata[IPProtocolIPv6Fragment] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv6Fragment), Name: "IPv6Fragment", LayerType: LayerTypeIPv6Fragment} - IPProtocolMetadata[IPProtocolIPv6Destination] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv6Destination), Name: "IPv6Destination", LayerType: LayerTypeIPv6Destination} - IPProtocolMetadata[IPProtocolOSPF] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeOSPF), Name: "OSPF", LayerType: LayerTypeOSPF} - IPProtocolMetadata[IPProtocolAH] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPSecAH), Name: "IPSecAH", LayerType: LayerTypeIPSecAH} - IPProtocolMetadata[IPProtocolESP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPSecESP), Name: "IPSecESP", LayerType: LayerTypeIPSecESP} - IPProtocolMetadata[IPProtocolUDPLite] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeUDPLite), Name: "UDPLite", LayerType: LayerTypeUDPLite} - IPProtocolMetadata[IPProtocolMPLSInIP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeMPLS), Name: "MPLS", LayerType: LayerTypeMPLS} - IPProtocolMetadata[IPProtocolNoNextHeader] = EnumMetadata{DecodeWith: gopacket.DecodePayload, Name: "NoNextHeader", LayerType: gopacket.LayerTypePayload} - IPProtocolMetadata[IPProtocolIGMP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIGMP), Name: "IGMP", LayerType: LayerTypeIGMP} - IPProtocolMetadata[IPProtocolVRRP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeVRRP), Name: "VRRP", LayerType: LayerTypeVRRP} - - SCTPChunkTypeMetadata[SCTPChunkTypeData] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPData), Name: "Data"} - SCTPChunkTypeMetadata[SCTPChunkTypeInit] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPInit), Name: "Init"} - SCTPChunkTypeMetadata[SCTPChunkTypeInitAck] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPInit), Name: "InitAck"} - SCTPChunkTypeMetadata[SCTPChunkTypeSack] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPSack), Name: "Sack"} - SCTPChunkTypeMetadata[SCTPChunkTypeHeartbeat] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPHeartbeat), Name: "Heartbeat"} - SCTPChunkTypeMetadata[SCTPChunkTypeHeartbeatAck] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPHeartbeat), Name: "HeartbeatAck"} - SCTPChunkTypeMetadata[SCTPChunkTypeAbort] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPError), Name: "Abort"} - SCTPChunkTypeMetadata[SCTPChunkTypeError] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPError), Name: "Error"} - SCTPChunkTypeMetadata[SCTPChunkTypeShutdown] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPShutdown), Name: "Shutdown"} - SCTPChunkTypeMetadata[SCTPChunkTypeShutdownAck] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPShutdownAck), Name: "ShutdownAck"} - SCTPChunkTypeMetadata[SCTPChunkTypeCookieEcho] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPCookieEcho), Name: "CookieEcho"} - SCTPChunkTypeMetadata[SCTPChunkTypeCookieAck] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPEmptyLayer), Name: "CookieAck"} - SCTPChunkTypeMetadata[SCTPChunkTypeShutdownComplete] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeSCTPEmptyLayer), Name: "ShutdownComplete"} - - PPPTypeMetadata[PPPTypeIPv4] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv4), Name: "IPv4"} - PPPTypeMetadata[PPPTypeIPv6] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv6), Name: "IPv6"} - PPPTypeMetadata[PPPTypeMPLSUnicast] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeMPLS), Name: "MPLSUnicast"} - PPPTypeMetadata[PPPTypeMPLSMulticast] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeMPLS), Name: "MPLSMulticast"} - - PPPoECodeMetadata[PPPoECodeSession] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodePPP), Name: "PPP"} - - LinkTypeMetadata[LinkTypeEthernet] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeEthernet), Name: "Ethernet"} - LinkTypeMetadata[LinkTypePPP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodePPP), Name: "PPP"} - LinkTypeMetadata[LinkTypeFDDI] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeFDDI), Name: "FDDI"} - LinkTypeMetadata[LinkTypeNull] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeLoopback), Name: "Null"} - LinkTypeMetadata[LinkTypeIEEE802_11] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11), Name: "Dot11"} - LinkTypeMetadata[LinkTypeLoop] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeLoopback), Name: "Loop"} - LinkTypeMetadata[LinkTypeIEEE802_11] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11), Name: "802.11"} - LinkTypeMetadata[LinkTypeRaw] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv4or6), Name: "Raw"} - // See https://github.com/the-tcpdump-group/libpcap/blob/170f717e6e818cdc4bcbbfd906b63088eaa88fa0/pcap/dlt.h#L85 - // Or https://github.com/wireshark/wireshark/blob/854cfe53efe44080609c78053ecfb2342ad84a08/wiretap/pcap-common.c#L508 - if runtime.GOOS == "openbsd" { - LinkTypeMetadata[14] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv4or6), Name: "Raw"} - } else { - LinkTypeMetadata[12] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv4or6), Name: "Raw"} - } - LinkTypeMetadata[LinkTypePFLog] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodePFLog), Name: "PFLog"} - LinkTypeMetadata[LinkTypeIEEE80211Radio] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeRadioTap), Name: "RadioTap"} - LinkTypeMetadata[LinkTypeLinuxUSB] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeUSB), Name: "USB"} - LinkTypeMetadata[LinkTypeLinuxSLL] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeLinuxSLL), Name: "Linux SLL"} - LinkTypeMetadata[LinkTypePrismHeader] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodePrismHeader), Name: "Prism"} - - FDDIFrameControlMetadata[FDDIFrameControlLLC] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeLLC), Name: "LLC"} - - EAPOLTypeMetadata[EAPOLTypeEAP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeEAP), Name: "EAP", LayerType: LayerTypeEAP} - EAPOLTypeMetadata[EAPOLTypeKey] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeEAPOLKey), Name: "EAPOLKey", LayerType: LayerTypeEAPOLKey} - - ProtocolFamilyMetadata[ProtocolFamilyIPv4] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv4), Name: "IPv4", LayerType: LayerTypeIPv4} - ProtocolFamilyMetadata[ProtocolFamilyIPv6BSD] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv6), Name: "IPv6", LayerType: LayerTypeIPv6} - ProtocolFamilyMetadata[ProtocolFamilyIPv6FreeBSD] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv6), Name: "IPv6", LayerType: LayerTypeIPv6} - ProtocolFamilyMetadata[ProtocolFamilyIPv6Darwin] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv6), Name: "IPv6", LayerType: LayerTypeIPv6} - ProtocolFamilyMetadata[ProtocolFamilyIPv6Linux] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv6), Name: "IPv6", LayerType: LayerTypeIPv6} - - Dot11TypeMetadata[Dot11TypeMgmtAssociationReq] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtAssociationReq), Name: "MgmtAssociationReq", LayerType: LayerTypeDot11MgmtAssociationReq} - Dot11TypeMetadata[Dot11TypeMgmtAssociationResp] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtAssociationResp), Name: "MgmtAssociationResp", LayerType: LayerTypeDot11MgmtAssociationResp} - Dot11TypeMetadata[Dot11TypeMgmtReassociationReq] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtReassociationReq), Name: "MgmtReassociationReq", LayerType: LayerTypeDot11MgmtReassociationReq} - Dot11TypeMetadata[Dot11TypeMgmtReassociationResp] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtReassociationResp), Name: "MgmtReassociationResp", LayerType: LayerTypeDot11MgmtReassociationResp} - Dot11TypeMetadata[Dot11TypeMgmtProbeReq] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtProbeReq), Name: "MgmtProbeReq", LayerType: LayerTypeDot11MgmtProbeReq} - Dot11TypeMetadata[Dot11TypeMgmtProbeResp] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtProbeResp), Name: "MgmtProbeResp", LayerType: LayerTypeDot11MgmtProbeResp} - Dot11TypeMetadata[Dot11TypeMgmtMeasurementPilot] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtMeasurementPilot), Name: "MgmtMeasurementPilot", LayerType: LayerTypeDot11MgmtMeasurementPilot} - Dot11TypeMetadata[Dot11TypeMgmtBeacon] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtBeacon), Name: "MgmtBeacon", LayerType: LayerTypeDot11MgmtBeacon} - Dot11TypeMetadata[Dot11TypeMgmtATIM] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtATIM), Name: "MgmtATIM", LayerType: LayerTypeDot11MgmtATIM} - Dot11TypeMetadata[Dot11TypeMgmtDisassociation] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtDisassociation), Name: "MgmtDisassociation", LayerType: LayerTypeDot11MgmtDisassociation} - Dot11TypeMetadata[Dot11TypeMgmtAuthentication] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtAuthentication), Name: "MgmtAuthentication", LayerType: LayerTypeDot11MgmtAuthentication} - Dot11TypeMetadata[Dot11TypeMgmtDeauthentication] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtDeauthentication), Name: "MgmtDeauthentication", LayerType: LayerTypeDot11MgmtDeauthentication} - Dot11TypeMetadata[Dot11TypeMgmtAction] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtAction), Name: "MgmtAction", LayerType: LayerTypeDot11MgmtAction} - Dot11TypeMetadata[Dot11TypeMgmtActionNoAck] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11MgmtActionNoAck), Name: "MgmtActionNoAck", LayerType: LayerTypeDot11MgmtActionNoAck} - Dot11TypeMetadata[Dot11TypeCtrl] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11Ctrl), Name: "Ctrl", LayerType: LayerTypeDot11Ctrl} - Dot11TypeMetadata[Dot11TypeCtrlWrapper] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11Ctrl), Name: "CtrlWrapper", LayerType: LayerTypeDot11Ctrl} - Dot11TypeMetadata[Dot11TypeCtrlBlockAckReq] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11CtrlBlockAckReq), Name: "CtrlBlockAckReq", LayerType: LayerTypeDot11CtrlBlockAckReq} - Dot11TypeMetadata[Dot11TypeCtrlBlockAck] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11CtrlBlockAck), Name: "CtrlBlockAck", LayerType: LayerTypeDot11CtrlBlockAck} - Dot11TypeMetadata[Dot11TypeCtrlPowersavePoll] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11CtrlPowersavePoll), Name: "CtrlPowersavePoll", LayerType: LayerTypeDot11CtrlPowersavePoll} - Dot11TypeMetadata[Dot11TypeCtrlRTS] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11CtrlRTS), Name: "CtrlRTS", LayerType: LayerTypeDot11CtrlRTS} - Dot11TypeMetadata[Dot11TypeCtrlCTS] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11CtrlCTS), Name: "CtrlCTS", LayerType: LayerTypeDot11CtrlCTS} - Dot11TypeMetadata[Dot11TypeCtrlAck] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11CtrlAck), Name: "CtrlAck", LayerType: LayerTypeDot11CtrlAck} - Dot11TypeMetadata[Dot11TypeCtrlCFEnd] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11CtrlCFEnd), Name: "CtrlCFEnd", LayerType: LayerTypeDot11CtrlCFEnd} - Dot11TypeMetadata[Dot11TypeCtrlCFEndAck] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11CtrlCFEndAck), Name: "CtrlCFEndAck", LayerType: LayerTypeDot11CtrlCFEndAck} - Dot11TypeMetadata[Dot11TypeData] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11Data), Name: "Data", LayerType: LayerTypeDot11Data} - Dot11TypeMetadata[Dot11TypeDataCFAck] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataCFAck), Name: "DataCFAck", LayerType: LayerTypeDot11DataCFAck} - Dot11TypeMetadata[Dot11TypeDataCFPoll] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataCFPoll), Name: "DataCFPoll", LayerType: LayerTypeDot11DataCFPoll} - Dot11TypeMetadata[Dot11TypeDataCFAckPoll] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataCFAckPoll), Name: "DataCFAckPoll", LayerType: LayerTypeDot11DataCFAckPoll} - Dot11TypeMetadata[Dot11TypeDataNull] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataNull), Name: "DataNull", LayerType: LayerTypeDot11DataNull} - Dot11TypeMetadata[Dot11TypeDataCFAckNoData] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataCFAckNoData), Name: "DataCFAckNoData", LayerType: LayerTypeDot11DataCFAckNoData} - Dot11TypeMetadata[Dot11TypeDataCFPollNoData] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataCFPollNoData), Name: "DataCFPollNoData", LayerType: LayerTypeDot11DataCFPollNoData} - Dot11TypeMetadata[Dot11TypeDataCFAckPollNoData] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataCFAckPollNoData), Name: "DataCFAckPollNoData", LayerType: LayerTypeDot11DataCFAckPollNoData} - Dot11TypeMetadata[Dot11TypeDataQOSData] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataQOSData), Name: "DataQOSData", LayerType: LayerTypeDot11DataQOSData} - Dot11TypeMetadata[Dot11TypeDataQOSDataCFAck] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataQOSDataCFAck), Name: "DataQOSDataCFAck", LayerType: LayerTypeDot11DataQOSDataCFAck} - Dot11TypeMetadata[Dot11TypeDataQOSDataCFPoll] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataQOSDataCFPoll), Name: "DataQOSDataCFPoll", LayerType: LayerTypeDot11DataQOSDataCFPoll} - Dot11TypeMetadata[Dot11TypeDataQOSDataCFAckPoll] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataQOSDataCFAckPoll), Name: "DataQOSDataCFAckPoll", LayerType: LayerTypeDot11DataQOSDataCFAckPoll} - Dot11TypeMetadata[Dot11TypeDataQOSNull] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataQOSNull), Name: "DataQOSNull", LayerType: LayerTypeDot11DataQOSNull} - Dot11TypeMetadata[Dot11TypeDataQOSCFPollNoData] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataQOSCFPollNoData), Name: "DataQOSCFPollNoData", LayerType: LayerTypeDot11DataQOSCFPollNoData} - Dot11TypeMetadata[Dot11TypeDataQOSCFAckPollNoData] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot11DataQOSCFAckPollNoData), Name: "DataQOSCFAckPollNoData", LayerType: LayerTypeDot11DataQOSCFAckPollNoData} - - USBTransportTypeMetadata[USBTransportTypeInterrupt] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeUSBInterrupt), Name: "Interrupt", LayerType: LayerTypeUSBInterrupt} - USBTransportTypeMetadata[USBTransportTypeControl] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeUSBControl), Name: "Control", LayerType: LayerTypeUSBControl} - USBTransportTypeMetadata[USBTransportTypeBulk] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeUSBBulk), Name: "Bulk", LayerType: LayerTypeUSBBulk} -} diff --git a/vendor/github.com/google/gopacket/layers/enums_generated.go b/vendor/github.com/google/gopacket/layers/enums_generated.go deleted file mode 100644 index bf77aac5013..00000000000 --- a/vendor/github.com/google/gopacket/layers/enums_generated.go +++ /dev/null @@ -1,434 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. - -package layers - -// Created by gen2.go, don't edit manually -// Generated at 2017-10-23 10:20:24.458771856 -0600 MDT m=+0.001159033 - -import ( - "fmt" - - "github.com/google/gopacket" -) - -func init() { - initUnknownTypesForLinkType() - initUnknownTypesForEthernetType() - initUnknownTypesForPPPType() - initUnknownTypesForIPProtocol() - initUnknownTypesForSCTPChunkType() - initUnknownTypesForPPPoECode() - initUnknownTypesForFDDIFrameControl() - initUnknownTypesForEAPOLType() - initUnknownTypesForProtocolFamily() - initUnknownTypesForDot11Type() - initUnknownTypesForUSBTransportType() - initActualTypeData() -} - -// Decoder calls LinkTypeMetadata.DecodeWith's decoder. -func (a LinkType) Decode(data []byte, p gopacket.PacketBuilder) error { - return LinkTypeMetadata[a].DecodeWith.Decode(data, p) -} - -// String returns LinkTypeMetadata.Name. -func (a LinkType) String() string { - return LinkTypeMetadata[a].Name -} - -// LayerType returns LinkTypeMetadata.LayerType. -func (a LinkType) LayerType() gopacket.LayerType { - return LinkTypeMetadata[a].LayerType -} - -type errorDecoderForLinkType int - -func (a *errorDecoderForLinkType) Decode(data []byte, p gopacket.PacketBuilder) error { - return a -} -func (a *errorDecoderForLinkType) Error() string { - return fmt.Sprintf("Unable to decode LinkType %d", int(*a)) -} - -var errorDecodersForLinkType [256]errorDecoderForLinkType -var LinkTypeMetadata [256]EnumMetadata - -func initUnknownTypesForLinkType() { - for i := 0; i < 256; i++ { - errorDecodersForLinkType[i] = errorDecoderForLinkType(i) - LinkTypeMetadata[i] = EnumMetadata{ - DecodeWith: &errorDecodersForLinkType[i], - Name: "UnknownLinkType", - } - } -} - -// Decoder calls EthernetTypeMetadata.DecodeWith's decoder. -func (a EthernetType) Decode(data []byte, p gopacket.PacketBuilder) error { - return EthernetTypeMetadata[a].DecodeWith.Decode(data, p) -} - -// String returns EthernetTypeMetadata.Name. -func (a EthernetType) String() string { - return EthernetTypeMetadata[a].Name -} - -// LayerType returns EthernetTypeMetadata.LayerType. -func (a EthernetType) LayerType() gopacket.LayerType { - return EthernetTypeMetadata[a].LayerType -} - -type errorDecoderForEthernetType int - -func (a *errorDecoderForEthernetType) Decode(data []byte, p gopacket.PacketBuilder) error { - return a -} -func (a *errorDecoderForEthernetType) Error() string { - return fmt.Sprintf("Unable to decode EthernetType %d", int(*a)) -} - -var errorDecodersForEthernetType [65536]errorDecoderForEthernetType -var EthernetTypeMetadata [65536]EnumMetadata - -func initUnknownTypesForEthernetType() { - for i := 0; i < 65536; i++ { - errorDecodersForEthernetType[i] = errorDecoderForEthernetType(i) - EthernetTypeMetadata[i] = EnumMetadata{ - DecodeWith: &errorDecodersForEthernetType[i], - Name: "UnknownEthernetType", - } - } -} - -// Decoder calls PPPTypeMetadata.DecodeWith's decoder. -func (a PPPType) Decode(data []byte, p gopacket.PacketBuilder) error { - return PPPTypeMetadata[a].DecodeWith.Decode(data, p) -} - -// String returns PPPTypeMetadata.Name. -func (a PPPType) String() string { - return PPPTypeMetadata[a].Name -} - -// LayerType returns PPPTypeMetadata.LayerType. -func (a PPPType) LayerType() gopacket.LayerType { - return PPPTypeMetadata[a].LayerType -} - -type errorDecoderForPPPType int - -func (a *errorDecoderForPPPType) Decode(data []byte, p gopacket.PacketBuilder) error { - return a -} -func (a *errorDecoderForPPPType) Error() string { - return fmt.Sprintf("Unable to decode PPPType %d", int(*a)) -} - -var errorDecodersForPPPType [65536]errorDecoderForPPPType -var PPPTypeMetadata [65536]EnumMetadata - -func initUnknownTypesForPPPType() { - for i := 0; i < 65536; i++ { - errorDecodersForPPPType[i] = errorDecoderForPPPType(i) - PPPTypeMetadata[i] = EnumMetadata{ - DecodeWith: &errorDecodersForPPPType[i], - Name: "UnknownPPPType", - } - } -} - -// Decoder calls IPProtocolMetadata.DecodeWith's decoder. -func (a IPProtocol) Decode(data []byte, p gopacket.PacketBuilder) error { - return IPProtocolMetadata[a].DecodeWith.Decode(data, p) -} - -// String returns IPProtocolMetadata.Name. -func (a IPProtocol) String() string { - return IPProtocolMetadata[a].Name -} - -// LayerType returns IPProtocolMetadata.LayerType. -func (a IPProtocol) LayerType() gopacket.LayerType { - return IPProtocolMetadata[a].LayerType -} - -type errorDecoderForIPProtocol int - -func (a *errorDecoderForIPProtocol) Decode(data []byte, p gopacket.PacketBuilder) error { - return a -} -func (a *errorDecoderForIPProtocol) Error() string { - return fmt.Sprintf("Unable to decode IPProtocol %d", int(*a)) -} - -var errorDecodersForIPProtocol [256]errorDecoderForIPProtocol -var IPProtocolMetadata [256]EnumMetadata - -func initUnknownTypesForIPProtocol() { - for i := 0; i < 256; i++ { - errorDecodersForIPProtocol[i] = errorDecoderForIPProtocol(i) - IPProtocolMetadata[i] = EnumMetadata{ - DecodeWith: &errorDecodersForIPProtocol[i], - Name: "UnknownIPProtocol", - } - } -} - -// Decoder calls SCTPChunkTypeMetadata.DecodeWith's decoder. -func (a SCTPChunkType) Decode(data []byte, p gopacket.PacketBuilder) error { - return SCTPChunkTypeMetadata[a].DecodeWith.Decode(data, p) -} - -// String returns SCTPChunkTypeMetadata.Name. -func (a SCTPChunkType) String() string { - return SCTPChunkTypeMetadata[a].Name -} - -// LayerType returns SCTPChunkTypeMetadata.LayerType. -func (a SCTPChunkType) LayerType() gopacket.LayerType { - return SCTPChunkTypeMetadata[a].LayerType -} - -type errorDecoderForSCTPChunkType int - -func (a *errorDecoderForSCTPChunkType) Decode(data []byte, p gopacket.PacketBuilder) error { - return a -} -func (a *errorDecoderForSCTPChunkType) Error() string { - return fmt.Sprintf("Unable to decode SCTPChunkType %d", int(*a)) -} - -var errorDecodersForSCTPChunkType [256]errorDecoderForSCTPChunkType -var SCTPChunkTypeMetadata [256]EnumMetadata - -func initUnknownTypesForSCTPChunkType() { - for i := 0; i < 256; i++ { - errorDecodersForSCTPChunkType[i] = errorDecoderForSCTPChunkType(i) - SCTPChunkTypeMetadata[i] = EnumMetadata{ - DecodeWith: &errorDecodersForSCTPChunkType[i], - Name: "UnknownSCTPChunkType", - } - } -} - -// Decoder calls PPPoECodeMetadata.DecodeWith's decoder. -func (a PPPoECode) Decode(data []byte, p gopacket.PacketBuilder) error { - return PPPoECodeMetadata[a].DecodeWith.Decode(data, p) -} - -// String returns PPPoECodeMetadata.Name. -func (a PPPoECode) String() string { - return PPPoECodeMetadata[a].Name -} - -// LayerType returns PPPoECodeMetadata.LayerType. -func (a PPPoECode) LayerType() gopacket.LayerType { - return PPPoECodeMetadata[a].LayerType -} - -type errorDecoderForPPPoECode int - -func (a *errorDecoderForPPPoECode) Decode(data []byte, p gopacket.PacketBuilder) error { - return a -} -func (a *errorDecoderForPPPoECode) Error() string { - return fmt.Sprintf("Unable to decode PPPoECode %d", int(*a)) -} - -var errorDecodersForPPPoECode [256]errorDecoderForPPPoECode -var PPPoECodeMetadata [256]EnumMetadata - -func initUnknownTypesForPPPoECode() { - for i := 0; i < 256; i++ { - errorDecodersForPPPoECode[i] = errorDecoderForPPPoECode(i) - PPPoECodeMetadata[i] = EnumMetadata{ - DecodeWith: &errorDecodersForPPPoECode[i], - Name: "UnknownPPPoECode", - } - } -} - -// Decoder calls FDDIFrameControlMetadata.DecodeWith's decoder. -func (a FDDIFrameControl) Decode(data []byte, p gopacket.PacketBuilder) error { - return FDDIFrameControlMetadata[a].DecodeWith.Decode(data, p) -} - -// String returns FDDIFrameControlMetadata.Name. -func (a FDDIFrameControl) String() string { - return FDDIFrameControlMetadata[a].Name -} - -// LayerType returns FDDIFrameControlMetadata.LayerType. -func (a FDDIFrameControl) LayerType() gopacket.LayerType { - return FDDIFrameControlMetadata[a].LayerType -} - -type errorDecoderForFDDIFrameControl int - -func (a *errorDecoderForFDDIFrameControl) Decode(data []byte, p gopacket.PacketBuilder) error { - return a -} -func (a *errorDecoderForFDDIFrameControl) Error() string { - return fmt.Sprintf("Unable to decode FDDIFrameControl %d", int(*a)) -} - -var errorDecodersForFDDIFrameControl [256]errorDecoderForFDDIFrameControl -var FDDIFrameControlMetadata [256]EnumMetadata - -func initUnknownTypesForFDDIFrameControl() { - for i := 0; i < 256; i++ { - errorDecodersForFDDIFrameControl[i] = errorDecoderForFDDIFrameControl(i) - FDDIFrameControlMetadata[i] = EnumMetadata{ - DecodeWith: &errorDecodersForFDDIFrameControl[i], - Name: "UnknownFDDIFrameControl", - } - } -} - -// Decoder calls EAPOLTypeMetadata.DecodeWith's decoder. -func (a EAPOLType) Decode(data []byte, p gopacket.PacketBuilder) error { - return EAPOLTypeMetadata[a].DecodeWith.Decode(data, p) -} - -// String returns EAPOLTypeMetadata.Name. -func (a EAPOLType) String() string { - return EAPOLTypeMetadata[a].Name -} - -// LayerType returns EAPOLTypeMetadata.LayerType. -func (a EAPOLType) LayerType() gopacket.LayerType { - return EAPOLTypeMetadata[a].LayerType -} - -type errorDecoderForEAPOLType int - -func (a *errorDecoderForEAPOLType) Decode(data []byte, p gopacket.PacketBuilder) error { - return a -} -func (a *errorDecoderForEAPOLType) Error() string { - return fmt.Sprintf("Unable to decode EAPOLType %d", int(*a)) -} - -var errorDecodersForEAPOLType [256]errorDecoderForEAPOLType -var EAPOLTypeMetadata [256]EnumMetadata - -func initUnknownTypesForEAPOLType() { - for i := 0; i < 256; i++ { - errorDecodersForEAPOLType[i] = errorDecoderForEAPOLType(i) - EAPOLTypeMetadata[i] = EnumMetadata{ - DecodeWith: &errorDecodersForEAPOLType[i], - Name: "UnknownEAPOLType", - } - } -} - -// Decoder calls ProtocolFamilyMetadata.DecodeWith's decoder. -func (a ProtocolFamily) Decode(data []byte, p gopacket.PacketBuilder) error { - return ProtocolFamilyMetadata[a].DecodeWith.Decode(data, p) -} - -// String returns ProtocolFamilyMetadata.Name. -func (a ProtocolFamily) String() string { - return ProtocolFamilyMetadata[a].Name -} - -// LayerType returns ProtocolFamilyMetadata.LayerType. -func (a ProtocolFamily) LayerType() gopacket.LayerType { - return ProtocolFamilyMetadata[a].LayerType -} - -type errorDecoderForProtocolFamily int - -func (a *errorDecoderForProtocolFamily) Decode(data []byte, p gopacket.PacketBuilder) error { - return a -} -func (a *errorDecoderForProtocolFamily) Error() string { - return fmt.Sprintf("Unable to decode ProtocolFamily %d", int(*a)) -} - -var errorDecodersForProtocolFamily [256]errorDecoderForProtocolFamily -var ProtocolFamilyMetadata [256]EnumMetadata - -func initUnknownTypesForProtocolFamily() { - for i := 0; i < 256; i++ { - errorDecodersForProtocolFamily[i] = errorDecoderForProtocolFamily(i) - ProtocolFamilyMetadata[i] = EnumMetadata{ - DecodeWith: &errorDecodersForProtocolFamily[i], - Name: "UnknownProtocolFamily", - } - } -} - -// Decoder calls Dot11TypeMetadata.DecodeWith's decoder. -func (a Dot11Type) Decode(data []byte, p gopacket.PacketBuilder) error { - return Dot11TypeMetadata[a].DecodeWith.Decode(data, p) -} - -// String returns Dot11TypeMetadata.Name. -func (a Dot11Type) String() string { - return Dot11TypeMetadata[a].Name -} - -// LayerType returns Dot11TypeMetadata.LayerType. -func (a Dot11Type) LayerType() gopacket.LayerType { - return Dot11TypeMetadata[a].LayerType -} - -type errorDecoderForDot11Type int - -func (a *errorDecoderForDot11Type) Decode(data []byte, p gopacket.PacketBuilder) error { - return a -} -func (a *errorDecoderForDot11Type) Error() string { - return fmt.Sprintf("Unable to decode Dot11Type %d", int(*a)) -} - -var errorDecodersForDot11Type [256]errorDecoderForDot11Type -var Dot11TypeMetadata [256]EnumMetadata - -func initUnknownTypesForDot11Type() { - for i := 0; i < 256; i++ { - errorDecodersForDot11Type[i] = errorDecoderForDot11Type(i) - Dot11TypeMetadata[i] = EnumMetadata{ - DecodeWith: &errorDecodersForDot11Type[i], - Name: "UnknownDot11Type", - } - } -} - -// Decoder calls USBTransportTypeMetadata.DecodeWith's decoder. -func (a USBTransportType) Decode(data []byte, p gopacket.PacketBuilder) error { - return USBTransportTypeMetadata[a].DecodeWith.Decode(data, p) -} - -// String returns USBTransportTypeMetadata.Name. -func (a USBTransportType) String() string { - return USBTransportTypeMetadata[a].Name -} - -// LayerType returns USBTransportTypeMetadata.LayerType. -func (a USBTransportType) LayerType() gopacket.LayerType { - return USBTransportTypeMetadata[a].LayerType -} - -type errorDecoderForUSBTransportType int - -func (a *errorDecoderForUSBTransportType) Decode(data []byte, p gopacket.PacketBuilder) error { - return a -} -func (a *errorDecoderForUSBTransportType) Error() string { - return fmt.Sprintf("Unable to decode USBTransportType %d", int(*a)) -} - -var errorDecodersForUSBTransportType [256]errorDecoderForUSBTransportType -var USBTransportTypeMetadata [256]EnumMetadata - -func initUnknownTypesForUSBTransportType() { - for i := 0; i < 256; i++ { - errorDecodersForUSBTransportType[i] = errorDecoderForUSBTransportType(i) - USBTransportTypeMetadata[i] = EnumMetadata{ - DecodeWith: &errorDecodersForUSBTransportType[i], - Name: "UnknownUSBTransportType", - } - } -} diff --git a/vendor/github.com/google/gopacket/layers/erspan2.go b/vendor/github.com/google/gopacket/layers/erspan2.go deleted file mode 100644 index 154436205ef..00000000000 --- a/vendor/github.com/google/gopacket/layers/erspan2.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2018 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - - "github.com/google/gopacket" -) - -const ( - //ERSPANIIVersionObsolete - The obsolete value for the version field - ERSPANIIVersionObsolete = 0x0 - // ERSPANIIVersion - The current value for the version field - ERSPANIIVersion = 0x1 -) - -// ERSPANII contains all of the fields found in an ERSPAN Type II header -// https://tools.ietf.org/html/draft-foschiano-erspan-03 -type ERSPANII struct { - BaseLayer - IsTruncated bool - Version, CoS, TrunkEncap uint8 - VLANIdentifier, SessionID, Reserved uint16 - Index uint32 -} - -func (erspan2 *ERSPANII) LayerType() gopacket.LayerType { return LayerTypeERSPANII } - -// DecodeFromBytes decodes the given bytes into this layer. -func (erspan2 *ERSPANII) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - erspan2Length := 8 - erspan2.Version = data[0] & 0xF0 >> 4 - erspan2.VLANIdentifier = binary.BigEndian.Uint16(data[:2]) & 0x0FFF - erspan2.CoS = data[2] & 0xE0 >> 5 - erspan2.TrunkEncap = data[2] & 0x18 >> 3 - erspan2.IsTruncated = data[2]&0x4>>2 != 0 - erspan2.SessionID = binary.BigEndian.Uint16(data[2:4]) & 0x03FF - erspan2.Reserved = binary.BigEndian.Uint16(data[4:6]) & 0xFFF0 >> 4 - erspan2.Index = binary.BigEndian.Uint32(data[4:8]) & 0x000FFFFF - erspan2.Contents = data[:erspan2Length] - erspan2.Payload = data[erspan2Length:] - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (erspan2 *ERSPANII) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(8) - if err != nil { - return err - } - - twoByteInt := uint16(erspan2.Version&0xF)<<12 | erspan2.VLANIdentifier&0x0FFF - binary.BigEndian.PutUint16(bytes, twoByteInt) - - twoByteInt = uint16(erspan2.CoS&0x7)<<13 | uint16(erspan2.TrunkEncap&0x3)<<11 | erspan2.SessionID&0x03FF - if erspan2.IsTruncated { - twoByteInt |= 0x400 - } - binary.BigEndian.PutUint16(bytes[2:], twoByteInt) - - fourByteInt := uint32(erspan2.Reserved&0x0FFF)<<20 | erspan2.Index&0x000FFFFF - binary.BigEndian.PutUint32(bytes[4:], fourByteInt) - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (erspan2 *ERSPANII) CanDecode() gopacket.LayerClass { - return LayerTypeERSPANII -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (erspan2 *ERSPANII) NextLayerType() gopacket.LayerType { - return LayerTypeEthernet -} - -func decodeERSPANII(data []byte, p gopacket.PacketBuilder) error { - erspan2 := &ERSPANII{} - return decodingLayerDecoder(erspan2, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/etherip.go b/vendor/github.com/google/gopacket/layers/etherip.go deleted file mode 100644 index 5b7b7229eca..00000000000 --- a/vendor/github.com/google/gopacket/layers/etherip.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "github.com/google/gopacket" -) - -// EtherIP is the struct for storing RFC 3378 EtherIP packet headers. -type EtherIP struct { - BaseLayer - Version uint8 - Reserved uint16 -} - -// LayerType returns gopacket.LayerTypeEtherIP. -func (e *EtherIP) LayerType() gopacket.LayerType { return LayerTypeEtherIP } - -// DecodeFromBytes decodes the given bytes into this layer. -func (e *EtherIP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - e.Version = data[0] >> 4 - e.Reserved = binary.BigEndian.Uint16(data[:2]) & 0x0fff - e.BaseLayer = BaseLayer{data[:2], data[2:]} - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (e *EtherIP) CanDecode() gopacket.LayerClass { - return LayerTypeEtherIP -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (e *EtherIP) NextLayerType() gopacket.LayerType { - return LayerTypeEthernet -} - -func decodeEtherIP(data []byte, p gopacket.PacketBuilder) error { - e := &EtherIP{} - return decodingLayerDecoder(e, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/ethernet.go b/vendor/github.com/google/gopacket/layers/ethernet.go deleted file mode 100644 index b73748f2f7d..00000000000 --- a/vendor/github.com/google/gopacket/layers/ethernet.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "github.com/google/gopacket" - "net" -) - -// EthernetBroadcast is the broadcast MAC address used by Ethernet. -var EthernetBroadcast = net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff} - -// Ethernet is the layer for Ethernet frame headers. -type Ethernet struct { - BaseLayer - SrcMAC, DstMAC net.HardwareAddr - EthernetType EthernetType - // Length is only set if a length field exists within this header. Ethernet - // headers follow two different standards, one that uses an EthernetType, the - // other which defines a length the follows with a LLC header (802.3). If the - // former is the case, we set EthernetType and Length stays 0. In the latter - // case, we set Length and EthernetType = EthernetTypeLLC. - Length uint16 -} - -// LayerType returns LayerTypeEthernet -func (e *Ethernet) LayerType() gopacket.LayerType { return LayerTypeEthernet } - -func (e *Ethernet) LinkFlow() gopacket.Flow { - return gopacket.NewFlow(EndpointMAC, e.SrcMAC, e.DstMAC) -} - -func (eth *Ethernet) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 14 { - return errors.New("Ethernet packet too small") - } - eth.DstMAC = net.HardwareAddr(data[0:6]) - eth.SrcMAC = net.HardwareAddr(data[6:12]) - eth.EthernetType = EthernetType(binary.BigEndian.Uint16(data[12:14])) - eth.BaseLayer = BaseLayer{data[:14], data[14:]} - eth.Length = 0 - if eth.EthernetType < 0x0600 { - eth.Length = uint16(eth.EthernetType) - eth.EthernetType = EthernetTypeLLC - if cmp := len(eth.Payload) - int(eth.Length); cmp < 0 { - df.SetTruncated() - } else if cmp > 0 { - // Strip off bytes at the end, since we have too many bytes - eth.Payload = eth.Payload[:len(eth.Payload)-cmp] - } - // fmt.Println(eth) - } - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (eth *Ethernet) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if len(eth.DstMAC) != 6 { - return fmt.Errorf("invalid dst MAC: %v", eth.DstMAC) - } - if len(eth.SrcMAC) != 6 { - return fmt.Errorf("invalid src MAC: %v", eth.SrcMAC) - } - payload := b.Bytes() - bytes, err := b.PrependBytes(14) - if err != nil { - return err - } - copy(bytes, eth.DstMAC) - copy(bytes[6:], eth.SrcMAC) - if eth.Length != 0 || eth.EthernetType == EthernetTypeLLC { - if opts.FixLengths { - eth.Length = uint16(len(payload)) - } - if eth.EthernetType != EthernetTypeLLC { - return fmt.Errorf("ethernet type %v not compatible with length value %v", eth.EthernetType, eth.Length) - } else if eth.Length > 0x0600 { - return fmt.Errorf("invalid ethernet length %v", eth.Length) - } - binary.BigEndian.PutUint16(bytes[12:], eth.Length) - } else { - binary.BigEndian.PutUint16(bytes[12:], uint16(eth.EthernetType)) - } - length := len(b.Bytes()) - if length < 60 { - // Pad out to 60 bytes. - padding, err := b.AppendBytes(60 - length) - if err != nil { - return err - } - copy(padding, lotsOfZeros[:]) - } - return nil -} - -func (eth *Ethernet) CanDecode() gopacket.LayerClass { - return LayerTypeEthernet -} - -func (eth *Ethernet) NextLayerType() gopacket.LayerType { - return eth.EthernetType.LayerType() -} - -func decodeEthernet(data []byte, p gopacket.PacketBuilder) error { - eth := &Ethernet{} - err := eth.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(eth) - p.SetLinkLayer(eth) - return p.NextDecoder(eth.EthernetType) -} diff --git a/vendor/github.com/google/gopacket/layers/fddi.go b/vendor/github.com/google/gopacket/layers/fddi.go deleted file mode 100644 index ed9e1957b92..00000000000 --- a/vendor/github.com/google/gopacket/layers/fddi.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "github.com/google/gopacket" - "net" -) - -// FDDI contains the header for FDDI frames. -type FDDI struct { - BaseLayer - FrameControl FDDIFrameControl - Priority uint8 - SrcMAC, DstMAC net.HardwareAddr -} - -// LayerType returns LayerTypeFDDI. -func (f *FDDI) LayerType() gopacket.LayerType { return LayerTypeFDDI } - -// LinkFlow returns a new flow of type EndpointMAC. -func (f *FDDI) LinkFlow() gopacket.Flow { - return gopacket.NewFlow(EndpointMAC, f.SrcMAC, f.DstMAC) -} - -func decodeFDDI(data []byte, p gopacket.PacketBuilder) error { - f := &FDDI{ - FrameControl: FDDIFrameControl(data[0] & 0xF8), - Priority: data[0] & 0x07, - SrcMAC: net.HardwareAddr(data[1:7]), - DstMAC: net.HardwareAddr(data[7:13]), - BaseLayer: BaseLayer{data[:13], data[13:]}, - } - p.SetLinkLayer(f) - p.AddLayer(f) - return p.NextDecoder(f.FrameControl) -} diff --git a/vendor/github.com/google/gopacket/layers/fuzz_layer.go b/vendor/github.com/google/gopacket/layers/fuzz_layer.go deleted file mode 100644 index 606e45d24cf..00000000000 --- a/vendor/github.com/google/gopacket/layers/fuzz_layer.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2019 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be found -// in the LICENSE file in the root of the source tree. - -package layers - -import ( - "encoding/binary" - - "github.com/google/gopacket" -) - -// FuzzLayer is a fuzz target for the layers package of gopacket -// A fuzz target is a function processing a binary blob (byte slice) -// The process here is to interpret this data as a packet, and print the layers contents. -// The decoding options and the starting layer are encoded in the first bytes. -// The function returns 1 if this is a valid packet (no error layer) -func FuzzLayer(data []byte) int { - if len(data) < 3 { - return 0 - } - // use the first two bytes to choose the top level layer - startLayer := binary.BigEndian.Uint16(data[:2]) - var fuzzOpts = gopacket.DecodeOptions{ - Lazy: data[2]&0x1 != 0, - NoCopy: data[2]&0x2 != 0, - SkipDecodeRecovery: data[2]&0x4 != 0, - DecodeStreamsAsDatagrams: data[2]&0x8 != 0, - } - p := gopacket.NewPacket(data[3:], gopacket.LayerType(startLayer), fuzzOpts) - for _, l := range p.Layers() { - gopacket.LayerString(l) - } - if p.ErrorLayer() != nil { - return 0 - } - return 1 -} diff --git a/vendor/github.com/google/gopacket/layers/gen_linted.sh b/vendor/github.com/google/gopacket/layers/gen_linted.sh deleted file mode 100644 index 75c701f4d5e..00000000000 --- a/vendor/github.com/google/gopacket/layers/gen_linted.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -for i in *.go; do golint $i | grep -q . || echo $i; done > .linted diff --git a/vendor/github.com/google/gopacket/layers/geneve.go b/vendor/github.com/google/gopacket/layers/geneve.go deleted file mode 100644 index e9a1428809a..00000000000 --- a/vendor/github.com/google/gopacket/layers/geneve.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2016 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - - "github.com/google/gopacket" -) - -// Geneve is specifed here https://tools.ietf.org/html/draft-ietf-nvo3-geneve-03 -// Geneve Header: -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// |Ver| Opt Len |O|C| Rsvd. | Protocol Type | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Virtual Network Identifier (VNI) | Reserved | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Variable Length Options | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -type Geneve struct { - BaseLayer - Version uint8 // 2 bits - OptionsLength uint8 // 6 bits - OAMPacket bool // 1 bits - CriticalOption bool // 1 bits - Protocol EthernetType // 16 bits - VNI uint32 // 24bits - Options []*GeneveOption -} - -// Geneve Tunnel Options -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Option Class | Type |R|R|R| Length | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Variable Option Data | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -type GeneveOption struct { - Class uint16 // 16 bits - Type uint8 // 8 bits - Flags uint8 // 3 bits - Length uint8 // 5 bits - Data []byte -} - -// LayerType returns LayerTypeGeneve -func (gn *Geneve) LayerType() gopacket.LayerType { return LayerTypeGeneve } - -func decodeGeneveOption(data []byte, gn *Geneve, df gopacket.DecodeFeedback) (*GeneveOption, uint8, error) { - if len(data) < 3 { - df.SetTruncated() - return nil, 0, errors.New("geneve option too small") - } - opt := &GeneveOption{} - - opt.Class = binary.BigEndian.Uint16(data[0:2]) - opt.Type = data[2] - opt.Flags = data[3] >> 4 - opt.Length = (data[3]&0xf)*4 + 4 - - if len(data) < int(opt.Length) { - df.SetTruncated() - return nil, 0, errors.New("geneve option too small") - } - opt.Data = make([]byte, opt.Length-4) - copy(opt.Data, data[4:opt.Length]) - - return opt, opt.Length, nil -} - -func (gn *Geneve) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 7 { - df.SetTruncated() - return errors.New("geneve packet too short") - } - - gn.Version = data[0] >> 7 - gn.OptionsLength = (data[0] & 0x3f) * 4 - - gn.OAMPacket = data[1]&0x80 > 0 - gn.CriticalOption = data[1]&0x40 > 0 - gn.Protocol = EthernetType(binary.BigEndian.Uint16(data[2:4])) - - var buf [4]byte - copy(buf[1:], data[4:7]) - gn.VNI = binary.BigEndian.Uint32(buf[:]) - - offset, length := uint8(8), int32(gn.OptionsLength) - if len(data) < int(length+7) { - df.SetTruncated() - return errors.New("geneve packet too short") - } - - for length > 0 { - opt, len, err := decodeGeneveOption(data[offset:], gn, df) - if err != nil { - return err - } - gn.Options = append(gn.Options, opt) - - length -= int32(len) - offset += len - } - - gn.BaseLayer = BaseLayer{data[:offset], data[offset:]} - - return nil -} - -func (gn *Geneve) NextLayerType() gopacket.LayerType { - return gn.Protocol.LayerType() -} - -func decodeGeneve(data []byte, p gopacket.PacketBuilder) error { - gn := &Geneve{} - return decodingLayerDecoder(gn, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/gre.go b/vendor/github.com/google/gopacket/layers/gre.go deleted file mode 100644 index 9c5e7d246fa..00000000000 --- a/vendor/github.com/google/gopacket/layers/gre.go +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - - "github.com/google/gopacket" -) - -// GRE is a Generic Routing Encapsulation header. -type GRE struct { - BaseLayer - ChecksumPresent, RoutingPresent, KeyPresent, SeqPresent, StrictSourceRoute, AckPresent bool - RecursionControl, Flags, Version uint8 - Protocol EthernetType - Checksum, Offset uint16 - Key, Seq, Ack uint32 - *GRERouting -} - -// GRERouting is GRE routing information, present if the RoutingPresent flag is -// set. -type GRERouting struct { - AddressFamily uint16 - SREOffset, SRELength uint8 - RoutingInformation []byte - Next *GRERouting -} - -// LayerType returns gopacket.LayerTypeGRE. -func (g *GRE) LayerType() gopacket.LayerType { return LayerTypeGRE } - -// DecodeFromBytes decodes the given bytes into this layer. -func (g *GRE) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - g.ChecksumPresent = data[0]&0x80 != 0 - g.RoutingPresent = data[0]&0x40 != 0 - g.KeyPresent = data[0]&0x20 != 0 - g.SeqPresent = data[0]&0x10 != 0 - g.StrictSourceRoute = data[0]&0x08 != 0 - g.AckPresent = data[1]&0x80 != 0 - g.RecursionControl = data[0] & 0x7 - g.Flags = data[1] >> 3 - g.Version = data[1] & 0x7 - g.Protocol = EthernetType(binary.BigEndian.Uint16(data[2:4])) - offset := 4 - if g.ChecksumPresent || g.RoutingPresent { - g.Checksum = binary.BigEndian.Uint16(data[offset : offset+2]) - g.Offset = binary.BigEndian.Uint16(data[offset+2 : offset+4]) - offset += 4 - } - if g.KeyPresent { - g.Key = binary.BigEndian.Uint32(data[offset : offset+4]) - offset += 4 - } - if g.SeqPresent { - g.Seq = binary.BigEndian.Uint32(data[offset : offset+4]) - offset += 4 - } - if g.RoutingPresent { - tail := &g.GRERouting - for { - sre := &GRERouting{ - AddressFamily: binary.BigEndian.Uint16(data[offset : offset+2]), - SREOffset: data[offset+2], - SRELength: data[offset+3], - } - sre.RoutingInformation = data[offset+4 : offset+4+int(sre.SRELength)] - offset += 4 + int(sre.SRELength) - if sre.AddressFamily == 0 && sre.SRELength == 0 { - break - } - (*tail) = sre - tail = &sre.Next - } - } - if g.AckPresent { - g.Ack = binary.BigEndian.Uint32(data[offset : offset+4]) - offset += 4 - } - g.BaseLayer = BaseLayer{data[:offset], data[offset:]} - return nil -} - -// SerializeTo writes the serialized form of this layer into the SerializationBuffer, -// implementing gopacket.SerializableLayer. See the docs for gopacket.SerializableLayer for more info. -func (g *GRE) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - size := 4 - if g.ChecksumPresent || g.RoutingPresent { - size += 4 - } - if g.KeyPresent { - size += 4 - } - if g.SeqPresent { - size += 4 - } - if g.RoutingPresent { - r := g.GRERouting - for r != nil { - size += 4 + int(r.SRELength) - r = r.Next - } - size += 4 - } - if g.AckPresent { - size += 4 - } - buf, err := b.PrependBytes(size) - if err != nil { - return err - } - // Reset any potentially dirty memory in the first 2 bytes, as these use OR to set flags. - buf[0] = 0 - buf[1] = 0 - if g.ChecksumPresent { - buf[0] |= 0x80 - } - if g.RoutingPresent { - buf[0] |= 0x40 - } - if g.KeyPresent { - buf[0] |= 0x20 - } - if g.SeqPresent { - buf[0] |= 0x10 - } - if g.StrictSourceRoute { - buf[0] |= 0x08 - } - if g.AckPresent { - buf[1] |= 0x80 - } - buf[0] |= g.RecursionControl - buf[1] |= g.Flags << 3 - buf[1] |= g.Version - binary.BigEndian.PutUint16(buf[2:4], uint16(g.Protocol)) - offset := 4 - if g.ChecksumPresent || g.RoutingPresent { - // Don't write the checksum value yet, as we may need to compute it, - // which requires the entire header be complete. - // Instead we zeroize the memory in case it is dirty. - buf[offset] = 0 - buf[offset+1] = 0 - binary.BigEndian.PutUint16(buf[offset+2:offset+4], g.Offset) - offset += 4 - } - if g.KeyPresent { - binary.BigEndian.PutUint32(buf[offset:offset+4], g.Key) - offset += 4 - } - if g.SeqPresent { - binary.BigEndian.PutUint32(buf[offset:offset+4], g.Seq) - offset += 4 - } - if g.RoutingPresent { - sre := g.GRERouting - for sre != nil { - binary.BigEndian.PutUint16(buf[offset:offset+2], sre.AddressFamily) - buf[offset+2] = sre.SREOffset - buf[offset+3] = sre.SRELength - copy(buf[offset+4:offset+4+int(sre.SRELength)], sre.RoutingInformation) - offset += 4 + int(sre.SRELength) - sre = sre.Next - } - // Terminate routing field with a "NULL" SRE. - binary.BigEndian.PutUint32(buf[offset:offset+4], 0) - } - if g.AckPresent { - binary.BigEndian.PutUint32(buf[offset:offset+4], g.Ack) - offset += 4 - } - if g.ChecksumPresent { - if opts.ComputeChecksums { - g.Checksum = tcpipChecksum(b.Bytes(), 0) - } - - binary.BigEndian.PutUint16(buf[4:6], g.Checksum) - } - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (g *GRE) CanDecode() gopacket.LayerClass { - return LayerTypeGRE -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (g *GRE) NextLayerType() gopacket.LayerType { - return g.Protocol.LayerType() -} - -func decodeGRE(data []byte, p gopacket.PacketBuilder) error { - g := &GRE{} - return decodingLayerDecoder(g, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/gtp.go b/vendor/github.com/google/gopacket/layers/gtp.go deleted file mode 100644 index fe3054a6d03..00000000000 --- a/vendor/github.com/google/gopacket/layers/gtp.go +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2017 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. -// - -package layers - -import ( - "encoding/binary" - "fmt" - "github.com/google/gopacket" -) - -const gtpMinimumSizeInBytes int = 8 - -// GTPExtensionHeader is used to carry extra data and enable future extensions of the GTP without the need to use another version number. -type GTPExtensionHeader struct { - Type uint8 - Content []byte -} - -// GTPv1U protocol is used to exchange user data over GTP tunnels across the Sx interfaces. -// Defined in https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1595 -type GTPv1U struct { - BaseLayer - Version uint8 - ProtocolType uint8 - Reserved uint8 - ExtensionHeaderFlag bool - SequenceNumberFlag bool - NPDUFlag bool - MessageType uint8 - MessageLength uint16 - TEID uint32 - SequenceNumber uint16 - NPDU uint8 - GTPExtensionHeaders []GTPExtensionHeader -} - -// LayerType returns LayerTypeGTPV1U -func (g *GTPv1U) LayerType() gopacket.LayerType { return LayerTypeGTPv1U } - -// DecodeFromBytes analyses a byte slice and attempts to decode it as a GTPv1U packet -func (g *GTPv1U) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - hLen := gtpMinimumSizeInBytes - dLen := len(data) - if dLen < hLen { - return fmt.Errorf("GTP packet too small: %d bytes", dLen) - } - g.Version = (data[0] >> 5) & 0x07 - g.ProtocolType = (data[0] >> 4) & 0x01 - g.Reserved = (data[0] >> 3) & 0x01 - g.SequenceNumberFlag = ((data[0] >> 1) & 0x01) == 1 - g.NPDUFlag = (data[0] & 0x01) == 1 - g.ExtensionHeaderFlag = ((data[0] >> 2) & 0x01) == 1 - g.MessageType = data[1] - g.MessageLength = binary.BigEndian.Uint16(data[2:4]) - pLen := 8 + g.MessageLength - if uint16(dLen) < pLen { - return fmt.Errorf("GTP packet too small: %d bytes", dLen) - } - // Field used to multiplex different connections in the same GTP tunnel. - g.TEID = binary.BigEndian.Uint32(data[4:8]) - cIndex := uint16(hLen) - if g.SequenceNumberFlag || g.NPDUFlag || g.ExtensionHeaderFlag { - hLen += 4 - cIndex += 4 - if dLen < hLen { - return fmt.Errorf("GTP packet too small: %d bytes", dLen) - } - if g.SequenceNumberFlag { - g.SequenceNumber = binary.BigEndian.Uint16(data[8:10]) - } - if g.NPDUFlag { - g.NPDU = data[10] - } - if g.ExtensionHeaderFlag { - extensionFlag := true - for extensionFlag { - extensionType := uint8(data[cIndex-1]) - extensionLength := uint(data[cIndex]) - if extensionLength == 0 { - return fmt.Errorf("GTP packet with invalid extension header") - } - // extensionLength is in 4-octet units - lIndex := cIndex + (uint16(extensionLength) * 4) - if uint16(dLen) < lIndex { - fmt.Println(dLen, lIndex) - return fmt.Errorf("GTP packet with small extension header: %d bytes", dLen) - } - content := data[cIndex+1 : lIndex-1] - eh := GTPExtensionHeader{Type: extensionType, Content: content} - g.GTPExtensionHeaders = append(g.GTPExtensionHeaders, eh) - cIndex = lIndex - // Check if coming bytes are from an extension header - extensionFlag = data[cIndex-1] != 0 - - } - } - } - g.BaseLayer = BaseLayer{Contents: data[:cIndex], Payload: data[cIndex:]} - return nil - -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (g *GTPv1U) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - data, err := b.PrependBytes(gtpMinimumSizeInBytes) - if err != nil { - return err - } - data[0] |= (g.Version << 5) - data[0] |= (1 << 4) - if len(g.GTPExtensionHeaders) > 0 { - data[0] |= 0x04 - g.ExtensionHeaderFlag = true - } - if g.SequenceNumberFlag { - data[0] |= 0x02 - } - if g.NPDUFlag { - data[0] |= 0x01 - } - data[1] = g.MessageType - binary.BigEndian.PutUint16(data[2:4], g.MessageLength) - binary.BigEndian.PutUint32(data[4:8], g.TEID) - if g.ExtensionHeaderFlag || g.SequenceNumberFlag || g.NPDUFlag { - data, err := b.AppendBytes(4) - if err != nil { - return err - } - binary.BigEndian.PutUint16(data[:2], g.SequenceNumber) - data[2] = g.NPDU - for _, eh := range g.GTPExtensionHeaders { - data[len(data)-1] = eh.Type - lContent := len(eh.Content) - // extensionLength is in 4-octet units - extensionLength := (lContent + 2) / 4 - // Get two extra byte for the next extension header type and length - data, err = b.AppendBytes(lContent + 2) - if err != nil { - return err - } - data[0] = byte(extensionLength) - copy(data[1:lContent+1], eh.Content) - } - } - return nil - -} - -// CanDecode returns a set of layers that GTP objects can decode. -func (g *GTPv1U) CanDecode() gopacket.LayerClass { - return LayerTypeGTPv1U -} - -// NextLayerType specifies the next layer that GoPacket should attempt to -func (g *GTPv1U) NextLayerType() gopacket.LayerType { - if len(g.LayerPayload()) == 0 { - return gopacket.LayerTypeZero - } - version := uint8(g.LayerPayload()[0]) >> 4 - if version == 4 { - return LayerTypeIPv4 - } else if version == 6 { - return LayerTypeIPv6 - } else { - return LayerTypePPP - } -} - -func decodeGTPv1u(data []byte, p gopacket.PacketBuilder) error { - gtp := >Pv1U{} - err := gtp.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(gtp) - return p.NextDecoder(gtp.NextLayerType()) -} diff --git a/vendor/github.com/google/gopacket/layers/iana_ports.go b/vendor/github.com/google/gopacket/layers/iana_ports.go deleted file mode 100644 index ddcf3ecdb7d..00000000000 --- a/vendor/github.com/google/gopacket/layers/iana_ports.go +++ /dev/null @@ -1,11351 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. - -package layers - -// Created by gen.go, don't edit manually -// Generated at 2017-10-23 09:57:28.214859163 -0600 MDT m=+1.011679290 -// Fetched from "http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml" - -// TCPPortNames contains the port names for all TCP ports. -var TCPPortNames = tcpPortNames - -// UDPPortNames contains the port names for all UDP ports. -var UDPPortNames = udpPortNames - -// SCTPPortNames contains the port names for all SCTP ports. -var SCTPPortNames = sctpPortNames - -var tcpPortNames = map[TCPPort]string{ - 1: "tcpmux", - 2: "compressnet", - 3: "compressnet", - 5: "rje", - 7: "echo", - 9: "discard", - 11: "systat", - 13: "daytime", - 17: "qotd", - 18: "msp", - 19: "chargen", - 20: "ftp-data", - 21: "ftp", - 22: "ssh", - 23: "telnet", - 25: "smtp", - 27: "nsw-fe", - 29: "msg-icp", - 31: "msg-auth", - 33: "dsp", - 37: "time", - 38: "rap", - 39: "rlp", - 41: "graphics", - 42: "name", - 43: "nicname", - 44: "mpm-flags", - 45: "mpm", - 46: "mpm-snd", - 48: "auditd", - 49: "tacacs", - 50: "re-mail-ck", - 52: "xns-time", - 53: "domain", - 54: "xns-ch", - 55: "isi-gl", - 56: "xns-auth", - 58: "xns-mail", - 62: "acas", - 63: "whoispp", - 64: "covia", - 65: "tacacs-ds", - 66: "sql-net", - 67: "bootps", - 68: "bootpc", - 69: "tftp", - 70: "gopher", - 71: "netrjs-1", - 72: "netrjs-2", - 73: "netrjs-3", - 74: "netrjs-4", - 76: "deos", - 78: "vettcp", - 79: "finger", - 80: "http", - 82: "xfer", - 83: "mit-ml-dev", - 84: "ctf", - 85: "mit-ml-dev", - 86: "mfcobol", - 88: "kerberos", - 89: "su-mit-tg", - 90: "dnsix", - 91: "mit-dov", - 92: "npp", - 93: "dcp", - 94: "objcall", - 95: "supdup", - 96: "dixie", - 97: "swift-rvf", - 98: "tacnews", - 99: "metagram", - 101: "hostname", - 102: "iso-tsap", - 103: "gppitnp", - 104: "acr-nema", - 105: "cso", - 106: "3com-tsmux", - 107: "rtelnet", - 108: "snagas", - 109: "pop2", - 110: "pop3", - 111: "sunrpc", - 112: "mcidas", - 113: "ident", - 115: "sftp", - 116: "ansanotify", - 117: "uucp-path", - 118: "sqlserv", - 119: "nntp", - 120: "cfdptkt", - 121: "erpc", - 122: "smakynet", - 123: "ntp", - 124: "ansatrader", - 125: "locus-map", - 126: "nxedit", - 127: "locus-con", - 128: "gss-xlicen", - 129: "pwdgen", - 130: "cisco-fna", - 131: "cisco-tna", - 132: "cisco-sys", - 133: "statsrv", - 134: "ingres-net", - 135: "epmap", - 136: "profile", - 137: "netbios-ns", - 138: "netbios-dgm", - 139: "netbios-ssn", - 140: "emfis-data", - 141: "emfis-cntl", - 142: "bl-idm", - 143: "imap", - 144: "uma", - 145: "uaac", - 146: "iso-tp0", - 147: "iso-ip", - 148: "jargon", - 149: "aed-512", - 150: "sql-net", - 151: "hems", - 152: "bftp", - 153: "sgmp", - 154: "netsc-prod", - 155: "netsc-dev", - 156: "sqlsrv", - 157: "knet-cmp", - 158: "pcmail-srv", - 159: "nss-routing", - 160: "sgmp-traps", - 161: "snmp", - 162: "snmptrap", - 163: "cmip-man", - 164: "cmip-agent", - 165: "xns-courier", - 166: "s-net", - 167: "namp", - 168: "rsvd", - 169: "send", - 170: "print-srv", - 171: "multiplex", - 172: "cl-1", - 173: "xyplex-mux", - 174: "mailq", - 175: "vmnet", - 176: "genrad-mux", - 177: "xdmcp", - 178: "nextstep", - 179: "bgp", - 180: "ris", - 181: "unify", - 182: "audit", - 183: "ocbinder", - 184: "ocserver", - 185: "remote-kis", - 186: "kis", - 187: "aci", - 188: "mumps", - 189: "qft", - 190: "gacp", - 191: "prospero", - 192: "osu-nms", - 193: "srmp", - 194: "irc", - 195: "dn6-nlm-aud", - 196: "dn6-smm-red", - 197: "dls", - 198: "dls-mon", - 199: "smux", - 200: "src", - 201: "at-rtmp", - 202: "at-nbp", - 203: "at-3", - 204: "at-echo", - 205: "at-5", - 206: "at-zis", - 207: "at-7", - 208: "at-8", - 209: "qmtp", - 210: "z39-50", - 211: "914c-g", - 212: "anet", - 213: "ipx", - 214: "vmpwscs", - 215: "softpc", - 216: "CAIlic", - 217: "dbase", - 218: "mpp", - 219: "uarps", - 220: "imap3", - 221: "fln-spx", - 222: "rsh-spx", - 223: "cdc", - 224: "masqdialer", - 242: "direct", - 243: "sur-meas", - 244: "inbusiness", - 245: "link", - 246: "dsp3270", - 247: "subntbcst-tftp", - 248: "bhfhs", - 256: "rap", - 257: "set", - 259: "esro-gen", - 260: "openport", - 261: "nsiiops", - 262: "arcisdms", - 263: "hdap", - 264: "bgmp", - 265: "x-bone-ctl", - 266: "sst", - 267: "td-service", - 268: "td-replica", - 269: "manet", - 271: "pt-tls", - 280: "http-mgmt", - 281: "personal-link", - 282: "cableport-ax", - 283: "rescap", - 284: "corerjd", - 286: "fxp", - 287: "k-block", - 308: "novastorbakcup", - 309: "entrusttime", - 310: "bhmds", - 311: "asip-webadmin", - 312: "vslmp", - 313: "magenta-logic", - 314: "opalis-robot", - 315: "dpsi", - 316: "decauth", - 317: "zannet", - 318: "pkix-timestamp", - 319: "ptp-event", - 320: "ptp-general", - 321: "pip", - 322: "rtsps", - 323: "rpki-rtr", - 324: "rpki-rtr-tls", - 333: "texar", - 344: "pdap", - 345: "pawserv", - 346: "zserv", - 347: "fatserv", - 348: "csi-sgwp", - 349: "mftp", - 350: "matip-type-a", - 351: "matip-type-b", - 352: "dtag-ste-sb", - 353: "ndsauth", - 354: "bh611", - 355: "datex-asn", - 356: "cloanto-net-1", - 357: "bhevent", - 358: "shrinkwrap", - 359: "nsrmp", - 360: "scoi2odialog", - 361: "semantix", - 362: "srssend", - 363: "rsvp-tunnel", - 364: "aurora-cmgr", - 365: "dtk", - 366: "odmr", - 367: "mortgageware", - 368: "qbikgdp", - 369: "rpc2portmap", - 370: "codaauth2", - 371: "clearcase", - 372: "ulistproc", - 373: "legent-1", - 374: "legent-2", - 375: "hassle", - 376: "nip", - 377: "tnETOS", - 378: "dsETOS", - 379: "is99c", - 380: "is99s", - 381: "hp-collector", - 382: "hp-managed-node", - 383: "hp-alarm-mgr", - 384: "arns", - 385: "ibm-app", - 386: "asa", - 387: "aurp", - 388: "unidata-ldm", - 389: "ldap", - 390: "uis", - 391: "synotics-relay", - 392: "synotics-broker", - 393: "meta5", - 394: "embl-ndt", - 395: "netcp", - 396: "netware-ip", - 397: "mptn", - 398: "kryptolan", - 399: "iso-tsap-c2", - 400: "osb-sd", - 401: "ups", - 402: "genie", - 403: "decap", - 404: "nced", - 405: "ncld", - 406: "imsp", - 407: "timbuktu", - 408: "prm-sm", - 409: "prm-nm", - 410: "decladebug", - 411: "rmt", - 412: "synoptics-trap", - 413: "smsp", - 414: "infoseek", - 415: "bnet", - 416: "silverplatter", - 417: "onmux", - 418: "hyper-g", - 419: "ariel1", - 420: "smpte", - 421: "ariel2", - 422: "ariel3", - 423: "opc-job-start", - 424: "opc-job-track", - 425: "icad-el", - 426: "smartsdp", - 427: "svrloc", - 428: "ocs-cmu", - 429: "ocs-amu", - 430: "utmpsd", - 431: "utmpcd", - 432: "iasd", - 433: "nnsp", - 434: "mobileip-agent", - 435: "mobilip-mn", - 436: "dna-cml", - 437: "comscm", - 438: "dsfgw", - 439: "dasp", - 440: "sgcp", - 441: "decvms-sysmgt", - 442: "cvc-hostd", - 443: "https", - 444: "snpp", - 445: "microsoft-ds", - 446: "ddm-rdb", - 447: "ddm-dfm", - 448: "ddm-ssl", - 449: "as-servermap", - 450: "tserver", - 451: "sfs-smp-net", - 452: "sfs-config", - 453: "creativeserver", - 454: "contentserver", - 455: "creativepartnr", - 456: "macon-tcp", - 457: "scohelp", - 458: "appleqtc", - 459: "ampr-rcmd", - 460: "skronk", - 461: "datasurfsrv", - 462: "datasurfsrvsec", - 463: "alpes", - 464: "kpasswd", - 465: "urd", - 466: "digital-vrc", - 467: "mylex-mapd", - 468: "photuris", - 469: "rcp", - 470: "scx-proxy", - 471: "mondex", - 472: "ljk-login", - 473: "hybrid-pop", - 474: "tn-tl-w1", - 475: "tcpnethaspsrv", - 476: "tn-tl-fd1", - 477: "ss7ns", - 478: "spsc", - 479: "iafserver", - 480: "iafdbase", - 481: "ph", - 482: "bgs-nsi", - 483: "ulpnet", - 484: "integra-sme", - 485: "powerburst", - 486: "avian", - 487: "saft", - 488: "gss-http", - 489: "nest-protocol", - 490: "micom-pfs", - 491: "go-login", - 492: "ticf-1", - 493: "ticf-2", - 494: "pov-ray", - 495: "intecourier", - 496: "pim-rp-disc", - 497: "retrospect", - 498: "siam", - 499: "iso-ill", - 500: "isakmp", - 501: "stmf", - 502: "mbap", - 503: "intrinsa", - 504: "citadel", - 505: "mailbox-lm", - 506: "ohimsrv", - 507: "crs", - 508: "xvttp", - 509: "snare", - 510: "fcp", - 511: "passgo", - 512: "exec", - 513: "login", - 514: "shell", - 515: "printer", - 516: "videotex", - 517: "talk", - 518: "ntalk", - 519: "utime", - 520: "efs", - 521: "ripng", - 522: "ulp", - 523: "ibm-db2", - 524: "ncp", - 525: "timed", - 526: "tempo", - 527: "stx", - 528: "custix", - 529: "irc-serv", - 530: "courier", - 531: "conference", - 532: "netnews", - 533: "netwall", - 534: "windream", - 535: "iiop", - 536: "opalis-rdv", - 537: "nmsp", - 538: "gdomap", - 539: "apertus-ldp", - 540: "uucp", - 541: "uucp-rlogin", - 542: "commerce", - 543: "klogin", - 544: "kshell", - 545: "appleqtcsrvr", - 546: "dhcpv6-client", - 547: "dhcpv6-server", - 548: "afpovertcp", - 549: "idfp", - 550: "new-rwho", - 551: "cybercash", - 552: "devshr-nts", - 553: "pirp", - 554: "rtsp", - 555: "dsf", - 556: "remotefs", - 557: "openvms-sysipc", - 558: "sdnskmp", - 559: "teedtap", - 560: "rmonitor", - 561: "monitor", - 562: "chshell", - 563: "nntps", - 564: "9pfs", - 565: "whoami", - 566: "streettalk", - 567: "banyan-rpc", - 568: "ms-shuttle", - 569: "ms-rome", - 570: "meter", - 571: "meter", - 572: "sonar", - 573: "banyan-vip", - 574: "ftp-agent", - 575: "vemmi", - 576: "ipcd", - 577: "vnas", - 578: "ipdd", - 579: "decbsrv", - 580: "sntp-heartbeat", - 581: "bdp", - 582: "scc-security", - 583: "philips-vc", - 584: "keyserver", - 586: "password-chg", - 587: "submission", - 588: "cal", - 589: "eyelink", - 590: "tns-cml", - 591: "http-alt", - 592: "eudora-set", - 593: "http-rpc-epmap", - 594: "tpip", - 595: "cab-protocol", - 596: "smsd", - 597: "ptcnameservice", - 598: "sco-websrvrmg3", - 599: "acp", - 600: "ipcserver", - 601: "syslog-conn", - 602: "xmlrpc-beep", - 603: "idxp", - 604: "tunnel", - 605: "soap-beep", - 606: "urm", - 607: "nqs", - 608: "sift-uft", - 609: "npmp-trap", - 610: "npmp-local", - 611: "npmp-gui", - 612: "hmmp-ind", - 613: "hmmp-op", - 614: "sshell", - 615: "sco-inetmgr", - 616: "sco-sysmgr", - 617: "sco-dtmgr", - 618: "dei-icda", - 619: "compaq-evm", - 620: "sco-websrvrmgr", - 621: "escp-ip", - 622: "collaborator", - 623: "oob-ws-http", - 624: "cryptoadmin", - 625: "dec-dlm", - 626: "asia", - 627: "passgo-tivoli", - 628: "qmqp", - 629: "3com-amp3", - 630: "rda", - 631: "ipp", - 632: "bmpp", - 633: "servstat", - 634: "ginad", - 635: "rlzdbase", - 636: "ldaps", - 637: "lanserver", - 638: "mcns-sec", - 639: "msdp", - 640: "entrust-sps", - 641: "repcmd", - 642: "esro-emsdp", - 643: "sanity", - 644: "dwr", - 645: "pssc", - 646: "ldp", - 647: "dhcp-failover", - 648: "rrp", - 649: "cadview-3d", - 650: "obex", - 651: "ieee-mms", - 652: "hello-port", - 653: "repscmd", - 654: "aodv", - 655: "tinc", - 656: "spmp", - 657: "rmc", - 658: "tenfold", - 660: "mac-srvr-admin", - 661: "hap", - 662: "pftp", - 663: "purenoise", - 664: "oob-ws-https", - 665: "sun-dr", - 666: "mdqs", - 667: "disclose", - 668: "mecomm", - 669: "meregister", - 670: "vacdsm-sws", - 671: "vacdsm-app", - 672: "vpps-qua", - 673: "cimplex", - 674: "acap", - 675: "dctp", - 676: "vpps-via", - 677: "vpp", - 678: "ggf-ncp", - 679: "mrm", - 680: "entrust-aaas", - 681: "entrust-aams", - 682: "xfr", - 683: "corba-iiop", - 684: "corba-iiop-ssl", - 685: "mdc-portmapper", - 686: "hcp-wismar", - 687: "asipregistry", - 688: "realm-rusd", - 689: "nmap", - 690: "vatp", - 691: "msexch-routing", - 692: "hyperwave-isp", - 693: "connendp", - 694: "ha-cluster", - 695: "ieee-mms-ssl", - 696: "rushd", - 697: "uuidgen", - 698: "olsr", - 699: "accessnetwork", - 700: "epp", - 701: "lmp", - 702: "iris-beep", - 704: "elcsd", - 705: "agentx", - 706: "silc", - 707: "borland-dsj", - 709: "entrust-kmsh", - 710: "entrust-ash", - 711: "cisco-tdp", - 712: "tbrpf", - 713: "iris-xpc", - 714: "iris-xpcs", - 715: "iris-lwz", - 729: "netviewdm1", - 730: "netviewdm2", - 731: "netviewdm3", - 741: "netgw", - 742: "netrcs", - 744: "flexlm", - 747: "fujitsu-dev", - 748: "ris-cm", - 749: "kerberos-adm", - 750: "rfile", - 751: "pump", - 752: "qrh", - 753: "rrh", - 754: "tell", - 758: "nlogin", - 759: "con", - 760: "ns", - 761: "rxe", - 762: "quotad", - 763: "cycleserv", - 764: "omserv", - 765: "webster", - 767: "phonebook", - 769: "vid", - 770: "cadlock", - 771: "rtip", - 772: "cycleserv2", - 773: "submit", - 774: "rpasswd", - 775: "entomb", - 776: "wpages", - 777: "multiling-http", - 780: "wpgs", - 800: "mdbs-daemon", - 801: "device", - 802: "mbap-s", - 810: "fcp-udp", - 828: "itm-mcell-s", - 829: "pkix-3-ca-ra", - 830: "netconf-ssh", - 831: "netconf-beep", - 832: "netconfsoaphttp", - 833: "netconfsoapbeep", - 847: "dhcp-failover2", - 848: "gdoi", - 853: "domain-s", - 854: "dlep", - 860: "iscsi", - 861: "owamp-control", - 862: "twamp-control", - 873: "rsync", - 886: "iclcnet-locate", - 887: "iclcnet-svinfo", - 888: "accessbuilder", - 900: "omginitialrefs", - 901: "smpnameres", - 902: "ideafarm-door", - 903: "ideafarm-panic", - 910: "kink", - 911: "xact-backup", - 912: "apex-mesh", - 913: "apex-edge", - 953: "rndc", - 989: "ftps-data", - 990: "ftps", - 991: "nas", - 992: "telnets", - 993: "imaps", - 995: "pop3s", - 996: "vsinet", - 997: "maitrd", - 998: "busboy", - 999: "garcon", - 1000: "cadlock2", - 1001: "webpush", - 1010: "surf", - 1021: "exp1", - 1022: "exp2", - 1025: "blackjack", - 1026: "cap", - 1029: "solid-mux", - 1033: "netinfo-local", - 1034: "activesync", - 1035: "mxxrlogin", - 1036: "nsstp", - 1037: "ams", - 1038: "mtqp", - 1039: "sbl", - 1040: "netarx", - 1041: "danf-ak2", - 1042: "afrog", - 1043: "boinc-client", - 1044: "dcutility", - 1045: "fpitp", - 1046: "wfremotertm", - 1047: "neod1", - 1048: "neod2", - 1049: "td-postman", - 1050: "cma", - 1051: "optima-vnet", - 1052: "ddt", - 1053: "remote-as", - 1054: "brvread", - 1055: "ansyslmd", - 1056: "vfo", - 1057: "startron", - 1058: "nim", - 1059: "nimreg", - 1060: "polestar", - 1061: "kiosk", - 1062: "veracity", - 1063: "kyoceranetdev", - 1064: "jstel", - 1065: "syscomlan", - 1066: "fpo-fns", - 1067: "instl-boots", - 1068: "instl-bootc", - 1069: "cognex-insight", - 1070: "gmrupdateserv", - 1071: "bsquare-voip", - 1072: "cardax", - 1073: "bridgecontrol", - 1074: "warmspotMgmt", - 1075: "rdrmshc", - 1076: "dab-sti-c", - 1077: "imgames", - 1078: "avocent-proxy", - 1079: "asprovatalk", - 1080: "socks", - 1081: "pvuniwien", - 1082: "amt-esd-prot", - 1083: "ansoft-lm-1", - 1084: "ansoft-lm-2", - 1085: "webobjects", - 1086: "cplscrambler-lg", - 1087: "cplscrambler-in", - 1088: "cplscrambler-al", - 1089: "ff-annunc", - 1090: "ff-fms", - 1091: "ff-sm", - 1092: "obrpd", - 1093: "proofd", - 1094: "rootd", - 1095: "nicelink", - 1096: "cnrprotocol", - 1097: "sunclustermgr", - 1098: "rmiactivation", - 1099: "rmiregistry", - 1100: "mctp", - 1101: "pt2-discover", - 1102: "adobeserver-1", - 1103: "adobeserver-2", - 1104: "xrl", - 1105: "ftranhc", - 1106: "isoipsigport-1", - 1107: "isoipsigport-2", - 1108: "ratio-adp", - 1110: "webadmstart", - 1111: "lmsocialserver", - 1112: "icp", - 1113: "ltp-deepspace", - 1114: "mini-sql", - 1115: "ardus-trns", - 1116: "ardus-cntl", - 1117: "ardus-mtrns", - 1118: "sacred", - 1119: "bnetgame", - 1120: "bnetfile", - 1121: "rmpp", - 1122: "availant-mgr", - 1123: "murray", - 1124: "hpvmmcontrol", - 1125: "hpvmmagent", - 1126: "hpvmmdata", - 1127: "kwdb-commn", - 1128: "saphostctrl", - 1129: "saphostctrls", - 1130: "casp", - 1131: "caspssl", - 1132: "kvm-via-ip", - 1133: "dfn", - 1134: "aplx", - 1135: "omnivision", - 1136: "hhb-gateway", - 1137: "trim", - 1138: "encrypted-admin", - 1139: "evm", - 1140: "autonoc", - 1141: "mxomss", - 1142: "edtools", - 1143: "imyx", - 1144: "fuscript", - 1145: "x9-icue", - 1146: "audit-transfer", - 1147: "capioverlan", - 1148: "elfiq-repl", - 1149: "bvtsonar", - 1150: "blaze", - 1151: "unizensus", - 1152: "winpoplanmess", - 1153: "c1222-acse", - 1154: "resacommunity", - 1155: "nfa", - 1156: "iascontrol-oms", - 1157: "iascontrol", - 1158: "dbcontrol-oms", - 1159: "oracle-oms", - 1160: "olsv", - 1161: "health-polling", - 1162: "health-trap", - 1163: "sddp", - 1164: "qsm-proxy", - 1165: "qsm-gui", - 1166: "qsm-remote", - 1167: "cisco-ipsla", - 1168: "vchat", - 1169: "tripwire", - 1170: "atc-lm", - 1171: "atc-appserver", - 1172: "dnap", - 1173: "d-cinema-rrp", - 1174: "fnet-remote-ui", - 1175: "dossier", - 1176: "indigo-server", - 1177: "dkmessenger", - 1178: "sgi-storman", - 1179: "b2n", - 1180: "mc-client", - 1181: "3comnetman", - 1182: "accelenet", - 1183: "llsurfup-http", - 1184: "llsurfup-https", - 1185: "catchpole", - 1186: "mysql-cluster", - 1187: "alias", - 1188: "hp-webadmin", - 1189: "unet", - 1190: "commlinx-avl", - 1191: "gpfs", - 1192: "caids-sensor", - 1193: "fiveacross", - 1194: "openvpn", - 1195: "rsf-1", - 1196: "netmagic", - 1197: "carrius-rshell", - 1198: "cajo-discovery", - 1199: "dmidi", - 1200: "scol", - 1201: "nucleus-sand", - 1202: "caiccipc", - 1203: "ssslic-mgr", - 1204: "ssslog-mgr", - 1205: "accord-mgc", - 1206: "anthony-data", - 1207: "metasage", - 1208: "seagull-ais", - 1209: "ipcd3", - 1210: "eoss", - 1211: "groove-dpp", - 1212: "lupa", - 1213: "mpc-lifenet", - 1214: "kazaa", - 1215: "scanstat-1", - 1216: "etebac5", - 1217: "hpss-ndapi", - 1218: "aeroflight-ads", - 1219: "aeroflight-ret", - 1220: "qt-serveradmin", - 1221: "sweetware-apps", - 1222: "nerv", - 1223: "tgp", - 1224: "vpnz", - 1225: "slinkysearch", - 1226: "stgxfws", - 1227: "dns2go", - 1228: "florence", - 1229: "zented", - 1230: "periscope", - 1231: "menandmice-lpm", - 1232: "first-defense", - 1233: "univ-appserver", - 1234: "search-agent", - 1235: "mosaicsyssvc1", - 1236: "bvcontrol", - 1237: "tsdos390", - 1238: "hacl-qs", - 1239: "nmsd", - 1240: "instantia", - 1241: "nessus", - 1242: "nmasoverip", - 1243: "serialgateway", - 1244: "isbconference1", - 1245: "isbconference2", - 1246: "payrouter", - 1247: "visionpyramid", - 1248: "hermes", - 1249: "mesavistaco", - 1250: "swldy-sias", - 1251: "servergraph", - 1252: "bspne-pcc", - 1253: "q55-pcc", - 1254: "de-noc", - 1255: "de-cache-query", - 1256: "de-server", - 1257: "shockwave2", - 1258: "opennl", - 1259: "opennl-voice", - 1260: "ibm-ssd", - 1261: "mpshrsv", - 1262: "qnts-orb", - 1263: "dka", - 1264: "prat", - 1265: "dssiapi", - 1266: "dellpwrappks", - 1267: "epc", - 1268: "propel-msgsys", - 1269: "watilapp", - 1270: "opsmgr", - 1271: "excw", - 1272: "cspmlockmgr", - 1273: "emc-gateway", - 1274: "t1distproc", - 1275: "ivcollector", - 1277: "miva-mqs", - 1278: "dellwebadmin-1", - 1279: "dellwebadmin-2", - 1280: "pictrography", - 1281: "healthd", - 1282: "emperion", - 1283: "productinfo", - 1284: "iee-qfx", - 1285: "neoiface", - 1286: "netuitive", - 1287: "routematch", - 1288: "navbuddy", - 1289: "jwalkserver", - 1290: "winjaserver", - 1291: "seagulllms", - 1292: "dsdn", - 1293: "pkt-krb-ipsec", - 1294: "cmmdriver", - 1295: "ehtp", - 1296: "dproxy", - 1297: "sdproxy", - 1298: "lpcp", - 1299: "hp-sci", - 1300: "h323hostcallsc", - 1301: "ci3-software-1", - 1302: "ci3-software-2", - 1303: "sftsrv", - 1304: "boomerang", - 1305: "pe-mike", - 1306: "re-conn-proto", - 1307: "pacmand", - 1308: "odsi", - 1309: "jtag-server", - 1310: "husky", - 1311: "rxmon", - 1312: "sti-envision", - 1313: "bmc-patroldb", - 1314: "pdps", - 1315: "els", - 1316: "exbit-escp", - 1317: "vrts-ipcserver", - 1318: "krb5gatekeeper", - 1319: "amx-icsp", - 1320: "amx-axbnet", - 1321: "pip", - 1322: "novation", - 1323: "brcd", - 1324: "delta-mcp", - 1325: "dx-instrument", - 1326: "wimsic", - 1327: "ultrex", - 1328: "ewall", - 1329: "netdb-export", - 1330: "streetperfect", - 1331: "intersan", - 1332: "pcia-rxp-b", - 1333: "passwrd-policy", - 1334: "writesrv", - 1335: "digital-notary", - 1336: "ischat", - 1337: "menandmice-dns", - 1338: "wmc-log-svc", - 1339: "kjtsiteserver", - 1340: "naap", - 1341: "qubes", - 1342: "esbroker", - 1343: "re101", - 1344: "icap", - 1345: "vpjp", - 1346: "alta-ana-lm", - 1347: "bbn-mmc", - 1348: "bbn-mmx", - 1349: "sbook", - 1350: "editbench", - 1351: "equationbuilder", - 1352: "lotusnote", - 1353: "relief", - 1354: "XSIP-network", - 1355: "intuitive-edge", - 1356: "cuillamartin", - 1357: "pegboard", - 1358: "connlcli", - 1359: "ftsrv", - 1360: "mimer", - 1361: "linx", - 1362: "timeflies", - 1363: "ndm-requester", - 1364: "ndm-server", - 1365: "adapt-sna", - 1366: "netware-csp", - 1367: "dcs", - 1368: "screencast", - 1369: "gv-us", - 1370: "us-gv", - 1371: "fc-cli", - 1372: "fc-ser", - 1373: "chromagrafx", - 1374: "molly", - 1375: "bytex", - 1376: "ibm-pps", - 1377: "cichlid", - 1378: "elan", - 1379: "dbreporter", - 1380: "telesis-licman", - 1381: "apple-licman", - 1382: "udt-os", - 1383: "gwha", - 1384: "os-licman", - 1385: "atex-elmd", - 1386: "checksum", - 1387: "cadsi-lm", - 1388: "objective-dbc", - 1389: "iclpv-dm", - 1390: "iclpv-sc", - 1391: "iclpv-sas", - 1392: "iclpv-pm", - 1393: "iclpv-nls", - 1394: "iclpv-nlc", - 1395: "iclpv-wsm", - 1396: "dvl-activemail", - 1397: "audio-activmail", - 1398: "video-activmail", - 1399: "cadkey-licman", - 1400: "cadkey-tablet", - 1401: "goldleaf-licman", - 1402: "prm-sm-np", - 1403: "prm-nm-np", - 1404: "igi-lm", - 1405: "ibm-res", - 1406: "netlabs-lm", - 1407: "tibet-server", - 1408: "sophia-lm", - 1409: "here-lm", - 1410: "hiq", - 1411: "af", - 1412: "innosys", - 1413: "innosys-acl", - 1414: "ibm-mqseries", - 1415: "dbstar", - 1416: "novell-lu6-2", - 1417: "timbuktu-srv1", - 1418: "timbuktu-srv2", - 1419: "timbuktu-srv3", - 1420: "timbuktu-srv4", - 1421: "gandalf-lm", - 1422: "autodesk-lm", - 1423: "essbase", - 1424: "hybrid", - 1425: "zion-lm", - 1426: "sais", - 1427: "mloadd", - 1428: "informatik-lm", - 1429: "nms", - 1430: "tpdu", - 1431: "rgtp", - 1432: "blueberry-lm", - 1433: "ms-sql-s", - 1434: "ms-sql-m", - 1435: "ibm-cics", - 1436: "saism", - 1437: "tabula", - 1438: "eicon-server", - 1439: "eicon-x25", - 1440: "eicon-slp", - 1441: "cadis-1", - 1442: "cadis-2", - 1443: "ies-lm", - 1444: "marcam-lm", - 1445: "proxima-lm", - 1446: "ora-lm", - 1447: "apri-lm", - 1448: "oc-lm", - 1449: "peport", - 1450: "dwf", - 1451: "infoman", - 1452: "gtegsc-lm", - 1453: "genie-lm", - 1454: "interhdl-elmd", - 1455: "esl-lm", - 1456: "dca", - 1457: "valisys-lm", - 1458: "nrcabq-lm", - 1459: "proshare1", - 1460: "proshare2", - 1461: "ibm-wrless-lan", - 1462: "world-lm", - 1463: "nucleus", - 1464: "msl-lmd", - 1465: "pipes", - 1466: "oceansoft-lm", - 1467: "csdmbase", - 1468: "csdm", - 1469: "aal-lm", - 1470: "uaiact", - 1471: "csdmbase", - 1472: "csdm", - 1473: "openmath", - 1474: "telefinder", - 1475: "taligent-lm", - 1476: "clvm-cfg", - 1477: "ms-sna-server", - 1478: "ms-sna-base", - 1479: "dberegister", - 1480: "pacerforum", - 1481: "airs", - 1482: "miteksys-lm", - 1483: "afs", - 1484: "confluent", - 1485: "lansource", - 1486: "nms-topo-serv", - 1487: "localinfosrvr", - 1488: "docstor", - 1489: "dmdocbroker", - 1490: "insitu-conf", - 1492: "stone-design-1", - 1493: "netmap-lm", - 1494: "ica", - 1495: "cvc", - 1496: "liberty-lm", - 1497: "rfx-lm", - 1498: "sybase-sqlany", - 1499: "fhc", - 1500: "vlsi-lm", - 1501: "saiscm", - 1502: "shivadiscovery", - 1503: "imtc-mcs", - 1504: "evb-elm", - 1505: "funkproxy", - 1506: "utcd", - 1507: "symplex", - 1508: "diagmond", - 1509: "robcad-lm", - 1510: "mvx-lm", - 1511: "3l-l1", - 1512: "wins", - 1513: "fujitsu-dtc", - 1514: "fujitsu-dtcns", - 1515: "ifor-protocol", - 1516: "vpad", - 1517: "vpac", - 1518: "vpvd", - 1519: "vpvc", - 1520: "atm-zip-office", - 1521: "ncube-lm", - 1522: "ricardo-lm", - 1523: "cichild-lm", - 1524: "ingreslock", - 1525: "orasrv", - 1526: "pdap-np", - 1527: "tlisrv", - 1529: "coauthor", - 1530: "rap-service", - 1531: "rap-listen", - 1532: "miroconnect", - 1533: "virtual-places", - 1534: "micromuse-lm", - 1535: "ampr-info", - 1536: "ampr-inter", - 1537: "sdsc-lm", - 1538: "3ds-lm", - 1539: "intellistor-lm", - 1540: "rds", - 1541: "rds2", - 1542: "gridgen-elmd", - 1543: "simba-cs", - 1544: "aspeclmd", - 1545: "vistium-share", - 1546: "abbaccuray", - 1547: "laplink", - 1548: "axon-lm", - 1549: "shivahose", - 1550: "3m-image-lm", - 1551: "hecmtl-db", - 1552: "pciarray", - 1553: "sna-cs", - 1554: "caci-lm", - 1555: "livelan", - 1556: "veritas-pbx", - 1557: "arbortext-lm", - 1558: "xingmpeg", - 1559: "web2host", - 1560: "asci-val", - 1561: "facilityview", - 1562: "pconnectmgr", - 1563: "cadabra-lm", - 1564: "pay-per-view", - 1565: "winddlb", - 1566: "corelvideo", - 1567: "jlicelmd", - 1568: "tsspmap", - 1569: "ets", - 1570: "orbixd", - 1571: "rdb-dbs-disp", - 1572: "chip-lm", - 1573: "itscomm-ns", - 1574: "mvel-lm", - 1575: "oraclenames", - 1576: "moldflow-lm", - 1577: "hypercube-lm", - 1578: "jacobus-lm", - 1579: "ioc-sea-lm", - 1580: "tn-tl-r1", - 1581: "mil-2045-47001", - 1582: "msims", - 1583: "simbaexpress", - 1584: "tn-tl-fd2", - 1585: "intv", - 1586: "ibm-abtact", - 1587: "pra-elmd", - 1588: "triquest-lm", - 1589: "vqp", - 1590: "gemini-lm", - 1591: "ncpm-pm", - 1592: "commonspace", - 1593: "mainsoft-lm", - 1594: "sixtrak", - 1595: "radio", - 1596: "radio-sm", - 1597: "orbplus-iiop", - 1598: "picknfs", - 1599: "simbaservices", - 1600: "issd", - 1601: "aas", - 1602: "inspect", - 1603: "picodbc", - 1604: "icabrowser", - 1605: "slp", - 1606: "slm-api", - 1607: "stt", - 1608: "smart-lm", - 1609: "isysg-lm", - 1610: "taurus-wh", - 1611: "ill", - 1612: "netbill-trans", - 1613: "netbill-keyrep", - 1614: "netbill-cred", - 1615: "netbill-auth", - 1616: "netbill-prod", - 1617: "nimrod-agent", - 1618: "skytelnet", - 1619: "xs-openstorage", - 1620: "faxportwinport", - 1621: "softdataphone", - 1622: "ontime", - 1623: "jaleosnd", - 1624: "udp-sr-port", - 1625: "svs-omagent", - 1626: "shockwave", - 1627: "t128-gateway", - 1628: "lontalk-norm", - 1629: "lontalk-urgnt", - 1630: "oraclenet8cman", - 1631: "visitview", - 1632: "pammratc", - 1633: "pammrpc", - 1634: "loaprobe", - 1635: "edb-server1", - 1636: "isdc", - 1637: "islc", - 1638: "ismc", - 1639: "cert-initiator", - 1640: "cert-responder", - 1641: "invision", - 1642: "isis-am", - 1643: "isis-ambc", - 1644: "saiseh", - 1645: "sightline", - 1646: "sa-msg-port", - 1647: "rsap", - 1648: "concurrent-lm", - 1649: "kermit", - 1650: "nkd", - 1651: "shiva-confsrvr", - 1652: "xnmp", - 1653: "alphatech-lm", - 1654: "stargatealerts", - 1655: "dec-mbadmin", - 1656: "dec-mbadmin-h", - 1657: "fujitsu-mmpdc", - 1658: "sixnetudr", - 1659: "sg-lm", - 1660: "skip-mc-gikreq", - 1661: "netview-aix-1", - 1662: "netview-aix-2", - 1663: "netview-aix-3", - 1664: "netview-aix-4", - 1665: "netview-aix-5", - 1666: "netview-aix-6", - 1667: "netview-aix-7", - 1668: "netview-aix-8", - 1669: "netview-aix-9", - 1670: "netview-aix-10", - 1671: "netview-aix-11", - 1672: "netview-aix-12", - 1673: "proshare-mc-1", - 1674: "proshare-mc-2", - 1675: "pdp", - 1676: "netcomm1", - 1677: "groupwise", - 1678: "prolink", - 1679: "darcorp-lm", - 1680: "microcom-sbp", - 1681: "sd-elmd", - 1682: "lanyon-lantern", - 1683: "ncpm-hip", - 1684: "snaresecure", - 1685: "n2nremote", - 1686: "cvmon", - 1687: "nsjtp-ctrl", - 1688: "nsjtp-data", - 1689: "firefox", - 1690: "ng-umds", - 1691: "empire-empuma", - 1692: "sstsys-lm", - 1693: "rrirtr", - 1694: "rrimwm", - 1695: "rrilwm", - 1696: "rrifmm", - 1697: "rrisat", - 1698: "rsvp-encap-1", - 1699: "rsvp-encap-2", - 1700: "mps-raft", - 1701: "l2f", - 1702: "deskshare", - 1703: "hb-engine", - 1704: "bcs-broker", - 1705: "slingshot", - 1706: "jetform", - 1707: "vdmplay", - 1708: "gat-lmd", - 1709: "centra", - 1710: "impera", - 1711: "pptconference", - 1712: "registrar", - 1713: "conferencetalk", - 1714: "sesi-lm", - 1715: "houdini-lm", - 1716: "xmsg", - 1717: "fj-hdnet", - 1718: "h323gatedisc", - 1719: "h323gatestat", - 1720: "h323hostcall", - 1721: "caicci", - 1722: "hks-lm", - 1723: "pptp", - 1724: "csbphonemaster", - 1725: "iden-ralp", - 1726: "iberiagames", - 1727: "winddx", - 1728: "telindus", - 1729: "citynl", - 1730: "roketz", - 1731: "msiccp", - 1732: "proxim", - 1733: "siipat", - 1734: "cambertx-lm", - 1735: "privatechat", - 1736: "street-stream", - 1737: "ultimad", - 1738: "gamegen1", - 1739: "webaccess", - 1740: "encore", - 1741: "cisco-net-mgmt", - 1742: "3Com-nsd", - 1743: "cinegrfx-lm", - 1744: "ncpm-ft", - 1745: "remote-winsock", - 1746: "ftrapid-1", - 1747: "ftrapid-2", - 1748: "oracle-em1", - 1749: "aspen-services", - 1750: "sslp", - 1751: "swiftnet", - 1752: "lofr-lm", - 1753: "predatar-comms", - 1754: "oracle-em2", - 1755: "ms-streaming", - 1756: "capfast-lmd", - 1757: "cnhrp", - 1758: "tftp-mcast", - 1759: "spss-lm", - 1760: "www-ldap-gw", - 1761: "cft-0", - 1762: "cft-1", - 1763: "cft-2", - 1764: "cft-3", - 1765: "cft-4", - 1766: "cft-5", - 1767: "cft-6", - 1768: "cft-7", - 1769: "bmc-net-adm", - 1770: "bmc-net-svc", - 1771: "vaultbase", - 1772: "essweb-gw", - 1773: "kmscontrol", - 1774: "global-dtserv", - 1775: "vdab", - 1776: "femis", - 1777: "powerguardian", - 1778: "prodigy-intrnet", - 1779: "pharmasoft", - 1780: "dpkeyserv", - 1781: "answersoft-lm", - 1782: "hp-hcip", - 1784: "finle-lm", - 1785: "windlm", - 1786: "funk-logger", - 1787: "funk-license", - 1788: "psmond", - 1789: "hello", - 1790: "nmsp", - 1791: "ea1", - 1792: "ibm-dt-2", - 1793: "rsc-robot", - 1794: "cera-bcm", - 1795: "dpi-proxy", - 1796: "vocaltec-admin", - 1797: "uma", - 1798: "etp", - 1799: "netrisk", - 1800: "ansys-lm", - 1801: "msmq", - 1802: "concomp1", - 1803: "hp-hcip-gwy", - 1804: "enl", - 1805: "enl-name", - 1806: "musiconline", - 1807: "fhsp", - 1808: "oracle-vp2", - 1809: "oracle-vp1", - 1810: "jerand-lm", - 1811: "scientia-sdb", - 1812: "radius", - 1813: "radius-acct", - 1814: "tdp-suite", - 1815: "mmpft", - 1816: "harp", - 1817: "rkb-oscs", - 1818: "etftp", - 1819: "plato-lm", - 1820: "mcagent", - 1821: "donnyworld", - 1822: "es-elmd", - 1823: "unisys-lm", - 1824: "metrics-pas", - 1825: "direcpc-video", - 1826: "ardt", - 1827: "asi", - 1828: "itm-mcell-u", - 1829: "optika-emedia", - 1830: "net8-cman", - 1831: "myrtle", - 1832: "tht-treasure", - 1833: "udpradio", - 1834: "ardusuni", - 1835: "ardusmul", - 1836: "ste-smsc", - 1837: "csoft1", - 1838: "talnet", - 1839: "netopia-vo1", - 1840: "netopia-vo2", - 1841: "netopia-vo3", - 1842: "netopia-vo4", - 1843: "netopia-vo5", - 1844: "direcpc-dll", - 1845: "altalink", - 1846: "tunstall-pnc", - 1847: "slp-notify", - 1848: "fjdocdist", - 1849: "alpha-sms", - 1850: "gsi", - 1851: "ctcd", - 1852: "virtual-time", - 1853: "vids-avtp", - 1854: "buddy-draw", - 1855: "fiorano-rtrsvc", - 1856: "fiorano-msgsvc", - 1857: "datacaptor", - 1858: "privateark", - 1859: "gammafetchsvr", - 1860: "sunscalar-svc", - 1861: "lecroy-vicp", - 1862: "mysql-cm-agent", - 1863: "msnp", - 1864: "paradym-31port", - 1865: "entp", - 1866: "swrmi", - 1867: "udrive", - 1868: "viziblebrowser", - 1869: "transact", - 1870: "sunscalar-dns", - 1871: "canocentral0", - 1872: "canocentral1", - 1873: "fjmpjps", - 1874: "fjswapsnp", - 1875: "westell-stats", - 1876: "ewcappsrv", - 1877: "hp-webqosdb", - 1878: "drmsmc", - 1879: "nettgain-nms", - 1880: "vsat-control", - 1881: "ibm-mqseries2", - 1882: "ecsqdmn", - 1883: "mqtt", - 1884: "idmaps", - 1885: "vrtstrapserver", - 1886: "leoip", - 1887: "filex-lport", - 1888: "ncconfig", - 1889: "unify-adapter", - 1890: "wilkenlistener", - 1891: "childkey-notif", - 1892: "childkey-ctrl", - 1893: "elad", - 1894: "o2server-port", - 1896: "b-novative-ls", - 1897: "metaagent", - 1898: "cymtec-port", - 1899: "mc2studios", - 1900: "ssdp", - 1901: "fjicl-tep-a", - 1902: "fjicl-tep-b", - 1903: "linkname", - 1904: "fjicl-tep-c", - 1905: "sugp", - 1906: "tpmd", - 1907: "intrastar", - 1908: "dawn", - 1909: "global-wlink", - 1910: "ultrabac", - 1911: "mtp", - 1912: "rhp-iibp", - 1913: "armadp", - 1914: "elm-momentum", - 1915: "facelink", - 1916: "persona", - 1917: "noagent", - 1918: "can-nds", - 1919: "can-dch", - 1920: "can-ferret", - 1921: "noadmin", - 1922: "tapestry", - 1923: "spice", - 1924: "xiip", - 1925: "discovery-port", - 1926: "egs", - 1927: "videte-cipc", - 1928: "emsd-port", - 1929: "bandwiz-system", - 1930: "driveappserver", - 1931: "amdsched", - 1932: "ctt-broker", - 1933: "xmapi", - 1934: "xaapi", - 1935: "macromedia-fcs", - 1936: "jetcmeserver", - 1937: "jwserver", - 1938: "jwclient", - 1939: "jvserver", - 1940: "jvclient", - 1941: "dic-aida", - 1942: "res", - 1943: "beeyond-media", - 1944: "close-combat", - 1945: "dialogic-elmd", - 1946: "tekpls", - 1947: "sentinelsrm", - 1948: "eye2eye", - 1949: "ismaeasdaqlive", - 1950: "ismaeasdaqtest", - 1951: "bcs-lmserver", - 1952: "mpnjsc", - 1953: "rapidbase", - 1954: "abr-api", - 1955: "abr-secure", - 1956: "vrtl-vmf-ds", - 1957: "unix-status", - 1958: "dxadmind", - 1959: "simp-all", - 1960: "nasmanager", - 1961: "bts-appserver", - 1962: "biap-mp", - 1963: "webmachine", - 1964: "solid-e-engine", - 1965: "tivoli-npm", - 1966: "slush", - 1967: "sns-quote", - 1968: "lipsinc", - 1969: "lipsinc1", - 1970: "netop-rc", - 1971: "netop-school", - 1972: "intersys-cache", - 1973: "dlsrap", - 1974: "drp", - 1975: "tcoflashagent", - 1976: "tcoregagent", - 1977: "tcoaddressbook", - 1978: "unisql", - 1979: "unisql-java", - 1980: "pearldoc-xact", - 1981: "p2pq", - 1982: "estamp", - 1983: "lhtp", - 1984: "bb", - 1985: "hsrp", - 1986: "licensedaemon", - 1987: "tr-rsrb-p1", - 1988: "tr-rsrb-p2", - 1989: "tr-rsrb-p3", - 1990: "stun-p1", - 1991: "stun-p2", - 1992: "stun-p3", - 1993: "snmp-tcp-port", - 1994: "stun-port", - 1995: "perf-port", - 1996: "tr-rsrb-port", - 1997: "gdp-port", - 1998: "x25-svc-port", - 1999: "tcp-id-port", - 2000: "cisco-sccp", - 2001: "dc", - 2002: "globe", - 2003: "brutus", - 2004: "mailbox", - 2005: "berknet", - 2006: "invokator", - 2007: "dectalk", - 2008: "conf", - 2009: "news", - 2010: "search", - 2011: "raid-cc", - 2012: "ttyinfo", - 2013: "raid-am", - 2014: "troff", - 2015: "cypress", - 2016: "bootserver", - 2017: "cypress-stat", - 2018: "terminaldb", - 2019: "whosockami", - 2020: "xinupageserver", - 2021: "servexec", - 2022: "down", - 2023: "xinuexpansion3", - 2024: "xinuexpansion4", - 2025: "ellpack", - 2026: "scrabble", - 2027: "shadowserver", - 2028: "submitserver", - 2029: "hsrpv6", - 2030: "device2", - 2031: "mobrien-chat", - 2032: "blackboard", - 2033: "glogger", - 2034: "scoremgr", - 2035: "imsldoc", - 2036: "e-dpnet", - 2037: "applus", - 2038: "objectmanager", - 2039: "prizma", - 2040: "lam", - 2041: "interbase", - 2042: "isis", - 2043: "isis-bcast", - 2044: "rimsl", - 2045: "cdfunc", - 2046: "sdfunc", - 2047: "dls", - 2048: "dls-monitor", - 2049: "shilp", - 2050: "av-emb-config", - 2051: "epnsdp", - 2052: "clearvisn", - 2053: "lot105-ds-upd", - 2054: "weblogin", - 2055: "iop", - 2056: "omnisky", - 2057: "rich-cp", - 2058: "newwavesearch", - 2059: "bmc-messaging", - 2060: "teleniumdaemon", - 2061: "netmount", - 2062: "icg-swp", - 2063: "icg-bridge", - 2064: "icg-iprelay", - 2065: "dlsrpn", - 2066: "aura", - 2067: "dlswpn", - 2068: "avauthsrvprtcl", - 2069: "event-port", - 2070: "ah-esp-encap", - 2071: "acp-port", - 2072: "msync", - 2073: "gxs-data-port", - 2074: "vrtl-vmf-sa", - 2075: "newlixengine", - 2076: "newlixconfig", - 2077: "tsrmagt", - 2078: "tpcsrvr", - 2079: "idware-router", - 2080: "autodesk-nlm", - 2081: "kme-trap-port", - 2082: "infowave", - 2083: "radsec", - 2084: "sunclustergeo", - 2085: "ada-cip", - 2086: "gnunet", - 2087: "eli", - 2088: "ip-blf", - 2089: "sep", - 2090: "lrp", - 2091: "prp", - 2092: "descent3", - 2093: "nbx-cc", - 2094: "nbx-au", - 2095: "nbx-ser", - 2096: "nbx-dir", - 2097: "jetformpreview", - 2098: "dialog-port", - 2099: "h2250-annex-g", - 2100: "amiganetfs", - 2101: "rtcm-sc104", - 2102: "zephyr-srv", - 2103: "zephyr-clt", - 2104: "zephyr-hm", - 2105: "minipay", - 2106: "mzap", - 2107: "bintec-admin", - 2108: "comcam", - 2109: "ergolight", - 2110: "umsp", - 2111: "dsatp", - 2112: "idonix-metanet", - 2113: "hsl-storm", - 2114: "newheights", - 2115: "kdm", - 2116: "ccowcmr", - 2117: "mentaclient", - 2118: "mentaserver", - 2119: "gsigatekeeper", - 2120: "qencp", - 2121: "scientia-ssdb", - 2122: "caupc-remote", - 2123: "gtp-control", - 2124: "elatelink", - 2125: "lockstep", - 2126: "pktcable-cops", - 2127: "index-pc-wb", - 2128: "net-steward", - 2129: "cs-live", - 2130: "xds", - 2131: "avantageb2b", - 2132: "solera-epmap", - 2133: "zymed-zpp", - 2134: "avenue", - 2135: "gris", - 2136: "appworxsrv", - 2137: "connect", - 2138: "unbind-cluster", - 2139: "ias-auth", - 2140: "ias-reg", - 2141: "ias-admind", - 2142: "tdmoip", - 2143: "lv-jc", - 2144: "lv-ffx", - 2145: "lv-pici", - 2146: "lv-not", - 2147: "lv-auth", - 2148: "veritas-ucl", - 2149: "acptsys", - 2150: "dynamic3d", - 2151: "docent", - 2152: "gtp-user", - 2153: "ctlptc", - 2154: "stdptc", - 2155: "brdptc", - 2156: "trp", - 2157: "xnds", - 2158: "touchnetplus", - 2159: "gdbremote", - 2160: "apc-2160", - 2161: "apc-2161", - 2162: "navisphere", - 2163: "navisphere-sec", - 2164: "ddns-v3", - 2165: "x-bone-api", - 2166: "iwserver", - 2167: "raw-serial", - 2168: "easy-soft-mux", - 2169: "brain", - 2170: "eyetv", - 2171: "msfw-storage", - 2172: "msfw-s-storage", - 2173: "msfw-replica", - 2174: "msfw-array", - 2175: "airsync", - 2176: "rapi", - 2177: "qwave", - 2178: "bitspeer", - 2179: "vmrdp", - 2180: "mc-gt-srv", - 2181: "eforward", - 2182: "cgn-stat", - 2183: "cgn-config", - 2184: "nvd", - 2185: "onbase-dds", - 2186: "gtaua", - 2187: "ssmc", - 2188: "radware-rpm", - 2189: "radware-rpm-s", - 2190: "tivoconnect", - 2191: "tvbus", - 2192: "asdis", - 2193: "drwcs", - 2197: "mnp-exchange", - 2198: "onehome-remote", - 2199: "onehome-help", - 2200: "ici", - 2201: "ats", - 2202: "imtc-map", - 2203: "b2-runtime", - 2204: "b2-license", - 2205: "jps", - 2206: "hpocbus", - 2207: "hpssd", - 2208: "hpiod", - 2209: "rimf-ps", - 2210: "noaaport", - 2211: "emwin", - 2212: "leecoposserver", - 2213: "kali", - 2214: "rpi", - 2215: "ipcore", - 2216: "vtu-comms", - 2217: "gotodevice", - 2218: "bounzza", - 2219: "netiq-ncap", - 2220: "netiq", - 2221: "ethernet-ip-s", - 2222: "EtherNet-IP-1", - 2223: "rockwell-csp2", - 2224: "efi-mg", - 2225: "rcip-itu", - 2226: "di-drm", - 2227: "di-msg", - 2228: "ehome-ms", - 2229: "datalens", - 2230: "queueadm", - 2231: "wimaxasncp", - 2232: "ivs-video", - 2233: "infocrypt", - 2234: "directplay", - 2235: "sercomm-wlink", - 2236: "nani", - 2237: "optech-port1-lm", - 2238: "aviva-sna", - 2239: "imagequery", - 2240: "recipe", - 2241: "ivsd", - 2242: "foliocorp", - 2243: "magicom", - 2244: "nmsserver", - 2245: "hao", - 2246: "pc-mta-addrmap", - 2247: "antidotemgrsvr", - 2248: "ums", - 2249: "rfmp", - 2250: "remote-collab", - 2251: "dif-port", - 2252: "njenet-ssl", - 2253: "dtv-chan-req", - 2254: "seispoc", - 2255: "vrtp", - 2256: "pcc-mfp", - 2257: "simple-tx-rx", - 2258: "rcts", - 2260: "apc-2260", - 2261: "comotionmaster", - 2262: "comotionback", - 2263: "ecwcfg", - 2264: "apx500api-1", - 2265: "apx500api-2", - 2266: "mfserver", - 2267: "ontobroker", - 2268: "amt", - 2269: "mikey", - 2270: "starschool", - 2271: "mmcals", - 2272: "mmcal", - 2273: "mysql-im", - 2274: "pcttunnell", - 2275: "ibridge-data", - 2276: "ibridge-mgmt", - 2277: "bluectrlproxy", - 2278: "s3db", - 2279: "xmquery", - 2280: "lnvpoller", - 2281: "lnvconsole", - 2282: "lnvalarm", - 2283: "lnvstatus", - 2284: "lnvmaps", - 2285: "lnvmailmon", - 2286: "nas-metering", - 2287: "dna", - 2288: "netml", - 2289: "dict-lookup", - 2290: "sonus-logging", - 2291: "eapsp", - 2292: "mib-streaming", - 2293: "npdbgmngr", - 2294: "konshus-lm", - 2295: "advant-lm", - 2296: "theta-lm", - 2297: "d2k-datamover1", - 2298: "d2k-datamover2", - 2299: "pc-telecommute", - 2300: "cvmmon", - 2301: "cpq-wbem", - 2302: "binderysupport", - 2303: "proxy-gateway", - 2304: "attachmate-uts", - 2305: "mt-scaleserver", - 2306: "tappi-boxnet", - 2307: "pehelp", - 2308: "sdhelp", - 2309: "sdserver", - 2310: "sdclient", - 2311: "messageservice", - 2312: "wanscaler", - 2313: "iapp", - 2314: "cr-websystems", - 2315: "precise-sft", - 2316: "sent-lm", - 2317: "attachmate-g32", - 2318: "cadencecontrol", - 2319: "infolibria", - 2320: "siebel-ns", - 2321: "rdlap", - 2322: "ofsd", - 2323: "3d-nfsd", - 2324: "cosmocall", - 2325: "ansysli", - 2326: "idcp", - 2327: "xingcsm", - 2328: "netrix-sftm", - 2329: "nvd", - 2330: "tscchat", - 2331: "agentview", - 2332: "rcc-host", - 2333: "snapp", - 2334: "ace-client", - 2335: "ace-proxy", - 2336: "appleugcontrol", - 2337: "ideesrv", - 2338: "norton-lambert", - 2339: "3com-webview", - 2340: "wrs-registry", - 2341: "xiostatus", - 2342: "manage-exec", - 2343: "nati-logos", - 2344: "fcmsys", - 2345: "dbm", - 2346: "redstorm-join", - 2347: "redstorm-find", - 2348: "redstorm-info", - 2349: "redstorm-diag", - 2350: "psbserver", - 2351: "psrserver", - 2352: "pslserver", - 2353: "pspserver", - 2354: "psprserver", - 2355: "psdbserver", - 2356: "gxtelmd", - 2357: "unihub-server", - 2358: "futrix", - 2359: "flukeserver", - 2360: "nexstorindltd", - 2361: "tl1", - 2362: "digiman", - 2363: "mediacntrlnfsd", - 2364: "oi-2000", - 2365: "dbref", - 2366: "qip-login", - 2367: "service-ctrl", - 2368: "opentable", - 2370: "l3-hbmon", - 2371: "hp-rda", - 2372: "lanmessenger", - 2373: "remographlm", - 2374: "hydra", - 2375: "docker", - 2376: "docker-s", - 2377: "swarm", - 2379: "etcd-client", - 2380: "etcd-server", - 2381: "compaq-https", - 2382: "ms-olap3", - 2383: "ms-olap4", - 2384: "sd-request", - 2385: "sd-data", - 2386: "virtualtape", - 2387: "vsamredirector", - 2388: "mynahautostart", - 2389: "ovsessionmgr", - 2390: "rsmtp", - 2391: "3com-net-mgmt", - 2392: "tacticalauth", - 2393: "ms-olap1", - 2394: "ms-olap2", - 2395: "lan900-remote", - 2396: "wusage", - 2397: "ncl", - 2398: "orbiter", - 2399: "fmpro-fdal", - 2400: "opequus-server", - 2401: "cvspserver", - 2402: "taskmaster2000", - 2403: "taskmaster2000", - 2404: "iec-104", - 2405: "trc-netpoll", - 2406: "jediserver", - 2407: "orion", - 2408: "railgun-webaccl", - 2409: "sns-protocol", - 2410: "vrts-registry", - 2411: "netwave-ap-mgmt", - 2412: "cdn", - 2413: "orion-rmi-reg", - 2414: "beeyond", - 2415: "codima-rtp", - 2416: "rmtserver", - 2417: "composit-server", - 2418: "cas", - 2419: "attachmate-s2s", - 2420: "dslremote-mgmt", - 2421: "g-talk", - 2422: "crmsbits", - 2423: "rnrp", - 2424: "kofax-svr", - 2425: "fjitsuappmgr", - 2426: "vcmp", - 2427: "mgcp-gateway", - 2428: "ott", - 2429: "ft-role", - 2430: "venus", - 2431: "venus-se", - 2432: "codasrv", - 2433: "codasrv-se", - 2434: "pxc-epmap", - 2435: "optilogic", - 2436: "topx", - 2437: "unicontrol", - 2438: "msp", - 2439: "sybasedbsynch", - 2440: "spearway", - 2441: "pvsw-inet", - 2442: "netangel", - 2443: "powerclientcsf", - 2444: "btpp2sectrans", - 2445: "dtn1", - 2446: "bues-service", - 2447: "ovwdb", - 2448: "hpppssvr", - 2449: "ratl", - 2450: "netadmin", - 2451: "netchat", - 2452: "snifferclient", - 2453: "madge-ltd", - 2454: "indx-dds", - 2455: "wago-io-system", - 2456: "altav-remmgt", - 2457: "rapido-ip", - 2458: "griffin", - 2459: "community", - 2460: "ms-theater", - 2461: "qadmifoper", - 2462: "qadmifevent", - 2463: "lsi-raid-mgmt", - 2464: "direcpc-si", - 2465: "lbm", - 2466: "lbf", - 2467: "high-criteria", - 2468: "qip-msgd", - 2469: "mti-tcs-comm", - 2470: "taskman-port", - 2471: "seaodbc", - 2472: "c3", - 2473: "aker-cdp", - 2474: "vitalanalysis", - 2475: "ace-server", - 2476: "ace-svr-prop", - 2477: "ssm-cvs", - 2478: "ssm-cssps", - 2479: "ssm-els", - 2480: "powerexchange", - 2481: "giop", - 2482: "giop-ssl", - 2483: "ttc", - 2484: "ttc-ssl", - 2485: "netobjects1", - 2486: "netobjects2", - 2487: "pns", - 2488: "moy-corp", - 2489: "tsilb", - 2490: "qip-qdhcp", - 2491: "conclave-cpp", - 2492: "groove", - 2493: "talarian-mqs", - 2494: "bmc-ar", - 2495: "fast-rem-serv", - 2496: "dirgis", - 2497: "quaddb", - 2498: "odn-castraq", - 2499: "unicontrol", - 2500: "rtsserv", - 2501: "rtsclient", - 2502: "kentrox-prot", - 2503: "nms-dpnss", - 2504: "wlbs", - 2505: "ppcontrol", - 2506: "jbroker", - 2507: "spock", - 2508: "jdatastore", - 2509: "fjmpss", - 2510: "fjappmgrbulk", - 2511: "metastorm", - 2512: "citrixima", - 2513: "citrixadmin", - 2514: "facsys-ntp", - 2515: "facsys-router", - 2516: "maincontrol", - 2517: "call-sig-trans", - 2518: "willy", - 2519: "globmsgsvc", - 2520: "pvsw", - 2521: "adaptecmgr", - 2522: "windb", - 2523: "qke-llc-v3", - 2524: "optiwave-lm", - 2525: "ms-v-worlds", - 2526: "ema-sent-lm", - 2527: "iqserver", - 2528: "ncr-ccl", - 2529: "utsftp", - 2530: "vrcommerce", - 2531: "ito-e-gui", - 2532: "ovtopmd", - 2533: "snifferserver", - 2534: "combox-web-acc", - 2535: "madcap", - 2536: "btpp2audctr1", - 2537: "upgrade", - 2538: "vnwk-prapi", - 2539: "vsiadmin", - 2540: "lonworks", - 2541: "lonworks2", - 2542: "udrawgraph", - 2543: "reftek", - 2544: "novell-zen", - 2545: "sis-emt", - 2546: "vytalvaultbrtp", - 2547: "vytalvaultvsmp", - 2548: "vytalvaultpipe", - 2549: "ipass", - 2550: "ads", - 2551: "isg-uda-server", - 2552: "call-logging", - 2553: "efidiningport", - 2554: "vcnet-link-v10", - 2555: "compaq-wcp", - 2556: "nicetec-nmsvc", - 2557: "nicetec-mgmt", - 2558: "pclemultimedia", - 2559: "lstp", - 2560: "labrat", - 2561: "mosaixcc", - 2562: "delibo", - 2563: "cti-redwood", - 2564: "hp-3000-telnet", - 2565: "coord-svr", - 2566: "pcs-pcw", - 2567: "clp", - 2568: "spamtrap", - 2569: "sonuscallsig", - 2570: "hs-port", - 2571: "cecsvc", - 2572: "ibp", - 2573: "trustestablish", - 2574: "blockade-bpsp", - 2575: "hl7", - 2576: "tclprodebugger", - 2577: "scipticslsrvr", - 2578: "rvs-isdn-dcp", - 2579: "mpfoncl", - 2580: "tributary", - 2581: "argis-te", - 2582: "argis-ds", - 2583: "mon", - 2584: "cyaserv", - 2585: "netx-server", - 2586: "netx-agent", - 2587: "masc", - 2588: "privilege", - 2589: "quartus-tcl", - 2590: "idotdist", - 2591: "maytagshuffle", - 2592: "netrek", - 2593: "mns-mail", - 2594: "dts", - 2595: "worldfusion1", - 2596: "worldfusion2", - 2597: "homesteadglory", - 2598: "citriximaclient", - 2599: "snapd", - 2600: "hpstgmgr", - 2601: "discp-client", - 2602: "discp-server", - 2603: "servicemeter", - 2604: "nsc-ccs", - 2605: "nsc-posa", - 2606: "netmon", - 2607: "connection", - 2608: "wag-service", - 2609: "system-monitor", - 2610: "versa-tek", - 2611: "lionhead", - 2612: "qpasa-agent", - 2613: "smntubootstrap", - 2614: "neveroffline", - 2615: "firepower", - 2616: "appswitch-emp", - 2617: "cmadmin", - 2618: "priority-e-com", - 2619: "bruce", - 2620: "lpsrecommender", - 2621: "miles-apart", - 2622: "metricadbc", - 2623: "lmdp", - 2624: "aria", - 2625: "blwnkl-port", - 2626: "gbjd816", - 2627: "moshebeeri", - 2628: "dict", - 2629: "sitaraserver", - 2630: "sitaramgmt", - 2631: "sitaradir", - 2632: "irdg-post", - 2633: "interintelli", - 2634: "pk-electronics", - 2635: "backburner", - 2636: "solve", - 2637: "imdocsvc", - 2638: "sybaseanywhere", - 2639: "aminet", - 2640: "ami-control", - 2641: "hdl-srv", - 2642: "tragic", - 2643: "gte-samp", - 2644: "travsoft-ipx-t", - 2645: "novell-ipx-cmd", - 2646: "and-lm", - 2647: "syncserver", - 2648: "upsnotifyprot", - 2649: "vpsipport", - 2650: "eristwoguns", - 2651: "ebinsite", - 2652: "interpathpanel", - 2653: "sonus", - 2654: "corel-vncadmin", - 2655: "unglue", - 2656: "kana", - 2657: "sns-dispatcher", - 2658: "sns-admin", - 2659: "sns-query", - 2660: "gcmonitor", - 2661: "olhost", - 2662: "bintec-capi", - 2663: "bintec-tapi", - 2664: "patrol-mq-gm", - 2665: "patrol-mq-nm", - 2666: "extensis", - 2667: "alarm-clock-s", - 2668: "alarm-clock-c", - 2669: "toad", - 2670: "tve-announce", - 2671: "newlixreg", - 2672: "nhserver", - 2673: "firstcall42", - 2674: "ewnn", - 2675: "ttc-etap", - 2676: "simslink", - 2677: "gadgetgate1way", - 2678: "gadgetgate2way", - 2679: "syncserverssl", - 2680: "pxc-sapxom", - 2681: "mpnjsomb", - 2683: "ncdloadbalance", - 2684: "mpnjsosv", - 2685: "mpnjsocl", - 2686: "mpnjsomg", - 2687: "pq-lic-mgmt", - 2688: "md-cg-http", - 2689: "fastlynx", - 2690: "hp-nnm-data", - 2691: "itinternet", - 2692: "admins-lms", - 2694: "pwrsevent", - 2695: "vspread", - 2696: "unifyadmin", - 2697: "oce-snmp-trap", - 2698: "mck-ivpip", - 2699: "csoft-plusclnt", - 2700: "tqdata", - 2701: "sms-rcinfo", - 2702: "sms-xfer", - 2703: "sms-chat", - 2704: "sms-remctrl", - 2705: "sds-admin", - 2706: "ncdmirroring", - 2707: "emcsymapiport", - 2708: "banyan-net", - 2709: "supermon", - 2710: "sso-service", - 2711: "sso-control", - 2712: "aocp", - 2713: "raventbs", - 2714: "raventdm", - 2715: "hpstgmgr2", - 2716: "inova-ip-disco", - 2717: "pn-requester", - 2718: "pn-requester2", - 2719: "scan-change", - 2720: "wkars", - 2721: "smart-diagnose", - 2722: "proactivesrvr", - 2723: "watchdog-nt", - 2724: "qotps", - 2725: "msolap-ptp2", - 2726: "tams", - 2727: "mgcp-callagent", - 2728: "sqdr", - 2729: "tcim-control", - 2730: "nec-raidplus", - 2731: "fyre-messanger", - 2732: "g5m", - 2733: "signet-ctf", - 2734: "ccs-software", - 2735: "netiq-mc", - 2736: "radwiz-nms-srv", - 2737: "srp-feedback", - 2738: "ndl-tcp-ois-gw", - 2739: "tn-timing", - 2740: "alarm", - 2741: "tsb", - 2742: "tsb2", - 2743: "murx", - 2744: "honyaku", - 2745: "urbisnet", - 2746: "cpudpencap", - 2747: "fjippol-swrly", - 2748: "fjippol-polsvr", - 2749: "fjippol-cnsl", - 2750: "fjippol-port1", - 2751: "fjippol-port2", - 2752: "rsisysaccess", - 2753: "de-spot", - 2754: "apollo-cc", - 2755: "expresspay", - 2756: "simplement-tie", - 2757: "cnrp", - 2758: "apollo-status", - 2759: "apollo-gms", - 2760: "sabams", - 2761: "dicom-iscl", - 2762: "dicom-tls", - 2763: "desktop-dna", - 2764: "data-insurance", - 2765: "qip-audup", - 2766: "compaq-scp", - 2767: "uadtc", - 2768: "uacs", - 2769: "exce", - 2770: "veronica", - 2771: "vergencecm", - 2772: "auris", - 2773: "rbakcup1", - 2774: "rbakcup2", - 2775: "smpp", - 2776: "ridgeway1", - 2777: "ridgeway2", - 2778: "gwen-sonya", - 2779: "lbc-sync", - 2780: "lbc-control", - 2781: "whosells", - 2782: "everydayrc", - 2783: "aises", - 2784: "www-dev", - 2785: "aic-np", - 2786: "aic-oncrpc", - 2787: "piccolo", - 2788: "fryeserv", - 2789: "media-agent", - 2790: "plgproxy", - 2791: "mtport-regist", - 2792: "f5-globalsite", - 2793: "initlsmsad", - 2795: "livestats", - 2796: "ac-tech", - 2797: "esp-encap", - 2798: "tmesis-upshot", - 2799: "icon-discover", - 2800: "acc-raid", - 2801: "igcp", - 2802: "veritas-tcp1", - 2803: "btprjctrl", - 2804: "dvr-esm", - 2805: "wta-wsp-s", - 2806: "cspuni", - 2807: "cspmulti", - 2808: "j-lan-p", - 2809: "corbaloc", - 2810: "netsteward", - 2811: "gsiftp", - 2812: "atmtcp", - 2813: "llm-pass", - 2814: "llm-csv", - 2815: "lbc-measure", - 2816: "lbc-watchdog", - 2817: "nmsigport", - 2818: "rmlnk", - 2819: "fc-faultnotify", - 2820: "univision", - 2821: "vrts-at-port", - 2822: "ka0wuc", - 2823: "cqg-netlan", - 2824: "cqg-netlan-1", - 2826: "slc-systemlog", - 2827: "slc-ctrlrloops", - 2828: "itm-lm", - 2829: "silkp1", - 2830: "silkp2", - 2831: "silkp3", - 2832: "silkp4", - 2833: "glishd", - 2834: "evtp", - 2835: "evtp-data", - 2836: "catalyst", - 2837: "repliweb", - 2838: "starbot", - 2839: "nmsigport", - 2840: "l3-exprt", - 2841: "l3-ranger", - 2842: "l3-hawk", - 2843: "pdnet", - 2844: "bpcp-poll", - 2845: "bpcp-trap", - 2846: "aimpp-hello", - 2847: "aimpp-port-req", - 2848: "amt-blc-port", - 2849: "fxp", - 2850: "metaconsole", - 2851: "webemshttp", - 2852: "bears-01", - 2853: "ispipes", - 2854: "infomover", - 2855: "msrp", - 2856: "cesdinv", - 2857: "simctlp", - 2858: "ecnp", - 2859: "activememory", - 2860: "dialpad-voice1", - 2861: "dialpad-voice2", - 2862: "ttg-protocol", - 2863: "sonardata", - 2864: "astromed-main", - 2865: "pit-vpn", - 2866: "iwlistener", - 2867: "esps-portal", - 2868: "npep-messaging", - 2869: "icslap", - 2870: "daishi", - 2871: "msi-selectplay", - 2872: "radix", - 2874: "dxmessagebase1", - 2875: "dxmessagebase2", - 2876: "sps-tunnel", - 2877: "bluelance", - 2878: "aap", - 2879: "ucentric-ds", - 2880: "synapse", - 2881: "ndsp", - 2882: "ndtp", - 2883: "ndnp", - 2884: "flashmsg", - 2885: "topflow", - 2886: "responselogic", - 2887: "aironetddp", - 2888: "spcsdlobby", - 2889: "rsom", - 2890: "cspclmulti", - 2891: "cinegrfx-elmd", - 2892: "snifferdata", - 2893: "vseconnector", - 2894: "abacus-remote", - 2895: "natuslink", - 2896: "ecovisiong6-1", - 2897: "citrix-rtmp", - 2898: "appliance-cfg", - 2899: "powergemplus", - 2900: "quicksuite", - 2901: "allstorcns", - 2902: "netaspi", - 2903: "suitcase", - 2904: "m2ua", - 2905: "m3ua", - 2906: "caller9", - 2907: "webmethods-b2b", - 2908: "mao", - 2909: "funk-dialout", - 2910: "tdaccess", - 2911: "blockade", - 2912: "epicon", - 2913: "boosterware", - 2914: "gamelobby", - 2915: "tksocket", - 2916: "elvin-server", - 2917: "elvin-client", - 2918: "kastenchasepad", - 2919: "roboer", - 2920: "roboeda", - 2921: "cesdcdman", - 2922: "cesdcdtrn", - 2923: "wta-wsp-wtp-s", - 2924: "precise-vip", - 2926: "mobile-file-dl", - 2927: "unimobilectrl", - 2928: "redstone-cpss", - 2929: "amx-webadmin", - 2930: "amx-weblinx", - 2931: "circle-x", - 2932: "incp", - 2933: "4-tieropmgw", - 2934: "4-tieropmcli", - 2935: "qtp", - 2936: "otpatch", - 2937: "pnaconsult-lm", - 2938: "sm-pas-1", - 2939: "sm-pas-2", - 2940: "sm-pas-3", - 2941: "sm-pas-4", - 2942: "sm-pas-5", - 2943: "ttnrepository", - 2944: "megaco-h248", - 2945: "h248-binary", - 2946: "fjsvmpor", - 2947: "gpsd", - 2948: "wap-push", - 2949: "wap-pushsecure", - 2950: "esip", - 2951: "ottp", - 2952: "mpfwsas", - 2953: "ovalarmsrv", - 2954: "ovalarmsrv-cmd", - 2955: "csnotify", - 2956: "ovrimosdbman", - 2957: "jmact5", - 2958: "jmact6", - 2959: "rmopagt", - 2960: "dfoxserver", - 2961: "boldsoft-lm", - 2962: "iph-policy-cli", - 2963: "iph-policy-adm", - 2964: "bullant-srap", - 2965: "bullant-rap", - 2966: "idp-infotrieve", - 2967: "ssc-agent", - 2968: "enpp", - 2969: "essp", - 2970: "index-net", - 2971: "netclip", - 2972: "pmsm-webrctl", - 2973: "svnetworks", - 2974: "signal", - 2975: "fjmpcm", - 2976: "cns-srv-port", - 2977: "ttc-etap-ns", - 2978: "ttc-etap-ds", - 2979: "h263-video", - 2980: "wimd", - 2981: "mylxamport", - 2982: "iwb-whiteboard", - 2983: "netplan", - 2984: "hpidsadmin", - 2985: "hpidsagent", - 2986: "stonefalls", - 2987: "identify", - 2988: "hippad", - 2989: "zarkov", - 2990: "boscap", - 2991: "wkstn-mon", - 2992: "avenyo", - 2993: "veritas-vis1", - 2994: "veritas-vis2", - 2995: "idrs", - 2996: "vsixml", - 2997: "rebol", - 2998: "realsecure", - 2999: "remoteware-un", - 3000: "hbci", - 3001: "origo-native", - 3002: "exlm-agent", - 3003: "cgms", - 3004: "csoftragent", - 3005: "geniuslm", - 3006: "ii-admin", - 3007: "lotusmtap", - 3008: "midnight-tech", - 3009: "pxc-ntfy", - 3010: "gw", - 3011: "trusted-web", - 3012: "twsdss", - 3013: "gilatskysurfer", - 3014: "broker-service", - 3015: "nati-dstp", - 3016: "notify-srvr", - 3017: "event-listener", - 3018: "srvc-registry", - 3019: "resource-mgr", - 3020: "cifs", - 3021: "agriserver", - 3022: "csregagent", - 3023: "magicnotes", - 3024: "nds-sso", - 3025: "arepa-raft", - 3026: "agri-gateway", - 3027: "LiebDevMgmt-C", - 3028: "LiebDevMgmt-DM", - 3029: "LiebDevMgmt-A", - 3030: "arepa-cas", - 3031: "eppc", - 3032: "redwood-chat", - 3033: "pdb", - 3034: "osmosis-aeea", - 3035: "fjsv-gssagt", - 3036: "hagel-dump", - 3037: "hp-san-mgmt", - 3038: "santak-ups", - 3039: "cogitate", - 3040: "tomato-springs", - 3041: "di-traceware", - 3042: "journee", - 3043: "brp", - 3044: "epp", - 3045: "responsenet", - 3046: "di-ase", - 3047: "hlserver", - 3048: "pctrader", - 3049: "nsws", - 3050: "gds-db", - 3051: "galaxy-server", - 3052: "apc-3052", - 3053: "dsom-server", - 3054: "amt-cnf-prot", - 3055: "policyserver", - 3056: "cdl-server", - 3057: "goahead-fldup", - 3058: "videobeans", - 3059: "qsoft", - 3060: "interserver", - 3061: "cautcpd", - 3062: "ncacn-ip-tcp", - 3063: "ncadg-ip-udp", - 3064: "rprt", - 3065: "slinterbase", - 3066: "netattachsdmp", - 3067: "fjhpjp", - 3068: "ls3bcast", - 3069: "ls3", - 3070: "mgxswitch", - 3071: "xplat-replicate", - 3072: "csd-monitor", - 3073: "vcrp", - 3074: "xbox", - 3075: "orbix-locator", - 3076: "orbix-config", - 3077: "orbix-loc-ssl", - 3078: "orbix-cfg-ssl", - 3079: "lv-frontpanel", - 3080: "stm-pproc", - 3081: "tl1-lv", - 3082: "tl1-raw", - 3083: "tl1-telnet", - 3084: "itm-mccs", - 3085: "pcihreq", - 3086: "jdl-dbkitchen", - 3087: "asoki-sma", - 3088: "xdtp", - 3089: "ptk-alink", - 3090: "stss", - 3091: "1ci-smcs", - 3093: "rapidmq-center", - 3094: "rapidmq-reg", - 3095: "panasas", - 3096: "ndl-aps", - 3098: "umm-port", - 3099: "chmd", - 3100: "opcon-xps", - 3101: "hp-pxpib", - 3102: "slslavemon", - 3103: "autocuesmi", - 3104: "autocuelog", - 3105: "cardbox", - 3106: "cardbox-http", - 3107: "business", - 3108: "geolocate", - 3109: "personnel", - 3110: "sim-control", - 3111: "wsynch", - 3112: "ksysguard", - 3113: "cs-auth-svr", - 3114: "ccmad", - 3115: "mctet-master", - 3116: "mctet-gateway", - 3117: "mctet-jserv", - 3118: "pkagent", - 3119: "d2000kernel", - 3120: "d2000webserver", - 3121: "pcmk-remote", - 3122: "vtr-emulator", - 3123: "edix", - 3124: "beacon-port", - 3125: "a13-an", - 3127: "ctx-bridge", - 3128: "ndl-aas", - 3129: "netport-id", - 3130: "icpv2", - 3131: "netbookmark", - 3132: "ms-rule-engine", - 3133: "prism-deploy", - 3134: "ecp", - 3135: "peerbook-port", - 3136: "grubd", - 3137: "rtnt-1", - 3138: "rtnt-2", - 3139: "incognitorv", - 3140: "ariliamulti", - 3141: "vmodem", - 3142: "rdc-wh-eos", - 3143: "seaview", - 3144: "tarantella", - 3145: "csi-lfap", - 3146: "bears-02", - 3147: "rfio", - 3148: "nm-game-admin", - 3149: "nm-game-server", - 3150: "nm-asses-admin", - 3151: "nm-assessor", - 3152: "feitianrockey", - 3153: "s8-client-port", - 3154: "ccmrmi", - 3155: "jpegmpeg", - 3156: "indura", - 3157: "e3consultants", - 3158: "stvp", - 3159: "navegaweb-port", - 3160: "tip-app-server", - 3161: "doc1lm", - 3162: "sflm", - 3163: "res-sap", - 3164: "imprs", - 3165: "newgenpay", - 3166: "sossecollector", - 3167: "nowcontact", - 3168: "poweronnud", - 3169: "serverview-as", - 3170: "serverview-asn", - 3171: "serverview-gf", - 3172: "serverview-rm", - 3173: "serverview-icc", - 3174: "armi-server", - 3175: "t1-e1-over-ip", - 3176: "ars-master", - 3177: "phonex-port", - 3178: "radclientport", - 3179: "h2gf-w-2m", - 3180: "mc-brk-srv", - 3181: "bmcpatrolagent", - 3182: "bmcpatrolrnvu", - 3183: "cops-tls", - 3184: "apogeex-port", - 3185: "smpppd", - 3186: "iiw-port", - 3187: "odi-port", - 3188: "brcm-comm-port", - 3189: "pcle-infex", - 3190: "csvr-proxy", - 3191: "csvr-sslproxy", - 3192: "firemonrcc", - 3193: "spandataport", - 3194: "magbind", - 3195: "ncu-1", - 3196: "ncu-2", - 3197: "embrace-dp-s", - 3198: "embrace-dp-c", - 3199: "dmod-workspace", - 3200: "tick-port", - 3201: "cpq-tasksmart", - 3202: "intraintra", - 3203: "netwatcher-mon", - 3204: "netwatcher-db", - 3205: "isns", - 3206: "ironmail", - 3207: "vx-auth-port", - 3208: "pfu-prcallback", - 3209: "netwkpathengine", - 3210: "flamenco-proxy", - 3211: "avsecuremgmt", - 3212: "surveyinst", - 3213: "neon24x7", - 3214: "jmq-daemon-1", - 3215: "jmq-daemon-2", - 3216: "ferrari-foam", - 3217: "unite", - 3218: "smartpackets", - 3219: "wms-messenger", - 3220: "xnm-ssl", - 3221: "xnm-clear-text", - 3222: "glbp", - 3223: "digivote", - 3224: "aes-discovery", - 3225: "fcip-port", - 3226: "isi-irp", - 3227: "dwnmshttp", - 3228: "dwmsgserver", - 3229: "global-cd-port", - 3230: "sftdst-port", - 3231: "vidigo", - 3232: "mdtp", - 3233: "whisker", - 3234: "alchemy", - 3235: "mdap-port", - 3236: "apparenet-ts", - 3237: "apparenet-tps", - 3238: "apparenet-as", - 3239: "apparenet-ui", - 3240: "triomotion", - 3241: "sysorb", - 3242: "sdp-id-port", - 3243: "timelot", - 3244: "onesaf", - 3245: "vieo-fe", - 3246: "dvt-system", - 3247: "dvt-data", - 3248: "procos-lm", - 3249: "ssp", - 3250: "hicp", - 3251: "sysscanner", - 3252: "dhe", - 3253: "pda-data", - 3254: "pda-sys", - 3255: "semaphore", - 3256: "cpqrpm-agent", - 3257: "cpqrpm-server", - 3258: "ivecon-port", - 3259: "epncdp2", - 3260: "iscsi-target", - 3261: "winshadow", - 3262: "necp", - 3263: "ecolor-imager", - 3264: "ccmail", - 3265: "altav-tunnel", - 3266: "ns-cfg-server", - 3267: "ibm-dial-out", - 3268: "msft-gc", - 3269: "msft-gc-ssl", - 3270: "verismart", - 3271: "csoft-prev", - 3272: "user-manager", - 3273: "sxmp", - 3274: "ordinox-server", - 3275: "samd", - 3276: "maxim-asics", - 3277: "awg-proxy", - 3278: "lkcmserver", - 3279: "admind", - 3280: "vs-server", - 3281: "sysopt", - 3282: "datusorb", - 3283: "Apple Remote Desktop (Net Assistant)", - 3284: "4talk", - 3285: "plato", - 3286: "e-net", - 3287: "directvdata", - 3288: "cops", - 3289: "enpc", - 3290: "caps-lm", - 3291: "sah-lm", - 3292: "cart-o-rama", - 3293: "fg-fps", - 3294: "fg-gip", - 3295: "dyniplookup", - 3296: "rib-slm", - 3297: "cytel-lm", - 3298: "deskview", - 3299: "pdrncs", - 3300: "ceph", - 3302: "mcs-fastmail", - 3303: "opsession-clnt", - 3304: "opsession-srvr", - 3305: "odette-ftp", - 3306: "mysql", - 3307: "opsession-prxy", - 3308: "tns-server", - 3309: "tns-adv", - 3310: "dyna-access", - 3311: "mcns-tel-ret", - 3312: "appman-server", - 3313: "uorb", - 3314: "uohost", - 3315: "cdid", - 3316: "aicc-cmi", - 3317: "vsaiport", - 3318: "ssrip", - 3319: "sdt-lmd", - 3320: "officelink2000", - 3321: "vnsstr", - 3326: "sftu", - 3327: "bbars", - 3328: "egptlm", - 3329: "hp-device-disc", - 3330: "mcs-calypsoicf", - 3331: "mcs-messaging", - 3332: "mcs-mailsvr", - 3333: "dec-notes", - 3334: "directv-web", - 3335: "directv-soft", - 3336: "directv-tick", - 3337: "directv-catlg", - 3338: "anet-b", - 3339: "anet-l", - 3340: "anet-m", - 3341: "anet-h", - 3342: "webtie", - 3343: "ms-cluster-net", - 3344: "bnt-manager", - 3345: "influence", - 3346: "trnsprntproxy", - 3347: "phoenix-rpc", - 3348: "pangolin-laser", - 3349: "chevinservices", - 3350: "findviatv", - 3351: "btrieve", - 3352: "ssql", - 3353: "fatpipe", - 3354: "suitjd", - 3355: "ordinox-dbase", - 3356: "upnotifyps", - 3357: "adtech-test", - 3358: "mpsysrmsvr", - 3359: "wg-netforce", - 3360: "kv-server", - 3361: "kv-agent", - 3362: "dj-ilm", - 3363: "nati-vi-server", - 3364: "creativeserver", - 3365: "contentserver", - 3366: "creativepartnr", - 3372: "tip2", - 3373: "lavenir-lm", - 3374: "cluster-disc", - 3375: "vsnm-agent", - 3376: "cdbroker", - 3377: "cogsys-lm", - 3378: "wsicopy", - 3379: "socorfs", - 3380: "sns-channels", - 3381: "geneous", - 3382: "fujitsu-neat", - 3383: "esp-lm", - 3384: "hp-clic", - 3385: "qnxnetman", - 3386: "gprs-data", - 3387: "backroomnet", - 3388: "cbserver", - 3389: "ms-wbt-server", - 3390: "dsc", - 3391: "savant", - 3392: "efi-lm", - 3393: "d2k-tapestry1", - 3394: "d2k-tapestry2", - 3395: "dyna-lm", - 3396: "printer-agent", - 3397: "cloanto-lm", - 3398: "mercantile", - 3399: "csms", - 3400: "csms2", - 3401: "filecast", - 3402: "fxaengine-net", - 3405: "nokia-ann-ch1", - 3406: "nokia-ann-ch2", - 3407: "ldap-admin", - 3408: "BESApi", - 3409: "networklens", - 3410: "networklenss", - 3411: "biolink-auth", - 3412: "xmlblaster", - 3413: "svnet", - 3414: "wip-port", - 3415: "bcinameservice", - 3416: "commandport", - 3417: "csvr", - 3418: "rnmap", - 3419: "softaudit", - 3420: "ifcp-port", - 3421: "bmap", - 3422: "rusb-sys-port", - 3423: "xtrm", - 3424: "xtrms", - 3425: "agps-port", - 3426: "arkivio", - 3427: "websphere-snmp", - 3428: "twcss", - 3429: "gcsp", - 3430: "ssdispatch", - 3431: "ndl-als", - 3432: "osdcp", - 3433: "opnet-smp", - 3434: "opencm", - 3435: "pacom", - 3436: "gc-config", - 3437: "autocueds", - 3438: "spiral-admin", - 3439: "hri-port", - 3440: "ans-console", - 3441: "connect-client", - 3442: "connect-server", - 3443: "ov-nnm-websrv", - 3444: "denali-server", - 3445: "monp", - 3446: "3comfaxrpc", - 3447: "directnet", - 3448: "dnc-port", - 3449: "hotu-chat", - 3450: "castorproxy", - 3451: "asam", - 3452: "sabp-signal", - 3453: "pscupd", - 3454: "mira", - 3455: "prsvp", - 3456: "vat", - 3457: "vat-control", - 3458: "d3winosfi", - 3459: "integral", - 3460: "edm-manager", - 3461: "edm-stager", - 3462: "edm-std-notify", - 3463: "edm-adm-notify", - 3464: "edm-mgr-sync", - 3465: "edm-mgr-cntrl", - 3466: "workflow", - 3467: "rcst", - 3468: "ttcmremotectrl", - 3469: "pluribus", - 3470: "jt400", - 3471: "jt400-ssl", - 3472: "jaugsremotec-1", - 3473: "jaugsremotec-2", - 3474: "ttntspauto", - 3475: "genisar-port", - 3476: "nppmp", - 3477: "ecomm", - 3478: "stun", - 3479: "twrpc", - 3480: "plethora", - 3481: "cleanerliverc", - 3482: "vulture", - 3483: "slim-devices", - 3484: "gbs-stp", - 3485: "celatalk", - 3486: "ifsf-hb-port", - 3487: "ltctcp", - 3488: "fs-rh-srv", - 3489: "dtp-dia", - 3490: "colubris", - 3491: "swr-port", - 3492: "tvdumtray-port", - 3493: "nut", - 3494: "ibm3494", - 3495: "seclayer-tcp", - 3496: "seclayer-tls", - 3497: "ipether232port", - 3498: "dashpas-port", - 3499: "sccip-media", - 3500: "rtmp-port", - 3501: "isoft-p2p", - 3502: "avinstalldisc", - 3503: "lsp-ping", - 3504: "ironstorm", - 3505: "ccmcomm", - 3506: "apc-3506", - 3507: "nesh-broker", - 3508: "interactionweb", - 3509: "vt-ssl", - 3510: "xss-port", - 3511: "webmail-2", - 3512: "aztec", - 3513: "arcpd", - 3514: "must-p2p", - 3515: "must-backplane", - 3516: "smartcard-port", - 3517: "802-11-iapp", - 3518: "artifact-msg", - 3519: "nvmsgd", - 3520: "galileolog", - 3521: "mc3ss", - 3522: "nssocketport", - 3523: "odeumservlink", - 3524: "ecmport", - 3525: "eisport", - 3526: "starquiz-port", - 3527: "beserver-msg-q", - 3528: "jboss-iiop", - 3529: "jboss-iiop-ssl", - 3530: "gf", - 3531: "joltid", - 3532: "raven-rmp", - 3533: "raven-rdp", - 3534: "urld-port", - 3535: "ms-la", - 3536: "snac", - 3537: "ni-visa-remote", - 3538: "ibm-diradm", - 3539: "ibm-diradm-ssl", - 3540: "pnrp-port", - 3541: "voispeed-port", - 3542: "hacl-monitor", - 3543: "qftest-lookup", - 3544: "teredo", - 3545: "camac", - 3547: "symantec-sim", - 3548: "interworld", - 3549: "tellumat-nms", - 3550: "ssmpp", - 3551: "apcupsd", - 3552: "taserver", - 3553: "rbr-discovery", - 3554: "questnotify", - 3555: "razor", - 3556: "sky-transport", - 3557: "personalos-001", - 3558: "mcp-port", - 3559: "cctv-port", - 3560: "iniserve-port", - 3561: "bmc-onekey", - 3562: "sdbproxy", - 3563: "watcomdebug", - 3564: "esimport", - 3565: "m2pa", - 3566: "quest-data-hub", - 3567: "dof-eps", - 3568: "dof-tunnel-sec", - 3569: "mbg-ctrl", - 3570: "mccwebsvr-port", - 3571: "megardsvr-port", - 3572: "megaregsvrport", - 3573: "tag-ups-1", - 3574: "dmaf-server", - 3575: "ccm-port", - 3576: "cmc-port", - 3577: "config-port", - 3578: "data-port", - 3579: "ttat3lb", - 3580: "nati-svrloc", - 3581: "kfxaclicensing", - 3582: "press", - 3583: "canex-watch", - 3584: "u-dbap", - 3585: "emprise-lls", - 3586: "emprise-lsc", - 3587: "p2pgroup", - 3588: "sentinel", - 3589: "isomair", - 3590: "wv-csp-sms", - 3591: "gtrack-server", - 3592: "gtrack-ne", - 3593: "bpmd", - 3594: "mediaspace", - 3595: "shareapp", - 3596: "iw-mmogame", - 3597: "a14", - 3598: "a15", - 3599: "quasar-server", - 3600: "trap-daemon", - 3601: "visinet-gui", - 3602: "infiniswitchcl", - 3603: "int-rcv-cntrl", - 3604: "bmc-jmx-port", - 3605: "comcam-io", - 3606: "splitlock", - 3607: "precise-i3", - 3608: "trendchip-dcp", - 3609: "cpdi-pidas-cm", - 3610: "echonet", - 3611: "six-degrees", - 3612: "hp-dataprotect", - 3613: "alaris-disc", - 3614: "sigma-port", - 3615: "start-network", - 3616: "cd3o-protocol", - 3617: "sharp-server", - 3618: "aairnet-1", - 3619: "aairnet-2", - 3620: "ep-pcp", - 3621: "ep-nsp", - 3622: "ff-lr-port", - 3623: "haipe-discover", - 3624: "dist-upgrade", - 3625: "volley", - 3626: "bvcdaemon-port", - 3627: "jamserverport", - 3628: "ept-machine", - 3629: "escvpnet", - 3630: "cs-remote-db", - 3631: "cs-services", - 3632: "distcc", - 3633: "wacp", - 3634: "hlibmgr", - 3635: "sdo", - 3636: "servistaitsm", - 3637: "scservp", - 3638: "ehp-backup", - 3639: "xap-ha", - 3640: "netplay-port1", - 3641: "netplay-port2", - 3642: "juxml-port", - 3643: "audiojuggler", - 3644: "ssowatch", - 3645: "cyc", - 3646: "xss-srv-port", - 3647: "splitlock-gw", - 3648: "fjcp", - 3649: "nmmp", - 3650: "prismiq-plugin", - 3651: "xrpc-registry", - 3652: "vxcrnbuport", - 3653: "tsp", - 3654: "vaprtm", - 3655: "abatemgr", - 3656: "abatjss", - 3657: "immedianet-bcn", - 3658: "ps-ams", - 3659: "apple-sasl", - 3660: "can-nds-ssl", - 3661: "can-ferret-ssl", - 3662: "pserver", - 3663: "dtp", - 3664: "ups-engine", - 3665: "ent-engine", - 3666: "eserver-pap", - 3667: "infoexch", - 3668: "dell-rm-port", - 3669: "casanswmgmt", - 3670: "smile", - 3671: "efcp", - 3672: "lispworks-orb", - 3673: "mediavault-gui", - 3674: "wininstall-ipc", - 3675: "calltrax", - 3676: "va-pacbase", - 3677: "roverlog", - 3678: "ipr-dglt", - 3679: "Escale (Newton Dock)", - 3680: "npds-tracker", - 3681: "bts-x73", - 3682: "cas-mapi", - 3683: "bmc-ea", - 3684: "faxstfx-port", - 3685: "dsx-agent", - 3686: "tnmpv2", - 3687: "simple-push", - 3688: "simple-push-s", - 3689: "daap", - 3690: "svn", - 3691: "magaya-network", - 3692: "intelsync", - 3693: "easl", - 3695: "bmc-data-coll", - 3696: "telnetcpcd", - 3697: "nw-license", - 3698: "sagectlpanel", - 3699: "kpn-icw", - 3700: "lrs-paging", - 3701: "netcelera", - 3702: "ws-discovery", - 3703: "adobeserver-3", - 3704: "adobeserver-4", - 3705: "adobeserver-5", - 3706: "rt-event", - 3707: "rt-event-s", - 3708: "sun-as-iiops", - 3709: "ca-idms", - 3710: "portgate-auth", - 3711: "edb-server2", - 3712: "sentinel-ent", - 3713: "tftps", - 3714: "delos-dms", - 3715: "anoto-rendezv", - 3716: "wv-csp-sms-cir", - 3717: "wv-csp-udp-cir", - 3718: "opus-services", - 3719: "itelserverport", - 3720: "ufastro-instr", - 3721: "xsync", - 3722: "xserveraid", - 3723: "sychrond", - 3724: "blizwow", - 3725: "na-er-tip", - 3726: "array-manager", - 3727: "e-mdu", - 3728: "e-woa", - 3729: "fksp-audit", - 3730: "client-ctrl", - 3731: "smap", - 3732: "m-wnn", - 3733: "multip-msg", - 3734: "synel-data", - 3735: "pwdis", - 3736: "rs-rmi", - 3737: "xpanel", - 3738: "versatalk", - 3739: "launchbird-lm", - 3740: "heartbeat", - 3741: "wysdma", - 3742: "cst-port", - 3743: "ipcs-command", - 3744: "sasg", - 3745: "gw-call-port", - 3746: "linktest", - 3747: "linktest-s", - 3748: "webdata", - 3749: "cimtrak", - 3750: "cbos-ip-port", - 3751: "gprs-cube", - 3752: "vipremoteagent", - 3753: "nattyserver", - 3754: "timestenbroker", - 3755: "sas-remote-hlp", - 3756: "canon-capt", - 3757: "grf-port", - 3758: "apw-registry", - 3759: "exapt-lmgr", - 3760: "adtempusclient", - 3761: "gsakmp", - 3762: "gbs-smp", - 3763: "xo-wave", - 3764: "mni-prot-rout", - 3765: "rtraceroute", - 3766: "sitewatch-s", - 3767: "listmgr-port", - 3768: "rblcheckd", - 3769: "haipe-otnk", - 3770: "cindycollab", - 3771: "paging-port", - 3772: "ctp", - 3773: "ctdhercules", - 3774: "zicom", - 3775: "ispmmgr", - 3776: "dvcprov-port", - 3777: "jibe-eb", - 3778: "c-h-it-port", - 3779: "cognima", - 3780: "nnp", - 3781: "abcvoice-port", - 3782: "iso-tp0s", - 3783: "bim-pem", - 3784: "bfd-control", - 3785: "bfd-echo", - 3786: "upstriggervsw", - 3787: "fintrx", - 3788: "isrp-port", - 3789: "remotedeploy", - 3790: "quickbooksrds", - 3791: "tvnetworkvideo", - 3792: "sitewatch", - 3793: "dcsoftware", - 3794: "jaus", - 3795: "myblast", - 3796: "spw-dialer", - 3797: "idps", - 3798: "minilock", - 3799: "radius-dynauth", - 3800: "pwgpsi", - 3801: "ibm-mgr", - 3802: "vhd", - 3803: "soniqsync", - 3804: "iqnet-port", - 3805: "tcpdataserver", - 3806: "wsmlb", - 3807: "spugna", - 3808: "sun-as-iiops-ca", - 3809: "apocd", - 3810: "wlanauth", - 3811: "amp", - 3812: "neto-wol-server", - 3813: "rap-ip", - 3814: "neto-dcs", - 3815: "lansurveyorxml", - 3816: "sunlps-http", - 3817: "tapeware", - 3818: "crinis-hb", - 3819: "epl-slp", - 3820: "scp", - 3821: "pmcp", - 3822: "acp-discovery", - 3823: "acp-conduit", - 3824: "acp-policy", - 3825: "ffserver", - 3826: "warmux", - 3827: "netmpi", - 3828: "neteh", - 3829: "neteh-ext", - 3830: "cernsysmgmtagt", - 3831: "dvapps", - 3832: "xxnetserver", - 3833: "aipn-auth", - 3834: "spectardata", - 3835: "spectardb", - 3836: "markem-dcp", - 3837: "mkm-discovery", - 3838: "sos", - 3839: "amx-rms", - 3840: "flirtmitmir", - 3841: "shiprush-db-svr", - 3842: "nhci", - 3843: "quest-agent", - 3844: "rnm", - 3845: "v-one-spp", - 3846: "an-pcp", - 3847: "msfw-control", - 3848: "item", - 3849: "spw-dnspreload", - 3850: "qtms-bootstrap", - 3851: "spectraport", - 3852: "sse-app-config", - 3853: "sscan", - 3854: "stryker-com", - 3855: "opentrac", - 3856: "informer", - 3857: "trap-port", - 3858: "trap-port-mom", - 3859: "nav-port", - 3860: "sasp", - 3861: "winshadow-hd", - 3862: "giga-pocket", - 3863: "asap-tcp", - 3864: "asap-tcp-tls", - 3865: "xpl", - 3866: "dzdaemon", - 3867: "dzoglserver", - 3868: "diameter", - 3869: "ovsam-mgmt", - 3870: "ovsam-d-agent", - 3871: "avocent-adsap", - 3872: "oem-agent", - 3873: "fagordnc", - 3874: "sixxsconfig", - 3875: "pnbscada", - 3876: "dl-agent", - 3877: "xmpcr-interface", - 3878: "fotogcad", - 3879: "appss-lm", - 3880: "igrs", - 3881: "idac", - 3882: "msdts1", - 3883: "vrpn", - 3884: "softrack-meter", - 3885: "topflow-ssl", - 3886: "nei-management", - 3887: "ciphire-data", - 3888: "ciphire-serv", - 3889: "dandv-tester", - 3890: "ndsconnect", - 3891: "rtc-pm-port", - 3892: "pcc-image-port", - 3893: "cgi-starapi", - 3894: "syam-agent", - 3895: "syam-smc", - 3896: "sdo-tls", - 3897: "sdo-ssh", - 3898: "senip", - 3899: "itv-control", - 3900: "udt-os", - 3901: "nimsh", - 3902: "nimaux", - 3903: "charsetmgr", - 3904: "omnilink-port", - 3905: "mupdate", - 3906: "topovista-data", - 3907: "imoguia-port", - 3908: "hppronetman", - 3909: "surfcontrolcpa", - 3910: "prnrequest", - 3911: "prnstatus", - 3912: "gbmt-stars", - 3913: "listcrt-port", - 3914: "listcrt-port-2", - 3915: "agcat", - 3916: "wysdmc", - 3917: "aftmux", - 3918: "pktcablemmcops", - 3919: "hyperip", - 3920: "exasoftport1", - 3921: "herodotus-net", - 3922: "sor-update", - 3923: "symb-sb-port", - 3924: "mpl-gprs-port", - 3925: "zmp", - 3926: "winport", - 3927: "natdataservice", - 3928: "netboot-pxe", - 3929: "smauth-port", - 3930: "syam-webserver", - 3931: "msr-plugin-port", - 3932: "dyn-site", - 3933: "plbserve-port", - 3934: "sunfm-port", - 3935: "sdp-portmapper", - 3936: "mailprox", - 3937: "dvbservdsc", - 3938: "dbcontrol-agent", - 3939: "aamp", - 3940: "xecp-node", - 3941: "homeportal-web", - 3942: "srdp", - 3943: "tig", - 3944: "sops", - 3945: "emcads", - 3946: "backupedge", - 3947: "ccp", - 3948: "apdap", - 3949: "drip", - 3950: "namemunge", - 3951: "pwgippfax", - 3952: "i3-sessionmgr", - 3953: "xmlink-connect", - 3954: "adrep", - 3955: "p2pcommunity", - 3956: "gvcp", - 3957: "mqe-broker", - 3958: "mqe-agent", - 3959: "treehopper", - 3960: "bess", - 3961: "proaxess", - 3962: "sbi-agent", - 3963: "thrp", - 3964: "sasggprs", - 3965: "ati-ip-to-ncpe", - 3966: "bflckmgr", - 3967: "ppsms", - 3968: "ianywhere-dbns", - 3969: "landmarks", - 3970: "lanrevagent", - 3971: "lanrevserver", - 3972: "iconp", - 3973: "progistics", - 3974: "citysearch", - 3975: "airshot", - 3976: "opswagent", - 3977: "opswmanager", - 3978: "secure-cfg-svr", - 3979: "smwan", - 3980: "acms", - 3981: "starfish", - 3982: "eis", - 3983: "eisp", - 3984: "mapper-nodemgr", - 3985: "mapper-mapethd", - 3986: "mapper-ws-ethd", - 3987: "centerline", - 3988: "dcs-config", - 3989: "bv-queryengine", - 3990: "bv-is", - 3991: "bv-smcsrv", - 3992: "bv-ds", - 3993: "bv-agent", - 3995: "iss-mgmt-ssl", - 3996: "abcsoftware", - 3997: "agentsease-db", - 3998: "dnx", - 3999: "nvcnet", - 4000: "terabase", - 4001: "newoak", - 4002: "pxc-spvr-ft", - 4003: "pxc-splr-ft", - 4004: "pxc-roid", - 4005: "pxc-pin", - 4006: "pxc-spvr", - 4007: "pxc-splr", - 4008: "netcheque", - 4009: "chimera-hwm", - 4010: "samsung-unidex", - 4011: "altserviceboot", - 4012: "pda-gate", - 4013: "acl-manager", - 4014: "taiclock", - 4015: "talarian-mcast1", - 4016: "talarian-mcast2", - 4017: "talarian-mcast3", - 4018: "talarian-mcast4", - 4019: "talarian-mcast5", - 4020: "trap", - 4021: "nexus-portal", - 4022: "dnox", - 4023: "esnm-zoning", - 4024: "tnp1-port", - 4025: "partimage", - 4026: "as-debug", - 4027: "bxp", - 4028: "dtserver-port", - 4029: "ip-qsig", - 4030: "jdmn-port", - 4031: "suucp", - 4032: "vrts-auth-port", - 4033: "sanavigator", - 4034: "ubxd", - 4035: "wap-push-http", - 4036: "wap-push-https", - 4037: "ravehd", - 4038: "fazzt-ptp", - 4039: "fazzt-admin", - 4040: "yo-main", - 4041: "houston", - 4042: "ldxp", - 4043: "nirp", - 4044: "ltp", - 4045: "npp", - 4046: "acp-proto", - 4047: "ctp-state", - 4049: "wafs", - 4050: "cisco-wafs", - 4051: "cppdp", - 4052: "interact", - 4053: "ccu-comm-1", - 4054: "ccu-comm-2", - 4055: "ccu-comm-3", - 4056: "lms", - 4057: "wfm", - 4058: "kingfisher", - 4059: "dlms-cosem", - 4060: "dsmeter-iatc", - 4061: "ice-location", - 4062: "ice-slocation", - 4063: "ice-router", - 4064: "ice-srouter", - 4065: "avanti-cdp", - 4066: "pmas", - 4067: "idp", - 4068: "ipfltbcst", - 4069: "minger", - 4070: "tripe", - 4071: "aibkup", - 4072: "zieto-sock", - 4073: "iRAPP", - 4074: "cequint-cityid", - 4075: "perimlan", - 4076: "seraph", - 4078: "cssp", - 4079: "santools", - 4080: "lorica-in", - 4081: "lorica-in-sec", - 4082: "lorica-out", - 4083: "lorica-out-sec", - 4085: "ezmessagesrv", - 4087: "applusservice", - 4088: "npsp", - 4089: "opencore", - 4090: "omasgport", - 4091: "ewinstaller", - 4092: "ewdgs", - 4093: "pvxpluscs", - 4094: "sysrqd", - 4095: "xtgui", - 4096: "bre", - 4097: "patrolview", - 4098: "drmsfsd", - 4099: "dpcp", - 4100: "igo-incognito", - 4101: "brlp-0", - 4102: "brlp-1", - 4103: "brlp-2", - 4104: "brlp-3", - 4105: "shofar", - 4106: "synchronite", - 4107: "j-ac", - 4108: "accel", - 4109: "izm", - 4110: "g2tag", - 4111: "xgrid", - 4112: "apple-vpns-rp", - 4113: "aipn-reg", - 4114: "jomamqmonitor", - 4115: "cds", - 4116: "smartcard-tls", - 4117: "hillrserv", - 4118: "netscript", - 4119: "assuria-slm", - 4120: "minirem", - 4121: "e-builder", - 4122: "fprams", - 4123: "z-wave", - 4124: "tigv2", - 4125: "opsview-envoy", - 4126: "ddrepl", - 4127: "unikeypro", - 4128: "nufw", - 4129: "nuauth", - 4130: "fronet", - 4131: "stars", - 4132: "nuts-dem", - 4133: "nuts-bootp", - 4134: "nifty-hmi", - 4135: "cl-db-attach", - 4136: "cl-db-request", - 4137: "cl-db-remote", - 4138: "nettest", - 4139: "thrtx", - 4140: "cedros-fds", - 4141: "oirtgsvc", - 4142: "oidocsvc", - 4143: "oidsr", - 4145: "vvr-control", - 4146: "tgcconnect", - 4147: "vrxpservman", - 4148: "hhb-handheld", - 4149: "agslb", - 4150: "PowerAlert-nsa", - 4151: "menandmice-noh", - 4152: "idig-mux", - 4153: "mbl-battd", - 4154: "atlinks", - 4155: "bzr", - 4156: "stat-results", - 4157: "stat-scanner", - 4158: "stat-cc", - 4159: "nss", - 4160: "jini-discovery", - 4161: "omscontact", - 4162: "omstopology", - 4163: "silverpeakpeer", - 4164: "silverpeakcomm", - 4165: "altcp", - 4166: "joost", - 4167: "ddgn", - 4168: "pslicser", - 4169: "iadt", - 4170: "d-cinema-csp", - 4171: "ml-svnet", - 4172: "pcoip", - 4174: "smcluster", - 4175: "bccp", - 4176: "tl-ipcproxy", - 4177: "wello", - 4178: "storman", - 4179: "MaxumSP", - 4180: "httpx", - 4181: "macbak", - 4182: "pcptcpservice", - 4183: "cyborgnet", - 4184: "universe-suite", - 4185: "wcpp", - 4186: "boxbackupstore", - 4187: "csc-proxy", - 4188: "vatata", - 4189: "pcep", - 4190: "sieve", - 4192: "azeti", - 4193: "pvxplusio", - 4197: "hctl", - 4199: "eims-admin", - 4300: "corelccam", - 4301: "d-data", - 4302: "d-data-control", - 4303: "srcp", - 4304: "owserver", - 4305: "batman", - 4306: "pinghgl", - 4307: "trueconf", - 4308: "compx-lockview", - 4309: "dserver", - 4310: "mirrtex", - 4311: "p6ssmc", - 4312: "pscl-mgt", - 4313: "perrla", - 4314: "choiceview-agt", - 4316: "choiceview-clt", - 4320: "fdt-rcatp", - 4321: "rwhois", - 4322: "trim-event", - 4323: "trim-ice", - 4325: "geognosisman", - 4326: "geognosis", - 4327: "jaxer-web", - 4328: "jaxer-manager", - 4329: "publiqare-sync", - 4330: "dey-sapi", - 4331: "ktickets-rest", - 4333: "ahsp", - 4334: "netconf-ch-ssh", - 4335: "netconf-ch-tls", - 4336: "restconf-ch-tls", - 4340: "gaia", - 4341: "lisp-data", - 4342: "lisp-cons", - 4343: "unicall", - 4344: "vinainstall", - 4345: "m4-network-as", - 4346: "elanlm", - 4347: "lansurveyor", - 4348: "itose", - 4349: "fsportmap", - 4350: "net-device", - 4351: "plcy-net-svcs", - 4352: "pjlink", - 4353: "f5-iquery", - 4354: "qsnet-trans", - 4355: "qsnet-workst", - 4356: "qsnet-assist", - 4357: "qsnet-cond", - 4358: "qsnet-nucl", - 4359: "omabcastltkm", - 4360: "matrix-vnet", - 4368: "wxbrief", - 4369: "epmd", - 4370: "elpro-tunnel", - 4371: "l2c-control", - 4372: "l2c-data", - 4373: "remctl", - 4374: "psi-ptt", - 4375: "tolteces", - 4376: "bip", - 4377: "cp-spxsvr", - 4378: "cp-spxdpy", - 4379: "ctdb", - 4389: "xandros-cms", - 4390: "wiegand", - 4391: "apwi-imserver", - 4392: "apwi-rxserver", - 4393: "apwi-rxspooler", - 4395: "omnivisionesx", - 4396: "fly", - 4400: "ds-srv", - 4401: "ds-srvr", - 4402: "ds-clnt", - 4403: "ds-user", - 4404: "ds-admin", - 4405: "ds-mail", - 4406: "ds-slp", - 4407: "nacagent", - 4408: "slscc", - 4409: "netcabinet-com", - 4410: "itwo-server", - 4411: "found", - 4413: "avi-nms", - 4414: "updog", - 4415: "brcd-vr-req", - 4416: "pjj-player", - 4417: "workflowdir", - 4419: "cbp", - 4420: "nvm-express", - 4421: "scaleft", - 4422: "tsepisp", - 4423: "thingkit", - 4425: "netrockey6", - 4426: "beacon-port-2", - 4427: "drizzle", - 4428: "omviserver", - 4429: "omviagent", - 4430: "rsqlserver", - 4431: "wspipe", - 4432: "l-acoustics", - 4433: "vop", - 4442: "saris", - 4443: "pharos", - 4444: "krb524", - 4445: "upnotifyp", - 4446: "n1-fwp", - 4447: "n1-rmgmt", - 4448: "asc-slmd", - 4449: "privatewire", - 4450: "camp", - 4451: "ctisystemmsg", - 4452: "ctiprogramload", - 4453: "nssalertmgr", - 4454: "nssagentmgr", - 4455: "prchat-user", - 4456: "prchat-server", - 4457: "prRegister", - 4458: "mcp", - 4484: "hpssmgmt", - 4485: "assyst-dr", - 4486: "icms", - 4487: "prex-tcp", - 4488: "awacs-ice", - 4500: "ipsec-nat-t", - 4535: "ehs", - 4536: "ehs-ssl", - 4537: "wssauthsvc", - 4538: "swx-gate", - 4545: "worldscores", - 4546: "sf-lm", - 4547: "lanner-lm", - 4548: "synchromesh", - 4549: "aegate", - 4550: "gds-adppiw-db", - 4551: "ieee-mih", - 4552: "menandmice-mon", - 4553: "icshostsvc", - 4554: "msfrs", - 4555: "rsip", - 4556: "dtn-bundle", - 4559: "hylafax", - 4563: "amahi-anywhere", - 4566: "kwtc", - 4567: "tram", - 4568: "bmc-reporting", - 4569: "iax", - 4570: "deploymentmap", - 4573: "cardifftec-back", - 4590: "rid", - 4591: "l3t-at-an", - 4593: "ipt-anri-anri", - 4594: "ias-session", - 4595: "ias-paging", - 4596: "ias-neighbor", - 4597: "a21-an-1xbs", - 4598: "a16-an-an", - 4599: "a17-an-an", - 4600: "piranha1", - 4601: "piranha2", - 4602: "mtsserver", - 4603: "menandmice-upg", - 4604: "irp", - 4605: "sixchat", - 4658: "playsta2-app", - 4659: "playsta2-lob", - 4660: "smaclmgr", - 4661: "kar2ouche", - 4662: "oms", - 4663: "noteit", - 4664: "ems", - 4665: "contclientms", - 4666: "eportcomm", - 4667: "mmacomm", - 4668: "mmaeds", - 4669: "eportcommdata", - 4670: "light", - 4671: "acter", - 4672: "rfa", - 4673: "cxws", - 4674: "appiq-mgmt", - 4675: "dhct-status", - 4676: "dhct-alerts", - 4677: "bcs", - 4678: "traversal", - 4679: "mgesupervision", - 4680: "mgemanagement", - 4681: "parliant", - 4682: "finisar", - 4683: "spike", - 4684: "rfid-rp1", - 4685: "autopac", - 4686: "msp-os", - 4687: "nst", - 4688: "mobile-p2p", - 4689: "altovacentral", - 4690: "prelude", - 4691: "mtn", - 4692: "conspiracy", - 4700: "netxms-agent", - 4701: "netxms-mgmt", - 4702: "netxms-sync", - 4703: "npqes-test", - 4704: "assuria-ins", - 4711: "trinity-dist", - 4725: "truckstar", - 4727: "fcis", - 4728: "capmux", - 4730: "gearman", - 4731: "remcap", - 4733: "resorcs", - 4737: "ipdr-sp", - 4738: "solera-lpn", - 4739: "ipfix", - 4740: "ipfixs", - 4741: "lumimgrd", - 4742: "sicct", - 4743: "openhpid", - 4744: "ifsp", - 4745: "fmp", - 4749: "profilemac", - 4750: "ssad", - 4751: "spocp", - 4752: "snap", - 4753: "simon", - 4756: "RDCenter", - 4774: "converge", - 4784: "bfd-multi-ctl", - 4786: "smart-install", - 4787: "sia-ctrl-plane", - 4788: "xmcp", - 4800: "iims", - 4801: "iwec", - 4802: "ilss", - 4803: "notateit", - 4827: "htcp", - 4837: "varadero-0", - 4838: "varadero-1", - 4839: "varadero-2", - 4840: "opcua-tcp", - 4841: "quosa", - 4842: "gw-asv", - 4843: "opcua-tls", - 4844: "gw-log", - 4845: "wcr-remlib", - 4846: "contamac-icm", - 4847: "wfc", - 4848: "appserv-http", - 4849: "appserv-https", - 4850: "sun-as-nodeagt", - 4851: "derby-repli", - 4867: "unify-debug", - 4868: "phrelay", - 4869: "phrelaydbg", - 4870: "cc-tracking", - 4871: "wired", - 4876: "tritium-can", - 4877: "lmcs", - 4879: "wsdl-event", - 4880: "hislip", - 4883: "wmlserver", - 4884: "hivestor", - 4885: "abbs", - 4894: "lyskom", - 4899: "radmin-port", - 4900: "hfcs", - 4901: "flr-agent", - 4902: "magiccontrol", - 4912: "lutap", - 4913: "lutcp", - 4914: "bones", - 4915: "frcs", - 4940: "eq-office-4940", - 4941: "eq-office-4941", - 4942: "eq-office-4942", - 4949: "munin", - 4950: "sybasesrvmon", - 4951: "pwgwims", - 4952: "sagxtsds", - 4953: "dbsyncarbiter", - 4969: "ccss-qmm", - 4970: "ccss-qsm", - 4971: "burp", - 4984: "webyast", - 4985: "gerhcs", - 4986: "mrip", - 4987: "smar-se-port1", - 4988: "smar-se-port2", - 4989: "parallel", - 4990: "busycal", - 4991: "vrt", - 4999: "hfcs-manager", - 5000: "commplex-main", - 5001: "commplex-link", - 5002: "rfe", - 5003: "fmpro-internal", - 5004: "avt-profile-1", - 5005: "avt-profile-2", - 5006: "wsm-server", - 5007: "wsm-server-ssl", - 5008: "synapsis-edge", - 5009: "winfs", - 5010: "telelpathstart", - 5011: "telelpathattack", - 5012: "nsp", - 5013: "fmpro-v6", - 5015: "fmwp", - 5020: "zenginkyo-1", - 5021: "zenginkyo-2", - 5022: "mice", - 5023: "htuilsrv", - 5024: "scpi-telnet", - 5025: "scpi-raw", - 5026: "strexec-d", - 5027: "strexec-s", - 5028: "qvr", - 5029: "infobright", - 5030: "surfpass", - 5032: "signacert-agent", - 5033: "jtnetd-server", - 5034: "jtnetd-status", - 5042: "asnaacceler8db", - 5043: "swxadmin", - 5044: "lxi-evntsvc", - 5045: "osp", - 5048: "texai", - 5049: "ivocalize", - 5050: "mmcc", - 5051: "ita-agent", - 5052: "ita-manager", - 5053: "rlm", - 5054: "rlm-admin", - 5055: "unot", - 5056: "intecom-ps1", - 5057: "intecom-ps2", - 5059: "sds", - 5060: "sip", - 5061: "sips", - 5062: "na-localise", - 5063: "csrpc", - 5064: "ca-1", - 5065: "ca-2", - 5066: "stanag-5066", - 5067: "authentx", - 5068: "bitforestsrv", - 5069: "i-net-2000-npr", - 5070: "vtsas", - 5071: "powerschool", - 5072: "ayiya", - 5073: "tag-pm", - 5074: "alesquery", - 5075: "pvaccess", - 5080: "onscreen", - 5081: "sdl-ets", - 5082: "qcp", - 5083: "qfp", - 5084: "llrp", - 5085: "encrypted-llrp", - 5086: "aprigo-cs", - 5087: "biotic", - 5093: "sentinel-lm", - 5094: "hart-ip", - 5099: "sentlm-srv2srv", - 5100: "socalia", - 5101: "talarian-tcp", - 5102: "oms-nonsecure", - 5103: "actifio-c2c", - 5106: "actifioudsagent", - 5107: "actifioreplic", - 5111: "taep-as-svc", - 5112: "pm-cmdsvr", - 5114: "ev-services", - 5115: "autobuild", - 5117: "gradecam", - 5120: "barracuda-bbs", - 5133: "nbt-pc", - 5134: "ppactivation", - 5135: "erp-scale", - 5137: "ctsd", - 5145: "rmonitor-secure", - 5146: "social-alarm", - 5150: "atmp", - 5151: "esri-sde", - 5152: "sde-discovery", - 5153: "toruxserver", - 5154: "bzflag", - 5155: "asctrl-agent", - 5156: "rugameonline", - 5157: "mediat", - 5161: "snmpssh", - 5162: "snmpssh-trap", - 5163: "sbackup", - 5164: "vpa", - 5165: "ife-icorp", - 5166: "winpcs", - 5167: "scte104", - 5168: "scte30", - 5172: "pcoip-mgmt", - 5190: "aol", - 5191: "aol-1", - 5192: "aol-2", - 5193: "aol-3", - 5194: "cpscomm", - 5195: "ampl-lic", - 5196: "ampl-tableproxy", - 5197: "tunstall-lwp", - 5200: "targus-getdata", - 5201: "targus-getdata1", - 5202: "targus-getdata2", - 5203: "targus-getdata3", - 5209: "nomad", - 5215: "noteza", - 5221: "3exmp", - 5222: "xmpp-client", - 5223: "hpvirtgrp", - 5224: "hpvirtctrl", - 5225: "hp-server", - 5226: "hp-status", - 5227: "perfd", - 5228: "hpvroom", - 5229: "jaxflow", - 5230: "jaxflow-data", - 5231: "crusecontrol", - 5232: "csedaemon", - 5233: "enfs", - 5234: "eenet", - 5235: "galaxy-network", - 5236: "padl2sim", - 5237: "mnet-discovery", - 5245: "downtools", - 5248: "caacws", - 5249: "caaclang2", - 5250: "soagateway", - 5251: "caevms", - 5252: "movaz-ssc", - 5253: "kpdp", - 5254: "logcabin", - 5264: "3com-njack-1", - 5265: "3com-njack-2", - 5269: "xmpp-server", - 5270: "cartographerxmp", - 5271: "cuelink", - 5272: "pk", - 5280: "xmpp-bosh", - 5281: "undo-lm", - 5282: "transmit-port", - 5298: "presence", - 5299: "nlg-data", - 5300: "hacl-hb", - 5301: "hacl-gs", - 5302: "hacl-cfg", - 5303: "hacl-probe", - 5304: "hacl-local", - 5305: "hacl-test", - 5306: "sun-mc-grp", - 5307: "sco-aip", - 5308: "cfengine", - 5309: "jprinter", - 5310: "outlaws", - 5312: "permabit-cs", - 5313: "rrdp", - 5314: "opalis-rbt-ipc", - 5315: "hacl-poll", - 5316: "hpbladems", - 5317: "hpdevms", - 5318: "pkix-cmc", - 5320: "bsfserver-zn", - 5321: "bsfsvr-zn-ssl", - 5343: "kfserver", - 5344: "xkotodrcp", - 5349: "stuns", - 5352: "dns-llq", - 5353: "mdns", - 5354: "mdnsresponder", - 5355: "llmnr", - 5356: "ms-smlbiz", - 5357: "wsdapi", - 5358: "wsdapi-s", - 5359: "ms-alerter", - 5360: "ms-sideshow", - 5361: "ms-s-sideshow", - 5362: "serverwsd2", - 5363: "net-projection", - 5397: "stresstester", - 5398: "elektron-admin", - 5399: "securitychase", - 5400: "excerpt", - 5401: "excerpts", - 5402: "mftp", - 5403: "hpoms-ci-lstn", - 5404: "hpoms-dps-lstn", - 5405: "netsupport", - 5406: "systemics-sox", - 5407: "foresyte-clear", - 5408: "foresyte-sec", - 5409: "salient-dtasrv", - 5410: "salient-usrmgr", - 5411: "actnet", - 5412: "continuus", - 5413: "wwiotalk", - 5414: "statusd", - 5415: "ns-server", - 5416: "sns-gateway", - 5417: "sns-agent", - 5418: "mcntp", - 5419: "dj-ice", - 5420: "cylink-c", - 5421: "netsupport2", - 5422: "salient-mux", - 5423: "virtualuser", - 5424: "beyond-remote", - 5425: "br-channel", - 5426: "devbasic", - 5427: "sco-peer-tta", - 5428: "telaconsole", - 5429: "base", - 5430: "radec-corp", - 5431: "park-agent", - 5432: "postgresql", - 5433: "pyrrho", - 5434: "sgi-arrayd", - 5435: "sceanics", - 5443: "spss", - 5445: "smbdirect", - 5450: "tiepie", - 5453: "surebox", - 5454: "apc-5454", - 5455: "apc-5455", - 5456: "apc-5456", - 5461: "silkmeter", - 5462: "ttl-publisher", - 5463: "ttlpriceproxy", - 5464: "quailnet", - 5465: "netops-broker", - 5470: "apsolab-col", - 5471: "apsolab-cols", - 5472: "apsolab-tag", - 5473: "apsolab-tags", - 5475: "apsolab-data", - 5500: "fcp-addr-srvr1", - 5501: "fcp-addr-srvr2", - 5502: "fcp-srvr-inst1", - 5503: "fcp-srvr-inst2", - 5504: "fcp-cics-gw1", - 5505: "checkoutdb", - 5506: "amc", - 5507: "psl-management", - 5550: "cbus", - 5553: "sgi-eventmond", - 5554: "sgi-esphttp", - 5555: "personal-agent", - 5556: "freeciv", - 5557: "farenet", - 5565: "hpe-dp-bura", - 5566: "westec-connect", - 5567: "dof-dps-mc-sec", - 5568: "sdt", - 5569: "rdmnet-ctrl", - 5573: "sdmmp", - 5574: "lsi-bobcat", - 5575: "ora-oap", - 5579: "fdtracks", - 5580: "tmosms0", - 5581: "tmosms1", - 5582: "fac-restore", - 5583: "tmo-icon-sync", - 5584: "bis-web", - 5585: "bis-sync", - 5586: "att-mt-sms", - 5597: "ininmessaging", - 5598: "mctfeed", - 5599: "esinstall", - 5600: "esmmanager", - 5601: "esmagent", - 5602: "a1-msc", - 5603: "a1-bs", - 5604: "a3-sdunode", - 5605: "a4-sdunode", - 5618: "efr", - 5627: "ninaf", - 5628: "htrust", - 5629: "symantec-sfdb", - 5630: "precise-comm", - 5631: "pcanywheredata", - 5632: "pcanywherestat", - 5633: "beorl", - 5634: "xprtld", - 5635: "sfmsso", - 5636: "sfm-db-server", - 5637: "cssc", - 5638: "flcrs", - 5639: "ics", - 5646: "vfmobile", - 5666: "nrpe", - 5670: "filemq", - 5671: "amqps", - 5672: "amqp", - 5673: "jms", - 5674: "hyperscsi-port", - 5675: "v5ua", - 5676: "raadmin", - 5677: "questdb2-lnchr", - 5678: "rrac", - 5679: "dccm", - 5680: "auriga-router", - 5681: "ncxcp", - 5688: "ggz", - 5689: "qmvideo", - 5693: "rbsystem", - 5696: "kmip", - 5700: "supportassist", - 5705: "storageos", - 5713: "proshareaudio", - 5714: "prosharevideo", - 5715: "prosharedata", - 5716: "prosharerequest", - 5717: "prosharenotify", - 5718: "dpm", - 5719: "dpm-agent", - 5720: "ms-licensing", - 5721: "dtpt", - 5722: "msdfsr", - 5723: "omhs", - 5724: "omsdk", - 5725: "ms-ilm", - 5726: "ms-ilm-sts", - 5727: "asgenf", - 5728: "io-dist-data", - 5729: "openmail", - 5730: "unieng", - 5741: "ida-discover1", - 5742: "ida-discover2", - 5743: "watchdoc-pod", - 5744: "watchdoc", - 5745: "fcopy-server", - 5746: "fcopys-server", - 5747: "tunatic", - 5748: "tunalyzer", - 5750: "rscd", - 5755: "openmailg", - 5757: "x500ms", - 5766: "openmailns", - 5767: "s-openmail", - 5768: "openmailpxy", - 5769: "spramsca", - 5770: "spramsd", - 5771: "netagent", - 5777: "dali-port", - 5780: "vts-rpc", - 5781: "3par-evts", - 5782: "3par-mgmt", - 5783: "3par-mgmt-ssl", - 5785: "3par-rcopy", - 5793: "xtreamx", - 5813: "icmpd", - 5814: "spt-automation", - 5841: "shiprush-d-ch", - 5842: "reversion", - 5859: "wherehoo", - 5863: "ppsuitemsg", - 5868: "diameters", - 5883: "jute", - 5900: "rfb", - 5910: "cm", - 5911: "cpdlc", - 5912: "fis", - 5913: "ads-c", - 5963: "indy", - 5968: "mppolicy-v5", - 5969: "mppolicy-mgr", - 5984: "couchdb", - 5985: "wsman", - 5986: "wsmans", - 5987: "wbem-rmi", - 5988: "wbem-http", - 5989: "wbem-https", - 5990: "wbem-exp-https", - 5991: "nuxsl", - 5992: "consul-insight", - 5993: "cim-rs", - 5999: "cvsup", - 6064: "ndl-ahp-svc", - 6065: "winpharaoh", - 6066: "ewctsp", - 6068: "gsmp-ancp", - 6069: "trip", - 6070: "messageasap", - 6071: "ssdtp", - 6072: "diagnose-proc", - 6073: "directplay8", - 6074: "max", - 6075: "dpm-acm", - 6076: "msft-dpm-cert", - 6077: "iconstructsrv", - 6084: "reload-config", - 6085: "konspire2b", - 6086: "pdtp", - 6087: "ldss", - 6088: "doglms", - 6099: "raxa-mgmt", - 6100: "synchronet-db", - 6101: "synchronet-rtc", - 6102: "synchronet-upd", - 6103: "rets", - 6104: "dbdb", - 6105: "primaserver", - 6106: "mpsserver", - 6107: "etc-control", - 6108: "sercomm-scadmin", - 6109: "globecast-id", - 6110: "softcm", - 6111: "spc", - 6112: "dtspcd", - 6113: "dayliteserver", - 6114: "wrspice", - 6115: "xic", - 6116: "xtlserv", - 6117: "daylitetouch", - 6121: "spdy", - 6122: "bex-webadmin", - 6123: "backup-express", - 6124: "pnbs", - 6130: "damewaremobgtwy", - 6133: "nbt-wol", - 6140: "pulsonixnls", - 6141: "meta-corp", - 6142: "aspentec-lm", - 6143: "watershed-lm", - 6144: "statsci1-lm", - 6145: "statsci2-lm", - 6146: "lonewolf-lm", - 6147: "montage-lm", - 6148: "ricardo-lm", - 6149: "tal-pod", - 6159: "efb-aci", - 6160: "ecmp", - 6161: "patrol-ism", - 6162: "patrol-coll", - 6163: "pscribe", - 6200: "lm-x", - 6209: "qmtps", - 6222: "radmind", - 6241: "jeol-nsdtp-1", - 6242: "jeol-nsdtp-2", - 6243: "jeol-nsdtp-3", - 6244: "jeol-nsdtp-4", - 6251: "tl1-raw-ssl", - 6252: "tl1-ssh", - 6253: "crip", - 6267: "gld", - 6268: "grid", - 6269: "grid-alt", - 6300: "bmc-grx", - 6301: "bmc-ctd-ldap", - 6306: "ufmp", - 6315: "scup", - 6316: "abb-escp", - 6317: "nav-data-cmd", - 6320: "repsvc", - 6321: "emp-server1", - 6322: "emp-server2", - 6324: "hrd-ncs", - 6325: "dt-mgmtsvc", - 6326: "dt-vra", - 6343: "sflow", - 6344: "streletz", - 6346: "gnutella-svc", - 6347: "gnutella-rtr", - 6350: "adap", - 6355: "pmcs", - 6360: "metaedit-mu", - 6370: "metaedit-se", - 6379: "redis", - 6382: "metatude-mds", - 6389: "clariion-evr01", - 6390: "metaedit-ws", - 6417: "faxcomservice", - 6418: "syserverremote", - 6419: "svdrp", - 6420: "nim-vdrshell", - 6421: "nim-wan", - 6432: "pgbouncer", - 6442: "tarp", - 6443: "sun-sr-https", - 6444: "sge-qmaster", - 6445: "sge-execd", - 6446: "mysql-proxy", - 6455: "skip-cert-recv", - 6456: "skip-cert-send", - 6464: "ieee11073-20701", - 6471: "lvision-lm", - 6480: "sun-sr-http", - 6481: "servicetags", - 6482: "ldoms-mgmt", - 6483: "SunVTS-RMI", - 6484: "sun-sr-jms", - 6485: "sun-sr-iiop", - 6486: "sun-sr-iiops", - 6487: "sun-sr-iiop-aut", - 6488: "sun-sr-jmx", - 6489: "sun-sr-admin", - 6500: "boks", - 6501: "boks-servc", - 6502: "boks-servm", - 6503: "boks-clntd", - 6505: "badm-priv", - 6506: "badm-pub", - 6507: "bdir-priv", - 6508: "bdir-pub", - 6509: "mgcs-mfp-port", - 6510: "mcer-port", - 6513: "netconf-tls", - 6514: "syslog-tls", - 6515: "elipse-rec", - 6543: "lds-distrib", - 6544: "lds-dump", - 6547: "apc-6547", - 6548: "apc-6548", - 6549: "apc-6549", - 6550: "fg-sysupdate", - 6551: "sum", - 6558: "xdsxdm", - 6566: "sane-port", - 6568: "canit-store", - 6579: "affiliate", - 6580: "parsec-master", - 6581: "parsec-peer", - 6582: "parsec-game", - 6583: "joaJewelSuite", - 6600: "mshvlm", - 6601: "mstmg-sstp", - 6602: "wsscomfrmwk", - 6619: "odette-ftps", - 6620: "kftp-data", - 6621: "kftp", - 6622: "mcftp", - 6623: "ktelnet", - 6624: "datascaler-db", - 6625: "datascaler-ctl", - 6626: "wago-service", - 6627: "nexgen", - 6628: "afesc-mc", - 6629: "nexgen-aux", - 6632: "mxodbc-connect", - 6640: "ovsdb", - 6653: "openflow", - 6655: "pcs-sf-ui-man", - 6656: "emgmsg", - 6670: "vocaltec-gold", - 6671: "p4p-portal", - 6672: "vision-server", - 6673: "vision-elmd", - 6678: "vfbp", - 6679: "osaut", - 6687: "clever-ctrace", - 6688: "clever-tcpip", - 6689: "tsa", - 6690: "cleverdetect", - 6697: "ircs-u", - 6701: "kti-icad-srvr", - 6702: "e-design-net", - 6703: "e-design-web", - 6714: "ibprotocol", - 6715: "fibotrader-com", - 6716: "princity-agent", - 6767: "bmc-perf-agent", - 6768: "bmc-perf-mgrd", - 6769: "adi-gxp-srvprt", - 6770: "plysrv-http", - 6771: "plysrv-https", - 6777: "ntz-tracker", - 6778: "ntz-p2p-storage", - 6785: "dgpf-exchg", - 6786: "smc-jmx", - 6787: "smc-admin", - 6788: "smc-http", - 6789: "radg", - 6790: "hnmp", - 6791: "hnm", - 6801: "acnet", - 6817: "pentbox-sim", - 6831: "ambit-lm", - 6841: "netmo-default", - 6842: "netmo-http", - 6850: "iccrushmore", - 6868: "acctopus-cc", - 6888: "muse", - 6900: "rtimeviewer", - 6901: "jetstream", - 6935: "ethoscan", - 6936: "xsmsvc", - 6946: "bioserver", - 6951: "otlp", - 6961: "jmact3", - 6962: "jmevt2", - 6963: "swismgr1", - 6964: "swismgr2", - 6965: "swistrap", - 6966: "swispol", - 6969: "acmsoda", - 6970: "conductor", - 6997: "MobilitySrv", - 6998: "iatp-highpri", - 6999: "iatp-normalpri", - 7000: "afs3-fileserver", - 7001: "afs3-callback", - 7002: "afs3-prserver", - 7003: "afs3-vlserver", - 7004: "afs3-kaserver", - 7005: "afs3-volser", - 7006: "afs3-errors", - 7007: "afs3-bos", - 7008: "afs3-update", - 7009: "afs3-rmtsys", - 7010: "ups-onlinet", - 7011: "talon-disc", - 7012: "talon-engine", - 7013: "microtalon-dis", - 7014: "microtalon-com", - 7015: "talon-webserver", - 7016: "spg", - 7017: "grasp", - 7018: "fisa-svc", - 7019: "doceri-ctl", - 7020: "dpserve", - 7021: "dpserveadmin", - 7022: "ctdp", - 7023: "ct2nmcs", - 7024: "vmsvc", - 7025: "vmsvc-2", - 7030: "op-probe", - 7031: "iposplanet", - 7070: "arcp", - 7071: "iwg1", - 7073: "martalk", - 7080: "empowerid", - 7099: "lazy-ptop", - 7100: "font-service", - 7101: "elcn", - 7117: "rothaga", - 7121: "virprot-lm", - 7128: "scenidm", - 7129: "scenccs", - 7161: "cabsm-comm", - 7162: "caistoragemgr", - 7163: "cacsambroker", - 7164: "fsr", - 7165: "doc-server", - 7166: "aruba-server", - 7167: "casrmagent", - 7168: "cnckadserver", - 7169: "ccag-pib", - 7170: "nsrp", - 7171: "drm-production", - 7172: "metalbend", - 7173: "zsecure", - 7174: "clutild", - 7200: "fodms", - 7201: "dlip", - 7202: "pon-ictp", - 7215: "PS-Server", - 7216: "PS-Capture-Pro", - 7227: "ramp", - 7228: "citrixupp", - 7229: "citrixuppg", - 7236: "display", - 7237: "pads", - 7244: "frc-hicp", - 7262: "cnap", - 7272: "watchme-7272", - 7273: "oma-rlp", - 7274: "oma-rlp-s", - 7275: "oma-ulp", - 7276: "oma-ilp", - 7277: "oma-ilp-s", - 7278: "oma-dcdocbs", - 7279: "ctxlic", - 7280: "itactionserver1", - 7281: "itactionserver2", - 7282: "mzca-action", - 7283: "genstat", - 7365: "lcm-server", - 7391: "mindfilesys", - 7392: "mrssrendezvous", - 7393: "nfoldman", - 7394: "fse", - 7395: "winqedit", - 7397: "hexarc", - 7400: "rtps-discovery", - 7401: "rtps-dd-ut", - 7402: "rtps-dd-mt", - 7410: "ionixnetmon", - 7411: "daqstream", - 7421: "mtportmon", - 7426: "pmdmgr", - 7427: "oveadmgr", - 7428: "ovladmgr", - 7429: "opi-sock", - 7430: "xmpv7", - 7431: "pmd", - 7437: "faximum", - 7443: "oracleas-https", - 7471: "sttunnel", - 7473: "rise", - 7474: "neo4j", - 7478: "openit", - 7491: "telops-lmd", - 7500: "silhouette", - 7501: "ovbus", - 7508: "adcp", - 7509: "acplt", - 7510: "ovhpas", - 7511: "pafec-lm", - 7542: "saratoga", - 7543: "atul", - 7544: "nta-ds", - 7545: "nta-us", - 7546: "cfs", - 7547: "cwmp", - 7548: "tidp", - 7549: "nls-tl", - 7551: "controlone-con", - 7560: "sncp", - 7563: "cfw", - 7566: "vsi-omega", - 7569: "dell-eql-asm", - 7570: "aries-kfinder", - 7574: "coherence", - 7588: "sun-lm", - 7606: "mipi-debug", - 7624: "indi", - 7626: "simco", - 7627: "soap-http", - 7628: "zen-pawn", - 7629: "xdas", - 7630: "hawk", - 7631: "tesla-sys-msg", - 7633: "pmdfmgt", - 7648: "cuseeme", - 7672: "imqstomp", - 7673: "imqstomps", - 7674: "imqtunnels", - 7675: "imqtunnel", - 7676: "imqbrokerd", - 7677: "sun-user-https", - 7680: "pando-pub", - 7683: "dmt", - 7687: "bolt", - 7689: "collaber", - 7697: "klio", - 7700: "em7-secom", - 7707: "sync-em7", - 7708: "scinet", - 7720: "medimageportal", - 7724: "nsdeepfreezectl", - 7725: "nitrogen", - 7726: "freezexservice", - 7727: "trident-data", - 7728: "osvr", - 7734: "smip", - 7738: "aiagent", - 7741: "scriptview", - 7742: "msss", - 7743: "sstp-1", - 7744: "raqmon-pdu", - 7747: "prgp", - 7775: "inetfs", - 7777: "cbt", - 7778: "interwise", - 7779: "vstat", - 7781: "accu-lmgr", - 7786: "minivend", - 7787: "popup-reminders", - 7789: "office-tools", - 7794: "q3ade", - 7797: "pnet-conn", - 7798: "pnet-enc", - 7799: "altbsdp", - 7800: "asr", - 7801: "ssp-client", - 7810: "rbt-wanopt", - 7845: "apc-7845", - 7846: "apc-7846", - 7847: "csoauth", - 7869: "mobileanalyzer", - 7870: "rbt-smc", - 7871: "mdm", - 7878: "owms", - 7880: "pss", - 7887: "ubroker", - 7900: "mevent", - 7901: "tnos-sp", - 7902: "tnos-dp", - 7903: "tnos-dps", - 7913: "qo-secure", - 7932: "t2-drm", - 7933: "t2-brm", - 7962: "generalsync", - 7967: "supercell", - 7979: "micromuse-ncps", - 7980: "quest-vista", - 7981: "sossd-collect", - 7982: "sossd-agent", - 7997: "pushns", - 7999: "irdmi2", - 8000: "irdmi", - 8001: "vcom-tunnel", - 8002: "teradataordbms", - 8003: "mcreport", - 8005: "mxi", - 8006: "wpl-analytics", - 8007: "warppipe", - 8008: "http-alt", - 8019: "qbdb", - 8020: "intu-ec-svcdisc", - 8021: "intu-ec-client", - 8022: "oa-system", - 8025: "ca-audit-da", - 8026: "ca-audit-ds", - 8032: "pro-ed", - 8033: "mindprint", - 8034: "vantronix-mgmt", - 8040: "ampify", - 8041: "enguity-xccetp", - 8042: "fs-agent", - 8043: "fs-server", - 8044: "fs-mgmt", - 8051: "rocrail", - 8052: "senomix01", - 8053: "senomix02", - 8054: "senomix03", - 8055: "senomix04", - 8056: "senomix05", - 8057: "senomix06", - 8058: "senomix07", - 8059: "senomix08", - 8066: "toad-bi-appsrvr", - 8067: "infi-async", - 8070: "ucs-isc", - 8074: "gadugadu", - 8077: "mles", - 8080: "http-alt", - 8081: "sunproxyadmin", - 8082: "us-cli", - 8083: "us-srv", - 8086: "d-s-n", - 8087: "simplifymedia", - 8088: "radan-http", - 8090: "opsmessaging", - 8091: "jamlink", - 8097: "sac", - 8100: "xprint-server", - 8101: "ldoms-migr", - 8102: "kz-migr", - 8115: "mtl8000-matrix", - 8116: "cp-cluster", - 8117: "purityrpc", - 8118: "privoxy", - 8121: "apollo-data", - 8122: "apollo-admin", - 8128: "paycash-online", - 8129: "paycash-wbp", - 8130: "indigo-vrmi", - 8131: "indigo-vbcp", - 8132: "dbabble", - 8140: "puppet", - 8148: "isdd", - 8153: "quantastor", - 8160: "patrol", - 8161: "patrol-snmp", - 8162: "lpar2rrd", - 8181: "intermapper", - 8182: "vmware-fdm", - 8183: "proremote", - 8184: "itach", - 8190: "gcp-rphy", - 8191: "limnerpressure", - 8192: "spytechphone", - 8194: "blp1", - 8195: "blp2", - 8199: "vvr-data", - 8200: "trivnet1", - 8201: "trivnet2", - 8204: "lm-perfworks", - 8205: "lm-instmgr", - 8206: "lm-dta", - 8207: "lm-sserver", - 8208: "lm-webwatcher", - 8230: "rexecj", - 8243: "synapse-nhttps", - 8270: "robot-remote", - 8276: "pando-sec", - 8280: "synapse-nhttp", - 8282: "libelle", - 8292: "blp3", - 8293: "hiperscan-id", - 8294: "blp4", - 8300: "tmi", - 8301: "amberon", - 8313: "hub-open-net", - 8320: "tnp-discover", - 8321: "tnp", - 8322: "garmin-marine", - 8351: "server-find", - 8376: "cruise-enum", - 8377: "cruise-swroute", - 8378: "cruise-config", - 8379: "cruise-diags", - 8380: "cruise-update", - 8383: "m2mservices", - 8400: "cvd", - 8401: "sabarsd", - 8402: "abarsd", - 8403: "admind", - 8404: "svcloud", - 8405: "svbackup", - 8415: "dlpx-sp", - 8416: "espeech", - 8417: "espeech-rtp", - 8423: "aritts", - 8442: "cybro-a-bus", - 8443: "pcsync-https", - 8444: "pcsync-http", - 8445: "copy", - 8450: "npmp", - 8457: "nexentamv", - 8470: "cisco-avp", - 8471: "pim-port", - 8472: "otv", - 8473: "vp2p", - 8474: "noteshare", - 8500: "fmtp", - 8501: "cmtp-mgt", - 8502: "ftnmtp", - 8554: "rtsp-alt", - 8555: "d-fence", - 8567: "dof-tunnel", - 8600: "asterix", - 8610: "canon-mfnp", - 8611: "canon-bjnp1", - 8612: "canon-bjnp2", - 8613: "canon-bjnp3", - 8614: "canon-bjnp4", - 8615: "imink", - 8665: "monetra", - 8666: "monetra-admin", - 8675: "msi-cps-rm", - 8686: "sun-as-jmxrmi", - 8688: "openremote-ctrl", - 8699: "vnyx", - 8711: "nvc", - 8733: "ibus", - 8750: "dey-keyneg", - 8763: "mc-appserver", - 8764: "openqueue", - 8765: "ultraseek-http", - 8766: "amcs", - 8770: "dpap", - 8778: "uec", - 8786: "msgclnt", - 8787: "msgsrvr", - 8793: "acd-pm", - 8800: "sunwebadmin", - 8804: "truecm", - 8873: "dxspider", - 8880: "cddbp-alt", - 8881: "galaxy4d", - 8883: "secure-mqtt", - 8888: "ddi-tcp-1", - 8889: "ddi-tcp-2", - 8890: "ddi-tcp-3", - 8891: "ddi-tcp-4", - 8892: "ddi-tcp-5", - 8893: "ddi-tcp-6", - 8894: "ddi-tcp-7", - 8899: "ospf-lite", - 8900: "jmb-cds1", - 8901: "jmb-cds2", - 8910: "manyone-http", - 8911: "manyone-xml", - 8912: "wcbackup", - 8913: "dragonfly", - 8937: "twds", - 8953: "ub-dns-control", - 8954: "cumulus-admin", - 8980: "nod-provider", - 8989: "sunwebadmins", - 8990: "http-wmap", - 8991: "https-wmap", - 8997: "oracle-ms-ens", - 8998: "canto-roboflow", - 8999: "bctp", - 9000: "cslistener", - 9001: "etlservicemgr", - 9002: "dynamid", - 9005: "golem", - 9008: "ogs-server", - 9009: "pichat", - 9010: "sdr", - 9020: "tambora", - 9021: "panagolin-ident", - 9022: "paragent", - 9023: "swa-1", - 9024: "swa-2", - 9025: "swa-3", - 9026: "swa-4", - 9050: "versiera", - 9051: "fio-cmgmt", - 9060: "CardWeb-IO", - 9080: "glrpc", - 9083: "emc-pp-mgmtsvc", - 9084: "aurora", - 9085: "ibm-rsyscon", - 9086: "net2display", - 9087: "classic", - 9088: "sqlexec", - 9089: "sqlexec-ssl", - 9090: "websm", - 9091: "xmltec-xmlmail", - 9092: "XmlIpcRegSvc", - 9093: "copycat", - 9100: "hp-pdl-datastr", - 9101: "bacula-dir", - 9102: "bacula-fd", - 9103: "bacula-sd", - 9104: "peerwire", - 9105: "xadmin", - 9106: "astergate", - 9107: "astergatefax", - 9119: "mxit", - 9122: "grcmp", - 9123: "grcp", - 9131: "dddp", - 9160: "apani1", - 9161: "apani2", - 9162: "apani3", - 9163: "apani4", - 9164: "apani5", - 9191: "sun-as-jpda", - 9200: "wap-wsp", - 9201: "wap-wsp-wtp", - 9202: "wap-wsp-s", - 9203: "wap-wsp-wtp-s", - 9204: "wap-vcard", - 9205: "wap-vcal", - 9206: "wap-vcard-s", - 9207: "wap-vcal-s", - 9208: "rjcdb-vcards", - 9209: "almobile-system", - 9210: "oma-mlp", - 9211: "oma-mlp-s", - 9212: "serverviewdbms", - 9213: "serverstart", - 9214: "ipdcesgbs", - 9215: "insis", - 9216: "acme", - 9217: "fsc-port", - 9222: "teamcoherence", - 9255: "mon", - 9278: "pegasus", - 9279: "pegasus-ctl", - 9280: "pgps", - 9281: "swtp-port1", - 9282: "swtp-port2", - 9283: "callwaveiam", - 9284: "visd", - 9285: "n2h2server", - 9287: "cumulus", - 9292: "armtechdaemon", - 9293: "storview", - 9294: "armcenterhttp", - 9295: "armcenterhttps", - 9300: "vrace", - 9306: "sphinxql", - 9312: "sphinxapi", - 9318: "secure-ts", - 9321: "guibase", - 9343: "mpidcmgr", - 9344: "mphlpdmc", - 9345: "rancher", - 9346: "ctechlicensing", - 9374: "fjdmimgr", - 9380: "boxp", - 9387: "d2dconfig", - 9388: "d2ddatatrans", - 9389: "adws", - 9390: "otp", - 9396: "fjinvmgr", - 9397: "mpidcagt", - 9400: "sec-t4net-srv", - 9401: "sec-t4net-clt", - 9402: "sec-pc2fax-srv", - 9418: "git", - 9443: "tungsten-https", - 9444: "wso2esb-console", - 9445: "mindarray-ca", - 9450: "sntlkeyssrvr", - 9500: "ismserver", - 9535: "mngsuite", - 9536: "laes-bf", - 9555: "trispen-sra", - 9592: "ldgateway", - 9593: "cba8", - 9594: "msgsys", - 9595: "pds", - 9596: "mercury-disc", - 9597: "pd-admin", - 9598: "vscp", - 9599: "robix", - 9600: "micromuse-ncpw", - 9612: "streamcomm-ds", - 9614: "iadt-tls", - 9616: "erunbook-agent", - 9617: "erunbook-server", - 9618: "condor", - 9628: "odbcpathway", - 9629: "uniport", - 9630: "peoctlr", - 9631: "peocoll", - 9640: "pqsflows", - 9666: "zoomcp", - 9667: "xmms2", - 9668: "tec5-sdctp", - 9694: "client-wakeup", - 9695: "ccnx", - 9700: "board-roar", - 9747: "l5nas-parchan", - 9750: "board-voip", - 9753: "rasadv", - 9762: "tungsten-http", - 9800: "davsrc", - 9801: "sstp-2", - 9802: "davsrcs", - 9875: "sapv1", - 9876: "sd", - 9888: "cyborg-systems", - 9889: "gt-proxy", - 9898: "monkeycom", - 9900: "iua", - 9909: "domaintime", - 9911: "sype-transport", - 9925: "xybrid-cloud", - 9950: "apc-9950", - 9951: "apc-9951", - 9952: "apc-9952", - 9953: "acis", - 9954: "hinp", - 9955: "alljoyn-stm", - 9966: "odnsp", - 9978: "xybrid-rt", - 9979: "visweather", - 9981: "pumpkindb", - 9987: "dsm-scm-target", - 9988: "nsesrvr", - 9990: "osm-appsrvr", - 9991: "osm-oev", - 9992: "palace-1", - 9993: "palace-2", - 9994: "palace-3", - 9995: "palace-4", - 9996: "palace-5", - 9997: "palace-6", - 9998: "distinct32", - 9999: "distinct", - 10000: "ndmp", - 10001: "scp-config", - 10002: "documentum", - 10003: "documentum-s", - 10004: "emcrmirccd", - 10005: "emcrmird", - 10006: "netapp-sync", - 10007: "mvs-capacity", - 10008: "octopus", - 10009: "swdtp-sv", - 10010: "rxapi", - 10020: "abb-hw", - 10050: "zabbix-agent", - 10051: "zabbix-trapper", - 10055: "qptlmd", - 10080: "amanda", - 10081: "famdc", - 10100: "itap-ddtp", - 10101: "ezmeeting-2", - 10102: "ezproxy-2", - 10103: "ezrelay", - 10104: "swdtp", - 10107: "bctp-server", - 10110: "nmea-0183", - 10113: "netiq-endpoint", - 10114: "netiq-qcheck", - 10115: "netiq-endpt", - 10116: "netiq-voipa", - 10117: "iqrm", - 10125: "cimple", - 10128: "bmc-perf-sd", - 10129: "bmc-gms", - 10160: "qb-db-server", - 10161: "snmptls", - 10162: "snmptls-trap", - 10200: "trisoap", - 10201: "rsms", - 10252: "apollo-relay", - 10260: "axis-wimp-port", - 10261: "tile-ml", - 10288: "blocks", - 10321: "cosir", - 10540: "MOS-lower", - 10541: "MOS-upper", - 10542: "MOS-aux", - 10543: "MOS-soap", - 10544: "MOS-soap-opt", - 10548: "serverdocs", - 10631: "printopia", - 10800: "gap", - 10805: "lpdg", - 10809: "nbd", - 10860: "helix", - 10880: "bveapi", - 10933: "octopustentacle", - 10990: "rmiaux", - 11000: "irisa", - 11001: "metasys", - 11095: "weave", - 11103: "origo-sync", - 11104: "netapp-icmgmt", - 11105: "netapp-icdata", - 11106: "sgi-lk", - 11109: "sgi-dmfmgr", - 11110: "sgi-soap", - 11111: "vce", - 11112: "dicom", - 11161: "suncacao-snmp", - 11162: "suncacao-jmxmp", - 11163: "suncacao-rmi", - 11164: "suncacao-csa", - 11165: "suncacao-websvc", - 11172: "oemcacao-jmxmp", - 11173: "t5-straton", - 11174: "oemcacao-rmi", - 11175: "oemcacao-websvc", - 11201: "smsqp", - 11202: "dcsl-backup", - 11208: "wifree", - 11211: "memcache", - 11319: "imip", - 11320: "imip-channels", - 11321: "arena-server", - 11367: "atm-uhas", - 11371: "hkp", - 11489: "asgcypresstcps", - 11600: "tempest-port", - 11623: "emc-xsw-dconfig", - 11720: "h323callsigalt", - 11723: "emc-xsw-dcache", - 11751: "intrepid-ssl", - 11796: "lanschool", - 11876: "xoraya", - 11967: "sysinfo-sp", - 12000: "entextxid", - 12001: "entextnetwk", - 12002: "entexthigh", - 12003: "entextmed", - 12004: "entextlow", - 12005: "dbisamserver1", - 12006: "dbisamserver2", - 12007: "accuracer", - 12008: "accuracer-dbms", - 12010: "edbsrvr", - 12012: "vipera", - 12013: "vipera-ssl", - 12109: "rets-ssl", - 12121: "nupaper-ss", - 12168: "cawas", - 12172: "hivep", - 12300: "linogridengine", - 12302: "rads", - 12321: "warehouse-sss", - 12322: "warehouse", - 12345: "italk", - 12753: "tsaf", - 12865: "netperf", - 13160: "i-zipqd", - 13216: "bcslogc", - 13217: "rs-pias", - 13218: "emc-vcas-tcp", - 13223: "powwow-client", - 13224: "powwow-server", - 13400: "doip-data", - 13720: "bprd", - 13721: "bpdbm", - 13722: "bpjava-msvc", - 13724: "vnetd", - 13782: "bpcd", - 13783: "vopied", - 13785: "nbdb", - 13786: "nomdb", - 13818: "dsmcc-config", - 13819: "dsmcc-session", - 13820: "dsmcc-passthru", - 13821: "dsmcc-download", - 13822: "dsmcc-ccp", - 13823: "bmdss", - 13894: "ucontrol", - 13929: "dta-systems", - 13930: "medevolve", - 14000: "scotty-ft", - 14001: "sua", - 14033: "sage-best-com1", - 14034: "sage-best-com2", - 14141: "vcs-app", - 14142: "icpp", - 14143: "icpps", - 14145: "gcm-app", - 14149: "vrts-tdd", - 14150: "vcscmd", - 14154: "vad", - 14250: "cps", - 14414: "ca-web-update", - 14500: "xpra", - 14936: "hde-lcesrvr-1", - 14937: "hde-lcesrvr-2", - 15000: "hydap", - 15002: "onep-tls", - 15345: "xpilot", - 15363: "3link", - 15555: "cisco-snat", - 15660: "bex-xr", - 15740: "ptp", - 15999: "programmar", - 16000: "fmsas", - 16001: "fmsascon", - 16002: "gsms", - 16020: "jwpc", - 16021: "jwpc-bin", - 16161: "sun-sea-port", - 16162: "solaris-audit", - 16309: "etb4j", - 16310: "pduncs", - 16311: "pdefmns", - 16360: "netserialext1", - 16361: "netserialext2", - 16367: "netserialext3", - 16368: "netserialext4", - 16384: "connected", - 16385: "rdgs", - 16619: "xoms", - 16665: "axon-tunnel", - 16789: "cadsisvr", - 16900: "newbay-snc-mc", - 16950: "sgcip", - 16991: "intel-rci-mp", - 16992: "amt-soap-http", - 16993: "amt-soap-https", - 16994: "amt-redir-tcp", - 16995: "amt-redir-tls", - 17007: "isode-dua", - 17184: "vestasdlp", - 17185: "soundsvirtual", - 17219: "chipper", - 17220: "avtp", - 17221: "avdecc", - 17223: "isa100-gci", - 17225: "trdp-md", - 17234: "integrius-stp", - 17235: "ssh-mgmt", - 17500: "db-lsp", - 17555: "ailith", - 17729: "ea", - 17754: "zep", - 17755: "zigbee-ip", - 17756: "zigbee-ips", - 17777: "sw-orion", - 18000: "biimenu", - 18104: "radpdf", - 18136: "racf", - 18181: "opsec-cvp", - 18182: "opsec-ufp", - 18183: "opsec-sam", - 18184: "opsec-lea", - 18185: "opsec-omi", - 18186: "ohsc", - 18187: "opsec-ela", - 18241: "checkpoint-rtm", - 18242: "iclid", - 18243: "clusterxl", - 18262: "gv-pf", - 18463: "ac-cluster", - 18634: "rds-ib", - 18635: "rds-ip", - 18668: "vdmmesh", - 18769: "ique", - 18881: "infotos", - 18888: "apc-necmp", - 19000: "igrid", - 19007: "scintilla", - 19020: "j-link", - 19191: "opsec-uaa", - 19194: "ua-secureagent", - 19220: "cora", - 19283: "keysrvr", - 19315: "keyshadow", - 19398: "mtrgtrans", - 19410: "hp-sco", - 19411: "hp-sca", - 19412: "hp-sessmon", - 19539: "fxuptp", - 19540: "sxuptp", - 19541: "jcp", - 19998: "iec-104-sec", - 19999: "dnp-sec", - 20000: "dnp", - 20001: "microsan", - 20002: "commtact-http", - 20003: "commtact-https", - 20005: "openwebnet", - 20013: "ss-idi", - 20014: "opendeploy", - 20034: "nburn-id", - 20046: "tmophl7mts", - 20048: "mountd", - 20049: "nfsrdma", - 20057: "avesterra", - 20167: "tolfab", - 20202: "ipdtp-port", - 20222: "ipulse-ics", - 20480: "emwavemsg", - 20670: "track", - 20999: "athand-mmp", - 21000: "irtrans", - 21010: "notezilla-lan", - 21221: "aigairserver", - 21553: "rdm-tfs", - 21554: "dfserver", - 21590: "vofr-gateway", - 21800: "tvpm", - 21845: "webphone", - 21846: "netspeak-is", - 21847: "netspeak-cs", - 21848: "netspeak-acd", - 21849: "netspeak-cps", - 22000: "snapenetio", - 22001: "optocontrol", - 22002: "optohost002", - 22003: "optohost003", - 22004: "optohost004", - 22005: "optohost004", - 22125: "dcap", - 22128: "gsidcap", - 22222: "easyengine", - 22273: "wnn6", - 22305: "cis", - 22335: "shrewd-control", - 22343: "cis-secure", - 22347: "wibukey", - 22350: "codemeter", - 22351: "codemeter-cmwan", - 22537: "caldsoft-backup", - 22555: "vocaltec-wconf", - 22763: "talikaserver", - 22800: "aws-brf", - 22951: "brf-gw", - 23000: "inovaport1", - 23001: "inovaport2", - 23002: "inovaport3", - 23003: "inovaport4", - 23004: "inovaport5", - 23005: "inovaport6", - 23053: "gntp", - 23294: "5afe-dir", - 23333: "elxmgmt", - 23400: "novar-dbase", - 23401: "novar-alarm", - 23402: "novar-global", - 23456: "aequus", - 23457: "aequus-alt", - 23546: "areaguard-neo", - 24000: "med-ltp", - 24001: "med-fsp-rx", - 24002: "med-fsp-tx", - 24003: "med-supp", - 24004: "med-ovw", - 24005: "med-ci", - 24006: "med-net-svc", - 24242: "filesphere", - 24249: "vista-4gl", - 24321: "ild", - 24386: "intel-rci", - 24465: "tonidods", - 24554: "binkp", - 24577: "bilobit", - 24666: "sdtvwcam", - 24676: "canditv", - 24677: "flashfiler", - 24678: "proactivate", - 24680: "tcc-http", - 24754: "cslg", - 24922: "find", - 25000: "icl-twobase1", - 25001: "icl-twobase2", - 25002: "icl-twobase3", - 25003: "icl-twobase4", - 25004: "icl-twobase5", - 25005: "icl-twobase6", - 25006: "icl-twobase7", - 25007: "icl-twobase8", - 25008: "icl-twobase9", - 25009: "icl-twobase10", - 25576: "sauterdongle", - 25604: "idtp", - 25793: "vocaltec-hos", - 25900: "tasp-net", - 25901: "niobserver", - 25902: "nilinkanalyst", - 25903: "niprobe", - 26000: "quake", - 26133: "scscp", - 26208: "wnn6-ds", - 26257: "cockroach", - 26260: "ezproxy", - 26261: "ezmeeting", - 26262: "k3software-svr", - 26263: "k3software-cli", - 26486: "exoline-tcp", - 26487: "exoconfig", - 26489: "exonet", - 27345: "imagepump", - 27442: "jesmsjc", - 27504: "kopek-httphead", - 27782: "ars-vista", - 27876: "astrolink", - 27999: "tw-auth-key", - 28000: "nxlmd", - 28001: "pqsp", - 28200: "voxelstorm", - 28240: "siemensgsm", - 28589: "bosswave", - 29167: "otmp", - 29999: "bingbang", - 30000: "ndmps", - 30001: "pago-services1", - 30002: "pago-services2", - 30003: "amicon-fpsu-ra", - 30100: "rwp", - 30260: "kingdomsonline", - 30400: "gs-realtime", - 30999: "ovobs", - 31016: "ka-sddp", - 31020: "autotrac-acp", - 31400: "pace-licensed", - 31416: "xqosd", - 31457: "tetrinet", - 31620: "lm-mon", - 31685: "dsx-monitor", - 31765: "gamesmith-port", - 31948: "iceedcp-tx", - 31949: "iceedcp-rx", - 32034: "iracinghelper", - 32249: "t1distproc60", - 32400: "plex", - 32483: "apm-link", - 32635: "sec-ntb-clnt", - 32636: "DMExpress", - 32767: "filenet-powsrm", - 32768: "filenet-tms", - 32769: "filenet-rpc", - 32770: "filenet-nch", - 32771: "filenet-rmi", - 32772: "filenet-pa", - 32773: "filenet-cm", - 32774: "filenet-re", - 32775: "filenet-pch", - 32776: "filenet-peior", - 32777: "filenet-obrok", - 32801: "mlsn", - 32811: "retp", - 32896: "idmgratm", - 33060: "mysqlx", - 33123: "aurora-balaena", - 33331: "diamondport", - 33333: "dgi-serv", - 33334: "speedtrace", - 33434: "traceroute", - 33656: "snip-slave", - 34249: "turbonote-2", - 34378: "p-net-local", - 34379: "p-net-remote", - 34567: "dhanalakshmi", - 34962: "profinet-rt", - 34963: "profinet-rtm", - 34964: "profinet-cm", - 34980: "ethercat", - 35000: "heathview", - 35001: "rt-viewer", - 35002: "rt-sound", - 35003: "rt-devicemapper", - 35004: "rt-classmanager", - 35005: "rt-labtracker", - 35006: "rt-helper", - 35100: "axio-disc", - 35354: "kitim", - 35355: "altova-lm", - 35356: "guttersnex", - 35357: "openstack-id", - 36001: "allpeers", - 36524: "febooti-aw", - 36602: "observium-agent", - 36700: "mapx", - 36865: "kastenxpipe", - 37475: "neckar", - 37483: "gdrive-sync", - 37601: "eftp", - 37654: "unisys-eportal", - 38000: "ivs-database", - 38001: "ivs-insertion", - 38002: "cresco-control", - 38201: "galaxy7-data", - 38202: "fairview", - 38203: "agpolicy", - 38800: "sruth", - 38865: "secrmmsafecopya", - 39681: "turbonote-1", - 40000: "safetynetp", - 40404: "sptx", - 40841: "cscp", - 40842: "csccredir", - 40843: "csccfirewall", - 41111: "fs-qos", - 41121: "tentacle", - 41230: "z-wave-s", - 41794: "crestron-cip", - 41795: "crestron-ctp", - 41796: "crestron-cips", - 41797: "crestron-ctps", - 42508: "candp", - 42509: "candrp", - 42510: "caerpc", - 43000: "recvr-rc", - 43188: "reachout", - 43189: "ndm-agent-port", - 43190: "ip-provision", - 43191: "noit-transport", - 43210: "shaperai", - 43439: "eq3-update", - 43440: "ew-mgmt", - 43441: "ciscocsdb", - 44123: "z-wave-tunnel", - 44321: "pmcd", - 44322: "pmcdproxy", - 44323: "pmwebapi", - 44444: "cognex-dataman", - 44553: "rbr-debug", - 44818: "EtherNet-IP-2", - 44900: "m3da", - 45000: "asmp", - 45001: "asmps", - 45002: "rs-status", - 45045: "synctest", - 45054: "invision-ag", - 45514: "cloudcheck", - 45678: "eba", - 45824: "dai-shell", - 45825: "qdb2service", - 45966: "ssr-servermgr", - 46336: "inedo", - 46998: "spremotetablet", - 46999: "mediabox", - 47000: "mbus", - 47001: "winrm", - 47557: "dbbrowse", - 47624: "directplaysrvr", - 47806: "ap", - 47808: "bacnet", - 48000: "nimcontroller", - 48001: "nimspooler", - 48002: "nimhub", - 48003: "nimgtw", - 48004: "nimbusdb", - 48005: "nimbusdbctrl", - 48049: "3gpp-cbsp", - 48050: "weandsf", - 48128: "isnetserv", - 48129: "blp5", - 48556: "com-bardac-dw", - 48619: "iqobject", - 48653: "robotraconteur", - 49000: "matahari", - 49001: "nusrp", -} -var udpPortNames = map[UDPPort]string{ - 1: "tcpmux", - 2: "compressnet", - 3: "compressnet", - 5: "rje", - 7: "echo", - 9: "discard", - 11: "systat", - 13: "daytime", - 17: "qotd", - 18: "msp", - 19: "chargen", - 20: "ftp-data", - 21: "ftp", - 22: "ssh", - 23: "telnet", - 25: "smtp", - 27: "nsw-fe", - 29: "msg-icp", - 31: "msg-auth", - 33: "dsp", - 37: "time", - 38: "rap", - 39: "rlp", - 41: "graphics", - 42: "name", - 43: "nicname", - 44: "mpm-flags", - 45: "mpm", - 46: "mpm-snd", - 48: "auditd", - 49: "tacacs", - 50: "re-mail-ck", - 52: "xns-time", - 53: "domain", - 54: "xns-ch", - 55: "isi-gl", - 56: "xns-auth", - 58: "xns-mail", - 62: "acas", - 63: "whoispp", - 64: "covia", - 65: "tacacs-ds", - 66: "sql-net", - 67: "bootps", - 68: "bootpc", - 69: "tftp", - 70: "gopher", - 71: "netrjs-1", - 72: "netrjs-2", - 73: "netrjs-3", - 74: "netrjs-4", - 76: "deos", - 78: "vettcp", - 79: "finger", - 80: "http", - 82: "xfer", - 83: "mit-ml-dev", - 84: "ctf", - 85: "mit-ml-dev", - 86: "mfcobol", - 88: "kerberos", - 89: "su-mit-tg", - 90: "dnsix", - 91: "mit-dov", - 92: "npp", - 93: "dcp", - 94: "objcall", - 95: "supdup", - 96: "dixie", - 97: "swift-rvf", - 98: "tacnews", - 99: "metagram", - 101: "hostname", - 102: "iso-tsap", - 103: "gppitnp", - 104: "acr-nema", - 105: "cso", - 106: "3com-tsmux", - 107: "rtelnet", - 108: "snagas", - 109: "pop2", - 110: "pop3", - 111: "sunrpc", - 112: "mcidas", - 113: "auth", - 115: "sftp", - 116: "ansanotify", - 117: "uucp-path", - 118: "sqlserv", - 119: "nntp", - 120: "cfdptkt", - 121: "erpc", - 122: "smakynet", - 123: "ntp", - 124: "ansatrader", - 125: "locus-map", - 126: "nxedit", - 127: "locus-con", - 128: "gss-xlicen", - 129: "pwdgen", - 130: "cisco-fna", - 131: "cisco-tna", - 132: "cisco-sys", - 133: "statsrv", - 134: "ingres-net", - 135: "epmap", - 136: "profile", - 137: "netbios-ns", - 138: "netbios-dgm", - 139: "netbios-ssn", - 140: "emfis-data", - 141: "emfis-cntl", - 142: "bl-idm", - 143: "imap", - 144: "uma", - 145: "uaac", - 146: "iso-tp0", - 147: "iso-ip", - 148: "jargon", - 149: "aed-512", - 150: "sql-net", - 151: "hems", - 152: "bftp", - 153: "sgmp", - 154: "netsc-prod", - 155: "netsc-dev", - 156: "sqlsrv", - 157: "knet-cmp", - 158: "pcmail-srv", - 159: "nss-routing", - 160: "sgmp-traps", - 161: "snmp", - 162: "snmptrap", - 163: "cmip-man", - 164: "cmip-agent", - 165: "xns-courier", - 166: "s-net", - 167: "namp", - 168: "rsvd", - 169: "send", - 170: "print-srv", - 171: "multiplex", - 172: "cl-1", - 173: "xyplex-mux", - 174: "mailq", - 175: "vmnet", - 176: "genrad-mux", - 177: "xdmcp", - 178: "nextstep", - 179: "bgp", - 180: "ris", - 181: "unify", - 182: "audit", - 183: "ocbinder", - 184: "ocserver", - 185: "remote-kis", - 186: "kis", - 187: "aci", - 188: "mumps", - 189: "qft", - 190: "gacp", - 191: "prospero", - 192: "osu-nms", - 193: "srmp", - 194: "irc", - 195: "dn6-nlm-aud", - 196: "dn6-smm-red", - 197: "dls", - 198: "dls-mon", - 199: "smux", - 200: "src", - 201: "at-rtmp", - 202: "at-nbp", - 203: "at-3", - 204: "at-echo", - 205: "at-5", - 206: "at-zis", - 207: "at-7", - 208: "at-8", - 209: "qmtp", - 210: "z39-50", - 211: "914c-g", - 212: "anet", - 213: "ipx", - 214: "vmpwscs", - 215: "softpc", - 216: "CAIlic", - 217: "dbase", - 218: "mpp", - 219: "uarps", - 220: "imap3", - 221: "fln-spx", - 222: "rsh-spx", - 223: "cdc", - 224: "masqdialer", - 242: "direct", - 243: "sur-meas", - 244: "inbusiness", - 245: "link", - 246: "dsp3270", - 247: "subntbcst-tftp", - 248: "bhfhs", - 256: "rap", - 257: "set", - 259: "esro-gen", - 260: "openport", - 261: "nsiiops", - 262: "arcisdms", - 263: "hdap", - 264: "bgmp", - 265: "x-bone-ctl", - 266: "sst", - 267: "td-service", - 268: "td-replica", - 269: "manet", - 270: "gist", - 280: "http-mgmt", - 281: "personal-link", - 282: "cableport-ax", - 283: "rescap", - 284: "corerjd", - 286: "fxp", - 287: "k-block", - 308: "novastorbakcup", - 309: "entrusttime", - 310: "bhmds", - 311: "asip-webadmin", - 312: "vslmp", - 313: "magenta-logic", - 314: "opalis-robot", - 315: "dpsi", - 316: "decauth", - 317: "zannet", - 318: "pkix-timestamp", - 319: "ptp-event", - 320: "ptp-general", - 321: "pip", - 322: "rtsps", - 333: "texar", - 344: "pdap", - 345: "pawserv", - 346: "zserv", - 347: "fatserv", - 348: "csi-sgwp", - 349: "mftp", - 350: "matip-type-a", - 351: "matip-type-b", - 352: "dtag-ste-sb", - 353: "ndsauth", - 354: "bh611", - 355: "datex-asn", - 356: "cloanto-net-1", - 357: "bhevent", - 358: "shrinkwrap", - 359: "nsrmp", - 360: "scoi2odialog", - 361: "semantix", - 362: "srssend", - 363: "rsvp-tunnel", - 364: "aurora-cmgr", - 365: "dtk", - 366: "odmr", - 367: "mortgageware", - 368: "qbikgdp", - 369: "rpc2portmap", - 370: "codaauth2", - 371: "clearcase", - 372: "ulistproc", - 373: "legent-1", - 374: "legent-2", - 375: "hassle", - 376: "nip", - 377: "tnETOS", - 378: "dsETOS", - 379: "is99c", - 380: "is99s", - 381: "hp-collector", - 382: "hp-managed-node", - 383: "hp-alarm-mgr", - 384: "arns", - 385: "ibm-app", - 386: "asa", - 387: "aurp", - 388: "unidata-ldm", - 389: "ldap", - 390: "uis", - 391: "synotics-relay", - 392: "synotics-broker", - 393: "meta5", - 394: "embl-ndt", - 395: "netcp", - 396: "netware-ip", - 397: "mptn", - 398: "kryptolan", - 399: "iso-tsap-c2", - 400: "osb-sd", - 401: "ups", - 402: "genie", - 403: "decap", - 404: "nced", - 405: "ncld", - 406: "imsp", - 407: "timbuktu", - 408: "prm-sm", - 409: "prm-nm", - 410: "decladebug", - 411: "rmt", - 412: "synoptics-trap", - 413: "smsp", - 414: "infoseek", - 415: "bnet", - 416: "silverplatter", - 417: "onmux", - 418: "hyper-g", - 419: "ariel1", - 420: "smpte", - 421: "ariel2", - 422: "ariel3", - 423: "opc-job-start", - 424: "opc-job-track", - 425: "icad-el", - 426: "smartsdp", - 427: "svrloc", - 428: "ocs-cmu", - 429: "ocs-amu", - 430: "utmpsd", - 431: "utmpcd", - 432: "iasd", - 433: "nnsp", - 434: "mobileip-agent", - 435: "mobilip-mn", - 436: "dna-cml", - 437: "comscm", - 438: "dsfgw", - 439: "dasp", - 440: "sgcp", - 441: "decvms-sysmgt", - 442: "cvc-hostd", - 443: "https", - 444: "snpp", - 445: "microsoft-ds", - 446: "ddm-rdb", - 447: "ddm-dfm", - 448: "ddm-ssl", - 449: "as-servermap", - 450: "tserver", - 451: "sfs-smp-net", - 452: "sfs-config", - 453: "creativeserver", - 454: "contentserver", - 455: "creativepartnr", - 456: "macon-udp", - 457: "scohelp", - 458: "appleqtc", - 459: "ampr-rcmd", - 460: "skronk", - 461: "datasurfsrv", - 462: "datasurfsrvsec", - 463: "alpes", - 464: "kpasswd", - 465: "igmpv3lite", - 466: "digital-vrc", - 467: "mylex-mapd", - 468: "photuris", - 469: "rcp", - 470: "scx-proxy", - 471: "mondex", - 472: "ljk-login", - 473: "hybrid-pop", - 474: "tn-tl-w2", - 475: "tcpnethaspsrv", - 476: "tn-tl-fd1", - 477: "ss7ns", - 478: "spsc", - 479: "iafserver", - 480: "iafdbase", - 481: "ph", - 482: "bgs-nsi", - 483: "ulpnet", - 484: "integra-sme", - 485: "powerburst", - 486: "avian", - 487: "saft", - 488: "gss-http", - 489: "nest-protocol", - 490: "micom-pfs", - 491: "go-login", - 492: "ticf-1", - 493: "ticf-2", - 494: "pov-ray", - 495: "intecourier", - 496: "pim-rp-disc", - 497: "retrospect", - 498: "siam", - 499: "iso-ill", - 500: "isakmp", - 501: "stmf", - 502: "mbap", - 503: "intrinsa", - 504: "citadel", - 505: "mailbox-lm", - 506: "ohimsrv", - 507: "crs", - 508: "xvttp", - 509: "snare", - 510: "fcp", - 511: "passgo", - 512: "comsat", - 513: "who", - 514: "syslog", - 515: "printer", - 516: "videotex", - 517: "talk", - 518: "ntalk", - 519: "utime", - 520: "router", - 521: "ripng", - 522: "ulp", - 523: "ibm-db2", - 524: "ncp", - 525: "timed", - 526: "tempo", - 527: "stx", - 528: "custix", - 529: "irc-serv", - 530: "courier", - 531: "conference", - 532: "netnews", - 533: "netwall", - 534: "windream", - 535: "iiop", - 536: "opalis-rdv", - 537: "nmsp", - 538: "gdomap", - 539: "apertus-ldp", - 540: "uucp", - 541: "uucp-rlogin", - 542: "commerce", - 543: "klogin", - 544: "kshell", - 545: "appleqtcsrvr", - 546: "dhcpv6-client", - 547: "dhcpv6-server", - 548: "afpovertcp", - 549: "idfp", - 550: "new-rwho", - 551: "cybercash", - 552: "devshr-nts", - 553: "pirp", - 554: "rtsp", - 555: "dsf", - 556: "remotefs", - 557: "openvms-sysipc", - 558: "sdnskmp", - 559: "teedtap", - 560: "rmonitor", - 561: "monitor", - 562: "chshell", - 563: "nntps", - 564: "9pfs", - 565: "whoami", - 566: "streettalk", - 567: "banyan-rpc", - 568: "ms-shuttle", - 569: "ms-rome", - 570: "meter", - 571: "meter", - 572: "sonar", - 573: "banyan-vip", - 574: "ftp-agent", - 575: "vemmi", - 576: "ipcd", - 577: "vnas", - 578: "ipdd", - 579: "decbsrv", - 580: "sntp-heartbeat", - 581: "bdp", - 582: "scc-security", - 583: "philips-vc", - 584: "keyserver", - 586: "password-chg", - 587: "submission", - 588: "cal", - 589: "eyelink", - 590: "tns-cml", - 591: "http-alt", - 592: "eudora-set", - 593: "http-rpc-epmap", - 594: "tpip", - 595: "cab-protocol", - 596: "smsd", - 597: "ptcnameservice", - 598: "sco-websrvrmg3", - 599: "acp", - 600: "ipcserver", - 601: "syslog-conn", - 602: "xmlrpc-beep", - 603: "idxp", - 604: "tunnel", - 605: "soap-beep", - 606: "urm", - 607: "nqs", - 608: "sift-uft", - 609: "npmp-trap", - 610: "npmp-local", - 611: "npmp-gui", - 612: "hmmp-ind", - 613: "hmmp-op", - 614: "sshell", - 615: "sco-inetmgr", - 616: "sco-sysmgr", - 617: "sco-dtmgr", - 618: "dei-icda", - 619: "compaq-evm", - 620: "sco-websrvrmgr", - 621: "escp-ip", - 622: "collaborator", - 623: "asf-rmcp", - 624: "cryptoadmin", - 625: "dec-dlm", - 626: "asia", - 627: "passgo-tivoli", - 628: "qmqp", - 629: "3com-amp3", - 630: "rda", - 631: "ipp", - 632: "bmpp", - 633: "servstat", - 634: "ginad", - 635: "rlzdbase", - 636: "ldaps", - 637: "lanserver", - 638: "mcns-sec", - 639: "msdp", - 640: "entrust-sps", - 641: "repcmd", - 642: "esro-emsdp", - 643: "sanity", - 644: "dwr", - 645: "pssc", - 646: "ldp", - 647: "dhcp-failover", - 648: "rrp", - 649: "cadview-3d", - 650: "obex", - 651: "ieee-mms", - 652: "hello-port", - 653: "repscmd", - 654: "aodv", - 655: "tinc", - 656: "spmp", - 657: "rmc", - 658: "tenfold", - 660: "mac-srvr-admin", - 661: "hap", - 662: "pftp", - 663: "purenoise", - 664: "asf-secure-rmcp", - 665: "sun-dr", - 666: "mdqs", - 667: "disclose", - 668: "mecomm", - 669: "meregister", - 670: "vacdsm-sws", - 671: "vacdsm-app", - 672: "vpps-qua", - 673: "cimplex", - 674: "acap", - 675: "dctp", - 676: "vpps-via", - 677: "vpp", - 678: "ggf-ncp", - 679: "mrm", - 680: "entrust-aaas", - 681: "entrust-aams", - 682: "xfr", - 683: "corba-iiop", - 684: "corba-iiop-ssl", - 685: "mdc-portmapper", - 686: "hcp-wismar", - 687: "asipregistry", - 688: "realm-rusd", - 689: "nmap", - 690: "vatp", - 691: "msexch-routing", - 692: "hyperwave-isp", - 693: "connendp", - 694: "ha-cluster", - 695: "ieee-mms-ssl", - 696: "rushd", - 697: "uuidgen", - 698: "olsr", - 699: "accessnetwork", - 700: "epp", - 701: "lmp", - 702: "iris-beep", - 704: "elcsd", - 705: "agentx", - 706: "silc", - 707: "borland-dsj", - 709: "entrust-kmsh", - 710: "entrust-ash", - 711: "cisco-tdp", - 712: "tbrpf", - 713: "iris-xpc", - 714: "iris-xpcs", - 715: "iris-lwz", - 716: "pana", - 729: "netviewdm1", - 730: "netviewdm2", - 731: "netviewdm3", - 741: "netgw", - 742: "netrcs", - 744: "flexlm", - 747: "fujitsu-dev", - 748: "ris-cm", - 749: "kerberos-adm", - 750: "loadav", - 751: "pump", - 752: "qrh", - 753: "rrh", - 754: "tell", - 758: "nlogin", - 759: "con", - 760: "ns", - 761: "rxe", - 762: "quotad", - 763: "cycleserv", - 764: "omserv", - 765: "webster", - 767: "phonebook", - 769: "vid", - 770: "cadlock", - 771: "rtip", - 772: "cycleserv2", - 773: "notify", - 774: "acmaint-dbd", - 775: "acmaint-transd", - 776: "wpages", - 777: "multiling-http", - 780: "wpgs", - 800: "mdbs-daemon", - 801: "device", - 802: "mbap-s", - 810: "fcp-udp", - 828: "itm-mcell-s", - 829: "pkix-3-ca-ra", - 830: "netconf-ssh", - 831: "netconf-beep", - 832: "netconfsoaphttp", - 833: "netconfsoapbeep", - 847: "dhcp-failover2", - 848: "gdoi", - 853: "domain-s", - 854: "dlep", - 860: "iscsi", - 861: "owamp-control", - 862: "twamp-control", - 873: "rsync", - 886: "iclcnet-locate", - 887: "iclcnet-svinfo", - 888: "accessbuilder", - 900: "omginitialrefs", - 901: "smpnameres", - 902: "ideafarm-door", - 903: "ideafarm-panic", - 910: "kink", - 911: "xact-backup", - 912: "apex-mesh", - 913: "apex-edge", - 989: "ftps-data", - 990: "ftps", - 991: "nas", - 992: "telnets", - 993: "imaps", - 995: "pop3s", - 996: "vsinet", - 997: "maitrd", - 998: "puparp", - 999: "applix", - 1000: "cadlock2", - 1010: "surf", - 1021: "exp1", - 1022: "exp2", - 1025: "blackjack", - 1026: "cap", - 1027: "6a44", - 1029: "solid-mux", - 1033: "netinfo-local", - 1034: "activesync", - 1035: "mxxrlogin", - 1036: "nsstp", - 1037: "ams", - 1038: "mtqp", - 1039: "sbl", - 1040: "netarx", - 1041: "danf-ak2", - 1042: "afrog", - 1043: "boinc-client", - 1044: "dcutility", - 1045: "fpitp", - 1046: "wfremotertm", - 1047: "neod1", - 1048: "neod2", - 1049: "td-postman", - 1050: "cma", - 1051: "optima-vnet", - 1052: "ddt", - 1053: "remote-as", - 1054: "brvread", - 1055: "ansyslmd", - 1056: "vfo", - 1057: "startron", - 1058: "nim", - 1059: "nimreg", - 1060: "polestar", - 1061: "kiosk", - 1062: "veracity", - 1063: "kyoceranetdev", - 1064: "jstel", - 1065: "syscomlan", - 1066: "fpo-fns", - 1067: "instl-boots", - 1068: "instl-bootc", - 1069: "cognex-insight", - 1070: "gmrupdateserv", - 1071: "bsquare-voip", - 1072: "cardax", - 1073: "bridgecontrol", - 1074: "warmspotMgmt", - 1075: "rdrmshc", - 1076: "dab-sti-c", - 1077: "imgames", - 1078: "avocent-proxy", - 1079: "asprovatalk", - 1080: "socks", - 1081: "pvuniwien", - 1082: "amt-esd-prot", - 1083: "ansoft-lm-1", - 1084: "ansoft-lm-2", - 1085: "webobjects", - 1086: "cplscrambler-lg", - 1087: "cplscrambler-in", - 1088: "cplscrambler-al", - 1089: "ff-annunc", - 1090: "ff-fms", - 1091: "ff-sm", - 1092: "obrpd", - 1093: "proofd", - 1094: "rootd", - 1095: "nicelink", - 1096: "cnrprotocol", - 1097: "sunclustermgr", - 1098: "rmiactivation", - 1099: "rmiregistry", - 1100: "mctp", - 1101: "pt2-discover", - 1102: "adobeserver-1", - 1103: "adobeserver-2", - 1104: "xrl", - 1105: "ftranhc", - 1106: "isoipsigport-1", - 1107: "isoipsigport-2", - 1108: "ratio-adp", - 1110: "nfsd-keepalive", - 1111: "lmsocialserver", - 1112: "icp", - 1113: "ltp-deepspace", - 1114: "mini-sql", - 1115: "ardus-trns", - 1116: "ardus-cntl", - 1117: "ardus-mtrns", - 1118: "sacred", - 1119: "bnetgame", - 1120: "bnetfile", - 1121: "rmpp", - 1122: "availant-mgr", - 1123: "murray", - 1124: "hpvmmcontrol", - 1125: "hpvmmagent", - 1126: "hpvmmdata", - 1127: "kwdb-commn", - 1128: "saphostctrl", - 1129: "saphostctrls", - 1130: "casp", - 1131: "caspssl", - 1132: "kvm-via-ip", - 1133: "dfn", - 1134: "aplx", - 1135: "omnivision", - 1136: "hhb-gateway", - 1137: "trim", - 1138: "encrypted-admin", - 1139: "evm", - 1140: "autonoc", - 1141: "mxomss", - 1142: "edtools", - 1143: "imyx", - 1144: "fuscript", - 1145: "x9-icue", - 1146: "audit-transfer", - 1147: "capioverlan", - 1148: "elfiq-repl", - 1149: "bvtsonar", - 1150: "blaze", - 1151: "unizensus", - 1152: "winpoplanmess", - 1153: "c1222-acse", - 1154: "resacommunity", - 1155: "nfa", - 1156: "iascontrol-oms", - 1157: "iascontrol", - 1158: "dbcontrol-oms", - 1159: "oracle-oms", - 1160: "olsv", - 1161: "health-polling", - 1162: "health-trap", - 1163: "sddp", - 1164: "qsm-proxy", - 1165: "qsm-gui", - 1166: "qsm-remote", - 1167: "cisco-ipsla", - 1168: "vchat", - 1169: "tripwire", - 1170: "atc-lm", - 1171: "atc-appserver", - 1172: "dnap", - 1173: "d-cinema-rrp", - 1174: "fnet-remote-ui", - 1175: "dossier", - 1176: "indigo-server", - 1177: "dkmessenger", - 1178: "sgi-storman", - 1179: "b2n", - 1180: "mc-client", - 1181: "3comnetman", - 1182: "accelenet-data", - 1183: "llsurfup-http", - 1184: "llsurfup-https", - 1185: "catchpole", - 1186: "mysql-cluster", - 1187: "alias", - 1188: "hp-webadmin", - 1189: "unet", - 1190: "commlinx-avl", - 1191: "gpfs", - 1192: "caids-sensor", - 1193: "fiveacross", - 1194: "openvpn", - 1195: "rsf-1", - 1196: "netmagic", - 1197: "carrius-rshell", - 1198: "cajo-discovery", - 1199: "dmidi", - 1200: "scol", - 1201: "nucleus-sand", - 1202: "caiccipc", - 1203: "ssslic-mgr", - 1204: "ssslog-mgr", - 1205: "accord-mgc", - 1206: "anthony-data", - 1207: "metasage", - 1208: "seagull-ais", - 1209: "ipcd3", - 1210: "eoss", - 1211: "groove-dpp", - 1212: "lupa", - 1213: "mpc-lifenet", - 1214: "kazaa", - 1215: "scanstat-1", - 1216: "etebac5", - 1217: "hpss-ndapi", - 1218: "aeroflight-ads", - 1219: "aeroflight-ret", - 1220: "qt-serveradmin", - 1221: "sweetware-apps", - 1222: "nerv", - 1223: "tgp", - 1224: "vpnz", - 1225: "slinkysearch", - 1226: "stgxfws", - 1227: "dns2go", - 1228: "florence", - 1229: "zented", - 1230: "periscope", - 1231: "menandmice-lpm", - 1232: "first-defense", - 1233: "univ-appserver", - 1234: "search-agent", - 1235: "mosaicsyssvc1", - 1236: "bvcontrol", - 1237: "tsdos390", - 1238: "hacl-qs", - 1239: "nmsd", - 1240: "instantia", - 1241: "nessus", - 1242: "nmasoverip", - 1243: "serialgateway", - 1244: "isbconference1", - 1245: "isbconference2", - 1246: "payrouter", - 1247: "visionpyramid", - 1248: "hermes", - 1249: "mesavistaco", - 1250: "swldy-sias", - 1251: "servergraph", - 1252: "bspne-pcc", - 1253: "q55-pcc", - 1254: "de-noc", - 1255: "de-cache-query", - 1256: "de-server", - 1257: "shockwave2", - 1258: "opennl", - 1259: "opennl-voice", - 1260: "ibm-ssd", - 1261: "mpshrsv", - 1262: "qnts-orb", - 1263: "dka", - 1264: "prat", - 1265: "dssiapi", - 1266: "dellpwrappks", - 1267: "epc", - 1268: "propel-msgsys", - 1269: "watilapp", - 1270: "opsmgr", - 1271: "excw", - 1272: "cspmlockmgr", - 1273: "emc-gateway", - 1274: "t1distproc", - 1275: "ivcollector", - 1277: "miva-mqs", - 1278: "dellwebadmin-1", - 1279: "dellwebadmin-2", - 1280: "pictrography", - 1281: "healthd", - 1282: "emperion", - 1283: "productinfo", - 1284: "iee-qfx", - 1285: "neoiface", - 1286: "netuitive", - 1287: "routematch", - 1288: "navbuddy", - 1289: "jwalkserver", - 1290: "winjaserver", - 1291: "seagulllms", - 1292: "dsdn", - 1293: "pkt-krb-ipsec", - 1294: "cmmdriver", - 1295: "ehtp", - 1296: "dproxy", - 1297: "sdproxy", - 1298: "lpcp", - 1299: "hp-sci", - 1300: "h323hostcallsc", - 1301: "ci3-software-1", - 1302: "ci3-software-2", - 1303: "sftsrv", - 1304: "boomerang", - 1305: "pe-mike", - 1306: "re-conn-proto", - 1307: "pacmand", - 1308: "odsi", - 1309: "jtag-server", - 1310: "husky", - 1311: "rxmon", - 1312: "sti-envision", - 1313: "bmc-patroldb", - 1314: "pdps", - 1315: "els", - 1316: "exbit-escp", - 1317: "vrts-ipcserver", - 1318: "krb5gatekeeper", - 1319: "amx-icsp", - 1320: "amx-axbnet", - 1321: "pip", - 1322: "novation", - 1323: "brcd", - 1324: "delta-mcp", - 1325: "dx-instrument", - 1326: "wimsic", - 1327: "ultrex", - 1328: "ewall", - 1329: "netdb-export", - 1330: "streetperfect", - 1331: "intersan", - 1332: "pcia-rxp-b", - 1333: "passwrd-policy", - 1334: "writesrv", - 1335: "digital-notary", - 1336: "ischat", - 1337: "menandmice-dns", - 1338: "wmc-log-svc", - 1339: "kjtsiteserver", - 1340: "naap", - 1341: "qubes", - 1342: "esbroker", - 1343: "re101", - 1344: "icap", - 1345: "vpjp", - 1346: "alta-ana-lm", - 1347: "bbn-mmc", - 1348: "bbn-mmx", - 1349: "sbook", - 1350: "editbench", - 1351: "equationbuilder", - 1352: "lotusnote", - 1353: "relief", - 1354: "XSIP-network", - 1355: "intuitive-edge", - 1356: "cuillamartin", - 1357: "pegboard", - 1358: "connlcli", - 1359: "ftsrv", - 1360: "mimer", - 1361: "linx", - 1362: "timeflies", - 1363: "ndm-requester", - 1364: "ndm-server", - 1365: "adapt-sna", - 1366: "netware-csp", - 1367: "dcs", - 1368: "screencast", - 1369: "gv-us", - 1370: "us-gv", - 1371: "fc-cli", - 1372: "fc-ser", - 1373: "chromagrafx", - 1374: "molly", - 1375: "bytex", - 1376: "ibm-pps", - 1377: "cichlid", - 1378: "elan", - 1379: "dbreporter", - 1380: "telesis-licman", - 1381: "apple-licman", - 1382: "udt-os", - 1383: "gwha", - 1384: "os-licman", - 1385: "atex-elmd", - 1386: "checksum", - 1387: "cadsi-lm", - 1388: "objective-dbc", - 1389: "iclpv-dm", - 1390: "iclpv-sc", - 1391: "iclpv-sas", - 1392: "iclpv-pm", - 1393: "iclpv-nls", - 1394: "iclpv-nlc", - 1395: "iclpv-wsm", - 1396: "dvl-activemail", - 1397: "audio-activmail", - 1398: "video-activmail", - 1399: "cadkey-licman", - 1400: "cadkey-tablet", - 1401: "goldleaf-licman", - 1402: "prm-sm-np", - 1403: "prm-nm-np", - 1404: "igi-lm", - 1405: "ibm-res", - 1406: "netlabs-lm", - 1408: "sophia-lm", - 1409: "here-lm", - 1410: "hiq", - 1411: "af", - 1412: "innosys", - 1413: "innosys-acl", - 1414: "ibm-mqseries", - 1415: "dbstar", - 1416: "novell-lu6-2", - 1417: "timbuktu-srv1", - 1418: "timbuktu-srv2", - 1419: "timbuktu-srv3", - 1420: "timbuktu-srv4", - 1421: "gandalf-lm", - 1422: "autodesk-lm", - 1423: "essbase", - 1424: "hybrid", - 1425: "zion-lm", - 1426: "sais", - 1427: "mloadd", - 1428: "informatik-lm", - 1429: "nms", - 1430: "tpdu", - 1431: "rgtp", - 1432: "blueberry-lm", - 1433: "ms-sql-s", - 1434: "ms-sql-m", - 1435: "ibm-cics", - 1436: "saism", - 1437: "tabula", - 1438: "eicon-server", - 1439: "eicon-x25", - 1440: "eicon-slp", - 1441: "cadis-1", - 1442: "cadis-2", - 1443: "ies-lm", - 1444: "marcam-lm", - 1445: "proxima-lm", - 1446: "ora-lm", - 1447: "apri-lm", - 1448: "oc-lm", - 1449: "peport", - 1450: "dwf", - 1451: "infoman", - 1452: "gtegsc-lm", - 1453: "genie-lm", - 1454: "interhdl-elmd", - 1455: "esl-lm", - 1456: "dca", - 1457: "valisys-lm", - 1458: "nrcabq-lm", - 1459: "proshare1", - 1460: "proshare2", - 1461: "ibm-wrless-lan", - 1462: "world-lm", - 1463: "nucleus", - 1464: "msl-lmd", - 1465: "pipes", - 1466: "oceansoft-lm", - 1467: "csdmbase", - 1468: "csdm", - 1469: "aal-lm", - 1470: "uaiact", - 1471: "csdmbase", - 1472: "csdm", - 1473: "openmath", - 1474: "telefinder", - 1475: "taligent-lm", - 1476: "clvm-cfg", - 1477: "ms-sna-server", - 1478: "ms-sna-base", - 1479: "dberegister", - 1480: "pacerforum", - 1481: "airs", - 1482: "miteksys-lm", - 1483: "afs", - 1484: "confluent", - 1485: "lansource", - 1486: "nms-topo-serv", - 1487: "localinfosrvr", - 1488: "docstor", - 1489: "dmdocbroker", - 1490: "insitu-conf", - 1492: "stone-design-1", - 1493: "netmap-lm", - 1494: "ica", - 1495: "cvc", - 1496: "liberty-lm", - 1497: "rfx-lm", - 1498: "sybase-sqlany", - 1499: "fhc", - 1500: "vlsi-lm", - 1501: "saiscm", - 1502: "shivadiscovery", - 1503: "imtc-mcs", - 1504: "evb-elm", - 1505: "funkproxy", - 1506: "utcd", - 1507: "symplex", - 1508: "diagmond", - 1509: "robcad-lm", - 1510: "mvx-lm", - 1511: "3l-l1", - 1512: "wins", - 1513: "fujitsu-dtc", - 1514: "fujitsu-dtcns", - 1515: "ifor-protocol", - 1516: "vpad", - 1517: "vpac", - 1518: "vpvd", - 1519: "vpvc", - 1520: "atm-zip-office", - 1521: "ncube-lm", - 1522: "ricardo-lm", - 1523: "cichild-lm", - 1524: "ingreslock", - 1525: "orasrv", - 1526: "pdap-np", - 1527: "tlisrv", - 1528: "ngr-t", - 1529: "coauthor", - 1530: "rap-service", - 1531: "rap-listen", - 1532: "miroconnect", - 1533: "virtual-places", - 1534: "micromuse-lm", - 1535: "ampr-info", - 1536: "ampr-inter", - 1537: "sdsc-lm", - 1538: "3ds-lm", - 1539: "intellistor-lm", - 1540: "rds", - 1541: "rds2", - 1542: "gridgen-elmd", - 1543: "simba-cs", - 1544: "aspeclmd", - 1545: "vistium-share", - 1546: "abbaccuray", - 1547: "laplink", - 1548: "axon-lm", - 1549: "shivasound", - 1550: "3m-image-lm", - 1551: "hecmtl-db", - 1552: "pciarray", - 1553: "sna-cs", - 1554: "caci-lm", - 1555: "livelan", - 1556: "veritas-pbx", - 1557: "arbortext-lm", - 1558: "xingmpeg", - 1559: "web2host", - 1560: "asci-val", - 1561: "facilityview", - 1562: "pconnectmgr", - 1563: "cadabra-lm", - 1564: "pay-per-view", - 1565: "winddlb", - 1566: "corelvideo", - 1567: "jlicelmd", - 1568: "tsspmap", - 1569: "ets", - 1570: "orbixd", - 1571: "rdb-dbs-disp", - 1572: "chip-lm", - 1573: "itscomm-ns", - 1574: "mvel-lm", - 1575: "oraclenames", - 1576: "moldflow-lm", - 1577: "hypercube-lm", - 1578: "jacobus-lm", - 1579: "ioc-sea-lm", - 1580: "tn-tl-r2", - 1581: "mil-2045-47001", - 1582: "msims", - 1583: "simbaexpress", - 1584: "tn-tl-fd2", - 1585: "intv", - 1586: "ibm-abtact", - 1587: "pra-elmd", - 1588: "triquest-lm", - 1589: "vqp", - 1590: "gemini-lm", - 1591: "ncpm-pm", - 1592: "commonspace", - 1593: "mainsoft-lm", - 1594: "sixtrak", - 1595: "radio", - 1596: "radio-bc", - 1597: "orbplus-iiop", - 1598: "picknfs", - 1599: "simbaservices", - 1600: "issd", - 1601: "aas", - 1602: "inspect", - 1603: "picodbc", - 1604: "icabrowser", - 1605: "slp", - 1606: "slm-api", - 1607: "stt", - 1608: "smart-lm", - 1609: "isysg-lm", - 1610: "taurus-wh", - 1611: "ill", - 1612: "netbill-trans", - 1613: "netbill-keyrep", - 1614: "netbill-cred", - 1615: "netbill-auth", - 1616: "netbill-prod", - 1617: "nimrod-agent", - 1618: "skytelnet", - 1619: "xs-openstorage", - 1620: "faxportwinport", - 1621: "softdataphone", - 1622: "ontime", - 1623: "jaleosnd", - 1624: "udp-sr-port", - 1625: "svs-omagent", - 1626: "shockwave", - 1627: "t128-gateway", - 1628: "lontalk-norm", - 1629: "lontalk-urgnt", - 1630: "oraclenet8cman", - 1631: "visitview", - 1632: "pammratc", - 1633: "pammrpc", - 1634: "loaprobe", - 1635: "edb-server1", - 1636: "isdc", - 1637: "islc", - 1638: "ismc", - 1639: "cert-initiator", - 1640: "cert-responder", - 1641: "invision", - 1642: "isis-am", - 1643: "isis-ambc", - 1644: "saiseh", - 1645: "sightline", - 1646: "sa-msg-port", - 1647: "rsap", - 1648: "concurrent-lm", - 1649: "kermit", - 1650: "nkd", - 1651: "shiva-confsrvr", - 1652: "xnmp", - 1653: "alphatech-lm", - 1654: "stargatealerts", - 1655: "dec-mbadmin", - 1656: "dec-mbadmin-h", - 1657: "fujitsu-mmpdc", - 1658: "sixnetudr", - 1659: "sg-lm", - 1660: "skip-mc-gikreq", - 1661: "netview-aix-1", - 1662: "netview-aix-2", - 1663: "netview-aix-3", - 1664: "netview-aix-4", - 1665: "netview-aix-5", - 1666: "netview-aix-6", - 1667: "netview-aix-7", - 1668: "netview-aix-8", - 1669: "netview-aix-9", - 1670: "netview-aix-10", - 1671: "netview-aix-11", - 1672: "netview-aix-12", - 1673: "proshare-mc-1", - 1674: "proshare-mc-2", - 1675: "pdp", - 1676: "netcomm2", - 1677: "groupwise", - 1678: "prolink", - 1679: "darcorp-lm", - 1680: "microcom-sbp", - 1681: "sd-elmd", - 1682: "lanyon-lantern", - 1683: "ncpm-hip", - 1684: "snaresecure", - 1685: "n2nremote", - 1686: "cvmon", - 1687: "nsjtp-ctrl", - 1688: "nsjtp-data", - 1689: "firefox", - 1690: "ng-umds", - 1691: "empire-empuma", - 1692: "sstsys-lm", - 1693: "rrirtr", - 1694: "rrimwm", - 1695: "rrilwm", - 1696: "rrifmm", - 1697: "rrisat", - 1698: "rsvp-encap-1", - 1699: "rsvp-encap-2", - 1700: "mps-raft", - 1701: "l2f", - 1702: "deskshare", - 1703: "hb-engine", - 1704: "bcs-broker", - 1705: "slingshot", - 1706: "jetform", - 1707: "vdmplay", - 1708: "gat-lmd", - 1709: "centra", - 1710: "impera", - 1711: "pptconference", - 1712: "registrar", - 1713: "conferencetalk", - 1714: "sesi-lm", - 1715: "houdini-lm", - 1716: "xmsg", - 1717: "fj-hdnet", - 1718: "h323gatedisc", - 1719: "h323gatestat", - 1720: "h323hostcall", - 1721: "caicci", - 1722: "hks-lm", - 1723: "pptp", - 1724: "csbphonemaster", - 1725: "iden-ralp", - 1726: "iberiagames", - 1727: "winddx", - 1728: "telindus", - 1729: "citynl", - 1730: "roketz", - 1731: "msiccp", - 1732: "proxim", - 1733: "siipat", - 1734: "cambertx-lm", - 1735: "privatechat", - 1736: "street-stream", - 1737: "ultimad", - 1738: "gamegen1", - 1739: "webaccess", - 1740: "encore", - 1741: "cisco-net-mgmt", - 1742: "3Com-nsd", - 1743: "cinegrfx-lm", - 1744: "ncpm-ft", - 1745: "remote-winsock", - 1746: "ftrapid-1", - 1747: "ftrapid-2", - 1748: "oracle-em1", - 1749: "aspen-services", - 1750: "sslp", - 1751: "swiftnet", - 1752: "lofr-lm", - 1754: "oracle-em2", - 1755: "ms-streaming", - 1756: "capfast-lmd", - 1757: "cnhrp", - 1758: "tftp-mcast", - 1759: "spss-lm", - 1760: "www-ldap-gw", - 1761: "cft-0", - 1762: "cft-1", - 1763: "cft-2", - 1764: "cft-3", - 1765: "cft-4", - 1766: "cft-5", - 1767: "cft-6", - 1768: "cft-7", - 1769: "bmc-net-adm", - 1770: "bmc-net-svc", - 1771: "vaultbase", - 1772: "essweb-gw", - 1773: "kmscontrol", - 1774: "global-dtserv", - 1776: "femis", - 1777: "powerguardian", - 1778: "prodigy-intrnet", - 1779: "pharmasoft", - 1780: "dpkeyserv", - 1781: "answersoft-lm", - 1782: "hp-hcip", - 1784: "finle-lm", - 1785: "windlm", - 1786: "funk-logger", - 1787: "funk-license", - 1788: "psmond", - 1789: "hello", - 1790: "nmsp", - 1791: "ea1", - 1792: "ibm-dt-2", - 1793: "rsc-robot", - 1794: "cera-bcm", - 1795: "dpi-proxy", - 1796: "vocaltec-admin", - 1797: "uma", - 1798: "etp", - 1799: "netrisk", - 1800: "ansys-lm", - 1801: "msmq", - 1802: "concomp1", - 1803: "hp-hcip-gwy", - 1804: "enl", - 1805: "enl-name", - 1806: "musiconline", - 1807: "fhsp", - 1808: "oracle-vp2", - 1809: "oracle-vp1", - 1810: "jerand-lm", - 1811: "scientia-sdb", - 1812: "radius", - 1813: "radius-acct", - 1814: "tdp-suite", - 1815: "mmpft", - 1816: "harp", - 1817: "rkb-oscs", - 1818: "etftp", - 1819: "plato-lm", - 1820: "mcagent", - 1821: "donnyworld", - 1822: "es-elmd", - 1823: "unisys-lm", - 1824: "metrics-pas", - 1825: "direcpc-video", - 1826: "ardt", - 1827: "asi", - 1828: "itm-mcell-u", - 1829: "optika-emedia", - 1830: "net8-cman", - 1831: "myrtle", - 1832: "tht-treasure", - 1833: "udpradio", - 1834: "ardusuni", - 1835: "ardusmul", - 1836: "ste-smsc", - 1837: "csoft1", - 1838: "talnet", - 1839: "netopia-vo1", - 1840: "netopia-vo2", - 1841: "netopia-vo3", - 1842: "netopia-vo4", - 1843: "netopia-vo5", - 1844: "direcpc-dll", - 1845: "altalink", - 1846: "tunstall-pnc", - 1847: "slp-notify", - 1848: "fjdocdist", - 1849: "alpha-sms", - 1850: "gsi", - 1851: "ctcd", - 1852: "virtual-time", - 1853: "vids-avtp", - 1854: "buddy-draw", - 1855: "fiorano-rtrsvc", - 1856: "fiorano-msgsvc", - 1857: "datacaptor", - 1858: "privateark", - 1859: "gammafetchsvr", - 1860: "sunscalar-svc", - 1861: "lecroy-vicp", - 1862: "mysql-cm-agent", - 1863: "msnp", - 1864: "paradym-31port", - 1865: "entp", - 1866: "swrmi", - 1867: "udrive", - 1868: "viziblebrowser", - 1869: "transact", - 1870: "sunscalar-dns", - 1871: "canocentral0", - 1872: "canocentral1", - 1873: "fjmpjps", - 1874: "fjswapsnp", - 1875: "westell-stats", - 1876: "ewcappsrv", - 1877: "hp-webqosdb", - 1878: "drmsmc", - 1879: "nettgain-nms", - 1880: "vsat-control", - 1881: "ibm-mqseries2", - 1882: "ecsqdmn", - 1883: "mqtt", - 1884: "idmaps", - 1885: "vrtstrapserver", - 1886: "leoip", - 1887: "filex-lport", - 1888: "ncconfig", - 1889: "unify-adapter", - 1890: "wilkenlistener", - 1891: "childkey-notif", - 1892: "childkey-ctrl", - 1893: "elad", - 1894: "o2server-port", - 1896: "b-novative-ls", - 1897: "metaagent", - 1898: "cymtec-port", - 1899: "mc2studios", - 1900: "ssdp", - 1901: "fjicl-tep-a", - 1902: "fjicl-tep-b", - 1903: "linkname", - 1904: "fjicl-tep-c", - 1905: "sugp", - 1906: "tpmd", - 1907: "intrastar", - 1908: "dawn", - 1909: "global-wlink", - 1910: "ultrabac", - 1911: "mtp", - 1912: "rhp-iibp", - 1913: "armadp", - 1914: "elm-momentum", - 1915: "facelink", - 1916: "persona", - 1917: "noagent", - 1918: "can-nds", - 1919: "can-dch", - 1920: "can-ferret", - 1921: "noadmin", - 1922: "tapestry", - 1923: "spice", - 1924: "xiip", - 1925: "discovery-port", - 1926: "egs", - 1927: "videte-cipc", - 1928: "emsd-port", - 1929: "bandwiz-system", - 1930: "driveappserver", - 1931: "amdsched", - 1932: "ctt-broker", - 1933: "xmapi", - 1934: "xaapi", - 1935: "macromedia-fcs", - 1936: "jetcmeserver", - 1937: "jwserver", - 1938: "jwclient", - 1939: "jvserver", - 1940: "jvclient", - 1941: "dic-aida", - 1942: "res", - 1943: "beeyond-media", - 1944: "close-combat", - 1945: "dialogic-elmd", - 1946: "tekpls", - 1947: "sentinelsrm", - 1948: "eye2eye", - 1949: "ismaeasdaqlive", - 1950: "ismaeasdaqtest", - 1951: "bcs-lmserver", - 1952: "mpnjsc", - 1953: "rapidbase", - 1954: "abr-api", - 1955: "abr-secure", - 1956: "vrtl-vmf-ds", - 1957: "unix-status", - 1958: "dxadmind", - 1959: "simp-all", - 1960: "nasmanager", - 1961: "bts-appserver", - 1962: "biap-mp", - 1963: "webmachine", - 1964: "solid-e-engine", - 1965: "tivoli-npm", - 1966: "slush", - 1967: "sns-quote", - 1968: "lipsinc", - 1969: "lipsinc1", - 1970: "netop-rc", - 1971: "netop-school", - 1972: "intersys-cache", - 1973: "dlsrap", - 1974: "drp", - 1975: "tcoflashagent", - 1976: "tcoregagent", - 1977: "tcoaddressbook", - 1978: "unisql", - 1979: "unisql-java", - 1980: "pearldoc-xact", - 1981: "p2pq", - 1982: "estamp", - 1983: "lhtp", - 1984: "bb", - 1985: "hsrp", - 1986: "licensedaemon", - 1987: "tr-rsrb-p1", - 1988: "tr-rsrb-p2", - 1989: "tr-rsrb-p3", - 1990: "stun-p1", - 1991: "stun-p2", - 1992: "stun-p3", - 1993: "snmp-tcp-port", - 1994: "stun-port", - 1995: "perf-port", - 1996: "tr-rsrb-port", - 1997: "gdp-port", - 1998: "x25-svc-port", - 1999: "tcp-id-port", - 2000: "cisco-sccp", - 2001: "wizard", - 2002: "globe", - 2003: "brutus", - 2004: "emce", - 2005: "oracle", - 2006: "raid-cd", - 2007: "raid-am", - 2008: "terminaldb", - 2009: "whosockami", - 2010: "pipe-server", - 2011: "servserv", - 2012: "raid-ac", - 2013: "raid-cd", - 2014: "raid-sf", - 2015: "raid-cs", - 2016: "bootserver", - 2017: "bootclient", - 2018: "rellpack", - 2019: "about", - 2020: "xinupageserver", - 2021: "xinuexpansion1", - 2022: "xinuexpansion2", - 2023: "xinuexpansion3", - 2024: "xinuexpansion4", - 2025: "xribs", - 2026: "scrabble", - 2027: "shadowserver", - 2028: "submitserver", - 2029: "hsrpv6", - 2030: "device2", - 2031: "mobrien-chat", - 2032: "blackboard", - 2033: "glogger", - 2034: "scoremgr", - 2035: "imsldoc", - 2036: "e-dpnet", - 2037: "applus", - 2038: "objectmanager", - 2039: "prizma", - 2040: "lam", - 2041: "interbase", - 2042: "isis", - 2043: "isis-bcast", - 2044: "rimsl", - 2045: "cdfunc", - 2046: "sdfunc", - 2047: "dls", - 2048: "dls-monitor", - 2049: "shilp", - 2050: "av-emb-config", - 2051: "epnsdp", - 2052: "clearvisn", - 2053: "lot105-ds-upd", - 2054: "weblogin", - 2055: "iop", - 2056: "omnisky", - 2057: "rich-cp", - 2058: "newwavesearch", - 2059: "bmc-messaging", - 2060: "teleniumdaemon", - 2061: "netmount", - 2062: "icg-swp", - 2063: "icg-bridge", - 2064: "icg-iprelay", - 2065: "dlsrpn", - 2066: "aura", - 2067: "dlswpn", - 2068: "avauthsrvprtcl", - 2069: "event-port", - 2070: "ah-esp-encap", - 2071: "acp-port", - 2072: "msync", - 2073: "gxs-data-port", - 2074: "vrtl-vmf-sa", - 2075: "newlixengine", - 2076: "newlixconfig", - 2077: "tsrmagt", - 2078: "tpcsrvr", - 2079: "idware-router", - 2080: "autodesk-nlm", - 2081: "kme-trap-port", - 2082: "infowave", - 2083: "radsec", - 2084: "sunclustergeo", - 2085: "ada-cip", - 2086: "gnunet", - 2087: "eli", - 2088: "ip-blf", - 2089: "sep", - 2090: "lrp", - 2091: "prp", - 2092: "descent3", - 2093: "nbx-cc", - 2094: "nbx-au", - 2095: "nbx-ser", - 2096: "nbx-dir", - 2097: "jetformpreview", - 2098: "dialog-port", - 2099: "h2250-annex-g", - 2100: "amiganetfs", - 2101: "rtcm-sc104", - 2102: "zephyr-srv", - 2103: "zephyr-clt", - 2104: "zephyr-hm", - 2105: "minipay", - 2106: "mzap", - 2107: "bintec-admin", - 2108: "comcam", - 2109: "ergolight", - 2110: "umsp", - 2111: "dsatp", - 2112: "idonix-metanet", - 2113: "hsl-storm", - 2114: "newheights", - 2115: "kdm", - 2116: "ccowcmr", - 2117: "mentaclient", - 2118: "mentaserver", - 2119: "gsigatekeeper", - 2120: "qencp", - 2121: "scientia-ssdb", - 2122: "caupc-remote", - 2123: "gtp-control", - 2124: "elatelink", - 2125: "lockstep", - 2126: "pktcable-cops", - 2127: "index-pc-wb", - 2128: "net-steward", - 2129: "cs-live", - 2130: "xds", - 2131: "avantageb2b", - 2132: "solera-epmap", - 2133: "zymed-zpp", - 2134: "avenue", - 2135: "gris", - 2136: "appworxsrv", - 2137: "connect", - 2138: "unbind-cluster", - 2139: "ias-auth", - 2140: "ias-reg", - 2141: "ias-admind", - 2142: "tdmoip", - 2143: "lv-jc", - 2144: "lv-ffx", - 2145: "lv-pici", - 2146: "lv-not", - 2147: "lv-auth", - 2148: "veritas-ucl", - 2149: "acptsys", - 2150: "dynamic3d", - 2151: "docent", - 2152: "gtp-user", - 2153: "ctlptc", - 2154: "stdptc", - 2155: "brdptc", - 2156: "trp", - 2157: "xnds", - 2158: "touchnetplus", - 2159: "gdbremote", - 2160: "apc-2160", - 2161: "apc-2161", - 2162: "navisphere", - 2163: "navisphere-sec", - 2164: "ddns-v3", - 2165: "x-bone-api", - 2166: "iwserver", - 2167: "raw-serial", - 2168: "easy-soft-mux", - 2169: "brain", - 2170: "eyetv", - 2171: "msfw-storage", - 2172: "msfw-s-storage", - 2173: "msfw-replica", - 2174: "msfw-array", - 2175: "airsync", - 2176: "rapi", - 2177: "qwave", - 2178: "bitspeer", - 2179: "vmrdp", - 2180: "mc-gt-srv", - 2181: "eforward", - 2182: "cgn-stat", - 2183: "cgn-config", - 2184: "nvd", - 2185: "onbase-dds", - 2186: "gtaua", - 2187: "ssmd", - 2190: "tivoconnect", - 2191: "tvbus", - 2192: "asdis", - 2193: "drwcs", - 2197: "mnp-exchange", - 2198: "onehome-remote", - 2199: "onehome-help", - 2200: "ici", - 2201: "ats", - 2202: "imtc-map", - 2203: "b2-runtime", - 2204: "b2-license", - 2205: "jps", - 2206: "hpocbus", - 2207: "hpssd", - 2208: "hpiod", - 2209: "rimf-ps", - 2210: "noaaport", - 2211: "emwin", - 2212: "leecoposserver", - 2213: "kali", - 2214: "rpi", - 2215: "ipcore", - 2216: "vtu-comms", - 2217: "gotodevice", - 2218: "bounzza", - 2219: "netiq-ncap", - 2220: "netiq", - 2221: "ethernet-ip-s", - 2222: "EtherNet-IP-1", - 2223: "rockwell-csp2", - 2224: "efi-mg", - 2226: "di-drm", - 2227: "di-msg", - 2228: "ehome-ms", - 2229: "datalens", - 2230: "queueadm", - 2231: "wimaxasncp", - 2232: "ivs-video", - 2233: "infocrypt", - 2234: "directplay", - 2235: "sercomm-wlink", - 2236: "nani", - 2237: "optech-port1-lm", - 2238: "aviva-sna", - 2239: "imagequery", - 2240: "recipe", - 2241: "ivsd", - 2242: "foliocorp", - 2243: "magicom", - 2244: "nmsserver", - 2245: "hao", - 2246: "pc-mta-addrmap", - 2247: "antidotemgrsvr", - 2248: "ums", - 2249: "rfmp", - 2250: "remote-collab", - 2251: "dif-port", - 2252: "njenet-ssl", - 2253: "dtv-chan-req", - 2254: "seispoc", - 2255: "vrtp", - 2256: "pcc-mfp", - 2257: "simple-tx-rx", - 2258: "rcts", - 2260: "apc-2260", - 2261: "comotionmaster", - 2262: "comotionback", - 2263: "ecwcfg", - 2264: "apx500api-1", - 2265: "apx500api-2", - 2266: "mfserver", - 2267: "ontobroker", - 2268: "amt", - 2269: "mikey", - 2270: "starschool", - 2271: "mmcals", - 2272: "mmcal", - 2273: "mysql-im", - 2274: "pcttunnell", - 2275: "ibridge-data", - 2276: "ibridge-mgmt", - 2277: "bluectrlproxy", - 2278: "s3db", - 2279: "xmquery", - 2280: "lnvpoller", - 2281: "lnvconsole", - 2282: "lnvalarm", - 2283: "lnvstatus", - 2284: "lnvmaps", - 2285: "lnvmailmon", - 2286: "nas-metering", - 2287: "dna", - 2288: "netml", - 2289: "dict-lookup", - 2290: "sonus-logging", - 2291: "eapsp", - 2292: "mib-streaming", - 2293: "npdbgmngr", - 2294: "konshus-lm", - 2295: "advant-lm", - 2296: "theta-lm", - 2297: "d2k-datamover1", - 2298: "d2k-datamover2", - 2299: "pc-telecommute", - 2300: "cvmmon", - 2301: "cpq-wbem", - 2302: "binderysupport", - 2303: "proxy-gateway", - 2304: "attachmate-uts", - 2305: "mt-scaleserver", - 2306: "tappi-boxnet", - 2307: "pehelp", - 2308: "sdhelp", - 2309: "sdserver", - 2310: "sdclient", - 2311: "messageservice", - 2312: "wanscaler", - 2313: "iapp", - 2314: "cr-websystems", - 2315: "precise-sft", - 2316: "sent-lm", - 2317: "attachmate-g32", - 2318: "cadencecontrol", - 2319: "infolibria", - 2320: "siebel-ns", - 2321: "rdlap", - 2322: "ofsd", - 2323: "3d-nfsd", - 2324: "cosmocall", - 2325: "ansysli", - 2326: "idcp", - 2327: "xingcsm", - 2328: "netrix-sftm", - 2329: "nvd", - 2330: "tscchat", - 2331: "agentview", - 2332: "rcc-host", - 2333: "snapp", - 2334: "ace-client", - 2335: "ace-proxy", - 2336: "appleugcontrol", - 2337: "ideesrv", - 2338: "norton-lambert", - 2339: "3com-webview", - 2340: "wrs-registry", - 2341: "xiostatus", - 2342: "manage-exec", - 2343: "nati-logos", - 2344: "fcmsys", - 2345: "dbm", - 2346: "redstorm-join", - 2347: "redstorm-find", - 2348: "redstorm-info", - 2349: "redstorm-diag", - 2350: "psbserver", - 2351: "psrserver", - 2352: "pslserver", - 2353: "pspserver", - 2354: "psprserver", - 2355: "psdbserver", - 2356: "gxtelmd", - 2357: "unihub-server", - 2358: "futrix", - 2359: "flukeserver", - 2360: "nexstorindltd", - 2361: "tl1", - 2362: "digiman", - 2363: "mediacntrlnfsd", - 2364: "oi-2000", - 2365: "dbref", - 2366: "qip-login", - 2367: "service-ctrl", - 2368: "opentable", - 2370: "l3-hbmon", - 2372: "lanmessenger", - 2381: "compaq-https", - 2382: "ms-olap3", - 2383: "ms-olap4", - 2384: "sd-capacity", - 2385: "sd-data", - 2386: "virtualtape", - 2387: "vsamredirector", - 2388: "mynahautostart", - 2389: "ovsessionmgr", - 2390: "rsmtp", - 2391: "3com-net-mgmt", - 2392: "tacticalauth", - 2393: "ms-olap1", - 2394: "ms-olap2", - 2395: "lan900-remote", - 2396: "wusage", - 2397: "ncl", - 2398: "orbiter", - 2399: "fmpro-fdal", - 2400: "opequus-server", - 2401: "cvspserver", - 2402: "taskmaster2000", - 2403: "taskmaster2000", - 2404: "iec-104", - 2405: "trc-netpoll", - 2406: "jediserver", - 2407: "orion", - 2409: "sns-protocol", - 2410: "vrts-registry", - 2411: "netwave-ap-mgmt", - 2412: "cdn", - 2413: "orion-rmi-reg", - 2414: "beeyond", - 2415: "codima-rtp", - 2416: "rmtserver", - 2417: "composit-server", - 2418: "cas", - 2419: "attachmate-s2s", - 2420: "dslremote-mgmt", - 2421: "g-talk", - 2422: "crmsbits", - 2423: "rnrp", - 2424: "kofax-svr", - 2425: "fjitsuappmgr", - 2426: "vcmp", - 2427: "mgcp-gateway", - 2428: "ott", - 2429: "ft-role", - 2430: "venus", - 2431: "venus-se", - 2432: "codasrv", - 2433: "codasrv-se", - 2434: "pxc-epmap", - 2435: "optilogic", - 2436: "topx", - 2437: "unicontrol", - 2438: "msp", - 2439: "sybasedbsynch", - 2440: "spearway", - 2441: "pvsw-inet", - 2442: "netangel", - 2443: "powerclientcsf", - 2444: "btpp2sectrans", - 2445: "dtn1", - 2446: "bues-service", - 2447: "ovwdb", - 2448: "hpppssvr", - 2449: "ratl", - 2450: "netadmin", - 2451: "netchat", - 2452: "snifferclient", - 2453: "madge-ltd", - 2454: "indx-dds", - 2455: "wago-io-system", - 2456: "altav-remmgt", - 2457: "rapido-ip", - 2458: "griffin", - 2459: "community", - 2460: "ms-theater", - 2461: "qadmifoper", - 2462: "qadmifevent", - 2463: "lsi-raid-mgmt", - 2464: "direcpc-si", - 2465: "lbm", - 2466: "lbf", - 2467: "high-criteria", - 2468: "qip-msgd", - 2469: "mti-tcs-comm", - 2470: "taskman-port", - 2471: "seaodbc", - 2472: "c3", - 2473: "aker-cdp", - 2474: "vitalanalysis", - 2475: "ace-server", - 2476: "ace-svr-prop", - 2477: "ssm-cvs", - 2478: "ssm-cssps", - 2479: "ssm-els", - 2480: "powerexchange", - 2481: "giop", - 2482: "giop-ssl", - 2483: "ttc", - 2484: "ttc-ssl", - 2485: "netobjects1", - 2486: "netobjects2", - 2487: "pns", - 2488: "moy-corp", - 2489: "tsilb", - 2490: "qip-qdhcp", - 2491: "conclave-cpp", - 2492: "groove", - 2493: "talarian-mqs", - 2494: "bmc-ar", - 2495: "fast-rem-serv", - 2496: "dirgis", - 2497: "quaddb", - 2498: "odn-castraq", - 2499: "unicontrol", - 2500: "rtsserv", - 2501: "rtsclient", - 2502: "kentrox-prot", - 2503: "nms-dpnss", - 2504: "wlbs", - 2505: "ppcontrol", - 2506: "jbroker", - 2507: "spock", - 2508: "jdatastore", - 2509: "fjmpss", - 2510: "fjappmgrbulk", - 2511: "metastorm", - 2512: "citrixima", - 2513: "citrixadmin", - 2514: "facsys-ntp", - 2515: "facsys-router", - 2516: "maincontrol", - 2517: "call-sig-trans", - 2518: "willy", - 2519: "globmsgsvc", - 2520: "pvsw", - 2521: "adaptecmgr", - 2522: "windb", - 2523: "qke-llc-v3", - 2524: "optiwave-lm", - 2525: "ms-v-worlds", - 2526: "ema-sent-lm", - 2527: "iqserver", - 2528: "ncr-ccl", - 2529: "utsftp", - 2530: "vrcommerce", - 2531: "ito-e-gui", - 2532: "ovtopmd", - 2533: "snifferserver", - 2534: "combox-web-acc", - 2535: "madcap", - 2536: "btpp2audctr1", - 2537: "upgrade", - 2538: "vnwk-prapi", - 2539: "vsiadmin", - 2540: "lonworks", - 2541: "lonworks2", - 2542: "udrawgraph", - 2543: "reftek", - 2544: "novell-zen", - 2545: "sis-emt", - 2546: "vytalvaultbrtp", - 2547: "vytalvaultvsmp", - 2548: "vytalvaultpipe", - 2549: "ipass", - 2550: "ads", - 2551: "isg-uda-server", - 2552: "call-logging", - 2553: "efidiningport", - 2554: "vcnet-link-v10", - 2555: "compaq-wcp", - 2556: "nicetec-nmsvc", - 2557: "nicetec-mgmt", - 2558: "pclemultimedia", - 2559: "lstp", - 2560: "labrat", - 2561: "mosaixcc", - 2562: "delibo", - 2563: "cti-redwood", - 2564: "hp-3000-telnet", - 2565: "coord-svr", - 2566: "pcs-pcw", - 2567: "clp", - 2568: "spamtrap", - 2569: "sonuscallsig", - 2570: "hs-port", - 2571: "cecsvc", - 2572: "ibp", - 2573: "trustestablish", - 2574: "blockade-bpsp", - 2575: "hl7", - 2576: "tclprodebugger", - 2577: "scipticslsrvr", - 2578: "rvs-isdn-dcp", - 2579: "mpfoncl", - 2580: "tributary", - 2581: "argis-te", - 2582: "argis-ds", - 2583: "mon", - 2584: "cyaserv", - 2585: "netx-server", - 2586: "netx-agent", - 2587: "masc", - 2588: "privilege", - 2589: "quartus-tcl", - 2590: "idotdist", - 2591: "maytagshuffle", - 2592: "netrek", - 2593: "mns-mail", - 2594: "dts", - 2595: "worldfusion1", - 2596: "worldfusion2", - 2597: "homesteadglory", - 2598: "citriximaclient", - 2599: "snapd", - 2600: "hpstgmgr", - 2601: "discp-client", - 2602: "discp-server", - 2603: "servicemeter", - 2604: "nsc-ccs", - 2605: "nsc-posa", - 2606: "netmon", - 2607: "connection", - 2608: "wag-service", - 2609: "system-monitor", - 2610: "versa-tek", - 2611: "lionhead", - 2612: "qpasa-agent", - 2613: "smntubootstrap", - 2614: "neveroffline", - 2615: "firepower", - 2616: "appswitch-emp", - 2617: "cmadmin", - 2618: "priority-e-com", - 2619: "bruce", - 2620: "lpsrecommender", - 2621: "miles-apart", - 2622: "metricadbc", - 2623: "lmdp", - 2624: "aria", - 2625: "blwnkl-port", - 2626: "gbjd816", - 2627: "moshebeeri", - 2628: "dict", - 2629: "sitaraserver", - 2630: "sitaramgmt", - 2631: "sitaradir", - 2632: "irdg-post", - 2633: "interintelli", - 2634: "pk-electronics", - 2635: "backburner", - 2636: "solve", - 2637: "imdocsvc", - 2638: "sybaseanywhere", - 2639: "aminet", - 2640: "ami-control", - 2641: "hdl-srv", - 2642: "tragic", - 2643: "gte-samp", - 2644: "travsoft-ipx-t", - 2645: "novell-ipx-cmd", - 2646: "and-lm", - 2647: "syncserver", - 2648: "upsnotifyprot", - 2649: "vpsipport", - 2650: "eristwoguns", - 2651: "ebinsite", - 2652: "interpathpanel", - 2653: "sonus", - 2654: "corel-vncadmin", - 2655: "unglue", - 2656: "kana", - 2657: "sns-dispatcher", - 2658: "sns-admin", - 2659: "sns-query", - 2660: "gcmonitor", - 2661: "olhost", - 2662: "bintec-capi", - 2663: "bintec-tapi", - 2664: "patrol-mq-gm", - 2665: "patrol-mq-nm", - 2666: "extensis", - 2667: "alarm-clock-s", - 2668: "alarm-clock-c", - 2669: "toad", - 2670: "tve-announce", - 2671: "newlixreg", - 2672: "nhserver", - 2673: "firstcall42", - 2674: "ewnn", - 2675: "ttc-etap", - 2676: "simslink", - 2677: "gadgetgate1way", - 2678: "gadgetgate2way", - 2679: "syncserverssl", - 2680: "pxc-sapxom", - 2681: "mpnjsomb", - 2683: "ncdloadbalance", - 2684: "mpnjsosv", - 2685: "mpnjsocl", - 2686: "mpnjsomg", - 2687: "pq-lic-mgmt", - 2688: "md-cg-http", - 2689: "fastlynx", - 2690: "hp-nnm-data", - 2691: "itinternet", - 2692: "admins-lms", - 2694: "pwrsevent", - 2695: "vspread", - 2696: "unifyadmin", - 2697: "oce-snmp-trap", - 2698: "mck-ivpip", - 2699: "csoft-plusclnt", - 2700: "tqdata", - 2701: "sms-rcinfo", - 2702: "sms-xfer", - 2703: "sms-chat", - 2704: "sms-remctrl", - 2705: "sds-admin", - 2706: "ncdmirroring", - 2707: "emcsymapiport", - 2708: "banyan-net", - 2709: "supermon", - 2710: "sso-service", - 2711: "sso-control", - 2712: "aocp", - 2713: "raventbs", - 2714: "raventdm", - 2715: "hpstgmgr2", - 2716: "inova-ip-disco", - 2717: "pn-requester", - 2718: "pn-requester2", - 2719: "scan-change", - 2720: "wkars", - 2721: "smart-diagnose", - 2722: "proactivesrvr", - 2723: "watchdog-nt", - 2724: "qotps", - 2725: "msolap-ptp2", - 2726: "tams", - 2727: "mgcp-callagent", - 2728: "sqdr", - 2729: "tcim-control", - 2730: "nec-raidplus", - 2731: "fyre-messanger", - 2732: "g5m", - 2733: "signet-ctf", - 2734: "ccs-software", - 2735: "netiq-mc", - 2736: "radwiz-nms-srv", - 2737: "srp-feedback", - 2738: "ndl-tcp-ois-gw", - 2739: "tn-timing", - 2740: "alarm", - 2741: "tsb", - 2742: "tsb2", - 2743: "murx", - 2744: "honyaku", - 2745: "urbisnet", - 2746: "cpudpencap", - 2747: "fjippol-swrly", - 2748: "fjippol-polsvr", - 2749: "fjippol-cnsl", - 2750: "fjippol-port1", - 2751: "fjippol-port2", - 2752: "rsisysaccess", - 2753: "de-spot", - 2754: "apollo-cc", - 2755: "expresspay", - 2756: "simplement-tie", - 2757: "cnrp", - 2758: "apollo-status", - 2759: "apollo-gms", - 2760: "sabams", - 2761: "dicom-iscl", - 2762: "dicom-tls", - 2763: "desktop-dna", - 2764: "data-insurance", - 2765: "qip-audup", - 2766: "compaq-scp", - 2767: "uadtc", - 2768: "uacs", - 2769: "exce", - 2770: "veronica", - 2771: "vergencecm", - 2772: "auris", - 2773: "rbakcup1", - 2774: "rbakcup2", - 2775: "smpp", - 2776: "ridgeway1", - 2777: "ridgeway2", - 2778: "gwen-sonya", - 2779: "lbc-sync", - 2780: "lbc-control", - 2781: "whosells", - 2782: "everydayrc", - 2783: "aises", - 2784: "www-dev", - 2785: "aic-np", - 2786: "aic-oncrpc", - 2787: "piccolo", - 2788: "fryeserv", - 2789: "media-agent", - 2790: "plgproxy", - 2791: "mtport-regist", - 2792: "f5-globalsite", - 2793: "initlsmsad", - 2795: "livestats", - 2796: "ac-tech", - 2797: "esp-encap", - 2798: "tmesis-upshot", - 2799: "icon-discover", - 2800: "acc-raid", - 2801: "igcp", - 2802: "veritas-udp1", - 2803: "btprjctrl", - 2804: "dvr-esm", - 2805: "wta-wsp-s", - 2806: "cspuni", - 2807: "cspmulti", - 2808: "j-lan-p", - 2809: "corbaloc", - 2810: "netsteward", - 2811: "gsiftp", - 2812: "atmtcp", - 2813: "llm-pass", - 2814: "llm-csv", - 2815: "lbc-measure", - 2816: "lbc-watchdog", - 2817: "nmsigport", - 2818: "rmlnk", - 2819: "fc-faultnotify", - 2820: "univision", - 2821: "vrts-at-port", - 2822: "ka0wuc", - 2823: "cqg-netlan", - 2824: "cqg-netlan-1", - 2826: "slc-systemlog", - 2827: "slc-ctrlrloops", - 2828: "itm-lm", - 2829: "silkp1", - 2830: "silkp2", - 2831: "silkp3", - 2832: "silkp4", - 2833: "glishd", - 2834: "evtp", - 2835: "evtp-data", - 2836: "catalyst", - 2837: "repliweb", - 2838: "starbot", - 2839: "nmsigport", - 2840: "l3-exprt", - 2841: "l3-ranger", - 2842: "l3-hawk", - 2843: "pdnet", - 2844: "bpcp-poll", - 2845: "bpcp-trap", - 2846: "aimpp-hello", - 2847: "aimpp-port-req", - 2848: "amt-blc-port", - 2849: "fxp", - 2850: "metaconsole", - 2851: "webemshttp", - 2852: "bears-01", - 2853: "ispipes", - 2854: "infomover", - 2856: "cesdinv", - 2857: "simctlp", - 2858: "ecnp", - 2859: "activememory", - 2860: "dialpad-voice1", - 2861: "dialpad-voice2", - 2862: "ttg-protocol", - 2863: "sonardata", - 2864: "astromed-main", - 2865: "pit-vpn", - 2866: "iwlistener", - 2867: "esps-portal", - 2868: "npep-messaging", - 2869: "icslap", - 2870: "daishi", - 2871: "msi-selectplay", - 2872: "radix", - 2874: "dxmessagebase1", - 2875: "dxmessagebase2", - 2876: "sps-tunnel", - 2877: "bluelance", - 2878: "aap", - 2879: "ucentric-ds", - 2880: "synapse", - 2881: "ndsp", - 2882: "ndtp", - 2883: "ndnp", - 2884: "flashmsg", - 2885: "topflow", - 2886: "responselogic", - 2887: "aironetddp", - 2888: "spcsdlobby", - 2889: "rsom", - 2890: "cspclmulti", - 2891: "cinegrfx-elmd", - 2892: "snifferdata", - 2893: "vseconnector", - 2894: "abacus-remote", - 2895: "natuslink", - 2896: "ecovisiong6-1", - 2897: "citrix-rtmp", - 2898: "appliance-cfg", - 2899: "powergemplus", - 2900: "quicksuite", - 2901: "allstorcns", - 2902: "netaspi", - 2903: "suitcase", - 2904: "m2ua", - 2906: "caller9", - 2907: "webmethods-b2b", - 2908: "mao", - 2909: "funk-dialout", - 2910: "tdaccess", - 2911: "blockade", - 2912: "epicon", - 2913: "boosterware", - 2914: "gamelobby", - 2915: "tksocket", - 2916: "elvin-server", - 2917: "elvin-client", - 2918: "kastenchasepad", - 2919: "roboer", - 2920: "roboeda", - 2921: "cesdcdman", - 2922: "cesdcdtrn", - 2923: "wta-wsp-wtp-s", - 2924: "precise-vip", - 2926: "mobile-file-dl", - 2927: "unimobilectrl", - 2928: "redstone-cpss", - 2929: "amx-webadmin", - 2930: "amx-weblinx", - 2931: "circle-x", - 2932: "incp", - 2933: "4-tieropmgw", - 2934: "4-tieropmcli", - 2935: "qtp", - 2936: "otpatch", - 2937: "pnaconsult-lm", - 2938: "sm-pas-1", - 2939: "sm-pas-2", - 2940: "sm-pas-3", - 2941: "sm-pas-4", - 2942: "sm-pas-5", - 2943: "ttnrepository", - 2944: "megaco-h248", - 2945: "h248-binary", - 2946: "fjsvmpor", - 2947: "gpsd", - 2948: "wap-push", - 2949: "wap-pushsecure", - 2950: "esip", - 2951: "ottp", - 2952: "mpfwsas", - 2953: "ovalarmsrv", - 2954: "ovalarmsrv-cmd", - 2955: "csnotify", - 2956: "ovrimosdbman", - 2957: "jmact5", - 2958: "jmact6", - 2959: "rmopagt", - 2960: "dfoxserver", - 2961: "boldsoft-lm", - 2962: "iph-policy-cli", - 2963: "iph-policy-adm", - 2964: "bullant-srap", - 2965: "bullant-rap", - 2966: "idp-infotrieve", - 2967: "ssc-agent", - 2968: "enpp", - 2969: "essp", - 2970: "index-net", - 2971: "netclip", - 2972: "pmsm-webrctl", - 2973: "svnetworks", - 2974: "signal", - 2975: "fjmpcm", - 2976: "cns-srv-port", - 2977: "ttc-etap-ns", - 2978: "ttc-etap-ds", - 2979: "h263-video", - 2980: "wimd", - 2981: "mylxamport", - 2982: "iwb-whiteboard", - 2983: "netplan", - 2984: "hpidsadmin", - 2985: "hpidsagent", - 2986: "stonefalls", - 2987: "identify", - 2988: "hippad", - 2989: "zarkov", - 2990: "boscap", - 2991: "wkstn-mon", - 2992: "avenyo", - 2993: "veritas-vis1", - 2994: "veritas-vis2", - 2995: "idrs", - 2996: "vsixml", - 2997: "rebol", - 2998: "realsecure", - 2999: "remoteware-un", - 3000: "hbci", - 3002: "exlm-agent", - 3003: "cgms", - 3004: "csoftragent", - 3005: "geniuslm", - 3006: "ii-admin", - 3007: "lotusmtap", - 3008: "midnight-tech", - 3009: "pxc-ntfy", - 3010: "ping-pong", - 3011: "trusted-web", - 3012: "twsdss", - 3013: "gilatskysurfer", - 3014: "broker-service", - 3015: "nati-dstp", - 3016: "notify-srvr", - 3017: "event-listener", - 3018: "srvc-registry", - 3019: "resource-mgr", - 3020: "cifs", - 3021: "agriserver", - 3022: "csregagent", - 3023: "magicnotes", - 3024: "nds-sso", - 3025: "arepa-raft", - 3026: "agri-gateway", - 3027: "LiebDevMgmt-C", - 3028: "LiebDevMgmt-DM", - 3029: "LiebDevMgmt-A", - 3030: "arepa-cas", - 3031: "eppc", - 3032: "redwood-chat", - 3033: "pdb", - 3034: "osmosis-aeea", - 3035: "fjsv-gssagt", - 3036: "hagel-dump", - 3037: "hp-san-mgmt", - 3038: "santak-ups", - 3039: "cogitate", - 3040: "tomato-springs", - 3041: "di-traceware", - 3042: "journee", - 3043: "brp", - 3044: "epp", - 3045: "responsenet", - 3046: "di-ase", - 3047: "hlserver", - 3048: "pctrader", - 3049: "nsws", - 3050: "gds-db", - 3051: "galaxy-server", - 3052: "apc-3052", - 3053: "dsom-server", - 3054: "amt-cnf-prot", - 3055: "policyserver", - 3056: "cdl-server", - 3057: "goahead-fldup", - 3058: "videobeans", - 3059: "qsoft", - 3060: "interserver", - 3061: "cautcpd", - 3062: "ncacn-ip-tcp", - 3063: "ncadg-ip-udp", - 3064: "rprt", - 3065: "slinterbase", - 3066: "netattachsdmp", - 3067: "fjhpjp", - 3068: "ls3bcast", - 3069: "ls3", - 3070: "mgxswitch", - 3072: "csd-monitor", - 3073: "vcrp", - 3074: "xbox", - 3075: "orbix-locator", - 3076: "orbix-config", - 3077: "orbix-loc-ssl", - 3078: "orbix-cfg-ssl", - 3079: "lv-frontpanel", - 3080: "stm-pproc", - 3081: "tl1-lv", - 3082: "tl1-raw", - 3083: "tl1-telnet", - 3084: "itm-mccs", - 3085: "pcihreq", - 3086: "jdl-dbkitchen", - 3087: "asoki-sma", - 3088: "xdtp", - 3089: "ptk-alink", - 3090: "stss", - 3091: "1ci-smcs", - 3093: "rapidmq-center", - 3094: "rapidmq-reg", - 3095: "panasas", - 3096: "ndl-aps", - 3098: "umm-port", - 3099: "chmd", - 3100: "opcon-xps", - 3101: "hp-pxpib", - 3102: "slslavemon", - 3103: "autocuesmi", - 3104: "autocuetime", - 3105: "cardbox", - 3106: "cardbox-http", - 3107: "business", - 3108: "geolocate", - 3109: "personnel", - 3110: "sim-control", - 3111: "wsynch", - 3112: "ksysguard", - 3113: "cs-auth-svr", - 3114: "ccmad", - 3115: "mctet-master", - 3116: "mctet-gateway", - 3117: "mctet-jserv", - 3118: "pkagent", - 3119: "d2000kernel", - 3120: "d2000webserver", - 3122: "vtr-emulator", - 3123: "edix", - 3124: "beacon-port", - 3125: "a13-an", - 3127: "ctx-bridge", - 3128: "ndl-aas", - 3129: "netport-id", - 3130: "icpv2", - 3131: "netbookmark", - 3132: "ms-rule-engine", - 3133: "prism-deploy", - 3134: "ecp", - 3135: "peerbook-port", - 3136: "grubd", - 3137: "rtnt-1", - 3138: "rtnt-2", - 3139: "incognitorv", - 3140: "ariliamulti", - 3141: "vmodem", - 3142: "rdc-wh-eos", - 3143: "seaview", - 3144: "tarantella", - 3145: "csi-lfap", - 3146: "bears-02", - 3147: "rfio", - 3148: "nm-game-admin", - 3149: "nm-game-server", - 3150: "nm-asses-admin", - 3151: "nm-assessor", - 3152: "feitianrockey", - 3153: "s8-client-port", - 3154: "ccmrmi", - 3155: "jpegmpeg", - 3156: "indura", - 3157: "e3consultants", - 3158: "stvp", - 3159: "navegaweb-port", - 3160: "tip-app-server", - 3161: "doc1lm", - 3162: "sflm", - 3163: "res-sap", - 3164: "imprs", - 3165: "newgenpay", - 3166: "sossecollector", - 3167: "nowcontact", - 3168: "poweronnud", - 3169: "serverview-as", - 3170: "serverview-asn", - 3171: "serverview-gf", - 3172: "serverview-rm", - 3173: "serverview-icc", - 3174: "armi-server", - 3175: "t1-e1-over-ip", - 3176: "ars-master", - 3177: "phonex-port", - 3178: "radclientport", - 3179: "h2gf-w-2m", - 3180: "mc-brk-srv", - 3181: "bmcpatrolagent", - 3182: "bmcpatrolrnvu", - 3183: "cops-tls", - 3184: "apogeex-port", - 3185: "smpppd", - 3186: "iiw-port", - 3187: "odi-port", - 3188: "brcm-comm-port", - 3189: "pcle-infex", - 3190: "csvr-proxy", - 3191: "csvr-sslproxy", - 3192: "firemonrcc", - 3193: "spandataport", - 3194: "magbind", - 3195: "ncu-1", - 3196: "ncu-2", - 3197: "embrace-dp-s", - 3198: "embrace-dp-c", - 3199: "dmod-workspace", - 3200: "tick-port", - 3201: "cpq-tasksmart", - 3202: "intraintra", - 3203: "netwatcher-mon", - 3204: "netwatcher-db", - 3205: "isns", - 3206: "ironmail", - 3207: "vx-auth-port", - 3208: "pfu-prcallback", - 3209: "netwkpathengine", - 3210: "flamenco-proxy", - 3211: "avsecuremgmt", - 3212: "surveyinst", - 3213: "neon24x7", - 3214: "jmq-daemon-1", - 3215: "jmq-daemon-2", - 3216: "ferrari-foam", - 3217: "unite", - 3218: "smartpackets", - 3219: "wms-messenger", - 3220: "xnm-ssl", - 3221: "xnm-clear-text", - 3222: "glbp", - 3223: "digivote", - 3224: "aes-discovery", - 3225: "fcip-port", - 3226: "isi-irp", - 3227: "dwnmshttp", - 3228: "dwmsgserver", - 3229: "global-cd-port", - 3230: "sftdst-port", - 3231: "vidigo", - 3232: "mdtp", - 3233: "whisker", - 3234: "alchemy", - 3235: "mdap-port", - 3236: "apparenet-ts", - 3237: "apparenet-tps", - 3238: "apparenet-as", - 3239: "apparenet-ui", - 3240: "triomotion", - 3241: "sysorb", - 3242: "sdp-id-port", - 3243: "timelot", - 3244: "onesaf", - 3245: "vieo-fe", - 3246: "dvt-system", - 3247: "dvt-data", - 3248: "procos-lm", - 3249: "ssp", - 3250: "hicp", - 3251: "sysscanner", - 3252: "dhe", - 3253: "pda-data", - 3254: "pda-sys", - 3255: "semaphore", - 3256: "cpqrpm-agent", - 3257: "cpqrpm-server", - 3258: "ivecon-port", - 3259: "epncdp2", - 3260: "iscsi-target", - 3261: "winshadow", - 3262: "necp", - 3263: "ecolor-imager", - 3264: "ccmail", - 3265: "altav-tunnel", - 3266: "ns-cfg-server", - 3267: "ibm-dial-out", - 3268: "msft-gc", - 3269: "msft-gc-ssl", - 3270: "verismart", - 3271: "csoft-prev", - 3272: "user-manager", - 3273: "sxmp", - 3274: "ordinox-server", - 3275: "samd", - 3276: "maxim-asics", - 3277: "awg-proxy", - 3278: "lkcmserver", - 3279: "admind", - 3280: "vs-server", - 3281: "sysopt", - 3282: "datusorb", - 3283: "Apple Remote Desktop (Net Assistant)", - 3284: "4talk", - 3285: "plato", - 3286: "e-net", - 3287: "directvdata", - 3288: "cops", - 3289: "enpc", - 3290: "caps-lm", - 3291: "sah-lm", - 3292: "cart-o-rama", - 3293: "fg-fps", - 3294: "fg-gip", - 3295: "dyniplookup", - 3296: "rib-slm", - 3297: "cytel-lm", - 3298: "deskview", - 3299: "pdrncs", - 3302: "mcs-fastmail", - 3303: "opsession-clnt", - 3304: "opsession-srvr", - 3305: "odette-ftp", - 3306: "mysql", - 3307: "opsession-prxy", - 3308: "tns-server", - 3309: "tns-adv", - 3310: "dyna-access", - 3311: "mcns-tel-ret", - 3312: "appman-server", - 3313: "uorb", - 3314: "uohost", - 3315: "cdid", - 3316: "aicc-cmi", - 3317: "vsaiport", - 3318: "ssrip", - 3319: "sdt-lmd", - 3320: "officelink2000", - 3321: "vnsstr", - 3326: "sftu", - 3327: "bbars", - 3328: "egptlm", - 3329: "hp-device-disc", - 3330: "mcs-calypsoicf", - 3331: "mcs-messaging", - 3332: "mcs-mailsvr", - 3333: "dec-notes", - 3334: "directv-web", - 3335: "directv-soft", - 3336: "directv-tick", - 3337: "directv-catlg", - 3338: "anet-b", - 3339: "anet-l", - 3340: "anet-m", - 3341: "anet-h", - 3342: "webtie", - 3343: "ms-cluster-net", - 3344: "bnt-manager", - 3345: "influence", - 3346: "trnsprntproxy", - 3347: "phoenix-rpc", - 3348: "pangolin-laser", - 3349: "chevinservices", - 3350: "findviatv", - 3351: "btrieve", - 3352: "ssql", - 3353: "fatpipe", - 3354: "suitjd", - 3355: "ordinox-dbase", - 3356: "upnotifyps", - 3357: "adtech-test", - 3358: "mpsysrmsvr", - 3359: "wg-netforce", - 3360: "kv-server", - 3361: "kv-agent", - 3362: "dj-ilm", - 3363: "nati-vi-server", - 3364: "creativeserver", - 3365: "contentserver", - 3366: "creativepartnr", - 3372: "tip2", - 3373: "lavenir-lm", - 3374: "cluster-disc", - 3375: "vsnm-agent", - 3376: "cdbroker", - 3377: "cogsys-lm", - 3378: "wsicopy", - 3379: "socorfs", - 3380: "sns-channels", - 3381: "geneous", - 3382: "fujitsu-neat", - 3383: "esp-lm", - 3384: "hp-clic", - 3385: "qnxnetman", - 3386: "gprs-sig", - 3387: "backroomnet", - 3388: "cbserver", - 3389: "ms-wbt-server", - 3390: "dsc", - 3391: "savant", - 3392: "efi-lm", - 3393: "d2k-tapestry1", - 3394: "d2k-tapestry2", - 3395: "dyna-lm", - 3396: "printer-agent", - 3397: "cloanto-lm", - 3398: "mercantile", - 3399: "csms", - 3400: "csms2", - 3401: "filecast", - 3402: "fxaengine-net", - 3405: "nokia-ann-ch1", - 3406: "nokia-ann-ch2", - 3407: "ldap-admin", - 3408: "BESApi", - 3409: "networklens", - 3410: "networklenss", - 3411: "biolink-auth", - 3412: "xmlblaster", - 3413: "svnet", - 3414: "wip-port", - 3415: "bcinameservice", - 3416: "commandport", - 3417: "csvr", - 3418: "rnmap", - 3419: "softaudit", - 3420: "ifcp-port", - 3421: "bmap", - 3422: "rusb-sys-port", - 3423: "xtrm", - 3424: "xtrms", - 3425: "agps-port", - 3426: "arkivio", - 3427: "websphere-snmp", - 3428: "twcss", - 3429: "gcsp", - 3430: "ssdispatch", - 3431: "ndl-als", - 3432: "osdcp", - 3433: "opnet-smp", - 3434: "opencm", - 3435: "pacom", - 3436: "gc-config", - 3437: "autocueds", - 3438: "spiral-admin", - 3439: "hri-port", - 3440: "ans-console", - 3441: "connect-client", - 3442: "connect-server", - 3443: "ov-nnm-websrv", - 3444: "denali-server", - 3445: "monp", - 3446: "3comfaxrpc", - 3447: "directnet", - 3448: "dnc-port", - 3449: "hotu-chat", - 3450: "castorproxy", - 3451: "asam", - 3452: "sabp-signal", - 3453: "pscupd", - 3454: "mira", - 3455: "prsvp", - 3456: "vat", - 3457: "vat-control", - 3458: "d3winosfi", - 3459: "integral", - 3460: "edm-manager", - 3461: "edm-stager", - 3462: "edm-std-notify", - 3463: "edm-adm-notify", - 3464: "edm-mgr-sync", - 3465: "edm-mgr-cntrl", - 3466: "workflow", - 3467: "rcst", - 3468: "ttcmremotectrl", - 3469: "pluribus", - 3470: "jt400", - 3471: "jt400-ssl", - 3472: "jaugsremotec-1", - 3473: "jaugsremotec-2", - 3474: "ttntspauto", - 3475: "genisar-port", - 3476: "nppmp", - 3477: "ecomm", - 3478: "stun", - 3479: "twrpc", - 3480: "plethora", - 3481: "cleanerliverc", - 3482: "vulture", - 3483: "slim-devices", - 3484: "gbs-stp", - 3485: "celatalk", - 3486: "ifsf-hb-port", - 3487: "ltcudp", - 3488: "fs-rh-srv", - 3489: "dtp-dia", - 3490: "colubris", - 3491: "swr-port", - 3492: "tvdumtray-port", - 3493: "nut", - 3494: "ibm3494", - 3495: "seclayer-tcp", - 3496: "seclayer-tls", - 3497: "ipether232port", - 3498: "dashpas-port", - 3499: "sccip-media", - 3500: "rtmp-port", - 3501: "isoft-p2p", - 3502: "avinstalldisc", - 3503: "lsp-ping", - 3504: "ironstorm", - 3505: "ccmcomm", - 3506: "apc-3506", - 3507: "nesh-broker", - 3508: "interactionweb", - 3509: "vt-ssl", - 3510: "xss-port", - 3511: "webmail-2", - 3512: "aztec", - 3513: "arcpd", - 3514: "must-p2p", - 3515: "must-backplane", - 3516: "smartcard-port", - 3517: "802-11-iapp", - 3518: "artifact-msg", - 3519: "galileo", - 3520: "galileolog", - 3521: "mc3ss", - 3522: "nssocketport", - 3523: "odeumservlink", - 3524: "ecmport", - 3525: "eisport", - 3526: "starquiz-port", - 3527: "beserver-msg-q", - 3528: "jboss-iiop", - 3529: "jboss-iiop-ssl", - 3530: "gf", - 3531: "joltid", - 3532: "raven-rmp", - 3533: "raven-rdp", - 3534: "urld-port", - 3535: "ms-la", - 3536: "snac", - 3537: "ni-visa-remote", - 3538: "ibm-diradm", - 3539: "ibm-diradm-ssl", - 3540: "pnrp-port", - 3541: "voispeed-port", - 3542: "hacl-monitor", - 3543: "qftest-lookup", - 3544: "teredo", - 3545: "camac", - 3547: "symantec-sim", - 3548: "interworld", - 3549: "tellumat-nms", - 3550: "ssmpp", - 3551: "apcupsd", - 3552: "taserver", - 3553: "rbr-discovery", - 3554: "questnotify", - 3555: "razor", - 3556: "sky-transport", - 3557: "personalos-001", - 3558: "mcp-port", - 3559: "cctv-port", - 3560: "iniserve-port", - 3561: "bmc-onekey", - 3562: "sdbproxy", - 3563: "watcomdebug", - 3564: "esimport", - 3567: "dof-eps", - 3568: "dof-tunnel-sec", - 3569: "mbg-ctrl", - 3570: "mccwebsvr-port", - 3571: "megardsvr-port", - 3572: "megaregsvrport", - 3573: "tag-ups-1", - 3574: "dmaf-caster", - 3575: "ccm-port", - 3576: "cmc-port", - 3577: "config-port", - 3578: "data-port", - 3579: "ttat3lb", - 3580: "nati-svrloc", - 3581: "kfxaclicensing", - 3582: "press", - 3583: "canex-watch", - 3584: "u-dbap", - 3585: "emprise-lls", - 3586: "emprise-lsc", - 3587: "p2pgroup", - 3588: "sentinel", - 3589: "isomair", - 3590: "wv-csp-sms", - 3591: "gtrack-server", - 3592: "gtrack-ne", - 3593: "bpmd", - 3594: "mediaspace", - 3595: "shareapp", - 3596: "iw-mmogame", - 3597: "a14", - 3598: "a15", - 3599: "quasar-server", - 3600: "trap-daemon", - 3601: "visinet-gui", - 3602: "infiniswitchcl", - 3603: "int-rcv-cntrl", - 3604: "bmc-jmx-port", - 3605: "comcam-io", - 3606: "splitlock", - 3607: "precise-i3", - 3608: "trendchip-dcp", - 3609: "cpdi-pidas-cm", - 3610: "echonet", - 3611: "six-degrees", - 3612: "hp-dataprotect", - 3613: "alaris-disc", - 3614: "sigma-port", - 3615: "start-network", - 3616: "cd3o-protocol", - 3617: "sharp-server", - 3618: "aairnet-1", - 3619: "aairnet-2", - 3620: "ep-pcp", - 3621: "ep-nsp", - 3622: "ff-lr-port", - 3623: "haipe-discover", - 3624: "dist-upgrade", - 3625: "volley", - 3626: "bvcdaemon-port", - 3627: "jamserverport", - 3628: "ept-machine", - 3629: "escvpnet", - 3630: "cs-remote-db", - 3631: "cs-services", - 3632: "distcc", - 3633: "wacp", - 3634: "hlibmgr", - 3635: "sdo", - 3636: "servistaitsm", - 3637: "scservp", - 3638: "ehp-backup", - 3639: "xap-ha", - 3640: "netplay-port1", - 3641: "netplay-port2", - 3642: "juxml-port", - 3643: "audiojuggler", - 3644: "ssowatch", - 3645: "cyc", - 3646: "xss-srv-port", - 3647: "splitlock-gw", - 3648: "fjcp", - 3649: "nmmp", - 3650: "prismiq-plugin", - 3651: "xrpc-registry", - 3652: "vxcrnbuport", - 3653: "tsp", - 3654: "vaprtm", - 3655: "abatemgr", - 3656: "abatjss", - 3657: "immedianet-bcn", - 3658: "ps-ams", - 3659: "apple-sasl", - 3660: "can-nds-ssl", - 3661: "can-ferret-ssl", - 3662: "pserver", - 3663: "dtp", - 3664: "ups-engine", - 3665: "ent-engine", - 3666: "eserver-pap", - 3667: "infoexch", - 3668: "dell-rm-port", - 3669: "casanswmgmt", - 3670: "smile", - 3671: "efcp", - 3672: "lispworks-orb", - 3673: "mediavault-gui", - 3674: "wininstall-ipc", - 3675: "calltrax", - 3676: "va-pacbase", - 3677: "roverlog", - 3678: "ipr-dglt", - 3679: "Escale (Newton Dock)", - 3680: "npds-tracker", - 3681: "bts-x73", - 3682: "cas-mapi", - 3683: "bmc-ea", - 3684: "faxstfx-port", - 3685: "dsx-agent", - 3686: "tnmpv2", - 3687: "simple-push", - 3688: "simple-push-s", - 3689: "daap", - 3690: "svn", - 3691: "magaya-network", - 3692: "intelsync", - 3695: "bmc-data-coll", - 3696: "telnetcpcd", - 3697: "nw-license", - 3698: "sagectlpanel", - 3699: "kpn-icw", - 3700: "lrs-paging", - 3701: "netcelera", - 3702: "ws-discovery", - 3703: "adobeserver-3", - 3704: "adobeserver-4", - 3705: "adobeserver-5", - 3706: "rt-event", - 3707: "rt-event-s", - 3708: "sun-as-iiops", - 3709: "ca-idms", - 3710: "portgate-auth", - 3711: "edb-server2", - 3712: "sentinel-ent", - 3713: "tftps", - 3714: "delos-dms", - 3715: "anoto-rendezv", - 3716: "wv-csp-sms-cir", - 3717: "wv-csp-udp-cir", - 3718: "opus-services", - 3719: "itelserverport", - 3720: "ufastro-instr", - 3721: "xsync", - 3722: "xserveraid", - 3723: "sychrond", - 3724: "blizwow", - 3725: "na-er-tip", - 3726: "array-manager", - 3727: "e-mdu", - 3728: "e-woa", - 3729: "fksp-audit", - 3730: "client-ctrl", - 3731: "smap", - 3732: "m-wnn", - 3733: "multip-msg", - 3734: "synel-data", - 3735: "pwdis", - 3736: "rs-rmi", - 3738: "versatalk", - 3739: "launchbird-lm", - 3740: "heartbeat", - 3741: "wysdma", - 3742: "cst-port", - 3743: "ipcs-command", - 3744: "sasg", - 3745: "gw-call-port", - 3746: "linktest", - 3747: "linktest-s", - 3748: "webdata", - 3749: "cimtrak", - 3750: "cbos-ip-port", - 3751: "gprs-cube", - 3752: "vipremoteagent", - 3753: "nattyserver", - 3754: "timestenbroker", - 3755: "sas-remote-hlp", - 3756: "canon-capt", - 3757: "grf-port", - 3758: "apw-registry", - 3759: "exapt-lmgr", - 3760: "adtempusclient", - 3761: "gsakmp", - 3762: "gbs-smp", - 3763: "xo-wave", - 3764: "mni-prot-rout", - 3765: "rtraceroute", - 3767: "listmgr-port", - 3768: "rblcheckd", - 3769: "haipe-otnk", - 3770: "cindycollab", - 3771: "paging-port", - 3772: "ctp", - 3773: "ctdhercules", - 3774: "zicom", - 3775: "ispmmgr", - 3776: "dvcprov-port", - 3777: "jibe-eb", - 3778: "c-h-it-port", - 3779: "cognima", - 3780: "nnp", - 3781: "abcvoice-port", - 3782: "iso-tp0s", - 3783: "bim-pem", - 3784: "bfd-control", - 3785: "bfd-echo", - 3786: "upstriggervsw", - 3787: "fintrx", - 3788: "isrp-port", - 3789: "remotedeploy", - 3790: "quickbooksrds", - 3791: "tvnetworkvideo", - 3792: "sitewatch", - 3793: "dcsoftware", - 3794: "jaus", - 3795: "myblast", - 3796: "spw-dialer", - 3797: "idps", - 3798: "minilock", - 3799: "radius-dynauth", - 3800: "pwgpsi", - 3801: "ibm-mgr", - 3802: "vhd", - 3803: "soniqsync", - 3804: "iqnet-port", - 3805: "tcpdataserver", - 3806: "wsmlb", - 3807: "spugna", - 3808: "sun-as-iiops-ca", - 3809: "apocd", - 3810: "wlanauth", - 3811: "amp", - 3812: "neto-wol-server", - 3813: "rap-ip", - 3814: "neto-dcs", - 3815: "lansurveyorxml", - 3816: "sunlps-http", - 3817: "tapeware", - 3818: "crinis-hb", - 3819: "epl-slp", - 3820: "scp", - 3821: "pmcp", - 3822: "acp-discovery", - 3823: "acp-conduit", - 3824: "acp-policy", - 3825: "ffserver", - 3826: "warmux", - 3827: "netmpi", - 3828: "neteh", - 3829: "neteh-ext", - 3830: "cernsysmgmtagt", - 3831: "dvapps", - 3832: "xxnetserver", - 3833: "aipn-auth", - 3834: "spectardata", - 3835: "spectardb", - 3836: "markem-dcp", - 3837: "mkm-discovery", - 3838: "sos", - 3839: "amx-rms", - 3840: "flirtmitmir", - 3842: "nhci", - 3843: "quest-agent", - 3844: "rnm", - 3845: "v-one-spp", - 3846: "an-pcp", - 3847: "msfw-control", - 3848: "item", - 3849: "spw-dnspreload", - 3850: "qtms-bootstrap", - 3851: "spectraport", - 3852: "sse-app-config", - 3853: "sscan", - 3854: "stryker-com", - 3855: "opentrac", - 3856: "informer", - 3857: "trap-port", - 3858: "trap-port-mom", - 3859: "nav-port", - 3860: "sasp", - 3861: "winshadow-hd", - 3862: "giga-pocket", - 3863: "asap-udp", - 3865: "xpl", - 3866: "dzdaemon", - 3867: "dzoglserver", - 3869: "ovsam-mgmt", - 3870: "ovsam-d-agent", - 3871: "avocent-adsap", - 3872: "oem-agent", - 3873: "fagordnc", - 3874: "sixxsconfig", - 3875: "pnbscada", - 3876: "dl-agent", - 3877: "xmpcr-interface", - 3878: "fotogcad", - 3879: "appss-lm", - 3880: "igrs", - 3881: "idac", - 3882: "msdts1", - 3883: "vrpn", - 3884: "softrack-meter", - 3885: "topflow-ssl", - 3886: "nei-management", - 3887: "ciphire-data", - 3888: "ciphire-serv", - 3889: "dandv-tester", - 3890: "ndsconnect", - 3891: "rtc-pm-port", - 3892: "pcc-image-port", - 3893: "cgi-starapi", - 3894: "syam-agent", - 3895: "syam-smc", - 3896: "sdo-tls", - 3897: "sdo-ssh", - 3898: "senip", - 3899: "itv-control", - 3900: "udt-os", - 3901: "nimsh", - 3902: "nimaux", - 3903: "charsetmgr", - 3904: "omnilink-port", - 3905: "mupdate", - 3906: "topovista-data", - 3907: "imoguia-port", - 3908: "hppronetman", - 3909: "surfcontrolcpa", - 3910: "prnrequest", - 3911: "prnstatus", - 3912: "gbmt-stars", - 3913: "listcrt-port", - 3914: "listcrt-port-2", - 3915: "agcat", - 3916: "wysdmc", - 3917: "aftmux", - 3918: "pktcablemmcops", - 3919: "hyperip", - 3920: "exasoftport1", - 3921: "herodotus-net", - 3922: "sor-update", - 3923: "symb-sb-port", - 3924: "mpl-gprs-port", - 3925: "zmp", - 3926: "winport", - 3927: "natdataservice", - 3928: "netboot-pxe", - 3929: "smauth-port", - 3930: "syam-webserver", - 3931: "msr-plugin-port", - 3932: "dyn-site", - 3933: "plbserve-port", - 3934: "sunfm-port", - 3935: "sdp-portmapper", - 3936: "mailprox", - 3937: "dvbservdsc", - 3938: "dbcontrol-agent", - 3939: "aamp", - 3940: "xecp-node", - 3941: "homeportal-web", - 3942: "srdp", - 3943: "tig", - 3944: "sops", - 3945: "emcads", - 3946: "backupedge", - 3947: "ccp", - 3948: "apdap", - 3949: "drip", - 3950: "namemunge", - 3951: "pwgippfax", - 3952: "i3-sessionmgr", - 3953: "xmlink-connect", - 3954: "adrep", - 3955: "p2pcommunity", - 3956: "gvcp", - 3957: "mqe-broker", - 3958: "mqe-agent", - 3959: "treehopper", - 3960: "bess", - 3961: "proaxess", - 3962: "sbi-agent", - 3963: "thrp", - 3964: "sasggprs", - 3965: "ati-ip-to-ncpe", - 3966: "bflckmgr", - 3967: "ppsms", - 3968: "ianywhere-dbns", - 3969: "landmarks", - 3970: "lanrevagent", - 3971: "lanrevserver", - 3972: "iconp", - 3973: "progistics", - 3974: "citysearch", - 3975: "airshot", - 3976: "opswagent", - 3977: "opswmanager", - 3978: "secure-cfg-svr", - 3979: "smwan", - 3980: "acms", - 3981: "starfish", - 3982: "eis", - 3983: "eisp", - 3984: "mapper-nodemgr", - 3985: "mapper-mapethd", - 3986: "mapper-ws-ethd", - 3987: "centerline", - 3988: "dcs-config", - 3989: "bv-queryengine", - 3990: "bv-is", - 3991: "bv-smcsrv", - 3992: "bv-ds", - 3993: "bv-agent", - 3995: "iss-mgmt-ssl", - 3996: "abcsoftware", - 3997: "agentsease-db", - 3998: "dnx", - 3999: "nvcnet", - 4000: "terabase", - 4001: "newoak", - 4002: "pxc-spvr-ft", - 4003: "pxc-splr-ft", - 4004: "pxc-roid", - 4005: "pxc-pin", - 4006: "pxc-spvr", - 4007: "pxc-splr", - 4008: "netcheque", - 4009: "chimera-hwm", - 4010: "samsung-unidex", - 4011: "altserviceboot", - 4012: "pda-gate", - 4013: "acl-manager", - 4014: "taiclock", - 4015: "talarian-mcast1", - 4016: "talarian-mcast2", - 4017: "talarian-mcast3", - 4018: "talarian-mcast4", - 4019: "talarian-mcast5", - 4020: "trap", - 4021: "nexus-portal", - 4022: "dnox", - 4023: "esnm-zoning", - 4024: "tnp1-port", - 4025: "partimage", - 4026: "as-debug", - 4027: "bxp", - 4028: "dtserver-port", - 4029: "ip-qsig", - 4030: "jdmn-port", - 4031: "suucp", - 4032: "vrts-auth-port", - 4033: "sanavigator", - 4034: "ubxd", - 4035: "wap-push-http", - 4036: "wap-push-https", - 4037: "ravehd", - 4038: "fazzt-ptp", - 4039: "fazzt-admin", - 4040: "yo-main", - 4041: "houston", - 4042: "ldxp", - 4043: "nirp", - 4044: "ltp", - 4045: "npp", - 4046: "acp-proto", - 4047: "ctp-state", - 4049: "wafs", - 4050: "cisco-wafs", - 4051: "cppdp", - 4052: "interact", - 4053: "ccu-comm-1", - 4054: "ccu-comm-2", - 4055: "ccu-comm-3", - 4056: "lms", - 4057: "wfm", - 4058: "kingfisher", - 4059: "dlms-cosem", - 4060: "dsmeter-iatc", - 4061: "ice-location", - 4062: "ice-slocation", - 4063: "ice-router", - 4064: "ice-srouter", - 4065: "avanti-cdp", - 4066: "pmas", - 4067: "idp", - 4068: "ipfltbcst", - 4069: "minger", - 4070: "tripe", - 4071: "aibkup", - 4072: "zieto-sock", - 4073: "iRAPP", - 4074: "cequint-cityid", - 4075: "perimlan", - 4076: "seraph", - 4077: "ascomalarm", - 4079: "santools", - 4080: "lorica-in", - 4081: "lorica-in-sec", - 4082: "lorica-out", - 4083: "lorica-out-sec", - 4084: "fortisphere-vm", - 4086: "ftsync", - 4089: "opencore", - 4090: "omasgport", - 4091: "ewinstaller", - 4092: "ewdgs", - 4093: "pvxpluscs", - 4094: "sysrqd", - 4095: "xtgui", - 4096: "bre", - 4097: "patrolview", - 4098: "drmsfsd", - 4099: "dpcp", - 4100: "igo-incognito", - 4101: "brlp-0", - 4102: "brlp-1", - 4103: "brlp-2", - 4104: "brlp-3", - 4105: "shofar", - 4106: "synchronite", - 4107: "j-ac", - 4108: "accel", - 4109: "izm", - 4110: "g2tag", - 4111: "xgrid", - 4112: "apple-vpns-rp", - 4113: "aipn-reg", - 4114: "jomamqmonitor", - 4115: "cds", - 4116: "smartcard-tls", - 4117: "hillrserv", - 4118: "netscript", - 4119: "assuria-slm", - 4121: "e-builder", - 4122: "fprams", - 4123: "z-wave", - 4124: "tigv2", - 4125: "opsview-envoy", - 4126: "ddrepl", - 4127: "unikeypro", - 4128: "nufw", - 4129: "nuauth", - 4130: "fronet", - 4131: "stars", - 4132: "nuts-dem", - 4133: "nuts-bootp", - 4134: "nifty-hmi", - 4135: "cl-db-attach", - 4136: "cl-db-request", - 4137: "cl-db-remote", - 4138: "nettest", - 4139: "thrtx", - 4140: "cedros-fds", - 4141: "oirtgsvc", - 4142: "oidocsvc", - 4143: "oidsr", - 4145: "vvr-control", - 4146: "tgcconnect", - 4147: "vrxpservman", - 4148: "hhb-handheld", - 4149: "agslb", - 4150: "PowerAlert-nsa", - 4151: "menandmice-noh", - 4152: "idig-mux", - 4153: "mbl-battd", - 4154: "atlinks", - 4155: "bzr", - 4156: "stat-results", - 4157: "stat-scanner", - 4158: "stat-cc", - 4159: "nss", - 4160: "jini-discovery", - 4161: "omscontact", - 4162: "omstopology", - 4163: "silverpeakpeer", - 4164: "silverpeakcomm", - 4165: "altcp", - 4166: "joost", - 4167: "ddgn", - 4168: "pslicser", - 4169: "iadt-disc", - 4172: "pcoip", - 4173: "mma-discovery", - 4174: "sm-disc", - 4177: "wello", - 4178: "storman", - 4179: "MaxumSP", - 4180: "httpx", - 4181: "macbak", - 4182: "pcptcpservice", - 4183: "cyborgnet", - 4184: "universe-suite", - 4185: "wcpp", - 4188: "vatata", - 4191: "dsmipv6", - 4192: "azeti-bd", - 4197: "hctl", - 4199: "eims-admin", - 4300: "corelccam", - 4301: "d-data", - 4302: "d-data-control", - 4303: "srcp", - 4304: "owserver", - 4305: "batman", - 4306: "pinghgl", - 4307: "trueconf", - 4308: "compx-lockview", - 4309: "dserver", - 4310: "mirrtex", - 4320: "fdt-rcatp", - 4321: "rwhois", - 4322: "trim-event", - 4323: "trim-ice", - 4325: "geognosisman", - 4326: "geognosis", - 4327: "jaxer-web", - 4328: "jaxer-manager", - 4333: "ahsp", - 4340: "gaia", - 4341: "lisp-data", - 4342: "lisp-control", - 4343: "unicall", - 4344: "vinainstall", - 4345: "m4-network-as", - 4346: "elanlm", - 4347: "lansurveyor", - 4348: "itose", - 4349: "fsportmap", - 4350: "net-device", - 4351: "plcy-net-svcs", - 4352: "pjlink", - 4353: "f5-iquery", - 4354: "qsnet-trans", - 4355: "qsnet-workst", - 4356: "qsnet-assist", - 4357: "qsnet-cond", - 4358: "qsnet-nucl", - 4359: "omabcastltkm", - 4361: "nacnl", - 4362: "afore-vdp-disc", - 4366: "shadowstream", - 4368: "wxbrief", - 4369: "epmd", - 4370: "elpro-tunnel", - 4371: "l2c-disc", - 4372: "l2c-data", - 4373: "remctl", - 4375: "tolteces", - 4376: "bip", - 4377: "cp-spxsvr", - 4378: "cp-spxdpy", - 4379: "ctdb", - 4389: "xandros-cms", - 4390: "wiegand", - 4394: "apwi-disc", - 4395: "omnivisionesx", - 4400: "ds-srv", - 4401: "ds-srvr", - 4402: "ds-clnt", - 4403: "ds-user", - 4404: "ds-admin", - 4405: "ds-mail", - 4406: "ds-slp", - 4412: "smallchat", - 4413: "avi-nms-disc", - 4416: "pjj-player-disc", - 4418: "axysbridge", - 4420: "nvm-express", - 4425: "netrockey6", - 4426: "beacon-port-2", - 4430: "rsqlserver", - 4432: "l-acoustics", - 4441: "netblox", - 4442: "saris", - 4443: "pharos", - 4444: "krb524", - 4445: "upnotifyp", - 4446: "n1-fwp", - 4447: "n1-rmgmt", - 4448: "asc-slmd", - 4449: "privatewire", - 4450: "camp", - 4451: "ctisystemmsg", - 4452: "ctiprogramload", - 4453: "nssalertmgr", - 4454: "nssagentmgr", - 4455: "prchat-user", - 4456: "prchat-server", - 4457: "prRegister", - 4458: "mcp", - 4484: "hpssmgmt", - 4486: "icms", - 4488: "awacs-ice", - 4500: "ipsec-nat-t", - 4534: "armagetronad", - 4535: "ehs", - 4536: "ehs-ssl", - 4537: "wssauthsvc", - 4538: "swx-gate", - 4545: "worldscores", - 4546: "sf-lm", - 4547: "lanner-lm", - 4548: "synchromesh", - 4549: "aegate", - 4550: "gds-adppiw-db", - 4551: "ieee-mih", - 4552: "menandmice-mon", - 4554: "msfrs", - 4555: "rsip", - 4556: "dtn-bundle", - 4557: "mtcevrunqss", - 4558: "mtcevrunqman", - 4559: "hylafax", - 4566: "kwtc", - 4567: "tram", - 4568: "bmc-reporting", - 4569: "iax", - 4591: "l3t-at-an", - 4592: "hrpd-ith-at-an", - 4593: "ipt-anri-anri", - 4594: "ias-session", - 4595: "ias-paging", - 4596: "ias-neighbor", - 4597: "a21-an-1xbs", - 4598: "a16-an-an", - 4599: "a17-an-an", - 4600: "piranha1", - 4601: "piranha2", - 4621: "ventoso", - 4658: "playsta2-app", - 4659: "playsta2-lob", - 4660: "smaclmgr", - 4661: "kar2ouche", - 4662: "oms", - 4663: "noteit", - 4664: "ems", - 4665: "contclientms", - 4666: "eportcomm", - 4667: "mmacomm", - 4668: "mmaeds", - 4669: "eportcommdata", - 4670: "light", - 4671: "acter", - 4672: "rfa", - 4673: "cxws", - 4674: "appiq-mgmt", - 4675: "dhct-status", - 4676: "dhct-alerts", - 4677: "bcs", - 4678: "traversal", - 4679: "mgesupervision", - 4680: "mgemanagement", - 4681: "parliant", - 4682: "finisar", - 4683: "spike", - 4684: "rfid-rp1", - 4685: "autopac", - 4686: "msp-os", - 4687: "nst", - 4688: "mobile-p2p", - 4689: "altovacentral", - 4690: "prelude", - 4691: "mtn", - 4692: "conspiracy", - 4700: "netxms-agent", - 4701: "netxms-mgmt", - 4702: "netxms-sync", - 4711: "trinity-dist", - 4725: "truckstar", - 4726: "a26-fap-fgw", - 4727: "fcis-disc", - 4728: "capmux", - 4729: "gsmtap", - 4730: "gearman", - 4732: "ohmtrigger", - 4737: "ipdr-sp", - 4738: "solera-lpn", - 4739: "ipfix", - 4740: "ipfixs", - 4741: "lumimgrd", - 4742: "sicct-sdp", - 4743: "openhpid", - 4744: "ifsp", - 4745: "fmp", - 4746: "intelliadm-disc", - 4747: "buschtrommel", - 4749: "profilemac", - 4750: "ssad", - 4751: "spocp", - 4752: "snap", - 4753: "simon-disc", - 4754: "gre-in-udp", - 4755: "gre-udp-dtls", - 4784: "bfd-multi-ctl", - 4785: "cncp", - 4789: "vxlan", - 4790: "vxlan-gpe", - 4791: "roce", - 4800: "iims", - 4801: "iwec", - 4802: "ilss", - 4803: "notateit-disc", - 4804: "aja-ntv4-disc", - 4827: "htcp", - 4837: "varadero-0", - 4838: "varadero-1", - 4839: "varadero-2", - 4840: "opcua-udp", - 4841: "quosa", - 4842: "gw-asv", - 4843: "opcua-tls", - 4844: "gw-log", - 4845: "wcr-remlib", - 4846: "contamac-icm", - 4847: "wfc", - 4848: "appserv-http", - 4849: "appserv-https", - 4850: "sun-as-nodeagt", - 4851: "derby-repli", - 4867: "unify-debug", - 4868: "phrelay", - 4869: "phrelaydbg", - 4870: "cc-tracking", - 4871: "wired", - 4876: "tritium-can", - 4877: "lmcs", - 4878: "inst-discovery", - 4881: "socp-t", - 4882: "socp-c", - 4884: "hivestor", - 4885: "abbs", - 4894: "lyskom", - 4899: "radmin-port", - 4900: "hfcs", - 4914: "bones", - 4936: "an-signaling", - 4937: "atsc-mh-ssc", - 4940: "eq-office-4940", - 4941: "eq-office-4941", - 4942: "eq-office-4942", - 4949: "munin", - 4950: "sybasesrvmon", - 4951: "pwgwims", - 4952: "sagxtsds", - 4969: "ccss-qmm", - 4970: "ccss-qsm", - 4980: "ctxs-vpp", - 4986: "mrip", - 4987: "smar-se-port1", - 4988: "smar-se-port2", - 4989: "parallel", - 4990: "busycal", - 4991: "vrt", - 4999: "hfcs-manager", - 5000: "commplex-main", - 5001: "commplex-link", - 5002: "rfe", - 5003: "fmpro-internal", - 5004: "avt-profile-1", - 5005: "avt-profile-2", - 5006: "wsm-server", - 5007: "wsm-server-ssl", - 5008: "synapsis-edge", - 5009: "winfs", - 5010: "telelpathstart", - 5011: "telelpathattack", - 5012: "nsp", - 5013: "fmpro-v6", - 5014: "onpsocket", - 5020: "zenginkyo-1", - 5021: "zenginkyo-2", - 5022: "mice", - 5023: "htuilsrv", - 5024: "scpi-telnet", - 5025: "scpi-raw", - 5026: "strexec-d", - 5027: "strexec-s", - 5029: "infobright", - 5030: "surfpass", - 5031: "dmp", - 5042: "asnaacceler8db", - 5043: "swxadmin", - 5044: "lxi-evntsvc", - 5046: "vpm-udp", - 5047: "iscape", - 5049: "ivocalize", - 5050: "mmcc", - 5051: "ita-agent", - 5052: "ita-manager", - 5053: "rlm-disc", - 5055: "unot", - 5056: "intecom-ps1", - 5057: "intecom-ps2", - 5058: "locus-disc", - 5059: "sds", - 5060: "sip", - 5061: "sips", - 5062: "na-localise", - 5064: "ca-1", - 5065: "ca-2", - 5066: "stanag-5066", - 5067: "authentx", - 5069: "i-net-2000-npr", - 5070: "vtsas", - 5071: "powerschool", - 5072: "ayiya", - 5073: "tag-pm", - 5074: "alesquery", - 5078: "pixelpusher", - 5079: "cp-spxrpts", - 5080: "onscreen", - 5081: "sdl-ets", - 5082: "qcp", - 5083: "qfp", - 5084: "llrp", - 5085: "encrypted-llrp", - 5092: "magpie", - 5093: "sentinel-lm", - 5094: "hart-ip", - 5099: "sentlm-srv2srv", - 5100: "socalia", - 5101: "talarian-udp", - 5102: "oms-nonsecure", - 5104: "tinymessage", - 5105: "hughes-ap", - 5111: "taep-as-svc", - 5112: "pm-cmdsvr", - 5116: "emb-proj-cmd", - 5120: "barracuda-bbs", - 5133: "nbt-pc", - 5136: "minotaur-sa", - 5137: "ctsd", - 5145: "rmonitor-secure", - 5150: "atmp", - 5151: "esri-sde", - 5152: "sde-discovery", - 5154: "bzflag", - 5155: "asctrl-agent", - 5164: "vpa-disc", - 5165: "ife-icorp", - 5166: "winpcs", - 5167: "scte104", - 5168: "scte30", - 5190: "aol", - 5191: "aol-1", - 5192: "aol-2", - 5193: "aol-3", - 5200: "targus-getdata", - 5201: "targus-getdata1", - 5202: "targus-getdata2", - 5203: "targus-getdata3", - 5223: "hpvirtgrp", - 5224: "hpvirtctrl", - 5225: "hp-server", - 5226: "hp-status", - 5227: "perfd", - 5234: "eenet", - 5235: "galaxy-network", - 5236: "padl2sim", - 5237: "mnet-discovery", - 5245: "downtools-disc", - 5246: "capwap-control", - 5247: "capwap-data", - 5248: "caacws", - 5249: "caaclang2", - 5250: "soagateway", - 5251: "caevms", - 5252: "movaz-ssc", - 5264: "3com-njack-1", - 5265: "3com-njack-2", - 5270: "cartographerxmp", - 5271: "cuelink-disc", - 5272: "pk", - 5282: "transmit-port", - 5298: "presence", - 5299: "nlg-data", - 5300: "hacl-hb", - 5301: "hacl-gs", - 5302: "hacl-cfg", - 5303: "hacl-probe", - 5304: "hacl-local", - 5305: "hacl-test", - 5306: "sun-mc-grp", - 5307: "sco-aip", - 5308: "cfengine", - 5309: "jprinter", - 5310: "outlaws", - 5312: "permabit-cs", - 5313: "rrdp", - 5314: "opalis-rbt-ipc", - 5315: "hacl-poll", - 5343: "kfserver", - 5344: "xkotodrcp", - 5349: "stuns", - 5350: "pcp-multicast", - 5351: "pcp", - 5352: "dns-llq", - 5353: "mdns", - 5354: "mdnsresponder", - 5355: "llmnr", - 5356: "ms-smlbiz", - 5357: "wsdapi", - 5358: "wsdapi-s", - 5359: "ms-alerter", - 5360: "ms-sideshow", - 5361: "ms-s-sideshow", - 5362: "serverwsd2", - 5363: "net-projection", - 5364: "kdnet", - 5397: "stresstester", - 5398: "elektron-admin", - 5399: "securitychase", - 5400: "excerpt", - 5401: "excerpts", - 5402: "mftp", - 5403: "hpoms-ci-lstn", - 5404: "hpoms-dps-lstn", - 5405: "netsupport", - 5406: "systemics-sox", - 5407: "foresyte-clear", - 5408: "foresyte-sec", - 5409: "salient-dtasrv", - 5410: "salient-usrmgr", - 5411: "actnet", - 5412: "continuus", - 5413: "wwiotalk", - 5414: "statusd", - 5415: "ns-server", - 5416: "sns-gateway", - 5417: "sns-agent", - 5418: "mcntp", - 5419: "dj-ice", - 5420: "cylink-c", - 5421: "netsupport2", - 5422: "salient-mux", - 5423: "virtualuser", - 5424: "beyond-remote", - 5425: "br-channel", - 5426: "devbasic", - 5427: "sco-peer-tta", - 5428: "telaconsole", - 5429: "base", - 5430: "radec-corp", - 5431: "park-agent", - 5432: "postgresql", - 5433: "pyrrho", - 5434: "sgi-arrayd", - 5435: "sceanics", - 5436: "pmip6-cntl", - 5437: "pmip6-data", - 5443: "spss", - 5450: "tiepie-disc", - 5453: "surebox", - 5454: "apc-5454", - 5455: "apc-5455", - 5456: "apc-5456", - 5461: "silkmeter", - 5462: "ttl-publisher", - 5463: "ttlpriceproxy", - 5464: "quailnet", - 5465: "netops-broker", - 5474: "apsolab-rpc", - 5500: "fcp-addr-srvr1", - 5501: "fcp-addr-srvr2", - 5502: "fcp-srvr-inst1", - 5503: "fcp-srvr-inst2", - 5504: "fcp-cics-gw1", - 5505: "checkoutdb", - 5506: "amc", - 5553: "sgi-eventmond", - 5554: "sgi-esphttp", - 5555: "personal-agent", - 5556: "freeciv", - 5567: "dof-dps-mc-sec", - 5568: "sdt", - 5569: "rdmnet-device", - 5573: "sdmmp", - 5580: "tmosms0", - 5581: "tmosms1", - 5582: "fac-restore", - 5583: "tmo-icon-sync", - 5584: "bis-web", - 5585: "bis-sync", - 5597: "ininmessaging", - 5598: "mctfeed", - 5599: "esinstall", - 5600: "esmmanager", - 5601: "esmagent", - 5602: "a1-msc", - 5603: "a1-bs", - 5604: "a3-sdunode", - 5605: "a4-sdunode", - 5627: "ninaf", - 5628: "htrust", - 5629: "symantec-sfdb", - 5630: "precise-comm", - 5631: "pcanywheredata", - 5632: "pcanywherestat", - 5633: "beorl", - 5634: "xprtld", - 5670: "zre-disc", - 5671: "amqps", - 5672: "amqp", - 5673: "jms", - 5674: "hyperscsi-port", - 5675: "v5ua", - 5676: "raadmin", - 5677: "questdb2-lnchr", - 5678: "rrac", - 5679: "dccm", - 5680: "auriga-router", - 5681: "ncxcp", - 5682: "brightcore", - 5683: "coap", - 5684: "coaps", - 5687: "gog-multiplayer", - 5688: "ggz", - 5689: "qmvideo", - 5713: "proshareaudio", - 5714: "prosharevideo", - 5715: "prosharedata", - 5716: "prosharerequest", - 5717: "prosharenotify", - 5718: "dpm", - 5719: "dpm-agent", - 5720: "ms-licensing", - 5721: "dtpt", - 5722: "msdfsr", - 5723: "omhs", - 5724: "omsdk", - 5728: "io-dist-group", - 5729: "openmail", - 5730: "unieng", - 5741: "ida-discover1", - 5742: "ida-discover2", - 5743: "watchdoc-pod", - 5744: "watchdoc", - 5745: "fcopy-server", - 5746: "fcopys-server", - 5747: "tunatic", - 5748: "tunalyzer", - 5750: "rscd", - 5755: "openmailg", - 5757: "x500ms", - 5766: "openmailns", - 5767: "s-openmail", - 5768: "openmailpxy", - 5769: "spramsca", - 5770: "spramsd", - 5771: "netagent", - 5777: "dali-port", - 5781: "3par-evts", - 5782: "3par-mgmt", - 5783: "3par-mgmt-ssl", - 5784: "ibar", - 5785: "3par-rcopy", - 5786: "cisco-redu", - 5787: "waascluster", - 5793: "xtreamx", - 5794: "spdp", - 5813: "icmpd", - 5814: "spt-automation", - 5859: "wherehoo", - 5863: "ppsuitemsg", - 5900: "rfb", - 5910: "cm", - 5911: "cpdlc", - 5912: "fis", - 5913: "ads-c", - 5963: "indy", - 5968: "mppolicy-v5", - 5969: "mppolicy-mgr", - 5984: "couchdb", - 5985: "wsman", - 5986: "wsmans", - 5987: "wbem-rmi", - 5988: "wbem-http", - 5989: "wbem-https", - 5990: "wbem-exp-https", - 5991: "nuxsl", - 5992: "consul-insight", - 5999: "cvsup", - 6064: "ndl-ahp-svc", - 6065: "winpharaoh", - 6066: "ewctsp", - 6069: "trip", - 6070: "messageasap", - 6071: "ssdtp", - 6072: "diagnose-proc", - 6073: "directplay8", - 6074: "max", - 6080: "gue", - 6081: "geneve", - 6082: "p25cai", - 6083: "miami-bcast", - 6085: "konspire2b", - 6086: "pdtp", - 6087: "ldss", - 6088: "doglms-notify", - 6100: "synchronet-db", - 6101: "synchronet-rtc", - 6102: "synchronet-upd", - 6103: "rets", - 6104: "dbdb", - 6105: "primaserver", - 6106: "mpsserver", - 6107: "etc-control", - 6108: "sercomm-scadmin", - 6109: "globecast-id", - 6110: "softcm", - 6111: "spc", - 6112: "dtspcd", - 6118: "tipc", - 6122: "bex-webadmin", - 6123: "backup-express", - 6124: "pnbs", - 6133: "nbt-wol", - 6140: "pulsonixnls", - 6141: "meta-corp", - 6142: "aspentec-lm", - 6143: "watershed-lm", - 6144: "statsci1-lm", - 6145: "statsci2-lm", - 6146: "lonewolf-lm", - 6147: "montage-lm", - 6148: "ricardo-lm", - 6149: "tal-pod", - 6160: "ecmp-data", - 6161: "patrol-ism", - 6162: "patrol-coll", - 6163: "pscribe", - 6200: "lm-x", - 6201: "thermo-calc", - 6209: "qmtps", - 6222: "radmind", - 6241: "jeol-nsddp-1", - 6242: "jeol-nsddp-2", - 6243: "jeol-nsddp-3", - 6244: "jeol-nsddp-4", - 6251: "tl1-raw-ssl", - 6252: "tl1-ssh", - 6253: "crip", - 6268: "grid", - 6269: "grid-alt", - 6300: "bmc-grx", - 6301: "bmc-ctd-ldap", - 6306: "ufmp", - 6315: "scup-disc", - 6316: "abb-escp", - 6317: "nav-data", - 6320: "repsvc", - 6321: "emp-server1", - 6322: "emp-server2", - 6324: "hrd-ns-disc", - 6343: "sflow", - 6346: "gnutella-svc", - 6347: "gnutella-rtr", - 6350: "adap", - 6355: "pmcs", - 6360: "metaedit-mu", - 6363: "ndn", - 6370: "metaedit-se", - 6382: "metatude-mds", - 6389: "clariion-evr01", - 6390: "metaedit-ws", - 6417: "faxcomservice", - 6419: "svdrp-disc", - 6420: "nim-vdrshell", - 6421: "nim-wan", - 6443: "sun-sr-https", - 6444: "sge-qmaster", - 6445: "sge-execd", - 6446: "mysql-proxy", - 6455: "skip-cert-recv", - 6456: "skip-cert-send", - 6464: "ieee11073-20701", - 6471: "lvision-lm", - 6480: "sun-sr-http", - 6481: "servicetags", - 6482: "ldoms-mgmt", - 6483: "SunVTS-RMI", - 6484: "sun-sr-jms", - 6485: "sun-sr-iiop", - 6486: "sun-sr-iiops", - 6487: "sun-sr-iiop-aut", - 6488: "sun-sr-jmx", - 6489: "sun-sr-admin", - 6500: "boks", - 6501: "boks-servc", - 6502: "boks-servm", - 6503: "boks-clntd", - 6505: "badm-priv", - 6506: "badm-pub", - 6507: "bdir-priv", - 6508: "bdir-pub", - 6509: "mgcs-mfp-port", - 6510: "mcer-port", - 6511: "dccp-udp", - 6514: "syslog-tls", - 6515: "elipse-rec", - 6543: "lds-distrib", - 6544: "lds-dump", - 6547: "apc-6547", - 6548: "apc-6548", - 6549: "apc-6549", - 6550: "fg-sysupdate", - 6551: "sum", - 6558: "xdsxdm", - 6566: "sane-port", - 6568: "rp-reputation", - 6579: "affiliate", - 6580: "parsec-master", - 6581: "parsec-peer", - 6582: "parsec-game", - 6583: "joaJewelSuite", - 6619: "odette-ftps", - 6620: "kftp-data", - 6621: "kftp", - 6622: "mcftp", - 6623: "ktelnet", - 6626: "wago-service", - 6627: "nexgen", - 6628: "afesc-mc", - 6629: "nexgen-aux", - 6633: "cisco-vpath-tun", - 6634: "mpls-pm", - 6635: "mpls-udp", - 6636: "mpls-udp-dtls", - 6653: "openflow", - 6657: "palcom-disc", - 6670: "vocaltec-gold", - 6671: "p4p-portal", - 6672: "vision-server", - 6673: "vision-elmd", - 6678: "vfbp-disc", - 6679: "osaut", - 6689: "tsa", - 6696: "babel", - 6701: "kti-icad-srvr", - 6702: "e-design-net", - 6703: "e-design-web", - 6714: "ibprotocol", - 6715: "fibotrader-com", - 6767: "bmc-perf-agent", - 6768: "bmc-perf-mgrd", - 6769: "adi-gxp-srvprt", - 6770: "plysrv-http", - 6771: "plysrv-https", - 6784: "bfd-lag", - 6785: "dgpf-exchg", - 6786: "smc-jmx", - 6787: "smc-admin", - 6788: "smc-http", - 6790: "hnmp", - 6791: "hnm", - 6801: "acnet", - 6831: "ambit-lm", - 6841: "netmo-default", - 6842: "netmo-http", - 6850: "iccrushmore", - 6868: "acctopus-st", - 6888: "muse", - 6935: "ethoscan", - 6936: "xsmsvc", - 6946: "bioserver", - 6951: "otlp", - 6961: "jmact3", - 6962: "jmevt2", - 6963: "swismgr1", - 6964: "swismgr2", - 6965: "swistrap", - 6966: "swispol", - 6969: "acmsoda", - 6997: "MobilitySrv", - 6998: "iatp-highpri", - 6999: "iatp-normalpri", - 7000: "afs3-fileserver", - 7001: "afs3-callback", - 7002: "afs3-prserver", - 7003: "afs3-vlserver", - 7004: "afs3-kaserver", - 7005: "afs3-volser", - 7006: "afs3-errors", - 7007: "afs3-bos", - 7008: "afs3-update", - 7009: "afs3-rmtsys", - 7010: "ups-onlinet", - 7011: "talon-disc", - 7012: "talon-engine", - 7013: "microtalon-dis", - 7014: "microtalon-com", - 7015: "talon-webserver", - 7016: "spg", - 7017: "grasp", - 7019: "doceri-view", - 7020: "dpserve", - 7021: "dpserveadmin", - 7022: "ctdp", - 7023: "ct2nmcs", - 7024: "vmsvc", - 7025: "vmsvc-2", - 7030: "op-probe", - 7040: "quest-disc", - 7070: "arcp", - 7071: "iwg1", - 7080: "empowerid", - 7088: "zixi-transport", - 7095: "jdp-disc", - 7099: "lazy-ptop", - 7100: "font-service", - 7101: "elcn", - 7107: "aes-x170", - 7121: "virprot-lm", - 7128: "scenidm", - 7129: "scenccs", - 7161: "cabsm-comm", - 7162: "caistoragemgr", - 7163: "cacsambroker", - 7164: "fsr", - 7165: "doc-server", - 7166: "aruba-server", - 7169: "ccag-pib", - 7170: "nsrp", - 7171: "drm-production", - 7174: "clutild", - 7181: "janus-disc", - 7200: "fodms", - 7201: "dlip", - 7227: "ramp", - 7235: "aspcoordination", - 7244: "frc-hicp-disc", - 7262: "cnap", - 7272: "watchme-7272", - 7273: "oma-rlp", - 7274: "oma-rlp-s", - 7275: "oma-ulp", - 7276: "oma-ilp", - 7277: "oma-ilp-s", - 7278: "oma-dcdocbs", - 7279: "ctxlic", - 7280: "itactionserver1", - 7281: "itactionserver2", - 7282: "mzca-alert", - 7365: "lcm-server", - 7391: "mindfilesys", - 7392: "mrssrendezvous", - 7393: "nfoldman", - 7394: "fse", - 7395: "winqedit", - 7397: "hexarc", - 7400: "rtps-discovery", - 7401: "rtps-dd-ut", - 7402: "rtps-dd-mt", - 7410: "ionixnetmon", - 7411: "daqstream", - 7421: "mtportmon", - 7426: "pmdmgr", - 7427: "oveadmgr", - 7428: "ovladmgr", - 7429: "opi-sock", - 7430: "xmpv7", - 7431: "pmd", - 7437: "faximum", - 7443: "oracleas-https", - 7473: "rise", - 7491: "telops-lmd", - 7500: "silhouette", - 7501: "ovbus", - 7510: "ovhpas", - 7511: "pafec-lm", - 7542: "saratoga", - 7543: "atul", - 7544: "nta-ds", - 7545: "nta-us", - 7546: "cfs", - 7547: "cwmp", - 7548: "tidp", - 7549: "nls-tl", - 7550: "cloudsignaling", - 7560: "sncp", - 7566: "vsi-omega", - 7570: "aries-kfinder", - 7574: "coherence-disc", - 7588: "sun-lm", - 7606: "mipi-debug", - 7624: "indi", - 7627: "soap-http", - 7628: "zen-pawn", - 7629: "xdas", - 7633: "pmdfmgt", - 7648: "cuseeme", - 7674: "imqtunnels", - 7675: "imqtunnel", - 7676: "imqbrokerd", - 7677: "sun-user-https", - 7680: "pando-pub", - 7689: "collaber", - 7697: "klio", - 7707: "sync-em7", - 7708: "scinet", - 7720: "medimageportal", - 7724: "nsdeepfreezectl", - 7725: "nitrogen", - 7726: "freezexservice", - 7727: "trident-data", - 7728: "osvr", - 7734: "smip", - 7738: "aiagent", - 7741: "scriptview", - 7743: "sstp-1", - 7744: "raqmon-pdu", - 7747: "prgp", - 7777: "cbt", - 7778: "interwise", - 7779: "vstat", - 7781: "accu-lmgr", - 7784: "s-bfd", - 7786: "minivend", - 7787: "popup-reminders", - 7789: "office-tools", - 7794: "q3ade", - 7797: "pnet-conn", - 7798: "pnet-enc", - 7799: "altbsdp", - 7800: "asr", - 7801: "ssp-client", - 7802: "vns-tp", - 7810: "rbt-wanopt", - 7845: "apc-7845", - 7846: "apc-7846", - 7872: "mipv6tls", - 7880: "pss", - 7887: "ubroker", - 7900: "mevent", - 7901: "tnos-sp", - 7902: "tnos-dp", - 7903: "tnos-dps", - 7913: "qo-secure", - 7932: "t2-drm", - 7933: "t2-brm", - 7962: "generalsync", - 7967: "supercell", - 7979: "micromuse-ncps", - 7980: "quest-vista", - 7982: "sossd-disc", - 7998: "usicontentpush", - 7999: "irdmi2", - 8000: "irdmi", - 8001: "vcom-tunnel", - 8002: "teradataordbms", - 8003: "mcreport", - 8005: "mxi", - 8006: "wpl-disc", - 8007: "warppipe", - 8008: "http-alt", - 8019: "qbdb", - 8020: "intu-ec-svcdisc", - 8021: "intu-ec-client", - 8022: "oa-system", - 8025: "ca-audit-da", - 8026: "ca-audit-ds", - 8032: "pro-ed", - 8033: "mindprint", - 8034: "vantronix-mgmt", - 8040: "ampify", - 8041: "enguity-xccetp", - 8052: "senomix01", - 8053: "senomix02", - 8054: "senomix03", - 8055: "senomix04", - 8056: "senomix05", - 8057: "senomix06", - 8058: "senomix07", - 8059: "senomix08", - 8060: "aero", - 8074: "gadugadu", - 8080: "http-alt", - 8081: "sunproxyadmin", - 8082: "us-cli", - 8083: "us-srv", - 8086: "d-s-n", - 8087: "simplifymedia", - 8088: "radan-http", - 8097: "sac", - 8100: "xprint-server", - 8115: "mtl8000-matrix", - 8116: "cp-cluster", - 8118: "privoxy", - 8121: "apollo-data", - 8122: "apollo-admin", - 8128: "paycash-online", - 8129: "paycash-wbp", - 8130: "indigo-vrmi", - 8131: "indigo-vbcp", - 8132: "dbabble", - 8148: "isdd", - 8149: "eor-game", - 8160: "patrol", - 8161: "patrol-snmp", - 8182: "vmware-fdm", - 8184: "itach", - 8192: "spytechphone", - 8194: "blp1", - 8195: "blp2", - 8199: "vvr-data", - 8200: "trivnet1", - 8201: "trivnet2", - 8202: "aesop", - 8204: "lm-perfworks", - 8205: "lm-instmgr", - 8206: "lm-dta", - 8207: "lm-sserver", - 8208: "lm-webwatcher", - 8230: "rexecj", - 8231: "hncp-udp-port", - 8232: "hncp-dtls-port", - 8243: "synapse-nhttps", - 8276: "pando-sec", - 8280: "synapse-nhttp", - 8282: "libelle-disc", - 8292: "blp3", - 8294: "blp4", - 8300: "tmi", - 8301: "amberon", - 8320: "tnp-discover", - 8321: "tnp", - 8322: "garmin-marine", - 8351: "server-find", - 8376: "cruise-enum", - 8377: "cruise-swroute", - 8378: "cruise-config", - 8379: "cruise-diags", - 8380: "cruise-update", - 8383: "m2mservices", - 8384: "marathontp", - 8400: "cvd", - 8401: "sabarsd", - 8402: "abarsd", - 8403: "admind", - 8416: "espeech", - 8417: "espeech-rtp", - 8442: "cybro-a-bus", - 8443: "pcsync-https", - 8444: "pcsync-http", - 8445: "copy-disc", - 8450: "npmp", - 8472: "otv", - 8473: "vp2p", - 8474: "noteshare", - 8500: "fmtp", - 8501: "cmtp-av", - 8503: "lsp-self-ping", - 8554: "rtsp-alt", - 8555: "d-fence", - 8567: "dof-tunnel", - 8600: "asterix", - 8609: "canon-cpp-disc", - 8610: "canon-mfnp", - 8611: "canon-bjnp1", - 8612: "canon-bjnp2", - 8613: "canon-bjnp3", - 8614: "canon-bjnp4", - 8675: "msi-cps-rm-disc", - 8686: "sun-as-jmxrmi", - 8732: "dtp-net", - 8733: "ibus", - 8763: "mc-appserver", - 8764: "openqueue", - 8765: "ultraseek-http", - 8766: "amcs", - 8770: "dpap", - 8786: "msgclnt", - 8787: "msgsrvr", - 8793: "acd-pm", - 8800: "sunwebadmin", - 8804: "truecm", - 8805: "pfcp", - 8808: "ssports-bcast", - 8873: "dxspider", - 8880: "cddbp-alt", - 8883: "secure-mqtt", - 8888: "ddi-udp-1", - 8889: "ddi-udp-2", - 8890: "ddi-udp-3", - 8891: "ddi-udp-4", - 8892: "ddi-udp-5", - 8893: "ddi-udp-6", - 8894: "ddi-udp-7", - 8899: "ospf-lite", - 8900: "jmb-cds1", - 8901: "jmb-cds2", - 8910: "manyone-http", - 8911: "manyone-xml", - 8912: "wcbackup", - 8913: "dragonfly", - 8954: "cumulus-admin", - 8980: "nod-provider", - 8981: "nod-client", - 8989: "sunwebadmins", - 8990: "http-wmap", - 8991: "https-wmap", - 8999: "bctp", - 9000: "cslistener", - 9001: "etlservicemgr", - 9002: "dynamid", - 9007: "ogs-client", - 9009: "pichat", - 9020: "tambora", - 9021: "panagolin-ident", - 9022: "paragent", - 9023: "swa-1", - 9024: "swa-2", - 9025: "swa-3", - 9026: "swa-4", - 9060: "CardWeb-RT", - 9080: "glrpc", - 9084: "aurora", - 9085: "ibm-rsyscon", - 9086: "net2display", - 9087: "classic", - 9088: "sqlexec", - 9089: "sqlexec-ssl", - 9090: "websm", - 9091: "xmltec-xmlmail", - 9092: "XmlIpcRegSvc", - 9100: "hp-pdl-datastr", - 9101: "bacula-dir", - 9102: "bacula-fd", - 9103: "bacula-sd", - 9104: "peerwire", - 9105: "xadmin", - 9106: "astergate-disc", - 9119: "mxit", - 9131: "dddp", - 9160: "apani1", - 9161: "apani2", - 9162: "apani3", - 9163: "apani4", - 9164: "apani5", - 9191: "sun-as-jpda", - 9200: "wap-wsp", - 9201: "wap-wsp-wtp", - 9202: "wap-wsp-s", - 9203: "wap-wsp-wtp-s", - 9204: "wap-vcard", - 9205: "wap-vcal", - 9206: "wap-vcard-s", - 9207: "wap-vcal-s", - 9208: "rjcdb-vcards", - 9209: "almobile-system", - 9210: "oma-mlp", - 9211: "oma-mlp-s", - 9212: "serverviewdbms", - 9213: "serverstart", - 9214: "ipdcesgbs", - 9215: "insis", - 9216: "acme", - 9217: "fsc-port", - 9222: "teamcoherence", - 9255: "mon", - 9277: "traingpsdata", - 9278: "pegasus", - 9279: "pegasus-ctl", - 9280: "pgps", - 9281: "swtp-port1", - 9282: "swtp-port2", - 9283: "callwaveiam", - 9284: "visd", - 9285: "n2h2server", - 9286: "n2receive", - 9287: "cumulus", - 9292: "armtechdaemon", - 9293: "storview", - 9294: "armcenterhttp", - 9295: "armcenterhttps", - 9300: "vrace", - 9318: "secure-ts", - 9321: "guibase", - 9343: "mpidcmgr", - 9344: "mphlpdmc", - 9346: "ctechlicensing", - 9374: "fjdmimgr", - 9380: "boxp", - 9396: "fjinvmgr", - 9397: "mpidcagt", - 9400: "sec-t4net-srv", - 9401: "sec-t4net-clt", - 9402: "sec-pc2fax-srv", - 9418: "git", - 9443: "tungsten-https", - 9444: "wso2esb-console", - 9450: "sntlkeyssrvr", - 9500: "ismserver", - 9522: "sma-spw", - 9535: "mngsuite", - 9536: "laes-bf", - 9555: "trispen-sra", - 9592: "ldgateway", - 9593: "cba8", - 9594: "msgsys", - 9595: "pds", - 9596: "mercury-disc", - 9597: "pd-admin", - 9598: "vscp", - 9599: "robix", - 9600: "micromuse-ncpw", - 9612: "streamcomm-ds", - 9618: "condor", - 9628: "odbcpathway", - 9629: "uniport", - 9632: "mc-comm", - 9667: "xmms2", - 9668: "tec5-sdctp", - 9694: "client-wakeup", - 9695: "ccnx", - 9700: "board-roar", - 9747: "l5nas-parchan", - 9750: "board-voip", - 9753: "rasadv", - 9762: "tungsten-http", - 9800: "davsrc", - 9801: "sstp-2", - 9802: "davsrcs", - 9875: "sapv1", - 9878: "kca-service", - 9888: "cyborg-systems", - 9889: "gt-proxy", - 9898: "monkeycom", - 9899: "sctp-tunneling", - 9900: "iua", - 9901: "enrp", - 9903: "multicast-ping", - 9909: "domaintime", - 9911: "sype-transport", - 9950: "apc-9950", - 9951: "apc-9951", - 9952: "apc-9952", - 9953: "acis", - 9955: "alljoyn-mcm", - 9956: "alljoyn", - 9966: "odnsp", - 9987: "dsm-scm-target", - 9990: "osm-appsrvr", - 9991: "osm-oev", - 9992: "palace-1", - 9993: "palace-2", - 9994: "palace-3", - 9995: "palace-4", - 9996: "palace-5", - 9997: "palace-6", - 9998: "distinct32", - 9999: "distinct", - 10000: "ndmp", - 10001: "scp-config", - 10002: "documentum", - 10003: "documentum-s", - 10007: "mvs-capacity", - 10008: "octopus", - 10009: "swdtp-sv", - 10050: "zabbix-agent", - 10051: "zabbix-trapper", - 10080: "amanda", - 10081: "famdc", - 10100: "itap-ddtp", - 10101: "ezmeeting-2", - 10102: "ezproxy-2", - 10103: "ezrelay", - 10104: "swdtp", - 10107: "bctp-server", - 10110: "nmea-0183", - 10111: "nmea-onenet", - 10113: "netiq-endpoint", - 10114: "netiq-qcheck", - 10115: "netiq-endpt", - 10116: "netiq-voipa", - 10117: "iqrm", - 10128: "bmc-perf-sd", - 10160: "qb-db-server", - 10161: "snmpdtls", - 10162: "snmpdtls-trap", - 10200: "trisoap", - 10201: "rscs", - 10252: "apollo-relay", - 10253: "eapol-relay", - 10260: "axis-wimp-port", - 10288: "blocks", - 10439: "bngsync", - 10500: "hip-nat-t", - 10540: "MOS-lower", - 10541: "MOS-upper", - 10542: "MOS-aux", - 10543: "MOS-soap", - 10544: "MOS-soap-opt", - 10800: "gap", - 10805: "lpdg", - 10810: "nmc-disc", - 10860: "helix", - 10880: "bveapi", - 10990: "rmiaux", - 11000: "irisa", - 11001: "metasys", - 10023: "cefd-vmp", - 11095: "weave", - 11106: "sgi-lk", - 11108: "myq-termlink", - 11111: "vce", - 11112: "dicom", - 11161: "suncacao-snmp", - 11162: "suncacao-jmxmp", - 11163: "suncacao-rmi", - 11164: "suncacao-csa", - 11165: "suncacao-websvc", - 11171: "snss", - 11201: "smsqp", - 11208: "wifree", - 11211: "memcache", - 11319: "imip", - 11320: "imip-channels", - 11321: "arena-server", - 11367: "atm-uhas", - 11371: "hkp", - 11430: "lsdp", - 11600: "tempest-port", - 11720: "h323callsigalt", - 11723: "emc-xsw-dcache", - 11751: "intrepid-ssl", - 11796: "lanschool-mpt", - 11876: "xoraya", - 11877: "x2e-disc", - 11967: "sysinfo-sp", - 12000: "entextxid", - 12001: "entextnetwk", - 12002: "entexthigh", - 12003: "entextmed", - 12004: "entextlow", - 12005: "dbisamserver1", - 12006: "dbisamserver2", - 12007: "accuracer", - 12008: "accuracer-dbms", - 12009: "ghvpn", - 12012: "vipera", - 12013: "vipera-ssl", - 12109: "rets-ssl", - 12121: "nupaper-ss", - 12168: "cawas", - 12172: "hivep", - 12300: "linogridengine", - 12321: "warehouse-sss", - 12322: "warehouse", - 12345: "italk", - 12753: "tsaf", - 13160: "i-zipqd", - 13216: "bcslogc", - 13217: "rs-pias", - 13218: "emc-vcas-udp", - 13223: "powwow-client", - 13224: "powwow-server", - 13400: "doip-disc", - 13720: "bprd", - 13721: "bpdbm", - 13722: "bpjava-msvc", - 13724: "vnetd", - 13782: "bpcd", - 13783: "vopied", - 13785: "nbdb", - 13786: "nomdb", - 13818: "dsmcc-config", - 13819: "dsmcc-session", - 13820: "dsmcc-passthru", - 13821: "dsmcc-download", - 13822: "dsmcc-ccp", - 13894: "ucontrol", - 13929: "dta-systems", - 14000: "scotty-ft", - 14001: "sua", - 14002: "scotty-disc", - 14033: "sage-best-com1", - 14034: "sage-best-com2", - 14141: "vcs-app", - 14142: "icpp", - 14145: "gcm-app", - 14149: "vrts-tdd", - 14154: "vad", - 14250: "cps", - 14414: "ca-web-update", - 14936: "hde-lcesrvr-1", - 14937: "hde-lcesrvr-2", - 15000: "hydap", - 15118: "v2g-secc", - 15345: "xpilot", - 15363: "3link", - 15555: "cisco-snat", - 15660: "bex-xr", - 15740: "ptp", - 15998: "2ping", - 16003: "alfin", - 16161: "sun-sea-port", - 16309: "etb4j", - 16310: "pduncs", - 16311: "pdefmns", - 16360: "netserialext1", - 16361: "netserialext2", - 16367: "netserialext3", - 16368: "netserialext4", - 16384: "connected", - 16666: "vtp", - 16900: "newbay-snc-mc", - 16950: "sgcip", - 16991: "intel-rci-mp", - 16992: "amt-soap-http", - 16993: "amt-soap-https", - 16994: "amt-redir-tcp", - 16995: "amt-redir-tls", - 17007: "isode-dua", - 17185: "soundsvirtual", - 17219: "chipper", - 17220: "avtp", - 17221: "avdecc", - 17222: "cpsp", - 17224: "trdp-pd", - 17225: "trdp-md", - 17234: "integrius-stp", - 17235: "ssh-mgmt", - 17500: "db-lsp-disc", - 17729: "ea", - 17754: "zep", - 17755: "zigbee-ip", - 17756: "zigbee-ips", - 18000: "biimenu", - 18181: "opsec-cvp", - 18182: "opsec-ufp", - 18183: "opsec-sam", - 18184: "opsec-lea", - 18185: "opsec-omi", - 18186: "ohsc", - 18187: "opsec-ela", - 18241: "checkpoint-rtm", - 18262: "gv-pf", - 18463: "ac-cluster", - 18634: "rds-ib", - 18635: "rds-ip", - 18668: "vdmmesh-disc", - 18769: "ique", - 18881: "infotos", - 18888: "apc-necmp", - 19000: "igrid", - 19007: "scintilla", - 19191: "opsec-uaa", - 19194: "ua-secureagent", - 19220: "cora-disc", - 19283: "keysrvr", - 19315: "keyshadow", - 19398: "mtrgtrans", - 19410: "hp-sco", - 19411: "hp-sca", - 19412: "hp-sessmon", - 19539: "fxuptp", - 19540: "sxuptp", - 19541: "jcp", - 19788: "mle", - 19999: "dnp-sec", - 20000: "dnp", - 20001: "microsan", - 20002: "commtact-http", - 20003: "commtact-https", - 20005: "openwebnet", - 20012: "ss-idi-disc", - 20014: "opendeploy", - 20034: "nburn-id", - 20046: "tmophl7mts", - 20048: "mountd", - 20049: "nfsrdma", - 20167: "tolfab", - 20202: "ipdtp-port", - 20222: "ipulse-ics", - 20480: "emwavemsg", - 20670: "track", - 20999: "athand-mmp", - 21000: "irtrans", - 21554: "dfserver", - 21590: "vofr-gateway", - 21800: "tvpm", - 21845: "webphone", - 21846: "netspeak-is", - 21847: "netspeak-cs", - 21848: "netspeak-acd", - 21849: "netspeak-cps", - 22000: "snapenetio", - 22001: "optocontrol", - 22002: "optohost002", - 22003: "optohost003", - 22004: "optohost004", - 22005: "optohost004", - 22273: "wnn6", - 22305: "cis", - 22335: "shrewd-stream", - 22343: "cis-secure", - 22347: "wibukey", - 22350: "codemeter", - 22555: "vocaltec-phone", - 22763: "talikaserver", - 22800: "aws-brf", - 22951: "brf-gw", - 23000: "inovaport1", - 23001: "inovaport2", - 23002: "inovaport3", - 23003: "inovaport4", - 23004: "inovaport5", - 23005: "inovaport6", - 23272: "s102", - 23294: "5afe-disc", - 23333: "elxmgmt", - 23400: "novar-dbase", - 23401: "novar-alarm", - 23402: "novar-global", - 24000: "med-ltp", - 24001: "med-fsp-rx", - 24002: "med-fsp-tx", - 24003: "med-supp", - 24004: "med-ovw", - 24005: "med-ci", - 24006: "med-net-svc", - 24242: "filesphere", - 24249: "vista-4gl", - 24321: "ild", - 24322: "hid", - 24386: "intel-rci", - 24465: "tonidods", - 24554: "binkp", - 24577: "bilobit-update", - 24676: "canditv", - 24677: "flashfiler", - 24678: "proactivate", - 24680: "tcc-http", - 24850: "assoc-disc", - 24922: "find", - 25000: "icl-twobase1", - 25001: "icl-twobase2", - 25002: "icl-twobase3", - 25003: "icl-twobase4", - 25004: "icl-twobase5", - 25005: "icl-twobase6", - 25006: "icl-twobase7", - 25007: "icl-twobase8", - 25008: "icl-twobase9", - 25009: "icl-twobase10", - 25793: "vocaltec-hos", - 25900: "tasp-net", - 25901: "niobserver", - 25902: "nilinkanalyst", - 25903: "niprobe", - 25954: "bf-game", - 25955: "bf-master", - 26000: "quake", - 26133: "scscp", - 26208: "wnn6-ds", - 26260: "ezproxy", - 26261: "ezmeeting", - 26262: "k3software-svr", - 26263: "k3software-cli", - 26486: "exoline-udp", - 26487: "exoconfig", - 26489: "exonet", - 27345: "imagepump", - 27442: "jesmsjc", - 27504: "kopek-httphead", - 27782: "ars-vista", - 27999: "tw-auth-key", - 28000: "nxlmd", - 28119: "a27-ran-ran", - 28200: "voxelstorm", - 28240: "siemensgsm", - 29167: "otmp", - 30001: "pago-services1", - 30002: "pago-services2", - 30003: "amicon-fpsu-ra", - 30004: "amicon-fpsu-s", - 30260: "kingdomsonline", - 30832: "samsung-disc", - 30999: "ovobs", - 31016: "ka-kdp", - 31029: "yawn", - 31416: "xqosd", - 31457: "tetrinet", - 31620: "lm-mon", - 31765: "gamesmith-port", - 31948: "iceedcp-tx", - 31949: "iceedcp-rx", - 32034: "iracinghelper", - 32249: "t1distproc60", - 32483: "apm-link", - 32635: "sec-ntb-clnt", - 32636: "DMExpress", - 32767: "filenet-powsrm", - 32768: "filenet-tms", - 32769: "filenet-rpc", - 32770: "filenet-nch", - 32771: "filenet-rmi", - 32772: "filenet-pa", - 32773: "filenet-cm", - 32774: "filenet-re", - 32775: "filenet-pch", - 32776: "filenet-peior", - 32777: "filenet-obrok", - 32801: "mlsn", - 32896: "idmgratm", - 33123: "aurora-balaena", - 33331: "diamondport", - 33334: "speedtrace-disc", - 33434: "traceroute", - 33656: "snip-slave", - 34249: "turbonote-2", - 34378: "p-net-local", - 34379: "p-net-remote", - 34567: "edi_service", - 34962: "profinet-rt", - 34963: "profinet-rtm", - 34964: "profinet-cm", - 34980: "ethercat", - 35001: "rt-viewer", - 35004: "rt-classmanager", - 35100: "axio-disc", - 35355: "altova-lm-disc", - 36001: "allpeers", - 36411: "wlcp", - 36865: "kastenxpipe", - 37475: "neckar", - 37654: "unisys-eportal", - 38002: "crescoctrl-disc", - 38201: "galaxy7-data", - 38202: "fairview", - 38203: "agpolicy", - 39681: "turbonote-1", - 40000: "safetynetp", - 40023: "k-patentssensor", - 40841: "cscp", - 40842: "csccredir", - 40843: "csccfirewall", - 40853: "ortec-disc", - 41111: "fs-qos", - 41230: "z-wave-s", - 41794: "crestron-cip", - 41795: "crestron-ctp", - 42508: "candp", - 42509: "candrp", - 42510: "caerpc", - 43000: "recvr-rc-disc", - 43188: "reachout", - 43189: "ndm-agent-port", - 43190: "ip-provision", - 43210: "shaperai-disc", - 43439: "eq3-config", - 43440: "ew-disc-cmd", - 43441: "ciscocsdb", - 44321: "pmcd", - 44322: "pmcdproxy", - 44544: "domiq", - 44553: "rbr-debug", - 44600: "asihpi", - 44818: "EtherNet-IP-2", - 44900: "m3da-disc", - 45000: "asmp-mon", - 45054: "invision-ag", - 45514: "cloudcheck-ping", - 45678: "eba", - 45825: "qdb2service", - 45966: "ssr-servermgr", - 46999: "mediabox", - 47000: "mbus", - 47100: "jvl-mactalk", - 47557: "dbbrowse", - 47624: "directplaysrvr", - 47806: "ap", - 47808: "bacnet", - 47809: "presonus-ucnet", - 48000: "nimcontroller", - 48001: "nimspooler", - 48002: "nimhub", - 48003: "nimgtw", - 48128: "isnetserv", - 48129: "blp5", - 48556: "com-bardac-dw", - 48619: "iqobject", - 48653: "robotraconteur", - 49001: "nusdp-disc", -} -var sctpPortNames = map[SCTPPort]string{ - 9: "discard", - 20: "ftp-data", - 21: "ftp", - 22: "ssh", - 80: "http", - 179: "bgp", - 443: "https", - 1021: "exp1", - 1022: "exp2", - 1167: "cisco-ipsla", - 1720: "h323hostcall", - 2049: "nfs", - 2225: "rcip-itu", - 2904: "m2ua", - 2905: "m3ua", - 2944: "megaco-h248", - 2945: "h248-binary", - 3097: "itu-bicc-stc", - 3565: "m2pa", - 3863: "asap-sctp", - 3864: "asap-sctp-tls", - 3868: "diameter", - 4333: "ahsp", - 4502: "a25-fap-fgw", - 4711: "trinity-dist", - 4739: "ipfix", - 4740: "ipfixs", - 5060: "sip", - 5061: "sips", - 5090: "car", - 5091: "cxtp", - 5215: "noteza", - 5445: "smbdirect", - 5672: "amqp", - 5675: "v5ua", - 5868: "diameters", - 5910: "cm", - 5911: "cpdlc", - 5912: "fis", - 5913: "ads-c", - 6704: "frc-hp", - 6705: "frc-mp", - 6706: "frc-lp", - 6970: "conductor-mpx", - 7626: "simco", - 7701: "nfapi", - 7728: "osvr", - 8471: "pim-port", - 9082: "lcs-ap", - 9084: "aurora", - 9900: "iua", - 9901: "enrp-sctp", - 9902: "enrp-sctp-tls", - 11997: "wmereceiving", - 11998: "wmedistribution", - 11999: "wmereporting", - 14001: "sua", - 20049: "nfsrdma", - 25471: "rna", - 29118: "sgsap", - 29168: "sbcap", - 29169: "iuhsctpassoc", - 30100: "rwp", - 36412: "s1-control", - 36422: "x2-control", - 36423: "slmap", - 36424: "nq-ap", - 36443: "m2ap", - 36444: "m3ap", - 36462: "xw-control", - 38412: "ng-control", - 38422: "xn-control", - 38472: "f1-control", -} diff --git a/vendor/github.com/google/gopacket/layers/icmp4.go b/vendor/github.com/google/gopacket/layers/icmp4.go deleted file mode 100644 index bd3f03f00c2..00000000000 --- a/vendor/github.com/google/gopacket/layers/icmp4.go +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "reflect" - - "github.com/google/gopacket" -) - -const ( - ICMPv4TypeEchoReply = 0 - ICMPv4TypeDestinationUnreachable = 3 - ICMPv4TypeSourceQuench = 4 - ICMPv4TypeRedirect = 5 - ICMPv4TypeEchoRequest = 8 - ICMPv4TypeRouterAdvertisement = 9 - ICMPv4TypeRouterSolicitation = 10 - ICMPv4TypeTimeExceeded = 11 - ICMPv4TypeParameterProblem = 12 - ICMPv4TypeTimestampRequest = 13 - ICMPv4TypeTimestampReply = 14 - ICMPv4TypeInfoRequest = 15 - ICMPv4TypeInfoReply = 16 - ICMPv4TypeAddressMaskRequest = 17 - ICMPv4TypeAddressMaskReply = 18 -) - -const ( - // DestinationUnreachable - ICMPv4CodeNet = 0 - ICMPv4CodeHost = 1 - ICMPv4CodeProtocol = 2 - ICMPv4CodePort = 3 - ICMPv4CodeFragmentationNeeded = 4 - ICMPv4CodeSourceRoutingFailed = 5 - ICMPv4CodeNetUnknown = 6 - ICMPv4CodeHostUnknown = 7 - ICMPv4CodeSourceIsolated = 8 - ICMPv4CodeNetAdminProhibited = 9 - ICMPv4CodeHostAdminProhibited = 10 - ICMPv4CodeNetTOS = 11 - ICMPv4CodeHostTOS = 12 - ICMPv4CodeCommAdminProhibited = 13 - ICMPv4CodeHostPrecedence = 14 - ICMPv4CodePrecedenceCutoff = 15 - - // TimeExceeded - ICMPv4CodeTTLExceeded = 0 - ICMPv4CodeFragmentReassemblyTimeExceeded = 1 - - // ParameterProblem - ICMPv4CodePointerIndicatesError = 0 - ICMPv4CodeMissingOption = 1 - ICMPv4CodeBadLength = 2 - - // Redirect - // ICMPv4CodeNet = same as for DestinationUnreachable - // ICMPv4CodeHost = same as for DestinationUnreachable - ICMPv4CodeTOSNet = 2 - ICMPv4CodeTOSHost = 3 -) - -type icmpv4TypeCodeInfoStruct struct { - typeStr string - codeStr *map[uint8]string -} - -var ( - icmpv4TypeCodeInfo = map[uint8]icmpv4TypeCodeInfoStruct{ - ICMPv4TypeDestinationUnreachable: icmpv4TypeCodeInfoStruct{ - "DestinationUnreachable", &map[uint8]string{ - ICMPv4CodeNet: "Net", - ICMPv4CodeHost: "Host", - ICMPv4CodeProtocol: "Protocol", - ICMPv4CodePort: "Port", - ICMPv4CodeFragmentationNeeded: "FragmentationNeeded", - ICMPv4CodeSourceRoutingFailed: "SourceRoutingFailed", - ICMPv4CodeNetUnknown: "NetUnknown", - ICMPv4CodeHostUnknown: "HostUnknown", - ICMPv4CodeSourceIsolated: "SourceIsolated", - ICMPv4CodeNetAdminProhibited: "NetAdminProhibited", - ICMPv4CodeHostAdminProhibited: "HostAdminProhibited", - ICMPv4CodeNetTOS: "NetTOS", - ICMPv4CodeHostTOS: "HostTOS", - ICMPv4CodeCommAdminProhibited: "CommAdminProhibited", - ICMPv4CodeHostPrecedence: "HostPrecedence", - ICMPv4CodePrecedenceCutoff: "PrecedenceCutoff", - }, - }, - ICMPv4TypeTimeExceeded: icmpv4TypeCodeInfoStruct{ - "TimeExceeded", &map[uint8]string{ - ICMPv4CodeTTLExceeded: "TTLExceeded", - ICMPv4CodeFragmentReassemblyTimeExceeded: "FragmentReassemblyTimeExceeded", - }, - }, - ICMPv4TypeParameterProblem: icmpv4TypeCodeInfoStruct{ - "ParameterProblem", &map[uint8]string{ - ICMPv4CodePointerIndicatesError: "PointerIndicatesError", - ICMPv4CodeMissingOption: "MissingOption", - ICMPv4CodeBadLength: "BadLength", - }, - }, - ICMPv4TypeSourceQuench: icmpv4TypeCodeInfoStruct{ - "SourceQuench", nil, - }, - ICMPv4TypeRedirect: icmpv4TypeCodeInfoStruct{ - "Redirect", &map[uint8]string{ - ICMPv4CodeNet: "Net", - ICMPv4CodeHost: "Host", - ICMPv4CodeTOSNet: "TOS+Net", - ICMPv4CodeTOSHost: "TOS+Host", - }, - }, - ICMPv4TypeEchoRequest: icmpv4TypeCodeInfoStruct{ - "EchoRequest", nil, - }, - ICMPv4TypeEchoReply: icmpv4TypeCodeInfoStruct{ - "EchoReply", nil, - }, - ICMPv4TypeTimestampRequest: icmpv4TypeCodeInfoStruct{ - "TimestampRequest", nil, - }, - ICMPv4TypeTimestampReply: icmpv4TypeCodeInfoStruct{ - "TimestampReply", nil, - }, - ICMPv4TypeInfoRequest: icmpv4TypeCodeInfoStruct{ - "InfoRequest", nil, - }, - ICMPv4TypeInfoReply: icmpv4TypeCodeInfoStruct{ - "InfoReply", nil, - }, - ICMPv4TypeRouterSolicitation: icmpv4TypeCodeInfoStruct{ - "RouterSolicitation", nil, - }, - ICMPv4TypeRouterAdvertisement: icmpv4TypeCodeInfoStruct{ - "RouterAdvertisement", nil, - }, - ICMPv4TypeAddressMaskRequest: icmpv4TypeCodeInfoStruct{ - "AddressMaskRequest", nil, - }, - ICMPv4TypeAddressMaskReply: icmpv4TypeCodeInfoStruct{ - "AddressMaskReply", nil, - }, - } -) - -type ICMPv4TypeCode uint16 - -// Type returns the ICMPv4 type field. -func (a ICMPv4TypeCode) Type() uint8 { - return uint8(a >> 8) -} - -// Code returns the ICMPv4 code field. -func (a ICMPv4TypeCode) Code() uint8 { - return uint8(a) -} - -func (a ICMPv4TypeCode) String() string { - t, c := a.Type(), a.Code() - strInfo, ok := icmpv4TypeCodeInfo[t] - if !ok { - // Unknown ICMPv4 type field - return fmt.Sprintf("%d(%d)", t, c) - } - typeStr := strInfo.typeStr - if strInfo.codeStr == nil && c == 0 { - // The ICMPv4 type does not make use of the code field - return fmt.Sprintf("%s", strInfo.typeStr) - } - if strInfo.codeStr == nil && c != 0 { - // The ICMPv4 type does not make use of the code field, but it is present anyway - return fmt.Sprintf("%s(Code: %d)", typeStr, c) - } - codeStr, ok := (*strInfo.codeStr)[c] - if !ok { - // We don't know this ICMPv4 code; print the numerical value - return fmt.Sprintf("%s(Code: %d)", typeStr, c) - } - return fmt.Sprintf("%s(%s)", typeStr, codeStr) -} - -func (a ICMPv4TypeCode) GoString() string { - t := reflect.TypeOf(a) - return fmt.Sprintf("%s(%d, %d)", t.String(), a.Type(), a.Code()) -} - -// SerializeTo writes the ICMPv4TypeCode value to the 'bytes' buffer. -func (a ICMPv4TypeCode) SerializeTo(bytes []byte) { - binary.BigEndian.PutUint16(bytes, uint16(a)) -} - -// CreateICMPv4TypeCode is a convenience function to create an ICMPv4TypeCode -// gopacket type from the ICMPv4 type and code values. -func CreateICMPv4TypeCode(typ uint8, code uint8) ICMPv4TypeCode { - return ICMPv4TypeCode(binary.BigEndian.Uint16([]byte{typ, code})) -} - -// ICMPv4 is the layer for IPv4 ICMP packet data. -type ICMPv4 struct { - BaseLayer - TypeCode ICMPv4TypeCode - Checksum uint16 - Id uint16 - Seq uint16 -} - -// LayerType returns LayerTypeICMPv4. -func (i *ICMPv4) LayerType() gopacket.LayerType { return LayerTypeICMPv4 } - -// DecodeFromBytes decodes the given bytes into this layer. -func (i *ICMPv4) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 8 { - df.SetTruncated() - return errors.New("ICMP layer less then 8 bytes for ICMPv4 packet") - } - i.TypeCode = CreateICMPv4TypeCode(data[0], data[1]) - i.Checksum = binary.BigEndian.Uint16(data[2:4]) - i.Id = binary.BigEndian.Uint16(data[4:6]) - i.Seq = binary.BigEndian.Uint16(data[6:8]) - i.BaseLayer = BaseLayer{data[:8], data[8:]} - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (i *ICMPv4) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(8) - if err != nil { - return err - } - i.TypeCode.SerializeTo(bytes) - binary.BigEndian.PutUint16(bytes[4:], i.Id) - binary.BigEndian.PutUint16(bytes[6:], i.Seq) - if opts.ComputeChecksums { - bytes[2] = 0 - bytes[3] = 0 - i.Checksum = tcpipChecksum(b.Bytes(), 0) - } - binary.BigEndian.PutUint16(bytes[2:], i.Checksum) - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (i *ICMPv4) CanDecode() gopacket.LayerClass { - return LayerTypeICMPv4 -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (i *ICMPv4) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -func decodeICMPv4(data []byte, p gopacket.PacketBuilder) error { - i := &ICMPv4{} - return decodingLayerDecoder(i, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/icmp6.go b/vendor/github.com/google/gopacket/layers/icmp6.go deleted file mode 100644 index 09afd11a609..00000000000 --- a/vendor/github.com/google/gopacket/layers/icmp6.go +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "reflect" - - "github.com/google/gopacket" -) - -const ( - // The following are from RFC 4443 - ICMPv6TypeDestinationUnreachable = 1 - ICMPv6TypePacketTooBig = 2 - ICMPv6TypeTimeExceeded = 3 - ICMPv6TypeParameterProblem = 4 - ICMPv6TypeEchoRequest = 128 - ICMPv6TypeEchoReply = 129 - - // The following are from RFC 4861 - ICMPv6TypeRouterSolicitation = 133 - ICMPv6TypeRouterAdvertisement = 134 - ICMPv6TypeNeighborSolicitation = 135 - ICMPv6TypeNeighborAdvertisement = 136 - ICMPv6TypeRedirect = 137 - - // The following are from RFC 2710 - ICMPv6TypeMLDv1MulticastListenerQueryMessage = 130 - ICMPv6TypeMLDv1MulticastListenerReportMessage = 131 - ICMPv6TypeMLDv1MulticastListenerDoneMessage = 132 - - // The following are from RFC 3810 - ICMPv6TypeMLDv2MulticastListenerReportMessageV2 = 143 -) - -const ( - // DestinationUnreachable - ICMPv6CodeNoRouteToDst = 0 - ICMPv6CodeAdminProhibited = 1 - ICMPv6CodeBeyondScopeOfSrc = 2 - ICMPv6CodeAddressUnreachable = 3 - ICMPv6CodePortUnreachable = 4 - ICMPv6CodeSrcAddressFailedPolicy = 5 - ICMPv6CodeRejectRouteToDst = 6 - - // TimeExceeded - ICMPv6CodeHopLimitExceeded = 0 - ICMPv6CodeFragmentReassemblyTimeExceeded = 1 - - // ParameterProblem - ICMPv6CodeErroneousHeaderField = 0 - ICMPv6CodeUnrecognizedNextHeader = 1 - ICMPv6CodeUnrecognizedIPv6Option = 2 -) - -type icmpv6TypeCodeInfoStruct struct { - typeStr string - codeStr *map[uint8]string -} - -var ( - icmpv6TypeCodeInfo = map[uint8]icmpv6TypeCodeInfoStruct{ - ICMPv6TypeDestinationUnreachable: icmpv6TypeCodeInfoStruct{ - "DestinationUnreachable", &map[uint8]string{ - ICMPv6CodeNoRouteToDst: "NoRouteToDst", - ICMPv6CodeAdminProhibited: "AdminProhibited", - ICMPv6CodeBeyondScopeOfSrc: "BeyondScopeOfSrc", - ICMPv6CodeAddressUnreachable: "AddressUnreachable", - ICMPv6CodePortUnreachable: "PortUnreachable", - ICMPv6CodeSrcAddressFailedPolicy: "SrcAddressFailedPolicy", - ICMPv6CodeRejectRouteToDst: "RejectRouteToDst", - }, - }, - ICMPv6TypePacketTooBig: icmpv6TypeCodeInfoStruct{ - "PacketTooBig", nil, - }, - ICMPv6TypeTimeExceeded: icmpv6TypeCodeInfoStruct{ - "TimeExceeded", &map[uint8]string{ - ICMPv6CodeHopLimitExceeded: "HopLimitExceeded", - ICMPv6CodeFragmentReassemblyTimeExceeded: "FragmentReassemblyTimeExceeded", - }, - }, - ICMPv6TypeParameterProblem: icmpv6TypeCodeInfoStruct{ - "ParameterProblem", &map[uint8]string{ - ICMPv6CodeErroneousHeaderField: "ErroneousHeaderField", - ICMPv6CodeUnrecognizedNextHeader: "UnrecognizedNextHeader", - ICMPv6CodeUnrecognizedIPv6Option: "UnrecognizedIPv6Option", - }, - }, - ICMPv6TypeEchoRequest: icmpv6TypeCodeInfoStruct{ - "EchoRequest", nil, - }, - ICMPv6TypeEchoReply: icmpv6TypeCodeInfoStruct{ - "EchoReply", nil, - }, - ICMPv6TypeRouterSolicitation: icmpv6TypeCodeInfoStruct{ - "RouterSolicitation", nil, - }, - ICMPv6TypeRouterAdvertisement: icmpv6TypeCodeInfoStruct{ - "RouterAdvertisement", nil, - }, - ICMPv6TypeNeighborSolicitation: icmpv6TypeCodeInfoStruct{ - "NeighborSolicitation", nil, - }, - ICMPv6TypeNeighborAdvertisement: icmpv6TypeCodeInfoStruct{ - "NeighborAdvertisement", nil, - }, - ICMPv6TypeRedirect: icmpv6TypeCodeInfoStruct{ - "Redirect", nil, - }, - } -) - -type ICMPv6TypeCode uint16 - -// Type returns the ICMPv6 type field. -func (a ICMPv6TypeCode) Type() uint8 { - return uint8(a >> 8) -} - -// Code returns the ICMPv6 code field. -func (a ICMPv6TypeCode) Code() uint8 { - return uint8(a) -} - -func (a ICMPv6TypeCode) String() string { - t, c := a.Type(), a.Code() - strInfo, ok := icmpv6TypeCodeInfo[t] - if !ok { - // Unknown ICMPv6 type field - return fmt.Sprintf("%d(%d)", t, c) - } - typeStr := strInfo.typeStr - if strInfo.codeStr == nil && c == 0 { - // The ICMPv6 type does not make use of the code field - return fmt.Sprintf("%s", strInfo.typeStr) - } - if strInfo.codeStr == nil && c != 0 { - // The ICMPv6 type does not make use of the code field, but it is present anyway - return fmt.Sprintf("%s(Code: %d)", typeStr, c) - } - codeStr, ok := (*strInfo.codeStr)[c] - if !ok { - // We don't know this ICMPv6 code; print the numerical value - return fmt.Sprintf("%s(Code: %d)", typeStr, c) - } - return fmt.Sprintf("%s(%s)", typeStr, codeStr) -} - -func (a ICMPv6TypeCode) GoString() string { - t := reflect.TypeOf(a) - return fmt.Sprintf("%s(%d, %d)", t.String(), a.Type(), a.Code()) -} - -// SerializeTo writes the ICMPv6TypeCode value to the 'bytes' buffer. -func (a ICMPv6TypeCode) SerializeTo(bytes []byte) { - binary.BigEndian.PutUint16(bytes, uint16(a)) -} - -// CreateICMPv6TypeCode is a convenience function to create an ICMPv6TypeCode -// gopacket type from the ICMPv6 type and code values. -func CreateICMPv6TypeCode(typ uint8, code uint8) ICMPv6TypeCode { - return ICMPv6TypeCode(binary.BigEndian.Uint16([]byte{typ, code})) -} - -// ICMPv6 is the layer for IPv6 ICMP packet data -type ICMPv6 struct { - BaseLayer - TypeCode ICMPv6TypeCode - Checksum uint16 - // TypeBytes is deprecated and always nil. See the different ICMPv6 message types - // instead (e.g. ICMPv6TypeRouterSolicitation). - TypeBytes []byte - tcpipchecksum -} - -// LayerType returns LayerTypeICMPv6. -func (i *ICMPv6) LayerType() gopacket.LayerType { return LayerTypeICMPv6 } - -// DecodeFromBytes decodes the given bytes into this layer. -func (i *ICMPv6) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 4 { - df.SetTruncated() - return errors.New("ICMP layer less then 4 bytes for ICMPv6 packet") - } - i.TypeCode = CreateICMPv6TypeCode(data[0], data[1]) - i.Checksum = binary.BigEndian.Uint16(data[2:4]) - i.BaseLayer = BaseLayer{data[:4], data[4:]} - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (i *ICMPv6) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(4) - if err != nil { - return err - } - i.TypeCode.SerializeTo(bytes) - - if opts.ComputeChecksums { - bytes[2] = 0 - bytes[3] = 0 - csum, err := i.computeChecksum(b.Bytes(), IPProtocolICMPv6) - if err != nil { - return err - } - i.Checksum = csum - } - binary.BigEndian.PutUint16(bytes[2:], i.Checksum) - - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (i *ICMPv6) CanDecode() gopacket.LayerClass { - return LayerTypeICMPv6 -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (i *ICMPv6) NextLayerType() gopacket.LayerType { - switch i.TypeCode.Type() { - case ICMPv6TypeEchoRequest: - return LayerTypeICMPv6Echo - case ICMPv6TypeEchoReply: - return LayerTypeICMPv6Echo - case ICMPv6TypeRouterSolicitation: - return LayerTypeICMPv6RouterSolicitation - case ICMPv6TypeRouterAdvertisement: - return LayerTypeICMPv6RouterAdvertisement - case ICMPv6TypeNeighborSolicitation: - return LayerTypeICMPv6NeighborSolicitation - case ICMPv6TypeNeighborAdvertisement: - return LayerTypeICMPv6NeighborAdvertisement - case ICMPv6TypeRedirect: - return LayerTypeICMPv6Redirect - case ICMPv6TypeMLDv1MulticastListenerQueryMessage: // Same Code for MLDv1 Query and MLDv2 Query - if len(i.Payload) > 20 { // Only payload size differs - return LayerTypeMLDv2MulticastListenerQuery - } else { - return LayerTypeMLDv1MulticastListenerQuery - } - case ICMPv6TypeMLDv1MulticastListenerDoneMessage: - return LayerTypeMLDv1MulticastListenerDone - case ICMPv6TypeMLDv1MulticastListenerReportMessage: - return LayerTypeMLDv1MulticastListenerReport - case ICMPv6TypeMLDv2MulticastListenerReportMessageV2: - return LayerTypeMLDv2MulticastListenerReport - } - - return gopacket.LayerTypePayload -} - -func decodeICMPv6(data []byte, p gopacket.PacketBuilder) error { - i := &ICMPv6{} - return decodingLayerDecoder(i, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/icmp6msg.go b/vendor/github.com/google/gopacket/layers/icmp6msg.go deleted file mode 100644 index d9268db0563..00000000000 --- a/vendor/github.com/google/gopacket/layers/icmp6msg.go +++ /dev/null @@ -1,578 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "encoding/hex" - "errors" - "fmt" - "net" - "time" - - "github.com/google/gopacket" -) - -// Based on RFC 4861 - -// ICMPv6Opt indicate how to decode the data associated with each ICMPv6Option. -type ICMPv6Opt uint8 - -const ( - _ ICMPv6Opt = iota - - // ICMPv6OptSourceAddress contains the link-layer address of the sender of - // the packet. It is used in the Neighbor Solicitation, Router - // Solicitation, and Router Advertisement packets. Must be ignored for other - // Neighbor discovery messages. - ICMPv6OptSourceAddress - - // ICMPv6OptTargetAddress contains the link-layer address of the target. It - // is used in Neighbor Advertisement and Redirect packets. Must be ignored - // for other Neighbor discovery messages. - ICMPv6OptTargetAddress - - // ICMPv6OptPrefixInfo provides hosts with on-link prefixes and prefixes - // for Address Autoconfiguration. The Prefix Information option appears in - // Router Advertisement packets and MUST be silently ignored for other - // messages. - ICMPv6OptPrefixInfo - - // ICMPv6OptRedirectedHeader is used in Redirect messages and contains all - // or part of the packet that is being redirected. - ICMPv6OptRedirectedHeader - - // ICMPv6OptMTU is used in Router Advertisement messages to ensure that all - // nodes on a link use the same MTU value in those cases where the link MTU - // is not well known. This option MUST be silently ignored for other - // Neighbor Discovery messages. - ICMPv6OptMTU -) - -// ICMPv6Echo represents the structure of a ping. -type ICMPv6Echo struct { - BaseLayer - Identifier uint16 - SeqNumber uint16 -} - -// ICMPv6RouterSolicitation is sent by hosts to find routers. -type ICMPv6RouterSolicitation struct { - BaseLayer - Options ICMPv6Options -} - -// ICMPv6RouterAdvertisement is sent by routers in response to Solicitation. -type ICMPv6RouterAdvertisement struct { - BaseLayer - HopLimit uint8 - Flags uint8 - RouterLifetime uint16 - ReachableTime uint32 - RetransTimer uint32 - Options ICMPv6Options -} - -// ICMPv6NeighborSolicitation is sent to request the link-layer address of a -// target node. -type ICMPv6NeighborSolicitation struct { - BaseLayer - TargetAddress net.IP - Options ICMPv6Options -} - -// ICMPv6NeighborAdvertisement is sent by nodes in response to Solicitation. -type ICMPv6NeighborAdvertisement struct { - BaseLayer - Flags uint8 - TargetAddress net.IP - Options ICMPv6Options -} - -// ICMPv6Redirect is sent by routers to inform hosts of a better first-hop node -// on the path to a destination. -type ICMPv6Redirect struct { - BaseLayer - TargetAddress net.IP - DestinationAddress net.IP - Options ICMPv6Options -} - -// ICMPv6Option contains the type and data for a single option. -type ICMPv6Option struct { - Type ICMPv6Opt - Data []byte -} - -// ICMPv6Options is a slice of ICMPv6Option. -type ICMPv6Options []ICMPv6Option - -func (i ICMPv6Opt) String() string { - switch i { - case ICMPv6OptSourceAddress: - return "SourceAddress" - case ICMPv6OptTargetAddress: - return "TargetAddress" - case ICMPv6OptPrefixInfo: - return "PrefixInfo" - case ICMPv6OptRedirectedHeader: - return "RedirectedHeader" - case ICMPv6OptMTU: - return "MTU" - default: - return fmt.Sprintf("Unknown(%d)", i) - } -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (i *ICMPv6Echo) CanDecode() gopacket.LayerClass { - return LayerTypeICMPv6Echo -} - -// LayerType returns LayerTypeICMPv6Echo. -func (i *ICMPv6Echo) LayerType() gopacket.LayerType { - return LayerTypeICMPv6Echo -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (i *ICMPv6Echo) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (i *ICMPv6Echo) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 4 { - df.SetTruncated() - return errors.New("ICMP layer less then 4 bytes for ICMPv6 Echo") - } - i.Identifier = binary.BigEndian.Uint16(data[0:2]) - i.SeqNumber = binary.BigEndian.Uint16(data[2:4]) - - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (i *ICMPv6Echo) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(4) - if err != nil { - return err - } - - binary.BigEndian.PutUint16(buf, i.Identifier) - binary.BigEndian.PutUint16(buf[2:], i.SeqNumber) - return nil -} - -// LayerType returns LayerTypeICMPv6. -func (i *ICMPv6RouterSolicitation) LayerType() gopacket.LayerType { - return LayerTypeICMPv6RouterSolicitation -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (i *ICMPv6RouterSolicitation) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (i *ICMPv6RouterSolicitation) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - // first 4 bytes are reserved followed by options - if len(data) < 4 { - df.SetTruncated() - return errors.New("ICMP layer less then 4 bytes for ICMPv6 router solicitation") - } - - // truncate old options - i.Options = i.Options[:0] - - return i.Options.DecodeFromBytes(data[4:], df) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (i *ICMPv6RouterSolicitation) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if err := i.Options.SerializeTo(b, opts); err != nil { - return err - } - - buf, err := b.PrependBytes(4) - if err != nil { - return err - } - - copy(buf, lotsOfZeros[:4]) - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (i *ICMPv6RouterSolicitation) CanDecode() gopacket.LayerClass { - return LayerTypeICMPv6RouterSolicitation -} - -// LayerType returns LayerTypeICMPv6RouterAdvertisement. -func (i *ICMPv6RouterAdvertisement) LayerType() gopacket.LayerType { - return LayerTypeICMPv6RouterAdvertisement -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (i *ICMPv6RouterAdvertisement) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (i *ICMPv6RouterAdvertisement) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 12 { - df.SetTruncated() - return errors.New("ICMP layer less then 12 bytes for ICMPv6 router advertisement") - } - - i.HopLimit = uint8(data[0]) - // M, O bit followed by 6 reserved bits - i.Flags = uint8(data[1]) - i.RouterLifetime = binary.BigEndian.Uint16(data[2:4]) - i.ReachableTime = binary.BigEndian.Uint32(data[4:8]) - i.RetransTimer = binary.BigEndian.Uint32(data[8:12]) - i.BaseLayer = BaseLayer{data, nil} // assume no payload - - // truncate old options - i.Options = i.Options[:0] - - return i.Options.DecodeFromBytes(data[12:], df) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (i *ICMPv6RouterAdvertisement) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if err := i.Options.SerializeTo(b, opts); err != nil { - return err - } - - buf, err := b.PrependBytes(12) - if err != nil { - return err - } - - buf[0] = byte(i.HopLimit) - buf[1] = byte(i.Flags) - binary.BigEndian.PutUint16(buf[2:], i.RouterLifetime) - binary.BigEndian.PutUint32(buf[4:], i.ReachableTime) - binary.BigEndian.PutUint32(buf[8:], i.RetransTimer) - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (i *ICMPv6RouterAdvertisement) CanDecode() gopacket.LayerClass { - return LayerTypeICMPv6RouterAdvertisement -} - -// ManagedAddressConfig is true when addresses are available via DHCPv6. If -// set, the OtherConfig flag is redundant. -func (i *ICMPv6RouterAdvertisement) ManagedAddressConfig() bool { - return i.Flags&0x80 != 0 -} - -// OtherConfig is true when there is other configuration information available -// via DHCPv6. For example, DNS-related information. -func (i *ICMPv6RouterAdvertisement) OtherConfig() bool { - return i.Flags&0x40 != 0 -} - -// LayerType returns LayerTypeICMPv6NeighborSolicitation. -func (i *ICMPv6NeighborSolicitation) LayerType() gopacket.LayerType { - return LayerTypeICMPv6NeighborSolicitation -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (i *ICMPv6NeighborSolicitation) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (i *ICMPv6NeighborSolicitation) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 20 { - df.SetTruncated() - return errors.New("ICMP layer less then 20 bytes for ICMPv6 neighbor solicitation") - } - - i.TargetAddress = net.IP(data[4:20]) - i.BaseLayer = BaseLayer{data, nil} // assume no payload - - // truncate old options - i.Options = i.Options[:0] - - return i.Options.DecodeFromBytes(data[20:], df) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (i *ICMPv6NeighborSolicitation) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if err := i.Options.SerializeTo(b, opts); err != nil { - return err - } - - buf, err := b.PrependBytes(20) - if err != nil { - return err - } - - copy(buf, lotsOfZeros[:4]) - copy(buf[4:], i.TargetAddress) - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (i *ICMPv6NeighborSolicitation) CanDecode() gopacket.LayerClass { - return LayerTypeICMPv6NeighborSolicitation -} - -// LayerType returns LayerTypeICMPv6NeighborAdvertisement. -func (i *ICMPv6NeighborAdvertisement) LayerType() gopacket.LayerType { - return LayerTypeICMPv6NeighborAdvertisement -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (i *ICMPv6NeighborAdvertisement) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (i *ICMPv6NeighborAdvertisement) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 20 { - df.SetTruncated() - return errors.New("ICMP layer less then 20 bytes for ICMPv6 neighbor advertisement") - } - - i.Flags = uint8(data[0]) - i.TargetAddress = net.IP(data[4:20]) - i.BaseLayer = BaseLayer{data, nil} // assume no payload - - // truncate old options - i.Options = i.Options[:0] - - return i.Options.DecodeFromBytes(data[20:], df) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (i *ICMPv6NeighborAdvertisement) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if err := i.Options.SerializeTo(b, opts); err != nil { - return err - } - - buf, err := b.PrependBytes(20) - if err != nil { - return err - } - - buf[0] = byte(i.Flags) - copy(buf[1:], lotsOfZeros[:3]) - copy(buf[4:], i.TargetAddress) - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (i *ICMPv6NeighborAdvertisement) CanDecode() gopacket.LayerClass { - return LayerTypeICMPv6NeighborAdvertisement -} - -// Router indicates whether the sender is a router or not. -func (i *ICMPv6NeighborAdvertisement) Router() bool { - return i.Flags&0x80 != 0 -} - -// Solicited indicates whether the advertisement was solicited or not. -func (i *ICMPv6NeighborAdvertisement) Solicited() bool { - return i.Flags&0x40 != 0 -} - -// Override indicates whether the advertisement should Override an existing -// cache entry. -func (i *ICMPv6NeighborAdvertisement) Override() bool { - return i.Flags&0x20 != 0 -} - -// LayerType returns LayerTypeICMPv6Redirect. -func (i *ICMPv6Redirect) LayerType() gopacket.LayerType { - return LayerTypeICMPv6Redirect -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (i *ICMPv6Redirect) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (i *ICMPv6Redirect) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 36 { - df.SetTruncated() - return errors.New("ICMP layer less then 36 bytes for ICMPv6 redirect") - } - - i.TargetAddress = net.IP(data[4:20]) - i.DestinationAddress = net.IP(data[20:36]) - i.BaseLayer = BaseLayer{data, nil} // assume no payload - - // truncate old options - i.Options = i.Options[:0] - - return i.Options.DecodeFromBytes(data[36:], df) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (i *ICMPv6Redirect) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if err := i.Options.SerializeTo(b, opts); err != nil { - return err - } - - buf, err := b.PrependBytes(36) - if err != nil { - return err - } - - copy(buf, lotsOfZeros[:4]) - copy(buf[4:], i.TargetAddress) - copy(buf[20:], i.DestinationAddress) - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (i *ICMPv6Redirect) CanDecode() gopacket.LayerClass { - return LayerTypeICMPv6Redirect -} - -func (i ICMPv6Option) String() string { - hd := hex.EncodeToString(i.Data) - if len(hd) > 0 { - hd = " 0x" + hd - } - - switch i.Type { - case ICMPv6OptSourceAddress, ICMPv6OptTargetAddress: - return fmt.Sprintf("ICMPv6Option(%s:%v)", - i.Type, - net.HardwareAddr(i.Data)) - case ICMPv6OptPrefixInfo: - if len(i.Data) == 30 { - prefixLen := uint8(i.Data[0]) - onLink := (i.Data[1]&0x80 != 0) - autonomous := (i.Data[1]&0x40 != 0) - validLifetime := time.Duration(binary.BigEndian.Uint32(i.Data[2:6])) * time.Second - preferredLifetime := time.Duration(binary.BigEndian.Uint32(i.Data[6:10])) * time.Second - - prefix := net.IP(i.Data[14:]) - - return fmt.Sprintf("ICMPv6Option(%s:%v/%v:%t:%t:%v:%v)", - i.Type, - prefix, prefixLen, - onLink, autonomous, - validLifetime, preferredLifetime) - } - case ICMPv6OptRedirectedHeader: - // could invoke IP decoder on data... probably best not to - break - case ICMPv6OptMTU: - if len(i.Data) == 6 { - return fmt.Sprintf("ICMPv6Option(%s:%v)", - i.Type, - binary.BigEndian.Uint32(i.Data[2:])) - } - - } - return fmt.Sprintf("ICMPv6Option(%s:%s)", i.Type, hd) -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (i *ICMPv6Options) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - for len(data) > 0 { - if len(data) < 2 { - df.SetTruncated() - return errors.New("ICMP layer less then 2 bytes for ICMPv6 message option") - } - - // unit is 8 octets, convert to bytes - length := int(data[1]) * 8 - - if length == 0 { - df.SetTruncated() - return errors.New("ICMPv6 message option with length 0") - } - - if len(data) < length { - df.SetTruncated() - return fmt.Errorf("ICMP layer only %v bytes for ICMPv6 message option with length %v", len(data), length) - } - - o := ICMPv6Option{ - Type: ICMPv6Opt(data[0]), - Data: data[2:length], - } - - // chop off option we just consumed - data = data[length:] - - *i = append(*i, o) - } - - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (i *ICMPv6Options) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - for _, opt := range []ICMPv6Option(*i) { - length := len(opt.Data) + 2 - buf, err := b.PrependBytes(length) - if err != nil { - return err - } - - buf[0] = byte(opt.Type) - buf[1] = byte(length / 8) - copy(buf[2:], opt.Data) - } - - return nil -} - -func decodeICMPv6Echo(data []byte, p gopacket.PacketBuilder) error { - i := &ICMPv6Echo{} - return decodingLayerDecoder(i, data, p) -} - -func decodeICMPv6RouterSolicitation(data []byte, p gopacket.PacketBuilder) error { - i := &ICMPv6RouterSolicitation{} - return decodingLayerDecoder(i, data, p) -} - -func decodeICMPv6RouterAdvertisement(data []byte, p gopacket.PacketBuilder) error { - i := &ICMPv6RouterAdvertisement{} - return decodingLayerDecoder(i, data, p) -} - -func decodeICMPv6NeighborSolicitation(data []byte, p gopacket.PacketBuilder) error { - i := &ICMPv6NeighborSolicitation{} - return decodingLayerDecoder(i, data, p) -} - -func decodeICMPv6NeighborAdvertisement(data []byte, p gopacket.PacketBuilder) error { - i := &ICMPv6NeighborAdvertisement{} - return decodingLayerDecoder(i, data, p) -} - -func decodeICMPv6Redirect(data []byte, p gopacket.PacketBuilder) error { - i := &ICMPv6Redirect{} - return decodingLayerDecoder(i, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/igmp.go b/vendor/github.com/google/gopacket/layers/igmp.go deleted file mode 100644 index d00841535bb..00000000000 --- a/vendor/github.com/google/gopacket/layers/igmp.go +++ /dev/null @@ -1,355 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "net" - "time" - - "github.com/google/gopacket" -) - -type IGMPType uint8 - -const ( - IGMPMembershipQuery IGMPType = 0x11 // General or group specific query - IGMPMembershipReportV1 IGMPType = 0x12 // Version 1 Membership Report - IGMPMembershipReportV2 IGMPType = 0x16 // Version 2 Membership Report - IGMPLeaveGroup IGMPType = 0x17 // Leave Group - IGMPMembershipReportV3 IGMPType = 0x22 // Version 3 Membership Report -) - -// String conversions for IGMP message types -func (i IGMPType) String() string { - switch i { - case IGMPMembershipQuery: - return "IGMP Membership Query" - case IGMPMembershipReportV1: - return "IGMPv1 Membership Report" - case IGMPMembershipReportV2: - return "IGMPv2 Membership Report" - case IGMPMembershipReportV3: - return "IGMPv3 Membership Report" - case IGMPLeaveGroup: - return "Leave Group" - default: - return "" - } -} - -type IGMPv3GroupRecordType uint8 - -const ( - IGMPIsIn IGMPv3GroupRecordType = 0x01 // Type MODE_IS_INCLUDE, source addresses x - IGMPIsEx IGMPv3GroupRecordType = 0x02 // Type MODE_IS_EXCLUDE, source addresses x - IGMPToIn IGMPv3GroupRecordType = 0x03 // Type CHANGE_TO_INCLUDE_MODE, source addresses x - IGMPToEx IGMPv3GroupRecordType = 0x04 // Type CHANGE_TO_EXCLUDE_MODE, source addresses x - IGMPAllow IGMPv3GroupRecordType = 0x05 // Type ALLOW_NEW_SOURCES, source addresses x - IGMPBlock IGMPv3GroupRecordType = 0x06 // Type BLOCK_OLD_SOURCES, source addresses x -) - -func (i IGMPv3GroupRecordType) String() string { - switch i { - case IGMPIsIn: - return "MODE_IS_INCLUDE" - case IGMPIsEx: - return "MODE_IS_EXCLUDE" - case IGMPToIn: - return "CHANGE_TO_INCLUDE_MODE" - case IGMPToEx: - return "CHANGE_TO_EXCLUDE_MODE" - case IGMPAllow: - return "ALLOW_NEW_SOURCES" - case IGMPBlock: - return "BLOCK_OLD_SOURCES" - default: - return "" - } -} - -// IGMP represents an IGMPv3 message. -type IGMP struct { - BaseLayer - Type IGMPType - MaxResponseTime time.Duration - Checksum uint16 - GroupAddress net.IP - SupressRouterProcessing bool - RobustnessValue uint8 - IntervalTime time.Duration - SourceAddresses []net.IP - NumberOfGroupRecords uint16 - NumberOfSources uint16 - GroupRecords []IGMPv3GroupRecord - Version uint8 // IGMP protocol version -} - -// IGMPv1or2 stores header details for an IGMPv1 or IGMPv2 packet. -// -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Type | Max Resp Time | Checksum | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Group Address | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -type IGMPv1or2 struct { - BaseLayer - Type IGMPType // IGMP message type - MaxResponseTime time.Duration // meaningful only in Membership Query messages - Checksum uint16 // 16-bit checksum of entire ip payload - GroupAddress net.IP // either 0 or an IP multicast address - Version uint8 -} - -// decodeResponse dissects IGMPv1 or IGMPv2 packet. -func (i *IGMPv1or2) decodeResponse(data []byte) error { - if len(data) < 8 { - return errors.New("IGMP packet too small") - } - - i.MaxResponseTime = igmpTimeDecode(data[1]) - i.Checksum = binary.BigEndian.Uint16(data[2:4]) - i.GroupAddress = net.IP(data[4:8]) - - return nil -} - -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Type = 0x22 | Reserved | Checksum | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Reserved | Number of Group Records (M) | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | | -// . Group Record [1] . -// | | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | | -// . Group Record [2] . -// | | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | | -// . Group Record [M] . -// | | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Record Type | Aux Data Len | Number of Sources (N) | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Multicast Address | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Source Address [1] | -// +- -+ -// | Source Address [2] | -// +- -+ -// | Source Address [N] | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | | -// . Auxiliary Data . -// | | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - -// IGMPv3GroupRecord stores individual group records for a V3 Membership Report message. -type IGMPv3GroupRecord struct { - Type IGMPv3GroupRecordType - AuxDataLen uint8 // this should always be 0 as per IGMPv3 spec. - NumberOfSources uint16 - MulticastAddress net.IP - SourceAddresses []net.IP - AuxData uint32 // NOT USED -} - -func (i *IGMP) decodeIGMPv3MembershipReport(data []byte) error { - if len(data) < 8 { - return errors.New("IGMPv3 Membership Report too small #1") - } - - i.Checksum = binary.BigEndian.Uint16(data[2:4]) - i.NumberOfGroupRecords = binary.BigEndian.Uint16(data[6:8]) - - recordOffset := 8 - for j := 0; j < int(i.NumberOfGroupRecords); j++ { - if len(data) < recordOffset+8 { - return errors.New("IGMPv3 Membership Report too small #2") - } - - var gr IGMPv3GroupRecord - gr.Type = IGMPv3GroupRecordType(data[recordOffset]) - gr.AuxDataLen = data[recordOffset+1] - gr.NumberOfSources = binary.BigEndian.Uint16(data[recordOffset+2 : recordOffset+4]) - gr.MulticastAddress = net.IP(data[recordOffset+4 : recordOffset+8]) - - if len(data) < recordOffset+8+int(gr.NumberOfSources)*4 { - return errors.New("IGMPv3 Membership Report too small #3") - } - - // append source address records. - for i := 0; i < int(gr.NumberOfSources); i++ { - sourceAddr := net.IP(data[recordOffset+8+i*4 : recordOffset+12+i*4]) - gr.SourceAddresses = append(gr.SourceAddresses, sourceAddr) - } - - i.GroupRecords = append(i.GroupRecords, gr) - recordOffset += 8 + 4*int(gr.NumberOfSources) - } - return nil -} - -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Type = 0x11 | Max Resp Code | Checksum | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Group Address | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Resv |S| QRV | QQIC | Number of Sources (N) | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Source Address [1] | -// +- -+ -// | Source Address [2] | -// +- . -+ -// | Source Address [N] | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// -// decodeIGMPv3MembershipQuery parses the IGMPv3 message of type 0x11 -func (i *IGMP) decodeIGMPv3MembershipQuery(data []byte) error { - if len(data) < 12 { - return errors.New("IGMPv3 Membership Query too small #1") - } - - i.MaxResponseTime = igmpTimeDecode(data[1]) - i.Checksum = binary.BigEndian.Uint16(data[2:4]) - i.SupressRouterProcessing = data[8]&0x8 != 0 - i.GroupAddress = net.IP(data[4:8]) - i.RobustnessValue = data[8] & 0x7 - i.IntervalTime = igmpTimeDecode(data[9]) - i.NumberOfSources = binary.BigEndian.Uint16(data[10:12]) - - if len(data) < 12+int(i.NumberOfSources)*4 { - return errors.New("IGMPv3 Membership Query too small #2") - } - - for j := 0; j < int(i.NumberOfSources); j++ { - i.SourceAddresses = append(i.SourceAddresses, net.IP(data[12+j*4:16+j*4])) - } - - return nil -} - -// igmpTimeDecode decodes the duration created by the given byte, using the -// algorithm in http://www.rfc-base.org/txt/rfc-3376.txt section 4.1.1. -func igmpTimeDecode(t uint8) time.Duration { - if t&0x80 == 0 { - return time.Millisecond * 100 * time.Duration(t) - } - mant := (t & 0x70) >> 4 - exp := t & 0x0F - return time.Millisecond * 100 * time.Duration((mant|0x10)<<(exp+3)) -} - -// LayerType returns LayerTypeIGMP for the V1,2,3 message protocol formats. -func (i *IGMP) LayerType() gopacket.LayerType { return LayerTypeIGMP } -func (i *IGMPv1or2) LayerType() gopacket.LayerType { return LayerTypeIGMP } - -func (i *IGMPv1or2) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 8 { - return errors.New("IGMP Packet too small") - } - - i.Type = IGMPType(data[0]) - i.MaxResponseTime = igmpTimeDecode(data[1]) - i.Checksum = binary.BigEndian.Uint16(data[2:4]) - i.GroupAddress = net.IP(data[4:8]) - - return nil -} - -func (i *IGMPv1or2) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypeZero -} - -func (i *IGMPv1or2) CanDecode() gopacket.LayerClass { - return LayerTypeIGMP -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (i *IGMP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 1 { - return errors.New("IGMP packet is too small") - } - - // common IGMP header values between versions 1..3 of IGMP specification.. - i.Type = IGMPType(data[0]) - - switch i.Type { - case IGMPMembershipQuery: - i.decodeIGMPv3MembershipQuery(data) - case IGMPMembershipReportV3: - i.decodeIGMPv3MembershipReport(data) - default: - return errors.New("unsupported IGMP type") - } - - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (i *IGMP) CanDecode() gopacket.LayerClass { - return LayerTypeIGMP -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (i *IGMP) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypeZero -} - -// decodeIGMP will parse IGMP v1,2 or 3 protocols. Checks against the -// IGMP type are performed against byte[0], logic then iniitalizes and -// passes the appropriate struct (IGMP or IGMPv1or2) to -// decodingLayerDecoder. -func decodeIGMP(data []byte, p gopacket.PacketBuilder) error { - if len(data) < 1 { - return errors.New("IGMP packet is too small") - } - - // byte 0 contains IGMP message type. - switch IGMPType(data[0]) { - case IGMPMembershipQuery: - // IGMPv3 Membership Query payload is >= 12 - if len(data) >= 12 { - i := &IGMP{Version: 3} - return decodingLayerDecoder(i, data, p) - } else if len(data) == 8 { - i := &IGMPv1or2{} - if data[1] == 0x00 { - i.Version = 1 // IGMPv1 has a query length of 8 and MaxResp = 0 - } else { - i.Version = 2 // IGMPv2 has a query length of 8 and MaxResp != 0 - } - - return decodingLayerDecoder(i, data, p) - } - case IGMPMembershipReportV3: - i := &IGMP{Version: 3} - return decodingLayerDecoder(i, data, p) - case IGMPMembershipReportV1: - i := &IGMPv1or2{Version: 1} - return decodingLayerDecoder(i, data, p) - case IGMPLeaveGroup, IGMPMembershipReportV2: - // leave group and Query Report v2 used in IGMPv2 only. - i := &IGMPv1or2{Version: 2} - return decodingLayerDecoder(i, data, p) - default: - } - - return errors.New("Unable to determine IGMP type.") -} diff --git a/vendor/github.com/google/gopacket/layers/ip4.go b/vendor/github.com/google/gopacket/layers/ip4.go deleted file mode 100644 index 2b3c0c6bff9..00000000000 --- a/vendor/github.com/google/gopacket/layers/ip4.go +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "net" - "strings" - - "github.com/google/gopacket" -) - -type IPv4Flag uint8 - -const ( - IPv4EvilBit IPv4Flag = 1 << 2 // http://tools.ietf.org/html/rfc3514 ;) - IPv4DontFragment IPv4Flag = 1 << 1 - IPv4MoreFragments IPv4Flag = 1 << 0 -) - -func (f IPv4Flag) String() string { - var s []string - if f&IPv4EvilBit != 0 { - s = append(s, "Evil") - } - if f&IPv4DontFragment != 0 { - s = append(s, "DF") - } - if f&IPv4MoreFragments != 0 { - s = append(s, "MF") - } - return strings.Join(s, "|") -} - -// IPv4 is the header of an IP packet. -type IPv4 struct { - BaseLayer - Version uint8 - IHL uint8 - TOS uint8 - Length uint16 - Id uint16 - Flags IPv4Flag - FragOffset uint16 - TTL uint8 - Protocol IPProtocol - Checksum uint16 - SrcIP net.IP - DstIP net.IP - Options []IPv4Option - Padding []byte -} - -// LayerType returns LayerTypeIPv4 -func (i *IPv4) LayerType() gopacket.LayerType { return LayerTypeIPv4 } -func (i *IPv4) NetworkFlow() gopacket.Flow { - return gopacket.NewFlow(EndpointIPv4, i.SrcIP, i.DstIP) -} - -type IPv4Option struct { - OptionType uint8 - OptionLength uint8 - OptionData []byte -} - -func (i IPv4Option) String() string { - return fmt.Sprintf("IPv4Option(%v:%v)", i.OptionType, i.OptionData) -} - -// for the current ipv4 options, return the number of bytes (including -// padding that the options used) -func (ip *IPv4) getIPv4OptionSize() uint8 { - optionSize := uint8(0) - for _, opt := range ip.Options { - switch opt.OptionType { - case 0: - // this is the end of option lists - optionSize++ - case 1: - // this is the padding - optionSize++ - default: - optionSize += opt.OptionLength - - } - } - // make sure the options are aligned to 32 bit boundary - if (optionSize % 4) != 0 { - optionSize += 4 - (optionSize % 4) - } - return optionSize -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -func (ip *IPv4) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - optionLength := ip.getIPv4OptionSize() - bytes, err := b.PrependBytes(20 + int(optionLength)) - if err != nil { - return err - } - if opts.FixLengths { - ip.IHL = 5 + (optionLength / 4) - ip.Length = uint16(len(b.Bytes())) - } - bytes[0] = (ip.Version << 4) | ip.IHL - bytes[1] = ip.TOS - binary.BigEndian.PutUint16(bytes[2:], ip.Length) - binary.BigEndian.PutUint16(bytes[4:], ip.Id) - binary.BigEndian.PutUint16(bytes[6:], ip.flagsfrags()) - bytes[8] = ip.TTL - bytes[9] = byte(ip.Protocol) - if err := ip.AddressTo4(); err != nil { - return err - } - copy(bytes[12:16], ip.SrcIP) - copy(bytes[16:20], ip.DstIP) - - curLocation := 20 - // Now, we will encode the options - for _, opt := range ip.Options { - switch opt.OptionType { - case 0: - // this is the end of option lists - bytes[curLocation] = 0 - curLocation++ - case 1: - // this is the padding - bytes[curLocation] = 1 - curLocation++ - default: - bytes[curLocation] = opt.OptionType - bytes[curLocation+1] = opt.OptionLength - - // sanity checking to protect us from buffer overrun - if len(opt.OptionData) > int(opt.OptionLength-2) { - return errors.New("option length is smaller than length of option data") - } - copy(bytes[curLocation+2:curLocation+int(opt.OptionLength)], opt.OptionData) - curLocation += int(opt.OptionLength) - } - } - - if opts.ComputeChecksums { - ip.Checksum = checksum(bytes) - } - binary.BigEndian.PutUint16(bytes[10:], ip.Checksum) - return nil -} - -func checksum(bytes []byte) uint16 { - // Clear checksum bytes - bytes[10] = 0 - bytes[11] = 0 - - // Compute checksum - var csum uint32 - for i := 0; i < len(bytes); i += 2 { - csum += uint32(bytes[i]) << 8 - csum += uint32(bytes[i+1]) - } - for { - // Break when sum is less or equals to 0xFFFF - if csum <= 65535 { - break - } - // Add carry to the sum - csum = (csum >> 16) + uint32(uint16(csum)) - } - // Flip all the bits - return ^uint16(csum) -} - -func (ip *IPv4) flagsfrags() (ff uint16) { - ff |= uint16(ip.Flags) << 13 - ff |= ip.FragOffset - return -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (ip *IPv4) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 20 { - df.SetTruncated() - return fmt.Errorf("Invalid ip4 header. Length %d less than 20", len(data)) - } - flagsfrags := binary.BigEndian.Uint16(data[6:8]) - - ip.Version = uint8(data[0]) >> 4 - ip.IHL = uint8(data[0]) & 0x0F - ip.TOS = data[1] - ip.Length = binary.BigEndian.Uint16(data[2:4]) - ip.Id = binary.BigEndian.Uint16(data[4:6]) - ip.Flags = IPv4Flag(flagsfrags >> 13) - ip.FragOffset = flagsfrags & 0x1FFF - ip.TTL = data[8] - ip.Protocol = IPProtocol(data[9]) - ip.Checksum = binary.BigEndian.Uint16(data[10:12]) - ip.SrcIP = data[12:16] - ip.DstIP = data[16:20] - ip.Options = ip.Options[:0] - ip.Padding = nil - // Set up an initial guess for contents/payload... we'll reset these soon. - ip.BaseLayer = BaseLayer{Contents: data} - - // This code is added for the following enviroment: - // * Windows 10 with TSO option activated. ( tested on Hyper-V, RealTek ethernet driver ) - if ip.Length == 0 { - // If using TSO(TCP Segmentation Offload), length is zero. - // The actual packet length is the length of data. - ip.Length = uint16(len(data)) - } - - if ip.Length < 20 { - return fmt.Errorf("Invalid (too small) IP length (%d < 20)", ip.Length) - } else if ip.IHL < 5 { - return fmt.Errorf("Invalid (too small) IP header length (%d < 5)", ip.IHL) - } else if int(ip.IHL*4) > int(ip.Length) { - return fmt.Errorf("Invalid IP header length > IP length (%d > %d)", ip.IHL, ip.Length) - } - if cmp := len(data) - int(ip.Length); cmp > 0 { - data = data[:ip.Length] - } else if cmp < 0 { - df.SetTruncated() - if int(ip.IHL)*4 > len(data) { - return errors.New("Not all IP header bytes available") - } - } - ip.Contents = data[:ip.IHL*4] - ip.Payload = data[ip.IHL*4:] - // From here on, data contains the header options. - data = data[20 : ip.IHL*4] - // Pull out IP options - for len(data) > 0 { - if ip.Options == nil { - // Pre-allocate to avoid growing the slice too much. - ip.Options = make([]IPv4Option, 0, 4) - } - opt := IPv4Option{OptionType: data[0]} - switch opt.OptionType { - case 0: // End of options - opt.OptionLength = 1 - ip.Options = append(ip.Options, opt) - ip.Padding = data[1:] - return nil - case 1: // 1 byte padding - opt.OptionLength = 1 - data = data[1:] - ip.Options = append(ip.Options, opt) - default: - if len(data) < 2 { - df.SetTruncated() - return fmt.Errorf("Invalid ip4 option length. Length %d less than 2", len(data)) - } - opt.OptionLength = data[1] - if len(data) < int(opt.OptionLength) { - df.SetTruncated() - return fmt.Errorf("IP option length exceeds remaining IP header size, option type %v length %v", opt.OptionType, opt.OptionLength) - } - if opt.OptionLength <= 2 { - return fmt.Errorf("Invalid IP option type %v length %d. Must be greater than 2", opt.OptionType, opt.OptionLength) - } - opt.OptionData = data[2:opt.OptionLength] - data = data[opt.OptionLength:] - ip.Options = append(ip.Options, opt) - } - } - return nil -} - -func (i *IPv4) CanDecode() gopacket.LayerClass { - return LayerTypeIPv4 -} - -func (i *IPv4) NextLayerType() gopacket.LayerType { - if i.Flags&IPv4MoreFragments != 0 || i.FragOffset != 0 { - return gopacket.LayerTypeFragment - } - return i.Protocol.LayerType() -} - -func decodeIPv4(data []byte, p gopacket.PacketBuilder) error { - ip := &IPv4{} - err := ip.DecodeFromBytes(data, p) - p.AddLayer(ip) - p.SetNetworkLayer(ip) - if err != nil { - return err - } - return p.NextDecoder(ip.NextLayerType()) -} - -func checkIPv4Address(addr net.IP) (net.IP, error) { - if c := addr.To4(); c != nil { - return c, nil - } - if len(addr) == net.IPv6len { - return nil, errors.New("address is IPv6") - } - return nil, fmt.Errorf("wrong length of %d bytes instead of %d", len(addr), net.IPv4len) -} - -func (ip *IPv4) AddressTo4() error { - var src, dst net.IP - - if addr, err := checkIPv4Address(ip.SrcIP); err != nil { - return fmt.Errorf("Invalid source IPv4 address (%s)", err) - } else { - src = addr - } - if addr, err := checkIPv4Address(ip.DstIP); err != nil { - return fmt.Errorf("Invalid destination IPv4 address (%s)", err) - } else { - dst = addr - } - ip.SrcIP = src - ip.DstIP = dst - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/ip6.go b/vendor/github.com/google/gopacket/layers/ip6.go deleted file mode 100644 index 87b9d33d513..00000000000 --- a/vendor/github.com/google/gopacket/layers/ip6.go +++ /dev/null @@ -1,722 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "net" - - "github.com/google/gopacket" -) - -const ( - // IPv6HopByHopOptionJumbogram code as defined in RFC 2675 - IPv6HopByHopOptionJumbogram = 0xC2 -) - -const ( - ipv6MaxPayloadLength = 65535 -) - -// IPv6 is the layer for the IPv6 header. -type IPv6 struct { - // http://www.networksorcery.com/enp/protocol/ipv6.htm - BaseLayer - Version uint8 - TrafficClass uint8 - FlowLabel uint32 - Length uint16 - NextHeader IPProtocol - HopLimit uint8 - SrcIP net.IP - DstIP net.IP - HopByHop *IPv6HopByHop - // hbh will be pointed to by HopByHop if that layer exists. - hbh IPv6HopByHop -} - -// LayerType returns LayerTypeIPv6 -func (ipv6 *IPv6) LayerType() gopacket.LayerType { return LayerTypeIPv6 } - -// NetworkFlow returns this new Flow (EndpointIPv6, SrcIP, DstIP) -func (ipv6 *IPv6) NetworkFlow() gopacket.Flow { - return gopacket.NewFlow(EndpointIPv6, ipv6.SrcIP, ipv6.DstIP) -} - -// Search for Jumbo Payload TLV in IPv6HopByHop and return (length, true) if found -func getIPv6HopByHopJumboLength(hopopts *IPv6HopByHop) (uint32, bool, error) { - var tlv *IPv6HopByHopOption - - for _, t := range hopopts.Options { - if t.OptionType == IPv6HopByHopOptionJumbogram { - tlv = t - break - } - } - if tlv == nil { - // Not found - return 0, false, nil - } - if len(tlv.OptionData) != 4 { - return 0, false, errors.New("Jumbo length TLV data must have length 4") - } - l := binary.BigEndian.Uint32(tlv.OptionData) - if l <= ipv6MaxPayloadLength { - return 0, false, fmt.Errorf("Jumbo length cannot be less than %d", ipv6MaxPayloadLength+1) - } - // Found - return l, true, nil -} - -// Adds zero-valued Jumbo TLV to IPv6 header if it does not exist -// (if necessary add hop-by-hop header) -func addIPv6JumboOption(ip6 *IPv6) { - var tlv *IPv6HopByHopOption - - if ip6.HopByHop == nil { - // Add IPv6 HopByHop - ip6.HopByHop = &IPv6HopByHop{} - ip6.HopByHop.NextHeader = ip6.NextHeader - ip6.HopByHop.HeaderLength = 0 - ip6.NextHeader = IPProtocolIPv6HopByHop - } - for _, t := range ip6.HopByHop.Options { - if t.OptionType == IPv6HopByHopOptionJumbogram { - tlv = t - break - } - } - if tlv == nil { - // Add Jumbo TLV - tlv = &IPv6HopByHopOption{} - ip6.HopByHop.Options = append(ip6.HopByHop.Options, tlv) - } - tlv.SetJumboLength(0) -} - -// Set jumbo length in serialized IPv6 payload (starting with HopByHop header) -func setIPv6PayloadJumboLength(hbh []byte) error { - pLen := len(hbh) - if pLen < 8 { - //HopByHop is minimum 8 bytes - return fmt.Errorf("Invalid IPv6 payload (length %d)", pLen) - } - hbhLen := int((hbh[1] + 1) * 8) - if hbhLen > pLen { - return fmt.Errorf("Invalid hop-by-hop length (length: %d, payload: %d", hbhLen, pLen) - } - offset := 2 //start with options - for offset < hbhLen { - opt := hbh[offset] - if opt == 0 { - //Pad1 - offset++ - continue - } - optLen := int(hbh[offset+1]) - if opt == IPv6HopByHopOptionJumbogram { - if optLen == 4 { - binary.BigEndian.PutUint32(hbh[offset+2:], uint32(pLen)) - return nil - } - return fmt.Errorf("Jumbo TLV too short (%d bytes)", optLen) - } - offset += 2 + optLen - } - return errors.New("Jumbo TLV not found") -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (ipv6 *IPv6) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - var jumbo bool - var err error - - payload := b.Bytes() - pLen := len(payload) - if pLen > ipv6MaxPayloadLength { - jumbo = true - if opts.FixLengths { - // We need to set the length later because the hop-by-hop header may - // not exist or else need padding, so pLen may yet change - addIPv6JumboOption(ipv6) - } else if ipv6.HopByHop == nil { - return fmt.Errorf("Cannot fit payload length of %d into IPv6 packet", pLen) - } else { - _, ok, err := getIPv6HopByHopJumboLength(ipv6.HopByHop) - if err != nil { - return err - } - if !ok { - return errors.New("Missing jumbo length hop-by-hop option") - } - } - } - - hbhAlreadySerialized := false - if ipv6.HopByHop != nil { - for _, l := range b.Layers() { - if l == LayerTypeIPv6HopByHop { - hbhAlreadySerialized = true - break - } - } - } - if ipv6.HopByHop != nil && !hbhAlreadySerialized { - if ipv6.NextHeader != IPProtocolIPv6HopByHop { - // Just fix it instead of throwing an error - ipv6.NextHeader = IPProtocolIPv6HopByHop - } - err = ipv6.HopByHop.SerializeTo(b, opts) - if err != nil { - return err - } - payload = b.Bytes() - pLen = len(payload) - if opts.FixLengths && jumbo { - err := setIPv6PayloadJumboLength(payload) - if err != nil { - return err - } - } - } - - if !jumbo && pLen > ipv6MaxPayloadLength { - return errors.New("Cannot fit payload into IPv6 header") - } - bytes, err := b.PrependBytes(40) - if err != nil { - return err - } - bytes[0] = (ipv6.Version << 4) | (ipv6.TrafficClass >> 4) - bytes[1] = (ipv6.TrafficClass << 4) | uint8(ipv6.FlowLabel>>16) - binary.BigEndian.PutUint16(bytes[2:], uint16(ipv6.FlowLabel)) - if opts.FixLengths { - if jumbo { - ipv6.Length = 0 - } else { - ipv6.Length = uint16(pLen) - } - } - binary.BigEndian.PutUint16(bytes[4:], ipv6.Length) - bytes[6] = byte(ipv6.NextHeader) - bytes[7] = byte(ipv6.HopLimit) - if err := ipv6.AddressTo16(); err != nil { - return err - } - copy(bytes[8:], ipv6.SrcIP) - copy(bytes[24:], ipv6.DstIP) - return nil -} - -// DecodeFromBytes implementation according to gopacket.DecodingLayer -func (ipv6 *IPv6) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 40 { - df.SetTruncated() - return fmt.Errorf("Invalid ip6 header. Length %d less than 40", len(data)) - } - ipv6.Version = uint8(data[0]) >> 4 - ipv6.TrafficClass = uint8((binary.BigEndian.Uint16(data[0:2]) >> 4) & 0x00FF) - ipv6.FlowLabel = binary.BigEndian.Uint32(data[0:4]) & 0x000FFFFF - ipv6.Length = binary.BigEndian.Uint16(data[4:6]) - ipv6.NextHeader = IPProtocol(data[6]) - ipv6.HopLimit = data[7] - ipv6.SrcIP = data[8:24] - ipv6.DstIP = data[24:40] - ipv6.HopByHop = nil - ipv6.BaseLayer = BaseLayer{data[:40], data[40:]} - - // We treat a HopByHop IPv6 option as part of the IPv6 packet, since its - // options are crucial for understanding what's actually happening per packet. - if ipv6.NextHeader == IPProtocolIPv6HopByHop { - err := ipv6.hbh.DecodeFromBytes(ipv6.Payload, df) - if err != nil { - return err - } - ipv6.HopByHop = &ipv6.hbh - pEnd, jumbo, err := getIPv6HopByHopJumboLength(ipv6.HopByHop) - if err != nil { - return err - } - if jumbo && ipv6.Length == 0 { - pEnd := int(pEnd) - if pEnd > len(ipv6.Payload) { - df.SetTruncated() - pEnd = len(ipv6.Payload) - } - ipv6.Payload = ipv6.Payload[:pEnd] - return nil - } else if jumbo && ipv6.Length != 0 { - return errors.New("IPv6 has jumbo length and IPv6 length is not 0") - } else if !jumbo && ipv6.Length == 0 { - return errors.New("IPv6 length 0, but HopByHop header does not have jumbogram option") - } else { - ipv6.Payload = ipv6.Payload[ipv6.hbh.ActualLength:] - } - } - - if ipv6.Length == 0 { - return fmt.Errorf("IPv6 length 0, but next header is %v, not HopByHop", ipv6.NextHeader) - } - - pEnd := int(ipv6.Length) - if pEnd > len(ipv6.Payload) { - df.SetTruncated() - pEnd = len(ipv6.Payload) - } - ipv6.Payload = ipv6.Payload[:pEnd] - - return nil -} - -// CanDecode implementation according to gopacket.DecodingLayer -func (ipv6 *IPv6) CanDecode() gopacket.LayerClass { - return LayerTypeIPv6 -} - -// NextLayerType implementation according to gopacket.DecodingLayer -func (ipv6 *IPv6) NextLayerType() gopacket.LayerType { - if ipv6.HopByHop != nil { - return ipv6.HopByHop.NextHeader.LayerType() - } - return ipv6.NextHeader.LayerType() -} - -func decodeIPv6(data []byte, p gopacket.PacketBuilder) error { - ip6 := &IPv6{} - err := ip6.DecodeFromBytes(data, p) - p.AddLayer(ip6) - p.SetNetworkLayer(ip6) - if ip6.HopByHop != nil { - p.AddLayer(ip6.HopByHop) - } - if err != nil { - return err - } - return p.NextDecoder(ip6.NextLayerType()) -} - -type ipv6HeaderTLVOption struct { - OptionType, OptionLength uint8 - ActualLength int - OptionData []byte - OptionAlignment [2]uint8 // Xn+Y = [2]uint8{X, Y} -} - -func (h *ipv6HeaderTLVOption) serializeTo(data []byte, fixLengths bool, dryrun bool) int { - if fixLengths { - h.OptionLength = uint8(len(h.OptionData)) - } - length := int(h.OptionLength) + 2 - if !dryrun { - data[0] = h.OptionType - data[1] = h.OptionLength - copy(data[2:], h.OptionData) - } - return length -} - -func decodeIPv6HeaderTLVOption(data []byte, df gopacket.DecodeFeedback) (h *ipv6HeaderTLVOption, _ error) { - if len(data) < 2 { - df.SetTruncated() - return nil, errors.New("IPv6 header option too small") - } - h = &ipv6HeaderTLVOption{} - if data[0] == 0 { - h.ActualLength = 1 - return - } - h.OptionType = data[0] - h.OptionLength = data[1] - h.ActualLength = int(h.OptionLength) + 2 - if len(data) < h.ActualLength { - df.SetTruncated() - return nil, errors.New("IPv6 header TLV option too small") - } - h.OptionData = data[2:h.ActualLength] - return -} - -func serializeTLVOptionPadding(data []byte, padLength int) { - if padLength <= 0 { - return - } - if padLength == 1 { - data[0] = 0x0 - return - } - tlvLength := uint8(padLength) - 2 - data[0] = 0x1 - data[1] = tlvLength - if tlvLength != 0 { - for k := range data[2:] { - data[k+2] = 0x0 - } - } - return -} - -// If buf is 'nil' do a serialize dry run -func serializeIPv6HeaderTLVOptions(buf []byte, options []*ipv6HeaderTLVOption, fixLengths bool) int { - var l int - - dryrun := buf == nil - length := 2 - for _, opt := range options { - if fixLengths { - x := int(opt.OptionAlignment[0]) - y := int(opt.OptionAlignment[1]) - if x != 0 { - n := length / x - offset := x*n + y - if offset < length { - offset += x - } - if length != offset { - pad := offset - length - if !dryrun { - serializeTLVOptionPadding(buf[length-2:], pad) - } - length += pad - } - } - } - if dryrun { - l = opt.serializeTo(nil, fixLengths, true) - } else { - l = opt.serializeTo(buf[length-2:], fixLengths, false) - } - length += l - } - if fixLengths { - pad := length % 8 - if pad != 0 { - if !dryrun { - serializeTLVOptionPadding(buf[length-2:], pad) - } - length += pad - } - } - return length - 2 -} - -type ipv6ExtensionBase struct { - BaseLayer - NextHeader IPProtocol - HeaderLength uint8 - ActualLength int -} - -func decodeIPv6ExtensionBase(data []byte, df gopacket.DecodeFeedback) (i ipv6ExtensionBase, returnedErr error) { - if len(data) < 2 { - df.SetTruncated() - return ipv6ExtensionBase{}, fmt.Errorf("Invalid ip6-extension header. Length %d less than 2", len(data)) - } - i.NextHeader = IPProtocol(data[0]) - i.HeaderLength = data[1] - i.ActualLength = int(i.HeaderLength)*8 + 8 - if len(data) < i.ActualLength { - return ipv6ExtensionBase{}, fmt.Errorf("Invalid ip6-extension header. Length %d less than specified length %d", len(data), i.ActualLength) - } - i.Contents = data[:i.ActualLength] - i.Payload = data[i.ActualLength:] - return -} - -// IPv6ExtensionSkipper is a DecodingLayer which decodes and ignores v6 -// extensions. You can use it with a DecodingLayerParser to handle IPv6 stacks -// which may or may not have extensions. -type IPv6ExtensionSkipper struct { - NextHeader IPProtocol - BaseLayer -} - -// DecodeFromBytes implementation according to gopacket.DecodingLayer -func (i *IPv6ExtensionSkipper) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - extension, err := decodeIPv6ExtensionBase(data, df) - if err != nil { - return err - } - i.BaseLayer = BaseLayer{data[:extension.ActualLength], data[extension.ActualLength:]} - i.NextHeader = extension.NextHeader - return nil -} - -// CanDecode implementation according to gopacket.DecodingLayer -func (i *IPv6ExtensionSkipper) CanDecode() gopacket.LayerClass { - return LayerClassIPv6Extension -} - -// NextLayerType implementation according to gopacket.DecodingLayer -func (i *IPv6ExtensionSkipper) NextLayerType() gopacket.LayerType { - return i.NextHeader.LayerType() -} - -// IPv6HopByHopOption is a TLV option present in an IPv6 hop-by-hop extension. -type IPv6HopByHopOption ipv6HeaderTLVOption - -// IPv6HopByHop is the IPv6 hop-by-hop extension. -type IPv6HopByHop struct { - ipv6ExtensionBase - Options []*IPv6HopByHopOption -} - -// LayerType returns LayerTypeIPv6HopByHop. -func (i *IPv6HopByHop) LayerType() gopacket.LayerType { return LayerTypeIPv6HopByHop } - -// SerializeTo implementation according to gopacket.SerializableLayer -func (i *IPv6HopByHop) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - var bytes []byte - var err error - - o := make([]*ipv6HeaderTLVOption, 0, len(i.Options)) - for _, v := range i.Options { - o = append(o, (*ipv6HeaderTLVOption)(v)) - } - - l := serializeIPv6HeaderTLVOptions(nil, o, opts.FixLengths) - bytes, err = b.PrependBytes(l) - if err != nil { - return err - } - serializeIPv6HeaderTLVOptions(bytes, o, opts.FixLengths) - - length := len(bytes) + 2 - if length%8 != 0 { - return errors.New("IPv6HopByHop actual length must be multiple of 8") - } - bytes, err = b.PrependBytes(2) - if err != nil { - return err - } - bytes[0] = uint8(i.NextHeader) - if opts.FixLengths { - i.HeaderLength = uint8((length / 8) - 1) - } - bytes[1] = uint8(i.HeaderLength) - return nil -} - -// DecodeFromBytes implementation according to gopacket.DecodingLayer -func (i *IPv6HopByHop) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - var err error - i.ipv6ExtensionBase, err = decodeIPv6ExtensionBase(data, df) - if err != nil { - return err - } - i.Options = i.Options[:0] - offset := 2 - for offset < i.ActualLength { - opt, err := decodeIPv6HeaderTLVOption(data[offset:], df) - if err != nil { - return err - } - i.Options = append(i.Options, (*IPv6HopByHopOption)(opt)) - offset += opt.ActualLength - } - return nil -} - -func decodeIPv6HopByHop(data []byte, p gopacket.PacketBuilder) error { - i := &IPv6HopByHop{} - err := i.DecodeFromBytes(data, p) - p.AddLayer(i) - if err != nil { - return err - } - return p.NextDecoder(i.NextHeader) -} - -// SetJumboLength adds the IPv6HopByHopOptionJumbogram with the given length -func (o *IPv6HopByHopOption) SetJumboLength(len uint32) { - o.OptionType = IPv6HopByHopOptionJumbogram - o.OptionLength = 4 - o.ActualLength = 6 - if o.OptionData == nil { - o.OptionData = make([]byte, 4) - } - binary.BigEndian.PutUint32(o.OptionData, len) - o.OptionAlignment = [2]uint8{4, 2} -} - -// IPv6Routing is the IPv6 routing extension. -type IPv6Routing struct { - ipv6ExtensionBase - RoutingType uint8 - SegmentsLeft uint8 - // This segment is supposed to be zero according to RFC2460, the second set of - // 4 bytes in the extension. - Reserved []byte - // SourceRoutingIPs is the set of IPv6 addresses requested for source routing, - // set only if RoutingType == 0. - SourceRoutingIPs []net.IP -} - -// LayerType returns LayerTypeIPv6Routing. -func (i *IPv6Routing) LayerType() gopacket.LayerType { return LayerTypeIPv6Routing } - -func decodeIPv6Routing(data []byte, p gopacket.PacketBuilder) error { - base, err := decodeIPv6ExtensionBase(data, p) - if err != nil { - return err - } - i := &IPv6Routing{ - ipv6ExtensionBase: base, - RoutingType: data[2], - SegmentsLeft: data[3], - Reserved: data[4:8], - } - switch i.RoutingType { - case 0: // Source routing - if (i.ActualLength-8)%16 != 0 { - return fmt.Errorf("Invalid IPv6 source routing, length of type 0 packet %d", i.ActualLength) - } - for d := i.Contents[8:]; len(d) >= 16; d = d[16:] { - i.SourceRoutingIPs = append(i.SourceRoutingIPs, net.IP(d[:16])) - } - default: - return fmt.Errorf("Unknown IPv6 routing header type %d", i.RoutingType) - } - p.AddLayer(i) - return p.NextDecoder(i.NextHeader) -} - -// IPv6Fragment is the IPv6 fragment header, used for packet -// fragmentation/defragmentation. -type IPv6Fragment struct { - BaseLayer - NextHeader IPProtocol - // Reserved1 is bits [8-16), from least to most significant, 0-indexed - Reserved1 uint8 - FragmentOffset uint16 - // Reserved2 is bits [29-31), from least to most significant, 0-indexed - Reserved2 uint8 - MoreFragments bool - Identification uint32 -} - -// LayerType returns LayerTypeIPv6Fragment. -func (i *IPv6Fragment) LayerType() gopacket.LayerType { return LayerTypeIPv6Fragment } - -func decodeIPv6Fragment(data []byte, p gopacket.PacketBuilder) error { - if len(data) < 8 { - p.SetTruncated() - return fmt.Errorf("Invalid ip6-fragment header. Length %d less than 8", len(data)) - } - i := &IPv6Fragment{ - BaseLayer: BaseLayer{data[:8], data[8:]}, - NextHeader: IPProtocol(data[0]), - Reserved1: data[1], - FragmentOffset: binary.BigEndian.Uint16(data[2:4]) >> 3, - Reserved2: data[3] & 0x6 >> 1, - MoreFragments: data[3]&0x1 != 0, - Identification: binary.BigEndian.Uint32(data[4:8]), - } - p.AddLayer(i) - return p.NextDecoder(gopacket.DecodeFragment) -} - -// IPv6DestinationOption is a TLV option present in an IPv6 destination options extension. -type IPv6DestinationOption ipv6HeaderTLVOption - -// IPv6Destination is the IPv6 destination options header. -type IPv6Destination struct { - ipv6ExtensionBase - Options []*IPv6DestinationOption -} - -// LayerType returns LayerTypeIPv6Destination. -func (i *IPv6Destination) LayerType() gopacket.LayerType { return LayerTypeIPv6Destination } - -// DecodeFromBytes implementation according to gopacket.DecodingLayer -func (i *IPv6Destination) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - var err error - i.ipv6ExtensionBase, err = decodeIPv6ExtensionBase(data, df) - if err != nil { - return err - } - offset := 2 - for offset < i.ActualLength { - opt, err := decodeIPv6HeaderTLVOption(data[offset:], df) - if err != nil { - return err - } - i.Options = append(i.Options, (*IPv6DestinationOption)(opt)) - offset += opt.ActualLength - } - return nil -} - -func decodeIPv6Destination(data []byte, p gopacket.PacketBuilder) error { - i := &IPv6Destination{} - err := i.DecodeFromBytes(data, p) - p.AddLayer(i) - if err != nil { - return err - } - return p.NextDecoder(i.NextHeader) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (i *IPv6Destination) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - var bytes []byte - var err error - - o := make([]*ipv6HeaderTLVOption, 0, len(i.Options)) - for _, v := range i.Options { - o = append(o, (*ipv6HeaderTLVOption)(v)) - } - - l := serializeIPv6HeaderTLVOptions(nil, o, opts.FixLengths) - bytes, err = b.PrependBytes(l) - if err != nil { - return err - } - serializeIPv6HeaderTLVOptions(bytes, o, opts.FixLengths) - - length := len(bytes) + 2 - if length%8 != 0 { - return errors.New("IPv6Destination actual length must be multiple of 8") - } - bytes, err = b.PrependBytes(2) - if err != nil { - return err - } - bytes[0] = uint8(i.NextHeader) - if opts.FixLengths { - i.HeaderLength = uint8((length / 8) - 1) - } - bytes[1] = uint8(i.HeaderLength) - return nil -} - -func checkIPv6Address(addr net.IP) error { - if len(addr) == net.IPv6len { - return nil - } - if len(addr) == net.IPv4len { - return errors.New("address is IPv4") - } - return fmt.Errorf("wrong length of %d bytes instead of %d", len(addr), net.IPv6len) -} - -// AddressTo16 ensures IPv6.SrcIP and IPv6.DstIP are actually IPv6 addresses (i.e. 16 byte addresses) -func (ipv6 *IPv6) AddressTo16() error { - if err := checkIPv6Address(ipv6.SrcIP); err != nil { - return fmt.Errorf("Invalid source IPv6 address (%s)", err) - } - if err := checkIPv6Address(ipv6.DstIP); err != nil { - return fmt.Errorf("Invalid destination IPv6 address (%s)", err) - } - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/ipsec.go b/vendor/github.com/google/gopacket/layers/ipsec.go deleted file mode 100644 index 12f31caf673..00000000000 --- a/vendor/github.com/google/gopacket/layers/ipsec.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "github.com/google/gopacket" -) - -// IPSecAH is the authentication header for IPv4/6 defined in -// http://tools.ietf.org/html/rfc2402 -type IPSecAH struct { - // While the auth header can be used for both IPv4 and v6, its format is that of - // an IPv6 extension (NextHeader, PayloadLength, etc...), so we use ipv6ExtensionBase - // to build it. - ipv6ExtensionBase - Reserved uint16 - SPI, Seq uint32 - AuthenticationData []byte -} - -// LayerType returns LayerTypeIPSecAH. -func (i *IPSecAH) LayerType() gopacket.LayerType { return LayerTypeIPSecAH } - -func decodeIPSecAH(data []byte, p gopacket.PacketBuilder) error { - if len(data) < 12 { - p.SetTruncated() - return errors.New("IPSec AH packet less than 12 bytes") - } - i := &IPSecAH{ - ipv6ExtensionBase: ipv6ExtensionBase{ - NextHeader: IPProtocol(data[0]), - HeaderLength: data[1], - }, - Reserved: binary.BigEndian.Uint16(data[2:4]), - SPI: binary.BigEndian.Uint32(data[4:8]), - Seq: binary.BigEndian.Uint32(data[8:12]), - } - i.ActualLength = (int(i.HeaderLength) + 2) * 4 - if len(data) < i.ActualLength { - p.SetTruncated() - return errors.New("Truncated AH packet < ActualLength") - } - i.AuthenticationData = data[12:i.ActualLength] - i.Contents = data[:i.ActualLength] - i.Payload = data[i.ActualLength:] - p.AddLayer(i) - return p.NextDecoder(i.NextHeader) -} - -// IPSecESP is the encapsulating security payload defined in -// http://tools.ietf.org/html/rfc2406 -type IPSecESP struct { - BaseLayer - SPI, Seq uint32 - // Encrypted contains the encrypted set of bytes sent in an ESP - Encrypted []byte -} - -// LayerType returns LayerTypeIPSecESP. -func (i *IPSecESP) LayerType() gopacket.LayerType { return LayerTypeIPSecESP } - -func decodeIPSecESP(data []byte, p gopacket.PacketBuilder) error { - i := &IPSecESP{ - BaseLayer: BaseLayer{data, nil}, - SPI: binary.BigEndian.Uint32(data[:4]), - Seq: binary.BigEndian.Uint32(data[4:8]), - Encrypted: data[8:], - } - p.AddLayer(i) - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/layertypes.go b/vendor/github.com/google/gopacket/layers/layertypes.go deleted file mode 100644 index 69d25ae8023..00000000000 --- a/vendor/github.com/google/gopacket/layers/layertypes.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "github.com/google/gopacket" -) - -var ( - LayerTypeARP = gopacket.RegisterLayerType(10, gopacket.LayerTypeMetadata{Name: "ARP", Decoder: gopacket.DecodeFunc(decodeARP)}) - LayerTypeCiscoDiscovery = gopacket.RegisterLayerType(11, gopacket.LayerTypeMetadata{Name: "CiscoDiscovery", Decoder: gopacket.DecodeFunc(decodeCiscoDiscovery)}) - LayerTypeEthernetCTP = gopacket.RegisterLayerType(12, gopacket.LayerTypeMetadata{Name: "EthernetCTP", Decoder: gopacket.DecodeFunc(decodeEthernetCTP)}) - LayerTypeEthernetCTPForwardData = gopacket.RegisterLayerType(13, gopacket.LayerTypeMetadata{Name: "EthernetCTPForwardData", Decoder: nil}) - LayerTypeEthernetCTPReply = gopacket.RegisterLayerType(14, gopacket.LayerTypeMetadata{Name: "EthernetCTPReply", Decoder: nil}) - LayerTypeDot1Q = gopacket.RegisterLayerType(15, gopacket.LayerTypeMetadata{Name: "Dot1Q", Decoder: gopacket.DecodeFunc(decodeDot1Q)}) - LayerTypeEtherIP = gopacket.RegisterLayerType(16, gopacket.LayerTypeMetadata{Name: "EtherIP", Decoder: gopacket.DecodeFunc(decodeEtherIP)}) - LayerTypeEthernet = gopacket.RegisterLayerType(17, gopacket.LayerTypeMetadata{Name: "Ethernet", Decoder: gopacket.DecodeFunc(decodeEthernet)}) - LayerTypeGRE = gopacket.RegisterLayerType(18, gopacket.LayerTypeMetadata{Name: "GRE", Decoder: gopacket.DecodeFunc(decodeGRE)}) - LayerTypeICMPv4 = gopacket.RegisterLayerType(19, gopacket.LayerTypeMetadata{Name: "ICMPv4", Decoder: gopacket.DecodeFunc(decodeICMPv4)}) - LayerTypeIPv4 = gopacket.RegisterLayerType(20, gopacket.LayerTypeMetadata{Name: "IPv4", Decoder: gopacket.DecodeFunc(decodeIPv4)}) - LayerTypeIPv6 = gopacket.RegisterLayerType(21, gopacket.LayerTypeMetadata{Name: "IPv6", Decoder: gopacket.DecodeFunc(decodeIPv6)}) - LayerTypeLLC = gopacket.RegisterLayerType(22, gopacket.LayerTypeMetadata{Name: "LLC", Decoder: gopacket.DecodeFunc(decodeLLC)}) - LayerTypeSNAP = gopacket.RegisterLayerType(23, gopacket.LayerTypeMetadata{Name: "SNAP", Decoder: gopacket.DecodeFunc(decodeSNAP)}) - LayerTypeMPLS = gopacket.RegisterLayerType(24, gopacket.LayerTypeMetadata{Name: "MPLS", Decoder: gopacket.DecodeFunc(decodeMPLS)}) - LayerTypePPP = gopacket.RegisterLayerType(25, gopacket.LayerTypeMetadata{Name: "PPP", Decoder: gopacket.DecodeFunc(decodePPP)}) - LayerTypePPPoE = gopacket.RegisterLayerType(26, gopacket.LayerTypeMetadata{Name: "PPPoE", Decoder: gopacket.DecodeFunc(decodePPPoE)}) - LayerTypeRUDP = gopacket.RegisterLayerType(27, gopacket.LayerTypeMetadata{Name: "RUDP", Decoder: gopacket.DecodeFunc(decodeRUDP)}) - LayerTypeSCTP = gopacket.RegisterLayerType(28, gopacket.LayerTypeMetadata{Name: "SCTP", Decoder: gopacket.DecodeFunc(decodeSCTP)}) - LayerTypeSCTPUnknownChunkType = gopacket.RegisterLayerType(29, gopacket.LayerTypeMetadata{Name: "SCTPUnknownChunkType", Decoder: nil}) - LayerTypeSCTPData = gopacket.RegisterLayerType(30, gopacket.LayerTypeMetadata{Name: "SCTPData", Decoder: nil}) - LayerTypeSCTPInit = gopacket.RegisterLayerType(31, gopacket.LayerTypeMetadata{Name: "SCTPInit", Decoder: nil}) - LayerTypeSCTPSack = gopacket.RegisterLayerType(32, gopacket.LayerTypeMetadata{Name: "SCTPSack", Decoder: nil}) - LayerTypeSCTPHeartbeat = gopacket.RegisterLayerType(33, gopacket.LayerTypeMetadata{Name: "SCTPHeartbeat", Decoder: nil}) - LayerTypeSCTPError = gopacket.RegisterLayerType(34, gopacket.LayerTypeMetadata{Name: "SCTPError", Decoder: nil}) - LayerTypeSCTPShutdown = gopacket.RegisterLayerType(35, gopacket.LayerTypeMetadata{Name: "SCTPShutdown", Decoder: nil}) - LayerTypeSCTPShutdownAck = gopacket.RegisterLayerType(36, gopacket.LayerTypeMetadata{Name: "SCTPShutdownAck", Decoder: nil}) - LayerTypeSCTPCookieEcho = gopacket.RegisterLayerType(37, gopacket.LayerTypeMetadata{Name: "SCTPCookieEcho", Decoder: nil}) - LayerTypeSCTPEmptyLayer = gopacket.RegisterLayerType(38, gopacket.LayerTypeMetadata{Name: "SCTPEmptyLayer", Decoder: nil}) - LayerTypeSCTPInitAck = gopacket.RegisterLayerType(39, gopacket.LayerTypeMetadata{Name: "SCTPInitAck", Decoder: nil}) - LayerTypeSCTPHeartbeatAck = gopacket.RegisterLayerType(40, gopacket.LayerTypeMetadata{Name: "SCTPHeartbeatAck", Decoder: nil}) - LayerTypeSCTPAbort = gopacket.RegisterLayerType(41, gopacket.LayerTypeMetadata{Name: "SCTPAbort", Decoder: nil}) - LayerTypeSCTPShutdownComplete = gopacket.RegisterLayerType(42, gopacket.LayerTypeMetadata{Name: "SCTPShutdownComplete", Decoder: nil}) - LayerTypeSCTPCookieAck = gopacket.RegisterLayerType(43, gopacket.LayerTypeMetadata{Name: "SCTPCookieAck", Decoder: nil}) - LayerTypeTCP = gopacket.RegisterLayerType(44, gopacket.LayerTypeMetadata{Name: "TCP", Decoder: gopacket.DecodeFunc(decodeTCP)}) - LayerTypeUDP = gopacket.RegisterLayerType(45, gopacket.LayerTypeMetadata{Name: "UDP", Decoder: gopacket.DecodeFunc(decodeUDP)}) - LayerTypeIPv6HopByHop = gopacket.RegisterLayerType(46, gopacket.LayerTypeMetadata{Name: "IPv6HopByHop", Decoder: gopacket.DecodeFunc(decodeIPv6HopByHop)}) - LayerTypeIPv6Routing = gopacket.RegisterLayerType(47, gopacket.LayerTypeMetadata{Name: "IPv6Routing", Decoder: gopacket.DecodeFunc(decodeIPv6Routing)}) - LayerTypeIPv6Fragment = gopacket.RegisterLayerType(48, gopacket.LayerTypeMetadata{Name: "IPv6Fragment", Decoder: gopacket.DecodeFunc(decodeIPv6Fragment)}) - LayerTypeIPv6Destination = gopacket.RegisterLayerType(49, gopacket.LayerTypeMetadata{Name: "IPv6Destination", Decoder: gopacket.DecodeFunc(decodeIPv6Destination)}) - LayerTypeIPSecAH = gopacket.RegisterLayerType(50, gopacket.LayerTypeMetadata{Name: "IPSecAH", Decoder: gopacket.DecodeFunc(decodeIPSecAH)}) - LayerTypeIPSecESP = gopacket.RegisterLayerType(51, gopacket.LayerTypeMetadata{Name: "IPSecESP", Decoder: gopacket.DecodeFunc(decodeIPSecESP)}) - LayerTypeUDPLite = gopacket.RegisterLayerType(52, gopacket.LayerTypeMetadata{Name: "UDPLite", Decoder: gopacket.DecodeFunc(decodeUDPLite)}) - LayerTypeFDDI = gopacket.RegisterLayerType(53, gopacket.LayerTypeMetadata{Name: "FDDI", Decoder: gopacket.DecodeFunc(decodeFDDI)}) - LayerTypeLoopback = gopacket.RegisterLayerType(54, gopacket.LayerTypeMetadata{Name: "Loopback", Decoder: gopacket.DecodeFunc(decodeLoopback)}) - LayerTypeEAP = gopacket.RegisterLayerType(55, gopacket.LayerTypeMetadata{Name: "EAP", Decoder: gopacket.DecodeFunc(decodeEAP)}) - LayerTypeEAPOL = gopacket.RegisterLayerType(56, gopacket.LayerTypeMetadata{Name: "EAPOL", Decoder: gopacket.DecodeFunc(decodeEAPOL)}) - LayerTypeICMPv6 = gopacket.RegisterLayerType(57, gopacket.LayerTypeMetadata{Name: "ICMPv6", Decoder: gopacket.DecodeFunc(decodeICMPv6)}) - LayerTypeLinkLayerDiscovery = gopacket.RegisterLayerType(58, gopacket.LayerTypeMetadata{Name: "LinkLayerDiscovery", Decoder: gopacket.DecodeFunc(decodeLinkLayerDiscovery)}) - LayerTypeCiscoDiscoveryInfo = gopacket.RegisterLayerType(59, gopacket.LayerTypeMetadata{Name: "CiscoDiscoveryInfo", Decoder: gopacket.DecodeFunc(decodeCiscoDiscoveryInfo)}) - LayerTypeLinkLayerDiscoveryInfo = gopacket.RegisterLayerType(60, gopacket.LayerTypeMetadata{Name: "LinkLayerDiscoveryInfo", Decoder: nil}) - LayerTypeNortelDiscovery = gopacket.RegisterLayerType(61, gopacket.LayerTypeMetadata{Name: "NortelDiscovery", Decoder: gopacket.DecodeFunc(decodeNortelDiscovery)}) - LayerTypeIGMP = gopacket.RegisterLayerType(62, gopacket.LayerTypeMetadata{Name: "IGMP", Decoder: gopacket.DecodeFunc(decodeIGMP)}) - LayerTypePFLog = gopacket.RegisterLayerType(63, gopacket.LayerTypeMetadata{Name: "PFLog", Decoder: gopacket.DecodeFunc(decodePFLog)}) - LayerTypeRadioTap = gopacket.RegisterLayerType(64, gopacket.LayerTypeMetadata{Name: "RadioTap", Decoder: gopacket.DecodeFunc(decodeRadioTap)}) - LayerTypeDot11 = gopacket.RegisterLayerType(65, gopacket.LayerTypeMetadata{Name: "Dot11", Decoder: gopacket.DecodeFunc(decodeDot11)}) - LayerTypeDot11Ctrl = gopacket.RegisterLayerType(66, gopacket.LayerTypeMetadata{Name: "Dot11Ctrl", Decoder: gopacket.DecodeFunc(decodeDot11Ctrl)}) - LayerTypeDot11Data = gopacket.RegisterLayerType(67, gopacket.LayerTypeMetadata{Name: "Dot11Data", Decoder: gopacket.DecodeFunc(decodeDot11Data)}) - LayerTypeDot11DataCFAck = gopacket.RegisterLayerType(68, gopacket.LayerTypeMetadata{Name: "Dot11DataCFAck", Decoder: gopacket.DecodeFunc(decodeDot11DataCFAck)}) - LayerTypeDot11DataCFPoll = gopacket.RegisterLayerType(69, gopacket.LayerTypeMetadata{Name: "Dot11DataCFPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataCFPoll)}) - LayerTypeDot11DataCFAckPoll = gopacket.RegisterLayerType(70, gopacket.LayerTypeMetadata{Name: "Dot11DataCFAckPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataCFAckPoll)}) - LayerTypeDot11DataNull = gopacket.RegisterLayerType(71, gopacket.LayerTypeMetadata{Name: "Dot11DataNull", Decoder: gopacket.DecodeFunc(decodeDot11DataNull)}) - LayerTypeDot11DataCFAckNoData = gopacket.RegisterLayerType(72, gopacket.LayerTypeMetadata{Name: "Dot11DataCFAck", Decoder: gopacket.DecodeFunc(decodeDot11DataCFAck)}) - LayerTypeDot11DataCFPollNoData = gopacket.RegisterLayerType(73, gopacket.LayerTypeMetadata{Name: "Dot11DataCFPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataCFPoll)}) - LayerTypeDot11DataCFAckPollNoData = gopacket.RegisterLayerType(74, gopacket.LayerTypeMetadata{Name: "Dot11DataCFAckPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataCFAckPoll)}) - LayerTypeDot11DataQOSData = gopacket.RegisterLayerType(75, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSData", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSData)}) - LayerTypeDot11DataQOSDataCFAck = gopacket.RegisterLayerType(76, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSDataCFAck", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSDataCFAck)}) - LayerTypeDot11DataQOSDataCFPoll = gopacket.RegisterLayerType(77, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSDataCFPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSDataCFPoll)}) - LayerTypeDot11DataQOSDataCFAckPoll = gopacket.RegisterLayerType(78, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSDataCFAckPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSDataCFAckPoll)}) - LayerTypeDot11DataQOSNull = gopacket.RegisterLayerType(79, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSNull", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSNull)}) - LayerTypeDot11DataQOSCFPollNoData = gopacket.RegisterLayerType(80, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSCFPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSCFPollNoData)}) - LayerTypeDot11DataQOSCFAckPollNoData = gopacket.RegisterLayerType(81, gopacket.LayerTypeMetadata{Name: "Dot11DataQOSCFAckPoll", Decoder: gopacket.DecodeFunc(decodeDot11DataQOSCFAckPollNoData)}) - LayerTypeDot11InformationElement = gopacket.RegisterLayerType(82, gopacket.LayerTypeMetadata{Name: "Dot11InformationElement", Decoder: gopacket.DecodeFunc(decodeDot11InformationElement)}) - LayerTypeDot11CtrlCTS = gopacket.RegisterLayerType(83, gopacket.LayerTypeMetadata{Name: "Dot11CtrlCTS", Decoder: gopacket.DecodeFunc(decodeDot11CtrlCTS)}) - LayerTypeDot11CtrlRTS = gopacket.RegisterLayerType(84, gopacket.LayerTypeMetadata{Name: "Dot11CtrlRTS", Decoder: gopacket.DecodeFunc(decodeDot11CtrlRTS)}) - LayerTypeDot11CtrlBlockAckReq = gopacket.RegisterLayerType(85, gopacket.LayerTypeMetadata{Name: "Dot11CtrlBlockAckReq", Decoder: gopacket.DecodeFunc(decodeDot11CtrlBlockAckReq)}) - LayerTypeDot11CtrlBlockAck = gopacket.RegisterLayerType(86, gopacket.LayerTypeMetadata{Name: "Dot11CtrlBlockAck", Decoder: gopacket.DecodeFunc(decodeDot11CtrlBlockAck)}) - LayerTypeDot11CtrlPowersavePoll = gopacket.RegisterLayerType(87, gopacket.LayerTypeMetadata{Name: "Dot11CtrlPowersavePoll", Decoder: gopacket.DecodeFunc(decodeDot11CtrlPowersavePoll)}) - LayerTypeDot11CtrlAck = gopacket.RegisterLayerType(88, gopacket.LayerTypeMetadata{Name: "Dot11CtrlAck", Decoder: gopacket.DecodeFunc(decodeDot11CtrlAck)}) - LayerTypeDot11CtrlCFEnd = gopacket.RegisterLayerType(89, gopacket.LayerTypeMetadata{Name: "Dot11CtrlCFEnd", Decoder: gopacket.DecodeFunc(decodeDot11CtrlCFEnd)}) - LayerTypeDot11CtrlCFEndAck = gopacket.RegisterLayerType(90, gopacket.LayerTypeMetadata{Name: "Dot11CtrlCFEndAck", Decoder: gopacket.DecodeFunc(decodeDot11CtrlCFEndAck)}) - LayerTypeDot11MgmtAssociationReq = gopacket.RegisterLayerType(91, gopacket.LayerTypeMetadata{Name: "Dot11MgmtAssociationReq", Decoder: gopacket.DecodeFunc(decodeDot11MgmtAssociationReq)}) - LayerTypeDot11MgmtAssociationResp = gopacket.RegisterLayerType(92, gopacket.LayerTypeMetadata{Name: "Dot11MgmtAssociationResp", Decoder: gopacket.DecodeFunc(decodeDot11MgmtAssociationResp)}) - LayerTypeDot11MgmtReassociationReq = gopacket.RegisterLayerType(93, gopacket.LayerTypeMetadata{Name: "Dot11MgmtReassociationReq", Decoder: gopacket.DecodeFunc(decodeDot11MgmtReassociationReq)}) - LayerTypeDot11MgmtReassociationResp = gopacket.RegisterLayerType(94, gopacket.LayerTypeMetadata{Name: "Dot11MgmtReassociationResp", Decoder: gopacket.DecodeFunc(decodeDot11MgmtReassociationResp)}) - LayerTypeDot11MgmtProbeReq = gopacket.RegisterLayerType(95, gopacket.LayerTypeMetadata{Name: "Dot11MgmtProbeReq", Decoder: gopacket.DecodeFunc(decodeDot11MgmtProbeReq)}) - LayerTypeDot11MgmtProbeResp = gopacket.RegisterLayerType(96, gopacket.LayerTypeMetadata{Name: "Dot11MgmtProbeResp", Decoder: gopacket.DecodeFunc(decodeDot11MgmtProbeResp)}) - LayerTypeDot11MgmtMeasurementPilot = gopacket.RegisterLayerType(97, gopacket.LayerTypeMetadata{Name: "Dot11MgmtMeasurementPilot", Decoder: gopacket.DecodeFunc(decodeDot11MgmtMeasurementPilot)}) - LayerTypeDot11MgmtBeacon = gopacket.RegisterLayerType(98, gopacket.LayerTypeMetadata{Name: "Dot11MgmtBeacon", Decoder: gopacket.DecodeFunc(decodeDot11MgmtBeacon)}) - LayerTypeDot11MgmtATIM = gopacket.RegisterLayerType(99, gopacket.LayerTypeMetadata{Name: "Dot11MgmtATIM", Decoder: gopacket.DecodeFunc(decodeDot11MgmtATIM)}) - LayerTypeDot11MgmtDisassociation = gopacket.RegisterLayerType(100, gopacket.LayerTypeMetadata{Name: "Dot11MgmtDisassociation", Decoder: gopacket.DecodeFunc(decodeDot11MgmtDisassociation)}) - LayerTypeDot11MgmtAuthentication = gopacket.RegisterLayerType(101, gopacket.LayerTypeMetadata{Name: "Dot11MgmtAuthentication", Decoder: gopacket.DecodeFunc(decodeDot11MgmtAuthentication)}) - LayerTypeDot11MgmtDeauthentication = gopacket.RegisterLayerType(102, gopacket.LayerTypeMetadata{Name: "Dot11MgmtDeauthentication", Decoder: gopacket.DecodeFunc(decodeDot11MgmtDeauthentication)}) - LayerTypeDot11MgmtAction = gopacket.RegisterLayerType(103, gopacket.LayerTypeMetadata{Name: "Dot11MgmtAction", Decoder: gopacket.DecodeFunc(decodeDot11MgmtAction)}) - LayerTypeDot11MgmtActionNoAck = gopacket.RegisterLayerType(104, gopacket.LayerTypeMetadata{Name: "Dot11MgmtActionNoAck", Decoder: gopacket.DecodeFunc(decodeDot11MgmtActionNoAck)}) - LayerTypeDot11MgmtArubaWLAN = gopacket.RegisterLayerType(105, gopacket.LayerTypeMetadata{Name: "Dot11MgmtArubaWLAN", Decoder: gopacket.DecodeFunc(decodeDot11MgmtArubaWLAN)}) - LayerTypeDot11WEP = gopacket.RegisterLayerType(106, gopacket.LayerTypeMetadata{Name: "Dot11WEP", Decoder: gopacket.DecodeFunc(decodeDot11WEP)}) - LayerTypeDNS = gopacket.RegisterLayerType(107, gopacket.LayerTypeMetadata{Name: "DNS", Decoder: gopacket.DecodeFunc(decodeDNS)}) - LayerTypeUSB = gopacket.RegisterLayerType(108, gopacket.LayerTypeMetadata{Name: "USB", Decoder: gopacket.DecodeFunc(decodeUSB)}) - LayerTypeUSBRequestBlockSetup = gopacket.RegisterLayerType(109, gopacket.LayerTypeMetadata{Name: "USBRequestBlockSetup", Decoder: gopacket.DecodeFunc(decodeUSBRequestBlockSetup)}) - LayerTypeUSBControl = gopacket.RegisterLayerType(110, gopacket.LayerTypeMetadata{Name: "USBControl", Decoder: gopacket.DecodeFunc(decodeUSBControl)}) - LayerTypeUSBInterrupt = gopacket.RegisterLayerType(111, gopacket.LayerTypeMetadata{Name: "USBInterrupt", Decoder: gopacket.DecodeFunc(decodeUSBInterrupt)}) - LayerTypeUSBBulk = gopacket.RegisterLayerType(112, gopacket.LayerTypeMetadata{Name: "USBBulk", Decoder: gopacket.DecodeFunc(decodeUSBBulk)}) - LayerTypeLinuxSLL = gopacket.RegisterLayerType(113, gopacket.LayerTypeMetadata{Name: "Linux SLL", Decoder: gopacket.DecodeFunc(decodeLinuxSLL)}) - LayerTypeSFlow = gopacket.RegisterLayerType(114, gopacket.LayerTypeMetadata{Name: "SFlow", Decoder: gopacket.DecodeFunc(decodeSFlow)}) - LayerTypePrismHeader = gopacket.RegisterLayerType(115, gopacket.LayerTypeMetadata{Name: "Prism monitor mode header", Decoder: gopacket.DecodeFunc(decodePrismHeader)}) - LayerTypeVXLAN = gopacket.RegisterLayerType(116, gopacket.LayerTypeMetadata{Name: "VXLAN", Decoder: gopacket.DecodeFunc(decodeVXLAN)}) - LayerTypeNTP = gopacket.RegisterLayerType(117, gopacket.LayerTypeMetadata{Name: "NTP", Decoder: gopacket.DecodeFunc(decodeNTP)}) - LayerTypeDHCPv4 = gopacket.RegisterLayerType(118, gopacket.LayerTypeMetadata{Name: "DHCPv4", Decoder: gopacket.DecodeFunc(decodeDHCPv4)}) - LayerTypeVRRP = gopacket.RegisterLayerType(119, gopacket.LayerTypeMetadata{Name: "VRRP", Decoder: gopacket.DecodeFunc(decodeVRRP)}) - LayerTypeGeneve = gopacket.RegisterLayerType(120, gopacket.LayerTypeMetadata{Name: "Geneve", Decoder: gopacket.DecodeFunc(decodeGeneve)}) - LayerTypeSTP = gopacket.RegisterLayerType(121, gopacket.LayerTypeMetadata{Name: "STP", Decoder: gopacket.DecodeFunc(decodeSTP)}) - LayerTypeBFD = gopacket.RegisterLayerType(122, gopacket.LayerTypeMetadata{Name: "BFD", Decoder: gopacket.DecodeFunc(decodeBFD)}) - LayerTypeOSPF = gopacket.RegisterLayerType(123, gopacket.LayerTypeMetadata{Name: "OSPF", Decoder: gopacket.DecodeFunc(decodeOSPF)}) - LayerTypeICMPv6RouterSolicitation = gopacket.RegisterLayerType(124, gopacket.LayerTypeMetadata{Name: "ICMPv6RouterSolicitation", Decoder: gopacket.DecodeFunc(decodeICMPv6RouterSolicitation)}) - LayerTypeICMPv6RouterAdvertisement = gopacket.RegisterLayerType(125, gopacket.LayerTypeMetadata{Name: "ICMPv6RouterAdvertisement", Decoder: gopacket.DecodeFunc(decodeICMPv6RouterAdvertisement)}) - LayerTypeICMPv6NeighborSolicitation = gopacket.RegisterLayerType(126, gopacket.LayerTypeMetadata{Name: "ICMPv6NeighborSolicitation", Decoder: gopacket.DecodeFunc(decodeICMPv6NeighborSolicitation)}) - LayerTypeICMPv6NeighborAdvertisement = gopacket.RegisterLayerType(127, gopacket.LayerTypeMetadata{Name: "ICMPv6NeighborAdvertisement", Decoder: gopacket.DecodeFunc(decodeICMPv6NeighborAdvertisement)}) - LayerTypeICMPv6Redirect = gopacket.RegisterLayerType(128, gopacket.LayerTypeMetadata{Name: "ICMPv6Redirect", Decoder: gopacket.DecodeFunc(decodeICMPv6Redirect)}) - LayerTypeGTPv1U = gopacket.RegisterLayerType(129, gopacket.LayerTypeMetadata{Name: "GTPv1U", Decoder: gopacket.DecodeFunc(decodeGTPv1u)}) - LayerTypeEAPOLKey = gopacket.RegisterLayerType(130, gopacket.LayerTypeMetadata{Name: "EAPOLKey", Decoder: gopacket.DecodeFunc(decodeEAPOLKey)}) - LayerTypeLCM = gopacket.RegisterLayerType(131, gopacket.LayerTypeMetadata{Name: "LCM", Decoder: gopacket.DecodeFunc(decodeLCM)}) - LayerTypeICMPv6Echo = gopacket.RegisterLayerType(132, gopacket.LayerTypeMetadata{Name: "ICMPv6Echo", Decoder: gopacket.DecodeFunc(decodeICMPv6Echo)}) - LayerTypeSIP = gopacket.RegisterLayerType(133, gopacket.LayerTypeMetadata{Name: "SIP", Decoder: gopacket.DecodeFunc(decodeSIP)}) - LayerTypeDHCPv6 = gopacket.RegisterLayerType(134, gopacket.LayerTypeMetadata{Name: "DHCPv6", Decoder: gopacket.DecodeFunc(decodeDHCPv6)}) - LayerTypeMLDv1MulticastListenerReport = gopacket.RegisterLayerType(135, gopacket.LayerTypeMetadata{Name: "MLDv1MulticastListenerReport", Decoder: gopacket.DecodeFunc(decodeMLDv1MulticastListenerReport)}) - LayerTypeMLDv1MulticastListenerDone = gopacket.RegisterLayerType(136, gopacket.LayerTypeMetadata{Name: "MLDv1MulticastListenerDone", Decoder: gopacket.DecodeFunc(decodeMLDv1MulticastListenerDone)}) - LayerTypeMLDv1MulticastListenerQuery = gopacket.RegisterLayerType(137, gopacket.LayerTypeMetadata{Name: "MLDv1MulticastListenerQuery", Decoder: gopacket.DecodeFunc(decodeMLDv1MulticastListenerQuery)}) - LayerTypeMLDv2MulticastListenerReport = gopacket.RegisterLayerType(138, gopacket.LayerTypeMetadata{Name: "MLDv2MulticastListenerReport", Decoder: gopacket.DecodeFunc(decodeMLDv2MulticastListenerReport)}) - LayerTypeMLDv2MulticastListenerQuery = gopacket.RegisterLayerType(139, gopacket.LayerTypeMetadata{Name: "MLDv2MulticastListenerQuery", Decoder: gopacket.DecodeFunc(decodeMLDv2MulticastListenerQuery)}) - LayerTypeTLS = gopacket.RegisterLayerType(140, gopacket.LayerTypeMetadata{Name: "TLS", Decoder: gopacket.DecodeFunc(decodeTLS)}) - LayerTypeModbusTCP = gopacket.RegisterLayerType(141, gopacket.LayerTypeMetadata{Name: "ModbusTCP", Decoder: gopacket.DecodeFunc(decodeModbusTCP)}) - LayerTypeRMCP = gopacket.RegisterLayerType(142, gopacket.LayerTypeMetadata{Name: "RMCP", Decoder: gopacket.DecodeFunc(decodeRMCP)}) - LayerTypeASF = gopacket.RegisterLayerType(143, gopacket.LayerTypeMetadata{Name: "ASF", Decoder: gopacket.DecodeFunc(decodeASF)}) - LayerTypeASFPresencePong = gopacket.RegisterLayerType(144, gopacket.LayerTypeMetadata{Name: "ASFPresencePong", Decoder: gopacket.DecodeFunc(decodeASFPresencePong)}) - LayerTypeERSPANII = gopacket.RegisterLayerType(145, gopacket.LayerTypeMetadata{Name: "ERSPAN Type II", Decoder: gopacket.DecodeFunc(decodeERSPANII)}) - LayerTypeRADIUS = gopacket.RegisterLayerType(146, gopacket.LayerTypeMetadata{Name: "RADIUS", Decoder: gopacket.DecodeFunc(decodeRADIUS)}) -) - -var ( - // LayerClassIPNetwork contains TCP/IP network layer types. - LayerClassIPNetwork = gopacket.NewLayerClass([]gopacket.LayerType{ - LayerTypeIPv4, - LayerTypeIPv6, - }) - // LayerClassIPTransport contains TCP/IP transport layer types. - LayerClassIPTransport = gopacket.NewLayerClass([]gopacket.LayerType{ - LayerTypeTCP, - LayerTypeUDP, - LayerTypeSCTP, - }) - // LayerClassIPControl contains TCP/IP control protocols. - LayerClassIPControl = gopacket.NewLayerClass([]gopacket.LayerType{ - LayerTypeICMPv4, - LayerTypeICMPv6, - }) - // LayerClassSCTPChunk contains SCTP chunk types (not the top-level SCTP - // layer). - LayerClassSCTPChunk = gopacket.NewLayerClass([]gopacket.LayerType{ - LayerTypeSCTPUnknownChunkType, - LayerTypeSCTPData, - LayerTypeSCTPInit, - LayerTypeSCTPSack, - LayerTypeSCTPHeartbeat, - LayerTypeSCTPError, - LayerTypeSCTPShutdown, - LayerTypeSCTPShutdownAck, - LayerTypeSCTPCookieEcho, - LayerTypeSCTPEmptyLayer, - LayerTypeSCTPInitAck, - LayerTypeSCTPHeartbeatAck, - LayerTypeSCTPAbort, - LayerTypeSCTPShutdownComplete, - LayerTypeSCTPCookieAck, - }) - // LayerClassIPv6Extension contains IPv6 extension headers. - LayerClassIPv6Extension = gopacket.NewLayerClass([]gopacket.LayerType{ - LayerTypeIPv6HopByHop, - LayerTypeIPv6Routing, - LayerTypeIPv6Fragment, - LayerTypeIPv6Destination, - }) - LayerClassIPSec = gopacket.NewLayerClass([]gopacket.LayerType{ - LayerTypeIPSecAH, - LayerTypeIPSecESP, - }) - // LayerClassICMPv6NDP contains ICMPv6 neighbor discovery protocol - // messages. - LayerClassICMPv6NDP = gopacket.NewLayerClass([]gopacket.LayerType{ - LayerTypeICMPv6RouterSolicitation, - LayerTypeICMPv6RouterAdvertisement, - LayerTypeICMPv6NeighborSolicitation, - LayerTypeICMPv6NeighborAdvertisement, - LayerTypeICMPv6Redirect, - }) - // LayerClassMLDv1 contains multicast listener discovery protocol - LayerClassMLDv1 = gopacket.NewLayerClass([]gopacket.LayerType{ - LayerTypeMLDv1MulticastListenerQuery, - LayerTypeMLDv1MulticastListenerReport, - LayerTypeMLDv1MulticastListenerDone, - }) - // LayerClassMLDv2 contains multicast listener discovery protocol v2 - LayerClassMLDv2 = gopacket.NewLayerClass([]gopacket.LayerType{ - LayerTypeMLDv1MulticastListenerReport, - LayerTypeMLDv1MulticastListenerDone, - LayerTypeMLDv2MulticastListenerReport, - LayerTypeMLDv1MulticastListenerQuery, - LayerTypeMLDv2MulticastListenerQuery, - }) -) diff --git a/vendor/github.com/google/gopacket/layers/lcm.go b/vendor/github.com/google/gopacket/layers/lcm.go deleted file mode 100644 index 58a4b828908..00000000000 --- a/vendor/github.com/google/gopacket/layers/lcm.go +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright 2018 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - - "github.com/google/gopacket" -) - -const ( - // LCMShortHeaderMagic is the LCM small message header magic number - LCMShortHeaderMagic uint32 = 0x4c433032 - // LCMFragmentedHeaderMagic is the LCM fragmented message header magic number - LCMFragmentedHeaderMagic uint32 = 0x4c433033 -) - -// LCM (Lightweight Communications and Marshalling) is a set of libraries and -// tools for message passing and data marshalling, targeted at real-time systems -// where high-bandwidth and low latency are critical. It provides a -// publish/subscribe message passing model and automatic -// marshalling/unmarshalling code generation with bindings for applications in a -// variety of programming languages. -// -// References -// https://lcm-proj.github.io/ -// https://github.com/lcm-proj/lcm -type LCM struct { - // Common (short & fragmented header) fields - Magic uint32 - SequenceNumber uint32 - // Fragmented header only fields - PayloadSize uint32 - FragmentOffset uint32 - FragmentNumber uint16 - TotalFragments uint16 - // Common field - ChannelName string - // Gopacket helper fields - Fragmented bool - fingerprint LCMFingerprint - contents []byte - payload []byte -} - -// LCMFingerprint is the type of a LCM fingerprint. -type LCMFingerprint uint64 - -var ( - // lcmLayerTypes contains a map of all LCM fingerprints that we support and - // their LayerType - lcmLayerTypes = map[LCMFingerprint]gopacket.LayerType{} - layerTypeIndex = 1001 -) - -// RegisterLCMLayerType allows users to register decoders for the underlying -// LCM payload. This is done based on the fingerprint that every LCM message -// contains and which identifies it uniquely. If num is not the zero value it -// will be used when registering with RegisterLayerType towards gopacket, -// otherwise an incremental value starting from 1001 will be used. -func RegisterLCMLayerType(num int, name string, fingerprint LCMFingerprint, - decoder gopacket.Decoder) gopacket.LayerType { - metadata := gopacket.LayerTypeMetadata{Name: name, Decoder: decoder} - - if num == 0 { - num = layerTypeIndex - layerTypeIndex++ - } - - lcmLayerTypes[fingerprint] = gopacket.RegisterLayerType(num, metadata) - - return lcmLayerTypes[fingerprint] -} - -// SupportedLCMFingerprints returns a slice of all LCM fingerprints that has -// been registered so far. -func SupportedLCMFingerprints() []LCMFingerprint { - fingerprints := make([]LCMFingerprint, 0, len(lcmLayerTypes)) - for fp := range lcmLayerTypes { - fingerprints = append(fingerprints, fp) - } - return fingerprints -} - -// GetLCMLayerType returns the underlying LCM message's LayerType. -// This LayerType has to be registered by using RegisterLCMLayerType. -func GetLCMLayerType(fingerprint LCMFingerprint) gopacket.LayerType { - layerType, ok := lcmLayerTypes[fingerprint] - if !ok { - return gopacket.LayerTypePayload - } - - return layerType -} - -func decodeLCM(data []byte, p gopacket.PacketBuilder) error { - lcm := &LCM{} - - err := lcm.DecodeFromBytes(data, p) - if err != nil { - return err - } - - p.AddLayer(lcm) - p.SetApplicationLayer(lcm) - - return p.NextDecoder(lcm.NextLayerType()) -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (lcm *LCM) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 8 { - df.SetTruncated() - return errors.New("LCM < 8 bytes") - } - offset := 0 - - lcm.Magic = binary.BigEndian.Uint32(data[offset:4]) - offset += 4 - - if lcm.Magic != LCMShortHeaderMagic && lcm.Magic != LCMFragmentedHeaderMagic { - return fmt.Errorf("Received LCM header magic %v does not match know "+ - "LCM magic numbers. Dropping packet.", lcm.Magic) - } - - lcm.SequenceNumber = binary.BigEndian.Uint32(data[offset:8]) - offset += 4 - - if lcm.Magic == LCMFragmentedHeaderMagic { - lcm.Fragmented = true - - lcm.PayloadSize = binary.BigEndian.Uint32(data[offset : offset+4]) - offset += 4 - - lcm.FragmentOffset = binary.BigEndian.Uint32(data[offset : offset+4]) - offset += 4 - - lcm.FragmentNumber = binary.BigEndian.Uint16(data[offset : offset+2]) - offset += 2 - - lcm.TotalFragments = binary.BigEndian.Uint16(data[offset : offset+2]) - offset += 2 - } else { - lcm.Fragmented = false - } - - if !lcm.Fragmented || (lcm.Fragmented && lcm.FragmentNumber == 0) { - buffer := make([]byte, 0) - for _, b := range data[offset:] { - offset++ - - if b == 0 { - break - } - - buffer = append(buffer, b) - } - - lcm.ChannelName = string(buffer) - } - - lcm.fingerprint = LCMFingerprint( - binary.BigEndian.Uint64(data[offset : offset+8])) - - lcm.contents = data[:offset] - lcm.payload = data[offset:] - - return nil -} - -// CanDecode returns a set of layers that LCM objects can decode. -// As LCM objects can only decode the LCM layer, we just return that layer. -func (lcm LCM) CanDecode() gopacket.LayerClass { - return LayerTypeLCM -} - -// NextLayerType specifies the LCM payload layer type following this header. -// As LCM packets are serialized structs with uniq fingerprints for each uniq -// combination of data types, lookup of correct layer type is based on that -// fingerprint. -func (lcm LCM) NextLayerType() gopacket.LayerType { - if !lcm.Fragmented || (lcm.Fragmented && lcm.FragmentNumber == 0) { - return GetLCMLayerType(lcm.fingerprint) - } - - return gopacket.LayerTypeFragment -} - -// LayerType returns LayerTypeLCM -func (lcm LCM) LayerType() gopacket.LayerType { - return LayerTypeLCM -} - -// LayerContents returns the contents of the LCM header. -func (lcm LCM) LayerContents() []byte { - return lcm.contents -} - -// LayerPayload returns the payload following this LCM header. -func (lcm LCM) LayerPayload() []byte { - return lcm.payload -} - -// Payload returns the payload following this LCM header. -func (lcm LCM) Payload() []byte { - return lcm.LayerPayload() -} - -// Fingerprint returns the LCM fingerprint of the underlying message. -func (lcm LCM) Fingerprint() LCMFingerprint { - return lcm.fingerprint -} diff --git a/vendor/github.com/google/gopacket/layers/linux_sll.go b/vendor/github.com/google/gopacket/layers/linux_sll.go deleted file mode 100644 index 85a4f8bdd0a..00000000000 --- a/vendor/github.com/google/gopacket/layers/linux_sll.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "net" - - "github.com/google/gopacket" -) - -type LinuxSLLPacketType uint16 - -const ( - LinuxSLLPacketTypeHost LinuxSLLPacketType = 0 // To us - LinuxSLLPacketTypeBroadcast LinuxSLLPacketType = 1 // To all - LinuxSLLPacketTypeMulticast LinuxSLLPacketType = 2 // To group - LinuxSLLPacketTypeOtherhost LinuxSLLPacketType = 3 // To someone else - LinuxSLLPacketTypeOutgoing LinuxSLLPacketType = 4 // Outgoing of any type - // These ones are invisible by user level - LinuxSLLPacketTypeLoopback LinuxSLLPacketType = 5 // MC/BRD frame looped back - LinuxSLLPacketTypeFastroute LinuxSLLPacketType = 6 // Fastrouted frame -) - -func (l LinuxSLLPacketType) String() string { - switch l { - case LinuxSLLPacketTypeHost: - return "host" - case LinuxSLLPacketTypeBroadcast: - return "broadcast" - case LinuxSLLPacketTypeMulticast: - return "multicast" - case LinuxSLLPacketTypeOtherhost: - return "otherhost" - case LinuxSLLPacketTypeOutgoing: - return "outgoing" - case LinuxSLLPacketTypeLoopback: - return "loopback" - case LinuxSLLPacketTypeFastroute: - return "fastroute" - } - return fmt.Sprintf("Unknown(%d)", int(l)) -} - -type LinuxSLL struct { - BaseLayer - PacketType LinuxSLLPacketType - AddrLen uint16 - Addr net.HardwareAddr - EthernetType EthernetType - AddrType uint16 -} - -// LayerType returns LayerTypeLinuxSLL. -func (sll *LinuxSLL) LayerType() gopacket.LayerType { return LayerTypeLinuxSLL } - -func (sll *LinuxSLL) CanDecode() gopacket.LayerClass { - return LayerTypeLinuxSLL -} - -func (sll *LinuxSLL) LinkFlow() gopacket.Flow { - return gopacket.NewFlow(EndpointMAC, sll.Addr, nil) -} - -func (sll *LinuxSLL) NextLayerType() gopacket.LayerType { - return sll.EthernetType.LayerType() -} - -func (sll *LinuxSLL) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 16 { - return errors.New("Linux SLL packet too small") - } - sll.PacketType = LinuxSLLPacketType(binary.BigEndian.Uint16(data[0:2])) - sll.AddrType = binary.BigEndian.Uint16(data[2:4]) - sll.AddrLen = binary.BigEndian.Uint16(data[4:6]) - - sll.Addr = net.HardwareAddr(data[6 : sll.AddrLen+6]) - sll.EthernetType = EthernetType(binary.BigEndian.Uint16(data[14:16])) - sll.BaseLayer = BaseLayer{data[:16], data[16:]} - - return nil -} - -func decodeLinuxSLL(data []byte, p gopacket.PacketBuilder) error { - sll := &LinuxSLL{} - if err := sll.DecodeFromBytes(data, p); err != nil { - return err - } - p.AddLayer(sll) - p.SetLinkLayer(sll) - return p.NextDecoder(sll.EthernetType) -} diff --git a/vendor/github.com/google/gopacket/layers/llc.go b/vendor/github.com/google/gopacket/layers/llc.go deleted file mode 100644 index cad6803671e..00000000000 --- a/vendor/github.com/google/gopacket/layers/llc.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - - "github.com/google/gopacket" -) - -// LLC is the layer used for 802.2 Logical Link Control headers. -// See http://standards.ieee.org/getieee802/download/802.2-1998.pdf -type LLC struct { - BaseLayer - DSAP uint8 - IG bool // true means group, false means individual - SSAP uint8 - CR bool // true means response, false means command - Control uint16 -} - -// LayerType returns gopacket.LayerTypeLLC. -func (l *LLC) LayerType() gopacket.LayerType { return LayerTypeLLC } - -// DecodeFromBytes decodes the given bytes into this layer. -func (l *LLC) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 3 { - return errors.New("LLC header too small") - } - l.DSAP = data[0] & 0xFE - l.IG = data[0]&0x1 != 0 - l.SSAP = data[1] & 0xFE - l.CR = data[1]&0x1 != 0 - l.Control = uint16(data[2]) - - if l.Control&0x1 == 0 || l.Control&0x3 == 0x1 { - if len(data) < 4 { - return errors.New("LLC header too small") - } - l.Control = l.Control<<8 | uint16(data[3]) - l.Contents = data[:4] - l.Payload = data[4:] - } else { - l.Contents = data[:3] - l.Payload = data[3:] - } - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (l *LLC) CanDecode() gopacket.LayerClass { - return LayerTypeLLC -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (l *LLC) NextLayerType() gopacket.LayerType { - switch { - case l.DSAP == 0xAA && l.SSAP == 0xAA: - return LayerTypeSNAP - case l.DSAP == 0x42 && l.SSAP == 0x42: - return LayerTypeSTP - } - return gopacket.LayerTypeZero // Not implemented -} - -// SNAP is used inside LLC. See -// http://standards.ieee.org/getieee802/download/802-2001.pdf. -// From http://en.wikipedia.org/wiki/Subnetwork_Access_Protocol: -// "[T]he Subnetwork Access Protocol (SNAP) is a mechanism for multiplexing, -// on networks using IEEE 802.2 LLC, more protocols than can be distinguished -// by the 8-bit 802.2 Service Access Point (SAP) fields." -type SNAP struct { - BaseLayer - OrganizationalCode []byte - Type EthernetType -} - -// LayerType returns gopacket.LayerTypeSNAP. -func (s *SNAP) LayerType() gopacket.LayerType { return LayerTypeSNAP } - -// DecodeFromBytes decodes the given bytes into this layer. -func (s *SNAP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 5 { - return errors.New("SNAP header too small") - } - s.OrganizationalCode = data[:3] - s.Type = EthernetType(binary.BigEndian.Uint16(data[3:5])) - s.BaseLayer = BaseLayer{data[:5], data[5:]} - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (s *SNAP) CanDecode() gopacket.LayerClass { - return LayerTypeSNAP -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (s *SNAP) NextLayerType() gopacket.LayerType { - // See BUG(gconnel) in decodeSNAP - return s.Type.LayerType() -} - -func decodeLLC(data []byte, p gopacket.PacketBuilder) error { - l := &LLC{} - err := l.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(l) - return p.NextDecoder(l.NextLayerType()) -} - -func decodeSNAP(data []byte, p gopacket.PacketBuilder) error { - s := &SNAP{} - err := s.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(s) - // BUG(gconnell): When decoding SNAP, we treat the SNAP type as an Ethernet - // type. This may not actually be an ethernet type in all cases, - // depending on the organizational code. Right now, we don't check. - return p.NextDecoder(s.Type) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (l *LLC) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - var igFlag, crFlag byte - var length int - - if l.Control&0xFF00 != 0 { - length = 4 - } else { - length = 3 - } - - if l.DSAP&0x1 != 0 { - return errors.New("DSAP value invalid, should not include IG flag bit") - } - - if l.SSAP&0x1 != 0 { - return errors.New("SSAP value invalid, should not include CR flag bit") - } - - if buf, err := b.PrependBytes(length); err != nil { - return err - } else { - igFlag = 0 - if l.IG { - igFlag = 0x1 - } - - crFlag = 0 - if l.CR { - crFlag = 0x1 - } - - buf[0] = l.DSAP + igFlag - buf[1] = l.SSAP + crFlag - - if length == 4 { - buf[2] = uint8(l.Control >> 8) - buf[3] = uint8(l.Control) - } else { - buf[2] = uint8(l.Control) - } - } - - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (s *SNAP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if buf, err := b.PrependBytes(5); err != nil { - return err - } else { - buf[0] = s.OrganizationalCode[0] - buf[1] = s.OrganizationalCode[1] - buf[2] = s.OrganizationalCode[2] - binary.BigEndian.PutUint16(buf[3:5], uint16(s.Type)) - } - - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/lldp.go b/vendor/github.com/google/gopacket/layers/lldp.go deleted file mode 100644 index 16a5bbadad9..00000000000 --- a/vendor/github.com/google/gopacket/layers/lldp.go +++ /dev/null @@ -1,1603 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - - "github.com/google/gopacket" -) - -// LLDPTLVType is the type of each TLV value in a LinkLayerDiscovery packet. -type LLDPTLVType byte - -const ( - LLDPTLVEnd LLDPTLVType = 0 - LLDPTLVChassisID LLDPTLVType = 1 - LLDPTLVPortID LLDPTLVType = 2 - LLDPTLVTTL LLDPTLVType = 3 - LLDPTLVPortDescription LLDPTLVType = 4 - LLDPTLVSysName LLDPTLVType = 5 - LLDPTLVSysDescription LLDPTLVType = 6 - LLDPTLVSysCapabilities LLDPTLVType = 7 - LLDPTLVMgmtAddress LLDPTLVType = 8 - LLDPTLVOrgSpecific LLDPTLVType = 127 -) - -// LinkLayerDiscoveryValue is a TLV value inside a LinkLayerDiscovery packet layer. -type LinkLayerDiscoveryValue struct { - Type LLDPTLVType - Length uint16 - Value []byte -} - -func (c *LinkLayerDiscoveryValue) len() int { - return 0 -} - -// LLDPChassisIDSubType specifies the value type for a single LLDPChassisID.ID -type LLDPChassisIDSubType byte - -// LLDP Chassis Types -const ( - LLDPChassisIDSubTypeReserved LLDPChassisIDSubType = 0 - LLDPChassisIDSubTypeChassisComp LLDPChassisIDSubType = 1 - LLDPChassisIDSubtypeIfaceAlias LLDPChassisIDSubType = 2 - LLDPChassisIDSubTypePortComp LLDPChassisIDSubType = 3 - LLDPChassisIDSubTypeMACAddr LLDPChassisIDSubType = 4 - LLDPChassisIDSubTypeNetworkAddr LLDPChassisIDSubType = 5 - LLDPChassisIDSubtypeIfaceName LLDPChassisIDSubType = 6 - LLDPChassisIDSubTypeLocal LLDPChassisIDSubType = 7 -) - -type LLDPChassisID struct { - Subtype LLDPChassisIDSubType - ID []byte -} - -func (c *LLDPChassisID) serialize() []byte { - - var buf = make([]byte, c.serializedLen()) - idLen := uint16(LLDPTLVChassisID)<<9 | uint16(len(c.ID)+1) //id should take 7 bits, length should take 9 bits, +1 for subtype - binary.BigEndian.PutUint16(buf[0:2], idLen) - buf[2] = byte(c.Subtype) - copy(buf[3:], c.ID) - return buf -} - -func (c *LLDPChassisID) serializedLen() int { - return len(c.ID) + 3 // +2 for id and length, +1 for subtype -} - -// LLDPPortIDSubType specifies the value type for a single LLDPPortID.ID -type LLDPPortIDSubType byte - -// LLDP PortID types -const ( - LLDPPortIDSubtypeReserved LLDPPortIDSubType = 0 - LLDPPortIDSubtypeIfaceAlias LLDPPortIDSubType = 1 - LLDPPortIDSubtypePortComp LLDPPortIDSubType = 2 - LLDPPortIDSubtypeMACAddr LLDPPortIDSubType = 3 - LLDPPortIDSubtypeNetworkAddr LLDPPortIDSubType = 4 - LLDPPortIDSubtypeIfaceName LLDPPortIDSubType = 5 - LLDPPortIDSubtypeAgentCircuitID LLDPPortIDSubType = 6 - LLDPPortIDSubtypeLocal LLDPPortIDSubType = 7 -) - -type LLDPPortID struct { - Subtype LLDPPortIDSubType - ID []byte -} - -func (c *LLDPPortID) serialize() []byte { - - var buf = make([]byte, c.serializedLen()) - idLen := uint16(LLDPTLVPortID)<<9 | uint16(len(c.ID)+1) //id should take 7 bits, length should take 9 bits, +1 for subtype - binary.BigEndian.PutUint16(buf[0:2], idLen) - buf[2] = byte(c.Subtype) - copy(buf[3:], c.ID) - return buf -} - -func (c *LLDPPortID) serializedLen() int { - return len(c.ID) + 3 // +2 for id and length, +1 for subtype -} - -// LinkLayerDiscovery is a packet layer containing the LinkLayer Discovery Protocol. -// See http:http://standards.ieee.org/getieee802/download/802.1AB-2009.pdf -// ChassisID, PortID and TTL are mandatory TLV's. Other values can be decoded -// with DecodeValues() -type LinkLayerDiscovery struct { - BaseLayer - ChassisID LLDPChassisID - PortID LLDPPortID - TTL uint16 - Values []LinkLayerDiscoveryValue -} - -type IEEEOUI uint32 - -// http://standards.ieee.org/develop/regauth/oui/oui.txt -const ( - IEEEOUI8021 IEEEOUI = 0x0080c2 - IEEEOUI8023 IEEEOUI = 0x00120f - IEEEOUI80211 IEEEOUI = 0x000fac - IEEEOUI8021Qbg IEEEOUI = 0x0013BF - IEEEOUICisco2 IEEEOUI = 0x000142 - IEEEOUIMedia IEEEOUI = 0x0012bb // TR-41 - IEEEOUIProfinet IEEEOUI = 0x000ecf - IEEEOUIDCBX IEEEOUI = 0x001b21 -) - -// LLDPOrgSpecificTLV is an Organisation-specific TLV -type LLDPOrgSpecificTLV struct { - OUI IEEEOUI - SubType uint8 - Info []byte -} - -// LLDPCapabilities Types -const ( - LLDPCapsOther uint16 = 1 << 0 - LLDPCapsRepeater uint16 = 1 << 1 - LLDPCapsBridge uint16 = 1 << 2 - LLDPCapsWLANAP uint16 = 1 << 3 - LLDPCapsRouter uint16 = 1 << 4 - LLDPCapsPhone uint16 = 1 << 5 - LLDPCapsDocSis uint16 = 1 << 6 - LLDPCapsStationOnly uint16 = 1 << 7 - LLDPCapsCVLAN uint16 = 1 << 8 - LLDPCapsSVLAN uint16 = 1 << 9 - LLDPCapsTmpr uint16 = 1 << 10 -) - -// LLDPCapabilities represents the capabilities of a device -type LLDPCapabilities struct { - Other bool - Repeater bool - Bridge bool - WLANAP bool - Router bool - Phone bool - DocSis bool - StationOnly bool - CVLAN bool - SVLAN bool - TMPR bool -} - -type LLDPSysCapabilities struct { - SystemCap LLDPCapabilities - EnabledCap LLDPCapabilities -} - -type IANAAddressFamily byte - -// LLDP Management Address Subtypes -// http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xml -const ( - IANAAddressFamilyReserved IANAAddressFamily = 0 - IANAAddressFamilyIPV4 IANAAddressFamily = 1 - IANAAddressFamilyIPV6 IANAAddressFamily = 2 - IANAAddressFamilyNSAP IANAAddressFamily = 3 - IANAAddressFamilyHDLC IANAAddressFamily = 4 - IANAAddressFamilyBBN1822 IANAAddressFamily = 5 - IANAAddressFamily802 IANAAddressFamily = 6 - IANAAddressFamilyE163 IANAAddressFamily = 7 - IANAAddressFamilyE164 IANAAddressFamily = 8 - IANAAddressFamilyF69 IANAAddressFamily = 9 - IANAAddressFamilyX121 IANAAddressFamily = 10 - IANAAddressFamilyIPX IANAAddressFamily = 11 - IANAAddressFamilyAtalk IANAAddressFamily = 12 - IANAAddressFamilyDecnet IANAAddressFamily = 13 - IANAAddressFamilyBanyan IANAAddressFamily = 14 - IANAAddressFamilyE164NSAP IANAAddressFamily = 15 - IANAAddressFamilyDNS IANAAddressFamily = 16 - IANAAddressFamilyDistname IANAAddressFamily = 17 - IANAAddressFamilyASNumber IANAAddressFamily = 18 - IANAAddressFamilyXTPIPV4 IANAAddressFamily = 19 - IANAAddressFamilyXTPIPV6 IANAAddressFamily = 20 - IANAAddressFamilyXTP IANAAddressFamily = 21 - IANAAddressFamilyFcWWPN IANAAddressFamily = 22 - IANAAddressFamilyFcWWNN IANAAddressFamily = 23 - IANAAddressFamilyGWID IANAAddressFamily = 24 - IANAAddressFamilyL2VPN IANAAddressFamily = 25 -) - -type LLDPInterfaceSubtype byte - -// LLDP Interface Subtypes -const ( - LLDPInterfaceSubtypeUnknown LLDPInterfaceSubtype = 1 - LLDPInterfaceSubtypeifIndex LLDPInterfaceSubtype = 2 - LLDPInterfaceSubtypeSysPort LLDPInterfaceSubtype = 3 -) - -type LLDPMgmtAddress struct { - Subtype IANAAddressFamily - Address []byte - InterfaceSubtype LLDPInterfaceSubtype - InterfaceNumber uint32 - OID string -} - -// LinkLayerDiscoveryInfo represents the decoded details for a set of LinkLayerDiscoveryValues -// Organisation-specific TLV's can be decoded using the various Decode() methods -type LinkLayerDiscoveryInfo struct { - BaseLayer - PortDescription string - SysName string - SysDescription string - SysCapabilities LLDPSysCapabilities - MgmtAddress LLDPMgmtAddress - OrgTLVs []LLDPOrgSpecificTLV // Private TLVs - Unknown []LinkLayerDiscoveryValue // undecoded TLVs -} - -/// IEEE 802.1 TLV Subtypes -const ( - LLDP8021SubtypePortVLANID uint8 = 1 - LLDP8021SubtypeProtocolVLANID uint8 = 2 - LLDP8021SubtypeVLANName uint8 = 3 - LLDP8021SubtypeProtocolIdentity uint8 = 4 - LLDP8021SubtypeVDIUsageDigest uint8 = 5 - LLDP8021SubtypeManagementVID uint8 = 6 - LLDP8021SubtypeLinkAggregation uint8 = 7 -) - -// VLAN Port Protocol ID options -const ( - LLDPProtocolVLANIDCapability byte = 1 << 1 - LLDPProtocolVLANIDStatus byte = 1 << 2 -) - -type PortProtocolVLANID struct { - Supported bool - Enabled bool - ID uint16 -} - -type VLANName struct { - ID uint16 - Name string -} - -type ProtocolIdentity []byte - -// LACP options -const ( - LLDPAggregationCapability byte = 1 << 0 - LLDPAggregationStatus byte = 1 << 1 -) - -// IEEE 802 Link Aggregation parameters -type LLDPLinkAggregation struct { - Supported bool - Enabled bool - PortID uint32 -} - -// LLDPInfo8021 represents the information carried in 802.1 Org-specific TLVs -type LLDPInfo8021 struct { - PVID uint16 - PPVIDs []PortProtocolVLANID - VLANNames []VLANName - ProtocolIdentities []ProtocolIdentity - VIDUsageDigest uint32 - ManagementVID uint16 - LinkAggregation LLDPLinkAggregation -} - -// IEEE 802.3 TLV Subtypes -const ( - LLDP8023SubtypeMACPHY uint8 = 1 - LLDP8023SubtypeMDIPower uint8 = 2 - LLDP8023SubtypeLinkAggregation uint8 = 3 - LLDP8023SubtypeMTU uint8 = 4 -) - -// MACPHY options -const ( - LLDPMACPHYCapability byte = 1 << 0 - LLDPMACPHYStatus byte = 1 << 1 -) - -// From IANA-MAU-MIB (introduced by RFC 4836) - dot3MauType -const ( - LLDPMAUTypeUnknown uint16 = 0 - LLDPMAUTypeAUI uint16 = 1 - LLDPMAUType10Base5 uint16 = 2 - LLDPMAUTypeFOIRL uint16 = 3 - LLDPMAUType10Base2 uint16 = 4 - LLDPMAUType10BaseT uint16 = 5 - LLDPMAUType10BaseFP uint16 = 6 - LLDPMAUType10BaseFB uint16 = 7 - LLDPMAUType10BaseFL uint16 = 8 - LLDPMAUType10BROAD36 uint16 = 9 - LLDPMAUType10BaseT_HD uint16 = 10 - LLDPMAUType10BaseT_FD uint16 = 11 - LLDPMAUType10BaseFL_HD uint16 = 12 - LLDPMAUType10BaseFL_FD uint16 = 13 - LLDPMAUType100BaseT4 uint16 = 14 - LLDPMAUType100BaseTX_HD uint16 = 15 - LLDPMAUType100BaseTX_FD uint16 = 16 - LLDPMAUType100BaseFX_HD uint16 = 17 - LLDPMAUType100BaseFX_FD uint16 = 18 - LLDPMAUType100BaseT2_HD uint16 = 19 - LLDPMAUType100BaseT2_FD uint16 = 20 - LLDPMAUType1000BaseX_HD uint16 = 21 - LLDPMAUType1000BaseX_FD uint16 = 22 - LLDPMAUType1000BaseLX_HD uint16 = 23 - LLDPMAUType1000BaseLX_FD uint16 = 24 - LLDPMAUType1000BaseSX_HD uint16 = 25 - LLDPMAUType1000BaseSX_FD uint16 = 26 - LLDPMAUType1000BaseCX_HD uint16 = 27 - LLDPMAUType1000BaseCX_FD uint16 = 28 - LLDPMAUType1000BaseT_HD uint16 = 29 - LLDPMAUType1000BaseT_FD uint16 = 30 - LLDPMAUType10GBaseX uint16 = 31 - LLDPMAUType10GBaseLX4 uint16 = 32 - LLDPMAUType10GBaseR uint16 = 33 - LLDPMAUType10GBaseER uint16 = 34 - LLDPMAUType10GBaseLR uint16 = 35 - LLDPMAUType10GBaseSR uint16 = 36 - LLDPMAUType10GBaseW uint16 = 37 - LLDPMAUType10GBaseEW uint16 = 38 - LLDPMAUType10GBaseLW uint16 = 39 - LLDPMAUType10GBaseSW uint16 = 40 - LLDPMAUType10GBaseCX4 uint16 = 41 - LLDPMAUType2BaseTL uint16 = 42 - LLDPMAUType10PASS_TS uint16 = 43 - LLDPMAUType100BaseBX10D uint16 = 44 - LLDPMAUType100BaseBX10U uint16 = 45 - LLDPMAUType100BaseLX10 uint16 = 46 - LLDPMAUType1000BaseBX10D uint16 = 47 - LLDPMAUType1000BaseBX10U uint16 = 48 - LLDPMAUType1000BaseLX10 uint16 = 49 - LLDPMAUType1000BasePX10D uint16 = 50 - LLDPMAUType1000BasePX10U uint16 = 51 - LLDPMAUType1000BasePX20D uint16 = 52 - LLDPMAUType1000BasePX20U uint16 = 53 - LLDPMAUType10GBaseT uint16 = 54 - LLDPMAUType10GBaseLRM uint16 = 55 - LLDPMAUType1000BaseKX uint16 = 56 - LLDPMAUType10GBaseKX4 uint16 = 57 - LLDPMAUType10GBaseKR uint16 = 58 - LLDPMAUType10_1GBasePRX_D1 uint16 = 59 - LLDPMAUType10_1GBasePRX_D2 uint16 = 60 - LLDPMAUType10_1GBasePRX_D3 uint16 = 61 - LLDPMAUType10_1GBasePRX_U1 uint16 = 62 - LLDPMAUType10_1GBasePRX_U2 uint16 = 63 - LLDPMAUType10_1GBasePRX_U3 uint16 = 64 - LLDPMAUType10GBasePR_D1 uint16 = 65 - LLDPMAUType10GBasePR_D2 uint16 = 66 - LLDPMAUType10GBasePR_D3 uint16 = 67 - LLDPMAUType10GBasePR_U1 uint16 = 68 - LLDPMAUType10GBasePR_U3 uint16 = 69 -) - -// From RFC 3636 - ifMauAutoNegCapAdvertisedBits -const ( - LLDPMAUPMDOther uint16 = 1 << 15 - LLDPMAUPMD10BaseT uint16 = 1 << 14 - LLDPMAUPMD10BaseT_FD uint16 = 1 << 13 - LLDPMAUPMD100BaseT4 uint16 = 1 << 12 - LLDPMAUPMD100BaseTX uint16 = 1 << 11 - LLDPMAUPMD100BaseTX_FD uint16 = 1 << 10 - LLDPMAUPMD100BaseT2 uint16 = 1 << 9 - LLDPMAUPMD100BaseT2_FD uint16 = 1 << 8 - LLDPMAUPMDFDXPAUSE uint16 = 1 << 7 - LLDPMAUPMDFDXAPAUSE uint16 = 1 << 6 - LLDPMAUPMDFDXSPAUSE uint16 = 1 << 5 - LLDPMAUPMDFDXBPAUSE uint16 = 1 << 4 - LLDPMAUPMD1000BaseX uint16 = 1 << 3 - LLDPMAUPMD1000BaseX_FD uint16 = 1 << 2 - LLDPMAUPMD1000BaseT uint16 = 1 << 1 - LLDPMAUPMD1000BaseT_FD uint16 = 1 << 0 -) - -// Inverted ifMauAutoNegCapAdvertisedBits if required -// (Some manufacturers misinterpreted the spec - -// see https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1455) -const ( - LLDPMAUPMDOtherInv uint16 = 1 << 0 - LLDPMAUPMD10BaseTInv uint16 = 1 << 1 - LLDPMAUPMD10BaseT_FDInv uint16 = 1 << 2 - LLDPMAUPMD100BaseT4Inv uint16 = 1 << 3 - LLDPMAUPMD100BaseTXInv uint16 = 1 << 4 - LLDPMAUPMD100BaseTX_FDInv uint16 = 1 << 5 - LLDPMAUPMD100BaseT2Inv uint16 = 1 << 6 - LLDPMAUPMD100BaseT2_FDInv uint16 = 1 << 7 - LLDPMAUPMDFDXPAUSEInv uint16 = 1 << 8 - LLDPMAUPMDFDXAPAUSEInv uint16 = 1 << 9 - LLDPMAUPMDFDXSPAUSEInv uint16 = 1 << 10 - LLDPMAUPMDFDXBPAUSEInv uint16 = 1 << 11 - LLDPMAUPMD1000BaseXInv uint16 = 1 << 12 - LLDPMAUPMD1000BaseX_FDInv uint16 = 1 << 13 - LLDPMAUPMD1000BaseTInv uint16 = 1 << 14 - LLDPMAUPMD1000BaseT_FDInv uint16 = 1 << 15 -) - -type LLDPMACPHYConfigStatus struct { - AutoNegSupported bool - AutoNegEnabled bool - AutoNegCapability uint16 - MAUType uint16 -} - -// MDI Power options -const ( - LLDPMDIPowerPortClass byte = 1 << 0 - LLDPMDIPowerCapability byte = 1 << 1 - LLDPMDIPowerStatus byte = 1 << 2 - LLDPMDIPowerPairsAbility byte = 1 << 3 -) - -type LLDPPowerType byte - -type LLDPPowerSource byte - -type LLDPPowerPriority byte - -const ( - LLDPPowerPriorityUnknown LLDPPowerPriority = 0 - LLDPPowerPriorityMedium LLDPPowerPriority = 1 - LLDPPowerPriorityHigh LLDPPowerPriority = 2 - LLDPPowerPriorityLow LLDPPowerPriority = 3 -) - -type LLDPPowerViaMDI8023 struct { - PortClassPSE bool // false = PD - PSESupported bool - PSEEnabled bool - PSEPairsAbility bool - PSEPowerPair uint8 - PSEClass uint8 - Type LLDPPowerType - Source LLDPPowerSource - Priority LLDPPowerPriority - Requested uint16 // 1-510 Watts - Allocated uint16 // 1-510 Watts -} - -// LLDPInfo8023 represents the information carried in 802.3 Org-specific TLVs -type LLDPInfo8023 struct { - MACPHYConfigStatus LLDPMACPHYConfigStatus - PowerViaMDI LLDPPowerViaMDI8023 - LinkAggregation LLDPLinkAggregation - MTU uint16 -} - -// IEEE 802.1Qbg TLV Subtypes -const ( - LLDP8021QbgEVB uint8 = 0 - LLDP8021QbgCDCP uint8 = 1 - LLDP8021QbgVDP uint8 = 2 - LLDP8021QbgEVB22 uint8 = 13 -) - -// LLDPEVBCapabilities Types -const ( - LLDPEVBCapsSTD uint16 = 1 << 7 - LLDPEVBCapsRR uint16 = 1 << 6 - LLDPEVBCapsRTE uint16 = 1 << 2 - LLDPEVBCapsECP uint16 = 1 << 1 - LLDPEVBCapsVDP uint16 = 1 << 0 -) - -// LLDPEVBCapabilities represents the EVB capabilities of a device -type LLDPEVBCapabilities struct { - StandardBridging bool - ReflectiveRelay bool - RetransmissionTimerExponent bool - EdgeControlProtocol bool - VSIDiscoveryProtocol bool -} - -type LLDPEVBSettings struct { - Supported LLDPEVBCapabilities - Enabled LLDPEVBCapabilities - SupportedVSIs uint16 - ConfiguredVSIs uint16 - RTEExponent uint8 -} - -// LLDPInfo8021Qbg represents the information carried in 802.1Qbg Org-specific TLVs -type LLDPInfo8021Qbg struct { - EVBSettings LLDPEVBSettings -} - -type LLDPMediaSubtype uint8 - -// Media TLV Subtypes -const ( - LLDPMediaTypeCapabilities LLDPMediaSubtype = 1 - LLDPMediaTypeNetwork LLDPMediaSubtype = 2 - LLDPMediaTypeLocation LLDPMediaSubtype = 3 - LLDPMediaTypePower LLDPMediaSubtype = 4 - LLDPMediaTypeHardware LLDPMediaSubtype = 5 - LLDPMediaTypeFirmware LLDPMediaSubtype = 6 - LLDPMediaTypeSoftware LLDPMediaSubtype = 7 - LLDPMediaTypeSerial LLDPMediaSubtype = 8 - LLDPMediaTypeManufacturer LLDPMediaSubtype = 9 - LLDPMediaTypeModel LLDPMediaSubtype = 10 - LLDPMediaTypeAssetID LLDPMediaSubtype = 11 -) - -type LLDPMediaClass uint8 - -// Media Class Values -const ( - LLDPMediaClassUndefined LLDPMediaClass = 0 - LLDPMediaClassEndpointI LLDPMediaClass = 1 - LLDPMediaClassEndpointII LLDPMediaClass = 2 - LLDPMediaClassEndpointIII LLDPMediaClass = 3 - LLDPMediaClassNetwork LLDPMediaClass = 4 -) - -// LLDPMediaCapabilities Types -const ( - LLDPMediaCapsLLDP uint16 = 1 << 0 - LLDPMediaCapsNetwork uint16 = 1 << 1 - LLDPMediaCapsLocation uint16 = 1 << 2 - LLDPMediaCapsPowerPSE uint16 = 1 << 3 - LLDPMediaCapsPowerPD uint16 = 1 << 4 - LLDPMediaCapsInventory uint16 = 1 << 5 -) - -// LLDPMediaCapabilities represents the LLDP Media capabilities of a device -type LLDPMediaCapabilities struct { - Capabilities bool - NetworkPolicy bool - Location bool - PowerPSE bool - PowerPD bool - Inventory bool - Class LLDPMediaClass -} - -type LLDPApplicationType uint8 - -const ( - LLDPAppTypeReserved LLDPApplicationType = 0 - LLDPAppTypeVoice LLDPApplicationType = 1 - LLDPappTypeVoiceSignaling LLDPApplicationType = 2 - LLDPappTypeGuestVoice LLDPApplicationType = 3 - LLDPappTypeGuestVoiceSignaling LLDPApplicationType = 4 - LLDPappTypeSoftphoneVoice LLDPApplicationType = 5 - LLDPappTypeVideoConferencing LLDPApplicationType = 6 - LLDPappTypeStreamingVideo LLDPApplicationType = 7 - LLDPappTypeVideoSignaling LLDPApplicationType = 8 -) - -type LLDPNetworkPolicy struct { - ApplicationType LLDPApplicationType - Defined bool - Tagged bool - VLANId uint16 - L2Priority uint16 - DSCPValue uint8 -} - -type LLDPLocationFormat uint8 - -const ( - LLDPLocationFormatInvalid LLDPLocationFormat = 0 - LLDPLocationFormatCoordinate LLDPLocationFormat = 1 - LLDPLocationFormatAddress LLDPLocationFormat = 2 - LLDPLocationFormatECS LLDPLocationFormat = 3 -) - -type LLDPLocationAddressWhat uint8 - -const ( - LLDPLocationAddressWhatDHCP LLDPLocationAddressWhat = 0 - LLDPLocationAddressWhatNetwork LLDPLocationAddressWhat = 1 - LLDPLocationAddressWhatClient LLDPLocationAddressWhat = 2 -) - -type LLDPLocationAddressType uint8 - -const ( - LLDPLocationAddressTypeLanguage LLDPLocationAddressType = 0 - LLDPLocationAddressTypeNational LLDPLocationAddressType = 1 - LLDPLocationAddressTypeCounty LLDPLocationAddressType = 2 - LLDPLocationAddressTypeCity LLDPLocationAddressType = 3 - LLDPLocationAddressTypeCityDivision LLDPLocationAddressType = 4 - LLDPLocationAddressTypeNeighborhood LLDPLocationAddressType = 5 - LLDPLocationAddressTypeStreet LLDPLocationAddressType = 6 - LLDPLocationAddressTypeLeadingStreet LLDPLocationAddressType = 16 - LLDPLocationAddressTypeTrailingStreet LLDPLocationAddressType = 17 - LLDPLocationAddressTypeStreetSuffix LLDPLocationAddressType = 18 - LLDPLocationAddressTypeHouseNum LLDPLocationAddressType = 19 - LLDPLocationAddressTypeHouseSuffix LLDPLocationAddressType = 20 - LLDPLocationAddressTypeLandmark LLDPLocationAddressType = 21 - LLDPLocationAddressTypeAdditional LLDPLocationAddressType = 22 - LLDPLocationAddressTypeName LLDPLocationAddressType = 23 - LLDPLocationAddressTypePostal LLDPLocationAddressType = 24 - LLDPLocationAddressTypeBuilding LLDPLocationAddressType = 25 - LLDPLocationAddressTypeUnit LLDPLocationAddressType = 26 - LLDPLocationAddressTypeFloor LLDPLocationAddressType = 27 - LLDPLocationAddressTypeRoom LLDPLocationAddressType = 28 - LLDPLocationAddressTypePlace LLDPLocationAddressType = 29 - LLDPLocationAddressTypeScript LLDPLocationAddressType = 128 -) - -type LLDPLocationCoordinate struct { - LatitudeResolution uint8 - Latitude uint64 - LongitudeResolution uint8 - Longitude uint64 - AltitudeType uint8 - AltitudeResolution uint16 - Altitude uint32 - Datum uint8 -} - -type LLDPLocationAddressLine struct { - Type LLDPLocationAddressType - Value string -} - -type LLDPLocationAddress struct { - What LLDPLocationAddressWhat - CountryCode string - AddressLines []LLDPLocationAddressLine -} - -type LLDPLocationECS struct { - ELIN string -} - -// LLDP represents a physical location. -// Only one of the embedded types will contain values, depending on Format. -type LLDPLocation struct { - Format LLDPLocationFormat - Coordinate LLDPLocationCoordinate - Address LLDPLocationAddress - ECS LLDPLocationECS -} - -type LLDPPowerViaMDI struct { - Type LLDPPowerType - Source LLDPPowerSource - Priority LLDPPowerPriority - Value uint16 -} - -// LLDPInfoMedia represents the information carried in TR-41 Org-specific TLVs -type LLDPInfoMedia struct { - MediaCapabilities LLDPMediaCapabilities - NetworkPolicy LLDPNetworkPolicy - Location LLDPLocation - PowerViaMDI LLDPPowerViaMDI - HardwareRevision string - FirmwareRevision string - SoftwareRevision string - SerialNumber string - Manufacturer string - Model string - AssetID string -} - -type LLDPCisco2Subtype uint8 - -// Cisco2 TLV Subtypes -const ( - LLDPCisco2PowerViaMDI LLDPCisco2Subtype = 1 -) - -const ( - LLDPCiscoPSESupport uint8 = 1 << 0 - LLDPCiscoArchShared uint8 = 1 << 1 - LLDPCiscoPDSparePair uint8 = 1 << 2 - LLDPCiscoPSESparePair uint8 = 1 << 3 -) - -// LLDPInfoCisco2 represents the information carried in Cisco Org-specific TLVs -type LLDPInfoCisco2 struct { - PSEFourWirePoESupported bool - PDSparePairArchitectureShared bool - PDRequestSparePairPoEOn bool - PSESparePairPoEOn bool -} - -// Profinet Subtypes -type LLDPProfinetSubtype uint8 - -const ( - LLDPProfinetPNIODelay LLDPProfinetSubtype = 1 - LLDPProfinetPNIOPortStatus LLDPProfinetSubtype = 2 - LLDPProfinetPNIOMRPPortStatus LLDPProfinetSubtype = 4 - LLDPProfinetPNIOChassisMAC LLDPProfinetSubtype = 5 - LLDPProfinetPNIOPTCPStatus LLDPProfinetSubtype = 6 -) - -type LLDPPNIODelay struct { - RXLocal uint32 - RXRemote uint32 - TXLocal uint32 - TXRemote uint32 - CableLocal uint32 -} - -type LLDPPNIOPortStatus struct { - Class2 uint16 - Class3 uint16 -} - -type LLDPPNIOMRPPortStatus struct { - UUID []byte - Status uint16 -} - -type LLDPPNIOPTCPStatus struct { - MasterAddress []byte - SubdomainUUID []byte - IRDataUUID []byte - PeriodValid bool - PeriodLength uint32 - RedPeriodValid bool - RedPeriodBegin uint32 - OrangePeriodValid bool - OrangePeriodBegin uint32 - GreenPeriodValid bool - GreenPeriodBegin uint32 -} - -// LLDPInfoProfinet represents the information carried in Profinet Org-specific TLVs -type LLDPInfoProfinet struct { - PNIODelay LLDPPNIODelay - PNIOPortStatus LLDPPNIOPortStatus - PNIOMRPPortStatus LLDPPNIOMRPPortStatus - ChassisMAC []byte - PNIOPTCPStatus LLDPPNIOPTCPStatus -} - -// LayerType returns gopacket.LayerTypeLinkLayerDiscovery. -func (c *LinkLayerDiscovery) LayerType() gopacket.LayerType { - return LayerTypeLinkLayerDiscovery -} - -// SerializeTo serializes LLDP packet to bytes and writes on SerializeBuffer. -func (c *LinkLayerDiscovery) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - chassIDLen := c.ChassisID.serializedLen() - portIDLen := c.PortID.serializedLen() - vb, err := b.AppendBytes(chassIDLen + portIDLen + 4) // +4 for TTL - if err != nil { - return err - } - copy(vb[:chassIDLen], c.ChassisID.serialize()) - copy(vb[chassIDLen:], c.PortID.serialize()) - ttlIDLen := uint16(LLDPTLVTTL)<<9 | uint16(2) - binary.BigEndian.PutUint16(vb[chassIDLen+portIDLen:], ttlIDLen) - binary.BigEndian.PutUint16(vb[chassIDLen+portIDLen+2:], c.TTL) - - for _, v := range c.Values { - vb, err := b.AppendBytes(int(v.Length) + 2) // +2 for TLV type and length; 1 byte for subtype is included in v.Value - if err != nil { - return err - } - idLen := ((uint16(v.Type) << 9) | v.Length) - binary.BigEndian.PutUint16(vb[0:2], idLen) - copy(vb[2:], v.Value) - } - - vb, err = b.AppendBytes(2) // End Tlv, 2 bytes - if err != nil { - return err - } - binary.BigEndian.PutUint16(vb[len(vb)-2:], uint16(0)) //End tlv, 2 bytes, all zero - return nil - -} - -func decodeLinkLayerDiscovery(data []byte, p gopacket.PacketBuilder) error { - var vals []LinkLayerDiscoveryValue - vData := data[0:] - for len(vData) > 0 { - if len(vData) < 2 { - p.SetTruncated() - return errors.New("LLDP vdata < 2 bytes") - } - nbit := vData[0] & 0x01 - t := LLDPTLVType(vData[0] >> 1) - val := LinkLayerDiscoveryValue{Type: t, Length: uint16(nbit)<<8 + uint16(vData[1])} - if val.Length > 0 { - if len(vData) < int(val.Length+2) { - p.SetTruncated() - return fmt.Errorf("LLDP VData < %d bytes", val.Length+2) - } - val.Value = vData[2 : val.Length+2] - } - vals = append(vals, val) - if t == LLDPTLVEnd { - break - } - if len(vData) < int(2+val.Length) { - return errors.New("Malformed LinkLayerDiscovery Header") - } - vData = vData[2+val.Length:] - } - if len(vals) < 4 { - return errors.New("Missing mandatory LinkLayerDiscovery TLV") - } - c := &LinkLayerDiscovery{} - gotEnd := false - for _, v := range vals { - switch v.Type { - case LLDPTLVEnd: - gotEnd = true - case LLDPTLVChassisID: - if len(v.Value) < 2 { - return errors.New("Malformed LinkLayerDiscovery ChassisID TLV") - } - c.ChassisID.Subtype = LLDPChassisIDSubType(v.Value[0]) - c.ChassisID.ID = v.Value[1:] - case LLDPTLVPortID: - if len(v.Value) < 2 { - return errors.New("Malformed LinkLayerDiscovery PortID TLV") - } - c.PortID.Subtype = LLDPPortIDSubType(v.Value[0]) - c.PortID.ID = v.Value[1:] - case LLDPTLVTTL: - if len(v.Value) < 2 { - return errors.New("Malformed LinkLayerDiscovery TTL TLV") - } - c.TTL = binary.BigEndian.Uint16(v.Value[0:2]) - default: - c.Values = append(c.Values, v) - } - } - if c.ChassisID.Subtype == 0 || c.PortID.Subtype == 0 || !gotEnd { - return errors.New("Missing mandatory LinkLayerDiscovery TLV") - } - c.Contents = data - p.AddLayer(c) - - info := &LinkLayerDiscoveryInfo{} - p.AddLayer(info) - for _, v := range c.Values { - switch v.Type { - case LLDPTLVPortDescription: - info.PortDescription = string(v.Value) - case LLDPTLVSysName: - info.SysName = string(v.Value) - case LLDPTLVSysDescription: - info.SysDescription = string(v.Value) - case LLDPTLVSysCapabilities: - if err := checkLLDPTLVLen(v, 4); err != nil { - return err - } - info.SysCapabilities.SystemCap = getCapabilities(binary.BigEndian.Uint16(v.Value[0:2])) - info.SysCapabilities.EnabledCap = getCapabilities(binary.BigEndian.Uint16(v.Value[2:4])) - case LLDPTLVMgmtAddress: - if err := checkLLDPTLVLen(v, 9); err != nil { - return err - } - mlen := v.Value[0] - if err := checkLLDPTLVLen(v, int(mlen+7)); err != nil { - return err - } - info.MgmtAddress.Subtype = IANAAddressFamily(v.Value[1]) - info.MgmtAddress.Address = v.Value[2 : mlen+1] - info.MgmtAddress.InterfaceSubtype = LLDPInterfaceSubtype(v.Value[mlen+1]) - info.MgmtAddress.InterfaceNumber = binary.BigEndian.Uint32(v.Value[mlen+2 : mlen+6]) - olen := v.Value[mlen+6] - if err := checkLLDPTLVLen(v, int(mlen+7+olen)); err != nil { - return err - } - info.MgmtAddress.OID = string(v.Value[mlen+7 : mlen+7+olen]) - case LLDPTLVOrgSpecific: - if err := checkLLDPTLVLen(v, 4); err != nil { - return err - } - info.OrgTLVs = append(info.OrgTLVs, LLDPOrgSpecificTLV{IEEEOUI(binary.BigEndian.Uint32(append([]byte{byte(0)}, v.Value[0:3]...))), uint8(v.Value[3]), v.Value[4:]}) - } - } - return nil -} - -func (l *LinkLayerDiscoveryInfo) Decode8021() (info LLDPInfo8021, err error) { - for _, o := range l.OrgTLVs { - if o.OUI != IEEEOUI8021 { - continue - } - switch o.SubType { - case LLDP8021SubtypePortVLANID: - if err = checkLLDPOrgSpecificLen(o, 2); err != nil { - return - } - info.PVID = binary.BigEndian.Uint16(o.Info[0:2]) - case LLDP8021SubtypeProtocolVLANID: - if err = checkLLDPOrgSpecificLen(o, 3); err != nil { - return - } - sup := (o.Info[0]&LLDPProtocolVLANIDCapability > 0) - en := (o.Info[0]&LLDPProtocolVLANIDStatus > 0) - id := binary.BigEndian.Uint16(o.Info[1:3]) - info.PPVIDs = append(info.PPVIDs, PortProtocolVLANID{sup, en, id}) - case LLDP8021SubtypeVLANName: - if err = checkLLDPOrgSpecificLen(o, 2); err != nil { - return - } - id := binary.BigEndian.Uint16(o.Info[0:2]) - info.VLANNames = append(info.VLANNames, VLANName{id, string(o.Info[3:])}) - case LLDP8021SubtypeProtocolIdentity: - if err = checkLLDPOrgSpecificLen(o, 1); err != nil { - return - } - l := int(o.Info[0]) - if l > 0 { - info.ProtocolIdentities = append(info.ProtocolIdentities, o.Info[1:1+l]) - } - case LLDP8021SubtypeVDIUsageDigest: - if err = checkLLDPOrgSpecificLen(o, 4); err != nil { - return - } - info.VIDUsageDigest = binary.BigEndian.Uint32(o.Info[0:4]) - case LLDP8021SubtypeManagementVID: - if err = checkLLDPOrgSpecificLen(o, 2); err != nil { - return - } - info.ManagementVID = binary.BigEndian.Uint16(o.Info[0:2]) - case LLDP8021SubtypeLinkAggregation: - if err = checkLLDPOrgSpecificLen(o, 5); err != nil { - return - } - sup := (o.Info[0]&LLDPAggregationCapability > 0) - en := (o.Info[0]&LLDPAggregationStatus > 0) - info.LinkAggregation = LLDPLinkAggregation{sup, en, binary.BigEndian.Uint32(o.Info[1:5])} - } - } - return -} - -func (l *LinkLayerDiscoveryInfo) Decode8023() (info LLDPInfo8023, err error) { - for _, o := range l.OrgTLVs { - if o.OUI != IEEEOUI8023 { - continue - } - switch o.SubType { - case LLDP8023SubtypeMACPHY: - if err = checkLLDPOrgSpecificLen(o, 5); err != nil { - return - } - sup := (o.Info[0]&LLDPMACPHYCapability > 0) - en := (o.Info[0]&LLDPMACPHYStatus > 0) - ca := binary.BigEndian.Uint16(o.Info[1:3]) - mau := binary.BigEndian.Uint16(o.Info[3:5]) - info.MACPHYConfigStatus = LLDPMACPHYConfigStatus{sup, en, ca, mau} - case LLDP8023SubtypeMDIPower: - if err = checkLLDPOrgSpecificLen(o, 3); err != nil { - return - } - info.PowerViaMDI.PortClassPSE = (o.Info[0]&LLDPMDIPowerPortClass > 0) - info.PowerViaMDI.PSESupported = (o.Info[0]&LLDPMDIPowerCapability > 0) - info.PowerViaMDI.PSEEnabled = (o.Info[0]&LLDPMDIPowerStatus > 0) - info.PowerViaMDI.PSEPairsAbility = (o.Info[0]&LLDPMDIPowerPairsAbility > 0) - info.PowerViaMDI.PSEPowerPair = uint8(o.Info[1]) - info.PowerViaMDI.PSEClass = uint8(o.Info[2]) - if len(o.Info) >= 7 { - info.PowerViaMDI.Type = LLDPPowerType((o.Info[3] & 0xc0) >> 6) - info.PowerViaMDI.Source = LLDPPowerSource((o.Info[3] & 0x30) >> 4) - if info.PowerViaMDI.Type == 1 || info.PowerViaMDI.Type == 3 { - info.PowerViaMDI.Source += 128 // For Stringify purposes - } - info.PowerViaMDI.Priority = LLDPPowerPriority(o.Info[3] & 0x0f) - info.PowerViaMDI.Requested = binary.BigEndian.Uint16(o.Info[4:6]) - info.PowerViaMDI.Allocated = binary.BigEndian.Uint16(o.Info[6:8]) - } - case LLDP8023SubtypeLinkAggregation: - if err = checkLLDPOrgSpecificLen(o, 5); err != nil { - return - } - sup := (o.Info[0]&LLDPAggregationCapability > 0) - en := (o.Info[0]&LLDPAggregationStatus > 0) - info.LinkAggregation = LLDPLinkAggregation{sup, en, binary.BigEndian.Uint32(o.Info[1:5])} - case LLDP8023SubtypeMTU: - if err = checkLLDPOrgSpecificLen(o, 2); err != nil { - return - } - info.MTU = binary.BigEndian.Uint16(o.Info[0:2]) - } - } - return -} - -func (l *LinkLayerDiscoveryInfo) Decode8021Qbg() (info LLDPInfo8021Qbg, err error) { - for _, o := range l.OrgTLVs { - if o.OUI != IEEEOUI8021Qbg { - continue - } - switch o.SubType { - case LLDP8021QbgEVB: - if err = checkLLDPOrgSpecificLen(o, 9); err != nil { - return - } - info.EVBSettings.Supported = getEVBCapabilities(binary.BigEndian.Uint16(o.Info[0:2])) - info.EVBSettings.Enabled = getEVBCapabilities(binary.BigEndian.Uint16(o.Info[2:4])) - info.EVBSettings.SupportedVSIs = binary.BigEndian.Uint16(o.Info[4:6]) - info.EVBSettings.ConfiguredVSIs = binary.BigEndian.Uint16(o.Info[6:8]) - info.EVBSettings.RTEExponent = uint8(o.Info[8]) - } - } - return -} - -func (l *LinkLayerDiscoveryInfo) DecodeMedia() (info LLDPInfoMedia, err error) { - for _, o := range l.OrgTLVs { - if o.OUI != IEEEOUIMedia { - continue - } - switch LLDPMediaSubtype(o.SubType) { - case LLDPMediaTypeCapabilities: - if err = checkLLDPOrgSpecificLen(o, 3); err != nil { - return - } - b := binary.BigEndian.Uint16(o.Info[0:2]) - info.MediaCapabilities.Capabilities = (b & LLDPMediaCapsLLDP) > 0 - info.MediaCapabilities.NetworkPolicy = (b & LLDPMediaCapsNetwork) > 0 - info.MediaCapabilities.Location = (b & LLDPMediaCapsLocation) > 0 - info.MediaCapabilities.PowerPSE = (b & LLDPMediaCapsPowerPSE) > 0 - info.MediaCapabilities.PowerPD = (b & LLDPMediaCapsPowerPD) > 0 - info.MediaCapabilities.Inventory = (b & LLDPMediaCapsInventory) > 0 - info.MediaCapabilities.Class = LLDPMediaClass(o.Info[2]) - case LLDPMediaTypeNetwork: - if err = checkLLDPOrgSpecificLen(o, 4); err != nil { - return - } - info.NetworkPolicy.ApplicationType = LLDPApplicationType(o.Info[0]) - b := binary.BigEndian.Uint16(o.Info[1:3]) - info.NetworkPolicy.Defined = (b & 0x8000) == 0 - info.NetworkPolicy.Tagged = (b & 0x4000) > 0 - info.NetworkPolicy.VLANId = (b & 0x1ffe) >> 1 - b = binary.BigEndian.Uint16(o.Info[2:4]) - info.NetworkPolicy.L2Priority = (b & 0x01c0) >> 6 - info.NetworkPolicy.DSCPValue = uint8(o.Info[3] & 0x3f) - case LLDPMediaTypeLocation: - if err = checkLLDPOrgSpecificLen(o, 1); err != nil { - return - } - info.Location.Format = LLDPLocationFormat(o.Info[0]) - o.Info = o.Info[1:] - switch info.Location.Format { - case LLDPLocationFormatCoordinate: - if err = checkLLDPOrgSpecificLen(o, 16); err != nil { - return - } - info.Location.Coordinate.LatitudeResolution = uint8(o.Info[0]&0xfc) >> 2 - b := binary.BigEndian.Uint64(o.Info[0:8]) - info.Location.Coordinate.Latitude = (b & 0x03ffffffff000000) >> 24 - info.Location.Coordinate.LongitudeResolution = uint8(o.Info[5]&0xfc) >> 2 - b = binary.BigEndian.Uint64(o.Info[5:13]) - info.Location.Coordinate.Longitude = (b & 0x03ffffffff000000) >> 24 - info.Location.Coordinate.AltitudeType = uint8((o.Info[10] & 0x30) >> 4) - b1 := binary.BigEndian.Uint16(o.Info[10:12]) - info.Location.Coordinate.AltitudeResolution = (b1 & 0xfc0) >> 6 - b2 := binary.BigEndian.Uint32(o.Info[11:15]) - info.Location.Coordinate.Altitude = b2 & 0x3fffffff - info.Location.Coordinate.Datum = uint8(o.Info[15]) - case LLDPLocationFormatAddress: - if err = checkLLDPOrgSpecificLen(o, 3); err != nil { - return - } - //ll := uint8(o.Info[0]) - info.Location.Address.What = LLDPLocationAddressWhat(o.Info[1]) - info.Location.Address.CountryCode = string(o.Info[2:4]) - data := o.Info[4:] - for len(data) > 1 { - aType := LLDPLocationAddressType(data[0]) - aLen := int(data[1]) - if len(data) >= aLen+2 { - info.Location.Address.AddressLines = append(info.Location.Address.AddressLines, LLDPLocationAddressLine{aType, string(data[2 : aLen+2])}) - data = data[aLen+2:] - } else { - break - } - } - case LLDPLocationFormatECS: - info.Location.ECS.ELIN = string(o.Info) - } - case LLDPMediaTypePower: - if err = checkLLDPOrgSpecificLen(o, 3); err != nil { - return - } - info.PowerViaMDI.Type = LLDPPowerType((o.Info[0] & 0xc0) >> 6) - info.PowerViaMDI.Source = LLDPPowerSource((o.Info[0] & 0x30) >> 4) - if info.PowerViaMDI.Type == 1 || info.PowerViaMDI.Type == 3 { - info.PowerViaMDI.Source += 128 // For Stringify purposes - } - info.PowerViaMDI.Priority = LLDPPowerPriority(o.Info[0] & 0x0f) - info.PowerViaMDI.Value = binary.BigEndian.Uint16(o.Info[1:3]) * 100 // 0 to 102.3 w, 0.1W increments - case LLDPMediaTypeHardware: - info.HardwareRevision = string(o.Info) - case LLDPMediaTypeFirmware: - info.FirmwareRevision = string(o.Info) - case LLDPMediaTypeSoftware: - info.SoftwareRevision = string(o.Info) - case LLDPMediaTypeSerial: - info.SerialNumber = string(o.Info) - case LLDPMediaTypeManufacturer: - info.Manufacturer = string(o.Info) - case LLDPMediaTypeModel: - info.Model = string(o.Info) - case LLDPMediaTypeAssetID: - info.AssetID = string(o.Info) - } - } - return -} - -func (l *LinkLayerDiscoveryInfo) DecodeCisco2() (info LLDPInfoCisco2, err error) { - for _, o := range l.OrgTLVs { - if o.OUI != IEEEOUICisco2 { - continue - } - switch LLDPCisco2Subtype(o.SubType) { - case LLDPCisco2PowerViaMDI: - if err = checkLLDPOrgSpecificLen(o, 1); err != nil { - return - } - info.PSEFourWirePoESupported = (o.Info[0] & LLDPCiscoPSESupport) > 0 - info.PDSparePairArchitectureShared = (o.Info[0] & LLDPCiscoArchShared) > 0 - info.PDRequestSparePairPoEOn = (o.Info[0] & LLDPCiscoPDSparePair) > 0 - info.PSESparePairPoEOn = (o.Info[0] & LLDPCiscoPSESparePair) > 0 - } - } - return -} - -func (l *LinkLayerDiscoveryInfo) DecodeProfinet() (info LLDPInfoProfinet, err error) { - for _, o := range l.OrgTLVs { - if o.OUI != IEEEOUIProfinet { - continue - } - switch LLDPProfinetSubtype(o.SubType) { - case LLDPProfinetPNIODelay: - if err = checkLLDPOrgSpecificLen(o, 20); err != nil { - return - } - info.PNIODelay.RXLocal = binary.BigEndian.Uint32(o.Info[0:4]) - info.PNIODelay.RXRemote = binary.BigEndian.Uint32(o.Info[4:8]) - info.PNIODelay.TXLocal = binary.BigEndian.Uint32(o.Info[8:12]) - info.PNIODelay.TXRemote = binary.BigEndian.Uint32(o.Info[12:16]) - info.PNIODelay.CableLocal = binary.BigEndian.Uint32(o.Info[16:20]) - case LLDPProfinetPNIOPortStatus: - if err = checkLLDPOrgSpecificLen(o, 4); err != nil { - return - } - info.PNIOPortStatus.Class2 = binary.BigEndian.Uint16(o.Info[0:2]) - info.PNIOPortStatus.Class3 = binary.BigEndian.Uint16(o.Info[2:4]) - case LLDPProfinetPNIOMRPPortStatus: - if err = checkLLDPOrgSpecificLen(o, 18); err != nil { - return - } - info.PNIOMRPPortStatus.UUID = o.Info[0:16] - info.PNIOMRPPortStatus.Status = binary.BigEndian.Uint16(o.Info[16:18]) - case LLDPProfinetPNIOChassisMAC: - if err = checkLLDPOrgSpecificLen(o, 6); err != nil { - return - } - info.ChassisMAC = o.Info[0:6] - case LLDPProfinetPNIOPTCPStatus: - if err = checkLLDPOrgSpecificLen(o, 54); err != nil { - return - } - info.PNIOPTCPStatus.MasterAddress = o.Info[0:6] - info.PNIOPTCPStatus.SubdomainUUID = o.Info[6:22] - info.PNIOPTCPStatus.IRDataUUID = o.Info[22:38] - b := binary.BigEndian.Uint32(o.Info[38:42]) - info.PNIOPTCPStatus.PeriodValid = (b & 0x80000000) > 0 - info.PNIOPTCPStatus.PeriodLength = b & 0x7fffffff - b = binary.BigEndian.Uint32(o.Info[42:46]) - info.PNIOPTCPStatus.RedPeriodValid = (b & 0x80000000) > 0 - info.PNIOPTCPStatus.RedPeriodBegin = b & 0x7fffffff - b = binary.BigEndian.Uint32(o.Info[46:50]) - info.PNIOPTCPStatus.OrangePeriodValid = (b & 0x80000000) > 0 - info.PNIOPTCPStatus.OrangePeriodBegin = b & 0x7fffffff - b = binary.BigEndian.Uint32(o.Info[50:54]) - info.PNIOPTCPStatus.GreenPeriodValid = (b & 0x80000000) > 0 - info.PNIOPTCPStatus.GreenPeriodBegin = b & 0x7fffffff - } - } - return -} - -// LayerType returns gopacket.LayerTypeLinkLayerDiscoveryInfo. -func (c *LinkLayerDiscoveryInfo) LayerType() gopacket.LayerType { - return LayerTypeLinkLayerDiscoveryInfo -} - -func getCapabilities(v uint16) (c LLDPCapabilities) { - c.Other = (v&LLDPCapsOther > 0) - c.Repeater = (v&LLDPCapsRepeater > 0) - c.Bridge = (v&LLDPCapsBridge > 0) - c.WLANAP = (v&LLDPCapsWLANAP > 0) - c.Router = (v&LLDPCapsRouter > 0) - c.Phone = (v&LLDPCapsPhone > 0) - c.DocSis = (v&LLDPCapsDocSis > 0) - c.StationOnly = (v&LLDPCapsStationOnly > 0) - c.CVLAN = (v&LLDPCapsCVLAN > 0) - c.SVLAN = (v&LLDPCapsSVLAN > 0) - c.TMPR = (v&LLDPCapsTmpr > 0) - return -} - -func getEVBCapabilities(v uint16) (c LLDPEVBCapabilities) { - c.StandardBridging = (v & LLDPEVBCapsSTD) > 0 - c.StandardBridging = (v & LLDPEVBCapsSTD) > 0 - c.ReflectiveRelay = (v & LLDPEVBCapsRR) > 0 - c.RetransmissionTimerExponent = (v & LLDPEVBCapsRTE) > 0 - c.EdgeControlProtocol = (v & LLDPEVBCapsECP) > 0 - c.VSIDiscoveryProtocol = (v & LLDPEVBCapsVDP) > 0 - return -} - -func (t LLDPTLVType) String() (s string) { - switch t { - case LLDPTLVEnd: - s = "TLV End" - case LLDPTLVChassisID: - s = "Chassis ID" - case LLDPTLVPortID: - s = "Port ID" - case LLDPTLVTTL: - s = "TTL" - case LLDPTLVPortDescription: - s = "Port Description" - case LLDPTLVSysName: - s = "System Name" - case LLDPTLVSysDescription: - s = "System Description" - case LLDPTLVSysCapabilities: - s = "System Capabilities" - case LLDPTLVMgmtAddress: - s = "Management Address" - case LLDPTLVOrgSpecific: - s = "Organisation Specific" - default: - s = "Unknown" - } - return -} - -func (t LLDPChassisIDSubType) String() (s string) { - switch t { - case LLDPChassisIDSubTypeReserved: - s = "Reserved" - case LLDPChassisIDSubTypeChassisComp: - s = "Chassis Component" - case LLDPChassisIDSubtypeIfaceAlias: - s = "Interface Alias" - case LLDPChassisIDSubTypePortComp: - s = "Port Component" - case LLDPChassisIDSubTypeMACAddr: - s = "MAC Address" - case LLDPChassisIDSubTypeNetworkAddr: - s = "Network Address" - case LLDPChassisIDSubtypeIfaceName: - s = "Interface Name" - case LLDPChassisIDSubTypeLocal: - s = "Local" - default: - s = "Unknown" - } - return -} - -func (t LLDPPortIDSubType) String() (s string) { - switch t { - case LLDPPortIDSubtypeReserved: - s = "Reserved" - case LLDPPortIDSubtypeIfaceAlias: - s = "Interface Alias" - case LLDPPortIDSubtypePortComp: - s = "Port Component" - case LLDPPortIDSubtypeMACAddr: - s = "MAC Address" - case LLDPPortIDSubtypeNetworkAddr: - s = "Network Address" - case LLDPPortIDSubtypeIfaceName: - s = "Interface Name" - case LLDPPortIDSubtypeAgentCircuitID: - s = "Agent Circuit ID" - case LLDPPortIDSubtypeLocal: - s = "Local" - default: - s = "Unknown" - } - return -} - -func (t IANAAddressFamily) String() (s string) { - switch t { - case IANAAddressFamilyReserved: - s = "Reserved" - case IANAAddressFamilyIPV4: - s = "IPv4" - case IANAAddressFamilyIPV6: - s = "IPv6" - case IANAAddressFamilyNSAP: - s = "NSAP" - case IANAAddressFamilyHDLC: - s = "HDLC" - case IANAAddressFamilyBBN1822: - s = "BBN 1822" - case IANAAddressFamily802: - s = "802 media plus Ethernet 'canonical format'" - case IANAAddressFamilyE163: - s = "E.163" - case IANAAddressFamilyE164: - s = "E.164 (SMDS, Frame Relay, ATM)" - case IANAAddressFamilyF69: - s = "F.69 (Telex)" - case IANAAddressFamilyX121: - s = "X.121, X.25, Frame Relay" - case IANAAddressFamilyIPX: - s = "IPX" - case IANAAddressFamilyAtalk: - s = "Appletalk" - case IANAAddressFamilyDecnet: - s = "Decnet IV" - case IANAAddressFamilyBanyan: - s = "Banyan Vines" - case IANAAddressFamilyE164NSAP: - s = "E.164 with NSAP format subaddress" - case IANAAddressFamilyDNS: - s = "DNS" - case IANAAddressFamilyDistname: - s = "Distinguished Name" - case IANAAddressFamilyASNumber: - s = "AS Number" - case IANAAddressFamilyXTPIPV4: - s = "XTP over IP version 4" - case IANAAddressFamilyXTPIPV6: - s = "XTP over IP version 6" - case IANAAddressFamilyXTP: - s = "XTP native mode XTP" - case IANAAddressFamilyFcWWPN: - s = "Fibre Channel World-Wide Port Name" - case IANAAddressFamilyFcWWNN: - s = "Fibre Channel World-Wide Node Name" - case IANAAddressFamilyGWID: - s = "GWID" - case IANAAddressFamilyL2VPN: - s = "AFI for Layer 2 VPN" - default: - s = "Unknown" - } - return -} - -func (t LLDPInterfaceSubtype) String() (s string) { - switch t { - case LLDPInterfaceSubtypeUnknown: - s = "Unknown" - case LLDPInterfaceSubtypeifIndex: - s = "IfIndex" - case LLDPInterfaceSubtypeSysPort: - s = "System Port Number" - default: - s = "Unknown" - } - return -} - -func (t LLDPPowerType) String() (s string) { - switch t { - case 0: - s = "Type 2 PSE Device" - case 1: - s = "Type 2 PD Device" - case 2: - s = "Type 1 PSE Device" - case 3: - s = "Type 1 PD Device" - default: - s = "Unknown" - } - return -} - -func (t LLDPPowerSource) String() (s string) { - switch t { - // PD Device - case 0: - s = "Unknown" - case 1: - s = "PSE" - case 2: - s = "Local" - case 3: - s = "PSE and Local" - // PSE Device (Actual value + 128) - case 128: - s = "Unknown" - case 129: - s = "Primary Power Source" - case 130: - s = "Backup Power Source" - default: - s = "Unknown" - } - return -} - -func (t LLDPPowerPriority) String() (s string) { - switch t { - case 0: - s = "Unknown" - case 1: - s = "Critical" - case 2: - s = "High" - case 3: - s = "Low" - default: - s = "Unknown" - } - return -} - -func (t LLDPMediaSubtype) String() (s string) { - switch t { - case LLDPMediaTypeCapabilities: - s = "Media Capabilities " - case LLDPMediaTypeNetwork: - s = "Network Policy" - case LLDPMediaTypeLocation: - s = "Location Identification" - case LLDPMediaTypePower: - s = "Extended Power-via-MDI" - case LLDPMediaTypeHardware: - s = "Hardware Revision" - case LLDPMediaTypeFirmware: - s = "Firmware Revision" - case LLDPMediaTypeSoftware: - s = "Software Revision" - case LLDPMediaTypeSerial: - s = "Serial Number" - case LLDPMediaTypeManufacturer: - s = "Manufacturer" - case LLDPMediaTypeModel: - s = "Model" - case LLDPMediaTypeAssetID: - s = "Asset ID" - default: - s = "Unknown" - } - return -} - -func (t LLDPMediaClass) String() (s string) { - switch t { - case LLDPMediaClassUndefined: - s = "Undefined" - case LLDPMediaClassEndpointI: - s = "Endpoint Class I" - case LLDPMediaClassEndpointII: - s = "Endpoint Class II" - case LLDPMediaClassEndpointIII: - s = "Endpoint Class III" - case LLDPMediaClassNetwork: - s = "Network connectivity " - default: - s = "Unknown" - } - return -} - -func (t LLDPApplicationType) String() (s string) { - switch t { - case LLDPAppTypeReserved: - s = "Reserved" - case LLDPAppTypeVoice: - s = "Voice" - case LLDPappTypeVoiceSignaling: - s = "Voice Signaling" - case LLDPappTypeGuestVoice: - s = "Guest Voice" - case LLDPappTypeGuestVoiceSignaling: - s = "Guest Voice Signaling" - case LLDPappTypeSoftphoneVoice: - s = "Softphone Voice" - case LLDPappTypeVideoConferencing: - s = "Video Conferencing" - case LLDPappTypeStreamingVideo: - s = "Streaming Video" - case LLDPappTypeVideoSignaling: - s = "Video Signaling" - default: - s = "Unknown" - } - return -} - -func (t LLDPLocationFormat) String() (s string) { - switch t { - case LLDPLocationFormatInvalid: - s = "Invalid" - case LLDPLocationFormatCoordinate: - s = "Coordinate-based LCI" - case LLDPLocationFormatAddress: - s = "Address-based LCO" - case LLDPLocationFormatECS: - s = "ECS ELIN" - default: - s = "Unknown" - } - return -} - -func (t LLDPLocationAddressType) String() (s string) { - switch t { - case LLDPLocationAddressTypeLanguage: - s = "Language" - case LLDPLocationAddressTypeNational: - s = "National subdivisions (province, state, etc)" - case LLDPLocationAddressTypeCounty: - s = "County, parish, district" - case LLDPLocationAddressTypeCity: - s = "City, township" - case LLDPLocationAddressTypeCityDivision: - s = "City division, borough, ward" - case LLDPLocationAddressTypeNeighborhood: - s = "Neighborhood, block" - case LLDPLocationAddressTypeStreet: - s = "Street" - case LLDPLocationAddressTypeLeadingStreet: - s = "Leading street direction" - case LLDPLocationAddressTypeTrailingStreet: - s = "Trailing street suffix" - case LLDPLocationAddressTypeStreetSuffix: - s = "Street suffix" - case LLDPLocationAddressTypeHouseNum: - s = "House number" - case LLDPLocationAddressTypeHouseSuffix: - s = "House number suffix" - case LLDPLocationAddressTypeLandmark: - s = "Landmark or vanity address" - case LLDPLocationAddressTypeAdditional: - s = "Additional location information" - case LLDPLocationAddressTypeName: - s = "Name" - case LLDPLocationAddressTypePostal: - s = "Postal/ZIP code" - case LLDPLocationAddressTypeBuilding: - s = "Building" - case LLDPLocationAddressTypeUnit: - s = "Unit" - case LLDPLocationAddressTypeFloor: - s = "Floor" - case LLDPLocationAddressTypeRoom: - s = "Room number" - case LLDPLocationAddressTypePlace: - s = "Place type" - case LLDPLocationAddressTypeScript: - s = "Script" - default: - s = "Unknown" - } - return -} - -func checkLLDPTLVLen(v LinkLayerDiscoveryValue, l int) (err error) { - if len(v.Value) < l { - err = fmt.Errorf("Invalid TLV %v length %d (wanted mimimum %v", v.Type, len(v.Value), l) - } - return -} - -func checkLLDPOrgSpecificLen(o LLDPOrgSpecificTLV, l int) (err error) { - if len(o.Info) < l { - err = fmt.Errorf("Invalid Org Specific TLV %v length %d (wanted minimum %v)", o.SubType, len(o.Info), l) - } - return -} diff --git a/vendor/github.com/google/gopacket/layers/loopback.go b/vendor/github.com/google/gopacket/layers/loopback.go deleted file mode 100644 index 839f760739b..00000000000 --- a/vendor/github.com/google/gopacket/layers/loopback.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - - "github.com/google/gopacket" -) - -// Loopback contains the header for loopback encapsulation. This header is -// used by both BSD and OpenBSD style loopback decoding (pcap's DLT_NULL -// and DLT_LOOP, respectively). -type Loopback struct { - BaseLayer - Family ProtocolFamily -} - -// LayerType returns LayerTypeLoopback. -func (l *Loopback) LayerType() gopacket.LayerType { return LayerTypeLoopback } - -// DecodeFromBytes decodes the given bytes into this layer. -func (l *Loopback) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 4 { - return errors.New("Loopback packet too small") - } - - // The protocol could be either big-endian or little-endian, we're - // not sure. But we're PRETTY sure that the value is less than - // 256, so we can check the first two bytes. - var prot uint32 - if data[0] == 0 && data[1] == 0 { - prot = binary.BigEndian.Uint32(data[:4]) - } else { - prot = binary.LittleEndian.Uint32(data[:4]) - } - if prot > 0xFF { - return fmt.Errorf("Invalid loopback protocol %q", data[:4]) - } - - l.Family = ProtocolFamily(prot) - l.BaseLayer = BaseLayer{data[:4], data[4:]} - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (l *Loopback) CanDecode() gopacket.LayerClass { - return LayerTypeLoopback -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (l *Loopback) NextLayerType() gopacket.LayerType { - return l.Family.LayerType() -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -func (l *Loopback) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(4) - if err != nil { - return err - } - binary.LittleEndian.PutUint32(bytes, uint32(l.Family)) - return nil -} - -func decodeLoopback(data []byte, p gopacket.PacketBuilder) error { - l := Loopback{} - if err := l.DecodeFromBytes(data, gopacket.NilDecodeFeedback); err != nil { - return err - } - p.AddLayer(&l) - return p.NextDecoder(l.Family) -} diff --git a/vendor/github.com/google/gopacket/layers/mldv1.go b/vendor/github.com/google/gopacket/layers/mldv1.go deleted file mode 100644 index e1bb1dc00fe..00000000000 --- a/vendor/github.com/google/gopacket/layers/mldv1.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright 2018 GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "math" - "net" - "time" - - "github.com/google/gopacket" -) - -// MLDv1Message represents the common structure of all MLDv1 messages -type MLDv1Message struct { - BaseLayer - // 3.4. Maximum Response Delay - MaximumResponseDelay time.Duration - // 3.6. Multicast Address - // Zero in general query - // Specific IPv6 multicast address otherwise - MulticastAddress net.IP -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (m *MLDv1Message) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 20 { - df.SetTruncated() - return errors.New("ICMP layer less than 20 bytes for Multicast Listener Query Message V1") - } - - m.MaximumResponseDelay = time.Duration(binary.BigEndian.Uint16(data[0:2])) * time.Millisecond - // data[2:4] is reserved and not used in mldv1 - m.MulticastAddress = data[4:20] - - return nil -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (*MLDv1Message) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypeZero -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (m *MLDv1Message) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf, err := b.PrependBytes(20) - if err != nil { - return err - } - - if m.MaximumResponseDelay < 0 { - return errors.New("maximum response delay must not be negative") - } - dms := m.MaximumResponseDelay / time.Millisecond - if dms > math.MaxUint16 { - return fmt.Errorf("maximum response delay %dms is more than the allowed 65535ms", dms) - } - binary.BigEndian.PutUint16(buf[0:2], uint16(dms)) - - copy(buf[2:4], []byte{0x0, 0x0}) - - ma16 := m.MulticastAddress.To16() - if ma16 == nil { - return fmt.Errorf("invalid multicast address '%s'", m.MulticastAddress) - } - copy(buf[4:20], ma16) - - return nil -} - -// Sums this layer up nicely formatted -func (m *MLDv1Message) String() string { - return fmt.Sprintf( - "Maximum Response Delay: %dms, Multicast Address: %s", - m.MaximumResponseDelay/time.Millisecond, - m.MulticastAddress) -} - -// MLDv1MulticastListenerQueryMessage are sent by the router to determine -// whether there are multicast listeners on the link. -// https://tools.ietf.org/html/rfc2710 Page 5 -type MLDv1MulticastListenerQueryMessage struct { - MLDv1Message -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (m *MLDv1MulticastListenerQueryMessage) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - err := m.MLDv1Message.DecodeFromBytes(data, df) - if err != nil { - return err - } - - if len(data) > 20 { - m.Payload = data[20:] - } - - return nil -} - -// LayerType returns LayerTypeMLDv1MulticastListenerQuery. -func (*MLDv1MulticastListenerQueryMessage) LayerType() gopacket.LayerType { - return LayerTypeMLDv1MulticastListenerQuery -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (*MLDv1MulticastListenerQueryMessage) CanDecode() gopacket.LayerClass { - return LayerTypeMLDv1MulticastListenerQuery -} - -// IsGeneralQuery is true when this is a general query. -// In a Query message, the Multicast Address field is set to zero when -// sending a General Query. -// https://tools.ietf.org/html/rfc2710#section-3.6 -func (m *MLDv1MulticastListenerQueryMessage) IsGeneralQuery() bool { - return net.IPv6zero.Equal(m.MulticastAddress) -} - -// IsSpecificQuery is true when this is not a general query. -// In a Query message, the Multicast Address field is set to a specific -// IPv6 multicast address when sending a Multicast-Address-Specific Query. -// https://tools.ietf.org/html/rfc2710#section-3.6 -func (m *MLDv1MulticastListenerQueryMessage) IsSpecificQuery() bool { - return !m.IsGeneralQuery() -} - -// MLDv1MulticastListenerReportMessage is sent by a client listening on -// a specific multicast address to indicate that it is (still) listening -// on the specific multicast address. -// https://tools.ietf.org/html/rfc2710 Page 6 -type MLDv1MulticastListenerReportMessage struct { - MLDv1Message -} - -// LayerType returns LayerTypeMLDv1MulticastListenerReport. -func (*MLDv1MulticastListenerReportMessage) LayerType() gopacket.LayerType { - return LayerTypeMLDv1MulticastListenerReport -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (*MLDv1MulticastListenerReportMessage) CanDecode() gopacket.LayerClass { - return LayerTypeMLDv1MulticastListenerReport -} - -// MLDv1MulticastListenerDoneMessage should be sent by a client when it ceases -// to listen to a multicast address on an interface. -// https://tools.ietf.org/html/rfc2710 Page 7 -type MLDv1MulticastListenerDoneMessage struct { - MLDv1Message -} - -// LayerType returns LayerTypeMLDv1MulticastListenerDone. -func (*MLDv1MulticastListenerDoneMessage) LayerType() gopacket.LayerType { - return LayerTypeMLDv1MulticastListenerDone -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (*MLDv1MulticastListenerDoneMessage) CanDecode() gopacket.LayerClass { - return LayerTypeMLDv1MulticastListenerDone -} - -func decodeMLDv1MulticastListenerReport(data []byte, p gopacket.PacketBuilder) error { - m := &MLDv1MulticastListenerReportMessage{} - return decodingLayerDecoder(m, data, p) -} - -func decodeMLDv1MulticastListenerQuery(data []byte, p gopacket.PacketBuilder) error { - m := &MLDv1MulticastListenerQueryMessage{} - return decodingLayerDecoder(m, data, p) -} - -func decodeMLDv1MulticastListenerDone(data []byte, p gopacket.PacketBuilder) error { - m := &MLDv1MulticastListenerDoneMessage{} - return decodingLayerDecoder(m, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/mldv2.go b/vendor/github.com/google/gopacket/layers/mldv2.go deleted file mode 100644 index 05100a52d14..00000000000 --- a/vendor/github.com/google/gopacket/layers/mldv2.go +++ /dev/null @@ -1,619 +0,0 @@ -// Copyright 2018 GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "math" - "net" - "time" - - "github.com/google/gopacket" -) - -const ( - // S Flag bit is 1 - mldv2STrue uint8 = 0x8 - - // S Flag value mask - // mldv2STrue & mldv2SMask == mldv2STrue // true - // 0x1 & mldv2SMask == mldv2STrue // true - // 0x0 & mldv2SMask == mldv2STrue // false - mldv2SMask uint8 = 0x8 - - // QRV value mask - mldv2QRVMask uint8 = 0x7 -) - -// MLDv2MulticastListenerQueryMessage are sent by multicast routers to query the -// multicast listening state of neighboring interfaces. -// https://tools.ietf.org/html/rfc3810#section-5.1 -// -// Some information, like Maximum Response Code and Multicast Address are in the -// previous layer LayerTypeMLDv1MulticastListenerQuery -type MLDv2MulticastListenerQueryMessage struct { - BaseLayer - // 5.1.3. Maximum Response Delay COde - MaximumResponseCode uint16 - // 5.1.5. Multicast Address - // Zero in general query - // Specific IPv6 multicast address otherwise - MulticastAddress net.IP - // 5.1.7. S Flag (Suppress Router-Side Processing) - SuppressRoutersideProcessing bool - // 5.1.8. QRV (Querier's Robustness Variable) - QueriersRobustnessVariable uint8 - // 5.1.9. QQIC (Querier's Query Interval Code) - QueriersQueryIntervalCode uint8 - // 5.1.10. Number of Sources (N) - NumberOfSources uint16 - // 5.1.11 Source Address [i] - SourceAddresses []net.IP -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (m *MLDv2MulticastListenerQueryMessage) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 24 { - df.SetTruncated() - return errors.New("ICMP layer less than 24 bytes for Multicast Listener Query Message V2") - } - - m.MaximumResponseCode = binary.BigEndian.Uint16(data[0:2]) - // ignore data[2:4] as per https://tools.ietf.org/html/rfc3810#section-5.1.4 - m.MulticastAddress = data[4:20] - m.SuppressRoutersideProcessing = (data[20] & mldv2SMask) == mldv2STrue - m.QueriersRobustnessVariable = data[20] & mldv2QRVMask - m.QueriersQueryIntervalCode = data[21] - - m.NumberOfSources = binary.BigEndian.Uint16(data[22:24]) - - var end int - for i := uint16(0); i < m.NumberOfSources; i++ { - begin := 24 + (int(i) * 16) - end = begin + 16 - - if end > len(data) { - df.SetTruncated() - return fmt.Errorf("ICMP layer less than %d bytes for Multicast Listener Query Message V2", end) - } - - m.SourceAddresses = append(m.SourceAddresses, data[begin:end]) - } - - return nil -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (*MLDv2MulticastListenerQueryMessage) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypeZero -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (m *MLDv2MulticastListenerQueryMessage) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if err := m.serializeSourceAddressesTo(b, opts); err != nil { - return err - } - - buf, err := b.PrependBytes(24) - if err != nil { - return err - } - - binary.BigEndian.PutUint16(buf[0:2], m.MaximumResponseCode) - copy(buf[2:4], []byte{0x00, 0x00}) // set reserved bytes to zero - - ma16 := m.MulticastAddress.To16() - if ma16 == nil { - return fmt.Errorf("invalid MulticastAddress '%s'", m.MulticastAddress) - } - copy(buf[4:20], ma16) - - byte20 := m.QueriersRobustnessVariable & mldv2QRVMask - if m.SuppressRoutersideProcessing { - byte20 |= mldv2STrue - } else { - byte20 &= ^mldv2STrue // the complement of mldv2STrue - } - byte20 &= 0x0F // set reserved bits to zero - buf[20] = byte20 - - binary.BigEndian.PutUint16(buf[22:24], m.NumberOfSources) - buf[21] = m.QueriersQueryIntervalCode - - return nil -} - -// writes each source address to the buffer preserving the order -func (m *MLDv2MulticastListenerQueryMessage) serializeSourceAddressesTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - numberOfSourceAddresses := len(m.SourceAddresses) - if numberOfSourceAddresses > math.MaxUint16 { - return fmt.Errorf( - "there are more than %d source addresses, but 65535 is the maximum number of supported addresses", - numberOfSourceAddresses) - } - - if opts.FixLengths { - m.NumberOfSources = uint16(numberOfSourceAddresses) - } - - lastSAIdx := numberOfSourceAddresses - 1 - for k := range m.SourceAddresses { - i := lastSAIdx - k // reverse order - - buf, err := b.PrependBytes(16) - if err != nil { - return err - } - - sa16 := m.SourceAddresses[i].To16() - if sa16 == nil { - return fmt.Errorf("invalid source address [%d] '%s'", i, m.SourceAddresses[i]) - } - copy(buf[0:16], sa16) - } - - return nil -} - -// String sums this layer up nicely formatted -func (m *MLDv2MulticastListenerQueryMessage) String() string { - return fmt.Sprintf( - "Maximum Response Code: %#x (%dms), Multicast Address: %s, Suppress Routerside Processing: %t, QRV: %#x, QQIC: %#x (%ds), Number of Source Address: %d (actual: %d), Source Addresses: %s", - m.MaximumResponseCode, - m.MaximumResponseDelay(), - m.MulticastAddress, - m.SuppressRoutersideProcessing, - m.QueriersRobustnessVariable, - m.QueriersQueryIntervalCode, - m.QQI()/time.Second, - m.NumberOfSources, - len(m.SourceAddresses), - m.SourceAddresses) -} - -// LayerType returns LayerTypeMLDv2MulticastListenerQuery. -func (*MLDv2MulticastListenerQueryMessage) LayerType() gopacket.LayerType { - return LayerTypeMLDv2MulticastListenerQuery -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (*MLDv2MulticastListenerQueryMessage) CanDecode() gopacket.LayerClass { - return LayerTypeMLDv2MulticastListenerQuery -} - -// QQI calculates the Querier's Query Interval based on the QQIC -// according to https://tools.ietf.org/html/rfc3810#section-5.1.9 -func (m *MLDv2MulticastListenerQueryMessage) QQI() time.Duration { - data := m.QueriersQueryIntervalCode - if data < 128 { - return time.Second * time.Duration(data) - } - - exp := uint16(data) & 0x70 >> 4 - mant := uint16(data) & 0x0F - return time.Second * time.Duration(mant|0x1000<<(exp+3)) -} - -// SetQQI calculates and updates the Querier's Query Interval Code (QQIC) -// according to https://tools.ietf.org/html/rfc3810#section-5.1.9 -func (m *MLDv2MulticastListenerQueryMessage) SetQQI(d time.Duration) error { - if d < 0 { - m.QueriersQueryIntervalCode = 0 - return errors.New("QQI duration is negative") - } - - if d == 0 { - m.QueriersQueryIntervalCode = 0 - return nil - } - - dms := d / time.Second - if dms < 128 { - m.QueriersQueryIntervalCode = uint8(dms) - } - - if dms > 31744 { // mant=0xF, exp=0x7 - m.QueriersQueryIntervalCode = 0xFF - return fmt.Errorf("QQI duration %ds is, maximum allowed is 31744s", dms) - } - - value := uint16(dms) // ok, because 31744 < math.MaxUint16 - exp := uint8(7) - for mask := uint16(0x4000); exp > 0; exp-- { - if mask&value != 0 { - break - } - - mask >>= 1 - } - - mant := uint8(0x000F & (value >> (exp + 3))) - sig := uint8(0x10) - m.QueriersQueryIntervalCode = sig | exp<<4 | mant - - return nil -} - -// MaximumResponseDelay returns the Maximum Response Delay based on the -// Maximum Response Code according to -// https://tools.ietf.org/html/rfc3810#section-5.1.3 -func (m *MLDv2MulticastListenerQueryMessage) MaximumResponseDelay() time.Duration { - if m.MaximumResponseCode < 0x8000 { - return time.Duration(m.MaximumResponseCode) - } - - exp := m.MaximumResponseCode & 0x7000 >> 12 - mant := m.MaximumResponseCode & 0x0FFF - - return time.Millisecond * time.Duration(mant|0x1000<<(exp+3)) -} - -// SetMLDv2MaximumResponseDelay updates the Maximum Response Code according to -// https://tools.ietf.org/html/rfc3810#section-5.1.3 -func (m *MLDv2MulticastListenerQueryMessage) SetMLDv2MaximumResponseDelay(d time.Duration) error { - if d == 0 { - m.MaximumResponseCode = 0 - return nil - } - - if d < 0 { - return errors.New("maximum response delay must not be negative") - } - - dms := d / time.Millisecond - - if dms < 32768 { - m.MaximumResponseCode = uint16(dms) - } - - if dms > 4193280 { // mant=0xFFF, exp=0x7 - return fmt.Errorf("maximum response delay %dms is bigger the than maximum of 4193280ms", dms) - } - - value := uint32(dms) // ok, because 4193280 < math.MaxUint32 - exp := uint8(7) - for mask := uint32(0x40000000); exp > 0; exp-- { - if mask&value != 0 { - break - } - - mask >>= 1 - } - - mant := uint16(0x00000FFF & (value >> (exp + 3))) - sig := uint16(0x1000) - m.MaximumResponseCode = sig | uint16(exp)<<12 | mant - return nil -} - -// MLDv2MulticastListenerReportMessage is sent by an IP node to report the -// current multicast listening state, or changes therein. -// https://tools.ietf.org/html/rfc3810#section-5.2 -type MLDv2MulticastListenerReportMessage struct { - BaseLayer - // 5.2.3. Nr of Mcast Address Records - NumberOfMulticastAddressRecords uint16 - // 5.2.4. Multicast Address Record [i] - MulticastAddressRecords []MLDv2MulticastAddressRecord -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (m *MLDv2MulticastListenerReportMessage) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 4 { - df.SetTruncated() - return errors.New("ICMP layer less than 4 bytes for Multicast Listener Report Message V2") - } - - // ignore data[0:2] as per RFC - // https://tools.ietf.org/html/rfc3810#section-5.2.1 - m.NumberOfMulticastAddressRecords = binary.BigEndian.Uint16(data[2:4]) - - begin := 4 - for i := uint16(0); i < m.NumberOfMulticastAddressRecords; i++ { - mar := MLDv2MulticastAddressRecord{} - read, err := mar.decode(data[begin:], df) - if err != nil { - return err - } - - m.MulticastAddressRecords = append(m.MulticastAddressRecords, mar) - - begin += read - } - - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (m *MLDv2MulticastListenerReportMessage) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - lastItemIdx := len(m.MulticastAddressRecords) - 1 - for k := range m.MulticastAddressRecords { - i := lastItemIdx - k // reverse order - - err := m.MulticastAddressRecords[i].serializeTo(b, opts) - if err != nil { - return err - } - } - - if opts.FixLengths { - numberOfMAR := len(m.MulticastAddressRecords) - if numberOfMAR > math.MaxUint16 { - return fmt.Errorf( - "%d multicast address records added, but the maximum is 65535", - numberOfMAR) - } - - m.NumberOfMulticastAddressRecords = uint16(numberOfMAR) - } - - buf, err := b.PrependBytes(4) - if err != nil { - return err - } - - copy(buf[0:2], []byte{0x0, 0x0}) - binary.BigEndian.PutUint16(buf[2:4], m.NumberOfMulticastAddressRecords) - return nil -} - -// Sums this layer up nicely formatted -func (m *MLDv2MulticastListenerReportMessage) String() string { - return fmt.Sprintf( - "Number of Mcast Addr Records: %d (actual %d), Multicast Address Records: %+v", - m.NumberOfMulticastAddressRecords, - len(m.MulticastAddressRecords), - m.MulticastAddressRecords) -} - -// LayerType returns LayerTypeMLDv2MulticastListenerQuery. -func (*MLDv2MulticastListenerReportMessage) LayerType() gopacket.LayerType { - return LayerTypeMLDv2MulticastListenerReport -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (*MLDv2MulticastListenerReportMessage) CanDecode() gopacket.LayerClass { - return LayerTypeMLDv2MulticastListenerReport -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (*MLDv2MulticastListenerReportMessage) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -// MLDv2MulticastAddressRecordType holds the type of a -// Multicast Address Record, according to -// https://tools.ietf.org/html/rfc3810#section-5.2.5 and -// https://tools.ietf.org/html/rfc3810#section-5.2.12 -type MLDv2MulticastAddressRecordType uint8 - -const ( - // MLDv2MulticastAddressRecordTypeModeIsIncluded stands for - // MODE_IS_INCLUDE - indicates that the interface has a filter - // mode of INCLUDE for the specified multicast address. - MLDv2MulticastAddressRecordTypeModeIsIncluded MLDv2MulticastAddressRecordType = 1 - // MLDv2MulticastAddressRecordTypeModeIsExcluded stands for - // MODE_IS_EXCLUDE - indicates that the interface has a filter - // mode of EXCLUDE for the specified multicast address. - MLDv2MulticastAddressRecordTypeModeIsExcluded MLDv2MulticastAddressRecordType = 2 - // MLDv2MulticastAddressRecordTypeChangeToIncludeMode stands for - // CHANGE_TO_INCLUDE_MODE - indicates that the interface has - // changed to INCLUDE filter mode for the specified multicast - // address. - MLDv2MulticastAddressRecordTypeChangeToIncludeMode MLDv2MulticastAddressRecordType = 3 - // MLDv2MulticastAddressRecordTypeChangeToExcludeMode stands for - // CHANGE_TO_EXCLUDE_MODE - indicates that the interface has - // changed to EXCLUDE filter mode for the specified multicast - // address - MLDv2MulticastAddressRecordTypeChangeToExcludeMode MLDv2MulticastAddressRecordType = 4 - // MLDv2MulticastAddressRecordTypeAllowNewSources stands for - // ALLOW_NEW_SOURCES - indicates that the Source Address [i] - // fields in this Multicast Address Record contain a list of - // the additional sources that the node wishes to listen to, - // for packets sent to the specified multicast address. - MLDv2MulticastAddressRecordTypeAllowNewSources MLDv2MulticastAddressRecordType = 5 - // MLDv2MulticastAddressRecordTypeBlockOldSources stands for - // BLOCK_OLD_SOURCES - indicates that the Source Address [i] - // fields in this Multicast Address Record contain a list of - // the sources that the node no longer wishes to listen to, - // for packets sent to the specified multicast address. - MLDv2MulticastAddressRecordTypeBlockOldSources MLDv2MulticastAddressRecordType = 6 -) - -// Human readable record types -// Naming follows https://tools.ietf.org/html/rfc3810#section-5.2.12 -func (m MLDv2MulticastAddressRecordType) String() string { - switch m { - case MLDv2MulticastAddressRecordTypeModeIsIncluded: - return "MODE_IS_INCLUDE" - case MLDv2MulticastAddressRecordTypeModeIsExcluded: - return "MODE_IS_EXCLUDE" - case MLDv2MulticastAddressRecordTypeChangeToIncludeMode: - return "CHANGE_TO_INCLUDE_MODE" - case MLDv2MulticastAddressRecordTypeChangeToExcludeMode: - return "CHANGE_TO_EXCLUDE_MODE" - case MLDv2MulticastAddressRecordTypeAllowNewSources: - return "ALLOW_NEW_SOURCES" - case MLDv2MulticastAddressRecordTypeBlockOldSources: - return "BLOCK_OLD_SOURCES" - default: - return fmt.Sprintf("UNKNOWN(%d)", m) - } -} - -// MLDv2MulticastAddressRecord contains information on the sender listening to a -// single multicast address on the interface the report is sent. -// https://tools.ietf.org/html/rfc3810#section-5.2.4 -type MLDv2MulticastAddressRecord struct { - // 5.2.5. Record Type - RecordType MLDv2MulticastAddressRecordType - // 5.2.6. Auxiliary Data Length (number of 32-bit words) - AuxDataLen uint8 - // 5.2.7. Number Of Sources (N) - N uint16 - // 5.2.8. Multicast Address - MulticastAddress net.IP - // 5.2.9 Source Address [i] - SourceAddresses []net.IP - // 5.2.10 Auxiliary Data - AuxiliaryData []byte -} - -// decodes a multicast address record from bytes -func (m *MLDv2MulticastAddressRecord) decode(data []byte, df gopacket.DecodeFeedback) (int, error) { - if len(data) < 20 { - df.SetTruncated() - return 0, errors.New( - "Multicast Listener Report Message V2 layer less than 4 bytes for Multicast Address Record") - } - - m.RecordType = MLDv2MulticastAddressRecordType(data[0]) - m.AuxDataLen = data[1] - m.N = binary.BigEndian.Uint16(data[2:4]) - m.MulticastAddress = data[4:20] - - for i := uint16(0); i < m.N; i++ { - begin := 20 + (int(i) * 16) - end := begin + 16 - - if len(data) < end { - df.SetTruncated() - return begin, fmt.Errorf( - "Multicast Listener Report Message V2 layer less than %d bytes for Multicast Address Record", end) - } - - m.SourceAddresses = append(m.SourceAddresses, data[begin:end]) - } - - expectedLengthWithouAuxData := 20 + (int(m.N) * 16) - expectedTotalLength := (int(m.AuxDataLen) * 4) + expectedLengthWithouAuxData // *4 because AuxDataLen are 32bit words - if len(data) < expectedTotalLength { - return expectedLengthWithouAuxData, fmt.Errorf( - "Multicast Listener Report Message V2 layer less than %d bytes for Multicast Address Record", - expectedLengthWithouAuxData) - } - - m.AuxiliaryData = data[expectedLengthWithouAuxData:expectedTotalLength] - - return expectedTotalLength, nil -} - -// String sums this layer up nicely formatted -func (m *MLDv2MulticastAddressRecord) String() string { - return fmt.Sprintf( - "RecordType: %d (%s), AuxDataLen: %d [32-bit words], N: %d, Multicast Address: %s, SourceAddresses: %s, Auxiliary Data: %#x", - m.RecordType, - m.RecordType.String(), - m.AuxDataLen, - m.N, - m.MulticastAddress.To16(), - m.SourceAddresses, - m.AuxiliaryData) -} - -// serializes a multicast address record -func (m *MLDv2MulticastAddressRecord) serializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if err := m.serializeAuxiliaryDataTo(b, opts); err != nil { - return err - } - - if err := m.serializeSourceAddressesTo(b, opts); err != nil { - return err - } - - buf, err := b.PrependBytes(20) - if err != nil { - return err - } - - buf[0] = uint8(m.RecordType) - buf[1] = m.AuxDataLen - binary.BigEndian.PutUint16(buf[2:4], m.N) - - ma16 := m.MulticastAddress.To16() - if ma16 == nil { - return fmt.Errorf("invalid multicast address '%s'", m.MulticastAddress) - } - copy(buf[4:20], ma16) - - return nil -} - -// serializes the auxiliary data of a multicast address record -func (m *MLDv2MulticastAddressRecord) serializeAuxiliaryDataTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if remainder := len(m.AuxiliaryData) % 4; remainder != 0 { - zeroWord := []byte{0x0, 0x0, 0x0, 0x0} - m.AuxiliaryData = append(m.AuxiliaryData, zeroWord[:remainder]...) - } - - if opts.FixLengths { - auxDataLen := len(m.AuxiliaryData) / 4 - - if auxDataLen > math.MaxUint8 { - return fmt.Errorf("auxilary data is %d 32-bit words, but the maximum is 255 32-bit words", auxDataLen) - } - - m.AuxDataLen = uint8(auxDataLen) - } - - buf, err := b.PrependBytes(len(m.AuxiliaryData)) - if err != nil { - return err - } - - copy(buf, m.AuxiliaryData) - return nil -} - -// serializes the source addresses of a multicast address record preserving the order -func (m *MLDv2MulticastAddressRecord) serializeSourceAddressesTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if opts.FixLengths { - numberOfSourceAddresses := len(m.SourceAddresses) - - if numberOfSourceAddresses > math.MaxUint16 { - return fmt.Errorf( - "%d source addresses added, but the maximum is 65535", - numberOfSourceAddresses) - } - - m.N = uint16(numberOfSourceAddresses) - } - - lastItemIdx := len(m.SourceAddresses) - 1 - for k := range m.SourceAddresses { - i := lastItemIdx - k // reverse order - - buf, err := b.PrependBytes(16) - if err != nil { - return err - } - - sa16 := m.SourceAddresses[i].To16() - if sa16 == nil { - return fmt.Errorf("invalid source address [%d] '%s'", i, m.SourceAddresses[i]) - } - copy(buf, sa16) - } - - return nil -} - -func decodeMLDv2MulticastListenerReport(data []byte, p gopacket.PacketBuilder) error { - m := &MLDv2MulticastListenerReportMessage{} - return decodingLayerDecoder(m, data, p) -} - -func decodeMLDv2MulticastListenerQuery(data []byte, p gopacket.PacketBuilder) error { - m := &MLDv2MulticastListenerQueryMessage{} - return decodingLayerDecoder(m, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/modbustcp.go b/vendor/github.com/google/gopacket/layers/modbustcp.go deleted file mode 100644 index bafbd7436cd..00000000000 --- a/vendor/github.com/google/gopacket/layers/modbustcp.go +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright 2018, The GoPacket Authors, All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. -// -//****************************************************************************** - -package layers - -import ( - "encoding/binary" - "errors" - "github.com/google/gopacket" -) - -//****************************************************************************** -// -// ModbusTCP Decoding Layer -// ------------------------------------------ -// This file provides a GoPacket decoding layer for ModbusTCP. -// -//****************************************************************************** - -const mbapRecordSizeInBytes int = 7 -const modbusPDUMinimumRecordSizeInBytes int = 2 -const modbusPDUMaximumRecordSizeInBytes int = 253 - -// ModbusProtocol type -type ModbusProtocol uint16 - -// ModbusProtocol known values. -const ( - ModbusProtocolModbus ModbusProtocol = 0 -) - -func (mp ModbusProtocol) String() string { - switch mp { - default: - return "Unknown" - case ModbusProtocolModbus: - return "Modbus" - } -} - -//****************************************************************************** - -// ModbusTCP Type -// -------- -// Type ModbusTCP implements the DecodingLayer interface. Each ModbusTCP object -// represents in a structured form the MODBUS Application Protocol header (MBAP) record present as the TCP -// payload in an ModbusTCP TCP packet. -// -type ModbusTCP struct { - BaseLayer // Stores the packet bytes and payload (Modbus PDU) bytes . - - TransactionIdentifier uint16 // Identification of a MODBUS Request/Response transaction - ProtocolIdentifier ModbusProtocol // It is used for intra-system multiplexing - Length uint16 // Number of following bytes (includes 1 byte for UnitIdentifier + Modbus data length - UnitIdentifier uint8 // Identification of a remote slave connected on a serial line or on other buses -} - -//****************************************************************************** - -// LayerType returns the layer type of the ModbusTCP object, which is LayerTypeModbusTCP. -func (d *ModbusTCP) LayerType() gopacket.LayerType { - return LayerTypeModbusTCP -} - -//****************************************************************************** - -// decodeModbusTCP analyses a byte slice and attempts to decode it as an ModbusTCP -// record of a TCP packet. -// -// If it succeeds, it loads p with information about the packet and returns nil. -// If it fails, it returns an error (non nil). -// -// This function is employed in layertypes.go to register the ModbusTCP layer. -func decodeModbusTCP(data []byte, p gopacket.PacketBuilder) error { - - // Attempt to decode the byte slice. - d := &ModbusTCP{} - err := d.DecodeFromBytes(data, p) - if err != nil { - return err - } - // If the decoding worked, add the layer to the packet and set it - // as the application layer too, if there isn't already one. - p.AddLayer(d) - p.SetApplicationLayer(d) - - return p.NextDecoder(d.NextLayerType()) - -} - -//****************************************************************************** - -// DecodeFromBytes analyses a byte slice and attempts to decode it as an ModbusTCP -// record of a TCP packet. -// -// Upon succeeds, it loads the ModbusTCP object with information about the packet -// and returns nil. -// Upon failure, it returns an error (non nil). -func (d *ModbusTCP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - - // If the data block is too short to be a MBAP record, then return an error. - if len(data) < mbapRecordSizeInBytes+modbusPDUMinimumRecordSizeInBytes { - df.SetTruncated() - return errors.New("ModbusTCP packet too short") - } - - if len(data) > mbapRecordSizeInBytes+modbusPDUMaximumRecordSizeInBytes { - df.SetTruncated() - return errors.New("ModbusTCP packet too long") - } - - // ModbusTCP type embeds type BaseLayer which contains two fields: - // Contents is supposed to contain the bytes of the data at this level (MPBA). - // Payload is supposed to contain the payload of this level (PDU). - d.BaseLayer = BaseLayer{Contents: data[:mbapRecordSizeInBytes], Payload: data[mbapRecordSizeInBytes:len(data)]} - - // Extract the fields from the block of bytes. - // The fields can just be copied in big endian order. - d.TransactionIdentifier = binary.BigEndian.Uint16(data[:2]) - d.ProtocolIdentifier = ModbusProtocol(binary.BigEndian.Uint16(data[2:4])) - d.Length = binary.BigEndian.Uint16(data[4:6]) - - // Length should have the size of the payload plus one byte (size of UnitIdentifier) - if d.Length != uint16(len(d.BaseLayer.Payload)+1) { - df.SetTruncated() - return errors.New("ModbusTCP packet with wrong field value (Length)") - } - d.UnitIdentifier = uint8(data[6]) - - return nil -} - -//****************************************************************************** - -// NextLayerType returns the layer type of the ModbusTCP payload, which is LayerTypePayload. -func (d *ModbusTCP) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -//****************************************************************************** - -// Payload returns Modbus Protocol Data Unit (PDU) composed by Function Code and Data, it is carried within ModbusTCP packets -func (d *ModbusTCP) Payload() []byte { - return d.BaseLayer.Payload -} diff --git a/vendor/github.com/google/gopacket/layers/mpls.go b/vendor/github.com/google/gopacket/layers/mpls.go deleted file mode 100644 index 83079a09b72..00000000000 --- a/vendor/github.com/google/gopacket/layers/mpls.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "github.com/google/gopacket" -) - -// MPLS is the MPLS packet header. -type MPLS struct { - BaseLayer - Label uint32 - TrafficClass uint8 - StackBottom bool - TTL uint8 -} - -// LayerType returns gopacket.LayerTypeMPLS. -func (m *MPLS) LayerType() gopacket.LayerType { return LayerTypeMPLS } - -// ProtocolGuessingDecoder attempts to guess the protocol of the bytes it's -// given, then decode the packet accordingly. Its algorithm for guessing is: -// If the packet starts with byte 0x45-0x4F: IPv4 -// If the packet starts with byte 0x60-0x6F: IPv6 -// Otherwise: Error -// See draft-hsmit-isis-aal5mux-00.txt for more detail on this approach. -type ProtocolGuessingDecoder struct{} - -func (ProtocolGuessingDecoder) Decode(data []byte, p gopacket.PacketBuilder) error { - switch data[0] { - // 0x40 | header_len, where header_len is at least 5. - case 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f: - return decodeIPv4(data, p) - // IPv6 can start with any byte whose first 4 bits are 0x6. - case 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f: - return decodeIPv6(data, p) - } - return errors.New("Unable to guess protocol of packet data") -} - -// MPLSPayloadDecoder is the decoder used to data encapsulated by each MPLS -// layer. MPLS contains no type information, so we have to explicitly decide -// which decoder to use. This is initially set to ProtocolGuessingDecoder, our -// simple attempt at guessing protocols based on the first few bytes of data -// available to us. However, if you know that in your environment MPLS always -// encapsulates a specific protocol, you may reset this. -var MPLSPayloadDecoder gopacket.Decoder = ProtocolGuessingDecoder{} - -func decodeMPLS(data []byte, p gopacket.PacketBuilder) error { - decoded := binary.BigEndian.Uint32(data[:4]) - mpls := &MPLS{ - Label: decoded >> 12, - TrafficClass: uint8(decoded>>9) & 0x7, - StackBottom: decoded&0x100 != 0, - TTL: uint8(decoded), - BaseLayer: BaseLayer{data[:4], data[4:]}, - } - p.AddLayer(mpls) - if mpls.StackBottom { - return p.NextDecoder(MPLSPayloadDecoder) - } - return p.NextDecoder(gopacket.DecodeFunc(decodeMPLS)) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (m *MPLS) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(4) - if err != nil { - return err - } - encoded := m.Label << 12 - encoded |= uint32(m.TrafficClass) << 9 - encoded |= uint32(m.TTL) - if m.StackBottom { - encoded |= 0x100 - } - binary.BigEndian.PutUint32(bytes, encoded) - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/ndp.go b/vendor/github.com/google/gopacket/layers/ndp.go deleted file mode 100644 index f7ca1b26b78..00000000000 --- a/vendor/github.com/google/gopacket/layers/ndp.go +++ /dev/null @@ -1,611 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -// Enum types courtesy of... -// http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-ndp.c - -package layers - -import ( - "fmt" - "github.com/google/gopacket" - "net" -) - -type NDPChassisType uint8 - -// Nortel Chassis Types -const ( - NDPChassisother NDPChassisType = 1 - NDPChassis3000 NDPChassisType = 2 - NDPChassis3030 NDPChassisType = 3 - NDPChassis2310 NDPChassisType = 4 - NDPChassis2810 NDPChassisType = 5 - NDPChassis2912 NDPChassisType = 6 - NDPChassis2914 NDPChassisType = 7 - NDPChassis271x NDPChassisType = 8 - NDPChassis2813 NDPChassisType = 9 - NDPChassis2814 NDPChassisType = 10 - NDPChassis2915 NDPChassisType = 11 - NDPChassis5000 NDPChassisType = 12 - NDPChassis2813SA NDPChassisType = 13 - NDPChassis2814SA NDPChassisType = 14 - NDPChassis810M NDPChassisType = 15 - NDPChassisEthercell NDPChassisType = 16 - NDPChassis5005 NDPChassisType = 17 - NDPChassisAlcatelEWC NDPChassisType = 18 - NDPChassis2715SA NDPChassisType = 20 - NDPChassis2486 NDPChassisType = 21 - NDPChassis28000series NDPChassisType = 22 - NDPChassis23000series NDPChassisType = 23 - NDPChassis5DN00xseries NDPChassisType = 24 - NDPChassisBayStackEthernet NDPChassisType = 25 - NDPChassis23100series NDPChassisType = 26 - NDPChassis100BaseTHub NDPChassisType = 27 - NDPChassis3000FastEthernet NDPChassisType = 28 - NDPChassisOrionSwitch NDPChassisType = 29 - NDPChassisDDS NDPChassisType = 31 - NDPChassisCentillion6slot NDPChassisType = 32 - NDPChassisCentillion12slot NDPChassisType = 33 - NDPChassisCentillion1slot NDPChassisType = 34 - NDPChassisBayStack301 NDPChassisType = 35 - NDPChassisBayStackTokenRingHub NDPChassisType = 36 - NDPChassisFVCMultimediaSwitch NDPChassisType = 37 - NDPChassisSwitchNode NDPChassisType = 38 - NDPChassisBayStack302Switch NDPChassisType = 39 - NDPChassisBayStack350Switch NDPChassisType = 40 - NDPChassisBayStack150EthernetHub NDPChassisType = 41 - NDPChassisCentillion50NSwitch NDPChassisType = 42 - NDPChassisCentillion50TSwitch NDPChassisType = 43 - NDPChassisBayStack303304Switches NDPChassisType = 44 - NDPChassisBayStack200EthernetHub NDPChassisType = 45 - NDPChassisBayStack25010100EthernetHub NDPChassisType = 46 - NDPChassisBayStack450101001000Switches NDPChassisType = 48 - NDPChassisBayStack41010100Switches NDPChassisType = 49 - NDPChassisPassport1200L3Switch NDPChassisType = 50 - NDPChassisPassport1250L3Switch NDPChassisType = 51 - NDPChassisPassport1100L3Switch NDPChassisType = 52 - NDPChassisPassport1150L3Switch NDPChassisType = 53 - NDPChassisPassport1050L3Switch NDPChassisType = 54 - NDPChassisPassport1051L3Switch NDPChassisType = 55 - NDPChassisPassport8610L3Switch NDPChassisType = 56 - NDPChassisPassport8606L3Switch NDPChassisType = 57 - NDPChassisPassport8010 NDPChassisType = 58 - NDPChassisPassport8006 NDPChassisType = 59 - NDPChassisBayStack670wirelessaccesspoint NDPChassisType = 60 - NDPChassisPassport740 NDPChassisType = 61 - NDPChassisPassport750 NDPChassisType = 62 - NDPChassisPassport790 NDPChassisType = 63 - NDPChassisBusinessPolicySwitch200010100Switches NDPChassisType = 64 - NDPChassisPassport8110L2Switch NDPChassisType = 65 - NDPChassisPassport8106L2Switch NDPChassisType = 66 - NDPChassisBayStack3580GigSwitch NDPChassisType = 67 - NDPChassisBayStack10PowerSupplyUnit NDPChassisType = 68 - NDPChassisBayStack42010100Switch NDPChassisType = 69 - NDPChassisOPTeraMetro1200EthernetServiceModule NDPChassisType = 70 - NDPChassisOPTera8010co NDPChassisType = 71 - NDPChassisOPTera8610coL3Switch NDPChassisType = 72 - NDPChassisOPTera8110coL2Switch NDPChassisType = 73 - NDPChassisOPTera8003 NDPChassisType = 74 - NDPChassisOPTera8603L3Switch NDPChassisType = 75 - NDPChassisOPTera8103L2Switch NDPChassisType = 76 - NDPChassisBayStack380101001000Switch NDPChassisType = 77 - NDPChassisEthernetSwitch47048T NDPChassisType = 78 - NDPChassisOPTeraMetro1450EthernetServiceModule NDPChassisType = 79 - NDPChassisOPTeraMetro1400EthernetServiceModule NDPChassisType = 80 - NDPChassisAlteonSwitchFamily NDPChassisType = 81 - NDPChassisEthernetSwitch46024TPWR NDPChassisType = 82 - NDPChassisOPTeraMetro8010OPML2Switch NDPChassisType = 83 - NDPChassisOPTeraMetro8010coOPML2Switch NDPChassisType = 84 - NDPChassisOPTeraMetro8006OPML2Switch NDPChassisType = 85 - NDPChassisOPTeraMetro8003OPML2Switch NDPChassisType = 86 - NDPChassisAlteon180e NDPChassisType = 87 - NDPChassisAlteonAD3 NDPChassisType = 88 - NDPChassisAlteon184 NDPChassisType = 89 - NDPChassisAlteonAD4 NDPChassisType = 90 - NDPChassisPassport1424L3Switch NDPChassisType = 91 - NDPChassisPassport1648L3Switch NDPChassisType = 92 - NDPChassisPassport1612L3Switch NDPChassisType = 93 - NDPChassisPassport1624L3Switch NDPChassisType = 94 - NDPChassisBayStack38024FFiber1000Switch NDPChassisType = 95 - NDPChassisEthernetRoutingSwitch551024T NDPChassisType = 96 - NDPChassisEthernetRoutingSwitch551048T NDPChassisType = 97 - NDPChassisEthernetSwitch47024T NDPChassisType = 98 - NDPChassisNortelNetworksWirelessLANAccessPoint2220 NDPChassisType = 99 - NDPChassisPassportRBS2402L3Switch NDPChassisType = 100 - NDPChassisAlteonApplicationSwitch2424 NDPChassisType = 101 - NDPChassisAlteonApplicationSwitch2224 NDPChassisType = 102 - NDPChassisAlteonApplicationSwitch2208 NDPChassisType = 103 - NDPChassisAlteonApplicationSwitch2216 NDPChassisType = 104 - NDPChassisAlteonApplicationSwitch3408 NDPChassisType = 105 - NDPChassisAlteonApplicationSwitch3416 NDPChassisType = 106 - NDPChassisNortelNetworksWirelessLANSecuritySwitch2250 NDPChassisType = 107 - NDPChassisEthernetSwitch42548T NDPChassisType = 108 - NDPChassisEthernetSwitch42524T NDPChassisType = 109 - NDPChassisNortelNetworksWirelessLANAccessPoint2221 NDPChassisType = 110 - NDPChassisNortelMetroEthernetServiceUnit24TSPFswitch NDPChassisType = 111 - NDPChassisNortelMetroEthernetServiceUnit24TLXDCswitch NDPChassisType = 112 - NDPChassisPassport830010slotchassis NDPChassisType = 113 - NDPChassisPassport83006slotchassis NDPChassisType = 114 - NDPChassisEthernetRoutingSwitch552024TPWR NDPChassisType = 115 - NDPChassisEthernetRoutingSwitch552048TPWR NDPChassisType = 116 - NDPChassisNortelNetworksVPNGateway3050 NDPChassisType = 117 - NDPChassisAlteonSSL31010100 NDPChassisType = 118 - NDPChassisAlteonSSL31010100Fiber NDPChassisType = 119 - NDPChassisAlteonSSL31010100FIPS NDPChassisType = 120 - NDPChassisAlteonSSL410101001000 NDPChassisType = 121 - NDPChassisAlteonSSL410101001000Fiber NDPChassisType = 122 - NDPChassisAlteonApplicationSwitch2424SSL NDPChassisType = 123 - NDPChassisEthernetSwitch32524T NDPChassisType = 124 - NDPChassisEthernetSwitch32524G NDPChassisType = 125 - NDPChassisNortelNetworksWirelessLANAccessPoint2225 NDPChassisType = 126 - NDPChassisNortelNetworksWirelessLANSecuritySwitch2270 NDPChassisType = 127 - NDPChassis24portEthernetSwitch47024TPWR NDPChassisType = 128 - NDPChassis48portEthernetSwitch47048TPWR NDPChassisType = 129 - NDPChassisEthernetRoutingSwitch553024TFD NDPChassisType = 130 - NDPChassisEthernetSwitch351024T NDPChassisType = 131 - NDPChassisNortelMetroEthernetServiceUnit12GACL3Switch NDPChassisType = 132 - NDPChassisNortelMetroEthernetServiceUnit12GDCL3Switch NDPChassisType = 133 - NDPChassisNortelSecureAccessSwitch NDPChassisType = 134 - NDPChassisNortelNetworksVPNGateway3070 NDPChassisType = 135 - NDPChassisOPTeraMetro3500 NDPChassisType = 136 - NDPChassisSMBBES101024T NDPChassisType = 137 - NDPChassisSMBBES101048T NDPChassisType = 138 - NDPChassisSMBBES102024TPWR NDPChassisType = 139 - NDPChassisSMBBES102048TPWR NDPChassisType = 140 - NDPChassisSMBBES201024T NDPChassisType = 141 - NDPChassisSMBBES201048T NDPChassisType = 142 - NDPChassisSMBBES202024TPWR NDPChassisType = 143 - NDPChassisSMBBES202048TPWR NDPChassisType = 144 - NDPChassisSMBBES11024T NDPChassisType = 145 - NDPChassisSMBBES11048T NDPChassisType = 146 - NDPChassisSMBBES12024TPWR NDPChassisType = 147 - NDPChassisSMBBES12048TPWR NDPChassisType = 148 - NDPChassisSMBBES21024T NDPChassisType = 149 - NDPChassisSMBBES21048T NDPChassisType = 150 - NDPChassisSMBBES22024TPWR NDPChassisType = 151 - NDPChassisSMBBES22048TPWR NDPChassisType = 152 - NDPChassisOME6500 NDPChassisType = 153 - NDPChassisEthernetRoutingSwitch4548GT NDPChassisType = 154 - NDPChassisEthernetRoutingSwitch4548GTPWR NDPChassisType = 155 - NDPChassisEthernetRoutingSwitch4550T NDPChassisType = 156 - NDPChassisEthernetRoutingSwitch4550TPWR NDPChassisType = 157 - NDPChassisEthernetRoutingSwitch4526FX NDPChassisType = 158 - NDPChassisEthernetRoutingSwitch250026T NDPChassisType = 159 - NDPChassisEthernetRoutingSwitch250026TPWR NDPChassisType = 160 - NDPChassisEthernetRoutingSwitch250050T NDPChassisType = 161 - NDPChassisEthernetRoutingSwitch250050TPWR NDPChassisType = 162 -) - -type NDPBackplaneType uint8 - -// Nortel Backplane Types -const ( - NDPBackplaneOther NDPBackplaneType = 1 - NDPBackplaneEthernet NDPBackplaneType = 2 - NDPBackplaneEthernetTokenring NDPBackplaneType = 3 - NDPBackplaneEthernetFDDI NDPBackplaneType = 4 - NDPBackplaneEthernetTokenringFDDI NDPBackplaneType = 5 - NDPBackplaneEthernetTokenringRedundantPower NDPBackplaneType = 6 - NDPBackplaneEthernetTokenringFDDIRedundantPower NDPBackplaneType = 7 - NDPBackplaneTokenRing NDPBackplaneType = 8 - NDPBackplaneEthernetTokenringFastEthernet NDPBackplaneType = 9 - NDPBackplaneEthernetFastEthernet NDPBackplaneType = 10 - NDPBackplaneEthernetTokenringFastEthernetRedundantPower NDPBackplaneType = 11 - NDPBackplaneEthernetFastEthernetGigabitEthernet NDPBackplaneType = 12 -) - -type NDPState uint8 - -// Device State -const ( - NDPStateTopology NDPState = 1 - NDPStateHeartbeat NDPState = 2 - NDPStateNew NDPState = 3 -) - -// NortelDiscovery is a packet layer containing the Nortel Discovery Protocol. -type NortelDiscovery struct { - BaseLayer - IPAddress net.IP - SegmentID []byte - Chassis NDPChassisType - Backplane NDPBackplaneType - State NDPState - NumLinks uint8 -} - -// LayerType returns gopacket.LayerTypeNortelDiscovery. -func (c *NortelDiscovery) LayerType() gopacket.LayerType { - return LayerTypeNortelDiscovery -} - -func decodeNortelDiscovery(data []byte, p gopacket.PacketBuilder) error { - c := &NortelDiscovery{} - if len(data) < 11 { - return fmt.Errorf("Invalid NortelDiscovery packet length %d", len(data)) - } - c.IPAddress = data[0:4] - c.SegmentID = data[4:7] - c.Chassis = NDPChassisType(data[7]) - c.Backplane = NDPBackplaneType(data[8]) - c.State = NDPState(data[9]) - c.NumLinks = uint8(data[10]) - p.AddLayer(c) - return nil -} - -func (t NDPChassisType) String() (s string) { - switch t { - case NDPChassisother: - s = "other" - case NDPChassis3000: - s = "3000" - case NDPChassis3030: - s = "3030" - case NDPChassis2310: - s = "2310" - case NDPChassis2810: - s = "2810" - case NDPChassis2912: - s = "2912" - case NDPChassis2914: - s = "2914" - case NDPChassis271x: - s = "271x" - case NDPChassis2813: - s = "2813" - case NDPChassis2814: - s = "2814" - case NDPChassis2915: - s = "2915" - case NDPChassis5000: - s = "5000" - case NDPChassis2813SA: - s = "2813SA" - case NDPChassis2814SA: - s = "2814SA" - case NDPChassis810M: - s = "810M" - case NDPChassisEthercell: - s = "Ethercell" - case NDPChassis5005: - s = "5005" - case NDPChassisAlcatelEWC: - s = "Alcatel Ethernet workgroup conc." - case NDPChassis2715SA: - s = "2715SA" - case NDPChassis2486: - s = "2486" - case NDPChassis28000series: - s = "28000 series" - case NDPChassis23000series: - s = "23000 series" - case NDPChassis5DN00xseries: - s = "5DN00x series" - case NDPChassisBayStackEthernet: - s = "BayStack Ethernet" - case NDPChassis23100series: - s = "23100 series" - case NDPChassis100BaseTHub: - s = "100Base-T Hub" - case NDPChassis3000FastEthernet: - s = "3000 Fast Ethernet" - case NDPChassisOrionSwitch: - s = "Orion switch" - case NDPChassisDDS: - s = "DDS" - case NDPChassisCentillion6slot: - s = "Centillion (6 slot)" - case NDPChassisCentillion12slot: - s = "Centillion (12 slot)" - case NDPChassisCentillion1slot: - s = "Centillion (1 slot)" - case NDPChassisBayStack301: - s = "BayStack 301" - case NDPChassisBayStackTokenRingHub: - s = "BayStack TokenRing Hub" - case NDPChassisFVCMultimediaSwitch: - s = "FVC Multimedia Switch" - case NDPChassisSwitchNode: - s = "Switch Node" - case NDPChassisBayStack302Switch: - s = "BayStack 302 Switch" - case NDPChassisBayStack350Switch: - s = "BayStack 350 Switch" - case NDPChassisBayStack150EthernetHub: - s = "BayStack 150 Ethernet Hub" - case NDPChassisCentillion50NSwitch: - s = "Centillion 50N switch" - case NDPChassisCentillion50TSwitch: - s = "Centillion 50T switch" - case NDPChassisBayStack303304Switches: - s = "BayStack 303 and 304 Switches" - case NDPChassisBayStack200EthernetHub: - s = "BayStack 200 Ethernet Hub" - case NDPChassisBayStack25010100EthernetHub: - s = "BayStack 250 10/100 Ethernet Hub" - case NDPChassisBayStack450101001000Switches: - s = "BayStack 450 10/100/1000 Switches" - case NDPChassisBayStack41010100Switches: - s = "BayStack 410 10/100 Switches" - case NDPChassisPassport1200L3Switch: - s = "Passport 1200 L3 Switch" - case NDPChassisPassport1250L3Switch: - s = "Passport 1250 L3 Switch" - case NDPChassisPassport1100L3Switch: - s = "Passport 1100 L3 Switch" - case NDPChassisPassport1150L3Switch: - s = "Passport 1150 L3 Switch" - case NDPChassisPassport1050L3Switch: - s = "Passport 1050 L3 Switch" - case NDPChassisPassport1051L3Switch: - s = "Passport 1051 L3 Switch" - case NDPChassisPassport8610L3Switch: - s = "Passport 8610 L3 Switch" - case NDPChassisPassport8606L3Switch: - s = "Passport 8606 L3 Switch" - case NDPChassisPassport8010: - s = "Passport 8010" - case NDPChassisPassport8006: - s = "Passport 8006" - case NDPChassisBayStack670wirelessaccesspoint: - s = "BayStack 670 wireless access point" - case NDPChassisPassport740: - s = "Passport 740" - case NDPChassisPassport750: - s = "Passport 750" - case NDPChassisPassport790: - s = "Passport 790" - case NDPChassisBusinessPolicySwitch200010100Switches: - s = "Business Policy Switch 2000 10/100 Switches" - case NDPChassisPassport8110L2Switch: - s = "Passport 8110 L2 Switch" - case NDPChassisPassport8106L2Switch: - s = "Passport 8106 L2 Switch" - case NDPChassisBayStack3580GigSwitch: - s = "BayStack 3580 Gig Switch" - case NDPChassisBayStack10PowerSupplyUnit: - s = "BayStack 10 Power Supply Unit" - case NDPChassisBayStack42010100Switch: - s = "BayStack 420 10/100 Switch" - case NDPChassisOPTeraMetro1200EthernetServiceModule: - s = "OPTera Metro 1200 Ethernet Service Module" - case NDPChassisOPTera8010co: - s = "OPTera 8010co" - case NDPChassisOPTera8610coL3Switch: - s = "OPTera 8610co L3 switch" - case NDPChassisOPTera8110coL2Switch: - s = "OPTera 8110co L2 switch" - case NDPChassisOPTera8003: - s = "OPTera 8003" - case NDPChassisOPTera8603L3Switch: - s = "OPTera 8603 L3 switch" - case NDPChassisOPTera8103L2Switch: - s = "OPTera 8103 L2 switch" - case NDPChassisBayStack380101001000Switch: - s = "BayStack 380 10/100/1000 Switch" - case NDPChassisEthernetSwitch47048T: - s = "Ethernet Switch 470-48T" - case NDPChassisOPTeraMetro1450EthernetServiceModule: - s = "OPTera Metro 1450 Ethernet Service Module" - case NDPChassisOPTeraMetro1400EthernetServiceModule: - s = "OPTera Metro 1400 Ethernet Service Module" - case NDPChassisAlteonSwitchFamily: - s = "Alteon Switch Family" - case NDPChassisEthernetSwitch46024TPWR: - s = "Ethernet Switch 460-24T-PWR" - case NDPChassisOPTeraMetro8010OPML2Switch: - s = "OPTera Metro 8010 OPM L2 Switch" - case NDPChassisOPTeraMetro8010coOPML2Switch: - s = "OPTera Metro 8010co OPM L2 Switch" - case NDPChassisOPTeraMetro8006OPML2Switch: - s = "OPTera Metro 8006 OPM L2 Switch" - case NDPChassisOPTeraMetro8003OPML2Switch: - s = "OPTera Metro 8003 OPM L2 Switch" - case NDPChassisAlteon180e: - s = "Alteon 180e" - case NDPChassisAlteonAD3: - s = "Alteon AD3" - case NDPChassisAlteon184: - s = "Alteon 184" - case NDPChassisAlteonAD4: - s = "Alteon AD4" - case NDPChassisPassport1424L3Switch: - s = "Passport 1424 L3 switch" - case NDPChassisPassport1648L3Switch: - s = "Passport 1648 L3 switch" - case NDPChassisPassport1612L3Switch: - s = "Passport 1612 L3 switch" - case NDPChassisPassport1624L3Switch: - s = "Passport 1624 L3 switch" - case NDPChassisBayStack38024FFiber1000Switch: - s = "BayStack 380-24F Fiber 1000 Switch" - case NDPChassisEthernetRoutingSwitch551024T: - s = "Ethernet Routing Switch 5510-24T" - case NDPChassisEthernetRoutingSwitch551048T: - s = "Ethernet Routing Switch 5510-48T" - case NDPChassisEthernetSwitch47024T: - s = "Ethernet Switch 470-24T" - case NDPChassisNortelNetworksWirelessLANAccessPoint2220: - s = "Nortel Networks Wireless LAN Access Point 2220" - case NDPChassisPassportRBS2402L3Switch: - s = "Passport RBS 2402 L3 switch" - case NDPChassisAlteonApplicationSwitch2424: - s = "Alteon Application Switch 2424" - case NDPChassisAlteonApplicationSwitch2224: - s = "Alteon Application Switch 2224" - case NDPChassisAlteonApplicationSwitch2208: - s = "Alteon Application Switch 2208" - case NDPChassisAlteonApplicationSwitch2216: - s = "Alteon Application Switch 2216" - case NDPChassisAlteonApplicationSwitch3408: - s = "Alteon Application Switch 3408" - case NDPChassisAlteonApplicationSwitch3416: - s = "Alteon Application Switch 3416" - case NDPChassisNortelNetworksWirelessLANSecuritySwitch2250: - s = "Nortel Networks Wireless LAN SecuritySwitch 2250" - case NDPChassisEthernetSwitch42548T: - s = "Ethernet Switch 425-48T" - case NDPChassisEthernetSwitch42524T: - s = "Ethernet Switch 425-24T" - case NDPChassisNortelNetworksWirelessLANAccessPoint2221: - s = "Nortel Networks Wireless LAN Access Point 2221" - case NDPChassisNortelMetroEthernetServiceUnit24TSPFswitch: - s = "Nortel Metro Ethernet Service Unit 24-T SPF switch" - case NDPChassisNortelMetroEthernetServiceUnit24TLXDCswitch: - s = " Nortel Metro Ethernet Service Unit 24-T LX DC switch" - case NDPChassisPassport830010slotchassis: - s = "Passport 8300 10-slot chassis" - case NDPChassisPassport83006slotchassis: - s = "Passport 8300 6-slot chassis" - case NDPChassisEthernetRoutingSwitch552024TPWR: - s = "Ethernet Routing Switch 5520-24T-PWR" - case NDPChassisEthernetRoutingSwitch552048TPWR: - s = "Ethernet Routing Switch 5520-48T-PWR" - case NDPChassisNortelNetworksVPNGateway3050: - s = "Nortel Networks VPN Gateway 3050" - case NDPChassisAlteonSSL31010100: - s = "Alteon SSL 310 10/100" - case NDPChassisAlteonSSL31010100Fiber: - s = "Alteon SSL 310 10/100 Fiber" - case NDPChassisAlteonSSL31010100FIPS: - s = "Alteon SSL 310 10/100 FIPS" - case NDPChassisAlteonSSL410101001000: - s = "Alteon SSL 410 10/100/1000" - case NDPChassisAlteonSSL410101001000Fiber: - s = "Alteon SSL 410 10/100/1000 Fiber" - case NDPChassisAlteonApplicationSwitch2424SSL: - s = "Alteon Application Switch 2424-SSL" - case NDPChassisEthernetSwitch32524T: - s = "Ethernet Switch 325-24T" - case NDPChassisEthernetSwitch32524G: - s = "Ethernet Switch 325-24G" - case NDPChassisNortelNetworksWirelessLANAccessPoint2225: - s = "Nortel Networks Wireless LAN Access Point 2225" - case NDPChassisNortelNetworksWirelessLANSecuritySwitch2270: - s = "Nortel Networks Wireless LAN SecuritySwitch 2270" - case NDPChassis24portEthernetSwitch47024TPWR: - s = "24-port Ethernet Switch 470-24T-PWR" - case NDPChassis48portEthernetSwitch47048TPWR: - s = "48-port Ethernet Switch 470-48T-PWR" - case NDPChassisEthernetRoutingSwitch553024TFD: - s = "Ethernet Routing Switch 5530-24TFD" - case NDPChassisEthernetSwitch351024T: - s = "Ethernet Switch 3510-24T" - case NDPChassisNortelMetroEthernetServiceUnit12GACL3Switch: - s = "Nortel Metro Ethernet Service Unit 12G AC L3 switch" - case NDPChassisNortelMetroEthernetServiceUnit12GDCL3Switch: - s = "Nortel Metro Ethernet Service Unit 12G DC L3 switch" - case NDPChassisNortelSecureAccessSwitch: - s = "Nortel Secure Access Switch" - case NDPChassisNortelNetworksVPNGateway3070: - s = "Nortel Networks VPN Gateway 3070" - case NDPChassisOPTeraMetro3500: - s = "OPTera Metro 3500" - case NDPChassisSMBBES101024T: - s = "SMB BES 1010 24T" - case NDPChassisSMBBES101048T: - s = "SMB BES 1010 48T" - case NDPChassisSMBBES102024TPWR: - s = "SMB BES 1020 24T PWR" - case NDPChassisSMBBES102048TPWR: - s = "SMB BES 1020 48T PWR" - case NDPChassisSMBBES201024T: - s = "SMB BES 2010 24T" - case NDPChassisSMBBES201048T: - s = "SMB BES 2010 48T" - case NDPChassisSMBBES202024TPWR: - s = "SMB BES 2020 24T PWR" - case NDPChassisSMBBES202048TPWR: - s = "SMB BES 2020 48T PWR" - case NDPChassisSMBBES11024T: - s = "SMB BES 110 24T" - case NDPChassisSMBBES11048T: - s = "SMB BES 110 48T" - case NDPChassisSMBBES12024TPWR: - s = "SMB BES 120 24T PWR" - case NDPChassisSMBBES12048TPWR: - s = "SMB BES 120 48T PWR" - case NDPChassisSMBBES21024T: - s = "SMB BES 210 24T" - case NDPChassisSMBBES21048T: - s = "SMB BES 210 48T" - case NDPChassisSMBBES22024TPWR: - s = "SMB BES 220 24T PWR" - case NDPChassisSMBBES22048TPWR: - s = "SMB BES 220 48T PWR" - case NDPChassisOME6500: - s = "OME 6500" - case NDPChassisEthernetRoutingSwitch4548GT: - s = "Ethernet Routing Switch 4548GT" - case NDPChassisEthernetRoutingSwitch4548GTPWR: - s = "Ethernet Routing Switch 4548GT-PWR" - case NDPChassisEthernetRoutingSwitch4550T: - s = "Ethernet Routing Switch 4550T" - case NDPChassisEthernetRoutingSwitch4550TPWR: - s = "Ethernet Routing Switch 4550T-PWR" - case NDPChassisEthernetRoutingSwitch4526FX: - s = "Ethernet Routing Switch 4526FX" - case NDPChassisEthernetRoutingSwitch250026T: - s = "Ethernet Routing Switch 2500-26T" - case NDPChassisEthernetRoutingSwitch250026TPWR: - s = "Ethernet Routing Switch 2500-26T-PWR" - case NDPChassisEthernetRoutingSwitch250050T: - s = "Ethernet Routing Switch 2500-50T" - case NDPChassisEthernetRoutingSwitch250050TPWR: - s = "Ethernet Routing Switch 2500-50T-PWR" - default: - s = "Unknown" - } - return -} - -func (t NDPBackplaneType) String() (s string) { - switch t { - case NDPBackplaneOther: - s = "Other" - case NDPBackplaneEthernet: - s = "Ethernet" - case NDPBackplaneEthernetTokenring: - s = "Ethernet and Tokenring" - case NDPBackplaneEthernetFDDI: - s = "Ethernet and FDDI" - case NDPBackplaneEthernetTokenringFDDI: - s = "Ethernet, Tokenring and FDDI" - case NDPBackplaneEthernetTokenringRedundantPower: - s = "Ethernet and Tokenring with redundant power" - case NDPBackplaneEthernetTokenringFDDIRedundantPower: - s = "Ethernet, Tokenring, FDDI with redundant power" - case NDPBackplaneTokenRing: - s = "Token Ring" - case NDPBackplaneEthernetTokenringFastEthernet: - s = "Ethernet, Tokenring and Fast Ethernet" - case NDPBackplaneEthernetFastEthernet: - s = "Ethernet and Fast Ethernet" - case NDPBackplaneEthernetTokenringFastEthernetRedundantPower: - s = "Ethernet, Tokenring, Fast Ethernet with redundant power" - case NDPBackplaneEthernetFastEthernetGigabitEthernet: - s = "Ethernet, Fast Ethernet and Gigabit Ethernet" - default: - s = "Unknown" - } - return -} - -func (t NDPState) String() (s string) { - switch t { - case NDPStateTopology: - s = "Topology Change" - case NDPStateHeartbeat: - s = "Heartbeat" - case NDPStateNew: - s = "New" - default: - s = "Unknown" - } - return -} diff --git a/vendor/github.com/google/gopacket/layers/ntp.go b/vendor/github.com/google/gopacket/layers/ntp.go deleted file mode 100644 index 33c15b3b39f..00000000000 --- a/vendor/github.com/google/gopacket/layers/ntp.go +++ /dev/null @@ -1,416 +0,0 @@ -// Copyright 2016 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. -// -//****************************************************************************** - -package layers - -import ( - "encoding/binary" - "errors" - - "github.com/google/gopacket" -) - -//****************************************************************************** -// -// Network Time Protocol (NTP) Decoding Layer -// ------------------------------------------ -// This file provides a GoPacket decoding layer for NTP. -// -//****************************************************************************** -// -// About The Network Time Protocol (NTP) -// ------------------------------------- -// NTP is a protocol that enables computers on the internet to set their -// clocks to the correct time (or to a time that is acceptably close to the -// correct time). NTP runs on top of UDP. -// -// There have been a series of versions of the NTP protocol. The latest -// version is V4 and is specified in RFC 5905: -// http://www.ietf.org/rfc/rfc5905.txt -// -//****************************************************************************** -// -// References -// ---------- -// -// Wikipedia's NTP entry: -// https://en.wikipedia.org/wiki/Network_Time_Protocol -// This is the best place to get an overview of NTP. -// -// Network Time Protocol Home Website: -// http://www.ntp.org/ -// This appears to be the official website of NTP. -// -// List of current NTP Protocol RFCs: -// http://www.ntp.org/rfc.html -// -// RFC 958: "Network Time Protocol (NTP)" (1985) -// https://tools.ietf.org/html/rfc958 -// This is the original NTP specification. -// -// RFC 1305: "Network Time Protocol (Version 3) Specification, Implementation and Analysis" (1992) -// https://tools.ietf.org/html/rfc1305 -// The protocol was updated in 1992 yielding NTP V3. -// -// RFC 5905: "Network Time Protocol Version 4: Protocol and Algorithms Specification" (2010) -// https://www.ietf.org/rfc/rfc5905.txt -// The protocol was updated in 2010 yielding NTP V4. -// V4 is backwards compatible with all previous versions of NTP. -// -// RFC 5906: "Network Time Protocol Version 4: Autokey Specification" -// https://tools.ietf.org/html/rfc5906 -// This document addresses the security of the NTP protocol -// and is probably not relevant to this package. -// -// RFC 5907: "Definitions of Managed Objects for Network Time Protocol Version 4 (NTPv4)" -// https://tools.ietf.org/html/rfc5907 -// This document addresses the management of NTP servers and -// is probably not relevant to this package. -// -// RFC 5908: "Network Time Protocol (NTP) Server Option for DHCPv6" -// https://tools.ietf.org/html/rfc5908 -// This document addresses the use of NTP in DHCPv6 and is -// probably not relevant to this package. -// -// "Let's make a NTP Client in C" -// https://lettier.github.io/posts/2016-04-26-lets-make-a-ntp-client-in-c.html -// This web page contains useful information about the details of NTP, -// including an NTP record struture in C, and C code. -// -// "NTP Packet Header (NTP Reference Implementation) (Computer Network Time Synchronization)" -// http://what-when-how.com/computer-network-time-synchronization/ -// ntp-packet-header-ntp-reference-implementation-computer-network-time-synchronization/ -// This web page contains useful information on the details of NTP. -// -// "Technical information - NTP Data Packet" -// https://www.meinbergglobal.com/english/info/ntp-packet.htm -// This page has a helpful diagram of an NTP V4 packet. -// -//****************************************************************************** -// -// Obsolete References -// ------------------- -// -// RFC 1119: "RFC-1119 "Network Time Protocol (Version 2) Specification and Implementation" (1989) -// https://tools.ietf.org/html/rfc1119 -// Version 2 was drafted in 1989. -// It is unclear whether V2 was ever implememented or whether the -// ideas ended up in V3 (which was implemented in 1992). -// -// RFC 1361: "Simple Network Time Protocol (SNTP)" -// https://tools.ietf.org/html/rfc1361 -// This document is obsoleted by RFC 1769 and is included only for completeness. -// -// RFC 1769: "Simple Network Time Protocol (SNTP)" -// https://tools.ietf.org/html/rfc1769 -// This document is obsoleted by RFC 2030 and RFC 4330 and is included only for completeness. -// -// RFC 2030: "Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI" -// https://tools.ietf.org/html/rfc2030 -// This document is obsoleted by RFC 4330 and is included only for completeness. -// -// RFC 4330: "Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI" -// https://tools.ietf.org/html/rfc4330 -// This document is obsoleted by RFC 5905 and is included only for completeness. -// -//****************************************************************************** -// -// Endian And Bit Numbering Issues -// ------------------------------- -// -// Endian and bit numbering issues can be confusing. Here is some -// clarification: -// -// ENDIAN: Values are sent big endian. -// https://en.wikipedia.org/wiki/Endianness -// -// BIT NUMBERING: Bits are numbered 0 upwards from the most significant -// bit to the least significant bit. This means that if there is a 32-bit -// value, the most significant bit is called bit 0 and the least -// significant bit is called bit 31. -// -// See RFC 791 Appendix B for more discussion. -// -//****************************************************************************** -// -// NTP V3 and V4 Packet Format -// --------------------------- -// NTP packets are UDP packets whose payload contains an NTP record. -// -// The NTP RFC defines the format of the NTP record. -// -// There have been four versions of the protocol: -// -// V1 in 1985 -// V2 in 1989 -// V3 in 1992 -// V4 in 2010 -// -// It is clear that V1 and V2 are obsolete, and there is no need to -// cater for these formats. -// -// V3 and V4 essentially use the same format, with V4 adding some optional -// fields on the end. So this package supports the V3 and V4 formats. -// -// The current version of NTP (NTP V4)'s RFC (V4 - RFC 5905) contains -// the following diagram for the NTP record format: - -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// |LI | VN |Mode | Stratum | Poll | Precision | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Root Delay | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Root Dispersion | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Reference ID | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | | -// + Reference Timestamp (64) + -// | | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | | -// + Origin Timestamp (64) + -// | | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | | -// + Receive Timestamp (64) + -// | | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | | -// + Transmit Timestamp (64) + -// | | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | | -// . . -// . Extension Field 1 (variable) . -// . . -// | | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | | -// . . -// . Extension Field 2 (variable) . -// . . -// | | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | Key Identifier | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | | -// | dgst (128) | -// | | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// From http://www.ietf.org/rfc/rfc5905.txt -// -// The fields "Extension Field 1 (variable)" and later are optional fields, -// and so we can set a minimum NTP record size of 48 bytes. -// -const ntpMinimumRecordSizeInBytes int = 48 - -//****************************************************************************** - -// NTP Type -// -------- -// Type NTP implements the DecodingLayer interface. Each NTP object -// represents in a structured form the NTP record present as the UDP -// payload in an NTP UDP packet. -// - -type NTPLeapIndicator uint8 -type NTPVersion uint8 -type NTPMode uint8 -type NTPStratum uint8 -type NTPLog2Seconds int8 -type NTPFixed16Seconds uint32 -type NTPReferenceID uint32 -type NTPTimestamp uint64 - -type NTP struct { - BaseLayer // Stores the packet bytes and payload bytes. - - LeapIndicator NTPLeapIndicator // [0,3]. Indicates whether leap second(s) is to be added. - Version NTPVersion // [0,7]. Version of the NTP protocol. - Mode NTPMode // [0,7]. Mode. - Stratum NTPStratum // [0,255]. Stratum of time server in the server tree. - Poll NTPLog2Seconds // [-128,127]. The maximum interval between successive messages, in log2 seconds. - Precision NTPLog2Seconds // [-128,127]. The precision of the system clock, in log2 seconds. - RootDelay NTPFixed16Seconds // [0,2^32-1]. Total round trip delay to the reference clock in seconds times 2^16. - RootDispersion NTPFixed16Seconds // [0,2^32-1]. Total dispersion to the reference clock, in seconds times 2^16. - ReferenceID NTPReferenceID // ID code of reference clock [0,2^32-1]. - ReferenceTimestamp NTPTimestamp // Most recent timestamp from the reference clock. - OriginTimestamp NTPTimestamp // Local time when request was sent from local host. - ReceiveTimestamp NTPTimestamp // Local time (on server) that request arrived at server host. - TransmitTimestamp NTPTimestamp // Local time (on server) that request departed server host. - - // FIX: This package should analyse the extension fields and represent the extension fields too. - ExtensionBytes []byte // Just put extensions in a byte slice. -} - -//****************************************************************************** - -// LayerType returns the layer type of the NTP object, which is LayerTypeNTP. -func (d *NTP) LayerType() gopacket.LayerType { - return LayerTypeNTP -} - -//****************************************************************************** - -// decodeNTP analyses a byte slice and attempts to decode it as an NTP -// record of a UDP packet. -// -// If it succeeds, it loads p with information about the packet and returns nil. -// If it fails, it returns an error (non nil). -// -// This function is employed in layertypes.go to register the NTP layer. -func decodeNTP(data []byte, p gopacket.PacketBuilder) error { - - // Attempt to decode the byte slice. - d := &NTP{} - err := d.DecodeFromBytes(data, p) - if err != nil { - return err - } - - // If the decoding worked, add the layer to the packet and set it - // as the application layer too, if there isn't already one. - p.AddLayer(d) - p.SetApplicationLayer(d) - - return nil -} - -//****************************************************************************** - -// DecodeFromBytes analyses a byte slice and attempts to decode it as an NTP -// record of a UDP packet. -// -// Upon succeeds, it loads the NTP object with information about the packet -// and returns nil. -// Upon failure, it returns an error (non nil). -func (d *NTP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - - // If the data block is too short to be a NTP record, then return an error. - if len(data) < ntpMinimumRecordSizeInBytes { - df.SetTruncated() - return errors.New("NTP packet too short") - } - - // RFC 5905 does not appear to define a maximum NTP record length. - // The protocol allows "extension fields" to be included in the record, - // and states about these fields:" - // - // "While the minimum field length containing required fields is - // four words (16 octets), a maximum field length remains to be - // established." - // - // For this reason, the packet length is not checked here for being too long. - - // NTP type embeds type BaseLayer which contains two fields: - // Contents is supposed to contain the bytes of the data at this level. - // Payload is supposed to contain the payload of this level. - // Here we set the baselayer to be the bytes of the NTP record. - d.BaseLayer = BaseLayer{Contents: data[:len(data)]} - - // Extract the fields from the block of bytes. - // To make sense of this, refer to the packet diagram - // above and the section on endian conventions. - - // The first few fields are all packed into the first 32 bits. Unpack them. - f := data[0] - d.LeapIndicator = NTPLeapIndicator((f & 0xC0) >> 6) - d.Version = NTPVersion((f & 0x38) >> 3) - d.Mode = NTPMode(f & 0x07) - d.Stratum = NTPStratum(data[1]) - d.Poll = NTPLog2Seconds(data[2]) - d.Precision = NTPLog2Seconds(data[3]) - - // The remaining fields can just be copied in big endian order. - d.RootDelay = NTPFixed16Seconds(binary.BigEndian.Uint32(data[4:8])) - d.RootDispersion = NTPFixed16Seconds(binary.BigEndian.Uint32(data[8:12])) - d.ReferenceID = NTPReferenceID(binary.BigEndian.Uint32(data[12:16])) - d.ReferenceTimestamp = NTPTimestamp(binary.BigEndian.Uint64(data[16:24])) - d.OriginTimestamp = NTPTimestamp(binary.BigEndian.Uint64(data[24:32])) - d.ReceiveTimestamp = NTPTimestamp(binary.BigEndian.Uint64(data[32:40])) - d.TransmitTimestamp = NTPTimestamp(binary.BigEndian.Uint64(data[40:48])) - - // This layer does not attempt to analyse the extension bytes. - // But if there are any, we'd like the user to know. So we just - // place them all in an ExtensionBytes field. - d.ExtensionBytes = data[48:] - - // Return no error. - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (d *NTP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - data, err := b.PrependBytes(ntpMinimumRecordSizeInBytes) - if err != nil { - return err - } - - // Pack the first few fields into the first 32 bits. - h := uint8(0) - h |= (uint8(d.LeapIndicator) << 6) & 0xC0 - h |= (uint8(d.Version) << 3) & 0x38 - h |= (uint8(d.Mode)) & 0x07 - data[0] = byte(h) - data[1] = byte(d.Stratum) - data[2] = byte(d.Poll) - data[3] = byte(d.Precision) - - // The remaining fields can just be copied in big endian order. - binary.BigEndian.PutUint32(data[4:8], uint32(d.RootDelay)) - binary.BigEndian.PutUint32(data[8:12], uint32(d.RootDispersion)) - binary.BigEndian.PutUint32(data[12:16], uint32(d.ReferenceID)) - binary.BigEndian.PutUint64(data[16:24], uint64(d.ReferenceTimestamp)) - binary.BigEndian.PutUint64(data[24:32], uint64(d.OriginTimestamp)) - binary.BigEndian.PutUint64(data[32:40], uint64(d.ReceiveTimestamp)) - binary.BigEndian.PutUint64(data[40:48], uint64(d.TransmitTimestamp)) - - ex, err := b.AppendBytes(len(d.ExtensionBytes)) - if err != nil { - return err - } - copy(ex, d.ExtensionBytes) - - return nil -} - -//****************************************************************************** - -// CanDecode returns a set of layers that NTP objects can decode. -// As NTP objects can only decide the NTP layer, we can return just that layer. -// Apparently a single layer type implements LayerClass. -func (d *NTP) CanDecode() gopacket.LayerClass { - return LayerTypeNTP -} - -//****************************************************************************** - -// NextLayerType specifies the next layer that GoPacket should attempt to -// analyse after this (NTP) layer. As NTP packets do not contain any payload -// bytes, there are no further layers to analyse. -func (d *NTP) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypeZero -} - -//****************************************************************************** - -// NTP packets do not carry any data payload, so the empty byte slice is retured. -// In Go, a nil slice is functionally identical to an empty slice, so we -// return nil to avoid a heap allocation. -func (d *NTP) Payload() []byte { - return nil -} - -//****************************************************************************** -//* End Of NTP File * -//****************************************************************************** diff --git a/vendor/github.com/google/gopacket/layers/ospf.go b/vendor/github.com/google/gopacket/layers/ospf.go deleted file mode 100644 index 4f5473d065b..00000000000 --- a/vendor/github.com/google/gopacket/layers/ospf.go +++ /dev/null @@ -1,715 +0,0 @@ -// Copyright 2017 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - - "github.com/google/gopacket" -) - -// OSPFType denotes what kind of OSPF type it is -type OSPFType uint8 - -// Potential values for OSPF.Type. -const ( - OSPFHello OSPFType = 1 - OSPFDatabaseDescription OSPFType = 2 - OSPFLinkStateRequest OSPFType = 3 - OSPFLinkStateUpdate OSPFType = 4 - OSPFLinkStateAcknowledgment OSPFType = 5 -) - -// LSA Function Codes for LSAheader.LSType -const ( - RouterLSAtypeV2 = 0x1 - RouterLSAtype = 0x2001 - NetworkLSAtypeV2 = 0x2 - NetworkLSAtype = 0x2002 - SummaryLSANetworktypeV2 = 0x3 - InterAreaPrefixLSAtype = 0x2003 - SummaryLSAASBRtypeV2 = 0x4 - InterAreaRouterLSAtype = 0x2004 - ASExternalLSAtypeV2 = 0x5 - ASExternalLSAtype = 0x4005 - NSSALSAtype = 0x2007 - NSSALSAtypeV2 = 0x7 - LinkLSAtype = 0x0008 - IntraAreaPrefixLSAtype = 0x2009 -) - -// String conversions for OSPFType -func (i OSPFType) String() string { - switch i { - case OSPFHello: - return "Hello" - case OSPFDatabaseDescription: - return "Database Description" - case OSPFLinkStateRequest: - return "Link State Request" - case OSPFLinkStateUpdate: - return "Link State Update" - case OSPFLinkStateAcknowledgment: - return "Link State Acknowledgment" - default: - return "" - } -} - -// Prefix extends IntraAreaPrefixLSA -type Prefix struct { - PrefixLength uint8 - PrefixOptions uint8 - Metric uint16 - AddressPrefix []byte -} - -// IntraAreaPrefixLSA is the struct from RFC 5340 A.4.10. -type IntraAreaPrefixLSA struct { - NumOfPrefixes uint16 - RefLSType uint16 - RefLinkStateID uint32 - RefAdvRouter uint32 - Prefixes []Prefix -} - -// LinkLSA is the struct from RFC 5340 A.4.9. -type LinkLSA struct { - RtrPriority uint8 - Options uint32 - LinkLocalAddress []byte - NumOfPrefixes uint32 - Prefixes []Prefix -} - -// ASExternalLSAV2 is the struct from RFC 2328 A.4.5. -type ASExternalLSAV2 struct { - NetworkMask uint32 - ExternalBit uint8 - Metric uint32 - ForwardingAddress uint32 - ExternalRouteTag uint32 -} - -// ASExternalLSA is the struct from RFC 5340 A.4.7. -type ASExternalLSA struct { - Flags uint8 - Metric uint32 - PrefixLength uint8 - PrefixOptions uint8 - RefLSType uint16 - AddressPrefix []byte - ForwardingAddress []byte - ExternalRouteTag uint32 - RefLinkStateID uint32 -} - -// InterAreaRouterLSA is the struct from RFC 5340 A.4.6. -type InterAreaRouterLSA struct { - Options uint32 - Metric uint32 - DestinationRouterID uint32 -} - -// InterAreaPrefixLSA is the struct from RFC 5340 A.4.5. -type InterAreaPrefixLSA struct { - Metric uint32 - PrefixLength uint8 - PrefixOptions uint8 - AddressPrefix []byte -} - -// NetworkLSA is the struct from RFC 5340 A.4.4. -type NetworkLSA struct { - Options uint32 - AttachedRouter []uint32 -} - -// NetworkLSAV2 is the struct from RFC 2328 A.4.3. -type NetworkLSAV2 struct { - NetworkMask uint32 - AttachedRouter []uint32 -} - -// RouterV2 extends RouterLSAV2 -type RouterV2 struct { - Type uint8 - LinkID uint32 - LinkData uint32 - Metric uint16 -} - -// RouterLSAV2 is the struct from RFC 2328 A.4.2. -type RouterLSAV2 struct { - Flags uint8 - Links uint16 - Routers []RouterV2 -} - -// Router extends RouterLSA -type Router struct { - Type uint8 - Metric uint16 - InterfaceID uint32 - NeighborInterfaceID uint32 - NeighborRouterID uint32 -} - -// RouterLSA is the struct from RFC 5340 A.4.3. -type RouterLSA struct { - Flags uint8 - Options uint32 - Routers []Router -} - -// LSAheader is the struct from RFC 5340 A.4.2 and RFC 2328 A.4.1. -type LSAheader struct { - LSAge uint16 - LSType uint16 - LinkStateID uint32 - AdvRouter uint32 - LSSeqNumber uint32 - LSChecksum uint16 - Length uint16 - LSOptions uint8 -} - -// LSA links LSAheader with the structs from RFC 5340 A.4. -type LSA struct { - LSAheader - Content interface{} -} - -// LSUpdate is the struct from RFC 5340 A.3.5. -type LSUpdate struct { - NumOfLSAs uint32 - LSAs []LSA -} - -// LSReq is the struct from RFC 5340 A.3.4. -type LSReq struct { - LSType uint16 - LSID uint32 - AdvRouter uint32 -} - -// DbDescPkg is the struct from RFC 5340 A.3.3. -type DbDescPkg struct { - Options uint32 - InterfaceMTU uint16 - Flags uint16 - DDSeqNumber uint32 - LSAinfo []LSAheader -} - -// HelloPkg is the struct from RFC 5340 A.3.2. -type HelloPkg struct { - InterfaceID uint32 - RtrPriority uint8 - Options uint32 - HelloInterval uint16 - RouterDeadInterval uint32 - DesignatedRouterID uint32 - BackupDesignatedRouterID uint32 - NeighborID []uint32 -} - -// HelloPkgV2 extends the HelloPkg struct with OSPFv2 information -type HelloPkgV2 struct { - HelloPkg - NetworkMask uint32 -} - -// OSPF is a basic OSPF packet header with common fields of Version 2 and Version 3. -type OSPF struct { - Version uint8 - Type OSPFType - PacketLength uint16 - RouterID uint32 - AreaID uint32 - Checksum uint16 - Content interface{} -} - -//OSPFv2 extend the OSPF head with version 2 specific fields -type OSPFv2 struct { - BaseLayer - OSPF - AuType uint16 - Authentication uint64 -} - -// OSPFv3 extend the OSPF head with version 3 specific fields -type OSPFv3 struct { - BaseLayer - OSPF - Instance uint8 - Reserved uint8 -} - -// getLSAsv2 parses the LSA information from the packet for OSPFv2 -func getLSAsv2(num uint32, data []byte) ([]LSA, error) { - var lsas []LSA - var i uint32 = 0 - var offset uint32 = 0 - for ; i < num; i++ { - lstype := uint16(data[offset+3]) - lsalength := binary.BigEndian.Uint16(data[offset+18 : offset+20]) - content, err := extractLSAInformation(lstype, lsalength, data[offset:]) - if err != nil { - return nil, fmt.Errorf("Could not extract Link State type.") - } - lsa := LSA{ - LSAheader: LSAheader{ - LSAge: binary.BigEndian.Uint16(data[offset : offset+2]), - LSOptions: data[offset+2], - LSType: lstype, - LinkStateID: binary.BigEndian.Uint32(data[offset+4 : offset+8]), - AdvRouter: binary.BigEndian.Uint32(data[offset+8 : offset+12]), - LSSeqNumber: binary.BigEndian.Uint32(data[offset+12 : offset+16]), - LSChecksum: binary.BigEndian.Uint16(data[offset+16 : offset+18]), - Length: lsalength, - }, - Content: content, - } - lsas = append(lsas, lsa) - offset += uint32(lsalength) - } - return lsas, nil -} - -// extractLSAInformation extracts all the LSA information -func extractLSAInformation(lstype, lsalength uint16, data []byte) (interface{}, error) { - if lsalength < 20 { - return nil, fmt.Errorf("Link State header length %v too short, %v required", lsalength, 20) - } - if len(data) < int(lsalength) { - return nil, fmt.Errorf("Link State header length %v too short, %v required", len(data), lsalength) - } - var content interface{} - switch lstype { - case RouterLSAtypeV2: - var routers []RouterV2 - var j uint32 - for j = 24; j < uint32(lsalength); j += 12 { - if len(data) < int(j+12) { - return nil, errors.New("LSAtypeV2 too small") - } - router := RouterV2{ - LinkID: binary.BigEndian.Uint32(data[j : j+4]), - LinkData: binary.BigEndian.Uint32(data[j+4 : j+8]), - Type: uint8(data[j+8]), - Metric: binary.BigEndian.Uint16(data[j+10 : j+12]), - } - routers = append(routers, router) - } - if len(data) < 24 { - return nil, errors.New("LSAtypeV2 too small") - } - links := binary.BigEndian.Uint16(data[22:24]) - content = RouterLSAV2{ - Flags: data[20], - Links: links, - Routers: routers, - } - case NSSALSAtypeV2: - fallthrough - case ASExternalLSAtypeV2: - content = ASExternalLSAV2{ - NetworkMask: binary.BigEndian.Uint32(data[20:24]), - ExternalBit: data[24] & 0x80, - Metric: binary.BigEndian.Uint32(data[24:28]) & 0x00FFFFFF, - ForwardingAddress: binary.BigEndian.Uint32(data[28:32]), - ExternalRouteTag: binary.BigEndian.Uint32(data[32:36]), - } - case NetworkLSAtypeV2: - var routers []uint32 - var j uint32 - for j = 24; j < uint32(lsalength); j += 4 { - routers = append(routers, binary.BigEndian.Uint32(data[j:j+4])) - } - content = NetworkLSAV2{ - NetworkMask: binary.BigEndian.Uint32(data[20:24]), - AttachedRouter: routers, - } - case RouterLSAtype: - var routers []Router - var j uint32 - for j = 24; j < uint32(lsalength); j += 16 { - router := Router{ - Type: uint8(data[j]), - Metric: binary.BigEndian.Uint16(data[j+2 : j+4]), - InterfaceID: binary.BigEndian.Uint32(data[j+4 : j+8]), - NeighborInterfaceID: binary.BigEndian.Uint32(data[j+8 : j+12]), - NeighborRouterID: binary.BigEndian.Uint32(data[j+12 : j+16]), - } - routers = append(routers, router) - } - content = RouterLSA{ - Flags: uint8(data[20]), - Options: binary.BigEndian.Uint32(data[20:24]) & 0x00FFFFFF, - Routers: routers, - } - case NetworkLSAtype: - var routers []uint32 - var j uint32 - for j = 24; j < uint32(lsalength); j += 4 { - routers = append(routers, binary.BigEndian.Uint32(data[j:j+4])) - } - content = NetworkLSA{ - Options: binary.BigEndian.Uint32(data[20:24]) & 0x00FFFFFF, - AttachedRouter: routers, - } - case InterAreaPrefixLSAtype: - content = InterAreaPrefixLSA{ - Metric: binary.BigEndian.Uint32(data[20:24]) & 0x00FFFFFF, - PrefixLength: uint8(data[24]), - PrefixOptions: uint8(data[25]), - AddressPrefix: data[28:uint32(lsalength)], - } - case InterAreaRouterLSAtype: - content = InterAreaRouterLSA{ - Options: binary.BigEndian.Uint32(data[20:24]) & 0x00FFFFFF, - Metric: binary.BigEndian.Uint32(data[24:28]) & 0x00FFFFFF, - DestinationRouterID: binary.BigEndian.Uint32(data[28:32]), - } - case ASExternalLSAtype: - fallthrough - case NSSALSAtype: - flags := uint8(data[20]) - prefixLen := uint8(data[24]) / 8 - var forwardingAddress []byte - if (flags & 0x02) == 0x02 { - forwardingAddress = data[28+uint32(prefixLen) : 28+uint32(prefixLen)+16] - } - content = ASExternalLSA{ - Flags: flags, - Metric: binary.BigEndian.Uint32(data[20:24]) & 0x00FFFFFF, - PrefixLength: prefixLen, - PrefixOptions: uint8(data[25]), - RefLSType: binary.BigEndian.Uint16(data[26:28]), - AddressPrefix: data[28 : 28+uint32(prefixLen)], - ForwardingAddress: forwardingAddress, - } - case LinkLSAtype: - var prefixes []Prefix - var prefixOffset uint32 = 44 - var j uint32 - numOfPrefixes := binary.BigEndian.Uint32(data[40:44]) - for j = 0; j < numOfPrefixes; j++ { - prefixLen := uint8(data[prefixOffset]) - prefix := Prefix{ - PrefixLength: prefixLen, - PrefixOptions: uint8(data[prefixOffset+1]), - AddressPrefix: data[prefixOffset+4 : prefixOffset+4+uint32(prefixLen)/8], - } - prefixes = append(prefixes, prefix) - prefixOffset = prefixOffset + 4 + uint32(prefixLen)/8 - } - content = LinkLSA{ - RtrPriority: uint8(data[20]), - Options: binary.BigEndian.Uint32(data[20:24]) & 0x00FFFFFF, - LinkLocalAddress: data[24:40], - NumOfPrefixes: numOfPrefixes, - Prefixes: prefixes, - } - case IntraAreaPrefixLSAtype: - var prefixes []Prefix - var prefixOffset uint32 = 32 - var j uint16 - numOfPrefixes := binary.BigEndian.Uint16(data[20:22]) - for j = 0; j < numOfPrefixes; j++ { - prefixLen := uint8(data[prefixOffset]) - prefix := Prefix{ - PrefixLength: prefixLen, - PrefixOptions: uint8(data[prefixOffset+1]), - Metric: binary.BigEndian.Uint16(data[prefixOffset+2 : prefixOffset+4]), - AddressPrefix: data[prefixOffset+4 : prefixOffset+4+uint32(prefixLen)/8], - } - prefixes = append(prefixes, prefix) - prefixOffset = prefixOffset + 4 + uint32(prefixLen) - } - content = IntraAreaPrefixLSA{ - NumOfPrefixes: numOfPrefixes, - RefLSType: binary.BigEndian.Uint16(data[22:24]), - RefLinkStateID: binary.BigEndian.Uint32(data[24:28]), - RefAdvRouter: binary.BigEndian.Uint32(data[28:32]), - Prefixes: prefixes, - } - default: - return nil, fmt.Errorf("Unknown Link State type.") - } - return content, nil -} - -// getLSAs parses the LSA information from the packet for OSPFv3 -func getLSAs(num uint32, data []byte) ([]LSA, error) { - var lsas []LSA - var i uint32 = 0 - var offset uint32 = 0 - for ; i < num; i++ { - var content interface{} - lstype := binary.BigEndian.Uint16(data[offset+2 : offset+4]) - lsalength := binary.BigEndian.Uint16(data[offset+18 : offset+20]) - - content, err := extractLSAInformation(lstype, lsalength, data[offset:]) - if err != nil { - return nil, fmt.Errorf("Could not extract Link State type.") - } - lsa := LSA{ - LSAheader: LSAheader{ - LSAge: binary.BigEndian.Uint16(data[offset : offset+2]), - LSType: lstype, - LinkStateID: binary.BigEndian.Uint32(data[offset+4 : offset+8]), - AdvRouter: binary.BigEndian.Uint32(data[offset+8 : offset+12]), - LSSeqNumber: binary.BigEndian.Uint32(data[offset+12 : offset+16]), - LSChecksum: binary.BigEndian.Uint16(data[offset+16 : offset+18]), - Length: lsalength, - }, - Content: content, - } - lsas = append(lsas, lsa) - offset += uint32(lsalength) - } - return lsas, nil -} - -// DecodeFromBytes decodes the given bytes into the OSPF layer. -func (ospf *OSPFv2) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 24 { - return fmt.Errorf("Packet too smal for OSPF Version 2") - } - - ospf.Version = uint8(data[0]) - ospf.Type = OSPFType(data[1]) - ospf.PacketLength = binary.BigEndian.Uint16(data[2:4]) - ospf.RouterID = binary.BigEndian.Uint32(data[4:8]) - ospf.AreaID = binary.BigEndian.Uint32(data[8:12]) - ospf.Checksum = binary.BigEndian.Uint16(data[12:14]) - ospf.AuType = binary.BigEndian.Uint16(data[14:16]) - ospf.Authentication = binary.BigEndian.Uint64(data[16:24]) - - switch ospf.Type { - case OSPFHello: - var neighbors []uint32 - for i := 44; uint16(i+4) <= ospf.PacketLength; i += 4 { - neighbors = append(neighbors, binary.BigEndian.Uint32(data[i:i+4])) - } - ospf.Content = HelloPkgV2{ - NetworkMask: binary.BigEndian.Uint32(data[24:28]), - HelloPkg: HelloPkg{ - HelloInterval: binary.BigEndian.Uint16(data[28:30]), - Options: uint32(data[30]), - RtrPriority: uint8(data[31]), - RouterDeadInterval: binary.BigEndian.Uint32(data[32:36]), - DesignatedRouterID: binary.BigEndian.Uint32(data[36:40]), - BackupDesignatedRouterID: binary.BigEndian.Uint32(data[40:44]), - NeighborID: neighbors, - }, - } - case OSPFDatabaseDescription: - var lsas []LSAheader - for i := 32; uint16(i+20) <= ospf.PacketLength; i += 20 { - lsa := LSAheader{ - LSAge: binary.BigEndian.Uint16(data[i : i+2]), - LSType: binary.BigEndian.Uint16(data[i+2 : i+4]), - LinkStateID: binary.BigEndian.Uint32(data[i+4 : i+8]), - AdvRouter: binary.BigEndian.Uint32(data[i+8 : i+12]), - LSSeqNumber: binary.BigEndian.Uint32(data[i+12 : i+16]), - LSChecksum: binary.BigEndian.Uint16(data[i+16 : i+18]), - Length: binary.BigEndian.Uint16(data[i+18 : i+20]), - } - lsas = append(lsas, lsa) - } - ospf.Content = DbDescPkg{ - InterfaceMTU: binary.BigEndian.Uint16(data[24:26]), - Options: uint32(data[26]), - Flags: uint16(data[27]), - DDSeqNumber: binary.BigEndian.Uint32(data[28:32]), - LSAinfo: lsas, - } - case OSPFLinkStateRequest: - var lsrs []LSReq - for i := 24; uint16(i+12) <= ospf.PacketLength; i += 12 { - lsr := LSReq{ - LSType: binary.BigEndian.Uint16(data[i+2 : i+4]), - LSID: binary.BigEndian.Uint32(data[i+4 : i+8]), - AdvRouter: binary.BigEndian.Uint32(data[i+8 : i+12]), - } - lsrs = append(lsrs, lsr) - } - ospf.Content = lsrs - case OSPFLinkStateUpdate: - num := binary.BigEndian.Uint32(data[24:28]) - - lsas, err := getLSAsv2(num, data[28:]) - if err != nil { - return fmt.Errorf("Cannot parse Link State Update packet: %v", err) - } - ospf.Content = LSUpdate{ - NumOfLSAs: num, - LSAs: lsas, - } - case OSPFLinkStateAcknowledgment: - var lsas []LSAheader - for i := 24; uint16(i+20) <= ospf.PacketLength; i += 20 { - lsa := LSAheader{ - LSAge: binary.BigEndian.Uint16(data[i : i+2]), - LSOptions: data[i+2], - LSType: uint16(data[i+3]), - LinkStateID: binary.BigEndian.Uint32(data[i+4 : i+8]), - AdvRouter: binary.BigEndian.Uint32(data[i+8 : i+12]), - LSSeqNumber: binary.BigEndian.Uint32(data[i+12 : i+16]), - LSChecksum: binary.BigEndian.Uint16(data[i+16 : i+18]), - Length: binary.BigEndian.Uint16(data[i+18 : i+20]), - } - lsas = append(lsas, lsa) - } - ospf.Content = lsas - } - return nil -} - -// DecodeFromBytes decodes the given bytes into the OSPF layer. -func (ospf *OSPFv3) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - - if len(data) < 16 { - return fmt.Errorf("Packet too smal for OSPF Version 3") - } - - ospf.Version = uint8(data[0]) - ospf.Type = OSPFType(data[1]) - ospf.PacketLength = binary.BigEndian.Uint16(data[2:4]) - ospf.RouterID = binary.BigEndian.Uint32(data[4:8]) - ospf.AreaID = binary.BigEndian.Uint32(data[8:12]) - ospf.Checksum = binary.BigEndian.Uint16(data[12:14]) - ospf.Instance = uint8(data[14]) - ospf.Reserved = uint8(data[15]) - - switch ospf.Type { - case OSPFHello: - var neighbors []uint32 - for i := 36; uint16(i+4) <= ospf.PacketLength; i += 4 { - neighbors = append(neighbors, binary.BigEndian.Uint32(data[i:i+4])) - } - ospf.Content = HelloPkg{ - InterfaceID: binary.BigEndian.Uint32(data[16:20]), - RtrPriority: uint8(data[20]), - Options: binary.BigEndian.Uint32(data[21:25]) >> 8, - HelloInterval: binary.BigEndian.Uint16(data[24:26]), - RouterDeadInterval: uint32(binary.BigEndian.Uint16(data[26:28])), - DesignatedRouterID: binary.BigEndian.Uint32(data[28:32]), - BackupDesignatedRouterID: binary.BigEndian.Uint32(data[32:36]), - NeighborID: neighbors, - } - case OSPFDatabaseDescription: - var lsas []LSAheader - for i := 28; uint16(i+20) <= ospf.PacketLength; i += 20 { - lsa := LSAheader{ - LSAge: binary.BigEndian.Uint16(data[i : i+2]), - LSType: binary.BigEndian.Uint16(data[i+2 : i+4]), - LinkStateID: binary.BigEndian.Uint32(data[i+4 : i+8]), - AdvRouter: binary.BigEndian.Uint32(data[i+8 : i+12]), - LSSeqNumber: binary.BigEndian.Uint32(data[i+12 : i+16]), - LSChecksum: binary.BigEndian.Uint16(data[i+16 : i+18]), - Length: binary.BigEndian.Uint16(data[i+18 : i+20]), - } - lsas = append(lsas, lsa) - } - ospf.Content = DbDescPkg{ - Options: binary.BigEndian.Uint32(data[16:20]) & 0x00FFFFFF, - InterfaceMTU: binary.BigEndian.Uint16(data[20:22]), - Flags: binary.BigEndian.Uint16(data[22:24]), - DDSeqNumber: binary.BigEndian.Uint32(data[24:28]), - LSAinfo: lsas, - } - case OSPFLinkStateRequest: - var lsrs []LSReq - for i := 16; uint16(i+12) <= ospf.PacketLength; i += 12 { - lsr := LSReq{ - LSType: binary.BigEndian.Uint16(data[i+2 : i+4]), - LSID: binary.BigEndian.Uint32(data[i+4 : i+8]), - AdvRouter: binary.BigEndian.Uint32(data[i+8 : i+12]), - } - lsrs = append(lsrs, lsr) - } - ospf.Content = lsrs - case OSPFLinkStateUpdate: - num := binary.BigEndian.Uint32(data[16:20]) - lsas, err := getLSAs(num, data[20:]) - if err != nil { - return fmt.Errorf("Cannot parse Link State Update packet: %v", err) - } - ospf.Content = LSUpdate{ - NumOfLSAs: num, - LSAs: lsas, - } - - case OSPFLinkStateAcknowledgment: - var lsas []LSAheader - for i := 16; uint16(i+20) <= ospf.PacketLength; i += 20 { - lsa := LSAheader{ - LSAge: binary.BigEndian.Uint16(data[i : i+2]), - LSType: binary.BigEndian.Uint16(data[i+2 : i+4]), - LinkStateID: binary.BigEndian.Uint32(data[i+4 : i+8]), - AdvRouter: binary.BigEndian.Uint32(data[i+8 : i+12]), - LSSeqNumber: binary.BigEndian.Uint32(data[i+12 : i+16]), - LSChecksum: binary.BigEndian.Uint16(data[i+16 : i+18]), - Length: binary.BigEndian.Uint16(data[i+18 : i+20]), - } - lsas = append(lsas, lsa) - } - ospf.Content = lsas - default: - } - - return nil -} - -// LayerType returns LayerTypeOSPF -func (ospf *OSPFv2) LayerType() gopacket.LayerType { - return LayerTypeOSPF -} -func (ospf *OSPFv3) LayerType() gopacket.LayerType { - return LayerTypeOSPF -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (ospf *OSPFv2) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypeZero -} -func (ospf *OSPFv3) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypeZero -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (ospf *OSPFv2) CanDecode() gopacket.LayerClass { - return LayerTypeOSPF -} -func (ospf *OSPFv3) CanDecode() gopacket.LayerClass { - return LayerTypeOSPF -} - -func decodeOSPF(data []byte, p gopacket.PacketBuilder) error { - if len(data) < 14 { - return fmt.Errorf("Packet too smal for OSPF") - } - - switch uint8(data[0]) { - case 2: - ospf := &OSPFv2{} - return decodingLayerDecoder(ospf, data, p) - case 3: - ospf := &OSPFv3{} - return decodingLayerDecoder(ospf, data, p) - default: - } - - return fmt.Errorf("Unable to determine OSPF type.") -} diff --git a/vendor/github.com/google/gopacket/layers/pflog.go b/vendor/github.com/google/gopacket/layers/pflog.go deleted file mode 100644 index 9dbbd90d156..00000000000 --- a/vendor/github.com/google/gopacket/layers/pflog.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - - "github.com/google/gopacket" -) - -type PFDirection uint8 - -const ( - PFDirectionInOut PFDirection = 0 - PFDirectionIn PFDirection = 1 - PFDirectionOut PFDirection = 2 -) - -// PFLog provides the layer for 'pf' packet-filter logging, as described at -// http://www.freebsd.org/cgi/man.cgi?query=pflog&sektion=4 -type PFLog struct { - BaseLayer - Length uint8 - Family ProtocolFamily - Action, Reason uint8 - IFName, Ruleset []byte - RuleNum, SubruleNum uint32 - UID uint32 - PID int32 - RuleUID uint32 - RulePID int32 - Direction PFDirection - // The remainder is padding -} - -func (pf *PFLog) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 60 { - df.SetTruncated() - return errors.New("PFLog data less than 60 bytes") - } - pf.Length = data[0] - pf.Family = ProtocolFamily(data[1]) - pf.Action = data[2] - pf.Reason = data[3] - pf.IFName = data[4:20] - pf.Ruleset = data[20:36] - pf.RuleNum = binary.BigEndian.Uint32(data[36:40]) - pf.SubruleNum = binary.BigEndian.Uint32(data[40:44]) - pf.UID = binary.BigEndian.Uint32(data[44:48]) - pf.PID = int32(binary.BigEndian.Uint32(data[48:52])) - pf.RuleUID = binary.BigEndian.Uint32(data[52:56]) - pf.RulePID = int32(binary.BigEndian.Uint32(data[56:60])) - pf.Direction = PFDirection(data[60]) - if pf.Length%4 != 1 { - return errors.New("PFLog header length should be 3 less than multiple of 4") - } - actualLength := int(pf.Length) + 3 - if len(data) < actualLength { - return fmt.Errorf("PFLog data size < %d", actualLength) - } - pf.Contents = data[:actualLength] - pf.Payload = data[actualLength:] - return nil -} - -// LayerType returns layers.LayerTypePFLog -func (pf *PFLog) LayerType() gopacket.LayerType { return LayerTypePFLog } - -func (pf *PFLog) CanDecode() gopacket.LayerClass { return LayerTypePFLog } - -func (pf *PFLog) NextLayerType() gopacket.LayerType { - return pf.Family.LayerType() -} - -func decodePFLog(data []byte, p gopacket.PacketBuilder) error { - pf := &PFLog{} - return decodingLayerDecoder(pf, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/ports.go b/vendor/github.com/google/gopacket/layers/ports.go deleted file mode 100644 index 1e3f42efc2b..00000000000 --- a/vendor/github.com/google/gopacket/layers/ports.go +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "fmt" - "strconv" - - "github.com/google/gopacket" -) - -// TCPPort is a port in a TCP layer. -type TCPPort uint16 - -// UDPPort is a port in a UDP layer. -type UDPPort uint16 - -// RUDPPort is a port in a RUDP layer. -type RUDPPort uint8 - -// SCTPPort is a port in a SCTP layer. -type SCTPPort uint16 - -// UDPLitePort is a port in a UDPLite layer. -type UDPLitePort uint16 - -// RUDPPortNames contains the string names for all RUDP ports. -var RUDPPortNames = map[RUDPPort]string{} - -// UDPLitePortNames contains the string names for all UDPLite ports. -var UDPLitePortNames = map[UDPLitePort]string{} - -// {TCP,UDP,SCTP}PortNames can be found in iana_ports.go - -// String returns the port as "number(name)" if there's a well-known port name, -// or just "number" if there isn't. Well-known names are stored in -// TCPPortNames. -func (a TCPPort) String() string { - if name, ok := TCPPortNames[a]; ok { - return fmt.Sprintf("%d(%s)", a, name) - } - return strconv.Itoa(int(a)) -} - -// LayerType returns a LayerType that would be able to decode the -// application payload. It uses some well-known ports such as 53 for -// DNS. -// -// Returns gopacket.LayerTypePayload for unknown/unsupported port numbers. -func (a TCPPort) LayerType() gopacket.LayerType { - lt := tcpPortLayerType[uint16(a)] - if lt != 0 { - return lt - } - return gopacket.LayerTypePayload -} - -var tcpPortLayerType = [65536]gopacket.LayerType{ - 53: LayerTypeDNS, - 443: LayerTypeTLS, // https - 502: LayerTypeModbusTCP, // modbustcp - 636: LayerTypeTLS, // ldaps - 989: LayerTypeTLS, // ftps-data - 990: LayerTypeTLS, // ftps - 992: LayerTypeTLS, // telnets - 993: LayerTypeTLS, // imaps - 994: LayerTypeTLS, // ircs - 995: LayerTypeTLS, // pop3s - 5061: LayerTypeTLS, // ips -} - -// RegisterTCPPortLayerType creates a new mapping between a TCPPort -// and an underlaying LayerType. -func RegisterTCPPortLayerType(port TCPPort, layerType gopacket.LayerType) { - tcpPortLayerType[port] = layerType -} - -// String returns the port as "number(name)" if there's a well-known port name, -// or just "number" if there isn't. Well-known names are stored in -// UDPPortNames. -func (a UDPPort) String() string { - if name, ok := UDPPortNames[a]; ok { - return fmt.Sprintf("%d(%s)", a, name) - } - return strconv.Itoa(int(a)) -} - -// LayerType returns a LayerType that would be able to decode the -// application payload. It uses some well-known ports such as 53 for -// DNS. -// -// Returns gopacket.LayerTypePayload for unknown/unsupported port numbers. -func (a UDPPort) LayerType() gopacket.LayerType { - lt := udpPortLayerType[uint16(a)] - if lt != 0 { - return lt - } - return gopacket.LayerTypePayload -} - -var udpPortLayerType = [65536]gopacket.LayerType{ - 53: LayerTypeDNS, - 123: LayerTypeNTP, - 4789: LayerTypeVXLAN, - 67: LayerTypeDHCPv4, - 68: LayerTypeDHCPv4, - 546: LayerTypeDHCPv6, - 547: LayerTypeDHCPv6, - 5060: LayerTypeSIP, - 6343: LayerTypeSFlow, - 6081: LayerTypeGeneve, - 3784: LayerTypeBFD, - 2152: LayerTypeGTPv1U, - 623: LayerTypeRMCP, - 1812: LayerTypeRADIUS, -} - -// RegisterUDPPortLayerType creates a new mapping between a UDPPort -// and an underlaying LayerType. -func RegisterUDPPortLayerType(port UDPPort, layerType gopacket.LayerType) { - udpPortLayerType[port] = layerType -} - -// String returns the port as "number(name)" if there's a well-known port name, -// or just "number" if there isn't. Well-known names are stored in -// RUDPPortNames. -func (a RUDPPort) String() string { - if name, ok := RUDPPortNames[a]; ok { - return fmt.Sprintf("%d(%s)", a, name) - } - return strconv.Itoa(int(a)) -} - -// String returns the port as "number(name)" if there's a well-known port name, -// or just "number" if there isn't. Well-known names are stored in -// SCTPPortNames. -func (a SCTPPort) String() string { - if name, ok := SCTPPortNames[a]; ok { - return fmt.Sprintf("%d(%s)", a, name) - } - return strconv.Itoa(int(a)) -} - -// String returns the port as "number(name)" if there's a well-known port name, -// or just "number" if there isn't. Well-known names are stored in -// UDPLitePortNames. -func (a UDPLitePort) String() string { - if name, ok := UDPLitePortNames[a]; ok { - return fmt.Sprintf("%d(%s)", a, name) - } - return strconv.Itoa(int(a)) -} diff --git a/vendor/github.com/google/gopacket/layers/ppp.go b/vendor/github.com/google/gopacket/layers/ppp.go deleted file mode 100644 index e534d698cb2..00000000000 --- a/vendor/github.com/google/gopacket/layers/ppp.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "github.com/google/gopacket" -) - -// PPP is the layer for PPP encapsulation headers. -type PPP struct { - BaseLayer - PPPType PPPType - HasPPTPHeader bool -} - -// PPPEndpoint is a singleton endpoint for PPP. Since there is no actual -// addressing for the two ends of a PPP connection, we use a singleton value -// named 'point' for each endpoint. -var PPPEndpoint = gopacket.NewEndpoint(EndpointPPP, nil) - -// PPPFlow is a singleton flow for PPP. Since there is no actual addressing for -// the two ends of a PPP connection, we use a singleton value to represent the -// flow for all PPP connections. -var PPPFlow = gopacket.NewFlow(EndpointPPP, nil, nil) - -// LayerType returns LayerTypePPP -func (p *PPP) LayerType() gopacket.LayerType { return LayerTypePPP } - -// LinkFlow returns PPPFlow. -func (p *PPP) LinkFlow() gopacket.Flow { return PPPFlow } - -func decodePPP(data []byte, p gopacket.PacketBuilder) error { - ppp := &PPP{} - offset := 0 - if data[0] == 0xff && data[1] == 0x03 { - offset = 2 - ppp.HasPPTPHeader = true - } - if data[offset]&0x1 == 0 { - if data[offset+1]&0x1 == 0 { - return errors.New("PPP has invalid type") - } - ppp.PPPType = PPPType(binary.BigEndian.Uint16(data[offset : offset+2])) - ppp.Contents = data[offset : offset+2] - ppp.Payload = data[offset+2:] - } else { - ppp.PPPType = PPPType(data[offset]) - ppp.Contents = data[offset : offset+1] - ppp.Payload = data[offset+1:] - } - p.AddLayer(ppp) - p.SetLinkLayer(ppp) - return p.NextDecoder(ppp.PPPType) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (p *PPP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - if p.PPPType&0x100 == 0 { - bytes, err := b.PrependBytes(2) - if err != nil { - return err - } - binary.BigEndian.PutUint16(bytes, uint16(p.PPPType)) - } else { - bytes, err := b.PrependBytes(1) - if err != nil { - return err - } - bytes[0] = uint8(p.PPPType) - } - if p.HasPPTPHeader { - bytes, err := b.PrependBytes(2) - if err != nil { - return err - } - bytes[0] = 0xff - bytes[1] = 0x03 - } - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/pppoe.go b/vendor/github.com/google/gopacket/layers/pppoe.go deleted file mode 100644 index 14cd63a1899..00000000000 --- a/vendor/github.com/google/gopacket/layers/pppoe.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "github.com/google/gopacket" -) - -// PPPoE is the layer for PPPoE encapsulation headers. -type PPPoE struct { - BaseLayer - Version uint8 - Type uint8 - Code PPPoECode - SessionId uint16 - Length uint16 -} - -// LayerType returns gopacket.LayerTypePPPoE. -func (p *PPPoE) LayerType() gopacket.LayerType { - return LayerTypePPPoE -} - -// decodePPPoE decodes the PPPoE header (see http://tools.ietf.org/html/rfc2516). -func decodePPPoE(data []byte, p gopacket.PacketBuilder) error { - pppoe := &PPPoE{ - Version: data[0] >> 4, - Type: data[0] & 0x0F, - Code: PPPoECode(data[1]), - SessionId: binary.BigEndian.Uint16(data[2:4]), - Length: binary.BigEndian.Uint16(data[4:6]), - } - pppoe.BaseLayer = BaseLayer{data[:6], data[6 : 6+pppoe.Length]} - p.AddLayer(pppoe) - return p.NextDecoder(pppoe.Code) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (p *PPPoE) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - payload := b.Bytes() - bytes, err := b.PrependBytes(6) - if err != nil { - return err - } - bytes[0] = (p.Version << 4) | p.Type - bytes[1] = byte(p.Code) - binary.BigEndian.PutUint16(bytes[2:], p.SessionId) - if opts.FixLengths { - p.Length = uint16(len(payload)) - } - binary.BigEndian.PutUint16(bytes[4:], p.Length) - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/prism.go b/vendor/github.com/google/gopacket/layers/prism.go deleted file mode 100644 index e1711e7f5b9..00000000000 --- a/vendor/github.com/google/gopacket/layers/prism.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2015 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -// http://www.tcpdump.org/linktypes/LINKTYPE_IEEE802_11_PRISM.html - -package layers - -import ( - "encoding/binary" - "errors" - - "github.com/google/gopacket" -) - -func decodePrismValue(data []byte, pv *PrismValue) { - pv.DID = PrismDID(binary.LittleEndian.Uint32(data[0:4])) - pv.Status = binary.LittleEndian.Uint16(data[4:6]) - pv.Length = binary.LittleEndian.Uint16(data[6:8]) - pv.Data = data[8 : 8+pv.Length] -} - -type PrismDID uint32 - -const ( - PrismDIDType1HostTime PrismDID = 0x10044 - PrismDIDType2HostTime PrismDID = 0x01041 - PrismDIDType1MACTime PrismDID = 0x20044 - PrismDIDType2MACTime PrismDID = 0x02041 - PrismDIDType1Channel PrismDID = 0x30044 - PrismDIDType2Channel PrismDID = 0x03041 - PrismDIDType1RSSI PrismDID = 0x40044 - PrismDIDType2RSSI PrismDID = 0x04041 - PrismDIDType1SignalQuality PrismDID = 0x50044 - PrismDIDType2SignalQuality PrismDID = 0x05041 - PrismDIDType1Signal PrismDID = 0x60044 - PrismDIDType2Signal PrismDID = 0x06041 - PrismDIDType1Noise PrismDID = 0x70044 - PrismDIDType2Noise PrismDID = 0x07041 - PrismDIDType1Rate PrismDID = 0x80044 - PrismDIDType2Rate PrismDID = 0x08041 - PrismDIDType1TransmittedFrameIndicator PrismDID = 0x90044 - PrismDIDType2TransmittedFrameIndicator PrismDID = 0x09041 - PrismDIDType1FrameLength PrismDID = 0xA0044 - PrismDIDType2FrameLength PrismDID = 0x0A041 -) - -const ( - PrismType1MessageCode uint16 = 0x00000044 - PrismType2MessageCode uint16 = 0x00000041 -) - -func (p PrismDID) String() string { - dids := map[PrismDID]string{ - PrismDIDType1HostTime: "Host Time", - PrismDIDType2HostTime: "Host Time", - PrismDIDType1MACTime: "MAC Time", - PrismDIDType2MACTime: "MAC Time", - PrismDIDType1Channel: "Channel", - PrismDIDType2Channel: "Channel", - PrismDIDType1RSSI: "RSSI", - PrismDIDType2RSSI: "RSSI", - PrismDIDType1SignalQuality: "Signal Quality", - PrismDIDType2SignalQuality: "Signal Quality", - PrismDIDType1Signal: "Signal", - PrismDIDType2Signal: "Signal", - PrismDIDType1Noise: "Noise", - PrismDIDType2Noise: "Noise", - PrismDIDType1Rate: "Rate", - PrismDIDType2Rate: "Rate", - PrismDIDType1TransmittedFrameIndicator: "Transmitted Frame Indicator", - PrismDIDType2TransmittedFrameIndicator: "Transmitted Frame Indicator", - PrismDIDType1FrameLength: "Frame Length", - PrismDIDType2FrameLength: "Frame Length", - } - - if str, ok := dids[p]; ok { - return str - } - - return "Unknown DID" -} - -type PrismValue struct { - DID PrismDID - Status uint16 - Length uint16 - Data []byte -} - -func (pv *PrismValue) IsSupplied() bool { - return pv.Status == 1 -} - -var ErrPrismExpectedMoreData = errors.New("Expected more data.") -var ErrPrismInvalidCode = errors.New("Invalid header code.") - -func decodePrismHeader(data []byte, p gopacket.PacketBuilder) error { - d := &PrismHeader{} - return decodingLayerDecoder(d, data, p) -} - -type PrismHeader struct { - BaseLayer - Code uint16 - Length uint16 - DeviceName string - Values []PrismValue -} - -func (m *PrismHeader) LayerType() gopacket.LayerType { return LayerTypePrismHeader } - -func (m *PrismHeader) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - m.Code = binary.LittleEndian.Uint16(data[0:4]) - m.Length = binary.LittleEndian.Uint16(data[4:8]) - m.DeviceName = string(data[8:24]) - m.BaseLayer = BaseLayer{Contents: data[:m.Length], Payload: data[m.Length:len(data)]} - - switch m.Code { - case PrismType1MessageCode: - fallthrough - case PrismType2MessageCode: - // valid message code - default: - return ErrPrismInvalidCode - } - - offset := uint16(24) - - m.Values = make([]PrismValue, (m.Length-offset)/12) - for i := 0; i < len(m.Values); i++ { - decodePrismValue(data[offset:offset+12], &m.Values[i]) - offset += 12 - } - - if offset != m.Length { - return ErrPrismExpectedMoreData - } - - return nil -} - -func (m *PrismHeader) CanDecode() gopacket.LayerClass { return LayerTypePrismHeader } -func (m *PrismHeader) NextLayerType() gopacket.LayerType { return LayerTypeDot11 } diff --git a/vendor/github.com/google/gopacket/layers/radiotap.go b/vendor/github.com/google/gopacket/layers/radiotap.go deleted file mode 100644 index d09559f793e..00000000000 --- a/vendor/github.com/google/gopacket/layers/radiotap.go +++ /dev/null @@ -1,1076 +0,0 @@ -// Copyright 2014 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "hash/crc32" - "strings" - - "github.com/google/gopacket" -) - -// align calculates the number of bytes needed to align with the width -// on the offset, returning the number of bytes we need to skip to -// align to the offset (width). -func align(offset uint16, width uint16) uint16 { - return ((((offset) + ((width) - 1)) & (^((width) - 1))) - offset) -} - -type RadioTapPresent uint32 - -const ( - RadioTapPresentTSFT RadioTapPresent = 1 << iota - RadioTapPresentFlags - RadioTapPresentRate - RadioTapPresentChannel - RadioTapPresentFHSS - RadioTapPresentDBMAntennaSignal - RadioTapPresentDBMAntennaNoise - RadioTapPresentLockQuality - RadioTapPresentTxAttenuation - RadioTapPresentDBTxAttenuation - RadioTapPresentDBMTxPower - RadioTapPresentAntenna - RadioTapPresentDBAntennaSignal - RadioTapPresentDBAntennaNoise - RadioTapPresentRxFlags - RadioTapPresentTxFlags - RadioTapPresentRtsRetries - RadioTapPresentDataRetries - _ - RadioTapPresentMCS - RadioTapPresentAMPDUStatus - RadioTapPresentVHT - RadioTapPresentEXT RadioTapPresent = 1 << 31 -) - -func (r RadioTapPresent) TSFT() bool { - return r&RadioTapPresentTSFT != 0 -} -func (r RadioTapPresent) Flags() bool { - return r&RadioTapPresentFlags != 0 -} -func (r RadioTapPresent) Rate() bool { - return r&RadioTapPresentRate != 0 -} -func (r RadioTapPresent) Channel() bool { - return r&RadioTapPresentChannel != 0 -} -func (r RadioTapPresent) FHSS() bool { - return r&RadioTapPresentFHSS != 0 -} -func (r RadioTapPresent) DBMAntennaSignal() bool { - return r&RadioTapPresentDBMAntennaSignal != 0 -} -func (r RadioTapPresent) DBMAntennaNoise() bool { - return r&RadioTapPresentDBMAntennaNoise != 0 -} -func (r RadioTapPresent) LockQuality() bool { - return r&RadioTapPresentLockQuality != 0 -} -func (r RadioTapPresent) TxAttenuation() bool { - return r&RadioTapPresentTxAttenuation != 0 -} -func (r RadioTapPresent) DBTxAttenuation() bool { - return r&RadioTapPresentDBTxAttenuation != 0 -} -func (r RadioTapPresent) DBMTxPower() bool { - return r&RadioTapPresentDBMTxPower != 0 -} -func (r RadioTapPresent) Antenna() bool { - return r&RadioTapPresentAntenna != 0 -} -func (r RadioTapPresent) DBAntennaSignal() bool { - return r&RadioTapPresentDBAntennaSignal != 0 -} -func (r RadioTapPresent) DBAntennaNoise() bool { - return r&RadioTapPresentDBAntennaNoise != 0 -} -func (r RadioTapPresent) RxFlags() bool { - return r&RadioTapPresentRxFlags != 0 -} -func (r RadioTapPresent) TxFlags() bool { - return r&RadioTapPresentTxFlags != 0 -} -func (r RadioTapPresent) RtsRetries() bool { - return r&RadioTapPresentRtsRetries != 0 -} -func (r RadioTapPresent) DataRetries() bool { - return r&RadioTapPresentDataRetries != 0 -} -func (r RadioTapPresent) MCS() bool { - return r&RadioTapPresentMCS != 0 -} -func (r RadioTapPresent) AMPDUStatus() bool { - return r&RadioTapPresentAMPDUStatus != 0 -} -func (r RadioTapPresent) VHT() bool { - return r&RadioTapPresentVHT != 0 -} -func (r RadioTapPresent) EXT() bool { - return r&RadioTapPresentEXT != 0 -} - -type RadioTapChannelFlags uint16 - -const ( - RadioTapChannelFlagsTurbo RadioTapChannelFlags = 0x0010 // Turbo channel - RadioTapChannelFlagsCCK RadioTapChannelFlags = 0x0020 // CCK channel - RadioTapChannelFlagsOFDM RadioTapChannelFlags = 0x0040 // OFDM channel - RadioTapChannelFlagsGhz2 RadioTapChannelFlags = 0x0080 // 2 GHz spectrum channel. - RadioTapChannelFlagsGhz5 RadioTapChannelFlags = 0x0100 // 5 GHz spectrum channel - RadioTapChannelFlagsPassive RadioTapChannelFlags = 0x0200 // Only passive scan allowed - RadioTapChannelFlagsDynamic RadioTapChannelFlags = 0x0400 // Dynamic CCK-OFDM channel - RadioTapChannelFlagsGFSK RadioTapChannelFlags = 0x0800 // GFSK channel (FHSS PHY) -) - -func (r RadioTapChannelFlags) Turbo() bool { - return r&RadioTapChannelFlagsTurbo != 0 -} -func (r RadioTapChannelFlags) CCK() bool { - return r&RadioTapChannelFlagsCCK != 0 -} -func (r RadioTapChannelFlags) OFDM() bool { - return r&RadioTapChannelFlagsOFDM != 0 -} -func (r RadioTapChannelFlags) Ghz2() bool { - return r&RadioTapChannelFlagsGhz2 != 0 -} -func (r RadioTapChannelFlags) Ghz5() bool { - return r&RadioTapChannelFlagsGhz5 != 0 -} -func (r RadioTapChannelFlags) Passive() bool { - return r&RadioTapChannelFlagsPassive != 0 -} -func (r RadioTapChannelFlags) Dynamic() bool { - return r&RadioTapChannelFlagsDynamic != 0 -} -func (r RadioTapChannelFlags) GFSK() bool { - return r&RadioTapChannelFlagsGFSK != 0 -} - -// String provides a human readable string for RadioTapChannelFlags. -// This string is possibly subject to change over time; if you're storing this -// persistently, you should probably store the RadioTapChannelFlags value, not its string. -func (a RadioTapChannelFlags) String() string { - var out bytes.Buffer - if a.Turbo() { - out.WriteString("Turbo,") - } - if a.CCK() { - out.WriteString("CCK,") - } - if a.OFDM() { - out.WriteString("OFDM,") - } - if a.Ghz2() { - out.WriteString("Ghz2,") - } - if a.Ghz5() { - out.WriteString("Ghz5,") - } - if a.Passive() { - out.WriteString("Passive,") - } - if a.Dynamic() { - out.WriteString("Dynamic,") - } - if a.GFSK() { - out.WriteString("GFSK,") - } - - if length := out.Len(); length > 0 { - return string(out.Bytes()[:length-1]) // strip final comma - } - return "" -} - -type RadioTapFlags uint8 - -const ( - RadioTapFlagsCFP RadioTapFlags = 1 << iota // sent/received during CFP - RadioTapFlagsShortPreamble // sent/received * with short * preamble - RadioTapFlagsWEP // sent/received * with WEP encryption - RadioTapFlagsFrag // sent/received * with fragmentation - RadioTapFlagsFCS // frame includes FCS - RadioTapFlagsDatapad // frame has padding between * 802.11 header and payload * (to 32-bit boundary) - RadioTapFlagsBadFCS // does not pass FCS check - RadioTapFlagsShortGI // HT short GI -) - -func (r RadioTapFlags) CFP() bool { - return r&RadioTapFlagsCFP != 0 -} -func (r RadioTapFlags) ShortPreamble() bool { - return r&RadioTapFlagsShortPreamble != 0 -} -func (r RadioTapFlags) WEP() bool { - return r&RadioTapFlagsWEP != 0 -} -func (r RadioTapFlags) Frag() bool { - return r&RadioTapFlagsFrag != 0 -} -func (r RadioTapFlags) FCS() bool { - return r&RadioTapFlagsFCS != 0 -} -func (r RadioTapFlags) Datapad() bool { - return r&RadioTapFlagsDatapad != 0 -} -func (r RadioTapFlags) BadFCS() bool { - return r&RadioTapFlagsBadFCS != 0 -} -func (r RadioTapFlags) ShortGI() bool { - return r&RadioTapFlagsShortGI != 0 -} - -// String provides a human readable string for RadioTapFlags. -// This string is possibly subject to change over time; if you're storing this -// persistently, you should probably store the RadioTapFlags value, not its string. -func (a RadioTapFlags) String() string { - var out bytes.Buffer - if a.CFP() { - out.WriteString("CFP,") - } - if a.ShortPreamble() { - out.WriteString("SHORT-PREAMBLE,") - } - if a.WEP() { - out.WriteString("WEP,") - } - if a.Frag() { - out.WriteString("FRAG,") - } - if a.FCS() { - out.WriteString("FCS,") - } - if a.Datapad() { - out.WriteString("DATAPAD,") - } - if a.ShortGI() { - out.WriteString("SHORT-GI,") - } - - if length := out.Len(); length > 0 { - return string(out.Bytes()[:length-1]) // strip final comma - } - return "" -} - -type RadioTapRate uint8 - -func (a RadioTapRate) String() string { - return fmt.Sprintf("%v Mb/s", 0.5*float32(a)) -} - -type RadioTapChannelFrequency uint16 - -func (a RadioTapChannelFrequency) String() string { - return fmt.Sprintf("%d MHz", a) -} - -type RadioTapRxFlags uint16 - -const ( - RadioTapRxFlagsBadPlcp RadioTapRxFlags = 0x0002 -) - -func (self RadioTapRxFlags) BadPlcp() bool { - return self&RadioTapRxFlagsBadPlcp != 0 -} - -func (self RadioTapRxFlags) String() string { - if self.BadPlcp() { - return "BADPLCP" - } - return "" -} - -type RadioTapTxFlags uint16 - -const ( - RadioTapTxFlagsFail RadioTapTxFlags = 1 << iota - RadioTapTxFlagsCTS - RadioTapTxFlagsRTS - RadioTapTxFlagsNoACK -) - -func (self RadioTapTxFlags) Fail() bool { return self&RadioTapTxFlagsFail != 0 } -func (self RadioTapTxFlags) CTS() bool { return self&RadioTapTxFlagsCTS != 0 } -func (self RadioTapTxFlags) RTS() bool { return self&RadioTapTxFlagsRTS != 0 } -func (self RadioTapTxFlags) NoACK() bool { return self&RadioTapTxFlagsNoACK != 0 } - -func (self RadioTapTxFlags) String() string { - var tokens []string - if self.Fail() { - tokens = append(tokens, "Fail") - } - if self.CTS() { - tokens = append(tokens, "CTS") - } - if self.RTS() { - tokens = append(tokens, "RTS") - } - if self.NoACK() { - tokens = append(tokens, "NoACK") - } - return strings.Join(tokens, ",") -} - -type RadioTapMCS struct { - Known RadioTapMCSKnown - Flags RadioTapMCSFlags - MCS uint8 -} - -func (self RadioTapMCS) String() string { - var tokens []string - if self.Known.Bandwidth() { - token := "?" - switch self.Flags.Bandwidth() { - case 0: - token = "20" - case 1: - token = "40" - case 2: - token = "40(20L)" - case 3: - token = "40(20U)" - } - tokens = append(tokens, token) - } - if self.Known.MCSIndex() { - tokens = append(tokens, fmt.Sprintf("MCSIndex#%d", self.MCS)) - } - if self.Known.GuardInterval() { - if self.Flags.ShortGI() { - tokens = append(tokens, fmt.Sprintf("shortGI")) - } else { - tokens = append(tokens, fmt.Sprintf("longGI")) - } - } - if self.Known.HTFormat() { - if self.Flags.Greenfield() { - tokens = append(tokens, fmt.Sprintf("HT-greenfield")) - } else { - tokens = append(tokens, fmt.Sprintf("HT-mixed")) - } - } - if self.Known.FECType() { - if self.Flags.FECLDPC() { - tokens = append(tokens, fmt.Sprintf("LDPC")) - } else { - tokens = append(tokens, fmt.Sprintf("BCC")) - } - } - if self.Known.STBC() { - tokens = append(tokens, fmt.Sprintf("STBC#%d", self.Flags.STBC())) - } - if self.Known.NESS() { - num := 0 - if self.Known.NESS1() { - num |= 0x02 - } - if self.Flags.NESS0() { - num |= 0x01 - } - tokens = append(tokens, fmt.Sprintf("num-of-ESS#%d", num)) - } - return strings.Join(tokens, ",") -} - -type RadioTapMCSKnown uint8 - -const ( - RadioTapMCSKnownBandwidth RadioTapMCSKnown = 1 << iota - RadioTapMCSKnownMCSIndex - RadioTapMCSKnownGuardInterval - RadioTapMCSKnownHTFormat - RadioTapMCSKnownFECType - RadioTapMCSKnownSTBC - RadioTapMCSKnownNESS - RadioTapMCSKnownNESS1 -) - -func (self RadioTapMCSKnown) Bandwidth() bool { return self&RadioTapMCSKnownBandwidth != 0 } -func (self RadioTapMCSKnown) MCSIndex() bool { return self&RadioTapMCSKnownMCSIndex != 0 } -func (self RadioTapMCSKnown) GuardInterval() bool { return self&RadioTapMCSKnownGuardInterval != 0 } -func (self RadioTapMCSKnown) HTFormat() bool { return self&RadioTapMCSKnownHTFormat != 0 } -func (self RadioTapMCSKnown) FECType() bool { return self&RadioTapMCSKnownFECType != 0 } -func (self RadioTapMCSKnown) STBC() bool { return self&RadioTapMCSKnownSTBC != 0 } -func (self RadioTapMCSKnown) NESS() bool { return self&RadioTapMCSKnownNESS != 0 } -func (self RadioTapMCSKnown) NESS1() bool { return self&RadioTapMCSKnownNESS1 != 0 } - -type RadioTapMCSFlags uint8 - -const ( - RadioTapMCSFlagsBandwidthMask RadioTapMCSFlags = 0x03 - RadioTapMCSFlagsShortGI = 0x04 - RadioTapMCSFlagsGreenfield = 0x08 - RadioTapMCSFlagsFECLDPC = 0x10 - RadioTapMCSFlagsSTBCMask = 0x60 - RadioTapMCSFlagsNESS0 = 0x80 -) - -func (self RadioTapMCSFlags) Bandwidth() int { - return int(self & RadioTapMCSFlagsBandwidthMask) -} -func (self RadioTapMCSFlags) ShortGI() bool { return self&RadioTapMCSFlagsShortGI != 0 } -func (self RadioTapMCSFlags) Greenfield() bool { return self&RadioTapMCSFlagsGreenfield != 0 } -func (self RadioTapMCSFlags) FECLDPC() bool { return self&RadioTapMCSFlagsFECLDPC != 0 } -func (self RadioTapMCSFlags) STBC() int { - return int(self&RadioTapMCSFlagsSTBCMask) >> 5 -} -func (self RadioTapMCSFlags) NESS0() bool { return self&RadioTapMCSFlagsNESS0 != 0 } - -type RadioTapAMPDUStatus struct { - Reference uint32 - Flags RadioTapAMPDUStatusFlags - CRC uint8 -} - -func (self RadioTapAMPDUStatus) String() string { - tokens := []string{ - fmt.Sprintf("ref#%x", self.Reference), - } - if self.Flags.ReportZerolen() && self.Flags.IsZerolen() { - tokens = append(tokens, fmt.Sprintf("zero-length")) - } - if self.Flags.LastKnown() && self.Flags.IsLast() { - tokens = append(tokens, "last") - } - if self.Flags.DelimCRCErr() { - tokens = append(tokens, "delimiter CRC error") - } - if self.Flags.DelimCRCKnown() { - tokens = append(tokens, fmt.Sprintf("delimiter-CRC=%02x", self.CRC)) - } - return strings.Join(tokens, ",") -} - -type RadioTapAMPDUStatusFlags uint16 - -const ( - RadioTapAMPDUStatusFlagsReportZerolen RadioTapAMPDUStatusFlags = 1 << iota - RadioTapAMPDUIsZerolen - RadioTapAMPDULastKnown - RadioTapAMPDUIsLast - RadioTapAMPDUDelimCRCErr - RadioTapAMPDUDelimCRCKnown -) - -func (self RadioTapAMPDUStatusFlags) ReportZerolen() bool { - return self&RadioTapAMPDUStatusFlagsReportZerolen != 0 -} -func (self RadioTapAMPDUStatusFlags) IsZerolen() bool { return self&RadioTapAMPDUIsZerolen != 0 } -func (self RadioTapAMPDUStatusFlags) LastKnown() bool { return self&RadioTapAMPDULastKnown != 0 } -func (self RadioTapAMPDUStatusFlags) IsLast() bool { return self&RadioTapAMPDUIsLast != 0 } -func (self RadioTapAMPDUStatusFlags) DelimCRCErr() bool { return self&RadioTapAMPDUDelimCRCErr != 0 } -func (self RadioTapAMPDUStatusFlags) DelimCRCKnown() bool { - return self&RadioTapAMPDUDelimCRCKnown != 0 -} - -type RadioTapVHT struct { - Known RadioTapVHTKnown - Flags RadioTapVHTFlags - Bandwidth uint8 - MCSNSS [4]RadioTapVHTMCSNSS - Coding uint8 - GroupId uint8 - PartialAID uint16 -} - -func (self RadioTapVHT) String() string { - var tokens []string - if self.Known.STBC() { - if self.Flags.STBC() { - tokens = append(tokens, "STBC") - } else { - tokens = append(tokens, "no STBC") - } - } - if self.Known.TXOPPSNotAllowed() { - if self.Flags.TXOPPSNotAllowed() { - tokens = append(tokens, "TXOP doze not allowed") - } else { - tokens = append(tokens, "TXOP doze allowed") - } - } - if self.Known.GI() { - if self.Flags.SGI() { - tokens = append(tokens, "short GI") - } else { - tokens = append(tokens, "long GI") - } - } - if self.Known.SGINSYMDisambiguation() { - if self.Flags.SGINSYMMod() { - tokens = append(tokens, "NSYM mod 10=9") - } else { - tokens = append(tokens, "NSYM mod 10!=9 or no short GI") - } - } - if self.Known.LDPCExtraOFDMSymbol() { - if self.Flags.LDPCExtraOFDMSymbol() { - tokens = append(tokens, "LDPC extra OFDM symbols") - } else { - tokens = append(tokens, "no LDPC extra OFDM symbols") - } - } - if self.Known.Beamformed() { - if self.Flags.Beamformed() { - tokens = append(tokens, "beamformed") - } else { - tokens = append(tokens, "no beamformed") - } - } - if self.Known.Bandwidth() { - token := "?" - switch self.Bandwidth & 0x1f { - case 0: - token = "20" - case 1: - token = "40" - case 2: - token = "40(20L)" - case 3: - token = "40(20U)" - case 4: - token = "80" - case 5: - token = "80(40L)" - case 6: - token = "80(40U)" - case 7: - token = "80(20LL)" - case 8: - token = "80(20LU)" - case 9: - token = "80(20UL)" - case 10: - token = "80(20UU)" - case 11: - token = "160" - case 12: - token = "160(80L)" - case 13: - token = "160(80U)" - case 14: - token = "160(40LL)" - case 15: - token = "160(40LU)" - case 16: - token = "160(40UL)" - case 17: - token = "160(40UU)" - case 18: - token = "160(20LLL)" - case 19: - token = "160(20LLU)" - case 20: - token = "160(20LUL)" - case 21: - token = "160(20LUU)" - case 22: - token = "160(20ULL)" - case 23: - token = "160(20ULU)" - case 24: - token = "160(20UUL)" - case 25: - token = "160(20UUU)" - } - tokens = append(tokens, token) - } - for i, MCSNSS := range self.MCSNSS { - if MCSNSS.Present() { - fec := "?" - switch self.Coding & (1 << uint8(i)) { - case 0: - fec = "BCC" - case 1: - fec = "LDPC" - } - tokens = append(tokens, fmt.Sprintf("user%d(%s,%s)", i, MCSNSS.String(), fec)) - } - } - if self.Known.GroupId() { - tokens = append(tokens, - fmt.Sprintf("group=%d", self.GroupId)) - } - if self.Known.PartialAID() { - tokens = append(tokens, - fmt.Sprintf("partial-AID=%d", self.PartialAID)) - } - return strings.Join(tokens, ",") -} - -type RadioTapVHTKnown uint16 - -const ( - RadioTapVHTKnownSTBC RadioTapVHTKnown = 1 << iota - RadioTapVHTKnownTXOPPSNotAllowed - RadioTapVHTKnownGI - RadioTapVHTKnownSGINSYMDisambiguation - RadioTapVHTKnownLDPCExtraOFDMSymbol - RadioTapVHTKnownBeamformed - RadioTapVHTKnownBandwidth - RadioTapVHTKnownGroupId - RadioTapVHTKnownPartialAID -) - -func (self RadioTapVHTKnown) STBC() bool { return self&RadioTapVHTKnownSTBC != 0 } -func (self RadioTapVHTKnown) TXOPPSNotAllowed() bool { - return self&RadioTapVHTKnownTXOPPSNotAllowed != 0 -} -func (self RadioTapVHTKnown) GI() bool { return self&RadioTapVHTKnownGI != 0 } -func (self RadioTapVHTKnown) SGINSYMDisambiguation() bool { - return self&RadioTapVHTKnownSGINSYMDisambiguation != 0 -} -func (self RadioTapVHTKnown) LDPCExtraOFDMSymbol() bool { - return self&RadioTapVHTKnownLDPCExtraOFDMSymbol != 0 -} -func (self RadioTapVHTKnown) Beamformed() bool { return self&RadioTapVHTKnownBeamformed != 0 } -func (self RadioTapVHTKnown) Bandwidth() bool { return self&RadioTapVHTKnownBandwidth != 0 } -func (self RadioTapVHTKnown) GroupId() bool { return self&RadioTapVHTKnownGroupId != 0 } -func (self RadioTapVHTKnown) PartialAID() bool { return self&RadioTapVHTKnownPartialAID != 0 } - -type RadioTapVHTFlags uint8 - -const ( - RadioTapVHTFlagsSTBC RadioTapVHTFlags = 1 << iota - RadioTapVHTFlagsTXOPPSNotAllowed - RadioTapVHTFlagsSGI - RadioTapVHTFlagsSGINSYMMod - RadioTapVHTFlagsLDPCExtraOFDMSymbol - RadioTapVHTFlagsBeamformed -) - -func (self RadioTapVHTFlags) STBC() bool { return self&RadioTapVHTFlagsSTBC != 0 } -func (self RadioTapVHTFlags) TXOPPSNotAllowed() bool { - return self&RadioTapVHTFlagsTXOPPSNotAllowed != 0 -} -func (self RadioTapVHTFlags) SGI() bool { return self&RadioTapVHTFlagsSGI != 0 } -func (self RadioTapVHTFlags) SGINSYMMod() bool { return self&RadioTapVHTFlagsSGINSYMMod != 0 } -func (self RadioTapVHTFlags) LDPCExtraOFDMSymbol() bool { - return self&RadioTapVHTFlagsLDPCExtraOFDMSymbol != 0 -} -func (self RadioTapVHTFlags) Beamformed() bool { return self&RadioTapVHTFlagsBeamformed != 0 } - -type RadioTapVHTMCSNSS uint8 - -func (self RadioTapVHTMCSNSS) Present() bool { - return self&0x0F != 0 -} - -func (self RadioTapVHTMCSNSS) String() string { - return fmt.Sprintf("NSS#%dMCS#%d", uint32(self&0xf), uint32(self>>4)) -} - -func decodeRadioTap(data []byte, p gopacket.PacketBuilder) error { - d := &RadioTap{} - // TODO: Should we set LinkLayer here? And implement LinkFlow - return decodingLayerDecoder(d, data, p) -} - -type RadioTap struct { - BaseLayer - - // Version 0. Only increases for drastic changes, introduction of compatible new fields does not count. - Version uint8 - // Length of the whole header in bytes, including it_version, it_pad, it_len, and data fields. - Length uint16 - // Present is a bitmap telling which fields are present. Set bit 31 (0x80000000) to extend the bitmap by another 32 bits. Additional extensions are made by setting bit 31. - Present RadioTapPresent - // TSFT: value in microseconds of the MAC's 64-bit 802.11 Time Synchronization Function timer when the first bit of the MPDU arrived at the MAC. For received frames, only. - TSFT uint64 - Flags RadioTapFlags - // Rate Tx/Rx data rate - Rate RadioTapRate - // ChannelFrequency Tx/Rx frequency in MHz, followed by flags - ChannelFrequency RadioTapChannelFrequency - ChannelFlags RadioTapChannelFlags - // FHSS For frequency-hopping radios, the hop set (first byte) and pattern (second byte). - FHSS uint16 - // DBMAntennaSignal RF signal power at the antenna, decibel difference from one milliwatt. - DBMAntennaSignal int8 - // DBMAntennaNoise RF noise power at the antenna, decibel difference from one milliwatt. - DBMAntennaNoise int8 - // LockQuality Quality of Barker code lock. Unitless. Monotonically nondecreasing with "better" lock strength. Called "Signal Quality" in datasheets. - LockQuality uint16 - // TxAttenuation Transmit power expressed as unitless distance from max power set at factory calibration. 0 is max power. Monotonically nondecreasing with lower power levels. - TxAttenuation uint16 - // DBTxAttenuation Transmit power expressed as decibel distance from max power set at factory calibration. 0 is max power. Monotonically nondecreasing with lower power levels. - DBTxAttenuation uint16 - // DBMTxPower Transmit power expressed as dBm (decibels from a 1 milliwatt reference). This is the absolute power level measured at the antenna port. - DBMTxPower int8 - // Antenna Unitless indication of the Rx/Tx antenna for this packet. The first antenna is antenna 0. - Antenna uint8 - // DBAntennaSignal RF signal power at the antenna, decibel difference from an arbitrary, fixed reference. - DBAntennaSignal uint8 - // DBAntennaNoise RF noise power at the antenna, decibel difference from an arbitrary, fixed reference point. - DBAntennaNoise uint8 - // - RxFlags RadioTapRxFlags - TxFlags RadioTapTxFlags - RtsRetries uint8 - DataRetries uint8 - MCS RadioTapMCS - AMPDUStatus RadioTapAMPDUStatus - VHT RadioTapVHT -} - -func (m *RadioTap) LayerType() gopacket.LayerType { return LayerTypeRadioTap } - -func (m *RadioTap) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 8 { - df.SetTruncated() - return errors.New("RadioTap too small") - } - m.Version = uint8(data[0]) - m.Length = binary.LittleEndian.Uint16(data[2:4]) - m.Present = RadioTapPresent(binary.LittleEndian.Uint32(data[4:8])) - - offset := uint16(4) - - for (binary.LittleEndian.Uint32(data[offset:offset+4]) & 0x80000000) != 0 { - // This parser only handles standard radiotap namespace, - // and expects all fields are packed in the first it_present. - // Extended bitmap will be just ignored. - offset += 4 - } - offset += 4 // skip the bitmap - - if m.Present.TSFT() { - offset += align(offset, 8) - m.TSFT = binary.LittleEndian.Uint64(data[offset : offset+8]) - offset += 8 - } - if m.Present.Flags() { - m.Flags = RadioTapFlags(data[offset]) - offset++ - } - if m.Present.Rate() { - m.Rate = RadioTapRate(data[offset]) - offset++ - } - if m.Present.Channel() { - offset += align(offset, 2) - m.ChannelFrequency = RadioTapChannelFrequency(binary.LittleEndian.Uint16(data[offset : offset+2])) - offset += 2 - m.ChannelFlags = RadioTapChannelFlags(binary.LittleEndian.Uint16(data[offset : offset+2])) - offset += 2 - } - if m.Present.FHSS() { - m.FHSS = binary.LittleEndian.Uint16(data[offset : offset+2]) - offset += 2 - } - if m.Present.DBMAntennaSignal() { - m.DBMAntennaSignal = int8(data[offset]) - offset++ - } - if m.Present.DBMAntennaNoise() { - m.DBMAntennaNoise = int8(data[offset]) - offset++ - } - if m.Present.LockQuality() { - offset += align(offset, 2) - m.LockQuality = binary.LittleEndian.Uint16(data[offset : offset+2]) - offset += 2 - } - if m.Present.TxAttenuation() { - offset += align(offset, 2) - m.TxAttenuation = binary.LittleEndian.Uint16(data[offset : offset+2]) - offset += 2 - } - if m.Present.DBTxAttenuation() { - offset += align(offset, 2) - m.DBTxAttenuation = binary.LittleEndian.Uint16(data[offset : offset+2]) - offset += 2 - } - if m.Present.DBMTxPower() { - m.DBMTxPower = int8(data[offset]) - offset++ - } - if m.Present.Antenna() { - m.Antenna = uint8(data[offset]) - offset++ - } - if m.Present.DBAntennaSignal() { - m.DBAntennaSignal = uint8(data[offset]) - offset++ - } - if m.Present.DBAntennaNoise() { - m.DBAntennaNoise = uint8(data[offset]) - offset++ - } - if m.Present.RxFlags() { - offset += align(offset, 2) - m.RxFlags = RadioTapRxFlags(binary.LittleEndian.Uint16(data[offset:])) - offset += 2 - } - if m.Present.TxFlags() { - offset += align(offset, 2) - m.TxFlags = RadioTapTxFlags(binary.LittleEndian.Uint16(data[offset:])) - offset += 2 - } - if m.Present.RtsRetries() { - m.RtsRetries = uint8(data[offset]) - offset++ - } - if m.Present.DataRetries() { - m.DataRetries = uint8(data[offset]) - offset++ - } - if m.Present.MCS() { - m.MCS = RadioTapMCS{ - RadioTapMCSKnown(data[offset]), - RadioTapMCSFlags(data[offset+1]), - uint8(data[offset+2]), - } - offset += 3 - } - if m.Present.AMPDUStatus() { - offset += align(offset, 4) - m.AMPDUStatus = RadioTapAMPDUStatus{ - Reference: binary.LittleEndian.Uint32(data[offset:]), - Flags: RadioTapAMPDUStatusFlags(binary.LittleEndian.Uint16(data[offset+4:])), - CRC: uint8(data[offset+6]), - } - offset += 8 - } - if m.Present.VHT() { - offset += align(offset, 2) - m.VHT = RadioTapVHT{ - Known: RadioTapVHTKnown(binary.LittleEndian.Uint16(data[offset:])), - Flags: RadioTapVHTFlags(data[offset+2]), - Bandwidth: uint8(data[offset+3]), - MCSNSS: [4]RadioTapVHTMCSNSS{ - RadioTapVHTMCSNSS(data[offset+4]), - RadioTapVHTMCSNSS(data[offset+5]), - RadioTapVHTMCSNSS(data[offset+6]), - RadioTapVHTMCSNSS(data[offset+7]), - }, - Coding: uint8(data[offset+8]), - GroupId: uint8(data[offset+9]), - PartialAID: binary.LittleEndian.Uint16(data[offset+10:]), - } - offset += 12 - } - - payload := data[m.Length:] - - // Remove non standard padding used by some Wi-Fi drivers - if m.Flags.Datapad() && - payload[0]&0xC == 0x8 { //&& // Data frame - headlen := 24 - if payload[0]&0x8C == 0x88 { // QoS - headlen += 2 - } - if payload[1]&0x3 == 0x3 { // 4 addresses - headlen += 2 - } - if headlen%4 == 2 { - payload = append(payload[:headlen], payload[headlen+2:len(payload)]...) - } - } - - if !m.Flags.FCS() { - // Dot11.DecodeFromBytes() expects FCS present and performs a hard chop on the checksum - // If a user is handing in subslices or packets from a buffered stream, the capacity of the slice - // may extend beyond the len, rather than expecting callers to enforce cap==len on every packet - // we take the hit in this one case and do a reallocation. If the user DOES enforce cap==len - // then the reallocation will happen anyway on the append. This is requried because the append - // write to the memory directly after the payload if there is sufficient capacity, which callers - // may not expect. - reallocPayload := make([]byte, len(payload)+4) - copy(reallocPayload[0:len(payload)], payload) - h := crc32.NewIEEE() - h.Write(payload) - binary.LittleEndian.PutUint32(reallocPayload[len(payload):], h.Sum32()) - payload = reallocPayload - } - m.BaseLayer = BaseLayer{Contents: data[:m.Length], Payload: payload} - - return nil -} - -func (m RadioTap) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - buf := make([]byte, 1024) - - buf[0] = m.Version - buf[1] = 0 - - binary.LittleEndian.PutUint32(buf[4:8], uint32(m.Present)) - - offset := uint16(4) - - for (binary.LittleEndian.Uint32(buf[offset:offset+4]) & 0x80000000) != 0 { - offset += 4 - } - - offset += 4 - - if m.Present.TSFT() { - offset += align(offset, 8) - binary.LittleEndian.PutUint64(buf[offset:offset+8], m.TSFT) - offset += 8 - } - - if m.Present.Flags() { - buf[offset] = uint8(m.Flags) - offset++ - } - - if m.Present.Rate() { - buf[offset] = uint8(m.Rate) - offset++ - } - - if m.Present.Channel() { - offset += align(offset, 2) - binary.LittleEndian.PutUint16(buf[offset:offset+2], uint16(m.ChannelFrequency)) - offset += 2 - binary.LittleEndian.PutUint16(buf[offset:offset+2], uint16(m.ChannelFlags)) - offset += 2 - } - - if m.Present.FHSS() { - binary.LittleEndian.PutUint16(buf[offset:offset+2], m.FHSS) - offset += 2 - } - - if m.Present.DBMAntennaSignal() { - buf[offset] = byte(m.DBMAntennaSignal) - offset++ - } - - if m.Present.DBMAntennaNoise() { - buf[offset] = byte(m.DBMAntennaNoise) - offset++ - } - - if m.Present.LockQuality() { - offset += align(offset, 2) - binary.LittleEndian.PutUint16(buf[offset:offset+2], m.LockQuality) - offset += 2 - } - - if m.Present.TxAttenuation() { - offset += align(offset, 2) - binary.LittleEndian.PutUint16(buf[offset:offset+2], m.TxAttenuation) - offset += 2 - } - - if m.Present.DBTxAttenuation() { - offset += align(offset, 2) - binary.LittleEndian.PutUint16(buf[offset:offset+2], m.DBTxAttenuation) - offset += 2 - } - - if m.Present.DBMTxPower() { - buf[offset] = byte(m.DBMTxPower) - offset++ - } - - if m.Present.Antenna() { - buf[offset] = uint8(m.Antenna) - offset++ - } - - if m.Present.DBAntennaSignal() { - buf[offset] = uint8(m.DBAntennaSignal) - offset++ - } - - if m.Present.DBAntennaNoise() { - buf[offset] = uint8(m.DBAntennaNoise) - offset++ - } - - if m.Present.RxFlags() { - offset += align(offset, 2) - binary.LittleEndian.PutUint16(buf[offset:offset+2], uint16(m.RxFlags)) - offset += 2 - } - - if m.Present.TxFlags() { - offset += align(offset, 2) - binary.LittleEndian.PutUint16(buf[offset:offset+2], uint16(m.TxFlags)) - offset += 2 - } - - if m.Present.RtsRetries() { - buf[offset] = m.RtsRetries - offset++ - } - - if m.Present.DataRetries() { - buf[offset] = m.DataRetries - offset++ - } - - if m.Present.MCS() { - buf[offset] = uint8(m.MCS.Known) - buf[offset+1] = uint8(m.MCS.Flags) - buf[offset+2] = uint8(m.MCS.MCS) - - offset += 3 - } - - if m.Present.AMPDUStatus() { - offset += align(offset, 4) - - binary.LittleEndian.PutUint32(buf[offset:offset+4], m.AMPDUStatus.Reference) - binary.LittleEndian.PutUint16(buf[offset+4:offset+6], uint16(m.AMPDUStatus.Flags)) - - buf[offset+6] = m.AMPDUStatus.CRC - - offset += 8 - } - - if m.Present.VHT() { - offset += align(offset, 2) - - binary.LittleEndian.PutUint16(buf[offset:], uint16(m.VHT.Known)) - - buf[offset+2] = uint8(m.VHT.Flags) - buf[offset+3] = uint8(m.VHT.Bandwidth) - buf[offset+4] = uint8(m.VHT.MCSNSS[0]) - buf[offset+5] = uint8(m.VHT.MCSNSS[1]) - buf[offset+6] = uint8(m.VHT.MCSNSS[2]) - buf[offset+7] = uint8(m.VHT.MCSNSS[3]) - buf[offset+8] = uint8(m.VHT.Coding) - buf[offset+9] = uint8(m.VHT.GroupId) - - binary.LittleEndian.PutUint16(buf[offset+10:offset+12], m.VHT.PartialAID) - - offset += 12 - } - - packetBuf, err := b.PrependBytes(int(offset)) - - if err != nil { - return err - } - - if opts.FixLengths { - m.Length = offset - } - - binary.LittleEndian.PutUint16(buf[2:4], m.Length) - - copy(packetBuf, buf) - - return nil -} - -func (m *RadioTap) CanDecode() gopacket.LayerClass { return LayerTypeRadioTap } -func (m *RadioTap) NextLayerType() gopacket.LayerType { return LayerTypeDot11 } diff --git a/vendor/github.com/google/gopacket/layers/radius.go b/vendor/github.com/google/gopacket/layers/radius.go deleted file mode 100644 index c43ea294516..00000000000 --- a/vendor/github.com/google/gopacket/layers/radius.go +++ /dev/null @@ -1,560 +0,0 @@ -// Copyright 2020 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be found -// in the LICENSE file in the root of the source tree. - -package layers - -import ( - "encoding/binary" - "fmt" - - "github.com/google/gopacket" -) - -const ( - // RFC 2865 3. Packet Format - // `The minimum length is 20 and maximum length is 4096.` - radiusMinimumRecordSizeInBytes int = 20 - radiusMaximumRecordSizeInBytes int = 4096 - - // RFC 2865 5. Attributes - // `The Length field is one octet, and indicates the length of this Attribute including the Type, Length and Value fields.` - // `The Value field is zero or more octets and contains information specific to the Attribute.` - radiusAttributesMinimumRecordSizeInBytes int = 2 -) - -// RADIUS represents a Remote Authentication Dial In User Service layer. -type RADIUS struct { - BaseLayer - - Code RADIUSCode - Identifier RADIUSIdentifier - Length RADIUSLength - Authenticator RADIUSAuthenticator - Attributes []RADIUSAttribute -} - -// RADIUSCode represents packet type. -type RADIUSCode uint8 - -// constants that define RADIUSCode. -const ( - RADIUSCodeAccessRequest RADIUSCode = 1 // RFC2865 3. Packet Format - RADIUSCodeAccessAccept RADIUSCode = 2 // RFC2865 3. Packet Format - RADIUSCodeAccessReject RADIUSCode = 3 // RFC2865 3. Packet Format - RADIUSCodeAccountingRequest RADIUSCode = 4 // RFC2865 3. Packet Format - RADIUSCodeAccountingResponse RADIUSCode = 5 // RFC2865 3. Packet Format - RADIUSCodeAccessChallenge RADIUSCode = 11 // RFC2865 3. Packet Format - RADIUSCodeStatusServer RADIUSCode = 12 // RFC2865 3. Packet Format (experimental) - RADIUSCodeStatusClient RADIUSCode = 13 // RFC2865 3. Packet Format (experimental) - RADIUSCodeReserved RADIUSCode = 255 // RFC2865 3. Packet Format -) - -// String returns a string version of a RADIUSCode. -func (t RADIUSCode) String() (s string) { - switch t { - case RADIUSCodeAccessRequest: - s = "Access-Request" - case RADIUSCodeAccessAccept: - s = "Access-Accept" - case RADIUSCodeAccessReject: - s = "Access-Reject" - case RADIUSCodeAccountingRequest: - s = "Accounting-Request" - case RADIUSCodeAccountingResponse: - s = "Accounting-Response" - case RADIUSCodeAccessChallenge: - s = "Access-Challenge" - case RADIUSCodeStatusServer: - s = "Status-Server" - case RADIUSCodeStatusClient: - s = "Status-Client" - case RADIUSCodeReserved: - s = "Reserved" - default: - s = fmt.Sprintf("Unknown(%d)", t) - } - return -} - -// RADIUSIdentifier represents packet identifier. -type RADIUSIdentifier uint8 - -// RADIUSLength represents packet length. -type RADIUSLength uint16 - -// RADIUSAuthenticator represents authenticator. -type RADIUSAuthenticator [16]byte - -// RADIUSAttribute represents attributes. -type RADIUSAttribute struct { - Type RADIUSAttributeType - Length RADIUSAttributeLength - Value RADIUSAttributeValue -} - -// RADIUSAttributeType represents attribute type. -type RADIUSAttributeType uint8 - -// constants that define RADIUSAttributeType. -const ( - RADIUSAttributeTypeUserName RADIUSAttributeType = 1 // RFC2865 5.1. User-Name - RADIUSAttributeTypeUserPassword RADIUSAttributeType = 2 // RFC2865 5.2. User-Password - RADIUSAttributeTypeCHAPPassword RADIUSAttributeType = 3 // RFC2865 5.3. CHAP-Password - RADIUSAttributeTypeNASIPAddress RADIUSAttributeType = 4 // RFC2865 5.4. NAS-IP-Address - RADIUSAttributeTypeNASPort RADIUSAttributeType = 5 // RFC2865 5.5. NAS-Port - RADIUSAttributeTypeServiceType RADIUSAttributeType = 6 // RFC2865 5.6. Service-Type - RADIUSAttributeTypeFramedProtocol RADIUSAttributeType = 7 // RFC2865 5.7. Framed-Protocol - RADIUSAttributeTypeFramedIPAddress RADIUSAttributeType = 8 // RFC2865 5.8. Framed-IP-Address - RADIUSAttributeTypeFramedIPNetmask RADIUSAttributeType = 9 // RFC2865 5.9. Framed-IP-Netmask - RADIUSAttributeTypeFramedRouting RADIUSAttributeType = 10 // RFC2865 5.10. Framed-Routing - RADIUSAttributeTypeFilterId RADIUSAttributeType = 11 // RFC2865 5.11. Filter-Id - RADIUSAttributeTypeFramedMTU RADIUSAttributeType = 12 // RFC2865 5.12. Framed-MTU - RADIUSAttributeTypeFramedCompression RADIUSAttributeType = 13 // RFC2865 5.13. Framed-Compression - RADIUSAttributeTypeLoginIPHost RADIUSAttributeType = 14 // RFC2865 5.14. Login-IP-Host - RADIUSAttributeTypeLoginService RADIUSAttributeType = 15 // RFC2865 5.15. Login-Service - RADIUSAttributeTypeLoginTCPPort RADIUSAttributeType = 16 // RFC2865 5.16. Login-TCP-Port - RADIUSAttributeTypeReplyMessage RADIUSAttributeType = 18 // RFC2865 5.18. Reply-Message - RADIUSAttributeTypeCallbackNumber RADIUSAttributeType = 19 // RFC2865 5.19. Callback-Number - RADIUSAttributeTypeCallbackId RADIUSAttributeType = 20 // RFC2865 5.20. Callback-Id - RADIUSAttributeTypeFramedRoute RADIUSAttributeType = 22 // RFC2865 5.22. Framed-Route - RADIUSAttributeTypeFramedIPXNetwork RADIUSAttributeType = 23 // RFC2865 5.23. Framed-IPX-Network - RADIUSAttributeTypeState RADIUSAttributeType = 24 // RFC2865 5.24. State - RADIUSAttributeTypeClass RADIUSAttributeType = 25 // RFC2865 5.25. Class - RADIUSAttributeTypeVendorSpecific RADIUSAttributeType = 26 // RFC2865 5.26. Vendor-Specific - RADIUSAttributeTypeSessionTimeout RADIUSAttributeType = 27 // RFC2865 5.27. Session-Timeout - RADIUSAttributeTypeIdleTimeout RADIUSAttributeType = 28 // RFC2865 5.28. Idle-Timeout - RADIUSAttributeTypeTerminationAction RADIUSAttributeType = 29 // RFC2865 5.29. Termination-Action - RADIUSAttributeTypeCalledStationId RADIUSAttributeType = 30 // RFC2865 5.30. Called-Station-Id - RADIUSAttributeTypeCallingStationId RADIUSAttributeType = 31 // RFC2865 5.31. Calling-Station-Id - RADIUSAttributeTypeNASIdentifier RADIUSAttributeType = 32 // RFC2865 5.32. NAS-Identifier - RADIUSAttributeTypeProxyState RADIUSAttributeType = 33 // RFC2865 5.33. Proxy-State - RADIUSAttributeTypeLoginLATService RADIUSAttributeType = 34 // RFC2865 5.34. Login-LAT-Service - RADIUSAttributeTypeLoginLATNode RADIUSAttributeType = 35 // RFC2865 5.35. Login-LAT-Node - RADIUSAttributeTypeLoginLATGroup RADIUSAttributeType = 36 // RFC2865 5.36. Login-LAT-Group - RADIUSAttributeTypeFramedAppleTalkLink RADIUSAttributeType = 37 // RFC2865 5.37. Framed-AppleTalk-Link - RADIUSAttributeTypeFramedAppleTalkNetwork RADIUSAttributeType = 38 // RFC2865 5.38. Framed-AppleTalk-Network - RADIUSAttributeTypeFramedAppleTalkZone RADIUSAttributeType = 39 // RFC2865 5.39. Framed-AppleTalk-Zone - RADIUSAttributeTypeAcctStatusType RADIUSAttributeType = 40 // RFC2866 5.1. Acct-Status-Type - RADIUSAttributeTypeAcctDelayTime RADIUSAttributeType = 41 // RFC2866 5.2. Acct-Delay-Time - RADIUSAttributeTypeAcctInputOctets RADIUSAttributeType = 42 // RFC2866 5.3. Acct-Input-Octets - RADIUSAttributeTypeAcctOutputOctets RADIUSAttributeType = 43 // RFC2866 5.4. Acct-Output-Octets - RADIUSAttributeTypeAcctSessionId RADIUSAttributeType = 44 // RFC2866 5.5. Acct-Session-Id - RADIUSAttributeTypeAcctAuthentic RADIUSAttributeType = 45 // RFC2866 5.6. Acct-Authentic - RADIUSAttributeTypeAcctSessionTime RADIUSAttributeType = 46 // RFC2866 5.7. Acct-Session-Time - RADIUSAttributeTypeAcctInputPackets RADIUSAttributeType = 47 // RFC2866 5.8. Acct-Input-Packets - RADIUSAttributeTypeAcctOutputPackets RADIUSAttributeType = 48 // RFC2866 5.9. Acct-Output-Packets - RADIUSAttributeTypeAcctTerminateCause RADIUSAttributeType = 49 // RFC2866 5.10. Acct-Terminate-Cause - RADIUSAttributeTypeAcctMultiSessionId RADIUSAttributeType = 50 // RFC2866 5.11. Acct-Multi-Session-Id - RADIUSAttributeTypeAcctLinkCount RADIUSAttributeType = 51 // RFC2866 5.12. Acct-Link-Count - RADIUSAttributeTypeAcctInputGigawords RADIUSAttributeType = 52 // RFC2869 5.1. Acct-Input-Gigawords - RADIUSAttributeTypeAcctOutputGigawords RADIUSAttributeType = 53 // RFC2869 5.2. Acct-Output-Gigawords - RADIUSAttributeTypeEventTimestamp RADIUSAttributeType = 55 // RFC2869 5.3. Event-Timestamp - RADIUSAttributeTypeCHAPChallenge RADIUSAttributeType = 60 // RFC2865 5.40. CHAP-Challenge - RADIUSAttributeTypeNASPortType RADIUSAttributeType = 61 // RFC2865 5.41. NAS-Port-Type - RADIUSAttributeTypePortLimit RADIUSAttributeType = 62 // RFC2865 5.42. Port-Limit - RADIUSAttributeTypeLoginLATPort RADIUSAttributeType = 63 // RFC2865 5.43. Login-LAT-Port - RADIUSAttributeTypeTunnelType RADIUSAttributeType = 64 // RFC2868 3.1. Tunnel-Type - RADIUSAttributeTypeTunnelMediumType RADIUSAttributeType = 65 // RFC2868 3.2. Tunnel-Medium-Type - RADIUSAttributeTypeTunnelClientEndpoint RADIUSAttributeType = 66 // RFC2868 3.3. Tunnel-Client-Endpoint - RADIUSAttributeTypeTunnelServerEndpoint RADIUSAttributeType = 67 // RFC2868 3.4. Tunnel-Server-Endpoint - RADIUSAttributeTypeAcctTunnelConnection RADIUSAttributeType = 68 // RFC2867 4.1. Acct-Tunnel-Connection - RADIUSAttributeTypeTunnelPassword RADIUSAttributeType = 69 // RFC2868 3.5. Tunnel-Password - RADIUSAttributeTypeARAPPassword RADIUSAttributeType = 70 // RFC2869 5.4. ARAP-Password - RADIUSAttributeTypeARAPFeatures RADIUSAttributeType = 71 // RFC2869 5.5. ARAP-Features - RADIUSAttributeTypeARAPZoneAccess RADIUSAttributeType = 72 // RFC2869 5.6. ARAP-Zone-Access - RADIUSAttributeTypeARAPSecurity RADIUSAttributeType = 73 // RFC2869 5.7. ARAP-Security - RADIUSAttributeTypeARAPSecurityData RADIUSAttributeType = 74 // RFC2869 5.8. ARAP-Security-Data - RADIUSAttributeTypePasswordRetry RADIUSAttributeType = 75 // RFC2869 5.9. Password-Retry - RADIUSAttributeTypePrompt RADIUSAttributeType = 76 // RFC2869 5.10. Prompt - RADIUSAttributeTypeConnectInfo RADIUSAttributeType = 77 // RFC2869 5.11. Connect-Info - RADIUSAttributeTypeConfigurationToken RADIUSAttributeType = 78 // RFC2869 5.12. Configuration-Token - RADIUSAttributeTypeEAPMessage RADIUSAttributeType = 79 // RFC2869 5.13. EAP-Message - RADIUSAttributeTypeMessageAuthenticator RADIUSAttributeType = 80 // RFC2869 5.14. Message-Authenticator - RADIUSAttributeTypeTunnelPrivateGroupID RADIUSAttributeType = 81 // RFC2868 3.6. Tunnel-Private-Group-ID - RADIUSAttributeTypeTunnelAssignmentID RADIUSAttributeType = 82 // RFC2868 3.7. Tunnel-Assignment-ID - RADIUSAttributeTypeTunnelPreference RADIUSAttributeType = 83 // RFC2868 3.8. Tunnel-Preference - RADIUSAttributeTypeARAPChallengeResponse RADIUSAttributeType = 84 // RFC2869 5.15. ARAP-Challenge-Response - RADIUSAttributeTypeAcctInterimInterval RADIUSAttributeType = 85 // RFC2869 5.16. Acct-Interim-Interval - RADIUSAttributeTypeAcctTunnelPacketsLost RADIUSAttributeType = 86 // RFC2867 4.2. Acct-Tunnel-Packets-Lost - RADIUSAttributeTypeNASPortId RADIUSAttributeType = 87 // RFC2869 5.17. NAS-Port-Id - RADIUSAttributeTypeFramedPool RADIUSAttributeType = 88 // RFC2869 5.18. Framed-Pool - RADIUSAttributeTypeTunnelClientAuthID RADIUSAttributeType = 90 // RFC2868 3.9. Tunnel-Client-Auth-ID - RADIUSAttributeTypeTunnelServerAuthID RADIUSAttributeType = 91 // RFC2868 3.10. Tunnel-Server-Auth-ID -) - -// RADIUSAttributeType represents attribute length. -type RADIUSAttributeLength uint8 - -// RADIUSAttributeType represents attribute value. -type RADIUSAttributeValue []byte - -// String returns a string version of a RADIUSAttributeType. -func (t RADIUSAttributeType) String() (s string) { - switch t { - case RADIUSAttributeTypeUserName: - s = "User-Name" - case RADIUSAttributeTypeUserPassword: - s = "User-Password" - case RADIUSAttributeTypeCHAPPassword: - s = "CHAP-Password" - case RADIUSAttributeTypeNASIPAddress: - s = "NAS-IP-Address" - case RADIUSAttributeTypeNASPort: - s = "NAS-Port" - case RADIUSAttributeTypeServiceType: - s = "Service-Type" - case RADIUSAttributeTypeFramedProtocol: - s = "Framed-Protocol" - case RADIUSAttributeTypeFramedIPAddress: - s = "Framed-IP-Address" - case RADIUSAttributeTypeFramedIPNetmask: - s = "Framed-IP-Netmask" - case RADIUSAttributeTypeFramedRouting: - s = "Framed-Routing" - case RADIUSAttributeTypeFilterId: - s = "Filter-Id" - case RADIUSAttributeTypeFramedMTU: - s = "Framed-MTU" - case RADIUSAttributeTypeFramedCompression: - s = "Framed-Compression" - case RADIUSAttributeTypeLoginIPHost: - s = "Login-IP-Host" - case RADIUSAttributeTypeLoginService: - s = "Login-Service" - case RADIUSAttributeTypeLoginTCPPort: - s = "Login-TCP-Port" - case RADIUSAttributeTypeReplyMessage: - s = "Reply-Message" - case RADIUSAttributeTypeCallbackNumber: - s = "Callback-Number" - case RADIUSAttributeTypeCallbackId: - s = "Callback-Id" - case RADIUSAttributeTypeFramedRoute: - s = "Framed-Route" - case RADIUSAttributeTypeFramedIPXNetwork: - s = "Framed-IPX-Network" - case RADIUSAttributeTypeState: - s = "State" - case RADIUSAttributeTypeClass: - s = "Class" - case RADIUSAttributeTypeVendorSpecific: - s = "Vendor-Specific" - case RADIUSAttributeTypeSessionTimeout: - s = "Session-Timeout" - case RADIUSAttributeTypeIdleTimeout: - s = "Idle-Timeout" - case RADIUSAttributeTypeTerminationAction: - s = "Termination-Action" - case RADIUSAttributeTypeCalledStationId: - s = "Called-Station-Id" - case RADIUSAttributeTypeCallingStationId: - s = "Calling-Station-Id" - case RADIUSAttributeTypeNASIdentifier: - s = "NAS-Identifier" - case RADIUSAttributeTypeProxyState: - s = "Proxy-State" - case RADIUSAttributeTypeLoginLATService: - s = "Login-LAT-Service" - case RADIUSAttributeTypeLoginLATNode: - s = "Login-LAT-Node" - case RADIUSAttributeTypeLoginLATGroup: - s = "Login-LAT-Group" - case RADIUSAttributeTypeFramedAppleTalkLink: - s = "Framed-AppleTalk-Link" - case RADIUSAttributeTypeFramedAppleTalkNetwork: - s = "Framed-AppleTalk-Network" - case RADIUSAttributeTypeFramedAppleTalkZone: - s = "Framed-AppleTalk-Zone" - case RADIUSAttributeTypeAcctStatusType: - s = "Acct-Status-Type" - case RADIUSAttributeTypeAcctDelayTime: - s = "Acct-Delay-Time" - case RADIUSAttributeTypeAcctInputOctets: - s = "Acct-Input-Octets" - case RADIUSAttributeTypeAcctOutputOctets: - s = "Acct-Output-Octets" - case RADIUSAttributeTypeAcctSessionId: - s = "Acct-Session-Id" - case RADIUSAttributeTypeAcctAuthentic: - s = "Acct-Authentic" - case RADIUSAttributeTypeAcctSessionTime: - s = "Acct-Session-Time" - case RADIUSAttributeTypeAcctInputPackets: - s = "Acct-Input-Packets" - case RADIUSAttributeTypeAcctOutputPackets: - s = "Acct-Output-Packets" - case RADIUSAttributeTypeAcctTerminateCause: - s = "Acct-Terminate-Cause" - case RADIUSAttributeTypeAcctMultiSessionId: - s = "Acct-Multi-Session-Id" - case RADIUSAttributeTypeAcctLinkCount: - s = "Acct-Link-Count" - case RADIUSAttributeTypeAcctInputGigawords: - s = "Acct-Input-Gigawords" - case RADIUSAttributeTypeAcctOutputGigawords: - s = "Acct-Output-Gigawords" - case RADIUSAttributeTypeEventTimestamp: - s = "Event-Timestamp" - case RADIUSAttributeTypeCHAPChallenge: - s = "CHAP-Challenge" - case RADIUSAttributeTypeNASPortType: - s = "NAS-Port-Type" - case RADIUSAttributeTypePortLimit: - s = "Port-Limit" - case RADIUSAttributeTypeLoginLATPort: - s = "Login-LAT-Port" - case RADIUSAttributeTypeTunnelType: - s = "Tunnel-Type" - case RADIUSAttributeTypeTunnelMediumType: - s = "Tunnel-Medium-Type" - case RADIUSAttributeTypeTunnelClientEndpoint: - s = "Tunnel-Client-Endpoint" - case RADIUSAttributeTypeTunnelServerEndpoint: - s = "Tunnel-Server-Endpoint" - case RADIUSAttributeTypeAcctTunnelConnection: - s = "Acct-Tunnel-Connection" - case RADIUSAttributeTypeTunnelPassword: - s = "Tunnel-Password" - case RADIUSAttributeTypeARAPPassword: - s = "ARAP-Password" - case RADIUSAttributeTypeARAPFeatures: - s = "ARAP-Features" - case RADIUSAttributeTypeARAPZoneAccess: - s = "ARAP-Zone-Access" - case RADIUSAttributeTypeARAPSecurity: - s = "ARAP-Security" - case RADIUSAttributeTypeARAPSecurityData: - s = "ARAP-Security-Data" - case RADIUSAttributeTypePasswordRetry: - s = "Password-Retry" - case RADIUSAttributeTypePrompt: - s = "Prompt" - case RADIUSAttributeTypeConnectInfo: - s = "Connect-Info" - case RADIUSAttributeTypeConfigurationToken: - s = "Configuration-Token" - case RADIUSAttributeTypeEAPMessage: - s = "EAP-Message" - case RADIUSAttributeTypeMessageAuthenticator: - s = "Message-Authenticator" - case RADIUSAttributeTypeTunnelPrivateGroupID: - s = "Tunnel-Private-Group-ID" - case RADIUSAttributeTypeTunnelAssignmentID: - s = "Tunnel-Assignment-ID" - case RADIUSAttributeTypeTunnelPreference: - s = "Tunnel-Preference" - case RADIUSAttributeTypeARAPChallengeResponse: - s = "ARAP-Challenge-Response" - case RADIUSAttributeTypeAcctInterimInterval: - s = "Acct-Interim-Interval" - case RADIUSAttributeTypeAcctTunnelPacketsLost: - s = "Acct-Tunnel-Packets-Lost" - case RADIUSAttributeTypeNASPortId: - s = "NAS-Port-Id" - case RADIUSAttributeTypeFramedPool: - s = "Framed-Pool" - case RADIUSAttributeTypeTunnelClientAuthID: - s = "Tunnel-Client-Auth-ID" - case RADIUSAttributeTypeTunnelServerAuthID: - s = "Tunnel-Server-Auth-ID" - default: - s = fmt.Sprintf("Unknown(%d)", t) - } - return -} - -// Len returns the length of a RADIUS packet. -func (radius *RADIUS) Len() (int, error) { - n := radiusMinimumRecordSizeInBytes - for _, v := range radius.Attributes { - alen, err := attributeValueLength(v.Value) - if err != nil { - return 0, err - } - n += int(alen) + 2 // Added Type and Length - } - return n, nil -} - -// LayerType returns LayerTypeRADIUS. -func (radius *RADIUS) LayerType() gopacket.LayerType { - return LayerTypeRADIUS -} - -// DecodeFromBytes decodes the given bytes into this layer. -func (radius *RADIUS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) > radiusMaximumRecordSizeInBytes { - df.SetTruncated() - return fmt.Errorf("RADIUS length %d too big", len(data)) - } - - if len(data) < radiusMinimumRecordSizeInBytes { - df.SetTruncated() - return fmt.Errorf("RADIUS length %d too short", len(data)) - } - - radius.BaseLayer = BaseLayer{Contents: data} - - radius.Code = RADIUSCode(data[0]) - radius.Identifier = RADIUSIdentifier(data[1]) - radius.Length = RADIUSLength(binary.BigEndian.Uint16(data[2:4])) - - if int(radius.Length) > radiusMaximumRecordSizeInBytes { - df.SetTruncated() - return fmt.Errorf("RADIUS length %d too big", radius.Length) - } - - if int(radius.Length) < radiusMinimumRecordSizeInBytes { - df.SetTruncated() - return fmt.Errorf("RADIUS length %d too short", radius.Length) - } - - // RFC 2865 3. Packet Format - // `If the packet is shorter than the Length field indicates, it MUST be silently discarded.` - if int(radius.Length) > len(data) { - df.SetTruncated() - return fmt.Errorf("RADIUS length %d too big", radius.Length) - } - - // RFC 2865 3. Packet Format - // `Octets outside the range of the Length field MUST be treated as padding and ignored on reception.` - if int(radius.Length) < len(data) { - df.SetTruncated() - data = data[:radius.Length] - } - - copy(radius.Authenticator[:], data[4:20]) - - if len(data) == radiusMinimumRecordSizeInBytes { - return nil - } - - pos := radiusMinimumRecordSizeInBytes - for { - if len(data) == pos { - break - } - - if len(data[pos:]) < radiusAttributesMinimumRecordSizeInBytes { - df.SetTruncated() - return fmt.Errorf("RADIUS attributes length %d too short", len(data[pos:])) - } - - attr := RADIUSAttribute{} - attr.Type = RADIUSAttributeType(data[pos]) - attr.Length = RADIUSAttributeLength(data[pos+1]) - - if int(attr.Length) > len(data[pos:]) { - df.SetTruncated() - return fmt.Errorf("RADIUS attributes length %d too big", attr.Length) - } - - if int(attr.Length) < radiusAttributesMinimumRecordSizeInBytes { - df.SetTruncated() - return fmt.Errorf("RADIUS attributes length %d too short", attr.Length) - } - - if int(attr.Length) > radiusAttributesMinimumRecordSizeInBytes { - attr.Value = make([]byte, attr.Length-2) - copy(attr.Value[:], data[pos+2:pos+int(attr.Length)]) - radius.Attributes = append(radius.Attributes, attr) - } - - pos += int(attr.Length) - } - - for _, v := range radius.Attributes { - if v.Type == RADIUSAttributeTypeEAPMessage { - radius.BaseLayer.Payload = append(radius.BaseLayer.Payload, v.Value...) - } - } - - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (radius *RADIUS) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - plen, err := radius.Len() - if err != nil { - return err - } - - if opts.FixLengths { - radius.Length = RADIUSLength(plen) - } - - data, err := b.PrependBytes(plen) - if err != nil { - return err - } - - data[0] = byte(radius.Code) - data[1] = byte(radius.Identifier) - binary.BigEndian.PutUint16(data[2:], uint16(radius.Length)) - copy(data[4:20], radius.Authenticator[:]) - - pos := radiusMinimumRecordSizeInBytes - for _, v := range radius.Attributes { - if opts.FixLengths { - v.Length, err = attributeValueLength(v.Value) - if err != nil { - return err - } - } - - data[pos] = byte(v.Type) - data[pos+1] = byte(v.Length) - copy(data[pos+2:], v.Value[:]) - - pos += len(v.Value) + 2 // Added Type and Length - } - - return nil -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode. -func (radius *RADIUS) CanDecode() gopacket.LayerClass { - return LayerTypeRADIUS -} - -// NextLayerType returns the layer type contained by this DecodingLayer. -func (radius *RADIUS) NextLayerType() gopacket.LayerType { - if len(radius.BaseLayer.Payload) > 0 { - return LayerTypeEAP - } else { - return gopacket.LayerTypeZero - } -} - -// Payload returns the EAP Type-Data for EAP-Message attributes. -func (radius *RADIUS) Payload() []byte { - return radius.BaseLayer.Payload -} - -func decodeRADIUS(data []byte, p gopacket.PacketBuilder) error { - radius := &RADIUS{} - err := radius.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(radius) - p.SetApplicationLayer(radius) - next := radius.NextLayerType() - if next == gopacket.LayerTypeZero { - return nil - } - return p.NextDecoder(next) -} - -func attributeValueLength(v []byte) (RADIUSAttributeLength, error) { - n := len(v) - if n > 255 { - return 0, fmt.Errorf("RADIUS attribute value length %d too long", n) - } else { - return RADIUSAttributeLength(n), nil - } -} diff --git a/vendor/github.com/google/gopacket/layers/rmcp.go b/vendor/github.com/google/gopacket/layers/rmcp.go deleted file mode 100644 index 5474fee4ad6..00000000000 --- a/vendor/github.com/google/gopacket/layers/rmcp.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2019 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be found -// in the LICENSE file in the root of the source tree. - -package layers - -// This file implements the ASF-RMCP header specified in section 3.2.2.2 of -// https://www.dmtf.org/sites/default/files/standards/documents/DSP0136.pdf - -import ( - "fmt" - - "github.com/google/gopacket" -) - -// RMCPClass is the class of a RMCP layer's payload, e.g. ASF or IPMI. This is a -// 4-bit unsigned int on the wire; all but 6 (ASF), 7 (IPMI) and 8 (OEM-defined) -// are currently reserved. -type RMCPClass uint8 - -// LayerType returns the payload layer type corresponding to a RMCP class. -func (c RMCPClass) LayerType() gopacket.LayerType { - if lt := rmcpClassLayerTypes[uint8(c)]; lt != 0 { - return lt - } - return gopacket.LayerTypePayload -} - -func (c RMCPClass) String() string { - return fmt.Sprintf("%v(%v)", uint8(c), c.LayerType()) -} - -const ( - // RMCPVersion1 identifies RMCP v1.0 in the Version header field. Lower - // values are considered legacy, while higher values are reserved by the - // specification. - RMCPVersion1 uint8 = 0x06 - - // RMCPNormal indicates a "normal" message, i.e. not an acknowledgement. - RMCPNormal uint8 = 0 - - // RMCPAck indicates a message is acknowledging a received normal message. - RMCPAck uint8 = 1 << 7 - - // RMCPClassASF identifies an RMCP message as containing an ASF-RMCP - // payload. - RMCPClassASF RMCPClass = 0x06 - - // RMCPClassIPMI identifies an RMCP message as containing an IPMI payload. - RMCPClassIPMI RMCPClass = 0x07 - - // RMCPClassOEM identifies an RMCP message as containing an OEM-defined - // payload. - RMCPClassOEM RMCPClass = 0x08 -) - -var ( - rmcpClassLayerTypes = [16]gopacket.LayerType{ - RMCPClassASF: LayerTypeASF, - // RMCPClassIPMI is to implement; RMCPClassOEM is deliberately not - // implemented, so we return LayerTypePayload - } -) - -// RegisterRMCPLayerType allows specifying that the payload of a RMCP packet of -// a certain class should processed by the provided layer type. This overrides -// any existing registrations, including defaults. -func RegisterRMCPLayerType(c RMCPClass, l gopacket.LayerType) { - rmcpClassLayerTypes[c] = l -} - -// RMCP describes the format of an RMCP header, which forms a UDP payload. See -// section 3.2.2.2. -type RMCP struct { - BaseLayer - - // Version identifies the version of the RMCP header. 0x06 indicates RMCP - // v1.0; lower values are legacy, higher values are reserved. - Version uint8 - - // Sequence is the sequence number assicated with the message. Note that - // this rolls over to 0 after 254, not 255. Seq num 255 indicates the - // receiver must not send an ACK. - Sequence uint8 - - // Ack indicates whether this packet is an acknowledgement. If it is, the - // payload will be empty. - Ack bool - - // Class idicates the structure of the payload. There are only 2^4 valid - // values, however there is no uint4 data type. N.B. the Ack bit has been - // split off into another field. The most significant 4 bits of this field - // will always be 0. - Class RMCPClass -} - -// LayerType returns LayerTypeRMCP. It partially satisfies Layer and -// SerializableLayer. -func (*RMCP) LayerType() gopacket.LayerType { - return LayerTypeRMCP -} - -// CanDecode returns LayerTypeRMCP. It partially satisfies DecodingLayer. -func (r *RMCP) CanDecode() gopacket.LayerClass { - return r.LayerType() -} - -// DecodeFromBytes makes the layer represent the provided bytes. It partially -// satisfies DecodingLayer. -func (r *RMCP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 4 { - df.SetTruncated() - return fmt.Errorf("invalid RMCP header, length %v less than 4", - len(data)) - } - - r.BaseLayer.Contents = data[:4] - r.BaseLayer.Payload = data[4:] - - r.Version = uint8(data[0]) - // 1 byte reserved - r.Sequence = uint8(data[2]) - r.Ack = data[3]&RMCPAck != 0 - r.Class = RMCPClass(data[3] & 0xF) - return nil -} - -// NextLayerType returns the data layer of this RMCP layer. This partially -// satisfies DecodingLayer. -func (r *RMCP) NextLayerType() gopacket.LayerType { - return r.Class.LayerType() -} - -// Payload returns the data layer. It partially satisfies ApplicationLayer. -func (r *RMCP) Payload() []byte { - return r.BaseLayer.Payload -} - -// SerializeTo writes the serialized fom of this layer into the SerializeBuffer, -// partially satisfying SerializableLayer. -func (r *RMCP) SerializeTo(b gopacket.SerializeBuffer, _ gopacket.SerializeOptions) error { - // The IPMI v1.5 spec contains a pad byte for frame sizes of certain lengths - // to work around issues in LAN chips. This is no longer necessary as of - // IPMI v2.0 (renamed to "legacy pad") so we do not attempt to add it. The - // same approach is taken by FreeIPMI: - // http://git.savannah.gnu.org/cgit/freeipmi.git/tree/libfreeipmi/interface/ipmi-lan-interface.c?id=b5ffcd38317daf42074458879f4c55ba6804a595#n836 - bytes, err := b.PrependBytes(4) - if err != nil { - return err - } - bytes[0] = r.Version - bytes[1] = 0x00 - bytes[2] = r.Sequence - bytes[3] = bool2uint8(r.Ack)<<7 | uint8(r.Class) // thanks, BFD layer - return nil -} - -// decodeRMCP decodes the byte slice into an RMCP type, and sets the application -// layer to it. -func decodeRMCP(data []byte, p gopacket.PacketBuilder) error { - rmcp := &RMCP{} - err := rmcp.DecodeFromBytes(data, p) - p.AddLayer(rmcp) - p.SetApplicationLayer(rmcp) - if err != nil { - return err - } - return p.NextDecoder(rmcp.NextLayerType()) -} diff --git a/vendor/github.com/google/gopacket/layers/rudp.go b/vendor/github.com/google/gopacket/layers/rudp.go deleted file mode 100644 index 8435129b947..00000000000 --- a/vendor/github.com/google/gopacket/layers/rudp.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "fmt" - "github.com/google/gopacket" -) - -type RUDP struct { - BaseLayer - SYN, ACK, EACK, RST, NUL bool - Version uint8 - HeaderLength uint8 - SrcPort, DstPort RUDPPort - DataLength uint16 - Seq, Ack, Checksum uint32 - VariableHeaderArea []byte - // RUDPHeaderSyn contains SYN information for the RUDP packet, - // if the SYN flag is set - *RUDPHeaderSYN - // RUDPHeaderEack contains EACK information for the RUDP packet, - // if the EACK flag is set. - *RUDPHeaderEACK -} - -type RUDPHeaderSYN struct { - MaxOutstandingSegments, MaxSegmentSize, OptionFlags uint16 -} - -type RUDPHeaderEACK struct { - SeqsReceivedOK []uint32 -} - -// LayerType returns gopacket.LayerTypeRUDP. -func (r *RUDP) LayerType() gopacket.LayerType { return LayerTypeRUDP } - -func decodeRUDP(data []byte, p gopacket.PacketBuilder) error { - r := &RUDP{ - SYN: data[0]&0x80 != 0, - ACK: data[0]&0x40 != 0, - EACK: data[0]&0x20 != 0, - RST: data[0]&0x10 != 0, - NUL: data[0]&0x08 != 0, - Version: data[0] & 0x3, - HeaderLength: data[1], - SrcPort: RUDPPort(data[2]), - DstPort: RUDPPort(data[3]), - DataLength: binary.BigEndian.Uint16(data[4:6]), - Seq: binary.BigEndian.Uint32(data[6:10]), - Ack: binary.BigEndian.Uint32(data[10:14]), - Checksum: binary.BigEndian.Uint32(data[14:18]), - } - if r.HeaderLength < 9 { - return fmt.Errorf("RUDP packet with too-short header length %d", r.HeaderLength) - } - hlen := int(r.HeaderLength) * 2 - r.Contents = data[:hlen] - r.Payload = data[hlen : hlen+int(r.DataLength)] - r.VariableHeaderArea = data[18:hlen] - headerData := r.VariableHeaderArea - switch { - case r.SYN: - if len(headerData) != 6 { - return fmt.Errorf("RUDP packet invalid SYN header length: %d", len(headerData)) - } - r.RUDPHeaderSYN = &RUDPHeaderSYN{ - MaxOutstandingSegments: binary.BigEndian.Uint16(headerData[:2]), - MaxSegmentSize: binary.BigEndian.Uint16(headerData[2:4]), - OptionFlags: binary.BigEndian.Uint16(headerData[4:6]), - } - case r.EACK: - if len(headerData)%4 != 0 { - return fmt.Errorf("RUDP packet invalid EACK header length: %d", len(headerData)) - } - r.RUDPHeaderEACK = &RUDPHeaderEACK{make([]uint32, len(headerData)/4)} - for i := 0; i < len(headerData); i += 4 { - r.SeqsReceivedOK[i/4] = binary.BigEndian.Uint32(headerData[i : i+4]) - } - } - p.AddLayer(r) - p.SetTransportLayer(r) - return p.NextDecoder(gopacket.LayerTypePayload) -} - -func (r *RUDP) TransportFlow() gopacket.Flow { - return gopacket.NewFlow(EndpointRUDPPort, []byte{byte(r.SrcPort)}, []byte{byte(r.DstPort)}) -} diff --git a/vendor/github.com/google/gopacket/layers/sctp.go b/vendor/github.com/google/gopacket/layers/sctp.go deleted file mode 100644 index 511176e560f..00000000000 --- a/vendor/github.com/google/gopacket/layers/sctp.go +++ /dev/null @@ -1,746 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "hash/crc32" - - "github.com/google/gopacket" -) - -// SCTP contains information on the top level of an SCTP packet. -type SCTP struct { - BaseLayer - SrcPort, DstPort SCTPPort - VerificationTag uint32 - Checksum uint32 - sPort, dPort []byte -} - -// LayerType returns gopacket.LayerTypeSCTP -func (s *SCTP) LayerType() gopacket.LayerType { return LayerTypeSCTP } - -func decodeSCTP(data []byte, p gopacket.PacketBuilder) error { - sctp := &SCTP{} - err := sctp.DecodeFromBytes(data, p) - p.AddLayer(sctp) - p.SetTransportLayer(sctp) - if err != nil { - return err - } - return p.NextDecoder(sctpChunkTypePrefixDecoder) -} - -var sctpChunkTypePrefixDecoder = gopacket.DecodeFunc(decodeWithSCTPChunkTypePrefix) - -// TransportFlow returns a flow based on the source and destination SCTP port. -func (s *SCTP) TransportFlow() gopacket.Flow { - return gopacket.NewFlow(EndpointSCTPPort, s.sPort, s.dPort) -} - -func decodeWithSCTPChunkTypePrefix(data []byte, p gopacket.PacketBuilder) error { - chunkType := SCTPChunkType(data[0]) - return chunkType.Decode(data, p) -} - -// SerializeTo is for gopacket.SerializableLayer. -func (s SCTP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(12) - if err != nil { - return err - } - binary.BigEndian.PutUint16(bytes[0:2], uint16(s.SrcPort)) - binary.BigEndian.PutUint16(bytes[2:4], uint16(s.DstPort)) - binary.BigEndian.PutUint32(bytes[4:8], s.VerificationTag) - if opts.ComputeChecksums { - // Note: MakeTable(Castagnoli) actually only creates the table once, then - // passes back a singleton on every other call, so this shouldn't cause - // excessive memory allocation. - binary.LittleEndian.PutUint32(bytes[8:12], crc32.Checksum(b.Bytes(), crc32.MakeTable(crc32.Castagnoli))) - } - return nil -} - -func (sctp *SCTP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 12 { - return errors.New("Invalid SCTP common header length") - } - sctp.SrcPort = SCTPPort(binary.BigEndian.Uint16(data[:2])) - sctp.sPort = data[:2] - sctp.DstPort = SCTPPort(binary.BigEndian.Uint16(data[2:4])) - sctp.dPort = data[2:4] - sctp.VerificationTag = binary.BigEndian.Uint32(data[4:8]) - sctp.Checksum = binary.BigEndian.Uint32(data[8:12]) - sctp.BaseLayer = BaseLayer{data[:12], data[12:]} - - return nil -} - -func (t *SCTP) CanDecode() gopacket.LayerClass { - return LayerTypeSCTP -} - -func (t *SCTP) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -// SCTPChunk contains the common fields in all SCTP chunks. -type SCTPChunk struct { - BaseLayer - Type SCTPChunkType - Flags uint8 - Length uint16 - // ActualLength is the total length of an SCTP chunk, including padding. - // SCTP chunks start and end on 4-byte boundaries. So if a chunk has a length - // of 18, it means that it has data up to and including byte 18, then padding - // up to the next 4-byte boundary, 20. In this case, Length would be 18, and - // ActualLength would be 20. - ActualLength int -} - -func roundUpToNearest4(i int) int { - if i%4 == 0 { - return i - } - return i + 4 - (i % 4) -} - -func decodeSCTPChunk(data []byte) (SCTPChunk, error) { - length := binary.BigEndian.Uint16(data[2:4]) - if length < 4 { - return SCTPChunk{}, errors.New("invalid SCTP chunk length") - } - actual := roundUpToNearest4(int(length)) - ct := SCTPChunkType(data[0]) - - // For SCTP Data, use a separate layer for the payload - delta := 0 - if ct == SCTPChunkTypeData { - delta = int(actual) - int(length) - actual = 16 - } - - return SCTPChunk{ - Type: ct, - Flags: data[1], - Length: length, - ActualLength: actual, - BaseLayer: BaseLayer{data[:actual], data[actual : len(data)-delta]}, - }, nil -} - -// SCTPParameter is a TLV parameter inside a SCTPChunk. -type SCTPParameter struct { - Type uint16 - Length uint16 - ActualLength int - Value []byte -} - -func decodeSCTPParameter(data []byte) SCTPParameter { - length := binary.BigEndian.Uint16(data[2:4]) - return SCTPParameter{ - Type: binary.BigEndian.Uint16(data[0:2]), - Length: length, - Value: data[4:length], - ActualLength: roundUpToNearest4(int(length)), - } -} - -func (p SCTPParameter) Bytes() []byte { - length := 4 + len(p.Value) - data := make([]byte, roundUpToNearest4(length)) - binary.BigEndian.PutUint16(data[0:2], p.Type) - binary.BigEndian.PutUint16(data[2:4], uint16(length)) - copy(data[4:], p.Value) - return data -} - -// SCTPUnknownChunkType is the layer type returned when we don't recognize the -// chunk type. Since there's a length in a known location, we can skip over -// it even if we don't know what it is, and continue parsing the rest of the -// chunks. This chunk is stored as an ErrorLayer in the packet. -type SCTPUnknownChunkType struct { - SCTPChunk - bytes []byte -} - -func decodeSCTPChunkTypeUnknown(data []byte, p gopacket.PacketBuilder) error { - chunk, err := decodeSCTPChunk(data) - if err != nil { - return err - } - sc := &SCTPUnknownChunkType{SCTPChunk: chunk} - sc.bytes = data[:sc.ActualLength] - p.AddLayer(sc) - p.SetErrorLayer(sc) - return p.NextDecoder(gopacket.DecodeFunc(decodeWithSCTPChunkTypePrefix)) -} - -// SerializeTo is for gopacket.SerializableLayer. -func (s SCTPUnknownChunkType) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(s.ActualLength) - if err != nil { - return err - } - copy(bytes, s.bytes) - return nil -} - -// LayerType returns gopacket.LayerTypeSCTPUnknownChunkType. -func (s *SCTPUnknownChunkType) LayerType() gopacket.LayerType { return LayerTypeSCTPUnknownChunkType } - -// Payload returns all bytes in this header, including the decoded Type, Length, -// and Flags. -func (s *SCTPUnknownChunkType) Payload() []byte { return s.bytes } - -// Error implements ErrorLayer. -func (s *SCTPUnknownChunkType) Error() error { - return fmt.Errorf("No decode method available for SCTP chunk type %s", s.Type) -} - -// SCTPData is the SCTP Data chunk layer. -type SCTPData struct { - SCTPChunk - Unordered, BeginFragment, EndFragment bool - TSN uint32 - StreamId uint16 - StreamSequence uint16 - PayloadProtocol SCTPPayloadProtocol -} - -// LayerType returns gopacket.LayerTypeSCTPData. -func (s *SCTPData) LayerType() gopacket.LayerType { return LayerTypeSCTPData } - -// SCTPPayloadProtocol represents a payload protocol -type SCTPPayloadProtocol uint32 - -// SCTPPayloadProtocol constonts from http://www.iana.org/assignments/sctp-parameters/sctp-parameters.xhtml -const ( - SCTPProtocolReserved SCTPPayloadProtocol = 0 - SCTPPayloadUIA = 1 - SCTPPayloadM2UA = 2 - SCTPPayloadM3UA = 3 - SCTPPayloadSUA = 4 - SCTPPayloadM2PA = 5 - SCTPPayloadV5UA = 6 - SCTPPayloadH248 = 7 - SCTPPayloadBICC = 8 - SCTPPayloadTALI = 9 - SCTPPayloadDUA = 10 - SCTPPayloadASAP = 11 - SCTPPayloadENRP = 12 - SCTPPayloadH323 = 13 - SCTPPayloadQIPC = 14 - SCTPPayloadSIMCO = 15 - SCTPPayloadDDPSegment = 16 - SCTPPayloadDDPStream = 17 - SCTPPayloadS1AP = 18 -) - -func (p SCTPPayloadProtocol) String() string { - switch p { - case SCTPProtocolReserved: - return "Reserved" - case SCTPPayloadUIA: - return "UIA" - case SCTPPayloadM2UA: - return "M2UA" - case SCTPPayloadM3UA: - return "M3UA" - case SCTPPayloadSUA: - return "SUA" - case SCTPPayloadM2PA: - return "M2PA" - case SCTPPayloadV5UA: - return "V5UA" - case SCTPPayloadH248: - return "H.248" - case SCTPPayloadBICC: - return "BICC" - case SCTPPayloadTALI: - return "TALI" - case SCTPPayloadDUA: - return "DUA" - case SCTPPayloadASAP: - return "ASAP" - case SCTPPayloadENRP: - return "ENRP" - case SCTPPayloadH323: - return "H.323" - case SCTPPayloadQIPC: - return "QIPC" - case SCTPPayloadSIMCO: - return "SIMCO" - case SCTPPayloadDDPSegment: - return "DDPSegment" - case SCTPPayloadDDPStream: - return "DDPStream" - case SCTPPayloadS1AP: - return "S1AP" - } - return fmt.Sprintf("Unknown(%d)", p) -} - -func decodeSCTPData(data []byte, p gopacket.PacketBuilder) error { - chunk, err := decodeSCTPChunk(data) - if err != nil { - return err - } - sc := &SCTPData{ - SCTPChunk: chunk, - Unordered: data[1]&0x4 != 0, - BeginFragment: data[1]&0x2 != 0, - EndFragment: data[1]&0x1 != 0, - TSN: binary.BigEndian.Uint32(data[4:8]), - StreamId: binary.BigEndian.Uint16(data[8:10]), - StreamSequence: binary.BigEndian.Uint16(data[10:12]), - PayloadProtocol: SCTPPayloadProtocol(binary.BigEndian.Uint32(data[12:16])), - } - // Length is the length in bytes of the data, INCLUDING the 16-byte header. - p.AddLayer(sc) - return p.NextDecoder(gopacket.LayerTypePayload) -} - -// SerializeTo is for gopacket.SerializableLayer. -func (sc SCTPData) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - payload := b.Bytes() - // Pad the payload to a 32 bit boundary - if rem := len(payload) % 4; rem != 0 { - b.AppendBytes(4 - rem) - } - length := 16 - bytes, err := b.PrependBytes(length) - if err != nil { - return err - } - bytes[0] = uint8(sc.Type) - flags := uint8(0) - if sc.Unordered { - flags |= 0x4 - } - if sc.BeginFragment { - flags |= 0x2 - } - if sc.EndFragment { - flags |= 0x1 - } - bytes[1] = flags - binary.BigEndian.PutUint16(bytes[2:4], uint16(length+len(payload))) - binary.BigEndian.PutUint32(bytes[4:8], sc.TSN) - binary.BigEndian.PutUint16(bytes[8:10], sc.StreamId) - binary.BigEndian.PutUint16(bytes[10:12], sc.StreamSequence) - binary.BigEndian.PutUint32(bytes[12:16], uint32(sc.PayloadProtocol)) - return nil -} - -// SCTPInitParameter is a parameter for an SCTP Init or InitAck packet. -type SCTPInitParameter SCTPParameter - -// SCTPInit is used as the return value for both SCTPInit and SCTPInitAck -// messages. -type SCTPInit struct { - SCTPChunk - InitiateTag uint32 - AdvertisedReceiverWindowCredit uint32 - OutboundStreams, InboundStreams uint16 - InitialTSN uint32 - Parameters []SCTPInitParameter -} - -// LayerType returns either gopacket.LayerTypeSCTPInit or gopacket.LayerTypeSCTPInitAck. -func (sc *SCTPInit) LayerType() gopacket.LayerType { - if sc.Type == SCTPChunkTypeInitAck { - return LayerTypeSCTPInitAck - } - // sc.Type == SCTPChunkTypeInit - return LayerTypeSCTPInit -} - -func decodeSCTPInit(data []byte, p gopacket.PacketBuilder) error { - chunk, err := decodeSCTPChunk(data) - if err != nil { - return err - } - sc := &SCTPInit{ - SCTPChunk: chunk, - InitiateTag: binary.BigEndian.Uint32(data[4:8]), - AdvertisedReceiverWindowCredit: binary.BigEndian.Uint32(data[8:12]), - OutboundStreams: binary.BigEndian.Uint16(data[12:14]), - InboundStreams: binary.BigEndian.Uint16(data[14:16]), - InitialTSN: binary.BigEndian.Uint32(data[16:20]), - } - paramData := data[20:sc.ActualLength] - for len(paramData) > 0 { - p := SCTPInitParameter(decodeSCTPParameter(paramData)) - paramData = paramData[p.ActualLength:] - sc.Parameters = append(sc.Parameters, p) - } - p.AddLayer(sc) - return p.NextDecoder(gopacket.DecodeFunc(decodeWithSCTPChunkTypePrefix)) -} - -// SerializeTo is for gopacket.SerializableLayer. -func (sc SCTPInit) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - var payload []byte - for _, param := range sc.Parameters { - payload = append(payload, SCTPParameter(param).Bytes()...) - } - length := 20 + len(payload) - bytes, err := b.PrependBytes(roundUpToNearest4(length)) - if err != nil { - return err - } - bytes[0] = uint8(sc.Type) - bytes[1] = sc.Flags - binary.BigEndian.PutUint16(bytes[2:4], uint16(length)) - binary.BigEndian.PutUint32(bytes[4:8], sc.InitiateTag) - binary.BigEndian.PutUint32(bytes[8:12], sc.AdvertisedReceiverWindowCredit) - binary.BigEndian.PutUint16(bytes[12:14], sc.OutboundStreams) - binary.BigEndian.PutUint16(bytes[14:16], sc.InboundStreams) - binary.BigEndian.PutUint32(bytes[16:20], sc.InitialTSN) - copy(bytes[20:], payload) - return nil -} - -// SCTPSack is the SCTP Selective ACK chunk layer. -type SCTPSack struct { - SCTPChunk - CumulativeTSNAck uint32 - AdvertisedReceiverWindowCredit uint32 - NumGapACKs, NumDuplicateTSNs uint16 - GapACKs []uint16 - DuplicateTSNs []uint32 -} - -// LayerType return LayerTypeSCTPSack -func (sc *SCTPSack) LayerType() gopacket.LayerType { - return LayerTypeSCTPSack -} - -func decodeSCTPSack(data []byte, p gopacket.PacketBuilder) error { - chunk, err := decodeSCTPChunk(data) - if err != nil { - return err - } - sc := &SCTPSack{ - SCTPChunk: chunk, - CumulativeTSNAck: binary.BigEndian.Uint32(data[4:8]), - AdvertisedReceiverWindowCredit: binary.BigEndian.Uint32(data[8:12]), - NumGapACKs: binary.BigEndian.Uint16(data[12:14]), - NumDuplicateTSNs: binary.BigEndian.Uint16(data[14:16]), - } - // We maximize gapAcks and dupTSNs here so we're not allocating tons - // of memory based on a user-controlable field. Our maximums are not exact, - // but should give us sane defaults... we'll still hit slice boundaries and - // fail if the user-supplied values are too high (in the for loops below), but - // the amount of memory we'll have allocated because of that should be small - // (< sc.ActualLength) - gapAcks := sc.SCTPChunk.ActualLength / 2 - dupTSNs := (sc.SCTPChunk.ActualLength - gapAcks*2) / 4 - if gapAcks > int(sc.NumGapACKs) { - gapAcks = int(sc.NumGapACKs) - } - if dupTSNs > int(sc.NumDuplicateTSNs) { - dupTSNs = int(sc.NumDuplicateTSNs) - } - sc.GapACKs = make([]uint16, 0, gapAcks) - sc.DuplicateTSNs = make([]uint32, 0, dupTSNs) - bytesRemaining := data[16:] - for i := 0; i < int(sc.NumGapACKs); i++ { - sc.GapACKs = append(sc.GapACKs, binary.BigEndian.Uint16(bytesRemaining[:2])) - bytesRemaining = bytesRemaining[2:] - } - for i := 0; i < int(sc.NumDuplicateTSNs); i++ { - sc.DuplicateTSNs = append(sc.DuplicateTSNs, binary.BigEndian.Uint32(bytesRemaining[:4])) - bytesRemaining = bytesRemaining[4:] - } - p.AddLayer(sc) - return p.NextDecoder(gopacket.DecodeFunc(decodeWithSCTPChunkTypePrefix)) -} - -// SerializeTo is for gopacket.SerializableLayer. -func (sc SCTPSack) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - length := 16 + 2*len(sc.GapACKs) + 4*len(sc.DuplicateTSNs) - bytes, err := b.PrependBytes(roundUpToNearest4(length)) - if err != nil { - return err - } - bytes[0] = uint8(sc.Type) - bytes[1] = sc.Flags - binary.BigEndian.PutUint16(bytes[2:4], uint16(length)) - binary.BigEndian.PutUint32(bytes[4:8], sc.CumulativeTSNAck) - binary.BigEndian.PutUint32(bytes[8:12], sc.AdvertisedReceiverWindowCredit) - binary.BigEndian.PutUint16(bytes[12:14], uint16(len(sc.GapACKs))) - binary.BigEndian.PutUint16(bytes[14:16], uint16(len(sc.DuplicateTSNs))) - for i, v := range sc.GapACKs { - binary.BigEndian.PutUint16(bytes[16+i*2:], v) - } - offset := 16 + 2*len(sc.GapACKs) - for i, v := range sc.DuplicateTSNs { - binary.BigEndian.PutUint32(bytes[offset+i*4:], v) - } - return nil -} - -// SCTPHeartbeatParameter is the parameter type used by SCTP heartbeat and -// heartbeat ack layers. -type SCTPHeartbeatParameter SCTPParameter - -// SCTPHeartbeat is the SCTP heartbeat layer, also used for heatbeat ack. -type SCTPHeartbeat struct { - SCTPChunk - Parameters []SCTPHeartbeatParameter -} - -// LayerType returns gopacket.LayerTypeSCTPHeartbeat. -func (sc *SCTPHeartbeat) LayerType() gopacket.LayerType { - if sc.Type == SCTPChunkTypeHeartbeatAck { - return LayerTypeSCTPHeartbeatAck - } - // sc.Type == SCTPChunkTypeHeartbeat - return LayerTypeSCTPHeartbeat -} - -func decodeSCTPHeartbeat(data []byte, p gopacket.PacketBuilder) error { - chunk, err := decodeSCTPChunk(data) - if err != nil { - return err - } - sc := &SCTPHeartbeat{ - SCTPChunk: chunk, - } - paramData := data[4:sc.Length] - for len(paramData) > 0 { - p := SCTPHeartbeatParameter(decodeSCTPParameter(paramData)) - paramData = paramData[p.ActualLength:] - sc.Parameters = append(sc.Parameters, p) - } - p.AddLayer(sc) - return p.NextDecoder(gopacket.DecodeFunc(decodeWithSCTPChunkTypePrefix)) -} - -// SerializeTo is for gopacket.SerializableLayer. -func (sc SCTPHeartbeat) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - var payload []byte - for _, param := range sc.Parameters { - payload = append(payload, SCTPParameter(param).Bytes()...) - } - length := 4 + len(payload) - - bytes, err := b.PrependBytes(roundUpToNearest4(length)) - if err != nil { - return err - } - bytes[0] = uint8(sc.Type) - bytes[1] = sc.Flags - binary.BigEndian.PutUint16(bytes[2:4], uint16(length)) - copy(bytes[4:], payload) - return nil -} - -// SCTPErrorParameter is the parameter type used by SCTP Abort and Error layers. -type SCTPErrorParameter SCTPParameter - -// SCTPError is the SCTP error layer, also used for SCTP aborts. -type SCTPError struct { - SCTPChunk - Parameters []SCTPErrorParameter -} - -// LayerType returns LayerTypeSCTPAbort or LayerTypeSCTPError. -func (sc *SCTPError) LayerType() gopacket.LayerType { - if sc.Type == SCTPChunkTypeAbort { - return LayerTypeSCTPAbort - } - // sc.Type == SCTPChunkTypeError - return LayerTypeSCTPError -} - -func decodeSCTPError(data []byte, p gopacket.PacketBuilder) error { - // remarkably similar to decodeSCTPHeartbeat ;) - chunk, err := decodeSCTPChunk(data) - if err != nil { - return err - } - sc := &SCTPError{ - SCTPChunk: chunk, - } - paramData := data[4:sc.Length] - for len(paramData) > 0 { - p := SCTPErrorParameter(decodeSCTPParameter(paramData)) - paramData = paramData[p.ActualLength:] - sc.Parameters = append(sc.Parameters, p) - } - p.AddLayer(sc) - return p.NextDecoder(gopacket.DecodeFunc(decodeWithSCTPChunkTypePrefix)) -} - -// SerializeTo is for gopacket.SerializableLayer. -func (sc SCTPError) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - var payload []byte - for _, param := range sc.Parameters { - payload = append(payload, SCTPParameter(param).Bytes()...) - } - length := 4 + len(payload) - - bytes, err := b.PrependBytes(roundUpToNearest4(length)) - if err != nil { - return err - } - bytes[0] = uint8(sc.Type) - bytes[1] = sc.Flags - binary.BigEndian.PutUint16(bytes[2:4], uint16(length)) - copy(bytes[4:], payload) - return nil -} - -// SCTPShutdown is the SCTP shutdown layer. -type SCTPShutdown struct { - SCTPChunk - CumulativeTSNAck uint32 -} - -// LayerType returns gopacket.LayerTypeSCTPShutdown. -func (sc *SCTPShutdown) LayerType() gopacket.LayerType { return LayerTypeSCTPShutdown } - -func decodeSCTPShutdown(data []byte, p gopacket.PacketBuilder) error { - chunk, err := decodeSCTPChunk(data) - if err != nil { - return err - } - sc := &SCTPShutdown{ - SCTPChunk: chunk, - CumulativeTSNAck: binary.BigEndian.Uint32(data[4:8]), - } - p.AddLayer(sc) - return p.NextDecoder(gopacket.DecodeFunc(decodeWithSCTPChunkTypePrefix)) -} - -// SerializeTo is for gopacket.SerializableLayer. -func (sc SCTPShutdown) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(8) - if err != nil { - return err - } - bytes[0] = uint8(sc.Type) - bytes[1] = sc.Flags - binary.BigEndian.PutUint16(bytes[2:4], 8) - binary.BigEndian.PutUint32(bytes[4:8], sc.CumulativeTSNAck) - return nil -} - -// SCTPShutdownAck is the SCTP shutdown layer. -type SCTPShutdownAck struct { - SCTPChunk -} - -// LayerType returns gopacket.LayerTypeSCTPShutdownAck. -func (sc *SCTPShutdownAck) LayerType() gopacket.LayerType { return LayerTypeSCTPShutdownAck } - -func decodeSCTPShutdownAck(data []byte, p gopacket.PacketBuilder) error { - chunk, err := decodeSCTPChunk(data) - if err != nil { - return err - } - sc := &SCTPShutdownAck{ - SCTPChunk: chunk, - } - p.AddLayer(sc) - return p.NextDecoder(gopacket.DecodeFunc(decodeWithSCTPChunkTypePrefix)) -} - -// SerializeTo is for gopacket.SerializableLayer. -func (sc SCTPShutdownAck) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(4) - if err != nil { - return err - } - bytes[0] = uint8(sc.Type) - bytes[1] = sc.Flags - binary.BigEndian.PutUint16(bytes[2:4], 4) - return nil -} - -// SCTPCookieEcho is the SCTP Cookie Echo layer. -type SCTPCookieEcho struct { - SCTPChunk - Cookie []byte -} - -// LayerType returns gopacket.LayerTypeSCTPCookieEcho. -func (sc *SCTPCookieEcho) LayerType() gopacket.LayerType { return LayerTypeSCTPCookieEcho } - -func decodeSCTPCookieEcho(data []byte, p gopacket.PacketBuilder) error { - chunk, err := decodeSCTPChunk(data) - if err != nil { - return err - } - sc := &SCTPCookieEcho{ - SCTPChunk: chunk, - } - sc.Cookie = data[4:sc.Length] - p.AddLayer(sc) - return p.NextDecoder(gopacket.DecodeFunc(decodeWithSCTPChunkTypePrefix)) -} - -// SerializeTo is for gopacket.SerializableLayer. -func (sc SCTPCookieEcho) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - length := 4 + len(sc.Cookie) - bytes, err := b.PrependBytes(roundUpToNearest4(length)) - if err != nil { - return err - } - bytes[0] = uint8(sc.Type) - bytes[1] = sc.Flags - binary.BigEndian.PutUint16(bytes[2:4], uint16(length)) - copy(bytes[4:], sc.Cookie) - return nil -} - -// This struct is used by all empty SCTP chunks (currently CookieAck and -// ShutdownComplete). -type SCTPEmptyLayer struct { - SCTPChunk -} - -// LayerType returns either gopacket.LayerTypeSCTPShutdownComplete or -// LayerTypeSCTPCookieAck. -func (sc *SCTPEmptyLayer) LayerType() gopacket.LayerType { - if sc.Type == SCTPChunkTypeShutdownComplete { - return LayerTypeSCTPShutdownComplete - } - // sc.Type == SCTPChunkTypeCookieAck - return LayerTypeSCTPCookieAck -} - -func decodeSCTPEmptyLayer(data []byte, p gopacket.PacketBuilder) error { - chunk, err := decodeSCTPChunk(data) - if err != nil { - return err - } - sc := &SCTPEmptyLayer{ - SCTPChunk: chunk, - } - p.AddLayer(sc) - return p.NextDecoder(gopacket.DecodeFunc(decodeWithSCTPChunkTypePrefix)) -} - -// SerializeTo is for gopacket.SerializableLayer. -func (sc SCTPEmptyLayer) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(4) - if err != nil { - return err - } - bytes[0] = uint8(sc.Type) - bytes[1] = sc.Flags - binary.BigEndian.PutUint16(bytes[2:4], 4) - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/sflow.go b/vendor/github.com/google/gopacket/layers/sflow.go deleted file mode 100644 index bc1c9733ba5..00000000000 --- a/vendor/github.com/google/gopacket/layers/sflow.go +++ /dev/null @@ -1,2567 +0,0 @@ -// Copyright 2014 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -/* -This layer decodes SFlow version 5 datagrams. - -The specification can be found here: http://sflow.org/sflow_version_5.txt - -Additional developer information about sflow can be found at: -http://sflow.org/developers/specifications.php - -And SFlow in general: -http://sflow.org/index.php - -Two forms of sample data are defined: compact and expanded. The -Specification has this to say: - - Compact and expand forms of counter and flow samples are defined. - An agent must not mix compact/expanded encodings. If an agent - will never use ifIndex numbers >= 2^24 then it must use compact - encodings for all interfaces. Otherwise the expanded formats must - be used for all interfaces. - -This decoder only supports the compact form, because that is the only -one for which data was available. - -The datagram is composed of one or more samples of type flow or counter, -and each sample is composed of one or more records describing the sample. -A sample is a single instance of sampled inforamtion, and each record in -the sample gives additional / supplimentary information about the sample. - -The following sample record types are supported: - - Raw Packet Header - opaque = flow_data; enterprise = 0; format = 1 - - Extended Switch Data - opaque = flow_data; enterprise = 0; format = 1001 - - Extended Router Data - opaque = flow_data; enterprise = 0; format = 1002 - - Extended Gateway Data - opaque = flow_data; enterprise = 0; format = 1003 - - Extended User Data - opaque = flow_data; enterprise = 0; format = 1004 - - Extended URL Data - opaque = flow_data; enterprise = 0; format = 1005 - -The following types of counter records are supported: - - Generic Interface Counters - see RFC 2233 - opaque = counter_data; enterprise = 0; format = 1 - - Ethernet Interface Counters - see RFC 2358 - opaque = counter_data; enterprise = 0; format = 2 - -SFlow is encoded using XDR (RFC4506). There are a few places -where the standard 4-byte fields are partitioned into two -bitfields of different lengths. I'm not sure why the designers -chose to pack together two values like this in some places, and -in others they use the entire 4-byte value to store a number that -will never be more than a few bits. In any case, there are a couple -of types defined to handle the decoding of these bitfields, and -that's why they're there. */ - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - "net" - - "github.com/google/gopacket" -) - -// SFlowRecord holds both flow sample records and counter sample records. -// A Record is the structure that actually holds the sampled data -// and / or counters. -type SFlowRecord interface { -} - -// SFlowDataSource encodes a 2-bit SFlowSourceFormat in its most significant -// 2 bits, and an SFlowSourceValue in its least significant 30 bits. -// These types and values define the meaning of the inteface information -// presented in the sample metadata. -type SFlowDataSource int32 - -func (sdc SFlowDataSource) decode() (SFlowSourceFormat, SFlowSourceValue) { - leftField := sdc >> 30 - rightField := uint32(0x3FFFFFFF) & uint32(sdc) - return SFlowSourceFormat(leftField), SFlowSourceValue(rightField) -} - -type SFlowDataSourceExpanded struct { - SourceIDClass SFlowSourceFormat - SourceIDIndex SFlowSourceValue -} - -func (sdce SFlowDataSourceExpanded) decode() (SFlowSourceFormat, SFlowSourceValue) { - leftField := sdce.SourceIDClass >> 30 - rightField := uint32(0x3FFFFFFF) & uint32(sdce.SourceIDIndex) - return SFlowSourceFormat(leftField), SFlowSourceValue(rightField) -} - -type SFlowSourceFormat uint32 - -type SFlowSourceValue uint32 - -const ( - SFlowTypeSingleInterface SFlowSourceFormat = 0 - SFlowTypePacketDiscarded SFlowSourceFormat = 1 - SFlowTypeMultipleDestinations SFlowSourceFormat = 2 -) - -func (sdf SFlowSourceFormat) String() string { - switch sdf { - case SFlowTypeSingleInterface: - return "Single Interface" - case SFlowTypePacketDiscarded: - return "Packet Discarded" - case SFlowTypeMultipleDestinations: - return "Multiple Destinations" - default: - return "UNKNOWN" - } -} - -func decodeSFlow(data []byte, p gopacket.PacketBuilder) error { - s := &SFlowDatagram{} - err := s.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(s) - p.SetApplicationLayer(s) - return nil -} - -// SFlowDatagram is the outermost container which holds some basic information -// about the reporting agent, and holds at least one sample record -type SFlowDatagram struct { - BaseLayer - - DatagramVersion uint32 - AgentAddress net.IP - SubAgentID uint32 - SequenceNumber uint32 - AgentUptime uint32 - SampleCount uint32 - FlowSamples []SFlowFlowSample - CounterSamples []SFlowCounterSample -} - -// An SFlow datagram's outer container has the following -// structure: - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int sFlow version (2|4|5) | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int IP version of the Agent (1=v4|2=v6) | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / Agent IP address (v4=4byte|v6=16byte) / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int sub agent id | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int datagram sequence number | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int switch uptime in ms | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int n samples in datagram | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / n samples / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -// SFlowDataFormat encodes the EnterpriseID in the most -// significant 12 bits, and the SampleType in the least significant -// 20 bits. -type SFlowDataFormat uint32 - -func (sdf SFlowDataFormat) decode() (SFlowEnterpriseID, SFlowSampleType) { - leftField := sdf >> 12 - rightField := uint32(0xFFF) & uint32(sdf) - return SFlowEnterpriseID(leftField), SFlowSampleType(rightField) -} - -// SFlowEnterpriseID is used to differentiate between the -// official SFlow standard, and other, vendor-specific -// types of flow data. (Similiar to SNMP's enterprise MIB -// OIDs) Only the office SFlow Enterprise ID is decoded -// here. -type SFlowEnterpriseID uint32 - -const ( - SFlowStandard SFlowEnterpriseID = 0 -) - -func (eid SFlowEnterpriseID) String() string { - switch eid { - case SFlowStandard: - return "Standard SFlow" - default: - return "" - } -} - -func (eid SFlowEnterpriseID) GetType() SFlowEnterpriseID { - return SFlowStandard -} - -// SFlowSampleType specifies the type of sample. Only flow samples -// and counter samples are supported -type SFlowSampleType uint32 - -const ( - SFlowTypeFlowSample SFlowSampleType = 1 - SFlowTypeCounterSample SFlowSampleType = 2 - SFlowTypeExpandedFlowSample SFlowSampleType = 3 - SFlowTypeExpandedCounterSample SFlowSampleType = 4 -) - -func (st SFlowSampleType) GetType() SFlowSampleType { - switch st { - case SFlowTypeFlowSample: - return SFlowTypeFlowSample - case SFlowTypeCounterSample: - return SFlowTypeCounterSample - case SFlowTypeExpandedFlowSample: - return SFlowTypeExpandedFlowSample - case SFlowTypeExpandedCounterSample: - return SFlowTypeExpandedCounterSample - default: - panic("Invalid Sample Type") - } -} - -func (st SFlowSampleType) String() string { - switch st { - case SFlowTypeFlowSample: - return "Flow Sample" - case SFlowTypeCounterSample: - return "Counter Sample" - case SFlowTypeExpandedFlowSample: - return "Expanded Flow Sample" - case SFlowTypeExpandedCounterSample: - return "Expanded Counter Sample" - default: - return "" - } -} - -func (s *SFlowDatagram) LayerType() gopacket.LayerType { return LayerTypeSFlow } - -func (d *SFlowDatagram) Payload() []byte { return nil } - -func (d *SFlowDatagram) CanDecode() gopacket.LayerClass { return LayerTypeSFlow } - -func (d *SFlowDatagram) NextLayerType() gopacket.LayerType { return gopacket.LayerTypePayload } - -// SFlowIPType determines what form the IP address being decoded will -// take. This is an XDR union type allowing for both IPv4 and IPv6 -type SFlowIPType uint32 - -const ( - SFlowIPv4 SFlowIPType = 1 - SFlowIPv6 SFlowIPType = 2 -) - -func (s SFlowIPType) String() string { - switch s { - case SFlowIPv4: - return "IPv4" - case SFlowIPv6: - return "IPv6" - default: - return "" - } -} - -func (s SFlowIPType) Length() int { - switch s { - case SFlowIPv4: - return 4 - case SFlowIPv6: - return 16 - default: - return 0 - } -} - -func (s *SFlowDatagram) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - var agentAddressType SFlowIPType - - data, s.DatagramVersion = data[4:], binary.BigEndian.Uint32(data[:4]) - data, agentAddressType = data[4:], SFlowIPType(binary.BigEndian.Uint32(data[:4])) - data, s.AgentAddress = data[agentAddressType.Length():], data[:agentAddressType.Length()] - data, s.SubAgentID = data[4:], binary.BigEndian.Uint32(data[:4]) - data, s.SequenceNumber = data[4:], binary.BigEndian.Uint32(data[:4]) - data, s.AgentUptime = data[4:], binary.BigEndian.Uint32(data[:4]) - data, s.SampleCount = data[4:], binary.BigEndian.Uint32(data[:4]) - - if s.SampleCount < 1 { - return fmt.Errorf("SFlow Datagram has invalid sample length: %d", s.SampleCount) - } - for i := uint32(0); i < s.SampleCount; i++ { - sdf := SFlowDataFormat(binary.BigEndian.Uint32(data[:4])) - _, sampleType := sdf.decode() - switch sampleType { - case SFlowTypeFlowSample: - if flowSample, err := decodeFlowSample(&data, false); err == nil { - s.FlowSamples = append(s.FlowSamples, flowSample) - } else { - return err - } - case SFlowTypeCounterSample: - if counterSample, err := decodeCounterSample(&data, false); err == nil { - s.CounterSamples = append(s.CounterSamples, counterSample) - } else { - return err - } - case SFlowTypeExpandedFlowSample: - if flowSample, err := decodeFlowSample(&data, true); err == nil { - s.FlowSamples = append(s.FlowSamples, flowSample) - } else { - return err - } - case SFlowTypeExpandedCounterSample: - if counterSample, err := decodeCounterSample(&data, true); err == nil { - s.CounterSamples = append(s.CounterSamples, counterSample) - } else { - return err - } - - default: - return fmt.Errorf("Unsupported SFlow sample type %d", sampleType) - } - } - return nil -} - -// SFlowFlowSample represents a sampled packet and contains -// one or more records describing the packet -type SFlowFlowSample struct { - EnterpriseID SFlowEnterpriseID - Format SFlowSampleType - SampleLength uint32 - SequenceNumber uint32 - SourceIDClass SFlowSourceFormat - SourceIDIndex SFlowSourceValue - SamplingRate uint32 - SamplePool uint32 - Dropped uint32 - InputInterfaceFormat uint32 - InputInterface uint32 - OutputInterfaceFormat uint32 - OutputInterface uint32 - RecordCount uint32 - Records []SFlowRecord -} - -// Flow samples have the following structure. Note -// the bit fields to encode the Enterprise ID and the -// Flow record format: type 1 - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | sample length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int sample sequence number | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// |id type | src id index value | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int sampling rate | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int sample pool | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int drops | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int input ifIndex | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int output ifIndex | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int number of records | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / flow records / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -// Flow samples have the following structure. -// Flow record format: type 3 - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | sample length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int sample sequence number | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int src id type | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int src id index value | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int sampling rate | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int sample pool | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int drops | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int input interface format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int input interface value | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int output interface format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int output interface value | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int number of records | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / flow records / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -type SFlowFlowDataFormat uint32 - -func (fdf SFlowFlowDataFormat) decode() (SFlowEnterpriseID, SFlowFlowRecordType) { - leftField := fdf >> 12 - rightField := uint32(0xFFF) & uint32(fdf) - return SFlowEnterpriseID(leftField), SFlowFlowRecordType(rightField) -} - -func (fs SFlowFlowSample) GetRecords() []SFlowRecord { - return fs.Records -} - -func (fs SFlowFlowSample) GetType() SFlowSampleType { - return SFlowTypeFlowSample -} - -func skipRecord(data *[]byte) { - recordLength := int(binary.BigEndian.Uint32((*data)[4:])) - *data = (*data)[(recordLength+((4-recordLength)%4))+8:] -} - -func decodeFlowSample(data *[]byte, expanded bool) (SFlowFlowSample, error) { - s := SFlowFlowSample{} - var sdf SFlowDataFormat - *data, sdf = (*data)[4:], SFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - var sdc SFlowDataSource - - s.EnterpriseID, s.Format = sdf.decode() - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.SampleLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.SequenceNumber = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if expanded { - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.SourceIDClass = (*data)[4:], SFlowSourceFormat(binary.BigEndian.Uint32((*data)[:4])) - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.SourceIDIndex = (*data)[4:], SFlowSourceValue(binary.BigEndian.Uint32((*data)[:4])) - } else { - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, sdc = (*data)[4:], SFlowDataSource(binary.BigEndian.Uint32((*data)[:4])) - s.SourceIDClass, s.SourceIDIndex = sdc.decode() - } - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.SamplingRate = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.SamplePool = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.Dropped = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - if expanded { - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.InputInterfaceFormat = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.InputInterface = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.OutputInterfaceFormat = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.OutputInterface = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - } else { - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.InputInterface = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.OutputInterface = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - } - if len(*data) < 4 { - return SFlowFlowSample{}, errors.New("ethernet counters too small") - } - *data, s.RecordCount = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - for i := uint32(0); i < s.RecordCount; i++ { - rdf := SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - enterpriseID, flowRecordType := rdf.decode() - - // Try to decode when EnterpriseID is 0 signaling - // default sflow structs are used according specification - // Unexpected behavior detected for e.g. with pmacct - if enterpriseID == 0 { - switch flowRecordType { - case SFlowTypeRawPacketFlow: - if record, err := decodeRawPacketFlowRecord(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedUserFlow: - if record, err := decodeExtendedUserFlow(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedUrlFlow: - if record, err := decodeExtendedURLRecord(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedSwitchFlow: - if record, err := decodeExtendedSwitchFlowRecord(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedRouterFlow: - if record, err := decodeExtendedRouterFlowRecord(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedGatewayFlow: - if record, err := decodeExtendedGatewayFlowRecord(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeEthernetFrameFlow: - if record, err := decodeEthernetFrameFlowRecord(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeIpv4Flow: - if record, err := decodeSFlowIpv4Record(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeIpv6Flow: - if record, err := decodeSFlowIpv6Record(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedMlpsFlow: - // TODO - skipRecord(data) - return s, errors.New("skipping TypeExtendedMlpsFlow") - case SFlowTypeExtendedNatFlow: - // TODO - skipRecord(data) - return s, errors.New("skipping TypeExtendedNatFlow") - case SFlowTypeExtendedMlpsTunnelFlow: - // TODO - skipRecord(data) - return s, errors.New("skipping TypeExtendedMlpsTunnelFlow") - case SFlowTypeExtendedMlpsVcFlow: - // TODO - skipRecord(data) - return s, errors.New("skipping TypeExtendedMlpsVcFlow") - case SFlowTypeExtendedMlpsFecFlow: - // TODO - skipRecord(data) - return s, errors.New("skipping TypeExtendedMlpsFecFlow") - case SFlowTypeExtendedMlpsLvpFecFlow: - // TODO - skipRecord(data) - return s, errors.New("skipping TypeExtendedMlpsLvpFecFlow") - case SFlowTypeExtendedVlanFlow: - // TODO - skipRecord(data) - return s, errors.New("skipping TypeExtendedVlanFlow") - case SFlowTypeExtendedIpv4TunnelEgressFlow: - if record, err := decodeExtendedIpv4TunnelEgress(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedIpv4TunnelIngressFlow: - if record, err := decodeExtendedIpv4TunnelIngress(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedIpv6TunnelEgressFlow: - if record, err := decodeExtendedIpv6TunnelEgress(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedIpv6TunnelIngressFlow: - if record, err := decodeExtendedIpv6TunnelIngress(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedDecapsulateEgressFlow: - if record, err := decodeExtendedDecapsulateEgress(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedDecapsulateIngressFlow: - if record, err := decodeExtendedDecapsulateIngress(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedVniEgressFlow: - if record, err := decodeExtendedVniEgress(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeExtendedVniIngressFlow: - if record, err := decodeExtendedVniIngress(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - default: - return s, fmt.Errorf("Unsupported flow record type: %d", flowRecordType) - } - } else { - skipRecord(data) - } - } - return s, nil -} - -// Counter samples report information about various counter -// objects. Typically these are items like IfInOctets, or -// CPU / Memory stats, etc. SFlow will report these at regular -// intervals as configured on the agent. If one were sufficiently -// industrious, this could be used to replace the typical -// SNMP polling used for such things. -type SFlowCounterSample struct { - EnterpriseID SFlowEnterpriseID - Format SFlowSampleType - SampleLength uint32 - SequenceNumber uint32 - SourceIDClass SFlowSourceFormat - SourceIDIndex SFlowSourceValue - RecordCount uint32 - Records []SFlowRecord -} - -// Counter samples have the following structure: - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int sample sequence number | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// |id type | src id index value | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | int number of records | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / counter records / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -type SFlowCounterDataFormat uint32 - -func (cdf SFlowCounterDataFormat) decode() (SFlowEnterpriseID, SFlowCounterRecordType) { - leftField := cdf >> 12 - rightField := uint32(0xFFF) & uint32(cdf) - return SFlowEnterpriseID(leftField), SFlowCounterRecordType(rightField) -} - -// GetRecords will return a slice of interface types -// representing records. A type switch can be used to -// get at the underlying SFlowCounterRecordType. -func (cs SFlowCounterSample) GetRecords() []SFlowRecord { - return cs.Records -} - -// GetType will report the type of sample. Only the -// compact form of counter samples is supported -func (cs SFlowCounterSample) GetType() SFlowSampleType { - return SFlowTypeCounterSample -} - -type SFlowCounterRecordType uint32 - -const ( - SFlowTypeGenericInterfaceCounters SFlowCounterRecordType = 1 - SFlowTypeEthernetInterfaceCounters SFlowCounterRecordType = 2 - SFlowTypeTokenRingInterfaceCounters SFlowCounterRecordType = 3 - SFlowType100BaseVGInterfaceCounters SFlowCounterRecordType = 4 - SFlowTypeVLANCounters SFlowCounterRecordType = 5 - SFlowTypeLACPCounters SFlowCounterRecordType = 7 - SFlowTypeProcessorCounters SFlowCounterRecordType = 1001 - SFlowTypeOpenflowPortCounters SFlowCounterRecordType = 1004 - SFlowTypePORTNAMECounters SFlowCounterRecordType = 1005 - SFLowTypeAPPRESOURCESCounters SFlowCounterRecordType = 2203 - SFlowTypeOVSDPCounters SFlowCounterRecordType = 2207 -) - -func (cr SFlowCounterRecordType) String() string { - switch cr { - case SFlowTypeGenericInterfaceCounters: - return "Generic Interface Counters" - case SFlowTypeEthernetInterfaceCounters: - return "Ethernet Interface Counters" - case SFlowTypeTokenRingInterfaceCounters: - return "Token Ring Interface Counters" - case SFlowType100BaseVGInterfaceCounters: - return "100BaseVG Interface Counters" - case SFlowTypeVLANCounters: - return "VLAN Counters" - case SFlowTypeLACPCounters: - return "LACP Counters" - case SFlowTypeProcessorCounters: - return "Processor Counters" - case SFlowTypeOpenflowPortCounters: - return "Openflow Port Counters" - case SFlowTypePORTNAMECounters: - return "PORT NAME Counters" - case SFLowTypeAPPRESOURCESCounters: - return "App Resources Counters" - case SFlowTypeOVSDPCounters: - return "OVSDP Counters" - default: - return "" - - } -} - -func decodeCounterSample(data *[]byte, expanded bool) (SFlowCounterSample, error) { - s := SFlowCounterSample{} - var sdc SFlowDataSource - var sdce SFlowDataSourceExpanded - var sdf SFlowDataFormat - - *data, sdf = (*data)[4:], SFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - s.EnterpriseID, s.Format = sdf.decode() - *data, s.SampleLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, s.SequenceNumber = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if expanded { - *data, sdce = (*data)[8:], SFlowDataSourceExpanded{SFlowSourceFormat(binary.BigEndian.Uint32((*data)[:4])), SFlowSourceValue(binary.BigEndian.Uint32((*data)[4:8]))} - s.SourceIDClass, s.SourceIDIndex = sdce.decode() - } else { - *data, sdc = (*data)[4:], SFlowDataSource(binary.BigEndian.Uint32((*data)[:4])) - s.SourceIDClass, s.SourceIDIndex = sdc.decode() - } - *data, s.RecordCount = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - for i := uint32(0); i < s.RecordCount; i++ { - cdf := SFlowCounterDataFormat(binary.BigEndian.Uint32((*data)[:4])) - _, counterRecordType := cdf.decode() - switch counterRecordType { - case SFlowTypeGenericInterfaceCounters: - if record, err := decodeGenericInterfaceCounters(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeEthernetInterfaceCounters: - if record, err := decodeEthernetCounters(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeTokenRingInterfaceCounters: - skipRecord(data) - return s, errors.New("skipping TypeTokenRingInterfaceCounters") - case SFlowType100BaseVGInterfaceCounters: - skipRecord(data) - return s, errors.New("skipping Type100BaseVGInterfaceCounters") - case SFlowTypeVLANCounters: - if record, err := decodeVLANCounters(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeLACPCounters: - if record, err := decodeLACPCounters(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeProcessorCounters: - if record, err := decodeProcessorCounters(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeOpenflowPortCounters: - if record, err := decodeOpenflowportCounters(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypePORTNAMECounters: - if record, err := decodePortnameCounters(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFLowTypeAPPRESOURCESCounters: - if record, err := decodeAppresourcesCounters(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - case SFlowTypeOVSDPCounters: - if record, err := decodeOVSDPCounters(data); err == nil { - s.Records = append(s.Records, record) - } else { - return s, err - } - default: - return s, fmt.Errorf("Invalid counter record type: %d", counterRecordType) - } - } - return s, nil -} - -// SFlowBaseFlowRecord holds the fields common to all records -// of type SFlowFlowRecordType -type SFlowBaseFlowRecord struct { - EnterpriseID SFlowEnterpriseID - Format SFlowFlowRecordType - FlowDataLength uint32 -} - -func (bfr SFlowBaseFlowRecord) GetType() SFlowFlowRecordType { - return bfr.Format -} - -// SFlowFlowRecordType denotes what kind of Flow Record is -// represented. See RFC 3176 -type SFlowFlowRecordType uint32 - -const ( - SFlowTypeRawPacketFlow SFlowFlowRecordType = 1 - SFlowTypeEthernetFrameFlow SFlowFlowRecordType = 2 - SFlowTypeIpv4Flow SFlowFlowRecordType = 3 - SFlowTypeIpv6Flow SFlowFlowRecordType = 4 - SFlowTypeExtendedSwitchFlow SFlowFlowRecordType = 1001 - SFlowTypeExtendedRouterFlow SFlowFlowRecordType = 1002 - SFlowTypeExtendedGatewayFlow SFlowFlowRecordType = 1003 - SFlowTypeExtendedUserFlow SFlowFlowRecordType = 1004 - SFlowTypeExtendedUrlFlow SFlowFlowRecordType = 1005 - SFlowTypeExtendedMlpsFlow SFlowFlowRecordType = 1006 - SFlowTypeExtendedNatFlow SFlowFlowRecordType = 1007 - SFlowTypeExtendedMlpsTunnelFlow SFlowFlowRecordType = 1008 - SFlowTypeExtendedMlpsVcFlow SFlowFlowRecordType = 1009 - SFlowTypeExtendedMlpsFecFlow SFlowFlowRecordType = 1010 - SFlowTypeExtendedMlpsLvpFecFlow SFlowFlowRecordType = 1011 - SFlowTypeExtendedVlanFlow SFlowFlowRecordType = 1012 - SFlowTypeExtendedIpv4TunnelEgressFlow SFlowFlowRecordType = 1023 - SFlowTypeExtendedIpv4TunnelIngressFlow SFlowFlowRecordType = 1024 - SFlowTypeExtendedIpv6TunnelEgressFlow SFlowFlowRecordType = 1025 - SFlowTypeExtendedIpv6TunnelIngressFlow SFlowFlowRecordType = 1026 - SFlowTypeExtendedDecapsulateEgressFlow SFlowFlowRecordType = 1027 - SFlowTypeExtendedDecapsulateIngressFlow SFlowFlowRecordType = 1028 - SFlowTypeExtendedVniEgressFlow SFlowFlowRecordType = 1029 - SFlowTypeExtendedVniIngressFlow SFlowFlowRecordType = 1030 -) - -func (rt SFlowFlowRecordType) String() string { - switch rt { - case SFlowTypeRawPacketFlow: - return "Raw Packet Flow Record" - case SFlowTypeEthernetFrameFlow: - return "Ethernet Frame Flow Record" - case SFlowTypeIpv4Flow: - return "IPv4 Flow Record" - case SFlowTypeIpv6Flow: - return "IPv6 Flow Record" - case SFlowTypeExtendedSwitchFlow: - return "Extended Switch Flow Record" - case SFlowTypeExtendedRouterFlow: - return "Extended Router Flow Record" - case SFlowTypeExtendedGatewayFlow: - return "Extended Gateway Flow Record" - case SFlowTypeExtendedUserFlow: - return "Extended User Flow Record" - case SFlowTypeExtendedUrlFlow: - return "Extended URL Flow Record" - case SFlowTypeExtendedMlpsFlow: - return "Extended MPLS Flow Record" - case SFlowTypeExtendedNatFlow: - return "Extended NAT Flow Record" - case SFlowTypeExtendedMlpsTunnelFlow: - return "Extended MPLS Tunnel Flow Record" - case SFlowTypeExtendedMlpsVcFlow: - return "Extended MPLS VC Flow Record" - case SFlowTypeExtendedMlpsFecFlow: - return "Extended MPLS FEC Flow Record" - case SFlowTypeExtendedMlpsLvpFecFlow: - return "Extended MPLS LVP FEC Flow Record" - case SFlowTypeExtendedVlanFlow: - return "Extended VLAN Flow Record" - case SFlowTypeExtendedIpv4TunnelEgressFlow: - return "Extended IPv4 Tunnel Egress Record" - case SFlowTypeExtendedIpv4TunnelIngressFlow: - return "Extended IPv4 Tunnel Ingress Record" - case SFlowTypeExtendedIpv6TunnelEgressFlow: - return "Extended IPv6 Tunnel Egress Record" - case SFlowTypeExtendedIpv6TunnelIngressFlow: - return "Extended IPv6 Tunnel Ingress Record" - case SFlowTypeExtendedDecapsulateEgressFlow: - return "Extended Decapsulate Egress Record" - case SFlowTypeExtendedDecapsulateIngressFlow: - return "Extended Decapsulate Ingress Record" - case SFlowTypeExtendedVniEgressFlow: - return "Extended VNI Ingress Record" - case SFlowTypeExtendedVniIngressFlow: - return "Extended VNI Ingress Record" - default: - return "" - } -} - -// SFlowRawPacketFlowRecords hold information about a sampled -// packet grabbed as it transited the agent. This is -// perhaps the most useful and interesting record type, -// as it holds the headers of the sampled packet and -// can be used to build up a complete picture of the -// traffic patterns on a network. -// -// The raw packet header is sent back into gopacket for -// decoding, and the resulting gopackt.Packet is stored -// in the Header member -type SFlowRawPacketFlowRecord struct { - SFlowBaseFlowRecord - HeaderProtocol SFlowRawHeaderProtocol - FrameLength uint32 - PayloadRemoved uint32 - HeaderLength uint32 - Header gopacket.Packet -} - -// Raw packet record types have the following structure: - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Header Protocol | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Frame Length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Payload Removed | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Header Length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// \ Header \ -// \ \ -// \ \ -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -type SFlowRawHeaderProtocol uint32 - -const ( - SFlowProtoEthernet SFlowRawHeaderProtocol = 1 - SFlowProtoISO88024 SFlowRawHeaderProtocol = 2 - SFlowProtoISO88025 SFlowRawHeaderProtocol = 3 - SFlowProtoFDDI SFlowRawHeaderProtocol = 4 - SFlowProtoFrameRelay SFlowRawHeaderProtocol = 5 - SFlowProtoX25 SFlowRawHeaderProtocol = 6 - SFlowProtoPPP SFlowRawHeaderProtocol = 7 - SFlowProtoSMDS SFlowRawHeaderProtocol = 8 - SFlowProtoAAL5 SFlowRawHeaderProtocol = 9 - SFlowProtoAAL5_IP SFlowRawHeaderProtocol = 10 /* e.g. Cisco AAL5 mux */ - SFlowProtoIPv4 SFlowRawHeaderProtocol = 11 - SFlowProtoIPv6 SFlowRawHeaderProtocol = 12 - SFlowProtoMPLS SFlowRawHeaderProtocol = 13 - SFlowProtoPOS SFlowRawHeaderProtocol = 14 /* RFC 1662, 2615 */ -) - -func (sfhp SFlowRawHeaderProtocol) String() string { - switch sfhp { - case SFlowProtoEthernet: - return "ETHERNET-ISO88023" - case SFlowProtoISO88024: - return "ISO88024-TOKENBUS" - case SFlowProtoISO88025: - return "ISO88025-TOKENRING" - case SFlowProtoFDDI: - return "FDDI" - case SFlowProtoFrameRelay: - return "FRAME-RELAY" - case SFlowProtoX25: - return "X25" - case SFlowProtoPPP: - return "PPP" - case SFlowProtoSMDS: - return "SMDS" - case SFlowProtoAAL5: - return "AAL5" - case SFlowProtoAAL5_IP: - return "AAL5-IP" - case SFlowProtoIPv4: - return "IPv4" - case SFlowProtoIPv6: - return "IPv6" - case SFlowProtoMPLS: - return "MPLS" - case SFlowProtoPOS: - return "POS" - } - return "UNKNOWN" -} - -func decodeRawPacketFlowRecord(data *[]byte) (SFlowRawPacketFlowRecord, error) { - rec := SFlowRawPacketFlowRecord{} - header := []byte{} - var fdf SFlowFlowDataFormat - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - rec.EnterpriseID, rec.Format = fdf.decode() - *data, rec.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, rec.HeaderProtocol = (*data)[4:], SFlowRawHeaderProtocol(binary.BigEndian.Uint32((*data)[:4])) - *data, rec.FrameLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, rec.PayloadRemoved = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, rec.HeaderLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - headerLenWithPadding := int(rec.HeaderLength + ((4 - rec.HeaderLength) % 4)) - *data, header = (*data)[headerLenWithPadding:], (*data)[:headerLenWithPadding] - rec.Header = gopacket.NewPacket(header, LayerTypeEthernet, gopacket.Default) - return rec, nil -} - -// SFlowExtendedSwitchFlowRecord give additional information -// about the sampled packet if it's available. It's mainly -// useful for getting at the incoming and outgoing VLANs -// An agent may or may not provide this information. -type SFlowExtendedSwitchFlowRecord struct { - SFlowBaseFlowRecord - IncomingVLAN uint32 - IncomingVLANPriority uint32 - OutgoingVLAN uint32 - OutgoingVLANPriority uint32 -} - -// Extended switch records have the following structure: - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Incoming VLAN | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Incoming VLAN Priority | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Outgoing VLAN | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Outgoing VLAN Priority | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -func decodeExtendedSwitchFlowRecord(data *[]byte) (SFlowExtendedSwitchFlowRecord, error) { - es := SFlowExtendedSwitchFlowRecord{} - var fdf SFlowFlowDataFormat - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - es.EnterpriseID, es.Format = fdf.decode() - *data, es.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, es.IncomingVLAN = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, es.IncomingVLANPriority = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, es.OutgoingVLAN = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, es.OutgoingVLANPriority = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - return es, nil -} - -// SFlowExtendedRouterFlowRecord gives additional information -// about the layer 3 routing information used to forward -// the packet -type SFlowExtendedRouterFlowRecord struct { - SFlowBaseFlowRecord - NextHop net.IP - NextHopSourceMask uint32 - NextHopDestinationMask uint32 -} - -// Extended router records have the following structure: - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IP version of next hop router (1=v4|2=v6) | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / Next Hop address (v4=4byte|v6=16byte) / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Next Hop Source Mask | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Next Hop Destination Mask | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -func decodeExtendedRouterFlowRecord(data *[]byte) (SFlowExtendedRouterFlowRecord, error) { - er := SFlowExtendedRouterFlowRecord{} - var fdf SFlowFlowDataFormat - var extendedRouterAddressType SFlowIPType - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - er.EnterpriseID, er.Format = fdf.decode() - *data, er.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, extendedRouterAddressType = (*data)[4:], SFlowIPType(binary.BigEndian.Uint32((*data)[:4])) - *data, er.NextHop = (*data)[extendedRouterAddressType.Length():], (*data)[:extendedRouterAddressType.Length()] - *data, er.NextHopSourceMask = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, er.NextHopDestinationMask = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - return er, nil -} - -// SFlowExtendedGatewayFlowRecord describes information treasured by -// nework engineers everywhere: AS path information listing which -// BGP peer sent the packet, and various other BGP related info. -// This information is vital because it gives a picture of how much -// traffic is being sent from / received by various BGP peers. - -// Extended gateway records have the following structure: - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IP version of next hop router (1=v4|2=v6) | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / Next Hop address (v4=4byte|v6=16byte) / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | AS | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Source AS | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Peer AS | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | AS Path Count | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / AS Path / Sequence / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / Communities / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Local Pref | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -// AS Path / Sequence: - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | AS Source Type (Path=1 / Sequence=2) | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Path / Sequence length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / Path / Sequence Members / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -// Communities: - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | communitiy length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / communitiy Members / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -type SFlowExtendedGatewayFlowRecord struct { - SFlowBaseFlowRecord - NextHop net.IP - AS uint32 - SourceAS uint32 - PeerAS uint32 - ASPathCount uint32 - ASPath []SFlowASDestination - Communities []uint32 - LocalPref uint32 -} - -type SFlowASPathType uint32 - -const ( - SFlowASSet SFlowASPathType = 1 - SFlowASSequence SFlowASPathType = 2 -) - -func (apt SFlowASPathType) String() string { - switch apt { - case SFlowASSet: - return "AS Set" - case SFlowASSequence: - return "AS Sequence" - default: - return "" - } -} - -type SFlowASDestination struct { - Type SFlowASPathType - Count uint32 - Members []uint32 -} - -func (asd SFlowASDestination) String() string { - switch asd.Type { - case SFlowASSet: - return fmt.Sprint("AS Set:", asd.Members) - case SFlowASSequence: - return fmt.Sprint("AS Sequence:", asd.Members) - default: - return "" - } -} - -func (ad *SFlowASDestination) decodePath(data *[]byte) { - *data, ad.Type = (*data)[4:], SFlowASPathType(binary.BigEndian.Uint32((*data)[:4])) - *data, ad.Count = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - ad.Members = make([]uint32, ad.Count) - for i := uint32(0); i < ad.Count; i++ { - var member uint32 - *data, member = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - ad.Members[i] = member - } -} - -func decodeExtendedGatewayFlowRecord(data *[]byte) (SFlowExtendedGatewayFlowRecord, error) { - eg := SFlowExtendedGatewayFlowRecord{} - var fdf SFlowFlowDataFormat - var extendedGatewayAddressType SFlowIPType - var communitiesLength uint32 - var community uint32 - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - eg.EnterpriseID, eg.Format = fdf.decode() - *data, eg.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, extendedGatewayAddressType = (*data)[4:], SFlowIPType(binary.BigEndian.Uint32((*data)[:4])) - *data, eg.NextHop = (*data)[extendedGatewayAddressType.Length():], (*data)[:extendedGatewayAddressType.Length()] - *data, eg.AS = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, eg.SourceAS = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, eg.PeerAS = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, eg.ASPathCount = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - for i := uint32(0); i < eg.ASPathCount; i++ { - asPath := SFlowASDestination{} - asPath.decodePath(data) - eg.ASPath = append(eg.ASPath, asPath) - } - *data, communitiesLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - eg.Communities = make([]uint32, communitiesLength) - for j := uint32(0); j < communitiesLength; j++ { - *data, community = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - eg.Communities[j] = community - } - *data, eg.LocalPref = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - return eg, nil -} - -// ************************************************** -// Extended URL Flow Record -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | direction | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | URL | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Host | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -type SFlowURLDirection uint32 - -const ( - SFlowURLsrc SFlowURLDirection = 1 - SFlowURLdst SFlowURLDirection = 2 -) - -func (urld SFlowURLDirection) String() string { - switch urld { - case SFlowURLsrc: - return "Source address is the server" - case SFlowURLdst: - return "Destination address is the server" - default: - return "" - } -} - -type SFlowExtendedURLRecord struct { - SFlowBaseFlowRecord - Direction SFlowURLDirection - URL string - Host string -} - -func decodeExtendedURLRecord(data *[]byte) (SFlowExtendedURLRecord, error) { - eur := SFlowExtendedURLRecord{} - var fdf SFlowFlowDataFormat - var urlLen uint32 - var urlLenWithPad int - var hostLen uint32 - var hostLenWithPad int - var urlBytes []byte - var hostBytes []byte - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - eur.EnterpriseID, eur.Format = fdf.decode() - *data, eur.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, eur.Direction = (*data)[4:], SFlowURLDirection(binary.BigEndian.Uint32((*data)[:4])) - *data, urlLen = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - urlLenWithPad = int(urlLen + ((4 - urlLen) % 4)) - *data, urlBytes = (*data)[urlLenWithPad:], (*data)[:urlLenWithPad] - eur.URL = string(urlBytes[:urlLen]) - *data, hostLen = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - hostLenWithPad = int(hostLen + ((4 - hostLen) % 4)) - *data, hostBytes = (*data)[hostLenWithPad:], (*data)[:hostLenWithPad] - eur.Host = string(hostBytes[:hostLen]) - return eur, nil -} - -// ************************************************** -// Extended User Flow Record -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Source Character Set | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Source User Id | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Destination Character Set | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Destination User ID | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -type SFlowExtendedUserFlow struct { - SFlowBaseFlowRecord - SourceCharSet SFlowCharSet - SourceUserID string - DestinationCharSet SFlowCharSet - DestinationUserID string -} - -type SFlowCharSet uint32 - -const ( - SFlowCSunknown SFlowCharSet = 2 - SFlowCSASCII SFlowCharSet = 3 - SFlowCSISOLatin1 SFlowCharSet = 4 - SFlowCSISOLatin2 SFlowCharSet = 5 - SFlowCSISOLatin3 SFlowCharSet = 6 - SFlowCSISOLatin4 SFlowCharSet = 7 - SFlowCSISOLatinCyrillic SFlowCharSet = 8 - SFlowCSISOLatinArabic SFlowCharSet = 9 - SFlowCSISOLatinGreek SFlowCharSet = 10 - SFlowCSISOLatinHebrew SFlowCharSet = 11 - SFlowCSISOLatin5 SFlowCharSet = 12 - SFlowCSISOLatin6 SFlowCharSet = 13 - SFlowCSISOTextComm SFlowCharSet = 14 - SFlowCSHalfWidthKatakana SFlowCharSet = 15 - SFlowCSJISEncoding SFlowCharSet = 16 - SFlowCSShiftJIS SFlowCharSet = 17 - SFlowCSEUCPkdFmtJapanese SFlowCharSet = 18 - SFlowCSEUCFixWidJapanese SFlowCharSet = 19 - SFlowCSISO4UnitedKingdom SFlowCharSet = 20 - SFlowCSISO11SwedishForNames SFlowCharSet = 21 - SFlowCSISO15Italian SFlowCharSet = 22 - SFlowCSISO17Spanish SFlowCharSet = 23 - SFlowCSISO21German SFlowCharSet = 24 - SFlowCSISO60DanishNorwegian SFlowCharSet = 25 - SFlowCSISO69French SFlowCharSet = 26 - SFlowCSISO10646UTF1 SFlowCharSet = 27 - SFlowCSISO646basic1983 SFlowCharSet = 28 - SFlowCSINVARIANT SFlowCharSet = 29 - SFlowCSISO2IntlRefVersion SFlowCharSet = 30 - SFlowCSNATSSEFI SFlowCharSet = 31 - SFlowCSNATSSEFIADD SFlowCharSet = 32 - SFlowCSNATSDANO SFlowCharSet = 33 - SFlowCSNATSDANOADD SFlowCharSet = 34 - SFlowCSISO10Swedish SFlowCharSet = 35 - SFlowCSKSC56011987 SFlowCharSet = 36 - SFlowCSISO2022KR SFlowCharSet = 37 - SFlowCSEUCKR SFlowCharSet = 38 - SFlowCSISO2022JP SFlowCharSet = 39 - SFlowCSISO2022JP2 SFlowCharSet = 40 - SFlowCSISO13JISC6220jp SFlowCharSet = 41 - SFlowCSISO14JISC6220ro SFlowCharSet = 42 - SFlowCSISO16Portuguese SFlowCharSet = 43 - SFlowCSISO18Greek7Old SFlowCharSet = 44 - SFlowCSISO19LatinGreek SFlowCharSet = 45 - SFlowCSISO25French SFlowCharSet = 46 - SFlowCSISO27LatinGreek1 SFlowCharSet = 47 - SFlowCSISO5427Cyrillic SFlowCharSet = 48 - SFlowCSISO42JISC62261978 SFlowCharSet = 49 - SFlowCSISO47BSViewdata SFlowCharSet = 50 - SFlowCSISO49INIS SFlowCharSet = 51 - SFlowCSISO50INIS8 SFlowCharSet = 52 - SFlowCSISO51INISCyrillic SFlowCharSet = 53 - SFlowCSISO54271981 SFlowCharSet = 54 - SFlowCSISO5428Greek SFlowCharSet = 55 - SFlowCSISO57GB1988 SFlowCharSet = 56 - SFlowCSISO58GB231280 SFlowCharSet = 57 - SFlowCSISO61Norwegian2 SFlowCharSet = 58 - SFlowCSISO70VideotexSupp1 SFlowCharSet = 59 - SFlowCSISO84Portuguese2 SFlowCharSet = 60 - SFlowCSISO85Spanish2 SFlowCharSet = 61 - SFlowCSISO86Hungarian SFlowCharSet = 62 - SFlowCSISO87JISX0208 SFlowCharSet = 63 - SFlowCSISO88Greek7 SFlowCharSet = 64 - SFlowCSISO89ASMO449 SFlowCharSet = 65 - SFlowCSISO90 SFlowCharSet = 66 - SFlowCSISO91JISC62291984a SFlowCharSet = 67 - SFlowCSISO92JISC62991984b SFlowCharSet = 68 - SFlowCSISO93JIS62291984badd SFlowCharSet = 69 - SFlowCSISO94JIS62291984hand SFlowCharSet = 70 - SFlowCSISO95JIS62291984handadd SFlowCharSet = 71 - SFlowCSISO96JISC62291984kana SFlowCharSet = 72 - SFlowCSISO2033 SFlowCharSet = 73 - SFlowCSISO99NAPLPS SFlowCharSet = 74 - SFlowCSISO102T617bit SFlowCharSet = 75 - SFlowCSISO103T618bit SFlowCharSet = 76 - SFlowCSISO111ECMACyrillic SFlowCharSet = 77 - SFlowCSa71 SFlowCharSet = 78 - SFlowCSa72 SFlowCharSet = 79 - SFlowCSISO123CSAZ24341985gr SFlowCharSet = 80 - SFlowCSISO88596E SFlowCharSet = 81 - SFlowCSISO88596I SFlowCharSet = 82 - SFlowCSISO128T101G2 SFlowCharSet = 83 - SFlowCSISO88598E SFlowCharSet = 84 - SFlowCSISO88598I SFlowCharSet = 85 - SFlowCSISO139CSN369103 SFlowCharSet = 86 - SFlowCSISO141JUSIB1002 SFlowCharSet = 87 - SFlowCSISO143IECP271 SFlowCharSet = 88 - SFlowCSISO146Serbian SFlowCharSet = 89 - SFlowCSISO147Macedonian SFlowCharSet = 90 - SFlowCSISO150 SFlowCharSet = 91 - SFlowCSISO151Cuba SFlowCharSet = 92 - SFlowCSISO6937Add SFlowCharSet = 93 - SFlowCSISO153GOST1976874 SFlowCharSet = 94 - SFlowCSISO8859Supp SFlowCharSet = 95 - SFlowCSISO10367Box SFlowCharSet = 96 - SFlowCSISO158Lap SFlowCharSet = 97 - SFlowCSISO159JISX02121990 SFlowCharSet = 98 - SFlowCSISO646Danish SFlowCharSet = 99 - SFlowCSUSDK SFlowCharSet = 100 - SFlowCSDKUS SFlowCharSet = 101 - SFlowCSKSC5636 SFlowCharSet = 102 - SFlowCSUnicode11UTF7 SFlowCharSet = 103 - SFlowCSISO2022CN SFlowCharSet = 104 - SFlowCSISO2022CNEXT SFlowCharSet = 105 - SFlowCSUTF8 SFlowCharSet = 106 - SFlowCSISO885913 SFlowCharSet = 109 - SFlowCSISO885914 SFlowCharSet = 110 - SFlowCSISO885915 SFlowCharSet = 111 - SFlowCSISO885916 SFlowCharSet = 112 - SFlowCSGBK SFlowCharSet = 113 - SFlowCSGB18030 SFlowCharSet = 114 - SFlowCSOSDEBCDICDF0415 SFlowCharSet = 115 - SFlowCSOSDEBCDICDF03IRV SFlowCharSet = 116 - SFlowCSOSDEBCDICDF041 SFlowCharSet = 117 - SFlowCSISO115481 SFlowCharSet = 118 - SFlowCSKZ1048 SFlowCharSet = 119 - SFlowCSUnicode SFlowCharSet = 1000 - SFlowCSUCS4 SFlowCharSet = 1001 - SFlowCSUnicodeASCII SFlowCharSet = 1002 - SFlowCSUnicodeLatin1 SFlowCharSet = 1003 - SFlowCSUnicodeJapanese SFlowCharSet = 1004 - SFlowCSUnicodeIBM1261 SFlowCharSet = 1005 - SFlowCSUnicodeIBM1268 SFlowCharSet = 1006 - SFlowCSUnicodeIBM1276 SFlowCharSet = 1007 - SFlowCSUnicodeIBM1264 SFlowCharSet = 1008 - SFlowCSUnicodeIBM1265 SFlowCharSet = 1009 - SFlowCSUnicode11 SFlowCharSet = 1010 - SFlowCSSCSU SFlowCharSet = 1011 - SFlowCSUTF7 SFlowCharSet = 1012 - SFlowCSUTF16BE SFlowCharSet = 1013 - SFlowCSUTF16LE SFlowCharSet = 1014 - SFlowCSUTF16 SFlowCharSet = 1015 - SFlowCSCESU8 SFlowCharSet = 1016 - SFlowCSUTF32 SFlowCharSet = 1017 - SFlowCSUTF32BE SFlowCharSet = 1018 - SFlowCSUTF32LE SFlowCharSet = 1019 - SFlowCSBOCU1 SFlowCharSet = 1020 - SFlowCSWindows30Latin1 SFlowCharSet = 2000 - SFlowCSWindows31Latin1 SFlowCharSet = 2001 - SFlowCSWindows31Latin2 SFlowCharSet = 2002 - SFlowCSWindows31Latin5 SFlowCharSet = 2003 - SFlowCSHPRoman8 SFlowCharSet = 2004 - SFlowCSAdobeStandardEncoding SFlowCharSet = 2005 - SFlowCSVenturaUS SFlowCharSet = 2006 - SFlowCSVenturaInternational SFlowCharSet = 2007 - SFlowCSDECMCS SFlowCharSet = 2008 - SFlowCSPC850Multilingual SFlowCharSet = 2009 - SFlowCSPCp852 SFlowCharSet = 2010 - SFlowCSPC8CodePage437 SFlowCharSet = 2011 - SFlowCSPC8DanishNorwegian SFlowCharSet = 2012 - SFlowCSPC862LatinHebrew SFlowCharSet = 2013 - SFlowCSPC8Turkish SFlowCharSet = 2014 - SFlowCSIBMSymbols SFlowCharSet = 2015 - SFlowCSIBMThai SFlowCharSet = 2016 - SFlowCSHPLegal SFlowCharSet = 2017 - SFlowCSHPPiFont SFlowCharSet = 2018 - SFlowCSHPMath8 SFlowCharSet = 2019 - SFlowCSHPPSMath SFlowCharSet = 2020 - SFlowCSHPDesktop SFlowCharSet = 2021 - SFlowCSVenturaMath SFlowCharSet = 2022 - SFlowCSMicrosoftPublishing SFlowCharSet = 2023 - SFlowCSWindows31J SFlowCharSet = 2024 - SFlowCSGB2312 SFlowCharSet = 2025 - SFlowCSBig5 SFlowCharSet = 2026 - SFlowCSMacintosh SFlowCharSet = 2027 - SFlowCSIBM037 SFlowCharSet = 2028 - SFlowCSIBM038 SFlowCharSet = 2029 - SFlowCSIBM273 SFlowCharSet = 2030 - SFlowCSIBM274 SFlowCharSet = 2031 - SFlowCSIBM275 SFlowCharSet = 2032 - SFlowCSIBM277 SFlowCharSet = 2033 - SFlowCSIBM278 SFlowCharSet = 2034 - SFlowCSIBM280 SFlowCharSet = 2035 - SFlowCSIBM281 SFlowCharSet = 2036 - SFlowCSIBM284 SFlowCharSet = 2037 - SFlowCSIBM285 SFlowCharSet = 2038 - SFlowCSIBM290 SFlowCharSet = 2039 - SFlowCSIBM297 SFlowCharSet = 2040 - SFlowCSIBM420 SFlowCharSet = 2041 - SFlowCSIBM423 SFlowCharSet = 2042 - SFlowCSIBM424 SFlowCharSet = 2043 - SFlowCSIBM500 SFlowCharSet = 2044 - SFlowCSIBM851 SFlowCharSet = 2045 - SFlowCSIBM855 SFlowCharSet = 2046 - SFlowCSIBM857 SFlowCharSet = 2047 - SFlowCSIBM860 SFlowCharSet = 2048 - SFlowCSIBM861 SFlowCharSet = 2049 - SFlowCSIBM863 SFlowCharSet = 2050 - SFlowCSIBM864 SFlowCharSet = 2051 - SFlowCSIBM865 SFlowCharSet = 2052 - SFlowCSIBM868 SFlowCharSet = 2053 - SFlowCSIBM869 SFlowCharSet = 2054 - SFlowCSIBM870 SFlowCharSet = 2055 - SFlowCSIBM871 SFlowCharSet = 2056 - SFlowCSIBM880 SFlowCharSet = 2057 - SFlowCSIBM891 SFlowCharSet = 2058 - SFlowCSIBM903 SFlowCharSet = 2059 - SFlowCSIBBM904 SFlowCharSet = 2060 - SFlowCSIBM905 SFlowCharSet = 2061 - SFlowCSIBM918 SFlowCharSet = 2062 - SFlowCSIBM1026 SFlowCharSet = 2063 - SFlowCSIBMEBCDICATDE SFlowCharSet = 2064 - SFlowCSEBCDICATDEA SFlowCharSet = 2065 - SFlowCSEBCDICCAFR SFlowCharSet = 2066 - SFlowCSEBCDICDKNO SFlowCharSet = 2067 - SFlowCSEBCDICDKNOA SFlowCharSet = 2068 - SFlowCSEBCDICFISE SFlowCharSet = 2069 - SFlowCSEBCDICFISEA SFlowCharSet = 2070 - SFlowCSEBCDICFR SFlowCharSet = 2071 - SFlowCSEBCDICIT SFlowCharSet = 2072 - SFlowCSEBCDICPT SFlowCharSet = 2073 - SFlowCSEBCDICES SFlowCharSet = 2074 - SFlowCSEBCDICESA SFlowCharSet = 2075 - SFlowCSEBCDICESS SFlowCharSet = 2076 - SFlowCSEBCDICUK SFlowCharSet = 2077 - SFlowCSEBCDICUS SFlowCharSet = 2078 - SFlowCSUnknown8BiT SFlowCharSet = 2079 - SFlowCSMnemonic SFlowCharSet = 2080 - SFlowCSMnem SFlowCharSet = 2081 - SFlowCSVISCII SFlowCharSet = 2082 - SFlowCSVIQR SFlowCharSet = 2083 - SFlowCSKOI8R SFlowCharSet = 2084 - SFlowCSHZGB2312 SFlowCharSet = 2085 - SFlowCSIBM866 SFlowCharSet = 2086 - SFlowCSPC775Baltic SFlowCharSet = 2087 - SFlowCSKOI8U SFlowCharSet = 2088 - SFlowCSIBM00858 SFlowCharSet = 2089 - SFlowCSIBM00924 SFlowCharSet = 2090 - SFlowCSIBM01140 SFlowCharSet = 2091 - SFlowCSIBM01141 SFlowCharSet = 2092 - SFlowCSIBM01142 SFlowCharSet = 2093 - SFlowCSIBM01143 SFlowCharSet = 2094 - SFlowCSIBM01144 SFlowCharSet = 2095 - SFlowCSIBM01145 SFlowCharSet = 2096 - SFlowCSIBM01146 SFlowCharSet = 2097 - SFlowCSIBM01147 SFlowCharSet = 2098 - SFlowCSIBM01148 SFlowCharSet = 2099 - SFlowCSIBM01149 SFlowCharSet = 2100 - SFlowCSBig5HKSCS SFlowCharSet = 2101 - SFlowCSIBM1047 SFlowCharSet = 2102 - SFlowCSPTCP154 SFlowCharSet = 2103 - SFlowCSAmiga1251 SFlowCharSet = 2104 - SFlowCSKOI7switched SFlowCharSet = 2105 - SFlowCSBRF SFlowCharSet = 2106 - SFlowCSTSCII SFlowCharSet = 2107 - SFlowCSCP51932 SFlowCharSet = 2108 - SFlowCSWindows874 SFlowCharSet = 2109 - SFlowCSWindows1250 SFlowCharSet = 2250 - SFlowCSWindows1251 SFlowCharSet = 2251 - SFlowCSWindows1252 SFlowCharSet = 2252 - SFlowCSWindows1253 SFlowCharSet = 2253 - SFlowCSWindows1254 SFlowCharSet = 2254 - SFlowCSWindows1255 SFlowCharSet = 2255 - SFlowCSWindows1256 SFlowCharSet = 2256 - SFlowCSWindows1257 SFlowCharSet = 2257 - SFlowCSWindows1258 SFlowCharSet = 2258 - SFlowCSTIS620 SFlowCharSet = 2259 - SFlowCS50220 SFlowCharSet = 2260 - SFlowCSreserved SFlowCharSet = 3000 -) - -func decodeExtendedUserFlow(data *[]byte) (SFlowExtendedUserFlow, error) { - eu := SFlowExtendedUserFlow{} - var fdf SFlowFlowDataFormat - var srcUserLen uint32 - var srcUserLenWithPad int - var srcUserBytes []byte - var dstUserLen uint32 - var dstUserLenWithPad int - var dstUserBytes []byte - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - eu.EnterpriseID, eu.Format = fdf.decode() - *data, eu.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, eu.SourceCharSet = (*data)[4:], SFlowCharSet(binary.BigEndian.Uint32((*data)[:4])) - *data, srcUserLen = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - srcUserLenWithPad = int(srcUserLen + ((4 - srcUserLen) % 4)) - *data, srcUserBytes = (*data)[srcUserLenWithPad:], (*data)[:srcUserLenWithPad] - eu.SourceUserID = string(srcUserBytes[:srcUserLen]) - *data, eu.DestinationCharSet = (*data)[4:], SFlowCharSet(binary.BigEndian.Uint32((*data)[:4])) - *data, dstUserLen = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - dstUserLenWithPad = int(dstUserLen + ((4 - dstUserLen) % 4)) - *data, dstUserBytes = (*data)[dstUserLenWithPad:], (*data)[:dstUserLenWithPad] - eu.DestinationUserID = string(dstUserBytes[:dstUserLen]) - return eu, nil -} - -// ************************************************** -// Packet IP version 4 Record -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Protocol | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Source IPv4 | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Destination IPv4 | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Source Port | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Destionation Port | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | TCP Flags | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | TOS | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -type SFlowIpv4Record struct { - // The length of the IP packet excluding ower layer encapsulations - Length uint32 - // IP Protocol type (for example, TCP = 6, UDP = 17) - Protocol uint32 - // Source IP Address - IPSrc net.IP - // Destination IP Address - IPDst net.IP - // TCP/UDP source port number or equivalent - PortSrc uint32 - // TCP/UDP destination port number or equivalent - PortDst uint32 - // TCP flags - TCPFlags uint32 - // IP type of service - TOS uint32 -} - -func decodeSFlowIpv4Record(data *[]byte) (SFlowIpv4Record, error) { - si := SFlowIpv4Record{} - - *data, si.Length = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, si.Protocol = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, si.IPSrc = (*data)[4:], net.IP((*data)[:4]) - *data, si.IPDst = (*data)[4:], net.IP((*data)[:4]) - *data, si.PortSrc = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, si.PortDst = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, si.TCPFlags = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, si.TOS = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - return si, nil -} - -// ************************************************** -// Packet IP version 6 Record -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Protocol | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Source IPv4 | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Destination IPv4 | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Source Port | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Destionation Port | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | TCP Flags | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Priority | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -type SFlowIpv6Record struct { - // The length of the IP packet excluding ower layer encapsulations - Length uint32 - // IP Protocol type (for example, TCP = 6, UDP = 17) - Protocol uint32 - // Source IP Address - IPSrc net.IP - // Destination IP Address - IPDst net.IP - // TCP/UDP source port number or equivalent - PortSrc uint32 - // TCP/UDP destination port number or equivalent - PortDst uint32 - // TCP flags - TCPFlags uint32 - // IP priority - Priority uint32 -} - -func decodeSFlowIpv6Record(data *[]byte) (SFlowIpv6Record, error) { - si := SFlowIpv6Record{} - - *data, si.Length = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, si.Protocol = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, si.IPSrc = (*data)[16:], net.IP((*data)[:16]) - *data, si.IPDst = (*data)[16:], net.IP((*data)[:16]) - *data, si.PortSrc = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, si.PortDst = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, si.TCPFlags = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, si.Priority = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - return si, nil -} - -// ************************************************** -// Extended IPv4 Tunnel Egress -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / Packet IP version 4 Record / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -type SFlowExtendedIpv4TunnelEgressRecord struct { - SFlowBaseFlowRecord - SFlowIpv4Record SFlowIpv4Record -} - -func decodeExtendedIpv4TunnelEgress(data *[]byte) (SFlowExtendedIpv4TunnelEgressRecord, error) { - rec := SFlowExtendedIpv4TunnelEgressRecord{} - var fdf SFlowFlowDataFormat - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - rec.EnterpriseID, rec.Format = fdf.decode() - *data, rec.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - rec.SFlowIpv4Record, _ = decodeSFlowIpv4Record(data) - - return rec, nil -} - -// ************************************************** -// Extended IPv4 Tunnel Ingress -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / Packet IP version 4 Record / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -type SFlowExtendedIpv4TunnelIngressRecord struct { - SFlowBaseFlowRecord - SFlowIpv4Record SFlowIpv4Record -} - -func decodeExtendedIpv4TunnelIngress(data *[]byte) (SFlowExtendedIpv4TunnelIngressRecord, error) { - rec := SFlowExtendedIpv4TunnelIngressRecord{} - var fdf SFlowFlowDataFormat - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - rec.EnterpriseID, rec.Format = fdf.decode() - *data, rec.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - rec.SFlowIpv4Record, _ = decodeSFlowIpv4Record(data) - - return rec, nil -} - -// ************************************************** -// Extended IPv6 Tunnel Egress -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / Packet IP version 6 Record / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -type SFlowExtendedIpv6TunnelEgressRecord struct { - SFlowBaseFlowRecord - SFlowIpv6Record -} - -func decodeExtendedIpv6TunnelEgress(data *[]byte) (SFlowExtendedIpv6TunnelEgressRecord, error) { - rec := SFlowExtendedIpv6TunnelEgressRecord{} - var fdf SFlowFlowDataFormat - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - rec.EnterpriseID, rec.Format = fdf.decode() - *data, rec.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - rec.SFlowIpv6Record, _ = decodeSFlowIpv6Record(data) - - return rec, nil -} - -// ************************************************** -// Extended IPv6 Tunnel Ingress -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / Packet IP version 6 Record / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -type SFlowExtendedIpv6TunnelIngressRecord struct { - SFlowBaseFlowRecord - SFlowIpv6Record -} - -func decodeExtendedIpv6TunnelIngress(data *[]byte) (SFlowExtendedIpv6TunnelIngressRecord, error) { - rec := SFlowExtendedIpv6TunnelIngressRecord{} - var fdf SFlowFlowDataFormat - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - rec.EnterpriseID, rec.Format = fdf.decode() - *data, rec.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - rec.SFlowIpv6Record, _ = decodeSFlowIpv6Record(data) - - return rec, nil -} - -// ************************************************** -// Extended Decapsulate Egress -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Inner Header Offset | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -type SFlowExtendedDecapsulateEgressRecord struct { - SFlowBaseFlowRecord - InnerHeaderOffset uint32 -} - -func decodeExtendedDecapsulateEgress(data *[]byte) (SFlowExtendedDecapsulateEgressRecord, error) { - rec := SFlowExtendedDecapsulateEgressRecord{} - var fdf SFlowFlowDataFormat - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - rec.EnterpriseID, rec.Format = fdf.decode() - *data, rec.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, rec.InnerHeaderOffset = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - return rec, nil -} - -// ************************************************** -// Extended Decapsulate Ingress -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Inner Header Offset | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -type SFlowExtendedDecapsulateIngressRecord struct { - SFlowBaseFlowRecord - InnerHeaderOffset uint32 -} - -func decodeExtendedDecapsulateIngress(data *[]byte) (SFlowExtendedDecapsulateIngressRecord, error) { - rec := SFlowExtendedDecapsulateIngressRecord{} - var fdf SFlowFlowDataFormat - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - rec.EnterpriseID, rec.Format = fdf.decode() - *data, rec.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, rec.InnerHeaderOffset = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - return rec, nil -} - -// ************************************************** -// Extended VNI Egress -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | VNI | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -type SFlowExtendedVniEgressRecord struct { - SFlowBaseFlowRecord - VNI uint32 -} - -func decodeExtendedVniEgress(data *[]byte) (SFlowExtendedVniEgressRecord, error) { - rec := SFlowExtendedVniEgressRecord{} - var fdf SFlowFlowDataFormat - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - rec.EnterpriseID, rec.Format = fdf.decode() - *data, rec.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, rec.VNI = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - return rec, nil -} - -// ************************************************** -// Extended VNI Ingress -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | VNI | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -type SFlowExtendedVniIngressRecord struct { - SFlowBaseFlowRecord - VNI uint32 -} - -func decodeExtendedVniIngress(data *[]byte) (SFlowExtendedVniIngressRecord, error) { - rec := SFlowExtendedVniIngressRecord{} - var fdf SFlowFlowDataFormat - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - rec.EnterpriseID, rec.Format = fdf.decode() - *data, rec.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, rec.VNI = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - return rec, nil -} - -// ************************************************** -// Counter Record -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | counter length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / counter data / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -type SFlowBaseCounterRecord struct { - EnterpriseID SFlowEnterpriseID - Format SFlowCounterRecordType - FlowDataLength uint32 -} - -func (bcr SFlowBaseCounterRecord) GetType() SFlowCounterRecordType { - switch bcr.Format { - case SFlowTypeGenericInterfaceCounters: - return SFlowTypeGenericInterfaceCounters - case SFlowTypeEthernetInterfaceCounters: - return SFlowTypeEthernetInterfaceCounters - case SFlowTypeTokenRingInterfaceCounters: - return SFlowTypeTokenRingInterfaceCounters - case SFlowType100BaseVGInterfaceCounters: - return SFlowType100BaseVGInterfaceCounters - case SFlowTypeVLANCounters: - return SFlowTypeVLANCounters - case SFlowTypeLACPCounters: - return SFlowTypeLACPCounters - case SFlowTypeProcessorCounters: - return SFlowTypeProcessorCounters - case SFlowTypeOpenflowPortCounters: - return SFlowTypeOpenflowPortCounters - case SFlowTypePORTNAMECounters: - return SFlowTypePORTNAMECounters - case SFLowTypeAPPRESOURCESCounters: - return SFLowTypeAPPRESOURCESCounters - case SFlowTypeOVSDPCounters: - return SFlowTypeOVSDPCounters - } - unrecognized := fmt.Sprint("Unrecognized counter record type:", bcr.Format) - panic(unrecognized) -} - -// ************************************************** -// Counter Record -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | counter length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfIndex | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfType | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfSpeed | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfDirection | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfStatus | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IFInOctets | -// | | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfInUcastPkts | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfInMulticastPkts | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfInBroadcastPkts | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfInDiscards | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | InInErrors | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfInUnknownProtos | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfOutOctets | -// | | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfOutUcastPkts | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfOutMulticastPkts | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfOutBroadcastPkts | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfOutDiscards | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfOUtErrors | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | IfPromiscouousMode | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -type SFlowGenericInterfaceCounters struct { - SFlowBaseCounterRecord - IfIndex uint32 - IfType uint32 - IfSpeed uint64 - IfDirection uint32 - IfStatus uint32 - IfInOctets uint64 - IfInUcastPkts uint32 - IfInMulticastPkts uint32 - IfInBroadcastPkts uint32 - IfInDiscards uint32 - IfInErrors uint32 - IfInUnknownProtos uint32 - IfOutOctets uint64 - IfOutUcastPkts uint32 - IfOutMulticastPkts uint32 - IfOutBroadcastPkts uint32 - IfOutDiscards uint32 - IfOutErrors uint32 - IfPromiscuousMode uint32 -} - -func decodeGenericInterfaceCounters(data *[]byte) (SFlowGenericInterfaceCounters, error) { - gic := SFlowGenericInterfaceCounters{} - var cdf SFlowCounterDataFormat - - *data, cdf = (*data)[4:], SFlowCounterDataFormat(binary.BigEndian.Uint32((*data)[:4])) - gic.EnterpriseID, gic.Format = cdf.decode() - *data, gic.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfIndex = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfType = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfSpeed = (*data)[8:], binary.BigEndian.Uint64((*data)[:8]) - *data, gic.IfDirection = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfStatus = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfInOctets = (*data)[8:], binary.BigEndian.Uint64((*data)[:8]) - *data, gic.IfInUcastPkts = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfInMulticastPkts = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfInBroadcastPkts = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfInDiscards = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfInErrors = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfInUnknownProtos = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfOutOctets = (*data)[8:], binary.BigEndian.Uint64((*data)[:8]) - *data, gic.IfOutUcastPkts = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfOutMulticastPkts = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfOutBroadcastPkts = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfOutDiscards = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfOutErrors = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, gic.IfPromiscuousMode = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - return gic, nil -} - -// ************************************************** -// Counter Record -// ************************************************** - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | counter length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// / counter data / -// / / -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -type SFlowEthernetCounters struct { - SFlowBaseCounterRecord - AlignmentErrors uint32 - FCSErrors uint32 - SingleCollisionFrames uint32 - MultipleCollisionFrames uint32 - SQETestErrors uint32 - DeferredTransmissions uint32 - LateCollisions uint32 - ExcessiveCollisions uint32 - InternalMacTransmitErrors uint32 - CarrierSenseErrors uint32 - FrameTooLongs uint32 - InternalMacReceiveErrors uint32 - SymbolErrors uint32 -} - -func decodeEthernetCounters(data *[]byte) (SFlowEthernetCounters, error) { - ec := SFlowEthernetCounters{} - var cdf SFlowCounterDataFormat - - *data, cdf = (*data)[4:], SFlowCounterDataFormat(binary.BigEndian.Uint32((*data)[:4])) - ec.EnterpriseID, ec.Format = cdf.decode() - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.AlignmentErrors = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.FCSErrors = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.SingleCollisionFrames = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.MultipleCollisionFrames = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.SQETestErrors = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.DeferredTransmissions = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.LateCollisions = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.ExcessiveCollisions = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.InternalMacTransmitErrors = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.CarrierSenseErrors = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.FrameTooLongs = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.InternalMacReceiveErrors = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - if len(*data) < 4 { - return SFlowEthernetCounters{}, errors.New("ethernet counters too small") - } - *data, ec.SymbolErrors = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - return ec, nil -} - -// VLAN Counter - -type SFlowVLANCounters struct { - SFlowBaseCounterRecord - VlanID uint32 - Octets uint64 - UcastPkts uint32 - MulticastPkts uint32 - BroadcastPkts uint32 - Discards uint32 -} - -func decodeVLANCounters(data *[]byte) (SFlowVLANCounters, error) { - vc := SFlowVLANCounters{} - var cdf SFlowCounterDataFormat - - *data, cdf = (*data)[4:], SFlowCounterDataFormat(binary.BigEndian.Uint32((*data)[:4])) - vc.EnterpriseID, vc.Format = cdf.decode() - vc.EnterpriseID, vc.Format = cdf.decode() - *data, vc.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, vc.VlanID = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, vc.Octets = (*data)[8:], binary.BigEndian.Uint64((*data)[:8]) - *data, vc.UcastPkts = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, vc.MulticastPkts = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, vc.BroadcastPkts = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, vc.Discards = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - return vc, nil -} - -//SFLLACPportState : SFlow LACP Port State (All(4) - 32 bit) -type SFLLACPPortState struct { - PortStateAll uint32 -} - -//LACPcounters : LACP SFlow Counters ( 64 Bytes ) -type SFlowLACPCounters struct { - SFlowBaseCounterRecord - ActorSystemID net.HardwareAddr - PartnerSystemID net.HardwareAddr - AttachedAggID uint32 - LacpPortState SFLLACPPortState - LACPDUsRx uint32 - MarkerPDUsRx uint32 - MarkerResponsePDUsRx uint32 - UnknownRx uint32 - IllegalRx uint32 - LACPDUsTx uint32 - MarkerPDUsTx uint32 - MarkerResponsePDUsTx uint32 -} - -func decodeLACPCounters(data *[]byte) (SFlowLACPCounters, error) { - la := SFlowLACPCounters{} - var cdf SFlowCounterDataFormat - - *data, cdf = (*data)[4:], SFlowCounterDataFormat(binary.BigEndian.Uint32((*data)[:4])) - la.EnterpriseID, la.Format = cdf.decode() - *data, la.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, la.ActorSystemID = (*data)[6:], (*data)[:6] - *data = (*data)[2:] // remove padding - *data, la.PartnerSystemID = (*data)[6:], (*data)[:6] - *data = (*data)[2:] //remove padding - *data, la.AttachedAggID = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, la.LacpPortState.PortStateAll = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, la.LACPDUsRx = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, la.MarkerPDUsRx = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, la.MarkerResponsePDUsRx = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, la.UnknownRx = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, la.IllegalRx = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, la.LACPDUsTx = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, la.MarkerPDUsTx = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, la.MarkerResponsePDUsTx = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - return la, nil - -} - -// ************************************************** -// Processor Counter Record -// ************************************************** -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | counter length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | FiveSecCpu | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | OneMinCpu | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | GiveMinCpu | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | TotalMemory | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | FreeMemory | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -type SFlowProcessorCounters struct { - SFlowBaseCounterRecord - FiveSecCpu uint32 // 5 second average CPU utilization - OneMinCpu uint32 // 1 minute average CPU utilization - FiveMinCpu uint32 // 5 minute average CPU utilization - TotalMemory uint64 // total memory (in bytes) - FreeMemory uint64 // free memory (in bytes) -} - -func decodeProcessorCounters(data *[]byte) (SFlowProcessorCounters, error) { - pc := SFlowProcessorCounters{} - var cdf SFlowCounterDataFormat - var high32, low32 uint32 - - *data, cdf = (*data)[4:], SFlowCounterDataFormat(binary.BigEndian.Uint32((*data)[:4])) - pc.EnterpriseID, pc.Format = cdf.decode() - *data, pc.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - *data, pc.FiveSecCpu = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, pc.OneMinCpu = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, pc.FiveMinCpu = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, high32 = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, low32 = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - pc.TotalMemory = (uint64(high32) << 32) + uint64(low32) - *data, high32 = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, low32 = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - pc.FreeMemory = (uint64(high32)) + uint64(low32) - - return pc, nil -} - -// SFlowEthernetFrameFlowRecord give additional information -// about the sampled packet if it's available. -// An agent may or may not provide this information. -type SFlowEthernetFrameFlowRecord struct { - SFlowBaseFlowRecord - FrameLength uint32 - SrcMac net.HardwareAddr - DstMac net.HardwareAddr - Type uint32 -} - -// Ethernet frame flow records have the following structure: - -// 0 15 31 -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | 20 bit Interprise (0) |12 bit format | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | record length | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Source Mac Address | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Destination Mac Address | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -// | Ethernet Packet Type | -// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -func decodeEthernetFrameFlowRecord(data *[]byte) (SFlowEthernetFrameFlowRecord, error) { - es := SFlowEthernetFrameFlowRecord{} - var fdf SFlowFlowDataFormat - - *data, fdf = (*data)[4:], SFlowFlowDataFormat(binary.BigEndian.Uint32((*data)[:4])) - es.EnterpriseID, es.Format = fdf.decode() - *data, es.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - *data, es.FrameLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, es.SrcMac = (*data)[8:], net.HardwareAddr((*data)[:6]) - *data, es.DstMac = (*data)[8:], net.HardwareAddr((*data)[:6]) - *data, es.Type = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - return es, nil -} - -//SFlowOpenflowPortCounters : OVS-Sflow OpenFlow Port Counter ( 20 Bytes ) -type SFlowOpenflowPortCounters struct { - SFlowBaseCounterRecord - DatapathID uint64 - PortNo uint32 -} - -func decodeOpenflowportCounters(data *[]byte) (SFlowOpenflowPortCounters, error) { - ofp := SFlowOpenflowPortCounters{} - var cdf SFlowCounterDataFormat - - *data, cdf = (*data)[4:], SFlowCounterDataFormat(binary.BigEndian.Uint32((*data)[:4])) - ofp.EnterpriseID, ofp.Format = cdf.decode() - *data, ofp.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, ofp.DatapathID = (*data)[8:], binary.BigEndian.Uint64((*data)[:8]) - *data, ofp.PortNo = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - return ofp, nil -} - -//SFlowAppresourcesCounters : OVS_Sflow App Resources Counter ( 48 Bytes ) -type SFlowAppresourcesCounters struct { - SFlowBaseCounterRecord - UserTime uint32 - SystemTime uint32 - MemUsed uint64 - MemMax uint64 - FdOpen uint32 - FdMax uint32 - ConnOpen uint32 - ConnMax uint32 -} - -func decodeAppresourcesCounters(data *[]byte) (SFlowAppresourcesCounters, error) { - app := SFlowAppresourcesCounters{} - var cdf SFlowCounterDataFormat - - *data, cdf = (*data)[4:], SFlowCounterDataFormat(binary.BigEndian.Uint32((*data)[:4])) - app.EnterpriseID, app.Format = cdf.decode() - *data, app.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, app.UserTime = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, app.SystemTime = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, app.MemUsed = (*data)[8:], binary.BigEndian.Uint64((*data)[:8]) - *data, app.MemMax = (*data)[8:], binary.BigEndian.Uint64((*data)[:8]) - *data, app.FdOpen = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, app.FdMax = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, app.ConnOpen = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, app.ConnMax = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - return app, nil -} - -//SFlowOVSDPCounters : OVS-Sflow DataPath Counter ( 32 Bytes ) -type SFlowOVSDPCounters struct { - SFlowBaseCounterRecord - NHit uint32 - NMissed uint32 - NLost uint32 - NMaskHit uint32 - NFlows uint32 - NMasks uint32 -} - -func decodeOVSDPCounters(data *[]byte) (SFlowOVSDPCounters, error) { - dp := SFlowOVSDPCounters{} - var cdf SFlowCounterDataFormat - - *data, cdf = (*data)[4:], SFlowCounterDataFormat(binary.BigEndian.Uint32((*data)[:4])) - dp.EnterpriseID, dp.Format = cdf.decode() - *data, dp.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, dp.NHit = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, dp.NMissed = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, dp.NLost = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, dp.NMaskHit = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, dp.NFlows = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - *data, dp.NMasks = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - - return dp, nil -} - -//SFlowPORTNAME : OVS-Sflow PORTNAME Counter Sampletype ( 20 Bytes ) -type SFlowPORTNAME struct { - SFlowBaseCounterRecord - Len uint32 - Str string -} - -func decodeString(data *[]byte) (len uint32, str string) { - *data, len = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - str = string((*data)[:len]) - if (len % 4) != 0 { - len += 4 - len%4 - } - *data = (*data)[len:] - return -} - -func decodePortnameCounters(data *[]byte) (SFlowPORTNAME, error) { - pn := SFlowPORTNAME{} - var cdf SFlowCounterDataFormat - - *data, cdf = (*data)[4:], SFlowCounterDataFormat(binary.BigEndian.Uint32((*data)[:4])) - pn.EnterpriseID, pn.Format = cdf.decode() - *data, pn.FlowDataLength = (*data)[4:], binary.BigEndian.Uint32((*data)[:4]) - pn.Len, pn.Str = decodeString(data) - - return pn, nil -} diff --git a/vendor/github.com/google/gopacket/layers/sip.go b/vendor/github.com/google/gopacket/layers/sip.go deleted file mode 100644 index 70afdb5c064..00000000000 --- a/vendor/github.com/google/gopacket/layers/sip.go +++ /dev/null @@ -1,542 +0,0 @@ -// Copyright 2017 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "bytes" - "fmt" - "io" - "strconv" - "strings" - - "github.com/google/gopacket" -) - -// SIPVersion defines the different versions of the SIP Protocol -type SIPVersion uint8 - -// Represents all the versions of SIP protocol -const ( - SIPVersion1 SIPVersion = 1 - SIPVersion2 SIPVersion = 2 -) - -func (sv SIPVersion) String() string { - switch sv { - default: - // Defaulting to SIP/2.0 - return "SIP/2.0" - case SIPVersion1: - return "SIP/1.0" - case SIPVersion2: - return "SIP/2.0" - } -} - -// GetSIPVersion is used to get SIP version constant -func GetSIPVersion(version string) (SIPVersion, error) { - switch strings.ToUpper(version) { - case "SIP/1.0": - return SIPVersion1, nil - case "SIP/2.0": - return SIPVersion2, nil - default: - return 0, fmt.Errorf("Unknown SIP version: '%s'", version) - - } -} - -// SIPMethod defines the different methods of the SIP Protocol -// defined in the different RFC's -type SIPMethod uint16 - -// Here are all the SIP methods -const ( - SIPMethodInvite SIPMethod = 1 // INVITE [RFC3261] - SIPMethodAck SIPMethod = 2 // ACK [RFC3261] - SIPMethodBye SIPMethod = 3 // BYE [RFC3261] - SIPMethodCancel SIPMethod = 4 // CANCEL [RFC3261] - SIPMethodOptions SIPMethod = 5 // OPTIONS [RFC3261] - SIPMethodRegister SIPMethod = 6 // REGISTER [RFC3261] - SIPMethodPrack SIPMethod = 7 // PRACK [RFC3262] - SIPMethodSubscribe SIPMethod = 8 // SUBSCRIBE [RFC6665] - SIPMethodNotify SIPMethod = 9 // NOTIFY [RFC6665] - SIPMethodPublish SIPMethod = 10 // PUBLISH [RFC3903] - SIPMethodInfo SIPMethod = 11 // INFO [RFC6086] - SIPMethodRefer SIPMethod = 12 // REFER [RFC3515] - SIPMethodMessage SIPMethod = 13 // MESSAGE [RFC3428] - SIPMethodUpdate SIPMethod = 14 // UPDATE [RFC3311] - SIPMethodPing SIPMethod = 15 // PING [https://tools.ietf.org/html/draft-fwmiller-ping-03] -) - -func (sm SIPMethod) String() string { - switch sm { - default: - return "Unknown method" - case SIPMethodInvite: - return "INVITE" - case SIPMethodAck: - return "ACK" - case SIPMethodBye: - return "BYE" - case SIPMethodCancel: - return "CANCEL" - case SIPMethodOptions: - return "OPTIONS" - case SIPMethodRegister: - return "REGISTER" - case SIPMethodPrack: - return "PRACK" - case SIPMethodSubscribe: - return "SUBSCRIBE" - case SIPMethodNotify: - return "NOTIFY" - case SIPMethodPublish: - return "PUBLISH" - case SIPMethodInfo: - return "INFO" - case SIPMethodRefer: - return "REFER" - case SIPMethodMessage: - return "MESSAGE" - case SIPMethodUpdate: - return "UPDATE" - case SIPMethodPing: - return "PING" - } -} - -// GetSIPMethod returns the constant of a SIP method -// from its string -func GetSIPMethod(method string) (SIPMethod, error) { - switch strings.ToUpper(method) { - case "INVITE": - return SIPMethodInvite, nil - case "ACK": - return SIPMethodAck, nil - case "BYE": - return SIPMethodBye, nil - case "CANCEL": - return SIPMethodCancel, nil - case "OPTIONS": - return SIPMethodOptions, nil - case "REGISTER": - return SIPMethodRegister, nil - case "PRACK": - return SIPMethodPrack, nil - case "SUBSCRIBE": - return SIPMethodSubscribe, nil - case "NOTIFY": - return SIPMethodNotify, nil - case "PUBLISH": - return SIPMethodPublish, nil - case "INFO": - return SIPMethodInfo, nil - case "REFER": - return SIPMethodRefer, nil - case "MESSAGE": - return SIPMethodMessage, nil - case "UPDATE": - return SIPMethodUpdate, nil - case "PING": - return SIPMethodPing, nil - default: - return 0, fmt.Errorf("Unknown SIP method: '%s'", method) - } -} - -// Here is a correspondance between long header names and short -// as defined in rfc3261 in section 20 -var compactSipHeadersCorrespondance = map[string]string{ - "accept-contact": "a", - "allow-events": "u", - "call-id": "i", - "contact": "m", - "content-encoding": "e", - "content-length": "l", - "content-type": "c", - "event": "o", - "from": "f", - "identity": "y", - "refer-to": "r", - "referred-by": "b", - "reject-contact": "j", - "request-disposition": "d", - "session-expires": "x", - "subject": "s", - "supported": "k", - "to": "t", - "via": "v", -} - -// SIP object will contains information about decoded SIP packet. -// -> The SIP Version -// -> The SIP Headers (in a map[string][]string because of multiple headers with the same name -// -> The SIP Method -// -> The SIP Response code (if it's a response) -// -> The SIP Status line (if it's a response) -// You can easily know the type of the packet with the IsResponse boolean -// -type SIP struct { - BaseLayer - - // Base information - Version SIPVersion - Method SIPMethod - Headers map[string][]string - - // Request - RequestURI string - - // Response - IsResponse bool - ResponseCode int - ResponseStatus string - - // Private fields - cseq int64 - contentLength int64 - lastHeaderParsed string -} - -// decodeSIP decodes the byte slice into a SIP type. It also -// setups the application Layer in PacketBuilder. -func decodeSIP(data []byte, p gopacket.PacketBuilder) error { - s := NewSIP() - err := s.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(s) - p.SetApplicationLayer(s) - return nil -} - -// NewSIP instantiates a new empty SIP object -func NewSIP() *SIP { - s := new(SIP) - s.Headers = make(map[string][]string) - return s -} - -// LayerType returns gopacket.LayerTypeSIP. -func (s *SIP) LayerType() gopacket.LayerType { - return LayerTypeSIP -} - -// Payload returns the base layer payload -func (s *SIP) Payload() []byte { - return s.BaseLayer.Payload -} - -// CanDecode returns the set of layer types that this DecodingLayer can decode -func (s *SIP) CanDecode() gopacket.LayerClass { - return LayerTypeSIP -} - -// NextLayerType returns the layer type contained by this DecodingLayer -func (s *SIP) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -// DecodeFromBytes decodes the slice into the SIP struct. -func (s *SIP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - // Init some vars for parsing follow-up - var countLines int - var line []byte - var err error - var offset int - - // Iterate on all lines of the SIP Headers - // and stop when we reach the SDP (aka when the new line - // is at index 0 of the remaining packet) - buffer := bytes.NewBuffer(data) - - for { - - // Read next line - line, err = buffer.ReadBytes(byte('\n')) - if err != nil { - if err == io.EOF { - if len(bytes.Trim(line, "\r\n")) > 0 { - df.SetTruncated() - } - break - } else { - return err - } - } - offset += len(line) - - // Trim the new line delimiters - line = bytes.Trim(line, "\r\n") - - // Empty line, we hit Body - if len(line) == 0 { - break - } - - // First line is the SIP request/response line - // Other lines are headers - if countLines == 0 { - err = s.ParseFirstLine(line) - if err != nil { - return err - } - - } else { - err = s.ParseHeader(line) - if err != nil { - return err - } - } - - countLines++ - } - s.BaseLayer = BaseLayer{Contents: data[:offset], Payload: data[offset:]} - - return nil -} - -// ParseFirstLine will compute the first line of a SIP packet. -// The first line will tell us if it's a request or a response. -// -// Examples of first line of SIP Prococol : -// -// Request : INVITE bob@example.com SIP/2.0 -// Response : SIP/2.0 200 OK -// Response : SIP/2.0 501 Not Implemented -// -func (s *SIP) ParseFirstLine(firstLine []byte) error { - - var err error - - // Splits line by space - splits := strings.SplitN(string(firstLine), " ", 3) - - // We must have at least 3 parts - if len(splits) < 3 { - return fmt.Errorf("invalid first SIP line: '%s'", string(firstLine)) - } - - // Determine the SIP packet type - if strings.HasPrefix(splits[0], "SIP") { - - // --> Response - s.IsResponse = true - - // Validate SIP Version - s.Version, err = GetSIPVersion(splits[0]) - if err != nil { - return err - } - - // Compute code - s.ResponseCode, err = strconv.Atoi(splits[1]) - if err != nil { - return err - } - - // Compute status line - s.ResponseStatus = splits[2] - - } else { - - // --> Request - - // Validate method - s.Method, err = GetSIPMethod(splits[0]) - if err != nil { - return err - } - - s.RequestURI = splits[1] - - // Validate SIP Version - s.Version, err = GetSIPVersion(splits[2]) - if err != nil { - return err - } - } - - return nil -} - -// ParseHeader will parse a SIP Header -// SIP Headers are quite simple, there are colon separated name and value -// Headers can be spread over multiple lines -// -// Examples of header : -// -// CSeq: 1 REGISTER -// Via: SIP/2.0/UDP there.com:5060 -// Authorization:Digest username="UserB", -// realm="MCI WorldCom SIP", -// nonce="1cec4341ae6cbe5a359ea9c8e88df84f", opaque="", -// uri="sip:ss2.wcom.com", response="71ba27c64bd01de719686aa4590d5824" -// -func (s *SIP) ParseHeader(header []byte) (err error) { - - // Ignore empty headers - if len(header) == 0 { - return - } - - // Check if this is the following of last header - // RFC 3261 - 7.3.1 - Header Field Format specify that following lines of - // multiline headers must begin by SP or TAB - if header[0] == '\t' || header[0] == ' ' { - - header = bytes.TrimSpace(header) - s.Headers[s.lastHeaderParsed][len(s.Headers[s.lastHeaderParsed])-1] += fmt.Sprintf(" %s", string(header)) - return - } - - // Find the ':' to separate header name and value - index := bytes.Index(header, []byte(":")) - if index >= 0 { - - headerName := strings.ToLower(string(bytes.Trim(header[:index], " "))) - headerValue := string(bytes.Trim(header[index+1:], " ")) - - // Add header to object - s.Headers[headerName] = append(s.Headers[headerName], headerValue) - s.lastHeaderParsed = headerName - - // Compute specific headers - err = s.ParseSpecificHeaders(headerName, headerValue) - if err != nil { - return err - } - } - - return nil -} - -// ParseSpecificHeaders will parse some specific key values from -// specific headers like CSeq or Content-Length integer values -func (s *SIP) ParseSpecificHeaders(headerName string, headerValue string) (err error) { - - switch headerName { - case "cseq": - - // CSeq header value is formatted like that : - // CSeq: 123 INVITE - // We split the value to parse Cseq integer value, and method - splits := strings.Split(headerValue, " ") - if len(splits) > 1 { - - // Parse Cseq - s.cseq, err = strconv.ParseInt(splits[0], 10, 64) - if err != nil { - return err - } - - // Validate method - if s.IsResponse { - s.Method, err = GetSIPMethod(splits[1]) - if err != nil { - return err - } - } - } - - case "content-length": - - // Parse Content-Length - s.contentLength, err = strconv.ParseInt(headerValue, 10, 64) - if err != nil { - return err - } - } - - return nil -} - -// GetAllHeaders will return the full headers of the -// current SIP packets in a map[string][]string -func (s *SIP) GetAllHeaders() map[string][]string { - return s.Headers -} - -// GetHeader will return all the headers with -// the specified name. -func (s *SIP) GetHeader(headerName string) []string { - headerName = strings.ToLower(headerName) - h := make([]string, 0) - if _, ok := s.Headers[headerName]; ok { - return s.Headers[headerName] - } - compactHeader := compactSipHeadersCorrespondance[headerName] - if _, ok := s.Headers[compactHeader]; ok { - return s.Headers[compactHeader] - } - return h -} - -// GetFirstHeader will return the first header with -// the specified name. If the current SIP packet has multiple -// headers with the same name, it returns the first. -func (s *SIP) GetFirstHeader(headerName string) string { - headers := s.GetHeader(headerName) - if len(headers) > 0 { - return headers[0] - } - return "" -} - -// -// Some handy getters for most used SIP headers -// - -// GetAuthorization will return the Authorization -// header of the current SIP packet -func (s *SIP) GetAuthorization() string { - return s.GetFirstHeader("Authorization") -} - -// GetFrom will return the From -// header of the current SIP packet -func (s *SIP) GetFrom() string { - return s.GetFirstHeader("From") -} - -// GetTo will return the To -// header of the current SIP packet -func (s *SIP) GetTo() string { - return s.GetFirstHeader("To") -} - -// GetContact will return the Contact -// header of the current SIP packet -func (s *SIP) GetContact() string { - return s.GetFirstHeader("Contact") -} - -// GetCallID will return the Call-ID -// header of the current SIP packet -func (s *SIP) GetCallID() string { - return s.GetFirstHeader("Call-ID") -} - -// GetUserAgent will return the User-Agent -// header of the current SIP packet -func (s *SIP) GetUserAgent() string { - return s.GetFirstHeader("User-Agent") -} - -// GetContentLength will return the parsed integer -// Content-Length header of the current SIP packet -func (s *SIP) GetContentLength() int64 { - return s.contentLength -} - -// GetCSeq will return the parsed integer CSeq header -// header of the current SIP packet -func (s *SIP) GetCSeq() int64 { - return s.cseq -} diff --git a/vendor/github.com/google/gopacket/layers/stp.go b/vendor/github.com/google/gopacket/layers/stp.go deleted file mode 100644 index bde7d7c8ef9..00000000000 --- a/vendor/github.com/google/gopacket/layers/stp.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2017 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "github.com/google/gopacket" -) - -// STP decode spanning tree protocol packets to transport BPDU (bridge protocol data unit) message. -type STP struct { - BaseLayer -} - -// LayerType returns gopacket.LayerTypeSTP. -func (s *STP) LayerType() gopacket.LayerType { return LayerTypeSTP } - -func decodeSTP(data []byte, p gopacket.PacketBuilder) error { - stp := &STP{} - stp.Contents = data[:] - // TODO: parse the STP protocol into actual subfields. - p.AddLayer(stp) - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/tcp.go b/vendor/github.com/google/gopacket/layers/tcp.go deleted file mode 100644 index bcdeb4b3c35..00000000000 --- a/vendor/github.com/google/gopacket/layers/tcp.go +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "encoding/hex" - "errors" - "fmt" - - "github.com/google/gopacket" -) - -// TCP is the layer for TCP headers. -type TCP struct { - BaseLayer - SrcPort, DstPort TCPPort - Seq uint32 - Ack uint32 - DataOffset uint8 - FIN, SYN, RST, PSH, ACK, URG, ECE, CWR, NS bool - Window uint16 - Checksum uint16 - Urgent uint16 - sPort, dPort []byte - Options []TCPOption - Padding []byte - opts [4]TCPOption - tcpipchecksum -} - -// TCPOptionKind represents a TCP option code. -type TCPOptionKind uint8 - -const ( - TCPOptionKindEndList = 0 - TCPOptionKindNop = 1 - TCPOptionKindMSS = 2 // len = 4 - TCPOptionKindWindowScale = 3 // len = 3 - TCPOptionKindSACKPermitted = 4 // len = 2 - TCPOptionKindSACK = 5 // len = n - TCPOptionKindEcho = 6 // len = 6, obsolete - TCPOptionKindEchoReply = 7 // len = 6, obsolete - TCPOptionKindTimestamps = 8 // len = 10 - TCPOptionKindPartialOrderConnectionPermitted = 9 // len = 2, obsolete - TCPOptionKindPartialOrderServiceProfile = 10 // len = 3, obsolete - TCPOptionKindCC = 11 // obsolete - TCPOptionKindCCNew = 12 // obsolete - TCPOptionKindCCEcho = 13 // obsolete - TCPOptionKindAltChecksum = 14 // len = 3, obsolete - TCPOptionKindAltChecksumData = 15 // len = n, obsolete -) - -func (k TCPOptionKind) String() string { - switch k { - case TCPOptionKindEndList: - return "EndList" - case TCPOptionKindNop: - return "NOP" - case TCPOptionKindMSS: - return "MSS" - case TCPOptionKindWindowScale: - return "WindowScale" - case TCPOptionKindSACKPermitted: - return "SACKPermitted" - case TCPOptionKindSACK: - return "SACK" - case TCPOptionKindEcho: - return "Echo" - case TCPOptionKindEchoReply: - return "EchoReply" - case TCPOptionKindTimestamps: - return "Timestamps" - case TCPOptionKindPartialOrderConnectionPermitted: - return "PartialOrderConnectionPermitted" - case TCPOptionKindPartialOrderServiceProfile: - return "PartialOrderServiceProfile" - case TCPOptionKindCC: - return "CC" - case TCPOptionKindCCNew: - return "CCNew" - case TCPOptionKindCCEcho: - return "CCEcho" - case TCPOptionKindAltChecksum: - return "AltChecksum" - case TCPOptionKindAltChecksumData: - return "AltChecksumData" - default: - return fmt.Sprintf("Unknown(%d)", k) - } -} - -type TCPOption struct { - OptionType TCPOptionKind - OptionLength uint8 - OptionData []byte -} - -func (t TCPOption) String() string { - hd := hex.EncodeToString(t.OptionData) - if len(hd) > 0 { - hd = " 0x" + hd - } - switch t.OptionType { - case TCPOptionKindMSS: - if len(t.OptionData) >= 2 { - return fmt.Sprintf("TCPOption(%s:%v%s)", - t.OptionType, - binary.BigEndian.Uint16(t.OptionData), - hd) - } - - case TCPOptionKindTimestamps: - if len(t.OptionData) == 8 { - return fmt.Sprintf("TCPOption(%s:%v/%v%s)", - t.OptionType, - binary.BigEndian.Uint32(t.OptionData[:4]), - binary.BigEndian.Uint32(t.OptionData[4:8]), - hd) - } - } - return fmt.Sprintf("TCPOption(%s:%s)", t.OptionType, hd) -} - -// LayerType returns gopacket.LayerTypeTCP -func (t *TCP) LayerType() gopacket.LayerType { return LayerTypeTCP } - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (t *TCP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - var optionLength int - for _, o := range t.Options { - switch o.OptionType { - case 0, 1: - optionLength += 1 - default: - optionLength += 2 + len(o.OptionData) - } - } - if opts.FixLengths { - if rem := optionLength % 4; rem != 0 { - t.Padding = lotsOfZeros[:4-rem] - } - t.DataOffset = uint8((len(t.Padding) + optionLength + 20) / 4) - } - bytes, err := b.PrependBytes(20 + optionLength + len(t.Padding)) - if err != nil { - return err - } - binary.BigEndian.PutUint16(bytes, uint16(t.SrcPort)) - binary.BigEndian.PutUint16(bytes[2:], uint16(t.DstPort)) - binary.BigEndian.PutUint32(bytes[4:], t.Seq) - binary.BigEndian.PutUint32(bytes[8:], t.Ack) - binary.BigEndian.PutUint16(bytes[12:], t.flagsAndOffset()) - binary.BigEndian.PutUint16(bytes[14:], t.Window) - binary.BigEndian.PutUint16(bytes[18:], t.Urgent) - start := 20 - for _, o := range t.Options { - bytes[start] = byte(o.OptionType) - switch o.OptionType { - case 0, 1: - start++ - default: - if opts.FixLengths { - o.OptionLength = uint8(len(o.OptionData) + 2) - } - bytes[start+1] = o.OptionLength - copy(bytes[start+2:start+len(o.OptionData)+2], o.OptionData) - start += len(o.OptionData) + 2 - } - } - copy(bytes[start:], t.Padding) - if opts.ComputeChecksums { - // zero out checksum bytes in current serialization. - bytes[16] = 0 - bytes[17] = 0 - csum, err := t.computeChecksum(b.Bytes(), IPProtocolTCP) - if err != nil { - return err - } - t.Checksum = csum - } - binary.BigEndian.PutUint16(bytes[16:], t.Checksum) - return nil -} - -func (t *TCP) ComputeChecksum() (uint16, error) { - return t.computeChecksum(append(t.Contents, t.Payload...), IPProtocolTCP) -} - -func (t *TCP) flagsAndOffset() uint16 { - f := uint16(t.DataOffset) << 12 - if t.FIN { - f |= 0x0001 - } - if t.SYN { - f |= 0x0002 - } - if t.RST { - f |= 0x0004 - } - if t.PSH { - f |= 0x0008 - } - if t.ACK { - f |= 0x0010 - } - if t.URG { - f |= 0x0020 - } - if t.ECE { - f |= 0x0040 - } - if t.CWR { - f |= 0x0080 - } - if t.NS { - f |= 0x0100 - } - return f -} - -func (tcp *TCP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 20 { - df.SetTruncated() - return fmt.Errorf("Invalid TCP header. Length %d less than 20", len(data)) - } - tcp.SrcPort = TCPPort(binary.BigEndian.Uint16(data[0:2])) - tcp.sPort = data[0:2] - tcp.DstPort = TCPPort(binary.BigEndian.Uint16(data[2:4])) - tcp.dPort = data[2:4] - tcp.Seq = binary.BigEndian.Uint32(data[4:8]) - tcp.Ack = binary.BigEndian.Uint32(data[8:12]) - tcp.DataOffset = data[12] >> 4 - tcp.FIN = data[13]&0x01 != 0 - tcp.SYN = data[13]&0x02 != 0 - tcp.RST = data[13]&0x04 != 0 - tcp.PSH = data[13]&0x08 != 0 - tcp.ACK = data[13]&0x10 != 0 - tcp.URG = data[13]&0x20 != 0 - tcp.ECE = data[13]&0x40 != 0 - tcp.CWR = data[13]&0x80 != 0 - tcp.NS = data[12]&0x01 != 0 - tcp.Window = binary.BigEndian.Uint16(data[14:16]) - tcp.Checksum = binary.BigEndian.Uint16(data[16:18]) - tcp.Urgent = binary.BigEndian.Uint16(data[18:20]) - if tcp.Options == nil { - // Pre-allocate to avoid allocating a slice. - tcp.Options = tcp.opts[:0] - } else { - tcp.Options = tcp.Options[:0] - } - tcp.Padding = tcp.Padding[:0] - if tcp.DataOffset < 5 { - return fmt.Errorf("Invalid TCP data offset %d < 5", tcp.DataOffset) - } - dataStart := int(tcp.DataOffset) * 4 - if dataStart > len(data) { - df.SetTruncated() - tcp.Payload = nil - tcp.Contents = data - return errors.New("TCP data offset greater than packet length") - } - tcp.Contents = data[:dataStart] - tcp.Payload = data[dataStart:] - // From here on, data points just to the header options. - data = data[20:dataStart] -OPTIONS: - for len(data) > 0 { - tcp.Options = append(tcp.Options, TCPOption{OptionType: TCPOptionKind(data[0])}) - opt := &tcp.Options[len(tcp.Options)-1] - switch opt.OptionType { - case TCPOptionKindEndList: // End of options - opt.OptionLength = 1 - tcp.Padding = data[1:] - break OPTIONS - case TCPOptionKindNop: // 1 byte padding - opt.OptionLength = 1 - default: - if len(data) < 2 { - df.SetTruncated() - return fmt.Errorf("Invalid TCP option length. Length %d less than 2", len(data)) - } - opt.OptionLength = data[1] - if opt.OptionLength < 2 { - return fmt.Errorf("Invalid TCP option length %d < 2", opt.OptionLength) - } else if int(opt.OptionLength) > len(data) { - df.SetTruncated() - return fmt.Errorf("Invalid TCP option length %d exceeds remaining %d bytes", opt.OptionLength, len(data)) - } - opt.OptionData = data[2:opt.OptionLength] - } - data = data[opt.OptionLength:] - } - return nil -} - -func (t *TCP) CanDecode() gopacket.LayerClass { - return LayerTypeTCP -} - -func (t *TCP) NextLayerType() gopacket.LayerType { - lt := t.DstPort.LayerType() - if lt == gopacket.LayerTypePayload { - lt = t.SrcPort.LayerType() - } - return lt -} - -func decodeTCP(data []byte, p gopacket.PacketBuilder) error { - tcp := &TCP{} - err := tcp.DecodeFromBytes(data, p) - p.AddLayer(tcp) - p.SetTransportLayer(tcp) - if err != nil { - return err - } - if p.DecodeOptions().DecodeStreamsAsDatagrams { - return p.NextDecoder(tcp.NextLayerType()) - } else { - return p.NextDecoder(gopacket.LayerTypePayload) - } -} - -func (t *TCP) TransportFlow() gopacket.Flow { - return gopacket.NewFlow(EndpointTCPPort, t.sPort, t.dPort) -} - -// For testing only -func (t *TCP) SetInternalPortsForTesting() { - t.sPort = make([]byte, 2) - t.dPort = make([]byte, 2) - binary.BigEndian.PutUint16(t.sPort, uint16(t.SrcPort)) - binary.BigEndian.PutUint16(t.dPort, uint16(t.DstPort)) -} diff --git a/vendor/github.com/google/gopacket/layers/tcpip.go b/vendor/github.com/google/gopacket/layers/tcpip.go deleted file mode 100644 index 64ba51cc75b..00000000000 --- a/vendor/github.com/google/gopacket/layers/tcpip.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "errors" - "fmt" - - "github.com/google/gopacket" -) - -// Checksum computation for TCP/UDP. -type tcpipchecksum struct { - pseudoheader tcpipPseudoHeader -} - -type tcpipPseudoHeader interface { - pseudoheaderChecksum() (uint32, error) -} - -func (ip *IPv4) pseudoheaderChecksum() (csum uint32, err error) { - if err := ip.AddressTo4(); err != nil { - return 0, err - } - csum += (uint32(ip.SrcIP[0]) + uint32(ip.SrcIP[2])) << 8 - csum += uint32(ip.SrcIP[1]) + uint32(ip.SrcIP[3]) - csum += (uint32(ip.DstIP[0]) + uint32(ip.DstIP[2])) << 8 - csum += uint32(ip.DstIP[1]) + uint32(ip.DstIP[3]) - return csum, nil -} - -func (ip *IPv6) pseudoheaderChecksum() (csum uint32, err error) { - if err := ip.AddressTo16(); err != nil { - return 0, err - } - for i := 0; i < 16; i += 2 { - csum += uint32(ip.SrcIP[i]) << 8 - csum += uint32(ip.SrcIP[i+1]) - csum += uint32(ip.DstIP[i]) << 8 - csum += uint32(ip.DstIP[i+1]) - } - return csum, nil -} - -// Calculate the TCP/IP checksum defined in rfc1071. The passed-in csum is any -// initial checksum data that's already been computed. -func tcpipChecksum(data []byte, csum uint32) uint16 { - // to handle odd lengths, we loop to length - 1, incrementing by 2, then - // handle the last byte specifically by checking against the original - // length. - length := len(data) - 1 - for i := 0; i < length; i += 2 { - // For our test packet, doing this manually is about 25% faster - // (740 ns vs. 1000ns) than doing it by calling binary.BigEndian.Uint16. - csum += uint32(data[i]) << 8 - csum += uint32(data[i+1]) - } - if len(data)%2 == 1 { - csum += uint32(data[length]) << 8 - } - for csum > 0xffff { - csum = (csum >> 16) + (csum & 0xffff) - } - return ^uint16(csum) -} - -// computeChecksum computes a TCP or UDP checksum. headerAndPayload is the -// serialized TCP or UDP header plus its payload, with the checksum zero'd -// out. headerProtocol is the IP protocol number of the upper-layer header. -func (c *tcpipchecksum) computeChecksum(headerAndPayload []byte, headerProtocol IPProtocol) (uint16, error) { - if c.pseudoheader == nil { - return 0, errors.New("TCP/IP layer 4 checksum cannot be computed without network layer... call SetNetworkLayerForChecksum to set which layer to use") - } - length := uint32(len(headerAndPayload)) - csum, err := c.pseudoheader.pseudoheaderChecksum() - if err != nil { - return 0, err - } - csum += uint32(headerProtocol) - csum += length & 0xffff - csum += length >> 16 - return tcpipChecksum(headerAndPayload, csum), nil -} - -// SetNetworkLayerForChecksum tells this layer which network layer is wrapping it. -// This is needed for computing the checksum when serializing, since TCP/IP transport -// layer checksums depends on fields in the IPv4 or IPv6 layer that contains it. -// The passed in layer must be an *IPv4 or *IPv6. -func (i *tcpipchecksum) SetNetworkLayerForChecksum(l gopacket.NetworkLayer) error { - switch v := l.(type) { - case *IPv4: - i.pseudoheader = v - case *IPv6: - i.pseudoheader = v - default: - return fmt.Errorf("cannot use layer type %v for tcp checksum network layer", l.LayerType()) - } - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/test_creator.py b/vendor/github.com/google/gopacket/layers/test_creator.py deleted file mode 100644 index c92d2765a22..00000000000 --- a/vendor/github.com/google/gopacket/layers/test_creator.py +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/python -# Copyright 2012 Google, Inc. All rights reserved. - -"""TestCreator creates test templates from pcap files.""" - -import argparse -import base64 -import glob -import re -import string -import subprocess -import sys - - -class Packet(object): - """Helper class encapsulating packet from a pcap file.""" - - def __init__(self, packet_lines): - self.packet_lines = packet_lines - self.data = self._DecodeText(packet_lines) - - @classmethod - def _DecodeText(cls, packet_lines): - packet_bytes = [] - # First line is timestamp and stuff, skip it. - # Format: 0x0010: 0000 0020 3aff 3ffe 0000 0000 0000 0000 ....:.?......... - - for line in packet_lines[1:]: - m = re.match(r'\s+0x[a-f\d]+:\s+((?:[\da-f]{2,4}\s)*)', line, re.IGNORECASE) - if m is None: continue - for hexpart in m.group(1).split(): - packet_bytes.append(base64.b16decode(hexpart.upper())) - return ''.join(packet_bytes) - - def Test(self, name, link_type): - """Yields a test using this packet, as a set of lines.""" - yield '// testPacket%s is the packet:' % name - for line in self.packet_lines: - yield '// ' + line - yield 'var testPacket%s = []byte{' % name - data = list(self.data) - while data: - linebytes, data = data[:16], data[16:] - yield ''.join(['\t'] + ['0x%02x, ' % ord(c) for c in linebytes]) - yield '}' - yield 'func TestPacket%s(t *testing.T) {' % name - yield '\tp := gopacket.NewPacket(testPacket%s, LinkType%s, gopacket.Default)' % (name, link_type) - yield '\tif p.ErrorLayer() != nil {' - yield '\t\tt.Error("Failed to decode packet:", p.ErrorLayer().Error())' - yield '\t}' - yield '\tcheckLayers(p, []gopacket.LayerType{LayerType%s, FILL_ME_IN_WITH_ACTUAL_LAYERS}, t)' % link_type - yield '}' - yield 'func BenchmarkDecodePacket%s(b *testing.B) {' % name - yield '\tfor i := 0; i < b.N; i++ {' - yield '\t\tgopacket.NewPacket(testPacket%s, LinkType%s, gopacket.NoCopy)' % (name, link_type) - yield '\t}' - yield '}' - - - -def GetTcpdumpOutput(filename): - """Runs tcpdump on the given file, returning output as string.""" - return subprocess.check_output( - ['tcpdump', '-XX', '-s', '0', '-n', '-r', filename]) - - -def TcpdumpOutputToPackets(output): - """Reads a pcap file with TCPDump, yielding Packet objects.""" - pdata = [] - for line in output.splitlines(): - if line[0] not in string.whitespace and pdata: - yield Packet(pdata) - pdata = [] - pdata.append(line) - if pdata: - yield Packet(pdata) - - -def main(): - class CustomHelpFormatter(argparse.ArgumentDefaultsHelpFormatter): - def _format_usage(self, usage, actions, groups, prefix=None): - header =('TestCreator creates gopacket tests using a pcap file.\n\n' - 'Tests are written to standard out... they can then be \n' - 'copied into the file of your choice and modified as \n' - 'you see.\n\n') - return header + argparse.ArgumentDefaultsHelpFormatter._format_usage( - self, usage, actions, groups, prefix) - - parser = argparse.ArgumentParser(formatter_class=CustomHelpFormatter) - parser.add_argument('--link_type', default='Ethernet', help='the link type (default: %(default)s)') - parser.add_argument('--name', default='Packet%d', help='the layer type, must have "%d" inside it') - parser.add_argument('files', metavar='file.pcap', type=str, nargs='+', help='the files to process') - - args = parser.parse_args() - - for arg in args.files: - for path in glob.glob(arg): - for i, packet in enumerate(TcpdumpOutputToPackets(GetTcpdumpOutput(path))): - print '\n'.join(packet.Test( - args.name % i, args.link_type)) - -if __name__ == '__main__': - main() diff --git a/vendor/github.com/google/gopacket/layers/tls.go b/vendor/github.com/google/gopacket/layers/tls.go deleted file mode 100644 index 5a155d455a2..00000000000 --- a/vendor/github.com/google/gopacket/layers/tls.go +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright 2018 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - - "github.com/google/gopacket" -) - -// TLSType defines the type of data after the TLS Record -type TLSType uint8 - -// TLSType known values. -const ( - TLSChangeCipherSpec TLSType = 20 - TLSAlert TLSType = 21 - TLSHandshake TLSType = 22 - TLSApplicationData TLSType = 23 - TLSUnknown TLSType = 255 -) - -// String shows the register type nicely formatted -func (tt TLSType) String() string { - switch tt { - default: - return "Unknown" - case TLSChangeCipherSpec: - return "Change Cipher Spec" - case TLSAlert: - return "Alert" - case TLSHandshake: - return "Handshake" - case TLSApplicationData: - return "Application Data" - } -} - -// TLSVersion represents the TLS version in numeric format -type TLSVersion uint16 - -// Strings shows the TLS version nicely formatted -func (tv TLSVersion) String() string { - switch tv { - default: - return "Unknown" - case 0x0200: - return "SSL 2.0" - case 0x0300: - return "SSL 3.0" - case 0x0301: - return "TLS 1.0" - case 0x0302: - return "TLS 1.1" - case 0x0303: - return "TLS 1.2" - case 0x0304: - return "TLS 1.3" - } -} - -// TLS is specified in RFC 5246 -// -// TLS Record Protocol -// 0 1 2 3 4 5 6 7 8 -// +--+--+--+--+--+--+--+--+ -// | Content Type | -// +--+--+--+--+--+--+--+--+ -// | Version (major) | -// +--+--+--+--+--+--+--+--+ -// | Version (minor) | -// +--+--+--+--+--+--+--+--+ -// | Length | -// +--+--+--+--+--+--+--+--+ -// | Length | -// +--+--+--+--+--+--+--+--+ - -// TLS is actually a slide of TLSrecord structures -type TLS struct { - BaseLayer - - // TLS Records - ChangeCipherSpec []TLSChangeCipherSpecRecord - Handshake []TLSHandshakeRecord - AppData []TLSAppDataRecord - Alert []TLSAlertRecord -} - -// TLSRecordHeader contains all the information that each TLS Record types should have -type TLSRecordHeader struct { - ContentType TLSType - Version TLSVersion - Length uint16 -} - -// LayerType returns gopacket.LayerTypeTLS. -func (t *TLS) LayerType() gopacket.LayerType { return LayerTypeTLS } - -// decodeTLS decodes the byte slice into a TLS type. It also -// setups the application Layer in PacketBuilder. -func decodeTLS(data []byte, p gopacket.PacketBuilder) error { - t := &TLS{} - err := t.DecodeFromBytes(data, p) - if err != nil { - return err - } - p.AddLayer(t) - p.SetApplicationLayer(t) - return nil -} - -// DecodeFromBytes decodes the slice into the TLS struct. -func (t *TLS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - t.BaseLayer.Contents = data - t.BaseLayer.Payload = nil - - t.ChangeCipherSpec = t.ChangeCipherSpec[:0] - t.Handshake = t.Handshake[:0] - t.AppData = t.AppData[:0] - t.Alert = t.Alert[:0] - - return t.decodeTLSRecords(data, df) -} - -func (t *TLS) decodeTLSRecords(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 5 { - df.SetTruncated() - return errors.New("TLS record too short") - } - - // since there are no further layers, the baselayer's content is - // pointing to this layer - // TODO: Consider removing this - t.BaseLayer = BaseLayer{Contents: data[:len(data)]} - - var h TLSRecordHeader - h.ContentType = TLSType(data[0]) - h.Version = TLSVersion(binary.BigEndian.Uint16(data[1:3])) - h.Length = binary.BigEndian.Uint16(data[3:5]) - - if h.ContentType.String() == "Unknown" { - return errors.New("Unknown TLS record type") - } - - hl := 5 // header length - tl := hl + int(h.Length) - if len(data) < tl { - df.SetTruncated() - return errors.New("TLS packet length mismatch") - } - - switch h.ContentType { - default: - return errors.New("Unknown TLS record type") - case TLSChangeCipherSpec: - var r TLSChangeCipherSpecRecord - e := r.decodeFromBytes(h, data[hl:tl], df) - if e != nil { - return e - } - t.ChangeCipherSpec = append(t.ChangeCipherSpec, r) - case TLSAlert: - var r TLSAlertRecord - e := r.decodeFromBytes(h, data[hl:tl], df) - if e != nil { - return e - } - t.Alert = append(t.Alert, r) - case TLSHandshake: - var r TLSHandshakeRecord - e := r.decodeFromBytes(h, data[hl:tl], df) - if e != nil { - return e - } - t.Handshake = append(t.Handshake, r) - case TLSApplicationData: - var r TLSAppDataRecord - e := r.decodeFromBytes(h, data[hl:tl], df) - if e != nil { - return e - } - t.AppData = append(t.AppData, r) - } - - if len(data) == tl { - return nil - } - return t.decodeTLSRecords(data[tl:len(data)], df) -} - -// CanDecode implements gopacket.DecodingLayer. -func (t *TLS) CanDecode() gopacket.LayerClass { - return LayerTypeTLS -} - -// NextLayerType implements gopacket.DecodingLayer. -func (t *TLS) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypeZero -} - -// Payload returns nil, since TLS encrypted payload is inside TLSAppDataRecord -func (t *TLS) Payload() []byte { - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -func (t *TLS) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - totalLength := 0 - for _, record := range t.ChangeCipherSpec { - if opts.FixLengths { - record.Length = 1 - } - totalLength += 5 + 1 // length of header + record - } - for range t.Handshake { - totalLength += 5 - // TODO - } - for _, record := range t.AppData { - if opts.FixLengths { - record.Length = uint16(len(record.Payload)) - } - totalLength += 5 + len(record.Payload) - } - for _, record := range t.Alert { - if len(record.EncryptedMsg) == 0 { - if opts.FixLengths { - record.Length = 2 - } - totalLength += 5 + 2 - } else { - if opts.FixLengths { - record.Length = uint16(len(record.EncryptedMsg)) - } - totalLength += 5 + len(record.EncryptedMsg) - } - } - data, err := b.PrependBytes(totalLength) - if err != nil { - return err - } - off := 0 - for _, record := range t.ChangeCipherSpec { - off = encodeHeader(record.TLSRecordHeader, data, off) - data[off] = byte(record.Message) - off++ - } - for _, record := range t.Handshake { - off = encodeHeader(record.TLSRecordHeader, data, off) - // TODO - } - for _, record := range t.AppData { - off = encodeHeader(record.TLSRecordHeader, data, off) - copy(data[off:], record.Payload) - off += len(record.Payload) - } - for _, record := range t.Alert { - off = encodeHeader(record.TLSRecordHeader, data, off) - if len(record.EncryptedMsg) == 0 { - data[off] = byte(record.Level) - data[off+1] = byte(record.Description) - off += 2 - } else { - copy(data[off:], record.EncryptedMsg) - off += len(record.EncryptedMsg) - } - } - return nil -} - -func encodeHeader(header TLSRecordHeader, data []byte, offset int) int { - data[offset] = byte(header.ContentType) - binary.BigEndian.PutUint16(data[offset+1:], uint16(header.Version)) - binary.BigEndian.PutUint16(data[offset+3:], header.Length) - - return offset + 5 -} diff --git a/vendor/github.com/google/gopacket/layers/tls_alert.go b/vendor/github.com/google/gopacket/layers/tls_alert.go deleted file mode 100644 index 0c5aee02180..00000000000 --- a/vendor/github.com/google/gopacket/layers/tls_alert.go +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright 2018 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "errors" - "fmt" - - "github.com/google/gopacket" -) - -// TLSAlertLevel defines the alert level data type -type TLSAlertLevel uint8 - -// TLSAlertDescr defines the alert descrption data type -type TLSAlertDescr uint8 - -const ( - TLSAlertWarning TLSAlertLevel = 1 - TLSAlertFatal TLSAlertLevel = 2 - TLSAlertUnknownLevel TLSAlertLevel = 255 - - TLSAlertCloseNotify TLSAlertDescr = 0 - TLSAlertUnexpectedMessage TLSAlertDescr = 10 - TLSAlertBadRecordMac TLSAlertDescr = 20 - TLSAlertDecryptionFailedRESERVED TLSAlertDescr = 21 - TLSAlertRecordOverflow TLSAlertDescr = 22 - TLSAlertDecompressionFailure TLSAlertDescr = 30 - TLSAlertHandshakeFailure TLSAlertDescr = 40 - TLSAlertNoCertificateRESERVED TLSAlertDescr = 41 - TLSAlertBadCertificate TLSAlertDescr = 42 - TLSAlertUnsupportedCertificate TLSAlertDescr = 43 - TLSAlertCertificateRevoked TLSAlertDescr = 44 - TLSAlertCertificateExpired TLSAlertDescr = 45 - TLSAlertCertificateUnknown TLSAlertDescr = 46 - TLSAlertIllegalParameter TLSAlertDescr = 47 - TLSAlertUnknownCa TLSAlertDescr = 48 - TLSAlertAccessDenied TLSAlertDescr = 49 - TLSAlertDecodeError TLSAlertDescr = 50 - TLSAlertDecryptError TLSAlertDescr = 51 - TLSAlertExportRestrictionRESERVED TLSAlertDescr = 60 - TLSAlertProtocolVersion TLSAlertDescr = 70 - TLSAlertInsufficientSecurity TLSAlertDescr = 71 - TLSAlertInternalError TLSAlertDescr = 80 - TLSAlertUserCanceled TLSAlertDescr = 90 - TLSAlertNoRenegotiation TLSAlertDescr = 100 - TLSAlertUnsupportedExtension TLSAlertDescr = 110 - TLSAlertUnknownDescription TLSAlertDescr = 255 -) - -// TLS Alert -// 0 1 2 3 4 5 6 7 8 -// +--+--+--+--+--+--+--+--+ -// | Level | -// +--+--+--+--+--+--+--+--+ -// | Description | -// +--+--+--+--+--+--+--+--+ - -// TLSAlertRecord contains all the information that each Alert Record type should have -type TLSAlertRecord struct { - TLSRecordHeader - - Level TLSAlertLevel - Description TLSAlertDescr - - EncryptedMsg []byte -} - -// DecodeFromBytes decodes the slice into the TLS struct. -func (t *TLSAlertRecord) decodeFromBytes(h TLSRecordHeader, data []byte, df gopacket.DecodeFeedback) error { - // TLS Record Header - t.ContentType = h.ContentType - t.Version = h.Version - t.Length = h.Length - - if len(data) < 2 { - df.SetTruncated() - return errors.New("TLS Alert packet too short") - } - - if t.Length == 2 { - t.Level = TLSAlertLevel(data[0]) - t.Description = TLSAlertDescr(data[1]) - } else { - t.Level = TLSAlertUnknownLevel - t.Description = TLSAlertUnknownDescription - t.EncryptedMsg = data - } - - return nil -} - -// Strings shows the TLS alert level nicely formatted -func (al TLSAlertLevel) String() string { - switch al { - default: - return fmt.Sprintf("Unknown(%d)", al) - case TLSAlertWarning: - return "Warning" - case TLSAlertFatal: - return "Fatal" - } -} - -// Strings shows the TLS alert description nicely formatted -func (ad TLSAlertDescr) String() string { - switch ad { - default: - return "Unknown" - case TLSAlertCloseNotify: - return "close_notify" - case TLSAlertUnexpectedMessage: - return "unexpected_message" - case TLSAlertBadRecordMac: - return "bad_record_mac" - case TLSAlertDecryptionFailedRESERVED: - return "decryption_failed_RESERVED" - case TLSAlertRecordOverflow: - return "record_overflow" - case TLSAlertDecompressionFailure: - return "decompression_failure" - case TLSAlertHandshakeFailure: - return "handshake_failure" - case TLSAlertNoCertificateRESERVED: - return "no_certificate_RESERVED" - case TLSAlertBadCertificate: - return "bad_certificate" - case TLSAlertUnsupportedCertificate: - return "unsupported_certificate" - case TLSAlertCertificateRevoked: - return "certificate_revoked" - case TLSAlertCertificateExpired: - return "certificate_expired" - case TLSAlertCertificateUnknown: - return "certificate_unknown" - case TLSAlertIllegalParameter: - return "illegal_parameter" - case TLSAlertUnknownCa: - return "unknown_ca" - case TLSAlertAccessDenied: - return "access_denied" - case TLSAlertDecodeError: - return "decode_error" - case TLSAlertDecryptError: - return "decrypt_error" - case TLSAlertExportRestrictionRESERVED: - return "export_restriction_RESERVED" - case TLSAlertProtocolVersion: - return "protocol_version" - case TLSAlertInsufficientSecurity: - return "insufficient_security" - case TLSAlertInternalError: - return "internal_error" - case TLSAlertUserCanceled: - return "user_canceled" - case TLSAlertNoRenegotiation: - return "no_renegotiation" - case TLSAlertUnsupportedExtension: - return "unsupported_extension" - } -} diff --git a/vendor/github.com/google/gopacket/layers/tls_appdata.go b/vendor/github.com/google/gopacket/layers/tls_appdata.go deleted file mode 100644 index dedd1d587b7..00000000000 --- a/vendor/github.com/google/gopacket/layers/tls_appdata.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2018 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "errors" - - "github.com/google/gopacket" -) - -// TLSAppDataRecord contains all the information that each AppData Record types should have -type TLSAppDataRecord struct { - TLSRecordHeader - Payload []byte -} - -// DecodeFromBytes decodes the slice into the TLS struct. -func (t *TLSAppDataRecord) decodeFromBytes(h TLSRecordHeader, data []byte, df gopacket.DecodeFeedback) error { - // TLS Record Header - t.ContentType = h.ContentType - t.Version = h.Version - t.Length = h.Length - - if len(data) != int(t.Length) { - return errors.New("TLS Application Data length mismatch") - } - - t.Payload = data - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/tls_cipherspec.go b/vendor/github.com/google/gopacket/layers/tls_cipherspec.go deleted file mode 100644 index 8f3dc62ba55..00000000000 --- a/vendor/github.com/google/gopacket/layers/tls_cipherspec.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2018 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "errors" - - "github.com/google/gopacket" -) - -// TLSchangeCipherSpec defines the message value inside ChangeCipherSpec Record -type TLSchangeCipherSpec uint8 - -const ( - TLSChangecipherspecMessage TLSchangeCipherSpec = 1 - TLSChangecipherspecUnknown TLSchangeCipherSpec = 255 -) - -// TLS Change Cipher Spec -// 0 1 2 3 4 5 6 7 8 -// +--+--+--+--+--+--+--+--+ -// | Message | -// +--+--+--+--+--+--+--+--+ - -// TLSChangeCipherSpecRecord defines the type of data inside ChangeCipherSpec Record -type TLSChangeCipherSpecRecord struct { - TLSRecordHeader - - Message TLSchangeCipherSpec -} - -// DecodeFromBytes decodes the slice into the TLS struct. -func (t *TLSChangeCipherSpecRecord) decodeFromBytes(h TLSRecordHeader, data []byte, df gopacket.DecodeFeedback) error { - // TLS Record Header - t.ContentType = h.ContentType - t.Version = h.Version - t.Length = h.Length - - if len(data) != 1 { - df.SetTruncated() - return errors.New("TLS Change Cipher Spec record incorrect length") - } - - t.Message = TLSchangeCipherSpec(data[0]) - if t.Message != TLSChangecipherspecMessage { - t.Message = TLSChangecipherspecUnknown - } - - return nil -} - -// String shows the message value nicely formatted -func (ccs TLSchangeCipherSpec) String() string { - switch ccs { - default: - return "Unknown" - case TLSChangecipherspecMessage: - return "Change Cipher Spec Message" - } -} diff --git a/vendor/github.com/google/gopacket/layers/tls_handshake.go b/vendor/github.com/google/gopacket/layers/tls_handshake.go deleted file mode 100644 index e45e2c7cbc5..00000000000 --- a/vendor/github.com/google/gopacket/layers/tls_handshake.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2018 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "github.com/google/gopacket" -) - -// TLSHandshakeRecord defines the structure of a Handshare Record -type TLSHandshakeRecord struct { - TLSRecordHeader -} - -// DecodeFromBytes decodes the slice into the TLS struct. -func (t *TLSHandshakeRecord) decodeFromBytes(h TLSRecordHeader, data []byte, df gopacket.DecodeFeedback) error { - // TLS Record Header - t.ContentType = h.ContentType - t.Version = h.Version - t.Length = h.Length - - // TODO - - return nil -} diff --git a/vendor/github.com/google/gopacket/layers/udp.go b/vendor/github.com/google/gopacket/layers/udp.go deleted file mode 100644 index 97e81c69fcc..00000000000 --- a/vendor/github.com/google/gopacket/layers/udp.go +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "fmt" - - "github.com/google/gopacket" -) - -// UDP is the layer for UDP headers. -type UDP struct { - BaseLayer - SrcPort, DstPort UDPPort - Length uint16 - Checksum uint16 - sPort, dPort []byte - tcpipchecksum -} - -// LayerType returns gopacket.LayerTypeUDP -func (u *UDP) LayerType() gopacket.LayerType { return LayerTypeUDP } - -func (udp *UDP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 8 { - df.SetTruncated() - return fmt.Errorf("Invalid UDP header. Length %d less than 8", len(data)) - } - udp.SrcPort = UDPPort(binary.BigEndian.Uint16(data[0:2])) - udp.sPort = data[0:2] - udp.DstPort = UDPPort(binary.BigEndian.Uint16(data[2:4])) - udp.dPort = data[2:4] - udp.Length = binary.BigEndian.Uint16(data[4:6]) - udp.Checksum = binary.BigEndian.Uint16(data[6:8]) - udp.BaseLayer = BaseLayer{Contents: data[:8]} - switch { - case udp.Length >= 8: - hlen := int(udp.Length) - if hlen > len(data) { - df.SetTruncated() - hlen = len(data) - } - udp.Payload = data[8:hlen] - case udp.Length == 0: // Jumbogram, use entire rest of data - udp.Payload = data[8:] - default: - return fmt.Errorf("UDP packet too small: %d bytes", udp.Length) - } - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (u *UDP) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - var jumbo bool - - payload := b.Bytes() - if _, ok := u.pseudoheader.(*IPv6); ok { - if len(payload)+8 > 65535 { - jumbo = true - } - } - bytes, err := b.PrependBytes(8) - if err != nil { - return err - } - binary.BigEndian.PutUint16(bytes, uint16(u.SrcPort)) - binary.BigEndian.PutUint16(bytes[2:], uint16(u.DstPort)) - if opts.FixLengths { - if jumbo { - u.Length = 0 - } else { - u.Length = uint16(len(payload)) + 8 - } - } - binary.BigEndian.PutUint16(bytes[4:], u.Length) - if opts.ComputeChecksums { - // zero out checksum bytes - bytes[6] = 0 - bytes[7] = 0 - csum, err := u.computeChecksum(b.Bytes(), IPProtocolUDP) - if err != nil { - return err - } - u.Checksum = csum - } - binary.BigEndian.PutUint16(bytes[6:], u.Checksum) - return nil -} - -func (u *UDP) CanDecode() gopacket.LayerClass { - return LayerTypeUDP -} - -// NextLayerType use the destination port to select the -// right next decoder. It tries first to decode via the -// destination port, then the source port. -func (u *UDP) NextLayerType() gopacket.LayerType { - if lt := u.DstPort.LayerType(); lt != gopacket.LayerTypePayload { - return lt - } - return u.SrcPort.LayerType() -} - -func decodeUDP(data []byte, p gopacket.PacketBuilder) error { - udp := &UDP{} - err := udp.DecodeFromBytes(data, p) - p.AddLayer(udp) - p.SetTransportLayer(udp) - if err != nil { - return err - } - return p.NextDecoder(udp.NextLayerType()) -} - -func (u *UDP) TransportFlow() gopacket.Flow { - return gopacket.NewFlow(EndpointUDPPort, u.sPort, u.dPort) -} - -// For testing only -func (u *UDP) SetInternalPortsForTesting() { - u.sPort = make([]byte, 2) - u.dPort = make([]byte, 2) - binary.BigEndian.PutUint16(u.sPort, uint16(u.SrcPort)) - binary.BigEndian.PutUint16(u.dPort, uint16(u.DstPort)) -} diff --git a/vendor/github.com/google/gopacket/layers/udplite.go b/vendor/github.com/google/gopacket/layers/udplite.go deleted file mode 100644 index 7d84c51463b..00000000000 --- a/vendor/github.com/google/gopacket/layers/udplite.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2009-2011 Andreas Krennmair. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "github.com/google/gopacket" -) - -// UDPLite is the layer for UDP-Lite headers (rfc 3828). -type UDPLite struct { - BaseLayer - SrcPort, DstPort UDPLitePort - ChecksumCoverage uint16 - Checksum uint16 - sPort, dPort []byte -} - -// LayerType returns gopacket.LayerTypeUDPLite -func (u *UDPLite) LayerType() gopacket.LayerType { return LayerTypeUDPLite } - -func decodeUDPLite(data []byte, p gopacket.PacketBuilder) error { - udp := &UDPLite{ - SrcPort: UDPLitePort(binary.BigEndian.Uint16(data[0:2])), - sPort: data[0:2], - DstPort: UDPLitePort(binary.BigEndian.Uint16(data[2:4])), - dPort: data[2:4], - ChecksumCoverage: binary.BigEndian.Uint16(data[4:6]), - Checksum: binary.BigEndian.Uint16(data[6:8]), - BaseLayer: BaseLayer{data[:8], data[8:]}, - } - p.AddLayer(udp) - p.SetTransportLayer(udp) - return p.NextDecoder(gopacket.LayerTypePayload) -} - -func (u *UDPLite) TransportFlow() gopacket.Flow { - return gopacket.NewFlow(EndpointUDPLitePort, u.sPort, u.dPort) -} diff --git a/vendor/github.com/google/gopacket/layers/usb.go b/vendor/github.com/google/gopacket/layers/usb.go deleted file mode 100644 index d611e0fd060..00000000000 --- a/vendor/github.com/google/gopacket/layers/usb.go +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright 2014 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "github.com/google/gopacket" -) - -type USBEventType uint8 - -const ( - USBEventTypeSubmit USBEventType = 'S' - USBEventTypeComplete USBEventType = 'C' - USBEventTypeError USBEventType = 'E' -) - -func (a USBEventType) String() string { - switch a { - case USBEventTypeSubmit: - return "SUBMIT" - case USBEventTypeComplete: - return "COMPLETE" - case USBEventTypeError: - return "ERROR" - default: - return "Unknown event type" - } -} - -type USBRequestBlockSetupRequest uint8 - -const ( - USBRequestBlockSetupRequestGetStatus USBRequestBlockSetupRequest = 0x00 - USBRequestBlockSetupRequestClearFeature USBRequestBlockSetupRequest = 0x01 - USBRequestBlockSetupRequestSetFeature USBRequestBlockSetupRequest = 0x03 - USBRequestBlockSetupRequestSetAddress USBRequestBlockSetupRequest = 0x05 - USBRequestBlockSetupRequestGetDescriptor USBRequestBlockSetupRequest = 0x06 - USBRequestBlockSetupRequestSetDescriptor USBRequestBlockSetupRequest = 0x07 - USBRequestBlockSetupRequestGetConfiguration USBRequestBlockSetupRequest = 0x08 - USBRequestBlockSetupRequestSetConfiguration USBRequestBlockSetupRequest = 0x09 - USBRequestBlockSetupRequestSetIdle USBRequestBlockSetupRequest = 0x0a -) - -func (a USBRequestBlockSetupRequest) String() string { - switch a { - case USBRequestBlockSetupRequestGetStatus: - return "GET_STATUS" - case USBRequestBlockSetupRequestClearFeature: - return "CLEAR_FEATURE" - case USBRequestBlockSetupRequestSetFeature: - return "SET_FEATURE" - case USBRequestBlockSetupRequestSetAddress: - return "SET_ADDRESS" - case USBRequestBlockSetupRequestGetDescriptor: - return "GET_DESCRIPTOR" - case USBRequestBlockSetupRequestSetDescriptor: - return "SET_DESCRIPTOR" - case USBRequestBlockSetupRequestGetConfiguration: - return "GET_CONFIGURATION" - case USBRequestBlockSetupRequestSetConfiguration: - return "SET_CONFIGURATION" - case USBRequestBlockSetupRequestSetIdle: - return "SET_IDLE" - default: - return "UNKNOWN" - } -} - -type USBTransportType uint8 - -const ( - USBTransportTypeTransferIn USBTransportType = 0x80 // Indicates send or receive - USBTransportTypeIsochronous USBTransportType = 0x00 // Isochronous transfers occur continuously and periodically. They typically contain time sensitive information, such as an audio or video stream. - USBTransportTypeInterrupt USBTransportType = 0x01 // Interrupt transfers are typically non-periodic, small device "initiated" communication requiring bounded latency, such as pointing devices or keyboards. - USBTransportTypeControl USBTransportType = 0x02 // Control transfers are typically used for command and status operations. - USBTransportTypeBulk USBTransportType = 0x03 // Bulk transfers can be used for large bursty data, using all remaining available bandwidth, no guarantees on bandwidth or latency, such as file transfers. -) - -type USBDirectionType uint8 - -const ( - USBDirectionTypeUnknown USBDirectionType = iota - USBDirectionTypeIn - USBDirectionTypeOut -) - -func (a USBDirectionType) String() string { - switch a { - case USBDirectionTypeIn: - return "In" - case USBDirectionTypeOut: - return "Out" - default: - return "Unknown direction type" - } -} - -// The reference at http://www.beyondlogic.org/usbnutshell/usb1.shtml contains more information about the protocol. -type USB struct { - BaseLayer - ID uint64 - EventType USBEventType - TransferType USBTransportType - Direction USBDirectionType - EndpointNumber uint8 - DeviceAddress uint8 - BusID uint16 - TimestampSec int64 - TimestampUsec int32 - Setup bool - Data bool - Status int32 - UrbLength uint32 - UrbDataLength uint32 - - UrbInterval uint32 - UrbStartFrame uint32 - UrbCopyOfTransferFlags uint32 - IsoNumDesc uint32 -} - -func (u *USB) LayerType() gopacket.LayerType { return LayerTypeUSB } - -func (m *USB) NextLayerType() gopacket.LayerType { - if m.Setup { - return LayerTypeUSBRequestBlockSetup - } else if m.Data { - } - - return m.TransferType.LayerType() -} - -func decodeUSB(data []byte, p gopacket.PacketBuilder) error { - d := &USB{} - - return decodingLayerDecoder(d, data, p) -} - -func (m *USB) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 40 { - df.SetTruncated() - return errors.New("USB < 40 bytes") - } - m.ID = binary.LittleEndian.Uint64(data[0:8]) - m.EventType = USBEventType(data[8]) - m.TransferType = USBTransportType(data[9]) - - m.EndpointNumber = data[10] & 0x7f - if data[10]&uint8(USBTransportTypeTransferIn) > 0 { - m.Direction = USBDirectionTypeIn - } else { - m.Direction = USBDirectionTypeOut - } - - m.DeviceAddress = data[11] - m.BusID = binary.LittleEndian.Uint16(data[12:14]) - - if uint(data[14]) == 0 { - m.Setup = true - } - - if uint(data[15]) == 0 { - m.Data = true - } - - m.TimestampSec = int64(binary.LittleEndian.Uint64(data[16:24])) - m.TimestampUsec = int32(binary.LittleEndian.Uint32(data[24:28])) - m.Status = int32(binary.LittleEndian.Uint32(data[28:32])) - m.UrbLength = binary.LittleEndian.Uint32(data[32:36]) - m.UrbDataLength = binary.LittleEndian.Uint32(data[36:40]) - - m.Contents = data[:40] - m.Payload = data[40:] - - if m.Setup { - m.Payload = data[40:] - } else if m.Data { - m.Payload = data[uint32(len(data))-m.UrbDataLength:] - } - - // if 64 bit, dissect_linux_usb_pseudo_header_ext - if false { - m.UrbInterval = binary.LittleEndian.Uint32(data[40:44]) - m.UrbStartFrame = binary.LittleEndian.Uint32(data[44:48]) - m.UrbDataLength = binary.LittleEndian.Uint32(data[48:52]) - m.IsoNumDesc = binary.LittleEndian.Uint32(data[52:56]) - m.Contents = data[:56] - m.Payload = data[56:] - } - - // crc5 or crc16 - // eop (end of packet) - - return nil -} - -type USBRequestBlockSetup struct { - BaseLayer - RequestType uint8 - Request USBRequestBlockSetupRequest - Value uint16 - Index uint16 - Length uint16 -} - -func (u *USBRequestBlockSetup) LayerType() gopacket.LayerType { return LayerTypeUSBRequestBlockSetup } - -func (m *USBRequestBlockSetup) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -func (m *USBRequestBlockSetup) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - m.RequestType = data[0] - m.Request = USBRequestBlockSetupRequest(data[1]) - m.Value = binary.LittleEndian.Uint16(data[2:4]) - m.Index = binary.LittleEndian.Uint16(data[4:6]) - m.Length = binary.LittleEndian.Uint16(data[6:8]) - m.Contents = data[:8] - m.Payload = data[8:] - return nil -} - -func decodeUSBRequestBlockSetup(data []byte, p gopacket.PacketBuilder) error { - d := &USBRequestBlockSetup{} - return decodingLayerDecoder(d, data, p) -} - -type USBControl struct { - BaseLayer -} - -func (u *USBControl) LayerType() gopacket.LayerType { return LayerTypeUSBControl } - -func (m *USBControl) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -func (m *USBControl) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - m.Contents = data - return nil -} - -func decodeUSBControl(data []byte, p gopacket.PacketBuilder) error { - d := &USBControl{} - return decodingLayerDecoder(d, data, p) -} - -type USBInterrupt struct { - BaseLayer -} - -func (u *USBInterrupt) LayerType() gopacket.LayerType { return LayerTypeUSBInterrupt } - -func (m *USBInterrupt) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -func (m *USBInterrupt) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - m.Contents = data - return nil -} - -func decodeUSBInterrupt(data []byte, p gopacket.PacketBuilder) error { - d := &USBInterrupt{} - return decodingLayerDecoder(d, data, p) -} - -type USBBulk struct { - BaseLayer -} - -func (u *USBBulk) LayerType() gopacket.LayerType { return LayerTypeUSBBulk } - -func (m *USBBulk) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypePayload -} - -func (m *USBBulk) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - m.Contents = data - return nil -} - -func decodeUSBBulk(data []byte, p gopacket.PacketBuilder) error { - d := &USBBulk{} - return decodingLayerDecoder(d, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/vrrp.go b/vendor/github.com/google/gopacket/layers/vrrp.go deleted file mode 100644 index ffaafe6a772..00000000000 --- a/vendor/github.com/google/gopacket/layers/vrrp.go +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright 2016 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "net" - - "github.com/google/gopacket" -) - -/* - This layer provides decoding for Virtual Router Redundancy Protocol (VRRP) v2. - https://tools.ietf.org/html/rfc3768#section-5 - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - |Version| Type | Virtual Rtr ID| Priority | Count IP Addrs| - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Auth Type | Adver Int | Checksum | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | IP Address (1) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | . | - | . | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | IP Address (n) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Authentication Data (1) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Authentication Data (2) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -*/ - -type VRRPv2Type uint8 -type VRRPv2AuthType uint8 - -const ( - VRRPv2Advertisement VRRPv2Type = 0x01 // router advertisement -) - -// String conversions for VRRP message types -func (v VRRPv2Type) String() string { - switch v { - case VRRPv2Advertisement: - return "VRRPv2 Advertisement" - default: - return "" - } -} - -const ( - VRRPv2AuthNoAuth VRRPv2AuthType = 0x00 // No Authentication - VRRPv2AuthReserved1 VRRPv2AuthType = 0x01 // Reserved field 1 - VRRPv2AuthReserved2 VRRPv2AuthType = 0x02 // Reserved field 2 -) - -func (v VRRPv2AuthType) String() string { - switch v { - case VRRPv2AuthNoAuth: - return "No Authentication" - case VRRPv2AuthReserved1: - return "Reserved" - case VRRPv2AuthReserved2: - return "Reserved" - default: - return "" - } -} - -// VRRPv2 represents an VRRP v2 message. -type VRRPv2 struct { - BaseLayer - Version uint8 // The version field specifies the VRRP protocol version of this packet (v2) - Type VRRPv2Type // The type field specifies the type of this VRRP packet. The only type defined in v2 is ADVERTISEMENT - VirtualRtrID uint8 // identifies the virtual router this packet is reporting status for - Priority uint8 // specifies the sending VRRP router's priority for the virtual router (100 = default) - CountIPAddr uint8 // The number of IP addresses contained in this VRRP advertisement. - AuthType VRRPv2AuthType // identifies the authentication method being utilized - AdverInt uint8 // The Advertisement interval indicates the time interval (in seconds) between ADVERTISEMENTS. The default is 1 second - Checksum uint16 // used to detect data corruption in the VRRP message. - IPAddress []net.IP // one or more IP addresses associated with the virtual router. Specified in the CountIPAddr field. -} - -// LayerType returns LayerTypeVRRP for VRRP v2 message. -func (v *VRRPv2) LayerType() gopacket.LayerType { return LayerTypeVRRP } - -func (v *VRRPv2) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - - v.BaseLayer = BaseLayer{Contents: data[:len(data)]} - v.Version = data[0] >> 4 // high nibble == VRRP version. We're expecting v2 - - v.Type = VRRPv2Type(data[0] & 0x0F) // low nibble == VRRP type. Expecting 1 (advertisement) - if v.Type != 1 { - // rfc3768: A packet with unknown type MUST be discarded. - return errors.New("Unrecognized VRRPv2 type field.") - } - - v.VirtualRtrID = data[1] - v.Priority = data[2] - - v.CountIPAddr = data[3] - if v.CountIPAddr < 1 { - return errors.New("VRRPv2 number of IP addresses is not valid.") - } - - v.AuthType = VRRPv2AuthType(data[4]) - v.AdverInt = uint8(data[5]) - v.Checksum = binary.BigEndian.Uint16(data[6:8]) - - // populate the IPAddress field. The number of addresses is specified in the v.CountIPAddr field - // offset references the starting byte containing the list of ip addresses - offset := 8 - for i := uint8(0); i < v.CountIPAddr; i++ { - v.IPAddress = append(v.IPAddress, data[offset:offset+4]) - offset += 4 - } - - // any trailing packets here may be authentication data and *should* be ignored in v2 as per RFC - // - // 5.3.10. Authentication Data - // - // The authentication string is currently only used to maintain - // backwards compatibility with RFC 2338. It SHOULD be set to zero on - // transmission and ignored on reception. - return nil -} - -// CanDecode specifies the layer type in which we are attempting to unwrap. -func (v *VRRPv2) CanDecode() gopacket.LayerClass { - return LayerTypeVRRP -} - -// NextLayerType specifies the next layer that should be decoded. VRRP does not contain any further payload, so we set to 0 -func (v *VRRPv2) NextLayerType() gopacket.LayerType { - return gopacket.LayerTypeZero -} - -// The VRRP packet does not include payload data. Setting byte slice to nil -func (v *VRRPv2) Payload() []byte { - return nil -} - -// decodeVRRP will parse VRRP v2 -func decodeVRRP(data []byte, p gopacket.PacketBuilder) error { - if len(data) < 8 { - return errors.New("Not a valid VRRP packet. Packet length is too small.") - } - v := &VRRPv2{} - return decodingLayerDecoder(v, data, p) -} diff --git a/vendor/github.com/google/gopacket/layers/vxlan.go b/vendor/github.com/google/gopacket/layers/vxlan.go deleted file mode 100644 index e479cd81f3e..00000000000 --- a/vendor/github.com/google/gopacket/layers/vxlan.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2016 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "errors" - "fmt" - - "github.com/google/gopacket" -) - -// VXLAN is specifed in RFC 7348 https://tools.ietf.org/html/rfc7348 -// G, D, A, Group Policy ID from https://tools.ietf.org/html/draft-smith-vxlan-group-policy-00 -// 0 1 2 3 -// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 -// 0 8 16 24 32 -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// |G|R|R|R|I|R|R|R|R|D|R|R|A|R|R|R| Group Policy ID | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -// | 24 bit VXLAN Network Identifier | Reserved | -// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - -// VXLAN is a VXLAN packet header -type VXLAN struct { - BaseLayer - ValidIDFlag bool // 'I' bit per RFC 7348 - VNI uint32 // 'VXLAN Network Identifier' 24 bits per RFC 7348 - GBPExtension bool // 'G' bit per Group Policy https://tools.ietf.org/html/draft-smith-vxlan-group-policy-00 - GBPDontLearn bool // 'D' bit per Group Policy - GBPApplied bool // 'A' bit per Group Policy - GBPGroupPolicyID uint16 // 'Group Policy ID' 16 bits per Group Policy -} - -// LayerType returns LayerTypeVXLAN -func (vx *VXLAN) LayerType() gopacket.LayerType { return LayerTypeVXLAN } - -// CanDecode returns the layer type this DecodingLayer can decode -func (vx *VXLAN) CanDecode() gopacket.LayerClass { - return LayerTypeVXLAN -} - -// NextLayerType retuns the next layer we should see after vxlan -func (vx *VXLAN) NextLayerType() gopacket.LayerType { - return LayerTypeEthernet -} - -// DecodeFromBytes takes a byte buffer and decodes -func (vx *VXLAN) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - if len(data) < 8 { - return errors.New("vxlan packet too small") - } - // VNI is a 24bit number, Uint32 requires 32 bits - var buf [4]byte - copy(buf[1:], data[4:7]) - - // RFC 7348 https://tools.ietf.org/html/rfc7348 - vx.ValidIDFlag = data[0]&0x08 > 0 // 'I' bit per RFC7348 - vx.VNI = binary.BigEndian.Uint32(buf[:]) // VXLAN Network Identifier per RFC7348 - - // Group Based Policy https://tools.ietf.org/html/draft-smith-vxlan-group-policy-00 - vx.GBPExtension = data[0]&0x80 > 0 // 'G' bit per the group policy draft - vx.GBPDontLearn = data[1]&0x40 > 0 // 'D' bit - the egress VTEP MUST NOT learn the source address of the encapsulated frame. - vx.GBPApplied = data[1]&0x80 > 0 // 'A' bit - indicates that the group policy has already been applied to this packet. - vx.GBPGroupPolicyID = binary.BigEndian.Uint16(data[2:4]) // Policy ID as per the group policy draft - - // Layer information - const vxlanLength = 8 - vx.Contents = data[:vxlanLength] - vx.Payload = data[vxlanLength:] - - return nil - -} - -func decodeVXLAN(data []byte, p gopacket.PacketBuilder) error { - vx := &VXLAN{} - err := vx.DecodeFromBytes(data, p) - if err != nil { - return err - } - - p.AddLayer(vx) - return p.NextDecoder(LinkTypeEthernet) -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (vx *VXLAN) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - bytes, err := b.PrependBytes(8) - if err != nil { - return err - } - - // PrependBytes does not guarantee that bytes are zeroed. Setting flags via OR requires that they start off at zero - bytes[0] = 0 - bytes[1] = 0 - - if vx.ValidIDFlag { - bytes[0] |= 0x08 - } - if vx.GBPExtension { - bytes[0] |= 0x80 - } - if vx.GBPDontLearn { - bytes[1] |= 0x40 - } - if vx.GBPApplied { - bytes[1] |= 0x80 - } - - binary.BigEndian.PutUint16(bytes[2:4], vx.GBPGroupPolicyID) - if vx.VNI >= 1<<24 { - return fmt.Errorf("Virtual Network Identifier = %x exceeds max for 24-bit uint", vx.VNI) - } - binary.BigEndian.PutUint32(bytes[4:8], vx.VNI<<8) - return nil -} diff --git a/vendor/github.com/google/gopacket/layers_decoder.go b/vendor/github.com/google/gopacket/layers_decoder.go deleted file mode 100644 index 8c1f108cfc6..00000000000 --- a/vendor/github.com/google/gopacket/layers_decoder.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2019 The GoPacket Authors. All rights reserved. - -package gopacket - -// Created by gen.go, don't edit manually -// Generated at 2019-06-18 11:37:31.308731293 +0600 +06 m=+0.000842599 - -// LayersDecoder returns DecodingLayerFunc for specified -// DecodingLayerContainer, LayerType value to start decoding with and -// some DecodeFeedback. -func LayersDecoder(dl DecodingLayerContainer, first LayerType, df DecodeFeedback) DecodingLayerFunc { - firstDec, ok := dl.Decoder(first) - if !ok { - return func([]byte, *[]LayerType) (LayerType, error) { - return first, nil - } - } - if dlc, ok := dl.(DecodingLayerSparse); ok { - return func(data []byte, decoded *[]LayerType) (LayerType, error) { - *decoded = (*decoded)[:0] // Truncated decoded layers. - typ := first - decoder := firstDec - for { - if err := decoder.DecodeFromBytes(data, df); err != nil { - return LayerTypeZero, err - } - *decoded = append(*decoded, typ) - typ = decoder.NextLayerType() - if data = decoder.LayerPayload(); len(data) == 0 { - break - } - if decoder, ok = dlc.Decoder(typ); !ok { - return typ, nil - } - } - return LayerTypeZero, nil - } - } - if dlc, ok := dl.(DecodingLayerArray); ok { - return func(data []byte, decoded *[]LayerType) (LayerType, error) { - *decoded = (*decoded)[:0] // Truncated decoded layers. - typ := first - decoder := firstDec - for { - if err := decoder.DecodeFromBytes(data, df); err != nil { - return LayerTypeZero, err - } - *decoded = append(*decoded, typ) - typ = decoder.NextLayerType() - if data = decoder.LayerPayload(); len(data) == 0 { - break - } - if decoder, ok = dlc.Decoder(typ); !ok { - return typ, nil - } - } - return LayerTypeZero, nil - } - } - if dlc, ok := dl.(DecodingLayerMap); ok { - return func(data []byte, decoded *[]LayerType) (LayerType, error) { - *decoded = (*decoded)[:0] // Truncated decoded layers. - typ := first - decoder := firstDec - for { - if err := decoder.DecodeFromBytes(data, df); err != nil { - return LayerTypeZero, err - } - *decoded = append(*decoded, typ) - typ = decoder.NextLayerType() - if data = decoder.LayerPayload(); len(data) == 0 { - break - } - if decoder, ok = dlc.Decoder(typ); !ok { - return typ, nil - } - } - return LayerTypeZero, nil - } - } - dlc := dl - return func(data []byte, decoded *[]LayerType) (LayerType, error) { - *decoded = (*decoded)[:0] // Truncated decoded layers. - typ := first - decoder := firstDec - for { - if err := decoder.DecodeFromBytes(data, df); err != nil { - return LayerTypeZero, err - } - *decoded = append(*decoded, typ) - typ = decoder.NextLayerType() - if data = decoder.LayerPayload(); len(data) == 0 { - break - } - if decoder, ok = dlc.Decoder(typ); !ok { - return typ, nil - } - } - return LayerTypeZero, nil - } -} diff --git a/vendor/github.com/google/gopacket/layertype.go b/vendor/github.com/google/gopacket/layertype.go deleted file mode 100644 index 3abfee1e9ba..00000000000 --- a/vendor/github.com/google/gopacket/layertype.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package gopacket - -import ( - "fmt" - "strconv" -) - -// LayerType is a unique identifier for each type of layer. This enumeration -// does not match with any externally available numbering scheme... it's solely -// usable/useful within this library as a means for requesting layer types -// (see Packet.Layer) and determining which types of layers have been decoded. -// -// New LayerTypes may be created by calling gopacket.RegisterLayerType. -type LayerType int64 - -// LayerTypeMetadata contains metadata associated with each LayerType. -type LayerTypeMetadata struct { - // Name is the string returned by each layer type's String method. - Name string - // Decoder is the decoder to use when the layer type is passed in as a - // Decoder. - Decoder Decoder -} - -type layerTypeMetadata struct { - inUse bool - LayerTypeMetadata -} - -// DecodersByLayerName maps layer names to decoders for those layers. -// This allows users to specify decoders by name to a program and have that -// program pick the correct decoder accordingly. -var DecodersByLayerName = map[string]Decoder{} - -const maxLayerType = 2000 - -var ltMeta [maxLayerType]layerTypeMetadata -var ltMetaMap = map[LayerType]layerTypeMetadata{} - -// RegisterLayerType creates a new layer type and registers it globally. -// The number passed in must be unique, or a runtime panic will occur. Numbers -// 0-999 are reserved for the gopacket library. Numbers 1000-1999 should be -// used for common application-specific types, and are very fast. Any other -// number (negative or >= 2000) may be used for uncommon application-specific -// types, and are somewhat slower (they require a map lookup over an array -// index). -func RegisterLayerType(num int, meta LayerTypeMetadata) LayerType { - if 0 <= num && num < maxLayerType { - if ltMeta[num].inUse { - panic("Layer type already exists") - } - } else { - if ltMetaMap[LayerType(num)].inUse { - panic("Layer type already exists") - } - } - return OverrideLayerType(num, meta) -} - -// OverrideLayerType acts like RegisterLayerType, except that if the layer type -// has already been registered, it overrides the metadata with the passed-in -// metadata intead of panicing. -func OverrideLayerType(num int, meta LayerTypeMetadata) LayerType { - if 0 <= num && num < maxLayerType { - ltMeta[num] = layerTypeMetadata{ - inUse: true, - LayerTypeMetadata: meta, - } - } else { - ltMetaMap[LayerType(num)] = layerTypeMetadata{ - inUse: true, - LayerTypeMetadata: meta, - } - } - DecodersByLayerName[meta.Name] = meta.Decoder - return LayerType(num) -} - -// Decode decodes the given data using the decoder registered with the layer -// type. -func (t LayerType) Decode(data []byte, c PacketBuilder) error { - var d Decoder - if 0 <= int(t) && int(t) < maxLayerType { - d = ltMeta[int(t)].Decoder - } else { - d = ltMetaMap[t].Decoder - } - if d != nil { - return d.Decode(data, c) - } - return fmt.Errorf("Layer type %v has no associated decoder", t) -} - -// String returns the string associated with this layer type. -func (t LayerType) String() (s string) { - if 0 <= int(t) && int(t) < maxLayerType { - s = ltMeta[int(t)].Name - } else { - s = ltMetaMap[t].Name - } - if s == "" { - s = strconv.Itoa(int(t)) - } - return -} diff --git a/vendor/github.com/google/gopacket/packet.go b/vendor/github.com/google/gopacket/packet.go deleted file mode 100644 index 3a7c4b3d80b..00000000000 --- a/vendor/github.com/google/gopacket/packet.go +++ /dev/null @@ -1,864 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package gopacket - -import ( - "bytes" - "encoding/hex" - "errors" - "fmt" - "io" - "net" - "os" - "reflect" - "runtime/debug" - "strings" - "syscall" - "time" -) - -// CaptureInfo provides standardized information about a packet captured off -// the wire or read from a file. -type CaptureInfo struct { - // Timestamp is the time the packet was captured, if that is known. - Timestamp time.Time - // CaptureLength is the total number of bytes read off of the wire. - CaptureLength int - // Length is the size of the original packet. Should always be >= - // CaptureLength. - Length int - // InterfaceIndex - InterfaceIndex int - // The packet source can place ancillary data of various types here. - // For example, the afpacket source can report the VLAN of captured - // packets this way. - AncillaryData []interface{} -} - -// PacketMetadata contains metadata for a packet. -type PacketMetadata struct { - CaptureInfo - // Truncated is true if packet decoding logic detects that there are fewer - // bytes in the packet than are detailed in various headers (for example, if - // the number of bytes in the IPv4 contents/payload is less than IPv4.Length). - // This is also set automatically for packets captured off the wire if - // CaptureInfo.CaptureLength < CaptureInfo.Length. - Truncated bool -} - -// Packet is the primary object used by gopacket. Packets are created by a -// Decoder's Decode call. A packet is made up of a set of Data, which -// is broken into a number of Layers as it is decoded. -type Packet interface { - //// Functions for outputting the packet as a human-readable string: - //// ------------------------------------------------------------------ - // String returns a human-readable string representation of the packet. - // It uses LayerString on each layer to output the layer. - String() string - // Dump returns a verbose human-readable string representation of the packet, - // including a hex dump of all layers. It uses LayerDump on each layer to - // output the layer. - Dump() string - - //// Functions for accessing arbitrary packet layers: - //// ------------------------------------------------------------------ - // Layers returns all layers in this packet, computing them as necessary - Layers() []Layer - // Layer returns the first layer in this packet of the given type, or nil - Layer(LayerType) Layer - // LayerClass returns the first layer in this packet of the given class, - // or nil. - LayerClass(LayerClass) Layer - - //// Functions for accessing specific types of packet layers. These functions - //// return the first layer of each type found within the packet. - //// ------------------------------------------------------------------ - // LinkLayer returns the first link layer in the packet - LinkLayer() LinkLayer - // NetworkLayer returns the first network layer in the packet - NetworkLayer() NetworkLayer - // TransportLayer returns the first transport layer in the packet - TransportLayer() TransportLayer - // ApplicationLayer returns the first application layer in the packet - ApplicationLayer() ApplicationLayer - // ErrorLayer is particularly useful, since it returns nil if the packet - // was fully decoded successfully, and non-nil if an error was encountered - // in decoding and the packet was only partially decoded. Thus, its output - // can be used to determine if the entire packet was able to be decoded. - ErrorLayer() ErrorLayer - - //// Functions for accessing data specific to the packet: - //// ------------------------------------------------------------------ - // Data returns the set of bytes that make up this entire packet. - Data() []byte - // Metadata returns packet metadata associated with this packet. - Metadata() *PacketMetadata -} - -// packet contains all the information we need to fulfill the Packet interface, -// and its two "subclasses" (yes, no such thing in Go, bear with me), -// eagerPacket and lazyPacket, provide eager and lazy decoding logic around the -// various functions needed to access this information. -type packet struct { - // data contains the entire packet data for a packet - data []byte - // initialLayers is space for an initial set of layers already created inside - // the packet. - initialLayers [6]Layer - // layers contains each layer we've already decoded - layers []Layer - // last is the last layer added to the packet - last Layer - // metadata is the PacketMetadata for this packet - metadata PacketMetadata - - decodeOptions DecodeOptions - - // Pointers to the various important layers - link LinkLayer - network NetworkLayer - transport TransportLayer - application ApplicationLayer - failure ErrorLayer -} - -func (p *packet) SetTruncated() { - p.metadata.Truncated = true -} - -func (p *packet) SetLinkLayer(l LinkLayer) { - if p.link == nil { - p.link = l - } -} - -func (p *packet) SetNetworkLayer(l NetworkLayer) { - if p.network == nil { - p.network = l - } -} - -func (p *packet) SetTransportLayer(l TransportLayer) { - if p.transport == nil { - p.transport = l - } -} - -func (p *packet) SetApplicationLayer(l ApplicationLayer) { - if p.application == nil { - p.application = l - } -} - -func (p *packet) SetErrorLayer(l ErrorLayer) { - if p.failure == nil { - p.failure = l - } -} - -func (p *packet) AddLayer(l Layer) { - p.layers = append(p.layers, l) - p.last = l -} - -func (p *packet) DumpPacketData() { - fmt.Fprint(os.Stderr, p.packetDump()) - os.Stderr.Sync() -} - -func (p *packet) Metadata() *PacketMetadata { - return &p.metadata -} - -func (p *packet) Data() []byte { - return p.data -} - -func (p *packet) DecodeOptions() *DecodeOptions { - return &p.decodeOptions -} - -func (p *packet) addFinalDecodeError(err error, stack []byte) { - fail := &DecodeFailure{err: err, stack: stack} - if p.last == nil { - fail.data = p.data - } else { - fail.data = p.last.LayerPayload() - } - p.AddLayer(fail) - p.SetErrorLayer(fail) -} - -func (p *packet) recoverDecodeError() { - if !p.decodeOptions.SkipDecodeRecovery { - if r := recover(); r != nil { - p.addFinalDecodeError(fmt.Errorf("%v", r), debug.Stack()) - } - } -} - -// LayerString outputs an individual layer as a string. The layer is output -// in a single line, with no trailing newline. This function is specifically -// designed to do the right thing for most layers... it follows the following -// rules: -// * If the Layer has a String function, just output that. -// * Otherwise, output all exported fields in the layer, recursing into -// exported slices and structs. -// NOTE: This is NOT THE SAME AS fmt's "%#v". %#v will output both exported -// and unexported fields... many times packet layers contain unexported stuff -// that would just mess up the output of the layer, see for example the -// Payload layer and it's internal 'data' field, which contains a large byte -// array that would really mess up formatting. -func LayerString(l Layer) string { - return fmt.Sprintf("%v\t%s", l.LayerType(), layerString(reflect.ValueOf(l), false, false)) -} - -// Dumper dumps verbose information on a value. If a layer type implements -// Dumper, then its LayerDump() string will include the results in its output. -type Dumper interface { - Dump() string -} - -// LayerDump outputs a very verbose string representation of a layer. Its -// output is a concatenation of LayerString(l) and hex.Dump(l.LayerContents()). -// It contains newlines and ends with a newline. -func LayerDump(l Layer) string { - var b bytes.Buffer - b.WriteString(LayerString(l)) - b.WriteByte('\n') - if d, ok := l.(Dumper); ok { - dump := d.Dump() - if dump != "" { - b.WriteString(dump) - if dump[len(dump)-1] != '\n' { - b.WriteByte('\n') - } - } - } - b.WriteString(hex.Dump(l.LayerContents())) - return b.String() -} - -// layerString outputs, recursively, a layer in a "smart" way. See docs for -// LayerString for more details. -// -// Params: -// i - value to write out -// anonymous: if we're currently recursing an anonymous member of a struct -// writeSpace: if we've already written a value in a struct, and need to -// write a space before writing more. This happens when we write various -// anonymous values, and need to keep writing more. -func layerString(v reflect.Value, anonymous bool, writeSpace bool) string { - // Let String() functions take precedence. - if v.CanInterface() { - if s, ok := v.Interface().(fmt.Stringer); ok { - return s.String() - } - } - // Reflect, and spit out all the exported fields as key=value. - switch v.Type().Kind() { - case reflect.Interface, reflect.Ptr: - if v.IsNil() { - return "nil" - } - r := v.Elem() - return layerString(r, anonymous, writeSpace) - case reflect.Struct: - var b bytes.Buffer - typ := v.Type() - if !anonymous { - b.WriteByte('{') - } - for i := 0; i < v.NumField(); i++ { - // Check if this is upper-case. - ftype := typ.Field(i) - f := v.Field(i) - if ftype.Anonymous { - anonStr := layerString(f, true, writeSpace) - writeSpace = writeSpace || anonStr != "" - b.WriteString(anonStr) - } else if ftype.PkgPath == "" { // exported - if writeSpace { - b.WriteByte(' ') - } - writeSpace = true - fmt.Fprintf(&b, "%s=%s", typ.Field(i).Name, layerString(f, false, writeSpace)) - } - } - if !anonymous { - b.WriteByte('}') - } - return b.String() - case reflect.Slice: - var b bytes.Buffer - b.WriteByte('[') - if v.Len() > 4 { - fmt.Fprintf(&b, "..%d..", v.Len()) - } else { - for j := 0; j < v.Len(); j++ { - if j != 0 { - b.WriteString(", ") - } - b.WriteString(layerString(v.Index(j), false, false)) - } - } - b.WriteByte(']') - return b.String() - } - return fmt.Sprintf("%v", v.Interface()) -} - -const ( - longBytesLength = 128 -) - -// LongBytesGoString returns a string representation of the byte slice shortened -// using the format '{ ... ( bytes)}' if it -// exceeds a predetermined length. Can be used to avoid filling the display with -// very long byte strings. -func LongBytesGoString(buf []byte) string { - if len(buf) < longBytesLength { - return fmt.Sprintf("%#v", buf) - } - s := fmt.Sprintf("%#v", buf[:longBytesLength-1]) - s = strings.TrimSuffix(s, "}") - return fmt.Sprintf("%s ... (%d bytes)}", s, len(buf)) -} - -func baseLayerString(value reflect.Value) string { - t := value.Type() - content := value.Field(0) - c := make([]byte, content.Len()) - for i := range c { - c[i] = byte(content.Index(i).Uint()) - } - payload := value.Field(1) - p := make([]byte, payload.Len()) - for i := range p { - p[i] = byte(payload.Index(i).Uint()) - } - return fmt.Sprintf("%s{Contents:%s, Payload:%s}", t.String(), - LongBytesGoString(c), - LongBytesGoString(p)) -} - -func layerGoString(i interface{}, b *bytes.Buffer) { - if s, ok := i.(fmt.GoStringer); ok { - b.WriteString(s.GoString()) - return - } - - var v reflect.Value - var ok bool - if v, ok = i.(reflect.Value); !ok { - v = reflect.ValueOf(i) - } - switch v.Kind() { - case reflect.Ptr, reflect.Interface: - if v.Kind() == reflect.Ptr { - b.WriteByte('&') - } - layerGoString(v.Elem().Interface(), b) - case reflect.Struct: - t := v.Type() - b.WriteString(t.String()) - b.WriteByte('{') - for i := 0; i < v.NumField(); i++ { - if i > 0 { - b.WriteString(", ") - } - if t.Field(i).Name == "BaseLayer" { - fmt.Fprintf(b, "BaseLayer:%s", baseLayerString(v.Field(i))) - } else if v.Field(i).Kind() == reflect.Struct { - fmt.Fprintf(b, "%s:", t.Field(i).Name) - layerGoString(v.Field(i), b) - } else if v.Field(i).Kind() == reflect.Ptr { - b.WriteByte('&') - layerGoString(v.Field(i), b) - } else { - fmt.Fprintf(b, "%s:%#v", t.Field(i).Name, v.Field(i)) - } - } - b.WriteByte('}') - default: - fmt.Fprintf(b, "%#v", i) - } -} - -// LayerGoString returns a representation of the layer in Go syntax, -// taking care to shorten "very long" BaseLayer byte slices -func LayerGoString(l Layer) string { - b := new(bytes.Buffer) - layerGoString(l, b) - return b.String() -} - -func (p *packet) packetString() string { - var b bytes.Buffer - fmt.Fprintf(&b, "PACKET: %d bytes", len(p.Data())) - if p.metadata.Truncated { - b.WriteString(", truncated") - } - if p.metadata.Length > 0 { - fmt.Fprintf(&b, ", wire length %d cap length %d", p.metadata.Length, p.metadata.CaptureLength) - } - if !p.metadata.Timestamp.IsZero() { - fmt.Fprintf(&b, " @ %v", p.metadata.Timestamp) - } - b.WriteByte('\n') - for i, l := range p.layers { - fmt.Fprintf(&b, "- Layer %d (%02d bytes) = %s\n", i+1, len(l.LayerContents()), LayerString(l)) - } - return b.String() -} - -func (p *packet) packetDump() string { - var b bytes.Buffer - fmt.Fprintf(&b, "-- FULL PACKET DATA (%d bytes) ------------------------------------\n%s", len(p.data), hex.Dump(p.data)) - for i, l := range p.layers { - fmt.Fprintf(&b, "--- Layer %d ---\n%s", i+1, LayerDump(l)) - } - return b.String() -} - -// eagerPacket is a packet implementation that does eager decoding. Upon -// initial construction, it decodes all the layers it can from packet data. -// eagerPacket implements Packet and PacketBuilder. -type eagerPacket struct { - packet -} - -var errNilDecoder = errors.New("NextDecoder passed nil decoder, probably an unsupported decode type") - -func (p *eagerPacket) NextDecoder(next Decoder) error { - if next == nil { - return errNilDecoder - } - if p.last == nil { - return errors.New("NextDecoder called, but no layers added yet") - } - d := p.last.LayerPayload() - if len(d) == 0 { - return nil - } - // Since we're eager, immediately call the next decoder. - return next.Decode(d, p) -} -func (p *eagerPacket) initialDecode(dec Decoder) { - defer p.recoverDecodeError() - err := dec.Decode(p.data, p) - if err != nil { - p.addFinalDecodeError(err, nil) - } -} -func (p *eagerPacket) LinkLayer() LinkLayer { - return p.link -} -func (p *eagerPacket) NetworkLayer() NetworkLayer { - return p.network -} -func (p *eagerPacket) TransportLayer() TransportLayer { - return p.transport -} -func (p *eagerPacket) ApplicationLayer() ApplicationLayer { - return p.application -} -func (p *eagerPacket) ErrorLayer() ErrorLayer { - return p.failure -} -func (p *eagerPacket) Layers() []Layer { - return p.layers -} -func (p *eagerPacket) Layer(t LayerType) Layer { - for _, l := range p.layers { - if l.LayerType() == t { - return l - } - } - return nil -} -func (p *eagerPacket) LayerClass(lc LayerClass) Layer { - for _, l := range p.layers { - if lc.Contains(l.LayerType()) { - return l - } - } - return nil -} -func (p *eagerPacket) String() string { return p.packetString() } -func (p *eagerPacket) Dump() string { return p.packetDump() } - -// lazyPacket does lazy decoding on its packet data. On construction it does -// no initial decoding. For each function call, it decodes only as many layers -// as are necessary to compute the return value for that function. -// lazyPacket implements Packet and PacketBuilder. -type lazyPacket struct { - packet - next Decoder -} - -func (p *lazyPacket) NextDecoder(next Decoder) error { - if next == nil { - return errNilDecoder - } - p.next = next - return nil -} -func (p *lazyPacket) decodeNextLayer() { - if p.next == nil { - return - } - d := p.data - if p.last != nil { - d = p.last.LayerPayload() - } - next := p.next - p.next = nil - // We've just set p.next to nil, so if we see we have no data, this should be - // the final call we get to decodeNextLayer if we return here. - if len(d) == 0 { - return - } - defer p.recoverDecodeError() - err := next.Decode(d, p) - if err != nil { - p.addFinalDecodeError(err, nil) - } -} -func (p *lazyPacket) LinkLayer() LinkLayer { - for p.link == nil && p.next != nil { - p.decodeNextLayer() - } - return p.link -} -func (p *lazyPacket) NetworkLayer() NetworkLayer { - for p.network == nil && p.next != nil { - p.decodeNextLayer() - } - return p.network -} -func (p *lazyPacket) TransportLayer() TransportLayer { - for p.transport == nil && p.next != nil { - p.decodeNextLayer() - } - return p.transport -} -func (p *lazyPacket) ApplicationLayer() ApplicationLayer { - for p.application == nil && p.next != nil { - p.decodeNextLayer() - } - return p.application -} -func (p *lazyPacket) ErrorLayer() ErrorLayer { - for p.failure == nil && p.next != nil { - p.decodeNextLayer() - } - return p.failure -} -func (p *lazyPacket) Layers() []Layer { - for p.next != nil { - p.decodeNextLayer() - } - return p.layers -} -func (p *lazyPacket) Layer(t LayerType) Layer { - for _, l := range p.layers { - if l.LayerType() == t { - return l - } - } - numLayers := len(p.layers) - for p.next != nil { - p.decodeNextLayer() - for _, l := range p.layers[numLayers:] { - if l.LayerType() == t { - return l - } - } - numLayers = len(p.layers) - } - return nil -} -func (p *lazyPacket) LayerClass(lc LayerClass) Layer { - for _, l := range p.layers { - if lc.Contains(l.LayerType()) { - return l - } - } - numLayers := len(p.layers) - for p.next != nil { - p.decodeNextLayer() - for _, l := range p.layers[numLayers:] { - if lc.Contains(l.LayerType()) { - return l - } - } - numLayers = len(p.layers) - } - return nil -} -func (p *lazyPacket) String() string { p.Layers(); return p.packetString() } -func (p *lazyPacket) Dump() string { p.Layers(); return p.packetDump() } - -// DecodeOptions tells gopacket how to decode a packet. -type DecodeOptions struct { - // Lazy decoding decodes the minimum number of layers needed to return data - // for a packet at each function call. Be careful using this with concurrent - // packet processors, as each call to packet.* could mutate the packet, and - // two concurrent function calls could interact poorly. - Lazy bool - // NoCopy decoding doesn't copy its input buffer into storage that's owned by - // the packet. If you can guarantee that the bytes underlying the slice - // passed into NewPacket aren't going to be modified, this can be faster. If - // there's any chance that those bytes WILL be changed, this will invalidate - // your packets. - NoCopy bool - // SkipDecodeRecovery skips over panic recovery during packet decoding. - // Normally, when packets decode, if a panic occurs, that panic is captured - // by a recover(), and a DecodeFailure layer is added to the packet detailing - // the issue. If this flag is set, panics are instead allowed to continue up - // the stack. - SkipDecodeRecovery bool - // DecodeStreamsAsDatagrams enables routing of application-level layers in the TCP - // decoder. If true, we should try to decode layers after TCP in single packets. - // This is disabled by default because the reassembly package drives the decoding - // of TCP payload data after reassembly. - DecodeStreamsAsDatagrams bool -} - -// Default decoding provides the safest (but slowest) method for decoding -// packets. It eagerly processes all layers (so it's concurrency-safe) and it -// copies its input buffer upon creation of the packet (so the packet remains -// valid if the underlying slice is modified. Both of these take time, -// though, so beware. If you can guarantee that the packet will only be used -// by one goroutine at a time, set Lazy decoding. If you can guarantee that -// the underlying slice won't change, set NoCopy decoding. -var Default = DecodeOptions{} - -// Lazy is a DecodeOptions with just Lazy set. -var Lazy = DecodeOptions{Lazy: true} - -// NoCopy is a DecodeOptions with just NoCopy set. -var NoCopy = DecodeOptions{NoCopy: true} - -// DecodeStreamsAsDatagrams is a DecodeOptions with just DecodeStreamsAsDatagrams set. -var DecodeStreamsAsDatagrams = DecodeOptions{DecodeStreamsAsDatagrams: true} - -// NewPacket creates a new Packet object from a set of bytes. The -// firstLayerDecoder tells it how to interpret the first layer from the bytes, -// future layers will be generated from that first layer automatically. -func NewPacket(data []byte, firstLayerDecoder Decoder, options DecodeOptions) Packet { - if !options.NoCopy { - dataCopy := make([]byte, len(data)) - copy(dataCopy, data) - data = dataCopy - } - if options.Lazy { - p := &lazyPacket{ - packet: packet{data: data, decodeOptions: options}, - next: firstLayerDecoder, - } - p.layers = p.initialLayers[:0] - // Crazy craziness: - // If the following return statemet is REMOVED, and Lazy is FALSE, then - // eager packet processing becomes 17% FASTER. No, there is no logical - // explanation for this. However, it's such a hacky micro-optimization that - // we really can't rely on it. It appears to have to do with the size the - // compiler guesses for this function's stack space, since one symptom is - // that with the return statement in place, we more than double calls to - // runtime.morestack/runtime.lessstack. We'll hope the compiler gets better - // over time and we get this optimization for free. Until then, we'll have - // to live with slower packet processing. - return p - } - p := &eagerPacket{ - packet: packet{data: data, decodeOptions: options}, - } - p.layers = p.initialLayers[:0] - p.initialDecode(firstLayerDecoder) - return p -} - -// PacketDataSource is an interface for some source of packet data. Users may -// create their own implementations, or use the existing implementations in -// gopacket/pcap (libpcap, allows reading from live interfaces or from -// pcap files) or gopacket/pfring (PF_RING, allows reading from live -// interfaces). -type PacketDataSource interface { - // ReadPacketData returns the next packet available from this data source. - // It returns: - // data: The bytes of an individual packet. - // ci: Metadata about the capture - // err: An error encountered while reading packet data. If err != nil, - // then data/ci will be ignored. - ReadPacketData() (data []byte, ci CaptureInfo, err error) -} - -// ConcatFinitePacketDataSources returns a PacketDataSource that wraps a set -// of internal PacketDataSources, each of which will stop with io.EOF after -// reading a finite number of packets. The returned PacketDataSource will -// return all packets from the first finite source, followed by all packets from -// the second, etc. Once all finite sources have returned io.EOF, the returned -// source will as well. -func ConcatFinitePacketDataSources(pds ...PacketDataSource) PacketDataSource { - c := concat(pds) - return &c -} - -type concat []PacketDataSource - -func (c *concat) ReadPacketData() (data []byte, ci CaptureInfo, err error) { - for len(*c) > 0 { - data, ci, err = (*c)[0].ReadPacketData() - if err == io.EOF { - *c = (*c)[1:] - continue - } - return - } - return nil, CaptureInfo{}, io.EOF -} - -// ZeroCopyPacketDataSource is an interface to pull packet data from sources -// that allow data to be returned without copying to a user-controlled buffer. -// It's very similar to PacketDataSource, except that the caller must be more -// careful in how the returned buffer is handled. -type ZeroCopyPacketDataSource interface { - // ZeroCopyReadPacketData returns the next packet available from this data source. - // It returns: - // data: The bytes of an individual packet. Unlike with - // PacketDataSource's ReadPacketData, the slice returned here points - // to a buffer owned by the data source. In particular, the bytes in - // this buffer may be changed by future calls to - // ZeroCopyReadPacketData. Do not use the returned buffer after - // subsequent ZeroCopyReadPacketData calls. - // ci: Metadata about the capture - // err: An error encountered while reading packet data. If err != nil, - // then data/ci will be ignored. - ZeroCopyReadPacketData() (data []byte, ci CaptureInfo, err error) -} - -// PacketSource reads in packets from a PacketDataSource, decodes them, and -// returns them. -// -// There are currently two different methods for reading packets in through -// a PacketSource: -// -// Reading With Packets Function -// -// This method is the most convenient and easiest to code, but lacks -// flexibility. Packets returns a 'chan Packet', then asynchronously writes -// packets into that channel. Packets uses a blocking channel, and closes -// it if an io.EOF is returned by the underlying PacketDataSource. All other -// PacketDataSource errors are ignored and discarded. -// for packet := range packetSource.Packets() { -// ... -// } -// -// Reading With NextPacket Function -// -// This method is the most flexible, and exposes errors that may be -// encountered by the underlying PacketDataSource. It's also the fastest -// in a tight loop, since it doesn't have the overhead of a channel -// read/write. However, it requires the user to handle errors, most -// importantly the io.EOF error in cases where packets are being read from -// a file. -// for { -// packet, err := packetSource.NextPacket() -// if err == io.EOF { -// break -// } else if err != nil { -// log.Println("Error:", err) -// continue -// } -// handlePacket(packet) // Do something with each packet. -// } -type PacketSource struct { - source PacketDataSource - decoder Decoder - // DecodeOptions is the set of options to use for decoding each piece - // of packet data. This can/should be changed by the user to reflect the - // way packets should be decoded. - DecodeOptions - c chan Packet -} - -// NewPacketSource creates a packet data source. -func NewPacketSource(source PacketDataSource, decoder Decoder) *PacketSource { - return &PacketSource{ - source: source, - decoder: decoder, - } -} - -// NextPacket returns the next decoded packet from the PacketSource. On error, -// it returns a nil packet and a non-nil error. -func (p *PacketSource) NextPacket() (Packet, error) { - data, ci, err := p.source.ReadPacketData() - if err != nil { - return nil, err - } - packet := NewPacket(data, p.decoder, p.DecodeOptions) - m := packet.Metadata() - m.CaptureInfo = ci - m.Truncated = m.Truncated || ci.CaptureLength < ci.Length - return packet, nil -} - -// packetsToChannel reads in all packets from the packet source and sends them -// to the given channel. This routine terminates when a non-temporary error -// is returned by NextPacket(). -func (p *PacketSource) packetsToChannel() { - defer close(p.c) - for { - packet, err := p.NextPacket() - if err == nil { - p.c <- packet - continue - } - - // Immediately retry for temporary network errors - if nerr, ok := err.(net.Error); ok && nerr.Temporary() { - continue - } - - // Immediately retry for EAGAIN - if err == syscall.EAGAIN { - continue - } - - // Immediately break for known unrecoverable errors - if err == io.EOF || err == io.ErrUnexpectedEOF || - err == io.ErrNoProgress || err == io.ErrClosedPipe || err == io.ErrShortBuffer || - err == syscall.EBADF || - strings.Contains(err.Error(), "use of closed file") { - break - } - - // Sleep briefly and try again - time.Sleep(time.Millisecond * time.Duration(5)) - } -} - -// Packets returns a channel of packets, allowing easy iterating over -// packets. Packets will be asynchronously read in from the underlying -// PacketDataSource and written to the returned channel. If the underlying -// PacketDataSource returns an io.EOF error, the channel will be closed. -// If any other error is encountered, it is ignored. -// -// for packet := range packetSource.Packets() { -// handlePacket(packet) // Do something with each packet. -// } -// -// If called more than once, returns the same channel. -func (p *PacketSource) Packets() chan Packet { - if p.c == nil { - p.c = make(chan Packet, 1000) - go p.packetsToChannel() - } - return p.c -} diff --git a/vendor/github.com/google/gopacket/parser.go b/vendor/github.com/google/gopacket/parser.go deleted file mode 100644 index 4a4676f1cf4..00000000000 --- a/vendor/github.com/google/gopacket/parser.go +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package gopacket - -import ( - "fmt" -) - -// A container for single LayerType->DecodingLayer mapping. -type decodingLayerElem struct { - typ LayerType - dec DecodingLayer -} - -// DecodingLayer is an interface for packet layers that can decode themselves. -// -// The important part of DecodingLayer is that they decode themselves in-place. -// Calling DecodeFromBytes on a DecodingLayer totally resets the entire layer to -// the new state defined by the data passed in. A returned error leaves the -// DecodingLayer in an unknown intermediate state, thus its fields should not be -// trusted. -// -// Because the DecodingLayer is resetting its own fields, a call to -// DecodeFromBytes should normally not require any memory allocation. -type DecodingLayer interface { - // DecodeFromBytes resets the internal state of this layer to the state - // defined by the passed-in bytes. Slices in the DecodingLayer may - // reference the passed-in data, so care should be taken to copy it - // first should later modification of data be required before the - // DecodingLayer is discarded. - DecodeFromBytes(data []byte, df DecodeFeedback) error - // CanDecode returns the set of LayerTypes this DecodingLayer can - // decode. For Layers that are also DecodingLayers, this will most - // often be that Layer's LayerType(). - CanDecode() LayerClass - // NextLayerType returns the LayerType which should be used to decode - // the LayerPayload. - NextLayerType() LayerType - // LayerPayload is the set of bytes remaining to decode after a call to - // DecodeFromBytes. - LayerPayload() []byte -} - -// DecodingLayerFunc decodes given packet and stores decoded LayerType -// values into specified slice. Returns either first encountered -// unsupported LayerType value or decoding error. In case of success, -// returns (LayerTypeZero, nil). -type DecodingLayerFunc func([]byte, *[]LayerType) (LayerType, error) - -// DecodingLayerContainer stores all DecodingLayer-s and serves as a -// searching tool for DecodingLayerParser. -type DecodingLayerContainer interface { - // Put adds new DecodingLayer to container. The new instance of - // the same DecodingLayerContainer is returned so it may be - // implemented as a value receiver. - Put(DecodingLayer) DecodingLayerContainer - // Decoder returns DecodingLayer to decode given LayerType and - // true if it was found. If no decoder found, return false. - Decoder(LayerType) (DecodingLayer, bool) - // LayersDecoder returns DecodingLayerFunc which decodes given - // packet, starting with specified LayerType and DecodeFeedback. - LayersDecoder(first LayerType, df DecodeFeedback) DecodingLayerFunc -} - -// DecodingLayerSparse is a sparse array-based implementation of -// DecodingLayerContainer. Each DecodingLayer is addressed in an -// allocated slice by LayerType value itself. Though this is the -// fastest container it may be memory-consuming if used with big -// LayerType values. -type DecodingLayerSparse []DecodingLayer - -// Put implements DecodingLayerContainer interface. -func (dl DecodingLayerSparse) Put(d DecodingLayer) DecodingLayerContainer { - maxLayerType := LayerType(len(dl) - 1) - for _, typ := range d.CanDecode().LayerTypes() { - if typ > maxLayerType { - maxLayerType = typ - } - } - - if extra := maxLayerType - LayerType(len(dl)) + 1; extra > 0 { - dl = append(dl, make([]DecodingLayer, extra)...) - } - - for _, typ := range d.CanDecode().LayerTypes() { - dl[typ] = d - } - return dl -} - -// LayersDecoder implements DecodingLayerContainer interface. -func (dl DecodingLayerSparse) LayersDecoder(first LayerType, df DecodeFeedback) DecodingLayerFunc { - return LayersDecoder(dl, first, df) -} - -// Decoder implements DecodingLayerContainer interface. -func (dl DecodingLayerSparse) Decoder(typ LayerType) (DecodingLayer, bool) { - if int64(typ) < int64(len(dl)) { - decoder := dl[typ] - return decoder, decoder != nil - } - return nil, false -} - -// DecodingLayerArray is an array-based implementation of -// DecodingLayerContainer. Each DecodingLayer is searched linearly in -// an allocated slice in one-by-one fashion. -type DecodingLayerArray []decodingLayerElem - -// Put implements DecodingLayerContainer interface. -func (dl DecodingLayerArray) Put(d DecodingLayer) DecodingLayerContainer { -TYPES: - for _, typ := range d.CanDecode().LayerTypes() { - for i := range dl { - if dl[i].typ == typ { - dl[i].dec = d - continue TYPES - } - } - dl = append(dl, decodingLayerElem{typ, d}) - } - return dl -} - -// Decoder implements DecodingLayerContainer interface. -func (dl DecodingLayerArray) Decoder(typ LayerType) (DecodingLayer, bool) { - for i := range dl { - if dl[i].typ == typ { - return dl[i].dec, true - } - } - return nil, false -} - -// LayersDecoder implements DecodingLayerContainer interface. -func (dl DecodingLayerArray) LayersDecoder(first LayerType, df DecodeFeedback) DecodingLayerFunc { - return LayersDecoder(dl, first, df) -} - -// DecodingLayerMap is an map-based implementation of -// DecodingLayerContainer. Each DecodingLayer is searched in a map -// hashed by LayerType value. -type DecodingLayerMap map[LayerType]DecodingLayer - -// Put implements DecodingLayerContainer interface. -func (dl DecodingLayerMap) Put(d DecodingLayer) DecodingLayerContainer { - for _, typ := range d.CanDecode().LayerTypes() { - if dl == nil { - dl = make(map[LayerType]DecodingLayer) - } - dl[typ] = d - } - return dl -} - -// Decoder implements DecodingLayerContainer interface. -func (dl DecodingLayerMap) Decoder(typ LayerType) (DecodingLayer, bool) { - d, ok := dl[typ] - return d, ok -} - -// LayersDecoder implements DecodingLayerContainer interface. -func (dl DecodingLayerMap) LayersDecoder(first LayerType, df DecodeFeedback) DecodingLayerFunc { - return LayersDecoder(dl, first, df) -} - -// Static code check. -var ( - _ = []DecodingLayerContainer{ - DecodingLayerSparse(nil), - DecodingLayerMap(nil), - DecodingLayerArray(nil), - } -) - -// DecodingLayerParser parses a given set of layer types. See DecodeLayers for -// more information on how DecodingLayerParser should be used. -type DecodingLayerParser struct { - // DecodingLayerParserOptions is the set of options available to the - // user to define the parser's behavior. - DecodingLayerParserOptions - dlc DecodingLayerContainer - first LayerType - df DecodeFeedback - - decodeFunc DecodingLayerFunc - - // Truncated is set when a decode layer detects that the packet has been - // truncated. - Truncated bool -} - -// AddDecodingLayer adds a decoding layer to the parser. This adds support for -// the decoding layer's CanDecode layers to the parser... should they be -// encountered, they'll be parsed. -func (l *DecodingLayerParser) AddDecodingLayer(d DecodingLayer) { - l.SetDecodingLayerContainer(l.dlc.Put(d)) -} - -// SetTruncated is used by DecodingLayers to set the Truncated boolean in the -// DecodingLayerParser. Users should simply read Truncated after calling -// DecodeLayers. -func (l *DecodingLayerParser) SetTruncated() { - l.Truncated = true -} - -// NewDecodingLayerParser creates a new DecodingLayerParser and adds in all -// of the given DecodingLayers with AddDecodingLayer. -// -// Each call to DecodeLayers will attempt to decode the given bytes first by -// treating them as a 'first'-type layer, then by using NextLayerType on -// subsequently decoded layers to find the next relevant decoder. Should a -// deoder not be available for the layer type returned by NextLayerType, -// decoding will stop. -// -// NewDecodingLayerParser uses DecodingLayerMap container by -// default. -func NewDecodingLayerParser(first LayerType, decoders ...DecodingLayer) *DecodingLayerParser { - dlp := &DecodingLayerParser{first: first} - dlp.df = dlp // Cast this once to the interface - // default container - dlc := DecodingLayerContainer(DecodingLayerMap(make(map[LayerType]DecodingLayer))) - for _, d := range decoders { - dlc = dlc.Put(d) - } - - dlp.SetDecodingLayerContainer(dlc) - return dlp -} - -// SetDecodingLayerContainer specifies container with decoders. This -// call replaces all decoders already registered in given instance of -// DecodingLayerParser. -func (l *DecodingLayerParser) SetDecodingLayerContainer(dlc DecodingLayerContainer) { - l.dlc = dlc - l.decodeFunc = l.dlc.LayersDecoder(l.first, l.df) -} - -// DecodeLayers decodes as many layers as possible from the given data. It -// initially treats the data as layer type 'typ', then uses NextLayerType on -// each subsequent decoded layer until it gets to a layer type it doesn't know -// how to parse. -// -// For each layer successfully decoded, DecodeLayers appends the layer type to -// the decoded slice. DecodeLayers truncates the 'decoded' slice initially, so -// there's no need to empty it yourself. -// -// This decoding method is about an order of magnitude faster than packet -// decoding, because it only decodes known layers that have already been -// allocated. This means it doesn't need to allocate each layer it returns... -// instead it overwrites the layers that already exist. -// -// Example usage: -// func main() { -// var eth layers.Ethernet -// var ip4 layers.IPv4 -// var ip6 layers.IPv6 -// var tcp layers.TCP -// var udp layers.UDP -// var payload gopacket.Payload -// parser := gopacket.NewDecodingLayerParser(layers.LayerTypeEthernet, ð, &ip4, &ip6, &tcp, &udp, &payload) -// var source gopacket.PacketDataSource = getMyDataSource() -// decodedLayers := make([]gopacket.LayerType, 0, 10) -// for { -// data, _, err := source.ReadPacketData() -// if err != nil { -// fmt.Println("Error reading packet data: ", err) -// continue -// } -// fmt.Println("Decoding packet") -// err = parser.DecodeLayers(data, &decodedLayers) -// for _, typ := range decodedLayers { -// fmt.Println(" Successfully decoded layer type", typ) -// switch typ { -// case layers.LayerTypeEthernet: -// fmt.Println(" Eth ", eth.SrcMAC, eth.DstMAC) -// case layers.LayerTypeIPv4: -// fmt.Println(" IP4 ", ip4.SrcIP, ip4.DstIP) -// case layers.LayerTypeIPv6: -// fmt.Println(" IP6 ", ip6.SrcIP, ip6.DstIP) -// case layers.LayerTypeTCP: -// fmt.Println(" TCP ", tcp.SrcPort, tcp.DstPort) -// case layers.LayerTypeUDP: -// fmt.Println(" UDP ", udp.SrcPort, udp.DstPort) -// } -// } -// if decodedLayers.Truncated { -// fmt.Println(" Packet has been truncated") -// } -// if err != nil { -// fmt.Println(" Error encountered:", err) -// } -// } -// } -// -// If DecodeLayers is unable to decode the next layer type, it will return the -// error UnsupportedLayerType. -func (l *DecodingLayerParser) DecodeLayers(data []byte, decoded *[]LayerType) (err error) { - l.Truncated = false - if !l.IgnorePanic { - defer panicToError(&err) - } - typ, err := l.decodeFunc(data, decoded) - if typ != LayerTypeZero { - // no decoder - if l.IgnoreUnsupported { - return nil - } - return UnsupportedLayerType(typ) - } - return err -} - -// UnsupportedLayerType is returned by DecodingLayerParser if DecodeLayers -// encounters a layer type that the DecodingLayerParser has no decoder for. -type UnsupportedLayerType LayerType - -// Error implements the error interface, returning a string to say that the -// given layer type is unsupported. -func (e UnsupportedLayerType) Error() string { - return fmt.Sprintf("No decoder for layer type %v", LayerType(e)) -} - -func panicToError(e *error) { - if r := recover(); r != nil { - *e = fmt.Errorf("panic: %v", r) - } -} - -// DecodingLayerParserOptions provides options to affect the behavior of a given -// DecodingLayerParser. -type DecodingLayerParserOptions struct { - // IgnorePanic determines whether a DecodingLayerParser should stop - // panics on its own (by returning them as an error from DecodeLayers) - // or should allow them to raise up the stack. Handling errors does add - // latency to the process of decoding layers, but is much safer for - // callers. IgnorePanic defaults to false, thus if the caller does - // nothing decode panics will be returned as errors. - IgnorePanic bool - // IgnoreUnsupported will stop parsing and return a nil error when it - // encounters a layer it doesn't have a parser for, instead of returning an - // UnsupportedLayerType error. If this is true, it's up to the caller to make - // sure that all expected layers have been parsed (by checking the decoded - // slice). - IgnoreUnsupported bool -} diff --git a/vendor/github.com/google/gopacket/time.go b/vendor/github.com/google/gopacket/time.go deleted file mode 100644 index 6d116cdfbc7..00000000000 --- a/vendor/github.com/google/gopacket/time.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2018 The GoPacket Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package gopacket - -import ( - "fmt" - "math" - "time" -) - -// TimestampResolution represents the resolution of timestamps in Base^Exponent. -type TimestampResolution struct { - Base, Exponent int -} - -func (t TimestampResolution) String() string { - return fmt.Sprintf("%d^%d", t.Base, t.Exponent) -} - -// ToDuration returns the smallest representable time difference as a time.Duration -func (t TimestampResolution) ToDuration() time.Duration { - if t.Base == 0 { - return 0 - } - if t.Exponent == 0 { - return time.Second - } - switch t.Base { - case 10: - return time.Duration(math.Pow10(t.Exponent + 9)) - case 2: - if t.Exponent < 0 { - return time.Second >> uint(-t.Exponent) - } - return time.Second << uint(t.Exponent) - default: - // this might loose precision - return time.Duration(float64(time.Second) * math.Pow(float64(t.Base), float64(t.Exponent))) - } -} - -// TimestampResolutionInvalid represents an invalid timestamp resolution -var TimestampResolutionInvalid = TimestampResolution{} - -// TimestampResolutionMillisecond is a resolution of 10^-3s -var TimestampResolutionMillisecond = TimestampResolution{10, -3} - -// TimestampResolutionMicrosecond is a resolution of 10^-6s -var TimestampResolutionMicrosecond = TimestampResolution{10, -6} - -// TimestampResolutionNanosecond is a resolution of 10^-9s -var TimestampResolutionNanosecond = TimestampResolution{10, -9} - -// TimestampResolutionNTP is the resolution of NTP timestamps which is 2^-32 ≈ 233 picoseconds -var TimestampResolutionNTP = TimestampResolution{2, -32} - -// TimestampResolutionCaptureInfo is the resolution used in CaptureInfo, which his currently nanosecond -var TimestampResolutionCaptureInfo = TimestampResolutionNanosecond - -// PacketSourceResolution is an interface for packet data sources that -// support reporting the timestamp resolution of the aqcuired timestamps. -// Returned timestamps will always have NanosecondTimestampResolution due -// to the use of time.Time, but scaling might have occured if acquired -// timestamps have a different resolution. -type PacketSourceResolution interface { - // Resolution returns the timestamp resolution of acquired timestamps before scaling to NanosecondTimestampResolution. - Resolution() TimestampResolution -} diff --git a/vendor/github.com/google/gopacket/writer.go b/vendor/github.com/google/gopacket/writer.go deleted file mode 100644 index 5d303dc4a78..00000000000 --- a/vendor/github.com/google/gopacket/writer.go +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package gopacket - -import ( - "fmt" -) - -// SerializableLayer allows its implementations to be written out as a set of bytes, -// so those bytes may be sent on the wire or otherwise used by the caller. -// SerializableLayer is implemented by certain Layer types, and can be encoded to -// bytes using the LayerWriter object. -type SerializableLayer interface { - // SerializeTo writes this layer to a slice, growing that slice if necessary - // to make it fit the layer's data. - // Args: - // b: SerializeBuffer to write this layer on to. When called, b.Bytes() - // is the payload this layer should wrap, if any. Note that this - // layer can either prepend itself (common), append itself - // (uncommon), or both (sometimes padding or footers are required at - // the end of packet data). It's also possible (though probably very - // rarely needed) to overwrite any bytes in the current payload. - // After this call, b.Bytes() should return the byte encoding of - // this layer wrapping the original b.Bytes() payload. - // opts: options to use while writing out data. - // Returns: - // error if a problem was encountered during encoding. If an error is - // returned, the bytes in data should be considered invalidated, and - // not used. - // - // SerializeTo calls SHOULD entirely ignore LayerContents and - // LayerPayload. It just serializes based on struct fields, neither - // modifying nor using contents/payload. - SerializeTo(b SerializeBuffer, opts SerializeOptions) error - // LayerType returns the type of the layer that is being serialized to the buffer - LayerType() LayerType -} - -// SerializeOptions provides options for behaviors that SerializableLayers may want to -// implement. -type SerializeOptions struct { - // FixLengths determines whether, during serialization, layers should fix - // the values for any length field that depends on the payload. - FixLengths bool - // ComputeChecksums determines whether, during serialization, layers - // should recompute checksums based on their payloads. - ComputeChecksums bool -} - -// SerializeBuffer is a helper used by gopacket for writing out packet layers. -// SerializeBuffer starts off as an empty []byte. Subsequent calls to PrependBytes -// return byte slices before the current Bytes(), AppendBytes returns byte -// slices after. -// -// Byte slices returned by PrependBytes/AppendBytes are NOT zero'd out, so if -// you want to make sure they're all zeros, set them as such. -// -// SerializeBuffer is specifically designed to handle packet writing, where unlike -// with normal writes it's easier to start writing at the inner-most layer and -// work out, meaning that we often need to prepend bytes. This runs counter to -// typical writes to byte slices using append(), where we only write at the end -// of the buffer. -// -// It can be reused via Clear. Note, however, that a Clear call will invalidate the -// byte slices returned by any previous Bytes() call (the same buffer is -// reused). -// -// 1) Reusing a write buffer is generally much faster than creating a new one, -// and with the default implementation it avoids additional memory allocations. -// 2) If a byte slice from a previous Bytes() call will continue to be used, -// it's better to create a new SerializeBuffer. -// -// The Clear method is specifically designed to minimize memory allocations for -// similar later workloads on the SerializeBuffer. IE: if you make a set of -// Prepend/Append calls, then clear, then make the same calls with the same -// sizes, the second round (and all future similar rounds) shouldn't allocate -// any new memory. -type SerializeBuffer interface { - // Bytes returns the contiguous set of bytes collected so far by Prepend/Append - // calls. The slice returned by Bytes will be modified by future Clear calls, - // so if you're planning on clearing this SerializeBuffer, you may want to copy - // Bytes somewhere safe first. - Bytes() []byte - // PrependBytes returns a set of bytes which prepends the current bytes in this - // buffer. These bytes start in an indeterminate state, so they should be - // overwritten by the caller. The caller must only call PrependBytes if they - // know they're going to immediately overwrite all bytes returned. - PrependBytes(num int) ([]byte, error) - // AppendBytes returns a set of bytes which appends the current bytes in this - // buffer. These bytes start in an indeterminate state, so they should be - // overwritten by the caller. The caller must only call AppendBytes if they - // know they're going to immediately overwrite all bytes returned. - AppendBytes(num int) ([]byte, error) - // Clear resets the SerializeBuffer to a new, empty buffer. After a call to clear, - // the byte slice returned by any previous call to Bytes() for this buffer - // should be considered invalidated. - Clear() error - // Layers returns all the Layers that have been successfully serialized into this buffer - // already. - Layers() []LayerType - // PushLayer adds the current Layer to the list of Layers that have been serialized - // into this buffer. - PushLayer(LayerType) -} - -type serializeBuffer struct { - data []byte - start int - prepended, appended int - layers []LayerType -} - -// NewSerializeBuffer creates a new instance of the default implementation of -// the SerializeBuffer interface. -func NewSerializeBuffer() SerializeBuffer { - return &serializeBuffer{} -} - -// NewSerializeBufferExpectedSize creates a new buffer for serialization, optimized for an -// expected number of bytes prepended/appended. This tends to decrease the -// number of memory allocations made by the buffer during writes. -func NewSerializeBufferExpectedSize(expectedPrependLength, expectedAppendLength int) SerializeBuffer { - return &serializeBuffer{ - data: make([]byte, expectedPrependLength, expectedPrependLength+expectedAppendLength), - start: expectedPrependLength, - prepended: expectedPrependLength, - appended: expectedAppendLength, - } -} - -func (w *serializeBuffer) Bytes() []byte { - return w.data[w.start:] -} - -func (w *serializeBuffer) PrependBytes(num int) ([]byte, error) { - if num < 0 { - panic("num < 0") - } - if w.start < num { - toPrepend := w.prepended - if toPrepend < num { - toPrepend = num - } - w.prepended += toPrepend - length := cap(w.data) + toPrepend - newData := make([]byte, length) - newStart := w.start + toPrepend - copy(newData[newStart:], w.data[w.start:]) - w.start = newStart - w.data = newData[:toPrepend+len(w.data)] - } - w.start -= num - return w.data[w.start : w.start+num], nil -} - -func (w *serializeBuffer) AppendBytes(num int) ([]byte, error) { - if num < 0 { - panic("num < 0") - } - initialLength := len(w.data) - if cap(w.data)-initialLength < num { - toAppend := w.appended - if toAppend < num { - toAppend = num - } - w.appended += toAppend - newData := make([]byte, cap(w.data)+toAppend) - copy(newData[w.start:], w.data[w.start:]) - w.data = newData[:initialLength] - } - // Grow the buffer. We know it'll be under capacity given above. - w.data = w.data[:initialLength+num] - return w.data[initialLength:], nil -} - -func (w *serializeBuffer) Clear() error { - w.start = w.prepended - w.data = w.data[:w.start] - w.layers = w.layers[:0] - return nil -} - -func (w *serializeBuffer) Layers() []LayerType { - return w.layers -} - -func (w *serializeBuffer) PushLayer(l LayerType) { - w.layers = append(w.layers, l) -} - -// SerializeLayers clears the given write buffer, then writes all layers into it so -// they correctly wrap each other. Note that by clearing the buffer, it -// invalidates all slices previously returned by w.Bytes() -// -// Example: -// buf := gopacket.NewSerializeBuffer() -// opts := gopacket.SerializeOptions{} -// gopacket.SerializeLayers(buf, opts, a, b, c) -// firstPayload := buf.Bytes() // contains byte representation of a(b(c)) -// gopacket.SerializeLayers(buf, opts, d, e, f) -// secondPayload := buf.Bytes() // contains byte representation of d(e(f)). firstPayload is now invalidated, since the SerializeLayers call Clears buf. -func SerializeLayers(w SerializeBuffer, opts SerializeOptions, layers ...SerializableLayer) error { - w.Clear() - for i := len(layers) - 1; i >= 0; i-- { - layer := layers[i] - err := layer.SerializeTo(w, opts) - if err != nil { - return err - } - w.PushLayer(layer.LayerType()) - } - return nil -} - -// SerializePacket is a convenience function that calls SerializeLayers -// on packet's Layers(). -// It returns an error if one of the packet layers is not a SerializableLayer. -func SerializePacket(buf SerializeBuffer, opts SerializeOptions, packet Packet) error { - sls := []SerializableLayer{} - for _, layer := range packet.Layers() { - sl, ok := layer.(SerializableLayer) - if !ok { - return fmt.Errorf("layer %s is not serializable", layer.LayerType().String()) - } - sls = append(sls, sl) - } - return SerializeLayers(buf, opts, sls...) -} diff --git a/vendor/github.com/hashicorp/consul/api/.copywrite.hcl b/vendor/github.com/hashicorp/consul/api/.copywrite.hcl deleted file mode 100644 index 7e4c0b58a8a..00000000000 --- a/vendor/github.com/hashicorp/consul/api/.copywrite.hcl +++ /dev/null @@ -1,8 +0,0 @@ -schema_version = 1 - -project { - license = "MPL-2.0" - copyright_year = 2024 - - header_ignore = [] -} diff --git a/vendor/github.com/hashicorp/consul/api/LICENSE b/vendor/github.com/hashicorp/consul/api/LICENSE deleted file mode 100644 index 7c5baa45e1c..00000000000 --- a/vendor/github.com/hashicorp/consul/api/LICENSE +++ /dev/null @@ -1,365 +0,0 @@ -Copyright (c) 2020 HashiCorp, Inc. - -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/consul/api/README.md b/vendor/github.com/hashicorp/consul/api/README.md deleted file mode 100644 index 96a867f279d..00000000000 --- a/vendor/github.com/hashicorp/consul/api/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Consul API Client - -This package provides the `api` package which provides programmatic access to the full Consul API. - -The full documentation is available on [Godoc](https://godoc.org/github.com/hashicorp/consul/api). - -## Usage - -Below is an example of using the Consul client. To run the example, you must first -[install Consul](https://developer.hashicorp.com/consul/downloads) and -[Go](https://go.dev/doc/install). - -To run the client API, create a new Go module. - -```shell -go mod init consul-demo -``` - -Copy the example code into a file called `main.go` in the directory where the module is defined. -As seen in the example, the Consul API is often imported with the alias `capi`. - -```go -package main - -import ( - "fmt" - - capi "github.com/hashicorp/consul/api" -) - -func main() { - // Get a new client - client, err := capi.NewClient(capi.DefaultConfig()) - if err != nil { - panic(err) - } - - // Get a handle to the KV API - kv := client.KV() - - // PUT a new KV pair - p := &capi.KVPair{Key: "REDIS_MAXCLIENTS", Value: []byte("1000")} - _, err = kv.Put(p, nil) - if err != nil { - panic(err) - } - - // Lookup the pair - pair, _, err := kv.Get("REDIS_MAXCLIENTS", nil) - if err != nil { - panic(err) - } - fmt.Printf("KV: %v %s\n", pair.Key, pair.Value) -} -``` - -Install the Consul API dependency with `go mod tidy`. - -In a separate terminal window, start a local Consul server. - -```shell -consul agent -dev -node machine -``` - -Run the example. - -```shell -go run . -``` - -You should get the following result printed to the terminal. - -```shell -KV: REDIS_MAXCLIENTS 1000 -``` - -After running the code, you can also view the values in the Consul UI on your local machine at http://localhost:8500/ui/dc1/kv diff --git a/vendor/github.com/hashicorp/consul/api/acl.go b/vendor/github.com/hashicorp/consul/api/acl.go deleted file mode 100644 index fcea0fdde08..00000000000 --- a/vendor/github.com/hashicorp/consul/api/acl.go +++ /dev/null @@ -1,1744 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "fmt" - "io" - "net/url" - "time" - - "github.com/mitchellh/mapstructure" -) - -const ( - // ACLClientType is the client type token - ACLClientType = "client" - - // ACLManagementType is the management type token - ACLManagementType = "management" - - // ACLTemplatedPolicy names - ACLTemplatedPolicyServiceName = "builtin/service" - ACLTemplatedPolicyNodeName = "builtin/node" - ACLTemplatedPolicyDNSName = "builtin/dns" - ACLTemplatedPolicyNomadServerName = "builtin/nomad-server" - ACLTemplatedPolicyWorkloadIdentityName = "builtin/workload-identity" - ACLTemplatedPolicyAPIGatewayName = "builtin/api-gateway" - ACLTemplatedPolicyNomadClientName = "builtin/nomad-client" -) - -type ACLLink struct { - ID string - Name string -} - -type ACLTokenPolicyLink = ACLLink -type ACLTokenRoleLink = ACLLink - -// ACLToken represents an ACL Token -type ACLToken struct { - CreateIndex uint64 - ModifyIndex uint64 - AccessorID string - SecretID string - Description string - Policies []*ACLTokenPolicyLink `json:",omitempty"` - Roles []*ACLTokenRoleLink `json:",omitempty"` - ServiceIdentities []*ACLServiceIdentity `json:",omitempty"` - NodeIdentities []*ACLNodeIdentity `json:",omitempty"` - TemplatedPolicies []*ACLTemplatedPolicy `json:",omitempty"` - Local bool - AuthMethod string `json:",omitempty"` - ExpirationTTL time.Duration `json:",omitempty"` - ExpirationTime *time.Time `json:",omitempty"` - CreateTime time.Time `json:",omitempty"` - Hash []byte `json:",omitempty"` - - // DEPRECATED (ACL-Legacy-Compat) - // Rules are an artifact of legacy tokens deprecated in Consul 1.4 - Rules string `json:"-"` - - // Namespace is the namespace the ACLToken is associated with. - // Namespaces are a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // Partition is the partition the ACLToken is associated with. - // Partitions are a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // AuthMethodNamespace is the namespace the token's AuthMethod is associated with. - // Namespacing is a Consul Enterprise feature. - AuthMethodNamespace string `json:",omitempty"` -} - -type ACLTokenExpanded struct { - ExpandedPolicies []ACLPolicy - ExpandedRoles []ACLRole - - NamespaceDefaultPolicyIDs []string - NamespaceDefaultRoleIDs []string - - AgentACLDefaultPolicy string - AgentACLDownPolicy string - ResolvedByAgent string - - ACLToken -} - -type ACLTokenListEntry struct { - CreateIndex uint64 - ModifyIndex uint64 - AccessorID string - SecretID string - Description string - Policies []*ACLTokenPolicyLink `json:",omitempty"` - Roles []*ACLTokenRoleLink `json:",omitempty"` - ServiceIdentities []*ACLServiceIdentity `json:",omitempty"` - NodeIdentities []*ACLNodeIdentity `json:",omitempty"` - TemplatedPolicies []*ACLTemplatedPolicy `json:",omitempty"` - Local bool - AuthMethod string `json:",omitempty"` - ExpirationTime *time.Time `json:",omitempty"` - CreateTime time.Time - Hash []byte - Legacy bool `json:"-"` // DEPRECATED - - // Namespace is the namespace the ACLTokenListEntry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // Partition is the partition the ACLTokenListEntry is associated with. - // Partitions are a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // AuthMethodNamespace is the namespace the token's AuthMethod is associated with. - // Namespacing is a Consul Enterprise feature. - AuthMethodNamespace string `json:",omitempty"` -} - -// ACLEntry is used to represent a legacy ACL token -// The legacy tokens are deprecated. -type ACLEntry struct { - CreateIndex uint64 - ModifyIndex uint64 - ID string - Name string - Type string - Rules string -} - -// ACLReplicationStatus is used to represent the status of ACL replication. -type ACLReplicationStatus struct { - Enabled bool - Running bool - SourceDatacenter string - ReplicationType string - ReplicatedIndex uint64 - ReplicatedRoleIndex uint64 - ReplicatedTokenIndex uint64 - LastSuccess time.Time - LastError time.Time - LastErrorMessage string -} - -// ACLServiceIdentity represents a high-level grant of all necessary privileges -// to assume the identity of the named Service in the Catalog and within -// Connect. -type ACLServiceIdentity struct { - ServiceName string - Datacenters []string `json:",omitempty"` -} - -// ACLNodeIdentity represents a high-level grant of all necessary privileges -// to assume the identity of the named Node in the Catalog and within Connect. -type ACLNodeIdentity struct { - NodeName string - Datacenter string -} - -// ACLTemplatedPolicy represents a template used to generate a `synthetic` policy -// given some input variables. -type ACLTemplatedPolicy struct { - TemplateName string - TemplateVariables *ACLTemplatedPolicyVariables `json:",omitempty"` - - // Datacenters are an artifact of Nodeidentity & ServiceIdentity. - // It is used to facilitate the future migration away from both - Datacenters []string `json:",omitempty"` -} - -type ACLTemplatedPolicyResponse struct { - TemplateName string - Schema string - Template string - Description string -} - -type ACLTemplatedPolicyVariables struct { - Name string -} - -// ACLPolicy represents an ACL Policy. -type ACLPolicy struct { - ID string - Name string - Description string - Rules string - Datacenters []string - Hash []byte - CreateIndex uint64 - ModifyIndex uint64 - - // Namespace is the namespace the ACLPolicy is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // Partition is the partition the ACLPolicy is associated with. - // Partitions are a Consul Enterprise feature. - Partition string `json:",omitempty"` -} - -type ACLPolicyListEntry struct { - ID string - Name string - Description string - Datacenters []string - Hash []byte - CreateIndex uint64 - ModifyIndex uint64 - - // Namespace is the namespace the ACLPolicyListEntry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // Partition is the partition the ACLPolicyListEntry is associated with. - // Partitions are a Consul Enterprise feature. - Partition string `json:",omitempty"` -} - -type ACLRolePolicyLink = ACLLink - -// ACLRole represents an ACL Role. -type ACLRole struct { - ID string - Name string - Description string - Policies []*ACLRolePolicyLink `json:",omitempty"` - ServiceIdentities []*ACLServiceIdentity `json:",omitempty"` - NodeIdentities []*ACLNodeIdentity `json:",omitempty"` - TemplatedPolicies []*ACLTemplatedPolicy `json:",omitempty"` - Hash []byte - CreateIndex uint64 - ModifyIndex uint64 - - // Namespace is the namespace the ACLRole is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // Partition is the partition the ACLRole is associated with. - // Partitions are a Consul Enterprise feature. - Partition string `json:",omitempty"` -} - -// BindingRuleBindType is the type of binding rule mechanism used. -type BindingRuleBindType string - -const ( - // BindingRuleBindTypeService binds to a service identity with the given name. - BindingRuleBindTypeService BindingRuleBindType = "service" - - // BindingRuleBindTypeRole binds to pre-existing roles with the given name. - BindingRuleBindTypeRole BindingRuleBindType = "role" - - // BindingRuleBindTypeNode binds to a node identity with given name. - BindingRuleBindTypeNode BindingRuleBindType = "node" - - // BindingRuleBindTypePolicy binds to a specific policy with given name. - BindingRuleBindTypePolicy BindingRuleBindType = "policy" - - // BindingRuleBindTypeTemplatedPolicy binds to a templated policy with given template name and variables. - BindingRuleBindTypeTemplatedPolicy BindingRuleBindType = "templated-policy" -) - -type ACLBindingRule struct { - ID string - Description string - AuthMethod string - Selector string - BindType BindingRuleBindType - BindName string - BindVars *ACLTemplatedPolicyVariables `json:",omitempty"` - - CreateIndex uint64 - ModifyIndex uint64 - - // Namespace is the namespace the ACLBindingRule is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // Partition is the partition the ACLBindingRule is associated with. - // Partitions are a Consul Enterprise feature. - Partition string `json:",omitempty"` -} - -type ACLAuthMethod struct { - Name string - Type string - DisplayName string `json:",omitempty"` - Description string `json:",omitempty"` - MaxTokenTTL time.Duration `json:",omitempty"` - - // TokenLocality defines the kind of token that this auth method produces. - // This can be either 'local' or 'global'. If empty 'local' is assumed. - TokenLocality string `json:",omitempty"` - - // Configuration is arbitrary configuration for the auth method. This - // should only contain primitive values and containers (such as lists and - // maps). - Config map[string]interface{} - - CreateIndex uint64 - ModifyIndex uint64 - - // NamespaceRules apply only on auth methods defined in the default namespace. - // Namespacing is a Consul Enterprise feature. - NamespaceRules []*ACLAuthMethodNamespaceRule `json:",omitempty"` - - // Namespace is the namespace the ACLAuthMethod is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // Partition is the partition the ACLAuthMethod is associated with. - // Partitions are a Consul Enterprise feature. - Partition string `json:",omitempty"` -} - -type ACLTokenFilterOptions struct { - AuthMethod string `json:",omitempty"` - Policy string `json:",omitempty"` - Role string `json:",omitempty"` - ServiceName string `json:",omitempty"` -} - -func (m *ACLAuthMethod) MarshalJSON() ([]byte, error) { - type Alias ACLAuthMethod - exported := &struct { - MaxTokenTTL string `json:",omitempty"` - *Alias - }{ - MaxTokenTTL: m.MaxTokenTTL.String(), - Alias: (*Alias)(m), - } - if m.MaxTokenTTL == 0 { - exported.MaxTokenTTL = "" - } - - return json.Marshal(exported) -} - -func (m *ACLAuthMethod) UnmarshalJSON(data []byte) error { - type Alias ACLAuthMethod - aux := &struct { - MaxTokenTTL string - *Alias - }{ - Alias: (*Alias)(m), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - var err error - if aux.MaxTokenTTL != "" { - if m.MaxTokenTTL, err = time.ParseDuration(aux.MaxTokenTTL); err != nil { - return err - } - } - - return nil -} - -type ACLAuthMethodNamespaceRule struct { - // Selector is an expression that matches against verified identity - // attributes returned from the auth method during login. - Selector string `json:",omitempty"` - - // BindNamespace is the target namespace of the binding. Can be lightly - // templated using HIL ${foo} syntax from available field names. - // - // If empty it's created in the same namespace as the auth method. - BindNamespace string `json:",omitempty"` -} - -type ACLAuthMethodListEntry struct { - Name string - Type string - DisplayName string `json:",omitempty"` - Description string `json:",omitempty"` - MaxTokenTTL time.Duration `json:",omitempty"` - - // TokenLocality defines the kind of token that this auth method produces. - // This can be either 'local' or 'global'. If empty 'local' is assumed. - TokenLocality string `json:",omitempty"` - CreateIndex uint64 - ModifyIndex uint64 - - // Namespace is the namespace the ACLAuthMethodListEntry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // Partition is the partition the ACLAuthMethodListEntry is associated with. - // Partitions are a Consul Enterprise feature. - Partition string `json:",omitempty"` -} - -// This is nearly identical to the ACLAuthMethod MarshalJSON -func (m *ACLAuthMethodListEntry) MarshalJSON() ([]byte, error) { - type Alias ACLAuthMethodListEntry - exported := &struct { - MaxTokenTTL string `json:",omitempty"` - *Alias - }{ - MaxTokenTTL: m.MaxTokenTTL.String(), - Alias: (*Alias)(m), - } - if m.MaxTokenTTL == 0 { - exported.MaxTokenTTL = "" - } - - return json.Marshal(exported) -} - -// This is nearly identical to the ACLAuthMethod UnmarshalJSON -func (m *ACLAuthMethodListEntry) UnmarshalJSON(data []byte) error { - type Alias ACLAuthMethodListEntry - aux := &struct { - MaxTokenTTL string - *Alias - }{ - Alias: (*Alias)(m), - } - - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - var err error - if aux.MaxTokenTTL != "" { - if m.MaxTokenTTL, err = time.ParseDuration(aux.MaxTokenTTL); err != nil { - return err - } - } - - return nil -} - -// ParseKubernetesAuthMethodConfig takes a raw config map and returns a parsed -// KubernetesAuthMethodConfig. -func ParseKubernetesAuthMethodConfig(raw map[string]interface{}) (*KubernetesAuthMethodConfig, error) { - var config KubernetesAuthMethodConfig - decodeConf := &mapstructure.DecoderConfig{ - Result: &config, - WeaklyTypedInput: true, - } - - decoder, err := mapstructure.NewDecoder(decodeConf) - if err != nil { - return nil, err - } - - if err := decoder.Decode(raw); err != nil { - return nil, fmt.Errorf("error decoding config: %s", err) - } - - return &config, nil -} - -// KubernetesAuthMethodConfig is the config for the built-in Consul auth method -// for Kubernetes. -type KubernetesAuthMethodConfig struct { - Host string `json:",omitempty"` - CACert string `json:",omitempty"` - ServiceAccountJWT string `json:",omitempty"` -} - -// RenderToConfig converts this into a map[string]interface{} suitable for use -// in the ACLAuthMethod.Config field. -func (c *KubernetesAuthMethodConfig) RenderToConfig() map[string]interface{} { - return map[string]interface{}{ - "Host": c.Host, - "CACert": c.CACert, - "ServiceAccountJWT": c.ServiceAccountJWT, - } -} - -// OIDCAuthMethodConfig is the config for the built-in Consul auth method for -// OIDC and JWT. -type OIDCAuthMethodConfig struct { - // common for type=oidc and type=jwt - JWTSupportedAlgs []string `json:",omitempty"` - BoundAudiences []string `json:",omitempty"` - ClaimMappings map[string]string `json:",omitempty"` - ListClaimMappings map[string]string `json:",omitempty"` - OIDCDiscoveryURL string `json:",omitempty"` - OIDCDiscoveryCACert string `json:",omitempty"` - // just for type=oidc - OIDCClientID string `json:",omitempty"` - OIDCClientSecret string `json:",omitempty"` - OIDCScopes []string `json:",omitempty"` - OIDCACRValues []string `json:",omitempty"` - AllowedRedirectURIs []string `json:",omitempty"` - VerboseOIDCLogging bool `json:",omitempty"` - // just for type=jwt - JWKSURL string `json:",omitempty"` - JWKSCACert string `json:",omitempty"` - JWTValidationPubKeys []string `json:",omitempty"` - BoundIssuer string `json:",omitempty"` - ExpirationLeeway time.Duration `json:",omitempty"` - NotBeforeLeeway time.Duration `json:",omitempty"` - ClockSkewLeeway time.Duration `json:",omitempty"` -} - -// RenderToConfig converts this into a map[string]interface{} suitable for use -// in the ACLAuthMethod.Config field. -func (c *OIDCAuthMethodConfig) RenderToConfig() map[string]interface{} { - return map[string]interface{}{ - // common for type=oidc and type=jwt - "JWTSupportedAlgs": c.JWTSupportedAlgs, - "BoundAudiences": c.BoundAudiences, - "ClaimMappings": c.ClaimMappings, - "ListClaimMappings": c.ListClaimMappings, - "OIDCDiscoveryURL": c.OIDCDiscoveryURL, - "OIDCDiscoveryCACert": c.OIDCDiscoveryCACert, - // just for type=oidc - "OIDCClientID": c.OIDCClientID, - "OIDCClientSecret": c.OIDCClientSecret, - "OIDCScopes": c.OIDCScopes, - "OIDCACRValues": c.OIDCACRValues, - "AllowedRedirectURIs": c.AllowedRedirectURIs, - "VerboseOIDCLogging": c.VerboseOIDCLogging, - // just for type=jwt - "JWKSURL": c.JWKSURL, - "JWKSCACert": c.JWKSCACert, - "JWTValidationPubKeys": c.JWTValidationPubKeys, - "BoundIssuer": c.BoundIssuer, - "ExpirationLeeway": c.ExpirationLeeway, - "NotBeforeLeeway": c.NotBeforeLeeway, - "ClockSkewLeeway": c.ClockSkewLeeway, - } -} - -type ACLLoginParams struct { - AuthMethod string - BearerToken string - Meta map[string]string `json:",omitempty"` -} - -type ACLOIDCAuthURLParams struct { - AuthMethod string - RedirectURI string - ClientNonce string - Meta map[string]string `json:",omitempty"` -} - -// ACL can be used to query the ACL endpoints -type ACL struct { - c *Client -} - -// ACL returns a handle to the ACL endpoints -func (c *Client) ACL() *ACL { - return &ACL{c} -} - -// BootstrapRequest is used for when operators provide an ACL Bootstrap Token -type BootstrapRequest struct { - BootstrapSecret string -} - -// Bootstrap is used to perform a one-time ACL bootstrap operation on a cluster -// to get the first management token. -func (a *ACL) Bootstrap() (*ACLToken, *WriteMeta, error) { - return a.BootstrapWithToken("") -} - -// BootstrapWithToken is used to get the initial bootstrap token or pass in the one that was provided in the API -func (a *ACL) BootstrapWithToken(btoken string) (*ACLToken, *WriteMeta, error) { - r := a.c.newRequest("PUT", "/v1/acl/bootstrap") - if btoken != "" { - r.obj = &BootstrapRequest{ - BootstrapSecret: btoken, - } - } - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLToken - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, wm, nil -} - -// Create is used to generate a new token with the given parameters -// -// Deprecated: Use TokenCreate instead. -func (a *ACL) Create(acl *ACLEntry, q *WriteOptions) (string, *WriteMeta, error) { - r := a.c.newRequest("PUT", "/v1/acl/create") - r.setWriteOptions(q) - r.obj = acl - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return "", nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return "", nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - var out struct{ ID string } - if err := decodeBody(resp, &out); err != nil { - return "", nil, err - } - return out.ID, wm, nil -} - -// Update is used to update the rules of an existing token -// -// Deprecated: Use TokenUpdate instead. -func (a *ACL) Update(acl *ACLEntry, q *WriteOptions) (*WriteMeta, error) { - r := a.c.newRequest("PUT", "/v1/acl/update") - r.setWriteOptions(q) - r.obj = acl - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - wm := &WriteMeta{RequestTime: rtt} - return wm, nil -} - -// Destroy is used to destroy a given ACL token ID -// -// Deprecated: Use TokenDelete instead. -func (a *ACL) Destroy(id string, q *WriteOptions) (*WriteMeta, error) { - r := a.c.newRequest("PUT", "/v1/acl/destroy/"+id) - r.setWriteOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - if err := requireOK(resp); err != nil { - return nil, err - } - closeResponseBody(resp) - - wm := &WriteMeta{RequestTime: rtt} - return wm, nil -} - -// Clone is used to return a new token cloned from an existing one -// -// Deprecated: Use TokenClone instead. -func (a *ACL) Clone(id string, q *WriteOptions) (string, *WriteMeta, error) { - r := a.c.newRequest("PUT", "/v1/acl/clone/"+id) - r.setWriteOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return "", nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return "", nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - var out struct{ ID string } - if err := decodeBody(resp, &out); err != nil { - return "", nil, err - } - return out.ID, wm, nil -} - -// Info is used to query for information about an ACL token -// -// Deprecated: Use TokenRead instead. -func (a *ACL) Info(id string, q *QueryOptions) (*ACLEntry, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/info/"+id) - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var entries []*ACLEntry - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - if len(entries) > 0 { - return entries[0], qm, nil - } - return nil, qm, nil -} - -// List is used to get all the ACL tokens -// -// Deprecated: Use TokenList instead. -func (a *ACL) List(q *QueryOptions) ([]*ACLEntry, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/list") - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var entries []*ACLEntry - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// Replication returns the status of the ACL replication process in the datacenter -func (a *ACL) Replication(q *QueryOptions) (*ACLReplicationStatus, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/replication") - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var entries *ACLReplicationStatus - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// TokenCreate creates a new ACL token. If either the AccessorID or SecretID fields -// of the ACLToken structure are empty they will be filled in by Consul. -func (a *ACL) TokenCreate(token *ACLToken, q *WriteOptions) (*ACLToken, *WriteMeta, error) { - r := a.c.newRequest("PUT", "/v1/acl/token") - r.setWriteOptions(q) - r.obj = token - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLToken - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// TokenUpdate updates a token in place without modifying its AccessorID or SecretID. A valid -// AccessorID must be set in the ACLToken structure passed to this function but the SecretID may -// be omitted and will be filled in by Consul with its existing value. -func (a *ACL) TokenUpdate(token *ACLToken, q *WriteOptions) (*ACLToken, *WriteMeta, error) { - if token.AccessorID == "" { - return nil, nil, fmt.Errorf("Must specify an AccessorID for Token Updating") - } - r := a.c.newRequest("PUT", "/v1/acl/token/"+token.AccessorID) - r.setWriteOptions(q) - r.obj = token - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLToken - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// TokenClone will create a new token with the same policies and locality as the original -// token but will have its own auto-generated AccessorID and SecretID as well having the -// description passed to this function. The accessorID parameter must be a valid Accessor ID -// of an existing token. -func (a *ACL) TokenClone(accessorID string, description string, q *WriteOptions) (*ACLToken, *WriteMeta, error) { - if accessorID == "" { - return nil, nil, fmt.Errorf("Must specify a token AccessorID for Token Cloning") - } - - r := a.c.newRequest("PUT", "/v1/acl/token/"+accessorID+"/clone") - r.setWriteOptions(q) - r.obj = struct{ Description string }{description} - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLToken - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// TokenDelete removes a single ACL token. The accessorID parameter must be a valid -// Accessor ID of an existing token. -func (a *ACL) TokenDelete(accessorID string, q *WriteOptions) (*WriteMeta, error) { - r := a.c.newRequest("DELETE", "/v1/acl/token/"+accessorID) - r.setWriteOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - if err := requireOK(resp); err != nil { - return nil, err - } - closeResponseBody(resp) - - wm := &WriteMeta{RequestTime: rtt} - return wm, nil -} - -// TokenRead retrieves the full token details. The accessorID parameter must be a valid -// Accessor ID of an existing token. -func (a *ACL) TokenRead(accessorID string, q *QueryOptions) (*ACLToken, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/token/"+accessorID) - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out ACLToken - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -// TokenReadExpanded retrieves the full token details, as well as the contents of any policies affecting the token. -// The accessorID parameter must be a valid Accessor ID of an existing token. -func (a *ACL) TokenReadExpanded(accessorID string, q *QueryOptions) (*ACLTokenExpanded, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/token/"+accessorID) - r.setQueryOptions(q) - r.params.Set("expanded", "true") - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out ACLTokenExpanded - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -// TokenReadSelf retrieves the full token details of the token currently -// assigned to the API Client. In this manner its possible to read a token -// by its Secret ID. -func (a *ACL) TokenReadSelf(q *QueryOptions) (*ACLToken, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/token/self") - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out ACLToken - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -// TokenList lists all tokens. The listing does not contain any SecretIDs as those -// may only be retrieved by a call to TokenRead. -func (a *ACL) TokenList(q *QueryOptions) ([]*ACLTokenListEntry, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/tokens") - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var entries []*ACLTokenListEntry - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// TokenListFiltered lists all tokens that match the given filter options. -// The listing does not contain any SecretIDs as those may only be retrieved by a call to TokenRead. -func (a *ACL) TokenListFiltered(t ACLTokenFilterOptions, q *QueryOptions) ([]*ACLTokenListEntry, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/tokens") - r.setQueryOptions(q) - - if t.AuthMethod != "" { - r.params.Set("authmethod", t.AuthMethod) - } - if t.Policy != "" { - r.params.Set("policy", t.Policy) - } - if t.Role != "" { - r.params.Set("role", t.Role) - } - if t.ServiceName != "" { - r.params.Set("servicename", t.ServiceName) - } - - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var entries []*ACLTokenListEntry - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// PolicyCreate will create a new policy. It is not allowed for the policy parameters -// ID field to be set as this will be generated by Consul while processing the request. -func (a *ACL) PolicyCreate(policy *ACLPolicy, q *WriteOptions) (*ACLPolicy, *WriteMeta, error) { - if policy.ID != "" { - return nil, nil, fmt.Errorf("Cannot specify an ID in Policy Creation") - } - r := a.c.newRequest("PUT", "/v1/acl/policy") - r.setWriteOptions(q) - r.obj = policy - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLPolicy - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// PolicyUpdate updates a policy. The ID field of the policy parameter must be set to an -// existing policy ID -func (a *ACL) PolicyUpdate(policy *ACLPolicy, q *WriteOptions) (*ACLPolicy, *WriteMeta, error) { - if policy.ID == "" { - return nil, nil, fmt.Errorf("Must specify an ID in Policy Update") - } - - r := a.c.newRequest("PUT", "/v1/acl/policy/"+policy.ID) - r.setWriteOptions(q) - r.obj = policy - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLPolicy - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// PolicyDelete deletes a policy given its ID. -func (a *ACL) PolicyDelete(policyID string, q *WriteOptions) (*WriteMeta, error) { - r := a.c.newRequest("DELETE", "/v1/acl/policy/"+policyID) - r.setWriteOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - return wm, nil -} - -// PolicyRead retrieves the policy details including the rule set. -func (a *ACL) PolicyRead(policyID string, q *QueryOptions) (*ACLPolicy, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/policy/"+policyID) - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out ACLPolicy - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -// PolicyReadByName retrieves the policy details including the rule set with name. -func (a *ACL) PolicyReadByName(policyName string, q *QueryOptions) (*ACLPolicy, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/policy/name/"+url.QueryEscape(policyName)) - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - found, resp, err := requireNotFoundOrOK(resp) - if err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if !found { - return nil, qm, nil - } - - var out ACLPolicy - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -// PolicyList retrieves a listing of all policies. The listing does not include the -// rules for any policy as those should be retrieved by subsequent calls to PolicyRead. -func (a *ACL) PolicyList(q *QueryOptions) ([]*ACLPolicyListEntry, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/policies") - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var entries []*ACLPolicyListEntry - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// RulesTranslate translates the legacy rule syntax into the current syntax. -// -// Deprecated: Support for the legacy syntax translation has been removed. -// This function always returns an error. -func (a *ACL) RulesTranslate(rules io.Reader) (string, error) { - return "", fmt.Errorf("Legacy ACL rules were deprecated in Consul 1.4") -} - -// RulesTranslateToken translates the rules associated with the legacy syntax -// into the current syntax and returns the results. -// -// Deprecated: Support for the legacy syntax translation has been removed. -// This function always returns an error. -func (a *ACL) RulesTranslateToken(tokenID string) (string, error) { - return "", fmt.Errorf("Legacy ACL tokens and rules were deprecated in Consul 1.4") -} - -// RoleCreate will create a new role. It is not allowed for the role parameters -// ID field to be set as this will be generated by Consul while processing the request. -func (a *ACL) RoleCreate(role *ACLRole, q *WriteOptions) (*ACLRole, *WriteMeta, error) { - if role.ID != "" { - return nil, nil, fmt.Errorf("Cannot specify an ID in Role Creation") - } - - r := a.c.newRequest("PUT", "/v1/acl/role") - r.setWriteOptions(q) - r.obj = role - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLRole - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// RoleUpdate updates a role. The ID field of the role parameter must be set to an -// existing role ID -func (a *ACL) RoleUpdate(role *ACLRole, q *WriteOptions) (*ACLRole, *WriteMeta, error) { - if role.ID == "" { - return nil, nil, fmt.Errorf("Must specify an ID in Role Update") - } - - r := a.c.newRequest("PUT", "/v1/acl/role/"+role.ID) - r.setWriteOptions(q) - r.obj = role - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLRole - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// RoleDelete deletes a role given its ID. -func (a *ACL) RoleDelete(roleID string, q *WriteOptions) (*WriteMeta, error) { - r := a.c.newRequest("DELETE", "/v1/acl/role/"+roleID) - r.setWriteOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - if err := requireOK(resp); err != nil { - return nil, err - } - closeResponseBody(resp) - - wm := &WriteMeta{RequestTime: rtt} - return wm, nil -} - -// RoleRead retrieves the role details (by ID). Returns nil if not found. -func (a *ACL) RoleRead(roleID string, q *QueryOptions) (*ACLRole, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/role/"+roleID) - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - found, resp, err := requireNotFoundOrOK(resp) - if err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if !found { - return nil, qm, nil - } - - var out ACLRole - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -// RoleReadByName retrieves the role details (by name). Returns nil if not found. -func (a *ACL) RoleReadByName(roleName string, q *QueryOptions) (*ACLRole, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/role/name/"+url.QueryEscape(roleName)) - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - found, resp, err := requireNotFoundOrOK(resp) - if err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if !found { - return nil, qm, nil - } - - var out ACLRole - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -// RoleList retrieves a listing of all roles. The listing does not include some -// metadata for the role as those should be retrieved by subsequent calls to -// RoleRead. -func (a *ACL) RoleList(q *QueryOptions) ([]*ACLRole, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/roles") - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var entries []*ACLRole - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// AuthMethodCreate will create a new auth method. -func (a *ACL) AuthMethodCreate(method *ACLAuthMethod, q *WriteOptions) (*ACLAuthMethod, *WriteMeta, error) { - if method.Name == "" { - return nil, nil, fmt.Errorf("Must specify a Name in Auth Method Creation") - } - - r := a.c.newRequest("PUT", "/v1/acl/auth-method") - r.setWriteOptions(q) - r.obj = method - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLAuthMethod - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// AuthMethodUpdate updates an auth method. -func (a *ACL) AuthMethodUpdate(method *ACLAuthMethod, q *WriteOptions) (*ACLAuthMethod, *WriteMeta, error) { - if method.Name == "" { - return nil, nil, fmt.Errorf("Must specify a Name in Auth Method Update") - } - - r := a.c.newRequest("PUT", "/v1/acl/auth-method/"+url.QueryEscape(method.Name)) - r.setWriteOptions(q) - r.obj = method - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLAuthMethod - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// AuthMethodDelete deletes an auth method given its Name. -func (a *ACL) AuthMethodDelete(methodName string, q *WriteOptions) (*WriteMeta, error) { - if methodName == "" { - return nil, fmt.Errorf("Must specify a Name in Auth Method Delete") - } - - r := a.c.newRequest("DELETE", "/v1/acl/auth-method/"+url.QueryEscape(methodName)) - r.setWriteOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - if err := requireOK(resp); err != nil { - return nil, err - } - closeResponseBody(resp) - - wm := &WriteMeta{RequestTime: rtt} - return wm, nil -} - -// AuthMethodRead retrieves the auth method. Returns nil if not found. -func (a *ACL) AuthMethodRead(methodName string, q *QueryOptions) (*ACLAuthMethod, *QueryMeta, error) { - if methodName == "" { - return nil, nil, fmt.Errorf("Must specify a Name in Auth Method Read") - } - - r := a.c.newRequest("GET", "/v1/acl/auth-method/"+url.QueryEscape(methodName)) - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - found, resp, err := requireNotFoundOrOK(resp) - if err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if !found { - return nil, qm, nil - } - - var out ACLAuthMethod - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -// AuthMethodList retrieves a listing of all auth methods. The listing does not -// include some metadata for the auth method as those should be retrieved by -// subsequent calls to AuthMethodRead. -func (a *ACL) AuthMethodList(q *QueryOptions) ([]*ACLAuthMethodListEntry, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/auth-methods") - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var entries []*ACLAuthMethodListEntry - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// BindingRuleCreate will create a new binding rule. It is not allowed for the -// binding rule parameter's ID field to be set as this will be generated by -// Consul while processing the request. -func (a *ACL) BindingRuleCreate(rule *ACLBindingRule, q *WriteOptions) (*ACLBindingRule, *WriteMeta, error) { - if rule.ID != "" { - return nil, nil, fmt.Errorf("Cannot specify an ID in Binding Rule Creation") - } - - r := a.c.newRequest("PUT", "/v1/acl/binding-rule") - r.setWriteOptions(q) - r.obj = rule - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLBindingRule - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// BindingRuleUpdate updates a binding rule. The ID field of the role binding -// rule parameter must be set to an existing binding rule ID. -func (a *ACL) BindingRuleUpdate(rule *ACLBindingRule, q *WriteOptions) (*ACLBindingRule, *WriteMeta, error) { - if rule.ID == "" { - return nil, nil, fmt.Errorf("Must specify an ID in Binding Rule Update") - } - - r := a.c.newRequest("PUT", "/v1/acl/binding-rule/"+rule.ID) - r.setWriteOptions(q) - r.obj = rule - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLBindingRule - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// BindingRuleDelete deletes a binding rule given its ID. -func (a *ACL) BindingRuleDelete(bindingRuleID string, q *WriteOptions) (*WriteMeta, error) { - r := a.c.newRequest("DELETE", "/v1/acl/binding-rule/"+bindingRuleID) - r.setWriteOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - return wm, nil -} - -// BindingRuleRead retrieves the binding rule details. Returns nil if not found. -func (a *ACL) BindingRuleRead(bindingRuleID string, q *QueryOptions) (*ACLBindingRule, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/binding-rule/"+bindingRuleID) - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - found, resp, err := requireNotFoundOrOK(resp) - if err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if !found { - return nil, qm, nil - } - - var out ACLBindingRule - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -// BindingRuleList retrieves a listing of all binding rules. -func (a *ACL) BindingRuleList(methodName string, q *QueryOptions) ([]*ACLBindingRule, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/binding-rules") - if methodName != "" { - r.params.Set("authmethod", methodName) - } - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var entries []*ACLBindingRule - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// Login is used to exchange auth method credentials for a newly-minted Consul Token. -func (a *ACL) Login(auth *ACLLoginParams, q *WriteOptions) (*ACLToken, *WriteMeta, error) { - r := a.c.newRequest("POST", "/v1/acl/login") - r.setWriteOptions(q) - r.obj = auth - - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLToken - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, wm, nil -} - -// Logout is used to destroy a Consul Token created via Login(). -func (a *ACL) Logout(q *WriteOptions) (*WriteMeta, error) { - r := a.c.newRequest("POST", "/v1/acl/logout") - r.setWriteOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - if err := requireOK(resp); err != nil { - return nil, err - } - closeResponseBody(resp) - - wm := &WriteMeta{RequestTime: rtt} - return wm, nil -} - -// OIDCAuthURL requests an authorization URL to start an OIDC login flow. -func (a *ACL) OIDCAuthURL(auth *ACLOIDCAuthURLParams, q *WriteOptions) (string, *WriteMeta, error) { - if auth.AuthMethod == "" { - return "", nil, fmt.Errorf("Must specify an auth method name") - } - - r := a.c.newRequest("POST", "/v1/acl/oidc/auth-url") - r.setWriteOptions(q) - r.obj = auth - - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return "", nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return "", nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - var out aclOIDCAuthURLResponse - if err := decodeBody(resp, &out); err != nil { - return "", nil, err - } - return out.AuthURL, wm, nil -} - -type aclOIDCAuthURLResponse struct { - AuthURL string -} - -type ACLOIDCCallbackParams struct { - AuthMethod string - State string - Code string - ClientNonce string -} - -// OIDCCallback is the callback endpoint to complete an OIDC login. -func (a *ACL) OIDCCallback(auth *ACLOIDCCallbackParams, q *WriteOptions) (*ACLToken, *WriteMeta, error) { - if auth.AuthMethod == "" { - return nil, nil, fmt.Errorf("Must specify an auth method name") - } - - r := a.c.newRequest("POST", "/v1/acl/oidc/callback") - r.setWriteOptions(q) - r.obj = auth - - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLToken - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, wm, nil -} - -// TemplatedPolicyReadByName retrieves the templated policy details (by name). Returns nil if not found. -func (a *ACL) TemplatedPolicyReadByName(templateName string, q *QueryOptions) (*ACLTemplatedPolicyResponse, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/templated-policy/name/"+templateName) - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - found, resp, err := requireNotFoundOrOK(resp) - if err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if !found { - return nil, qm, nil - } - - var out ACLTemplatedPolicyResponse - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -// TemplatedPolicyList retrieves a listing of all templated policies. -func (a *ACL) TemplatedPolicyList(q *QueryOptions) (map[string]ACLTemplatedPolicyResponse, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/acl/templated-policies") - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var entries map[string]ACLTemplatedPolicyResponse - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// TemplatedPolicyPreview is used to preview the policy rendered by the templated policy. -func (a *ACL) TemplatedPolicyPreview(tp *ACLTemplatedPolicy, q *WriteOptions) (*ACLPolicy, *WriteMeta, error) { - r := a.c.newRequest("POST", "/v1/acl/templated-policy/preview/"+tp.TemplateName) - r.setWriteOptions(q) - r.obj = tp.TemplateVariables - - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - wm := &WriteMeta{RequestTime: rtt} - var out ACLPolicy - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, wm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/agent.go b/vendor/github.com/hashicorp/consul/api/agent.go deleted file mode 100644 index 24e2c50d649..00000000000 --- a/vendor/github.com/hashicorp/consul/api/agent.go +++ /dev/null @@ -1,1446 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "bufio" - "context" - "errors" - "fmt" - "io" - "net/http" -) - -// ServiceKind is the kind of service being registered. -type ServiceKind string - -const ( - // ServiceKindTypical is a typical, classic Consul service. This is - // represented by the absence of a value. This was chosen for ease of - // backwards compatibility: existing services in the catalog would - // default to the typical service. - ServiceKindTypical ServiceKind = "" - - // ServiceKindConnectProxy is a proxy for the Connect feature. This - // service proxies another service within Consul and speaks the connect - // protocol. - ServiceKindConnectProxy ServiceKind = "connect-proxy" - - // ServiceKindMeshGateway is a Mesh Gateway for the Connect feature. This - // service will proxy connections based off the SNI header set by other - // connect proxies - ServiceKindMeshGateway ServiceKind = "mesh-gateway" - - // ServiceKindTerminatingGateway is a Terminating Gateway for the Connect - // feature. This service will proxy connections to services outside the mesh. - ServiceKindTerminatingGateway ServiceKind = "terminating-gateway" - - // ServiceKindIngressGateway is an Ingress Gateway for the Connect feature. - // This service will ingress connections based of configuration defined in - // the ingress-gateway config entry. - ServiceKindIngressGateway ServiceKind = "ingress-gateway" - - // ServiceKindAPIGateway is an API Gateway for the Connect feature. - // This service will ingress connections based of configuration defined in - // the api-gateway config entry. - ServiceKindAPIGateway ServiceKind = "api-gateway" -) - -// UpstreamDestType is the type of upstream discovery mechanism. -type UpstreamDestType string - -const ( - // UpstreamDestTypeService discovers instances via healthy service lookup. - UpstreamDestTypeService UpstreamDestType = "service" - - // UpstreamDestTypePreparedQuery discovers instances via prepared query - // execution. - UpstreamDestTypePreparedQuery UpstreamDestType = "prepared_query" -) - -// AgentCheck represents a check known to the agent -type AgentCheck struct { - Node string - CheckID string - Name string - Status string - Notes string - Output string - ServiceID string - ServiceName string - Type string - ExposedPort int - Definition HealthCheckDefinition - Namespace string `json:",omitempty"` - Partition string `json:",omitempty"` -} - -// AgentWeights represent optional weights for a service -type AgentWeights struct { - Passing int - Warning int -} - -// AgentService represents a service known to the agent -type AgentService struct { - Kind ServiceKind `json:",omitempty"` - ID string - Service string - Tags []string - Meta map[string]string - Port int - Address string - SocketPath string `json:",omitempty"` - TaggedAddresses map[string]ServiceAddress `json:",omitempty"` - Weights AgentWeights - EnableTagOverride bool - CreateIndex uint64 `json:",omitempty" bexpr:"-"` - ModifyIndex uint64 `json:",omitempty" bexpr:"-"` - ContentHash string `json:",omitempty" bexpr:"-"` - Proxy *AgentServiceConnectProxyConfig `json:",omitempty"` - Connect *AgentServiceConnect `json:",omitempty"` - PeerName string `json:",omitempty"` - // NOTE: If we ever set the ContentHash outside of singular service lookup then we may need - // to include the Namespace in the hash. When we do, then we are in for lots of fun with tests. - // For now though, ignoring it works well enough. - Namespace string `json:",omitempty" bexpr:"-" hash:"ignore"` - Partition string `json:",omitempty" bexpr:"-" hash:"ignore"` - // Datacenter is only ever returned and is ignored if presented. - Datacenter string `json:",omitempty" bexpr:"-" hash:"ignore"` - Locality *Locality `json:",omitempty" bexpr:"-" hash:"ignore"` -} - -// AgentServiceChecksInfo returns information about a Service and its checks -type AgentServiceChecksInfo struct { - AggregatedStatus string - Service *AgentService - Checks HealthChecks -} - -// AgentServiceConnect represents the Connect configuration of a service. -type AgentServiceConnect struct { - Native bool `json:",omitempty"` - SidecarService *AgentServiceRegistration `json:",omitempty" bexpr:"-"` -} - -// AgentServiceConnectProxyConfig is the proxy configuration in a connect-proxy -// ServiceDefinition or response. -type AgentServiceConnectProxyConfig struct { - EnvoyExtensions []EnvoyExtension `json:",omitempty"` - DestinationServiceName string `json:",omitempty"` - DestinationServiceID string `json:",omitempty"` - LocalServiceAddress string `json:",omitempty"` - LocalServicePort int `json:",omitempty"` - LocalServiceSocketPath string `json:",omitempty"` - Mode ProxyMode `json:",omitempty"` - TransparentProxy *TransparentProxyConfig `json:",omitempty"` - Config map[string]interface{} `json:",omitempty" bexpr:"-"` - Upstreams []Upstream `json:",omitempty"` - MeshGateway MeshGatewayConfig `json:",omitempty"` - Expose ExposeConfig `json:",omitempty"` - AccessLogs *AccessLogsConfig `json:",omitempty"` -} - -const ( - // MemberTagKeyACLMode is the key used to indicate what ACL mode the agent is - // operating in. The values of this key will be one of the MemberACLMode constants - // with the key not being present indicating ACLModeUnknown. - MemberTagKeyACLMode = "acls" - - // MemberTagRole is the key used to indicate that the member is a server or not. - MemberTagKeyRole = "role" - - // MemberTagValueRoleServer is the value of the MemberTagKeyRole used to indicate - // that the member represents a Consul server. - MemberTagValueRoleServer = "consul" - - // MemberTagValueRoleClient is the value of the MemberTagKeyRole used to indicate - // that the member represents a Consul client. - MemberTagValueRoleClient = "node" - - // MemberTagKeyDatacenter is the key used to indicate which datacenter this member is in. - MemberTagKeyDatacenter = "dc" - - // MemberTagKeySegment is the key name of the tag used to indicate which network - // segment this member is in. - // Network Segments are a Consul Enterprise feature. - MemberTagKeySegment = "segment" - - // MemberTagKeyPartition is the key name of the tag used to indicate which partition - // this member is in. - // Partitions are a Consul Enterprise feature. - MemberTagKeyPartition = "ap" - - // MemberTagKeyBootstrap is the key name of the tag used to indicate whether this - // agent was started with the "bootstrap" configuration enabled - MemberTagKeyBootstrap = "bootstrap" - // MemberTagValueBootstrap is the value of the MemberTagKeyBootstrap key when the - // agent was started with the "bootstrap" configuration enabled. - MemberTagValueBootstrap = "1" - - // MemberTagKeyBootstrapExpect is the key name of the tag used to indicate whether - // this agent was started with the "bootstrap_expect" configuration set to a non-zero - // value. The value of this key will be the string for of that configuration value. - MemberTagKeyBootstrapExpect = "expect" - - // MemberTagKeyUseTLS is the key name of the tag used to indicate whther this agent - // was configured to use TLS. - MemberTagKeyUseTLS = "use_tls" - // MemberTagValueUseTLS is the value of the MemberTagKeyUseTLS when the agent was - // configured to use TLS. Any other value indicates that it was not setup in - // that manner. - MemberTagValueUseTLS = "1" - - // MemberTagKeyReadReplica is the key used to indicate that the member is a read - // replica server (will remain a Raft non-voter). - // Read Replicas are a Consul Enterprise feature. - MemberTagKeyReadReplica = "read_replica" - // MemberTagValueReadReplica is the value of the MemberTagKeyReadReplica key when - // the member is in fact a read-replica. Any other value indicates that it is not. - // Read Replicas are a Consul Enterprise feature. - MemberTagValueReadReplica = "1" -) - -type MemberACLMode string - -const ( - // ACLModeDisables indicates that ACLs are disabled for this agent - ACLModeDisabled MemberACLMode = "0" - // ACLModeEnabled indicates that ACLs are enabled and operating in new ACL - // mode (v1.4.0+ ACLs) - ACLModeEnabled MemberACLMode = "1" - // ACLModeLegacy has been deprecated, and will be treated as ACLModeUnknown. - ACLModeLegacy MemberACLMode = "2" // DEPRECATED - // ACLModeUnkown is used to indicate that the AgentMember.Tags didn't advertise - // an ACL mode at all. This is the case for Consul versions before v1.4.0 and - // should be treated the same as ACLModeLegacy. - ACLModeUnknown MemberACLMode = "3" -) - -// AgentMember represents a cluster member known to the agent -type AgentMember struct { - Name string - Addr string - Port uint16 - Tags map[string]string - // Status of the Member which corresponds to github.com/hashicorp/serf/serf.MemberStatus - // Value is one of: - // - // AgentMemberNone = 0 - // AgentMemberAlive = 1 - // AgentMemberLeaving = 2 - // AgentMemberLeft = 3 - // AgentMemberFailed = 4 - Status int - ProtocolMin uint8 - ProtocolMax uint8 - ProtocolCur uint8 - DelegateMin uint8 - DelegateMax uint8 - DelegateCur uint8 -} - -// ACLMode returns the ACL mode this agent is operating in. -func (m *AgentMember) ACLMode() MemberACLMode { - mode := m.Tags[MemberTagKeyACLMode] - - // the key may not have existed but then an - // empty string will be returned and we will - // handle that in the default case of the switch - switch MemberACLMode(mode) { - case ACLModeDisabled: - return ACLModeDisabled - case ACLModeEnabled: - return ACLModeEnabled - default: - return ACLModeUnknown - } -} - -// IsConsulServer returns true when this member is a Consul server. -func (m *AgentMember) IsConsulServer() bool { - return m.Tags[MemberTagKeyRole] == MemberTagValueRoleServer -} - -// AllSegments is used to select for all segments in MembersOpts. -const AllSegments = "_all" - -// MembersOpts is used for querying member information. -type MembersOpts struct { - // WAN is whether to show members from the WAN. - WAN bool - - // Segment is the LAN segment to show members for. Setting this to the - // AllSegments value above will show members in all segments. - Segment string - - Filter string -} - -// AgentServiceRegistration is used to register a new service -type AgentServiceRegistration struct { - Kind ServiceKind `json:",omitempty"` - ID string `json:",omitempty"` - Name string `json:",omitempty"` - Tags []string `json:",omitempty"` - Port int `json:",omitempty"` - Address string `json:",omitempty"` - SocketPath string `json:",omitempty"` - TaggedAddresses map[string]ServiceAddress `json:",omitempty"` - EnableTagOverride bool `json:",omitempty"` - Meta map[string]string `json:",omitempty"` - Weights *AgentWeights `json:",omitempty"` - Check *AgentServiceCheck - Checks AgentServiceChecks - Proxy *AgentServiceConnectProxyConfig `json:",omitempty"` - Connect *AgentServiceConnect `json:",omitempty"` - Namespace string `json:",omitempty" bexpr:"-" hash:"ignore"` - Partition string `json:",omitempty" bexpr:"-" hash:"ignore"` - Locality *Locality `json:",omitempty" bexpr:"-" hash:"ignore"` -} - -// ServiceRegisterOpts is used to pass extra options to the service register. -type ServiceRegisterOpts struct { - // Missing healthchecks will be deleted from the agent. - // Using this parameter allows to idempotently register a service and its checks without - // having to manually deregister checks. - ReplaceExistingChecks bool - - // Token is used to provide a per-request ACL token - // which overrides the agent's default token. - Token string - - // ctx is an optional context pass through to the underlying HTTP - // request layer. Use WithContext() to set the context. - ctx context.Context -} - -// WithContext sets the context to be used for the request on a new ServiceRegisterOpts, -// and returns the opts. -func (o ServiceRegisterOpts) WithContext(ctx context.Context) ServiceRegisterOpts { - o.ctx = ctx - return o -} - -// AgentCheckRegistration is used to register a new check -type AgentCheckRegistration struct { - ID string `json:",omitempty"` - Name string `json:",omitempty"` - Notes string `json:",omitempty"` - ServiceID string `json:",omitempty"` - AgentServiceCheck - Namespace string `json:",omitempty"` - Partition string `json:",omitempty"` -} - -// AgentServiceCheck is used to define a node or service level check -type AgentServiceCheck struct { - CheckID string `json:",omitempty"` - Name string `json:",omitempty"` - Args []string `json:"ScriptArgs,omitempty"` - DockerContainerID string `json:",omitempty"` - Shell string `json:",omitempty"` // Only supported for Docker. - Interval string `json:",omitempty"` - Timeout string `json:",omitempty"` - TTL string `json:",omitempty"` - HTTP string `json:",omitempty"` - Header map[string][]string `json:",omitempty"` - Method string `json:",omitempty"` - Body string `json:",omitempty"` - TCP string `json:",omitempty"` - TCPUseTLS bool `json:",omitempty"` - UDP string `json:",omitempty"` - Status string `json:",omitempty"` - Notes string `json:",omitempty"` - TLSServerName string `json:",omitempty"` - TLSSkipVerify bool `json:",omitempty"` - GRPC string `json:",omitempty"` - GRPCUseTLS bool `json:",omitempty"` - H2PING string `json:",omitempty"` - H2PingUseTLS bool `json:",omitempty"` - AliasNode string `json:",omitempty"` - AliasService string `json:",omitempty"` - SuccessBeforePassing int `json:",omitempty"` - FailuresBeforeWarning int `json:",omitempty"` - FailuresBeforeCritical int `json:",omitempty"` - - // In Consul 0.7 and later, checks that are associated with a service - // may also contain this optional DeregisterCriticalServiceAfter field, - // which is a timeout in the same Go time format as Interval and TTL. If - // a check is in the critical state for more than this configured value, - // then its associated service (and all of its associated checks) will - // automatically be deregistered. - DeregisterCriticalServiceAfter string `json:",omitempty"` -} -type AgentServiceChecks []*AgentServiceCheck - -// AgentToken is used when updating ACL tokens for an agent. -type AgentToken struct { - Token string -} - -// Metrics info is used to store different types of metric values from the agent. -type MetricsInfo struct { - Timestamp string - Gauges []GaugeValue - Points []PointValue - Counters []SampledValue - Samples []SampledValue -} - -// GaugeValue stores one value that is updated as time goes on, such as -// the amount of memory allocated. -type GaugeValue struct { - Name string - Value float32 - Labels map[string]string -} - -// PointValue holds a series of points for a metric. -type PointValue struct { - Name string - Points []float32 -} - -// SampledValue stores info about a metric that is incremented over time, -// such as the number of requests to an HTTP endpoint. -type SampledValue struct { - Name string - Count int - Sum float64 - Min float64 - Max float64 - Mean float64 - Stddev float64 - Labels map[string]string -} - -// AgentAuthorizeParams are the request parameters for authorizing a request. -type AgentAuthorizeParams struct { - Target string - ClientCertURI string - ClientCertSerial string -} - -// AgentAuthorize is the response structure for Connect authorization. -type AgentAuthorize struct { - Authorized bool - Reason string -} - -// ConnectProxyConfig is the response structure for agent-local proxy -// configuration. -type ConnectProxyConfig struct { - ProxyServiceID string - TargetServiceID string - TargetServiceName string - ContentHash string - Config map[string]interface{} `bexpr:"-"` - Upstreams []Upstream -} - -// Upstream is the response structure for a proxy upstream configuration. -type Upstream struct { - DestinationType UpstreamDestType `json:",omitempty"` - DestinationPartition string `json:",omitempty"` - DestinationNamespace string `json:",omitempty"` - DestinationPeer string `json:",omitempty"` - DestinationName string - Datacenter string `json:",omitempty"` - LocalBindAddress string `json:",omitempty"` - LocalBindPort int `json:",omitempty"` - LocalBindSocketPath string `json:",omitempty"` - LocalBindSocketMode string `json:",omitempty"` - Config map[string]interface{} `json:",omitempty" bexpr:"-"` - MeshGateway MeshGatewayConfig `json:",omitempty"` - CentrallyConfigured bool `json:",omitempty" bexpr:"-"` -} - -// Agent can be used to query the Agent endpoints -type Agent struct { - c *Client - - // cache the node name - nodeName string -} - -// Agent returns a handle to the agent endpoints -func (c *Client) Agent() *Agent { - return &Agent{c: c} -} - -// Self is used to query the agent we are speaking to for -// information about itself -func (a *Agent) Self() (map[string]map[string]interface{}, error) { - r := a.c.newRequest("GET", "/v1/agent/self") - _, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - var out map[string]map[string]interface{} - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return out, nil -} - -// Host is used to retrieve information about the host the -// agent is running on such as CPU, memory, and disk. Requires -// a operator:read ACL token. -func (a *Agent) Host() (map[string]interface{}, error) { - r := a.c.newRequest("GET", "/v1/agent/host") - _, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - var out map[string]interface{} - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return out, nil -} - -// Version is used to retrieve information about the running Consul version and build. -func (a *Agent) Version() (map[string]interface{}, error) { - r := a.c.newRequest("GET", "/v1/agent/version") - _, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - var out map[string]interface{} - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return out, nil -} - -// Metrics is used to query the agent we are speaking to for -// its current internal metric data -func (a *Agent) Metrics() (*MetricsInfo, error) { - r := a.c.newRequest("GET", "/v1/agent/metrics") - _, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - var out *MetricsInfo - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return out, nil -} - -// MetricsStream returns an io.ReadCloser which will emit a stream of metrics -// until the context is cancelled. The metrics are json encoded. -// The caller is responsible for closing the returned io.ReadCloser. -func (a *Agent) MetricsStream(ctx context.Context) (io.ReadCloser, error) { - r := a.c.newRequest("GET", "/v1/agent/metrics/stream") - r.ctx = ctx - _, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - if err := requireOK(resp); err != nil { - return nil, err - } - return resp.Body, nil -} - -// Reload triggers a configuration reload for the agent we are connected to. -func (a *Agent) Reload() error { - r := a.c.newRequest("PUT", "/v1/agent/reload") - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// NodeName is used to get the node name of the agent -func (a *Agent) NodeName() (string, error) { - if a.nodeName != "" { - return a.nodeName, nil - } - info, err := a.Self() - if err != nil { - return "", err - } - name := info["Config"]["NodeName"].(string) - a.nodeName = name - return name, nil -} - -// Checks returns the locally registered checks -func (a *Agent) Checks() (map[string]*AgentCheck, error) { - return a.ChecksWithFilter("") -} - -// ChecksWithFilter returns a subset of the locally registered checks that match -// the given filter expression -func (a *Agent) ChecksWithFilter(filter string) (map[string]*AgentCheck, error) { - return a.ChecksWithFilterOpts(filter, nil) -} - -// ChecksWithFilterOpts returns a subset of the locally registered checks that match -// the given filter expression and QueryOptions. -func (a *Agent) ChecksWithFilterOpts(filter string, q *QueryOptions) (map[string]*AgentCheck, error) { - r := a.c.newRequest("GET", "/v1/agent/checks") - r.setQueryOptions(q) - r.filterQuery(filter) - _, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - var out map[string]*AgentCheck - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return out, nil -} - -// Services returns the locally registered services -func (a *Agent) Services() (map[string]*AgentService, error) { - return a.ServicesWithFilter("") -} - -// ServicesWithFilter returns a subset of the locally registered services that match -// the given filter expression -func (a *Agent) ServicesWithFilter(filter string) (map[string]*AgentService, error) { - return a.ServicesWithFilterOpts(filter, nil) -} - -// ServicesWithFilterOpts returns a subset of the locally registered services that match -// the given filter expression and QueryOptions. -func (a *Agent) ServicesWithFilterOpts(filter string, q *QueryOptions) (map[string]*AgentService, error) { - r := a.c.newRequest("GET", "/v1/agent/services") - r.setQueryOptions(q) - r.filterQuery(filter) - _, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - var out map[string]*AgentService - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - - return out, nil -} - -// AgentHealthServiceByID returns for a given serviceID: the aggregated health status, the service definition or an error if any -// - If the service is not found, will return status (critical, nil, nil) -// - If the service is found, will return (critical|passing|warning), AgentServiceChecksInfo, nil) -// - In all other cases, will return an error -func (a *Agent) AgentHealthServiceByID(serviceID string) (string, *AgentServiceChecksInfo, error) { - return a.AgentHealthServiceByIDOpts(serviceID, nil) -} - -func (a *Agent) AgentHealthServiceByIDOpts(serviceID string, q *QueryOptions) (string, *AgentServiceChecksInfo, error) { - path := fmt.Sprintf("/v1/agent/health/service/id/%v", serviceID) - r := a.c.newRequest("GET", path) - r.setQueryOptions(q) - r.params.Add("format", "json") - r.header.Set("Accept", "application/json") - // not a lot of value in wrapping the doRequest call in a requireHttpCodes call - // we manipulate the resp body and the require calls "swallow" the content on err - _, resp, err := a.c.doRequest(r) - if err != nil { - return "", nil, err - } - defer closeResponseBody(resp) - // Service not Found - if resp.StatusCode == http.StatusNotFound { - return HealthCritical, nil, nil - } - var out *AgentServiceChecksInfo - if err := decodeBody(resp, &out); err != nil { - return HealthCritical, out, err - } - switch resp.StatusCode { - case http.StatusOK: - return HealthPassing, out, nil - case http.StatusTooManyRequests: - return HealthWarning, out, nil - case http.StatusServiceUnavailable: - return HealthCritical, out, nil - } - return HealthCritical, out, fmt.Errorf("Unexpected Error Code %v for %s", resp.StatusCode, path) -} - -// AgentHealthServiceByName returns for a given service name: the aggregated health status for all services -// having the specified name. -// - If no service is not found, will return status (critical, [], nil) -// - If the service is found, will return (critical|passing|warning), []api.AgentServiceChecksInfo, nil) -// - In all other cases, will return an error -func (a *Agent) AgentHealthServiceByName(service string) (string, []AgentServiceChecksInfo, error) { - return a.AgentHealthServiceByNameOpts(service, nil) -} - -func (a *Agent) AgentHealthServiceByNameOpts(service string, q *QueryOptions) (string, []AgentServiceChecksInfo, error) { - path := fmt.Sprintf("/v1/agent/health/service/name/%v", service) - r := a.c.newRequest("GET", path) - r.setQueryOptions(q) - r.params.Add("format", "json") - r.header.Set("Accept", "application/json") - // not a lot of value in wrapping the doRequest call in a requireHttpCodes call - // we manipulate the resp body and the require calls "swallow" the content on err - _, resp, err := a.c.doRequest(r) - if err != nil { - return "", nil, err - } - defer closeResponseBody(resp) - // Service not Found - if resp.StatusCode == http.StatusNotFound { - return HealthCritical, nil, nil - } - var out []AgentServiceChecksInfo - if err := decodeBody(resp, &out); err != nil { - return HealthCritical, out, err - } - switch resp.StatusCode { - case http.StatusOK: - return HealthPassing, out, nil - case http.StatusTooManyRequests: - return HealthWarning, out, nil - case http.StatusServiceUnavailable: - return HealthCritical, out, nil - } - return HealthCritical, out, fmt.Errorf("Unexpected Error Code %v for %s", resp.StatusCode, path) -} - -// Service returns a locally registered service instance and allows for -// hash-based blocking. -// -// Note that this uses an unconventional blocking mechanism since it's -// agent-local state. That means there is no persistent raft index so we block -// based on object hash instead. -func (a *Agent) Service(serviceID string, q *QueryOptions) (*AgentService, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/agent/service/"+serviceID) - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out *AgentService - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return out, qm, nil -} - -// Members returns the known gossip members. The WAN -// flag can be used to query a server for WAN members. -func (a *Agent) Members(wan bool) ([]*AgentMember, error) { - r := a.c.newRequest("GET", "/v1/agent/members") - if wan { - r.params.Set("wan", "1") - } - _, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - var out []*AgentMember - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return out, nil -} - -// MembersOpts returns the known gossip members and can be passed -// additional options for WAN/segment filtering. -func (a *Agent) MembersOpts(opts MembersOpts) ([]*AgentMember, error) { - r := a.c.newRequest("GET", "/v1/agent/members") - r.params.Set("segment", opts.Segment) - if opts.WAN { - r.params.Set("wan", "1") - } - - if opts.Filter != "" { - r.params.Set("filter", opts.Filter) - } - - _, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - var out []*AgentMember - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return out, nil -} - -// ServiceRegister is used to register a new service with -// the local agent -func (a *Agent) ServiceRegister(service *AgentServiceRegistration) error { - opts := ServiceRegisterOpts{ - ReplaceExistingChecks: false, - } - - return a.serviceRegister(service, opts) -} - -// ServiceRegister is used to register a new service with -// the local agent and can be passed additional options. -func (a *Agent) ServiceRegisterOpts(service *AgentServiceRegistration, opts ServiceRegisterOpts) error { - return a.serviceRegister(service, opts) -} - -func (a *Agent) serviceRegister(service *AgentServiceRegistration, opts ServiceRegisterOpts) error { - r := a.c.newRequest("PUT", "/v1/agent/service/register") - r.obj = service - r.ctx = opts.ctx - if opts.ReplaceExistingChecks { - r.params.Set("replace-existing-checks", "true") - } - if opts.Token != "" { - r.header.Set("X-Consul-Token", opts.Token) - } - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// ServiceDeregister is used to deregister a service with -// the local agent -func (a *Agent) ServiceDeregister(serviceID string) error { - r := a.c.newRequest("PUT", "/v1/agent/service/deregister/"+serviceID) - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// ServiceDeregisterOpts is used to deregister a service with -// the local agent with QueryOptions. -func (a *Agent) ServiceDeregisterOpts(serviceID string, q *QueryOptions) error { - r := a.c.newRequest("PUT", "/v1/agent/service/deregister/"+serviceID) - r.setQueryOptions(q) - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// PassTTL is used to set a TTL check to the passing state. -// -// DEPRECATION NOTICE: This interface is deprecated in favor of UpdateTTL(). -// The client interface will be removed in 0.8 or changed to use -// UpdateTTL()'s endpoint and the server endpoints will be removed in 0.9. -func (a *Agent) PassTTL(checkID, note string) error { - return a.updateTTL(checkID, note, "pass") -} - -// WarnTTL is used to set a TTL check to the warning state. -// -// DEPRECATION NOTICE: This interface is deprecated in favor of UpdateTTL(). -// The client interface will be removed in 0.8 or changed to use -// UpdateTTL()'s endpoint and the server endpoints will be removed in 0.9. -func (a *Agent) WarnTTL(checkID, note string) error { - return a.updateTTL(checkID, note, "warn") -} - -// FailTTL is used to set a TTL check to the failing state. -// -// DEPRECATION NOTICE: This interface is deprecated in favor of UpdateTTL(). -// The client interface will be removed in 0.8 or changed to use -// UpdateTTL()'s endpoint and the server endpoints will be removed in 0.9. -func (a *Agent) FailTTL(checkID, note string) error { - return a.updateTTL(checkID, note, "fail") -} - -// updateTTL is used to update the TTL of a check. This is the internal -// method that uses the old API that's present in Consul versions prior to -// 0.6.4. Since Consul didn't have an analogous "update" API before it seemed -// ok to break this (former) UpdateTTL in favor of the new UpdateTTL below, -// but keep the old Pass/Warn/Fail methods using the old API under the hood. -// -// DEPRECATION NOTICE: This interface is deprecated in favor of UpdateTTL(). -// The client interface will be removed in 0.8 and the server endpoints will -// be removed in 0.9. -func (a *Agent) updateTTL(checkID, note, status string) error { - switch status { - case "pass": - case "warn": - case "fail": - default: - return fmt.Errorf("Invalid status: %s", status) - } - endpoint := fmt.Sprintf("/v1/agent/check/%s/%s", status, checkID) - r := a.c.newRequest("PUT", endpoint) - r.params.Set("note", note) - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// checkUpdate is the payload for a PUT for a check update. -type checkUpdate struct { - // Status is one of the api.Health* states: HealthPassing - // ("passing"), HealthWarning ("warning"), or HealthCritical - // ("critical"). - Status string - - // Output is the information to post to the UI for operators as the - // output of the process that decided to hit the TTL check. This is - // different from the note field that's associated with the check - // itself. - Output string -} - -// UpdateTTL is used to update the TTL of a check. This uses the newer API -// that was introduced in Consul 0.6.4 and later. We translate the old status -// strings for compatibility (though a newer version of Consul will still be -// required to use this API). -func (a *Agent) UpdateTTL(checkID, output, status string) error { - return a.UpdateTTLOpts(checkID, output, status, nil) -} - -func (a *Agent) UpdateTTLOpts(checkID, output, status string, q *QueryOptions) error { - switch status { - case "pass", HealthPassing: - status = HealthPassing - case "warn", HealthWarning: - status = HealthWarning - case "fail", HealthCritical: - status = HealthCritical - default: - return fmt.Errorf("Invalid status: %s", status) - } - - endpoint := fmt.Sprintf("/v1/agent/check/update/%s", checkID) - r := a.c.newRequest("PUT", endpoint) - r.setQueryOptions(q) - r.obj = &checkUpdate{ - Status: status, - Output: output, - } - - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// CheckRegister is used to register a new check with -// the local agent -func (a *Agent) CheckRegister(check *AgentCheckRegistration) error { - return a.CheckRegisterOpts(check, nil) -} - -// CheckRegisterOpts is used to register a new check with -// the local agent using query options -func (a *Agent) CheckRegisterOpts(check *AgentCheckRegistration, q *QueryOptions) error { - r := a.c.newRequest("PUT", "/v1/agent/check/register") - r.setQueryOptions(q) - r.obj = check - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// CheckDeregister is used to deregister a check with -// the local agent -func (a *Agent) CheckDeregister(checkID string) error { - return a.CheckDeregisterOpts(checkID, nil) -} - -// CheckDeregisterOpts is used to deregister a check with -// the local agent using query options -func (a *Agent) CheckDeregisterOpts(checkID string, q *QueryOptions) error { - r := a.c.newRequest("PUT", "/v1/agent/check/deregister/"+checkID) - r.setQueryOptions(q) - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// Join is used to instruct the agent to attempt a join to -// another cluster member -func (a *Agent) Join(addr string, wan bool) error { - r := a.c.newRequest("PUT", "/v1/agent/join/"+addr) - if wan { - r.params.Set("wan", "1") - } - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// Leave is used to have the agent gracefully leave the cluster and shutdown -func (a *Agent) Leave() error { - r := a.c.newRequest("PUT", "/v1/agent/leave") - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -type ForceLeaveOpts struct { - // Prune indicates if we should remove a failed agent from the list of - // members in addition to ejecting it. - Prune bool - - // WAN indicates that the request should exclusively target the WAN pool. - WAN bool -} - -// ForceLeave is used to have the agent eject a failed node -func (a *Agent) ForceLeave(node string) error { - return a.ForceLeaveOpts(node, ForceLeaveOpts{}) -} - -// ForceLeavePrune is used to have an a failed agent removed -// from the list of members -func (a *Agent) ForceLeavePrune(node string) error { - return a.ForceLeaveOpts(node, ForceLeaveOpts{Prune: true}) -} - -// ForceLeaveOpts is used to have the agent eject a failed node or remove it -// completely from the list of members. -// -// DEPRECATED - Use ForceLeaveOptions instead. -func (a *Agent) ForceLeaveOpts(node string, opts ForceLeaveOpts) error { - return a.ForceLeaveOptions(node, opts, nil) -} - -// ForceLeaveOptions is used to have the agent eject a failed node or remove it -// completely from the list of members. Allows usage of QueryOptions on-top of ForceLeaveOpts -func (a *Agent) ForceLeaveOptions(node string, opts ForceLeaveOpts, q *QueryOptions) error { - r := a.c.newRequest("PUT", "/v1/agent/force-leave/"+node) - r.setQueryOptions(q) - if opts.Prune { - r.params.Set("prune", "1") - } - if opts.WAN { - r.params.Set("wan", "1") - } - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// ConnectAuthorize is used to authorize an incoming connection -// to a natively integrated Connect service. -func (a *Agent) ConnectAuthorize(auth *AgentAuthorizeParams) (*AgentAuthorize, error) { - r := a.c.newRequest("POST", "/v1/agent/connect/authorize") - r.obj = auth - _, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - var out AgentAuthorize - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return &out, nil -} - -// ConnectCARoots returns the list of roots. -func (a *Agent) ConnectCARoots(q *QueryOptions) (*CARootList, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/agent/connect/ca/roots") - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out CARootList - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, qm, nil -} - -// ConnectCALeaf gets the leaf certificate for the given service ID. -func (a *Agent) ConnectCALeaf(serviceID string, q *QueryOptions) (*LeafCert, *QueryMeta, error) { - r := a.c.newRequest("GET", "/v1/agent/connect/ca/leaf/"+serviceID) - r.setQueryOptions(q) - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out LeafCert - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, qm, nil -} - -// EnableServiceMaintenance toggles service maintenance mode on -// for the given service ID. -func (a *Agent) EnableServiceMaintenance(serviceID, reason string) error { - return a.EnableServiceMaintenanceOpts(serviceID, reason, nil) -} - -func (a *Agent) EnableServiceMaintenanceOpts(serviceID, reason string, q *QueryOptions) error { - r := a.c.newRequest("PUT", "/v1/agent/service/maintenance/"+serviceID) - r.setQueryOptions(q) - r.params.Set("enable", "true") - r.params.Set("reason", reason) - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// DisableServiceMaintenance toggles service maintenance mode off -// for the given service ID. -func (a *Agent) DisableServiceMaintenance(serviceID string) error { - return a.DisableServiceMaintenanceOpts(serviceID, nil) -} - -func (a *Agent) DisableServiceMaintenanceOpts(serviceID string, q *QueryOptions) error { - r := a.c.newRequest("PUT", "/v1/agent/service/maintenance/"+serviceID) - r.setQueryOptions(q) - r.params.Set("enable", "false") - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// EnableNodeMaintenance toggles node maintenance mode on for the -// agent we are connected to. -func (a *Agent) EnableNodeMaintenance(reason string) error { - r := a.c.newRequest("PUT", "/v1/agent/maintenance") - r.params.Set("enable", "true") - r.params.Set("reason", reason) - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// DisableNodeMaintenance toggles node maintenance mode off for the -// agent we are connected to. -func (a *Agent) DisableNodeMaintenance() error { - r := a.c.newRequest("PUT", "/v1/agent/maintenance") - r.params.Set("enable", "false") - _, resp, err := a.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// Monitor returns a channel which will receive streaming logs from the agent -// Providing a non-nil stopCh can be used to close the connection and stop the -// log stream. An empty string will be sent down the given channel when there's -// nothing left to stream, after which the caller should close the stopCh. -func (a *Agent) Monitor(loglevel string, stopCh <-chan struct{}, q *QueryOptions) (chan string, error) { - return a.monitor(loglevel, false, stopCh, q) -} - -// MonitorJSON is like Monitor except it returns logs in JSON format. -func (a *Agent) MonitorJSON(loglevel string, stopCh <-chan struct{}, q *QueryOptions) (chan string, error) { - return a.monitor(loglevel, true, stopCh, q) -} - -func (a *Agent) monitor(loglevel string, logJSON bool, stopCh <-chan struct{}, q *QueryOptions) (chan string, error) { - r := a.c.newRequest("GET", "/v1/agent/monitor") - r.setQueryOptions(q) - if loglevel != "" { - r.params.Add("loglevel", loglevel) - } - if logJSON { - r.params.Set("logjson", "true") - } - _, resp, err := a.c.doRequest(r) - if err != nil { - return nil, err - } - if err := requireOK(resp); err != nil { - return nil, err - } - logCh := make(chan string, 64) - go func() { - defer closeResponseBody(resp) - scanner := bufio.NewScanner(resp.Body) - for { - select { - case <-stopCh: - close(logCh) - return - default: - } - if scanner.Scan() { - // An empty string signals to the caller that - // the scan is done, so make sure we only emit - // that when the scanner says it's done, not if - // we happen to ingest an empty line. - if text := scanner.Text(); text != "" { - logCh <- text - } else { - logCh <- " " - } - } else { - logCh <- "" - } - } - }() - return logCh, nil -} - -// UpdateACLToken updates the agent's "acl_token". See updateToken for more -// details. Deprecated in Consul 1.4. -// -// DEPRECATED (ACL-Legacy-Compat) - Prefer UpdateDefaultACLToken for v1.4.3 and above -func (a *Agent) UpdateACLToken(token string, q *WriteOptions) (*WriteMeta, error) { - return nil, fmt.Errorf("Legacy ACL Tokens were deprecated in Consul 1.4") -} - -// UpdateACLAgentToken updates the agent's "acl_agent_token". See updateToken -// for more details. Deprecated in Consul 1.4. -// -// DEPRECATED (ACL-Legacy-Compat) - Prefer UpdateAgentACLToken for v1.4.3 and above -func (a *Agent) UpdateACLAgentToken(token string, q *WriteOptions) (*WriteMeta, error) { - return nil, fmt.Errorf("Legacy ACL Tokens were deprecated in Consul 1.4") -} - -// UpdateACLAgentMasterToken updates the agent's "acl_agent_master_token". See -// updateToken for more details. Deprecated in Consul 1.4. -// -// DEPRECATED (ACL-Legacy-Compat) - Prefer UpdateAgentMasterACLToken for v1.4.3 and above -func (a *Agent) UpdateACLAgentMasterToken(token string, q *WriteOptions) (*WriteMeta, error) { - return nil, fmt.Errorf("Legacy ACL Tokens were deprecated in Consul 1.4") -} - -// UpdateACLReplicationToken updates the agent's "acl_replication_token". See -// updateToken for more details. Deprecated in Consul 1.4. -// -// DEPRECATED (ACL-Legacy-Compat) - Prefer UpdateReplicationACLToken for v1.4.3 and above -func (a *Agent) UpdateACLReplicationToken(token string, q *WriteOptions) (*WriteMeta, error) { - return nil, fmt.Errorf("Legacy ACL Tokens were deprecated in Consul 1.4") -} - -// UpdateDefaultACLToken updates the agent's "default" token. See updateToken -// for more details -func (a *Agent) UpdateDefaultACLToken(token string, q *WriteOptions) (*WriteMeta, error) { - return a.updateTokenFallback(token, q, "default", "acl_token") -} - -// UpdateAgentACLToken updates the agent's "agent" token. See updateToken -// for more details -func (a *Agent) UpdateAgentACLToken(token string, q *WriteOptions) (*WriteMeta, error) { - return a.updateTokenFallback(token, q, "agent", "acl_agent_token") -} - -// UpdateAgentRecoveryACLToken updates the agent's "agent_recovery" token. See updateToken -// for more details. -func (a *Agent) UpdateAgentRecoveryACLToken(token string, q *WriteOptions) (*WriteMeta, error) { - return a.updateTokenFallback(token, q, "agent_recovery", "agent_master", "acl_agent_master_token") -} - -// UpdateAgentMasterACLToken updates the agent's "agent_master" token. See updateToken -// for more details. -// -// DEPRECATED - Prefer UpdateAgentRecoveryACLToken for v1.11 and above. -func (a *Agent) UpdateAgentMasterACLToken(token string, q *WriteOptions) (*WriteMeta, error) { - return a.updateTokenFallback(token, q, "agent_master", "acl_agent_master_token") -} - -// UpdateReplicationACLToken updates the agent's "replication" token. See updateToken -// for more details -func (a *Agent) UpdateReplicationACLToken(token string, q *WriteOptions) (*WriteMeta, error) { - return a.updateTokenFallback(token, q, "replication", "acl_replication_token") -} - -// UpdateConfigFileRegistrationToken updates the agent's "replication" token. See updateToken -// for more details -func (a *Agent) UpdateConfigFileRegistrationToken(token string, q *WriteOptions) (*WriteMeta, error) { - return a.updateToken("config_file_service_registration", token, q) -} - -func (a *Agent) UpdateDNSToken(token string, q *WriteOptions) (*WriteMeta, error) { - return a.updateToken("dns", token, q) -} - -// updateToken can be used to update one of an agent's ACL tokens after the agent has -// started. The tokens are may not be persisted, so will need to be updated again if -// the agent is restarted unless the agent is configured to persist them. -func (a *Agent) updateToken(target, token string, q *WriteOptions) (*WriteMeta, error) { - meta, _, err := a.updateTokenOnce(target, token, q) - return meta, err -} - -func (a *Agent) updateTokenFallback(token string, q *WriteOptions, targets ...string) (*WriteMeta, error) { - if len(targets) == 0 { - panic("targets must not be empty") - } - - var ( - meta *WriteMeta - err error - ) - for _, target := range targets { - var status int - meta, status, err = a.updateTokenOnce(target, token, q) - if err == nil && status != http.StatusNotFound { - return meta, err - } - } - return meta, err -} - -func (a *Agent) updateTokenOnce(target, token string, q *WriteOptions) (*WriteMeta, int, error) { - r := a.c.newRequest("PUT", fmt.Sprintf("/v1/agent/token/%s", target)) - r.setWriteOptions(q) - r.obj = &AgentToken{Token: token} - - rtt, resp, err := a.c.doRequest(r) - if err != nil { - return nil, 500, err - } - defer closeResponseBody(resp) - wm := &WriteMeta{RequestTime: rtt} - if err := requireOK(resp); err != nil { - var statusE StatusError - if errors.As(err, &statusE) { - return wm, statusE.Code, statusE - } - return nil, 0, err - } - return wm, resp.StatusCode, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/api.go b/vendor/github.com/hashicorp/consul/api/api.go deleted file mode 100644 index f62c0c5a1bf..00000000000 --- a/vendor/github.com/hashicorp/consul/api/api.go +++ /dev/null @@ -1,1277 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "bytes" - "context" - "crypto/tls" - "encoding/json" - "fmt" - "io" - "net" - "net/http" - "net/url" - "os" - "strconv" - "strings" - "sync" - "time" - - "github.com/hashicorp/go-cleanhttp" - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-rootcerts" -) - -const ( - // HTTPAddrEnvName defines an environment variable name which sets - // the HTTP address if there is no -http-addr specified. - HTTPAddrEnvName = "CONSUL_HTTP_ADDR" - - // HTTPTokenEnvName defines an environment variable name which sets - // the HTTP token. - HTTPTokenEnvName = "CONSUL_HTTP_TOKEN" - - // HTTPTokenFileEnvName defines an environment variable name which sets - // the HTTP token file. - HTTPTokenFileEnvName = "CONSUL_HTTP_TOKEN_FILE" - - // HTTPAuthEnvName defines an environment variable name which sets - // the HTTP authentication header. - HTTPAuthEnvName = "CONSUL_HTTP_AUTH" - - // HTTPSSLEnvName defines an environment variable name which sets - // whether or not to use HTTPS. - HTTPSSLEnvName = "CONSUL_HTTP_SSL" - - // HTTPCAFile defines an environment variable name which sets the - // CA file to use for talking to Consul over TLS. - HTTPCAFile = "CONSUL_CACERT" - - // HTTPCAPath defines an environment variable name which sets the - // path to a directory of CA certs to use for talking to Consul over TLS. - HTTPCAPath = "CONSUL_CAPATH" - - // HTTPClientCert defines an environment variable name which sets the - // client cert file to use for talking to Consul over TLS. - HTTPClientCert = "CONSUL_CLIENT_CERT" - - // HTTPClientKey defines an environment variable name which sets the - // client key file to use for talking to Consul over TLS. - HTTPClientKey = "CONSUL_CLIENT_KEY" - - // HTTPTLSServerName defines an environment variable name which sets the - // server name to use as the SNI host when connecting via TLS - HTTPTLSServerName = "CONSUL_TLS_SERVER_NAME" - - // HTTPSSLVerifyEnvName defines an environment variable name which sets - // whether or not to disable certificate checking. - HTTPSSLVerifyEnvName = "CONSUL_HTTP_SSL_VERIFY" - - // GRPCAddrEnvName defines an environment variable name which sets the gRPC - // address for consul connect envoy. Note this isn't actually used by the api - // client in this package but is defined here for consistency with all the - // other ENV names we use. - GRPCAddrEnvName = "CONSUL_GRPC_ADDR" - - // GRPCCAFileEnvName defines an environment variable name which sets the - // CA file to use for talking to Consul gRPC over TLS. - GRPCCAFileEnvName = "CONSUL_GRPC_CACERT" - - // GRPCCAPathEnvName defines an environment variable name which sets the - // path to a directory of CA certs to use for talking to Consul gRPC over TLS. - GRPCCAPathEnvName = "CONSUL_GRPC_CAPATH" - - // HTTPNamespaceEnvVar defines an environment variable name which sets - // the HTTP Namespace to be used by default. This can still be overridden. - HTTPNamespaceEnvName = "CONSUL_NAMESPACE" - - // HTTPPartitionEnvName defines an environment variable name which sets - // the HTTP Partition to be used by default. This can still be overridden. - HTTPPartitionEnvName = "CONSUL_PARTITION" - - // QueryBackendStreaming Query backend of type streaming - QueryBackendStreaming = "streaming" - - // QueryBackendBlockingQuery Query backend of type blocking query - QueryBackendBlockingQuery = "blocking-query" -) - -type StatusError struct { - Code int - Body string -} - -func (e StatusError) Error() string { - return fmt.Sprintf("Unexpected response code: %d (%s)", e.Code, e.Body) -} - -// QueryOptions are used to parameterize a query -type QueryOptions struct { - // Namespace overrides the `default` namespace - // Note: Namespaces are available only in Consul Enterprise - Namespace string - - // Partition overrides the `default` partition - // Note: Partitions are available only in Consul Enterprise - Partition string - - // Providing a datacenter overwrites the DC provided - // by the Config - Datacenter string - - // Providing a peer name in the query option - Peer string - - // AllowStale allows any Consul server (non-leader) to service - // a read. This allows for lower latency and higher throughput - AllowStale bool - - // RequireConsistent forces the read to be fully consistent. - // This is more expensive but prevents ever performing a stale - // read. - RequireConsistent bool - - // UseCache requests that the agent cache results locally. See - // https://www.consul.io/api/features/caching.html for more details on the - // semantics. - UseCache bool - - // MaxAge limits how old a cached value will be returned if UseCache is true. - // If there is a cached response that is older than the MaxAge, it is treated - // as a cache miss and a new fetch invoked. If the fetch fails, the error is - // returned. Clients that wish to allow for stale results on error can set - // StaleIfError to a longer duration to change this behavior. It is ignored - // if the endpoint supports background refresh caching. See - // https://www.consul.io/api/features/caching.html for more details. - MaxAge time.Duration - - // StaleIfError specifies how stale the client will accept a cached response - // if the servers are unavailable to fetch a fresh one. Only makes sense when - // UseCache is true and MaxAge is set to a lower, non-zero value. It is - // ignored if the endpoint supports background refresh caching. See - // https://www.consul.io/api/features/caching.html for more details. - StaleIfError time.Duration - - // WaitIndex is used to enable a blocking query. Waits - // until the timeout or the next index is reached - WaitIndex uint64 - - // WaitHash is used by some endpoints instead of WaitIndex to perform blocking - // on state based on a hash of the response rather than a monotonic index. - // This is required when the state being blocked on is not stored in Raft, for - // example agent-local proxy configuration. - WaitHash string - - // WaitTime is used to bound the duration of a wait. - // Defaults to that of the Config, but can be overridden. - WaitTime time.Duration - - // Token is used to provide a per-request ACL token - // which overrides the agent's default token. - Token string - - // Near is used to provide a node name that will sort the results - // in ascending order based on the estimated round trip time from - // that node. Setting this to "_agent" will use the agent's node - // for the sort. - Near string - - // NodeMeta is used to filter results by nodes with the given - // metadata key/value pairs. Currently, only one key/value pair can - // be provided for filtering. - NodeMeta map[string]string - - // RelayFactor is used in keyring operations to cause responses to be - // relayed back to the sender through N other random nodes. Must be - // a value from 0 to 5 (inclusive). - RelayFactor uint8 - - // LocalOnly is used in keyring list operation to force the keyring - // query to only hit local servers (no WAN traffic). - LocalOnly bool - - // Connect filters prepared query execution to only include Connect-capable - // services. This currently affects prepared query execution. - Connect bool - - // ctx is an optional context pass through to the underlying HTTP - // request layer. Use Context() and WithContext() to manage this. - ctx context.Context - - // Filter requests filtering data prior to it being returned. The string - // is a go-bexpr compatible expression. - Filter string - - // MergeCentralConfig returns a service definition merged with the - // proxy-defaults/global and service-defaults/:service config entries. - // This can be used to ensure a full service definition is returned in the response - // especially when the service might not be written into the catalog that way. - MergeCentralConfig bool - - // Global is used to request information from all datacenters. Currently only - // used for operator usage requests. - Global bool -} - -func (o *QueryOptions) Context() context.Context { - if o != nil && o.ctx != nil { - return o.ctx - } - return context.Background() -} - -func (o *QueryOptions) WithContext(ctx context.Context) *QueryOptions { - o2 := new(QueryOptions) - if o != nil { - *o2 = *o - } - o2.ctx = ctx - return o2 -} - -// WriteOptions are used to parameterize a write -type WriteOptions struct { - // Namespace overrides the `default` namespace - // Note: Namespaces are available only in Consul Enterprise - Namespace string - - // Partition overrides the `default` partition - // Note: Partitions are available only in Consul Enterprise - Partition string - - // Providing a datacenter overwrites the DC provided - // by the Config - Datacenter string - - // Token is used to provide a per-request ACL token - // which overrides the agent's default token. - Token string - - // RelayFactor is used in keyring operations to cause responses to be - // relayed back to the sender through N other random nodes. Must be - // a value from 0 to 5 (inclusive). - RelayFactor uint8 - - // ctx is an optional context pass through to the underlying HTTP - // request layer. Use Context() and WithContext() to manage this. - ctx context.Context -} - -func (o *WriteOptions) Context() context.Context { - if o != nil && o.ctx != nil { - return o.ctx - } - return context.Background() -} - -func (o *WriteOptions) WithContext(ctx context.Context) *WriteOptions { - o2 := new(WriteOptions) - if o != nil { - *o2 = *o - } - o2.ctx = ctx - return o2 -} - -// QueryMeta is used to return meta data about a query -type QueryMeta struct { - // LastIndex. This can be used as a WaitIndex to perform - // a blocking query - LastIndex uint64 - - // LastContentHash. This can be used as a WaitHash to perform a blocking query - // for endpoints that support hash-based blocking. Endpoints that do not - // support it will return an empty hash. - LastContentHash string - - // Time of last contact from the leader for the - // server servicing the request - LastContact time.Duration - - // Is there a known leader - KnownLeader bool - - // How long did the request take - RequestTime time.Duration - - // Is address translation enabled for HTTP responses on this agent - AddressTranslationEnabled bool - - // CacheHit is true if the result was served from agent-local cache. - CacheHit bool - - // CacheAge is set if request was ?cached and indicates how stale the cached - // response is. - CacheAge time.Duration - - // QueryBackend represent which backend served the request. - QueryBackend string - - // DefaultACLPolicy is used to control the ACL interaction when there is no - // defined policy. This can be "allow" which means ACLs are used to - // deny-list, or "deny" which means ACLs are allow-lists. - DefaultACLPolicy string - - // ResultsFilteredByACLs is true when some of the query's results were - // filtered out by enforcing ACLs. It may be false because nothing was - // removed, or because the endpoint does not yet support this flag. - ResultsFilteredByACLs bool -} - -// WriteMeta is used to return meta data about a write -type WriteMeta struct { - // How long did the request take - RequestTime time.Duration -} - -// HttpBasicAuth is used to authenticate http client with HTTP Basic Authentication -type HttpBasicAuth struct { - // Username to use for HTTP Basic Authentication - Username string - - // Password to use for HTTP Basic Authentication - Password string -} - -// Config is used to configure the creation of a client -type Config struct { - // Address is the address of the Consul server - Address string - - // Scheme is the URI scheme for the Consul server - Scheme string - - // Prefix for URIs for when consul is behind an API gateway (reverse - // proxy). The API gateway must strip off the PathPrefix before - // passing the request onto consul. - PathPrefix string - - // Datacenter to use. If not provided, the default agent datacenter is used. - Datacenter string - - // Transport is the Transport to use for the http client. - Transport *http.Transport - - // HttpClient is the client to use. Default will be - // used if not provided. - HttpClient *http.Client - - // HttpAuth is the auth info to use for http access. - HttpAuth *HttpBasicAuth - - // WaitTime limits how long a Watch will block. If not provided, - // the agent default values will be used. - WaitTime time.Duration - - // Token is used to provide a per-request ACL token - // which overrides the agent's default token. - Token string - - // TokenFile is a file containing the current token to use for this client. - // If provided it is read once at startup and never again. - TokenFile string - - // Namespace is the name of the namespace to send along for the request - // when no other Namespace is present in the QueryOptions - Namespace string - - // Partition is the name of the partition to send along for the request - // when no other Partition is present in the QueryOptions - Partition string - - TLSConfig TLSConfig -} - -// TLSConfig is used to generate a TLSClientConfig that's useful for talking to -// Consul using TLS. -type TLSConfig struct { - // Address is the optional address of the Consul server. The port, if any - // will be removed from here and this will be set to the ServerName of the - // resulting config. - Address string - - // CAFile is the optional path to the CA certificate used for Consul - // communication, defaults to the system bundle if not specified. - CAFile string - - // CAPath is the optional path to a directory of CA certificates to use for - // Consul communication, defaults to the system bundle if not specified. - CAPath string - - // CAPem is the optional PEM-encoded CA certificate used for Consul - // communication, defaults to the system bundle if not specified. - CAPem []byte - - // CertFile is the optional path to the certificate for Consul - // communication. If this is set then you need to also set KeyFile. - CertFile string - - // CertPEM is the optional PEM-encoded certificate for Consul - // communication. If this is set then you need to also set KeyPEM. - CertPEM []byte - - // KeyFile is the optional path to the private key for Consul communication. - // If this is set then you need to also set CertFile. - KeyFile string - - // KeyPEM is the optional PEM-encoded private key for Consul communication. - // If this is set then you need to also set CertPEM. - KeyPEM []byte - - // InsecureSkipVerify if set to true will disable TLS host verification. - InsecureSkipVerify bool -} - -// DefaultConfig returns a default configuration for the client. By default this -// will pool and reuse idle connections to Consul. If you have a long-lived -// client object, this is the desired behavior and should make the most efficient -// use of the connections to Consul. If you don't reuse a client object, which -// is not recommended, then you may notice idle connections building up over -// time. To avoid this, use the DefaultNonPooledConfig() instead. -func DefaultConfig() *Config { - return defaultConfig(nil, cleanhttp.DefaultPooledTransport) -} - -// DefaultConfigWithLogger returns a default configuration for the client. It -// is exactly the same as DefaultConfig, but allows for a pre-configured logger -// object to be passed through. -func DefaultConfigWithLogger(logger hclog.Logger) *Config { - return defaultConfig(logger, cleanhttp.DefaultPooledTransport) -} - -// DefaultNonPooledConfig returns a default configuration for the client which -// does not pool connections. This isn't a recommended configuration because it -// will reconnect to Consul on every request, but this is useful to avoid the -// accumulation of idle connections if you make many client objects during the -// lifetime of your application. -func DefaultNonPooledConfig() *Config { - return defaultConfig(nil, cleanhttp.DefaultTransport) -} - -// defaultConfig returns the default configuration for the client, using the -// given function to make the transport. -func defaultConfig(logger hclog.Logger, transportFn func() *http.Transport) *Config { - if logger == nil { - logger = hclog.New(&hclog.LoggerOptions{ - Name: "consul-api", - }) - } - - config := &Config{ - Address: "127.0.0.1:8500", - Scheme: "http", - Transport: transportFn(), - } - - if addr := os.Getenv(HTTPAddrEnvName); addr != "" { - config.Address = addr - } - - if tokenFile := os.Getenv(HTTPTokenFileEnvName); tokenFile != "" { - config.TokenFile = tokenFile - } - - if token := os.Getenv(HTTPTokenEnvName); token != "" { - config.Token = token - } - - if auth := os.Getenv(HTTPAuthEnvName); auth != "" { - var username, password string - if strings.Contains(auth, ":") { - split := strings.SplitN(auth, ":", 2) - username = split[0] - password = split[1] - } else { - username = auth - } - - config.HttpAuth = &HttpBasicAuth{ - Username: username, - Password: password, - } - } - - if ssl := os.Getenv(HTTPSSLEnvName); ssl != "" { - enabled, err := strconv.ParseBool(ssl) - if err != nil { - logger.Warn(fmt.Sprintf("could not parse %s", HTTPSSLEnvName), "error", err) - } - - if enabled { - config.Scheme = "https" - } - } - - if v := os.Getenv(HTTPTLSServerName); v != "" { - config.TLSConfig.Address = v - } - if v := os.Getenv(HTTPCAFile); v != "" { - config.TLSConfig.CAFile = v - } - if v := os.Getenv(HTTPCAPath); v != "" { - config.TLSConfig.CAPath = v - } - if v := os.Getenv(HTTPClientCert); v != "" { - config.TLSConfig.CertFile = v - } - if v := os.Getenv(HTTPClientKey); v != "" { - config.TLSConfig.KeyFile = v - } - if v := os.Getenv(HTTPSSLVerifyEnvName); v != "" { - doVerify, err := strconv.ParseBool(v) - if err != nil { - logger.Warn(fmt.Sprintf("could not parse %s", HTTPSSLVerifyEnvName), "error", err) - } - if !doVerify { - config.TLSConfig.InsecureSkipVerify = true - } - } - - if v := os.Getenv(HTTPNamespaceEnvName); v != "" { - config.Namespace = v - } - - if v := os.Getenv(HTTPPartitionEnvName); v != "" { - config.Partition = v - } - - return config -} - -// TLSConfig is used to generate a TLSClientConfig that's useful for talking to -// Consul using TLS. -func SetupTLSConfig(tlsConfig *TLSConfig) (*tls.Config, error) { - tlsClientConfig := &tls.Config{ - InsecureSkipVerify: tlsConfig.InsecureSkipVerify, - } - - if tlsConfig.Address != "" { - server := tlsConfig.Address - hasPort := strings.LastIndex(server, ":") > strings.LastIndex(server, "]") - if hasPort { - var err error - server, _, err = net.SplitHostPort(server) - if err != nil { - return nil, err - } - } - tlsClientConfig.ServerName = server - } - - if len(tlsConfig.CertPEM) != 0 && len(tlsConfig.KeyPEM) != 0 { - tlsCert, err := tls.X509KeyPair(tlsConfig.CertPEM, tlsConfig.KeyPEM) - if err != nil { - return nil, err - } - tlsClientConfig.Certificates = []tls.Certificate{tlsCert} - } else if len(tlsConfig.CertPEM) != 0 || len(tlsConfig.KeyPEM) != 0 { - return nil, fmt.Errorf("both client cert and client key must be provided") - } - - if tlsConfig.CertFile != "" && tlsConfig.KeyFile != "" { - tlsCert, err := tls.LoadX509KeyPair(tlsConfig.CertFile, tlsConfig.KeyFile) - if err != nil { - return nil, err - } - tlsClientConfig.Certificates = []tls.Certificate{tlsCert} - } else if tlsConfig.CertFile != "" || tlsConfig.KeyFile != "" { - return nil, fmt.Errorf("both client cert and client key must be provided") - } - - if tlsConfig.CAFile != "" || tlsConfig.CAPath != "" || len(tlsConfig.CAPem) != 0 { - rootConfig := &rootcerts.Config{ - CAFile: tlsConfig.CAFile, - CAPath: tlsConfig.CAPath, - CACertificate: tlsConfig.CAPem, - } - if err := rootcerts.ConfigureTLS(tlsClientConfig, rootConfig); err != nil { - return nil, err - } - } - - return tlsClientConfig, nil -} - -func (c *Config) GenerateEnv() []string { - env := make([]string, 0, 10) - - env = append(env, - fmt.Sprintf("%s=%s", HTTPAddrEnvName, c.Address), - fmt.Sprintf("%s=%s", HTTPTokenEnvName, c.Token), - fmt.Sprintf("%s=%s", HTTPTokenFileEnvName, c.TokenFile), - fmt.Sprintf("%s=%t", HTTPSSLEnvName, c.Scheme == "https"), - fmt.Sprintf("%s=%s", HTTPCAFile, c.TLSConfig.CAFile), - fmt.Sprintf("%s=%s", HTTPCAPath, c.TLSConfig.CAPath), - fmt.Sprintf("%s=%s", HTTPClientCert, c.TLSConfig.CertFile), - fmt.Sprintf("%s=%s", HTTPClientKey, c.TLSConfig.KeyFile), - fmt.Sprintf("%s=%s", HTTPTLSServerName, c.TLSConfig.Address), - fmt.Sprintf("%s=%t", HTTPSSLVerifyEnvName, !c.TLSConfig.InsecureSkipVerify)) - - if c.HttpAuth != nil { - env = append(env, fmt.Sprintf("%s=%s:%s", HTTPAuthEnvName, c.HttpAuth.Username, c.HttpAuth.Password)) - } else { - env = append(env, fmt.Sprintf("%s=", HTTPAuthEnvName)) - } - - return env -} - -// Client provides a client to the Consul API -type Client struct { - modifyLock sync.RWMutex - headers http.Header - - config Config -} - -// Headers gets the current set of headers used for requests. This returns a -// copy; to modify it call AddHeader or SetHeaders. -func (c *Client) Headers() http.Header { - c.modifyLock.RLock() - defer c.modifyLock.RUnlock() - - if c.headers == nil { - return nil - } - - ret := make(http.Header) - for k, v := range c.headers { - for _, val := range v { - ret[k] = append(ret[k], val) - } - } - - return ret -} - -// AddHeader allows a single header key/value pair to be added -// in a race-safe fashion. -func (c *Client) AddHeader(key, value string) { - c.modifyLock.Lock() - defer c.modifyLock.Unlock() - c.headers.Add(key, value) -} - -// SetHeaders clears all previous headers and uses only the given -// ones going forward. -func (c *Client) SetHeaders(headers http.Header) { - c.modifyLock.Lock() - defer c.modifyLock.Unlock() - c.headers = headers -} - -// NewClient returns a new client -func NewClient(config *Config) (*Client, error) { - // bootstrap the config - defConfig := DefaultConfig() - - if config.Address == "" { - config.Address = defConfig.Address - } - - if config.Scheme == "" { - config.Scheme = defConfig.Scheme - } - - if config.Transport == nil { - config.Transport = defConfig.Transport - } - - if config.TLSConfig.Address == "" { - config.TLSConfig.Address = defConfig.TLSConfig.Address - } - - if config.TLSConfig.CAFile == "" { - config.TLSConfig.CAFile = defConfig.TLSConfig.CAFile - } - - if config.TLSConfig.CAPath == "" { - config.TLSConfig.CAPath = defConfig.TLSConfig.CAPath - } - - if config.TLSConfig.CertFile == "" { - config.TLSConfig.CertFile = defConfig.TLSConfig.CertFile - } - - if config.TLSConfig.KeyFile == "" { - config.TLSConfig.KeyFile = defConfig.TLSConfig.KeyFile - } - - if !config.TLSConfig.InsecureSkipVerify { - config.TLSConfig.InsecureSkipVerify = defConfig.TLSConfig.InsecureSkipVerify - } - - if config.HttpClient == nil { - var err error - config.HttpClient, err = NewHttpClient(config.Transport, config.TLSConfig) - if err != nil { - return nil, err - } - } - - if config.Namespace == "" { - config.Namespace = defConfig.Namespace - } - - if config.Partition == "" { - config.Partition = defConfig.Partition - } - - parts := strings.SplitN(config.Address, "://", 2) - if len(parts) == 2 { - switch parts[0] { - case "http": - // Never revert to http if TLS was explicitly requested. - case "https": - config.Scheme = "https" - case "unix": - trans := cleanhttp.DefaultTransport() - trans.DialContext = func(_ context.Context, _, _ string) (net.Conn, error) { - return net.Dial("unix", parts[1]) - } - httpClient, err := NewHttpClient(trans, config.TLSConfig) - if err != nil { - return nil, err - } - config.HttpClient = httpClient - default: - return nil, fmt.Errorf("Unknown protocol scheme: %s", parts[0]) - } - config.Address = parts[1] - - // separate out a reverse proxy prefix, if it is present. - // NOTE: Rewriting this code to use url.Parse() instead of - // strings.SplitN() breaks existing test cases. - switch parts[0] { - case "http", "https": - parts := strings.SplitN(parts[1], "/", 2) - if len(parts) == 2 { - config.Address = parts[0] - config.PathPrefix = "/" + parts[1] - } - } - } - - // If the TokenFile is set, always use that, even if a Token is configured. - // This is because when TokenFile is set it is read into the Token field. - // We want any derived clients to have to re-read the token file. - // The precedence of ACL token should be: - // 1. -token-file cli option - // 2. -token cli option - // 3. CONSUL_HTTP_TOKEN_FILE environment variable - // 4. CONSUL_HTTP_TOKEN environment variable - if config.TokenFile != "" && config.TokenFile != defConfig.TokenFile { - data, err := os.ReadFile(config.TokenFile) - if err != nil { - return nil, fmt.Errorf("Error loading token file %s : %s", config.TokenFile, err) - } - - if token := strings.TrimSpace(string(data)); token != "" { - config.Token = token - } - } else if config.Token != "" && defConfig.Token != config.Token { - // Fall through - } else if defConfig.TokenFile != "" { - data, err := os.ReadFile(defConfig.TokenFile) - if err != nil { - return nil, fmt.Errorf("Error loading token file %s : %s", defConfig.TokenFile, err) - } - - if token := strings.TrimSpace(string(data)); token != "" { - config.Token = token - config.TokenFile = defConfig.TokenFile - } - } else { - config.Token = defConfig.Token - } - return &Client{config: *config, headers: make(http.Header)}, nil -} - -// NewHttpClient returns an http client configured with the given Transport and TLS -// config. -func NewHttpClient(transport *http.Transport, tlsConf TLSConfig) (*http.Client, error) { - client := &http.Client{ - Transport: transport, - } - - // TODO (slackpad) - Once we get some run time on the HTTP/2 support we - // should turn it on by default if TLS is enabled. We would basically - // just need to call http2.ConfigureTransport(transport) here. We also - // don't want to introduce another external dependency on - // golang.org/x/net/http2 at this time. For a complete recipe for how - // to enable HTTP/2 support on a transport suitable for the API client - // library see agent/http_test.go:TestHTTPServer_H2. - - if transport.TLSClientConfig == nil { - tlsClientConfig, err := SetupTLSConfig(&tlsConf) - - if err != nil { - return nil, err - } - - transport.TLSClientConfig = tlsClientConfig - } - - return client, nil -} - -// request is used to help build up a request -type request struct { - config *Config - method string - url *url.URL - params url.Values - body io.Reader - header http.Header - obj interface{} - ctx context.Context -} - -// setQueryOptions is used to annotate the request with -// additional query options -func (r *request) setQueryOptions(q *QueryOptions) { - if q == nil { - return - } - if q.Namespace != "" { - // For backwards-compatibility with existing tests, - // use the short-hand query param name "ns" - // rather than the alternative long-hand "namespace" - r.params.Set("ns", q.Namespace) - } - if q.Partition != "" { - // For backwards-compatibility with existing tests, - // use the long-hand query param name "partition" - // rather than the alternative short-hand "ap" - r.params.Set("partition", q.Partition) - } - if q.Datacenter != "" { - // For backwards-compatibility with existing tests, - // use the short-hand query param name "dc" - // rather than the alternative long-hand "datacenter" - r.params.Set("dc", q.Datacenter) - } - if q.Peer != "" { - r.params.Set("peer", q.Peer) - } - if q.AllowStale { - r.params.Set("stale", "") - } - if q.RequireConsistent { - r.params.Set("consistent", "") - } - if q.WaitIndex != 0 { - r.params.Set("index", strconv.FormatUint(q.WaitIndex, 10)) - } - if q.WaitTime != 0 { - r.params.Set("wait", durToMsec(q.WaitTime)) - } - if q.WaitHash != "" { - r.params.Set("hash", q.WaitHash) - } - if q.Token != "" { - r.header.Set("X-Consul-Token", q.Token) - } - if q.Near != "" { - r.params.Set("near", q.Near) - } - if q.Filter != "" { - r.params.Set("filter", q.Filter) - } - if len(q.NodeMeta) > 0 { - for key, value := range q.NodeMeta { - r.params.Add("node-meta", key+":"+value) - } - } - if q.RelayFactor != 0 { - r.params.Set("relay-factor", strconv.Itoa(int(q.RelayFactor))) - } - if q.LocalOnly { - r.params.Set("local-only", fmt.Sprintf("%t", q.LocalOnly)) - } - if q.Connect { - r.params.Set("connect", "true") - } - if q.UseCache && !q.RequireConsistent { - r.params.Set("cached", "") - - cc := []string{} - if q.MaxAge > 0 { - cc = append(cc, fmt.Sprintf("max-age=%.0f", q.MaxAge.Seconds())) - } - if q.StaleIfError > 0 { - cc = append(cc, fmt.Sprintf("stale-if-error=%.0f", q.StaleIfError.Seconds())) - } - if len(cc) > 0 { - r.header.Set("Cache-Control", strings.Join(cc, ", ")) - } - } - if q.MergeCentralConfig { - r.params.Set("merge-central-config", "") - } - if q.Global { - r.params.Set("global", "") - } - - r.ctx = q.ctx -} - -// durToMsec converts a duration to a millisecond specified string. If the -// user selected a positive value that rounds to 0 ms, then we will use 1 ms -// so they get a short delay, otherwise Consul will translate the 0 ms into -// a huge default delay. -func durToMsec(dur time.Duration) string { - ms := dur / time.Millisecond - if dur > 0 && ms == 0 { - ms = 1 - } - return fmt.Sprintf("%dms", ms) -} - -// serverError is a string we look for to detect 500 errors. -const serverError = "Unexpected response code: 500" - -// IsRetryableError returns true for 500 errors from the Consul servers, and -// network connection errors. These are usually retryable at a later time. -// This applies to reads but NOT to writes. This may return true for errors -// on writes that may have still gone through, so do not use this to retry -// any write operations. -func IsRetryableError(err error) bool { - if err == nil { - return false - } - - if _, ok := err.(net.Error); ok { - return true - } - - // TODO (slackpad) - Make a real error type here instead of using - // a string check. - return strings.Contains(err.Error(), serverError) -} - -// setWriteOptions is used to annotate the request with -// additional write options -func (r *request) setWriteOptions(q *WriteOptions) { - if q == nil { - return - } - // For backwards-compatibility, continue to use the shorthand "ns" - // rather than "namespace" - if q.Namespace != "" { - r.params.Set("ns", q.Namespace) - } - if q.Partition != "" { - r.params.Set("partition", q.Partition) - } - // For backwards-compatibility, continue to use the shorthand "dc" - // rather than "datacenter" - if q.Datacenter != "" { - r.params.Set("dc", q.Datacenter) - } - if q.Token != "" { - r.header.Set("X-Consul-Token", q.Token) - } - if q.RelayFactor != 0 { - r.params.Set("relay-factor", strconv.Itoa(int(q.RelayFactor))) - } - r.ctx = q.ctx -} - -// toHTTP converts the request to an HTTP request -func (r *request) toHTTP() (*http.Request, error) { - // Encode the query parameters - r.url.RawQuery = r.params.Encode() - - // Check if we should encode the body - if r.body == nil && r.obj != nil { - b, err := encodeBody(r.obj) - if err != nil { - return nil, err - } - r.body = b - } - - // Create the HTTP request - req, err := http.NewRequest(r.method, r.url.RequestURI(), r.body) - if err != nil { - return nil, err - } - - // validate that socket communications that do not use the host, detect - // slashes in the host name and replace it with local host. - // this is required since go started validating req.host in 1.20.6 and 1.19.11. - // prior to that they would strip out the slashes for you. They removed that - // behavior and added more strict validation as part of a CVE. - // This issue is being tracked by the Go team: - // https://github.com/golang/go/issues/61431 - // If there is a resolution in this issue, we will remove this code. - // In the time being, this is the accepted workaround. - if strings.HasPrefix(r.url.Host, "/") { - r.url.Host = "localhost" - } - - req.URL.Host = r.url.Host - req.URL.Scheme = r.url.Scheme - req.Host = r.url.Host - req.Header = r.header - - // Content-Type must always be set when a body is present - // See https://github.com/hashicorp/consul/issues/10011 - if req.Body != nil && req.Header.Get("Content-Type") == "" { - req.Header.Set("Content-Type", "application/json") - } - - // Setup auth - if r.config.HttpAuth != nil { - req.SetBasicAuth(r.config.HttpAuth.Username, r.config.HttpAuth.Password) - } - if r.ctx != nil { - return req.WithContext(r.ctx), nil - } - - return req, nil -} - -// newRequest is used to create a new request -func (c *Client) newRequest(method, path string) *request { - r := &request{ - config: &c.config, - method: method, - url: &url.URL{ - Scheme: c.config.Scheme, - Host: c.config.Address, - Path: c.config.PathPrefix + path, - }, - params: make(map[string][]string), - header: c.Headers(), - } - - if c.config.Datacenter != "" { - r.params.Set("dc", c.config.Datacenter) - } - if c.config.Namespace != "" { - r.params.Set("ns", c.config.Namespace) - } - if c.config.Partition != "" { - r.params.Set("partition", c.config.Partition) - } - if c.config.WaitTime != 0 { - r.params.Set("wait", durToMsec(r.config.WaitTime)) - } - if c.config.Token != "" { - r.header.Set("X-Consul-Token", r.config.Token) - } - return r -} - -// doRequest runs a request with our client -func (c *Client) doRequest(r *request) (time.Duration, *http.Response, error) { - req, err := r.toHTTP() - if err != nil { - return 0, nil, err - } - start := time.Now() - resp, err := c.config.HttpClient.Do(req) - diff := time.Since(start) - return diff, resp, err -} - -// Query is used to do a GET request against an endpoint -// and deserialize the response into an interface using -// standard Consul conventions. -func (c *Client) query(endpoint string, out interface{}, q *QueryOptions) (*QueryMeta, error) { - r := c.newRequest("GET", endpoint) - r.setQueryOptions(q) - rtt, resp, err := c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if err := decodeBody(resp, out); err != nil { - return nil, err - } - return qm, nil -} - -// write is used to do a PUT request against an endpoint -// and serialize/deserialized using the standard Consul conventions. -func (c *Client) write(endpoint string, in, out interface{}, q *WriteOptions) (*WriteMeta, error) { - r := c.newRequest("PUT", endpoint) - r.setWriteOptions(q) - r.obj = in - rtt, resp, err := c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - if out != nil { - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - } else if _, err := io.ReadAll(resp.Body); err != nil { - return nil, err - } - return wm, nil -} - -// parseQueryMeta is used to help parse query meta-data -// -// TODO(rb): bug? the error from this function is never handled -func parseQueryMeta(resp *http.Response, q *QueryMeta) error { - header := resp.Header - - // Parse the X-Consul-Index (if it's set - hash based blocking queries don't - // set this) - if indexStr := header.Get("X-Consul-Index"); indexStr != "" { - index, err := strconv.ParseUint(indexStr, 10, 64) - if err != nil { - return fmt.Errorf("Failed to parse X-Consul-Index: %v", err) - } - q.LastIndex = index - } - q.LastContentHash = header.Get("X-Consul-ContentHash") - - // Parse the X-Consul-LastContact - last, err := strconv.ParseUint(header.Get("X-Consul-LastContact"), 10, 64) - if err != nil { - return fmt.Errorf("Failed to parse X-Consul-LastContact: %v", err) - } - q.LastContact = time.Duration(last) * time.Millisecond - - // Parse the X-Consul-KnownLeader - switch header.Get("X-Consul-KnownLeader") { - case "true": - q.KnownLeader = true - default: - q.KnownLeader = false - } - - // Parse X-Consul-Translate-Addresses - switch header.Get("X-Consul-Translate-Addresses") { - case "true": - q.AddressTranslationEnabled = true - default: - q.AddressTranslationEnabled = false - } - - // Parse X-Consul-Default-ACL-Policy - switch v := header.Get("X-Consul-Default-ACL-Policy"); v { - case "allow", "deny": - q.DefaultACLPolicy = v - } - - // Parse the X-Consul-Results-Filtered-By-ACLs - switch header.Get("X-Consul-Results-Filtered-By-ACLs") { - case "true": - q.ResultsFilteredByACLs = true - default: - q.ResultsFilteredByACLs = false - } - - // Parse Cache info - if cacheStr := header.Get("X-Cache"); cacheStr != "" { - q.CacheHit = strings.EqualFold(cacheStr, "HIT") - } - if ageStr := header.Get("Age"); ageStr != "" { - age, err := strconv.ParseUint(ageStr, 10, 64) - if err != nil { - return fmt.Errorf("Failed to parse Age Header: %v", err) - } - q.CacheAge = time.Duration(age) * time.Second - } - - switch v := header.Get("X-Consul-Query-Backend"); v { - case QueryBackendStreaming, QueryBackendBlockingQuery: - q.QueryBackend = v - } - return nil -} - -// decodeBody is used to JSON decode a body -func decodeBody(resp *http.Response, out interface{}) error { - dec := json.NewDecoder(resp.Body) - return dec.Decode(out) -} - -// encodeBody is used to encode a request body -func encodeBody(obj interface{}) (io.Reader, error) { - buf := bytes.NewBuffer(nil) - enc := json.NewEncoder(buf) - if err := enc.Encode(obj); err != nil { - return nil, err - } - return buf, nil -} - -// requireOK is used to wrap doRequest and check for a 200 -func requireOK(resp *http.Response) error { - return requireHttpCodes(resp, 200) -} - -// requireHttpCodes checks for the "allowable" http codes for a response -func requireHttpCodes(resp *http.Response, httpCodes ...int) error { - // if there is an http code that we require, return w no error - for _, httpCode := range httpCodes { - if resp.StatusCode == httpCode { - return nil - } - } - - // if we reached here, then none of the http codes in resp matched any that we expected - // so err out - return generateUnexpectedResponseCodeError(resp) -} - -// closeResponseBody reads resp.Body until EOF, and then closes it. The read -// is necessary to ensure that the http.Client's underlying RoundTripper is able -// to re-use the TCP connection. See godoc on net/http.Client.Do. -func closeResponseBody(resp *http.Response) error { - _, _ = io.Copy(io.Discard, resp.Body) - return resp.Body.Close() -} - -func (req *request) filterQuery(filter string) { - if filter == "" { - return - } - - req.params.Set("filter", filter) -} - -// generateUnexpectedResponseCodeError consumes the rest of the body, closes -// the body stream and generates an error indicating the status code was -// unexpected. -func generateUnexpectedResponseCodeError(resp *http.Response) error { - var buf bytes.Buffer - io.Copy(&buf, resp.Body) - closeResponseBody(resp) - - trimmed := strings.TrimSpace(string(buf.Bytes())) - return StatusError{Code: resp.StatusCode, Body: trimmed} -} - -func requireNotFoundOrOK(resp *http.Response) (bool, *http.Response, error) { - switch resp.StatusCode { - case 200: - return true, resp, nil - case 404: - return false, resp, nil - default: - return false, nil, generateUnexpectedResponseCodeError(resp) - } -} diff --git a/vendor/github.com/hashicorp/consul/api/catalog.go b/vendor/github.com/hashicorp/consul/api/catalog.go deleted file mode 100644 index 0040ca6e7a8..00000000000 --- a/vendor/github.com/hashicorp/consul/api/catalog.go +++ /dev/null @@ -1,377 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "net" - "strconv" -) - -type Weights struct { - Passing int - Warning int -} - -type Node struct { - ID string - Node string - Address string - Datacenter string - TaggedAddresses map[string]string - Meta map[string]string - CreateIndex uint64 - ModifyIndex uint64 - Partition string `json:",omitempty"` - PeerName string `json:",omitempty"` - Locality *Locality `json:",omitempty"` -} - -type ServiceAddress struct { - Address string - Port int -} - -type CatalogService struct { - ID string - Node string - Address string - Datacenter string - TaggedAddresses map[string]string - NodeMeta map[string]string - ServiceID string - ServiceName string - ServiceAddress string - ServiceTaggedAddresses map[string]ServiceAddress - ServiceTags []string - ServiceMeta map[string]string - ServicePort int - ServiceWeights Weights - ServiceEnableTagOverride bool - ServiceProxy *AgentServiceConnectProxyConfig - ServiceLocality *Locality `json:",omitempty"` - CreateIndex uint64 - Checks HealthChecks - ModifyIndex uint64 - Namespace string `json:",omitempty"` - Partition string `json:",omitempty"` -} - -type CatalogNode struct { - Node *Node - Services map[string]*AgentService -} - -type CatalogNodeServiceList struct { - Node *Node - Services []*AgentService -} - -type CatalogRegistration struct { - ID string - Node string - Address string - TaggedAddresses map[string]string - NodeMeta map[string]string - Datacenter string - Service *AgentService - Check *AgentCheck - Checks HealthChecks - SkipNodeUpdate bool - Partition string `json:",omitempty"` - Locality *Locality `json:",omitempty"` -} - -type CatalogDeregistration struct { - Node string - Address string `json:",omitempty"` // Obsolete. - Datacenter string - ServiceID string - CheckID string - Namespace string `json:",omitempty"` - Partition string `json:",omitempty"` -} - -type CompoundServiceName struct { - Name string - - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - // Partitions are a Consul Enterprise feature. - Partition string `json:",omitempty"` -} - -// GatewayService associates a gateway with a linked service. -// It also contains service-specific gateway configuration like ingress listener port and protocol. -type GatewayService struct { - Gateway CompoundServiceName - Service CompoundServiceName - GatewayKind ServiceKind - Port int `json:",omitempty"` - Protocol string `json:",omitempty"` - Hosts []string `json:",omitempty"` - CAFile string `json:",omitempty"` - CertFile string `json:",omitempty"` - KeyFile string `json:",omitempty"` - SNI string `json:",omitempty"` - FromWildcard bool `json:",omitempty"` -} - -// Catalog can be used to query the Catalog endpoints -type Catalog struct { - c *Client -} - -// Catalog returns a handle to the catalog endpoints -func (c *Client) Catalog() *Catalog { - return &Catalog{c} -} - -func (c *Catalog) Register(reg *CatalogRegistration, q *WriteOptions) (*WriteMeta, error) { - r := c.c.newRequest("PUT", "/v1/catalog/register") - r.setWriteOptions(q) - r.obj = reg - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - - return wm, nil -} - -func (c *Catalog) Deregister(dereg *CatalogDeregistration, q *WriteOptions) (*WriteMeta, error) { - r := c.c.newRequest("PUT", "/v1/catalog/deregister") - r.setWriteOptions(q) - r.obj = dereg - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - - return wm, nil -} - -// Datacenters is used to query for all the known datacenters -func (c *Catalog) Datacenters() ([]string, error) { - r := c.c.newRequest("GET", "/v1/catalog/datacenters") - _, resp, err := c.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - var out []string - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return out, nil -} - -// Nodes is used to query all the known nodes -func (c *Catalog) Nodes(q *QueryOptions) ([]*Node, *QueryMeta, error) { - r := c.c.newRequest("GET", "/v1/catalog/nodes") - r.setQueryOptions(q) - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out []*Node - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// Services is used to query for all known services -func (c *Catalog) Services(q *QueryOptions) (map[string][]string, *QueryMeta, error) { - r := c.c.newRequest("GET", "/v1/catalog/services") - r.setQueryOptions(q) - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out map[string][]string - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// Service is used to query catalog entries for a given service -func (c *Catalog) Service(service, tag string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) { - var tags []string - if tag != "" { - tags = []string{tag} - } - return c.service(service, tags, q, false) -} - -// Supports multiple tags for filtering -func (c *Catalog) ServiceMultipleTags(service string, tags []string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) { - return c.service(service, tags, q, false) -} - -// Connect is used to query catalog entries for a given Connect-enabled service -func (c *Catalog) Connect(service, tag string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) { - var tags []string - if tag != "" { - tags = []string{tag} - } - return c.service(service, tags, q, true) -} - -// Supports multiple tags for filtering -func (c *Catalog) ConnectMultipleTags(service string, tags []string, q *QueryOptions) ([]*CatalogService, *QueryMeta, error) { - return c.service(service, tags, q, true) -} - -func (c *Catalog) service(service string, tags []string, q *QueryOptions, connect bool) ([]*CatalogService, *QueryMeta, error) { - path := "/v1/catalog/service/" + service - if connect { - path = "/v1/catalog/connect/" + service - } - r := c.c.newRequest("GET", path) - r.setQueryOptions(q) - if len(tags) > 0 { - for _, tag := range tags { - r.params.Add("tag", tag) - } - } - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out []*CatalogService - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// Node is used to query for service information about a single node -func (c *Catalog) Node(node string, q *QueryOptions) (*CatalogNode, *QueryMeta, error) { - r := c.c.newRequest("GET", "/v1/catalog/node/"+node) - r.setQueryOptions(q) - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out *CatalogNode - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// NodeServiceList is used to query for service information about a single node. It differs from -// the Node function only in its return type which will contain a list of services as opposed to -// a map of service ids to services. This different structure allows for using the wildcard specifier -// '*' for the Namespace in the QueryOptions. -func (c *Catalog) NodeServiceList(node string, q *QueryOptions) (*CatalogNodeServiceList, *QueryMeta, error) { - r := c.c.newRequest("GET", "/v1/catalog/node-services/"+node) - r.setQueryOptions(q) - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out *CatalogNodeServiceList - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// GatewayServices is used to query the services associated with an ingress gateway or terminating gateway. -func (c *Catalog) GatewayServices(gateway string, q *QueryOptions) ([]*GatewayService, *QueryMeta, error) { - r := c.c.newRequest("GET", "/v1/catalog/gateway-services/"+gateway) - r.setQueryOptions(q) - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out []*GatewayService - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -func ParseServiceAddr(addrPort string) (ServiceAddress, error) { - port := 0 - host, portStr, err := net.SplitHostPort(addrPort) - if err == nil { - port, err = strconv.Atoi(portStr) - } - return ServiceAddress{Address: host, Port: port}, err -} diff --git a/vendor/github.com/hashicorp/consul/api/config_entry.go b/vendor/github.com/hashicorp/consul/api/config_entry.go deleted file mode 100644 index ffc18a85ed5..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry.go +++ /dev/null @@ -1,688 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "strconv" - "strings" - "time" - - "github.com/mitchellh/mapstructure" -) - -const ( - ServiceDefaults string = "service-defaults" - ProxyDefaults string = "proxy-defaults" - ServiceRouter string = "service-router" - ServiceSplitter string = "service-splitter" - ServiceResolver string = "service-resolver" - IngressGateway string = "ingress-gateway" - TerminatingGateway string = "terminating-gateway" - ServiceIntentions string = "service-intentions" - MeshConfig string = "mesh" - ExportedServices string = "exported-services" - SamenessGroup string = "sameness-group" - RateLimitIPConfig string = "control-plane-request-limit" - - ProxyConfigGlobal string = "global" - MeshConfigMesh string = "mesh" - APIGateway string = "api-gateway" - TCPRoute string = "tcp-route" - InlineCertificate string = "inline-certificate" - HTTPRoute string = "http-route" - JWTProvider string = "jwt-provider" -) - -const ( - BuiltinAWSLambdaExtension string = "builtin/aws/lambda" - BuiltinExtAuthzExtension string = "builtin/ext-authz" - BuiltinLuaExtension string = "builtin/lua" - BuiltinOTELAccessLoggingExtension string = "builtin/otel-access-logging" - BuiltinPropertyOverrideExtension string = "builtin/property-override" - BuiltinWasmExtension string = "builtin/wasm" - // BuiltinValidateExtension should not be exposed directly or accepted as a valid configured - // extension type, as it is only used indirectly via troubleshooting tools. It is included here - // for common reference alongside other builtin extensions. - BuiltinValidateExtension string = "builtin/proxy/validate" -) - -type ConfigEntry interface { - GetKind() string - GetName() string - GetPartition() string - GetNamespace() string - GetMeta() map[string]string - GetCreateIndex() uint64 - GetModifyIndex() uint64 -} - -type MeshGatewayMode string - -const ( - // MeshGatewayModeDefault represents no specific mode and should - // be used to indicate that a different layer of the configuration - // chain should take precedence - MeshGatewayModeDefault MeshGatewayMode = "" - - // MeshGatewayModeNone represents that the Upstream Connect connections - // should be direct and not flow through a mesh gateway. - MeshGatewayModeNone MeshGatewayMode = "none" - - // MeshGatewayModeLocal represents that the Upstream Connect connections - // should be made to a mesh gateway in the local datacenter. - MeshGatewayModeLocal MeshGatewayMode = "local" - - // MeshGatewayModeRemote represents that the Upstream Connect connections - // should be made to a mesh gateway in a remote datacenter. - MeshGatewayModeRemote MeshGatewayMode = "remote" -) - -// MeshGatewayConfig controls how Mesh Gateways are used for upstream Connect -// services -type MeshGatewayConfig struct { - // Mode is the mode that should be used for the upstream connection. - Mode MeshGatewayMode `json:",omitempty"` -} - -type ProxyMode string - -const ( - // ProxyModeDefault represents no specific mode and should - // be used to indicate that a different layer of the configuration - // chain should take precedence - ProxyModeDefault ProxyMode = "" - - // ProxyModeTransparent represents that inbound and outbound application - // traffic is being captured and redirected through the proxy. - ProxyModeTransparent ProxyMode = "transparent" - - // ProxyModeDirect represents that the proxy's listeners must be dialed directly - // by the local application and other proxies. - ProxyModeDirect ProxyMode = "direct" -) - -type TransparentProxyConfig struct { - // The port of the listener where outbound application traffic is being redirected to. - OutboundListenerPort int `json:",omitempty" alias:"outbound_listener_port"` - - // DialedDirectly indicates whether transparent proxies can dial this proxy instance directly. - // The discovery chain is not considered when dialing a service instance directly. - // This setting is useful when addressing stateful services, such as a database cluster with a leader node. - DialedDirectly bool `json:",omitempty" alias:"dialed_directly"` -} - -type MutualTLSMode string - -const ( - // MutualTLSModeDefault represents no specific mode and should - // be used to indicate that a different layer of the configuration - // chain should take precedence. - MutualTLSModeDefault MutualTLSMode = "" - - // MutualTLSModeStrict requires mTLS for incoming traffic. - MutualTLSModeStrict MutualTLSMode = "strict" - - // MutualTLSModePermissive allows incoming non-mTLS traffic. - MutualTLSModePermissive MutualTLSMode = "permissive" -) - -// ExposeConfig describes HTTP paths to expose through Envoy outside of Connect. -// Users can expose individual paths and/or all HTTP/GRPC paths for checks. -type ExposeConfig struct { - // Checks defines whether paths associated with Consul checks will be exposed. - // This flag triggers exposing all HTTP and GRPC check paths registered for the service. - Checks bool `json:",omitempty"` - - // Paths is the list of paths exposed through the proxy. - Paths []ExposePath `json:",omitempty"` -} - -// EnvoyExtension has configuration for an extension that patches Envoy resources. -type EnvoyExtension struct { - Name string - Required bool - Arguments map[string]interface{} `bexpr:"-"` - ConsulVersion string - EnvoyVersion string -} - -type ExposePath struct { - // ListenerPort defines the port of the proxy's listener for exposed paths. - ListenerPort int `json:",omitempty" alias:"listener_port"` - - // Path is the path to expose through the proxy, ie. "/metrics." - Path string `json:",omitempty"` - - // LocalPathPort is the port that the service is listening on for the given path. - LocalPathPort int `json:",omitempty" alias:"local_path_port"` - - // Protocol describes the upstream's service protocol. - // Valid values are "http" and "http2", defaults to "http" - Protocol string `json:",omitempty"` - - // ParsedFromCheck is set if this path was parsed from a registered check - ParsedFromCheck bool -} - -type LogSinkType string - -const ( - DefaultLogSinkType LogSinkType = "" - FileLogSinkType LogSinkType = "file" - StdErrLogSinkType LogSinkType = "stderr" - StdOutLogSinkType LogSinkType = "stdout" -) - -// AccessLogsConfig contains the associated default settings for all Envoy instances within the datacenter or partition -type AccessLogsConfig struct { - // Enabled turns off all access logging - Enabled bool `json:",omitempty" alias:"enabled"` - - // DisableListenerLogs turns off just listener logs for connections rejected by Envoy because they don't - // have a matching listener filter. - DisableListenerLogs bool `json:",omitempty" alias:"disable_listener_logs"` - - // Type selects the output for logs: "file", "stderr". "stdout" - Type LogSinkType `json:",omitempty" alias:"type"` - - // Path is the output file to write logs - Path string `json:",omitempty" alias:"path"` - - // The presence of one format string or the other implies the access log string encoding. - // Defining Both is invalid. - JSONFormat string `json:",omitempty" alias:"json_format"` - TextFormat string `json:",omitempty" alias:"text_format"` -} - -type UpstreamConfiguration struct { - // Overrides is a slice of per-service configuration. The name field is - // required. - Overrides []*UpstreamConfig `json:",omitempty"` - - // Defaults contains default configuration for all upstreams of a given - // service. The name field must be empty. - Defaults *UpstreamConfig `json:",omitempty"` -} - -type UpstreamConfig struct { - // Name is only accepted within service-defaults.upstreamConfig.overrides . - Name string `json:",omitempty"` - - // Partition is only accepted within service-defaults.upstreamConfig.overrides . - Partition string `json:",omitempty"` - - // Namespace is only accepted within service-defaults.upstreamConfig.overrides . - Namespace string `json:",omitempty"` - - // Peer is only accepted within service-defaults.upstreamConfig.overrides . - Peer string `json:",omitempty"` - - // EnvoyListenerJSON is a complete override ("escape hatch") for the upstream's - // listener. - // - // Note: This escape hatch is NOT compatible with the discovery chain and - // will be ignored if a discovery chain is active. - EnvoyListenerJSON string `json:",omitempty" alias:"envoy_listener_json"` - - // EnvoyClusterJSON is a complete override ("escape hatch") for the upstream's - // cluster. The Connect client TLS certificate and context will be injected - // overriding any TLS settings present. - // - // Note: This escape hatch is NOT compatible with the discovery chain and - // will be ignored if a discovery chain is active. - EnvoyClusterJSON string `json:",omitempty" alias:"envoy_cluster_json"` - - // Protocol describes the upstream's service protocol. Valid values are "tcp", - // "http" and "grpc". Anything else is treated as tcp. The enables protocol - // aware features like per-request metrics and connection pooling, tracing, - // routing etc. - Protocol string `json:",omitempty"` - - // ConnectTimeoutMs is the number of milliseconds to timeout making a new - // connection to this upstream. Defaults to 5000 (5 seconds) if not set. - ConnectTimeoutMs int `json:",omitempty" alias:"connect_timeout_ms"` - - // Limits are the set of limits that are applied to the proxy for a specific upstream of a - // service instance. - Limits *UpstreamLimits `json:",omitempty"` - - // PassiveHealthCheck configuration determines how upstream proxy instances will - // be monitored for removal from the load balancing pool. - PassiveHealthCheck *PassiveHealthCheck `json:",omitempty" alias:"passive_health_check"` - - // MeshGatewayConfig controls how Mesh Gateways are configured and used - MeshGateway MeshGatewayConfig `json:",omitempty" alias:"mesh_gateway" ` - - // BalanceOutboundConnections indicates that the proxy should attempt to evenly distribute - // outbound connections across worker threads. Only used by envoy proxies. - BalanceOutboundConnections string `json:",omitempty" alias:"balance_outbound_connections"` -} - -// DestinationConfig represents a virtual service, i.e. one that is external to Consul -type DestinationConfig struct { - // Addresses of the endpoint; hostname or IP - Addresses []string `json:",omitempty"` - - // Port allowed within this endpoint - Port int `json:",omitempty"` -} - -type PassiveHealthCheck struct { - // Interval between health check analysis sweeps. Each sweep may remove - // hosts or return hosts to the pool. - Interval time.Duration `json:",omitempty"` - - // MaxFailures is the count of consecutive failures that results in a host - // being removed from the pool. - MaxFailures uint32 `alias:"max_failures"` - - // EnforcingConsecutive5xx is the % chance that a host will be actually ejected - // when an outlier status is detected through consecutive 5xx. - // This setting can be used to disable ejection or to ramp it up slowly. - EnforcingConsecutive5xx *uint32 `json:",omitempty" alias:"enforcing_consecutive_5xx"` - - // The maximum % of an upstream cluster that can be ejected due to outlier detection. - // Defaults to 10% but will eject at least one host regardless of the value. - MaxEjectionPercent *uint32 `json:",omitempty" alias:"max_ejection_percent"` - - // The base time that a host is ejected for. The real time is equal to the base time - // multiplied by the number of times the host has been ejected and is capped by - // max_ejection_time (Default 300s). Defaults to 30000ms or 30s. - BaseEjectionTime *time.Duration `json:",omitempty" alias:"base_ejection_time"` -} - -// UpstreamLimits describes the limits that are associated with a specific -// upstream of a service instance. -type UpstreamLimits struct { - // MaxConnections is the maximum number of connections the local proxy can - // make to the upstream service. - MaxConnections *int `alias:"max_connections"` - - // MaxPendingRequests is the maximum number of requests that will be queued - // waiting for an available connection. This is mostly applicable to HTTP/1.1 - // clusters since all HTTP/2 requests are streamed over a single - // connection. - MaxPendingRequests *int `alias:"max_pending_requests"` - - // MaxConcurrentRequests is the maximum number of in-flight requests that will be allowed - // to the upstream cluster at a point in time. This is mostly applicable to HTTP/2 - // clusters since all HTTP/1.1 requests are limited by MaxConnections. - MaxConcurrentRequests *int `alias:"max_concurrent_requests"` -} - -// RateLimits is rate limiting configuration that is applied to -// inbound traffic for a service. -// Rate limiting is a Consul enterprise feature. -type RateLimits struct { - InstanceLevel InstanceLevelRateLimits `alias:"instance_level"` -} - -// InstanceLevelRateLimits represents rate limit configuration -// that are applied per service instance. -type InstanceLevelRateLimits struct { - // RequestsPerSecond is the average number of requests per second that can be - // made without being throttled. This field is required if RequestsMaxBurst - // is set. The allowed number of requests may exceed RequestsPerSecond up to - // the value specified in RequestsMaxBurst. - // - // Internally, this is the refill rate of the token bucket used for rate limiting. - RequestsPerSecond int `alias:"requests_per_second"` - - // RequestsMaxBurst is the maximum number of requests that can be sent - // in a burst. Should be equal to or greater than RequestsPerSecond. - // If unset, defaults to RequestsPerSecond. - // - // Internally, this is the maximum size of the token bucket used for rate limiting. - RequestsMaxBurst int `alias:"requests_max_burst"` - - // Routes is a list of rate limits applied to specific routes. - // For a given request, the first matching route will be applied, if any - // Overrides any top-level configuration. - Routes []InstanceLevelRouteRateLimits -} - -// InstanceLevelRouteRateLimits represents rate limit configuration -// applied to a route matching one of PathExact/PathPrefix/PathRegex. -type InstanceLevelRouteRateLimits struct { - PathExact string `alias:"path_exact"` - PathPrefix string `alias:"path_prefix"` - PathRegex string `alias:"path_regex"` - - RequestsPerSecond int `alias:"requests_per_second"` - RequestsMaxBurst int `alias:"requests_max_burst"` -} - -type ServiceConfigEntry struct { - Kind string - Name string - Partition string `json:",omitempty"` - Namespace string `json:",omitempty"` - Protocol string `json:",omitempty"` - Mode ProxyMode `json:",omitempty"` - TransparentProxy *TransparentProxyConfig `json:",omitempty" alias:"transparent_proxy"` - MutualTLSMode MutualTLSMode `json:",omitempty" alias:"mutual_tls_mode"` - MeshGateway MeshGatewayConfig `json:",omitempty" alias:"mesh_gateway"` - Expose ExposeConfig `json:",omitempty"` - ExternalSNI string `json:",omitempty" alias:"external_sni"` - UpstreamConfig *UpstreamConfiguration `json:",omitempty" alias:"upstream_config"` - Destination *DestinationConfig `json:",omitempty"` - MaxInboundConnections int `json:",omitempty" alias:"max_inbound_connections"` - LocalConnectTimeoutMs int `json:",omitempty" alias:"local_connect_timeout_ms"` - LocalRequestTimeoutMs int `json:",omitempty" alias:"local_request_timeout_ms"` - BalanceInboundConnections string `json:",omitempty" alias:"balance_inbound_connections"` - RateLimits *RateLimits `json:",omitempty" alias:"rate_limits"` - EnvoyExtensions []EnvoyExtension `json:",omitempty" alias:"envoy_extensions"` - Meta map[string]string `json:",omitempty"` - CreateIndex uint64 - ModifyIndex uint64 -} - -func (s *ServiceConfigEntry) GetKind() string { return s.Kind } -func (s *ServiceConfigEntry) GetName() string { return s.Name } -func (s *ServiceConfigEntry) GetPartition() string { return s.Partition } -func (s *ServiceConfigEntry) GetNamespace() string { return s.Namespace } -func (s *ServiceConfigEntry) GetMeta() map[string]string { return s.Meta } -func (s *ServiceConfigEntry) GetCreateIndex() uint64 { return s.CreateIndex } -func (s *ServiceConfigEntry) GetModifyIndex() uint64 { return s.ModifyIndex } - -type ProxyConfigEntry struct { - Kind string - Name string - Partition string `json:",omitempty"` - Namespace string `json:",omitempty"` - Mode ProxyMode `json:",omitempty"` - TransparentProxy *TransparentProxyConfig `json:",omitempty" alias:"transparent_proxy"` - MutualTLSMode MutualTLSMode `json:",omitempty" alias:"mutual_tls_mode"` - Config map[string]interface{} `json:",omitempty"` - MeshGateway MeshGatewayConfig `json:",omitempty" alias:"mesh_gateway"` - Expose ExposeConfig `json:",omitempty"` - AccessLogs *AccessLogsConfig `json:",omitempty" alias:"access_logs"` - EnvoyExtensions []EnvoyExtension `json:",omitempty" alias:"envoy_extensions"` - FailoverPolicy *ServiceResolverFailoverPolicy `json:",omitempty" alias:"failover_policy"` - PrioritizeByLocality *ServiceResolverPrioritizeByLocality `json:",omitempty" alias:"prioritize_by_locality"` - - Meta map[string]string `json:",omitempty"` - CreateIndex uint64 - ModifyIndex uint64 -} - -func (p *ProxyConfigEntry) GetKind() string { return p.Kind } -func (p *ProxyConfigEntry) GetName() string { return ProxyConfigGlobal } -func (p *ProxyConfigEntry) GetPartition() string { return p.Partition } -func (p *ProxyConfigEntry) GetNamespace() string { return p.Namespace } -func (p *ProxyConfigEntry) GetMeta() map[string]string { return p.Meta } -func (p *ProxyConfigEntry) GetCreateIndex() uint64 { return p.CreateIndex } -func (p *ProxyConfigEntry) GetModifyIndex() uint64 { return p.ModifyIndex } - -func makeConfigEntry(kind, name string) (ConfigEntry, error) { - switch kind { - case ServiceDefaults: - return &ServiceConfigEntry{Kind: kind, Name: name}, nil - case ProxyDefaults: - return &ProxyConfigEntry{Kind: kind, Name: name}, nil - case ServiceRouter: - return &ServiceRouterConfigEntry{Kind: kind, Name: name}, nil - case ServiceSplitter: - return &ServiceSplitterConfigEntry{Kind: kind, Name: name}, nil - case ServiceResolver: - return &ServiceResolverConfigEntry{Kind: kind, Name: name}, nil - case IngressGateway: - return &IngressGatewayConfigEntry{Kind: kind, Name: name}, nil - case TerminatingGateway: - return &TerminatingGatewayConfigEntry{Kind: kind, Name: name}, nil - case ServiceIntentions: - return &ServiceIntentionsConfigEntry{Kind: kind, Name: name}, nil - case MeshConfig: - return &MeshConfigEntry{}, nil - case ExportedServices: - return &ExportedServicesConfigEntry{Name: name}, nil - case SamenessGroup: - return &SamenessGroupConfigEntry{Kind: kind, Name: name}, nil - case APIGateway: - return &APIGatewayConfigEntry{Kind: kind, Name: name}, nil - case TCPRoute: - return &TCPRouteConfigEntry{Kind: kind, Name: name}, nil - case InlineCertificate: - return &InlineCertificateConfigEntry{Kind: kind, Name: name}, nil - case HTTPRoute: - return &HTTPRouteConfigEntry{Kind: kind, Name: name}, nil - case RateLimitIPConfig: - return &RateLimitIPConfigEntry{Kind: kind, Name: name}, nil - case JWTProvider: - return &JWTProviderConfigEntry{Kind: kind, Name: name}, nil - default: - return nil, fmt.Errorf("invalid config entry kind: %s", kind) - } -} - -func MakeConfigEntry(kind, name string) (ConfigEntry, error) { - return makeConfigEntry(kind, name) -} - -// DecodeConfigEntry will decode the result of using json.Unmarshal of a config -// entry into a map[string]interface{}. -// -// Important caveats: -// -// - This will NOT work if the map[string]interface{} was produced using HCL -// decoding as that requires more extensive parsing to work around the issues -// with map[string][]interface{} that arise. -// -// - This will only decode fields using their camel case json field -// representations. -func DecodeConfigEntry(raw map[string]interface{}) (ConfigEntry, error) { - var entry ConfigEntry - - kindVal, ok := raw["Kind"] - if !ok { - kindVal, ok = raw["kind"] - } - if !ok { - return nil, fmt.Errorf("Payload does not contain a kind/Kind key at the top level") - } - - if kindStr, ok := kindVal.(string); ok { - newEntry, err := makeConfigEntry(kindStr, "") - if err != nil { - return nil, err - } - entry = newEntry - } else { - return nil, fmt.Errorf("Kind value in payload is not a string") - } - - decodeConf := &mapstructure.DecoderConfig{ - DecodeHook: mapstructure.ComposeDecodeHookFunc( - mapstructure.StringToTimeDurationHookFunc(), - mapstructure.StringToTimeHookFunc(time.RFC3339), - ), - Result: &entry, - WeaklyTypedInput: true, - } - - decoder, err := mapstructure.NewDecoder(decodeConf) - if err != nil { - return nil, err - } - - return entry, decoder.Decode(raw) -} - -func DecodeConfigEntryFromJSON(data []byte) (ConfigEntry, error) { - var raw map[string]interface{} - if err := json.Unmarshal(data, &raw); err != nil { - return nil, err - } - - return DecodeConfigEntry(raw) -} - -func decodeConfigEntrySlice(raw []map[string]interface{}) ([]ConfigEntry, error) { - var entries []ConfigEntry - for _, rawEntry := range raw { - entry, err := DecodeConfigEntry(rawEntry) - if err != nil { - return nil, err - } - entries = append(entries, entry) - } - return entries, nil -} - -// ConfigEntries can be used to query the Config endpoints -type ConfigEntries struct { - c *Client -} - -// Config returns a handle to the Config endpoints -func (c *Client) ConfigEntries() *ConfigEntries { - return &ConfigEntries{c} -} - -func (conf *ConfigEntries) Get(kind string, name string, q *QueryOptions) (ConfigEntry, *QueryMeta, error) { - if kind == "" || name == "" { - return nil, nil, fmt.Errorf("Both kind and name parameters must not be empty") - } - - entry, err := makeConfigEntry(kind, name) - if err != nil { - return nil, nil, err - } - - r := conf.c.newRequest("GET", fmt.Sprintf("/v1/config/%s/%s", kind, name)) - r.setQueryOptions(q) - rtt, resp, err := conf.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if err := decodeBody(resp, entry); err != nil { - return nil, nil, err - } - - return entry, qm, nil -} - -func (conf *ConfigEntries) List(kind string, q *QueryOptions) ([]ConfigEntry, *QueryMeta, error) { - if kind == "" { - return nil, nil, fmt.Errorf("The kind parameter must not be empty") - } - - r := conf.c.newRequest("GET", fmt.Sprintf("/v1/config/%s", kind)) - r.setQueryOptions(q) - rtt, resp, err := conf.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var raw []map[string]interface{} - if err := decodeBody(resp, &raw); err != nil { - return nil, nil, err - } - - entries, err := decodeConfigEntrySlice(raw) - if err != nil { - return nil, nil, err - } - - return entries, qm, nil -} - -func (conf *ConfigEntries) Set(entry ConfigEntry, w *WriteOptions) (bool, *WriteMeta, error) { - return conf.set(entry, nil, w) -} - -func (conf *ConfigEntries) CAS(entry ConfigEntry, index uint64, w *WriteOptions) (bool, *WriteMeta, error) { - return conf.set(entry, map[string]string{"cas": strconv.FormatUint(index, 10)}, w) -} - -func (conf *ConfigEntries) set(entry ConfigEntry, params map[string]string, w *WriteOptions) (bool, *WriteMeta, error) { - r := conf.c.newRequest("PUT", "/v1/config") - r.setWriteOptions(w) - for param, value := range params { - r.params.Set(param, value) - } - r.obj = entry - rtt, resp, err := conf.c.doRequest(r) - if err != nil { - return false, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return false, nil, err - } - - var buf bytes.Buffer - if _, err := io.Copy(&buf, resp.Body); err != nil { - return false, nil, fmt.Errorf("Failed to read response: %v", err) - } - res := strings.Contains(buf.String(), "true") - - wm := &WriteMeta{RequestTime: rtt} - return res, wm, nil -} - -func (conf *ConfigEntries) Delete(kind string, name string, w *WriteOptions) (*WriteMeta, error) { - _, wm, err := conf.delete(kind, name, nil, w) - return wm, err -} - -// DeleteCAS performs a Check-And-Set deletion of the given config entry, and -// returns true if it was successful. If the provided index no longer matches -// the entry's ModifyIndex (i.e. it was modified by another process) then the -// operation will fail and return false. -func (conf *ConfigEntries) DeleteCAS(kind, name string, index uint64, w *WriteOptions) (bool, *WriteMeta, error) { - return conf.delete(kind, name, map[string]string{"cas": strconv.FormatUint(index, 10)}, w) -} - -func (conf *ConfigEntries) delete(kind, name string, params map[string]string, w *WriteOptions) (bool, *WriteMeta, error) { - if kind == "" || name == "" { - return false, nil, fmt.Errorf("Both kind and name parameters must not be empty") - } - - r := conf.c.newRequest("DELETE", fmt.Sprintf("/v1/config/%s/%s", kind, name)) - r.setWriteOptions(w) - for param, value := range params { - r.params.Set(param, value) - } - - rtt, resp, err := conf.c.doRequest(r) - if err != nil { - return false, nil, err - } - defer closeResponseBody(resp) - - if err := requireOK(resp); err != nil { - return false, nil, err - } - - var buf bytes.Buffer - if _, err := io.Copy(&buf, resp.Body); err != nil { - return false, nil, fmt.Errorf("Failed to read response: %v", err) - } - - res := strings.Contains(buf.String(), "true") - wm := &WriteMeta{RequestTime: rtt} - return res, wm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_discoverychain.go b/vendor/github.com/hashicorp/consul/api/config_entry_discoverychain.go deleted file mode 100644 index 572d9d2d5e4..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry_discoverychain.go +++ /dev/null @@ -1,385 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "time" - - "github.com/hashicorp/go-multierror" -) - -type ServiceRouterConfigEntry struct { - Kind string - Name string - Partition string `json:",omitempty"` - Namespace string `json:",omitempty"` - - Routes []ServiceRoute `json:",omitempty"` - - Meta map[string]string `json:",omitempty"` - CreateIndex uint64 - ModifyIndex uint64 -} - -func (e *ServiceRouterConfigEntry) GetKind() string { return e.Kind } -func (e *ServiceRouterConfigEntry) GetName() string { return e.Name } -func (e *ServiceRouterConfigEntry) GetPartition() string { return e.Partition } -func (e *ServiceRouterConfigEntry) GetNamespace() string { return e.Namespace } -func (e *ServiceRouterConfigEntry) GetMeta() map[string]string { return e.Meta } -func (e *ServiceRouterConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex } -func (e *ServiceRouterConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex } - -type ServiceRoute struct { - Match *ServiceRouteMatch `json:",omitempty"` - Destination *ServiceRouteDestination `json:",omitempty"` -} - -type ServiceRouteMatch struct { - HTTP *ServiceRouteHTTPMatch `json:",omitempty"` -} - -type ServiceRouteHTTPMatch struct { - PathExact string `json:",omitempty" alias:"path_exact"` - PathPrefix string `json:",omitempty" alias:"path_prefix"` - PathRegex string `json:",omitempty" alias:"path_regex"` - CaseInsensitive bool `json:",omitempty" alias:"case_insensitive"` - - Header []ServiceRouteHTTPMatchHeader `json:",omitempty"` - QueryParam []ServiceRouteHTTPMatchQueryParam `json:",omitempty" alias:"query_param"` - Methods []string `json:",omitempty"` -} - -type ServiceRouteHTTPMatchHeader struct { - Name string - Present bool `json:",omitempty"` - Exact string `json:",omitempty"` - Prefix string `json:",omitempty"` - Suffix string `json:",omitempty"` - Regex string `json:",omitempty"` - Invert bool `json:",omitempty"` -} - -type ServiceRouteHTTPMatchQueryParam struct { - Name string - Present bool `json:",omitempty"` - Exact string `json:",omitempty"` - Regex string `json:",omitempty"` -} - -type ServiceRouteDestination struct { - Service string `json:",omitempty"` - ServiceSubset string `json:",omitempty" alias:"service_subset"` - Namespace string `json:",omitempty"` - Partition string `json:",omitempty"` - PrefixRewrite string `json:",omitempty" alias:"prefix_rewrite"` - RequestTimeout time.Duration `json:",omitempty" alias:"request_timeout"` - IdleTimeout time.Duration `json:",omitempty" alias:"idle_timeout"` - NumRetries uint32 `json:",omitempty" alias:"num_retries"` - RetryOnConnectFailure bool `json:",omitempty" alias:"retry_on_connect_failure"` - RetryOnStatusCodes []uint32 `json:",omitempty" alias:"retry_on_status_codes"` - RetryOn []string `json:",omitempty" alias:"retry_on"` - RequestHeaders *HTTPHeaderModifiers `json:",omitempty" alias:"request_headers"` - ResponseHeaders *HTTPHeaderModifiers `json:",omitempty" alias:"response_headers"` -} - -func (e *ServiceRouteDestination) MarshalJSON() ([]byte, error) { - type Alias ServiceRouteDestination - exported := &struct { - RequestTimeout string `json:",omitempty"` - IdleTimeout string `json:",omitempty"` - *Alias - }{ - RequestTimeout: e.RequestTimeout.String(), - IdleTimeout: e.IdleTimeout.String(), - Alias: (*Alias)(e), - } - if e.RequestTimeout == 0 { - exported.RequestTimeout = "" - } - if e.IdleTimeout == 0 { - exported.IdleTimeout = "" - } - - return json.Marshal(exported) -} - -func (e *ServiceRouteDestination) UnmarshalJSON(data []byte) error { - type Alias ServiceRouteDestination - aux := &struct { - RequestTimeout string - IdleTimeout string - *Alias - }{ - Alias: (*Alias)(e), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - var err error - if aux.RequestTimeout != "" { - if e.RequestTimeout, err = time.ParseDuration(aux.RequestTimeout); err != nil { - return err - } - } - if aux.IdleTimeout != "" { - if e.IdleTimeout, err = time.ParseDuration(aux.IdleTimeout); err != nil { - return err - } - } - return nil -} - -type ServiceSplitterConfigEntry struct { - Kind string - Name string - Partition string `json:",omitempty"` - Namespace string `json:",omitempty"` - - Splits []ServiceSplit `json:",omitempty"` - - Meta map[string]string `json:",omitempty"` - CreateIndex uint64 - ModifyIndex uint64 -} - -func (e *ServiceSplitterConfigEntry) GetKind() string { return e.Kind } -func (e *ServiceSplitterConfigEntry) GetName() string { return e.Name } -func (e *ServiceSplitterConfigEntry) GetPartition() string { return e.Partition } -func (e *ServiceSplitterConfigEntry) GetNamespace() string { return e.Namespace } -func (e *ServiceSplitterConfigEntry) GetMeta() map[string]string { return e.Meta } -func (e *ServiceSplitterConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex } -func (e *ServiceSplitterConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex } - -type ServiceSplit struct { - Weight float32 - Service string `json:",omitempty"` - ServiceSubset string `json:",omitempty" alias:"service_subset"` - Namespace string `json:",omitempty"` - Partition string `json:",omitempty"` - RequestHeaders *HTTPHeaderModifiers `json:",omitempty" alias:"request_headers"` - ResponseHeaders *HTTPHeaderModifiers `json:",omitempty" alias:"response_headers"` -} - -type ServiceResolverConfigEntry struct { - Kind string - Name string - Partition string `json:",omitempty"` - Namespace string `json:",omitempty"` - - DefaultSubset string `json:",omitempty" alias:"default_subset"` - Subsets map[string]ServiceResolverSubset `json:",omitempty"` - Redirect *ServiceResolverRedirect `json:",omitempty"` - Failover map[string]ServiceResolverFailover `json:",omitempty"` - ConnectTimeout time.Duration `json:",omitempty" alias:"connect_timeout"` - RequestTimeout time.Duration `json:",omitempty" alias:"request_timeout"` - - // PrioritizeByLocality controls whether the locality of services within the - // local partition will be used to prioritize connectivity. - PrioritizeByLocality *ServiceResolverPrioritizeByLocality `json:",omitempty" alias:"prioritize_by_locality"` - - // LoadBalancer determines the load balancing policy and configuration for services - // issuing requests to this upstream service. - LoadBalancer *LoadBalancer `json:",omitempty" alias:"load_balancer"` - - Meta map[string]string `json:",omitempty"` - CreateIndex uint64 - ModifyIndex uint64 -} - -func (e *ServiceResolverConfigEntry) MarshalJSON() ([]byte, error) { - type Alias ServiceResolverConfigEntry - exported := &struct { - ConnectTimeout string `json:",omitempty"` - RequestTimeout string `json:",omitempty"` - *Alias - }{ - ConnectTimeout: e.ConnectTimeout.String(), - RequestTimeout: e.RequestTimeout.String(), - Alias: (*Alias)(e), - } - if e.ConnectTimeout == 0 { - exported.ConnectTimeout = "" - } - if e.RequestTimeout == 0 { - exported.RequestTimeout = "" - } - - return json.Marshal(exported) -} - -func (e *ServiceResolverConfigEntry) UnmarshalJSON(data []byte) error { - type Alias ServiceResolverConfigEntry - aux := &struct { - ConnectTimeout string - RequestTimeout string - *Alias - }{ - Alias: (*Alias)(e), - } - var err error - if err = json.Unmarshal(data, &aux); err != nil { - return err - } - var merr *multierror.Error - if aux.ConnectTimeout != "" { - if e.ConnectTimeout, err = time.ParseDuration(aux.ConnectTimeout); err != nil { - merr = multierror.Append(merr, err) - } - } - if aux.RequestTimeout != "" { - if e.RequestTimeout, err = time.ParseDuration(aux.RequestTimeout); err != nil { - merr = multierror.Append(merr, err) - } - } - return merr.ErrorOrNil() -} - -func (e *ServiceResolverConfigEntry) GetKind() string { return e.Kind } -func (e *ServiceResolverConfigEntry) GetName() string { return e.Name } -func (e *ServiceResolverConfigEntry) GetPartition() string { return e.Partition } -func (e *ServiceResolverConfigEntry) GetNamespace() string { return e.Namespace } -func (e *ServiceResolverConfigEntry) GetMeta() map[string]string { return e.Meta } -func (e *ServiceResolverConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex } -func (e *ServiceResolverConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex } - -type ServiceResolverSubset struct { - Filter string `json:",omitempty"` - OnlyPassing bool `json:",omitempty" alias:"only_passing"` -} - -type ServiceResolverRedirect struct { - Service string `json:",omitempty"` - ServiceSubset string `json:",omitempty" alias:"service_subset"` - Namespace string `json:",omitempty"` - Partition string `json:",omitempty"` - Datacenter string `json:",omitempty"` - Peer string `json:",omitempty"` - SamenessGroup string `json:",omitempty" alias:"sameness_group"` -} - -type ServiceResolverFailover struct { - Service string `json:",omitempty"` - ServiceSubset string `json:",omitempty" alias:"service_subset"` - // Referencing other partitions is not supported. - Namespace string `json:",omitempty"` - Datacenters []string `json:",omitempty"` - Targets []ServiceResolverFailoverTarget `json:",omitempty"` - Policy *ServiceResolverFailoverPolicy `json:",omitempty"` - SamenessGroup string `json:",omitempty" alias:"sameness_group"` -} - -type ServiceResolverFailoverTarget struct { - Service string `json:",omitempty"` - ServiceSubset string `json:",omitempty" alias:"service_subset"` - Partition string `json:",omitempty"` - Namespace string `json:",omitempty"` - Datacenter string `json:",omitempty"` - Peer string `json:",omitempty"` -} - -type ServiceResolverFailoverPolicy struct { - // Mode specifies the type of failover that will be performed. Valid values are - // "sequential", "" (equivalent to "sequential") and "order-by-locality". - Mode string `json:",omitempty"` - Regions []string `json:",omitempty"` -} - -type ServiceResolverPrioritizeByLocality struct { - // Mode specifies the type of prioritization that will be performed - // when selecting nodes in the local partition. - // Valid values are: "" (default "none"), "none", and "failover". - Mode string `json:",omitempty"` -} - -// LoadBalancer determines the load balancing policy and configuration for services -// issuing requests to this upstream service. -type LoadBalancer struct { - // Policy is the load balancing policy used to select a host - Policy string `json:",omitempty"` - - // RingHashConfig contains configuration for the "ring_hash" policy type - RingHashConfig *RingHashConfig `json:",omitempty" alias:"ring_hash_config"` - - // LeastRequestConfig contains configuration for the "least_request" policy type - LeastRequestConfig *LeastRequestConfig `json:",omitempty" alias:"least_request_config"` - - // HashPolicies is a list of hash policies to use for hashing load balancing algorithms. - // Hash policies are evaluated individually and combined such that identical lists - // result in the same hash. - // If no hash policies are present, or none are successfully evaluated, - // then a random backend host will be selected. - HashPolicies []HashPolicy `json:",omitempty" alias:"hash_policies"` -} - -// RingHashConfig contains configuration for the "ring_hash" policy type -type RingHashConfig struct { - // MinimumRingSize determines the minimum number of entries in the hash ring - MinimumRingSize uint64 `json:",omitempty" alias:"minimum_ring_size"` - - // MaximumRingSize determines the maximum number of entries in the hash ring - MaximumRingSize uint64 `json:",omitempty" alias:"maximum_ring_size"` -} - -// LeastRequestConfig contains configuration for the "least_request" policy type -type LeastRequestConfig struct { - // ChoiceCount determines the number of random healthy hosts from which to select the one with the least requests. - ChoiceCount uint32 `json:",omitempty" alias:"choice_count"` -} - -// HashPolicy defines which attributes will be hashed by hash-based LB algorithms -type HashPolicy struct { - // Field is the attribute type to hash on. - // Must be one of "header","cookie", or "query_parameter". - // Cannot be specified along with SourceIP. - Field string `json:",omitempty"` - - // FieldValue is the value to hash. - // ie. header name, cookie name, URL query parameter name - // Cannot be specified along with SourceIP. - FieldValue string `json:",omitempty" alias:"field_value"` - - // CookieConfig contains configuration for the "cookie" hash policy type. - CookieConfig *CookieConfig `json:",omitempty" alias:"cookie_config"` - - // SourceIP determines whether the hash should be of the source IP rather than of a field and field value. - // Cannot be specified along with Field or FieldValue. - SourceIP bool `json:",omitempty" alias:"source_ip"` - - // Terminal will short circuit the computation of the hash when multiple hash policies are present. - // If a hash is computed when a Terminal policy is evaluated, - // then that hash will be used and subsequent hash policies will be ignored. - Terminal bool `json:",omitempty"` -} - -// CookieConfig contains configuration for the "cookie" hash policy type. -// This is specified to have Envoy generate a cookie for a client on its first request. -type CookieConfig struct { - // Generates a session cookie with no expiration. - Session bool `json:",omitempty"` - - // TTL for generated cookies. Cannot be specified for session cookies. - TTL time.Duration `json:",omitempty"` - - // The path to set for the cookie - Path string `json:",omitempty"` -} - -// HTTPHeaderModifiers is a set of rules for HTTP header modification that -// should be performed by proxies as the request passes through them. It can -// operate on either request or response headers depending on the context in -// which it is used. -type HTTPHeaderModifiers struct { - // Add is a set of name -> value pairs that should be appended to the request - // or response (i.e. allowing duplicates if the same header already exists). - Add map[string]string `json:",omitempty"` - - // Set is a set of name -> value pairs that should be added to the request or - // response, overwriting any existing header values of the same name. - Set map[string]string `json:",omitempty"` - - // Remove is the set of header names that should be stripped from the request - // or response. - Remove []string `json:",omitempty"` -} diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_exports.go b/vendor/github.com/hashicorp/consul/api/config_entry_exports.go deleted file mode 100644 index b8e9830e652..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry_exports.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" -) - -// ExportedServicesConfigEntry manages the exported services for a single admin partition. -// Admin Partitions are a Consul Enterprise feature. -type ExportedServicesConfigEntry struct { - // Name is the name of the partition the ExportedServicesConfigEntry applies to. - // Partitioning is a Consul Enterprise feature. - Name string `json:",omitempty"` - - // Partition is the partition where the ExportedServicesConfigEntry is stored. - // If the partition does not match the name, the name will overwrite the partition. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Services is a list of services to be exported and the list of partitions - // to expose them to. - Services []ExportedService `json:",omitempty"` - - Meta map[string]string `json:",omitempty"` - - // CreateIndex is the Raft index this entry was created at. This is a - // read-only field. - CreateIndex uint64 - - // ModifyIndex is used for the Check-And-Set operations and can also be fed - // back into the WaitIndex of the QueryOptions in order to perform blocking - // queries. - ModifyIndex uint64 -} - -// ExportedService manages the exporting of a service in the local partition to -// other partitions. -type ExportedService struct { - // Name is the name of the service to be exported. - Name string - - // Namespace is the namespace to export the service from. - Namespace string `json:",omitempty"` - - // Consumers is a list of downstream consumers of the service to be exported. - Consumers []ServiceConsumer `json:",omitempty"` -} - -// ServiceConsumer represents a downstream consumer of the service to be exported. -// At most one of Partition or Peer must be specified. -type ServiceConsumer struct { - // Partition is the admin partition to export the service to. - Partition string `json:",omitempty"` - - // Peer is the name of the peer to export the service to. - Peer string `json:",omitempty" alias:"peer_name"` - - // SamenessGroup is the name of the sameness group to export the service to. - SamenessGroup string `json:",omitempty" alias:"sameness_group"` -} - -func (e *ExportedServicesConfigEntry) GetKind() string { return ExportedServices } -func (e *ExportedServicesConfigEntry) GetName() string { return e.Name } -func (e *ExportedServicesConfigEntry) GetPartition() string { return e.Name } -func (e *ExportedServicesConfigEntry) GetNamespace() string { return "" } -func (e *ExportedServicesConfigEntry) GetMeta() map[string]string { return e.Meta } -func (e *ExportedServicesConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex } -func (e *ExportedServicesConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex } - -// MarshalJSON adds the Kind field so that the JSON can be decoded back into the -// correct type. -func (e *ExportedServicesConfigEntry) MarshalJSON() ([]byte, error) { - type Alias ExportedServicesConfigEntry - source := &struct { - Kind string - *Alias - }{ - Kind: ExportedServices, - Alias: (*Alias)(e), - } - return json.Marshal(source) -} diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_gateways.go b/vendor/github.com/hashicorp/consul/api/config_entry_gateways.go deleted file mode 100644 index baf274e2da0..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry_gateways.go +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// IngressGatewayConfigEntry manages the configuration for an ingress service -// with the given name. -type IngressGatewayConfigEntry struct { - // Kind of the config entry. This should be set to api.IngressGateway. - Kind string - - // Name is used to match the config entry with its associated ingress gateway - // service. This should match the name provided in the service definition. - Name string - - // Partition is the partition the IngressGateway is associated with. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the IngressGateway is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // TLS holds the TLS configuration for this gateway. - TLS GatewayTLSConfig - - // Listeners declares what ports the ingress gateway should listen on, and - // what services to associated to those ports. - Listeners []IngressListener - - Meta map[string]string `json:",omitempty"` - - // Defaults is default configuration for all upstream services - Defaults *IngressServiceConfig `json:",omitempty"` - - // CreateIndex is the Raft index this entry was created at. This is a - // read-only field. - CreateIndex uint64 - - // ModifyIndex is used for the Check-And-Set operations and can also be fed - // back into the WaitIndex of the QueryOptions in order to perform blocking - // queries. - ModifyIndex uint64 -} - -type IngressServiceConfig struct { - MaxConnections *uint32 - MaxPendingRequests *uint32 - MaxConcurrentRequests *uint32 - - // PassiveHealthCheck configuration determines how upstream proxy instances will - // be monitored for removal from the load balancing pool. - PassiveHealthCheck *PassiveHealthCheck `json:",omitempty" alias:"passive_health_check"` -} - -type GatewayTLSConfig struct { - // Indicates that TLS should be enabled for this gateway service. - Enabled bool - - // SDS allows configuring TLS certificate from an SDS service. - SDS *GatewayTLSSDSConfig `json:",omitempty"` - - TLSMinVersion string `json:",omitempty" alias:"tls_min_version"` - TLSMaxVersion string `json:",omitempty" alias:"tls_max_version"` - - // Define a subset of cipher suites to restrict - // Only applicable to connections negotiated via TLS 1.2 or earlier - CipherSuites []string `json:",omitempty" alias:"cipher_suites"` -} - -type GatewayServiceTLSConfig struct { - // SDS allows configuring TLS certificate from an SDS service. - SDS *GatewayTLSSDSConfig `json:",omitempty"` -} - -type GatewayTLSSDSConfig struct { - ClusterName string `json:",omitempty" alias:"cluster_name"` - CertResource string `json:",omitempty" alias:"cert_resource"` -} - -// IngressListener manages the configuration for a listener on a specific port. -type IngressListener struct { - // Port declares the port on which the ingress gateway should listen for traffic. - Port int - - // Protocol declares what type of traffic this listener is expected to - // receive. Depending on the protocol, a listener might support multiplexing - // services over a single port, or additional discovery chain features. The - // current supported values are: (tcp | http | http2 | grpc). - Protocol string - - // Services declares the set of services to which the listener forwards - // traffic. - // - // For "tcp" protocol listeners, only a single service is allowed. - // For "http" listeners, multiple services can be declared. - Services []IngressService - - // TLS allows specifying some TLS configuration per listener. - TLS *GatewayTLSConfig `json:",omitempty"` -} - -// IngressService manages configuration for services that are exposed to -// ingress traffic. -type IngressService struct { - // Name declares the service to which traffic should be forwarded. - // - // This can either be a specific service, or the wildcard specifier, - // "*". If the wildcard specifier is provided, the listener must be of "http" - // protocol and means that the listener will forward traffic to all services. - // - // A name can be specified on multiple listeners, and will be exposed on both - // of the listeners. - Name string - - // Hosts is a list of hostnames which should be associated to this service on - // the defined listener. Only allowed on layer 7 protocols, this will be used - // to route traffic to the service by matching the Host header of the HTTP - // request. - // - // If a host is provided for a service that also has a wildcard specifier - // defined, the host will override the wildcard-specifier-provided - // ".*" domain for that listener. - // - // This cannot be specified when using the wildcard specifier, "*", or when - // using a "tcp" listener. - Hosts []string - - // Namespace is the namespace where the service is located. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // Partition is the partition where the service is located. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // TLS allows specifying some TLS configuration per listener. - TLS *GatewayServiceTLSConfig `json:",omitempty"` - - // Allow HTTP header manipulation to be configured. - RequestHeaders *HTTPHeaderModifiers `json:",omitempty" alias:"request_headers"` - ResponseHeaders *HTTPHeaderModifiers `json:",omitempty" alias:"response_headers"` - - MaxConnections *uint32 `json:",omitempty" alias:"max_connections"` - MaxPendingRequests *uint32 `json:",omitempty" alias:"max_pending_requests"` - MaxConcurrentRequests *uint32 `json:",omitempty" alias:"max_concurrent_requests"` - - // PassiveHealthCheck configuration determines how upstream proxy instances will - // be monitored for removal from the load balancing pool. - PassiveHealthCheck *PassiveHealthCheck `json:",omitempty" alias:"passive_health_check"` -} - -func (i *IngressGatewayConfigEntry) GetKind() string { return i.Kind } -func (i *IngressGatewayConfigEntry) GetName() string { return i.Name } -func (i *IngressGatewayConfigEntry) GetPartition() string { return i.Partition } -func (i *IngressGatewayConfigEntry) GetNamespace() string { return i.Namespace } -func (i *IngressGatewayConfigEntry) GetMeta() map[string]string { return i.Meta } -func (i *IngressGatewayConfigEntry) GetCreateIndex() uint64 { return i.CreateIndex } -func (i *IngressGatewayConfigEntry) GetModifyIndex() uint64 { return i.ModifyIndex } - -// TerminatingGatewayConfigEntry manages the configuration for a terminating gateway -// with the given name. -type TerminatingGatewayConfigEntry struct { - // Kind of the config entry. This should be set to api.TerminatingGateway. - Kind string - - // Name is used to match the config entry with its associated terminating gateway - // service. This should match the name provided in the service definition. - Name string - - // Services is a list of service names represented by the terminating gateway. - Services []LinkedService `json:",omitempty"` - - Meta map[string]string `json:",omitempty"` - - // CreateIndex is the Raft index this entry was created at. This is a - // read-only field. - CreateIndex uint64 - - // ModifyIndex is used for the Check-And-Set operations and can also be fed - // back into the WaitIndex of the QueryOptions in order to perform blocking - // queries. - ModifyIndex uint64 - - // Partition is the partition the config entry is associated with. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the config entry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` -} - -// A LinkedService is a service represented by a terminating gateway -type LinkedService struct { - // Referencing other partitions is not supported. - - // Namespace is where the service is registered. - Namespace string `json:",omitempty"` - - // Name is the name of the service, as defined in Consul's catalog. - Name string `json:",omitempty"` - - // CAFile is the optional path to a CA certificate to use for TLS connections - // from the gateway to the linked service. - CAFile string `json:",omitempty" alias:"ca_file"` - - // CertFile is the optional path to a client certificate to use for TLS connections - // from the gateway to the linked service. - CertFile string `json:",omitempty" alias:"cert_file"` - - // KeyFile is the optional path to a private key to use for TLS connections - // from the gateway to the linked service. - KeyFile string `json:",omitempty" alias:"key_file"` - - // SNI is the optional name to specify during the TLS handshake with a linked service. - SNI string `json:",omitempty"` -} - -func (g *TerminatingGatewayConfigEntry) GetKind() string { return g.Kind } -func (g *TerminatingGatewayConfigEntry) GetName() string { return g.Name } -func (g *TerminatingGatewayConfigEntry) GetPartition() string { return g.Partition } -func (g *TerminatingGatewayConfigEntry) GetNamespace() string { return g.Namespace } -func (g *TerminatingGatewayConfigEntry) GetMeta() map[string]string { return g.Meta } -func (g *TerminatingGatewayConfigEntry) GetCreateIndex() uint64 { return g.CreateIndex } -func (g *TerminatingGatewayConfigEntry) GetModifyIndex() uint64 { return g.ModifyIndex } - -// APIGatewayConfigEntry manages the configuration for an API gateway -// with the given name. -type APIGatewayConfigEntry struct { - // Kind of the config entry. This should be set to api.APIGateway. - Kind string - - // Name is used to match the config entry with its associated api gateway - // service. This should match the name provided in the service definition. - Name string - - Meta map[string]string `json:",omitempty"` - - // Listeners is the set of listener configuration to which an API Gateway - // might bind. - Listeners []APIGatewayListener - // Status is the asynchronous status which an APIGateway propagates to the user. - Status ConfigEntryStatus - - // CreateIndex is the Raft index this entry was created at. This is a - // read-only field. - CreateIndex uint64 - - // ModifyIndex is used for the Check-And-Set operations and can also be fed - // back into the WaitIndex of the QueryOptions in order to perform blocking - // queries. - ModifyIndex uint64 - - // Partition is the partition the config entry is associated with. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the config entry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` -} - -func (g *APIGatewayConfigEntry) GetKind() string { return g.Kind } -func (g *APIGatewayConfigEntry) GetName() string { return g.Name } -func (g *APIGatewayConfigEntry) GetPartition() string { return g.Partition } -func (g *APIGatewayConfigEntry) GetNamespace() string { return g.Namespace } -func (g *APIGatewayConfigEntry) GetMeta() map[string]string { return g.Meta } -func (g *APIGatewayConfigEntry) GetCreateIndex() uint64 { return g.CreateIndex } -func (g *APIGatewayConfigEntry) GetModifyIndex() uint64 { return g.ModifyIndex } - -// APIGatewayListener represents an individual listener for an APIGateway -type APIGatewayListener struct { - // Name is the name of the listener in a given gateway. This must be - // unique within a gateway. - Name string - // Hostname is the host name that a listener should be bound to, if - // unspecified, the listener accepts requests for all hostnames. - Hostname string - // Port is the port at which this listener should bind. - Port int - // Protocol is the protocol that a listener should use, it must - // either be "http" or "tcp" - Protocol string - // TLS is the TLS settings for the listener. - TLS APIGatewayTLSConfiguration - // Override is the policy that overrides all other policy and route specific configuration - Override *APIGatewayPolicy `json:",omitempty"` - // Default is the policy that is the default for the listener and route, routes can override this behavior - Default *APIGatewayPolicy `json:",omitempty"` -} - -// APIGatewayTLSConfiguration specifies the configuration of a listener’s -// TLS settings. -type APIGatewayTLSConfiguration struct { - // Certificates is a set of references to certificates - // that a gateway listener uses for TLS termination. - Certificates []ResourceReference - // MaxVersion is the maximum TLS version that the listener - // should support. - MaxVersion string `json:",omitempty" alias:"tls_max_version"` - // MinVersion is the minimum TLS version that the listener - // should support. - MinVersion string `json:",omitempty" alias:"tls_min_version"` - // Define a subset of cipher suites to restrict - // Only applicable to connections negotiated via TLS 1.2 or earlier - CipherSuites []string `json:",omitempty" alias:"cipher_suites"` -} - -// APIGatewayPolicy holds the policy that configures the gateway listener, this is used in the `Override` and `Default` fields of a listener -type APIGatewayPolicy struct { - // JWT holds the JWT configuration for the Listener - JWT *APIGatewayJWTRequirement `json:",omitempty"` -} - -// APIGatewayJWTRequirement holds the list of JWT providers to be verified against -type APIGatewayJWTRequirement struct { - // Providers is a list of providers to consider when verifying a JWT. - Providers []*APIGatewayJWTProvider `json:",omitempty"` -} - -// APIGatewayJWTProvider holds the provider and claim verification information -type APIGatewayJWTProvider struct { - // Name is the name of the JWT provider. There MUST be a corresponding - // "jwt-provider" config entry with this name. - Name string `json:",omitempty"` - - // VerifyClaims is a list of additional claims to verify in a JWT's payload. - VerifyClaims []*APIGatewayJWTClaimVerification `json:",omitempty" alias:"verify_claims"` -} - -// APIGatewayJWTClaimVerification holds the actual claim information to be verified -type APIGatewayJWTClaimVerification struct { - // Path is the path to the claim in the token JSON. - Path []string `json:",omitempty"` - - // Value is the expected value at the given path: - // - If the type at the path is a list then we verify - // that this value is contained in the list. - // - // - If the type at the path is a string then we verify - // that this value matches. - Value string `json:",omitempty"` -} diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_inline_certificate.go b/vendor/github.com/hashicorp/consul/api/config_entry_inline_certificate.go deleted file mode 100644 index 47a1ead0566..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry_inline_certificate.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// InlineCertificateConfigEntry -- TODO stub -type InlineCertificateConfigEntry struct { - // Kind of the config entry. This should be set to api.InlineCertificate. - Kind string - - // Name is used to match the config entry with its associated tcp-route - // service. This should match the name provided in the service definition. - Name string - - // Certificate is the public certificate component of an x509 key pair encoded in raw PEM format. - Certificate string - // PrivateKey is the private key component of an x509 key pair encoded in raw PEM format. - PrivateKey string `alias:"private_key"` - - Meta map[string]string `json:",omitempty"` - - // CreateIndex is the Raft index this entry was created at. This is a - // read-only field. - CreateIndex uint64 - - // ModifyIndex is used for the Check-And-Set operations and can also be fed - // back into the WaitIndex of the QueryOptions in order to perform blocking - // queries. - ModifyIndex uint64 - - // Partition is the partition the config entry is associated with. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the config entry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` -} - -func (a *InlineCertificateConfigEntry) GetKind() string { return InlineCertificate } -func (a *InlineCertificateConfigEntry) GetName() string { return a.Name } -func (a *InlineCertificateConfigEntry) GetPartition() string { return a.Partition } -func (a *InlineCertificateConfigEntry) GetNamespace() string { return a.Namespace } -func (a *InlineCertificateConfigEntry) GetMeta() map[string]string { return a.Meta } -func (a *InlineCertificateConfigEntry) GetCreateIndex() uint64 { return a.CreateIndex } -func (a *InlineCertificateConfigEntry) GetModifyIndex() uint64 { return a.ModifyIndex } diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_intentions.go b/vendor/github.com/hashicorp/consul/api/config_entry_intentions.go deleted file mode 100644 index 3f03b0875b9..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry_intentions.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import "time" - -type ServiceIntentionsConfigEntry struct { - Kind string - Name string - Partition string `json:",omitempty"` - Namespace string `json:",omitempty"` - - Sources []*SourceIntention - JWT *IntentionJWTRequirement `json:",omitempty"` - - Meta map[string]string `json:",omitempty"` - - CreateIndex uint64 - ModifyIndex uint64 -} - -type SourceIntention struct { - Name string - Peer string `json:",omitempty"` - Partition string `json:",omitempty"` - Namespace string `json:",omitempty"` - SamenessGroup string `json:",omitempty" alias:"sameness_group"` - Action IntentionAction `json:",omitempty"` - Permissions []*IntentionPermission `json:",omitempty"` - Precedence int - Type IntentionSourceType - Description string `json:",omitempty"` - - LegacyID string `json:",omitempty" alias:"legacy_id"` - LegacyMeta map[string]string `json:",omitempty" alias:"legacy_meta"` - LegacyCreateTime *time.Time `json:",omitempty" alias:"legacy_create_time"` - LegacyUpdateTime *time.Time `json:",omitempty" alias:"legacy_update_time"` -} - -func (e *ServiceIntentionsConfigEntry) GetKind() string { return e.Kind } -func (e *ServiceIntentionsConfigEntry) GetName() string { return e.Name } -func (e *ServiceIntentionsConfigEntry) GetPartition() string { return e.Partition } -func (e *ServiceIntentionsConfigEntry) GetNamespace() string { return e.Namespace } -func (e *ServiceIntentionsConfigEntry) GetMeta() map[string]string { return e.Meta } -func (e *ServiceIntentionsConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex } -func (e *ServiceIntentionsConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex } - -type IntentionPermission struct { - Action IntentionAction - HTTP *IntentionHTTPPermission `json:",omitempty"` - JWT *IntentionJWTRequirement `json:",omitempty"` -} - -type IntentionHTTPPermission struct { - PathExact string `json:",omitempty" alias:"path_exact"` - PathPrefix string `json:",omitempty" alias:"path_prefix"` - PathRegex string `json:",omitempty" alias:"path_regex"` - - Header []IntentionHTTPHeaderPermission `json:",omitempty"` - - Methods []string `json:",omitempty"` -} - -type IntentionHTTPHeaderPermission struct { - Name string - Present bool `json:",omitempty"` - Exact string `json:",omitempty"` - Prefix string `json:",omitempty"` - Suffix string `json:",omitempty"` - Regex string `json:",omitempty"` - Invert bool `json:",omitempty"` -} - -type IntentionJWTRequirement struct { - // Providers is a list of providers to consider when verifying a JWT. - Providers []*IntentionJWTProvider `json:",omitempty"` -} - -type IntentionJWTProvider struct { - // Name is the name of the JWT provider. There MUST be a corresponding - // "jwt-provider" config entry with this name. - Name string `json:",omitempty"` - - // VerifyClaims is a list of additional claims to verify in a JWT's payload. - VerifyClaims []*IntentionJWTClaimVerification `json:",omitempty" alias:"verify_claims"` -} - -type IntentionJWTClaimVerification struct { - // Path is the path to the claim in the token JSON. - Path []string `json:",omitempty"` - - // Value is the expected value at the given path: - // - If the type at the path is a list then we verify - // that this value is contained in the list. - // - // - If the type at the path is a string then we verify - // that this value matches. - Value string `json:",omitempty"` -} diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_jwt_provider.go b/vendor/github.com/hashicorp/consul/api/config_entry_jwt_provider.go deleted file mode 100644 index 270f0d56415..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry_jwt_provider.go +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "time" -) - -const ( - DiscoveryTypeStrictDNS ClusterDiscoveryType = "STRICT_DNS" - DiscoveryTypeStatic ClusterDiscoveryType = "STATIC" - DiscoveryTypeLogicalDNS ClusterDiscoveryType = "LOGICAL_DNS" - DiscoveryTypeEDS ClusterDiscoveryType = "EDS" - DiscoveryTypeOriginalDST ClusterDiscoveryType = "ORIGINAL_DST" -) - -type JWTProviderConfigEntry struct { - // Kind is the kind of configuration entry and must be "jwt-provider". - Kind string `json:",omitempty"` - - // Name is the name of the provider being configured. - Name string `json:",omitempty"` - - // JSONWebKeySet defines a JSON Web Key Set, its location on disk, or the - // means with which to fetch a key set from a remote server. - JSONWebKeySet *JSONWebKeySet `json:",omitempty" alias:"json_web_key_set"` - - // Issuer is the entity that must have issued the JWT. - // This value must match the "iss" claim of the token. - Issuer string `json:",omitempty"` - - // Audiences is the set of audiences the JWT is allowed to access. - // If specified, all JWTs verified with this provider must address - // at least one of these to be considered valid. - Audiences []string `json:",omitempty"` - - // Locations where the JWT will be present in requests. - // Envoy will check all of these locations to extract a JWT. - // If no locations are specified Envoy will default to: - // 1. Authorization header with Bearer schema: - // "Authorization: Bearer " - // 2. access_token query parameter. - Locations []*JWTLocation `json:",omitempty"` - - // Forwarding defines rules for forwarding verified JWTs to the backend. - Forwarding *JWTForwardingConfig `json:",omitempty"` - - // ClockSkewSeconds specifies the maximum allowable time difference - // from clock skew when validating the "exp" (Expiration) and "nbf" - // (Not Before) claims. - // - // Default value is 30 seconds. - ClockSkewSeconds int `json:",omitempty" alias:"clock_skew_seconds"` - - // CacheConfig defines configuration for caching the validation - // result for previously seen JWTs. Caching results can speed up - // verification when individual tokens are expected to be handled - // multiple times. - CacheConfig *JWTCacheConfig `json:",omitempty" alias:"cache_config"` - - Meta map[string]string `json:",omitempty"` - - // CreateIndex is the Raft index this entry was created at. This is a - // read-only field. - CreateIndex uint64 `json:",omitempty"` - - // ModifyIndex is used for the Check-And-Set operations and can also be fed - // back into the WaitIndex of the QueryOptions in order to perform blocking - // queries. - ModifyIndex uint64 `json:",omitempty"` - - // Partition is the partition the JWTProviderConfigEntry applies to. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the JWTProviderConfigEntry applies to. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` -} - -// JWTLocation is a location where the JWT could be present in requests. -// -// Only one of Header, QueryParam, or Cookie can be specified. -type JWTLocation struct { - // Header defines how to extract a JWT from an HTTP request header. - Header *JWTLocationHeader `json:",omitempty"` - - // QueryParam defines how to extract a JWT from an HTTP request - // query parameter. - QueryParam *JWTLocationQueryParam `json:",omitempty" alias:"query_param"` - - // Cookie defines how to extract a JWT from an HTTP request cookie. - Cookie *JWTLocationCookie `json:",omitempty"` -} - -// JWTLocationHeader defines how to extract a JWT from an HTTP -// request header. -type JWTLocationHeader struct { - // Name is the name of the header containing the token. - Name string `json:",omitempty"` - - // ValuePrefix is an optional prefix that precedes the token in the - // header value. - // For example, "Bearer " is a standard value prefix for a header named - // "Authorization", but the prefix is not part of the token itself: - // "Authorization: Bearer " - ValuePrefix string `json:",omitempty" alias:"value_prefix"` - - // Forward defines whether the header with the JWT should be - // forwarded after the token has been verified. If false, the - // header will not be forwarded to the backend. - // - // Default value is false. - Forward bool `json:",omitempty"` -} - -// JWTLocationQueryParam defines how to extract a JWT from an HTTP request query parameter. -type JWTLocationQueryParam struct { - // Name is the name of the query param containing the token. - Name string `json:",omitempty"` -} - -// JWTLocationCookie defines how to extract a JWT from an HTTP request cookie. -type JWTLocationCookie struct { - // Name is the name of the cookie containing the token. - Name string `json:",omitempty"` -} - -type JWTForwardingConfig struct { - // HeaderName is a header name to use when forwarding a verified - // JWT to the backend. The verified JWT could have been extracted - // from any location (query param, header, or cookie). - // - // The header value will be base64-URL-encoded, and will not be - // padded unless PadForwardPayloadHeader is true. - HeaderName string `json:",omitempty" alias:"header_name"` - - // PadForwardPayloadHeader determines whether padding should be added - // to the base64 encoded token forwarded with ForwardPayloadHeader. - // - // Default value is false. - PadForwardPayloadHeader bool `json:",omitempty" alias:"pad_forward_payload_header"` -} - -// JSONWebKeySet defines a key set, its location on disk, or the -// means with which to fetch a key set from a remote server. -// -// Exactly one of Local or Remote must be specified. -type JSONWebKeySet struct { - // Local specifies a local source for the key set. - Local *LocalJWKS `json:",omitempty"` - - // Remote specifies how to fetch a key set from a remote server. - Remote *RemoteJWKS `json:",omitempty"` -} - -// LocalJWKS specifies a location for a local JWKS. -// -// Only one of String and Filename can be specified. -type LocalJWKS struct { - // JWKS contains a base64 encoded JWKS. - JWKS string `json:",omitempty"` - - // Filename configures a location on disk where the JWKS can be - // found. If specified, the file must be present on the disk of ALL - // proxies with intentions referencing this provider. - Filename string `json:",omitempty"` -} - -// RemoteJWKS specifies how to fetch a JWKS from a remote server. -type RemoteJWKS struct { - // URI is the URI of the server to query for the JWKS. - URI string `json:",omitempty"` - - // RequestTimeoutMs is the number of milliseconds to - // time out when making a request for the JWKS. - RequestTimeoutMs int `json:",omitempty" alias:"request_timeout_ms"` - - // CacheDuration is the duration after which cached keys - // should be expired. - // - // Default value is 5 minutes. - CacheDuration time.Duration `json:",omitempty" alias:"cache_duration"` - - // FetchAsynchronously indicates that the JWKS should be fetched - // when a client request arrives. Client requests will be paused - // until the JWKS is fetched. - // If false, the proxy listener will wait for the JWKS to be - // fetched before being activated. - // - // Default value is false. - FetchAsynchronously bool `json:",omitempty" alias:"fetch_asynchronously"` - - // RetryPolicy defines a retry policy for fetching JWKS. - // - // There is no retry by default. - RetryPolicy *JWKSRetryPolicy `json:",omitempty" alias:"retry_policy"` - - // JWKSCluster defines how the specified Remote JWKS URI is to be fetched. - JWKSCluster *JWKSCluster `json:",omitempty" alias:"jwks_cluster"` -} - -type JWKSCluster struct { - // DiscoveryType refers to the service discovery type to use for resolving the cluster. - // - // This defaults to STRICT_DNS. - // Other options include STATIC, LOGICAL_DNS, EDS or ORIGINAL_DST. - DiscoveryType ClusterDiscoveryType `json:",omitempty" alias:"discovery_type"` - - // TLSCertificates refers to the data containing certificate authority certificates to use - // in verifying a presented peer certificate. - // If not specified and a peer certificate is presented it will not be verified. - // - // Must be either CaCertificateProviderInstance or TrustedCA. - TLSCertificates *JWKSTLSCertificate `json:",omitempty" alias:"tls_certificates"` - - // The timeout for new network connections to hosts in the cluster. - // If not set, a default value of 5s will be used. - ConnectTimeout time.Duration `json:",omitempty" alias:"connect_timeout"` -} - -type ClusterDiscoveryType string - -// JWKSTLSCertificate refers to the data containing certificate authority certificates to use -// in verifying a presented peer certificate. -// If not specified and a peer certificate is presented it will not be verified. -// -// Must be either CaCertificateProviderInstance or TrustedCA. -type JWKSTLSCertificate struct { - // CaCertificateProviderInstance Certificate provider instance for fetching TLS certificates. - CaCertificateProviderInstance *JWKSTLSCertProviderInstance `json:",omitempty" alias:"ca_certificate_provider_instance"` - - // TrustedCA defines TLS certificate data containing certificate authority certificates - // to use in verifying a presented peer certificate. - // - // Exactly one of Filename, EnvironmentVariable, InlineString or InlineBytes must be specified. - TrustedCA *JWKSTLSCertTrustedCA `json:",omitempty" alias:"trusted_ca"` -} - -// JWKSTLSCertTrustedCA defines TLS certificate data containing certificate authority certificates -// to use in verifying a presented peer certificate. -// -// Exactly one of Filename, EnvironmentVariable, InlineString or InlineBytes must be specified. -type JWKSTLSCertTrustedCA struct { - Filename string `json:",omitempty" alias:"filename"` - EnvironmentVariable string `json:",omitempty" alias:"environment_variable"` - InlineString string `json:",omitempty" alias:"inline_string"` - InlineBytes []byte `json:",omitempty" alias:"inline_bytes"` -} - -type JWKSTLSCertProviderInstance struct { - // InstanceName refers to the certificate provider instance name - // - // The default value is "default". - InstanceName string `json:",omitempty" alias:"instance_name"` - - // CertificateName is used to specify certificate instances or types. For example, "ROOTCA" to specify - // a root-certificate (validation context) or "example.com" to specify a certificate for a - // particular domain. - // - // The default value is the empty string. - CertificateName string `json:",omitempty" alias:"certificate_name"` -} - -type JWKSRetryPolicy struct { - // NumRetries is the number of times to retry fetching the JWKS. - // The retry strategy uses jittered exponential backoff with - // a base interval of 1s and max of 10s. - // - // Default value is 0. - NumRetries int `json:",omitempty" alias:"num_retries"` - - // Backoff policy - // - // Defaults to Envoy's backoff policy - RetryPolicyBackOff *RetryPolicyBackOff `json:",omitempty" alias:"retry_policy_back_off"` -} - -type RetryPolicyBackOff struct { - // BaseInterval to be used for the next back off computation - // - // The default value from envoy is 1s - BaseInterval time.Duration `json:",omitempty" alias:"base_interval"` - - // MaxInternal to be used to specify the maximum interval between retries. - // Optional but should be greater or equal to BaseInterval. - // - // Defaults to 10 times BaseInterval - MaxInterval time.Duration `json:",omitempty" alias:"max_interval"` -} - -type JWTCacheConfig struct { - // Size specifies the maximum number of JWT verification - // results to cache. - // - // Defaults to 0, meaning that JWT caching is disabled. - Size int `json:",omitempty"` -} - -func (e *JWTProviderConfigEntry) GetKind() string { - return JWTProvider -} - -func (e *JWTProviderConfigEntry) GetName() string { return e.Name } -func (e *JWTProviderConfigEntry) GetMeta() map[string]string { return e.Meta } -func (e *JWTProviderConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex } -func (e *JWTProviderConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex } -func (e *JWTProviderConfigEntry) GetPartition() string { return e.Partition } -func (e *JWTProviderConfigEntry) GetNamespace() string { return e.Namespace } diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_mesh.go b/vendor/github.com/hashicorp/consul/api/config_entry_mesh.go deleted file mode 100644 index 1a1ebb8b536..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry_mesh.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" -) - -// MeshConfigEntry manages the global configuration for all service mesh -// proxies. -type MeshConfigEntry struct { - // Partition is the partition the MeshConfigEntry applies to. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the MeshConfigEntry applies to. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // TransparentProxy applies configuration specific to proxies - // in transparent mode. - TransparentProxy TransparentProxyMeshConfig `alias:"transparent_proxy"` - - // AllowEnablingPermissiveMutualTLS must be true in order to allow setting - // MutualTLSMode=permissive in either service-defaults or proxy-defaults. - AllowEnablingPermissiveMutualTLS bool `json:",omitempty" alias:"allow_enabling_permissive_mutual_tls"` - - TLS *MeshTLSConfig `json:",omitempty"` - - HTTP *MeshHTTPConfig `json:",omitempty"` - - Peering *PeeringMeshConfig `json:",omitempty"` - - Meta map[string]string `json:",omitempty"` - - // CreateIndex is the Raft index this entry was created at. This is a - // read-only field. - CreateIndex uint64 - - // ModifyIndex is used for the Check-And-Set operations and can also be fed - // back into the WaitIndex of the QueryOptions in order to perform blocking - // queries. - ModifyIndex uint64 -} - -type TransparentProxyMeshConfig struct { - MeshDestinationsOnly bool `alias:"mesh_destinations_only"` -} - -type MeshTLSConfig struct { - Incoming *MeshDirectionalTLSConfig `json:",omitempty"` - Outgoing *MeshDirectionalTLSConfig `json:",omitempty"` -} - -type MeshDirectionalTLSConfig struct { - TLSMinVersion string `json:",omitempty" alias:"tls_min_version"` - TLSMaxVersion string `json:",omitempty" alias:"tls_max_version"` - CipherSuites []string `json:",omitempty" alias:"cipher_suites"` -} - -type MeshHTTPConfig struct { - SanitizeXForwardedClientCert bool `alias:"sanitize_x_forwarded_client_cert"` -} - -type PeeringMeshConfig struct { - PeerThroughMeshGateways bool `json:",omitempty" alias:"peer_through_mesh_gateways"` -} - -func (e *MeshConfigEntry) GetKind() string { return MeshConfig } -func (e *MeshConfigEntry) GetName() string { return MeshConfigMesh } -func (e *MeshConfigEntry) GetPartition() string { return e.Partition } -func (e *MeshConfigEntry) GetNamespace() string { return e.Namespace } -func (e *MeshConfigEntry) GetMeta() map[string]string { return e.Meta } -func (e *MeshConfigEntry) GetCreateIndex() uint64 { return e.CreateIndex } -func (e *MeshConfigEntry) GetModifyIndex() uint64 { return e.ModifyIndex } - -// MarshalJSON adds the Kind field so that the JSON can be decoded back into the -// correct type. -func (e *MeshConfigEntry) MarshalJSON() ([]byte, error) { - type Alias MeshConfigEntry - source := &struct { - Kind string - *Alias - }{ - Kind: MeshConfig, - Alias: (*Alias)(e), - } - return json.Marshal(source) -} diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_rate_limit_ip.go b/vendor/github.com/hashicorp/consul/api/config_entry_rate_limit_ip.go deleted file mode 100644 index 7af2a2658f2..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry_rate_limit_ip.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -type ReadWriteRatesConfig struct { - ReadRate float64 `alias:"read_rate"` - WriteRate float64 `alias:"write_rate"` -} - -type RateLimitIPConfigEntry struct { - // Kind of the config entry. This will be set to structs.RateLimitIPConfig - Kind string - Name string - Mode string // {permissive, enforcing, disabled} - - Meta map[string]string `json:",omitempty"` - // overall limits - ReadRate float64 `alias:"read_rate"` - WriteRate float64 `alias:"write_rate"` - - //limits specific to a type of call - ACL *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryACL OperationCategory = "ACL" - Catalog *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryCatalog OperationCategory = "Catalog" - ConfigEntry *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryConfigEntry OperationCategory = "ConfigEntry" - ConnectCA *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryConnectCA OperationCategory = "ConnectCA" - Coordinate *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryCoordinate OperationCategory = "Coordinate" - DiscoveryChain *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryDiscoveryChain OperationCategory = "DiscoveryChain" - ServerDiscovery *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryServerDiscovery OperationCategory = "ServerDiscovery" - Health *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryHealth OperationCategory = "Health" - Intention *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryIntention OperationCategory = "Intention" - KV *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryKV OperationCategory = "KV" - Tenancy *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryPartition OperationCategory = "Tenancy" - PreparedQuery *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryPreparedQuery OperationCategory = "PreparedQuery" - Session *ReadWriteRatesConfig `json:",omitempty"` // OperationCategorySession OperationCategory = "Session" - Txn *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryTxn OperationCategory = "Txn" - AutoConfig *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryAutoConfig OperationCategory = "AutoConfig" - FederationState *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryFederationState OperationCategory = "FederationState" - Internal *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryInternal OperationCategory = "Internal" - PeerStream *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryPeerStream OperationCategory = "PeerStream" - Peering *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryPeering OperationCategory = "Peering" - DataPlane *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryDataPlane OperationCategory = "DataPlane" - DNS *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryDNS OperationCategory = "DNS" - Subscribe *ReadWriteRatesConfig `json:",omitempty"` // OperationCategorySubscribe OperationCategory = "Subscribe" - Resource *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryResource OperationCategory = "Resource" - - // Partition is the partition the config entry is associated with. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the config entry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // CreateIndex is the Raft index this entry was created at. This is a - // read-only field. - CreateIndex uint64 - - // ModifyIndex is used for the Check-And-Set operations and can also be fed - // back into the WaitIndex of the QueryOptions in order to perform blocking - // queries. - ModifyIndex uint64 -} - -func (r *RateLimitIPConfigEntry) GetKind() string { - return RateLimitIPConfig -} -func (r *RateLimitIPConfigEntry) GetName() string { - if r == nil { - return "" - } - return r.Name -} -func (r *RateLimitIPConfigEntry) GetPartition() string { - return r.Partition -} -func (r *RateLimitIPConfigEntry) GetNamespace() string { - return r.Namespace -} -func (r *RateLimitIPConfigEntry) GetMeta() map[string]string { - if r == nil { - return nil - } - return r.Meta -} -func (r *RateLimitIPConfigEntry) GetCreateIndex() uint64 { - return r.CreateIndex -} -func (r *RateLimitIPConfigEntry) GetModifyIndex() uint64 { - return r.ModifyIndex -} diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_routes.go b/vendor/github.com/hashicorp/consul/api/config_entry_routes.go deleted file mode 100644 index bbaa032d50f..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry_routes.go +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import "time" - -// TCPRouteConfigEntry -- TODO stub -type TCPRouteConfigEntry struct { - // Kind of the config entry. This should be set to api.TCPRoute. - Kind string - - // Name is used to match the config entry with its associated tcp-route - // service. This should match the name provided in the service definition. - Name string - - // Parents is a list of gateways that this route should be bound to. - Parents []ResourceReference - // Services is a list of TCP-based services that this should route to. - // Currently, this must specify at maximum one service. - Services []TCPService - - Meta map[string]string `json:",omitempty"` - - // Status is the asynchronous status which a TCPRoute propagates to the user. - Status ConfigEntryStatus - - // CreateIndex is the Raft index this entry was created at. This is a - // read-only field. - CreateIndex uint64 - - // ModifyIndex is used for the Check-And-Set operations and can also be fed - // back into the WaitIndex of the QueryOptions in order to perform blocking - // queries. - ModifyIndex uint64 - - // Partition is the partition the config entry is associated with. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the config entry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` -} - -func (a *TCPRouteConfigEntry) GetKind() string { return TCPRoute } -func (a *TCPRouteConfigEntry) GetName() string { return a.Name } -func (a *TCPRouteConfigEntry) GetPartition() string { return a.Partition } -func (a *TCPRouteConfigEntry) GetNamespace() string { return a.Namespace } -func (a *TCPRouteConfigEntry) GetMeta() map[string]string { return a.Meta } -func (a *TCPRouteConfigEntry) GetCreateIndex() uint64 { return a.CreateIndex } -func (a *TCPRouteConfigEntry) GetModifyIndex() uint64 { return a.ModifyIndex } - -// TCPService is a service reference for a TCPRoute -type TCPService struct { - Name string - - // Partition is the partition the config entry is associated with. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the config entry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` -} - -// HTTPRouteConfigEntry manages the configuration for a HTTP route -// with the given name. -type HTTPRouteConfigEntry struct { - // Kind of the config entry. This should be set to api.HTTPRoute. - Kind string - - // Name is used to match the config entry with its associated http-route. - Name string - - // Parents is a list of gateways that this route should be bound to - Parents []ResourceReference - // Rules are a list of HTTP-based routing rules that this route should - // use for constructing a routing table. - Rules []HTTPRouteRule - // Hostnames are the hostnames for which this HTTPRoute should respond to requests. - Hostnames []string - - Meta map[string]string `json:",omitempty"` - - // CreateIndex is the Raft index this entry was created at. This is a - // read-only field. - CreateIndex uint64 - - // ModifyIndex is used for the Check-And-Set operations and can also be fed - // back into the WaitIndex of the QueryOptions in order to perform blocking - // queries. - ModifyIndex uint64 - - // Partition is the partition the config entry is associated with. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the config entry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // Status is the asynchronous status which an HTTPRoute propagates to the user. - Status ConfigEntryStatus -} - -func (r *HTTPRouteConfigEntry) GetKind() string { return HTTPRoute } -func (r *HTTPRouteConfigEntry) GetName() string { return r.Name } -func (r *HTTPRouteConfigEntry) GetPartition() string { return r.Partition } -func (r *HTTPRouteConfigEntry) GetNamespace() string { return r.Namespace } -func (r *HTTPRouteConfigEntry) GetMeta() map[string]string { return r.Meta } -func (r *HTTPRouteConfigEntry) GetCreateIndex() uint64 { return r.CreateIndex } -func (r *HTTPRouteConfigEntry) GetModifyIndex() uint64 { return r.ModifyIndex } - -// HTTPMatch specifies the criteria that should be -// used in determining whether or not a request should -// be routed to a given set of services. -type HTTPMatch struct { - Headers []HTTPHeaderMatch - Method HTTPMatchMethod - Path HTTPPathMatch - Query []HTTPQueryMatch -} - -// HTTPMatchMethod specifies which type of HTTP verb should -// be used for matching a given request. -type HTTPMatchMethod string - -const ( - HTTPMatchMethodAll HTTPMatchMethod = "" - HTTPMatchMethodConnect HTTPMatchMethod = "CONNECT" - HTTPMatchMethodDelete HTTPMatchMethod = "DELETE" - HTTPMatchMethodGet HTTPMatchMethod = "GET" - HTTPMatchMethodHead HTTPMatchMethod = "HEAD" - HTTPMatchMethodOptions HTTPMatchMethod = "OPTIONS" - HTTPMatchMethodPatch HTTPMatchMethod = "PATCH" - HTTPMatchMethodPost HTTPMatchMethod = "POST" - HTTPMatchMethodPut HTTPMatchMethod = "PUT" - HTTPMatchMethodTrace HTTPMatchMethod = "TRACE" -) - -// HTTPHeaderMatchType specifies how header matching criteria -// should be applied to a request. -type HTTPHeaderMatchType string - -const ( - HTTPHeaderMatchExact HTTPHeaderMatchType = "exact" - HTTPHeaderMatchPrefix HTTPHeaderMatchType = "prefix" - HTTPHeaderMatchPresent HTTPHeaderMatchType = "present" - HTTPHeaderMatchRegularExpression HTTPHeaderMatchType = "regex" - HTTPHeaderMatchSuffix HTTPHeaderMatchType = "suffix" -) - -// HTTPHeaderMatch specifies how a match should be done -// on a request's headers. -type HTTPHeaderMatch struct { - Match HTTPHeaderMatchType - Name string - Value string -} - -// HTTPPathMatchType specifies how path matching criteria -// should be applied to a request. -type HTTPPathMatchType string - -const ( - HTTPPathMatchExact HTTPPathMatchType = "exact" - HTTPPathMatchPrefix HTTPPathMatchType = "prefix" - HTTPPathMatchRegularExpression HTTPPathMatchType = "regex" -) - -// HTTPPathMatch specifies how a match should be done -// on a request's path. -type HTTPPathMatch struct { - Match HTTPPathMatchType - Value string -} - -// HTTPQueryMatchType specifies how querys matching criteria -// should be applied to a request. -type HTTPQueryMatchType string - -const ( - HTTPQueryMatchExact HTTPQueryMatchType = "exact" - HTTPQueryMatchPresent HTTPQueryMatchType = "present" - HTTPQueryMatchRegularExpression HTTPQueryMatchType = "regex" -) - -// HTTPQueryMatch specifies how a match should be done -// on a request's query parameters. -type HTTPQueryMatch struct { - Match HTTPQueryMatchType - Name string - Value string -} - -// HTTPFilters specifies a list of filters used to modify a request -// before it is routed to an upstream. -type HTTPFilters struct { - Headers []HTTPHeaderFilter - URLRewrite *URLRewrite - RetryFilter *RetryFilter - TimeoutFilter *TimeoutFilter - JWT *JWTFilter -} - -// HTTPResponseFilters specifies a list of filters used to modify a -// response returned by an upstream -type HTTPResponseFilters struct { - Headers []HTTPHeaderFilter -} - -// HTTPHeaderFilter specifies how HTTP headers should be modified. -type HTTPHeaderFilter struct { - Add map[string]string - Remove []string - Set map[string]string -} - -type URLRewrite struct { - Path string -} - -type RetryFilter struct { - NumRetries uint32 - RetryOn []string - RetryOnStatusCodes []uint32 - RetryOnConnectFailure bool -} - -type TimeoutFilter struct { - RequestTimeout time.Duration - IdleTimeout time.Duration -} - -// JWTFilter specifies the JWT configuration for a route -type JWTFilter struct { - Providers []*APIGatewayJWTProvider `json:",omitempty"` -} - -// HTTPRouteRule specifies the routing rules used to determine what upstream -// service an HTTP request is routed to. -type HTTPRouteRule struct { - // Filters is a list of HTTP-based filters used to modify a request prior - // to routing it to the upstream service - Filters HTTPFilters - // ResponseFilters is a list of HTTP-based filters used to modify a response - // returned by the upstream service - ResponseFilters HTTPResponseFilters - // Matches specified the matching criteria used in the routing table. If a - // request matches the given HTTPMatch configuration, then traffic is routed - // to services specified in the Services field. - Matches []HTTPMatch - // Services is a list of HTTP-based services to route to if the request matches - // the rules specified in the Matches field. - Services []HTTPService -} - -// HTTPService is a service reference for HTTP-based routing rules -type HTTPService struct { - Name string - // Weight is an arbitrary integer used in calculating how much - // traffic should be sent to the given service. - Weight int - - // Filters is a list of HTTP-based filters used to modify a request prior - // to routing it to the upstream service - Filters HTTPFilters - - // ResponseFilters is a list of HTTP-based filters used to modify the - // response returned from the upstream service - ResponseFilters HTTPResponseFilters - - // Partition is the partition the config entry is associated with. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the config entry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` -} diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_sameness_group.go b/vendor/github.com/hashicorp/consul/api/config_entry_sameness_group.go deleted file mode 100644 index 1217efe7d2c..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry_sameness_group.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -type SamenessGroupConfigEntry struct { - Kind string - Name string - Partition string `json:",omitempty"` - DefaultForFailover bool `json:",omitempty" alias:"default_for_failover"` - IncludeLocal bool `json:",omitempty" alias:"include_local"` - Members []SamenessGroupMember - Meta map[string]string `json:",omitempty"` - CreateIndex uint64 - ModifyIndex uint64 -} - -type SamenessGroupMember struct { - Partition string `json:",omitempty"` - Peer string `json:",omitempty"` -} - -func (s *SamenessGroupConfigEntry) GetKind() string { return s.Kind } -func (s *SamenessGroupConfigEntry) GetName() string { return s.Name } -func (s *SamenessGroupConfigEntry) GetPartition() string { return s.Partition } -func (s *SamenessGroupConfigEntry) GetNamespace() string { return "" } -func (s *SamenessGroupConfigEntry) GetCreateIndex() uint64 { return s.CreateIndex } -func (s *SamenessGroupConfigEntry) GetModifyIndex() uint64 { return s.ModifyIndex } -func (s *SamenessGroupConfigEntry) GetMeta() map[string]string { return s.Meta } diff --git a/vendor/github.com/hashicorp/consul/api/config_entry_status.go b/vendor/github.com/hashicorp/consul/api/config_entry_status.go deleted file mode 100644 index 997066f24fe..00000000000 --- a/vendor/github.com/hashicorp/consul/api/config_entry_status.go +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "fmt" - "time" - - "golang.org/x/exp/slices" -) - -// ResourceReference is a reference to a ConfigEntry -// with an optional reference to a subsection of that ConfigEntry -// that can be specified as SectionName -type ResourceReference struct { - // Kind is the kind of ConfigEntry that this resource refers to. - Kind string - // Name is the identifier for the ConfigEntry this resource refers to. - Name string - // SectionName is a generic subresource identifier that specifies - // a subset of the ConfigEntry to which this reference applies. Usage - // of this field should be up to the controller that leverages it. If - // unused, this should be blank. - SectionName string - - // Partition is the partition the config entry is associated with. - // Partitioning is a Consul Enterprise feature. - Partition string `json:",omitempty"` - - // Namespace is the namespace the config entry is associated with. - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` -} - -// ConfigEntryStatus is used for propagating back asynchronously calculated -// messages from control loops to a user -type ConfigEntryStatus struct { - // Conditions is the set of condition objects associated with - // a ConfigEntry status. - Conditions []Condition -} - -// Condition is used for a single message and state associated -// with an object. For example, a ConfigEntry that references -// multiple other resources may have different statuses with -// respect to each of those resources. -type Condition struct { - // Type is a value from a bounded set of types that an object might have - Type string - // Status is a value from a bounded set of statuses that an object might have - Status ConditionStatus - // Reason is a value from a bounded set of reasons for a given status - Reason string - // Message is a message that gives more detailed information about - // why a Condition has a given status and reason - Message string - // Resource is an optional reference to a resource for which this - // condition applies - Resource *ResourceReference - // LastTransitionTime is the time at which this Condition was created - LastTransitionTime *time.Time -} - -type ( - ConditionStatus string -) - -const ( - ConditionStatusTrue ConditionStatus = "True" - ConditionStatusFalse ConditionStatus = "False" - ConditionStatusUnknown ConditionStatus = "Unknown" -) - -// GatewayConditionType is a type of condition associated with a -// Gateway. This type should be used with the GatewayStatus.Conditions -// field. -type GatewayConditionType string - -// GatewayConditionReason defines the set of reasons that explain why a -// particular Gateway condition type has been raised. -type GatewayConditionReason string - -// the following are directly from the k8s spec -const ( - // This condition is true when the controller managing the Gateway is - // syntactically and semantically valid enough to produce some configuration - // in the underlying data plane. This does not indicate whether or not the - // configuration has been propagated to the data plane. - // - // Possible reasons for this condition to be True are: - // - // * "Accepted" - // - // Possible reasons for this condition to be False are: - // - // * InvalidCertificates - // - GatewayConditionAccepted GatewayConditionType = "Accepted" - - // This reason is used with the "Accepted" condition when the condition is - // True. - GatewayReasonAccepted GatewayConditionReason = "Accepted" - - // This reason is used with the "Accepted" condition when the gateway has multiple invalid - // certificates and cannot bind to any routes - GatewayReasonInvalidCertificates GatewayConditionReason = "InvalidCertificates" - - // This reason is used with the "Accepted" condition when the gateway has multiple invalid - // JWT providers and cannot bind to any routes - GatewayReasonInvalidJWTProviders GatewayConditionReason = "InvalidJWTProviders" - - // This condition indicates that the gateway was unable to resolve - // conflicting specification requirements for this Listener. If a - // Listener is conflicted, its network port should not be configured - // on any network elements. - // - // Possible reasons for this condition to be true are: - // - // * "RouteConflict" - // - // Possible reasons for this condition to be False are: - // - // * "NoConflict" - // - // Controllers may raise this condition with other reasons, - // but should prefer to use the reasons listed above to improve - // interoperability. - GatewayConditionConflicted GatewayConditionType = "Conflicted" - // This reason is used with the "Conflicted" condition when the condition - // is False. - GatewayReasonNoConflict GatewayConditionReason = "NoConflict" - // This reason is used with the "Conflicted" condition when the route is - // in a conflicted state, such as when a TCPListener attempts to bind to two routes - GatewayReasonRouteConflict GatewayConditionReason = "RouteConflict" - - // This condition indicates whether the controller was able to - // resolve all the object references for the Gateway. When setting this - // condition to False, a ResourceReference to the misconfigured Listener should - // be provided. - // - // Possible reasons for this condition to be true are: - // - // * "ResolvedRefs" - // - // Possible reasons for this condition to be False are: - // - // * "InvalidCertificateRef" - // * "InvalidRouteKinds" - // * "RefNotPermitted" - // - GatewayConditionResolvedRefs GatewayConditionType = "ResolvedRefs" - - // This reason is used with the "ResolvedRefs" condition when the condition - // is true. - GatewayReasonResolvedRefs GatewayConditionReason = "ResolvedRefs" - - // This reason is used with the "ResolvedRefs" condition when a - // Listener has a TLS configuration with at least one TLS CertificateRef - // that is invalid or does not exist. - // A CertificateRef is considered invalid when it refers to a nonexistent - // or unsupported resource or kind, or when the data within that resource - // is malformed. - // This reason must be used only when the reference is allowed, either by - // referencing an object in the same namespace as the Gateway, or when - // a cross-namespace reference has been explicitly allowed by a ReferenceGrant. - // If the reference is not allowed, the reason RefNotPermitted must be used - // instead. - GatewayListenerReasonInvalidCertificateRef GatewayConditionReason = "InvalidCertificateRef" - - // This reason is used with the "ResolvedRefs" condition when a - // Listener has a JWT configuration with at least one JWTProvider - // that is invalid or does not exist. - // A JWTProvider is considered invalid when it refers to a nonexistent - // or unsupported resource or kind, or when the data within that resource - // is malformed. - GatewayListenerReasonInvalidJWTProviderRef GatewayConditionReason = "InvalidJWTProviderRef" -) - -var validGatewayConditionReasonsMapping = map[GatewayConditionType]map[ConditionStatus][]GatewayConditionReason{ - GatewayConditionAccepted: { - ConditionStatusTrue: { - GatewayReasonAccepted, - }, - ConditionStatusFalse: { - GatewayReasonInvalidCertificates, - GatewayReasonInvalidJWTProviders, - }, - ConditionStatusUnknown: {}, - }, - GatewayConditionConflicted: { - ConditionStatusTrue: { - GatewayReasonRouteConflict, - }, - ConditionStatusFalse: { - GatewayReasonNoConflict, - }, - ConditionStatusUnknown: {}, - }, - GatewayConditionResolvedRefs: { - ConditionStatusTrue: { - GatewayReasonResolvedRefs, - }, - ConditionStatusFalse: { - GatewayListenerReasonInvalidCertificateRef, - GatewayListenerReasonInvalidJWTProviderRef, - }, - ConditionStatusUnknown: {}, - }, -} - -func ValidateGatewayConditionReason(name GatewayConditionType, status ConditionStatus, reason GatewayConditionReason) error { - if err := checkConditionStatus(status); err != nil { - return err - } - - reasons, ok := validGatewayConditionReasonsMapping[name] - if !ok { - return fmt.Errorf("unrecognized GatewayConditionType %q", name) - } - - reasonsForStatus, ok := reasons[status] - if !ok { - return fmt.Errorf("unrecognized ConditionStatus %q", status) - } - - if !slices.Contains(reasonsForStatus, reason) { - return fmt.Errorf("gateway condition reason %q not allowed for gateway condition type %q with status %q", reason, name, status) - } - return nil -} - -// RouteConditionType is a type of condition for a route. -type RouteConditionType string - -// RouteConditionReason is a reason for a route condition. -type RouteConditionReason string - -// The following statuses are taken from the K8's Spec -// With the exception of: "RouteReasonInvalidDiscoveryChain" and "NoUpstreamServicesTargeted" -const ( - // This condition indicates whether the route has been accepted or rejected - // by a Gateway, and why. - // - // Possible reasons for this condition to be true are: - // - // * "Accepted" - // - // Possible reasons for this condition to be False are: - // - // * "InvalidDiscoveryChain" - // * "NoUpstreamServicesTargeted" - // - // - // Controllers may raise this condition with other reasons, - // but should prefer to use the reasons listed above to improve - // interoperability. - RouteConditionAccepted RouteConditionType = "Accepted" - - // This reason is used with the "Accepted" condition when the Route has been - // accepted by the Gateway. - RouteReasonAccepted RouteConditionReason = "Accepted" - - // This reason is used with the "Accepted" condition when the route has an - // invalid discovery chain, this includes conditions like the protocol being invalid - // or the discovery chain failing to compile - RouteReasonInvalidDiscoveryChain RouteConditionReason = "InvalidDiscoveryChain" - - // This reason is used with the "Accepted" condition when the route - RouteReasonNoUpstreamServicesTargeted RouteConditionReason = "NoUpstreamServicesTargeted" -) - -// the following statuses are custom to Consul -const ( - // This condition indicates whether the route was able to successfully bind the - // Listener on the gateway - // Possible reasons for this condition to be true are: - // - // * "Bound" - // - // Possible reasons for this condition to be false are: - // - // * "FailedToBind" - // * "GatewayNotFound" - // - RouteConditionBound RouteConditionType = "Bound" - - // This reason is used with the "Bound" condition when the condition - // is true - RouteReasonBound RouteConditionReason = "Bound" - - // This reason is used with the "Bound" condition when the route failed - // to bind to the gateway - RouteReasonFailedToBind RouteConditionReason = "FailedToBind" - - // This reason is used with the "Bound" condition when the route fails - // to find the gateway - RouteReasonGatewayNotFound RouteConditionReason = "GatewayNotFound" - - // This reason is used with the "Accepted" condition when the route references non-existent - // JWTProviders - RouteReasonJWTProvidersNotFound RouteConditionReason = "JWTProvidersNotFound" -) - -var validRouteConditionReasonsMapping = map[RouteConditionType]map[ConditionStatus][]RouteConditionReason{ - RouteConditionAccepted: { - ConditionStatusTrue: { - RouteReasonAccepted, - }, - ConditionStatusFalse: { - RouteReasonInvalidDiscoveryChain, - RouteReasonNoUpstreamServicesTargeted, - }, - ConditionStatusUnknown: {}, - }, - RouteConditionBound: { - ConditionStatusTrue: { - RouteReasonBound, - }, - ConditionStatusFalse: { - RouteReasonGatewayNotFound, - RouteReasonFailedToBind, - RouteReasonJWTProvidersNotFound, - }, - ConditionStatusUnknown: {}, - }, -} - -func ValidateRouteConditionReason(name RouteConditionType, status ConditionStatus, reason RouteConditionReason) error { - if err := checkConditionStatus(status); err != nil { - return err - } - - reasons, ok := validRouteConditionReasonsMapping[name] - if !ok { - return fmt.Errorf("unrecognized RouteConditionType %s", name) - } - - reasonsForStatus, ok := reasons[status] - if !ok { - return fmt.Errorf("unrecognized ConditionStatus %s", name) - } - - if !slices.Contains(reasonsForStatus, reason) { - return fmt.Errorf("route condition reason %s not allowed for route condition type %s with status %s", reason, name, status) - } - - return nil -} - -func checkConditionStatus(status ConditionStatus) error { - switch status { - case ConditionStatusTrue, ConditionStatusFalse, ConditionStatusUnknown: - return nil - default: - return fmt.Errorf("unrecognized condition status: %q", status) - } -} diff --git a/vendor/github.com/hashicorp/consul/api/connect.go b/vendor/github.com/hashicorp/consul/api/connect.go deleted file mode 100644 index 77be00034d0..00000000000 --- a/vendor/github.com/hashicorp/consul/api/connect.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// TelemetryCollectorName is the service name for the Consul Telemetry Collector -const TelemetryCollectorName string = "consul-telemetry-collector" - -// Connect can be used to work with endpoints related to Connect, the -// feature for securely connecting services within Consul. -type Connect struct { - c *Client -} - -// Connect returns a handle to the connect-related endpoints -func (c *Client) Connect() *Connect { - return &Connect{c} -} diff --git a/vendor/github.com/hashicorp/consul/api/connect_ca.go b/vendor/github.com/hashicorp/consul/api/connect_ca.go deleted file mode 100644 index 8a5c9f870e9..00000000000 --- a/vendor/github.com/hashicorp/consul/api/connect_ca.go +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "fmt" - "time" - - "github.com/mitchellh/mapstructure" -) - -// CAConfig is the structure for the Connect CA configuration. -type CAConfig struct { - // Provider is the CA provider implementation to use. - Provider string - - // Configuration is arbitrary configuration for the provider. This - // should only contain primitive values and containers (such as lists - // and maps). - Config map[string]interface{} - - // State is read-only data that the provider might have persisted for use - // after restart or leadership transition. For example this might include - // UUIDs of resources it has created. Setting this when writing a - // configuration is an error. - State map[string]string - - // ForceWithoutCrossSigning indicates that the CA reconfiguration should go - // ahead even if the current CA is unable to cross sign certificates. This - // risks temporary connection failures during the rollout as new leafs will be - // rejected by proxies that have not yet observed the new root cert but is the - // only option if a CA that doesn't support cross signing needs to be - // reconfigured or mirated away from. - ForceWithoutCrossSigning bool - - CreateIndex uint64 - ModifyIndex uint64 -} - -// CommonCAProviderConfig is the common options available to all CA providers. -type CommonCAProviderConfig struct { - LeafCertTTL time.Duration - RootCertTTL time.Duration - SkipValidate bool - CSRMaxPerSecond float32 - CSRMaxConcurrent int -} - -// ConsulCAProviderConfig is the config for the built-in Consul CA provider. -type ConsulCAProviderConfig struct { - CommonCAProviderConfig `mapstructure:",squash"` - - PrivateKey string - RootCert string - IntermediateCertTTL time.Duration -} - -// ParseConsulCAConfig takes a raw config map and returns a parsed -// ConsulCAProviderConfig. -func ParseConsulCAConfig(raw map[string]interface{}) (*ConsulCAProviderConfig, error) { - var config ConsulCAProviderConfig - decodeConf := &mapstructure.DecoderConfig{ - DecodeHook: mapstructure.StringToTimeDurationHookFunc(), - Result: &config, - WeaklyTypedInput: true, - } - - decoder, err := mapstructure.NewDecoder(decodeConf) - if err != nil { - return nil, err - } - - if err := decoder.Decode(raw); err != nil { - return nil, fmt.Errorf("error decoding config: %s", err) - } - - return &config, nil -} - -// CARootList is the structure for the results of listing roots. -type CARootList struct { - ActiveRootID string - TrustDomain string - Roots []*CARoot -} - -// CARoot represents a root CA certificate that is trusted. -type CARoot struct { - // ID is a globally unique ID (UUID) representing this CA root. - ID string - - // Name is a human-friendly name for this CA root. This value is - // opaque to Consul and is not used for anything internally. - Name string - - // RootCertPEM is the PEM-encoded public certificate. - RootCertPEM string `json:"RootCert"` - - // Active is true if this is the current active CA. This must only - // be true for exactly one CA. For any method that modifies roots in the - // state store, tests should be written to verify that multiple roots - // cannot be active. - Active bool - - CreateIndex uint64 - ModifyIndex uint64 -} - -// LeafCert is a certificate that has been issued by a Connect CA. -type LeafCert struct { - // SerialNumber is the unique serial number for this certificate. - // This is encoded in standard hex separated by :. - SerialNumber string - - // CertPEM and PrivateKeyPEM are the PEM-encoded certificate and private - // key for that cert, respectively. This should not be stored in the - // state store, but is present in the sign API response. - CertPEM string `json:",omitempty"` - PrivateKeyPEM string `json:",omitempty"` - - // Service is the name of the service for which the cert was issued. - // ServiceURI is the cert URI value. - Service string - ServiceURI string - - // ValidAfter and ValidBefore are the validity periods for the - // certificate. - ValidAfter time.Time - ValidBefore time.Time - - CreateIndex uint64 - ModifyIndex uint64 -} - -// CARoots queries the list of available roots. -func (h *Connect) CARoots(q *QueryOptions) (*CARootList, *QueryMeta, error) { - r := h.c.newRequest("GET", "/v1/connect/ca/roots") - r.setQueryOptions(q) - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out CARootList - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, qm, nil -} - -// CAGetConfig returns the current CA configuration. -func (h *Connect) CAGetConfig(q *QueryOptions) (*CAConfig, *QueryMeta, error) { - r := h.c.newRequest("GET", "/v1/connect/ca/configuration") - r.setQueryOptions(q) - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out CAConfig - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, qm, nil -} - -// CASetConfig sets the current CA configuration. -func (h *Connect) CASetConfig(conf *CAConfig, q *WriteOptions) (*WriteMeta, error) { - r := h.c.newRequest("PUT", "/v1/connect/ca/configuration") - r.setWriteOptions(q) - r.obj = conf - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - return wm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/connect_intention.go b/vendor/github.com/hashicorp/consul/api/connect_intention.go deleted file mode 100644 index e91c03e8b71..00000000000 --- a/vendor/github.com/hashicorp/consul/api/connect_intention.go +++ /dev/null @@ -1,461 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "bytes" - "fmt" - "io" - "time" -) - -// Intention defines an intention for the Connect Service Graph. This defines -// the allowed or denied behavior of a connection between two services using -// Connect. -type Intention struct { - // ID is the UUID-based ID for the intention, always generated by Consul. - ID string `json:",omitempty"` - - // Description is a human-friendly description of this intention. - // It is opaque to Consul and is only stored and transferred in API - // requests. - Description string `json:",omitempty"` - - // SourceNS, SourceName are the namespace and name, respectively, of - // the source service. Either of these may be the wildcard "*", but only - // the full value can be a wildcard. Partial wildcards are not allowed. - // The source may also be a non-Consul service, as specified by SourceType. - // - // DestinationNS, DestinationName is the same, but for the destination - // service. The same rules apply. The destination is always a Consul - // service. - SourceNS, SourceName string - DestinationNS, DestinationName string - - // SourcePartition and DestinationPartition cannot be wildcards "*" and - // are not compatible with legacy intentions. - SourcePartition string `json:",omitempty"` - DestinationPartition string `json:",omitempty"` - - // SourcePeer cannot be a wildcard "*" and is not compatible with legacy - // intentions. Cannot be used with SourcePartition, as both represent the - // same level of tenancy (partition is local to cluster, peer is remote). - SourcePeer string `json:",omitempty"` - - // SourceSamenessGroup cannot be wildcards "*" and - // is not compatible with legacy intentions. - SourceSamenessGroup string `json:",omitempty"` - - // SourceType is the type of the value for the source. - SourceType IntentionSourceType - - // Action is whether this is an allowlist or denylist intention. - Action IntentionAction `json:",omitempty"` - - // Permissions is the list of additional L7 attributes that extend the - // intention definition. - // - // NOTE: This field is not editable unless editing the underlying - // service-intentions config entry directly. - Permissions []*IntentionPermission `json:",omitempty"` - - // DefaultAddr is not used. - // Deprecated: DefaultAddr is not used and may be removed in a future version. - DefaultAddr string `json:",omitempty"` - // DefaultPort is not used. - // Deprecated: DefaultPort is not used and may be removed in a future version. - DefaultPort int `json:",omitempty"` - - // Meta is arbitrary metadata associated with the intention. This is - // opaque to Consul but is served in API responses. - Meta map[string]string `json:",omitempty"` - - // Precedence is the order that the intention will be applied, with - // larger numbers being applied first. This is a read-only field, on - // any intention update it is updated. - Precedence int - - // CreatedAt and UpdatedAt keep track of when this record was created - // or modified. - CreatedAt, UpdatedAt time.Time - - // Hash of the contents of the intention - // - // This is needed mainly for replication purposes. When replicating from - // one DC to another keeping the content Hash will allow us to detect - // content changes more efficiently than checking every single field - Hash []byte `json:",omitempty"` - - CreateIndex uint64 - ModifyIndex uint64 -} - -// String returns human-friendly output describing ths intention. -func (i *Intention) String() string { - var detail string - switch n := len(i.Permissions); n { - case 0: - detail = string(i.Action) - case 1: - detail = "1 permission" - default: - detail = fmt.Sprintf("%d permissions", len(i.Permissions)) - } - - return fmt.Sprintf("%s => %s (%s)", - i.SourceString(), - i.DestinationString(), - detail) -} - -// SourceString returns the namespace/name format for the source, or -// just "name" if the namespace is the default namespace. -func (i *Intention) SourceString() string { - return i.partString(i.SourceNS, i.SourceName) -} - -// DestinationString returns the namespace/name format for the source, or -// just "name" if the namespace is the default namespace. -func (i *Intention) DestinationString() string { - return i.partString(i.DestinationNS, i.DestinationName) -} - -func (i *Intention) partString(ns, n string) string { - // For now we omit the default namespace from the output. In the future - // we might want to look at this and show this in a multi-namespace world. - if ns != "" && ns != IntentionDefaultNamespace { - n = ns + "/" + n - } - - return n -} - -// IntentionDefaultNamespace is the default namespace value. -const IntentionDefaultNamespace = "default" - -// IntentionAction is the action that the intention represents. This -// can be "allow" or "deny" to allowlist or denylist intentions. -type IntentionAction string - -const ( - IntentionActionAllow IntentionAction = "allow" - IntentionActionDeny IntentionAction = "deny" -) - -// IntentionSourceType is the type of the source within an intention. -type IntentionSourceType string - -const ( - // IntentionSourceConsul is a service within the Consul catalog. - IntentionSourceConsul IntentionSourceType = "consul" -) - -// IntentionMatch are the arguments for the intention match API. -type IntentionMatch struct { - By IntentionMatchType - Names []string -} - -// IntentionMatchType is the target for a match request. For example, -// matching by source will look for all intentions that match the given -// source value. -type IntentionMatchType string - -const ( - IntentionMatchSource IntentionMatchType = "source" - IntentionMatchDestination IntentionMatchType = "destination" -) - -// IntentionCheck are the arguments for the intention check API. For -// more documentation see the IntentionCheck function. -type IntentionCheck struct { - // Source and Destination are the source and destination values to - // check. The destination is always a Consul service, but the source - // may be other values as defined by the SourceType. - Source, Destination string - - // SourceType is the type of the value for the source. - SourceType IntentionSourceType -} - -// Intentions returns the list of intentions. -func (h *Connect) Intentions(q *QueryOptions) ([]*Intention, *QueryMeta, error) { - r := h.c.newRequest("GET", "/v1/connect/intentions") - r.setQueryOptions(q) - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out []*Intention - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// IntentionGetExact retrieves a single intention by its unique name instead of -// its ID. -func (h *Connect) IntentionGetExact(source, destination string, q *QueryOptions) (*Intention, *QueryMeta, error) { - r := h.c.newRequest("GET", "/v1/connect/intentions/exact") - r.setQueryOptions(q) - r.params.Set("source", source) - r.params.Set("destination", destination) - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if resp.StatusCode == 404 { - return nil, qm, nil - } else if resp.StatusCode != 200 { - var buf bytes.Buffer - io.Copy(&buf, resp.Body) - return nil, nil, fmt.Errorf( - "Unexpected response %d: %s", resp.StatusCode, buf.String()) - } - - var out Intention - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, qm, nil -} - -// IntentionGet retrieves a single intention. -// -// Deprecated: use IntentionGetExact instead -func (h *Connect) IntentionGet(id string, q *QueryOptions) (*Intention, *QueryMeta, error) { - r := h.c.newRequest("GET", "/v1/connect/intentions/"+id) - r.setQueryOptions(q) - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if resp.StatusCode == 404 { - return nil, qm, nil - } else if resp.StatusCode != 200 { - var buf bytes.Buffer - io.Copy(&buf, resp.Body) - return nil, nil, fmt.Errorf( - "Unexpected response %d: %s", resp.StatusCode, buf.String()) - } - - var out Intention - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, qm, nil -} - -// IntentionDeleteExact deletes a single intention by its unique name instead of its ID. -func (h *Connect) IntentionDeleteExact(source, destination string, q *WriteOptions) (*WriteMeta, error) { - r := h.c.newRequest("DELETE", "/v1/connect/intentions/exact") - r.setWriteOptions(q) - r.params.Set("source", source) - r.params.Set("destination", destination) - - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - qm := &WriteMeta{} - qm.RequestTime = rtt - - return qm, nil -} - -// IntentionDelete deletes a single intention. -// -// Deprecated: use IntentionDeleteExact instead -func (h *Connect) IntentionDelete(id string, q *WriteOptions) (*WriteMeta, error) { - r := h.c.newRequest("DELETE", "/v1/connect/intentions/"+id) - r.setWriteOptions(q) - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - qm := &WriteMeta{} - qm.RequestTime = rtt - - return qm, nil -} - -// IntentionMatch returns the list of intentions that match a given source -// or destination. The returned intentions are ordered by precedence where -// result[0] is the highest precedence (if that matches, then that rule overrides -// all other rules). -// -// Matching can be done for multiple names at the same time. The resulting -// map is keyed by the given names. Casing is preserved. -func (h *Connect) IntentionMatch(args *IntentionMatch, q *QueryOptions) (map[string][]*Intention, *QueryMeta, error) { - r := h.c.newRequest("GET", "/v1/connect/intentions/match") - r.setQueryOptions(q) - r.params.Set("by", string(args.By)) - for _, name := range args.Names { - r.params.Add("name", name) - } - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out map[string][]*Intention - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// IntentionCheck returns whether a given source/destination would be allowed -// or not given the current set of intentions and the configuration of Consul. -func (h *Connect) IntentionCheck(args *IntentionCheck, q *QueryOptions) (bool, *QueryMeta, error) { - r := h.c.newRequest("GET", "/v1/connect/intentions/check") - r.setQueryOptions(q) - r.params.Set("source", args.Source) - r.params.Set("destination", args.Destination) - if args.SourceType != "" { - r.params.Set("source-type", string(args.SourceType)) - } - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return false, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return false, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out struct{ Allowed bool } - if err := decodeBody(resp, &out); err != nil { - return false, nil, err - } - return out.Allowed, qm, nil -} - -// IntentionUpsert will update an existing intention. The Source & Destination parameters -// in the structure must be non-empty. The ID must be empty. -func (c *Connect) IntentionUpsert(ixn *Intention, q *WriteOptions) (*WriteMeta, error) { - r := c.c.newRequest("PUT", "/v1/connect/intentions/exact") - r.setWriteOptions(q) - r.params.Set("source", maybePrefixNamespaceAndPartition(ixn.SourcePartition, ixn.SourceNS, ixn.SourceName)) - r.params.Set("destination", maybePrefixNamespaceAndPartition(ixn.DestinationPartition, ixn.DestinationNS, ixn.DestinationName)) - r.obj = ixn - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - return wm, nil -} - -func maybePrefixNamespaceAndPartition(part, ns, name string) string { - switch { - case part == "" && ns == "": - return name - case part == "" && ns != "": - return ns + "/" + name - case part != "" && ns == "": - return part + "/" + IntentionDefaultNamespace + "/" + name - default: - return part + "/" + ns + "/" + name - } -} - -// IntentionCreate will create a new intention. The ID in the given -// structure must be empty and a generate ID will be returned on -// success. -// -// Deprecated: use IntentionUpsert instead -func (c *Connect) IntentionCreate(ixn *Intention, q *WriteOptions) (string, *WriteMeta, error) { - r := c.c.newRequest("POST", "/v1/connect/intentions") - r.setWriteOptions(q) - r.obj = ixn - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return "", nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return "", nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - - var out struct{ ID string } - if err := decodeBody(resp, &out); err != nil { - return "", nil, err - } - return out.ID, wm, nil -} - -// IntentionUpdate will update an existing intention. The ID in the given -// structure must be non-empty. -// -// Deprecated: use IntentionUpsert instead -func (c *Connect) IntentionUpdate(ixn *Intention, q *WriteOptions) (*WriteMeta, error) { - r := c.c.newRequest("PUT", "/v1/connect/intentions/"+ixn.ID) - r.setWriteOptions(q) - r.obj = ixn - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - return wm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/coordinate.go b/vendor/github.com/hashicorp/consul/api/coordinate.go deleted file mode 100644 index b0269adaef6..00000000000 --- a/vendor/github.com/hashicorp/consul/api/coordinate.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "github.com/hashicorp/serf/coordinate" -) - -// CoordinateEntry represents a node and its associated network coordinate. -type CoordinateEntry struct { - Node string - Segment string - Partition string `json:",omitempty"` - Coord *coordinate.Coordinate -} - -// CoordinateDatacenterMap has the coordinates for servers in a given datacenter -// and area. Network coordinates are only compatible within the same area. -type CoordinateDatacenterMap struct { - Datacenter string - AreaID string - Coordinates []CoordinateEntry -} - -// Coordinate can be used to query the coordinate endpoints -type Coordinate struct { - c *Client -} - -// Coordinate returns a handle to the coordinate endpoints -func (c *Client) Coordinate() *Coordinate { - return &Coordinate{c} -} - -// Datacenters is used to return the coordinates of all the servers in the WAN -// pool. -func (c *Coordinate) Datacenters() ([]*CoordinateDatacenterMap, error) { - r := c.c.newRequest("GET", "/v1/coordinate/datacenters") - _, resp, err := c.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - var out []*CoordinateDatacenterMap - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return out, nil -} - -// Nodes is used to return the coordinates of all the nodes in the LAN pool. -func (c *Coordinate) Nodes(q *QueryOptions) ([]*CoordinateEntry, *QueryMeta, error) { - r := c.c.newRequest("GET", "/v1/coordinate/nodes") - r.setQueryOptions(q) - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out []*CoordinateEntry - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// Update inserts or updates the LAN coordinate of a node. -func (c *Coordinate) Update(coord *CoordinateEntry, q *WriteOptions) (*WriteMeta, error) { - r := c.c.newRequest("PUT", "/v1/coordinate/update") - r.setWriteOptions(q) - r.obj = coord - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - - return wm, nil -} - -// Node is used to return the coordinates of a single node in the LAN pool. -func (c *Coordinate) Node(node string, q *QueryOptions) ([]*CoordinateEntry, *QueryMeta, error) { - r := c.c.newRequest("GET", "/v1/coordinate/node/"+node) - r.setQueryOptions(q) - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out []*CoordinateEntry - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/debug.go b/vendor/github.com/hashicorp/consul/api/debug.go deleted file mode 100644 index e6b5dc52dac..00000000000 --- a/vendor/github.com/hashicorp/consul/api/debug.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "context" - "fmt" - "io" - "strconv" -) - -// Debug can be used to query the /debug/pprof endpoints to gather -// profiling information about the target agent.Debug -// -// The agent must have enable_debug set to true for profiling to be enabled -// and for these endpoints to function. -type Debug struct { - c *Client -} - -// Debug returns a handle that exposes the internal debug endpoints. -func (c *Client) Debug() *Debug { - return &Debug{c} -} - -// Heap returns a pprof heap dump -func (d *Debug) Heap() ([]byte, error) { - r := d.c.newRequest("GET", "/debug/pprof/heap") - _, resp, err := d.c.doRequest(r) - if err != nil { - return nil, fmt.Errorf("error making request: %s", err) - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - // We return a raw response because we're just passing through a response - // from the pprof handlers - body, err := io.ReadAll(resp.Body) - if err != nil { - return nil, fmt.Errorf("error decoding body: %s", err) - } - - return body, nil -} - -// Profile returns a pprof CPU profile for the specified number of seconds -func (d *Debug) Profile(seconds int) ([]byte, error) { - r := d.c.newRequest("GET", "/debug/pprof/profile") - - // Capture a profile for the specified number of seconds - r.params.Set("seconds", strconv.Itoa(seconds)) - - _, resp, err := d.c.doRequest(r) - if err != nil { - return nil, fmt.Errorf("error making request: %s", err) - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - // We return a raw response because we're just passing through a response - // from the pprof handlers - body, err := io.ReadAll(resp.Body) - if err != nil { - return nil, fmt.Errorf("error decoding body: %s", err) - } - - return body, nil -} - -// PProf returns a pprof profile for the specified number of seconds. The caller -// is responsible for closing the returned io.ReadCloser once all bytes are read. -func (d *Debug) PProf(ctx context.Context, name string, seconds int) (io.ReadCloser, error) { - r := d.c.newRequest("GET", "/debug/pprof/"+name) - r.ctx = ctx - - // Capture a profile for the specified number of seconds - r.params.Set("seconds", strconv.Itoa(seconds)) - - _, resp, err := d.c.doRequest(r) - if err != nil { - return nil, fmt.Errorf("error making request: %s", err) - } - if err := requireOK(resp); err != nil { - return nil, err - } - return resp.Body, nil -} - -// Trace returns an execution trace -func (d *Debug) Trace(seconds int) ([]byte, error) { - r := d.c.newRequest("GET", "/debug/pprof/trace") - - // Capture a trace for the specified number of seconds - r.params.Set("seconds", strconv.Itoa(seconds)) - - _, resp, err := d.c.doRequest(r) - if err != nil { - return nil, fmt.Errorf("error making request: %s", err) - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - // We return a raw response because we're just passing through a response - // from the pprof handlers - body, err := io.ReadAll(resp.Body) - if err != nil { - return nil, fmt.Errorf("error decoding body: %s", err) - } - - return body, nil -} - -// Goroutine returns a pprof goroutine profile -func (d *Debug) Goroutine() ([]byte, error) { - r := d.c.newRequest("GET", "/debug/pprof/goroutine") - - _, resp, err := d.c.doRequest(r) - if err != nil { - return nil, fmt.Errorf("error making request: %s", err) - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - // We return a raw response because we're just passing through a response - // from the pprof handlers - body, err := io.ReadAll(resp.Body) - if err != nil { - return nil, fmt.Errorf("error decoding body: %s", err) - } - - return body, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/discovery_chain.go b/vendor/github.com/hashicorp/consul/api/discovery_chain.go deleted file mode 100644 index 4b6260cf34a..00000000000 --- a/vendor/github.com/hashicorp/consul/api/discovery_chain.go +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "fmt" - "time" -) - -// DiscoveryChain can be used to query the discovery-chain endpoints -type DiscoveryChain struct { - c *Client -} - -// DiscoveryChain returns a handle to the discovery-chain endpoints -func (c *Client) DiscoveryChain() *DiscoveryChain { - return &DiscoveryChain{c} -} - -func (d *DiscoveryChain) Get(name string, opts *DiscoveryChainOptions, q *QueryOptions) (*DiscoveryChainResponse, *QueryMeta, error) { - if name == "" { - return nil, nil, fmt.Errorf("Name parameter must not be empty") - } - - method := "GET" - if opts != nil && opts.requiresPOST() { - method = "POST" - } - - r := d.c.newRequest(method, fmt.Sprintf("/v1/discovery-chain/%s", name)) - r.setQueryOptions(q) - - if opts != nil { - if opts.EvaluateInDatacenter != "" { - r.params.Set("compile-dc", opts.EvaluateInDatacenter) - } - } - - if method == "POST" { - r.obj = opts - } - rtt, resp, err := d.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out DiscoveryChainResponse - - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -type DiscoveryChainOptions struct { - EvaluateInDatacenter string `json:"-"` - - // OverrideMeshGateway allows for the mesh gateway setting to be overridden - // for any resolver in the compiled chain. - OverrideMeshGateway MeshGatewayConfig `json:",omitempty"` - - // OverrideProtocol allows for the final protocol for the chain to be - // altered. - // - // - If the chain ordinarily would be TCP and an L7 protocol is passed here - // the chain will not include Routers or Splitters. - // - // - If the chain ordinarily would be L7 and TCP is passed here the chain - // will not include Routers or Splitters. - OverrideProtocol string `json:",omitempty"` - - // OverrideConnectTimeout allows for the ConnectTimeout setting to be - // overridden for any resolver in the compiled chain. - OverrideConnectTimeout time.Duration `json:",omitempty"` -} - -func (o *DiscoveryChainOptions) requiresPOST() bool { - if o == nil { - return false - } - return o.OverrideMeshGateway.Mode != "" || - o.OverrideProtocol != "" || - o.OverrideConnectTimeout != 0 -} - -type DiscoveryChainResponse struct { - Chain *CompiledDiscoveryChain -} - -type CompiledDiscoveryChain struct { - ServiceName string - Namespace string - Datacenter string - - // CustomizationHash is a unique hash of any data that affects the - // compilation of the discovery chain other than config entries or the - // name/namespace/datacenter evaluation criteria. - // - // If set, this value should be used to prefix/suffix any generated load - // balancer data plane objects to avoid sharing customized and - // non-customized versions. - CustomizationHash string - - // Default indicates if this discovery chain is based on no - // service-resolver, service-splitter, or service-router config entries. - Default bool - - // Protocol is the overall protocol shared by everything in the chain. - Protocol string - - // ServiceMeta is the metadata from the underlying service-defaults config - // entry for the service named ServiceName. - ServiceMeta map[string]string - - // StartNode is the first key into the Nodes map that should be followed - // when walking the discovery chain. - StartNode string - - // Nodes contains all nodes available for traversal in the chain keyed by a - // unique name. You can walk this by starting with StartNode. - // - // NOTE: The names should be treated as opaque values and are only - // guaranteed to be consistent within a single compilation. - Nodes map[string]*DiscoveryGraphNode - - // Targets is a list of all targets used in this chain. - // - // NOTE: The names should be treated as opaque values and are only - // guaranteed to be consistent within a single compilation. - Targets map[string]*DiscoveryTarget -} - -const ( - DiscoveryGraphNodeTypeRouter = "router" - DiscoveryGraphNodeTypeSplitter = "splitter" - DiscoveryGraphNodeTypeResolver = "resolver" -) - -// DiscoveryGraphNode is a single node in the compiled discovery chain. -type DiscoveryGraphNode struct { - Type string - Name string // this is NOT necessarily a service - - // fields for Type==router - Routes []*DiscoveryRoute - - // fields for Type==splitter - Splits []*DiscoverySplit - - // fields for Type==resolver - Resolver *DiscoveryResolver - - // shared by Type==resolver || Type==splitter - LoadBalancer *LoadBalancer `json:",omitempty"` -} - -// compiled form of ServiceRoute -type DiscoveryRoute struct { - Definition *ServiceRoute - NextNode string -} - -// compiled form of ServiceSplit -type DiscoverySplit struct { - Weight float32 - NextNode string -} - -// compiled form of ServiceResolverConfigEntry -type DiscoveryResolver struct { - Default bool - ConnectTimeout time.Duration - Target string - Failover *DiscoveryFailover -} - -func (r *DiscoveryResolver) MarshalJSON() ([]byte, error) { - type Alias DiscoveryResolver - exported := &struct { - ConnectTimeout string `json:",omitempty"` - *Alias - }{ - ConnectTimeout: r.ConnectTimeout.String(), - Alias: (*Alias)(r), - } - if r.ConnectTimeout == 0 { - exported.ConnectTimeout = "" - } - - return json.Marshal(exported) -} - -func (r *DiscoveryResolver) UnmarshalJSON(data []byte) error { - type Alias DiscoveryResolver - aux := &struct { - ConnectTimeout string - *Alias - }{ - Alias: (*Alias)(r), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - var err error - if aux.ConnectTimeout != "" { - if r.ConnectTimeout, err = time.ParseDuration(aux.ConnectTimeout); err != nil { - return err - } - } - return nil -} - -// compiled form of ServiceResolverFailover -type DiscoveryFailover struct { - Targets []string - Policy ServiceResolverFailoverPolicy `json:",omitempty"` -} - -// DiscoveryTarget represents all of the inputs necessary to use a resolver -// config entry to execute a catalog query to generate a list of service -// instances during discovery. -type DiscoveryTarget struct { - ID string - - Service string - ServiceSubset string - Namespace string - Datacenter string - - MeshGateway MeshGatewayConfig - Subset ServiceResolverSubset - ConnectTimeout time.Duration - External bool - SNI string - Name string -} - -func (t *DiscoveryTarget) MarshalJSON() ([]byte, error) { - type Alias DiscoveryTarget - exported := &struct { - ConnectTimeout string `json:",omitempty"` - *Alias - }{ - ConnectTimeout: t.ConnectTimeout.String(), - Alias: (*Alias)(t), - } - if t.ConnectTimeout == 0 { - exported.ConnectTimeout = "" - } - - return json.Marshal(exported) -} - -func (t *DiscoveryTarget) UnmarshalJSON(data []byte) error { - type Alias DiscoveryTarget - aux := &struct { - ConnectTimeout string - *Alias - }{ - Alias: (*Alias)(t), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - var err error - if aux.ConnectTimeout != "" { - if t.ConnectTimeout, err = time.ParseDuration(aux.ConnectTimeout); err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/hashicorp/consul/api/event.go b/vendor/github.com/hashicorp/consul/api/event.go deleted file mode 100644 index efba89d3b56..00000000000 --- a/vendor/github.com/hashicorp/consul/api/event.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "bytes" - "strconv" -) - -// Event can be used to query the Event endpoints -type Event struct { - c *Client -} - -// UserEvent represents an event that was fired by the user -type UserEvent struct { - ID string - Name string - Payload []byte - NodeFilter string - ServiceFilter string - TagFilter string - Version int - LTime uint64 -} - -// Event returns a handle to the event endpoints -func (c *Client) Event() *Event { - return &Event{c} -} - -// Fire is used to fire a new user event. Only the Name, Payload and Filters -// are respected. This returns the ID or an associated error. Cross DC requests -// are supported. -func (e *Event) Fire(params *UserEvent, q *WriteOptions) (string, *WriteMeta, error) { - r := e.c.newRequest("PUT", "/v1/event/fire/"+params.Name) - r.setWriteOptions(q) - if params.NodeFilter != "" { - r.params.Set("node", params.NodeFilter) - } - if params.ServiceFilter != "" { - r.params.Set("service", params.ServiceFilter) - } - if params.TagFilter != "" { - r.params.Set("tag", params.TagFilter) - } - if params.Payload != nil { - r.body = bytes.NewReader(params.Payload) - } - r.header.Set("Content-Type", "application/octet-stream") - - rtt, resp, err := e.c.doRequest(r) - if err != nil { - return "", nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return "", nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - var out UserEvent - if err := decodeBody(resp, &out); err != nil { - return "", nil, err - } - return out.ID, wm, nil -} - -// List is used to get the most recent events an agent has received. -// This list can be optionally filtered by the name. This endpoint supports -// quasi-blocking queries. The index is not monotonic, nor does it provide provide -// LastContact or KnownLeader. -func (e *Event) List(name string, q *QueryOptions) ([]*UserEvent, *QueryMeta, error) { - r := e.c.newRequest("GET", "/v1/event/list") - r.setQueryOptions(q) - if name != "" { - r.params.Set("name", name) - } - rtt, resp, err := e.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var entries []*UserEvent - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// IDToIndex is a bit of a hack. This simulates the index generation to -// convert an event ID into a WaitIndex. -func (e *Event) IDToIndex(uuid string) uint64 { - lower := uuid[0:8] + uuid[9:13] + uuid[14:18] - upper := uuid[19:23] + uuid[24:36] - lowVal, err := strconv.ParseUint(lower, 16, 64) - if err != nil { - panic("Failed to convert " + lower) - } - highVal, err := strconv.ParseUint(upper, 16, 64) - if err != nil { - panic("Failed to convert " + upper) - } - return lowVal ^ highVal -} diff --git a/vendor/github.com/hashicorp/consul/api/exported_services.go b/vendor/github.com/hashicorp/consul/api/exported_services.go deleted file mode 100644 index 50483e9c8da..00000000000 --- a/vendor/github.com/hashicorp/consul/api/exported_services.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -type ResolvedExportedService struct { - // Service is the name of the service which is exported. - Service string - - // Partition of the service - Partition string `json:",omitempty"` - - // Namespace of the service - Namespace string `json:",omitempty"` - - // Consumers is a list of downstream consumers of the service. - Consumers ResolvedConsumers -} - -type ResolvedConsumers struct { - Peers []string `json:",omitempty"` - Partitions []string `json:",omitempty"` -} - -func (c *Client) ExportedServices(q *QueryOptions) ([]ResolvedExportedService, *QueryMeta, error) { - - r := c.newRequest("GET", "/v1/exported-services") - r.setQueryOptions(q) - rtt, resp, err := c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var expSvcs []ResolvedExportedService - - if err := decodeBody(resp, &expSvcs); err != nil { - return nil, nil, err - } - - return expSvcs, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/health.go b/vendor/github.com/hashicorp/consul/api/health.go deleted file mode 100644 index a0230020460..00000000000 --- a/vendor/github.com/hashicorp/consul/api/health.go +++ /dev/null @@ -1,398 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "fmt" - "strings" - "time" -) - -const ( - // HealthAny is special, and is used as a wild card, - // not as a specific state. - HealthAny = "any" - HealthPassing = "passing" - HealthWarning = "warning" - HealthCritical = "critical" - HealthMaint = "maintenance" -) - -const ( - serviceHealth = "service" - connectHealth = "connect" - ingressHealth = "ingress" -) - -const ( - // NodeMaint is the special key set by a node in maintenance mode. - NodeMaint = "_node_maintenance" - - // ServiceMaintPrefix is the prefix for a service in maintenance mode. - ServiceMaintPrefix = "_service_maintenance:" -) - -// HealthCheck is used to represent a single check -type HealthCheck struct { - Node string - CheckID string - Name string - Status string - Notes string - Output string - ServiceID string - ServiceName string - ServiceTags []string - Type string - Namespace string `json:",omitempty"` - Partition string `json:",omitempty"` - ExposedPort int - PeerName string `json:",omitempty"` - - Definition HealthCheckDefinition - - CreateIndex uint64 - ModifyIndex uint64 -} - -// HealthCheckDefinition is used to store the details about -// a health check's execution. -type HealthCheckDefinition struct { - HTTP string - Header map[string][]string - Method string - Body string - TLSServerName string - TLSSkipVerify bool - TCP string - TCPUseTLS bool - UDP string - GRPC string - OSService string - GRPCUseTLS bool - IntervalDuration time.Duration `json:"-"` - TimeoutDuration time.Duration `json:"-"` - DeregisterCriticalServiceAfterDuration time.Duration `json:"-"` - - // DEPRECATED in Consul 1.4.1. Use the above time.Duration fields instead. - Interval ReadableDuration - Timeout ReadableDuration - DeregisterCriticalServiceAfter ReadableDuration -} - -func (d *HealthCheckDefinition) MarshalJSON() ([]byte, error) { - type Alias HealthCheckDefinition - out := &struct { - Interval string - Timeout string - DeregisterCriticalServiceAfter string - *Alias - }{ - Interval: d.Interval.String(), - Timeout: d.Timeout.String(), - DeregisterCriticalServiceAfter: d.DeregisterCriticalServiceAfter.String(), - Alias: (*Alias)(d), - } - - if d.IntervalDuration != 0 { - out.Interval = d.IntervalDuration.String() - } else if d.Interval != 0 { - out.Interval = d.Interval.String() - } - if d.TimeoutDuration != 0 { - out.Timeout = d.TimeoutDuration.String() - } else if d.Timeout != 0 { - out.Timeout = d.Timeout.String() - } - if d.DeregisterCriticalServiceAfterDuration != 0 { - out.DeregisterCriticalServiceAfter = d.DeregisterCriticalServiceAfterDuration.String() - } else if d.DeregisterCriticalServiceAfter != 0 { - out.DeregisterCriticalServiceAfter = d.DeregisterCriticalServiceAfter.String() - } - - return json.Marshal(out) -} - -func (t *HealthCheckDefinition) UnmarshalJSON(data []byte) (err error) { - type Alias HealthCheckDefinition - aux := &struct { - IntervalDuration interface{} - TimeoutDuration interface{} - DeregisterCriticalServiceAfterDuration interface{} - *Alias - }{ - Alias: (*Alias)(t), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - - // Parse the values into both the time.Duration and old ReadableDuration fields. - - if aux.IntervalDuration == nil { - t.IntervalDuration = time.Duration(t.Interval) - } else { - switch v := aux.IntervalDuration.(type) { - case string: - if t.IntervalDuration, err = time.ParseDuration(v); err != nil { - return err - } - case float64: - t.IntervalDuration = time.Duration(v) - } - t.Interval = ReadableDuration(t.IntervalDuration) - } - - if aux.TimeoutDuration == nil { - t.TimeoutDuration = time.Duration(t.Timeout) - } else { - switch v := aux.TimeoutDuration.(type) { - case string: - if t.TimeoutDuration, err = time.ParseDuration(v); err != nil { - return err - } - case float64: - t.TimeoutDuration = time.Duration(v) - } - t.Timeout = ReadableDuration(t.TimeoutDuration) - } - if aux.DeregisterCriticalServiceAfterDuration == nil { - t.DeregisterCriticalServiceAfterDuration = time.Duration(t.DeregisterCriticalServiceAfter) - } else { - switch v := aux.DeregisterCriticalServiceAfterDuration.(type) { - case string: - if t.DeregisterCriticalServiceAfterDuration, err = time.ParseDuration(v); err != nil { - return err - } - case float64: - t.DeregisterCriticalServiceAfterDuration = time.Duration(v) - } - t.DeregisterCriticalServiceAfter = ReadableDuration(t.DeregisterCriticalServiceAfterDuration) - } - - return nil -} - -// HealthChecks is a collection of HealthCheck structs. -type HealthChecks []*HealthCheck - -// AggregatedStatus returns the "best" status for the list of health checks. -// Because a given entry may have many service and node-level health checks -// attached, this function determines the best representative of the status as -// as single string using the following heuristic: -// -// maintenance > critical > warning > passing -func (c HealthChecks) AggregatedStatus() string { - var passing, warning, critical, maintenance bool - for _, check := range c { - id := check.CheckID - if id == NodeMaint || strings.HasPrefix(id, ServiceMaintPrefix) { - maintenance = true - continue - } - - switch check.Status { - case HealthPassing: - passing = true - case HealthWarning: - warning = true - case HealthCritical: - critical = true - default: - return "" - } - } - - switch { - case maintenance: - return HealthMaint - case critical: - return HealthCritical - case warning: - return HealthWarning - case passing: - return HealthPassing - default: - return HealthPassing - } -} - -// ServiceEntry is used for the health service endpoint -type ServiceEntry struct { - Node *Node - Service *AgentService - Checks HealthChecks -} - -// Health can be used to query the Health endpoints -type Health struct { - c *Client -} - -// Health returns a handle to the health endpoints -func (c *Client) Health() *Health { - return &Health{c} -} - -// Node is used to query for checks belonging to a given node -func (h *Health) Node(node string, q *QueryOptions) (HealthChecks, *QueryMeta, error) { - r := h.c.newRequest("GET", "/v1/health/node/"+node) - r.setQueryOptions(q) - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out HealthChecks - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// Checks is used to return the checks associated with a service -func (h *Health) Checks(service string, q *QueryOptions) (HealthChecks, *QueryMeta, error) { - r := h.c.newRequest("GET", "/v1/health/checks/"+service) - r.setQueryOptions(q) - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out HealthChecks - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// Service is used to query health information along with service info -// for a given service. It can optionally do server-side filtering on a tag -// or nodes with passing health checks only. -func (h *Health) Service(service, tag string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) { - var tags []string - if tag != "" { - tags = []string{tag} - } - return h.service(service, tags, passingOnly, q, serviceHealth) -} - -func (h *Health) ServiceMultipleTags(service string, tags []string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) { - return h.service(service, tags, passingOnly, q, serviceHealth) -} - -// Connect is equivalent to Service except that it will only return services -// which are Connect-enabled and will returns the connection address for Connect -// client's to use which may be a proxy in front of the named service. If -// passingOnly is true only instances where both the service and any proxy are -// healthy will be returned. -func (h *Health) Connect(service, tag string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) { - var tags []string - if tag != "" { - tags = []string{tag} - } - return h.service(service, tags, passingOnly, q, connectHealth) -} - -func (h *Health) ConnectMultipleTags(service string, tags []string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) { - return h.service(service, tags, passingOnly, q, connectHealth) -} - -// Ingress is equivalent to Connect except that it will only return associated -// ingress gateways for the requested service. -func (h *Health) Ingress(service string, passingOnly bool, q *QueryOptions) ([]*ServiceEntry, *QueryMeta, error) { - var tags []string - return h.service(service, tags, passingOnly, q, ingressHealth) -} - -func (h *Health) service(service string, tags []string, passingOnly bool, q *QueryOptions, healthType string) ([]*ServiceEntry, *QueryMeta, error) { - var path string - switch healthType { - case connectHealth: - path = "/v1/health/connect/" + service - case ingressHealth: - path = "/v1/health/ingress/" + service - default: - path = "/v1/health/service/" + service - } - - r := h.c.newRequest("GET", path) - r.setQueryOptions(q) - if len(tags) > 0 { - for _, tag := range tags { - r.params.Add("tag", tag) - } - } - if passingOnly { - r.params.Set(HealthPassing, "1") - } - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out []*ServiceEntry - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// State is used to retrieve all the checks in a given state. -// The wildcard "any" state can also be used for all checks. -func (h *Health) State(state string, q *QueryOptions) (HealthChecks, *QueryMeta, error) { - switch state { - case HealthAny: - case HealthWarning: - case HealthCritical: - case HealthPassing: - default: - return nil, nil, fmt.Errorf("Unsupported state: %v", state) - } - r := h.c.newRequest("GET", "/v1/health/state/"+state) - r.setQueryOptions(q) - rtt, resp, err := h.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out HealthChecks - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/internal.go b/vendor/github.com/hashicorp/consul/api/internal.go deleted file mode 100644 index b5f400f4b19..00000000000 --- a/vendor/github.com/hashicorp/consul/api/internal.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import "context" - -// Internal can be used to query endpoints that are intended for -// Hashicorp internal-use only. -type Internal struct { - c *Client -} - -// Internal returns a handle to endpoints that are for internal -// Hashicorp usage only. There is not guarantee that these will -// be backwards-compatible or supported, so usage of these is -// not encouraged. -func (c *Client) Internal() *Internal { - return &Internal{c} -} - -type AssignServiceManualVIPsRequest struct { - Service string - ManualVIPs []string -} - -type AssignServiceManualVIPsResponse struct { - ServiceFound bool `json:"Found"` - UnassignedFrom []PeeredServiceName -} - -type PeeredServiceName struct { - ServiceName CompoundServiceName - Peer string -} - -func (i *Internal) AssignServiceVirtualIP( - ctx context.Context, - service string, - manualVIPs []string, - wo *WriteOptions, -) (*AssignServiceManualVIPsResponse, *QueryMeta, error) { - req := i.c.newRequest("PUT", "/v1/internal/service-virtual-ip") - req.setWriteOptions(wo) - req.ctx = ctx - req.obj = AssignServiceManualVIPsRequest{ - Service: service, - ManualVIPs: manualVIPs, - } - rtt, resp, err := i.c.doRequest(req) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{RequestTime: rtt} - parseQueryMeta(resp, qm) - - var out AssignServiceManualVIPsResponse - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/kv.go b/vendor/github.com/hashicorp/consul/api/kv.go deleted file mode 100644 index b9d330a6fd3..00000000000 --- a/vendor/github.com/hashicorp/consul/api/kv.go +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "bytes" - "fmt" - "io" - "net/http" - "strconv" - "strings" -) - -// KVPair is used to represent a single K/V entry -type KVPair struct { - // Key is the name of the key. It is also part of the URL path when accessed - // via the API. - Key string - - // CreateIndex holds the index corresponding the creation of this KVPair. This - // is a read-only field. - CreateIndex uint64 - - // ModifyIndex is used for the Check-And-Set operations and can also be fed - // back into the WaitIndex of the QueryOptions in order to perform blocking - // queries. - ModifyIndex uint64 - - // LockIndex holds the index corresponding to a lock on this key, if any. This - // is a read-only field. - LockIndex uint64 - - // Flags are any user-defined flags on the key. It is up to the implementer - // to check these values, since Consul does not treat them specially. - Flags uint64 - - // Value is the value for the key. This can be any value, but it will be - // base64 encoded upon transport. - Value []byte - - // Session is a string representing the ID of the session. Any other - // interactions with this key over the same session must specify the same - // session ID. - Session string - - // Namespace is the namespace the KVPair is associated with - // Namespacing is a Consul Enterprise feature. - Namespace string `json:",omitempty"` - - // Partition is the partition the KVPair is associated with - // Admin Partition is a Consul Enterprise feature. - Partition string `json:",omitempty"` -} - -// KVPairs is a list of KVPair objects -type KVPairs []*KVPair - -// KV is used to manipulate the K/V API -type KV struct { - c *Client -} - -// KV is used to return a handle to the K/V apis -func (c *Client) KV() *KV { - return &KV{c} -} - -// Get is used to lookup a single key. The returned pointer -// to the KVPair will be nil if the key does not exist. -func (k *KV) Get(key string, q *QueryOptions) (*KVPair, *QueryMeta, error) { - resp, qm, err := k.getInternal(key, nil, q) - if err != nil { - return nil, nil, err - } - if resp == nil { - return nil, qm, nil - } - defer closeResponseBody(resp) - - var entries []*KVPair - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - if len(entries) > 0 { - return entries[0], qm, nil - } - return nil, qm, nil -} - -// List is used to lookup all keys under a prefix -func (k *KV) List(prefix string, q *QueryOptions) (KVPairs, *QueryMeta, error) { - resp, qm, err := k.getInternal(prefix, map[string]string{"recurse": ""}, q) - if err != nil { - return nil, nil, err - } - if resp == nil { - return nil, qm, nil - } - defer closeResponseBody(resp) - - var entries []*KVPair - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// Keys is used to list all the keys under a prefix. Optionally, -// a separator can be used to limit the responses. -func (k *KV) Keys(prefix, separator string, q *QueryOptions) ([]string, *QueryMeta, error) { - params := map[string]string{"keys": ""} - if separator != "" { - params["separator"] = separator - } - resp, qm, err := k.getInternal(prefix, params, q) - if err != nil { - return nil, nil, err - } - if resp == nil { - return nil, qm, nil - } - defer closeResponseBody(resp) - - var entries []string - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -func (k *KV) getInternal(key string, params map[string]string, q *QueryOptions) (*http.Response, *QueryMeta, error) { - r := k.c.newRequest("GET", "/v1/kv/"+strings.TrimPrefix(key, "/")) - r.setQueryOptions(q) - for param, val := range params { - r.params.Set(param, val) - } - rtt, resp, err := k.c.doRequest(r) - if err != nil { - return nil, nil, err - } - - err = requireHttpCodes(resp, 200, 404) - if err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if resp.StatusCode == 404 { - closeResponseBody(resp) - return nil, qm, nil - } - - return resp, qm, nil -} - -// Put is used to write a new value. Only the -// Key, Flags and Value is respected. -func (k *KV) Put(p *KVPair, q *WriteOptions) (*WriteMeta, error) { - params := make(map[string]string, 1) - if p.Flags != 0 { - params["flags"] = strconv.FormatUint(p.Flags, 10) - } - _, wm, err := k.put(p.Key, params, p.Value, q) - return wm, err -} - -// CAS is used for a Check-And-Set operation. The Key, -// ModifyIndex, Flags and Value are respected. Returns true -// on success or false on failures. -func (k *KV) CAS(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) { - params := make(map[string]string, 2) - if p.Flags != 0 { - params["flags"] = strconv.FormatUint(p.Flags, 10) - } - params["cas"] = strconv.FormatUint(p.ModifyIndex, 10) - return k.put(p.Key, params, p.Value, q) -} - -// Acquire is used for a lock acquisition operation. The Key, -// Flags, Value and Session are respected. Returns true -// on success or false on failures. -func (k *KV) Acquire(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) { - params := make(map[string]string, 2) - if p.Flags != 0 { - params["flags"] = strconv.FormatUint(p.Flags, 10) - } - params["acquire"] = p.Session - return k.put(p.Key, params, p.Value, q) -} - -// Release is used for a lock release operation. The Key, -// Flags, Value and Session are respected. Returns true -// on success or false on failures. -func (k *KV) Release(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) { - params := make(map[string]string, 2) - if p.Flags != 0 { - params["flags"] = strconv.FormatUint(p.Flags, 10) - } - params["release"] = p.Session - return k.put(p.Key, params, p.Value, q) -} - -func (k *KV) put(key string, params map[string]string, body []byte, q *WriteOptions) (bool, *WriteMeta, error) { - if len(key) > 0 && key[0] == '/' { - return false, nil, fmt.Errorf("Invalid key. Key must not begin with a '/': %s", key) - } - - r := k.c.newRequest("PUT", "/v1/kv/"+key) - r.setWriteOptions(q) - for param, val := range params { - r.params.Set(param, val) - } - r.body = bytes.NewReader(body) - r.header.Set("Content-Type", "application/octet-stream") - rtt, resp, err := k.c.doRequest(r) - if err != nil { - return false, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return false, nil, err - } - - qm := &WriteMeta{} - qm.RequestTime = rtt - - var buf bytes.Buffer - if _, err := io.Copy(&buf, resp.Body); err != nil { - return false, nil, fmt.Errorf("Failed to read response: %v", err) - } - res := strings.Contains(buf.String(), "true") - return res, qm, nil -} - -// Delete is used to delete a single key -func (k *KV) Delete(key string, w *WriteOptions) (*WriteMeta, error) { - _, qm, err := k.deleteInternal(key, nil, w) - return qm, err -} - -// DeleteCAS is used for a Delete Check-And-Set operation. The Key -// and ModifyIndex are respected. Returns true on success or false on failures. -func (k *KV) DeleteCAS(p *KVPair, q *WriteOptions) (bool, *WriteMeta, error) { - params := map[string]string{ - "cas": strconv.FormatUint(p.ModifyIndex, 10), - } - return k.deleteInternal(p.Key, params, q) -} - -// DeleteTree is used to delete all keys under a prefix -func (k *KV) DeleteTree(prefix string, w *WriteOptions) (*WriteMeta, error) { - _, qm, err := k.deleteInternal(prefix, map[string]string{"recurse": ""}, w) - return qm, err -} - -func (k *KV) deleteInternal(key string, params map[string]string, q *WriteOptions) (bool, *WriteMeta, error) { - r := k.c.newRequest("DELETE", "/v1/kv/"+strings.TrimPrefix(key, "/")) - r.setWriteOptions(q) - for param, val := range params { - r.params.Set(param, val) - } - rtt, resp, err := k.c.doRequest(r) - if err != nil { - return false, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return false, nil, err - } - - qm := &WriteMeta{} - qm.RequestTime = rtt - - var buf bytes.Buffer - if _, err := io.Copy(&buf, resp.Body); err != nil { - return false, nil, fmt.Errorf("Failed to read response: %v", err) - } - res := strings.Contains(buf.String(), "true") - return res, qm, nil -} - -// The Txn function has been deprecated from the KV object; please see the Txn -// object for more information about Transactions. -func (k *KV) Txn(txn KVTxnOps, q *QueryOptions) (bool, *KVTxnResponse, *QueryMeta, error) { - var ops TxnOps - for _, op := range txn { - ops = append(ops, &TxnOp{KV: op}) - } - - respOk, txnResp, qm, err := k.c.txn(ops, q) - if err != nil { - return false, nil, nil, err - } - - // Convert from the internal format. - kvResp := KVTxnResponse{ - Errors: txnResp.Errors, - } - for _, result := range txnResp.Results { - kvResp.Results = append(kvResp.Results, result.KV) - } - return respOk, &kvResp, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/lock.go b/vendor/github.com/hashicorp/consul/api/lock.go deleted file mode 100644 index e9529f7bde6..00000000000 --- a/vendor/github.com/hashicorp/consul/api/lock.go +++ /dev/null @@ -1,411 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "fmt" - "sync" - "time" -) - -const ( - // DefaultLockSessionName is the Session Name we assign if none is provided - DefaultLockSessionName = "Consul API Lock" - - // DefaultLockSessionTTL is the default session TTL if no Session is provided - // when creating a new Lock. This is used because we do not have another - // other check to depend upon. - DefaultLockSessionTTL = "15s" - - // DefaultLockWaitTime is how long we block for at a time to check if lock - // acquisition is possible. This affects the minimum time it takes to cancel - // a Lock acquisition. - DefaultLockWaitTime = 15 * time.Second - - // DefaultLockRetryTime is how long we wait after a failed lock acquisition - // before attempting to do the lock again. This is so that once a lock-delay - // is in effect, we do not hot loop retrying the acquisition. - DefaultLockRetryTime = 5 * time.Second - - // DefaultMonitorRetryTime is how long we wait after a failed monitor check - // of a lock (500 response code). This allows the monitor to ride out brief - // periods of unavailability, subject to the MonitorRetries setting in the - // lock options which is by default set to 0, disabling this feature. This - // affects locks and semaphores. - DefaultMonitorRetryTime = 2 * time.Second - - // LockFlagValue is a magic flag we set to indicate a key - // is being used for a lock. It is used to detect a potential - // conflict with a semaphore. - LockFlagValue = 0x2ddccbc058a50c18 -) - -var ( - // ErrLockHeld is returned if we attempt to double lock - ErrLockHeld = fmt.Errorf("Lock already held") - - // ErrLockNotHeld is returned if we attempt to unlock a lock - // that we do not hold. - ErrLockNotHeld = fmt.Errorf("Lock not held") - - // ErrLockInUse is returned if we attempt to destroy a lock - // that is in use. - ErrLockInUse = fmt.Errorf("Lock in use") - - // ErrLockConflict is returned if the flags on a key - // used for a lock do not match expectation - ErrLockConflict = fmt.Errorf("Existing key does not match lock use") -) - -// Lock is used to implement client-side leader election. It is follows the -// algorithm as described here: https://www.consul.io/docs/guides/leader-election.html. -type Lock struct { - c *Client - opts *LockOptions - - isHeld bool - sessionRenew chan struct{} - lockSession string - l sync.Mutex -} - -// LockOptions is used to parameterize the Lock behavior. -type LockOptions struct { - Key string // Must be set and have write permissions - Value []byte // Optional, value to associate with the lock - Session string // Optional, created if not specified - SessionOpts *SessionEntry // Optional, options to use when creating a session - SessionName string // Optional, defaults to DefaultLockSessionName (ignored if SessionOpts is given) - SessionTTL string // Optional, defaults to DefaultLockSessionTTL (ignored if SessionOpts is given) - MonitorRetries int // Optional, defaults to 0 which means no retries - MonitorRetryTime time.Duration // Optional, defaults to DefaultMonitorRetryTime - LockWaitTime time.Duration // Optional, defaults to DefaultLockWaitTime - LockTryOnce bool // Optional, defaults to false which means try forever - LockDelay time.Duration // Optional, defaults to 15s - Namespace string `json:",omitempty"` // Optional, defaults to API client config, namespace of ACL token, or "default" namespace -} - -// LockKey returns a handle to a lock struct which can be used -// to acquire and release the mutex. The key used must have -// write permissions. -func (c *Client) LockKey(key string) (*Lock, error) { - opts := &LockOptions{ - Key: key, - } - return c.LockOpts(opts) -} - -// LockOpts returns a handle to a lock struct which can be used -// to acquire and release the mutex. The key used must have -// write permissions. -func (c *Client) LockOpts(opts *LockOptions) (*Lock, error) { - if opts.Key == "" { - return nil, fmt.Errorf("missing key") - } - if opts.SessionName == "" { - opts.SessionName = DefaultLockSessionName - } - if opts.SessionTTL == "" { - opts.SessionTTL = DefaultLockSessionTTL - } else { - if _, err := time.ParseDuration(opts.SessionTTL); err != nil { - return nil, fmt.Errorf("invalid SessionTTL: %v", err) - } - } - if opts.MonitorRetryTime == 0 { - opts.MonitorRetryTime = DefaultMonitorRetryTime - } - if opts.LockWaitTime == 0 { - opts.LockWaitTime = DefaultLockWaitTime - } - l := &Lock{ - c: c, - opts: opts, - } - return l, nil -} - -// Lock attempts to acquire the lock and blocks while doing so. -// Providing a non-nil stopCh can be used to abort the lock attempt. -// Returns a channel that is closed if our lock is lost or an error. -// This channel could be closed at any time due to session invalidation, -// communication errors, operator intervention, etc. It is NOT safe to -// assume that the lock is held until Unlock() unless the Session is specifically -// created without any associated health checks. By default Consul sessions -// prefer liveness over safety and an application must be able to handle -// the lock being lost. -func (l *Lock) Lock(stopCh <-chan struct{}) (<-chan struct{}, error) { - // Hold the lock as we try to acquire - l.l.Lock() - defer l.l.Unlock() - - // Check if we already hold the lock - if l.isHeld { - return nil, ErrLockHeld - } - - wOpts := WriteOptions{ - Namespace: l.opts.Namespace, - } - - // Check if we need to create a session first - l.lockSession = l.opts.Session - if l.lockSession == "" { - s, err := l.createSession() - if err != nil { - return nil, fmt.Errorf("failed to create session: %v", err) - } - - l.sessionRenew = make(chan struct{}) - l.lockSession = s - - session := l.c.Session() - go session.RenewPeriodic(l.opts.SessionTTL, s, &wOpts, l.sessionRenew) - - // If we fail to acquire the lock, cleanup the session - defer func() { - if !l.isHeld { - close(l.sessionRenew) - l.sessionRenew = nil - } - }() - } - - // Setup the query options - kv := l.c.KV() - qOpts := QueryOptions{ - WaitTime: l.opts.LockWaitTime, - Namespace: l.opts.Namespace, - } - - start := time.Now() - attempts := 0 -WAIT: - // Check if we should quit - select { - case <-stopCh: - return nil, nil - default: - } - - // Handle the one-shot mode. - if l.opts.LockTryOnce && attempts > 0 { - elapsed := time.Since(start) - if elapsed > l.opts.LockWaitTime { - return nil, nil - } - - // Query wait time should not exceed the lock wait time - qOpts.WaitTime = l.opts.LockWaitTime - elapsed - } - attempts++ - - // Look for an existing lock, blocking until not taken - pair, meta, err := kv.Get(l.opts.Key, &qOpts) - if err != nil { - return nil, fmt.Errorf("failed to read lock: %v", err) - } - if pair != nil && pair.Flags != LockFlagValue { - return nil, ErrLockConflict - } - locked := false - if pair != nil && pair.Session == l.lockSession { - goto HELD - } - if pair != nil && pair.Session != "" { - qOpts.WaitIndex = meta.LastIndex - goto WAIT - } - - // Try to acquire the lock - pair = l.lockEntry(l.lockSession) - - locked, _, err = kv.Acquire(pair, &wOpts) - if err != nil { - return nil, fmt.Errorf("failed to acquire lock: %v", err) - } - - // Handle the case of not getting the lock - if !locked { - // Determine why the lock failed - qOpts.WaitIndex = 0 - pair, meta, err = kv.Get(l.opts.Key, &qOpts) - if err != nil { - return nil, err - } - if pair != nil && pair.Session != "" { - //If the session is not null, this means that a wait can safely happen - //using a long poll - qOpts.WaitIndex = meta.LastIndex - goto WAIT - } else { - // If the session is empty and the lock failed to acquire, then it means - // a lock-delay is in effect and a timed wait must be used - select { - case <-time.After(DefaultLockRetryTime): - goto WAIT - case <-stopCh: - return nil, nil - } - } - } - -HELD: - // Watch to ensure we maintain leadership - leaderCh := make(chan struct{}) - go l.monitorLock(l.lockSession, leaderCh) - - // Set that we own the lock - l.isHeld = true - - // Locked! All done - return leaderCh, nil -} - -// Unlock released the lock. It is an error to call this -// if the lock is not currently held. -func (l *Lock) Unlock() error { - // Hold the lock as we try to release - l.l.Lock() - defer l.l.Unlock() - - // Ensure the lock is actually held - if !l.isHeld { - return ErrLockNotHeld - } - - // Set that we no longer own the lock - l.isHeld = false - - // Stop the session renew - if l.sessionRenew != nil { - defer func() { - close(l.sessionRenew) - l.sessionRenew = nil - }() - } - - // Get the lock entry, and clear the lock session - lockEnt := l.lockEntry(l.lockSession) - l.lockSession = "" - - // Release the lock explicitly - kv := l.c.KV() - w := WriteOptions{Namespace: l.opts.Namespace} - - _, _, err := kv.Release(lockEnt, &w) - if err != nil { - return fmt.Errorf("failed to release lock: %v", err) - } - return nil -} - -// Destroy is used to cleanup the lock entry. It is not necessary -// to invoke. It will fail if the lock is in use. -func (l *Lock) Destroy() error { - // Hold the lock as we try to release - l.l.Lock() - defer l.l.Unlock() - - // Check if we already hold the lock - if l.isHeld { - return ErrLockHeld - } - - // Look for an existing lock - kv := l.c.KV() - q := QueryOptions{Namespace: l.opts.Namespace} - - pair, _, err := kv.Get(l.opts.Key, &q) - if err != nil { - return fmt.Errorf("failed to read lock: %v", err) - } - - // Nothing to do if the lock does not exist - if pair == nil { - return nil - } - - // Check for possible flag conflict - if pair.Flags != LockFlagValue { - return ErrLockConflict - } - - // Check if it is in use - if pair.Session != "" { - return ErrLockInUse - } - - // Attempt the delete - w := WriteOptions{Namespace: l.opts.Namespace} - didRemove, _, err := kv.DeleteCAS(pair, &w) - if err != nil { - return fmt.Errorf("failed to remove lock: %v", err) - } - if !didRemove { - return ErrLockInUse - } - return nil -} - -// createSession is used to create a new managed session -func (l *Lock) createSession() (string, error) { - session := l.c.Session() - se := l.opts.SessionOpts - if se == nil { - se = &SessionEntry{ - Name: l.opts.SessionName, - TTL: l.opts.SessionTTL, - LockDelay: l.opts.LockDelay, - } - } - w := WriteOptions{Namespace: l.opts.Namespace} - id, _, err := session.Create(se, &w) - if err != nil { - return "", err - } - return id, nil -} - -// lockEntry returns a formatted KVPair for the lock -func (l *Lock) lockEntry(session string) *KVPair { - return &KVPair{ - Key: l.opts.Key, - Value: l.opts.Value, - Session: session, - Flags: LockFlagValue, - } -} - -// monitorLock is a long running routine to monitor a lock ownership -// It closes the stopCh if we lose our leadership. -func (l *Lock) monitorLock(session string, stopCh chan struct{}) { - defer close(stopCh) - kv := l.c.KV() - opts := QueryOptions{ - RequireConsistent: true, - Namespace: l.opts.Namespace, - } -WAIT: - retries := l.opts.MonitorRetries -RETRY: - pair, meta, err := kv.Get(l.opts.Key, &opts) - if err != nil { - // If configured we can try to ride out a brief Consul unavailability - // by doing retries. Note that we have to attempt the retry in a non- - // blocking fashion so that we have a clean place to reset the retry - // counter if service is restored. - if retries > 0 && IsRetryableError(err) { - time.Sleep(l.opts.MonitorRetryTime) - retries-- - opts.WaitIndex = 0 - goto RETRY - } - return - } - if pair != nil && pair.Session == session { - opts.WaitIndex = meta.LastIndex - goto WAIT - } -} diff --git a/vendor/github.com/hashicorp/consul/api/namespace.go b/vendor/github.com/hashicorp/consul/api/namespace.go deleted file mode 100644 index 98afd229989..00000000000 --- a/vendor/github.com/hashicorp/consul/api/namespace.go +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "fmt" - "time" -) - -// Namespace is the configuration of a single namespace. Namespacing is a Consul Enterprise feature. -type Namespace struct { - // Name is the name of the Namespace. It must be unique and - // must be a DNS hostname. There are also other reserved names - // that may not be used. - Name string `json:"Name"` - - // Description is where the user puts any information they want - // about the namespace. It is not used internally. - Description string `json:"Description,omitempty"` - - // ACLs is the configuration of ACLs for this namespace. It has its - // own struct so that we can add more to it in the future. - // This is nullable so that we can omit if empty when encoding in JSON - ACLs *NamespaceACLConfig `json:"ACLs,omitempty"` - - // Meta is a map that can be used to add kv metadata to the namespace definition - Meta map[string]string `json:"Meta,omitempty"` - - // DeletedAt is the time when the Namespace was marked for deletion - // This is nullable so that we can omit if empty when encoding in JSON - DeletedAt *time.Time `json:"DeletedAt,omitempty" alias:"deleted_at"` - - // Partition which contains the Namespace. - Partition string `json:"Partition,omitempty"` - - // CreateIndex is the Raft index at which the Namespace was created - CreateIndex uint64 `json:"CreateIndex,omitempty"` - - // ModifyIndex is the latest Raft index at which the Namespace was modified. - ModifyIndex uint64 `json:"ModifyIndex,omitempty"` -} - -func (n *Namespace) UnmarshalJSON(data []byte) error { - type Alias Namespace - aux := struct { - DeletedAtSnake *time.Time `json:"deleted_at"` - *Alias - }{ - Alias: (*Alias)(n), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - - if n.DeletedAt == nil && aux.DeletedAtSnake != nil { - n.DeletedAt = aux.DeletedAtSnake - } - - return nil -} - -// NamespaceACLConfig is the Namespace specific ACL configuration container -type NamespaceACLConfig struct { - // PolicyDefaults is the list of policies that should be used for the parent authorizer - // of all tokens in the associated namespace. - PolicyDefaults []ACLLink `json:"PolicyDefaults" alias:"policy_defaults"` - // RoleDefaults is the list of roles that should be used for the parent authorizer - // of all tokens in the associated namespace. - RoleDefaults []ACLLink `json:"RoleDefaults" alias:"role_defaults"` -} - -func (n *NamespaceACLConfig) UnmarshalJSON(data []byte) error { - type Alias NamespaceACLConfig - aux := struct { - PolicyDefaultsSnake []ACLLink `json:"policy_defaults"` - RoleDefaultsSnake []ACLLink `json:"role_defaults"` - *Alias - }{ - Alias: (*Alias)(n), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - - if n.PolicyDefaults == nil { - for _, pd := range aux.PolicyDefaultsSnake { - n.PolicyDefaults = append(n.PolicyDefaults, pd) - } - } - if n.RoleDefaults == nil { - for _, pd := range aux.RoleDefaultsSnake { - n.RoleDefaults = append(n.RoleDefaults, pd) - } - } - return nil -} - -// Namespaces can be used to manage Namespaces in Consul Enterprise.. -type Namespaces struct { - c *Client -} - -// Namespaces returns a handle to the namespaces endpoints. -func (c *Client) Namespaces() *Namespaces { - return &Namespaces{c} -} - -func (n *Namespaces) Create(ns *Namespace, q *WriteOptions) (*Namespace, *WriteMeta, error) { - if ns.Name == "" { - return nil, nil, fmt.Errorf("Must specify a Name for Namespace creation") - } - - r := n.c.newRequest("PUT", "/v1/namespace") - r.setWriteOptions(q) - r.obj = ns - rtt, resp, err := n.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - var out Namespace - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -func (n *Namespaces) Update(ns *Namespace, q *WriteOptions) (*Namespace, *WriteMeta, error) { - if ns.Name == "" { - return nil, nil, fmt.Errorf("Must specify a Name for Namespace updating") - } - - r := n.c.newRequest("PUT", "/v1/namespace/"+ns.Name) - r.setWriteOptions(q) - r.obj = ns - rtt, resp, err := n.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - var out Namespace - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -func (n *Namespaces) Read(name string, q *QueryOptions) (*Namespace, *QueryMeta, error) { - var out Namespace - r := n.c.newRequest("GET", "/v1/namespace/"+name) - r.setQueryOptions(q) - rtt, resp, err := n.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - found, resp, err := requireNotFoundOrOK(resp) - if err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if !found { - return nil, qm, nil - } - - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, qm, nil -} - -func (n *Namespaces) Delete(name string, q *WriteOptions) (*WriteMeta, error) { - r := n.c.newRequest("DELETE", "/v1/namespace/"+name) - r.setWriteOptions(q) - rtt, resp, err := n.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - return wm, nil -} - -func (n *Namespaces) List(q *QueryOptions) ([]*Namespace, *QueryMeta, error) { - var out []*Namespace - r := n.c.newRequest("GET", "/v1/namespaces") - r.setQueryOptions(q) - rtt, resp, err := n.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/operator.go b/vendor/github.com/hashicorp/consul/api/operator.go deleted file mode 100644 index 667dcd87233..00000000000 --- a/vendor/github.com/hashicorp/consul/api/operator.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// Operator can be used to perform low-level operator tasks for Consul. -type Operator struct { - c *Client -} - -// Operator returns a handle to the operator endpoints. -func (c *Client) Operator() *Operator { - return &Operator{c} -} diff --git a/vendor/github.com/hashicorp/consul/api/operator_area.go b/vendor/github.com/hashicorp/consul/api/operator_area.go deleted file mode 100644 index 9228d89b47c..00000000000 --- a/vendor/github.com/hashicorp/consul/api/operator_area.go +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// The /v1/operator/area endpoints are available only in Consul Enterprise and -// interact with its network area subsystem. Network areas are used to link -// together Consul servers in different Consul datacenters. With network areas, -// Consul datacenters can be linked together in ways other than a fully-connected -// mesh, as is required for Consul's WAN. - -import ( - "net" - "time" -) - -// Area defines a network area. -type Area struct { - // ID is this identifier for an area (a UUID). This must be left empty - // when creating a new area. - ID string - - // PeerDatacenter is the peer Consul datacenter that will make up the - // other side of this network area. Network areas always involve a pair - // of datacenters: the datacenter where the area was created, and the - // peer datacenter. This is required. - PeerDatacenter string - - // RetryJoin specifies the address of Consul servers to join to, such as - // an IPs or hostnames with an optional port number. This is optional. - RetryJoin []string - - // UseTLS specifies whether gossip over this area should be encrypted with TLS - // if possible. - UseTLS bool -} - -// AreaJoinResponse is returned when a join occurs and gives the result for each -// address. -type AreaJoinResponse struct { - // The address that was joined. - Address string - - // Whether or not the join was a success. - Joined bool - - // If we couldn't join, this is the message with information. - Error string -} - -// SerfMember is a generic structure for reporting information about members in -// a Serf cluster. This is only used by the area endpoints right now, but this -// could be expanded to other endpoints in the future. -type SerfMember struct { - // ID is the node identifier (a UUID). - ID string - - // Name is the node name. - Name string - - // Addr has the IP address. - Addr net.IP - - // Port is the RPC port. - Port uint16 - - // Datacenter is the DC name. - Datacenter string - - // Role is "client", "server", or "unknown". - Role string - - // Build has the version of the Consul agent. - Build string - - // Protocol is the protocol of the Consul agent. - Protocol int - - // Status is the Serf health status "none", "alive", "leaving", "left", - // or "failed". - Status string - - // RTT is the estimated round trip time from the server handling the - // request to the this member. This will be negative if no RTT estimate - // is available. - RTT time.Duration -} - -// AreaCreate will create a new network area. The ID in the given structure must -// be empty and a generated ID will be returned on success. -func (op *Operator) AreaCreate(area *Area, q *WriteOptions) (string, *WriteMeta, error) { - r := op.c.newRequest("POST", "/v1/operator/area") - r.setWriteOptions(q) - r.obj = area - rtt, resp, err := op.c.doRequest(r) - if err != nil { - return "", nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return "", nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - - var out struct{ ID string } - if err := decodeBody(resp, &out); err != nil { - return "", nil, err - } - return out.ID, wm, nil -} - -// AreaUpdate will update the configuration of the network area with the given ID. -func (op *Operator) AreaUpdate(areaID string, area *Area, q *WriteOptions) (string, *WriteMeta, error) { - r := op.c.newRequest("PUT", "/v1/operator/area/"+areaID) - r.setWriteOptions(q) - r.obj = area - rtt, resp, err := op.c.doRequest(r) - if err != nil { - return "", nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return "", nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - - var out struct{ ID string } - if err := decodeBody(resp, &out); err != nil { - return "", nil, err - } - return out.ID, wm, nil -} - -// AreaGet returns a single network area. -func (op *Operator) AreaGet(areaID string, q *QueryOptions) ([]*Area, *QueryMeta, error) { - var out []*Area - qm, err := op.c.query("/v1/operator/area/"+areaID, &out, q) - if err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// AreaList returns all the available network areas. -func (op *Operator) AreaList(q *QueryOptions) ([]*Area, *QueryMeta, error) { - var out []*Area - qm, err := op.c.query("/v1/operator/area", &out, q) - if err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// AreaDelete deletes the given network area. -func (op *Operator) AreaDelete(areaID string, q *WriteOptions) (*WriteMeta, error) { - r := op.c.newRequest("DELETE", "/v1/operator/area/"+areaID) - r.setWriteOptions(q) - rtt, resp, err := op.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - return wm, nil -} - -// AreaJoin attempts to join the given set of join addresses to the given -// network area. See the Area structure for details about join addresses. -func (op *Operator) AreaJoin(areaID string, addresses []string, q *WriteOptions) ([]*AreaJoinResponse, *WriteMeta, error) { - r := op.c.newRequest("PUT", "/v1/operator/area/"+areaID+"/join") - r.setWriteOptions(q) - r.obj = addresses - rtt, resp, err := op.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - - var out []*AreaJoinResponse - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, wm, nil -} - -// AreaMembers lists the Serf information about the members in the given area. -func (op *Operator) AreaMembers(areaID string, q *QueryOptions) ([]*SerfMember, *QueryMeta, error) { - var out []*SerfMember - qm, err := op.c.query("/v1/operator/area/"+areaID+"/members", &out, q) - if err != nil { - return nil, nil, err - } - return out, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/operator_audit.go b/vendor/github.com/hashicorp/consul/api/operator_audit.go deleted file mode 100644 index 5240d38a70d..00000000000 --- a/vendor/github.com/hashicorp/consul/api/operator_audit.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// The /v1/operator/audit-hash endpoint is available only in Consul Enterprise and -// interact with its audit logging subsystem. - -package api - -type AuditHashRequest struct { - Input string -} - -type AuditHashResponse struct { - Hash string -} - -func (op *Operator) AuditHash(a *AuditHashRequest, q *QueryOptions) (*AuditHashResponse, error) { - r := op.c.newRequest("POST", "/v1/operator/audit-hash") - r.setQueryOptions(q) - r.obj = a - - rtt, resp, err := op.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - - var out AuditHashResponse - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - - return &out, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/operator_autopilot.go b/vendor/github.com/hashicorp/consul/api/operator_autopilot.go deleted file mode 100644 index 7628bf6f2ff..00000000000 --- a/vendor/github.com/hashicorp/consul/api/operator_autopilot.go +++ /dev/null @@ -1,404 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "bytes" - "fmt" - "io" - "strconv" - "strings" - "time" -) - -// AutopilotConfiguration is used for querying/setting the Autopilot configuration. -// Autopilot helps manage operator tasks related to Consul servers like removing -// failed servers from the Raft quorum. -type AutopilotConfiguration struct { - // CleanupDeadServers controls whether to remove dead servers from the Raft - // peer list when a new server joins - CleanupDeadServers bool - - // LastContactThreshold is the limit on the amount of time a server can go - // without leader contact before being considered unhealthy. - LastContactThreshold *ReadableDuration - - // MaxTrailingLogs is the amount of entries in the Raft Log that a server can - // be behind before being considered unhealthy. - MaxTrailingLogs uint64 - - // MinQuorum sets the minimum number of servers allowed in a cluster before - // autopilot can prune dead servers. - MinQuorum uint - - // ServerStabilizationTime is the minimum amount of time a server must be - // in a stable, healthy state before it can be added to the cluster. Only - // applicable with Raft protocol version 3 or higher. - ServerStabilizationTime *ReadableDuration - - // (Enterprise-only) RedundancyZoneTag is the node tag to use for separating - // servers into zones for redundancy. If left blank, this feature will be disabled. - RedundancyZoneTag string - - // (Enterprise-only) DisableUpgradeMigration will disable Autopilot's upgrade migration - // strategy of waiting until enough newer-versioned servers have been added to the - // cluster before promoting them to voters. - DisableUpgradeMigration bool - - // (Enterprise-only) UpgradeVersionTag is the node tag to use for version info when - // performing upgrade migrations. If left blank, the Consul version will be used. - UpgradeVersionTag string - - // CreateIndex holds the index corresponding the creation of this configuration. - // This is a read-only field. - CreateIndex uint64 - - // ModifyIndex will be set to the index of the last update when retrieving the - // Autopilot configuration. Resubmitting a configuration with - // AutopilotCASConfiguration will perform a check-and-set operation which ensures - // there hasn't been a subsequent update since the configuration was retrieved. - ModifyIndex uint64 -} - -// Defines default values for the AutopilotConfiguration type, consistent with -// https://www.consul.io/api-docs/operator/autopilot#parameters-1 -func NewAutopilotConfiguration() AutopilotConfiguration { - cfg := AutopilotConfiguration{ - CleanupDeadServers: true, - LastContactThreshold: NewReadableDuration(200 * time.Millisecond), - MaxTrailingLogs: 250, - MinQuorum: 0, - ServerStabilizationTime: NewReadableDuration(10 * time.Second), - RedundancyZoneTag: "", - DisableUpgradeMigration: false, - UpgradeVersionTag: "", - } - - return cfg -} - -// ServerHealth is the health (from the leader's point of view) of a server. -type ServerHealth struct { - // ID is the raft ID of the server. - ID string - - // Name is the node name of the server. - Name string - - // Address is the address of the server. - Address string - - // The status of the SerfHealth check for the server. - SerfStatus string - - // Version is the Consul version of the server. - Version string - - // Leader is whether this server is currently the leader. - Leader bool - - // LastContact is the time since this node's last contact with the leader. - LastContact *ReadableDuration - - // LastTerm is the highest leader term this server has a record of in its Raft log. - LastTerm uint64 - - // LastIndex is the last log index this server has a record of in its Raft log. - LastIndex uint64 - - // Healthy is whether or not the server is healthy according to the current - // Autopilot config. - Healthy bool - - // Voter is whether this is a voting server. - Voter bool - - // StableSince is the last time this server's Healthy value changed. - StableSince time.Time -} - -// OperatorHealthReply is a representation of the overall health of the cluster -type OperatorHealthReply struct { - // Healthy is true if all the servers in the cluster are healthy. - Healthy bool - - // FailureTolerance is the number of healthy servers that could be lost without - // an outage occurring. - FailureTolerance int - - // Servers holds the health of each server. - Servers []ServerHealth -} - -type AutopilotState struct { - Healthy bool - FailureTolerance int - OptimisticFailureTolerance int - - Servers map[string]AutopilotServer - Leader string - Voters []string - ReadReplicas []string `json:",omitempty"` - RedundancyZones map[string]AutopilotZone `json:",omitempty"` - Upgrade *AutopilotUpgrade `json:",omitempty"` -} - -type AutopilotServer struct { - ID string - Name string - Address string - NodeStatus string - Version string - LastContact *ReadableDuration - LastTerm uint64 - LastIndex uint64 - Healthy bool - StableSince time.Time - RedundancyZone string `json:",omitempty"` - UpgradeVersion string `json:",omitempty"` - ReadReplica bool - Status AutopilotServerStatus - Meta map[string]string - NodeType AutopilotServerType -} - -type AutopilotServerStatus string - -const ( - AutopilotServerNone AutopilotServerStatus = "none" - AutopilotServerLeader AutopilotServerStatus = "leader" - AutopilotServerVoter AutopilotServerStatus = "voter" - AutopilotServerNonVoter AutopilotServerStatus = "non-voter" - AutopilotServerStaging AutopilotServerStatus = "staging" -) - -type AutopilotServerType string - -const ( - AutopilotTypeVoter AutopilotServerType = "voter" - AutopilotTypeReadReplica AutopilotServerType = "read-replica" - AutopilotTypeZoneVoter AutopilotServerType = "zone-voter" - AutopilotTypeZoneExtraVoter AutopilotServerType = "zone-extra-voter" - AutopilotTypeZoneStandby AutopilotServerType = "zone-standby" -) - -type AutopilotZone struct { - Servers []string - Voters []string - FailureTolerance int -} - -type AutopilotZoneUpgradeVersions struct { - TargetVersionVoters []string `json:",omitempty"` - TargetVersionNonVoters []string `json:",omitempty"` - OtherVersionVoters []string `json:",omitempty"` - OtherVersionNonVoters []string `json:",omitempty"` -} - -type AutopilotUpgrade struct { - Status AutopilotUpgradeStatus - TargetVersion string `json:",omitempty"` - TargetVersionVoters []string `json:",omitempty"` - TargetVersionNonVoters []string `json:",omitempty"` - TargetVersionReadReplicas []string `json:",omitempty"` - OtherVersionVoters []string `json:",omitempty"` - OtherVersionNonVoters []string `json:",omitempty"` - OtherVersionReadReplicas []string `json:",omitempty"` - RedundancyZones map[string]AutopilotZoneUpgradeVersions `json:",omitempty"` -} - -type AutopilotUpgradeStatus string - -const ( - // AutopilotUpgradeIdle is the status when no upgrade is in progress. - AutopilotUpgradeIdle AutopilotUpgradeStatus = "idle" - - // AutopilotUpgradeAwaitNewVoters is the status when more servers of - // the target version must be added in order to start the promotion - // phase of the upgrade - AutopilotUpgradeAwaitNewVoters AutopilotUpgradeStatus = "await-new-voters" - - // AutopilotUpgradePromoting is the status when autopilot is promoting - // servers of the target version. - AutopilotUpgradePromoting AutopilotUpgradeStatus = "promoting" - - // AutopilotUpgradeDemoting is the status when autopilot is demoting - // servers not on the target version - AutopilotUpgradeDemoting AutopilotUpgradeStatus = "demoting" - - // AutopilotUpgradeLeaderTransfer is the status when autopilot is transferring - // leadership from a server running an older version to a server - // using the target version. - AutopilotUpgradeLeaderTransfer AutopilotUpgradeStatus = "leader-transfer" - - // AutopilotUpgradeAwaitNewServers is the status when autpilot has finished - // transferring leadership and has demoted all the other versioned - // servers but wants to indicate that more target version servers - // are needed to replace all the existing other version servers. - AutopilotUpgradeAwaitNewServers AutopilotUpgradeStatus = "await-new-servers" - - // AutopilotUpgradeAwaitServerRemoval is the status when autopilot is waiting - // for the servers on non-target versions to be removed - AutopilotUpgradeAwaitServerRemoval AutopilotUpgradeStatus = "await-server-removal" - - // AutopilotUpgradeDisabled is the status when automated ugprades are - // disabled in the autopilot configuration - AutopilotUpgradeDisabled AutopilotUpgradeStatus = "disabled" -) - -// ReadableDuration is a duration type that is serialized to JSON in human readable format. -type ReadableDuration time.Duration - -func NewReadableDuration(dur time.Duration) *ReadableDuration { - d := ReadableDuration(dur) - return &d -} - -func (d *ReadableDuration) String() string { - return d.Duration().String() -} - -func (d *ReadableDuration) Duration() time.Duration { - if d == nil { - return time.Duration(0) - } - return time.Duration(*d) -} - -func (d *ReadableDuration) MarshalJSON() ([]byte, error) { - return []byte(fmt.Sprintf(`"%s"`, d.Duration().String())), nil -} - -func (d *ReadableDuration) UnmarshalJSON(raw []byte) (err error) { - if d == nil { - return fmt.Errorf("cannot unmarshal to nil pointer") - } - - var dur time.Duration - str := string(raw) - if len(str) >= 2 && str[0] == '"' && str[len(str)-1] == '"' { - // quoted string - dur, err = time.ParseDuration(str[1 : len(str)-1]) - if err != nil { - return err - } - } else { - // no quotes, not a string - v, err := strconv.ParseFloat(str, 64) - if err != nil { - return err - } - dur = time.Duration(v) - } - - *d = ReadableDuration(dur) - return nil -} - -// AutopilotGetConfiguration is used to query the current Autopilot configuration. -func (op *Operator) AutopilotGetConfiguration(q *QueryOptions) (*AutopilotConfiguration, error) { - r := op.c.newRequest("GET", "/v1/operator/autopilot/configuration") - r.setQueryOptions(q) - _, resp, err := op.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - var out AutopilotConfiguration - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - - return &out, nil -} - -// AutopilotSetConfiguration is used to set the current Autopilot configuration. -func (op *Operator) AutopilotSetConfiguration(conf *AutopilotConfiguration, q *WriteOptions) error { - r := op.c.newRequest("PUT", "/v1/operator/autopilot/configuration") - r.setWriteOptions(q) - r.obj = conf - _, resp, err := op.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// AutopilotCASConfiguration is used to perform a Check-And-Set update on the -// Autopilot configuration. The ModifyIndex value will be respected. Returns -// true on success or false on failures. -func (op *Operator) AutopilotCASConfiguration(conf *AutopilotConfiguration, q *WriteOptions) (bool, error) { - r := op.c.newRequest("PUT", "/v1/operator/autopilot/configuration") - r.setWriteOptions(q) - r.params.Set("cas", strconv.FormatUint(conf.ModifyIndex, 10)) - r.obj = conf - _, resp, err := op.c.doRequest(r) - if err != nil { - return false, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return false, err - } - - var buf bytes.Buffer - if _, err := io.Copy(&buf, resp.Body); err != nil { - return false, fmt.Errorf("Failed to read response: %v", err) - } - res := strings.Contains(buf.String(), "true") - - return res, nil -} - -// AutopilotServerHealth -func (op *Operator) AutopilotServerHealth(q *QueryOptions) (*OperatorHealthReply, error) { - r := op.c.newRequest("GET", "/v1/operator/autopilot/health") - r.setQueryOptions(q) - - // we use 429 status to indicate unhealthiness - _, resp, err := op.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - err = requireHttpCodes(resp, 200, 429) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - - var out OperatorHealthReply - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return &out, nil -} - -func (op *Operator) AutopilotState(q *QueryOptions) (*AutopilotState, error) { - r := op.c.newRequest("GET", "/v1/operator/autopilot/state") - r.setQueryOptions(q) - _, resp, err := op.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - var out AutopilotState - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - - return &out, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/operator_keyring.go b/vendor/github.com/hashicorp/consul/api/operator_keyring.go deleted file mode 100644 index aefec9e2704..00000000000 --- a/vendor/github.com/hashicorp/consul/api/operator_keyring.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// keyringRequest is used for performing Keyring operations -type keyringRequest struct { - Key string -} - -// KeyringResponse is returned when listing the gossip encryption keys -type KeyringResponse struct { - // Whether this response is for a WAN ring - WAN bool - - // The datacenter name this request corresponds to - Datacenter string - - // Segment has the network segment this request corresponds to. - Segment string - - // Partition has the admin partition this request corresponds to. - Partition string `json:",omitempty"` - - // Messages has information or errors from serf - Messages map[string]string `json:",omitempty"` - - // A map of the encryption keys to the number of nodes they're installed on - Keys map[string]int - - // A map of the encryption primary keys to the number of nodes they're installed on - PrimaryKeys map[string]int - - // The total number of nodes in this ring - NumNodes int -} - -// KeyringInstall is used to install a new gossip encryption key into the cluster -func (op *Operator) KeyringInstall(key string, q *WriteOptions) error { - r := op.c.newRequest("POST", "/v1/operator/keyring") - r.setWriteOptions(q) - r.obj = keyringRequest{ - Key: key, - } - _, resp, err := op.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// KeyringList is used to list the gossip keys installed in the cluster -func (op *Operator) KeyringList(q *QueryOptions) ([]*KeyringResponse, error) { - r := op.c.newRequest("GET", "/v1/operator/keyring") - r.setQueryOptions(q) - _, resp, err := op.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - var out []*KeyringResponse - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return out, nil -} - -// KeyringRemove is used to remove a gossip encryption key from the cluster -func (op *Operator) KeyringRemove(key string, q *WriteOptions) error { - r := op.c.newRequest("DELETE", "/v1/operator/keyring") - r.setWriteOptions(q) - r.obj = keyringRequest{ - Key: key, - } - _, resp, err := op.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// KeyringUse is used to change the active gossip encryption key -func (op *Operator) KeyringUse(key string, q *WriteOptions) error { - r := op.c.newRequest("PUT", "/v1/operator/keyring") - r.setWriteOptions(q) - r.obj = keyringRequest{ - Key: key, - } - _, resp, err := op.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} diff --git a/vendor/github.com/hashicorp/consul/api/operator_license.go b/vendor/github.com/hashicorp/consul/api/operator_license.go deleted file mode 100644 index 1e3496da0e1..00000000000 --- a/vendor/github.com/hashicorp/consul/api/operator_license.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "io" - "strings" - "time" -) - -type License struct { - // The unique identifier of the license - LicenseID string `json:"license_id"` - - // The customer ID associated with the license - CustomerID string `json:"customer_id"` - - // If set, an identifier that should be used to lock the license to a - // particular site, cluster, etc. - InstallationID string `json:"installation_id"` - - // The time at which the license was issued - IssueTime time.Time `json:"issue_time"` - - // The time at which the license starts being valid - StartTime time.Time `json:"start_time"` - - // The time after which the license expires - ExpirationTime time.Time `json:"expiration_time"` - - // The time at which the license ceases to function and can - // no longer be used in any capacity - TerminationTime time.Time `json:"termination_time"` - - // Whether the license will ignore termination - IgnoreTermination bool `json:"ignore_termination"` - - // The product the license is valid for - Product string `json:"product"` - - // License Specific Flags - Flags map[string]interface{} `json:"flags"` - - // Modules is a list of the licensed enterprise modules - Modules []string `json:"modules"` - - // List of features enabled by the license - Features []string `json:"features"` -} - -type LicenseReply struct { - Valid bool - License *License - Warnings []string -} - -func (op *Operator) LicenseGet(q *QueryOptions) (*LicenseReply, error) { - var reply LicenseReply - if _, err := op.c.query("/v1/operator/license", &reply, q); err != nil { - return nil, err - } else { - return &reply, nil - } -} - -func (op *Operator) LicenseGetSigned(q *QueryOptions) (string, error) { - r := op.c.newRequest("GET", "/v1/operator/license") - r.params.Set("signed", "1") - r.setQueryOptions(q) - _, resp, err := op.c.doRequest(r) - if err != nil { - return "", err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return "", err - } - - data, err := io.ReadAll(resp.Body) - if err != nil { - return "", err - } - - return string(data), nil -} - -// LicenseReset will reset the license to the builtin one if it is still valid. -// If the builtin license is invalid, the current license stays active. -// -// DEPRECATED: Consul 1.10 removes the corresponding HTTP endpoint as licenses -// are now set via agent configuration instead of through the API -func (op *Operator) LicenseReset(opts *WriteOptions) (*LicenseReply, error) { - var reply LicenseReply - r := op.c.newRequest("DELETE", "/v1/operator/license") - r.setWriteOptions(opts) - _, resp, err := op.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - if err := decodeBody(resp, &reply); err != nil { - return nil, err - } - return &reply, nil -} - -// LicensePut will configure the Consul Enterprise license for the target datacenter -// -// DEPRECATED: Consul 1.10 removes the corresponding HTTP endpoint as licenses -// are now set via agent configuration instead of through the API -func (op *Operator) LicensePut(license string, opts *WriteOptions) (*LicenseReply, error) { - var reply LicenseReply - r := op.c.newRequest("PUT", "/v1/operator/license") - r.setWriteOptions(opts) - r.body = strings.NewReader(license) - _, resp, err := op.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - if err := decodeBody(resp, &reply); err != nil { - return nil, err - } - - return &reply, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/operator_raft.go b/vendor/github.com/hashicorp/consul/api/operator_raft.go deleted file mode 100644 index f0f5794aa5a..00000000000 --- a/vendor/github.com/hashicorp/consul/api/operator_raft.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// RaftServer has information about a server in the Raft configuration. -type RaftServer struct { - // ID is the unique ID for the server. These are currently the same - // as the address, but they will be changed to a real GUID in a future - // release of Consul. - ID string - - // Node is the node name of the server, as known by Consul, or this - // will be set to "(unknown)" otherwise. - Node string - - // Address is the IP:port of the server, used for Raft communications. - Address string - - // Leader is true if this server is the current cluster leader. - Leader bool - - // Protocol version is the raft protocol version used by the server - ProtocolVersion string - - // Voter is true if this server has a vote in the cluster. This might - // be false if the server is staging and still coming online, or if - // it's a non-voting server, which will be added in a future release of - // Consul. - Voter bool - - // LastIndex is the last log index this server has a record of in its Raft log. - LastIndex uint64 -} - -// RaftConfiguration is returned when querying for the current Raft configuration. -type RaftConfiguration struct { - // Servers has the list of servers in the Raft configuration. - Servers []*RaftServer - - // Index has the Raft index of this configuration. - Index uint64 -} - -// TransferLeaderResponse is returned when querying for the current Raft configuration. -type TransferLeaderResponse struct { - Success bool -} - -// RaftGetConfiguration is used to query the current Raft peer set. -func (op *Operator) RaftGetConfiguration(q *QueryOptions) (*RaftConfiguration, error) { - r := op.c.newRequest("GET", "/v1/operator/raft/configuration") - r.setQueryOptions(q) - _, resp, err := op.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - var out RaftConfiguration - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return &out, nil -} - -// RaftLeaderTransfer is used to transfer the current raft leader to another node -// Optionally accepts a non-empty id of another node to transfer leadership to. -func (op *Operator) RaftLeaderTransfer(id string, q *QueryOptions) (*TransferLeaderResponse, error) { - r := op.c.newRequest("POST", "/v1/operator/raft/transfer-leader") - r.setQueryOptions(q) - - if id != "" { - r.params.Set("id", id) - } - _, resp, err := op.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - var out TransferLeaderResponse - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return &out, nil -} - -// RaftRemovePeerByAddress is used to kick a stale peer (one that it in the Raft -// quorum but no longer known to Serf or the catalog) by address in the form of -// "IP:port". -func (op *Operator) RaftRemovePeerByAddress(address string, q *WriteOptions) error { - r := op.c.newRequest("DELETE", "/v1/operator/raft/peer") - r.setWriteOptions(q) - - r.params.Set("address", address) - - _, resp, err := op.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} - -// RaftRemovePeerByID is used to kick a stale peer (one that it in the Raft -// quorum but no longer known to Serf or the catalog) by ID. -func (op *Operator) RaftRemovePeerByID(id string, q *WriteOptions) error { - r := op.c.newRequest("DELETE", "/v1/operator/raft/peer") - r.setWriteOptions(q) - - r.params.Set("id", id) - - _, resp, err := op.c.doRequest(r) - if err != nil { - return err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return err - } - return nil -} diff --git a/vendor/github.com/hashicorp/consul/api/operator_segment.go b/vendor/github.com/hashicorp/consul/api/operator_segment.go deleted file mode 100644 index 6115a7ab4b5..00000000000 --- a/vendor/github.com/hashicorp/consul/api/operator_segment.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// SegmentList returns all the available LAN segments. -func (op *Operator) SegmentList(q *QueryOptions) ([]string, *QueryMeta, error) { - var out []string - qm, err := op.c.query("/v1/operator/segment", &out, q) - if err != nil { - return nil, nil, err - } - return out, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/operator_usage.go b/vendor/github.com/hashicorp/consul/api/operator_usage.go deleted file mode 100644 index 8977449ddd3..00000000000 --- a/vendor/github.com/hashicorp/consul/api/operator_usage.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -type Usage struct { - // Usage is a map of datacenter -> usage information - Usage map[string]ServiceUsage -} - -// ServiceUsage contains information about the number of services and service instances for a datacenter. -type ServiceUsage struct { - Nodes int - Services int - ServiceInstances int - ConnectServiceInstances map[string]int - - // Billable services are of "typical" service kind (i.e. non-connect or connect-native), - // excluding the "consul" service. - BillableServiceInstances int - - // A map of partition+namespace to number of unique services registered in that namespace - PartitionNamespaceServices map[string]map[string]int - - // A map of partition+namespace to number of service instances registered in that namespace - PartitionNamespaceServiceInstances map[string]map[string]int - - // A map of partition+namespace+kind to number of service-mesh instances registered in that namespace - PartitionNamespaceConnectServiceInstances map[string]map[string]map[string]int - - // A map of partition+namespace to number of billable instances registered in that namespace - PartitionNamespaceBillableServiceInstances map[string]map[string]int -} - -// Usage is used to query for usage information in the given datacenter. -func (op *Operator) Usage(q *QueryOptions) (*Usage, *QueryMeta, error) { - r := op.c.newRequest("GET", "/v1/operator/usage") - r.setQueryOptions(q) - rtt, resp, err := op.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out *Usage - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/partition.go b/vendor/github.com/hashicorp/consul/api/partition.go deleted file mode 100644 index 8467c311896..00000000000 --- a/vendor/github.com/hashicorp/consul/api/partition.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "context" - "fmt" - "time" -) - -// Partition is the configuration of a single admin partition. Admin Partitions are a Consul Enterprise feature. -type Partition struct { - // Name is the name of the Partition. - Name string `json:"Name"` - - // Description is where the user puts any information they want - // about the admin partition. It is not used internally. - Description string `json:"Description,omitempty"` - - // DeletedAt is the time when the Partition was marked for deletion - // This is nullable so that we can omit if empty when encoding in JSON - DeletedAt *time.Time `json:"DeletedAt,omitempty" alias:"deleted_at"` - - // CreateIndex is the Raft index at which the Partition was created - CreateIndex uint64 `json:"CreateIndex,omitempty"` - - // ModifyIndex is the latest Raft index at which the Partition was modified. - ModifyIndex uint64 `json:"ModifyIndex,omitempty"` -} - -// PartitionDefaultName is the default partition value. -const PartitionDefaultName = "default" - -// Partitions can be used to manage Partitions in Consul Enterprise. -type Partitions struct { - c *Client -} - -// Operator returns a handle to the operator endpoints. -func (c *Client) Partitions() *Partitions { - return &Partitions{c} -} - -func (p *Partitions) Create(ctx context.Context, partition *Partition, q *WriteOptions) (*Partition, *WriteMeta, error) { - if partition.Name == "" { - return nil, nil, fmt.Errorf("Must specify a Name for Partition creation") - } - - r := p.c.newRequest("PUT", "/v1/partition") - r.setWriteOptions(q) - r.ctx = ctx - r.obj = partition - rtt, resp, err := p.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - var out Partition - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -func (p *Partitions) Update(ctx context.Context, partition *Partition, q *WriteOptions) (*Partition, *WriteMeta, error) { - if partition.Name == "" { - return nil, nil, fmt.Errorf("Must specify a Name for Partition updating") - } - - r := p.c.newRequest("PUT", "/v1/partition/"+partition.Name) - r.setWriteOptions(q) - r.ctx = ctx - r.obj = partition - rtt, resp, err := p.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - var out Partition - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -func (p *Partitions) Read(ctx context.Context, name string, q *QueryOptions) (*Partition, *QueryMeta, error) { - var out Partition - r := p.c.newRequest("GET", "/v1/partition/"+name) - r.setQueryOptions(q) - r.ctx = ctx - rtt, resp, err := p.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - found, resp, err := requireNotFoundOrOK(resp) - if err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if !found { - return nil, qm, nil - } - - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return &out, qm, nil -} - -func (p *Partitions) Delete(ctx context.Context, name string, q *WriteOptions) (*WriteMeta, error) { - r := p.c.newRequest("DELETE", "/v1/partition/"+name) - r.setWriteOptions(q) - r.ctx = ctx - rtt, resp, err := p.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - return wm, nil -} - -func (p *Partitions) List(ctx context.Context, q *QueryOptions) ([]*Partition, *QueryMeta, error) { - var out []*Partition - r := p.c.newRequest("GET", "/v1/partitions") - r.setQueryOptions(q) - r.ctx = ctx - rtt, resp, err := p.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - return out, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/peering.go b/vendor/github.com/hashicorp/consul/api/peering.go deleted file mode 100644 index dd7780f630a..00000000000 --- a/vendor/github.com/hashicorp/consul/api/peering.go +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "context" - "fmt" - "time" -) - -// PeeringState enumerates all the states a peering can be in -type PeeringState string - -const ( - // PeeringStateUndefined represents an unset value for PeeringState during - // writes. - PeeringStateUndefined PeeringState = "UNDEFINED" - - // PeeringStatePending means the peering was created by generating a peering token. - // Peerings stay in a pending state until the peer uses the token to dial - // the local cluster. - PeeringStatePending PeeringState = "PENDING" - - // PeeringStateEstablishing means the peering is being established from a peering token. - // This is the initial state for dialing peers. - PeeringStateEstablishing PeeringState = "ESTABLISHING" - - // PeeringStateActive means that the peering connection is active and - // healthy. - PeeringStateActive PeeringState = "ACTIVE" - - // PeeringStateFailing means the peering connection has been interrupted - // but has not yet been terminated. - PeeringStateFailing PeeringState = "FAILING" - - // PeeringStateDeleting means a peering was marked for deletion and is in the process - // of being deleted. - PeeringStateDeleting PeeringState = "DELETING" - - // PeeringStateTerminated means the peering relationship has been removed. - PeeringStateTerminated PeeringState = "TERMINATED" -) - -type PeeringRemoteInfo struct { - // Partition is the remote peer's partition. - Partition string - // Datacenter is the remote peer's datacenter. - Datacenter string - Locality *Locality `json:",omitempty"` -} - -// Locality identifies where a given entity is running. -type Locality struct { - // Region is region the zone belongs to. - Region string - - // Zone is the zone the entity is running in. - Zone string -} - -type Peering struct { - // ID is a datacenter-scoped UUID for the peering. - ID string - // Name is the local alias for the peering relationship. - Name string - // Partition is the local partition connecting to the peer. - Partition string `json:",omitempty"` - // DeletedAt is the time when the Peering was marked for deletion - DeletedAt *time.Time `json:",omitempty" alias:"deleted_at"` - // Meta is a mapping of some string value to any other string value - Meta map[string]string `json:",omitempty"` - // State is one of the valid PeeringState values to represent the status of - // peering relationship. - State PeeringState - // PeerID is the ID that our peer assigned to this peering. This ID is to - // be used when dialing the peer, so that it can know who dialed it. - PeerID string `json:",omitempty"` - // PeerCAPems contains all the CA certificates for the remote peer. - PeerCAPems []string `json:",omitempty"` - // PeerServerName is the name of the remote server as it relates to TLS. - PeerServerName string `json:",omitempty"` - // PeerServerAddresses contains all the connection addresses for the remote peer. - PeerServerAddresses []string `json:",omitempty"` - // StreamStatus contains information computed on read based on the state of the stream. - StreamStatus PeeringStreamStatus - // CreateIndex is the Raft index at which the Peering was created. - CreateIndex uint64 - // ModifyIndex is the latest Raft index at which the Peering was modified. - ModifyIndex uint64 - // Remote contains metadata for the remote peer. - Remote PeeringRemoteInfo -} - -type PeeringStreamStatus struct { - // ImportedServices is the list of services imported from this peering. - ImportedServices []string - // ExportedServices is the list of services exported to this peering. - ExportedServices []string - // LastHeartbeat represents when the last heartbeat message was received. - LastHeartbeat *time.Time - // LastReceive represents when any message was last received, regardless of success or error. - LastReceive *time.Time - // LastSend represents when any message was last sent, regardless of success or error. - LastSend *time.Time -} - -type PeeringReadResponse struct { - Peering *Peering -} - -type PeeringGenerateTokenRequest struct { - // PeerName is the name of the remote peer. - PeerName string - // Partition to be peered. - Partition string `json:",omitempty"` - // Meta is a mapping of some string value to any other string value - Meta map[string]string `json:",omitempty"` - // ServerExternalAddresses is a list of addresses to put into the generated token. This could be used to specify - // load balancer(s) or external IPs to reach the servers from the dialing side, and will override any server - // addresses obtained from the "consul" service. - ServerExternalAddresses []string `json:",omitempty"` -} - -type PeeringGenerateTokenResponse struct { - // PeeringToken is an opaque string provided to the remote peer for it to complete - // the peering initialization handshake. - PeeringToken string -} - -type PeeringEstablishRequest struct { - // Name of the remote peer. - PeerName string - // The peering token returned from the peer's GenerateToken endpoint. - PeeringToken string `json:",omitempty"` - // Partition to be peered. - Partition string `json:",omitempty"` - // Meta is a mapping of some string value to any other string value - Meta map[string]string `json:",omitempty"` -} - -type PeeringEstablishResponse struct { -} - -type PeeringListRequest struct { - // future proofing in case we extend List functionality -} - -type Peerings struct { - c *Client -} - -// Peerings returns a handle to the operator endpoints. -func (c *Client) Peerings() *Peerings { - return &Peerings{c: c} -} - -func (p *Peerings) Read(ctx context.Context, name string, q *QueryOptions) (*Peering, *QueryMeta, error) { - if name == "" { - return nil, nil, fmt.Errorf("peering name cannot be empty") - } - - req := p.c.newRequest("GET", fmt.Sprintf("/v1/peering/%s", name)) - req.setQueryOptions(q) - req.ctx = ctx - - rtt, resp, err := p.c.doRequest(req) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - found, resp, err := requireNotFoundOrOK(resp) - if err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if !found { - return nil, qm, nil - } - - var out Peering - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, qm, nil -} - -func (p *Peerings) Delete(ctx context.Context, name string, q *WriteOptions) (*WriteMeta, error) { - if name == "" { - return nil, fmt.Errorf("peering name cannot be empty") - } - - req := p.c.newRequest("DELETE", fmt.Sprintf("/v1/peering/%s", name)) - req.setWriteOptions(q) - req.ctx = ctx - - rtt, resp, err := p.c.doRequest(req) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - return wm, nil -} - -// TODO(peering): verify this is the ultimate signature we want -func (p *Peerings) GenerateToken(ctx context.Context, g PeeringGenerateTokenRequest, wq *WriteOptions) (*PeeringGenerateTokenResponse, *WriteMeta, error) { - if g.PeerName == "" { - return nil, nil, fmt.Errorf("peer name cannot be empty") - } - - req := p.c.newRequest("POST", fmt.Sprint("/v1/peering/token")) - req.setWriteOptions(wq) - req.ctx = ctx - req.obj = g - - rtt, resp, err := p.c.doRequest(req) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - - var out PeeringGenerateTokenResponse - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// TODO(peering): verify this is the ultimate signature we want -func (p *Peerings) Establish(ctx context.Context, i PeeringEstablishRequest, wq *WriteOptions) (*PeeringEstablishResponse, *WriteMeta, error) { - req := p.c.newRequest("POST", fmt.Sprint("/v1/peering/establish")) - req.setWriteOptions(wq) - req.ctx = ctx - req.obj = i - - rtt, resp, err := p.c.doRequest(req) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - wm := &WriteMeta{RequestTime: rtt} - - var out PeeringEstablishResponse - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -func (p *Peerings) List(ctx context.Context, q *QueryOptions) ([]*Peering, *QueryMeta, error) { - req := p.c.newRequest("GET", "/v1/peerings") - req.setQueryOptions(q) - req.ctx = ctx - - rtt, resp, err := p.c.doRequest(req) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - var out []*Peering - if err := decodeBody(resp, &out); err != nil { - return nil, nil, err - } - - return out, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/prepared_query.go b/vendor/github.com/hashicorp/consul/api/prepared_query.go deleted file mode 100644 index 8ebc852f3ac..00000000000 --- a/vendor/github.com/hashicorp/consul/api/prepared_query.go +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// QueryFailoverOptions sets options about how we fail over if there are no -// healthy nodes in the local datacenter. -type QueryFailoverOptions struct { - // NearestN is set to the number of remote datacenters to try, based on - // network coordinates. - NearestN int - - // Datacenters is a fixed list of datacenters to try after NearestN. We - // never try a datacenter multiple times, so those are subtracted from - // this list before proceeding. - Datacenters []string - - // Targets is a fixed list of datacenters and peers to try. This field cannot - // be populated with NearestN or Datacenters. - Targets []QueryFailoverTarget -} - -// Deprecated: use QueryFailoverOptions instead. -type QueryDatacenterOptions = QueryFailoverOptions - -type QueryFailoverTarget struct { - // Peer specifies a peer to try during failover. - Peer string - - // Datacenter specifies a datacenter to try during failover. - Datacenter string - - // Partition specifies a partition to try during failover - // Note: Partition are available only in Consul Enterprise - Partition string `json:",omitempty"` - - // Namespace specifies a namespace to try during failover - // Note: Namespaces are available only in Consul Enterprise - Namespace string `json:",omitempty"` -} - -// QueryDNSOptions controls settings when query results are served over DNS. -type QueryDNSOptions struct { - // TTL is the time to live for the served DNS results. - TTL string -} - -// ServiceQuery is used to query for a set of healthy nodes offering a specific -// service. -type ServiceQuery struct { - // Service is the service to query. - Service string - - // SamenessGroup specifies a sameness group to query. The first member of the Sameness Group will - // be targeted first on PQ execution and subsequent members will be targeted during failover scenarios. - // This field is mutually exclusive with Failover. - SamenessGroup string `json:",omitempty"` - - // Namespace of the service to query - Namespace string `json:",omitempty"` - - // Partition of the service to query - Partition string `json:",omitempty"` - - // Near allows baking in the name of a node to automatically distance- - // sort from. The magic "_agent" value is supported, which sorts near - // the agent which initiated the request by default. - Near string - - // Failover controls what we do if there are no healthy nodes in the - // local datacenter. - Failover QueryFailoverOptions `json:",omitempty"` - - // IgnoreCheckIDs is an optional list of health check IDs to ignore when - // considering which nodes are healthy. It is useful as an emergency measure - // to temporarily override some health check that is producing false negatives - // for example. - IgnoreCheckIDs []string - - // If OnlyPassing is true then we will only include nodes with passing - // health checks (critical AND warning checks will cause a node to be - // discarded) - OnlyPassing bool - - // Tags are a set of required and/or disallowed tags. If a tag is in - // this list it must be present. If the tag is preceded with "!" then - // it is disallowed. - Tags []string - - // NodeMeta is a map of required node metadata fields. If a key/value - // pair is in this map it must be present on the node in order for the - // service entry to be returned. - NodeMeta map[string]string - - // ServiceMeta is a map of required service metadata fields. If a key/value - // pair is in this map it must be present on the node in order for the - // service entry to be returned. - ServiceMeta map[string]string - - // Connect if true will filter the prepared query results to only - // include Connect-capable services. These include both native services - // and proxies for matching services. Note that if a proxy matches, - // the constraints in the query above (Near, OnlyPassing, etc.) apply - // to the _proxy_ and not the service being proxied. In practice, proxies - // should be directly next to their services so this isn't an issue. - Connect bool -} - -// QueryTemplate carries the arguments for creating a templated query. -type QueryTemplate struct { - // Type specifies the type of the query template. Currently only - // "name_prefix_match" is supported. This field is required. - Type string - - // Regexp allows specifying a regex pattern to match against the name - // of the query being executed. - Regexp string - - // RemoveEmptyTags if set to true, will cause the Tags list inside - // the Service structure to be stripped of any empty strings. This is useful - // when interpolating into tags in a way where the tag is optional, and - // where searching for an empty tag would yield no results from the query. - RemoveEmptyTags bool -} - -// PreparedQueryDefinition defines a complete prepared query. -type PreparedQueryDefinition struct { - // ID is this UUID-based ID for the query, always generated by Consul. - ID string - - // Name is an optional friendly name for the query supplied by the - // user. NOTE - if this feature is used then it will reduce the security - // of any read ACL associated with this query/service since this name - // can be used to locate nodes with supplying any ACL. - Name string - - // Session is an optional session to tie this query's lifetime to. If - // this is omitted then the query will not expire. - Session string - - // Token is the ACL token used when the query was created, and it is - // used when a query is subsequently executed. This token, or a token - // with management privileges, must be used to change the query later. - Token string - - // Service defines a service query (leaving things open for other types - // later). - Service ServiceQuery - - // DNS has options that control how the results of this query are - // served over DNS. - DNS QueryDNSOptions - - // Template is used to pass through the arguments for creating a - // prepared query with an attached template. If a template is given, - // interpolations are possible in other struct fields. - Template QueryTemplate -} - -// PreparedQueryExecuteResponse has the results of executing a query. -type PreparedQueryExecuteResponse struct { - // Service is the service that was queried. - Service string - - // Namespace of the service that was queried - Namespace string `json:",omitempty"` - - // Nodes has the nodes that were output by the query. - Nodes []ServiceEntry - - // DNS has the options for serving these results over DNS. - DNS QueryDNSOptions - - // Datacenter is the datacenter that these results came from. - Datacenter string - - // Failovers is a count of how many times we had to query a remote - // datacenter. - Failovers int -} - -// PreparedQuery can be used to query the prepared query endpoints. -type PreparedQuery struct { - c *Client -} - -// PreparedQuery returns a handle to the prepared query endpoints. -func (c *Client) PreparedQuery() *PreparedQuery { - return &PreparedQuery{c} -} - -// Create makes a new prepared query. The ID of the new query is returned. -func (c *PreparedQuery) Create(query *PreparedQueryDefinition, q *WriteOptions) (string, *WriteMeta, error) { - r := c.c.newRequest("POST", "/v1/query") - r.setWriteOptions(q) - r.obj = query - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return "", nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return "", nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - - var out struct{ ID string } - if err := decodeBody(resp, &out); err != nil { - return "", nil, err - } - return out.ID, wm, nil -} - -// Update makes updates to an existing prepared query. -func (c *PreparedQuery) Update(query *PreparedQueryDefinition, q *WriteOptions) (*WriteMeta, error) { - return c.c.write("/v1/query/"+query.ID, query, nil, q) -} - -// List is used to fetch all the prepared queries (always requires a management -// token). -func (c *PreparedQuery) List(q *QueryOptions) ([]*PreparedQueryDefinition, *QueryMeta, error) { - var out []*PreparedQueryDefinition - qm, err := c.c.query("/v1/query", &out, q) - if err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// Get is used to fetch a specific prepared query. -func (c *PreparedQuery) Get(queryID string, q *QueryOptions) ([]*PreparedQueryDefinition, *QueryMeta, error) { - var out []*PreparedQueryDefinition - qm, err := c.c.query("/v1/query/"+queryID, &out, q) - if err != nil { - return nil, nil, err - } - return out, qm, nil -} - -// Delete is used to delete a specific prepared query. -func (c *PreparedQuery) Delete(queryID string, q *WriteOptions) (*WriteMeta, error) { - r := c.c.newRequest("DELETE", "/v1/query/"+queryID) - r.setWriteOptions(q) - rtt, resp, err := c.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - wm := &WriteMeta{} - wm.RequestTime = rtt - return wm, nil -} - -// Execute is used to execute a specific prepared query. You can execute using -// a query ID or name. -func (c *PreparedQuery) Execute(queryIDOrName string, q *QueryOptions) (*PreparedQueryExecuteResponse, *QueryMeta, error) { - var out *PreparedQueryExecuteResponse - qm, err := c.c.query("/v1/query/"+queryIDOrName+"/execute", &out, q) - if err != nil { - return nil, nil, err - } - return out, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/raw.go b/vendor/github.com/hashicorp/consul/api/raw.go deleted file mode 100644 index 639513d29fa..00000000000 --- a/vendor/github.com/hashicorp/consul/api/raw.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// Raw can be used to do raw queries against custom endpoints -type Raw struct { - c *Client -} - -// Raw returns a handle to query endpoints -func (c *Client) Raw() *Raw { - return &Raw{c} -} - -// Query is used to do a GET request against an endpoint -// and deserialize the response into an interface using -// standard Consul conventions. -func (raw *Raw) Query(endpoint string, out interface{}, q *QueryOptions) (*QueryMeta, error) { - return raw.c.query(endpoint, out, q) -} - -// Write is used to do a PUT request against an endpoint -// and serialize/deserialized using the standard Consul conventions. -func (raw *Raw) Write(endpoint string, in, out interface{}, q *WriteOptions) (*WriteMeta, error) { - return raw.c.write(endpoint, in, out, q) -} diff --git a/vendor/github.com/hashicorp/consul/api/semaphore.go b/vendor/github.com/hashicorp/consul/api/semaphore.go deleted file mode 100644 index 9d98ff5c29b..00000000000 --- a/vendor/github.com/hashicorp/consul/api/semaphore.go +++ /dev/null @@ -1,533 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "fmt" - "path" - "sync" - "time" -) - -const ( - // DefaultSemaphoreSessionName is the Session Name we assign if none is provided - DefaultSemaphoreSessionName = "Consul API Semaphore" - - // DefaultSemaphoreSessionTTL is the default session TTL if no Session is provided - // when creating a new Semaphore. This is used because we do not have another - // other check to depend upon. - DefaultSemaphoreSessionTTL = "15s" - - // DefaultSemaphoreWaitTime is how long we block for at a time to check if semaphore - // acquisition is possible. This affects the minimum time it takes to cancel - // a Semaphore acquisition. - DefaultSemaphoreWaitTime = 15 * time.Second - - // DefaultSemaphoreKey is the key used within the prefix to - // use for coordination between all the contenders. - DefaultSemaphoreKey = ".lock" - - // SemaphoreFlagValue is a magic flag we set to indicate a key - // is being used for a semaphore. It is used to detect a potential - // conflict with a lock. - SemaphoreFlagValue = 0xe0f69a2baa414de0 -) - -var ( - // ErrSemaphoreHeld is returned if we attempt to double lock - ErrSemaphoreHeld = fmt.Errorf("Semaphore already held") - - // ErrSemaphoreNotHeld is returned if we attempt to unlock a semaphore - // that we do not hold. - ErrSemaphoreNotHeld = fmt.Errorf("Semaphore not held") - - // ErrSemaphoreInUse is returned if we attempt to destroy a semaphore - // that is in use. - ErrSemaphoreInUse = fmt.Errorf("Semaphore in use") - - // ErrSemaphoreConflict is returned if the flags on a key - // used for a semaphore do not match expectation - ErrSemaphoreConflict = fmt.Errorf("Existing key does not match semaphore use") -) - -// Semaphore is used to implement a distributed semaphore -// using the Consul KV primitives. -type Semaphore struct { - c *Client - opts *SemaphoreOptions - - isHeld bool - sessionRenew chan struct{} - lockSession string - l sync.Mutex -} - -// SemaphoreOptions is used to parameterize the Semaphore -type SemaphoreOptions struct { - Prefix string // Must be set and have write permissions - Limit int // Must be set, and be positive - Value []byte // Optional, value to associate with the contender entry - Session string // Optional, created if not specified - SessionName string // Optional, defaults to DefaultLockSessionName - SessionTTL string // Optional, defaults to DefaultLockSessionTTL - MonitorRetries int // Optional, defaults to 0 which means no retries - MonitorRetryTime time.Duration // Optional, defaults to DefaultMonitorRetryTime - SemaphoreWaitTime time.Duration // Optional, defaults to DefaultSemaphoreWaitTime - SemaphoreTryOnce bool // Optional, defaults to false which means try forever - Namespace string `json:",omitempty"` // Optional, defaults to API client config, namespace of ACL token, or "default" namespace -} - -// semaphoreLock is written under the DefaultSemaphoreKey and -// is used to coordinate between all the contenders. -type semaphoreLock struct { - // Limit is the integer limit of holders. This is used to - // verify that all the holders agree on the value. - Limit int - - // Holders is a list of all the semaphore holders. - // It maps the session ID to true. It is used as a set effectively. - Holders map[string]bool -} - -// SemaphorePrefix is used to created a Semaphore which will operate -// at the given KV prefix and uses the given limit for the semaphore. -// The prefix must have write privileges, and the limit must be agreed -// upon by all contenders. -func (c *Client) SemaphorePrefix(prefix string, limit int) (*Semaphore, error) { - opts := &SemaphoreOptions{ - Prefix: prefix, - Limit: limit, - } - return c.SemaphoreOpts(opts) -} - -// SemaphoreOpts is used to create a Semaphore with the given options. -// The prefix must have write privileges, and the limit must be agreed -// upon by all contenders. If a Session is not provided, one will be created. -func (c *Client) SemaphoreOpts(opts *SemaphoreOptions) (*Semaphore, error) { - if opts.Prefix == "" { - return nil, fmt.Errorf("missing prefix") - } - if opts.Limit <= 0 { - return nil, fmt.Errorf("semaphore limit must be positive") - } - if opts.SessionName == "" { - opts.SessionName = DefaultSemaphoreSessionName - } - if opts.SessionTTL == "" { - opts.SessionTTL = DefaultSemaphoreSessionTTL - } else { - if _, err := time.ParseDuration(opts.SessionTTL); err != nil { - return nil, fmt.Errorf("invalid SessionTTL: %v", err) - } - } - if opts.MonitorRetryTime == 0 { - opts.MonitorRetryTime = DefaultMonitorRetryTime - } - if opts.SemaphoreWaitTime == 0 { - opts.SemaphoreWaitTime = DefaultSemaphoreWaitTime - } - s := &Semaphore{ - c: c, - opts: opts, - } - return s, nil -} - -// Acquire attempts to reserve a slot in the semaphore, blocking until -// success, interrupted via the stopCh or an error is encountered. -// Providing a non-nil stopCh can be used to abort the attempt. -// On success, a channel is returned that represents our slot. -// This channel could be closed at any time due to session invalidation, -// communication errors, operator intervention, etc. It is NOT safe to -// assume that the slot is held until Release() unless the Session is specifically -// created without any associated health checks. By default Consul sessions -// prefer liveness over safety and an application must be able to handle -// the session being lost. -func (s *Semaphore) Acquire(stopCh <-chan struct{}) (<-chan struct{}, error) { - // Hold the lock as we try to acquire - s.l.Lock() - defer s.l.Unlock() - - // Check if we already hold the semaphore - if s.isHeld { - return nil, ErrSemaphoreHeld - } - - // Check if we need to create a session first - s.lockSession = s.opts.Session - if s.lockSession == "" { - sess, err := s.createSession() - if err != nil { - return nil, fmt.Errorf("failed to create session: %v", err) - } - - s.sessionRenew = make(chan struct{}) - s.lockSession = sess - session := s.c.Session() - go session.RenewPeriodic(s.opts.SessionTTL, sess, nil, s.sessionRenew) - - // If we fail to acquire the lock, cleanup the session - defer func() { - if !s.isHeld { - close(s.sessionRenew) - s.sessionRenew = nil - } - }() - } - - // Create the contender entry - kv := s.c.KV() - wOpts := WriteOptions{Namespace: s.opts.Namespace} - - made, _, err := kv.Acquire(s.contenderEntry(s.lockSession), &wOpts) - if err != nil || !made { - return nil, fmt.Errorf("failed to make contender entry: %v", err) - } - - // Setup the query options - qOpts := QueryOptions{ - WaitTime: s.opts.SemaphoreWaitTime, - Namespace: s.opts.Namespace, - } - - start := time.Now() - attempts := 0 -WAIT: - // Check if we should quit - select { - case <-stopCh: - return nil, nil - default: - } - - // Handle the one-shot mode. - if s.opts.SemaphoreTryOnce && attempts > 0 { - elapsed := time.Since(start) - if elapsed > s.opts.SemaphoreWaitTime { - return nil, nil - } - - // Query wait time should not exceed the semaphore wait time - qOpts.WaitTime = s.opts.SemaphoreWaitTime - elapsed - } - attempts++ - - // Read the prefix - pairs, meta, err := kv.List(s.opts.Prefix, &qOpts) - if err != nil { - return nil, fmt.Errorf("failed to read prefix: %v", err) - } - - // Decode the lock - lockPair := s.findLock(pairs) - if lockPair.Flags != SemaphoreFlagValue { - return nil, ErrSemaphoreConflict - } - lock, err := s.decodeLock(lockPair) - if err != nil { - return nil, err - } - - // Verify we agree with the limit - if lock.Limit != s.opts.Limit { - return nil, fmt.Errorf("semaphore limit conflict (lock: %d, local: %d)", - lock.Limit, s.opts.Limit) - } - - // Prune the dead holders - s.pruneDeadHolders(lock, pairs) - - // Check if the lock is held - if len(lock.Holders) >= lock.Limit { - qOpts.WaitIndex = meta.LastIndex - goto WAIT - } - - // Create a new lock with us as a holder - lock.Holders[s.lockSession] = true - newLock, err := s.encodeLock(lock, lockPair.ModifyIndex) - if err != nil { - return nil, err - } - - // Attempt the acquisition - didSet, _, err := kv.CAS(newLock, &wOpts) - if err != nil { - return nil, fmt.Errorf("failed to update lock: %v", err) - } - if !didSet { - // Update failed, could have been a race with another contender, - // retry the operation - goto WAIT - } - - // Watch to ensure we maintain ownership of the slot - lockCh := make(chan struct{}) - go s.monitorLock(s.lockSession, lockCh) - - // Set that we own the lock - s.isHeld = true - - // Acquired! All done - return lockCh, nil -} - -// Release is used to voluntarily give up our semaphore slot. It is -// an error to call this if the semaphore has not been acquired. -func (s *Semaphore) Release() error { - // Hold the lock as we try to release - s.l.Lock() - defer s.l.Unlock() - - // Ensure the lock is actually held - if !s.isHeld { - return ErrSemaphoreNotHeld - } - - // Set that we no longer own the lock - s.isHeld = false - - // Stop the session renew - if s.sessionRenew != nil { - defer func() { - close(s.sessionRenew) - s.sessionRenew = nil - }() - } - - // Get and clear the lock session - lockSession := s.lockSession - s.lockSession = "" - - // Remove ourselves as a lock holder - kv := s.c.KV() - key := path.Join(s.opts.Prefix, DefaultSemaphoreKey) - - wOpts := WriteOptions{Namespace: s.opts.Namespace} - qOpts := QueryOptions{Namespace: s.opts.Namespace} - -READ: - pair, _, err := kv.Get(key, &qOpts) - if err != nil { - return err - } - if pair == nil { - pair = &KVPair{} - } - lock, err := s.decodeLock(pair) - if err != nil { - return err - } - - // Create a new lock without us as a holder - if _, ok := lock.Holders[lockSession]; ok { - delete(lock.Holders, lockSession) - newLock, err := s.encodeLock(lock, pair.ModifyIndex) - if err != nil { - return err - } - - // Swap the locks - didSet, _, err := kv.CAS(newLock, &wOpts) - if err != nil { - return fmt.Errorf("failed to update lock: %v", err) - } - if !didSet { - goto READ - } - } - - // Destroy the contender entry - contenderKey := path.Join(s.opts.Prefix, lockSession) - if _, err := kv.Delete(contenderKey, &wOpts); err != nil { - return err - } - return nil -} - -// Destroy is used to cleanup the semaphore entry. It is not necessary -// to invoke. It will fail if the semaphore is in use. -func (s *Semaphore) Destroy() error { - // Hold the lock as we try to acquire - s.l.Lock() - defer s.l.Unlock() - - // Check if we already hold the semaphore - if s.isHeld { - return ErrSemaphoreHeld - } - - // List for the semaphore - kv := s.c.KV() - - q := QueryOptions{Namespace: s.opts.Namespace} - pairs, _, err := kv.List(s.opts.Prefix, &q) - if err != nil { - return fmt.Errorf("failed to read prefix: %v", err) - } - - // Find the lock pair, bail if it doesn't exist - lockPair := s.findLock(pairs) - if lockPair.ModifyIndex == 0 { - return nil - } - if lockPair.Flags != SemaphoreFlagValue { - return ErrSemaphoreConflict - } - - // Decode the lock - lock, err := s.decodeLock(lockPair) - if err != nil { - return err - } - - // Prune the dead holders - s.pruneDeadHolders(lock, pairs) - - // Check if there are any holders - if len(lock.Holders) > 0 { - return ErrSemaphoreInUse - } - - // Attempt the delete - w := WriteOptions{Namespace: s.opts.Namespace} - didRemove, _, err := kv.DeleteCAS(lockPair, &w) - if err != nil { - return fmt.Errorf("failed to remove semaphore: %v", err) - } - if !didRemove { - return ErrSemaphoreInUse - } - return nil -} - -// createSession is used to create a new managed session -func (s *Semaphore) createSession() (string, error) { - session := s.c.Session() - se := &SessionEntry{ - Name: s.opts.SessionName, - TTL: s.opts.SessionTTL, - Behavior: SessionBehaviorDelete, - } - - w := WriteOptions{Namespace: s.opts.Namespace} - id, _, err := session.Create(se, &w) - if err != nil { - return "", err - } - return id, nil -} - -// contenderEntry returns a formatted KVPair for the contender -func (s *Semaphore) contenderEntry(session string) *KVPair { - return &KVPair{ - Key: path.Join(s.opts.Prefix, session), - Value: s.opts.Value, - Session: session, - Flags: SemaphoreFlagValue, - } -} - -// findLock is used to find the KV Pair which is used for coordination -func (s *Semaphore) findLock(pairs KVPairs) *KVPair { - key := path.Join(s.opts.Prefix, DefaultSemaphoreKey) - for _, pair := range pairs { - if pair.Key == key { - return pair - } - } - return &KVPair{Flags: SemaphoreFlagValue} -} - -// decodeLock is used to decode a semaphoreLock from an -// entry in Consul -func (s *Semaphore) decodeLock(pair *KVPair) (*semaphoreLock, error) { - // Handle if there is no lock - if pair == nil || pair.Value == nil { - return &semaphoreLock{ - Limit: s.opts.Limit, - Holders: make(map[string]bool), - }, nil - } - - l := &semaphoreLock{} - if err := json.Unmarshal(pair.Value, l); err != nil { - return nil, fmt.Errorf("lock decoding failed: %v", err) - } - return l, nil -} - -// encodeLock is used to encode a semaphoreLock into a KVPair -// that can be PUT -func (s *Semaphore) encodeLock(l *semaphoreLock, oldIndex uint64) (*KVPair, error) { - enc, err := json.Marshal(l) - if err != nil { - return nil, fmt.Errorf("lock encoding failed: %v", err) - } - pair := &KVPair{ - Key: path.Join(s.opts.Prefix, DefaultSemaphoreKey), - Value: enc, - Flags: SemaphoreFlagValue, - ModifyIndex: oldIndex, - } - return pair, nil -} - -// pruneDeadHolders is used to remove all the dead lock holders -func (s *Semaphore) pruneDeadHolders(lock *semaphoreLock, pairs KVPairs) { - // Gather all the live holders - alive := make(map[string]struct{}, len(pairs)) - for _, pair := range pairs { - if pair.Session != "" { - alive[pair.Session] = struct{}{} - } - } - - // Remove any holders that are dead - for holder := range lock.Holders { - if _, ok := alive[holder]; !ok { - delete(lock.Holders, holder) - } - } -} - -// monitorLock is a long running routine to monitor a semaphore ownership -// It closes the stopCh if we lose our slot. -func (s *Semaphore) monitorLock(session string, stopCh chan struct{}) { - defer close(stopCh) - kv := s.c.KV() - opts := QueryOptions{ - RequireConsistent: true, - Namespace: s.opts.Namespace, - } -WAIT: - retries := s.opts.MonitorRetries -RETRY: - pairs, meta, err := kv.List(s.opts.Prefix, &opts) - if err != nil { - // If configured we can try to ride out a brief Consul unavailability - // by doing retries. Note that we have to attempt the retry in a non- - // blocking fashion so that we have a clean place to reset the retry - // counter if service is restored. - if retries > 0 && IsRetryableError(err) { - time.Sleep(s.opts.MonitorRetryTime) - retries-- - opts.WaitIndex = 0 - goto RETRY - } - return - } - lockPair := s.findLock(pairs) - lock, err := s.decodeLock(lockPair) - if err != nil { - return - } - s.pruneDeadHolders(lock, pairs) - if _, ok := lock.Holders[session]; ok { - opts.WaitIndex = meta.LastIndex - goto WAIT - } -} diff --git a/vendor/github.com/hashicorp/consul/api/session.go b/vendor/github.com/hashicorp/consul/api/session.go deleted file mode 100644 index 69fd77d2790..00000000000 --- a/vendor/github.com/hashicorp/consul/api/session.go +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "errors" - "fmt" - "time" -) - -const ( - // SessionBehaviorRelease is the default behavior and causes - // all associated locks to be released on session invalidation. - SessionBehaviorRelease = "release" - - // SessionBehaviorDelete is new in Consul 0.5 and changes the - // behavior to delete all associated locks on session invalidation. - // It can be used in a way similar to Ephemeral Nodes in ZooKeeper. - SessionBehaviorDelete = "delete" -) - -var ErrSessionExpired = errors.New("session expired") - -// SessionEntry represents a session in consul -type SessionEntry struct { - CreateIndex uint64 - ID string - Name string - Node string - LockDelay time.Duration - Behavior string - TTL string - Namespace string `json:",omitempty"` - - // Deprecated for Consul Enterprise in v1.7.0. - Checks []string - - // NodeChecks and ServiceChecks are new in Consul 1.7.0. - // When associating checks with sessions, namespaces can be specified for service checks. - NodeChecks []string - ServiceChecks []ServiceCheck -} - -type ServiceCheck struct { - ID string - Namespace string -} - -// Session can be used to query the Session endpoints -type Session struct { - c *Client -} - -// Session returns a handle to the session endpoints -func (c *Client) Session() *Session { - return &Session{c} -} - -// CreateNoChecks is like Create but is used specifically to create -// a session with no associated health checks. -func (s *Session) CreateNoChecks(se *SessionEntry, q *WriteOptions) (string, *WriteMeta, error) { - body := make(map[string]interface{}) - body["NodeChecks"] = []string{} - if se != nil { - if se.Name != "" { - body["Name"] = se.Name - } - if se.Node != "" { - body["Node"] = se.Node - } - if se.LockDelay != 0 { - body["LockDelay"] = durToMsec(se.LockDelay) - } - if se.Behavior != "" { - body["Behavior"] = se.Behavior - } - if se.TTL != "" { - body["TTL"] = se.TTL - } - } - return s.create(body, q) - -} - -// Create makes a new session. Providing a session entry can -// customize the session. It can also be nil to use defaults. -func (s *Session) Create(se *SessionEntry, q *WriteOptions) (string, *WriteMeta, error) { - var obj interface{} - if se != nil { - body := make(map[string]interface{}) - obj = body - if se.Name != "" { - body["Name"] = se.Name - } - if se.Node != "" { - body["Node"] = se.Node - } - if se.LockDelay != 0 { - body["LockDelay"] = durToMsec(se.LockDelay) - } - if len(se.Checks) > 0 { - body["Checks"] = se.Checks - } - if len(se.NodeChecks) > 0 { - body["NodeChecks"] = se.NodeChecks - } - if len(se.ServiceChecks) > 0 { - body["ServiceChecks"] = se.ServiceChecks - } - if se.Behavior != "" { - body["Behavior"] = se.Behavior - } - if se.TTL != "" { - body["TTL"] = se.TTL - } - } - return s.create(obj, q) -} - -func (s *Session) create(obj interface{}, q *WriteOptions) (string, *WriteMeta, error) { - var out struct{ ID string } - wm, err := s.c.write("/v1/session/create", obj, &out, q) - if err != nil { - return "", nil, err - } - return out.ID, wm, nil -} - -// Destroy invalidates a given session -func (s *Session) Destroy(id string, q *WriteOptions) (*WriteMeta, error) { - wm, err := s.c.write("/v1/session/destroy/"+id, nil, nil, q) - if err != nil { - return nil, err - } - return wm, nil -} - -// Renew renews the TTL on a given session -func (s *Session) Renew(id string, q *WriteOptions) (*SessionEntry, *WriteMeta, error) { - r := s.c.newRequest("PUT", "/v1/session/renew/"+id) - r.setWriteOptions(q) - rtt, resp, err := s.c.doRequest(r) - if err != nil { - return nil, nil, err - } - defer closeResponseBody(resp) - - wm := &WriteMeta{RequestTime: rtt} - - if resp.StatusCode == 404 { - return nil, wm, nil - } else if resp.StatusCode != 200 { - return nil, nil, fmt.Errorf("Unexpected response code: %d", resp.StatusCode) - } - - var entries []*SessionEntry - if err := decodeBody(resp, &entries); err != nil { - return nil, nil, fmt.Errorf("Failed to read response: %v", err) - } - if len(entries) > 0 { - return entries[0], wm, nil - } - return nil, wm, nil -} - -// RenewPeriodic is used to periodically invoke Session.Renew on a -// session until a doneCh is closed. This is meant to be used in a long running -// goroutine to ensure a session stays valid. -func (s *Session) RenewPeriodic(initialTTL string, id string, q *WriteOptions, doneCh <-chan struct{}) error { - ctx := q.Context() - - ttl, err := time.ParseDuration(initialTTL) - if err != nil { - return err - } - - waitDur := ttl / 2 - lastRenewTime := time.Now() - var lastErr error - for { - if time.Since(lastRenewTime) > ttl { - return lastErr - } - select { - case <-time.After(waitDur): - entry, _, err := s.Renew(id, q) - if err != nil { - waitDur = time.Second - lastErr = err - continue - } - if entry == nil { - return ErrSessionExpired - } - - // Handle the server updating the TTL - ttl, _ = time.ParseDuration(entry.TTL) - waitDur = ttl / 2 - lastRenewTime = time.Now() - - case <-doneCh: - // Attempt a session destroy - s.Destroy(id, q) - return nil - - case <-ctx.Done(): - // Bail immediately since attempting the destroy would - // use the canceled context in q, which would just bail. - return ctx.Err() - } - } -} - -// Info looks up a single session -func (s *Session) Info(id string, q *QueryOptions) (*SessionEntry, *QueryMeta, error) { - var entries []*SessionEntry - qm, err := s.c.query("/v1/session/info/"+id, &entries, q) - if err != nil { - return nil, nil, err - } - if len(entries) > 0 { - return entries[0], qm, nil - } - return nil, qm, nil -} - -// List gets sessions for a node -func (s *Session) Node(node string, q *QueryOptions) ([]*SessionEntry, *QueryMeta, error) { - var entries []*SessionEntry - qm, err := s.c.query("/v1/session/node/"+node, &entries, q) - if err != nil { - return nil, nil, err - } - return entries, qm, nil -} - -// List gets all active sessions -func (s *Session) List(q *QueryOptions) ([]*SessionEntry, *QueryMeta, error) { - var entries []*SessionEntry - qm, err := s.c.query("/v1/session/list", &entries, q) - if err != nil { - return nil, nil, err - } - return entries, qm, nil -} diff --git a/vendor/github.com/hashicorp/consul/api/snapshot.go b/vendor/github.com/hashicorp/consul/api/snapshot.go deleted file mode 100644 index bcc80e5b3de..00000000000 --- a/vendor/github.com/hashicorp/consul/api/snapshot.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "io" -) - -// Snapshot can be used to query the /v1/snapshot endpoint to take snapshots of -// Consul's internal state and restore snapshots for disaster recovery. -type Snapshot struct { - c *Client -} - -// Snapshot returns a handle that exposes the snapshot endpoints. -func (c *Client) Snapshot() *Snapshot { - return &Snapshot{c} -} - -// Save requests a new snapshot and provides an io.ReadCloser with the snapshot -// data to save. If this doesn't return an error, then it's the responsibility -// of the caller to close it. Only a subset of the QueryOptions are supported: -// Datacenter, AllowStale, and Token. -func (s *Snapshot) Save(q *QueryOptions) (io.ReadCloser, *QueryMeta, error) { - r := s.c.newRequest("GET", "/v1/snapshot") - r.setQueryOptions(q) - - rtt, resp, err := s.c.doRequest(r) - if err != nil { - return nil, nil, err - } - if err := requireOK(resp); err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - return resp.Body, qm, nil -} - -// Restore streams in an existing snapshot and attempts to restore it. -func (s *Snapshot) Restore(q *WriteOptions, in io.Reader) error { - r := s.c.newRequest("PUT", "/v1/snapshot") - r.body = in - r.header.Set("Content-Type", "application/octet-stream") - r.setWriteOptions(q) - _, resp, err := s.c.doRequest(r) - if err != nil { - return err - } - if err := requireOK(resp); err != nil { - return err - } - return nil -} diff --git a/vendor/github.com/hashicorp/consul/api/status.go b/vendor/github.com/hashicorp/consul/api/status.go deleted file mode 100644 index 8c52eb222bf..00000000000 --- a/vendor/github.com/hashicorp/consul/api/status.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// Status can be used to query the Status endpoints -type Status struct { - c *Client -} - -// Status returns a handle to the status endpoints -func (c *Client) Status() *Status { - return &Status{c} -} - -// Leader is used to query for a known leader -func (s *Status) LeaderWithQueryOptions(q *QueryOptions) (string, error) { - r := s.c.newRequest("GET", "/v1/status/leader") - - if q != nil { - r.setQueryOptions(q) - } - - _, resp, err := s.c.doRequest(r) - if err != nil { - return "", err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return "", err - } - - var leader string - if err := decodeBody(resp, &leader); err != nil { - return "", err - } - return leader, nil -} - -func (s *Status) Leader() (string, error) { - return s.LeaderWithQueryOptions(nil) -} - -// Peers is used to query for a known raft peers -func (s *Status) PeersWithQueryOptions(q *QueryOptions) ([]string, error) { - r := s.c.newRequest("GET", "/v1/status/peers") - - if q != nil { - r.setQueryOptions(q) - } - - _, resp, err := s.c.doRequest(r) - if err != nil { - return nil, err - } - defer closeResponseBody(resp) - if err := requireOK(resp); err != nil { - return nil, err - } - - var peers []string - if err := decodeBody(resp, &peers); err != nil { - return nil, err - } - return peers, nil -} - -func (s *Status) Peers() ([]string, error) { - return s.PeersWithQueryOptions(nil) -} diff --git a/vendor/github.com/hashicorp/consul/api/txn.go b/vendor/github.com/hashicorp/consul/api/txn.go deleted file mode 100644 index 59adafdac3d..00000000000 --- a/vendor/github.com/hashicorp/consul/api/txn.go +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "bytes" - "fmt" - "io" - "net/http" -) - -// Txn is used to manipulate the Txn API -type Txn struct { - c *Client -} - -// Txn is used to return a handle to the K/V apis -func (c *Client) Txn() *Txn { - return &Txn{c} -} - -// TxnOp is the internal format we send to Consul. Currently only K/V and -// check operations are supported. -type TxnOp struct { - KV *KVTxnOp - Node *NodeTxnOp - Service *ServiceTxnOp - Check *CheckTxnOp -} - -// TxnOps is a list of transaction operations. -type TxnOps []*TxnOp - -// TxnResult is the internal format we receive from Consul. -type TxnResult struct { - KV *KVPair - Node *Node - Service *CatalogService - Check *HealthCheck -} - -// TxnResults is a list of TxnResult objects. -type TxnResults []*TxnResult - -// TxnError is used to return information about an operation in a transaction. -type TxnError struct { - OpIndex int - What string -} - -// TxnErrors is a list of TxnError objects. -type TxnErrors []*TxnError - -// TxnResponse is the internal format we receive from Consul. -type TxnResponse struct { - Results TxnResults - Errors TxnErrors -} - -// KVOp constants give possible operations available in a transaction. -type KVOp string - -const ( - KVSet KVOp = "set" - KVDelete KVOp = "delete" - KVDeleteCAS KVOp = "delete-cas" - KVDeleteTree KVOp = "delete-tree" - KVCAS KVOp = "cas" - KVLock KVOp = "lock" - KVUnlock KVOp = "unlock" - KVGet KVOp = "get" - KVGetOrEmpty KVOp = "get-or-empty" - KVGetTree KVOp = "get-tree" - KVCheckSession KVOp = "check-session" - KVCheckIndex KVOp = "check-index" - KVCheckNotExists KVOp = "check-not-exists" -) - -// KVTxnOp defines a single operation inside a transaction. -type KVTxnOp struct { - Verb KVOp - Key string - Value []byte - Flags uint64 - Index uint64 - Session string - Namespace string `json:",omitempty"` - Partition string `json:",omitempty"` -} - -// KVTxnOps defines a set of operations to be performed inside a single -// transaction. -type KVTxnOps []*KVTxnOp - -// KVTxnResponse has the outcome of a transaction. -type KVTxnResponse struct { - Results []*KVPair - Errors TxnErrors -} - -// SessionOp constants give possible operations available in a transaction. -type SessionOp string - -const ( - SessionDelete SessionOp = "delete" -) - -// SessionTxnOp defines a single operation inside a transaction. -type SessionTxnOp struct { - Verb SessionOp - Session Session -} - -// NodeOp constants give possible operations available in a transaction. -type NodeOp string - -const ( - NodeGet NodeOp = "get" - NodeSet NodeOp = "set" - NodeCAS NodeOp = "cas" - NodeDelete NodeOp = "delete" - NodeDeleteCAS NodeOp = "delete-cas" -) - -// NodeTxnOp defines a single operation inside a transaction. -type NodeTxnOp struct { - Verb NodeOp - Node Node -} - -// ServiceOp constants give possible operations available in a transaction. -type ServiceOp string - -const ( - ServiceGet ServiceOp = "get" - ServiceSet ServiceOp = "set" - ServiceCAS ServiceOp = "cas" - ServiceDelete ServiceOp = "delete" - ServiceDeleteCAS ServiceOp = "delete-cas" -) - -// ServiceTxnOp defines a single operation inside a transaction. -type ServiceTxnOp struct { - Verb ServiceOp - Node string - Service AgentService -} - -// CheckOp constants give possible operations available in a transaction. -type CheckOp string - -const ( - CheckGet CheckOp = "get" - CheckSet CheckOp = "set" - CheckCAS CheckOp = "cas" - CheckDelete CheckOp = "delete" - CheckDeleteCAS CheckOp = "delete-cas" -) - -// CheckTxnOp defines a single operation inside a transaction. -type CheckTxnOp struct { - Verb CheckOp - Check HealthCheck -} - -// Txn is used to apply multiple Consul operations in a single, atomic transaction. -// -// Note that Go will perform the required base64 encoding on the values -// automatically because the type is a byte slice. Transactions are defined as a -// list of operations to perform, using the different fields in the TxnOp structure -// to define operations. If any operation fails, none of the changes are applied -// to the state store. -// -// Even though this is generally a write operation, we take a QueryOptions input -// and return a QueryMeta output. If the transaction contains only read ops, then -// Consul will fast-path it to a different endpoint internally which supports -// consistency controls, but not blocking. If there are write operations then -// the request will always be routed through raft and any consistency settings -// will be ignored. -// -// Here's an example: -// -// ops := KVTxnOps{ -// &KVTxnOp{ -// Verb: KVLock, -// Key: "test/lock", -// Session: "adf4238a-882b-9ddc-4a9d-5b6758e4159e", -// Value: []byte("hello"), -// }, -// &KVTxnOp{ -// Verb: KVGet, -// Key: "another/key", -// }, -// &CheckTxnOp{ -// Verb: CheckSet, -// HealthCheck: HealthCheck{ -// Node: "foo", -// CheckID: "redis:a", -// Name: "Redis Health Check", -// Status: "passing", -// }, -// } -// } -// ok, response, _, err := kv.Txn(&ops, nil) -// -// If there is a problem making the transaction request then an error will be -// returned. Otherwise, the ok value will be true if the transaction succeeded -// or false if it was rolled back. The response is a structured return value which -// will have the outcome of the transaction. Its Results member will have entries -// for each operation. For KV operations, Deleted keys will have a nil entry in the -// results, and to save space, the Value of each key in the Results will be nil -// unless the operation is a KVGet. If the transaction was rolled back, the Errors -// member will have entries referencing the index of the operation that failed -// along with an error message. -func (t *Txn) Txn(txn TxnOps, q *QueryOptions) (bool, *TxnResponse, *QueryMeta, error) { - return t.c.txn(txn, q) -} - -func (c *Client) txn(txn TxnOps, q *QueryOptions) (bool, *TxnResponse, *QueryMeta, error) { - r := c.newRequest("PUT", "/v1/txn") - r.setQueryOptions(q) - - r.obj = txn - rtt, resp, err := c.doRequest(r) - if err != nil { - return false, nil, nil, err - } - defer closeResponseBody(resp) - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusConflict { - var txnResp TxnResponse - if err := decodeBody(resp, &txnResp); err != nil { - return false, nil, nil, err - } - - return resp.StatusCode == http.StatusOK, &txnResp, qm, nil - } - - var buf bytes.Buffer - if _, err := io.Copy(&buf, resp.Body); err != nil { - return false, nil, nil, fmt.Errorf("Failed to read response: %v", err) - } - return false, nil, nil, fmt.Errorf("Failed request: %s", buf.String()) -} diff --git a/vendor/github.com/hashicorp/errwrap/LICENSE b/vendor/github.com/hashicorp/errwrap/LICENSE deleted file mode 100644 index c33dcc7c928..00000000000 --- a/vendor/github.com/hashicorp/errwrap/LICENSE +++ /dev/null @@ -1,354 +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/errwrap/README.md b/vendor/github.com/hashicorp/errwrap/README.md deleted file mode 100644 index 444df08f8e7..00000000000 --- a/vendor/github.com/hashicorp/errwrap/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# errwrap - -`errwrap` is a package for Go that formalizes the pattern of wrapping errors -and checking if an error contains another error. - -There is a common pattern in Go of taking a returned `error` value and -then wrapping it (such as with `fmt.Errorf`) before returning it. The problem -with this pattern is that you completely lose the original `error` structure. - -Arguably the _correct_ approach is that you should make a custom structure -implementing the `error` interface, and have the original error as a field -on that structure, such [as this example](http://golang.org/pkg/os/#PathError). -This is a good approach, but you have to know the entire chain of possible -rewrapping that happens, when you might just care about one. - -`errwrap` formalizes this pattern (it doesn't matter what approach you use -above) by giving a single interface for wrapping errors, checking if a specific -error is wrapped, and extracting that error. - -## Installation and Docs - -Install using `go get github.com/hashicorp/errwrap`. - -Full documentation is available at -http://godoc.org/github.com/hashicorp/errwrap - -## Usage - -#### Basic Usage - -Below is a very basic example of its usage: - -```go -// A function that always returns an error, but wraps it, like a real -// function might. -func tryOpen() error { - _, err := os.Open("/i/dont/exist") - if err != nil { - return errwrap.Wrapf("Doesn't exist: {{err}}", err) - } - - return nil -} - -func main() { - err := tryOpen() - - // We can use the Contains helpers to check if an error contains - // another error. It is safe to do this with a nil error, or with - // an error that doesn't even use the errwrap package. - if errwrap.Contains(err, "does not exist") { - // Do something - } - if errwrap.ContainsType(err, new(os.PathError)) { - // Do something - } - - // Or we can use the associated `Get` functions to just extract - // a specific error. This would return nil if that specific error doesn't - // exist. - perr := errwrap.GetType(err, new(os.PathError)) -} -``` - -#### Custom Types - -If you're already making custom types that properly wrap errors, then -you can get all the functionality of `errwraps.Contains` and such by -implementing the `Wrapper` interface with just one function. Example: - -```go -type AppError { - Code ErrorCode - Err error -} - -func (e *AppError) WrappedErrors() []error { - return []error{e.Err} -} -``` - -Now this works: - -```go -err := &AppError{Err: fmt.Errorf("an error")} -if errwrap.ContainsType(err, fmt.Errorf("")) { - // This will work! -} -``` diff --git a/vendor/github.com/hashicorp/errwrap/errwrap.go b/vendor/github.com/hashicorp/errwrap/errwrap.go deleted file mode 100644 index 44e368e5692..00000000000 --- a/vendor/github.com/hashicorp/errwrap/errwrap.go +++ /dev/null @@ -1,178 +0,0 @@ -// Package errwrap implements methods to formalize error wrapping in Go. -// -// All of the top-level functions that take an `error` are built to be able -// to take any error, not just wrapped errors. This allows you to use errwrap -// without having to type-check and type-cast everywhere. -package errwrap - -import ( - "errors" - "reflect" - "strings" -) - -// WalkFunc is the callback called for Walk. -type WalkFunc func(error) - -// Wrapper is an interface that can be implemented by custom types to -// have all the Contains, Get, etc. functions in errwrap work. -// -// When Walk reaches a Wrapper, it will call the callback for every -// wrapped error in addition to the wrapper itself. Since all the top-level -// functions in errwrap use Walk, this means that all those functions work -// with your custom type. -type Wrapper interface { - WrappedErrors() []error -} - -// Wrap defines that outer wraps inner, returning an error type that -// can be cleanly used with the other methods in this package, such as -// Contains, GetAll, etc. -// -// This function won't modify the error message at all (the outer message -// will be used). -func Wrap(outer, inner error) error { - return &wrappedError{ - Outer: outer, - Inner: inner, - } -} - -// Wrapf wraps an error with a formatting message. This is similar to using -// `fmt.Errorf` to wrap an error. If you're using `fmt.Errorf` to wrap -// errors, you should replace it with this. -// -// format is the format of the error message. The string '{{err}}' will -// be replaced with the original error message. -// -// Deprecated: Use fmt.Errorf() -func Wrapf(format string, err error) error { - outerMsg := "" - if err != nil { - outerMsg = err.Error() - } - - outer := errors.New(strings.Replace( - format, "{{err}}", outerMsg, -1)) - - return Wrap(outer, err) -} - -// Contains checks if the given error contains an error with the -// message msg. If err is not a wrapped error, this will always return -// false unless the error itself happens to match this msg. -func Contains(err error, msg string) bool { - return len(GetAll(err, msg)) > 0 -} - -// ContainsType checks if the given error contains an error with -// the same concrete type as v. If err is not a wrapped error, this will -// check the err itself. -func ContainsType(err error, v interface{}) bool { - return len(GetAllType(err, v)) > 0 -} - -// Get is the same as GetAll but returns the deepest matching error. -func Get(err error, msg string) error { - es := GetAll(err, msg) - if len(es) > 0 { - return es[len(es)-1] - } - - return nil -} - -// GetType is the same as GetAllType but returns the deepest matching error. -func GetType(err error, v interface{}) error { - es := GetAllType(err, v) - if len(es) > 0 { - return es[len(es)-1] - } - - return nil -} - -// GetAll gets all the errors that might be wrapped in err with the -// given message. The order of the errors is such that the outermost -// matching error (the most recent wrap) is index zero, and so on. -func GetAll(err error, msg string) []error { - var result []error - - Walk(err, func(err error) { - if err.Error() == msg { - result = append(result, err) - } - }) - - return result -} - -// GetAllType gets all the errors that are the same type as v. -// -// The order of the return value is the same as described in GetAll. -func GetAllType(err error, v interface{}) []error { - var result []error - - var search string - if v != nil { - search = reflect.TypeOf(v).String() - } - Walk(err, func(err error) { - var needle string - if err != nil { - needle = reflect.TypeOf(err).String() - } - - if needle == search { - result = append(result, err) - } - }) - - return result -} - -// Walk walks all the wrapped errors in err and calls the callback. If -// err isn't a wrapped error, this will be called once for err. If err -// is a wrapped error, the callback will be called for both the wrapper -// that implements error as well as the wrapped error itself. -func Walk(err error, cb WalkFunc) { - if err == nil { - return - } - - switch e := err.(type) { - case *wrappedError: - cb(e.Outer) - Walk(e.Inner, cb) - case Wrapper: - cb(err) - - for _, err := range e.WrappedErrors() { - Walk(err, cb) - } - case interface{ Unwrap() error }: - cb(err) - Walk(e.Unwrap(), cb) - default: - cb(err) - } -} - -// wrappedError is an implementation of error that has both the -// outer and inner errors. -type wrappedError struct { - Outer error - Inner error -} - -func (w *wrappedError) Error() string { - return w.Outer.Error() -} - -func (w *wrappedError) WrappedErrors() []error { - return []error{w.Outer, w.Inner} -} - -func (w *wrappedError) Unwrap() error { - return w.Inner -} diff --git a/vendor/github.com/hashicorp/go-cleanhttp/LICENSE b/vendor/github.com/hashicorp/go-cleanhttp/LICENSE deleted file mode 100644 index e87a115e462..00000000000 --- a/vendor/github.com/hashicorp/go-cleanhttp/LICENSE +++ /dev/null @@ -1,363 +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/go-cleanhttp/README.md b/vendor/github.com/hashicorp/go-cleanhttp/README.md deleted file mode 100644 index 036e5313fc8..00000000000 --- a/vendor/github.com/hashicorp/go-cleanhttp/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# cleanhttp - -Functions for accessing "clean" Go http.Client values - -------------- - -The Go standard library contains a default `http.Client` called -`http.DefaultClient`. It is a common idiom in Go code to start with -`http.DefaultClient` and tweak it as necessary, and in fact, this is -encouraged; from the `http` package documentation: - -> The Client's Transport typically has internal state (cached TCP connections), -so Clients should be reused instead of created as needed. Clients are safe for -concurrent use by multiple goroutines. - -Unfortunately, this is a shared value, and it is not uncommon for libraries to -assume that they are free to modify it at will. With enough dependencies, it -can be very easy to encounter strange problems and race conditions due to -manipulation of this shared value across libraries and goroutines (clients are -safe for concurrent use, but writing values to the client struct itself is not -protected). - -Making things worse is the fact that a bare `http.Client` will use a default -`http.Transport` called `http.DefaultTransport`, which is another global value -that behaves the same way. So it is not simply enough to replace -`http.DefaultClient` with `&http.Client{}`. - -This repository provides some simple functions to get a "clean" `http.Client` --- one that uses the same default values as the Go standard library, but -returns a client that does not share any state with other clients. diff --git a/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go b/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go deleted file mode 100644 index fe28d15b6f9..00000000000 --- a/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go +++ /dev/null @@ -1,58 +0,0 @@ -package cleanhttp - -import ( - "net" - "net/http" - "runtime" - "time" -) - -// DefaultTransport returns a new http.Transport with similar default values to -// http.DefaultTransport, but with idle connections and keepalives disabled. -func DefaultTransport() *http.Transport { - transport := DefaultPooledTransport() - transport.DisableKeepAlives = true - transport.MaxIdleConnsPerHost = -1 - return transport -} - -// DefaultPooledTransport returns a new http.Transport with similar default -// values to http.DefaultTransport. Do not use this for transient transports as -// it can leak file descriptors over time. Only use this for transports that -// will be re-used for the same host(s). -func DefaultPooledTransport() *http.Transport { - transport := &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - DualStack: true, - }).DialContext, - MaxIdleConns: 100, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - ForceAttemptHTTP2: true, - MaxIdleConnsPerHost: runtime.GOMAXPROCS(0) + 1, - } - return transport -} - -// DefaultClient returns a new http.Client with similar default values to -// http.Client, but with a non-shared Transport, idle connections disabled, and -// keepalives disabled. -func DefaultClient() *http.Client { - return &http.Client{ - Transport: DefaultTransport(), - } -} - -// DefaultPooledClient returns a new http.Client with similar default values to -// http.Client, but with a shared Transport. Do not use this function for -// transient clients as it can leak file descriptors over time. Only use this -// for clients that will be re-used for the same host(s). -func DefaultPooledClient() *http.Client { - return &http.Client{ - Transport: DefaultPooledTransport(), - } -} diff --git a/vendor/github.com/hashicorp/go-cleanhttp/doc.go b/vendor/github.com/hashicorp/go-cleanhttp/doc.go deleted file mode 100644 index 05841092a7b..00000000000 --- a/vendor/github.com/hashicorp/go-cleanhttp/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Package cleanhttp offers convenience utilities for acquiring "clean" -// http.Transport and http.Client structs. -// -// Values set on http.DefaultClient and http.DefaultTransport affect all -// callers. This can have detrimental effects, esepcially in TLS contexts, -// where client or root certificates set to talk to multiple endpoints can end -// up displacing each other, leading to hard-to-debug issues. This package -// provides non-shared http.Client and http.Transport structs to ensure that -// the configuration will not be overwritten by other parts of the application -// or dependencies. -// -// The DefaultClient and DefaultTransport functions disable idle connections -// and keepalives. Without ensuring that idle connections are closed before -// garbage collection, short-term clients/transports can leak file descriptors, -// eventually leading to "too many open files" errors. If you will be -// connecting to the same hosts repeatedly from the same client, you can use -// DefaultPooledClient to receive a client that has connection pooling -// semantics similar to http.DefaultClient. -// -package cleanhttp diff --git a/vendor/github.com/hashicorp/go-cleanhttp/handlers.go b/vendor/github.com/hashicorp/go-cleanhttp/handlers.go deleted file mode 100644 index 3c845dc0dc6..00000000000 --- a/vendor/github.com/hashicorp/go-cleanhttp/handlers.go +++ /dev/null @@ -1,48 +0,0 @@ -package cleanhttp - -import ( - "net/http" - "strings" - "unicode" -) - -// HandlerInput provides input options to cleanhttp's handlers -type HandlerInput struct { - ErrStatus int -} - -// PrintablePathCheckHandler is a middleware that ensures the request path -// contains only printable runes. -func PrintablePathCheckHandler(next http.Handler, input *HandlerInput) http.Handler { - // Nil-check on input to make it optional - if input == nil { - input = &HandlerInput{ - ErrStatus: http.StatusBadRequest, - } - } - - // Default to http.StatusBadRequest on error - if input.ErrStatus == 0 { - input.ErrStatus = http.StatusBadRequest - } - - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r != nil { - // Check URL path for non-printable characters - idx := strings.IndexFunc(r.URL.Path, func(c rune) bool { - return !unicode.IsPrint(c) - }) - - if idx != -1 { - w.WriteHeader(input.ErrStatus) - return - } - - if next != nil { - next.ServeHTTP(w, r) - } - } - - return - }) -} diff --git a/vendor/github.com/hashicorp/go-hclog/.gitignore b/vendor/github.com/hashicorp/go-hclog/.gitignore deleted file mode 100644 index 42cc4105ff4..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.idea* \ No newline at end of file diff --git a/vendor/github.com/hashicorp/go-hclog/LICENSE b/vendor/github.com/hashicorp/go-hclog/LICENSE deleted file mode 100644 index 9938fb50ee1..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017 HashiCorp, Inc. - -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/hashicorp/go-hclog/README.md b/vendor/github.com/hashicorp/go-hclog/README.md deleted file mode 100644 index 21a17c5af39..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/README.md +++ /dev/null @@ -1,148 +0,0 @@ -# go-hclog - -[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs] - -[godocs]: https://godoc.org/github.com/hashicorp/go-hclog - -`go-hclog` is a package for Go that provides a simple key/value logging -interface for use in development and production environments. - -It provides logging levels that provide decreased output based upon the -desired amount of output, unlike the standard library `log` package. - -It provides `Printf` style logging of values via `hclog.Fmt()`. - -It provides a human readable output mode for use in development as well as -JSON output mode for production. - -## Stability Note - -This library has reached 1.0 stability. Its API can be considered solidified -and promised through future versions. - -## Installation and Docs - -Install using `go get github.com/hashicorp/go-hclog`. - -Full documentation is available at -http://godoc.org/github.com/hashicorp/go-hclog - -## Usage - -### Use the global logger - -```go -hclog.Default().Info("hello world") -``` - -```text -2017-07-05T16:15:55.167-0700 [INFO ] hello world -``` - -(Note timestamps are removed in future examples for brevity.) - -### Create a new logger - -```go -appLogger := hclog.New(&hclog.LoggerOptions{ - Name: "my-app", - Level: hclog.LevelFromString("DEBUG"), -}) -``` - -### Emit an Info level message with 2 key/value pairs - -```go -input := "5.5" -_, err := strconv.ParseInt(input, 10, 32) -if err != nil { - appLogger.Info("Invalid input for ParseInt", "input", input, "error", err) -} -``` - -```text -... [INFO ] my-app: Invalid input for ParseInt: input=5.5 error="strconv.ParseInt: parsing "5.5": invalid syntax" -``` - -### Create a new Logger for a major subsystem - -```go -subsystemLogger := appLogger.Named("transport") -subsystemLogger.Info("we are transporting something") -``` - -```text -... [INFO ] my-app.transport: we are transporting something -``` - -Notice that logs emitted by `subsystemLogger` contain `my-app.transport`, -reflecting both the application and subsystem names. - -### Create a new Logger with fixed key/value pairs - -Using `With()` will include a specific key-value pair in all messages emitted -by that logger. - -```go -requestID := "5fb446b6-6eba-821d-df1b-cd7501b6a363" -requestLogger := subsystemLogger.With("request", requestID) -requestLogger.Info("we are transporting a request") -``` - -```text -... [INFO ] my-app.transport: we are transporting a request: request=5fb446b6-6eba-821d-df1b-cd7501b6a363 -``` - -This allows sub Loggers to be context specific without having to thread that -into all the callers. - -### Using `hclog.Fmt()` - -```go -totalBandwidth := 200 -appLogger.Info("total bandwidth exceeded", "bandwidth", hclog.Fmt("%d GB/s", totalBandwidth)) -``` - -```text -... [INFO ] my-app: total bandwidth exceeded: bandwidth="200 GB/s" -``` - -### Use this with code that uses the standard library logger - -If you want to use the standard library's `log.Logger` interface you can wrap -`hclog.Logger` by calling the `StandardLogger()` method. This allows you to use -it with the familiar `Println()`, `Printf()`, etc. For example: - -```go -stdLogger := appLogger.StandardLogger(&hclog.StandardLoggerOptions{ - InferLevels: true, -}) -// Printf() is provided by stdlib log.Logger interface, not hclog.Logger -stdLogger.Printf("[DEBUG] %+v", stdLogger) -``` - -```text -... [DEBUG] my-app: &{mu:{state:0 sema:0} prefix: flag:0 out:0xc42000a0a0 buf:[]} -``` - -Alternatively, you may configure the system-wide logger: - -```go -// log the standard logger from 'import "log"' -log.SetOutput(appLogger.StandardWriter(&hclog.StandardLoggerOptions{InferLevels: true})) -log.SetPrefix("") -log.SetFlags(0) - -log.Printf("[DEBUG] %d", 42) -``` - -```text -... [DEBUG] my-app: 42 -``` - -Notice that if `appLogger` is initialized with the `INFO` log level _and_ you -specify `InferLevels: true`, you will not see any output here. You must change -`appLogger` to `DEBUG` to see output. See the docs for more information. - -If the log lines start with a timestamp you can use the -`InferLevelsWithTimestamp` option to try and ignore them. diff --git a/vendor/github.com/hashicorp/go-hclog/colorize_unix.go b/vendor/github.com/hashicorp/go-hclog/colorize_unix.go deleted file mode 100644 index d00816b38fa..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/colorize_unix.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MIT - -//go:build !windows -// +build !windows - -package hclog - -import ( - "github.com/mattn/go-isatty" -) - -// hasFD is used to check if the writer has an Fd value to check -// if it's a terminal. -type hasFD interface { - Fd() uintptr -} - -// setColorization will mutate the values of this logger -// to appropriately configure colorization options. It provides -// a wrapper to the output stream on Windows systems. -func (l *intLogger) setColorization(opts *LoggerOptions) { - if opts.Color != AutoColor { - return - } - - if sc, ok := l.writer.w.(SupportsColor); ok { - if !sc.SupportsColor() { - l.headerColor = ColorOff - l.writer.color = ColorOff - } - return - } - - fi, ok := l.writer.w.(hasFD) - if !ok { - return - } - - if !isatty.IsTerminal(fi.Fd()) { - l.headerColor = ColorOff - l.writer.color = ColorOff - } -} diff --git a/vendor/github.com/hashicorp/go-hclog/colorize_windows.go b/vendor/github.com/hashicorp/go-hclog/colorize_windows.go deleted file mode 100644 index 2c3fb9ea6f0..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/colorize_windows.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MIT - -//go:build windows -// +build windows - -package hclog - -import ( - "os" - - colorable "github.com/mattn/go-colorable" -) - -// setColorization will mutate the values of this logger -// to appropriately configure colorization options. It provides -// a wrapper to the output stream on Windows systems. -func (l *intLogger) setColorization(opts *LoggerOptions) { - if opts.Color == ColorOff { - return - } - - fi, ok := l.writer.w.(*os.File) - if !ok { - l.writer.color = ColorOff - l.headerColor = ColorOff - return - } - - cfi := colorable.NewColorable(fi) - - // NewColorable detects if color is possible and if it's not, then it - // returns the original value. So we can test if we got the original - // value back to know if color is possible. - if cfi == fi { - l.writer.color = ColorOff - l.headerColor = ColorOff - } else { - l.writer.w = cfi - } -} diff --git a/vendor/github.com/hashicorp/go-hclog/context.go b/vendor/github.com/hashicorp/go-hclog/context.go deleted file mode 100644 index eb5aba556bb..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/context.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MIT - -package hclog - -import ( - "context" -) - -// WithContext inserts a logger into the context and is retrievable -// with FromContext. The optional args can be set with the same syntax as -// Logger.With to set fields on the inserted logger. This will not modify -// the logger argument in-place. -func WithContext(ctx context.Context, logger Logger, args ...interface{}) context.Context { - // While we could call logger.With even with zero args, we have this - // check to avoid unnecessary allocations around creating a copy of a - // logger. - if len(args) > 0 { - logger = logger.With(args...) - } - - return context.WithValue(ctx, contextKey, logger) -} - -// FromContext returns a logger from the context. This will return L() -// (the default logger) if no logger is found in the context. Therefore, -// this will never return a nil value. -func FromContext(ctx context.Context) Logger { - logger, _ := ctx.Value(contextKey).(Logger) - if logger == nil { - return L() - } - - return logger -} - -// Unexported new type so that our context key never collides with another. -type contextKeyType struct{} - -// contextKey is the key used for the context to store the logger. -var contextKey = contextKeyType{} diff --git a/vendor/github.com/hashicorp/go-hclog/exclude.go b/vendor/github.com/hashicorp/go-hclog/exclude.go deleted file mode 100644 index 4b73ba553da..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/exclude.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MIT - -package hclog - -import ( - "regexp" - "strings" -) - -// ExcludeByMessage provides a simple way to build a list of log messages that -// can be queried and matched. This is meant to be used with the Exclude -// option on Options to suppress log messages. This does not hold any mutexs -// within itself, so normal usage would be to Add entries at setup and none after -// Exclude is going to be called. Exclude is called with a mutex held within -// the Logger, so that doesn't need to use a mutex. Example usage: -// -// f := new(ExcludeByMessage) -// f.Add("Noisy log message text") -// appLogger.Exclude = f.Exclude -type ExcludeByMessage struct { - messages map[string]struct{} -} - -// Add a message to be filtered. Do not call this after Exclude is to be called -// due to concurrency issues. -func (f *ExcludeByMessage) Add(msg string) { - if f.messages == nil { - f.messages = make(map[string]struct{}) - } - - f.messages[msg] = struct{}{} -} - -// Return true if the given message should be included -func (f *ExcludeByMessage) Exclude(level Level, msg string, args ...interface{}) bool { - _, ok := f.messages[msg] - return ok -} - -// ExcludeByPrefix is a simple type to match a message string that has a common prefix. -type ExcludeByPrefix string - -// Matches an message that starts with the prefix. -func (p ExcludeByPrefix) Exclude(level Level, msg string, args ...interface{}) bool { - return strings.HasPrefix(msg, string(p)) -} - -// ExcludeByRegexp takes a regexp and uses it to match a log message string. If it matches -// the log entry is excluded. -type ExcludeByRegexp struct { - Regexp *regexp.Regexp -} - -// Exclude the log message if the message string matches the regexp -func (e ExcludeByRegexp) Exclude(level Level, msg string, args ...interface{}) bool { - return e.Regexp.MatchString(msg) -} - -// ExcludeFuncs is a slice of functions that will called to see if a log entry -// should be filtered or not. It stops calling functions once at least one returns -// true. -type ExcludeFuncs []func(level Level, msg string, args ...interface{}) bool - -// Calls each function until one of them returns true -func (ff ExcludeFuncs) Exclude(level Level, msg string, args ...interface{}) bool { - for _, f := range ff { - if f(level, msg, args...) { - return true - } - } - - return false -} diff --git a/vendor/github.com/hashicorp/go-hclog/global.go b/vendor/github.com/hashicorp/go-hclog/global.go deleted file mode 100644 index a7403f593a9..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/global.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MIT - -package hclog - -import ( - "sync" - "time" -) - -var ( - protect sync.Once - def Logger - - // DefaultOptions is used to create the Default logger. These are read - // only when the Default logger is created, so set them as soon as the - // process starts. - DefaultOptions = &LoggerOptions{ - Level: DefaultLevel, - Output: DefaultOutput, - TimeFn: time.Now, - } -) - -// Default returns a globally held logger. This can be a good starting -// place, and then you can use .With() and .Named() to create sub-loggers -// to be used in more specific contexts. -// The value of the Default logger can be set via SetDefault() or by -// changing the options in DefaultOptions. -// -// This method is goroutine safe, returning a global from memory, but -// care should be used if SetDefault() is called it random times -// in the program as that may result in race conditions and an unexpected -// Logger being returned. -func Default() Logger { - protect.Do(func() { - // If SetDefault was used before Default() was called, we need to - // detect that here. - if def == nil { - def = New(DefaultOptions) - } - }) - - return def -} - -// L is a short alias for Default(). -func L() Logger { - return Default() -} - -// SetDefault changes the logger to be returned by Default()and L() -// to the one given. This allows packages to use the default logger -// and have higher level packages change it to match the execution -// environment. It returns any old default if there is one. -// -// NOTE: This is expected to be called early in the program to setup -// a default logger. As such, it does not attempt to make itself -// not racy with regard to the value of the default logger. Ergo -// if it is called in goroutines, you may experience race conditions -// with other goroutines retrieving the default logger. Basically, -// don't do that. -func SetDefault(log Logger) Logger { - old := def - def = log - return old -} diff --git a/vendor/github.com/hashicorp/go-hclog/interceptlogger.go b/vendor/github.com/hashicorp/go-hclog/interceptlogger.go deleted file mode 100644 index e9b1c188530..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/interceptlogger.go +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MIT - -package hclog - -import ( - "io" - "log" - "sync" - "sync/atomic" -) - -var _ Logger = &interceptLogger{} - -type interceptLogger struct { - Logger - - mu *sync.Mutex - sinkCount *int32 - Sinks map[SinkAdapter]struct{} -} - -func NewInterceptLogger(opts *LoggerOptions) InterceptLogger { - l := newLogger(opts) - if l.callerOffset > 0 { - // extra frames for interceptLogger.{Warn,Info,Log,etc...}, and interceptLogger.log - l.callerOffset += 2 - } - intercept := &interceptLogger{ - Logger: l, - mu: new(sync.Mutex), - sinkCount: new(int32), - Sinks: make(map[SinkAdapter]struct{}), - } - - atomic.StoreInt32(intercept.sinkCount, 0) - - return intercept -} - -func (i *interceptLogger) Log(level Level, msg string, args ...interface{}) { - i.log(level, msg, args...) -} - -// log is used to make the caller stack frame lookup consistent. If Warn,Info,etc -// all called Log then direct calls to Log would have a different stack frame -// depth. By having all the methods call the same helper we ensure the stack -// frame depth is the same. -func (i *interceptLogger) log(level Level, msg string, args ...interface{}) { - i.Logger.Log(level, msg, args...) - if atomic.LoadInt32(i.sinkCount) == 0 { - return - } - - i.mu.Lock() - defer i.mu.Unlock() - for s := range i.Sinks { - s.Accept(i.Name(), level, msg, i.retrieveImplied(args...)...) - } -} - -// Emit the message and args at TRACE level to log and sinks -func (i *interceptLogger) Trace(msg string, args ...interface{}) { - i.log(Trace, msg, args...) -} - -// Emit the message and args at DEBUG level to log and sinks -func (i *interceptLogger) Debug(msg string, args ...interface{}) { - i.log(Debug, msg, args...) -} - -// Emit the message and args at INFO level to log and sinks -func (i *interceptLogger) Info(msg string, args ...interface{}) { - i.log(Info, msg, args...) -} - -// Emit the message and args at WARN level to log and sinks -func (i *interceptLogger) Warn(msg string, args ...interface{}) { - i.log(Warn, msg, args...) -} - -// Emit the message and args at ERROR level to log and sinks -func (i *interceptLogger) Error(msg string, args ...interface{}) { - i.log(Error, msg, args...) -} - -func (i *interceptLogger) retrieveImplied(args ...interface{}) []interface{} { - top := i.Logger.ImpliedArgs() - - cp := make([]interface{}, len(top)+len(args)) - copy(cp, top) - copy(cp[len(top):], args) - - return cp -} - -// Create a new sub-Logger that a name descending from the current name. -// This is used to create a subsystem specific Logger. -// Registered sinks will subscribe to these messages as well. -func (i *interceptLogger) Named(name string) Logger { - return i.NamedIntercept(name) -} - -// Create a new sub-Logger with an explicit name. This ignores the current -// name. This is used to create a standalone logger that doesn't fall -// within the normal hierarchy. Registered sinks will subscribe -// to these messages as well. -func (i *interceptLogger) ResetNamed(name string) Logger { - return i.ResetNamedIntercept(name) -} - -// Create a new sub-Logger that a name decending from the current name. -// This is used to create a subsystem specific Logger. -// Registered sinks will subscribe to these messages as well. -func (i *interceptLogger) NamedIntercept(name string) InterceptLogger { - var sub interceptLogger - - sub = *i - sub.Logger = i.Logger.Named(name) - return &sub -} - -// Create a new sub-Logger with an explicit name. This ignores the current -// name. This is used to create a standalone logger that doesn't fall -// within the normal hierarchy. Registered sinks will subscribe -// to these messages as well. -func (i *interceptLogger) ResetNamedIntercept(name string) InterceptLogger { - var sub interceptLogger - - sub = *i - sub.Logger = i.Logger.ResetNamed(name) - return &sub -} - -// Return a sub-Logger for which every emitted log message will contain -// the given key/value pairs. This is used to create a context specific -// Logger. -func (i *interceptLogger) With(args ...interface{}) Logger { - var sub interceptLogger - - sub = *i - - sub.Logger = i.Logger.With(args...) - - return &sub -} - -// RegisterSink attaches a SinkAdapter to interceptLoggers sinks. -func (i *interceptLogger) RegisterSink(sink SinkAdapter) { - i.mu.Lock() - defer i.mu.Unlock() - - i.Sinks[sink] = struct{}{} - - atomic.AddInt32(i.sinkCount, 1) -} - -// DeregisterSink removes a SinkAdapter from interceptLoggers sinks. -func (i *interceptLogger) DeregisterSink(sink SinkAdapter) { - i.mu.Lock() - defer i.mu.Unlock() - - delete(i.Sinks, sink) - - atomic.AddInt32(i.sinkCount, -1) -} - -func (i *interceptLogger) StandardLoggerIntercept(opts *StandardLoggerOptions) *log.Logger { - return i.StandardLogger(opts) -} - -func (i *interceptLogger) StandardLogger(opts *StandardLoggerOptions) *log.Logger { - if opts == nil { - opts = &StandardLoggerOptions{} - } - - return log.New(i.StandardWriter(opts), "", 0) -} - -func (i *interceptLogger) StandardWriterIntercept(opts *StandardLoggerOptions) io.Writer { - return i.StandardWriter(opts) -} - -func (i *interceptLogger) StandardWriter(opts *StandardLoggerOptions) io.Writer { - return &stdlogAdapter{ - log: i, - inferLevels: opts.InferLevels, - inferLevelsWithTimestamp: opts.InferLevelsWithTimestamp, - forceLevel: opts.ForceLevel, - } -} - -func (i *interceptLogger) ResetOutput(opts *LoggerOptions) error { - if or, ok := i.Logger.(OutputResettable); ok { - return or.ResetOutput(opts) - } else { - return nil - } -} - -func (i *interceptLogger) ResetOutputWithFlush(opts *LoggerOptions, flushable Flushable) error { - if or, ok := i.Logger.(OutputResettable); ok { - return or.ResetOutputWithFlush(opts, flushable) - } else { - return nil - } -} diff --git a/vendor/github.com/hashicorp/go-hclog/intlogger.go b/vendor/github.com/hashicorp/go-hclog/intlogger.go deleted file mode 100644 index b45064acf1a..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/intlogger.go +++ /dev/null @@ -1,918 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MIT - -package hclog - -import ( - "bytes" - "encoding" - "encoding/json" - "errors" - "fmt" - "io" - "log" - "reflect" - "runtime" - "sort" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - "unicode" - "unicode/utf8" - - "github.com/fatih/color" -) - -// TimeFormat is the time format to use for plain (non-JSON) output. -// This is a version of RFC3339 that contains millisecond precision. -const TimeFormat = "2006-01-02T15:04:05.000Z0700" - -// TimeFormatJSON is the time format to use for JSON output. -// This is a version of RFC3339 that contains microsecond precision. -const TimeFormatJSON = "2006-01-02T15:04:05.000000Z07:00" - -// errJsonUnsupportedTypeMsg is included in log json entries, if an arg cannot be serialized to json -const errJsonUnsupportedTypeMsg = "logging contained values that don't serialize to json" - -var ( - _levelToBracket = map[Level]string{ - Debug: "[DEBUG]", - Trace: "[TRACE]", - Info: "[INFO] ", - Warn: "[WARN] ", - Error: "[ERROR]", - } - - _levelToColor = map[Level]*color.Color{ - Debug: color.New(color.FgHiWhite), - Trace: color.New(color.FgHiGreen), - Info: color.New(color.FgHiBlue), - Warn: color.New(color.FgHiYellow), - Error: color.New(color.FgHiRed), - } - - faintBoldColor = color.New(color.Faint, color.Bold) - faintColor = color.New(color.Faint) - faintMultiLinePrefix = faintColor.Sprint(" | ") - faintFieldSeparator = faintColor.Sprint("=") - faintFieldSeparatorWithNewLine = faintColor.Sprint("=\n") -) - -// Make sure that intLogger is a Logger -var _ Logger = &intLogger{} - -// intLogger is an internal logger implementation. Internal in that it is -// defined entirely by this package. -type intLogger struct { - json bool - callerOffset int - name string - timeFormat string - timeFn TimeFunction - disableTime bool - - // This is an interface so that it's shared by any derived loggers, since - // those derived loggers share the bufio.Writer as well. - mutex Locker - writer *writer - level *int32 - - headerColor ColorOption - fieldColor ColorOption - - implied []interface{} - - exclude func(level Level, msg string, args ...interface{}) bool - - // create subloggers with their own level setting - independentLevels bool - - subloggerHook func(sub Logger) Logger -} - -// New returns a configured logger. -func New(opts *LoggerOptions) Logger { - return newLogger(opts) -} - -// NewSinkAdapter returns a SinkAdapter with configured settings -// defined by LoggerOptions -func NewSinkAdapter(opts *LoggerOptions) SinkAdapter { - l := newLogger(opts) - if l.callerOffset > 0 { - // extra frames for interceptLogger.{Warn,Info,Log,etc...}, and SinkAdapter.Accept - l.callerOffset += 2 - } - return l -} - -func newLogger(opts *LoggerOptions) *intLogger { - if opts == nil { - opts = &LoggerOptions{} - } - - output := opts.Output - if output == nil { - output = DefaultOutput - } - - level := opts.Level - if level == NoLevel { - level = DefaultLevel - } - - mutex := opts.Mutex - if mutex == nil { - mutex = new(sync.Mutex) - } - - var ( - primaryColor ColorOption = ColorOff - headerColor ColorOption = ColorOff - fieldColor ColorOption = ColorOff - ) - switch { - case opts.ColorHeaderOnly: - headerColor = opts.Color - case opts.ColorHeaderAndFields: - fieldColor = opts.Color - headerColor = opts.Color - default: - primaryColor = opts.Color - } - - l := &intLogger{ - json: opts.JSONFormat, - name: opts.Name, - timeFormat: TimeFormat, - timeFn: time.Now, - disableTime: opts.DisableTime, - mutex: mutex, - writer: newWriter(output, primaryColor), - level: new(int32), - exclude: opts.Exclude, - independentLevels: opts.IndependentLevels, - headerColor: headerColor, - fieldColor: fieldColor, - subloggerHook: opts.SubloggerHook, - } - if opts.IncludeLocation { - l.callerOffset = offsetIntLogger + opts.AdditionalLocationOffset - } - - if l.json { - l.timeFormat = TimeFormatJSON - } - if opts.TimeFn != nil { - l.timeFn = opts.TimeFn - } - if opts.TimeFormat != "" { - l.timeFormat = opts.TimeFormat - } - - if l.subloggerHook == nil { - l.subloggerHook = identityHook - } - - l.setColorization(opts) - - atomic.StoreInt32(l.level, int32(level)) - - return l -} - -func identityHook(logger Logger) Logger { - return logger -} - -// offsetIntLogger is the stack frame offset in the call stack for the caller to -// one of the Warn, Info, Log, etc methods. -const offsetIntLogger = 3 - -// Log a message and a set of key/value pairs if the given level is at -// or more severe that the threshold configured in the Logger. -func (l *intLogger) log(name string, level Level, msg string, args ...interface{}) { - if level < Level(atomic.LoadInt32(l.level)) { - return - } - - t := l.timeFn() - - l.mutex.Lock() - defer l.mutex.Unlock() - - if l.exclude != nil && l.exclude(level, msg, args...) { - return - } - - if l.json { - l.logJSON(t, name, level, msg, args...) - } else { - l.logPlain(t, name, level, msg, args...) - } - - l.writer.Flush(level) -} - -// Cleanup a path by returning the last 2 segments of the path only. -func trimCallerPath(path string) string { - // lovely borrowed from zap - // nb. To make sure we trim the path correctly on Windows too, we - // counter-intuitively need to use '/' and *not* os.PathSeparator here, - // because the path given originates from Go stdlib, specifically - // runtime.Caller() which (as of Mar/17) returns forward slashes even on - // Windows. - // - // See https://github.com/golang/go/issues/3335 - // and https://github.com/golang/go/issues/18151 - // - // for discussion on the issue on Go side. - - // Find the last separator. - idx := strings.LastIndexByte(path, '/') - if idx == -1 { - return path - } - - // Find the penultimate separator. - idx = strings.LastIndexByte(path[:idx], '/') - if idx == -1 { - return path - } - - return path[idx+1:] -} - -// isNormal indicates if the rune is one allowed to exist as an unquoted -// string value. This is a subset of ASCII, `-` through `~`. -func isNormal(r rune) bool { - return 0x2D <= r && r <= 0x7E // - through ~ -} - -// needsQuoting returns false if all the runes in string are normal, according -// to isNormal -func needsQuoting(str string) bool { - for _, r := range str { - if !isNormal(r) { - return true - } - } - - return false -} - -// logPlain is the non-JSON logging format function which writes directly -// to the underlying writer the logger was initialized with. -// -// If the logger was initialized with a color function, it also handles -// applying the color to the log message. -// -// Color Options -// 1. No color. -// 2. Color the whole log line, based on the level. -// 3. Color only the header (level) part of the log line. -// 4. Color both the header and fields of the log line. -func (l *intLogger) logPlain(t time.Time, name string, level Level, msg string, args ...interface{}) { - - if !l.disableTime { - l.writer.WriteString(t.Format(l.timeFormat)) - l.writer.WriteByte(' ') - } - - s, ok := _levelToBracket[level] - if ok { - if l.headerColor != ColorOff { - color := _levelToColor[level] - color.Fprint(l.writer, s) - } else { - l.writer.WriteString(s) - } - } else { - l.writer.WriteString("[?????]") - } - - if l.callerOffset > 0 { - if _, file, line, ok := runtime.Caller(l.callerOffset); ok { - l.writer.WriteByte(' ') - l.writer.WriteString(trimCallerPath(file)) - l.writer.WriteByte(':') - l.writer.WriteString(strconv.Itoa(line)) - l.writer.WriteByte(':') - } - } - - l.writer.WriteByte(' ') - - if name != "" { - l.writer.WriteString(name) - if msg != "" { - l.writer.WriteString(": ") - l.writer.WriteString(msg) - } - } else if msg != "" { - l.writer.WriteString(msg) - } - - args = append(l.implied, args...) - - var stacktrace CapturedStacktrace - - if len(args) > 0 { - if len(args)%2 != 0 { - cs, ok := args[len(args)-1].(CapturedStacktrace) - if ok { - args = args[:len(args)-1] - stacktrace = cs - } else { - extra := args[len(args)-1] - args = append(args[:len(args)-1], MissingKey, extra) - } - } - - l.writer.WriteByte(':') - - // Handle the field arguments, which come in pairs (key=val). - FOR: - for i := 0; i < len(args); i = i + 2 { - var ( - key string - val string - raw bool - ) - - // Convert the field value to a string. - switch st := args[i+1].(type) { - case string: - val = st - if st == "" { - val = `""` - raw = true - } - case int: - val = strconv.FormatInt(int64(st), 10) - case int64: - val = strconv.FormatInt(int64(st), 10) - case int32: - val = strconv.FormatInt(int64(st), 10) - case int16: - val = strconv.FormatInt(int64(st), 10) - case int8: - val = strconv.FormatInt(int64(st), 10) - case uint: - val = strconv.FormatUint(uint64(st), 10) - case uint64: - val = strconv.FormatUint(uint64(st), 10) - case uint32: - val = strconv.FormatUint(uint64(st), 10) - case uint16: - val = strconv.FormatUint(uint64(st), 10) - case uint8: - val = strconv.FormatUint(uint64(st), 10) - case Hex: - val = "0x" + strconv.FormatUint(uint64(st), 16) - case Octal: - val = "0" + strconv.FormatUint(uint64(st), 8) - case Binary: - val = "0b" + strconv.FormatUint(uint64(st), 2) - case CapturedStacktrace: - stacktrace = st - continue FOR - case Format: - val = fmt.Sprintf(st[0].(string), st[1:]...) - case Quote: - raw = true - val = strconv.Quote(string(st)) - default: - v := reflect.ValueOf(st) - if v.Kind() == reflect.Slice { - val = l.renderSlice(v) - raw = true - } else { - val = fmt.Sprintf("%v", st) - } - } - - // Convert the field key to a string. - switch st := args[i].(type) { - case string: - key = st - default: - key = fmt.Sprintf("%s", st) - } - - // Optionally apply the ANSI "faint" and "bold" - // SGR values to the key. - if l.fieldColor != ColorOff { - key = faintBoldColor.Sprint(key) - } - - // Values may contain multiple lines, and that format - // is preserved, with each line prefixed with a " | " - // to show it's part of a collection of lines. - // - // Values may also need quoting, if not all the runes - // in the value string are "normal", like if they - // contain ANSI escape sequences. - if strings.Contains(val, "\n") { - l.writer.WriteString("\n ") - l.writer.WriteString(key) - if l.fieldColor != ColorOff { - l.writer.WriteString(faintFieldSeparatorWithNewLine) - writeIndent(l.writer, val, faintMultiLinePrefix) - } else { - l.writer.WriteString("=\n") - writeIndent(l.writer, val, " | ") - } - l.writer.WriteString(" ") - } else if !raw && needsQuoting(val) { - l.writer.WriteByte(' ') - l.writer.WriteString(key) - if l.fieldColor != ColorOff { - l.writer.WriteString(faintFieldSeparator) - } else { - l.writer.WriteByte('=') - } - l.writer.WriteByte('"') - writeEscapedForOutput(l.writer, val, true) - l.writer.WriteByte('"') - } else { - l.writer.WriteByte(' ') - l.writer.WriteString(key) - if l.fieldColor != ColorOff { - l.writer.WriteString(faintFieldSeparator) - } else { - l.writer.WriteByte('=') - } - l.writer.WriteString(val) - } - } - } - - l.writer.WriteString("\n") - - if stacktrace != "" { - l.writer.WriteString(string(stacktrace)) - l.writer.WriteString("\n") - } -} - -func writeIndent(w *writer, str string, indent string) { - for { - nl := strings.IndexByte(str, "\n"[0]) - if nl == -1 { - if str != "" { - w.WriteString(indent) - writeEscapedForOutput(w, str, false) - w.WriteString("\n") - } - return - } - - w.WriteString(indent) - writeEscapedForOutput(w, str[:nl], false) - w.WriteString("\n") - str = str[nl+1:] - } -} - -func needsEscaping(str string) bool { - for _, b := range str { - if !unicode.IsPrint(b) || b == '"' { - return true - } - } - - return false -} - -const ( - lowerhex = "0123456789abcdef" -) - -var bufPool = sync.Pool{ - New: func() interface{} { - return new(bytes.Buffer) - }, -} - -func writeEscapedForOutput(w io.Writer, str string, escapeQuotes bool) { - if !needsEscaping(str) { - w.Write([]byte(str)) - return - } - - bb := bufPool.Get().(*bytes.Buffer) - bb.Reset() - - defer bufPool.Put(bb) - - for _, r := range str { - if escapeQuotes && r == '"' { - bb.WriteString(`\"`) - } else if unicode.IsPrint(r) { - bb.WriteRune(r) - } else { - switch r { - case '\a': - bb.WriteString(`\a`) - case '\b': - bb.WriteString(`\b`) - case '\f': - bb.WriteString(`\f`) - case '\n': - bb.WriteString(`\n`) - case '\r': - bb.WriteString(`\r`) - case '\t': - bb.WriteString(`\t`) - case '\v': - bb.WriteString(`\v`) - default: - switch { - case r < ' ': - bb.WriteString(`\x`) - bb.WriteByte(lowerhex[byte(r)>>4]) - bb.WriteByte(lowerhex[byte(r)&0xF]) - case !utf8.ValidRune(r): - r = 0xFFFD - fallthrough - case r < 0x10000: - bb.WriteString(`\u`) - for s := 12; s >= 0; s -= 4 { - bb.WriteByte(lowerhex[r>>uint(s)&0xF]) - } - default: - bb.WriteString(`\U`) - for s := 28; s >= 0; s -= 4 { - bb.WriteByte(lowerhex[r>>uint(s)&0xF]) - } - } - } - } - } - - w.Write(bb.Bytes()) -} - -func (l *intLogger) renderSlice(v reflect.Value) string { - var buf bytes.Buffer - - buf.WriteRune('[') - - for i := 0; i < v.Len(); i++ { - if i > 0 { - buf.WriteString(", ") - } - - sv := v.Index(i) - - var val string - - switch sv.Kind() { - case reflect.String: - val = strconv.Quote(sv.String()) - case reflect.Int, reflect.Int16, reflect.Int32, reflect.Int64: - val = strconv.FormatInt(sv.Int(), 10) - case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64: - val = strconv.FormatUint(sv.Uint(), 10) - default: - val = fmt.Sprintf("%v", sv.Interface()) - if strings.ContainsAny(val, " \t\n\r") { - val = strconv.Quote(val) - } - } - - buf.WriteString(val) - } - - buf.WriteRune(']') - - return buf.String() -} - -// JSON logging function -func (l *intLogger) logJSON(t time.Time, name string, level Level, msg string, args ...interface{}) { - vals := l.jsonMapEntry(t, name, level, msg) - args = append(l.implied, args...) - - if args != nil && len(args) > 0 { - if len(args)%2 != 0 { - cs, ok := args[len(args)-1].(CapturedStacktrace) - if ok { - args = args[:len(args)-1] - vals["stacktrace"] = cs - } else { - extra := args[len(args)-1] - args = append(args[:len(args)-1], MissingKey, extra) - } - } - - for i := 0; i < len(args); i = i + 2 { - val := args[i+1] - switch sv := val.(type) { - case error: - // Check if val is of type error. If error type doesn't - // implement json.Marshaler or encoding.TextMarshaler - // then set val to err.Error() so that it gets marshaled - switch sv.(type) { - case json.Marshaler, encoding.TextMarshaler: - default: - val = sv.Error() - } - case Format: - val = fmt.Sprintf(sv[0].(string), sv[1:]...) - } - - var key string - - switch st := args[i].(type) { - case string: - key = st - default: - key = fmt.Sprintf("%s", st) - } - vals[key] = val - } - } - - err := json.NewEncoder(l.writer).Encode(vals) - if err != nil { - if _, ok := err.(*json.UnsupportedTypeError); ok { - plainVal := l.jsonMapEntry(t, name, level, msg) - plainVal["@warn"] = errJsonUnsupportedTypeMsg - - json.NewEncoder(l.writer).Encode(plainVal) - } - } -} - -func (l intLogger) jsonMapEntry(t time.Time, name string, level Level, msg string) map[string]interface{} { - vals := map[string]interface{}{ - "@message": msg, - } - if !l.disableTime { - vals["@timestamp"] = t.Format(l.timeFormat) - } - - var levelStr string - switch level { - case Error: - levelStr = "error" - case Warn: - levelStr = "warn" - case Info: - levelStr = "info" - case Debug: - levelStr = "debug" - case Trace: - levelStr = "trace" - default: - levelStr = "all" - } - - vals["@level"] = levelStr - - if name != "" { - vals["@module"] = name - } - - if l.callerOffset > 0 { - if _, file, line, ok := runtime.Caller(l.callerOffset + 1); ok { - vals["@caller"] = fmt.Sprintf("%s:%d", file, line) - } - } - return vals -} - -// Emit the message and args at the provided level -func (l *intLogger) Log(level Level, msg string, args ...interface{}) { - l.log(l.Name(), level, msg, args...) -} - -// Emit the message and args at DEBUG level -func (l *intLogger) Debug(msg string, args ...interface{}) { - l.log(l.Name(), Debug, msg, args...) -} - -// Emit the message and args at TRACE level -func (l *intLogger) Trace(msg string, args ...interface{}) { - l.log(l.Name(), Trace, msg, args...) -} - -// Emit the message and args at INFO level -func (l *intLogger) Info(msg string, args ...interface{}) { - l.log(l.Name(), Info, msg, args...) -} - -// Emit the message and args at WARN level -func (l *intLogger) Warn(msg string, args ...interface{}) { - l.log(l.Name(), Warn, msg, args...) -} - -// Emit the message and args at ERROR level -func (l *intLogger) Error(msg string, args ...interface{}) { - l.log(l.Name(), Error, msg, args...) -} - -// Indicate that the logger would emit TRACE level logs -func (l *intLogger) IsTrace() bool { - return Level(atomic.LoadInt32(l.level)) == Trace -} - -// Indicate that the logger would emit DEBUG level logs -func (l *intLogger) IsDebug() bool { - return Level(atomic.LoadInt32(l.level)) <= Debug -} - -// Indicate that the logger would emit INFO level logs -func (l *intLogger) IsInfo() bool { - return Level(atomic.LoadInt32(l.level)) <= Info -} - -// Indicate that the logger would emit WARN level logs -func (l *intLogger) IsWarn() bool { - return Level(atomic.LoadInt32(l.level)) <= Warn -} - -// Indicate that the logger would emit ERROR level logs -func (l *intLogger) IsError() bool { - return Level(atomic.LoadInt32(l.level)) <= Error -} - -const MissingKey = "EXTRA_VALUE_AT_END" - -// Return a sub-Logger for which every emitted log message will contain -// the given key/value pairs. This is used to create a context specific -// Logger. -func (l *intLogger) With(args ...interface{}) Logger { - var extra interface{} - - if len(args)%2 != 0 { - extra = args[len(args)-1] - args = args[:len(args)-1] - } - - sl := l.copy() - - result := make(map[string]interface{}, len(l.implied)+len(args)) - keys := make([]string, 0, len(l.implied)+len(args)) - - // Read existing args, store map and key for consistent sorting - for i := 0; i < len(l.implied); i += 2 { - key := l.implied[i].(string) - keys = append(keys, key) - result[key] = l.implied[i+1] - } - // Read new args, store map and key for consistent sorting - for i := 0; i < len(args); i += 2 { - key := args[i].(string) - _, exists := result[key] - if !exists { - keys = append(keys, key) - } - result[key] = args[i+1] - } - - // Sort keys to be consistent - sort.Strings(keys) - - sl.implied = make([]interface{}, 0, len(l.implied)+len(args)) - for _, k := range keys { - sl.implied = append(sl.implied, k) - sl.implied = append(sl.implied, result[k]) - } - - if extra != nil { - sl.implied = append(sl.implied, MissingKey, extra) - } - - return l.subloggerHook(sl) -} - -// Create a new sub-Logger that a name decending from the current name. -// This is used to create a subsystem specific Logger. -func (l *intLogger) Named(name string) Logger { - sl := l.copy() - - if sl.name != "" { - sl.name = sl.name + "." + name - } else { - sl.name = name - } - - return l.subloggerHook(sl) -} - -// Create a new sub-Logger with an explicit name. This ignores the current -// name. This is used to create a standalone logger that doesn't fall -// within the normal hierarchy. -func (l *intLogger) ResetNamed(name string) Logger { - sl := l.copy() - - sl.name = name - - return l.subloggerHook(sl) -} - -func (l *intLogger) ResetOutput(opts *LoggerOptions) error { - if opts.Output == nil { - return errors.New("given output is nil") - } - - l.mutex.Lock() - defer l.mutex.Unlock() - - return l.resetOutput(opts) -} - -func (l *intLogger) ResetOutputWithFlush(opts *LoggerOptions, flushable Flushable) error { - if opts.Output == nil { - return errors.New("given output is nil") - } - if flushable == nil { - return errors.New("flushable is nil") - } - - l.mutex.Lock() - defer l.mutex.Unlock() - - if err := flushable.Flush(); err != nil { - return err - } - - return l.resetOutput(opts) -} - -func (l *intLogger) resetOutput(opts *LoggerOptions) error { - l.writer = newWriter(opts.Output, opts.Color) - l.setColorization(opts) - return nil -} - -// Update the logging level on-the-fly. This will affect all subloggers as -// well. -func (l *intLogger) SetLevel(level Level) { - atomic.StoreInt32(l.level, int32(level)) -} - -// Returns the current level -func (l *intLogger) GetLevel() Level { - return Level(atomic.LoadInt32(l.level)) -} - -// Create a *log.Logger that will send it's data through this Logger. This -// allows packages that expect to be using the standard library log to actually -// use this logger. -func (l *intLogger) StandardLogger(opts *StandardLoggerOptions) *log.Logger { - if opts == nil { - opts = &StandardLoggerOptions{} - } - - return log.New(l.StandardWriter(opts), "", 0) -} - -func (l *intLogger) StandardWriter(opts *StandardLoggerOptions) io.Writer { - newLog := *l - if l.callerOffset > 0 { - // the stack is - // logger.printf() -> l.Output() ->l.out.writer(hclog:stdlogAdaptor.write) -> hclog:stdlogAdaptor.dispatch() - // So plus 4. - newLog.callerOffset = l.callerOffset + 4 - } - return &stdlogAdapter{ - log: &newLog, - inferLevels: opts.InferLevels, - inferLevelsWithTimestamp: opts.InferLevelsWithTimestamp, - forceLevel: opts.ForceLevel, - } -} - -// Accept implements the SinkAdapter interface -func (i *intLogger) Accept(name string, level Level, msg string, args ...interface{}) { - i.log(name, level, msg, args...) -} - -// ImpliedArgs returns the loggers implied args -func (i *intLogger) ImpliedArgs() []interface{} { - return i.implied -} - -// Name returns the loggers name -func (i *intLogger) Name() string { - return i.name -} - -// copy returns a shallow copy of the intLogger, replacing the level pointer -// when necessary -func (l *intLogger) copy() *intLogger { - sl := *l - - if l.independentLevels { - sl.level = new(int32) - *sl.level = *l.level - } - - return &sl -} diff --git a/vendor/github.com/hashicorp/go-hclog/logger.go b/vendor/github.com/hashicorp/go-hclog/logger.go deleted file mode 100644 index 947ac0c9afc..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/logger.go +++ /dev/null @@ -1,393 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MIT - -package hclog - -import ( - "io" - "log" - "os" - "strings" - "time" -) - -var ( - // DefaultOutput is used as the default log output. - DefaultOutput io.Writer = os.Stderr - - // DefaultLevel is used as the default log level. - DefaultLevel = Info -) - -// Level represents a log level. -type Level int32 - -const ( - // NoLevel is a special level used to indicate that no level has been - // set and allow for a default to be used. - NoLevel Level = 0 - - // Trace is the most verbose level. Intended to be used for the tracing - // of actions in code, such as function enters/exits, etc. - Trace Level = 1 - - // Debug information for programmer low-level analysis. - Debug Level = 2 - - // Info information about steady state operations. - Info Level = 3 - - // Warn information about rare but handled events. - Warn Level = 4 - - // Error information about unrecoverable events. - Error Level = 5 - - // Off disables all logging output. - Off Level = 6 -) - -// Format is a simple convenience type for when formatting is required. When -// processing a value of this type, the logger automatically treats the first -// argument as a Printf formatting string and passes the rest as the values -// to be formatted. For example: L.Info(Fmt{"%d beans/day", beans}). -type Format []interface{} - -// Fmt returns a Format type. This is a convenience function for creating a Format -// type. -func Fmt(str string, args ...interface{}) Format { - return append(Format{str}, args...) -} - -// A simple shortcut to format numbers in hex when displayed with the normal -// text output. For example: L.Info("header value", Hex(17)) -type Hex int - -// A simple shortcut to format numbers in octal when displayed with the normal -// text output. For example: L.Info("perms", Octal(17)) -type Octal int - -// A simple shortcut to format numbers in binary when displayed with the normal -// text output. For example: L.Info("bits", Binary(17)) -type Binary int - -// A simple shortcut to format strings with Go quoting. Control and -// non-printable characters will be escaped with their backslash equivalents in -// output. Intended for untrusted or multiline strings which should be logged -// as concisely as possible. -type Quote string - -// ColorOption expresses how the output should be colored, if at all. -type ColorOption uint8 - -const ( - // ColorOff is the default coloration, and does not - // inject color codes into the io.Writer. - ColorOff ColorOption = iota - // AutoColor checks if the io.Writer is a tty, - // and if so enables coloring. - AutoColor - // ForceColor will enable coloring, regardless of whether - // the io.Writer is a tty or not. - ForceColor -) - -// SupportsColor is an optional interface that can be implemented by the output -// value. If implemented and SupportsColor() returns true, then AutoColor will -// enable colorization. -type SupportsColor interface { - SupportsColor() bool -} - -// LevelFromString returns a Level type for the named log level, or "NoLevel" if -// the level string is invalid. This facilitates setting the log level via -// config or environment variable by name in a predictable way. -func LevelFromString(levelStr string) Level { - // We don't care about case. Accept both "INFO" and "info". - levelStr = strings.ToLower(strings.TrimSpace(levelStr)) - switch levelStr { - case "trace": - return Trace - case "debug": - return Debug - case "info": - return Info - case "warn": - return Warn - case "error": - return Error - case "off": - return Off - default: - return NoLevel - } -} - -func (l Level) String() string { - switch l { - case Trace: - return "trace" - case Debug: - return "debug" - case Info: - return "info" - case Warn: - return "warn" - case Error: - return "error" - case NoLevel: - return "none" - case Off: - return "off" - default: - return "unknown" - } -} - -// Logger describes the interface that must be implemented by all loggers. -type Logger interface { - // Args are alternating key, val pairs - // keys must be strings - // vals can be any type, but display is implementation specific - // Emit a message and key/value pairs at a provided log level - Log(level Level, msg string, args ...interface{}) - - // Emit a message and key/value pairs at the TRACE level - Trace(msg string, args ...interface{}) - - // Emit a message and key/value pairs at the DEBUG level - Debug(msg string, args ...interface{}) - - // Emit a message and key/value pairs at the INFO level - Info(msg string, args ...interface{}) - - // Emit a message and key/value pairs at the WARN level - Warn(msg string, args ...interface{}) - - // Emit a message and key/value pairs at the ERROR level - Error(msg string, args ...interface{}) - - // Indicate if TRACE logs would be emitted. This and the other Is* guards - // are used to elide expensive logging code based on the current level. - IsTrace() bool - - // Indicate if DEBUG logs would be emitted. This and the other Is* guards - IsDebug() bool - - // Indicate if INFO logs would be emitted. This and the other Is* guards - IsInfo() bool - - // Indicate if WARN logs would be emitted. This and the other Is* guards - IsWarn() bool - - // Indicate if ERROR logs would be emitted. This and the other Is* guards - IsError() bool - - // ImpliedArgs returns With key/value pairs - ImpliedArgs() []interface{} - - // Creates a sublogger that will always have the given key/value pairs - With(args ...interface{}) Logger - - // Returns the Name of the logger - Name() string - - // Create a logger that will prepend the name string on the front of all messages. - // If the logger already has a name, the new value will be appended to the current - // name. That way, a major subsystem can use this to decorate all it's own logs - // without losing context. - Named(name string) Logger - - // Create a logger that will prepend the name string on the front of all messages. - // This sets the name of the logger to the value directly, unlike Named which honor - // the current name as well. - ResetNamed(name string) Logger - - // Updates the level. This should affect all related loggers as well, - // unless they were created with IndependentLevels. If an - // implementation cannot update the level on the fly, it should no-op. - SetLevel(level Level) - - // Returns the current level - GetLevel() Level - - // Return a value that conforms to the stdlib log.Logger interface - StandardLogger(opts *StandardLoggerOptions) *log.Logger - - // Return a value that conforms to io.Writer, which can be passed into log.SetOutput() - StandardWriter(opts *StandardLoggerOptions) io.Writer -} - -// StandardLoggerOptions can be used to configure a new standard logger. -type StandardLoggerOptions struct { - // Indicate that some minimal parsing should be done on strings to try - // and detect their level and re-emit them. - // This supports the strings like [ERROR], [ERR] [TRACE], [WARN], [INFO], - // [DEBUG] and strip it off before reapplying it. - InferLevels bool - - // Indicate that some minimal parsing should be done on strings to try - // and detect their level and re-emit them while ignoring possible - // timestamp values in the beginning of the string. - // This supports the strings like [ERROR], [ERR] [TRACE], [WARN], [INFO], - // [DEBUG] and strip it off before reapplying it. - // The timestamp detection may result in false positives and incomplete - // string outputs. - InferLevelsWithTimestamp bool - - // ForceLevel is used to force all output from the standard logger to be at - // the specified level. Similar to InferLevels, this will strip any level - // prefix contained in the logged string before applying the forced level. - // If set, this override InferLevels. - ForceLevel Level -} - -type TimeFunction = func() time.Time - -// LoggerOptions can be used to configure a new logger. -type LoggerOptions struct { - // Name of the subsystem to prefix logs with - Name string - - // The threshold for the logger. Anything less severe is suppressed - Level Level - - // Where to write the logs to. Defaults to os.Stderr if nil - Output io.Writer - - // An optional Locker in case Output is shared. This can be a sync.Mutex or - // a NoopLocker if the caller wants control over output, e.g. for batching - // log lines. - Mutex Locker - - // Control if the output should be in JSON. - JSONFormat bool - - // Include file and line information in each log line - IncludeLocation bool - - // AdditionalLocationOffset is the number of additional stack levels to skip - // when finding the file and line information for the log line - AdditionalLocationOffset int - - // The time format to use instead of the default - TimeFormat string - - // A function which is called to get the time object that is formatted using `TimeFormat` - TimeFn TimeFunction - - // Control whether or not to display the time at all. This is required - // because setting TimeFormat to empty assumes the default format. - DisableTime bool - - // Color the output. On Windows, colored logs are only available for io.Writers that - // are concretely instances of *os.File. - Color ColorOption - - // Only color the header, not the body. This can help with readability of long messages. - ColorHeaderOnly bool - - // Color the header and message body fields. This can help with readability - // of long messages with multiple fields. - ColorHeaderAndFields bool - - // A function which is called with the log information and if it returns true the value - // should not be logged. - // This is useful when interacting with a system that you wish to suppress the log - // message for (because it's too noisy, etc) - Exclude func(level Level, msg string, args ...interface{}) bool - - // IndependentLevels causes subloggers to be created with an independent - // copy of this logger's level. This means that using SetLevel on this - // logger will not affect any subloggers, and SetLevel on any subloggers - // will not affect the parent or sibling loggers. - IndependentLevels bool - - // SubloggerHook registers a function that is called when a sublogger via - // Named, With, or ResetNamed is created. If defined, the function is passed - // the newly created Logger and the returned Logger is returned from the - // original function. This option allows customization via interception and - // wrapping of Logger instances. - SubloggerHook func(sub Logger) Logger -} - -// InterceptLogger describes the interface for using a logger -// that can register different output sinks. -// This is useful for sending lower level log messages -// to a different output while keeping the root logger -// at a higher one. -type InterceptLogger interface { - // Logger is the root logger for an InterceptLogger - Logger - - // RegisterSink adds a SinkAdapter to the InterceptLogger - RegisterSink(sink SinkAdapter) - - // DeregisterSink removes a SinkAdapter from the InterceptLogger - DeregisterSink(sink SinkAdapter) - - // Create a interceptlogger that will prepend the name string on the front of all messages. - // If the logger already has a name, the new value will be appended to the current - // name. That way, a major subsystem can use this to decorate all it's own logs - // without losing context. - NamedIntercept(name string) InterceptLogger - - // Create a interceptlogger that will prepend the name string on the front of all messages. - // This sets the name of the logger to the value directly, unlike Named which honor - // the current name as well. - ResetNamedIntercept(name string) InterceptLogger - - // Deprecated: use StandardLogger - StandardLoggerIntercept(opts *StandardLoggerOptions) *log.Logger - - // Deprecated: use StandardWriter - StandardWriterIntercept(opts *StandardLoggerOptions) io.Writer -} - -// SinkAdapter describes the interface that must be implemented -// in order to Register a new sink to an InterceptLogger -type SinkAdapter interface { - Accept(name string, level Level, msg string, args ...interface{}) -} - -// Flushable represents a method for flushing an output buffer. It can be used -// if Resetting the log to use a new output, in order to flush the writes to -// the existing output beforehand. -type Flushable interface { - Flush() error -} - -// OutputResettable provides ways to swap the output in use at runtime -type OutputResettable interface { - // ResetOutput swaps the current output writer with the one given in the - // opts. Color options given in opts will be used for the new output. - ResetOutput(opts *LoggerOptions) error - - // ResetOutputWithFlush swaps the current output writer with the one given - // in the opts, first calling Flush on the given Flushable. Color options - // given in opts will be used for the new output. - ResetOutputWithFlush(opts *LoggerOptions, flushable Flushable) error -} - -// Locker is used for locking output. If not set when creating a logger, a -// sync.Mutex will be used internally. -type Locker interface { - // Lock is called when the output is going to be changed or written to - Lock() - - // Unlock is called when the operation that called Lock() completes - Unlock() -} - -// NoopLocker implements locker but does nothing. This is useful if the client -// wants tight control over locking, in order to provide grouping of log -// entries or other functionality. -type NoopLocker struct{} - -// Lock does nothing -func (n NoopLocker) Lock() {} - -// Unlock does nothing -func (n NoopLocker) Unlock() {} - -var _ Locker = (*NoopLocker)(nil) diff --git a/vendor/github.com/hashicorp/go-hclog/nulllogger.go b/vendor/github.com/hashicorp/go-hclog/nulllogger.go deleted file mode 100644 index d43da809eb9..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/nulllogger.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MIT - -package hclog - -import ( - "io" - "io/ioutil" - "log" -) - -// NewNullLogger instantiates a Logger for which all calls -// will succeed without doing anything. -// Useful for testing purposes. -func NewNullLogger() Logger { - return &nullLogger{} -} - -type nullLogger struct{} - -func (l *nullLogger) Log(level Level, msg string, args ...interface{}) {} - -func (l *nullLogger) Trace(msg string, args ...interface{}) {} - -func (l *nullLogger) Debug(msg string, args ...interface{}) {} - -func (l *nullLogger) Info(msg string, args ...interface{}) {} - -func (l *nullLogger) Warn(msg string, args ...interface{}) {} - -func (l *nullLogger) Error(msg string, args ...interface{}) {} - -func (l *nullLogger) IsTrace() bool { return false } - -func (l *nullLogger) IsDebug() bool { return false } - -func (l *nullLogger) IsInfo() bool { return false } - -func (l *nullLogger) IsWarn() bool { return false } - -func (l *nullLogger) IsError() bool { return false } - -func (l *nullLogger) ImpliedArgs() []interface{} { return []interface{}{} } - -func (l *nullLogger) With(args ...interface{}) Logger { return l } - -func (l *nullLogger) Name() string { return "" } - -func (l *nullLogger) Named(name string) Logger { return l } - -func (l *nullLogger) ResetNamed(name string) Logger { return l } - -func (l *nullLogger) SetLevel(level Level) {} - -func (l *nullLogger) GetLevel() Level { return NoLevel } - -func (l *nullLogger) StandardLogger(opts *StandardLoggerOptions) *log.Logger { - return log.New(l.StandardWriter(opts), "", log.LstdFlags) -} - -func (l *nullLogger) StandardWriter(opts *StandardLoggerOptions) io.Writer { - return ioutil.Discard -} diff --git a/vendor/github.com/hashicorp/go-hclog/stacktrace.go b/vendor/github.com/hashicorp/go-hclog/stacktrace.go deleted file mode 100644 index 9b27bd3d3d9..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/stacktrace.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package hclog - -import ( - "bytes" - "runtime" - "strconv" - "strings" - "sync" -) - -var ( - _stacktraceIgnorePrefixes = []string{ - "runtime.goexit", - "runtime.main", - } - _stacktracePool = sync.Pool{ - New: func() interface{} { - return newProgramCounters(64) - }, - } -) - -// CapturedStacktrace represents a stacktrace captured by a previous call -// to log.Stacktrace. If passed to a logging function, the stacktrace -// will be appended. -type CapturedStacktrace string - -// Stacktrace captures a stacktrace of the current goroutine and returns -// it to be passed to a logging function. -func Stacktrace() CapturedStacktrace { - return CapturedStacktrace(takeStacktrace()) -} - -func takeStacktrace() string { - programCounters := _stacktracePool.Get().(*programCounters) - defer _stacktracePool.Put(programCounters) - - var buffer bytes.Buffer - - for { - // Skip the call to runtime.Counters and takeStacktrace so that the - // program counters start at the caller of takeStacktrace. - n := runtime.Callers(2, programCounters.pcs) - if n < cap(programCounters.pcs) { - programCounters.pcs = programCounters.pcs[:n] - break - } - // Don't put the too-short counter slice back into the pool; this lets - // the pool adjust if we consistently take deep stacktraces. - programCounters = newProgramCounters(len(programCounters.pcs) * 2) - } - - i := 0 - frames := runtime.CallersFrames(programCounters.pcs) - for frame, more := frames.Next(); more; frame, more = frames.Next() { - if shouldIgnoreStacktraceFunction(frame.Function) { - continue - } - if i != 0 { - buffer.WriteByte('\n') - } - i++ - buffer.WriteString(frame.Function) - buffer.WriteByte('\n') - buffer.WriteByte('\t') - buffer.WriteString(frame.File) - buffer.WriteByte(':') - buffer.WriteString(strconv.Itoa(int(frame.Line))) - } - - return buffer.String() -} - -func shouldIgnoreStacktraceFunction(function string) bool { - for _, prefix := range _stacktraceIgnorePrefixes { - if strings.HasPrefix(function, prefix) { - return true - } - } - return false -} - -type programCounters struct { - pcs []uintptr -} - -func newProgramCounters(size int) *programCounters { - return &programCounters{make([]uintptr, size)} -} diff --git a/vendor/github.com/hashicorp/go-hclog/stdlog.go b/vendor/github.com/hashicorp/go-hclog/stdlog.go deleted file mode 100644 index 03739b61fa7..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/stdlog.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MIT - -package hclog - -import ( - "bytes" - "log" - "regexp" - "strings" -) - -// Regex to ignore characters commonly found in timestamp formats from the -// beginning of inputs. -var logTimestampRegexp = regexp.MustCompile(`^[\d\s\:\/\.\+-TZ]*`) - -// Provides a io.Writer to shim the data out of *log.Logger -// and back into our Logger. This is basically the only way to -// build upon *log.Logger. -type stdlogAdapter struct { - log Logger - inferLevels bool - inferLevelsWithTimestamp bool - forceLevel Level -} - -// Take the data, infer the levels if configured, and send it through -// a regular Logger. -func (s *stdlogAdapter) Write(data []byte) (int, error) { - str := string(bytes.TrimRight(data, " \t\n")) - - if s.forceLevel != NoLevel { - // Use pickLevel to strip log levels included in the line since we are - // forcing the level - _, str := s.pickLevel(str) - - // Log at the forced level - s.dispatch(str, s.forceLevel) - } else if s.inferLevels { - if s.inferLevelsWithTimestamp { - str = s.trimTimestamp(str) - } - - level, str := s.pickLevel(str) - s.dispatch(str, level) - } else { - s.log.Info(str) - } - - return len(data), nil -} - -func (s *stdlogAdapter) dispatch(str string, level Level) { - switch level { - case Trace: - s.log.Trace(str) - case Debug: - s.log.Debug(str) - case Info: - s.log.Info(str) - case Warn: - s.log.Warn(str) - case Error: - s.log.Error(str) - default: - s.log.Info(str) - } -} - -// Detect, based on conventions, what log level this is. -func (s *stdlogAdapter) pickLevel(str string) (Level, string) { - switch { - case strings.HasPrefix(str, "[DEBUG]"): - return Debug, strings.TrimSpace(str[7:]) - case strings.HasPrefix(str, "[TRACE]"): - return Trace, strings.TrimSpace(str[7:]) - case strings.HasPrefix(str, "[INFO]"): - return Info, strings.TrimSpace(str[6:]) - case strings.HasPrefix(str, "[WARN]"): - return Warn, strings.TrimSpace(str[6:]) - case strings.HasPrefix(str, "[ERROR]"): - return Error, strings.TrimSpace(str[7:]) - case strings.HasPrefix(str, "[ERR]"): - return Error, strings.TrimSpace(str[5:]) - default: - return Info, str - } -} - -func (s *stdlogAdapter) trimTimestamp(str string) string { - idx := logTimestampRegexp.FindStringIndex(str) - return str[idx[1]:] -} - -type logWriter struct { - l *log.Logger -} - -func (l *logWriter) Write(b []byte) (int, error) { - l.l.Println(string(bytes.TrimRight(b, " \n\t"))) - return len(b), nil -} - -// Takes a standard library logger and returns a Logger that will write to it -func FromStandardLogger(l *log.Logger, opts *LoggerOptions) Logger { - var dl LoggerOptions = *opts - - // Use the time format that log.Logger uses - dl.DisableTime = true - dl.Output = &logWriter{l} - - return New(&dl) -} diff --git a/vendor/github.com/hashicorp/go-hclog/writer.go b/vendor/github.com/hashicorp/go-hclog/writer.go deleted file mode 100644 index 4ee219bf0ce..00000000000 --- a/vendor/github.com/hashicorp/go-hclog/writer.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MIT - -package hclog - -import ( - "bytes" - "io" -) - -type writer struct { - b bytes.Buffer - w io.Writer - color ColorOption -} - -func newWriter(w io.Writer, color ColorOption) *writer { - return &writer{w: w, color: color} -} - -func (w *writer) Flush(level Level) (err error) { - var unwritten = w.b.Bytes() - - if w.color != ColorOff { - color := _levelToColor[level] - unwritten = []byte(color.Sprintf("%s", unwritten)) - } - - if lw, ok := w.w.(LevelWriter); ok { - _, err = lw.LevelWrite(level, unwritten) - } else { - _, err = w.w.Write(unwritten) - } - w.b.Reset() - return err -} - -func (w *writer) Write(p []byte) (int, error) { - return w.b.Write(p) -} - -func (w *writer) WriteByte(c byte) error { - return w.b.WriteByte(c) -} - -func (w *writer) WriteString(s string) (int, error) { - return w.b.WriteString(s) -} - -// LevelWriter is the interface that wraps the LevelWrite method. -type LevelWriter interface { - LevelWrite(level Level, p []byte) (n int, err error) -} - -// LeveledWriter writes all log messages to the standard writer, -// except for log levels that are defined in the overrides map. -type LeveledWriter struct { - standard io.Writer - overrides map[Level]io.Writer -} - -// NewLeveledWriter returns an initialized LeveledWriter. -// -// standard will be used as the default writer for all log levels, -// except for log levels that are defined in the overrides map. -func NewLeveledWriter(standard io.Writer, overrides map[Level]io.Writer) *LeveledWriter { - return &LeveledWriter{ - standard: standard, - overrides: overrides, - } -} - -// Write implements io.Writer. -func (lw *LeveledWriter) Write(p []byte) (int, error) { - return lw.standard.Write(p) -} - -// LevelWrite implements LevelWriter. -func (lw *LeveledWriter) LevelWrite(level Level, p []byte) (int, error) { - w, ok := lw.overrides[level] - if !ok { - w = lw.standard - } - return w.Write(p) -} diff --git a/vendor/github.com/hashicorp/go-immutable-radix/.gitignore b/vendor/github.com/hashicorp/go-immutable-radix/.gitignore deleted file mode 100644 index daf913b1b34..00000000000 --- a/vendor/github.com/hashicorp/go-immutable-radix/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md b/vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md deleted file mode 100644 index 86c6d03fbaa..00000000000 --- a/vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md +++ /dev/null @@ -1,23 +0,0 @@ -# UNRELEASED - -# 1.3.0 (September 17th, 2020) - -FEATURES - -* Add reverse tree traversal [[GH-30](https://github.com/hashicorp/go-immutable-radix/pull/30)] - -# 1.2.0 (March 18th, 2020) - -FEATURES - -* Adds a `Clone` method to `Txn` allowing transactions to be split either into two independently mutable trees. [[GH-26](https://github.com/hashicorp/go-immutable-radix/pull/26)] - -# 1.1.0 (May 22nd, 2019) - -FEATURES - -* Add `SeekLowerBound` to allow for range scans. [[GH-24](https://github.com/hashicorp/go-immutable-radix/pull/24)] - -# 1.0.0 (August 30th, 2018) - -* go mod adopted diff --git a/vendor/github.com/hashicorp/go-immutable-radix/LICENSE b/vendor/github.com/hashicorp/go-immutable-radix/LICENSE deleted file mode 100644 index e87a115e462..00000000000 --- a/vendor/github.com/hashicorp/go-immutable-radix/LICENSE +++ /dev/null @@ -1,363 +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/go-immutable-radix/README.md b/vendor/github.com/hashicorp/go-immutable-radix/README.md deleted file mode 100644 index aca15a64212..00000000000 --- a/vendor/github.com/hashicorp/go-immutable-radix/README.md +++ /dev/null @@ -1,66 +0,0 @@ -go-immutable-radix [![CircleCI](https://circleci.com/gh/hashicorp/go-immutable-radix/tree/master.svg?style=svg)](https://circleci.com/gh/hashicorp/go-immutable-radix/tree/master) -========= - -Provides the `iradix` package that implements an immutable [radix tree](http://en.wikipedia.org/wiki/Radix_tree). -The package only provides a single `Tree` implementation, optimized for sparse nodes. - -As a radix tree, it provides the following: - * O(k) operations. In many cases, this can be faster than a hash table since - the hash function is an O(k) operation, and hash tables have very poor cache locality. - * Minimum / Maximum value lookups - * Ordered iteration - -A tree supports using a transaction to batch multiple updates (insert, delete) -in a more efficient manner than performing each operation one at a time. - -For a mutable variant, see [go-radix](https://github.com/armon/go-radix). - -Documentation -============= - -The full documentation is available on [Godoc](http://godoc.org/github.com/hashicorp/go-immutable-radix). - -Example -======= - -Below is a simple example of usage - -```go -// Create a tree -r := iradix.New() -r, _, _ = r.Insert([]byte("foo"), 1) -r, _, _ = r.Insert([]byte("bar"), 2) -r, _, _ = r.Insert([]byte("foobar"), 2) - -// Find the longest prefix match -m, _, _ := r.Root().LongestPrefix([]byte("foozip")) -if string(m) != "foo" { - panic("should be foo") -} -``` - -Here is an example of performing a range scan of the keys. - -```go -// Create a tree -r := iradix.New() -r, _, _ = r.Insert([]byte("001"), 1) -r, _, _ = r.Insert([]byte("002"), 2) -r, _, _ = r.Insert([]byte("005"), 5) -r, _, _ = r.Insert([]byte("010"), 10) -r, _, _ = r.Insert([]byte("100"), 10) - -// Range scan over the keys that sort lexicographically between [003, 050) -it := r.Root().Iterator() -it.SeekLowerBound([]byte("003")) -for key, _, ok := it.Next(); ok; key, _, ok = it.Next() { - if key >= "050" { - break - } - fmt.Println(key) -} -// Output: -// 005 -// 010 -``` - diff --git a/vendor/github.com/hashicorp/go-immutable-radix/edges.go b/vendor/github.com/hashicorp/go-immutable-radix/edges.go deleted file mode 100644 index a63674775f2..00000000000 --- a/vendor/github.com/hashicorp/go-immutable-radix/edges.go +++ /dev/null @@ -1,21 +0,0 @@ -package iradix - -import "sort" - -type edges []edge - -func (e edges) Len() int { - return len(e) -} - -func (e edges) Less(i, j int) bool { - return e[i].label < e[j].label -} - -func (e edges) Swap(i, j int) { - e[i], e[j] = e[j], e[i] -} - -func (e edges) Sort() { - sort.Sort(e) -} diff --git a/vendor/github.com/hashicorp/go-immutable-radix/iradix.go b/vendor/github.com/hashicorp/go-immutable-radix/iradix.go deleted file mode 100644 index 168bda76dfb..00000000000 --- a/vendor/github.com/hashicorp/go-immutable-radix/iradix.go +++ /dev/null @@ -1,676 +0,0 @@ -package iradix - -import ( - "bytes" - "strings" - - "github.com/hashicorp/golang-lru/simplelru" -) - -const ( - // defaultModifiedCache is the default size of the modified node - // cache used per transaction. This is used to cache the updates - // to the nodes near the root, while the leaves do not need to be - // cached. This is important for very large transactions to prevent - // the modified cache from growing to be enormous. This is also used - // to set the max size of the mutation notify maps since those should - // also be bounded in a similar way. - defaultModifiedCache = 8192 -) - -// Tree implements an immutable radix tree. This can be treated as a -// Dictionary abstract data type. The main advantage over a standard -// hash map is prefix-based lookups and ordered iteration. The immutability -// means that it is safe to concurrently read from a Tree without any -// coordination. -type Tree struct { - root *Node - size int -} - -// New returns an empty Tree -func New() *Tree { - t := &Tree{ - root: &Node{ - mutateCh: make(chan struct{}), - }, - } - return t -} - -// Len is used to return the number of elements in the tree -func (t *Tree) Len() int { - return t.size -} - -// Txn is a transaction on the tree. This transaction is applied -// atomically and returns a new tree when committed. A transaction -// is not thread safe, and should only be used by a single goroutine. -type Txn struct { - // root is the modified root for the transaction. - root *Node - - // snap is a snapshot of the root node for use if we have to run the - // slow notify algorithm. - snap *Node - - // size tracks the size of the tree as it is modified during the - // transaction. - size int - - // writable is a cache of writable nodes that have been created during - // the course of the transaction. This allows us to re-use the same - // nodes for further writes and avoid unnecessary copies of nodes that - // have never been exposed outside the transaction. This will only hold - // up to defaultModifiedCache number of entries. - writable *simplelru.LRU - - // trackChannels is used to hold channels that need to be notified to - // signal mutation of the tree. This will only hold up to - // defaultModifiedCache number of entries, after which we will set the - // trackOverflow flag, which will cause us to use a more expensive - // algorithm to perform the notifications. Mutation tracking is only - // performed if trackMutate is true. - trackChannels map[chan struct{}]struct{} - trackOverflow bool - trackMutate bool -} - -// Txn starts a new transaction that can be used to mutate the tree -func (t *Tree) Txn() *Txn { - txn := &Txn{ - root: t.root, - snap: t.root, - size: t.size, - } - return txn -} - -// Clone makes an independent copy of the transaction. The new transaction -// does not track any nodes and has TrackMutate turned off. The cloned transaction will contain any uncommitted writes in the original transaction but further mutations to either will be independent and result in different radix trees on Commit. A cloned transaction may be passed to another goroutine and mutated there independently however each transaction may only be mutated in a single thread. -func (t *Txn) Clone() *Txn { - // reset the writable node cache to avoid leaking future writes into the clone - t.writable = nil - - txn := &Txn{ - root: t.root, - snap: t.snap, - size: t.size, - } - return txn -} - -// TrackMutate can be used to toggle if mutations are tracked. If this is enabled -// then notifications will be issued for affected internal nodes and leaves when -// the transaction is committed. -func (t *Txn) TrackMutate(track bool) { - t.trackMutate = track -} - -// trackChannel safely attempts to track the given mutation channel, setting the -// overflow flag if we can no longer track any more. This limits the amount of -// state that will accumulate during a transaction and we have a slower algorithm -// to switch to if we overflow. -func (t *Txn) trackChannel(ch chan struct{}) { - // In overflow, make sure we don't store any more objects. - if t.trackOverflow { - return - } - - // If this would overflow the state we reject it and set the flag (since - // we aren't tracking everything that's required any longer). - if len(t.trackChannels) >= defaultModifiedCache { - // Mark that we are in the overflow state - t.trackOverflow = true - - // Clear the map so that the channels can be garbage collected. It is - // safe to do this since we have already overflowed and will be using - // the slow notify algorithm. - t.trackChannels = nil - return - } - - // Create the map on the fly when we need it. - if t.trackChannels == nil { - t.trackChannels = make(map[chan struct{}]struct{}) - } - - // Otherwise we are good to track it. - t.trackChannels[ch] = struct{}{} -} - -// writeNode returns a node to be modified, if the current node has already been -// modified during the course of the transaction, it is used in-place. Set -// forLeafUpdate to true if you are getting a write node to update the leaf, -// which will set leaf mutation tracking appropriately as well. -func (t *Txn) writeNode(n *Node, forLeafUpdate bool) *Node { - // Ensure the writable set exists. - if t.writable == nil { - lru, err := simplelru.NewLRU(defaultModifiedCache, nil) - if err != nil { - panic(err) - } - t.writable = lru - } - - // If this node has already been modified, we can continue to use it - // during this transaction. We know that we don't need to track it for - // a node update since the node is writable, but if this is for a leaf - // update we track it, in case the initial write to this node didn't - // update the leaf. - if _, ok := t.writable.Get(n); ok { - if t.trackMutate && forLeafUpdate && n.leaf != nil { - t.trackChannel(n.leaf.mutateCh) - } - return n - } - - // Mark this node as being mutated. - if t.trackMutate { - t.trackChannel(n.mutateCh) - } - - // Mark its leaf as being mutated, if appropriate. - if t.trackMutate && forLeafUpdate && n.leaf != nil { - t.trackChannel(n.leaf.mutateCh) - } - - // Copy the existing node. If you have set forLeafUpdate it will be - // safe to replace this leaf with another after you get your node for - // writing. You MUST replace it, because the channel associated with - // this leaf will be closed when this transaction is committed. - nc := &Node{ - mutateCh: make(chan struct{}), - leaf: n.leaf, - } - if n.prefix != nil { - nc.prefix = make([]byte, len(n.prefix)) - copy(nc.prefix, n.prefix) - } - if len(n.edges) != 0 { - nc.edges = make([]edge, len(n.edges)) - copy(nc.edges, n.edges) - } - - // Mark this node as writable. - t.writable.Add(nc, nil) - return nc -} - -// Visit all the nodes in the tree under n, and add their mutateChannels to the transaction -// Returns the size of the subtree visited -func (t *Txn) trackChannelsAndCount(n *Node) int { - // Count only leaf nodes - leaves := 0 - if n.leaf != nil { - leaves = 1 - } - // Mark this node as being mutated. - if t.trackMutate { - t.trackChannel(n.mutateCh) - } - - // Mark its leaf as being mutated, if appropriate. - if t.trackMutate && n.leaf != nil { - t.trackChannel(n.leaf.mutateCh) - } - - // Recurse on the children - for _, e := range n.edges { - leaves += t.trackChannelsAndCount(e.node) - } - return leaves -} - -// mergeChild is called to collapse the given node with its child. This is only -// called when the given node is not a leaf and has a single edge. -func (t *Txn) mergeChild(n *Node) { - // Mark the child node as being mutated since we are about to abandon - // it. We don't need to mark the leaf since we are retaining it if it - // is there. - e := n.edges[0] - child := e.node - if t.trackMutate { - t.trackChannel(child.mutateCh) - } - - // Merge the nodes. - n.prefix = concat(n.prefix, child.prefix) - n.leaf = child.leaf - if len(child.edges) != 0 { - n.edges = make([]edge, len(child.edges)) - copy(n.edges, child.edges) - } else { - n.edges = nil - } -} - -// insert does a recursive insertion -func (t *Txn) insert(n *Node, k, search []byte, v interface{}) (*Node, interface{}, bool) { - // Handle key exhaustion - if len(search) == 0 { - var oldVal interface{} - didUpdate := false - if n.isLeaf() { - oldVal = n.leaf.val - didUpdate = true - } - - nc := t.writeNode(n, true) - nc.leaf = &leafNode{ - mutateCh: make(chan struct{}), - key: k, - val: v, - } - return nc, oldVal, didUpdate - } - - // Look for the edge - idx, child := n.getEdge(search[0]) - - // No edge, create one - if child == nil { - e := edge{ - label: search[0], - node: &Node{ - mutateCh: make(chan struct{}), - leaf: &leafNode{ - mutateCh: make(chan struct{}), - key: k, - val: v, - }, - prefix: search, - }, - } - nc := t.writeNode(n, false) - nc.addEdge(e) - return nc, nil, false - } - - // Determine longest prefix of the search key on match - commonPrefix := longestPrefix(search, child.prefix) - if commonPrefix == len(child.prefix) { - search = search[commonPrefix:] - newChild, oldVal, didUpdate := t.insert(child, k, search, v) - if newChild != nil { - nc := t.writeNode(n, false) - nc.edges[idx].node = newChild - return nc, oldVal, didUpdate - } - return nil, oldVal, didUpdate - } - - // Split the node - nc := t.writeNode(n, false) - splitNode := &Node{ - mutateCh: make(chan struct{}), - prefix: search[:commonPrefix], - } - nc.replaceEdge(edge{ - label: search[0], - node: splitNode, - }) - - // Restore the existing child node - modChild := t.writeNode(child, false) - splitNode.addEdge(edge{ - label: modChild.prefix[commonPrefix], - node: modChild, - }) - modChild.prefix = modChild.prefix[commonPrefix:] - - // Create a new leaf node - leaf := &leafNode{ - mutateCh: make(chan struct{}), - key: k, - val: v, - } - - // If the new key is a subset, add to to this node - search = search[commonPrefix:] - if len(search) == 0 { - splitNode.leaf = leaf - return nc, nil, false - } - - // Create a new edge for the node - splitNode.addEdge(edge{ - label: search[0], - node: &Node{ - mutateCh: make(chan struct{}), - leaf: leaf, - prefix: search, - }, - }) - return nc, nil, false -} - -// delete does a recursive deletion -func (t *Txn) delete(parent, n *Node, search []byte) (*Node, *leafNode) { - // Check for key exhaustion - if len(search) == 0 { - if !n.isLeaf() { - return nil, nil - } - // Copy the pointer in case we are in a transaction that already - // modified this node since the node will be reused. Any changes - // made to the node will not affect returning the original leaf - // value. - oldLeaf := n.leaf - - // Remove the leaf node - nc := t.writeNode(n, true) - nc.leaf = nil - - // Check if this node should be merged - if n != t.root && len(nc.edges) == 1 { - t.mergeChild(nc) - } - return nc, oldLeaf - } - - // Look for an edge - label := search[0] - idx, child := n.getEdge(label) - if child == nil || !bytes.HasPrefix(search, child.prefix) { - return nil, nil - } - - // Consume the search prefix - search = search[len(child.prefix):] - newChild, leaf := t.delete(n, child, search) - if newChild == nil { - return nil, nil - } - - // Copy this node. WATCH OUT - it's safe to pass "false" here because we - // will only ADD a leaf via nc.mergeChild() if there isn't one due to - // the !nc.isLeaf() check in the logic just below. This is pretty subtle, - // so be careful if you change any of the logic here. - nc := t.writeNode(n, false) - - // Delete the edge if the node has no edges - if newChild.leaf == nil && len(newChild.edges) == 0 { - nc.delEdge(label) - if n != t.root && len(nc.edges) == 1 && !nc.isLeaf() { - t.mergeChild(nc) - } - } else { - nc.edges[idx].node = newChild - } - return nc, leaf -} - -// delete does a recursive deletion -func (t *Txn) deletePrefix(parent, n *Node, search []byte) (*Node, int) { - // Check for key exhaustion - if len(search) == 0 { - nc := t.writeNode(n, true) - if n.isLeaf() { - nc.leaf = nil - } - nc.edges = nil - return nc, t.trackChannelsAndCount(n) - } - - // Look for an edge - label := search[0] - idx, child := n.getEdge(label) - // We make sure that either the child node's prefix starts with the search term, or the search term starts with the child node's prefix - // Need to do both so that we can delete prefixes that don't correspond to any node in the tree - if child == nil || (!bytes.HasPrefix(child.prefix, search) && !bytes.HasPrefix(search, child.prefix)) { - return nil, 0 - } - - // Consume the search prefix - if len(child.prefix) > len(search) { - search = []byte("") - } else { - search = search[len(child.prefix):] - } - newChild, numDeletions := t.deletePrefix(n, child, search) - if newChild == nil { - return nil, 0 - } - // Copy this node. WATCH OUT - it's safe to pass "false" here because we - // will only ADD a leaf via nc.mergeChild() if there isn't one due to - // the !nc.isLeaf() check in the logic just below. This is pretty subtle, - // so be careful if you change any of the logic here. - - nc := t.writeNode(n, false) - - // Delete the edge if the node has no edges - if newChild.leaf == nil && len(newChild.edges) == 0 { - nc.delEdge(label) - if n != t.root && len(nc.edges) == 1 && !nc.isLeaf() { - t.mergeChild(nc) - } - } else { - nc.edges[idx].node = newChild - } - return nc, numDeletions -} - -// Insert is used to add or update a given key. The return provides -// the previous value and a bool indicating if any was set. -func (t *Txn) Insert(k []byte, v interface{}) (interface{}, bool) { - newRoot, oldVal, didUpdate := t.insert(t.root, k, k, v) - if newRoot != nil { - t.root = newRoot - } - if !didUpdate { - t.size++ - } - return oldVal, didUpdate -} - -// Delete is used to delete a given key. Returns the old value if any, -// and a bool indicating if the key was set. -func (t *Txn) Delete(k []byte) (interface{}, bool) { - newRoot, leaf := t.delete(nil, t.root, k) - if newRoot != nil { - t.root = newRoot - } - if leaf != nil { - t.size-- - return leaf.val, true - } - return nil, false -} - -// DeletePrefix is used to delete an entire subtree that matches the prefix -// This will delete all nodes under that prefix -func (t *Txn) DeletePrefix(prefix []byte) bool { - newRoot, numDeletions := t.deletePrefix(nil, t.root, prefix) - if newRoot != nil { - t.root = newRoot - t.size = t.size - numDeletions - return true - } - return false - -} - -// Root returns the current root of the radix tree within this -// transaction. The root is not safe across insert and delete operations, -// but can be used to read the current state during a transaction. -func (t *Txn) Root() *Node { - return t.root -} - -// Get is used to lookup a specific key, returning -// the value and if it was found -func (t *Txn) Get(k []byte) (interface{}, bool) { - return t.root.Get(k) -} - -// GetWatch is used to lookup a specific key, returning -// the watch channel, value and if it was found -func (t *Txn) GetWatch(k []byte) (<-chan struct{}, interface{}, bool) { - return t.root.GetWatch(k) -} - -// Commit is used to finalize the transaction and return a new tree. If mutation -// tracking is turned on then notifications will also be issued. -func (t *Txn) Commit() *Tree { - nt := t.CommitOnly() - if t.trackMutate { - t.Notify() - } - return nt -} - -// CommitOnly is used to finalize the transaction and return a new tree, but -// does not issue any notifications until Notify is called. -func (t *Txn) CommitOnly() *Tree { - nt := &Tree{t.root, t.size} - t.writable = nil - return nt -} - -// slowNotify does a complete comparison of the before and after trees in order -// to trigger notifications. This doesn't require any additional state but it -// is very expensive to compute. -func (t *Txn) slowNotify() { - snapIter := t.snap.rawIterator() - rootIter := t.root.rawIterator() - for snapIter.Front() != nil || rootIter.Front() != nil { - // If we've exhausted the nodes in the old snapshot, we know - // there's nothing remaining to notify. - if snapIter.Front() == nil { - return - } - snapElem := snapIter.Front() - - // If we've exhausted the nodes in the new root, we know we need - // to invalidate everything that remains in the old snapshot. We - // know from the loop condition there's something in the old - // snapshot. - if rootIter.Front() == nil { - close(snapElem.mutateCh) - if snapElem.isLeaf() { - close(snapElem.leaf.mutateCh) - } - snapIter.Next() - continue - } - - // Do one string compare so we can check the various conditions - // below without repeating the compare. - cmp := strings.Compare(snapIter.Path(), rootIter.Path()) - - // If the snapshot is behind the root, then we must have deleted - // this node during the transaction. - if cmp < 0 { - close(snapElem.mutateCh) - if snapElem.isLeaf() { - close(snapElem.leaf.mutateCh) - } - snapIter.Next() - continue - } - - // If the snapshot is ahead of the root, then we must have added - // this node during the transaction. - if cmp > 0 { - rootIter.Next() - continue - } - - // If we have the same path, then we need to see if we mutated a - // node and possibly the leaf. - rootElem := rootIter.Front() - if snapElem != rootElem { - close(snapElem.mutateCh) - if snapElem.leaf != nil && (snapElem.leaf != rootElem.leaf) { - close(snapElem.leaf.mutateCh) - } - } - snapIter.Next() - rootIter.Next() - } -} - -// Notify is used along with TrackMutate to trigger notifications. This must -// only be done once a transaction is committed via CommitOnly, and it is called -// automatically by Commit. -func (t *Txn) Notify() { - if !t.trackMutate { - return - } - - // If we've overflowed the tracking state we can't use it in any way and - // need to do a full tree compare. - if t.trackOverflow { - t.slowNotify() - } else { - for ch := range t.trackChannels { - close(ch) - } - } - - // Clean up the tracking state so that a re-notify is safe (will trigger - // the else clause above which will be a no-op). - t.trackChannels = nil - t.trackOverflow = false -} - -// Insert is used to add or update a given key. The return provides -// the new tree, previous value and a bool indicating if any was set. -func (t *Tree) Insert(k []byte, v interface{}) (*Tree, interface{}, bool) { - txn := t.Txn() - old, ok := txn.Insert(k, v) - return txn.Commit(), old, ok -} - -// Delete is used to delete a given key. Returns the new tree, -// old value if any, and a bool indicating if the key was set. -func (t *Tree) Delete(k []byte) (*Tree, interface{}, bool) { - txn := t.Txn() - old, ok := txn.Delete(k) - return txn.Commit(), old, ok -} - -// DeletePrefix is used to delete all nodes starting with a given prefix. Returns the new tree, -// and a bool indicating if the prefix matched any nodes -func (t *Tree) DeletePrefix(k []byte) (*Tree, bool) { - txn := t.Txn() - ok := txn.DeletePrefix(k) - return txn.Commit(), ok -} - -// Root returns the root node of the tree which can be used for richer -// query operations. -func (t *Tree) Root() *Node { - return t.root -} - -// Get is used to lookup a specific key, returning -// the value and if it was found -func (t *Tree) Get(k []byte) (interface{}, bool) { - return t.root.Get(k) -} - -// longestPrefix finds the length of the shared prefix -// of two strings -func longestPrefix(k1, k2 []byte) int { - max := len(k1) - if l := len(k2); l < max { - max = l - } - var i int - for i = 0; i < max; i++ { - if k1[i] != k2[i] { - break - } - } - return i -} - -// concat two byte slices, returning a third new copy -func concat(a, b []byte) []byte { - c := make([]byte, len(a)+len(b)) - copy(c, a) - copy(c[len(a):], b) - return c -} diff --git a/vendor/github.com/hashicorp/go-immutable-radix/iter.go b/vendor/github.com/hashicorp/go-immutable-radix/iter.go deleted file mode 100644 index f17d0a644f4..00000000000 --- a/vendor/github.com/hashicorp/go-immutable-radix/iter.go +++ /dev/null @@ -1,205 +0,0 @@ -package iradix - -import ( - "bytes" -) - -// Iterator is used to iterate over a set of nodes -// in pre-order -type Iterator struct { - node *Node - stack []edges -} - -// SeekPrefixWatch is used to seek the iterator to a given prefix -// and returns the watch channel of the finest granularity -func (i *Iterator) SeekPrefixWatch(prefix []byte) (watch <-chan struct{}) { - // Wipe the stack - i.stack = nil - n := i.node - watch = n.mutateCh - search := prefix - for { - // Check for key exhaustion - if len(search) == 0 { - i.node = n - return - } - - // Look for an edge - _, n = n.getEdge(search[0]) - if n == nil { - i.node = nil - return - } - - // Update to the finest granularity as the search makes progress - watch = n.mutateCh - - // Consume the search prefix - if bytes.HasPrefix(search, n.prefix) { - search = search[len(n.prefix):] - - } else if bytes.HasPrefix(n.prefix, search) { - i.node = n - return - } else { - i.node = nil - return - } - } -} - -// SeekPrefix is used to seek the iterator to a given prefix -func (i *Iterator) SeekPrefix(prefix []byte) { - i.SeekPrefixWatch(prefix) -} - -func (i *Iterator) recurseMin(n *Node) *Node { - // Traverse to the minimum child - if n.leaf != nil { - return n - } - nEdges := len(n.edges) - if nEdges > 1 { - // Add all the other edges to the stack (the min node will be added as - // we recurse) - i.stack = append(i.stack, n.edges[1:]) - } - if nEdges > 0 { - return i.recurseMin(n.edges[0].node) - } - // Shouldn't be possible - return nil -} - -// SeekLowerBound is used to seek the iterator to the smallest key that is -// greater or equal to the given key. There is no watch variant as it's hard to -// predict based on the radix structure which node(s) changes might affect the -// result. -func (i *Iterator) SeekLowerBound(key []byte) { - // Wipe the stack. Unlike Prefix iteration, we need to build the stack as we - // go because we need only a subset of edges of many nodes in the path to the - // leaf with the lower bound. Note that the iterator will still recurse into - // children that we don't traverse on the way to the reverse lower bound as it - // walks the stack. - i.stack = []edges{} - // i.node starts off in the common case as pointing to the root node of the - // tree. By the time we return we have either found a lower bound and setup - // the stack to traverse all larger keys, or we have not and the stack and - // node should both be nil to prevent the iterator from assuming it is just - // iterating the whole tree from the root node. Either way this needs to end - // up as nil so just set it here. - n := i.node - i.node = nil - search := key - - found := func(n *Node) { - i.stack = append(i.stack, edges{edge{node: n}}) - } - - findMin := func(n *Node) { - n = i.recurseMin(n) - if n != nil { - found(n) - return - } - } - - for { - // Compare current prefix with the search key's same-length prefix. - var prefixCmp int - if len(n.prefix) < len(search) { - prefixCmp = bytes.Compare(n.prefix, search[0:len(n.prefix)]) - } else { - prefixCmp = bytes.Compare(n.prefix, search) - } - - if prefixCmp > 0 { - // Prefix is larger, that means the lower bound is greater than the search - // and from now on we need to follow the minimum path to the smallest - // leaf under this subtree. - findMin(n) - return - } - - if prefixCmp < 0 { - // Prefix is smaller than search prefix, that means there is no lower - // bound - i.node = nil - return - } - - // Prefix is equal, we are still heading for an exact match. If this is a - // leaf and an exact match we're done. - if n.leaf != nil && bytes.Equal(n.leaf.key, key) { - found(n) - return - } - - // Consume the search prefix if the current node has one. Note that this is - // safe because if n.prefix is longer than the search slice prefixCmp would - // have been > 0 above and the method would have already returned. - search = search[len(n.prefix):] - - if len(search) == 0 { - // We've exhausted the search key, but the current node is not an exact - // match or not a leaf. That means that the leaf value if it exists, and - // all child nodes must be strictly greater, the smallest key in this - // subtree must be the lower bound. - findMin(n) - return - } - - // Otherwise, take the lower bound next edge. - idx, lbNode := n.getLowerBoundEdge(search[0]) - if lbNode == nil { - return - } - - // Create stack edges for the all strictly higher edges in this node. - if idx+1 < len(n.edges) { - i.stack = append(i.stack, n.edges[idx+1:]) - } - - // Recurse - n = lbNode - } -} - -// Next returns the next node in order -func (i *Iterator) Next() ([]byte, interface{}, bool) { - // Initialize our stack if needed - if i.stack == nil && i.node != nil { - i.stack = []edges{ - { - edge{node: i.node}, - }, - } - } - - for len(i.stack) > 0 { - // Inspect the last element of the stack - n := len(i.stack) - last := i.stack[n-1] - elem := last[0].node - - // Update the stack - if len(last) > 1 { - i.stack[n-1] = last[1:] - } else { - i.stack = i.stack[:n-1] - } - - // Push the edges onto the frontier - if len(elem.edges) > 0 { - i.stack = append(i.stack, elem.edges) - } - - // Return the leaf values if any - if elem.leaf != nil { - return elem.leaf.key, elem.leaf.val, true - } - } - return nil, nil, false -} diff --git a/vendor/github.com/hashicorp/go-immutable-radix/node.go b/vendor/github.com/hashicorp/go-immutable-radix/node.go deleted file mode 100644 index 35985480872..00000000000 --- a/vendor/github.com/hashicorp/go-immutable-radix/node.go +++ /dev/null @@ -1,334 +0,0 @@ -package iradix - -import ( - "bytes" - "sort" -) - -// WalkFn is used when walking the tree. Takes a -// key and value, returning if iteration should -// be terminated. -type WalkFn func(k []byte, v interface{}) bool - -// leafNode is used to represent a value -type leafNode struct { - mutateCh chan struct{} - key []byte - val interface{} -} - -// edge is used to represent an edge node -type edge struct { - label byte - node *Node -} - -// Node is an immutable node in the radix tree -type Node struct { - // mutateCh is closed if this node is modified - mutateCh chan struct{} - - // leaf is used to store possible leaf - leaf *leafNode - - // prefix is the common prefix we ignore - prefix []byte - - // Edges should be stored in-order for iteration. - // We avoid a fully materialized slice to save memory, - // since in most cases we expect to be sparse - edges edges -} - -func (n *Node) isLeaf() bool { - return n.leaf != nil -} - -func (n *Node) addEdge(e edge) { - num := len(n.edges) - idx := sort.Search(num, func(i int) bool { - return n.edges[i].label >= e.label - }) - n.edges = append(n.edges, e) - if idx != num { - copy(n.edges[idx+1:], n.edges[idx:num]) - n.edges[idx] = e - } -} - -func (n *Node) replaceEdge(e edge) { - num := len(n.edges) - idx := sort.Search(num, func(i int) bool { - return n.edges[i].label >= e.label - }) - if idx < num && n.edges[idx].label == e.label { - n.edges[idx].node = e.node - return - } - panic("replacing missing edge") -} - -func (n *Node) getEdge(label byte) (int, *Node) { - num := len(n.edges) - idx := sort.Search(num, func(i int) bool { - return n.edges[i].label >= label - }) - if idx < num && n.edges[idx].label == label { - return idx, n.edges[idx].node - } - return -1, nil -} - -func (n *Node) getLowerBoundEdge(label byte) (int, *Node) { - num := len(n.edges) - idx := sort.Search(num, func(i int) bool { - return n.edges[i].label >= label - }) - // we want lower bound behavior so return even if it's not an exact match - if idx < num { - return idx, n.edges[idx].node - } - return -1, nil -} - -func (n *Node) delEdge(label byte) { - num := len(n.edges) - idx := sort.Search(num, func(i int) bool { - return n.edges[i].label >= label - }) - if idx < num && n.edges[idx].label == label { - copy(n.edges[idx:], n.edges[idx+1:]) - n.edges[len(n.edges)-1] = edge{} - n.edges = n.edges[:len(n.edges)-1] - } -} - -func (n *Node) GetWatch(k []byte) (<-chan struct{}, interface{}, bool) { - search := k - watch := n.mutateCh - for { - // Check for key exhaustion - if len(search) == 0 { - if n.isLeaf() { - return n.leaf.mutateCh, n.leaf.val, true - } - break - } - - // Look for an edge - _, n = n.getEdge(search[0]) - if n == nil { - break - } - - // Update to the finest granularity as the search makes progress - watch = n.mutateCh - - // Consume the search prefix - if bytes.HasPrefix(search, n.prefix) { - search = search[len(n.prefix):] - } else { - break - } - } - return watch, nil, false -} - -func (n *Node) Get(k []byte) (interface{}, bool) { - _, val, ok := n.GetWatch(k) - return val, ok -} - -// LongestPrefix is like Get, but instead of an -// exact match, it will return the longest prefix match. -func (n *Node) LongestPrefix(k []byte) ([]byte, interface{}, bool) { - var last *leafNode - search := k - for { - // Look for a leaf node - if n.isLeaf() { - last = n.leaf - } - - // Check for key exhaution - if len(search) == 0 { - break - } - - // Look for an edge - _, n = n.getEdge(search[0]) - if n == nil { - break - } - - // Consume the search prefix - if bytes.HasPrefix(search, n.prefix) { - search = search[len(n.prefix):] - } else { - break - } - } - if last != nil { - return last.key, last.val, true - } - return nil, nil, false -} - -// Minimum is used to return the minimum value in the tree -func (n *Node) Minimum() ([]byte, interface{}, bool) { - for { - if n.isLeaf() { - return n.leaf.key, n.leaf.val, true - } - if len(n.edges) > 0 { - n = n.edges[0].node - } else { - break - } - } - return nil, nil, false -} - -// Maximum is used to return the maximum value in the tree -func (n *Node) Maximum() ([]byte, interface{}, bool) { - for { - if num := len(n.edges); num > 0 { - n = n.edges[num-1].node - continue - } - if n.isLeaf() { - return n.leaf.key, n.leaf.val, true - } else { - break - } - } - return nil, nil, false -} - -// Iterator is used to return an iterator at -// the given node to walk the tree -func (n *Node) Iterator() *Iterator { - return &Iterator{node: n} -} - -// ReverseIterator is used to return an iterator at -// the given node to walk the tree backwards -func (n *Node) ReverseIterator() *ReverseIterator { - return NewReverseIterator(n) -} - -// rawIterator is used to return a raw iterator at the given node to walk the -// tree. -func (n *Node) rawIterator() *rawIterator { - iter := &rawIterator{node: n} - iter.Next() - return iter -} - -// Walk is used to walk the tree -func (n *Node) Walk(fn WalkFn) { - recursiveWalk(n, fn) -} - -// WalkBackwards is used to walk the tree in reverse order -func (n *Node) WalkBackwards(fn WalkFn) { - reverseRecursiveWalk(n, fn) -} - -// WalkPrefix is used to walk the tree under a prefix -func (n *Node) WalkPrefix(prefix []byte, fn WalkFn) { - search := prefix - for { - // Check for key exhaution - if len(search) == 0 { - recursiveWalk(n, fn) - return - } - - // Look for an edge - _, n = n.getEdge(search[0]) - if n == nil { - break - } - - // Consume the search prefix - if bytes.HasPrefix(search, n.prefix) { - search = search[len(n.prefix):] - - } else if bytes.HasPrefix(n.prefix, search) { - // Child may be under our search prefix - recursiveWalk(n, fn) - return - } else { - break - } - } -} - -// WalkPath is used to walk the tree, but only visiting nodes -// from the root down to a given leaf. Where WalkPrefix walks -// all the entries *under* the given prefix, this walks the -// entries *above* the given prefix. -func (n *Node) WalkPath(path []byte, fn WalkFn) { - search := path - for { - // Visit the leaf values if any - if n.leaf != nil && fn(n.leaf.key, n.leaf.val) { - return - } - - // Check for key exhaution - if len(search) == 0 { - return - } - - // Look for an edge - _, n = n.getEdge(search[0]) - if n == nil { - return - } - - // Consume the search prefix - if bytes.HasPrefix(search, n.prefix) { - search = search[len(n.prefix):] - } else { - break - } - } -} - -// recursiveWalk is used to do a pre-order walk of a node -// recursively. Returns true if the walk should be aborted -func recursiveWalk(n *Node, fn WalkFn) bool { - // Visit the leaf values if any - if n.leaf != nil && fn(n.leaf.key, n.leaf.val) { - return true - } - - // Recurse on the children - for _, e := range n.edges { - if recursiveWalk(e.node, fn) { - return true - } - } - return false -} - -// reverseRecursiveWalk is used to do a reverse pre-order -// walk of a node recursively. Returns true if the walk -// should be aborted -func reverseRecursiveWalk(n *Node, fn WalkFn) bool { - // Visit the leaf values if any - if n.leaf != nil && fn(n.leaf.key, n.leaf.val) { - return true - } - - // Recurse on the children in reverse order - for i := len(n.edges) - 1; i >= 0; i-- { - e := n.edges[i] - if reverseRecursiveWalk(e.node, fn) { - return true - } - } - return false -} diff --git a/vendor/github.com/hashicorp/go-immutable-radix/raw_iter.go b/vendor/github.com/hashicorp/go-immutable-radix/raw_iter.go deleted file mode 100644 index 3c6a22525c8..00000000000 --- a/vendor/github.com/hashicorp/go-immutable-radix/raw_iter.go +++ /dev/null @@ -1,78 +0,0 @@ -package iradix - -// rawIterator visits each of the nodes in the tree, even the ones that are not -// leaves. It keeps track of the effective path (what a leaf at a given node -// would be called), which is useful for comparing trees. -type rawIterator struct { - // node is the starting node in the tree for the iterator. - node *Node - - // stack keeps track of edges in the frontier. - stack []rawStackEntry - - // pos is the current position of the iterator. - pos *Node - - // path is the effective path of the current iterator position, - // regardless of whether the current node is a leaf. - path string -} - -// rawStackEntry is used to keep track of the cumulative common path as well as -// its associated edges in the frontier. -type rawStackEntry struct { - path string - edges edges -} - -// Front returns the current node that has been iterated to. -func (i *rawIterator) Front() *Node { - return i.pos -} - -// Path returns the effective path of the current node, even if it's not actually -// a leaf. -func (i *rawIterator) Path() string { - return i.path -} - -// Next advances the iterator to the next node. -func (i *rawIterator) Next() { - // Initialize our stack if needed. - if i.stack == nil && i.node != nil { - i.stack = []rawStackEntry{ - { - edges: edges{ - edge{node: i.node}, - }, - }, - } - } - - for len(i.stack) > 0 { - // Inspect the last element of the stack. - n := len(i.stack) - last := i.stack[n-1] - elem := last.edges[0].node - - // Update the stack. - if len(last.edges) > 1 { - i.stack[n-1].edges = last.edges[1:] - } else { - i.stack = i.stack[:n-1] - } - - // Push the edges onto the frontier. - if len(elem.edges) > 0 { - path := last.path + string(elem.prefix) - i.stack = append(i.stack, rawStackEntry{path, elem.edges}) - } - - i.pos = elem - i.path = last.path + string(elem.prefix) - return - } - - i.pos = nil - i.path = "" -} diff --git a/vendor/github.com/hashicorp/go-immutable-radix/reverse_iter.go b/vendor/github.com/hashicorp/go-immutable-radix/reverse_iter.go deleted file mode 100644 index 554fa7129c1..00000000000 --- a/vendor/github.com/hashicorp/go-immutable-radix/reverse_iter.go +++ /dev/null @@ -1,239 +0,0 @@ -package iradix - -import ( - "bytes" -) - -// ReverseIterator is used to iterate over a set of nodes -// in reverse in-order -type ReverseIterator struct { - i *Iterator - - // expandedParents stores the set of parent nodes whose relevant children have - // already been pushed into the stack. This can happen during seek or during - // iteration. - // - // Unlike forward iteration we need to recurse into children before we can - // output the value stored in an internal leaf since all children are greater. - // We use this to track whether we have already ensured all the children are - // in the stack. - expandedParents map[*Node]struct{} -} - -// NewReverseIterator returns a new ReverseIterator at a node -func NewReverseIterator(n *Node) *ReverseIterator { - return &ReverseIterator{ - i: &Iterator{node: n}, - } -} - -// SeekPrefixWatch is used to seek the iterator to a given prefix -// and returns the watch channel of the finest granularity -func (ri *ReverseIterator) SeekPrefixWatch(prefix []byte) (watch <-chan struct{}) { - return ri.i.SeekPrefixWatch(prefix) -} - -// SeekPrefix is used to seek the iterator to a given prefix -func (ri *ReverseIterator) SeekPrefix(prefix []byte) { - ri.i.SeekPrefixWatch(prefix) -} - -// SeekReverseLowerBound is used to seek the iterator to the largest key that is -// lower or equal to the given key. There is no watch variant as it's hard to -// predict based on the radix structure which node(s) changes might affect the -// result. -func (ri *ReverseIterator) SeekReverseLowerBound(key []byte) { - // Wipe the stack. Unlike Prefix iteration, we need to build the stack as we - // go because we need only a subset of edges of many nodes in the path to the - // leaf with the lower bound. Note that the iterator will still recurse into - // children that we don't traverse on the way to the reverse lower bound as it - // walks the stack. - ri.i.stack = []edges{} - // ri.i.node starts off in the common case as pointing to the root node of the - // tree. By the time we return we have either found a lower bound and setup - // the stack to traverse all larger keys, or we have not and the stack and - // node should both be nil to prevent the iterator from assuming it is just - // iterating the whole tree from the root node. Either way this needs to end - // up as nil so just set it here. - n := ri.i.node - ri.i.node = nil - search := key - - if ri.expandedParents == nil { - ri.expandedParents = make(map[*Node]struct{}) - } - - found := func(n *Node) { - ri.i.stack = append(ri.i.stack, edges{edge{node: n}}) - // We need to mark this node as expanded in advance too otherwise the - // iterator will attempt to walk all of its children even though they are - // greater than the lower bound we have found. We've expanded it in the - // sense that all of its children that we want to walk are already in the - // stack (i.e. none of them). - ri.expandedParents[n] = struct{}{} - } - - for { - // Compare current prefix with the search key's same-length prefix. - var prefixCmp int - if len(n.prefix) < len(search) { - prefixCmp = bytes.Compare(n.prefix, search[0:len(n.prefix)]) - } else { - prefixCmp = bytes.Compare(n.prefix, search) - } - - if prefixCmp < 0 { - // Prefix is smaller than search prefix, that means there is no exact - // match for the search key. But we are looking in reverse, so the reverse - // lower bound will be the largest leaf under this subtree, since it is - // the value that would come right before the current search key if it - // were in the tree. So we need to follow the maximum path in this subtree - // to find it. Note that this is exactly what the iterator will already do - // if it finds a node in the stack that has _not_ been marked as expanded - // so in this one case we don't call `found` and instead let the iterator - // do the expansion and recursion through all the children. - ri.i.stack = append(ri.i.stack, edges{edge{node: n}}) - return - } - - if prefixCmp > 0 { - // Prefix is larger than search prefix, or there is no prefix but we've - // also exhausted the search key. Either way, that means there is no - // reverse lower bound since nothing comes before our current search - // prefix. - return - } - - // If this is a leaf, something needs to happen! Note that if it's a leaf - // and prefixCmp was zero (which it must be to get here) then the leaf value - // is either an exact match for the search, or it's lower. It can't be - // greater. - if n.isLeaf() { - - // Firstly, if it's an exact match, we're done! - if bytes.Equal(n.leaf.key, key) { - found(n) - return - } - - // It's not so this node's leaf value must be lower and could still be a - // valid contender for reverse lower bound. - - // If it has no children then we are also done. - if len(n.edges) == 0 { - // This leaf is the lower bound. - found(n) - return - } - - // Finally, this leaf is internal (has children) so we'll keep searching, - // but we need to add it to the iterator's stack since it has a leaf value - // that needs to be iterated over. It needs to be added to the stack - // before its children below as it comes first. - ri.i.stack = append(ri.i.stack, edges{edge{node: n}}) - // We also need to mark it as expanded since we'll be adding any of its - // relevant children below and so don't want the iterator to re-add them - // on its way back up the stack. - ri.expandedParents[n] = struct{}{} - } - - // Consume the search prefix. Note that this is safe because if n.prefix is - // longer than the search slice prefixCmp would have been > 0 above and the - // method would have already returned. - search = search[len(n.prefix):] - - if len(search) == 0 { - // We've exhausted the search key but we are not at a leaf. That means all - // children are greater than the search key so a reverse lower bound - // doesn't exist in this subtree. Note that there might still be one in - // the whole radix tree by following a different path somewhere further - // up. If that's the case then the iterator's stack will contain all the - // smaller nodes already and Previous will walk through them correctly. - return - } - - // Otherwise, take the lower bound next edge. - idx, lbNode := n.getLowerBoundEdge(search[0]) - - // From here, we need to update the stack with all values lower than - // the lower bound edge. Since getLowerBoundEdge() returns -1 when the - // search prefix is larger than all edges, we need to place idx at the - // last edge index so they can all be place in the stack, since they - // come before our search prefix. - if idx == -1 { - idx = len(n.edges) - } - - // Create stack edges for the all strictly lower edges in this node. - if len(n.edges[:idx]) > 0 { - ri.i.stack = append(ri.i.stack, n.edges[:idx]) - } - - // Exit if there's no lower bound edge. The stack will have the previous - // nodes already. - if lbNode == nil { - return - } - - // Recurse - n = lbNode - } -} - -// Previous returns the previous node in reverse order -func (ri *ReverseIterator) Previous() ([]byte, interface{}, bool) { - // Initialize our stack if needed - if ri.i.stack == nil && ri.i.node != nil { - ri.i.stack = []edges{ - { - edge{node: ri.i.node}, - }, - } - } - - if ri.expandedParents == nil { - ri.expandedParents = make(map[*Node]struct{}) - } - - for len(ri.i.stack) > 0 { - // Inspect the last element of the stack - n := len(ri.i.stack) - last := ri.i.stack[n-1] - m := len(last) - elem := last[m-1].node - - _, alreadyExpanded := ri.expandedParents[elem] - - // If this is an internal node and we've not seen it already, we need to - // leave it in the stack so we can return its possible leaf value _after_ - // we've recursed through all its children. - if len(elem.edges) > 0 && !alreadyExpanded { - // record that we've seen this node! - ri.expandedParents[elem] = struct{}{} - // push child edges onto stack and skip the rest of the loop to recurse - // into the largest one. - ri.i.stack = append(ri.i.stack, elem.edges) - continue - } - - // Remove the node from the stack - if m > 1 { - ri.i.stack[n-1] = last[:m-1] - } else { - ri.i.stack = ri.i.stack[:n-1] - } - // We don't need this state any more as it's no longer in the stack so we - // won't visit it again - if alreadyExpanded { - delete(ri.expandedParents, elem) - } - - // If this is a leaf, return it - if elem.leaf != nil { - return elem.leaf.key, elem.leaf.val, true - } - - // it's not a leaf so keep walking the stack to find the previous leaf - } - return nil, nil, false -} diff --git a/vendor/github.com/hashicorp/go-multierror/LICENSE b/vendor/github.com/hashicorp/go-multierror/LICENSE deleted file mode 100644 index 82b4de97c7e..00000000000 --- a/vendor/github.com/hashicorp/go-multierror/LICENSE +++ /dev/null @@ -1,353 +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/go-multierror/Makefile b/vendor/github.com/hashicorp/go-multierror/Makefile deleted file mode 100644 index b97cd6ed02b..00000000000 --- a/vendor/github.com/hashicorp/go-multierror/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -TEST?=./... - -default: test - -# test runs the test suite and vets the code. -test: generate - @echo "==> Running tests..." - @go list $(TEST) \ - | grep -v "/vendor/" \ - | xargs -n1 go test -timeout=60s -parallel=10 ${TESTARGS} - -# testrace runs the race checker -testrace: generate - @echo "==> Running tests (race)..." - @go list $(TEST) \ - | grep -v "/vendor/" \ - | xargs -n1 go test -timeout=60s -race ${TESTARGS} - -# updatedeps installs all the dependencies needed to run and build. -updatedeps: - @sh -c "'${CURDIR}/scripts/deps.sh' '${NAME}'" - -# generate runs `go generate` to build the dynamically generated source files. -generate: - @echo "==> Generating..." - @find . -type f -name '.DS_Store' -delete - @go list ./... \ - | grep -v "/vendor/" \ - | xargs -n1 go generate - -.PHONY: default test testrace updatedeps generate diff --git a/vendor/github.com/hashicorp/go-multierror/README.md b/vendor/github.com/hashicorp/go-multierror/README.md deleted file mode 100644 index 71dd308ed81..00000000000 --- a/vendor/github.com/hashicorp/go-multierror/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# go-multierror - -[![CircleCI](https://img.shields.io/circleci/build/github/hashicorp/go-multierror/master)](https://circleci.com/gh/hashicorp/go-multierror) -[![Go Reference](https://pkg.go.dev/badge/github.com/hashicorp/go-multierror.svg)](https://pkg.go.dev/github.com/hashicorp/go-multierror) -![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/hashicorp/go-multierror) - -[circleci]: https://app.circleci.com/pipelines/github/hashicorp/go-multierror -[godocs]: https://pkg.go.dev/github.com/hashicorp/go-multierror - -`go-multierror` is a package for Go that provides a mechanism for -representing a list of `error` values as a single `error`. - -This allows a function in Go to return an `error` that might actually -be a list of errors. If the caller knows this, they can unwrap the -list and access the errors. If the caller doesn't know, the error -formats to a nice human-readable format. - -`go-multierror` is fully compatible with the Go standard library -[errors](https://golang.org/pkg/errors/) package, including the -functions `As`, `Is`, and `Unwrap`. This provides a standardized approach -for introspecting on error values. - -## Installation and Docs - -Install using `go get github.com/hashicorp/go-multierror`. - -Full documentation is available at -https://pkg.go.dev/github.com/hashicorp/go-multierror - -### Requires go version 1.13 or newer - -`go-multierror` requires go version 1.13 or newer. Go 1.13 introduced -[error wrapping](https://golang.org/doc/go1.13#error_wrapping), which -this library takes advantage of. - -If you need to use an earlier version of go, you can use the -[v1.0.0](https://github.com/hashicorp/go-multierror/tree/v1.0.0) -tag, which doesn't rely on features in go 1.13. - -If you see compile errors that look like the below, it's likely that -you're on an older version of go: - -``` -/go/src/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As -/go/src/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is -``` - -## Usage - -go-multierror is easy to use and purposely built to be unobtrusive in -existing Go applications/libraries that may not be aware of it. - -**Building a list of errors** - -The `Append` function is used to create a list of errors. This function -behaves a lot like the Go built-in `append` function: it doesn't matter -if the first argument is nil, a `multierror.Error`, or any other `error`, -the function behaves as you would expect. - -```go -var result error - -if err := step1(); err != nil { - result = multierror.Append(result, err) -} -if err := step2(); err != nil { - result = multierror.Append(result, err) -} - -return result -``` - -**Customizing the formatting of the errors** - -By specifying a custom `ErrorFormat`, you can customize the format -of the `Error() string` function: - -```go -var result *multierror.Error - -// ... accumulate errors here, maybe using Append - -if result != nil { - result.ErrorFormat = func([]error) string { - return "errors!" - } -} -``` - -**Accessing the list of errors** - -`multierror.Error` implements `error` so if the caller doesn't know about -multierror, it will work just fine. But if you're aware a multierror might -be returned, you can use type switches to access the list of errors: - -```go -if err := something(); err != nil { - if merr, ok := err.(*multierror.Error); ok { - // Use merr.Errors - } -} -``` - -You can also use the standard [`errors.Unwrap`](https://golang.org/pkg/errors/#Unwrap) -function. This will continue to unwrap into subsequent errors until none exist. - -**Extracting an error** - -The standard library [`errors.As`](https://golang.org/pkg/errors/#As) -function can be used directly with a multierror to extract a specific error: - -```go -// Assume err is a multierror value -err := somefunc() - -// We want to know if "err" has a "RichErrorType" in it and extract it. -var errRich RichErrorType -if errors.As(err, &errRich) { - // It has it, and now errRich is populated. -} -``` - -**Checking for an exact error value** - -Some errors are returned as exact errors such as the [`ErrNotExist`](https://golang.org/pkg/os/#pkg-variables) -error in the `os` package. You can check if this error is present by using -the standard [`errors.Is`](https://golang.org/pkg/errors/#Is) function. - -```go -// Assume err is a multierror value -err := somefunc() -if errors.Is(err, os.ErrNotExist) { - // err contains os.ErrNotExist -} -``` - -**Returning a multierror only if there are errors** - -If you build a `multierror.Error`, you can use the `ErrorOrNil` function -to return an `error` implementation only if there are errors to return: - -```go -var result *multierror.Error - -// ... accumulate errors here - -// Return the `error` only if errors were added to the multierror, otherwise -// return nil since there are no errors. -return result.ErrorOrNil() -``` diff --git a/vendor/github.com/hashicorp/go-multierror/append.go b/vendor/github.com/hashicorp/go-multierror/append.go deleted file mode 100644 index 3e2589bfde0..00000000000 --- a/vendor/github.com/hashicorp/go-multierror/append.go +++ /dev/null @@ -1,43 +0,0 @@ -package multierror - -// Append is a helper function that will append more errors -// onto an Error in order to create a larger multi-error. -// -// If err is not a multierror.Error, then it will be turned into -// one. If any of the errs are multierr.Error, they will be flattened -// one level into err. -// Any nil errors within errs will be ignored. If err is nil, a new -// *Error will be returned. -func Append(err error, errs ...error) *Error { - switch err := err.(type) { - case *Error: - // Typed nils can reach here, so initialize if we are nil - if err == nil { - err = new(Error) - } - - // Go through each error and flatten - for _, e := range errs { - switch e := e.(type) { - case *Error: - if e != nil { - err.Errors = append(err.Errors, e.Errors...) - } - default: - if e != nil { - err.Errors = append(err.Errors, e) - } - } - } - - return err - default: - newErrs := make([]error, 0, len(errs)+1) - if err != nil { - newErrs = append(newErrs, err) - } - newErrs = append(newErrs, errs...) - - return Append(&Error{}, newErrs...) - } -} diff --git a/vendor/github.com/hashicorp/go-multierror/flatten.go b/vendor/github.com/hashicorp/go-multierror/flatten.go deleted file mode 100644 index aab8e9abec9..00000000000 --- a/vendor/github.com/hashicorp/go-multierror/flatten.go +++ /dev/null @@ -1,26 +0,0 @@ -package multierror - -// Flatten flattens the given error, merging any *Errors together into -// a single *Error. -func Flatten(err error) error { - // If it isn't an *Error, just return the error as-is - if _, ok := err.(*Error); !ok { - return err - } - - // Otherwise, make the result and flatten away! - flatErr := new(Error) - flatten(err, flatErr) - return flatErr -} - -func flatten(err error, flatErr *Error) { - switch err := err.(type) { - case *Error: - for _, e := range err.Errors { - flatten(e, flatErr) - } - default: - flatErr.Errors = append(flatErr.Errors, err) - } -} diff --git a/vendor/github.com/hashicorp/go-multierror/format.go b/vendor/github.com/hashicorp/go-multierror/format.go deleted file mode 100644 index 47f13c49a67..00000000000 --- a/vendor/github.com/hashicorp/go-multierror/format.go +++ /dev/null @@ -1,27 +0,0 @@ -package multierror - -import ( - "fmt" - "strings" -) - -// ErrorFormatFunc is a function callback that is called by Error to -// turn the list of errors into a string. -type ErrorFormatFunc func([]error) string - -// ListFormatFunc is a basic formatter that outputs the number of errors -// that occurred along with a bullet point list of the errors. -func ListFormatFunc(es []error) string { - if len(es) == 1 { - return fmt.Sprintf("1 error occurred:\n\t* %s\n\n", es[0]) - } - - points := make([]string, len(es)) - for i, err := range es { - points[i] = fmt.Sprintf("* %s", err) - } - - return fmt.Sprintf( - "%d errors occurred:\n\t%s\n\n", - len(es), strings.Join(points, "\n\t")) -} diff --git a/vendor/github.com/hashicorp/go-multierror/group.go b/vendor/github.com/hashicorp/go-multierror/group.go deleted file mode 100644 index 9c29efb7f87..00000000000 --- a/vendor/github.com/hashicorp/go-multierror/group.go +++ /dev/null @@ -1,38 +0,0 @@ -package multierror - -import "sync" - -// Group is a collection of goroutines which return errors that need to be -// coalesced. -type Group struct { - mutex sync.Mutex - err *Error - wg sync.WaitGroup -} - -// Go calls the given function in a new goroutine. -// -// If the function returns an error it is added to the group multierror which -// is returned by Wait. -func (g *Group) Go(f func() error) { - g.wg.Add(1) - - go func() { - defer g.wg.Done() - - if err := f(); err != nil { - g.mutex.Lock() - g.err = Append(g.err, err) - g.mutex.Unlock() - } - }() -} - -// Wait blocks until all function calls from the Go method have returned, then -// returns the multierror. -func (g *Group) Wait() *Error { - g.wg.Wait() - g.mutex.Lock() - defer g.mutex.Unlock() - return g.err -} diff --git a/vendor/github.com/hashicorp/go-multierror/multierror.go b/vendor/github.com/hashicorp/go-multierror/multierror.go deleted file mode 100644 index f5457432646..00000000000 --- a/vendor/github.com/hashicorp/go-multierror/multierror.go +++ /dev/null @@ -1,121 +0,0 @@ -package multierror - -import ( - "errors" - "fmt" -) - -// Error is an error type to track multiple errors. This is used to -// accumulate errors in cases and return them as a single "error". -type Error struct { - Errors []error - ErrorFormat ErrorFormatFunc -} - -func (e *Error) Error() string { - fn := e.ErrorFormat - if fn == nil { - fn = ListFormatFunc - } - - return fn(e.Errors) -} - -// ErrorOrNil returns an error interface if this Error represents -// a list of errors, or returns nil if the list of errors is empty. This -// function is useful at the end of accumulation to make sure that the value -// returned represents the existence of errors. -func (e *Error) ErrorOrNil() error { - if e == nil { - return nil - } - if len(e.Errors) == 0 { - return nil - } - - return e -} - -func (e *Error) GoString() string { - return fmt.Sprintf("*%#v", *e) -} - -// WrappedErrors returns the list of errors that this Error is wrapping. It is -// an implementation of the errwrap.Wrapper interface so that multierror.Error -// can be used with that library. -// -// This method is not safe to be called concurrently. Unlike accessing the -// Errors field directly, this function also checks if the multierror is nil to -// prevent a null-pointer panic. It satisfies the errwrap.Wrapper interface. -func (e *Error) WrappedErrors() []error { - if e == nil { - return nil - } - return e.Errors -} - -// Unwrap returns an error from Error (or nil if there are no errors). -// This error returned will further support Unwrap to get the next error, -// etc. The order will match the order of Errors in the multierror.Error -// at the time of calling. -// -// The resulting error supports errors.As/Is/Unwrap so you can continue -// to use the stdlib errors package to introspect further. -// -// This will perform a shallow copy of the errors slice. Any errors appended -// to this error after calling Unwrap will not be available until a new -// Unwrap is called on the multierror.Error. -func (e *Error) Unwrap() error { - // If we have no errors then we do nothing - if e == nil || len(e.Errors) == 0 { - return nil - } - - // If we have exactly one error, we can just return that directly. - if len(e.Errors) == 1 { - return e.Errors[0] - } - - // Shallow copy the slice - errs := make([]error, len(e.Errors)) - copy(errs, e.Errors) - return chain(errs) -} - -// chain implements the interfaces necessary for errors.Is/As/Unwrap to -// work in a deterministic way with multierror. A chain tracks a list of -// errors while accounting for the current represented error. This lets -// Is/As be meaningful. -// -// Unwrap returns the next error. In the cleanest form, Unwrap would return -// the wrapped error here but we can't do that if we want to properly -// get access to all the errors. Instead, users are recommended to use -// Is/As to get the correct error type out. -// -// Precondition: []error is non-empty (len > 0) -type chain []error - -// Error implements the error interface -func (e chain) Error() string { - return e[0].Error() -} - -// Unwrap implements errors.Unwrap by returning the next error in the -// chain or nil if there are no more errors. -func (e chain) Unwrap() error { - if len(e) == 1 { - return nil - } - - return e[1:] -} - -// As implements errors.As by attempting to map to the current value. -func (e chain) As(target interface{}) bool { - return errors.As(e[0], target) -} - -// Is implements errors.Is by comparing the current value directly. -func (e chain) Is(target error) bool { - return errors.Is(e[0], target) -} diff --git a/vendor/github.com/hashicorp/go-multierror/prefix.go b/vendor/github.com/hashicorp/go-multierror/prefix.go deleted file mode 100644 index 5c477abe44f..00000000000 --- a/vendor/github.com/hashicorp/go-multierror/prefix.go +++ /dev/null @@ -1,37 +0,0 @@ -package multierror - -import ( - "fmt" - - "github.com/hashicorp/errwrap" -) - -// Prefix is a helper function that will prefix some text -// to the given error. If the error is a multierror.Error, then -// it will be prefixed to each wrapped error. -// -// This is useful to use when appending multiple multierrors -// together in order to give better scoping. -func Prefix(err error, prefix string) error { - if err == nil { - return nil - } - - format := fmt.Sprintf("%s {{err}}", prefix) - switch err := err.(type) { - case *Error: - // Typed nils can reach here, so initialize if we are nil - if err == nil { - err = new(Error) - } - - // Wrap each of the errors - for i, e := range err.Errors { - err.Errors[i] = errwrap.Wrapf(format, e) - } - - return err - default: - return errwrap.Wrapf(format, err) - } -} diff --git a/vendor/github.com/hashicorp/go-multierror/sort.go b/vendor/github.com/hashicorp/go-multierror/sort.go deleted file mode 100644 index fecb14e81c5..00000000000 --- a/vendor/github.com/hashicorp/go-multierror/sort.go +++ /dev/null @@ -1,16 +0,0 @@ -package multierror - -// Len implements sort.Interface function for length -func (err Error) Len() int { - return len(err.Errors) -} - -// Swap implements sort.Interface function for swapping elements -func (err Error) Swap(i, j int) { - err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i] -} - -// Less implements sort.Interface function for determining order -func (err Error) Less(i, j int) bool { - return err.Errors[i].Error() < err.Errors[j].Error() -} diff --git a/vendor/github.com/hashicorp/go-rootcerts/.travis.yml b/vendor/github.com/hashicorp/go-rootcerts/.travis.yml deleted file mode 100644 index 80e1de44e96..00000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -sudo: false - -language: go - -go: - - 1.6 - -branches: - only: - - master - -script: make test diff --git a/vendor/github.com/hashicorp/go-rootcerts/LICENSE b/vendor/github.com/hashicorp/go-rootcerts/LICENSE deleted file mode 100644 index e87a115e462..00000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/LICENSE +++ /dev/null @@ -1,363 +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/go-rootcerts/Makefile b/vendor/github.com/hashicorp/go-rootcerts/Makefile deleted file mode 100644 index c3989e789f6..00000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -TEST?=./... - -test: - go test $(TEST) $(TESTARGS) -timeout=3s -parallel=4 - go vet $(TEST) - go test $(TEST) -race - -.PHONY: test diff --git a/vendor/github.com/hashicorp/go-rootcerts/README.md b/vendor/github.com/hashicorp/go-rootcerts/README.md deleted file mode 100644 index 6a128e1e14a..00000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# rootcerts - -Functions for loading root certificates for TLS connections. - ------ - -Go's standard library `crypto/tls` provides a common mechanism for configuring -TLS connections in `tls.Config`. The `RootCAs` field on this struct is a pool -of certificates for the client to use as a trust store when verifying server -certificates. - -This library contains utility functions for loading certificates destined for -that field, as well as one other important thing: - -When the `RootCAs` field is `nil`, the standard library attempts to load the -host's root CA set. This behavior is OS-specific, and the Darwin -implementation contains [a bug that prevents trusted certificates from the -System and Login keychains from being loaded][1]. This library contains -Darwin-specific behavior that works around that bug. - -[1]: https://github.com/golang/go/issues/14514 - -## Example Usage - -Here's a snippet demonstrating how this library is meant to be used: - -```go -func httpClient() (*http.Client, error) - tlsConfig := &tls.Config{} - err := rootcerts.ConfigureTLS(tlsConfig, &rootcerts.Config{ - CAFile: os.Getenv("MYAPP_CAFILE"), - CAPath: os.Getenv("MYAPP_CAPATH"), - Certificate: os.Getenv("MYAPP_CERTIFICATE"), - }) - if err != nil { - return nil, err - } - c := cleanhttp.DefaultClient() - t := cleanhttp.DefaultTransport() - t.TLSClientConfig = tlsConfig - c.Transport = t - return c, nil -} -``` diff --git a/vendor/github.com/hashicorp/go-rootcerts/doc.go b/vendor/github.com/hashicorp/go-rootcerts/doc.go deleted file mode 100644 index b55cc628485..00000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Package rootcerts contains functions to aid in loading CA certificates for -// TLS connections. -// -// In addition, its default behavior on Darwin works around an open issue [1] -// in Go's crypto/x509 that prevents certicates from being loaded from the -// System or Login keychains. -// -// [1] https://github.com/golang/go/issues/14514 -package rootcerts diff --git a/vendor/github.com/hashicorp/go-rootcerts/rootcerts.go b/vendor/github.com/hashicorp/go-rootcerts/rootcerts.go deleted file mode 100644 index 69aabd6bc74..00000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/rootcerts.go +++ /dev/null @@ -1,123 +0,0 @@ -package rootcerts - -import ( - "crypto/tls" - "crypto/x509" - "errors" - "fmt" - "io/ioutil" - "os" - "path/filepath" -) - -// Config determines where LoadCACerts will load certificates from. When CAFile, -// CACertificate and CAPath are blank, this library's functions will either load -// system roots explicitly and return them, or set the CertPool to nil to allow -// Go's standard library to load system certs. -type Config struct { - // CAFile is a path to a PEM-encoded certificate file or bundle. Takes - // precedence over CACertificate and CAPath. - CAFile string - - // CACertificate is a PEM-encoded certificate or bundle. Takes precedence - // over CAPath. - CACertificate []byte - - // CAPath is a path to a directory populated with PEM-encoded certificates. - CAPath string -} - -// ConfigureTLS sets up the RootCAs on the provided tls.Config based on the -// Config specified. -func ConfigureTLS(t *tls.Config, c *Config) error { - if t == nil { - return nil - } - pool, err := LoadCACerts(c) - if err != nil { - return err - } - t.RootCAs = pool - return nil -} - -// LoadCACerts loads a CertPool based on the Config specified. -func LoadCACerts(c *Config) (*x509.CertPool, error) { - if c == nil { - c = &Config{} - } - if c.CAFile != "" { - return LoadCAFile(c.CAFile) - } - if len(c.CACertificate) != 0 { - return AppendCertificate(c.CACertificate) - } - if c.CAPath != "" { - return LoadCAPath(c.CAPath) - } - - return LoadSystemCAs() -} - -// LoadCAFile loads a single PEM-encoded file from the path specified. -func LoadCAFile(caFile string) (*x509.CertPool, error) { - pool := x509.NewCertPool() - - pem, err := ioutil.ReadFile(caFile) - if err != nil { - return nil, fmt.Errorf("Error loading CA File: %s", err) - } - - ok := pool.AppendCertsFromPEM(pem) - if !ok { - return nil, fmt.Errorf("Error loading CA File: Couldn't parse PEM in: %s", caFile) - } - - return pool, nil -} - -// AppendCertificate appends an in-memory PEM-encoded certificate or bundle and returns a pool. -func AppendCertificate(ca []byte) (*x509.CertPool, error) { - pool := x509.NewCertPool() - - ok := pool.AppendCertsFromPEM(ca) - if !ok { - return nil, errors.New("Error appending CA: Couldn't parse PEM") - } - - return pool, nil -} - -// LoadCAPath walks the provided path and loads all certificates encounted into -// a pool. -func LoadCAPath(caPath string) (*x509.CertPool, error) { - pool := x509.NewCertPool() - walkFn := func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - - if info.IsDir() { - return nil - } - - pem, err := ioutil.ReadFile(path) - if err != nil { - return fmt.Errorf("Error loading file from CAPath: %s", err) - } - - ok := pool.AppendCertsFromPEM(pem) - if !ok { - return fmt.Errorf("Error loading CA Path: Couldn't parse PEM in: %s", path) - } - - return nil - } - - err := filepath.Walk(caPath, walkFn) - if err != nil { - return nil, err - } - - return pool, nil -} diff --git a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go b/vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go deleted file mode 100644 index 66b1472c4a0..00000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build !darwin - -package rootcerts - -import "crypto/x509" - -// LoadSystemCAs does nothing on non-Darwin systems. We return nil so that -// default behavior of standard TLS config libraries is triggered, which is to -// load system certs. -func LoadSystemCAs() (*x509.CertPool, error) { - return nil, nil -} diff --git a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go b/vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go deleted file mode 100644 index a9a040657fe..00000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go +++ /dev/null @@ -1,48 +0,0 @@ -package rootcerts - -import ( - "crypto/x509" - "os/exec" - "path" - - "github.com/mitchellh/go-homedir" -) - -// LoadSystemCAs has special behavior on Darwin systems to work around -func LoadSystemCAs() (*x509.CertPool, error) { - pool := x509.NewCertPool() - - for _, keychain := range certKeychains() { - err := addCertsFromKeychain(pool, keychain) - if err != nil { - return nil, err - } - } - - return pool, nil -} - -func addCertsFromKeychain(pool *x509.CertPool, keychain string) error { - cmd := exec.Command("/usr/bin/security", "find-certificate", "-a", "-p", keychain) - data, err := cmd.Output() - if err != nil { - return err - } - - pool.AppendCertsFromPEM(data) - - return nil -} - -func certKeychains() []string { - keychains := []string{ - "/System/Library/Keychains/SystemRootCertificates.keychain", - "/Library/Keychains/System.keychain", - } - home, err := homedir.Dir() - if err == nil { - loginKeychain := path.Join(home, "Library", "Keychains", "login.keychain") - keychains = append(keychains, loginKeychain) - } - return keychains -} diff --git a/vendor/github.com/hashicorp/golang-lru/LICENSE b/vendor/github.com/hashicorp/golang-lru/LICENSE deleted file mode 100644 index be2cc4dfb60..00000000000 --- 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/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go deleted file mode 100644 index a86c8539e06..00000000000 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go +++ /dev/null @@ -1,177 +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{}) (evicted 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) - if ent.Value.(*entry) == nil { - return nil, false - } - return ent.Value.(*entry).value, true - } - return -} - -// Contains checks 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 -} - -// Peek 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) { - var ent *list.Element - 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{}) (present 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() (key interface{}, value interface{}, ok 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() (key interface{}, value interface{}, ok 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() -} - -// Resize changes the cache size. -func (c *LRU) Resize(size int) (evicted int) { - diff := c.Len() - size - if diff < 0 { - diff = 0 - } - for i := 0; i < diff; i++ { - c.removeOldest() - } - c.size = size - return diff -} - -// 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/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go deleted file mode 100644 index 92d70934d63..00000000000 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go +++ /dev/null @@ -1,39 +0,0 @@ -package simplelru - -// LRUCache is the interface for simple LRU cache. -type LRUCache interface { - // Adds a value to the cache, returns true if an eviction occurred and - // updates the "recently used"-ness of the key. - Add(key, value interface{}) bool - - // Returns key's value from the cache and - // updates the "recently used"-ness of the key. #value, isFound - Get(key interface{}) (value interface{}, ok bool) - - // Checks if a key exists in cache without updating the recent-ness. - Contains(key interface{}) (ok bool) - - // Returns key's value without updating the "recently used"-ness of the key. - Peek(key interface{}) (value interface{}, ok bool) - - // Removes a key from the cache. - Remove(key interface{}) bool - - // Removes the oldest entry from cache. - RemoveOldest() (interface{}, interface{}, bool) - - // Returns the oldest entry from the cache. #key, value, isFound - GetOldest() (interface{}, interface{}, bool) - - // Returns a slice of the keys in the cache, from oldest to newest. - Keys() []interface{} - - // Returns the number of items in the cache. - Len() int - - // Clears all cache entries. - Purge() - - // Resizes cache, returning number evicted - Resize(int) int -} diff --git a/vendor/github.com/hashicorp/hcl/decoder.go b/vendor/github.com/hashicorp/hcl/decoder.go index bed9ebbe141..d9a00f21d45 100644 --- a/vendor/github.com/hashicorp/hcl/decoder.go +++ b/vendor/github.com/hashicorp/hcl/decoder.go @@ -505,7 +505,7 @@ func expandObject(node ast.Node, result reflect.Value) ast.Node { // we need to un-flatten the ast enough to decode newNode := &ast.ObjectItem{ Keys: []*ast.ObjectKey{ - &ast.ObjectKey{ + { Token: keyToken, }, }, @@ -628,6 +628,24 @@ func (d *decoder) decodeStruct(name string, node ast.Node, result reflect.Value) decodedFields := make([]string, 0, len(fields)) decodedFieldsVal := make([]reflect.Value, 0) unusedKeysVal := make([]reflect.Value, 0) + + // fill unusedNodeKeys with keys from the AST + // a slice because we have to do equals case fold to match Filter + unusedNodeKeys := make(map[string][]token.Pos, 0) + for i, item := range list.Items { + for _, k := range item.Keys { + // isNestedJSON returns true for e.g. bar in + // { "foo": { "bar": {...} } } + // This isn't an unused node key, so we want to skip it + isNestedJSON := i > 0 && len(item.Keys) > 1 + if !isNestedJSON && (k.Token.JSON || k.Token.Type == token.IDENT) { + fn := k.Token.Value().(string) + sl := unusedNodeKeys[fn] + unusedNodeKeys[fn] = append(sl, k.Token.Pos) + } + } + } + for _, f := range fields { field, fieldValue := f.field, f.val if !fieldValue.IsValid() { @@ -661,7 +679,7 @@ func (d *decoder) decodeStruct(name string, node ast.Node, result reflect.Value) fieldValue.SetString(item.Keys[0].Token.Value().(string)) continue - case "unusedKeys": + case "unusedKeyPositions": unusedKeysVal = append(unusedKeysVal, fieldValue) continue } @@ -682,8 +700,9 @@ func (d *decoder) decodeStruct(name string, node ast.Node, result reflect.Value) continue } - // Track the used key + // Track the used keys usedKeys[fieldName] = struct{}{} + unusedNodeKeys = removeCaseFold(unusedNodeKeys, fieldName) // Create the field name and decode. We range over the elements // because we actually want the value. @@ -716,6 +735,13 @@ func (d *decoder) decodeStruct(name string, node ast.Node, result reflect.Value) } } + if len(unusedNodeKeys) > 0 { + // like decodedFields, populated the unusedKeys field(s) + for _, v := range unusedKeysVal { + v.Set(reflect.ValueOf(unusedNodeKeys)) + } + } + return nil } @@ -727,3 +753,17 @@ func findNodeType() reflect.Type { value := reflect.ValueOf(nodeContainer).FieldByName("Node") return value.Type() } + +func removeCaseFold(xs map[string][]token.Pos, y string) map[string][]token.Pos { + var toDel []string + + for i := range xs { + if strings.EqualFold(i, y) { + toDel = append(toDel, i) + } + } + for _, i := range toDel { + delete(xs, i) + } + return xs +} diff --git a/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go b/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go index 6e5ef654bb8..f5b6b93b94b 100644 --- a/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go +++ b/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go @@ -25,6 +25,8 @@ func (ObjectType) node() {} func (LiteralType) node() {} func (ListType) node() {} +var unknownPos token.Pos + // File represents a single HCL file type File struct { Node Node // usually a *ObjectList @@ -108,7 +110,12 @@ func (o *ObjectList) Elem() *ObjectList { } func (o *ObjectList) Pos() token.Pos { - // always returns the uninitiliazed position + // If an Object has no members, it won't have a first item + // to use as position + if len(o.Items) == 0 { + return unknownPos + } + // Return the uninitialized position return o.Items[0].Pos() } @@ -133,10 +140,10 @@ type ObjectItem struct { } func (o *ObjectItem) Pos() token.Pos { - // I'm not entirely sure what causes this, but removing this causes - // a test failure. We should investigate at some point. + // If a parsed object has no keys, there is no position + // for its first element. if len(o.Keys) == 0 { - return token.Pos{} + return unknownPos } return o.Keys[0].Pos() diff --git a/vendor/github.com/hashicorp/serf/LICENSE b/vendor/github.com/hashicorp/serf/LICENSE deleted file mode 100644 index c33dcc7c928..00000000000 --- a/vendor/github.com/hashicorp/serf/LICENSE +++ /dev/null @@ -1,354 +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/serf/coordinate/client.go b/vendor/github.com/hashicorp/serf/coordinate/client.go deleted file mode 100644 index 32124a73a20..00000000000 --- a/vendor/github.com/hashicorp/serf/coordinate/client.go +++ /dev/null @@ -1,243 +0,0 @@ -package coordinate - -import ( - "fmt" - "math" - "sort" - "sync" - "time" - - "github.com/armon/go-metrics" -) - -// Client manages the estimated network coordinate for a given node, and adjusts -// it as the node observes round trip times and estimated coordinates from other -// nodes. The core algorithm is based on Vivaldi, see the documentation for Config -// for more details. -type Client struct { - // coord is the current estimate of the client's network coordinate. - coord *Coordinate - - // origin is a coordinate sitting at the origin. - origin *Coordinate - - // config contains the tuning parameters that govern the performance of - // the algorithm. - config *Config - - // adjustmentIndex is the current index into the adjustmentSamples slice. - adjustmentIndex uint - - // adjustment is used to store samples for the adjustment calculation. - adjustmentSamples []float64 - - // latencyFilterSamples is used to store the last several RTT samples, - // keyed by node name. We will use the config's LatencyFilterSamples - // value to determine how many samples we keep, per node. - latencyFilterSamples map[string][]float64 - - // stats is used to record events that occur when updating coordinates. - stats ClientStats - - // mutex enables safe concurrent access to the client. - mutex sync.RWMutex -} - -// ClientStats is used to record events that occur when updating coordinates. -type ClientStats struct { - // Resets is incremented any time we reset our local coordinate because - // our calculations have resulted in an invalid state. - Resets int -} - -// NewClient creates a new Client and verifies the configuration is valid. -func NewClient(config *Config) (*Client, error) { - if !(config.Dimensionality > 0) { - return nil, fmt.Errorf("dimensionality must be >0") - } - - return &Client{ - coord: NewCoordinate(config), - origin: NewCoordinate(config), - config: config, - adjustmentIndex: 0, - adjustmentSamples: make([]float64, config.AdjustmentWindowSize), - latencyFilterSamples: make(map[string][]float64), - }, nil -} - -// GetCoordinate returns a copy of the coordinate for this client. -func (c *Client) GetCoordinate() *Coordinate { - c.mutex.RLock() - defer c.mutex.RUnlock() - - return c.coord.Clone() -} - -// SetCoordinate forces the client's coordinate to a known state. -func (c *Client) SetCoordinate(coord *Coordinate) error { - c.mutex.Lock() - defer c.mutex.Unlock() - - if err := c.checkCoordinate(coord); err != nil { - return err - } - - c.coord = coord.Clone() - return nil -} - -// ForgetNode removes any client state for the given node. -func (c *Client) ForgetNode(node string) { - c.mutex.Lock() - defer c.mutex.Unlock() - - delete(c.latencyFilterSamples, node) -} - -// Stats returns a copy of stats for the client. -func (c *Client) Stats() ClientStats { - c.mutex.Lock() - defer c.mutex.Unlock() - - return c.stats -} - -// checkCoordinate returns an error if the coordinate isn't compatible with -// this client, or if the coordinate itself isn't valid. This assumes the mutex -// has been locked already. -func (c *Client) checkCoordinate(coord *Coordinate) error { - if !c.coord.IsCompatibleWith(coord) { - return fmt.Errorf("dimensions aren't compatible") - } - - if !coord.IsValid() { - return fmt.Errorf("coordinate is invalid") - } - - return nil -} - -// latencyFilter applies a simple moving median filter with a new sample for -// a node. This assumes that the mutex has been locked already. -func (c *Client) latencyFilter(node string, rttSeconds float64) float64 { - samples, ok := c.latencyFilterSamples[node] - if !ok { - samples = make([]float64, 0, c.config.LatencyFilterSize) - } - - // Add the new sample and trim the list, if needed. - samples = append(samples, rttSeconds) - if len(samples) > int(c.config.LatencyFilterSize) { - samples = samples[1:] - } - c.latencyFilterSamples[node] = samples - - // Sort a copy of the samples and return the median. - sorted := make([]float64, len(samples)) - copy(sorted, samples) - sort.Float64s(sorted) - return sorted[len(sorted)/2] -} - -// updateVivialdi updates the Vivaldi portion of the client's coordinate. This -// assumes that the mutex has been locked already. -func (c *Client) updateVivaldi(other *Coordinate, rttSeconds float64) { - const zeroThreshold = 1.0e-6 - - dist := c.coord.DistanceTo(other).Seconds() - if rttSeconds < zeroThreshold { - rttSeconds = zeroThreshold - } - wrongness := math.Abs(dist-rttSeconds) / rttSeconds - - totalError := c.coord.Error + other.Error - if totalError < zeroThreshold { - totalError = zeroThreshold - } - weight := c.coord.Error / totalError - - c.coord.Error = c.config.VivaldiCE*weight*wrongness + c.coord.Error*(1.0-c.config.VivaldiCE*weight) - if c.coord.Error > c.config.VivaldiErrorMax { - c.coord.Error = c.config.VivaldiErrorMax - } - - delta := c.config.VivaldiCC * weight - force := delta * (rttSeconds - dist) - c.coord = c.coord.ApplyForce(c.config, force, other) -} - -// updateAdjustment updates the adjustment portion of the client's coordinate, if -// the feature is enabled. This assumes that the mutex has been locked already. -func (c *Client) updateAdjustment(other *Coordinate, rttSeconds float64) { - if c.config.AdjustmentWindowSize == 0 { - return - } - - // Note that the existing adjustment factors don't figure in to this - // calculation so we use the raw distance here. - dist := c.coord.rawDistanceTo(other) - c.adjustmentSamples[c.adjustmentIndex] = rttSeconds - dist - c.adjustmentIndex = (c.adjustmentIndex + 1) % c.config.AdjustmentWindowSize - - sum := 0.0 - for _, sample := range c.adjustmentSamples { - sum += sample - } - c.coord.Adjustment = sum / (2.0 * float64(c.config.AdjustmentWindowSize)) -} - -// updateGravity applies a small amount of gravity to pull coordinates towards -// the center of the coordinate system to combat drift. This assumes that the -// mutex is locked already. -func (c *Client) updateGravity() { - dist := c.origin.DistanceTo(c.coord).Seconds() - force := -1.0 * math.Pow(dist/c.config.GravityRho, 2.0) - c.coord = c.coord.ApplyForce(c.config, force, c.origin) -} - -// Update takes other, a coordinate for another node, and rtt, a round trip -// time observation for a ping to that node, and updates the estimated position of -// the client's coordinate. Returns the updated coordinate. -func (c *Client) Update(node string, other *Coordinate, rtt time.Duration) (*Coordinate, error) { - c.mutex.Lock() - defer c.mutex.Unlock() - - if err := c.checkCoordinate(other); err != nil { - return nil, err - } - - // The code down below can handle zero RTTs, which we have seen in - // https://github.com/hashicorp/consul/issues/3789, presumably in - // environments with coarse-grained monotonic clocks (we are still - // trying to pin this down). In any event, this is ok from a code PoV - // so we don't need to alert operators with spammy messages. We did - // add a counter so this is still observable, though. - const maxRTT = 10 * time.Second - if rtt < 0 || rtt > maxRTT { - return nil, fmt.Errorf("round trip time not in valid range, duration %v is not a positive value less than %v ", rtt, maxRTT) - } - if rtt == 0 { - metrics.IncrCounterWithLabels([]string{"serf", "coordinate", "zero-rtt"}, 1, c.config.MetricLabels) - } - - rttSeconds := c.latencyFilter(node, rtt.Seconds()) - c.updateVivaldi(other, rttSeconds) - c.updateAdjustment(other, rttSeconds) - c.updateGravity() - if !c.coord.IsValid() { - c.stats.Resets++ - c.coord = NewCoordinate(c.config) - } - - return c.coord.Clone(), nil -} - -// DistanceTo returns the estimated RTT from the client's coordinate to other, the -// coordinate for another node. -func (c *Client) DistanceTo(other *Coordinate) time.Duration { - c.mutex.RLock() - defer c.mutex.RUnlock() - - return c.coord.DistanceTo(other) -} diff --git a/vendor/github.com/hashicorp/serf/coordinate/config.go b/vendor/github.com/hashicorp/serf/coordinate/config.go deleted file mode 100644 index 09c0cafe830..00000000000 --- a/vendor/github.com/hashicorp/serf/coordinate/config.go +++ /dev/null @@ -1,77 +0,0 @@ -package coordinate - -import ( - "github.com/armon/go-metrics" -) - -// Config is used to set the parameters of the Vivaldi-based coordinate mapping -// algorithm. -// -// The following references are called out at various points in the documentation -// here: -// -// [1] Dabek, Frank, et al. "Vivaldi: A decentralized network coordinate system." -// ACM SIGCOMM Computer Communication Review. Vol. 34. No. 4. ACM, 2004. -// [2] Ledlie, Jonathan, Paul Gardner, and Margo I. Seltzer. "Network Coordinates -// in the Wild." NSDI. Vol. 7. 2007. -// [3] Lee, Sanghwan, et al. "On suitability of Euclidean embedding for -// host-based network coordinate systems." Networking, IEEE/ACM Transactions -// on 18.1 (2010): 27-40. -type Config struct { - // The dimensionality of the coordinate system. As discussed in [2], more - // dimensions improves the accuracy of the estimates up to a point. Per [2] - // we chose 8 dimensions plus a non-Euclidean height. - Dimensionality uint - - // VivaldiErrorMax is the default error value when a node hasn't yet made - // any observations. It also serves as an upper limit on the error value in - // case observations cause the error value to increase without bound. - VivaldiErrorMax float64 - - // VivaldiCE is a tuning factor that controls the maximum impact an - // observation can have on a node's confidence. See [1] for more details. - VivaldiCE float64 - - // VivaldiCC is a tuning factor that controls the maximum impact an - // observation can have on a node's coordinate. See [1] for more details. - VivaldiCC float64 - - // AdjustmentWindowSize is a tuning factor that determines how many samples - // we retain to calculate the adjustment factor as discussed in [3]. Setting - // this to zero disables this feature. - AdjustmentWindowSize uint - - // HeightMin is the minimum value of the height parameter. Since this - // always must be positive, it will introduce a small amount error, so - // the chosen value should be relatively small compared to "normal" - // coordinates. - HeightMin float64 - - // LatencyFilterSamples is the maximum number of samples that are retained - // per node, in order to compute a median. The intent is to ride out blips - // but still keep the delay low, since our time to probe any given node is - // pretty infrequent. See [2] for more details. - LatencyFilterSize uint - - // GravityRho is a tuning factor that sets how much gravity has an effect - // to try to re-center coordinates. See [2] for more details. - GravityRho float64 - - // metricLabels is the slice of labels to put on all emitted metrics - MetricLabels []metrics.Label -} - -// DefaultConfig returns a Config that has some default values suitable for -// basic testing of the algorithm, but not tuned to any particular type of cluster. -func DefaultConfig() *Config { - return &Config{ - Dimensionality: 8, - VivaldiErrorMax: 1.5, - VivaldiCE: 0.25, - VivaldiCC: 0.25, - AdjustmentWindowSize: 20, - HeightMin: 10.0e-6, - LatencyFilterSize: 3, - GravityRho: 150.0, - } -} diff --git a/vendor/github.com/hashicorp/serf/coordinate/coordinate.go b/vendor/github.com/hashicorp/serf/coordinate/coordinate.go deleted file mode 100644 index fbe792c90d4..00000000000 --- a/vendor/github.com/hashicorp/serf/coordinate/coordinate.go +++ /dev/null @@ -1,203 +0,0 @@ -package coordinate - -import ( - "math" - "math/rand" - "time" -) - -// Coordinate is a specialized structure for holding network coordinates for the -// Vivaldi-based coordinate mapping algorithm. All of the fields should be public -// to enable this to be serialized. All values in here are in units of seconds. -type Coordinate struct { - // Vec is the Euclidean portion of the coordinate. This is used along - // with the other fields to provide an overall distance estimate. The - // units here are seconds. - Vec []float64 - - // Err reflects the confidence in the given coordinate and is updated - // dynamically by the Vivaldi Client. This is dimensionless. - Error float64 - - // Adjustment is a distance offset computed based on a calculation over - // observations from all other nodes over a fixed window and is updated - // dynamically by the Vivaldi Client. The units here are seconds. - Adjustment float64 - - // Height is a distance offset that accounts for non-Euclidean effects - // which model the access links from nodes to the core Internet. The access - // links are usually set by bandwidth and congestion, and the core links - // usually follow distance based on geography. - Height float64 -} - -const ( - // secondsToNanoseconds is used to convert float seconds to nanoseconds. - secondsToNanoseconds = 1.0e9 - - // zeroThreshold is used to decide if two coordinates are on top of each - // other. - zeroThreshold = 1.0e-6 -) - -// ErrDimensionalityConflict will be panic-d if you try to perform operations -// with incompatible dimensions. -type DimensionalityConflictError struct{} - -// Adds the error interface. -func (e DimensionalityConflictError) Error() string { - return "coordinate dimensionality does not match" -} - -// NewCoordinate creates a new coordinate at the origin, using the given config -// to supply key initial values. -func NewCoordinate(config *Config) *Coordinate { - return &Coordinate{ - Vec: make([]float64, config.Dimensionality), - Error: config.VivaldiErrorMax, - Adjustment: 0.0, - Height: config.HeightMin, - } -} - -// Clone creates an independent copy of this coordinate. -func (c *Coordinate) Clone() *Coordinate { - vec := make([]float64, len(c.Vec)) - copy(vec, c.Vec) - return &Coordinate{ - Vec: vec, - Error: c.Error, - Adjustment: c.Adjustment, - Height: c.Height, - } -} - -// componentIsValid returns false if a floating point value is a NaN or an -// infinity. -func componentIsValid(f float64) bool { - return !math.IsInf(f, 0) && !math.IsNaN(f) -} - -// IsValid returns false if any component of a coordinate isn't valid, per the -// componentIsValid() helper above. -func (c *Coordinate) IsValid() bool { - for i := range c.Vec { - if !componentIsValid(c.Vec[i]) { - return false - } - } - - return componentIsValid(c.Error) && - componentIsValid(c.Adjustment) && - componentIsValid(c.Height) -} - -// IsCompatibleWith checks to see if the two coordinates are compatible -// dimensionally. If this returns true then you are guaranteed to not get -// any runtime errors operating on them. -func (c *Coordinate) IsCompatibleWith(other *Coordinate) bool { - return len(c.Vec) == len(other.Vec) -} - -// ApplyForce returns the result of applying the force from the direction of the -// other coordinate. -func (c *Coordinate) ApplyForce(config *Config, force float64, other *Coordinate) *Coordinate { - if !c.IsCompatibleWith(other) { - panic(DimensionalityConflictError{}) - } - - ret := c.Clone() - unit, mag := unitVectorAt(c.Vec, other.Vec) - ret.Vec = add(ret.Vec, mul(unit, force)) - if mag > zeroThreshold { - ret.Height = (ret.Height+other.Height)*force/mag + ret.Height - ret.Height = math.Max(ret.Height, config.HeightMin) - } - return ret -} - -// DistanceTo returns the distance between this coordinate and the other -// coordinate, including adjustments. -func (c *Coordinate) DistanceTo(other *Coordinate) time.Duration { - if !c.IsCompatibleWith(other) { - panic(DimensionalityConflictError{}) - } - - dist := c.rawDistanceTo(other) - adjustedDist := dist + c.Adjustment + other.Adjustment - if adjustedDist > 0.0 { - dist = adjustedDist - } - return time.Duration(dist * secondsToNanoseconds) -} - -// rawDistanceTo returns the Vivaldi distance between this coordinate and the -// other coordinate in seconds, not including adjustments. This assumes the -// dimensions have already been checked to be compatible. -func (c *Coordinate) rawDistanceTo(other *Coordinate) float64 { - return magnitude(diff(c.Vec, other.Vec)) + c.Height + other.Height -} - -// add returns the sum of vec1 and vec2. This assumes the dimensions have -// already been checked to be compatible. -func add(vec1 []float64, vec2 []float64) []float64 { - ret := make([]float64, len(vec1)) - for i := range ret { - ret[i] = vec1[i] + vec2[i] - } - return ret -} - -// diff returns the difference between the vec1 and vec2. This assumes the -// dimensions have already been checked to be compatible. -func diff(vec1 []float64, vec2 []float64) []float64 { - ret := make([]float64, len(vec1)) - for i := range ret { - ret[i] = vec1[i] - vec2[i] - } - return ret -} - -// mul returns vec multiplied by a scalar factor. -func mul(vec []float64, factor float64) []float64 { - ret := make([]float64, len(vec)) - for i := range vec { - ret[i] = vec[i] * factor - } - return ret -} - -// magnitude computes the magnitude of the vec. -func magnitude(vec []float64) float64 { - sum := 0.0 - for i := range vec { - sum += vec[i] * vec[i] - } - return math.Sqrt(sum) -} - -// unitVectorAt returns a unit vector pointing at vec1 from vec2. If the two -// positions are the same then a random unit vector is returned. We also return -// the distance between the points for use in the later height calculation. -func unitVectorAt(vec1 []float64, vec2 []float64) ([]float64, float64) { - ret := diff(vec1, vec2) - - // If the coordinates aren't on top of each other we can normalize. - if mag := magnitude(ret); mag > zeroThreshold { - return mul(ret, 1.0/mag), mag - } - - // Otherwise, just return a random unit vector. - for i := range ret { - ret[i] = rand.Float64() - 0.5 - } - if mag := magnitude(ret); mag > zeroThreshold { - return mul(ret, 1.0/mag), 0.0 - } - - // And finally just give up and make a unit vector along the first - // dimension. This should be exceedingly rare. - ret = make([]float64, len(ret)) - ret[0] = 1.0 - return ret, 0.0 -} diff --git a/vendor/github.com/hashicorp/serf/coordinate/phantom.go b/vendor/github.com/hashicorp/serf/coordinate/phantom.go deleted file mode 100644 index 66da4e2e92e..00000000000 --- a/vendor/github.com/hashicorp/serf/coordinate/phantom.go +++ /dev/null @@ -1,187 +0,0 @@ -package coordinate - -import ( - "fmt" - "math" - "math/rand" - "time" -) - -// GenerateClients returns a slice with nodes number of clients, all with the -// given config. -func GenerateClients(nodes int, config *Config) ([]*Client, error) { - clients := make([]*Client, nodes) - for i := range clients { - client, err := NewClient(config) - if err != nil { - return nil, err - } - - clients[i] = client - } - return clients, nil -} - -// GenerateLine returns a truth matrix as if all the nodes are in a straight linke -// with the given spacing between them. -func GenerateLine(nodes int, spacing time.Duration) [][]time.Duration { - truth := make([][]time.Duration, nodes) - for i := range truth { - truth[i] = make([]time.Duration, nodes) - } - - for i := 0; i < nodes; i++ { - for j := i + 1; j < nodes; j++ { - rtt := time.Duration(j-i) * spacing - truth[i][j], truth[j][i] = rtt, rtt - } - } - return truth -} - -// GenerateGrid returns a truth matrix as if all the nodes are in a two dimensional -// grid with the given spacing between them. -func GenerateGrid(nodes int, spacing time.Duration) [][]time.Duration { - truth := make([][]time.Duration, nodes) - for i := range truth { - truth[i] = make([]time.Duration, nodes) - } - - n := int(math.Sqrt(float64(nodes))) - for i := 0; i < nodes; i++ { - for j := i + 1; j < nodes; j++ { - x1, y1 := float64(i%n), float64(i/n) - x2, y2 := float64(j%n), float64(j/n) - dx, dy := x2-x1, y2-y1 - dist := math.Sqrt(dx*dx + dy*dy) - rtt := time.Duration(dist * float64(spacing)) - truth[i][j], truth[j][i] = rtt, rtt - } - } - return truth -} - -// GenerateSplit returns a truth matrix as if half the nodes are close together in -// one location and half the nodes are close together in another. The lan factor -// is used to separate the nodes locally and the wan factor represents the split -// between the two sides. -func GenerateSplit(nodes int, lan time.Duration, wan time.Duration) [][]time.Duration { - truth := make([][]time.Duration, nodes) - for i := range truth { - truth[i] = make([]time.Duration, nodes) - } - - split := nodes / 2 - for i := 0; i < nodes; i++ { - for j := i + 1; j < nodes; j++ { - rtt := lan - if (i <= split && j > split) || (i > split && j <= split) { - rtt += wan - } - truth[i][j], truth[j][i] = rtt, rtt - } - } - return truth -} - -// GenerateCircle returns a truth matrix for a set of nodes, evenly distributed -// around a circle with the given radius. The first node is at the "center" of the -// circle because it's equidistant from all the other nodes, but we place it at -// double the radius, so it should show up above all the other nodes in height. -func GenerateCircle(nodes int, radius time.Duration) [][]time.Duration { - truth := make([][]time.Duration, nodes) - for i := range truth { - truth[i] = make([]time.Duration, nodes) - } - - for i := 0; i < nodes; i++ { - for j := i + 1; j < nodes; j++ { - var rtt time.Duration - if i == 0 { - rtt = 2 * radius - } else { - t1 := 2.0 * math.Pi * float64(i) / float64(nodes) - x1, y1 := math.Cos(t1), math.Sin(t1) - t2 := 2.0 * math.Pi * float64(j) / float64(nodes) - x2, y2 := math.Cos(t2), math.Sin(t2) - dx, dy := x2-x1, y2-y1 - dist := math.Sqrt(dx*dx + dy*dy) - rtt = time.Duration(dist * float64(radius)) - } - truth[i][j], truth[j][i] = rtt, rtt - } - } - return truth -} - -// GenerateRandom returns a truth matrix for a set of nodes with normally -// distributed delays, with the given mean and deviation. The RNG is re-seeded -// so you always get the same matrix for a given size. -func GenerateRandom(nodes int, mean time.Duration, deviation time.Duration) [][]time.Duration { - rand.Seed(1) - - truth := make([][]time.Duration, nodes) - for i := range truth { - truth[i] = make([]time.Duration, nodes) - } - - for i := 0; i < nodes; i++ { - for j := i + 1; j < nodes; j++ { - rttSeconds := rand.NormFloat64()*deviation.Seconds() + mean.Seconds() - rtt := time.Duration(rttSeconds * secondsToNanoseconds) - truth[i][j], truth[j][i] = rtt, rtt - } - } - return truth -} - -// Simulate runs the given number of cycles using the given list of clients and -// truth matrix. On each cycle, each client will pick a random node and observe -// the truth RTT, updating its coordinate estimate. The RNG is re-seeded for -// each simulation run to get deterministic results (for this algorithm and the -// underlying algorithm which will use random numbers for position vectors when -// starting out with everything at the origin). -func Simulate(clients []*Client, truth [][]time.Duration, cycles int) { - rand.Seed(1) - - nodes := len(clients) - for cycle := 0; cycle < cycles; cycle++ { - for i := range clients { - if j := rand.Intn(nodes); j != i { - c := clients[j].GetCoordinate() - rtt := truth[i][j] - node := fmt.Sprintf("node_%d", j) - clients[i].Update(node, c, rtt) - } - } - } -} - -// Stats is returned from the Evaluate function with a summary of the algorithm -// performance. -type Stats struct { - ErrorMax float64 - ErrorAvg float64 -} - -// Evaluate uses the coordinates of the given clients to calculate estimated -// distances and compares them with the given truth matrix, returning summary -// stats. -func Evaluate(clients []*Client, truth [][]time.Duration) (stats Stats) { - nodes := len(clients) - count := 0 - for i := 0; i < nodes; i++ { - for j := i + 1; j < nodes; j++ { - est := clients[i].DistanceTo(clients[j].GetCoordinate()).Seconds() - actual := truth[i][j].Seconds() - error := math.Abs(est-actual) / actual - stats.ErrorMax = math.Max(stats.ErrorMax, error) - stats.ErrorAvg += error - count += 1 - } - } - - stats.ErrorAvg /= float64(count) - fmt.Printf("Error avg=%9.6f max=%9.6f\n", stats.ErrorAvg, stats.ErrorMax) - return -} diff --git a/vendor/github.com/kr/pretty/.gitignore b/vendor/github.com/kr/pretty/.gitignore deleted file mode 100644 index b2d47811f72..00000000000 --- a/vendor/github.com/kr/pretty/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -[568].out -_go* -_test* -_obj -/.idea diff --git a/vendor/github.com/kr/pretty/License b/vendor/github.com/kr/pretty/License deleted file mode 100644 index 480a3280599..00000000000 --- a/vendor/github.com/kr/pretty/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2012 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/pretty/Readme b/vendor/github.com/kr/pretty/Readme deleted file mode 100644 index c589fc622b3..00000000000 --- a/vendor/github.com/kr/pretty/Readme +++ /dev/null @@ -1,9 +0,0 @@ -package pretty - - import "github.com/kr/pretty" - - Package pretty provides pretty-printing for Go values. - -Documentation - - http://godoc.org/github.com/kr/pretty diff --git a/vendor/github.com/kr/pretty/diff.go b/vendor/github.com/kr/pretty/diff.go deleted file mode 100644 index 40a09dc6483..00000000000 --- a/vendor/github.com/kr/pretty/diff.go +++ /dev/null @@ -1,295 +0,0 @@ -package pretty - -import ( - "fmt" - "io" - "reflect" -) - -type sbuf []string - -func (p *sbuf) Printf(format string, a ...interface{}) { - s := fmt.Sprintf(format, a...) - *p = append(*p, s) -} - -// Diff returns a slice where each element describes -// a difference between a and b. -func Diff(a, b interface{}) (desc []string) { - Pdiff((*sbuf)(&desc), a, b) - return desc -} - -// wprintfer calls Fprintf on w for each Printf call -// with a trailing newline. -type wprintfer struct{ w io.Writer } - -func (p *wprintfer) Printf(format string, a ...interface{}) { - fmt.Fprintf(p.w, format+"\n", a...) -} - -// Fdiff writes to w a description of the differences between a and b. -func Fdiff(w io.Writer, a, b interface{}) { - Pdiff(&wprintfer{w}, a, b) -} - -type Printfer interface { - Printf(format string, a ...interface{}) -} - -// Pdiff prints to p a description of the differences between a and b. -// It calls Printf once for each difference, with no trailing newline. -// The standard library log.Logger is a Printfer. -func Pdiff(p Printfer, a, b interface{}) { - d := diffPrinter{ - w: p, - aVisited: make(map[visit]visit), - bVisited: make(map[visit]visit), - } - d.diff(reflect.ValueOf(a), reflect.ValueOf(b)) -} - -type Logfer interface { - Logf(format string, a ...interface{}) -} - -// logprintfer calls Fprintf on w for each Printf call -// with a trailing newline. -type logprintfer struct{ l Logfer } - -func (p *logprintfer) Printf(format string, a ...interface{}) { - p.l.Logf(format, a...) -} - -// Ldiff prints to l a description of the differences between a and b. -// It calls Logf once for each difference, with no trailing newline. -// The standard library testing.T and testing.B are Logfers. -func Ldiff(l Logfer, a, b interface{}) { - Pdiff(&logprintfer{l}, a, b) -} - -type diffPrinter struct { - w Printfer - l string // label - - aVisited map[visit]visit - bVisited map[visit]visit -} - -func (w diffPrinter) printf(f string, a ...interface{}) { - var l string - if w.l != "" { - l = w.l + ": " - } - w.w.Printf(l+f, a...) -} - -func (w diffPrinter) diff(av, bv reflect.Value) { - if !av.IsValid() && bv.IsValid() { - w.printf("nil != %# v", formatter{v: bv, quote: true}) - return - } - if av.IsValid() && !bv.IsValid() { - w.printf("%# v != nil", formatter{v: av, quote: true}) - return - } - if !av.IsValid() && !bv.IsValid() { - return - } - - at := av.Type() - bt := bv.Type() - if at != bt { - w.printf("%v != %v", at, bt) - return - } - - if av.CanAddr() && bv.CanAddr() { - avis := visit{av.UnsafeAddr(), at} - bvis := visit{bv.UnsafeAddr(), bt} - var cycle bool - - // Have we seen this value before? - if vis, ok := w.aVisited[avis]; ok { - cycle = true - if vis != bvis { - w.printf("%# v (previously visited) != %# v", formatter{v: av, quote: true}, formatter{v: bv, quote: true}) - } - } else if _, ok := w.bVisited[bvis]; ok { - cycle = true - w.printf("%# v != %# v (previously visited)", formatter{v: av, quote: true}, formatter{v: bv, quote: true}) - } - w.aVisited[avis] = bvis - w.bVisited[bvis] = avis - if cycle { - return - } - } - - switch kind := at.Kind(); kind { - case reflect.Bool: - if a, b := av.Bool(), bv.Bool(); a != b { - w.printf("%v != %v", a, b) - } - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - if a, b := av.Int(), bv.Int(); a != b { - w.printf("%d != %d", a, b) - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - if a, b := av.Uint(), bv.Uint(); a != b { - w.printf("%d != %d", a, b) - } - case reflect.Float32, reflect.Float64: - if a, b := av.Float(), bv.Float(); a != b { - w.printf("%v != %v", a, b) - } - case reflect.Complex64, reflect.Complex128: - if a, b := av.Complex(), bv.Complex(); a != b { - w.printf("%v != %v", a, b) - } - case reflect.Array: - n := av.Len() - for i := 0; i < n; i++ { - w.relabel(fmt.Sprintf("[%d]", i)).diff(av.Index(i), bv.Index(i)) - } - case reflect.Chan, reflect.Func, reflect.UnsafePointer: - if a, b := av.Pointer(), bv.Pointer(); a != b { - w.printf("%#x != %#x", a, b) - } - case reflect.Interface: - w.diff(av.Elem(), bv.Elem()) - case reflect.Map: - ak, both, bk := keyDiff(av.MapKeys(), bv.MapKeys()) - for _, k := range ak { - w := w.relabel(fmt.Sprintf("[%#v]", k)) - w.printf("%q != (missing)", av.MapIndex(k)) - } - for _, k := range both { - w := w.relabel(fmt.Sprintf("[%#v]", k)) - w.diff(av.MapIndex(k), bv.MapIndex(k)) - } - for _, k := range bk { - w := w.relabel(fmt.Sprintf("[%#v]", k)) - w.printf("(missing) != %q", bv.MapIndex(k)) - } - case reflect.Ptr: - switch { - case av.IsNil() && !bv.IsNil(): - w.printf("nil != %# v", formatter{v: bv, quote: true}) - case !av.IsNil() && bv.IsNil(): - w.printf("%# v != nil", formatter{v: av, quote: true}) - case !av.IsNil() && !bv.IsNil(): - w.diff(av.Elem(), bv.Elem()) - } - case reflect.Slice: - lenA := av.Len() - lenB := bv.Len() - if lenA != lenB { - w.printf("%s[%d] != %s[%d]", av.Type(), lenA, bv.Type(), lenB) - break - } - for i := 0; i < lenA; i++ { - w.relabel(fmt.Sprintf("[%d]", i)).diff(av.Index(i), bv.Index(i)) - } - case reflect.String: - if a, b := av.String(), bv.String(); a != b { - w.printf("%q != %q", a, b) - } - case reflect.Struct: - for i := 0; i < av.NumField(); i++ { - w.relabel(at.Field(i).Name).diff(av.Field(i), bv.Field(i)) - } - default: - panic("unknown reflect Kind: " + kind.String()) - } -} - -func (d diffPrinter) relabel(name string) (d1 diffPrinter) { - d1 = d - if d.l != "" && name[0] != '[' { - d1.l += "." - } - d1.l += name - return d1 -} - -// keyEqual compares a and b for equality. -// Both a and b must be valid map keys. -func keyEqual(av, bv reflect.Value) bool { - if !av.IsValid() && !bv.IsValid() { - return true - } - if !av.IsValid() || !bv.IsValid() || av.Type() != bv.Type() { - return false - } - switch kind := av.Kind(); kind { - case reflect.Bool: - a, b := av.Bool(), bv.Bool() - return a == b - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - a, b := av.Int(), bv.Int() - return a == b - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - a, b := av.Uint(), bv.Uint() - return a == b - case reflect.Float32, reflect.Float64: - a, b := av.Float(), bv.Float() - return a == b - case reflect.Complex64, reflect.Complex128: - a, b := av.Complex(), bv.Complex() - return a == b - case reflect.Array: - for i := 0; i < av.Len(); i++ { - if !keyEqual(av.Index(i), bv.Index(i)) { - return false - } - } - return true - case reflect.Chan, reflect.UnsafePointer, reflect.Ptr: - a, b := av.Pointer(), bv.Pointer() - return a == b - case reflect.Interface: - return keyEqual(av.Elem(), bv.Elem()) - case reflect.String: - a, b := av.String(), bv.String() - return a == b - case reflect.Struct: - for i := 0; i < av.NumField(); i++ { - if !keyEqual(av.Field(i), bv.Field(i)) { - return false - } - } - return true - default: - panic("invalid map key type " + av.Type().String()) - } -} - -func keyDiff(a, b []reflect.Value) (ak, both, bk []reflect.Value) { - for _, av := range a { - inBoth := false - for _, bv := range b { - if keyEqual(av, bv) { - inBoth = true - both = append(both, av) - break - } - } - if !inBoth { - ak = append(ak, av) - } - } - for _, bv := range b { - inBoth := false - for _, av := range a { - if keyEqual(av, bv) { - inBoth = true - break - } - } - if !inBoth { - bk = append(bk, bv) - } - } - return -} diff --git a/vendor/github.com/kr/pretty/formatter.go b/vendor/github.com/kr/pretty/formatter.go deleted file mode 100644 index 8e6969c5908..00000000000 --- a/vendor/github.com/kr/pretty/formatter.go +++ /dev/null @@ -1,355 +0,0 @@ -package pretty - -import ( - "fmt" - "io" - "reflect" - "strconv" - "text/tabwriter" - - "github.com/kr/text" - "github.com/rogpeppe/go-internal/fmtsort" -) - -type formatter struct { - v reflect.Value - force bool - quote bool -} - -// Formatter makes a wrapper, f, that will format x as go source with line -// breaks and tabs. Object f responds to the "%v" formatting verb when both the -// "#" and " " (space) flags are set, for example: -// -// fmt.Sprintf("%# v", Formatter(x)) -// -// If one of these two flags is not set, or any other verb is used, f will -// format x according to the usual rules of package fmt. -// In particular, if x satisfies fmt.Formatter, then x.Format will be called. -func Formatter(x interface{}) (f fmt.Formatter) { - return formatter{v: reflect.ValueOf(x), quote: true} -} - -func (fo formatter) String() string { - return fmt.Sprint(fo.v.Interface()) // unwrap it -} - -func (fo formatter) passThrough(f fmt.State, c rune) { - s := "%" - for i := 0; i < 128; i++ { - if f.Flag(i) { - s += string(rune(i)) - } - } - if w, ok := f.Width(); ok { - s += fmt.Sprintf("%d", w) - } - if p, ok := f.Precision(); ok { - s += fmt.Sprintf(".%d", p) - } - s += string(c) - fmt.Fprintf(f, s, fo.v.Interface()) -} - -func (fo formatter) Format(f fmt.State, c rune) { - if fo.force || c == 'v' && f.Flag('#') && f.Flag(' ') { - w := tabwriter.NewWriter(f, 4, 4, 1, ' ', 0) - p := &printer{tw: w, Writer: w, visited: make(map[visit]int)} - p.printValue(fo.v, true, fo.quote) - w.Flush() - return - } - fo.passThrough(f, c) -} - -type printer struct { - io.Writer - tw *tabwriter.Writer - visited map[visit]int - depth int -} - -func (p *printer) indent() *printer { - q := *p - q.tw = tabwriter.NewWriter(p.Writer, 4, 4, 1, ' ', 0) - q.Writer = text.NewIndentWriter(q.tw, []byte{'\t'}) - return &q -} - -func (p *printer) printInline(v reflect.Value, x interface{}, showType bool) { - if showType { - io.WriteString(p, v.Type().String()) - fmt.Fprintf(p, "(%#v)", x) - } else { - fmt.Fprintf(p, "%#v", x) - } -} - -// printValue must keep track of already-printed pointer values to avoid -// infinite recursion. -type visit struct { - v uintptr - typ reflect.Type -} - -func (p *printer) catchPanic(v reflect.Value, method string) { - if r := recover(); r != nil { - if v.Kind() == reflect.Ptr && v.IsNil() { - writeByte(p, '(') - io.WriteString(p, v.Type().String()) - io.WriteString(p, ")(nil)") - return - } - writeByte(p, '(') - io.WriteString(p, v.Type().String()) - io.WriteString(p, ")(PANIC=calling method ") - io.WriteString(p, strconv.Quote(method)) - io.WriteString(p, ": ") - fmt.Fprint(p, r) - writeByte(p, ')') - } -} - -func (p *printer) printValue(v reflect.Value, showType, quote bool) { - if p.depth > 10 { - io.WriteString(p, "!%v(DEPTH EXCEEDED)") - return - } - - if v.IsValid() && v.CanInterface() { - i := v.Interface() - if goStringer, ok := i.(fmt.GoStringer); ok { - defer p.catchPanic(v, "GoString") - io.WriteString(p, goStringer.GoString()) - return - } - } - - switch v.Kind() { - case reflect.Bool: - p.printInline(v, v.Bool(), showType) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - p.printInline(v, v.Int(), showType) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - p.printInline(v, v.Uint(), showType) - case reflect.Float32, reflect.Float64: - p.printInline(v, v.Float(), showType) - case reflect.Complex64, reflect.Complex128: - fmt.Fprintf(p, "%#v", v.Complex()) - case reflect.String: - p.fmtString(v.String(), quote) - case reflect.Map: - t := v.Type() - if showType { - io.WriteString(p, t.String()) - } - writeByte(p, '{') - if nonzero(v) { - expand := !canInline(v.Type()) - pp := p - if expand { - writeByte(p, '\n') - pp = p.indent() - } - sm := fmtsort.Sort(v) - for i := 0; i < v.Len(); i++ { - k := sm.Key[i] - mv := sm.Value[i] - pp.printValue(k, false, true) - writeByte(pp, ':') - if expand { - writeByte(pp, '\t') - } - showTypeInStruct := t.Elem().Kind() == reflect.Interface - pp.printValue(mv, showTypeInStruct, true) - if expand { - io.WriteString(pp, ",\n") - } else if i < v.Len()-1 { - io.WriteString(pp, ", ") - } - } - if expand { - pp.tw.Flush() - } - } - writeByte(p, '}') - case reflect.Struct: - t := v.Type() - if v.CanAddr() { - addr := v.UnsafeAddr() - vis := visit{addr, t} - if vd, ok := p.visited[vis]; ok && vd < p.depth { - p.fmtString(t.String()+"{(CYCLIC REFERENCE)}", false) - break // don't print v again - } - p.visited[vis] = p.depth - } - - if showType { - io.WriteString(p, t.String()) - } - writeByte(p, '{') - if nonzero(v) { - expand := !canInline(v.Type()) - pp := p - if expand { - writeByte(p, '\n') - pp = p.indent() - } - for i := 0; i < v.NumField(); i++ { - showTypeInStruct := true - if f := t.Field(i); f.Name != "" { - io.WriteString(pp, f.Name) - writeByte(pp, ':') - if expand { - writeByte(pp, '\t') - } - showTypeInStruct = labelType(f.Type) - } - pp.printValue(getField(v, i), showTypeInStruct, true) - if expand { - io.WriteString(pp, ",\n") - } else if i < v.NumField()-1 { - io.WriteString(pp, ", ") - } - } - if expand { - pp.tw.Flush() - } - } - writeByte(p, '}') - case reflect.Interface: - switch e := v.Elem(); { - case e.Kind() == reflect.Invalid: - io.WriteString(p, "nil") - case e.IsValid(): - pp := *p - pp.depth++ - pp.printValue(e, showType, true) - default: - io.WriteString(p, v.Type().String()) - io.WriteString(p, "(nil)") - } - case reflect.Array, reflect.Slice: - t := v.Type() - if showType { - io.WriteString(p, t.String()) - } - if v.Kind() == reflect.Slice && v.IsNil() && showType { - io.WriteString(p, "(nil)") - break - } - if v.Kind() == reflect.Slice && v.IsNil() { - io.WriteString(p, "nil") - break - } - writeByte(p, '{') - expand := !canInline(v.Type()) - pp := p - if expand { - writeByte(p, '\n') - pp = p.indent() - } - for i := 0; i < v.Len(); i++ { - showTypeInSlice := t.Elem().Kind() == reflect.Interface - pp.printValue(v.Index(i), showTypeInSlice, true) - if expand { - io.WriteString(pp, ",\n") - } else if i < v.Len()-1 { - io.WriteString(pp, ", ") - } - } - if expand { - pp.tw.Flush() - } - writeByte(p, '}') - case reflect.Ptr: - e := v.Elem() - if !e.IsValid() { - writeByte(p, '(') - io.WriteString(p, v.Type().String()) - io.WriteString(p, ")(nil)") - } else { - pp := *p - pp.depth++ - writeByte(pp, '&') - pp.printValue(e, true, true) - } - case reflect.Chan: - x := v.Pointer() - if showType { - writeByte(p, '(') - io.WriteString(p, v.Type().String()) - fmt.Fprintf(p, ")(%#v)", x) - } else { - fmt.Fprintf(p, "%#v", x) - } - case reflect.Func: - io.WriteString(p, v.Type().String()) - io.WriteString(p, " {...}") - case reflect.UnsafePointer: - p.printInline(v, v.Pointer(), showType) - case reflect.Invalid: - io.WriteString(p, "nil") - } -} - -func canInline(t reflect.Type) bool { - switch t.Kind() { - case reflect.Map: - return !canExpand(t.Elem()) - case reflect.Struct: - for i := 0; i < t.NumField(); i++ { - if canExpand(t.Field(i).Type) { - return false - } - } - return true - case reflect.Interface: - return false - case reflect.Array, reflect.Slice: - return !canExpand(t.Elem()) - case reflect.Ptr: - return false - case reflect.Chan, reflect.Func, reflect.UnsafePointer: - return false - } - return true -} - -func canExpand(t reflect.Type) bool { - switch t.Kind() { - case reflect.Map, reflect.Struct, - reflect.Interface, reflect.Array, reflect.Slice, - reflect.Ptr: - return true - } - return false -} - -func labelType(t reflect.Type) bool { - switch t.Kind() { - case reflect.Interface, reflect.Struct: - return true - } - return false -} - -func (p *printer) fmtString(s string, quote bool) { - if quote { - s = strconv.Quote(s) - } - io.WriteString(p, s) -} - -func writeByte(w io.Writer, b byte) { - w.Write([]byte{b}) -} - -func getField(v reflect.Value, i int) reflect.Value { - val := v.Field(i) - if val.Kind() == reflect.Interface && !val.IsNil() { - val = val.Elem() - } - return val -} diff --git a/vendor/github.com/kr/pretty/pretty.go b/vendor/github.com/kr/pretty/pretty.go deleted file mode 100644 index b4ca583c021..00000000000 --- a/vendor/github.com/kr/pretty/pretty.go +++ /dev/null @@ -1,108 +0,0 @@ -// Package pretty provides pretty-printing for Go values. This is -// useful during debugging, to avoid wrapping long output lines in -// the terminal. -// -// It provides a function, Formatter, that can be used with any -// function that accepts a format string. It also provides -// convenience wrappers for functions in packages fmt and log. -package pretty - -import ( - "fmt" - "io" - "log" - "reflect" -) - -// Errorf is a convenience wrapper for fmt.Errorf. -// -// Calling Errorf(f, x, y) is equivalent to -// fmt.Errorf(f, Formatter(x), Formatter(y)). -func Errorf(format string, a ...interface{}) error { - return fmt.Errorf(format, wrap(a, false)...) -} - -// Fprintf is a convenience wrapper for fmt.Fprintf. -// -// Calling Fprintf(w, f, x, y) is equivalent to -// fmt.Fprintf(w, f, Formatter(x), Formatter(y)). -func Fprintf(w io.Writer, format string, a ...interface{}) (n int, error error) { - return fmt.Fprintf(w, format, wrap(a, false)...) -} - -// Log is a convenience wrapper for log.Printf. -// -// Calling Log(x, y) is equivalent to -// log.Print(Formatter(x), Formatter(y)), but each operand is -// formatted with "%# v". -func Log(a ...interface{}) { - log.Print(wrap(a, true)...) -} - -// Logf is a convenience wrapper for log.Printf. -// -// Calling Logf(f, x, y) is equivalent to -// log.Printf(f, Formatter(x), Formatter(y)). -func Logf(format string, a ...interface{}) { - log.Printf(format, wrap(a, false)...) -} - -// Logln is a convenience wrapper for log.Printf. -// -// Calling Logln(x, y) is equivalent to -// log.Println(Formatter(x), Formatter(y)), but each operand is -// formatted with "%# v". -func Logln(a ...interface{}) { - log.Println(wrap(a, true)...) -} - -// Print pretty-prints its operands and writes to standard output. -// -// Calling Print(x, y) is equivalent to -// fmt.Print(Formatter(x), Formatter(y)), but each operand is -// formatted with "%# v". -func Print(a ...interface{}) (n int, errno error) { - return fmt.Print(wrap(a, true)...) -} - -// Printf is a convenience wrapper for fmt.Printf. -// -// Calling Printf(f, x, y) is equivalent to -// fmt.Printf(f, Formatter(x), Formatter(y)). -func Printf(format string, a ...interface{}) (n int, errno error) { - return fmt.Printf(format, wrap(a, false)...) -} - -// Println pretty-prints its operands and writes to standard output. -// -// Calling Println(x, y) is equivalent to -// fmt.Println(Formatter(x), Formatter(y)), but each operand is -// formatted with "%# v". -func Println(a ...interface{}) (n int, errno error) { - return fmt.Println(wrap(a, true)...) -} - -// Sprint is a convenience wrapper for fmt.Sprintf. -// -// Calling Sprint(x, y) is equivalent to -// fmt.Sprint(Formatter(x), Formatter(y)), but each operand is -// formatted with "%# v". -func Sprint(a ...interface{}) string { - return fmt.Sprint(wrap(a, true)...) -} - -// Sprintf is a convenience wrapper for fmt.Sprintf. -// -// Calling Sprintf(f, x, y) is equivalent to -// fmt.Sprintf(f, Formatter(x), Formatter(y)). -func Sprintf(format string, a ...interface{}) string { - return fmt.Sprintf(format, wrap(a, false)...) -} - -func wrap(a []interface{}, force bool) []interface{} { - w := make([]interface{}, len(a)) - for i, x := range a { - w[i] = formatter{v: reflect.ValueOf(x), force: force} - } - return w -} diff --git a/vendor/github.com/kr/pretty/zero.go b/vendor/github.com/kr/pretty/zero.go deleted file mode 100644 index abb5b6fc14c..00000000000 --- a/vendor/github.com/kr/pretty/zero.go +++ /dev/null @@ -1,41 +0,0 @@ -package pretty - -import ( - "reflect" -) - -func nonzero(v reflect.Value) bool { - switch v.Kind() { - 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.Complex64, reflect.Complex128: - return v.Complex() != complex(0, 0) - case reflect.String: - return v.String() != "" - case reflect.Struct: - for i := 0; i < v.NumField(); i++ { - if nonzero(getField(v, i)) { - return true - } - } - return false - case reflect.Array: - for i := 0; i < v.Len(); i++ { - if nonzero(v.Index(i)) { - return true - } - } - return false - case reflect.Map, reflect.Interface, reflect.Slice, reflect.Ptr, reflect.Chan, reflect.Func: - return !v.IsNil() - case reflect.UnsafePointer: - return v.Pointer() != 0 - } - return true -} diff --git a/vendor/github.com/kr/text/License b/vendor/github.com/kr/text/License deleted file mode 100644 index 480a3280599..00000000000 --- a/vendor/github.com/kr/text/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2012 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/text/Readme b/vendor/github.com/kr/text/Readme deleted file mode 100644 index 7e6e7c0687b..00000000000 --- a/vendor/github.com/kr/text/Readme +++ /dev/null @@ -1,3 +0,0 @@ -This is a Go package for manipulating paragraphs of text. - -See http://go.pkgdoc.org/github.com/kr/text for full documentation. diff --git a/vendor/github.com/kr/text/doc.go b/vendor/github.com/kr/text/doc.go deleted file mode 100644 index cf4c198f955..00000000000 --- a/vendor/github.com/kr/text/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package text provides rudimentary functions for manipulating text in -// paragraphs. -package text diff --git a/vendor/github.com/kr/text/indent.go b/vendor/github.com/kr/text/indent.go deleted file mode 100644 index 4ebac45c092..00000000000 --- a/vendor/github.com/kr/text/indent.go +++ /dev/null @@ -1,74 +0,0 @@ -package text - -import ( - "io" -) - -// Indent inserts prefix at the beginning of each non-empty line of s. The -// end-of-line marker is NL. -func Indent(s, prefix string) string { - return string(IndentBytes([]byte(s), []byte(prefix))) -} - -// IndentBytes inserts prefix at the beginning of each non-empty line of b. -// The end-of-line marker is NL. -func IndentBytes(b, prefix []byte) []byte { - var res []byte - bol := true - for _, c := range b { - if bol && c != '\n' { - res = append(res, prefix...) - } - res = append(res, c) - bol = c == '\n' - } - return res -} - -// Writer indents each line of its input. -type indentWriter struct { - w io.Writer - bol bool - pre [][]byte - sel int - off int -} - -// NewIndentWriter makes a new write filter that indents the input -// lines. Each line is prefixed in order with the corresponding -// element of pre. If there are more lines than elements, the last -// element of pre is repeated for each subsequent line. -func NewIndentWriter(w io.Writer, pre ...[]byte) io.Writer { - return &indentWriter{ - w: w, - pre: pre, - bol: true, - } -} - -// The only errors returned are from the underlying indentWriter. -func (w *indentWriter) Write(p []byte) (n int, err error) { - for _, c := range p { - if w.bol { - var i int - i, err = w.w.Write(w.pre[w.sel][w.off:]) - w.off += i - if err != nil { - return n, err - } - } - _, err = w.w.Write([]byte{c}) - if err != nil { - return n, err - } - n++ - w.bol = c == '\n' - if w.bol { - w.off = 0 - if w.sel < len(w.pre)-1 { - w.sel++ - } - } - } - return n, nil -} diff --git a/vendor/github.com/kr/text/wrap.go b/vendor/github.com/kr/text/wrap.go deleted file mode 100644 index b09bb03736d..00000000000 --- a/vendor/github.com/kr/text/wrap.go +++ /dev/null @@ -1,86 +0,0 @@ -package text - -import ( - "bytes" - "math" -) - -var ( - nl = []byte{'\n'} - sp = []byte{' '} -) - -const defaultPenalty = 1e5 - -// Wrap wraps s into a paragraph of lines of length lim, with minimal -// raggedness. -func Wrap(s string, lim int) string { - return string(WrapBytes([]byte(s), lim)) -} - -// WrapBytes wraps b into a paragraph of lines of length lim, with minimal -// raggedness. -func WrapBytes(b []byte, lim int) []byte { - words := bytes.Split(bytes.Replace(bytes.TrimSpace(b), nl, sp, -1), sp) - var lines [][]byte - for _, line := range WrapWords(words, 1, lim, defaultPenalty) { - lines = append(lines, bytes.Join(line, sp)) - } - return bytes.Join(lines, nl) -} - -// WrapWords is the low-level line-breaking algorithm, useful if you need more -// control over the details of the text wrapping process. For most uses, either -// Wrap or WrapBytes will be sufficient and more convenient. -// -// WrapWords splits a list of words into lines with minimal "raggedness", -// treating each byte as one unit, accounting for spc units between adjacent -// words on each line, and attempting to limit lines to lim units. Raggedness -// is the total error over all lines, where error is the square of the -// difference of the length of the line and lim. Too-long lines (which only -// happen when a single word is longer than lim units) have pen penalty units -// added to the error. -func WrapWords(words [][]byte, spc, lim, pen int) [][][]byte { - n := len(words) - - length := make([][]int, n) - for i := 0; i < n; i++ { - length[i] = make([]int, n) - length[i][i] = len(words[i]) - for j := i + 1; j < n; j++ { - length[i][j] = length[i][j-1] + spc + len(words[j]) - } - } - - nbrk := make([]int, n) - cost := make([]int, n) - for i := range cost { - cost[i] = math.MaxInt32 - } - for i := n - 1; i >= 0; i-- { - if length[i][n-1] <= lim || i == n-1 { - cost[i] = 0 - nbrk[i] = n - } else { - for j := i + 1; j < n; j++ { - d := lim - length[i][j-1] - c := d*d + cost[j] - if length[i][j-1] > lim { - c += pen // too-long lines get a worse penalty - } - if c < cost[i] { - cost[i] = c - nbrk[i] = j - } - } - } - } - - var lines [][][]byte - i := 0 - for i < n { - lines = append(lines, words[i:nbrk[i]]) - i = nbrk[i] - } - return lines -} diff --git a/vendor/github.com/lufia/plan9stats/.gitignore b/vendor/github.com/lufia/plan9stats/.gitignore deleted file mode 100644 index f1c181ec9c5..00000000000 --- a/vendor/github.com/lufia/plan9stats/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out diff --git a/vendor/github.com/lufia/plan9stats/LICENSE b/vendor/github.com/lufia/plan9stats/LICENSE deleted file mode 100644 index a6d47e80718..00000000000 --- a/vendor/github.com/lufia/plan9stats/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2019, KADOTA, Kyohei -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the copyright holder 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 HOLDER 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/lufia/plan9stats/README.md b/vendor/github.com/lufia/plan9stats/README.md deleted file mode 100644 index a21700c0cf3..00000000000 --- a/vendor/github.com/lufia/plan9stats/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# plan9stats -A module for retrieving statistics of Plan 9 diff --git a/vendor/github.com/lufia/plan9stats/cpu.go b/vendor/github.com/lufia/plan9stats/cpu.go deleted file mode 100644 index a101b911906..00000000000 --- a/vendor/github.com/lufia/plan9stats/cpu.go +++ /dev/null @@ -1,288 +0,0 @@ -package stats - -import ( - "bufio" - "bytes" - "context" - "errors" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "sort" - "strconv" - "strings" - "time" -) - -// CPUType represents /dev/cputype. -type CPUType struct { - Name string - Clock int // clock rate in MHz -} - -func ReadCPUType(ctx context.Context, opts ...Option) (*CPUType, error) { - cfg := newConfig(opts...) - var c CPUType - if err := readCPUType(cfg.rootdir, &c); err != nil { - return nil, err - } - return &c, nil -} - -type SysStats struct { - ID int - NumCtxSwitch int64 - NumInterrupt int64 - NumSyscall int64 - NumFault int64 - NumTLBFault int64 - NumTLBPurge int64 - LoadAvg int64 // in units of milli-CPUs and is decayed over time - Idle int // percentage - Interrupt int // percentage -} - -// ReadSysStats reads system statistics from /dev/sysstat. -func ReadSysStats(ctx context.Context, opts ...Option) ([]*SysStats, error) { - cfg := newConfig(opts...) - file := filepath.Join(cfg.rootdir, "/dev/sysstat") - f, err := os.Open(file) - if err != nil { - return nil, err - } - defer f.Close() - - scanner := bufio.NewScanner(f) - var stats []*SysStats - for scanner.Scan() { - a := strings.Fields(scanner.Text()) - if len(a) != 10 { - continue - } - var ( - p intParser - stat SysStats - ) - stat.ID = p.ParseInt(a[0], 10) - stat.NumCtxSwitch = p.ParseInt64(a[1], 10) - stat.NumInterrupt = p.ParseInt64(a[2], 10) - stat.NumSyscall = p.ParseInt64(a[3], 10) - stat.NumFault = p.ParseInt64(a[4], 10) - stat.NumTLBFault = p.ParseInt64(a[5], 10) - stat.NumTLBPurge = p.ParseInt64(a[6], 10) - stat.LoadAvg = p.ParseInt64(a[7], 10) - stat.Idle = p.ParseInt(a[8], 10) - stat.Interrupt = p.ParseInt(a[9], 10) - if err := p.Err(); err != nil { - return nil, err - } - stats = append(stats, &stat) - } - if err := scanner.Err(); err != nil { - return nil, err - } - return stats, nil -} - -func readCPUType(rootdir string, c *CPUType) error { - file := filepath.Join(rootdir, "/dev/cputype") - b, err := ioutil.ReadFile(file) - if err != nil { - return err - } - b = bytes.TrimSpace(b) - i := bytes.LastIndexByte(b, ' ') - if i < 0 { - return fmt.Errorf("%s: invalid format", file) - } - clock, err := strconv.Atoi(string(b[i+1:])) - if err != nil { - return err - } - c.Name = string(b[:i]) - c.Clock = clock - return nil -} - -// Time represents /dev/time. -type Time struct { - Unix time.Duration - UnixNano time.Duration - Ticks int64 // clock ticks - Freq int64 //cloc frequency -} - -// Uptime returns uptime. -func (t *Time) Uptime() time.Duration { - v := float64(t.Ticks) / float64(t.Freq) - return time.Duration(v*1000_000_000) * time.Nanosecond -} - -func ReadTime(ctx context.Context, opts ...Option) (*Time, error) { - cfg := newConfig(opts...) - file := filepath.Join(cfg.rootdir, "/dev/time") - var t Time - if err := readTime(file, &t); err != nil { - return nil, err - } - return &t, nil -} - -// ProcStatus represents a /proc/n/status. -type ProcStatus struct { - Name string - User string - State string - Times CPUTime - MemUsed int64 // in units of 1024 bytes - BasePriority uint32 // 0(low) to 19(high) - Priority uint32 // 0(low) to 19(high) -} - -// CPUTime represents /dev/cputime or a part of /proc/n/status. -type CPUTime struct { - User time.Duration // the time in user mode (millisecconds) - Sys time.Duration - Real time.Duration - ChildUser time.Duration // exited children and descendants time in user mode - ChildSys time.Duration - ChildReal time.Duration -} - -// CPUStats emulates Linux's /proc/stat. -type CPUStats struct { - User time.Duration - Sys time.Duration - Idle time.Duration -} - -func ReadCPUStats(ctx context.Context, opts ...Option) (*CPUStats, error) { - cfg := newConfig(opts...) - a, err := ReadSysStats(ctx, opts...) - if err != nil { - return nil, err - } - - dir := filepath.Join(cfg.rootdir, "/proc") - d, err := os.Open(dir) - if err != nil { - return nil, err - } - defer d.Close() - - names, err := d.Readdirnames(0) - if err != nil { - return nil, err - } - var up uint32parser - pids := make([]uint32, len(names)) - for i, s := range names { - pids[i] = up.Parse(s) - } - if up.err != nil { - return nil, err - } - sort.Slice(pids, func(i, j int) bool { - return pids[i] < pids[j] - }) - - var stat CPUStats - for _, pid := range pids { - s := strconv.FormatUint(uint64(pid), 10) - file := filepath.Join(dir, s, "status") - var p ProcStatus - if err := readProcStatus(file, &p); err != nil { - return nil, err - } - stat.User += p.Times.User - stat.Sys += p.Times.Sys - } - - var t Time - file := filepath.Join(cfg.rootdir, "/dev/time") - if err := readTime(file, &t); err != nil { - return nil, err - } - // In multi-processor host, Idle should multiple by number of cores. - u := t.Uptime() * time.Duration(len(a)) - stat.Idle = u - stat.User - stat.Sys - return &stat, nil -} - -func readProcStatus(file string, p *ProcStatus) error { - b, err := ioutil.ReadFile(file) - if err != nil { - if os.IsNotExist(err) { - return nil - } - return err - } - fields := strings.Fields(string(b)) - if len(fields) != 12 { - return errors.New("invalid format") - } - p.Name = string(fields[0]) - p.User = string(fields[1]) - p.State = string(fields[2]) - var up uint32parser - p.Times.User = time.Duration(up.Parse(fields[3])) * time.Millisecond - p.Times.Sys = time.Duration(up.Parse(fields[4])) * time.Millisecond - p.Times.Real = time.Duration(up.Parse(fields[5])) * time.Millisecond - p.Times.ChildUser = time.Duration(up.Parse(fields[6])) * time.Millisecond - p.Times.ChildSys = time.Duration(up.Parse(fields[7])) * time.Millisecond - p.Times.ChildReal = time.Duration(up.Parse(fields[8])) * time.Millisecond - p.MemUsed, err = strconv.ParseInt(fields[9], 10, 64) - if err != nil { - return err - } - p.BasePriority = up.Parse(fields[10]) - p.Priority = up.Parse(fields[11]) - return up.err -} - -func readTime(file string, t *Time) error { - b, err := ioutil.ReadFile(file) - if err != nil { - return err - } - fields := strings.Fields(string(b)) - if len(fields) != 4 { - return errors.New("invalid format") - } - n, err := strconv.ParseInt(fields[0], 10, 32) - if err != nil { - return err - } - t.Unix = time.Duration(n) * time.Second - v, err := strconv.ParseInt(fields[1], 10, 64) - if err != nil { - return err - } - t.UnixNano = time.Duration(v) * time.Nanosecond - t.Ticks, err = strconv.ParseInt(fields[2], 10, 64) - if err != nil { - return err - } - t.Freq, err = strconv.ParseInt(fields[3], 10, 64) - if err != nil { - return err - } - return nil -} - -type uint32parser struct { - err error -} - -func (p *uint32parser) Parse(s string) uint32 { - if p.err != nil { - return 0 - } - n, err := strconv.ParseUint(s, 10, 32) - if err != nil { - p.err = err - return 0 - } - return uint32(n) -} diff --git a/vendor/github.com/lufia/plan9stats/doc.go b/vendor/github.com/lufia/plan9stats/doc.go deleted file mode 100644 index 10e398e7a87..00000000000 --- a/vendor/github.com/lufia/plan9stats/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package stats provides statistic utilities for Plan 9. -package stats diff --git a/vendor/github.com/lufia/plan9stats/host.go b/vendor/github.com/lufia/plan9stats/host.go deleted file mode 100644 index 957e9034895..00000000000 --- a/vendor/github.com/lufia/plan9stats/host.go +++ /dev/null @@ -1,303 +0,0 @@ -package stats - -import ( - "bufio" - "bytes" - "context" - "fmt" - "io/ioutil" - "net" - "os" - "path/filepath" - "strconv" - "strings" -) - -var ( - delim = []byte{' '} -) - -// Host represents host status. -type Host struct { - Sysname string - Storages []*Storage - Interfaces []*Interface -} - -// MemStats represents the memory statistics. -type MemStats struct { - Total int64 // total memory in byte - PageSize int64 // a page size in byte - KernelPages int64 - UserPages Gauge - SwapPages Gauge - - Malloced Gauge // kernel malloced data in byte - Graphics Gauge // kernel graphics data in byte -} - -// Gauge is used/available gauge. -type Gauge struct { - Used int64 - Avail int64 -} - -func (g Gauge) Free() int64 { - return g.Avail - g.Used -} - -// ReadMemStats reads memory statistics from /dev/swap. -func ReadMemStats(ctx context.Context, opts ...Option) (*MemStats, error) { - cfg := newConfig(opts...) - swap := filepath.Join(cfg.rootdir, "/dev/swap") - f, err := os.Open(swap) - if err != nil { - return nil, err - } - defer f.Close() - - var stat MemStats - m := map[string]interface{}{ - "memory": &stat.Total, - "pagesize": &stat.PageSize, - "kernel": &stat.KernelPages, - "user": &stat.UserPages, - "swap": &stat.SwapPages, - "kernel malloc": &stat.Malloced, - "kernel draw": &stat.Graphics, - } - scanner := bufio.NewScanner(f) - for scanner.Scan() { - fields := bytes.SplitN(scanner.Bytes(), delim, 2) - if len(fields) < 2 { - continue - } - switch key := string(fields[1]); key { - case "memory", "pagesize", "kernel": - v := m[key].(*int64) - n, err := strconv.ParseInt(string(fields[0]), 10, 64) - if err != nil { - return nil, err - } - *v = n - case "user", "swap", "kernel malloc", "kernel draw": - v := m[key].(*Gauge) - if err := parseGauge(string(fields[0]), v); err != nil { - return nil, err - } - } - } - if err := scanner.Err(); err != nil { - return nil, err - } - return &stat, nil -} - -func parseGauge(s string, r *Gauge) error { - a := strings.SplitN(s, "/", 2) - if len(a) != 2 { - return fmt.Errorf("can't parse ratio: %s", s) - } - var p intParser - u := p.ParseInt64(a[0], 10) - n := p.ParseInt64(a[1], 10) - if err := p.Err(); err != nil { - return err - } - r.Used = u - r.Avail = n - return nil -} - -type Storage struct { - Name string - Model string - Capacity int64 -} - -type Interface struct { - Name string - Addr string -} - -const ( - numEther = 8 // see ether(3) - numIpifc = 16 // see ip(3) -) - -// ReadInterfaces reads network interfaces from etherN. -func ReadInterfaces(ctx context.Context, opts ...Option) ([]*Interface, error) { - cfg := newConfig(opts...) - var a []*Interface - for i := 0; i < numEther; i++ { - p, err := readInterface(cfg.rootdir, i) - if os.IsNotExist(err) { - continue - } - if err != nil { - return nil, err - } - a = append(a, p) - } - return a, nil -} - -func readInterface(netroot string, i int) (*Interface, error) { - ether := fmt.Sprintf("ether%d", i) - dir := filepath.Join(netroot, ether) - info, err := os.Stat(dir) - if err != nil { - return nil, err - } - if !info.IsDir() { - return nil, fmt.Errorf("%s: is not directory", dir) - } - - addr, err := ioutil.ReadFile(filepath.Join(dir, "addr")) - if err != nil { - return nil, err - } - return &Interface{ - Name: ether, - Addr: string(addr), - }, nil -} - -var ( - netdirs = []string{"/net", "/net.alt"} -) - -// ReadHost reads host status. -func ReadHost(ctx context.Context, opts ...Option) (*Host, error) { - cfg := newConfig(opts...) - var h Host - name, err := readSysname(cfg.rootdir) - if err != nil { - return nil, err - } - h.Sysname = name - - a, err := readStorages(cfg.rootdir) - if err != nil { - return nil, err - } - h.Storages = a - - for _, s := range netdirs { - netroot := filepath.Join(cfg.rootdir, s) - ifaces, err := ReadInterfaces(ctx, WithRootDir(netroot)) - if err != nil { - return nil, err - } - h.Interfaces = append(h.Interfaces, ifaces...) - } - return &h, nil -} - -func readSysname(rootdir string) (string, error) { - file := filepath.Join(rootdir, "/dev/sysname") - b, err := ioutil.ReadFile(file) - if err != nil { - return "", err - } - return string(bytes.TrimSpace(b)), nil -} - -func readStorages(rootdir string) ([]*Storage, error) { - sdctl := filepath.Join(rootdir, "/dev/sdctl") - f, err := os.Open(sdctl) - if err != nil { - return nil, err - } - defer f.Close() - - var a []*Storage - scanner := bufio.NewScanner(f) - for scanner.Scan() { - fields := bytes.Split(scanner.Bytes(), delim) - if len(fields) == 0 { - continue - } - exp := string(fields[0]) + "*" - if !strings.HasPrefix(exp, "sd") { - continue - } - dir := filepath.Join(rootdir, "/dev", exp) - m, err := filepath.Glob(dir) - if err != nil { - return nil, err - } - for _, dir := range m { - s, err := readStorage(dir) - if err != nil { - return nil, err - } - a = append(a, s) - } - } - if err := scanner.Err(); err != nil { - return nil, err - } - return a, nil -} - -func readStorage(dir string) (*Storage, error) { - ctl := filepath.Join(dir, "ctl") - f, err := os.Open(ctl) - if err != nil { - return nil, err - } - defer f.Close() - - var s Storage - s.Name = filepath.Base(dir) - scanner := bufio.NewScanner(f) - for scanner.Scan() { - line := scanner.Bytes() - switch { - case bytes.HasPrefix(line, []byte("inquiry")): - s.Model = string(bytes.TrimSpace(line[7:])) - case bytes.HasPrefix(line, []byte("geometry")): - fields := bytes.Split(line, delim) - if len(fields) < 3 { - continue - } - var p intParser - sec := p.ParseInt64(string(fields[1]), 10) - size := p.ParseInt64(string(fields[2]), 10) - if err := p.Err(); err != nil { - return nil, err - } - s.Capacity = sec * size - } - } - if err := scanner.Err(); err != nil { - return nil, err - } - return &s, nil -} - -type IPStats struct { - ID int // number of interface in ipifc dir - Device string // associated physical device - MTU int // max transfer unit - Sendra6 uint8 // on == send router adv - Recvra6 uint8 // on == recv router adv - - Pktin int64 // packets read - Pktout int64 // packets written - Errin int64 // read errors - Errout int64 // write errors -} - -type Iplifc struct { - IP net.IP - Mask net.IPMask - Net net.IP // ip & mask - PerfLifetime int64 // preferred lifetime - ValidLifetime int64 // valid lifetime -} - -type Ipv6rp struct { - // TODO(lufia): see ip(2) -} diff --git a/vendor/github.com/lufia/plan9stats/int.go b/vendor/github.com/lufia/plan9stats/int.go deleted file mode 100644 index db133c43ed1..00000000000 --- a/vendor/github.com/lufia/plan9stats/int.go +++ /dev/null @@ -1,31 +0,0 @@ -package stats - -import ( - "strconv" -) - -type intParser struct { - err error -} - -func (p *intParser) ParseInt(s string, base int) int { - if p.err != nil { - return 0 - } - var n int64 - n, p.err = strconv.ParseInt(s, base, 0) - return int(n) -} - -func (p *intParser) ParseInt64(s string, base int) int64 { - if p.err != nil { - return 0 - } - var n int64 - n, p.err = strconv.ParseInt(s, base, 64) - return n -} - -func (p *intParser) Err() error { - return p.err -} diff --git a/vendor/github.com/lufia/plan9stats/opts.go b/vendor/github.com/lufia/plan9stats/opts.go deleted file mode 100644 index 05b7d036a2d..00000000000 --- a/vendor/github.com/lufia/plan9stats/opts.go +++ /dev/null @@ -1,21 +0,0 @@ -package stats - -type Config struct { - rootdir string -} - -type Option func(*Config) - -func newConfig(opts ...Option) *Config { - var cfg Config - for _, opt := range opts { - opt(&cfg) - } - return &cfg -} - -func WithRootDir(dir string) Option { - return func(cfg *Config) { - cfg.rootdir = dir - } -} diff --git a/vendor/github.com/lufia/plan9stats/stats.go b/vendor/github.com/lufia/plan9stats/stats.go deleted file mode 100644 index d4ecdcfa079..00000000000 --- a/vendor/github.com/lufia/plan9stats/stats.go +++ /dev/null @@ -1,88 +0,0 @@ -package stats - -import ( - "bufio" - "context" - "os" - "path/filepath" - "strings" -) - -type InterfaceStats struct { - PacketsReceived int64 // in packets - Link int // link status - PacketsSent int64 // out packets - NumCRCErr int // input CRC errors - NumOverflows int // packet overflows - NumSoftOverflows int // software overflow - NumFramingErr int // framing errors - NumBufferingErr int // buffering errors - NumOutputErr int // output errors - Promiscuous int // number of promiscuous opens - Mbps int // megabits per sec - Addr string -} - -func ReadInterfaceStats(ctx context.Context, opts ...Option) (*InterfaceStats, error) { - cfg := newConfig(opts...) - file := filepath.Join(cfg.rootdir, "stats") - f, err := os.Open(file) - if err != nil { - return nil, err - } - defer f.Close() - - var stats InterfaceStats - scanner := bufio.NewScanner(f) - for scanner.Scan() { - s := strings.TrimSpace(scanner.Text()) - a := strings.SplitN(s, ":", 2) - if len(a) != 2 { - continue - } - var p intParser - v := strings.TrimSpace(a[1]) - switch a[0] { - case "in": - stats.PacketsReceived = p.ParseInt64(v, 10) - case "link": - stats.Link = p.ParseInt(v, 10) - case "out": - stats.PacketsSent = p.ParseInt64(v, 10) - case "crc": - stats.NumCRCErr = p.ParseInt(v, 10) - case "overflows": - stats.NumOverflows = p.ParseInt(v, 10) - case "soft overflows": - stats.NumSoftOverflows = p.ParseInt(v, 10) - case "framing errs": - stats.NumFramingErr = p.ParseInt(v, 10) - case "buffer errs": - stats.NumBufferingErr = p.ParseInt(v, 10) - case "output errs": - stats.NumOutputErr = p.ParseInt(v, 10) - case "prom": - stats.Promiscuous = p.ParseInt(v, 10) - case "mbps": - stats.Mbps = p.ParseInt(v, 10) - case "addr": - stats.Addr = v - } - if err := p.Err(); err != nil { - return nil, err - } - } - if err := scanner.Err(); err != nil { - return nil, err - } - return &stats, nil -} - -type TCPStats struct { - MaxConn int - MaxSegment int - ActiveOpens int - PassiveOpens int - EstablishedResets int - CurrentEstablished int -} diff --git a/vendor/github.com/cilium/proxy/LICENSE b/vendor/github.com/mackerelio/go-osstat/LICENSE.txt similarity index 89% rename from vendor/github.com/cilium/proxy/LICENSE rename to vendor/github.com/mackerelio/go-osstat/LICENSE.txt index a2e486a803a..e454a52586f 100644 --- a/vendor/github.com/cilium/proxy/LICENSE +++ b/vendor/github.com/mackerelio/go-osstat/LICENSE.txt @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -175,28 +176,3 @@ 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} Authors of Cilium - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT 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/mackerelio/go-osstat/memory/memory_darwin.go b/vendor/github.com/mackerelio/go-osstat/memory/memory_darwin.go new file mode 100644 index 00000000000..d20a4731fbc --- /dev/null +++ b/vendor/github.com/mackerelio/go-osstat/memory/memory_darwin.go @@ -0,0 +1,128 @@ +//go:build darwin +// +build darwin + +package memory + +import ( + "bufio" + "context" + "fmt" + "io" + "os/exec" + "strconv" + "strings" + "time" + "unsafe" + + "golang.org/x/sys/unix" +) + +// Get memory statistics +func Get() (*Stats, error) { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + // Reference: man 1 vm_stat + cmd := exec.CommandContext(ctx, "vm_stat") + out, err := cmd.StdoutPipe() + if err != nil { + return nil, err + } + if err := cmd.Start(); err != nil { + return nil, err + } + memory, err := collectMemoryStats(out) + if err != nil { + // it is needed to cleanup the process, but its result is not needed. + go cmd.Wait() //nolint:errcheck + return nil, err + } + if err := cmd.Wait(); err != nil { + return nil, err + } + + // Reference: sys/sysctl.h, man 3 sysctl, sysctl vm.swapusage + ret, err := unix.SysctlRaw("vm.swapusage") + if err != nil { + return nil, fmt.Errorf("failed in sysctl vm.swapusage: %s", err) + } + swap, err := collectSwapStats(ret) + if err != nil { + return nil, err + } + memory.SwapTotal = swap.Total + memory.SwapUsed = swap.Used + memory.SwapFree = swap.Avail + + return memory, nil +} + +// Stats represents memory statistics for darwin +type Stats struct { + Total, Used, Cached, Free, Active, Inactive, SwapTotal, SwapUsed, SwapFree uint64 +} + +// References: +// - https://support.apple.com/guide/activity-monitor/view-memory-usage-actmntr1004/10.14/mac/11.0 +// - https://opensource.apple.com/source/system_cmds/system_cmds-880.60.2/vm_stat.tproj/ +func collectMemoryStats(out io.Reader) (*Stats, error) { + scanner := bufio.NewScanner(out) + if !scanner.Scan() { + return nil, fmt.Errorf("failed to scan output of vm_stat") + } + line := scanner.Text() + var pageSize uint64 + if _, err := fmt.Sscanf(line, "Mach Virtual Memory Statistics: (page size of %d bytes)", &pageSize); err != nil { + return nil, fmt.Errorf("unexpected output of vm_stat: %s", line) + } + + var memory Stats + var speculative, wired, purgeable, fileBacked, compressed uint64 + memStats := map[string]*uint64{ + "Pages free": &memory.Free, + "Pages active": &memory.Active, + "Pages inactive": &memory.Inactive, + "Pages speculative": &speculative, + "Pages wired down": &wired, + "Pages purgeable": &purgeable, + "File-backed pages": &fileBacked, + "Pages occupied by compressor": &compressed, + } + for scanner.Scan() { + line := scanner.Text() + i := strings.IndexRune(line, ':') + if i < 0 { + continue + } + if ptr := memStats[line[:i]]; ptr != nil { + val := strings.TrimRight(strings.TrimSpace(line[i+1:]), ".") + if v, err := strconv.ParseUint(val, 10, 64); err == nil { + *ptr = v * pageSize + } + } + } + if err := scanner.Err(); err != nil { + return nil, fmt.Errorf("scan error for vm_stat: %s", err) + } + + memory.Cached = purgeable + fileBacked + memory.Used = wired + compressed + memory.Active + memory.Inactive + speculative - memory.Cached + memory.Total = memory.Used + memory.Cached + memory.Free + return &memory, nil +} + +// xsw_usage in sys/sysctl.h +type swapUsage struct { + Total uint64 + Avail uint64 + Used uint64 + Pagesize int32 + Encrypted bool +} + +func collectSwapStats(out []byte) (*swapUsage, error) { + if len(out) != 32 { + return nil, fmt.Errorf("unexpected output of sysctl vm.swapusage: %v (len: %d)", out, len(out)) + } + return (*swapUsage)(unsafe.Pointer(&out[0])), nil +} diff --git a/vendor/github.com/mackerelio/go-osstat/memory/memory_freebsd.go b/vendor/github.com/mackerelio/go-osstat/memory/memory_freebsd.go new file mode 100644 index 00000000000..abac2b1e900 --- /dev/null +++ b/vendor/github.com/mackerelio/go-osstat/memory/memory_freebsd.go @@ -0,0 +1,119 @@ +//go:build freebsd +// +build freebsd + +package memory + +import ( + "bufio" + "context" + "fmt" + "io" + "os/exec" + "strconv" + "strings" + "time" + "unsafe" + + "golang.org/x/sys/unix" +) + +// Get memory statistics +func Get() (*Stats, error) { + return collectMemoryStats() +} + +// Stats represents memory statistics for freebsd +type Stats struct { + Total, Used, Cached, Free, Active, Inactive, Wired, + SwapTotal, SwapUsed, SwapFree uint64 +} + +type memStat struct { + name string + ptr *uint64 + scale *uint64 +} + +func collectMemoryStats() (*Stats, error) { + var pageSize uint64 + one := uint64(1) + + var memory Stats + memStats := []memStat{ + {"vm.stats.vm.v_page_size", &pageSize, &one}, + {"hw.physmem", &memory.Total, &one}, + {"vm.stats.vm.v_cache_count", &memory.Cached, &pageSize}, + {"vm.stats.vm.v_free_count", &memory.Free, &pageSize}, + {"vm.stats.vm.v_active_count", &memory.Active, &pageSize}, + {"vm.stats.vm.v_inactive_count", &memory.Inactive, &pageSize}, + {"vm.stats.vm.v_wire_count", &memory.Wired, &pageSize}, + } + + for _, stat := range memStats { + ret, err := unix.SysctlRaw(stat.name) + if err != nil { + return nil, fmt.Errorf("failed in sysctl %s: %s", stat.name, err) + } + if len(ret) == 8 { + *stat.ptr = *(*uint64)(unsafe.Pointer(&ret[0])) * *stat.scale + } else if len(ret) == 4 { + *stat.ptr = uint64(*(*uint32)(unsafe.Pointer(&ret[0]))) * *stat.scale + } else { + return nil, fmt.Errorf("failed in sysctl %s: %s", stat.name, err) + } + } + + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + // collect swap statistics from swapinfo command + cmd := exec.CommandContext(ctx, "swapinfo", "-k") + out, err := cmd.StdoutPipe() + if err != nil { + return nil, err + } + if err := cmd.Start(); err != nil { + return nil, err + } + memory.SwapTotal, memory.SwapUsed, err = collectSwapStats(out) + if err != nil { + go cmd.Wait() + return nil, err + } + if err := cmd.Wait(); err != nil { + return nil, err + } + + memory.Used = memory.Total - memory.Free - memory.Cached - memory.Inactive + memory.SwapFree = memory.SwapTotal - memory.SwapUsed + + return &memory, nil +} + +func collectSwapStats(out io.Reader) (uint64, uint64, error) { + scanner := bufio.NewScanner(out) + if !scanner.Scan() { + return 0, 0, fmt.Errorf("failed to scan output of swapinfo") + } + line := scanner.Text() + if !strings.HasPrefix(line, "Device") { + return 0, 0, fmt.Errorf("unexpected output of swapinfo: %s", line) + } + + var total, used uint64 + for scanner.Scan() { + line := scanner.Text() + fields := strings.Fields(line) + if len(fields) < 5 { + continue + } + if v, err := strconv.ParseUint(fields[1], 10, 64); err == nil { + total += v * 1024 + } + if v, err := strconv.ParseUint(fields[2], 10, 64); err == nil { + used += v * 1024 + } + } + + return total, used, nil +} diff --git a/vendor/github.com/mackerelio/go-osstat/memory/memory_linux.go b/vendor/github.com/mackerelio/go-osstat/memory/memory_linux.go new file mode 100644 index 00000000000..bb53dcb8b94 --- /dev/null +++ b/vendor/github.com/mackerelio/go-osstat/memory/memory_linux.go @@ -0,0 +1,85 @@ +//go:build linux +// +build linux + +package memory + +import ( + "bufio" + "fmt" + "io" + "os" + "strconv" + "strings" +) + +// Get memory statistics +func Get() (*Stats, error) { + // Reference: man 5 proc, Documentation/filesystems/proc.txt in Linux source code + file, err := os.Open("/proc/meminfo") + if err != nil { + return nil, err + } + defer file.Close() + return collectMemoryStats(file) +} + +// Stats represents memory statistics for linux +type Stats struct { + Total, Used, Buffers, Cached, Free, Available, Active, Inactive, + SwapTotal, SwapUsed, SwapCached, SwapFree, Mapped, Shmem, Slab, + PageTables, Committed, VmallocUsed uint64 + MemAvailableEnabled bool +} + +func collectMemoryStats(out io.Reader) (*Stats, error) { + scanner := bufio.NewScanner(out) + var memory Stats + memStats := map[string]*uint64{ + "MemTotal": &memory.Total, + "MemFree": &memory.Free, + "MemAvailable": &memory.Available, + "Buffers": &memory.Buffers, + "Cached": &memory.Cached, + "Active": &memory.Active, + "Inactive": &memory.Inactive, + "SwapCached": &memory.SwapCached, + "SwapTotal": &memory.SwapTotal, + "SwapFree": &memory.SwapFree, + "Mapped": &memory.Mapped, + "Shmem": &memory.Shmem, + "Slab": &memory.Slab, + "PageTables": &memory.PageTables, + "Committed_AS": &memory.Committed, + "VmallocUsed": &memory.VmallocUsed, + } + for scanner.Scan() { + line := scanner.Text() + i := strings.IndexRune(line, ':') + if i < 0 { + continue + } + fld := line[:i] + if ptr := memStats[fld]; ptr != nil { + val := strings.TrimSpace(strings.TrimRight(line[i+1:], "kB")) + if v, err := strconv.ParseUint(val, 10, 64); err == nil { + *ptr = v * 1024 + } + if fld == "MemAvailable" { + memory.MemAvailableEnabled = true + } + } + } + if err := scanner.Err(); err != nil { + return nil, fmt.Errorf("scan error for /proc/meminfo: %s", err) + } + + memory.SwapUsed = memory.SwapTotal - memory.SwapFree + + if memory.MemAvailableEnabled { + memory.Used = memory.Total - memory.Available + } else { + memory.Used = memory.Total - memory.Free - memory.Buffers - memory.Cached + } + + return &memory, nil +} diff --git a/vendor/github.com/mackerelio/go-osstat/memory/memory_other.go b/vendor/github.com/mackerelio/go-osstat/memory/memory_other.go new file mode 100644 index 00000000000..1274e0c6057 --- /dev/null +++ b/vendor/github.com/mackerelio/go-osstat/memory/memory_other.go @@ -0,0 +1,19 @@ +//go:build !linux && !darwin && !windows && !freebsd +// +build !linux,!darwin,!windows,!freebsd + +package memory + +import ( + "fmt" + "runtime" +) + +// Get memory statistics +func Get() (*Stats, error) { + return nil, fmt.Errorf("memory statistics not implemented for: %s", runtime.GOOS) +} + +// Stats represents memory statistics +type Stats struct { + Total, Used, Cached, Free, Active, Inactive, SwapTotal, SwapUsed, SwapFree uint64 +} diff --git a/vendor/github.com/mackerelio/go-osstat/memory/memory_windows.go b/vendor/github.com/mackerelio/go-osstat/memory/memory_windows.go new file mode 100644 index 00000000000..26367395512 --- /dev/null +++ b/vendor/github.com/mackerelio/go-osstat/memory/memory_windows.go @@ -0,0 +1,54 @@ +//go:build windows +// +build windows + +package memory + +import ( + "fmt" + "syscall" + "unsafe" +) + +var ( + kernel32 = syscall.NewLazyDLL("kernel32.dll") + globalMemoryStatusEx = kernel32.NewProc("GlobalMemoryStatusEx") +) + +// Get memory statistics +func Get() (*Stats, error) { + var memoryStatus memoryStatusEx + memoryStatus.Length = uint32(unsafe.Sizeof(memoryStatus)) + + ret, _, err := globalMemoryStatusEx.Call(uintptr(unsafe.Pointer(&memoryStatus))) + if ret == 0 { + return nil, fmt.Errorf("failed in GlobalMemoryStatusEx: %s", err) + } + + var memory Stats + memory.Free = memoryStatus.AvailPhys + memory.Total = memoryStatus.TotalPhys + memory.Used = memory.Total - memory.Free + memory.PageFileTotal = memoryStatus.TotalPageFile + memory.PageFileFree = memoryStatus.AvailPageFile + memory.VirtualTotal = memoryStatus.TotalVirtual + memory.VirtualFree = memoryStatus.AvailVirtual + + return &memory, nil +} + +type memoryStatusEx struct { + Length uint32 + MemoryLoad uint32 + TotalPhys uint64 + AvailPhys uint64 + TotalPageFile uint64 + AvailPageFile uint64 + TotalVirtual uint64 + AvailVirtual uint64 + AvailExtendedVirtual uint64 +} + +// Stats represents memory statistics for Windows +type Stats struct { + Total, Used, Free, PageFileTotal, PageFileFree, VirtualTotal, VirtualFree uint64 +} diff --git a/vendor/github.com/mitchellh/go-homedir/LICENSE b/vendor/github.com/mitchellh/go-homedir/LICENSE deleted file mode 100644 index f9c841a51e0..00000000000 --- a/vendor/github.com/mitchellh/go-homedir/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -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/mitchellh/go-homedir/README.md b/vendor/github.com/mitchellh/go-homedir/README.md deleted file mode 100644 index d70706d5b35..00000000000 --- a/vendor/github.com/mitchellh/go-homedir/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# go-homedir - -This is a Go library for detecting the user's home directory without -the use of cgo, so the library can be used in cross-compilation environments. - -Usage is incredibly simple, just call `homedir.Dir()` to get the home directory -for a user, and `homedir.Expand()` to expand the `~` in a path to the home -directory. - -**Why not just use `os/user`?** The built-in `os/user` package requires -cgo on Darwin systems. This means that any Go code that uses that package -cannot cross compile. But 99% of the time the use for `os/user` is just to -retrieve the home directory, which we can do for the current user without -cgo. This library does that, enabling cross-compilation. diff --git a/vendor/github.com/mitchellh/go-homedir/homedir.go b/vendor/github.com/mitchellh/go-homedir/homedir.go deleted file mode 100644 index 25378537ead..00000000000 --- a/vendor/github.com/mitchellh/go-homedir/homedir.go +++ /dev/null @@ -1,167 +0,0 @@ -package homedir - -import ( - "bytes" - "errors" - "os" - "os/exec" - "path/filepath" - "runtime" - "strconv" - "strings" - "sync" -) - -// DisableCache will disable caching of the home directory. Caching is enabled -// by default. -var DisableCache bool - -var homedirCache string -var cacheLock sync.RWMutex - -// Dir returns the home directory for the executing user. -// -// This uses an OS-specific method for discovering the home directory. -// An error is returned if a home directory cannot be detected. -func Dir() (string, error) { - if !DisableCache { - cacheLock.RLock() - cached := homedirCache - cacheLock.RUnlock() - if cached != "" { - return cached, nil - } - } - - cacheLock.Lock() - defer cacheLock.Unlock() - - var result string - var err error - if runtime.GOOS == "windows" { - result, err = dirWindows() - } else { - // Unix-like system, so just assume Unix - result, err = dirUnix() - } - - if err != nil { - return "", err - } - homedirCache = result - return result, nil -} - -// Expand expands the path to include the home directory if the path -// is prefixed with `~`. If it isn't prefixed with `~`, the path is -// returned as-is. -func Expand(path string) (string, error) { - if len(path) == 0 { - return path, nil - } - - if path[0] != '~' { - return path, nil - } - - if len(path) > 1 && path[1] != '/' && path[1] != '\\' { - return "", errors.New("cannot expand user-specific home dir") - } - - dir, err := Dir() - if err != nil { - return "", err - } - - return filepath.Join(dir, path[1:]), nil -} - -// Reset clears the cache, forcing the next call to Dir to re-detect -// the home directory. This generally never has to be called, but can be -// useful in tests if you're modifying the home directory via the HOME -// env var or something. -func Reset() { - cacheLock.Lock() - defer cacheLock.Unlock() - homedirCache = "" -} - -func dirUnix() (string, error) { - homeEnv := "HOME" - if runtime.GOOS == "plan9" { - // On plan9, env vars are lowercase. - homeEnv = "home" - } - - // First prefer the HOME environmental variable - if home := os.Getenv(homeEnv); home != "" { - return home, nil - } - - var stdout bytes.Buffer - - // If that fails, try OS specific commands - if runtime.GOOS == "darwin" { - cmd := exec.Command("sh", "-c", `dscl -q . -read /Users/"$(whoami)" NFSHomeDirectory | sed 's/^[^ ]*: //'`) - cmd.Stdout = &stdout - if err := cmd.Run(); err == nil { - result := strings.TrimSpace(stdout.String()) - if result != "" { - return result, nil - } - } - } else { - cmd := exec.Command("getent", "passwd", strconv.Itoa(os.Getuid())) - cmd.Stdout = &stdout - if err := cmd.Run(); err != nil { - // If the error is ErrNotFound, we ignore it. Otherwise, return it. - if err != exec.ErrNotFound { - return "", err - } - } else { - if passwd := strings.TrimSpace(stdout.String()); passwd != "" { - // username:password:uid:gid:gecos:home:shell - passwdParts := strings.SplitN(passwd, ":", 7) - if len(passwdParts) > 5 { - return passwdParts[5], nil - } - } - } - } - - // If all else fails, try the shell - stdout.Reset() - cmd := exec.Command("sh", "-c", "cd && pwd") - cmd.Stdout = &stdout - if err := cmd.Run(); err != nil { - return "", err - } - - result := strings.TrimSpace(stdout.String()) - if result == "" { - return "", errors.New("blank output when reading home directory") - } - - return result, nil -} - -func dirWindows() (string, error) { - // First prefer the HOME environmental variable - if home := os.Getenv("HOME"); home != "" { - return home, nil - } - - // Prefer standard environment variable USERPROFILE - if home := os.Getenv("USERPROFILE"); home != "" { - return home, nil - } - - drive := os.Getenv("HOMEDRIVE") - path := os.Getenv("HOMEPATH") - home := drive + path - if drive == "" || path == "" { - return "", errors.New("HOMEDRIVE, HOMEPATH, or USERPROFILE are blank") - } - - return home, nil -} diff --git a/vendor/github.com/opentracing/opentracing-go/.gitignore b/vendor/github.com/opentracing/opentracing-go/.gitignore deleted file mode 100644 index c57100a595c..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/.gitignore +++ /dev/null @@ -1 +0,0 @@ -coverage.txt diff --git a/vendor/github.com/opentracing/opentracing-go/.golangci.yml b/vendor/github.com/opentracing/opentracing-go/.golangci.yml deleted file mode 100644 index 011a79406f4..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/.golangci.yml +++ /dev/null @@ -1,3 +0,0 @@ -linters-settings: - staticcheck: - checks: [ "all", "-SA1019" ] diff --git a/vendor/github.com/opentracing/opentracing-go/CHANGELOG.md b/vendor/github.com/opentracing/opentracing-go/CHANGELOG.md deleted file mode 100644 index d3bfcf62359..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/CHANGELOG.md +++ /dev/null @@ -1,63 +0,0 @@ -Changes by Version -================== - - -1.2.0 (2020-07-01) -------------------- - -* Restore the ability to reset the current span in context to nil (#231) -- Yuri Shkuro -* Use error.object per OpenTracing Semantic Conventions (#179) -- Rahman Syed -* Convert nil pointer log field value to string "nil" (#230) -- Cyril Tovena -* Add Go module support (#215) -- Zaba505 -* Make SetTag helper types in ext public (#229) -- Blake Edwards -* Add log/fields helpers for keys from specification (#226) -- Dmitry Monakhov -* Improve noop impementation (#223) -- chanxuehong -* Add an extension to Tracer interface for custom go context creation (#220) -- Krzesimir Nowak -* Fix typo in comments (#222) -- meteorlxy -* Improve documentation for log.Object() to emphasize the requirement to pass immutable arguments (#219) -- 疯狂的小企鹅 -* [mock] Return ErrInvalidSpanContext if span context is not MockSpanContext (#216) -- Milad Irannejad - - -1.1.0 (2019-03-23) -------------------- - -Notable changes: -- The library is now released under Apache 2.0 license -- Use Set() instead of Add() in HTTPHeadersCarrier is functionally a breaking change (fixes issue [#159](https://github.com/opentracing/opentracing-go/issues/159)) -- 'golang.org/x/net/context' is replaced with 'context' from the standard library - -List of all changes: - -- Export StartSpanFromContextWithTracer (#214) -- Add IsGlobalTracerRegistered() to indicate if a tracer has been registered (#201) -- Use Set() instead of Add() in HTTPHeadersCarrier (#191) -- Update license to Apache 2.0 (#181) -- Replace 'golang.org/x/net/context' with 'context' (#176) -- Port of Python opentracing/harness/api_check.py to Go (#146) -- Fix race condition in MockSpan.Context() (#170) -- Add PeerHostIPv4.SetString() (#155) -- Add a Noop log field type to log to allow for optional fields (#150) - - -1.0.2 (2017-04-26) -------------------- - -- Add more semantic tags (#139) - - -1.0.1 (2017-02-06) -------------------- - -- Correct spelling in comments -- Address race in nextMockID() (#123) -- log: avoid panic marshaling nil error (#131) -- Deprecate InitGlobalTracer in favor of SetGlobalTracer (#128) -- Drop Go 1.5 that fails in Travis (#129) -- Add convenience methods Key() and Value() to log.Field -- Add convenience methods to log.Field (2 years, 6 months ago) - -1.0.0 (2016-09-26) -------------------- - -- This release implements OpenTracing Specification 1.0 (https://opentracing.io/spec) - diff --git a/vendor/github.com/opentracing/opentracing-go/LICENSE b/vendor/github.com/opentracing/opentracing-go/LICENSE deleted file mode 100644 index f0027349e83..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/LICENSE +++ /dev/null @@ -1,201 +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 2016 The OpenTracing Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT 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/opentracing/opentracing-go/Makefile b/vendor/github.com/opentracing/opentracing-go/Makefile deleted file mode 100644 index 62abb63f58d..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -.DEFAULT_GOAL := test-and-lint - -.PHONY: test-and-lint -test-and-lint: test lint - -.PHONY: test -test: - go test -v -cover -race ./... - -.PHONY: cover -cover: - go test -v -coverprofile=coverage.txt -covermode=atomic -race ./... - -.PHONY: lint -lint: - go fmt ./... - golint ./... - @# Run again with magic to exit non-zero if golint outputs anything. - @! (golint ./... | read dummy) - go vet ./... diff --git a/vendor/github.com/opentracing/opentracing-go/README.md b/vendor/github.com/opentracing/opentracing-go/README.md deleted file mode 100644 index 6ef1d7c9d27..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/README.md +++ /dev/null @@ -1,171 +0,0 @@ -[![Gitter chat](http://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/opentracing/public) [![Build Status](https://travis-ci.org/opentracing/opentracing-go.svg?branch=master)](https://travis-ci.org/opentracing/opentracing-go) [![GoDoc](https://godoc.org/github.com/opentracing/opentracing-go?status.svg)](http://godoc.org/github.com/opentracing/opentracing-go) -[![Sourcegraph Badge](https://sourcegraph.com/github.com/opentracing/opentracing-go/-/badge.svg)](https://sourcegraph.com/github.com/opentracing/opentracing-go?badge) - -# OpenTracing API for Go - -This package is a Go platform API for OpenTracing. - -## Required Reading - -In order to understand the Go platform API, one must first be familiar with the -[OpenTracing project](https://opentracing.io) and -[terminology](https://opentracing.io/specification/) more specifically. - -## API overview for those adding instrumentation - -Everyday consumers of this `opentracing` package really only need to worry -about a couple of key abstractions: the `StartSpan` function, the `Span` -interface, and binding a `Tracer` at `main()`-time. Here are code snippets -demonstrating some important use cases. - -#### Singleton initialization - -The simplest starting point is `./default_tracer.go`. As early as possible, call - -```go - import "github.com/opentracing/opentracing-go" - import ".../some_tracing_impl" - - func main() { - opentracing.SetGlobalTracer( - // tracing impl specific: - some_tracing_impl.New(...), - ) - ... - } -``` - -#### Non-Singleton initialization - -If you prefer direct control to singletons, manage ownership of the -`opentracing.Tracer` implementation explicitly. - -#### Creating a Span given an existing Go `context.Context` - -If you use `context.Context` in your application, OpenTracing's Go library will -happily rely on it for `Span` propagation. To start a new (blocking child) -`Span`, you can use `StartSpanFromContext`. - -```go - func xyz(ctx context.Context, ...) { - ... - span, ctx := opentracing.StartSpanFromContext(ctx, "operation_name") - defer span.Finish() - span.LogFields( - log.String("event", "soft error"), - log.String("type", "cache timeout"), - log.Int("waited.millis", 1500)) - ... - } -``` - -#### Starting an empty trace by creating a "root span" - -It's always possible to create a "root" `Span` with no parent or other causal -reference. - -```go - func xyz() { - ... - sp := opentracing.StartSpan("operation_name") - defer sp.Finish() - ... - } -``` - -#### Creating a (child) Span given an existing (parent) Span - -```go - func xyz(parentSpan opentracing.Span, ...) { - ... - sp := opentracing.StartSpan( - "operation_name", - opentracing.ChildOf(parentSpan.Context())) - defer sp.Finish() - ... - } -``` - -#### Serializing to the wire - -```go - func makeSomeRequest(ctx context.Context) ... { - if span := opentracing.SpanFromContext(ctx); span != nil { - httpClient := &http.Client{} - httpReq, _ := http.NewRequest("GET", "http://myservice/", nil) - - // Transmit the span's TraceContext as HTTP headers on our - // outbound request. - opentracing.GlobalTracer().Inject( - span.Context(), - opentracing.HTTPHeaders, - opentracing.HTTPHeadersCarrier(httpReq.Header)) - - resp, err := httpClient.Do(httpReq) - ... - } - ... - } -``` - -#### Deserializing from the wire - -```go - http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { - var serverSpan opentracing.Span - appSpecificOperationName := ... - wireContext, err := opentracing.GlobalTracer().Extract( - opentracing.HTTPHeaders, - opentracing.HTTPHeadersCarrier(req.Header)) - if err != nil { - // Optionally record something about err here - } - - // Create the span referring to the RPC client if available. - // If wireContext == nil, a root span will be created. - serverSpan = opentracing.StartSpan( - appSpecificOperationName, - ext.RPCServerOption(wireContext)) - - defer serverSpan.Finish() - - ctx := opentracing.ContextWithSpan(context.Background(), serverSpan) - ... - } -``` - -#### Conditionally capture a field using `log.Noop` - -In some situations, you may want to dynamically decide whether or not -to log a field. For example, you may want to capture additional data, -such as a customer ID, in non-production environments: - -```go - func Customer(order *Order) log.Field { - if os.Getenv("ENVIRONMENT") == "dev" { - return log.String("customer", order.Customer.ID) - } - return log.Noop() - } -``` - -#### Goroutine-safety - -The entire public API is goroutine-safe and does not require external -synchronization. - -## API pointers for those implementing a tracing system - -Tracing system implementors may be able to reuse or copy-paste-modify the `basictracer` package, found [here](https://github.com/opentracing/basictracer-go). In particular, see `basictracer.New(...)`. - -## API compatibility - -For the time being, "mild" backwards-incompatible changes may be made without changing the major version number. As OpenTracing and `opentracing-go` mature, backwards compatibility will become more of a priority. - -## Tracer test suite - -A test suite is available in the [harness](https://godoc.org/github.com/opentracing/opentracing-go/harness) package that can assist Tracer implementors to assert that their Tracer is working correctly. - -## Licensing - -[Apache 2.0 License](./LICENSE). diff --git a/vendor/github.com/opentracing/opentracing-go/ext.go b/vendor/github.com/opentracing/opentracing-go/ext.go deleted file mode 100644 index e11977ebe85..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/ext.go +++ /dev/null @@ -1,24 +0,0 @@ -package opentracing - -import ( - "context" -) - -// TracerContextWithSpanExtension is an extension interface that the -// implementation of the Tracer interface may want to implement. It -// allows to have some control over the go context when the -// ContextWithSpan is invoked. -// -// The primary purpose of this extension are adapters from opentracing -// API to some other tracing API. -type TracerContextWithSpanExtension interface { - // ContextWithSpanHook gets called by the ContextWithSpan - // function, when the Tracer implementation also implements - // this interface. It allows to put extra information into the - // context and make it available to the callers of the - // ContextWithSpan. - // - // This hook is invoked before the ContextWithSpan function - // actually puts the span into the context. - ContextWithSpanHook(ctx context.Context, span Span) context.Context -} diff --git a/vendor/github.com/opentracing/opentracing-go/ext/field.go b/vendor/github.com/opentracing/opentracing-go/ext/field.go deleted file mode 100644 index 8282bd75846..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/ext/field.go +++ /dev/null @@ -1,17 +0,0 @@ -package ext - -import ( - "github.com/opentracing/opentracing-go" - "github.com/opentracing/opentracing-go/log" -) - -// LogError sets the error=true tag on the Span and logs err as an "error" event. -func LogError(span opentracing.Span, err error, fields ...log.Field) { - Error.Set(span, true) - ef := []log.Field{ - log.Event("error"), - log.Error(err), - } - ef = append(ef, fields...) - span.LogFields(ef...) -} diff --git a/vendor/github.com/opentracing/opentracing-go/ext/tags.go b/vendor/github.com/opentracing/opentracing-go/ext/tags.go deleted file mode 100644 index a414b5951f0..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/ext/tags.go +++ /dev/null @@ -1,215 +0,0 @@ -package ext - -import "github.com/opentracing/opentracing-go" - -// These constants define common tag names recommended for better portability across -// tracing systems and languages/platforms. -// -// The tag names are defined as typed strings, so that in addition to the usual use -// -// span.setTag(TagName, value) -// -// they also support value type validation via this additional syntax: -// -// TagName.Set(span, value) -// -var ( - ////////////////////////////////////////////////////////////////////// - // SpanKind (client/server or producer/consumer) - ////////////////////////////////////////////////////////////////////// - - // SpanKind hints at relationship between spans, e.g. client/server - SpanKind = spanKindTagName("span.kind") - - // SpanKindRPCClient marks a span representing the client-side of an RPC - // or other remote call - SpanKindRPCClientEnum = SpanKindEnum("client") - SpanKindRPCClient = opentracing.Tag{Key: string(SpanKind), Value: SpanKindRPCClientEnum} - - // SpanKindRPCServer marks a span representing the server-side of an RPC - // or other remote call - SpanKindRPCServerEnum = SpanKindEnum("server") - SpanKindRPCServer = opentracing.Tag{Key: string(SpanKind), Value: SpanKindRPCServerEnum} - - // SpanKindProducer marks a span representing the producer-side of a - // message bus - SpanKindProducerEnum = SpanKindEnum("producer") - SpanKindProducer = opentracing.Tag{Key: string(SpanKind), Value: SpanKindProducerEnum} - - // SpanKindConsumer marks a span representing the consumer-side of a - // message bus - SpanKindConsumerEnum = SpanKindEnum("consumer") - SpanKindConsumer = opentracing.Tag{Key: string(SpanKind), Value: SpanKindConsumerEnum} - - ////////////////////////////////////////////////////////////////////// - // Component name - ////////////////////////////////////////////////////////////////////// - - // Component is a low-cardinality identifier of the module, library, - // or package that is generating a span. - Component = StringTagName("component") - - ////////////////////////////////////////////////////////////////////// - // Sampling hint - ////////////////////////////////////////////////////////////////////// - - // SamplingPriority determines the priority of sampling this Span. - SamplingPriority = Uint16TagName("sampling.priority") - - ////////////////////////////////////////////////////////////////////// - // Peer tags. These tags can be emitted by either client-side or - // server-side to describe the other side/service in a peer-to-peer - // communications, like an RPC call. - ////////////////////////////////////////////////////////////////////// - - // PeerService records the service name of the peer. - PeerService = StringTagName("peer.service") - - // PeerAddress records the address name of the peer. This may be a "ip:port", - // a bare "hostname", a FQDN or even a database DSN substring - // like "mysql://username@127.0.0.1:3306/dbname" - PeerAddress = StringTagName("peer.address") - - // PeerHostname records the host name of the peer - PeerHostname = StringTagName("peer.hostname") - - // PeerHostIPv4 records IP v4 host address of the peer - PeerHostIPv4 = IPv4TagName("peer.ipv4") - - // PeerHostIPv6 records IP v6 host address of the peer - PeerHostIPv6 = StringTagName("peer.ipv6") - - // PeerPort records port number of the peer - PeerPort = Uint16TagName("peer.port") - - ////////////////////////////////////////////////////////////////////// - // HTTP Tags - ////////////////////////////////////////////////////////////////////// - - // HTTPUrl should be the URL of the request being handled in this segment - // of the trace, in standard URI format. The protocol is optional. - HTTPUrl = StringTagName("http.url") - - // HTTPMethod is the HTTP method of the request, and is case-insensitive. - HTTPMethod = StringTagName("http.method") - - // HTTPStatusCode is the numeric HTTP status code (200, 404, etc) of the - // HTTP response. - HTTPStatusCode = Uint16TagName("http.status_code") - - ////////////////////////////////////////////////////////////////////// - // DB Tags - ////////////////////////////////////////////////////////////////////// - - // DBInstance is database instance name. - DBInstance = StringTagName("db.instance") - - // DBStatement is a database statement for the given database type. - // It can be a query or a prepared statement (i.e., before substitution). - DBStatement = StringTagName("db.statement") - - // DBType is a database type. For any SQL database, "sql". - // For others, the lower-case database category, e.g. "redis" - DBType = StringTagName("db.type") - - // DBUser is a username for accessing database. - DBUser = StringTagName("db.user") - - ////////////////////////////////////////////////////////////////////// - // Message Bus Tag - ////////////////////////////////////////////////////////////////////// - - // MessageBusDestination is an address at which messages can be exchanged - MessageBusDestination = StringTagName("message_bus.destination") - - ////////////////////////////////////////////////////////////////////// - // Error Tag - ////////////////////////////////////////////////////////////////////// - - // Error indicates that operation represented by the span resulted in an error. - Error = BoolTagName("error") -) - -// --- - -// SpanKindEnum represents common span types -type SpanKindEnum string - -type spanKindTagName string - -// Set adds a string tag to the `span` -func (tag spanKindTagName) Set(span opentracing.Span, value SpanKindEnum) { - span.SetTag(string(tag), value) -} - -type rpcServerOption struct { - clientContext opentracing.SpanContext -} - -func (r rpcServerOption) Apply(o *opentracing.StartSpanOptions) { - if r.clientContext != nil { - opentracing.ChildOf(r.clientContext).Apply(o) - } - SpanKindRPCServer.Apply(o) -} - -// RPCServerOption returns a StartSpanOption appropriate for an RPC server span -// with `client` representing the metadata for the remote peer Span if available. -// In case client == nil, due to the client not being instrumented, this RPC -// server span will be a root span. -func RPCServerOption(client opentracing.SpanContext) opentracing.StartSpanOption { - return rpcServerOption{client} -} - -// --- - -// StringTagName is a common tag name to be set to a string value -type StringTagName string - -// Set adds a string tag to the `span` -func (tag StringTagName) Set(span opentracing.Span, value string) { - span.SetTag(string(tag), value) -} - -// --- - -// Uint32TagName is a common tag name to be set to a uint32 value -type Uint32TagName string - -// Set adds a uint32 tag to the `span` -func (tag Uint32TagName) Set(span opentracing.Span, value uint32) { - span.SetTag(string(tag), value) -} - -// --- - -// Uint16TagName is a common tag name to be set to a uint16 value -type Uint16TagName string - -// Set adds a uint16 tag to the `span` -func (tag Uint16TagName) Set(span opentracing.Span, value uint16) { - span.SetTag(string(tag), value) -} - -// --- - -// BoolTagName is a common tag name to be set to a bool value -type BoolTagName string - -// Set adds a bool tag to the `span` -func (tag BoolTagName) Set(span opentracing.Span, value bool) { - span.SetTag(string(tag), value) -} - -// IPv4TagName is a common tag name to be set to an ipv4 value -type IPv4TagName string - -// Set adds IP v4 host address of the peer as an uint32 value to the `span`, keep this for backward and zipkin compatibility -func (tag IPv4TagName) Set(span opentracing.Span, value uint32) { - span.SetTag(string(tag), value) -} - -// SetString records IP v4 host address of the peer as a .-separated tuple to the `span`. E.g., "127.0.0.1" -func (tag IPv4TagName) SetString(span opentracing.Span, value string) { - span.SetTag(string(tag), value) -} diff --git a/vendor/github.com/opentracing/opentracing-go/globaltracer.go b/vendor/github.com/opentracing/opentracing-go/globaltracer.go deleted file mode 100644 index 4f7066a925c..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/globaltracer.go +++ /dev/null @@ -1,42 +0,0 @@ -package opentracing - -type registeredTracer struct { - tracer Tracer - isRegistered bool -} - -var ( - globalTracer = registeredTracer{NoopTracer{}, false} -) - -// SetGlobalTracer sets the [singleton] opentracing.Tracer returned by -// GlobalTracer(). Those who use GlobalTracer (rather than directly manage an -// opentracing.Tracer instance) should call SetGlobalTracer as early as -// possible in main(), prior to calling the `StartSpan` global func below. -// Prior to calling `SetGlobalTracer`, any Spans started via the `StartSpan` -// (etc) globals are noops. -func SetGlobalTracer(tracer Tracer) { - globalTracer = registeredTracer{tracer, true} -} - -// GlobalTracer returns the global singleton `Tracer` implementation. -// Before `SetGlobalTracer()` is called, the `GlobalTracer()` is a noop -// implementation that drops all data handed to it. -func GlobalTracer() Tracer { - return globalTracer.tracer -} - -// StartSpan defers to `Tracer.StartSpan`. See `GlobalTracer()`. -func StartSpan(operationName string, opts ...StartSpanOption) Span { - return globalTracer.tracer.StartSpan(operationName, opts...) -} - -// InitGlobalTracer is deprecated. Please use SetGlobalTracer. -func InitGlobalTracer(tracer Tracer) { - SetGlobalTracer(tracer) -} - -// IsGlobalTracerRegistered returns a `bool` to indicate if a tracer has been globally registered -func IsGlobalTracerRegistered() bool { - return globalTracer.isRegistered -} diff --git a/vendor/github.com/opentracing/opentracing-go/gocontext.go b/vendor/github.com/opentracing/opentracing-go/gocontext.go deleted file mode 100644 index 1831bc9b263..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/gocontext.go +++ /dev/null @@ -1,65 +0,0 @@ -package opentracing - -import "context" - -type contextKey struct{} - -var activeSpanKey = contextKey{} - -// ContextWithSpan returns a new `context.Context` that holds a reference to -// the span. If span is nil, a new context without an active span is returned. -func ContextWithSpan(ctx context.Context, span Span) context.Context { - if span != nil { - if tracerWithHook, ok := span.Tracer().(TracerContextWithSpanExtension); ok { - ctx = tracerWithHook.ContextWithSpanHook(ctx, span) - } - } - return context.WithValue(ctx, activeSpanKey, span) -} - -// SpanFromContext returns the `Span` previously associated with `ctx`, or -// `nil` if no such `Span` could be found. -// -// NOTE: context.Context != SpanContext: the former is Go's intra-process -// context propagation mechanism, and the latter houses OpenTracing's per-Span -// identity and baggage information. -func SpanFromContext(ctx context.Context) Span { - val := ctx.Value(activeSpanKey) - if sp, ok := val.(Span); ok { - return sp - } - return nil -} - -// StartSpanFromContext starts and returns a Span with `operationName`, using -// any Span found within `ctx` as a ChildOfRef. If no such parent could be -// found, StartSpanFromContext creates a root (parentless) Span. -// -// The second return value is a context.Context object built around the -// returned Span. -// -// Example usage: -// -// SomeFunction(ctx context.Context, ...) { -// sp, ctx := opentracing.StartSpanFromContext(ctx, "SomeFunction") -// defer sp.Finish() -// ... -// } -func StartSpanFromContext(ctx context.Context, operationName string, opts ...StartSpanOption) (Span, context.Context) { - return StartSpanFromContextWithTracer(ctx, GlobalTracer(), operationName, opts...) -} - -// StartSpanFromContextWithTracer starts and returns a span with `operationName` -// using a span found within the context as a ChildOfRef. If that doesn't exist -// it creates a root span. It also returns a context.Context object built -// around the returned span. -// -// It's behavior is identical to StartSpanFromContext except that it takes an explicit -// tracer as opposed to using the global tracer. -func StartSpanFromContextWithTracer(ctx context.Context, tracer Tracer, operationName string, opts ...StartSpanOption) (Span, context.Context) { - if parentSpan := SpanFromContext(ctx); parentSpan != nil { - opts = append(opts, ChildOf(parentSpan.Context())) - } - span := tracer.StartSpan(operationName, opts...) - return span, ContextWithSpan(ctx, span) -} diff --git a/vendor/github.com/opentracing/opentracing-go/log/field.go b/vendor/github.com/opentracing/opentracing-go/log/field.go deleted file mode 100644 index f222ded797c..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/log/field.go +++ /dev/null @@ -1,282 +0,0 @@ -package log - -import ( - "fmt" - "math" -) - -type fieldType int - -const ( - stringType fieldType = iota - boolType - intType - int32Type - uint32Type - int64Type - uint64Type - float32Type - float64Type - errorType - objectType - lazyLoggerType - noopType -) - -// Field instances are constructed via LogBool, LogString, and so on. -// Tracing implementations may then handle them via the Field.Marshal -// method. -// -// "heavily influenced by" (i.e., partially stolen from) -// https://github.com/uber-go/zap -type Field struct { - key string - fieldType fieldType - numericVal int64 - stringVal string - interfaceVal interface{} -} - -// String adds a string-valued key:value pair to a Span.LogFields() record -func String(key, val string) Field { - return Field{ - key: key, - fieldType: stringType, - stringVal: val, - } -} - -// Bool adds a bool-valued key:value pair to a Span.LogFields() record -func Bool(key string, val bool) Field { - var numericVal int64 - if val { - numericVal = 1 - } - return Field{ - key: key, - fieldType: boolType, - numericVal: numericVal, - } -} - -// Int adds an int-valued key:value pair to a Span.LogFields() record -func Int(key string, val int) Field { - return Field{ - key: key, - fieldType: intType, - numericVal: int64(val), - } -} - -// Int32 adds an int32-valued key:value pair to a Span.LogFields() record -func Int32(key string, val int32) Field { - return Field{ - key: key, - fieldType: int32Type, - numericVal: int64(val), - } -} - -// Int64 adds an int64-valued key:value pair to a Span.LogFields() record -func Int64(key string, val int64) Field { - return Field{ - key: key, - fieldType: int64Type, - numericVal: val, - } -} - -// Uint32 adds a uint32-valued key:value pair to a Span.LogFields() record -func Uint32(key string, val uint32) Field { - return Field{ - key: key, - fieldType: uint32Type, - numericVal: int64(val), - } -} - -// Uint64 adds a uint64-valued key:value pair to a Span.LogFields() record -func Uint64(key string, val uint64) Field { - return Field{ - key: key, - fieldType: uint64Type, - numericVal: int64(val), - } -} - -// Float32 adds a float32-valued key:value pair to a Span.LogFields() record -func Float32(key string, val float32) Field { - return Field{ - key: key, - fieldType: float32Type, - numericVal: int64(math.Float32bits(val)), - } -} - -// Float64 adds a float64-valued key:value pair to a Span.LogFields() record -func Float64(key string, val float64) Field { - return Field{ - key: key, - fieldType: float64Type, - numericVal: int64(math.Float64bits(val)), - } -} - -// Error adds an error with the key "error.object" to a Span.LogFields() record -func Error(err error) Field { - return Field{ - key: "error.object", - fieldType: errorType, - interfaceVal: err, - } -} - -// Object adds an object-valued key:value pair to a Span.LogFields() record -// Please pass in an immutable object, otherwise there may be concurrency issues. -// Such as passing in the map, log.Object may result in "fatal error: concurrent map iteration and map write". -// Because span is sent asynchronously, it is possible that this map will also be modified. -func Object(key string, obj interface{}) Field { - return Field{ - key: key, - fieldType: objectType, - interfaceVal: obj, - } -} - -// Event creates a string-valued Field for span logs with key="event" and value=val. -func Event(val string) Field { - return String("event", val) -} - -// Message creates a string-valued Field for span logs with key="message" and value=val. -func Message(val string) Field { - return String("message", val) -} - -// LazyLogger allows for user-defined, late-bound logging of arbitrary data -type LazyLogger func(fv Encoder) - -// Lazy adds a LazyLogger to a Span.LogFields() record; the tracing -// implementation will call the LazyLogger function at an indefinite time in -// the future (after Lazy() returns). -func Lazy(ll LazyLogger) Field { - return Field{ - fieldType: lazyLoggerType, - interfaceVal: ll, - } -} - -// Noop creates a no-op log field that should be ignored by the tracer. -// It can be used to capture optional fields, for example those that should -// only be logged in non-production environment: -// -// func customerField(order *Order) log.Field { -// if os.Getenv("ENVIRONMENT") == "dev" { -// return log.String("customer", order.Customer.ID) -// } -// return log.Noop() -// } -// -// span.LogFields(log.String("event", "purchase"), customerField(order)) -// -func Noop() Field { - return Field{ - fieldType: noopType, - } -} - -// Encoder allows access to the contents of a Field (via a call to -// Field.Marshal). -// -// Tracer implementations typically provide an implementation of Encoder; -// OpenTracing callers typically do not need to concern themselves with it. -type Encoder interface { - EmitString(key, value string) - EmitBool(key string, value bool) - EmitInt(key string, value int) - EmitInt32(key string, value int32) - EmitInt64(key string, value int64) - EmitUint32(key string, value uint32) - EmitUint64(key string, value uint64) - EmitFloat32(key string, value float32) - EmitFloat64(key string, value float64) - EmitObject(key string, value interface{}) - EmitLazyLogger(value LazyLogger) -} - -// Marshal passes a Field instance through to the appropriate -// field-type-specific method of an Encoder. -func (lf Field) Marshal(visitor Encoder) { - switch lf.fieldType { - case stringType: - visitor.EmitString(lf.key, lf.stringVal) - case boolType: - visitor.EmitBool(lf.key, lf.numericVal != 0) - case intType: - visitor.EmitInt(lf.key, int(lf.numericVal)) - case int32Type: - visitor.EmitInt32(lf.key, int32(lf.numericVal)) - case int64Type: - visitor.EmitInt64(lf.key, int64(lf.numericVal)) - case uint32Type: - visitor.EmitUint32(lf.key, uint32(lf.numericVal)) - case uint64Type: - visitor.EmitUint64(lf.key, uint64(lf.numericVal)) - case float32Type: - visitor.EmitFloat32(lf.key, math.Float32frombits(uint32(lf.numericVal))) - case float64Type: - visitor.EmitFloat64(lf.key, math.Float64frombits(uint64(lf.numericVal))) - case errorType: - if err, ok := lf.interfaceVal.(error); ok { - visitor.EmitString(lf.key, err.Error()) - } else { - visitor.EmitString(lf.key, "") - } - case objectType: - visitor.EmitObject(lf.key, lf.interfaceVal) - case lazyLoggerType: - visitor.EmitLazyLogger(lf.interfaceVal.(LazyLogger)) - case noopType: - // intentionally left blank - } -} - -// Key returns the field's key. -func (lf Field) Key() string { - return lf.key -} - -// Value returns the field's value as interface{}. -func (lf Field) Value() interface{} { - switch lf.fieldType { - case stringType: - return lf.stringVal - case boolType: - return lf.numericVal != 0 - case intType: - return int(lf.numericVal) - case int32Type: - return int32(lf.numericVal) - case int64Type: - return int64(lf.numericVal) - case uint32Type: - return uint32(lf.numericVal) - case uint64Type: - return uint64(lf.numericVal) - case float32Type: - return math.Float32frombits(uint32(lf.numericVal)) - case float64Type: - return math.Float64frombits(uint64(lf.numericVal)) - case errorType, objectType, lazyLoggerType: - return lf.interfaceVal - case noopType: - return nil - default: - return nil - } -} - -// String returns a string representation of the key and value. -func (lf Field) String() string { - return fmt.Sprint(lf.key, ":", lf.Value()) -} diff --git a/vendor/github.com/opentracing/opentracing-go/log/util.go b/vendor/github.com/opentracing/opentracing-go/log/util.go deleted file mode 100644 index d57e28aa57f..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/log/util.go +++ /dev/null @@ -1,61 +0,0 @@ -package log - -import ( - "fmt" - "reflect" -) - -// InterleavedKVToFields converts keyValues a la Span.LogKV() to a Field slice -// a la Span.LogFields(). -func InterleavedKVToFields(keyValues ...interface{}) ([]Field, error) { - if len(keyValues)%2 != 0 { - return nil, fmt.Errorf("non-even keyValues len: %d", len(keyValues)) - } - fields := make([]Field, len(keyValues)/2) - for i := 0; i*2 < len(keyValues); i++ { - key, ok := keyValues[i*2].(string) - if !ok { - return nil, fmt.Errorf( - "non-string key (pair #%d): %T", - i, keyValues[i*2]) - } - switch typedVal := keyValues[i*2+1].(type) { - case bool: - fields[i] = Bool(key, typedVal) - case string: - fields[i] = String(key, typedVal) - case int: - fields[i] = Int(key, typedVal) - case int8: - fields[i] = Int32(key, int32(typedVal)) - case int16: - fields[i] = Int32(key, int32(typedVal)) - case int32: - fields[i] = Int32(key, typedVal) - case int64: - fields[i] = Int64(key, typedVal) - case uint: - fields[i] = Uint64(key, uint64(typedVal)) - case uint64: - fields[i] = Uint64(key, typedVal) - case uint8: - fields[i] = Uint32(key, uint32(typedVal)) - case uint16: - fields[i] = Uint32(key, uint32(typedVal)) - case uint32: - fields[i] = Uint32(key, typedVal) - case float32: - fields[i] = Float32(key, typedVal) - case float64: - fields[i] = Float64(key, typedVal) - default: - if typedVal == nil || (reflect.ValueOf(typedVal).Kind() == reflect.Ptr && reflect.ValueOf(typedVal).IsNil()) { - fields[i] = String(key, "nil") - continue - } - // When in doubt, coerce to a string - fields[i] = String(key, fmt.Sprint(typedVal)) - } - } - return fields, nil -} diff --git a/vendor/github.com/opentracing/opentracing-go/noop.go b/vendor/github.com/opentracing/opentracing-go/noop.go deleted file mode 100644 index f9b680a213d..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/noop.go +++ /dev/null @@ -1,64 +0,0 @@ -package opentracing - -import "github.com/opentracing/opentracing-go/log" - -// A NoopTracer is a trivial, minimum overhead implementation of Tracer -// for which all operations are no-ops. -// -// The primary use of this implementation is in libraries, such as RPC -// frameworks, that make tracing an optional feature controlled by the -// end user. A no-op implementation allows said libraries to use it -// as the default Tracer and to write instrumentation that does -// not need to keep checking if the tracer instance is nil. -// -// For the same reason, the NoopTracer is the default "global" tracer -// (see GlobalTracer and SetGlobalTracer functions). -// -// WARNING: NoopTracer does not support baggage propagation. -type NoopTracer struct{} - -type noopSpan struct{} -type noopSpanContext struct{} - -var ( - defaultNoopSpanContext SpanContext = noopSpanContext{} - defaultNoopSpan Span = noopSpan{} - defaultNoopTracer Tracer = NoopTracer{} -) - -const ( - emptyString = "" -) - -// noopSpanContext: -func (n noopSpanContext) ForeachBaggageItem(handler func(k, v string) bool) {} - -// noopSpan: -func (n noopSpan) Context() SpanContext { return defaultNoopSpanContext } -func (n noopSpan) SetBaggageItem(key, val string) Span { return n } -func (n noopSpan) BaggageItem(key string) string { return emptyString } -func (n noopSpan) SetTag(key string, value interface{}) Span { return n } -func (n noopSpan) LogFields(fields ...log.Field) {} -func (n noopSpan) LogKV(keyVals ...interface{}) {} -func (n noopSpan) Finish() {} -func (n noopSpan) FinishWithOptions(opts FinishOptions) {} -func (n noopSpan) SetOperationName(operationName string) Span { return n } -func (n noopSpan) Tracer() Tracer { return defaultNoopTracer } -func (n noopSpan) LogEvent(event string) {} -func (n noopSpan) LogEventWithPayload(event string, payload interface{}) {} -func (n noopSpan) Log(data LogData) {} - -// StartSpan belongs to the Tracer interface. -func (n NoopTracer) StartSpan(operationName string, opts ...StartSpanOption) Span { - return defaultNoopSpan -} - -// Inject belongs to the Tracer interface. -func (n NoopTracer) Inject(sp SpanContext, format interface{}, carrier interface{}) error { - return nil -} - -// Extract belongs to the Tracer interface. -func (n NoopTracer) Extract(format interface{}, carrier interface{}) (SpanContext, error) { - return nil, ErrSpanContextNotFound -} diff --git a/vendor/github.com/opentracing/opentracing-go/propagation.go b/vendor/github.com/opentracing/opentracing-go/propagation.go deleted file mode 100644 index b0c275eb05e..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/propagation.go +++ /dev/null @@ -1,176 +0,0 @@ -package opentracing - -import ( - "errors" - "net/http" -) - -/////////////////////////////////////////////////////////////////////////////// -// CORE PROPAGATION INTERFACES: -/////////////////////////////////////////////////////////////////////////////// - -var ( - // ErrUnsupportedFormat occurs when the `format` passed to Tracer.Inject() or - // Tracer.Extract() is not recognized by the Tracer implementation. - ErrUnsupportedFormat = errors.New("opentracing: Unknown or unsupported Inject/Extract format") - - // ErrSpanContextNotFound occurs when the `carrier` passed to - // Tracer.Extract() is valid and uncorrupted but has insufficient - // information to extract a SpanContext. - ErrSpanContextNotFound = errors.New("opentracing: SpanContext not found in Extract carrier") - - // ErrInvalidSpanContext errors occur when Tracer.Inject() is asked to - // operate on a SpanContext which it is not prepared to handle (for - // example, since it was created by a different tracer implementation). - ErrInvalidSpanContext = errors.New("opentracing: SpanContext type incompatible with tracer") - - // ErrInvalidCarrier errors occur when Tracer.Inject() or Tracer.Extract() - // implementations expect a different type of `carrier` than they are - // given. - ErrInvalidCarrier = errors.New("opentracing: Invalid Inject/Extract carrier") - - // ErrSpanContextCorrupted occurs when the `carrier` passed to - // Tracer.Extract() is of the expected type but is corrupted. - ErrSpanContextCorrupted = errors.New("opentracing: SpanContext data corrupted in Extract carrier") -) - -/////////////////////////////////////////////////////////////////////////////// -// BUILTIN PROPAGATION FORMATS: -/////////////////////////////////////////////////////////////////////////////// - -// BuiltinFormat is used to demarcate the values within package `opentracing` -// that are intended for use with the Tracer.Inject() and Tracer.Extract() -// methods. -type BuiltinFormat byte - -const ( - // Binary represents SpanContexts as opaque binary data. - // - // For Tracer.Inject(): the carrier must be an `io.Writer`. - // - // For Tracer.Extract(): the carrier must be an `io.Reader`. - Binary BuiltinFormat = iota - - // TextMap represents SpanContexts as key:value string pairs. - // - // Unlike HTTPHeaders, the TextMap format does not restrict the key or - // value character sets in any way. - // - // For Tracer.Inject(): the carrier must be a `TextMapWriter`. - // - // For Tracer.Extract(): the carrier must be a `TextMapReader`. - TextMap - - // HTTPHeaders represents SpanContexts as HTTP header string pairs. - // - // Unlike TextMap, the HTTPHeaders format requires that the keys and values - // be valid as HTTP headers as-is (i.e., character casing may be unstable - // and special characters are disallowed in keys, values should be - // URL-escaped, etc). - // - // For Tracer.Inject(): the carrier must be a `TextMapWriter`. - // - // For Tracer.Extract(): the carrier must be a `TextMapReader`. - // - // See HTTPHeadersCarrier for an implementation of both TextMapWriter - // and TextMapReader that defers to an http.Header instance for storage. - // For example, Inject(): - // - // carrier := opentracing.HTTPHeadersCarrier(httpReq.Header) - // err := span.Tracer().Inject( - // span.Context(), opentracing.HTTPHeaders, carrier) - // - // Or Extract(): - // - // carrier := opentracing.HTTPHeadersCarrier(httpReq.Header) - // clientContext, err := tracer.Extract( - // opentracing.HTTPHeaders, carrier) - // - HTTPHeaders -) - -// TextMapWriter is the Inject() carrier for the TextMap builtin format. With -// it, the caller can encode a SpanContext for propagation as entries in a map -// of unicode strings. -type TextMapWriter interface { - // Set a key:value pair to the carrier. Multiple calls to Set() for the - // same key leads to undefined behavior. - // - // NOTE: The backing store for the TextMapWriter may contain data unrelated - // to SpanContext. As such, Inject() and Extract() implementations that - // call the TextMapWriter and TextMapReader interfaces must agree on a - // prefix or other convention to distinguish their own key:value pairs. - Set(key, val string) -} - -// TextMapReader is the Extract() carrier for the TextMap builtin format. With it, -// the caller can decode a propagated SpanContext as entries in a map of -// unicode strings. -type TextMapReader interface { - // ForeachKey returns TextMap contents via repeated calls to the `handler` - // function. If any call to `handler` returns a non-nil error, ForeachKey - // terminates and returns that error. - // - // NOTE: The backing store for the TextMapReader may contain data unrelated - // to SpanContext. As such, Inject() and Extract() implementations that - // call the TextMapWriter and TextMapReader interfaces must agree on a - // prefix or other convention to distinguish their own key:value pairs. - // - // The "foreach" callback pattern reduces unnecessary copying in some cases - // and also allows implementations to hold locks while the map is read. - ForeachKey(handler func(key, val string) error) error -} - -// TextMapCarrier allows the use of regular map[string]string -// as both TextMapWriter and TextMapReader. -type TextMapCarrier map[string]string - -// ForeachKey conforms to the TextMapReader interface. -func (c TextMapCarrier) ForeachKey(handler func(key, val string) error) error { - for k, v := range c { - if err := handler(k, v); err != nil { - return err - } - } - return nil -} - -// Set implements Set() of opentracing.TextMapWriter -func (c TextMapCarrier) Set(key, val string) { - c[key] = val -} - -// HTTPHeadersCarrier satisfies both TextMapWriter and TextMapReader. -// -// Example usage for server side: -// -// carrier := opentracing.HTTPHeadersCarrier(httpReq.Header) -// clientContext, err := tracer.Extract(opentracing.HTTPHeaders, carrier) -// -// Example usage for client side: -// -// carrier := opentracing.HTTPHeadersCarrier(httpReq.Header) -// err := tracer.Inject( -// span.Context(), -// opentracing.HTTPHeaders, -// carrier) -// -type HTTPHeadersCarrier http.Header - -// Set conforms to the TextMapWriter interface. -func (c HTTPHeadersCarrier) Set(key, val string) { - h := http.Header(c) - h.Set(key, val) -} - -// ForeachKey conforms to the TextMapReader interface. -func (c HTTPHeadersCarrier) ForeachKey(handler func(key, val string) error) error { - for k, vals := range c { - for _, v := range vals { - if err := handler(k, v); err != nil { - return err - } - } - } - return nil -} diff --git a/vendor/github.com/opentracing/opentracing-go/span.go b/vendor/github.com/opentracing/opentracing-go/span.go deleted file mode 100644 index 0d3fb534183..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/span.go +++ /dev/null @@ -1,189 +0,0 @@ -package opentracing - -import ( - "time" - - "github.com/opentracing/opentracing-go/log" -) - -// SpanContext represents Span state that must propagate to descendant Spans and across process -// boundaries (e.g., a tuple). -type SpanContext interface { - // ForeachBaggageItem grants access to all baggage items stored in the - // SpanContext. - // The handler function will be called for each baggage key/value pair. - // The ordering of items is not guaranteed. - // - // The bool return value indicates if the handler wants to continue iterating - // through the rest of the baggage items; for example if the handler is trying to - // find some baggage item by pattern matching the name, it can return false - // as soon as the item is found to stop further iterations. - ForeachBaggageItem(handler func(k, v string) bool) -} - -// Span represents an active, un-finished span in the OpenTracing system. -// -// Spans are created by the Tracer interface. -type Span interface { - // Sets the end timestamp and finalizes Span state. - // - // With the exception of calls to Context() (which are always allowed), - // Finish() must be the last call made to any span instance, and to do - // otherwise leads to undefined behavior. - Finish() - // FinishWithOptions is like Finish() but with explicit control over - // timestamps and log data. - FinishWithOptions(opts FinishOptions) - - // Context() yields the SpanContext for this Span. Note that the return - // value of Context() is still valid after a call to Span.Finish(), as is - // a call to Span.Context() after a call to Span.Finish(). - Context() SpanContext - - // Sets or changes the operation name. - // - // Returns a reference to this Span for chaining. - SetOperationName(operationName string) Span - - // Adds a tag to the span. - // - // If there is a pre-existing tag set for `key`, it is overwritten. - // - // Tag values can be numeric types, strings, or bools. The behavior of - // other tag value types is undefined at the OpenTracing level. If a - // tracing system does not know how to handle a particular value type, it - // may ignore the tag, but shall not panic. - // - // Returns a reference to this Span for chaining. - SetTag(key string, value interface{}) Span - - // LogFields is an efficient and type-checked way to record key:value - // logging data about a Span, though the programming interface is a little - // more verbose than LogKV(). Here's an example: - // - // span.LogFields( - // log.String("event", "soft error"), - // log.String("type", "cache timeout"), - // log.Int("waited.millis", 1500)) - // - // Also see Span.FinishWithOptions() and FinishOptions.BulkLogData. - LogFields(fields ...log.Field) - - // LogKV is a concise, readable way to record key:value logging data about - // a Span, though unfortunately this also makes it less efficient and less - // type-safe than LogFields(). Here's an example: - // - // span.LogKV( - // "event", "soft error", - // "type", "cache timeout", - // "waited.millis", 1500) - // - // For LogKV (as opposed to LogFields()), the parameters must appear as - // key-value pairs, like - // - // span.LogKV(key1, val1, key2, val2, key3, val3, ...) - // - // The keys must all be strings. The values may be strings, numeric types, - // bools, Go error instances, or arbitrary structs. - // - // (Note to implementors: consider the log.InterleavedKVToFields() helper) - LogKV(alternatingKeyValues ...interface{}) - - // SetBaggageItem sets a key:value pair on this Span and its SpanContext - // that also propagates to descendants of this Span. - // - // SetBaggageItem() enables powerful functionality given a full-stack - // opentracing integration (e.g., arbitrary application data from a mobile - // app can make it, transparently, all the way into the depths of a storage - // system), and with it some powerful costs: use this feature with care. - // - // IMPORTANT NOTE #1: SetBaggageItem() will only propagate baggage items to - // *future* causal descendants of the associated Span. - // - // IMPORTANT NOTE #2: Use this thoughtfully and with care. Every key and - // value is copied into every local *and remote* child of the associated - // Span, and that can add up to a lot of network and cpu overhead. - // - // Returns a reference to this Span for chaining. - SetBaggageItem(restrictedKey, value string) Span - - // Gets the value for a baggage item given its key. Returns the empty string - // if the value isn't found in this Span. - BaggageItem(restrictedKey string) string - - // Provides access to the Tracer that created this Span. - Tracer() Tracer - - // Deprecated: use LogFields or LogKV - LogEvent(event string) - // Deprecated: use LogFields or LogKV - LogEventWithPayload(event string, payload interface{}) - // Deprecated: use LogFields or LogKV - Log(data LogData) -} - -// LogRecord is data associated with a single Span log. Every LogRecord -// instance must specify at least one Field. -type LogRecord struct { - Timestamp time.Time - Fields []log.Field -} - -// FinishOptions allows Span.FinishWithOptions callers to override the finish -// timestamp and provide log data via a bulk interface. -type FinishOptions struct { - // FinishTime overrides the Span's finish time, or implicitly becomes - // time.Now() if FinishTime.IsZero(). - // - // FinishTime must resolve to a timestamp that's >= the Span's StartTime - // (per StartSpanOptions). - FinishTime time.Time - - // LogRecords allows the caller to specify the contents of many LogFields() - // calls with a single slice. May be nil. - // - // None of the LogRecord.Timestamp values may be .IsZero() (i.e., they must - // be set explicitly). Also, they must be >= the Span's start timestamp and - // <= the FinishTime (or time.Now() if FinishTime.IsZero()). Otherwise the - // behavior of FinishWithOptions() is undefined. - // - // If specified, the caller hands off ownership of LogRecords at - // FinishWithOptions() invocation time. - // - // If specified, the (deprecated) BulkLogData must be nil or empty. - LogRecords []LogRecord - - // BulkLogData is DEPRECATED. - BulkLogData []LogData -} - -// LogData is DEPRECATED -type LogData struct { - Timestamp time.Time - Event string - Payload interface{} -} - -// ToLogRecord converts a deprecated LogData to a non-deprecated LogRecord -func (ld *LogData) ToLogRecord() LogRecord { - var literalTimestamp time.Time - if ld.Timestamp.IsZero() { - literalTimestamp = time.Now() - } else { - literalTimestamp = ld.Timestamp - } - rval := LogRecord{ - Timestamp: literalTimestamp, - } - if ld.Payload == nil { - rval.Fields = []log.Field{ - log.String("event", ld.Event), - } - } else { - rval.Fields = []log.Field{ - log.String("event", ld.Event), - log.Object("payload", ld.Payload), - } - } - return rval -} diff --git a/vendor/github.com/opentracing/opentracing-go/tracer.go b/vendor/github.com/opentracing/opentracing-go/tracer.go deleted file mode 100644 index 715f0cedfb6..00000000000 --- a/vendor/github.com/opentracing/opentracing-go/tracer.go +++ /dev/null @@ -1,304 +0,0 @@ -package opentracing - -import "time" - -// Tracer is a simple, thin interface for Span creation and SpanContext -// propagation. -type Tracer interface { - - // Create, start, and return a new Span with the given `operationName` and - // incorporate the given StartSpanOption `opts`. (Note that `opts` borrows - // from the "functional options" pattern, per - // http://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis) - // - // A Span with no SpanReference options (e.g., opentracing.ChildOf() or - // opentracing.FollowsFrom()) becomes the root of its own trace. - // - // Examples: - // - // var tracer opentracing.Tracer = ... - // - // // The root-span case: - // sp := tracer.StartSpan("GetFeed") - // - // // The vanilla child span case: - // sp := tracer.StartSpan( - // "GetFeed", - // opentracing.ChildOf(parentSpan.Context())) - // - // // All the bells and whistles: - // sp := tracer.StartSpan( - // "GetFeed", - // opentracing.ChildOf(parentSpan.Context()), - // opentracing.Tag{"user_agent", loggedReq.UserAgent}, - // opentracing.StartTime(loggedReq.Timestamp), - // ) - // - StartSpan(operationName string, opts ...StartSpanOption) Span - - // Inject() takes the `sm` SpanContext instance and injects it for - // propagation within `carrier`. The actual type of `carrier` depends on - // the value of `format`. - // - // OpenTracing defines a common set of `format` values (see BuiltinFormat), - // and each has an expected carrier type. - // - // Other packages may declare their own `format` values, much like the keys - // used by `context.Context` (see https://godoc.org/context#WithValue). - // - // Example usage (sans error handling): - // - // carrier := opentracing.HTTPHeadersCarrier(httpReq.Header) - // err := tracer.Inject( - // span.Context(), - // opentracing.HTTPHeaders, - // carrier) - // - // NOTE: All opentracing.Tracer implementations MUST support all - // BuiltinFormats. - // - // Implementations may return opentracing.ErrUnsupportedFormat if `format` - // is not supported by (or not known by) the implementation. - // - // Implementations may return opentracing.ErrInvalidCarrier or any other - // implementation-specific error if the format is supported but injection - // fails anyway. - // - // See Tracer.Extract(). - Inject(sm SpanContext, format interface{}, carrier interface{}) error - - // Extract() returns a SpanContext instance given `format` and `carrier`. - // - // OpenTracing defines a common set of `format` values (see BuiltinFormat), - // and each has an expected carrier type. - // - // Other packages may declare their own `format` values, much like the keys - // used by `context.Context` (see - // https://godoc.org/golang.org/x/net/context#WithValue). - // - // Example usage (with StartSpan): - // - // - // carrier := opentracing.HTTPHeadersCarrier(httpReq.Header) - // clientContext, err := tracer.Extract(opentracing.HTTPHeaders, carrier) - // - // // ... assuming the ultimate goal here is to resume the trace with a - // // server-side Span: - // var serverSpan opentracing.Span - // if err == nil { - // span = tracer.StartSpan( - // rpcMethodName, ext.RPCServerOption(clientContext)) - // } else { - // span = tracer.StartSpan(rpcMethodName) - // } - // - // - // NOTE: All opentracing.Tracer implementations MUST support all - // BuiltinFormats. - // - // Return values: - // - A successful Extract returns a SpanContext instance and a nil error - // - If there was simply no SpanContext to extract in `carrier`, Extract() - // returns (nil, opentracing.ErrSpanContextNotFound) - // - If `format` is unsupported or unrecognized, Extract() returns (nil, - // opentracing.ErrUnsupportedFormat) - // - If there are more fundamental problems with the `carrier` object, - // Extract() may return opentracing.ErrInvalidCarrier, - // opentracing.ErrSpanContextCorrupted, or implementation-specific - // errors. - // - // See Tracer.Inject(). - Extract(format interface{}, carrier interface{}) (SpanContext, error) -} - -// StartSpanOptions allows Tracer.StartSpan() callers and implementors a -// mechanism to override the start timestamp, specify Span References, and make -// a single Tag or multiple Tags available at Span start time. -// -// StartSpan() callers should look at the StartSpanOption interface and -// implementations available in this package. -// -// Tracer implementations can convert a slice of `StartSpanOption` instances -// into a `StartSpanOptions` struct like so: -// -// func StartSpan(opName string, opts ...opentracing.StartSpanOption) { -// sso := opentracing.StartSpanOptions{} -// for _, o := range opts { -// o.Apply(&sso) -// } -// ... -// } -// -type StartSpanOptions struct { - // Zero or more causal references to other Spans (via their SpanContext). - // If empty, start a "root" Span (i.e., start a new trace). - References []SpanReference - - // StartTime overrides the Span's start time, or implicitly becomes - // time.Now() if StartTime.IsZero(). - StartTime time.Time - - // Tags may have zero or more entries; the restrictions on map values are - // identical to those for Span.SetTag(). May be nil. - // - // If specified, the caller hands off ownership of Tags at - // StartSpan() invocation time. - Tags map[string]interface{} -} - -// StartSpanOption instances (zero or more) may be passed to Tracer.StartSpan. -// -// StartSpanOption borrows from the "functional options" pattern, per -// http://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis -type StartSpanOption interface { - Apply(*StartSpanOptions) -} - -// SpanReferenceType is an enum type describing different categories of -// relationships between two Spans. If Span-2 refers to Span-1, the -// SpanReferenceType describes Span-1 from Span-2's perspective. For example, -// ChildOfRef means that Span-1 created Span-2. -// -// NOTE: Span-1 and Span-2 do *not* necessarily depend on each other for -// completion; e.g., Span-2 may be part of a background job enqueued by Span-1, -// or Span-2 may be sitting in a distributed queue behind Span-1. -type SpanReferenceType int - -const ( - // ChildOfRef refers to a parent Span that caused *and* somehow depends - // upon the new child Span. Often (but not always), the parent Span cannot - // finish until the child Span does. - // - // An timing diagram for a ChildOfRef that's blocked on the new Span: - // - // [-Parent Span---------] - // [-Child Span----] - // - // See http://opentracing.io/spec/ - // - // See opentracing.ChildOf() - ChildOfRef SpanReferenceType = iota - - // FollowsFromRef refers to a parent Span that does not depend in any way - // on the result of the new child Span. For instance, one might use - // FollowsFromRefs to describe pipeline stages separated by queues, - // or a fire-and-forget cache insert at the tail end of a web request. - // - // A FollowsFromRef Span is part of the same logical trace as the new Span: - // i.e., the new Span is somehow caused by the work of its FollowsFromRef. - // - // All of the following could be valid timing diagrams for children that - // "FollowFrom" a parent. - // - // [-Parent Span-] [-Child Span-] - // - // - // [-Parent Span--] - // [-Child Span-] - // - // - // [-Parent Span-] - // [-Child Span-] - // - // See http://opentracing.io/spec/ - // - // See opentracing.FollowsFrom() - FollowsFromRef -) - -// SpanReference is a StartSpanOption that pairs a SpanReferenceType and a -// referenced SpanContext. See the SpanReferenceType documentation for -// supported relationships. If SpanReference is created with -// ReferencedContext==nil, it has no effect. Thus it allows for a more concise -// syntax for starting spans: -// -// sc, _ := tracer.Extract(someFormat, someCarrier) -// span := tracer.StartSpan("operation", opentracing.ChildOf(sc)) -// -// The `ChildOf(sc)` option above will not panic if sc == nil, it will just -// not add the parent span reference to the options. -type SpanReference struct { - Type SpanReferenceType - ReferencedContext SpanContext -} - -// Apply satisfies the StartSpanOption interface. -func (r SpanReference) Apply(o *StartSpanOptions) { - if r.ReferencedContext != nil { - o.References = append(o.References, r) - } -} - -// ChildOf returns a StartSpanOption pointing to a dependent parent span. -// If sc == nil, the option has no effect. -// -// See ChildOfRef, SpanReference -func ChildOf(sc SpanContext) SpanReference { - return SpanReference{ - Type: ChildOfRef, - ReferencedContext: sc, - } -} - -// FollowsFrom returns a StartSpanOption pointing to a parent Span that caused -// the child Span but does not directly depend on its result in any way. -// If sc == nil, the option has no effect. -// -// See FollowsFromRef, SpanReference -func FollowsFrom(sc SpanContext) SpanReference { - return SpanReference{ - Type: FollowsFromRef, - ReferencedContext: sc, - } -} - -// StartTime is a StartSpanOption that sets an explicit start timestamp for the -// new Span. -type StartTime time.Time - -// Apply satisfies the StartSpanOption interface. -func (t StartTime) Apply(o *StartSpanOptions) { - o.StartTime = time.Time(t) -} - -// Tags are a generic map from an arbitrary string key to an opaque value type. -// The underlying tracing system is responsible for interpreting and -// serializing the values. -type Tags map[string]interface{} - -// Apply satisfies the StartSpanOption interface. -func (t Tags) Apply(o *StartSpanOptions) { - if o.Tags == nil { - o.Tags = make(map[string]interface{}) - } - for k, v := range t { - o.Tags[k] = v - } -} - -// Tag may be passed as a StartSpanOption to add a tag to new spans, -// or its Set method may be used to apply the tag to an existing Span, -// for example: -// -// tracer.StartSpan("opName", Tag{"Key", value}) -// -// or -// -// Tag{"key", value}.Set(span) -type Tag struct { - Key string - Value interface{} -} - -// Apply satisfies the StartSpanOption interface. -func (t Tag) Apply(o *StartSpanOptions) { - if o.Tags == nil { - o.Tags = make(map[string]interface{}) - } - o.Tags[t.Key] = t.Value -} - -// Set applies the tag to an existing Span. -func (t Tag) Set(s Span) { - s.SetTag(t.Key, t.Value) -} diff --git a/vendor/github.com/power-devops/perfstat/LICENSE b/vendor/github.com/power-devops/perfstat/LICENSE deleted file mode 100644 index ec4e5d39d8c..00000000000 --- a/vendor/github.com/power-devops/perfstat/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -Copyright (c) 2020 Power DevOps - -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/power-devops/perfstat/c_helpers.c b/vendor/github.com/power-devops/perfstat/c_helpers.c deleted file mode 100644 index 49ba1ad7eb6..00000000000 --- a/vendor/github.com/power-devops/perfstat/c_helpers.c +++ /dev/null @@ -1,159 +0,0 @@ -#include "c_helpers.h" - -GETFUNC(cpu) -GETFUNC(disk) -GETFUNC(diskadapter) -GETFUNC(diskpath) -GETFUNC(fcstat) -GETFUNC(logicalvolume) -GETFUNC(memory_page) -GETFUNC(netadapter) -GETFUNC(netbuffer) -GETFUNC(netinterface) -GETFUNC(pagingspace) -GETFUNC(process) -GETFUNC(thread) -GETFUNC(volumegroup) - -double get_partition_mhz(perfstat_partition_config_t pinfo) { - return pinfo.processorMHz; -} - -char *get_ps_hostname(perfstat_pagingspace_t *ps) { - return ps->u.nfs_paging.hostname; -} - -char *get_ps_filename(perfstat_pagingspace_t *ps) { - return ps->u.nfs_paging.filename; -} - -char *get_ps_vgname(perfstat_pagingspace_t *ps) { - return ps->u.lv_paging.vgname; -} - -time_t boottime() -{ - register struct utmpx *utmp; - - setutxent(); - while ( (utmp = getutxent()) != NULL ) { - if (utmp->ut_type == BOOT_TIME) { - return utmp->ut_tv.tv_sec; - } - } - endutxent(); - return -1; -} - -struct fsinfo *get_filesystem_stat(struct fsinfo *fs_all, int n) { - if (!fs_all) return NULL; - return &(fs_all[n]); -} - -int get_mounts(struct vmount **vmountpp) { - int size; - struct vmount *vm; - int nmounts; - - size = BUFSIZ; - - while (1) { - if ((vm = (struct vmount *)malloc((size_t)size)) == NULL) { - perror("malloc failed"); - exit(-1); - } - if ((nmounts = mntctl(MCTL_QUERY, size, (caddr_t)vm)) > 0) { - *vmountpp = vm; - return nmounts; - } else if (nmounts == 0) { - size = *(int *)vm; - free((void *)vm); - } else { - free((void *)vm); - return -1; - } - } -} - -void fill_fsinfo(struct statfs statbuf, struct fsinfo *fs) { - fsblkcnt_t freeblks, totblks, usedblks; - fsblkcnt_t tinodes, ninodes, ifree; - uint cfactor; - - if (statbuf.f_blocks == -1) { - fs->totalblks = 0; - fs->freeblks = 0; - fs->totalinodes = 0; - fs->freeinodes = 0; - return; - } - - cfactor = statbuf.f_bsize / 512; - fs->freeblks = statbuf.f_bavail * cfactor; - fs->totalblks = statbuf.f_blocks * cfactor; - - fs->freeinodes = statbuf.f_ffree; - fs->totalinodes = statbuf.f_files; - - if (fs->freeblks < 0) - fs->freeblks = 0; -} - -int getfsinfo(char *fsname, char *devname, char *host, char *options, int flags, int fstype, struct fsinfo *fs) { - struct statfs statbuf; - int devname_size = strlen(devname); - int fsname_size = strlen(fsname); - char buf[BUFSIZ]; - char *p; - - if (fs == NULL) { - return 1; - } - - for (p = strtok(options, ","); p != NULL; p = strtok(NULL, ",")) - if (strcmp(p, "ignore") == 0) - return 0; - - if (*host != 0 && strcmp(host, "-") != 0) { - sprintf(buf, "%s:%s", host, devname); - devname = buf; - } - fs->devname = (char *)calloc(devname_size+1, 1); - fs->fsname = (char *)calloc(fsname_size+1, 1); - strncpy(fs->devname, devname, devname_size); - strncpy(fs->fsname, fsname, fsname_size); - fs->flags = flags; - fs->fstype = fstype; - - if (statfs(fsname,&statbuf) < 0) { - return 1; - } - - fill_fsinfo(statbuf, fs); - return 0; -} - -struct fsinfo *get_all_fs(int *rc) { - struct vmount *mnt; - struct fsinfo *fs_all; - int nmounts; - - *rc = -1; - if ((nmounts = get_mounts(&mnt)) <= 0) { - perror("Can't get mount table info"); - return NULL; - } - - fs_all = (struct fsinfo *)calloc(sizeof(struct fsinfo), nmounts); - while ((*rc)++, nmounts--) { - getfsinfo(vmt2dataptr(mnt, VMT_STUB), - vmt2dataptr(mnt, VMT_OBJECT), - vmt2dataptr(mnt, VMT_HOST), - vmt2dataptr(mnt, VMT_ARGS), - mnt->vmt_flags, - mnt->vmt_gfstype, - &fs_all[*rc]); - mnt = (struct vmount *)((char *)mnt + mnt->vmt_length); - } - return fs_all; -} diff --git a/vendor/github.com/power-devops/perfstat/c_helpers.h b/vendor/github.com/power-devops/perfstat/c_helpers.h deleted file mode 100644 index b66bc53c3c1..00000000000 --- a/vendor/github.com/power-devops/perfstat/c_helpers.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef C_HELPERS_H -#define C_HELPERS_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define GETFUNC(TYPE) perfstat_##TYPE##_t *get_##TYPE##_stat(perfstat_##TYPE##_t *b, int n) { \ - if (!b) return NULL; \ - return &(b[n]); \ -} - -#define GETFUNC_EXT(TYPE) extern perfstat_##TYPE##_t *get_##TYPE##_stat(perfstat_##TYPE##_t *, int); - -GETFUNC_EXT(cpu) -GETFUNC_EXT(disk) -GETFUNC_EXT(diskadapter) -GETFUNC_EXT(diskpath) -GETFUNC_EXT(fcstat) -GETFUNC_EXT(logicalvolume) -GETFUNC_EXT(memory_page) -GETFUNC_EXT(netadapter) -GETFUNC_EXT(netbuffer) -GETFUNC_EXT(netinterface) -GETFUNC_EXT(pagingspace) -GETFUNC_EXT(process) -GETFUNC_EXT(thread) -GETFUNC_EXT(volumegroup) - -struct fsinfo { - char *devname; - char *fsname; - int flags; - int fstype; - unsigned long totalblks; - unsigned long freeblks; - unsigned long totalinodes; - unsigned long freeinodes; -}; - -extern double get_partition_mhz(perfstat_partition_config_t); -extern char *get_ps_hostname(perfstat_pagingspace_t *); -extern char *get_ps_filename(perfstat_pagingspace_t *); -extern char *get_ps_vgname(perfstat_pagingspace_t *); -extern time_t boottime(); -struct fsinfo *get_filesystem_stat(struct fsinfo *, int); -int get_mounts(struct vmount **); -void fill_statfs(struct statfs, struct fsinfo *); -int getfsinfo(char *, char *, char *, char *, int, int, struct fsinfo *); -struct fsinfo *get_all_fs(int *); - -#endif diff --git a/vendor/github.com/power-devops/perfstat/config.go b/vendor/github.com/power-devops/perfstat/config.go deleted file mode 100644 index de7230d28c0..00000000000 --- a/vendor/github.com/power-devops/perfstat/config.go +++ /dev/null @@ -1,18 +0,0 @@ -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -*/ -import "C" - -func EnableLVMStat() { - C.perfstat_config(C.PERFSTAT_ENABLE|C.PERFSTAT_LV|C.PERFSTAT_VG, nil) -} - -func DisableLVMStat() { - C.perfstat_config(C.PERFSTAT_DISABLE|C.PERFSTAT_LV|C.PERFSTAT_VG, nil) -} diff --git a/vendor/github.com/power-devops/perfstat/cpustat.go b/vendor/github.com/power-devops/perfstat/cpustat.go deleted file mode 100644 index 902727fb8f7..00000000000 --- a/vendor/github.com/power-devops/perfstat/cpustat.go +++ /dev/null @@ -1,98 +0,0 @@ -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include - -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "runtime" - "time" - "unsafe" -) - -func CpuStat() ([]CPU, error) { - var cpustat *C.perfstat_cpu_t - var cpu C.perfstat_id_t - - ncpu := runtime.NumCPU() - - cpustat_len := C.sizeof_perfstat_cpu_t * C.ulong(ncpu) - cpustat = (*C.perfstat_cpu_t)(C.malloc(cpustat_len)) - defer C.free(unsafe.Pointer(cpustat)) - C.strcpy(&cpu.name[0], C.CString(C.FIRST_CPU)) - r := C.perfstat_cpu(&cpu, cpustat, C.sizeof_perfstat_cpu_t, C.int(ncpu)) - if r <= 0 { - return nil, fmt.Errorf("error perfstat_cpu()") - } - c := make([]CPU, r) - for i := 0; i < int(r); i++ { - n := C.get_cpu_stat(cpustat, C.int(i)) - if n != nil { - c[i] = perfstatcpu2cpu(n) - } - } - return c, nil -} - -func CpuTotalStat() (*CPUTotal, error) { - var cpustat *C.perfstat_cpu_total_t - - cpustat = (*C.perfstat_cpu_total_t)(C.malloc(C.sizeof_perfstat_cpu_total_t)) - defer C.free(unsafe.Pointer(cpustat)) - r := C.perfstat_cpu_total(nil, cpustat, C.sizeof_perfstat_cpu_total_t, 1) - if r <= 0 { - return nil, fmt.Errorf("error perfstat_cpu_total()") - } - c := perfstatcputotal2cputotal(cpustat) - return &c, nil -} - -func CpuUtilStat(intvl time.Duration) (*CPUUtil, error) { - var cpuutil *C.perfstat_cpu_util_t - var newt *C.perfstat_cpu_total_t - var oldt *C.perfstat_cpu_total_t - var data C.perfstat_rawdata_t - - oldt = (*C.perfstat_cpu_total_t)(C.malloc(C.sizeof_perfstat_cpu_total_t)) - newt = (*C.perfstat_cpu_total_t)(C.malloc(C.sizeof_perfstat_cpu_total_t)) - cpuutil = (*C.perfstat_cpu_util_t)(C.malloc(C.sizeof_perfstat_cpu_util_t)) - defer C.free(unsafe.Pointer(oldt)) - defer C.free(unsafe.Pointer(newt)) - defer C.free(unsafe.Pointer(cpuutil)) - - r := C.perfstat_cpu_total(nil, oldt, C.sizeof_perfstat_cpu_total_t, 1) - if r <= 0 { - return nil, fmt.Errorf("error perfstat_cpu_total()") - } - - time.Sleep(intvl) - - r = C.perfstat_cpu_total(nil, newt, C.sizeof_perfstat_cpu_total_t, 1) - if r <= 0 { - return nil, fmt.Errorf("error perfstat_cpu_total()") - } - - data._type = C.UTIL_CPU_TOTAL - data.curstat = unsafe.Pointer(newt) - data.prevstat = unsafe.Pointer(oldt) - data.sizeof_data = C.sizeof_perfstat_cpu_total_t - data.cur_elems = 1 - data.prev_elems = 1 - - r = C.perfstat_cpu_util(&data, cpuutil, C.sizeof_perfstat_cpu_util_t, 1) - if r <= 0 { - return nil, fmt.Errorf("error perfstat_cpu_util()") - } - u := perfstatcpuutil2cpuutil(cpuutil) - return &u, nil -} diff --git a/vendor/github.com/power-devops/perfstat/diskstat.go b/vendor/github.com/power-devops/perfstat/diskstat.go deleted file mode 100644 index fc70dfaa4e1..00000000000 --- a/vendor/github.com/power-devops/perfstat/diskstat.go +++ /dev/null @@ -1,137 +0,0 @@ -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "unsafe" -) - -func DiskTotalStat() (*DiskTotal, error) { - var disk C.perfstat_disk_total_t - - rc := C.perfstat_disk_total(nil, &disk, C.sizeof_perfstat_disk_total_t, 1) - if rc != 1 { - return nil, fmt.Errorf("perfstat_disk_total() error") - } - d := perfstatdisktotal2disktotal(disk) - return &d, nil -} - -func DiskAdapterStat() ([]DiskAdapter, error) { - var adapter *C.perfstat_diskadapter_t - var adptname C.perfstat_id_t - - numadpt := C.perfstat_diskadapter(nil, nil, C.sizeof_perfstat_diskadapter_t, 0) - if numadpt <= 0 { - return nil, fmt.Errorf("perfstat_diskadapter() error") - } - - adapter_len := C.sizeof_perfstat_diskadapter_t * C.ulong(numadpt) - adapter = (*C.perfstat_diskadapter_t)(C.malloc(adapter_len)) - defer C.free(unsafe.Pointer(adapter)) - C.strcpy(&adptname.name[0], C.CString(C.FIRST_DISKADAPTER)) - r := C.perfstat_diskadapter(&adptname, adapter, C.sizeof_perfstat_diskadapter_t, numadpt) - if r < 0 { - return nil, fmt.Errorf("perfstat_diskadapter() error") - } - da := make([]DiskAdapter, r) - for i := 0; i < int(r); i++ { - d := C.get_diskadapter_stat(adapter, C.int(i)) - if d != nil { - da[i] = perfstatdiskadapter2diskadapter(d) - } - } - return da, nil -} - -func DiskStat() ([]Disk, error) { - var disk *C.perfstat_disk_t - var diskname C.perfstat_id_t - - numdisk := C.perfstat_disk(nil, nil, C.sizeof_perfstat_disk_t, 0) - if numdisk <= 0 { - return nil, fmt.Errorf("perfstat_disk() error") - } - - disk_len := C.sizeof_perfstat_disk_t * C.ulong(numdisk) - disk = (*C.perfstat_disk_t)(C.malloc(disk_len)) - defer C.free(unsafe.Pointer(disk)) - C.strcpy(&diskname.name[0], C.CString(C.FIRST_DISK)) - r := C.perfstat_disk(&diskname, disk, C.sizeof_perfstat_disk_t, numdisk) - if r < 0 { - return nil, fmt.Errorf("perfstat_disk() error") - } - d := make([]Disk, r) - for i := 0; i < int(r); i++ { - ds := C.get_disk_stat(disk, C.int(i)) - if ds != nil { - d[i] = perfstatdisk2disk(ds) - } - } - return d, nil -} - -func DiskPathStat() ([]DiskPath, error) { - var diskpath *C.perfstat_diskpath_t - var pathname C.perfstat_id_t - - numpaths := C.perfstat_diskpath(nil, nil, C.sizeof_perfstat_diskpath_t, 0) - if numpaths <= 0 { - return nil, fmt.Errorf("perfstat_diskpath() error") - } - - path_len := C.sizeof_perfstat_diskpath_t * C.ulong(numpaths) - diskpath = (*C.perfstat_diskpath_t)(C.malloc(path_len)) - defer C.free(unsafe.Pointer(diskpath)) - C.strcpy(&pathname.name[0], C.CString(C.FIRST_DISKPATH)) - r := C.perfstat_diskpath(&pathname, diskpath, C.sizeof_perfstat_diskpath_t, numpaths) - if r < 0 { - return nil, fmt.Errorf("perfstat_diskpath() error") - } - d := make([]DiskPath, r) - for i := 0; i < int(r); i++ { - p := C.get_diskpath_stat(diskpath, C.int(i)) - if p != nil { - d[i] = perfstatdiskpath2diskpath(p) - } - } - return d, nil -} - -func FCAdapterStat() ([]FCAdapter, error) { - var fcstat *C.perfstat_fcstat_t - var fcname C.perfstat_id_t - - numadpt := C.perfstat_fcstat(nil, nil, C.sizeof_perfstat_fcstat_t, 0) - if numadpt <= 0 { - return nil, fmt.Errorf("perfstat_fcstat() error") - } - - fcstat_len := C.sizeof_perfstat_fcstat_t * C.ulong(numadpt) - fcstat = (*C.perfstat_fcstat_t)(C.malloc(fcstat_len)) - defer C.free(unsafe.Pointer(fcstat)) - C.strcpy(&fcname.name[0], C.CString(C.FIRST_NETINTERFACE)) - r := C.perfstat_fcstat(&fcname, fcstat, C.sizeof_perfstat_fcstat_t, numadpt) - if r < 0 { - return nil, fmt.Errorf("perfstat_fcstat() error") - } - fca := make([]FCAdapter, r) - for i := 0; i < int(r); i++ { - f := C.get_fcstat_stat(fcstat, C.int(i)) - if f != nil { - fca[i] = perfstatfcstat2fcadapter(f) - } - } - return fca, nil -} diff --git a/vendor/github.com/power-devops/perfstat/doc.go b/vendor/github.com/power-devops/perfstat/doc.go deleted file mode 100644 index 85eaf3e7eda..00000000000 --- a/vendor/github.com/power-devops/perfstat/doc.go +++ /dev/null @@ -1,315 +0,0 @@ -// +build !aix - -// Copyright 2020 Power-Devops.com. All rights reserved. -// Use of this source code is governed by the license -// that can be found in the LICENSE file. -/* -Package perfstat is Go interface to IBM AIX libperfstat. -To use it you need AIX with installed bos.perf.libperfstat. You can check, if is installed using the following command: - - $ lslpp -L bos.perf.perfstat - -The package is written using Go 1.14.7 and AIX 7.2 TL5. It should work with earlier TLs of AIX 7.2, but I -can't guarantee that perfstat structures in the TLs have all the same fields as the structures in AIX 7.2 TL5. - -For documentation of perfstat on AIX and using it in programs refer to the official IBM documentation: -https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat.html -*/ -package perfstat - -import ( - "fmt" - "time" -) - -// EnableLVMStat() switches on LVM (logical volumes and volume groups) performance statistics. -// With this enabled you can use fields KBReads, KBWrites, and IOCnt -// in LogicalVolume and VolumeGroup data types. -func EnableLVMStat() {} - -// DisableLVMStat() switchess of LVM (logical volumes and volume groups) performance statistics. -// This is the default state. In this case LogicalVolume and VolumeGroup data types are -// populated with informations about LVM structures, but performance statistics fields -// (KBReads, KBWrites, IOCnt) are empty. -func DisableLVMStat() {} - -// CpuStat() returns array of CPU structures with information about -// logical CPUs on the system. -// IBM documentation: -// * https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_int_cpu.html -// * https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cpu.html -func CpuStat() ([]CPU, error) { - return nil, fmt.Errorf("not implemented") -} - -// CpuTotalStat() returns general information about CPUs on the system. -// IBM documentation: -// * https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_glob_cpu.html -// * https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cputot.html -func CpuTotalStat() (*CPUTotal, error) { - return nil, fmt.Errorf("not implemented") -} - -// CpuUtilStat() calculates CPU utilization. -// IBM documentation: -// * https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_cpu_util.html -// * https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cpu_util.html -func CpuUtilStat(intvl time.Duration) (*CPUUtil, error) { - return nil, fmt.Errorf("not implemented") -} - -func DiskTotalStat() (*DiskTotal, error) { - return nil, fmt.Errorf("not implemented") -} - -func DiskAdapterStat() ([]DiskAdapter, error) { - return nil, fmt.Errorf("not implemented") -} - -func DiskStat() ([]Disk, error) { - return nil, fmt.Errorf("not implemented") -} - -func DiskPathStat() ([]DiskPath, error) { - return nil, fmt.Errorf("not implemented") -} - -func FCAdapterStat() ([]FCAdapter, error) { - return nil, fmt.Errorf("not implemented") -} - -func PartitionStat() (*PartitionConfig, error) { - return nil, fmt.Errorf("not implemented") -} - -func LogicalVolumeStat() ([]LogicalVolume, error) { - return nil, fmt.Errorf("not implemented") -} - -func VolumeGroupStat() ([]VolumeGroup, error) { - return nil, fmt.Errorf("not implemented") -} - -func MemoryTotalStat() (*MemoryTotal, error) { - return nil, fmt.Errorf("not implemented") -} - -func MemoryPageStat() ([]MemoryPage, error) { - return nil, fmt.Errorf("not implemented") -} - -func PagingSpaceStat() ([]PagingSpace, error) { - return nil, fmt.Errorf("not implemented") -} - -func NetIfaceTotalStat() (*NetIfaceTotal, error) { - return nil, fmt.Errorf("not implemented") -} - -func NetBufferStat() ([]NetBuffer, error) { - return nil, fmt.Errorf("not implemented") -} - -func NetIfaceStat() ([]NetIface, error) { - return nil, fmt.Errorf("not implemented") -} - -func NetAdapterStat() ([]NetAdapter, error) { - return nil, fmt.Errorf("not implemented") -} - -func ProcessStat() ([]Process, error) { - return nil, fmt.Errorf("not implemented") -} - -func ThreadStat() ([]Thread, error) { - return nil, fmt.Errorf("not implemented") -} - -func Sysconf(name int32) (int64, error) { - return 0, fmt.Errorf("not implemented") -} - -func GetCPUImplementation() string { - return "" -} - -func POWER9OrNewer() bool { - return false -} - -func POWER9() bool { - return false -} - -func POWER8OrNewer() bool { - return false -} - -func POWER8() bool { - return false -} - -func POWER7OrNewer() bool { - return false -} - -func POWER7() bool { - return false -} - -func HasTransactionalMemory() bool { - return false -} - -func Is64Bit() bool { - return false -} - -func IsSMP() bool { - return false -} - -func HasVMX() bool { - return false -} - -func HasVSX() bool { - return false -} - -func HasDFP() bool { - return false -} - -func HasNxGzip() bool { - return false -} - -func PksCapable() bool { - return false -} - -func PksEnabled() bool { - return false -} - -func CPUMode() string { - return "" -} - -func KernelBits() int { - return 0 -} - -func IsLPAR() bool { - return false -} - -func CpuAddCapable() bool { - return false -} - -func CpuRemoveCapable() bool { - return false -} - -func MemoryAddCapable() bool { - return false -} - -func MemoryRemoveCapable() bool { - return false -} - -func DLparCapable() bool { - return false -} - -func IsNUMA() bool { - return false -} - -func KernelKeys() bool { - return false -} - -func RecoveryMode() bool { - return false -} - -func EnhancedAffinity() bool { - return false -} - -func VTpmEnabled() bool { - return false -} - -func IsVIOS() bool { - return false -} - -func MLSEnabled() bool { - return false -} - -func SPLparCapable() bool { - return false -} - -func SPLparEnabled() bool { - return false -} - -func DedicatedLpar() bool { - return false -} - -func SPLparCapped() bool { - return false -} - -func SPLparDonating() bool { - return false -} - -func SmtCapable() bool { - return false -} - -func SmtEnabled() bool { - return false -} - -func VrmCapable() bool { - return false -} - -func VrmEnabled() bool { - return false -} - -func AmeEnabled() bool { - return false -} - -func EcoCapable() bool { - return false -} - -func EcoEnabled() bool { - return false -} - -func BootTime() (uint64, error) { - return 0, fmt.Errorf("Not implemented") -} - -func UptimeSeconds() (uint64, error) { - return 0, fmt.Errorf("Not implemented") -} - -func FileSystemStat() ([]FileSystem, error) { - return nil, fmt.Errorf("Not implemented") -} diff --git a/vendor/github.com/power-devops/perfstat/fsstat.go b/vendor/github.com/power-devops/perfstat/fsstat.go deleted file mode 100644 index 27f4c06c158..00000000000 --- a/vendor/github.com/power-devops/perfstat/fsstat.go +++ /dev/null @@ -1,31 +0,0 @@ -// +build aix - -package perfstat - -/* -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" -) - -func FileSystemStat() ([]FileSystem, error) { - var fsinfo *C.struct_fsinfo - var nmounts C.int - - fsinfo = C.get_all_fs(&nmounts) - if nmounts <= 0 { - return nil, fmt.Errorf("No mounts found") - } - - fs := make([]FileSystem, nmounts) - for i := 0; i < int(nmounts); i++ { - f := C.get_filesystem_stat(fsinfo, C.int(i)) - if f != nil { - fs[i] = fsinfo2filesystem(f) - } - } - return fs, nil -} diff --git a/vendor/github.com/power-devops/perfstat/helpers.go b/vendor/github.com/power-devops/perfstat/helpers.go deleted file mode 100644 index e8d6997665e..00000000000 --- a/vendor/github.com/power-devops/perfstat/helpers.go +++ /dev/null @@ -1,764 +0,0 @@ -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include - -#include "c_helpers.h" -*/ -import "C" - -func perfstatcpu2cpu(n *C.perfstat_cpu_t) CPU { - var c CPU - c.Name = C.GoString(&n.name[0]) - c.User = int64(n.user) - c.Sys = int64(n.sys) - c.Idle = int64(n.idle) - c.Wait = int64(n.wait) - c.PSwitch = int64(n.pswitch) - c.Syscall = int64(n.syscall) - c.Sysread = int64(n.sysread) - c.Syswrite = int64(n.syswrite) - c.Sysfork = int64(n.sysfork) - c.Sysexec = int64(n.sysexec) - c.Readch = int64(n.readch) - c.Writech = int64(n.writech) - c.Bread = int64(n.bread) - c.Bwrite = int64(n.bwrite) - c.Lread = int64(n.lread) - c.Lwrite = int64(n.lwrite) - c.Phread = int64(n.phread) - c.Phwrite = int64(n.phwrite) - c.Iget = int64(n.iget) - c.Namei = int64(n.namei) - c.Dirblk = int64(n.dirblk) - c.Msg = int64(n.msg) - c.Sema = int64(n.sema) - c.MinFaults = int64(n.minfaults) - c.MajFaults = int64(n.majfaults) - c.PUser = int64(n.puser) - c.PSys = int64(n.psys) - c.PIdle = int64(n.pidle) - c.PWait = int64(n.pwait) - c.RedispSD0 = int64(n.redisp_sd0) - c.RedispSD1 = int64(n.redisp_sd1) - c.RedispSD2 = int64(n.redisp_sd2) - c.RedispSD3 = int64(n.redisp_sd3) - c.RedispSD4 = int64(n.redisp_sd4) - c.RedispSD5 = int64(n.redisp_sd5) - c.MigrationPush = int64(n.migration_push) - c.MigrationS3grq = int64(n.migration_S3grq) - c.MigrationS3pul = int64(n.migration_S3pul) - c.InvolCSwitch = int64(n.invol_cswitch) - c.VolCSwitch = int64(n.vol_cswitch) - c.RunQueue = int64(n.runque) - c.Bound = int64(n.bound) - c.DecrIntrs = int64(n.decrintrs) - c.MpcRIntrs = int64(n.mpcrintrs) - c.MpcSIntrs = int64(n.mpcsintrs) - c.SoftIntrs = int64(n.softintrs) - c.DevIntrs = int64(n.devintrs) - c.PhantIntrs = int64(n.phantintrs) - c.IdleDonatedPurr = int64(n.idle_donated_purr) - c.IdleDonatedSpurr = int64(n.idle_donated_spurr) - c.BusyDonatedPurr = int64(n.busy_donated_purr) - c.BusyDonatedSpurr = int64(n.busy_donated_spurr) - c.IdleStolenPurr = int64(n.idle_stolen_purr) - c.IdleStolenSpurr = int64(n.idle_stolen_spurr) - c.BusyStolenPurr = int64(n.busy_stolen_purr) - c.BusyStolenSpurr = int64(n.busy_stolen_spurr) - c.Hpi = int64(n.hpi) - c.Hpit = int64(n.hpit) - c.PUserSpurr = int64(n.puser_spurr) - c.PSysSpurr = int64(n.psys_spurr) - c.PIdleSpurr = int64(n.pidle_spurr) - c.PWaitSpurr = int64(n.pwait_spurr) - c.SpurrFlag = int32(n.spurrflag) - c.LocalDispatch = int64(n.localdispatch) - c.NearDispatch = int64(n.neardispatch) - c.FarDispatch = int64(n.fardispatch) - c.CSwitches = int64(n.cswitches) - c.Version = int64(n.version) - c.TbLast = int64(n.tb_last) - c.State = int(n.state) - c.VtbLast = int64(n.vtb_last) - c.ICountLast = int64(n.icount_last) - return c -} - -func perfstatcputotal2cputotal(n *C.perfstat_cpu_total_t) CPUTotal { - var c CPUTotal - c.NCpus = int(n.ncpus) - c.NCpusCfg = int(n.ncpus_cfg) - c.Description = C.GoString(&n.description[0]) - c.ProcessorHz = int64(n.processorHZ) - c.User = int64(n.user) - c.Sys = int64(n.sys) - c.Idle = int64(n.idle) - c.Wait = int64(n.wait) - c.PSwitch = int64(n.pswitch) - c.Syscall = int64(n.syscall) - c.Sysread = int64(n.sysread) - c.Syswrite = int64(n.syswrite) - c.Sysfork = int64(n.sysfork) - c.Sysexec = int64(n.sysexec) - c.Readch = int64(n.readch) - c.Writech = int64(n.writech) - c.DevIntrs = int64(n.devintrs) - c.SoftIntrs = int64(n.softintrs) - c.Lbolt = int64(n.lbolt) - c.LoadAvg1 = (float32(n.loadavg[0]) / (1 << C.SBITS)) - c.LoadAvg5 = (float32(n.loadavg[1]) / (1 << C.SBITS)) - c.LoadAvg15 = (float32(n.loadavg[2]) / (1 << C.SBITS)) - c.RunQueue = int64(n.runque) - c.SwpQueue = int64(n.swpque) - c.Bread = int64(n.bread) - c.Bwrite = int64(n.bwrite) - c.Lread = int64(n.lread) - c.Lwrite = int64(n.lwrite) - c.Phread = int64(n.phread) - c.Phwrite = int64(n.phwrite) - c.RunOcc = int64(n.runocc) - c.SwpOcc = int64(n.swpocc) - c.Iget = int64(n.iget) - c.Namei = int64(n.namei) - c.Dirblk = int64(n.dirblk) - c.Msg = int64(n.msg) - c.Sema = int64(n.sema) - c.RcvInt = int64(n.rcvint) - c.XmtInt = int64(n.xmtint) - c.MdmInt = int64(n.mdmint) - c.TtyRawInch = int64(n.tty_rawinch) - c.TtyCanInch = int64(n.tty_caninch) - c.TtyRawOutch = int64(n.tty_rawoutch) - c.Ksched = int64(n.ksched) - c.Koverf = int64(n.koverf) - c.Kexit = int64(n.kexit) - c.Rbread = int64(n.rbread) - c.Rcread = int64(n.rcread) - c.Rbwrt = int64(n.rbwrt) - c.Rcwrt = int64(n.rcwrt) - c.Traps = int64(n.traps) - c.NCpusHigh = int64(n.ncpus_high) - c.PUser = int64(n.puser) - c.PSys = int64(n.psys) - c.PIdle = int64(n.pidle) - c.PWait = int64(n.pwait) - c.DecrIntrs = int64(n.decrintrs) - c.MpcRIntrs = int64(n.mpcrintrs) - c.MpcSIntrs = int64(n.mpcsintrs) - c.PhantIntrs = int64(n.phantintrs) - c.IdleDonatedPurr = int64(n.idle_donated_purr) - c.IdleDonatedSpurr = int64(n.idle_donated_spurr) - c.BusyDonatedPurr = int64(n.busy_donated_purr) - c.BusyDonatedSpurr = int64(n.busy_donated_spurr) - c.IdleStolenPurr = int64(n.idle_stolen_purr) - c.IdleStolenSpurr = int64(n.idle_stolen_spurr) - c.BusyStolenPurr = int64(n.busy_stolen_purr) - c.BusyStolenSpurr = int64(n.busy_stolen_spurr) - c.IOWait = int32(n.iowait) - c.PhysIO = int32(n.physio) - c.TWait = int64(n.twait) - c.Hpi = int64(n.hpi) - c.Hpit = int64(n.hpit) - c.PUserSpurr = int64(n.puser_spurr) - c.PSysSpurr = int64(n.psys_spurr) - c.PIdleSpurr = int64(n.pidle_spurr) - c.PWaitSpurr = int64(n.pwait_spurr) - c.SpurrFlag = int(n.spurrflag) - c.Version = int64(n.version) - c.TbLast = int64(n.tb_last) - c.PurrCoalescing = int64(n.purr_coalescing) - c.SpurrCoalescing = int64(n.spurr_coalescing) - return c -} - -func perfstatcpuutil2cpuutil(n *C.perfstat_cpu_util_t) CPUUtil { - var c CPUUtil - - c.Version = int64(n.version) - c.CpuID = C.GoString(&n.cpu_id[0]) - c.Entitlement = float32(n.entitlement) - c.UserPct = float32(n.user_pct) - c.KernPct = float32(n.kern_pct) - c.IdlePct = float32(n.idle_pct) - c.WaitPct = float32(n.wait_pct) - c.PhysicalBusy = float32(n.physical_busy) - c.PhysicalConsumed = float32(n.physical_consumed) - c.FreqPct = float32(n.freq_pct) - c.EntitlementPct = float32(n.entitlement_pct) - c.BusyPct = float32(n.busy_pct) - c.IdleDonatedPct = float32(n.idle_donated_pct) - c.BusyDonatedPct = float32(n.busy_donated_pct) - c.IdleStolenPct = float32(n.idle_stolen_pct) - c.BusyStolenPct = float32(n.busy_stolen_pct) - c.LUserPct = float32(n.l_user_pct) - c.LKernPct = float32(n.l_kern_pct) - c.LIdlePct = float32(n.l_idle_pct) - c.LWaitPct = float32(n.l_wait_pct) - c.DeltaTime = int64(n.delta_time) - - return c -} - -func perfstatdisktotal2disktotal(n C.perfstat_disk_total_t) DiskTotal { - var d DiskTotal - - d.Number = int32(n.number) - d.Size = int64(n.size) - d.Free = int64(n.free) - d.XRate = int64(n.xrate) - d.Xfers = int64(n.xfers) - d.Wblks = int64(n.wblks) - d.Rblks = int64(n.rblks) - d.Time = int64(n.time) - d.Version = int64(n.version) - d.Rserv = int64(n.rserv) - d.MinRserv = int64(n.min_rserv) - d.MaxRserv = int64(n.max_rserv) - d.RTimeOut = int64(n.rtimeout) - d.RFailed = int64(n.rfailed) - d.Wserv = int64(n.wserv) - d.MinWserv = int64(n.min_wserv) - d.MaxWserv = int64(n.max_wserv) - d.WTimeOut = int64(n.wtimeout) - d.WFailed = int64(n.wfailed) - d.WqDepth = int64(n.wq_depth) - d.WqTime = int64(n.wq_time) - d.WqMinTime = int64(n.wq_min_time) - d.WqMaxTime = int64(n.wq_max_time) - - return d -} - -func perfstatdiskadapter2diskadapter(n *C.perfstat_diskadapter_t) DiskAdapter { - var d DiskAdapter - - d.Name = C.GoString(&n.name[0]) - d.Description = C.GoString(&n.description[0]) - d.Number = int32(n.number) - d.Size = int64(n.size) - d.Free = int64(n.free) - d.XRate = int64(n.xrate) - d.Xfers = int64(n.xfers) - d.Rblks = int64(n.rblks) - d.Wblks = int64(n.wblks) - d.Time = int64(n.time) - d.Version = int64(n.version) - d.AdapterType = int64(n.adapter_type) - d.DkBSize = int64(n.dk_bsize) - d.DkRserv = int64(n.dk_rserv) - d.DkWserv = int64(n.dk_wserv) - d.MinRserv = int64(n.min_rserv) - d.MaxRserv = int64(n.max_rserv) - d.MinWserv = int64(n.min_wserv) - d.MaxWserv = int64(n.max_wserv) - d.WqDepth = int64(n.wq_depth) - d.WqSampled = int64(n.wq_sampled) - d.WqTime = int64(n.wq_time) - d.WqMinTime = int64(n.wq_min_time) - d.WqMaxTime = int64(n.wq_max_time) - d.QFull = int64(n.q_full) - d.QSampled = int64(n.q_sampled) - - return d -} - -func perfstatpartitionconfig2partitionconfig(n C.perfstat_partition_config_t) PartitionConfig { - var p PartitionConfig - p.Version = int64(n.version) - p.Name = C.GoString(&n.partitionname[0]) - p.Node = C.GoString(&n.nodename[0]) - p.Conf.SmtCapable = (n.conf[0] & (1 << 7)) > 0 - p.Conf.SmtEnabled = (n.conf[0] & (1 << 6)) > 0 - p.Conf.LparCapable = (n.conf[0] & (1 << 5)) > 0 - p.Conf.LparEnabled = (n.conf[0] & (1 << 4)) > 0 - p.Conf.SharedCapable = (n.conf[0] & (1 << 3)) > 0 - p.Conf.SharedEnabled = (n.conf[0] & (1 << 2)) > 0 - p.Conf.DLparCapable = (n.conf[0] & (1 << 1)) > 0 - p.Conf.Capped = (n.conf[0] & (1 << 0)) > 0 - p.Conf.Kernel64bit = (n.conf[1] & (1 << 7)) > 0 - p.Conf.PoolUtilAuthority = (n.conf[1] & (1 << 6)) > 0 - p.Conf.DonateCapable = (n.conf[1] & (1 << 5)) > 0 - p.Conf.DonateEnabled = (n.conf[1] & (1 << 4)) > 0 - p.Conf.AmsCapable = (n.conf[1] & (1 << 3)) > 0 - p.Conf.AmsEnabled = (n.conf[1] & (1 << 2)) > 0 - p.Conf.PowerSave = (n.conf[1] & (1 << 1)) > 0 - p.Conf.AmeEnabled = (n.conf[1] & (1 << 0)) > 0 - p.Conf.SharedExtended = (n.conf[2] & (1 << 7)) > 0 - p.Number = int32(n.partitionnum) - p.GroupID = int32(n.groupid) - p.ProcessorFamily = C.GoString(&n.processorFamily[0]) - p.ProcessorModel = C.GoString(&n.processorModel[0]) - p.MachineID = C.GoString(&n.machineID[0]) - p.ProcessorMhz = float64(C.get_partition_mhz(n)) - p.NumProcessors.Online = int64(n.numProcessors.online) - p.NumProcessors.Max = int64(n.numProcessors.max) - p.NumProcessors.Min = int64(n.numProcessors.min) - p.NumProcessors.Desired = int64(n.numProcessors.desired) - p.OSName = C.GoString(&n.OSName[0]) - p.OSVersion = C.GoString(&n.OSVersion[0]) - p.OSBuild = C.GoString(&n.OSBuild[0]) - p.LCpus = int32(n.lcpus) - p.SmtThreads = int32(n.smtthreads) - p.Drives = int32(n.drives) - p.NetworkAdapters = int32(n.nw_adapters) - p.CpuCap.Online = int64(n.cpucap.online) - p.CpuCap.Max = int64(n.cpucap.max) - p.CpuCap.Min = int64(n.cpucap.min) - p.CpuCap.Desired = int64(n.cpucap.desired) - p.Weightage = int32(n.cpucap_weightage) - p.EntCapacity = int32(n.entitled_proc_capacity) - p.VCpus.Online = int64(n.vcpus.online) - p.VCpus.Max = int64(n.vcpus.max) - p.VCpus.Min = int64(n.vcpus.min) - p.VCpus.Desired = int64(n.vcpus.desired) - p.PoolID = int32(n.processor_poolid) - p.ActiveCpusInPool = int32(n.activecpusinpool) - p.PoolWeightage = int32(n.cpupool_weightage) - p.SharedPCpu = int32(n.sharedpcpu) - p.MaxPoolCap = int32(n.maxpoolcap) - p.EntPoolCap = int32(n.entpoolcap) - p.Mem.Online = int64(n.mem.online) - p.Mem.Max = int64(n.mem.max) - p.Mem.Min = int64(n.mem.min) - p.Mem.Desired = int64(n.mem.desired) - p.MemWeightage = int32(n.mem_weightage) - p.TotalIOMemoryEntitlement = int64(n.totiomement) - p.MemPoolID = int32(n.mempoolid) - p.HyperPgSize = int64(n.hyperpgsize) - p.ExpMem.Online = int64(n.exp_mem.online) - p.ExpMem.Max = int64(n.exp_mem.max) - p.ExpMem.Min = int64(n.exp_mem.min) - p.ExpMem.Desired = int64(n.exp_mem.desired) - p.TargetMemExpFactor = int64(n.targetmemexpfactor) - p.TargetMemExpSize = int64(n.targetmemexpsize) - p.SubProcessorMode = int32(n.subprocessor_mode) - return p -} - -func perfstatmemorytotal2memorytotal(n C.perfstat_memory_total_t) MemoryTotal { - var m MemoryTotal - m.VirtualTotal = int64(n.virt_total) - m.RealTotal = int64(n.real_total) - m.RealFree = int64(n.real_free) - m.RealPinned = int64(n.real_pinned) - m.RealInUse = int64(n.real_inuse) - m.BadPages = int64(n.pgbad) - m.PageFaults = int64(n.pgexct) - m.PageIn = int64(n.pgins) - m.PageOut = int64(n.pgouts) - m.PgSpIn = int64(n.pgspins) - m.PgSpOut = int64(n.pgspouts) - m.Scans = int64(n.scans) - m.Cycles = int64(n.cycles) - m.PgSteals = int64(n.pgsteals) - m.NumPerm = int64(n.numperm) - m.PgSpTotal = int64(n.pgsp_total) - m.PgSpFree = int64(n.pgsp_free) - m.PgSpRsvd = int64(n.pgsp_rsvd) - m.RealSystem = int64(n.real_system) - m.RealUser = int64(n.real_user) - m.RealProcess = int64(n.real_process) - m.VirtualActive = int64(n.virt_active) - m.IOME = int64(n.iome) - m.IOMU = int64(n.iomu) - m.IOHWM = int64(n.iohwm) - m.PMem = int64(n.pmem) - m.CompressedTotal = int64(n.comprsd_total) - m.CompressedWSegPg = int64(n.comprsd_wseg_pgs) - m.CPgIn = int64(n.cpgins) - m.CPgOut = int64(n.cpgouts) - m.TrueSize = int64(n.true_size) - m.ExpandedMemory = int64(n.expanded_memory) - m.CompressedWSegSize = int64(n.comprsd_wseg_size) - m.TargetCPoolSize = int64(n.target_cpool_size) - m.MaxCPoolSize = int64(n.max_cpool_size) - m.MinUCPoolSize = int64(n.min_ucpool_size) - m.CPoolSize = int64(n.cpool_size) - m.UCPoolSize = int64(n.ucpool_size) - m.CPoolInUse = int64(n.cpool_inuse) - m.UCPoolInUse = int64(n.ucpool_inuse) - m.Version = int64(n.version) - m.RealAvailable = int64(n.real_avail) - m.BytesCoalesced = int64(n.bytes_coalesced) - m.BytesCoalescedMemPool = int64(n.bytes_coalesced_mempool) - - return m -} - -func perfstatnetinterfacetotal2netifacetotal(n C.perfstat_netinterface_total_t) NetIfaceTotal { - var i NetIfaceTotal - - i.Number = int32(n.number) - i.IPackets = int64(n.ipackets) - i.IBytes = int64(n.ibytes) - i.IErrors = int64(n.ierrors) - i.OPackets = int64(n.opackets) - i.OBytes = int64(n.obytes) - i.OErrors = int64(n.oerrors) - i.Collisions = int64(n.collisions) - i.XmitDrops = int64(n.xmitdrops) - i.Version = int64(n.version) - - return i -} - -func perfstatdisk2disk(n *C.perfstat_disk_t) Disk { - var d Disk - - d.Name = C.GoString(&n.name[0]) - d.Description = C.GoString(&n.description[0]) - d.VGName = C.GoString(&n.vgname[0]) - d.Size = int64(n.size) - d.Free = int64(n.free) - d.BSize = int64(n.bsize) - d.XRate = int64(n.xrate) - d.Xfers = int64(n.xfers) - d.Wblks = int64(n.wblks) - d.Rblks = int64(n.rblks) - d.QDepth = int64(n.qdepth) - d.Time = int64(n.time) - d.Adapter = C.GoString(&n.adapter[0]) - d.PathsCount = int32(n.paths_count) - d.QFull = int64(n.q_full) - d.Rserv = int64(n.rserv) - d.RTimeOut = int64(n.rtimeout) - d.Rfailed = int64(n.rfailed) - d.MinRserv = int64(n.min_rserv) - d.MaxRserv = int64(n.max_rserv) - d.Wserv = int64(n.wserv) - d.WTimeOut = int64(n.wtimeout) - d.Wfailed = int64(n.wfailed) - d.MinWserv = int64(n.min_wserv) - d.MaxWserv = int64(n.max_wserv) - d.WqDepth = int64(n.wq_depth) - d.WqSampled = int64(n.wq_sampled) - d.WqTime = int64(n.wq_time) - d.WqMinTime = int64(n.wq_min_time) - d.WqMaxTime = int64(n.wq_max_time) - d.QSampled = int64(n.q_sampled) - d.Version = int64(n.version) - d.PseudoDisk = (n.dk_type[0] & (1 << 7)) > 0 - d.VTDisk = (n.dk_type[0] & (1 << 6)) > 0 - - return d -} - -func perfstatdiskpath2diskpath(n *C.perfstat_diskpath_t) DiskPath { - var d DiskPath - - d.Name = C.GoString(&n.name[0]) - d.XRate = int64(n.xrate) - d.Xfers = int64(n.xfers) - d.Rblks = int64(n.rblks) - d.Wblks = int64(n.wblks) - d.Time = int64(n.time) - d.Adapter = C.GoString(&n.adapter[0]) - d.QFull = int64(n.q_full) - d.Rserv = int64(n.rserv) - d.RTimeOut = int64(n.rtimeout) - d.Rfailed = int64(n.rfailed) - d.MinRserv = int64(n.min_rserv) - d.MaxRserv = int64(n.max_rserv) - d.Wserv = int64(n.wserv) - d.WTimeOut = int64(n.wtimeout) - d.Wfailed = int64(n.wfailed) - d.MinWserv = int64(n.min_wserv) - d.MaxWserv = int64(n.max_wserv) - d.WqDepth = int64(n.wq_depth) - d.WqSampled = int64(n.wq_sampled) - d.WqTime = int64(n.wq_time) - d.WqMinTime = int64(n.wq_min_time) - d.WqMaxTime = int64(n.wq_max_time) - d.QSampled = int64(n.q_sampled) - d.Version = int64(n.version) - - return d -} - -func perfstatfcstat2fcadapter(n *C.perfstat_fcstat_t) FCAdapter { - var f FCAdapter - - f.Version = int64(n.version) - f.Name = C.GoString(&n.name[0]) - f.State = int32(n.state) - f.InputRequests = int64(n.InputRequests) - f.OutputRequests = int64(n.OutputRequests) - f.InputBytes = int64(n.InputBytes) - f.OutputBytes = int64(n.OutputBytes) - f.EffMaxTransfer = int64(n.EffMaxTransfer) - f.NoDMAResourceCnt = int64(n.NoDMAResourceCnt) - f.NoCmdResourceCnt = int64(n.NoCmdResourceCnt) - f.AttentionType = int32(n.AttentionType) - f.SecondsSinceLastReset = int64(n.SecondsSinceLastReset) - f.TxFrames = int64(n.TxFrames) - f.TxWords = int64(n.TxWords) - f.RxFrames = int64(n.RxFrames) - f.RxWords = int64(n.RxWords) - f.LIPCount = int64(n.LIPCount) - f.NOSCount = int64(n.NOSCount) - f.ErrorFrames = int64(n.ErrorFrames) - f.DumpedFrames = int64(n.DumpedFrames) - f.LinkFailureCount = int64(n.LinkFailureCount) - f.LossofSyncCount = int64(n.LossofSyncCount) - f.LossofSignal = int64(n.LossofSignal) - f.PrimitiveSeqProtocolErrCount = int64(n.PrimitiveSeqProtocolErrCount) - f.InvalidTxWordCount = int64(n.InvalidTxWordCount) - f.InvalidCRCCount = int64(n.InvalidCRCCount) - f.PortFcId = int64(n.PortFcId) - f.PortSpeed = int64(n.PortSpeed) - f.PortType = C.GoString(&n.PortType[0]) - f.PortWWN = int64(n.PortWWN) - f.PortSupportedSpeed = int64(n.PortSupportedSpeed) - f.AdapterType = int(n.adapter_type) - f.VfcName = C.GoString(&n.vfc_name[0]) - f.ClientPartName = C.GoString(&n.client_part_name[0]) - - return f -} - -func perfstatlogicalvolume2logicalvolume(n *C.perfstat_logicalvolume_t) LogicalVolume { - var l LogicalVolume - - l.Name = C.GoString(&n.name[0]) - l.VGName = C.GoString(&n.vgname[0]) - l.OpenClose = int64(n.open_close) - l.State = int64(n.state) - l.MirrorPolicy = int64(n.mirror_policy) - l.MirrorWriteConsistency = int64(n.mirror_write_consistency) - l.WriteVerify = int64(n.write_verify) - l.PPsize = int64(n.ppsize) - l.LogicalPartitions = int64(n.logical_partitions) - l.Mirrors = int32(n.mirrors) - l.IOCnt = int64(n.iocnt) - l.KBReads = int64(n.kbreads) - l.KBWrites = int64(n.kbwrites) - l.Version = int64(n.version) - - return l -} - -func perfstatvolumegroup2volumegroup(n *C.perfstat_volumegroup_t) VolumeGroup { - var v VolumeGroup - - v.Name = C.GoString(&n.name[0]) - v.TotalDisks = int64(n.total_disks) - v.ActiveDisks = int64(n.active_disks) - v.TotalLogicalVolumes = int64(n.total_logical_volumes) - v.OpenedLogicalVolumes = int64(n.opened_logical_volumes) - v.IOCnt = int64(n.iocnt) - v.KBReads = int64(n.kbreads) - v.KBWrites = int64(n.kbwrites) - v.Version = int64(n.version) - v.VariedState = int(n.variedState) - - return v -} - -func perfstatmemorypage2memorypage(n *C.perfstat_memory_page_t) MemoryPage { - var m MemoryPage - - m.PSize = int64(n.psize) - m.RealTotal = int64(n.real_total) - m.RealFree = int64(n.real_free) - m.RealPinned = int64(n.real_pinned) - m.RealInUse = int64(n.real_inuse) - m.PgExct = int64(n.pgexct) - m.PgIns = int64(n.pgins) - m.PgOuts = int64(n.pgouts) - m.PgSpIns = int64(n.pgspins) - m.PgSpOuts = int64(n.pgspouts) - m.Scans = int64(n.scans) - m.Cycles = int64(n.cycles) - m.PgSteals = int64(n.pgsteals) - m.NumPerm = int64(n.numperm) - m.NumPgSp = int64(n.numpgsp) - m.RealSystem = int64(n.real_system) - m.RealUser = int64(n.real_user) - m.RealProcess = int64(n.real_process) - m.VirtActive = int64(n.virt_active) - m.ComprsdTotal = int64(n.comprsd_total) - m.ComprsdWsegPgs = int64(n.comprsd_wseg_pgs) - m.CPgIns = int64(n.cpgins) - m.CPgOuts = int64(n.cpgouts) - m.CPoolInUse = int64(n.cpool_inuse) - m.UCPoolSize = int64(n.ucpool_size) - m.ComprsdWsegSize = int64(n.comprsd_wseg_size) - m.Version = int64(n.version) - m.RealAvail = int64(n.real_avail) - - return m -} - -func perfstatnetbuffer2netbuffer(n *C.perfstat_netbuffer_t) NetBuffer { - var b NetBuffer - - b.Name = C.GoString(&n.name[0]) - b.InUse = int64(n.inuse) - b.Calls = int64(n.calls) - b.Delayed = int64(n.delayed) - b.Free = int64(n.free) - b.Failed = int64(n.failed) - b.HighWatermark = int64(n.highwatermark) - b.Freed = int64(n.freed) - b.Version = int64(n.version) - - return b -} - -func perfstatnetinterface2netiface(n *C.perfstat_netinterface_t) NetIface { - var i NetIface - - i.Name = C.GoString(&n.name[0]) - i.Description = C.GoString(&n.description[0]) - i.Type = uint8(n._type) - i.MTU = int64(n.mtu) - i.IPackets = int64(n.ipackets) - i.IBytes = int64(n.ibytes) - i.IErrors = int64(n.ierrors) - i.OPackets = int64(n.opackets) - i.OBytes = int64(n.obytes) - i.OErrors = int64(n.oerrors) - i.Collisions = int64(n.collisions) - i.Bitrate = int64(n.bitrate) - i.XmitDrops = int64(n.xmitdrops) - i.Version = int64(n.version) - i.IfIqDrops = int64(n.if_iqdrops) - i.IfArpDrops = int64(n.if_arpdrops) - - return i -} - -func perfstatnetadapter2netadapter(n *C.perfstat_netadapter_t) NetAdapter { - var i NetAdapter - - i.Version = int64(n.version) - i.Name = C.GoString(&n.name[0]) - i.TxPackets = int64(n.tx_packets) - i.TxBytes = int64(n.tx_bytes) - i.TxInterrupts = int64(n.tx_interrupts) - i.TxErrors = int64(n.tx_errors) - i.TxPacketsDropped = int64(n.tx_packets_dropped) - i.TxQueueSize = int64(n.tx_queue_size) - i.TxQueueLen = int64(n.tx_queue_len) - i.TxQueueOverflow = int64(n.tx_queue_overflow) - i.TxBroadcastPackets = int64(n.tx_broadcast_packets) - i.TxMulticastPackets = int64(n.tx_multicast_packets) - i.TxCarrierSense = int64(n.tx_carrier_sense) - i.TxDMAUnderrun = int64(n.tx_DMA_underrun) - i.TxLostCTSErrors = int64(n.tx_lost_CTS_errors) - i.TxMaxCollisionErrors = int64(n.tx_max_collision_errors) - i.TxLateCollisionErrors = int64(n.tx_late_collision_errors) - i.TxDeferred = int64(n.tx_deferred) - i.TxTimeoutErrors = int64(n.tx_timeout_errors) - i.TxSingleCollisionCount = int64(n.tx_single_collision_count) - i.TxMultipleCollisionCount = int64(n.tx_multiple_collision_count) - i.RxPackets = int64(n.rx_packets) - i.RxBytes = int64(n.rx_bytes) - i.RxInterrupts = int64(n.rx_interrupts) - i.RxErrors = int64(n.rx_errors) - i.RxPacketsDropped = int64(n.rx_packets_dropped) - i.RxBadPackets = int64(n.rx_bad_packets) - i.RxMulticastPackets = int64(n.rx_multicast_packets) - i.RxBroadcastPackets = int64(n.rx_broadcast_packets) - i.RxCRCErrors = int64(n.rx_CRC_errors) - i.RxDMAOverrun = int64(n.rx_DMA_overrun) - i.RxAlignmentErrors = int64(n.rx_alignment_errors) - i.RxNoResourceErrors = int64(n.rx_noresource_errors) - i.RxCollisionErrors = int64(n.rx_collision_errors) - i.RxPacketTooShortErrors = int64(n.rx_packet_tooshort_errors) - i.RxPacketTooLongErrors = int64(n.rx_packet_toolong_errors) - i.RxPacketDiscardedByAdapter = int64(n.rx_packets_discardedbyadapter) - i.AdapterType = int32(n.adapter_type) - - return i -} - -func perfstatpagingspace2pagingspace(n *C.perfstat_pagingspace_t) PagingSpace { - var i PagingSpace - - i.Name = C.GoString(&n.name[0]) - i.Type = uint8(n._type) - i.VGName = C.GoString(C.get_ps_vgname(n)) - i.Hostname = C.GoString(C.get_ps_hostname(n)) - i.Filename = C.GoString(C.get_ps_filename(n)) - i.LPSize = int64(n.lp_size) - i.MBSize = int64(n.mb_size) - i.MBUsed = int64(n.mb_used) - i.IOPending = int64(n.io_pending) - i.Active = uint8(n.active) - i.Automatic = uint8(n.automatic) - i.Version = int64(n.version) - - return i -} - -func perfstatprocess2process(n *C.perfstat_process_t) Process { - var i Process - - i.Version = int64(n.version) - i.PID = int64(n.pid) - i.ProcessName = C.GoString(&n.proc_name[0]) - i.Priority = int32(n.proc_priority) - i.NumThreads = int64(n.num_threads) - i.UID = int64(n.proc_uid) - i.ClassID = int64(n.proc_classid) - i.Size = int64(n.proc_size) - i.RealMemData = int64(n.proc_real_mem_data) - i.RealMemText = int64(n.proc_real_mem_text) - i.VirtMemData = int64(n.proc_virt_mem_data) - i.VirtMemText = int64(n.proc_virt_mem_text) - i.SharedLibDataSize = int64(n.shared_lib_data_size) - i.HeapSize = int64(n.heap_size) - i.RealInUse = int64(n.real_inuse) - i.VirtInUse = int64(n.virt_inuse) - i.Pinned = int64(n.pinned) - i.PgSpInUse = int64(n.pgsp_inuse) - i.FilePages = int64(n.filepages) - i.RealInUseMap = int64(n.real_inuse_map) - i.VirtInUseMap = int64(n.virt_inuse_map) - i.PinnedInUseMap = int64(n.pinned_inuse_map) - i.UCpuTime = float64(n.ucpu_time) - i.SCpuTime = float64(n.scpu_time) - i.LastTimeBase = int64(n.last_timebase) - i.InBytes = int64(n.inBytes) - i.OutBytes = int64(n.outBytes) - i.InOps = int64(n.inOps) - i.OutOps = int64(n.outOps) - - return i -} - -func perfstatthread2thread(n *C.perfstat_thread_t) Thread { - var i Thread - - i.TID = int64(n.tid) - i.PID = int64(n.pid) - i.CpuID = int64(n.cpuid) - i.UCpuTime = float64(n.ucpu_time) - i.SCpuTime = float64(n.scpu_time) - i.LastTimeBase = int64(n.last_timebase) - i.Version = int64(n.version) - - return i -} - -func fsinfo2filesystem(n *C.struct_fsinfo) FileSystem { - var i FileSystem - - i.Device = C.GoString(n.devname) - i.MountPoint = C.GoString(n.fsname) - i.FSType = int(n.fstype) - i.Flags = int(n.flags) - i.TotalBlocks = int64(n.totalblks) - i.FreeBlocks = int64(n.freeblks) - i.TotalInodes = int64(n.totalinodes) - i.FreeInodes = int64(n.freeinodes) - - return i -} diff --git a/vendor/github.com/power-devops/perfstat/lparstat.go b/vendor/github.com/power-devops/perfstat/lparstat.go deleted file mode 100644 index 0ce35e3c562..00000000000 --- a/vendor/github.com/power-devops/perfstat/lparstat.go +++ /dev/null @@ -1,26 +0,0 @@ -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -*/ -import "C" - -import ( - "fmt" -) - -func PartitionStat() (*PartitionConfig, error) { - var part C.perfstat_partition_config_t - - rc := C.perfstat_partition_config(nil, &part, C.sizeof_perfstat_partition_config_t, 1) - if rc != 1 { - return nil, fmt.Errorf("perfstat_partition_config() error") - } - p := perfstatpartitionconfig2partitionconfig(part) - return &p, nil - -} diff --git a/vendor/github.com/power-devops/perfstat/lvmstat.go b/vendor/github.com/power-devops/perfstat/lvmstat.go deleted file mode 100644 index eb2064c8046..00000000000 --- a/vendor/github.com/power-devops/perfstat/lvmstat.go +++ /dev/null @@ -1,72 +0,0 @@ -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "unsafe" -) - -func LogicalVolumeStat() ([]LogicalVolume, error) { - var lv *C.perfstat_logicalvolume_t - var lvname C.perfstat_id_t - - numlvs := C.perfstat_logicalvolume(nil, nil, C.sizeof_perfstat_logicalvolume_t, 0) - if numlvs <= 0 { - return nil, fmt.Errorf("perfstat_logicalvolume() error") - } - - lv_len := C.sizeof_perfstat_logicalvolume_t * C.ulong(numlvs) - lv = (*C.perfstat_logicalvolume_t)(C.malloc(lv_len)) - defer C.free(unsafe.Pointer(lv)) - C.strcpy(&lvname.name[0], C.CString("")) - r := C.perfstat_logicalvolume(&lvname, lv, C.sizeof_perfstat_logicalvolume_t, numlvs) - if r < 0 { - return nil, fmt.Errorf("perfstat_logicalvolume() error") - } - lvs := make([]LogicalVolume, r) - for i := 0; i < int(r); i++ { - l := C.get_logicalvolume_stat(lv, C.int(i)) - if l != nil { - lvs[i] = perfstatlogicalvolume2logicalvolume(l) - } - } - return lvs, nil -} - -func VolumeGroupStat() ([]VolumeGroup, error) { - var vg *C.perfstat_volumegroup_t - var vgname C.perfstat_id_t - - numvgs := C.perfstat_volumegroup(nil, nil, C.sizeof_perfstat_volumegroup_t, 0) - if numvgs <= 0 { - return nil, fmt.Errorf("perfstat_volumegroup() error") - } - - vg_len := C.sizeof_perfstat_volumegroup_t * C.ulong(numvgs) - vg = (*C.perfstat_volumegroup_t)(C.malloc(vg_len)) - defer C.free(unsafe.Pointer(vg)) - C.strcpy(&vgname.name[0], C.CString("")) - r := C.perfstat_volumegroup(&vgname, vg, C.sizeof_perfstat_volumegroup_t, numvgs) - if r < 0 { - return nil, fmt.Errorf("perfstat_volumegroup() error") - } - vgs := make([]VolumeGroup, r) - for i := 0; i < int(r); i++ { - v := C.get_volumegroup_stat(vg, C.int(i)) - if v != nil { - vgs[i] = perfstatvolumegroup2volumegroup(v) - } - } - return vgs, nil -} diff --git a/vendor/github.com/power-devops/perfstat/memstat.go b/vendor/github.com/power-devops/perfstat/memstat.go deleted file mode 100644 index d211a73aac8..00000000000 --- a/vendor/github.com/power-devops/perfstat/memstat.go +++ /dev/null @@ -1,84 +0,0 @@ -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include - -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "unsafe" -) - -func MemoryTotalStat() (*MemoryTotal, error) { - var memory C.perfstat_memory_total_t - - rc := C.perfstat_memory_total(nil, &memory, C.sizeof_perfstat_memory_total_t, 1) - if rc != 1 { - return nil, fmt.Errorf("perfstat_memory_total() error") - } - m := perfstatmemorytotal2memorytotal(memory) - return &m, nil -} - -func MemoryPageStat() ([]MemoryPage, error) { - var mempage *C.perfstat_memory_page_t - var fps C.perfstat_psize_t - - numps := C.perfstat_memory_page(nil, nil, C.sizeof_perfstat_memory_page_t, 0) - if numps < 1 { - return nil, fmt.Errorf("perfstat_memory_page() error") - } - - mp_len := C.sizeof_perfstat_memory_page_t * C.ulong(numps) - mempage = (*C.perfstat_memory_page_t)(C.malloc(mp_len)) - defer C.free(unsafe.Pointer(mempage)) - fps.psize = C.FIRST_PSIZE - r := C.perfstat_memory_page(&fps, mempage, C.sizeof_perfstat_memory_page_t, numps) - if r < 1 { - return nil, fmt.Errorf("perfstat_memory_page() error") - } - ps := make([]MemoryPage, r) - for i := 0; i < int(r); i++ { - p := C.get_memory_page_stat(mempage, C.int(i)) - if p != nil { - ps[i] = perfstatmemorypage2memorypage(p) - } - } - return ps, nil -} - -func PagingSpaceStat() ([]PagingSpace, error) { - var pspace *C.perfstat_pagingspace_t - var fps C.perfstat_id_t - - numps := C.perfstat_pagingspace(nil, nil, C.sizeof_perfstat_pagingspace_t, 0) - if numps <= 0 { - return nil, fmt.Errorf("perfstat_pagingspace() error") - } - - ps_len := C.sizeof_perfstat_pagingspace_t * C.ulong(numps) - pspace = (*C.perfstat_pagingspace_t)(C.malloc(ps_len)) - defer C.free(unsafe.Pointer(pspace)) - C.strcpy(&fps.name[0], C.CString(C.FIRST_PAGINGSPACE)) - r := C.perfstat_pagingspace(&fps, pspace, C.sizeof_perfstat_pagingspace_t, numps) - if r < 1 { - return nil, fmt.Errorf("perfstat_pagingspace() error") - } - ps := make([]PagingSpace, r) - for i := 0; i < int(r); i++ { - p := C.get_pagingspace_stat(pspace, C.int(i)) - if p != nil { - ps[i] = perfstatpagingspace2pagingspace(p) - } - } - return ps, nil -} diff --git a/vendor/github.com/power-devops/perfstat/netstat.go b/vendor/github.com/power-devops/perfstat/netstat.go deleted file mode 100644 index 4070da211bc..00000000000 --- a/vendor/github.com/power-devops/perfstat/netstat.go +++ /dev/null @@ -1,117 +0,0 @@ -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include - -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "unsafe" -) - -func NetIfaceTotalStat() (*NetIfaceTotal, error) { - var nif C.perfstat_netinterface_total_t - - rc := C.perfstat_netinterface_total(nil, &nif, C.sizeof_perfstat_netinterface_total_t, 1) - if rc != 1 { - return nil, fmt.Errorf("perfstat_netinterface_total() error") - } - n := perfstatnetinterfacetotal2netifacetotal(nif) - return &n, nil -} - -func NetBufferStat() ([]NetBuffer, error) { - var nbuf *C.perfstat_netbuffer_t - var first C.perfstat_id_t - - numbuf := C.perfstat_netbuffer(nil, nil, C.sizeof_perfstat_netbuffer_t, 0) - if numbuf < 1 { - return nil, fmt.Errorf("perfstat_netbuffer() error") - } - - nblen := C.sizeof_perfstat_netbuffer_t * C.ulong(numbuf) - nbuf = (*C.perfstat_netbuffer_t)(C.malloc(nblen)) - defer C.free(unsafe.Pointer(nbuf)) - C.strcpy(&first.name[0], C.CString(C.FIRST_NETBUFFER)) - r := C.perfstat_netbuffer(&first, nbuf, C.sizeof_perfstat_netbuffer_t, numbuf) - if r < 0 { - return nil, fmt.Errorf("perfstat_netbuffer() error") - } - nb := make([]NetBuffer, r) - for i := 0; i < int(r); i++ { - b := C.get_netbuffer_stat(nbuf, C.int(i)) - if b != nil { - nb[i] = perfstatnetbuffer2netbuffer(b) - } - } - return nb, nil -} - -func NetIfaceStat() ([]NetIface, error) { - var nif *C.perfstat_netinterface_t - var first C.perfstat_id_t - - numif := C.perfstat_netinterface(nil, nil, C.sizeof_perfstat_netinterface_t, 0) - if numif < 0 { - return nil, fmt.Errorf("perfstat_netinterface() error") - } - if numif == 0 { - return []NetIface{}, fmt.Errorf("no network interfaces found") - } - - iflen := C.sizeof_perfstat_netinterface_t * C.ulong(numif) - nif = (*C.perfstat_netinterface_t)(C.malloc(iflen)) - defer C.free(unsafe.Pointer(nif)) - C.strcpy(&first.name[0], C.CString(C.FIRST_NETINTERFACE)) - r := C.perfstat_netinterface(&first, nif, C.sizeof_perfstat_netinterface_t, numif) - if r < 0 { - return nil, fmt.Errorf("perfstat_netinterface() error") - } - ifs := make([]NetIface, r) - for i := 0; i < int(r); i++ { - b := C.get_netinterface_stat(nif, C.int(i)) - if b != nil { - ifs[i] = perfstatnetinterface2netiface(b) - } - } - return ifs, nil -} - -func NetAdapterStat() ([]NetAdapter, error) { - var adapters *C.perfstat_netadapter_t - var first C.perfstat_id_t - - numad := C.perfstat_netadapter(nil, nil, C.sizeof_perfstat_netadapter_t, 0) - if numad < 0 { - return nil, fmt.Errorf("perfstat_netadater() error") - } - if numad == 0 { - return []NetAdapter{}, fmt.Errorf("no network adapters found") - } - - adplen := C.sizeof_perfstat_netadapter_t * C.ulong(numad) - adapters = (*C.perfstat_netadapter_t)(C.malloc(adplen)) - defer C.free(unsafe.Pointer(adapters)) - C.strcpy(&first.name[0], C.CString(C.FIRST_NETINTERFACE)) - r := C.perfstat_netadapter(&first, adapters, C.sizeof_perfstat_netadapter_t, numad) - if r < 0 { - return nil, fmt.Errorf("perfstat_netadapter() error") - } - ads := make([]NetAdapter, r) - for i := 0; i < int(r); i++ { - b := C.get_netadapter_stat(adapters, C.int(i)) - if b != nil { - ads[i] = perfstatnetadapter2netadapter(b) - } - } - return ads, nil -} diff --git a/vendor/github.com/power-devops/perfstat/procstat.go b/vendor/github.com/power-devops/perfstat/procstat.go deleted file mode 100644 index ecafebd8db2..00000000000 --- a/vendor/github.com/power-devops/perfstat/procstat.go +++ /dev/null @@ -1,75 +0,0 @@ -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include - -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "unsafe" -) - -func ProcessStat() ([]Process, error) { - var proc *C.perfstat_process_t - var first C.perfstat_id_t - - numproc := C.perfstat_process(nil, nil, C.sizeof_perfstat_process_t, 0) - if numproc < 1 { - return nil, fmt.Errorf("perfstat_process() error") - } - - plen := C.sizeof_perfstat_process_t * C.ulong(numproc) - proc = (*C.perfstat_process_t)(C.malloc(plen)) - defer C.free(unsafe.Pointer(proc)) - C.strcpy(&first.name[0], C.CString("")) - r := C.perfstat_process(&first, proc, C.sizeof_perfstat_process_t, numproc) - if r < 0 { - return nil, fmt.Errorf("perfstat_process() error") - } - - ps := make([]Process, r) - for i := 0; i < int(r); i++ { - p := C.get_process_stat(proc, C.int(i)) - if p != nil { - ps[i] = perfstatprocess2process(p) - } - } - return ps, nil -} - -func ThreadStat() ([]Thread, error) { - var thread *C.perfstat_thread_t - var first C.perfstat_id_t - - numthr := C.perfstat_thread(nil, nil, C.sizeof_perfstat_thread_t, 0) - if numthr < 1 { - return nil, fmt.Errorf("perfstat_thread() error") - } - - thlen := C.sizeof_perfstat_thread_t * C.ulong(numthr) - thread = (*C.perfstat_thread_t)(C.malloc(thlen)) - defer C.free(unsafe.Pointer(thread)) - C.strcpy(&first.name[0], C.CString("")) - r := C.perfstat_thread(&first, thread, C.sizeof_perfstat_thread_t, numthr) - if r < 0 { - return nil, fmt.Errorf("perfstat_thread() error") - } - - th := make([]Thread, r) - for i := 0; i < int(r); i++ { - t := C.get_thread_stat(thread, C.int(i)) - if t != nil { - th[i] = perfstatthread2thread(t) - } - } - return th, nil -} diff --git a/vendor/github.com/power-devops/perfstat/sysconf.go b/vendor/github.com/power-devops/perfstat/sysconf.go deleted file mode 100644 index c7454d03d49..00000000000 --- a/vendor/github.com/power-devops/perfstat/sysconf.go +++ /dev/null @@ -1,195 +0,0 @@ -// +build aix - -package perfstat - -/* -#include -*/ -import "C" - -import "fmt" - -const ( - SC_ARG_MAX = 0 - SC_CHILD_MAX = 1 - SC_CLK_TCK = 2 - SC_NGROUPS_MAX = 3 - SC_OPEN_MAX = 4 - SC_STREAM_MAX = 5 - SC_TZNAME_MAX = 6 - SC_JOB_CONTROL = 7 - SC_SAVED_IDS = 8 - SC_VERSION = 9 - SC_POSIX_ARG_MAX = 10 - SC_POSIX_CHILD_MAX = 11 - SC_POSIX_LINK_MAX = 12 - SC_POSIX_MAX_CANON = 13 - SC_POSIX_MAX_INPUT = 14 - SC_POSIX_NAME_MAX = 15 - SC_POSIX_NGROUPS_MAX = 16 - SC_POSIX_OPEN_MAX = 17 - SC_POSIX_PATH_MAX = 18 - SC_POSIX_PIPE_BUF = 19 - SC_POSIX_SSIZE_MAX = 20 - SC_POSIX_STREAM_MAX = 21 - SC_POSIX_TZNAME_MAX = 22 - SC_BC_BASE_MAX = 23 - SC_BC_DIM_MAX = 24 - SC_BC_SCALE_MAX = 25 - SC_BC_STRING_MAX = 26 - SC_EQUIV_CLASS_MAX = 27 - SC_EXPR_NEST_MAX = 28 - SC_LINE_MAX = 29 - SC_RE_DUP_MAX = 30 - SC_2_VERSION = 31 - SC_2_C_DEV = 32 - SC_2_FORT_DEV = 33 - SC_2_FORT_RUN = 34 - SC_2_LOCALEDEF = 35 - SC_2_SW_DEV = 36 - SC_POSIX2_BC_BASE_MAX = 37 - SC_POSIX2_BC_DIM_MAX = 38 - SC_POSIX2_BC_SCALE_MAX = 39 - SC_POSIX2_BC_STRING_MAX = 40 - SC_POSIX2_BC_EQUIV_CLASS_MAX = 41 - SC_POSIX2_BC_EXPR_NEST_MAX = 42 - SC_POSIX2_BC_LINE_MAX = 43 - SC_POSIX2_BC_RE_DUP_MAX = 44 - SC_PASS_MAX = 45 - SC_XOPEN_VERSION = 46 - SC_ATEXIT_MAX = 47 - SC_PAGE_SIZE = 48 - SC_PAGESIZE = SC_PAGE_SIZE - SC_AES_OS_VERSION = 49 - SC_COLL_WEIGHTS_MAX = 50 - SC_2_C_WIND = 51 - SC_2_C_VERSION = 52 - SC_2_UPE = 53 - SC_2_CHAR_TERM = 54 - SC_XOPEN_SHM = 55 - SC_XOPEN_CRYPT = 56 - SC_XOPEN_ENH_I18N = 57 - SC_IOV_MAX = 58 - SC_THREAD_SAFE_FUNCTIONS = 59 - SC_THREADS = 60 - SC_THREAD_ATTR_STACKADDR = 61 - SC_THREAD_ATTR_STACKSIZE = 62 - SC_THREAD_FORKALL = 63 - SC_THREAD_PRIORITY_SCHEDULING = 64 - SC_THREAD_PRIO_INHERIT = 65 - SC_THREAD_PRIO_PROTECT = 66 - SC_THREAD_PROCESS_SHARED = 67 - SC_THREAD_KEYS_MAX = 68 - SC_THREAD_DATAKEYS_MAX = SC_THREAD_KEYS_MAX - SC_THREAD_STACK_MIN = 69 - SC_THREAD_THREADS_MAX = 70 - SC_NPROCESSORS_CONF = 71 - SC_NPROCESSORS_ONLN = 72 - SC_XOPEN_UNIX = 73 - SC_AIO_LISTIO_MAX = 75 - SC_AIO_MAX = 76 - SC_AIO_PRIO_DELTA_MAX = 77 - SC_ASYNCHRONOUS_IO = 78 - SC_DELAYTIMER_MAX = 79 - SC_FSYNC = 80 - SC_GETGR_R_SIZE_MAX = 81 - SC_GETPW_R_SIZE_MAX = 82 - SC_LOGIN_NAME_MAX = 83 - SC_MAPPED_FILES = 84 - SC_MEMLOCK = 85 - SC_MEMLOCK_RANGE = 86 - SC_MEMORY_PROTECTION = 87 - SC_MESSAGE_PASSING = 88 - SC_MQ_OPEN_MAX = 89 - SC_MQ_PRIO_MAX = 90 - SC_PRIORITIZED_IO = 91 - SC_PRIORITY_SCHEDULING = 92 - SC_REALTIME_SIGNALS = 93 - SC_RTSIG_MAX = 94 - SC_SEMAPHORES = 95 - SC_SEM_NSEMS_MAX = 96 - SC_SEM_VALUE_MAX = 97 - SC_SHARED_MEMORY_OBJECTS = 98 - SC_SIGQUEUE_MAX = 99 - SC_SYNCHRONIZED_IO = 100 - SC_THREAD_DESTRUCTOR_ITERATIONS = 101 - SC_TIMERS = 102 - SC_TIMER_MAX = 103 - SC_TTY_NAME_MAX = 104 - SC_XBS5_ILP32_OFF32 = 105 - SC_XBS5_ILP32_OFFBIG = 106 - SC_XBS5_LP64_OFF64 = 107 - SC_XBS5_LPBIG_OFFBIG = 108 - SC_XOPEN_XCU_VERSION = 109 - SC_XOPEN_REALTIME = 110 - SC_XOPEN_REALTIME_THREADS = 111 - SC_XOPEN_LEGACY = 112 - SC_REENTRANT_FUNCTIONS = SC_THREAD_SAFE_FUNCTIONS - SC_PHYS_PAGES = 113 - SC_AVPHYS_PAGES = 114 - SC_LPAR_ENABLED = 115 - SC_LARGE_PAGESIZE = 116 - SC_AIX_KERNEL_BITMODE = 117 - SC_AIX_REALMEM = 118 - SC_AIX_HARDWARE_BITMODE = 119 - SC_AIX_MP_CAPABLE = 120 - SC_V6_ILP32_OFF32 = 121 - SC_V6_ILP32_OFFBIG = 122 - SC_V6_LP64_OFF64 = 123 - SC_V6_LPBIG_OFFBIG = 124 - SC_XOPEN_STREAMS = 125 - SC_HOST_NAME_MAX = 126 - SC_REGEXP = 127 - SC_SHELL = 128 - SC_SYMLOOP_MAX = 129 - SC_ADVISORY_INFO = 130 - SC_FILE_LOCKING = 131 - SC_2_PBS = 132 - SC_2_PBS_ACCOUNTING = 133 - SC_2_PBS_CHECKPOINT = 134 - SC_2_PBS_LOCATE = 135 - SC_2_PBS_MESSAGE = 136 - SC_2_PBS_TRACK = 137 - SC_BARRIERS = 138 - SC_CLOCK_SELECTION = 139 - SC_CPUTIME = 140 - SC_MONOTONIC_CLOCK = 141 - SC_READER_WRITER_LOCKS = 142 - SC_SPAWN = 143 - SC_SPIN_LOCKS = 144 - SC_SPORADIC_SERVER = 145 - SC_THREAD_CPUTIME = 146 - SC_THREAD_SPORADIC_SERVER = 147 - SC_TIMEOUTS = 148 - SC_TRACE = 149 - SC_TRACE_EVENT_FILTER = 150 - SC_TRACE_INHERIT = 151 - SC_TRACE_LOG = 152 - SC_TYPED_MEMORY_OBJECTS = 153 - SC_IPV6 = 154 - SC_RAW_SOCKETS = 155 - SC_SS_REPL_MAX = 156 - SC_TRACE_EVENT_NAME_MAX = 157 - SC_TRACE_NAME_MAX = 158 - SC_TRACE_SYS_MAX = 159 - SC_TRACE_USER_EVENT_MAX = 160 - SC_AIX_UKEYS = 161 - SC_AIX_ENHANCED_AFFINITY = 162 - SC_V7_ILP32_OFF32 = 163 - SC_V7_ILP32_OFFBIG = 164 - SC_V7_LP64_OFF64 = 165 - SC_V7_LPBIG_OFFBIG = 166 - SC_THREAD_ROBUST_PRIO_INHERIT = 167 - SC_THREAD_ROBUST_PRIO_PROTECT = 168 - SC_XOPEN_UUCP = 169 - SC_XOPEN_ARMOR = 170 -) - -func Sysconf(name int32) (int64, error) { - r := C.sysconf(C.int(name)) - if r == -1 { - return 0, fmt.Errorf("sysconf error") - } else { - return int64(r), nil - } -} diff --git a/vendor/github.com/power-devops/perfstat/systemcfg.go b/vendor/github.com/power-devops/perfstat/systemcfg.go deleted file mode 100644 index 6287eb46ab8..00000000000 --- a/vendor/github.com/power-devops/perfstat/systemcfg.go +++ /dev/null @@ -1,635 +0,0 @@ -// +build aix - -package perfstat - -import "golang.org/x/sys/unix" - -// function Getsystemcfg() is defined in golang.org/x/sys/unix -// we define here just missing constants for the function and some helpers - -// Calls to getsystemcfg() -const ( - SC_ARCH = 1 /* processor architecture */ - SC_IMPL = 2 /* processor implementation */ - SC_VERS = 3 /* processor version */ - SC_WIDTH = 4 /* width (32 || 64) */ - SC_NCPUS = 5 /* 1 = UP, n = n-way MP */ - SC_L1C_ATTR = 6 /* L1 cache attributes (bit flags) */ - SC_L1C_ISZ = 7 /* size of L1 instruction cache */ - SC_L1C_DSZ = 8 /* size of L1 data cache */ - SC_L1C_ICA = 9 /* L1 instruction cache associativity */ - SC_L1C_DCA = 10 /* L1 data cache associativity */ - SC_L1C_IBS = 11 /* L1 instruction cache block size */ - SC_L1C_DBS = 12 /* L1 data cache block size */ - SC_L1C_ILS = 13 /* L1 instruction cache line size */ - SC_L1C_DLS = 14 /* L1 data cache line size */ - SC_L2C_SZ = 15 /* size of L2 cache, 0 = No L2 cache */ - SC_L2C_AS = 16 /* L2 cache associativity */ - SC_TLB_ATTR = 17 /* TLB attributes (bit flags) */ - SC_ITLB_SZ = 18 /* entries in instruction TLB */ - SC_DTLB_SZ = 19 /* entries in data TLB */ - SC_ITLB_ATT = 20 /* instruction tlb associativity */ - SC_DTLB_ATT = 21 /* data tlb associativity */ - SC_RESRV_SZ = 22 /* size of reservation */ - SC_PRI_LC = 23 /* spin lock count in supevisor mode */ - SC_PRO_LC = 24 /* spin lock count in problem state */ - SC_RTC_TYPE = 25 /* RTC type */ - SC_VIRT_AL = 26 /* 1 if hardware aliasing is supported */ - SC_CAC_CONG = 27 /* number of page bits for cache synonym */ - SC_MOD_ARCH = 28 /* used by system for model determination */ - SC_MOD_IMPL = 29 /* used by system for model determination */ - SC_XINT = 30 /* used by system for time base conversion */ - SC_XFRAC = 31 /* used by system for time base conversion */ - SC_KRN_ATTR = 32 /* kernel attributes, see below */ - SC_PHYSMEM = 33 /* bytes of OS available memory */ - SC_SLB_ATTR = 34 /* SLB attributes */ - SC_SLB_SZ = 35 /* size of slb (0 = no slb) */ - SC_ORIG_NCPUS = 36 /* original number of CPUs */ - SC_MAX_NCPUS = 37 /* max cpus supported by this AIX image */ - SC_MAX_REALADDR = 38 /* max supported real memory address +1 */ - SC_ORIG_ENT_CAP = 39 /* configured entitled processor capacity at boot required by cross-partition LPAR tools. */ - SC_ENT_CAP = 40 /* entitled processor capacity */ - SC_DISP_WHE = 41 /* Dispatch wheel time period (TB units) */ - SC_CAPINC = 42 /* delta by which capacity can change */ - SC_VCAPW = 43 /* priority weight for idle capacity distribution */ - SC_SPLP_STAT = 44 /* State of SPLPAR enablement: 0x1 => 1=SPLPAR capable; 0=not, 0x2 => SPLPAR enabled 0=dedicated, 1=shared */ - SC_SMT_STAT = 45 /* State of SMT enablement: 0x1 = SMT Capable 0=no/1=yes, 0x2 = SMT Enabled 0=no/1=yes, 0x4 = SMT threads bound true 0=no/1=yes */ - SC_SMT_TC = 46 /* Number of SMT Threads per Physical CPU */ - SC_VMX_VER = 47 /* RPA defined VMX version: 0 = VMX not available or disabled, 1 = VMX capable, 2 = VMX and VSX capable */ - SC_LMB_SZ = 48 /* Size of an LMB on this system. */ - SC_MAX_XCPU = 49 /* Number of exclusive cpus on line */ - SC_EC_LVL = 50 /* Kernel error checking level */ - SC_AME_STAT = 51 /* AME status */ - SC_ECO_STAT = 52 /* extended cache options */ - SC_DFP_STAT = 53 /* RPA defined DFP version, 0=none/disabled */ - SC_VRM_STAT = 54 /* VRM Capable/enabled */ - SC_PHYS_IMP = 55 /* physical processor implementation */ - SC_PHYS_VER = 56 /* physical processor version */ - SC_SPCM_STATUS = 57 - SC_SPCM_MAX = 58 - SC_TM_VER = 59 /* Transaction Memory version, 0 - not capable */ - SC_NX_CAP = 60 /* NX GZIP capable */ - SC_PKS_STATE = 61 /* Platform KeyStore */ -) - -/* kernel attributes */ -/* bit 0/1 meaning */ -/* -----------------------------------------*/ -/* 31 32-bit kernel / 64-bit kernel */ -/* 30 non-LPAR / LPAR */ -/* 29 old 64bit ABI / 64bit Large ABI */ -/* 28 non-NUMA / NUMA */ -/* 27 UP / MP */ -/* 26 no DR CPU add / DR CPU add support */ -/* 25 no DR CPU rm / DR CPU rm support */ -/* 24 no DR MEM add / DR MEM add support */ -/* 23 no DR MEM rm / DR MEM rm support */ -/* 22 kernel keys disabled / enabled */ -/* 21 no recovery / recovery enabled */ -/* 20 non-MLS / MLS enabled */ -/* 19 enhanced affinity indicator */ -/* 18 non-vTPM / vTPM enabled */ -/* 17 non-VIOS / VIOS */ - -// Values for architecture field -const ( - ARCH_POWER_RS = 0x0001 /* Power Classic architecture */ - ARCH_POWER_PC = 0x0002 /* Power PC architecture */ - ARCH_IA64 = 0x0003 /* Intel IA64 architecture */ -) - -// Values for implementation field for POWER_PC Architectures -const ( - IMPL_POWER_RS1 = 0x00001 /* RS1 class CPU */ - IMPL_POWER_RSC = 0x00002 /* RSC class CPU */ - IMPL_POWER_RS2 = 0x00004 /* RS2 class CPU */ - IMPL_POWER_601 = 0x00008 /* 601 class CPU */ - IMPL_POWER_603 = 0x00020 /* 603 class CPU */ - IMPL_POWER_604 = 0x00010 /* 604 class CPU */ - IMPL_POWER_620 = 0x00040 /* 620 class CPU */ - IMPL_POWER_630 = 0x00080 /* 630 class CPU */ - IMPL_POWER_A35 = 0x00100 /* A35 class CPU */ - IMPL_POWER_RS64II = 0x0200 /* RS64-II class CPU */ - IMPL_POWER_RS64III = 0x0400 /* RS64-III class CPU */ - IMPL_POWER4 = 0x0800 /* 4 class CPU */ - IMPL_POWER_RS64IV = IMPL_POWER4 /* 4 class CPU */ - IMPL_POWER_MPC7450 = 0x1000 /* MPC7450 class CPU */ - IMPL_POWER5 = 0x2000 /* 5 class CPU */ - IMPL_POWER6 = 0x4000 /* 6 class CPU */ - IMPL_POWER7 = 0x8000 /* 7 class CPU */ - IMPL_POWER8 = 0x10000 /* 8 class CPU */ - IMPL_POWER9 = 0x20000 /* 9 class CPU */ -) - -// Values for implementation field for IA64 Architectures -const ( - IMPL_IA64_M1 = 0x0001 /* IA64 M1 class CPU (Itanium) */ - IMPL_IA64_M2 = 0x0002 /* IA64 M2 class CPU */ -) - -// Values for the version field -const ( - PV_601 = 0x010001 /* Power PC 601 */ - PV_601A = 0x010002 /* Power PC 601 */ - PV_603 = 0x060000 /* Power PC 603 */ - PV_604 = 0x050000 /* Power PC 604 */ - PV_620 = 0x070000 /* Power PC 620 */ - PV_630 = 0x080000 /* Power PC 630 */ - PV_A35 = 0x090000 /* Power PC A35 */ - PV_RS64II = 0x0A0000 /* Power PC RS64II */ - PV_RS64III = 0x0B0000 /* Power PC RS64III */ - PV_4 = 0x0C0000 /* Power PC 4 */ - PV_RS64IV = PV_4 /* Power PC 4 */ - PV_MPC7450 = 0x0D0000 /* Power PC MPC7450 */ - PV_4_2 = 0x0E0000 /* Power PC 4 */ - PV_4_3 = 0x0E0001 /* Power PC 4 */ - PV_5 = 0x0F0000 /* Power PC 5 */ - PV_5_2 = 0x0F0001 /* Power PC 5 */ - PV_5_3 = 0x0F0002 /* Power PC 5 */ - PV_6 = 0x100000 /* Power PC 6 */ - PV_6_1 = 0x100001 /* Power PC 6 DD1.x */ - PV_7 = 0x200000 /* Power PC 7 */ - PV_8 = 0x300000 /* Power PC 8 */ - PV_9 = 0x400000 /* Power PC 9 */ - PV_5_Compat = 0x0F8000 /* Power PC 5 */ - PV_6_Compat = 0x108000 /* Power PC 6 */ - PV_7_Compat = 0x208000 /* Power PC 7 */ - PV_8_Compat = 0x308000 /* Power PC 8 */ - PV_9_Compat = 0x408000 /* Power PC 9 */ - PV_RESERVED_2 = 0x0A0000 /* source compatability */ - PV_RESERVED_3 = 0x0B0000 /* source compatability */ - PV_RS2 = 0x040000 /* Power RS2 */ - PV_RS1 = 0x020000 /* Power RS1 */ - PV_RSC = 0x030000 /* Power RSC */ - PV_M1 = 0x008000 /* Intel IA64 M1 */ - PV_M2 = 0x008001 /* Intel IA64 M2 */ -) - -// Values for rtc_type -const ( - RTC_POWER = 1 /* rtc as defined by Power Arch. */ - RTC_POWER_PC = 2 /* rtc as defined by Power PC Arch. */ - RTC_IA64 = 3 /* rtc as defined by IA64 Arch. */ -) - -const NX_GZIP_PRESENT = 0x00000001 - -const ( - PKS_STATE_CAPABLE = 1 - PKS_STATE_ENABLED = 2 -) - -// Macros for identifying physical processor -const ( - PPI4_1 = 0x35 - PPI4_2 = 0x38 - PPI4_3 = 0x39 - PPI4_4 = 0x3C - PPI4_5 = 0x44 - PPI5_1 = 0x3A - PPI5_2 = 0x3B - PPI6_1 = 0x3E - PPI7_1 = 0x3F - PPI7_2 = 0x4A - PPI8_1 = 0x4B - PPI8_2 = 0x4D - PPI9 = 0x4E -) - -// Macros for kernel attributes -const ( - KERN_TYPE = 0x1 - KERN_LPAR = 0x2 - KERN_64BIT_LARGE_ABI = 0x4 - KERN_NUMA = 0x8 - KERN_UPMP = 0x10 - KERN_DR_CPU_ADD = 0x20 - KERN_DR_CPU_RM = 0x40 - KERN_DR_MEM_ADD = 0x80 - KERN_DR_MEM_RM = 0x100 - KERN_KKEY_ENABLED = 0x200 - KERN_RECOVERY = 0x400 - KERN_MLS = 0x800 - KERN_ENH_AFFINITY = 0x1000 - KERN_VTPM = 0x2000 - KERN_VIOS = 0x4000 -) - -// macros for SPLPAR environment. -const ( - SPLPAR_CAPABLE = 0x1 - SPLPAR_ENABLED = 0x2 - SPLPAR_DONATE_CAPABLE = 0x4 -) - -// Macros for SMT status determination -const ( - SMT_CAPABLE = 0x1 - SMT_ENABLE = 0x2 - SMT_BOUND = 0x4 - SMT_ORDER = 0x8 -) - -// Macros for VRM status determination -const ( - VRM_CAPABLE = 0x1 - VRM_ENABLE = 0x2 - CMOX_CAPABLE = 0x4 -) - -// Macros for AME status determination -const AME_ENABLE = 0x1 - -// Macros for extended cache options -const ( - ECO_CAPABLE = 0x1 - ECO_ENABLE = 0x2 -) - -// These define blocks of values for model_arch and model_impl that are reserved for OEM use. -const ( - MODEL_ARCH_RSPC = 2 - MODEL_ARCH_CHRP = 3 - MODEL_ARCH_IA64 = 4 - MODEL_ARCH_OEM_START = 1024 - MODEL_ARCH_OEM_END = 2047 - MODEL_IMPL_RS6K_UP_MCA = 1 - MODEL_IMPL_RS6K_SMP_MCA = 2 - MODEL_IMPL_RSPC_UP_PCI = 3 - MODEL_IMPL_RSPC_SMP_PCI = 4 - MODEL_IMPL_CHRP_UP_PCI = 5 - MODEL_IMPL_CHRP_SMP_PCI = 6 - MODEL_IMPL_IA64_COM = 7 - MODEL_IMPL_IA64_SOFTSDV = 8 - MODEL_IMPL_MAMBO_SIM = 9 - MODEL_IMPL_POWER_KVM = 10 - MODEL_IMPL_OEM_START = 1024 - MODEL_IMPL_OEM_END = 2047 -) - -// example determining processor compatibilty mode on AIX: -// impl := unix.Getsystemcfg(SC_IMPL) -// if impl&IMPL_POWER8 != 0 { -// // we are running on POWER8 -// } -// if impl&IMPL_POWER9 != 0 { -// // we are running on POWER9 -// } - -func GetCPUImplementation() string { - impl := unix.Getsystemcfg(SC_IMPL) - switch { - case impl&IMPL_POWER4 != 0: - return "POWER4" - case impl&IMPL_POWER5 != 0: - return "POWER5" - case impl&IMPL_POWER6 != 0: - return "POWER6" - case impl&IMPL_POWER7 != 0: - return "POWER7" - case impl&IMPL_POWER8 != 0: - return "POWER8" - case impl&IMPL_POWER9 != 0: - return "POWER9" - default: - return "Unknown" - } -} - -func POWER9OrNewer() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER9 != 0 { - return true - } - return false -} - -func POWER9() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER9 != 0 { - return true - } - return false -} - -func POWER8OrNewer() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER9 != 0 || impl&IMPL_POWER8 != 0 { - return true - } - return false -} - -func POWER8() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER8 != 0 { - return true - } - return false -} - -func POWER7OrNewer() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER9 != 0 || impl&IMPL_POWER8 != 0 || impl&IMPL_POWER7 != 0 { - return true - } - return false -} - -func POWER7() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER7 != 0 { - return true - } - return false -} - -func HasTransactionalMemory() bool { - impl := unix.Getsystemcfg(SC_TM_VER) - if impl > 0 { - return true - } - return false -} - -func Is64Bit() bool { - impl := unix.Getsystemcfg(SC_WIDTH) - if impl == 64 { - return true - } - return false -} - -func IsSMP() bool { - impl := unix.Getsystemcfg(SC_NCPUS) - if impl > 1 { - return true - } - return false -} - -func HasVMX() bool { - impl := unix.Getsystemcfg(SC_VMX_VER) - if impl > 0 { - return true - } - return false -} - -func HasVSX() bool { - impl := unix.Getsystemcfg(SC_VMX_VER) - if impl > 1 { - return true - } - return false -} - -func HasDFP() bool { - impl := unix.Getsystemcfg(SC_DFP_STAT) - if impl > 1 { - return true - } - return false -} - -func HasNxGzip() bool { - impl := unix.Getsystemcfg(SC_NX_CAP) - if impl&NX_GZIP_PRESENT > 0 { - return true - } - return false -} - -func PksCapable() bool { - impl := unix.Getsystemcfg(SC_PKS_STATE) - if impl&PKS_STATE_CAPABLE > 0 { - return true - } - return false -} - -func PksEnabled() bool { - impl := unix.Getsystemcfg(SC_PKS_STATE) - if impl&PKS_STATE_ENABLED > 0 { - return true - } - return false -} - -func CPUMode() string { - impl := unix.Getsystemcfg(SC_VERS) - switch impl { - case PV_9, PV_9_Compat: - return "POWER9" - case PV_8, PV_8_Compat: - return "POWER8" - case PV_7, PV_7_Compat: - return "POWER7" - default: - return "Unknown" - } -} - -func KernelBits() int { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_TYPE == KERN_TYPE { - return 64 - } - return 32 -} - -func IsLPAR() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_LPAR == KERN_LPAR { - return true - } - return false -} - -func CpuAddCapable() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_DR_CPU_ADD == KERN_DR_CPU_ADD { - return true - } - return false -} - -func CpuRemoveCapable() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_DR_CPU_RM == KERN_DR_CPU_RM { - return true - } - return false -} - -func MemoryAddCapable() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_DR_MEM_ADD == KERN_DR_MEM_ADD { - return true - } - return false -} - -func MemoryRemoveCapable() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_DR_MEM_RM == KERN_DR_MEM_RM { - return true - } - return false -} - -func DLparCapable() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&(KERN_DR_CPU_ADD|KERN_DR_CPU_RM|KERN_DR_MEM_ADD|KERN_DR_MEM_RM) > 0 { - return true - } - return false -} - -func IsNUMA() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_NUMA > 0 { - return true - } - return false -} - -func KernelKeys() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_KKEY_ENABLED > 0 { - return true - } - return false -} - -func RecoveryMode() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_RECOVERY > 0 { - return true - } - return false -} - -func EnhancedAffinity() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_ENH_AFFINITY > 0 { - return true - } - return false -} - -func VTpmEnabled() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_VTPM > 0 { - return true - } - return false -} - -func IsVIOS() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_VIOS > 0 { - return true - } - return false -} - -func MLSEnabled() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_MLS > 0 { - return true - } - return false -} - -func SPLparCapable() bool { - impl := unix.Getsystemcfg(SC_SPLP_STAT) - if impl&SPLPAR_CAPABLE > 0 { - return true - } - return false -} - -func SPLparEnabled() bool { - impl := unix.Getsystemcfg(SC_SPLP_STAT) - if impl&SPLPAR_ENABLED > 0 { - return true - } - return false -} - -func DedicatedLpar() bool { - return !SPLparEnabled() -} - -func SPLparCapped() bool { - impl := unix.Getsystemcfg(SC_VCAPW) - if impl == 0 { - return true - } - return false -} - -func SPLparDonating() bool { - impl := unix.Getsystemcfg(SC_SPLP_STAT) - if impl&SPLPAR_DONATE_CAPABLE > 0 { - return true - } - return false -} - -func SmtCapable() bool { - impl := unix.Getsystemcfg(SC_SMT_STAT) - if impl&SMT_CAPABLE > 0 { - return true - } - return false -} - -func SmtEnabled() bool { - impl := unix.Getsystemcfg(SC_SMT_STAT) - if impl&SMT_ENABLE > 0 { - return true - } - return false -} - -func VrmCapable() bool { - impl := unix.Getsystemcfg(SC_VRM_STAT) - if impl&VRM_CAPABLE > 0 { - return true - } - return false -} - -func VrmEnabled() bool { - impl := unix.Getsystemcfg(SC_VRM_STAT) - if impl&VRM_ENABLE > 0 { - return true - } - return false -} - -func AmeEnabled() bool { - impl := unix.Getsystemcfg(SC_AME_STAT) - if impl&AME_ENABLE > 0 { - return true - } - return false -} - -func EcoCapable() bool { - impl := unix.Getsystemcfg(SC_ECO_STAT) - if impl&ECO_CAPABLE > 0 { - return true - } - return false -} - -func EcoEnabled() bool { - impl := unix.Getsystemcfg(SC_ECO_STAT) - if impl&ECO_ENABLE > 0 { - return true - } - return false -} diff --git a/vendor/github.com/power-devops/perfstat/types_cpu.go b/vendor/github.com/power-devops/perfstat/types_cpu.go deleted file mode 100644 index 84425e92f50..00000000000 --- a/vendor/github.com/power-devops/perfstat/types_cpu.go +++ /dev/null @@ -1,186 +0,0 @@ -package perfstat - -type CPU struct { - Name string /* logical processor name (cpu0, cpu1, ..) */ - User int64 /* raw number of clock ticks spent in user mode */ - Sys int64 /* raw number of clock ticks spent in system mode */ - Idle int64 /* raw number of clock ticks spent idle */ - Wait int64 /* raw number of clock ticks spent waiting for I/O */ - PSwitch int64 /* number of context switches (changes of currently running process) */ - Syscall int64 /* number of system calls executed */ - Sysread int64 /* number of read system calls executed */ - Syswrite int64 /* number of write system calls executed */ - Sysfork int64 /* number of fork system call executed */ - Sysexec int64 /* number of exec system call executed */ - Readch int64 /* number of characters tranferred with read system call */ - Writech int64 /* number of characters tranferred with write system call */ - Bread int64 /* number of block reads */ - Bwrite int64 /* number of block writes */ - Lread int64 /* number of logical read requests */ - Lwrite int64 /* number of logical write requests */ - Phread int64 /* number of physical reads (reads on raw device) */ - Phwrite int64 /* number of physical writes (writes on raw device) */ - Iget int64 /* number of inode lookups */ - Namei int64 /* number of vnode lookup from a path name */ - Dirblk int64 /* number of 512-byte block reads by the directory search routine to locate an entry for a file */ - Msg int64 /* number of IPC message operations */ - Sema int64 /* number of IPC semaphore operations */ - MinFaults int64 /* number of page faults with no I/O */ - MajFaults int64 /* number of page faults with disk I/O */ - PUser int64 /* raw number of physical processor tics in user mode */ - PSys int64 /* raw number of physical processor tics in system mode */ - PIdle int64 /* raw number of physical processor tics idle */ - PWait int64 /* raw number of physical processor tics waiting for I/O */ - RedispSD0 int64 /* number of thread redispatches within the scheduler affinity domain 0 */ - RedispSD1 int64 /* number of thread redispatches within the scheduler affinity domain 1 */ - RedispSD2 int64 /* number of thread redispatches within the scheduler affinity domain 2 */ - RedispSD3 int64 /* number of thread redispatches within the scheduler affinity domain 3 */ - RedispSD4 int64 /* number of thread redispatches within the scheduler affinity domain 4 */ - RedispSD5 int64 /* number of thread redispatches within the scheduler affinity domain 5 */ - MigrationPush int64 /* number of thread migrations from the local runque to another queue due to starvation load balancing */ - MigrationS3grq int64 /* number of thread migrations from the global runque to the local runque resulting in a move accross scheduling domain 3 */ - MigrationS3pul int64 /* number of thread migrations from another processor's runque resulting in a move accross scheduling domain 3 */ - InvolCSwitch int64 /* number of involuntary thread context switches */ - VolCSwitch int64 /* number of voluntary thread context switches */ - RunQueue int64 /* number of threads on the runque */ - Bound int64 /* number of bound threads */ - DecrIntrs int64 /* number of decrementer tics interrupts */ - MpcRIntrs int64 /* number of mpc's received interrupts */ - MpcSIntrs int64 /* number of mpc's sent interrupts */ - DevIntrs int64 /* number of device interrupts */ - SoftIntrs int64 /* number of offlevel handlers called */ - PhantIntrs int64 /* number of phantom interrupts */ - IdleDonatedPurr int64 /* number of idle cycles donated by a dedicated partition enabled for donation */ - IdleDonatedSpurr int64 /* number of idle spurr cycles donated by a dedicated partition enabled for donation */ - BusyDonatedPurr int64 /* number of busy cycles donated by a dedicated partition enabled for donation */ - BusyDonatedSpurr int64 /* number of busy spurr cycles donated by a dedicated partition enabled for donation */ - IdleStolenPurr int64 /* number of idle cycles stolen by the hypervisor from a dedicated partition */ - IdleStolenSpurr int64 /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */ - BusyStolenPurr int64 /* number of busy cycles stolen by the hypervisor from a dedicated partition */ - BusyStolenSpurr int64 /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */ - Hpi int64 /* number of hypervisor page-ins */ - Hpit int64 /* Time spent in hypervisor page-ins (in nanoseconds)*/ - PUserSpurr int64 /* number of spurr cycles spent in user mode */ - PSysSpurr int64 /* number of spurr cycles spent in kernel mode */ - PIdleSpurr int64 /* number of spurr cycles spent in idle mode */ - PWaitSpurr int64 /* number of spurr cycles spent in wait mode */ - SpurrFlag int32 /* set if running in spurr mode */ - LocalDispatch int64 /* number of local thread dispatches on this logical CPU */ - NearDispatch int64 /* number of near thread dispatches on this logical CPU */ - FarDispatch int64 /* number of far thread dispatches on this logical CPU */ - CSwitches int64 /* Context switches */ - Version int64 /* version number (1, 2, etc.,) */ - TbLast int64 /* timebase counter */ - State int /* Show whether the CPU is offline or online */ - VtbLast int64 /* Last virtual timebase read */ - ICountLast int64 /* Last instruction count read */ -} - -type CPUTotal struct { - NCpus int /* number of active logical processors */ - NCpusCfg int /* number of configured processors */ - Description string /* processor description (type/official name) */ - ProcessorHz int64 /* processor speed in Hz */ - User int64 /* raw total number of clock ticks spent in user mode */ - Sys int64 /* raw total number of clock ticks spent in system mode */ - Idle int64 /* raw total number of clock ticks spent idle */ - Wait int64 /* raw total number of clock ticks spent waiting for I/O */ - PSwitch int64 /* number of process switches (change in currently running process) */ - Syscall int64 /* number of system calls executed */ - Sysread int64 /* number of read system calls executed */ - Syswrite int64 /* number of write system calls executed */ - Sysfork int64 /* number of forks system calls executed */ - Sysexec int64 /* number of execs system calls executed */ - Readch int64 /* number of characters tranferred with read system call */ - Writech int64 /* number of characters tranferred with write system call */ - DevIntrs int64 /* number of device interrupts */ - SoftIntrs int64 /* number of software interrupts */ - Lbolt int64 /* number of ticks since last reboot */ - LoadAvg1 float32 /* times the average number of runnables processes during the last 1, 5 and 15 minutes. */ - LoadAvg5 float32 /* times the average number of runnables processes during the last 1, 5 and 15 minutes. */ - LoadAvg15 float32 /* times the average number of runnables processes during the last 1, 5 and 15 minutes. */ - RunQueue int64 /* length of the run queue (processes ready) */ - SwpQueue int64 /* length of the swap queue (processes waiting to be paged in) */ - Bread int64 /* number of blocks read */ - Bwrite int64 /* number of blocks written */ - Lread int64 /* number of logical read requests */ - Lwrite int64 /* number of logical write requests */ - Phread int64 /* number of physical reads (reads on raw devices) */ - Phwrite int64 /* number of physical writes (writes on raw devices) */ - RunOcc int64 /* updated whenever runque is updated, i.e. the runqueue is occupied. This can be used to compute the simple average of ready processes */ - SwpOcc int64 /* updated whenever swpque is updated. i.e. the swpqueue is occupied. This can be used to compute the simple average processes waiting to be paged in */ - Iget int64 /* number of inode lookups */ - Namei int64 /* number of vnode lookup from a path name */ - Dirblk int64 /* number of 512-byte block reads by the directory search routine to locate an entry for a file */ - Msg int64 /* number of IPC message operations */ - Sema int64 /* number of IPC semaphore operations */ - RcvInt int64 /* number of tty receive interrupts */ - XmtInt int64 /* number of tyy transmit interrupts */ - MdmInt int64 /* number of modem interrupts */ - TtyRawInch int64 /* number of raw input characters */ - TtyCanInch int64 /* number of canonical input characters (always zero) */ - TtyRawOutch int64 /* number of raw output characters */ - Ksched int64 /* number of kernel processes created */ - Koverf int64 /* kernel process creation attempts where: -the user has forked to their maximum limit -the configuration limit of processes has been reached */ - Kexit int64 /* number of kernel processes that became zombies */ - Rbread int64 /* number of remote read requests */ - Rcread int64 /* number of cached remote reads */ - Rbwrt int64 /* number of remote writes */ - Rcwrt int64 /* number of cached remote writes */ - Traps int64 /* number of traps */ - NCpusHigh int64 /* index of highest processor online */ - PUser int64 /* raw number of physical processor tics in user mode */ - PSys int64 /* raw number of physical processor tics in system mode */ - PIdle int64 /* raw number of physical processor tics idle */ - PWait int64 /* raw number of physical processor tics waiting for I/O */ - DecrIntrs int64 /* number of decrementer tics interrupts */ - MpcRIntrs int64 /* number of mpc's received interrupts */ - MpcSIntrs int64 /* number of mpc's sent interrupts */ - PhantIntrs int64 /* number of phantom interrupts */ - IdleDonatedPurr int64 /* number of idle cycles donated by a dedicated partition enabled for donation */ - IdleDonatedSpurr int64 /* number of idle spurr cycles donated by a dedicated partition enabled for donation */ - BusyDonatedPurr int64 /* number of busy cycles donated by a dedicated partition enabled for donation */ - BusyDonatedSpurr int64 /* number of busy spurr cycles donated by a dedicated partition enabled for donation */ - IdleStolenPurr int64 /* number of idle cycles stolen by the hypervisor from a dedicated partition */ - IdleStolenSpurr int64 /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */ - BusyStolenPurr int64 /* number of busy cycles stolen by the hypervisor from a dedicated partition */ - BusyStolenSpurr int64 /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */ - IOWait int32 /* number of processes that are asleep waiting for buffered I/O */ - PhysIO int32 /* number of processes waiting for raw I/O */ - TWait int64 /* number of threads that are waiting for filesystem direct(cio) */ - Hpi int64 /* number of hypervisor page-ins */ - Hpit int64 /* Time spent in hypervisor page-ins (in nanoseconds) */ - PUserSpurr int64 /* number of spurr cycles spent in user mode */ - PSysSpurr int64 /* number of spurr cycles spent in kernel mode */ - PIdleSpurr int64 /* number of spurr cycles spent in idle mode */ - PWaitSpurr int64 /* number of spurr cycles spent in wait mode */ - SpurrFlag int /* set if running in spurr mode */ - Version int64 /* version number (1, 2, etc.,) */ - TbLast int64 /*time base counter */ - PurrCoalescing int64 /* If the calling partition is authorized to see pool wide statistics then PURR cycles consumed to coalesce data else set to zero.*/ - SpurrCoalescing int64 /* If the calling partition is authorized to see pool wide statistics then SPURR cycles consumed to coalesce data else set to zero. */ -} - -type CPUUtil struct { - Version int64 - CpuID string /* holds the id of the cpu */ - Entitlement float32 /* Partition's entitlement */ - UserPct float32 /* % of utilization in user mode */ - KernPct float32 /* % of utilization in kernel mode */ - IdlePct float32 /* % of utilization in idle mode */ - WaitPct float32 /* % of utilization in wait mode */ - PhysicalBusy float32 /* physical cpus busy */ - PhysicalConsumed float32 /* total cpus consumed by the partition */ - FreqPct float32 /* Average freq% over the last interval */ - EntitlementPct float32 /* % of entitlement used */ - BusyPct float32 /* % of entitlement busy */ - IdleDonatedPct float32 /* % idle cycles donated */ - BusyDonatedPct float32 /* % of busy cycles donated */ - IdleStolenPct float32 /* % idle cycles stolen */ - BusyStolenPct float32 /* % busy cycles stolen */ - LUserPct float32 /* % of utilization in user mode, in terms of logical processor ticks */ - LKernPct float32 /* % of utilization in kernel mode, in terms of logical processor ticks*/ - LIdlePct float32 /* % of utilization in idle mode, in terms of logical processor ticks */ - LWaitPct float32 /* % of utilization in wait mode, in terms of logical processor ticks */ - DeltaTime int64 /* delta time in milliseconds, for which utilization is evaluated */ -} diff --git a/vendor/github.com/power-devops/perfstat/types_disk.go b/vendor/github.com/power-devops/perfstat/types_disk.go deleted file mode 100644 index ca1493d8726..00000000000 --- a/vendor/github.com/power-devops/perfstat/types_disk.go +++ /dev/null @@ -1,176 +0,0 @@ -package perfstat - -type DiskTotal struct { - Number int32 /* total number of disks */ - Size int64 /* total size of all disks (in MB) */ - Free int64 /* free portion of all disks (in MB) */ - XRate int64 /* __rxfers: total number of transfers from disk */ - Xfers int64 /* total number of transfers to/from disk */ - Wblks int64 /* 512 bytes blocks written to all disks */ - Rblks int64 /* 512 bytes blocks read from all disks */ - Time int64 /* amount of time disks are active */ - Version int64 /* version number (1, 2, etc.,) */ - Rserv int64 /* Average read or receive service time */ - MinRserv int64 /* min read or receive service time */ - MaxRserv int64 /* max read or receive service time */ - RTimeOut int64 /* number of read request timeouts */ - RFailed int64 /* number of failed read requests */ - Wserv int64 /* Average write or send service time */ - MinWserv int64 /* min write or send service time */ - MaxWserv int64 /* max write or send service time */ - WTimeOut int64 /* number of write request timeouts */ - WFailed int64 /* number of failed write requests */ - WqDepth int64 /* instantaneous wait queue depth (number of requests waiting to be sent to disk) */ - WqTime int64 /* accumulated wait queueing time */ - WqMinTime int64 /* min wait queueing time */ - WqMaxTime int64 /* max wait queueing time */ -} - -// Disk Adapter Types -const ( - DA_SCSI = 0 /* 0 ==> SCSI, SAS, other legacy adapter types */ - DA_VSCSI /* 1 ==> Virtual SCSI/SAS Adapter */ - DA_FCA /* 2 ==> Fiber Channel Adapter */ -) - -type DiskAdapter struct { - Name string /* name of the adapter (from ODM) */ - Description string /* adapter description (from ODM) */ - Number int32 /* number of disks connected to adapter */ - Size int64 /* total size of all disks (in MB) */ - Free int64 /* free portion of all disks (in MB) */ - XRate int64 /* __rxfers: total number of reads via adapter */ - Xfers int64 /* total number of transfers via adapter */ - Rblks int64 /* 512 bytes blocks written via adapter */ - Wblks int64 /* 512 bytes blocks read via adapter */ - Time int64 /* amount of time disks are active */ - Version int64 /* version number (1, 2, etc.,) */ - AdapterType int64 /* 0 ==> SCSI, SAS, other legacy adapter types, 1 ==> Virtual SCSI/SAS Adapter, 2 ==> Fiber Channel Adapter */ - DkBSize int64 /* Number of Bytes in a block for this disk*/ - DkRxfers int64 /* Number of transfers from disk */ - DkRserv int64 /* read or receive service time */ - DkWserv int64 /* write or send service time */ - MinRserv int64 /* Minimum read service time */ - MaxRserv int64 /* Maximum read service time */ - MinWserv int64 /* Minimum Write service time */ - MaxWserv int64 /* Maximum write service time */ - WqDepth int64 /* driver wait queue depth */ - WqSampled int64 /* accumulated sampled dk_wq_depth */ - WqTime int64 /* accumulated wait queueing time */ - WqMinTime int64 /* minimum wait queueing time */ - WqMaxTime int64 /* maximum wait queueing time */ - QFull int64 /* "Service" queue full occurrence count (number of times the adapter/devices connected to the adapter is not accepting any more request) */ - QSampled int64 /* accumulated sampled */ -} - -type Disk struct { - Name string /* name of the disk */ - Description string /* disk description (from ODM) */ - VGName string /* volume group name (from ODM) */ - Size int64 /* size of the disk (in MB) */ - Free int64 /* free portion of the disk (in MB) */ - BSize int64 /* disk block size (in bytes) */ - XRate int64 /* number of transfers from disk */ - Xfers int64 /* number of transfers to/from disk */ - Wblks int64 /* number of blocks written to disk */ - Rblks int64 /* number of blocks read from disk */ - QDepth int64 /* instantaneous "service" queue depth (number of requests sent to disk and not completed yet) */ - Time int64 /* amount of time disk is active */ - Adapter string /* disk adapter name */ - PathsCount int32 /* number of paths to this disk */ - QFull int64 /* "service" queue full occurrence count (number of times the disk is not accepting any more request) */ - Rserv int64 /* read or receive service time */ - RTimeOut int64 /* number of read request timeouts */ - Rfailed int64 /* number of failed read requests */ - MinRserv int64 /* min read or receive service time */ - MaxRserv int64 /* max read or receive service time */ - Wserv int64 /* write or send service time */ - WTimeOut int64 /* number of write request timeouts */ - Wfailed int64 /* number of failed write requests */ - MinWserv int64 /* min write or send service time */ - MaxWserv int64 /* max write or send service time */ - WqDepth int64 /* instantaneous wait queue depth (number of requests waiting to be sent to disk) */ - WqSampled int64 /* accumulated sampled dk_wq_depth */ - WqTime int64 /* accumulated wait queueing time */ - WqMinTime int64 /* min wait queueing time */ - WqMaxTime int64 /* max wait queueing time */ - QSampled int64 /* accumulated sampled dk_q_depth */ - Version int64 /* version number (1, 2, etc.,) */ - PseudoDisk bool /*Indicates whether pseudo or physical disk */ - VTDisk bool /* 1- Virtual Target Disk, 0 - Others */ -} - -type DiskPath struct { - Name string /* name of the path */ - XRate int64 /* __rxfers: number of reads via the path */ - Xfers int64 /* number of transfers via the path */ - Rblks int64 /* 512 bytes blocks written via the path */ - Wblks int64 /* 512 bytes blocks read via the path */ - Time int64 /* amount of time disks are active */ - Adapter string /* disk adapter name (from ODM) */ - QFull int64 /* "service" queue full occurrence count (number of times the disk is not accepting any more request) */ - Rserv int64 /* read or receive service time */ - RTimeOut int64 /* number of read request timeouts */ - Rfailed int64 /* number of failed read requests */ - MinRserv int64 /* min read or receive service time */ - MaxRserv int64 /* max read or receive service time */ - Wserv int64 /* write or send service time */ - WTimeOut int64 /* number of write request timeouts */ - Wfailed int64 /* number of failed write requests */ - MinWserv int64 /* min write or send service time */ - MaxWserv int64 /* max write or send service time */ - WqDepth int64 /* instantaneous wait queue depth (number of requests waiting to be sent to disk) */ - WqSampled int64 /* accumulated sampled dk_wq_depth */ - WqTime int64 /* accumulated wait queueing time */ - WqMinTime int64 /* min wait queueing time */ - WqMaxTime int64 /* max wait queueing time */ - QSampled int64 /* accumulated sampled dk_q_depth */ - Version int64 /* version number (1, 2, etc.,) */ -} - -const ( - FC_DOWN = 0 // FC Adapter state is DOWN - FC_UP = 1 // FC Adapter state is UP -) - -const ( - FCT_FCHBA = 0 // FC type - real Fiber Channel Adapter - FCT_VFC = 1 // FC type - virtual Fiber Channel -) - -type FCAdapter struct { - Version int64 /* version number (1, 2, etc.,) */ - Name string /* name of the adapter */ - State int32 /* FC Adapter state UP or DOWN */ - InputRequests int64 /* Number of Input Requests*/ - OutputRequests int64 /* Number of Output Requests */ - InputBytes int64 /* Number of Input Bytes */ - OutputBytes int64 /* Number of Output Bytes */ - EffMaxTransfer int64 /* Adapter's Effective Maximum Transfer Value */ - NoDMAResourceCnt int64 /* Count of DMA failures due to no DMA Resource available */ - NoCmdResourceCnt int64 /* Count of failures to allocate a command due to no command resource available */ - AttentionType int32 /* Link up or down Indicator */ - SecondsSinceLastReset int64 /* Displays the seconds since last reset of the statistics on the adapter */ - TxFrames int64 /* Number of frames transmitted */ - TxWords int64 /* Fiber Channel Kbytes transmitted */ - RxFrames int64 /* Number of Frames Received */ - RxWords int64 /* Fiber Channel Kbytes Received */ - LIPCount int64 /* Count of LIP (Loop Initialization Protocol) Events received in case we have FC-AL */ - NOSCount int64 /* Count of NOS (Not_Operational) Events. This indicates a link failure state. */ - ErrorFrames int64 /* Number of frames received with the CRC Error */ - DumpedFrames int64 /* Number of lost frames */ - LinkFailureCount int64 /* Count of Link failures */ - LossofSyncCount int64 /* Count of loss of sync */ - LossofSignal int64 /* Count of loss of Signal */ - PrimitiveSeqProtocolErrCount int64 /* number of times a primitive sequence was in error */ - InvalidTxWordCount int64 /* Count of Invalid Transmission words received */ - InvalidCRCCount int64 /* Count of CRC Errors in a Received Frame */ - PortFcId int64 /* SCSI Id of the adapter */ - PortSpeed int64 /* Speed of Adapter in GBIT */ - PortType string /* Type of connection. The Possible Values are Fabric, Private Loop, Point-to-Point, unknown */ - PortWWN int64 /* World Wide Port name */ - PortSupportedSpeed int64 /* Supported Port Speed in GBIT */ - AdapterType int /* 0 - Fiber Chanel, 1 - Virtual Fiber Chanel Adapter */ - VfcName string /* name of the Virtual Fiber Chanel(VFC) adapter */ - ClientPartName string /* name of the client partition */ -} diff --git a/vendor/github.com/power-devops/perfstat/types_fs.go b/vendor/github.com/power-devops/perfstat/types_fs.go deleted file mode 100644 index 0be048a3844..00000000000 --- a/vendor/github.com/power-devops/perfstat/types_fs.go +++ /dev/null @@ -1,195 +0,0 @@ -package perfstat - -import ( - "strings" -) - -type FileSystem struct { - Device string /* name of the mounted device */ - MountPoint string /* where the device is mounted */ - FSType int /* File system type, see the constants below */ - Flags int /* Flags of the file system */ - TotalBlocks int64 /* number of 512 bytes blocks in the filesystem */ - FreeBlocks int64 /* number of free 512 bytes block in the filesystem */ - TotalInodes int64 /* total number of inodes in the filesystem */ - FreeInodes int64 /* number of free inodes in the filesystem */ -} - -func (f *FileSystem) TypeString() string { - switch f.FSType { - case FS_JFS2: - return "jfs2" - case FS_NAMEFS: - return "namefs" - case FS_NFS: - return "nfs" - case FS_JFS: - return "jfs" - case FS_CDROM: - return "cdrfs" - case FS_PROCFS: - return "procfs" - case FS_SFS: - return "sfs" - case FS_CACHEFS: - return "cachefs" - case FS_NFS3: - return "nfs3" - case FS_AUTOFS: - return "autofs" - case FS_POOLFS: - return "poolfs" - case FS_VXFS: - return "vxfs" - case FS_VXODM: - return "vxodm" - case FS_UDF: - return "udfs" - case FS_NFS4: - return "nfs4" - case FS_RFS4: - return "rfs4" - case FS_CIFS: - return "cifs" - case FS_PMEMFS: - return "pmemfs" - case FS_AHAFS: - return "ahafs" - case FS_STNFS: - return "stnfs" - case FS_ASMFS: - return "asmfs" - } - return "unknown" -} - -func (f *FileSystem) FlagsString() string { - var flags []string - - switch { - case f.Flags&VFS_READONLY != 0: - flags = append(flags, "ro") - case f.Flags&VFS_REMOVABLE != 0: - flags = append(flags, "removable") - case f.Flags&VFS_DEVMOUNT != 0: - flags = append(flags, "local") - case f.Flags&VFS_REMOTE != 0: - flags = append(flags, "remote") - case f.Flags&VFS_SYSV_MOUNT != 0: - flags = append(flags, "sysv") - case f.Flags&VFS_UNMOUNTING != 0: - flags = append(flags, "unmounting") - case f.Flags&VFS_NOSUID != 0: - flags = append(flags, "nosuid") - case f.Flags&VFS_NODEV != 0: - flags = append(flags, "nodev") - case f.Flags&VFS_NOINTEG != 0: - flags = append(flags, "nointeg") - case f.Flags&VFS_NOMANAGER != 0: - flags = append(flags, "nomanager") - case f.Flags&VFS_NOCASE != 0: - flags = append(flags, "nocase") - case f.Flags&VFS_UPCASE != 0: - flags = append(flags, "upcase") - case f.Flags&VFS_NBC != 0: - flags = append(flags, "nbc") - case f.Flags&VFS_MIND != 0: - flags = append(flags, "mind") - case f.Flags&VFS_RBR != 0: - flags = append(flags, "rbr") - case f.Flags&VFS_RBW != 0: - flags = append(flags, "rbw") - case f.Flags&VFS_DISCONNECTED != 0: - flags = append(flags, "disconnected") - case f.Flags&VFS_SHUTDOWN != 0: - flags = append(flags, "shutdown") - case f.Flags&VFS_VMOUNTOK != 0: - flags = append(flags, "vmountok") - case f.Flags&VFS_SUSER != 0: - flags = append(flags, "suser") - case f.Flags&VFS_SOFT_MOUNT != 0: - flags = append(flags, "soft") - case f.Flags&VFS_UNMOUNTED != 0: - flags = append(flags, "unmounted") - case f.Flags&VFS_DEADMOUNT != 0: - flags = append(flags, "deadmount") - case f.Flags&VFS_SNAPSHOT != 0: - flags = append(flags, "snapshot") - case f.Flags&VFS_VCM_ON != 0: - flags = append(flags, "vcm_on") - case f.Flags&VFS_VCM_MONITOR != 0: - flags = append(flags, "vcm_monitor") - case f.Flags&VFS_ATIMEOFF != 0: - flags = append(flags, "noatime") - case f.Flags&VFS_READMOSTLY != 0: - flags = append(flags, "readmostly") - case f.Flags&VFS_CIOR != 0: - flags = append(flags, "cior") - case f.Flags&VFS_CIO != 0: - flags = append(flags, "cio") - case f.Flags&VFS_DIO != 0: - flags = append(flags, "dio") - } - - return strings.Join(flags, ",") -} - -// Filesystem types -const ( - FS_JFS2 = 0 /* AIX physical fs "jfs2" */ - FS_NAMEFS = 1 /* AIX pseudo fs "namefs" */ - FS_NFS = 2 /* SUN Network File System "nfs" */ - FS_JFS = 3 /* AIX R3 physical fs "jfs" */ - FS_CDROM = 5 /* CDROM File System "cdrom" */ - FS_PROCFS = 6 /* PROCFS File System "proc" */ - FS_SFS = 16 /* AIX Special FS (STREAM mounts) */ - FS_CACHEFS = 17 /* Cachefs file system */ - FS_NFS3 = 18 /* NFSv3 file system */ - FS_AUTOFS = 19 /* Automount file system */ - FS_POOLFS = 20 /* Pool file system */ - FS_VXFS = 32 /* THRPGIO File System "vxfs" */ - FS_VXODM = 33 /* For Veritas File System */ - FS_UDF = 34 /* UDFS file system */ - FS_NFS4 = 35 /* NFSv4 file system */ - FS_RFS4 = 36 /* NFSv4 Pseudo file system */ - FS_CIFS = 37 /* AIX SMBFS (CIFS client) */ - FS_PMEMFS = 38 /* MCR Async Mobility pseudo file system */ - FS_AHAFS = 39 /* AHAFS File System "aha" */ - FS_STNFS = 40 /* Short-Term NFS */ - FS_ASMFS = 41 /* Oracle ASM FS */ -) - -// Filesystem flags -const ( - VFS_READONLY = 0x00000001 /* rdonly access to vfs */ - VFS_REMOVABLE = 0x00000002 /* removable (diskette) media */ - VFS_DEVMOUNT = 0x00000004 /* physical device mount */ - VFS_REMOTE = 0x00000008 /* file system is on network */ - VFS_SYSV_MOUNT = 0x00000010 /* System V style mount */ - VFS_UNMOUNTING = 0x00000020 /* originated by unmount() */ - VFS_NOSUID = 0x00000040 /* don't maintain suid-ness across this mount */ - VFS_NODEV = 0x00000080 /* don't allow device access across this mount */ - VFS_NOINTEG = 0x00000100 /* no integrity mount option */ - VFS_NOMANAGER = 0x00000200 /* mount managed fs w/o manager */ - VFS_NOCASE = 0x00000400 /* do not map dir names */ - VFS_UPCASE = 0x00000800 /* map dir names to uppercase */ - VFS_NBC = 0x00001000 /* NBC cached file in this vfs */ - VFS_MIND = 0x00002000 /* multi-segment .indirect */ - VFS_RBR = 0x00004000 /* Release-behind when reading */ - VFS_RBW = 0x00008000 /* Release-behind when writing */ - VFS_DISCONNECTED = 0x00010000 /* file mount not in use */ - VFS_SHUTDOWN = 0x00020000 /* forced unmount for shutdown */ - VFS_VMOUNTOK = 0x00040000 /* dir/file mnt permission flag */ - VFS_SUSER = 0x00080000 /* client-side suser perm. flag */ - VFS_SOFT_MOUNT = 0x00100000 /* file-over-file or directory over directory "soft" mount */ - VFS_UNMOUNTED = 0x00200000 /* unmount completed, stale vnodes are left in the vfs */ - VFS_DEADMOUNT = 0x00400000 /* softmount vfs should be disconnected at last vnode free */ - VFS_SNAPSHOT = 0x00800000 /* snapshot mount */ - VFS_VCM_ON = 0x01000000 /* VCM is currently active */ - VFS_VCM_MONITOR = 0x02000000 /* VCM monitoring is active */ - VFS_ATIMEOFF = 0x04000000 /* no atime updates during i/o */ - VFS_READMOSTLY = 0x10000000 /* ROFS allows open for write */ - VFS_CIOR = 0x20000000 /* O_CIOR mount */ - VFS_CIO = 0x40000000 /* O_CIO mount */ - VFS_DIO = 0x80000000 /* O_DIRECT mount */ -) diff --git a/vendor/github.com/power-devops/perfstat/types_lpar.go b/vendor/github.com/power-devops/perfstat/types_lpar.go deleted file mode 100644 index 2d3c32fa8cb..00000000000 --- a/vendor/github.com/power-devops/perfstat/types_lpar.go +++ /dev/null @@ -1,68 +0,0 @@ -package perfstat - -type PartitionType struct { - SmtCapable bool /* OS supports SMT mode */ - SmtEnabled bool /* SMT mode is on */ - LparCapable bool /* OS supports logical partitioning */ - LparEnabled bool /* logical partitioning is on */ - SharedCapable bool /* OS supports shared processor LPAR */ - SharedEnabled bool /* partition runs in shared mode */ - DLparCapable bool /* OS supports dynamic LPAR */ - Capped bool /* partition is capped */ - Kernel64bit bool /* kernel is 64 bit */ - PoolUtilAuthority bool /* pool utilization available */ - DonateCapable bool /* capable of donating cycles */ - DonateEnabled bool /* enabled for donating cycles */ - AmsCapable bool /* 1 = AMS(Active Memory Sharing) capable, 0 = Not AMS capable */ - AmsEnabled bool /* 1 = AMS(Active Memory Sharing) enabled, 0 = Not AMS enabled */ - PowerSave bool /*1= Power saving mode is enabled*/ - AmeEnabled bool /* Active Memory Expansion is enabled */ - SharedExtended bool -} - -type PartitionValue struct { - Online int64 - Max int64 - Min int64 - Desired int64 -} - -type PartitionConfig struct { - Version int64 /* Version number */ - Name string /* Partition Name */ - Node string /* Node Name */ - Conf PartitionType /* Partition Properties */ - Number int32 /* Partition Number */ - GroupID int32 /* Group ID */ - ProcessorFamily string /* Processor Type */ - ProcessorModel string /* Processor Model */ - MachineID string /* Machine ID */ - ProcessorMhz float64 /* Processor Clock Speed in MHz */ - NumProcessors PartitionValue /* Number of Configured Physical Processors in frame*/ - OSName string /* Name of Operating System */ - OSVersion string /* Version of operating System */ - OSBuild string /* Build of Operating System */ - LCpus int32 /* Number of Logical CPUs */ - SmtThreads int32 /* Number of SMT Threads */ - Drives int32 /* Total Number of Drives */ - NetworkAdapters int32 /* Total Number of Network Adapters */ - CpuCap PartitionValue /* Min, Max and Online CPU Capacity */ - Weightage int32 /* Variable Processor Capacity Weightage */ - EntCapacity int32 /* number of processor units this partition is entitled to receive */ - VCpus PartitionValue /* Min, Max and Online Virtual CPUs */ - PoolID int32 /* Shared Pool ID of physical processors, to which this partition belongs*/ - ActiveCpusInPool int32 /* Count of physical CPUs in the shared processor pool, to which this partition belongs */ - PoolWeightage int32 /* Pool Weightage */ - SharedPCpu int32 /* Number of physical processors allocated for shared processor use */ - MaxPoolCap int32 /* Maximum processor capacity of partition's pool */ - EntPoolCap int32 /* Entitled processor capacity of partition's pool */ - Mem PartitionValue /* Min, Max and Online Memory */ - MemWeightage int32 /* Variable Memory Capacity Weightage */ - TotalIOMemoryEntitlement int64 /* I/O Memory Entitlement of the partition in bytes */ - MemPoolID int32 /* AMS pool id of the pool the LPAR belongs to */ - HyperPgSize int64 /* Hypervisor page size in KB*/ - ExpMem PartitionValue /* Min, Max and Online Expanded Memory */ - TargetMemExpFactor int64 /* Target Memory Expansion Factor scaled by 100 */ - TargetMemExpSize int64 /* Expanded Memory Size in MB */ - SubProcessorMode int32 /* Split core mode, its value can be 0,1,2 or 4. 0 for unsupported, 1 for capable but not enabled, 2 or 4 for enabled*/ -} diff --git a/vendor/github.com/power-devops/perfstat/types_lvm.go b/vendor/github.com/power-devops/perfstat/types_lvm.go deleted file mode 100644 index 8f7176a6130..00000000000 --- a/vendor/github.com/power-devops/perfstat/types_lvm.go +++ /dev/null @@ -1,31 +0,0 @@ -package perfstat - -type LogicalVolume struct { - Name string /* logical volume name */ - VGName string /* volume group name */ - OpenClose int64 /* LVM_QLVOPEN, etc. (see lvm.h) */ - State int64 /* LVM_UNDEF, etc. (see lvm.h) */ - MirrorPolicy int64 /* LVM_PARALLEL, etc. (see lvm.h) */ - MirrorWriteConsistency int64 /* LVM_CONSIST, etc. (see lvm.h) */ - WriteVerify int64 /* LVM_VERIFY, etc. (see lvm.h) */ - PPsize int64 /* physical partition size in MB */ - LogicalPartitions int64 /* total number of logical paritions configured for this logical volume */ - Mirrors int32 /* number of physical mirrors for each logical partition */ - IOCnt int64 /* Number of read and write requests */ - KBReads int64 /* Number of Kilobytes read */ - KBWrites int64 /* Number of Kilobytes written */ - Version int64 /* version number (1, 2, etc.,) */ -} - -type VolumeGroup struct { - Name string /* volume group name */ - TotalDisks int64 /* number of physical volumes in the volume group */ - ActiveDisks int64 /* number of active physical volumes in the volume group */ - TotalLogicalVolumes int64 /* number of logical volumes in the volume group */ - OpenedLogicalVolumes int64 /* number of logical volumes opened in the volume group */ - IOCnt int64 /* Number of read and write requests */ - KBReads int64 /* Number of Kilobytes read */ - KBWrites int64 /* Number of Kilobytes written */ - Version int64 /* version number (1, 2, etc.,) */ - VariedState int /* Indicates volume group available or not */ -} diff --git a/vendor/github.com/power-devops/perfstat/types_memory.go b/vendor/github.com/power-devops/perfstat/types_memory.go deleted file mode 100644 index 096d29ad2e9..00000000000 --- a/vendor/github.com/power-devops/perfstat/types_memory.go +++ /dev/null @@ -1,101 +0,0 @@ -package perfstat - -type MemoryTotal struct { - VirtualTotal int64 /* total virtual memory (in 4KB pages) */ - RealTotal int64 /* total real memory (in 4KB pages) */ - RealFree int64 /* free real memory (in 4KB pages) */ - RealPinned int64 /* real memory which is pinned (in 4KB pages) */ - RealInUse int64 /* real memory which is in use (in 4KB pages) */ - BadPages int64 /* number of bad pages */ - PageFaults int64 /* number of page faults */ - PageIn int64 /* number of pages paged in */ - PageOut int64 /* number of pages paged out */ - PgSpIn int64 /* number of page ins from paging space */ - PgSpOut int64 /* number of page outs from paging space */ - Scans int64 /* number of page scans by clock */ - Cycles int64 /* number of page replacement cycles */ - PgSteals int64 /* number of page steals */ - NumPerm int64 /* number of frames used for files (in 4KB pages) */ - PgSpTotal int64 /* total paging space (in 4KB pages) */ - PgSpFree int64 /* free paging space (in 4KB pages) */ - PgSpRsvd int64 /* reserved paging space (in 4KB pages) */ - RealSystem int64 /* real memory used by system segments (in 4KB pages). */ - RealUser int64 /* real memory used by non-system segments (in 4KB pages). */ - RealProcess int64 /* real memory used by process segments (in 4KB pages). */ - VirtualActive int64 /* Active virtual pages. Virtual pages are considered active if they have been accessed */ - IOME int64 /* I/O memory entitlement of the partition in bytes*/ - IOMU int64 /* I/O memory entitlement of the partition in use in bytes*/ - IOHWM int64 /* High water mark of I/O memory entitlement used in bytes*/ - PMem int64 /* Amount of physical mmeory currently backing partition's logical memory in bytes*/ - CompressedTotal int64 /* Total numbers of pages in compressed pool (in 4KB pages) */ - CompressedWSegPg int64 /* Number of compressed working storage pages */ - CPgIn int64 /* number of page ins to compressed pool */ - CPgOut int64 /* number of page outs from compressed pool */ - TrueSize int64 /* True Memory Size in 4KB pages */ - ExpandedMemory int64 /* Expanded Memory Size in 4KB pages */ - CompressedWSegSize int64 /* Total size of the compressed working storage pages in the pool */ - TargetCPoolSize int64 /* Target Compressed Pool Size in bytes */ - MaxCPoolSize int64 /* Max Size of Compressed Pool in bytes */ - MinUCPoolSize int64 /* Min Size of Uncompressed Pool in bytes */ - CPoolSize int64 /* Compressed Pool size in bytes */ - UCPoolSize int64 /* Uncompressed Pool size in bytes */ - CPoolInUse int64 /* Compressed Pool Used in bytes */ - UCPoolInUse int64 /* Uncompressed Pool Used in bytes */ - Version int64 /* version number (1, 2, etc.,) */ - RealAvailable int64 /* number of pages (in 4KB pages) of memory available without paging out working segments */ - BytesCoalesced int64 /* The number of bytes of the calling partition.s logical real memory coalesced because they contained duplicated data */ - BytesCoalescedMemPool int64 /* number of bytes of logical real memory coalesced because they contained duplicated data in the calling partition.s memory */ -} - -type MemoryPage struct { - PSize int64 /* page size in bytes */ - RealTotal int64 /* number of real memory frames of this page size */ - RealFree int64 /* number of pages on free list */ - RealPinned int64 /* number of pages pinned */ - RealInUse int64 /* number of pages in use */ - PgExct int64 /* number of page faults */ - PgIns int64 /* number of pages paged in */ - PgOuts int64 /* number of pages paged out */ - PgSpIns int64 /* number of page ins from paging space */ - PgSpOuts int64 /* number of page outs from paging space */ - Scans int64 /* number of page scans by clock */ - Cycles int64 /* number of page replacement cycles */ - PgSteals int64 /* number of page steals */ - NumPerm int64 /* number of frames used for files */ - NumPgSp int64 /* number of pages with allocated paging space */ - RealSystem int64 /* number of pages used by system segments. */ - RealUser int64 /* number of pages used by non-system segments. */ - RealProcess int64 /* number of pages used by process segments. */ - VirtActive int64 /* Active virtual pages. */ - ComprsdTotal int64 /* Number of pages of this size compressed */ - ComprsdWsegPgs int64 /* Number of compressed working storage pages */ - CPgIns int64 /* number of page ins of this page size to compressed pool */ - CPgOuts int64 /* number of page outs of this page size from compressed pool */ - CPoolInUse int64 /* Compressed Size of this page size in Compressed Pool */ - UCPoolSize int64 /* Uncompressed Pool size in bytes of this page size */ - ComprsdWsegSize int64 /* Total size of the compressed working storage pages in the pool */ - Version int64 /* version number (1, 2, etc.,) */ - RealAvail int64 /* number of pages (in 4KB pages) of memory available without paging out working segments */ -} - -// paging space types -const ( - LV_PAGING = 1 - NFS_PAGING = 2 - UNKNOWN_PAGING = 3 -) - -type PagingSpace struct { - Name string /* Paging space name */ - Type uint8 /* type of paging device (LV_PAGING or NFS_PAGING) */ - VGName string /* volume group name */ - Hostname string /* host name of paging server */ - Filename string /* swap file name on server */ - LPSize int64 /* size in number of logical partitions */ - MBSize int64 /* size in megabytes */ - MBUsed int64 /* portion used in megabytes */ - IOPending int64 /* number of pending I/O */ - Active uint8 /* indicates if active (1 if so, 0 if not) */ - Automatic uint8 /* indicates if automatic (1 if so, 0 if not) */ - Version int64 /* version number (1, 2, etc.,) */ -} diff --git a/vendor/github.com/power-devops/perfstat/types_network.go b/vendor/github.com/power-devops/perfstat/types_network.go deleted file mode 100644 index e69d0041d33..00000000000 --- a/vendor/github.com/power-devops/perfstat/types_network.go +++ /dev/null @@ -1,163 +0,0 @@ -package perfstat - -// Network Interface types -const ( - IFT_OTHER = 0x1 - IFT_1822 = 0x2 /* old-style arpanet imp */ - IFT_HDH1822 = 0x3 /* HDH arpanet imp */ - IFT_X25DDN = 0x4 /* x25 to imp */ - IFT_X25 = 0x5 /* PDN X25 interface (RFC877) */ - IFT_ETHER = 0x6 /* Ethernet CSMACD */ - IFT_ISO88023 = 0x7 /* CMSA CD */ - IFT_ISO88024 = 0x8 /* Token Bus */ - IFT_ISO88025 = 0x9 /* Token Ring */ - IFT_ISO88026 = 0xa /* MAN */ - IFT_STARLAN = 0xb - IFT_P10 = 0xc /* Proteon 10MBit ring */ - IFT_P80 = 0xd /* Proteon 10MBit ring */ - IFT_HY = 0xe /* Hyperchannel */ - IFT_FDDI = 0xf - IFT_LAPB = 0x10 - IFT_SDLC = 0x11 - IFT_T1 = 0x12 - IFT_CEPT = 0x13 /* E1 - european T1 */ - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_PTPSERIAL = 0x16 /* Proprietary PTP serial */ - IFT_PPP = 0x17 /* RFC 1331 */ - IFT_LOOP = 0x18 /* loopback */ - IFT_EON = 0x19 /* ISO over IP */ - IFT_XETHER = 0x1a /* obsolete 3MB experimental ethernet */ - IFT_NSIP = 0x1b /* XNS over IP */ - IFT_SLIP = 0x1c /* IP over generic TTY */ - IFT_ULTRA = 0x1d /* Ultra Technologies */ - IFT_DS3 = 0x1e /* Generic T3 */ - IFT_SIP = 0x1f /* SMDS */ - IFT_FRELAY = 0x20 /* Frame Relay DTE only */ - IFT_RS232 = 0x21 - IFT_PARA = 0x22 /* parallel-port */ - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ATM = 0x25 /* ATM cells */ - IFT_MIOX25 = 0x26 - IFT_SONET = 0x27 /* SONET or SDH */ - IFT_X25PLE = 0x28 - IFT_ISO88022LLC = 0x29 - IFT_LOCALTALK = 0x2a - IFT_SMDSDXI = 0x2b - IFT_FRELAYDCE = 0x2c /* Frame Relay DCE */ - IFT_V35 = 0x2d - IFT_HSSI = 0x2e - IFT_HIPPI = 0x2f - IFT_MODEM = 0x30 /* Generic Modem */ - IFT_AAL5 = 0x31 /* AAL5 over ATM */ - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SMDSICIP = 0x34 /* SMDS InterCarrier Interface */ - IFT_PROPVIRTUAL = 0x35 /* Proprietary Virtual/internal */ - IFT_PROPMUX = 0x36 /* Proprietary Multiplexing */ - IFT_VIPA = 0x37 /* Virtual Interface */ - IFT_SN = 0x38 /* Federation Switch */ - IFT_SP = 0x39 /* SP switch */ - IFT_FCS = 0x3a /* IP over Fiber Channel */ - IFT_TUNNEL = 0x3b - IFT_GIFTUNNEL = 0x3c /* IPv4 over IPv6 tunnel */ - IFT_HF = 0x3d /* Support for PERCS HFI*/ - IFT_CLUSTER = 0x3e /* cluster pseudo network interface */ - IFT_FB = 0xc7 /* IP over Infiniband. Number by IANA */ -) - -type NetIfaceTotal struct { - Number int32 /* number of network interfaces */ - IPackets int64 /* number of packets received on interface */ - IBytes int64 /* number of bytes received on interface */ - IErrors int64 /* number of input errors on interface */ - OPackets int64 /* number of packets sent on interface */ - OBytes int64 /* number of bytes sent on interface */ - OErrors int64 /* number of output errors on interface */ - Collisions int64 /* number of collisions on csma interface */ - XmitDrops int64 /* number of packets not transmitted */ - Version int64 /* version number (1, 2, etc.,) */ -} - -type NetIface struct { - Name string /* name of the interface */ - Description string /* interface description (from ODM, similar to lscfg output) */ - Type uint8 /* ethernet, tokenring, etc. interpretation can be done using /usr/include/net/if_types.h */ - MTU int64 /* network frame size */ - IPackets int64 /* number of packets received on interface */ - IBytes int64 /* number of bytes received on interface */ - IErrors int64 /* number of input errors on interface */ - OPackets int64 /* number of packets sent on interface */ - OBytes int64 /* number of bytes sent on interface */ - OErrors int64 /* number of output errors on interface */ - Collisions int64 /* number of collisions on csma interface */ - Bitrate int64 /* adapter rating in bit per second */ - XmitDrops int64 /* number of packets not transmitted */ - Version int64 /* version number (1, 2, etc.,) */ - IfIqDrops int64 /* Dropped on input, this interface */ - IfArpDrops int64 /* Dropped because no arp response */ -} - -type NetBuffer struct { - Name string /* size in ascii, always power of 2 (ex: "32", "64", "128") */ - InUse int64 /* number of buffer currently allocated */ - Calls int64 /* number of buffer allocations since last reset */ - Delayed int64 /* number of delayed allocations */ - Free int64 /* number of free calls */ - Failed int64 /* number of failed allocations */ - HighWatermark int64 /* high threshold for number of buffer allocated */ - Freed int64 /* number of buffers freed */ - Version int64 /* version number (1, 2, etc.,) */ -} - -// Network adapter types -const ( - NET_PHY = 0 /* physical device */ - NET_SEA = 1 /* shared ethernet adapter */ - NET_VIR = 2 /* virtual device */ - NET_HEA = 3 /* host ethernet adapter */ - NET_EC = 4 /* etherchannel */ - NET_VLAN = 5 /* vlan pseudo device */ -) - -type NetAdapter struct { - Version int64 /* version number (1,2, etc) */ - Name string /* name of the adapter */ - TxPackets int64 /* Transmit Packets on interface */ - TxBytes int64 /* Transmit Bytes on interface */ - TxInterrupts int64 /* Transfer Interrupts */ - TxErrors int64 /* Transmit Errors */ - TxPacketsDropped int64 /* Packets Dropped at the time of Data Transmission */ - TxQueueSize int64 /* Maximum Packets on Software Transmit Queue */ - TxQueueLen int64 /* Transmission Queue Length */ - TxQueueOverflow int64 /* Transmission Queue Overflow */ - TxBroadcastPackets int64 /* Number of Broadcast Packets Transmitted */ - TxMulticastPackets int64 /* Number of Multicast packets Transmitted */ - TxCarrierSense int64 /* Lost Carrier Sense signal count */ - TxDMAUnderrun int64 /* Count of DMA Under-runs for Transmission */ - TxLostCTSErrors int64 /* The number of unsuccessful transmissions due to the loss of the Clear-to-Send signal error */ - TxMaxCollisionErrors int64 /* Maximum Collision Errors at Transmission */ - TxLateCollisionErrors int64 /* Late Collision Errors at Transmission */ - TxDeferred int64 /* The number of packets deferred for Transmission. */ - TxTimeoutErrors int64 /* Time Out Errors for Transmission */ - TxSingleCollisionCount int64 /* Count of Single Collision error at Transmission */ - TxMultipleCollisionCount int64 /* Count of Multiple Collision error at Transmission */ - RxPackets int64 /* Receive Packets on interface */ - RxBytes int64 /* Receive Bytes on interface */ - RxInterrupts int64 /* Receive Interrupts */ - RxErrors int64 /* Input errors on interface */ - RxPacketsDropped int64 /* The number of packets accepted by the device driver for transmission which were not (for any reason) given to the device. */ - RxBadPackets int64 /* Count of Bad Packets Received. */ - RxMulticastPackets int64 /* Number of MultiCast Packets Received */ - RxBroadcastPackets int64 /* Number of Broadcast Packets Received */ - RxCRCErrors int64 /* Count of Packets Received with CRC errors */ - RxDMAOverrun int64 /* Count of DMA over-runs for Data Receival. */ - RxAlignmentErrors int64 /* Packets Received with Alignment Error */ - RxNoResourceErrors int64 /* Packets Received with No Resource Errors */ - RxCollisionErrors int64 /* Packets Received with Collision errors */ - RxPacketTooShortErrors int64 /* Count of Short Packets Received. */ - RxPacketTooLongErrors int64 /* Count of Too Long Packets Received. */ - RxPacketDiscardedByAdapter int64 /* Count of Received Packets discarded by Adapter. */ - AdapterType int32 /* 0 - Physical, 1 - SEA, 2 - Virtual, 3 -HEA */ -} diff --git a/vendor/github.com/power-devops/perfstat/types_process.go b/vendor/github.com/power-devops/perfstat/types_process.go deleted file mode 100644 index 325c70b0775..00000000000 --- a/vendor/github.com/power-devops/perfstat/types_process.go +++ /dev/null @@ -1,43 +0,0 @@ -package perfstat - -type Process struct { - Version int64 /* version number (1, 2, etc.,) */ - PID int64 /* Process ID */ - ProcessName string /* Name of The Process */ - Priority int32 /* Process Priority */ - NumThreads int64 /* Thread Count */ - UID int64 /* Owner Info */ - ClassID int64 /* WLM Class Name */ - Size int64 /* Virtual Size of the Process in KB(Exclusive Usage, Leaving all Shared Library Text & Shared File Pages, Shared Memory, Memory Mapped) */ - RealMemData int64 /* Real Memory used for Data in KB */ - RealMemText int64 /* Real Memory used for Text in KB */ - VirtMemData int64 /* Virtual Memory used to Data in KB */ - VirtMemText int64 /* Virtual Memory used for Text in KB */ - SharedLibDataSize int64 /* Data Size from Shared Library in KB */ - HeapSize int64 /* Heap Size in KB */ - RealInUse int64 /* The Real memory in use(in KB) by the process including all kind of segments (excluding system segments). This includes Text, Data, Shared Library Text, Shared Library Data, File Pages, Shared Memory & Memory Mapped */ - VirtInUse int64 /* The Virtual memory in use(in KB) by the process including all kind of segments (excluding system segments). This includes Text, Data, Shared Library Text, Shared Library Data, File Pages, Shared Memory & Memory Mapped */ - Pinned int64 /* Pinned Memory(in KB) for this process inclusive of all segments */ - PgSpInUse int64 /* Paging Space used(in KB) inclusive of all segments */ - FilePages int64 /* File Pages used(in KB) including shared pages */ - RealInUseMap int64 /* Real memory used(in KB) for Shared Memory and Memory Mapped regions */ - VirtInUseMap int64 /* Virtual Memory used(in KB) for Shared Memory and Memory Mapped regions */ - PinnedInUseMap int64 /* Pinned memory(in KB) for Shared Memory and Memory Mapped regions */ - UCpuTime float64 /* User Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_process_util or perfstat_process respectively. */ - SCpuTime float64 /* System Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_process_util or perfstat_process respectively. */ - LastTimeBase int64 /* Timebase Counter */ - InBytes int64 /* Bytes Read from Disk */ - OutBytes int64 /* Bytes Written to Disk */ - InOps int64 /* In Operations from Disk */ - OutOps int64 /* Out Operations from Disk */ -} - -type Thread struct { - TID int64 /* thread identifier */ - PID int64 /* process identifier */ - CpuID int64 /* processor on which I'm bound */ - UCpuTime float64 /* User Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_thread_util or perfstat_thread respectively. */ - SCpuTime float64 /* System Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_thread_util or perfstat_thread respectively. */ - LastTimeBase int64 /* Timebase Counter */ - Version int64 -} diff --git a/vendor/github.com/power-devops/perfstat/uptime.go b/vendor/github.com/power-devops/perfstat/uptime.go deleted file mode 100644 index 2bd3e568d2d..00000000000 --- a/vendor/github.com/power-devops/perfstat/uptime.go +++ /dev/null @@ -1,35 +0,0 @@ -// +build aix - -package perfstat - -/* -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "time" -) - -func timeSince(ts uint64) uint64 { - return uint64(time.Now().Unix()) - ts -} - -// BootTime() returns the time of the last boot in UNIX seconds -func BootTime() (uint64, error) { - sec := C.boottime() - if sec == -1 { - return 0, fmt.Errorf("Can't determine boot time") - } - return uint64(sec), nil -} - -// UptimeSeconds() calculates uptime in seconds -func UptimeSeconds() (uint64, error) { - boot, err := BootTime() - if err != nil { - return 0, err - } - return timeSince(boot), nil -} diff --git a/vendor/github.com/rogpeppe/go-internal/LICENSE b/vendor/github.com/rogpeppe/go-internal/LICENSE deleted file mode 100644 index 49ea0f92882..00000000000 --- a/vendor/github.com/rogpeppe/go-internal/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2018 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/github.com/rogpeppe/go-internal/fmtsort/mapelem.go b/vendor/github.com/rogpeppe/go-internal/fmtsort/mapelem.go deleted file mode 100644 index 98e4e38f4aa..00000000000 --- a/vendor/github.com/rogpeppe/go-internal/fmtsort/mapelem.go +++ /dev/null @@ -1,20 +0,0 @@ -package fmtsort - -import "reflect" - -const brokenNaNs = false - -func mapElems(mapValue reflect.Value) ([]reflect.Value, []reflect.Value) { - // Note: this code is arranged to not panic even in the presence - // of a concurrent map update. The runtime is responsible for - // yelling loudly if that happens. See issue 33275. - n := mapValue.Len() - key := make([]reflect.Value, 0, n) - value := make([]reflect.Value, 0, n) - iter := mapValue.MapRange() - for iter.Next() { - key = append(key, iter.Key()) - value = append(value, iter.Value()) - } - return key, value -} diff --git a/vendor/github.com/rogpeppe/go-internal/fmtsort/sort.go b/vendor/github.com/rogpeppe/go-internal/fmtsort/sort.go deleted file mode 100644 index 7f51854178f..00000000000 --- a/vendor/github.com/rogpeppe/go-internal/fmtsort/sort.go +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright 2018 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 fmtsort provides a general stable ordering mechanism -// for maps, on behalf of the fmt and text/template packages. -// It is not guaranteed to be efficient and works only for types -// that are valid map keys. -package fmtsort - -import ( - "reflect" - "sort" -) - -// Note: Throughout this package we avoid calling reflect.Value.Interface as -// it is not always legal to do so and it's easier to avoid the issue than to face it. - -// SortedMap represents a map's keys and values. The keys and values are -// aligned in index order: Value[i] is the value in the map corresponding to Key[i]. -type SortedMap struct { - Key []reflect.Value - Value []reflect.Value -} - -func (o *SortedMap) Len() int { return len(o.Key) } -func (o *SortedMap) Less(i, j int) bool { return compare(o.Key[i], o.Key[j]) < 0 } -func (o *SortedMap) Swap(i, j int) { - o.Key[i], o.Key[j] = o.Key[j], o.Key[i] - o.Value[i], o.Value[j] = o.Value[j], o.Value[i] -} - -// Sort accepts a map and returns a SortedMap that has the same keys and -// values but in a stable sorted order according to the keys, modulo issues -// raised by unorderable key values such as NaNs. -// -// The ordering rules are more general than with Go's < operator: -// -// - when applicable, nil compares low -// - ints, floats, and strings order by < -// - NaN compares less than non-NaN floats -// - bool compares false before true -// - complex compares real, then imag -// - pointers compare by machine address -// - channel values compare by machine address -// - structs compare each field in turn -// - arrays compare each element in turn. -// Otherwise identical arrays compare by length. -// - interface values compare first by reflect.Type describing the concrete type -// and then by concrete value as described in the previous rules. -func Sort(mapValue reflect.Value) *SortedMap { - if mapValue.Type().Kind() != reflect.Map { - return nil - } - key, value := mapElems(mapValue) - sorted := &SortedMap{ - Key: key, - Value: value, - } - sort.Stable(sorted) - return sorted -} - -// compare compares two values of the same type. It returns -1, 0, 1 -// according to whether a > b (1), a == b (0), or a < b (-1). -// If the types differ, it returns -1. -// See the comment on Sort for the comparison rules. -func compare(aVal, bVal reflect.Value) int { - aType, bType := aVal.Type(), bVal.Type() - if aType != bType { - return -1 // No good answer possible, but don't return 0: they're not equal. - } - switch aVal.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - a, b := aVal.Int(), bVal.Int() - switch { - case a < b: - return -1 - case a > b: - return 1 - default: - return 0 - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - a, b := aVal.Uint(), bVal.Uint() - switch { - case a < b: - return -1 - case a > b: - return 1 - default: - return 0 - } - case reflect.String: - a, b := aVal.String(), bVal.String() - switch { - case a < b: - return -1 - case a > b: - return 1 - default: - return 0 - } - case reflect.Float32, reflect.Float64: - return floatCompare(aVal.Float(), bVal.Float()) - case reflect.Complex64, reflect.Complex128: - a, b := aVal.Complex(), bVal.Complex() - if c := floatCompare(real(a), real(b)); c != 0 { - return c - } - return floatCompare(imag(a), imag(b)) - case reflect.Bool: - a, b := aVal.Bool(), bVal.Bool() - switch { - case a == b: - return 0 - case a: - return 1 - default: - return -1 - } - case reflect.Ptr: - a, b := aVal.Pointer(), bVal.Pointer() - switch { - case a < b: - return -1 - case a > b: - return 1 - default: - return 0 - } - case reflect.Chan: - if c, ok := nilCompare(aVal, bVal); ok { - return c - } - ap, bp := aVal.Pointer(), bVal.Pointer() - switch { - case ap < bp: - return -1 - case ap > bp: - return 1 - default: - return 0 - } - case reflect.Struct: - for i := 0; i < aVal.NumField(); i++ { - if c := compare(aVal.Field(i), bVal.Field(i)); c != 0 { - return c - } - } - return 0 - case reflect.Array: - for i := 0; i < aVal.Len(); i++ { - if c := compare(aVal.Index(i), bVal.Index(i)); c != 0 { - return c - } - } - return 0 - case reflect.Interface: - if c, ok := nilCompare(aVal, bVal); ok { - return c - } - c := compare(reflect.ValueOf(aVal.Elem().Type()), reflect.ValueOf(bVal.Elem().Type())) - if c != 0 { - return c - } - return compare(aVal.Elem(), bVal.Elem()) - default: - // Certain types cannot appear as keys (maps, funcs, slices), but be explicit. - panic("bad type in compare: " + aType.String()) - } -} - -// nilCompare checks whether either value is nil. If not, the boolean is false. -// If either value is nil, the boolean is true and the integer is the comparison -// value. The comparison is defined to be 0 if both are nil, otherwise the one -// nil value compares low. Both arguments must represent a chan, func, -// interface, map, pointer, or slice. -func nilCompare(aVal, bVal reflect.Value) (int, bool) { - if aVal.IsNil() { - if bVal.IsNil() { - return 0, true - } - return -1, true - } - if bVal.IsNil() { - return 1, true - } - return 0, false -} - -// floatCompare compares two floating-point values. NaNs compare low. -func floatCompare(a, b float64) int { - switch { - case isNaN(a): - return -1 // No good answer if b is a NaN so don't bother checking. - case isNaN(b): - return 1 - case a < b: - return -1 - case a > b: - return 1 - } - return 0 -} - -func isNaN(a float64) bool { - return a != a -} diff --git a/vendor/github.com/shirou/gopsutil/v3/LICENSE b/vendor/github.com/shirou/gopsutil/v3/LICENSE deleted file mode 100644 index 6f06adcbff3..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/LICENSE +++ /dev/null @@ -1,61 +0,0 @@ -gopsutil is distributed under BSD license reproduced below. - -Copyright (c) 2014, WAKAYAMA Shirou -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 the gopsutil authors 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. - - -------- -internal/common/binary.go in the gopsutil is copied and modified from golang/encoding/binary.go. - - - -Copyright (c) 2009 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. \ No newline at end of file diff --git a/vendor/github.com/shirou/gopsutil/v3/common/env.go b/vendor/github.com/shirou/gopsutil/v3/common/env.go deleted file mode 100644 index 4b5f4980c21..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/common/env.go +++ /dev/null @@ -1,23 +0,0 @@ -package common - -type EnvKeyType string - -// EnvKey is a context key that can be used to set programmatically the environment -// gopsutil relies on to perform calls against the OS. -// Example of use: -// -// ctx := context.WithValue(context.Background(), common.EnvKey, EnvMap{common.HostProcEnvKey: "/myproc"}) -// avg, err := load.AvgWithContext(ctx) -var EnvKey = EnvKeyType("env") - -const ( - HostProcEnvKey EnvKeyType = "HOST_PROC" - HostSysEnvKey EnvKeyType = "HOST_SYS" - HostEtcEnvKey EnvKeyType = "HOST_ETC" - HostVarEnvKey EnvKeyType = "HOST_VAR" - HostRunEnvKey EnvKeyType = "HOST_RUN" - HostDevEnvKey EnvKeyType = "HOST_DEV" - HostRootEnvKey EnvKeyType = "HOST_ROOT" -) - -type EnvMap map[EnvKeyType]string diff --git a/vendor/github.com/shirou/gopsutil/v3/internal/common/binary.go b/vendor/github.com/shirou/gopsutil/v3/internal/common/binary.go deleted file mode 100644 index 5e8d43db835..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/internal/common/binary.go +++ /dev/null @@ -1,637 +0,0 @@ -package common - -// Copyright 2009 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 binary implements simple translation between numbers and byte -// sequences and encoding and decoding of varints. -// -// Numbers are translated by reading and writing fixed-size values. -// A fixed-size value is either a fixed-size arithmetic -// type (int8, uint8, int16, float32, complex64, ...) -// or an array or struct containing only fixed-size values. -// -// The varint functions encode and decode single integer values using -// a variable-length encoding; smaller values require fewer bytes. -// For a specification, see -// http://code.google.com/apis/protocolbuffers/docs/encoding.html. -// -// This package favors simplicity over efficiency. Clients that require -// high-performance serialization, especially for large data structures, -// should look at more advanced solutions such as the encoding/gob -// package or protocol buffers. - -import ( - "errors" - "io" - "math" - "reflect" -) - -// A ByteOrder specifies how to convert byte sequences into -// 16-, 32-, or 64-bit unsigned integers. -type ByteOrder interface { - Uint16([]byte) uint16 - Uint32([]byte) uint32 - Uint64([]byte) uint64 - PutUint16([]byte, uint16) - PutUint32([]byte, uint32) - PutUint64([]byte, uint64) - String() string -} - -// LittleEndian is the little-endian implementation of ByteOrder. -var LittleEndian littleEndian - -// BigEndian is the big-endian implementation of ByteOrder. -var BigEndian bigEndian - -type littleEndian struct{} - -func (littleEndian) Uint16(b []byte) uint16 { return uint16(b[0]) | uint16(b[1])<<8 } - -func (littleEndian) PutUint16(b []byte, v uint16) { - b[0] = byte(v) - b[1] = byte(v >> 8) -} - -func (littleEndian) Uint32(b []byte) uint32 { - return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 -} - -func (littleEndian) PutUint32(b []byte, v uint32) { - b[0] = byte(v) - b[1] = byte(v >> 8) - b[2] = byte(v >> 16) - b[3] = byte(v >> 24) -} - -func (littleEndian) Uint64(b []byte) uint64 { - return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | - uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 -} - -func (littleEndian) PutUint64(b []byte, v uint64) { - b[0] = byte(v) - b[1] = byte(v >> 8) - b[2] = byte(v >> 16) - b[3] = byte(v >> 24) - b[4] = byte(v >> 32) - b[5] = byte(v >> 40) - b[6] = byte(v >> 48) - b[7] = byte(v >> 56) -} - -func (littleEndian) String() string { return "LittleEndian" } - -func (littleEndian) GoString() string { return "binary.LittleEndian" } - -type bigEndian struct{} - -func (bigEndian) Uint16(b []byte) uint16 { return uint16(b[1]) | uint16(b[0])<<8 } - -func (bigEndian) PutUint16(b []byte, v uint16) { - b[0] = byte(v >> 8) - b[1] = byte(v) -} - -func (bigEndian) Uint32(b []byte) uint32 { - return uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24 -} - -func (bigEndian) PutUint32(b []byte, v uint32) { - b[0] = byte(v >> 24) - b[1] = byte(v >> 16) - b[2] = byte(v >> 8) - b[3] = byte(v) -} - -func (bigEndian) Uint64(b []byte) uint64 { - return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 | - uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56 -} - -func (bigEndian) PutUint64(b []byte, v uint64) { - b[0] = byte(v >> 56) - b[1] = byte(v >> 48) - b[2] = byte(v >> 40) - b[3] = byte(v >> 32) - b[4] = byte(v >> 24) - b[5] = byte(v >> 16) - b[6] = byte(v >> 8) - b[7] = byte(v) -} - -func (bigEndian) String() string { return "BigEndian" } - -func (bigEndian) GoString() string { return "binary.BigEndian" } - -// Read reads structured binary data from r into data. -// Data must be a pointer to a fixed-size value or a slice -// of fixed-size values. -// Bytes read from r are decoded using the specified byte order -// and written to successive fields of the data. -// When reading into structs, the field data for fields with -// blank (_) field names is skipped; i.e., blank field names -// may be used for padding. -// When reading into a struct, all non-blank fields must be exported. -func Read(r io.Reader, order ByteOrder, data interface{}) error { - // Fast path for basic types and slices. - if n := intDataSize(data); n != 0 { - var b [8]byte - var bs []byte - if n > len(b) { - bs = make([]byte, n) - } else { - bs = b[:n] - } - if _, err := io.ReadFull(r, bs); err != nil { - return err - } - switch data := data.(type) { - case *int8: - *data = int8(b[0]) - case *uint8: - *data = b[0] - case *int16: - *data = int16(order.Uint16(bs)) - case *uint16: - *data = order.Uint16(bs) - case *int32: - *data = int32(order.Uint32(bs)) - case *uint32: - *data = order.Uint32(bs) - case *int64: - *data = int64(order.Uint64(bs)) - case *uint64: - *data = order.Uint64(bs) - case []int8: - for i, x := range bs { // Easier to loop over the input for 8-bit values. - data[i] = int8(x) - } - case []uint8: - copy(data, bs) - case []int16: - for i := range data { - data[i] = int16(order.Uint16(bs[2*i:])) - } - case []uint16: - for i := range data { - data[i] = order.Uint16(bs[2*i:]) - } - case []int32: - for i := range data { - data[i] = int32(order.Uint32(bs[4*i:])) - } - case []uint32: - for i := range data { - data[i] = order.Uint32(bs[4*i:]) - } - case []int64: - for i := range data { - data[i] = int64(order.Uint64(bs[8*i:])) - } - case []uint64: - for i := range data { - data[i] = order.Uint64(bs[8*i:]) - } - } - return nil - } - - // Fallback to reflect-based decoding. - v := reflect.ValueOf(data) - size := -1 - switch v.Kind() { - case reflect.Ptr: - v = v.Elem() - size = dataSize(v) - case reflect.Slice: - size = dataSize(v) - } - if size < 0 { - return errors.New("binary.Read: invalid type " + reflect.TypeOf(data).String()) - } - d := &decoder{order: order, buf: make([]byte, size)} - if _, err := io.ReadFull(r, d.buf); err != nil { - return err - } - d.value(v) - return nil -} - -// Write writes the binary representation of data into w. -// Data must be a fixed-size value or a slice of fixed-size -// values, or a pointer to such data. -// Bytes written to w are encoded using the specified byte order -// and read from successive fields of the data. -// When writing structs, zero values are written for fields -// with blank (_) field names. -func Write(w io.Writer, order ByteOrder, data interface{}) error { - // Fast path for basic types and slices. - if n := intDataSize(data); n != 0 { - var b [8]byte - var bs []byte - if n > len(b) { - bs = make([]byte, n) - } else { - bs = b[:n] - } - switch v := data.(type) { - case *int8: - bs = b[:1] - b[0] = byte(*v) - case int8: - bs = b[:1] - b[0] = byte(v) - case []int8: - for i, x := range v { - bs[i] = byte(x) - } - case *uint8: - bs = b[:1] - b[0] = *v - case uint8: - bs = b[:1] - b[0] = byte(v) - case []uint8: - bs = v - case *int16: - bs = b[:2] - order.PutUint16(bs, uint16(*v)) - case int16: - bs = b[:2] - order.PutUint16(bs, uint16(v)) - case []int16: - for i, x := range v { - order.PutUint16(bs[2*i:], uint16(x)) - } - case *uint16: - bs = b[:2] - order.PutUint16(bs, *v) - case uint16: - bs = b[:2] - order.PutUint16(bs, v) - case []uint16: - for i, x := range v { - order.PutUint16(bs[2*i:], x) - } - case *int32: - bs = b[:4] - order.PutUint32(bs, uint32(*v)) - case int32: - bs = b[:4] - order.PutUint32(bs, uint32(v)) - case []int32: - for i, x := range v { - order.PutUint32(bs[4*i:], uint32(x)) - } - case *uint32: - bs = b[:4] - order.PutUint32(bs, *v) - case uint32: - bs = b[:4] - order.PutUint32(bs, v) - case []uint32: - for i, x := range v { - order.PutUint32(bs[4*i:], x) - } - case *int64: - bs = b[:8] - order.PutUint64(bs, uint64(*v)) - case int64: - bs = b[:8] - order.PutUint64(bs, uint64(v)) - case []int64: - for i, x := range v { - order.PutUint64(bs[8*i:], uint64(x)) - } - case *uint64: - bs = b[:8] - order.PutUint64(bs, *v) - case uint64: - bs = b[:8] - order.PutUint64(bs, v) - case []uint64: - for i, x := range v { - order.PutUint64(bs[8*i:], x) - } - } - _, err := w.Write(bs) - return err - } - - // Fallback to reflect-based encoding. - v := reflect.Indirect(reflect.ValueOf(data)) - size := dataSize(v) - if size < 0 { - return errors.New("binary.Write: invalid type " + reflect.TypeOf(data).String()) - } - buf := make([]byte, size) - e := &encoder{order: order, buf: buf} - e.value(v) - _, err := w.Write(buf) - return err -} - -// Size returns how many bytes Write would generate to encode the value v, which -// must be a fixed-size value or a slice of fixed-size values, or a pointer to such data. -// If v is neither of these, Size returns -1. -func Size(v interface{}) int { - return dataSize(reflect.Indirect(reflect.ValueOf(v))) -} - -// dataSize returns the number of bytes the actual data represented by v occupies in memory. -// For compound structures, it sums the sizes of the elements. Thus, for instance, for a slice -// it returns the length of the slice times the element size and does not count the memory -// occupied by the header. If the type of v is not acceptable, dataSize returns -1. -func dataSize(v reflect.Value) int { - if v.Kind() == reflect.Slice { - if s := sizeof(v.Type().Elem()); s >= 0 { - return s * v.Len() - } - return -1 - } - return sizeof(v.Type()) -} - -// sizeof returns the size >= 0 of variables for the given type or -1 if the type is not acceptable. -func sizeof(t reflect.Type) int { - switch t.Kind() { - case reflect.Array: - if s := sizeof(t.Elem()); s >= 0 { - return s * t.Len() - } - - case reflect.Struct: - sum := 0 - for i, n := 0, t.NumField(); i < n; i++ { - s := sizeof(t.Field(i).Type) - if s < 0 { - return -1 - } - sum += s - } - return sum - - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128, reflect.Ptr: - return int(t.Size()) - } - - return -1 -} - -type coder struct { - order ByteOrder - buf []byte -} - -type ( - decoder coder - encoder coder -) - -func (d *decoder) uint8() uint8 { - x := d.buf[0] - d.buf = d.buf[1:] - return x -} - -func (e *encoder) uint8(x uint8) { - e.buf[0] = x - e.buf = e.buf[1:] -} - -func (d *decoder) uint16() uint16 { - x := d.order.Uint16(d.buf[0:2]) - d.buf = d.buf[2:] - return x -} - -func (e *encoder) uint16(x uint16) { - e.order.PutUint16(e.buf[0:2], x) - e.buf = e.buf[2:] -} - -func (d *decoder) uint32() uint32 { - x := d.order.Uint32(d.buf[0:4]) - d.buf = d.buf[4:] - return x -} - -func (e *encoder) uint32(x uint32) { - e.order.PutUint32(e.buf[0:4], x) - e.buf = e.buf[4:] -} - -func (d *decoder) uint64() uint64 { - x := d.order.Uint64(d.buf[0:8]) - d.buf = d.buf[8:] - return x -} - -func (e *encoder) uint64(x uint64) { - e.order.PutUint64(e.buf[0:8], x) - e.buf = e.buf[8:] -} - -func (d *decoder) int8() int8 { return int8(d.uint8()) } - -func (e *encoder) int8(x int8) { e.uint8(uint8(x)) } - -func (d *decoder) int16() int16 { return int16(d.uint16()) } - -func (e *encoder) int16(x int16) { e.uint16(uint16(x)) } - -func (d *decoder) int32() int32 { return int32(d.uint32()) } - -func (e *encoder) int32(x int32) { e.uint32(uint32(x)) } - -func (d *decoder) int64() int64 { return int64(d.uint64()) } - -func (e *encoder) int64(x int64) { e.uint64(uint64(x)) } - -func (d *decoder) value(v reflect.Value) { - switch v.Kind() { - case reflect.Array: - l := v.Len() - for i := 0; i < l; i++ { - d.value(v.Index(i)) - } - - case reflect.Struct: - t := v.Type() - l := v.NumField() - for i := 0; i < l; i++ { - // Note: Calling v.CanSet() below is an optimization. - // It would be sufficient to check the field name, - // but creating the StructField info for each field is - // costly (run "go test -bench=ReadStruct" and compare - // results when making changes to this code). - if v := v.Field(i); v.CanSet() || t.Field(i).Name != "_" { - d.value(v) - } else { - d.skip(v) - } - } - - case reflect.Slice: - l := v.Len() - for i := 0; i < l; i++ { - d.value(v.Index(i)) - } - - case reflect.Int8: - v.SetInt(int64(d.int8())) - case reflect.Int16: - v.SetInt(int64(d.int16())) - case reflect.Int32: - v.SetInt(int64(d.int32())) - case reflect.Int64: - v.SetInt(d.int64()) - - case reflect.Uint8: - v.SetUint(uint64(d.uint8())) - case reflect.Uint16: - v.SetUint(uint64(d.uint16())) - case reflect.Uint32: - v.SetUint(uint64(d.uint32())) - case reflect.Uint64: - v.SetUint(d.uint64()) - - case reflect.Float32: - v.SetFloat(float64(math.Float32frombits(d.uint32()))) - case reflect.Float64: - v.SetFloat(math.Float64frombits(d.uint64())) - - case reflect.Complex64: - v.SetComplex(complex( - float64(math.Float32frombits(d.uint32())), - float64(math.Float32frombits(d.uint32())), - )) - case reflect.Complex128: - v.SetComplex(complex( - math.Float64frombits(d.uint64()), - math.Float64frombits(d.uint64()), - )) - } -} - -func (e *encoder) value(v reflect.Value) { - switch v.Kind() { - case reflect.Array: - l := v.Len() - for i := 0; i < l; i++ { - e.value(v.Index(i)) - } - - case reflect.Struct: - t := v.Type() - l := v.NumField() - for i := 0; i < l; i++ { - // see comment for corresponding code in decoder.value() - if v := v.Field(i); v.CanSet() || t.Field(i).Name != "_" { - e.value(v) - } else { - e.skip(v) - } - } - - case reflect.Slice: - l := v.Len() - for i := 0; i < l; i++ { - e.value(v.Index(i)) - } - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - switch v.Type().Kind() { - case reflect.Int8: - e.int8(int8(v.Int())) - case reflect.Int16: - e.int16(int16(v.Int())) - case reflect.Int32: - e.int32(int32(v.Int())) - case reflect.Int64: - e.int64(v.Int()) - } - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - switch v.Type().Kind() { - case reflect.Uint8: - e.uint8(uint8(v.Uint())) - case reflect.Uint16: - e.uint16(uint16(v.Uint())) - case reflect.Uint32: - e.uint32(uint32(v.Uint())) - case reflect.Uint64: - e.uint64(v.Uint()) - } - - case reflect.Float32, reflect.Float64: - switch v.Type().Kind() { - case reflect.Float32: - e.uint32(math.Float32bits(float32(v.Float()))) - case reflect.Float64: - e.uint64(math.Float64bits(v.Float())) - } - - case reflect.Complex64, reflect.Complex128: - switch v.Type().Kind() { - case reflect.Complex64: - x := v.Complex() - e.uint32(math.Float32bits(float32(real(x)))) - e.uint32(math.Float32bits(float32(imag(x)))) - case reflect.Complex128: - x := v.Complex() - e.uint64(math.Float64bits(real(x))) - e.uint64(math.Float64bits(imag(x))) - } - } -} - -func (d *decoder) skip(v reflect.Value) { - d.buf = d.buf[dataSize(v):] -} - -func (e *encoder) skip(v reflect.Value) { - n := dataSize(v) - for i := range e.buf[0:n] { - e.buf[i] = 0 - } - e.buf = e.buf[n:] -} - -// intDataSize returns the size of the data required to represent the data when encoded. -// It returns zero if the type cannot be implemented by the fast path in Read or Write. -func intDataSize(data interface{}) int { - switch data := data.(type) { - case int8, *int8, *uint8: - return 1 - case []int8: - return len(data) - case []uint8: - return len(data) - case int16, *int16, *uint16: - return 2 - case []int16: - return 2 * len(data) - case []uint16: - return 2 * len(data) - case int32, *int32, *uint32: - return 4 - case []int32: - return 4 * len(data) - case []uint32: - return 4 * len(data) - case int64, *int64, *uint64: - return 8 - case []int64: - return 8 * len(data) - case []uint64: - return 8 * len(data) - } - return 0 -} diff --git a/vendor/github.com/shirou/gopsutil/v3/internal/common/common.go b/vendor/github.com/shirou/gopsutil/v3/internal/common/common.go deleted file mode 100644 index 9bfece3628d..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/internal/common/common.go +++ /dev/null @@ -1,441 +0,0 @@ -package common - -// -// gopsutil is a port of psutil(http://pythonhosted.org/psutil/). -// This covers these architectures. -// - linux (amd64, arm) -// - freebsd (amd64) -// - windows (amd64) - -import ( - "bufio" - "bytes" - "context" - "errors" - "fmt" - "io" - "io/ioutil" - "net/url" - "os" - "os/exec" - "path" - "path/filepath" - "reflect" - "runtime" - "strconv" - "strings" - "time" - - "github.com/shirou/gopsutil/v3/common" -) - -var ( - Timeout = 3 * time.Second - ErrTimeout = errors.New("command timed out") -) - -type Invoker interface { - Command(string, ...string) ([]byte, error) - CommandWithContext(context.Context, string, ...string) ([]byte, error) -} - -type Invoke struct{} - -func (i Invoke) Command(name string, arg ...string) ([]byte, error) { - ctx, cancel := context.WithTimeout(context.Background(), Timeout) - defer cancel() - return i.CommandWithContext(ctx, name, arg...) -} - -func (i Invoke) CommandWithContext(ctx context.Context, name string, arg ...string) ([]byte, error) { - cmd := exec.CommandContext(ctx, name, arg...) - - var buf bytes.Buffer - cmd.Stdout = &buf - cmd.Stderr = &buf - - if err := cmd.Start(); err != nil { - return buf.Bytes(), err - } - - if err := cmd.Wait(); err != nil { - return buf.Bytes(), err - } - - return buf.Bytes(), nil -} - -type FakeInvoke struct { - Suffix string // Suffix species expected file name suffix such as "fail" - Error error // If Error specified, return the error. -} - -// Command in FakeInvoke returns from expected file if exists. -func (i FakeInvoke) Command(name string, arg ...string) ([]byte, error) { - if i.Error != nil { - return []byte{}, i.Error - } - - arch := runtime.GOOS - - commandName := filepath.Base(name) - - fname := strings.Join(append([]string{commandName}, arg...), "") - fname = url.QueryEscape(fname) - fpath := path.Join("testdata", arch, fname) - if i.Suffix != "" { - fpath += "_" + i.Suffix - } - if PathExists(fpath) { - return ioutil.ReadFile(fpath) - } - return []byte{}, fmt.Errorf("could not find testdata: %s", fpath) -} - -func (i FakeInvoke) CommandWithContext(ctx context.Context, name string, arg ...string) ([]byte, error) { - return i.Command(name, arg...) -} - -var ErrNotImplementedError = errors.New("not implemented yet") - -// ReadFile reads contents from a file -func ReadFile(filename string) (string, error) { - content, err := ioutil.ReadFile(filename) - if err != nil { - return "", err - } - - return string(content), nil -} - -// ReadLines reads contents from a file and splits them by new lines. -// A convenience wrapper to ReadLinesOffsetN(filename, 0, -1). -func ReadLines(filename string) ([]string, error) { - return ReadLinesOffsetN(filename, 0, -1) -} - -// ReadLinesOffsetN reads contents from file and splits them by new line. -// The offset tells at which line number to start. -// The count determines the number of lines to read (starting from offset): -// n >= 0: at most n lines -// n < 0: whole file -func ReadLinesOffsetN(filename string, offset uint, n int) ([]string, error) { - f, err := os.Open(filename) - if err != nil { - return []string{""}, err - } - defer f.Close() - - var ret []string - - r := bufio.NewReader(f) - for i := 0; i < n+int(offset) || n < 0; i++ { - line, err := r.ReadString('\n') - if err != nil { - if err == io.EOF && len(line) > 0 { - ret = append(ret, strings.Trim(line, "\n")) - } - break - } - if i < int(offset) { - continue - } - ret = append(ret, strings.Trim(line, "\n")) - } - - return ret, nil -} - -func IntToString(orig []int8) string { - ret := make([]byte, len(orig)) - size := -1 - for i, o := range orig { - if o == 0 { - size = i - break - } - ret[i] = byte(o) - } - if size == -1 { - size = len(orig) - } - - return string(ret[0:size]) -} - -func UintToString(orig []uint8) string { - ret := make([]byte, len(orig)) - size := -1 - for i, o := range orig { - if o == 0 { - size = i - break - } - ret[i] = byte(o) - } - if size == -1 { - size = len(orig) - } - - return string(ret[0:size]) -} - -func ByteToString(orig []byte) string { - n := -1 - l := -1 - for i, b := range orig { - // skip left side null - if l == -1 && b == 0 { - continue - } - if l == -1 { - l = i - } - - if b == 0 { - break - } - n = i + 1 - } - if n == -1 { - return string(orig) - } - return string(orig[l:n]) -} - -// ReadInts reads contents from single line file and returns them as []int32. -func ReadInts(filename string) ([]int64, error) { - f, err := os.Open(filename) - if err != nil { - return []int64{}, err - } - defer f.Close() - - var ret []int64 - - r := bufio.NewReader(f) - - // The int files that this is concerned with should only be one liners. - line, err := r.ReadString('\n') - if err != nil { - return []int64{}, err - } - - i, err := strconv.ParseInt(strings.Trim(line, "\n"), 10, 32) - if err != nil { - return []int64{}, err - } - ret = append(ret, i) - - return ret, nil -} - -// Parse Hex to uint32 without error -func HexToUint32(hex string) uint32 { - vv, _ := strconv.ParseUint(hex, 16, 32) - return uint32(vv) -} - -// Parse to int32 without error -func mustParseInt32(val string) int32 { - vv, _ := strconv.ParseInt(val, 10, 32) - return int32(vv) -} - -// Parse to uint64 without error -func mustParseUint64(val string) uint64 { - vv, _ := strconv.ParseInt(val, 10, 64) - return uint64(vv) -} - -// Parse to Float64 without error -func mustParseFloat64(val string) float64 { - vv, _ := strconv.ParseFloat(val, 64) - return vv -} - -// StringsHas checks the target string slice contains src or not -func StringsHas(target []string, src string) bool { - for _, t := range target { - if strings.TrimSpace(t) == src { - return true - } - } - return false -} - -// StringsContains checks the src in any string of the target string slice -func StringsContains(target []string, src string) bool { - for _, t := range target { - if strings.Contains(t, src) { - return true - } - } - return false -} - -// IntContains checks the src in any int of the target int slice. -func IntContains(target []int, src int) bool { - for _, t := range target { - if src == t { - return true - } - } - return false -} - -// get struct attributes. -// This method is used only for debugging platform dependent code. -func attributes(m interface{}) map[string]reflect.Type { - typ := reflect.TypeOf(m) - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - } - - attrs := make(map[string]reflect.Type) - if typ.Kind() != reflect.Struct { - return nil - } - - for i := 0; i < typ.NumField(); i++ { - p := typ.Field(i) - if !p.Anonymous { - attrs[p.Name] = p.Type - } - } - - return attrs -} - -func PathExists(filename string) bool { - if _, err := os.Stat(filename); err == nil { - return true - } - return false -} - -// PathExistsWithContents returns the filename exists and it is not empty -func PathExistsWithContents(filename string) bool { - info, err := os.Stat(filename) - if err != nil { - return false - } - return info.Size() > 4 // at least 4 bytes -} - -// GetEnvWithContext retrieves the environment variable key. If it does not exist it returns the default. -// The context may optionally contain a map superseding os.EnvKey. -func GetEnvWithContext(ctx context.Context, key string, dfault string, combineWith ...string) string { - var value string - if env, ok := ctx.Value(common.EnvKey).(common.EnvMap); ok { - value = env[common.EnvKeyType(key)] - } - if value == "" { - value = os.Getenv(key) - } - if value == "" { - value = dfault - } - - return combine(value, combineWith) -} - -// GetEnv retrieves the environment variable key. If it does not exist it returns the default. -func GetEnv(key string, dfault string, combineWith ...string) string { - value := os.Getenv(key) - if value == "" { - value = dfault - } - - return combine(value, combineWith) -} - -func combine(value string, combineWith []string) string { - switch len(combineWith) { - case 0: - return value - case 1: - return filepath.Join(value, combineWith[0]) - default: - all := make([]string, len(combineWith)+1) - all[0] = value - copy(all[1:], combineWith) - return filepath.Join(all...) - } -} - -func HostProc(combineWith ...string) string { - return GetEnv("HOST_PROC", "/proc", combineWith...) -} - -func HostSys(combineWith ...string) string { - return GetEnv("HOST_SYS", "/sys", combineWith...) -} - -func HostEtc(combineWith ...string) string { - return GetEnv("HOST_ETC", "/etc", combineWith...) -} - -func HostVar(combineWith ...string) string { - return GetEnv("HOST_VAR", "/var", combineWith...) -} - -func HostRun(combineWith ...string) string { - return GetEnv("HOST_RUN", "/run", combineWith...) -} - -func HostDev(combineWith ...string) string { - return GetEnv("HOST_DEV", "/dev", combineWith...) -} - -func HostRoot(combineWith ...string) string { - return GetEnv("HOST_ROOT", "/", combineWith...) -} - -func HostProcWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_PROC", "/proc", combineWith...) -} - -func HostProcMountInfoWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_PROC_MOUNTINFO", "", combineWith...) -} - -func HostSysWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_SYS", "/sys", combineWith...) -} - -func HostEtcWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_ETC", "/etc", combineWith...) -} - -func HostVarWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_VAR", "/var", combineWith...) -} - -func HostRunWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_RUN", "/run", combineWith...) -} - -func HostDevWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_DEV", "/dev", combineWith...) -} - -func HostRootWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_ROOT", "/", combineWith...) -} - -// getSysctrlEnv sets LC_ALL=C in a list of env vars for use when running -// sysctl commands (see DoSysctrl). -func getSysctrlEnv(env []string) []string { - foundLC := false - for i, line := range env { - if strings.HasPrefix(line, "LC_ALL") { - env[i] = "LC_ALL=C" - foundLC = true - } - } - if !foundLC { - env = append(env, "LC_ALL=C") - } - return env -} diff --git a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_darwin.go b/vendor/github.com/shirou/gopsutil/v3/internal/common/common_darwin.go deleted file mode 100644 index f1a78459777..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_darwin.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build darwin -// +build darwin - -package common - -import ( - "context" - "os" - "os/exec" - "strings" - "unsafe" - - "golang.org/x/sys/unix" -) - -func DoSysctrlWithContext(ctx context.Context, mib string) ([]string, error) { - cmd := exec.CommandContext(ctx, "sysctl", "-n", mib) - cmd.Env = getSysctrlEnv(os.Environ()) - out, err := cmd.Output() - if err != nil { - return []string{}, err - } - v := strings.Replace(string(out), "{ ", "", 1) - v = strings.Replace(string(v), " }", "", 1) - values := strings.Fields(string(v)) - - return values, nil -} - -func CallSyscall(mib []int32) ([]byte, uint64, error) { - miblen := uint64(len(mib)) - - // get required buffer size - length := uint64(0) - _, _, err := unix.Syscall6( - 202, // unix.SYS___SYSCTL https://github.com/golang/sys/blob/76b94024e4b621e672466e8db3d7f084e7ddcad2/unix/zsysnum_darwin_amd64.go#L146 - uintptr(unsafe.Pointer(&mib[0])), - uintptr(miblen), - 0, - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - var b []byte - return b, length, err - } - if length == 0 { - var b []byte - return b, length, err - } - // get proc info itself - buf := make([]byte, length) - _, _, err = unix.Syscall6( - 202, // unix.SYS___SYSCTL https://github.com/golang/sys/blob/76b94024e4b621e672466e8db3d7f084e7ddcad2/unix/zsysnum_darwin_amd64.go#L146 - uintptr(unsafe.Pointer(&mib[0])), - uintptr(miblen), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - return buf, length, err - } - - return buf, length, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_freebsd.go b/vendor/github.com/shirou/gopsutil/v3/internal/common/common_freebsd.go deleted file mode 100644 index f590e2e67e6..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_freebsd.go +++ /dev/null @@ -1,82 +0,0 @@ -//go:build freebsd || openbsd -// +build freebsd openbsd - -package common - -import ( - "fmt" - "os" - "os/exec" - "strings" - "unsafe" - - "golang.org/x/sys/unix" -) - -func SysctlUint(mib string) (uint64, error) { - buf, err := unix.SysctlRaw(mib) - if err != nil { - return 0, err - } - if len(buf) == 8 { // 64 bit - return *(*uint64)(unsafe.Pointer(&buf[0])), nil - } - if len(buf) == 4 { // 32bit - t := *(*uint32)(unsafe.Pointer(&buf[0])) - return uint64(t), nil - } - return 0, fmt.Errorf("unexpected size: %s, %d", mib, len(buf)) -} - -func DoSysctrl(mib string) ([]string, error) { - cmd := exec.Command("sysctl", "-n", mib) - cmd.Env = getSysctrlEnv(os.Environ()) - out, err := cmd.Output() - if err != nil { - return []string{}, err - } - v := strings.Replace(string(out), "{ ", "", 1) - v = strings.Replace(string(v), " }", "", 1) - values := strings.Fields(string(v)) - - return values, nil -} - -func CallSyscall(mib []int32) ([]byte, uint64, error) { - mibptr := unsafe.Pointer(&mib[0]) - miblen := uint64(len(mib)) - - // get required buffer size - length := uint64(0) - _, _, err := unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - 0, - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - var b []byte - return b, length, err - } - if length == 0 { - var b []byte - return b, length, err - } - // get proc info itself - buf := make([]byte, length) - _, _, err = unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - return buf, length, err - } - - return buf, length, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_linux.go b/vendor/github.com/shirou/gopsutil/v3/internal/common/common_linux.go deleted file mode 100644 index b58edbeb0a1..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_linux.go +++ /dev/null @@ -1,322 +0,0 @@ -//go:build linux -// +build linux - -package common - -import ( - "context" - "fmt" - "os" - "os/exec" - "path/filepath" - "strconv" - "strings" - "sync" - "syscall" - "time" -) - -func DoSysctrl(mib string) ([]string, error) { - cmd := exec.Command("sysctl", "-n", mib) - cmd.Env = getSysctrlEnv(os.Environ()) - out, err := cmd.Output() - if err != nil { - return []string{}, err - } - v := strings.Replace(string(out), "{ ", "", 1) - v = strings.Replace(string(v), " }", "", 1) - values := strings.Fields(string(v)) - - return values, nil -} - -func NumProcs() (uint64, error) { - return NumProcsWithContext(context.Background()) -} - -func NumProcsWithContext(ctx context.Context) (uint64, error) { - f, err := os.Open(HostProcWithContext(ctx)) - if err != nil { - return 0, err - } - defer f.Close() - - list, err := f.Readdirnames(-1) - if err != nil { - return 0, err - } - var cnt uint64 - - for _, v := range list { - if _, err = strconv.ParseUint(v, 10, 64); err == nil { - cnt++ - } - } - - return cnt, nil -} - -func BootTimeWithContext(ctx context.Context) (uint64, error) { - system, role, err := VirtualizationWithContext(ctx) - if err != nil { - return 0, err - } - - statFile := "stat" - if system == "lxc" && role == "guest" { - // if lxc, /proc/uptime is used. - statFile = "uptime" - } else if system == "docker" && role == "guest" { - // also docker, guest - statFile = "uptime" - } - - filename := HostProcWithContext(ctx, statFile) - lines, err := ReadLines(filename) - if os.IsPermission(err) { - var info syscall.Sysinfo_t - err := syscall.Sysinfo(&info) - if err != nil { - return 0, err - } - - currentTime := time.Now().UnixNano() / int64(time.Second) - t := currentTime - int64(info.Uptime) - return uint64(t), nil - } - if err != nil { - return 0, err - } - - if statFile == "stat" { - for _, line := range lines { - if strings.HasPrefix(line, "btime") { - f := strings.Fields(line) - if len(f) != 2 { - return 0, fmt.Errorf("wrong btime format") - } - b, err := strconv.ParseInt(f[1], 10, 64) - if err != nil { - return 0, err - } - t := uint64(b) - return t, nil - } - } - } else if statFile == "uptime" { - if len(lines) != 1 { - return 0, fmt.Errorf("wrong uptime format") - } - f := strings.Fields(lines[0]) - b, err := strconv.ParseFloat(f[0], 64) - if err != nil { - return 0, err - } - currentTime := float64(time.Now().UnixNano()) / float64(time.Second) - t := currentTime - b - return uint64(t), nil - } - - return 0, fmt.Errorf("could not find btime") -} - -func Virtualization() (string, string, error) { - return VirtualizationWithContext(context.Background()) -} - -// required variables for concurrency safe virtualization caching -var ( - cachedVirtMap map[string]string - cachedVirtMutex sync.RWMutex - cachedVirtOnce sync.Once -) - -func VirtualizationWithContext(ctx context.Context) (string, string, error) { - var system, role string - - // if cached already, return from cache - cachedVirtMutex.RLock() // unlock won't be deferred so concurrent reads don't wait for long - if cachedVirtMap != nil { - cachedSystem, cachedRole := cachedVirtMap["system"], cachedVirtMap["role"] - cachedVirtMutex.RUnlock() - return cachedSystem, cachedRole, nil - } - cachedVirtMutex.RUnlock() - - filename := HostProcWithContext(ctx, "xen") - if PathExists(filename) { - system = "xen" - role = "guest" // assume guest - - if PathExists(filepath.Join(filename, "capabilities")) { - contents, err := ReadLines(filepath.Join(filename, "capabilities")) - if err == nil { - if StringsContains(contents, "control_d") { - role = "host" - } - } - } - } - - filename = HostProcWithContext(ctx, "modules") - if PathExists(filename) { - contents, err := ReadLines(filename) - if err == nil { - if StringsContains(contents, "kvm") { - system = "kvm" - role = "host" - } else if StringsContains(contents, "hv_util") { - system = "hyperv" - role = "guest" - } else if StringsContains(contents, "vboxdrv") { - system = "vbox" - role = "host" - } else if StringsContains(contents, "vboxguest") { - system = "vbox" - role = "guest" - } else if StringsContains(contents, "vmware") { - system = "vmware" - role = "guest" - } - } - } - - filename = HostProcWithContext(ctx, "cpuinfo") - if PathExists(filename) { - contents, err := ReadLines(filename) - if err == nil { - if StringsContains(contents, "QEMU Virtual CPU") || - StringsContains(contents, "Common KVM processor") || - StringsContains(contents, "Common 32-bit KVM processor") { - system = "kvm" - role = "guest" - } - } - } - - filename = HostProcWithContext(ctx, "bus/pci/devices") - if PathExists(filename) { - contents, err := ReadLines(filename) - if err == nil { - if StringsContains(contents, "virtio-pci") { - role = "guest" - } - } - } - - filename = HostProcWithContext(ctx) - if PathExists(filepath.Join(filename, "bc", "0")) { - system = "openvz" - role = "host" - } else if PathExists(filepath.Join(filename, "vz")) { - system = "openvz" - role = "guest" - } - - // not use dmidecode because it requires root - if PathExists(filepath.Join(filename, "self", "status")) { - contents, err := ReadLines(filepath.Join(filename, "self", "status")) - if err == nil { - if StringsContains(contents, "s_context:") || - StringsContains(contents, "VxID:") { - system = "linux-vserver" - } - // TODO: guest or host - } - } - - if PathExists(filepath.Join(filename, "1", "environ")) { - contents, err := ReadFile(filepath.Join(filename, "1", "environ")) - - if err == nil { - if strings.Contains(contents, "container=lxc") { - system = "lxc" - role = "guest" - } - } - } - - if PathExists(filepath.Join(filename, "self", "cgroup")) { - contents, err := ReadLines(filepath.Join(filename, "self", "cgroup")) - if err == nil { - if StringsContains(contents, "lxc") { - system = "lxc" - role = "guest" - } else if StringsContains(contents, "docker") { - system = "docker" - role = "guest" - } else if StringsContains(contents, "machine-rkt") { - system = "rkt" - role = "guest" - } else if PathExists("/usr/bin/lxc-version") { - system = "lxc" - role = "host" - } - } - } - - if PathExists(HostEtcWithContext(ctx, "os-release")) { - p, _, err := GetOSReleaseWithContext(ctx) - if err == nil && p == "coreos" { - system = "rkt" // Is it true? - role = "host" - } - } - - if PathExists(HostRootWithContext(ctx, ".dockerenv")) { - system = "docker" - role = "guest" - } - - // before returning for the first time, cache the system and role - cachedVirtOnce.Do(func() { - cachedVirtMutex.Lock() - defer cachedVirtMutex.Unlock() - cachedVirtMap = map[string]string{ - "system": system, - "role": role, - } - }) - - return system, role, nil -} - -func GetOSRelease() (platform string, version string, err error) { - return GetOSReleaseWithContext(context.Background()) -} - -func GetOSReleaseWithContext(ctx context.Context) (platform string, version string, err error) { - contents, err := ReadLines(HostEtcWithContext(ctx, "os-release")) - if err != nil { - return "", "", nil // return empty - } - for _, line := range contents { - field := strings.Split(line, "=") - if len(field) < 2 { - continue - } - switch field[0] { - case "ID": // use ID for lowercase - platform = trimQuotes(field[1]) - case "VERSION": - version = trimQuotes(field[1]) - } - } - - // cleanup amazon ID - if platform == "amzn" { - platform = "amazon" - } - - return platform, version, nil -} - -// Remove quotes of the source string -func trimQuotes(s string) string { - if len(s) >= 2 { - if s[0] == '"' && s[len(s)-1] == '"' { - return s[1 : len(s)-1] - } - } - return s -} diff --git a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_openbsd.go b/vendor/github.com/shirou/gopsutil/v3/internal/common/common_openbsd.go deleted file mode 100644 index 58d76f334e2..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_openbsd.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build openbsd -// +build openbsd - -package common - -import ( - "os" - "os/exec" - "strings" - "unsafe" - - "golang.org/x/sys/unix" -) - -func DoSysctrl(mib string) ([]string, error) { - cmd := exec.Command("sysctl", "-n", mib) - cmd.Env = getSysctrlEnv(os.Environ()) - out, err := cmd.Output() - if err != nil { - return []string{}, err - } - v := strings.Replace(string(out), "{ ", "", 1) - v = strings.Replace(string(v), " }", "", 1) - values := strings.Fields(string(v)) - - return values, nil -} - -func CallSyscall(mib []int32) ([]byte, uint64, error) { - mibptr := unsafe.Pointer(&mib[0]) - miblen := uint64(len(mib)) - - // get required buffer size - length := uint64(0) - _, _, err := unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - 0, - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - var b []byte - return b, length, err - } - if length == 0 { - var b []byte - return b, length, err - } - // get proc info itself - buf := make([]byte, length) - _, _, err = unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - return buf, length, err - } - - return buf, length, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_unix.go b/vendor/github.com/shirou/gopsutil/v3/internal/common/common_unix.go deleted file mode 100644 index 4af7e5c2aa8..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_unix.go +++ /dev/null @@ -1,62 +0,0 @@ -//go:build linux || freebsd || darwin || openbsd -// +build linux freebsd darwin openbsd - -package common - -import ( - "context" - "errors" - "os/exec" - "strconv" - "strings" -) - -func CallLsofWithContext(ctx context.Context, invoke Invoker, pid int32, args ...string) ([]string, error) { - var cmd []string - if pid == 0 { // will get from all processes. - cmd = []string{"-a", "-n", "-P"} - } else { - cmd = []string{"-a", "-n", "-P", "-p", strconv.Itoa(int(pid))} - } - cmd = append(cmd, args...) - out, err := invoke.CommandWithContext(ctx, "lsof", cmd...) - if err != nil { - if errors.Is(err, exec.ErrNotFound) { - return []string{}, err - } - // if no pid found, lsof returns code 1. - if err.Error() == "exit status 1" && len(out) == 0 { - return []string{}, nil - } - } - lines := strings.Split(string(out), "\n") - - var ret []string - for _, l := range lines[1:] { - if len(l) == 0 { - continue - } - ret = append(ret, l) - } - return ret, nil -} - -func CallPgrepWithContext(ctx context.Context, invoke Invoker, pid int32) ([]int32, error) { - out, err := invoke.CommandWithContext(ctx, "pgrep", "-P", strconv.Itoa(int(pid))) - if err != nil { - return []int32{}, err - } - lines := strings.Split(string(out), "\n") - ret := make([]int32, 0, len(lines)) - for _, l := range lines { - if len(l) == 0 { - continue - } - i, err := strconv.ParseInt(l, 10, 32) - if err != nil { - continue - } - ret = append(ret, int32(i)) - } - return ret, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_windows.go b/vendor/github.com/shirou/gopsutil/v3/internal/common/common_windows.go deleted file mode 100644 index 301b2315bb4..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/internal/common/common_windows.go +++ /dev/null @@ -1,304 +0,0 @@ -//go:build windows -// +build windows - -package common - -import ( - "context" - "fmt" - "path/filepath" - "reflect" - "strings" - "syscall" - "unsafe" - - "github.com/yusufpapurcu/wmi" - "golang.org/x/sys/windows" -) - -// for double values -type PDH_FMT_COUNTERVALUE_DOUBLE struct { - CStatus uint32 - DoubleValue float64 -} - -// for 64 bit integer values -type PDH_FMT_COUNTERVALUE_LARGE struct { - CStatus uint32 - LargeValue int64 -} - -// for long values -type PDH_FMT_COUNTERVALUE_LONG struct { - CStatus uint32 - LongValue int32 - padding [4]byte -} - -// windows system const -const ( - ERROR_SUCCESS = 0 - ERROR_FILE_NOT_FOUND = 2 - DRIVE_REMOVABLE = 2 - DRIVE_FIXED = 3 - HKEY_LOCAL_MACHINE = 0x80000002 - RRF_RT_REG_SZ = 0x00000002 - RRF_RT_REG_DWORD = 0x00000010 - PDH_FMT_LONG = 0x00000100 - PDH_FMT_DOUBLE = 0x00000200 - PDH_FMT_LARGE = 0x00000400 - PDH_INVALID_DATA = 0xc0000bc6 - PDH_INVALID_HANDLE = 0xC0000bbc - PDH_NO_DATA = 0x800007d5 - - STATUS_BUFFER_OVERFLOW = 0x80000005 - STATUS_BUFFER_TOO_SMALL = 0xC0000023 - STATUS_INFO_LENGTH_MISMATCH = 0xC0000004 -) - -const ( - ProcessBasicInformation = 0 - ProcessWow64Information = 26 - ProcessQueryInformation = windows.PROCESS_DUP_HANDLE | windows.PROCESS_QUERY_INFORMATION - - SystemExtendedHandleInformationClass = 64 -) - -var ( - Modkernel32 = windows.NewLazySystemDLL("kernel32.dll") - ModNt = windows.NewLazySystemDLL("ntdll.dll") - ModPdh = windows.NewLazySystemDLL("pdh.dll") - ModPsapi = windows.NewLazySystemDLL("psapi.dll") - - ProcGetSystemTimes = Modkernel32.NewProc("GetSystemTimes") - ProcNtQuerySystemInformation = ModNt.NewProc("NtQuerySystemInformation") - ProcRtlGetNativeSystemInformation = ModNt.NewProc("RtlGetNativeSystemInformation") - ProcRtlNtStatusToDosError = ModNt.NewProc("RtlNtStatusToDosError") - ProcNtQueryInformationProcess = ModNt.NewProc("NtQueryInformationProcess") - ProcNtReadVirtualMemory = ModNt.NewProc("NtReadVirtualMemory") - ProcNtWow64QueryInformationProcess64 = ModNt.NewProc("NtWow64QueryInformationProcess64") - ProcNtWow64ReadVirtualMemory64 = ModNt.NewProc("NtWow64ReadVirtualMemory64") - - PdhOpenQuery = ModPdh.NewProc("PdhOpenQuery") - PdhAddEnglishCounterW = ModPdh.NewProc("PdhAddEnglishCounterW") - PdhCollectQueryData = ModPdh.NewProc("PdhCollectQueryData") - PdhGetFormattedCounterValue = ModPdh.NewProc("PdhGetFormattedCounterValue") - PdhCloseQuery = ModPdh.NewProc("PdhCloseQuery") - - procQueryDosDeviceW = Modkernel32.NewProc("QueryDosDeviceW") -) - -type FILETIME struct { - DwLowDateTime uint32 - DwHighDateTime uint32 -} - -// borrowed from net/interface_windows.go -func BytePtrToString(p *uint8) string { - a := (*[10000]uint8)(unsafe.Pointer(p)) - i := 0 - for a[i] != 0 { - i++ - } - return string(a[:i]) -} - -// CounterInfo struct is used to track a windows performance counter -// copied from https://github.com/mackerelio/mackerel-agent/ -type CounterInfo struct { - PostName string - CounterName string - Counter windows.Handle -} - -// CreateQuery with a PdhOpenQuery call -// copied from https://github.com/mackerelio/mackerel-agent/ -func CreateQuery() (windows.Handle, error) { - var query windows.Handle - r, _, err := PdhOpenQuery.Call(0, 0, uintptr(unsafe.Pointer(&query))) - if r != 0 { - return 0, err - } - return query, nil -} - -// CreateCounter with a PdhAddEnglishCounterW call -func CreateCounter(query windows.Handle, pname, cname string) (*CounterInfo, error) { - var counter windows.Handle - r, _, err := PdhAddEnglishCounterW.Call( - uintptr(query), - uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(cname))), - 0, - uintptr(unsafe.Pointer(&counter))) - if r != 0 { - return nil, err - } - return &CounterInfo{ - PostName: pname, - CounterName: cname, - Counter: counter, - }, nil -} - -// GetCounterValue get counter value from handle -// adapted from https://github.com/mackerelio/mackerel-agent/ -func GetCounterValue(counter windows.Handle) (float64, error) { - var value PDH_FMT_COUNTERVALUE_DOUBLE - r, _, err := PdhGetFormattedCounterValue.Call(uintptr(counter), PDH_FMT_DOUBLE, uintptr(0), uintptr(unsafe.Pointer(&value))) - if r != 0 && r != PDH_INVALID_DATA { - return 0.0, err - } - return value.DoubleValue, nil -} - -type Win32PerformanceCounter struct { - PostName string - CounterName string - Query windows.Handle - Counter windows.Handle -} - -func NewWin32PerformanceCounter(postName, counterName string) (*Win32PerformanceCounter, error) { - query, err := CreateQuery() - if err != nil { - return nil, err - } - counter := Win32PerformanceCounter{ - Query: query, - PostName: postName, - CounterName: counterName, - } - r, _, err := PdhAddEnglishCounterW.Call( - uintptr(counter.Query), - uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(counter.CounterName))), - 0, - uintptr(unsafe.Pointer(&counter.Counter)), - ) - if r != 0 { - return nil, err - } - return &counter, nil -} - -func (w *Win32PerformanceCounter) GetValue() (float64, error) { - r, _, err := PdhCollectQueryData.Call(uintptr(w.Query)) - if r != 0 && err != nil { - if r == PDH_NO_DATA { - return 0.0, fmt.Errorf("%w: this counter has not data", err) - } - return 0.0, err - } - - return GetCounterValue(w.Counter) -} - -func ProcessorQueueLengthCounter() (*Win32PerformanceCounter, error) { - return NewWin32PerformanceCounter("processor_queue_length", `\System\Processor Queue Length`) -} - -// WMIQueryWithContext - wraps wmi.Query with a timed-out context to avoid hanging -func WMIQueryWithContext(ctx context.Context, query string, dst interface{}, connectServerArgs ...interface{}) error { - if _, ok := ctx.Deadline(); !ok { - ctxTimeout, cancel := context.WithTimeout(ctx, Timeout) - defer cancel() - ctx = ctxTimeout - } - - errChan := make(chan error, 1) - go func() { - errChan <- wmi.Query(query, dst, connectServerArgs...) - }() - - select { - case <-ctx.Done(): - return ctx.Err() - case err := <-errChan: - return err - } -} - -// Convert paths using native DOS format like: -// -// "\Device\HarddiskVolume1\Windows\systemew\file.txt" -// -// into: -// -// "C:\Windows\systemew\file.txt" -func ConvertDOSPath(p string) string { - rawDrive := strings.Join(strings.Split(p, `\`)[:3], `\`) - - for d := 'A'; d <= 'Z'; d++ { - szDeviceName := string(d) + ":" - szTarget := make([]uint16, 512) - ret, _, _ := procQueryDosDeviceW.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(szDeviceName))), - uintptr(unsafe.Pointer(&szTarget[0])), - uintptr(len(szTarget))) - if ret != 0 && windows.UTF16ToString(szTarget[:]) == rawDrive { - return filepath.Join(szDeviceName, p[len(rawDrive):]) - } - } - return p -} - -type NtStatus uint32 - -func (s NtStatus) Error() error { - if s == 0 { - return nil - } - return fmt.Errorf("NtStatus 0x%08x", uint32(s)) -} - -func (s NtStatus) IsError() bool { - return s>>30 == 3 -} - -type SystemExtendedHandleTableEntryInformation struct { - Object uintptr - UniqueProcessId uintptr - HandleValue uintptr - GrantedAccess uint32 - CreatorBackTraceIndex uint16 - ObjectTypeIndex uint16 - HandleAttributes uint32 - Reserved uint32 -} - -type SystemExtendedHandleInformation struct { - NumberOfHandles uintptr - Reserved uintptr - Handles [1]SystemExtendedHandleTableEntryInformation -} - -// CallWithExpandingBuffer https://github.com/hillu/go-ntdll -func CallWithExpandingBuffer(fn func() NtStatus, buf *[]byte, resultLength *uint32) NtStatus { - for { - if st := fn(); st == STATUS_BUFFER_OVERFLOW || st == STATUS_BUFFER_TOO_SMALL || st == STATUS_INFO_LENGTH_MISMATCH { - if int(*resultLength) <= cap(*buf) { - (*reflect.SliceHeader)(unsafe.Pointer(buf)).Len = int(*resultLength) - } else { - *buf = make([]byte, int(*resultLength)) - } - continue - } else { - if !st.IsError() { - *buf = (*buf)[:int(*resultLength)] - } - return st - } - } -} - -func NtQuerySystemInformation( - SystemInformationClass uint32, - SystemInformation *byte, - SystemInformationLength uint32, - ReturnLength *uint32, -) NtStatus { - r0, _, _ := ProcNtQuerySystemInformation.Call( - uintptr(SystemInformationClass), - uintptr(unsafe.Pointer(SystemInformation)), - uintptr(SystemInformationLength), - uintptr(unsafe.Pointer(ReturnLength))) - return NtStatus(r0) -} diff --git a/vendor/github.com/shirou/gopsutil/v3/internal/common/endian.go b/vendor/github.com/shirou/gopsutil/v3/internal/common/endian.go deleted file mode 100644 index 147cfdc4b71..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/internal/common/endian.go +++ /dev/null @@ -1,10 +0,0 @@ -package common - -import "unsafe" - -// IsLittleEndian checks if the current platform uses little-endian. -// copied from https://github.com/ntrrg/ntgo/blob/v0.8.0/runtime/infrastructure.go#L16 (MIT License) -func IsLittleEndian() bool { - var x int16 = 0x0011 - return *(*byte)(unsafe.Pointer(&x)) == 0x11 -} diff --git a/vendor/github.com/shirou/gopsutil/v3/internal/common/sleep.go b/vendor/github.com/shirou/gopsutil/v3/internal/common/sleep.go deleted file mode 100644 index 9bed2419ed3..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/internal/common/sleep.go +++ /dev/null @@ -1,21 +0,0 @@ -package common - -import ( - "context" - "time" -) - -// Sleep awaits for provided interval. -// Can be interrupted by context cancelation. -func Sleep(ctx context.Context, interval time.Duration) error { - timer := time.NewTimer(interval) - select { - case <-ctx.Done(): - if !timer.Stop() { - <-timer.C - } - return ctx.Err() - case <-timer.C: - return nil - } -} diff --git a/vendor/github.com/shirou/gopsutil/v3/internal/common/warnings.go b/vendor/github.com/shirou/gopsutil/v3/internal/common/warnings.go deleted file mode 100644 index a4aaadaf54d..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/internal/common/warnings.go +++ /dev/null @@ -1,30 +0,0 @@ -package common - -import "fmt" - -type Warnings struct { - List []error - Verbose bool -} - -func (w *Warnings) Add(err error) { - w.List = append(w.List, err) -} - -func (w *Warnings) Reference() error { - if len(w.List) > 0 { - return w - } - return nil -} - -func (w *Warnings) Error() string { - if w.Verbose { - str := "" - for i, e := range w.List { - str += fmt.Sprintf("\tError %d: %s\n", i, e.Error()) - } - return str - } - return fmt.Sprintf("Number of warnings: %v", len(w.List)) -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem.go deleted file mode 100644 index ff960dacc7d..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem.go +++ /dev/null @@ -1,118 +0,0 @@ -package mem - -import ( - "encoding/json" - - "github.com/shirou/gopsutil/v3/internal/common" -) - -var invoke common.Invoker = common.Invoke{} - -// Memory usage statistics. Total, Available and Used contain numbers of bytes -// for human consumption. -// -// The other fields in this struct contain kernel specific values. -type VirtualMemoryStat struct { - // Total amount of RAM on this system - Total uint64 `json:"total"` - - // RAM available for programs to allocate - // - // This value is computed from the kernel specific values. - Available uint64 `json:"available"` - - // RAM used by programs - // - // This value is computed from the kernel specific values. - Used uint64 `json:"used"` - - // Percentage of RAM used by programs - // - // This value is computed from the kernel specific values. - UsedPercent float64 `json:"usedPercent"` - - // This is the kernel's notion of free memory; RAM chips whose bits nobody - // cares about the value of right now. For a human consumable number, - // Available is what you really want. - Free uint64 `json:"free"` - - // OS X / BSD specific numbers: - // http://www.macyourself.com/2010/02/17/what-is-free-wired-active-and-inactive-system-memory-ram/ - Active uint64 `json:"active"` - Inactive uint64 `json:"inactive"` - Wired uint64 `json:"wired"` - - // FreeBSD specific numbers: - // https://reviews.freebsd.org/D8467 - Laundry uint64 `json:"laundry"` - - // Linux specific numbers - // https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s2-proc-meminfo.html - // https://www.kernel.org/doc/Documentation/filesystems/proc.txt - // https://www.kernel.org/doc/Documentation/vm/overcommit-accounting - Buffers uint64 `json:"buffers"` - Cached uint64 `json:"cached"` - WriteBack uint64 `json:"writeBack"` - Dirty uint64 `json:"dirty"` - WriteBackTmp uint64 `json:"writeBackTmp"` - Shared uint64 `json:"shared"` - Slab uint64 `json:"slab"` - Sreclaimable uint64 `json:"sreclaimable"` - Sunreclaim uint64 `json:"sunreclaim"` - PageTables uint64 `json:"pageTables"` - SwapCached uint64 `json:"swapCached"` - CommitLimit uint64 `json:"commitLimit"` - CommittedAS uint64 `json:"committedAS"` - HighTotal uint64 `json:"highTotal"` - HighFree uint64 `json:"highFree"` - LowTotal uint64 `json:"lowTotal"` - LowFree uint64 `json:"lowFree"` - SwapTotal uint64 `json:"swapTotal"` - SwapFree uint64 `json:"swapFree"` - Mapped uint64 `json:"mapped"` - VmallocTotal uint64 `json:"vmallocTotal"` - VmallocUsed uint64 `json:"vmallocUsed"` - VmallocChunk uint64 `json:"vmallocChunk"` - HugePagesTotal uint64 `json:"hugePagesTotal"` - HugePagesFree uint64 `json:"hugePagesFree"` - HugePagesRsvd uint64 `json:"hugePagesRsvd"` - HugePagesSurp uint64 `json:"hugePagesSurp"` - HugePageSize uint64 `json:"hugePageSize"` -} - -type SwapMemoryStat struct { - Total uint64 `json:"total"` - Used uint64 `json:"used"` - Free uint64 `json:"free"` - UsedPercent float64 `json:"usedPercent"` - Sin uint64 `json:"sin"` - Sout uint64 `json:"sout"` - PgIn uint64 `json:"pgIn"` - PgOut uint64 `json:"pgOut"` - PgFault uint64 `json:"pgFault"` - - // Linux specific numbers - // https://www.kernel.org/doc/Documentation/cgroup-v2.txt - PgMajFault uint64 `json:"pgMajFault"` -} - -func (m VirtualMemoryStat) String() string { - s, _ := json.Marshal(m) - return string(s) -} - -func (m SwapMemoryStat) String() string { - s, _ := json.Marshal(m) - return string(s) -} - -type SwapDevice struct { - Name string `json:"name"` - UsedBytes uint64 `json:"usedBytes"` - FreeBytes uint64 `json:"freeBytes"` -} - -func (m SwapDevice) String() string { - s, _ := json.Marshal(m) - return string(s) -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_aix.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_aix.go deleted file mode 100644 index 22a6a4e9265..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_aix.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build aix -// +build aix - -package mem - -import ( - "context" -) - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_cgo.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_cgo.go deleted file mode 100644 index 67e11dff886..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_cgo.go +++ /dev/null @@ -1,51 +0,0 @@ -//go:build aix && cgo -// +build aix,cgo - -package mem - -import ( - "context" - - "github.com/power-devops/perfstat" -) - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - m, err := perfstat.MemoryTotalStat() - if err != nil { - return nil, err - } - pagesize := uint64(4096) - ret := VirtualMemoryStat{ - Total: uint64(m.RealTotal) * pagesize, - Available: uint64(m.RealAvailable) * pagesize, - Free: uint64(m.RealFree) * pagesize, - Used: uint64(m.RealInUse) * pagesize, - UsedPercent: 100 * float64(m.RealInUse) / float64(m.RealTotal), - Active: uint64(m.VirtualActive) * pagesize, - SwapTotal: uint64(m.PgSpTotal) * pagesize, - SwapFree: uint64(m.PgSpFree) * pagesize, - } - return &ret, nil -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - m, err := perfstat.MemoryTotalStat() - if err != nil { - return nil, err - } - pagesize := uint64(4096) - swapUsed := uint64(m.PgSpTotal-m.PgSpFree-m.PgSpRsvd) * pagesize - swapTotal := uint64(m.PgSpTotal) * pagesize - ret := SwapMemoryStat{ - Total: swapTotal, - Free: uint64(m.PgSpFree) * pagesize, - Used: swapUsed, - UsedPercent: float64(100*swapUsed) / float64(swapTotal), - Sin: uint64(m.PgSpIn), - Sout: uint64(m.PgSpOut), - PgIn: uint64(m.PageIn), - PgOut: uint64(m.PageOut), - PgFault: uint64(m.PageFaults), - } - return &ret, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_nocgo.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_nocgo.go deleted file mode 100644 index fc9e49222d1..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_nocgo.go +++ /dev/null @@ -1,81 +0,0 @@ -//go:build aix && !cgo -// +build aix,!cgo - -package mem - -import ( - "context" - "regexp" - "strconv" - "strings" - - "github.com/shirou/gopsutil/v3/internal/common" -) - -var whiteSpaces = regexp.MustCompile(`\s+`) - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - vmem, swap, err := callSVMon(ctx) - if err != nil { - return nil, err - } - if vmem.Total == 0 { - return nil, common.ErrNotImplementedError - } - vmem.SwapTotal = swap.Total - vmem.SwapFree = swap.Free - return vmem, nil -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - _, swap, err := callSVMon(ctx) - if err != nil { - return nil, err - } - if swap.Total == 0 { - return nil, common.ErrNotImplementedError - } - return swap, nil -} - -func callSVMon(ctx context.Context) (*VirtualMemoryStat, *SwapMemoryStat, error) { - out, err := invoke.CommandWithContext(ctx, "svmon", "-G") - if err != nil { - return nil, nil, err - } - - pagesize := uint64(4096) - vmem := &VirtualMemoryStat{} - swap := &SwapMemoryStat{} - for _, line := range strings.Split(string(out), "\n") { - if strings.HasPrefix(line, "memory") { - p := whiteSpaces.Split(line, 7) - if len(p) > 2 { - if t, err := strconv.ParseUint(p[1], 10, 64); err == nil { - vmem.Total = t * pagesize - } - if t, err := strconv.ParseUint(p[2], 10, 64); err == nil { - vmem.Used = t * pagesize - if vmem.Total > 0 { - vmem.UsedPercent = 100 * float64(vmem.Used) / float64(vmem.Total) - } - } - if t, err := strconv.ParseUint(p[3], 10, 64); err == nil { - vmem.Free = t * pagesize - } - } - } else if strings.HasPrefix(line, "pg space") { - p := whiteSpaces.Split(line, 4) - if len(p) > 3 { - if t, err := strconv.ParseUint(p[2], 10, 64); err == nil { - swap.Total = t * pagesize - } - if t, err := strconv.ParseUint(p[3], 10, 64); err == nil { - swap.Free = swap.Total - t*pagesize - } - } - break - } - } - return vmem, swap, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_bsd.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_bsd.go deleted file mode 100644 index ce930fbe43f..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_bsd.go +++ /dev/null @@ -1,87 +0,0 @@ -//go:build freebsd || openbsd -// +build freebsd openbsd - -package mem - -import ( - "context" - "fmt" - "strconv" - "strings" -) - -const swapCommand = "swapctl" - -// swapctl column indexes -const ( - nameCol = 0 - totalKiBCol = 1 - usedKiBCol = 2 -) - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { - output, err := invoke.CommandWithContext(ctx, swapCommand, "-lk") - if err != nil { - return nil, fmt.Errorf("could not execute %q: %w", swapCommand, err) - } - - return parseSwapctlOutput(string(output)) -} - -func parseSwapctlOutput(output string) ([]*SwapDevice, error) { - lines := strings.Split(output, "\n") - if len(lines) == 0 { - return nil, fmt.Errorf("could not parse output of %q: no lines in %q", swapCommand, output) - } - - // Check header headerFields are as expected. - header := lines[0] - header = strings.ToLower(header) - header = strings.ReplaceAll(header, ":", "") - headerFields := strings.Fields(header) - if len(headerFields) < usedKiBCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields in header %q", swapCommand, header) - } - if headerFields[nameCol] != "device" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[nameCol], "device") - } - if headerFields[totalKiBCol] != "1kb-blocks" && headerFields[totalKiBCol] != "1k-blocks" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[totalKiBCol], "1kb-blocks") - } - if headerFields[usedKiBCol] != "used" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[usedKiBCol], "used") - } - - var swapDevices []*SwapDevice - for _, line := range lines[1:] { - if line == "" { - continue // the terminal line is typically empty - } - fields := strings.Fields(line) - if len(fields) < usedKiBCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields", swapCommand) - } - - totalKiB, err := strconv.ParseUint(fields[totalKiBCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Size' column in %q: %w", swapCommand, err) - } - - usedKiB, err := strconv.ParseUint(fields[usedKiBCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Used' column in %q: %w", swapCommand, err) - } - - swapDevices = append(swapDevices, &SwapDevice{ - Name: fields[nameCol], - UsedBytes: usedKiB * 1024, - FreeBytes: (totalKiB - usedKiB) * 1024, - }) - } - - return swapDevices, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin.go deleted file mode 100644 index a05a0faba0b..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin.go +++ /dev/null @@ -1,72 +0,0 @@ -//go:build darwin -// +build darwin - -package mem - -import ( - "context" - "fmt" - "unsafe" - - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v3/internal/common" -) - -func getHwMemsize() (uint64, error) { - total, err := unix.SysctlUint64("hw.memsize") - if err != nil { - return 0, err - } - return total, nil -} - -// xsw_usage in sys/sysctl.h -type swapUsage struct { - Total uint64 - Avail uint64 - Used uint64 - Pagesize int32 - Encrypted bool -} - -// SwapMemory returns swapinfo. -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - // https://github.com/yanllearnn/go-osstat/blob/ae8a279d26f52ec946a03698c7f50a26cfb427e3/memory/memory_darwin.go - var ret *SwapMemoryStat - - value, err := unix.SysctlRaw("vm.swapusage") - if err != nil { - return ret, err - } - if len(value) != 32 { - return ret, fmt.Errorf("unexpected output of sysctl vm.swapusage: %v (len: %d)", value, len(value)) - } - swap := (*swapUsage)(unsafe.Pointer(&value[0])) - - u := float64(0) - if swap.Total != 0 { - u = ((float64(swap.Total) - float64(swap.Avail)) / float64(swap.Total)) * 100.0 - } - - ret = &SwapMemoryStat{ - Total: swap.Total, - Used: swap.Used, - Free: swap.Avail, - UsedPercent: u, - } - - return ret, nil -} - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { - return nil, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin_cgo.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin_cgo.go deleted file mode 100644 index e5da7dcdb23..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin_cgo.go +++ /dev/null @@ -1,58 +0,0 @@ -//go:build darwin && cgo -// +build darwin,cgo - -package mem - -/* -#include -#include -*/ -import "C" - -import ( - "context" - "fmt" - "unsafe" -) - -// VirtualMemory returns VirtualmemoryStat. -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - count := C.mach_msg_type_number_t(C.HOST_VM_INFO_COUNT) - var vmstat C.vm_statistics_data_t - - status := C.host_statistics(C.host_t(C.mach_host_self()), - C.HOST_VM_INFO, - C.host_info_t(unsafe.Pointer(&vmstat)), - &count) - - if status != C.KERN_SUCCESS { - return nil, fmt.Errorf("host_statistics error=%d", status) - } - - pageSize := uint64(C.vm_kernel_page_size) - total, err := getHwMemsize() - if err != nil { - return nil, err - } - totalCount := C.natural_t(total / pageSize) - - availableCount := vmstat.inactive_count + vmstat.free_count - usedPercent := 100 * float64(totalCount-availableCount) / float64(totalCount) - - usedCount := totalCount - availableCount - - return &VirtualMemoryStat{ - Total: total, - Available: pageSize * uint64(availableCount), - Used: pageSize * uint64(usedCount), - UsedPercent: usedPercent, - Free: pageSize * uint64(vmstat.free_count), - Active: pageSize * uint64(vmstat.active_count), - Inactive: pageSize * uint64(vmstat.inactive_count), - Wired: pageSize * uint64(vmstat.wire_count), - }, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin_nocgo.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin_nocgo.go deleted file mode 100644 index c9393168032..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_darwin_nocgo.go +++ /dev/null @@ -1,89 +0,0 @@ -//go:build darwin && !cgo -// +build darwin,!cgo - -package mem - -import ( - "context" - "strconv" - "strings" - - "golang.org/x/sys/unix" -) - -// Runs vm_stat and returns Free and inactive pages -func getVMStat(vms *VirtualMemoryStat) error { - out, err := invoke.Command("vm_stat") - if err != nil { - return err - } - return parseVMStat(string(out), vms) -} - -func parseVMStat(out string, vms *VirtualMemoryStat) error { - var err error - - lines := strings.Split(out, "\n") - pagesize := uint64(unix.Getpagesize()) - for _, line := range lines { - fields := strings.Split(line, ":") - if len(fields) < 2 { - continue - } - key := strings.TrimSpace(fields[0]) - value := strings.Trim(fields[1], " .") - switch key { - case "Pages free": - free, e := strconv.ParseUint(value, 10, 64) - if e != nil { - err = e - } - vms.Free = free * pagesize - case "Pages inactive": - inactive, e := strconv.ParseUint(value, 10, 64) - if e != nil { - err = e - } - vms.Inactive = inactive * pagesize - case "Pages active": - active, e := strconv.ParseUint(value, 10, 64) - if e != nil { - err = e - } - vms.Active = active * pagesize - case "Pages wired down": - wired, e := strconv.ParseUint(value, 10, 64) - if e != nil { - err = e - } - vms.Wired = wired * pagesize - } - } - return err -} - -// VirtualMemory returns VirtualmemoryStat. -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - ret := &VirtualMemoryStat{} - - total, err := getHwMemsize() - if err != nil { - return nil, err - } - err = getVMStat(ret) - if err != nil { - return nil, err - } - - ret.Available = ret.Free + ret.Inactive - ret.Total = total - - ret.Used = ret.Total - ret.Available - ret.UsedPercent = 100 * float64(ret.Used) / float64(ret.Total) - - return ret, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_fallback.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_fallback.go deleted file mode 100644 index 0b6c528f2e5..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_fallback.go +++ /dev/null @@ -1,34 +0,0 @@ -//go:build !darwin && !linux && !freebsd && !openbsd && !solaris && !windows && !plan9 && !aix -// +build !darwin,!linux,!freebsd,!openbsd,!solaris,!windows,!plan9,!aix - -package mem - -import ( - "context" - - "github.com/shirou/gopsutil/v3/internal/common" -) - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - return nil, common.ErrNotImplementedError -} - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - return nil, common.ErrNotImplementedError -} - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { - return nil, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_freebsd.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_freebsd.go deleted file mode 100644 index 9a56785b319..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_freebsd.go +++ /dev/null @@ -1,167 +0,0 @@ -//go:build freebsd -// +build freebsd - -package mem - -import ( - "context" - "errors" - "unsafe" - - "github.com/shirou/gopsutil/v3/internal/common" - "golang.org/x/sys/unix" -) - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - pageSize, err := common.SysctlUint("vm.stats.vm.v_page_size") - if err != nil { - return nil, err - } - physmem, err := common.SysctlUint("hw.physmem") - if err != nil { - return nil, err - } - - free, err := common.SysctlUint("vm.stats.vm.v_free_count") - if err != nil { - return nil, err - } - active, err := common.SysctlUint("vm.stats.vm.v_active_count") - if err != nil { - return nil, err - } - inactive, err := common.SysctlUint("vm.stats.vm.v_inactive_count") - if err != nil { - return nil, err - } - buffers, err := common.SysctlUint("vfs.bufspace") - if err != nil { - return nil, err - } - wired, err := common.SysctlUint("vm.stats.vm.v_wire_count") - if err != nil { - return nil, err - } - var cached, laundry uint64 - osreldate, _ := common.SysctlUint("kern.osreldate") - if osreldate < 1102000 { - cached, err = common.SysctlUint("vm.stats.vm.v_cache_count") - if err != nil { - return nil, err - } - } else { - laundry, err = common.SysctlUint("vm.stats.vm.v_laundry_count") - if err != nil { - return nil, err - } - } - - p := pageSize - ret := &VirtualMemoryStat{ - Total: physmem, - Free: free * p, - Active: active * p, - Inactive: inactive * p, - Cached: cached * p, - Buffers: buffers, - Wired: wired * p, - Laundry: laundry * p, - } - - ret.Available = ret.Inactive + ret.Cached + ret.Free + ret.Laundry - ret.Used = ret.Total - ret.Available - ret.UsedPercent = float64(ret.Used) / float64(ret.Total) * 100.0 - - return ret, nil -} - -// Return swapinfo -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -// Constants from vm/vm_param.h -// nolint: golint -const ( - XSWDEV_VERSION11 = 1 - XSWDEV_VERSION = 2 -) - -// Types from vm/vm_param.h -type xswdev struct { - Version uint32 // Version is the version - Dev uint64 // Dev is the device identifier - Flags int32 // Flags is the swap flags applied to the device - NBlks int32 // NBlks is the total number of blocks - Used int32 // Used is the number of blocks used -} - -// xswdev11 is a compatibility for under FreeBSD 11 -// sys/vm/swap_pager.c -type xswdev11 struct { - Version uint32 // Version is the version - Dev uint32 // Dev is the device identifier - Flags int32 // Flags is the swap flags applied to the device - NBlks int32 // NBlks is the total number of blocks - Used int32 // Used is the number of blocks used -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - // FreeBSD can have multiple swap devices so we total them up - i, err := common.SysctlUint("vm.nswapdev") - if err != nil { - return nil, err - } - - if i == 0 { - return nil, errors.New("no swap devices found") - } - - c := int(i) - - i, err = common.SysctlUint("vm.stats.vm.v_page_size") - if err != nil { - return nil, err - } - pageSize := i - - var buf []byte - s := &SwapMemoryStat{} - for n := 0; n < c; n++ { - buf, err = unix.SysctlRaw("vm.swap_info", n) - if err != nil { - return nil, err - } - - // first, try to parse with version 2 - xsw := (*xswdev)(unsafe.Pointer(&buf[0])) - if xsw.Version == XSWDEV_VERSION11 { - // this is version 1, so try to parse again - xsw := (*xswdev11)(unsafe.Pointer(&buf[0])) - if xsw.Version != XSWDEV_VERSION11 { - return nil, errors.New("xswdev version mismatch(11)") - } - s.Total += uint64(xsw.NBlks) - s.Used += uint64(xsw.Used) - } else if xsw.Version != XSWDEV_VERSION { - return nil, errors.New("xswdev version mismatch") - } else { - s.Total += uint64(xsw.NBlks) - s.Used += uint64(xsw.Used) - } - - } - - if s.Total != 0 { - s.UsedPercent = float64(s.Used) / float64(s.Total) * 100 - } - s.Total *= pageSize - s.Used *= pageSize - s.Free = s.Total - s.Used - - return s, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_linux.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_linux.go deleted file mode 100644 index 361d06bcc11..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_linux.go +++ /dev/null @@ -1,526 +0,0 @@ -//go:build linux -// +build linux - -package mem - -import ( - "bufio" - "context" - "encoding/json" - "fmt" - "io" - "math" - "os" - "strconv" - "strings" - - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v3/internal/common" -) - -type VirtualMemoryExStat struct { - ActiveFile uint64 `json:"activefile"` - InactiveFile uint64 `json:"inactivefile"` - ActiveAnon uint64 `json:"activeanon"` - InactiveAnon uint64 `json:"inactiveanon"` - Unevictable uint64 `json:"unevictable"` -} - -func (v VirtualMemoryExStat) String() string { - s, _ := json.Marshal(v) - return string(s) -} - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - vm, _, err := fillFromMeminfoWithContext(ctx) - if err != nil { - return nil, err - } - return vm, nil -} - -func VirtualMemoryEx() (*VirtualMemoryExStat, error) { - return VirtualMemoryExWithContext(context.Background()) -} - -func VirtualMemoryExWithContext(ctx context.Context) (*VirtualMemoryExStat, error) { - _, vmEx, err := fillFromMeminfoWithContext(ctx) - if err != nil { - return nil, err - } - return vmEx, nil -} - -func fillFromMeminfoWithContext(ctx context.Context) (*VirtualMemoryStat, *VirtualMemoryExStat, error) { - filename := common.HostProcWithContext(ctx, "meminfo") - lines, _ := common.ReadLines(filename) - - // flag if MemAvailable is in /proc/meminfo (kernel 3.14+) - memavail := false - activeFile := false // "Active(file)" not available: 2.6.28 / Dec 2008 - inactiveFile := false // "Inactive(file)" not available: 2.6.28 / Dec 2008 - sReclaimable := false // "Sreclaimable:" not available: 2.6.19 / Nov 2006 - - ret := &VirtualMemoryStat{} - retEx := &VirtualMemoryExStat{} - - for _, line := range lines { - fields := strings.Split(line, ":") - if len(fields) != 2 { - continue - } - key := strings.TrimSpace(fields[0]) - value := strings.TrimSpace(fields[1]) - value = strings.Replace(value, " kB", "", -1) - - switch key { - case "MemTotal": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Total = t * 1024 - case "MemFree": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Free = t * 1024 - case "MemAvailable": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - memavail = true - ret.Available = t * 1024 - case "Buffers": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Buffers = t * 1024 - case "Cached": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Cached = t * 1024 - case "Active": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Active = t * 1024 - case "Inactive": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Inactive = t * 1024 - case "Active(anon)": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - retEx.ActiveAnon = t * 1024 - case "Inactive(anon)": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - retEx.InactiveAnon = t * 1024 - case "Active(file)": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - activeFile = true - retEx.ActiveFile = t * 1024 - case "Inactive(file)": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - inactiveFile = true - retEx.InactiveFile = t * 1024 - case "Unevictable": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - retEx.Unevictable = t * 1024 - case "Writeback": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.WriteBack = t * 1024 - case "WritebackTmp": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.WriteBackTmp = t * 1024 - case "Dirty": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Dirty = t * 1024 - case "Shmem": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Shared = t * 1024 - case "Slab": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Slab = t * 1024 - case "SReclaimable": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - sReclaimable = true - ret.Sreclaimable = t * 1024 - case "SUnreclaim": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Sunreclaim = t * 1024 - case "PageTables": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.PageTables = t * 1024 - case "SwapCached": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.SwapCached = t * 1024 - case "CommitLimit": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.CommitLimit = t * 1024 - case "Committed_AS": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.CommittedAS = t * 1024 - case "HighTotal": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HighTotal = t * 1024 - case "HighFree": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HighFree = t * 1024 - case "LowTotal": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.LowTotal = t * 1024 - case "LowFree": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.LowFree = t * 1024 - case "SwapTotal": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.SwapTotal = t * 1024 - case "SwapFree": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.SwapFree = t * 1024 - case "Mapped": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Mapped = t * 1024 - case "VmallocTotal": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.VmallocTotal = t * 1024 - case "VmallocUsed": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.VmallocUsed = t * 1024 - case "VmallocChunk": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.VmallocChunk = t * 1024 - case "HugePages_Total": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HugePagesTotal = t - case "HugePages_Free": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HugePagesFree = t - case "HugePages_Rsvd": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HugePagesRsvd = t - case "HugePages_Surp": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HugePagesSurp = t - case "Hugepagesize": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HugePageSize = t * 1024 - } - } - - ret.Cached += ret.Sreclaimable - - if !memavail { - if activeFile && inactiveFile && sReclaimable { - ret.Available = calculateAvailVmem(ctx, ret, retEx) - } else { - ret.Available = ret.Cached + ret.Free - } - } - - ret.Used = ret.Total - ret.Free - ret.Buffers - ret.Cached - ret.UsedPercent = float64(ret.Used) / float64(ret.Total) * 100.0 - - return ret, retEx, nil -} - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - sysinfo := &unix.Sysinfo_t{} - - if err := unix.Sysinfo(sysinfo); err != nil { - return nil, err - } - ret := &SwapMemoryStat{ - Total: uint64(sysinfo.Totalswap) * uint64(sysinfo.Unit), - Free: uint64(sysinfo.Freeswap) * uint64(sysinfo.Unit), - } - ret.Used = ret.Total - ret.Free - // check Infinity - if ret.Total != 0 { - ret.UsedPercent = float64(ret.Total-ret.Free) / float64(ret.Total) * 100.0 - } else { - ret.UsedPercent = 0 - } - filename := common.HostProcWithContext(ctx, "vmstat") - lines, _ := common.ReadLines(filename) - for _, l := range lines { - fields := strings.Fields(l) - if len(fields) < 2 { - continue - } - switch fields[0] { - case "pswpin": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.Sin = value * 4 * 1024 - case "pswpout": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.Sout = value * 4 * 1024 - case "pgpgIn": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.PgIn = value * 4 * 1024 - case "pgpgOut": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.PgOut = value * 4 * 1024 - case "pgFault": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.PgFault = value * 4 * 1024 - case "pgMajFault": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.PgMajFault = value * 4 * 1024 - } - } - return ret, nil -} - -// calculateAvailVmem is a fallback under kernel 3.14 where /proc/meminfo does not provide -// "MemAvailable:" column. It reimplements an algorithm from the link below -// https://github.com/giampaolo/psutil/pull/890 -func calculateAvailVmem(ctx context.Context, ret *VirtualMemoryStat, retEx *VirtualMemoryExStat) uint64 { - var watermarkLow uint64 - - fn := common.HostProcWithContext(ctx, "zoneinfo") - lines, err := common.ReadLines(fn) - if err != nil { - return ret.Free + ret.Cached // fallback under kernel 2.6.13 - } - - pagesize := uint64(os.Getpagesize()) - watermarkLow = 0 - - for _, line := range lines { - fields := strings.Fields(line) - - if strings.HasPrefix(fields[0], "low") { - lowValue, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - lowValue = 0 - } - watermarkLow += lowValue - } - } - - watermarkLow *= pagesize - - availMemory := ret.Free - watermarkLow - pageCache := retEx.ActiveFile + retEx.InactiveFile - pageCache -= uint64(math.Min(float64(pageCache/2), float64(watermarkLow))) - availMemory += pageCache - availMemory += ret.Sreclaimable - uint64(math.Min(float64(ret.Sreclaimable/2.0), float64(watermarkLow))) - - if availMemory < 0 { - availMemory = 0 - } - - return availMemory -} - -const swapsFilename = "swaps" - -// swaps file column indexes -const ( - nameCol = 0 - // typeCol = 1 - totalCol = 2 - usedCol = 3 - // priorityCol = 4 -) - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { - swapsFilePath := common.HostProcWithContext(ctx, swapsFilename) - f, err := os.Open(swapsFilePath) - if err != nil { - return nil, err - } - defer f.Close() - - return parseSwapsFile(ctx, f) -} - -func parseSwapsFile(ctx context.Context, r io.Reader) ([]*SwapDevice, error) { - swapsFilePath := common.HostProcWithContext(ctx, swapsFilename) - scanner := bufio.NewScanner(r) - if !scanner.Scan() { - if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("couldn't read file %q: %w", swapsFilePath, err) - } - return nil, fmt.Errorf("unexpected end-of-file in %q", swapsFilePath) - - } - - // Check header headerFields are as expected - headerFields := strings.Fields(scanner.Text()) - if len(headerFields) < usedCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields in header", swapsFilePath) - } - if headerFields[nameCol] != "Filename" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapsFilePath, headerFields[nameCol], "Filename") - } - if headerFields[totalCol] != "Size" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapsFilePath, headerFields[totalCol], "Size") - } - if headerFields[usedCol] != "Used" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapsFilePath, headerFields[usedCol], "Used") - } - - var swapDevices []*SwapDevice - for scanner.Scan() { - fields := strings.Fields(scanner.Text()) - if len(fields) < usedCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields", swapsFilePath) - } - - totalKiB, err := strconv.ParseUint(fields[totalCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Size' column in %q: %w", swapsFilePath, err) - } - - usedKiB, err := strconv.ParseUint(fields[usedCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Used' column in %q: %w", swapsFilePath, err) - } - - swapDevices = append(swapDevices, &SwapDevice{ - Name: fields[nameCol], - UsedBytes: usedKiB * 1024, - FreeBytes: (totalKiB - usedKiB) * 1024, - }) - } - - if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("couldn't read file %q: %w", swapsFilePath, err) - } - - return swapDevices, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd.go deleted file mode 100644 index e37d5abe0dd..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd.go +++ /dev/null @@ -1,100 +0,0 @@ -//go:build openbsd -// +build openbsd - -package mem - -import ( - "bytes" - "context" - "encoding/binary" - "errors" - "fmt" - - "github.com/shirou/gopsutil/v3/internal/common" - "golang.org/x/sys/unix" -) - -func GetPageSize() (uint64, error) { - return GetPageSizeWithContext(context.Background()) -} - -func GetPageSizeWithContext(ctx context.Context) (uint64, error) { - uvmexp, err := unix.SysctlUvmexp("vm.uvmexp") - if err != nil { - return 0, err - } - return uint64(uvmexp.Pagesize), nil -} - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - uvmexp, err := unix.SysctlUvmexp("vm.uvmexp") - if err != nil { - return nil, err - } - p := uint64(uvmexp.Pagesize) - - ret := &VirtualMemoryStat{ - Total: uint64(uvmexp.Npages) * p, - Free: uint64(uvmexp.Free) * p, - Active: uint64(uvmexp.Active) * p, - Inactive: uint64(uvmexp.Inactive) * p, - Cached: 0, // not available - Wired: uint64(uvmexp.Wired) * p, - } - - ret.Available = ret.Inactive + ret.Cached + ret.Free - ret.Used = ret.Total - ret.Available - ret.UsedPercent = float64(ret.Used) / float64(ret.Total) * 100.0 - - mib := []int32{CTLVfs, VfsGeneric, VfsBcacheStat} - buf, length, err := common.CallSyscall(mib) - if err != nil { - return nil, err - } - if length < sizeOfBcachestats { - return nil, fmt.Errorf("short syscall ret %d bytes", length) - } - var bcs Bcachestats - br := bytes.NewReader(buf) - err = common.Read(br, binary.LittleEndian, &bcs) - if err != nil { - return nil, err - } - ret.Buffers = uint64(bcs.Numbufpages) * p - - return ret, nil -} - -// Return swapctl summary info -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - out, err := invoke.CommandWithContext(ctx, "swapctl", "-sk") - if err != nil { - return &SwapMemoryStat{}, nil - } - - line := string(out) - var total, used, free uint64 - - _, err = fmt.Sscanf(line, - "total: %d 1K-blocks allocated, %d used, %d available", - &total, &used, &free) - if err != nil { - return nil, errors.New("failed to parse swapctl output") - } - - percent := float64(used) / float64(total) * 100 - return &SwapMemoryStat{ - Total: total * 1024, - Used: used * 1024, - Free: free * 1024, - UsedPercent: percent, - }, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_386.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_386.go deleted file mode 100644 index de2b26ca40a..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_386.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build openbsd && 386 -// +build openbsd,386 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs mem/types_openbsd.go - -package mem - -const ( - CTLVfs = 10 - VfsGeneric = 0 - VfsBcacheStat = 3 -) - -const ( - sizeOfBcachestats = 0x90 -) - -type Bcachestats struct { - Numbufs int64 - Numbufpages int64 - Numdirtypages int64 - Numcleanpages int64 - Pendingwrites int64 - Pendingreads int64 - Numwrites int64 - Numreads int64 - Cachehits int64 - Busymapped int64 - Dmapages int64 - Highpages int64 - Delwribufs int64 - Kvaslots int64 - Avail int64 - Highflips int64 - Highflops int64 - Dmaflips int64 -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_amd64.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_amd64.go deleted file mode 100644 index d187abf01fa..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_amd64.go +++ /dev/null @@ -1,32 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_openbsd.go - -package mem - -const ( - CTLVfs = 10 - VfsGeneric = 0 - VfsBcacheStat = 3 -) - -const ( - sizeOfBcachestats = 0x78 -) - -type Bcachestats struct { - Numbufs int64 - Numbufpages int64 - Numdirtypages int64 - Numcleanpages int64 - Pendingwrites int64 - Pendingreads int64 - Numwrites int64 - Numreads int64 - Cachehits int64 - Busymapped int64 - Dmapages int64 - Highpages int64 - Delwribufs int64 - Kvaslots int64 - Avail int64 -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_arm.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_arm.go deleted file mode 100644 index 2488f18517c..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_arm.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build openbsd && arm -// +build openbsd,arm - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs mem/types_openbsd.go - -package mem - -const ( - CTLVfs = 10 - VfsGeneric = 0 - VfsBcacheStat = 3 -) - -const ( - sizeOfBcachestats = 0x90 -) - -type Bcachestats struct { - Numbufs int64 - Numbufpages int64 - Numdirtypages int64 - Numcleanpages int64 - Pendingwrites int64 - Pendingreads int64 - Numwrites int64 - Numreads int64 - Cachehits int64 - Busymapped int64 - Dmapages int64 - Highpages int64 - Delwribufs int64 - Kvaslots int64 - Avail int64 - Highflips int64 - Highflops int64 - Dmaflips int64 -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_arm64.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_arm64.go deleted file mode 100644 index 3661b16fb1b..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_openbsd_arm64.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build openbsd && arm64 -// +build openbsd,arm64 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs mem/types_openbsd.go - -package mem - -const ( - CTLVfs = 10 - VfsGeneric = 0 - VfsBcacheStat = 3 -) - -const ( - sizeOfBcachestats = 0x90 -) - -type Bcachestats struct { - Numbufs int64 - Numbufpages int64 - Numdirtypages int64 - Numcleanpages int64 - Pendingwrites int64 - Pendingreads int64 - Numwrites int64 - Numreads int64 - Cachehits int64 - Busymapped int64 - Dmapages int64 - Highpages int64 - Delwribufs int64 - Kvaslots int64 - Avail int64 - Highflips int64 - Highflops int64 - Dmaflips int64 -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_plan9.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_plan9.go deleted file mode 100644 index b5259f8446e..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_plan9.go +++ /dev/null @@ -1,68 +0,0 @@ -//go:build plan9 -// +build plan9 - -package mem - -import ( - "context" - "os" - - stats "github.com/lufia/plan9stats" - "github.com/shirou/gopsutil/v3/internal/common" -) - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - root := os.Getenv("HOST_ROOT") - m, err := stats.ReadMemStats(ctx, stats.WithRootDir(root)) - if err != nil { - return nil, err - } - u := 0.0 - if m.SwapPages.Avail != 0 { - u = float64(m.SwapPages.Used) / float64(m.SwapPages.Avail) * 100.0 - } - return &SwapMemoryStat{ - Total: uint64(m.SwapPages.Avail * m.PageSize), - Used: uint64(m.SwapPages.Used * m.PageSize), - Free: uint64(m.SwapPages.Free() * m.PageSize), - UsedPercent: u, - }, nil -} - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - root := os.Getenv("HOST_ROOT") - m, err := stats.ReadMemStats(ctx, stats.WithRootDir(root)) - if err != nil { - return nil, err - } - u := 0.0 - if m.UserPages.Avail != 0 { - u = float64(m.UserPages.Used) / float64(m.UserPages.Avail) * 100.0 - } - return &VirtualMemoryStat{ - Total: uint64(m.Total), - Available: uint64(m.UserPages.Free() * m.PageSize), - Used: uint64(m.UserPages.Used * m.PageSize), - UsedPercent: u, - Free: uint64(m.UserPages.Free() * m.PageSize), - - SwapTotal: uint64(m.SwapPages.Avail * m.PageSize), - SwapFree: uint64(m.SwapPages.Free() * m.PageSize), - }, nil -} - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { - return nil, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_solaris.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_solaris.go deleted file mode 100644 index c911267e1ef..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_solaris.go +++ /dev/null @@ -1,213 +0,0 @@ -//go:build solaris -// +build solaris - -package mem - -import ( - "context" - "errors" - "fmt" - "regexp" - "strconv" - "strings" - - "github.com/shirou/gopsutil/v3/internal/common" - "github.com/tklauser/go-sysconf" -) - -// VirtualMemory for Solaris is a minimal implementation which only returns -// what Nomad needs. It does take into account global vs zone, however. -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - result := &VirtualMemoryStat{} - - zoneName, err := zoneName() - if err != nil { - return nil, err - } - - if zoneName == "global" { - cap, err := globalZoneMemoryCapacity() - if err != nil { - return nil, err - } - result.Total = cap - freemem, err := globalZoneFreeMemory(ctx) - if err != nil { - return nil, err - } - result.Available = freemem - result.Free = freemem - result.Used = result.Total - result.Free - } else { - cap, err := nonGlobalZoneMemoryCapacity() - if err != nil { - return nil, err - } - result.Total = cap - } - - return result, nil -} - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - return nil, common.ErrNotImplementedError -} - -func zoneName() (string, error) { - ctx := context.Background() - out, err := invoke.CommandWithContext(ctx, "zonename") - if err != nil { - return "", err - } - - return strings.TrimSpace(string(out)), nil -} - -var globalZoneMemoryCapacityMatch = regexp.MustCompile(`[Mm]emory size: (\d+) Megabytes`) - -func globalZoneMemoryCapacity() (uint64, error) { - ctx := context.Background() - out, err := invoke.CommandWithContext(ctx, "prtconf") - if err != nil { - return 0, err - } - - match := globalZoneMemoryCapacityMatch.FindAllStringSubmatch(string(out), -1) - if len(match) != 1 { - return 0, errors.New("memory size not contained in output of prtconf") - } - - totalMB, err := strconv.ParseUint(match[0][1], 10, 64) - if err != nil { - return 0, err - } - - return totalMB * 1024 * 1024, nil -} - -func globalZoneFreeMemory(ctx context.Context) (uint64, error) { - output, err := invoke.CommandWithContext(ctx, "pagesize") - if err != nil { - return 0, err - } - - pagesize, err := strconv.ParseUint(strings.TrimSpace(string(output)), 10, 64) - if err != nil { - return 0, err - } - - free, err := sysconf.Sysconf(sysconf.SC_AVPHYS_PAGES) - if err != nil { - return 0, err - } - - return uint64(free) * pagesize, nil -} - -var kstatMatch = regexp.MustCompile(`(\S+)\s+(\S*)`) - -func nonGlobalZoneMemoryCapacity() (uint64, error) { - ctx := context.Background() - out, err := invoke.CommandWithContext(ctx, "kstat", "-p", "-c", "zone_memory_cap", "memory_cap:*:*:physcap") - if err != nil { - return 0, err - } - - kstats := kstatMatch.FindAllStringSubmatch(string(out), -1) - if len(kstats) != 1 { - return 0, fmt.Errorf("expected 1 kstat, found %d", len(kstats)) - } - - memSizeBytes, err := strconv.ParseUint(kstats[0][2], 10, 64) - if err != nil { - return 0, err - } - - return memSizeBytes, nil -} - -const swapCommand = "swap" - -// The blockSize as reported by `swap -l`. See https://docs.oracle.com/cd/E23824_01/html/821-1459/fsswap-52195.html -const blockSize = 512 - -// swapctl column indexes -const ( - nameCol = 0 - // devCol = 1 - // swaploCol = 2 - totalBlocksCol = 3 - freeBlocksCol = 4 -) - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { - output, err := invoke.CommandWithContext(ctx, swapCommand, "-l") - if err != nil { - return nil, fmt.Errorf("could not execute %q: %w", swapCommand, err) - } - - return parseSwapsCommandOutput(string(output)) -} - -func parseSwapsCommandOutput(output string) ([]*SwapDevice, error) { - lines := strings.Split(output, "\n") - if len(lines) == 0 { - return nil, fmt.Errorf("could not parse output of %q: no lines in %q", swapCommand, output) - } - - // Check header headerFields are as expected. - headerFields := strings.Fields(lines[0]) - if len(headerFields) < freeBlocksCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields in header %q", swapCommand, lines[0]) - } - if headerFields[nameCol] != "swapfile" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[nameCol], "swapfile") - } - if headerFields[totalBlocksCol] != "blocks" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[totalBlocksCol], "blocks") - } - if headerFields[freeBlocksCol] != "free" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[freeBlocksCol], "free") - } - - var swapDevices []*SwapDevice - for _, line := range lines[1:] { - if line == "" { - continue // the terminal line is typically empty - } - fields := strings.Fields(line) - if len(fields) < freeBlocksCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields", swapCommand) - } - - totalBlocks, err := strconv.ParseUint(fields[totalBlocksCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Size' column in %q: %w", swapCommand, err) - } - - freeBlocks, err := strconv.ParseUint(fields[freeBlocksCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Used' column in %q: %w", swapCommand, err) - } - - swapDevices = append(swapDevices, &SwapDevice{ - Name: fields[nameCol], - UsedBytes: (totalBlocks - freeBlocks) * blockSize, - FreeBytes: freeBlocks * blockSize, - }) - } - - return swapDevices, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v3/mem/mem_windows.go b/vendor/github.com/shirou/gopsutil/v3/mem/mem_windows.go deleted file mode 100644 index 8c7fb1a1353..00000000000 --- a/vendor/github.com/shirou/gopsutil/v3/mem/mem_windows.go +++ /dev/null @@ -1,166 +0,0 @@ -//go:build windows -// +build windows - -package mem - -import ( - "context" - "sync" - "syscall" - "unsafe" - - "github.com/shirou/gopsutil/v3/internal/common" - "golang.org/x/sys/windows" -) - -var ( - procEnumPageFilesW = common.ModPsapi.NewProc("EnumPageFilesW") - procGetNativeSystemInfo = common.Modkernel32.NewProc("GetNativeSystemInfo") - procGetPerformanceInfo = common.ModPsapi.NewProc("GetPerformanceInfo") - procGlobalMemoryStatusEx = common.Modkernel32.NewProc("GlobalMemoryStatusEx") -) - -type memoryStatusEx struct { - cbSize uint32 - dwMemoryLoad uint32 - ullTotalPhys uint64 // in bytes - ullAvailPhys uint64 - ullTotalPageFile uint64 - ullAvailPageFile uint64 - ullTotalVirtual uint64 - ullAvailVirtual uint64 - ullAvailExtendedVirtual uint64 -} - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - var memInfo memoryStatusEx - memInfo.cbSize = uint32(unsafe.Sizeof(memInfo)) - mem, _, _ := procGlobalMemoryStatusEx.Call(uintptr(unsafe.Pointer(&memInfo))) - if mem == 0 { - return nil, windows.GetLastError() - } - - ret := &VirtualMemoryStat{ - Total: memInfo.ullTotalPhys, - Available: memInfo.ullAvailPhys, - Free: memInfo.ullAvailPhys, - UsedPercent: float64(memInfo.dwMemoryLoad), - } - - ret.Used = ret.Total - ret.Available - return ret, nil -} - -type performanceInformation struct { - cb uint32 - commitTotal uint64 - commitLimit uint64 - commitPeak uint64 - physicalTotal uint64 - physicalAvailable uint64 - systemCache uint64 - kernelTotal uint64 - kernelPaged uint64 - kernelNonpaged uint64 - pageSize uint64 - handleCount uint32 - processCount uint32 - threadCount uint32 -} - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - var perfInfo performanceInformation - perfInfo.cb = uint32(unsafe.Sizeof(perfInfo)) - mem, _, _ := procGetPerformanceInfo.Call(uintptr(unsafe.Pointer(&perfInfo)), uintptr(perfInfo.cb)) - if mem == 0 { - return nil, windows.GetLastError() - } - tot := perfInfo.commitLimit * perfInfo.pageSize - used := perfInfo.commitTotal * perfInfo.pageSize - free := tot - used - var usedPercent float64 - if tot == 0 { - usedPercent = 0 - } else { - usedPercent = float64(used) / float64(tot) * 100 - } - ret := &SwapMemoryStat{ - Total: tot, - Used: used, - Free: free, - UsedPercent: usedPercent, - } - - return ret, nil -} - -var ( - pageSize uint64 - pageSizeOnce sync.Once -) - -type systemInfo struct { - wProcessorArchitecture uint16 - wReserved uint16 - dwPageSize uint32 - lpMinimumApplicationAddress uintptr - lpMaximumApplicationAddress uintptr - dwActiveProcessorMask uintptr - dwNumberOfProcessors uint32 - dwProcessorType uint32 - dwAllocationGranularity uint32 - wProcessorLevel uint16 - wProcessorRevision uint16 -} - -// system type as defined in https://docs.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-enum_page_file_information -type enumPageFileInformation struct { - cb uint32 - reserved uint32 - totalSize uint64 - totalInUse uint64 - peakUsage uint64 -} - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { - pageSizeOnce.Do(func() { - var sysInfo systemInfo - procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&sysInfo))) - pageSize = uint64(sysInfo.dwPageSize) - }) - - // the following system call invokes the supplied callback function once for each page file before returning - // see https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumpagefilesw - var swapDevices []*SwapDevice - result, _, _ := procEnumPageFilesW.Call(windows.NewCallback(pEnumPageFileCallbackW), uintptr(unsafe.Pointer(&swapDevices))) - if result == 0 { - return nil, windows.GetLastError() - } - - return swapDevices, nil -} - -// system callback as defined in https://docs.microsoft.com/en-us/windows/win32/api/psapi/nc-psapi-penum_page_file_callbackw -func pEnumPageFileCallbackW(swapDevices *[]*SwapDevice, enumPageFileInfo *enumPageFileInformation, lpFilenamePtr *[syscall.MAX_LONG_PATH]uint16) *bool { - *swapDevices = append(*swapDevices, &SwapDevice{ - Name: syscall.UTF16ToString((*lpFilenamePtr)[:]), - UsedBytes: enumPageFileInfo.totalInUse * pageSize, - FreeBytes: (enumPageFileInfo.totalSize - enumPageFileInfo.totalInUse) * pageSize, - }) - - // return true to continue enumerating page files - ret := true - return &ret -} diff --git a/vendor/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go index 24a5036e95b..7c058de3744 100644 --- a/vendor/github.com/spf13/pflag/flag.go +++ b/vendor/github.com/spf13/pflag/flag.go @@ -160,7 +160,7 @@ type FlagSet struct { args []string // arguments after flags argsLenAtDash int // len(args) when a '--' was located when parsing, or -1 if no -- errorHandling ErrorHandling - output io.Writer // nil means stderr; use out() accessor + output io.Writer // nil means stderr; use Output() accessor interspersed bool // allow interspersed option/non-option args normalizeNameFunc func(f *FlagSet, name string) NormalizedName @@ -255,13 +255,20 @@ func (f *FlagSet) normalizeFlagName(name string) NormalizedName { return n(f, name) } -func (f *FlagSet) out() io.Writer { +// Output returns the destination for usage and error messages. os.Stderr is returned if +// output was not set or was set to nil. +func (f *FlagSet) Output() io.Writer { if f.output == nil { return os.Stderr } return f.output } +// Name returns the name of the flag set. +func (f *FlagSet) Name() string { + return f.name +} + // SetOutput sets the destination for usage and error messages. // If output is nil, os.Stderr is used. func (f *FlagSet) SetOutput(output io.Writer) { @@ -358,7 +365,7 @@ func (f *FlagSet) ShorthandLookup(name string) *Flag { } if len(name) > 1 { msg := fmt.Sprintf("can not look up shorthand which is more than one ASCII character: %q", name) - fmt.Fprintf(f.out(), msg) + fmt.Fprintf(f.Output(), msg) panic(msg) } c := name[0] @@ -482,7 +489,7 @@ func (f *FlagSet) Set(name, value string) error { } if flag.Deprecated != "" { - fmt.Fprintf(f.out(), "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) + fmt.Fprintf(f.Output(), "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) } return nil } @@ -523,7 +530,7 @@ func Set(name, value string) error { // otherwise, the default values of all defined flags in the set. func (f *FlagSet) PrintDefaults() { usages := f.FlagUsages() - fmt.Fprint(f.out(), usages) + fmt.Fprint(f.Output(), usages) } // defaultIsZeroValue returns true if the default value for this flag represents @@ -758,7 +765,7 @@ func PrintDefaults() { // defaultUsage is the default function to print a usage message. func defaultUsage(f *FlagSet) { - fmt.Fprintf(f.out(), "Usage of %s:\n", f.name) + fmt.Fprintf(f.Output(), "Usage of %s:\n", f.name) f.PrintDefaults() } @@ -844,7 +851,7 @@ func (f *FlagSet) AddFlag(flag *Flag) { _, alreadyThere := f.formal[normalizedFlagName] if alreadyThere { msg := fmt.Sprintf("%s flag redefined: %s", f.name, flag.Name) - fmt.Fprintln(f.out(), msg) + fmt.Fprintln(f.Output(), msg) panic(msg) // Happens only if flags are declared with identical names } if f.formal == nil { @@ -860,7 +867,7 @@ func (f *FlagSet) AddFlag(flag *Flag) { } if len(flag.Shorthand) > 1 { msg := fmt.Sprintf("%q shorthand is more than one ASCII character", flag.Shorthand) - fmt.Fprintf(f.out(), msg) + fmt.Fprintf(f.Output(), msg) panic(msg) } if f.shorthands == nil { @@ -870,7 +877,7 @@ func (f *FlagSet) AddFlag(flag *Flag) { used, alreadyThere := f.shorthands[c] if alreadyThere { msg := fmt.Sprintf("unable to redefine %q shorthand in %q flagset: it's already used for %q flag", c, f.name, used.Name) - fmt.Fprintf(f.out(), msg) + fmt.Fprintf(f.Output(), msg) panic(msg) } f.shorthands[c] = flag @@ -909,7 +916,7 @@ func VarP(value Value, name, shorthand, usage string) { func (f *FlagSet) failf(format string, a ...interface{}) error { err := fmt.Errorf(format, a...) if f.errorHandling != ContinueOnError { - fmt.Fprintln(f.out(), err) + fmt.Fprintln(f.Output(), err) f.usage() } return err @@ -1060,7 +1067,7 @@ func (f *FlagSet) parseSingleShortArg(shorthands string, args []string, fn parse } if flag.ShorthandDeprecated != "" { - fmt.Fprintf(f.out(), "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated) + fmt.Fprintf(f.Output(), "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated) } err = fn(flag, value) diff --git a/vendor/github.com/spf13/pflag/ip.go b/vendor/github.com/spf13/pflag/ip.go index 3d414ba69fe..06b8bcb5721 100644 --- a/vendor/github.com/spf13/pflag/ip.go +++ b/vendor/github.com/spf13/pflag/ip.go @@ -16,6 +16,9 @@ func newIPValue(val net.IP, p *net.IP) *ipValue { func (i *ipValue) String() string { return net.IP(*i).String() } func (i *ipValue) Set(s string) error { + if s == "" { + return nil + } ip := net.ParseIP(strings.TrimSpace(s)) if ip == nil { return fmt.Errorf("failed to parse IP: %q", s) diff --git a/vendor/github.com/spf13/pflag/ipnet_slice.go b/vendor/github.com/spf13/pflag/ipnet_slice.go new file mode 100644 index 00000000000..6b541aa8798 --- /dev/null +++ b/vendor/github.com/spf13/pflag/ipnet_slice.go @@ -0,0 +1,147 @@ +package pflag + +import ( + "fmt" + "io" + "net" + "strings" +) + +// -- ipNetSlice Value +type ipNetSliceValue struct { + value *[]net.IPNet + changed bool +} + +func newIPNetSliceValue(val []net.IPNet, p *[]net.IPNet) *ipNetSliceValue { + ipnsv := new(ipNetSliceValue) + ipnsv.value = p + *ipnsv.value = val + return ipnsv +} + +// Set converts, and assigns, the comma-separated IPNet argument string representation as the []net.IPNet value of this flag. +// If Set is called on a flag that already has a []net.IPNet assigned, the newly converted values will be appended. +func (s *ipNetSliceValue) Set(val string) error { + + // remove all quote characters + rmQuote := strings.NewReplacer(`"`, "", `'`, "", "`", "") + + // read flag arguments with CSV parser + ipNetStrSlice, err := readAsCSV(rmQuote.Replace(val)) + if err != nil && err != io.EOF { + return err + } + + // parse ip values into slice + out := make([]net.IPNet, 0, len(ipNetStrSlice)) + for _, ipNetStr := range ipNetStrSlice { + _, n, err := net.ParseCIDR(strings.TrimSpace(ipNetStr)) + if err != nil { + return fmt.Errorf("invalid string being converted to CIDR: %s", ipNetStr) + } + out = append(out, *n) + } + + if !s.changed { + *s.value = out + } else { + *s.value = append(*s.value, out...) + } + + s.changed = true + + return nil +} + +// Type returns a string that uniquely represents this flag's type. +func (s *ipNetSliceValue) Type() string { + return "ipNetSlice" +} + +// String defines a "native" format for this net.IPNet slice flag value. +func (s *ipNetSliceValue) String() string { + + ipNetStrSlice := make([]string, len(*s.value)) + for i, n := range *s.value { + ipNetStrSlice[i] = n.String() + } + + out, _ := writeAsCSV(ipNetStrSlice) + return "[" + out + "]" +} + +func ipNetSliceConv(val string) (interface{}, error) { + val = strings.Trim(val, "[]") + // Emtpy string would cause a slice with one (empty) entry + if len(val) == 0 { + return []net.IPNet{}, nil + } + ss := strings.Split(val, ",") + out := make([]net.IPNet, len(ss)) + for i, sval := range ss { + _, n, err := net.ParseCIDR(strings.TrimSpace(sval)) + if err != nil { + return nil, fmt.Errorf("invalid string being converted to CIDR: %s", sval) + } + out[i] = *n + } + return out, nil +} + +// GetIPNetSlice returns the []net.IPNet value of a flag with the given name +func (f *FlagSet) GetIPNetSlice(name string) ([]net.IPNet, error) { + val, err := f.getFlagType(name, "ipNetSlice", ipNetSliceConv) + if err != nil { + return []net.IPNet{}, err + } + return val.([]net.IPNet), nil +} + +// IPNetSliceVar defines a ipNetSlice flag with specified name, default value, and usage string. +// The argument p points to a []net.IPNet variable in which to store the value of the flag. +func (f *FlagSet) IPNetSliceVar(p *[]net.IPNet, name string, value []net.IPNet, usage string) { + f.VarP(newIPNetSliceValue(value, p), name, "", usage) +} + +// IPNetSliceVarP is like IPNetSliceVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IPNetSliceVarP(p *[]net.IPNet, name, shorthand string, value []net.IPNet, usage string) { + f.VarP(newIPNetSliceValue(value, p), name, shorthand, usage) +} + +// IPNetSliceVar defines a []net.IPNet flag with specified name, default value, and usage string. +// The argument p points to a []net.IPNet variable in which to store the value of the flag. +func IPNetSliceVar(p *[]net.IPNet, name string, value []net.IPNet, usage string) { + CommandLine.VarP(newIPNetSliceValue(value, p), name, "", usage) +} + +// IPNetSliceVarP is like IPNetSliceVar, but accepts a shorthand letter that can be used after a single dash. +func IPNetSliceVarP(p *[]net.IPNet, name, shorthand string, value []net.IPNet, usage string) { + CommandLine.VarP(newIPNetSliceValue(value, p), name, shorthand, usage) +} + +// IPNetSlice defines a []net.IPNet flag with specified name, default value, and usage string. +// The return value is the address of a []net.IPNet variable that stores the value of that flag. +func (f *FlagSet) IPNetSlice(name string, value []net.IPNet, usage string) *[]net.IPNet { + p := []net.IPNet{} + f.IPNetSliceVarP(&p, name, "", value, usage) + return &p +} + +// IPNetSliceP is like IPNetSlice, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IPNetSliceP(name, shorthand string, value []net.IPNet, usage string) *[]net.IPNet { + p := []net.IPNet{} + f.IPNetSliceVarP(&p, name, shorthand, value, usage) + return &p +} + +// IPNetSlice defines a []net.IPNet flag with specified name, default value, and usage string. +// The return value is the address of a []net.IP variable that stores the value of the flag. +func IPNetSlice(name string, value []net.IPNet, usage string) *[]net.IPNet { + return CommandLine.IPNetSliceP(name, "", value, usage) +} + +// IPNetSliceP is like IPNetSlice, but accepts a shorthand letter that can be used after a single dash. +func IPNetSliceP(name, shorthand string, value []net.IPNet, usage string) *[]net.IPNet { + return CommandLine.IPNetSliceP(name, shorthand, value, usage) +} diff --git a/vendor/github.com/spf13/pflag/string_array.go b/vendor/github.com/spf13/pflag/string_array.go index 4894af81802..d1ff0a96ba0 100644 --- a/vendor/github.com/spf13/pflag/string_array.go +++ b/vendor/github.com/spf13/pflag/string_array.go @@ -31,11 +31,7 @@ func (s *stringArrayValue) Append(val string) error { func (s *stringArrayValue) Replace(val []string) error { out := make([]string, len(val)) for i, d := range val { - var err error out[i] = d - if err != nil { - return err - } } *s.value = out return nil diff --git a/vendor/github.com/tklauser/go-sysconf/.cirrus.yml b/vendor/github.com/tklauser/go-sysconf/.cirrus.yml deleted file mode 100644 index 6be2c354834..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/.cirrus.yml +++ /dev/null @@ -1,23 +0,0 @@ -env: - CIRRUS_CLONE_DEPTH: 1 - GO_VERSION: go1.19.1 - -freebsd_12_task: - freebsd_instance: - image_family: freebsd-12-3 - install_script: | - pkg install -y go - GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest - bin/${GO_VERSION} download - build_script: bin/${GO_VERSION} build -v ./... - test_script: bin/${GO_VERSION} test -race ./... - -freebsd_13_task: - freebsd_instance: - image_family: freebsd-13-0 - install_script: | - pkg install -y go - GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest - bin/${GO_VERSION} download - build_script: bin/${GO_VERSION} build -v ./... - test_script: bin/${GO_VERSION} test -race ./... diff --git a/vendor/github.com/tklauser/go-sysconf/.gitignore b/vendor/github.com/tklauser/go-sysconf/.gitignore deleted file mode 100644 index e482715909b..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_obj/ diff --git a/vendor/github.com/tklauser/go-sysconf/LICENSE b/vendor/github.com/tklauser/go-sysconf/LICENSE deleted file mode 100644 index 73c6b8991eb..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2018-2022, Tobias Klauser -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 the copyright holder 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 HOLDER 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/tklauser/go-sysconf/README.md b/vendor/github.com/tklauser/go-sysconf/README.md deleted file mode 100644 index b83d5abf1d5..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# go-sysconf - -[![Go Reference](https://pkg.go.dev/badge/github.com/tklauser/go-sysconf.svg)](https://pkg.go.dev/github.com/tklauser/go-sysconf) -[![GitHub Action Status](https://github.com/tklauser/go-sysconf/workflows/Tests/badge.svg)](https://github.com/tklauser/go-sysconf/actions?query=workflow%3ATests) - -`sysconf` for Go, without using cgo or external binaries (e.g. getconf). - -Supported operating systems: Linux, macOS, DragonflyBSD, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos. - -All POSIX.1 and POSIX.2 variables are supported, see [References](#references) for a complete list. - -Additionally, the following non-standard variables are supported on some operating systems: - -| Variable | Supported on | -|---|---| -| `SC_PHYS_PAGES` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos | -| `SC_AVPHYS_PAGES` | Linux, OpenBSD, Solaris/Illumos | -| `SC_NPROCESSORS_CONF` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos | -| `SC_NPROCESSORS_ONLN` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos | -| `SC_UIO_MAXIOV` | Linux | - -## Usage - -```Go -package main - -import ( - "fmt" - - "github.com/tklauser/go-sysconf" -) - -func main() { - // get clock ticks, this will return the same as C.sysconf(C._SC_CLK_TCK) - clktck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK) - if err == nil { - fmt.Printf("SC_CLK_TCK: %v\n", clktck) - } -} -``` - -## References - -* [POSIX documenation for `sysconf`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/sysconf.html) -* [Linux manpage for `sysconf(3)`](http://man7.org/linux/man-pages/man3/sysconf.3.html) -* [glibc constants for `sysconf` parameters](https://www.gnu.org/software/libc/manual/html_node/Constants-for-Sysconf.html) diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf.go b/vendor/github.com/tklauser/go-sysconf/sysconf.go deleted file mode 100644 index 9d674930e5a..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package sysconf implements the sysconf(3) function and provides the -// associated SC_* constants to query system configuration values. -package sysconf - -import "errors" - -//go:generate go run mksysconf.go - -var errInvalid = errors.New("invalid parameter value") - -// Sysconf returns the value of a sysconf(3) runtime system parameter. -// The name parameter should be a SC_* constant define in this package. The -// implementation is GOOS-specific and certain SC_* constants might not be -// defined for all GOOSes. -func Sysconf(name int) (int64, error) { - return sysconf(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go b/vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go deleted file mode 100644 index 7c96157bb79..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build darwin || dragonfly || freebsd || netbsd || openbsd -// +build darwin dragonfly freebsd netbsd openbsd - -package sysconf - -import "golang.org/x/sys/unix" - -func pathconf(path string, name int) int64 { - if val, err := unix.Pathconf(path, name); err == nil { - return int64(val) - } - return -1 -} - -func sysctl32(name string) int64 { - if val, err := unix.SysctlUint32(name); err == nil { - return int64(val) - } - return -1 -} - -func sysctl64(name string) int64 { - if val, err := unix.SysctlUint64(name); err == nil { - return int64(val) - } - return -1 -} - -func yesno(val int64) int64 { - if val == 0 { - return -1 - } - return val -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go b/vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go deleted file mode 100644 index 4a5197b2fcb..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import ( - "golang.org/x/sys/unix" -) - -const ( - _HOST_NAME_MAX = _MAXHOSTNAMELEN - 1 - _LOGIN_NAME_MAX = _MAXLOGNAME - _SYMLOOP_MAX = _MAXSYMLINKS -) - -// sysconf implements sysconf(3) as in the Darwin libc, version 1244.30.3 -// (derived from the FreeBSD libc). -func sysconf(name int) (int64, error) { - switch name { - case SC_AIO_LISTIO_MAX: - fallthrough - case SC_AIO_MAX: - return sysctl32("kern.aiomax"), nil - case SC_AIO_PRIO_DELTA_MAX: - return -1, nil - case SC_ARG_MAX: - return sysctl32("kern.argmax"), nil - case SC_ATEXIT_MAX: - return _INT_MAX, nil - case SC_CHILD_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return int64(rlim.Cur), nil - } - } - return -1, nil - case SC_CLK_TCK: - return _CLK_TCK, nil - case SC_DELAYTIMER_MAX: - return -1, nil - case SC_GETGR_R_SIZE_MAX: - return 4096, nil - case SC_GETPW_R_SIZE_MAX: - return 4096, nil - case SC_IOV_MAX: - return _IOV_MAX, nil - case SC_MQ_OPEN_MAX: - return -1, nil - case SC_MQ_PRIO_MAX: - return -1, nil - case SC_NGROUPS_MAX: - return sysctl32("kern.ngroups"), nil - case SC_OPEN_MAX, SC_STREAM_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return int64(rlim.Cur), nil - } - } - return -1, nil - case SC_RTSIG_MAX: - return -1, nil - case SC_SEM_NSEMS_MAX: - return sysctl32("kern.sysv.semmns"), nil - case SC_SEM_VALUE_MAX: - return _POSIX_SEM_VALUE_MAX, nil - case SC_SIGQUEUE_MAX: - return -1, nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _PTHREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _PTHREAD_KEYS_MAX, nil - case SC_THREAD_PRIO_INHERIT: - return _POSIX_THREAD_PRIO_INHERIT, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_STACK_MIN: - return _PTHREAD_STACK_MIN, nil - case SC_THREAD_THREADS_MAX: - return -1, nil - case SC_TIMER_MAX: - return -1, nil - case SC_TTY_NAME_MAX: - // should be _PATH_DEV instead of "/" - return pathconf("/", _PC_NAME_MAX), nil - case SC_TZNAME_MAX: - return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil - - case SC_IPV6: - if _POSIX_IPV6 == 0 { - fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0) - if err == nil && fd >= 0 { - unix.Close(fd) - return int64(200112), nil - } - return 0, nil - } - return _POSIX_IPV6, nil - case SC_MESSAGE_PASSING: - if _POSIX_MESSAGE_PASSING == 0 { - return yesno(sysctl32("p1003_1b.message_passing")), nil - } - return _POSIX_MESSAGE_PASSING, nil - case SC_PRIORITIZED_IO: - if _POSIX_PRIORITIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.prioritized_io")), nil - } - return _POSIX_PRIORITIZED_IO, nil - case SC_PRIORITY_SCHEDULING: - if _POSIX_PRIORITY_SCHEDULING == 0 { - return yesno(sysctl32("p1003_1b.priority_scheduling")), nil - } - return _POSIX_PRIORITY_SCHEDULING, nil - case SC_REALTIME_SIGNALS: - if _POSIX_REALTIME_SIGNALS == 0 { - return yesno(sysctl32("p1003_1b.realtime_signals")), nil - } - return _POSIX_REALTIME_SIGNALS, nil - case SC_SAVED_IDS: - return yesno(sysctl32("kern.saved_ids")), nil - case SC_SEMAPHORES: - if _POSIX_SEMAPHORES == 0 { - return yesno(sysctl32("p1003_1b.semaphores")), nil - } - return _POSIX_SEMAPHORES, nil - case SC_SPAWN: - return _POSIX_SPAWN, nil - case SC_SPIN_LOCKS: - return _POSIX_SPIN_LOCKS, nil - case SC_SPORADIC_SERVER: - return _POSIX_SPORADIC_SERVER, nil - case SC_SS_REPL_MAX: - return _POSIX_SS_REPL_MAX, nil - case SC_SYNCHRONIZED_IO: - if _POSIX_SYNCHRONIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.synchronized_io")), nil - } - return _POSIX_SYNCHRONIZED_IO, nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_CPUTIME: - return _POSIX_THREAD_CPUTIME, nil - case SC_THREAD_PRIORITY_SCHEDULING: - return _POSIX_THREAD_PRIORITY_SCHEDULING, nil - case SC_THREAD_PROCESS_SHARED: - return _POSIX_THREAD_PROCESS_SHARED, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_THREAD_SPORADIC_SERVER: - return _POSIX_THREAD_SPORADIC_SERVER, nil - case SC_TIMERS: - if _POSIX_TIMERS == 0 { - return yesno(sysctl32("p1003_1b.timers")), nil - } - return _POSIX_TIMERS, nil - case SC_TRACE: - return _POSIX_TRACE, nil - case SC_TRACE_EVENT_FILTER: - return _POSIX_TRACE_EVENT_FILTER, nil - case SC_TRACE_EVENT_NAME_MAX: - return _POSIX_TRACE_EVENT_NAME_MAX, nil - case SC_TRACE_INHERIT: - return _POSIX_TRACE_INHERIT, nil - case SC_TRACE_LOG: - return _POSIX_TRACE_LOG, nil - case SC_TRACE_NAME_MAX: - return _POSIX_TRACE_NAME_MAX, nil - case SC_TRACE_SYS_MAX: - return _POSIX_TRACE_SYS_MAX, nil - case SC_TRACE_USER_EVENT_MAX: - return _POSIX_TRACE_USER_EVENT_MAX, nil - case SC_TYPED_MEMORY_OBJECTS: - return _POSIX_TYPED_MEMORY_OBJECTS, nil - case SC_VERSION: - // TODO(tk): darwin libc uses sysctl(CTL_KERN, KERN_POSIX1) - return _POSIX_VERSION, nil - - case SC_V6_ILP32_OFF32: - if _V6_ILP32_OFF32 == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofInt == unix.SizeofLong && - unix.SizeofLong == unix.SizeofPtr && - unix.SizeofPtr == sizeofOffT { - return 1, nil - } - return -1, nil - } - return _V6_ILP32_OFF32, nil - case SC_V6_ILP32_OFFBIG: - if _V6_ILP32_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofInt == unix.SizeofLong && - unix.SizeofLong == unix.SizeofPtr && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _V6_ILP32_OFFBIG, nil - case SC_V6_LP64_OFF64: - if _V6_LP64_OFF64 == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofLong*_CHAR_BIT == 64 && - unix.SizeofLong == unix.SizeofPtr && - unix.SizeofPtr == sizeofOffT { - return 1, nil - } - return -1, nil - } - return _V6_LP64_OFF64, nil - case SC_V6_LPBIG_OFFBIG: - if _V6_LPBIG_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT >= 32 && - unix.SizeofLong*_CHAR_BIT >= 64 && - unix.SizeofPtr*_CHAR_BIT >= 64 && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _V6_LPBIG_OFFBIG, nil - - case SC_2_CHAR_TERM: - return _POSIX2_CHAR_TERM, nil - case SC_2_PBS, - SC_2_PBS_ACCOUNTING, - SC_2_PBS_CHECKPOINT, - SC_2_PBS_LOCATE, - SC_2_PBS_MESSAGE, - SC_2_PBS_TRACK: - return _POSIX2_PBS, nil - case SC_2_UPE: - return _POSIX2_UPE, nil - - case SC_XOPEN_CRYPT: - return _XOPEN_CRYPT, nil - case SC_XOPEN_ENH_I18N: - return _XOPEN_ENH_I18N, nil - case SC_XOPEN_REALTIME: - return _XOPEN_REALTIME, nil - case SC_XOPEN_REALTIME_THREADS: - return _XOPEN_REALTIME_THREADS, nil - case SC_XOPEN_SHM: - return _XOPEN_SHM, nil - case SC_XOPEN_STREAMS: - return -1, nil - case SC_XOPEN_UNIX: - return _XOPEN_UNIX, nil - case SC_XOPEN_VERSION: - return _XOPEN_VERSION, nil - case SC_XOPEN_XCU_VERSION: - return _XOPEN_XCU_VERSION, nil - - case SC_PHYS_PAGES: - return sysctl64("hw.memsize") / int64(unix.Getpagesize()), nil - case SC_NPROCESSORS_CONF: - fallthrough - case SC_NPROCESSORS_ONLN: - return sysctl32("hw.ncpu"), nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_dragonfly.go b/vendor/github.com/tklauser/go-sysconf/sysconf_dragonfly.go deleted file mode 100644 index c2ed8d12b41..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_dragonfly.go +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import "golang.org/x/sys/unix" - -const ( - _HOST_NAME_MAX = _MAXHOSTNAMELEN - 1 - _LOGIN_NAME_MAX = _MAXLOGNAME - _SYMLOOP_MAX = _MAXSYMLINKS -) - -// sysconf implements sysconf(3) as in the FreeBSD 12 libc. -func sysconf(name int) (int64, error) { - switch name { - case SC_AIO_LISTIO_MAX: - return sysctl32("p1003_1b.aio_listio_max"), nil - case SC_AIO_MAX: - return sysctl32("p1003_1b.aio_max"), nil - case SC_AIO_PRIO_DELTA_MAX: - return sysctl32("p1003_1b.aio_prio_delta_max"), nil - case SC_ARG_MAX: - return sysctl32("kern.argmax"), nil - case SC_ATEXIT_MAX: - return _ATEXIT_SIZE, nil - case SC_CHILD_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return rlim.Cur, nil - } - } - return -1, nil - case SC_CLK_TCK: - return _CLK_TCK, nil - case SC_DELAYTIMER_MAX: - return yesno(sysctl32("p1003_1b.delaytimer_max")), nil - case SC_GETGR_R_SIZE_MAX, SC_GETPW_R_SIZE_MAX: - return -1, nil - case SC_IOV_MAX: - return sysctl32("kern.iov_max"), nil - case SC_MQ_OPEN_MAX: - return sysctl32("kern.mqueue.mq_open_max"), nil - case SC_MQ_PRIO_MAX: - return sysctl32("kern.mqueue.mq_prio_max"), nil - case SC_NGROUPS_MAX: - return sysctl32("kern.ngroups"), nil - case SC_OPEN_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return rlim.Cur, nil - } - } - return -1, nil - case SC_RTSIG_MAX: - return yesno(sysctl32("p1003_1b.rtsig_max")), nil - case SC_SEM_NSEMS_MAX: - return -1, nil - case SC_SEM_VALUE_MAX: - return -1, nil - case SC_SIGQUEUE_MAX: - return yesno(sysctl32("p1003_1b.sigqueue_max")), nil - case SC_STREAM_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return rlim.Cur, nil - } - } - return -1, nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _PTHREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _PTHREAD_KEYS_MAX, nil - case SC_THREAD_PRIO_INHERIT: - return _POSIX_THREAD_PRIO_INHERIT, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_STACK_MIN: - return _PTHREAD_STACK_MIN, nil - case SC_THREAD_THREADS_MAX: - return -1, nil - case SC_TIMER_MAX: - return yesno(sysctl32("p1003_1b.timer_max")), nil - case SC_TTY_NAME_MAX: - return pathconf(_PATH_DEV, _PC_NAME_MAX), nil - case SC_TZNAME_MAX: - return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil - - case SC_ASYNCHRONOUS_IO: - if _POSIX_ASYNCHRONOUS_IO == 0 { - return sysctl64("p1003_1b.asynchronous_io"), nil - } - return _POSIX_ASYNCHRONOUS_IO, nil - case SC_IPV6: - if _POSIX_IPV6 == 0 { - fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0) - if err == nil && fd >= 0 { - unix.Close(fd) - return int64(200112), nil - } - return 0, nil - } - return _POSIX_IPV6, nil - case SC_MESSAGE_PASSING: - if _POSIX_MESSAGE_PASSING == 0 { - return yesno(sysctl32("p1003_1b.message_passing")), nil - } - return _POSIX_MESSAGE_PASSING, nil - case SC_PRIORITIZED_IO: - if _POSIX_PRIORITIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.prioritized_io")), nil - } - return _POSIX_PRIORITIZED_IO, nil - case SC_PRIORITY_SCHEDULING: - if _POSIX_PRIORITY_SCHEDULING == 0 { - return yesno(sysctl32("p1003_1b.priority_scheduling")), nil - } - return _POSIX_PRIORITY_SCHEDULING, nil - case SC_REALTIME_SIGNALS: - if _POSIX_REALTIME_SIGNALS == 0 { - return yesno(sysctl32("p1003_1b.realtime_signals")), nil - } - return _POSIX_REALTIME_SIGNALS, nil - case SC_SAVED_IDS: - return yesno(sysctl32("kern.saved_ids")), nil - case SC_SEMAPHORES: - if _POSIX_SEMAPHORES == 0 { - return yesno(sysctl32("p1003_1b.semaphores")), nil - } - return _POSIX_SEMAPHORES, nil - case SC_SPAWN: - return _POSIX_SPAWN, nil - case SC_SPIN_LOCKS: - return _POSIX_SPIN_LOCKS, nil - case SC_SPORADIC_SERVER: - return _POSIX_SPORADIC_SERVER, nil - case SC_SYNCHRONIZED_IO: - if _POSIX_SYNCHRONIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.synchronized_io")), nil - } - return _POSIX_SYNCHRONIZED_IO, nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_CPUTIME: - return _POSIX_THREAD_CPUTIME, nil - case SC_THREAD_PRIORITY_SCHEDULING: - return _POSIX_THREAD_PRIORITY_SCHEDULING, nil - case SC_THREAD_PROCESS_SHARED: - return _POSIX_THREAD_PROCESS_SHARED, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_THREAD_SPORADIC_SERVER: - return _POSIX_THREAD_SPORADIC_SERVER, nil - case SC_TIMERS: - if _POSIX_TIMERS == 0 { - return yesno(sysctl32("p1003_1b.timers")), nil - } - return _POSIX_TIMERS, nil - case SC_TRACE: - return _POSIX_TRACE, nil - case SC_TYPED_MEMORY_OBJECTS: - return _POSIX_TYPED_MEMORY_OBJECTS, nil - case SC_VERSION: - // TODO(tk): FreeBSD libc uses sysctl(CTL_KERN, KERN_POSIX1) - return _POSIX_VERSION, nil - - /* TODO(tk): these need GOARCH-dependent integer size checks - case SC_V6_ILP32_OFF32: - return _V6_ILP32_OFF32, nil - case SC_V6_ILP32_OFFBIG: - return _V6_ILP32_OFFBIG, nil - case SC_V6_LP64_OFF64: - return _V6_LP64_OFF64, nil - case SC_V6_LPBIG_OFFBIG: - return _V6_LPBIG_OFFBIG, nil - */ - - case SC_2_CHAR_TERM: - return _POSIX2_CHAR_TERM, nil - case SC_2_PBS, - SC_2_PBS_ACCOUNTING, - SC_2_PBS_CHECKPOINT, - SC_2_PBS_LOCATE, - SC_2_PBS_MESSAGE, - SC_2_PBS_TRACK: - return _POSIX2_PBS, nil - case SC_2_UPE: - return _POSIX2_UPE, nil - - case SC_XOPEN_CRYPT: - return _XOPEN_CRYPT, nil - case SC_XOPEN_ENH_I18N: - return _XOPEN_ENH_I18N, nil - case SC_XOPEN_REALTIME: - return _XOPEN_REALTIME, nil - case SC_XOPEN_REALTIME_THREADS: - return _XOPEN_REALTIME_THREADS, nil - case SC_XOPEN_SHM: - return _XOPEN_SHM, nil - case SC_XOPEN_STREAMS: - return -1, nil - case SC_XOPEN_UNIX: - return _XOPEN_UNIX, nil - - case SC_PHYS_PAGES: - return sysctl64("hw.availpages"), nil - case SC_NPROCESSORS_CONF: - fallthrough - case SC_NPROCESSORS_ONLN: - return sysctl32("hw.ncpu"), nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_freebsd.go b/vendor/github.com/tklauser/go-sysconf/sysconf_freebsd.go deleted file mode 100644 index b7939888aee..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_freebsd.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import "golang.org/x/sys/unix" - -const ( - _HOST_NAME_MAX = _MAXHOSTNAMELEN - 1 - _LOGIN_NAME_MAX = _MAXLOGNAME - _SYMLOOP_MAX = _MAXSYMLINKS -) - -// sysconf implements sysconf(3) as in the FreeBSD 12 libc. -func sysconf(name int) (int64, error) { - switch name { - case SC_AIO_LISTIO_MAX: - return sysctl32("p1003_1b.aio_listio_max"), nil - case SC_AIO_MAX: - return sysctl32("p1003_1b.aio_max"), nil - case SC_AIO_PRIO_DELTA_MAX: - return sysctl32("p1003_1b.aio_prio_delta_max"), nil - case SC_ARG_MAX: - return sysctl32("kern.argmax"), nil - case SC_ATEXIT_MAX: - return _ATEXIT_SIZE, nil - case SC_CHILD_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return rlim.Cur, nil - } - } - return -1, nil - case SC_CLK_TCK: - return _CLK_TCK, nil - case SC_DELAYTIMER_MAX: - return sysctl32("p1003_1b.delaytimer_max"), nil - case SC_GETGR_R_SIZE_MAX, SC_GETPW_R_SIZE_MAX: - return -1, nil - case SC_IOV_MAX: - return sysctl32("kern.iov_max"), nil - case SC_MQ_OPEN_MAX: - return yesno(sysctl32("p1003_1b.mq_open_max")), nil - case SC_MQ_PRIO_MAX: - return _MQ_PRIO_MAX, nil - case SC_NGROUPS_MAX: - return sysctl32("kern.ngroups"), nil - case SC_OPEN_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return rlim.Cur, nil - } - } - return -1, nil - case SC_RTSIG_MAX: - return sysctl32("p1003_1b.rtsig_max"), nil - case SC_SEM_NSEMS_MAX: - return -1, nil - case SC_SEM_VALUE_MAX: - return _SEM_VALUE_MAX, nil - case SC_SIGQUEUE_MAX: - return sysctl32("p1003_1b.sigqueue_max"), nil - case SC_STREAM_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err != nil { - return -1, nil - } - if rlim.Cur == unix.RLIM_INFINITY { - return -1, nil - } - if rlim.Cur > _LONG_MAX { - return -1, unix.EOVERFLOW - } - if rlim.Cur > _SHRT_MAX { - return _SHRT_MAX, nil - } - return rlim.Cur, nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _PTHREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _PTHREAD_KEYS_MAX, nil - case SC_THREAD_PRIO_INHERIT: - return _POSIX_THREAD_PRIO_INHERIT, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_STACK_MIN: - return _PTHREAD_STACK_MIN, nil - case SC_THREAD_THREADS_MAX: - return -1, nil - case SC_TIMER_MAX: - return yesno(sysctl32("p1003_1b.timer_max")), nil - case SC_TTY_NAME_MAX: - return pathconf(_PATH_DEV, _PC_NAME_MAX), nil - case SC_TZNAME_MAX: - return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil - - case SC_IPV6: - if _POSIX_IPV6 == 0 { - fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0) - if err == nil && fd >= 0 { - unix.Close(fd) - return int64(200112), nil - } - return 0, nil - } - return _POSIX_IPV6, nil - case SC_MESSAGE_PASSING: - if _POSIX_MESSAGE_PASSING == 0 { - return yesno(sysctl32("p1003_1b.message_passing")), nil - } - return _POSIX_MESSAGE_PASSING, nil - case SC_PRIORITIZED_IO: - if _POSIX_PRIORITIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.prioritized_io")), nil - } - return _POSIX_PRIORITIZED_IO, nil - case SC_PRIORITY_SCHEDULING: - if _POSIX_PRIORITY_SCHEDULING == 0 { - return yesno(sysctl32("p1003_1b.priority_scheduling")), nil - } - return _POSIX_PRIORITY_SCHEDULING, nil - case SC_REALTIME_SIGNALS: - if _POSIX_REALTIME_SIGNALS == 0 { - return yesno(sysctl32("p1003_1b.realtime_signals")), nil - } - return _POSIX_REALTIME_SIGNALS, nil - case SC_SAVED_IDS: - return yesno(sysctl32("kern.saved_ids")), nil - case SC_SEMAPHORES: - if _POSIX_SEMAPHORES == 0 { - return yesno(sysctl32("p1003_1b.semaphores")), nil - } - return _POSIX_SEMAPHORES, nil - case SC_SPAWN: - return _POSIX_SPAWN, nil - case SC_SPIN_LOCKS: - return _POSIX_SPIN_LOCKS, nil - case SC_SPORADIC_SERVER: - return _POSIX_SPORADIC_SERVER, nil - case SC_SYNCHRONIZED_IO: - if _POSIX_SYNCHRONIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.synchronized_io")), nil - } - return _POSIX_SYNCHRONIZED_IO, nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_CPUTIME: - return _POSIX_THREAD_CPUTIME, nil - case SC_THREAD_PRIORITY_SCHEDULING: - return _POSIX_THREAD_PRIORITY_SCHEDULING, nil - case SC_THREAD_PROCESS_SHARED: - return _POSIX_THREAD_PROCESS_SHARED, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_TIMERS: - if _POSIX_TIMERS == 0 { - return yesno(sysctl32("p1003_1b.timers")), nil - } - return _POSIX_TIMERS, nil - case SC_TRACE: - return _POSIX_TRACE, nil - case SC_TYPED_MEMORY_OBJECTS: - return _POSIX_TYPED_MEMORY_OBJECTS, nil - case SC_VERSION: - // TODO(tk): FreeBSD libc uses sysctl(CTL_KERN, KERN_POSIX1) - return _POSIX_VERSION, nil - - /* TODO(tk): these need GOARCH-dependent integer size checks - case SC_V6_ILP32_OFF32: - return _V6_ILP32_OFF32, nil - case SC_V6_ILP32_OFFBIG: - return _V6_ILP32_OFFBIG, nil - case SC_V6_LP64_OFF64: - return _V6_LP64_OFF64, nil - case SC_V6_LPBIG_OFFBIG: - return _V6_LPBIG_OFFBIG, nil - */ - - case SC_2_CHAR_TERM: - return _POSIX2_CHAR_TERM, nil - case SC_2_PBS, - SC_2_PBS_ACCOUNTING, - SC_2_PBS_CHECKPOINT, - SC_2_PBS_LOCATE, - SC_2_PBS_MESSAGE, - SC_2_PBS_TRACK: - return _POSIX2_PBS, nil - case SC_2_UPE: - return _POSIX2_UPE, nil - - case SC_XOPEN_CRYPT: - return _XOPEN_CRYPT, nil - case SC_XOPEN_ENH_I18N: - return _XOPEN_ENH_I18N, nil - case SC_XOPEN_REALTIME: - return _XOPEN_REALTIME, nil - case SC_XOPEN_REALTIME_THREADS: - return _XOPEN_REALTIME_THREADS, nil - case SC_XOPEN_SHM: - return _XOPEN_SHM, nil - case SC_XOPEN_STREAMS: - return -1, nil - case SC_XOPEN_UNIX: - return _XOPEN_UNIX, nil - - case SC_PHYS_PAGES: - if val, err := unix.SysctlUint64("hw.availpages"); err == nil { - return int64(val), nil - } - return -1, nil - case SC_NPROCESSORS_CONF: - fallthrough - case SC_NPROCESSORS_ONLN: - if val, err := unix.SysctlUint32("hw.ncpu"); err == nil { - return int64(val), nil - } - return -1, nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go b/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go deleted file mode 100644 index 248bdc99cda..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd -// +build darwin dragonfly freebsd linux netbsd openbsd - -package sysconf - -import "os" - -func sysconfGeneric(name int) (int64, error) { - // POSIX default values - if sc, err := sysconfPOSIX(name); err == nil { - return sc, nil - } - - switch name { - case SC_BC_BASE_MAX: - return _BC_BASE_MAX, nil - case SC_BC_DIM_MAX: - return _BC_DIM_MAX, nil - case SC_BC_SCALE_MAX: - return _BC_SCALE_MAX, nil - case SC_BC_STRING_MAX: - return _BC_STRING_MAX, nil - case SC_COLL_WEIGHTS_MAX: - return _COLL_WEIGHTS_MAX, nil - case SC_EXPR_NEST_MAX: - return _EXPR_NEST_MAX, nil - case SC_HOST_NAME_MAX: - return _HOST_NAME_MAX, nil - case SC_LINE_MAX: - return _LINE_MAX, nil - case SC_LOGIN_NAME_MAX: - return _LOGIN_NAME_MAX, nil - case SC_PAGESIZE: // same as SC_PAGE_SIZE - return int64(os.Getpagesize()), nil - case SC_RE_DUP_MAX: - return _RE_DUP_MAX, nil - case SC_SYMLOOP_MAX: - return _SYMLOOP_MAX, nil - } - - return -1, errInvalid -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_linux.go b/vendor/github.com/tklauser/go-sysconf/sysconf_linux.go deleted file mode 100644 index 5fb49ac7b6a..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_linux.go +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import ( - "bufio" - "io/ioutil" - "os" - "runtime" - "strconv" - "strings" - - "github.com/tklauser/numcpus" - "golang.org/x/sys/unix" -) - -const ( - // CLK_TCK is a constant on Linux for all architectures except alpha and ia64. - // See e.g. - // https://git.musl-libc.org/cgit/musl/tree/src/conf/sysconf.c#n30 - // https://github.com/containerd/cgroups/pull/12 - // https://lore.kernel.org/lkml/agtlq6$iht$1@penguin.transmeta.com/ - _SYSTEM_CLK_TCK = 100 -) - -func readProcFsInt64(path string, fallback int64) int64 { - data, err := ioutil.ReadFile(path) - if err != nil { - return fallback - } - i, err := strconv.ParseInt(string(data[:len(data)-1]), 0, 64) - if err != nil { - return fallback - } - return i -} - -// getMemPages computes mem*unit/os.Getpagesize(), but avoids overflowing int64. -func getMemPages(mem uint64, unit uint32) int64 { - pageSize := os.Getpagesize() - for unit > 1 && pageSize > 1 { - unit >>= 1 - pageSize >>= 1 - } - mem *= uint64(unit) - for pageSize > 1 { - pageSize >>= 1 - mem >>= 1 - } - return int64(mem) -} - -func getPhysPages() int64 { - var si unix.Sysinfo_t - err := unix.Sysinfo(&si) - if err != nil { - return int64(0) - } - return getMemPages(uint64(si.Totalram), si.Unit) -} - -func getAvPhysPages() int64 { - var si unix.Sysinfo_t - err := unix.Sysinfo(&si) - if err != nil { - return int64(0) - } - return getMemPages(uint64(si.Freeram), si.Unit) -} - -func getNprocsSysfs() (int64, error) { - n, err := numcpus.GetOnline() - return int64(n), err -} - -func getNprocsProcStat() (int64, error) { - f, err := os.Open("/proc/stat") - if err != nil { - return -1, err - } - defer f.Close() - - count := int64(0) - s := bufio.NewScanner(f) - for s.Scan() { - if line := strings.TrimSpace(s.Text()); strings.HasPrefix(line, "cpu") { - l := strings.SplitN(line, " ", 2) - _, err := strconv.ParseInt(l[0][3:], 10, 64) - if err == nil { - count++ - } - } else { - // The current format of /proc/stat has all the - // cpu* lines at the beginning. Assume this - // stays this way. - break - } - } - return count, nil -} - -func getNprocs() int64 { - count, err := getNprocsSysfs() - if err == nil { - return count - } - - count, err = getNprocsProcStat() - if err == nil { - return count - } - - // default to the value determined at runtime startup if all else fails - return int64(runtime.NumCPU()) -} - -func getNprocsConf() int64 { - count, err := numcpus.GetConfigured() - if err == nil { - return int64(count) - } - - // TODO(tk): fall back to reading /proc/cpuinfo on legacy systems - // without sysfs? - - return getNprocs() -} - -func hasClock(clockid int32) bool { - var res unix.Timespec - if err := unix.ClockGetres(clockid, &res); err != nil { - return false - } - return true -} - -func max(a, b int64) int64 { - if a > b { - return a - } - return b -} - -func sysconf(name int) (int64, error) { - switch name { - case SC_AIO_LISTIO_MAX: - return -1, nil - case SC_AIO_MAX: - return -1, nil - case SC_AIO_PRIO_DELTA_MAX: - return _AIO_PRIO_DELTA_MAX, nil - case SC_ARG_MAX: - argMax := int64(_POSIX_ARG_MAX) - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_STACK, &rlim); err == nil { - argMax = max(argMax, int64(rlim.Cur/4)) - } - return argMax, nil - case SC_ATEXIT_MAX: - return _INT_MAX, nil - case SC_CHILD_MAX: - childMax := int64(-1) - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil && rlim.Cur != unix.RLIM_INFINITY { - childMax = int64(rlim.Cur) - } - return childMax, nil - case SC_CLK_TCK: - return _SYSTEM_CLK_TCK, nil - case SC_DELAYTIMER_MAX: - return _DELAYTIMER_MAX, nil - case SC_GETGR_R_SIZE_MAX: - return _NSS_BUFLEN_GROUP, nil - case SC_GETPW_R_SIZE_MAX: - return _NSS_BUFLEN_PASSWD, nil - case SC_MQ_OPEN_MAX: - return -1, nil - case SC_MQ_PRIO_MAX: - return _MQ_PRIO_MAX, nil - case SC_NGROUPS_MAX: - return readProcFsInt64("/proc/sys/kernel/ngroups_max", _NGROUPS_MAX), nil - case SC_OPEN_MAX: - openMax := int64(_OPEN_MAX) - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - openMax = int64(rlim.Cur) - } - return openMax, nil - case SC_RTSIG_MAX: - return _RTSIG_MAX, nil - case SC_SEM_NSEMS_MAX: - return -1, nil - case SC_SEM_VALUE_MAX: - return _SEM_VALUE_MAX, nil - case SC_SIGQUEUE_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_SIGPENDING, &rlim); err == nil { - return int64(rlim.Cur), nil - } - return readProcFsInt64("/proc/sys/kernel/rtsig-max", _POSIX_SIGQUEUE_MAX), nil - case SC_STREAM_MAX: - return _STREAM_MAX, nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _POSIX_THREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _PTHREAD_KEYS_MAX, nil - case SC_THREAD_PRIO_INHERIT: - return _POSIX_THREAD_PRIO_INHERIT, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_STACK_MIN: - return _PTHREAD_STACK_MIN, nil - case SC_THREAD_THREADS_MAX: - return -1, nil - case SC_TIMER_MAX: - return -1, nil - case SC_TTY_NAME_MAX: - return _TTY_NAME_MAX, nil - case SC_TZNAME_MAX: - return -1, nil - - case SC_CPUTIME: - if hasClock(unix.CLOCK_PROCESS_CPUTIME_ID) { - return _POSIX_VERSION, nil - } - return -1, nil - case SC_MONOTONIC_CLOCK: - if hasClock(unix.CLOCK_MONOTONIC) { - return _POSIX_VERSION, nil - } - return -1, nil - case SC_SAVED_IDS: - return _POSIX_SAVED_IDS, nil - case SC_SPAWN: - return _POSIX_SPAWN, nil - case SC_SPIN_LOCKS: - return _POSIX_SPIN_LOCKS, nil - case SC_SPORADIC_SERVER: - return _POSIX_SPORADIC_SERVER, nil - case SC_SYNCHRONIZED_IO: - return _POSIX_SYNCHRONIZED_IO, nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_CPUTIME: - if hasClock(unix.CLOCK_THREAD_CPUTIME_ID) { - return _POSIX_VERSION, nil - } - return -1, nil - case SC_THREAD_PRIORITY_SCHEDULING: - return _POSIX_THREAD_PRIORITY_SCHEDULING, nil - case SC_THREAD_PROCESS_SHARED: - return _POSIX_THREAD_PROCESS_SHARED, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_THREAD_SPORADIC_SERVER: - return _POSIX_THREAD_SPORADIC_SERVER, nil - case SC_TRACE: - return _POSIX_TRACE, nil - case SC_TRACE_EVENT_FILTER: - return _POSIX_TRACE_EVENT_FILTER, nil - case SC_TRACE_EVENT_NAME_MAX: - return -1, nil - case SC_TRACE_INHERIT: - return _POSIX_TRACE_INHERIT, nil - case SC_TRACE_LOG: - return _POSIX_TRACE_LOG, nil - case SC_TRACE_NAME_MAX: - return -1, nil - case SC_TRACE_SYS_MAX: - return -1, nil - case SC_TRACE_USER_EVENT_MAX: - return -1, nil - case SC_TYPED_MEMORY_OBJECTS: - return _POSIX_TYPED_MEMORY_OBJECTS, nil - - case SC_V7_ILP32_OFF32: - return _POSIX_V7_ILP32_OFF32, nil - case SC_V7_ILP32_OFFBIG: - return _POSIX_V7_ILP32_OFFBIG, nil - case SC_V7_LP64_OFF64: - return _POSIX_V7_LP64_OFF64, nil - case SC_V7_LPBIG_OFFBIG: - return _POSIX_V7_LPBIG_OFFBIG, nil - - case SC_V6_ILP32_OFF32: - return _POSIX_V6_ILP32_OFF32, nil - case SC_V6_ILP32_OFFBIG: - return _POSIX_V6_ILP32_OFFBIG, nil - case SC_V6_LP64_OFF64: - return _POSIX_V6_LP64_OFF64, nil - case SC_V6_LPBIG_OFFBIG: - return _POSIX_V6_LPBIG_OFFBIG, nil - - case SC_2_C_VERSION: - return _POSIX2_C_VERSION, nil - case SC_2_CHAR_TERM: - return _POSIX2_CHAR_TERM, nil - case SC_2_PBS, - SC_2_PBS_ACCOUNTING, - SC_2_PBS_CHECKPOINT, - SC_2_PBS_LOCATE, - SC_2_PBS_MESSAGE, - SC_2_PBS_TRACK: - return -1, nil - case SC_2_UPE: - return -1, nil - - case SC_XOPEN_CRYPT: - // removed in glibc 2.28 - return -1, nil - case SC_XOPEN_ENH_I18N: - return _XOPEN_ENH_I18N, nil - case SC_XOPEN_REALTIME: - return _XOPEN_REALTIME, nil - case SC_XOPEN_REALTIME_THREADS: - return _XOPEN_REALTIME_THREADS, nil - case SC_XOPEN_SHM: - return _XOPEN_SHM, nil - case SC_XOPEN_STREAMS: - return -1, nil - case SC_XOPEN_UNIX: - return _XOPEN_UNIX, nil - case SC_XOPEN_VERSION: - return _XOPEN_VERSION, nil - case SC_XOPEN_XCU_VERSION: - return _XOPEN_XCU_VERSION, nil - - case SC_PHYS_PAGES: - return getPhysPages(), nil - case SC_AVPHYS_PAGES: - return getAvPhysPages(), nil - case SC_NPROCESSORS_CONF: - return getNprocsConf(), nil - case SC_NPROCESSORS_ONLN: - return getNprocs(), nil - case SC_UIO_MAXIOV: // same as _SC_IOV_MAX - return _UIO_MAXIOV, nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go b/vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go deleted file mode 100644 index 325d4a6a83f..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import ( - "sync" - - "golang.org/x/sys/unix" -) - -const ( - _HOST_NAME_MAX = _MAXHOSTNAMELEN - _LOGIN_NAME_MAX = _MAXLOGNAME + 1 - _SYMLOOP_MAX = _MAXSYMLINKS - - _POSIX2_C_BIND = 1 - _POSIX2_C_DEV = -1 - _POSIX2_CHAR_TERM = -1 - _POSIX2_FORT_DEV = -1 - _POSIX2_FORT_RUN = -1 - _POSIX2_LOCALEDEF = -1 - _POSIX2_SW_DEV = -1 - _POSIX2_UPE = -1 -) - -var ( - clktck int64 - clktckOnce sync.Once -) - -func sysconfPOSIX(name int) (int64, error) { - // NetBSD does not define all _POSIX_* values used in sysconf_posix.go - // The supported ones are handled in sysconf below. - return -1, errInvalid -} - -func sysconf(name int) (int64, error) { - // NetBSD uses sysctl to get some of these values. For the user.* namespace, - // calls get handled by user_sysctl in /usr/src/lib/libc/gen/sysctl.c - // Duplicate the relevant values here. - - switch name { - - // 1003.1 - case SC_ARG_MAX: - return sysctl32("kern.argmax"), nil - case SC_CHILD_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return int64(rlim.Cur), nil - } - } - return -1, nil - case SC_CLK_TCK: - clktckOnce.Do(func() { - clktck = -1 - if ci, err := unix.SysctlClockinfo("kern.clockrate"); err == nil { - clktck = int64(ci.Hz) - } - }) - return clktck, nil - case SC_NGROUPS_MAX: - return sysctl32("kern.ngroups"), nil - case SC_JOB_CONTROL: - return sysctl32("kern.job_control"), nil - case SC_OPEN_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - return int64(rlim.Cur), nil - } - return -1, nil - case SC_STREAM_MAX: - // sysctl("user.stream_max") - return _FOPEN_MAX, nil - case SC_TZNAME_MAX: - // sysctl("user.tzname_max") - return _NAME_MAX, nil - case SC_SAVED_IDS: - return yesno(sysctl32("kern.saved_ids")), nil - case SC_VERSION: - return sysctl32("kern.posix1version"), nil - - // 1003.1b - case SC_FSYNC: - return sysctl32("kern.fsync"), nil - case SC_SYNCHRONIZED_IO: - return sysctl32("kern.synchronized_io"), nil - case SC_MAPPED_FILES: - return sysctl32("kern.mapped_files"), nil - case SC_MEMLOCK: - return sysctl32("kern.memlock"), nil - case SC_MEMLOCK_RANGE: - return sysctl32("kern.memlock_range"), nil - case SC_MEMORY_PROTECTION: - return sysctl32("kern.memory_protection"), nil - case SC_MONOTONIC_CLOCK: - return sysctl32("kern.monotonic_clock"), nil - case SC_SEMAPHORES: - return sysctl32("kern.posix_semaphores"), nil - case SC_TIMERS: - return sysctl32("kern.posix_timers"), nil - - // 1003.1c - case SC_LOGIN_NAME_MAX: - return sysctl32("kern.login_name_max"), nil - case SC_THREADS: - return sysctl32("kern.posix_threads"), nil - - // 1003.1j - case SC_BARRIERS: - return yesno(sysctl32("kern.posix_barriers")), nil - case SC_SPIN_LOCKS: - return yesno(sysctl32("kern.posix_spin_locks")), nil - case SC_READER_WRITER_LOCKS: - return yesno(sysctl32("kern.posix_reader_writer_locks")), nil - - // 1003.2 - case SC_2_VERSION: - // sysctl user.posix2_version - return _POSIX2_VERSION, nil - case SC_2_C_BIND: - // sysctl user.posix2_c_bind - return _POSIX2_C_BIND, nil - case SC_2_C_DEV: - // sysctl user.posix2_c_dev - return _POSIX2_C_DEV, nil - case SC_2_CHAR_TERM: - // sysctl user.posix2_char_term - return _POSIX2_CHAR_TERM, nil - case SC_2_FORT_DEV: - // sysctl user.posix2_fort_dev - return _POSIX2_FORT_DEV, nil - case SC_2_FORT_RUN: - // sysctl user.posix2_fort_run - return _POSIX2_FORT_RUN, nil - case SC_2_LOCALEDEF: - // sysctl user.posix2_localedef - return _POSIX2_LOCALEDEF, nil - case SC_2_SW_DEV: - // sysctl user.posix2_sw_dev - return _POSIX2_SW_DEV, nil - case SC_2_UPE: - // sysctl user.posix2_upe - return _POSIX2_UPE, nil - - // XPG 4.2 - case SC_IOV_MAX: - return sysctl32("kern.iov_max"), nil - case SC_XOPEN_SHM: - return yesno(sysctl32("kern.ipc.sysvshm")), nil - - // 1003.1-2001, XSI Option Group - case SC_AIO_LISTIO_MAX: - return sysctl32("kern.aio_listio_max"), nil - case SC_AIO_MAX: - return sysctl32("kern.aio_max"), nil - case SC_ASYNCHRONOUS_IO: - return yesno(sysctl32("kern.posix_aio")), nil - case SC_MESSAGE_PASSING: - return yesno(sysctl32("kern.posix_msg")), nil - case SC_MQ_OPEN_MAX: - return sysctl32("kern.mqueue.mq_open_max"), nil - case SC_MQ_PRIO_MAX: - return sysctl32("kern.mqueue.mq_prio_max"), nil - case SC_PRIORITY_SCHEDULING: - return yesno(sysctl32("kern.posix_sched")), nil - case SC_ATEXIT_MAX: - // sysctl("user.atexit_max") - return -1, nil // TODO - - // 1003.1-2001, TSF - case SC_GETGR_R_SIZE_MAX: - return _GETGR_R_SIZE_MAX, nil - case SC_GETPW_R_SIZE_MAX: - return _GETPW_R_SIZE_MAX, nil - - // Unsorted - case SC_HOST_NAME_MAX: - return _MAXHOSTNAMELEN, nil - case SC_PASS_MAX: - return _PASSWORD_LEN, nil - case SC_REGEXP: - return _POSIX_REGEXP, nil - case SC_SHARED_MEMORY_OBJECTS: - return _POSIX_SHARED_MEMORY_OBJECTS, nil - case SC_SHELL: - return _POSIX_SHELL, nil - case SC_SPAWN: - return _POSIX_SPAWN, nil - - // Extensions - case SC_NPROCESSORS_CONF: - return sysctl32("hw.ncpu"), nil - case SC_NPROCESSORS_ONLN: - return sysctl32("hw.ncpuonline"), nil - - // Linux/Solaris - case SC_PHYS_PAGES: - return sysctl64("hw.physmem64") / int64(unix.Getpagesize()), nil - - // Native - case SC_SCHED_RT_TS: - return sysctl32("kern.sched.rtts"), nil - case SC_SCHED_PRI_MIN: - return sysctl32("kern.sched.pri_min"), nil - case SC_SCHED_PRI_MAX: - return sysctl32("kern.sched.pri_max"), nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _POSIX_THREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _POSIX_THREAD_KEYS_MAX, nil - case SC_THREAD_STACK_MIN: - return int64(unix.Getpagesize()), nil - case SC_THREAD_THREADS_MAX: - return sysctl32("kern.maxproc"), nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_PRIORITY_SCHEDULING, - SC_THREAD_PRIO_INHERIT, - SC_THREAD_PROCESS_SHARED: - return -1, nil - case SC_TTY_NAME_MAX: - return pathconf(_PATH_DEV, _PC_NAME_MAX), nil - case SC_TIMER_MAX: - return _POSIX_TIMER_MAX, nil - case SC_SEM_NSEMS_MAX: - return _LONG_MAX, nil - case SC_CPUTIME: - return _POSIX_CPUTIME, nil - case SC_THREAD_CPUTIME: - return _POSIX_THREAD_CPUTIME, nil - case SC_DELAYTIMER_MAX: - return _POSIX_DELAYTIMER_MAX, nil - case SC_SIGQUEUE_MAX: - return _POSIX_SIGQUEUE_MAX, nil - case SC_REALTIME_SIGNALS: - return 200112, nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_openbsd.go b/vendor/github.com/tklauser/go-sysconf/sysconf_openbsd.go deleted file mode 100644 index c0c394abe44..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_openbsd.go +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import "golang.org/x/sys/unix" - -// sysconf implements sysconf(3) as in the OpenBSD 6.3 libc. -func sysconf(name int) (int64, error) { - switch name { - case SC_AIO_LISTIO_MAX, - SC_AIO_MAX, - SC_AIO_PRIO_DELTA_MAX: - return -1, nil - case SC_ARG_MAX: - return sysctl32("kern.argmax"), nil - case SC_ATEXIT_MAX: - return -1, nil - case SC_CHILD_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return int64(rlim.Cur), nil - } - } - return -1, nil - case SC_CLK_TCK: - return _CLK_TCK, nil - case SC_DELAYTIMER_MAX: - return -1, nil - case SC_GETGR_R_SIZE_MAX: - return _GR_BUF_LEN, nil - case SC_GETPW_R_SIZE_MAX: - return _PW_BUF_LEN, nil - case SC_IOV_MAX: - return _IOV_MAX, nil - case SC_LOGIN_NAME_MAX: - return _LOGIN_NAME_MAX, nil - case SC_NGROUPS_MAX: - return sysctl32("kern.ngroups"), nil - case SC_OPEN_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return int64(rlim.Cur), nil - } - } - return -1, nil - case SC_SEM_NSEMS_MAX: - return -1, nil - case SC_SEM_VALUE_MAX: - return _SEM_VALUE_MAX, nil - case SC_SIGQUEUE_MAX: - return -1, nil - case SC_STREAM_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - if rlim.Cur > _SHRT_MAX { - return _SHRT_MAX, nil - } - return int64(rlim.Cur), nil - } - } - return -1, nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _PTHREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _PTHREAD_KEYS_MAX, nil - case SC_THREAD_STACK_MIN: - return _PTHREAD_STACK_MIN, nil - case SC_THREAD_THREADS_MAX: - return -1, nil - case SC_TIMER_MAX: - return -1, nil - case SC_TTY_NAME_MAX: - return _TTY_NAME_MAX, nil - case SC_TZNAME_MAX: - return _NAME_MAX, nil - - case SC_BARRIERS: - return _POSIX_BARRIERS, nil - case SC_FSYNC: - return _POSIX_FSYNC, nil - case SC_IPV6: - if _POSIX_IPV6 == 0 { - fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0) - if err == nil && fd >= 0 { - unix.Close(fd) - return int64(200112), nil - } - return 0, nil - } - return _POSIX_IPV6, nil - case SC_JOB_CONTROL: - return _POSIX_JOB_CONTROL, nil - case SC_MAPPED_FILES: - return _POSIX_MAPPED_FILES, nil - case SC_MONOTONIC_CLOCK: - return _POSIX_MONOTONIC_CLOCK, nil - case SC_SAVED_IDS: - return _POSIX_SAVED_IDS, nil - case SC_SEMAPHORES: - return _POSIX_SEMAPHORES, nil - case SC_SPAWN: - return _POSIX_SPAWN, nil - case SC_SPIN_LOCKS: - return _POSIX_SPIN_LOCKS, nil - case SC_SPORADIC_SERVER: - return _POSIX_SPORADIC_SERVER, nil - case SC_SYNCHRONIZED_IO: - return _POSIX_SYNCHRONIZED_IO, nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_CPUTIME: - return _POSIX_THREAD_CPUTIME, nil - case SC_THREAD_PRIO_INHERIT: - return _POSIX_THREAD_PRIO_INHERIT, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_PRIORITY_SCHEDULING: - return _POSIX_THREAD_PRIORITY_SCHEDULING, nil - case SC_THREAD_PROCESS_SHARED: - return _POSIX_THREAD_PROCESS_SHARED, nil - case SC_THREAD_ROBUST_PRIO_INHERIT: - return _POSIX_THREAD_ROBUST_PRIO_INHERIT, nil - case SC_THREAD_ROBUST_PRIO_PROTECT: - return _POSIX_THREAD_ROBUST_PRIO_PROTECT, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_THREAD_SPORADIC_SERVER: - return _POSIX_THREAD_SPORADIC_SERVER, nil - case SC_THREADS: - return _POSIX_THREADS, nil - case SC_TIMEOUTS: - return _POSIX_TIMEOUTS, nil - case SC_TIMERS: - return _POSIX_TIMERS, nil - case SC_TRACE, - SC_TRACE_EVENT_FILTER, - SC_TRACE_EVENT_NAME_MAX, - SC_TRACE_INHERIT, - SC_TRACE_LOG: - return _POSIX_TRACE, nil - case SC_TYPED_MEMORY_OBJECTS: - return _POSIX_TYPED_MEMORY_OBJECTS, nil - - case SC_V7_ILP32_OFF32: - return _POSIX_V7_ILP32_OFF32, nil - case SC_V7_ILP32_OFFBIG: - if _POSIX_V7_ILP32_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofLong*_CHAR_BIT == 32 && - unix.SizeofPtr*_CHAR_BIT == 32 && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V7_ILP32_OFFBIG, nil - case SC_V7_LP64_OFF64: - if _POSIX_V7_LP64_OFF64 == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofLong*_CHAR_BIT == 64 && - unix.SizeofPtr*_CHAR_BIT == 64 && - sizeofOffT*_CHAR_BIT == 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V7_LP64_OFF64, nil - case SC_V7_LPBIG_OFFBIG: - if _POSIX_V7_LPBIG_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT >= 32 && - unix.SizeofLong*_CHAR_BIT >= 64 && - unix.SizeofPtr*_CHAR_BIT >= 64 && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V7_LPBIG_OFFBIG, nil - - case SC_V6_ILP32_OFF32: - return _POSIX_V6_ILP32_OFF32, nil - case SC_V6_ILP32_OFFBIG: - if _POSIX_V6_ILP32_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofLong*_CHAR_BIT == 32 && - unix.SizeofPtr*_CHAR_BIT == 32 && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V6_ILP32_OFFBIG, nil - case SC_V6_LP64_OFF64: - if _POSIX_V6_LP64_OFF64 == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofLong*_CHAR_BIT == 64 && - unix.SizeofPtr*_CHAR_BIT == 64 && - sizeofOffT*_CHAR_BIT == 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V6_LP64_OFF64, nil - case SC_V6_LPBIG_OFFBIG: - if _POSIX_V6_LPBIG_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT >= 32 && - unix.SizeofLong*_CHAR_BIT >= 64 && - unix.SizeofPtr*_CHAR_BIT >= 64 && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V6_LPBIG_OFFBIG, nil - - case SC_2_CHAR_TERM: - return _POSIX2_CHAR_TERM, nil - case SC_2_PBS, - SC_2_PBS_ACCOUNTING, - SC_2_PBS_CHECKPOINT, - SC_2_PBS_LOCATE, - SC_2_PBS_MESSAGE, - SC_2_PBS_TRACK: - return _POSIX2_PBS, nil - case SC_2_UPE: - return _POSIX2_UPE, nil - case SC_2_VERSION: - return _POSIX2_VERSION, nil - - case SC_XOPEN_CRYPT: - return _XOPEN_CRYPT, nil - case SC_XOPEN_ENH_I18N: - return _XOPEN_ENH_I18N, nil - case SC_XOPEN_REALTIME: - return _XOPEN_REALTIME, nil - case SC_XOPEN_REALTIME_THREADS: - return _XOPEN_REALTIME_THREADS, nil - case SC_XOPEN_SHM: - return _XOPEN_SHM, nil - case SC_XOPEN_STREAMS: - return _XOPEN_STREAMS, nil - case SC_XOPEN_UNIX: - return _XOPEN_UNIX, nil - case SC_XOPEN_UUCP: - return _XOPEN_UUCP, nil - - case SC_AVPHYS_PAGES: - if uvm, err := unix.SysctlUvmexp("vm.uvmexp"); err == nil { - return int64(uvm.Free), nil - } - return -1, nil - case SC_PHYS_PAGES: - return sysctl64("hw.physmem") / int64(unix.Getpagesize()), nil - case SC_NPROCESSORS_CONF: - return sysctl32("hw.ncpu"), nil - case SC_NPROCESSORS_ONLN: - if val, err := unix.SysctlUint32("hw.ncpuonline"); err == nil { - return int64(val), nil - } - return sysctl32("hw.ncpu"), nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_posix.go b/vendor/github.com/tklauser/go-sysconf/sysconf_posix.go deleted file mode 100644 index e61c0bc73e4..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_posix.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build darwin || dragonfly || freebsd || linux || openbsd -// +build darwin dragonfly freebsd linux openbsd - -package sysconf - -func sysconfPOSIX(name int) (int64, error) { - switch name { - case SC_ADVISORY_INFO: - return _POSIX_ADVISORY_INFO, nil - case SC_ASYNCHRONOUS_IO: - return _POSIX_ASYNCHRONOUS_IO, nil - case SC_BARRIERS: - return _POSIX_BARRIERS, nil - case SC_CLOCK_SELECTION: - return _POSIX_CLOCK_SELECTION, nil - case SC_CPUTIME: - return _POSIX_CPUTIME, nil - case SC_FSYNC: - return _POSIX_FSYNC, nil - case SC_IPV6: - return _POSIX_IPV6, nil - case SC_JOB_CONTROL: - return _POSIX_JOB_CONTROL, nil - case SC_MAPPED_FILES: - return _POSIX_MAPPED_FILES, nil - case SC_MEMLOCK: - return _POSIX_MEMLOCK, nil - case SC_MEMLOCK_RANGE: - return _POSIX_MEMLOCK_RANGE, nil - case SC_MONOTONIC_CLOCK: - return _POSIX_MONOTONIC_CLOCK, nil - case SC_MEMORY_PROTECTION: - return _POSIX_MEMORY_PROTECTION, nil - case SC_MESSAGE_PASSING: - return _POSIX_MESSAGE_PASSING, nil - case SC_PRIORITIZED_IO: - return _POSIX_PRIORITIZED_IO, nil - case SC_PRIORITY_SCHEDULING: - return _POSIX_PRIORITY_SCHEDULING, nil - case SC_RAW_SOCKETS: - return _POSIX_RAW_SOCKETS, nil - case SC_READER_WRITER_LOCKS: - return _POSIX_READER_WRITER_LOCKS, nil - case SC_REALTIME_SIGNALS: - return _POSIX_REALTIME_SIGNALS, nil - case SC_REGEXP: - return _POSIX_REGEXP, nil - case SC_SEMAPHORES: - return _POSIX_SEMAPHORES, nil - case SC_SHARED_MEMORY_OBJECTS: - return _POSIX_SHARED_MEMORY_OBJECTS, nil - case SC_SHELL: - return _POSIX_SHELL, nil - case SC_THREADS: - return _POSIX_THREADS, nil - case SC_TIMEOUTS: - return _POSIX_TIMEOUTS, nil - case SC_TIMERS: - return _POSIX_TIMERS, nil - case SC_VERSION: - return _POSIX_VERSION, nil - - case SC_2_C_BIND: - return _POSIX2_C_BIND, nil - case SC_2_C_DEV: - return _POSIX2_C_DEV, nil - case SC_2_FORT_DEV: - return -1, nil - case SC_2_FORT_RUN: - return -1, nil - case SC_2_LOCALEDEF: - return _POSIX2_LOCALEDEF, nil - case SC_2_SW_DEV: - return _POSIX2_SW_DEV, nil - case SC_2_VERSION: - return _POSIX2_VERSION, nil - } - return -1, errInvalid -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_solaris.go b/vendor/github.com/tklauser/go-sysconf/sysconf_solaris.go deleted file mode 100644 index 443b21439dd..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_solaris.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2021 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import "golang.org/x/sys/unix" - -func sysconf(name int) (int64, error) { - if name < 0 { - return -1, errInvalid - } - return unix.Sysconf(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go b/vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go deleted file mode 100644 index 478d692005e..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2021 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris - -package sysconf - -import ( - "fmt" - "runtime" -) - -func sysconf(name int) (int64, error) { - return -1, fmt.Errorf("unsupported on %s", runtime.GOOS) -} diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go deleted file mode 100644 index 6fa7fde8afc..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_darwin.go - -//go:build darwin -// +build darwin - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x2a - SC_AIO_MAX = 0x2b - SC_AIO_PRIO_DELTA_MAX = 0x2c - SC_ARG_MAX = 0x1 - SC_ATEXIT_MAX = 0x6b - SC_BC_BASE_MAX = 0x9 - SC_BC_DIM_MAX = 0xa - SC_BC_SCALE_MAX = 0xb - SC_BC_STRING_MAX = 0xc - SC_CHILD_MAX = 0x2 - SC_CLK_TCK = 0x3 - SC_COLL_WEIGHTS_MAX = 0xd - SC_DELAYTIMER_MAX = 0x2d - SC_EXPR_NEST_MAX = 0xe - SC_GETGR_R_SIZE_MAX = 0x46 - SC_GETPW_R_SIZE_MAX = 0x47 - SC_HOST_NAME_MAX = 0x48 - SC_IOV_MAX = 0x38 - SC_LINE_MAX = 0xf - SC_LOGIN_NAME_MAX = 0x49 - SC_MQ_OPEN_MAX = 0x2e - SC_MQ_PRIO_MAX = 0x4b - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_PAGE_SIZE = 0x1d - SC_PAGESIZE = 0x1d - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55 - SC_THREAD_KEYS_MAX = 0x56 - SC_THREAD_STACK_MIN = 0x5d - SC_THREAD_THREADS_MAX = 0x5e - SC_RE_DUP_MAX = 0x10 - SC_RTSIG_MAX = 0x30 - SC_SEM_NSEMS_MAX = 0x31 - SC_SEM_VALUE_MAX = 0x32 - SC_SIGQUEUE_MAX = 0x33 - SC_STREAM_MAX = 0x1a - SC_SYMLOOP_MAX = 0x78 - SC_TIMER_MAX = 0x34 - SC_TTY_NAME_MAX = 0x65 - SC_TZNAME_MAX = 0x1b - - SC_ADVISORY_INFO = 0x41 - SC_ASYNCHRONOUS_IO = 0x1c - SC_BARRIERS = 0x42 - SC_CLOCK_SELECTION = 0x43 - SC_CPUTIME = 0x44 - SC_FSYNC = 0x26 - SC_IPV6 = 0x76 - SC_JOB_CONTROL = 0x6 - SC_MAPPED_FILES = 0x2f - SC_MEMLOCK = 0x1e - SC_MEMLOCK_RANGE = 0x1f - SC_MEMORY_PROTECTION = 0x20 - SC_MESSAGE_PASSING = 0x21 - SC_MONOTONIC_CLOCK = 0x4a - SC_PRIORITIZED_IO = 0x22 - SC_PRIORITY_SCHEDULING = 0x23 - SC_RAW_SOCKETS = 0x77 - SC_READER_WRITER_LOCKS = 0x4c - SC_REALTIME_SIGNALS = 0x24 - SC_REGEXP = 0x4d - SC_SAVED_IDS = 0x7 - SC_SEMAPHORES = 0x25 - SC_SHARED_MEMORY_OBJECTS = 0x27 - SC_SHELL = 0x4e - SC_SPAWN = 0x4f - SC_SPIN_LOCKS = 0x50 - SC_SPORADIC_SERVER = 0x51 - SC_SS_REPL_MAX = 0x7e - SC_SYNCHRONIZED_IO = 0x28 - SC_THREAD_ATTR_STACKADDR = 0x52 - SC_THREAD_ATTR_STACKSIZE = 0x53 - SC_THREAD_CPUTIME = 0x54 - SC_THREAD_PRIO_INHERIT = 0x57 - SC_THREAD_PRIO_PROTECT = 0x58 - SC_THREAD_PRIORITY_SCHEDULING = 0x59 - SC_THREAD_PROCESS_SHARED = 0x5a - SC_THREAD_SAFE_FUNCTIONS = 0x5b - SC_THREAD_SPORADIC_SERVER = 0x5c - SC_THREADS = 0x60 - SC_TIMEOUTS = 0x5f - SC_TIMERS = 0x29 - SC_TRACE = 0x61 - SC_TRACE_EVENT_FILTER = 0x62 - SC_TRACE_EVENT_NAME_MAX = 0x7f - SC_TRACE_INHERIT = 0x63 - SC_TRACE_LOG = 0x64 - SC_TRACE_NAME_MAX = 0x80 - SC_TRACE_SYS_MAX = 0x81 - SC_TRACE_USER_EVENT_MAX = 0x82 - SC_TYPED_MEMORY_OBJECTS = 0x66 - SC_VERSION = 0x8 - - SC_V6_ILP32_OFF32 = 0x67 - SC_V6_ILP32_OFFBIG = 0x68 - SC_V6_LP64_OFF64 = 0x69 - SC_V6_LPBIG_OFFBIG = 0x6a - - SC_2_C_BIND = 0x12 - SC_2_C_DEV = 0x13 - SC_2_CHAR_TERM = 0x14 - SC_2_FORT_DEV = 0x15 - SC_2_FORT_RUN = 0x16 - SC_2_LOCALEDEF = 0x17 - SC_2_PBS = 0x3b - SC_2_PBS_ACCOUNTING = 0x3c - SC_2_PBS_CHECKPOINT = 0x3d - SC_2_PBS_LOCATE = 0x3e - SC_2_PBS_MESSAGE = 0x3f - SC_2_PBS_TRACK = 0x40 - SC_2_SW_DEV = 0x18 - SC_2_UPE = 0x19 - SC_2_VERSION = 0x11 - - SC_XOPEN_CRYPT = 0x6c - SC_XOPEN_ENH_I18N = 0x6d - SC_XOPEN_REALTIME = 0x6f - SC_XOPEN_REALTIME_THREADS = 0x70 - SC_XOPEN_SHM = 0x71 - SC_XOPEN_STREAMS = 0x72 - SC_XOPEN_UNIX = 0x73 - SC_XOPEN_VERSION = 0x74 - SC_XOPEN_XCU_VERSION = 0x79 - - SC_PHYS_PAGES = 0xc8 - SC_NPROCESSORS_CONF = 0x39 - SC_NPROCESSORS_ONLN = 0x3a -) - -const ( - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0x2 - _EXPR_NEST_MAX = 0x20 - _IOV_MAX = 0x400 - _LINE_MAX = 0x800 - _NAME_MAX = 0xff - _RE_DUP_MAX = 0xff - - _CLK_TCK = 0x64 - - _MAXHOSTNAMELEN = 0x100 - _MAXLOGNAME = 0xff - _MAXSYMLINKS = 0x20 - - _POSIX_ADVISORY_INFO = -0x1 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = -0x1 - _POSIX_BARRIERS = -0x1 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = -0x1 - _POSIX_CPUTIME = -0x1 - _POSIX_FSYNC = 0x30db0 - _POSIX_IPV6 = 0x30db0 - _POSIX_JOB_CONTROL = 0x30db0 - _POSIX_MAPPED_FILES = 0x30db0 - _POSIX_MEMLOCK = -0x1 - _POSIX_MEMLOCK_RANGE = -0x1 - _POSIX_MEMORY_PROTECTION = 0x30db0 - _POSIX_MESSAGE_PASSING = -0x1 - _POSIX_MONOTONIC_CLOCK = -0x1 - _POSIX_PRIORITIZED_IO = -0x1 - _POSIX_PRIORITY_SCHEDULING = -0x1 - _POSIX_RAW_SOCKETS = -0x1 - _POSIX_READER_WRITER_LOCKS = 0x30db0 - _POSIX_REALTIME_SIGNALS = -0x1 - _POSIX_REGEXP = 0x30db0 - _POSIX_SEM_VALUE_MAX = 0x7fff - _POSIX_SEMAPHORES = -0x1 - _POSIX_SHARED_MEMORY_OBJECTS = -0x1 - _POSIX_SHELL = 0x30db0 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = -0x1 - _POSIX_SPIN_LOCKS = -0x1 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SS_REPL_MAX = 0x4 - _POSIX_SYNCHRONIZED_IO = -0x1 - _POSIX_THREAD_ATTR_STACKADDR = 0x30db0 - _POSIX_THREAD_ATTR_STACKSIZE = 0x30db0 - _POSIX_THREAD_CPUTIME = -0x1 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_KEYS_MAX = 0x80 - _POSIX_THREAD_PRIO_INHERIT = -0x1 - _POSIX_THREAD_PRIO_PROTECT = -0x1 - _POSIX_THREAD_PRIORITY_SCHEDULING = -0x1 - _POSIX_THREAD_PROCESS_SHARED = 0x30db0 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x30db0 - _POSIX_TIMEOUTS = -0x1 - _POSIX_TIMERS = -0x1 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_EVENT_NAME_MAX = 0x1e - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TRACE_NAME_MAX = 0x8 - _POSIX_TRACE_SYS_MAX = 0x8 - _POSIX_TRACE_USER_EVENT_MAX = 0x20 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x30db0 - - _V6_ILP32_OFF32 = -0x1 - _V6_ILP32_OFFBIG = -0x1 - _V6_LP64_OFF64 = 0x1 - _V6_LPBIG_OFFBIG = 0x1 - - _POSIX2_C_BIND = 0x30db0 - _POSIX2_C_DEV = 0x30db0 - _POSIX2_CHAR_TERM = 0x30db0 - _POSIX2_LOCALEDEF = 0x30db0 - _POSIX2_PBS = -0x1 - _POSIX2_SW_DEV = 0x30db0 - _POSIX2_UPE = 0x30db0 - _POSIX2_VERSION = 0x30db0 - - _XOPEN_CRYPT = 0x1 - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = -0x1 - _XOPEN_REALTIME_THREADS = -0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x258 - _XOPEN_XCU_VERSION = 0x4 - - _PTHREAD_DESTRUCTOR_ITERATIONS = 0x4 - _PTHREAD_KEYS_MAX = 0x200 - _PTHREAD_STACK_MIN = 0x2000 -) - -const ( - _PC_NAME_MAX = 0x4 - - _PATH_ZONEINFO = "/usr/share/zoneinfo" -) - -const ( - _CHAR_BIT = 0x8 - - _INT_MAX = 0x7fffffff - - sizeofOffT = 0x8 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go deleted file mode 100644 index 0864cd44827..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go +++ /dev/null @@ -1,228 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_dragonfly.go - -//go:build dragonfly -// +build dragonfly - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x2a - SC_AIO_MAX = 0x2b - SC_AIO_PRIO_DELTA_MAX = 0x2c - SC_ARG_MAX = 0x1 - SC_ATEXIT_MAX = 0x6b - SC_BC_BASE_MAX = 0x9 - SC_BC_DIM_MAX = 0xa - SC_BC_SCALE_MAX = 0xb - SC_BC_STRING_MAX = 0xc - SC_CHILD_MAX = 0x2 - SC_CLK_TCK = 0x3 - SC_COLL_WEIGHTS_MAX = 0xd - SC_DELAYTIMER_MAX = 0x2d - SC_EXPR_NEST_MAX = 0xe - SC_GETGR_R_SIZE_MAX = 0x46 - SC_GETPW_R_SIZE_MAX = 0x47 - SC_HOST_NAME_MAX = 0x48 - SC_IOV_MAX = 0x38 - SC_LINE_MAX = 0xf - SC_LOGIN_NAME_MAX = 0x49 - SC_MQ_OPEN_MAX = 0x2e - SC_MQ_PRIO_MAX = 0x4b - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_PAGE_SIZE = 0x2f - SC_PAGESIZE = 0x2f - SC_RE_DUP_MAX = 0x10 - SC_RTSIG_MAX = 0x30 - SC_SEM_NSEMS_MAX = 0x31 - SC_SEM_VALUE_MAX = 0x32 - SC_SIGQUEUE_MAX = 0x33 - SC_STREAM_MAX = 0x1a - SC_SYMLOOP_MAX = 0x78 - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55 - SC_THREAD_KEYS_MAX = 0x56 - SC_THREAD_STACK_MIN = 0x5d - SC_THREAD_THREADS_MAX = 0x5e - SC_TIMER_MAX = 0x34 - SC_TTY_NAME_MAX = 0x65 - SC_TZNAME_MAX = 0x1b - - SC_ADVISORY_INFO = 0x41 - SC_ASYNCHRONOUS_IO = 0x1c - SC_BARRIERS = 0x42 - SC_CLOCK_SELECTION = 0x43 - SC_CPUTIME = 0x44 - SC_FSYNC = 0x26 - SC_IPV6 = 0x76 - SC_JOB_CONTROL = 0x6 - SC_MAPPED_FILES = 0x1d - SC_MEMLOCK = 0x1e - SC_MEMLOCK_RANGE = 0x1f - SC_MEMORY_PROTECTION = 0x20 - SC_MESSAGE_PASSING = 0x21 - SC_MONOTONIC_CLOCK = 0x4a - SC_PRIORITIZED_IO = 0x22 - SC_PRIORITY_SCHEDULING = 0x23 - SC_RAW_SOCKETS = 0x77 - SC_READER_WRITER_LOCKS = 0x4c - SC_REALTIME_SIGNALS = 0x24 - SC_REGEXP = 0x4d - SC_SAVED_IDS = 0x7 - SC_SEMAPHORES = 0x25 - SC_SHARED_MEMORY_OBJECTS = 0x27 - SC_SHELL = 0x4e - SC_SPAWN = 0x4f - SC_SPIN_LOCKS = 0x50 - SC_SPORADIC_SERVER = 0x51 - SC_SYNCHRONIZED_IO = 0x28 - SC_THREAD_ATTR_STACKADDR = 0x52 - SC_THREAD_ATTR_STACKSIZE = 0x53 - SC_THREAD_CPUTIME = 0x54 - SC_THREAD_PRIO_INHERIT = 0x57 - SC_THREAD_PRIO_PROTECT = 0x58 - SC_THREAD_PRIORITY_SCHEDULING = 0x59 - SC_THREAD_PROCESS_SHARED = 0x5a - SC_THREAD_SAFE_FUNCTIONS = 0x5b - SC_THREAD_SPORADIC_SERVER = 0x5c - SC_THREADS = 0x60 - SC_TIMEOUTS = 0x5f - SC_TIMERS = 0x29 - SC_TRACE = 0x61 - SC_TRACE_EVENT_FILTER = 0x62 - SC_TRACE_INHERIT = 0x63 - SC_TRACE_LOG = 0x64 - SC_TYPED_MEMORY_OBJECTS = 0x66 - SC_VERSION = 0x8 - - SC_V6_ILP32_OFF32 = 0x67 - SC_V6_ILP32_OFFBIG = 0x68 - SC_V6_LP64_OFF64 = 0x69 - SC_V6_LPBIG_OFFBIG = 0x6a - - SC_2_C_BIND = 0x12 - SC_2_C_DEV = 0x13 - SC_2_CHAR_TERM = 0x14 - SC_2_FORT_DEV = 0x15 - SC_2_FORT_RUN = 0x16 - SC_2_LOCALEDEF = 0x17 - SC_2_PBS = 0x3b - SC_2_PBS_ACCOUNTING = 0x3c - SC_2_PBS_CHECKPOINT = 0x3d - SC_2_PBS_LOCATE = 0x3e - SC_2_PBS_MESSAGE = 0x3f - SC_2_PBS_TRACK = 0x40 - SC_2_SW_DEV = 0x18 - SC_2_UPE = 0x19 - SC_2_VERSION = 0x11 - - SC_XOPEN_CRYPT = 0x6c - SC_XOPEN_ENH_I18N = 0x6d - SC_XOPEN_REALTIME = 0x6f - SC_XOPEN_REALTIME_THREADS = 0x70 - SC_XOPEN_SHM = 0x71 - SC_XOPEN_STREAMS = 0x72 - SC_XOPEN_UNIX = 0x73 - SC_XOPEN_VERSION = 0x74 - SC_XOPEN_XCU_VERSION = 0x75 - - SC_PHYS_PAGES = 0x79 - SC_NPROCESSORS_CONF = 0x39 - SC_NPROCESSORS_ONLN = 0x3a -) - -const ( - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xa - _EXPR_NEST_MAX = 0x20 - _LINE_MAX = 0x800 - _RE_DUP_MAX = 0xff - - _CLK_TCK = 0x80 - - _MAXHOSTNAMELEN = 0x100 - _MAXLOGNAME = 0x11 - _MAXSYMLINKS = 0x20 - _ATEXIT_SIZE = 0x20 - - _POSIX_ADVISORY_INFO = -0x1 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x0 - _POSIX_BARRIERS = 0x30db0 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = -0x1 - _POSIX_CPUTIME = 0x30db0 - _POSIX_FSYNC = 0x30db0 - _POSIX_IPV6 = 0x0 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x30db0 - _POSIX_MEMLOCK = -0x1 - _POSIX_MEMLOCK_RANGE = 0x30db0 - _POSIX_MEMORY_PROTECTION = 0x30db0 - _POSIX_MESSAGE_PASSING = 0x30db0 - _POSIX_MONOTONIC_CLOCK = 0x30db0 - _POSIX_PRIORITIZED_IO = -0x1 - _POSIX_PRIORITY_SCHEDULING = 0x30db0 - _POSIX_RAW_SOCKETS = 0x30db0 - _POSIX_READER_WRITER_LOCKS = 0x30db0 - _POSIX_REALTIME_SIGNALS = 0x30db0 - _POSIX_REGEXP = 0x1 - _POSIX_SEM_VALUE_MAX = 0x7fff - _POSIX_SEMAPHORES = 0x30db0 - _POSIX_SHARED_MEMORY_OBJECTS = 0x30db0 - _POSIX_SHELL = 0x1 - _POSIX_SPAWN = 0x30db0 - _POSIX_SPIN_LOCKS = 0x30db0 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = -0x1 - _POSIX_THREAD_ATTR_STACKADDR = 0x30db0 - _POSIX_THREAD_ATTR_STACKSIZE = 0x30db0 - _POSIX_THREAD_CPUTIME = 0x30db0 - _POSIX_THREAD_PRIO_INHERIT = 0x30db0 - _POSIX_THREAD_PRIO_PROTECT = 0x30db0 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x30db0 - _POSIX_THREAD_PROCESS_SHARED = -0x1 - _POSIX_THREAD_SAFE_FUNCTIONS = -0x1 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x30db0 - _POSIX_TIMEOUTS = 0x30db0 - _POSIX_TIMERS = 0x30db0 - _POSIX_TRACE = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x30db0 - - _V6_ILP32_OFF32 = -0x1 - _V6_ILP32_OFFBIG = 0x0 - _V6_LP64_OFF64 = 0x0 - _V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_CHAR_TERM = 0x1 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_PBS = -0x1 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_UPE = 0x31069 - _POSIX2_VERSION = 0x30a2c - - _XOPEN_CRYPT = -0x1 - _XOPEN_ENH_I18N = -0x1 - _XOPEN_REALTIME = -0x1 - _XOPEN_REALTIME_THREADS = -0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = -0x1 - - _PTHREAD_DESTRUCTOR_ITERATIONS = 0x4 - _PTHREAD_KEYS_MAX = 0x100 - _PTHREAD_STACK_MIN = 0x4000 -) - -const ( - _PC_NAME_MAX = 0x4 - - _PATH_DEV = "/dev/" - _PATH_ZONEINFO = "/usr/share/zoneinfo" -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go deleted file mode 100644 index 9885411acbd..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go +++ /dev/null @@ -1,229 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_freebsd.go - -//go:build freebsd -// +build freebsd - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x2a - SC_AIO_MAX = 0x2b - SC_AIO_PRIO_DELTA_MAX = 0x2c - SC_ARG_MAX = 0x1 - SC_ATEXIT_MAX = 0x6b - SC_BC_BASE_MAX = 0x9 - SC_BC_DIM_MAX = 0xa - SC_BC_SCALE_MAX = 0xb - SC_BC_STRING_MAX = 0xc - SC_CHILD_MAX = 0x2 - SC_CLK_TCK = 0x3 - SC_COLL_WEIGHTS_MAX = 0xd - SC_DELAYTIMER_MAX = 0x2d - SC_EXPR_NEST_MAX = 0xe - SC_GETGR_R_SIZE_MAX = 0x46 - SC_GETPW_R_SIZE_MAX = 0x47 - SC_HOST_NAME_MAX = 0x48 - SC_IOV_MAX = 0x38 - SC_LINE_MAX = 0xf - SC_LOGIN_NAME_MAX = 0x49 - SC_MQ_OPEN_MAX = 0x2e - SC_MQ_PRIO_MAX = 0x4b - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_PAGE_SIZE = 0x2f - SC_PAGESIZE = 0x2f - SC_RE_DUP_MAX = 0x10 - SC_RTSIG_MAX = 0x30 - SC_SEM_NSEMS_MAX = 0x31 - SC_SEM_VALUE_MAX = 0x32 - SC_SIGQUEUE_MAX = 0x33 - SC_STREAM_MAX = 0x1a - SC_SYMLOOP_MAX = 0x78 - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55 - SC_THREAD_KEYS_MAX = 0x56 - SC_THREAD_STACK_MIN = 0x5d - SC_THREAD_THREADS_MAX = 0x5e - SC_TIMER_MAX = 0x34 - SC_TTY_NAME_MAX = 0x65 - SC_TZNAME_MAX = 0x1b - - SC_ADVISORY_INFO = 0x41 - SC_ASYNCHRONOUS_IO = 0x1c - SC_BARRIERS = 0x42 - SC_CLOCK_SELECTION = 0x43 - SC_CPUTIME = 0x44 - SC_FSYNC = 0x26 - SC_IPV6 = 0x76 - SC_JOB_CONTROL = 0x6 - SC_MAPPED_FILES = 0x1d - SC_MEMLOCK = 0x1e - SC_MEMLOCK_RANGE = 0x1f - SC_MEMORY_PROTECTION = 0x20 - SC_MESSAGE_PASSING = 0x21 - SC_MONOTONIC_CLOCK = 0x4a - SC_PRIORITIZED_IO = 0x22 - SC_PRIORITY_SCHEDULING = 0x23 - SC_RAW_SOCKETS = 0x77 - SC_READER_WRITER_LOCKS = 0x4c - SC_REALTIME_SIGNALS = 0x24 - SC_REGEXP = 0x4d - SC_SAVED_IDS = 0x7 - SC_SEMAPHORES = 0x25 - SC_SHARED_MEMORY_OBJECTS = 0x27 - SC_SHELL = 0x4e - SC_SPAWN = 0x4f - SC_SPIN_LOCKS = 0x50 - SC_SPORADIC_SERVER = 0x51 - SC_SYNCHRONIZED_IO = 0x28 - SC_THREAD_ATTR_STACKADDR = 0x52 - SC_THREAD_ATTR_STACKSIZE = 0x53 - SC_THREAD_CPUTIME = 0x54 - SC_THREAD_PRIO_INHERIT = 0x57 - SC_THREAD_PRIO_PROTECT = 0x58 - SC_THREAD_PRIORITY_SCHEDULING = 0x59 - SC_THREAD_PROCESS_SHARED = 0x5a - SC_THREAD_SAFE_FUNCTIONS = 0x5b - SC_THREAD_SPORADIC_SERVER = 0x5c - SC_THREADS = 0x60 - SC_TIMEOUTS = 0x5f - SC_TIMERS = 0x29 - SC_TRACE = 0x61 - SC_TRACE_EVENT_FILTER = 0x62 - SC_TRACE_INHERIT = 0x63 - SC_TRACE_LOG = 0x64 - SC_TYPED_MEMORY_OBJECTS = 0x66 - SC_VERSION = 0x8 - - SC_V6_ILP32_OFF32 = 0x67 - SC_V6_ILP32_OFFBIG = 0x68 - SC_V6_LP64_OFF64 = 0x69 - SC_V6_LPBIG_OFFBIG = 0x6a - - SC_2_C_BIND = 0x12 - SC_2_C_DEV = 0x13 - SC_2_CHAR_TERM = 0x14 - SC_2_FORT_DEV = 0x15 - SC_2_FORT_RUN = 0x16 - SC_2_LOCALEDEF = 0x17 - SC_2_PBS = 0x3b - SC_2_PBS_ACCOUNTING = 0x3c - SC_2_PBS_CHECKPOINT = 0x3d - SC_2_PBS_LOCATE = 0x3e - SC_2_PBS_MESSAGE = 0x3f - SC_2_PBS_TRACK = 0x40 - SC_2_SW_DEV = 0x18 - SC_2_UPE = 0x19 - SC_2_VERSION = 0x11 - - SC_XOPEN_CRYPT = 0x6c - SC_XOPEN_ENH_I18N = 0x6d - SC_XOPEN_REALTIME = 0x6f - SC_XOPEN_REALTIME_THREADS = 0x70 - SC_XOPEN_SHM = 0x71 - SC_XOPEN_STREAMS = 0x72 - SC_XOPEN_UNIX = 0x73 - SC_XOPEN_VERSION = 0x74 - SC_XOPEN_XCU_VERSION = 0x75 - - SC_PHYS_PAGES = 0x79 - SC_NPROCESSORS_CONF = 0x39 - SC_NPROCESSORS_ONLN = 0x3a -) - -const ( - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xa - _EXPR_NEST_MAX = 0x20 - _LINE_MAX = 0x800 - _MQ_PRIO_MAX = 0x40 - _RE_DUP_MAX = 0xff - _SEM_VALUE_MAX = 0x7fffffff - - _CLK_TCK = 0x80 - - _MAXHOSTNAMELEN = 0x100 - _MAXLOGNAME = 0x21 - _MAXSYMLINKS = 0x20 - _ATEXIT_SIZE = 0x20 - - _POSIX_ADVISORY_INFO = 0x30db0 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x30db0 - _POSIX_BARRIERS = 0x30db0 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = -0x1 - _POSIX_CPUTIME = 0x30db0 - _POSIX_FSYNC = 0x30db0 - _POSIX_IPV6 = 0x0 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x30db0 - _POSIX_MEMLOCK = -0x1 - _POSIX_MEMLOCK_RANGE = 0x30db0 - _POSIX_MEMORY_PROTECTION = 0x30db0 - _POSIX_MESSAGE_PASSING = 0x30db0 - _POSIX_MONOTONIC_CLOCK = 0x30db0 - _POSIX_PRIORITIZED_IO = -0x1 - _POSIX_PRIORITY_SCHEDULING = 0x0 - _POSIX_RAW_SOCKETS = 0x30db0 - _POSIX_READER_WRITER_LOCKS = 0x30db0 - _POSIX_REALTIME_SIGNALS = 0x30db0 - _POSIX_REGEXP = 0x1 - _POSIX_SEM_VALUE_MAX = 0x7fff - _POSIX_SEMAPHORES = 0x30db0 - _POSIX_SHARED_MEMORY_OBJECTS = 0x30db0 - _POSIX_SHELL = 0x1 - _POSIX_SPAWN = 0x30db0 - _POSIX_SPIN_LOCKS = 0x30db0 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = -0x1 - _POSIX_THREAD_ATTR_STACKADDR = 0x30db0 - _POSIX_THREAD_ATTR_STACKSIZE = 0x30db0 - _POSIX_THREAD_CPUTIME = 0x30db0 - _POSIX_THREAD_PRIO_INHERIT = 0x30db0 - _POSIX_THREAD_PRIO_PROTECT = 0x30db0 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x30db0 - _POSIX_THREAD_PROCESS_SHARED = 0x30db0 - _POSIX_THREAD_SAFE_FUNCTIONS = -0x1 - _POSIX_THREADS = 0x30db0 - _POSIX_TIMEOUTS = 0x30db0 - _POSIX_TIMERS = 0x30db0 - _POSIX_TRACE = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x30db0 - - _V6_ILP32_OFF32 = -0x1 - _V6_ILP32_OFFBIG = 0x0 - _V6_LP64_OFF64 = 0x0 - _V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x30db0 - _POSIX2_C_DEV = -0x1 - _POSIX2_CHAR_TERM = 0x1 - _POSIX2_LOCALEDEF = -0x1 - _POSIX2_PBS = -0x1 - _POSIX2_SW_DEV = -0x1 - _POSIX2_UPE = 0x30db0 - _POSIX2_VERSION = 0x30a2c - - _XOPEN_CRYPT = -0x1 - _XOPEN_ENH_I18N = -0x1 - _XOPEN_REALTIME = -0x1 - _XOPEN_REALTIME_THREADS = -0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = -0x1 - - _PTHREAD_DESTRUCTOR_ITERATIONS = 0x4 - _PTHREAD_KEYS_MAX = 0x100 - _PTHREAD_STACK_MIN = 0x800 -) - -const ( - _PC_NAME_MAX = 0x4 - - _PATH_DEV = "/dev/" - _PATH_ZONEINFO = "/usr/share/zoneinfo" -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go deleted file mode 100644 index 8545a342b90..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_linux.go - -//go:build linux -// +build linux - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x17 - SC_AIO_MAX = 0x18 - SC_AIO_PRIO_DELTA_MAX = 0x19 - SC_ARG_MAX = 0x0 - SC_ATEXIT_MAX = 0x57 - SC_BC_BASE_MAX = 0x24 - SC_BC_DIM_MAX = 0x25 - SC_BC_SCALE_MAX = 0x26 - SC_BC_STRING_MAX = 0x27 - SC_CHILD_MAX = 0x1 - SC_CLK_TCK = 0x2 - SC_COLL_WEIGHTS_MAX = 0x28 - SC_DELAYTIMER_MAX = 0x1a - SC_EXPR_NEST_MAX = 0x2a - SC_GETGR_R_SIZE_MAX = 0x45 - SC_GETPW_R_SIZE_MAX = 0x46 - SC_HOST_NAME_MAX = 0xb4 - SC_IOV_MAX = 0x3c - SC_LINE_MAX = 0x2b - SC_LOGIN_NAME_MAX = 0x47 - SC_MQ_OPEN_MAX = 0x1b - SC_MQ_PRIO_MAX = 0x1c - SC_NGROUPS_MAX = 0x3 - SC_OPEN_MAX = 0x4 - SC_PAGE_SIZE = 0x1e - SC_PAGESIZE = 0x1e - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x49 - SC_THREAD_KEYS_MAX = 0x4a - SC_THREAD_STACK_MIN = 0x4b - SC_THREAD_THREADS_MAX = 0x4c - SC_RE_DUP_MAX = 0x2c - SC_RTSIG_MAX = 0x1f - SC_SEM_NSEMS_MAX = 0x20 - SC_SEM_VALUE_MAX = 0x21 - SC_SIGQUEUE_MAX = 0x22 - SC_STREAM_MAX = 0x5 - SC_SYMLOOP_MAX = 0xad - SC_TIMER_MAX = 0x23 - SC_TTY_NAME_MAX = 0x48 - SC_TZNAME_MAX = 0x6 - - SC_ADVISORY_INFO = 0x84 - SC_ASYNCHRONOUS_IO = 0xc - SC_BARRIERS = 0x85 - SC_CLOCK_SELECTION = 0x89 - SC_CPUTIME = 0x8a - SC_FSYNC = 0xf - SC_IPV6 = 0xeb - SC_JOB_CONTROL = 0x7 - SC_MAPPED_FILES = 0x10 - SC_MEMLOCK = 0x11 - SC_MEMLOCK_RANGE = 0x12 - SC_MEMORY_PROTECTION = 0x13 - SC_MESSAGE_PASSING = 0x14 - SC_MONOTONIC_CLOCK = 0x95 - SC_PRIORITIZED_IO = 0xd - SC_PRIORITY_SCHEDULING = 0xa - SC_RAW_SOCKETS = 0xec - SC_READER_WRITER_LOCKS = 0x99 - SC_REALTIME_SIGNALS = 0x9 - SC_REGEXP = 0x9b - SC_SAVED_IDS = 0x8 - SC_SEMAPHORES = 0x15 - SC_SHARED_MEMORY_OBJECTS = 0x16 - SC_SHELL = 0x9d - SC_SPAWN = 0x9f - SC_SPIN_LOCKS = 0x9a - SC_SPORADIC_SERVER = 0xa0 - SC_SS_REPL_MAX = 0xf1 - SC_SYNCHRONIZED_IO = 0xe - SC_THREAD_ATTR_STACKADDR = 0x4d - SC_THREAD_ATTR_STACKSIZE = 0x4e - SC_THREAD_CPUTIME = 0x8b - SC_THREAD_PRIO_INHERIT = 0x50 - SC_THREAD_PRIO_PROTECT = 0x51 - SC_THREAD_PRIORITY_SCHEDULING = 0x4f - SC_THREAD_PROCESS_SHARED = 0x52 - SC_THREAD_ROBUST_PRIO_INHERIT = 0xf7 - SC_THREAD_ROBUST_PRIO_PROTECT = 0xf8 - SC_THREAD_SAFE_FUNCTIONS = 0x44 - SC_THREAD_SPORADIC_SERVER = 0xa1 - SC_THREADS = 0x43 - SC_TIMEOUTS = 0xa4 - SC_TIMERS = 0xb - SC_TRACE = 0xb5 - SC_TRACE_EVENT_FILTER = 0xb6 - SC_TRACE_EVENT_NAME_MAX = 0xf2 - SC_TRACE_INHERIT = 0xb7 - SC_TRACE_LOG = 0xb8 - SC_TRACE_NAME_MAX = 0xf3 - SC_TRACE_SYS_MAX = 0xf4 - SC_TRACE_USER_EVENT_MAX = 0xf5 - SC_TYPED_MEMORY_OBJECTS = 0xa5 - SC_VERSION = 0x1d - - SC_V7_ILP32_OFF32 = 0xed - SC_V7_ILP32_OFFBIG = 0xee - SC_V7_LP64_OFF64 = 0xef - SC_V7_LPBIG_OFFBIG = 0xf0 - - SC_V6_ILP32_OFF32 = 0xb0 - SC_V6_ILP32_OFFBIG = 0xb1 - SC_V6_LP64_OFF64 = 0xb2 - SC_V6_LPBIG_OFFBIG = 0xb3 - - SC_2_C_BIND = 0x2f - SC_2_C_DEV = 0x30 - SC_2_C_VERSION = 0x60 - SC_2_CHAR_TERM = 0x5f - SC_2_FORT_DEV = 0x31 - SC_2_FORT_RUN = 0x32 - SC_2_LOCALEDEF = 0x34 - SC_2_PBS = 0xa8 - SC_2_PBS_ACCOUNTING = 0xa9 - SC_2_PBS_CHECKPOINT = 0xaf - SC_2_PBS_LOCATE = 0xaa - SC_2_PBS_MESSAGE = 0xab - SC_2_PBS_TRACK = 0xac - SC_2_SW_DEV = 0x33 - SC_2_UPE = 0x61 - SC_2_VERSION = 0x2e - - SC_XOPEN_CRYPT = 0x5c - SC_XOPEN_ENH_I18N = 0x5d - SC_XOPEN_REALTIME = 0x82 - SC_XOPEN_REALTIME_THREADS = 0x83 - SC_XOPEN_SHM = 0x5e - SC_XOPEN_STREAMS = 0xf6 - SC_XOPEN_UNIX = 0x5b - SC_XOPEN_VERSION = 0x59 - SC_XOPEN_XCU_VERSION = 0x5a - - SC_PHYS_PAGES = 0x55 - SC_AVPHYS_PAGES = 0x56 - SC_NPROCESSORS_CONF = 0x53 - SC_NPROCESSORS_ONLN = 0x54 - SC_UIO_MAXIOV = 0x3c -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go deleted file mode 100644 index d2aaf077704..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_netbsd.go - -//go:build netbsd -// +build netbsd - -package sysconf - -const ( - SC_ARG_MAX = 0x1 - SC_CHILD_MAX = 0x2 - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_JOB_CONTROL = 0x6 - SC_SAVED_IDS = 0x7 - SC_VERSION = 0x8 - SC_BC_BASE_MAX = 0x9 - SC_BC_DIM_MAX = 0xa - SC_BC_SCALE_MAX = 0xb - SC_BC_STRING_MAX = 0xc - SC_COLL_WEIGHTS_MAX = 0xd - SC_EXPR_NEST_MAX = 0xe - SC_LINE_MAX = 0xf - SC_RE_DUP_MAX = 0x10 - SC_2_VERSION = 0x11 - SC_2_C_BIND = 0x12 - SC_2_C_DEV = 0x13 - SC_2_CHAR_TERM = 0x14 - SC_2_FORT_DEV = 0x15 - SC_2_FORT_RUN = 0x16 - SC_2_LOCALEDEF = 0x17 - SC_2_SW_DEV = 0x18 - SC_2_UPE = 0x19 - SC_STREAM_MAX = 0x1a - SC_TZNAME_MAX = 0x1b - SC_PAGESIZE = 0x1c - SC_PAGE_SIZE = 0x1c - SC_FSYNC = 0x1d - SC_XOPEN_SHM = 0x1e - SC_SYNCHRONIZED_IO = 0x1f - SC_IOV_MAX = 0x20 - SC_MAPPED_FILES = 0x21 - SC_MEMLOCK = 0x22 - SC_MEMLOCK_RANGE = 0x23 - SC_MEMORY_PROTECTION = 0x24 - SC_LOGIN_NAME_MAX = 0x25 - SC_MONOTONIC_CLOCK = 0x26 - SC_CLK_TCK = 0x27 - SC_ATEXIT_MAX = 0x28 - SC_THREADS = 0x29 - SC_SEMAPHORES = 0x2a - SC_BARRIERS = 0x2b - SC_TIMERS = 0x2c - SC_SPIN_LOCKS = 0x2d - SC_READER_WRITER_LOCKS = 0x2e - SC_GETGR_R_SIZE_MAX = 0x2f - SC_GETPW_R_SIZE_MAX = 0x30 - SC_CLOCK_SELECTION = 0x31 - SC_ASYNCHRONOUS_IO = 0x32 - SC_AIO_LISTIO_MAX = 0x33 - SC_AIO_MAX = 0x34 - SC_MESSAGE_PASSING = 0x35 - SC_MQ_OPEN_MAX = 0x36 - SC_MQ_PRIO_MAX = 0x37 - SC_PRIORITY_SCHEDULING = 0x38 - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x39 - SC_THREAD_KEYS_MAX = 0x3a - SC_THREAD_STACK_MIN = 0x3b - SC_THREAD_THREADS_MAX = 0x3c - SC_THREAD_ATTR_STACKADDR = 0x3d - SC_THREAD_ATTR_STACKSIZE = 0x3e - SC_THREAD_PRIORITY_SCHEDULING = 0x3f - SC_THREAD_PRIO_INHERIT = 0x40 - SC_THREAD_PRIO_PROTECT = 0x41 - SC_THREAD_PROCESS_SHARED = 0x42 - SC_THREAD_SAFE_FUNCTIONS = 0x43 - SC_TTY_NAME_MAX = 0x44 - SC_HOST_NAME_MAX = 0x45 - SC_PASS_MAX = 0x46 - SC_REGEXP = 0x47 - SC_SHELL = 0x48 - SC_SYMLOOP_MAX = 0x49 - - SC_V6_ILP32_OFF32 = 0x4a - SC_V6_ILP32_OFFBIG = 0x4b - SC_V6_LP64_OFF64 = 0x4c - SC_V6_LPBIG_OFFBIG = 0x4d - SC_2_PBS = 0x50 - SC_2_PBS_ACCOUNTING = 0x51 - SC_2_PBS_CHECKPOINT = 0x52 - SC_2_PBS_LOCATE = 0x53 - SC_2_PBS_MESSAGE = 0x54 - SC_2_PBS_TRACK = 0x55 - - SC_SPAWN = 0x56 - SC_SHARED_MEMORY_OBJECTS = 0x57 - - SC_TIMER_MAX = 0x58 - SC_SEM_NSEMS_MAX = 0x59 - SC_CPUTIME = 0x5a - SC_THREAD_CPUTIME = 0x5b - SC_DELAYTIMER_MAX = 0x5c - SC_SIGQUEUE_MAX = 0x5d - SC_REALTIME_SIGNALS = 0x5e - - SC_PHYS_PAGES = 0x79 - - SC_NPROCESSORS_CONF = 0x3e9 - SC_NPROCESSORS_ONLN = 0x3ea - - SC_SCHED_RT_TS = 0x7d1 - SC_SCHED_PRI_MIN = 0x7d2 - SC_SCHED_PRI_MAX = 0x7d3 -) - -const ( - _MAXHOSTNAMELEN = 0x100 - _MAXLOGNAME = 0x10 - _MAXSYMLINKS = 0x20 - - _POSIX_ARG_MAX = 0x1000 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CPUTIME = 0x30db0 - _POSIX_DELAYTIMER_MAX = 0x20 - _POSIX_PRIORITY_SCHEDULING = 0x30db0 - _POSIX_REGEXP = 0x1 - _POSIX_SHARED_MEMORY_OBJECTS = 0x0 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x30db0 - _POSIX_THREAD_ATTR_STACKSIZE = 0x30db0 - _POSIX_THREAD_CPUTIME = 0x30db0 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_KEYS_MAX = 0x80 - _POSIX_THREAD_PRIO_PROTECT = 0x30db0 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0 - _POSIX_TIMER_MAX = 0x20 - _POSIX_VERSION = 0x30db0 - - _POSIX2_VERSION = 0x30db0 - - _FOPEN_MAX = 0x14 - _NAME_MAX = 0x1ff - _RE_DUP_MAX = 0xff - - _BC_BASE_MAX = 0x7fffffff - _BC_DIM_MAX = 0xffff - _BC_SCALE_MAX = 0x7fffffff - _BC_STRING_MAX = 0x7fffffff - _COLL_WEIGHTS_MAX = 0x2 - _EXPR_NEST_MAX = 0x20 - _LINE_MAX = 0x800 - - _GETGR_R_SIZE_MAX = 0x400 - _GETPW_R_SIZE_MAX = 0x400 - - _PATH_DEV = "/dev/" - _PATH_ZONEINFO = "/usr/share/zoneinfo" - - _PASSWORD_LEN = 0x80 -) - -const _PC_NAME_MAX = 0x4 diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go deleted file mode 100644 index badc66cbda8..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_openbsd.go - -//go:build openbsd -// +build openbsd - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x2a - SC_AIO_MAX = 0x2b - SC_AIO_PRIO_DELTA_MAX = 0x2c - SC_ARG_MAX = 0x1 - SC_ATEXIT_MAX = 0x2e - SC_BC_BASE_MAX = 0x9 - SC_BC_DIM_MAX = 0xa - SC_BC_SCALE_MAX = 0xb - SC_BC_STRING_MAX = 0xc - SC_CHILD_MAX = 0x2 - SC_CLK_TCK = 0x3 - SC_COLL_WEIGHTS_MAX = 0xd - SC_DELAYTIMER_MAX = 0x32 - SC_EXPR_NEST_MAX = 0xe - SC_GETGR_R_SIZE_MAX = 0x64 - SC_GETPW_R_SIZE_MAX = 0x65 - SC_HOST_NAME_MAX = 0x21 - SC_IOV_MAX = 0x33 - SC_LINE_MAX = 0xf - SC_LOGIN_NAME_MAX = 0x66 - SC_MQ_OPEN_MAX = 0x3a - SC_MQ_PRIO_MAX = 0x3b - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_PAGE_SIZE = 0x1c - SC_PAGESIZE = 0x1c - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x50 - SC_THREAD_KEYS_MAX = 0x51 - SC_THREAD_STACK_MIN = 0x59 - SC_THREAD_THREADS_MAX = 0x5a - SC_RE_DUP_MAX = 0x10 - SC_SEM_NSEMS_MAX = 0x1f - SC_SEM_VALUE_MAX = 0x20 - SC_SIGQUEUE_MAX = 0x46 - SC_STREAM_MAX = 0x1a - SC_SYMLOOP_MAX = 0x4c - SC_TIMER_MAX = 0x5d - SC_TTY_NAME_MAX = 0x6b - SC_TZNAME_MAX = 0x1b - - SC_ADVISORY_INFO = 0x29 - SC_ASYNCHRONOUS_IO = 0x2d - SC_BARRIERS = 0x2f - SC_CLOCK_SELECTION = 0x30 - SC_CPUTIME = 0x31 - SC_FSYNC = 0x1d - SC_IPV6 = 0x34 - SC_JOB_CONTROL = 0x6 - SC_MAPPED_FILES = 0x35 - SC_MEMLOCK = 0x36 - SC_MEMLOCK_RANGE = 0x37 - SC_MEMORY_PROTECTION = 0x38 - SC_MESSAGE_PASSING = 0x39 - SC_MONOTONIC_CLOCK = 0x22 - SC_PRIORITIZED_IO = 0x3c - SC_PRIORITY_SCHEDULING = 0x3d - SC_RAW_SOCKETS = 0x3e - SC_READER_WRITER_LOCKS = 0x3f - SC_REALTIME_SIGNALS = 0x40 - SC_REGEXP = 0x41 - SC_SAVED_IDS = 0x7 - SC_SEMAPHORES = 0x43 - SC_SHARED_MEMORY_OBJECTS = 0x44 - SC_SHELL = 0x45 - SC_SPAWN = 0x47 - SC_SPIN_LOCKS = 0x48 - SC_SPORADIC_SERVER = 0x49 - SC_SS_REPL_MAX = 0x4a - SC_SYNCHRONIZED_IO = 0x4b - SC_THREAD_ATTR_STACKADDR = 0x4d - SC_THREAD_ATTR_STACKSIZE = 0x4e - SC_THREAD_CPUTIME = 0x4f - SC_THREAD_PRIO_INHERIT = 0x52 - SC_THREAD_PRIO_PROTECT = 0x53 - SC_THREAD_PRIORITY_SCHEDULING = 0x54 - SC_THREAD_PROCESS_SHARED = 0x55 - SC_THREAD_ROBUST_PRIO_INHERIT = 0x56 - SC_THREAD_ROBUST_PRIO_PROTECT = 0x57 - SC_THREAD_SAFE_FUNCTIONS = 0x67 - SC_THREAD_SPORADIC_SERVER = 0x58 - SC_THREADS = 0x5b - SC_TIMEOUTS = 0x5c - SC_TIMERS = 0x5e - SC_TRACE = 0x5f - SC_TRACE_EVENT_FILTER = 0x60 - SC_TRACE_EVENT_NAME_MAX = 0x61 - SC_TRACE_INHERIT = 0x62 - SC_TRACE_LOG = 0x63 - SC_TRACE_NAME_MAX = 0x68 - SC_TRACE_SYS_MAX = 0x69 - SC_TRACE_USER_EVENT_MAX = 0x6a - SC_TYPED_MEMORY_OBJECTS = 0x6c - SC_VERSION = 0x8 - - SC_V7_ILP32_OFF32 = 0x71 - SC_V7_ILP32_OFFBIG = 0x72 - SC_V7_LP64_OFF64 = 0x73 - SC_V7_LPBIG_OFFBIG = 0x74 - - SC_V6_ILP32_OFF32 = 0x6d - SC_V6_ILP32_OFFBIG = 0x6e - SC_V6_LP64_OFF64 = 0x6f - SC_V6_LPBIG_OFFBIG = 0x70 - - SC_2_C_BIND = 0x12 - SC_2_C_DEV = 0x13 - SC_2_CHAR_TERM = 0x14 - SC_2_FORT_DEV = 0x15 - SC_2_FORT_RUN = 0x16 - SC_2_LOCALEDEF = 0x17 - SC_2_PBS = 0x23 - SC_2_PBS_ACCOUNTING = 0x24 - SC_2_PBS_CHECKPOINT = 0x25 - SC_2_PBS_LOCATE = 0x26 - SC_2_PBS_MESSAGE = 0x27 - SC_2_PBS_TRACK = 0x28 - SC_2_SW_DEV = 0x18 - SC_2_UPE = 0x19 - SC_2_VERSION = 0x11 - - SC_XOPEN_CRYPT = 0x75 - SC_XOPEN_ENH_I18N = 0x76 - SC_XOPEN_REALTIME = 0x78 - SC_XOPEN_REALTIME_THREADS = 0x79 - SC_XOPEN_SHM = 0x1e - SC_XOPEN_STREAMS = 0x7a - SC_XOPEN_UNIX = 0x7b - SC_XOPEN_UUCP = 0x7c - SC_XOPEN_VERSION = 0x7d - - SC_AVPHYS_PAGES = 0x1f5 - SC_PHYS_PAGES = 0x1f4 - SC_NPROCESSORS_CONF = 0x1f6 - SC_NPROCESSORS_ONLN = 0x1f7 -) - -const ( - _HOST_NAME_MAX = 0xff - _IOV_MAX = 0x400 - _LOGIN_NAME_MAX = 0x20 - _PTHREAD_DESTRUCTOR_ITERATIONS = 0x4 - _PTHREAD_KEYS_MAX = 0x100 - _PTHREAD_STACK_MIN = 0x1000 - _PTHREAD_THREADS_MAX = 0xffffffffffffffff - _SEM_VALUE_MAX = 0xffffffff - _SYMLOOP_MAX = 0x20 - _TTY_NAME_MAX = 0x104 - - _GR_BUF_LEN = 0xa40 - _PW_BUF_LEN = 0x400 - - _CLK_TCK = 0x64 - - _POSIX_ADVISORY_INFO = -0x1 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = -0x1 - _POSIX_BARRIERS = 0x30db0 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = -0x1 - _POSIX_CPUTIME = 0x31069 - _POSIX_FSYNC = 0x30db0 - _POSIX_IPV6 = 0x0 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x30db0 - _POSIX_MEMLOCK = 0x30db0 - _POSIX_MEMLOCK_RANGE = 0x30db0 - _POSIX_MEMORY_PROTECTION = 0x30db0 - _POSIX_MESSAGE_PASSING = -0x1 - _POSIX_MONOTONIC_CLOCK = 0x30db0 - _POSIX_PRIORITIZED_IO = -0x1 - _POSIX_PRIORITY_SCHEDULING = -0x1 - _POSIX_RAW_SOCKETS = 0x30db0 - _POSIX_READER_WRITER_LOCKS = 0x30db0 - _POSIX_REALTIME_SIGNALS = -0x1 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x30db0 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SPAWN = 0x30db0 - _POSIX_SPIN_LOCKS = 0x30db0 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = -0x1 - _POSIX_THREAD_ATTR_STACKADDR = 0x30db0 - _POSIX_THREAD_ATTR_STACKSIZE = 0x30db0 - _POSIX_THREAD_CPUTIME = 0x31069 - _POSIX_THREAD_KEYS_MAX = 0x80 - _POSIX_THREAD_PRIO_INHERIT = -0x1 - _POSIX_THREAD_PRIO_PROTECT = -0x1 - _POSIX_THREAD_PRIORITY_SCHEDULING = -0x1 - _POSIX_THREAD_PROCESS_SHARED = -0x1 - _POSIX_THREAD_ROBUST_PRIO_INHERIT = -0x1 - _POSIX_THREAD_ROBUST_PRIO_PROTECT = -0x1 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x30db0 - _POSIX_TIMERS = -0x1 - _POSIX_TIMEOUTS = 0x30db0 - _POSIX_TRACE = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = 0x0 - _POSIX_V7_LP64_OFF64 = 0x0 - _POSIX_V7_LPBIG_OFFBIG = 0x0 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = 0x0 - _POSIX_V6_LP64_OFF64 = 0x0 - _POSIX_V6_LPBIG_OFFBIG = 0x0 - - _POSIX2_C_BIND = 0x30db0 - _POSIX2_C_DEV = -0x1 - _POSIX2_CHAR_TERM = 0x1 - _POSIX2_LOCALEDEF = -0x1 - _POSIX2_PBS = -0x1 - _POSIX2_SW_DEV = 0x30db0 - _POSIX2_UPE = 0x30db0 - _POSIX2_VERSION = 0x31069 - - _XOPEN_CRYPT = 0x1 - _XOPEN_ENH_I18N = -0x1 - _XOPEN_REALTIME = -0x1 - _XOPEN_REALTIME_THREADS = -0x1 - _XOPEN_SHM = 0x1 - _XOPEN_STREAMS = -0x1 - _XOPEN_UNIX = -0x1 - _XOPEN_UUCP = -0x1 - - _FOPEN_MAX = 0x14 - _NAME_MAX = 0xff - _RE_DUP_MAX = 0xff - - _BC_BASE_MAX = 0x7fffffff - _BC_DIM_MAX = 0xffff - _BC_SCALE_MAX = 0x7fffffff - _BC_STRING_MAX = 0x7fffffff - _COLL_WEIGHTS_MAX = 0x2 - _EXPR_NEST_MAX = 0x20 - _LINE_MAX = 0x800 - - _SHRT_MAX = 0x7fff - - _PATH_ZONEINFO = "/usr/share/zoneinfo" -) - -const ( - _CHAR_BIT = 0x8 - - _INT_MAX = 0x7fffffff - - sizeofOffT = 0x8 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go deleted file mode 100644 index 29b6f8746a1..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_solaris.go - -//go:build solaris -// +build solaris - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x12 - SC_AIO_MAX = 0x13 - SC_AIO_PRIO_DELTA_MAX = 0x14 - SC_ARG_MAX = 0x1 - SC_ATEXIT_MAX = 0x4c - SC_BC_BASE_MAX = 0x36 - SC_BC_DIM_MAX = 0x37 - SC_BC_SCALE_MAX = 0x38 - SC_BC_STRING_MAX = 0x39 - SC_CHILD_MAX = 0x2 - SC_CLK_TCK = 0x3 - SC_COLL_WEIGHTS_MAX = 0x3a - SC_DELAYTIMER_MAX = 0x16 - SC_EXPR_NEST_MAX = 0x3b - SC_GETGR_R_SIZE_MAX = 0x239 - SC_GETPW_R_SIZE_MAX = 0x23a - SC_HOST_NAME_MAX = 0x2df - SC_IOV_MAX = 0x4d - SC_LINE_MAX = 0x3c - SC_LOGIN_NAME_MAX = 0x23b - SC_MQ_OPEN_MAX = 0x1d - SC_MQ_PRIO_MAX = 0x1e - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_PAGE_SIZE = 0xb - SC_PAGESIZE = 0xb - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x238 - SC_THREAD_KEYS_MAX = 0x23c - SC_THREAD_STACK_MIN = 0x23d - SC_THREAD_THREADS_MAX = 0x23e - SC_RE_DUP_MAX = 0x3d - SC_RTSIG_MAX = 0x22 - SC_SEM_NSEMS_MAX = 0x24 - SC_SEM_VALUE_MAX = 0x25 - SC_SIGQUEUE_MAX = 0x27 - SC_STREAM_MAX = 0x10 - SC_SYMLOOP_MAX = 0x2e8 - SC_TIMER_MAX = 0x2c - SC_TTY_NAME_MAX = 0x23f - SC_TZNAME_MAX = 0x11 - - SC_ADVISORY_INFO = 0x2db - SC_ASYNCHRONOUS_IO = 0x15 - SC_BARRIERS = 0x2dc - SC_CLOCK_SELECTION = 0x2dd - SC_CPUTIME = 0x2de - SC_FSYNC = 0x17 - SC_IPV6 = 0x2fa - SC_JOB_CONTROL = 0x6 - SC_MAPPED_FILES = 0x18 - SC_MEMLOCK = 0x19 - SC_MEMLOCK_RANGE = 0x1a - SC_MEMORY_PROTECTION = 0x1b - SC_MESSAGE_PASSING = 0x1c - SC_MONOTONIC_CLOCK = 0x2e0 - SC_PRIORITIZED_IO = 0x1f - SC_PRIORITY_SCHEDULING = 0x20 - SC_RAW_SOCKETS = 0x2fb - SC_READER_WRITER_LOCKS = 0x2e1 - SC_REALTIME_SIGNALS = 0x21 - SC_REGEXP = 0x2e2 - SC_SAVED_IDS = 0x7 - SC_SEMAPHORES = 0x23 - SC_SHARED_MEMORY_OBJECTS = 0x26 - SC_SHELL = 0x2e3 - SC_SPAWN = 0x2e4 - SC_SPIN_LOCKS = 0x2e5 - SC_SPORADIC_SERVER = 0x2e6 - SC_SS_REPL_MAX = 0x2e7 - SC_SYNCHRONIZED_IO = 0x2a - SC_THREAD_ATTR_STACKADDR = 0x241 - SC_THREAD_ATTR_STACKSIZE = 0x242 - SC_THREAD_CPUTIME = 0x2e9 - SC_THREAD_PRIO_INHERIT = 0x244 - SC_THREAD_PRIO_PROTECT = 0x245 - SC_THREAD_PRIORITY_SCHEDULING = 0x243 - SC_THREAD_PROCESS_SHARED = 0x246 - SC_THREAD_SAFE_FUNCTIONS = 0x247 - SC_THREAD_SPORADIC_SERVER = 0x2ea - SC_THREADS = 0x240 - SC_TIMEOUTS = 0x2eb - SC_TIMERS = 0x2b - SC_TRACE = 0x2ec - SC_TRACE_EVENT_FILTER = 0x2ed - SC_TRACE_EVENT_NAME_MAX = 0x2ee - SC_TRACE_INHERIT = 0x2ef - SC_TRACE_LOG = 0x2f0 - SC_TRACE_NAME_MAX = 0x2f1 - SC_TRACE_SYS_MAX = 0x2f2 - SC_TRACE_USER_EVENT_MAX = 0x2f3 - SC_TYPED_MEMORY_OBJECTS = 0x2f4 - SC_VERSION = 0x8 - - SC_V6_ILP32_OFF32 = 0x2f5 - SC_V6_ILP32_OFFBIG = 0x2f6 - SC_V6_LP64_OFF64 = 0x2f7 - SC_V6_LPBIG_OFFBIG = 0x2f8 - - SC_2_C_BIND = 0x2d - SC_2_C_DEV = 0x2e - SC_2_C_VERSION = 0x2f - SC_2_CHAR_TERM = 0x42 - SC_2_FORT_DEV = 0x30 - SC_2_FORT_RUN = 0x31 - SC_2_LOCALEDEF = 0x32 - SC_2_PBS = 0x2d4 - SC_2_PBS_ACCOUNTING = 0x2d5 - SC_2_PBS_CHECKPOINT = 0x2d6 - SC_2_PBS_LOCATE = 0x2d8 - SC_2_PBS_MESSAGE = 0x2d9 - SC_2_PBS_TRACK = 0x2da - SC_2_SW_DEV = 0x33 - SC_2_UPE = 0x34 - SC_2_VERSION = 0x35 - - SC_XOPEN_CRYPT = 0x3e - SC_XOPEN_ENH_I18N = 0x3f - SC_XOPEN_REALTIME = 0x2ce - SC_XOPEN_REALTIME_THREADS = 0x2cf - SC_XOPEN_SHM = 0x40 - SC_XOPEN_STREAMS = 0x2f9 - SC_XOPEN_UNIX = 0x4e - SC_XOPEN_VERSION = 0xc - SC_XOPEN_XCU_VERSION = 0x43 - - SC_PHYS_PAGES = 0x1f4 - SC_AVPHYS_PAGES = 0x1f5 - SC_NPROCESSORS_CONF = 0xe - SC_NPROCESSORS_ONLN = 0xf -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go deleted file mode 100644 index 478fe63a98e..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_freebsd.go - -//go:build freebsd && 386 -// +build freebsd,386 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffff - _SHRT_MAX = 0x7fff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go deleted file mode 100644 index 7f58a4d8bac..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_freebsd.go - -//go:build freebsd && amd64 -// +build freebsd,amd64 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffffffffffff - _SHRT_MAX = 0x7fff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go deleted file mode 100644 index deb47595ba4..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_freebsd.go - -//go:build freebsd && arm -// +build freebsd,arm - -package sysconf - -const ( - _LONG_MAX = 0x7fffffff - _SHRT_MAX = 0x7fff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go deleted file mode 100644 index 556ba3da212..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_freebsd.go - -//go:build freebsd && arm64 -// +build freebsd,arm64 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffffffffffff - _SHRT_MAX = 0x7fff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go deleted file mode 100644 index b7cff760b16..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_freebsd.go - -//go:build freebsd && riscv64 -// +build freebsd,riscv64 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffffffffffff - _SHRT_MAX = 0x7fff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go deleted file mode 100644 index 16ee7ea64cf..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && 386 -// +build linux,386 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x4000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = 0x1 - _POSIX_V7_ILP32_OFFBIG = 0x1 - _POSIX_V7_LP64_OFF64 = -0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = 0x1 - _POSIX_V6_ILP32_OFFBIG = 0x1 - _POSIX_V6_LP64_OFF64 = -0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go deleted file mode 100644 index 39aee349f21..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && amd64 -// +build linux,amd64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x4000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go deleted file mode 100644 index 2e401164e3f..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && arm -// +build linux,arm - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x4000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = 0x1 - _POSIX_V7_ILP32_OFFBIG = 0x1 - _POSIX_V7_LP64_OFF64 = -0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = 0x1 - _POSIX_V6_ILP32_OFFBIG = 0x1 - _POSIX_V6_LP64_OFF64 = -0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go deleted file mode 100644 index 362403abccd..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && arm64 -// +build linux,arm64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go deleted file mode 100644 index 95a71f4a2c7..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && loong64 -// +build linux,loong64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go deleted file mode 100644 index 868b0ffb336..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && mips -// +build linux,mips - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = 0x1 - _POSIX_V7_ILP32_OFFBIG = 0x1 - _POSIX_V7_LP64_OFF64 = -0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = 0x1 - _POSIX_V6_ILP32_OFFBIG = 0x1 - _POSIX_V6_LP64_OFF64 = -0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go deleted file mode 100644 index 5949f3d71fd..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && mips64 -// +build linux,mips64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go deleted file mode 100644 index 1853419a32d..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && mips64le -// +build linux,mips64le - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go deleted file mode 100644 index ff41b3469bb..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && mipsle -// +build linux,mipsle - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = 0x1 - _POSIX_V7_ILP32_OFFBIG = 0x1 - _POSIX_V7_LP64_OFF64 = -0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = 0x1 - _POSIX_V6_ILP32_OFFBIG = 0x1 - _POSIX_V6_LP64_OFF64 = -0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go deleted file mode 100644 index 388743728ac..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && ppc64 -// +build linux,ppc64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go deleted file mode 100644 index 6d76929a64c..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && ppc64le -// +build linux,ppc64le - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go deleted file mode 100644 index 3d7d71b3221..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && riscv64 -// +build linux,riscv64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x4000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go deleted file mode 100644 index 9cf8529f53a..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && s390x -// +build linux,s390x - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x4000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go deleted file mode 100644 index 3cd64dd6626..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_netbsd.go - -//go:build netbsd && 386 -// +build netbsd,386 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go deleted file mode 100644 index 02fc1d0ef93..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_netbsd.go - -//go:build netbsd && amd64 -// +build netbsd,amd64 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffffffffffff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go deleted file mode 100644 index 16f9b6e71eb..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_netbsd.go - -//go:build netbsd && arm -// +build netbsd,arm - -package sysconf - -const ( - _LONG_MAX = 0x7fffffff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go deleted file mode 100644 index e530339ca7e..00000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_netbsd.go - -//go:build netbsd && arm64 -// +build netbsd,arm64 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffffffffffff -) diff --git a/vendor/github.com/tklauser/numcpus/.cirrus.yml b/vendor/github.com/tklauser/numcpus/.cirrus.yml deleted file mode 100644 index 53c0110b50d..00000000000 --- a/vendor/github.com/tklauser/numcpus/.cirrus.yml +++ /dev/null @@ -1,13 +0,0 @@ -env: - CIRRUS_CLONE_DEPTH: 1 - GO_VERSION: go1.19.1 - -freebsd_12_task: - freebsd_instance: - image_family: freebsd-12-3 - install_script: | - pkg install -y go - GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest - bin/${GO_VERSION} download - build_script: bin/${GO_VERSION} build -buildvcs=false -v ./... - test_script: bin/${GO_VERSION} test -buildvcs=false -race ./... diff --git a/vendor/github.com/tklauser/numcpus/LICENSE b/vendor/github.com/tklauser/numcpus/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/vendor/github.com/tklauser/numcpus/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/github.com/tklauser/numcpus/README.md b/vendor/github.com/tklauser/numcpus/README.md deleted file mode 100644 index 23612c54188..00000000000 --- a/vendor/github.com/tklauser/numcpus/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# numcpus - -[![Go Reference](https://pkg.go.dev/badge/github.com/tklauser/numcpus.svg)](https://pkg.go.dev/github.com/tklauser/numcpus) -[![GitHub Action Status](https://github.com/tklauser/numcpus/workflows/Tests/badge.svg)](https://github.com/tklauser/numcpus/actions?query=workflow%3ATests) - -Package numcpus provides information about the number of CPUs in the system. - -It gets the number of CPUs (online, offline, present, possible, configured or -kernel maximum) on Linux, Darwin, FreeBSD, NetBSD, OpenBSD, DragonflyBSD or -Solaris/Illumos systems. - -On Linux, the information is retrieved by reading the corresponding CPU -topology files in `/sys/devices/system/cpu`. - -On BSD systems, the information is retrieved using the `hw.ncpu` and -`hw.ncpuonline` sysctls, if supported. - -Not all functions are supported on Darwin, FreeBSD, NetBSD, OpenBSD, -DragonflyBSD and Solaris/Illumos. ErrNotSupported is returned in case a -function is not supported on a particular platform. - -## Usage - -```Go -package main - -import ( - "fmt" - "os" - - "github.com/tklauser/numcpus" -) - -func main() { - online, err := numcpus.GetOnline() - if err != nil { - fmt.Fprintf(os.Stderr, "GetOnline: %v\n", err) - } - fmt.Printf("online CPUs: %v\n", online) - - possible, err := numcpus.GetPossible() - if err != nil { - fmt.Fprintf(os.Stderr, "GetPossible: %v\n", err) - } - fmt.Printf("possible CPUs: %v\n", possible) -} -``` - -## References - -* [Linux kernel sysfs documentation for CPU attributes](https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-system-cpu) -* [Linux kernel CPU topology documentation](https://www.kernel.org/doc/Documentation/cputopology.txt) diff --git a/vendor/github.com/tklauser/numcpus/numcpus.go b/vendor/github.com/tklauser/numcpus/numcpus.go deleted file mode 100644 index af59983e7d3..00000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2018-2022 Tobias Klauser -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package numcpus provides information about the number of CPUs in the system. -// -// It gets the number of CPUs (online, offline, present, possible or kernel -// maximum) on Linux, Darwin, FreeBSD, NetBSD, OpenBSD, DragonflyBSD, -// Solaris/Illumos or Windows systems. -// -// On Linux, the information is retrieved by reading the corresponding CPU -// topology files in /sys/devices/system/cpu. -// -// On BSD systems, the information is retrieved using the hw.ncpu and -// hw.ncpuonline sysctls, if supported. -// -// On Windows systems, the information is retrieved using the -// GetActiveProcessorCount and GetMaximumProcessorCount functions, respectively. -// -// Not all functions are supported on Darwin, FreeBSD, NetBSD, OpenBSD, -// DragonflyBSD, Solaris/Illumos and Windows. ErrNotSupported is returned in -// case a function is not supported on a particular platform. -package numcpus - -import "errors" - -// ErrNotSupported is the error returned when the function is not supported. -var ErrNotSupported = errors.New("function not supported") - -// GetConfigured returns the number of CPUs configured on the system. This -// function should return the same value as `getconf _SC_NPROCESSORS_CONF` on a -// unix system. -func GetConfigured() (int, error) { - return getConfigured() -} - -// GetKernelMax returns the maximum number of CPUs allowed by the kernel -// configuration. This function is only supported on Linux and Windows systems. -func GetKernelMax() (int, error) { - return getKernelMax() -} - -// GetOffline returns the number of offline CPUs, i.e. CPUs that are not online -// because they have been hotplugged off or exceed the limit of CPUs allowed by -// the kernel configuration (see GetKernelMax). This function is only supported -// on Linux systems. -func GetOffline() (int, error) { - return getOffline() -} - -// GetOnline returns the number of CPUs that are online and being scheduled. -func GetOnline() (int, error) { - return getOnline() -} - -// GetPossible returns the number of possible CPUs, i.e. CPUs that -// have been allocated resources and can be brought online if they are present. -func GetPossible() (int, error) { - return getPossible() -} - -// GetPresent returns the number of CPUs present in the system. -func GetPresent() (int, error) { - return getPresent() -} diff --git a/vendor/github.com/tklauser/numcpus/numcpus_bsd.go b/vendor/github.com/tklauser/numcpus/numcpus_bsd.go deleted file mode 100644 index 9e77e38e6e0..00000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus_bsd.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2018 Tobias Klauser -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build darwin || dragonfly || freebsd || netbsd || openbsd -// +build darwin dragonfly freebsd netbsd openbsd - -package numcpus - -import ( - "runtime" - - "golang.org/x/sys/unix" -) - -func getConfigured() (int, error) { - n, err := unix.SysctlUint32("hw.ncpu") - return int(n), err -} - -func getKernelMax() (int, error) { - if runtime.GOOS == "freebsd" { - n, err := unix.SysctlUint32("kern.smp.maxcpus") - return int(n), err - } - return 0, ErrNotSupported -} - -func getOffline() (int, error) { - return 0, ErrNotSupported -} - -func getOnline() (int, error) { - var n uint32 - var err error - switch runtime.GOOS { - case "netbsd", "openbsd": - n, err = unix.SysctlUint32("hw.ncpuonline") - if err != nil { - n, err = unix.SysctlUint32("hw.ncpu") - } - default: - n, err = unix.SysctlUint32("hw.ncpu") - } - return int(n), err -} - -func getPossible() (int, error) { - n, err := unix.SysctlUint32("hw.ncpu") - return int(n), err -} - -func getPresent() (int, error) { - n, err := unix.SysctlUint32("hw.ncpu") - return int(n), err -} diff --git a/vendor/github.com/tklauser/numcpus/numcpus_linux.go b/vendor/github.com/tklauser/numcpus/numcpus_linux.go deleted file mode 100644 index 1a30525b873..00000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus_linux.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2018 Tobias Klauser -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package numcpus - -import ( - "io/ioutil" - "os" - "path/filepath" - "strconv" - "strings" - - "golang.org/x/sys/unix" -) - -const sysfsCPUBasePath = "/sys/devices/system/cpu" - -func getFromCPUAffinity() (int, error) { - var cpuSet unix.CPUSet - if err := unix.SchedGetaffinity(0, &cpuSet); err != nil { - return 0, err - } - return cpuSet.Count(), nil -} - -func readCPURange(file string) (int, error) { - buf, err := ioutil.ReadFile(filepath.Join(sysfsCPUBasePath, file)) - if err != nil { - return 0, err - } - return parseCPURange(strings.Trim(string(buf), "\n ")) -} - -func parseCPURange(cpus string) (int, error) { - n := int(0) - for _, cpuRange := range strings.Split(cpus, ",") { - if len(cpuRange) == 0 { - continue - } - rangeOp := strings.SplitN(cpuRange, "-", 2) - first, err := strconv.ParseUint(rangeOp[0], 10, 32) - if err != nil { - return 0, err - } - if len(rangeOp) == 1 { - n++ - continue - } - last, err := strconv.ParseUint(rangeOp[1], 10, 32) - if err != nil { - return 0, err - } - n += int(last - first + 1) - } - return n, nil -} - -func getConfigured() (int, error) { - d, err := os.Open(sysfsCPUBasePath) - if err != nil { - return 0, err - } - defer d.Close() - fis, err := d.Readdir(-1) - if err != nil { - return 0, err - } - count := 0 - for _, fi := range fis { - if name := fi.Name(); fi.IsDir() && strings.HasPrefix(name, "cpu") { - _, err := strconv.ParseInt(name[3:], 10, 64) - if err == nil { - count++ - } - } - } - return count, nil -} - -func getKernelMax() (int, error) { - buf, err := ioutil.ReadFile(filepath.Join(sysfsCPUBasePath, "kernel_max")) - if err != nil { - return 0, err - } - n, err := strconv.ParseInt(strings.Trim(string(buf), "\n "), 10, 32) - if err != nil { - return 0, err - } - return int(n), nil -} - -func getOffline() (int, error) { - return readCPURange("offline") -} - -func getOnline() (int, error) { - if n, err := getFromCPUAffinity(); err == nil { - return n, nil - } - return readCPURange("online") -} - -func getPossible() (int, error) { - return readCPURange("possible") -} - -func getPresent() (int, error) { - return readCPURange("present") -} diff --git a/vendor/github.com/tklauser/numcpus/numcpus_solaris.go b/vendor/github.com/tklauser/numcpus/numcpus_solaris.go deleted file mode 100644 index a264323781b..00000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus_solaris.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2021 Tobias Klauser -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build solaris -// +build solaris - -package numcpus - -import "golang.org/x/sys/unix" - -// taken from /usr/include/sys/unistd.h -const ( - _SC_NPROCESSORS_CONF = 14 - _SC_NPROCESSORS_ONLN = 15 - _SC_NPROCESSORS_MAX = 516 -) - -func getConfigured() (int, error) { - n, err := unix.Sysconf(_SC_NPROCESSORS_CONF) - return int(n), err -} - -func getKernelMax() (int, error) { - n, err := unix.Sysconf(_SC_NPROCESSORS_MAX) - return int(n), err -} - -func getOffline() (int, error) { - return 0, ErrNotSupported -} - -func getOnline() (int, error) { - n, err := unix.Sysconf(_SC_NPROCESSORS_ONLN) - return int(n), err -} - -func getPossible() (int, error) { - n, err := unix.Sysconf(_SC_NPROCESSORS_CONF) - return int(n), err -} - -func getPresent() (int, error) { - n, err := unix.Sysconf(_SC_NPROCESSORS_CONF) - return int(n), err -} diff --git a/vendor/github.com/tklauser/numcpus/numcpus_unsupported.go b/vendor/github.com/tklauser/numcpus/numcpus_unsupported.go deleted file mode 100644 index 4a0b7c43d21..00000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus_unsupported.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Tobias Klauser -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows - -package numcpus - -func getConfigured() (int, error) { - return 0, ErrNotSupported -} - -func getKernelMax() (int, error) { - return 0, ErrNotSupported -} - -func getOffline() (int, error) { - return 0, ErrNotSupported -} - -func getOnline() (int, error) { - return 0, ErrNotSupported -} - -func getPossible() (int, error) { - return 0, ErrNotSupported -} - -func getPresent() (int, error) { - return 0, ErrNotSupported -} diff --git a/vendor/github.com/tklauser/numcpus/numcpus_windows.go b/vendor/github.com/tklauser/numcpus/numcpus_windows.go deleted file mode 100644 index f7d5b402955..00000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus_windows.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Tobias Klauser -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package numcpus - -import "golang.org/x/sys/windows" - -func getConfigured() (int, error) { - return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil -} - -func getKernelMax() (int, error) { - return int(windows.GetMaximumProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil -} - -func getOffline() (int, error) { - return 0, ErrNotSupported -} - -func getOnline() (int, error) { - return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil -} - -func getPossible() (int, error) { - return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil -} - -func getPresent() (int, error) { - return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil -} diff --git a/vendor/github.com/yusufpapurcu/wmi/LICENSE b/vendor/github.com/yusufpapurcu/wmi/LICENSE deleted file mode 100644 index ae80b67209e..00000000000 --- a/vendor/github.com/yusufpapurcu/wmi/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Stack Exchange - -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/yusufpapurcu/wmi/README.md b/vendor/github.com/yusufpapurcu/wmi/README.md deleted file mode 100644 index 426d1a46b4a..00000000000 --- a/vendor/github.com/yusufpapurcu/wmi/README.md +++ /dev/null @@ -1,6 +0,0 @@ -wmi -=== - -Package wmi provides a WQL interface to Windows WMI. - -Note: It interfaces with WMI on the local machine, therefore it only runs on Windows. diff --git a/vendor/github.com/yusufpapurcu/wmi/swbemservices.go b/vendor/github.com/yusufpapurcu/wmi/swbemservices.go deleted file mode 100644 index a250c846d5e..00000000000 --- a/vendor/github.com/yusufpapurcu/wmi/swbemservices.go +++ /dev/null @@ -1,261 +0,0 @@ -//go:build windows -// +build windows - -package wmi - -import ( - "fmt" - "reflect" - "runtime" - "sync" - - "github.com/go-ole/go-ole" - "github.com/go-ole/go-ole/oleutil" -) - -// SWbemServices is used to access wmi. See https://msdn.microsoft.com/en-us/library/aa393719(v=vs.85).aspx -type SWbemServices struct { - //TODO: track namespace. Not sure if we can re connect to a different namespace using the same instance - cWMIClient *Client //This could also be an embedded struct, but then we would need to branch on Client vs SWbemServices in the Query method - sWbemLocatorIUnknown *ole.IUnknown - sWbemLocatorIDispatch *ole.IDispatch - queries chan *queryRequest - closeError chan error - lQueryorClose sync.Mutex -} - -type queryRequest struct { - query string - dst interface{} - args []interface{} - finished chan error -} - -// InitializeSWbemServices will return a new SWbemServices object that can be used to query WMI -func InitializeSWbemServices(c *Client, connectServerArgs ...interface{}) (*SWbemServices, error) { - //fmt.Println("InitializeSWbemServices: Starting") - //TODO: implement connectServerArgs as optional argument for init with connectServer call - s := new(SWbemServices) - s.cWMIClient = c - s.queries = make(chan *queryRequest) - initError := make(chan error) - go s.process(initError) - - err, ok := <-initError - if ok { - return nil, err //Send error to caller - } - //fmt.Println("InitializeSWbemServices: Finished") - return s, nil -} - -// Close will clear and release all of the SWbemServices resources -func (s *SWbemServices) Close() error { - s.lQueryorClose.Lock() - if s == nil || s.sWbemLocatorIDispatch == nil { - s.lQueryorClose.Unlock() - return fmt.Errorf("SWbemServices is not Initialized") - } - if s.queries == nil { - s.lQueryorClose.Unlock() - return fmt.Errorf("SWbemServices has been closed") - } - //fmt.Println("Close: sending close request") - var result error - ce := make(chan error) - s.closeError = ce //Race condition if multiple callers to close. May need to lock here - close(s.queries) //Tell background to shut things down - s.lQueryorClose.Unlock() - err, ok := <-ce - if ok { - result = err - } - //fmt.Println("Close: finished") - return result -} - -func (s *SWbemServices) process(initError chan error) { - //fmt.Println("process: starting background thread initialization") - //All OLE/WMI calls must happen on the same initialized thead, so lock this goroutine - runtime.LockOSThread() - defer runtime.UnlockOSThread() - - err := ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED) - if err != nil { - oleCode := err.(*ole.OleError).Code() - if oleCode != ole.S_OK && oleCode != S_FALSE { - initError <- fmt.Errorf("ole.CoInitializeEx error: %v", err) - return - } - } - defer ole.CoUninitialize() - - unknown, err := oleutil.CreateObject("WbemScripting.SWbemLocator") - if err != nil { - initError <- fmt.Errorf("CreateObject SWbemLocator error: %v", err) - return - } else if unknown == nil { - initError <- ErrNilCreateObject - return - } - defer unknown.Release() - s.sWbemLocatorIUnknown = unknown - - dispatch, err := s.sWbemLocatorIUnknown.QueryInterface(ole.IID_IDispatch) - if err != nil { - initError <- fmt.Errorf("SWbemLocator QueryInterface error: %v", err) - return - } - defer dispatch.Release() - s.sWbemLocatorIDispatch = dispatch - - // we can't do the ConnectServer call outside the loop unless we find a way to track and re-init the connectServerArgs - //fmt.Println("process: initialized. closing initError") - close(initError) - //fmt.Println("process: waiting for queries") - for q := range s.queries { - //fmt.Printf("process: new query: len(query)=%d\n", len(q.query)) - errQuery := s.queryBackground(q) - //fmt.Println("process: s.queryBackground finished") - if errQuery != nil { - q.finished <- errQuery - } - close(q.finished) - } - //fmt.Println("process: queries channel closed") - s.queries = nil //set channel to nil so we know it is closed - //TODO: I think the Release/Clear calls can panic if things are in a bad state. - //TODO: May need to recover from panics and send error to method caller instead. - close(s.closeError) -} - -// Query runs the WQL query using a SWbemServices instance and appends the values to dst. -// -// dst must have type *[]S or *[]*S, for some struct type S. Fields selected in -// the query must have the same name in dst. Supported types are all signed and -// unsigned integers, time.Time, string, bool, or a pointer to one of those. -// Array types are not supported. -// -// By default, the local machine and default namespace are used. These can be -// changed using connectServerArgs. See -// http://msdn.microsoft.com/en-us/library/aa393720.aspx for details. -func (s *SWbemServices) Query(query string, dst interface{}, connectServerArgs ...interface{}) error { - s.lQueryorClose.Lock() - if s == nil || s.sWbemLocatorIDispatch == nil { - s.lQueryorClose.Unlock() - return fmt.Errorf("SWbemServices is not Initialized") - } - if s.queries == nil { - s.lQueryorClose.Unlock() - return fmt.Errorf("SWbemServices has been closed") - } - - //fmt.Println("Query: Sending query request") - qr := queryRequest{ - query: query, - dst: dst, - args: connectServerArgs, - finished: make(chan error), - } - s.queries <- &qr - s.lQueryorClose.Unlock() - err, ok := <-qr.finished - if ok { - //fmt.Println("Query: Finished with error") - return err //Send error to caller - } - //fmt.Println("Query: Finished") - return nil -} - -func (s *SWbemServices) queryBackground(q *queryRequest) error { - if s == nil || s.sWbemLocatorIDispatch == nil { - return fmt.Errorf("SWbemServices is not Initialized") - } - wmi := s.sWbemLocatorIDispatch //Should just rename in the code, but this will help as we break things apart - //fmt.Println("queryBackground: Starting") - - dv := reflect.ValueOf(q.dst) - if dv.Kind() != reflect.Ptr || dv.IsNil() { - return ErrInvalidEntityType - } - dv = dv.Elem() - mat, elemType := checkMultiArg(dv) - if mat == multiArgTypeInvalid { - return ErrInvalidEntityType - } - - // service is a SWbemServices - serviceRaw, err := oleutil.CallMethod(wmi, "ConnectServer", q.args...) - if err != nil { - return err - } - service := serviceRaw.ToIDispatch() - defer serviceRaw.Clear() - - // result is a SWBemObjectSet - resultRaw, err := oleutil.CallMethod(service, "ExecQuery", q.query) - if err != nil { - return err - } - result := resultRaw.ToIDispatch() - defer resultRaw.Clear() - - count, err := oleInt64(result, "Count") - if err != nil { - return err - } - - enumProperty, err := result.GetProperty("_NewEnum") - if err != nil { - return err - } - defer enumProperty.Clear() - - enum, err := enumProperty.ToIUnknown().IEnumVARIANT(ole.IID_IEnumVariant) - if err != nil { - return err - } - if enum == nil { - return fmt.Errorf("can't get IEnumVARIANT, enum is nil") - } - defer enum.Release() - - // Initialize a slice with Count capacity - dv.Set(reflect.MakeSlice(dv.Type(), 0, int(count))) - - var errFieldMismatch error - for itemRaw, length, err := enum.Next(1); length > 0; itemRaw, length, err = enum.Next(1) { - if err != nil { - return err - } - - err := func() error { - // item is a SWbemObject, but really a Win32_Process - item := itemRaw.ToIDispatch() - defer item.Release() - - ev := reflect.New(elemType) - if err = s.cWMIClient.loadEntity(ev.Interface(), item); err != nil { - if _, ok := err.(*ErrFieldMismatch); ok { - // We continue loading entities even in the face of field mismatch errors. - // If we encounter any other error, that other error is returned. Otherwise, - // an ErrFieldMismatch is returned. - errFieldMismatch = err - } else { - return err - } - } - if mat != multiArgTypeStructPtr { - ev = ev.Elem() - } - dv.Set(reflect.Append(dv, ev)) - return nil - }() - if err != nil { - return err - } - } - //fmt.Println("queryBackground: Finished") - return errFieldMismatch -} diff --git a/vendor/github.com/yusufpapurcu/wmi/wmi.go b/vendor/github.com/yusufpapurcu/wmi/wmi.go deleted file mode 100644 index 26c3581c975..00000000000 --- a/vendor/github.com/yusufpapurcu/wmi/wmi.go +++ /dev/null @@ -1,591 +0,0 @@ -//go:build windows -// +build windows - -/* -Package wmi provides a WQL interface for WMI on Windows. - -Example code to print names of running processes: - - type Win32_Process struct { - Name string - } - - func main() { - var dst []Win32_Process - q := wmi.CreateQuery(&dst, "") - err := wmi.Query(q, &dst) - if err != nil { - log.Fatal(err) - } - for i, v := range dst { - println(i, v.Name) - } - } -*/ -package wmi - -import ( - "bytes" - "errors" - "fmt" - "log" - "os" - "reflect" - "runtime" - "strconv" - "strings" - "sync" - "time" - - "github.com/go-ole/go-ole" - "github.com/go-ole/go-ole/oleutil" -) - -var l = log.New(os.Stdout, "", log.LstdFlags) - -var ( - ErrInvalidEntityType = errors.New("wmi: invalid entity type") - // ErrNilCreateObject is the error returned if CreateObject returns nil even - // if the error was nil. - ErrNilCreateObject = errors.New("wmi: create object returned nil") - lock sync.Mutex -) - -// S_FALSE is returned by CoInitializeEx if it was already called on this thread. -const S_FALSE = 0x00000001 - -// QueryNamespace invokes Query with the given namespace on the local machine. -func QueryNamespace(query string, dst interface{}, namespace string) error { - return Query(query, dst, nil, namespace) -} - -// Query runs the WQL query and appends the values to dst. -// -// dst must have type *[]S or *[]*S, for some struct type S. Fields selected in -// the query must have the same name in dst. Supported types are all signed and -// unsigned integers, time.Time, string, bool, or a pointer to one of those. -// Array types are not supported. -// -// By default, the local machine and default namespace are used. These can be -// changed using connectServerArgs. See -// https://docs.microsoft.com/en-us/windows/desktop/WmiSdk/swbemlocator-connectserver -// for details. -// -// Query is a wrapper around DefaultClient.Query. -func Query(query string, dst interface{}, connectServerArgs ...interface{}) error { - if DefaultClient.SWbemServicesClient == nil { - return DefaultClient.Query(query, dst, connectServerArgs...) - } - return DefaultClient.SWbemServicesClient.Query(query, dst, connectServerArgs...) -} - -// CallMethod calls a method named methodName on an instance of the class named -// className, with the given params. -// -// CallMethod is a wrapper around DefaultClient.CallMethod. -func CallMethod(connectServerArgs []interface{}, className, methodName string, params []interface{}) (int32, error) { - return DefaultClient.CallMethod(connectServerArgs, className, methodName, params) -} - -// A Client is an WMI query client. -// -// Its zero value (DefaultClient) is a usable client. -type Client struct { - // NonePtrZero specifies if nil values for fields which aren't pointers - // should be returned as the field types zero value. - // - // Setting this to true allows stucts without pointer fields to be used - // without the risk failure should a nil value returned from WMI. - NonePtrZero bool - - // PtrNil specifies if nil values for pointer fields should be returned - // as nil. - // - // Setting this to true will set pointer fields to nil where WMI - // returned nil, otherwise the types zero value will be returned. - PtrNil bool - - // AllowMissingFields specifies that struct fields not present in the - // query result should not result in an error. - // - // Setting this to true allows custom queries to be used with full - // struct definitions instead of having to define multiple structs. - AllowMissingFields bool - - // SWbemServiceClient is an optional SWbemServices object that can be - // initialized and then reused across multiple queries. If it is null - // then the method will initialize a new temporary client each time. - SWbemServicesClient *SWbemServices -} - -// DefaultClient is the default Client and is used by Query, QueryNamespace, and CallMethod. -var DefaultClient = &Client{} - -// coinitService coinitializes WMI service. If no error is returned, a cleanup function -// is returned which must be executed (usually deferred) to clean up allocated resources. -func (c *Client) coinitService(connectServerArgs ...interface{}) (*ole.IDispatch, func(), error) { - var unknown *ole.IUnknown - var wmi *ole.IDispatch - var serviceRaw *ole.VARIANT - - // be sure teardown happens in the reverse - // order from that which they were created - deferFn := func() { - if serviceRaw != nil { - serviceRaw.Clear() - } - if wmi != nil { - wmi.Release() - } - if unknown != nil { - unknown.Release() - } - ole.CoUninitialize() - } - - // if we error'ed here, clean up immediately - var err error - defer func() { - if err != nil { - deferFn() - } - }() - - err = ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED) - if err != nil { - oleCode := err.(*ole.OleError).Code() - if oleCode != ole.S_OK && oleCode != S_FALSE { - return nil, nil, err - } - } - - unknown, err = oleutil.CreateObject("WbemScripting.SWbemLocator") - if err != nil { - return nil, nil, err - } else if unknown == nil { - return nil, nil, ErrNilCreateObject - } - - wmi, err = unknown.QueryInterface(ole.IID_IDispatch) - if err != nil { - return nil, nil, err - } - - // service is a SWbemServices - serviceRaw, err = oleutil.CallMethod(wmi, "ConnectServer", connectServerArgs...) - if err != nil { - return nil, nil, err - } - - return serviceRaw.ToIDispatch(), deferFn, nil -} - -// CallMethod calls a WMI method named methodName on an instance -// of the class named className. It passes in the arguments given -// in params. Use connectServerArgs to customize the machine and -// namespace; by default, the local machine and default namespace -// are used. See -// https://docs.microsoft.com/en-us/windows/desktop/WmiSdk/swbemlocator-connectserver -// for details. -func (c *Client) CallMethod(connectServerArgs []interface{}, className, methodName string, params []interface{}) (int32, error) { - service, cleanup, err := c.coinitService(connectServerArgs...) - if err != nil { - return 0, fmt.Errorf("coinit: %v", err) - } - defer cleanup() - - // Get class - classRaw, err := oleutil.CallMethod(service, "Get", className) - if err != nil { - return 0, fmt.Errorf("CallMethod Get class %s: %v", className, err) - } - class := classRaw.ToIDispatch() - defer classRaw.Clear() - - // Run method - resultRaw, err := oleutil.CallMethod(class, methodName, params...) - if err != nil { - return 0, fmt.Errorf("CallMethod %s.%s: %v", className, methodName, err) - } - resultInt, ok := resultRaw.Value().(int32) - if !ok { - return 0, fmt.Errorf("return value was not an int32: %v (%T)", resultRaw, resultRaw) - } - - return resultInt, nil -} - -// Query runs the WQL query and appends the values to dst. -// -// dst must have type *[]S or *[]*S, for some struct type S. Fields selected in -// the query must have the same name in dst. Supported types are all signed and -// unsigned integers, time.Time, string, bool, or a pointer to one of those. -// Array types are not supported. -// -// By default, the local machine and default namespace are used. These can be -// changed using connectServerArgs. See -// https://docs.microsoft.com/en-us/windows/desktop/WmiSdk/swbemlocator-connectserver -// for details. -func (c *Client) Query(query string, dst interface{}, connectServerArgs ...interface{}) error { - dv := reflect.ValueOf(dst) - if dv.Kind() != reflect.Ptr || dv.IsNil() { - return ErrInvalidEntityType - } - dv = dv.Elem() - mat, elemType := checkMultiArg(dv) - if mat == multiArgTypeInvalid { - return ErrInvalidEntityType - } - - lock.Lock() - defer lock.Unlock() - runtime.LockOSThread() - defer runtime.UnlockOSThread() - - service, cleanup, err := c.coinitService(connectServerArgs...) - if err != nil { - return err - } - defer cleanup() - - // result is a SWBemObjectSet - resultRaw, err := oleutil.CallMethod(service, "ExecQuery", query) - if err != nil { - return err - } - result := resultRaw.ToIDispatch() - defer resultRaw.Clear() - - count, err := oleInt64(result, "Count") - if err != nil { - return err - } - - enumProperty, err := result.GetProperty("_NewEnum") - if err != nil { - return err - } - defer enumProperty.Clear() - - enum, err := enumProperty.ToIUnknown().IEnumVARIANT(ole.IID_IEnumVariant) - if err != nil { - return err - } - if enum == nil { - return fmt.Errorf("can't get IEnumVARIANT, enum is nil") - } - defer enum.Release() - - // Initialize a slice with Count capacity - dv.Set(reflect.MakeSlice(dv.Type(), 0, int(count))) - - var errFieldMismatch error - for itemRaw, length, err := enum.Next(1); length > 0; itemRaw, length, err = enum.Next(1) { - if err != nil { - return err - } - - err := func() error { - // item is a SWbemObject, but really a Win32_Process - item := itemRaw.ToIDispatch() - defer item.Release() - - ev := reflect.New(elemType) - if err = c.loadEntity(ev.Interface(), item); err != nil { - if _, ok := err.(*ErrFieldMismatch); ok { - // We continue loading entities even in the face of field mismatch errors. - // If we encounter any other error, that other error is returned. Otherwise, - // an ErrFieldMismatch is returned. - errFieldMismatch = err - } else { - return err - } - } - if mat != multiArgTypeStructPtr { - ev = ev.Elem() - } - dv.Set(reflect.Append(dv, ev)) - return nil - }() - if err != nil { - return err - } - } - return errFieldMismatch -} - -// ErrFieldMismatch is returned when a field is to be loaded into a different -// type than the one it was stored from, or when a field is missing or -// unexported in the destination struct. -// StructType is the type of the struct pointed to by the destination argument. -type ErrFieldMismatch struct { - StructType reflect.Type - FieldName string - Reason string -} - -func (e *ErrFieldMismatch) Error() string { - return fmt.Sprintf("wmi: cannot load field %q into a %q: %s", - e.FieldName, e.StructType, e.Reason) -} - -var timeType = reflect.TypeOf(time.Time{}) - -// loadEntity loads a SWbemObject into a struct pointer. -func (c *Client) loadEntity(dst interface{}, src *ole.IDispatch) (errFieldMismatch error) { - v := reflect.ValueOf(dst).Elem() - for i := 0; i < v.NumField(); i++ { - f := v.Field(i) - of := f - isPtr := f.Kind() == reflect.Ptr - n := v.Type().Field(i).Name - if n[0] < 'A' || n[0] > 'Z' { - continue - } - if !f.CanSet() { - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "CanSet() is false", - } - } - prop, err := oleutil.GetProperty(src, n) - if err != nil { - if !c.AllowMissingFields { - errFieldMismatch = &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "no such struct field", - } - } - continue - } - defer prop.Clear() - - if isPtr && !(c.PtrNil && prop.VT == 0x1) { - ptr := reflect.New(f.Type().Elem()) - f.Set(ptr) - f = f.Elem() - } - - if prop.VT == 0x1 { //VT_NULL - continue - } - - switch val := prop.Value().(type) { - case int8, int16, int32, int64, int: - v := reflect.ValueOf(val).Int() - switch f.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - f.SetInt(v) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - f.SetUint(uint64(v)) - default: - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "not an integer class", - } - } - case uint8, uint16, uint32, uint64: - v := reflect.ValueOf(val).Uint() - switch f.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - f.SetInt(int64(v)) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - f.SetUint(v) - default: - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "not an integer class", - } - } - case string: - switch f.Kind() { - case reflect.String: - f.SetString(val) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - iv, err := strconv.ParseInt(val, 10, 64) - if err != nil { - return err - } - f.SetInt(iv) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - uv, err := strconv.ParseUint(val, 10, 64) - if err != nil { - return err - } - f.SetUint(uv) - case reflect.Struct: - switch f.Type() { - case timeType: - if len(val) == 25 { - mins, err := strconv.Atoi(val[22:]) - if err != nil { - return err - } - val = val[:22] + fmt.Sprintf("%02d%02d", mins/60, mins%60) - } - t, err := time.Parse("20060102150405.000000-0700", val) - if err != nil { - return err - } - f.Set(reflect.ValueOf(t)) - } - } - case bool: - switch f.Kind() { - case reflect.Bool: - f.SetBool(val) - default: - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "not a bool", - } - } - case float32: - switch f.Kind() { - case reflect.Float32: - f.SetFloat(float64(val)) - default: - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "not a Float32", - } - } - default: - if f.Kind() == reflect.Slice { - switch f.Type().Elem().Kind() { - case reflect.String: - safeArray := prop.ToArray() - if safeArray != nil { - arr := safeArray.ToValueArray() - fArr := reflect.MakeSlice(f.Type(), len(arr), len(arr)) - for i, v := range arr { - s := fArr.Index(i) - s.SetString(v.(string)) - } - f.Set(fArr) - } - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: - safeArray := prop.ToArray() - if safeArray != nil { - arr := safeArray.ToValueArray() - fArr := reflect.MakeSlice(f.Type(), len(arr), len(arr)) - for i, v := range arr { - s := fArr.Index(i) - s.SetUint(reflect.ValueOf(v).Uint()) - } - f.Set(fArr) - } - case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - safeArray := prop.ToArray() - if safeArray != nil { - arr := safeArray.ToValueArray() - fArr := reflect.MakeSlice(f.Type(), len(arr), len(arr)) - for i, v := range arr { - s := fArr.Index(i) - s.SetInt(reflect.ValueOf(v).Int()) - } - f.Set(fArr) - } - default: - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: fmt.Sprintf("unsupported slice type (%T)", val), - } - } - } else { - typeof := reflect.TypeOf(val) - if typeof == nil && (isPtr || c.NonePtrZero) { - if (isPtr && c.PtrNil) || (!isPtr && c.NonePtrZero) { - of.Set(reflect.Zero(of.Type())) - } - break - } - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: fmt.Sprintf("unsupported type (%T)", val), - } - } - } - } - return errFieldMismatch -} - -type multiArgType int - -const ( - multiArgTypeInvalid multiArgType = iota - multiArgTypeStruct - multiArgTypeStructPtr -) - -// checkMultiArg checks that v has type []S, []*S for some struct type S. -// -// It returns what category the slice's elements are, and the reflect.Type -// that represents S. -func checkMultiArg(v reflect.Value) (m multiArgType, elemType reflect.Type) { - if v.Kind() != reflect.Slice { - return multiArgTypeInvalid, nil - } - elemType = v.Type().Elem() - switch elemType.Kind() { - case reflect.Struct: - return multiArgTypeStruct, elemType - case reflect.Ptr: - elemType = elemType.Elem() - if elemType.Kind() == reflect.Struct { - return multiArgTypeStructPtr, elemType - } - } - return multiArgTypeInvalid, nil -} - -func oleInt64(item *ole.IDispatch, prop string) (int64, error) { - v, err := oleutil.GetProperty(item, prop) - if err != nil { - return 0, err - } - defer v.Clear() - - i := int64(v.Val) - return i, nil -} - -// CreateQuery returns a WQL query string that queries all columns of src. where -// is an optional string that is appended to the query, to be used with WHERE -// clauses. In such a case, the "WHERE" string should appear at the beginning. -// The wmi class is obtained by the name of the type. You can pass a optional -// class throught the variadic class parameter which is useful for anonymous -// structs. -func CreateQuery(src interface{}, where string, class ...string) string { - var b bytes.Buffer - b.WriteString("SELECT ") - s := reflect.Indirect(reflect.ValueOf(src)) - t := s.Type() - if s.Kind() == reflect.Slice { - t = t.Elem() - } - if t.Kind() != reflect.Struct { - return "" - } - var fields []string - for i := 0; i < t.NumField(); i++ { - fields = append(fields, t.Field(i).Name) - } - b.WriteString(strings.Join(fields, ", ")) - b.WriteString(" FROM ") - if len(class) > 0 { - b.WriteString(class[0]) - } else { - b.WriteString(t.Name()) - } - b.WriteString(" " + where) - return b.String() -} diff --git a/vendor/go.etcd.io/etcd/api/v3/LICENSE b/vendor/go.etcd.io/etcd/api/v3/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/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/go.etcd.io/etcd/api/v3/authpb/auth.pb.go b/vendor/go.etcd.io/etcd/api/v3/authpb/auth.pb.go deleted file mode 100644 index 16affcd62cf..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/authpb/auth.pb.go +++ /dev/null @@ -1,1158 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: auth.proto - -package authpb - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" -) - -// 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.ProtoPackageIsVersion3 // please upgrade the proto package - -type Permission_Type int32 - -const ( - READ Permission_Type = 0 - WRITE Permission_Type = 1 - READWRITE Permission_Type = 2 -) - -var Permission_Type_name = map[int32]string{ - 0: "READ", - 1: "WRITE", - 2: "READWRITE", -} - -var Permission_Type_value = map[string]int32{ - "READ": 0, - "WRITE": 1, - "READWRITE": 2, -} - -func (x Permission_Type) String() string { - return proto.EnumName(Permission_Type_name, int32(x)) -} - -func (Permission_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8bbd6f3875b0e874, []int{2, 0} -} - -type UserAddOptions struct { - NoPassword bool `protobuf:"varint,1,opt,name=no_password,json=noPassword,proto3" json:"no_password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserAddOptions) Reset() { *m = UserAddOptions{} } -func (m *UserAddOptions) String() string { return proto.CompactTextString(m) } -func (*UserAddOptions) ProtoMessage() {} -func (*UserAddOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_8bbd6f3875b0e874, []int{0} -} -func (m *UserAddOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserAddOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UserAddOptions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UserAddOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserAddOptions.Merge(m, src) -} -func (m *UserAddOptions) XXX_Size() int { - return m.Size() -} -func (m *UserAddOptions) XXX_DiscardUnknown() { - xxx_messageInfo_UserAddOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_UserAddOptions proto.InternalMessageInfo - -// User is a single entry in the bucket authUsers -type User struct { - Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Password []byte `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"` - Options *UserAddOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *User) Reset() { *m = User{} } -func (m *User) String() string { return proto.CompactTextString(m) } -func (*User) ProtoMessage() {} -func (*User) Descriptor() ([]byte, []int) { - return fileDescriptor_8bbd6f3875b0e874, []int{1} -} -func (m *User) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_User.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *User) XXX_Merge(src proto.Message) { - xxx_messageInfo_User.Merge(m, src) -} -func (m *User) XXX_Size() int { - return m.Size() -} -func (m *User) XXX_DiscardUnknown() { - xxx_messageInfo_User.DiscardUnknown(m) -} - -var xxx_messageInfo_User proto.InternalMessageInfo - -// Permission is a single entity -type Permission struct { - PermType Permission_Type `protobuf:"varint,1,opt,name=permType,proto3,enum=authpb.Permission_Type" json:"permType,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - RangeEnd []byte `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Permission) Reset() { *m = Permission{} } -func (m *Permission) String() string { return proto.CompactTextString(m) } -func (*Permission) ProtoMessage() {} -func (*Permission) Descriptor() ([]byte, []int) { - return fileDescriptor_8bbd6f3875b0e874, []int{2} -} -func (m *Permission) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Permission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Permission.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Permission) XXX_Merge(src proto.Message) { - xxx_messageInfo_Permission.Merge(m, src) -} -func (m *Permission) XXX_Size() int { - return m.Size() -} -func (m *Permission) XXX_DiscardUnknown() { - xxx_messageInfo_Permission.DiscardUnknown(m) -} - -var xxx_messageInfo_Permission proto.InternalMessageInfo - -// Role is a single entry in the bucket authRoles -type Role struct { - Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - KeyPermission []*Permission `protobuf:"bytes,2,rep,name=keyPermission,proto3" json:"keyPermission,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Role) Reset() { *m = Role{} } -func (m *Role) String() string { return proto.CompactTextString(m) } -func (*Role) ProtoMessage() {} -func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_8bbd6f3875b0e874, []int{3} -} -func (m *Role) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Role.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Role) XXX_Merge(src proto.Message) { - xxx_messageInfo_Role.Merge(m, src) -} -func (m *Role) XXX_Size() int { - return m.Size() -} -func (m *Role) XXX_DiscardUnknown() { - xxx_messageInfo_Role.DiscardUnknown(m) -} - -var xxx_messageInfo_Role proto.InternalMessageInfo - -func init() { - proto.RegisterEnum("authpb.Permission_Type", Permission_Type_name, Permission_Type_value) - proto.RegisterType((*UserAddOptions)(nil), "authpb.UserAddOptions") - proto.RegisterType((*User)(nil), "authpb.User") - proto.RegisterType((*Permission)(nil), "authpb.Permission") - proto.RegisterType((*Role)(nil), "authpb.Role") -} - -func init() { proto.RegisterFile("auth.proto", fileDescriptor_8bbd6f3875b0e874) } - -var fileDescriptor_8bbd6f3875b0e874 = []byte{ - // 338 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xcf, 0x4e, 0xea, 0x40, - 0x14, 0xc6, 0x3b, 0xb4, 0x70, 0xdb, 0xc3, 0x85, 0x90, 0x13, 0x72, 0x6f, 0x83, 0x49, 0x6d, 0xba, - 0x6a, 0x5c, 0x54, 0x85, 0x8d, 0x5b, 0x8c, 0x2c, 0x5c, 0x49, 0x26, 0x18, 0x97, 0xa4, 0xa4, 0x13, - 0x24, 0xc0, 0x4c, 0x33, 0x83, 0x31, 0x6c, 0x7c, 0x0e, 0x17, 0x3e, 0x10, 0x4b, 0x1e, 0x41, 0xf0, - 0x45, 0x4c, 0x67, 0xf8, 0x13, 0xa2, 0xbb, 0xef, 0x7c, 0xe7, 0xfb, 0x66, 0x7e, 0x99, 0x01, 0x48, - 0x5f, 0x16, 0xcf, 0x49, 0x2e, 0xc5, 0x42, 0x60, 0xa5, 0xd0, 0xf9, 0xa8, 0xd5, 0x1c, 0x8b, 0xb1, - 0xd0, 0xd6, 0x65, 0xa1, 0xcc, 0x36, 0xba, 0x86, 0xfa, 0xa3, 0x62, 0xb2, 0x9b, 0x65, 0x0f, 0xf9, - 0x62, 0x22, 0xb8, 0xc2, 0x73, 0xa8, 0x72, 0x31, 0xcc, 0x53, 0xa5, 0x5e, 0x85, 0xcc, 0x7c, 0x12, - 0x92, 0xd8, 0xa5, 0xc0, 0x45, 0x7f, 0xe7, 0x44, 0x6f, 0xe0, 0x14, 0x15, 0x44, 0x70, 0x78, 0x3a, - 0x67, 0x3a, 0xf1, 0x97, 0x6a, 0x8d, 0x2d, 0x70, 0x0f, 0xcd, 0x92, 0xf6, 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x00, -} - -func (m *UserAddOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserAddOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserAddOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.NoPassword { - i-- - if m.NoPassword { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *User) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *User) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Options != nil { - { - size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuth(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Roles) > 0 { - for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Roles[iNdEx]) - copy(dAtA[i:], m.Roles[iNdEx]) - i = encodeVarintAuth(dAtA, i, uint64(len(m.Roles[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Password) > 0 { - i -= len(m.Password) - copy(dAtA[i:], m.Password) - i = encodeVarintAuth(dAtA, i, uint64(len(m.Password))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintAuth(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Permission) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Permission) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Permission) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.RangeEnd) > 0 { - i -= len(m.RangeEnd) - copy(dAtA[i:], m.RangeEnd) - i = encodeVarintAuth(dAtA, i, uint64(len(m.RangeEnd))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintAuth(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if m.PermType != 0 { - i = encodeVarintAuth(dAtA, i, uint64(m.PermType)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Role) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Role) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Role) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.KeyPermission) > 0 { - for iNdEx := len(m.KeyPermission) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.KeyPermission[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuth(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintAuth(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAuth(dAtA []byte, offset int, v uint64) int { - offset -= sovAuth(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *UserAddOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoPassword { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *User) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovAuth(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovAuth(uint64(l)) - } - if len(m.Roles) > 0 { - for _, s := range m.Roles { - l = len(s) - n += 1 + l + sovAuth(uint64(l)) - } - } - if m.Options != nil { - l = m.Options.Size() - n += 1 + l + sovAuth(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Permission) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PermType != 0 { - n += 1 + sovAuth(uint64(m.PermType)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovAuth(uint64(l)) - } - l = len(m.RangeEnd) - if l > 0 { - n += 1 + l + sovAuth(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Role) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovAuth(uint64(l)) - } - if len(m.KeyPermission) > 0 { - for _, e := range m.KeyPermission { - l = e.Size() - n += 1 + l + sovAuth(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAuth(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAuth(x uint64) (n int) { - return sovAuth(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *UserAddOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserAddOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserAddOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NoPassword", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NoPassword = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAuth(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuth - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *User) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: User: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: User: 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 byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAuth - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...) - if m.Name == nil { - m.Name = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAuth - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = append(m.Password[:0], dAtA[iNdEx:postIndex]...) - if m.Password == nil { - m.Password = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAuth - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Options == nil { - m.Options = &UserAddOptions{} - } - if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuth(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuth - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Permission) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Permission: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Permission: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PermType", wireType) - } - m.PermType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PermType |= Permission_Type(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAuth - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAuth - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RangeEnd = append(m.RangeEnd[:0], dAtA[iNdEx:postIndex]...) - if m.RangeEnd == nil { - m.RangeEnd = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuth(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuth - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - 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 ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 Name", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAuth - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...) - if m.Name == nil { - m.Name = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyPermission", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyPermission = append(m.KeyPermission, &Permission{}) - if err := m.KeyPermission[len(m.KeyPermission)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuth(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuth - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAuth(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAuth - } - 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, ErrIntOverflowAuth - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAuth - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAuth - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAuth - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAuth - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAuth = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAuth = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAuth = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.etcd.io/etcd/api/v3/authpb/auth.proto b/vendor/go.etcd.io/etcd/api/v3/authpb/auth.proto deleted file mode 100644 index 8f82b7cf1e4..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/authpb/auth.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; -package authpb; - -import "gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.goproto_getters_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; - -message UserAddOptions { - bool no_password = 1; -}; - -// User is a single entry in the bucket authUsers -message User { - bytes name = 1; - bytes password = 2; - repeated string roles = 3; - UserAddOptions options = 4; -} - -// Permission is a single entity -message Permission { - enum Type { - READ = 0; - WRITE = 1; - READWRITE = 2; - } - Type permType = 1; - - bytes key = 2; - bytes range_end = 3; -} - -// Role is a single entry in the bucket authRoles -message Role { - bytes name = 1; - - repeated Permission keyPermission = 2; -} diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.pb.go b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.pb.go deleted file mode 100644 index 38434d09c56..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.pb.go +++ /dev/null @@ -1,1002 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: etcdserver.proto - -package etcdserverpb - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" -) - -// 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.ProtoPackageIsVersion3 // please upgrade the proto package - -type Request struct { - ID uint64 `protobuf:"varint,1,opt,name=ID" json:"ID"` - Method string `protobuf:"bytes,2,opt,name=Method" json:"Method"` - Path string `protobuf:"bytes,3,opt,name=Path" json:"Path"` - Val string `protobuf:"bytes,4,opt,name=Val" json:"Val"` - Dir bool `protobuf:"varint,5,opt,name=Dir" json:"Dir"` - PrevValue string `protobuf:"bytes,6,opt,name=PrevValue" json:"PrevValue"` - PrevIndex uint64 `protobuf:"varint,7,opt,name=PrevIndex" json:"PrevIndex"` - PrevExist *bool `protobuf:"varint,8,opt,name=PrevExist" json:"PrevExist,omitempty"` - Expiration int64 `protobuf:"varint,9,opt,name=Expiration" json:"Expiration"` - Wait bool `protobuf:"varint,10,opt,name=Wait" json:"Wait"` - Since uint64 `protobuf:"varint,11,opt,name=Since" json:"Since"` - Recursive bool `protobuf:"varint,12,opt,name=Recursive" json:"Recursive"` - Sorted bool `protobuf:"varint,13,opt,name=Sorted" json:"Sorted"` - Quorum bool `protobuf:"varint,14,opt,name=Quorum" json:"Quorum"` - Time int64 `protobuf:"varint,15,opt,name=Time" json:"Time"` - Stream bool `protobuf:"varint,16,opt,name=Stream" json:"Stream"` - Refresh *bool `protobuf:"varint,17,opt,name=Refresh" json:"Refresh,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Request) Reset() { *m = Request{} } -func (m *Request) String() string { return proto.CompactTextString(m) } -func (*Request) ProtoMessage() {} -func (*Request) Descriptor() ([]byte, []int) { - return fileDescriptor_09ffbeb3bebbce7e, []int{0} -} -func (m *Request) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Request.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Request) XXX_Merge(src proto.Message) { - xxx_messageInfo_Request.Merge(m, src) -} -func (m *Request) XXX_Size() int { - return m.Size() -} -func (m *Request) XXX_DiscardUnknown() { - xxx_messageInfo_Request.DiscardUnknown(m) -} - -var xxx_messageInfo_Request proto.InternalMessageInfo - -type Metadata struct { - NodeID uint64 `protobuf:"varint,1,opt,name=NodeID" json:"NodeID"` - ClusterID uint64 `protobuf:"varint,2,opt,name=ClusterID" json:"ClusterID"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { - return fileDescriptor_09ffbeb3bebbce7e, []int{1} -} -func (m *Metadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metadata.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Metadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metadata.Merge(m, src) -} -func (m *Metadata) XXX_Size() int { - return m.Size() -} -func (m *Metadata) XXX_DiscardUnknown() { - xxx_messageInfo_Metadata.DiscardUnknown(m) -} - -var xxx_messageInfo_Metadata proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Request)(nil), "etcdserverpb.Request") - proto.RegisterType((*Metadata)(nil), "etcdserverpb.Metadata") -} - -func init() { proto.RegisterFile("etcdserver.proto", fileDescriptor_09ffbeb3bebbce7e) } - -var fileDescriptor_09ffbeb3bebbce7e = []byte{ - // 380 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0xd2, 0xdd, 0x6e, 0xda, 0x30, - 0x14, 0x07, 0x70, 0x0c, 0xe1, 0xcb, 0x63, 0x1b, 0xb3, 0xd0, 0x74, 0x84, 0xa6, 0x2c, 0x42, 0xbb, - 0xc8, 0xd5, 0xf6, 0x0e, 0x2c, 0x5c, 0x44, 0x2a, 0x15, 0x0d, 0x15, 0xbd, 0x76, 0xc9, 0x29, 0x58, - 0x02, 0x4c, 0x1d, 0x07, 0xf1, 0x06, 0x7d, 0x85, 0x3e, 0x12, 0x97, 0x7d, 0x82, 0xaa, 0xa5, 0x2f, - 0x52, 0x39, 0x24, 0xc4, 0xed, 0x5d, 0xf4, 0xfb, 0x9f, 0x1c, 0x1f, 0x7f, 0xd0, 0x2e, 0xea, 0x79, - 0x9c, 0xa0, 0xda, 0xa1, 0xfa, 0xbb, 0x55, 0x52, 0x4b, 0xd6, 0x29, 0x65, 0x7b, 0xdb, 0xef, 0x2d, - 0xe4, 0x42, 0x66, 0xc1, 0x3f, 0xf3, 0x75, 0xaa, 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, 0xd6, - 0x08, 0xdf, 0xad, 0xa9, 0x33, 0xc9, 0xba, 0x6a, 0x85, 0x7c, 0x0d, 0xdd, 0x0f, 0x5d, 0x33, 0x63, - 0xae, 0xb9, 0xe8, 0x3b, 0x85, 0xc9, 0x12, 0x7e, 0x58, 0xa7, 0x52, 0xe0, 0xe0, 0x82, 0xb6, 0xc6, - 0xa8, 0x79, 0xcc, 0x35, 0x37, 0x9d, 0x2e, 0x65, 0x8c, 0x9f, 0x5e, 0x43, 0x6e, 0x66, 0x87, 0xff, - 0x57, 0x69, 0xa2, 0x51, 0x85, 0x41, 0xf6, 0x28, 0xce, 0xb7, 0x70, 0xe6, 0x61, 0xef, 0xf0, 0xea, - 0x56, 0x0e, 0x47, 0x97, 0x3c, 0x1d, 0x5d, 0xf2, 0x72, 0x74, 0xc9, 0xe3, 0x9b, 0x5b, 0x79, 0x0f, - 0x00, 0x00, 0xff, 0xff, 0xee, 0x40, 0xba, 0xd6, 0xa4, 0x02, 0x00, 0x00, -} - -func (m *Request) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Request) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Refresh != nil { - i-- - if *m.Refresh { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - i-- - if m.Stream { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - i = encodeVarintEtcdserver(dAtA, i, uint64(m.Time)) - i-- - dAtA[i] = 0x78 - i-- - if m.Quorum { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x70 - i-- - if m.Sorted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x68 - i-- - if m.Recursive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - i = encodeVarintEtcdserver(dAtA, i, uint64(m.Since)) - i-- - dAtA[i] = 0x58 - i-- - if m.Wait { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - i = encodeVarintEtcdserver(dAtA, i, uint64(m.Expiration)) - i-- - dAtA[i] = 0x48 - if m.PrevExist != nil { - i-- - if *m.PrevExist { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - i = encodeVarintEtcdserver(dAtA, i, uint64(m.PrevIndex)) - i-- - dAtA[i] = 0x38 - i -= len(m.PrevValue) - copy(dAtA[i:], m.PrevValue) - i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.PrevValue))) - i-- - dAtA[i] = 0x32 - i-- - if m.Dir { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - i -= len(m.Val) - copy(dAtA[i:], m.Val) - i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Val))) - i-- - dAtA[i] = 0x22 - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0x1a - i -= len(m.Method) - copy(dAtA[i:], m.Method) - i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Method))) - i-- - dAtA[i] = 0x12 - i = encodeVarintEtcdserver(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func (m *Metadata) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - i = encodeVarintEtcdserver(dAtA, i, uint64(m.ClusterID)) - i-- - dAtA[i] = 0x10 - i = encodeVarintEtcdserver(dAtA, i, uint64(m.NodeID)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func encodeVarintEtcdserver(dAtA []byte, offset int, v uint64) int { - offset -= sovEtcdserver(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Request) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovEtcdserver(uint64(m.ID)) - l = len(m.Method) - n += 1 + l + sovEtcdserver(uint64(l)) - l = len(m.Path) - n += 1 + l + sovEtcdserver(uint64(l)) - l = len(m.Val) - n += 1 + l + sovEtcdserver(uint64(l)) - n += 2 - l = len(m.PrevValue) - n += 1 + l + sovEtcdserver(uint64(l)) - n += 1 + sovEtcdserver(uint64(m.PrevIndex)) - if m.PrevExist != nil { - n += 2 - } - n += 1 + sovEtcdserver(uint64(m.Expiration)) - n += 2 - n += 1 + sovEtcdserver(uint64(m.Since)) - n += 2 - n += 2 - n += 2 - n += 1 + sovEtcdserver(uint64(m.Time)) - n += 3 - if m.Refresh != nil { - n += 3 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Metadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovEtcdserver(uint64(m.NodeID)) - n += 1 + sovEtcdserver(uint64(m.ClusterID)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovEtcdserver(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEtcdserver(x uint64) (n int) { - return sovEtcdserver(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Request) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Request: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEtcdserver - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEtcdserver - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Method = 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 ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEtcdserver - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEtcdserver - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Val", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEtcdserver - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEtcdserver - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Val = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Dir", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Dir = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEtcdserver - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEtcdserver - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrevValue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevIndex", wireType) - } - m.PrevIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PrevIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevExist", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.PrevExist = &b - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) - } - m.Expiration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Expiration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Wait", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Wait = bool(v != 0) - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Since", wireType) - } - m.Since = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Since |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Recursive", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Recursive = bool(v != 0) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sorted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Sorted = bool(v != 0) - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Quorum", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Quorum = bool(v != 0) - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) - } - m.Time = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Time |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Stream", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Stream = bool(v != 0) - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Refresh", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Refresh = &b - default: - iNdEx = preIndex - skippy, err := skipEtcdserver(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEtcdserver - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Metadata) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Metadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType) - } - m.NodeID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NodeID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterID", wireType) - } - m.ClusterID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClusterID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipEtcdserver(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEtcdserver - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEtcdserver(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEtcdserver - } - 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, ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEtcdserver - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEtcdserver - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEtcdserver - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEtcdserver - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEtcdserver = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEtcdserver = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEtcdserver = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.proto b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.proto deleted file mode 100644 index 25e0aca5d9f..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto2"; -package etcdserverpb; - -import "gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.goproto_getters_all) = false; - -message Request { - optional uint64 ID = 1 [(gogoproto.nullable) = false]; - optional string Method = 2 [(gogoproto.nullable) = false]; - optional string Path = 3 [(gogoproto.nullable) = false]; - optional string Val = 4 [(gogoproto.nullable) = false]; - optional bool Dir = 5 [(gogoproto.nullable) = false]; - optional string PrevValue = 6 [(gogoproto.nullable) = false]; - optional uint64 PrevIndex = 7 [(gogoproto.nullable) = false]; - optional bool PrevExist = 8 [(gogoproto.nullable) = true]; - optional int64 Expiration = 9 [(gogoproto.nullable) = false]; - optional bool Wait = 10 [(gogoproto.nullable) = false]; - optional uint64 Since = 11 [(gogoproto.nullable) = false]; - optional bool Recursive = 12 [(gogoproto.nullable) = false]; - optional bool Sorted = 13 [(gogoproto.nullable) = false]; - optional bool Quorum = 14 [(gogoproto.nullable) = false]; - optional int64 Time = 15 [(gogoproto.nullable) = false]; - optional bool Stream = 16 [(gogoproto.nullable) = false]; - optional bool Refresh = 17 [(gogoproto.nullable) = true]; -} - -message Metadata { - optional uint64 NodeID = 1 [(gogoproto.nullable) = false]; - optional uint64 ClusterID = 2 [(gogoproto.nullable) = false]; -} diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.pb.go b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.pb.go deleted file mode 100644 index b94a7bfd9d9..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.pb.go +++ /dev/null @@ -1,2673 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: raft_internal.proto - -package etcdserverpb - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - membershippb "go.etcd.io/etcd/api/v3/membershippb" -) - -// 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.ProtoPackageIsVersion3 // please upgrade the proto package - -type RequestHeader struct { - ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - // username is a username that is associated with an auth token of gRPC connection - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - // auth_revision is a revision number of auth.authStore. It is not related to mvcc - AuthRevision uint64 `protobuf:"varint,3,opt,name=auth_revision,json=authRevision,proto3" json:"auth_revision,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RequestHeader) Reset() { *m = RequestHeader{} } -func (m *RequestHeader) String() string { return proto.CompactTextString(m) } -func (*RequestHeader) ProtoMessage() {} -func (*RequestHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_b4c9a9be0cfca103, []int{0} -} -func (m *RequestHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestHeader.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RequestHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestHeader.Merge(m, src) -} -func (m *RequestHeader) XXX_Size() int { - return m.Size() -} -func (m *RequestHeader) XXX_DiscardUnknown() { - xxx_messageInfo_RequestHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestHeader proto.InternalMessageInfo - -// An InternalRaftRequest is the union of all requests which can be -// sent via raft. -type InternalRaftRequest struct { - Header *RequestHeader `protobuf:"bytes,100,opt,name=header,proto3" json:"header,omitempty"` - ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - V2 *Request `protobuf:"bytes,2,opt,name=v2,proto3" json:"v2,omitempty"` - Range *RangeRequest `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"` - Put *PutRequest `protobuf:"bytes,4,opt,name=put,proto3" json:"put,omitempty"` - DeleteRange *DeleteRangeRequest `protobuf:"bytes,5,opt,name=delete_range,json=deleteRange,proto3" json:"delete_range,omitempty"` - Txn *TxnRequest `protobuf:"bytes,6,opt,name=txn,proto3" json:"txn,omitempty"` - Compaction *CompactionRequest `protobuf:"bytes,7,opt,name=compaction,proto3" json:"compaction,omitempty"` - LeaseGrant *LeaseGrantRequest `protobuf:"bytes,8,opt,name=lease_grant,json=leaseGrant,proto3" json:"lease_grant,omitempty"` - LeaseRevoke *LeaseRevokeRequest `protobuf:"bytes,9,opt,name=lease_revoke,json=leaseRevoke,proto3" json:"lease_revoke,omitempty"` - Alarm *AlarmRequest `protobuf:"bytes,10,opt,name=alarm,proto3" json:"alarm,omitempty"` - LeaseCheckpoint *LeaseCheckpointRequest `protobuf:"bytes,11,opt,name=lease_checkpoint,json=leaseCheckpoint,proto3" json:"lease_checkpoint,omitempty"` - AuthEnable *AuthEnableRequest `protobuf:"bytes,1000,opt,name=auth_enable,json=authEnable,proto3" json:"auth_enable,omitempty"` - AuthDisable *AuthDisableRequest `protobuf:"bytes,1011,opt,name=auth_disable,json=authDisable,proto3" json:"auth_disable,omitempty"` - AuthStatus *AuthStatusRequest `protobuf:"bytes,1013,opt,name=auth_status,json=authStatus,proto3" json:"auth_status,omitempty"` - Authenticate *InternalAuthenticateRequest `protobuf:"bytes,1012,opt,name=authenticate,proto3" json:"authenticate,omitempty"` - AuthUserAdd *AuthUserAddRequest `protobuf:"bytes,1100,opt,name=auth_user_add,json=authUserAdd,proto3" json:"auth_user_add,omitempty"` - AuthUserDelete *AuthUserDeleteRequest `protobuf:"bytes,1101,opt,name=auth_user_delete,json=authUserDelete,proto3" json:"auth_user_delete,omitempty"` - AuthUserGet *AuthUserGetRequest `protobuf:"bytes,1102,opt,name=auth_user_get,json=authUserGet,proto3" json:"auth_user_get,omitempty"` - AuthUserChangePassword *AuthUserChangePasswordRequest `protobuf:"bytes,1103,opt,name=auth_user_change_password,json=authUserChangePassword,proto3" json:"auth_user_change_password,omitempty"` - AuthUserGrantRole *AuthUserGrantRoleRequest `protobuf:"bytes,1104,opt,name=auth_user_grant_role,json=authUserGrantRole,proto3" json:"auth_user_grant_role,omitempty"` - AuthUserRevokeRole *AuthUserRevokeRoleRequest `protobuf:"bytes,1105,opt,name=auth_user_revoke_role,json=authUserRevokeRole,proto3" json:"auth_user_revoke_role,omitempty"` - AuthUserList *AuthUserListRequest `protobuf:"bytes,1106,opt,name=auth_user_list,json=authUserList,proto3" json:"auth_user_list,omitempty"` - AuthRoleList *AuthRoleListRequest `protobuf:"bytes,1107,opt,name=auth_role_list,json=authRoleList,proto3" json:"auth_role_list,omitempty"` - AuthRoleAdd *AuthRoleAddRequest `protobuf:"bytes,1200,opt,name=auth_role_add,json=authRoleAdd,proto3" json:"auth_role_add,omitempty"` - AuthRoleDelete *AuthRoleDeleteRequest `protobuf:"bytes,1201,opt,name=auth_role_delete,json=authRoleDelete,proto3" json:"auth_role_delete,omitempty"` - AuthRoleGet *AuthRoleGetRequest `protobuf:"bytes,1202,opt,name=auth_role_get,json=authRoleGet,proto3" json:"auth_role_get,omitempty"` - AuthRoleGrantPermission *AuthRoleGrantPermissionRequest `protobuf:"bytes,1203,opt,name=auth_role_grant_permission,json=authRoleGrantPermission,proto3" json:"auth_role_grant_permission,omitempty"` - AuthRoleRevokePermission *AuthRoleRevokePermissionRequest `protobuf:"bytes,1204,opt,name=auth_role_revoke_permission,json=authRoleRevokePermission,proto3" json:"auth_role_revoke_permission,omitempty"` - ClusterVersionSet *membershippb.ClusterVersionSetRequest `protobuf:"bytes,1300,opt,name=cluster_version_set,json=clusterVersionSet,proto3" json:"cluster_version_set,omitempty"` - ClusterMemberAttrSet *membershippb.ClusterMemberAttrSetRequest `protobuf:"bytes,1301,opt,name=cluster_member_attr_set,json=clusterMemberAttrSet,proto3" json:"cluster_member_attr_set,omitempty"` - DowngradeInfoSet *membershippb.DowngradeInfoSetRequest `protobuf:"bytes,1302,opt,name=downgrade_info_set,json=downgradeInfoSet,proto3" json:"downgrade_info_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InternalRaftRequest) Reset() { *m = InternalRaftRequest{} } -func (m *InternalRaftRequest) String() string { return proto.CompactTextString(m) } -func (*InternalRaftRequest) ProtoMessage() {} -func (*InternalRaftRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b4c9a9be0cfca103, []int{1} -} -func (m *InternalRaftRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InternalRaftRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InternalRaftRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InternalRaftRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InternalRaftRequest.Merge(m, src) -} -func (m *InternalRaftRequest) XXX_Size() int { - return m.Size() -} -func (m *InternalRaftRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InternalRaftRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_InternalRaftRequest proto.InternalMessageInfo - -type EmptyResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EmptyResponse) Reset() { *m = EmptyResponse{} } -func (m *EmptyResponse) String() string { return proto.CompactTextString(m) } -func (*EmptyResponse) ProtoMessage() {} -func (*EmptyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b4c9a9be0cfca103, []int{2} -} -func (m *EmptyResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EmptyResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EmptyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_EmptyResponse.Merge(m, src) -} -func (m *EmptyResponse) XXX_Size() int { - return m.Size() -} -func (m *EmptyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_EmptyResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_EmptyResponse proto.InternalMessageInfo - -// What is the difference between AuthenticateRequest (defined in rpc.proto) and InternalAuthenticateRequest? -// InternalAuthenticateRequest has a member that is filled by etcdserver and shouldn't be user-facing. -// For avoiding misusage the field, we have an internal version of AuthenticateRequest. -type InternalAuthenticateRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - // simple_token is generated in API layer (etcdserver/v3_server.go) - SimpleToken string `protobuf:"bytes,3,opt,name=simple_token,json=simpleToken,proto3" json:"simple_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InternalAuthenticateRequest) Reset() { *m = InternalAuthenticateRequest{} } -func (m *InternalAuthenticateRequest) String() string { return proto.CompactTextString(m) } -func (*InternalAuthenticateRequest) ProtoMessage() {} -func (*InternalAuthenticateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b4c9a9be0cfca103, []int{3} -} -func (m *InternalAuthenticateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InternalAuthenticateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InternalAuthenticateRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InternalAuthenticateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InternalAuthenticateRequest.Merge(m, src) -} -func (m *InternalAuthenticateRequest) XXX_Size() int { - return m.Size() -} -func (m *InternalAuthenticateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InternalAuthenticateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_InternalAuthenticateRequest proto.InternalMessageInfo - -func init() { - proto.RegisterType((*RequestHeader)(nil), "etcdserverpb.RequestHeader") - proto.RegisterType((*InternalRaftRequest)(nil), "etcdserverpb.InternalRaftRequest") - proto.RegisterType((*EmptyResponse)(nil), "etcdserverpb.EmptyResponse") - proto.RegisterType((*InternalAuthenticateRequest)(nil), "etcdserverpb.InternalAuthenticateRequest") -} - -func init() { proto.RegisterFile("raft_internal.proto", fileDescriptor_b4c9a9be0cfca103) } - -var fileDescriptor_b4c9a9be0cfca103 = []byte{ - // 1003 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x96, 0xd9, 0x72, 0x1b, 0x45, - 0x14, 0x86, 0x23, 0xc5, 0x71, 0xac, 0x96, 0xed, 0x38, 0x6d, 0x87, 0x34, 0x72, 0x95, 0x70, 0x1c, - 0x12, 0xcc, 0x66, 0x53, 0xca, 0x03, 0x80, 0x90, 0x5c, 0x8e, 0xab, 0x42, 0x70, 0x4d, 0xcc, 0x52, - 0xc5, 0xc5, 0xd0, 0x9a, 0x39, 0x96, 0x06, 0xcf, 0x46, 0x77, 0x4b, 0x31, 0xef, 0x11, 0x28, 0x1e, - 0x83, 0xed, 0x21, 0x72, 0xc1, 0x62, 0xe0, 0x05, 0xc0, 0xdc, 0x70, 0x0f, 0xdc, 0x53, 0xbd, 0xcc, - 0x26, 0xb5, 0x7c, 0xa7, 0xf9, 0xcf, 0x7f, 0xbe, 0x73, 0xba, 0xe7, 0xf4, 0xa8, 0xd1, 0x3a, 0xa3, - 0x27, 0xc2, 0x0d, 0x62, 0x01, 0x2c, 0xa6, 0xe1, 0x6e, 0xca, 0x12, 0x91, 0xe0, 0x65, 0x10, 0x9e, - 0xcf, 0x81, 0x4d, 0x80, 0xa5, 0x83, 0xd6, 0xc6, 0x30, 0x19, 0x26, 0x2a, 0xb0, 0x27, 0x7f, 0x69, - 0x4f, 0x6b, 0xad, 0xf0, 0x18, 0xa5, 0xc1, 0x52, 0xcf, 0xfc, 0xbc, 0x2f, 0x83, 0x7b, 0x34, 0x0d, - 0xf6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 0x3f, 0x79, 0x1a, 0x0f, 0x19, 0xf5, 0xc1, 0x0d, - 0xe2, 0x93, 0x44, 0xd1, 0xbf, 0xd2, 0xf4, 0x7b, 0x55, 0x7a, 0x3f, 0x33, 0x1e, 0xc6, 0x27, 0x49, - 0x89, 0xbc, 0xe6, 0x4f, 0x05, 0xb6, 0x6f, 0xa0, 0x95, 0xfd, 0x28, 0x15, 0x5f, 0x38, 0xc0, 0xd3, - 0x24, 0xe6, 0xb0, 0x9d, 0xa2, 0xcd, 0x4b, 0x3e, 0xcd, 0x18, 0xa3, 0x05, 0x75, 0x07, 0xab, 0xa9, - 0x3b, 0x98, 0xfa, 0x2d, 0xef, 0x66, 0xf9, 0x17, 0xcb, 0xdc, 0xcd, 0xb2, 0x67, 0x7c, 0x07, 0x2d, - 0xf3, 0x20, 0x4a, 0x43, 0x70, 0x45, 0x72, 0x0a, 0xfa, 0x6a, 0xd6, 0x70, 0x9a, 0x5a, 0x3b, 0x96, - 0xd2, 0xbb, 0x1b, 0xcf, 0xff, 0x6c, 0x5f, 0x79, 0x7e, 0xd1, 0xae, 0x9d, 0x5f, 0xb4, 0x6b, 0x7f, - 0x5c, 0xb4, 0x6b, 0x5f, 0xff, 0xd5, 0xbe, 0x32, 0x58, 0x54, 0x17, 0xc3, 0x07, 0xff, 0x07, 0x00, - 0x00, 0xff, 0xff, 0x94, 0x6f, 0x64, 0x0a, 0x98, 0x0a, 0x00, 0x00, -} - -func (m *RequestHeader) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RequestHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.AuthRevision != 0 { - i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthRevision)) - i-- - dAtA[i] = 0x18 - } - if len(m.Username) > 0 { - i -= len(m.Username) - copy(dAtA[i:], m.Username) - i = encodeVarintRaftInternal(dAtA, i, uint64(len(m.Username))) - i-- - dAtA[i] = 0x12 - } - if m.ID != 0 { - i = encodeVarintRaftInternal(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *InternalRaftRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InternalRaftRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InternalRaftRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.DowngradeInfoSet != nil { - { - size, err := m.DowngradeInfoSet.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x51 - i-- - dAtA[i] = 0xb2 - } - if m.ClusterMemberAttrSet != nil { - { - size, err := m.ClusterMemberAttrSet.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x51 - i-- - dAtA[i] = 0xaa - } - if m.ClusterVersionSet != nil { - { - size, err := m.ClusterVersionSet.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x51 - i-- - dAtA[i] = 0xa2 - } - if m.AuthRoleRevokePermission != nil { - { - size, err := m.AuthRoleRevokePermission.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4b - i-- - dAtA[i] = 0xa2 - } - if m.AuthRoleGrantPermission != nil { - { - size, err := m.AuthRoleGrantPermission.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4b - i-- - dAtA[i] = 0x9a - } - if m.AuthRoleGet != nil { - { - size, err := m.AuthRoleGet.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4b - i-- - dAtA[i] = 0x92 - } - if m.AuthRoleDelete != nil { - { - size, err := m.AuthRoleDelete.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4b - i-- - dAtA[i] = 0x8a - } - if m.AuthRoleAdd != nil { - { - size, err := m.AuthRoleAdd.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4b - i-- - dAtA[i] = 0x82 - } - if m.AuthRoleList != nil { - { - size, err := m.AuthRoleList.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x45 - i-- - dAtA[i] = 0x9a - } - if m.AuthUserList != nil { - { - size, err := m.AuthUserList.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x45 - i-- - dAtA[i] = 0x92 - } - if m.AuthUserRevokeRole != nil { - { - size, err := m.AuthUserRevokeRole.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x45 - i-- - dAtA[i] = 0x8a - } - if m.AuthUserGrantRole != nil { - { - size, err := m.AuthUserGrantRole.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x45 - i-- - dAtA[i] = 0x82 - } - if m.AuthUserChangePassword != nil { - { - size, err := m.AuthUserChangePassword.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x44 - i-- - dAtA[i] = 0xfa - } - if m.AuthUserGet != nil { - { - size, err := m.AuthUserGet.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x44 - i-- - dAtA[i] = 0xf2 - } - if m.AuthUserDelete != nil { - { - size, err := m.AuthUserDelete.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x44 - i-- - dAtA[i] = 0xea - } - if m.AuthUserAdd != nil { - { - size, err := m.AuthUserAdd.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x44 - i-- - dAtA[i] = 0xe2 - } - if m.AuthStatus != nil { - { - size, err := m.AuthStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3f - i-- - dAtA[i] = 0xaa - } - if m.Authenticate != nil { - { - size, err := m.Authenticate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3f - i-- - dAtA[i] = 0xa2 - } - if m.AuthDisable != nil { - { - size, err := m.AuthDisable.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3f - i-- - dAtA[i] = 0x9a - } - if m.AuthEnable != nil { - { - size, err := m.AuthEnable.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc2 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xa2 - } - if m.LeaseCheckpoint != nil { - { - size, err := m.LeaseCheckpoint.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - if m.Alarm != nil { - { - size, err := m.Alarm.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.LeaseRevoke != nil { - { - size, err := m.LeaseRevoke.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.LeaseGrant != nil { - { - size, err := m.LeaseGrant.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.Compaction != nil { - { - size, err := m.Compaction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.Txn != nil { - { - size, err := m.Txn.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.DeleteRange != nil { - { - size, err := m.DeleteRange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Put != nil { - { - size, err := m.Put.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Range != nil { - { - size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.V2 != nil { - { - size, err := m.V2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRaftInternal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ID != 0 { - i = encodeVarintRaftInternal(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EmptyResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EmptyResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EmptyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *InternalAuthenticateRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InternalAuthenticateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InternalAuthenticateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.SimpleToken) > 0 { - i -= len(m.SimpleToken) - copy(dAtA[i:], m.SimpleToken) - i = encodeVarintRaftInternal(dAtA, i, uint64(len(m.SimpleToken))) - i-- - dAtA[i] = 0x1a - } - if len(m.Password) > 0 { - i -= len(m.Password) - copy(dAtA[i:], m.Password) - i = encodeVarintRaftInternal(dAtA, i, uint64(len(m.Password))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRaftInternal(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintRaftInternal(dAtA []byte, offset int, v uint64) int { - offset -= sovRaftInternal(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *RequestHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovRaftInternal(uint64(m.ID)) - } - l = len(m.Username) - if l > 0 { - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.AuthRevision != 0 { - n += 1 + sovRaftInternal(uint64(m.AuthRevision)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *InternalRaftRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovRaftInternal(uint64(m.ID)) - } - if m.V2 != nil { - l = m.V2.Size() - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.Range != nil { - l = m.Range.Size() - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.Put != nil { - l = m.Put.Size() - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.DeleteRange != nil { - l = m.DeleteRange.Size() - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.Txn != nil { - l = m.Txn.Size() - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.Compaction != nil { - l = m.Compaction.Size() - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.LeaseGrant != nil { - l = m.LeaseGrant.Size() - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.LeaseRevoke != nil { - l = m.LeaseRevoke.Size() - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.Alarm != nil { - l = m.Alarm.Size() - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.LeaseCheckpoint != nil { - l = m.LeaseCheckpoint.Size() - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.Header != nil { - l = m.Header.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthEnable != nil { - l = m.AuthEnable.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthDisable != nil { - l = m.AuthDisable.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.Authenticate != nil { - l = m.Authenticate.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthStatus != nil { - l = m.AuthStatus.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthUserAdd != nil { - l = m.AuthUserAdd.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthUserDelete != nil { - l = m.AuthUserDelete.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthUserGet != nil { - l = m.AuthUserGet.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthUserChangePassword != nil { - l = m.AuthUserChangePassword.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthUserGrantRole != nil { - l = m.AuthUserGrantRole.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthUserRevokeRole != nil { - l = m.AuthUserRevokeRole.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthUserList != nil { - l = m.AuthUserList.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthRoleList != nil { - l = m.AuthRoleList.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthRoleAdd != nil { - l = m.AuthRoleAdd.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthRoleDelete != nil { - l = m.AuthRoleDelete.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthRoleGet != nil { - l = m.AuthRoleGet.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthRoleGrantPermission != nil { - l = m.AuthRoleGrantPermission.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.AuthRoleRevokePermission != nil { - l = m.AuthRoleRevokePermission.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.ClusterVersionSet != nil { - l = m.ClusterVersionSet.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.ClusterMemberAttrSet != nil { - l = m.ClusterMemberAttrSet.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.DowngradeInfoSet != nil { - l = m.DowngradeInfoSet.Size() - n += 2 + l + sovRaftInternal(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *EmptyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *InternalAuthenticateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRaftInternal(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovRaftInternal(uint64(l)) - } - l = len(m.SimpleToken) - if l > 0 { - n += 1 + l + sovRaftInternal(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovRaftInternal(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRaftInternal(x uint64) (n int) { - return sovRaftInternal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *RequestHeader) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RequestHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthRevision", wireType) - } - m.AuthRevision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AuthRevision |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRaftInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRaftInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InternalRaftRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InternalRaftRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InternalRaftRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field V2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.V2 == nil { - m.V2 = &Request{} - } - if err := m.V2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Range == nil { - m.Range = &RangeRequest{} - } - if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Put", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Put == nil { - m.Put = &PutRequest{} - } - if err := m.Put.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeleteRange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DeleteRange == nil { - m.DeleteRange = &DeleteRangeRequest{} - } - if err := m.DeleteRange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Txn", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Txn == nil { - m.Txn = &TxnRequest{} - } - if err := m.Txn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Compaction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Compaction == nil { - m.Compaction = &CompactionRequest{} - } - if err := m.Compaction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LeaseGrant", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LeaseGrant == nil { - m.LeaseGrant = &LeaseGrantRequest{} - } - if err := m.LeaseGrant.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LeaseRevoke", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LeaseRevoke == nil { - m.LeaseRevoke = &LeaseRevokeRequest{} - } - if err := m.LeaseRevoke.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alarm", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Alarm == nil { - m.Alarm = &AlarmRequest{} - } - if err := m.Alarm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LeaseCheckpoint", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LeaseCheckpoint == nil { - m.LeaseCheckpoint = &LeaseCheckpointRequest{} - } - if err := m.LeaseCheckpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 100: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &RequestHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1000: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthEnable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthEnable == nil { - m.AuthEnable = &AuthEnableRequest{} - } - if err := m.AuthEnable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1011: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthDisable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthDisable == nil { - m.AuthDisable = &AuthDisableRequest{} - } - if err := m.AuthDisable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1012: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authenticate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Authenticate == nil { - m.Authenticate = &InternalAuthenticateRequest{} - } - if err := m.Authenticate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1013: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthStatus", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthStatus == nil { - m.AuthStatus = &AuthStatusRequest{} - } - if err := m.AuthStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1100: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthUserAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthUserAdd == nil { - m.AuthUserAdd = &AuthUserAddRequest{} - } - if err := m.AuthUserAdd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1101: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthUserDelete", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthUserDelete == nil { - m.AuthUserDelete = &AuthUserDeleteRequest{} - } - if err := m.AuthUserDelete.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1102: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthUserGet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthUserGet == nil { - m.AuthUserGet = &AuthUserGetRequest{} - } - if err := m.AuthUserGet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1103: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthUserChangePassword", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthUserChangePassword == nil { - m.AuthUserChangePassword = &AuthUserChangePasswordRequest{} - } - if err := m.AuthUserChangePassword.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1104: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthUserGrantRole", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthUserGrantRole == nil { - m.AuthUserGrantRole = &AuthUserGrantRoleRequest{} - } - if err := m.AuthUserGrantRole.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1105: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthUserRevokeRole", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthUserRevokeRole == nil { - m.AuthUserRevokeRole = &AuthUserRevokeRoleRequest{} - } - if err := m.AuthUserRevokeRole.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1106: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthUserList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthUserList == nil { - m.AuthUserList = &AuthUserListRequest{} - } - if err := m.AuthUserList.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1107: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthRoleList == nil { - m.AuthRoleList = &AuthRoleListRequest{} - } - if err := m.AuthRoleList.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleAdd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthRoleAdd == nil { - m.AuthRoleAdd = &AuthRoleAddRequest{} - } - if err := m.AuthRoleAdd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1201: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleDelete", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthRoleDelete == nil { - m.AuthRoleDelete = &AuthRoleDeleteRequest{} - } - if err := m.AuthRoleDelete.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1202: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleGet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthRoleGet == nil { - m.AuthRoleGet = &AuthRoleGetRequest{} - } - if err := m.AuthRoleGet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1203: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleGrantPermission", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthRoleGrantPermission == nil { - m.AuthRoleGrantPermission = &AuthRoleGrantPermissionRequest{} - } - if err := m.AuthRoleGrantPermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1204: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleRevokePermission", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthRoleRevokePermission == nil { - m.AuthRoleRevokePermission = &AuthRoleRevokePermissionRequest{} - } - if err := m.AuthRoleRevokePermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1300: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterVersionSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClusterVersionSet == nil { - m.ClusterVersionSet = &membershippb.ClusterVersionSetRequest{} - } - if err := m.ClusterVersionSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1301: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterMemberAttrSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClusterMemberAttrSet == nil { - m.ClusterMemberAttrSet = &membershippb.ClusterMemberAttrSetRequest{} - } - if err := m.ClusterMemberAttrSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1302: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DowngradeInfoSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DowngradeInfoSet == nil { - m.DowngradeInfoSet = &membershippb.DowngradeInfoSetRequest{} - } - if err := m.DowngradeInfoSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRaftInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRaftInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EmptyResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EmptyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EmptyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRaftInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRaftInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InternalAuthenticateRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InternalAuthenticateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InternalAuthenticateRequest: 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 ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - 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 Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SimpleToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRaftInternal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRaftInternal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SimpleToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRaftInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRaftInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipRaftInternal(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRaftInternal - } - 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, ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRaftInternal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthRaftInternal - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupRaftInternal - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthRaftInternal - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthRaftInternal = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRaftInternal = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupRaftInternal = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.proto b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.proto deleted file mode 100644 index 68926e59f6c..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal.proto +++ /dev/null @@ -1,81 +0,0 @@ -syntax = "proto3"; -package etcdserverpb; - -import "gogoproto/gogo.proto"; -import "etcdserver.proto"; -import "rpc.proto"; -import "etcd/api/membershippb/membership.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.goproto_getters_all) = false; - -message RequestHeader { - uint64 ID = 1; - // username is a username that is associated with an auth token of gRPC connection - string username = 2; - // auth_revision is a revision number of auth.authStore. It is not related to mvcc - uint64 auth_revision = 3; -} - -// An InternalRaftRequest is the union of all requests which can be -// sent via raft. -message InternalRaftRequest { - RequestHeader header = 100; - uint64 ID = 1; - - Request v2 = 2; - - RangeRequest range = 3; - PutRequest put = 4; - DeleteRangeRequest delete_range = 5; - TxnRequest txn = 6; - CompactionRequest compaction = 7; - - LeaseGrantRequest lease_grant = 8; - LeaseRevokeRequest lease_revoke = 9; - - AlarmRequest alarm = 10; - - LeaseCheckpointRequest lease_checkpoint = 11; - - AuthEnableRequest auth_enable = 1000; - AuthDisableRequest auth_disable = 1011; - AuthStatusRequest auth_status = 1013; - - InternalAuthenticateRequest authenticate = 1012; - - AuthUserAddRequest auth_user_add = 1100; - AuthUserDeleteRequest auth_user_delete = 1101; - AuthUserGetRequest auth_user_get = 1102; - AuthUserChangePasswordRequest auth_user_change_password = 1103; - AuthUserGrantRoleRequest auth_user_grant_role = 1104; - AuthUserRevokeRoleRequest auth_user_revoke_role = 1105; - AuthUserListRequest auth_user_list = 1106; - AuthRoleListRequest auth_role_list = 1107; - - AuthRoleAddRequest auth_role_add = 1200; - AuthRoleDeleteRequest auth_role_delete = 1201; - AuthRoleGetRequest auth_role_get = 1202; - AuthRoleGrantPermissionRequest auth_role_grant_permission = 1203; - AuthRoleRevokePermissionRequest auth_role_revoke_permission = 1204; - - membershippb.ClusterVersionSetRequest cluster_version_set = 1300; - membershippb.ClusterMemberAttrSetRequest cluster_member_attr_set = 1301; - membershippb.DowngradeInfoSetRequest downgrade_info_set = 1302; -} - -message EmptyResponse { -} - -// What is the difference between AuthenticateRequest (defined in rpc.proto) and InternalAuthenticateRequest? -// InternalAuthenticateRequest has a member that is filled by etcdserver and shouldn't be user-facing. -// For avoiding misusage the field, we have an internal version of AuthenticateRequest. -message InternalAuthenticateRequest { - string name = 1; - string password = 2; - - // simple_token is generated in API layer (etcdserver/v3_server.go) - string simple_token = 3; -} diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal_stringer.go b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal_stringer.go deleted file mode 100644 index 31e121ee0a6..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/raft_internal_stringer.go +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright 2018 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package etcdserverpb - -import ( - "fmt" - "strings" - - proto "github.com/golang/protobuf/proto" -) - -// InternalRaftStringer implements custom proto Stringer: -// redact password, replace value fields with value_size fields. -type InternalRaftStringer struct { - Request *InternalRaftRequest -} - -func (as *InternalRaftStringer) String() string { - switch { - case as.Request.LeaseGrant != nil: - return fmt.Sprintf("header:<%s> lease_grant:", - as.Request.Header.String(), - as.Request.LeaseGrant.TTL, - as.Request.LeaseGrant.ID, - ) - case as.Request.LeaseRevoke != nil: - return fmt.Sprintf("header:<%s> lease_revoke:", - as.Request.Header.String(), - as.Request.LeaseRevoke.ID, - ) - case as.Request.Authenticate != nil: - return fmt.Sprintf("header:<%s> authenticate:", - as.Request.Header.String(), - as.Request.Authenticate.Name, - as.Request.Authenticate.SimpleToken, - ) - case as.Request.AuthUserAdd != nil: - return fmt.Sprintf("header:<%s> auth_user_add:", - as.Request.Header.String(), - as.Request.AuthUserAdd.Name, - ) - case as.Request.AuthUserChangePassword != nil: - return fmt.Sprintf("header:<%s> auth_user_change_password:", - as.Request.Header.String(), - as.Request.AuthUserChangePassword.Name, - ) - case as.Request.Put != nil: - return fmt.Sprintf("header:<%s> put:<%s>", - as.Request.Header.String(), - NewLoggablePutRequest(as.Request.Put).String(), - ) - case as.Request.Txn != nil: - return fmt.Sprintf("header:<%s> txn:<%s>", - as.Request.Header.String(), - NewLoggableTxnRequest(as.Request.Txn).String(), - ) - default: - // nothing to redact - } - return as.Request.String() -} - -// txnRequestStringer implements a custom proto String to replace value bytes fields with value size -// fields in any nested txn and put operations. -type txnRequestStringer struct { - Request *TxnRequest -} - -func NewLoggableTxnRequest(request *TxnRequest) *txnRequestStringer { - return &txnRequestStringer{request} -} - -func (as *txnRequestStringer) String() string { - var compare []string - for _, c := range as.Request.Compare { - switch cv := c.TargetUnion.(type) { - case *Compare_Value: - compare = append(compare, newLoggableValueCompare(c, cv).String()) - default: - // nothing to redact - compare = append(compare, c.String()) - } - } - var success []string - for _, s := range as.Request.Success { - success = append(success, newLoggableRequestOp(s).String()) - } - var failure []string - for _, f := range as.Request.Failure { - failure = append(failure, newLoggableRequestOp(f).String()) - } - return fmt.Sprintf("compare:<%s> success:<%s> failure:<%s>", - strings.Join(compare, " "), - strings.Join(success, " "), - strings.Join(failure, " "), - ) -} - -// requestOpStringer implements a custom proto String to replace value bytes fields with value -// size fields in any nested txn and put operations. -type requestOpStringer struct { - Op *RequestOp -} - -func newLoggableRequestOp(op *RequestOp) *requestOpStringer { - return &requestOpStringer{op} -} - -func (as *requestOpStringer) String() string { - switch op := as.Op.Request.(type) { - case *RequestOp_RequestPut: - return fmt.Sprintf("request_put:<%s>", NewLoggablePutRequest(op.RequestPut).String()) - case *RequestOp_RequestTxn: - return fmt.Sprintf("request_txn:<%s>", NewLoggableTxnRequest(op.RequestTxn).String()) - default: - // nothing to redact - } - return as.Op.String() -} - -// loggableValueCompare implements a custom proto String for Compare.Value union member types to -// replace the value bytes field with a value size field. -// To preserve proto encoding of the key and range_end bytes, a faked out proto type is used here. -type loggableValueCompare struct { - Result Compare_CompareResult `protobuf:"varint,1,opt,name=result,proto3,enum=etcdserverpb.Compare_CompareResult"` - Target Compare_CompareTarget `protobuf:"varint,2,opt,name=target,proto3,enum=etcdserverpb.Compare_CompareTarget"` - Key []byte `protobuf:"bytes,3,opt,name=key,proto3"` - ValueSize int64 `protobuf:"varint,7,opt,name=value_size,proto3"` - RangeEnd []byte `protobuf:"bytes,64,opt,name=range_end,proto3"` -} - -func newLoggableValueCompare(c *Compare, cv *Compare_Value) *loggableValueCompare { - return &loggableValueCompare{ - c.Result, - c.Target, - c.Key, - int64(len(cv.Value)), - c.RangeEnd, - } -} - -func (m *loggableValueCompare) Reset() { *m = loggableValueCompare{} } -func (m *loggableValueCompare) String() string { return proto.CompactTextString(m) } -func (*loggableValueCompare) ProtoMessage() {} - -// loggablePutRequest implements a custom proto String to replace value bytes field with a value -// size field. -// To preserve proto encoding of the key bytes, a faked out proto type is used here. -type loggablePutRequest struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3"` - ValueSize int64 `protobuf:"varint,2,opt,name=value_size,proto3"` - Lease int64 `protobuf:"varint,3,opt,name=lease,proto3"` - PrevKv bool `protobuf:"varint,4,opt,name=prev_kv,proto3"` - IgnoreValue bool `protobuf:"varint,5,opt,name=ignore_value,proto3"` - IgnoreLease bool `protobuf:"varint,6,opt,name=ignore_lease,proto3"` -} - -func NewLoggablePutRequest(request *PutRequest) *loggablePutRequest { - return &loggablePutRequest{ - request.Key, - int64(len(request.Value)), - request.Lease, - request.PrevKv, - request.IgnoreValue, - request.IgnoreLease, - } -} - -func (m *loggablePutRequest) Reset() { *m = loggablePutRequest{} } -func (m *loggablePutRequest) String() string { return proto.CompactTextString(m) } -func (*loggablePutRequest) ProtoMessage() {} diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.pb.go b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.pb.go deleted file mode 100644 index 8120907d91d..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.pb.go +++ /dev/null @@ -1,25862 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: rpc.proto - -package etcdserverpb - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - authpb "go.etcd.io/etcd/api/v3/authpb" - mvccpb "go.etcd.io/etcd/api/v3/mvccpb" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// 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.ProtoPackageIsVersion3 // please upgrade the proto package - -type AlarmType int32 - -const ( - AlarmType_NONE AlarmType = 0 - AlarmType_NOSPACE AlarmType = 1 - AlarmType_CORRUPT AlarmType = 2 -) - -var AlarmType_name = map[int32]string{ - 0: "NONE", - 1: "NOSPACE", - 2: "CORRUPT", -} - -var AlarmType_value = map[string]int32{ - "NONE": 0, - "NOSPACE": 1, - "CORRUPT": 2, -} - -func (x AlarmType) String() string { - return proto.EnumName(AlarmType_name, int32(x)) -} - -func (AlarmType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{0} -} - -type RangeRequest_SortOrder int32 - -const ( - RangeRequest_NONE RangeRequest_SortOrder = 0 - RangeRequest_ASCEND RangeRequest_SortOrder = 1 - RangeRequest_DESCEND RangeRequest_SortOrder = 2 -) - -var RangeRequest_SortOrder_name = map[int32]string{ - 0: "NONE", - 1: "ASCEND", - 2: "DESCEND", -} - -var RangeRequest_SortOrder_value = map[string]int32{ - "NONE": 0, - "ASCEND": 1, - "DESCEND": 2, -} - -func (x RangeRequest_SortOrder) String() string { - return proto.EnumName(RangeRequest_SortOrder_name, int32(x)) -} - -func (RangeRequest_SortOrder) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{1, 0} -} - -type RangeRequest_SortTarget int32 - -const ( - RangeRequest_KEY RangeRequest_SortTarget = 0 - RangeRequest_VERSION RangeRequest_SortTarget = 1 - RangeRequest_CREATE RangeRequest_SortTarget = 2 - RangeRequest_MOD RangeRequest_SortTarget = 3 - RangeRequest_VALUE RangeRequest_SortTarget = 4 -) - -var RangeRequest_SortTarget_name = map[int32]string{ - 0: "KEY", - 1: "VERSION", - 2: "CREATE", - 3: "MOD", - 4: "VALUE", -} - -var RangeRequest_SortTarget_value = map[string]int32{ - "KEY": 0, - "VERSION": 1, - "CREATE": 2, - "MOD": 3, - "VALUE": 4, -} - -func (x RangeRequest_SortTarget) String() string { - return proto.EnumName(RangeRequest_SortTarget_name, int32(x)) -} - -func (RangeRequest_SortTarget) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{1, 1} -} - -type Compare_CompareResult int32 - -const ( - Compare_EQUAL Compare_CompareResult = 0 - Compare_GREATER Compare_CompareResult = 1 - Compare_LESS Compare_CompareResult = 2 - Compare_NOT_EQUAL Compare_CompareResult = 3 -) - -var Compare_CompareResult_name = map[int32]string{ - 0: "EQUAL", - 1: "GREATER", - 2: "LESS", - 3: "NOT_EQUAL", -} - -var Compare_CompareResult_value = map[string]int32{ - "EQUAL": 0, - "GREATER": 1, - "LESS": 2, - "NOT_EQUAL": 3, -} - -func (x Compare_CompareResult) String() string { - return proto.EnumName(Compare_CompareResult_name, int32(x)) -} - -func (Compare_CompareResult) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{9, 0} -} - -type Compare_CompareTarget int32 - -const ( - Compare_VERSION Compare_CompareTarget = 0 - Compare_CREATE Compare_CompareTarget = 1 - Compare_MOD Compare_CompareTarget = 2 - Compare_VALUE Compare_CompareTarget = 3 - Compare_LEASE Compare_CompareTarget = 4 -) - -var Compare_CompareTarget_name = map[int32]string{ - 0: "VERSION", - 1: "CREATE", - 2: "MOD", - 3: "VALUE", - 4: "LEASE", -} - -var Compare_CompareTarget_value = map[string]int32{ - "VERSION": 0, - "CREATE": 1, - "MOD": 2, - "VALUE": 3, - "LEASE": 4, -} - -func (x Compare_CompareTarget) String() string { - return proto.EnumName(Compare_CompareTarget_name, int32(x)) -} - -func (Compare_CompareTarget) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{9, 1} -} - -type WatchCreateRequest_FilterType int32 - -const ( - // filter out put event. - WatchCreateRequest_NOPUT WatchCreateRequest_FilterType = 0 - // filter out delete event. - WatchCreateRequest_NODELETE WatchCreateRequest_FilterType = 1 -) - -var WatchCreateRequest_FilterType_name = map[int32]string{ - 0: "NOPUT", - 1: "NODELETE", -} - -var WatchCreateRequest_FilterType_value = map[string]int32{ - "NOPUT": 0, - "NODELETE": 1, -} - -func (x WatchCreateRequest_FilterType) String() string { - return proto.EnumName(WatchCreateRequest_FilterType_name, int32(x)) -} - -func (WatchCreateRequest_FilterType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{21, 0} -} - -type AlarmRequest_AlarmAction int32 - -const ( - AlarmRequest_GET AlarmRequest_AlarmAction = 0 - AlarmRequest_ACTIVATE AlarmRequest_AlarmAction = 1 - AlarmRequest_DEACTIVATE AlarmRequest_AlarmAction = 2 -) - -var AlarmRequest_AlarmAction_name = map[int32]string{ - 0: "GET", - 1: "ACTIVATE", - 2: "DEACTIVATE", -} - -var AlarmRequest_AlarmAction_value = map[string]int32{ - "GET": 0, - "ACTIVATE": 1, - "DEACTIVATE": 2, -} - -func (x AlarmRequest_AlarmAction) String() string { - return proto.EnumName(AlarmRequest_AlarmAction_name, int32(x)) -} - -func (AlarmRequest_AlarmAction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{54, 0} -} - -type DowngradeRequest_DowngradeAction int32 - -const ( - DowngradeRequest_VALIDATE DowngradeRequest_DowngradeAction = 0 - DowngradeRequest_ENABLE DowngradeRequest_DowngradeAction = 1 - DowngradeRequest_CANCEL DowngradeRequest_DowngradeAction = 2 -) - -var DowngradeRequest_DowngradeAction_name = map[int32]string{ - 0: "VALIDATE", - 1: "ENABLE", - 2: "CANCEL", -} - -var DowngradeRequest_DowngradeAction_value = map[string]int32{ - "VALIDATE": 0, - "ENABLE": 1, - "CANCEL": 2, -} - -func (x DowngradeRequest_DowngradeAction) String() string { - return proto.EnumName(DowngradeRequest_DowngradeAction_name, int32(x)) -} - -func (DowngradeRequest_DowngradeAction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{57, 0} -} - -type ResponseHeader struct { - // cluster_id is the ID of the cluster which sent the response. - ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // member_id is the ID of the member which sent the response. - MemberId uint64 `protobuf:"varint,2,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"` - // revision is the key-value store revision when the request was applied. - // For watch progress responses, the header.revision indicates progress. All future events - // recieved in this stream are guaranteed to have a higher revision number than the - // header.revision number. - Revision int64 `protobuf:"varint,3,opt,name=revision,proto3" json:"revision,omitempty"` - // raft_term is the raft term when the request was applied. - RaftTerm uint64 `protobuf:"varint,4,opt,name=raft_term,json=raftTerm,proto3" json:"raft_term,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ResponseHeader) Reset() { *m = ResponseHeader{} } -func (m *ResponseHeader) String() string { return proto.CompactTextString(m) } -func (*ResponseHeader) ProtoMessage() {} -func (*ResponseHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{0} -} -func (m *ResponseHeader) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseHeader.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResponseHeader) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseHeader.Merge(m, src) -} -func (m *ResponseHeader) XXX_Size() int { - return m.Size() -} -func (m *ResponseHeader) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseHeader.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseHeader proto.InternalMessageInfo - -func (m *ResponseHeader) GetClusterId() uint64 { - if m != nil { - return m.ClusterId - } - return 0 -} - -func (m *ResponseHeader) GetMemberId() uint64 { - if m != nil { - return m.MemberId - } - return 0 -} - -func (m *ResponseHeader) GetRevision() int64 { - if m != nil { - return m.Revision - } - return 0 -} - -func (m *ResponseHeader) GetRaftTerm() uint64 { - if m != nil { - return m.RaftTerm - } - return 0 -} - -type RangeRequest struct { - // key is the first key for the range. If range_end is not given, the request only looks up key. - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // range_end is the upper bound on the requested range [key, range_end). - // If range_end is '\0', the range is all keys >= key. - // If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"), - // then the range request gets all keys prefixed with key. - // If both key and range_end are '\0', then the range request returns all keys. - RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` - // limit is a limit on the number of keys returned for the request. When limit is set to 0, - // it is treated as no limit. - Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` - // revision is the point-in-time of the key-value store to use for the range. - // If revision is less or equal to zero, the range is over the newest key-value store. - // If the revision has been compacted, ErrCompacted is returned as a response. - Revision int64 `protobuf:"varint,4,opt,name=revision,proto3" json:"revision,omitempty"` - // sort_order is the order for returned sorted results. - SortOrder RangeRequest_SortOrder `protobuf:"varint,5,opt,name=sort_order,json=sortOrder,proto3,enum=etcdserverpb.RangeRequest_SortOrder" json:"sort_order,omitempty"` - // sort_target is the key-value field to use for sorting. - SortTarget RangeRequest_SortTarget `protobuf:"varint,6,opt,name=sort_target,json=sortTarget,proto3,enum=etcdserverpb.RangeRequest_SortTarget" json:"sort_target,omitempty"` - // serializable sets the range request to use serializable member-local reads. - // Range requests are linearizable by default; linearizable requests have higher - // latency and lower throughput than serializable requests but reflect the current - // consensus of the cluster. For better performance, in exchange for possible stale reads, - // a serializable range request is served locally without needing to reach consensus - // with other nodes in the cluster. - Serializable bool `protobuf:"varint,7,opt,name=serializable,proto3" json:"serializable,omitempty"` - // keys_only when set returns only the keys and not the values. - KeysOnly bool `protobuf:"varint,8,opt,name=keys_only,json=keysOnly,proto3" json:"keys_only,omitempty"` - // count_only when set returns only the count of the keys in the range. - CountOnly bool `protobuf:"varint,9,opt,name=count_only,json=countOnly,proto3" json:"count_only,omitempty"` - // min_mod_revision is the lower bound for returned key mod revisions; all keys with - // lesser mod revisions will be filtered away. - MinModRevision int64 `protobuf:"varint,10,opt,name=min_mod_revision,json=minModRevision,proto3" json:"min_mod_revision,omitempty"` - // max_mod_revision is the upper bound for returned key mod revisions; all keys with - // greater mod revisions will be filtered away. - MaxModRevision int64 `protobuf:"varint,11,opt,name=max_mod_revision,json=maxModRevision,proto3" json:"max_mod_revision,omitempty"` - // min_create_revision is the lower bound for returned key create revisions; all keys with - // lesser create revisions will be filtered away. - MinCreateRevision int64 `protobuf:"varint,12,opt,name=min_create_revision,json=minCreateRevision,proto3" json:"min_create_revision,omitempty"` - // max_create_revision is the upper bound for returned key create revisions; all keys with - // greater create revisions will be filtered away. - MaxCreateRevision int64 `protobuf:"varint,13,opt,name=max_create_revision,json=maxCreateRevision,proto3" json:"max_create_revision,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RangeRequest) Reset() { *m = RangeRequest{} } -func (m *RangeRequest) String() string { return proto.CompactTextString(m) } -func (*RangeRequest) ProtoMessage() {} -func (*RangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{1} -} -func (m *RangeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RangeRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RangeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RangeRequest.Merge(m, src) -} -func (m *RangeRequest) XXX_Size() int { - return m.Size() -} -func (m *RangeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RangeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RangeRequest proto.InternalMessageInfo - -func (m *RangeRequest) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *RangeRequest) GetRangeEnd() []byte { - if m != nil { - return m.RangeEnd - } - return nil -} - -func (m *RangeRequest) GetLimit() int64 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *RangeRequest) GetRevision() int64 { - if m != nil { - return m.Revision - } - return 0 -} - -func (m *RangeRequest) GetSortOrder() RangeRequest_SortOrder { - if m != nil { - return m.SortOrder - } - return RangeRequest_NONE -} - -func (m *RangeRequest) GetSortTarget() RangeRequest_SortTarget { - if m != nil { - return m.SortTarget - } - return RangeRequest_KEY -} - -func (m *RangeRequest) GetSerializable() bool { - if m != nil { - return m.Serializable - } - return false -} - -func (m *RangeRequest) GetKeysOnly() bool { - if m != nil { - return m.KeysOnly - } - return false -} - -func (m *RangeRequest) GetCountOnly() bool { - if m != nil { - return m.CountOnly - } - return false -} - -func (m *RangeRequest) GetMinModRevision() int64 { - if m != nil { - return m.MinModRevision - } - return 0 -} - -func (m *RangeRequest) GetMaxModRevision() int64 { - if m != nil { - return m.MaxModRevision - } - return 0 -} - -func (m *RangeRequest) GetMinCreateRevision() int64 { - if m != nil { - return m.MinCreateRevision - } - return 0 -} - -func (m *RangeRequest) GetMaxCreateRevision() int64 { - if m != nil { - return m.MaxCreateRevision - } - return 0 -} - -type RangeResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // kvs is the list of key-value pairs matched by the range request. - // kvs is empty when count is requested. - Kvs []*mvccpb.KeyValue `protobuf:"bytes,2,rep,name=kvs,proto3" json:"kvs,omitempty"` - // more indicates if there are more keys to return in the requested range. - More bool `protobuf:"varint,3,opt,name=more,proto3" json:"more,omitempty"` - // count is set to the number of keys within the range when requested. - Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RangeResponse) Reset() { *m = RangeResponse{} } -func (m *RangeResponse) String() string { return proto.CompactTextString(m) } -func (*RangeResponse) ProtoMessage() {} -func (*RangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{2} -} -func (m *RangeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RangeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RangeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RangeResponse.Merge(m, src) -} -func (m *RangeResponse) XXX_Size() int { - return m.Size() -} -func (m *RangeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RangeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RangeResponse proto.InternalMessageInfo - -func (m *RangeResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *RangeResponse) GetKvs() []*mvccpb.KeyValue { - if m != nil { - return m.Kvs - } - return nil -} - -func (m *RangeResponse) GetMore() bool { - if m != nil { - return m.More - } - return false -} - -func (m *RangeResponse) GetCount() int64 { - if m != nil { - return m.Count - } - return 0 -} - -type PutRequest struct { - // key is the key, in bytes, to put into the key-value store. - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // value is the value, in bytes, to associate with the key in the key-value store. - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // lease is the lease ID to associate with the key in the key-value store. A lease - // value of 0 indicates no lease. - Lease int64 `protobuf:"varint,3,opt,name=lease,proto3" json:"lease,omitempty"` - // If prev_kv is set, etcd gets the previous key-value pair before changing it. - // The previous key-value pair will be returned in the put response. - PrevKv bool `protobuf:"varint,4,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"` - // If ignore_value is set, etcd updates the key using its current value. - // Returns an error if the key does not exist. - IgnoreValue bool `protobuf:"varint,5,opt,name=ignore_value,json=ignoreValue,proto3" json:"ignore_value,omitempty"` - // If ignore_lease is set, etcd updates the key using its current lease. - // Returns an error if the key does not exist. - IgnoreLease bool `protobuf:"varint,6,opt,name=ignore_lease,json=ignoreLease,proto3" json:"ignore_lease,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PutRequest) Reset() { *m = PutRequest{} } -func (m *PutRequest) String() string { return proto.CompactTextString(m) } -func (*PutRequest) ProtoMessage() {} -func (*PutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{3} -} -func (m *PutRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PutRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PutRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PutRequest.Merge(m, src) -} -func (m *PutRequest) XXX_Size() int { - return m.Size() -} -func (m *PutRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PutRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PutRequest proto.InternalMessageInfo - -func (m *PutRequest) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *PutRequest) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *PutRequest) GetLease() int64 { - if m != nil { - return m.Lease - } - return 0 -} - -func (m *PutRequest) GetPrevKv() bool { - if m != nil { - return m.PrevKv - } - return false -} - -func (m *PutRequest) GetIgnoreValue() bool { - if m != nil { - return m.IgnoreValue - } - return false -} - -func (m *PutRequest) GetIgnoreLease() bool { - if m != nil { - return m.IgnoreLease - } - return false -} - -type PutResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // if prev_kv is set in the request, the previous key-value pair will be returned. - PrevKv *mvccpb.KeyValue `protobuf:"bytes,2,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PutResponse) Reset() { *m = PutResponse{} } -func (m *PutResponse) String() string { return proto.CompactTextString(m) } -func (*PutResponse) ProtoMessage() {} -func (*PutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{4} -} -func (m *PutResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PutResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PutResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PutResponse.Merge(m, src) -} -func (m *PutResponse) XXX_Size() int { - return m.Size() -} -func (m *PutResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PutResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PutResponse proto.InternalMessageInfo - -func (m *PutResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *PutResponse) GetPrevKv() *mvccpb.KeyValue { - if m != nil { - return m.PrevKv - } - return nil -} - -type DeleteRangeRequest struct { - // key is the first key to delete in the range. - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // range_end is the key following the last key to delete for the range [key, range_end). - // If range_end is not given, the range is defined to contain only the key argument. - // If range_end is one bit larger than the given key, then the range is all the keys - // with the prefix (the given key). - // If range_end is '\0', the range is all keys greater than or equal to the key argument. - RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` - // If prev_kv is set, etcd gets the previous key-value pairs before deleting it. - // The previous key-value pairs will be returned in the delete response. - PrevKv bool `protobuf:"varint,3,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteRangeRequest) Reset() { *m = DeleteRangeRequest{} } -func (m *DeleteRangeRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteRangeRequest) ProtoMessage() {} -func (*DeleteRangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{5} -} -func (m *DeleteRangeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeleteRangeRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeleteRangeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRangeRequest.Merge(m, src) -} -func (m *DeleteRangeRequest) XXX_Size() int { - return m.Size() -} -func (m *DeleteRangeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRangeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteRangeRequest proto.InternalMessageInfo - -func (m *DeleteRangeRequest) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *DeleteRangeRequest) GetRangeEnd() []byte { - if m != nil { - return m.RangeEnd - } - return nil -} - -func (m *DeleteRangeRequest) GetPrevKv() bool { - if m != nil { - return m.PrevKv - } - return false -} - -type DeleteRangeResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // deleted is the number of keys deleted by the delete range request. - Deleted int64 `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"` - // if prev_kv is set in the request, the previous key-value pairs will be returned. - PrevKvs []*mvccpb.KeyValue `protobuf:"bytes,3,rep,name=prev_kvs,json=prevKvs,proto3" json:"prev_kvs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteRangeResponse) Reset() { *m = DeleteRangeResponse{} } -func (m *DeleteRangeResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteRangeResponse) ProtoMessage() {} -func (*DeleteRangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{6} -} -func (m *DeleteRangeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeleteRangeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeleteRangeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRangeResponse.Merge(m, src) -} -func (m *DeleteRangeResponse) XXX_Size() int { - return m.Size() -} -func (m *DeleteRangeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRangeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteRangeResponse proto.InternalMessageInfo - -func (m *DeleteRangeResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *DeleteRangeResponse) GetDeleted() int64 { - if m != nil { - return m.Deleted - } - return 0 -} - -func (m *DeleteRangeResponse) GetPrevKvs() []*mvccpb.KeyValue { - if m != nil { - return m.PrevKvs - } - return nil -} - -type RequestOp struct { - // request is a union of request types accepted by a transaction. - // - // Types that are valid to be assigned to Request: - // *RequestOp_RequestRange - // *RequestOp_RequestPut - // *RequestOp_RequestDeleteRange - // *RequestOp_RequestTxn - Request isRequestOp_Request `protobuf_oneof:"request"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RequestOp) Reset() { *m = RequestOp{} } -func (m *RequestOp) String() string { return proto.CompactTextString(m) } -func (*RequestOp) ProtoMessage() {} -func (*RequestOp) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{7} -} -func (m *RequestOp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RequestOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RequestOp.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RequestOp) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestOp.Merge(m, src) -} -func (m *RequestOp) XXX_Size() int { - return m.Size() -} -func (m *RequestOp) XXX_DiscardUnknown() { - xxx_messageInfo_RequestOp.DiscardUnknown(m) -} - -var xxx_messageInfo_RequestOp proto.InternalMessageInfo - -type isRequestOp_Request interface { - isRequestOp_Request() - MarshalTo([]byte) (int, error) - Size() int -} - -type RequestOp_RequestRange struct { - RequestRange *RangeRequest `protobuf:"bytes,1,opt,name=request_range,json=requestRange,proto3,oneof" json:"request_range,omitempty"` -} -type RequestOp_RequestPut struct { - RequestPut *PutRequest `protobuf:"bytes,2,opt,name=request_put,json=requestPut,proto3,oneof" json:"request_put,omitempty"` -} -type RequestOp_RequestDeleteRange struct { - RequestDeleteRange *DeleteRangeRequest `protobuf:"bytes,3,opt,name=request_delete_range,json=requestDeleteRange,proto3,oneof" json:"request_delete_range,omitempty"` -} -type RequestOp_RequestTxn struct { - RequestTxn *TxnRequest `protobuf:"bytes,4,opt,name=request_txn,json=requestTxn,proto3,oneof" json:"request_txn,omitempty"` -} - -func (*RequestOp_RequestRange) isRequestOp_Request() {} -func (*RequestOp_RequestPut) isRequestOp_Request() {} -func (*RequestOp_RequestDeleteRange) isRequestOp_Request() {} -func (*RequestOp_RequestTxn) isRequestOp_Request() {} - -func (m *RequestOp) GetRequest() isRequestOp_Request { - if m != nil { - return m.Request - } - return nil -} - -func (m *RequestOp) GetRequestRange() *RangeRequest { - if x, ok := m.GetRequest().(*RequestOp_RequestRange); ok { - return x.RequestRange - } - return nil -} - -func (m *RequestOp) GetRequestPut() *PutRequest { - if x, ok := m.GetRequest().(*RequestOp_RequestPut); ok { - return x.RequestPut - } - return nil -} - -func (m *RequestOp) GetRequestDeleteRange() *DeleteRangeRequest { - if x, ok := m.GetRequest().(*RequestOp_RequestDeleteRange); ok { - return x.RequestDeleteRange - } - return nil -} - -func (m *RequestOp) GetRequestTxn() *TxnRequest { - if x, ok := m.GetRequest().(*RequestOp_RequestTxn); ok { - return x.RequestTxn - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*RequestOp) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*RequestOp_RequestRange)(nil), - (*RequestOp_RequestPut)(nil), - (*RequestOp_RequestDeleteRange)(nil), - (*RequestOp_RequestTxn)(nil), - } -} - -type ResponseOp struct { - // response is a union of response types returned by a transaction. - // - // Types that are valid to be assigned to Response: - // *ResponseOp_ResponseRange - // *ResponseOp_ResponsePut - // *ResponseOp_ResponseDeleteRange - // *ResponseOp_ResponseTxn - Response isResponseOp_Response `protobuf_oneof:"response"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ResponseOp) Reset() { *m = ResponseOp{} } -func (m *ResponseOp) String() string { return proto.CompactTextString(m) } -func (*ResponseOp) ProtoMessage() {} -func (*ResponseOp) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{8} -} -func (m *ResponseOp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResponseOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResponseOp.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResponseOp) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseOp.Merge(m, src) -} -func (m *ResponseOp) XXX_Size() int { - return m.Size() -} -func (m *ResponseOp) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseOp.DiscardUnknown(m) -} - -var xxx_messageInfo_ResponseOp proto.InternalMessageInfo - -type isResponseOp_Response interface { - isResponseOp_Response() - MarshalTo([]byte) (int, error) - Size() int -} - -type ResponseOp_ResponseRange struct { - ResponseRange *RangeResponse `protobuf:"bytes,1,opt,name=response_range,json=responseRange,proto3,oneof" json:"response_range,omitempty"` -} -type ResponseOp_ResponsePut struct { - ResponsePut *PutResponse `protobuf:"bytes,2,opt,name=response_put,json=responsePut,proto3,oneof" json:"response_put,omitempty"` -} -type ResponseOp_ResponseDeleteRange struct { - ResponseDeleteRange *DeleteRangeResponse `protobuf:"bytes,3,opt,name=response_delete_range,json=responseDeleteRange,proto3,oneof" json:"response_delete_range,omitempty"` -} -type ResponseOp_ResponseTxn struct { - ResponseTxn *TxnResponse `protobuf:"bytes,4,opt,name=response_txn,json=responseTxn,proto3,oneof" json:"response_txn,omitempty"` -} - -func (*ResponseOp_ResponseRange) isResponseOp_Response() {} -func (*ResponseOp_ResponsePut) isResponseOp_Response() {} -func (*ResponseOp_ResponseDeleteRange) isResponseOp_Response() {} -func (*ResponseOp_ResponseTxn) isResponseOp_Response() {} - -func (m *ResponseOp) GetResponse() isResponseOp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (m *ResponseOp) GetResponseRange() *RangeResponse { - if x, ok := m.GetResponse().(*ResponseOp_ResponseRange); ok { - return x.ResponseRange - } - return nil -} - -func (m *ResponseOp) GetResponsePut() *PutResponse { - if x, ok := m.GetResponse().(*ResponseOp_ResponsePut); ok { - return x.ResponsePut - } - return nil -} - -func (m *ResponseOp) GetResponseDeleteRange() *DeleteRangeResponse { - if x, ok := m.GetResponse().(*ResponseOp_ResponseDeleteRange); ok { - return x.ResponseDeleteRange - } - return nil -} - -func (m *ResponseOp) GetResponseTxn() *TxnResponse { - if x, ok := m.GetResponse().(*ResponseOp_ResponseTxn); ok { - return x.ResponseTxn - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ResponseOp) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ResponseOp_ResponseRange)(nil), - (*ResponseOp_ResponsePut)(nil), - (*ResponseOp_ResponseDeleteRange)(nil), - (*ResponseOp_ResponseTxn)(nil), - } -} - -type Compare struct { - // result is logical comparison operation for this comparison. - Result Compare_CompareResult `protobuf:"varint,1,opt,name=result,proto3,enum=etcdserverpb.Compare_CompareResult" json:"result,omitempty"` - // target is the key-value field to inspect for the comparison. - Target Compare_CompareTarget `protobuf:"varint,2,opt,name=target,proto3,enum=etcdserverpb.Compare_CompareTarget" json:"target,omitempty"` - // key is the subject key for the comparison operation. - Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - // Types that are valid to be assigned to TargetUnion: - // *Compare_Version - // *Compare_CreateRevision - // *Compare_ModRevision - // *Compare_Value - // *Compare_Lease - TargetUnion isCompare_TargetUnion `protobuf_oneof:"target_union"` - // range_end compares the given target to all keys in the range [key, range_end). - // See RangeRequest for more details on key ranges. - RangeEnd []byte `protobuf:"bytes,64,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Compare) Reset() { *m = Compare{} } -func (m *Compare) String() string { return proto.CompactTextString(m) } -func (*Compare) ProtoMessage() {} -func (*Compare) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{9} -} -func (m *Compare) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Compare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Compare.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Compare) XXX_Merge(src proto.Message) { - xxx_messageInfo_Compare.Merge(m, src) -} -func (m *Compare) XXX_Size() int { - return m.Size() -} -func (m *Compare) XXX_DiscardUnknown() { - xxx_messageInfo_Compare.DiscardUnknown(m) -} - -var xxx_messageInfo_Compare proto.InternalMessageInfo - -type isCompare_TargetUnion interface { - isCompare_TargetUnion() - MarshalTo([]byte) (int, error) - Size() int -} - -type Compare_Version struct { - Version int64 `protobuf:"varint,4,opt,name=version,proto3,oneof" json:"version,omitempty"` -} -type Compare_CreateRevision struct { - CreateRevision int64 `protobuf:"varint,5,opt,name=create_revision,json=createRevision,proto3,oneof" json:"create_revision,omitempty"` -} -type Compare_ModRevision struct { - ModRevision int64 `protobuf:"varint,6,opt,name=mod_revision,json=modRevision,proto3,oneof" json:"mod_revision,omitempty"` -} -type Compare_Value struct { - Value []byte `protobuf:"bytes,7,opt,name=value,proto3,oneof" json:"value,omitempty"` -} -type Compare_Lease struct { - Lease int64 `protobuf:"varint,8,opt,name=lease,proto3,oneof" json:"lease,omitempty"` -} - -func (*Compare_Version) isCompare_TargetUnion() {} -func (*Compare_CreateRevision) isCompare_TargetUnion() {} -func (*Compare_ModRevision) isCompare_TargetUnion() {} -func (*Compare_Value) isCompare_TargetUnion() {} -func (*Compare_Lease) isCompare_TargetUnion() {} - -func (m *Compare) GetTargetUnion() isCompare_TargetUnion { - if m != nil { - return m.TargetUnion - } - return nil -} - -func (m *Compare) GetResult() Compare_CompareResult { - if m != nil { - return m.Result - } - return Compare_EQUAL -} - -func (m *Compare) GetTarget() Compare_CompareTarget { - if m != nil { - return m.Target - } - return Compare_VERSION -} - -func (m *Compare) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *Compare) GetVersion() int64 { - if x, ok := m.GetTargetUnion().(*Compare_Version); ok { - return x.Version - } - return 0 -} - -func (m *Compare) GetCreateRevision() int64 { - if x, ok := m.GetTargetUnion().(*Compare_CreateRevision); ok { - return x.CreateRevision - } - return 0 -} - -func (m *Compare) GetModRevision() int64 { - if x, ok := m.GetTargetUnion().(*Compare_ModRevision); ok { - return x.ModRevision - } - return 0 -} - -func (m *Compare) GetValue() []byte { - if x, ok := m.GetTargetUnion().(*Compare_Value); ok { - return x.Value - } - return nil -} - -func (m *Compare) GetLease() int64 { - if x, ok := m.GetTargetUnion().(*Compare_Lease); ok { - return x.Lease - } - return 0 -} - -func (m *Compare) GetRangeEnd() []byte { - if m != nil { - return m.RangeEnd - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Compare) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Compare_Version)(nil), - (*Compare_CreateRevision)(nil), - (*Compare_ModRevision)(nil), - (*Compare_Value)(nil), - (*Compare_Lease)(nil), - } -} - -// From google paxosdb paper: -// Our implementation hinges around a powerful primitive which we call MultiOp. All other database -// operations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically -// and consists of three components: -// 1. A list of tests called guard. Each test in guard checks a single entry in the database. It may check -// for the absence or presence of a value, or compare with a given value. Two different tests in the guard -// may apply to the same or different entries in the database. All tests in the guard are applied and -// MultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise -// it executes f op (see item 3 below). -// 2. A list of database operations called t op. Each operation in the list is either an insert, delete, or -// lookup operation, and applies to a single database entry. Two different operations in the list may apply -// to the same or different entries in the database. These operations are executed -// if guard evaluates to -// true. -// 3. A list of database operations called f op. Like t op, but executed if guard evaluates to false. -type TxnRequest struct { - // compare is a list of predicates representing a conjunction of terms. - // If the comparisons succeed, then the success requests will be processed in order, - // and the response will contain their respective responses in order. - // If the comparisons fail, then the failure requests will be processed in order, - // and the response will contain their respective responses in order. - Compare []*Compare `protobuf:"bytes,1,rep,name=compare,proto3" json:"compare,omitempty"` - // success is a list of requests which will be applied when compare evaluates to true. - Success []*RequestOp `protobuf:"bytes,2,rep,name=success,proto3" json:"success,omitempty"` - // failure is a list of requests which will be applied when compare evaluates to false. - Failure []*RequestOp `protobuf:"bytes,3,rep,name=failure,proto3" json:"failure,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TxnRequest) Reset() { *m = TxnRequest{} } -func (m *TxnRequest) String() string { return proto.CompactTextString(m) } -func (*TxnRequest) ProtoMessage() {} -func (*TxnRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{10} -} -func (m *TxnRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TxnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxnRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TxnRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxnRequest.Merge(m, src) -} -func (m *TxnRequest) XXX_Size() int { - return m.Size() -} -func (m *TxnRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TxnRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TxnRequest proto.InternalMessageInfo - -func (m *TxnRequest) GetCompare() []*Compare { - if m != nil { - return m.Compare - } - return nil -} - -func (m *TxnRequest) GetSuccess() []*RequestOp { - if m != nil { - return m.Success - } - return nil -} - -func (m *TxnRequest) GetFailure() []*RequestOp { - if m != nil { - return m.Failure - } - return nil -} - -type TxnResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // succeeded is set to true if the compare evaluated to true or false otherwise. - Succeeded bool `protobuf:"varint,2,opt,name=succeeded,proto3" json:"succeeded,omitempty"` - // responses is a list of responses corresponding to the results from applying - // success if succeeded is true or failure if succeeded is false. - Responses []*ResponseOp `protobuf:"bytes,3,rep,name=responses,proto3" json:"responses,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TxnResponse) Reset() { *m = TxnResponse{} } -func (m *TxnResponse) String() string { return proto.CompactTextString(m) } -func (*TxnResponse) ProtoMessage() {} -func (*TxnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{11} -} -func (m *TxnResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TxnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxnResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TxnResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxnResponse.Merge(m, src) -} -func (m *TxnResponse) XXX_Size() int { - return m.Size() -} -func (m *TxnResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TxnResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TxnResponse proto.InternalMessageInfo - -func (m *TxnResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *TxnResponse) GetSucceeded() bool { - if m != nil { - return m.Succeeded - } - return false -} - -func (m *TxnResponse) GetResponses() []*ResponseOp { - if m != nil { - return m.Responses - } - return nil -} - -// CompactionRequest compacts the key-value store up to a given revision. All superseded keys -// with a revision less than the compaction revision will be removed. -type CompactionRequest struct { - // revision is the key-value store revision for the compaction operation. - Revision int64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` - // physical is set so the RPC will wait until the compaction is physically - // applied to the local database such that compacted entries are totally - // removed from the backend database. - Physical bool `protobuf:"varint,2,opt,name=physical,proto3" json:"physical,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompactionRequest) Reset() { *m = CompactionRequest{} } -func (m *CompactionRequest) String() string { return proto.CompactTextString(m) } -func (*CompactionRequest) ProtoMessage() {} -func (*CompactionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{12} -} -func (m *CompactionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CompactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CompactionRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CompactionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompactionRequest.Merge(m, src) -} -func (m *CompactionRequest) XXX_Size() int { - return m.Size() -} -func (m *CompactionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CompactionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CompactionRequest proto.InternalMessageInfo - -func (m *CompactionRequest) GetRevision() int64 { - if m != nil { - return m.Revision - } - return 0 -} - -func (m *CompactionRequest) GetPhysical() bool { - if m != nil { - return m.Physical - } - return false -} - -type CompactionResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CompactionResponse) Reset() { *m = CompactionResponse{} } -func (m *CompactionResponse) String() string { return proto.CompactTextString(m) } -func (*CompactionResponse) ProtoMessage() {} -func (*CompactionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{13} -} -func (m *CompactionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CompactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CompactionResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CompactionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompactionResponse.Merge(m, src) -} -func (m *CompactionResponse) XXX_Size() int { - return m.Size() -} -func (m *CompactionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CompactionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CompactionResponse proto.InternalMessageInfo - -func (m *CompactionResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type HashRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HashRequest) Reset() { *m = HashRequest{} } -func (m *HashRequest) String() string { return proto.CompactTextString(m) } -func (*HashRequest) ProtoMessage() {} -func (*HashRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{14} -} -func (m *HashRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HashRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HashRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HashRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HashRequest.Merge(m, src) -} -func (m *HashRequest) XXX_Size() int { - return m.Size() -} -func (m *HashRequest) XXX_DiscardUnknown() { - xxx_messageInfo_HashRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_HashRequest proto.InternalMessageInfo - -type HashKVRequest struct { - // revision is the key-value store revision for the hash operation. - Revision int64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HashKVRequest) Reset() { *m = HashKVRequest{} } -func (m *HashKVRequest) String() string { return proto.CompactTextString(m) } -func (*HashKVRequest) ProtoMessage() {} -func (*HashKVRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{15} -} -func (m *HashKVRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HashKVRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HashKVRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HashKVRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HashKVRequest.Merge(m, src) -} -func (m *HashKVRequest) XXX_Size() int { - return m.Size() -} -func (m *HashKVRequest) XXX_DiscardUnknown() { - xxx_messageInfo_HashKVRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_HashKVRequest proto.InternalMessageInfo - -func (m *HashKVRequest) GetRevision() int64 { - if m != nil { - return m.Revision - } - return 0 -} - -type HashKVResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // hash is the hash value computed from the responding member's MVCC keys up to a given revision. - Hash uint32 `protobuf:"varint,2,opt,name=hash,proto3" json:"hash,omitempty"` - // compact_revision is the compacted revision of key-value store when hash begins. - CompactRevision int64 `protobuf:"varint,3,opt,name=compact_revision,json=compactRevision,proto3" json:"compact_revision,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HashKVResponse) Reset() { *m = HashKVResponse{} } -func (m *HashKVResponse) String() string { return proto.CompactTextString(m) } -func (*HashKVResponse) ProtoMessage() {} -func (*HashKVResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{16} -} -func (m *HashKVResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HashKVResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HashKVResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HashKVResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HashKVResponse.Merge(m, src) -} -func (m *HashKVResponse) XXX_Size() int { - return m.Size() -} -func (m *HashKVResponse) XXX_DiscardUnknown() { - xxx_messageInfo_HashKVResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_HashKVResponse proto.InternalMessageInfo - -func (m *HashKVResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *HashKVResponse) GetHash() uint32 { - if m != nil { - return m.Hash - } - return 0 -} - -func (m *HashKVResponse) GetCompactRevision() int64 { - if m != nil { - return m.CompactRevision - } - return 0 -} - -type HashResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // hash is the hash value computed from the responding member's KV's backend. - Hash uint32 `protobuf:"varint,2,opt,name=hash,proto3" json:"hash,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HashResponse) Reset() { *m = HashResponse{} } -func (m *HashResponse) String() string { return proto.CompactTextString(m) } -func (*HashResponse) ProtoMessage() {} -func (*HashResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{17} -} -func (m *HashResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HashResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HashResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HashResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HashResponse.Merge(m, src) -} -func (m *HashResponse) XXX_Size() int { - return m.Size() -} -func (m *HashResponse) XXX_DiscardUnknown() { - xxx_messageInfo_HashResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_HashResponse proto.InternalMessageInfo - -func (m *HashResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *HashResponse) GetHash() uint32 { - if m != nil { - return m.Hash - } - return 0 -} - -type SnapshotRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SnapshotRequest) Reset() { *m = SnapshotRequest{} } -func (m *SnapshotRequest) String() string { return proto.CompactTextString(m) } -func (*SnapshotRequest) ProtoMessage() {} -func (*SnapshotRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{18} -} -func (m *SnapshotRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SnapshotRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotRequest.Merge(m, src) -} -func (m *SnapshotRequest) XXX_Size() int { - return m.Size() -} -func (m *SnapshotRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotRequest proto.InternalMessageInfo - -type SnapshotResponse struct { - // header has the current key-value store information. The first header in the snapshot - // stream indicates the point in time of the snapshot. - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // remaining_bytes is the number of blob bytes to be sent after this message - RemainingBytes uint64 `protobuf:"varint,2,opt,name=remaining_bytes,json=remainingBytes,proto3" json:"remaining_bytes,omitempty"` - // blob contains the next chunk of the snapshot in the snapshot stream. - Blob []byte `protobuf:"bytes,3,opt,name=blob,proto3" json:"blob,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SnapshotResponse) Reset() { *m = SnapshotResponse{} } -func (m *SnapshotResponse) String() string { return proto.CompactTextString(m) } -func (*SnapshotResponse) ProtoMessage() {} -func (*SnapshotResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{19} -} -func (m *SnapshotResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SnapshotResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotResponse.Merge(m, src) -} -func (m *SnapshotResponse) XXX_Size() int { - return m.Size() -} -func (m *SnapshotResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotResponse proto.InternalMessageInfo - -func (m *SnapshotResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *SnapshotResponse) GetRemainingBytes() uint64 { - if m != nil { - return m.RemainingBytes - } - return 0 -} - -func (m *SnapshotResponse) GetBlob() []byte { - if m != nil { - return m.Blob - } - return nil -} - -type WatchRequest struct { - // request_union is a request to either create a new watcher or cancel an existing watcher. - // - // Types that are valid to be assigned to RequestUnion: - // *WatchRequest_CreateRequest - // *WatchRequest_CancelRequest - // *WatchRequest_ProgressRequest - RequestUnion isWatchRequest_RequestUnion `protobuf_oneof:"request_union"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WatchRequest) Reset() { *m = WatchRequest{} } -func (m *WatchRequest) String() string { return proto.CompactTextString(m) } -func (*WatchRequest) ProtoMessage() {} -func (*WatchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{20} -} -func (m *WatchRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WatchRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WatchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WatchRequest.Merge(m, src) -} -func (m *WatchRequest) XXX_Size() int { - return m.Size() -} -func (m *WatchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WatchRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WatchRequest proto.InternalMessageInfo - -type isWatchRequest_RequestUnion interface { - isWatchRequest_RequestUnion() - MarshalTo([]byte) (int, error) - Size() int -} - -type WatchRequest_CreateRequest struct { - CreateRequest *WatchCreateRequest `protobuf:"bytes,1,opt,name=create_request,json=createRequest,proto3,oneof" json:"create_request,omitempty"` -} -type WatchRequest_CancelRequest struct { - CancelRequest *WatchCancelRequest `protobuf:"bytes,2,opt,name=cancel_request,json=cancelRequest,proto3,oneof" json:"cancel_request,omitempty"` -} -type WatchRequest_ProgressRequest struct { - ProgressRequest *WatchProgressRequest `protobuf:"bytes,3,opt,name=progress_request,json=progressRequest,proto3,oneof" json:"progress_request,omitempty"` -} - -func (*WatchRequest_CreateRequest) isWatchRequest_RequestUnion() {} -func (*WatchRequest_CancelRequest) isWatchRequest_RequestUnion() {} -func (*WatchRequest_ProgressRequest) isWatchRequest_RequestUnion() {} - -func (m *WatchRequest) GetRequestUnion() isWatchRequest_RequestUnion { - if m != nil { - return m.RequestUnion - } - return nil -} - -func (m *WatchRequest) GetCreateRequest() *WatchCreateRequest { - if x, ok := m.GetRequestUnion().(*WatchRequest_CreateRequest); ok { - return x.CreateRequest - } - return nil -} - -func (m *WatchRequest) GetCancelRequest() *WatchCancelRequest { - if x, ok := m.GetRequestUnion().(*WatchRequest_CancelRequest); ok { - return x.CancelRequest - } - return nil -} - -func (m *WatchRequest) GetProgressRequest() *WatchProgressRequest { - if x, ok := m.GetRequestUnion().(*WatchRequest_ProgressRequest); ok { - return x.ProgressRequest - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*WatchRequest) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*WatchRequest_CreateRequest)(nil), - (*WatchRequest_CancelRequest)(nil), - (*WatchRequest_ProgressRequest)(nil), - } -} - -type WatchCreateRequest struct { - // key is the key to register for watching. - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // range_end is the end of the range [key, range_end) to watch. If range_end is not given, - // only the key argument is watched. If range_end is equal to '\0', all keys greater than - // or equal to the key argument are watched. - // If the range_end is one bit larger than the given key, - // then all keys with the prefix (the given key) will be watched. - RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` - // start_revision is an optional revision to watch from (inclusive). No start_revision is "now". - StartRevision int64 `protobuf:"varint,3,opt,name=start_revision,json=startRevision,proto3" json:"start_revision,omitempty"` - // progress_notify is set so that the etcd server will periodically send a WatchResponse with - // no events to the new watcher if there are no recent events. It is useful when clients - // wish to recover a disconnected watcher starting from a recent known revision. - // The etcd server may decide how often it will send notifications based on current load. - ProgressNotify bool `protobuf:"varint,4,opt,name=progress_notify,json=progressNotify,proto3" json:"progress_notify,omitempty"` - // filters filter the events at server side before it sends back to the watcher. - Filters []WatchCreateRequest_FilterType `protobuf:"varint,5,rep,packed,name=filters,proto3,enum=etcdserverpb.WatchCreateRequest_FilterType" json:"filters,omitempty"` - // If prev_kv is set, created watcher gets the previous KV before the event happens. - // If the previous KV is already compacted, nothing will be returned. - PrevKv bool `protobuf:"varint,6,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"` - // If watch_id is provided and non-zero, it will be assigned to this watcher. - // Since creating a watcher in etcd is not a synchronous operation, - // this can be used ensure that ordering is correct when creating multiple - // watchers on the same stream. Creating a watcher with an ID already in - // use on the stream will cause an error to be returned. - WatchId int64 `protobuf:"varint,7,opt,name=watch_id,json=watchId,proto3" json:"watch_id,omitempty"` - // fragment enables splitting large revisions into multiple watch responses. - Fragment bool `protobuf:"varint,8,opt,name=fragment,proto3" json:"fragment,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WatchCreateRequest) Reset() { *m = WatchCreateRequest{} } -func (m *WatchCreateRequest) String() string { return proto.CompactTextString(m) } -func (*WatchCreateRequest) ProtoMessage() {} -func (*WatchCreateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{21} -} -func (m *WatchCreateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WatchCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WatchCreateRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WatchCreateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WatchCreateRequest.Merge(m, src) -} -func (m *WatchCreateRequest) XXX_Size() int { - return m.Size() -} -func (m *WatchCreateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WatchCreateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WatchCreateRequest proto.InternalMessageInfo - -func (m *WatchCreateRequest) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *WatchCreateRequest) GetRangeEnd() []byte { - if m != nil { - return m.RangeEnd - } - return nil -} - -func (m *WatchCreateRequest) GetStartRevision() int64 { - if m != nil { - return m.StartRevision - } - return 0 -} - -func (m *WatchCreateRequest) GetProgressNotify() bool { - if m != nil { - return m.ProgressNotify - } - return false -} - -func (m *WatchCreateRequest) GetFilters() []WatchCreateRequest_FilterType { - if m != nil { - return m.Filters - } - return nil -} - -func (m *WatchCreateRequest) GetPrevKv() bool { - if m != nil { - return m.PrevKv - } - return false -} - -func (m *WatchCreateRequest) GetWatchId() int64 { - if m != nil { - return m.WatchId - } - return 0 -} - -func (m *WatchCreateRequest) GetFragment() bool { - if m != nil { - return m.Fragment - } - return false -} - -type WatchCancelRequest struct { - // watch_id is the watcher id to cancel so that no more events are transmitted. - WatchId int64 `protobuf:"varint,1,opt,name=watch_id,json=watchId,proto3" json:"watch_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WatchCancelRequest) Reset() { *m = WatchCancelRequest{} } -func (m *WatchCancelRequest) String() string { return proto.CompactTextString(m) } -func (*WatchCancelRequest) ProtoMessage() {} -func (*WatchCancelRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{22} -} -func (m *WatchCancelRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WatchCancelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WatchCancelRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WatchCancelRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WatchCancelRequest.Merge(m, src) -} -func (m *WatchCancelRequest) XXX_Size() int { - return m.Size() -} -func (m *WatchCancelRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WatchCancelRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WatchCancelRequest proto.InternalMessageInfo - -func (m *WatchCancelRequest) GetWatchId() int64 { - if m != nil { - return m.WatchId - } - return 0 -} - -// Requests the a watch stream progress status be sent in the watch response stream as soon as -// possible. -type WatchProgressRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WatchProgressRequest) Reset() { *m = WatchProgressRequest{} } -func (m *WatchProgressRequest) String() string { return proto.CompactTextString(m) } -func (*WatchProgressRequest) ProtoMessage() {} -func (*WatchProgressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{23} -} -func (m *WatchProgressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WatchProgressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WatchProgressRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WatchProgressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WatchProgressRequest.Merge(m, src) -} -func (m *WatchProgressRequest) XXX_Size() int { - return m.Size() -} -func (m *WatchProgressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WatchProgressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WatchProgressRequest proto.InternalMessageInfo - -type WatchResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // watch_id is the ID of the watcher that corresponds to the response. - WatchId int64 `protobuf:"varint,2,opt,name=watch_id,json=watchId,proto3" json:"watch_id,omitempty"` - // created is set to true if the response is for a create watch request. - // The client should record the watch_id and expect to receive events for - // the created watcher from the same stream. - // All events sent to the created watcher will attach with the same watch_id. - Created bool `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"` - // canceled is set to true if the response is for a cancel watch request. - // No further events will be sent to the canceled watcher. - Canceled bool `protobuf:"varint,4,opt,name=canceled,proto3" json:"canceled,omitempty"` - // compact_revision is set to the minimum index if a watcher tries to watch - // at a compacted index. - // - // This happens when creating a watcher at a compacted revision or the watcher cannot - // catch up with the progress of the key-value store. - // - // The client should treat the watcher as canceled and should not try to create any - // watcher with the same start_revision again. - CompactRevision int64 `protobuf:"varint,5,opt,name=compact_revision,json=compactRevision,proto3" json:"compact_revision,omitempty"` - // cancel_reason indicates the reason for canceling the watcher. - CancelReason string `protobuf:"bytes,6,opt,name=cancel_reason,json=cancelReason,proto3" json:"cancel_reason,omitempty"` - // framgment is true if large watch response was split over multiple responses. - Fragment bool `protobuf:"varint,7,opt,name=fragment,proto3" json:"fragment,omitempty"` - Events []*mvccpb.Event `protobuf:"bytes,11,rep,name=events,proto3" json:"events,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WatchResponse) Reset() { *m = WatchResponse{} } -func (m *WatchResponse) String() string { return proto.CompactTextString(m) } -func (*WatchResponse) ProtoMessage() {} -func (*WatchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{24} -} -func (m *WatchResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WatchResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WatchResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WatchResponse.Merge(m, src) -} -func (m *WatchResponse) XXX_Size() int { - return m.Size() -} -func (m *WatchResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WatchResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WatchResponse proto.InternalMessageInfo - -func (m *WatchResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *WatchResponse) GetWatchId() int64 { - if m != nil { - return m.WatchId - } - return 0 -} - -func (m *WatchResponse) GetCreated() bool { - if m != nil { - return m.Created - } - return false -} - -func (m *WatchResponse) GetCanceled() bool { - if m != nil { - return m.Canceled - } - return false -} - -func (m *WatchResponse) GetCompactRevision() int64 { - if m != nil { - return m.CompactRevision - } - return 0 -} - -func (m *WatchResponse) GetCancelReason() string { - if m != nil { - return m.CancelReason - } - return "" -} - -func (m *WatchResponse) GetFragment() bool { - if m != nil { - return m.Fragment - } - return false -} - -func (m *WatchResponse) GetEvents() []*mvccpb.Event { - if m != nil { - return m.Events - } - return nil -} - -type LeaseGrantRequest struct { - // TTL is the advisory time-to-live in seconds. Expired lease will return -1. - TTL int64 `protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` - // ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID. - ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseGrantRequest) Reset() { *m = LeaseGrantRequest{} } -func (m *LeaseGrantRequest) String() string { return proto.CompactTextString(m) } -func (*LeaseGrantRequest) ProtoMessage() {} -func (*LeaseGrantRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{25} -} -func (m *LeaseGrantRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseGrantRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseGrantRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseGrantRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseGrantRequest.Merge(m, src) -} -func (m *LeaseGrantRequest) XXX_Size() int { - return m.Size() -} -func (m *LeaseGrantRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseGrantRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseGrantRequest proto.InternalMessageInfo - -func (m *LeaseGrantRequest) GetTTL() int64 { - if m != nil { - return m.TTL - } - return 0 -} - -func (m *LeaseGrantRequest) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -type LeaseGrantResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // ID is the lease ID for the granted lease. - ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"` - // TTL is the server chosen lease time-to-live in seconds. - TTL int64 `protobuf:"varint,3,opt,name=TTL,proto3" json:"TTL,omitempty"` - Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseGrantResponse) Reset() { *m = LeaseGrantResponse{} } -func (m *LeaseGrantResponse) String() string { return proto.CompactTextString(m) } -func (*LeaseGrantResponse) ProtoMessage() {} -func (*LeaseGrantResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{26} -} -func (m *LeaseGrantResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseGrantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseGrantResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseGrantResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseGrantResponse.Merge(m, src) -} -func (m *LeaseGrantResponse) XXX_Size() int { - return m.Size() -} -func (m *LeaseGrantResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseGrantResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseGrantResponse proto.InternalMessageInfo - -func (m *LeaseGrantResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *LeaseGrantResponse) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *LeaseGrantResponse) GetTTL() int64 { - if m != nil { - return m.TTL - } - return 0 -} - -func (m *LeaseGrantResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type LeaseRevokeRequest struct { - // ID is the lease ID to revoke. When the ID is revoked, all associated keys will be deleted. - ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseRevokeRequest) Reset() { *m = LeaseRevokeRequest{} } -func (m *LeaseRevokeRequest) String() string { return proto.CompactTextString(m) } -func (*LeaseRevokeRequest) ProtoMessage() {} -func (*LeaseRevokeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{27} -} -func (m *LeaseRevokeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseRevokeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseRevokeRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseRevokeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseRevokeRequest.Merge(m, src) -} -func (m *LeaseRevokeRequest) XXX_Size() int { - return m.Size() -} -func (m *LeaseRevokeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseRevokeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseRevokeRequest proto.InternalMessageInfo - -func (m *LeaseRevokeRequest) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -type LeaseRevokeResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseRevokeResponse) Reset() { *m = LeaseRevokeResponse{} } -func (m *LeaseRevokeResponse) String() string { return proto.CompactTextString(m) } -func (*LeaseRevokeResponse) ProtoMessage() {} -func (*LeaseRevokeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{28} -} -func (m *LeaseRevokeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseRevokeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseRevokeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseRevokeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseRevokeResponse.Merge(m, src) -} -func (m *LeaseRevokeResponse) XXX_Size() int { - return m.Size() -} -func (m *LeaseRevokeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseRevokeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseRevokeResponse proto.InternalMessageInfo - -func (m *LeaseRevokeResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type LeaseCheckpoint struct { - // ID is the lease ID to checkpoint. - ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - // Remaining_TTL is the remaining time until expiry of the lease. - Remaining_TTL int64 `protobuf:"varint,2,opt,name=remaining_TTL,json=remainingTTL,proto3" json:"remaining_TTL,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseCheckpoint) Reset() { *m = LeaseCheckpoint{} } -func (m *LeaseCheckpoint) String() string { return proto.CompactTextString(m) } -func (*LeaseCheckpoint) ProtoMessage() {} -func (*LeaseCheckpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{29} -} -func (m *LeaseCheckpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCheckpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseCheckpoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseCheckpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCheckpoint.Merge(m, src) -} -func (m *LeaseCheckpoint) XXX_Size() int { - return m.Size() -} -func (m *LeaseCheckpoint) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCheckpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseCheckpoint proto.InternalMessageInfo - -func (m *LeaseCheckpoint) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *LeaseCheckpoint) GetRemaining_TTL() int64 { - if m != nil { - return m.Remaining_TTL - } - return 0 -} - -type LeaseCheckpointRequest struct { - Checkpoints []*LeaseCheckpoint `protobuf:"bytes,1,rep,name=checkpoints,proto3" json:"checkpoints,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseCheckpointRequest) Reset() { *m = LeaseCheckpointRequest{} } -func (m *LeaseCheckpointRequest) String() string { return proto.CompactTextString(m) } -func (*LeaseCheckpointRequest) ProtoMessage() {} -func (*LeaseCheckpointRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{30} -} -func (m *LeaseCheckpointRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCheckpointRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseCheckpointRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseCheckpointRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCheckpointRequest.Merge(m, src) -} -func (m *LeaseCheckpointRequest) XXX_Size() int { - return m.Size() -} -func (m *LeaseCheckpointRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCheckpointRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseCheckpointRequest proto.InternalMessageInfo - -func (m *LeaseCheckpointRequest) GetCheckpoints() []*LeaseCheckpoint { - if m != nil { - return m.Checkpoints - } - return nil -} - -type LeaseCheckpointResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseCheckpointResponse) Reset() { *m = LeaseCheckpointResponse{} } -func (m *LeaseCheckpointResponse) String() string { return proto.CompactTextString(m) } -func (*LeaseCheckpointResponse) ProtoMessage() {} -func (*LeaseCheckpointResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{31} -} -func (m *LeaseCheckpointResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCheckpointResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseCheckpointResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseCheckpointResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCheckpointResponse.Merge(m, src) -} -func (m *LeaseCheckpointResponse) XXX_Size() int { - return m.Size() -} -func (m *LeaseCheckpointResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCheckpointResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseCheckpointResponse proto.InternalMessageInfo - -func (m *LeaseCheckpointResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type LeaseKeepAliveRequest struct { - // ID is the lease ID for the lease to keep alive. - ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseKeepAliveRequest) Reset() { *m = LeaseKeepAliveRequest{} } -func (m *LeaseKeepAliveRequest) String() string { return proto.CompactTextString(m) } -func (*LeaseKeepAliveRequest) ProtoMessage() {} -func (*LeaseKeepAliveRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{32} -} -func (m *LeaseKeepAliveRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseKeepAliveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseKeepAliveRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseKeepAliveRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseKeepAliveRequest.Merge(m, src) -} -func (m *LeaseKeepAliveRequest) XXX_Size() int { - return m.Size() -} -func (m *LeaseKeepAliveRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseKeepAliveRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseKeepAliveRequest proto.InternalMessageInfo - -func (m *LeaseKeepAliveRequest) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -type LeaseKeepAliveResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // ID is the lease ID from the keep alive request. - ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"` - // TTL is the new time-to-live for the lease. - TTL int64 `protobuf:"varint,3,opt,name=TTL,proto3" json:"TTL,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseKeepAliveResponse) Reset() { *m = LeaseKeepAliveResponse{} } -func (m *LeaseKeepAliveResponse) String() string { return proto.CompactTextString(m) } -func (*LeaseKeepAliveResponse) ProtoMessage() {} -func (*LeaseKeepAliveResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{33} -} -func (m *LeaseKeepAliveResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseKeepAliveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseKeepAliveResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseKeepAliveResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseKeepAliveResponse.Merge(m, src) -} -func (m *LeaseKeepAliveResponse) XXX_Size() int { - return m.Size() -} -func (m *LeaseKeepAliveResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseKeepAliveResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseKeepAliveResponse proto.InternalMessageInfo - -func (m *LeaseKeepAliveResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *LeaseKeepAliveResponse) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *LeaseKeepAliveResponse) GetTTL() int64 { - if m != nil { - return m.TTL - } - return 0 -} - -type LeaseTimeToLiveRequest struct { - // ID is the lease ID for the lease. - ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - // keys is true to query all the keys attached to this lease. - Keys bool `protobuf:"varint,2,opt,name=keys,proto3" json:"keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseTimeToLiveRequest) Reset() { *m = LeaseTimeToLiveRequest{} } -func (m *LeaseTimeToLiveRequest) String() string { return proto.CompactTextString(m) } -func (*LeaseTimeToLiveRequest) ProtoMessage() {} -func (*LeaseTimeToLiveRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{34} -} -func (m *LeaseTimeToLiveRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseTimeToLiveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseTimeToLiveRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseTimeToLiveRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseTimeToLiveRequest.Merge(m, src) -} -func (m *LeaseTimeToLiveRequest) XXX_Size() int { - return m.Size() -} -func (m *LeaseTimeToLiveRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseTimeToLiveRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseTimeToLiveRequest proto.InternalMessageInfo - -func (m *LeaseTimeToLiveRequest) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *LeaseTimeToLiveRequest) GetKeys() bool { - if m != nil { - return m.Keys - } - return false -} - -type LeaseTimeToLiveResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // ID is the lease ID from the keep alive request. - ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"` - // TTL is the remaining TTL in seconds for the lease; the lease will expire in under TTL+1 seconds. - TTL int64 `protobuf:"varint,3,opt,name=TTL,proto3" json:"TTL,omitempty"` - // GrantedTTL is the initial granted time in seconds upon lease creation/renewal. - GrantedTTL int64 `protobuf:"varint,4,opt,name=grantedTTL,proto3" json:"grantedTTL,omitempty"` - // Keys is the list of keys attached to this lease. - Keys [][]byte `protobuf:"bytes,5,rep,name=keys,proto3" json:"keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseTimeToLiveResponse) Reset() { *m = LeaseTimeToLiveResponse{} } -func (m *LeaseTimeToLiveResponse) String() string { return proto.CompactTextString(m) } -func (*LeaseTimeToLiveResponse) ProtoMessage() {} -func (*LeaseTimeToLiveResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{35} -} -func (m *LeaseTimeToLiveResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseTimeToLiveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseTimeToLiveResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseTimeToLiveResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseTimeToLiveResponse.Merge(m, src) -} -func (m *LeaseTimeToLiveResponse) XXX_Size() int { - return m.Size() -} -func (m *LeaseTimeToLiveResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseTimeToLiveResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseTimeToLiveResponse proto.InternalMessageInfo - -func (m *LeaseTimeToLiveResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *LeaseTimeToLiveResponse) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *LeaseTimeToLiveResponse) GetTTL() int64 { - if m != nil { - return m.TTL - } - return 0 -} - -func (m *LeaseTimeToLiveResponse) GetGrantedTTL() int64 { - if m != nil { - return m.GrantedTTL - } - return 0 -} - -func (m *LeaseTimeToLiveResponse) GetKeys() [][]byte { - if m != nil { - return m.Keys - } - return nil -} - -type LeaseLeasesRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseLeasesRequest) Reset() { *m = LeaseLeasesRequest{} } -func (m *LeaseLeasesRequest) String() string { return proto.CompactTextString(m) } -func (*LeaseLeasesRequest) ProtoMessage() {} -func (*LeaseLeasesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{36} -} -func (m *LeaseLeasesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseLeasesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseLeasesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseLeasesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseLeasesRequest.Merge(m, src) -} -func (m *LeaseLeasesRequest) XXX_Size() int { - return m.Size() -} -func (m *LeaseLeasesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseLeasesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseLeasesRequest proto.InternalMessageInfo - -type LeaseStatus struct { - ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseStatus) Reset() { *m = LeaseStatus{} } -func (m *LeaseStatus) String() string { return proto.CompactTextString(m) } -func (*LeaseStatus) ProtoMessage() {} -func (*LeaseStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{37} -} -func (m *LeaseStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseStatus.Merge(m, src) -} -func (m *LeaseStatus) XXX_Size() int { - return m.Size() -} -func (m *LeaseStatus) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseStatus proto.InternalMessageInfo - -func (m *LeaseStatus) GetID() int64 { - if m != nil { - return m.ID - } - return 0 -} - -type LeaseLeasesResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Leases []*LeaseStatus `protobuf:"bytes,2,rep,name=leases,proto3" json:"leases,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseLeasesResponse) Reset() { *m = LeaseLeasesResponse{} } -func (m *LeaseLeasesResponse) String() string { return proto.CompactTextString(m) } -func (*LeaseLeasesResponse) ProtoMessage() {} -func (*LeaseLeasesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{38} -} -func (m *LeaseLeasesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseLeasesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LeaseLeasesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LeaseLeasesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseLeasesResponse.Merge(m, src) -} -func (m *LeaseLeasesResponse) XXX_Size() int { - return m.Size() -} -func (m *LeaseLeasesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseLeasesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseLeasesResponse proto.InternalMessageInfo - -func (m *LeaseLeasesResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *LeaseLeasesResponse) GetLeases() []*LeaseStatus { - if m != nil { - return m.Leases - } - return nil -} - -type Member struct { - // ID is the member ID for this member. - ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - // name is the human-readable name of the member. If the member is not started, the name will be an empty string. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // peerURLs is the list of URLs the member exposes to the cluster for communication. - PeerURLs []string `protobuf:"bytes,3,rep,name=peerURLs,proto3" json:"peerURLs,omitempty"` - // clientURLs is the list of URLs the member exposes to clients for communication. If the member is not started, clientURLs will be empty. - ClientURLs []string `protobuf:"bytes,4,rep,name=clientURLs,proto3" json:"clientURLs,omitempty"` - // isLearner indicates if the member is raft learner. - IsLearner bool `protobuf:"varint,5,opt,name=isLearner,proto3" json:"isLearner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Member) Reset() { *m = Member{} } -func (m *Member) String() string { return proto.CompactTextString(m) } -func (*Member) ProtoMessage() {} -func (*Member) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{39} -} -func (m *Member) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Member.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Member) XXX_Merge(src proto.Message) { - xxx_messageInfo_Member.Merge(m, src) -} -func (m *Member) XXX_Size() int { - return m.Size() -} -func (m *Member) XXX_DiscardUnknown() { - xxx_messageInfo_Member.DiscardUnknown(m) -} - -var xxx_messageInfo_Member proto.InternalMessageInfo - -func (m *Member) GetID() uint64 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *Member) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Member) GetPeerURLs() []string { - if m != nil { - return m.PeerURLs - } - return nil -} - -func (m *Member) GetClientURLs() []string { - if m != nil { - return m.ClientURLs - } - return nil -} - -func (m *Member) GetIsLearner() bool { - if m != nil { - return m.IsLearner - } - return false -} - -type MemberAddRequest struct { - // peerURLs is the list of URLs the added member will use to communicate with the cluster. - PeerURLs []string `protobuf:"bytes,1,rep,name=peerURLs,proto3" json:"peerURLs,omitempty"` - // isLearner indicates if the added member is raft learner. - IsLearner bool `protobuf:"varint,2,opt,name=isLearner,proto3" json:"isLearner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberAddRequest) Reset() { *m = MemberAddRequest{} } -func (m *MemberAddRequest) String() string { return proto.CompactTextString(m) } -func (*MemberAddRequest) ProtoMessage() {} -func (*MemberAddRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{40} -} -func (m *MemberAddRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemberAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemberAddRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MemberAddRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberAddRequest.Merge(m, src) -} -func (m *MemberAddRequest) XXX_Size() int { - return m.Size() -} -func (m *MemberAddRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MemberAddRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberAddRequest proto.InternalMessageInfo - -func (m *MemberAddRequest) GetPeerURLs() []string { - if m != nil { - return m.PeerURLs - } - return nil -} - -func (m *MemberAddRequest) GetIsLearner() bool { - if m != nil { - return m.IsLearner - } - return false -} - -type MemberAddResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // member is the member information for the added member. - Member *Member `protobuf:"bytes,2,opt,name=member,proto3" json:"member,omitempty"` - // members is a list of all members after adding the new member. - Members []*Member `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberAddResponse) Reset() { *m = MemberAddResponse{} } -func (m *MemberAddResponse) String() string { return proto.CompactTextString(m) } -func (*MemberAddResponse) ProtoMessage() {} -func (*MemberAddResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{41} -} -func (m *MemberAddResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemberAddResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemberAddResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MemberAddResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberAddResponse.Merge(m, src) -} -func (m *MemberAddResponse) XXX_Size() int { - return m.Size() -} -func (m *MemberAddResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MemberAddResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberAddResponse proto.InternalMessageInfo - -func (m *MemberAddResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *MemberAddResponse) GetMember() *Member { - if m != nil { - return m.Member - } - return nil -} - -func (m *MemberAddResponse) GetMembers() []*Member { - if m != nil { - return m.Members - } - return nil -} - -type MemberRemoveRequest struct { - // ID is the member ID of the member to remove. - ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberRemoveRequest) Reset() { *m = MemberRemoveRequest{} } -func (m *MemberRemoveRequest) String() string { return proto.CompactTextString(m) } -func (*MemberRemoveRequest) ProtoMessage() {} -func (*MemberRemoveRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{42} -} -func (m *MemberRemoveRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemberRemoveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemberRemoveRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MemberRemoveRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberRemoveRequest.Merge(m, src) -} -func (m *MemberRemoveRequest) XXX_Size() int { - return m.Size() -} -func (m *MemberRemoveRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MemberRemoveRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberRemoveRequest proto.InternalMessageInfo - -func (m *MemberRemoveRequest) GetID() uint64 { - if m != nil { - return m.ID - } - return 0 -} - -type MemberRemoveResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // members is a list of all members after removing the member. - Members []*Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberRemoveResponse) Reset() { *m = MemberRemoveResponse{} } -func (m *MemberRemoveResponse) String() string { return proto.CompactTextString(m) } -func (*MemberRemoveResponse) ProtoMessage() {} -func (*MemberRemoveResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{43} -} -func (m *MemberRemoveResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemberRemoveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemberRemoveResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MemberRemoveResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberRemoveResponse.Merge(m, src) -} -func (m *MemberRemoveResponse) XXX_Size() int { - return m.Size() -} -func (m *MemberRemoveResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MemberRemoveResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberRemoveResponse proto.InternalMessageInfo - -func (m *MemberRemoveResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *MemberRemoveResponse) GetMembers() []*Member { - if m != nil { - return m.Members - } - return nil -} - -type MemberUpdateRequest struct { - // ID is the member ID of the member to update. - ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - // peerURLs is the new list of URLs the member will use to communicate with the cluster. - PeerURLs []string `protobuf:"bytes,2,rep,name=peerURLs,proto3" json:"peerURLs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberUpdateRequest) Reset() { *m = MemberUpdateRequest{} } -func (m *MemberUpdateRequest) String() string { return proto.CompactTextString(m) } -func (*MemberUpdateRequest) ProtoMessage() {} -func (*MemberUpdateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{44} -} -func (m *MemberUpdateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemberUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemberUpdateRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MemberUpdateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberUpdateRequest.Merge(m, src) -} -func (m *MemberUpdateRequest) XXX_Size() int { - return m.Size() -} -func (m *MemberUpdateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MemberUpdateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberUpdateRequest proto.InternalMessageInfo - -func (m *MemberUpdateRequest) GetID() uint64 { - if m != nil { - return m.ID - } - return 0 -} - -func (m *MemberUpdateRequest) GetPeerURLs() []string { - if m != nil { - return m.PeerURLs - } - return nil -} - -type MemberUpdateResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // members is a list of all members after updating the member. - Members []*Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberUpdateResponse) Reset() { *m = MemberUpdateResponse{} } -func (m *MemberUpdateResponse) String() string { return proto.CompactTextString(m) } -func (*MemberUpdateResponse) ProtoMessage() {} -func (*MemberUpdateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{45} -} -func (m *MemberUpdateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemberUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemberUpdateResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MemberUpdateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberUpdateResponse.Merge(m, src) -} -func (m *MemberUpdateResponse) XXX_Size() int { - return m.Size() -} -func (m *MemberUpdateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MemberUpdateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberUpdateResponse proto.InternalMessageInfo - -func (m *MemberUpdateResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *MemberUpdateResponse) GetMembers() []*Member { - if m != nil { - return m.Members - } - return nil -} - -type MemberListRequest struct { - Linearizable bool `protobuf:"varint,1,opt,name=linearizable,proto3" json:"linearizable,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberListRequest) Reset() { *m = MemberListRequest{} } -func (m *MemberListRequest) String() string { return proto.CompactTextString(m) } -func (*MemberListRequest) ProtoMessage() {} -func (*MemberListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{46} -} -func (m *MemberListRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemberListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemberListRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MemberListRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberListRequest.Merge(m, src) -} -func (m *MemberListRequest) XXX_Size() int { - return m.Size() -} -func (m *MemberListRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MemberListRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberListRequest proto.InternalMessageInfo - -func (m *MemberListRequest) GetLinearizable() bool { - if m != nil { - return m.Linearizable - } - return false -} - -type MemberListResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // members is a list of all members associated with the cluster. - Members []*Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberListResponse) Reset() { *m = MemberListResponse{} } -func (m *MemberListResponse) String() string { return proto.CompactTextString(m) } -func (*MemberListResponse) ProtoMessage() {} -func (*MemberListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{47} -} -func (m *MemberListResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemberListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemberListResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MemberListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberListResponse.Merge(m, src) -} -func (m *MemberListResponse) XXX_Size() int { - return m.Size() -} -func (m *MemberListResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MemberListResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberListResponse proto.InternalMessageInfo - -func (m *MemberListResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *MemberListResponse) GetMembers() []*Member { - if m != nil { - return m.Members - } - return nil -} - -type MemberPromoteRequest struct { - // ID is the member ID of the member to promote. - ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberPromoteRequest) Reset() { *m = MemberPromoteRequest{} } -func (m *MemberPromoteRequest) String() string { return proto.CompactTextString(m) } -func (*MemberPromoteRequest) ProtoMessage() {} -func (*MemberPromoteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{48} -} -func (m *MemberPromoteRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemberPromoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemberPromoteRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MemberPromoteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberPromoteRequest.Merge(m, src) -} -func (m *MemberPromoteRequest) XXX_Size() int { - return m.Size() -} -func (m *MemberPromoteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MemberPromoteRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberPromoteRequest proto.InternalMessageInfo - -func (m *MemberPromoteRequest) GetID() uint64 { - if m != nil { - return m.ID - } - return 0 -} - -type MemberPromoteResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // members is a list of all members after promoting the member. - Members []*Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberPromoteResponse) Reset() { *m = MemberPromoteResponse{} } -func (m *MemberPromoteResponse) String() string { return proto.CompactTextString(m) } -func (*MemberPromoteResponse) ProtoMessage() {} -func (*MemberPromoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{49} -} -func (m *MemberPromoteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemberPromoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemberPromoteResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MemberPromoteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberPromoteResponse.Merge(m, src) -} -func (m *MemberPromoteResponse) XXX_Size() int { - return m.Size() -} -func (m *MemberPromoteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MemberPromoteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberPromoteResponse proto.InternalMessageInfo - -func (m *MemberPromoteResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *MemberPromoteResponse) GetMembers() []*Member { - if m != nil { - return m.Members - } - return nil -} - -type DefragmentRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DefragmentRequest) Reset() { *m = DefragmentRequest{} } -func (m *DefragmentRequest) String() string { return proto.CompactTextString(m) } -func (*DefragmentRequest) ProtoMessage() {} -func (*DefragmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{50} -} -func (m *DefragmentRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DefragmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DefragmentRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DefragmentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DefragmentRequest.Merge(m, src) -} -func (m *DefragmentRequest) XXX_Size() int { - return m.Size() -} -func (m *DefragmentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DefragmentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DefragmentRequest proto.InternalMessageInfo - -type DefragmentResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DefragmentResponse) Reset() { *m = DefragmentResponse{} } -func (m *DefragmentResponse) String() string { return proto.CompactTextString(m) } -func (*DefragmentResponse) ProtoMessage() {} -func (*DefragmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{51} -} -func (m *DefragmentResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DefragmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DefragmentResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DefragmentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DefragmentResponse.Merge(m, src) -} -func (m *DefragmentResponse) XXX_Size() int { - return m.Size() -} -func (m *DefragmentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DefragmentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DefragmentResponse proto.InternalMessageInfo - -func (m *DefragmentResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type MoveLeaderRequest struct { - // targetID is the node ID for the new leader. - TargetID uint64 `protobuf:"varint,1,opt,name=targetID,proto3" json:"targetID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MoveLeaderRequest) Reset() { *m = MoveLeaderRequest{} } -func (m *MoveLeaderRequest) String() string { return proto.CompactTextString(m) } -func (*MoveLeaderRequest) ProtoMessage() {} -func (*MoveLeaderRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{52} -} -func (m *MoveLeaderRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MoveLeaderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MoveLeaderRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MoveLeaderRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MoveLeaderRequest.Merge(m, src) -} -func (m *MoveLeaderRequest) XXX_Size() int { - return m.Size() -} -func (m *MoveLeaderRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MoveLeaderRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MoveLeaderRequest proto.InternalMessageInfo - -func (m *MoveLeaderRequest) GetTargetID() uint64 { - if m != nil { - return m.TargetID - } - return 0 -} - -type MoveLeaderResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MoveLeaderResponse) Reset() { *m = MoveLeaderResponse{} } -func (m *MoveLeaderResponse) String() string { return proto.CompactTextString(m) } -func (*MoveLeaderResponse) ProtoMessage() {} -func (*MoveLeaderResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{53} -} -func (m *MoveLeaderResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MoveLeaderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MoveLeaderResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MoveLeaderResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MoveLeaderResponse.Merge(m, src) -} -func (m *MoveLeaderResponse) XXX_Size() int { - return m.Size() -} -func (m *MoveLeaderResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MoveLeaderResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MoveLeaderResponse proto.InternalMessageInfo - -func (m *MoveLeaderResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type AlarmRequest struct { - // action is the kind of alarm request to issue. The action - // may GET alarm statuses, ACTIVATE an alarm, or DEACTIVATE a - // raised alarm. - Action AlarmRequest_AlarmAction `protobuf:"varint,1,opt,name=action,proto3,enum=etcdserverpb.AlarmRequest_AlarmAction" json:"action,omitempty"` - // memberID is the ID of the member associated with the alarm. If memberID is 0, the - // alarm request covers all members. - MemberID uint64 `protobuf:"varint,2,opt,name=memberID,proto3" json:"memberID,omitempty"` - // alarm is the type of alarm to consider for this request. - Alarm AlarmType `protobuf:"varint,3,opt,name=alarm,proto3,enum=etcdserverpb.AlarmType" json:"alarm,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AlarmRequest) Reset() { *m = AlarmRequest{} } -func (m *AlarmRequest) String() string { return proto.CompactTextString(m) } -func (*AlarmRequest) ProtoMessage() {} -func (*AlarmRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{54} -} -func (m *AlarmRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AlarmRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AlarmRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AlarmRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AlarmRequest.Merge(m, src) -} -func (m *AlarmRequest) XXX_Size() int { - return m.Size() -} -func (m *AlarmRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AlarmRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AlarmRequest proto.InternalMessageInfo - -func (m *AlarmRequest) GetAction() AlarmRequest_AlarmAction { - if m != nil { - return m.Action - } - return AlarmRequest_GET -} - -func (m *AlarmRequest) GetMemberID() uint64 { - if m != nil { - return m.MemberID - } - return 0 -} - -func (m *AlarmRequest) GetAlarm() AlarmType { - if m != nil { - return m.Alarm - } - return AlarmType_NONE -} - -type AlarmMember struct { - // memberID is the ID of the member associated with the raised alarm. - MemberID uint64 `protobuf:"varint,1,opt,name=memberID,proto3" json:"memberID,omitempty"` - // alarm is the type of alarm which has been raised. - Alarm AlarmType `protobuf:"varint,2,opt,name=alarm,proto3,enum=etcdserverpb.AlarmType" json:"alarm,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AlarmMember) Reset() { *m = AlarmMember{} } -func (m *AlarmMember) String() string { return proto.CompactTextString(m) } -func (*AlarmMember) ProtoMessage() {} -func (*AlarmMember) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{55} -} -func (m *AlarmMember) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AlarmMember) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AlarmMember.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AlarmMember) XXX_Merge(src proto.Message) { - xxx_messageInfo_AlarmMember.Merge(m, src) -} -func (m *AlarmMember) XXX_Size() int { - return m.Size() -} -func (m *AlarmMember) XXX_DiscardUnknown() { - xxx_messageInfo_AlarmMember.DiscardUnknown(m) -} - -var xxx_messageInfo_AlarmMember proto.InternalMessageInfo - -func (m *AlarmMember) GetMemberID() uint64 { - if m != nil { - return m.MemberID - } - return 0 -} - -func (m *AlarmMember) GetAlarm() AlarmType { - if m != nil { - return m.Alarm - } - return AlarmType_NONE -} - -type AlarmResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // alarms is a list of alarms associated with the alarm request. - Alarms []*AlarmMember `protobuf:"bytes,2,rep,name=alarms,proto3" json:"alarms,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AlarmResponse) Reset() { *m = AlarmResponse{} } -func (m *AlarmResponse) String() string { return proto.CompactTextString(m) } -func (*AlarmResponse) ProtoMessage() {} -func (*AlarmResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{56} -} -func (m *AlarmResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AlarmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AlarmResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AlarmResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AlarmResponse.Merge(m, src) -} -func (m *AlarmResponse) XXX_Size() int { - return m.Size() -} -func (m *AlarmResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AlarmResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AlarmResponse proto.InternalMessageInfo - -func (m *AlarmResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *AlarmResponse) GetAlarms() []*AlarmMember { - if m != nil { - return m.Alarms - } - return nil -} - -type DowngradeRequest struct { - // action is the kind of downgrade request to issue. The action may - // VALIDATE the target version, DOWNGRADE the cluster version, - // or CANCEL the current downgrading job. - Action DowngradeRequest_DowngradeAction `protobuf:"varint,1,opt,name=action,proto3,enum=etcdserverpb.DowngradeRequest_DowngradeAction" json:"action,omitempty"` - // version is the target version to downgrade. - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DowngradeRequest) Reset() { *m = DowngradeRequest{} } -func (m *DowngradeRequest) String() string { return proto.CompactTextString(m) } -func (*DowngradeRequest) ProtoMessage() {} -func (*DowngradeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{57} -} -func (m *DowngradeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DowngradeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DowngradeRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DowngradeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DowngradeRequest.Merge(m, src) -} -func (m *DowngradeRequest) XXX_Size() int { - return m.Size() -} -func (m *DowngradeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DowngradeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DowngradeRequest proto.InternalMessageInfo - -func (m *DowngradeRequest) GetAction() DowngradeRequest_DowngradeAction { - if m != nil { - return m.Action - } - return DowngradeRequest_VALIDATE -} - -func (m *DowngradeRequest) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -type DowngradeResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // version is the current cluster version. - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DowngradeResponse) Reset() { *m = DowngradeResponse{} } -func (m *DowngradeResponse) String() string { return proto.CompactTextString(m) } -func (*DowngradeResponse) ProtoMessage() {} -func (*DowngradeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{58} -} -func (m *DowngradeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DowngradeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DowngradeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DowngradeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DowngradeResponse.Merge(m, src) -} -func (m *DowngradeResponse) XXX_Size() int { - return m.Size() -} -func (m *DowngradeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DowngradeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DowngradeResponse proto.InternalMessageInfo - -func (m *DowngradeResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *DowngradeResponse) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -type StatusRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StatusRequest) Reset() { *m = StatusRequest{} } -func (m *StatusRequest) String() string { return proto.CompactTextString(m) } -func (*StatusRequest) ProtoMessage() {} -func (*StatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{59} -} -func (m *StatusRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatusRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusRequest.Merge(m, src) -} -func (m *StatusRequest) XXX_Size() int { - return m.Size() -} -func (m *StatusRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StatusRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_StatusRequest proto.InternalMessageInfo - -type StatusResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // version is the cluster protocol version used by the responding member. - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - // dbSize is the size of the backend database physically allocated, in bytes, of the responding member. - DbSize int64 `protobuf:"varint,3,opt,name=dbSize,proto3" json:"dbSize,omitempty"` - // leader is the member ID which the responding member believes is the current leader. - Leader uint64 `protobuf:"varint,4,opt,name=leader,proto3" json:"leader,omitempty"` - // raftIndex is the current raft committed index of the responding member. - RaftIndex uint64 `protobuf:"varint,5,opt,name=raftIndex,proto3" json:"raftIndex,omitempty"` - // raftTerm is the current raft term of the responding member. - RaftTerm uint64 `protobuf:"varint,6,opt,name=raftTerm,proto3" json:"raftTerm,omitempty"` - // raftAppliedIndex is the current raft applied index of the responding member. - RaftAppliedIndex uint64 `protobuf:"varint,7,opt,name=raftAppliedIndex,proto3" json:"raftAppliedIndex,omitempty"` - // errors contains alarm/health information and status. - Errors []string `protobuf:"bytes,8,rep,name=errors,proto3" json:"errors,omitempty"` - // dbSizeInUse is the size of the backend database logically in use, in bytes, of the responding member. - DbSizeInUse int64 `protobuf:"varint,9,opt,name=dbSizeInUse,proto3" json:"dbSizeInUse,omitempty"` - // isLearner indicates if the member is raft learner. - IsLearner bool `protobuf:"varint,10,opt,name=isLearner,proto3" json:"isLearner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StatusResponse) Reset() { *m = StatusResponse{} } -func (m *StatusResponse) String() string { return proto.CompactTextString(m) } -func (*StatusResponse) ProtoMessage() {} -func (*StatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{60} -} -func (m *StatusResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatusResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusResponse.Merge(m, src) -} -func (m *StatusResponse) XXX_Size() int { - return m.Size() -} -func (m *StatusResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StatusResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_StatusResponse proto.InternalMessageInfo - -func (m *StatusResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *StatusResponse) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *StatusResponse) GetDbSize() int64 { - if m != nil { - return m.DbSize - } - return 0 -} - -func (m *StatusResponse) GetLeader() uint64 { - if m != nil { - return m.Leader - } - return 0 -} - -func (m *StatusResponse) GetRaftIndex() uint64 { - if m != nil { - return m.RaftIndex - } - return 0 -} - -func (m *StatusResponse) GetRaftTerm() uint64 { - if m != nil { - return m.RaftTerm - } - return 0 -} - -func (m *StatusResponse) GetRaftAppliedIndex() uint64 { - if m != nil { - return m.RaftAppliedIndex - } - return 0 -} - -func (m *StatusResponse) GetErrors() []string { - if m != nil { - return m.Errors - } - return nil -} - -func (m *StatusResponse) GetDbSizeInUse() int64 { - if m != nil { - return m.DbSizeInUse - } - return 0 -} - -func (m *StatusResponse) GetIsLearner() bool { - if m != nil { - return m.IsLearner - } - return false -} - -type AuthEnableRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthEnableRequest) Reset() { *m = AuthEnableRequest{} } -func (m *AuthEnableRequest) String() string { return proto.CompactTextString(m) } -func (*AuthEnableRequest) ProtoMessage() {} -func (*AuthEnableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{61} -} -func (m *AuthEnableRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthEnableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthEnableRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthEnableRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthEnableRequest.Merge(m, src) -} -func (m *AuthEnableRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthEnableRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthEnableRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthEnableRequest proto.InternalMessageInfo - -type AuthDisableRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthDisableRequest) Reset() { *m = AuthDisableRequest{} } -func (m *AuthDisableRequest) String() string { return proto.CompactTextString(m) } -func (*AuthDisableRequest) ProtoMessage() {} -func (*AuthDisableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{62} -} -func (m *AuthDisableRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthDisableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthDisableRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthDisableRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthDisableRequest.Merge(m, src) -} -func (m *AuthDisableRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthDisableRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthDisableRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthDisableRequest proto.InternalMessageInfo - -type AuthStatusRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthStatusRequest) Reset() { *m = AuthStatusRequest{} } -func (m *AuthStatusRequest) String() string { return proto.CompactTextString(m) } -func (*AuthStatusRequest) ProtoMessage() {} -func (*AuthStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{63} -} -func (m *AuthStatusRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthStatusRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthStatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthStatusRequest.Merge(m, src) -} -func (m *AuthStatusRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthStatusRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthStatusRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthStatusRequest proto.InternalMessageInfo - -type AuthenticateRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthenticateRequest) Reset() { *m = AuthenticateRequest{} } -func (m *AuthenticateRequest) String() string { return proto.CompactTextString(m) } -func (*AuthenticateRequest) ProtoMessage() {} -func (*AuthenticateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{64} -} -func (m *AuthenticateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthenticateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthenticateRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthenticateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthenticateRequest.Merge(m, src) -} -func (m *AuthenticateRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthenticateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthenticateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthenticateRequest proto.InternalMessageInfo - -func (m *AuthenticateRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *AuthenticateRequest) GetPassword() string { - if m != nil { - return m.Password - } - return "" -} - -type AuthUserAddRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - Options *authpb.UserAddOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"` - HashedPassword string `protobuf:"bytes,4,opt,name=hashedPassword,proto3" json:"hashedPassword,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserAddRequest) Reset() { *m = AuthUserAddRequest{} } -func (m *AuthUserAddRequest) String() string { return proto.CompactTextString(m) } -func (*AuthUserAddRequest) ProtoMessage() {} -func (*AuthUserAddRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{65} -} -func (m *AuthUserAddRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserAddRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserAddRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserAddRequest.Merge(m, src) -} -func (m *AuthUserAddRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthUserAddRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserAddRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserAddRequest proto.InternalMessageInfo - -func (m *AuthUserAddRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *AuthUserAddRequest) GetPassword() string { - if m != nil { - return m.Password - } - return "" -} - -func (m *AuthUserAddRequest) GetOptions() *authpb.UserAddOptions { - if m != nil { - return m.Options - } - return nil -} - -func (m *AuthUserAddRequest) GetHashedPassword() string { - if m != nil { - return m.HashedPassword - } - return "" -} - -type AuthUserGetRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserGetRequest) Reset() { *m = AuthUserGetRequest{} } -func (m *AuthUserGetRequest) String() string { return proto.CompactTextString(m) } -func (*AuthUserGetRequest) ProtoMessage() {} -func (*AuthUserGetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{66} -} -func (m *AuthUserGetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserGetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserGetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserGetRequest.Merge(m, src) -} -func (m *AuthUserGetRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthUserGetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserGetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserGetRequest proto.InternalMessageInfo - -func (m *AuthUserGetRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -type AuthUserDeleteRequest struct { - // name is the name of the user to delete. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserDeleteRequest) Reset() { *m = AuthUserDeleteRequest{} } -func (m *AuthUserDeleteRequest) String() string { return proto.CompactTextString(m) } -func (*AuthUserDeleteRequest) ProtoMessage() {} -func (*AuthUserDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{67} -} -func (m *AuthUserDeleteRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserDeleteRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserDeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserDeleteRequest.Merge(m, src) -} -func (m *AuthUserDeleteRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthUserDeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserDeleteRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserDeleteRequest proto.InternalMessageInfo - -func (m *AuthUserDeleteRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -type AuthUserChangePasswordRequest struct { - // name is the name of the user whose password is being changed. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // password is the new password for the user. Note that this field will be removed in the API layer. - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - // hashedPassword is the new password for the user. Note that this field will be initialized in the API layer. - HashedPassword string `protobuf:"bytes,3,opt,name=hashedPassword,proto3" json:"hashedPassword,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserChangePasswordRequest) Reset() { *m = AuthUserChangePasswordRequest{} } -func (m *AuthUserChangePasswordRequest) String() string { return proto.CompactTextString(m) } -func (*AuthUserChangePasswordRequest) ProtoMessage() {} -func (*AuthUserChangePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{68} -} -func (m *AuthUserChangePasswordRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserChangePasswordRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserChangePasswordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserChangePasswordRequest.Merge(m, src) -} -func (m *AuthUserChangePasswordRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthUserChangePasswordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserChangePasswordRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserChangePasswordRequest proto.InternalMessageInfo - -func (m *AuthUserChangePasswordRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *AuthUserChangePasswordRequest) GetPassword() string { - if m != nil { - return m.Password - } - return "" -} - -func (m *AuthUserChangePasswordRequest) GetHashedPassword() string { - if m != nil { - return m.HashedPassword - } - return "" -} - -type AuthUserGrantRoleRequest struct { - // user is the name of the user which should be granted a given role. - User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - // role is the name of the role to grant to the user. - Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserGrantRoleRequest) Reset() { *m = AuthUserGrantRoleRequest{} } -func (m *AuthUserGrantRoleRequest) String() string { return proto.CompactTextString(m) } -func (*AuthUserGrantRoleRequest) ProtoMessage() {} -func (*AuthUserGrantRoleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{69} -} -func (m *AuthUserGrantRoleRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserGrantRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserGrantRoleRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserGrantRoleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserGrantRoleRequest.Merge(m, src) -} -func (m *AuthUserGrantRoleRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthUserGrantRoleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserGrantRoleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserGrantRoleRequest proto.InternalMessageInfo - -func (m *AuthUserGrantRoleRequest) GetUser() string { - if m != nil { - return m.User - } - return "" -} - -func (m *AuthUserGrantRoleRequest) GetRole() string { - if m != nil { - return m.Role - } - return "" -} - -type AuthUserRevokeRoleRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserRevokeRoleRequest) Reset() { *m = AuthUserRevokeRoleRequest{} } -func (m *AuthUserRevokeRoleRequest) String() string { return proto.CompactTextString(m) } -func (*AuthUserRevokeRoleRequest) ProtoMessage() {} -func (*AuthUserRevokeRoleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{70} -} -func (m *AuthUserRevokeRoleRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserRevokeRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserRevokeRoleRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserRevokeRoleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserRevokeRoleRequest.Merge(m, src) -} -func (m *AuthUserRevokeRoleRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthUserRevokeRoleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserRevokeRoleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserRevokeRoleRequest proto.InternalMessageInfo - -func (m *AuthUserRevokeRoleRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *AuthUserRevokeRoleRequest) GetRole() string { - if m != nil { - return m.Role - } - return "" -} - -type AuthRoleAddRequest struct { - // name is the name of the role to add to the authentication system. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleAddRequest) Reset() { *m = AuthRoleAddRequest{} } -func (m *AuthRoleAddRequest) String() string { return proto.CompactTextString(m) } -func (*AuthRoleAddRequest) ProtoMessage() {} -func (*AuthRoleAddRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{71} -} -func (m *AuthRoleAddRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleAddRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleAddRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleAddRequest.Merge(m, src) -} -func (m *AuthRoleAddRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleAddRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleAddRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleAddRequest proto.InternalMessageInfo - -func (m *AuthRoleAddRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -type AuthRoleGetRequest struct { - Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleGetRequest) Reset() { *m = AuthRoleGetRequest{} } -func (m *AuthRoleGetRequest) String() string { return proto.CompactTextString(m) } -func (*AuthRoleGetRequest) ProtoMessage() {} -func (*AuthRoleGetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{72} -} -func (m *AuthRoleGetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleGetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleGetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleGetRequest.Merge(m, src) -} -func (m *AuthRoleGetRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleGetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleGetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleGetRequest proto.InternalMessageInfo - -func (m *AuthRoleGetRequest) GetRole() string { - if m != nil { - return m.Role - } - return "" -} - -type AuthUserListRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserListRequest) Reset() { *m = AuthUserListRequest{} } -func (m *AuthUserListRequest) String() string { return proto.CompactTextString(m) } -func (*AuthUserListRequest) ProtoMessage() {} -func (*AuthUserListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{73} -} -func (m *AuthUserListRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserListRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserListRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserListRequest.Merge(m, src) -} -func (m *AuthUserListRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthUserListRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserListRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserListRequest proto.InternalMessageInfo - -type AuthRoleListRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleListRequest) Reset() { *m = AuthRoleListRequest{} } -func (m *AuthRoleListRequest) String() string { return proto.CompactTextString(m) } -func (*AuthRoleListRequest) ProtoMessage() {} -func (*AuthRoleListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{74} -} -func (m *AuthRoleListRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleListRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleListRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleListRequest.Merge(m, src) -} -func (m *AuthRoleListRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleListRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleListRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleListRequest proto.InternalMessageInfo - -type AuthRoleDeleteRequest struct { - Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleDeleteRequest) Reset() { *m = AuthRoleDeleteRequest{} } -func (m *AuthRoleDeleteRequest) String() string { return proto.CompactTextString(m) } -func (*AuthRoleDeleteRequest) ProtoMessage() {} -func (*AuthRoleDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{75} -} -func (m *AuthRoleDeleteRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleDeleteRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleDeleteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleDeleteRequest.Merge(m, src) -} -func (m *AuthRoleDeleteRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleDeleteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleDeleteRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleDeleteRequest proto.InternalMessageInfo - -func (m *AuthRoleDeleteRequest) GetRole() string { - if m != nil { - return m.Role - } - return "" -} - -type AuthRoleGrantPermissionRequest struct { - // name is the name of the role which will be granted the permission. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // perm is the permission to grant to the role. - Perm *authpb.Permission `protobuf:"bytes,2,opt,name=perm,proto3" json:"perm,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleGrantPermissionRequest) Reset() { *m = AuthRoleGrantPermissionRequest{} } -func (m *AuthRoleGrantPermissionRequest) String() string { return proto.CompactTextString(m) } -func (*AuthRoleGrantPermissionRequest) ProtoMessage() {} -func (*AuthRoleGrantPermissionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{76} -} -func (m *AuthRoleGrantPermissionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleGrantPermissionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleGrantPermissionRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleGrantPermissionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleGrantPermissionRequest.Merge(m, src) -} -func (m *AuthRoleGrantPermissionRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleGrantPermissionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleGrantPermissionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleGrantPermissionRequest proto.InternalMessageInfo - -func (m *AuthRoleGrantPermissionRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *AuthRoleGrantPermissionRequest) GetPerm() *authpb.Permission { - if m != nil { - return m.Perm - } - return nil -} - -type AuthRoleRevokePermissionRequest struct { - Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - RangeEnd []byte `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleRevokePermissionRequest) Reset() { *m = AuthRoleRevokePermissionRequest{} } -func (m *AuthRoleRevokePermissionRequest) String() string { return proto.CompactTextString(m) } -func (*AuthRoleRevokePermissionRequest) ProtoMessage() {} -func (*AuthRoleRevokePermissionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{77} -} -func (m *AuthRoleRevokePermissionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleRevokePermissionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleRevokePermissionRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleRevokePermissionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleRevokePermissionRequest.Merge(m, src) -} -func (m *AuthRoleRevokePermissionRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleRevokePermissionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleRevokePermissionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleRevokePermissionRequest proto.InternalMessageInfo - -func (m *AuthRoleRevokePermissionRequest) GetRole() string { - if m != nil { - return m.Role - } - return "" -} - -func (m *AuthRoleRevokePermissionRequest) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *AuthRoleRevokePermissionRequest) GetRangeEnd() []byte { - if m != nil { - return m.RangeEnd - } - return nil -} - -type AuthEnableResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthEnableResponse) Reset() { *m = AuthEnableResponse{} } -func (m *AuthEnableResponse) String() string { return proto.CompactTextString(m) } -func (*AuthEnableResponse) ProtoMessage() {} -func (*AuthEnableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{78} -} -func (m *AuthEnableResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthEnableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthEnableResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthEnableResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthEnableResponse.Merge(m, src) -} -func (m *AuthEnableResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthEnableResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthEnableResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthEnableResponse proto.InternalMessageInfo - -func (m *AuthEnableResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type AuthDisableResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthDisableResponse) Reset() { *m = AuthDisableResponse{} } -func (m *AuthDisableResponse) String() string { return proto.CompactTextString(m) } -func (*AuthDisableResponse) ProtoMessage() {} -func (*AuthDisableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{79} -} -func (m *AuthDisableResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthDisableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthDisableResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthDisableResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthDisableResponse.Merge(m, src) -} -func (m *AuthDisableResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthDisableResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthDisableResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthDisableResponse proto.InternalMessageInfo - -func (m *AuthDisableResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type AuthStatusResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` - // authRevision is the current revision of auth store - AuthRevision uint64 `protobuf:"varint,3,opt,name=authRevision,proto3" json:"authRevision,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthStatusResponse) Reset() { *m = AuthStatusResponse{} } -func (m *AuthStatusResponse) String() string { return proto.CompactTextString(m) } -func (*AuthStatusResponse) ProtoMessage() {} -func (*AuthStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{80} -} -func (m *AuthStatusResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthStatusResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthStatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthStatusResponse.Merge(m, src) -} -func (m *AuthStatusResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthStatusResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthStatusResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthStatusResponse proto.InternalMessageInfo - -func (m *AuthStatusResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *AuthStatusResponse) GetEnabled() bool { - if m != nil { - return m.Enabled - } - return false -} - -func (m *AuthStatusResponse) GetAuthRevision() uint64 { - if m != nil { - return m.AuthRevision - } - return 0 -} - -type AuthenticateResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // token is an authorized token that can be used in succeeding RPCs - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthenticateResponse) Reset() { *m = AuthenticateResponse{} } -func (m *AuthenticateResponse) String() string { return proto.CompactTextString(m) } -func (*AuthenticateResponse) ProtoMessage() {} -func (*AuthenticateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{81} -} -func (m *AuthenticateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthenticateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthenticateResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthenticateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthenticateResponse.Merge(m, src) -} -func (m *AuthenticateResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthenticateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthenticateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthenticateResponse proto.InternalMessageInfo - -func (m *AuthenticateResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *AuthenticateResponse) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - -type AuthUserAddResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserAddResponse) Reset() { *m = AuthUserAddResponse{} } -func (m *AuthUserAddResponse) String() string { return proto.CompactTextString(m) } -func (*AuthUserAddResponse) ProtoMessage() {} -func (*AuthUserAddResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{82} -} -func (m *AuthUserAddResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserAddResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserAddResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserAddResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserAddResponse.Merge(m, src) -} -func (m *AuthUserAddResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthUserAddResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserAddResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserAddResponse proto.InternalMessageInfo - -func (m *AuthUserAddResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type AuthUserGetResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Roles []string `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserGetResponse) Reset() { *m = AuthUserGetResponse{} } -func (m *AuthUserGetResponse) String() string { return proto.CompactTextString(m) } -func (*AuthUserGetResponse) ProtoMessage() {} -func (*AuthUserGetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{83} -} -func (m *AuthUserGetResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserGetResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserGetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserGetResponse.Merge(m, src) -} -func (m *AuthUserGetResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthUserGetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserGetResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserGetResponse proto.InternalMessageInfo - -func (m *AuthUserGetResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *AuthUserGetResponse) GetRoles() []string { - if m != nil { - return m.Roles - } - return nil -} - -type AuthUserDeleteResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserDeleteResponse) Reset() { *m = AuthUserDeleteResponse{} } -func (m *AuthUserDeleteResponse) String() string { return proto.CompactTextString(m) } -func (*AuthUserDeleteResponse) ProtoMessage() {} -func (*AuthUserDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{84} -} -func (m *AuthUserDeleteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserDeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserDeleteResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserDeleteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserDeleteResponse.Merge(m, src) -} -func (m *AuthUserDeleteResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthUserDeleteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserDeleteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserDeleteResponse proto.InternalMessageInfo - -func (m *AuthUserDeleteResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type AuthUserChangePasswordResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserChangePasswordResponse) Reset() { *m = AuthUserChangePasswordResponse{} } -func (m *AuthUserChangePasswordResponse) String() string { return proto.CompactTextString(m) } -func (*AuthUserChangePasswordResponse) ProtoMessage() {} -func (*AuthUserChangePasswordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{85} -} -func (m *AuthUserChangePasswordResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserChangePasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserChangePasswordResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserChangePasswordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserChangePasswordResponse.Merge(m, src) -} -func (m *AuthUserChangePasswordResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthUserChangePasswordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserChangePasswordResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserChangePasswordResponse proto.InternalMessageInfo - -func (m *AuthUserChangePasswordResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type AuthUserGrantRoleResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserGrantRoleResponse) Reset() { *m = AuthUserGrantRoleResponse{} } -func (m *AuthUserGrantRoleResponse) String() string { return proto.CompactTextString(m) } -func (*AuthUserGrantRoleResponse) ProtoMessage() {} -func (*AuthUserGrantRoleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{86} -} -func (m *AuthUserGrantRoleResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserGrantRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserGrantRoleResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserGrantRoleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserGrantRoleResponse.Merge(m, src) -} -func (m *AuthUserGrantRoleResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthUserGrantRoleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserGrantRoleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserGrantRoleResponse proto.InternalMessageInfo - -func (m *AuthUserGrantRoleResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type AuthUserRevokeRoleResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserRevokeRoleResponse) Reset() { *m = AuthUserRevokeRoleResponse{} } -func (m *AuthUserRevokeRoleResponse) String() string { return proto.CompactTextString(m) } -func (*AuthUserRevokeRoleResponse) ProtoMessage() {} -func (*AuthUserRevokeRoleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{87} -} -func (m *AuthUserRevokeRoleResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserRevokeRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserRevokeRoleResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserRevokeRoleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserRevokeRoleResponse.Merge(m, src) -} -func (m *AuthUserRevokeRoleResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthUserRevokeRoleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserRevokeRoleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserRevokeRoleResponse proto.InternalMessageInfo - -func (m *AuthUserRevokeRoleResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type AuthRoleAddResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleAddResponse) Reset() { *m = AuthRoleAddResponse{} } -func (m *AuthRoleAddResponse) String() string { return proto.CompactTextString(m) } -func (*AuthRoleAddResponse) ProtoMessage() {} -func (*AuthRoleAddResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{88} -} -func (m *AuthRoleAddResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleAddResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleAddResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleAddResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleAddResponse.Merge(m, src) -} -func (m *AuthRoleAddResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleAddResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleAddResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleAddResponse proto.InternalMessageInfo - -func (m *AuthRoleAddResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type AuthRoleGetResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Perm []*authpb.Permission `protobuf:"bytes,2,rep,name=perm,proto3" json:"perm,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleGetResponse) Reset() { *m = AuthRoleGetResponse{} } -func (m *AuthRoleGetResponse) String() string { return proto.CompactTextString(m) } -func (*AuthRoleGetResponse) ProtoMessage() {} -func (*AuthRoleGetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{89} -} -func (m *AuthRoleGetResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleGetResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleGetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleGetResponse.Merge(m, src) -} -func (m *AuthRoleGetResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleGetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleGetResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleGetResponse proto.InternalMessageInfo - -func (m *AuthRoleGetResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *AuthRoleGetResponse) GetPerm() []*authpb.Permission { - if m != nil { - return m.Perm - } - return nil -} - -type AuthRoleListResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Roles []string `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleListResponse) Reset() { *m = AuthRoleListResponse{} } -func (m *AuthRoleListResponse) String() string { return proto.CompactTextString(m) } -func (*AuthRoleListResponse) ProtoMessage() {} -func (*AuthRoleListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{90} -} -func (m *AuthRoleListResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleListResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleListResponse.Merge(m, src) -} -func (m *AuthRoleListResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleListResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleListResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleListResponse proto.InternalMessageInfo - -func (m *AuthRoleListResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *AuthRoleListResponse) GetRoles() []string { - if m != nil { - return m.Roles - } - return nil -} - -type AuthUserListResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - Users []string `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthUserListResponse) Reset() { *m = AuthUserListResponse{} } -func (m *AuthUserListResponse) String() string { return proto.CompactTextString(m) } -func (*AuthUserListResponse) ProtoMessage() {} -func (*AuthUserListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{91} -} -func (m *AuthUserListResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthUserListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthUserListResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthUserListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthUserListResponse.Merge(m, src) -} -func (m *AuthUserListResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthUserListResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthUserListResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthUserListResponse proto.InternalMessageInfo - -func (m *AuthUserListResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func (m *AuthUserListResponse) GetUsers() []string { - if m != nil { - return m.Users - } - return nil -} - -type AuthRoleDeleteResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleDeleteResponse) Reset() { *m = AuthRoleDeleteResponse{} } -func (m *AuthRoleDeleteResponse) String() string { return proto.CompactTextString(m) } -func (*AuthRoleDeleteResponse) ProtoMessage() {} -func (*AuthRoleDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{92} -} -func (m *AuthRoleDeleteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleDeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleDeleteResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleDeleteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleDeleteResponse.Merge(m, src) -} -func (m *AuthRoleDeleteResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleDeleteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleDeleteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleDeleteResponse proto.InternalMessageInfo - -func (m *AuthRoleDeleteResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type AuthRoleGrantPermissionResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleGrantPermissionResponse) Reset() { *m = AuthRoleGrantPermissionResponse{} } -func (m *AuthRoleGrantPermissionResponse) String() string { return proto.CompactTextString(m) } -func (*AuthRoleGrantPermissionResponse) ProtoMessage() {} -func (*AuthRoleGrantPermissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{93} -} -func (m *AuthRoleGrantPermissionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleGrantPermissionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleGrantPermissionResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleGrantPermissionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleGrantPermissionResponse.Merge(m, src) -} -func (m *AuthRoleGrantPermissionResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleGrantPermissionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleGrantPermissionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleGrantPermissionResponse proto.InternalMessageInfo - -func (m *AuthRoleGrantPermissionResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -type AuthRoleRevokePermissionResponse struct { - Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AuthRoleRevokePermissionResponse) Reset() { *m = AuthRoleRevokePermissionResponse{} } -func (m *AuthRoleRevokePermissionResponse) String() string { return proto.CompactTextString(m) } -func (*AuthRoleRevokePermissionResponse) ProtoMessage() {} -func (*AuthRoleRevokePermissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_77a6da22d6a3feb1, []int{94} -} -func (m *AuthRoleRevokePermissionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthRoleRevokePermissionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthRoleRevokePermissionResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthRoleRevokePermissionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthRoleRevokePermissionResponse.Merge(m, src) -} -func (m *AuthRoleRevokePermissionResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthRoleRevokePermissionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthRoleRevokePermissionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthRoleRevokePermissionResponse proto.InternalMessageInfo - -func (m *AuthRoleRevokePermissionResponse) GetHeader() *ResponseHeader { - if m != nil { - return m.Header - } - return nil -} - -func init() { - proto.RegisterEnum("etcdserverpb.AlarmType", AlarmType_name, AlarmType_value) - proto.RegisterEnum("etcdserverpb.RangeRequest_SortOrder", RangeRequest_SortOrder_name, RangeRequest_SortOrder_value) - proto.RegisterEnum("etcdserverpb.RangeRequest_SortTarget", RangeRequest_SortTarget_name, RangeRequest_SortTarget_value) - proto.RegisterEnum("etcdserverpb.Compare_CompareResult", Compare_CompareResult_name, Compare_CompareResult_value) - proto.RegisterEnum("etcdserverpb.Compare_CompareTarget", Compare_CompareTarget_name, Compare_CompareTarget_value) - proto.RegisterEnum("etcdserverpb.WatchCreateRequest_FilterType", WatchCreateRequest_FilterType_name, WatchCreateRequest_FilterType_value) - proto.RegisterEnum("etcdserverpb.AlarmRequest_AlarmAction", AlarmRequest_AlarmAction_name, AlarmRequest_AlarmAction_value) - proto.RegisterEnum("etcdserverpb.DowngradeRequest_DowngradeAction", DowngradeRequest_DowngradeAction_name, DowngradeRequest_DowngradeAction_value) - proto.RegisterType((*ResponseHeader)(nil), "etcdserverpb.ResponseHeader") - proto.RegisterType((*RangeRequest)(nil), "etcdserverpb.RangeRequest") - proto.RegisterType((*RangeResponse)(nil), "etcdserverpb.RangeResponse") - proto.RegisterType((*PutRequest)(nil), "etcdserverpb.PutRequest") - proto.RegisterType((*PutResponse)(nil), "etcdserverpb.PutResponse") - proto.RegisterType((*DeleteRangeRequest)(nil), "etcdserverpb.DeleteRangeRequest") - proto.RegisterType((*DeleteRangeResponse)(nil), "etcdserverpb.DeleteRangeResponse") - proto.RegisterType((*RequestOp)(nil), "etcdserverpb.RequestOp") - proto.RegisterType((*ResponseOp)(nil), "etcdserverpb.ResponseOp") - proto.RegisterType((*Compare)(nil), "etcdserverpb.Compare") - proto.RegisterType((*TxnRequest)(nil), "etcdserverpb.TxnRequest") - proto.RegisterType((*TxnResponse)(nil), "etcdserverpb.TxnResponse") - proto.RegisterType((*CompactionRequest)(nil), "etcdserverpb.CompactionRequest") - proto.RegisterType((*CompactionResponse)(nil), "etcdserverpb.CompactionResponse") - proto.RegisterType((*HashRequest)(nil), "etcdserverpb.HashRequest") - proto.RegisterType((*HashKVRequest)(nil), "etcdserverpb.HashKVRequest") - proto.RegisterType((*HashKVResponse)(nil), "etcdserverpb.HashKVResponse") - proto.RegisterType((*HashResponse)(nil), "etcdserverpb.HashResponse") - proto.RegisterType((*SnapshotRequest)(nil), "etcdserverpb.SnapshotRequest") - proto.RegisterType((*SnapshotResponse)(nil), "etcdserverpb.SnapshotResponse") - proto.RegisterType((*WatchRequest)(nil), "etcdserverpb.WatchRequest") - proto.RegisterType((*WatchCreateRequest)(nil), "etcdserverpb.WatchCreateRequest") - proto.RegisterType((*WatchCancelRequest)(nil), "etcdserverpb.WatchCancelRequest") - proto.RegisterType((*WatchProgressRequest)(nil), "etcdserverpb.WatchProgressRequest") - proto.RegisterType((*WatchResponse)(nil), "etcdserverpb.WatchResponse") - proto.RegisterType((*LeaseGrantRequest)(nil), "etcdserverpb.LeaseGrantRequest") - proto.RegisterType((*LeaseGrantResponse)(nil), "etcdserverpb.LeaseGrantResponse") - proto.RegisterType((*LeaseRevokeRequest)(nil), "etcdserverpb.LeaseRevokeRequest") - proto.RegisterType((*LeaseRevokeResponse)(nil), "etcdserverpb.LeaseRevokeResponse") - proto.RegisterType((*LeaseCheckpoint)(nil), "etcdserverpb.LeaseCheckpoint") - proto.RegisterType((*LeaseCheckpointRequest)(nil), "etcdserverpb.LeaseCheckpointRequest") - proto.RegisterType((*LeaseCheckpointResponse)(nil), "etcdserverpb.LeaseCheckpointResponse") - proto.RegisterType((*LeaseKeepAliveRequest)(nil), "etcdserverpb.LeaseKeepAliveRequest") - proto.RegisterType((*LeaseKeepAliveResponse)(nil), "etcdserverpb.LeaseKeepAliveResponse") - proto.RegisterType((*LeaseTimeToLiveRequest)(nil), "etcdserverpb.LeaseTimeToLiveRequest") - proto.RegisterType((*LeaseTimeToLiveResponse)(nil), "etcdserverpb.LeaseTimeToLiveResponse") - proto.RegisterType((*LeaseLeasesRequest)(nil), "etcdserverpb.LeaseLeasesRequest") - proto.RegisterType((*LeaseStatus)(nil), "etcdserverpb.LeaseStatus") - proto.RegisterType((*LeaseLeasesResponse)(nil), "etcdserverpb.LeaseLeasesResponse") - proto.RegisterType((*Member)(nil), "etcdserverpb.Member") - proto.RegisterType((*MemberAddRequest)(nil), "etcdserverpb.MemberAddRequest") - proto.RegisterType((*MemberAddResponse)(nil), "etcdserverpb.MemberAddResponse") - proto.RegisterType((*MemberRemoveRequest)(nil), "etcdserverpb.MemberRemoveRequest") - proto.RegisterType((*MemberRemoveResponse)(nil), "etcdserverpb.MemberRemoveResponse") - proto.RegisterType((*MemberUpdateRequest)(nil), "etcdserverpb.MemberUpdateRequest") - proto.RegisterType((*MemberUpdateResponse)(nil), "etcdserverpb.MemberUpdateResponse") - proto.RegisterType((*MemberListRequest)(nil), "etcdserverpb.MemberListRequest") - proto.RegisterType((*MemberListResponse)(nil), "etcdserverpb.MemberListResponse") - proto.RegisterType((*MemberPromoteRequest)(nil), "etcdserverpb.MemberPromoteRequest") - proto.RegisterType((*MemberPromoteResponse)(nil), "etcdserverpb.MemberPromoteResponse") - proto.RegisterType((*DefragmentRequest)(nil), "etcdserverpb.DefragmentRequest") - proto.RegisterType((*DefragmentResponse)(nil), "etcdserverpb.DefragmentResponse") - proto.RegisterType((*MoveLeaderRequest)(nil), "etcdserverpb.MoveLeaderRequest") - proto.RegisterType((*MoveLeaderResponse)(nil), "etcdserverpb.MoveLeaderResponse") - proto.RegisterType((*AlarmRequest)(nil), "etcdserverpb.AlarmRequest") - proto.RegisterType((*AlarmMember)(nil), "etcdserverpb.AlarmMember") - proto.RegisterType((*AlarmResponse)(nil), "etcdserverpb.AlarmResponse") - proto.RegisterType((*DowngradeRequest)(nil), "etcdserverpb.DowngradeRequest") - proto.RegisterType((*DowngradeResponse)(nil), "etcdserverpb.DowngradeResponse") - proto.RegisterType((*StatusRequest)(nil), "etcdserverpb.StatusRequest") - proto.RegisterType((*StatusResponse)(nil), "etcdserverpb.StatusResponse") - proto.RegisterType((*AuthEnableRequest)(nil), "etcdserverpb.AuthEnableRequest") - proto.RegisterType((*AuthDisableRequest)(nil), "etcdserverpb.AuthDisableRequest") - proto.RegisterType((*AuthStatusRequest)(nil), "etcdserverpb.AuthStatusRequest") - proto.RegisterType((*AuthenticateRequest)(nil), "etcdserverpb.AuthenticateRequest") - proto.RegisterType((*AuthUserAddRequest)(nil), "etcdserverpb.AuthUserAddRequest") - proto.RegisterType((*AuthUserGetRequest)(nil), "etcdserverpb.AuthUserGetRequest") - proto.RegisterType((*AuthUserDeleteRequest)(nil), "etcdserverpb.AuthUserDeleteRequest") - proto.RegisterType((*AuthUserChangePasswordRequest)(nil), "etcdserverpb.AuthUserChangePasswordRequest") - proto.RegisterType((*AuthUserGrantRoleRequest)(nil), "etcdserverpb.AuthUserGrantRoleRequest") - proto.RegisterType((*AuthUserRevokeRoleRequest)(nil), "etcdserverpb.AuthUserRevokeRoleRequest") - proto.RegisterType((*AuthRoleAddRequest)(nil), "etcdserverpb.AuthRoleAddRequest") - proto.RegisterType((*AuthRoleGetRequest)(nil), "etcdserverpb.AuthRoleGetRequest") - proto.RegisterType((*AuthUserListRequest)(nil), "etcdserverpb.AuthUserListRequest") - proto.RegisterType((*AuthRoleListRequest)(nil), "etcdserverpb.AuthRoleListRequest") - proto.RegisterType((*AuthRoleDeleteRequest)(nil), "etcdserverpb.AuthRoleDeleteRequest") - proto.RegisterType((*AuthRoleGrantPermissionRequest)(nil), "etcdserverpb.AuthRoleGrantPermissionRequest") - proto.RegisterType((*AuthRoleRevokePermissionRequest)(nil), "etcdserverpb.AuthRoleRevokePermissionRequest") - proto.RegisterType((*AuthEnableResponse)(nil), "etcdserverpb.AuthEnableResponse") - proto.RegisterType((*AuthDisableResponse)(nil), "etcdserverpb.AuthDisableResponse") - proto.RegisterType((*AuthStatusResponse)(nil), "etcdserverpb.AuthStatusResponse") - proto.RegisterType((*AuthenticateResponse)(nil), "etcdserverpb.AuthenticateResponse") - proto.RegisterType((*AuthUserAddResponse)(nil), "etcdserverpb.AuthUserAddResponse") - proto.RegisterType((*AuthUserGetResponse)(nil), "etcdserverpb.AuthUserGetResponse") - proto.RegisterType((*AuthUserDeleteResponse)(nil), "etcdserverpb.AuthUserDeleteResponse") - proto.RegisterType((*AuthUserChangePasswordResponse)(nil), "etcdserverpb.AuthUserChangePasswordResponse") - proto.RegisterType((*AuthUserGrantRoleResponse)(nil), "etcdserverpb.AuthUserGrantRoleResponse") - proto.RegisterType((*AuthUserRevokeRoleResponse)(nil), "etcdserverpb.AuthUserRevokeRoleResponse") - proto.RegisterType((*AuthRoleAddResponse)(nil), "etcdserverpb.AuthRoleAddResponse") - proto.RegisterType((*AuthRoleGetResponse)(nil), "etcdserverpb.AuthRoleGetResponse") - proto.RegisterType((*AuthRoleListResponse)(nil), "etcdserverpb.AuthRoleListResponse") - proto.RegisterType((*AuthUserListResponse)(nil), "etcdserverpb.AuthUserListResponse") - proto.RegisterType((*AuthRoleDeleteResponse)(nil), "etcdserverpb.AuthRoleDeleteResponse") - proto.RegisterType((*AuthRoleGrantPermissionResponse)(nil), "etcdserverpb.AuthRoleGrantPermissionResponse") - proto.RegisterType((*AuthRoleRevokePermissionResponse)(nil), "etcdserverpb.AuthRoleRevokePermissionResponse") -} - -func init() { proto.RegisterFile("rpc.proto", fileDescriptor_77a6da22d6a3feb1) } - -var fileDescriptor_77a6da22d6a3feb1 = []byte{ - // 4110 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x5b,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x94, 0x99, 0x90, 0xc0, 0xf2, 0x4e, 0x49, 0xd0, 0x98, - 0x67, 0x52, 0xee, 0xbe, 0x42, 0x4a, 0x97, 0x31, 0x9b, 0x0c, 0x9e, 0xff, 0x46, 0x18, 0x2a, 0x3e, - 0xf1, 0x6c, 0x6b, 0x60, 0x7f, 0x61, 0x9d, 0x0c, 0x48, 0xa3, 0xb0, 0x66, 0xac, 0x17, 0x4d, 0x8d, - 0x46, 0xe7, 0x7f, 0x4e, 0x2e, 0xfd, 0x63, 0xd7, 0x19, 0x5c, 0x36, 0x8a, 0x8c, 0xa1, 0x48, 0x09, - 0x07, 0xce, 0xe0, 0x92, 0x2d, 0x9a, 0x3b, 0x76, 0x02, 0xde, 0x5b, 0x62, 0xbd, 0x25, 0x46, 0x61, - 0xdd, 0xeb, 0x50, 0x1f, 0xda, 0xce, 0xf1, 0xd0, 0xed, 0x1f, 0x87, 0x06, 0x01, 0x66, 0x90, 0xda, - 0xd0, 0x76, 0x9e, 0xba, 0x7d, 0x53, 0x9a, 0x85, 0x72, 0x5a, 0x17, 0x3a, 0x67, 0x59, 0x70, 0x5a, - 0x17, 0x2a, 0xe7, 0x06, 0x2c, 0x51, 0x99, 0x3d, 0x8f, 0x58, 0x01, 0x89, 0x98, 0x2b, 0x8c, 0x79, - 0x71, 0x68, 0x3b, 0x5b, 0xac, 0x47, 0xe3, 0xb7, 0x2e, 0x12, 0xfc, 0x55, 0xc1, 0x6f, 0x5d, 0xe8, - 0xfc, 0x78, 0x03, 0x4a, 0xa1, 0xcd, 0x51, 0x11, 0x66, 0xf7, 0x0f, 0xf6, 0x3b, 0xf5, 0x19, 0x04, - 0x30, 0xdf, 0x3e, 0xda, 0xea, 0xec, 0x6f, 0xd7, 0x0d, 0x54, 0x86, 0xc2, 0x76, 0x87, 0x37, 0x72, - 0xf8, 0x11, 0x40, 0x64, 0x5d, 0x54, 0x80, 0xfc, 0x6e, 0xe7, 0xb3, 0xfa, 0x0c, 0xe5, 0x79, 0xde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0x16, 0x5a, 0x7b, 0x1b, 0xc3, 0xcb, 0x0c, 0xa8, 0x86, 0x4b, 0x14, 0x88, 0xbd, 0x6f, - 0x3d, 0x34, 0xee, 0xaf, 0x1b, 0xef, 0x1b, 0x9b, 0xbf, 0x9e, 0x83, 0x39, 0x56, 0xda, 0x45, 0xe7, - 0x00, 0xd1, 0x6b, 0x4f, 0x7c, 0x76, 0x89, 0xf7, 0xa3, 0xf8, 0xec, 0x92, 0x0f, 0x45, 0xb8, 0xc9, - 0x40, 0x97, 0xf1, 0x02, 0x05, 0x65, 0x15, 0xe3, 0x16, 0x2b, 0x82, 0x53, 0x3b, 0xfe, 0xad, 0x21, - 0x2a, 0xdb, 0xfc, 0x2c, 0xa1, 0x34, 0x69, 0xda, 0x93, 0x4f, 0x7c, 0x3b, 0xa4, 0x3c, 0xf7, 0xe0, - 0xef, 0x32, 0xc0, 0x16, 0xae, 0x47, 0x80, 0x1e, 0xe3, 0x78, 0x68, 0xdc, 0xff, 0xbc, 0x81, 0x97, - 0x84, 0x95, 0x63, 0x3d, 0xe8, 0x47, 0x50, 0xd3, 0x9f, 0x34, 0xd0, 0x9d, 0x14, 0xac, 0xf8, 0xcb, - 0x48, 0xf3, 0xad, 0xab, 0x99, 0x84, 0x4e, 0xab, 0x4c, 0x27, 0x01, 0xce, 0x91, 0xcf, 0x09, 0x19, - 0x59, 0x94, 0x49, 0xac, 0x01, 0xfa, 0x47, 0x43, 0xbc, 0x38, 0x45, 0x6f, 0x14, 0x28, 0x4d, 0x7a, - 0xe2, 0x05, 0xa4, 0x79, 0xf7, 0x15, 0x5c, 0x42, 0x89, 0x3f, 0x66, 0x4a, 0x7c, 0x80, 0x97, 0x23, - 0x25, 0x02, 0x7b, 0x48, 0x02, 0x57, 0x68, 0xf1, 0xf9, 0x4d, 0x7c, 0x5d, 0x33, 0x8e, 0xd6, 0x1b, - 0x2d, 0x16, 0x7f, 0x67, 0x48, 0x5d, 0x2c, 0xed, 0xdd, 0x22, 0x75, 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31, 0x4b, - 0x16, 0xb8, 0x52, 0xd6, 0x91, 0xe1, 0x6a, 0xc7, 0x6c, 0x29, 0xa5, 0x90, 0x85, 0xde, 0xcd, 0x30, - 0x62, 0xea, 0xa3, 0x48, 0xf3, 0xbd, 0xd7, 0xe4, 0xce, 0xdc, 0xe3, 0xdc, 0xfc, 0x72, 0x8f, 0xff, - 0x9d, 0x01, 0xcb, 0x69, 0x45, 0x30, 0x94, 0x81, 0x93, 0xf1, 0x98, 0xd2, 0xdc, 0x78, 0x5d, 0xf6, - 0xab, 0xad, 0x15, 0xee, 0xfa, 0x47, 0xf5, 0x7f, 0xfb, 0x72, 0xd5, 0xf8, 0xcf, 0x2f, 0x57, 0x8d, - 0xff, 0xf9, 0x72, 0xd5, 0xf8, 0xfb, 0xff, 0x5d, 0x9d, 0x39, 0x99, 0x67, 0xff, 0xd5, 0xf8, 0xdb, - 0xbf, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x54, 0x11, 0xdf, 0xef, 0x3c, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// KVClient is the client API for KV service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type KVClient interface { - // Range gets the keys in the range from the key-value store. - Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error) - // Put puts the given key into the key-value store. - // A put request increments the revision of the key-value store - // and generates one event in the event history. - Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) - // DeleteRange deletes the given range from the key-value store. - // A delete request increments the revision of the key-value store - // and generates a delete event in the event history for every deleted key. - DeleteRange(ctx context.Context, in *DeleteRangeRequest, opts ...grpc.CallOption) (*DeleteRangeResponse, error) - // Txn processes multiple requests in a single transaction. - // A txn request increments the revision of the key-value store - // and generates events with the same revision for every completed request. - // It is not allowed to modify the same key several times within one txn. - Txn(ctx context.Context, in *TxnRequest, opts ...grpc.CallOption) (*TxnResponse, error) - // Compact compacts the event history in the etcd key-value store. The key-value - // store should be periodically compacted or the event history will continue to grow - // indefinitely. - Compact(ctx context.Context, in *CompactionRequest, opts ...grpc.CallOption) (*CompactionResponse, error) -} - -type kVClient struct { - cc *grpc.ClientConn -} - -func NewKVClient(cc *grpc.ClientConn) KVClient { - return &kVClient{cc} -} - -func (c *kVClient) Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error) { - out := new(RangeResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.KV/Range", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kVClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) { - out := new(PutResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.KV/Put", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kVClient) DeleteRange(ctx context.Context, in *DeleteRangeRequest, opts ...grpc.CallOption) (*DeleteRangeResponse, error) { - out := new(DeleteRangeResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.KV/DeleteRange", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kVClient) Txn(ctx context.Context, in *TxnRequest, opts ...grpc.CallOption) (*TxnResponse, error) { - out := new(TxnResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.KV/Txn", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kVClient) Compact(ctx context.Context, in *CompactionRequest, opts ...grpc.CallOption) (*CompactionResponse, error) { - out := new(CompactionResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.KV/Compact", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// KVServer is the server API for KV service. -type KVServer interface { - // Range gets the keys in the range from the key-value store. - Range(context.Context, *RangeRequest) (*RangeResponse, error) - // Put puts the given key into the key-value store. - // A put request increments the revision of the key-value store - // and generates one event in the event history. - Put(context.Context, *PutRequest) (*PutResponse, error) - // DeleteRange deletes the given range from the key-value store. - // A delete request increments the revision of the key-value store - // and generates a delete event in the event history for every deleted key. - DeleteRange(context.Context, *DeleteRangeRequest) (*DeleteRangeResponse, error) - // Txn processes multiple requests in a single transaction. - // A txn request increments the revision of the key-value store - // and generates events with the same revision for every completed request. - // It is not allowed to modify the same key several times within one txn. - Txn(context.Context, *TxnRequest) (*TxnResponse, error) - // Compact compacts the event history in the etcd key-value store. The key-value - // store should be periodically compacted or the event history will continue to grow - // indefinitely. - Compact(context.Context, *CompactionRequest) (*CompactionResponse, error) -} - -// UnimplementedKVServer can be embedded to have forward compatible implementations. -type UnimplementedKVServer struct { -} - -func (*UnimplementedKVServer) Range(ctx context.Context, req *RangeRequest) (*RangeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Range not implemented") -} -func (*UnimplementedKVServer) Put(ctx context.Context, req *PutRequest) (*PutResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Put not implemented") -} -func (*UnimplementedKVServer) DeleteRange(ctx context.Context, req *DeleteRangeRequest) (*DeleteRangeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteRange not implemented") -} -func (*UnimplementedKVServer) Txn(ctx context.Context, req *TxnRequest) (*TxnResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Txn not implemented") -} -func (*UnimplementedKVServer) Compact(ctx context.Context, req *CompactionRequest) (*CompactionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Compact not implemented") -} - -func RegisterKVServer(s *grpc.Server, srv KVServer) { - s.RegisterService(&_KV_serviceDesc, srv) -} - -func _KV_Range_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RangeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KVServer).Range(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.KV/Range", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KVServer).Range(ctx, req.(*RangeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KV_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KVServer).Put(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.KV/Put", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KVServer).Put(ctx, req.(*PutRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KV_DeleteRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRangeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KVServer).DeleteRange(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.KV/DeleteRange", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KVServer).DeleteRange(ctx, req.(*DeleteRangeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KV_Txn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TxnRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KVServer).Txn(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.KV/Txn", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KVServer).Txn(ctx, req.(*TxnRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KV_Compact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CompactionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KVServer).Compact(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.KV/Compact", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KVServer).Compact(ctx, req.(*CompactionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _KV_serviceDesc = grpc.ServiceDesc{ - ServiceName: "etcdserverpb.KV", - HandlerType: (*KVServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Range", - Handler: _KV_Range_Handler, - }, - { - MethodName: "Put", - Handler: _KV_Put_Handler, - }, - { - MethodName: "DeleteRange", - Handler: _KV_DeleteRange_Handler, - }, - { - MethodName: "Txn", - Handler: _KV_Txn_Handler, - }, - { - MethodName: "Compact", - Handler: _KV_Compact_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "rpc.proto", -} - -// WatchClient is the client API for Watch service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type WatchClient interface { - // Watch watches for events happening or that have happened. Both input and output - // are streams; the input stream is for creating and canceling watchers and the output - // stream sends events. One watch RPC can watch on multiple key ranges, streaming events - // for several watches at once. The entire event history can be watched starting from the - // last compaction revision. - Watch(ctx context.Context, opts ...grpc.CallOption) (Watch_WatchClient, error) -} - -type watchClient struct { - cc *grpc.ClientConn -} - -func NewWatchClient(cc *grpc.ClientConn) WatchClient { - return &watchClient{cc} -} - -func (c *watchClient) Watch(ctx context.Context, opts ...grpc.CallOption) (Watch_WatchClient, error) { - stream, err := c.cc.NewStream(ctx, &_Watch_serviceDesc.Streams[0], "/etcdserverpb.Watch/Watch", opts...) - if err != nil { - return nil, err - } - x := &watchWatchClient{stream} - return x, nil -} - -type Watch_WatchClient interface { - Send(*WatchRequest) error - Recv() (*WatchResponse, error) - grpc.ClientStream -} - -type watchWatchClient struct { - grpc.ClientStream -} - -func (x *watchWatchClient) Send(m *WatchRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *watchWatchClient) Recv() (*WatchResponse, error) { - m := new(WatchResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// WatchServer is the server API for Watch service. -type WatchServer interface { - // Watch watches for events happening or that have happened. Both input and output - // are streams; the input stream is for creating and canceling watchers and the output - // stream sends events. One watch RPC can watch on multiple key ranges, streaming events - // for several watches at once. The entire event history can be watched starting from the - // last compaction revision. - Watch(Watch_WatchServer) error -} - -// UnimplementedWatchServer can be embedded to have forward compatible implementations. -type UnimplementedWatchServer struct { -} - -func (*UnimplementedWatchServer) Watch(srv Watch_WatchServer) error { - return status.Errorf(codes.Unimplemented, "method Watch not implemented") -} - -func RegisterWatchServer(s *grpc.Server, srv WatchServer) { - s.RegisterService(&_Watch_serviceDesc, srv) -} - -func _Watch_Watch_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(WatchServer).Watch(&watchWatchServer{stream}) -} - -type Watch_WatchServer interface { - Send(*WatchResponse) error - Recv() (*WatchRequest, error) - grpc.ServerStream -} - -type watchWatchServer struct { - grpc.ServerStream -} - -func (x *watchWatchServer) Send(m *WatchResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *watchWatchServer) Recv() (*WatchRequest, error) { - m := new(WatchRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _Watch_serviceDesc = grpc.ServiceDesc{ - ServiceName: "etcdserverpb.Watch", - HandlerType: (*WatchServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "Watch", - Handler: _Watch_Watch_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "rpc.proto", -} - -// LeaseClient is the client API for Lease service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type LeaseClient interface { - // LeaseGrant creates a lease which expires if the server does not receive a keepAlive - // within a given time to live period. All keys attached to the lease will be expired and - // deleted if the lease expires. Each expired key generates a delete event in the event history. - LeaseGrant(ctx context.Context, in *LeaseGrantRequest, opts ...grpc.CallOption) (*LeaseGrantResponse, error) - // LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted. - LeaseRevoke(ctx context.Context, in *LeaseRevokeRequest, opts ...grpc.CallOption) (*LeaseRevokeResponse, error) - // LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client - // to the server and streaming keep alive responses from the server to the client. - LeaseKeepAlive(ctx context.Context, opts ...grpc.CallOption) (Lease_LeaseKeepAliveClient, error) - // LeaseTimeToLive retrieves lease information. - LeaseTimeToLive(ctx context.Context, in *LeaseTimeToLiveRequest, opts ...grpc.CallOption) (*LeaseTimeToLiveResponse, error) - // LeaseLeases lists all existing leases. - LeaseLeases(ctx context.Context, in *LeaseLeasesRequest, opts ...grpc.CallOption) (*LeaseLeasesResponse, error) -} - -type leaseClient struct { - cc *grpc.ClientConn -} - -func NewLeaseClient(cc *grpc.ClientConn) LeaseClient { - return &leaseClient{cc} -} - -func (c *leaseClient) LeaseGrant(ctx context.Context, in *LeaseGrantRequest, opts ...grpc.CallOption) (*LeaseGrantResponse, error) { - out := new(LeaseGrantResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Lease/LeaseGrant", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *leaseClient) LeaseRevoke(ctx context.Context, in *LeaseRevokeRequest, opts ...grpc.CallOption) (*LeaseRevokeResponse, error) { - out := new(LeaseRevokeResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Lease/LeaseRevoke", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *leaseClient) LeaseKeepAlive(ctx context.Context, opts ...grpc.CallOption) (Lease_LeaseKeepAliveClient, error) { - stream, err := c.cc.NewStream(ctx, &_Lease_serviceDesc.Streams[0], "/etcdserverpb.Lease/LeaseKeepAlive", opts...) - if err != nil { - return nil, err - } - x := &leaseLeaseKeepAliveClient{stream} - return x, nil -} - -type Lease_LeaseKeepAliveClient interface { - Send(*LeaseKeepAliveRequest) error - Recv() (*LeaseKeepAliveResponse, error) - grpc.ClientStream -} - -type leaseLeaseKeepAliveClient struct { - grpc.ClientStream -} - -func (x *leaseLeaseKeepAliveClient) Send(m *LeaseKeepAliveRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *leaseLeaseKeepAliveClient) Recv() (*LeaseKeepAliveResponse, error) { - m := new(LeaseKeepAliveResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *leaseClient) LeaseTimeToLive(ctx context.Context, in *LeaseTimeToLiveRequest, opts ...grpc.CallOption) (*LeaseTimeToLiveResponse, error) { - out := new(LeaseTimeToLiveResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Lease/LeaseTimeToLive", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *leaseClient) LeaseLeases(ctx context.Context, in *LeaseLeasesRequest, opts ...grpc.CallOption) (*LeaseLeasesResponse, error) { - out := new(LeaseLeasesResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Lease/LeaseLeases", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// LeaseServer is the server API for Lease service. -type LeaseServer interface { - // LeaseGrant creates a lease which expires if the server does not receive a keepAlive - // within a given time to live period. All keys attached to the lease will be expired and - // deleted if the lease expires. Each expired key generates a delete event in the event history. - LeaseGrant(context.Context, *LeaseGrantRequest) (*LeaseGrantResponse, error) - // LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted. - LeaseRevoke(context.Context, *LeaseRevokeRequest) (*LeaseRevokeResponse, error) - // LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client - // to the server and streaming keep alive responses from the server to the client. - LeaseKeepAlive(Lease_LeaseKeepAliveServer) error - // LeaseTimeToLive retrieves lease information. - LeaseTimeToLive(context.Context, *LeaseTimeToLiveRequest) (*LeaseTimeToLiveResponse, error) - // LeaseLeases lists all existing leases. - LeaseLeases(context.Context, *LeaseLeasesRequest) (*LeaseLeasesResponse, error) -} - -// UnimplementedLeaseServer can be embedded to have forward compatible implementations. -type UnimplementedLeaseServer struct { -} - -func (*UnimplementedLeaseServer) LeaseGrant(ctx context.Context, req *LeaseGrantRequest) (*LeaseGrantResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LeaseGrant not implemented") -} -func (*UnimplementedLeaseServer) LeaseRevoke(ctx context.Context, req *LeaseRevokeRequest) (*LeaseRevokeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LeaseRevoke not implemented") -} -func (*UnimplementedLeaseServer) LeaseKeepAlive(srv Lease_LeaseKeepAliveServer) error { - return status.Errorf(codes.Unimplemented, "method LeaseKeepAlive not implemented") -} -func (*UnimplementedLeaseServer) LeaseTimeToLive(ctx context.Context, req *LeaseTimeToLiveRequest) (*LeaseTimeToLiveResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LeaseTimeToLive not implemented") -} -func (*UnimplementedLeaseServer) LeaseLeases(ctx context.Context, req *LeaseLeasesRequest) (*LeaseLeasesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LeaseLeases not implemented") -} - -func RegisterLeaseServer(s *grpc.Server, srv LeaseServer) { - s.RegisterService(&_Lease_serviceDesc, srv) -} - -func _Lease_LeaseGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LeaseGrantRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LeaseServer).LeaseGrant(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Lease/LeaseGrant", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LeaseServer).LeaseGrant(ctx, req.(*LeaseGrantRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Lease_LeaseRevoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LeaseRevokeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LeaseServer).LeaseRevoke(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Lease/LeaseRevoke", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LeaseServer).LeaseRevoke(ctx, req.(*LeaseRevokeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Lease_LeaseKeepAlive_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(LeaseServer).LeaseKeepAlive(&leaseLeaseKeepAliveServer{stream}) -} - -type Lease_LeaseKeepAliveServer interface { - Send(*LeaseKeepAliveResponse) error - Recv() (*LeaseKeepAliveRequest, error) - grpc.ServerStream -} - -type leaseLeaseKeepAliveServer struct { - grpc.ServerStream -} - -func (x *leaseLeaseKeepAliveServer) Send(m *LeaseKeepAliveResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *leaseLeaseKeepAliveServer) Recv() (*LeaseKeepAliveRequest, error) { - m := new(LeaseKeepAliveRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _Lease_LeaseTimeToLive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LeaseTimeToLiveRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LeaseServer).LeaseTimeToLive(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Lease/LeaseTimeToLive", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LeaseServer).LeaseTimeToLive(ctx, req.(*LeaseTimeToLiveRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Lease_LeaseLeases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LeaseLeasesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LeaseServer).LeaseLeases(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Lease/LeaseLeases", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LeaseServer).LeaseLeases(ctx, req.(*LeaseLeasesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Lease_serviceDesc = grpc.ServiceDesc{ - ServiceName: "etcdserverpb.Lease", - HandlerType: (*LeaseServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "LeaseGrant", - Handler: _Lease_LeaseGrant_Handler, - }, - { - MethodName: "LeaseRevoke", - Handler: _Lease_LeaseRevoke_Handler, - }, - { - MethodName: "LeaseTimeToLive", - Handler: _Lease_LeaseTimeToLive_Handler, - }, - { - MethodName: "LeaseLeases", - Handler: _Lease_LeaseLeases_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "LeaseKeepAlive", - Handler: _Lease_LeaseKeepAlive_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "rpc.proto", -} - -// ClusterClient is the client API for Cluster service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ClusterClient interface { - // MemberAdd adds a member into the cluster. - MemberAdd(ctx context.Context, in *MemberAddRequest, opts ...grpc.CallOption) (*MemberAddResponse, error) - // MemberRemove removes an existing member from the cluster. - MemberRemove(ctx context.Context, in *MemberRemoveRequest, opts ...grpc.CallOption) (*MemberRemoveResponse, error) - // MemberUpdate updates the member configuration. - MemberUpdate(ctx context.Context, in *MemberUpdateRequest, opts ...grpc.CallOption) (*MemberUpdateResponse, error) - // MemberList lists all the members in the cluster. - MemberList(ctx context.Context, in *MemberListRequest, opts ...grpc.CallOption) (*MemberListResponse, error) - // MemberPromote promotes a member from raft learner (non-voting) to raft voting member. - MemberPromote(ctx context.Context, in *MemberPromoteRequest, opts ...grpc.CallOption) (*MemberPromoteResponse, error) -} - -type clusterClient struct { - cc *grpc.ClientConn -} - -func NewClusterClient(cc *grpc.ClientConn) ClusterClient { - return &clusterClient{cc} -} - -func (c *clusterClient) MemberAdd(ctx context.Context, in *MemberAddRequest, opts ...grpc.CallOption) (*MemberAddResponse, error) { - out := new(MemberAddResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Cluster/MemberAdd", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterClient) MemberRemove(ctx context.Context, in *MemberRemoveRequest, opts ...grpc.CallOption) (*MemberRemoveResponse, error) { - out := new(MemberRemoveResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Cluster/MemberRemove", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterClient) MemberUpdate(ctx context.Context, in *MemberUpdateRequest, opts ...grpc.CallOption) (*MemberUpdateResponse, error) { - out := new(MemberUpdateResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Cluster/MemberUpdate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterClient) MemberList(ctx context.Context, in *MemberListRequest, opts ...grpc.CallOption) (*MemberListResponse, error) { - out := new(MemberListResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Cluster/MemberList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterClient) MemberPromote(ctx context.Context, in *MemberPromoteRequest, opts ...grpc.CallOption) (*MemberPromoteResponse, error) { - out := new(MemberPromoteResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Cluster/MemberPromote", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ClusterServer is the server API for Cluster service. -type ClusterServer interface { - // MemberAdd adds a member into the cluster. - MemberAdd(context.Context, *MemberAddRequest) (*MemberAddResponse, error) - // MemberRemove removes an existing member from the cluster. - MemberRemove(context.Context, *MemberRemoveRequest) (*MemberRemoveResponse, error) - // MemberUpdate updates the member configuration. - MemberUpdate(context.Context, *MemberUpdateRequest) (*MemberUpdateResponse, error) - // MemberList lists all the members in the cluster. - MemberList(context.Context, *MemberListRequest) (*MemberListResponse, error) - // MemberPromote promotes a member from raft learner (non-voting) to raft voting member. - MemberPromote(context.Context, *MemberPromoteRequest) (*MemberPromoteResponse, error) -} - -// UnimplementedClusterServer can be embedded to have forward compatible implementations. -type UnimplementedClusterServer struct { -} - -func (*UnimplementedClusterServer) MemberAdd(ctx context.Context, req *MemberAddRequest) (*MemberAddResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberAdd not implemented") -} -func (*UnimplementedClusterServer) MemberRemove(ctx context.Context, req *MemberRemoveRequest) (*MemberRemoveResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberRemove not implemented") -} -func (*UnimplementedClusterServer) MemberUpdate(ctx context.Context, req *MemberUpdateRequest) (*MemberUpdateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberUpdate not implemented") -} -func (*UnimplementedClusterServer) MemberList(ctx context.Context, req *MemberListRequest) (*MemberListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberList not implemented") -} -func (*UnimplementedClusterServer) MemberPromote(ctx context.Context, req *MemberPromoteRequest) (*MemberPromoteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MemberPromote not implemented") -} - -func RegisterClusterServer(s *grpc.Server, srv ClusterServer) { - s.RegisterService(&_Cluster_serviceDesc, srv) -} - -func _Cluster_MemberAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MemberAddRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServer).MemberAdd(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Cluster/MemberAdd", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServer).MemberAdd(ctx, req.(*MemberAddRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Cluster_MemberRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MemberRemoveRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServer).MemberRemove(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Cluster/MemberRemove", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServer).MemberRemove(ctx, req.(*MemberRemoveRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Cluster_MemberUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MemberUpdateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServer).MemberUpdate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Cluster/MemberUpdate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServer).MemberUpdate(ctx, req.(*MemberUpdateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Cluster_MemberList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MemberListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServer).MemberList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Cluster/MemberList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServer).MemberList(ctx, req.(*MemberListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Cluster_MemberPromote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MemberPromoteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterServer).MemberPromote(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Cluster/MemberPromote", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterServer).MemberPromote(ctx, req.(*MemberPromoteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Cluster_serviceDesc = grpc.ServiceDesc{ - ServiceName: "etcdserverpb.Cluster", - HandlerType: (*ClusterServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "MemberAdd", - Handler: _Cluster_MemberAdd_Handler, - }, - { - MethodName: "MemberRemove", - Handler: _Cluster_MemberRemove_Handler, - }, - { - MethodName: "MemberUpdate", - Handler: _Cluster_MemberUpdate_Handler, - }, - { - MethodName: "MemberList", - Handler: _Cluster_MemberList_Handler, - }, - { - MethodName: "MemberPromote", - Handler: _Cluster_MemberPromote_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "rpc.proto", -} - -// MaintenanceClient is the client API for Maintenance service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MaintenanceClient interface { - // Alarm activates, deactivates, and queries alarms regarding cluster health. - Alarm(ctx context.Context, in *AlarmRequest, opts ...grpc.CallOption) (*AlarmResponse, error) - // Status gets the status of the member. - Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) - // Defragment defragments a member's backend database to recover storage space. - Defragment(ctx context.Context, in *DefragmentRequest, opts ...grpc.CallOption) (*DefragmentResponse, error) - // Hash computes the hash of whole backend keyspace, - // including key, lease, and other buckets in storage. - // This is designed for testing ONLY! - // Do not rely on this in production with ongoing transactions, - // since Hash operation does not hold MVCC locks. - // Use "HashKV" API instead for "key" bucket consistency checks. - Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error) - // HashKV computes the hash of all MVCC keys up to a given revision. - // It only iterates "key" bucket in backend storage. - HashKV(ctx context.Context, in *HashKVRequest, opts ...grpc.CallOption) (*HashKVResponse, error) - // Snapshot sends a snapshot of the entire backend from a member over a stream to a client. - Snapshot(ctx context.Context, in *SnapshotRequest, opts ...grpc.CallOption) (Maintenance_SnapshotClient, error) - // MoveLeader requests current leader node to transfer its leadership to transferee. - MoveLeader(ctx context.Context, in *MoveLeaderRequest, opts ...grpc.CallOption) (*MoveLeaderResponse, error) - // Downgrade requests downgrades, verifies feasibility or cancels downgrade - // on the cluster version. - // Supported since etcd 3.5. - Downgrade(ctx context.Context, in *DowngradeRequest, opts ...grpc.CallOption) (*DowngradeResponse, error) -} - -type maintenanceClient struct { - cc *grpc.ClientConn -} - -func NewMaintenanceClient(cc *grpc.ClientConn) MaintenanceClient { - return &maintenanceClient{cc} -} - -func (c *maintenanceClient) Alarm(ctx context.Context, in *AlarmRequest, opts ...grpc.CallOption) (*AlarmResponse, error) { - out := new(AlarmResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Maintenance/Alarm", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *maintenanceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { - out := new(StatusResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Maintenance/Status", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *maintenanceClient) Defragment(ctx context.Context, in *DefragmentRequest, opts ...grpc.CallOption) (*DefragmentResponse, error) { - out := new(DefragmentResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Maintenance/Defragment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *maintenanceClient) Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error) { - out := new(HashResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Maintenance/Hash", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *maintenanceClient) HashKV(ctx context.Context, in *HashKVRequest, opts ...grpc.CallOption) (*HashKVResponse, error) { - out := new(HashKVResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Maintenance/HashKV", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *maintenanceClient) Snapshot(ctx context.Context, in *SnapshotRequest, opts ...grpc.CallOption) (Maintenance_SnapshotClient, error) { - stream, err := c.cc.NewStream(ctx, &_Maintenance_serviceDesc.Streams[0], "/etcdserverpb.Maintenance/Snapshot", opts...) - if err != nil { - return nil, err - } - x := &maintenanceSnapshotClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Maintenance_SnapshotClient interface { - Recv() (*SnapshotResponse, error) - grpc.ClientStream -} - -type maintenanceSnapshotClient struct { - grpc.ClientStream -} - -func (x *maintenanceSnapshotClient) Recv() (*SnapshotResponse, error) { - m := new(SnapshotResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *maintenanceClient) MoveLeader(ctx context.Context, in *MoveLeaderRequest, opts ...grpc.CallOption) (*MoveLeaderResponse, error) { - out := new(MoveLeaderResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Maintenance/MoveLeader", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *maintenanceClient) Downgrade(ctx context.Context, in *DowngradeRequest, opts ...grpc.CallOption) (*DowngradeResponse, error) { - out := new(DowngradeResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Maintenance/Downgrade", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MaintenanceServer is the server API for Maintenance service. -type MaintenanceServer interface { - // Alarm activates, deactivates, and queries alarms regarding cluster health. - Alarm(context.Context, *AlarmRequest) (*AlarmResponse, error) - // Status gets the status of the member. - Status(context.Context, *StatusRequest) (*StatusResponse, error) - // Defragment defragments a member's backend database to recover storage space. - Defragment(context.Context, *DefragmentRequest) (*DefragmentResponse, error) - // Hash computes the hash of whole backend keyspace, - // including key, lease, and other buckets in storage. - // This is designed for testing ONLY! - // Do not rely on this in production with ongoing transactions, - // since Hash operation does not hold MVCC locks. - // Use "HashKV" API instead for "key" bucket consistency checks. - Hash(context.Context, *HashRequest) (*HashResponse, error) - // HashKV computes the hash of all MVCC keys up to a given revision. - // It only iterates "key" bucket in backend storage. - HashKV(context.Context, *HashKVRequest) (*HashKVResponse, error) - // Snapshot sends a snapshot of the entire backend from a member over a stream to a client. - Snapshot(*SnapshotRequest, Maintenance_SnapshotServer) error - // MoveLeader requests current leader node to transfer its leadership to transferee. - MoveLeader(context.Context, *MoveLeaderRequest) (*MoveLeaderResponse, error) - // Downgrade requests downgrades, verifies feasibility or cancels downgrade - // on the cluster version. - // Supported since etcd 3.5. - Downgrade(context.Context, *DowngradeRequest) (*DowngradeResponse, error) -} - -// UnimplementedMaintenanceServer can be embedded to have forward compatible implementations. -type UnimplementedMaintenanceServer struct { -} - -func (*UnimplementedMaintenanceServer) Alarm(ctx context.Context, req *AlarmRequest) (*AlarmResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Alarm not implemented") -} -func (*UnimplementedMaintenanceServer) Status(ctx context.Context, req *StatusRequest) (*StatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") -} -func (*UnimplementedMaintenanceServer) Defragment(ctx context.Context, req *DefragmentRequest) (*DefragmentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Defragment not implemented") -} -func (*UnimplementedMaintenanceServer) Hash(ctx context.Context, req *HashRequest) (*HashResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Hash not implemented") -} -func (*UnimplementedMaintenanceServer) HashKV(ctx context.Context, req *HashKVRequest) (*HashKVResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HashKV not implemented") -} -func (*UnimplementedMaintenanceServer) Snapshot(req *SnapshotRequest, srv Maintenance_SnapshotServer) error { - return status.Errorf(codes.Unimplemented, "method Snapshot not implemented") -} -func (*UnimplementedMaintenanceServer) MoveLeader(ctx context.Context, req *MoveLeaderRequest) (*MoveLeaderResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MoveLeader not implemented") -} -func (*UnimplementedMaintenanceServer) Downgrade(ctx context.Context, req *DowngradeRequest) (*DowngradeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Downgrade not implemented") -} - -func RegisterMaintenanceServer(s *grpc.Server, srv MaintenanceServer) { - s.RegisterService(&_Maintenance_serviceDesc, srv) -} - -func _Maintenance_Alarm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AlarmRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaintenanceServer).Alarm(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Maintenance/Alarm", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaintenanceServer).Alarm(ctx, req.(*AlarmRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Maintenance_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaintenanceServer).Status(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Maintenance/Status", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaintenanceServer).Status(ctx, req.(*StatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Maintenance_Defragment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DefragmentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaintenanceServer).Defragment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Maintenance/Defragment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaintenanceServer).Defragment(ctx, req.(*DefragmentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Maintenance_Hash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HashRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaintenanceServer).Hash(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Maintenance/Hash", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaintenanceServer).Hash(ctx, req.(*HashRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Maintenance_HashKV_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HashKVRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaintenanceServer).HashKV(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Maintenance/HashKV", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaintenanceServer).HashKV(ctx, req.(*HashKVRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Maintenance_Snapshot_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SnapshotRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(MaintenanceServer).Snapshot(m, &maintenanceSnapshotServer{stream}) -} - -type Maintenance_SnapshotServer interface { - Send(*SnapshotResponse) error - grpc.ServerStream -} - -type maintenanceSnapshotServer struct { - grpc.ServerStream -} - -func (x *maintenanceSnapshotServer) Send(m *SnapshotResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _Maintenance_MoveLeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MoveLeaderRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaintenanceServer).MoveLeader(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Maintenance/MoveLeader", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaintenanceServer).MoveLeader(ctx, req.(*MoveLeaderRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Maintenance_Downgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DowngradeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MaintenanceServer).Downgrade(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Maintenance/Downgrade", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MaintenanceServer).Downgrade(ctx, req.(*DowngradeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Maintenance_serviceDesc = grpc.ServiceDesc{ - ServiceName: "etcdserverpb.Maintenance", - HandlerType: (*MaintenanceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Alarm", - Handler: _Maintenance_Alarm_Handler, - }, - { - MethodName: "Status", - Handler: _Maintenance_Status_Handler, - }, - { - MethodName: "Defragment", - Handler: _Maintenance_Defragment_Handler, - }, - { - MethodName: "Hash", - Handler: _Maintenance_Hash_Handler, - }, - { - MethodName: "HashKV", - Handler: _Maintenance_HashKV_Handler, - }, - { - MethodName: "MoveLeader", - Handler: _Maintenance_MoveLeader_Handler, - }, - { - MethodName: "Downgrade", - Handler: _Maintenance_Downgrade_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "Snapshot", - Handler: _Maintenance_Snapshot_Handler, - ServerStreams: true, - }, - }, - Metadata: "rpc.proto", -} - -// AuthClient is the client API for Auth service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AuthClient interface { - // AuthEnable enables authentication. - AuthEnable(ctx context.Context, in *AuthEnableRequest, opts ...grpc.CallOption) (*AuthEnableResponse, error) - // AuthDisable disables authentication. - AuthDisable(ctx context.Context, in *AuthDisableRequest, opts ...grpc.CallOption) (*AuthDisableResponse, error) - // AuthStatus displays authentication status. - AuthStatus(ctx context.Context, in *AuthStatusRequest, opts ...grpc.CallOption) (*AuthStatusResponse, error) - // Authenticate processes an authenticate request. - Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) - // UserAdd adds a new user. User name cannot be empty. - UserAdd(ctx context.Context, in *AuthUserAddRequest, opts ...grpc.CallOption) (*AuthUserAddResponse, error) - // UserGet gets detailed user information. - UserGet(ctx context.Context, in *AuthUserGetRequest, opts ...grpc.CallOption) (*AuthUserGetResponse, error) - // UserList gets a list of all users. - UserList(ctx context.Context, in *AuthUserListRequest, opts ...grpc.CallOption) (*AuthUserListResponse, error) - // UserDelete deletes a specified user. - UserDelete(ctx context.Context, in *AuthUserDeleteRequest, opts ...grpc.CallOption) (*AuthUserDeleteResponse, error) - // UserChangePassword changes the password of a specified user. - UserChangePassword(ctx context.Context, in *AuthUserChangePasswordRequest, opts ...grpc.CallOption) (*AuthUserChangePasswordResponse, error) - // UserGrant grants a role to a specified user. - UserGrantRole(ctx context.Context, in *AuthUserGrantRoleRequest, opts ...grpc.CallOption) (*AuthUserGrantRoleResponse, error) - // UserRevokeRole revokes a role of specified user. - UserRevokeRole(ctx context.Context, in *AuthUserRevokeRoleRequest, opts ...grpc.CallOption) (*AuthUserRevokeRoleResponse, error) - // RoleAdd adds a new role. Role name cannot be empty. - RoleAdd(ctx context.Context, in *AuthRoleAddRequest, opts ...grpc.CallOption) (*AuthRoleAddResponse, error) - // RoleGet gets detailed role information. - RoleGet(ctx context.Context, in *AuthRoleGetRequest, opts ...grpc.CallOption) (*AuthRoleGetResponse, error) - // RoleList gets lists of all roles. - RoleList(ctx context.Context, in *AuthRoleListRequest, opts ...grpc.CallOption) (*AuthRoleListResponse, error) - // RoleDelete deletes a specified role. - RoleDelete(ctx context.Context, in *AuthRoleDeleteRequest, opts ...grpc.CallOption) (*AuthRoleDeleteResponse, error) - // RoleGrantPermission grants a permission of a specified key or range to a specified role. - RoleGrantPermission(ctx context.Context, in *AuthRoleGrantPermissionRequest, opts ...grpc.CallOption) (*AuthRoleGrantPermissionResponse, error) - // RoleRevokePermission revokes a key or range permission of a specified role. - RoleRevokePermission(ctx context.Context, in *AuthRoleRevokePermissionRequest, opts ...grpc.CallOption) (*AuthRoleRevokePermissionResponse, error) -} - -type authClient struct { - cc *grpc.ClientConn -} - -func NewAuthClient(cc *grpc.ClientConn) AuthClient { - return &authClient{cc} -} - -func (c *authClient) AuthEnable(ctx context.Context, in *AuthEnableRequest, opts ...grpc.CallOption) (*AuthEnableResponse, error) { - out := new(AuthEnableResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/AuthEnable", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) AuthDisable(ctx context.Context, in *AuthDisableRequest, opts ...grpc.CallOption) (*AuthDisableResponse, error) { - out := new(AuthDisableResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/AuthDisable", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) AuthStatus(ctx context.Context, in *AuthStatusRequest, opts ...grpc.CallOption) (*AuthStatusResponse, error) { - out := new(AuthStatusResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/AuthStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) { - out := new(AuthenticateResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/Authenticate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) UserAdd(ctx context.Context, in *AuthUserAddRequest, opts ...grpc.CallOption) (*AuthUserAddResponse, error) { - out := new(AuthUserAddResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/UserAdd", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) UserGet(ctx context.Context, in *AuthUserGetRequest, opts ...grpc.CallOption) (*AuthUserGetResponse, error) { - out := new(AuthUserGetResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/UserGet", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) UserList(ctx context.Context, in *AuthUserListRequest, opts ...grpc.CallOption) (*AuthUserListResponse, error) { - out := new(AuthUserListResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/UserList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) UserDelete(ctx context.Context, in *AuthUserDeleteRequest, opts ...grpc.CallOption) (*AuthUserDeleteResponse, error) { - out := new(AuthUserDeleteResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/UserDelete", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) UserChangePassword(ctx context.Context, in *AuthUserChangePasswordRequest, opts ...grpc.CallOption) (*AuthUserChangePasswordResponse, error) { - out := new(AuthUserChangePasswordResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/UserChangePassword", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) UserGrantRole(ctx context.Context, in *AuthUserGrantRoleRequest, opts ...grpc.CallOption) (*AuthUserGrantRoleResponse, error) { - out := new(AuthUserGrantRoleResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/UserGrantRole", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) UserRevokeRole(ctx context.Context, in *AuthUserRevokeRoleRequest, opts ...grpc.CallOption) (*AuthUserRevokeRoleResponse, error) { - out := new(AuthUserRevokeRoleResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/UserRevokeRole", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) RoleAdd(ctx context.Context, in *AuthRoleAddRequest, opts ...grpc.CallOption) (*AuthRoleAddResponse, error) { - out := new(AuthRoleAddResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/RoleAdd", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) RoleGet(ctx context.Context, in *AuthRoleGetRequest, opts ...grpc.CallOption) (*AuthRoleGetResponse, error) { - out := new(AuthRoleGetResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/RoleGet", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) RoleList(ctx context.Context, in *AuthRoleListRequest, opts ...grpc.CallOption) (*AuthRoleListResponse, error) { - out := new(AuthRoleListResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/RoleList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) RoleDelete(ctx context.Context, in *AuthRoleDeleteRequest, opts ...grpc.CallOption) (*AuthRoleDeleteResponse, error) { - out := new(AuthRoleDeleteResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/RoleDelete", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) RoleGrantPermission(ctx context.Context, in *AuthRoleGrantPermissionRequest, opts ...grpc.CallOption) (*AuthRoleGrantPermissionResponse, error) { - out := new(AuthRoleGrantPermissionResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/RoleGrantPermission", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) RoleRevokePermission(ctx context.Context, in *AuthRoleRevokePermissionRequest, opts ...grpc.CallOption) (*AuthRoleRevokePermissionResponse, error) { - out := new(AuthRoleRevokePermissionResponse) - err := c.cc.Invoke(ctx, "/etcdserverpb.Auth/RoleRevokePermission", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AuthServer is the server API for Auth service. -type AuthServer interface { - // AuthEnable enables authentication. - AuthEnable(context.Context, *AuthEnableRequest) (*AuthEnableResponse, error) - // AuthDisable disables authentication. - AuthDisable(context.Context, *AuthDisableRequest) (*AuthDisableResponse, error) - // AuthStatus displays authentication status. - AuthStatus(context.Context, *AuthStatusRequest) (*AuthStatusResponse, error) - // Authenticate processes an authenticate request. - Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) - // UserAdd adds a new user. User name cannot be empty. - UserAdd(context.Context, *AuthUserAddRequest) (*AuthUserAddResponse, error) - // UserGet gets detailed user information. - UserGet(context.Context, *AuthUserGetRequest) (*AuthUserGetResponse, error) - // UserList gets a list of all users. - UserList(context.Context, *AuthUserListRequest) (*AuthUserListResponse, error) - // UserDelete deletes a specified user. - UserDelete(context.Context, *AuthUserDeleteRequest) (*AuthUserDeleteResponse, error) - // UserChangePassword changes the password of a specified user. - UserChangePassword(context.Context, *AuthUserChangePasswordRequest) (*AuthUserChangePasswordResponse, error) - // UserGrant grants a role to a specified user. - UserGrantRole(context.Context, *AuthUserGrantRoleRequest) (*AuthUserGrantRoleResponse, error) - // UserRevokeRole revokes a role of specified user. - UserRevokeRole(context.Context, *AuthUserRevokeRoleRequest) (*AuthUserRevokeRoleResponse, error) - // RoleAdd adds a new role. Role name cannot be empty. - RoleAdd(context.Context, *AuthRoleAddRequest) (*AuthRoleAddResponse, error) - // RoleGet gets detailed role information. - RoleGet(context.Context, *AuthRoleGetRequest) (*AuthRoleGetResponse, error) - // RoleList gets lists of all roles. - RoleList(context.Context, *AuthRoleListRequest) (*AuthRoleListResponse, error) - // RoleDelete deletes a specified role. - RoleDelete(context.Context, *AuthRoleDeleteRequest) (*AuthRoleDeleteResponse, error) - // RoleGrantPermission grants a permission of a specified key or range to a specified role. - RoleGrantPermission(context.Context, *AuthRoleGrantPermissionRequest) (*AuthRoleGrantPermissionResponse, error) - // RoleRevokePermission revokes a key or range permission of a specified role. - RoleRevokePermission(context.Context, *AuthRoleRevokePermissionRequest) (*AuthRoleRevokePermissionResponse, error) -} - -// UnimplementedAuthServer can be embedded to have forward compatible implementations. -type UnimplementedAuthServer struct { -} - -func (*UnimplementedAuthServer) AuthEnable(ctx context.Context, req *AuthEnableRequest) (*AuthEnableResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthEnable not implemented") -} -func (*UnimplementedAuthServer) AuthDisable(ctx context.Context, req *AuthDisableRequest) (*AuthDisableResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthDisable not implemented") -} -func (*UnimplementedAuthServer) AuthStatus(ctx context.Context, req *AuthStatusRequest) (*AuthStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthStatus not implemented") -} -func (*UnimplementedAuthServer) Authenticate(ctx context.Context, req *AuthenticateRequest) (*AuthenticateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") -} -func (*UnimplementedAuthServer) UserAdd(ctx context.Context, req *AuthUserAddRequest) (*AuthUserAddResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserAdd not implemented") -} -func (*UnimplementedAuthServer) UserGet(ctx context.Context, req *AuthUserGetRequest) (*AuthUserGetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserGet not implemented") -} -func (*UnimplementedAuthServer) UserList(ctx context.Context, req *AuthUserListRequest) (*AuthUserListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserList not implemented") -} -func (*UnimplementedAuthServer) UserDelete(ctx context.Context, req *AuthUserDeleteRequest) (*AuthUserDeleteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserDelete not implemented") -} -func (*UnimplementedAuthServer) UserChangePassword(ctx context.Context, req *AuthUserChangePasswordRequest) (*AuthUserChangePasswordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserChangePassword not implemented") -} -func (*UnimplementedAuthServer) UserGrantRole(ctx context.Context, req *AuthUserGrantRoleRequest) (*AuthUserGrantRoleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserGrantRole not implemented") -} -func (*UnimplementedAuthServer) UserRevokeRole(ctx context.Context, req *AuthUserRevokeRoleRequest) (*AuthUserRevokeRoleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRevokeRole not implemented") -} -func (*UnimplementedAuthServer) RoleAdd(ctx context.Context, req *AuthRoleAddRequest) (*AuthRoleAddResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RoleAdd not implemented") -} -func (*UnimplementedAuthServer) RoleGet(ctx context.Context, req *AuthRoleGetRequest) (*AuthRoleGetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RoleGet not implemented") -} -func (*UnimplementedAuthServer) RoleList(ctx context.Context, req *AuthRoleListRequest) (*AuthRoleListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RoleList not implemented") -} -func (*UnimplementedAuthServer) RoleDelete(ctx context.Context, req *AuthRoleDeleteRequest) (*AuthRoleDeleteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RoleDelete not implemented") -} -func (*UnimplementedAuthServer) RoleGrantPermission(ctx context.Context, req *AuthRoleGrantPermissionRequest) (*AuthRoleGrantPermissionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RoleGrantPermission not implemented") -} -func (*UnimplementedAuthServer) RoleRevokePermission(ctx context.Context, req *AuthRoleRevokePermissionRequest) (*AuthRoleRevokePermissionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RoleRevokePermission not implemented") -} - -func RegisterAuthServer(s *grpc.Server, srv AuthServer) { - s.RegisterService(&_Auth_serviceDesc, srv) -} - -func _Auth_AuthEnable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthEnableRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).AuthEnable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/AuthEnable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).AuthEnable(ctx, req.(*AuthEnableRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_AuthDisable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthDisableRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).AuthDisable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/AuthDisable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).AuthDisable(ctx, req.(*AuthDisableRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_AuthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).AuthStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/AuthStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).AuthStatus(ctx, req.(*AuthStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthenticateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).Authenticate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/Authenticate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).Authenticate(ctx, req.(*AuthenticateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_UserAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthUserAddRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).UserAdd(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/UserAdd", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).UserAdd(ctx, req.(*AuthUserAddRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_UserGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthUserGetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).UserGet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/UserGet", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).UserGet(ctx, req.(*AuthUserGetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_UserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthUserListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).UserList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/UserList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).UserList(ctx, req.(*AuthUserListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_UserDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthUserDeleteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).UserDelete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/UserDelete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).UserDelete(ctx, req.(*AuthUserDeleteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_UserChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthUserChangePasswordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).UserChangePassword(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/UserChangePassword", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).UserChangePassword(ctx, req.(*AuthUserChangePasswordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_UserGrantRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthUserGrantRoleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).UserGrantRole(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/UserGrantRole", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).UserGrantRole(ctx, req.(*AuthUserGrantRoleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_UserRevokeRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthUserRevokeRoleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).UserRevokeRole(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/UserRevokeRole", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).UserRevokeRole(ctx, req.(*AuthUserRevokeRoleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_RoleAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthRoleAddRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).RoleAdd(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/RoleAdd", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).RoleAdd(ctx, req.(*AuthRoleAddRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_RoleGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthRoleGetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).RoleGet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/RoleGet", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).RoleGet(ctx, req.(*AuthRoleGetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_RoleList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthRoleListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).RoleList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/RoleList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).RoleList(ctx, req.(*AuthRoleListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_RoleDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthRoleDeleteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).RoleDelete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/RoleDelete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).RoleDelete(ctx, req.(*AuthRoleDeleteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_RoleGrantPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthRoleGrantPermissionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).RoleGrantPermission(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/RoleGrantPermission", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).RoleGrantPermission(ctx, req.(*AuthRoleGrantPermissionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_RoleRevokePermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthRoleRevokePermissionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).RoleRevokePermission(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/etcdserverpb.Auth/RoleRevokePermission", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).RoleRevokePermission(ctx, req.(*AuthRoleRevokePermissionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Auth_serviceDesc = grpc.ServiceDesc{ - ServiceName: "etcdserverpb.Auth", - HandlerType: (*AuthServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AuthEnable", - Handler: _Auth_AuthEnable_Handler, - }, - { - MethodName: "AuthDisable", - Handler: _Auth_AuthDisable_Handler, - }, - { - MethodName: "AuthStatus", - Handler: _Auth_AuthStatus_Handler, - }, - { - MethodName: "Authenticate", - Handler: _Auth_Authenticate_Handler, - }, - { - MethodName: "UserAdd", - Handler: _Auth_UserAdd_Handler, - }, - { - MethodName: "UserGet", - Handler: _Auth_UserGet_Handler, - }, - { - MethodName: "UserList", - Handler: _Auth_UserList_Handler, - }, - { - MethodName: "UserDelete", - Handler: _Auth_UserDelete_Handler, - }, - { - MethodName: "UserChangePassword", - Handler: _Auth_UserChangePassword_Handler, - }, - { - MethodName: "UserGrantRole", - Handler: _Auth_UserGrantRole_Handler, - }, - { - MethodName: "UserRevokeRole", - Handler: _Auth_UserRevokeRole_Handler, - }, - { - MethodName: "RoleAdd", - Handler: _Auth_RoleAdd_Handler, - }, - { - MethodName: "RoleGet", - Handler: _Auth_RoleGet_Handler, - }, - { - MethodName: "RoleList", - Handler: _Auth_RoleList_Handler, - }, - { - MethodName: "RoleDelete", - Handler: _Auth_RoleDelete_Handler, - }, - { - MethodName: "RoleGrantPermission", - Handler: _Auth_RoleGrantPermission_Handler, - }, - { - MethodName: "RoleRevokePermission", - Handler: _Auth_RoleRevokePermission_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "rpc.proto", -} - -func (m *ResponseHeader) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResponseHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RaftTerm != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.RaftTerm)) - i-- - dAtA[i] = 0x20 - } - if m.Revision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Revision)) - i-- - dAtA[i] = 0x18 - } - if m.MemberId != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.MemberId)) - i-- - dAtA[i] = 0x10 - } - if m.ClusterId != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ClusterId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RangeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RangeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.MaxCreateRevision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.MaxCreateRevision)) - i-- - dAtA[i] = 0x68 - } - if m.MinCreateRevision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.MinCreateRevision)) - i-- - dAtA[i] = 0x60 - } - if m.MaxModRevision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.MaxModRevision)) - i-- - dAtA[i] = 0x58 - } - if m.MinModRevision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.MinModRevision)) - i-- - dAtA[i] = 0x50 - } - if m.CountOnly { - i-- - if m.CountOnly { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.KeysOnly { - i-- - if m.KeysOnly { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.Serializable { - i-- - if m.Serializable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.SortTarget != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.SortTarget)) - i-- - dAtA[i] = 0x30 - } - if m.SortOrder != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.SortOrder)) - i-- - dAtA[i] = 0x28 - } - if m.Revision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Revision)) - i-- - dAtA[i] = 0x20 - } - if m.Limit != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x18 - } - if len(m.RangeEnd) > 0 { - i -= len(m.RangeEnd) - copy(dAtA[i:], m.RangeEnd) - i = encodeVarintRpc(dAtA, i, uint64(len(m.RangeEnd))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RangeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RangeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Count != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Count)) - i-- - dAtA[i] = 0x20 - } - if m.More { - i-- - if m.More { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Kvs) > 0 { - for iNdEx := len(m.Kvs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Kvs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PutRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PutRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PutRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IgnoreLease { - i-- - if m.IgnoreLease { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.IgnoreValue { - i-- - if m.IgnoreValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.PrevKv { - i-- - if m.PrevKv { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.Lease != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Lease)) - i-- - dAtA[i] = 0x18 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PutResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PutResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.PrevKv != nil { - { - size, err := m.PrevKv.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeleteRangeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeleteRangeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.PrevKv { - i-- - if m.PrevKv { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.RangeEnd) > 0 { - i -= len(m.RangeEnd) - copy(dAtA[i:], m.RangeEnd) - i = encodeVarintRpc(dAtA, i, uint64(len(m.RangeEnd))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeleteRangeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeleteRangeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.PrevKvs) > 0 { - for iNdEx := len(m.PrevKvs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PrevKvs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Deleted != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Deleted)) - i-- - dAtA[i] = 0x10 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RequestOp) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RequestOp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Request != nil { - { - size := m.Request.Size() - i -= size - if _, err := m.Request.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *RequestOp_RequestRange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestOp_RequestRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RequestRange != nil { - { - size, err := m.RequestRange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *RequestOp_RequestPut) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestOp_RequestPut) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RequestPut != nil { - { - size, err := m.RequestPut.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *RequestOp_RequestDeleteRange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestOp_RequestDeleteRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RequestDeleteRange != nil { - { - size, err := m.RequestDeleteRange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *RequestOp_RequestTxn) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RequestOp_RequestTxn) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RequestTxn != nil { - { - size, err := m.RequestTxn.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *ResponseOp) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResponseOp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Response != nil { - { - size := m.Response.Size() - i -= size - if _, err := m.Response.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *ResponseOp_ResponseRange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseOp_ResponseRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ResponseRange != nil { - { - size, err := m.ResponseRange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *ResponseOp_ResponsePut) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseOp_ResponsePut) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ResponsePut != nil { - { - size, err := m.ResponsePut.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *ResponseOp_ResponseDeleteRange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseOp_ResponseDeleteRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ResponseDeleteRange != nil { - { - size, err := m.ResponseDeleteRange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *ResponseOp_ResponseTxn) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResponseOp_ResponseTxn) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ResponseTxn != nil { - { - size, err := m.ResponseTxn.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *Compare) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Compare) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Compare) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.RangeEnd) > 0 { - i -= len(m.RangeEnd) - copy(dAtA[i:], m.RangeEnd) - i = encodeVarintRpc(dAtA, i, uint64(len(m.RangeEnd))) - i-- - dAtA[i] = 0x4 - i-- - dAtA[i] = 0x82 - } - if m.TargetUnion != nil { - { - size := m.TargetUnion.Size() - i -= size - if _, err := m.TargetUnion.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x1a - } - if m.Target != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Target)) - i-- - dAtA[i] = 0x10 - } - if m.Result != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Result)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Compare_Version) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Compare_Version) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintRpc(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x20 - return len(dAtA) - i, nil -} -func (m *Compare_CreateRevision) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Compare_CreateRevision) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintRpc(dAtA, i, uint64(m.CreateRevision)) - i-- - dAtA[i] = 0x28 - return len(dAtA) - i, nil -} -func (m *Compare_ModRevision) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Compare_ModRevision) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintRpc(dAtA, i, uint64(m.ModRevision)) - i-- - dAtA[i] = 0x30 - return len(dAtA) - i, nil -} -func (m *Compare_Value) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Compare_Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Value != nil { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *Compare_Lease) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Compare_Lease) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintRpc(dAtA, i, uint64(m.Lease)) - i-- - dAtA[i] = 0x40 - return len(dAtA) - i, nil -} -func (m *TxnRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TxnRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxnRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Failure) > 0 { - for iNdEx := len(m.Failure) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Failure[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Success) > 0 { - for iNdEx := len(m.Success) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Success[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Compare) > 0 { - for iNdEx := len(m.Compare) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Compare[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TxnResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TxnResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxnResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Responses) > 0 { - for iNdEx := len(m.Responses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Responses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Succeeded { - i-- - if m.Succeeded { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CompactionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CompactionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CompactionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Physical { - i-- - if m.Physical { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Revision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Revision)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CompactionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CompactionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CompactionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *HashRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HashRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HashRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *HashKVRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HashKVRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HashKVRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Revision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Revision)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *HashKVResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HashKVResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HashKVResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.CompactRevision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.CompactRevision)) - i-- - dAtA[i] = 0x18 - } - if m.Hash != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Hash)) - i-- - dAtA[i] = 0x10 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *HashResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HashResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HashResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Hash != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Hash)) - i-- - dAtA[i] = 0x10 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SnapshotRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *SnapshotResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SnapshotResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Blob) > 0 { - i -= len(m.Blob) - copy(dAtA[i:], m.Blob) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Blob))) - i-- - dAtA[i] = 0x1a - } - if m.RemainingBytes != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.RemainingBytes)) - i-- - dAtA[i] = 0x10 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WatchRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WatchRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RequestUnion != nil { - { - size := m.RequestUnion.Size() - i -= size - if _, err := m.RequestUnion.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *WatchRequest_CreateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchRequest_CreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CreateRequest != nil { - { - size, err := m.CreateRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *WatchRequest_CancelRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchRequest_CancelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CancelRequest != nil { - { - size, err := m.CancelRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *WatchRequest_ProgressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchRequest_ProgressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ProgressRequest != nil { - { - size, err := m.ProgressRequest.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *WatchCreateRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WatchCreateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Fragment { - i-- - if m.Fragment { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.WatchId != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.WatchId)) - i-- - dAtA[i] = 0x38 - } - if m.PrevKv { - i-- - if m.PrevKv { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if len(m.Filters) > 0 { - dAtA22 := make([]byte, len(m.Filters)*10) - var j21 int - for _, num := range m.Filters { - for num >= 1<<7 { - dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j21++ - } - dAtA22[j21] = uint8(num) - j21++ - } - i -= j21 - copy(dAtA[i:], dAtA22[:j21]) - i = encodeVarintRpc(dAtA, i, uint64(j21)) - i-- - dAtA[i] = 0x2a - } - if m.ProgressNotify { - i-- - if m.ProgressNotify { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.StartRevision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.StartRevision)) - i-- - dAtA[i] = 0x18 - } - if len(m.RangeEnd) > 0 { - i -= len(m.RangeEnd) - copy(dAtA[i:], m.RangeEnd) - i = encodeVarintRpc(dAtA, i, uint64(len(m.RangeEnd))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WatchCancelRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WatchCancelRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchCancelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.WatchId != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.WatchId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *WatchProgressRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WatchProgressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchProgressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *WatchResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WatchResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if m.Fragment { - i-- - if m.Fragment { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if len(m.CancelReason) > 0 { - i -= len(m.CancelReason) - copy(dAtA[i:], m.CancelReason) - i = encodeVarintRpc(dAtA, i, uint64(len(m.CancelReason))) - i-- - dAtA[i] = 0x32 - } - if m.CompactRevision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.CompactRevision)) - i-- - dAtA[i] = 0x28 - } - if m.Canceled { - i-- - if m.Canceled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.Created { - i-- - if m.Created { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.WatchId != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.WatchId)) - i-- - dAtA[i] = 0x10 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LeaseGrantRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseGrantRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseGrantRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x10 - } - if m.TTL != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.TTL)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LeaseGrantResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseGrantResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseGrantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x22 - } - if m.TTL != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.TTL)) - i-- - dAtA[i] = 0x18 - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x10 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LeaseRevokeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseRevokeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseRevokeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LeaseRevokeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseRevokeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseRevokeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LeaseCheckpoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseCheckpoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseCheckpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Remaining_TTL != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Remaining_TTL)) - i-- - dAtA[i] = 0x10 - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LeaseCheckpointRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseCheckpointRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseCheckpointRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Checkpoints) > 0 { - for iNdEx := len(m.Checkpoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Checkpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *LeaseCheckpointResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseCheckpointResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseCheckpointResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LeaseKeepAliveRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseKeepAliveRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseKeepAliveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LeaseKeepAliveResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseKeepAliveResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseKeepAliveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.TTL != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.TTL)) - i-- - dAtA[i] = 0x18 - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x10 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LeaseTimeToLiveRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseTimeToLiveRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseTimeToLiveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Keys { - i-- - if m.Keys { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LeaseTimeToLiveResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseTimeToLiveResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseTimeToLiveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Keys) > 0 { - for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Keys[iNdEx]) - copy(dAtA[i:], m.Keys[iNdEx]) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Keys[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if m.GrantedTTL != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.GrantedTTL)) - i-- - dAtA[i] = 0x20 - } - if m.TTL != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.TTL)) - i-- - dAtA[i] = 0x18 - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x10 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LeaseLeasesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseLeasesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseLeasesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *LeaseStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LeaseLeasesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseLeasesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseLeasesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Leases) > 0 { - for iNdEx := len(m.Leases) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Leases[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Member) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Member) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IsLearner { - i-- - if m.IsLearner { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.ClientURLs) > 0 { - for iNdEx := len(m.ClientURLs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ClientURLs[iNdEx]) - copy(dAtA[i:], m.ClientURLs[iNdEx]) - i = encodeVarintRpc(dAtA, i, uint64(len(m.ClientURLs[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.PeerURLs) > 0 { - for iNdEx := len(m.PeerURLs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PeerURLs[iNdEx]) - copy(dAtA[i:], m.PeerURLs[iNdEx]) - i = encodeVarintRpc(dAtA, i, uint64(len(m.PeerURLs[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MemberAddRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MemberAddRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemberAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IsLearner { - i-- - if m.IsLearner { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.PeerURLs) > 0 { - for iNdEx := len(m.PeerURLs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PeerURLs[iNdEx]) - copy(dAtA[i:], m.PeerURLs[iNdEx]) - i = encodeVarintRpc(dAtA, i, uint64(len(m.PeerURLs[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *MemberAddResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MemberAddResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemberAddResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Members) > 0 { - for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Member != nil { - { - size, err := m.Member.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MemberRemoveRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MemberRemoveRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemberRemoveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MemberRemoveResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MemberRemoveResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemberRemoveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Members) > 0 { - for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MemberUpdateRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MemberUpdateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemberUpdateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.PeerURLs) > 0 { - for iNdEx := len(m.PeerURLs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PeerURLs[iNdEx]) - copy(dAtA[i:], m.PeerURLs[iNdEx]) - i = encodeVarintRpc(dAtA, i, uint64(len(m.PeerURLs[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MemberUpdateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MemberUpdateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemberUpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Members) > 0 { - for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MemberListRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MemberListRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemberListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Linearizable { - i-- - if m.Linearizable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MemberListResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MemberListResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemberListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Members) > 0 { - for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MemberPromoteRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MemberPromoteRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemberPromoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MemberPromoteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MemberPromoteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemberPromoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Members) > 0 { - for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DefragmentRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DefragmentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DefragmentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *DefragmentResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DefragmentResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DefragmentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MoveLeaderRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MoveLeaderRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MoveLeaderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.TargetID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.TargetID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MoveLeaderResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MoveLeaderResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MoveLeaderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AlarmRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AlarmRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AlarmRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Alarm != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Alarm)) - i-- - dAtA[i] = 0x18 - } - if m.MemberID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.MemberID)) - i-- - dAtA[i] = 0x10 - } - if m.Action != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Action)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AlarmMember) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AlarmMember) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AlarmMember) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Alarm != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Alarm)) - i-- - dAtA[i] = 0x10 - } - if m.MemberID != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.MemberID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AlarmResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AlarmResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AlarmResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Alarms) > 0 { - for iNdEx := len(m.Alarms) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Alarms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DowngradeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DowngradeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DowngradeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if m.Action != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Action)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *DowngradeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DowngradeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DowngradeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StatusRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StatusRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *StatusResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StatusResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IsLearner { - i-- - if m.IsLearner { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.DbSizeInUse != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.DbSizeInUse)) - i-- - dAtA[i] = 0x48 - } - if len(m.Errors) > 0 { - for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Errors[iNdEx]) - copy(dAtA[i:], m.Errors[iNdEx]) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Errors[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if m.RaftAppliedIndex != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.RaftAppliedIndex)) - i-- - dAtA[i] = 0x38 - } - if m.RaftTerm != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.RaftTerm)) - i-- - dAtA[i] = 0x30 - } - if m.RaftIndex != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.RaftIndex)) - i-- - dAtA[i] = 0x28 - } - if m.Leader != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.Leader)) - i-- - dAtA[i] = 0x20 - } - if m.DbSize != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.DbSize)) - i-- - dAtA[i] = 0x18 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthEnableRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthEnableRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthEnableRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *AuthDisableRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthDisableRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthDisableRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *AuthStatusRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthStatusRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *AuthenticateRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthenticateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthenticateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Password) > 0 { - i -= len(m.Password) - copy(dAtA[i:], m.Password) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Password))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserAddRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserAddRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.HashedPassword) > 0 { - i -= len(m.HashedPassword) - copy(dAtA[i:], m.HashedPassword) - i = encodeVarintRpc(dAtA, i, uint64(len(m.HashedPassword))) - i-- - dAtA[i] = 0x22 - } - if m.Options != nil { - { - size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Password) > 0 { - i -= len(m.Password) - copy(dAtA[i:], m.Password) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Password))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserGetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserGetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserGetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserDeleteRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserDeleteRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserChangePasswordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserChangePasswordRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserChangePasswordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.HashedPassword) > 0 { - i -= len(m.HashedPassword) - copy(dAtA[i:], m.HashedPassword) - i = encodeVarintRpc(dAtA, i, uint64(len(m.HashedPassword))) - i-- - dAtA[i] = 0x1a - } - if len(m.Password) > 0 { - i -= len(m.Password) - copy(dAtA[i:], m.Password) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Password))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserGrantRoleRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserGrantRoleRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserGrantRoleRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Role) > 0 { - i -= len(m.Role) - copy(dAtA[i:], m.Role) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Role))) - i-- - dAtA[i] = 0x12 - } - if len(m.User) > 0 { - i -= len(m.User) - copy(dAtA[i:], m.User) - i = encodeVarintRpc(dAtA, i, uint64(len(m.User))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserRevokeRoleRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserRevokeRoleRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserRevokeRoleRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Role) > 0 { - i -= len(m.Role) - copy(dAtA[i:], m.Role) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Role))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleAddRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleAddRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleGetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleGetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleGetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Role) > 0 { - i -= len(m.Role) - copy(dAtA[i:], m.Role) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Role))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserListRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserListRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleListRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleListRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleDeleteRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleDeleteRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Role) > 0 { - i -= len(m.Role) - copy(dAtA[i:], m.Role) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Role))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleGrantPermissionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleGrantPermissionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleGrantPermissionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Perm != nil { - { - size, err := m.Perm.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleRevokePermissionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleRevokePermissionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleRevokePermissionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.RangeEnd) > 0 { - i -= len(m.RangeEnd) - copy(dAtA[i:], m.RangeEnd) - i = encodeVarintRpc(dAtA, i, uint64(len(m.RangeEnd))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Role) > 0 { - i -= len(m.Role) - copy(dAtA[i:], m.Role) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Role))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthEnableResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthEnableResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthEnableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthDisableResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthDisableResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthDisableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthStatusResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthStatusResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.AuthRevision != 0 { - i = encodeVarintRpc(dAtA, i, uint64(m.AuthRevision)) - i-- - dAtA[i] = 0x18 - } - if m.Enabled { - i-- - if m.Enabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthenticateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthenticateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthenticateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Token) > 0 { - i -= len(m.Token) - copy(dAtA[i:], m.Token) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Token))) - i-- - dAtA[i] = 0x12 - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserAddResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserAddResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserAddResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserGetResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserGetResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserGetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Roles) > 0 { - for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Roles[iNdEx]) - copy(dAtA[i:], m.Roles[iNdEx]) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Roles[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserDeleteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserDeleteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserDeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserChangePasswordResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserChangePasswordResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserChangePasswordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserGrantRoleResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserGrantRoleResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserGrantRoleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserRevokeRoleResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserRevokeRoleResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserRevokeRoleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleAddResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleAddResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleAddResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleGetResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleGetResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleGetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Perm) > 0 { - for iNdEx := len(m.Perm) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Perm[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleListResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleListResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Roles) > 0 { - for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Roles[iNdEx]) - copy(dAtA[i:], m.Roles[iNdEx]) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Roles[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthUserListResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthUserListResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthUserListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Users) > 0 { - for iNdEx := len(m.Users) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Users[iNdEx]) - copy(dAtA[i:], m.Users[iNdEx]) - i = encodeVarintRpc(dAtA, i, uint64(len(m.Users[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleDeleteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleDeleteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleDeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleGrantPermissionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleGrantPermissionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleGrantPermissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthRoleRevokePermissionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthRoleRevokePermissionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthRoleRevokePermissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintRpc(dAtA []byte, offset int, v uint64) int { - offset -= sovRpc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ResponseHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ClusterId != 0 { - n += 1 + sovRpc(uint64(m.ClusterId)) - } - if m.MemberId != 0 { - n += 1 + sovRpc(uint64(m.MemberId)) - } - if m.Revision != 0 { - n += 1 + sovRpc(uint64(m.Revision)) - } - if m.RaftTerm != 0 { - n += 1 + sovRpc(uint64(m.RaftTerm)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RangeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.RangeEnd) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.Limit != 0 { - n += 1 + sovRpc(uint64(m.Limit)) - } - if m.Revision != 0 { - n += 1 + sovRpc(uint64(m.Revision)) - } - if m.SortOrder != 0 { - n += 1 + sovRpc(uint64(m.SortOrder)) - } - if m.SortTarget != 0 { - n += 1 + sovRpc(uint64(m.SortTarget)) - } - if m.Serializable { - n += 2 - } - if m.KeysOnly { - n += 2 - } - if m.CountOnly { - n += 2 - } - if m.MinModRevision != 0 { - n += 1 + sovRpc(uint64(m.MinModRevision)) - } - if m.MaxModRevision != 0 { - n += 1 + sovRpc(uint64(m.MaxModRevision)) - } - if m.MinCreateRevision != 0 { - n += 1 + sovRpc(uint64(m.MinCreateRevision)) - } - if m.MaxCreateRevision != 0 { - n += 1 + sovRpc(uint64(m.MaxCreateRevision)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RangeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Kvs) > 0 { - for _, e := range m.Kvs { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.More { - n += 2 - } - if m.Count != 0 { - n += 1 + sovRpc(uint64(m.Count)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PutRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.Lease != 0 { - n += 1 + sovRpc(uint64(m.Lease)) - } - if m.PrevKv { - n += 2 - } - if m.IgnoreValue { - n += 2 - } - if m.IgnoreLease { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PutResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.PrevKv != nil { - l = m.PrevKv.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeleteRangeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.RangeEnd) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.PrevKv { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeleteRangeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.Deleted != 0 { - n += 1 + sovRpc(uint64(m.Deleted)) - } - if len(m.PrevKvs) > 0 { - for _, e := range m.PrevKvs { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RequestOp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - n += m.Request.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RequestOp_RequestRange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestRange != nil { - l = m.RequestRange.Size() - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *RequestOp_RequestPut) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestPut != nil { - l = m.RequestPut.Size() - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *RequestOp_RequestDeleteRange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestDeleteRange != nil { - l = m.RequestDeleteRange.Size() - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *RequestOp_RequestTxn) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestTxn != nil { - l = m.RequestTxn.Size() - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *ResponseOp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Response != nil { - n += m.Response.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ResponseOp_ResponseRange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ResponseRange != nil { - l = m.ResponseRange.Size() - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *ResponseOp_ResponsePut) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ResponsePut != nil { - l = m.ResponsePut.Size() - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *ResponseOp_ResponseDeleteRange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ResponseDeleteRange != nil { - l = m.ResponseDeleteRange.Size() - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *ResponseOp_ResponseTxn) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ResponseTxn != nil { - l = m.ResponseTxn.Size() - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *Compare) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Result != 0 { - n += 1 + sovRpc(uint64(m.Result)) - } - if m.Target != 0 { - n += 1 + sovRpc(uint64(m.Target)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.TargetUnion != nil { - n += m.TargetUnion.Size() - } - l = len(m.RangeEnd) - if l > 0 { - n += 2 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Compare_Version) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovRpc(uint64(m.Version)) - return n -} -func (m *Compare_CreateRevision) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovRpc(uint64(m.CreateRevision)) - return n -} -func (m *Compare_ModRevision) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovRpc(uint64(m.ModRevision)) - return n -} -func (m *Compare_Value) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = len(m.Value) - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *Compare_Lease) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovRpc(uint64(m.Lease)) - return n -} -func (m *TxnRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Compare) > 0 { - for _, e := range m.Compare { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if len(m.Success) > 0 { - for _, e := range m.Success { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if len(m.Failure) > 0 { - for _, e := range m.Failure { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TxnResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.Succeeded { - n += 2 - } - if len(m.Responses) > 0 { - for _, e := range m.Responses { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CompactionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Revision != 0 { - n += 1 + sovRpc(uint64(m.Revision)) - } - if m.Physical { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CompactionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HashRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HashKVRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Revision != 0 { - n += 1 + sovRpc(uint64(m.Revision)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HashKVResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.Hash != 0 { - n += 1 + sovRpc(uint64(m.Hash)) - } - if m.CompactRevision != 0 { - n += 1 + sovRpc(uint64(m.CompactRevision)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *HashResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.Hash != 0 { - n += 1 + sovRpc(uint64(m.Hash)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SnapshotRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SnapshotResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.RemainingBytes != 0 { - n += 1 + sovRpc(uint64(m.RemainingBytes)) - } - l = len(m.Blob) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *WatchRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RequestUnion != nil { - n += m.RequestUnion.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *WatchRequest_CreateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CreateRequest != nil { - l = m.CreateRequest.Size() - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *WatchRequest_CancelRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CancelRequest != nil { - l = m.CancelRequest.Size() - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *WatchRequest_ProgressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProgressRequest != nil { - l = m.ProgressRequest.Size() - n += 1 + l + sovRpc(uint64(l)) - } - return n -} -func (m *WatchCreateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.RangeEnd) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.StartRevision != 0 { - n += 1 + sovRpc(uint64(m.StartRevision)) - } - if m.ProgressNotify { - n += 2 - } - if len(m.Filters) > 0 { - l = 0 - for _, e := range m.Filters { - l += sovRpc(uint64(e)) - } - n += 1 + sovRpc(uint64(l)) + l - } - if m.PrevKv { - n += 2 - } - if m.WatchId != 0 { - n += 1 + sovRpc(uint64(m.WatchId)) - } - if m.Fragment { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *WatchCancelRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.WatchId != 0 { - n += 1 + sovRpc(uint64(m.WatchId)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *WatchProgressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *WatchResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.WatchId != 0 { - n += 1 + sovRpc(uint64(m.WatchId)) - } - if m.Created { - n += 2 - } - if m.Canceled { - n += 2 - } - if m.CompactRevision != 0 { - n += 1 + sovRpc(uint64(m.CompactRevision)) - } - l = len(m.CancelReason) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.Fragment { - n += 2 - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseGrantRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TTL != 0 { - n += 1 + sovRpc(uint64(m.TTL)) - } - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseGrantResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if m.TTL != 0 { - n += 1 + sovRpc(uint64(m.TTL)) - } - l = len(m.Error) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseRevokeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseRevokeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseCheckpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if m.Remaining_TTL != 0 { - n += 1 + sovRpc(uint64(m.Remaining_TTL)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseCheckpointRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Checkpoints) > 0 { - for _, e := range m.Checkpoints { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseCheckpointResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseKeepAliveRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseKeepAliveResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if m.TTL != 0 { - n += 1 + sovRpc(uint64(m.TTL)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseTimeToLiveRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if m.Keys { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseTimeToLiveResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if m.TTL != 0 { - n += 1 + sovRpc(uint64(m.TTL)) - } - if m.GrantedTTL != 0 { - n += 1 + sovRpc(uint64(m.GrantedTTL)) - } - if len(m.Keys) > 0 { - for _, b := range m.Keys { - l = len(b) - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseLeasesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LeaseLeasesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Leases) > 0 { - for _, e := range m.Leases { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Member) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.PeerURLs) > 0 { - for _, s := range m.PeerURLs { - l = len(s) - n += 1 + l + sovRpc(uint64(l)) - } - } - if len(m.ClientURLs) > 0 { - for _, s := range m.ClientURLs { - l = len(s) - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.IsLearner { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MemberAddRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.PeerURLs) > 0 { - for _, s := range m.PeerURLs { - l = len(s) - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.IsLearner { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MemberAddResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.Member != nil { - l = m.Member.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Members) > 0 { - for _, e := range m.Members { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MemberRemoveRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MemberRemoveResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Members) > 0 { - for _, e := range m.Members { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MemberUpdateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if len(m.PeerURLs) > 0 { - for _, s := range m.PeerURLs { - l = len(s) - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MemberUpdateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Members) > 0 { - for _, e := range m.Members { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MemberListRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Linearizable { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MemberListResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Members) > 0 { - for _, e := range m.Members { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MemberPromoteRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovRpc(uint64(m.ID)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MemberPromoteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Members) > 0 { - for _, e := range m.Members { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DefragmentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DefragmentResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MoveLeaderRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TargetID != 0 { - n += 1 + sovRpc(uint64(m.TargetID)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MoveLeaderResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AlarmRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Action != 0 { - n += 1 + sovRpc(uint64(m.Action)) - } - if m.MemberID != 0 { - n += 1 + sovRpc(uint64(m.MemberID)) - } - if m.Alarm != 0 { - n += 1 + sovRpc(uint64(m.Alarm)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AlarmMember) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MemberID != 0 { - n += 1 + sovRpc(uint64(m.MemberID)) - } - if m.Alarm != 0 { - n += 1 + sovRpc(uint64(m.Alarm)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AlarmResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Alarms) > 0 { - for _, e := range m.Alarms { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DowngradeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Action != 0 { - n += 1 + sovRpc(uint64(m.Action)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DowngradeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StatusRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StatusResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.DbSize != 0 { - n += 1 + sovRpc(uint64(m.DbSize)) - } - if m.Leader != 0 { - n += 1 + sovRpc(uint64(m.Leader)) - } - if m.RaftIndex != 0 { - n += 1 + sovRpc(uint64(m.RaftIndex)) - } - if m.RaftTerm != 0 { - n += 1 + sovRpc(uint64(m.RaftTerm)) - } - if m.RaftAppliedIndex != 0 { - n += 1 + sovRpc(uint64(m.RaftAppliedIndex)) - } - if len(m.Errors) > 0 { - for _, s := range m.Errors { - l = len(s) - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.DbSizeInUse != 0 { - n += 1 + sovRpc(uint64(m.DbSizeInUse)) - } - if m.IsLearner { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthEnableRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthDisableRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthStatusRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthenticateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserAddRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.Options != nil { - l = m.Options.Size() - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.HashedPassword) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserGetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserDeleteRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserChangePasswordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.Password) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.HashedPassword) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserGrantRoleRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.User) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.Role) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserRevokeRoleRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.Role) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleAddRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleGetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Role) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserListRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleListRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleDeleteRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Role) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleGrantPermissionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.Perm != nil { - l = m.Perm.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleRevokePermissionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Role) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.RangeEnd) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthEnableResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthDisableResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthStatusResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.Enabled { - n += 2 - } - if m.AuthRevision != 0 { - n += 1 + sovRpc(uint64(m.AuthRevision)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthenticateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - l = len(m.Token) - if l > 0 { - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserAddResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserGetResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Roles) > 0 { - for _, s := range m.Roles { - l = len(s) - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserDeleteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserChangePasswordResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserGrantRoleResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserRevokeRoleResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleAddResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleGetResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Perm) > 0 { - for _, e := range m.Perm { - l = e.Size() - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleListResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Roles) > 0 { - for _, s := range m.Roles { - l = len(s) - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthUserListResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if len(m.Users) > 0 { - for _, s := range m.Users { - l = len(s) - n += 1 + l + sovRpc(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleDeleteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleGrantPermissionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthRoleRevokePermissionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovRpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovRpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRpc(x uint64) (n int) { - return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ResponseHeader) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResponseHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterId", wireType) - } - m.ClusterId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClusterId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemberId", wireType) - } - m.MemberId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MemberId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Revision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RaftTerm", wireType) - } - m.RaftTerm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RaftTerm |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RangeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RangeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RangeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RangeEnd = append(m.RangeEnd[:0], dAtA[iNdEx:postIndex]...) - if m.RangeEnd == nil { - m.RangeEnd = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Revision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SortOrder", wireType) - } - m.SortOrder = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SortOrder |= RangeRequest_SortOrder(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SortTarget", wireType) - } - m.SortTarget = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SortTarget |= RangeRequest_SortTarget(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Serializable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Serializable = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field KeysOnly", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.KeysOnly = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CountOnly", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CountOnly = bool(v != 0) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinModRevision", wireType) - } - m.MinModRevision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinModRevision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxModRevision", wireType) - } - m.MaxModRevision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxModRevision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinCreateRevision", wireType) - } - m.MinCreateRevision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinCreateRevision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxCreateRevision", wireType) - } - m.MaxCreateRevision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxCreateRevision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RangeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RangeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RangeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kvs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kvs = append(m.Kvs, &mvccpb.KeyValue{}) - if err := m.Kvs[len(m.Kvs)-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 More", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.More = bool(v != 0) - case 4: - 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PutRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PutRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PutRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) - } - m.Lease = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Lease |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevKv", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PrevKv = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IgnoreValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IgnoreValue = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IgnoreLease", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IgnoreLease = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PutResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PutResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PutResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevKv", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PrevKv == nil { - m.PrevKv = &mvccpb.KeyValue{} - } - if err := m.PrevKv.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeleteRangeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteRangeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteRangeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RangeEnd = append(m.RangeEnd[:0], dAtA[iNdEx:postIndex]...) - if m.RangeEnd == nil { - m.RangeEnd = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevKv", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PrevKv = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeleteRangeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteRangeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteRangeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) - } - m.Deleted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Deleted |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevKvs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrevKvs = append(m.PrevKvs, &mvccpb.KeyValue{}) - if err := m.PrevKvs[len(m.PrevKvs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RequestOp) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RequestOp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RequestOp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestRange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RangeRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Request = &RequestOp_RequestRange{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestPut", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &PutRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Request = &RequestOp_RequestPut{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestDeleteRange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DeleteRangeRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Request = &RequestOp_RequestDeleteRange{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestTxn", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TxnRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Request = &RequestOp_RequestTxn{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResponseOp) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResponseOp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResponseOp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseRange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RangeResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Response = &ResponseOp_ResponseRange{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponsePut", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &PutResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Response = &ResponseOp_ResponsePut{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseDeleteRange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DeleteRangeResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Response = &ResponseOp_ResponseDeleteRange{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTxn", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &TxnResponse{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Response = &ResponseOp_ResponseTxn{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Compare) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Compare: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Compare: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - m.Result = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Result |= Compare_CompareResult(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) - } - m.Target = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Target |= Compare_CompareTarget(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TargetUnion = &Compare_Version{v} - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreateRevision", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TargetUnion = &Compare_CreateRevision{v} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ModRevision", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TargetUnion = &Compare_ModRevision{v} - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.TargetUnion = &Compare_Value{v} - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TargetUnion = &Compare_Lease{v} - case 64: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RangeEnd = append(m.RangeEnd[:0], dAtA[iNdEx:postIndex]...) - if m.RangeEnd == nil { - m.RangeEnd = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TxnRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TxnRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxnRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Compare", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Compare = append(m.Compare, &Compare{}) - if err := m.Compare[len(m.Compare)-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 Success", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Success = append(m.Success, &RequestOp{}) - if err := m.Success[len(m.Success)-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 Failure", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Failure = append(m.Failure, &RequestOp{}) - if err := m.Failure[len(m.Failure)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TxnResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TxnResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxnResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Succeeded", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Succeeded = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Responses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Responses = append(m.Responses, &ResponseOp{}) - if err := m.Responses[len(m.Responses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CompactionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CompactionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CompactionRequest: 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Revision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Physical", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Physical = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CompactionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CompactionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CompactionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HashRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HashRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HashRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HashKVRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HashKVRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HashKVRequest: 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 ErrIntOverflowRpc - } - 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 := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HashKVResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HashKVResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HashKVResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - m.Hash = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Hash |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompactRevision", wireType) - } - m.CompactRevision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CompactRevision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HashResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HashResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HashResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - m.Hash = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Hash |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SnapshotRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SnapshotResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RemainingBytes", wireType) - } - m.RemainingBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RemainingBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Blob", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Blob = append(m.Blob[:0], dAtA[iNdEx:postIndex]...) - if m.Blob == nil { - m.Blob = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WatchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreateRequest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &WatchCreateRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.RequestUnion = &WatchRequest_CreateRequest{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CancelRequest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &WatchCancelRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.RequestUnion = &WatchRequest_CancelRequest{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProgressRequest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &WatchProgressRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.RequestUnion = &WatchRequest_ProgressRequest{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchCreateRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WatchCreateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RangeEnd = append(m.RangeEnd[:0], dAtA[iNdEx:postIndex]...) - if m.RangeEnd == nil { - m.RangeEnd = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartRevision", wireType) - } - m.StartRevision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartRevision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProgressNotify", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ProgressNotify = bool(v != 0) - case 5: - if wireType == 0 { - var v WatchCreateRequest_FilterType - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= WatchCreateRequest_FilterType(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Filters = append(m.Filters, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Filters) == 0 { - m.Filters = make([]WatchCreateRequest_FilterType, 0, elementCount) - } - for iNdEx < postIndex { - var v WatchCreateRequest_FilterType - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= WatchCreateRequest_FilterType(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Filters = append(m.Filters, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevKv", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PrevKv = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WatchId", wireType) - } - m.WatchId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WatchId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Fragment", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Fragment = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchCancelRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WatchCancelRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchCancelRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WatchId", wireType) - } - m.WatchId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WatchId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchProgressRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WatchProgressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchProgressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WatchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WatchId", wireType) - } - m.WatchId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WatchId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Created = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Canceled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Canceled = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompactRevision", wireType) - } - m.CompactRevision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CompactRevision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CancelReason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CancelReason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Fragment", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Fragment = bool(v != 0) - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &mvccpb.Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseGrantRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseGrantRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseGrantRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType) - } - m.TTL = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TTL |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseGrantResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseGrantResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseGrantResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType) - } - m.TTL = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TTL |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseRevokeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseRevokeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseRevokeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseRevokeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseRevokeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseRevokeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseCheckpoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseCheckpoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseCheckpoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Remaining_TTL", wireType) - } - m.Remaining_TTL = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Remaining_TTL |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseCheckpointRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseCheckpointRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseCheckpointRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Checkpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Checkpoints = append(m.Checkpoints, &LeaseCheckpoint{}) - if err := m.Checkpoints[len(m.Checkpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseCheckpointResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseCheckpointResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseCheckpointResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseKeepAliveRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseKeepAliveRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseKeepAliveRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseKeepAliveResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseKeepAliveResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseKeepAliveResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType) - } - m.TTL = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TTL |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseTimeToLiveRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseTimeToLiveRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseTimeToLiveRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Keys = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseTimeToLiveResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseTimeToLiveResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseTimeToLiveResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType) - } - m.TTL = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TTL |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GrantedTTL", wireType) - } - m.GrantedTTL = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GrantedTTL |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Keys = append(m.Keys, make([]byte, postIndex-iNdEx)) - copy(m.Keys[len(m.Keys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseLeasesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseLeasesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseLeasesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseLeasesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseLeasesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseLeasesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leases", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Leases = append(m.Leases, &LeaseStatus{}) - if err := m.Leases[len(m.Leases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Member) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Member: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Member: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - 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 PeerURLs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PeerURLs = append(m.PeerURLs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientURLs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientURLs = append(m.ClientURLs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsLearner", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsLearner = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemberAddRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MemberAddRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemberAddRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerURLs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PeerURLs = append(m.PeerURLs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsLearner", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsLearner = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemberAddResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MemberAddResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemberAddResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Member", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Member == nil { - m.Member = &Member{} - } - if err := m.Member.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Members = append(m.Members, &Member{}) - if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemberRemoveRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MemberRemoveRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemberRemoveRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemberRemoveResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MemberRemoveResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemberRemoveResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Members = append(m.Members, &Member{}) - if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemberUpdateRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MemberUpdateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemberUpdateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerURLs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PeerURLs = append(m.PeerURLs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemberUpdateResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MemberUpdateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemberUpdateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Members = append(m.Members, &Member{}) - if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemberListRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MemberListRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemberListRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Linearizable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Linearizable = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemberListResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MemberListResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemberListResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Members = append(m.Members, &Member{}) - if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemberPromoteRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MemberPromoteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemberPromoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemberPromoteResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MemberPromoteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemberPromoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Members = append(m.Members, &Member{}) - if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DefragmentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DefragmentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DefragmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DefragmentResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DefragmentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DefragmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MoveLeaderRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MoveLeaderRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MoveLeaderRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetID", wireType) - } - m.TargetID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TargetID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MoveLeaderResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MoveLeaderResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MoveLeaderResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AlarmRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AlarmRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AlarmRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - m.Action = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Action |= AlarmRequest_AlarmAction(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemberID", wireType) - } - m.MemberID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MemberID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Alarm", wireType) - } - m.Alarm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Alarm |= AlarmType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AlarmMember) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AlarmMember: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AlarmMember: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemberID", wireType) - } - m.MemberID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MemberID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Alarm", wireType) - } - m.Alarm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Alarm |= AlarmType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AlarmResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AlarmResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AlarmResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alarms", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Alarms = append(m.Alarms, &AlarmMember{}) - if err := m.Alarms[len(m.Alarms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DowngradeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DowngradeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DowngradeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - m.Action = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Action |= DowngradeRequest_DowngradeAction(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DowngradeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DowngradeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DowngradeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DbSize", wireType) - } - m.DbSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DbSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Leader", wireType) - } - m.Leader = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Leader |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RaftIndex", wireType) - } - m.RaftIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RaftIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RaftTerm", wireType) - } - m.RaftTerm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RaftTerm |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RaftAppliedIndex", wireType) - } - m.RaftAppliedIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RaftAppliedIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Errors = append(m.Errors, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DbSizeInUse", wireType) - } - m.DbSizeInUse = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DbSizeInUse |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsLearner", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsLearner = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthEnableRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthEnableRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthEnableRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthDisableRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthDisableRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthDisableRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthStatusRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthStatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthenticateRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthenticateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthenticateRequest: 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - 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 Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserAddRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserAddRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserAddRequest: 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - 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 Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Options == nil { - m.Options = &authpb.UserAddOptions{} - } - if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HashedPassword", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HashedPassword = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserGetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserGetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserGetRequest: 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserDeleteRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserDeleteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserDeleteRequest: 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserChangePasswordRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserChangePasswordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserChangePasswordRequest: 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - 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 Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HashedPassword", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HashedPassword = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserGrantRoleRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserGrantRoleRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserGrantRoleRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.User = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Role = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserRevokeRoleRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserRevokeRoleRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserRevokeRoleRequest: 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - 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 Role", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Role = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleAddRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleAddRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleAddRequest: 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleGetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleGetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleGetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Role = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserListRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserListRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserListRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleListRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleListRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleListRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleDeleteRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleDeleteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Role = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleGrantPermissionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleGrantPermissionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleGrantPermissionRequest: 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - 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 Perm", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Perm == nil { - m.Perm = &authpb.Permission{} - } - if err := m.Perm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleRevokePermissionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleRevokePermissionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleRevokePermissionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Role = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RangeEnd = append(m.RangeEnd[:0], dAtA[iNdEx:postIndex]...) - if m.RangeEnd == nil { - m.RangeEnd = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthEnableResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthEnableResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthEnableResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthDisableResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthDisableResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthDisableResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthStatusResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthStatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Enabled = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthRevision", wireType) - } - m.AuthRevision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AuthRevision |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthenticateResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthenticateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthenticateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - 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 ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserAddResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserAddResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserAddResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserGetResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserGetResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserGetResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserDeleteResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserDeleteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserDeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserChangePasswordResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserChangePasswordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserChangePasswordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserGrantRoleResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserGrantRoleResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserGrantRoleResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserRevokeRoleResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserRevokeRoleResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserRevokeRoleResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleAddResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleAddResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleAddResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleGetResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleGetResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleGetResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Perm", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Perm = append(m.Perm, &authpb.Permission{}) - if err := m.Perm[len(m.Perm)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleListResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleListResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleListResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthUserListResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthUserListResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthUserListResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Users", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Users = append(m.Users, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleDeleteResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleDeleteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleDeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleGrantPermissionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleGrantPermissionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleGrantPermissionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthRoleRevokePermissionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthRoleRevokePermissionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthRoleRevokePermissionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &ResponseHeader{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipRpc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRpc - } - 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, ErrIntOverflowRpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthRpc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupRpc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthRpc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupRpc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.proto b/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.proto deleted file mode 100644 index 4ccc234744c..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/etcdserverpb/rpc.proto +++ /dev/null @@ -1,1199 +0,0 @@ -syntax = "proto3"; -package etcdserverpb; - -import "gogoproto/gogo.proto"; -import "etcd/api/mvccpb/kv.proto"; -import "etcd/api/authpb/auth.proto"; - -// for grpc-gateway -import "google/api/annotations.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; - -service KV { - // Range gets the keys in the range from the key-value store. - rpc Range(RangeRequest) returns (RangeResponse) { - option (google.api.http) = { - post: "/v3/kv/range" - body: "*" - }; - } - - // Put puts the given key into the key-value store. - // A put request increments the revision of the key-value store - // and generates one event in the event history. - rpc Put(PutRequest) returns (PutResponse) { - option (google.api.http) = { - post: "/v3/kv/put" - body: "*" - }; - } - - // DeleteRange deletes the given range from the key-value store. - // A delete request increments the revision of the key-value store - // and generates a delete event in the event history for every deleted key. - rpc DeleteRange(DeleteRangeRequest) returns (DeleteRangeResponse) { - option (google.api.http) = { - post: "/v3/kv/deleterange" - body: "*" - }; - } - - // Txn processes multiple requests in a single transaction. - // A txn request increments the revision of the key-value store - // and generates events with the same revision for every completed request. - // It is not allowed to modify the same key several times within one txn. - rpc Txn(TxnRequest) returns (TxnResponse) { - option (google.api.http) = { - post: "/v3/kv/txn" - body: "*" - }; - } - - // Compact compacts the event history in the etcd key-value store. The key-value - // store should be periodically compacted or the event history will continue to grow - // indefinitely. - rpc Compact(CompactionRequest) returns (CompactionResponse) { - option (google.api.http) = { - post: "/v3/kv/compaction" - body: "*" - }; - } -} - -service Watch { - // Watch watches for events happening or that have happened. Both input and output - // are streams; the input stream is for creating and canceling watchers and the output - // stream sends events. One watch RPC can watch on multiple key ranges, streaming events - // for several watches at once. The entire event history can be watched starting from the - // last compaction revision. - rpc Watch(stream WatchRequest) returns (stream WatchResponse) { - option (google.api.http) = { - post: "/v3/watch" - body: "*" - }; - } -} - -service Lease { - // LeaseGrant creates a lease which expires if the server does not receive a keepAlive - // within a given time to live period. All keys attached to the lease will be expired and - // deleted if the lease expires. Each expired key generates a delete event in the event history. - rpc LeaseGrant(LeaseGrantRequest) returns (LeaseGrantResponse) { - option (google.api.http) = { - post: "/v3/lease/grant" - body: "*" - }; - } - - // LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted. - rpc LeaseRevoke(LeaseRevokeRequest) returns (LeaseRevokeResponse) { - option (google.api.http) = { - post: "/v3/lease/revoke" - body: "*" - additional_bindings { - post: "/v3/kv/lease/revoke" - body: "*" - } - }; - } - - // LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client - // to the server and streaming keep alive responses from the server to the client. - rpc LeaseKeepAlive(stream LeaseKeepAliveRequest) returns (stream LeaseKeepAliveResponse) { - option (google.api.http) = { - post: "/v3/lease/keepalive" - body: "*" - }; - } - - // LeaseTimeToLive retrieves lease information. - rpc LeaseTimeToLive(LeaseTimeToLiveRequest) returns (LeaseTimeToLiveResponse) { - option (google.api.http) = { - post: "/v3/lease/timetolive" - body: "*" - additional_bindings { - post: "/v3/kv/lease/timetolive" - body: "*" - } - }; - } - - // LeaseLeases lists all existing leases. - rpc LeaseLeases(LeaseLeasesRequest) returns (LeaseLeasesResponse) { - option (google.api.http) = { - post: "/v3/lease/leases" - body: "*" - additional_bindings { - post: "/v3/kv/lease/leases" - body: "*" - } - }; - } -} - -service Cluster { - // MemberAdd adds a member into the cluster. - rpc MemberAdd(MemberAddRequest) returns (MemberAddResponse) { - option (google.api.http) = { - post: "/v3/cluster/member/add" - body: "*" - }; - } - - // MemberRemove removes an existing member from the cluster. - rpc MemberRemove(MemberRemoveRequest) returns (MemberRemoveResponse) { - option (google.api.http) = { - post: "/v3/cluster/member/remove" - body: "*" - }; - } - - // MemberUpdate updates the member configuration. - rpc MemberUpdate(MemberUpdateRequest) returns (MemberUpdateResponse) { - option (google.api.http) = { - post: "/v3/cluster/member/update" - body: "*" - }; - } - - // MemberList lists all the members in the cluster. - rpc MemberList(MemberListRequest) returns (MemberListResponse) { - option (google.api.http) = { - post: "/v3/cluster/member/list" - body: "*" - }; - } - - // MemberPromote promotes a member from raft learner (non-voting) to raft voting member. - rpc MemberPromote(MemberPromoteRequest) returns (MemberPromoteResponse) { - option (google.api.http) = { - post: "/v3/cluster/member/promote" - body: "*" - }; - } -} - -service Maintenance { - // Alarm activates, deactivates, and queries alarms regarding cluster health. - rpc Alarm(AlarmRequest) returns (AlarmResponse) { - option (google.api.http) = { - post: "/v3/maintenance/alarm" - body: "*" - }; - } - - // Status gets the status of the member. - rpc Status(StatusRequest) returns (StatusResponse) { - option (google.api.http) = { - post: "/v3/maintenance/status" - body: "*" - }; - } - - // Defragment defragments a member's backend database to recover storage space. - rpc Defragment(DefragmentRequest) returns (DefragmentResponse) { - option (google.api.http) = { - post: "/v3/maintenance/defragment" - body: "*" - }; - } - - // Hash computes the hash of whole backend keyspace, - // including key, lease, and other buckets in storage. - // This is designed for testing ONLY! - // Do not rely on this in production with ongoing transactions, - // since Hash operation does not hold MVCC locks. - // Use "HashKV" API instead for "key" bucket consistency checks. - rpc Hash(HashRequest) returns (HashResponse) { - option (google.api.http) = { - post: "/v3/maintenance/hash" - body: "*" - }; - } - - // HashKV computes the hash of all MVCC keys up to a given revision. - // It only iterates "key" bucket in backend storage. - rpc HashKV(HashKVRequest) returns (HashKVResponse) { - option (google.api.http) = { - post: "/v3/maintenance/hashkv" - body: "*" - }; - } - - // Snapshot sends a snapshot of the entire backend from a member over a stream to a client. - rpc Snapshot(SnapshotRequest) returns (stream SnapshotResponse) { - option (google.api.http) = { - post: "/v3/maintenance/snapshot" - body: "*" - }; - } - - // MoveLeader requests current leader node to transfer its leadership to transferee. - rpc MoveLeader(MoveLeaderRequest) returns (MoveLeaderResponse) { - option (google.api.http) = { - post: "/v3/maintenance/transfer-leadership" - body: "*" - }; - } - - // Downgrade requests downgrades, verifies feasibility or cancels downgrade - // on the cluster version. - // Supported since etcd 3.5. - rpc Downgrade(DowngradeRequest) returns (DowngradeResponse) { - option (google.api.http) = { - post: "/v3/maintenance/downgrade" - body: "*" - }; - } -} - -service Auth { - // AuthEnable enables authentication. - rpc AuthEnable(AuthEnableRequest) returns (AuthEnableResponse) { - option (google.api.http) = { - post: "/v3/auth/enable" - body: "*" - }; - } - - // AuthDisable disables authentication. - rpc AuthDisable(AuthDisableRequest) returns (AuthDisableResponse) { - option (google.api.http) = { - post: "/v3/auth/disable" - body: "*" - }; - } - - // AuthStatus displays authentication status. - rpc AuthStatus(AuthStatusRequest) returns (AuthStatusResponse) { - option (google.api.http) = { - post: "/v3/auth/status" - body: "*" - }; - } - - // Authenticate processes an authenticate request. - rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse) { - option (google.api.http) = { - post: "/v3/auth/authenticate" - body: "*" - }; - } - - // UserAdd adds a new user. User name cannot be empty. - rpc UserAdd(AuthUserAddRequest) returns (AuthUserAddResponse) { - option (google.api.http) = { - post: "/v3/auth/user/add" - body: "*" - }; - } - - // UserGet gets detailed user information. - rpc UserGet(AuthUserGetRequest) returns (AuthUserGetResponse) { - option (google.api.http) = { - post: "/v3/auth/user/get" - body: "*" - }; - } - - // UserList gets a list of all users. - rpc UserList(AuthUserListRequest) returns (AuthUserListResponse) { - option (google.api.http) = { - post: "/v3/auth/user/list" - body: "*" - }; - } - - // UserDelete deletes a specified user. - rpc UserDelete(AuthUserDeleteRequest) returns (AuthUserDeleteResponse) { - option (google.api.http) = { - post: "/v3/auth/user/delete" - body: "*" - }; - } - - // UserChangePassword changes the password of a specified user. - rpc UserChangePassword(AuthUserChangePasswordRequest) returns (AuthUserChangePasswordResponse) { - option (google.api.http) = { - post: "/v3/auth/user/changepw" - body: "*" - }; - } - - // UserGrant grants a role to a specified user. - rpc UserGrantRole(AuthUserGrantRoleRequest) returns (AuthUserGrantRoleResponse) { - option (google.api.http) = { - post: "/v3/auth/user/grant" - body: "*" - }; - } - - // UserRevokeRole revokes a role of specified user. - rpc UserRevokeRole(AuthUserRevokeRoleRequest) returns (AuthUserRevokeRoleResponse) { - option (google.api.http) = { - post: "/v3/auth/user/revoke" - body: "*" - }; - } - - // RoleAdd adds a new role. Role name cannot be empty. - rpc RoleAdd(AuthRoleAddRequest) returns (AuthRoleAddResponse) { - option (google.api.http) = { - post: "/v3/auth/role/add" - body: "*" - }; - } - - // RoleGet gets detailed role information. - rpc RoleGet(AuthRoleGetRequest) returns (AuthRoleGetResponse) { - option (google.api.http) = { - post: "/v3/auth/role/get" - body: "*" - }; - } - - // RoleList gets lists of all roles. - rpc RoleList(AuthRoleListRequest) returns (AuthRoleListResponse) { - option (google.api.http) = { - post: "/v3/auth/role/list" - body: "*" - }; - } - - // RoleDelete deletes a specified role. - rpc RoleDelete(AuthRoleDeleteRequest) returns (AuthRoleDeleteResponse) { - option (google.api.http) = { - post: "/v3/auth/role/delete" - body: "*" - }; - } - - // RoleGrantPermission grants a permission of a specified key or range to a specified role. - rpc RoleGrantPermission(AuthRoleGrantPermissionRequest) returns (AuthRoleGrantPermissionResponse) { - option (google.api.http) = { - post: "/v3/auth/role/grant" - body: "*" - }; - } - - // RoleRevokePermission revokes a key or range permission of a specified role. - rpc RoleRevokePermission(AuthRoleRevokePermissionRequest) returns (AuthRoleRevokePermissionResponse) { - option (google.api.http) = { - post: "/v3/auth/role/revoke" - body: "*" - }; - } -} - -message ResponseHeader { - // cluster_id is the ID of the cluster which sent the response. - uint64 cluster_id = 1; - // member_id is the ID of the member which sent the response. - uint64 member_id = 2; - // revision is the key-value store revision when the request was applied. - // For watch progress responses, the header.revision indicates progress. All future events - // recieved in this stream are guaranteed to have a higher revision number than the - // header.revision number. - int64 revision = 3; - // raft_term is the raft term when the request was applied. - uint64 raft_term = 4; -} - -message RangeRequest { - enum SortOrder { - NONE = 0; // default, no sorting - ASCEND = 1; // lowest target value first - DESCEND = 2; // highest target value first - } - enum SortTarget { - KEY = 0; - VERSION = 1; - CREATE = 2; - MOD = 3; - VALUE = 4; - } - - // key is the first key for the range. If range_end is not given, the request only looks up key. - bytes key = 1; - // range_end is the upper bound on the requested range [key, range_end). - // If range_end is '\0', the range is all keys >= key. - // If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"), - // then the range request gets all keys prefixed with key. - // If both key and range_end are '\0', then the range request returns all keys. - bytes range_end = 2; - // limit is a limit on the number of keys returned for the request. When limit is set to 0, - // it is treated as no limit. - int64 limit = 3; - // revision is the point-in-time of the key-value store to use for the range. - // If revision is less or equal to zero, the range is over the newest key-value store. - // If the revision has been compacted, ErrCompacted is returned as a response. - int64 revision = 4; - - // sort_order is the order for returned sorted results. - SortOrder sort_order = 5; - - // sort_target is the key-value field to use for sorting. - SortTarget sort_target = 6; - - // serializable sets the range request to use serializable member-local reads. - // Range requests are linearizable by default; linearizable requests have higher - // latency and lower throughput than serializable requests but reflect the current - // consensus of the cluster. For better performance, in exchange for possible stale reads, - // a serializable range request is served locally without needing to reach consensus - // with other nodes in the cluster. - bool serializable = 7; - - // keys_only when set returns only the keys and not the values. - bool keys_only = 8; - - // count_only when set returns only the count of the keys in the range. - bool count_only = 9; - - // min_mod_revision is the lower bound for returned key mod revisions; all keys with - // lesser mod revisions will be filtered away. - int64 min_mod_revision = 10; - - // max_mod_revision is the upper bound for returned key mod revisions; all keys with - // greater mod revisions will be filtered away. - int64 max_mod_revision = 11; - - // min_create_revision is the lower bound for returned key create revisions; all keys with - // lesser create revisions will be filtered away. - int64 min_create_revision = 12; - - // max_create_revision is the upper bound for returned key create revisions; all keys with - // greater create revisions will be filtered away. - int64 max_create_revision = 13; -} - -message RangeResponse { - ResponseHeader header = 1; - // kvs is the list of key-value pairs matched by the range request. - // kvs is empty when count is requested. - repeated mvccpb.KeyValue kvs = 2; - // more indicates if there are more keys to return in the requested range. - bool more = 3; - // count is set to the number of keys within the range when requested. - int64 count = 4; -} - -message PutRequest { - // key is the key, in bytes, to put into the key-value store. - bytes key = 1; - // value is the value, in bytes, to associate with the key in the key-value store. - bytes value = 2; - // lease is the lease ID to associate with the key in the key-value store. A lease - // value of 0 indicates no lease. - int64 lease = 3; - - // If prev_kv is set, etcd gets the previous key-value pair before changing it. - // The previous key-value pair will be returned in the put response. - bool prev_kv = 4; - - // If ignore_value is set, etcd updates the key using its current value. - // Returns an error if the key does not exist. - bool ignore_value = 5; - - // If ignore_lease is set, etcd updates the key using its current lease. - // Returns an error if the key does not exist. - bool ignore_lease = 6; -} - -message PutResponse { - ResponseHeader header = 1; - // if prev_kv is set in the request, the previous key-value pair will be returned. - mvccpb.KeyValue prev_kv = 2; -} - -message DeleteRangeRequest { - // key is the first key to delete in the range. - bytes key = 1; - // range_end is the key following the last key to delete for the range [key, range_end). - // If range_end is not given, the range is defined to contain only the key argument. - // If range_end is one bit larger than the given key, then the range is all the keys - // with the prefix (the given key). - // If range_end is '\0', the range is all keys greater than or equal to the key argument. - bytes range_end = 2; - - // If prev_kv is set, etcd gets the previous key-value pairs before deleting it. - // The previous key-value pairs will be returned in the delete response. - bool prev_kv = 3; -} - -message DeleteRangeResponse { - ResponseHeader header = 1; - // deleted is the number of keys deleted by the delete range request. - int64 deleted = 2; - // if prev_kv is set in the request, the previous key-value pairs will be returned. - repeated mvccpb.KeyValue prev_kvs = 3; -} - -message RequestOp { - // request is a union of request types accepted by a transaction. - oneof request { - RangeRequest request_range = 1; - PutRequest request_put = 2; - DeleteRangeRequest request_delete_range = 3; - TxnRequest request_txn = 4; - } -} - -message ResponseOp { - // response is a union of response types returned by a transaction. - oneof response { - RangeResponse response_range = 1; - PutResponse response_put = 2; - DeleteRangeResponse response_delete_range = 3; - TxnResponse response_txn = 4; - } -} - -message Compare { - enum CompareResult { - EQUAL = 0; - GREATER = 1; - LESS = 2; - NOT_EQUAL = 3; - } - enum CompareTarget { - VERSION = 0; - CREATE = 1; - MOD = 2; - VALUE = 3; - LEASE = 4; - } - // result is logical comparison operation for this comparison. - CompareResult result = 1; - // target is the key-value field to inspect for the comparison. - CompareTarget target = 2; - // key is the subject key for the comparison operation. - bytes key = 3; - oneof target_union { - // version is the version of the given key - int64 version = 4; - // create_revision is the creation revision of the given key - int64 create_revision = 5; - // mod_revision is the last modified revision of the given key. - int64 mod_revision = 6; - // value is the value of the given key, in bytes. - bytes value = 7; - // lease is the lease id of the given key. - int64 lease = 8; - // leave room for more target_union field tags, jump to 64 - } - - // range_end compares the given target to all keys in the range [key, range_end). - // See RangeRequest for more details on key ranges. - bytes range_end = 64; - // TODO: fill out with most of the rest of RangeRequest fields when needed. -} - -// From google paxosdb paper: -// Our implementation hinges around a powerful primitive which we call MultiOp. All other database -// operations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically -// and consists of three components: -// 1. A list of tests called guard. Each test in guard checks a single entry in the database. It may check -// for the absence or presence of a value, or compare with a given value. Two different tests in the guard -// may apply to the same or different entries in the database. All tests in the guard are applied and -// MultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise -// it executes f op (see item 3 below). -// 2. A list of database operations called t op. Each operation in the list is either an insert, delete, or -// lookup operation, and applies to a single database entry. Two different operations in the list may apply -// to the same or different entries in the database. These operations are executed -// if guard evaluates to -// true. -// 3. A list of database operations called f op. Like t op, but executed if guard evaluates to false. -message TxnRequest { - // compare is a list of predicates representing a conjunction of terms. - // If the comparisons succeed, then the success requests will be processed in order, - // and the response will contain their respective responses in order. - // If the comparisons fail, then the failure requests will be processed in order, - // and the response will contain their respective responses in order. - repeated Compare compare = 1; - // success is a list of requests which will be applied when compare evaluates to true. - repeated RequestOp success = 2; - // failure is a list of requests which will be applied when compare evaluates to false. - repeated RequestOp failure = 3; -} - -message TxnResponse { - ResponseHeader header = 1; - // succeeded is set to true if the compare evaluated to true or false otherwise. - bool succeeded = 2; - // responses is a list of responses corresponding to the results from applying - // success if succeeded is true or failure if succeeded is false. - repeated ResponseOp responses = 3; -} - -// CompactionRequest compacts the key-value store up to a given revision. All superseded keys -// with a revision less than the compaction revision will be removed. -message CompactionRequest { - // revision is the key-value store revision for the compaction operation. - int64 revision = 1; - // physical is set so the RPC will wait until the compaction is physically - // applied to the local database such that compacted entries are totally - // removed from the backend database. - bool physical = 2; -} - -message CompactionResponse { - ResponseHeader header = 1; -} - -message HashRequest { -} - -message HashKVRequest { - // revision is the key-value store revision for the hash operation. - int64 revision = 1; -} - -message HashKVResponse { - ResponseHeader header = 1; - // hash is the hash value computed from the responding member's MVCC keys up to a given revision. - uint32 hash = 2; - // compact_revision is the compacted revision of key-value store when hash begins. - int64 compact_revision = 3; -} - -message HashResponse { - ResponseHeader header = 1; - // hash is the hash value computed from the responding member's KV's backend. - uint32 hash = 2; -} - -message SnapshotRequest { -} - -message SnapshotResponse { - // header has the current key-value store information. The first header in the snapshot - // stream indicates the point in time of the snapshot. - ResponseHeader header = 1; - - // remaining_bytes is the number of blob bytes to be sent after this message - uint64 remaining_bytes = 2; - - // blob contains the next chunk of the snapshot in the snapshot stream. - bytes blob = 3; -} - -message WatchRequest { - // request_union is a request to either create a new watcher or cancel an existing watcher. - oneof request_union { - WatchCreateRequest create_request = 1; - WatchCancelRequest cancel_request = 2; - WatchProgressRequest progress_request = 3; - } -} - -message WatchCreateRequest { - // key is the key to register for watching. - bytes key = 1; - - // range_end is the end of the range [key, range_end) to watch. If range_end is not given, - // only the key argument is watched. If range_end is equal to '\0', all keys greater than - // or equal to the key argument are watched. - // If the range_end is one bit larger than the given key, - // then all keys with the prefix (the given key) will be watched. - bytes range_end = 2; - - // start_revision is an optional revision to watch from (inclusive). No start_revision is "now". - int64 start_revision = 3; - - // progress_notify is set so that the etcd server will periodically send a WatchResponse with - // no events to the new watcher if there are no recent events. It is useful when clients - // wish to recover a disconnected watcher starting from a recent known revision. - // The etcd server may decide how often it will send notifications based on current load. - bool progress_notify = 4; - - enum FilterType { - // filter out put event. - NOPUT = 0; - // filter out delete event. - NODELETE = 1; - } - - // filters filter the events at server side before it sends back to the watcher. - repeated FilterType filters = 5; - - // If prev_kv is set, created watcher gets the previous KV before the event happens. - // If the previous KV is already compacted, nothing will be returned. - bool prev_kv = 6; - - // If watch_id is provided and non-zero, it will be assigned to this watcher. - // Since creating a watcher in etcd is not a synchronous operation, - // this can be used ensure that ordering is correct when creating multiple - // watchers on the same stream. Creating a watcher with an ID already in - // use on the stream will cause an error to be returned. - int64 watch_id = 7; - - // fragment enables splitting large revisions into multiple watch responses. - bool fragment = 8; -} - -message WatchCancelRequest { - // watch_id is the watcher id to cancel so that no more events are transmitted. - int64 watch_id = 1; -} - -// Requests the a watch stream progress status be sent in the watch response stream as soon as -// possible. -message WatchProgressRequest { -} - -message WatchResponse { - ResponseHeader header = 1; - // watch_id is the ID of the watcher that corresponds to the response. - int64 watch_id = 2; - - // created is set to true if the response is for a create watch request. - // The client should record the watch_id and expect to receive events for - // the created watcher from the same stream. - // All events sent to the created watcher will attach with the same watch_id. - bool created = 3; - - // canceled is set to true if the response is for a cancel watch request. - // No further events will be sent to the canceled watcher. - bool canceled = 4; - - // compact_revision is set to the minimum index if a watcher tries to watch - // at a compacted index. - // - // This happens when creating a watcher at a compacted revision or the watcher cannot - // catch up with the progress of the key-value store. - // - // The client should treat the watcher as canceled and should not try to create any - // watcher with the same start_revision again. - int64 compact_revision = 5; - - // cancel_reason indicates the reason for canceling the watcher. - string cancel_reason = 6; - - // framgment is true if large watch response was split over multiple responses. - bool fragment = 7; - - repeated mvccpb.Event events = 11; -} - -message LeaseGrantRequest { - // TTL is the advisory time-to-live in seconds. Expired lease will return -1. - int64 TTL = 1; - // ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID. - int64 ID = 2; -} - -message LeaseGrantResponse { - ResponseHeader header = 1; - // ID is the lease ID for the granted lease. - int64 ID = 2; - // TTL is the server chosen lease time-to-live in seconds. - int64 TTL = 3; - string error = 4; -} - -message LeaseRevokeRequest { - // ID is the lease ID to revoke. When the ID is revoked, all associated keys will be deleted. - int64 ID = 1; -} - -message LeaseRevokeResponse { - ResponseHeader header = 1; -} - -message LeaseCheckpoint { - // ID is the lease ID to checkpoint. - int64 ID = 1; - - // Remaining_TTL is the remaining time until expiry of the lease. - int64 remaining_TTL = 2; -} - -message LeaseCheckpointRequest { - repeated LeaseCheckpoint checkpoints = 1; -} - -message LeaseCheckpointResponse { - ResponseHeader header = 1; -} - -message LeaseKeepAliveRequest { - // ID is the lease ID for the lease to keep alive. - int64 ID = 1; -} - -message LeaseKeepAliveResponse { - ResponseHeader header = 1; - // ID is the lease ID from the keep alive request. - int64 ID = 2; - // TTL is the new time-to-live for the lease. - int64 TTL = 3; -} - -message LeaseTimeToLiveRequest { - // ID is the lease ID for the lease. - int64 ID = 1; - // keys is true to query all the keys attached to this lease. - bool keys = 2; -} - -message LeaseTimeToLiveResponse { - ResponseHeader header = 1; - // ID is the lease ID from the keep alive request. - int64 ID = 2; - // TTL is the remaining TTL in seconds for the lease; the lease will expire in under TTL+1 seconds. - int64 TTL = 3; - // GrantedTTL is the initial granted time in seconds upon lease creation/renewal. - int64 grantedTTL = 4; - // Keys is the list of keys attached to this lease. - repeated bytes keys = 5; -} - -message LeaseLeasesRequest { -} - -message LeaseStatus { - int64 ID = 1; - // TODO: int64 TTL = 2; -} - -message LeaseLeasesResponse { - ResponseHeader header = 1; - repeated LeaseStatus leases = 2; -} - -message Member { - // ID is the member ID for this member. - uint64 ID = 1; - // name is the human-readable name of the member. If the member is not started, the name will be an empty string. - string name = 2; - // peerURLs is the list of URLs the member exposes to the cluster for communication. - repeated string peerURLs = 3; - // clientURLs is the list of URLs the member exposes to clients for communication. If the member is not started, clientURLs will be empty. - repeated string clientURLs = 4; - // isLearner indicates if the member is raft learner. - bool isLearner = 5; -} - -message MemberAddRequest { - // peerURLs is the list of URLs the added member will use to communicate with the cluster. - repeated string peerURLs = 1; - // isLearner indicates if the added member is raft learner. - bool isLearner = 2; -} - -message MemberAddResponse { - ResponseHeader header = 1; - // member is the member information for the added member. - Member member = 2; - // members is a list of all members after adding the new member. - repeated Member members = 3; -} - -message MemberRemoveRequest { - // ID is the member ID of the member to remove. - uint64 ID = 1; -} - -message MemberRemoveResponse { - ResponseHeader header = 1; - // members is a list of all members after removing the member. - repeated Member members = 2; -} - -message MemberUpdateRequest { - // ID is the member ID of the member to update. - uint64 ID = 1; - // peerURLs is the new list of URLs the member will use to communicate with the cluster. - repeated string peerURLs = 2; -} - -message MemberUpdateResponse{ - ResponseHeader header = 1; - // members is a list of all members after updating the member. - repeated Member members = 2; -} - -message MemberListRequest { - bool linearizable = 1; -} - -message MemberListResponse { - ResponseHeader header = 1; - // members is a list of all members associated with the cluster. - repeated Member members = 2; -} - -message MemberPromoteRequest { - // ID is the member ID of the member to promote. - uint64 ID = 1; -} - -message MemberPromoteResponse { - ResponseHeader header = 1; - // members is a list of all members after promoting the member. - repeated Member members = 2; -} - -message DefragmentRequest { -} - -message DefragmentResponse { - ResponseHeader header = 1; -} - -message MoveLeaderRequest { - // targetID is the node ID for the new leader. - uint64 targetID = 1; -} - -message MoveLeaderResponse { - ResponseHeader header = 1; -} - -enum AlarmType { - NONE = 0; // default, used to query if any alarm is active - NOSPACE = 1; // space quota is exhausted - CORRUPT = 2; // kv store corruption detected -} - -message AlarmRequest { - enum AlarmAction { - GET = 0; - ACTIVATE = 1; - DEACTIVATE = 2; - } - // action is the kind of alarm request to issue. The action - // may GET alarm statuses, ACTIVATE an alarm, or DEACTIVATE a - // raised alarm. - AlarmAction action = 1; - // memberID is the ID of the member associated with the alarm. If memberID is 0, the - // alarm request covers all members. - uint64 memberID = 2; - // alarm is the type of alarm to consider for this request. - AlarmType alarm = 3; -} - -message AlarmMember { - // memberID is the ID of the member associated with the raised alarm. - uint64 memberID = 1; - // alarm is the type of alarm which has been raised. - AlarmType alarm = 2; -} - -message AlarmResponse { - ResponseHeader header = 1; - // alarms is a list of alarms associated with the alarm request. - repeated AlarmMember alarms = 2; -} - -message DowngradeRequest { - enum DowngradeAction { - VALIDATE = 0; - ENABLE = 1; - CANCEL = 2; - } - - // action is the kind of downgrade request to issue. The action may - // VALIDATE the target version, DOWNGRADE the cluster version, - // or CANCEL the current downgrading job. - DowngradeAction action = 1; - // version is the target version to downgrade. - string version = 2; -} - -message DowngradeResponse { - ResponseHeader header = 1; - // version is the current cluster version. - string version = 2; -} - -message StatusRequest { -} - -message StatusResponse { - ResponseHeader header = 1; - // version is the cluster protocol version used by the responding member. - string version = 2; - // dbSize is the size of the backend database physically allocated, in bytes, of the responding member. - int64 dbSize = 3; - // leader is the member ID which the responding member believes is the current leader. - uint64 leader = 4; - // raftIndex is the current raft committed index of the responding member. - uint64 raftIndex = 5; - // raftTerm is the current raft term of the responding member. - uint64 raftTerm = 6; - // raftAppliedIndex is the current raft applied index of the responding member. - uint64 raftAppliedIndex = 7; - // errors contains alarm/health information and status. - repeated string errors = 8; - // dbSizeInUse is the size of the backend database logically in use, in bytes, of the responding member. - int64 dbSizeInUse = 9; - // isLearner indicates if the member is raft learner. - bool isLearner = 10; -} - -message AuthEnableRequest { -} - -message AuthDisableRequest { -} - -message AuthStatusRequest { -} - -message AuthenticateRequest { - string name = 1; - string password = 2; -} - -message AuthUserAddRequest { - string name = 1; - string password = 2; - authpb.UserAddOptions options = 3; - string hashedPassword = 4; -} - -message AuthUserGetRequest { - string name = 1; -} - -message AuthUserDeleteRequest { - // name is the name of the user to delete. - string name = 1; -} - -message AuthUserChangePasswordRequest { - // name is the name of the user whose password is being changed. - string name = 1; - // password is the new password for the user. Note that this field will be removed in the API layer. - string password = 2; - // hashedPassword is the new password for the user. Note that this field will be initialized in the API layer. - string hashedPassword = 3; -} - -message AuthUserGrantRoleRequest { - // user is the name of the user which should be granted a given role. - string user = 1; - // role is the name of the role to grant to the user. - string role = 2; -} - -message AuthUserRevokeRoleRequest { - string name = 1; - string role = 2; -} - -message AuthRoleAddRequest { - // name is the name of the role to add to the authentication system. - string name = 1; -} - -message AuthRoleGetRequest { - string role = 1; -} - -message AuthUserListRequest { -} - -message AuthRoleListRequest { -} - -message AuthRoleDeleteRequest { - string role = 1; -} - -message AuthRoleGrantPermissionRequest { - // name is the name of the role which will be granted the permission. - string name = 1; - // perm is the permission to grant to the role. - authpb.Permission perm = 2; -} - -message AuthRoleRevokePermissionRequest { - string role = 1; - bytes key = 2; - bytes range_end = 3; -} - -message AuthEnableResponse { - ResponseHeader header = 1; -} - -message AuthDisableResponse { - ResponseHeader header = 1; -} - -message AuthStatusResponse { - ResponseHeader header = 1; - bool enabled = 2; - // authRevision is the current revision of auth store - uint64 authRevision = 3; -} - -message AuthenticateResponse { - ResponseHeader header = 1; - // token is an authorized token that can be used in succeeding RPCs - string token = 2; -} - -message AuthUserAddResponse { - ResponseHeader header = 1; -} - -message AuthUserGetResponse { - ResponseHeader header = 1; - - repeated string roles = 2; -} - -message AuthUserDeleteResponse { - ResponseHeader header = 1; -} - -message AuthUserChangePasswordResponse { - ResponseHeader header = 1; -} - -message AuthUserGrantRoleResponse { - ResponseHeader header = 1; -} - -message AuthUserRevokeRoleResponse { - ResponseHeader header = 1; -} - -message AuthRoleAddResponse { - ResponseHeader header = 1; -} - -message AuthRoleGetResponse { - ResponseHeader header = 1; - - repeated authpb.Permission perm = 2; -} - -message AuthRoleListResponse { - ResponseHeader header = 1; - - repeated string roles = 2; -} - -message AuthUserListResponse { - ResponseHeader header = 1; - - repeated string users = 2; -} - -message AuthRoleDeleteResponse { - ResponseHeader header = 1; -} - -message AuthRoleGrantPermissionResponse { - ResponseHeader header = 1; -} - -message AuthRoleRevokePermissionResponse { - ResponseHeader header = 1; -} diff --git a/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.pb.go b/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.pb.go deleted file mode 100644 index cf0d4281806..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.pb.go +++ /dev/null @@ -1,1454 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: membership.proto - -package membershippb - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" -) - -// 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.ProtoPackageIsVersion3 // please upgrade the proto package - -// RaftAttributes represents the raft related attributes of an etcd member. -type RaftAttributes struct { - // peerURLs is the list of peers in the raft cluster. - PeerUrls []string `protobuf:"bytes,1,rep,name=peer_urls,json=peerUrls,proto3" json:"peer_urls,omitempty"` - // isLearner indicates if the member is raft learner. - IsLearner bool `protobuf:"varint,2,opt,name=is_learner,json=isLearner,proto3" json:"is_learner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RaftAttributes) Reset() { *m = RaftAttributes{} } -func (m *RaftAttributes) String() string { return proto.CompactTextString(m) } -func (*RaftAttributes) ProtoMessage() {} -func (*RaftAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_949fe0d019050ef5, []int{0} -} -func (m *RaftAttributes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RaftAttributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RaftAttributes.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RaftAttributes) XXX_Merge(src proto.Message) { - xxx_messageInfo_RaftAttributes.Merge(m, src) -} -func (m *RaftAttributes) XXX_Size() int { - return m.Size() -} -func (m *RaftAttributes) XXX_DiscardUnknown() { - xxx_messageInfo_RaftAttributes.DiscardUnknown(m) -} - -var xxx_messageInfo_RaftAttributes proto.InternalMessageInfo - -// Attributes represents all the non-raft related attributes of an etcd member. -type Attributes struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - ClientUrls []string `protobuf:"bytes,2,rep,name=client_urls,json=clientUrls,proto3" json:"client_urls,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Attributes) Reset() { *m = Attributes{} } -func (m *Attributes) String() string { return proto.CompactTextString(m) } -func (*Attributes) ProtoMessage() {} -func (*Attributes) Descriptor() ([]byte, []int) { - return fileDescriptor_949fe0d019050ef5, []int{1} -} -func (m *Attributes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Attributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Attributes.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Attributes) XXX_Merge(src proto.Message) { - xxx_messageInfo_Attributes.Merge(m, src) -} -func (m *Attributes) XXX_Size() int { - return m.Size() -} -func (m *Attributes) XXX_DiscardUnknown() { - xxx_messageInfo_Attributes.DiscardUnknown(m) -} - -var xxx_messageInfo_Attributes proto.InternalMessageInfo - -type Member struct { - ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - RaftAttributes *RaftAttributes `protobuf:"bytes,2,opt,name=raft_attributes,json=raftAttributes,proto3" json:"raft_attributes,omitempty"` - MemberAttributes *Attributes `protobuf:"bytes,3,opt,name=member_attributes,json=memberAttributes,proto3" json:"member_attributes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Member) Reset() { *m = Member{} } -func (m *Member) String() string { return proto.CompactTextString(m) } -func (*Member) ProtoMessage() {} -func (*Member) Descriptor() ([]byte, []int) { - return fileDescriptor_949fe0d019050ef5, []int{2} -} -func (m *Member) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Member.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Member) XXX_Merge(src proto.Message) { - xxx_messageInfo_Member.Merge(m, src) -} -func (m *Member) XXX_Size() int { - return m.Size() -} -func (m *Member) XXX_DiscardUnknown() { - xxx_messageInfo_Member.DiscardUnknown(m) -} - -var xxx_messageInfo_Member proto.InternalMessageInfo - -type ClusterVersionSetRequest struct { - Ver string `protobuf:"bytes,1,opt,name=ver,proto3" json:"ver,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterVersionSetRequest) Reset() { *m = ClusterVersionSetRequest{} } -func (m *ClusterVersionSetRequest) String() string { return proto.CompactTextString(m) } -func (*ClusterVersionSetRequest) ProtoMessage() {} -func (*ClusterVersionSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_949fe0d019050ef5, []int{3} -} -func (m *ClusterVersionSetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterVersionSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClusterVersionSetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ClusterVersionSetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterVersionSetRequest.Merge(m, src) -} -func (m *ClusterVersionSetRequest) XXX_Size() int { - return m.Size() -} -func (m *ClusterVersionSetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterVersionSetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterVersionSetRequest proto.InternalMessageInfo - -type ClusterMemberAttrSetRequest struct { - Member_ID uint64 `protobuf:"varint,1,opt,name=member_ID,json=memberID,proto3" json:"member_ID,omitempty"` - MemberAttributes *Attributes `protobuf:"bytes,2,opt,name=member_attributes,json=memberAttributes,proto3" json:"member_attributes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterMemberAttrSetRequest) Reset() { *m = ClusterMemberAttrSetRequest{} } -func (m *ClusterMemberAttrSetRequest) String() string { return proto.CompactTextString(m) } -func (*ClusterMemberAttrSetRequest) ProtoMessage() {} -func (*ClusterMemberAttrSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_949fe0d019050ef5, []int{4} -} -func (m *ClusterMemberAttrSetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterMemberAttrSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClusterMemberAttrSetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ClusterMemberAttrSetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterMemberAttrSetRequest.Merge(m, src) -} -func (m *ClusterMemberAttrSetRequest) XXX_Size() int { - return m.Size() -} -func (m *ClusterMemberAttrSetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterMemberAttrSetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterMemberAttrSetRequest proto.InternalMessageInfo - -type DowngradeInfoSetRequest struct { - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - Ver string `protobuf:"bytes,2,opt,name=ver,proto3" json:"ver,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DowngradeInfoSetRequest) Reset() { *m = DowngradeInfoSetRequest{} } -func (m *DowngradeInfoSetRequest) String() string { return proto.CompactTextString(m) } -func (*DowngradeInfoSetRequest) ProtoMessage() {} -func (*DowngradeInfoSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_949fe0d019050ef5, []int{5} -} -func (m *DowngradeInfoSetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DowngradeInfoSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DowngradeInfoSetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DowngradeInfoSetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DowngradeInfoSetRequest.Merge(m, src) -} -func (m *DowngradeInfoSetRequest) XXX_Size() int { - return m.Size() -} -func (m *DowngradeInfoSetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DowngradeInfoSetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DowngradeInfoSetRequest proto.InternalMessageInfo - -func init() { - proto.RegisterType((*RaftAttributes)(nil), "membershippb.RaftAttributes") - proto.RegisterType((*Attributes)(nil), "membershippb.Attributes") - proto.RegisterType((*Member)(nil), "membershippb.Member") - proto.RegisterType((*ClusterVersionSetRequest)(nil), "membershippb.ClusterVersionSetRequest") - proto.RegisterType((*ClusterMemberAttrSetRequest)(nil), "membershippb.ClusterMemberAttrSetRequest") - proto.RegisterType((*DowngradeInfoSetRequest)(nil), "membershippb.DowngradeInfoSetRequest") -} - -func init() { proto.RegisterFile("membership.proto", fileDescriptor_949fe0d019050ef5) } - -var fileDescriptor_949fe0d019050ef5 = []byte{ - // 367 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x4e, 0xf2, 0x40, - 0x14, 0x85, 0x99, 0x42, 0xf8, 0xdb, 0xcb, 0x1f, 0xc4, 0x09, 0x89, 0x8d, 0x68, 0x25, 0x5d, 0xb1, - 0x30, 0x98, 0xe8, 0x13, 0xa0, 0xb0, 0x20, 0x81, 0xcd, 0x18, 0xdd, 0x92, 0x56, 0x2e, 0xd8, 0xa4, - 0x74, 0xea, 0xcc, 0x54, 0xd7, 0xbe, 0x85, 0x4f, 0xe0, 0xb3, 0xb0, 0xf4, 0x11, 0x14, 0x5f, 0xc4, - 0x74, 0x5a, 0x4a, 0x49, 0xdc, 0xb8, 0xbb, 0x3d, 0xbd, 0xf7, 0x9c, 0xf3, 0x35, 0x85, 0xd6, 0x0a, - 0x57, 0x3e, 0x0a, 0xf9, 0x18, 0xc4, 0xfd, 0x58, 0x70, 0xc5, 0xe9, 0xff, 0x9d, 0x12, 0xfb, 0xc7, - 0xed, 0x25, 0x5f, 0x72, 0xfd, 0xe2, 0x22, 0x9d, 0xb2, 0x1d, 0x77, 0x02, 0x4d, 0xe6, 0x2d, 0xd4, - 0x40, 0x29, 0x11, 0xf8, 0x89, 0x42, 0x49, 0x3b, 0x60, 0xc5, 0x88, 0x62, 0x96, 0x88, 0x50, 0xda, - 0xa4, 0x5b, 0xed, 0x59, 0xcc, 0x4c, 0x85, 0x3b, 0x11, 0x4a, 0x7a, 0x0a, 0x10, 0xc8, 0x59, 0x88, - 0x9e, 0x88, 0x50, 0xd8, 0x46, 0x97, 0xf4, 0x4c, 0x66, 0x05, 0x72, 0x92, 0x09, 0xee, 0x00, 0xa0, - 0xe4, 0x44, 0xa1, 0x16, 0x79, 0x2b, 0xb4, 0x49, 0x97, 0xf4, 0x2c, 0xa6, 0x67, 0x7a, 0x06, 0x8d, - 0x87, 0x30, 0xc0, 0x48, 0x65, 0xfe, 0x86, 0xf6, 0x87, 0x4c, 0x4a, 0x13, 0xdc, 0x77, 0x02, 0xf5, - 0xa9, 0xee, 0x4d, 0x9b, 0x60, 0x8c, 0x87, 0xfa, 0xba, 0xc6, 0x8c, 0xf1, 0x90, 0x8e, 0xe0, 0x40, - 0x78, 0x0b, 0x35, 0xf3, 0x8a, 0x08, 0xdd, 0xa0, 0x71, 0x79, 0xd2, 0x2f, 0x93, 0xf6, 0xf7, 0x81, - 0x58, 0x53, 0xec, 0x03, 0x8e, 0xe0, 0x30, 0x5b, 0x2f, 0x1b, 0x55, 0xb5, 0x91, 0xbd, 0x6f, 0x54, - 0x32, 0xc9, 0xbf, 0xee, 0x4e, 0x71, 0xcf, 0xc1, 0xbe, 0x09, 0x13, 0xa9, 0x50, 0xdc, 0xa3, 0x90, - 0x01, 0x8f, 0x6e, 0x51, 0x31, 0x7c, 0x4a, 0x50, 0x2a, 0xda, 0x82, 0xea, 0x33, 0x8a, 0x1c, 0x3c, - 0x1d, 0xdd, 0x57, 0x02, 0x9d, 0x7c, 0x7d, 0x5a, 0x38, 0x95, 0x2e, 0x3a, 0x60, 0xe5, 0xa5, 0x0a, - 0x64, 0x33, 0x13, 0x34, 0xf8, 0x2f, 0x8d, 0x8d, 0x3f, 0x37, 0x1e, 0xc1, 0xd1, 0x90, 0xbf, 0x44, - 0x4b, 0xe1, 0xcd, 0x71, 0x1c, 0x2d, 0x78, 0x29, 0xde, 0x86, 0x7f, 0x18, 0x79, 0x7e, 0x88, 0x73, - 0x1d, 0x6e, 0xb2, 0xed, 0xe3, 0x16, 0xc5, 0x28, 0x50, 0xae, 0xdb, 0xeb, 0x2f, 0xa7, 0xb2, 0xde, - 0x38, 0xe4, 0x63, 0xe3, 0x90, 0xcf, 0x8d, 0x43, 0xde, 0xbe, 0x9d, 0x8a, 0x5f, 0xd7, 0xff, 0xd3, - 0xd5, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x93, 0x7d, 0x0b, 0x87, 0x02, 0x00, 0x00, -} - -func (m *RaftAttributes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RaftAttributes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RaftAttributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IsLearner { - i-- - if m.IsLearner { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.PeerUrls) > 0 { - for iNdEx := len(m.PeerUrls) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PeerUrls[iNdEx]) - copy(dAtA[i:], m.PeerUrls[iNdEx]) - i = encodeVarintMembership(dAtA, i, uint64(len(m.PeerUrls[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Attributes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Attributes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Attributes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ClientUrls) > 0 { - for iNdEx := len(m.ClientUrls) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ClientUrls[iNdEx]) - copy(dAtA[i:], m.ClientUrls[iNdEx]) - i = encodeVarintMembership(dAtA, i, uint64(len(m.ClientUrls[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintMembership(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Member) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Member) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.MemberAttributes != nil { - { - size, err := m.MemberAttributes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMembership(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.RaftAttributes != nil { - { - size, err := m.RaftAttributes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMembership(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ID != 0 { - i = encodeVarintMembership(dAtA, i, uint64(m.ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ClusterVersionSetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterVersionSetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterVersionSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Ver) > 0 { - i -= len(m.Ver) - copy(dAtA[i:], m.Ver) - i = encodeVarintMembership(dAtA, i, uint64(len(m.Ver))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ClusterMemberAttrSetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterMemberAttrSetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterMemberAttrSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.MemberAttributes != nil { - { - size, err := m.MemberAttributes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMembership(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Member_ID != 0 { - i = encodeVarintMembership(dAtA, i, uint64(m.Member_ID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *DowngradeInfoSetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DowngradeInfoSetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DowngradeInfoSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Ver) > 0 { - i -= len(m.Ver) - copy(dAtA[i:], m.Ver) - i = encodeVarintMembership(dAtA, i, uint64(len(m.Ver))) - i-- - dAtA[i] = 0x12 - } - if m.Enabled { - i-- - if m.Enabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintMembership(dAtA []byte, offset int, v uint64) int { - offset -= sovMembership(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *RaftAttributes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.PeerUrls) > 0 { - for _, s := range m.PeerUrls { - l = len(s) - n += 1 + l + sovMembership(uint64(l)) - } - } - if m.IsLearner { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Attributes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMembership(uint64(l)) - } - if len(m.ClientUrls) > 0 { - for _, s := range m.ClientUrls { - l = len(s) - n += 1 + l + sovMembership(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Member) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ID != 0 { - n += 1 + sovMembership(uint64(m.ID)) - } - if m.RaftAttributes != nil { - l = m.RaftAttributes.Size() - n += 1 + l + sovMembership(uint64(l)) - } - if m.MemberAttributes != nil { - l = m.MemberAttributes.Size() - n += 1 + l + sovMembership(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ClusterVersionSetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Ver) - if l > 0 { - n += 1 + l + sovMembership(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ClusterMemberAttrSetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Member_ID != 0 { - n += 1 + sovMembership(uint64(m.Member_ID)) - } - if m.MemberAttributes != nil { - l = m.MemberAttributes.Size() - n += 1 + l + sovMembership(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DowngradeInfoSetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Enabled { - n += 2 - } - l = len(m.Ver) - if l > 0 { - n += 1 + l + sovMembership(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMembership(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMembership(x uint64) (n int) { - return sovMembership(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *RaftAttributes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RaftAttributes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RaftAttributes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerUrls", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMembership - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMembership - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PeerUrls = append(m.PeerUrls, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsLearner", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsLearner = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipMembership(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMembership - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Attributes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Attributes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Attributes: 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 ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMembership - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMembership - } - 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 ClientUrls", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMembership - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMembership - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientUrls = append(m.ClientUrls, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMembership(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMembership - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Member) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Member: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Member: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RaftAttributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMembership - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMembership - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RaftAttributes == nil { - m.RaftAttributes = &RaftAttributes{} - } - if err := m.RaftAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MemberAttributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMembership - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMembership - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MemberAttributes == nil { - m.MemberAttributes = &Attributes{} - } - if err := m.MemberAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMembership(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMembership - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterVersionSetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterVersionSetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterVersionSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMembership - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMembership - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMembership(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMembership - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterMemberAttrSetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterMemberAttrSetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterMemberAttrSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Member_ID", wireType) - } - m.Member_ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Member_ID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MemberAttributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMembership - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMembership - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MemberAttributes == nil { - m.MemberAttributes = &Attributes{} - } - if err := m.MemberAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMembership(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMembership - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DowngradeInfoSetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DowngradeInfoSetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DowngradeInfoSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Enabled = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMembership - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMembership - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMembership - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMembership(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMembership - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMembership(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMembership - } - 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, ErrIntOverflowMembership - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMembership - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMembership - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMembership - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMembership - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMembership = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMembership = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMembership = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.proto b/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.proto deleted file mode 100644 index e63e9ecc994..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/membershippb/membership.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; -package membershippb; - -import "gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.goproto_getters_all) = false; - -// RaftAttributes represents the raft related attributes of an etcd member. -message RaftAttributes { - // peerURLs is the list of peers in the raft cluster. - repeated string peer_urls = 1; - // isLearner indicates if the member is raft learner. - bool is_learner = 2; -} - -// Attributes represents all the non-raft related attributes of an etcd member. -message Attributes { - string name = 1; - repeated string client_urls = 2; -} - -message Member { - uint64 ID = 1; - RaftAttributes raft_attributes = 2; - Attributes member_attributes = 3; -} - -message ClusterVersionSetRequest { - string ver = 1; -} - -message ClusterMemberAttrSetRequest { - uint64 member_ID = 1; - Attributes member_attributes = 2; -} - -message DowngradeInfoSetRequest { - bool enabled = 1; - string ver = 2; -} \ No newline at end of file diff --git a/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.pb.go b/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.pb.go deleted file mode 100644 index fc258d6c206..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.pb.go +++ /dev/null @@ -1,798 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: kv.proto - -package mvccpb - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" -) - -// 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.ProtoPackageIsVersion3 // please upgrade the proto package - -type Event_EventType int32 - -const ( - PUT Event_EventType = 0 - DELETE Event_EventType = 1 -) - -var Event_EventType_name = map[int32]string{ - 0: "PUT", - 1: "DELETE", -} - -var Event_EventType_value = map[string]int32{ - "PUT": 0, - "DELETE": 1, -} - -func (x Event_EventType) String() string { - return proto.EnumName(Event_EventType_name, int32(x)) -} - -func (Event_EventType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2216fe83c9c12408, []int{1, 0} -} - -type KeyValue struct { - // key is the key in bytes. An empty key is not allowed. - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // create_revision is the revision of last creation on this key. - CreateRevision int64 `protobuf:"varint,2,opt,name=create_revision,json=createRevision,proto3" json:"create_revision,omitempty"` - // mod_revision is the revision of last modification on this key. - ModRevision int64 `protobuf:"varint,3,opt,name=mod_revision,json=modRevision,proto3" json:"mod_revision,omitempty"` - // version is the version of the key. A deletion resets - // the version to zero and any modification of the key - // increases its version. - Version int64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` - // value is the value held by the key, in bytes. - Value []byte `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` - // lease is the ID of the lease that attached to key. - // When the attached lease expires, the key will be deleted. - // If lease is 0, then no lease is attached to the key. - Lease int64 `protobuf:"varint,6,opt,name=lease,proto3" json:"lease,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *KeyValue) Reset() { *m = KeyValue{} } -func (m *KeyValue) String() string { return proto.CompactTextString(m) } -func (*KeyValue) ProtoMessage() {} -func (*KeyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_2216fe83c9c12408, []int{0} -} -func (m *KeyValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KeyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyValue.Merge(m, src) -} -func (m *KeyValue) XXX_Size() int { - return m.Size() -} -func (m *KeyValue) XXX_DiscardUnknown() { - xxx_messageInfo_KeyValue.DiscardUnknown(m) -} - -var xxx_messageInfo_KeyValue proto.InternalMessageInfo - -type Event struct { - // type is the kind of event. If type is a PUT, it indicates - // new data has been stored to the key. If type is a DELETE, - // it indicates the key was deleted. - Type Event_EventType `protobuf:"varint,1,opt,name=type,proto3,enum=mvccpb.Event_EventType" json:"type,omitempty"` - // kv holds the KeyValue for the event. - // A PUT event contains current kv pair. - // A PUT event with kv.Version=1 indicates the creation of a key. - // A DELETE/EXPIRE event contains the deleted key with - // its modification revision set to the revision of deletion. - Kv *KeyValue `protobuf:"bytes,2,opt,name=kv,proto3" json:"kv,omitempty"` - // prev_kv holds the key-value pair before the event happens. - PrevKv *KeyValue `protobuf:"bytes,3,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Event) Reset() { *m = Event{} } -func (m *Event) String() string { return proto.CompactTextString(m) } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_2216fe83c9c12408, []int{1} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Event.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func init() { - proto.RegisterEnum("mvccpb.Event_EventType", Event_EventType_name, Event_EventType_value) - proto.RegisterType((*KeyValue)(nil), "mvccpb.KeyValue") - proto.RegisterType((*Event)(nil), "mvccpb.Event") -} - -func init() { proto.RegisterFile("kv.proto", fileDescriptor_2216fe83c9c12408) } - -var fileDescriptor_2216fe83c9c12408 = []byte{ - // 303 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x41, 0x4e, 0xc2, 0x40, - 0x14, 0x86, 0x3b, 0x14, 0x0a, 0x3e, 0x08, 0x36, 0x13, 0x12, 0x27, 0x2e, 0x26, 0x95, 0x8d, 0x18, - 0x13, 0x4c, 0xf0, 0x06, 0xc6, 0xae, 0x70, 0x61, 0x1a, 0x74, 0x4b, 0x4a, 0x79, 0x21, 0xa4, 0x94, - 0x69, 0x4a, 0x9d, 0xa4, 0x37, 0x71, 0xef, 0xde, 0x73, 0xb0, 0xe4, 0x08, 0x52, 0x2f, 0x62, 0xfa, - 0xc6, 0xe2, 0xc6, 0xcd, 0xe4, 0xfd, 0xff, 0xff, 0x65, 0xe6, 0x7f, 0x03, 0x9d, 0x58, 0x8f, 0xd3, - 0x4c, 0xe5, 0x8a, 0x3b, 0x89, 0x8e, 0xa2, 0x74, 0x71, 0x39, 0x58, 0xa9, 0x95, 0x22, 0xeb, 0xae, - 0x9a, 0x4c, 0x3a, 0xfc, 0x64, 0xd0, 0x99, 0x62, 0xf1, 0x1a, 0x6e, 0xde, 0x90, 0xbb, 0x60, 0xc7, - 0x58, 0x08, 0xe6, 0xb1, 0x51, 0x2f, 0xa8, 0x46, 0x7e, 0x0d, 0xe7, 0x51, 0x86, 0x61, 0x8e, 0xf3, - 0x0c, 0xf5, 0x7a, 0xb7, 0x56, 0x5b, 0xd1, 0xf0, 0xd8, 0xc8, 0x0e, 0xfa, 0xc6, 0x0e, 0x7e, 0x5d, - 0x7e, 0x05, 0xbd, 0x44, 0x2d, 0xff, 0x28, 0x9b, 0xa8, 0x6e, 0xa2, 0x96, 0x27, 0x44, 0x40, 0x5b, - 0x63, 0x46, 0x69, 0x93, 0xd2, 0x5a, 0xf2, 0x01, 0xb4, 0x74, 0x55, 0x40, 0xb4, 0xe8, 0x65, 0x23, - 0x2a, 0x77, 0x83, 0xe1, 0x0e, 0x85, 0x43, 0xb4, 0x11, 0xc3, 0x0f, 0x06, 0x2d, 0x5f, 0xe3, 0x36, - 0xe7, 0xb7, 0xd0, 0xcc, 0x8b, 0x14, 0xa9, 0x6e, 0x7f, 0x72, 0x31, 0x36, 0x7b, 0x8e, 0x29, 0x34, - 0xe7, 0xac, 0x48, 0x31, 0x20, 0x88, 0x7b, 0xd0, 0x88, 0x35, 0x75, 0xef, 0x4e, 0xdc, 0x1a, 0xad, - 0x17, 0x0f, 0x1a, 0xb1, 0xe6, 0x37, 0xd0, 0x4e, 0x33, 0xd4, 0xf3, 0x58, 0x53, 0xf9, 0xff, 0x30, - 0xa7, 0x02, 0xa6, 0x7a, 0xe8, 0xc1, 0xd9, 0xe9, 0x7e, 0xde, 0x06, 0xfb, 0xf9, 0x65, 0xe6, 0x5a, - 0x1c, 0xc0, 0x79, 0xf4, 0x9f, 0xfc, 0x99, 0xef, 0xb2, 0x07, 0xb1, 0x3f, 0x4a, 0xeb, 0x70, 0x94, - 0xd6, 0xbe, 0x94, 0xec, 0x50, 0x4a, 0xf6, 0x55, 0x4a, 0xf6, 0xfe, 0x2d, 0xad, 0x85, 0x43, 0xff, - 0x7e, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x45, 0x92, 0x5d, 0xa1, 0x01, 0x00, 0x00, -} - -func (m *KeyValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Lease != 0 { - i = encodeVarintKv(dAtA, i, uint64(m.Lease)) - i-- - dAtA[i] = 0x30 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintKv(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x2a - } - if m.Version != 0 { - i = encodeVarintKv(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x20 - } - if m.ModRevision != 0 { - i = encodeVarintKv(dAtA, i, uint64(m.ModRevision)) - i-- - dAtA[i] = 0x18 - } - if m.CreateRevision != 0 { - i = encodeVarintKv(dAtA, i, uint64(m.CreateRevision)) - i-- - dAtA[i] = 0x10 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintKv(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Event) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.PrevKv != nil { - { - size, err := m.PrevKv.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintKv(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Kv != nil { - { - size, err := m.Kv.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintKv(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = encodeVarintKv(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintKv(dAtA []byte, offset int, v uint64) int { - offset -= sovKv(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *KeyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovKv(uint64(l)) - } - if m.CreateRevision != 0 { - n += 1 + sovKv(uint64(m.CreateRevision)) - } - if m.ModRevision != 0 { - n += 1 + sovKv(uint64(m.ModRevision)) - } - if m.Version != 0 { - n += 1 + sovKv(uint64(m.Version)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovKv(uint64(l)) - } - if m.Lease != 0 { - n += 1 + sovKv(uint64(m.Lease)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovKv(uint64(m.Type)) - } - if m.Kv != nil { - l = m.Kv.Size() - n += 1 + l + sovKv(uint64(l)) - } - if m.PrevKv != nil { - l = m.PrevKv.Size() - n += 1 + l + sovKv(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovKv(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozKv(x uint64) (n int) { - return sovKv(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *KeyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKv - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKv - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreateRevision", wireType) - } - m.CreateRevision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CreateRevision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ModRevision", wireType) - } - m.ModRevision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ModRevision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKv - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKv - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) - } - m.Lease = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Lease |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipKv(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKv - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -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 ErrIntOverflowKv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= Event_EventType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kv", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthKv - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthKv - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Kv == nil { - m.Kv = &KeyValue{} - } - if err := m.Kv.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevKv", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthKv - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthKv - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PrevKv == nil { - m.PrevKv = &KeyValue{} - } - if err := m.PrevKv.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKv(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKv - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipKv(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKv - } - 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, ErrIntOverflowKv - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKv - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthKv - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupKv - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthKv - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthKv = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowKv = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupKv = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.proto b/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.proto deleted file mode 100644 index 23c911b7da8..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/mvccpb/kv.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; -package mvccpb; - -import "gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.goproto_getters_all) = false; -option (gogoproto.goproto_enum_prefix_all) = false; - -message KeyValue { - // key is the key in bytes. An empty key is not allowed. - bytes key = 1; - // create_revision is the revision of last creation on this key. - int64 create_revision = 2; - // mod_revision is the revision of last modification on this key. - int64 mod_revision = 3; - // version is the version of the key. A deletion resets - // the version to zero and any modification of the key - // increases its version. - int64 version = 4; - // value is the value held by the key, in bytes. - bytes value = 5; - // lease is the ID of the lease that attached to key. - // When the attached lease expires, the key will be deleted. - // If lease is 0, then no lease is attached to the key. - int64 lease = 6; -} - -message Event { - enum EventType { - PUT = 0; - DELETE = 1; - } - // type is the kind of event. If type is a PUT, it indicates - // new data has been stored to the key. If type is a DELETE, - // it indicates the key was deleted. - EventType type = 1; - // kv holds the KeyValue for the event. - // A PUT event contains current kv pair. - // A PUT event with kv.Version=1 indicates the creation of a key. - // A DELETE/EXPIRE event contains the deleted key with - // its modification revision set to the revision of deletion. - KeyValue kv = 2; - - // prev_kv holds the key-value pair before the event happens. - KeyValue prev_kv = 3; -} diff --git a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/doc.go b/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/doc.go deleted file mode 100644 index f72c6a644f3..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package rpctypes has types and values shared by the etcd server and client for v3 RPC interaction. -package rpctypes diff --git a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/error.go b/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/error.go deleted file mode 100644 index 23201302e83..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/error.go +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package rpctypes - -import ( - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -// server-side error -var ( - ErrGRPCEmptyKey = status.New(codes.InvalidArgument, "etcdserver: key is not provided").Err() - ErrGRPCKeyNotFound = status.New(codes.InvalidArgument, "etcdserver: key not found").Err() - ErrGRPCValueProvided = status.New(codes.InvalidArgument, "etcdserver: value is provided").Err() - ErrGRPCLeaseProvided = status.New(codes.InvalidArgument, "etcdserver: lease is provided").Err() - ErrGRPCTooManyOps = status.New(codes.InvalidArgument, "etcdserver: too many operations in txn request").Err() - ErrGRPCDuplicateKey = status.New(codes.InvalidArgument, "etcdserver: duplicate key given in txn request").Err() - ErrGRPCCompacted = status.New(codes.OutOfRange, "etcdserver: mvcc: required revision has been compacted").Err() - ErrGRPCFutureRev = status.New(codes.OutOfRange, "etcdserver: mvcc: required revision is a future revision").Err() - ErrGRPCNoSpace = status.New(codes.ResourceExhausted, "etcdserver: mvcc: database space exceeded").Err() - - ErrGRPCLeaseNotFound = status.New(codes.NotFound, "etcdserver: requested lease not found").Err() - ErrGRPCLeaseExist = status.New(codes.FailedPrecondition, "etcdserver: lease already exists").Err() - ErrGRPCLeaseTTLTooLarge = status.New(codes.OutOfRange, "etcdserver: too large lease TTL").Err() - - ErrGRPCWatchCanceled = status.New(codes.Canceled, "etcdserver: watch canceled").Err() - - ErrGRPCMemberExist = status.New(codes.FailedPrecondition, "etcdserver: member ID already exist").Err() - ErrGRPCPeerURLExist = status.New(codes.FailedPrecondition, "etcdserver: Peer URLs already exists").Err() - ErrGRPCMemberNotEnoughStarted = status.New(codes.FailedPrecondition, "etcdserver: re-configuration failed due to not enough started members").Err() - ErrGRPCMemberBadURLs = status.New(codes.InvalidArgument, "etcdserver: given member URLs are invalid").Err() - ErrGRPCMemberNotFound = status.New(codes.NotFound, "etcdserver: member not found").Err() - ErrGRPCMemberNotLearner = status.New(codes.FailedPrecondition, "etcdserver: can only promote a learner member").Err() - ErrGRPCLearnerNotReady = status.New(codes.FailedPrecondition, "etcdserver: can only promote a learner member which is in sync with leader").Err() - ErrGRPCTooManyLearners = status.New(codes.FailedPrecondition, "etcdserver: too many learner members in cluster").Err() - ErrGRPCClusterIdMismatch = status.New(codes.FailedPrecondition, "etcdserver: cluster ID mismatch").Err() - - ErrGRPCRequestTooLarge = status.New(codes.InvalidArgument, "etcdserver: request is too large").Err() - ErrGRPCRequestTooManyRequests = status.New(codes.ResourceExhausted, "etcdserver: too many requests").Err() - - ErrGRPCRootUserNotExist = status.New(codes.FailedPrecondition, "etcdserver: root user does not exist").Err() - ErrGRPCRootRoleNotExist = status.New(codes.FailedPrecondition, "etcdserver: root user does not have root role").Err() - ErrGRPCUserAlreadyExist = status.New(codes.FailedPrecondition, "etcdserver: user name already exists").Err() - ErrGRPCUserEmpty = status.New(codes.InvalidArgument, "etcdserver: user name is empty").Err() - ErrGRPCUserNotFound = status.New(codes.FailedPrecondition, "etcdserver: user name not found").Err() - ErrGRPCRoleAlreadyExist = status.New(codes.FailedPrecondition, "etcdserver: role name already exists").Err() - ErrGRPCRoleNotFound = status.New(codes.FailedPrecondition, "etcdserver: role name not found").Err() - ErrGRPCRoleEmpty = status.New(codes.InvalidArgument, "etcdserver: role name is empty").Err() - ErrGRPCAuthFailed = status.New(codes.InvalidArgument, "etcdserver: authentication failed, invalid user ID or password").Err() - ErrGRPCPermissionNotGiven = status.New(codes.InvalidArgument, "etcdserver: permission not given").Err() - ErrGRPCPermissionDenied = status.New(codes.PermissionDenied, "etcdserver: permission denied").Err() - ErrGRPCRoleNotGranted = status.New(codes.FailedPrecondition, "etcdserver: role is not granted to the user").Err() - ErrGRPCPermissionNotGranted = status.New(codes.FailedPrecondition, "etcdserver: permission is not granted to the role").Err() - ErrGRPCAuthNotEnabled = status.New(codes.FailedPrecondition, "etcdserver: authentication is not enabled").Err() - ErrGRPCInvalidAuthToken = status.New(codes.Unauthenticated, "etcdserver: invalid auth token").Err() - ErrGRPCInvalidAuthMgmt = status.New(codes.InvalidArgument, "etcdserver: invalid auth management").Err() - ErrGRPCAuthOldRevision = status.New(codes.InvalidArgument, "etcdserver: revision of auth store is old").Err() - - ErrGRPCNoLeader = status.New(codes.Unavailable, "etcdserver: no leader").Err() - ErrGRPCNotLeader = status.New(codes.FailedPrecondition, "etcdserver: not leader").Err() - ErrGRPCLeaderChanged = status.New(codes.Unavailable, "etcdserver: leader changed").Err() - ErrGRPCNotCapable = status.New(codes.Unavailable, "etcdserver: not capable").Err() - ErrGRPCStopped = status.New(codes.Unavailable, "etcdserver: server stopped").Err() - ErrGRPCTimeout = status.New(codes.Unavailable, "etcdserver: request timed out").Err() - ErrGRPCTimeoutDueToLeaderFail = status.New(codes.Unavailable, "etcdserver: request timed out, possibly due to previous leader failure").Err() - ErrGRPCTimeoutDueToConnectionLost = status.New(codes.Unavailable, "etcdserver: request timed out, possibly due to connection lost").Err() - ErrGRPCTimeoutWaitAppliedIndex = status.New(codes.Unavailable, "etcdserver: request timed out, waiting for the applied index took too long").Err() - ErrGRPCUnhealthy = status.New(codes.Unavailable, "etcdserver: unhealthy cluster").Err() - ErrGRPCCorrupt = status.New(codes.DataLoss, "etcdserver: corrupt cluster").Err() - ErrGPRCNotSupportedForLearner = status.New(codes.Unavailable, "etcdserver: rpc not supported for learner").Err() - ErrGRPCBadLeaderTransferee = status.New(codes.FailedPrecondition, "etcdserver: bad leader transferee").Err() - - ErrGRPCClusterVersionUnavailable = status.New(codes.Unavailable, "etcdserver: cluster version not found during downgrade").Err() - ErrGRPCWrongDowngradeVersionFormat = status.New(codes.InvalidArgument, "etcdserver: wrong downgrade target version format").Err() - ErrGRPCInvalidDowngradeTargetVersion = status.New(codes.InvalidArgument, "etcdserver: invalid downgrade target version").Err() - ErrGRPCDowngradeInProcess = status.New(codes.FailedPrecondition, "etcdserver: cluster has a downgrade job in progress").Err() - ErrGRPCNoInflightDowngrade = status.New(codes.FailedPrecondition, "etcdserver: no inflight downgrade job").Err() - - ErrGRPCCanceled = status.New(codes.Canceled, "etcdserver: request canceled").Err() - ErrGRPCDeadlineExceeded = status.New(codes.DeadlineExceeded, "etcdserver: context deadline exceeded").Err() - - errStringToError = map[string]error{ - ErrorDesc(ErrGRPCEmptyKey): ErrGRPCEmptyKey, - ErrorDesc(ErrGRPCKeyNotFound): ErrGRPCKeyNotFound, - ErrorDesc(ErrGRPCValueProvided): ErrGRPCValueProvided, - ErrorDesc(ErrGRPCLeaseProvided): ErrGRPCLeaseProvided, - - ErrorDesc(ErrGRPCTooManyOps): ErrGRPCTooManyOps, - ErrorDesc(ErrGRPCDuplicateKey): ErrGRPCDuplicateKey, - ErrorDesc(ErrGRPCCompacted): ErrGRPCCompacted, - ErrorDesc(ErrGRPCFutureRev): ErrGRPCFutureRev, - ErrorDesc(ErrGRPCNoSpace): ErrGRPCNoSpace, - - ErrorDesc(ErrGRPCLeaseNotFound): ErrGRPCLeaseNotFound, - ErrorDesc(ErrGRPCLeaseExist): ErrGRPCLeaseExist, - ErrorDesc(ErrGRPCLeaseTTLTooLarge): ErrGRPCLeaseTTLTooLarge, - - ErrorDesc(ErrGRPCMemberExist): ErrGRPCMemberExist, - ErrorDesc(ErrGRPCPeerURLExist): ErrGRPCPeerURLExist, - ErrorDesc(ErrGRPCMemberNotEnoughStarted): ErrGRPCMemberNotEnoughStarted, - ErrorDesc(ErrGRPCMemberBadURLs): ErrGRPCMemberBadURLs, - ErrorDesc(ErrGRPCMemberNotFound): ErrGRPCMemberNotFound, - ErrorDesc(ErrGRPCMemberNotLearner): ErrGRPCMemberNotLearner, - ErrorDesc(ErrGRPCLearnerNotReady): ErrGRPCLearnerNotReady, - ErrorDesc(ErrGRPCTooManyLearners): ErrGRPCTooManyLearners, - ErrorDesc(ErrGRPCClusterIdMismatch): ErrGRPCClusterIdMismatch, - - ErrorDesc(ErrGRPCRequestTooLarge): ErrGRPCRequestTooLarge, - ErrorDesc(ErrGRPCRequestTooManyRequests): ErrGRPCRequestTooManyRequests, - - ErrorDesc(ErrGRPCRootUserNotExist): ErrGRPCRootUserNotExist, - ErrorDesc(ErrGRPCRootRoleNotExist): ErrGRPCRootRoleNotExist, - ErrorDesc(ErrGRPCUserAlreadyExist): ErrGRPCUserAlreadyExist, - ErrorDesc(ErrGRPCUserEmpty): ErrGRPCUserEmpty, - ErrorDesc(ErrGRPCUserNotFound): ErrGRPCUserNotFound, - ErrorDesc(ErrGRPCRoleAlreadyExist): ErrGRPCRoleAlreadyExist, - ErrorDesc(ErrGRPCRoleNotFound): ErrGRPCRoleNotFound, - ErrorDesc(ErrGRPCRoleEmpty): ErrGRPCRoleEmpty, - ErrorDesc(ErrGRPCAuthFailed): ErrGRPCAuthFailed, - ErrorDesc(ErrGRPCPermissionDenied): ErrGRPCPermissionDenied, - ErrorDesc(ErrGRPCRoleNotGranted): ErrGRPCRoleNotGranted, - ErrorDesc(ErrGRPCPermissionNotGranted): ErrGRPCPermissionNotGranted, - ErrorDesc(ErrGRPCAuthNotEnabled): ErrGRPCAuthNotEnabled, - ErrorDesc(ErrGRPCInvalidAuthToken): ErrGRPCInvalidAuthToken, - ErrorDesc(ErrGRPCInvalidAuthMgmt): ErrGRPCInvalidAuthMgmt, - ErrorDesc(ErrGRPCAuthOldRevision): ErrGRPCAuthOldRevision, - - ErrorDesc(ErrGRPCNoLeader): ErrGRPCNoLeader, - ErrorDesc(ErrGRPCNotLeader): ErrGRPCNotLeader, - ErrorDesc(ErrGRPCLeaderChanged): ErrGRPCLeaderChanged, - ErrorDesc(ErrGRPCNotCapable): ErrGRPCNotCapable, - ErrorDesc(ErrGRPCStopped): ErrGRPCStopped, - ErrorDesc(ErrGRPCTimeout): ErrGRPCTimeout, - ErrorDesc(ErrGRPCTimeoutDueToLeaderFail): ErrGRPCTimeoutDueToLeaderFail, - ErrorDesc(ErrGRPCTimeoutDueToConnectionLost): ErrGRPCTimeoutDueToConnectionLost, - ErrorDesc(ErrGRPCUnhealthy): ErrGRPCUnhealthy, - ErrorDesc(ErrGRPCCorrupt): ErrGRPCCorrupt, - ErrorDesc(ErrGPRCNotSupportedForLearner): ErrGPRCNotSupportedForLearner, - ErrorDesc(ErrGRPCBadLeaderTransferee): ErrGRPCBadLeaderTransferee, - - ErrorDesc(ErrGRPCClusterVersionUnavailable): ErrGRPCClusterVersionUnavailable, - ErrorDesc(ErrGRPCWrongDowngradeVersionFormat): ErrGRPCWrongDowngradeVersionFormat, - ErrorDesc(ErrGRPCInvalidDowngradeTargetVersion): ErrGRPCInvalidDowngradeTargetVersion, - ErrorDesc(ErrGRPCDowngradeInProcess): ErrGRPCDowngradeInProcess, - ErrorDesc(ErrGRPCNoInflightDowngrade): ErrGRPCNoInflightDowngrade, - } -) - -// client-side error -var ( - ErrEmptyKey = Error(ErrGRPCEmptyKey) - ErrKeyNotFound = Error(ErrGRPCKeyNotFound) - ErrValueProvided = Error(ErrGRPCValueProvided) - ErrLeaseProvided = Error(ErrGRPCLeaseProvided) - ErrTooManyOps = Error(ErrGRPCTooManyOps) - ErrDuplicateKey = Error(ErrGRPCDuplicateKey) - ErrCompacted = Error(ErrGRPCCompacted) - ErrFutureRev = Error(ErrGRPCFutureRev) - ErrNoSpace = Error(ErrGRPCNoSpace) - - ErrLeaseNotFound = Error(ErrGRPCLeaseNotFound) - ErrLeaseExist = Error(ErrGRPCLeaseExist) - ErrLeaseTTLTooLarge = Error(ErrGRPCLeaseTTLTooLarge) - - ErrMemberExist = Error(ErrGRPCMemberExist) - ErrPeerURLExist = Error(ErrGRPCPeerURLExist) - ErrMemberNotEnoughStarted = Error(ErrGRPCMemberNotEnoughStarted) - ErrMemberBadURLs = Error(ErrGRPCMemberBadURLs) - ErrMemberNotFound = Error(ErrGRPCMemberNotFound) - ErrMemberNotLearner = Error(ErrGRPCMemberNotLearner) - ErrMemberLearnerNotReady = Error(ErrGRPCLearnerNotReady) - ErrTooManyLearners = Error(ErrGRPCTooManyLearners) - - ErrRequestTooLarge = Error(ErrGRPCRequestTooLarge) - ErrTooManyRequests = Error(ErrGRPCRequestTooManyRequests) - - ErrRootUserNotExist = Error(ErrGRPCRootUserNotExist) - ErrRootRoleNotExist = Error(ErrGRPCRootRoleNotExist) - ErrUserAlreadyExist = Error(ErrGRPCUserAlreadyExist) - ErrUserEmpty = Error(ErrGRPCUserEmpty) - ErrUserNotFound = Error(ErrGRPCUserNotFound) - ErrRoleAlreadyExist = Error(ErrGRPCRoleAlreadyExist) - ErrRoleNotFound = Error(ErrGRPCRoleNotFound) - ErrRoleEmpty = Error(ErrGRPCRoleEmpty) - ErrAuthFailed = Error(ErrGRPCAuthFailed) - ErrPermissionDenied = Error(ErrGRPCPermissionDenied) - ErrRoleNotGranted = Error(ErrGRPCRoleNotGranted) - ErrPermissionNotGranted = Error(ErrGRPCPermissionNotGranted) - ErrAuthNotEnabled = Error(ErrGRPCAuthNotEnabled) - ErrInvalidAuthToken = Error(ErrGRPCInvalidAuthToken) - ErrAuthOldRevision = Error(ErrGRPCAuthOldRevision) - ErrInvalidAuthMgmt = Error(ErrGRPCInvalidAuthMgmt) - ErrClusterIdMismatch = Error(ErrGRPCClusterIdMismatch) - - ErrNoLeader = Error(ErrGRPCNoLeader) - ErrNotLeader = Error(ErrGRPCNotLeader) - ErrLeaderChanged = Error(ErrGRPCLeaderChanged) - ErrNotCapable = Error(ErrGRPCNotCapable) - ErrStopped = Error(ErrGRPCStopped) - ErrTimeout = Error(ErrGRPCTimeout) - ErrTimeoutDueToLeaderFail = Error(ErrGRPCTimeoutDueToLeaderFail) - ErrTimeoutDueToConnectionLost = Error(ErrGRPCTimeoutDueToConnectionLost) - ErrTimeoutWaitAppliedIndex = Error(ErrGRPCTimeoutWaitAppliedIndex) - ErrUnhealthy = Error(ErrGRPCUnhealthy) - ErrCorrupt = Error(ErrGRPCCorrupt) - ErrBadLeaderTransferee = Error(ErrGRPCBadLeaderTransferee) - - ErrClusterVersionUnavailable = Error(ErrGRPCClusterVersionUnavailable) - ErrWrongDowngradeVersionFormat = Error(ErrGRPCWrongDowngradeVersionFormat) - ErrInvalidDowngradeTargetVersion = Error(ErrGRPCInvalidDowngradeTargetVersion) - ErrDowngradeInProcess = Error(ErrGRPCDowngradeInProcess) - ErrNoInflightDowngrade = Error(ErrGRPCNoInflightDowngrade) -) - -// EtcdError defines gRPC server errors. -// (https://github.com/grpc/grpc-go/blob/master/rpc_util.go#L319-L323) -type EtcdError struct { - code codes.Code - desc string -} - -// Code returns grpc/codes.Code. -// TODO: define clientv3/codes.Code. -func (e EtcdError) Code() codes.Code { - return e.code -} - -func (e EtcdError) Error() string { - return e.desc -} - -func Error(err error) error { - if err == nil { - return nil - } - verr, ok := errStringToError[ErrorDesc(err)] - if !ok { // not gRPC error - return err - } - ev, ok := status.FromError(verr) - var desc string - if ok { - desc = ev.Message() - } else { - desc = verr.Error() - } - return EtcdError{code: ev.Code(), desc: desc} -} - -func ErrorDesc(err error) string { - if s, ok := status.FromError(err); ok { - return s.Message() - } - return err.Error() -} diff --git a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/md.go b/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/md.go deleted file mode 100644 index 90b8b835b16..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/md.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package rpctypes - -var ( - MetadataRequireLeaderKey = "hasleader" - MetadataHasLeader = "true" - - MetadataClientAPIVersionKey = "client-api-version" -) diff --git a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/metadatafields.go b/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/metadatafields.go deleted file mode 100644 index 8f8ac60ff22..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/v3rpc/rpctypes/metadatafields.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2018 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package rpctypes - -var ( - TokenFieldNameGRPC = "token" - TokenFieldNameSwagger = "authorization" -) diff --git a/vendor/go.etcd.io/etcd/api/v3/version/version.go b/vendor/go.etcd.io/etcd/api/v3/version/version.go deleted file mode 100644 index 4858a08bfe3..00000000000 --- a/vendor/go.etcd.io/etcd/api/v3/version/version.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package version implements etcd version parsing and contains latest version -// information. -package version - -import ( - "fmt" - "strings" - - "github.com/coreos/go-semver/semver" -) - -var ( - // MinClusterVersion is the min cluster version this etcd binary is compatible with. - MinClusterVersion = "3.0.0" - Version = "3.5.12" - APIVersion = "unknown" - - // Git SHA Value will be set during build - GitSHA = "Not provided (use ./build instead of go build)" -) - -func init() { - ver, err := semver.NewVersion(Version) - if err == nil { - APIVersion = fmt.Sprintf("%d.%d", ver.Major, ver.Minor) - } -} - -type Versions struct { - Server string `json:"etcdserver"` - Cluster string `json:"etcdcluster"` - // TODO: raft state machine version -} - -// Cluster only keeps the major.minor. -func Cluster(v string) string { - vs := strings.Split(v, ".") - if len(vs) <= 2 { - return v - } - return fmt.Sprintf("%s.%s", vs[0], vs[1]) -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/LICENSE b/vendor/go.etcd.io/etcd/client/pkg/v3/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/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/go.etcd.io/etcd/client/pkg/v3/logutil/doc.go b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/doc.go deleted file mode 100644 index e919f24993c..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2018 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package logutil includes utilities to facilitate logging. -package logutil diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/log_level.go b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/log_level.go deleted file mode 100644 index 6c95bcfe9f7..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/log_level.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2019 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package logutil - -import ( - "go.uber.org/zap/zapcore" -) - -var DefaultLogLevel = "info" - -// ConvertToZapLevel converts log level string to zapcore.Level. -func ConvertToZapLevel(lvl string) zapcore.Level { - var level zapcore.Level - if err := level.Set(lvl); err != nil { - panic(err) - } - return level -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go deleted file mode 100644 index 34f35b9f28f..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2019 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package logutil - -import ( - "sort" - "time" - - "go.uber.org/zap" - "go.uber.org/zap/zapcore" -) - -// CreateDefaultZapLogger creates a logger with default zap configuration -func CreateDefaultZapLogger(level zapcore.Level) (*zap.Logger, error) { - lcfg := DefaultZapLoggerConfig - lcfg.Level = zap.NewAtomicLevelAt(level) - c, err := lcfg.Build() - if err != nil { - return nil, err - } - return c, nil -} - -// DefaultZapLoggerConfig defines default zap logger configuration. -var DefaultZapLoggerConfig = zap.Config{ - Level: zap.NewAtomicLevelAt(ConvertToZapLevel(DefaultLogLevel)), - - Development: false, - Sampling: &zap.SamplingConfig{ - Initial: 100, - Thereafter: 100, - }, - - Encoding: "json", - - // copied from "zap.NewProductionEncoderConfig" with some updates - EncoderConfig: zapcore.EncoderConfig{ - TimeKey: "ts", - LevelKey: "level", - NameKey: "logger", - CallerKey: "caller", - MessageKey: "msg", - StacktraceKey: "stacktrace", - LineEnding: zapcore.DefaultLineEnding, - EncodeLevel: zapcore.LowercaseLevelEncoder, - - // Custom EncodeTime function to ensure we match format and precision of historic capnslog timestamps - EncodeTime: func(t time.Time, enc zapcore.PrimitiveArrayEncoder) { - enc.AppendString(t.Format("2006-01-02T15:04:05.999999Z0700")) - }, - - EncodeDuration: zapcore.StringDurationEncoder, - EncodeCaller: zapcore.ShortCallerEncoder, - }, - - // Use "/dev/null" to discard all - OutputPaths: []string{"stderr"}, - ErrorOutputPaths: []string{"stderr"}, -} - -// MergeOutputPaths merges logging output paths, resolving conflicts. -func MergeOutputPaths(cfg zap.Config) zap.Config { - outputs := make(map[string]struct{}) - for _, v := range cfg.OutputPaths { - outputs[v] = struct{}{} - } - outputSlice := make([]string, 0) - if _, ok := outputs["/dev/null"]; ok { - // "/dev/null" to discard all - outputSlice = []string{"/dev/null"} - } else { - for k := range outputs { - outputSlice = append(outputSlice, k) - } - } - cfg.OutputPaths = outputSlice - sort.Strings(cfg.OutputPaths) - - errOutputs := make(map[string]struct{}) - for _, v := range cfg.ErrorOutputPaths { - errOutputs[v] = struct{}{} - } - errOutputSlice := make([]string, 0) - if _, ok := errOutputs["/dev/null"]; ok { - // "/dev/null" to discard all - errOutputSlice = []string{"/dev/null"} - } else { - for k := range errOutputs { - errOutputSlice = append(errOutputSlice, k) - } - } - cfg.ErrorOutputPaths = errOutputSlice - sort.Strings(cfg.ErrorOutputPaths) - - return cfg -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap_journal.go b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap_journal.go deleted file mode 100644 index 9daa3e0aab1..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap_journal.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2018 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build !windows -// +build !windows - -package logutil - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "os" - "path/filepath" - - "go.etcd.io/etcd/client/pkg/v3/systemd" - - "github.com/coreos/go-systemd/v22/journal" - "go.uber.org/zap/zapcore" -) - -// NewJournalWriter wraps "io.Writer" to redirect log output -// to the local systemd journal. If journald send fails, it fails -// back to writing to the original writer. -// The decode overhead is only <30µs per write. -// Reference: https://github.com/coreos/pkg/blob/master/capnslog/journald_formatter.go -func NewJournalWriter(wr io.Writer) (io.Writer, error) { - return &journalWriter{Writer: wr}, systemd.DialJournal() -} - -type journalWriter struct { - io.Writer -} - -// WARN: assume that etcd uses default field names in zap encoder config -// make sure to keep this up-to-date! -type logLine struct { - Level string `json:"level"` - Caller string `json:"caller"` -} - -func (w *journalWriter) Write(p []byte) (int, error) { - line := &logLine{} - if err := json.NewDecoder(bytes.NewReader(p)).Decode(line); err != nil { - return 0, err - } - - var pri journal.Priority - switch line.Level { - case zapcore.DebugLevel.String(): - pri = journal.PriDebug - case zapcore.InfoLevel.String(): - pri = journal.PriInfo - - case zapcore.WarnLevel.String(): - pri = journal.PriWarning - case zapcore.ErrorLevel.String(): - pri = journal.PriErr - - case zapcore.DPanicLevel.String(): - pri = journal.PriCrit - case zapcore.PanicLevel.String(): - pri = journal.PriCrit - case zapcore.FatalLevel.String(): - pri = journal.PriCrit - - default: - panic(fmt.Errorf("unknown log level: %q", line.Level)) - } - - err := journal.Send(string(p), pri, map[string]string{ - "PACKAGE": filepath.Dir(line.Caller), - "SYSLOG_IDENTIFIER": filepath.Base(os.Args[0]), - }) - if err != nil { - // "journal" also falls back to stderr - // "fmt.Fprintln(os.Stderr, s)" - return w.Writer.Write(p) - } - return 0, nil -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/systemd/doc.go b/vendor/go.etcd.io/etcd/client/pkg/v3/systemd/doc.go deleted file mode 100644 index 30e77ce044a..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/systemd/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2018 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package systemd provides utility functions for systemd. -package systemd diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/systemd/journal.go b/vendor/go.etcd.io/etcd/client/pkg/v3/systemd/journal.go deleted file mode 100644 index 494ce372e7f..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/systemd/journal.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2018 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package systemd - -import "net" - -// DialJournal returns no error if the process can dial journal socket. -// Returns an error if dial failed, which indicates journald is not available -// (e.g. run embedded etcd as docker daemon). -// Reference: https://github.com/coreos/go-systemd/blob/master/journal/journal.go. -func DialJournal() error { - conn, err := net.Dial("unixgram", "/run/systemd/journal/socket") - if conn != nil { - defer conn.Close() - } - return err -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/cipher_suites.go b/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/cipher_suites.go deleted file mode 100644 index e1f21755d4b..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/cipher_suites.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2018 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package tlsutil - -import ( - "crypto/tls" - "fmt" -) - -// GetCipherSuite returns the corresponding cipher suite, -// and boolean value if it is supported. -func GetCipherSuite(s string) (uint16, bool) { - for _, c := range tls.CipherSuites() { - if s == c.Name { - return c.ID, true - } - } - for _, c := range tls.InsecureCipherSuites() { - if s == c.Name { - return c.ID, true - } - } - switch s { - case "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": - return tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, true - case "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": - return tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, true - } - return 0, false -} - -// GetCipherSuites returns list of corresponding cipher suite IDs. -func GetCipherSuites(ss []string) ([]uint16, error) { - cs := make([]uint16, len(ss)) - for i, s := range ss { - var ok bool - cs[i], ok = GetCipherSuite(s) - if !ok { - return nil, fmt.Errorf("unexpected TLS cipher suite %q", s) - } - } - - return cs, nil -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/doc.go b/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/doc.go deleted file mode 100644 index 3b6aa670baf..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package tlsutil provides utility functions for handling TLS. -package tlsutil diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/tlsutil.go b/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/tlsutil.go deleted file mode 100644 index 3a5aef089a7..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/tlsutil.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package tlsutil - -import ( - "crypto/tls" - "crypto/x509" - "encoding/pem" - "io/ioutil" -) - -// NewCertPool creates x509 certPool with provided CA files. -func NewCertPool(CAFiles []string) (*x509.CertPool, error) { - certPool := x509.NewCertPool() - - for _, CAFile := range CAFiles { - pemByte, err := ioutil.ReadFile(CAFile) - if err != nil { - return nil, err - } - - for { - var block *pem.Block - block, pemByte = pem.Decode(pemByte) - if block == nil { - break - } - cert, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return nil, err - } - - certPool.AddCert(cert) - } - } - - return certPool, nil -} - -// NewCert generates TLS cert by using the given cert,key and parse function. -func NewCert(certfile, keyfile string, parseFunc func([]byte, []byte) (tls.Certificate, error)) (*tls.Certificate, error) { - cert, err := ioutil.ReadFile(certfile) - if err != nil { - return nil, err - } - - key, err := ioutil.ReadFile(keyfile) - if err != nil { - return nil, err - } - - if parseFunc == nil { - parseFunc = tls.X509KeyPair - } - - tlsCert, err := parseFunc(cert, key) - if err != nil { - return nil, err - } - return &tlsCert, nil -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/versions.go b/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/versions.go deleted file mode 100644 index ffcecd8c670..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/versions.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2023 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package tlsutil - -import ( - "crypto/tls" - "fmt" -) - -type TLSVersion string - -// Constants for TLS versions. -const ( - TLSVersionDefault TLSVersion = "" - TLSVersion12 TLSVersion = "TLS1.2" - TLSVersion13 TLSVersion = "TLS1.3" -) - -// GetTLSVersion returns the corresponding tls.Version or error. -func GetTLSVersion(version string) (uint16, error) { - var v uint16 - - switch version { - case string(TLSVersionDefault): - v = 0 // 0 means let Go decide. - case string(TLSVersion12): - v = tls.VersionTLS12 - case string(TLSVersion13): - v = tls.VersionTLS13 - default: - return 0, fmt.Errorf("unexpected TLS version %q (must be one of: TLS1.2, TLS1.3)", version) - } - - return v, nil -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/types/doc.go b/vendor/go.etcd.io/etcd/client/pkg/v3/types/doc.go deleted file mode 100644 index de8ef0bd712..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/types/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package types declares various data types and implements type-checking -// functions. -package types diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/types/id.go b/vendor/go.etcd.io/etcd/client/pkg/v3/types/id.go deleted file mode 100644 index ae00388dde0..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/types/id.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import "strconv" - -// ID represents a generic identifier which is canonically -// stored as a uint64 but is typically represented as a -// base-16 string for input/output -type ID uint64 - -func (i ID) String() string { - return strconv.FormatUint(uint64(i), 16) -} - -// IDFromString attempts to create an ID from a base-16 string. -func IDFromString(s string) (ID, error) { - i, err := strconv.ParseUint(s, 16, 64) - return ID(i), err -} - -// IDSlice implements the sort interface -type IDSlice []ID - -func (p IDSlice) Len() int { return len(p) } -func (p IDSlice) Less(i, j int) bool { return uint64(p[i]) < uint64(p[j]) } -func (p IDSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/types/set.go b/vendor/go.etcd.io/etcd/client/pkg/v3/types/set.go deleted file mode 100644 index e7a3cdc9ab6..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/types/set.go +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "reflect" - "sort" - "sync" -) - -type Set interface { - Add(string) - Remove(string) - Contains(string) bool - Equals(Set) bool - Length() int - Values() []string - Copy() Set - Sub(Set) Set -} - -func NewUnsafeSet(values ...string) *unsafeSet { - set := &unsafeSet{make(map[string]struct{})} - for _, v := range values { - set.Add(v) - } - return set -} - -func NewThreadsafeSet(values ...string) *tsafeSet { - us := NewUnsafeSet(values...) - return &tsafeSet{us, sync.RWMutex{}} -} - -type unsafeSet struct { - d map[string]struct{} -} - -// Add adds a new value to the set (no-op if the value is already present) -func (us *unsafeSet) Add(value string) { - us.d[value] = struct{}{} -} - -// Remove removes the given value from the set -func (us *unsafeSet) Remove(value string) { - delete(us.d, value) -} - -// Contains returns whether the set contains the given value -func (us *unsafeSet) Contains(value string) (exists bool) { - _, exists = us.d[value] - return exists -} - -// ContainsAll returns whether the set contains all given values -func (us *unsafeSet) ContainsAll(values []string) bool { - for _, s := range values { - if !us.Contains(s) { - return false - } - } - return true -} - -// Equals returns whether the contents of two sets are identical -func (us *unsafeSet) Equals(other Set) bool { - v1 := sort.StringSlice(us.Values()) - v2 := sort.StringSlice(other.Values()) - v1.Sort() - v2.Sort() - return reflect.DeepEqual(v1, v2) -} - -// Length returns the number of elements in the set -func (us *unsafeSet) Length() int { - return len(us.d) -} - -// Values returns the values of the Set in an unspecified order. -func (us *unsafeSet) Values() (values []string) { - values = make([]string, 0) - for val := range us.d { - values = append(values, val) - } - return values -} - -// Copy creates a new Set containing the values of the first -func (us *unsafeSet) Copy() Set { - cp := NewUnsafeSet() - for val := range us.d { - cp.Add(val) - } - - return cp -} - -// Sub removes all elements in other from the set -func (us *unsafeSet) Sub(other Set) Set { - oValues := other.Values() - result := us.Copy().(*unsafeSet) - - for _, val := range oValues { - if _, ok := result.d[val]; !ok { - continue - } - delete(result.d, val) - } - - return result -} - -type tsafeSet struct { - us *unsafeSet - m sync.RWMutex -} - -func (ts *tsafeSet) Add(value string) { - ts.m.Lock() - defer ts.m.Unlock() - ts.us.Add(value) -} - -func (ts *tsafeSet) Remove(value string) { - ts.m.Lock() - defer ts.m.Unlock() - ts.us.Remove(value) -} - -func (ts *tsafeSet) Contains(value string) (exists bool) { - ts.m.RLock() - defer ts.m.RUnlock() - return ts.us.Contains(value) -} - -func (ts *tsafeSet) Equals(other Set) bool { - ts.m.RLock() - defer ts.m.RUnlock() - - // If ts and other represent the same variable, avoid calling - // ts.us.Equals(other), to avoid double RLock bug - if _other, ok := other.(*tsafeSet); ok { - if _other == ts { - return true - } - } - return ts.us.Equals(other) -} - -func (ts *tsafeSet) Length() int { - ts.m.RLock() - defer ts.m.RUnlock() - return ts.us.Length() -} - -func (ts *tsafeSet) Values() (values []string) { - ts.m.RLock() - defer ts.m.RUnlock() - return ts.us.Values() -} - -func (ts *tsafeSet) Copy() Set { - ts.m.RLock() - defer ts.m.RUnlock() - usResult := ts.us.Copy().(*unsafeSet) - return &tsafeSet{usResult, sync.RWMutex{}} -} - -func (ts *tsafeSet) Sub(other Set) Set { - ts.m.RLock() - defer ts.m.RUnlock() - - // If ts and other represent the same variable, avoid calling - // ts.us.Sub(other), to avoid double RLock bug - if _other, ok := other.(*tsafeSet); ok { - if _other == ts { - usResult := NewUnsafeSet() - return &tsafeSet{usResult, sync.RWMutex{}} - } - } - usResult := ts.us.Sub(other).(*unsafeSet) - return &tsafeSet{usResult, sync.RWMutex{}} -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/types/slice.go b/vendor/go.etcd.io/etcd/client/pkg/v3/types/slice.go deleted file mode 100644 index 0dd9ca798ae..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/types/slice.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -// Uint64Slice implements sort interface -type Uint64Slice []uint64 - -func (p Uint64Slice) Len() int { return len(p) } -func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] } -func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/types/urls.go b/vendor/go.etcd.io/etcd/client/pkg/v3/types/urls.go deleted file mode 100644 index 9e5d03ff645..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/types/urls.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "errors" - "fmt" - "net" - "net/url" - "sort" - "strings" -) - -type URLs []url.URL - -func NewURLs(strs []string) (URLs, error) { - all := make([]url.URL, len(strs)) - if len(all) == 0 { - return nil, errors.New("no valid URLs given") - } - for i, in := range strs { - in = strings.TrimSpace(in) - u, err := url.Parse(in) - if err != nil { - return nil, err - } - if u.Scheme != "http" && u.Scheme != "https" && u.Scheme != "unix" && u.Scheme != "unixs" { - return nil, fmt.Errorf("URL scheme must be http, https, unix, or unixs: %s", in) - } - if _, _, err := net.SplitHostPort(u.Host); err != nil { - return nil, fmt.Errorf(`URL address does not have the form "host:port": %s`, in) - } - if u.Path != "" { - return nil, fmt.Errorf("URL must not contain a path: %s", in) - } - all[i] = *u - } - us := URLs(all) - us.Sort() - - return us, nil -} - -func MustNewURLs(strs []string) URLs { - urls, err := NewURLs(strs) - if err != nil { - panic(err) - } - return urls -} - -func (us URLs) String() string { - return strings.Join(us.StringSlice(), ",") -} - -func (us *URLs) Sort() { - sort.Sort(us) -} -func (us URLs) Len() int { return len(us) } -func (us URLs) Less(i, j int) bool { return us[i].String() < us[j].String() } -func (us URLs) Swap(i, j int) { us[i], us[j] = us[j], us[i] } - -func (us URLs) StringSlice() []string { - out := make([]string, len(us)) - for i := range us { - out[i] = us[i].String() - } - - return out -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/types/urlsmap.go b/vendor/go.etcd.io/etcd/client/pkg/v3/types/urlsmap.go deleted file mode 100644 index 47690cc381a..00000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/types/urlsmap.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "fmt" - "sort" - "strings" -) - -// URLsMap is a map from a name to its URLs. -type URLsMap map[string]URLs - -// NewURLsMap returns a URLsMap instantiated from the given string, -// which consists of discovery-formatted names-to-URLs, like: -// mach0=http://1.1.1.1:2380,mach0=http://2.2.2.2::2380,mach1=http://3.3.3.3:2380,mach2=http://4.4.4.4:2380 -func NewURLsMap(s string) (URLsMap, error) { - m := parse(s) - - cl := URLsMap{} - for name, urls := range m { - us, err := NewURLs(urls) - if err != nil { - return nil, err - } - cl[name] = us - } - return cl, nil -} - -// NewURLsMapFromStringMap takes a map of strings and returns a URLsMap. The -// string values in the map can be multiple values separated by the sep string. -func NewURLsMapFromStringMap(m map[string]string, sep string) (URLsMap, error) { - var err error - um := URLsMap{} - for k, v := range m { - um[k], err = NewURLs(strings.Split(v, sep)) - if err != nil { - return nil, err - } - } - return um, nil -} - -// String turns URLsMap into discovery-formatted name-to-URLs sorted by name. -func (c URLsMap) String() string { - var pairs []string - for name, urls := range c { - for _, url := range urls { - pairs = append(pairs, fmt.Sprintf("%s=%s", name, url.String())) - } - } - sort.Strings(pairs) - return strings.Join(pairs, ",") -} - -// URLs returns a list of all URLs. -// The returned list is sorted in ascending lexicographical order. -func (c URLsMap) URLs() []string { - var urls []string - for _, us := range c { - for _, u := range us { - urls = append(urls, u.String()) - } - } - sort.Strings(urls) - return urls -} - -// Len returns the size of URLsMap. -func (c URLsMap) Len() int { - return len(c) -} - -// parse parses the given string and returns a map listing the values specified for each key. -func parse(s string) map[string][]string { - m := make(map[string][]string) - for s != "" { - key := s - if i := strings.IndexAny(key, ","); i >= 0 { - key, s = key[:i], key[i+1:] - } else { - s = "" - } - if key == "" { - continue - } - value := "" - if i := strings.Index(key, "="); i >= 0 { - key, value = key[:i], key[i+1:] - } - m[key] = append(m[key], value) - } - return m -} diff --git a/vendor/go.etcd.io/etcd/client/v3/LICENSE b/vendor/go.etcd.io/etcd/client/v3/LICENSE deleted file mode 100644 index d6456956733..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/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/go.etcd.io/etcd/client/v3/README.md b/vendor/go.etcd.io/etcd/client/v3/README.md deleted file mode 100644 index 1e037d7eb6b..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# etcd/clientv3 - -[![Docs](https://img.shields.io/badge/docs-latest-green.svg)](https://etcd.io/docs) -[![Godoc](https://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/go.etcd.io/etcd/clientv3) - -`etcd/clientv3` is the official Go etcd client for v3. - -## Install - -```bash -go get go.etcd.io/etcd/client/v3 -``` - -Warning: As etcd 3.5.0 was not yet released, the command above does not work. -After first pre-release of 3.5.0 [#12498](https://github.com/etcd-io/etcd/issues/12498), -etcd can be referenced using: -``` -go get go.etcd.io/etcd/client/v3@v3.5.0-pre -``` - -## Get started - -Create client using `clientv3.New`: - -```go -cli, err := clientv3.New(clientv3.Config{ - Endpoints: []string{"localhost:2379", "localhost:22379", "localhost:32379"}, - DialTimeout: 5 * time.Second, -}) -if err != nil { - // handle error! -} -defer cli.Close() -``` - -etcd v3 uses [`gRPC`](https://www.grpc.io) for remote procedure calls. And `clientv3` uses -[`grpc-go`](https://github.com/grpc/grpc-go) to connect to etcd. Make sure to close the client after using it. -If the client is not closed, the connection will have leaky goroutines. To specify client request timeout, -pass `context.WithTimeout` to APIs: - -```go -ctx, cancel := context.WithTimeout(context.Background(), timeout) -resp, err := cli.Put(ctx, "sample_key", "sample_value") -cancel() -if err != nil { - // handle error! -} -// use the response -``` - -For full compatibility, it is recommended to install released versions of clients using go modules. - -## Error Handling - -etcd client returns 2 types of errors: - -1. context error: canceled or deadline exceeded. -2. gRPC error: see [api/v3rpc/rpctypes](https://godoc.org/go.etcd.io/etcd/api/v3rpc/rpctypes). - -Here is the example code to handle client errors: - -```go -resp, err := cli.Put(ctx, "", "") -if err != nil { - switch err { - case context.Canceled: - log.Fatalf("ctx is canceled by another routine: %v", err) - case context.DeadlineExceeded: - log.Fatalf("ctx is attached with a deadline is exceeded: %v", err) - case rpctypes.ErrEmptyKey: - log.Fatalf("client-side error: %v", err) - default: - log.Fatalf("bad cluster endpoints, which are not etcd servers: %v", err) - } -} -``` - -## Metrics - -The etcd client optionally exposes RPC metrics through [go-grpc-prometheus](https://github.com/grpc-ecosystem/go-grpc-prometheus). See the [examples](https://github.com/etcd-io/etcd/blob/main/tests/integration/clientv3/examples/example_metrics_test.go). - -## Namespacing - -The [namespace](https://godoc.org/go.etcd.io/etcd/client/v3/namespace) package provides `clientv3` interface wrappers to transparently isolate client requests to a user-defined prefix. - -## Request size limit - -Client request size limit is configurable via `clientv3.Config.MaxCallSendMsgSize` and `MaxCallRecvMsgSize` in bytes. If none given, client request send limit defaults to 2 MiB including gRPC overhead bytes. And receive limit defaults to `math.MaxInt32`. - -## Examples - -More code [examples](https://github.com/etcd-io/etcd/tree/main/tests/integration/clientv3/examples) can be found at [GoDoc](https://pkg.go.dev/go.etcd.io/etcd/client/v3). diff --git a/vendor/go.etcd.io/etcd/client/v3/auth.go b/vendor/go.etcd.io/etcd/client/v3/auth.go deleted file mode 100644 index a6f75d32159..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/auth.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "context" - "fmt" - "strings" - - "go.etcd.io/etcd/api/v3/authpb" - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "google.golang.org/grpc" -) - -type ( - AuthEnableResponse pb.AuthEnableResponse - AuthDisableResponse pb.AuthDisableResponse - AuthStatusResponse pb.AuthStatusResponse - AuthenticateResponse pb.AuthenticateResponse - AuthUserAddResponse pb.AuthUserAddResponse - AuthUserDeleteResponse pb.AuthUserDeleteResponse - AuthUserChangePasswordResponse pb.AuthUserChangePasswordResponse - AuthUserGrantRoleResponse pb.AuthUserGrantRoleResponse - AuthUserGetResponse pb.AuthUserGetResponse - AuthUserRevokeRoleResponse pb.AuthUserRevokeRoleResponse - AuthRoleAddResponse pb.AuthRoleAddResponse - AuthRoleGrantPermissionResponse pb.AuthRoleGrantPermissionResponse - AuthRoleGetResponse pb.AuthRoleGetResponse - AuthRoleRevokePermissionResponse pb.AuthRoleRevokePermissionResponse - AuthRoleDeleteResponse pb.AuthRoleDeleteResponse - AuthUserListResponse pb.AuthUserListResponse - AuthRoleListResponse pb.AuthRoleListResponse - - PermissionType authpb.Permission_Type - Permission authpb.Permission -) - -const ( - PermRead = authpb.READ - PermWrite = authpb.WRITE - PermReadWrite = authpb.READWRITE -) - -type UserAddOptions authpb.UserAddOptions - -type Auth interface { - // Authenticate login and get token - Authenticate(ctx context.Context, name string, password string) (*AuthenticateResponse, error) - - // AuthEnable enables auth of an etcd cluster. - AuthEnable(ctx context.Context) (*AuthEnableResponse, error) - - // AuthDisable disables auth of an etcd cluster. - AuthDisable(ctx context.Context) (*AuthDisableResponse, error) - - // AuthStatus returns the status of auth of an etcd cluster. - AuthStatus(ctx context.Context) (*AuthStatusResponse, error) - - // UserAdd adds a new user to an etcd cluster. - UserAdd(ctx context.Context, name string, password string) (*AuthUserAddResponse, error) - - // UserAddWithOptions adds a new user to an etcd cluster with some options. - UserAddWithOptions(ctx context.Context, name string, password string, opt *UserAddOptions) (*AuthUserAddResponse, error) - - // UserDelete deletes a user from an etcd cluster. - UserDelete(ctx context.Context, name string) (*AuthUserDeleteResponse, error) - - // UserChangePassword changes a password of a user. - UserChangePassword(ctx context.Context, name string, password string) (*AuthUserChangePasswordResponse, error) - - // UserGrantRole grants a role to a user. - UserGrantRole(ctx context.Context, user string, role string) (*AuthUserGrantRoleResponse, error) - - // UserGet gets a detailed information of a user. - UserGet(ctx context.Context, name string) (*AuthUserGetResponse, error) - - // UserList gets a list of all users. - UserList(ctx context.Context) (*AuthUserListResponse, error) - - // UserRevokeRole revokes a role of a user. - UserRevokeRole(ctx context.Context, name string, role string) (*AuthUserRevokeRoleResponse, error) - - // RoleAdd adds a new role to an etcd cluster. - RoleAdd(ctx context.Context, name string) (*AuthRoleAddResponse, error) - - // RoleGrantPermission grants a permission to a role. - RoleGrantPermission(ctx context.Context, name string, key, rangeEnd string, permType PermissionType) (*AuthRoleGrantPermissionResponse, error) - - // RoleGet gets a detailed information of a role. - RoleGet(ctx context.Context, role string) (*AuthRoleGetResponse, error) - - // RoleList gets a list of all roles. - RoleList(ctx context.Context) (*AuthRoleListResponse, error) - - // RoleRevokePermission revokes a permission from a role. - RoleRevokePermission(ctx context.Context, role string, key, rangeEnd string) (*AuthRoleRevokePermissionResponse, error) - - // RoleDelete deletes a role. - RoleDelete(ctx context.Context, role string) (*AuthRoleDeleteResponse, error) -} - -type authClient struct { - remote pb.AuthClient - callOpts []grpc.CallOption -} - -func NewAuth(c *Client) Auth { - api := &authClient{remote: RetryAuthClient(c)} - if c != nil { - api.callOpts = c.callOpts - } - return api -} - -func NewAuthFromAuthClient(remote pb.AuthClient, c *Client) Auth { - api := &authClient{remote: remote} - if c != nil { - api.callOpts = c.callOpts - } - return api -} - -func (auth *authClient) Authenticate(ctx context.Context, name string, password string) (*AuthenticateResponse, error) { - resp, err := auth.remote.Authenticate(ctx, &pb.AuthenticateRequest{Name: name, Password: password}, auth.callOpts...) - return (*AuthenticateResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) AuthEnable(ctx context.Context) (*AuthEnableResponse, error) { - resp, err := auth.remote.AuthEnable(ctx, &pb.AuthEnableRequest{}, auth.callOpts...) - return (*AuthEnableResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) AuthDisable(ctx context.Context) (*AuthDisableResponse, error) { - resp, err := auth.remote.AuthDisable(ctx, &pb.AuthDisableRequest{}, auth.callOpts...) - return (*AuthDisableResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) AuthStatus(ctx context.Context) (*AuthStatusResponse, error) { - resp, err := auth.remote.AuthStatus(ctx, &pb.AuthStatusRequest{}, auth.callOpts...) - return (*AuthStatusResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) UserAdd(ctx context.Context, name string, password string) (*AuthUserAddResponse, error) { - resp, err := auth.remote.UserAdd(ctx, &pb.AuthUserAddRequest{Name: name, Password: password, Options: &authpb.UserAddOptions{NoPassword: false}}, auth.callOpts...) - return (*AuthUserAddResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) UserAddWithOptions(ctx context.Context, name string, password string, options *UserAddOptions) (*AuthUserAddResponse, error) { - resp, err := auth.remote.UserAdd(ctx, &pb.AuthUserAddRequest{Name: name, Password: password, Options: (*authpb.UserAddOptions)(options)}, auth.callOpts...) - return (*AuthUserAddResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) UserDelete(ctx context.Context, name string) (*AuthUserDeleteResponse, error) { - resp, err := auth.remote.UserDelete(ctx, &pb.AuthUserDeleteRequest{Name: name}, auth.callOpts...) - return (*AuthUserDeleteResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) UserChangePassword(ctx context.Context, name string, password string) (*AuthUserChangePasswordResponse, error) { - resp, err := auth.remote.UserChangePassword(ctx, &pb.AuthUserChangePasswordRequest{Name: name, Password: password}, auth.callOpts...) - return (*AuthUserChangePasswordResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) UserGrantRole(ctx context.Context, user string, role string) (*AuthUserGrantRoleResponse, error) { - resp, err := auth.remote.UserGrantRole(ctx, &pb.AuthUserGrantRoleRequest{User: user, Role: role}, auth.callOpts...) - return (*AuthUserGrantRoleResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) UserGet(ctx context.Context, name string) (*AuthUserGetResponse, error) { - resp, err := auth.remote.UserGet(ctx, &pb.AuthUserGetRequest{Name: name}, auth.callOpts...) - return (*AuthUserGetResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) UserList(ctx context.Context) (*AuthUserListResponse, error) { - resp, err := auth.remote.UserList(ctx, &pb.AuthUserListRequest{}, auth.callOpts...) - return (*AuthUserListResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) UserRevokeRole(ctx context.Context, name string, role string) (*AuthUserRevokeRoleResponse, error) { - resp, err := auth.remote.UserRevokeRole(ctx, &pb.AuthUserRevokeRoleRequest{Name: name, Role: role}, auth.callOpts...) - return (*AuthUserRevokeRoleResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) RoleAdd(ctx context.Context, name string) (*AuthRoleAddResponse, error) { - resp, err := auth.remote.RoleAdd(ctx, &pb.AuthRoleAddRequest{Name: name}, auth.callOpts...) - return (*AuthRoleAddResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) RoleGrantPermission(ctx context.Context, name string, key, rangeEnd string, permType PermissionType) (*AuthRoleGrantPermissionResponse, error) { - perm := &authpb.Permission{ - Key: []byte(key), - RangeEnd: []byte(rangeEnd), - PermType: authpb.Permission_Type(permType), - } - resp, err := auth.remote.RoleGrantPermission(ctx, &pb.AuthRoleGrantPermissionRequest{Name: name, Perm: perm}, auth.callOpts...) - return (*AuthRoleGrantPermissionResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) RoleGet(ctx context.Context, role string) (*AuthRoleGetResponse, error) { - resp, err := auth.remote.RoleGet(ctx, &pb.AuthRoleGetRequest{Role: role}, auth.callOpts...) - return (*AuthRoleGetResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) RoleList(ctx context.Context) (*AuthRoleListResponse, error) { - resp, err := auth.remote.RoleList(ctx, &pb.AuthRoleListRequest{}, auth.callOpts...) - return (*AuthRoleListResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) RoleRevokePermission(ctx context.Context, role string, key, rangeEnd string) (*AuthRoleRevokePermissionResponse, error) { - resp, err := auth.remote.RoleRevokePermission(ctx, &pb.AuthRoleRevokePermissionRequest{Role: role, Key: []byte(key), RangeEnd: []byte(rangeEnd)}, auth.callOpts...) - return (*AuthRoleRevokePermissionResponse)(resp), toErr(ctx, err) -} - -func (auth *authClient) RoleDelete(ctx context.Context, role string) (*AuthRoleDeleteResponse, error) { - resp, err := auth.remote.RoleDelete(ctx, &pb.AuthRoleDeleteRequest{Role: role}, auth.callOpts...) - return (*AuthRoleDeleteResponse)(resp), toErr(ctx, err) -} - -func StrToPermissionType(s string) (PermissionType, error) { - val, ok := authpb.Permission_Type_value[strings.ToUpper(s)] - if ok { - return PermissionType(val), nil - } - return PermissionType(-1), fmt.Errorf("invalid permission type: %s", s) -} diff --git a/vendor/go.etcd.io/etcd/client/v3/client.go b/vendor/go.etcd.io/etcd/client/v3/client.go deleted file mode 100644 index efa44e8902d..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/client.go +++ /dev/null @@ -1,612 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "context" - "errors" - "fmt" - "strconv" - "strings" - "sync" - "time" - - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.etcd.io/etcd/client/pkg/v3/logutil" - "go.etcd.io/etcd/client/v3/credentials" - "go.etcd.io/etcd/client/v3/internal/endpoint" - "go.etcd.io/etcd/client/v3/internal/resolver" - "go.uber.org/zap" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - grpccredentials "google.golang.org/grpc/credentials" - "google.golang.org/grpc/keepalive" - "google.golang.org/grpc/status" -) - -var ( - ErrNoAvailableEndpoints = errors.New("etcdclient: no available endpoints") - ErrOldCluster = errors.New("etcdclient: old cluster version") -) - -// Client provides and manages an etcd v3 client session. -type Client struct { - Cluster - KV - Lease - Watcher - Auth - Maintenance - - conn *grpc.ClientConn - - cfg Config - creds grpccredentials.TransportCredentials - resolver *resolver.EtcdManualResolver - mu *sync.RWMutex - - ctx context.Context - cancel context.CancelFunc - - // Username is a user name for authentication. - Username string - // Password is a password for authentication. - Password string - authTokenBundle credentials.Bundle - - callOpts []grpc.CallOption - - lgMu *sync.RWMutex - lg *zap.Logger -} - -// New creates a new etcdv3 client from a given configuration. -func New(cfg Config) (*Client, error) { - if len(cfg.Endpoints) == 0 { - return nil, ErrNoAvailableEndpoints - } - - return newClient(&cfg) -} - -// NewCtxClient creates a client with a context but no underlying grpc -// connection. This is useful for embedded cases that override the -// service interface implementations and do not need connection management. -func NewCtxClient(ctx context.Context, opts ...Option) *Client { - cctx, cancel := context.WithCancel(ctx) - c := &Client{ctx: cctx, cancel: cancel, lgMu: new(sync.RWMutex)} - for _, opt := range opts { - opt(c) - } - if c.lg == nil { - c.lg = zap.NewNop() - } - return c -} - -// Option is a function type that can be passed as argument to NewCtxClient to configure client -type Option func(*Client) - -// NewFromURL creates a new etcdv3 client from a URL. -func NewFromURL(url string) (*Client, error) { - return New(Config{Endpoints: []string{url}}) -} - -// NewFromURLs creates a new etcdv3 client from URLs. -func NewFromURLs(urls []string) (*Client, error) { - return New(Config{Endpoints: urls}) -} - -// WithZapLogger is a NewCtxClient option that overrides the logger -func WithZapLogger(lg *zap.Logger) Option { - return func(c *Client) { - c.lg = lg - } -} - -// WithLogger overrides the logger. -// -// Deprecated: Please use WithZapLogger or Logger field in clientv3.Config -// -// Does not changes grpcLogger, that can be explicitly configured -// using grpc_zap.ReplaceGrpcLoggerV2(..) method. -func (c *Client) WithLogger(lg *zap.Logger) *Client { - c.lgMu.Lock() - c.lg = lg - c.lgMu.Unlock() - return c -} - -// GetLogger gets the logger. -// NOTE: This method is for internal use of etcd-client library and should not be used as general-purpose logger. -func (c *Client) GetLogger() *zap.Logger { - c.lgMu.RLock() - l := c.lg - c.lgMu.RUnlock() - return l -} - -// Close shuts down the client's etcd connections. -func (c *Client) Close() error { - c.cancel() - if c.Watcher != nil { - c.Watcher.Close() - } - if c.Lease != nil { - c.Lease.Close() - } - if c.conn != nil { - return toErr(c.ctx, c.conn.Close()) - } - return c.ctx.Err() -} - -// Ctx is a context for "out of band" messages (e.g., for sending -// "clean up" message when another context is canceled). It is -// canceled on client Close(). -func (c *Client) Ctx() context.Context { return c.ctx } - -// Endpoints lists the registered endpoints for the client. -func (c *Client) Endpoints() []string { - // copy the slice; protect original endpoints from being changed - c.mu.RLock() - defer c.mu.RUnlock() - eps := make([]string, len(c.cfg.Endpoints)) - copy(eps, c.cfg.Endpoints) - return eps -} - -// SetEndpoints updates client's endpoints. -func (c *Client) SetEndpoints(eps ...string) { - c.mu.Lock() - defer c.mu.Unlock() - c.cfg.Endpoints = eps - - c.resolver.SetEndpoints(eps) -} - -// Sync synchronizes client's endpoints with the known endpoints from the etcd membership. -func (c *Client) Sync(ctx context.Context) error { - mresp, err := c.MemberList(ctx) - if err != nil { - return err - } - var eps []string - for _, m := range mresp.Members { - if len(m.Name) != 0 && !m.IsLearner { - eps = append(eps, m.ClientURLs...) - } - } - c.SetEndpoints(eps...) - return nil -} - -func (c *Client) autoSync() { - if c.cfg.AutoSyncInterval == time.Duration(0) { - return - } - - for { - select { - case <-c.ctx.Done(): - return - case <-time.After(c.cfg.AutoSyncInterval): - ctx, cancel := context.WithTimeout(c.ctx, 5*time.Second) - err := c.Sync(ctx) - cancel() - if err != nil && err != c.ctx.Err() { - c.lg.Info("Auto sync endpoints failed.", zap.Error(err)) - } - } - } -} - -// dialSetupOpts gives the dial opts prior to any authentication. -func (c *Client) dialSetupOpts(creds grpccredentials.TransportCredentials, dopts ...grpc.DialOption) (opts []grpc.DialOption, err error) { - if c.cfg.DialKeepAliveTime > 0 { - params := keepalive.ClientParameters{ - Time: c.cfg.DialKeepAliveTime, - Timeout: c.cfg.DialKeepAliveTimeout, - PermitWithoutStream: c.cfg.PermitWithoutStream, - } - opts = append(opts, grpc.WithKeepaliveParams(params)) - } - opts = append(opts, dopts...) - - if creds != nil { - opts = append(opts, grpc.WithTransportCredentials(creds)) - } else { - opts = append(opts, grpc.WithInsecure()) - } - - // Interceptor retry and backoff. - // TODO: Replace all of clientv3/retry.go with RetryPolicy: - // https://github.com/grpc/grpc-proto/blob/cdd9ed5c3d3f87aef62f373b93361cf7bddc620d/grpc/service_config/service_config.proto#L130 - rrBackoff := withBackoff(c.roundRobinQuorumBackoff(defaultBackoffWaitBetween, defaultBackoffJitterFraction)) - opts = append(opts, - // Disable stream retry by default since go-grpc-middleware/retry does not support client streams. - // Streams that are safe to retry are enabled individually. - grpc.WithStreamInterceptor(c.streamClientInterceptor(withMax(0), rrBackoff)), - grpc.WithUnaryInterceptor(c.unaryClientInterceptor(withMax(defaultUnaryMaxRetries), rrBackoff)), - ) - - return opts, nil -} - -// Dial connects to a single endpoint using the client's config. -func (c *Client) Dial(ep string) (*grpc.ClientConn, error) { - creds := c.credentialsForEndpoint(ep) - - // Using ad-hoc created resolver, to guarantee only explicitly given - // endpoint is used. - return c.dial(creds, grpc.WithResolvers(resolver.New(ep))) -} - -func (c *Client) getToken(ctx context.Context) error { - var err error // return last error in a case of fail - - if c.Username == "" || c.Password == "" { - return nil - } - - resp, err := c.Auth.Authenticate(ctx, c.Username, c.Password) - if err != nil { - if err == rpctypes.ErrAuthNotEnabled { - c.authTokenBundle.UpdateAuthToken("") - return nil - } - return err - } - c.authTokenBundle.UpdateAuthToken(resp.Token) - return nil -} - -// dialWithBalancer dials the client's current load balanced resolver group. The scheme of the host -// of the provided endpoint determines the scheme used for all endpoints of the client connection. -func (c *Client) dialWithBalancer(dopts ...grpc.DialOption) (*grpc.ClientConn, error) { - creds := c.credentialsForEndpoint(c.Endpoints()[0]) - opts := append(dopts, grpc.WithResolvers(c.resolver)) - return c.dial(creds, opts...) -} - -// dial configures and dials any grpc balancer target. -func (c *Client) dial(creds grpccredentials.TransportCredentials, dopts ...grpc.DialOption) (*grpc.ClientConn, error) { - opts, err := c.dialSetupOpts(creds, dopts...) - if err != nil { - return nil, fmt.Errorf("failed to configure dialer: %v", err) - } - if c.authTokenBundle != nil { - opts = append(opts, grpc.WithPerRPCCredentials(c.authTokenBundle.PerRPCCredentials())) - } - - opts = append(opts, c.cfg.DialOptions...) - - dctx := c.ctx - if c.cfg.DialTimeout > 0 { - var cancel context.CancelFunc - dctx, cancel = context.WithTimeout(c.ctx, c.cfg.DialTimeout) - defer cancel() // TODO: Is this right for cases where grpc.WithBlock() is not set on the dial options? - } - target := fmt.Sprintf("%s://%p/%s", resolver.Schema, c, authority(c.Endpoints()[0])) - conn, err := grpc.DialContext(dctx, target, opts...) - if err != nil { - return nil, err - } - return conn, nil -} - -func authority(endpoint string) string { - spl := strings.SplitN(endpoint, "://", 2) - if len(spl) < 2 { - if strings.HasPrefix(endpoint, "unix:") { - return endpoint[len("unix:"):] - } - if strings.HasPrefix(endpoint, "unixs:") { - return endpoint[len("unixs:"):] - } - return endpoint - } - return spl[1] -} - -func (c *Client) credentialsForEndpoint(ep string) grpccredentials.TransportCredentials { - r := endpoint.RequiresCredentials(ep) - switch r { - case endpoint.CREDS_DROP: - return nil - case endpoint.CREDS_OPTIONAL: - return c.creds - case endpoint.CREDS_REQUIRE: - if c.creds != nil { - return c.creds - } - return credentials.NewBundle(credentials.Config{}).TransportCredentials() - default: - panic(fmt.Errorf("unsupported CredsRequirement: %v", r)) - } -} - -func newClient(cfg *Config) (*Client, error) { - if cfg == nil { - cfg = &Config{} - } - var creds grpccredentials.TransportCredentials - if cfg.TLS != nil { - creds = credentials.NewBundle(credentials.Config{TLSConfig: cfg.TLS}).TransportCredentials() - } - - // use a temporary skeleton client to bootstrap first connection - baseCtx := context.TODO() - if cfg.Context != nil { - baseCtx = cfg.Context - } - - ctx, cancel := context.WithCancel(baseCtx) - client := &Client{ - conn: nil, - cfg: *cfg, - creds: creds, - ctx: ctx, - cancel: cancel, - mu: new(sync.RWMutex), - callOpts: defaultCallOpts, - lgMu: new(sync.RWMutex), - } - - var err error - if cfg.Logger != nil { - client.lg = cfg.Logger - } else if cfg.LogConfig != nil { - client.lg, err = cfg.LogConfig.Build() - } else { - client.lg, err = logutil.CreateDefaultZapLogger(etcdClientDebugLevel()) - if client.lg != nil { - client.lg = client.lg.Named("etcd-client") - } - } - if err != nil { - return nil, err - } - - if cfg.Username != "" && cfg.Password != "" { - client.Username = cfg.Username - client.Password = cfg.Password - client.authTokenBundle = credentials.NewBundle(credentials.Config{}) - } - if cfg.MaxCallSendMsgSize > 0 || cfg.MaxCallRecvMsgSize > 0 { - if cfg.MaxCallRecvMsgSize > 0 && cfg.MaxCallSendMsgSize > cfg.MaxCallRecvMsgSize { - return nil, fmt.Errorf("gRPC message recv limit (%d bytes) must be greater than send limit (%d bytes)", cfg.MaxCallRecvMsgSize, cfg.MaxCallSendMsgSize) - } - callOpts := []grpc.CallOption{ - defaultWaitForReady, - defaultMaxCallSendMsgSize, - defaultMaxCallRecvMsgSize, - } - if cfg.MaxCallSendMsgSize > 0 { - callOpts[1] = grpc.MaxCallSendMsgSize(cfg.MaxCallSendMsgSize) - } - if cfg.MaxCallRecvMsgSize > 0 { - callOpts[2] = grpc.MaxCallRecvMsgSize(cfg.MaxCallRecvMsgSize) - } - client.callOpts = callOpts - } - - client.resolver = resolver.New(cfg.Endpoints...) - - if len(cfg.Endpoints) < 1 { - client.cancel() - return nil, fmt.Errorf("at least one Endpoint is required in client config") - } - // Use a provided endpoint target so that for https:// without any tls config given, then - // grpc will assume the certificate server name is the endpoint host. - conn, err := client.dialWithBalancer() - if err != nil { - client.cancel() - client.resolver.Close() - // TODO: Error like `fmt.Errorf(dialing [%s] failed: %v, strings.Join(cfg.Endpoints, ";"), err)` would help with debugging a lot. - return nil, err - } - client.conn = conn - - client.Cluster = NewCluster(client) - client.KV = NewKV(client) - client.Lease = NewLease(client) - client.Watcher = NewWatcher(client) - client.Auth = NewAuth(client) - client.Maintenance = NewMaintenance(client) - - //get token with established connection - ctx, cancel = client.ctx, func() {} - if client.cfg.DialTimeout > 0 { - ctx, cancel = context.WithTimeout(ctx, client.cfg.DialTimeout) - } - err = client.getToken(ctx) - if err != nil { - client.Close() - cancel() - //TODO: Consider fmt.Errorf("communicating with [%s] failed: %v", strings.Join(cfg.Endpoints, ";"), err) - return nil, err - } - cancel() - - if cfg.RejectOldCluster { - if err := client.checkVersion(); err != nil { - client.Close() - return nil, err - } - } - - go client.autoSync() - return client, nil -} - -// roundRobinQuorumBackoff retries against quorum between each backoff. -// This is intended for use with a round robin load balancer. -func (c *Client) roundRobinQuorumBackoff(waitBetween time.Duration, jitterFraction float64) backoffFunc { - return func(attempt uint) time.Duration { - // after each round robin across quorum, backoff for our wait between duration - n := uint(len(c.Endpoints())) - quorum := (n/2 + 1) - if attempt%quorum == 0 { - c.lg.Debug("backoff", zap.Uint("attempt", attempt), zap.Uint("quorum", quorum), zap.Duration("waitBetween", waitBetween), zap.Float64("jitterFraction", jitterFraction)) - return jitterUp(waitBetween, jitterFraction) - } - c.lg.Debug("backoff skipped", zap.Uint("attempt", attempt), zap.Uint("quorum", quorum)) - return 0 - } -} - -func (c *Client) checkVersion() (err error) { - var wg sync.WaitGroup - - eps := c.Endpoints() - errc := make(chan error, len(eps)) - ctx, cancel := context.WithCancel(c.ctx) - if c.cfg.DialTimeout > 0 { - cancel() - ctx, cancel = context.WithTimeout(c.ctx, c.cfg.DialTimeout) - } - - wg.Add(len(eps)) - for _, ep := range eps { - // if cluster is current, any endpoint gives a recent version - go func(e string) { - defer wg.Done() - resp, rerr := c.Status(ctx, e) - if rerr != nil { - errc <- rerr - return - } - vs := strings.Split(resp.Version, ".") - maj, min := 0, 0 - if len(vs) >= 2 { - var serr error - if maj, serr = strconv.Atoi(vs[0]); serr != nil { - errc <- serr - return - } - if min, serr = strconv.Atoi(vs[1]); serr != nil { - errc <- serr - return - } - } - if maj < 3 || (maj == 3 && min < 4) { - rerr = ErrOldCluster - } - errc <- rerr - }(ep) - } - // wait for success - for range eps { - if err = <-errc; err != nil { - break - } - } - cancel() - wg.Wait() - return err -} - -// ActiveConnection returns the current in-use connection -func (c *Client) ActiveConnection() *grpc.ClientConn { return c.conn } - -// isHaltErr returns true if the given error and context indicate no forward -// progress can be made, even after reconnecting. -func isHaltErr(ctx context.Context, err error) bool { - if ctx != nil && ctx.Err() != nil { - return true - } - if err == nil { - return false - } - ev, _ := status.FromError(err) - // Unavailable codes mean the system will be right back. - // (e.g., can't connect, lost leader) - // Treat Internal codes as if something failed, leaving the - // system in an inconsistent state, but retrying could make progress. - // (e.g., failed in middle of send, corrupted frame) - // TODO: are permanent Internal errors possible from grpc? - return ev.Code() != codes.Unavailable && ev.Code() != codes.Internal -} - -// isUnavailableErr returns true if the given error is an unavailable error -func isUnavailableErr(ctx context.Context, err error) bool { - if ctx != nil && ctx.Err() != nil { - return false - } - if err == nil { - return false - } - ev, ok := status.FromError(err) - if ok { - // Unavailable codes mean the system will be right back. - // (e.g., can't connect, lost leader) - return ev.Code() == codes.Unavailable - } - return false -} - -func toErr(ctx context.Context, err error) error { - if err == nil { - return nil - } - err = rpctypes.Error(err) - if _, ok := err.(rpctypes.EtcdError); ok { - return err - } - if ev, ok := status.FromError(err); ok { - code := ev.Code() - switch code { - case codes.DeadlineExceeded: - fallthrough - case codes.Canceled: - if ctx.Err() != nil { - err = ctx.Err() - } - } - } - return err -} - -func canceledByCaller(stopCtx context.Context, err error) bool { - if stopCtx.Err() == nil || err == nil { - return false - } - - return err == context.Canceled || err == context.DeadlineExceeded -} - -// IsConnCanceled returns true, if error is from a closed gRPC connection. -// ref. https://github.com/grpc/grpc-go/pull/1854 -func IsConnCanceled(err error) bool { - if err == nil { - return false - } - - // >= gRPC v1.23.x - s, ok := status.FromError(err) - if ok { - // connection is canceled or server has already closed the connection - return s.Code() == codes.Canceled || s.Message() == "transport is closing" - } - - // >= gRPC v1.10.x - if err == context.Canceled { - return true - } - - // <= gRPC v1.7.x returns 'errors.New("grpc: the client connection is closing")' - return strings.Contains(err.Error(), "grpc: the client connection is closing") -} diff --git a/vendor/go.etcd.io/etcd/client/v3/cluster.go b/vendor/go.etcd.io/etcd/client/v3/cluster.go deleted file mode 100644 index 92d7cdb56b0..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/cluster.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "context" - - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/client/pkg/v3/types" - - "google.golang.org/grpc" -) - -type ( - Member pb.Member - MemberListResponse pb.MemberListResponse - MemberAddResponse pb.MemberAddResponse - MemberRemoveResponse pb.MemberRemoveResponse - MemberUpdateResponse pb.MemberUpdateResponse - MemberPromoteResponse pb.MemberPromoteResponse -) - -type Cluster interface { - // MemberList lists the current cluster membership. - MemberList(ctx context.Context) (*MemberListResponse, error) - - // MemberAdd adds a new member into the cluster. - MemberAdd(ctx context.Context, peerAddrs []string) (*MemberAddResponse, error) - - // MemberAddAsLearner adds a new learner member into the cluster. - MemberAddAsLearner(ctx context.Context, peerAddrs []string) (*MemberAddResponse, error) - - // MemberRemove removes an existing member from the cluster. - MemberRemove(ctx context.Context, id uint64) (*MemberRemoveResponse, error) - - // MemberUpdate updates the peer addresses of the member. - MemberUpdate(ctx context.Context, id uint64, peerAddrs []string) (*MemberUpdateResponse, error) - - // MemberPromote promotes a member from raft learner (non-voting) to raft voting member. - MemberPromote(ctx context.Context, id uint64) (*MemberPromoteResponse, error) -} - -type cluster struct { - remote pb.ClusterClient - callOpts []grpc.CallOption -} - -func NewCluster(c *Client) Cluster { - api := &cluster{remote: RetryClusterClient(c)} - if c != nil { - api.callOpts = c.callOpts - } - return api -} - -func NewClusterFromClusterClient(remote pb.ClusterClient, c *Client) Cluster { - api := &cluster{remote: remote} - if c != nil { - api.callOpts = c.callOpts - } - return api -} - -func (c *cluster) MemberAdd(ctx context.Context, peerAddrs []string) (*MemberAddResponse, error) { - return c.memberAdd(ctx, peerAddrs, false) -} - -func (c *cluster) MemberAddAsLearner(ctx context.Context, peerAddrs []string) (*MemberAddResponse, error) { - return c.memberAdd(ctx, peerAddrs, true) -} - -func (c *cluster) memberAdd(ctx context.Context, peerAddrs []string, isLearner bool) (*MemberAddResponse, error) { - // fail-fast before panic in rafthttp - if _, err := types.NewURLs(peerAddrs); err != nil { - return nil, err - } - - r := &pb.MemberAddRequest{ - PeerURLs: peerAddrs, - IsLearner: isLearner, - } - resp, err := c.remote.MemberAdd(ctx, r, c.callOpts...) - if err != nil { - return nil, toErr(ctx, err) - } - return (*MemberAddResponse)(resp), nil -} - -func (c *cluster) MemberRemove(ctx context.Context, id uint64) (*MemberRemoveResponse, error) { - r := &pb.MemberRemoveRequest{ID: id} - resp, err := c.remote.MemberRemove(ctx, r, c.callOpts...) - if err != nil { - return nil, toErr(ctx, err) - } - return (*MemberRemoveResponse)(resp), nil -} - -func (c *cluster) MemberUpdate(ctx context.Context, id uint64, peerAddrs []string) (*MemberUpdateResponse, error) { - // fail-fast before panic in rafthttp - if _, err := types.NewURLs(peerAddrs); err != nil { - return nil, err - } - - // it is safe to retry on update. - r := &pb.MemberUpdateRequest{ID: id, PeerURLs: peerAddrs} - resp, err := c.remote.MemberUpdate(ctx, r, c.callOpts...) - if err == nil { - return (*MemberUpdateResponse)(resp), nil - } - return nil, toErr(ctx, err) -} - -func (c *cluster) MemberList(ctx context.Context) (*MemberListResponse, error) { - // it is safe to retry on list. - resp, err := c.remote.MemberList(ctx, &pb.MemberListRequest{Linearizable: true}, c.callOpts...) - if err == nil { - return (*MemberListResponse)(resp), nil - } - return nil, toErr(ctx, err) -} - -func (c *cluster) MemberPromote(ctx context.Context, id uint64) (*MemberPromoteResponse, error) { - r := &pb.MemberPromoteRequest{ID: id} - resp, err := c.remote.MemberPromote(ctx, r, c.callOpts...) - if err != nil { - return nil, toErr(ctx, err) - } - return (*MemberPromoteResponse)(resp), nil -} diff --git a/vendor/go.etcd.io/etcd/client/v3/compact_op.go b/vendor/go.etcd.io/etcd/client/v3/compact_op.go deleted file mode 100644 index a6e660aa825..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/compact_op.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - pb "go.etcd.io/etcd/api/v3/etcdserverpb" -) - -// CompactOp represents a compact operation. -type CompactOp struct { - revision int64 - physical bool -} - -// CompactOption configures compact operation. -type CompactOption func(*CompactOp) - -func (op *CompactOp) applyCompactOpts(opts []CompactOption) { - for _, opt := range opts { - opt(op) - } -} - -// OpCompact wraps slice CompactOption to create a CompactOp. -func OpCompact(rev int64, opts ...CompactOption) CompactOp { - ret := CompactOp{revision: rev} - ret.applyCompactOpts(opts) - return ret -} - -func (op CompactOp) toRequest() *pb.CompactionRequest { - return &pb.CompactionRequest{Revision: op.revision, Physical: op.physical} -} - -// WithCompactPhysical makes Compact wait until all compacted entries are -// removed from the etcd server's storage. -func WithCompactPhysical() CompactOption { - return func(op *CompactOp) { op.physical = true } -} diff --git a/vendor/go.etcd.io/etcd/client/v3/compare.go b/vendor/go.etcd.io/etcd/client/v3/compare.go deleted file mode 100644 index e2967cf38ed..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/compare.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - pb "go.etcd.io/etcd/api/v3/etcdserverpb" -) - -type CompareTarget int -type CompareResult int - -const ( - CompareVersion CompareTarget = iota - CompareCreated - CompareModified - CompareValue -) - -type Cmp pb.Compare - -func Compare(cmp Cmp, result string, v interface{}) Cmp { - var r pb.Compare_CompareResult - - switch result { - case "=": - r = pb.Compare_EQUAL - case "!=": - r = pb.Compare_NOT_EQUAL - case ">": - r = pb.Compare_GREATER - case "<": - r = pb.Compare_LESS - default: - panic("Unknown result op") - } - - cmp.Result = r - switch cmp.Target { - case pb.Compare_VALUE: - val, ok := v.(string) - if !ok { - panic("bad compare value") - } - cmp.TargetUnion = &pb.Compare_Value{Value: []byte(val)} - case pb.Compare_VERSION: - cmp.TargetUnion = &pb.Compare_Version{Version: mustInt64(v)} - case pb.Compare_CREATE: - cmp.TargetUnion = &pb.Compare_CreateRevision{CreateRevision: mustInt64(v)} - case pb.Compare_MOD: - cmp.TargetUnion = &pb.Compare_ModRevision{ModRevision: mustInt64(v)} - case pb.Compare_LEASE: - cmp.TargetUnion = &pb.Compare_Lease{Lease: mustInt64orLeaseID(v)} - default: - panic("Unknown compare type") - } - return cmp -} - -func Value(key string) Cmp { - return Cmp{Key: []byte(key), Target: pb.Compare_VALUE} -} - -func Version(key string) Cmp { - return Cmp{Key: []byte(key), Target: pb.Compare_VERSION} -} - -func CreateRevision(key string) Cmp { - return Cmp{Key: []byte(key), Target: pb.Compare_CREATE} -} - -func ModRevision(key string) Cmp { - return Cmp{Key: []byte(key), Target: pb.Compare_MOD} -} - -// LeaseValue compares a key's LeaseID to a value of your choosing. The empty -// LeaseID is 0, otherwise known as `NoLease`. -func LeaseValue(key string) Cmp { - return Cmp{Key: []byte(key), Target: pb.Compare_LEASE} -} - -// KeyBytes returns the byte slice holding with the comparison key. -func (cmp *Cmp) KeyBytes() []byte { return cmp.Key } - -// WithKeyBytes sets the byte slice for the comparison key. -func (cmp *Cmp) WithKeyBytes(key []byte) { cmp.Key = key } - -// ValueBytes returns the byte slice holding the comparison value, if any. -func (cmp *Cmp) ValueBytes() []byte { - if tu, ok := cmp.TargetUnion.(*pb.Compare_Value); ok { - return tu.Value - } - return nil -} - -// WithValueBytes sets the byte slice for the comparison's value. -func (cmp *Cmp) WithValueBytes(v []byte) { cmp.TargetUnion.(*pb.Compare_Value).Value = v } - -// WithRange sets the comparison to scan the range [key, end). -func (cmp Cmp) WithRange(end string) Cmp { - cmp.RangeEnd = []byte(end) - return cmp -} - -// WithPrefix sets the comparison to scan all keys prefixed by the key. -func (cmp Cmp) WithPrefix() Cmp { - cmp.RangeEnd = getPrefix(cmp.Key) - return cmp -} - -// mustInt64 panics if val isn't an int or int64. It returns an int64 otherwise. -func mustInt64(val interface{}) int64 { - if v, ok := val.(int64); ok { - return v - } - if v, ok := val.(int); ok { - return int64(v) - } - panic("bad value") -} - -// mustInt64orLeaseID panics if val isn't a LeaseID, int or int64. It returns an -// int64 otherwise. -func mustInt64orLeaseID(val interface{}) int64 { - if v, ok := val.(LeaseID); ok { - return int64(v) - } - return mustInt64(val) -} diff --git a/vendor/go.etcd.io/etcd/client/v3/concurrency/doc.go b/vendor/go.etcd.io/etcd/client/v3/concurrency/doc.go deleted file mode 100644 index dcdbf511d1b..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/concurrency/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package concurrency implements concurrency operations on top of -// etcd such as distributed locks, barriers, and elections. -package concurrency diff --git a/vendor/go.etcd.io/etcd/client/v3/concurrency/election.go b/vendor/go.etcd.io/etcd/client/v3/concurrency/election.go deleted file mode 100644 index 31e93d24280..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/concurrency/election.go +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package concurrency - -import ( - "context" - "errors" - "fmt" - - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/api/v3/mvccpb" - v3 "go.etcd.io/etcd/client/v3" -) - -var ( - ErrElectionNotLeader = errors.New("election: not leader") - ErrElectionNoLeader = errors.New("election: no leader") -) - -type Election struct { - session *Session - - keyPrefix string - - leaderKey string - leaderRev int64 - leaderSession *Session - hdr *pb.ResponseHeader -} - -// NewElection returns a new election on a given key prefix. -func NewElection(s *Session, pfx string) *Election { - return &Election{session: s, keyPrefix: pfx + "/"} -} - -// ResumeElection initializes an election with a known leader. -func ResumeElection(s *Session, pfx string, leaderKey string, leaderRev int64) *Election { - return &Election{ - keyPrefix: pfx, - session: s, - leaderKey: leaderKey, - leaderRev: leaderRev, - leaderSession: s, - } -} - -// Campaign puts a value as eligible for the election on the prefix -// key. -// Multiple sessions can participate in the election for the -// same prefix, but only one can be the leader at a time. -// -// If the context is 'context.TODO()/context.Background()', the Campaign -// will continue to be blocked for other keys to be deleted, unless server -// returns a non-recoverable error (e.g. ErrCompacted). -// Otherwise, until the context is not cancelled or timed-out, Campaign will -// continue to be blocked until it becomes the leader. -func (e *Election) Campaign(ctx context.Context, val string) error { - s := e.session - client := e.session.Client() - - k := fmt.Sprintf("%s%x", e.keyPrefix, s.Lease()) - txn := client.Txn(ctx).If(v3.Compare(v3.CreateRevision(k), "=", 0)) - txn = txn.Then(v3.OpPut(k, val, v3.WithLease(s.Lease()))) - txn = txn.Else(v3.OpGet(k)) - resp, err := txn.Commit() - if err != nil { - return err - } - e.leaderKey, e.leaderRev, e.leaderSession = k, resp.Header.Revision, s - if !resp.Succeeded { - kv := resp.Responses[0].GetResponseRange().Kvs[0] - e.leaderRev = kv.CreateRevision - if string(kv.Value) != val { - if err = e.Proclaim(ctx, val); err != nil { - e.Resign(ctx) - return err - } - } - } - - _, err = waitDeletes(ctx, client, e.keyPrefix, e.leaderRev-1) - if err != nil { - // clean up in case of context cancel - select { - case <-ctx.Done(): - e.Resign(client.Ctx()) - default: - e.leaderSession = nil - } - return err - } - e.hdr = resp.Header - - return nil -} - -// Proclaim lets the leader announce a new value without another election. -func (e *Election) Proclaim(ctx context.Context, val string) error { - if e.leaderSession == nil { - return ErrElectionNotLeader - } - client := e.session.Client() - cmp := v3.Compare(v3.CreateRevision(e.leaderKey), "=", e.leaderRev) - txn := client.Txn(ctx).If(cmp) - txn = txn.Then(v3.OpPut(e.leaderKey, val, v3.WithLease(e.leaderSession.Lease()))) - tresp, terr := txn.Commit() - if terr != nil { - return terr - } - if !tresp.Succeeded { - e.leaderKey = "" - return ErrElectionNotLeader - } - - e.hdr = tresp.Header - return nil -} - -// Resign lets a leader start a new election. -func (e *Election) Resign(ctx context.Context) (err error) { - if e.leaderSession == nil { - return nil - } - client := e.session.Client() - cmp := v3.Compare(v3.CreateRevision(e.leaderKey), "=", e.leaderRev) - resp, err := client.Txn(ctx).If(cmp).Then(v3.OpDelete(e.leaderKey)).Commit() - if err == nil { - e.hdr = resp.Header - } - e.leaderKey = "" - e.leaderSession = nil - return err -} - -// Leader returns the leader value for the current election. -func (e *Election) Leader(ctx context.Context) (*v3.GetResponse, error) { - client := e.session.Client() - resp, err := client.Get(ctx, e.keyPrefix, v3.WithFirstCreate()...) - if err != nil { - return nil, err - } else if len(resp.Kvs) == 0 { - // no leader currently elected - return nil, ErrElectionNoLeader - } - return resp, nil -} - -// Observe returns a channel that reliably observes ordered leader proposals -// as GetResponse values on every current elected leader key. It will not -// necessarily fetch all historical leader updates, but will always post the -// most recent leader value. -// -// The channel closes when the context is canceled or the underlying watcher -// is otherwise disrupted. -func (e *Election) Observe(ctx context.Context) <-chan v3.GetResponse { - retc := make(chan v3.GetResponse) - go e.observe(ctx, retc) - return retc -} - -func (e *Election) observe(ctx context.Context, ch chan<- v3.GetResponse) { - client := e.session.Client() - - defer close(ch) - for { - resp, err := client.Get(ctx, e.keyPrefix, v3.WithFirstCreate()...) - if err != nil { - return - } - - var kv *mvccpb.KeyValue - var hdr *pb.ResponseHeader - - if len(resp.Kvs) == 0 { - cctx, cancel := context.WithCancel(ctx) - // wait for first key put on prefix - opts := []v3.OpOption{v3.WithRev(resp.Header.Revision), v3.WithPrefix()} - wch := client.Watch(cctx, e.keyPrefix, opts...) - for kv == nil { - wr, ok := <-wch - if !ok || wr.Err() != nil { - cancel() - return - } - // only accept puts; a delete will make observe() spin - for _, ev := range wr.Events { - if ev.Type == mvccpb.PUT { - hdr, kv = &wr.Header, ev.Kv - // may have multiple revs; hdr.rev = the last rev - // set to kv's rev in case batch has multiple Puts - hdr.Revision = kv.ModRevision - break - } - } - } - cancel() - } else { - hdr, kv = resp.Header, resp.Kvs[0] - } - - select { - case ch <- v3.GetResponse{Header: hdr, Kvs: []*mvccpb.KeyValue{kv}}: - case <-ctx.Done(): - return - } - - cctx, cancel := context.WithCancel(ctx) - wch := client.Watch(cctx, string(kv.Key), v3.WithRev(hdr.Revision+1)) - keyDeleted := false - for !keyDeleted { - wr, ok := <-wch - if !ok { - cancel() - return - } - for _, ev := range wr.Events { - if ev.Type == mvccpb.DELETE { - keyDeleted = true - break - } - resp.Header = &wr.Header - resp.Kvs = []*mvccpb.KeyValue{ev.Kv} - select { - case ch <- *resp: - case <-cctx.Done(): - cancel() - return - } - } - } - cancel() - } -} - -// Key returns the leader key if elected, empty string otherwise. -func (e *Election) Key() string { return e.leaderKey } - -// Rev returns the leader key's creation revision, if elected. -func (e *Election) Rev() int64 { return e.leaderRev } - -// Header is the response header from the last successful election proposal. -func (e *Election) Header() *pb.ResponseHeader { return e.hdr } diff --git a/vendor/go.etcd.io/etcd/client/v3/concurrency/key.go b/vendor/go.etcd.io/etcd/client/v3/concurrency/key.go deleted file mode 100644 index 20825950f30..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/concurrency/key.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package concurrency - -import ( - "context" - "fmt" - - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/api/v3/mvccpb" - v3 "go.etcd.io/etcd/client/v3" -) - -func waitDelete(ctx context.Context, client *v3.Client, key string, rev int64) error { - cctx, cancel := context.WithCancel(ctx) - defer cancel() - - var wr v3.WatchResponse - wch := client.Watch(cctx, key, v3.WithRev(rev)) - for wr = range wch { - for _, ev := range wr.Events { - if ev.Type == mvccpb.DELETE { - return nil - } - } - } - if err := wr.Err(); err != nil { - return err - } - if err := ctx.Err(); err != nil { - return err - } - return fmt.Errorf("lost watcher waiting for delete") -} - -// waitDeletes efficiently waits until all keys matching the prefix and no greater -// than the create revision. -func waitDeletes(ctx context.Context, client *v3.Client, pfx string, maxCreateRev int64) (*pb.ResponseHeader, error) { - getOpts := append(v3.WithLastCreate(), v3.WithMaxCreateRev(maxCreateRev)) - for { - resp, err := client.Get(ctx, pfx, getOpts...) - if err != nil { - return nil, err - } - if len(resp.Kvs) == 0 { - return resp.Header, nil - } - lastKey := string(resp.Kvs[0].Key) - if err = waitDelete(ctx, client, lastKey, resp.Header.Revision); err != nil { - return nil, err - } - } -} diff --git a/vendor/go.etcd.io/etcd/client/v3/concurrency/mutex.go b/vendor/go.etcd.io/etcd/client/v3/concurrency/mutex.go deleted file mode 100644 index c3800d6282a..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/concurrency/mutex.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package concurrency - -import ( - "context" - "errors" - "fmt" - "sync" - - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - v3 "go.etcd.io/etcd/client/v3" -) - -// ErrLocked is returned by TryLock when Mutex is already locked by another session. -var ErrLocked = errors.New("mutex: Locked by another session") -var ErrSessionExpired = errors.New("mutex: session is expired") - -// Mutex implements the sync Locker interface with etcd -type Mutex struct { - s *Session - - pfx string - myKey string - myRev int64 - hdr *pb.ResponseHeader -} - -func NewMutex(s *Session, pfx string) *Mutex { - return &Mutex{s, pfx + "/", "", -1, nil} -} - -// TryLock locks the mutex if not already locked by another session. -// If lock is held by another session, return immediately after attempting necessary cleanup -// The ctx argument is used for the sending/receiving Txn RPC. -func (m *Mutex) TryLock(ctx context.Context) error { - resp, err := m.tryAcquire(ctx) - if err != nil { - return err - } - // if no key on prefix / the minimum rev is key, already hold the lock - ownerKey := resp.Responses[1].GetResponseRange().Kvs - if len(ownerKey) == 0 || ownerKey[0].CreateRevision == m.myRev { - m.hdr = resp.Header - return nil - } - client := m.s.Client() - // Cannot lock, so delete the key - if _, err := client.Delete(ctx, m.myKey); err != nil { - return err - } - m.myKey = "\x00" - m.myRev = -1 - return ErrLocked -} - -// Lock locks the mutex with a cancelable context. If the context is canceled -// while trying to acquire the lock, the mutex tries to clean its stale lock entry. -func (m *Mutex) Lock(ctx context.Context) error { - resp, err := m.tryAcquire(ctx) - if err != nil { - return err - } - // if no key on prefix / the minimum rev is key, already hold the lock - ownerKey := resp.Responses[1].GetResponseRange().Kvs - if len(ownerKey) == 0 || ownerKey[0].CreateRevision == m.myRev { - m.hdr = resp.Header - return nil - } - client := m.s.Client() - // wait for deletion revisions prior to myKey - // TODO: early termination if the session key is deleted before other session keys with smaller revisions. - _, werr := waitDeletes(ctx, client, m.pfx, m.myRev-1) - // release lock key if wait failed - if werr != nil { - m.Unlock(client.Ctx()) - return werr - } - - // make sure the session is not expired, and the owner key still exists. - gresp, werr := client.Get(ctx, m.myKey) - if werr != nil { - m.Unlock(client.Ctx()) - return werr - } - - if len(gresp.Kvs) == 0 { // is the session key lost? - return ErrSessionExpired - } - m.hdr = gresp.Header - - return nil -} - -func (m *Mutex) tryAcquire(ctx context.Context) (*v3.TxnResponse, error) { - s := m.s - client := m.s.Client() - - m.myKey = fmt.Sprintf("%s%x", m.pfx, s.Lease()) - cmp := v3.Compare(v3.CreateRevision(m.myKey), "=", 0) - // put self in lock waiters via myKey; oldest waiter holds lock - put := v3.OpPut(m.myKey, "", v3.WithLease(s.Lease())) - // reuse key in case this session already holds the lock - get := v3.OpGet(m.myKey) - // fetch current holder to complete uncontended path with only one RPC - getOwner := v3.OpGet(m.pfx, v3.WithFirstCreate()...) - resp, err := client.Txn(ctx).If(cmp).Then(put, getOwner).Else(get, getOwner).Commit() - if err != nil { - return nil, err - } - m.myRev = resp.Header.Revision - if !resp.Succeeded { - m.myRev = resp.Responses[0].GetResponseRange().Kvs[0].CreateRevision - } - return resp, nil -} - -func (m *Mutex) Unlock(ctx context.Context) error { - client := m.s.Client() - if _, err := client.Delete(ctx, m.myKey); err != nil { - return err - } - m.myKey = "\x00" - m.myRev = -1 - return nil -} - -func (m *Mutex) IsOwner() v3.Cmp { - return v3.Compare(v3.CreateRevision(m.myKey), "=", m.myRev) -} - -func (m *Mutex) Key() string { return m.myKey } - -// Header is the response header received from etcd on acquiring the lock. -func (m *Mutex) Header() *pb.ResponseHeader { return m.hdr } - -type lockerMutex struct{ *Mutex } - -func (lm *lockerMutex) Lock() { - client := lm.s.Client() - if err := lm.Mutex.Lock(client.Ctx()); err != nil { - panic(err) - } -} -func (lm *lockerMutex) Unlock() { - client := lm.s.Client() - if err := lm.Mutex.Unlock(client.Ctx()); err != nil { - panic(err) - } -} - -// NewLocker creates a sync.Locker backed by an etcd mutex. -func NewLocker(s *Session, pfx string) sync.Locker { - return &lockerMutex{NewMutex(s, pfx)} -} diff --git a/vendor/go.etcd.io/etcd/client/v3/concurrency/session.go b/vendor/go.etcd.io/etcd/client/v3/concurrency/session.go deleted file mode 100644 index 7143cc47471..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/concurrency/session.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package concurrency - -import ( - "context" - "time" - - v3 "go.etcd.io/etcd/client/v3" -) - -const defaultSessionTTL = 60 - -// Session represents a lease kept alive for the lifetime of a client. -// Fault-tolerant applications may use sessions to reason about liveness. -type Session struct { - client *v3.Client - opts *sessionOptions - id v3.LeaseID - - cancel context.CancelFunc - donec <-chan struct{} -} - -// NewSession gets the leased session for a client. -func NewSession(client *v3.Client, opts ...SessionOption) (*Session, error) { - ops := &sessionOptions{ttl: defaultSessionTTL, ctx: client.Ctx()} - for _, opt := range opts { - opt(ops) - } - - id := ops.leaseID - if id == v3.NoLease { - resp, err := client.Grant(ops.ctx, int64(ops.ttl)) - if err != nil { - return nil, err - } - id = resp.ID - } - - ctx, cancel := context.WithCancel(ops.ctx) - keepAlive, err := client.KeepAlive(ctx, id) - if err != nil || keepAlive == nil { - cancel() - return nil, err - } - - donec := make(chan struct{}) - s := &Session{client: client, opts: ops, id: id, cancel: cancel, donec: donec} - - // keep the lease alive until client error or cancelled context - go func() { - defer close(donec) - for range keepAlive { - // eat messages until keep alive channel closes - } - }() - - return s, nil -} - -// Client is the etcd client that is attached to the session. -func (s *Session) Client() *v3.Client { - return s.client -} - -// Lease is the lease ID for keys bound to the session. -func (s *Session) Lease() v3.LeaseID { return s.id } - -// Done returns a channel that closes when the lease is orphaned, expires, or -// is otherwise no longer being refreshed. -func (s *Session) Done() <-chan struct{} { return s.donec } - -// Orphan ends the refresh for the session lease. This is useful -// in case the state of the client connection is indeterminate (revoke -// would fail) or when transferring lease ownership. -func (s *Session) Orphan() { - s.cancel() - <-s.donec -} - -// Close orphans the session and revokes the session lease. -func (s *Session) Close() error { - s.Orphan() - // if revoke takes longer than the ttl, lease is expired anyway - ctx, cancel := context.WithTimeout(s.opts.ctx, time.Duration(s.opts.ttl)*time.Second) - _, err := s.client.Revoke(ctx, s.id) - cancel() - return err -} - -type sessionOptions struct { - ttl int - leaseID v3.LeaseID - ctx context.Context -} - -// SessionOption configures Session. -type SessionOption func(*sessionOptions) - -// WithTTL configures the session's TTL in seconds. -// If TTL is <= 0, the default 60 seconds TTL will be used. -func WithTTL(ttl int) SessionOption { - return func(so *sessionOptions) { - if ttl > 0 { - so.ttl = ttl - } - } -} - -// WithLease specifies the existing leaseID to be used for the session. -// This is useful in process restart scenario, for example, to reclaim -// leadership from an election prior to restart. -func WithLease(leaseID v3.LeaseID) SessionOption { - return func(so *sessionOptions) { - so.leaseID = leaseID - } -} - -// WithContext assigns a context to the session instead of defaulting to -// using the client context. This is useful for canceling NewSession and -// Close operations immediately without having to close the client. If the -// context is canceled before Close() completes, the session's lease will be -// abandoned and left to expire instead of being revoked. -func WithContext(ctx context.Context) SessionOption { - return func(so *sessionOptions) { - so.ctx = ctx - } -} diff --git a/vendor/go.etcd.io/etcd/client/v3/concurrency/stm.go b/vendor/go.etcd.io/etcd/client/v3/concurrency/stm.go deleted file mode 100644 index ba7303d0977..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/concurrency/stm.go +++ /dev/null @@ -1,387 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package concurrency - -import ( - "context" - "math" - - v3 "go.etcd.io/etcd/client/v3" -) - -// STM is an interface for software transactional memory. -type STM interface { - // Get returns the value for a key and inserts the key in the txn's read set. - // If Get fails, it aborts the transaction with an error, never returning. - Get(key ...string) string - // Put adds a value for a key to the write set. - Put(key, val string, opts ...v3.OpOption) - // Rev returns the revision of a key in the read set. - Rev(key string) int64 - // Del deletes a key. - Del(key string) - - // commit attempts to apply the txn's changes to the server. - commit() *v3.TxnResponse - reset() -} - -// Isolation is an enumeration of transactional isolation levels which -// describes how transactions should interfere and conflict. -type Isolation int - -const ( - // SerializableSnapshot provides serializable isolation and also checks - // for write conflicts. - SerializableSnapshot Isolation = iota - // Serializable reads within the same transaction attempt return data - // from the at the revision of the first read. - Serializable - // RepeatableReads reads within the same transaction attempt always - // return the same data. - RepeatableReads - // ReadCommitted reads keys from any committed revision. - ReadCommitted -) - -// stmError safely passes STM errors through panic to the STM error channel. -type stmError struct{ err error } - -type stmOptions struct { - iso Isolation - ctx context.Context - prefetch []string -} - -type stmOption func(*stmOptions) - -// WithIsolation specifies the transaction isolation level. -func WithIsolation(lvl Isolation) stmOption { - return func(so *stmOptions) { so.iso = lvl } -} - -// WithAbortContext specifies the context for permanently aborting the transaction. -func WithAbortContext(ctx context.Context) stmOption { - return func(so *stmOptions) { so.ctx = ctx } -} - -// WithPrefetch is a hint to prefetch a list of keys before trying to apply. -// If an STM transaction will unconditionally fetch a set of keys, prefetching -// those keys will save the round-trip cost from requesting each key one by one -// with Get(). -func WithPrefetch(keys ...string) stmOption { - return func(so *stmOptions) { so.prefetch = append(so.prefetch, keys...) } -} - -// NewSTM initiates a new STM instance, using serializable snapshot isolation by default. -func NewSTM(c *v3.Client, apply func(STM) error, so ...stmOption) (*v3.TxnResponse, error) { - opts := &stmOptions{ctx: c.Ctx()} - for _, f := range so { - f(opts) - } - if len(opts.prefetch) != 0 { - f := apply - apply = func(s STM) error { - s.Get(opts.prefetch...) - return f(s) - } - } - return runSTM(mkSTM(c, opts), apply) -} - -func mkSTM(c *v3.Client, opts *stmOptions) STM { - switch opts.iso { - case SerializableSnapshot: - s := &stmSerializable{ - stm: stm{client: c, ctx: opts.ctx}, - prefetch: make(map[string]*v3.GetResponse), - } - s.conflicts = func() []v3.Cmp { - return append(s.rset.cmps(), s.wset.cmps(s.rset.first()+1)...) - } - return s - case Serializable: - s := &stmSerializable{ - stm: stm{client: c, ctx: opts.ctx}, - prefetch: make(map[string]*v3.GetResponse), - } - s.conflicts = func() []v3.Cmp { return s.rset.cmps() } - return s - case RepeatableReads: - s := &stm{client: c, ctx: opts.ctx, getOpts: []v3.OpOption{v3.WithSerializable()}} - s.conflicts = func() []v3.Cmp { return s.rset.cmps() } - return s - case ReadCommitted: - s := &stm{client: c, ctx: opts.ctx, getOpts: []v3.OpOption{v3.WithSerializable()}} - s.conflicts = func() []v3.Cmp { return nil } - return s - default: - panic("unsupported stm") - } -} - -type stmResponse struct { - resp *v3.TxnResponse - err error -} - -func runSTM(s STM, apply func(STM) error) (*v3.TxnResponse, error) { - outc := make(chan stmResponse, 1) - go func() { - defer func() { - if r := recover(); r != nil { - e, ok := r.(stmError) - if !ok { - // client apply panicked - panic(r) - } - outc <- stmResponse{nil, e.err} - } - }() - var out stmResponse - for { - s.reset() - if out.err = apply(s); out.err != nil { - break - } - if out.resp = s.commit(); out.resp != nil { - break - } - } - outc <- out - }() - r := <-outc - return r.resp, r.err -} - -// stm implements repeatable-read software transactional memory over etcd -type stm struct { - client *v3.Client - ctx context.Context - // rset holds read key values and revisions - rset readSet - // wset holds overwritten keys and their values - wset writeSet - // getOpts are the opts used for gets - getOpts []v3.OpOption - // conflicts computes the current conflicts on the txn - conflicts func() []v3.Cmp -} - -type stmPut struct { - val string - op v3.Op -} - -type readSet map[string]*v3.GetResponse - -func (rs readSet) add(keys []string, txnresp *v3.TxnResponse) { - for i, resp := range txnresp.Responses { - rs[keys[i]] = (*v3.GetResponse)(resp.GetResponseRange()) - } -} - -// first returns the store revision from the first fetch -func (rs readSet) first() int64 { - ret := int64(math.MaxInt64 - 1) - for _, resp := range rs { - if rev := resp.Header.Revision; rev < ret { - ret = rev - } - } - return ret -} - -// cmps guards the txn from updates to read set -func (rs readSet) cmps() []v3.Cmp { - cmps := make([]v3.Cmp, 0, len(rs)) - for k, rk := range rs { - cmps = append(cmps, isKeyCurrent(k, rk)) - } - return cmps -} - -type writeSet map[string]stmPut - -func (ws writeSet) get(keys ...string) *stmPut { - for _, key := range keys { - if wv, ok := ws[key]; ok { - return &wv - } - } - return nil -} - -// cmps returns a cmp list testing no writes have happened past rev -func (ws writeSet) cmps(rev int64) []v3.Cmp { - cmps := make([]v3.Cmp, 0, len(ws)) - for key := range ws { - cmps = append(cmps, v3.Compare(v3.ModRevision(key), "<", rev)) - } - return cmps -} - -// puts is the list of ops for all pending writes -func (ws writeSet) puts() []v3.Op { - puts := make([]v3.Op, 0, len(ws)) - for _, v := range ws { - puts = append(puts, v.op) - } - return puts -} - -func (s *stm) Get(keys ...string) string { - if wv := s.wset.get(keys...); wv != nil { - return wv.val - } - return respToValue(s.fetch(keys...)) -} - -func (s *stm) Put(key, val string, opts ...v3.OpOption) { - s.wset[key] = stmPut{val, v3.OpPut(key, val, opts...)} -} - -func (s *stm) Del(key string) { s.wset[key] = stmPut{"", v3.OpDelete(key)} } - -func (s *stm) Rev(key string) int64 { - if resp := s.fetch(key); resp != nil && len(resp.Kvs) != 0 { - return resp.Kvs[0].ModRevision - } - return 0 -} - -func (s *stm) commit() *v3.TxnResponse { - txnresp, err := s.client.Txn(s.ctx).If(s.conflicts()...).Then(s.wset.puts()...).Commit() - if err != nil { - panic(stmError{err}) - } - if txnresp.Succeeded { - return txnresp - } - return nil -} - -func (s *stm) fetch(keys ...string) *v3.GetResponse { - if len(keys) == 0 { - return nil - } - ops := make([]v3.Op, len(keys)) - for i, key := range keys { - if resp, ok := s.rset[key]; ok { - return resp - } - ops[i] = v3.OpGet(key, s.getOpts...) - } - txnresp, err := s.client.Txn(s.ctx).Then(ops...).Commit() - if err != nil { - panic(stmError{err}) - } - s.rset.add(keys, txnresp) - return (*v3.GetResponse)(txnresp.Responses[0].GetResponseRange()) -} - -func (s *stm) reset() { - s.rset = make(map[string]*v3.GetResponse) - s.wset = make(map[string]stmPut) -} - -type stmSerializable struct { - stm - prefetch map[string]*v3.GetResponse -} - -func (s *stmSerializable) Get(keys ...string) string { - if wv := s.wset.get(keys...); wv != nil { - return wv.val - } - firstRead := len(s.rset) == 0 - for _, key := range keys { - if resp, ok := s.prefetch[key]; ok { - delete(s.prefetch, key) - s.rset[key] = resp - } - } - resp := s.stm.fetch(keys...) - if firstRead { - // txn's base revision is defined by the first read - s.getOpts = []v3.OpOption{ - v3.WithRev(resp.Header.Revision), - v3.WithSerializable(), - } - } - return respToValue(resp) -} - -func (s *stmSerializable) Rev(key string) int64 { - s.Get(key) - return s.stm.Rev(key) -} - -func (s *stmSerializable) gets() ([]string, []v3.Op) { - keys := make([]string, 0, len(s.rset)) - ops := make([]v3.Op, 0, len(s.rset)) - for k := range s.rset { - keys = append(keys, k) - ops = append(ops, v3.OpGet(k)) - } - return keys, ops -} - -func (s *stmSerializable) commit() *v3.TxnResponse { - keys, getops := s.gets() - txn := s.client.Txn(s.ctx).If(s.conflicts()...).Then(s.wset.puts()...) - // use Else to prefetch keys in case of conflict to save a round trip - txnresp, err := txn.Else(getops...).Commit() - if err != nil { - panic(stmError{err}) - } - if txnresp.Succeeded { - return txnresp - } - // load prefetch with Else data - s.rset.add(keys, txnresp) - s.prefetch = s.rset - s.getOpts = nil - return nil -} - -func isKeyCurrent(k string, r *v3.GetResponse) v3.Cmp { - if len(r.Kvs) != 0 { - return v3.Compare(v3.ModRevision(k), "=", r.Kvs[0].ModRevision) - } - return v3.Compare(v3.ModRevision(k), "=", 0) -} - -func respToValue(resp *v3.GetResponse) string { - if resp == nil || len(resp.Kvs) == 0 { - return "" - } - return string(resp.Kvs[0].Value) -} - -// NewSTMRepeatable is deprecated. -func NewSTMRepeatable(ctx context.Context, c *v3.Client, apply func(STM) error) (*v3.TxnResponse, error) { - return NewSTM(c, apply, WithAbortContext(ctx), WithIsolation(RepeatableReads)) -} - -// NewSTMSerializable is deprecated. -func NewSTMSerializable(ctx context.Context, c *v3.Client, apply func(STM) error) (*v3.TxnResponse, error) { - return NewSTM(c, apply, WithAbortContext(ctx), WithIsolation(Serializable)) -} - -// NewSTMReadCommitted is deprecated. -func NewSTMReadCommitted(ctx context.Context, c *v3.Client, apply func(STM) error) (*v3.TxnResponse, error) { - return NewSTM(c, apply, WithAbortContext(ctx), WithIsolation(ReadCommitted)) -} diff --git a/vendor/go.etcd.io/etcd/client/v3/config.go b/vendor/go.etcd.io/etcd/client/v3/config.go deleted file mode 100644 index 335a288732b..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/config.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "context" - "crypto/tls" - "time" - - "go.uber.org/zap" - "google.golang.org/grpc" -) - -type Config struct { - // Endpoints is a list of URLs. - Endpoints []string `json:"endpoints"` - - // AutoSyncInterval is the interval to update endpoints with its latest members. - // 0 disables auto-sync. By default auto-sync is disabled. - AutoSyncInterval time.Duration `json:"auto-sync-interval"` - - // DialTimeout is the timeout for failing to establish a connection. - DialTimeout time.Duration `json:"dial-timeout"` - - // DialKeepAliveTime is the time after which client pings the server to see if - // transport is alive. - DialKeepAliveTime time.Duration `json:"dial-keep-alive-time"` - - // DialKeepAliveTimeout is the time that the client waits for a response for the - // keep-alive probe. If the response is not received in this time, the connection is closed. - DialKeepAliveTimeout time.Duration `json:"dial-keep-alive-timeout"` - - // MaxCallSendMsgSize is the client-side request send limit in bytes. - // If 0, it defaults to 2.0 MiB (2 * 1024 * 1024). - // Make sure that "MaxCallSendMsgSize" < server-side default send/recv limit. - // ("--max-request-bytes" flag to etcd or "embed.Config.MaxRequestBytes"). - MaxCallSendMsgSize int - - // MaxCallRecvMsgSize is the client-side response receive limit. - // If 0, it defaults to "math.MaxInt32", because range response can - // easily exceed request send limits. - // Make sure that "MaxCallRecvMsgSize" >= server-side default send/recv limit. - // ("--max-request-bytes" flag to etcd or "embed.Config.MaxRequestBytes"). - MaxCallRecvMsgSize int - - // TLS holds the client secure credentials, if any. - TLS *tls.Config - - // Username is a user name for authentication. - Username string `json:"username"` - - // Password is a password for authentication. - Password string `json:"password"` - - // RejectOldCluster when set will refuse to create a client against an outdated cluster. - RejectOldCluster bool `json:"reject-old-cluster"` - - // DialOptions is a list of dial options for the grpc client (e.g., for interceptors). - // For example, pass "grpc.WithBlock()" to block until the underlying connection is up. - // Without this, Dial returns immediately and connecting the server happens in background. - DialOptions []grpc.DialOption - - // Context is the default client context; it can be used to cancel grpc dial out and - // other operations that do not have an explicit context. - Context context.Context - - // Logger sets client-side logger. - // If nil, fallback to building LogConfig. - Logger *zap.Logger - - // LogConfig configures client-side logger. - // If nil, use the default logger. - // TODO: configure gRPC logger - LogConfig *zap.Config - - // PermitWithoutStream when set will allow client to send keepalive pings to server without any active streams(RPCs). - PermitWithoutStream bool `json:"permit-without-stream"` - - // TODO: support custom balancer picker -} diff --git a/vendor/go.etcd.io/etcd/client/v3/credentials/credentials.go b/vendor/go.etcd.io/etcd/client/v3/credentials/credentials.go deleted file mode 100644 index 42f688eb359..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/credentials/credentials.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2019 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package credentials implements gRPC credential interface with etcd specific logic. -// e.g., client handshake with custom authority parameter -package credentials - -import ( - "context" - "crypto/tls" - "net" - "sync" - - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - grpccredentials "google.golang.org/grpc/credentials" -) - -// Config defines gRPC credential configuration. -type Config struct { - TLSConfig *tls.Config -} - -// Bundle defines gRPC credential interface. -type Bundle interface { - grpccredentials.Bundle - UpdateAuthToken(token string) -} - -// NewBundle constructs a new gRPC credential bundle. -func NewBundle(cfg Config) Bundle { - return &bundle{ - tc: newTransportCredential(cfg.TLSConfig), - rc: newPerRPCCredential(), - } -} - -// bundle implements "grpccredentials.Bundle" interface. -type bundle struct { - tc *transportCredential - rc *perRPCCredential -} - -func (b *bundle) TransportCredentials() grpccredentials.TransportCredentials { - return b.tc -} - -func (b *bundle) PerRPCCredentials() grpccredentials.PerRPCCredentials { - return b.rc -} - -func (b *bundle) NewWithMode(mode string) (grpccredentials.Bundle, error) { - // no-op - return nil, nil -} - -// transportCredential implements "grpccredentials.TransportCredentials" interface. -type transportCredential struct { - gtc grpccredentials.TransportCredentials -} - -func newTransportCredential(cfg *tls.Config) *transportCredential { - return &transportCredential{ - gtc: grpccredentials.NewTLS(cfg), - } -} - -func (tc *transportCredential) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (net.Conn, grpccredentials.AuthInfo, error) { - return tc.gtc.ClientHandshake(ctx, authority, rawConn) -} - -func (tc *transportCredential) ServerHandshake(rawConn net.Conn) (net.Conn, grpccredentials.AuthInfo, error) { - return tc.gtc.ServerHandshake(rawConn) -} - -func (tc *transportCredential) Info() grpccredentials.ProtocolInfo { - return tc.gtc.Info() -} - -func (tc *transportCredential) Clone() grpccredentials.TransportCredentials { - return &transportCredential{ - gtc: tc.gtc.Clone(), - } -} - -func (tc *transportCredential) OverrideServerName(serverNameOverride string) error { - return tc.gtc.OverrideServerName(serverNameOverride) -} - -// perRPCCredential implements "grpccredentials.PerRPCCredentials" interface. -type perRPCCredential struct { - authToken string - authTokenMu sync.RWMutex -} - -func newPerRPCCredential() *perRPCCredential { return &perRPCCredential{} } - -func (rc *perRPCCredential) RequireTransportSecurity() bool { return false } - -func (rc *perRPCCredential) GetRequestMetadata(ctx context.Context, s ...string) (map[string]string, error) { - rc.authTokenMu.RLock() - authToken := rc.authToken - rc.authTokenMu.RUnlock() - if authToken == "" { - return nil, nil - } - return map[string]string{rpctypes.TokenFieldNameGRPC: authToken}, nil -} - -func (b *bundle) UpdateAuthToken(token string) { - if b.rc == nil { - return - } - b.rc.UpdateAuthToken(token) -} - -func (rc *perRPCCredential) UpdateAuthToken(token string) { - rc.authTokenMu.Lock() - rc.authToken = token - rc.authTokenMu.Unlock() -} diff --git a/vendor/go.etcd.io/etcd/client/v3/ctx.go b/vendor/go.etcd.io/etcd/client/v3/ctx.go deleted file mode 100644 index 56b69cf2ede..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/ctx.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2020 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "context" - - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.etcd.io/etcd/api/v3/version" - "google.golang.org/grpc/metadata" -) - -// WithRequireLeader requires client requests to only succeed -// when the cluster has a leader. -func WithRequireLeader(ctx context.Context) context.Context { - md, ok := metadata.FromOutgoingContext(ctx) - if !ok { // no outgoing metadata ctx key, create one - md = metadata.Pairs(rpctypes.MetadataRequireLeaderKey, rpctypes.MetadataHasLeader) - return metadata.NewOutgoingContext(ctx, md) - } - copied := md.Copy() // avoid racey updates - // overwrite/add 'hasleader' key/value - copied.Set(rpctypes.MetadataRequireLeaderKey, rpctypes.MetadataHasLeader) - return metadata.NewOutgoingContext(ctx, copied) -} - -// embeds client version -func withVersion(ctx context.Context) context.Context { - md, ok := metadata.FromOutgoingContext(ctx) - if !ok { // no outgoing metadata ctx key, create one - md = metadata.Pairs(rpctypes.MetadataClientAPIVersionKey, version.APIVersion) - return metadata.NewOutgoingContext(ctx, md) - } - copied := md.Copy() // avoid racey updates - // overwrite/add version key/value - copied.Set(rpctypes.MetadataClientAPIVersionKey, version.APIVersion) - return metadata.NewOutgoingContext(ctx, copied) -} diff --git a/vendor/go.etcd.io/etcd/client/v3/doc.go b/vendor/go.etcd.io/etcd/client/v3/doc.go deleted file mode 100644 index fd61aff117a..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/doc.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package clientv3 implements the official Go etcd client for v3. -// -// Create client using `clientv3.New`: -// -// // expect dial time-out on ipv4 blackhole -// _, err := clientv3.New(clientv3.Config{ -// Endpoints: []string{"http://254.0.0.1:12345"}, -// DialTimeout: 2 * time.Second, -// }) -// -// // etcd clientv3 >= v3.2.10, grpc/grpc-go >= v1.7.3 -// if err == context.DeadlineExceeded { -// // handle errors -// } -// -// // etcd clientv3 <= v3.2.9, grpc/grpc-go <= v1.2.1 -// if err == grpc.ErrClientConnTimeout { -// // handle errors -// } -// -// cli, err := clientv3.New(clientv3.Config{ -// Endpoints: []string{"localhost:2379", "localhost:22379", "localhost:32379"}, -// DialTimeout: 5 * time.Second, -// }) -// if err != nil { -// // handle error! -// } -// defer cli.Close() -// -// Make sure to close the client after using it. If the client is not closed, the -// connection will have leaky goroutines. -// -// To specify a client request timeout, wrap the context with context.WithTimeout: -// -// ctx, cancel := context.WithTimeout(context.Background(), timeout) -// resp, err := kvc.Put(ctx, "sample_key", "sample_value") -// cancel() -// if err != nil { -// // handle error! -// } -// // use the response -// -// The Client has internal state (watchers and leases), so Clients should be reused instead of created as needed. -// Clients are safe for concurrent use by multiple goroutines. -// -// etcd client returns 2 types of errors: -// -// 1. context error: canceled or deadline exceeded. -// 2. gRPC error: e.g. when clock drifts in server-side before client's context deadline exceeded. -// -// See https://github.com/etcd-io/etcd/blob/main/api/v3rpc/rpctypes/error.go -// -// Here is the example code to handle client errors: -// -// resp, err := kvc.Put(ctx, "", "") -// if err != nil { -// if err == context.Canceled { -// // ctx is canceled by another routine -// } else if err == context.DeadlineExceeded { -// // ctx is attached with a deadline and it exceeded -// } else if err == rpctypes.ErrEmptyKey { -// // client-side error: key is not provided -// } else if ev, ok := status.FromError(err); ok { -// code := ev.Code() -// if code == codes.DeadlineExceeded { -// // server-side context might have timed-out first (due to clock skew) -// // while original client-side context is not timed-out yet -// } -// } else { -// // bad cluster endpoints, which are not etcd servers -// } -// } -// -// go func() { cli.Close() }() -// _, err := kvc.Get(ctx, "a") -// if err != nil { -// // with etcd clientv3 <= v3.3 -// if err == context.Canceled { -// // grpc balancer calls 'Get' with an inflight client.Close -// } else if err == grpc.ErrClientConnClosing { // <= gRCP v1.7.x -// // grpc balancer calls 'Get' after client.Close. -// } -// // with etcd clientv3 >= v3.4 -// if clientv3.IsConnCanceled(err) { -// // gRPC client connection is closed -// } -// } -// -// The grpc load balancer is registered statically and is shared across etcd clients. -// To enable detailed load balancer logging, set the ETCD_CLIENT_DEBUG environment -// variable. E.g. "ETCD_CLIENT_DEBUG=1". -package clientv3 diff --git a/vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go b/vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go deleted file mode 100644 index 35a3fe8c337..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2021 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package endpoint - -import ( - "fmt" - "net" - "net/url" - "path" - "strings" -) - -type CredsRequirement int - -const ( - // CREDS_REQUIRE - Credentials/certificate required for thi type of connection. - CREDS_REQUIRE CredsRequirement = iota - // CREDS_DROP - Credentials/certificate not needed and should get ignored. - CREDS_DROP - // CREDS_OPTIONAL - Credentials/certificate might be used if supplied - CREDS_OPTIONAL -) - -func extractHostFromHostPort(ep string) string { - host, _, err := net.SplitHostPort(ep) - if err != nil { - return ep - } - return host -} - -// mustSplit2 returns the values from strings.SplitN(s, sep, 2). -// If sep is not found, it returns ("", "", false) instead. -func mustSplit2(s, sep string) (string, string) { - spl := strings.SplitN(s, sep, 2) - if len(spl) < 2 { - panic(fmt.Errorf("token '%v' expected to have separator sep: `%v`", s, sep)) - } - return spl[0], spl[1] -} - -func schemeToCredsRequirement(schema string) CredsRequirement { - switch schema { - case "https", "unixs": - return CREDS_REQUIRE - case "http": - return CREDS_DROP - case "unix": - // Preserving previous behavior from: - // https://github.com/etcd-io/etcd/blob/dae29bb719dd69dc119146fc297a0628fcc1ccf8/client/v3/client.go#L212 - // that likely was a bug due to missing 'fallthrough'. - // At the same time it seems legit to let the users decide whether they - // want credential control or not (and 'unixs' schema is not a standard thing). - return CREDS_OPTIONAL - case "": - return CREDS_OPTIONAL - default: - return CREDS_OPTIONAL - } -} - -// This function translates endpoints names supported by etcd server into -// endpoints as supported by grpc with additional information -// (server_name for cert validation, requireCreds - whether certs are needed). -// The main differences: -// - etcd supports unixs & https names as opposed to unix & http to -// distinguish need to configure certificates. -// - etcd support http(s) names as opposed to tcp supported by grpc/dial method. -// - etcd supports unix(s)://local-file naming schema -// (as opposed to unix:local-file canonical name used by grpc for current dir files). -// - Within the unix(s) schemas, the last segment (filename) without 'port' (content after colon) -// is considered serverName - to allow local testing of cert-protected communication. -// -// See more: -// - https://github.com/grpc/grpc-go/blob/26c143bd5f59344a4b8a1e491e0f5e18aa97abc7/internal/grpcutil/target.go#L47 -// - https://golang.org/pkg/net/#Dial -// - https://github.com/grpc/grpc/blob/master/doc/naming.md -func translateEndpoint(ep string) (addr string, serverName string, requireCreds CredsRequirement) { - if strings.HasPrefix(ep, "unix:") || strings.HasPrefix(ep, "unixs:") { - if strings.HasPrefix(ep, "unix:///") || strings.HasPrefix(ep, "unixs:///") { - // absolute path case - schema, absolutePath := mustSplit2(ep, "://") - return "unix://" + absolutePath, path.Base(absolutePath), schemeToCredsRequirement(schema) - } - if strings.HasPrefix(ep, "unix://") || strings.HasPrefix(ep, "unixs://") { - // legacy etcd local path - schema, localPath := mustSplit2(ep, "://") - return "unix:" + localPath, path.Base(localPath), schemeToCredsRequirement(schema) - } - schema, localPath := mustSplit2(ep, ":") - return "unix:" + localPath, path.Base(localPath), schemeToCredsRequirement(schema) - } - - if strings.Contains(ep, "://") { - url, err := url.Parse(ep) - if err != nil { - return ep, ep, CREDS_OPTIONAL - } - if url.Scheme == "http" || url.Scheme == "https" { - return url.Host, url.Host, schemeToCredsRequirement(url.Scheme) - } - return ep, url.Host, schemeToCredsRequirement(url.Scheme) - } - // Handles plain addresses like 10.0.0.44:437. - return ep, ep, CREDS_OPTIONAL -} - -// RequiresCredentials returns whether given endpoint requires -// credentials/certificates for connection. -func RequiresCredentials(ep string) CredsRequirement { - _, _, requireCreds := translateEndpoint(ep) - return requireCreds -} - -// Interpret endpoint parses an endpoint of the form -// (http|https)://*|(unix|unixs)://) -// and returns low-level address (supported by 'net') to connect to, -// and a server name used for x509 certificate matching. -func Interpret(ep string) (address string, serverName string) { - addr, serverName, _ := translateEndpoint(ep) - return addr, serverName -} diff --git a/vendor/go.etcd.io/etcd/client/v3/internal/resolver/resolver.go b/vendor/go.etcd.io/etcd/client/v3/internal/resolver/resolver.go deleted file mode 100644 index 3ee3cb8e2bb..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/internal/resolver/resolver.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2021 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package resolver - -import ( - "go.etcd.io/etcd/client/v3/internal/endpoint" - "google.golang.org/grpc/resolver" - "google.golang.org/grpc/resolver/manual" - "google.golang.org/grpc/serviceconfig" -) - -const ( - Schema = "etcd-endpoints" -) - -// EtcdManualResolver is a Resolver (and resolver.Builder) that can be updated -// using SetEndpoints. -type EtcdManualResolver struct { - *manual.Resolver - endpoints []string - serviceConfig *serviceconfig.ParseResult -} - -func New(endpoints ...string) *EtcdManualResolver { - r := manual.NewBuilderWithScheme(Schema) - return &EtcdManualResolver{Resolver: r, endpoints: endpoints, serviceConfig: nil} -} - -// Build returns itself for Resolver, because it's both a builder and a resolver. -func (r *EtcdManualResolver) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { - r.serviceConfig = cc.ParseServiceConfig(`{"loadBalancingPolicy": "round_robin"}`) - if r.serviceConfig.Err != nil { - return nil, r.serviceConfig.Err - } - res, err := r.Resolver.Build(target, cc, opts) - if err != nil { - return nil, err - } - // Populates endpoints stored in r into ClientConn (cc). - r.updateState() - return res, nil -} - -func (r *EtcdManualResolver) SetEndpoints(endpoints []string) { - r.endpoints = endpoints - r.updateState() -} - -func (r EtcdManualResolver) updateState() { - if r.CC != nil { - addresses := make([]resolver.Address, len(r.endpoints)) - for i, ep := range r.endpoints { - addr, serverName := endpoint.Interpret(ep) - addresses[i] = resolver.Address{Addr: addr, ServerName: serverName} - } - state := resolver.State{ - Addresses: addresses, - ServiceConfig: r.serviceConfig, - } - r.UpdateState(state) - } -} diff --git a/vendor/go.etcd.io/etcd/client/v3/kv.go b/vendor/go.etcd.io/etcd/client/v3/kv.go deleted file mode 100644 index 5e9fb7d4589..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/kv.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright 2015 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "context" - - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - - "google.golang.org/grpc" -) - -type ( - CompactResponse pb.CompactionResponse - PutResponse pb.PutResponse - GetResponse pb.RangeResponse - DeleteResponse pb.DeleteRangeResponse - TxnResponse pb.TxnResponse -) - -type KV interface { - // Put puts a key-value pair into etcd. - // Note that key,value can be plain bytes array and string is - // an immutable representation of that bytes array. - // To get a string of bytes, do string([]byte{0x10, 0x20}). - Put(ctx context.Context, key, val string, opts ...OpOption) (*PutResponse, error) - - // Get retrieves keys. - // By default, Get will return the value for "key", if any. - // When passed WithRange(end), Get will return the keys in the range [key, end). - // When passed WithFromKey(), Get returns keys greater than or equal to key. - // When passed WithRev(rev) with rev > 0, Get retrieves keys at the given revision; - // if the required revision is compacted, the request will fail with ErrCompacted . - // When passed WithLimit(limit), the number of returned keys is bounded by limit. - // When passed WithSort(), the keys will be sorted. - Get(ctx context.Context, key string, opts ...OpOption) (*GetResponse, error) - - // Delete deletes a key, or optionally using WithRange(end), [key, end). - Delete(ctx context.Context, key string, opts ...OpOption) (*DeleteResponse, error) - - // Compact compacts etcd KV history before the given rev. - Compact(ctx context.Context, rev int64, opts ...CompactOption) (*CompactResponse, error) - - // Do applies a single Op on KV without a transaction. - // Do is useful when creating arbitrary operations to be issued at a - // later time; the user can range over the operations, calling Do to - // execute them. Get/Put/Delete, on the other hand, are best suited - // for when the operation should be issued at the time of declaration. - Do(ctx context.Context, op Op) (OpResponse, error) - - // Txn creates a transaction. - Txn(ctx context.Context) Txn -} - -type OpResponse struct { - put *PutResponse - get *GetResponse - del *DeleteResponse - txn *TxnResponse -} - -func (op OpResponse) Put() *PutResponse { return op.put } -func (op OpResponse) Get() *GetResponse { return op.get } -func (op OpResponse) Del() *DeleteResponse { return op.del } -func (op OpResponse) Txn() *TxnResponse { return op.txn } - -func (resp *PutResponse) OpResponse() OpResponse { - return OpResponse{put: resp} -} -func (resp *GetResponse) OpResponse() OpResponse { - return OpResponse{get: resp} -} -func (resp *DeleteResponse) OpResponse() OpResponse { - return OpResponse{del: resp} -} -func (resp *TxnResponse) OpResponse() OpResponse { - return OpResponse{txn: resp} -} - -type kv struct { - remote pb.KVClient - callOpts []grpc.CallOption -} - -func NewKV(c *Client) KV { - api := &kv{remote: RetryKVClient(c)} - if c != nil { - api.callOpts = c.callOpts - } - return api -} - -func NewKVFromKVClient(remote pb.KVClient, c *Client) KV { - api := &kv{remote: remote} - if c != nil { - api.callOpts = c.callOpts - } - return api -} - -func (kv *kv) Put(ctx context.Context, key, val string, opts ...OpOption) (*PutResponse, error) { - r, err := kv.Do(ctx, OpPut(key, val, opts...)) - return r.put, toErr(ctx, err) -} - -func (kv *kv) Get(ctx context.Context, key string, opts ...OpOption) (*GetResponse, error) { - r, err := kv.Do(ctx, OpGet(key, opts...)) - return r.get, toErr(ctx, err) -} - -func (kv *kv) Delete(ctx context.Context, key string, opts ...OpOption) (*DeleteResponse, error) { - r, err := kv.Do(ctx, OpDelete(key, opts...)) - return r.del, toErr(ctx, err) -} - -func (kv *kv) Compact(ctx context.Context, rev int64, opts ...CompactOption) (*CompactResponse, error) { - resp, err := kv.remote.Compact(ctx, OpCompact(rev, opts...).toRequest(), kv.callOpts...) - if err != nil { - return nil, toErr(ctx, err) - } - return (*CompactResponse)(resp), err -} - -func (kv *kv) Txn(ctx context.Context) Txn { - return &txn{ - kv: kv, - ctx: ctx, - callOpts: kv.callOpts, - } -} - -func (kv *kv) Do(ctx context.Context, op Op) (OpResponse, error) { - var err error - switch op.t { - case tRange: - var resp *pb.RangeResponse - resp, err = kv.remote.Range(ctx, op.toRangeRequest(), kv.callOpts...) - if err == nil { - return OpResponse{get: (*GetResponse)(resp)}, nil - } - case tPut: - var resp *pb.PutResponse - r := &pb.PutRequest{Key: op.key, Value: op.val, Lease: int64(op.leaseID), PrevKv: op.prevKV, IgnoreValue: op.ignoreValue, IgnoreLease: op.ignoreLease} - resp, err = kv.remote.Put(ctx, r, kv.callOpts...) - if err == nil { - return OpResponse{put: (*PutResponse)(resp)}, nil - } - case tDeleteRange: - var resp *pb.DeleteRangeResponse - r := &pb.DeleteRangeRequest{Key: op.key, RangeEnd: op.end, PrevKv: op.prevKV} - resp, err = kv.remote.DeleteRange(ctx, r, kv.callOpts...) - if err == nil { - return OpResponse{del: (*DeleteResponse)(resp)}, nil - } - case tTxn: - var resp *pb.TxnResponse - resp, err = kv.remote.Txn(ctx, op.toTxnRequest(), kv.callOpts...) - if err == nil { - return OpResponse{txn: (*TxnResponse)(resp)}, nil - } - default: - panic("Unknown op") - } - return OpResponse{}, toErr(ctx, err) -} diff --git a/vendor/go.etcd.io/etcd/client/v3/lease.go b/vendor/go.etcd.io/etcd/client/v3/lease.go deleted file mode 100644 index 19af9c093a3..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/lease.go +++ /dev/null @@ -1,607 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "context" - "sync" - "time" - - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - - "go.uber.org/zap" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" -) - -type ( - LeaseRevokeResponse pb.LeaseRevokeResponse - LeaseID int64 -) - -// LeaseGrantResponse wraps the protobuf message LeaseGrantResponse. -type LeaseGrantResponse struct { - *pb.ResponseHeader - ID LeaseID - TTL int64 - Error string -} - -// LeaseKeepAliveResponse wraps the protobuf message LeaseKeepAliveResponse. -type LeaseKeepAliveResponse struct { - *pb.ResponseHeader - ID LeaseID - TTL int64 -} - -// LeaseTimeToLiveResponse wraps the protobuf message LeaseTimeToLiveResponse. -type LeaseTimeToLiveResponse struct { - *pb.ResponseHeader - ID LeaseID `json:"id"` - - // TTL is the remaining TTL in seconds for the lease; the lease will expire in under TTL+1 seconds. Expired lease will return -1. - TTL int64 `json:"ttl"` - - // GrantedTTL is the initial granted time in seconds upon lease creation/renewal. - GrantedTTL int64 `json:"granted-ttl"` - - // Keys is the list of keys attached to this lease. - Keys [][]byte `json:"keys"` -} - -// LeaseStatus represents a lease status. -type LeaseStatus struct { - ID LeaseID `json:"id"` - // TODO: TTL int64 -} - -// LeaseLeasesResponse wraps the protobuf message LeaseLeasesResponse. -type LeaseLeasesResponse struct { - *pb.ResponseHeader - Leases []LeaseStatus `json:"leases"` -} - -const ( - // defaultTTL is the assumed lease TTL used for the first keepalive - // deadline before the actual TTL is known to the client. - defaultTTL = 5 * time.Second - // NoLease is a lease ID for the absence of a lease. - NoLease LeaseID = 0 - - // retryConnWait is how long to wait before retrying request due to an error - retryConnWait = 500 * time.Millisecond -) - -// LeaseResponseChSize is the size of buffer to store unsent lease responses. -// WARNING: DO NOT UPDATE. -// Only for testing purposes. -var LeaseResponseChSize = 16 - -// ErrKeepAliveHalted is returned if client keep alive loop halts with an unexpected error. -// -// This usually means that automatic lease renewal via KeepAlive is broken, but KeepAliveOnce will still work as expected. -type ErrKeepAliveHalted struct { - Reason error -} - -func (e ErrKeepAliveHalted) Error() string { - s := "etcdclient: leases keep alive halted" - if e.Reason != nil { - s += ": " + e.Reason.Error() - } - return s -} - -type Lease interface { - // Grant creates a new lease. - Grant(ctx context.Context, ttl int64) (*LeaseGrantResponse, error) - - // Revoke revokes the given lease. - Revoke(ctx context.Context, id LeaseID) (*LeaseRevokeResponse, error) - - // TimeToLive retrieves the lease information of the given lease ID. - TimeToLive(ctx context.Context, id LeaseID, opts ...LeaseOption) (*LeaseTimeToLiveResponse, error) - - // Leases retrieves all leases. - Leases(ctx context.Context) (*LeaseLeasesResponse, error) - - // KeepAlive attempts to keep the given lease alive forever. If the keepalive responses posted - // to the channel are not consumed promptly the channel may become full. When full, the lease - // client will continue sending keep alive requests to the etcd server, but will drop responses - // until there is capacity on the channel to send more responses. - // - // If client keep alive loop halts with an unexpected error (e.g. "etcdserver: no leader") or - // canceled by the caller (e.g. context.Canceled), KeepAlive returns a ErrKeepAliveHalted error - // containing the error reason. - // - // The returned "LeaseKeepAliveResponse" channel closes if underlying keep - // alive stream is interrupted in some way the client cannot handle itself; - // given context "ctx" is canceled or timed out. - // - // TODO(v4.0): post errors to last keep alive message before closing - // (see https://github.com/etcd-io/etcd/pull/7866) - KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAliveResponse, error) - - // KeepAliveOnce renews the lease once. The response corresponds to the - // first message from calling KeepAlive. If the response has a recoverable - // error, KeepAliveOnce will retry the RPC with a new keep alive message. - // - // In most of the cases, Keepalive should be used instead of KeepAliveOnce. - KeepAliveOnce(ctx context.Context, id LeaseID) (*LeaseKeepAliveResponse, error) - - // Close releases all resources Lease keeps for efficient communication - // with the etcd server. - Close() error -} - -type lessor struct { - mu sync.Mutex // guards all fields - - // donec is closed and loopErr is set when recvKeepAliveLoop stops - donec chan struct{} - loopErr error - - remote pb.LeaseClient - - stream pb.Lease_LeaseKeepAliveClient - streamCancel context.CancelFunc - - stopCtx context.Context - stopCancel context.CancelFunc - - keepAlives map[LeaseID]*keepAlive - - // firstKeepAliveTimeout is the timeout for the first keepalive request - // before the actual TTL is known to the lease client - firstKeepAliveTimeout time.Duration - - // firstKeepAliveOnce ensures stream starts after first KeepAlive call. - firstKeepAliveOnce sync.Once - - callOpts []grpc.CallOption - - lg *zap.Logger -} - -// keepAlive multiplexes a keepalive for a lease over multiple channels -type keepAlive struct { - chs []chan<- *LeaseKeepAliveResponse - ctxs []context.Context - // deadline is the time the keep alive channels close if no response - deadline time.Time - // nextKeepAlive is when to send the next keep alive message - nextKeepAlive time.Time - // donec is closed on lease revoke, expiration, or cancel. - donec chan struct{} -} - -func NewLease(c *Client) Lease { - return NewLeaseFromLeaseClient(RetryLeaseClient(c), c, c.cfg.DialTimeout+time.Second) -} - -func NewLeaseFromLeaseClient(remote pb.LeaseClient, c *Client, keepAliveTimeout time.Duration) Lease { - l := &lessor{ - donec: make(chan struct{}), - keepAlives: make(map[LeaseID]*keepAlive), - remote: remote, - firstKeepAliveTimeout: keepAliveTimeout, - lg: c.lg, - } - if l.firstKeepAliveTimeout == time.Second { - l.firstKeepAliveTimeout = defaultTTL - } - if c != nil { - l.callOpts = c.callOpts - } - reqLeaderCtx := WithRequireLeader(context.Background()) - l.stopCtx, l.stopCancel = context.WithCancel(reqLeaderCtx) - return l -} - -func (l *lessor) Grant(ctx context.Context, ttl int64) (*LeaseGrantResponse, error) { - r := &pb.LeaseGrantRequest{TTL: ttl} - resp, err := l.remote.LeaseGrant(ctx, r, l.callOpts...) - if err == nil { - gresp := &LeaseGrantResponse{ - ResponseHeader: resp.GetHeader(), - ID: LeaseID(resp.ID), - TTL: resp.TTL, - Error: resp.Error, - } - return gresp, nil - } - return nil, toErr(ctx, err) -} - -func (l *lessor) Revoke(ctx context.Context, id LeaseID) (*LeaseRevokeResponse, error) { - r := &pb.LeaseRevokeRequest{ID: int64(id)} - resp, err := l.remote.LeaseRevoke(ctx, r, l.callOpts...) - if err == nil { - return (*LeaseRevokeResponse)(resp), nil - } - return nil, toErr(ctx, err) -} - -func (l *lessor) TimeToLive(ctx context.Context, id LeaseID, opts ...LeaseOption) (*LeaseTimeToLiveResponse, error) { - r := toLeaseTimeToLiveRequest(id, opts...) - resp, err := l.remote.LeaseTimeToLive(ctx, r, l.callOpts...) - if err != nil { - return nil, toErr(ctx, err) - } - gresp := &LeaseTimeToLiveResponse{ - ResponseHeader: resp.GetHeader(), - ID: LeaseID(resp.ID), - TTL: resp.TTL, - GrantedTTL: resp.GrantedTTL, - Keys: resp.Keys, - } - return gresp, nil -} - -func (l *lessor) Leases(ctx context.Context) (*LeaseLeasesResponse, error) { - resp, err := l.remote.LeaseLeases(ctx, &pb.LeaseLeasesRequest{}, l.callOpts...) - if err == nil { - leases := make([]LeaseStatus, len(resp.Leases)) - for i := range resp.Leases { - leases[i] = LeaseStatus{ID: LeaseID(resp.Leases[i].ID)} - } - return &LeaseLeasesResponse{ResponseHeader: resp.GetHeader(), Leases: leases}, nil - } - return nil, toErr(ctx, err) -} - -func (l *lessor) KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAliveResponse, error) { - ch := make(chan *LeaseKeepAliveResponse, LeaseResponseChSize) - - l.mu.Lock() - // ensure that recvKeepAliveLoop is still running - select { - case <-l.donec: - err := l.loopErr - l.mu.Unlock() - close(ch) - return ch, ErrKeepAliveHalted{Reason: err} - default: - } - ka, ok := l.keepAlives[id] - if !ok { - // create fresh keep alive - ka = &keepAlive{ - chs: []chan<- *LeaseKeepAliveResponse{ch}, - ctxs: []context.Context{ctx}, - deadline: time.Now().Add(l.firstKeepAliveTimeout), - nextKeepAlive: time.Now(), - donec: make(chan struct{}), - } - l.keepAlives[id] = ka - } else { - // add channel and context to existing keep alive - ka.ctxs = append(ka.ctxs, ctx) - ka.chs = append(ka.chs, ch) - } - l.mu.Unlock() - - if ctx.Done() != nil { - go l.keepAliveCtxCloser(ctx, id, ka.donec) - } - l.firstKeepAliveOnce.Do(func() { - go l.recvKeepAliveLoop() - go l.deadlineLoop() - }) - - return ch, nil -} - -func (l *lessor) KeepAliveOnce(ctx context.Context, id LeaseID) (*LeaseKeepAliveResponse, error) { - for { - resp, err := l.keepAliveOnce(ctx, id) - if err == nil { - if resp.TTL <= 0 { - err = rpctypes.ErrLeaseNotFound - } - return resp, err - } - if isHaltErr(ctx, err) { - return nil, toErr(ctx, err) - } - } -} - -func (l *lessor) Close() error { - l.stopCancel() - // close for synchronous teardown if stream goroutines never launched - l.firstKeepAliveOnce.Do(func() { close(l.donec) }) - <-l.donec - return nil -} - -func (l *lessor) keepAliveCtxCloser(ctx context.Context, id LeaseID, donec <-chan struct{}) { - select { - case <-donec: - return - case <-l.donec: - return - case <-ctx.Done(): - } - - l.mu.Lock() - defer l.mu.Unlock() - - ka, ok := l.keepAlives[id] - if !ok { - return - } - - // close channel and remove context if still associated with keep alive - for i, c := range ka.ctxs { - if c == ctx { - close(ka.chs[i]) - ka.ctxs = append(ka.ctxs[:i], ka.ctxs[i+1:]...) - ka.chs = append(ka.chs[:i], ka.chs[i+1:]...) - break - } - } - // remove if no one more listeners - if len(ka.chs) == 0 { - delete(l.keepAlives, id) - } -} - -// closeRequireLeader scans keepAlives for ctxs that have require leader -// and closes the associated channels. -func (l *lessor) closeRequireLeader() { - l.mu.Lock() - defer l.mu.Unlock() - for _, ka := range l.keepAlives { - reqIdxs := 0 - // find all required leader channels, close, mark as nil - for i, ctx := range ka.ctxs { - md, ok := metadata.FromOutgoingContext(ctx) - if !ok { - continue - } - ks := md[rpctypes.MetadataRequireLeaderKey] - if len(ks) < 1 || ks[0] != rpctypes.MetadataHasLeader { - continue - } - close(ka.chs[i]) - ka.chs[i] = nil - reqIdxs++ - } - if reqIdxs == 0 { - continue - } - // remove all channels that required a leader from keepalive - newChs := make([]chan<- *LeaseKeepAliveResponse, len(ka.chs)-reqIdxs) - newCtxs := make([]context.Context, len(newChs)) - newIdx := 0 - for i := range ka.chs { - if ka.chs[i] == nil { - continue - } - newChs[newIdx], newCtxs[newIdx] = ka.chs[i], ka.ctxs[newIdx] - newIdx++ - } - ka.chs, ka.ctxs = newChs, newCtxs - } -} - -func (l *lessor) keepAliveOnce(ctx context.Context, id LeaseID) (karesp *LeaseKeepAliveResponse, ferr error) { - cctx, cancel := context.WithCancel(ctx) - defer cancel() - - stream, err := l.remote.LeaseKeepAlive(cctx, l.callOpts...) - if err != nil { - return nil, toErr(ctx, err) - } - - defer func() { - if err := stream.CloseSend(); err != nil { - if ferr == nil { - ferr = toErr(ctx, err) - } - return - } - }() - - err = stream.Send(&pb.LeaseKeepAliveRequest{ID: int64(id)}) - if err != nil { - return nil, toErr(ctx, err) - } - - resp, rerr := stream.Recv() - if rerr != nil { - return nil, toErr(ctx, rerr) - } - - karesp = &LeaseKeepAliveResponse{ - ResponseHeader: resp.GetHeader(), - ID: LeaseID(resp.ID), - TTL: resp.TTL, - } - return karesp, nil -} - -func (l *lessor) recvKeepAliveLoop() (gerr error) { - defer func() { - l.mu.Lock() - close(l.donec) - l.loopErr = gerr - for _, ka := range l.keepAlives { - ka.close() - } - l.keepAlives = make(map[LeaseID]*keepAlive) - l.mu.Unlock() - }() - - for { - stream, err := l.resetRecv() - if err != nil { - if canceledByCaller(l.stopCtx, err) { - return err - } - } else { - for { - resp, err := stream.Recv() - if err != nil { - if canceledByCaller(l.stopCtx, err) { - return err - } - - if toErr(l.stopCtx, err) == rpctypes.ErrNoLeader { - l.closeRequireLeader() - } - break - } - - l.recvKeepAlive(resp) - } - } - - select { - case <-time.After(retryConnWait): - case <-l.stopCtx.Done(): - return l.stopCtx.Err() - } - } -} - -// resetRecv opens a new lease stream and starts sending keep alive requests. -func (l *lessor) resetRecv() (pb.Lease_LeaseKeepAliveClient, error) { - sctx, cancel := context.WithCancel(l.stopCtx) - stream, err := l.remote.LeaseKeepAlive(sctx, append(l.callOpts, withMax(0))...) - if err != nil { - cancel() - return nil, err - } - - l.mu.Lock() - defer l.mu.Unlock() - if l.stream != nil && l.streamCancel != nil { - l.streamCancel() - } - - l.streamCancel = cancel - l.stream = stream - - go l.sendKeepAliveLoop(stream) - return stream, nil -} - -// recvKeepAlive updates a lease based on its LeaseKeepAliveResponse -func (l *lessor) recvKeepAlive(resp *pb.LeaseKeepAliveResponse) { - karesp := &LeaseKeepAliveResponse{ - ResponseHeader: resp.GetHeader(), - ID: LeaseID(resp.ID), - TTL: resp.TTL, - } - - l.mu.Lock() - defer l.mu.Unlock() - - ka, ok := l.keepAlives[karesp.ID] - if !ok { - return - } - - if karesp.TTL <= 0 { - // lease expired; close all keep alive channels - delete(l.keepAlives, karesp.ID) - ka.close() - return - } - - // send update to all channels - nextKeepAlive := time.Now().Add((time.Duration(karesp.TTL) * time.Second) / 3.0) - ka.deadline = time.Now().Add(time.Duration(karesp.TTL) * time.Second) - for _, ch := range ka.chs { - select { - case ch <- karesp: - default: - if l.lg != nil { - l.lg.Warn("lease keepalive response queue is full; dropping response send", - zap.Int("queue-size", len(ch)), - zap.Int("queue-capacity", cap(ch)), - ) - } - } - // still advance in order to rate-limit keep-alive sends - ka.nextKeepAlive = nextKeepAlive - } -} - -// deadlineLoop reaps any keep alive channels that have not received a response -// within the lease TTL -func (l *lessor) deadlineLoop() { - for { - select { - case <-time.After(time.Second): - case <-l.donec: - return - } - now := time.Now() - l.mu.Lock() - for id, ka := range l.keepAlives { - if ka.deadline.Before(now) { - // waited too long for response; lease may be expired - ka.close() - delete(l.keepAlives, id) - } - } - l.mu.Unlock() - } -} - -// sendKeepAliveLoop sends keep alive requests for the lifetime of the given stream. -func (l *lessor) sendKeepAliveLoop(stream pb.Lease_LeaseKeepAliveClient) { - for { - var tosend []LeaseID - - now := time.Now() - l.mu.Lock() - for id, ka := range l.keepAlives { - if ka.nextKeepAlive.Before(now) { - tosend = append(tosend, id) - } - } - l.mu.Unlock() - - for _, id := range tosend { - r := &pb.LeaseKeepAliveRequest{ID: int64(id)} - if err := stream.Send(r); err != nil { - // TODO do something with this error? - return - } - } - - select { - case <-time.After(retryConnWait): - case <-stream.Context().Done(): - return - case <-l.donec: - return - case <-l.stopCtx.Done(): - return - } - } -} - -func (ka *keepAlive) close() { - close(ka.donec) - for _, ch := range ka.chs { - close(ch) - } -} diff --git a/vendor/go.etcd.io/etcd/client/v3/logger.go b/vendor/go.etcd.io/etcd/client/v3/logger.go deleted file mode 100644 index eaa35f2d3ac..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/logger.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "log" - "os" - - "go.etcd.io/etcd/client/pkg/v3/logutil" - "go.uber.org/zap/zapcore" - "go.uber.org/zap/zapgrpc" - "google.golang.org/grpc/grpclog" -) - -func init() { - // We override grpc logger only when the environment variable is set - // in order to not interfere by default with user's code or other libraries. - if os.Getenv("ETCD_CLIENT_DEBUG") != "" { - lg, err := logutil.CreateDefaultZapLogger(etcdClientDebugLevel()) - if err != nil { - panic(err) - } - lg = lg.Named("etcd-client") - grpclog.SetLoggerV2(zapgrpc.NewLogger(lg)) - } -} - -// SetLogger sets grpc logger. -// -// Deprecated: use grpclog.SetLoggerV2 directly or grpc_zap.ReplaceGrpcLoggerV2. -func SetLogger(l grpclog.LoggerV2) { - grpclog.SetLoggerV2(l) -} - -// etcdClientDebugLevel translates ETCD_CLIENT_DEBUG into zap log level. -func etcdClientDebugLevel() zapcore.Level { - envLevel := os.Getenv("ETCD_CLIENT_DEBUG") - if envLevel == "" || envLevel == "true" { - return zapcore.InfoLevel - } - var l zapcore.Level - if err := l.Set(envLevel); err != nil { - log.Printf("Invalid value for environment variable 'ETCD_CLIENT_DEBUG'. Using default level: 'info'") - return zapcore.InfoLevel - } - return l -} diff --git a/vendor/go.etcd.io/etcd/client/v3/maintenance.go b/vendor/go.etcd.io/etcd/client/v3/maintenance.go deleted file mode 100644 index a98b8ca51e1..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/maintenance.go +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "context" - "fmt" - "io" - - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.uber.org/zap" - "google.golang.org/grpc" -) - -type ( - DefragmentResponse pb.DefragmentResponse - AlarmResponse pb.AlarmResponse - AlarmMember pb.AlarmMember - StatusResponse pb.StatusResponse - HashKVResponse pb.HashKVResponse - MoveLeaderResponse pb.MoveLeaderResponse -) - -type Maintenance interface { - // AlarmList gets all active alarms. - AlarmList(ctx context.Context) (*AlarmResponse, error) - - // AlarmDisarm disarms a given alarm. - AlarmDisarm(ctx context.Context, m *AlarmMember) (*AlarmResponse, error) - - // Defragment releases wasted space from internal fragmentation on a given etcd member. - // Defragment is only needed when deleting a large number of keys and want to reclaim - // the resources. - // Defragment is an expensive operation. User should avoid defragmenting multiple members - // at the same time. - // To defragment multiple members in the cluster, user need to call defragment multiple - // times with different endpoints. - Defragment(ctx context.Context, endpoint string) (*DefragmentResponse, error) - - // Status gets the status of the endpoint. - Status(ctx context.Context, endpoint string) (*StatusResponse, error) - - // HashKV returns a hash of the KV state at the time of the RPC. - // If revision is zero, the hash is computed on all keys. If the revision - // is non-zero, the hash is computed on all keys at or below the given revision. - HashKV(ctx context.Context, endpoint string, rev int64) (*HashKVResponse, error) - - // Snapshot provides a reader for a point-in-time snapshot of etcd. - // If the context "ctx" is canceled or timed out, reading from returned - // "io.ReadCloser" would error out (e.g. context.Canceled, context.DeadlineExceeded). - Snapshot(ctx context.Context) (io.ReadCloser, error) - - // MoveLeader requests current leader to transfer its leadership to the transferee. - // Request must be made to the leader. - MoveLeader(ctx context.Context, transfereeID uint64) (*MoveLeaderResponse, error) -} - -type maintenance struct { - lg *zap.Logger - dial func(endpoint string) (pb.MaintenanceClient, func(), error) - remote pb.MaintenanceClient - callOpts []grpc.CallOption -} - -func NewMaintenance(c *Client) Maintenance { - api := &maintenance{ - lg: c.lg, - dial: func(endpoint string) (pb.MaintenanceClient, func(), error) { - conn, err := c.Dial(endpoint) - if err != nil { - return nil, nil, fmt.Errorf("failed to dial endpoint %s with maintenance client: %v", endpoint, err) - } - - //get token with established connection - dctx := c.ctx - cancel := func() {} - if c.cfg.DialTimeout > 0 { - dctx, cancel = context.WithTimeout(c.ctx, c.cfg.DialTimeout) - } - err = c.getToken(dctx) - cancel() - if err != nil { - conn.Close() - return nil, nil, fmt.Errorf("failed to getToken from endpoint %s with maintenance client: %v", endpoint, err) - } - cancel = func() { conn.Close() } - return RetryMaintenanceClient(c, conn), cancel, nil - }, - remote: RetryMaintenanceClient(c, c.conn), - } - if c != nil { - api.callOpts = c.callOpts - } - return api -} - -func NewMaintenanceFromMaintenanceClient(remote pb.MaintenanceClient, c *Client) Maintenance { - api := &maintenance{ - lg: c.lg, - dial: func(string) (pb.MaintenanceClient, func(), error) { - return remote, func() {}, nil - }, - remote: remote, - } - if c != nil { - api.callOpts = c.callOpts - } - return api -} - -func (m *maintenance) AlarmList(ctx context.Context) (*AlarmResponse, error) { - req := &pb.AlarmRequest{ - Action: pb.AlarmRequest_GET, - MemberID: 0, // all - Alarm: pb.AlarmType_NONE, // all - } - resp, err := m.remote.Alarm(ctx, req, m.callOpts...) - if err == nil { - return (*AlarmResponse)(resp), nil - } - return nil, toErr(ctx, err) -} - -func (m *maintenance) AlarmDisarm(ctx context.Context, am *AlarmMember) (*AlarmResponse, error) { - req := &pb.AlarmRequest{ - Action: pb.AlarmRequest_DEACTIVATE, - MemberID: am.MemberID, - Alarm: am.Alarm, - } - - if req.MemberID == 0 && req.Alarm == pb.AlarmType_NONE { - ar, err := m.AlarmList(ctx) - if err != nil { - return nil, toErr(ctx, err) - } - ret := AlarmResponse{} - for _, am := range ar.Alarms { - dresp, derr := m.AlarmDisarm(ctx, (*AlarmMember)(am)) - if derr != nil { - return nil, toErr(ctx, derr) - } - ret.Alarms = append(ret.Alarms, dresp.Alarms...) - } - return &ret, nil - } - - resp, err := m.remote.Alarm(ctx, req, m.callOpts...) - if err == nil { - return (*AlarmResponse)(resp), nil - } - return nil, toErr(ctx, err) -} - -func (m *maintenance) Defragment(ctx context.Context, endpoint string) (*DefragmentResponse, error) { - remote, cancel, err := m.dial(endpoint) - if err != nil { - return nil, toErr(ctx, err) - } - defer cancel() - resp, err := remote.Defragment(ctx, &pb.DefragmentRequest{}, m.callOpts...) - if err != nil { - return nil, toErr(ctx, err) - } - return (*DefragmentResponse)(resp), nil -} - -func (m *maintenance) Status(ctx context.Context, endpoint string) (*StatusResponse, error) { - remote, cancel, err := m.dial(endpoint) - if err != nil { - return nil, toErr(ctx, err) - } - defer cancel() - resp, err := remote.Status(ctx, &pb.StatusRequest{}, m.callOpts...) - if err != nil { - return nil, toErr(ctx, err) - } - return (*StatusResponse)(resp), nil -} - -func (m *maintenance) HashKV(ctx context.Context, endpoint string, rev int64) (*HashKVResponse, error) { - remote, cancel, err := m.dial(endpoint) - if err != nil { - - return nil, toErr(ctx, err) - } - defer cancel() - resp, err := remote.HashKV(ctx, &pb.HashKVRequest{Revision: rev}, m.callOpts...) - if err != nil { - return nil, toErr(ctx, err) - } - return (*HashKVResponse)(resp), nil -} - -func (m *maintenance) Snapshot(ctx context.Context) (io.ReadCloser, error) { - ss, err := m.remote.Snapshot(ctx, &pb.SnapshotRequest{}, append(m.callOpts, withMax(defaultStreamMaxRetries))...) - if err != nil { - return nil, toErr(ctx, err) - } - - m.lg.Info("opened snapshot stream; downloading") - pr, pw := io.Pipe() - go func() { - for { - resp, err := ss.Recv() - if err != nil { - switch err { - case io.EOF: - m.lg.Info("completed snapshot read; closing") - default: - m.lg.Warn("failed to receive from snapshot stream; closing", zap.Error(err)) - } - pw.CloseWithError(err) - return - } - - // can "resp == nil && err == nil" - // before we receive snapshot SHA digest? - // No, server sends EOF with an empty response - // after it sends SHA digest at the end - - if _, werr := pw.Write(resp.Blob); werr != nil { - pw.CloseWithError(werr) - return - } - } - }() - return &snapshotReadCloser{ctx: ctx, ReadCloser: pr}, nil -} - -type snapshotReadCloser struct { - ctx context.Context - io.ReadCloser -} - -func (rc *snapshotReadCloser) Read(p []byte) (n int, err error) { - n, err = rc.ReadCloser.Read(p) - return n, toErr(rc.ctx, err) -} - -func (m *maintenance) MoveLeader(ctx context.Context, transfereeID uint64) (*MoveLeaderResponse, error) { - resp, err := m.remote.MoveLeader(ctx, &pb.MoveLeaderRequest{TargetID: transfereeID}, m.callOpts...) - return (*MoveLeaderResponse)(resp), toErr(ctx, err) -} diff --git a/vendor/go.etcd.io/etcd/client/v3/op.go b/vendor/go.etcd.io/etcd/client/v3/op.go deleted file mode 100644 index 5251906322c..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/op.go +++ /dev/null @@ -1,583 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import pb "go.etcd.io/etcd/api/v3/etcdserverpb" - -type opType int - -const ( - // A default Op has opType 0, which is invalid. - tRange opType = iota + 1 - tPut - tDeleteRange - tTxn -) - -var noPrefixEnd = []byte{0} - -// Op represents an Operation that kv can execute. -type Op struct { - t opType - key []byte - end []byte - - // for range - limit int64 - sort *SortOption - serializable bool - keysOnly bool - countOnly bool - minModRev int64 - maxModRev int64 - minCreateRev int64 - maxCreateRev int64 - - // for range, watch - rev int64 - - // for watch, put, delete - prevKV bool - - // for watch - // fragmentation should be disabled by default - // if true, split watch events when total exceeds - // "--max-request-bytes" flag value + 512-byte - fragment bool - - // for put - ignoreValue bool - ignoreLease bool - - // progressNotify is for progress updates. - progressNotify bool - // createdNotify is for created event - createdNotify bool - // filters for watchers - filterPut bool - filterDelete bool - - // for put - val []byte - leaseID LeaseID - - // txn - cmps []Cmp - thenOps []Op - elseOps []Op - - isOptsWithFromKey bool - isOptsWithPrefix bool -} - -// accessors / mutators - -// IsTxn returns true if the "Op" type is transaction. -func (op Op) IsTxn() bool { - return op.t == tTxn -} - -// Txn returns the comparison(if) operations, "then" operations, and "else" operations. -func (op Op) Txn() ([]Cmp, []Op, []Op) { - return op.cmps, op.thenOps, op.elseOps -} - -// KeyBytes returns the byte slice holding the Op's key. -func (op Op) KeyBytes() []byte { return op.key } - -// WithKeyBytes sets the byte slice for the Op's key. -func (op *Op) WithKeyBytes(key []byte) { op.key = key } - -// RangeBytes returns the byte slice holding with the Op's range end, if any. -func (op Op) RangeBytes() []byte { return op.end } - -// Rev returns the requested revision, if any. -func (op Op) Rev() int64 { return op.rev } - -// IsPut returns true iff the operation is a Put. -func (op Op) IsPut() bool { return op.t == tPut } - -// IsGet returns true iff the operation is a Get. -func (op Op) IsGet() bool { return op.t == tRange } - -// IsDelete returns true iff the operation is a Delete. -func (op Op) IsDelete() bool { return op.t == tDeleteRange } - -// IsSerializable returns true if the serializable field is true. -func (op Op) IsSerializable() bool { return op.serializable } - -// IsKeysOnly returns whether keysOnly is set. -func (op Op) IsKeysOnly() bool { return op.keysOnly } - -// IsCountOnly returns whether countOnly is set. -func (op Op) IsCountOnly() bool { return op.countOnly } - -// MinModRev returns the operation's minimum modify revision. -func (op Op) MinModRev() int64 { return op.minModRev } - -// MaxModRev returns the operation's maximum modify revision. -func (op Op) MaxModRev() int64 { return op.maxModRev } - -// MinCreateRev returns the operation's minimum create revision. -func (op Op) MinCreateRev() int64 { return op.minCreateRev } - -// MaxCreateRev returns the operation's maximum create revision. -func (op Op) MaxCreateRev() int64 { return op.maxCreateRev } - -// WithRangeBytes sets the byte slice for the Op's range end. -func (op *Op) WithRangeBytes(end []byte) { op.end = end } - -// ValueBytes returns the byte slice holding the Op's value, if any. -func (op Op) ValueBytes() []byte { return op.val } - -// WithValueBytes sets the byte slice for the Op's value. -func (op *Op) WithValueBytes(v []byte) { op.val = v } - -func (op Op) toRangeRequest() *pb.RangeRequest { - if op.t != tRange { - panic("op.t != tRange") - } - r := &pb.RangeRequest{ - Key: op.key, - RangeEnd: op.end, - Limit: op.limit, - Revision: op.rev, - Serializable: op.serializable, - KeysOnly: op.keysOnly, - CountOnly: op.countOnly, - MinModRevision: op.minModRev, - MaxModRevision: op.maxModRev, - MinCreateRevision: op.minCreateRev, - MaxCreateRevision: op.maxCreateRev, - } - if op.sort != nil { - r.SortOrder = pb.RangeRequest_SortOrder(op.sort.Order) - r.SortTarget = pb.RangeRequest_SortTarget(op.sort.Target) - } - return r -} - -func (op Op) toTxnRequest() *pb.TxnRequest { - thenOps := make([]*pb.RequestOp, len(op.thenOps)) - for i, tOp := range op.thenOps { - thenOps[i] = tOp.toRequestOp() - } - elseOps := make([]*pb.RequestOp, len(op.elseOps)) - for i, eOp := range op.elseOps { - elseOps[i] = eOp.toRequestOp() - } - cmps := make([]*pb.Compare, len(op.cmps)) - for i := range op.cmps { - cmps[i] = (*pb.Compare)(&op.cmps[i]) - } - return &pb.TxnRequest{Compare: cmps, Success: thenOps, Failure: elseOps} -} - -func (op Op) toRequestOp() *pb.RequestOp { - switch op.t { - case tRange: - return &pb.RequestOp{Request: &pb.RequestOp_RequestRange{RequestRange: op.toRangeRequest()}} - case tPut: - r := &pb.PutRequest{Key: op.key, Value: op.val, Lease: int64(op.leaseID), PrevKv: op.prevKV, IgnoreValue: op.ignoreValue, IgnoreLease: op.ignoreLease} - return &pb.RequestOp{Request: &pb.RequestOp_RequestPut{RequestPut: r}} - case tDeleteRange: - r := &pb.DeleteRangeRequest{Key: op.key, RangeEnd: op.end, PrevKv: op.prevKV} - return &pb.RequestOp{Request: &pb.RequestOp_RequestDeleteRange{RequestDeleteRange: r}} - case tTxn: - return &pb.RequestOp{Request: &pb.RequestOp_RequestTxn{RequestTxn: op.toTxnRequest()}} - default: - panic("Unknown Op") - } -} - -func (op Op) isWrite() bool { - if op.t == tTxn { - for _, tOp := range op.thenOps { - if tOp.isWrite() { - return true - } - } - for _, tOp := range op.elseOps { - if tOp.isWrite() { - return true - } - } - return false - } - return op.t != tRange -} - -func NewOp() *Op { - return &Op{key: []byte("")} -} - -// OpGet returns "get" operation based on given key and operation options. -func OpGet(key string, opts ...OpOption) Op { - // WithPrefix and WithFromKey are not supported together - if IsOptsWithPrefix(opts) && IsOptsWithFromKey(opts) { - panic("`WithPrefix` and `WithFromKey` cannot be set at the same time, choose one") - } - ret := Op{t: tRange, key: []byte(key)} - ret.applyOpts(opts) - return ret -} - -// OpDelete returns "delete" operation based on given key and operation options. -func OpDelete(key string, opts ...OpOption) Op { - // WithPrefix and WithFromKey are not supported together - if IsOptsWithPrefix(opts) && IsOptsWithFromKey(opts) { - panic("`WithPrefix` and `WithFromKey` cannot be set at the same time, choose one") - } - ret := Op{t: tDeleteRange, key: []byte(key)} - ret.applyOpts(opts) - switch { - case ret.leaseID != 0: - panic("unexpected lease in delete") - case ret.limit != 0: - panic("unexpected limit in delete") - case ret.rev != 0: - panic("unexpected revision in delete") - case ret.sort != nil: - panic("unexpected sort in delete") - case ret.serializable: - panic("unexpected serializable in delete") - case ret.countOnly: - panic("unexpected countOnly in delete") - case ret.minModRev != 0, ret.maxModRev != 0: - panic("unexpected mod revision filter in delete") - case ret.minCreateRev != 0, ret.maxCreateRev != 0: - panic("unexpected create revision filter in delete") - case ret.filterDelete, ret.filterPut: - panic("unexpected filter in delete") - case ret.createdNotify: - panic("unexpected createdNotify in delete") - } - return ret -} - -// OpPut returns "put" operation based on given key-value and operation options. -func OpPut(key, val string, opts ...OpOption) Op { - ret := Op{t: tPut, key: []byte(key), val: []byte(val)} - ret.applyOpts(opts) - switch { - case ret.end != nil: - panic("unexpected range in put") - case ret.limit != 0: - panic("unexpected limit in put") - case ret.rev != 0: - panic("unexpected revision in put") - case ret.sort != nil: - panic("unexpected sort in put") - case ret.serializable: - panic("unexpected serializable in put") - case ret.countOnly: - panic("unexpected countOnly in put") - case ret.minModRev != 0, ret.maxModRev != 0: - panic("unexpected mod revision filter in put") - case ret.minCreateRev != 0, ret.maxCreateRev != 0: - panic("unexpected create revision filter in put") - case ret.filterDelete, ret.filterPut: - panic("unexpected filter in put") - case ret.createdNotify: - panic("unexpected createdNotify in put") - } - return ret -} - -// OpTxn returns "txn" operation based on given transaction conditions. -func OpTxn(cmps []Cmp, thenOps []Op, elseOps []Op) Op { - return Op{t: tTxn, cmps: cmps, thenOps: thenOps, elseOps: elseOps} -} - -func opWatch(key string, opts ...OpOption) Op { - ret := Op{t: tRange, key: []byte(key)} - ret.applyOpts(opts) - switch { - case ret.leaseID != 0: - panic("unexpected lease in watch") - case ret.limit != 0: - panic("unexpected limit in watch") - case ret.sort != nil: - panic("unexpected sort in watch") - case ret.serializable: - panic("unexpected serializable in watch") - case ret.countOnly: - panic("unexpected countOnly in watch") - case ret.minModRev != 0, ret.maxModRev != 0: - panic("unexpected mod revision filter in watch") - case ret.minCreateRev != 0, ret.maxCreateRev != 0: - panic("unexpected create revision filter in watch") - } - return ret -} - -func (op *Op) applyOpts(opts []OpOption) { - for _, opt := range opts { - opt(op) - } -} - -// OpOption configures Operations like Get, Put, Delete. -type OpOption func(*Op) - -// WithLease attaches a lease ID to a key in 'Put' request. -func WithLease(leaseID LeaseID) OpOption { - return func(op *Op) { op.leaseID = leaseID } -} - -// WithLimit limits the number of results to return from 'Get' request. -// If WithLimit is given a 0 limit, it is treated as no limit. -func WithLimit(n int64) OpOption { return func(op *Op) { op.limit = n } } - -// WithRev specifies the store revision for 'Get' request. -// Or the start revision of 'Watch' request. -func WithRev(rev int64) OpOption { return func(op *Op) { op.rev = rev } } - -// WithSort specifies the ordering in 'Get' request. It requires -// 'WithRange' and/or 'WithPrefix' to be specified too. -// 'target' specifies the target to sort by: key, version, revisions, value. -// 'order' can be either 'SortNone', 'SortAscend', 'SortDescend'. -func WithSort(target SortTarget, order SortOrder) OpOption { - return func(op *Op) { - if target == SortByKey && order == SortAscend { - // If order != SortNone, server fetches the entire key-space, - // and then applies the sort and limit, if provided. - // Since by default the server returns results sorted by keys - // in lexicographically ascending order, the client should ignore - // SortOrder if the target is SortByKey. - order = SortNone - } - op.sort = &SortOption{target, order} - } -} - -// GetPrefixRangeEnd gets the range end of the prefix. -// 'Get(foo, WithPrefix())' is equal to 'Get(foo, WithRange(GetPrefixRangeEnd(foo))'. -func GetPrefixRangeEnd(prefix string) string { - return string(getPrefix([]byte(prefix))) -} - -func getPrefix(key []byte) []byte { - end := make([]byte, len(key)) - copy(end, key) - for i := len(end) - 1; i >= 0; i-- { - if end[i] < 0xff { - end[i] = end[i] + 1 - end = end[:i+1] - return end - } - } - // next prefix does not exist (e.g., 0xffff); - // default to WithFromKey policy - return noPrefixEnd -} - -// WithPrefix enables 'Get', 'Delete', or 'Watch' requests to operate -// on the keys with matching prefix. For example, 'Get(foo, WithPrefix())' -// can return 'foo1', 'foo2', and so on. -func WithPrefix() OpOption { - return func(op *Op) { - op.isOptsWithPrefix = true - if len(op.key) == 0 { - op.key, op.end = []byte{0}, []byte{0} - return - } - op.end = getPrefix(op.key) - } -} - -// WithRange specifies the range of 'Get', 'Delete', 'Watch' requests. -// For example, 'Get' requests with 'WithRange(end)' returns -// the keys in the range [key, end). -// endKey must be lexicographically greater than start key. -func WithRange(endKey string) OpOption { - return func(op *Op) { op.end = []byte(endKey) } -} - -// WithFromKey specifies the range of 'Get', 'Delete', 'Watch' requests -// to be equal or greater than the key in the argument. -func WithFromKey() OpOption { - return func(op *Op) { - if len(op.key) == 0 { - op.key = []byte{0} - } - op.end = []byte("\x00") - op.isOptsWithFromKey = true - } -} - -// WithSerializable makes 'Get' request serializable. By default, -// it's linearizable. Serializable requests are better for lower latency -// requirement. -func WithSerializable() OpOption { - return func(op *Op) { op.serializable = true } -} - -// WithKeysOnly makes the 'Get' request return only the keys and the corresponding -// values will be omitted. -func WithKeysOnly() OpOption { - return func(op *Op) { op.keysOnly = true } -} - -// WithCountOnly makes the 'Get' request return only the count of keys. -func WithCountOnly() OpOption { - return func(op *Op) { op.countOnly = true } -} - -// WithMinModRev filters out keys for Get with modification revisions less than the given revision. -func WithMinModRev(rev int64) OpOption { return func(op *Op) { op.minModRev = rev } } - -// WithMaxModRev filters out keys for Get with modification revisions greater than the given revision. -func WithMaxModRev(rev int64) OpOption { return func(op *Op) { op.maxModRev = rev } } - -// WithMinCreateRev filters out keys for Get with creation revisions less than the given revision. -func WithMinCreateRev(rev int64) OpOption { return func(op *Op) { op.minCreateRev = rev } } - -// WithMaxCreateRev filters out keys for Get with creation revisions greater than the given revision. -func WithMaxCreateRev(rev int64) OpOption { return func(op *Op) { op.maxCreateRev = rev } } - -// WithFirstCreate gets the key with the oldest creation revision in the request range. -func WithFirstCreate() []OpOption { return withTop(SortByCreateRevision, SortAscend) } - -// WithLastCreate gets the key with the latest creation revision in the request range. -func WithLastCreate() []OpOption { return withTop(SortByCreateRevision, SortDescend) } - -// WithFirstKey gets the lexically first key in the request range. -func WithFirstKey() []OpOption { return withTop(SortByKey, SortAscend) } - -// WithLastKey gets the lexically last key in the request range. -func WithLastKey() []OpOption { return withTop(SortByKey, SortDescend) } - -// WithFirstRev gets the key with the oldest modification revision in the request range. -func WithFirstRev() []OpOption { return withTop(SortByModRevision, SortAscend) } - -// WithLastRev gets the key with the latest modification revision in the request range. -func WithLastRev() []OpOption { return withTop(SortByModRevision, SortDescend) } - -// withTop gets the first key over the get's prefix given a sort order -func withTop(target SortTarget, order SortOrder) []OpOption { - return []OpOption{WithPrefix(), WithSort(target, order), WithLimit(1)} -} - -// WithProgressNotify makes watch server send periodic progress updates -// every 10 minutes when there is no incoming events. -// Progress updates have zero events in WatchResponse. -func WithProgressNotify() OpOption { - return func(op *Op) { - op.progressNotify = true - } -} - -// WithCreatedNotify makes watch server sends the created event. -func WithCreatedNotify() OpOption { - return func(op *Op) { - op.createdNotify = true - } -} - -// WithFilterPut discards PUT events from the watcher. -func WithFilterPut() OpOption { - return func(op *Op) { op.filterPut = true } -} - -// WithFilterDelete discards DELETE events from the watcher. -func WithFilterDelete() OpOption { - return func(op *Op) { op.filterDelete = true } -} - -// WithPrevKV gets the previous key-value pair before the event happens. If the previous KV is already compacted, -// nothing will be returned. -func WithPrevKV() OpOption { - return func(op *Op) { - op.prevKV = true - } -} - -// WithFragment to receive raw watch response with fragmentation. -// Fragmentation is disabled by default. If fragmentation is enabled, -// etcd watch server will split watch response before sending to clients -// when the total size of watch events exceed server-side request limit. -// The default server-side request limit is 1.5 MiB, which can be configured -// as "--max-request-bytes" flag value + gRPC-overhead 512 bytes. -// See "etcdserver/api/v3rpc/watch.go" for more details. -func WithFragment() OpOption { - return func(op *Op) { op.fragment = true } -} - -// WithIgnoreValue updates the key using its current value. -// This option can not be combined with non-empty values. -// Returns an error if the key does not exist. -func WithIgnoreValue() OpOption { - return func(op *Op) { - op.ignoreValue = true - } -} - -// WithIgnoreLease updates the key using its current lease. -// This option can not be combined with WithLease. -// Returns an error if the key does not exist. -func WithIgnoreLease() OpOption { - return func(op *Op) { - op.ignoreLease = true - } -} - -// LeaseOp represents an Operation that lease can execute. -type LeaseOp struct { - id LeaseID - - // for TimeToLive - attachedKeys bool -} - -// LeaseOption configures lease operations. -type LeaseOption func(*LeaseOp) - -func (op *LeaseOp) applyOpts(opts []LeaseOption) { - for _, opt := range opts { - opt(op) - } -} - -// WithAttachedKeys makes TimeToLive list the keys attached to the given lease ID. -func WithAttachedKeys() LeaseOption { - return func(op *LeaseOp) { op.attachedKeys = true } -} - -func toLeaseTimeToLiveRequest(id LeaseID, opts ...LeaseOption) *pb.LeaseTimeToLiveRequest { - ret := &LeaseOp{id: id} - ret.applyOpts(opts) - return &pb.LeaseTimeToLiveRequest{ID: int64(id), Keys: ret.attachedKeys} -} - -// IsOptsWithPrefix returns true if WithPrefix option is called in the given opts. -func IsOptsWithPrefix(opts []OpOption) bool { - ret := NewOp() - for _, opt := range opts { - opt(ret) - } - - return ret.isOptsWithPrefix -} - -// IsOptsWithFromKey returns true if WithFromKey option is called in the given opts. -func IsOptsWithFromKey(opts []OpOption) bool { - ret := NewOp() - for _, opt := range opts { - opt(ret) - } - - return ret.isOptsWithFromKey -} diff --git a/vendor/go.etcd.io/etcd/client/v3/options.go b/vendor/go.etcd.io/etcd/client/v3/options.go deleted file mode 100644 index cdae1b16a2a..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/options.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2017 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "math" - "time" - - "google.golang.org/grpc" -) - -var ( - // client-side handling retrying of request failures where data was not written to the wire or - // where server indicates it did not process the data. gRPC default is default is "WaitForReady(false)" - // but for etcd we default to "WaitForReady(true)" to minimize client request error responses due to - // transient failures. - defaultWaitForReady = grpc.WaitForReady(true) - - // client-side request send limit, gRPC default is math.MaxInt32 - // Make sure that "client-side send limit < server-side default send/recv limit" - // Same value as "embed.DefaultMaxRequestBytes" plus gRPC overhead bytes - defaultMaxCallSendMsgSize = grpc.MaxCallSendMsgSize(2 * 1024 * 1024) - - // client-side response receive limit, gRPC default is 4MB - // Make sure that "client-side receive limit >= server-side default send/recv limit" - // because range response can easily exceed request send limits - // Default to math.MaxInt32; writes exceeding server-side send limit fails anyway - defaultMaxCallRecvMsgSize = grpc.MaxCallRecvMsgSize(math.MaxInt32) - - // client-side non-streaming retry limit, only applied to requests where server responds with - // a error code clearly indicating it was unable to process the request such as codes.Unavailable. - // If set to 0, retry is disabled. - defaultUnaryMaxRetries uint = 100 - - // client-side streaming retry limit, only applied to requests where server responds with - // a error code clearly indicating it was unable to process the request such as codes.Unavailable. - // If set to 0, retry is disabled. - defaultStreamMaxRetries = ^uint(0) // max uint - - // client-side retry backoff wait between requests. - defaultBackoffWaitBetween = 25 * time.Millisecond - - // client-side retry backoff default jitter fraction. - defaultBackoffJitterFraction = 0.10 -) - -// defaultCallOpts defines a list of default "gRPC.CallOption". -// Some options are exposed to "clientv3.Config". -// Defaults will be overridden by the settings in "clientv3.Config". -var defaultCallOpts = []grpc.CallOption{ - defaultWaitForReady, - defaultMaxCallSendMsgSize, - defaultMaxCallRecvMsgSize, -} - -// MaxLeaseTTL is the maximum lease TTL value -const MaxLeaseTTL = 9000000000 diff --git a/vendor/go.etcd.io/etcd/client/v3/retry.go b/vendor/go.etcd.io/etcd/client/v3/retry.go deleted file mode 100644 index 69ecc631471..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/retry.go +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "context" - - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -type retryPolicy uint8 - -const ( - repeatable retryPolicy = iota - nonRepeatable -) - -func (rp retryPolicy) String() string { - switch rp { - case repeatable: - return "repeatable" - case nonRepeatable: - return "nonRepeatable" - default: - return "UNKNOWN" - } -} - -// isSafeRetryImmutableRPC returns "true" when an immutable request is safe for retry. -// -// immutable requests (e.g. Get) should be retried unless it's -// an obvious server-side error (e.g. rpctypes.ErrRequestTooLarge). -// -// Returning "false" means retry should stop, since client cannot -// handle itself even with retries. -func isSafeRetryImmutableRPC(err error) bool { - eErr := rpctypes.Error(err) - if serverErr, ok := eErr.(rpctypes.EtcdError); ok && serverErr.Code() != codes.Unavailable { - // interrupted by non-transient server-side or gRPC-side error - // client cannot handle itself (e.g. rpctypes.ErrCompacted) - return false - } - // only retry if unavailable - ev, ok := status.FromError(err) - if !ok { - // all errors from RPC is typed "grpc/status.(*statusError)" - // (ref. https://github.com/grpc/grpc-go/pull/1782) - // - // if the error type is not "grpc/status.(*statusError)", - // it could be from "Dial" - // TODO: do not retry for now - // ref. https://github.com/grpc/grpc-go/issues/1581 - return false - } - return ev.Code() == codes.Unavailable -} - -// isSafeRetryMutableRPC returns "true" when a mutable request is safe for retry. -// -// mutable requests (e.g. Put, Delete, Txn) should only be retried -// when the status code is codes.Unavailable when initial connection -// has not been established (no endpoint is up). -// -// Returning "false" means retry should stop, otherwise it violates -// write-at-most-once semantics. -func isSafeRetryMutableRPC(err error) bool { - if ev, ok := status.FromError(err); ok && ev.Code() != codes.Unavailable { - // not safe for mutable RPCs - // e.g. interrupted by non-transient error that client cannot handle itself, - // or transient error while the connection has already been established - return false - } - desc := rpctypes.ErrorDesc(err) - return desc == "there is no address available" || desc == "there is no connection available" -} - -type retryKVClient struct { - kc pb.KVClient -} - -// RetryKVClient implements a KVClient. -func RetryKVClient(c *Client) pb.KVClient { - return &retryKVClient{ - kc: pb.NewKVClient(c.conn), - } -} -func (rkv *retryKVClient) Range(ctx context.Context, in *pb.RangeRequest, opts ...grpc.CallOption) (resp *pb.RangeResponse, err error) { - return rkv.kc.Range(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rkv *retryKVClient) Put(ctx context.Context, in *pb.PutRequest, opts ...grpc.CallOption) (resp *pb.PutResponse, err error) { - return rkv.kc.Put(ctx, in, opts...) -} - -func (rkv *retryKVClient) DeleteRange(ctx context.Context, in *pb.DeleteRangeRequest, opts ...grpc.CallOption) (resp *pb.DeleteRangeResponse, err error) { - return rkv.kc.DeleteRange(ctx, in, opts...) -} - -func (rkv *retryKVClient) Txn(ctx context.Context, in *pb.TxnRequest, opts ...grpc.CallOption) (resp *pb.TxnResponse, err error) { - return rkv.kc.Txn(ctx, in, opts...) -} - -func (rkv *retryKVClient) Compact(ctx context.Context, in *pb.CompactionRequest, opts ...grpc.CallOption) (resp *pb.CompactionResponse, err error) { - return rkv.kc.Compact(ctx, in, opts...) -} - -type retryLeaseClient struct { - lc pb.LeaseClient -} - -// RetryLeaseClient implements a LeaseClient. -func RetryLeaseClient(c *Client) pb.LeaseClient { - return &retryLeaseClient{ - lc: pb.NewLeaseClient(c.conn), - } -} - -func (rlc *retryLeaseClient) LeaseTimeToLive(ctx context.Context, in *pb.LeaseTimeToLiveRequest, opts ...grpc.CallOption) (resp *pb.LeaseTimeToLiveResponse, err error) { - return rlc.lc.LeaseTimeToLive(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rlc *retryLeaseClient) LeaseLeases(ctx context.Context, in *pb.LeaseLeasesRequest, opts ...grpc.CallOption) (resp *pb.LeaseLeasesResponse, err error) { - return rlc.lc.LeaseLeases(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rlc *retryLeaseClient) LeaseGrant(ctx context.Context, in *pb.LeaseGrantRequest, opts ...grpc.CallOption) (resp *pb.LeaseGrantResponse, err error) { - return rlc.lc.LeaseGrant(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rlc *retryLeaseClient) LeaseRevoke(ctx context.Context, in *pb.LeaseRevokeRequest, opts ...grpc.CallOption) (resp *pb.LeaseRevokeResponse, err error) { - return rlc.lc.LeaseRevoke(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rlc *retryLeaseClient) LeaseKeepAlive(ctx context.Context, opts ...grpc.CallOption) (stream pb.Lease_LeaseKeepAliveClient, err error) { - return rlc.lc.LeaseKeepAlive(ctx, append(opts, withRetryPolicy(repeatable))...) -} - -type retryClusterClient struct { - cc pb.ClusterClient -} - -// RetryClusterClient implements a ClusterClient. -func RetryClusterClient(c *Client) pb.ClusterClient { - return &retryClusterClient{ - cc: pb.NewClusterClient(c.conn), - } -} - -func (rcc *retryClusterClient) MemberList(ctx context.Context, in *pb.MemberListRequest, opts ...grpc.CallOption) (resp *pb.MemberListResponse, err error) { - return rcc.cc.MemberList(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rcc *retryClusterClient) MemberAdd(ctx context.Context, in *pb.MemberAddRequest, opts ...grpc.CallOption) (resp *pb.MemberAddResponse, err error) { - return rcc.cc.MemberAdd(ctx, in, opts...) -} - -func (rcc *retryClusterClient) MemberRemove(ctx context.Context, in *pb.MemberRemoveRequest, opts ...grpc.CallOption) (resp *pb.MemberRemoveResponse, err error) { - return rcc.cc.MemberRemove(ctx, in, opts...) -} - -func (rcc *retryClusterClient) MemberUpdate(ctx context.Context, in *pb.MemberUpdateRequest, opts ...grpc.CallOption) (resp *pb.MemberUpdateResponse, err error) { - return rcc.cc.MemberUpdate(ctx, in, opts...) -} - -func (rcc *retryClusterClient) MemberPromote(ctx context.Context, in *pb.MemberPromoteRequest, opts ...grpc.CallOption) (resp *pb.MemberPromoteResponse, err error) { - return rcc.cc.MemberPromote(ctx, in, opts...) -} - -type retryMaintenanceClient struct { - mc pb.MaintenanceClient -} - -// RetryMaintenanceClient implements a Maintenance. -func RetryMaintenanceClient(c *Client, conn *grpc.ClientConn) pb.MaintenanceClient { - return &retryMaintenanceClient{ - mc: pb.NewMaintenanceClient(conn), - } -} - -func (rmc *retryMaintenanceClient) Alarm(ctx context.Context, in *pb.AlarmRequest, opts ...grpc.CallOption) (resp *pb.AlarmResponse, err error) { - return rmc.mc.Alarm(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rmc *retryMaintenanceClient) Status(ctx context.Context, in *pb.StatusRequest, opts ...grpc.CallOption) (resp *pb.StatusResponse, err error) { - return rmc.mc.Status(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rmc *retryMaintenanceClient) Hash(ctx context.Context, in *pb.HashRequest, opts ...grpc.CallOption) (resp *pb.HashResponse, err error) { - return rmc.mc.Hash(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rmc *retryMaintenanceClient) HashKV(ctx context.Context, in *pb.HashKVRequest, opts ...grpc.CallOption) (resp *pb.HashKVResponse, err error) { - return rmc.mc.HashKV(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rmc *retryMaintenanceClient) Snapshot(ctx context.Context, in *pb.SnapshotRequest, opts ...grpc.CallOption) (stream pb.Maintenance_SnapshotClient, err error) { - return rmc.mc.Snapshot(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rmc *retryMaintenanceClient) MoveLeader(ctx context.Context, in *pb.MoveLeaderRequest, opts ...grpc.CallOption) (resp *pb.MoveLeaderResponse, err error) { - return rmc.mc.MoveLeader(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rmc *retryMaintenanceClient) Defragment(ctx context.Context, in *pb.DefragmentRequest, opts ...grpc.CallOption) (resp *pb.DefragmentResponse, err error) { - return rmc.mc.Defragment(ctx, in, opts...) -} - -func (rmc *retryMaintenanceClient) Downgrade(ctx context.Context, in *pb.DowngradeRequest, opts ...grpc.CallOption) (resp *pb.DowngradeResponse, err error) { - return rmc.mc.Downgrade(ctx, in, opts...) -} - -type retryAuthClient struct { - ac pb.AuthClient -} - -// RetryAuthClient implements a AuthClient. -func RetryAuthClient(c *Client) pb.AuthClient { - return &retryAuthClient{ - ac: pb.NewAuthClient(c.conn), - } -} - -func (rac *retryAuthClient) UserList(ctx context.Context, in *pb.AuthUserListRequest, opts ...grpc.CallOption) (resp *pb.AuthUserListResponse, err error) { - return rac.ac.UserList(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rac *retryAuthClient) UserGet(ctx context.Context, in *pb.AuthUserGetRequest, opts ...grpc.CallOption) (resp *pb.AuthUserGetResponse, err error) { - return rac.ac.UserGet(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rac *retryAuthClient) RoleGet(ctx context.Context, in *pb.AuthRoleGetRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleGetResponse, err error) { - return rac.ac.RoleGet(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rac *retryAuthClient) RoleList(ctx context.Context, in *pb.AuthRoleListRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleListResponse, err error) { - return rac.ac.RoleList(ctx, in, append(opts, withRetryPolicy(repeatable))...) -} - -func (rac *retryAuthClient) AuthEnable(ctx context.Context, in *pb.AuthEnableRequest, opts ...grpc.CallOption) (resp *pb.AuthEnableResponse, err error) { - return rac.ac.AuthEnable(ctx, in, opts...) -} - -func (rac *retryAuthClient) AuthDisable(ctx context.Context, in *pb.AuthDisableRequest, opts ...grpc.CallOption) (resp *pb.AuthDisableResponse, err error) { - return rac.ac.AuthDisable(ctx, in, opts...) -} - -func (rac *retryAuthClient) AuthStatus(ctx context.Context, in *pb.AuthStatusRequest, opts ...grpc.CallOption) (resp *pb.AuthStatusResponse, err error) { - return rac.ac.AuthStatus(ctx, in, opts...) -} - -func (rac *retryAuthClient) UserAdd(ctx context.Context, in *pb.AuthUserAddRequest, opts ...grpc.CallOption) (resp *pb.AuthUserAddResponse, err error) { - return rac.ac.UserAdd(ctx, in, opts...) -} - -func (rac *retryAuthClient) UserDelete(ctx context.Context, in *pb.AuthUserDeleteRequest, opts ...grpc.CallOption) (resp *pb.AuthUserDeleteResponse, err error) { - return rac.ac.UserDelete(ctx, in, opts...) -} - -func (rac *retryAuthClient) UserChangePassword(ctx context.Context, in *pb.AuthUserChangePasswordRequest, opts ...grpc.CallOption) (resp *pb.AuthUserChangePasswordResponse, err error) { - return rac.ac.UserChangePassword(ctx, in, opts...) -} - -func (rac *retryAuthClient) UserGrantRole(ctx context.Context, in *pb.AuthUserGrantRoleRequest, opts ...grpc.CallOption) (resp *pb.AuthUserGrantRoleResponse, err error) { - return rac.ac.UserGrantRole(ctx, in, opts...) -} - -func (rac *retryAuthClient) UserRevokeRole(ctx context.Context, in *pb.AuthUserRevokeRoleRequest, opts ...grpc.CallOption) (resp *pb.AuthUserRevokeRoleResponse, err error) { - return rac.ac.UserRevokeRole(ctx, in, opts...) -} - -func (rac *retryAuthClient) RoleAdd(ctx context.Context, in *pb.AuthRoleAddRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleAddResponse, err error) { - return rac.ac.RoleAdd(ctx, in, opts...) -} - -func (rac *retryAuthClient) RoleDelete(ctx context.Context, in *pb.AuthRoleDeleteRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleDeleteResponse, err error) { - return rac.ac.RoleDelete(ctx, in, opts...) -} - -func (rac *retryAuthClient) RoleGrantPermission(ctx context.Context, in *pb.AuthRoleGrantPermissionRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleGrantPermissionResponse, err error) { - return rac.ac.RoleGrantPermission(ctx, in, opts...) -} - -func (rac *retryAuthClient) RoleRevokePermission(ctx context.Context, in *pb.AuthRoleRevokePermissionRequest, opts ...grpc.CallOption) (resp *pb.AuthRoleRevokePermissionResponse, err error) { - return rac.ac.RoleRevokePermission(ctx, in, opts...) -} - -func (rac *retryAuthClient) Authenticate(ctx context.Context, in *pb.AuthenticateRequest, opts ...grpc.CallOption) (resp *pb.AuthenticateResponse, err error) { - return rac.ac.Authenticate(ctx, in, opts...) -} diff --git a/vendor/go.etcd.io/etcd/client/v3/retry_interceptor.go b/vendor/go.etcd.io/etcd/client/v3/retry_interceptor.go deleted file mode 100644 index 7dc5ddae0fd..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/retry_interceptor.go +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Based on github.com/grpc-ecosystem/go-grpc-middleware/retry, but modified to support the more -// fine grained error checking required by write-at-most-once retry semantics of etcd. - -package clientv3 - -import ( - "context" - "io" - "sync" - "time" - - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.uber.org/zap" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// unaryClientInterceptor returns a new retrying unary client interceptor. -// -// The default configuration of the interceptor is to not retry *at all*. This behaviour can be -// changed through options (e.g. WithMax) on creation of the interceptor or on call (through grpc.CallOptions). -func (c *Client) unaryClientInterceptor(optFuncs ...retryOption) grpc.UnaryClientInterceptor { - intOpts := reuseOrNewWithCallOptions(defaultOptions, optFuncs) - return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { - ctx = withVersion(ctx) - grpcOpts, retryOpts := filterCallOptions(opts) - callOpts := reuseOrNewWithCallOptions(intOpts, retryOpts) - // short circuit for simplicity, and avoiding allocations. - if callOpts.max == 0 { - return invoker(ctx, method, req, reply, cc, grpcOpts...) - } - var lastErr error - for attempt := uint(0); attempt < callOpts.max; attempt++ { - if err := waitRetryBackoff(ctx, attempt, callOpts); err != nil { - return err - } - c.GetLogger().Debug( - "retrying of unary invoker", - zap.String("target", cc.Target()), - zap.Uint("attempt", attempt), - ) - lastErr = invoker(ctx, method, req, reply, cc, grpcOpts...) - if lastErr == nil { - return nil - } - c.GetLogger().Warn( - "retrying of unary invoker failed", - zap.String("target", cc.Target()), - zap.Uint("attempt", attempt), - zap.Error(lastErr), - ) - if isContextError(lastErr) { - if ctx.Err() != nil { - // its the context deadline or cancellation. - return lastErr - } - // its the callCtx deadline or cancellation, in which case try again. - continue - } - if c.shouldRefreshToken(lastErr, callOpts) { - gterr := c.refreshToken(ctx) - if gterr != nil { - c.GetLogger().Warn( - "retrying of unary invoker failed to fetch new auth token", - zap.String("target", cc.Target()), - zap.Error(gterr), - ) - return gterr // lastErr must be invalid auth token - } - continue - } - if !isSafeRetry(c.lg, lastErr, callOpts) { - return lastErr - } - } - return lastErr - } -} - -// streamClientInterceptor returns a new retrying stream client interceptor for server side streaming calls. -// -// The default configuration of the interceptor is to not retry *at all*. This behaviour can be -// changed through options (e.g. WithMax) on creation of the interceptor or on call (through grpc.CallOptions). -// -// Retry logic is available *only for ServerStreams*, i.e. 1:n streams, as the internal logic needs -// to buffer the messages sent by the client. If retry is enabled on any other streams (ClientStreams, -// BidiStreams), the retry interceptor will fail the call. -func (c *Client) streamClientInterceptor(optFuncs ...retryOption) grpc.StreamClientInterceptor { - intOpts := reuseOrNewWithCallOptions(defaultOptions, optFuncs) - return func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) { - ctx = withVersion(ctx) - // getToken automatically - // TODO(cfc4n): keep this code block, remove codes about getToken in client.go after pr #12165 merged. - if c.authTokenBundle != nil { - // equal to c.Username != "" && c.Password != "" - err := c.getToken(ctx) - if err != nil && rpctypes.Error(err) != rpctypes.ErrAuthNotEnabled { - c.GetLogger().Error("clientv3/retry_interceptor: getToken failed", zap.Error(err)) - return nil, err - } - } - grpcOpts, retryOpts := filterCallOptions(opts) - callOpts := reuseOrNewWithCallOptions(intOpts, retryOpts) - // short circuit for simplicity, and avoiding allocations. - if callOpts.max == 0 { - return streamer(ctx, desc, cc, method, grpcOpts...) - } - if desc.ClientStreams { - return nil, status.Errorf(codes.Unimplemented, "clientv3/retry_interceptor: cannot retry on ClientStreams, set Disable()") - } - newStreamer, err := streamer(ctx, desc, cc, method, grpcOpts...) - if err != nil { - c.GetLogger().Error("streamer failed to create ClientStream", zap.Error(err)) - return nil, err // TODO(mwitkow): Maybe dial and transport errors should be retriable? - } - retryingStreamer := &serverStreamingRetryingStream{ - client: c, - ClientStream: newStreamer, - callOpts: callOpts, - ctx: ctx, - streamerCall: func(ctx context.Context) (grpc.ClientStream, error) { - return streamer(ctx, desc, cc, method, grpcOpts...) - }, - } - return retryingStreamer, nil - } -} - -// shouldRefreshToken checks whether there's a need to refresh the token based on the error and callOptions, -// and returns a boolean value. -func (c *Client) shouldRefreshToken(err error, callOpts *options) bool { - if rpctypes.Error(err) == rpctypes.ErrUserEmpty { - // refresh the token when username, password is present but the server returns ErrUserEmpty - // which is possible when the client token is cleared somehow - return c.authTokenBundle != nil // equal to c.Username != "" && c.Password != "" - } - - return callOpts.retryAuth && - (rpctypes.Error(err) == rpctypes.ErrInvalidAuthToken || rpctypes.Error(err) == rpctypes.ErrAuthOldRevision) -} - -func (c *Client) refreshToken(ctx context.Context) error { - if c.authTokenBundle == nil { - // c.authTokenBundle will be initialized only when - // c.Username != "" && c.Password != "". - // - // When users use the TLS CommonName based authentication, the - // authTokenBundle is always nil. But it's possible for the clients - // to get `rpctypes.ErrAuthOldRevision` response when the clients - // concurrently modify auth data (e.g, addUser, deleteUser etc.). - // In this case, there is no need to refresh the token; instead the - // clients just need to retry the operations (e.g. Put, Delete etc). - return nil - } - // clear auth token before refreshing it. - c.authTokenBundle.UpdateAuthToken("") - return c.getToken(ctx) -} - -// type serverStreamingRetryingStream is the implementation of grpc.ClientStream that acts as a -// proxy to the underlying call. If any of the RecvMsg() calls fail, it will try to reestablish -// a new ClientStream according to the retry policy. -type serverStreamingRetryingStream struct { - grpc.ClientStream - client *Client - bufferedSends []interface{} // single message that the client can sen - receivedGood bool // indicates whether any prior receives were successful - wasClosedSend bool // indicates that CloseSend was closed - ctx context.Context - callOpts *options - streamerCall func(ctx context.Context) (grpc.ClientStream, error) - mu sync.RWMutex -} - -func (s *serverStreamingRetryingStream) setStream(clientStream grpc.ClientStream) { - s.mu.Lock() - s.ClientStream = clientStream - s.mu.Unlock() -} - -func (s *serverStreamingRetryingStream) getStream() grpc.ClientStream { - s.mu.RLock() - defer s.mu.RUnlock() - return s.ClientStream -} - -func (s *serverStreamingRetryingStream) SendMsg(m interface{}) error { - s.mu.Lock() - s.bufferedSends = append(s.bufferedSends, m) - s.mu.Unlock() - return s.getStream().SendMsg(m) -} - -func (s *serverStreamingRetryingStream) CloseSend() error { - s.mu.Lock() - s.wasClosedSend = true - s.mu.Unlock() - return s.getStream().CloseSend() -} - -func (s *serverStreamingRetryingStream) Header() (metadata.MD, error) { - return s.getStream().Header() -} - -func (s *serverStreamingRetryingStream) Trailer() metadata.MD { - return s.getStream().Trailer() -} - -func (s *serverStreamingRetryingStream) RecvMsg(m interface{}) error { - attemptRetry, lastErr := s.receiveMsgAndIndicateRetry(m) - if !attemptRetry { - return lastErr // success or hard failure - } - - // We start off from attempt 1, because zeroth was already made on normal SendMsg(). - for attempt := uint(1); attempt < s.callOpts.max; attempt++ { - if err := waitRetryBackoff(s.ctx, attempt, s.callOpts); err != nil { - return err - } - newStream, err := s.reestablishStreamAndResendBuffer(s.ctx) - if err != nil { - s.client.lg.Error("failed reestablishStreamAndResendBuffer", zap.Error(err)) - return err // TODO(mwitkow): Maybe dial and transport errors should be retriable? - } - s.setStream(newStream) - - s.client.lg.Warn("retrying RecvMsg", zap.Error(lastErr)) - attemptRetry, lastErr = s.receiveMsgAndIndicateRetry(m) - if !attemptRetry { - return lastErr - } - } - return lastErr -} - -func (s *serverStreamingRetryingStream) receiveMsgAndIndicateRetry(m interface{}) (bool, error) { - s.mu.RLock() - wasGood := s.receivedGood - s.mu.RUnlock() - err := s.getStream().RecvMsg(m) - if err == nil || err == io.EOF { - s.mu.Lock() - s.receivedGood = true - s.mu.Unlock() - return false, err - } else if wasGood { - // previous RecvMsg in the stream succeeded, no retry logic should interfere - return false, err - } - if isContextError(err) { - if s.ctx.Err() != nil { - return false, err - } - // its the callCtx deadline or cancellation, in which case try again. - return true, err - } - if s.client.shouldRefreshToken(err, s.callOpts) { - gterr := s.client.refreshToken(s.ctx) - if gterr != nil { - s.client.lg.Warn("retry failed to fetch new auth token", zap.Error(gterr)) - return false, err // return the original error for simplicity - } - return true, err - - } - return isSafeRetry(s.client.lg, err, s.callOpts), err -} - -func (s *serverStreamingRetryingStream) reestablishStreamAndResendBuffer(callCtx context.Context) (grpc.ClientStream, error) { - s.mu.RLock() - bufferedSends := s.bufferedSends - s.mu.RUnlock() - newStream, err := s.streamerCall(callCtx) - if err != nil { - return nil, err - } - for _, msg := range bufferedSends { - if err := newStream.SendMsg(msg); err != nil { - return nil, err - } - } - if err := newStream.CloseSend(); err != nil { - return nil, err - } - return newStream, nil -} - -func waitRetryBackoff(ctx context.Context, attempt uint, callOpts *options) error { - waitTime := time.Duration(0) - if attempt > 0 { - waitTime = callOpts.backoffFunc(attempt) - } - if waitTime > 0 { - timer := time.NewTimer(waitTime) - select { - case <-ctx.Done(): - timer.Stop() - return contextErrToGrpcErr(ctx.Err()) - case <-timer.C: - } - } - return nil -} - -// isSafeRetry returns "true", if request is safe for retry with the given error. -func isSafeRetry(lg *zap.Logger, err error, callOpts *options) bool { - if isContextError(err) { - return false - } - switch callOpts.retryPolicy { - case repeatable: - return isSafeRetryImmutableRPC(err) - case nonRepeatable: - return isSafeRetryMutableRPC(err) - default: - lg.Warn("unrecognized retry policy", zap.String("retryPolicy", callOpts.retryPolicy.String())) - return false - } -} - -func isContextError(err error) bool { - return status.Code(err) == codes.DeadlineExceeded || status.Code(err) == codes.Canceled -} - -func contextErrToGrpcErr(err error) error { - switch err { - case context.DeadlineExceeded: - return status.Errorf(codes.DeadlineExceeded, err.Error()) - case context.Canceled: - return status.Errorf(codes.Canceled, err.Error()) - default: - return status.Errorf(codes.Unknown, err.Error()) - } -} - -var ( - defaultOptions = &options{ - retryPolicy: nonRepeatable, - max: 0, // disable - backoffFunc: backoffLinearWithJitter(50*time.Millisecond /*jitter*/, 0.10), - retryAuth: true, - } -) - -// backoffFunc denotes a family of functions that control the backoff duration between call retries. -// -// They are called with an identifier of the attempt, and should return a time the system client should -// hold off for. If the time returned is longer than the `context.Context.Deadline` of the request -// the deadline of the request takes precedence and the wait will be interrupted before proceeding -// with the next iteration. -type backoffFunc func(attempt uint) time.Duration - -// withRetryPolicy sets the retry policy of this call. -func withRetryPolicy(rp retryPolicy) retryOption { - return retryOption{applyFunc: func(o *options) { - o.retryPolicy = rp - }} -} - -// withMax sets the maximum number of retries on this call, or this interceptor. -func withMax(maxRetries uint) retryOption { - return retryOption{applyFunc: func(o *options) { - o.max = maxRetries - }} -} - -// WithBackoff sets the `BackoffFunc `used to control time between retries. -func withBackoff(bf backoffFunc) retryOption { - return retryOption{applyFunc: func(o *options) { - o.backoffFunc = bf - }} -} - -type options struct { - retryPolicy retryPolicy - max uint - backoffFunc backoffFunc - retryAuth bool -} - -// retryOption is a grpc.CallOption that is local to clientv3's retry interceptor. -type retryOption struct { - grpc.EmptyCallOption // make sure we implement private after() and before() fields so we don't panic. - applyFunc func(opt *options) -} - -func reuseOrNewWithCallOptions(opt *options, retryOptions []retryOption) *options { - if len(retryOptions) == 0 { - return opt - } - optCopy := &options{} - *optCopy = *opt - for _, f := range retryOptions { - f.applyFunc(optCopy) - } - return optCopy -} - -func filterCallOptions(callOptions []grpc.CallOption) (grpcOptions []grpc.CallOption, retryOptions []retryOption) { - for _, opt := range callOptions { - if co, ok := opt.(retryOption); ok { - retryOptions = append(retryOptions, co) - } else { - grpcOptions = append(grpcOptions, opt) - } - } - return grpcOptions, retryOptions -} - -// BackoffLinearWithJitter waits a set period of time, allowing for jitter (fractional adjustment). -// -// For example waitBetween=1s and jitter=0.10 can generate waits between 900ms and 1100ms. -func backoffLinearWithJitter(waitBetween time.Duration, jitterFraction float64) backoffFunc { - return func(attempt uint) time.Duration { - return jitterUp(waitBetween, jitterFraction) - } -} diff --git a/vendor/go.etcd.io/etcd/client/v3/sort.go b/vendor/go.etcd.io/etcd/client/v3/sort.go deleted file mode 100644 index 2bb9d9a13b7..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/sort.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -type SortTarget int -type SortOrder int - -const ( - SortNone SortOrder = iota - SortAscend - SortDescend -) - -const ( - SortByKey SortTarget = iota - SortByVersion - SortByCreateRevision - SortByModRevision - SortByValue -) - -type SortOption struct { - Target SortTarget - Order SortOrder -} diff --git a/vendor/go.etcd.io/etcd/client/v3/txn.go b/vendor/go.etcd.io/etcd/client/v3/txn.go deleted file mode 100644 index 3f6a953cf09..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/txn.go +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "context" - "sync" - - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - - "google.golang.org/grpc" -) - -// Txn is the interface that wraps mini-transactions. -// -// Txn(context.TODO()).If( -// Compare(Value(k1), ">", v1), -// Compare(Version(k1), "=", 2) -// ).Then( -// OpPut(k2,v2), OpPut(k3,v3) -// ).Else( -// OpPut(k4,v4), OpPut(k5,v5) -// ).Commit() -type Txn interface { - // If takes a list of comparison. If all comparisons passed in succeed, - // the operations passed into Then() will be executed. Or the operations - // passed into Else() will be executed. - If(cs ...Cmp) Txn - - // Then takes a list of operations. The Ops list will be executed, if the - // comparisons passed in If() succeed. - Then(ops ...Op) Txn - - // Else takes a list of operations. The Ops list will be executed, if the - // comparisons passed in If() fail. - Else(ops ...Op) Txn - - // Commit tries to commit the transaction. - Commit() (*TxnResponse, error) -} - -type txn struct { - kv *kv - ctx context.Context - - mu sync.Mutex - cif bool - cthen bool - celse bool - - isWrite bool - - cmps []*pb.Compare - - sus []*pb.RequestOp - fas []*pb.RequestOp - - callOpts []grpc.CallOption -} - -func (txn *txn) If(cs ...Cmp) Txn { - txn.mu.Lock() - defer txn.mu.Unlock() - - if txn.cif { - panic("cannot call If twice!") - } - - if txn.cthen { - panic("cannot call If after Then!") - } - - if txn.celse { - panic("cannot call If after Else!") - } - - txn.cif = true - - for i := range cs { - txn.cmps = append(txn.cmps, (*pb.Compare)(&cs[i])) - } - - return txn -} - -func (txn *txn) Then(ops ...Op) Txn { - txn.mu.Lock() - defer txn.mu.Unlock() - - if txn.cthen { - panic("cannot call Then twice!") - } - if txn.celse { - panic("cannot call Then after Else!") - } - - txn.cthen = true - - for _, op := range ops { - txn.isWrite = txn.isWrite || op.isWrite() - txn.sus = append(txn.sus, op.toRequestOp()) - } - - return txn -} - -func (txn *txn) Else(ops ...Op) Txn { - txn.mu.Lock() - defer txn.mu.Unlock() - - if txn.celse { - panic("cannot call Else twice!") - } - - txn.celse = true - - for _, op := range ops { - txn.isWrite = txn.isWrite || op.isWrite() - txn.fas = append(txn.fas, op.toRequestOp()) - } - - return txn -} - -func (txn *txn) Commit() (*TxnResponse, error) { - txn.mu.Lock() - defer txn.mu.Unlock() - - r := &pb.TxnRequest{Compare: txn.cmps, Success: txn.sus, Failure: txn.fas} - - var resp *pb.TxnResponse - var err error - resp, err = txn.kv.remote.Txn(txn.ctx, r, txn.callOpts...) - if err != nil { - return nil, toErr(txn.ctx, err) - } - return (*TxnResponse)(resp), nil -} diff --git a/vendor/go.etcd.io/etcd/client/v3/utils.go b/vendor/go.etcd.io/etcd/client/v3/utils.go deleted file mode 100644 index 850275877d3..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/utils.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2018 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "math/rand" - "time" -) - -// jitterUp adds random jitter to the duration. -// -// This adds or subtracts time from the duration within a given jitter fraction. -// For example for 10s and jitter 0.1, it will return a time within [9s, 11s]) -// -// Reference: https://godoc.org/github.com/grpc-ecosystem/go-grpc-middleware/util/backoffutils -func jitterUp(duration time.Duration, jitter float64) time.Duration { - multiplier := jitter * (rand.Float64()*2 - 1) - return time.Duration(float64(duration) * (1 + multiplier)) -} diff --git a/vendor/go.etcd.io/etcd/client/v3/watch.go b/vendor/go.etcd.io/etcd/client/v3/watch.go deleted file mode 100644 index 41a6ec97633..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/watch.go +++ /dev/null @@ -1,1042 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package clientv3 - -import ( - "context" - "errors" - "fmt" - "sync" - "time" - - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/api/v3/mvccpb" - v3rpc "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - - "go.uber.org/zap" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -const ( - EventTypeDelete = mvccpb.DELETE - EventTypePut = mvccpb.PUT - - closeSendErrTimeout = 250 * time.Millisecond - - // AutoWatchID is the watcher ID passed in WatchStream.Watch when no - // user-provided ID is available. If pass, an ID will automatically be assigned. - AutoWatchID = 0 - - // InvalidWatchID represents an invalid watch ID and prevents duplication with an existing watch. - InvalidWatchID = -1 -) - -type Event mvccpb.Event - -type WatchChan <-chan WatchResponse - -type Watcher interface { - // Watch watches on a key or prefix. The watched events will be returned - // through the returned channel. If revisions waiting to be sent over the - // watch are compacted, then the watch will be canceled by the server, the - // client will post a compacted error watch response, and the channel will close. - // If the requested revision is 0 or unspecified, the returned channel will - // return watch events that happen after the server receives the watch request. - // If the context "ctx" is canceled or timed out, returned "WatchChan" is closed, - // and "WatchResponse" from this closed channel has zero events and nil "Err()". - // The context "ctx" MUST be canceled, as soon as watcher is no longer being used, - // to release the associated resources. - // - // If the context is "context.Background/TODO", returned "WatchChan" will - // not be closed and block until event is triggered, except when server - // returns a non-recoverable error (e.g. ErrCompacted). - // For example, when context passed with "WithRequireLeader" and the - // connected server has no leader (e.g. due to network partition), - // error "etcdserver: no leader" (ErrNoLeader) will be returned, - // and then "WatchChan" is closed with non-nil "Err()". - // In order to prevent a watch stream being stuck in a partitioned node, - // make sure to wrap context with "WithRequireLeader". - // - // Otherwise, as long as the context has not been canceled or timed out, - // watch will retry on other recoverable errors forever until reconnected. - // - // TODO: explicitly set context error in the last "WatchResponse" message and close channel? - // Currently, client contexts are overwritten with "valCtx" that never closes. - // TODO(v3.4): configure watch retry policy, limit maximum retry number - // (see https://github.com/etcd-io/etcd/issues/8980) - Watch(ctx context.Context, key string, opts ...OpOption) WatchChan - - // RequestProgress requests a progress notify response be sent in all watch channels. - RequestProgress(ctx context.Context) error - - // Close closes the watcher and cancels all watch requests. - Close() error -} - -type WatchResponse struct { - Header pb.ResponseHeader - Events []*Event - - // CompactRevision is the minimum revision the watcher may receive. - CompactRevision int64 - - // Canceled is used to indicate watch failure. - // If the watch failed and the stream was about to close, before the channel is closed, - // the channel sends a final response that has Canceled set to true with a non-nil Err(). - Canceled bool - - // Created is used to indicate the creation of the watcher. - Created bool - - closeErr error - - // cancelReason is a reason of canceling watch - cancelReason string -} - -// IsCreate returns true if the event tells that the key is newly created. -func (e *Event) IsCreate() bool { - return e.Type == EventTypePut && e.Kv.CreateRevision == e.Kv.ModRevision -} - -// IsModify returns true if the event tells that a new value is put on existing key. -func (e *Event) IsModify() bool { - return e.Type == EventTypePut && e.Kv.CreateRevision != e.Kv.ModRevision -} - -// Err is the error value if this WatchResponse holds an error. -func (wr *WatchResponse) Err() error { - switch { - case wr.closeErr != nil: - return v3rpc.Error(wr.closeErr) - case wr.CompactRevision != 0: - return v3rpc.ErrCompacted - case wr.Canceled: - if len(wr.cancelReason) != 0 { - return v3rpc.Error(status.Error(codes.FailedPrecondition, wr.cancelReason)) - } - return v3rpc.ErrFutureRev - } - return nil -} - -// IsProgressNotify returns true if the WatchResponse is progress notification. -func (wr *WatchResponse) IsProgressNotify() bool { - return len(wr.Events) == 0 && !wr.Canceled && !wr.Created && wr.CompactRevision == 0 && wr.Header.Revision != 0 -} - -// watcher implements the Watcher interface -type watcher struct { - remote pb.WatchClient - callOpts []grpc.CallOption - - // mu protects the grpc streams map - mu sync.Mutex - - // streams holds all the active grpc streams keyed by ctx value. - streams map[string]*watchGrpcStream - lg *zap.Logger -} - -// watchGrpcStream tracks all watch resources attached to a single grpc stream. -type watchGrpcStream struct { - owner *watcher - remote pb.WatchClient - callOpts []grpc.CallOption - - // ctx controls internal remote.Watch requests - ctx context.Context - // ctxKey is the key used when looking up this stream's context - ctxKey string - cancel context.CancelFunc - - // substreams holds all active watchers on this grpc stream - substreams map[int64]*watcherStream - // resuming holds all resuming watchers on this grpc stream - resuming []*watcherStream - - // reqc sends a watch request from Watch() to the main goroutine - reqc chan watchStreamRequest - // respc receives data from the watch client - respc chan *pb.WatchResponse - // donec closes to broadcast shutdown - donec chan struct{} - // errc transmits errors from grpc Recv to the watch stream reconnect logic - errc chan error - // closingc gets the watcherStream of closing watchers - closingc chan *watcherStream - // wg is Done when all substream goroutines have exited - wg sync.WaitGroup - - // resumec closes to signal that all substreams should begin resuming - resumec chan struct{} - // closeErr is the error that closed the watch stream - closeErr error - - lg *zap.Logger -} - -// watchStreamRequest is a union of the supported watch request operation types -type watchStreamRequest interface { - toPB() *pb.WatchRequest -} - -// watchRequest is issued by the subscriber to start a new watcher -type watchRequest struct { - ctx context.Context - key string - end string - rev int64 - - // send created notification event if this field is true - createdNotify bool - // progressNotify is for progress updates - progressNotify bool - // fragmentation should be disabled by default - // if true, split watch events when total exceeds - // "--max-request-bytes" flag value + 512-byte - fragment bool - - // filters is the list of events to filter out - filters []pb.WatchCreateRequest_FilterType - // get the previous key-value pair before the event happens - prevKV bool - // retc receives a chan WatchResponse once the watcher is established - retc chan chan WatchResponse -} - -// progressRequest is issued by the subscriber to request watch progress -type progressRequest struct { -} - -// watcherStream represents a registered watcher -type watcherStream struct { - // initReq is the request that initiated this request - initReq watchRequest - - // outc publishes watch responses to subscriber - outc chan WatchResponse - // recvc buffers watch responses before publishing - recvc chan *WatchResponse - // donec closes when the watcherStream goroutine stops. - donec chan struct{} - // closing is set to true when stream should be scheduled to shutdown. - closing bool - // id is the registered watch id on the grpc stream - id int64 - - // buf holds all events received from etcd but not yet consumed by the client - buf []*WatchResponse -} - -func NewWatcher(c *Client) Watcher { - return NewWatchFromWatchClient(pb.NewWatchClient(c.conn), c) -} - -func NewWatchFromWatchClient(wc pb.WatchClient, c *Client) Watcher { - w := &watcher{ - remote: wc, - streams: make(map[string]*watchGrpcStream), - } - if c != nil { - w.callOpts = c.callOpts - w.lg = c.lg - } - return w -} - -// never closes -var valCtxCh = make(chan struct{}) -var zeroTime = time.Unix(0, 0) - -// ctx with only the values; never Done -type valCtx struct{ context.Context } - -func (vc *valCtx) Deadline() (time.Time, bool) { return zeroTime, false } -func (vc *valCtx) Done() <-chan struct{} { return valCtxCh } -func (vc *valCtx) Err() error { return nil } - -func (w *watcher) newWatcherGrpcStream(inctx context.Context) *watchGrpcStream { - ctx, cancel := context.WithCancel(&valCtx{inctx}) - wgs := &watchGrpcStream{ - owner: w, - remote: w.remote, - callOpts: w.callOpts, - ctx: ctx, - ctxKey: streamKeyFromCtx(inctx), - cancel: cancel, - substreams: make(map[int64]*watcherStream), - respc: make(chan *pb.WatchResponse), - reqc: make(chan watchStreamRequest), - donec: make(chan struct{}), - errc: make(chan error, 1), - closingc: make(chan *watcherStream), - resumec: make(chan struct{}), - lg: w.lg, - } - go wgs.run() - return wgs -} - -// Watch posts a watch request to run() and waits for a new watcher channel -func (w *watcher) Watch(ctx context.Context, key string, opts ...OpOption) WatchChan { - ow := opWatch(key, opts...) - - var filters []pb.WatchCreateRequest_FilterType - if ow.filterPut { - filters = append(filters, pb.WatchCreateRequest_NOPUT) - } - if ow.filterDelete { - filters = append(filters, pb.WatchCreateRequest_NODELETE) - } - - wr := &watchRequest{ - ctx: ctx, - createdNotify: ow.createdNotify, - key: string(ow.key), - end: string(ow.end), - rev: ow.rev, - progressNotify: ow.progressNotify, - fragment: ow.fragment, - filters: filters, - prevKV: ow.prevKV, - retc: make(chan chan WatchResponse, 1), - } - - ok := false - ctxKey := streamKeyFromCtx(ctx) - - var closeCh chan WatchResponse - for { - // find or allocate appropriate grpc watch stream - w.mu.Lock() - if w.streams == nil { - // closed - w.mu.Unlock() - ch := make(chan WatchResponse) - close(ch) - return ch - } - wgs := w.streams[ctxKey] - if wgs == nil { - wgs = w.newWatcherGrpcStream(ctx) - w.streams[ctxKey] = wgs - } - donec := wgs.donec - reqc := wgs.reqc - w.mu.Unlock() - - // couldn't create channel; return closed channel - if closeCh == nil { - closeCh = make(chan WatchResponse, 1) - } - - // submit request - select { - case reqc <- wr: - ok = true - case <-wr.ctx.Done(): - ok = false - case <-donec: - ok = false - if wgs.closeErr != nil { - closeCh <- WatchResponse{Canceled: true, closeErr: wgs.closeErr} - break - } - // retry; may have dropped stream from no ctxs - continue - } - - // receive channel - if ok { - select { - case ret := <-wr.retc: - return ret - case <-ctx.Done(): - case <-donec: - if wgs.closeErr != nil { - closeCh <- WatchResponse{Canceled: true, closeErr: wgs.closeErr} - break - } - // retry; may have dropped stream from no ctxs - continue - } - } - break - } - - close(closeCh) - return closeCh -} - -func (w *watcher) Close() (err error) { - w.mu.Lock() - streams := w.streams - w.streams = nil - w.mu.Unlock() - for _, wgs := range streams { - if werr := wgs.close(); werr != nil { - err = werr - } - } - // Consider context.Canceled as a successful close - if err == context.Canceled { - err = nil - } - return err -} - -// RequestProgress requests a progress notify response be sent in all watch channels. -func (w *watcher) RequestProgress(ctx context.Context) (err error) { - ctxKey := streamKeyFromCtx(ctx) - - w.mu.Lock() - if w.streams == nil { - w.mu.Unlock() - return fmt.Errorf("no stream found for context") - } - wgs := w.streams[ctxKey] - if wgs == nil { - wgs = w.newWatcherGrpcStream(ctx) - w.streams[ctxKey] = wgs - } - donec := wgs.donec - reqc := wgs.reqc - w.mu.Unlock() - - pr := &progressRequest{} - - select { - case reqc <- pr: - return nil - case <-ctx.Done(): - return ctx.Err() - case <-donec: - if wgs.closeErr != nil { - return wgs.closeErr - } - // retry; may have dropped stream from no ctxs - return w.RequestProgress(ctx) - } -} - -func (w *watchGrpcStream) close() (err error) { - w.cancel() - <-w.donec - select { - case err = <-w.errc: - default: - } - return toErr(w.ctx, err) -} - -func (w *watcher) closeStream(wgs *watchGrpcStream) { - w.mu.Lock() - close(wgs.donec) - wgs.cancel() - if w.streams != nil { - delete(w.streams, wgs.ctxKey) - } - w.mu.Unlock() -} - -func (w *watchGrpcStream) addSubstream(resp *pb.WatchResponse, ws *watcherStream) { - // check watch ID for backward compatibility (<= v3.3) - if resp.WatchId == InvalidWatchID || (resp.Canceled && resp.CancelReason != "") { - w.closeErr = v3rpc.Error(errors.New(resp.CancelReason)) - // failed; no channel - close(ws.recvc) - return - } - ws.id = resp.WatchId - w.substreams[ws.id] = ws -} - -func (w *watchGrpcStream) sendCloseSubstream(ws *watcherStream, resp *WatchResponse) { - select { - case ws.outc <- *resp: - case <-ws.initReq.ctx.Done(): - case <-time.After(closeSendErrTimeout): - } - close(ws.outc) -} - -func (w *watchGrpcStream) closeSubstream(ws *watcherStream) { - // send channel response in case stream was never established - select { - case ws.initReq.retc <- ws.outc: - default: - } - // close subscriber's channel - if closeErr := w.closeErr; closeErr != nil && ws.initReq.ctx.Err() == nil { - go w.sendCloseSubstream(ws, &WatchResponse{Canceled: true, closeErr: w.closeErr}) - } else if ws.outc != nil { - close(ws.outc) - } - if ws.id != InvalidWatchID { - delete(w.substreams, ws.id) - return - } - for i := range w.resuming { - if w.resuming[i] == ws { - w.resuming[i] = nil - return - } - } -} - -// run is the root of the goroutines for managing a watcher client -func (w *watchGrpcStream) run() { - var wc pb.Watch_WatchClient - var closeErr error - - // substreams marked to close but goroutine still running; needed for - // avoiding double-closing recvc on grpc stream teardown - closing := make(map[*watcherStream]struct{}) - - defer func() { - w.closeErr = closeErr - // shutdown substreams and resuming substreams - for _, ws := range w.substreams { - if _, ok := closing[ws]; !ok { - close(ws.recvc) - closing[ws] = struct{}{} - } - } - for _, ws := range w.resuming { - if _, ok := closing[ws]; ws != nil && !ok { - close(ws.recvc) - closing[ws] = struct{}{} - } - } - w.joinSubstreams() - for range closing { - w.closeSubstream(<-w.closingc) - } - w.wg.Wait() - w.owner.closeStream(w) - }() - - // start a stream with the etcd grpc server - if wc, closeErr = w.newWatchClient(); closeErr != nil { - return - } - - cancelSet := make(map[int64]struct{}) - - var cur *pb.WatchResponse - backoff := time.Millisecond - for { - select { - // Watch() requested - case req := <-w.reqc: - switch wreq := req.(type) { - case *watchRequest: - outc := make(chan WatchResponse, 1) - // TODO: pass custom watch ID? - ws := &watcherStream{ - initReq: *wreq, - id: InvalidWatchID, - outc: outc, - // unbuffered so resumes won't cause repeat events - recvc: make(chan *WatchResponse), - } - - ws.donec = make(chan struct{}) - w.wg.Add(1) - go w.serveSubstream(ws, w.resumec) - - // queue up for watcher creation/resume - w.resuming = append(w.resuming, ws) - if len(w.resuming) == 1 { - // head of resume queue, can register a new watcher - if err := wc.Send(ws.initReq.toPB()); err != nil { - w.lg.Debug("error when sending request", zap.Error(err)) - } - } - case *progressRequest: - if err := wc.Send(wreq.toPB()); err != nil { - w.lg.Debug("error when sending request", zap.Error(err)) - } - } - - // new events from the watch client - case pbresp := <-w.respc: - if cur == nil || pbresp.Created || pbresp.Canceled { - cur = pbresp - } else if cur != nil && cur.WatchId == pbresp.WatchId { - // merge new events - cur.Events = append(cur.Events, pbresp.Events...) - // update "Fragment" field; last response with "Fragment" == false - cur.Fragment = pbresp.Fragment - } - - switch { - case pbresp.Created: - // response to head of queue creation - if len(w.resuming) != 0 { - if ws := w.resuming[0]; ws != nil { - w.addSubstream(pbresp, ws) - w.dispatchEvent(pbresp) - w.resuming[0] = nil - } - } - - if ws := w.nextResume(); ws != nil { - if err := wc.Send(ws.initReq.toPB()); err != nil { - w.lg.Debug("error when sending request", zap.Error(err)) - } - } - - // reset for next iteration - cur = nil - - case pbresp.Canceled && pbresp.CompactRevision == 0: - delete(cancelSet, pbresp.WatchId) - if ws, ok := w.substreams[pbresp.WatchId]; ok { - // signal to stream goroutine to update closingc - close(ws.recvc) - closing[ws] = struct{}{} - } - - // reset for next iteration - cur = nil - - case cur.Fragment: - // watch response events are still fragmented - // continue to fetch next fragmented event arrival - continue - - default: - // dispatch to appropriate watch stream - ok := w.dispatchEvent(cur) - - // reset for next iteration - cur = nil - - if ok { - break - } - - // watch response on unexpected watch id; cancel id - if _, ok := cancelSet[pbresp.WatchId]; ok { - break - } - - cancelSet[pbresp.WatchId] = struct{}{} - cr := &pb.WatchRequest_CancelRequest{ - CancelRequest: &pb.WatchCancelRequest{ - WatchId: pbresp.WatchId, - }, - } - req := &pb.WatchRequest{RequestUnion: cr} - w.lg.Debug("sending watch cancel request for failed dispatch", zap.Int64("watch-id", pbresp.WatchId)) - if err := wc.Send(req); err != nil { - w.lg.Debug("failed to send watch cancel request", zap.Int64("watch-id", pbresp.WatchId), zap.Error(err)) - } - } - - // watch client failed on Recv; spawn another if possible - case err := <-w.errc: - if isHaltErr(w.ctx, err) || toErr(w.ctx, err) == v3rpc.ErrNoLeader { - closeErr = err - return - } - backoff = w.backoffIfUnavailable(backoff, err) - if wc, closeErr = w.newWatchClient(); closeErr != nil { - return - } - if ws := w.nextResume(); ws != nil { - if err := wc.Send(ws.initReq.toPB()); err != nil { - w.lg.Debug("error when sending request", zap.Error(err)) - } - } - cancelSet = make(map[int64]struct{}) - - case <-w.ctx.Done(): - return - - case ws := <-w.closingc: - w.closeSubstream(ws) - delete(closing, ws) - // no more watchers on this stream, shutdown, skip cancellation - if len(w.substreams)+len(w.resuming) == 0 { - return - } - if ws.id != InvalidWatchID { - // client is closing an established watch; close it on the server proactively instead of waiting - // to close when the next message arrives - cancelSet[ws.id] = struct{}{} - cr := &pb.WatchRequest_CancelRequest{ - CancelRequest: &pb.WatchCancelRequest{ - WatchId: ws.id, - }, - } - req := &pb.WatchRequest{RequestUnion: cr} - w.lg.Debug("sending watch cancel request for closed watcher", zap.Int64("watch-id", ws.id)) - if err := wc.Send(req); err != nil { - w.lg.Debug("failed to send watch cancel request", zap.Int64("watch-id", ws.id), zap.Error(err)) - } - } - } - } -} - -// nextResume chooses the next resuming to register with the grpc stream. Abandoned -// streams are marked as nil in the queue since the head must wait for its inflight registration. -func (w *watchGrpcStream) nextResume() *watcherStream { - for len(w.resuming) != 0 { - if w.resuming[0] != nil { - return w.resuming[0] - } - w.resuming = w.resuming[1:len(w.resuming)] - } - return nil -} - -// dispatchEvent sends a WatchResponse to the appropriate watcher stream -func (w *watchGrpcStream) dispatchEvent(pbresp *pb.WatchResponse) bool { - events := make([]*Event, len(pbresp.Events)) - for i, ev := range pbresp.Events { - events[i] = (*Event)(ev) - } - // TODO: return watch ID? - wr := &WatchResponse{ - Header: *pbresp.Header, - Events: events, - CompactRevision: pbresp.CompactRevision, - Created: pbresp.Created, - Canceled: pbresp.Canceled, - cancelReason: pbresp.CancelReason, - } - - // watch IDs are zero indexed, so request notify watch responses are assigned a watch ID of InvalidWatchID to - // indicate they should be broadcast. - if wr.IsProgressNotify() && pbresp.WatchId == InvalidWatchID { - return w.broadcastResponse(wr) - } - - return w.unicastResponse(wr, pbresp.WatchId) - -} - -// broadcastResponse send a watch response to all watch substreams. -func (w *watchGrpcStream) broadcastResponse(wr *WatchResponse) bool { - for _, ws := range w.substreams { - select { - case ws.recvc <- wr: - case <-ws.donec: - } - } - return true -} - -// unicastResponse sends a watch response to a specific watch substream. -func (w *watchGrpcStream) unicastResponse(wr *WatchResponse, watchId int64) bool { - ws, ok := w.substreams[watchId] - if !ok { - return false - } - select { - case ws.recvc <- wr: - case <-ws.donec: - return false - } - return true -} - -// serveWatchClient forwards messages from the grpc stream to run() -func (w *watchGrpcStream) serveWatchClient(wc pb.Watch_WatchClient) { - for { - resp, err := wc.Recv() - if err != nil { - select { - case w.errc <- err: - case <-w.donec: - } - return - } - select { - case w.respc <- resp: - case <-w.donec: - return - } - } -} - -// serveSubstream forwards watch responses from run() to the subscriber -func (w *watchGrpcStream) serveSubstream(ws *watcherStream, resumec chan struct{}) { - if ws.closing { - panic("created substream goroutine but substream is closing") - } - - // nextRev is the minimum expected next revision - nextRev := ws.initReq.rev - resuming := false - defer func() { - if !resuming { - ws.closing = true - } - close(ws.donec) - if !resuming { - w.closingc <- ws - } - w.wg.Done() - }() - - emptyWr := &WatchResponse{} - for { - curWr := emptyWr - outc := ws.outc - - if len(ws.buf) > 0 { - curWr = ws.buf[0] - } else { - outc = nil - } - select { - case outc <- *curWr: - if ws.buf[0].Err() != nil { - return - } - ws.buf[0] = nil - ws.buf = ws.buf[1:] - case wr, ok := <-ws.recvc: - if !ok { - // shutdown from closeSubstream - return - } - - if wr.Created { - if ws.initReq.retc != nil { - ws.initReq.retc <- ws.outc - // to prevent next write from taking the slot in buffered channel - // and posting duplicate create events - ws.initReq.retc = nil - - // send first creation event only if requested - if ws.initReq.createdNotify { - ws.outc <- *wr - } - // once the watch channel is returned, a current revision - // watch must resume at the store revision. This is necessary - // for the following case to work as expected: - // wch := m1.Watch("a") - // m2.Put("a", "b") - // <-wch - // If the revision is only bound on the first observed event, - // if wch is disconnected before the Put is issued, then reconnects - // after it is committed, it'll miss the Put. - if ws.initReq.rev == 0 { - nextRev = wr.Header.Revision - } - } - } else { - // current progress of watch; <= store revision - nextRev = wr.Header.Revision + 1 - } - - if len(wr.Events) > 0 { - nextRev = wr.Events[len(wr.Events)-1].Kv.ModRevision + 1 - } - ws.initReq.rev = nextRev - - // created event is already sent above, - // watcher should not post duplicate events - if wr.Created { - continue - } - - // TODO pause channel if buffer gets too large - ws.buf = append(ws.buf, wr) - case <-w.ctx.Done(): - return - case <-ws.initReq.ctx.Done(): - return - case <-resumec: - resuming = true - return - } - } - // lazily send cancel message if events on missing id -} - -func (w *watchGrpcStream) newWatchClient() (pb.Watch_WatchClient, error) { - // mark all substreams as resuming - close(w.resumec) - w.resumec = make(chan struct{}) - w.joinSubstreams() - for _, ws := range w.substreams { - ws.id = InvalidWatchID - w.resuming = append(w.resuming, ws) - } - // strip out nils, if any - var resuming []*watcherStream - for _, ws := range w.resuming { - if ws != nil { - resuming = append(resuming, ws) - } - } - w.resuming = resuming - w.substreams = make(map[int64]*watcherStream) - - // connect to grpc stream while accepting watcher cancelation - stopc := make(chan struct{}) - donec := w.waitCancelSubstreams(stopc) - wc, err := w.openWatchClient() - close(stopc) - <-donec - - // serve all non-closing streams, even if there's a client error - // so that the teardown path can shutdown the streams as expected. - for _, ws := range w.resuming { - if ws.closing { - continue - } - ws.donec = make(chan struct{}) - w.wg.Add(1) - go w.serveSubstream(ws, w.resumec) - } - - if err != nil { - return nil, v3rpc.Error(err) - } - - // receive data from new grpc stream - go w.serveWatchClient(wc) - return wc, nil -} - -func (w *watchGrpcStream) waitCancelSubstreams(stopc <-chan struct{}) <-chan struct{} { - var wg sync.WaitGroup - wg.Add(len(w.resuming)) - donec := make(chan struct{}) - for i := range w.resuming { - go func(ws *watcherStream) { - defer wg.Done() - if ws.closing { - if ws.initReq.ctx.Err() != nil && ws.outc != nil { - close(ws.outc) - ws.outc = nil - } - return - } - select { - case <-ws.initReq.ctx.Done(): - // closed ws will be removed from resuming - ws.closing = true - close(ws.outc) - ws.outc = nil - w.wg.Add(1) - go func() { - defer w.wg.Done() - w.closingc <- ws - }() - case <-stopc: - } - }(w.resuming[i]) - } - go func() { - defer close(donec) - wg.Wait() - }() - return donec -} - -// joinSubstreams waits for all substream goroutines to complete. -func (w *watchGrpcStream) joinSubstreams() { - for _, ws := range w.substreams { - <-ws.donec - } - for _, ws := range w.resuming { - if ws != nil { - <-ws.donec - } - } -} - -var maxBackoff = 100 * time.Millisecond - -func (w *watchGrpcStream) backoffIfUnavailable(backoff time.Duration, err error) time.Duration { - if isUnavailableErr(w.ctx, err) { - // retry, but backoff - if backoff < maxBackoff { - // 25% backoff factor - backoff = backoff + backoff/4 - if backoff > maxBackoff { - backoff = maxBackoff - } - } - time.Sleep(backoff) - } - return backoff -} - -// openWatchClient retries opening a watch client until success or halt. -// manually retry in case "ws==nil && err==nil" -// TODO: remove FailFast=false -func (w *watchGrpcStream) openWatchClient() (ws pb.Watch_WatchClient, err error) { - backoff := time.Millisecond - for { - select { - case <-w.ctx.Done(): - if err == nil { - return nil, w.ctx.Err() - } - return nil, err - default: - } - if ws, err = w.remote.Watch(w.ctx, w.callOpts...); ws != nil && err == nil { - break - } - if isHaltErr(w.ctx, err) { - return nil, v3rpc.Error(err) - } - backoff = w.backoffIfUnavailable(backoff, err) - } - return ws, nil -} - -// toPB converts an internal watch request structure to its protobuf WatchRequest structure. -func (wr *watchRequest) toPB() *pb.WatchRequest { - req := &pb.WatchCreateRequest{ - StartRevision: wr.rev, - Key: []byte(wr.key), - RangeEnd: []byte(wr.end), - ProgressNotify: wr.progressNotify, - Filters: wr.filters, - PrevKv: wr.prevKV, - Fragment: wr.fragment, - } - cr := &pb.WatchRequest_CreateRequest{CreateRequest: req} - return &pb.WatchRequest{RequestUnion: cr} -} - -// toPB converts an internal progress request structure to its protobuf WatchRequest structure. -func (pr *progressRequest) toPB() *pb.WatchRequest { - req := &pb.WatchProgressRequest{} - cr := &pb.WatchRequest_ProgressRequest{ProgressRequest: req} - return &pb.WatchRequest{RequestUnion: cr} -} - -func streamKeyFromCtx(ctx context.Context) string { - if md, ok := metadata.FromOutgoingContext(ctx); ok { - return fmt.Sprintf("%+v", md) - } - return "" -} diff --git a/vendor/go.etcd.io/etcd/client/v3/yaml/config.go b/vendor/go.etcd.io/etcd/client/v3/yaml/config.go deleted file mode 100644 index 2937286d0d4..00000000000 --- a/vendor/go.etcd.io/etcd/client/v3/yaml/config.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2017 The etcd Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package yaml handles yaml-formatted clientv3 configuration data. -package yaml - -import ( - "crypto/tls" - "crypto/x509" - "io/ioutil" - - "sigs.k8s.io/yaml" - - "go.etcd.io/etcd/client/pkg/v3/tlsutil" - "go.etcd.io/etcd/client/v3" -) - -type yamlConfig struct { - clientv3.Config - - InsecureTransport bool `json:"insecure-transport"` - InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify"` - Certfile string `json:"cert-file"` - Keyfile string `json:"key-file"` - TrustedCAfile string `json:"trusted-ca-file"` - - // CAfile is being deprecated. Use 'TrustedCAfile' instead. - // TODO: deprecate this in v4 - CAfile string `json:"ca-file"` -} - -// NewConfig creates a new clientv3.Config from a yaml file. -func NewConfig(fpath string) (*clientv3.Config, error) { - b, err := ioutil.ReadFile(fpath) - if err != nil { - return nil, err - } - - yc := &yamlConfig{} - - err = yaml.Unmarshal(b, yc) - if err != nil { - return nil, err - } - - if yc.InsecureTransport { - return &yc.Config, nil - } - - var ( - cert *tls.Certificate - cp *x509.CertPool - ) - - if yc.Certfile != "" && yc.Keyfile != "" { - cert, err = tlsutil.NewCert(yc.Certfile, yc.Keyfile, nil) - if err != nil { - return nil, err - } - } - - if yc.TrustedCAfile != "" { - cp, err = tlsutil.NewCertPool([]string{yc.TrustedCAfile}) - if err != nil { - return nil, err - } - } - - tlscfg := &tls.Config{ - MinVersion: tls.VersionTLS12, - InsecureSkipVerify: yc.InsecureSkipTLSVerify, - RootCAs: cp, - } - if cert != nil { - tlscfg.Certificates = []tls.Certificate{*cert} - } - yc.Config.TLS = tlscfg - - return &yc.Config, nil -} diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md index 98f2d204384..e5946bfb25c 100644 --- a/vendor/go.opentelemetry.io/otel/CHANGELOG.md +++ b/vendor/go.opentelemetry.io/otel/CHANGELOG.md @@ -8,6 +8,117 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [1.27.0/0.49.0/0.3.0] 2024-05-21 + +### Added + +- Add example for `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5242) +- Add `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest` to facilitate testing exporter and processor implementations. (#5258) +- Add `RecordFactory` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing bridge implementations. (#5263) +- The count of dropped records from the `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` is logged. (#5276) +- Add metrics in the `otel-collector` example. (#5283) +- Add the synchronous gauge instrument to `go.opentelemetry.io/otel/metric`. (#5304) + - An `int64` or `float64` synchronous gauge instrument can now be created from a `Meter`. + - All implementations of the API (`go.opentelemetry.io/otel/metric/noop`, `go.opentelemetry.io/otel/sdk/metric`) are updated to support this instrument. +- Add logs to `go.opentelemetry.io/otel/example/dice`. (#5349) + +### Changed + +- The `Shutdown` method of `Exporter` in `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` ignores the context cancellation and always returns `nil`. (#5189) +- The `ForceFlush` and `Shutdown` methods of the exporter returned by `New` in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` ignore the context cancellation and always return `nil`. (#5189) +- Apply the value length limits to `Record` attributes in `go.opentelemetry.io/otel/sdk/log`. (#5230) +- De-duplicate map attributes added to a `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5230) +- `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` won't print timestamps when `WithoutTimestamps` option is set. (#5241) +- The `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` exporter won't print `AttributeValueLengthLimit` and `AttributeCountLimit` fields now, instead it prints the `DroppedAttributes` field. (#5272) +- Improved performance in the `Stringer` implementation of `go.opentelemetry.io/otel/baggage.Member` by reducing the number of allocations. (#5286) +- Set the start time for last-value aggregates in `go.opentelemetry.io/otel/sdk/metric`. (#5305) +- The `Span` in `go.opentelemetry.io/otel/sdk/trace` will record links without span context if either non-empty `TraceState` or attributes are provided. (#5315) +- Upgrade all dependencies of `go.opentelemetry.io/otel/semconv/v1.24.0` to `go.opentelemetry.io/otel/semconv/v1.25.0`. (#5374) + +### Fixed + +- Comparison of unordered maps for `go.opentelemetry.io/otel/log.KeyValue` and `go.opentelemetry.io/otel/log.Value`. (#5306) +- Fix the empty output of `go.opentelemetry.io/otel/log.Value` in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5311) +- Split the behavior of `Recorder` in `go.opentelemetry.io/otel/log/logtest` so it behaves as a `LoggerProvider` only. (#5365) +- Fix wrong package name of the error message when parsing endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5371) +- Identify the `Logger` returned from the global `LoggerProvider` in `go.opentelemetry.io/otel/log/global` with its schema URL. (#5375) + +## [1.26.0/0.48.0/0.2.0-alpha] 2024-04-24 + +### Added + +- Add `Recorder` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing the log bridge implementations. (#5134) +- Add span flags to OTLP spans and links exported by `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. (#5194) +- Make the initial alpha release of `go.opentelemetry.io/otel/sdk/log`. + This new module contains the Go implementation of the OpenTelemetry Logs SDK. + This module is unstable and breaking changes may be introduced. + See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) +- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. + This new module contains an OTLP exporter that transmits log telemetry using HTTP. + This module is unstable and breaking changes may be introduced. + See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) +- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. + This new module contains an exporter prints log records to STDOUT. + This module is unstable and breaking changes may be introduced. + See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) +- The `go.opentelemetry.io/otel/semconv/v1.25.0` package. + The package contains semantic conventions from the `v1.25.0` version of the OpenTelemetry Semantic Conventions. (#5254) + +### Changed + +- Update `go.opentelemetry.io/proto/otlp` from v1.1.0 to v1.2.0. (#5177) +- Improve performance of baggage member character validation in `go.opentelemetry.io/otel/baggage`. (#5214) +- The `otel-collector` example now uses docker compose to bring up services instead of kubernetes. (#5244) + +### Fixed + +- Slice attribute values in `go.opentelemetry.io/otel/attribute` are now emitted as their JSON representation. (#5159) + +## [1.25.0/0.47.0/0.0.8/0.1.0-alpha] 2024-04-05 + +### Added + +- Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4906) +- Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp`. (#4906) +- Add `AddLink` method to the `Span` interface in `go.opentelemetry.io/otel/trace`. (#5032) +- The `Enabled` method is added to the `Logger` interface in `go.opentelemetry.io/otel/log`. + This method is used to notify users if a log record will be emitted or not. (#5071) +- Add `SeverityUndefined` `const` to `go.opentelemetry.io/otel/log`. + This value represents an unset severity level. (#5072) +- Add `Empty` function in `go.opentelemetry.io/otel/log` to return a `KeyValue` for an empty value. (#5076) +- Add `go.opentelemetry.io/otel/log/global` to manage the global `LoggerProvider`. + This package is provided with the anticipation that all functionality will be migrate to `go.opentelemetry.io/otel` when `go.opentelemetry.io/otel/log` stabilizes. + At which point, users will be required to migrage their code, and this package will be deprecated then removed. (#5085) +- Add support for `Summary` metrics in the `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` exporters. (#5100) +- Add `otel.scope.name` and `otel.scope.version` tags to spans exported by `go.opentelemetry.io/otel/exporters/zipkin`. (#5108) +- Add support for `AddLink` to `go.opentelemetry.io/otel/bridge/opencensus`. (#5116) +- Add `String` method to `Value` and `KeyValue` in `go.opentelemetry.io/otel/log`. (#5117) +- Add Exemplar support to `go.opentelemetry.io/otel/exporters/prometheus`. (#5111) +- Add metric semantic conventions to `go.opentelemetry.io/otel/semconv/v1.24.0`. Future `semconv` packages will include metric semantic conventions as well. (#4528) + +### Changed + +- `SpanFromContext` and `SpanContextFromContext` in `go.opentelemetry.io/otel/trace` no longer make a heap allocation when the passed context has no span. (#5049) +- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` now create a gRPC client in idle mode and with "dns" as the default resolver using [`grpc.NewClient`](https://pkg.go.dev/google.golang.org/grpc#NewClient). (#5151) + Because of that `WithDialOption` ignores [`grpc.WithBlock`](https://pkg.go.dev/google.golang.org/grpc#WithBlock), [`grpc.WithTimeout`](https://pkg.go.dev/google.golang.org/grpc#WithTimeout), and [`grpc.WithReturnConnectionError`](https://pkg.go.dev/google.golang.org/grpc#WithReturnConnectionError). + Notice that [`grpc.DialContext`](https://pkg.go.dev/google.golang.org/grpc#DialContext) which was used before is now deprecated. + +### Fixed + +- Clarify the documentation about equivalence guarantees for the `Set` and `Distinct` types in `go.opentelemetry.io/otel/attribute`. (#5027) +- Prevent default `ErrorHandler` self-delegation. (#5137) +- Update all dependencies to address [GO-2024-2687]. (#5139) + +### Removed + +- Drop support for [Go 1.20]. (#4967) + +### Deprecated + +- Deprecate `go.opentelemetry.io/otel/attribute.Sortable` type. (#4734) +- Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortable` function. (#4734) +- Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortableFiltered` function. (#4734) + ## [1.24.0/0.46.0/0.0.1-alpha] 2024-02-23 This release is the last to support [Go 1.20]. @@ -22,6 +133,7 @@ The next release will require at least [Go 1.21]. This module includes OpenTelemetry Go's implementation of the Logs Bridge API. This module is in an alpha state, it is subject to breaking changes. See our [versioning policy](./VERSIONING.md) for more info. (#4961) +- ARM64 platform to the compatibility testing suite. (#4994) ### Fixed @@ -2849,7 +2961,10 @@ It contains api and sdk for trace and meter. - CircleCI build CI manifest files. - CODEOWNERS file to track owners of this project. -[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...HEAD +[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.27.0...HEAD +[1.27.0/0.49.0/0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.27.0 +[1.26.0/0.48.0/0.2.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.26.0 +[1.25.0/0.47.0/0.0.8/0.1.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.25.0 [1.24.0/0.46.0/0.0.1-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.24.0 [1.23.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.1 [1.23.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0 @@ -2937,3 +3052,5 @@ It contains api and sdk for trace and meter. [metric API]:https://pkg.go.dev/go.opentelemetry.io/otel/metric [metric SDK]:https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric [trace API]:https://pkg.go.dev/go.opentelemetry.io/otel/trace + +[GO-2024-2687]: https://pkg.go.dev/vuln/GO-2024-2687 diff --git a/vendor/go.opentelemetry.io/otel/CODEOWNERS b/vendor/go.opentelemetry.io/otel/CODEOWNERS index 31d336d9222..88f4c7d0e09 100644 --- a/vendor/go.opentelemetry.io/otel/CODEOWNERS +++ b/vendor/go.opentelemetry.io/otel/CODEOWNERS @@ -12,6 +12,6 @@ # https://help.github.com/en/articles/about-code-owners # -* @MrAlias @Aneurysm9 @evantorrie @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu +* @MrAlias @evantorrie @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu -CODEOWNERS @MrAlias @MadVikingGod @pellared @dashpole \ No newline at end of file +CODEOWNERS @MrAlias @MadVikingGod @pellared @dashpole diff --git a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md index c9f2bac55bf..2176ce5261b 100644 --- a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md +++ b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md @@ -201,6 +201,16 @@ You can install and run a "local Go Doc site" in the following way: [`go.opentelemetry.io/otel/metric`](https://pkg.go.dev/go.opentelemetry.io/otel/metric) is an example of a very well-documented package. +### README files + +Each (non-internal, non-test, non-documentation) package must contain a +`README.md` file containing at least a title, and a `pkg.go.dev` badge. + +The README should not be a repetition of Go doc comments. + +You can verify the presence of all README files with the `make verify-readmes` +command. + ## Style Guide One of the primary goals of this project is that it is actually used by @@ -560,6 +570,9 @@ functionality should be added, each one will need their own super-set interfaces and will duplicate the pattern. For this reason, the simple targeted interface that defines the specific functionality should be preferred. +See also: +[Keeping Your Modules Compatible: Working with interfaces](https://go.dev/blog/module-compatibility#working-with-interfaces). + ### Testing The tests should never leak goroutines. @@ -619,7 +632,6 @@ should be canceled. - [Sam Xie](https://github.com/XSAM), Cisco/AppDynamics - [Chester Cheung](https://github.com/hanyuancheung), Tencent - [Damien Mathieu](https://github.com/dmathieu), Elastic -- [Anthony Mirabella](https://github.com/Aneurysm9), AWS ### Maintainers @@ -633,6 +645,7 @@ should be canceled. - [Liz Fong-Jones](https://github.com/lizthegrey), Honeycomb - [Gustavo Silva Paiva](https://github.com/paivagustavo), LightStep - [Josh MacDonald](https://github.com/jmacd), LightStep +- [Anthony Mirabella](https://github.com/Aneurysm9), AWS ### Become an Approver or a Maintainer diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile index 6de95219be7..a9845a88f63 100644 --- a/vendor/go.opentelemetry.io/otel/Makefile +++ b/vendor/go.opentelemetry.io/otel/Makefile @@ -1,16 +1,5 @@ # Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 TOOLS_MOD_DIR := ./internal/tools @@ -25,8 +14,8 @@ TIMEOUT = 60 .DEFAULT_GOAL := precommit .PHONY: precommit ci -precommit: generate dependabot-generate license-check misspell go-mod-tidy golangci-lint-fix test-default -ci: generate dependabot-check license-check lint vanity-import-check build test-default check-clean-work-tree test-coverage +precommit: generate license-check misspell go-mod-tidy golangci-lint-fix verify-readmes test-default +ci: generate license-check lint vanity-import-check verify-readmes build test-default check-clean-work-tree test-coverage # Tools @@ -34,7 +23,7 @@ TOOLS = $(CURDIR)/.tools $(TOOLS): @mkdir -p $@ -$(TOOLS)/%: | $(TOOLS) +$(TOOLS)/%: $(TOOLS_MOD_DIR)/go.mod | $(TOOLS) cd $(TOOLS_MOD_DIR) && \ $(GO) build -o $@ $(PACKAGE) @@ -50,9 +39,6 @@ $(TOOLS)/crosslink: PACKAGE=go.opentelemetry.io/build-tools/crosslink SEMCONVKIT = $(TOOLS)/semconvkit $(TOOLS)/semconvkit: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/semconvkit -DBOTCONF = $(TOOLS)/dbotconf -$(TOOLS)/dbotconf: PACKAGE=go.opentelemetry.io/build-tools/dbotconf - GOLANGCI_LINT = $(TOOLS)/golangci-lint $(TOOLS)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/cmd/golangci-lint @@ -81,7 +67,7 @@ GOVULNCHECK = $(TOOLS)/govulncheck $(TOOLS)/govulncheck: PACKAGE=golang.org/x/vuln/cmd/govulncheck .PHONY: tools -tools: $(CROSSLINK) $(DBOTCONF) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE) +tools: $(CROSSLINK) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE) # Virtualized python tools via docker @@ -110,7 +96,7 @@ $(PYTOOLS): @$(DOCKERPY) bash -c "python3 -m venv $(VENVDIR) && $(PIP) install --upgrade pip" # Install python packages into the virtual environment. -$(PYTOOLS)/%: | $(PYTOOLS) +$(PYTOOLS)/%: $(PYTOOLS) @$(DOCKERPY) $(PIP) install -r requirements.txt CODESPELL = $(PYTOOLS)/codespell @@ -124,18 +110,18 @@ generate: go-generate vanity-import-fix .PHONY: go-generate go-generate: $(OTEL_GO_MOD_DIRS:%=go-generate/%) go-generate/%: DIR=$* -go-generate/%: | $(STRINGER) $(GOTMPL) +go-generate/%: $(STRINGER) $(GOTMPL) @echo "$(GO) generate $(DIR)/..." \ && cd $(DIR) \ && PATH="$(TOOLS):$${PATH}" $(GO) generate ./... .PHONY: vanity-import-fix -vanity-import-fix: | $(PORTO) +vanity-import-fix: $(PORTO) @$(PORTO) --include-internal -w . # Generate go.work file for local development. .PHONY: go-work -go-work: | $(CROSSLINK) +go-work: $(CROSSLINK) $(CROSSLINK) work --root=$(shell pwd) # Build @@ -178,7 +164,7 @@ test/%: COVERAGE_MODE = atomic COVERAGE_PROFILE = coverage.out .PHONY: test-coverage -test-coverage: | $(GOCOVMERGE) +test-coverage: $(GOCOVMERGE) @set -e; \ printf "" > coverage.txt; \ for dir in $(ALL_COVERAGE_MOD_DIRS); do \ @@ -209,23 +195,23 @@ golangci-lint-fix: ARGS=--fix golangci-lint-fix: golangci-lint golangci-lint: $(OTEL_GO_MOD_DIRS:%=golangci-lint/%) golangci-lint/%: DIR=$* -golangci-lint/%: | $(GOLANGCI_LINT) +golangci-lint/%: $(GOLANGCI_LINT) @echo 'golangci-lint $(if $(ARGS),$(ARGS) ,)$(DIR)' \ && cd $(DIR) \ && $(GOLANGCI_LINT) run --allow-serial-runners $(ARGS) .PHONY: crosslink -crosslink: | $(CROSSLINK) +crosslink: $(CROSSLINK) @echo "Updating intra-repository dependencies in all go modules" \ && $(CROSSLINK) --root=$(shell pwd) --prune .PHONY: go-mod-tidy go-mod-tidy: $(ALL_GO_MOD_DIRS:%=go-mod-tidy/%) go-mod-tidy/%: DIR=$* -go-mod-tidy/%: | crosslink +go-mod-tidy/%: crosslink @echo "$(GO) mod tidy in $(DIR)" \ && cd $(DIR) \ - && $(GO) mod tidy -compat=1.20 + && $(GO) mod tidy -compat=1.21 .PHONY: lint-modules lint-modules: go-mod-tidy @@ -234,23 +220,23 @@ lint-modules: go-mod-tidy lint: misspell lint-modules golangci-lint govulncheck .PHONY: vanity-import-check -vanity-import-check: | $(PORTO) +vanity-import-check: $(PORTO) @$(PORTO) --include-internal -l . || ( echo "(run: make vanity-import-fix)"; exit 1 ) .PHONY: misspell -misspell: | $(MISSPELL) +misspell: $(MISSPELL) @$(MISSPELL) -w $(ALL_DOCS) .PHONY: govulncheck govulncheck: $(OTEL_GO_MOD_DIRS:%=govulncheck/%) govulncheck/%: DIR=$* -govulncheck/%: | $(GOVULNCHECK) +govulncheck/%: $(GOVULNCHECK) @echo "govulncheck ./... in $(DIR)" \ && cd $(DIR) \ && $(GOVULNCHECK) ./... .PHONY: codespell -codespell: | $(CODESPELL) +codespell: $(CODESPELL) @$(DOCKERPY) $(CODESPELL) .PHONY: license-check @@ -263,15 +249,6 @@ license-check: exit 1; \ fi -DEPENDABOT_CONFIG = .github/dependabot.yml -.PHONY: dependabot-check -dependabot-check: | $(DBOTCONF) - @$(DBOTCONF) verify $(DEPENDABOT_CONFIG) || ( echo "(run: make dependabot-generate)"; exit 1 ) - -.PHONY: dependabot-generate -dependabot-generate: | $(DBOTCONF) - @$(DBOTCONF) generate > $(DEPENDABOT_CONFIG) - .PHONY: check-clean-work-tree check-clean-work-tree: @if ! git diff --quiet; then \ @@ -284,13 +261,14 @@ check-clean-work-tree: SEMCONVPKG ?= "semconv/" .PHONY: semconv-generate -semconv-generate: | $(SEMCONVGEN) $(SEMCONVKIT) +semconv-generate: $(SEMCONVGEN) $(SEMCONVKIT) [ "$(TAG)" ] || ( echo "TAG unset: missing opentelemetry semantic-conventions tag"; exit 1 ) [ "$(OTEL_SEMCONV_REPO)" ] || ( echo "OTEL_SEMCONV_REPO unset: missing path to opentelemetry semantic-conventions repo"; exit 1 ) $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=span -p conventionType=trace -f trace.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=attribute_group -p conventionType=trace -f attribute_group.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=event -p conventionType=event -f event.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=resource -p conventionType=resource -f resource.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" + $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=metric -f metric.go -t "$(SEMCONVPKG)/metric_template.j2" -s "$(TAG)" $(SEMCONVKIT) -output "$(SEMCONVPKG)/$(TAG)" -tag "$(TAG)" .PHONY: gorelease @@ -303,16 +281,20 @@ gorelease/%:| $(GORELEASE) || echo "" .PHONY: prerelease -prerelease: | $(MULTIMOD) +prerelease: $(MULTIMOD) @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) $(MULTIMOD) verify && $(MULTIMOD) prerelease -m ${MODSET} COMMIT ?= "HEAD" .PHONY: add-tags -add-tags: | $(MULTIMOD) +add-tags: $(MULTIMOD) @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) $(MULTIMOD) verify && $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT} .PHONY: lint-markdown -lint-markdown: +lint-markdown: docker run -v "$(CURDIR):$(WORKDIR)" avtodev/markdown-lint:v1 -c $(WORKDIR)/.markdownlint.yaml $(WORKDIR)/**/*.md + +.PHONY: verify-readmes +verify-readmes: + ./verify_readmes.sh diff --git a/vendor/go.opentelemetry.io/otel/README.md b/vendor/go.opentelemetry.io/otel/README.md index 7766259a5c1..5a890931731 100644 --- a/vendor/go.opentelemetry.io/otel/README.md +++ b/vendor/go.opentelemetry.io/otel/README.md @@ -15,7 +15,7 @@ It provides a set of APIs to directly measure performance and behavior of your s |---------|--------------------| | Traces | Stable | | Metrics | Stable | -| Logs | In development[^1] | +| Logs | Beta[^1] | Progress and status specific to this repository is tracked in our [project boards](https://github.com/open-telemetry/opentelemetry-go/projects) @@ -51,19 +51,16 @@ Currently, this project supports the following environments. |---------|------------|--------------| | Ubuntu | 1.22 | amd64 | | Ubuntu | 1.21 | amd64 | -| Ubuntu | 1.20 | amd64 | | Ubuntu | 1.22 | 386 | | Ubuntu | 1.21 | 386 | -| Ubuntu | 1.20 | 386 | +| Linux | 1.22 | arm64 | +| Linux | 1.21 | arm64 | | MacOS | 1.22 | amd64 | | MacOS | 1.21 | amd64 | -| MacOS | 1.20 | amd64 | | Windows | 1.22 | amd64 | | Windows | 1.21 | amd64 | -| Windows | 1.20 | amd64 | | Windows | 1.22 | 386 | | Windows | 1.21 | 386 | -| Windows | 1.20 | 386 | While this project should work for other systems, no compatibility guarantees are made for those systems currently. @@ -100,12 +97,12 @@ export pipeline to send that telemetry to an observability platform. All officially supported exporters for the OpenTelemetry project are contained in the [exporters directory](./exporters). -| Exporter | Metrics | Traces | -|---------------------------------------|:-------:|:------:| -| [OTLP](./exporters/otlp/) | ✓ | ✓ | -| [Prometheus](./exporters/prometheus/) | ✓ | | -| [stdout](./exporters/stdout/) | ✓ | ✓ | -| [Zipkin](./exporters/zipkin/) | | ✓ | +| Exporter | Logs | Metrics | Traces | +|---------------------------------------|:----:|:-------:|:------:| +| [OTLP](./exporters/otlp/) | ✓ | ✓ | ✓ | +| [Prometheus](./exporters/prometheus/) | | ✓ | | +| [stdout](./exporters/stdout/) | ✓ | ✓ | ✓ | +| [Zipkin](./exporters/zipkin/) | | | ✓ | ## Contributing diff --git a/vendor/go.opentelemetry.io/otel/RELEASING.md b/vendor/go.opentelemetry.io/otel/RELEASING.md index d2691d0bd8b..940f57f3d87 100644 --- a/vendor/go.opentelemetry.io/otel/RELEASING.md +++ b/vendor/go.opentelemetry.io/otel/RELEASING.md @@ -27,6 +27,12 @@ You can run `make gorelease` that runs [gorelease](https://pkg.go.dev/golang.org You can check/report problems with `gorelease` [here](https://golang.org/issues/26420). +## Verify changes for contrib repository + +If the changes in the main repository are going to affect the contrib repository, it is important to verify that the changes are compatible with the contrib repository. + +Follow [the steps](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md#verify-otel-changes) in the contrib repository to verify OTel changes. + ## Pre-Release First, decide which module sets will be released and update their versions diff --git a/vendor/go.opentelemetry.io/otel/attribute/README.md b/vendor/go.opentelemetry.io/otel/attribute/README.md new file mode 100644 index 00000000000..5b3da8f14ca --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/attribute/README.md @@ -0,0 +1,3 @@ +# Attribute + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/attribute)](https://pkg.go.dev/go.opentelemetry.io/otel/attribute) diff --git a/vendor/go.opentelemetry.io/otel/attribute/doc.go b/vendor/go.opentelemetry.io/otel/attribute/doc.go index dafe7424dfb..eef51ebc2a2 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/doc.go +++ b/vendor/go.opentelemetry.io/otel/attribute/doc.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 // Package attribute provides key and value attributes. package attribute // import "go.opentelemetry.io/otel/attribute" diff --git a/vendor/go.opentelemetry.io/otel/attribute/encoder.go b/vendor/go.opentelemetry.io/otel/attribute/encoder.go index fe2bc5766cf..318e42fcabe 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/encoder.go +++ b/vendor/go.opentelemetry.io/otel/attribute/encoder.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" diff --git a/vendor/go.opentelemetry.io/otel/attribute/filter.go b/vendor/go.opentelemetry.io/otel/attribute/filter.go index 638c213d59a..be9cd922d87 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/filter.go +++ b/vendor/go.opentelemetry.io/otel/attribute/filter.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" diff --git a/vendor/go.opentelemetry.io/otel/attribute/iterator.go b/vendor/go.opentelemetry.io/otel/attribute/iterator.go index 841b271fb7d..f2ba89ce4bc 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/iterator.go +++ b/vendor/go.opentelemetry.io/otel/attribute/iterator.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" diff --git a/vendor/go.opentelemetry.io/otel/attribute/key.go b/vendor/go.opentelemetry.io/otel/attribute/key.go index 0656a04e43b..d9a22c65020 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/key.go +++ b/vendor/go.opentelemetry.io/otel/attribute/key.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" diff --git a/vendor/go.opentelemetry.io/otel/attribute/kv.go b/vendor/go.opentelemetry.io/otel/attribute/kv.go index 1ddf3ce0580..3028f9a40f8 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/kv.go +++ b/vendor/go.opentelemetry.io/otel/attribute/kv.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" diff --git a/vendor/go.opentelemetry.io/otel/attribute/set.go b/vendor/go.opentelemetry.io/otel/attribute/set.go index fb6da51450c..bff9c7fdbb9 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/set.go +++ b/vendor/go.opentelemetry.io/otel/attribute/set.go @@ -1,24 +1,14 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" import ( + "cmp" "encoding/json" "reflect" + "slices" "sort" - "sync" ) type ( @@ -26,23 +16,33 @@ type ( // immutable set of attributes, with an internal cache for storing // attribute encodings. // - // This type supports the Equivalent method of comparison using values of - // type Distinct. + // This type will remain comparable for backwards compatibility. The + // equivalence of Sets across versions is not guaranteed to be stable. + // Prior versions may find two Sets to be equal or not when compared + // directly (i.e. ==), but subsequent versions may not. Users should use + // the Equals method to ensure stable equivalence checking. + // + // Users should also use the Distinct returned from Equivalent as a map key + // instead of a Set directly. In addition to that type providing guarantees + // on stable equivalence, it may also provide performance improvements. Set struct { equivalent Distinct } - // Distinct wraps a variable-size array of KeyValue, constructed with keys - // in sorted order. This can be used as a map key or for equality checking - // between Sets. + // Distinct is a unique identifier of a Set. + // + // Distinct is designed to be ensures equivalence stability: comparisons + // will return the save value across versions. For this reason, Distinct + // should always be used as a map key instead of a Set. Distinct struct { iface interface{} } - // Sortable implements sort.Interface, used for sorting KeyValue. This is - // an exported type to support a memory optimization. A pointer to one of - // these is needed for the call to sort.Stable(), which the caller may - // provide in order to avoid an allocation. See NewSetWithSortable(). + // Sortable implements sort.Interface, used for sorting KeyValue. + // + // Deprecated: This type is no longer used. It was added as a performance + // optimization for Go < 1.21 that is no longer needed (Go < 1.21 is no + // longer supported by the module). Sortable []KeyValue ) @@ -56,12 +56,6 @@ var ( iface: [0]KeyValue{}, }, } - - // sortables is a pool of Sortables used to create Sets with a user does - // not provide one. - sortables = sync.Pool{ - New: func() interface{} { return new(Sortable) }, - } ) // EmptySet returns a reference to a Set with no elements. @@ -187,13 +181,7 @@ func empty() Set { // Except for empty sets, this method adds an additional allocation compared // with calls that include a Sortable. func NewSet(kvs ...KeyValue) Set { - // Check for empty set. - if len(kvs) == 0 { - return empty() - } - srt := sortables.Get().(*Sortable) - s, _ := NewSetWithSortableFiltered(kvs, srt, nil) - sortables.Put(srt) + s, _ := NewSetWithFiltered(kvs, nil) return s } @@ -201,12 +189,10 @@ func NewSet(kvs ...KeyValue) Set { // NewSetWithSortableFiltered for more details. // // This call includes a Sortable option as a memory optimization. -func NewSetWithSortable(kvs []KeyValue, tmp *Sortable) Set { - // Check for empty set. - if len(kvs) == 0 { - return empty() - } - s, _ := NewSetWithSortableFiltered(kvs, tmp, nil) +// +// Deprecated: Use [NewSet] instead. +func NewSetWithSortable(kvs []KeyValue, _ *Sortable) Set { + s, _ := NewSetWithFiltered(kvs, nil) return s } @@ -220,48 +206,12 @@ func NewSetWithFiltered(kvs []KeyValue, filter Filter) (Set, []KeyValue) { if len(kvs) == 0 { return empty(), nil } - srt := sortables.Get().(*Sortable) - s, filtered := NewSetWithSortableFiltered(kvs, srt, filter) - sortables.Put(srt) - return s, filtered -} - -// NewSetWithSortableFiltered returns a new Set. -// -// Duplicate keys are eliminated by taking the last value. This -// re-orders the input slice so that unique last-values are contiguous -// at the end of the slice. -// -// This ensures the following: -// -// - Last-value-wins semantics -// - Caller sees the reordering, but doesn't lose values -// - Repeated call preserve last-value wins. -// -// Note that methods are defined on Set, although this returns Set. Callers -// can avoid memory allocations by: -// -// - allocating a Sortable for use as a temporary in this method -// - allocating a Set for storing the return value of this constructor. -// -// The result maintains a cache of encoded attributes, by attribute.EncoderID. -// This value should not be copied after its first use. -// -// The second []KeyValue return value is a list of attributes that were -// excluded by the Filter (if non-nil). -func NewSetWithSortableFiltered(kvs []KeyValue, tmp *Sortable, filter Filter) (Set, []KeyValue) { - // Check for empty set. - if len(kvs) == 0 { - return empty(), nil - } - - *tmp = kvs // Stable sort so the following de-duplication can implement // last-value-wins semantics. - sort.Stable(tmp) - - *tmp = nil + slices.SortStableFunc(kvs, func(a, b KeyValue) int { + return cmp.Compare(a.Key, b.Key) + }) position := len(kvs) - 1 offset := position - 1 @@ -289,6 +239,35 @@ func NewSetWithSortableFiltered(kvs []KeyValue, tmp *Sortable, filter Filter) (S return Set{equivalent: computeDistinct(kvs)}, nil } +// NewSetWithSortableFiltered returns a new Set. +// +// Duplicate keys are eliminated by taking the last value. This +// re-orders the input slice so that unique last-values are contiguous +// at the end of the slice. +// +// This ensures the following: +// +// - Last-value-wins semantics +// - Caller sees the reordering, but doesn't lose values +// - Repeated call preserve last-value wins. +// +// Note that methods are defined on Set, although this returns Set. Callers +// can avoid memory allocations by: +// +// - allocating a Sortable for use as a temporary in this method +// - allocating a Set for storing the return value of this constructor. +// +// The result maintains a cache of encoded attributes, by attribute.EncoderID. +// This value should not be copied after its first use. +// +// The second []KeyValue return value is a list of attributes that were +// excluded by the Filter (if non-nil). +// +// Deprecated: Use [NewSetWithFiltered] instead. +func NewSetWithSortableFiltered(kvs []KeyValue, _ *Sortable, filter Filter) (Set, []KeyValue) { + return NewSetWithFiltered(kvs, filter) +} + // filteredToFront filters slice in-place using keep function. All KeyValues that need to // be removed are moved to the front. All KeyValues that need to be kept are // moved (in-order) to the back. The index for the first KeyValue to be kept is diff --git a/vendor/go.opentelemetry.io/otel/attribute/value.go b/vendor/go.opentelemetry.io/otel/attribute/value.go index cb21dd5c096..9ea0ecbbd27 100644 --- a/vendor/go.opentelemetry.io/otel/attribute/value.go +++ b/vendor/go.opentelemetry.io/otel/attribute/value.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" @@ -242,15 +231,27 @@ func (v Value) Emit() string { case BOOL: return strconv.FormatBool(v.AsBool()) case INT64SLICE: - return fmt.Sprint(v.asInt64Slice()) + j, err := json.Marshal(v.asInt64Slice()) + if err != nil { + return fmt.Sprintf("invalid: %v", v.asInt64Slice()) + } + return string(j) case INT64: return strconv.FormatInt(v.AsInt64(), 10) case FLOAT64SLICE: - return fmt.Sprint(v.asFloat64Slice()) + j, err := json.Marshal(v.asFloat64Slice()) + if err != nil { + return fmt.Sprintf("invalid: %v", v.asFloat64Slice()) + } + return string(j) case FLOAT64: return fmt.Sprint(v.AsFloat64()) case STRINGSLICE: - return fmt.Sprint(v.asStringSlice()) + j, err := json.Marshal(v.asStringSlice()) + if err != nil { + return fmt.Sprintf("invalid: %v", v.asStringSlice()) + } + return string(j) case STRING: return v.stringly default: diff --git a/vendor/go.opentelemetry.io/otel/baggage/README.md b/vendor/go.opentelemetry.io/otel/baggage/README.md new file mode 100644 index 00000000000..7d798435e12 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/baggage/README.md @@ -0,0 +1,3 @@ +# Baggage + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/baggage)](https://pkg.go.dev/go.opentelemetry.io/otel/baggage) diff --git a/vendor/go.opentelemetry.io/otel/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/baggage/baggage.go index 7d27cf77d5c..f98c54a3cba 100644 --- a/vendor/go.opentelemetry.io/otel/baggage/baggage.go +++ b/vendor/go.opentelemetry.io/otel/baggage/baggage.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package baggage // import "go.opentelemetry.io/otel/baggage" @@ -19,6 +8,7 @@ import ( "fmt" "net/url" "strings" + "unicode/utf8" "go.opentelemetry.io/otel/internal/baggage" ) @@ -67,10 +57,10 @@ func NewKeyProperty(key string) (Property, error) { // NewKeyValueProperty returns a new Property for key with value. // // The passed key must be compliant with W3C Baggage specification. -// The passed value must be precent-encoded as defined in W3C Baggage specification. +// The passed value must be percent-encoded as defined in W3C Baggage specification. // // Notice: Consider using [NewKeyValuePropertyRaw] instead -// that does not require precent-encoding of the value. +// that does not require percent-encoding of the value. func NewKeyValueProperty(key, value string) (Property, error) { if !validateValue(value) { return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value) @@ -232,13 +222,13 @@ type Member struct { hasData bool } -// NewMemberRaw returns a new Member from the passed arguments. +// NewMember returns a new Member from the passed arguments. // // The passed key must be compliant with W3C Baggage specification. -// The passed value must be precent-encoded as defined in W3C Baggage specification. +// The passed value must be percent-encoded as defined in W3C Baggage specification. // // Notice: Consider using [NewMemberRaw] instead -// that does not require precent-encoding of the value. +// that does not require percent-encoding of the value. func NewMember(key, value string, props ...Property) (Member, error) { if !validateValue(value) { return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value) @@ -309,7 +299,7 @@ func parseMember(member string) (Member, error) { return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, v) } - // Decode a precent-encoded value. + // Decode a percent-encoded value. value, err := url.PathUnescape(val) if err != nil { return newInvalidMember(), fmt.Errorf("%w: %v", errInvalidValue, err) @@ -345,9 +335,9 @@ func (m Member) String() string { // A key is just an ASCII string. A value is restricted to be // US-ASCII characters excluding CTLs, whitespace, // DQUOTE, comma, semicolon, and backslash. - s := fmt.Sprintf("%s%s%s", m.key, keyValueDelimiter, valueEscape(m.value)) + s := m.key + keyValueDelimiter + valueEscape(m.value) if len(m.properties) > 0 { - s = fmt.Sprintf("%s%s%s", s, propertyDelimiter, m.properties.String()) + s += propertyDelimiter + m.properties.String() } return s } @@ -616,7 +606,7 @@ func parsePropertyInternal(s string) (p Property, ok bool) { return } - // Decode a precent-encoded value. + // Decode a percent-encoded value. value, err := url.PathUnescape(s[valueStart:valueEnd]) if err != nil { return @@ -641,6 +631,95 @@ func skipSpace(s string, offset int) int { return i } +var safeKeyCharset = [utf8.RuneSelf]bool{ + // 0x23 to 0x27 + '#': true, + '$': true, + '%': true, + '&': true, + '\'': true, + + // 0x30 to 0x39 + '0': true, + '1': true, + '2': true, + '3': true, + '4': true, + '5': true, + '6': true, + '7': true, + '8': true, + '9': true, + + // 0x41 to 0x5a + 'A': true, + 'B': true, + 'C': true, + 'D': true, + 'E': true, + 'F': true, + 'G': true, + 'H': true, + 'I': true, + 'J': true, + 'K': true, + 'L': true, + 'M': true, + 'N': true, + 'O': true, + 'P': true, + 'Q': true, + 'R': true, + 'S': true, + 'T': true, + 'U': true, + 'V': true, + 'W': true, + 'X': true, + 'Y': true, + 'Z': true, + + // 0x5e to 0x7a + '^': true, + '_': true, + '`': true, + 'a': true, + 'b': true, + 'c': true, + 'd': true, + 'e': true, + 'f': true, + 'g': true, + 'h': true, + 'i': true, + 'j': true, + 'k': true, + 'l': true, + 'm': true, + 'n': true, + 'o': true, + 'p': true, + 'q': true, + 'r': true, + 's': true, + 't': true, + 'u': true, + 'v': true, + 'w': true, + 'x': true, + 'y': true, + 'z': true, + + // remainder + '!': true, + '*': true, + '+': true, + '-': true, + '.': true, + '|': true, + '~': true, +} + func validateKey(s string) bool { if len(s) == 0 { return false @@ -656,17 +735,7 @@ func validateKey(s string) bool { } func validateKeyChar(c int32) bool { - return (c >= 0x23 && c <= 0x27) || - (c >= 0x30 && c <= 0x39) || - (c >= 0x41 && c <= 0x5a) || - (c >= 0x5e && c <= 0x7a) || - c == 0x21 || - c == 0x2a || - c == 0x2b || - c == 0x2d || - c == 0x2e || - c == 0x7c || - c == 0x7e + return c >= 0 && c <= int32(utf8.RuneSelf) && safeKeyCharset[c] } func validateValue(s string) bool { @@ -679,12 +748,109 @@ func validateValue(s string) bool { return true } +var safeValueCharset = [utf8.RuneSelf]bool{ + '!': true, // 0x21 + + // 0x23 to 0x2b + '#': true, + '$': true, + '%': true, + '&': true, + '\'': true, + '(': true, + ')': true, + '*': true, + '+': true, + + // 0x2d to 0x3a + '-': true, + '.': true, + '/': true, + '0': true, + '1': true, + '2': true, + '3': true, + '4': true, + '5': true, + '6': true, + '7': true, + '8': true, + '9': true, + ':': true, + + // 0x3c to 0x5b + '<': true, // 0x3C + '=': true, // 0x3D + '>': true, // 0x3E + '?': true, // 0x3F + '@': true, // 0x40 + 'A': true, // 0x41 + 'B': true, // 0x42 + 'C': true, // 0x43 + 'D': true, // 0x44 + 'E': true, // 0x45 + 'F': true, // 0x46 + 'G': true, // 0x47 + 'H': true, // 0x48 + 'I': true, // 0x49 + 'J': true, // 0x4A + 'K': true, // 0x4B + 'L': true, // 0x4C + 'M': true, // 0x4D + 'N': true, // 0x4E + 'O': true, // 0x4F + 'P': true, // 0x50 + 'Q': true, // 0x51 + 'R': true, // 0x52 + 'S': true, // 0x53 + 'T': true, // 0x54 + 'U': true, // 0x55 + 'V': true, // 0x56 + 'W': true, // 0x57 + 'X': true, // 0x58 + 'Y': true, // 0x59 + 'Z': true, // 0x5A + '[': true, // 0x5B + + // 0x5d to 0x7e + ']': true, // 0x5D + '^': true, // 0x5E + '_': true, // 0x5F + '`': true, // 0x60 + 'a': true, // 0x61 + 'b': true, // 0x62 + 'c': true, // 0x63 + 'd': true, // 0x64 + 'e': true, // 0x65 + 'f': true, // 0x66 + 'g': true, // 0x67 + 'h': true, // 0x68 + 'i': true, // 0x69 + 'j': true, // 0x6A + 'k': true, // 0x6B + 'l': true, // 0x6C + 'm': true, // 0x6D + 'n': true, // 0x6E + 'o': true, // 0x6F + 'p': true, // 0x70 + 'q': true, // 0x71 + 'r': true, // 0x72 + 's': true, // 0x73 + 't': true, // 0x74 + 'u': true, // 0x75 + 'v': true, // 0x76 + 'w': true, // 0x77 + 'x': true, // 0x78 + 'y': true, // 0x79 + 'z': true, // 0x7A + '{': true, // 0x7B + '|': true, // 0x7C + '}': true, // 0x7D + '~': true, // 0x7E +} + func validateValueChar(c int32) bool { - return c == 0x21 || - (c >= 0x23 && c <= 0x2b) || - (c >= 0x2d && c <= 0x3a) || - (c >= 0x3c && c <= 0x5b) || - (c >= 0x5d && c <= 0x7e) + return c >= 0 && c <= int32(utf8.RuneSelf) && safeValueCharset[c] } // valueEscape escapes the string so it can be safely placed inside a baggage value, diff --git a/vendor/go.opentelemetry.io/otel/baggage/context.go b/vendor/go.opentelemetry.io/otel/baggage/context.go index 24b34b7564a..a572461a05f 100644 --- a/vendor/go.opentelemetry.io/otel/baggage/context.go +++ b/vendor/go.opentelemetry.io/otel/baggage/context.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package baggage // import "go.opentelemetry.io/otel/baggage" diff --git a/vendor/go.opentelemetry.io/otel/baggage/doc.go b/vendor/go.opentelemetry.io/otel/baggage/doc.go index 4545100df67..b51d87cab70 100644 --- a/vendor/go.opentelemetry.io/otel/baggage/doc.go +++ b/vendor/go.opentelemetry.io/otel/baggage/doc.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 /* Package baggage provides functionality for storing and retrieving diff --git a/vendor/go.opentelemetry.io/otel/codes/README.md b/vendor/go.opentelemetry.io/otel/codes/README.md new file mode 100644 index 00000000000..24c52b387d2 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/codes/README.md @@ -0,0 +1,3 @@ +# Codes + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/codes)](https://pkg.go.dev/go.opentelemetry.io/otel/codes) diff --git a/vendor/go.opentelemetry.io/otel/codes/codes.go b/vendor/go.opentelemetry.io/otel/codes/codes.go index 587ebae4e30..df29d96a6da 100644 --- a/vendor/go.opentelemetry.io/otel/codes/codes.go +++ b/vendor/go.opentelemetry.io/otel/codes/codes.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package codes // import "go.opentelemetry.io/otel/codes" diff --git a/vendor/go.opentelemetry.io/otel/codes/doc.go b/vendor/go.opentelemetry.io/otel/codes/doc.go index 4e328fbb4b3..ee8db448b8b 100644 --- a/vendor/go.opentelemetry.io/otel/codes/doc.go +++ b/vendor/go.opentelemetry.io/otel/codes/doc.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 /* Package codes defines the canonical error codes used by OpenTelemetry. diff --git a/vendor/go.opentelemetry.io/otel/doc.go b/vendor/go.opentelemetry.io/otel/doc.go index 36d7c24e88e..441c595014d 100644 --- a/vendor/go.opentelemetry.io/otel/doc.go +++ b/vendor/go.opentelemetry.io/otel/doc.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 /* Package otel provides global access to the OpenTelemetry API. The subpackages of diff --git a/vendor/go.opentelemetry.io/otel/error_handler.go b/vendor/go.opentelemetry.io/otel/error_handler.go index 72fad85412b..67414c71e05 100644 --- a/vendor/go.opentelemetry.io/otel/error_handler.go +++ b/vendor/go.opentelemetry.io/otel/error_handler.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" diff --git a/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh b/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh index 9a58fb1d372..93e80ea306c 100644 --- a/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh +++ b/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh @@ -1,18 +1,7 @@ #!/usr/bin/env bash # Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail diff --git a/vendor/go.opentelemetry.io/otel/handler.go b/vendor/go.opentelemetry.io/otel/handler.go index 4115fe3bbb5..07623b67914 100644 --- a/vendor/go.opentelemetry.io/otel/handler.go +++ b/vendor/go.opentelemetry.io/otel/handler.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" @@ -18,12 +7,8 @@ import ( "go.opentelemetry.io/otel/internal/global" ) -var ( - // Compile-time check global.ErrDelegator implements ErrorHandler. - _ ErrorHandler = (*global.ErrDelegator)(nil) - // Compile-time check global.ErrLogger implements ErrorHandler. - _ ErrorHandler = (*global.ErrLogger)(nil) -) +// Compile-time check global.ErrDelegator implements ErrorHandler. +var _ ErrorHandler = (*global.ErrDelegator)(nil) // GetErrorHandler returns the global ErrorHandler instance. // @@ -44,5 +29,5 @@ func GetErrorHandler() ErrorHandler { return global.GetErrorHandler() } // delegate errors to h. func SetErrorHandler(h ErrorHandler) { global.SetErrorHandler(h) } -// Handle is a convenience function for ErrorHandler().Handle(err). -func Handle(err error) { global.Handle(err) } +// Handle is a convenience function for GetErrorHandler().Handle(err). +func Handle(err error) { global.GetErrorHandler().Handle(err) } diff --git a/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go b/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go index 622c3ee3f27..f32766e57f6 100644 --- a/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go +++ b/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 /* Package attribute provide several helper functions for some commonly used diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go index b96e5408e69..b4f85f44a93 100644 --- a/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go +++ b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 /* Package baggage provides base types and functionality to store and retrieve diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/context.go b/vendor/go.opentelemetry.io/otel/internal/baggage/context.go index 4469700d9cb..3aea9c491f0 100644 --- a/vendor/go.opentelemetry.io/otel/internal/baggage/context.go +++ b/vendor/go.opentelemetry.io/otel/internal/baggage/context.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package baggage // import "go.opentelemetry.io/otel/internal/baggage" diff --git a/vendor/go.opentelemetry.io/otel/internal/gen.go b/vendor/go.opentelemetry.io/otel/internal/gen.go index f532f07e9e5..4259f0320d4 100644 --- a/vendor/go.opentelemetry.io/otel/internal/gen.go +++ b/vendor/go.opentelemetry.io/otel/internal/gen.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package internal // import "go.opentelemetry.io/otel/internal" diff --git a/vendor/go.opentelemetry.io/otel/internal/global/handler.go b/vendor/go.opentelemetry.io/otel/internal/global/handler.go index 5e9b8304792..c657ff8e755 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/handler.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/handler.go @@ -1,38 +1,13 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" import ( "log" - "os" "sync/atomic" ) -var ( - // GlobalErrorHandler provides an ErrorHandler that can be used - // throughout an OpenTelemetry instrumented project. When a user - // specified ErrorHandler is registered (`SetErrorHandler`) all calls to - // `Handle` and will be delegated to the registered ErrorHandler. - GlobalErrorHandler = defaultErrorHandler() - - // Compile-time check that delegator implements ErrorHandler. - _ ErrorHandler = (*ErrDelegator)(nil) - // Compile-time check that errLogger implements ErrorHandler. - _ ErrorHandler = (*ErrLogger)(nil) -) - // ErrorHandler handles irremediable events. type ErrorHandler interface { // Handle handles any error deemed irremediable by an OpenTelemetry @@ -44,59 +19,18 @@ type ErrDelegator struct { delegate atomic.Pointer[ErrorHandler] } -func (d *ErrDelegator) Handle(err error) { - d.getDelegate().Handle(err) -} +// Compile-time check that delegator implements ErrorHandler. +var _ ErrorHandler = (*ErrDelegator)(nil) -func (d *ErrDelegator) getDelegate() ErrorHandler { - return *d.delegate.Load() +func (d *ErrDelegator) Handle(err error) { + if eh := d.delegate.Load(); eh != nil { + (*eh).Handle(err) + return + } + log.Print(err) } // setDelegate sets the ErrorHandler delegate. func (d *ErrDelegator) setDelegate(eh ErrorHandler) { d.delegate.Store(&eh) } - -func defaultErrorHandler() *ErrDelegator { - d := &ErrDelegator{} - d.setDelegate(&ErrLogger{l: log.New(os.Stderr, "", log.LstdFlags)}) - return d -} - -// ErrLogger logs errors if no delegate is set, otherwise they are delegated. -type ErrLogger struct { - l *log.Logger -} - -// Handle logs err if no delegate is set, otherwise it is delegated. -func (h *ErrLogger) Handle(err error) { - h.l.Print(err) -} - -// GetErrorHandler returns the global ErrorHandler instance. -// -// The default ErrorHandler instance returned will log all errors to STDERR -// until an override ErrorHandler is set with SetErrorHandler. All -// ErrorHandler returned prior to this will automatically forward errors to -// the set instance instead of logging. -// -// Subsequent calls to SetErrorHandler after the first will not forward errors -// to the new ErrorHandler for prior returned instances. -func GetErrorHandler() ErrorHandler { - return GlobalErrorHandler -} - -// SetErrorHandler sets the global ErrorHandler to h. -// -// The first time this is called all ErrorHandler previously returned from -// GetErrorHandler will send errors to h instead of the default logging -// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not -// delegate errors to h. -func SetErrorHandler(h ErrorHandler) { - GlobalErrorHandler.setDelegate(h) -} - -// Handle is a convenience function for ErrorHandler().Handle(err). -func Handle(err error) { - GetErrorHandler().Handle(err) -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/instruments.go b/vendor/go.opentelemetry.io/otel/internal/global/instruments.go index ebb13c20678..3a0cc42f6a4 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/instruments.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/instruments.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" @@ -292,6 +281,32 @@ func (i *sfHistogram) Record(ctx context.Context, x float64, opts ...metric.Reco } } +type sfGauge struct { + embedded.Float64Gauge + + name string + opts []metric.Float64GaugeOption + + delegate atomic.Value // metric.Float64Gauge +} + +var _ metric.Float64Gauge = (*sfGauge)(nil) + +func (i *sfGauge) setDelegate(m metric.Meter) { + ctr, err := m.Float64Gauge(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *sfGauge) Record(ctx context.Context, x float64, opts ...metric.RecordOption) { + if ctr := i.delegate.Load(); ctr != nil { + ctr.(metric.Float64Gauge).Record(ctx, x, opts...) + } +} + type siCounter struct { embedded.Int64Counter @@ -369,3 +384,29 @@ func (i *siHistogram) Record(ctx context.Context, x int64, opts ...metric.Record ctr.(metric.Int64Histogram).Record(ctx, x, opts...) } } + +type siGauge struct { + embedded.Int64Gauge + + name string + opts []metric.Int64GaugeOption + + delegate atomic.Value // metric.Int64Gauge +} + +var _ metric.Int64Gauge = (*siGauge)(nil) + +func (i *siGauge) setDelegate(m metric.Meter) { + ctr, err := m.Int64Gauge(i.name, i.opts...) + if err != nil { + GetErrorHandler().Handle(err) + return + } + i.delegate.Store(ctr) +} + +func (i *siGauge) Record(ctx context.Context, x int64, opts ...metric.RecordOption) { + if ctr := i.delegate.Load(); ctr != nil { + ctr.(metric.Int64Gauge).Record(ctx, x, opts...) + } +} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go index c6f305a2b76..adbca7d3477 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" @@ -23,17 +12,20 @@ import ( "github.com/go-logr/stdr" ) -// globalLogger is the logging interface used within the otel api and sdk provide details of the internals. +// globalLogger holds a reference to the [logr.Logger] used within +// go.opentelemetry.io/otel. // // The default logger uses stdr which is backed by the standard `log.Logger` // interface. This logger will only show messages at the Error Level. -var globalLogger atomic.Pointer[logr.Logger] +var globalLogger = func() *atomic.Pointer[logr.Logger] { + l := stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile)) -func init() { - SetLogger(stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile))) -} + p := new(atomic.Pointer[logr.Logger]) + p.Store(&l) + return p +}() -// SetLogger overrides the globalLogger with l. +// SetLogger sets the global Logger to l. // // To see Warn messages use a logger with `l.V(1).Enabled() == true` // To see Info messages use a logger with `l.V(4).Enabled() == true` @@ -42,28 +34,29 @@ func SetLogger(l logr.Logger) { globalLogger.Store(&l) } -func getLogger() logr.Logger { +// GetLogger returns the global logger. +func GetLogger() logr.Logger { return *globalLogger.Load() } // Info prints messages about the general state of the API or SDK. // This should usually be less than 5 messages a minute. func Info(msg string, keysAndValues ...interface{}) { - getLogger().V(4).Info(msg, keysAndValues...) + GetLogger().V(4).Info(msg, keysAndValues...) } // Error prints messages about exceptional states of the API or SDK. func Error(err error, msg string, keysAndValues ...interface{}) { - getLogger().Error(err, msg, keysAndValues...) + GetLogger().Error(err, msg, keysAndValues...) } // Debug prints messages about all internal changes in the API or SDK. func Debug(msg string, keysAndValues ...interface{}) { - getLogger().V(8).Info(msg, keysAndValues...) + GetLogger().V(8).Info(msg, keysAndValues...) } // Warn prints messages about warnings in the API or SDK. // Not an error but is likely more important than an informational event. func Warn(msg string, keysAndValues ...interface{}) { - getLogger().V(1).Info(msg, keysAndValues...) + GetLogger().V(1).Info(msg, keysAndValues...) } diff --git a/vendor/go.opentelemetry.io/otel/internal/global/meter.go b/vendor/go.opentelemetry.io/otel/internal/global/meter.go index 7ed61c0e256..590fa7385f3 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/meter.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/meter.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" @@ -175,6 +164,17 @@ func (m *meter) Int64Histogram(name string, options ...metric.Int64HistogramOpti return i, nil } +func (m *meter) Int64Gauge(name string, options ...metric.Int64GaugeOption) (metric.Int64Gauge, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Int64Gauge(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &siGauge{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + func (m *meter) Int64ObservableCounter(name string, options ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Int64ObservableCounter(name, options...) @@ -241,6 +241,17 @@ func (m *meter) Float64Histogram(name string, options ...metric.Float64Histogram return i, nil } +func (m *meter) Float64Gauge(name string, options ...metric.Float64GaugeOption) (metric.Float64Gauge, error) { + if del, ok := m.delegate.Load().(metric.Meter); ok { + return del.Float64Gauge(name, options...) + } + m.mtx.Lock() + defer m.mtx.Unlock() + i := &sfGauge{name: name, opts: options} + m.instruments = append(m.instruments, i) + return i, nil +} + func (m *meter) Float64ObservableCounter(name string, options ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Float64ObservableCounter(name, options...) diff --git a/vendor/go.opentelemetry.io/otel/internal/global/propagator.go b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go index 06bac35c2fe..38560ff9915 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/propagator.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" diff --git a/vendor/go.opentelemetry.io/otel/internal/global/state.go b/vendor/go.opentelemetry.io/otel/internal/global/state.go index 386c8bfdc08..204ea142a50 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/state.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/state.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" @@ -25,6 +14,10 @@ import ( ) type ( + errorHandlerHolder struct { + eh ErrorHandler + } + tracerProviderHolder struct { tp trace.TracerProvider } @@ -39,15 +32,59 @@ type ( ) var ( + globalErrorHandler = defaultErrorHandler() globalTracer = defaultTracerValue() globalPropagators = defaultPropagatorsValue() globalMeterProvider = defaultMeterProvider() + delegateErrorHandlerOnce sync.Once delegateTraceOnce sync.Once delegateTextMapPropagatorOnce sync.Once delegateMeterOnce sync.Once ) +// GetErrorHandler returns the global ErrorHandler instance. +// +// The default ErrorHandler instance returned will log all errors to STDERR +// until an override ErrorHandler is set with SetErrorHandler. All +// ErrorHandler returned prior to this will automatically forward errors to +// the set instance instead of logging. +// +// Subsequent calls to SetErrorHandler after the first will not forward errors +// to the new ErrorHandler for prior returned instances. +func GetErrorHandler() ErrorHandler { + return globalErrorHandler.Load().(errorHandlerHolder).eh +} + +// SetErrorHandler sets the global ErrorHandler to h. +// +// The first time this is called all ErrorHandler previously returned from +// GetErrorHandler will send errors to h instead of the default logging +// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not +// delegate errors to h. +func SetErrorHandler(h ErrorHandler) { + current := GetErrorHandler() + + if _, cOk := current.(*ErrDelegator); cOk { + if _, ehOk := h.(*ErrDelegator); ehOk && current == h { + // Do not assign to the delegate of the default ErrDelegator to be + // itself. + Error( + errors.New("no ErrorHandler delegate configured"), + "ErrorHandler remains its current value.", + ) + return + } + } + + delegateErrorHandlerOnce.Do(func() { + if def, ok := current.(*ErrDelegator); ok { + def.setDelegate(h) + } + }) + globalErrorHandler.Store(errorHandlerHolder{eh: h}) +} + // TracerProvider is the internal implementation for global.TracerProvider. func TracerProvider() trace.TracerProvider { return globalTracer.Load().(tracerProviderHolder).tp @@ -137,6 +174,12 @@ func SetMeterProvider(mp metric.MeterProvider) { globalMeterProvider.Store(meterProviderHolder{mp: mp}) } +func defaultErrorHandler() *atomic.Value { + v := &atomic.Value{} + v.Store(errorHandlerHolder{eh: &ErrDelegator{}}) + return v +} + func defaultTracerValue() *atomic.Value { v := &atomic.Value{} v.Store(tracerProviderHolder{tp: &tracerProvider{}}) diff --git a/vendor/go.opentelemetry.io/otel/internal/global/trace.go b/vendor/go.opentelemetry.io/otel/internal/global/trace.go index 3f61ec12a34..596f716f40c 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/trace.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/trace.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" @@ -193,6 +182,9 @@ func (nonRecordingSpan) RecordError(error, ...trace.EventOption) {} // AddEvent does nothing. func (nonRecordingSpan) AddEvent(string, ...trace.EventOption) {} +// AddLink does nothing. +func (nonRecordingSpan) AddLink(trace.Link) {} + // SetName does nothing. func (nonRecordingSpan) SetName(string) {} diff --git a/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go b/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go index e07e7940004..3e7bb3b3566 100644 --- a/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go +++ b/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package internal // import "go.opentelemetry.io/otel/internal" diff --git a/vendor/go.opentelemetry.io/otel/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal_logging.go index c4f8acd5d83..6de7f2e4d88 100644 --- a/vendor/go.opentelemetry.io/otel/internal_logging.go +++ b/vendor/go.opentelemetry.io/otel/internal_logging.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" diff --git a/vendor/go.opentelemetry.io/otel/metric.go b/vendor/go.opentelemetry.io/otel/metric.go index f955171951f..1e6473b32f3 100644 --- a/vendor/go.opentelemetry.io/otel/metric.go +++ b/vendor/go.opentelemetry.io/otel/metric.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" diff --git a/vendor/go.opentelemetry.io/otel/metric/README.md b/vendor/go.opentelemetry.io/otel/metric/README.md new file mode 100644 index 00000000000..0cf902e01f0 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/README.md @@ -0,0 +1,3 @@ +# Metric API + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric)](https://pkg.go.dev/go.opentelemetry.io/otel/metric) diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go index 072baa8e8d0..cf23db77803 100644 --- a/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go +++ b/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" @@ -50,7 +39,7 @@ type Float64ObservableCounter interface { } // Float64ObservableCounterConfig contains options for asynchronous counter -// instruments that record int64 values. +// instruments that record float64 values. type Float64ObservableCounterConfig struct { description string unit string @@ -108,7 +97,7 @@ type Float64ObservableUpDownCounter interface { } // Float64ObservableUpDownCounterConfig contains options for asynchronous -// counter instruments that record int64 values. +// counter instruments that record float64 values. type Float64ObservableUpDownCounterConfig struct { description string unit string @@ -165,7 +154,7 @@ type Float64ObservableGauge interface { } // Float64ObservableGaugeConfig contains options for asynchronous counter -// instruments that record int64 values. +// instruments that record float64 values. type Float64ObservableGaugeConfig struct { description string unit string diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncint64.go b/vendor/go.opentelemetry.io/otel/metric/asyncint64.go index 9bd6ebf0205..c82ba5324e2 100644 --- a/vendor/go.opentelemetry.io/otel/metric/asyncint64.go +++ b/vendor/go.opentelemetry.io/otel/metric/asyncint64.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" diff --git a/vendor/go.opentelemetry.io/otel/metric/config.go b/vendor/go.opentelemetry.io/otel/metric/config.go index 778ad2d748b..d9e3b13e4d1 100644 --- a/vendor/go.opentelemetry.io/otel/metric/config.go +++ b/vendor/go.opentelemetry.io/otel/metric/config.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" diff --git a/vendor/go.opentelemetry.io/otel/metric/doc.go b/vendor/go.opentelemetry.io/otel/metric/doc.go index 54716e13b35..075234b3380 100644 --- a/vendor/go.opentelemetry.io/otel/metric/doc.go +++ b/vendor/go.opentelemetry.io/otel/metric/doc.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 /* Package metric provides the OpenTelemetry API used to measure metrics about diff --git a/vendor/go.opentelemetry.io/otel/metric/embedded/README.md b/vendor/go.opentelemetry.io/otel/metric/embedded/README.md new file mode 100644 index 00000000000..1f6e0efa73d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/metric/embedded/README.md @@ -0,0 +1,3 @@ +# Metric Embedded + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/metric/embedded) diff --git a/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go b/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go index ae0bdbd2e64..1a9dc68093f 100644 --- a/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go +++ b/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 // Package embedded provides interfaces embedded within the [OpenTelemetry // metric API]. @@ -113,6 +102,16 @@ type Float64Counter interface{ float64Counter() } // the API package). type Float64Histogram interface{ float64Histogram() } +// Float64Gauge is embedded in [go.opentelemetry.io/otel/metric.Float64Gauge]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Float64Gauge] if you want users to +// experience a compilation error, signaling they need to update to your latest +// implementation, when the [go.opentelemetry.io/otel/metric.Float64Gauge] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type Float64Gauge interface{ float64Gauge() } + // Float64ObservableCounter is embedded in // [go.opentelemetry.io/otel/metric.Float64ObservableCounter]. // @@ -185,6 +184,16 @@ type Int64Counter interface{ int64Counter() } // the API package). type Int64Histogram interface{ int64Histogram() } +// Int64Gauge is embedded in [go.opentelemetry.io/otel/metric.Int64Gauge]. +// +// Embed this interface in your implementation of the +// [go.opentelemetry.io/otel/metric.Int64Gauge] if you want users to experience +// a compilation error, signaling they need to update to your latest +// implementation, when the [go.opentelemetry.io/otel/metric.Int64Gauge] +// interface is extended (which is something that can happen without a major +// version bump of the API package). +type Int64Gauge interface{ int64Gauge() } + // Int64ObservableCounter is embedded in // [go.opentelemetry.io/otel/metric.Int64ObservableCounter]. // diff --git a/vendor/go.opentelemetry.io/otel/metric/instrument.go b/vendor/go.opentelemetry.io/otel/metric/instrument.go index be89cd53341..ea52e402331 100644 --- a/vendor/go.opentelemetry.io/otel/metric/instrument.go +++ b/vendor/go.opentelemetry.io/otel/metric/instrument.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" @@ -27,6 +16,7 @@ type InstrumentOption interface { Int64CounterOption Int64UpDownCounterOption Int64HistogramOption + Int64GaugeOption Int64ObservableCounterOption Int64ObservableUpDownCounterOption Int64ObservableGaugeOption @@ -34,6 +24,7 @@ type InstrumentOption interface { Float64CounterOption Float64UpDownCounterOption Float64HistogramOption + Float64GaugeOption Float64ObservableCounterOption Float64ObservableUpDownCounterOption Float64ObservableGaugeOption @@ -62,6 +53,11 @@ func (o descOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64Histogra return c } +func (o descOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig { + c.description = string(o) + return c +} + func (o descOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig { c.description = string(o) return c @@ -92,6 +88,11 @@ func (o descOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfi return c } +func (o descOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig { + c.description = string(o) + return c +} + func (o descOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig { c.description = string(o) return c @@ -127,6 +128,11 @@ func (o unitOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64Histogra return c } +func (o unitOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig { + c.unit = string(o) + return c +} + func (o unitOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig { c.unit = string(o) return c @@ -157,6 +163,11 @@ func (o unitOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfi return c } +func (o unitOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig { + c.unit = string(o) + return c +} + func (o unitOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig { c.unit = string(o) return c diff --git a/vendor/go.opentelemetry.io/otel/metric/meter.go b/vendor/go.opentelemetry.io/otel/metric/meter.go index 2520bc74af1..460b3f9b08b 100644 --- a/vendor/go.opentelemetry.io/otel/metric/meter.go +++ b/vendor/go.opentelemetry.io/otel/metric/meter.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" @@ -69,6 +58,10 @@ type Meter interface { // synchronously record the distribution of int64 measurements during a // computational operation. Int64Histogram(name string, options ...Int64HistogramOption) (Int64Histogram, error) + // Int64Gauge returns a new Int64Gauge instrument identified by name and + // configured with options. The instrument is used to synchronously record + // instantaneous int64 measurements during a computational operation. + Int64Gauge(name string, options ...Int64GaugeOption) (Int64Gauge, error) // Int64ObservableCounter returns a new Int64ObservableCounter identified // by name and configured with options. The instrument is used to // asynchronously record increasing int64 measurements once per a @@ -115,6 +108,10 @@ type Meter interface { // synchronously record the distribution of float64 measurements during a // computational operation. Float64Histogram(name string, options ...Float64HistogramOption) (Float64Histogram, error) + // Float64Gauge returns a new Float64Gauge instrument identified by name and + // configured with options. The instrument is used to synchronously record + // instantaneous float64 measurements during a computational operation. + Float64Gauge(name string, options ...Float64GaugeOption) (Float64Gauge, error) // Float64ObservableCounter returns a new Float64ObservableCounter // instrument identified by name and configured with options. The // instrument is used to asynchronously record increasing float64 diff --git a/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go index 0a4825ae6a7..8403a4bad2d 100644 --- a/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go +++ b/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" @@ -39,7 +28,7 @@ type Float64Counter interface { } // Float64CounterConfig contains options for synchronous counter instruments that -// record int64 values. +// record float64 values. type Float64CounterConfig struct { description string unit string @@ -92,7 +81,7 @@ type Float64UpDownCounter interface { } // Float64UpDownCounterConfig contains options for synchronous counter -// instruments that record int64 values. +// instruments that record float64 values. type Float64UpDownCounterConfig struct { description string unit string @@ -144,8 +133,8 @@ type Float64Histogram interface { Record(ctx context.Context, incr float64, options ...RecordOption) } -// Float64HistogramConfig contains options for synchronous counter instruments -// that record int64 values. +// Float64HistogramConfig contains options for synchronous histogram +// instruments that record float64 values. type Float64HistogramConfig struct { description string unit string @@ -183,3 +172,55 @@ func (c Float64HistogramConfig) ExplicitBucketBoundaries() []float64 { type Float64HistogramOption interface { applyFloat64Histogram(Float64HistogramConfig) Float64HistogramConfig } + +// Float64Gauge is an instrument that records instantaneous float64 values. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Float64Gauge interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Float64Gauge + + // Record records the instantaneous value. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Record(ctx context.Context, value float64, options ...RecordOption) +} + +// Float64GaugeConfig contains options for synchronous gauge instruments that +// record float64 values. +type Float64GaugeConfig struct { + description string + unit string +} + +// NewFloat64GaugeConfig returns a new [Float64GaugeConfig] with all opts +// applied. +func NewFloat64GaugeConfig(opts ...Float64GaugeOption) Float64GaugeConfig { + var config Float64GaugeConfig + for _, o := range opts { + config = o.applyFloat64Gauge(config) + } + return config +} + +// Description returns the configured description. +func (c Float64GaugeConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Float64GaugeConfig) Unit() string { + return c.unit +} + +// Float64GaugeOption applies options to a [Float64GaugeConfig]. See +// [InstrumentOption] for other options that can be used as a +// Float64GaugeOption. +type Float64GaugeOption interface { + applyFloat64Gauge(Float64GaugeConfig) Float64GaugeConfig +} diff --git a/vendor/go.opentelemetry.io/otel/metric/syncint64.go b/vendor/go.opentelemetry.io/otel/metric/syncint64.go index 56667d32fc0..783fdfba773 100644 --- a/vendor/go.opentelemetry.io/otel/metric/syncint64.go +++ b/vendor/go.opentelemetry.io/otel/metric/syncint64.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" @@ -144,7 +133,7 @@ type Int64Histogram interface { Record(ctx context.Context, incr int64, options ...RecordOption) } -// Int64HistogramConfig contains options for synchronous counter instruments +// Int64HistogramConfig contains options for synchronous histogram instruments // that record int64 values. type Int64HistogramConfig struct { description string @@ -183,3 +172,55 @@ func (c Int64HistogramConfig) ExplicitBucketBoundaries() []float64 { type Int64HistogramOption interface { applyInt64Histogram(Int64HistogramConfig) Int64HistogramConfig } + +// Int64Gauge is an instrument that records instantaneous int64 values. +// +// Warning: Methods may be added to this interface in minor releases. See +// package documentation on API implementation for information on how to set +// default behavior for unimplemented methods. +type Int64Gauge interface { + // Users of the interface can ignore this. This embedded type is only used + // by implementations of this interface. See the "API Implementations" + // section of the package documentation for more information. + embedded.Int64Gauge + + // Record records the instantaneous value. + // + // Use the WithAttributeSet (or, if performance is not a concern, + // the WithAttributes) option to include measurement attributes. + Record(ctx context.Context, value int64, options ...RecordOption) +} + +// Int64GaugeConfig contains options for synchronous gauge instruments that +// record int64 values. +type Int64GaugeConfig struct { + description string + unit string +} + +// NewInt64GaugeConfig returns a new [Int64GaugeConfig] with all opts +// applied. +func NewInt64GaugeConfig(opts ...Int64GaugeOption) Int64GaugeConfig { + var config Int64GaugeConfig + for _, o := range opts { + config = o.applyInt64Gauge(config) + } + return config +} + +// Description returns the configured description. +func (c Int64GaugeConfig) Description() string { + return c.description +} + +// Unit returns the configured unit. +func (c Int64GaugeConfig) Unit() string { + return c.unit +} + +// Int64GaugeOption applies options to a [Int64GaugeConfig]. See +// [InstrumentOption] for other options that can be used as a +// Int64GaugeOption. +type Int64GaugeOption interface { + applyInt64Gauge(Int64GaugeConfig) Int64GaugeConfig +} diff --git a/vendor/go.opentelemetry.io/otel/propagation.go b/vendor/go.opentelemetry.io/otel/propagation.go index d29aaa32c0b..2fd9497338f 100644 --- a/vendor/go.opentelemetry.io/otel/propagation.go +++ b/vendor/go.opentelemetry.io/otel/propagation.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" diff --git a/vendor/go.opentelemetry.io/otel/propagation/README.md b/vendor/go.opentelemetry.io/otel/propagation/README.md new file mode 100644 index 00000000000..e2959ac747a --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/propagation/README.md @@ -0,0 +1,3 @@ +# Propagation + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/propagation)](https://pkg.go.dev/go.opentelemetry.io/otel/propagation) diff --git a/vendor/go.opentelemetry.io/otel/propagation/baggage.go b/vendor/go.opentelemetry.io/otel/propagation/baggage.go index 303cdf1cbff..552263ba734 100644 --- a/vendor/go.opentelemetry.io/otel/propagation/baggage.go +++ b/vendor/go.opentelemetry.io/otel/propagation/baggage.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package propagation // import "go.opentelemetry.io/otel/propagation" diff --git a/vendor/go.opentelemetry.io/otel/propagation/doc.go b/vendor/go.opentelemetry.io/otel/propagation/doc.go index c119eb2858b..33a3baf15f1 100644 --- a/vendor/go.opentelemetry.io/otel/propagation/doc.go +++ b/vendor/go.opentelemetry.io/otel/propagation/doc.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 /* Package propagation contains OpenTelemetry context propagators. diff --git a/vendor/go.opentelemetry.io/otel/propagation/propagation.go b/vendor/go.opentelemetry.io/otel/propagation/propagation.go index c94438f73a5..8c8286aab4d 100644 --- a/vendor/go.opentelemetry.io/otel/propagation/propagation.go +++ b/vendor/go.opentelemetry.io/otel/propagation/propagation.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package propagation // import "go.opentelemetry.io/otel/propagation" diff --git a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go index 63e5d62221f..6870e316dc0 100644 --- a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go +++ b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package propagation // import "go.opentelemetry.io/otel/propagation" @@ -46,7 +35,7 @@ var ( versionPart = fmt.Sprintf("%.2X", supportedVersion) ) -// Inject set tracecontext from the Context into the carrier. +// Inject injects the trace context from ctx into carrier. func (tc TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) { sc := trace.SpanContextFromContext(ctx) if !sc.IsValid() { diff --git a/vendor/go.opentelemetry.io/otel/renovate.json b/vendor/go.opentelemetry.io/otel/renovate.json new file mode 100644 index 00000000000..8c5ac55ca93 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/renovate.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "ignorePaths": [], + "labels": ["Skip Changelog", "dependencies"], + "postUpdateOptions" : [ + "gomodTidy" + ], + "packageRules": [ + { + "matchManagers": ["gomod"], + "matchDepTypes": ["indirect"], + "enabled": true + }, + { + "matchFileNames": ["internal/tools/**"], + "matchManagers": ["gomod"], + "matchDepTypes": ["indirect"], + "enabled": false + } + ] +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/internal/v2/http.go b/vendor/go.opentelemetry.io/otel/semconv/internal/v2/http.go deleted file mode 100644 index 12d6b520f52..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/internal/v2/http.go +++ /dev/null @@ -1,404 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package internal // import "go.opentelemetry.io/otel/semconv/internal/v2" - -import ( - "fmt" - "net/http" - "strings" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" -) - -// HTTPConv are the HTTP semantic convention attributes defined for a version -// of the OpenTelemetry specification. -type HTTPConv struct { - NetConv *NetConv - - EnduserIDKey attribute.Key - HTTPClientIPKey attribute.Key - HTTPFlavorKey attribute.Key - HTTPMethodKey attribute.Key - HTTPRequestContentLengthKey attribute.Key - HTTPResponseContentLengthKey attribute.Key - HTTPRouteKey attribute.Key - HTTPSchemeHTTP attribute.KeyValue - HTTPSchemeHTTPS attribute.KeyValue - HTTPStatusCodeKey attribute.Key - HTTPTargetKey attribute.Key - HTTPURLKey attribute.Key - HTTPUserAgentKey attribute.Key -} - -// ClientResponse returns attributes for an HTTP response received by a client -// from a server. The following attributes are returned if the related values -// are defined in resp: "http.status.code", "http.response_content_length". -// -// This does not add all OpenTelemetry required attributes for an HTTP event, -// it assumes ClientRequest was used to create the span with a complete set of -// attributes. If a complete set of attributes can be generated using the -// request contained in resp. For example: -// -// append(ClientResponse(resp), ClientRequest(resp.Request)...) -func (c *HTTPConv) ClientResponse(resp *http.Response) []attribute.KeyValue { - var n int - if resp.StatusCode > 0 { - n++ - } - if resp.ContentLength > 0 { - n++ - } - - attrs := make([]attribute.KeyValue, 0, n) - if resp.StatusCode > 0 { - attrs = append(attrs, c.HTTPStatusCodeKey.Int(resp.StatusCode)) - } - if resp.ContentLength > 0 { - attrs = append(attrs, c.HTTPResponseContentLengthKey.Int(int(resp.ContentLength))) - } - return attrs -} - -// ClientRequest returns attributes for an HTTP request made by a client. The -// following attributes are always returned: "http.url", "http.flavor", -// "http.method", "net.peer.name". The following attributes are returned if the -// related values are defined in req: "net.peer.port", "http.user_agent", -// "http.request_content_length", "enduser.id". -func (c *HTTPConv) ClientRequest(req *http.Request) []attribute.KeyValue { - n := 3 // URL, peer name, proto, and method. - var h string - if req.URL != nil { - h = req.URL.Host - } - peer, p := firstHostPort(h, req.Header.Get("Host")) - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p) - if port > 0 { - n++ - } - useragent := req.UserAgent() - if useragent != "" { - n++ - } - if req.ContentLength > 0 { - n++ - } - userID, _, hasUserID := req.BasicAuth() - if hasUserID { - n++ - } - attrs := make([]attribute.KeyValue, 0, n) - - attrs = append(attrs, c.method(req.Method)) - attrs = append(attrs, c.proto(req.Proto)) - - var u string - if req.URL != nil { - // Remove any username/password info that may be in the URL. - userinfo := req.URL.User - req.URL.User = nil - u = req.URL.String() - // Restore any username/password info that was removed. - req.URL.User = userinfo - } - attrs = append(attrs, c.HTTPURLKey.String(u)) - - attrs = append(attrs, c.NetConv.PeerName(peer)) - if port > 0 { - attrs = append(attrs, c.NetConv.PeerPort(port)) - } - - if useragent != "" { - attrs = append(attrs, c.HTTPUserAgentKey.String(useragent)) - } - - if l := req.ContentLength; l > 0 { - attrs = append(attrs, c.HTTPRequestContentLengthKey.Int64(l)) - } - - if hasUserID { - attrs = append(attrs, c.EnduserIDKey.String(userID)) - } - - return attrs -} - -// ServerRequest returns attributes for an HTTP request received by a server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "http.flavor", "http.target", "net.host.name". The following attributes are -// returned if they related values are defined in req: "net.host.port", -// "net.sock.peer.addr", "net.sock.peer.port", "http.user_agent", "enduser.id", -// "http.client_ip". -func (c *HTTPConv) ServerRequest(server string, req *http.Request) []attribute.KeyValue { - // TODO: This currently does not add the specification required - // `http.target` attribute. It has too high of a cardinality to safely be - // added. An alternate should be added, or this comment removed, when it is - // addressed by the specification. If it is ultimately decided to continue - // not including the attribute, the HTTPTargetKey field of the HTTPConv - // should be removed as well. - - n := 4 // Method, scheme, proto, and host name. - var host string - var p int - if server == "" { - host, p = splitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = splitHostPort(server) - if p < 0 { - _, p = splitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - n++ - } - peer, peerPort := splitHostPort(req.RemoteAddr) - if peer != "" { - n++ - if peerPort > 0 { - n++ - } - } - useragent := req.UserAgent() - if useragent != "" { - n++ - } - userID, _, hasUserID := req.BasicAuth() - if hasUserID { - n++ - } - clientIP := serverClientIP(req.Header.Get("X-Forwarded-For")) - if clientIP != "" { - n++ - } - attrs := make([]attribute.KeyValue, 0, n) - - attrs = append(attrs, c.method(req.Method)) - attrs = append(attrs, c.scheme(req.TLS != nil)) - attrs = append(attrs, c.proto(req.Proto)) - attrs = append(attrs, c.NetConv.HostName(host)) - - if hostPort > 0 { - attrs = append(attrs, c.NetConv.HostPort(hostPort)) - } - - if peer != "" { - // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a - // file-path that would be interpreted with a sock family. - attrs = append(attrs, c.NetConv.SockPeerAddr(peer)) - if peerPort > 0 { - attrs = append(attrs, c.NetConv.SockPeerPort(peerPort)) - } - } - - if useragent != "" { - attrs = append(attrs, c.HTTPUserAgentKey.String(useragent)) - } - - if hasUserID { - attrs = append(attrs, c.EnduserIDKey.String(userID)) - } - - if clientIP != "" { - attrs = append(attrs, c.HTTPClientIPKey.String(clientIP)) - } - - return attrs -} - -func (c *HTTPConv) method(method string) attribute.KeyValue { - if method == "" { - return c.HTTPMethodKey.String(http.MethodGet) - } - return c.HTTPMethodKey.String(method) -} - -func (c *HTTPConv) scheme(https bool) attribute.KeyValue { // nolint:revive - if https { - return c.HTTPSchemeHTTPS - } - return c.HTTPSchemeHTTP -} - -func (c *HTTPConv) proto(proto string) attribute.KeyValue { - switch proto { - case "HTTP/1.0": - return c.HTTPFlavorKey.String("1.0") - case "HTTP/1.1": - return c.HTTPFlavorKey.String("1.1") - case "HTTP/2": - return c.HTTPFlavorKey.String("2.0") - case "HTTP/3": - return c.HTTPFlavorKey.String("3.0") - default: - return c.HTTPFlavorKey.String(proto) - } -} - -func serverClientIP(xForwardedFor string) string { - if idx := strings.Index(xForwardedFor, ","); idx >= 0 { - xForwardedFor = xForwardedFor[:idx] - } - return xForwardedFor -} - -func requiredHTTPPort(https bool, port int) int { // nolint:revive - if https { - if port > 0 && port != 443 { - return port - } - } else { - if port > 0 && port != 80 { - return port - } - } - return -1 -} - -// Return the request host and port from the first non-empty source. -func firstHostPort(source ...string) (host string, port int) { - for _, hostport := range source { - host, port = splitHostPort(hostport) - if host != "" || port > 0 { - break - } - } - return -} - -// RequestHeader returns the contents of h as OpenTelemetry attributes. -func (c *HTTPConv) RequestHeader(h http.Header) []attribute.KeyValue { - return c.header("http.request.header", h) -} - -// ResponseHeader returns the contents of h as OpenTelemetry attributes. -func (c *HTTPConv) ResponseHeader(h http.Header) []attribute.KeyValue { - return c.header("http.response.header", h) -} - -func (c *HTTPConv) header(prefix string, h http.Header) []attribute.KeyValue { - key := func(k string) attribute.Key { - k = strings.ToLower(k) - k = strings.ReplaceAll(k, "-", "_") - k = fmt.Sprintf("%s.%s", prefix, k) - return attribute.Key(k) - } - - attrs := make([]attribute.KeyValue, 0, len(h)) - for k, v := range h { - attrs = append(attrs, key(k).StringSlice(v)) - } - return attrs -} - -// ClientStatus returns a span status code and message for an HTTP status code -// value received by a client. -func (c *HTTPConv) ClientStatus(code int) (codes.Code, string) { - stat, valid := validateHTTPStatusCode(code) - if !valid { - return stat, fmt.Sprintf("Invalid HTTP status code %d", code) - } - return stat, "" -} - -// ServerStatus returns a span status code and message for an HTTP status code -// value returned by a server. Status codes in the 400-499 range are not -// returned as errors. -func (c *HTTPConv) ServerStatus(code int) (codes.Code, string) { - stat, valid := validateHTTPStatusCode(code) - if !valid { - return stat, fmt.Sprintf("Invalid HTTP status code %d", code) - } - - if code/100 == 4 { - return codes.Unset, "" - } - return stat, "" -} - -type codeRange struct { - fromInclusive int - toInclusive int -} - -func (r codeRange) contains(code int) bool { - return r.fromInclusive <= code && code <= r.toInclusive -} - -var validRangesPerCategory = map[int][]codeRange{ - 1: { - {http.StatusContinue, http.StatusEarlyHints}, - }, - 2: { - {http.StatusOK, http.StatusAlreadyReported}, - {http.StatusIMUsed, http.StatusIMUsed}, - }, - 3: { - {http.StatusMultipleChoices, http.StatusUseProxy}, - {http.StatusTemporaryRedirect, http.StatusPermanentRedirect}, - }, - 4: { - {http.StatusBadRequest, http.StatusTeapot}, // yes, teapot is so useful… - {http.StatusMisdirectedRequest, http.StatusUpgradeRequired}, - {http.StatusPreconditionRequired, http.StatusTooManyRequests}, - {http.StatusRequestHeaderFieldsTooLarge, http.StatusRequestHeaderFieldsTooLarge}, - {http.StatusUnavailableForLegalReasons, http.StatusUnavailableForLegalReasons}, - }, - 5: { - {http.StatusInternalServerError, http.StatusLoopDetected}, - {http.StatusNotExtended, http.StatusNetworkAuthenticationRequired}, - }, -} - -// validateHTTPStatusCode validates the HTTP status code and returns -// corresponding span status code. If the `code` is not a valid HTTP status -// code, returns span status Error and false. -func validateHTTPStatusCode(code int) (codes.Code, bool) { - category := code / 100 - ranges, ok := validRangesPerCategory[category] - if !ok { - return codes.Error, false - } - ok = false - for _, crange := range ranges { - ok = crange.contains(code) - if ok { - break - } - } - if !ok { - return codes.Error, false - } - if category > 0 && category < 4 { - return codes.Unset, true - } - return codes.Error, true -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/internal/v2/net.go b/vendor/go.opentelemetry.io/otel/semconv/internal/v2/net.go deleted file mode 100644 index 4a711133a02..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/internal/v2/net.go +++ /dev/null @@ -1,324 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package internal // import "go.opentelemetry.io/otel/semconv/internal/v2" - -import ( - "net" - "strconv" - "strings" - - "go.opentelemetry.io/otel/attribute" -) - -// NetConv are the network semantic convention attributes defined for a version -// of the OpenTelemetry specification. -type NetConv struct { - NetHostNameKey attribute.Key - NetHostPortKey attribute.Key - NetPeerNameKey attribute.Key - NetPeerPortKey attribute.Key - NetSockFamilyKey attribute.Key - NetSockPeerAddrKey attribute.Key - NetSockPeerPortKey attribute.Key - NetSockHostAddrKey attribute.Key - NetSockHostPortKey attribute.Key - NetTransportOther attribute.KeyValue - NetTransportTCP attribute.KeyValue - NetTransportUDP attribute.KeyValue - NetTransportInProc attribute.KeyValue -} - -func (c *NetConv) Transport(network string) attribute.KeyValue { - switch network { - case "tcp", "tcp4", "tcp6": - return c.NetTransportTCP - case "udp", "udp4", "udp6": - return c.NetTransportUDP - case "unix", "unixgram", "unixpacket": - return c.NetTransportInProc - default: - // "ip:*", "ip4:*", and "ip6:*" all are considered other. - return c.NetTransportOther - } -} - -// Host returns attributes for a network host address. -func (c *NetConv) Host(address string) []attribute.KeyValue { - h, p := splitHostPort(address) - var n int - if h != "" { - n++ - if p > 0 { - n++ - } - } - - if n == 0 { - return nil - } - - attrs := make([]attribute.KeyValue, 0, n) - attrs = append(attrs, c.HostName(h)) - if p > 0 { - attrs = append(attrs, c.HostPort(int(p))) - } - return attrs -} - -// Server returns attributes for a network listener listening at address. See -// net.Listen for information about acceptable address values, address should -// be the same as the one used to create ln. If ln is nil, only network host -// attributes will be returned that describe address. Otherwise, the socket -// level information about ln will also be included. -func (c *NetConv) Server(address string, ln net.Listener) []attribute.KeyValue { - if ln == nil { - return c.Host(address) - } - - lAddr := ln.Addr() - if lAddr == nil { - return c.Host(address) - } - - hostName, hostPort := splitHostPort(address) - sockHostAddr, sockHostPort := splitHostPort(lAddr.String()) - network := lAddr.Network() - sockFamily := family(network, sockHostAddr) - - n := nonZeroStr(hostName, network, sockHostAddr, sockFamily) - n += positiveInt(hostPort, sockHostPort) - attr := make([]attribute.KeyValue, 0, n) - if hostName != "" { - attr = append(attr, c.HostName(hostName)) - if hostPort > 0 { - // Only if net.host.name is set should net.host.port be. - attr = append(attr, c.HostPort(hostPort)) - } - } - if network != "" { - attr = append(attr, c.Transport(network)) - } - if sockFamily != "" { - attr = append(attr, c.NetSockFamilyKey.String(sockFamily)) - } - if sockHostAddr != "" { - attr = append(attr, c.NetSockHostAddrKey.String(sockHostAddr)) - if sockHostPort > 0 { - // Only if net.sock.host.addr is set should net.sock.host.port be. - attr = append(attr, c.NetSockHostPortKey.Int(sockHostPort)) - } - } - return attr -} - -func (c *NetConv) HostName(name string) attribute.KeyValue { - return c.NetHostNameKey.String(name) -} - -func (c *NetConv) HostPort(port int) attribute.KeyValue { - return c.NetHostPortKey.Int(port) -} - -// Client returns attributes for a client network connection to address. See -// net.Dial for information about acceptable address values, address should be -// the same as the one used to create conn. If conn is nil, only network peer -// attributes will be returned that describe address. Otherwise, the socket -// level information about conn will also be included. -func (c *NetConv) Client(address string, conn net.Conn) []attribute.KeyValue { - if conn == nil { - return c.Peer(address) - } - - lAddr, rAddr := conn.LocalAddr(), conn.RemoteAddr() - - var network string - switch { - case lAddr != nil: - network = lAddr.Network() - case rAddr != nil: - network = rAddr.Network() - default: - return c.Peer(address) - } - - peerName, peerPort := splitHostPort(address) - var ( - sockFamily string - sockPeerAddr string - sockPeerPort int - sockHostAddr string - sockHostPort int - ) - - if lAddr != nil { - sockHostAddr, sockHostPort = splitHostPort(lAddr.String()) - } - - if rAddr != nil { - sockPeerAddr, sockPeerPort = splitHostPort(rAddr.String()) - } - - switch { - case sockHostAddr != "": - sockFamily = family(network, sockHostAddr) - case sockPeerAddr != "": - sockFamily = family(network, sockPeerAddr) - } - - n := nonZeroStr(peerName, network, sockPeerAddr, sockHostAddr, sockFamily) - n += positiveInt(peerPort, sockPeerPort, sockHostPort) - attr := make([]attribute.KeyValue, 0, n) - if peerName != "" { - attr = append(attr, c.PeerName(peerName)) - if peerPort > 0 { - // Only if net.peer.name is set should net.peer.port be. - attr = append(attr, c.PeerPort(peerPort)) - } - } - if network != "" { - attr = append(attr, c.Transport(network)) - } - if sockFamily != "" { - attr = append(attr, c.NetSockFamilyKey.String(sockFamily)) - } - if sockPeerAddr != "" { - attr = append(attr, c.NetSockPeerAddrKey.String(sockPeerAddr)) - if sockPeerPort > 0 { - // Only if net.sock.peer.addr is set should net.sock.peer.port be. - attr = append(attr, c.NetSockPeerPortKey.Int(sockPeerPort)) - } - } - if sockHostAddr != "" { - attr = append(attr, c.NetSockHostAddrKey.String(sockHostAddr)) - if sockHostPort > 0 { - // Only if net.sock.host.addr is set should net.sock.host.port be. - attr = append(attr, c.NetSockHostPortKey.Int(sockHostPort)) - } - } - return attr -} - -func family(network, address string) string { - switch network { - case "unix", "unixgram", "unixpacket": - return "unix" - default: - if ip := net.ParseIP(address); ip != nil { - if ip.To4() == nil { - return "inet6" - } - return "inet" - } - } - return "" -} - -func nonZeroStr(strs ...string) int { - var n int - for _, str := range strs { - if str != "" { - n++ - } - } - return n -} - -func positiveInt(ints ...int) int { - var n int - for _, i := range ints { - if i > 0 { - n++ - } - } - return n -} - -// Peer returns attributes for a network peer address. -func (c *NetConv) Peer(address string) []attribute.KeyValue { - h, p := splitHostPort(address) - var n int - if h != "" { - n++ - if p > 0 { - n++ - } - } - - if n == 0 { - return nil - } - - attrs := make([]attribute.KeyValue, 0, n) - attrs = append(attrs, c.PeerName(h)) - if p > 0 { - attrs = append(attrs, c.PeerPort(int(p))) - } - return attrs -} - -func (c *NetConv) PeerName(name string) attribute.KeyValue { - return c.NetPeerNameKey.String(name) -} - -func (c *NetConv) PeerPort(port int) attribute.KeyValue { - return c.NetPeerPortKey.Int(port) -} - -func (c *NetConv) SockPeerAddr(addr string) attribute.KeyValue { - return c.NetSockPeerAddrKey.String(addr) -} - -func (c *NetConv) SockPeerPort(port int) attribute.KeyValue { - return c.NetSockPeerPortKey.Int(port) -} - -// splitHostPort splits a network address hostport of the form "host", -// "host%zone", "[host]", "[host%zone], "host:port", "host%zone:port", -// "[host]:port", "[host%zone]:port", or ":port" into host or host%zone and -// port. -// -// An empty host is returned if it is not provided or unparsable. A negative -// port is returned if it is not provided or unparsable. -func splitHostPort(hostport string) (host string, port int) { - port = -1 - - if strings.HasPrefix(hostport, "[") { - addrEnd := strings.LastIndex(hostport, "]") - if addrEnd < 0 { - // Invalid hostport. - return - } - if i := strings.LastIndex(hostport[addrEnd:], ":"); i < 0 { - host = hostport[1:addrEnd] - return - } - } else { - if i := strings.LastIndex(hostport, ":"); i < 0 { - host = hostport - return - } - } - - host, pStr, err := net.SplitHostPort(hostport) - if err != nil { - return - } - - p, err := strconv.ParseUint(pStr, 10, 16) - if err != nil { - return - } - return host, int(p) -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/doc.go deleted file mode 100644 index 71a1f7748d5..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package semconv implements OpenTelemetry semantic conventions. -// -// OpenTelemetry semantic conventions are agreed standardized naming -// patterns for OpenTelemetry things. This package represents the conventions -// as of the v1.17.0 version of the OpenTelemetry specification. -package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/event.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/event.go deleted file mode 100644 index 679c40c4de4..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/event.go +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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 from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0" - -import "go.opentelemetry.io/otel/attribute" - -// This semantic convention defines the attributes used to represent a feature -// flag evaluation as an event. -const ( - // FeatureFlagKeyKey is the attribute Key conforming to the - // "feature_flag.key" semantic conventions. It represents the unique - // identifier of the feature flag. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'logo-color' - FeatureFlagKeyKey = attribute.Key("feature_flag.key") - - // FeatureFlagProviderNameKey is the attribute Key conforming to the - // "feature_flag.provider_name" semantic conventions. It represents the - // name of the service provider that performs the flag evaluation. - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'Flag Manager' - FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name") - - // FeatureFlagVariantKey is the attribute Key conforming to the - // "feature_flag.variant" semantic conventions. It represents the sHOULD be - // a semantic identifier for a value. If one is unavailable, a stringified - // version of the value can be used. - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'red', 'true', 'on' - // Note: A semantic identifier, commonly referred to as a variant, provides - // a means - // for referring to a value without including the value itself. This can - // provide additional context for understanding the meaning behind a value. - // For example, the variant `red` maybe be used for the value `#c05543`. - // - // A stringified version of the value can be used in situations where a - // semantic identifier is unavailable. String representation of the value - // should be determined by the implementer. - FeatureFlagVariantKey = attribute.Key("feature_flag.variant") -) - -// FeatureFlagKey returns an attribute KeyValue conforming to the -// "feature_flag.key" semantic conventions. It represents the unique identifier -// of the feature flag. -func FeatureFlagKey(val string) attribute.KeyValue { - return FeatureFlagKeyKey.String(val) -} - -// FeatureFlagProviderName returns an attribute KeyValue conforming to the -// "feature_flag.provider_name" semantic conventions. It represents the name of -// the service provider that performs the flag evaluation. -func FeatureFlagProviderName(val string) attribute.KeyValue { - return FeatureFlagProviderNameKey.String(val) -} - -// FeatureFlagVariant returns an attribute KeyValue conforming to the -// "feature_flag.variant" semantic conventions. It represents the sHOULD be a -// semantic identifier for a value. If one is unavailable, a stringified -// version of the value can be used. -func FeatureFlagVariant(val string) attribute.KeyValue { - return FeatureFlagVariantKey.String(val) -} - -// RPC received/sent message. -const ( - // MessageTypeKey is the attribute Key conforming to the "message.type" - // semantic conventions. It represents the whether this is a received or - // sent message. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - MessageTypeKey = attribute.Key("message.type") - - // MessageIDKey is the attribute Key conforming to the "message.id" - // semantic conventions. It represents the mUST be calculated as two - // different counters starting from `1` one for sent messages and one for - // received message. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Note: This way we guarantee that the values will be consistent between - // different implementations. - MessageIDKey = attribute.Key("message.id") - - // MessageCompressedSizeKey is the attribute Key conforming to the - // "message.compressed_size" semantic conventions. It represents the - // compressed size of the message in bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - MessageCompressedSizeKey = attribute.Key("message.compressed_size") - - // MessageUncompressedSizeKey is the attribute Key conforming to the - // "message.uncompressed_size" semantic conventions. It represents the - // uncompressed size of the message in bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size") -) - -var ( - // sent - MessageTypeSent = MessageTypeKey.String("SENT") - // received - MessageTypeReceived = MessageTypeKey.String("RECEIVED") -) - -// MessageID returns an attribute KeyValue conforming to the "message.id" -// semantic conventions. It represents the mUST be calculated as two different -// counters starting from `1` one for sent messages and one for received -// message. -func MessageID(val int) attribute.KeyValue { - return MessageIDKey.Int(val) -} - -// MessageCompressedSize returns an attribute KeyValue conforming to the -// "message.compressed_size" semantic conventions. It represents the compressed -// size of the message in bytes. -func MessageCompressedSize(val int) attribute.KeyValue { - return MessageCompressedSizeKey.Int(val) -} - -// MessageUncompressedSize returns an attribute KeyValue conforming to the -// "message.uncompressed_size" semantic conventions. It represents the -// uncompressed size of the message in bytes. -func MessageUncompressedSize(val int) attribute.KeyValue { - return MessageUncompressedSizeKey.Int(val) -} - -// The attributes used to report a single exception associated with a span. -const ( - // ExceptionEscapedKey is the attribute Key conforming to the - // "exception.escaped" semantic conventions. It represents the sHOULD be - // set to true if the exception event is recorded at a point where it is - // known that the exception is escaping the scope of the span. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - // Note: An exception is considered to have escaped (or left) the scope of - // a span, - // if that span is ended while the exception is still logically "in - // flight". - // This may be actually "in flight" in some languages (e.g. if the - // exception - // is passed to a Context manager's `__exit__` method in Python) but will - // usually be caught at the point of recording the exception in most - // languages. - // - // It is usually not possible to determine at the point where an exception - // is thrown - // whether it will escape the scope of a span. - // However, it is trivial to know that an exception - // will escape, if one checks for an active exception just before ending - // the span, - // as done in the [example above](#recording-an-exception). - // - // It follows that an exception may still escape the scope of the span - // even if the `exception.escaped` attribute was not set or set to false, - // since the event might have been recorded at a time where it was not - // clear whether the exception will escape. - ExceptionEscapedKey = attribute.Key("exception.escaped") -) - -// ExceptionEscaped returns an attribute KeyValue conforming to the -// "exception.escaped" semantic conventions. It represents the sHOULD be set to -// true if the exception event is recorded at a point where it is known that -// the exception is escaping the scope of the span. -func ExceptionEscaped(val bool) attribute.KeyValue { - return ExceptionEscapedKey.Bool(val) -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/exception.go deleted file mode 100644 index 9b8c559de42..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/exception.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0" - -const ( - // ExceptionEventName is the name of the Span event representing an exception. - ExceptionEventName = "exception" -) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/http.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/http.go deleted file mode 100644 index d5c4b5c136a..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/http.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0" - -// HTTP scheme attributes. -var ( - HTTPSchemeHTTP = HTTPSchemeKey.String("http") - HTTPSchemeHTTPS = HTTPSchemeKey.String("https") -) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/httpconv/http.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/httpconv/http.go deleted file mode 100644 index fc43808fe44..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/httpconv/http.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package httpconv provides OpenTelemetry HTTP semantic conventions for -// tracing telemetry. -package httpconv // import "go.opentelemetry.io/otel/semconv/v1.17.0/httpconv" - -import ( - "net/http" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/semconv/internal/v2" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" -) - -var ( - nc = &internal.NetConv{ - NetHostNameKey: semconv.NetHostNameKey, - NetHostPortKey: semconv.NetHostPortKey, - NetPeerNameKey: semconv.NetPeerNameKey, - NetPeerPortKey: semconv.NetPeerPortKey, - NetSockPeerAddrKey: semconv.NetSockPeerAddrKey, - NetSockPeerPortKey: semconv.NetSockPeerPortKey, - NetTransportOther: semconv.NetTransportOther, - NetTransportTCP: semconv.NetTransportTCP, - NetTransportUDP: semconv.NetTransportUDP, - NetTransportInProc: semconv.NetTransportInProc, - } - - hc = &internal.HTTPConv{ - NetConv: nc, - - EnduserIDKey: semconv.EnduserIDKey, - HTTPClientIPKey: semconv.HTTPClientIPKey, - HTTPFlavorKey: semconv.HTTPFlavorKey, - HTTPMethodKey: semconv.HTTPMethodKey, - HTTPRequestContentLengthKey: semconv.HTTPRequestContentLengthKey, - HTTPResponseContentLengthKey: semconv.HTTPResponseContentLengthKey, - HTTPRouteKey: semconv.HTTPRouteKey, - HTTPSchemeHTTP: semconv.HTTPSchemeHTTP, - HTTPSchemeHTTPS: semconv.HTTPSchemeHTTPS, - HTTPStatusCodeKey: semconv.HTTPStatusCodeKey, - HTTPTargetKey: semconv.HTTPTargetKey, - HTTPURLKey: semconv.HTTPURLKey, - HTTPUserAgentKey: semconv.HTTPUserAgentKey, - } -) - -// ClientResponse returns trace attributes for an HTTP response received by a -// client from a server. It will return the following attributes if the related -// values are defined in resp: "http.status.code", -// "http.response_content_length". -// -// This does not add all OpenTelemetry required attributes for an HTTP event, -// it assumes ClientRequest was used to create the span with a complete set of -// attributes. If a complete set of attributes can be generated using the -// request contained in resp. For example: -// -// append(ClientResponse(resp), ClientRequest(resp.Request)...) -func ClientResponse(resp *http.Response) []attribute.KeyValue { - return hc.ClientResponse(resp) -} - -// ClientRequest returns trace attributes for an HTTP request made by a client. -// The following attributes are always returned: "http.url", "http.flavor", -// "http.method", "net.peer.name". The following attributes are returned if the -// related values are defined in req: "net.peer.port", "http.user_agent", -// "http.request_content_length", "enduser.id". -func ClientRequest(req *http.Request) []attribute.KeyValue { - return hc.ClientRequest(req) -} - -// ClientStatus returns a span status code and message for an HTTP status code -// value received by a client. -func ClientStatus(code int) (codes.Code, string) { - return hc.ClientStatus(code) -} - -// ServerRequest returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "http.flavor", "http.target", "net.host.name". The following attributes are -// returned if they related values are defined in req: "net.host.port", -// "net.sock.peer.addr", "net.sock.peer.port", "http.user_agent", "enduser.id", -// "http.client_ip". -func ServerRequest(server string, req *http.Request) []attribute.KeyValue { - return hc.ServerRequest(server, req) -} - -// ServerStatus returns a span status code and message for an HTTP status code -// value returned by a server. Status codes in the 400-499 range are not -// returned as errors. -func ServerStatus(code int) (codes.Code, string) { - return hc.ServerStatus(code) -} - -// RequestHeader returns the contents of h as attributes. -// -// Instrumentation should require an explicit configuration of which headers to -// captured and then prune what they pass here. Including all headers can be a -// security risk - explicit configuration helps avoid leaking sensitive -// information. -// -// The User-Agent header is already captured in the http.user_agent attribute -// from ClientRequest and ServerRequest. Instrumentation may provide an option -// to capture that header here even though it is not recommended. Otherwise, -// instrumentation should filter that out of what is passed. -func RequestHeader(h http.Header) []attribute.KeyValue { - return hc.RequestHeader(h) -} - -// ResponseHeader returns the contents of h as attributes. -// -// Instrumentation should require an explicit configuration of which headers to -// captured and then prune what they pass here. Including all headers can be a -// security risk - explicit configuration helps avoid leaking sensitive -// information. -// -// The User-Agent header is already captured in the http.user_agent attribute -// from ClientRequest and ServerRequest. Instrumentation may provide an option -// to capture that header here even though it is not recommended. Otherwise, -// instrumentation should filter that out of what is passed. -func ResponseHeader(h http.Header) []attribute.KeyValue { - return hc.ResponseHeader(h) -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/resource.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/resource.go deleted file mode 100644 index 39a2eab3a6a..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/resource.go +++ /dev/null @@ -1,2010 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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 from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0" - -import "go.opentelemetry.io/otel/attribute" - -// The web browser in which the application represented by the resource is -// running. The `browser.*` attributes MUST be used only for resources that -// represent applications running in a web browser (regardless of whether -// running on a mobile or desktop device). -const ( - // BrowserBrandsKey is the attribute Key conforming to the "browser.brands" - // semantic conventions. It represents the array of brand name and version - // separated by a space - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' - // Note: This value is intended to be taken from the [UA client hints - // API](https://wicg.github.io/ua-client-hints/#interface) - // (`navigator.userAgentData.brands`). - BrowserBrandsKey = attribute.Key("browser.brands") - - // BrowserPlatformKey is the attribute Key conforming to the - // "browser.platform" semantic conventions. It represents the platform on - // which the browser is running - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Windows', 'macOS', 'Android' - // Note: This value is intended to be taken from the [UA client hints - // API](https://wicg.github.io/ua-client-hints/#interface) - // (`navigator.userAgentData.platform`). If unavailable, the legacy - // `navigator.platform` API SHOULD NOT be used instead and this attribute - // SHOULD be left unset in order for the values to be consistent. - // The list of possible values is defined in the [W3C User-Agent Client - // Hints - // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). - // Note that some (but not all) of these values can overlap with values in - // the [`os.type` and `os.name` attributes](./os.md). However, for - // consistency, the values in the `browser.platform` attribute should - // capture the exact value that the user agent provides. - BrowserPlatformKey = attribute.Key("browser.platform") - - // BrowserMobileKey is the attribute Key conforming to the "browser.mobile" - // semantic conventions. It represents a boolean that is true if the - // browser is running on a mobile device - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - // Note: This value is intended to be taken from the [UA client hints - // API](https://wicg.github.io/ua-client-hints/#interface) - // (`navigator.userAgentData.mobile`). If unavailable, this attribute - // SHOULD be left unset. - BrowserMobileKey = attribute.Key("browser.mobile") - - // BrowserUserAgentKey is the attribute Key conforming to the - // "browser.user_agent" semantic conventions. It represents the full - // user-agent string provided by the browser - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) - // AppleWebKit/537.36 (KHTML, ' - // 'like Gecko) Chrome/95.0.4638.54 Safari/537.36' - // Note: The user-agent value SHOULD be provided only from browsers that do - // not have a mechanism to retrieve brands and platform individually from - // the User-Agent Client Hints API. To retrieve the value, the legacy - // `navigator.userAgent` API can be used. - BrowserUserAgentKey = attribute.Key("browser.user_agent") - - // BrowserLanguageKey is the attribute Key conforming to the - // "browser.language" semantic conventions. It represents the preferred - // language of the user using the browser - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'en', 'en-US', 'fr', 'fr-FR' - // Note: This value is intended to be taken from the Navigator API - // `navigator.language`. - BrowserLanguageKey = attribute.Key("browser.language") -) - -// BrowserBrands returns an attribute KeyValue conforming to the -// "browser.brands" semantic conventions. It represents the array of brand name -// and version separated by a space -func BrowserBrands(val ...string) attribute.KeyValue { - return BrowserBrandsKey.StringSlice(val) -} - -// BrowserPlatform returns an attribute KeyValue conforming to the -// "browser.platform" semantic conventions. It represents the platform on which -// the browser is running -func BrowserPlatform(val string) attribute.KeyValue { - return BrowserPlatformKey.String(val) -} - -// BrowserMobile returns an attribute KeyValue conforming to the -// "browser.mobile" semantic conventions. It represents a boolean that is true -// if the browser is running on a mobile device -func BrowserMobile(val bool) attribute.KeyValue { - return BrowserMobileKey.Bool(val) -} - -// BrowserUserAgent returns an attribute KeyValue conforming to the -// "browser.user_agent" semantic conventions. It represents the full user-agent -// string provided by the browser -func BrowserUserAgent(val string) attribute.KeyValue { - return BrowserUserAgentKey.String(val) -} - -// BrowserLanguage returns an attribute KeyValue conforming to the -// "browser.language" semantic conventions. It represents the preferred -// language of the user using the browser -func BrowserLanguage(val string) attribute.KeyValue { - return BrowserLanguageKey.String(val) -} - -// A cloud environment (e.g. GCP, Azure, AWS) -const ( - // CloudProviderKey is the attribute Key conforming to the "cloud.provider" - // semantic conventions. It represents the name of the cloud provider. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - CloudProviderKey = attribute.Key("cloud.provider") - - // CloudAccountIDKey is the attribute Key conforming to the - // "cloud.account.id" semantic conventions. It represents the cloud account - // ID the resource is assigned to. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '111111111111', 'opentelemetry' - CloudAccountIDKey = attribute.Key("cloud.account.id") - - // CloudRegionKey is the attribute Key conforming to the "cloud.region" - // semantic conventions. It represents the geographical region the resource - // is running. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'us-central1', 'us-east-1' - // Note: Refer to your provider's docs to see the available regions, for - // example [Alibaba Cloud - // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS - // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), - // [Azure - // regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), - // [Google Cloud regions](https://cloud.google.com/about/locations), or - // [Tencent Cloud - // regions](https://intl.cloud.tencent.com/document/product/213/6091). - CloudRegionKey = attribute.Key("cloud.region") - - // CloudAvailabilityZoneKey is the attribute Key conforming to the - // "cloud.availability_zone" semantic conventions. It represents the cloud - // regions often have multiple, isolated locations known as zones to - // increase availability. Availability zone represents the zone where the - // resource is running. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'us-east-1c' - // Note: Availability zones are called "zones" on Alibaba Cloud and Google - // Cloud. - CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") - - // CloudPlatformKey is the attribute Key conforming to the "cloud.platform" - // semantic conventions. It represents the cloud platform in use. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Note: The prefix of the service SHOULD match the one specified in - // `cloud.provider`. - CloudPlatformKey = attribute.Key("cloud.platform") -) - -var ( - // Alibaba Cloud - CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") - // Amazon Web Services - CloudProviderAWS = CloudProviderKey.String("aws") - // Microsoft Azure - CloudProviderAzure = CloudProviderKey.String("azure") - // Google Cloud Platform - CloudProviderGCP = CloudProviderKey.String("gcp") - // IBM Cloud - CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud") - // Tencent Cloud - CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") -) - -var ( - // Alibaba Cloud Elastic Compute Service - CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") - // Alibaba Cloud Function Compute - CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") - // Red Hat OpenShift on Alibaba Cloud - CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift") - // AWS Elastic Compute Cloud - CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") - // AWS Elastic Container Service - CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") - // AWS Elastic Kubernetes Service - CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") - // AWS Lambda - CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") - // AWS Elastic Beanstalk - CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") - // AWS App Runner - CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") - // Red Hat OpenShift on AWS (ROSA) - CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift") - // Azure Virtual Machines - CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") - // Azure Container Instances - CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") - // Azure Kubernetes Service - CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") - // Azure Functions - CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") - // Azure App Service - CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") - // Azure Red Hat OpenShift - CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift") - // Google Cloud Compute Engine (GCE) - CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") - // Google Cloud Run - CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") - // Google Cloud Kubernetes Engine (GKE) - CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") - // Google Cloud Functions (GCF) - CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") - // Google Cloud App Engine (GAE) - CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") - // Red Hat OpenShift on Google Cloud - CloudPlatformGoogleCloudOpenshift = CloudPlatformKey.String("google_cloud_openshift") - // Red Hat OpenShift on IBM Cloud - CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift") - // Tencent Cloud Cloud Virtual Machine (CVM) - CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") - // Tencent Cloud Elastic Kubernetes Service (EKS) - CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") - // Tencent Cloud Serverless Cloud Function (SCF) - CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") -) - -// CloudAccountID returns an attribute KeyValue conforming to the -// "cloud.account.id" semantic conventions. It represents the cloud account ID -// the resource is assigned to. -func CloudAccountID(val string) attribute.KeyValue { - return CloudAccountIDKey.String(val) -} - -// CloudRegion returns an attribute KeyValue conforming to the -// "cloud.region" semantic conventions. It represents the geographical region -// the resource is running. -func CloudRegion(val string) attribute.KeyValue { - return CloudRegionKey.String(val) -} - -// CloudAvailabilityZone returns an attribute KeyValue conforming to the -// "cloud.availability_zone" semantic conventions. It represents the cloud -// regions often have multiple, isolated locations known as zones to increase -// availability. Availability zone represents the zone where the resource is -// running. -func CloudAvailabilityZone(val string) attribute.KeyValue { - return CloudAvailabilityZoneKey.String(val) -} - -// Resources used by AWS Elastic Container Service (ECS). -const ( - // AWSECSContainerARNKey is the attribute Key conforming to the - // "aws.ecs.container.arn" semantic conventions. It represents the Amazon - // Resource Name (ARN) of an [ECS container - // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: - // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' - AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") - - // AWSECSClusterARNKey is the attribute Key conforming to the - // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an - // [ECS - // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") - - // AWSECSLaunchtypeKey is the attribute Key conforming to the - // "aws.ecs.launchtype" semantic conventions. It represents the [launch - // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) - // for an ECS task. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") - - // AWSECSTaskARNKey is the attribute Key conforming to the - // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an - // [ECS task - // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: - // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' - AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") - - // AWSECSTaskFamilyKey is the attribute Key conforming to the - // "aws.ecs.task.family" semantic conventions. It represents the task - // definition family this task definition is a member of. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry-family' - AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") - - // AWSECSTaskRevisionKey is the attribute Key conforming to the - // "aws.ecs.task.revision" semantic conventions. It represents the revision - // for this task definition. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '8', '26' - AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") -) - -var ( - // ec2 - AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") - // fargate - AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") -) - -// AWSECSContainerARN returns an attribute KeyValue conforming to the -// "aws.ecs.container.arn" semantic conventions. It represents the Amazon -// Resource Name (ARN) of an [ECS container -// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). -func AWSECSContainerARN(val string) attribute.KeyValue { - return AWSECSContainerARNKey.String(val) -} - -// AWSECSClusterARN returns an attribute KeyValue conforming to the -// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS -// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). -func AWSECSClusterARN(val string) attribute.KeyValue { - return AWSECSClusterARNKey.String(val) -} - -// AWSECSTaskARN returns an attribute KeyValue conforming to the -// "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS -// task -// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). -func AWSECSTaskARN(val string) attribute.KeyValue { - return AWSECSTaskARNKey.String(val) -} - -// AWSECSTaskFamily returns an attribute KeyValue conforming to the -// "aws.ecs.task.family" semantic conventions. It represents the task -// definition family this task definition is a member of. -func AWSECSTaskFamily(val string) attribute.KeyValue { - return AWSECSTaskFamilyKey.String(val) -} - -// AWSECSTaskRevision returns an attribute KeyValue conforming to the -// "aws.ecs.task.revision" semantic conventions. It represents the revision for -// this task definition. -func AWSECSTaskRevision(val string) attribute.KeyValue { - return AWSECSTaskRevisionKey.String(val) -} - -// Resources used by AWS Elastic Kubernetes Service (EKS). -const ( - // AWSEKSClusterARNKey is the attribute Key conforming to the - // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an - // EKS cluster. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") -) - -// AWSEKSClusterARN returns an attribute KeyValue conforming to the -// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS -// cluster. -func AWSEKSClusterARN(val string) attribute.KeyValue { - return AWSEKSClusterARNKey.String(val) -} - -// Resources specific to Amazon Web Services. -const ( - // AWSLogGroupNamesKey is the attribute Key conforming to the - // "aws.log.group.names" semantic conventions. It represents the name(s) of - // the AWS log group(s) an application is writing to. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '/aws/lambda/my-function', 'opentelemetry-service' - // Note: Multiple log groups must be supported for cases like - // multi-container applications, where a single application has sidecar - // containers, and each write to their own log group. - AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") - - // AWSLogGroupARNsKey is the attribute Key conforming to the - // "aws.log.group.arns" semantic conventions. It represents the Amazon - // Resource Name(s) (ARN) of the AWS log group(s). - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: - // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' - // Note: See the [log group ARN format - // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") - - // AWSLogStreamNamesKey is the attribute Key conforming to the - // "aws.log.stream.names" semantic conventions. It represents the name(s) - // of the AWS log stream(s) an application is writing to. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") - - // AWSLogStreamARNsKey is the attribute Key conforming to the - // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of - // the AWS log stream(s). - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: - // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - // Note: See the [log stream ARN format - // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - // One log group can contain several log streams, so these ARNs necessarily - // identify both a log group and a log stream. - AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") -) - -// AWSLogGroupNames returns an attribute KeyValue conforming to the -// "aws.log.group.names" semantic conventions. It represents the name(s) of the -// AWS log group(s) an application is writing to. -func AWSLogGroupNames(val ...string) attribute.KeyValue { - return AWSLogGroupNamesKey.StringSlice(val) -} - -// AWSLogGroupARNs returns an attribute KeyValue conforming to the -// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource -// Name(s) (ARN) of the AWS log group(s). -func AWSLogGroupARNs(val ...string) attribute.KeyValue { - return AWSLogGroupARNsKey.StringSlice(val) -} - -// AWSLogStreamNames returns an attribute KeyValue conforming to the -// "aws.log.stream.names" semantic conventions. It represents the name(s) of -// the AWS log stream(s) an application is writing to. -func AWSLogStreamNames(val ...string) attribute.KeyValue { - return AWSLogStreamNamesKey.StringSlice(val) -} - -// AWSLogStreamARNs returns an attribute KeyValue conforming to the -// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the -// AWS log stream(s). -func AWSLogStreamARNs(val ...string) attribute.KeyValue { - return AWSLogStreamARNsKey.StringSlice(val) -} - -// A container instance. -const ( - // ContainerNameKey is the attribute Key conforming to the "container.name" - // semantic conventions. It represents the container name used by container - // runtime. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry-autoconf' - ContainerNameKey = attribute.Key("container.name") - - // ContainerIDKey is the attribute Key conforming to the "container.id" - // semantic conventions. It represents the container ID. Usually a UUID, as - // for example used to [identify Docker - // containers](https://docs.docker.com/engine/reference/run/#container-identification). - // The UUID might be abbreviated. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'a3bf90e006b2' - ContainerIDKey = attribute.Key("container.id") - - // ContainerRuntimeKey is the attribute Key conforming to the - // "container.runtime" semantic conventions. It represents the container - // runtime managing this container. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'docker', 'containerd', 'rkt' - ContainerRuntimeKey = attribute.Key("container.runtime") - - // ContainerImageNameKey is the attribute Key conforming to the - // "container.image.name" semantic conventions. It represents the name of - // the image the container was built on. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'gcr.io/opentelemetry/operator' - ContainerImageNameKey = attribute.Key("container.image.name") - - // ContainerImageTagKey is the attribute Key conforming to the - // "container.image.tag" semantic conventions. It represents the container - // image tag. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '0.1' - ContainerImageTagKey = attribute.Key("container.image.tag") -) - -// ContainerName returns an attribute KeyValue conforming to the -// "container.name" semantic conventions. It represents the container name used -// by container runtime. -func ContainerName(val string) attribute.KeyValue { - return ContainerNameKey.String(val) -} - -// ContainerID returns an attribute KeyValue conforming to the -// "container.id" semantic conventions. It represents the container ID. Usually -// a UUID, as for example used to [identify Docker -// containers](https://docs.docker.com/engine/reference/run/#container-identification). -// The UUID might be abbreviated. -func ContainerID(val string) attribute.KeyValue { - return ContainerIDKey.String(val) -} - -// ContainerRuntime returns an attribute KeyValue conforming to the -// "container.runtime" semantic conventions. It represents the container -// runtime managing this container. -func ContainerRuntime(val string) attribute.KeyValue { - return ContainerRuntimeKey.String(val) -} - -// ContainerImageName returns an attribute KeyValue conforming to the -// "container.image.name" semantic conventions. It represents the name of the -// image the container was built on. -func ContainerImageName(val string) attribute.KeyValue { - return ContainerImageNameKey.String(val) -} - -// ContainerImageTag returns an attribute KeyValue conforming to the -// "container.image.tag" semantic conventions. It represents the container -// image tag. -func ContainerImageTag(val string) attribute.KeyValue { - return ContainerImageTagKey.String(val) -} - -// The software deployment. -const ( - // DeploymentEnvironmentKey is the attribute Key conforming to the - // "deployment.environment" semantic conventions. It represents the name of - // the [deployment - // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka - // deployment tier). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'staging', 'production' - DeploymentEnvironmentKey = attribute.Key("deployment.environment") -) - -// DeploymentEnvironment returns an attribute KeyValue conforming to the -// "deployment.environment" semantic conventions. It represents the name of the -// [deployment -// environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka -// deployment tier). -func DeploymentEnvironment(val string) attribute.KeyValue { - return DeploymentEnvironmentKey.String(val) -} - -// The device on which the process represented by this resource is running. -const ( - // DeviceIDKey is the attribute Key conforming to the "device.id" semantic - // conventions. It represents a unique identifier representing the device - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' - // Note: The device identifier MUST only be defined using the values - // outlined below. This value is not an advertising identifier and MUST NOT - // be used as such. On iOS (Swift or Objective-C), this value MUST be equal - // to the [vendor - // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). - // On Android (Java or Kotlin), this value MUST be equal to the Firebase - // Installation ID or a globally unique UUID which is persisted across - // sessions in your application. More information can be found - // [here](https://developer.android.com/training/articles/user-data-ids) on - // best practices and exact implementation details. Caution should be taken - // when storing personal data or anything which can identify a user. GDPR - // and data protection laws may apply, ensure you do your own due - // diligence. - DeviceIDKey = attribute.Key("device.id") - - // DeviceModelIdentifierKey is the attribute Key conforming to the - // "device.model.identifier" semantic conventions. It represents the model - // identifier for the device - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'iPhone3,4', 'SM-G920F' - // Note: It's recommended this value represents a machine readable version - // of the model identifier rather than the market or consumer-friendly name - // of the device. - DeviceModelIdentifierKey = attribute.Key("device.model.identifier") - - // DeviceModelNameKey is the attribute Key conforming to the - // "device.model.name" semantic conventions. It represents the marketing - // name for the device model - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' - // Note: It's recommended this value represents a human readable version of - // the device model rather than a machine readable alternative. - DeviceModelNameKey = attribute.Key("device.model.name") - - // DeviceManufacturerKey is the attribute Key conforming to the - // "device.manufacturer" semantic conventions. It represents the name of - // the device manufacturer - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Apple', 'Samsung' - // Note: The Android OS provides this field via - // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). - // iOS apps SHOULD hardcode the value `Apple`. - DeviceManufacturerKey = attribute.Key("device.manufacturer") -) - -// DeviceID returns an attribute KeyValue conforming to the "device.id" -// semantic conventions. It represents a unique identifier representing the -// device -func DeviceID(val string) attribute.KeyValue { - return DeviceIDKey.String(val) -} - -// DeviceModelIdentifier returns an attribute KeyValue conforming to the -// "device.model.identifier" semantic conventions. It represents the model -// identifier for the device -func DeviceModelIdentifier(val string) attribute.KeyValue { - return DeviceModelIdentifierKey.String(val) -} - -// DeviceModelName returns an attribute KeyValue conforming to the -// "device.model.name" semantic conventions. It represents the marketing name -// for the device model -func DeviceModelName(val string) attribute.KeyValue { - return DeviceModelNameKey.String(val) -} - -// DeviceManufacturer returns an attribute KeyValue conforming to the -// "device.manufacturer" semantic conventions. It represents the name of the -// device manufacturer -func DeviceManufacturer(val string) attribute.KeyValue { - return DeviceManufacturerKey.String(val) -} - -// A serverless instance. -const ( - // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic - // conventions. It represents the name of the single function that this - // runtime instance executes. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'my-function', 'myazurefunctionapp/some-function-name' - // Note: This is the name of the function as configured/deployed on the - // FaaS - // platform and is usually different from the name of the callback - // function (which may be stored in the - // [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) - // span attributes). - // - // For some cloud providers, the above definition is ambiguous. The - // following - // definition of function name MUST be used for this attribute - // (and consequently the span name) for the listed cloud - // providers/products: - // - // * **Azure:** The full name `/`, i.e., function app name - // followed by a forward slash followed by the function name (this form - // can also be seen in the resource JSON for the function). - // This means that a span attribute MUST be used, as an Azure function - // app can host multiple functions that would usually share - // a TracerProvider (see also the `faas.id` attribute). - FaaSNameKey = attribute.Key("faas.name") - - // FaaSIDKey is the attribute Key conforming to the "faas.id" semantic - // conventions. It represents the unique ID of the single function that - // this runtime instance executes. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'arn:aws:lambda:us-west-2:123456789012:function:my-function' - // Note: On some cloud providers, it may not be possible to determine the - // full ID at startup, - // so consider setting `faas.id` as a span attribute instead. - // - // The exact value to use for `faas.id` depends on the cloud provider: - // - // * **AWS Lambda:** The function - // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // Take care not to use the "invoked ARN" directly but replace any - // [alias - // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) - // with the resolved function version, as the same runtime instance may - // be invokable with - // multiple different aliases. - // * **GCP:** The [URI of the - // resource](https://cloud.google.com/iam/docs/full-resource-names) - // * **Azure:** The [Fully Qualified Resource - // ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) - // of the invoked function, - // *not* the function app, having the form - // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. - // This means that a span attribute MUST be used, as an Azure function - // app can host multiple functions that would usually share - // a TracerProvider. - FaaSIDKey = attribute.Key("faas.id") - - // FaaSVersionKey is the attribute Key conforming to the "faas.version" - // semantic conventions. It represents the immutable version of the - // function being executed. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '26', 'pinkfroid-00002' - // Note: Depending on the cloud provider and platform, use: - // - // * **AWS Lambda:** The [function - // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - // (an integer represented as a decimal string). - // * **Google Cloud Run:** The - // [revision](https://cloud.google.com/run/docs/managing/revisions) - // (i.e., the function name plus the revision suffix). - // * **Google Cloud Functions:** The value of the - // [`K_REVISION` environment - // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - // * **Azure Functions:** Not applicable. Do not set this attribute. - FaaSVersionKey = attribute.Key("faas.version") - - // FaaSInstanceKey is the attribute Key conforming to the "faas.instance" - // semantic conventions. It represents the execution environment ID as a - // string, that will be potentially reused for other invocations to the - // same function/function version. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' - // Note: * **AWS Lambda:** Use the (full) log stream name. - FaaSInstanceKey = attribute.Key("faas.instance") - - // FaaSMaxMemoryKey is the attribute Key conforming to the - // "faas.max_memory" semantic conventions. It represents the amount of - // memory available to the serverless function in MiB. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 128 - // Note: It's recommended to set this attribute since e.g. too little - // memory can easily stop a Java AWS Lambda function from working - // correctly. On AWS Lambda, the environment variable - // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. - FaaSMaxMemoryKey = attribute.Key("faas.max_memory") -) - -// FaaSName returns an attribute KeyValue conforming to the "faas.name" -// semantic conventions. It represents the name of the single function that -// this runtime instance executes. -func FaaSName(val string) attribute.KeyValue { - return FaaSNameKey.String(val) -} - -// FaaSID returns an attribute KeyValue conforming to the "faas.id" semantic -// conventions. It represents the unique ID of the single function that this -// runtime instance executes. -func FaaSID(val string) attribute.KeyValue { - return FaaSIDKey.String(val) -} - -// FaaSVersion returns an attribute KeyValue conforming to the -// "faas.version" semantic conventions. It represents the immutable version of -// the function being executed. -func FaaSVersion(val string) attribute.KeyValue { - return FaaSVersionKey.String(val) -} - -// FaaSInstance returns an attribute KeyValue conforming to the -// "faas.instance" semantic conventions. It represents the execution -// environment ID as a string, that will be potentially reused for other -// invocations to the same function/function version. -func FaaSInstance(val string) attribute.KeyValue { - return FaaSInstanceKey.String(val) -} - -// FaaSMaxMemory returns an attribute KeyValue conforming to the -// "faas.max_memory" semantic conventions. It represents the amount of memory -// available to the serverless function in MiB. -func FaaSMaxMemory(val int) attribute.KeyValue { - return FaaSMaxMemoryKey.Int(val) -} - -// A host is defined as a general computing instance. -const ( - // HostIDKey is the attribute Key conforming to the "host.id" semantic - // conventions. It represents the unique host ID. For Cloud, this must be - // the instance_id assigned by the cloud provider. For non-containerized - // Linux systems, the `machine-id` located in `/etc/machine-id` or - // `/var/lib/dbus/machine-id` may be used. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'fdbf79e8af94cb7f9e8df36789187052' - HostIDKey = attribute.Key("host.id") - - // HostNameKey is the attribute Key conforming to the "host.name" semantic - // conventions. It represents the name of the host. On Unix systems, it may - // contain what the hostname command returns, or the fully qualified - // hostname, or another name specified by the user. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry-test' - HostNameKey = attribute.Key("host.name") - - // HostTypeKey is the attribute Key conforming to the "host.type" semantic - // conventions. It represents the type of host. For Cloud, this must be the - // machine type. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'n1-standard-1' - HostTypeKey = attribute.Key("host.type") - - // HostArchKey is the attribute Key conforming to the "host.arch" semantic - // conventions. It represents the CPU architecture the host system is - // running on. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - HostArchKey = attribute.Key("host.arch") - - // HostImageNameKey is the attribute Key conforming to the - // "host.image.name" semantic conventions. It represents the name of the VM - // image or OS install the host was instantiated from. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' - HostImageNameKey = attribute.Key("host.image.name") - - // HostImageIDKey is the attribute Key conforming to the "host.image.id" - // semantic conventions. It represents the vM image ID. For Cloud, this - // value is from the provider. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'ami-07b06b442921831e5' - HostImageIDKey = attribute.Key("host.image.id") - - // HostImageVersionKey is the attribute Key conforming to the - // "host.image.version" semantic conventions. It represents the version - // string of the VM image as defined in [Version - // Attributes](README.md#version-attributes). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '0.1' - HostImageVersionKey = attribute.Key("host.image.version") -) - -var ( - // AMD64 - HostArchAMD64 = HostArchKey.String("amd64") - // ARM32 - HostArchARM32 = HostArchKey.String("arm32") - // ARM64 - HostArchARM64 = HostArchKey.String("arm64") - // Itanium - HostArchIA64 = HostArchKey.String("ia64") - // 32-bit PowerPC - HostArchPPC32 = HostArchKey.String("ppc32") - // 64-bit PowerPC - HostArchPPC64 = HostArchKey.String("ppc64") - // IBM z/Architecture - HostArchS390x = HostArchKey.String("s390x") - // 32-bit x86 - HostArchX86 = HostArchKey.String("x86") -) - -// HostID returns an attribute KeyValue conforming to the "host.id" semantic -// conventions. It represents the unique host ID. For Cloud, this must be the -// instance_id assigned by the cloud provider. For non-containerized Linux -// systems, the `machine-id` located in `/etc/machine-id` or -// `/var/lib/dbus/machine-id` may be used. -func HostID(val string) attribute.KeyValue { - return HostIDKey.String(val) -} - -// HostName returns an attribute KeyValue conforming to the "host.name" -// semantic conventions. It represents the name of the host. On Unix systems, -// it may contain what the hostname command returns, or the fully qualified -// hostname, or another name specified by the user. -func HostName(val string) attribute.KeyValue { - return HostNameKey.String(val) -} - -// HostType returns an attribute KeyValue conforming to the "host.type" -// semantic conventions. It represents the type of host. For Cloud, this must -// be the machine type. -func HostType(val string) attribute.KeyValue { - return HostTypeKey.String(val) -} - -// HostImageName returns an attribute KeyValue conforming to the -// "host.image.name" semantic conventions. It represents the name of the VM -// image or OS install the host was instantiated from. -func HostImageName(val string) attribute.KeyValue { - return HostImageNameKey.String(val) -} - -// HostImageID returns an attribute KeyValue conforming to the -// "host.image.id" semantic conventions. It represents the vM image ID. For -// Cloud, this value is from the provider. -func HostImageID(val string) attribute.KeyValue { - return HostImageIDKey.String(val) -} - -// HostImageVersion returns an attribute KeyValue conforming to the -// "host.image.version" semantic conventions. It represents the version string -// of the VM image as defined in [Version -// Attributes](README.md#version-attributes). -func HostImageVersion(val string) attribute.KeyValue { - return HostImageVersionKey.String(val) -} - -// A Kubernetes Cluster. -const ( - // K8SClusterNameKey is the attribute Key conforming to the - // "k8s.cluster.name" semantic conventions. It represents the name of the - // cluster. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry-cluster' - K8SClusterNameKey = attribute.Key("k8s.cluster.name") -) - -// K8SClusterName returns an attribute KeyValue conforming to the -// "k8s.cluster.name" semantic conventions. It represents the name of the -// cluster. -func K8SClusterName(val string) attribute.KeyValue { - return K8SClusterNameKey.String(val) -} - -// A Kubernetes Node object. -const ( - // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" - // semantic conventions. It represents the name of the Node. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'node-1' - K8SNodeNameKey = attribute.Key("k8s.node.name") - - // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" - // semantic conventions. It represents the UID of the Node. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' - K8SNodeUIDKey = attribute.Key("k8s.node.uid") -) - -// K8SNodeName returns an attribute KeyValue conforming to the -// "k8s.node.name" semantic conventions. It represents the name of the Node. -func K8SNodeName(val string) attribute.KeyValue { - return K8SNodeNameKey.String(val) -} - -// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid" -// semantic conventions. It represents the UID of the Node. -func K8SNodeUID(val string) attribute.KeyValue { - return K8SNodeUIDKey.String(val) -} - -// A Kubernetes Namespace. -const ( - // K8SNamespaceNameKey is the attribute Key conforming to the - // "k8s.namespace.name" semantic conventions. It represents the name of the - // namespace that the pod is running in. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'default' - K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") -) - -// K8SNamespaceName returns an attribute KeyValue conforming to the -// "k8s.namespace.name" semantic conventions. It represents the name of the -// namespace that the pod is running in. -func K8SNamespaceName(val string) attribute.KeyValue { - return K8SNamespaceNameKey.String(val) -} - -// A Kubernetes Pod object. -const ( - // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" - // semantic conventions. It represents the UID of the Pod. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SPodUIDKey = attribute.Key("k8s.pod.uid") - - // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" - // semantic conventions. It represents the name of the Pod. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry-pod-autoconf' - K8SPodNameKey = attribute.Key("k8s.pod.name") -) - -// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid" -// semantic conventions. It represents the UID of the Pod. -func K8SPodUID(val string) attribute.KeyValue { - return K8SPodUIDKey.String(val) -} - -// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" -// semantic conventions. It represents the name of the Pod. -func K8SPodName(val string) attribute.KeyValue { - return K8SPodNameKey.String(val) -} - -// A container in a -// [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). -const ( - // K8SContainerNameKey is the attribute Key conforming to the - // "k8s.container.name" semantic conventions. It represents the name of the - // Container from Pod specification, must be unique within a Pod. Container - // runtime usually uses different globally unique name (`container.name`). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'redis' - K8SContainerNameKey = attribute.Key("k8s.container.name") - - // K8SContainerRestartCountKey is the attribute Key conforming to the - // "k8s.container.restart_count" semantic conventions. It represents the - // number of times the container was restarted. This attribute can be used - // to identify a particular container (running or stopped) within a - // container spec. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 0, 2 - K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") -) - -// K8SContainerName returns an attribute KeyValue conforming to the -// "k8s.container.name" semantic conventions. It represents the name of the -// Container from Pod specification, must be unique within a Pod. Container -// runtime usually uses different globally unique name (`container.name`). -func K8SContainerName(val string) attribute.KeyValue { - return K8SContainerNameKey.String(val) -} - -// K8SContainerRestartCount returns an attribute KeyValue conforming to the -// "k8s.container.restart_count" semantic conventions. It represents the number -// of times the container was restarted. This attribute can be used to identify -// a particular container (running or stopped) within a container spec. -func K8SContainerRestartCount(val int) attribute.KeyValue { - return K8SContainerRestartCountKey.Int(val) -} - -// A Kubernetes ReplicaSet object. -const ( - // K8SReplicaSetUIDKey is the attribute Key conforming to the - // "k8s.replicaset.uid" semantic conventions. It represents the UID of the - // ReplicaSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") - - // K8SReplicaSetNameKey is the attribute Key conforming to the - // "k8s.replicaset.name" semantic conventions. It represents the name of - // the ReplicaSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") -) - -// K8SReplicaSetUID returns an attribute KeyValue conforming to the -// "k8s.replicaset.uid" semantic conventions. It represents the UID of the -// ReplicaSet. -func K8SReplicaSetUID(val string) attribute.KeyValue { - return K8SReplicaSetUIDKey.String(val) -} - -// K8SReplicaSetName returns an attribute KeyValue conforming to the -// "k8s.replicaset.name" semantic conventions. It represents the name of the -// ReplicaSet. -func K8SReplicaSetName(val string) attribute.KeyValue { - return K8SReplicaSetNameKey.String(val) -} - -// A Kubernetes Deployment object. -const ( - // K8SDeploymentUIDKey is the attribute Key conforming to the - // "k8s.deployment.uid" semantic conventions. It represents the UID of the - // Deployment. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") - - // K8SDeploymentNameKey is the attribute Key conforming to the - // "k8s.deployment.name" semantic conventions. It represents the name of - // the Deployment. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") -) - -// K8SDeploymentUID returns an attribute KeyValue conforming to the -// "k8s.deployment.uid" semantic conventions. It represents the UID of the -// Deployment. -func K8SDeploymentUID(val string) attribute.KeyValue { - return K8SDeploymentUIDKey.String(val) -} - -// K8SDeploymentName returns an attribute KeyValue conforming to the -// "k8s.deployment.name" semantic conventions. It represents the name of the -// Deployment. -func K8SDeploymentName(val string) attribute.KeyValue { - return K8SDeploymentNameKey.String(val) -} - -// A Kubernetes StatefulSet object. -const ( - // K8SStatefulSetUIDKey is the attribute Key conforming to the - // "k8s.statefulset.uid" semantic conventions. It represents the UID of the - // StatefulSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") - - // K8SStatefulSetNameKey is the attribute Key conforming to the - // "k8s.statefulset.name" semantic conventions. It represents the name of - // the StatefulSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") -) - -// K8SStatefulSetUID returns an attribute KeyValue conforming to the -// "k8s.statefulset.uid" semantic conventions. It represents the UID of the -// StatefulSet. -func K8SStatefulSetUID(val string) attribute.KeyValue { - return K8SStatefulSetUIDKey.String(val) -} - -// K8SStatefulSetName returns an attribute KeyValue conforming to the -// "k8s.statefulset.name" semantic conventions. It represents the name of the -// StatefulSet. -func K8SStatefulSetName(val string) attribute.KeyValue { - return K8SStatefulSetNameKey.String(val) -} - -// A Kubernetes DaemonSet object. -const ( - // K8SDaemonSetUIDKey is the attribute Key conforming to the - // "k8s.daemonset.uid" semantic conventions. It represents the UID of the - // DaemonSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") - - // K8SDaemonSetNameKey is the attribute Key conforming to the - // "k8s.daemonset.name" semantic conventions. It represents the name of the - // DaemonSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") -) - -// K8SDaemonSetUID returns an attribute KeyValue conforming to the -// "k8s.daemonset.uid" semantic conventions. It represents the UID of the -// DaemonSet. -func K8SDaemonSetUID(val string) attribute.KeyValue { - return K8SDaemonSetUIDKey.String(val) -} - -// K8SDaemonSetName returns an attribute KeyValue conforming to the -// "k8s.daemonset.name" semantic conventions. It represents the name of the -// DaemonSet. -func K8SDaemonSetName(val string) attribute.KeyValue { - return K8SDaemonSetNameKey.String(val) -} - -// A Kubernetes Job object. -const ( - // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" - // semantic conventions. It represents the UID of the Job. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SJobUIDKey = attribute.Key("k8s.job.uid") - - // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" - // semantic conventions. It represents the name of the Job. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SJobNameKey = attribute.Key("k8s.job.name") -) - -// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid" -// semantic conventions. It represents the UID of the Job. -func K8SJobUID(val string) attribute.KeyValue { - return K8SJobUIDKey.String(val) -} - -// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" -// semantic conventions. It represents the name of the Job. -func K8SJobName(val string) attribute.KeyValue { - return K8SJobNameKey.String(val) -} - -// A Kubernetes CronJob object. -const ( - // K8SCronJobUIDKey is the attribute Key conforming to the - // "k8s.cronjob.uid" semantic conventions. It represents the UID of the - // CronJob. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") - - // K8SCronJobNameKey is the attribute Key conforming to the - // "k8s.cronjob.name" semantic conventions. It represents the name of the - // CronJob. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") -) - -// K8SCronJobUID returns an attribute KeyValue conforming to the -// "k8s.cronjob.uid" semantic conventions. It represents the UID of the -// CronJob. -func K8SCronJobUID(val string) attribute.KeyValue { - return K8SCronJobUIDKey.String(val) -} - -// K8SCronJobName returns an attribute KeyValue conforming to the -// "k8s.cronjob.name" semantic conventions. It represents the name of the -// CronJob. -func K8SCronJobName(val string) attribute.KeyValue { - return K8SCronJobNameKey.String(val) -} - -// The operating system (OS) on which the process represented by this resource -// is running. -const ( - // OSTypeKey is the attribute Key conforming to the "os.type" semantic - // conventions. It represents the operating system type. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - OSTypeKey = attribute.Key("os.type") - - // OSDescriptionKey is the attribute Key conforming to the "os.description" - // semantic conventions. It represents the human readable (not intended to - // be parsed) OS version information, like e.g. reported by `ver` or - // `lsb_release -a` commands. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 - // LTS' - OSDescriptionKey = attribute.Key("os.description") - - // OSNameKey is the attribute Key conforming to the "os.name" semantic - // conventions. It represents the human readable operating system name. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'iOS', 'Android', 'Ubuntu' - OSNameKey = attribute.Key("os.name") - - // OSVersionKey is the attribute Key conforming to the "os.version" - // semantic conventions. It represents the version string of the operating - // system as defined in [Version - // Attributes](../../resource/semantic_conventions/README.md#version-attributes). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '14.2.1', '18.04.1' - OSVersionKey = attribute.Key("os.version") -) - -var ( - // Microsoft Windows - OSTypeWindows = OSTypeKey.String("windows") - // Linux - OSTypeLinux = OSTypeKey.String("linux") - // Apple Darwin - OSTypeDarwin = OSTypeKey.String("darwin") - // FreeBSD - OSTypeFreeBSD = OSTypeKey.String("freebsd") - // NetBSD - OSTypeNetBSD = OSTypeKey.String("netbsd") - // OpenBSD - OSTypeOpenBSD = OSTypeKey.String("openbsd") - // DragonFly BSD - OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") - // HP-UX (Hewlett Packard Unix) - OSTypeHPUX = OSTypeKey.String("hpux") - // AIX (Advanced Interactive eXecutive) - OSTypeAIX = OSTypeKey.String("aix") - // SunOS, Oracle Solaris - OSTypeSolaris = OSTypeKey.String("solaris") - // IBM z/OS - OSTypeZOS = OSTypeKey.String("z_os") -) - -// OSDescription returns an attribute KeyValue conforming to the -// "os.description" semantic conventions. It represents the human readable (not -// intended to be parsed) OS version information, like e.g. reported by `ver` -// or `lsb_release -a` commands. -func OSDescription(val string) attribute.KeyValue { - return OSDescriptionKey.String(val) -} - -// OSName returns an attribute KeyValue conforming to the "os.name" semantic -// conventions. It represents the human readable operating system name. -func OSName(val string) attribute.KeyValue { - return OSNameKey.String(val) -} - -// OSVersion returns an attribute KeyValue conforming to the "os.version" -// semantic conventions. It represents the version string of the operating -// system as defined in [Version -// Attributes](../../resource/semantic_conventions/README.md#version-attributes). -func OSVersion(val string) attribute.KeyValue { - return OSVersionKey.String(val) -} - -// An operating system process. -const ( - // ProcessPIDKey is the attribute Key conforming to the "process.pid" - // semantic conventions. It represents the process identifier (PID). - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 1234 - ProcessPIDKey = attribute.Key("process.pid") - - // ProcessParentPIDKey is the attribute Key conforming to the - // "process.parent_pid" semantic conventions. It represents the parent - // Process identifier (PID). - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 111 - ProcessParentPIDKey = attribute.Key("process.parent_pid") - - // ProcessExecutableNameKey is the attribute Key conforming to the - // "process.executable.name" semantic conventions. It represents the name - // of the process executable. On Linux based systems, can be set to the - // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name - // of `GetProcessImageFileNameW`. - // - // Type: string - // RequirementLevel: ConditionallyRequired (See alternative attributes - // below.) - // Stability: stable - // Examples: 'otelcol' - ProcessExecutableNameKey = attribute.Key("process.executable.name") - - // ProcessExecutablePathKey is the attribute Key conforming to the - // "process.executable.path" semantic conventions. It represents the full - // path to the process executable. On Linux based systems, can be set to - // the target of `proc/[pid]/exe`. On Windows, can be set to the result of - // `GetProcessImageFileNameW`. - // - // Type: string - // RequirementLevel: ConditionallyRequired (See alternative attributes - // below.) - // Stability: stable - // Examples: '/usr/bin/cmd/otelcol' - ProcessExecutablePathKey = attribute.Key("process.executable.path") - - // ProcessCommandKey is the attribute Key conforming to the - // "process.command" semantic conventions. It represents the command used - // to launch the process (i.e. the command name). On Linux based systems, - // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can - // be set to the first parameter extracted from `GetCommandLineW`. - // - // Type: string - // RequirementLevel: ConditionallyRequired (See alternative attributes - // below.) - // Stability: stable - // Examples: 'cmd/otelcol' - ProcessCommandKey = attribute.Key("process.command") - - // ProcessCommandLineKey is the attribute Key conforming to the - // "process.command_line" semantic conventions. It represents the full - // command used to launch the process as a single string representing the - // full command. On Windows, can be set to the result of `GetCommandLineW`. - // Do not set this if you have to assemble it just for monitoring; use - // `process.command_args` instead. - // - // Type: string - // RequirementLevel: ConditionallyRequired (See alternative attributes - // below.) - // Stability: stable - // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' - ProcessCommandLineKey = attribute.Key("process.command_line") - - // ProcessCommandArgsKey is the attribute Key conforming to the - // "process.command_args" semantic conventions. It represents the all the - // command arguments (including the command/executable itself) as received - // by the process. On Linux-based systems (and some other Unixoid systems - // supporting procfs), can be set according to the list of null-delimited - // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, - // this would be the full argv vector passed to `main`. - // - // Type: string[] - // RequirementLevel: ConditionallyRequired (See alternative attributes - // below.) - // Stability: stable - // Examples: 'cmd/otecol', '--config=config.yaml' - ProcessCommandArgsKey = attribute.Key("process.command_args") - - // ProcessOwnerKey is the attribute Key conforming to the "process.owner" - // semantic conventions. It represents the username of the user that owns - // the process. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'root' - ProcessOwnerKey = attribute.Key("process.owner") -) - -// ProcessPID returns an attribute KeyValue conforming to the "process.pid" -// semantic conventions. It represents the process identifier (PID). -func ProcessPID(val int) attribute.KeyValue { - return ProcessPIDKey.Int(val) -} - -// ProcessParentPID returns an attribute KeyValue conforming to the -// "process.parent_pid" semantic conventions. It represents the parent Process -// identifier (PID). -func ProcessParentPID(val int) attribute.KeyValue { - return ProcessParentPIDKey.Int(val) -} - -// ProcessExecutableName returns an attribute KeyValue conforming to the -// "process.executable.name" semantic conventions. It represents the name of -// the process executable. On Linux based systems, can be set to the `Name` in -// `proc/[pid]/status`. On Windows, can be set to the base name of -// `GetProcessImageFileNameW`. -func ProcessExecutableName(val string) attribute.KeyValue { - return ProcessExecutableNameKey.String(val) -} - -// ProcessExecutablePath returns an attribute KeyValue conforming to the -// "process.executable.path" semantic conventions. It represents the full path -// to the process executable. On Linux based systems, can be set to the target -// of `proc/[pid]/exe`. On Windows, can be set to the result of -// `GetProcessImageFileNameW`. -func ProcessExecutablePath(val string) attribute.KeyValue { - return ProcessExecutablePathKey.String(val) -} - -// ProcessCommand returns an attribute KeyValue conforming to the -// "process.command" semantic conventions. It represents the command used to -// launch the process (i.e. the command name). On Linux based systems, can be -// set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to -// the first parameter extracted from `GetCommandLineW`. -func ProcessCommand(val string) attribute.KeyValue { - return ProcessCommandKey.String(val) -} - -// ProcessCommandLine returns an attribute KeyValue conforming to the -// "process.command_line" semantic conventions. It represents the full command -// used to launch the process as a single string representing the full command. -// On Windows, can be set to the result of `GetCommandLineW`. Do not set this -// if you have to assemble it just for monitoring; use `process.command_args` -// instead. -func ProcessCommandLine(val string) attribute.KeyValue { - return ProcessCommandLineKey.String(val) -} - -// ProcessCommandArgs returns an attribute KeyValue conforming to the -// "process.command_args" semantic conventions. It represents the all the -// command arguments (including the command/executable itself) as received by -// the process. On Linux-based systems (and some other Unixoid systems -// supporting procfs), can be set according to the list of null-delimited -// strings extracted from `proc/[pid]/cmdline`. For libc-based executables, -// this would be the full argv vector passed to `main`. -func ProcessCommandArgs(val ...string) attribute.KeyValue { - return ProcessCommandArgsKey.StringSlice(val) -} - -// ProcessOwner returns an attribute KeyValue conforming to the -// "process.owner" semantic conventions. It represents the username of the user -// that owns the process. -func ProcessOwner(val string) attribute.KeyValue { - return ProcessOwnerKey.String(val) -} - -// The single (language) runtime instance which is monitored. -const ( - // ProcessRuntimeNameKey is the attribute Key conforming to the - // "process.runtime.name" semantic conventions. It represents the name of - // the runtime of this process. For compiled native binaries, this SHOULD - // be the name of the compiler. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'OpenJDK Runtime Environment' - ProcessRuntimeNameKey = attribute.Key("process.runtime.name") - - // ProcessRuntimeVersionKey is the attribute Key conforming to the - // "process.runtime.version" semantic conventions. It represents the - // version of the runtime of this process, as returned by the runtime - // without modification. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '14.0.2' - ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") - - // ProcessRuntimeDescriptionKey is the attribute Key conforming to the - // "process.runtime.description" semantic conventions. It represents an - // additional description about the runtime of the process, for example a - // specific vendor customization of the runtime environment. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' - ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") -) - -// ProcessRuntimeName returns an attribute KeyValue conforming to the -// "process.runtime.name" semantic conventions. It represents the name of the -// runtime of this process. For compiled native binaries, this SHOULD be the -// name of the compiler. -func ProcessRuntimeName(val string) attribute.KeyValue { - return ProcessRuntimeNameKey.String(val) -} - -// ProcessRuntimeVersion returns an attribute KeyValue conforming to the -// "process.runtime.version" semantic conventions. It represents the version of -// the runtime of this process, as returned by the runtime without -// modification. -func ProcessRuntimeVersion(val string) attribute.KeyValue { - return ProcessRuntimeVersionKey.String(val) -} - -// ProcessRuntimeDescription returns an attribute KeyValue conforming to the -// "process.runtime.description" semantic conventions. It represents an -// additional description about the runtime of the process, for example a -// specific vendor customization of the runtime environment. -func ProcessRuntimeDescription(val string) attribute.KeyValue { - return ProcessRuntimeDescriptionKey.String(val) -} - -// A service instance. -const ( - // ServiceNameKey is the attribute Key conforming to the "service.name" - // semantic conventions. It represents the logical name of the service. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'shoppingcart' - // Note: MUST be the same for all instances of horizontally scaled - // services. If the value was not specified, SDKs MUST fallback to - // `unknown_service:` concatenated with - // [`process.executable.name`](process.md#process), e.g. - // `unknown_service:bash`. If `process.executable.name` is not available, - // the value MUST be set to `unknown_service`. - ServiceNameKey = attribute.Key("service.name") - - // ServiceNamespaceKey is the attribute Key conforming to the - // "service.namespace" semantic conventions. It represents a namespace for - // `service.name`. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Shop' - // Note: A string value having a meaning that helps to distinguish a group - // of services, for example the team name that owns a group of services. - // `service.name` is expected to be unique within the same namespace. If - // `service.namespace` is not specified in the Resource then `service.name` - // is expected to be unique for all services that have no explicit - // namespace defined (so the empty/unspecified namespace is simply one more - // valid namespace). Zero-length namespace string is assumed equal to - // unspecified namespace. - ServiceNamespaceKey = attribute.Key("service.namespace") - - // ServiceInstanceIDKey is the attribute Key conforming to the - // "service.instance.id" semantic conventions. It represents the string ID - // of the service instance. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '627cc493-f310-47de-96bd-71410b7dec09' - // Note: MUST be unique for each instance of the same - // `service.namespace,service.name` pair (in other words - // `service.namespace,service.name,service.instance.id` triplet MUST be - // globally unique). The ID helps to distinguish instances of the same - // service that exist at the same time (e.g. instances of a horizontally - // scaled service). It is preferable for the ID to be persistent and stay - // the same for the lifetime of the service instance, however it is - // acceptable that the ID is ephemeral and changes during important - // lifetime events for the service (e.g. service restarts). If the service - // has no inherent unique ID that can be used as the value of this - // attribute it is recommended to generate a random Version 1 or Version 4 - // RFC 4122 UUID (services aiming for reproducible UUIDs may also use - // Version 5, see RFC 4122 for more recommendations). - ServiceInstanceIDKey = attribute.Key("service.instance.id") - - // ServiceVersionKey is the attribute Key conforming to the - // "service.version" semantic conventions. It represents the version string - // of the service API or implementation. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2.0.0' - ServiceVersionKey = attribute.Key("service.version") -) - -// ServiceName returns an attribute KeyValue conforming to the -// "service.name" semantic conventions. It represents the logical name of the -// service. -func ServiceName(val string) attribute.KeyValue { - return ServiceNameKey.String(val) -} - -// ServiceNamespace returns an attribute KeyValue conforming to the -// "service.namespace" semantic conventions. It represents a namespace for -// `service.name`. -func ServiceNamespace(val string) attribute.KeyValue { - return ServiceNamespaceKey.String(val) -} - -// ServiceInstanceID returns an attribute KeyValue conforming to the -// "service.instance.id" semantic conventions. It represents the string ID of -// the service instance. -func ServiceInstanceID(val string) attribute.KeyValue { - return ServiceInstanceIDKey.String(val) -} - -// ServiceVersion returns an attribute KeyValue conforming to the -// "service.version" semantic conventions. It represents the version string of -// the service API or implementation. -func ServiceVersion(val string) attribute.KeyValue { - return ServiceVersionKey.String(val) -} - -// The telemetry SDK used to capture data recorded by the instrumentation -// libraries. -const ( - // TelemetrySDKNameKey is the attribute Key conforming to the - // "telemetry.sdk.name" semantic conventions. It represents the name of the - // telemetry SDK as defined above. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") - - // TelemetrySDKLanguageKey is the attribute Key conforming to the - // "telemetry.sdk.language" semantic conventions. It represents the - // language of the telemetry SDK. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") - - // TelemetrySDKVersionKey is the attribute Key conforming to the - // "telemetry.sdk.version" semantic conventions. It represents the version - // string of the telemetry SDK. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '1.2.3' - TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") - - // TelemetryAutoVersionKey is the attribute Key conforming to the - // "telemetry.auto.version" semantic conventions. It represents the version - // string of the auto instrumentation agent, if used. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '1.2.3' - TelemetryAutoVersionKey = attribute.Key("telemetry.auto.version") -) - -var ( - // cpp - TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") - // dotnet - TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") - // erlang - TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") - // go - TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") - // java - TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") - // nodejs - TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") - // php - TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") - // python - TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") - // ruby - TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") - // webjs - TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") - // swift - TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") -) - -// TelemetrySDKName returns an attribute KeyValue conforming to the -// "telemetry.sdk.name" semantic conventions. It represents the name of the -// telemetry SDK as defined above. -func TelemetrySDKName(val string) attribute.KeyValue { - return TelemetrySDKNameKey.String(val) -} - -// TelemetrySDKVersion returns an attribute KeyValue conforming to the -// "telemetry.sdk.version" semantic conventions. It represents the version -// string of the telemetry SDK. -func TelemetrySDKVersion(val string) attribute.KeyValue { - return TelemetrySDKVersionKey.String(val) -} - -// TelemetryAutoVersion returns an attribute KeyValue conforming to the -// "telemetry.auto.version" semantic conventions. It represents the version -// string of the auto instrumentation agent, if used. -func TelemetryAutoVersion(val string) attribute.KeyValue { - return TelemetryAutoVersionKey.String(val) -} - -// Resource describing the packaged software running the application code. Web -// engines are typically executed using process.runtime. -const ( - // WebEngineNameKey is the attribute Key conforming to the "webengine.name" - // semantic conventions. It represents the name of the web engine. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'WildFly' - WebEngineNameKey = attribute.Key("webengine.name") - - // WebEngineVersionKey is the attribute Key conforming to the - // "webengine.version" semantic conventions. It represents the version of - // the web engine. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '21.0.0' - WebEngineVersionKey = attribute.Key("webengine.version") - - // WebEngineDescriptionKey is the attribute Key conforming to the - // "webengine.description" semantic conventions. It represents the - // additional description of the web engine (e.g. detailed version and - // edition information). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - - // 2.2.2.Final' - WebEngineDescriptionKey = attribute.Key("webengine.description") -) - -// WebEngineName returns an attribute KeyValue conforming to the -// "webengine.name" semantic conventions. It represents the name of the web -// engine. -func WebEngineName(val string) attribute.KeyValue { - return WebEngineNameKey.String(val) -} - -// WebEngineVersion returns an attribute KeyValue conforming to the -// "webengine.version" semantic conventions. It represents the version of the -// web engine. -func WebEngineVersion(val string) attribute.KeyValue { - return WebEngineVersionKey.String(val) -} - -// WebEngineDescription returns an attribute KeyValue conforming to the -// "webengine.description" semantic conventions. It represents the additional -// description of the web engine (e.g. detailed version and edition -// information). -func WebEngineDescription(val string) attribute.KeyValue { - return WebEngineDescriptionKey.String(val) -} - -// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's -// concepts. -const ( - // OtelScopeNameKey is the attribute Key conforming to the - // "otel.scope.name" semantic conventions. It represents the name of the - // instrumentation scope - (`InstrumentationScope.Name` in OTLP). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'io.opentelemetry.contrib.mongodb' - OtelScopeNameKey = attribute.Key("otel.scope.name") - - // OtelScopeVersionKey is the attribute Key conforming to the - // "otel.scope.version" semantic conventions. It represents the version of - // the instrumentation scope - (`InstrumentationScope.Version` in OTLP). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '1.0.0' - OtelScopeVersionKey = attribute.Key("otel.scope.version") -) - -// OtelScopeName returns an attribute KeyValue conforming to the -// "otel.scope.name" semantic conventions. It represents the name of the -// instrumentation scope - (`InstrumentationScope.Name` in OTLP). -func OtelScopeName(val string) attribute.KeyValue { - return OtelScopeNameKey.String(val) -} - -// OtelScopeVersion returns an attribute KeyValue conforming to the -// "otel.scope.version" semantic conventions. It represents the version of the -// instrumentation scope - (`InstrumentationScope.Version` in OTLP). -func OtelScopeVersion(val string) attribute.KeyValue { - return OtelScopeVersionKey.String(val) -} - -// Span attributes used by non-OTLP exporters to represent OpenTelemetry -// Scope's concepts. -const ( - // OtelLibraryNameKey is the attribute Key conforming to the - // "otel.library.name" semantic conventions. It represents the deprecated, - // use the `otel.scope.name` attribute. - // - // Type: string - // RequirementLevel: Optional - // Stability: deprecated - // Examples: 'io.opentelemetry.contrib.mongodb' - OtelLibraryNameKey = attribute.Key("otel.library.name") - - // OtelLibraryVersionKey is the attribute Key conforming to the - // "otel.library.version" semantic conventions. It represents the - // deprecated, use the `otel.scope.version` attribute. - // - // Type: string - // RequirementLevel: Optional - // Stability: deprecated - // Examples: '1.0.0' - OtelLibraryVersionKey = attribute.Key("otel.library.version") -) - -// OtelLibraryName returns an attribute KeyValue conforming to the -// "otel.library.name" semantic conventions. It represents the deprecated, use -// the `otel.scope.name` attribute. -func OtelLibraryName(val string) attribute.KeyValue { - return OtelLibraryNameKey.String(val) -} - -// OtelLibraryVersion returns an attribute KeyValue conforming to the -// "otel.library.version" semantic conventions. It represents the deprecated, -// use the `otel.scope.version` attribute. -func OtelLibraryVersion(val string) attribute.KeyValue { - return OtelLibraryVersionKey.String(val) -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/schema.go deleted file mode 100644 index 42fc525d165..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/schema.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0" - -// SchemaURL is the schema URL that matches the version of the semantic conventions -// that this package defines. Semconv packages starting from v1.4.0 must declare -// non-empty schema URL in the form https://opentelemetry.io/schemas/ -const SchemaURL = "https://opentelemetry.io/schemas/1.17.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/trace.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/trace.go deleted file mode 100644 index 8c4a7299d27..00000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/trace.go +++ /dev/null @@ -1,3375 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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 from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0" - -import "go.opentelemetry.io/otel/attribute" - -// The shared attributes used to report a single exception associated with a -// span or log. -const ( - // ExceptionTypeKey is the attribute Key conforming to the "exception.type" - // semantic conventions. It represents the type of the exception (its - // fully-qualified class name, if applicable). The dynamic type of the - // exception should be preferred over the static type in languages that - // support it. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'java.net.ConnectException', 'OSError' - ExceptionTypeKey = attribute.Key("exception.type") - - // ExceptionMessageKey is the attribute Key conforming to the - // "exception.message" semantic conventions. It represents the exception - // message. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Division by zero', "Can't convert 'int' object to str - // implicitly" - ExceptionMessageKey = attribute.Key("exception.message") - - // ExceptionStacktraceKey is the attribute Key conforming to the - // "exception.stacktrace" semantic conventions. It represents a stacktrace - // as a string in the natural representation for the language runtime. The - // representation is to be determined and documented by each language SIG. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test - // exception\\n at ' - // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' - // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' - // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' - ExceptionStacktraceKey = attribute.Key("exception.stacktrace") -) - -// ExceptionType returns an attribute KeyValue conforming to the -// "exception.type" semantic conventions. It represents the type of the -// exception (its fully-qualified class name, if applicable). The dynamic type -// of the exception should be preferred over the static type in languages that -// support it. -func ExceptionType(val string) attribute.KeyValue { - return ExceptionTypeKey.String(val) -} - -// ExceptionMessage returns an attribute KeyValue conforming to the -// "exception.message" semantic conventions. It represents the exception -// message. -func ExceptionMessage(val string) attribute.KeyValue { - return ExceptionMessageKey.String(val) -} - -// ExceptionStacktrace returns an attribute KeyValue conforming to the -// "exception.stacktrace" semantic conventions. It represents a stacktrace as a -// string in the natural representation for the language runtime. The -// representation is to be determined and documented by each language SIG. -func ExceptionStacktrace(val string) attribute.KeyValue { - return ExceptionStacktraceKey.String(val) -} - -// Attributes for Events represented using Log Records. -const ( - // EventNameKey is the attribute Key conforming to the "event.name" - // semantic conventions. It represents the name identifies the event. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'click', 'exception' - EventNameKey = attribute.Key("event.name") - - // EventDomainKey is the attribute Key conforming to the "event.domain" - // semantic conventions. It represents the domain identifies the business - // context for the events. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - // Note: Events across different domains may have same `event.name`, yet be - // unrelated events. - EventDomainKey = attribute.Key("event.domain") -) - -var ( - // Events from browser apps - EventDomainBrowser = EventDomainKey.String("browser") - // Events from mobile apps - EventDomainDevice = EventDomainKey.String("device") - // Events from Kubernetes - EventDomainK8S = EventDomainKey.String("k8s") -) - -// EventName returns an attribute KeyValue conforming to the "event.name" -// semantic conventions. It represents the name identifies the event. -func EventName(val string) attribute.KeyValue { - return EventNameKey.String(val) -} - -// Span attributes used by AWS Lambda (in addition to general `faas` -// attributes). -const ( - // AWSLambdaInvokedARNKey is the attribute Key conforming to the - // "aws.lambda.invoked_arn" semantic conventions. It represents the full - // invoked ARN as provided on the `Context` passed to the function - // (`Lambda-Runtime-Invoked-Function-ARN` header on the - // `/runtime/invocation/next` applicable). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' - // Note: This may be different from `faas.id` if an alias is involved. - AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") -) - -// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the -// "aws.lambda.invoked_arn" semantic conventions. It represents the full -// invoked ARN as provided on the `Context` passed to the function -// (`Lambda-Runtime-Invoked-Function-ARN` header on the -// `/runtime/invocation/next` applicable). -func AWSLambdaInvokedARN(val string) attribute.KeyValue { - return AWSLambdaInvokedARNKey.String(val) -} - -// Attributes for CloudEvents. CloudEvents is a specification on how to define -// event data in a standard way. These attributes can be attached to spans when -// performing operations with CloudEvents, regardless of the protocol being -// used. -const ( - // CloudeventsEventIDKey is the attribute Key conforming to the - // "cloudevents.event_id" semantic conventions. It represents the - // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) - // uniquely identifies the event. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' - CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") - - // CloudeventsEventSourceKey is the attribute Key conforming to the - // "cloudevents.event_source" semantic conventions. It represents the - // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) - // identifies the context in which an event happened. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'https://github.com/cloudevents', - // '/cloudevents/spec/pull/123', 'my-service' - CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") - - // CloudeventsEventSpecVersionKey is the attribute Key conforming to the - // "cloudevents.event_spec_version" semantic conventions. It represents the - // [version of the CloudEvents - // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) - // which the event uses. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '1.0' - CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") - - // CloudeventsEventTypeKey is the attribute Key conforming to the - // "cloudevents.event_type" semantic conventions. It represents the - // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) - // contains a value describing the type of event related to the originating - // occurrence. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'com.github.pull_request.opened', - // 'com.example.object.deleted.v2' - CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") - - // CloudeventsEventSubjectKey is the attribute Key conforming to the - // "cloudevents.event_subject" semantic conventions. It represents the - // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) - // of the event in the context of the event producer (identified by - // source). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'mynewfile.jpg' - CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") -) - -// CloudeventsEventID returns an attribute KeyValue conforming to the -// "cloudevents.event_id" semantic conventions. It represents the -// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) -// uniquely identifies the event. -func CloudeventsEventID(val string) attribute.KeyValue { - return CloudeventsEventIDKey.String(val) -} - -// CloudeventsEventSource returns an attribute KeyValue conforming to the -// "cloudevents.event_source" semantic conventions. It represents the -// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) -// identifies the context in which an event happened. -func CloudeventsEventSource(val string) attribute.KeyValue { - return CloudeventsEventSourceKey.String(val) -} - -// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to -// the "cloudevents.event_spec_version" semantic conventions. It represents the -// [version of the CloudEvents -// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) -// which the event uses. -func CloudeventsEventSpecVersion(val string) attribute.KeyValue { - return CloudeventsEventSpecVersionKey.String(val) -} - -// CloudeventsEventType returns an attribute KeyValue conforming to the -// "cloudevents.event_type" semantic conventions. It represents the -// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) -// contains a value describing the type of event related to the originating -// occurrence. -func CloudeventsEventType(val string) attribute.KeyValue { - return CloudeventsEventTypeKey.String(val) -} - -// CloudeventsEventSubject returns an attribute KeyValue conforming to the -// "cloudevents.event_subject" semantic conventions. It represents the -// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) -// of the event in the context of the event producer (identified by source). -func CloudeventsEventSubject(val string) attribute.KeyValue { - return CloudeventsEventSubjectKey.String(val) -} - -// Semantic conventions for the OpenTracing Shim -const ( - // OpentracingRefTypeKey is the attribute Key conforming to the - // "opentracing.ref_type" semantic conventions. It represents the - // parent-child Reference type - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Note: The causal relationship between a child Span and a parent Span. - OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") -) - -var ( - // The parent Span depends on the child Span in some capacity - OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") - // The parent Span does not depend in any way on the result of the child Span - OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") -) - -// The attributes used to perform database client calls. -const ( - // DBSystemKey is the attribute Key conforming to the "db.system" semantic - // conventions. It represents an identifier for the database management - // system (DBMS) product being used. See below for a list of well-known - // identifiers. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - DBSystemKey = attribute.Key("db.system") - - // DBConnectionStringKey is the attribute Key conforming to the - // "db.connection_string" semantic conventions. It represents the - // connection string used to connect to the database. It is recommended to - // remove embedded credentials. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' - DBConnectionStringKey = attribute.Key("db.connection_string") - - // DBUserKey is the attribute Key conforming to the "db.user" semantic - // conventions. It represents the username for accessing the database. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'readonly_user', 'reporting_user' - DBUserKey = attribute.Key("db.user") - - // DBJDBCDriverClassnameKey is the attribute Key conforming to the - // "db.jdbc.driver_classname" semantic conventions. It represents the - // fully-qualified class name of the [Java Database Connectivity - // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) - // driver used to connect. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'org.postgresql.Driver', - // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' - DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") - - // DBNameKey is the attribute Key conforming to the "db.name" semantic - // conventions. It represents the this attribute is used to report the name - // of the database being accessed. For commands that switch the database, - // this should be set to the target database (even if the command fails). - // - // Type: string - // RequirementLevel: ConditionallyRequired (If applicable.) - // Stability: stable - // Examples: 'customers', 'main' - // Note: In some SQL databases, the database name to be used is called - // "schema name". In case there are multiple layers that could be - // considered for database name (e.g. Oracle instance name and schema - // name), the database name to be used is the more specific layer (e.g. - // Oracle schema name). - DBNameKey = attribute.Key("db.name") - - // DBStatementKey is the attribute Key conforming to the "db.statement" - // semantic conventions. It represents the database statement being - // executed. - // - // Type: string - // RequirementLevel: ConditionallyRequired (If applicable and not - // explicitly disabled via instrumentation configuration.) - // Stability: stable - // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' - // Note: The value may be sanitized to exclude sensitive information. - DBStatementKey = attribute.Key("db.statement") - - // DBOperationKey is the attribute Key conforming to the "db.operation" - // semantic conventions. It represents the name of the operation being - // executed, e.g. the [MongoDB command - // name](https://docs.mongodb.com/manual/reference/command/#database-operations) - // such as `findAndModify`, or the SQL keyword. - // - // Type: string - // RequirementLevel: ConditionallyRequired (If `db.statement` is not - // applicable.) - // Stability: stable - // Examples: 'findAndModify', 'HMSET', 'SELECT' - // Note: When setting this to an SQL keyword, it is not recommended to - // attempt any client-side parsing of `db.statement` just to get this - // property, but it should be set if the operation name is provided by the - // library being instrumented. If the SQL statement has an ambiguous - // operation, or performs more than one operation, this value may be - // omitted. - DBOperationKey = attribute.Key("db.operation") -) - -var ( - // Some other SQL database. Fallback only. See notes - DBSystemOtherSQL = DBSystemKey.String("other_sql") - // Microsoft SQL Server - DBSystemMSSQL = DBSystemKey.String("mssql") - // MySQL - DBSystemMySQL = DBSystemKey.String("mysql") - // Oracle Database - DBSystemOracle = DBSystemKey.String("oracle") - // IBM DB2 - DBSystemDB2 = DBSystemKey.String("db2") - // PostgreSQL - DBSystemPostgreSQL = DBSystemKey.String("postgresql") - // Amazon Redshift - DBSystemRedshift = DBSystemKey.String("redshift") - // Apache Hive - DBSystemHive = DBSystemKey.String("hive") - // Cloudscape - DBSystemCloudscape = DBSystemKey.String("cloudscape") - // HyperSQL DataBase - DBSystemHSQLDB = DBSystemKey.String("hsqldb") - // Progress Database - DBSystemProgress = DBSystemKey.String("progress") - // SAP MaxDB - DBSystemMaxDB = DBSystemKey.String("maxdb") - // SAP HANA - DBSystemHanaDB = DBSystemKey.String("hanadb") - // Ingres - DBSystemIngres = DBSystemKey.String("ingres") - // FirstSQL - DBSystemFirstSQL = DBSystemKey.String("firstsql") - // EnterpriseDB - DBSystemEDB = DBSystemKey.String("edb") - // InterSystems Caché - DBSystemCache = DBSystemKey.String("cache") - // Adabas (Adaptable Database System) - DBSystemAdabas = DBSystemKey.String("adabas") - // Firebird - DBSystemFirebird = DBSystemKey.String("firebird") - // Apache Derby - DBSystemDerby = DBSystemKey.String("derby") - // FileMaker - DBSystemFilemaker = DBSystemKey.String("filemaker") - // Informix - DBSystemInformix = DBSystemKey.String("informix") - // InstantDB - DBSystemInstantDB = DBSystemKey.String("instantdb") - // InterBase - DBSystemInterbase = DBSystemKey.String("interbase") - // MariaDB - DBSystemMariaDB = DBSystemKey.String("mariadb") - // Netezza - DBSystemNetezza = DBSystemKey.String("netezza") - // Pervasive PSQL - DBSystemPervasive = DBSystemKey.String("pervasive") - // PointBase - DBSystemPointbase = DBSystemKey.String("pointbase") - // SQLite - DBSystemSqlite = DBSystemKey.String("sqlite") - // Sybase - DBSystemSybase = DBSystemKey.String("sybase") - // Teradata - DBSystemTeradata = DBSystemKey.String("teradata") - // Vertica - DBSystemVertica = DBSystemKey.String("vertica") - // H2 - DBSystemH2 = DBSystemKey.String("h2") - // ColdFusion IMQ - DBSystemColdfusion = DBSystemKey.String("coldfusion") - // Apache Cassandra - DBSystemCassandra = DBSystemKey.String("cassandra") - // Apache HBase - DBSystemHBase = DBSystemKey.String("hbase") - // MongoDB - DBSystemMongoDB = DBSystemKey.String("mongodb") - // Redis - DBSystemRedis = DBSystemKey.String("redis") - // Couchbase - DBSystemCouchbase = DBSystemKey.String("couchbase") - // CouchDB - DBSystemCouchDB = DBSystemKey.String("couchdb") - // Microsoft Azure Cosmos DB - DBSystemCosmosDB = DBSystemKey.String("cosmosdb") - // Amazon DynamoDB - DBSystemDynamoDB = DBSystemKey.String("dynamodb") - // Neo4j - DBSystemNeo4j = DBSystemKey.String("neo4j") - // Apache Geode - DBSystemGeode = DBSystemKey.String("geode") - // Elasticsearch - DBSystemElasticsearch = DBSystemKey.String("elasticsearch") - // Memcached - DBSystemMemcached = DBSystemKey.String("memcached") - // CockroachDB - DBSystemCockroachdb = DBSystemKey.String("cockroachdb") - // OpenSearch - DBSystemOpensearch = DBSystemKey.String("opensearch") - // ClickHouse - DBSystemClickhouse = DBSystemKey.String("clickhouse") -) - -// DBConnectionString returns an attribute KeyValue conforming to the -// "db.connection_string" semantic conventions. It represents the connection -// string used to connect to the database. It is recommended to remove embedded -// credentials. -func DBConnectionString(val string) attribute.KeyValue { - return DBConnectionStringKey.String(val) -} - -// DBUser returns an attribute KeyValue conforming to the "db.user" semantic -// conventions. It represents the username for accessing the database. -func DBUser(val string) attribute.KeyValue { - return DBUserKey.String(val) -} - -// DBJDBCDriverClassname returns an attribute KeyValue conforming to the -// "db.jdbc.driver_classname" semantic conventions. It represents the -// fully-qualified class name of the [Java Database Connectivity -// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver -// used to connect. -func DBJDBCDriverClassname(val string) attribute.KeyValue { - return DBJDBCDriverClassnameKey.String(val) -} - -// DBName returns an attribute KeyValue conforming to the "db.name" semantic -// conventions. It represents the this attribute is used to report the name of -// the database being accessed. For commands that switch the database, this -// should be set to the target database (even if the command fails). -func DBName(val string) attribute.KeyValue { - return DBNameKey.String(val) -} - -// DBStatement returns an attribute KeyValue conforming to the -// "db.statement" semantic conventions. It represents the database statement -// being executed. -func DBStatement(val string) attribute.KeyValue { - return DBStatementKey.String(val) -} - -// DBOperation returns an attribute KeyValue conforming to the -// "db.operation" semantic conventions. It represents the name of the operation -// being executed, e.g. the [MongoDB command -// name](https://docs.mongodb.com/manual/reference/command/#database-operations) -// such as `findAndModify`, or the SQL keyword. -func DBOperation(val string) attribute.KeyValue { - return DBOperationKey.String(val) -} - -// Connection-level attributes for Microsoft SQL Server -const ( - // DBMSSQLInstanceNameKey is the attribute Key conforming to the - // "db.mssql.instance_name" semantic conventions. It represents the - // Microsoft SQL Server [instance - // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) - // connecting to. This name is used to determine the port of a named - // instance. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'MSSQLSERVER' - // Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no - // longer required (but still recommended if non-standard). - DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") -) - -// DBMSSQLInstanceName returns an attribute KeyValue conforming to the -// "db.mssql.instance_name" semantic conventions. It represents the Microsoft -// SQL Server [instance -// name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) -// connecting to. This name is used to determine the port of a named instance. -func DBMSSQLInstanceName(val string) attribute.KeyValue { - return DBMSSQLInstanceNameKey.String(val) -} - -// Call-level attributes for Cassandra -const ( - // DBCassandraPageSizeKey is the attribute Key conforming to the - // "db.cassandra.page_size" semantic conventions. It represents the fetch - // size used for paging, i.e. how many rows will be returned at once. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 5000 - DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") - - // DBCassandraConsistencyLevelKey is the attribute Key conforming to the - // "db.cassandra.consistency_level" semantic conventions. It represents the - // consistency level of the query. Based on consistency values from - // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") - - // DBCassandraTableKey is the attribute Key conforming to the - // "db.cassandra.table" semantic conventions. It represents the name of the - // primary table that the operation is acting upon, including the keyspace - // name (if applicable). - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'mytable' - // Note: This mirrors the db.sql.table attribute but references cassandra - // rather than sql. It is not recommended to attempt any client-side - // parsing of `db.statement` just to get this property, but it should be - // set if it is provided by the library being instrumented. If the - // operation is acting upon an anonymous table, or more than one table, - // this value MUST NOT be set. - DBCassandraTableKey = attribute.Key("db.cassandra.table") - - // DBCassandraIdempotenceKey is the attribute Key conforming to the - // "db.cassandra.idempotence" semantic conventions. It represents the - // whether or not the query is idempotent. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") - - // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming - // to the "db.cassandra.speculative_execution_count" semantic conventions. - // It represents the number of times a query was speculatively executed. - // Not set or `0` if the query was not executed speculatively. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 0, 2 - DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") - - // DBCassandraCoordinatorIDKey is the attribute Key conforming to the - // "db.cassandra.coordinator.id" semantic conventions. It represents the ID - // of the coordinating node for a query. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' - DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") - - // DBCassandraCoordinatorDCKey is the attribute Key conforming to the - // "db.cassandra.coordinator.dc" semantic conventions. It represents the - // data center of the coordinating node for a query. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'us-west-2' - DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") -) - -var ( - // all - DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") - // each_quorum - DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") - // quorum - DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") - // local_quorum - DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") - // one - DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") - // two - DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") - // three - DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") - // local_one - DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") - // any - DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") - // serial - DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") - // local_serial - DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") -) - -// DBCassandraPageSize returns an attribute KeyValue conforming to the -// "db.cassandra.page_size" semantic conventions. It represents the fetch size -// used for paging, i.e. how many rows will be returned at once. -func DBCassandraPageSize(val int) attribute.KeyValue { - return DBCassandraPageSizeKey.Int(val) -} - -// DBCassandraTable returns an attribute KeyValue conforming to the -// "db.cassandra.table" semantic conventions. It represents the name of the -// primary table that the operation is acting upon, including the keyspace name -// (if applicable). -func DBCassandraTable(val string) attribute.KeyValue { - return DBCassandraTableKey.String(val) -} - -// DBCassandraIdempotence returns an attribute KeyValue conforming to the -// "db.cassandra.idempotence" semantic conventions. It represents the whether -// or not the query is idempotent. -func DBCassandraIdempotence(val bool) attribute.KeyValue { - return DBCassandraIdempotenceKey.Bool(val) -} - -// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue -// conforming to the "db.cassandra.speculative_execution_count" semantic -// conventions. It represents the number of times a query was speculatively -// executed. Not set or `0` if the query was not executed speculatively. -func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { - return DBCassandraSpeculativeExecutionCountKey.Int(val) -} - -// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the -// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of -// the coordinating node for a query. -func DBCassandraCoordinatorID(val string) attribute.KeyValue { - return DBCassandraCoordinatorIDKey.String(val) -} - -// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the -// "db.cassandra.coordinator.dc" semantic conventions. It represents the data -// center of the coordinating node for a query. -func DBCassandraCoordinatorDC(val string) attribute.KeyValue { - return DBCassandraCoordinatorDCKey.String(val) -} - -// Call-level attributes for Redis -const ( - // DBRedisDBIndexKey is the attribute Key conforming to the - // "db.redis.database_index" semantic conventions. It represents the index - // of the database being accessed as used in the [`SELECT` - // command](https://redis.io/commands/select), provided as an integer. To - // be used instead of the generic `db.name` attribute. - // - // Type: int - // RequirementLevel: ConditionallyRequired (If other than the default - // database (`0`).) - // Stability: stable - // Examples: 0, 1, 15 - DBRedisDBIndexKey = attribute.Key("db.redis.database_index") -) - -// DBRedisDBIndex returns an attribute KeyValue conforming to the -// "db.redis.database_index" semantic conventions. It represents the index of -// the database being accessed as used in the [`SELECT` -// command](https://redis.io/commands/select), provided as an integer. To be -// used instead of the generic `db.name` attribute. -func DBRedisDBIndex(val int) attribute.KeyValue { - return DBRedisDBIndexKey.Int(val) -} - -// Call-level attributes for MongoDB -const ( - // DBMongoDBCollectionKey is the attribute Key conforming to the - // "db.mongodb.collection" semantic conventions. It represents the - // collection being accessed within the database stated in `db.name`. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'customers', 'products' - DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") -) - -// DBMongoDBCollection returns an attribute KeyValue conforming to the -// "db.mongodb.collection" semantic conventions. It represents the collection -// being accessed within the database stated in `db.name`. -func DBMongoDBCollection(val string) attribute.KeyValue { - return DBMongoDBCollectionKey.String(val) -} - -// Call-level attributes for SQL databases -const ( - // DBSQLTableKey is the attribute Key conforming to the "db.sql.table" - // semantic conventions. It represents the name of the primary table that - // the operation is acting upon, including the database name (if - // applicable). - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'public.users', 'customers' - // Note: It is not recommended to attempt any client-side parsing of - // `db.statement` just to get this property, but it should be set if it is - // provided by the library being instrumented. If the operation is acting - // upon an anonymous table, or more than one table, this value MUST NOT be - // set. - DBSQLTableKey = attribute.Key("db.sql.table") -) - -// DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table" -// semantic conventions. It represents the name of the primary table that the -// operation is acting upon, including the database name (if applicable). -func DBSQLTable(val string) attribute.KeyValue { - return DBSQLTableKey.String(val) -} - -// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's -// concepts. -const ( - // OtelStatusCodeKey is the attribute Key conforming to the - // "otel.status_code" semantic conventions. It represents the name of the - // code, either "OK" or "ERROR". MUST NOT be set if the status code is - // UNSET. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - OtelStatusCodeKey = attribute.Key("otel.status_code") - - // OtelStatusDescriptionKey is the attribute Key conforming to the - // "otel.status_description" semantic conventions. It represents the - // description of the Status if it has a value, otherwise not set. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'resource not found' - OtelStatusDescriptionKey = attribute.Key("otel.status_description") -) - -var ( - // The operation has been validated by an Application developer or Operator to have completed successfully - OtelStatusCodeOk = OtelStatusCodeKey.String("OK") - // The operation contains an error - OtelStatusCodeError = OtelStatusCodeKey.String("ERROR") -) - -// OtelStatusDescription returns an attribute KeyValue conforming to the -// "otel.status_description" semantic conventions. It represents the -// description of the Status if it has a value, otherwise not set. -func OtelStatusDescription(val string) attribute.KeyValue { - return OtelStatusDescriptionKey.String(val) -} - -// This semantic convention describes an instance of a function that runs -// without provisioning or managing of servers (also known as serverless -// functions or Function as a Service (FaaS)) with spans. -const ( - // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" - // semantic conventions. It represents the type of the trigger which caused - // this function execution. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Note: For the server/consumer span on the incoming side, - // `faas.trigger` MUST be set. - // - // Clients invoking FaaS instances usually cannot set `faas.trigger`, - // since they would typically need to look in the payload to determine - // the event type. If clients set it, it should be the same as the - // trigger that corresponding incoming would have (i.e., this has - // nothing to do with the underlying transport used to make the API - // call to invoke the lambda, which is often HTTP). - FaaSTriggerKey = attribute.Key("faas.trigger") - - // FaaSExecutionKey is the attribute Key conforming to the "faas.execution" - // semantic conventions. It represents the execution ID of the current - // function execution. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' - FaaSExecutionKey = attribute.Key("faas.execution") -) - -var ( - // A response to some data source operation such as a database or filesystem read/write - FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") - // To provide an answer to an inbound HTTP request - FaaSTriggerHTTP = FaaSTriggerKey.String("http") - // A function is set to be executed when messages are sent to a messaging system - FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") - // A function is scheduled to be executed regularly - FaaSTriggerTimer = FaaSTriggerKey.String("timer") - // If none of the others apply - FaaSTriggerOther = FaaSTriggerKey.String("other") -) - -// FaaSExecution returns an attribute KeyValue conforming to the -// "faas.execution" semantic conventions. It represents the execution ID of the -// current function execution. -func FaaSExecution(val string) attribute.KeyValue { - return FaaSExecutionKey.String(val) -} - -// Semantic Convention for FaaS triggered as a response to some data source -// operation such as a database or filesystem read/write. -const ( - // FaaSDocumentCollectionKey is the attribute Key conforming to the - // "faas.document.collection" semantic conventions. It represents the name - // of the source on which the triggering operation was performed. For - // example, in Cloud Storage or S3 corresponds to the bucket name, and in - // Cosmos DB to the database name. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'myBucketName', 'myDBName' - FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") - - // FaaSDocumentOperationKey is the attribute Key conforming to the - // "faas.document.operation" semantic conventions. It represents the - // describes the type of the operation that was performed on the data. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - FaaSDocumentOperationKey = attribute.Key("faas.document.operation") - - // FaaSDocumentTimeKey is the attribute Key conforming to the - // "faas.document.time" semantic conventions. It represents a string - // containing the time when the data was accessed in the [ISO - // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format - // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2020-01-23T13:47:06Z' - FaaSDocumentTimeKey = attribute.Key("faas.document.time") - - // FaaSDocumentNameKey is the attribute Key conforming to the - // "faas.document.name" semantic conventions. It represents the document - // name/table subjected to the operation. For example, in Cloud Storage or - // S3 is the name of the file, and in Cosmos DB the table name. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'myFile.txt', 'myTableName' - FaaSDocumentNameKey = attribute.Key("faas.document.name") -) - -var ( - // When a new object is created - FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") - // When an object is modified - FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") - // When an object is deleted - FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") -) - -// FaaSDocumentCollection returns an attribute KeyValue conforming to the -// "faas.document.collection" semantic conventions. It represents the name of -// the source on which the triggering operation was performed. For example, in -// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the -// database name. -func FaaSDocumentCollection(val string) attribute.KeyValue { - return FaaSDocumentCollectionKey.String(val) -} - -// FaaSDocumentTime returns an attribute KeyValue conforming to the -// "faas.document.time" semantic conventions. It represents a string containing -// the time when the data was accessed in the [ISO -// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format -// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). -func FaaSDocumentTime(val string) attribute.KeyValue { - return FaaSDocumentTimeKey.String(val) -} - -// FaaSDocumentName returns an attribute KeyValue conforming to the -// "faas.document.name" semantic conventions. It represents the document -// name/table subjected to the operation. For example, in Cloud Storage or S3 -// is the name of the file, and in Cosmos DB the table name. -func FaaSDocumentName(val string) attribute.KeyValue { - return FaaSDocumentNameKey.String(val) -} - -// Semantic Convention for FaaS scheduled to be executed regularly. -const ( - // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic - // conventions. It represents a string containing the function invocation - // time in the [ISO - // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format - // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2020-01-23T13:47:06Z' - FaaSTimeKey = attribute.Key("faas.time") - - // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic - // conventions. It represents a string containing the schedule period as - // [Cron - // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '0/5 * * * ? *' - FaaSCronKey = attribute.Key("faas.cron") -) - -// FaaSTime returns an attribute KeyValue conforming to the "faas.time" -// semantic conventions. It represents a string containing the function -// invocation time in the [ISO -// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format -// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). -func FaaSTime(val string) attribute.KeyValue { - return FaaSTimeKey.String(val) -} - -// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" -// semantic conventions. It represents a string containing the schedule period -// as [Cron -// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). -func FaaSCron(val string) attribute.KeyValue { - return FaaSCronKey.String(val) -} - -// Contains additional attributes for incoming FaaS spans. -const ( - // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" - // semantic conventions. It represents a boolean that is true if the - // serverless function is executed for the first time (aka cold-start). - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - FaaSColdstartKey = attribute.Key("faas.coldstart") -) - -// FaaSColdstart returns an attribute KeyValue conforming to the -// "faas.coldstart" semantic conventions. It represents a boolean that is true -// if the serverless function is executed for the first time (aka cold-start). -func FaaSColdstart(val bool) attribute.KeyValue { - return FaaSColdstartKey.Bool(val) -} - -// Contains additional attributes for outgoing FaaS spans. -const ( - // FaaSInvokedNameKey is the attribute Key conforming to the - // "faas.invoked_name" semantic conventions. It represents the name of the - // invoked function. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'my-function' - // Note: SHOULD be equal to the `faas.name` resource attribute of the - // invoked function. - FaaSInvokedNameKey = attribute.Key("faas.invoked_name") - - // FaaSInvokedProviderKey is the attribute Key conforming to the - // "faas.invoked_provider" semantic conventions. It represents the cloud - // provider of the invoked function. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - // Note: SHOULD be equal to the `cloud.provider` resource attribute of the - // invoked function. - FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") - - // FaaSInvokedRegionKey is the attribute Key conforming to the - // "faas.invoked_region" semantic conventions. It represents the cloud - // region of the invoked function. - // - // Type: string - // RequirementLevel: ConditionallyRequired (For some cloud providers, like - // AWS or GCP, the region in which a function is hosted is essential to - // uniquely identify the function and also part of its endpoint. Since it's - // part of the endpoint being called, the region is always known to - // clients. In these cases, `faas.invoked_region` MUST be set accordingly. - // If the region is unknown to the client or not required for identifying - // the invoked function, setting `faas.invoked_region` is optional.) - // Stability: stable - // Examples: 'eu-central-1' - // Note: SHOULD be equal to the `cloud.region` resource attribute of the - // invoked function. - FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") -) - -var ( - // Alibaba Cloud - FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") - // Amazon Web Services - FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") - // Microsoft Azure - FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") - // Google Cloud Platform - FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") - // Tencent Cloud - FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") -) - -// FaaSInvokedName returns an attribute KeyValue conforming to the -// "faas.invoked_name" semantic conventions. It represents the name of the -// invoked function. -func FaaSInvokedName(val string) attribute.KeyValue { - return FaaSInvokedNameKey.String(val) -} - -// FaaSInvokedRegion returns an attribute KeyValue conforming to the -// "faas.invoked_region" semantic conventions. It represents the cloud region -// of the invoked function. -func FaaSInvokedRegion(val string) attribute.KeyValue { - return FaaSInvokedRegionKey.String(val) -} - -// These attributes may be used for any network related operation. -const ( - // NetTransportKey is the attribute Key conforming to the "net.transport" - // semantic conventions. It represents the transport protocol used. See - // note below. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - NetTransportKey = attribute.Key("net.transport") - - // NetAppProtocolNameKey is the attribute Key conforming to the - // "net.app.protocol.name" semantic conventions. It represents the - // application layer protocol used. The value SHOULD be normalized to - // lowercase. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'amqp', 'http', 'mqtt' - NetAppProtocolNameKey = attribute.Key("net.app.protocol.name") - - // NetAppProtocolVersionKey is the attribute Key conforming to the - // "net.app.protocol.version" semantic conventions. It represents the - // version of the application layer protocol used. See note below. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '3.1.1' - // Note: `net.app.protocol.version` refers to the version of the protocol - // used and might be different from the protocol client's version. If the - // HTTP client used has a version of `0.27.2`, but sends HTTP version - // `1.1`, this attribute should be set to `1.1`. - NetAppProtocolVersionKey = attribute.Key("net.app.protocol.version") - - // NetSockPeerNameKey is the attribute Key conforming to the - // "net.sock.peer.name" semantic conventions. It represents the remote - // socket peer name. - // - // Type: string - // RequirementLevel: Recommended (If available and different from - // `net.peer.name` and if `net.sock.peer.addr` is set.) - // Stability: stable - // Examples: 'proxy.example.com' - NetSockPeerNameKey = attribute.Key("net.sock.peer.name") - - // NetSockPeerAddrKey is the attribute Key conforming to the - // "net.sock.peer.addr" semantic conventions. It represents the remote - // socket peer address: IPv4 or IPv6 for internet protocols, path for local - // communication, - // [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '127.0.0.1', '/tmp/mysql.sock' - NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr") - - // NetSockPeerPortKey is the attribute Key conforming to the - // "net.sock.peer.port" semantic conventions. It represents the remote - // socket peer port. - // - // Type: int - // RequirementLevel: Recommended (If defined for the address family and if - // different than `net.peer.port` and if `net.sock.peer.addr` is set.) - // Stability: stable - // Examples: 16456 - NetSockPeerPortKey = attribute.Key("net.sock.peer.port") - - // NetSockFamilyKey is the attribute Key conforming to the - // "net.sock.family" semantic conventions. It represents the protocol - // [address - // family](https://man7.org/linux/man-pages/man7/address_families.7.html) - // which is used for communication. - // - // Type: Enum - // RequirementLevel: ConditionallyRequired (If different than `inet` and if - // any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers - // of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in - // `net.sock.peer.addr` if `net.sock.family` is not set. This is to support - // instrumentations that follow previous versions of this document.) - // Stability: stable - // Examples: 'inet6', 'bluetooth' - NetSockFamilyKey = attribute.Key("net.sock.family") - - // NetPeerNameKey is the attribute Key conforming to the "net.peer.name" - // semantic conventions. It represents the logical remote hostname, see - // note below. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'example.com' - // Note: `net.peer.name` SHOULD NOT be set if capturing it would require an - // extra DNS lookup. - NetPeerNameKey = attribute.Key("net.peer.name") - - // NetPeerPortKey is the attribute Key conforming to the "net.peer.port" - // semantic conventions. It represents the logical remote port number - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 80, 8080, 443 - NetPeerPortKey = attribute.Key("net.peer.port") - - // NetHostNameKey is the attribute Key conforming to the "net.host.name" - // semantic conventions. It represents the logical local hostname or - // similar, see note below. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'localhost' - NetHostNameKey = attribute.Key("net.host.name") - - // NetHostPortKey is the attribute Key conforming to the "net.host.port" - // semantic conventions. It represents the logical local port number, - // preferably the one that the peer used to connect - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 8080 - NetHostPortKey = attribute.Key("net.host.port") - - // NetSockHostAddrKey is the attribute Key conforming to the - // "net.sock.host.addr" semantic conventions. It represents the local - // socket address. Useful in case of a multi-IP host. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '192.168.0.1' - NetSockHostAddrKey = attribute.Key("net.sock.host.addr") - - // NetSockHostPortKey is the attribute Key conforming to the - // "net.sock.host.port" semantic conventions. It represents the local - // socket port number. - // - // Type: int - // RequirementLevel: Recommended (If defined for the address family and if - // different than `net.host.port` and if `net.sock.host.addr` is set.) - // Stability: stable - // Examples: 35555 - NetSockHostPortKey = attribute.Key("net.sock.host.port") - - // NetHostConnectionTypeKey is the attribute Key conforming to the - // "net.host.connection.type" semantic conventions. It represents the - // internet connection type currently being used by the host. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'wifi' - NetHostConnectionTypeKey = attribute.Key("net.host.connection.type") - - // NetHostConnectionSubtypeKey is the attribute Key conforming to the - // "net.host.connection.subtype" semantic conventions. It represents the - // this describes more details regarding the connection.type. It may be the - // type of cell technology connection, but it could be used for describing - // details about a wifi connection. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'LTE' - NetHostConnectionSubtypeKey = attribute.Key("net.host.connection.subtype") - - // NetHostCarrierNameKey is the attribute Key conforming to the - // "net.host.carrier.name" semantic conventions. It represents the name of - // the mobile carrier. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'sprint' - NetHostCarrierNameKey = attribute.Key("net.host.carrier.name") - - // NetHostCarrierMccKey is the attribute Key conforming to the - // "net.host.carrier.mcc" semantic conventions. It represents the mobile - // carrier country code. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '310' - NetHostCarrierMccKey = attribute.Key("net.host.carrier.mcc") - - // NetHostCarrierMncKey is the attribute Key conforming to the - // "net.host.carrier.mnc" semantic conventions. It represents the mobile - // carrier network code. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '001' - NetHostCarrierMncKey = attribute.Key("net.host.carrier.mnc") - - // NetHostCarrierIccKey is the attribute Key conforming to the - // "net.host.carrier.icc" semantic conventions. It represents the ISO - // 3166-1 alpha-2 2-character country code associated with the mobile - // carrier network. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'DE' - NetHostCarrierIccKey = attribute.Key("net.host.carrier.icc") -) - -var ( - // ip_tcp - NetTransportTCP = NetTransportKey.String("ip_tcp") - // ip_udp - NetTransportUDP = NetTransportKey.String("ip_udp") - // Named or anonymous pipe. See note below - NetTransportPipe = NetTransportKey.String("pipe") - // In-process communication - NetTransportInProc = NetTransportKey.String("inproc") - // Something else (non IP-based) - NetTransportOther = NetTransportKey.String("other") -) - -var ( - // IPv4 address - NetSockFamilyInet = NetSockFamilyKey.String("inet") - // IPv6 address - NetSockFamilyInet6 = NetSockFamilyKey.String("inet6") - // Unix domain socket path - NetSockFamilyUnix = NetSockFamilyKey.String("unix") -) - -var ( - // wifi - NetHostConnectionTypeWifi = NetHostConnectionTypeKey.String("wifi") - // wired - NetHostConnectionTypeWired = NetHostConnectionTypeKey.String("wired") - // cell - NetHostConnectionTypeCell = NetHostConnectionTypeKey.String("cell") - // unavailable - NetHostConnectionTypeUnavailable = NetHostConnectionTypeKey.String("unavailable") - // unknown - NetHostConnectionTypeUnknown = NetHostConnectionTypeKey.String("unknown") -) - -var ( - // GPRS - NetHostConnectionSubtypeGprs = NetHostConnectionSubtypeKey.String("gprs") - // EDGE - NetHostConnectionSubtypeEdge = NetHostConnectionSubtypeKey.String("edge") - // UMTS - NetHostConnectionSubtypeUmts = NetHostConnectionSubtypeKey.String("umts") - // CDMA - NetHostConnectionSubtypeCdma = NetHostConnectionSubtypeKey.String("cdma") - // EVDO Rel. 0 - NetHostConnectionSubtypeEvdo0 = NetHostConnectionSubtypeKey.String("evdo_0") - // EVDO Rev. A - NetHostConnectionSubtypeEvdoA = NetHostConnectionSubtypeKey.String("evdo_a") - // CDMA2000 1XRTT - NetHostConnectionSubtypeCdma20001xrtt = NetHostConnectionSubtypeKey.String("cdma2000_1xrtt") - // HSDPA - NetHostConnectionSubtypeHsdpa = NetHostConnectionSubtypeKey.String("hsdpa") - // HSUPA - NetHostConnectionSubtypeHsupa = NetHostConnectionSubtypeKey.String("hsupa") - // HSPA - NetHostConnectionSubtypeHspa = NetHostConnectionSubtypeKey.String("hspa") - // IDEN - NetHostConnectionSubtypeIden = NetHostConnectionSubtypeKey.String("iden") - // EVDO Rev. B - NetHostConnectionSubtypeEvdoB = NetHostConnectionSubtypeKey.String("evdo_b") - // LTE - NetHostConnectionSubtypeLte = NetHostConnectionSubtypeKey.String("lte") - // EHRPD - NetHostConnectionSubtypeEhrpd = NetHostConnectionSubtypeKey.String("ehrpd") - // HSPAP - NetHostConnectionSubtypeHspap = NetHostConnectionSubtypeKey.String("hspap") - // GSM - NetHostConnectionSubtypeGsm = NetHostConnectionSubtypeKey.String("gsm") - // TD-SCDMA - NetHostConnectionSubtypeTdScdma = NetHostConnectionSubtypeKey.String("td_scdma") - // IWLAN - NetHostConnectionSubtypeIwlan = NetHostConnectionSubtypeKey.String("iwlan") - // 5G NR (New Radio) - NetHostConnectionSubtypeNr = NetHostConnectionSubtypeKey.String("nr") - // 5G NRNSA (New Radio Non-Standalone) - NetHostConnectionSubtypeNrnsa = NetHostConnectionSubtypeKey.String("nrnsa") - // LTE CA - NetHostConnectionSubtypeLteCa = NetHostConnectionSubtypeKey.String("lte_ca") -) - -// NetAppProtocolName returns an attribute KeyValue conforming to the -// "net.app.protocol.name" semantic conventions. It represents the application -// layer protocol used. The value SHOULD be normalized to lowercase. -func NetAppProtocolName(val string) attribute.KeyValue { - return NetAppProtocolNameKey.String(val) -} - -// NetAppProtocolVersion returns an attribute KeyValue conforming to the -// "net.app.protocol.version" semantic conventions. It represents the version -// of the application layer protocol used. See note below. -func NetAppProtocolVersion(val string) attribute.KeyValue { - return NetAppProtocolVersionKey.String(val) -} - -// NetSockPeerName returns an attribute KeyValue conforming to the -// "net.sock.peer.name" semantic conventions. It represents the remote socket -// peer name. -func NetSockPeerName(val string) attribute.KeyValue { - return NetSockPeerNameKey.String(val) -} - -// NetSockPeerAddr returns an attribute KeyValue conforming to the -// "net.sock.peer.addr" semantic conventions. It represents the remote socket -// peer address: IPv4 or IPv6 for internet protocols, path for local -// communication, -// [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). -func NetSockPeerAddr(val string) attribute.KeyValue { - return NetSockPeerAddrKey.String(val) -} - -// NetSockPeerPort returns an attribute KeyValue conforming to the -// "net.sock.peer.port" semantic conventions. It represents the remote socket -// peer port. -func NetSockPeerPort(val int) attribute.KeyValue { - return NetSockPeerPortKey.Int(val) -} - -// NetPeerName returns an attribute KeyValue conforming to the -// "net.peer.name" semantic conventions. It represents the logical remote -// hostname, see note below. -func NetPeerName(val string) attribute.KeyValue { - return NetPeerNameKey.String(val) -} - -// NetPeerPort returns an attribute KeyValue conforming to the -// "net.peer.port" semantic conventions. It represents the logical remote port -// number -func NetPeerPort(val int) attribute.KeyValue { - return NetPeerPortKey.Int(val) -} - -// NetHostName returns an attribute KeyValue conforming to the -// "net.host.name" semantic conventions. It represents the logical local -// hostname or similar, see note below. -func NetHostName(val string) attribute.KeyValue { - return NetHostNameKey.String(val) -} - -// NetHostPort returns an attribute KeyValue conforming to the -// "net.host.port" semantic conventions. It represents the logical local port -// number, preferably the one that the peer used to connect -func NetHostPort(val int) attribute.KeyValue { - return NetHostPortKey.Int(val) -} - -// NetSockHostAddr returns an attribute KeyValue conforming to the -// "net.sock.host.addr" semantic conventions. It represents the local socket -// address. Useful in case of a multi-IP host. -func NetSockHostAddr(val string) attribute.KeyValue { - return NetSockHostAddrKey.String(val) -} - -// NetSockHostPort returns an attribute KeyValue conforming to the -// "net.sock.host.port" semantic conventions. It represents the local socket -// port number. -func NetSockHostPort(val int) attribute.KeyValue { - return NetSockHostPortKey.Int(val) -} - -// NetHostCarrierName returns an attribute KeyValue conforming to the -// "net.host.carrier.name" semantic conventions. It represents the name of the -// mobile carrier. -func NetHostCarrierName(val string) attribute.KeyValue { - return NetHostCarrierNameKey.String(val) -} - -// NetHostCarrierMcc returns an attribute KeyValue conforming to the -// "net.host.carrier.mcc" semantic conventions. It represents the mobile -// carrier country code. -func NetHostCarrierMcc(val string) attribute.KeyValue { - return NetHostCarrierMccKey.String(val) -} - -// NetHostCarrierMnc returns an attribute KeyValue conforming to the -// "net.host.carrier.mnc" semantic conventions. It represents the mobile -// carrier network code. -func NetHostCarrierMnc(val string) attribute.KeyValue { - return NetHostCarrierMncKey.String(val) -} - -// NetHostCarrierIcc returns an attribute KeyValue conforming to the -// "net.host.carrier.icc" semantic conventions. It represents the ISO 3166-1 -// alpha-2 2-character country code associated with the mobile carrier network. -func NetHostCarrierIcc(val string) attribute.KeyValue { - return NetHostCarrierIccKey.String(val) -} - -// Operations that access some remote service. -const ( - // PeerServiceKey is the attribute Key conforming to the "peer.service" - // semantic conventions. It represents the - // [`service.name`](../../resource/semantic_conventions/README.md#service) - // of the remote service. SHOULD be equal to the actual `service.name` - // resource attribute of the remote service if any. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'AuthTokenCache' - PeerServiceKey = attribute.Key("peer.service") -) - -// PeerService returns an attribute KeyValue conforming to the -// "peer.service" semantic conventions. It represents the -// [`service.name`](../../resource/semantic_conventions/README.md#service) of -// the remote service. SHOULD be equal to the actual `service.name` resource -// attribute of the remote service if any. -func PeerService(val string) attribute.KeyValue { - return PeerServiceKey.String(val) -} - -// These attributes may be used for any operation with an authenticated and/or -// authorized enduser. -const ( - // EnduserIDKey is the attribute Key conforming to the "enduser.id" - // semantic conventions. It represents the username or client_id extracted - // from the access token or - // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header - // in the inbound request from outside the system. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'username' - EnduserIDKey = attribute.Key("enduser.id") - - // EnduserRoleKey is the attribute Key conforming to the "enduser.role" - // semantic conventions. It represents the actual/assumed role the client - // is making the request under extracted from token or application security - // context. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'admin' - EnduserRoleKey = attribute.Key("enduser.role") - - // EnduserScopeKey is the attribute Key conforming to the "enduser.scope" - // semantic conventions. It represents the scopes or granted authorities - // the client currently possesses extracted from token or application - // security context. The value would come from the scope associated with an - // [OAuth 2.0 Access - // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute - // value in a [SAML 2.0 - // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'read:message, write:files' - EnduserScopeKey = attribute.Key("enduser.scope") -) - -// EnduserID returns an attribute KeyValue conforming to the "enduser.id" -// semantic conventions. It represents the username or client_id extracted from -// the access token or -// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in -// the inbound request from outside the system. -func EnduserID(val string) attribute.KeyValue { - return EnduserIDKey.String(val) -} - -// EnduserRole returns an attribute KeyValue conforming to the -// "enduser.role" semantic conventions. It represents the actual/assumed role -// the client is making the request under extracted from token or application -// security context. -func EnduserRole(val string) attribute.KeyValue { - return EnduserRoleKey.String(val) -} - -// EnduserScope returns an attribute KeyValue conforming to the -// "enduser.scope" semantic conventions. It represents the scopes or granted -// authorities the client currently possesses extracted from token or -// application security context. The value would come from the scope associated -// with an [OAuth 2.0 Access -// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute -// value in a [SAML 2.0 -// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). -func EnduserScope(val string) attribute.KeyValue { - return EnduserScopeKey.String(val) -} - -// These attributes may be used for any operation to store information about a -// thread that started a span. -const ( - // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic - // conventions. It represents the current "managed" thread ID (as opposed - // to OS thread ID). - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 42 - ThreadIDKey = attribute.Key("thread.id") - - // ThreadNameKey is the attribute Key conforming to the "thread.name" - // semantic conventions. It represents the current thread name. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'main' - ThreadNameKey = attribute.Key("thread.name") -) - -// ThreadID returns an attribute KeyValue conforming to the "thread.id" -// semantic conventions. It represents the current "managed" thread ID (as -// opposed to OS thread ID). -func ThreadID(val int) attribute.KeyValue { - return ThreadIDKey.Int(val) -} - -// ThreadName returns an attribute KeyValue conforming to the "thread.name" -// semantic conventions. It represents the current thread name. -func ThreadName(val string) attribute.KeyValue { - return ThreadNameKey.String(val) -} - -// These attributes allow to report this unit of code and therefore to provide -// more context about the span. -const ( - // CodeFunctionKey is the attribute Key conforming to the "code.function" - // semantic conventions. It represents the method or function name, or - // equivalent (usually rightmost part of the code unit's name). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'serveRequest' - CodeFunctionKey = attribute.Key("code.function") - - // CodeNamespaceKey is the attribute Key conforming to the "code.namespace" - // semantic conventions. It represents the "namespace" within which - // `code.function` is defined. Usually the qualified class or module name, - // such that `code.namespace` + some separator + `code.function` form a - // unique identifier for the code unit. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'com.example.MyHTTPService' - CodeNamespaceKey = attribute.Key("code.namespace") - - // CodeFilepathKey is the attribute Key conforming to the "code.filepath" - // semantic conventions. It represents the source code file name that - // identifies the code unit as uniquely as possible (preferably an absolute - // file path). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '/usr/local/MyApplication/content_root/app/index.php' - CodeFilepathKey = attribute.Key("code.filepath") - - // CodeLineNumberKey is the attribute Key conforming to the "code.lineno" - // semantic conventions. It represents the line number in `code.filepath` - // best representing the operation. It SHOULD point within the code unit - // named in `code.function`. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 42 - CodeLineNumberKey = attribute.Key("code.lineno") - - // CodeColumnKey is the attribute Key conforming to the "code.column" - // semantic conventions. It represents the column number in `code.filepath` - // best representing the operation. It SHOULD point within the code unit - // named in `code.function`. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 16 - CodeColumnKey = attribute.Key("code.column") -) - -// CodeFunction returns an attribute KeyValue conforming to the -// "code.function" semantic conventions. It represents the method or function -// name, or equivalent (usually rightmost part of the code unit's name). -func CodeFunction(val string) attribute.KeyValue { - return CodeFunctionKey.String(val) -} - -// CodeNamespace returns an attribute KeyValue conforming to the -// "code.namespace" semantic conventions. It represents the "namespace" within -// which `code.function` is defined. Usually the qualified class or module -// name, such that `code.namespace` + some separator + `code.function` form a -// unique identifier for the code unit. -func CodeNamespace(val string) attribute.KeyValue { - return CodeNamespaceKey.String(val) -} - -// CodeFilepath returns an attribute KeyValue conforming to the -// "code.filepath" semantic conventions. It represents the source code file -// name that identifies the code unit as uniquely as possible (preferably an -// absolute file path). -func CodeFilepath(val string) attribute.KeyValue { - return CodeFilepathKey.String(val) -} - -// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" -// semantic conventions. It represents the line number in `code.filepath` best -// representing the operation. It SHOULD point within the code unit named in -// `code.function`. -func CodeLineNumber(val int) attribute.KeyValue { - return CodeLineNumberKey.Int(val) -} - -// CodeColumn returns an attribute KeyValue conforming to the "code.column" -// semantic conventions. It represents the column number in `code.filepath` -// best representing the operation. It SHOULD point within the code unit named -// in `code.function`. -func CodeColumn(val int) attribute.KeyValue { - return CodeColumnKey.Int(val) -} - -// Semantic conventions for HTTP client and server Spans. -const ( - // HTTPMethodKey is the attribute Key conforming to the "http.method" - // semantic conventions. It represents the hTTP request method. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'GET', 'POST', 'HEAD' - HTTPMethodKey = attribute.Key("http.method") - - // HTTPStatusCodeKey is the attribute Key conforming to the - // "http.status_code" semantic conventions. It represents the [HTTP - // response status code](https://tools.ietf.org/html/rfc7231#section-6). - // - // Type: int - // RequirementLevel: ConditionallyRequired (If and only if one was - // received/sent.) - // Stability: stable - // Examples: 200 - HTTPStatusCodeKey = attribute.Key("http.status_code") - - // HTTPFlavorKey is the attribute Key conforming to the "http.flavor" - // semantic conventions. It represents the kind of HTTP protocol used. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Note: If `net.transport` is not specified, it can be assumed to be - // `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is - // assumed. - HTTPFlavorKey = attribute.Key("http.flavor") - - // HTTPUserAgentKey is the attribute Key conforming to the - // "http.user_agent" semantic conventions. It represents the value of the - // [HTTP - // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) - // header sent by the client. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'CERN-LineMode/2.15 libwww/2.17b3' - HTTPUserAgentKey = attribute.Key("http.user_agent") - - // HTTPRequestContentLengthKey is the attribute Key conforming to the - // "http.request_content_length" semantic conventions. It represents the - // size of the request payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as - // the - // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) - // header. For requests using transport encoding, this should be the - // compressed size. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 3495 - HTTPRequestContentLengthKey = attribute.Key("http.request_content_length") - - // HTTPResponseContentLengthKey is the attribute Key conforming to the - // "http.response_content_length" semantic conventions. It represents the - // size of the response payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as - // the - // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) - // header. For requests using transport encoding, this should be the - // compressed size. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 3495 - HTTPResponseContentLengthKey = attribute.Key("http.response_content_length") -) - -var ( - // HTTP/1.0 - HTTPFlavorHTTP10 = HTTPFlavorKey.String("1.0") - // HTTP/1.1 - HTTPFlavorHTTP11 = HTTPFlavorKey.String("1.1") - // HTTP/2 - HTTPFlavorHTTP20 = HTTPFlavorKey.String("2.0") - // HTTP/3 - HTTPFlavorHTTP30 = HTTPFlavorKey.String("3.0") - // SPDY protocol - HTTPFlavorSPDY = HTTPFlavorKey.String("SPDY") - // QUIC protocol - HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC") -) - -// HTTPMethod returns an attribute KeyValue conforming to the "http.method" -// semantic conventions. It represents the hTTP request method. -func HTTPMethod(val string) attribute.KeyValue { - return HTTPMethodKey.String(val) -} - -// HTTPStatusCode returns an attribute KeyValue conforming to the -// "http.status_code" semantic conventions. It represents the [HTTP response -// status code](https://tools.ietf.org/html/rfc7231#section-6). -func HTTPStatusCode(val int) attribute.KeyValue { - return HTTPStatusCodeKey.Int(val) -} - -// HTTPUserAgent returns an attribute KeyValue conforming to the -// "http.user_agent" semantic conventions. It represents the value of the [HTTP -// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) -// header sent by the client. -func HTTPUserAgent(val string) attribute.KeyValue { - return HTTPUserAgentKey.String(val) -} - -// HTTPRequestContentLength returns an attribute KeyValue conforming to the -// "http.request_content_length" semantic conventions. It represents the size -// of the request payload body in bytes. This is the number of bytes -// transferred excluding headers and is often, but not always, present as the -// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) -// header. For requests using transport encoding, this should be the compressed -// size. -func HTTPRequestContentLength(val int) attribute.KeyValue { - return HTTPRequestContentLengthKey.Int(val) -} - -// HTTPResponseContentLength returns an attribute KeyValue conforming to the -// "http.response_content_length" semantic conventions. It represents the size -// of the response payload body in bytes. This is the number of bytes -// transferred excluding headers and is often, but not always, present as the -// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) -// header. For requests using transport encoding, this should be the compressed -// size. -func HTTPResponseContentLength(val int) attribute.KeyValue { - return HTTPResponseContentLengthKey.Int(val) -} - -// Semantic Convention for HTTP Client -const ( - // HTTPURLKey is the attribute Key conforming to the "http.url" semantic - // conventions. It represents the full HTTP request URL in the form - // `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is - // not transmitted over HTTP, but if it is known, it should be included - // nevertheless. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' - // Note: `http.url` MUST NOT contain credentials passed via URL in form of - // `https://username:password@www.example.com/`. In such case the - // attribute's value should be `https://www.example.com/`. - HTTPURLKey = attribute.Key("http.url") - - // HTTPResendCountKey is the attribute Key conforming to the - // "http.resend_count" semantic conventions. It represents the ordinal - // number of request resending attempt (for any reason, including - // redirects). - // - // Type: int - // RequirementLevel: Recommended (if and only if request was retried.) - // Stability: stable - // Examples: 3 - // Note: The resend count SHOULD be updated each time an HTTP request gets - // resent by the client, regardless of what was the cause of the resending - // (e.g. redirection, authorization failure, 503 Server Unavailable, - // network issues, or any other). - HTTPResendCountKey = attribute.Key("http.resend_count") -) - -// HTTPURL returns an attribute KeyValue conforming to the "http.url" -// semantic conventions. It represents the full HTTP request URL in the form -// `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not -// transmitted over HTTP, but if it is known, it should be included -// nevertheless. -func HTTPURL(val string) attribute.KeyValue { - return HTTPURLKey.String(val) -} - -// HTTPResendCount returns an attribute KeyValue conforming to the -// "http.resend_count" semantic conventions. It represents the ordinal number -// of request resending attempt (for any reason, including redirects). -func HTTPResendCount(val int) attribute.KeyValue { - return HTTPResendCountKey.Int(val) -} - -// Semantic Convention for HTTP Server -const ( - // HTTPSchemeKey is the attribute Key conforming to the "http.scheme" - // semantic conventions. It represents the URI scheme identifying the used - // protocol. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'http', 'https' - HTTPSchemeKey = attribute.Key("http.scheme") - - // HTTPTargetKey is the attribute Key conforming to the "http.target" - // semantic conventions. It represents the full request target as passed in - // a HTTP request line or equivalent. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: '/path/12314/?q=ddds' - HTTPTargetKey = attribute.Key("http.target") - - // HTTPRouteKey is the attribute Key conforming to the "http.route" - // semantic conventions. It represents the matched route (path template in - // the format used by the respective server framework). See note below - // - // Type: string - // RequirementLevel: ConditionallyRequired (If and only if it's available) - // Stability: stable - // Examples: '/users/:userID?', '{controller}/{action}/{id?}' - // Note: 'http.route' MUST NOT be populated when this is not supported by - // the HTTP server framework as the route attribute should have - // low-cardinality and the URI path can NOT substitute it. - HTTPRouteKey = attribute.Key("http.route") - - // HTTPClientIPKey is the attribute Key conforming to the "http.client_ip" - // semantic conventions. It represents the IP address of the original - // client behind all proxies, if known (e.g. from - // [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '83.164.160.102' - // Note: This is not necessarily the same as `net.sock.peer.addr`, which - // would - // identify the network-level peer, which may be a proxy. - // - // This attribute should be set when a source of information different - // from the one used for `net.sock.peer.addr`, is available even if that - // other - // source just confirms the same value as `net.sock.peer.addr`. - // Rationale: For `net.sock.peer.addr`, one typically does not know if it - // comes from a proxy, reverse proxy, or the actual client. Setting - // `http.client_ip` when it's the same as `net.sock.peer.addr` means that - // one is at least somewhat confident that the address is not that of - // the closest proxy. - HTTPClientIPKey = attribute.Key("http.client_ip") -) - -// HTTPScheme returns an attribute KeyValue conforming to the "http.scheme" -// semantic conventions. It represents the URI scheme identifying the used -// protocol. -func HTTPScheme(val string) attribute.KeyValue { - return HTTPSchemeKey.String(val) -} - -// HTTPTarget returns an attribute KeyValue conforming to the "http.target" -// semantic conventions. It represents the full request target as passed in a -// HTTP request line or equivalent. -func HTTPTarget(val string) attribute.KeyValue { - return HTTPTargetKey.String(val) -} - -// HTTPRoute returns an attribute KeyValue conforming to the "http.route" -// semantic conventions. It represents the matched route (path template in the -// format used by the respective server framework). See note below -func HTTPRoute(val string) attribute.KeyValue { - return HTTPRouteKey.String(val) -} - -// HTTPClientIP returns an attribute KeyValue conforming to the -// "http.client_ip" semantic conventions. It represents the IP address of the -// original client behind all proxies, if known (e.g. from -// [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). -func HTTPClientIP(val string) attribute.KeyValue { - return HTTPClientIPKey.String(val) -} - -// Attributes that exist for multiple DynamoDB request types. -const ( - // AWSDynamoDBTableNamesKey is the attribute Key conforming to the - // "aws.dynamodb.table_names" semantic conventions. It represents the keys - // in the `RequestItems` object field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Users', 'Cats' - AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") - - // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the - // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the - // JSON-serialized value of each item in the `ConsumedCapacity` response - // field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { - // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, - // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : - // { "CapacityUnits": number, "ReadCapacityUnits": number, - // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": - // { "CapacityUnits": number, "ReadCapacityUnits": number, - // "WriteCapacityUnits": number }, "TableName": "string", - // "WriteCapacityUnits": number }' - AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") - - // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to - // the "aws.dynamodb.item_collection_metrics" semantic conventions. It - // represents the JSON-serialized value of the `ItemCollectionMetrics` - // response field. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": - // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { - // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], - // "NULL": boolean, "S": "string", "SS": [ "string" ] } }, - // "SizeEstimateRangeGB": [ number ] } ] }' - AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") - - // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to - // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It - // represents the value of the `ProvisionedThroughput.ReadCapacityUnits` - // request parameter. - // - // Type: double - // RequirementLevel: Optional - // Stability: stable - // Examples: 1.0, 2.0 - AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") - - // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming - // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. - // It represents the value of the - // `ProvisionedThroughput.WriteCapacityUnits` request parameter. - // - // Type: double - // RequirementLevel: Optional - // Stability: stable - // Examples: 1.0, 2.0 - AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") - - // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the - // "aws.dynamodb.consistent_read" semantic conventions. It represents the - // value of the `ConsistentRead` request parameter. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") - - // AWSDynamoDBProjectionKey is the attribute Key conforming to the - // "aws.dynamodb.projection" semantic conventions. It represents the value - // of the `ProjectionExpression` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Title', 'Title, Price, Color', 'Title, Description, - // RelatedItems, ProductReviews' - AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") - - // AWSDynamoDBLimitKey is the attribute Key conforming to the - // "aws.dynamodb.limit" semantic conventions. It represents the value of - // the `Limit` request parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 10 - AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") - - // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the - // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the - // value of the `AttributesToGet` request parameter. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: 'lives', 'id' - AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") - - // AWSDynamoDBIndexNameKey is the attribute Key conforming to the - // "aws.dynamodb.index_name" semantic conventions. It represents the value - // of the `IndexName` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'name_to_group' - AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") - - // AWSDynamoDBSelectKey is the attribute Key conforming to the - // "aws.dynamodb.select" semantic conventions. It represents the value of - // the `Select` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'ALL_ATTRIBUTES', 'COUNT' - AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") -) - -// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the -// "aws.dynamodb.table_names" semantic conventions. It represents the keys in -// the `RequestItems` object field. -func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { - return AWSDynamoDBTableNamesKey.StringSlice(val) -} - -// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to -// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the -// JSON-serialized value of each item in the `ConsumedCapacity` response field. -func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { - return AWSDynamoDBConsumedCapacityKey.StringSlice(val) -} - -// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming -// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It -// represents the JSON-serialized value of the `ItemCollectionMetrics` response -// field. -func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { - return AWSDynamoDBItemCollectionMetricsKey.String(val) -} - -// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue -// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic -// conventions. It represents the value of the -// `ProvisionedThroughput.ReadCapacityUnits` request parameter. -func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { - return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) -} - -// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue -// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic -// conventions. It represents the value of the -// `ProvisionedThroughput.WriteCapacityUnits` request parameter. -func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { - return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) -} - -// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the -// "aws.dynamodb.consistent_read" semantic conventions. It represents the value -// of the `ConsistentRead` request parameter. -func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { - return AWSDynamoDBConsistentReadKey.Bool(val) -} - -// AWSDynamoDBProjection returns an attribute KeyValue conforming to the -// "aws.dynamodb.projection" semantic conventions. It represents the value of -// the `ProjectionExpression` request parameter. -func AWSDynamoDBProjection(val string) attribute.KeyValue { - return AWSDynamoDBProjectionKey.String(val) -} - -// AWSDynamoDBLimit returns an attribute KeyValue conforming to the -// "aws.dynamodb.limit" semantic conventions. It represents the value of the -// `Limit` request parameter. -func AWSDynamoDBLimit(val int) attribute.KeyValue { - return AWSDynamoDBLimitKey.Int(val) -} - -// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to -// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the -// value of the `AttributesToGet` request parameter. -func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { - return AWSDynamoDBAttributesToGetKey.StringSlice(val) -} - -// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the -// "aws.dynamodb.index_name" semantic conventions. It represents the value of -// the `IndexName` request parameter. -func AWSDynamoDBIndexName(val string) attribute.KeyValue { - return AWSDynamoDBIndexNameKey.String(val) -} - -// AWSDynamoDBSelect returns an attribute KeyValue conforming to the -// "aws.dynamodb.select" semantic conventions. It represents the value of the -// `Select` request parameter. -func AWSDynamoDBSelect(val string) attribute.KeyValue { - return AWSDynamoDBSelectKey.String(val) -} - -// DynamoDB.CreateTable -const ( - // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to - // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It - // represents the JSON-serialized value of each item of the - // `GlobalSecondaryIndexes` request field - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": - // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ - // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { - // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' - AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") - - // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to - // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It - // represents the JSON-serialized value of each item of the - // `LocalSecondaryIndexes` request field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "IndexARN": "string", "IndexName": "string", - // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { - // "AttributeName": "string", "KeyType": "string" } ], "Projection": { - // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' - AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") -) - -// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue -// conforming to the "aws.dynamodb.global_secondary_indexes" semantic -// conventions. It represents the JSON-serialized value of each item of the -// `GlobalSecondaryIndexes` request field -func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { - return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) -} - -// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming -// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It -// represents the JSON-serialized value of each item of the -// `LocalSecondaryIndexes` request field. -func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { - return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) -} - -// DynamoDB.ListTables -const ( - // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the - // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents - // the value of the `ExclusiveStartTableName` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Users', 'CatsTable' - AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") - - // AWSDynamoDBTableCountKey is the attribute Key conforming to the - // "aws.dynamodb.table_count" semantic conventions. It represents the the - // number of items in the `TableNames` response parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 20 - AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") -) - -// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming -// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It -// represents the value of the `ExclusiveStartTableName` request parameter. -func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { - return AWSDynamoDBExclusiveStartTableKey.String(val) -} - -// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.table_count" semantic conventions. It represents the the -// number of items in the `TableNames` response parameter. -func AWSDynamoDBTableCount(val int) attribute.KeyValue { - return AWSDynamoDBTableCountKey.Int(val) -} - -// DynamoDB.Query -const ( - // AWSDynamoDBScanForwardKey is the attribute Key conforming to the - // "aws.dynamodb.scan_forward" semantic conventions. It represents the - // value of the `ScanIndexForward` request parameter. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") -) - -// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the -// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of -// the `ScanIndexForward` request parameter. -func AWSDynamoDBScanForward(val bool) attribute.KeyValue { - return AWSDynamoDBScanForwardKey.Bool(val) -} - -// DynamoDB.Scan -const ( - // AWSDynamoDBSegmentKey is the attribute Key conforming to the - // "aws.dynamodb.segment" semantic conventions. It represents the value of - // the `Segment` request parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 10 - AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") - - // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the - // "aws.dynamodb.total_segments" semantic conventions. It represents the - // value of the `TotalSegments` request parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 100 - AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") - - // AWSDynamoDBCountKey is the attribute Key conforming to the - // "aws.dynamodb.count" semantic conventions. It represents the value of - // the `Count` response parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 10 - AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") - - // AWSDynamoDBScannedCountKey is the attribute Key conforming to the - // "aws.dynamodb.scanned_count" semantic conventions. It represents the - // value of the `ScannedCount` response parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 50 - AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") -) - -// AWSDynamoDBSegment returns an attribute KeyValue conforming to the -// "aws.dynamodb.segment" semantic conventions. It represents the value of the -// `Segment` request parameter. -func AWSDynamoDBSegment(val int) attribute.KeyValue { - return AWSDynamoDBSegmentKey.Int(val) -} - -// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the -// "aws.dynamodb.total_segments" semantic conventions. It represents the value -// of the `TotalSegments` request parameter. -func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { - return AWSDynamoDBTotalSegmentsKey.Int(val) -} - -// AWSDynamoDBCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.count" semantic conventions. It represents the value of the -// `Count` response parameter. -func AWSDynamoDBCount(val int) attribute.KeyValue { - return AWSDynamoDBCountKey.Int(val) -} - -// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.scanned_count" semantic conventions. It represents the value -// of the `ScannedCount` response parameter. -func AWSDynamoDBScannedCount(val int) attribute.KeyValue { - return AWSDynamoDBScannedCountKey.Int(val) -} - -// DynamoDB.UpdateTable -const ( - // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to - // the "aws.dynamodb.attribute_definitions" semantic conventions. It - // represents the JSON-serialized value of each item in the - // `AttributeDefinitions` request field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' - AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") - - // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key - // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic - // conventions. It represents the JSON-serialized value of each item in the - // the `GlobalSecondaryIndexUpdates` request field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { - // "AttributeName": "string", "KeyType": "string" } ], "Projection": { - // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, - // "ProvisionedThroughput": { "ReadCapacityUnits": number, - // "WriteCapacityUnits": number } }' - AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") -) - -// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming -// to the "aws.dynamodb.attribute_definitions" semantic conventions. It -// represents the JSON-serialized value of each item in the -// `AttributeDefinitions` request field. -func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { - return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) -} - -// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue -// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic -// conventions. It represents the JSON-serialized value of each item in the the -// `GlobalSecondaryIndexUpdates` request field. -func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { - return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) -} - -// Semantic conventions to apply when instrumenting the GraphQL implementation. -// They map GraphQL operations to attributes on a Span. -const ( - // GraphqlOperationNameKey is the attribute Key conforming to the - // "graphql.operation.name" semantic conventions. It represents the name of - // the operation being executed. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'findBookByID' - GraphqlOperationNameKey = attribute.Key("graphql.operation.name") - - // GraphqlOperationTypeKey is the attribute Key conforming to the - // "graphql.operation.type" semantic conventions. It represents the type of - // the operation being executed. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'query', 'mutation', 'subscription' - GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") - - // GraphqlDocumentKey is the attribute Key conforming to the - // "graphql.document" semantic conventions. It represents the GraphQL - // document being executed. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'query findBookByID { bookByID(id: ?) { name } }' - // Note: The value may be sanitized to exclude sensitive information. - GraphqlDocumentKey = attribute.Key("graphql.document") -) - -var ( - // GraphQL query - GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") - // GraphQL mutation - GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") - // GraphQL subscription - GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") -) - -// GraphqlOperationName returns an attribute KeyValue conforming to the -// "graphql.operation.name" semantic conventions. It represents the name of the -// operation being executed. -func GraphqlOperationName(val string) attribute.KeyValue { - return GraphqlOperationNameKey.String(val) -} - -// GraphqlDocument returns an attribute KeyValue conforming to the -// "graphql.document" semantic conventions. It represents the GraphQL document -// being executed. -func GraphqlDocument(val string) attribute.KeyValue { - return GraphqlDocumentKey.String(val) -} - -// Semantic convention describing per-message attributes populated on messaging -// spans or links. -const ( - // MessagingMessageIDKey is the attribute Key conforming to the - // "messaging.message.id" semantic conventions. It represents a value used - // by the messaging system as an identifier for the message, represented as - // a string. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '452a7c7c7c7048c2f887f61572b18fc2' - MessagingMessageIDKey = attribute.Key("messaging.message.id") - - // MessagingMessageConversationIDKey is the attribute Key conforming to the - // "messaging.message.conversation_id" semantic conventions. It represents - // the [conversation ID](#conversations) identifying the conversation to - // which the message belongs, represented as a string. Sometimes called - // "Correlation ID". - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'MyConversationID' - MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") - - // MessagingMessagePayloadSizeBytesKey is the attribute Key conforming to - // the "messaging.message.payload_size_bytes" semantic conventions. It - // represents the (uncompressed) size of the message payload in bytes. Also - // use this attribute if it is unknown whether the compressed or - // uncompressed payload size is reported. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 2738 - MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message.payload_size_bytes") - - // MessagingMessagePayloadCompressedSizeBytesKey is the attribute Key - // conforming to the "messaging.message.payload_compressed_size_bytes" - // semantic conventions. It represents the compressed size of the message - // payload in bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 2048 - MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message.payload_compressed_size_bytes") -) - -// MessagingMessageID returns an attribute KeyValue conforming to the -// "messaging.message.id" semantic conventions. It represents a value used by -// the messaging system as an identifier for the message, represented as a -// string. -func MessagingMessageID(val string) attribute.KeyValue { - return MessagingMessageIDKey.String(val) -} - -// MessagingMessageConversationID returns an attribute KeyValue conforming -// to the "messaging.message.conversation_id" semantic conventions. It -// represents the [conversation ID](#conversations) identifying the -// conversation to which the message belongs, represented as a string. -// Sometimes called "Correlation ID". -func MessagingMessageConversationID(val string) attribute.KeyValue { - return MessagingMessageConversationIDKey.String(val) -} - -// MessagingMessagePayloadSizeBytes returns an attribute KeyValue conforming -// to the "messaging.message.payload_size_bytes" semantic conventions. It -// represents the (uncompressed) size of the message payload in bytes. Also use -// this attribute if it is unknown whether the compressed or uncompressed -// payload size is reported. -func MessagingMessagePayloadSizeBytes(val int) attribute.KeyValue { - return MessagingMessagePayloadSizeBytesKey.Int(val) -} - -// MessagingMessagePayloadCompressedSizeBytes returns an attribute KeyValue -// conforming to the "messaging.message.payload_compressed_size_bytes" semantic -// conventions. It represents the compressed size of the message payload in -// bytes. -func MessagingMessagePayloadCompressedSizeBytes(val int) attribute.KeyValue { - return MessagingMessagePayloadCompressedSizeBytesKey.Int(val) -} - -// Semantic convention for attributes that describe messaging destination on -// broker -const ( - // MessagingDestinationNameKey is the attribute Key conforming to the - // "messaging.destination.name" semantic conventions. It represents the - // message destination name - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'MyQueue', 'MyTopic' - // Note: Destination name SHOULD uniquely identify a specific queue, topic - // or other entity within the broker. If - // the broker does not have such notion, the destination name SHOULD - // uniquely identify the broker. - MessagingDestinationNameKey = attribute.Key("messaging.destination.name") - - // MessagingDestinationKindKey is the attribute Key conforming to the - // "messaging.destination.kind" semantic conventions. It represents the - // kind of message destination - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - MessagingDestinationKindKey = attribute.Key("messaging.destination.kind") - - // MessagingDestinationTemplateKey is the attribute Key conforming to the - // "messaging.destination.template" semantic conventions. It represents the - // low cardinality representation of the messaging destination name - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '/customers/{customerID}' - // Note: Destination names could be constructed from templates. An example - // would be a destination name involving a user name or product id. - // Although the destination name in this case is of high cardinality, the - // underlying template is of low cardinality and can be effectively used - // for grouping and aggregation. - MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") - - // MessagingDestinationTemporaryKey is the attribute Key conforming to the - // "messaging.destination.temporary" semantic conventions. It represents a - // boolean that is true if the message destination is temporary and might - // not exist anymore after messages are processed. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") - - // MessagingDestinationAnonymousKey is the attribute Key conforming to the - // "messaging.destination.anonymous" semantic conventions. It represents a - // boolean that is true if the message destination is anonymous (could be - // unnamed or have auto-generated name). - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") -) - -var ( - // A message sent to a queue - MessagingDestinationKindQueue = MessagingDestinationKindKey.String("queue") - // A message sent to a topic - MessagingDestinationKindTopic = MessagingDestinationKindKey.String("topic") -) - -// MessagingDestinationName returns an attribute KeyValue conforming to the -// "messaging.destination.name" semantic conventions. It represents the message -// destination name -func MessagingDestinationName(val string) attribute.KeyValue { - return MessagingDestinationNameKey.String(val) -} - -// MessagingDestinationTemplate returns an attribute KeyValue conforming to -// the "messaging.destination.template" semantic conventions. It represents the -// low cardinality representation of the messaging destination name -func MessagingDestinationTemplate(val string) attribute.KeyValue { - return MessagingDestinationTemplateKey.String(val) -} - -// MessagingDestinationTemporary returns an attribute KeyValue conforming to -// the "messaging.destination.temporary" semantic conventions. It represents a -// boolean that is true if the message destination is temporary and might not -// exist anymore after messages are processed. -func MessagingDestinationTemporary(val bool) attribute.KeyValue { - return MessagingDestinationTemporaryKey.Bool(val) -} - -// MessagingDestinationAnonymous returns an attribute KeyValue conforming to -// the "messaging.destination.anonymous" semantic conventions. It represents a -// boolean that is true if the message destination is anonymous (could be -// unnamed or have auto-generated name). -func MessagingDestinationAnonymous(val bool) attribute.KeyValue { - return MessagingDestinationAnonymousKey.Bool(val) -} - -// Semantic convention for attributes that describe messaging source on broker -const ( - // MessagingSourceNameKey is the attribute Key conforming to the - // "messaging.source.name" semantic conventions. It represents the message - // source name - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'MyQueue', 'MyTopic' - // Note: Source name SHOULD uniquely identify a specific queue, topic, or - // other entity within the broker. If - // the broker does not have such notion, the source name SHOULD uniquely - // identify the broker. - MessagingSourceNameKey = attribute.Key("messaging.source.name") - - // MessagingSourceKindKey is the attribute Key conforming to the - // "messaging.source.kind" semantic conventions. It represents the kind of - // message source - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - MessagingSourceKindKey = attribute.Key("messaging.source.kind") - - // MessagingSourceTemplateKey is the attribute Key conforming to the - // "messaging.source.template" semantic conventions. It represents the low - // cardinality representation of the messaging source name - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '/customers/{customerID}' - // Note: Source names could be constructed from templates. An example would - // be a source name involving a user name or product id. Although the - // source name in this case is of high cardinality, the underlying template - // is of low cardinality and can be effectively used for grouping and - // aggregation. - MessagingSourceTemplateKey = attribute.Key("messaging.source.template") - - // MessagingSourceTemporaryKey is the attribute Key conforming to the - // "messaging.source.temporary" semantic conventions. It represents a - // boolean that is true if the message source is temporary and might not - // exist anymore after messages are processed. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - MessagingSourceTemporaryKey = attribute.Key("messaging.source.temporary") - - // MessagingSourceAnonymousKey is the attribute Key conforming to the - // "messaging.source.anonymous" semantic conventions. It represents a - // boolean that is true if the message source is anonymous (could be - // unnamed or have auto-generated name). - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - MessagingSourceAnonymousKey = attribute.Key("messaging.source.anonymous") -) - -var ( - // A message received from a queue - MessagingSourceKindQueue = MessagingSourceKindKey.String("queue") - // A message received from a topic - MessagingSourceKindTopic = MessagingSourceKindKey.String("topic") -) - -// MessagingSourceName returns an attribute KeyValue conforming to the -// "messaging.source.name" semantic conventions. It represents the message -// source name -func MessagingSourceName(val string) attribute.KeyValue { - return MessagingSourceNameKey.String(val) -} - -// MessagingSourceTemplate returns an attribute KeyValue conforming to the -// "messaging.source.template" semantic conventions. It represents the low -// cardinality representation of the messaging source name -func MessagingSourceTemplate(val string) attribute.KeyValue { - return MessagingSourceTemplateKey.String(val) -} - -// MessagingSourceTemporary returns an attribute KeyValue conforming to the -// "messaging.source.temporary" semantic conventions. It represents a boolean -// that is true if the message source is temporary and might not exist anymore -// after messages are processed. -func MessagingSourceTemporary(val bool) attribute.KeyValue { - return MessagingSourceTemporaryKey.Bool(val) -} - -// MessagingSourceAnonymous returns an attribute KeyValue conforming to the -// "messaging.source.anonymous" semantic conventions. It represents a boolean -// that is true if the message source is anonymous (could be unnamed or have -// auto-generated name). -func MessagingSourceAnonymous(val bool) attribute.KeyValue { - return MessagingSourceAnonymousKey.Bool(val) -} - -// General attributes used in messaging systems. -const ( - // MessagingSystemKey is the attribute Key conforming to the - // "messaging.system" semantic conventions. It represents a string - // identifying the messaging system. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' - MessagingSystemKey = attribute.Key("messaging.system") - - // MessagingOperationKey is the attribute Key conforming to the - // "messaging.operation" semantic conventions. It represents a string - // identifying the kind of messaging operation as defined in the [Operation - // names](#operation-names) section above. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - // Note: If a custom value is used, it MUST be of low cardinality. - MessagingOperationKey = attribute.Key("messaging.operation") - - // MessagingBatchMessageCountKey is the attribute Key conforming to the - // "messaging.batch.message_count" semantic conventions. It represents the - // number of messages sent, received, or processed in the scope of the - // batching operation. - // - // Type: int - // RequirementLevel: ConditionallyRequired (If the span describes an - // operation on a batch of messages.) - // Stability: stable - // Examples: 0, 1, 2 - // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on - // spans that operate with a single message. When a messaging client - // library supports both batch and single-message API for the same - // operation, instrumentations SHOULD use `messaging.batch.message_count` - // for batching APIs and SHOULD NOT use it for single-message APIs. - MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") -) - -var ( - // publish - MessagingOperationPublish = MessagingOperationKey.String("publish") - // receive - MessagingOperationReceive = MessagingOperationKey.String("receive") - // process - MessagingOperationProcess = MessagingOperationKey.String("process") -) - -// MessagingSystem returns an attribute KeyValue conforming to the -// "messaging.system" semantic conventions. It represents a string identifying -// the messaging system. -func MessagingSystem(val string) attribute.KeyValue { - return MessagingSystemKey.String(val) -} - -// MessagingBatchMessageCount returns an attribute KeyValue conforming to -// the "messaging.batch.message_count" semantic conventions. It represents the -// number of messages sent, received, or processed in the scope of the batching -// operation. -func MessagingBatchMessageCount(val int) attribute.KeyValue { - return MessagingBatchMessageCountKey.Int(val) -} - -// Semantic convention for a consumer of messages received from a messaging -// system -const ( - // MessagingConsumerIDKey is the attribute Key conforming to the - // "messaging.consumer.id" semantic conventions. It represents the - // identifier for the consumer receiving a message. For Kafka, set it to - // `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if - // both are present, or only `messaging.kafka.consumer.group`. For brokers, - // such as RabbitMQ and Artemis, set it to the `client_id` of the client - // consuming the message. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'mygroup - client-6' - MessagingConsumerIDKey = attribute.Key("messaging.consumer.id") -) - -// MessagingConsumerID returns an attribute KeyValue conforming to the -// "messaging.consumer.id" semantic conventions. It represents the identifier -// for the consumer receiving a message. For Kafka, set it to -// `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if both -// are present, or only `messaging.kafka.consumer.group`. For brokers, such as -// RabbitMQ and Artemis, set it to the `client_id` of the client consuming the -// message. -func MessagingConsumerID(val string) attribute.KeyValue { - return MessagingConsumerIDKey.String(val) -} - -// Attributes for RabbitMQ -const ( - // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key - // conforming to the "messaging.rabbitmq.destination.routing_key" semantic - // conventions. It represents the rabbitMQ message routing key. - // - // Type: string - // RequirementLevel: ConditionallyRequired (If not empty.) - // Stability: stable - // Examples: 'myKey' - MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") -) - -// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue -// conforming to the "messaging.rabbitmq.destination.routing_key" semantic -// conventions. It represents the rabbitMQ message routing key. -func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { - return MessagingRabbitmqDestinationRoutingKeyKey.String(val) -} - -// Attributes for Apache Kafka -const ( - // MessagingKafkaMessageKeyKey is the attribute Key conforming to the - // "messaging.kafka.message.key" semantic conventions. It represents the - // message keys in Kafka are used for grouping alike messages to ensure - // they're processed on the same partition. They differ from - // `messaging.message.id` in that they're not unique. If the key is `null`, - // the attribute MUST NOT be set. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'myKey' - // Note: If the key type is not string, it's string representation has to - // be supplied for the attribute. If the key has no unambiguous, canonical - // string form, don't include its value. - MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") - - // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the - // "messaging.kafka.consumer.group" semantic conventions. It represents the - // name of the Kafka Consumer Group that is handling the message. Only - // applies to consumers, not producers. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'my-group' - MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group") - - // MessagingKafkaClientIDKey is the attribute Key conforming to the - // "messaging.kafka.client_id" semantic conventions. It represents the - // client ID for the Consumer or Producer that is handling the message. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'client-5' - MessagingKafkaClientIDKey = attribute.Key("messaging.kafka.client_id") - - // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to - // the "messaging.kafka.destination.partition" semantic conventions. It - // represents the partition the message is sent to. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 2 - MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition") - - // MessagingKafkaSourcePartitionKey is the attribute Key conforming to the - // "messaging.kafka.source.partition" semantic conventions. It represents - // the partition the message is received from. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 2 - MessagingKafkaSourcePartitionKey = attribute.Key("messaging.kafka.source.partition") - - // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the - // "messaging.kafka.message.offset" semantic conventions. It represents the - // offset of a record in the corresponding Kafka partition. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 42 - MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset") - - // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the - // "messaging.kafka.message.tombstone" semantic conventions. It represents - // a boolean that is true if the message is a tombstone. - // - // Type: boolean - // RequirementLevel: ConditionallyRequired (If value is `true`. When - // missing, the value is assumed to be `false`.) - // Stability: stable - MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") -) - -// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the -// "messaging.kafka.message.key" semantic conventions. It represents the -// message keys in Kafka are used for grouping alike messages to ensure they're -// processed on the same partition. They differ from `messaging.message.id` in -// that they're not unique. If the key is `null`, the attribute MUST NOT be -// set. -func MessagingKafkaMessageKey(val string) attribute.KeyValue { - return MessagingKafkaMessageKeyKey.String(val) -} - -// MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to -// the "messaging.kafka.consumer.group" semantic conventions. It represents the -// name of the Kafka Consumer Group that is handling the message. Only applies -// to consumers, not producers. -func MessagingKafkaConsumerGroup(val string) attribute.KeyValue { - return MessagingKafkaConsumerGroupKey.String(val) -} - -// MessagingKafkaClientID returns an attribute KeyValue conforming to the -// "messaging.kafka.client_id" semantic conventions. It represents the client -// ID for the Consumer or Producer that is handling the message. -func MessagingKafkaClientID(val string) attribute.KeyValue { - return MessagingKafkaClientIDKey.String(val) -} - -// MessagingKafkaDestinationPartition returns an attribute KeyValue -// conforming to the "messaging.kafka.destination.partition" semantic -// conventions. It represents the partition the message is sent to. -func MessagingKafkaDestinationPartition(val int) attribute.KeyValue { - return MessagingKafkaDestinationPartitionKey.Int(val) -} - -// MessagingKafkaSourcePartition returns an attribute KeyValue conforming to -// the "messaging.kafka.source.partition" semantic conventions. It represents -// the partition the message is received from. -func MessagingKafkaSourcePartition(val int) attribute.KeyValue { - return MessagingKafkaSourcePartitionKey.Int(val) -} - -// MessagingKafkaMessageOffset returns an attribute KeyValue conforming to -// the "messaging.kafka.message.offset" semantic conventions. It represents the -// offset of a record in the corresponding Kafka partition. -func MessagingKafkaMessageOffset(val int) attribute.KeyValue { - return MessagingKafkaMessageOffsetKey.Int(val) -} - -// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming -// to the "messaging.kafka.message.tombstone" semantic conventions. It -// represents a boolean that is true if the message is a tombstone. -func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { - return MessagingKafkaMessageTombstoneKey.Bool(val) -} - -// Attributes for Apache RocketMQ -const ( - // MessagingRocketmqNamespaceKey is the attribute Key conforming to the - // "messaging.rocketmq.namespace" semantic conventions. It represents the - // namespace of RocketMQ resources, resources in different namespaces are - // individual. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'myNamespace' - MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") - - // MessagingRocketmqClientGroupKey is the attribute Key conforming to the - // "messaging.rocketmq.client_group" semantic conventions. It represents - // the name of the RocketMQ producer/consumer group that is handling the - // message. The client type is identified by the SpanKind. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'myConsumerGroup' - MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") - - // MessagingRocketmqClientIDKey is the attribute Key conforming to the - // "messaging.rocketmq.client_id" semantic conventions. It represents the - // unique identifier for each client. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'myhost@8742@s8083jm' - MessagingRocketmqClientIDKey = attribute.Key("messaging.rocketmq.client_id") - - // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key - // conforming to the "messaging.rocketmq.message.delivery_timestamp" - // semantic conventions. It represents the timestamp in milliseconds that - // the delay message is expected to be delivered to consumer. - // - // Type: int - // RequirementLevel: ConditionallyRequired (If the message type is delay - // and delay time level is not specified.) - // Stability: stable - // Examples: 1665987217045 - MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") - - // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key - // conforming to the "messaging.rocketmq.message.delay_time_level" semantic - // conventions. It represents the delay time level for delay message, which - // determines the message delay time. - // - // Type: int - // RequirementLevel: ConditionallyRequired (If the message type is delay - // and delivery timestamp is not specified.) - // Stability: stable - // Examples: 3 - MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") - - // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the - // "messaging.rocketmq.message.group" semantic conventions. It represents - // the it is essential for FIFO message. Messages that belong to the same - // message group are always processed one by one within the same consumer - // group. - // - // Type: string - // RequirementLevel: ConditionallyRequired (If the message type is FIFO.) - // Stability: stable - // Examples: 'myMessageGroup' - MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") - - // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the - // "messaging.rocketmq.message.type" semantic conventions. It represents - // the type of message. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") - - // MessagingRocketmqMessageTagKey is the attribute Key conforming to the - // "messaging.rocketmq.message.tag" semantic conventions. It represents the - // secondary classifier of message besides topic. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'tagA' - MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") - - // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the - // "messaging.rocketmq.message.keys" semantic conventions. It represents - // the key(s) of message, another way to mark message besides message id. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: 'keyA', 'keyB' - MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") - - // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to - // the "messaging.rocketmq.consumption_model" semantic conventions. It - // represents the model of message consumption. This only applies to - // consumer spans. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") -) - -var ( - // Normal message - MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") - // FIFO message - MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") - // Delay message - MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") - // Transaction message - MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") -) - -var ( - // Clustering consumption model - MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") - // Broadcasting consumption model - MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") -) - -// MessagingRocketmqNamespace returns an attribute KeyValue conforming to -// the "messaging.rocketmq.namespace" semantic conventions. It represents the -// namespace of RocketMQ resources, resources in different namespaces are -// individual. -func MessagingRocketmqNamespace(val string) attribute.KeyValue { - return MessagingRocketmqNamespaceKey.String(val) -} - -// MessagingRocketmqClientGroup returns an attribute KeyValue conforming to -// the "messaging.rocketmq.client_group" semantic conventions. It represents -// the name of the RocketMQ producer/consumer group that is handling the -// message. The client type is identified by the SpanKind. -func MessagingRocketmqClientGroup(val string) attribute.KeyValue { - return MessagingRocketmqClientGroupKey.String(val) -} - -// MessagingRocketmqClientID returns an attribute KeyValue conforming to the -// "messaging.rocketmq.client_id" semantic conventions. It represents the -// unique identifier for each client. -func MessagingRocketmqClientID(val string) attribute.KeyValue { - return MessagingRocketmqClientIDKey.String(val) -} - -// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue -// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic -// conventions. It represents the timestamp in milliseconds that the delay -// message is expected to be delivered to consumer. -func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { - return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) -} - -// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue -// conforming to the "messaging.rocketmq.message.delay_time_level" semantic -// conventions. It represents the delay time level for delay message, which -// determines the message delay time. -func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { - return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) -} - -// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to -// the "messaging.rocketmq.message.group" semantic conventions. It represents -// the it is essential for FIFO message. Messages that belong to the same -// message group are always processed one by one within the same consumer -// group. -func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { - return MessagingRocketmqMessageGroupKey.String(val) -} - -// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to -// the "messaging.rocketmq.message.tag" semantic conventions. It represents the -// secondary classifier of message besides topic. -func MessagingRocketmqMessageTag(val string) attribute.KeyValue { - return MessagingRocketmqMessageTagKey.String(val) -} - -// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to -// the "messaging.rocketmq.message.keys" semantic conventions. It represents -// the key(s) of message, another way to mark message besides message id. -func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { - return MessagingRocketmqMessageKeysKey.StringSlice(val) -} - -// Semantic conventions for remote procedure calls. -const ( - // RPCSystemKey is the attribute Key conforming to the "rpc.system" - // semantic conventions. It represents a string identifying the remoting - // system. See below for a list of well-known identifiers. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - RPCSystemKey = attribute.Key("rpc.system") - - // RPCServiceKey is the attribute Key conforming to the "rpc.service" - // semantic conventions. It represents the full (logical) name of the - // service being called, including its package name, if applicable. - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'myservice.EchoService' - // Note: This is the logical name of the service from the RPC interface - // perspective, which can be different from the name of any implementing - // class. The `code.namespace` attribute may be used to store the latter - // (despite the attribute name, it may include a class name; e.g., class - // with method actually executing the call on the server side, RPC client - // stub class on the client side). - RPCServiceKey = attribute.Key("rpc.service") - - // RPCMethodKey is the attribute Key conforming to the "rpc.method" - // semantic conventions. It represents the name of the (logical) method - // being called, must be equal to the $method part in the span name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'exampleMethod' - // Note: This is the logical name of the method from the RPC interface - // perspective, which can be different from the name of any implementing - // method/function. The `code.function` attribute may be used to store the - // latter (e.g., method actually executing the call on the server side, RPC - // client stub method on the client side). - RPCMethodKey = attribute.Key("rpc.method") -) - -var ( - // gRPC - RPCSystemGRPC = RPCSystemKey.String("grpc") - // Java RMI - RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") - // .NET WCF - RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") - // Apache Dubbo - RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") -) - -// RPCService returns an attribute KeyValue conforming to the "rpc.service" -// semantic conventions. It represents the full (logical) name of the service -// being called, including its package name, if applicable. -func RPCService(val string) attribute.KeyValue { - return RPCServiceKey.String(val) -} - -// RPCMethod returns an attribute KeyValue conforming to the "rpc.method" -// semantic conventions. It represents the name of the (logical) method being -// called, must be equal to the $method part in the span name. -func RPCMethod(val string) attribute.KeyValue { - return RPCMethodKey.String(val) -} - -// Tech-specific attributes for gRPC. -const ( - // RPCGRPCStatusCodeKey is the attribute Key conforming to the - // "rpc.grpc.status_code" semantic conventions. It represents the [numeric - // status - // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of - // the gRPC request. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") -) - -var ( - // OK - RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) - // CANCELLED - RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) - // UNKNOWN - RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) - // INVALID_ARGUMENT - RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) - // DEADLINE_EXCEEDED - RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) - // NOT_FOUND - RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) - // ALREADY_EXISTS - RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) - // PERMISSION_DENIED - RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) - // RESOURCE_EXHAUSTED - RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) - // FAILED_PRECONDITION - RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) - // ABORTED - RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) - // OUT_OF_RANGE - RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) - // UNIMPLEMENTED - RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) - // INTERNAL - RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) - // UNAVAILABLE - RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) - // DATA_LOSS - RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) - // UNAUTHENTICATED - RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) -) - -// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). -const ( - // RPCJsonrpcVersionKey is the attribute Key conforming to the - // "rpc.jsonrpc.version" semantic conventions. It represents the protocol - // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 - // does not specify this, the value can be omitted. - // - // Type: string - // RequirementLevel: ConditionallyRequired (If other than the default - // version (`1.0`)) - // Stability: stable - // Examples: '2.0', '1.0' - RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") - - // RPCJsonrpcRequestIDKey is the attribute Key conforming to the - // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` - // property of request or response. Since protocol allows id to be int, - // string, `null` or missing (for notifications), value is expected to be - // cast to string for simplicity. Use empty string in case of `null` value. - // Omit entirely if this is a notification. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '10', 'request-7', '' - RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") - - // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the - // "rpc.jsonrpc.error_code" semantic conventions. It represents the - // `error.code` property of response if it is an error response. - // - // Type: int - // RequirementLevel: ConditionallyRequired (If response is not successful.) - // Stability: stable - // Examples: -32700, 100 - RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") - - // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the - // "rpc.jsonrpc.error_message" semantic conventions. It represents the - // `error.message` property of response if it is an error response. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Parse error', 'User already exists' - RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") -) - -// RPCJsonrpcVersion returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.version" semantic conventions. It represents the protocol -// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 -// does not specify this, the value can be omitted. -func RPCJsonrpcVersion(val string) attribute.KeyValue { - return RPCJsonrpcVersionKey.String(val) -} - -// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` -// property of request or response. Since protocol allows id to be int, string, -// `null` or missing (for notifications), value is expected to be cast to -// string for simplicity. Use empty string in case of `null` value. Omit -// entirely if this is a notification. -func RPCJsonrpcRequestID(val string) attribute.KeyValue { - return RPCJsonrpcRequestIDKey.String(val) -} - -// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.error_code" semantic conventions. It represents the -// `error.code` property of response if it is an error response. -func RPCJsonrpcErrorCode(val int) attribute.KeyValue { - return RPCJsonrpcErrorCodeKey.Int(val) -} - -// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.error_message" semantic conventions. It represents the -// `error.message` property of response if it is an error response. -func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { - return RPCJsonrpcErrorMessageKey.String(val) -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md new file mode 100644 index 00000000000..82e1f46b4ea --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md @@ -0,0 +1,3 @@ +# Semconv v1.20.0 + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.20.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.20.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go index 67d1d4c44d7..6685c392b50 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go index 359c5a69624..0d1f55a8fe9 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 // Package semconv implements OpenTelemetry semantic conventions. // diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go index 8ac9350d2b2..63776393217 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go index 09ff4dfdbf7..f40c97825aa 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go index 342aede95f1..9c1840631b6 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go index a2b906742a8..3d44dae2750 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go index e449e5c3b9f..95d0210e38f 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go index 8517741485c..90b1b0452cc 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. diff --git a/vendor/go.opentelemetry.io/otel/trace.go b/vendor/go.opentelemetry.io/otel/trace.go index caf7249de85..6836c65478b 100644 --- a/vendor/go.opentelemetry.io/otel/trace.go +++ b/vendor/go.opentelemetry.io/otel/trace.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" diff --git a/vendor/go.opentelemetry.io/otel/trace/README.md b/vendor/go.opentelemetry.io/otel/trace/README.md new file mode 100644 index 00000000000..58ccaba69b1 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/README.md @@ -0,0 +1,3 @@ +# Trace API + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace)](https://pkg.go.dev/go.opentelemetry.io/otel/trace) diff --git a/vendor/go.opentelemetry.io/otel/trace/config.go b/vendor/go.opentelemetry.io/otel/trace/config.go index 3aadc66cf7a..273d58e0014 100644 --- a/vendor/go.opentelemetry.io/otel/trace/config.go +++ b/vendor/go.opentelemetry.io/otel/trace/config.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" diff --git a/vendor/go.opentelemetry.io/otel/trace/context.go b/vendor/go.opentelemetry.io/otel/trace/context.go index 76f9a083c40..5650a174b4a 100644 --- a/vendor/go.opentelemetry.io/otel/trace/context.go +++ b/vendor/go.opentelemetry.io/otel/trace/context.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" @@ -47,12 +36,12 @@ func ContextWithRemoteSpanContext(parent context.Context, rsc SpanContext) conte // performs no operations is returned. func SpanFromContext(ctx context.Context) Span { if ctx == nil { - return noopSpan{} + return noopSpanInstance } if span, ok := ctx.Value(currentSpanKey).(Span); ok { return span } - return noopSpan{} + return noopSpanInstance } // SpanContextFromContext returns the current Span's SpanContext. diff --git a/vendor/go.opentelemetry.io/otel/trace/doc.go b/vendor/go.opentelemetry.io/otel/trace/doc.go index 440f3d7565a..d661c5d100f 100644 --- a/vendor/go.opentelemetry.io/otel/trace/doc.go +++ b/vendor/go.opentelemetry.io/otel/trace/doc.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 /* Package trace provides an implementation of the tracing part of the diff --git a/vendor/go.opentelemetry.io/otel/trace/embedded/README.md b/vendor/go.opentelemetry.io/otel/trace/embedded/README.md new file mode 100644 index 00000000000..7754a239ee6 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/trace/embedded/README.md @@ -0,0 +1,3 @@ +# Trace Embedded + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/trace/embedded) diff --git a/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go b/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go index 898db5a7546..3e359a00bf4 100644 --- a/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go +++ b/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 // Package embedded provides interfaces embedded within the [OpenTelemetry // trace API]. diff --git a/vendor/go.opentelemetry.io/otel/trace/nonrecording.go b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go index 88fcb81611f..c00221e7be9 100644 --- a/vendor/go.opentelemetry.io/otel/trace/nonrecording.go +++ b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" diff --git a/vendor/go.opentelemetry.io/otel/trace/noop.go b/vendor/go.opentelemetry.io/otel/trace/noop.go index c125491caeb..ca20e9997ab 100644 --- a/vendor/go.opentelemetry.io/otel/trace/noop.go +++ b/vendor/go.opentelemetry.io/otel/trace/noop.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" @@ -52,7 +41,7 @@ func (t noopTracer) Start(ctx context.Context, name string, _ ...SpanStartOption span := SpanFromContext(ctx) if _, ok := span.(nonRecordingSpan); !ok { // span is likely already a noopSpan, but let's be sure - span = noopSpan{} + span = noopSpanInstance } return ContextWithSpan(ctx, span), span } @@ -60,7 +49,7 @@ func (t noopTracer) Start(ctx context.Context, name string, _ ...SpanStartOption // noopSpan is an implementation of Span that performs no operations. type noopSpan struct{ embedded.Span } -var _ Span = noopSpan{} +var noopSpanInstance Span = noopSpan{} // SpanContext returns an empty span context. func (noopSpan) SpanContext() SpanContext { return SpanContext{} } @@ -86,6 +75,9 @@ func (noopSpan) RecordError(error, ...EventOption) {} // AddEvent does nothing. func (noopSpan) AddEvent(string, ...EventOption) {} +// AddLink does nothing. +func (noopSpan) AddLink(Link) {} + // SetName does nothing. func (noopSpan) SetName(string) {} diff --git a/vendor/go.opentelemetry.io/otel/trace/trace.go b/vendor/go.opentelemetry.io/otel/trace/trace.go index 26a4b2260ec..28877d4ab4d 100644 --- a/vendor/go.opentelemetry.io/otel/trace/trace.go +++ b/vendor/go.opentelemetry.io/otel/trace/trace.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" @@ -361,6 +350,12 @@ type Span interface { // AddEvent adds an event with the provided name and options. AddEvent(name string, options ...EventOption) + // AddLink adds a link. + // Adding links at span creation using WithLinks is preferred to calling AddLink + // later, for contexts that are available during span creation, because head + // sampling decisions can only consider information present during span creation. + AddLink(link Link) + // IsRecording returns the recording state of the Span. It will return // true if the Span is active and events can be recorded. IsRecording() bool diff --git a/vendor/go.opentelemetry.io/otel/trace/tracestate.go b/vendor/go.opentelemetry.io/otel/trace/tracestate.go index db936ba5b73..20b5cf24332 100644 --- a/vendor/go.opentelemetry.io/otel/trace/tracestate.go +++ b/vendor/go.opentelemetry.io/otel/trace/tracestate.go @@ -1,16 +1,5 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" diff --git a/vendor/go.opentelemetry.io/otel/verify_examples.sh b/vendor/go.opentelemetry.io/otel/verify_examples.sh index dbb61a42279..e57bf57fce8 100644 --- a/vendor/go.opentelemetry.io/otel/verify_examples.sh +++ b/vendor/go.opentelemetry.io/otel/verify_examples.sh @@ -1,18 +1,7 @@ #!/bin/bash # Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail diff --git a/vendor/go.opentelemetry.io/otel/verify_readmes.sh b/vendor/go.opentelemetry.io/otel/verify_readmes.sh new file mode 100644 index 00000000000..1e87855eeaa --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/verify_readmes.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +set -euo pipefail + +dirs=$(find . -type d -not -path "*/internal*" -not -path "*/test*" -not -path "*/example*" -not -path "*/.*" | sort) + +missingReadme=false +for dir in $dirs; do + if [ ! -f "$dir/README.md" ]; then + echo "couldn't find README.md for $dir" + missingReadme=true + fi +done + +if [ "$missingReadme" = true ] ; then + echo "Error: some READMEs couldn't be found." + exit 1 +fi diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go index 7b2993a1fef..102f2f508bf 100644 --- a/vendor/go.opentelemetry.io/otel/version.go +++ b/vendor/go.opentelemetry.io/otel/version.go @@ -1,20 +1,9 @@ // Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" // Version is the current release version of OpenTelemetry in use. func Version() string { - return "1.24.0" + return "1.27.0" } diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml index 1b556e6782b..60985f4362f 100644 --- a/vendor/go.opentelemetry.io/otel/versions.yaml +++ b/vendor/go.opentelemetry.io/otel/versions.yaml @@ -1,20 +1,9 @@ # Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 module-sets: stable-v1: - version: v1.24.0 + version: v1.27.0 modules: - go.opentelemetry.io/otel - go.opentelemetry.io/otel/bridge/opencensus @@ -40,17 +29,21 @@ module-sets: - go.opentelemetry.io/otel/sdk/metric - go.opentelemetry.io/otel/trace experimental-metrics: - version: v0.46.0 + version: v0.49.0 modules: - go.opentelemetry.io/otel/example/prometheus - go.opentelemetry.io/otel/exporters/prometheus experimental-logs: - version: v0.0.1-alpha + version: v0.3.0 modules: - go.opentelemetry.io/otel/log + - go.opentelemetry.io/otel/sdk/log + - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp + - go.opentelemetry.io/otel/exporters/stdout/stdoutlog experimental-schema: - version: v0.0.7 + version: v0.0.8 modules: - go.opentelemetry.io/otel/schema excluded-modules: - go.opentelemetry.io/otel/internal/tools + - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc diff --git a/vendor/go.uber.org/dig/.codecov.yml b/vendor/go.uber.org/dig/.codecov.yml deleted file mode 100644 index 149f56c9eb1..00000000000 --- a/vendor/go.uber.org/dig/.codecov.yml +++ /dev/null @@ -1,19 +0,0 @@ -coverage: - range: 70..98 - round: down - precision: 2 - - status: - project: # measuring the overall project coverage - default: # context, you can create multiple ones with custom titles - enabled: yes # must be yes|true to enable this status - target: 97 # specify the target coverage for each commit status - # option: "auto" (must increase from parent commit or pull request base) - # option: "X%" a static target percentage to hit - if_not_found: success # if parent is not found report status as success, error, or failure - if_ci_failed: error # if ci fails report status as success, error, or failure - - patch: - default: - enabled: yes - target: 70 diff --git a/vendor/go.uber.org/dig/.gitignore b/vendor/go.uber.org/dig/.gitignore deleted file mode 100644 index d651c3573e9..00000000000 --- a/vendor/go.uber.org/dig/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/bin -/vendor -/.bench -*.mem -*.cpu -*.test -*.log -*.out -*.html -*.coverprofile -coverage.txt -*.pprof diff --git a/vendor/go.uber.org/dig/CHANGELOG.md b/vendor/go.uber.org/dig/CHANGELOG.md deleted file mode 100644 index f191bc5aefa..00000000000 --- a/vendor/go.uber.org/dig/CHANGELOG.md +++ /dev/null @@ -1,309 +0,0 @@ -# Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -## [1.17.1] - 2023-10-19 -### Added -- Suggestions for value vs. pointer elements for slice and array types. - -### Fixed -- An issue where value group values were not getting decorated - by decorators within the same module when using dig.Export(true). -- A typo in docs. -- An issue where false positives in cycle detection were occurring - when providing to a child scope. - -Thanks to @paullen and @lcarilla for their contributions to this release. - -[1.17.1]: https://github.com/uber-go/dig/compare/v1.17.0...v1.17.1 - -## [1.17.0] - 2023-05-02 -### Added -- Allow using `dig.As` with `dig.Group`. -- Add `FillInvokeInfo` Option and `InvokeInfo` struct to help - extract the types requested by an `Invoke` statement. -- To get visibility into constructor and decorator calls, introduce - `WithProviderCallback` and `WithDecoratorCallback` Options to provide callback functions. - -[1.17.0]: https://github.com/uber-go/dig/compare/v1.16.1...v1.17.0 - -## [1.16.1] - 2023-01-10 -### Fixed -- A panic when `DryRun` was used with `Decorate`. - -[1.16.1]: https://github.com/uber-go/dig/compare/v1.16.0...v1.16.1 - -## [1.16.0] - 2023-01-03 -### Added -- Add `RecoverFromPanics` option, which provides panic-recovery mechanism for Container. -- Add `Error` interface which enables distinguishing errors from Dig using standard `errors` - package. - -Thanks to @mie998 for their contribution(s) to this release. - -[1.16.0]: https://github.com/uber-go/dig/compare/v1.15.0...v1.16.0 - -## [1.15.0] - 2022-08-02 -### Added -- Support for `soft` value groups, which specify a value group that only gets populated - with values from already-executed constructors. - -### Fixed -- Fix an issue with invoke order affecting results provided by private provides - -Thanks to @hbdf for their contributions to this release. - -[1.15.0]: https://github.com/uber-go/dig/compare/v1.14.1...v1.15.0 - -## [1.14.1] - 2022-03-22 -### Fixed -- Fix an issue where a dependency for a decoration supplied by another decorator in the - same scope is ignored. -- Fix a panic when submitting a single value as a value group in `Scope.Decorate`. -- Upon a provide error, make the error message contain the function named specified - by LocationForPC Option. - -[1.14.1]: https://github.com/uber-go/dig/compare/v1.14.0...v1.14.1 - -## [1.14.0] - 2022-02-23 -### Added -- Introduce `dig.Scope` which creates a scoped dependency injection - container to scope dependencies. -- Introduce `Scope.Decorate` and `Container.Decorate` which allows a - decorator to modify a dependency already provided in the dependency graph. -- Add `FillDecorateInfo` Option and `DecorateInfo` struct which exposes - information on what Dig was able to understand from the decorator provided - with `Scope.Decorate` or `Container.Decorate`. - -### Changed -- The error message that appears when a cycle is detected in the dependency graph - has been changed slightly. - -### Fixed -- A stack overflow bug that happens when cycles are introduced via self-pointing - dependencies with DeferAcyclicVerification. - -[1.14.0]: https://github.com/uber-go/dig/compare/v1.13.0...v1.14.0 - -## [1.13.0] - 2021-09-21 -### Added -- Introduce `As` option which supports providing a type as interface(s) - it implements to the container. -- Add `LocationForPC` option which overrides the function inspection - for a program counter address to a provided function info. - -[1.13.0]: https://github.com/uber-go/dig/compare/v1.12.0...v1.13.0 - -## [1.12.0] - 2021-07-29 -### Added -- Support for ProvideInfo and FillProvideInfo that allow the caller of - `Provide` to get info about what dig understood from the constructor. - -[1.12.0]: https://github.com/uber-go/dig/compare/v1.11.0...v1.12.0 - -## [1.11.0] - 2021-06-09 -### Added -- Support unexported fields on `dig.In` structs with the - `ignore-unexported:"true` struct tag. - -[1.11.0]: https://github.com/uber-go/dig/compare/v1.10.0...v1.11.0 - -## [1.10.0] - 2020-06-16 -### Added -- Introduce `DryRun` Option which, when set to true, disables invocation - of functions supplied to `Provide` and `Invoke`. This option will be - used to build no-op containers, for example for `fx.ValidateApp` method. - -[1.10.0]: https://github.com/uber-go/dig/compare/v1.9.0...v1.10.0 - -## [1.9.0] - 2020-03-31 -### Added -- GraphViz visualization of the graph now includes names of packages next to - constructors. -- Added a `flatten` modifier to group tags for slices to allow providing - individual elements instead of the slice for a group value. See package - doucmentation for more information. - -### Changed -- Drop library dependency on `golang.org/x/lint`. -- Support printing multi-line error messages with `%+v`. - -[1.9.0]: https://github.com/uber-go/dig/compare/v1.8.0...v1.9.0 - -## [1.8.0] - 2019-11-14 -### Changed -- Migrated to Go modules. - -[1.8.0]: https://github.com/uber-go/dig/compare/v1.7.0...v1.8.0 - -## [1.7.0] - 2019-01-04 -### Added -- Added `Group` option for `Provide` to add value groups to the container without -rewriting constructors. See package doucmentation for more information. - -[1.7.0]: https://github.com/uber-go/dig/compare/v1.6.0...v1.7.0 - -## [1.6.0] - 2018-11-06 -### Changed -- When an error graph is visualized, the graph is pruned so that the graph only - contains failure nodes. -- Container visualization is now oriented from right to left. - -[1.6.0]: https://github.com/uber-go/dig/compare/v1.5.1...v1.6.0 - -## [1.5.1] - 2018-11-01 -### Fixed -- Fixed a test that was causing Dig to be unusable with Go Modules. - -[1.5.1]: https://github.com/uber-go/dig/compare/v1.5.0...v1.5.1 - -## [1.5.0] - 2018-09-19 -### Added -- Added a `DeferAcyclicVerification` container option that defers graph cycle - detection until the next Invoke. - -### Changed -- Improved cycle-detection performance by 50x in certain degenerative cases. - -[1.5.0]: https://github.com/uber-go/dig/compare/v1.4.0...v1.5.0 - -## [1.4.0] - 2018-08-16 -### Added -- Added `Visualize` function to visualize the state of the container in the - GraphViz DOT format. This allows visualization of error types and the - dependency relationships of types in the container. -- Added `CanVisualizeError` function to determine if an error can be visualized - in the graph. -- Added `Name` option for `Provide` to add named values to the container - without rewriting constructors. See package documentation for more - information. - -### Changed -- `name:"..."` tags on nested Result Objects will now cause errors instead of - being ignored. - -[1.4.0]: https://github.com/uber-go/dig/compare/v1.3.0...v1.4.0 - -## [1.3.0] - 2017-12-04 -### Changed -- Improved messages for errors thrown by Dig under a many scenarios to be more - informative. - -[1.3.0]: https://github.com/uber-go/dig/compare/v1.2.0...v1.3.0 - -## [1.2.0] - 2017-11-07 -### Added -- `dig.In` and `dig.Out` now support value groups, making it possible to - produce many values of the same type from different constructors. See package - documentation for more information. - -[1.2.0]: https://github.com/uber-go/dig/compare/v1.1.0...v1.2.0 - -## [1.1.0] - 2017-09-15 -### Added -- Added the `dig.RootCause` function which allows retrieving the original - constructor error that caused an `Invoke` failure. - -### Changed -- Errors from `Invoke` now attempt to hint to the user a presence of a similar - type, for example a pointer to the requested type and vice versa. - -[1.1.0]: https://github.com/uber-go/dig/compare/v1.0.0...v1.1.0 - -## [1.0.0] - 2017-07-31 - -First stable release: no breaking changes will be made in the 1.x series. - -### Changed -- `Provide` and `Invoke` will now fail if `dig.In` or `dig.Out` structs - contain unexported fields. Previously these fields were ignored which often - led to confusion. - -[1.0.0]: https://github.com/uber-go/dig/compare/v1.0.0-rc2...v1.0.0 - -## [1.0.0-rc2] - 2017-07-21 -### Added -- Exported `dig.IsIn` and `dig.IsOut` so that consuming libraries can check if - a params or return struct embeds the `dig.In` and `dig.Out` types, respectively. - -### Changed -- Added variadic options to all public APIS so that new functionality can be - introduced post v1.0.0 without introducing breaking changes. -- Functions with variadic arguments can now be passed to `dig.Provide` and - `dig.Invoke`. Previously this caused an error, whereas now the args will be ignored. - -[1.0.0-rc2]: https://github.com/uber-go/dig/compare/v1.0.0-rc1...v1.0.0-rc2 - -## [1.0.0-rc1] - 2017-06-21 - -First release candidate. - -[1.0.0-rc1]: https://github.com/uber-go/dig/compare/v0.5.0...v1.0.0-rc1 - - -## [0.5.0] - 2017-06-19 -### Added -- `dig.In` and `dig.Out` now support named instances, i.e.: - - ```go - type param struct { - dig.In - - DB1 DB.Connection `name:"primary"` - DB2 DB.Connection `name:"secondary"` - } - ``` - -### Fixed -- Structs compatible with `dig.In` and `dig.Out` may now be generated using - `reflect.StructOf`. - -[0.5.0]: https://github.com/uber-go/dig/compare/v0.4.0...v0.5.0 - -## [0.4.0] - 2017-06-12 -### Added -- Add `dig.In` embeddable type for advanced use-cases of specifying dependencies. -- Add `dig.Out` embeddable type for advanced use-cases of constructors - inserting types in the container. -- Add support for optional parameters through `optional:"true"` tag on `dig.In` objects. -- Add support for value types and many built-ins (maps, slices, channels). - -### Changed -- **[Breaking]** Restrict the API surface to only `Provide` and `Invoke`. -- **[Breaking]** Update `Provide` method to accept variadic arguments. - -### Removed -- **[Breaking]** Remove `Must*` funcs to greatly reduce API surface area. -- Providing constructors with common returned types results in an error. - -[0.4.0]: https://github.com/uber-go/dig/compare/v0.3...v0.4.0 - -## [0.3] - 2017-05-02 -### Added -- Add functionality to `Provide` to support constructor with `n` return - objects to be resolved into the `dig.Graph` -- Add `Invoke` function to invoke provided function and insert return - objects into the `dig.Graph` - -### Changed -- Rename `RegisterAll` and `MustRegisterAll` to `ProvideAll` and - `MustProvideAll`. - -[0.3]: https://github.com/uber-go/dig/compare/v0.2...v0.3 - -## [0.2] - 2017-03-27 -### Changed -- Rename `Register` to `Provide` for clarity and to recude clash with other - Register functions. -- Rename `dig.Graph` to `dig.Container`. - -### Removed -- Remove the package-level functions and the `DefaultGraph`. - -[0.2]: https://github.com/uber-go/dig/compare/v0.1...v0.2 - -## 0.1 - 2017-03-23 - -Initial release. diff --git a/vendor/go.uber.org/dig/LICENSE b/vendor/go.uber.org/dig/LICENSE deleted file mode 100644 index 00a8d056d88..00000000000 --- a/vendor/go.uber.org/dig/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017-2018 Uber Technologies, Inc. - -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/go.uber.org/dig/Makefile b/vendor/go.uber.org/dig/Makefile deleted file mode 100644 index 5eb38a8cd34..00000000000 --- a/vendor/go.uber.org/dig/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -export GOBIN ?= $(shell pwd)/bin - -GOLINT = $(GOBIN)/golint -STATICCHECK = $(GOBIN)/staticcheck - -BENCH_FLAGS ?= -cpuprofile=cpu.pprof -memprofile=mem.pprof -benchmem - -GO_FILES = $(shell \ - find . '(' -path '*/.*' -o -path './vendor' ')' -prune \ - -o -name '*.go' -print | cut -b3-) - -MODULES = . ./tools - -.PHONY: all -all: build lint test - -.PHONY: build -build: - go build ./... - -.PHONY: install -install: - $(foreach dir,$(MODULES),( \ - cd $(dir) && \ - go mod download) && \ - ) true - -.PHONY: lint -lint: $(GOLINT) $(STATICCHECK) - @rm -rf lint.log - @echo "Checking formatting..." - @gofmt -d -s $(GO_FILES) 2>&1 | tee lint.log - @echo "Checking vet..." - @go vet ./... 2>&1 | tee -a lint.log - @echo "Checking lint..." - @$(GOLINT) ./... 2>&1 | tee -a lint.log - @echo "Checking staticcheck..." - @$(STATICCHECK) ./... 2>&1 | tee -a lint.log - @echo "Checking for unresolved FIXMEs..." - @git grep -i fixme | grep -v -e Makefile | tee -a lint.log - @echo "Checking for license headers..." - @./check_license.sh | tee -a lint.log - @[ ! -s lint.log ] - -$(GOLINT): tools/go.mod - cd tools && go install golang.org/x/lint/golint - -$(STATICCHECK): tools/go.mod - cd tools && go install honnef.co/go/tools/cmd/staticcheck - -.PHONY: test -test: - go test -race ./... - -.PHONY: cover -cover: - go test -race -coverprofile=cover.out -coverpkg=./... ./... - go tool cover -html=cover.out -o cover.html - -.PHONY: bench -BENCH ?= . -bench: - go list ./... | xargs -n1 go test -bench=$(BENCH) -run="^$$" $(BENCH_FLAGS) - -.PHONY: tidy -tidy: - $(foreach dir,$(MODULES),(cd $(dir) && go mod tidy) &&) true diff --git a/vendor/go.uber.org/dig/README.md b/vendor/go.uber.org/dig/README.md deleted file mode 100644 index 39db9098265..00000000000 --- a/vendor/go.uber.org/dig/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# :hammer_and_pick: dig [![GoDoc][doc-img]][doc] [![GitHub release][release-img]][release] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![Go Report Card][report-card-img]][report-card] - -A reflection based dependency injection toolkit for Go. - -### Good for: - -* Powering an application framework, e.g. [Fx](https://github.com/uber-go/fx). -* Resolving the object graph during process startup. - -### Bad for: - -* Using in place of an application framework, e.g. [Fx](https://github.com/uber-go/fx). -* Resolving dependencies after the process has already started. -* Exposing to user-land code as a [Service Locator](https://martinfowler.com/articles/injection.html#UsingAServiceLocator). - -## Installation - -We recommend consuming [SemVer](http://semver.org/) major version `1` using -your dependency manager of choice. - -``` -$ glide get 'go.uber.org/dig#^1' -$ dep ensure -add "go.uber.org/dig@v1" -$ go get 'go.uber.org/dig@v1' -``` - -## Stability - -This library is `v1` and follows [SemVer](http://semver.org/) strictly. - -No breaking changes will be made to exported APIs before `v2.0.0`. - -[doc-img]: http://img.shields.io/badge/GoDoc-Reference-blue.svg -[doc]: https://godoc.org/go.uber.org/dig - -[release-img]: https://img.shields.io/github/release/uber-go/dig.svg -[release]: https://github.com/uber-go/dig/releases - -[ci-img]: https://github.com/uber-go/dig/actions/workflows/go.yml/badge.svg -[ci]: https://github.com/uber-go/dig/actions/workflows/go.yml - -[cov-img]: https://codecov.io/gh/uber-go/dig/branch/master/graph/badge.svg -[cov]: https://codecov.io/gh/uber-go/dig/branch/master - -[report-card-img]: https://goreportcard.com/badge/github.com/uber-go/dig -[report-card]: https://goreportcard.com/report/github.com/uber-go/dig - -## Stargazers over time - -[![Stargazers over time](https://starchart.cc/uber-go/dig.svg)](https://starchart.cc/uber-go/dig) - diff --git a/vendor/go.uber.org/dig/callback.go b/vendor/go.uber.org/dig/callback.go deleted file mode 100644 index c5caaec81cb..00000000000 --- a/vendor/go.uber.org/dig/callback.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2023 Uber Technologies, Inc. -// -// 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. - -package dig - -// CallbackInfo contains information about a provided function or decorator -// called by Dig, and is passed to a [Callback] registered with -// [WithProviderCallback] or [WithDecoratorCallback]. -type CallbackInfo struct { - - // Name is the name of the function in the format: - // . - Name string - - // Error contains the error returned by the [Callback]'s associated - // function, if any. When used in conjunction with [RecoverFromPanics], - // this will be set to a [PanicError] when the function panics. - Error error -} - -// Callback is a function that can be registered with a provided function -// or decorator with [WithCallback] to cause it to be called after the -// provided function or decorator is run. -type Callback func(CallbackInfo) - -// WithProviderCallback returns a [ProvideOption] which has Dig call -// the passed in [Callback] after the corresponding constructor finishes running. -// -// For example, the following prints a completion message -// after "myConstructor" finishes, including the error if any: -// -// c := dig.New() -// myCallback := func(ci CallbackInfo) { -// var errorAdd string -// if ci.Error != nil { -// errorAdd = fmt.Sprintf("with error: %v", ci.Error) -// } -// fmt.Printf("%q finished%v", ci.Name, errorAdd) -// } -// c.Provide(myConstructor, WithProviderCallback(myCallback)), -// -// Callbacks can also be specified for Decorators with [WithDecoratorCallback]. -// -// See [CallbackInfo] for more info on the information passed to the [Callback]. -func WithProviderCallback(callback Callback) ProvideOption { - return withCallbackOption{ - callback: callback, - } -} - -// WithDecoratorCallback returns a [DecorateOption] which has Dig call -// the passed in [Callback] after the corresponding decorator finishes running. -// -// For example, the following prints a completion message -// after "myDecorator" finishes, including the error if any: -// -// c := dig.New() -// myCallback := func(ci CallbackInfo) { -// var errorAdd string -// if ci.Error != nil { -// errorAdd = fmt.Sprintf("with error: %v", ci.Error) -// } -// fmt.Printf("%q finished%v", ci.Name, errorAdd) -// } -// c.Decorate(myDecorator, WithDecoratorCallback(myCallback)), -// -// Callbacks can also be specified for Constructors with [WithProviderCallback]. -// -// See [CallbackInfo] for more info on the information passed to the [Callback]. -func WithDecoratorCallback(callback Callback) DecorateOption { - return withCallbackOption{ - callback: callback, - } -} - -type withCallbackOption struct { - callback Callback -} - -var ( - _ ProvideOption = withCallbackOption{} - _ DecorateOption = withCallbackOption{} -) - -func (o withCallbackOption) applyProvideOption(po *provideOptions) { - po.Callback = o.callback -} - -func (o withCallbackOption) apply(do *decorateOptions) { - do.Callback = o.callback -} diff --git a/vendor/go.uber.org/dig/check_license.sh b/vendor/go.uber.org/dig/check_license.sh deleted file mode 100644 index 345ac8b89ab..00000000000 --- a/vendor/go.uber.org/dig/check_license.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -e - -ERROR_COUNT=0 -while read -r file -do - case "$(head -1 "${file}")" in - *"Copyright (c) "*" Uber Technologies, Inc.") - # everything's cool - ;; - *) - echo "$file is missing license header." - (( ERROR_COUNT++ )) - ;; - esac -done < <(git ls-files "*\.go") - -exit $ERROR_COUNT diff --git a/vendor/go.uber.org/dig/constructor.go b/vendor/go.uber.org/dig/constructor.go deleted file mode 100644 index 034c41c221d..00000000000 --- a/vendor/go.uber.org/dig/constructor.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "fmt" - "reflect" - - "go.uber.org/dig/internal/digerror" - "go.uber.org/dig/internal/digreflect" - "go.uber.org/dig/internal/dot" -) - -// constructorNode is a node in the dependency graph that represents -// a constructor provided by the user. -// -// constructorNodes can produce zero or more values that they store into the container. -// For the Provide path, we verify that constructorNodes produce at least one value, -// otherwise the function will never be called. -type constructorNode struct { - ctor interface{} - ctype reflect.Type - - // Location where this function was defined. - location *digreflect.Func - - // id uniquely identifies the constructor that produces a node. - id dot.CtorID - - // Whether the constructor owned by this node was already called. - called bool - - // Type information about constructor parameters. - paramList paramList - - // Type information about constructor results. - resultList resultList - - // Order of this node in each Scopes' graphHolders. - orders map[*Scope]int - - // Scope this node is part of. - s *Scope - - // Scope this node was originally provided to. - // This is different from s if and only if the constructor was Provided with ExportOption. - origS *Scope - - // Callback for this provided function, if there is one. - callback Callback -} - -type constructorOptions struct { - // If specified, all values produced by this constructor have the provided name - // belong to the specified value group or implement any of the interfaces. - ResultName string - ResultGroup string - ResultAs []interface{} - Location *digreflect.Func - Callback Callback -} - -func newConstructorNode(ctor interface{}, s *Scope, origS *Scope, opts constructorOptions) (*constructorNode, error) { - cval := reflect.ValueOf(ctor) - ctype := cval.Type() - cptr := cval.Pointer() - - params, err := newParamList(ctype, s) - if err != nil { - return nil, err - } - - results, err := newResultList( - ctype, - resultOptions{ - Name: opts.ResultName, - Group: opts.ResultGroup, - As: opts.ResultAs, - }, - ) - if err != nil { - return nil, err - } - - location := opts.Location - if location == nil { - location = digreflect.InspectFunc(ctor) - } - - n := &constructorNode{ - ctor: ctor, - ctype: ctype, - location: location, - id: dot.CtorID(cptr), - paramList: params, - resultList: results, - orders: make(map[*Scope]int), - s: s, - origS: origS, - callback: opts.Callback, - } - s.newGraphNode(n, n.orders) - return n, nil -} - -func (n *constructorNode) Location() *digreflect.Func { return n.location } -func (n *constructorNode) ParamList() paramList { return n.paramList } -func (n *constructorNode) ResultList() resultList { return n.resultList } -func (n *constructorNode) ID() dot.CtorID { return n.id } -func (n *constructorNode) CType() reflect.Type { return n.ctype } -func (n *constructorNode) Order(s *Scope) int { return n.orders[s] } -func (n *constructorNode) OrigScope() *Scope { return n.origS } - -// CopyOrder copies the order for the given parent scope to the given child scope. -func (n *constructorNode) CopyOrder(parent, child *Scope) { - n.orders[child] = n.orders[parent] -} - -func (n *constructorNode) String() string { - return fmt.Sprintf("deps: %v, ctor: %v", n.paramList, n.ctype) -} - -// Call calls this constructor if it hasn't already been called and -// injects any values produced by it into the provided container. -func (n *constructorNode) Call(c containerStore) (err error) { - if n.called { - return nil - } - - if err := shallowCheckDependencies(c, n.paramList); err != nil { - return errMissingDependencies{ - Func: n.location, - Reason: err, - } - } - - args, err := n.paramList.BuildList(c) - if err != nil { - return errArgumentsFailed{ - Func: n.location, - Reason: err, - } - } - - if n.callback != nil { - // Wrap in separate func to include PanicErrors - defer func() { - n.callback(CallbackInfo{ - Name: fmt.Sprintf("%v.%v", n.location.Package, n.location.Name), - Error: err, - }) - }() - } - - if n.s.recoverFromPanics { - defer func() { - if p := recover(); p != nil { - err = PanicError{ - fn: n.location, - Panic: p, - } - } - }() - } - - receiver := newStagingContainerWriter() - results := c.invoker()(reflect.ValueOf(n.ctor), args) - if err = n.resultList.ExtractList(receiver, false /* decorating */, results); err != nil { - return errConstructorFailed{Func: n.location, Reason: err} - } - - // Commit the result to the original container that this constructor - // was supplied to. The provided constructor is only used for a view of - // the rest of the graph to instantiate the dependencies of this - // container. - receiver.Commit(n.s) - n.called = true - return nil -} - -// stagingContainerWriter is a containerWriter that records the changes that -// would be made to a containerWriter and defers them until Commit is called. -type stagingContainerWriter struct { - values map[key]reflect.Value - groups map[key][]reflect.Value -} - -var _ containerWriter = (*stagingContainerWriter)(nil) - -func newStagingContainerWriter() *stagingContainerWriter { - return &stagingContainerWriter{ - values: make(map[key]reflect.Value), - groups: make(map[key][]reflect.Value), - } -} - -func (sr *stagingContainerWriter) setValue(name string, t reflect.Type, v reflect.Value) { - sr.values[key{t: t, name: name}] = v -} - -func (sr *stagingContainerWriter) setDecoratedValue(_ string, _ reflect.Type, _ reflect.Value) { - digerror.BugPanicf("stagingContainerWriter.setDecoratedValue must never be called") -} - -func (sr *stagingContainerWriter) submitGroupedValue(group string, t reflect.Type, v reflect.Value) { - k := key{t: t, group: group} - sr.groups[k] = append(sr.groups[k], v) -} - -func (sr *stagingContainerWriter) submitDecoratedGroupedValue(_ string, _ reflect.Type, _ reflect.Value) { - digerror.BugPanicf("stagingContainerWriter.submitDecoratedGroupedValue must never be called") -} - -// Commit commits the received results to the provided containerWriter. -func (sr *stagingContainerWriter) Commit(cw containerWriter) { - for k, v := range sr.values { - cw.setValue(k.name, k.t, v) - } - - for k, vs := range sr.groups { - for _, v := range vs { - cw.submitGroupedValue(k.group, k.t, v) - } - } -} diff --git a/vendor/go.uber.org/dig/container.go b/vendor/go.uber.org/dig/container.go deleted file mode 100644 index 983fd3f99db..00000000000 --- a/vendor/go.uber.org/dig/container.go +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "fmt" - "math/rand" - "reflect" - - "go.uber.org/dig/internal/dot" -) - -const ( - _optionalTag = "optional" - _nameTag = "name" - _ignoreUnexportedTag = "ignore-unexported" -) - -// Unique identification of an object in the graph. -type key struct { - t reflect.Type - - // Only one of name or group will be set. - name string - group string -} - -func (k key) String() string { - if k.name != "" { - return fmt.Sprintf("%v[name=%q]", k.t, k.name) - } - if k.group != "" { - return fmt.Sprintf("%v[group=%q]", k.t, k.group) - } - return k.t.String() -} - -// Option configures a Container. -type Option interface { - applyOption(*Container) -} - -// Container is a directed acyclic graph of types and their dependencies. -// A Container is the root Scope that represents the top-level scoped -// directed acyclic graph of the dependencies. -type Container struct { - // this is the "root" Scope that represents the - // root of the scope tree. - scope *Scope -} - -// containerWriter provides write access to the Container's underlying data -// store. -type containerWriter interface { - // setValue sets the value with the given name and type in the container. - // If a value with the same name and type already exists, it will be - // overwritten. - setValue(name string, t reflect.Type, v reflect.Value) - - // setDecoratedValue sets a decorated value with the given name and type - // in the container. If a decorated value with the same name and type already - // exists, it will be overwritten. - setDecoratedValue(name string, t reflect.Type, v reflect.Value) - - // submitGroupedValue submits a value to the value group with the provided - // name. - submitGroupedValue(name string, t reflect.Type, v reflect.Value) - - // submitDecoratedGroupedValue submits a decorated value to the value group - // with the provided name. - submitDecoratedGroupedValue(name string, t reflect.Type, v reflect.Value) -} - -// containerStore provides access to the Container's underlying data store. -type containerStore interface { - containerWriter - - // Adds a new graph node to the Container - newGraphNode(w interface{}, orders map[*Scope]int) - - // Returns a slice containing all known types. - knownTypes() []reflect.Type - - // Retrieves the value with the provided name and type, if any. - getValue(name string, t reflect.Type) (v reflect.Value, ok bool) - - // Retrieves a decorated value with the provided name and type, if any. - getDecoratedValue(name string, t reflect.Type) (v reflect.Value, ok bool) - - // Retrieves all values for the provided group and type. - // - // The order in which the values are returned is undefined. - getValueGroup(name string, t reflect.Type) []reflect.Value - - // Retrieves all decorated values for the provided group and type, if any. - getDecoratedValueGroup(name string, t reflect.Type) (reflect.Value, bool) - - // Returns the providers that can produce a value with the given name and - // type. - getValueProviders(name string, t reflect.Type) []provider - - // Returns the providers that can produce values for the given group and - // type. - getGroupProviders(name string, t reflect.Type) []provider - - // Returns the providers that can produce a value with the given name and - // type across all the Scopes that are in effect of this containerStore. - getAllValueProviders(name string, t reflect.Type) []provider - - // Returns the decorator that can decorate values for the given name and - // type. - getValueDecorator(name string, t reflect.Type) (decorator, bool) - - // Reutrns the decorator that can decorate values for the given group and - // type. - getGroupDecorator(name string, t reflect.Type) (decorator, bool) - - // Reports a list of stores (starting at this store) up to the root - // store. - storesToRoot() []containerStore - - createGraph() *dot.Graph - - // Returns invokerFn function to use when calling arguments. - invoker() invokerFn -} - -// New constructs a Container. -func New(opts ...Option) *Container { - s := newScope() - c := &Container{scope: s} - - for _, opt := range opts { - opt.applyOption(c) - } - return c -} - -// DeferAcyclicVerification is an Option to override the default behavior -// of container.Provide, deferring the dependency graph validation to no longer -// run after each call to container.Provide. The container will instead verify -// the graph on first `Invoke`. -// -// Applications adding providers to a container in a tight loop may experience -// performance improvements by initializing the container with this option. -func DeferAcyclicVerification() Option { - return deferAcyclicVerificationOption{} -} - -type deferAcyclicVerificationOption struct{} - -func (deferAcyclicVerificationOption) String() string { - return "DeferAcyclicVerification()" -} - -func (deferAcyclicVerificationOption) applyOption(c *Container) { - c.scope.deferAcyclicVerification = true -} - -// RecoverFromPanics is an [Option] to recover from panics that occur while -// running functions given to the container. When set, recovered panics -// will be placed into a [PanicError], and returned at the invoke callsite. -// See [PanicError] for an example on how to handle panics with this option -// enabled, and distinguish them from errors. -func RecoverFromPanics() Option { - return recoverFromPanicsOption{} -} - -type recoverFromPanicsOption struct{} - -func (recoverFromPanicsOption) String() string { - return "RecoverFromPanics()" -} - -func (recoverFromPanicsOption) applyOption(c *Container) { - c.scope.recoverFromPanics = true -} - -// Changes the source of randomness for the container. -// -// This will help provide determinism during tests. -func setRand(r *rand.Rand) Option { - return setRandOption{r: r} -} - -type setRandOption struct{ r *rand.Rand } - -func (o setRandOption) String() string { - return fmt.Sprintf("setRand(%p)", o.r) -} - -func (o setRandOption) applyOption(c *Container) { - c.scope.rand = o.r -} - -// DryRun is an Option which, when set to true, disables invocation of functions supplied to -// Provide and Invoke. Use this to build no-op containers. -func DryRun(dry bool) Option { - return dryRunOption(dry) -} - -type dryRunOption bool - -func (o dryRunOption) String() string { - return fmt.Sprintf("DryRun(%v)", bool(o)) -} - -func (o dryRunOption) applyOption(c *Container) { - if o { - c.scope.invokerFn = dryInvoker - } else { - c.scope.invokerFn = defaultInvoker - } -} - -// invokerFn specifies how the container calls user-supplied functions. -type invokerFn func(fn reflect.Value, args []reflect.Value) (results []reflect.Value) - -func defaultInvoker(fn reflect.Value, args []reflect.Value) []reflect.Value { - return fn.Call(args) -} - -// Generates zero values for results without calling the supplied function. -func dryInvoker(fn reflect.Value, _ []reflect.Value) []reflect.Value { - ft := fn.Type() - results := make([]reflect.Value, ft.NumOut()) - for i := 0; i < ft.NumOut(); i++ { - results[i] = reflect.Zero(fn.Type().Out(i)) - } - - return results -} - -// String representation of the entire Container -func (c *Container) String() string { - return c.scope.String() -} - -// Scope creates a child scope of the Container with the given name. -func (c *Container) Scope(name string, opts ...ScopeOption) *Scope { - return c.scope.Scope(name, opts...) -} - -type byTypeName []reflect.Type - -func (bs byTypeName) Len() int { - return len(bs) -} - -func (bs byTypeName) Less(i int, j int) bool { - return fmt.Sprint(bs[i]) < fmt.Sprint(bs[j]) -} - -func (bs byTypeName) Swap(i int, j int) { - bs[i], bs[j] = bs[j], bs[i] -} - -func shuffledCopy(rand *rand.Rand, items []reflect.Value) []reflect.Value { - newItems := make([]reflect.Value, len(items)) - for i, j := range rand.Perm(len(items)) { - newItems[i] = items[j] - } - return newItems -} diff --git a/vendor/go.uber.org/dig/cycle_error.go b/vendor/go.uber.org/dig/cycle_error.go deleted file mode 100644 index a294aa97944..00000000000 --- a/vendor/go.uber.org/dig/cycle_error.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "bytes" - "errors" - "fmt" - "io" - - "go.uber.org/dig/internal/digreflect" -) - -type cycleErrPathEntry struct { - Key key - Func *digreflect.Func -} - -type errCycleDetected struct { - Path []cycleErrPathEntry - scope *Scope -} - -var _ digError = errCycleDetected{} - -func (e errCycleDetected) Error() string { - // We get something like, - // - // [scope "foo"] - // func(*bar) *foo provided by "path/to/package".NewFoo (path/to/file.go:42) - // depends on func(*baz) *bar provided by "another/package".NewBar (somefile.go:1) - // depends on func(*foo) baz provided by "somepackage".NewBar (anotherfile.go:2) - // depends on func(*bar) *foo provided by "path/to/package".NewFoo (path/to/file.go:42) - // - b := new(bytes.Buffer) - - if name := e.scope.name; len(name) > 0 { - fmt.Fprintf(b, "[scope %q]\n", name) - } - for i, entry := range e.Path { - if i > 0 { - b.WriteString("\n\tdepends on ") - } - fmt.Fprintf(b, "%v provided by %v", entry.Key, entry.Func) - } - return b.String() -} - -func (e errCycleDetected) writeMessage(w io.Writer, v string) { - fmt.Fprint(w, e.Error()) -} - -func (e errCycleDetected) Format(w fmt.State, c rune) { - formatError(e, w, c) -} - -// IsCycleDetected returns a boolean as to whether the provided error indicates -// a cycle was detected in the container graph. -func IsCycleDetected(err error) bool { - return errors.As(err, &errCycleDetected{}) -} diff --git a/vendor/go.uber.org/dig/decorate.go b/vendor/go.uber.org/dig/decorate.go deleted file mode 100644 index df362e98502..00000000000 --- a/vendor/go.uber.org/dig/decorate.go +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright (c) 2022 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "fmt" - "reflect" - - "go.uber.org/dig/internal/digreflect" - "go.uber.org/dig/internal/dot" -) - -type decoratorState int - -const ( - decoratorReady decoratorState = iota - decoratorOnStack - decoratorCalled -) - -type decorator interface { - Call(c containerStore) error - ID() dot.CtorID - State() decoratorState -} - -type decoratorNode struct { - dcor interface{} - dtype reflect.Type - - id dot.CtorID - - // Location where this function was defined. - location *digreflect.Func - - // Current state of this decorator - state decoratorState - - // Parameters of the decorator. - params paramList - - // Results of the decorator. - results resultList - - // Order of this node in each Scopes' graphHolders. - orders map[*Scope]int - - // Scope this node was originally provided to. - s *Scope - - // Callback for this decorator, if there is one. - callback Callback -} - -func newDecoratorNode(dcor interface{}, s *Scope, opts decorateOptions) (*decoratorNode, error) { - dval := reflect.ValueOf(dcor) - dtype := dval.Type() - dptr := dval.Pointer() - - pl, err := newParamList(dtype, s) - if err != nil { - return nil, err - } - - rl, err := newResultList(dtype, resultOptions{}) - if err != nil { - return nil, err - } - - n := &decoratorNode{ - dcor: dcor, - dtype: dtype, - id: dot.CtorID(dptr), - location: digreflect.InspectFunc(dcor), - orders: make(map[*Scope]int), - params: pl, - results: rl, - s: s, - callback: opts.Callback, - } - return n, nil -} - -func (n *decoratorNode) Call(s containerStore) (err error) { - if n.state == decoratorCalled { - return nil - } - - n.state = decoratorOnStack - - if err := shallowCheckDependencies(s, n.params); err != nil { - return errMissingDependencies{ - Func: n.location, - Reason: err, - } - } - - args, err := n.params.BuildList(n.s) - if err != nil { - return errArgumentsFailed{ - Func: n.location, - Reason: err, - } - } - - if n.callback != nil { - // Wrap in separate func to include PanicErrors - defer func() { - n.callback(CallbackInfo{ - Name: fmt.Sprintf("%v.%v", n.location.Package, n.location.Name), - Error: err, - }) - }() - } - - if n.s.recoverFromPanics { - defer func() { - if p := recover(); p != nil { - err = PanicError{ - fn: n.location, - Panic: p, - } - } - }() - } - - results := s.invoker()(reflect.ValueOf(n.dcor), args) - if err = n.results.ExtractList(n.s, true /* decorated */, results); err != nil { - return err - } - n.state = decoratorCalled - return nil -} - -func (n *decoratorNode) ID() dot.CtorID { return n.id } - -func (n *decoratorNode) State() decoratorState { return n.state } - -// DecorateOption modifies the default behavior of Decorate. -type DecorateOption interface { - apply(*decorateOptions) -} - -type decorateOptions struct { - Info *DecorateInfo - Callback Callback -} - -// FillDecorateInfo is a DecorateOption that writes info on what Dig was -// able to get out of the provided decorator into the provided DecorateInfo. -func FillDecorateInfo(info *DecorateInfo) DecorateOption { - return fillDecorateInfoOption{info: info} -} - -type fillDecorateInfoOption struct{ info *DecorateInfo } - -func (o fillDecorateInfoOption) String() string { - return fmt.Sprintf("FillDecorateInfo(%p)", o.info) -} - -func (o fillDecorateInfoOption) apply(opts *decorateOptions) { - opts.Info = o.info -} - -// DecorateInfo provides information about the decorator's inputs and outputs -// types as strings, as well as the ID of the decorator supplied to the Container. -type DecorateInfo struct { - ID ID - Inputs []*Input - Outputs []*Output -} - -// Decorate provides a decorator for a type that has already been provided in the Container. -// Decorations at this level affect all scopes of the container. -// See Scope.Decorate for information on how to use this method. -func (c *Container) Decorate(decorator interface{}, opts ...DecorateOption) error { - return c.scope.Decorate(decorator, opts...) -} - -// Decorate provides a decorator for a type that has already been provided in the Scope. -// -// Similar to Provide, Decorate takes in a function with zero or more dependencies and one -// or more results. Decorate can be used to modify a type that was already introduced to the -// Scope, or completely replace it with a new object. -// -// For example, -// -// s.Decorate(func(log *zap.Logger) *zap.Logger { -// return log.Named("myapp") -// }) -// -// This takes in a value, augments it with a name, and returns a replacement for it. Functions -// in the Scope's dependency graph that use *zap.Logger will now use the *zap.Logger -// returned by this decorator. -// -// A decorator can also take in multiple parameters and replace one of them: -// -// s.Decorate(func(log *zap.Logger, cfg *Config) *zap.Logger { -// return log.Named(cfg.Name) -// }) -// -// Or replace a subset of them: -// -// s.Decorate(func( -// log *zap.Logger, -// cfg *Config, -// scope metrics.Scope -// ) (*zap.Logger, metrics.Scope) { -// log = log.Named(cfg.Name) -// scope = scope.With(metrics.Tag("service", cfg.Name)) -// return log, scope -// }) -// -// Decorating a Scope affects all the child scopes of this Scope. -// -// Similar to a provider, the decorator function gets called *at most once*. -func (s *Scope) Decorate(decorator interface{}, opts ...DecorateOption) error { - var options decorateOptions - for _, opt := range opts { - opt.apply(&options) - } - - dn, err := newDecoratorNode(decorator, s, options) - if err != nil { - return err - } - - keys, err := findResultKeys(dn.results) - if err != nil { - return err - } - for _, k := range keys { - if _, ok := s.decorators[k]; ok { - return newErrInvalidInput( - fmt.Sprintf("cannot decorate using function %v: %s already decorated", dn.dtype, k), nil) - } - s.decorators[k] = dn - } - - if info := options.Info; info != nil { - params := dn.params.DotParam() - results := dn.results.DotResult() - info.ID = (ID)(dn.id) - info.Inputs = make([]*Input, len(params)) - info.Outputs = make([]*Output, len(results)) - - for i, param := range params { - info.Inputs[i] = &Input{ - t: param.Type, - optional: param.Optional, - name: param.Name, - group: param.Group, - } - } - for i, res := range results { - info.Outputs[i] = &Output{ - t: res.Type, - name: res.Name, - group: res.Group, - } - } - } - return nil -} - -func findResultKeys(r resultList) ([]key, error) { - // use BFS to search for all keys included in a resultList. - var ( - q []result - keys []key - ) - q = append(q, r) - - for len(q) > 0 { - res := q[0] - q = q[1:] - - switch innerResult := res.(type) { - case resultSingle: - keys = append(keys, key{t: innerResult.Type, name: innerResult.Name}) - case resultGrouped: - if innerResult.Type.Kind() != reflect.Slice { - return nil, newErrInvalidInput("decorating a value group requires decorating the entire value group, not a single value", nil) - } - keys = append(keys, key{t: innerResult.Type.Elem(), group: innerResult.Group}) - case resultObject: - for _, f := range innerResult.Fields { - q = append(q, f.Result) - } - case resultList: - q = append(q, innerResult.Results...) - } - } - return keys, nil -} diff --git a/vendor/go.uber.org/dig/doc.go b/vendor/go.uber.org/dig/doc.go deleted file mode 100644 index 77b01d04526..00000000000 --- a/vendor/go.uber.org/dig/doc.go +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// 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. - -// Package dig provides an opinionated way of resolving object dependencies. -// -// # Status -// -// STABLE. No breaking changes will be made in this major version. -// -// # Container -// -// Dig exposes type Container as an object capable of resolving a directed -// acyclic dependency graph. Use the New function to create one. -// -// c := dig.New() -// -// # Provide -// -// Constructors for different types are added to the container by using the -// Provide method. A constructor can declare a dependency on another type by -// simply adding it as a function parameter. Dependencies for a type can be -// added to the graph both, before and after the type was added. -// -// err := c.Provide(func(conn *sql.DB) (*UserGateway, error) { -// // ... -// }) -// if err != nil { -// // ... -// } -// -// if err := c.Provide(newDBConnection); err != nil { -// // ... -// } -// -// Multiple constructors can rely on the same type. The container creates a -// singleton for each retained type, instantiating it at most once when -// requested directly or as a dependency of another type. -// -// err := c.Provide(func(conn *sql.DB) *CommentGateway { -// // ... -// }) -// if err != nil { -// // ... -// } -// -// Constructors can declare any number of dependencies as parameters and -// optionally, return errors. -// -// err := c.Provide(func(u *UserGateway, c *CommentGateway) (*RequestHandler, error) { -// // ... -// }) -// if err != nil { -// // ... -// } -// -// if err := c.Provide(newHTTPServer); err != nil { -// // ... -// } -// -// Constructors can also return multiple results to add multiple types to the -// container. -// -// err := c.Provide(func(conn *sql.DB) (*UserGateway, *CommentGateway, error) { -// // ... -// }) -// if err != nil { -// // ... -// } -// -// Constructors that accept a variadic number of arguments are treated as if -// they don't have those arguments. That is, -// -// func NewVoteGateway(db *sql.DB, options ...Option) *VoteGateway -// -// Is treated the same as, -// -// func NewVoteGateway(db *sql.DB) *VoteGateway -// -// The constructor will be called with all other dependencies and no variadic -// arguments. -// -// # Invoke -// -// Types added to the container may be consumed by using the Invoke method. -// Invoke accepts any function that accepts one or more parameters and -// optionally, returns an error. Dig calls the function with the requested -// type, instantiating only those types that were requested by the function. -// The call fails if any type or its dependencies (both direct and transitive) -// were not available in the container. -// -// err := c.Invoke(func(l *log.Logger) { -// // ... -// }) -// if err != nil { -// // ... -// } -// -// err := c.Invoke(func(server *http.Server) error { -// // ... -// }) -// if err != nil { -// // ... -// } -// -// Any error returned by the invoked function is propagated back to the -// caller. -// -// # Parameter Objects -// -// Constructors declare their dependencies as function parameters. This can -// very quickly become unreadable if the constructor has a lot of -// dependencies. -// -// func NewHandler(users *UserGateway, comments *CommentGateway, posts *PostGateway, votes *VoteGateway, authz *AuthZGateway) *Handler { -// // ... -// } -// -// A pattern employed to improve readability in a situation like this is to -// create a struct that lists all the parameters of the function as fields and -// changing the function to accept that struct instead. This is referred to as -// a parameter object. -// -// Dig has first class support for parameter objects: any struct embedding -// dig.In gets treated as a parameter object. The following is equivalent to -// the constructor above. -// -// type HandlerParams struct { -// dig.In -// -// Users *UserGateway -// Comments *CommentGateway -// Posts *PostGateway -// Votes *VoteGateway -// AuthZ *AuthZGateway -// } -// -// func NewHandler(p HandlerParams) *Handler { -// // ... -// } -// -// Handlers can receive any combination of parameter objects and parameters. -// -// func NewHandler(p HandlerParams, l *log.Logger) *Handler { -// // ... -// } -// -// # Result Objects -// -// Result objects are the flip side of parameter objects. These are structs -// that represent multiple outputs from a single function as fields in the -// struct. Structs embedding dig.Out get treated as result objects. -// -// func SetupGateways(conn *sql.DB) (*UserGateway, *CommentGateway, *PostGateway, error) { -// // ... -// } -// -// The above is equivalent to, -// -// type Gateways struct { -// dig.Out -// -// Users *UserGateway -// Comments *CommentGateway -// Posts *PostGateway -// } -// -// func SetupGateways(conn *sql.DB) (Gateways, error) { -// // ... -// } -// -// # Optional Dependencies -// -// Constructors often don't have a hard dependency on some types and -// are able to operate in a degraded state when that dependency is missing. -// Dig supports declaring dependencies as optional by adding an -// `optional:"true"` tag to fields of a dig.In struct. -// -// Fields in a dig.In structs that have the `optional:"true"` tag are treated -// as optional by Dig. -// -// type UserGatewayParams struct { -// dig.In -// -// Conn *sql.DB -// Cache *redis.Client `optional:"true"` -// } -// -// If an optional field is not available in the container, the constructor -// will receive a zero value for the field. -// -// func NewUserGateway(p UserGatewayParams, log *log.Logger) (*UserGateway, error) { -// if p.Cache == nil { -// log.Print("Caching disabled") -// } -// // ... -// } -// -// Constructors that declare dependencies as optional MUST handle the case of -// those dependencies being absent. -// -// The optional tag also allows adding new dependencies without breaking -// existing consumers of the constructor. -// -// # Named Values -// -// Some use cases call for multiple values of the same type. Dig allows adding -// multiple values of the same type to the container with the use of Named -// Values. -// -// Named Values can be produced by passing the dig.Name option when a -// constructor is provided. All values produced by that constructor will have -// the given name. -// -// Given the following constructors, -// -// func NewReadOnlyConnection(...) (*sql.DB, error) -// func NewReadWriteConnection(...) (*sql.DB, error) -// -// You can provide *sql.DB into a Container under different names by passing -// the dig.Name option. -// -// c.Provide(NewReadOnlyConnection, dig.Name("ro")) -// c.Provide(NewReadWriteConnection, dig.Name("rw")) -// -// Alternatively, you can produce a dig.Out struct and tag its fields with -// `name:".."` to have the corresponding value added to the graph under the -// specified name. -// -// type ConnectionResult struct { -// dig.Out -// -// ReadWrite *sql.DB `name:"rw"` -// ReadOnly *sql.DB `name:"ro"` -// } -// -// func ConnectToDatabase(...) (ConnectionResult, error) { -// // ... -// return ConnectionResult{ReadWrite: rw, ReadOnly: ro}, nil -// } -// -// Regardless of how a Named Value was produced, it can be consumed by another -// constructor by accepting a dig.In struct which has exported fields with the -// same name AND type that you provided. -// -// type GatewayParams struct { -// dig.In -// -// WriteToConn *sql.DB `name:"rw"` -// ReadFromConn *sql.DB `name:"ro"` -// } -// -// The name tag may be combined with the optional tag to declare the -// dependency optional. -// -// type GatewayParams struct { -// dig.In -// -// WriteToConn *sql.DB `name:"rw"` -// ReadFromConn *sql.DB `name:"ro" optional:"true"` -// } -// -// func NewCommentGateway(p GatewayParams, log *log.Logger) (*CommentGateway, error) { -// if p.ReadFromConn == nil { -// log.Print("Warning: Using RW connection for reads") -// p.ReadFromConn = p.WriteToConn -// } -// // ... -// } -// -// # Value Groups -// -// Added in Dig 1.2. -// -// Dig provides value groups to allow producing and consuming many values of -// the same type. Value groups allow constructors to send values to a named, -// unordered collection in the container. Other constructors can request all -// values in this collection as a slice. -// -// Constructors can send values into value groups by returning a dig.Out -// struct tagged with `group:".."`. -// -// type HandlerResult struct { -// dig.Out -// -// Handler Handler `group:"server"` -// } -// -// func NewHelloHandler() HandlerResult { -// .. -// } -// -// func NewEchoHandler() HandlerResult { -// .. -// } -// -// Any number of constructors may provide values to this named collection. -// Other constructors can request all values for this collection by requesting -// a slice tagged with `group:".."`. This will execute all constructors that -// provide a value to that group in an unspecified order. -// -// type ServerParams struct { -// dig.In -// -// Handlers []Handler `group:"server"` -// } -// -// func NewServer(p ServerParams) *Server { -// server := newServer() -// for _, h := range p.Handlers { -// server.Register(h) -// } -// return server -// } -// -// Note that values in a value group are unordered. Dig makes no guarantees -// about the order in which these values will be produced. -// -// Value groups can be used to provide multiple values for a group from a -// dig.Out using slices, however considering groups are retrieved by requesting -// a slice this implies that the values must be retrieved using a slice of -// slices. As of dig v1.9.0, if you want to provide individual elements to the -// group instead of the slice itself, you can add the `flatten` modifier to the -// group from a dig.Out. -// -// type IntResult struct { -// dig.Out -// -// Handler []int `group:"server"` // [][]int from dig.In -// Handler []int `group:"server,flatten"` // []int from dig.In -// } -package dig // import "go.uber.org/dig" diff --git a/vendor/go.uber.org/dig/error.go b/vendor/go.uber.org/dig/error.go deleted file mode 100644 index 8aba9ee5a1a..00000000000 --- a/vendor/go.uber.org/dig/error.go +++ /dev/null @@ -1,527 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "errors" - "fmt" - "io" - "reflect" - "sort" - - "go.uber.org/dig/internal/digreflect" - "go.uber.org/dig/internal/dot" -) - -// Error is an interface implemented by all Dig errors. -// -// Use this interface, in conjunction with [RootCause], in order to -// determine if errors you encounter come from Dig, or if they come -// from provided constructors or invoked functions. See [RootCause] -// for more info. -type Error interface { - error - - // Writes the message or context for this error in the chain. - // - // Note: the Error interface must always have a private function - // such as this one in order to maintain properly sealed. - // - // verb is either %v or %+v. - writeMessage(w io.Writer, v string) -} - -// a digError is a dig.Error with additional functionality for -// internal use - namely the ability to be formatted. -type digError interface { - Error - fmt.Formatter -} - -// A PanicError occurs when a panic occurs while running functions given to the container -// with the [RecoverFromPanic] option being set. It contains the panic message from the -// original panic. A PanicError does not wrap other errors, and it does not implement -// dig.Error, meaning it will be returned from [RootCause]. With the [RecoverFromPanic] -// option set, a panic can be distinguished from dig errors and errors from provided/ -// invoked/decorated functions like so: -// -// rootCause := dig.RootCause(err) -// -// var pe dig.PanicError -// var de dig.Error -// if errors.As(rootCause, &pe) { -// // This is caused by a panic -// } else if errors.As(err, &de) { -// // This is a dig error -// } else { -// // This is an error from one of my provided/invoked functions or decorators -// } -// -// Or, if only interested in distinguishing panics from errors: -// -// var pe dig.PanicError -// if errors.As(err, &pe) { -// // This is caused by a panic -// } else { -// // This is an error -// } -type PanicError struct { - - // The function the panic occurred at - fn *digreflect.Func - - // The panic that was returned from recover() - Panic any -} - -// Format will format the PanicError, expanding the corresponding function if in +v mode. -func (e PanicError) Format(w fmt.State, c rune) { - if w.Flag('+') && c == 'v' { - fmt.Fprintf(w, "panic: %q in func: %+v", e.Panic, e.fn) - } else { - fmt.Fprintf(w, "panic: %q in func: %v", e.Panic, e.fn) - } -} - -func (e PanicError) Error() string { - return fmt.Sprint(e) -} - -// formatError will call a dig.Error's writeMessage() method to print the error message -// and then will automatically attempt to print errors wrapped underneath (which can create -// a recursive effect if the wrapped error's Format() method then points back to this function). -func formatError(e digError, w fmt.State, v rune) { - multiline := w.Flag('+') && v == 'v' - verb := "%v" - if multiline { - verb = "%+v" - } - - // "context: " or "context:\n" - e.writeMessage(w, verb) - - // Will route back to this function recursively if next error - // is also wrapped and points back here - wrappedError := errors.Unwrap(e) - if wrappedError == nil { - return - } - io.WriteString(w, ":") - if multiline { - io.WriteString(w, "\n") - } else { - io.WriteString(w, " ") - } - fmt.Fprintf(w, verb, wrappedError) -} - -// RootCause returns the first non-dig.Error in a chain of wrapped -// errors, if there is one. Otherwise, RootCause returns the error -// on the bottom of the chain of wrapped errors. -// -// Use this function and errors.As to differentiate between Dig errors -// and errors thrown by provided constructors or invoked functions: -// -// rootCause := dig.RootCause(err) -// var de dig.Error -// if errors.As(rootCause, &de) { -// // Is a Dig error -// } else { -// // Is an error thrown by one of my provided/invoked/decorated functions -// } -// -// See [PanicError] for an example showing how to additionally detect -// and handle panics in provided/invoked/decorated functions. -func RootCause(err error) error { - var de Error - // Dig down to first non dig.Error, or bottom of chain - for ; errors.As(err, &de); err = errors.Unwrap(de) { - } - - if err == nil { - return de - } - - return err -} - -// errInvalidInput is returned whenever the user provides bad input when -// interacting with the container. May optionally have a more detailed -// error wrapped underneath. -type errInvalidInput struct { - Message string - Cause error -} - -var _ digError = errInvalidInput{} - -// newErrInvalidInput creates a new errInvalidInput, wrapping the given -// other error that caused this error. If there is no underlying cause, -// pass in nil. This will cause all attempts to unwrap this error to return -// nil, replicating errors.Unwrap's behavior when passed an error without -// an Unwrap() method. -func newErrInvalidInput(msg string, cause error) errInvalidInput { - return errInvalidInput{msg, cause} -} - -func (e errInvalidInput) Error() string { return fmt.Sprint(e) } - -func (e errInvalidInput) Unwrap() error { return e.Cause } - -func (e errInvalidInput) writeMessage(w io.Writer, _ string) { - fmt.Fprintf(w, e.Message) -} - -func (e errInvalidInput) Format(w fmt.State, c rune) { - formatError(e, w, c) -} - -// errProvide is returned when a constructor could not be Provided into the -// container. -type errProvide struct { - Func *digreflect.Func - Reason error -} - -var _ digError = errProvide{} - -func (e errProvide) Error() string { return fmt.Sprint(e) } - -func (e errProvide) Unwrap() error { return e.Reason } - -func (e errProvide) writeMessage(w io.Writer, verb string) { - fmt.Fprintf(w, "cannot provide function "+verb, e.Func) -} - -func (e errProvide) Format(w fmt.State, c rune) { - formatError(e, w, c) -} - -// errConstructorFailed is returned when a user-provided constructor failed -// with a non-nil error. -type errConstructorFailed struct { - Func *digreflect.Func - Reason error -} - -var _ digError = errConstructorFailed{} - -func (e errConstructorFailed) Error() string { return fmt.Sprint(e) } - -func (e errConstructorFailed) Unwrap() error { return e.Reason } - -func (e errConstructorFailed) writeMessage(w io.Writer, verb string) { - fmt.Fprintf(w, "received non-nil error from function "+verb, e.Func) -} - -func (e errConstructorFailed) Format(w fmt.State, c rune) { - formatError(e, w, c) -} - -// errArgumentsFailed is returned when a function could not be run because one -// of its dependencies failed to build for any reason. -type errArgumentsFailed struct { - Func *digreflect.Func - Reason error -} - -var _ digError = errArgumentsFailed{} - -func (e errArgumentsFailed) Error() string { return fmt.Sprint(e) } - -func (e errArgumentsFailed) Unwrap() error { return e.Reason } - -func (e errArgumentsFailed) writeMessage(w io.Writer, verb string) { - fmt.Fprintf(w, "could not build arguments for function "+verb, e.Func) -} - -func (e errArgumentsFailed) Format(w fmt.State, c rune) { - formatError(e, w, c) -} - -// errMissingDependencies is returned when the dependencies of a function are -// not available in the container. -type errMissingDependencies struct { - Func *digreflect.Func - Reason error -} - -var _ digError = errMissingDependencies{} - -func (e errMissingDependencies) Error() string { return fmt.Sprint(e) } - -func (e errMissingDependencies) Unwrap() error { return e.Reason } - -func (e errMissingDependencies) writeMessage(w io.Writer, verb string) { - fmt.Fprintf(w, "missing dependencies for function "+verb, e.Func) -} - -func (e errMissingDependencies) Format(w fmt.State, c rune) { - formatError(e, w, c) -} - -// errParamSingleFailed is returned when a paramSingle could not be built. -type errParamSingleFailed struct { - Key key - Reason error - CtorID dot.CtorID -} - -var _ digError = errParamSingleFailed{} - -func (e errParamSingleFailed) Error() string { return fmt.Sprint(e) } - -func (e errParamSingleFailed) Unwrap() error { return e.Reason } - -func (e errParamSingleFailed) writeMessage(w io.Writer, _ string) { - fmt.Fprintf(w, "failed to build %v", e.Key) -} - -func (e errParamSingleFailed) Format(w fmt.State, c rune) { - formatError(e, w, c) -} - -func (e errParamSingleFailed) updateGraph(g *dot.Graph) { - failed := &dot.Result{ - Node: &dot.Node{ - Name: e.Key.name, - Group: e.Key.group, - Type: e.Key.t, - }, - } - g.FailNodes([]*dot.Result{failed}, e.CtorID) -} - -// errParamGroupFailed is returned when a value group cannot be built because -// any of the values in the group failed to build. -type errParamGroupFailed struct { - Key key - Reason error - CtorID dot.CtorID -} - -var _ digError = errParamGroupFailed{} - -func (e errParamGroupFailed) Error() string { return fmt.Sprint(e) } - -func (e errParamGroupFailed) Unwrap() error { return e.Reason } - -func (e errParamGroupFailed) writeMessage(w io.Writer, _ string) { - fmt.Fprintf(w, "could not build value group %v", e.Key) -} - -func (e errParamGroupFailed) Format(w fmt.State, c rune) { - formatError(e, w, c) -} - -func (e errParamGroupFailed) updateGraph(g *dot.Graph) { - g.FailGroupNodes(e.Key.group, e.Key.t, e.CtorID) -} - -// missingType holds information about a type that was missing in the -// container. -type missingType struct { - Key key // item that was missing - - // If non-empty, we will include suggestions for what the user may have - // meant. - suggestions []key -} - -// Format prints a string representation of missingType. -// -// With %v, it prints a short representation ideal for an itemized list. -// -// io.Writer -// io.Writer: did you mean *bytes.Buffer? -// io.Writer: did you mean *bytes.Buffer, or *os.File? -// -// With %+v, it prints a longer representation ideal for standalone output. -// -// io.Writer: did you mean to Provide it? -// io.Writer: did you mean to use *bytes.Buffer? -// io.Writer: did you mean to use one of *bytes.Buffer, or *os.File? -func (mt missingType) Format(w fmt.State, v rune) { - plusV := w.Flag('+') && v == 'v' - - fmt.Fprint(w, mt.Key) - switch len(mt.suggestions) { - case 0: - if plusV { - io.WriteString(w, " (did you mean to Provide it?)") - } - case 1: - sug := mt.suggestions[0] - if plusV { - fmt.Fprintf(w, " (did you mean to use %v?)", sug) - } else { - fmt.Fprintf(w, " (did you mean %v?)", sug) - } - default: - if plusV { - io.WriteString(w, " (did you mean to use one of ") - } else { - io.WriteString(w, " (did you mean ") - } - - lastIdx := len(mt.suggestions) - 1 - for i, sug := range mt.suggestions { - if i > 0 { - io.WriteString(w, ", ") - if i == lastIdx { - io.WriteString(w, "or ") - } - } - fmt.Fprint(w, sug) - } - io.WriteString(w, "?)") - } -} - -// errMissingType is returned when one or more values that were expected in -// the container were not available. -// -// Multiple instances of this error may be merged together by appending them. -type errMissingTypes []missingType // inv: len > 0 - -var _ digError = errMissingTypes(nil) - -func newErrMissingTypes(c containerStore, k key) errMissingTypes { - // Possible types we will look for in the container. We will always look - // for pointers to the requested type and some extras on a per-Kind basis. - suggestions := []reflect.Type{reflect.PtrTo(k.t)} - - if k.t.Kind() == reflect.Ptr { - // The user requested a pointer but maybe we have a value. - suggestions = append(suggestions, k.t.Elem()) - } - - if k.t.Kind() == reflect.Slice { - // Maybe the user meant a slice of pointers while we have the slice of elements - suggestions = append(suggestions, reflect.SliceOf(reflect.PtrTo(k.t.Elem()))) - - // Maybe the user meant a slice of elements while we have the slice of pointers - sliceElement := k.t.Elem() - if sliceElement.Kind() == reflect.Ptr { - suggestions = append(suggestions, reflect.SliceOf(sliceElement.Elem())) - } - } - - if k.t.Kind() == reflect.Array { - // Maybe the user meant an array of pointers while we have the array of elements - suggestions = append(suggestions, reflect.ArrayOf(k.t.Len(), reflect.PtrTo(k.t.Elem()))) - - // Maybe the user meant an array of elements while we have the array of pointers - arrayElement := k.t.Elem() - if arrayElement.Kind() == reflect.Ptr { - suggestions = append(suggestions, reflect.ArrayOf(k.t.Len(), arrayElement.Elem())) - } - } - - knownTypes := c.knownTypes() - if k.t.Kind() == reflect.Interface { - // Maybe we have an implementation of the interface. - for _, t := range knownTypes { - if t.Implements(k.t) { - suggestions = append(suggestions, t) - } - } - } else { - // Maybe we have an interface that this type implements. - for _, t := range knownTypes { - if t.Kind() == reflect.Interface { - if k.t.Implements(t) { - suggestions = append(suggestions, t) - } - } - } - } - - // range through c.providers is non-deterministic. Let's sort the list of - // suggestions. - sort.Sort(byTypeName(suggestions)) - - mt := missingType{Key: k} - for _, t := range suggestions { - if len(c.getValueProviders(k.name, t)) > 0 { - k.t = t - mt.suggestions = append(mt.suggestions, k) - } - } - - return errMissingTypes{mt} -} - -func (e errMissingTypes) Error() string { return fmt.Sprint(e) } - -func (e errMissingTypes) writeMessage(w io.Writer, v string) { - - multiline := v == "%+v" - - if len(e) == 1 { - io.WriteString(w, "missing type:") - } else { - io.WriteString(w, "missing types:") - } - - if !multiline { - // With %v, we need a space between : since the error - // won't be on a new line. - io.WriteString(w, " ") - } - - for i, mt := range e { - if multiline { - io.WriteString(w, "\n\t- ") - } else if i > 0 { - io.WriteString(w, "; ") - } - - if multiline { - fmt.Fprintf(w, "%+v", mt) - } else { - fmt.Fprintf(w, "%v", mt) - } - } -} - -func (e errMissingTypes) Format(w fmt.State, c rune) { - formatError(e, w, c) -} - -func (e errMissingTypes) updateGraph(g *dot.Graph) { - missing := make([]*dot.Result, len(e)) - - for i, mt := range e { - missing[i] = &dot.Result{ - Node: &dot.Node{ - Name: mt.Key.name, - Group: mt.Key.group, - Type: mt.Key.t, - }, - } - } - g.AddMissingNodes(missing) -} - -type errVisualizer interface { - updateGraph(*dot.Graph) -} diff --git a/vendor/go.uber.org/dig/glide.yaml b/vendor/go.uber.org/dig/glide.yaml deleted file mode 100644 index 972b804cd11..00000000000 --- a/vendor/go.uber.org/dig/glide.yaml +++ /dev/null @@ -1,7 +0,0 @@ -package: go.uber.org/dig -license: MIT -testImport: -- package: github.com/stretchr/testify - subpackages: - - assert - - require diff --git a/vendor/go.uber.org/dig/graph.go b/vendor/go.uber.org/dig/graph.go deleted file mode 100644 index e08f1f54b21..00000000000 --- a/vendor/go.uber.org/dig/graph.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// 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. - -package dig - -import "go.uber.org/dig/internal/graph" - -// graphNode is a single node in the dependency graph. -type graphNode struct { - Wrapped interface{} -} - -// graphHolder is the dependency graph of the container. -// It saves constructorNodes and paramGroupedSlice (value groups) -// as nodes in the graph. -// It implements the graph interface defined by internal/graph. -// It has 1-1 correspondence with the Scope whose graph it represents. -type graphHolder struct { - // all the nodes defined in the graph. - nodes []*graphNode - - // Scope whose graph this holder contains. - s *Scope - - // Number of nodes in the graph at last snapshot. - // -1 if no snapshot has been taken. - snap int -} - -var _ graph.Graph = (*graphHolder)(nil) - -func newGraphHolder(s *Scope) *graphHolder { - return &graphHolder{s: s, snap: -1} -} - -func (gh *graphHolder) Order() int { return len(gh.nodes) } - -// EdgesFrom returns the indices of nodes that are dependencies of node u. -// -// To do that, it needs to do one of the following: -// -// For constructor nodes, it retrieves the providers of the constructor's -// parameters from the container and reports their orders. -// -// For value group nodes, it retrieves the group providers from the container -// and reports their orders. -func (gh *graphHolder) EdgesFrom(u int) []int { - var orders []int - switch w := gh.Lookup(u).(type) { - case *constructorNode: - for _, param := range w.paramList.Params { - orders = append(orders, getParamOrder(gh, param)...) - } - case *paramGroupedSlice: - providers := gh.s.getAllGroupProviders(w.Group, w.Type.Elem()) - for _, provider := range providers { - orders = append(orders, provider.Order(gh.s)) - } - } - return orders -} - -// NewNode adds a new value to the graph and returns its order. -func (gh *graphHolder) NewNode(wrapped interface{}) int { - order := len(gh.nodes) - gh.nodes = append(gh.nodes, &graphNode{ - Wrapped: wrapped, - }) - return order -} - -// Lookup retrieves the value for the node with the given order. -// Lookup panics if i is invalid. -func (gh *graphHolder) Lookup(i int) interface{} { - return gh.nodes[i].Wrapped -} - -// Snapshot takes a temporary snapshot of the current state of the graph. -// Use with Rollback to undo changes to the graph. -// -// Only one snapshot is allowed at a time. -// Multiple calls to snapshot will overwrite prior snapshots. -func (gh *graphHolder) Snapshot() { - gh.snap = len(gh.nodes) -} - -// Rollback rolls back a snapshot to a previously captured state. -// This is a no-op if no snapshot was captured. -func (gh *graphHolder) Rollback() { - if gh.snap < 0 { - return - } - - // nodes is an append-only list. To rollback, we just drop the - // extraneous entries from the slice. - gh.nodes = gh.nodes[:gh.snap] - gh.snap = -1 -} diff --git a/vendor/go.uber.org/dig/group.go b/vendor/go.uber.org/dig/group.go deleted file mode 100644 index b513611167f..00000000000 --- a/vendor/go.uber.org/dig/group.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "fmt" - "io" - "strings" -) - -const ( - _groupTag = "group" -) - -type group struct { - Name string - Flatten bool - Soft bool -} - -type errInvalidGroupOption struct{ Option string } - -var _ digError = errInvalidGroupOption{} - -func (e errInvalidGroupOption) Error() string { return fmt.Sprint(e) } - -func (e errInvalidGroupOption) writeMessage(w io.Writer, v string) { - fmt.Fprintf(w, "invalid option %q", e.Option) -} - -func (e errInvalidGroupOption) Format(w fmt.State, c rune) { - formatError(e, w, c) -} - -func parseGroupString(s string) (group, error) { - components := strings.Split(s, ",") - g := group{Name: components[0]} - for _, c := range components[1:] { - switch c { - case "flatten": - g.Flatten = true - case "soft": - g.Soft = true - default: - return g, errInvalidGroupOption{Option: c} - } - } - return g, nil -} diff --git a/vendor/go.uber.org/dig/inout.go b/vendor/go.uber.org/dig/inout.go deleted file mode 100644 index 3d575842951..00000000000 --- a/vendor/go.uber.org/dig/inout.go +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "container/list" - "fmt" - "reflect" - "strconv" -) - -var ( - _noValue reflect.Value - _errType = reflect.TypeOf((*error)(nil)).Elem() - _inPtrType = reflect.TypeOf((*In)(nil)) - _inType = reflect.TypeOf(In{}) - _outPtrType = reflect.TypeOf((*Out)(nil)) - _outType = reflect.TypeOf(Out{}) -) - -// Placeholder type placed in dig.In/dig.out to make their special nature -// obvious in godocs. -// Otherwise they will appear as plain empty structs. -type digSentinel struct{} - -// In may be embedded into structs to request dig to treat them as special -// parameter structs. When a constructor accepts such a struct, instead of the -// struct becoming a dependency for that constructor, all its fields become -// dependencies instead. See the section on Parameter Objects in the -// package-level documentation for more information. -// -// Fields of the struct may optionally be tagged to customize the behavior of -// dig. The following tags are supported, -// -// name Requests a value with the same name and type from the -// container. See Named Values for more information. -// optional If set to true, indicates that the dependency is optional and -// the constructor gracefully handles its absence. -// group Name of the Value Group from which this field will be filled. -// The field must be a slice type. See Value Groups in the -// package documentation for more information. -type In struct{ _ digSentinel } - -// Out is an embeddable type that signals to dig that the returned -// struct should be treated differently. Instead of the struct itself -// becoming part of the container, all members of the struct will. - -// Out may be embedded into structs to request dig to treat them as special -// result structs. When a constructor returns such a struct, instead of the -// struct becoming a result of the constructor, all its fields become results -// of the constructor. See the section on Result Objects in the package-level -// documentation for more information. -// -// Fields of the struct may optionally be tagged to customize the behavior of -// dig. The following tags are supported, -// -// name Specifies the name of the value. Only a field on a dig.In -// struct with the same 'name' annotation can receive this -// value. See Named Values for more information. -// group Name of the Value Group to which this field's value is being -// sent. See Value Groups in the package documentation for more -// information. -type Out struct{ _ digSentinel } - -func isError(t reflect.Type) bool { - return t.Implements(_errType) -} - -// IsIn checks whether the given struct is a dig.In struct. A struct qualifies -// as a dig.In struct if it embeds the dig.In type or if any struct that it -// embeds is a dig.In struct. The parameter may be the reflect.Type of the -// struct rather than the struct itself. -// -// A struct MUST qualify as a dig.In struct for its fields to be treated -// specially by dig. -// -// See the documentation for dig.In for a comprehensive list of supported -// tags. -func IsIn(o interface{}) bool { - return embedsType(o, _inType) -} - -// IsOut checks whether the given struct is a dig.Out struct. A struct -// qualifies as a dig.Out struct if it embeds the dig.Out type or if any -// struct that it embeds is a dig.Out struct. The parameter may be the -// reflect.Type of the struct rather than the struct itself. -// -// A struct MUST qualify as a dig.Out struct for its fields to be treated -// specially by dig. -// -// See the documentation for dig.Out for a comprehensive list of supported -// tags. -func IsOut(o interface{}) bool { - return embedsType(o, _outType) -} - -// Returns true if t embeds e or if any of the types embedded by t embed e. -func embedsType(i interface{}, e reflect.Type) bool { - // TODO: this function doesn't consider e being a pointer. - // given `type A foo { *In }`, this function would return false for - // embedding dig.In, which makes for some extra error checking in places - // that call this function. Might be worthwhile to consider reflect.Indirect - // usage to clean up the callers. - - if i == nil { - return false - } - - // maybe it's already a reflect.Type - t, ok := i.(reflect.Type) - if !ok { - // take the type if it's not - t = reflect.TypeOf(i) - } - - // We are going to do a breadth-first search of all embedded fields. - types := list.New() - types.PushBack(t) - for types.Len() > 0 { - t := types.Remove(types.Front()).(reflect.Type) - - if t == e { - return true - } - - if t.Kind() != reflect.Struct { - continue - } - - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if f.Anonymous { - types.PushBack(f.Type) - } - } - } - - // If perf is an issue, we can cache known In objects and Out objects in a - // map[reflect.Type]struct{}. - return false -} - -// Checks if a field of an In struct is optional. -func isFieldOptional(f reflect.StructField) (bool, error) { - tag := f.Tag.Get(_optionalTag) - if tag == "" { - return false, nil - } - - optional, err := strconv.ParseBool(tag) - if err != nil { - err = newErrInvalidInput( - fmt.Sprintf("invalid value %q for %q tag on field %v", tag, _optionalTag, f.Name), err) - } - - return optional, err -} diff --git a/vendor/go.uber.org/dig/internal/digerror/errors.go b/vendor/go.uber.org/dig/internal/digerror/errors.go deleted file mode 100644 index 13dde3dce03..00000000000 --- a/vendor/go.uber.org/dig/internal/digerror/errors.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// 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. - -package digerror - -import ( - "fmt" -) - -// BugPanicf panics with the provided message directing users to GitHub issues -// creation page. -func BugPanicf(msg string, args ...interface{}) { - panic(fmt.Sprintf("It looks like you have found a bug in dig. "+ - "Please file an issue at https://github.com/uber-go/dig/issues/new "+ - "and provide the following message: "+ - msg, args...)) -} diff --git a/vendor/go.uber.org/dig/internal/digreflect/func.go b/vendor/go.uber.org/dig/internal/digreflect/func.go deleted file mode 100644 index 8554ed8db7b..00000000000 --- a/vendor/go.uber.org/dig/internal/digreflect/func.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// 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. - -package digreflect - -import ( - "fmt" - "net/url" - "reflect" - "runtime" - "strings" -) - -// Func contains runtime information about a function. -type Func struct { - // Name of the function. - Name string - - // Name of the package in which this function is defined. - Package string - - // Path to the file in which this function is defined. - File string - - // Line number in the file at which this function is defined. - Line int -} - -// String returns a string representation of the function. -func (f *Func) String() string { - return fmt.Sprint(f) -} - -// Format implements fmt.Formatter for Func, printing a single-line -// representation for %v and a multi-line one for %+v. -func (f *Func) Format(w fmt.State, c rune) { - if w.Flag('+') && c == 'v' { - // "path/to/package".MyFunction - // path/to/file.go:42 - fmt.Fprintf(w, "%q.%v", f.Package, f.Name) - fmt.Fprintf(w, "\n\t%v:%v", f.File, f.Line) - } else { - // "path/to/package".MyFunction (path/to/file.go:42) - fmt.Fprintf(w, "%q.%v (%v:%v)", f.Package, f.Name, f.File, f.Line) - } -} - -// InspectFunc inspects and returns runtime information about the given -// function. -func InspectFunc(function interface{}) *Func { - fptr := reflect.ValueOf(function).Pointer() - return InspectFuncPC(fptr) -} - -// InspectFuncPC inspects and returns runtime information about the function -// at the given program counter address. -func InspectFuncPC(pc uintptr) *Func { - f := runtime.FuncForPC(pc) - if f == nil { - return nil - } - pkgName, funcName := splitFuncName(f.Name()) - fileName, lineNum := f.FileLine(pc) - return &Func{ - Name: funcName, - Package: pkgName, - File: fileName, - Line: lineNum, - } -} - -const _vendor = "/vendor/" - -func splitFuncName(function string) (pname string, fname string) { - if len(function) == 0 { - return - } - - // We have something like "path.to/my/pkg.MyFunction". If the function is - // a closure, it is something like, "path.to/my/pkg.MyFunction.func1". - - idx := 0 - - // Everything up to the first "." after the last "/" is the package name. - // Everything after the "." is the full function name. - if i := strings.LastIndex(function, "/"); i >= 0 { - idx = i - } - if i := strings.Index(function[idx:], "."); i >= 0 { - idx += i - } - pname, fname = function[:idx], function[idx+1:] - - // The package may be vendored. - if i := strings.Index(pname, _vendor); i > 0 { - pname = pname[i+len(_vendor):] - } - - // Package names are URL-encoded to avoid ambiguity in the case where the - // package name contains ".git". Otherwise, "foo/bar.git.MyFunction" would - // mean that "git" is the top-level function and "MyFunction" is embedded - // inside it. - if unescaped, err := url.QueryUnescape(pname); err == nil { - pname = unescaped - } - - return -} diff --git a/vendor/go.uber.org/dig/internal/dot/README.md b/vendor/go.uber.org/dig/internal/dot/README.md deleted file mode 100644 index 1198ade5474..00000000000 --- a/vendor/go.uber.org/dig/internal/dot/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Dot - -The dot module generates a DOT file representation of a dependency graph. - -## Interpreting the graph - -The graph should be read from left to right. The leftmost node in the graph (the root node) depends -on its dependency tree to the right. An arrow from node_a to node_b in the graph means that node_b -is consumed by node_a and that node_b is a parameter of node_a. The rendered graph holds the -following kinds of nodes, - -**Nodes:** - -- *Constructors* [Rectangles]: Takes parameters and produces results. -- *Results* [Ovals]: Results inside a constructor are produced by that constructor. Results are consumed -directly by other constructors and/or part of a group of results. -- *Groups* [Diamonds]: Represent value groups in [fx](https://godoc.org/go.uber.org/fx). Multiple results can form a group. Any -result linked to a group by an edge are members of that group. A group is a collection of results. -Groups can also be parameters of constructors. - -**Edges:** - -- *Solid Arrows*: An arrow from node_a to node_b means that node_b is a parameter of node_a and that -node_a depends on node_b. -- *Dashed Arrows*: A dashed arrow from node_a to node_b represents an optional dependency that node_a -has on node_b. - -**Graph Colors:** - -- *Red*: Graph nodes are the root cause failures. -- *Orange*: Graph nodes are the transitive failures. - -## Testing and verifying changes - -Unit tests and visualize golden tests are run with - -```shell -$ make test -``` - -You can visualize the effect of your code changes by visualizing generated test graphs as pngs. - -In the dig root directory, generate the graph DOT files with respect to your latest code changes. - -```shell -$ go test -generate -``` - -Assuming that you have [graphviz](https://www.graphviz.org/) installed and are in the testdata directory, -generate a png image representation of a graph for viewing. - -```shell -$ dot -Tpng ${name_of_dot_file_in_testdata}.dot -o ${name_of_dot_file_in_testdata}.png -$ open ${name_of_dot_file_in_testdata}.png -``` - -## Graph Pruning - -If dot.Visualize is used to visualize an error graph, non-failing nodes are pruned out of the graph -to make the error graph more readable to the user. Pruning increases readability since successful -nodes clutter the graph and do not help the user debug errors. diff --git a/vendor/go.uber.org/dig/internal/dot/graph.go b/vendor/go.uber.org/dig/internal/dot/graph.go deleted file mode 100644 index 3706fa1197b..00000000000 --- a/vendor/go.uber.org/dig/internal/dot/graph.go +++ /dev/null @@ -1,466 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// 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. - -package dot - -import ( - "fmt" - "reflect" -) - -// ErrorType of a constructor or group is updated when they fail to build. -type ErrorType int - -const ( - noError ErrorType = iota - rootCause - transitiveFailure -) - -// CtorID is a unique numeric identifier for constructors. -type CtorID uintptr - -// Ctor encodes a constructor provided to the container for the DOT graph. -type Ctor struct { - Name string - Package string - File string - Line int - ID CtorID - Params []*Param - GroupParams []*Group - Results []*Result - ErrorType ErrorType -} - -// removeParam deletes the dependency on the provided result's nodeKey. -// This is used to prune links to results of deleted constructors. -func (c *Ctor) removeParam(k nodeKey) { - var pruned []*Param - for _, p := range c.Params { - if k != p.nodeKey() { - pruned = append(pruned, p) - } - } - c.Params = pruned -} - -type nodeKey struct { - t reflect.Type - name string - group string -} - -// Node is a single node in a graph and is embedded into Params and Results. -type Node struct { - Type reflect.Type - Name string - Group string -} - -func (n *Node) nodeKey() nodeKey { - return nodeKey{t: n.Type, name: n.Name, group: n.Group} -} - -// Param is a parameter node in the graph. Parameters are the input to constructors. -type Param struct { - *Node - - Optional bool -} - -// Result is a result node in the graph. Results are the output of constructors. -type Result struct { - *Node - - // GroupIndex is added to differentiate grouped values from one another. - // Since grouped values have the same type and group, their Node / string - // representations are the same so we need indices to uniquely identify - // the values. - GroupIndex int -} - -// Group is a group node in the graph. Group represents an fx value group. -type Group struct { - // Type is the type of values in the group. - Type reflect.Type - Name string - Results []*Result - ErrorType ErrorType -} - -func (g *Group) nodeKey() nodeKey { - return nodeKey{t: g.Type, group: g.Name} -} - -// TODO(rhang): Avoid linear search to discover group results that should be pruned. -func (g *Group) removeResult(r *Result) { - var pruned []*Result - for _, rg := range g.Results { - if r.GroupIndex != rg.GroupIndex { - pruned = append(pruned, rg) - } - } - g.Results = pruned -} - -// Graph is the DOT-format graph in a Container. -type Graph struct { - Ctors []*Ctor - ctorMap map[CtorID]*Ctor - - Groups []*Group - groupMap map[nodeKey]*Group - - consumers map[nodeKey][]*Ctor - - Failed *FailedNodes -} - -// FailedNodes is the nodes that failed in the graph. -type FailedNodes struct { - // RootCauses is a list of the point of failures. They are the root causes - // of failed invokes and can be either missing types (not provided) or - // error types (error providing). - RootCauses []*Result - - // TransitiveFailures is the list of nodes that failed to build due to - // missing/failed dependencies. - TransitiveFailures []*Result - - // ctors is a collection of failed constructors IDs that are populated as the graph is - // traversed for errors. - ctors map[CtorID]struct{} - - // Groups is a collection of failed groupKeys that is populated as the graph is traversed - // for errors. - groups map[nodeKey]struct{} -} - -// NewGraph creates an empty graph. -func NewGraph() *Graph { - return &Graph{ - ctorMap: make(map[CtorID]*Ctor), - groupMap: make(map[nodeKey]*Group), - consumers: make(map[nodeKey][]*Ctor), - Failed: &FailedNodes{ - ctors: make(map[CtorID]struct{}), - groups: make(map[nodeKey]struct{}), - }, - } -} - -// NewGroup creates a new group with information in the groupKey. -func NewGroup(k nodeKey) *Group { - return &Group{ - Type: k.t, - Name: k.group, - } -} - -// AddCtor adds the constructor with paramList and resultList into the graph. -func (dg *Graph) AddCtor(c *Ctor, paramList []*Param, resultList []*Result) { - var ( - params []*Param - groupParams []*Group - ) - - // Loop through the paramList to separate them into regular params and - // grouped params. For grouped params, we use getGroup to find the actual - // group. - for _, param := range paramList { - if param.Group == "" { - // Not a value group. - params = append(params, param) - continue - } - - k := nodeKey{t: param.Type.Elem(), group: param.Group} - group := dg.getGroup(k) - groupParams = append(groupParams, group) - } - - for _, result := range resultList { - // If the result is a grouped value, we want to update its GroupIndex - // and add it to the Group. - if result.Group != "" { - dg.addToGroup(result, c.ID) - } - } - - c.Params = params - c.GroupParams = groupParams - c.Results = resultList - - // Track which constructors consume a parameter. - for _, p := range paramList { - k := p.nodeKey() - dg.consumers[k] = append(dg.consumers[k], c) - } - - dg.Ctors = append(dg.Ctors, c) - dg.ctorMap[c.ID] = c -} - -func (dg *Graph) failNode(r *Result, isRootCause bool) { - if isRootCause { - dg.addRootCause(r) - } else { - dg.addTransitiveFailure(r) - } -} - -// AddMissingNodes adds missing nodes to the list of failed Results in the graph. -func (dg *Graph) AddMissingNodes(results []*Result) { - // The failure(s) are root causes if there are no other failures. - isRootCause := len(dg.Failed.RootCauses) == 0 - - for _, r := range results { - dg.failNode(r, isRootCause) - } -} - -// FailNodes adds results to the list of failed Results in the graph, and -// updates the state of the constructor with the given id accordingly. -func (dg *Graph) FailNodes(results []*Result, id CtorID) { - // This failure is the root cause if there are no other failures. - isRootCause := len(dg.Failed.RootCauses) == 0 - dg.Failed.ctors[id] = struct{}{} - - for _, r := range results { - dg.failNode(r, isRootCause) - } - - if c, ok := dg.ctorMap[id]; ok { - if isRootCause { - c.ErrorType = rootCause - } else { - c.ErrorType = transitiveFailure - } - } -} - -// FailGroupNodes finds and adds the failed grouped nodes to the list of failed -// Results in the graph, and updates the state of the group and constructor -// with the given id accordingly. -func (dg *Graph) FailGroupNodes(name string, t reflect.Type, id CtorID) { - // This failure is the root cause if there are no other failures. - isRootCause := len(dg.Failed.RootCauses) == 0 - - k := nodeKey{t: t, group: name} - group := dg.getGroup(k) - - // If the ctor does not exist it cannot be failed. - if _, ok := dg.ctorMap[id]; !ok { - return - } - - // Track which constructors and groups have failed. - dg.Failed.ctors[id] = struct{}{} - dg.Failed.groups[k] = struct{}{} - - for _, r := range dg.ctorMap[id].Results { - if r.Type == t && r.Group == name { - dg.failNode(r, isRootCause) - } - } - - if c, ok := dg.ctorMap[id]; ok { - if isRootCause { - group.ErrorType = rootCause - c.ErrorType = rootCause - } else { - group.ErrorType = transitiveFailure - c.ErrorType = transitiveFailure - } - } -} - -// getGroup finds the group by nodeKey from the graph. If it is not available, -// a new group is created and returned. -func (dg *Graph) getGroup(k nodeKey) *Group { - g, ok := dg.groupMap[k] - if !ok { - g = NewGroup(k) - dg.groupMap[k] = g - dg.Groups = append(dg.Groups, g) - } - return g -} - -// addToGroup adds a newly provided grouped result to the appropriate group. -func (dg *Graph) addToGroup(r *Result, id CtorID) { - k := nodeKey{t: r.Type, group: r.Group} - group := dg.getGroup(k) - - r.GroupIndex = len(group.Results) - group.Results = append(group.Results, r) -} - -// PruneSuccess removes elements from the graph that do not have failed results. -// Removing elements that do not have failing results makes the graph easier to debug, -// since non-failing nodes and edges can clutter the graph and don't help the user debug. -func (dg *Graph) PruneSuccess() { - dg.pruneCtors(dg.Failed.ctors) - dg.pruneGroups(dg.Failed.groups) -} - -// pruneCtors removes constructors from the graph that do not have failing Results. -func (dg *Graph) pruneCtors(failed map[CtorID]struct{}) { - var pruned []*Ctor - for _, c := range dg.Ctors { - if _, ok := failed[c.ID]; ok { - pruned = append(pruned, c) - continue - } - // If a constructor is deleted, the constructor's stale result references need to - // be removed from that result's Group and/or consuming constructor. - dg.pruneCtorParams(c, dg.consumers) - dg.pruneGroupResults(c, dg.groupMap) - delete(dg.ctorMap, c.ID) - } - - dg.Ctors = pruned -} - -// pruneGroups removes groups from the graph that do not have failing results. -func (dg *Graph) pruneGroups(failed map[nodeKey]struct{}) { - var pruned []*Group - for _, g := range dg.Groups { - k := g.nodeKey() - if _, ok := failed[k]; ok { - pruned = append(pruned, g) - continue - } - delete(dg.groupMap, k) - } - dg.Groups = pruned - - dg.pruneCtorGroupParams(dg.groupMap) -} - -// pruneCtorParams removes results of the constructor argument that are still referenced in the -// Params of constructors that consume those results. If the results in the constructor are found -// in the params of a consuming constructor that result should be removed. -func (dg *Graph) pruneCtorParams(c *Ctor, consumers map[nodeKey][]*Ctor) { - for _, r := range c.Results { - for _, ctor := range consumers[r.nodeKey()] { - ctor.removeParam(r.nodeKey()) - } - } -} - -// pruneCtorGroupParams removes constructor results that are still referenced in the GroupParams of -// constructors that consume those results. -func (dg *Graph) pruneCtorGroupParams(groups map[nodeKey]*Group) { - for _, c := range dg.Ctors { - var pruned []*Group - for _, gp := range c.GroupParams { - k := gp.nodeKey() - if _, ok := groups[k]; ok { - pruned = append(pruned, gp) - } - } - c.GroupParams = pruned - } -} - -// pruneGroupResults removes results of the constructor argument that are still referenced in -// the Group object that contains that result. If a group no longer exists references to that -// should should be removed. -func (dg *Graph) pruneGroupResults(c *Ctor, groups map[nodeKey]*Group) { - for _, r := range c.Results { - k := r.nodeKey() - if k.group == "" { - continue - } - - g, ok := groups[k] - if ok { - g.removeResult(r) - } - } -} - -// String implements fmt.Stringer for Param. -func (p *Param) String() string { - if p.Name != "" { - return fmt.Sprintf("%v[name=%v]", p.Type.String(), p.Name) - } - return p.Type.String() -} - -// String implements fmt.Stringer for Result. -func (r *Result) String() string { - switch { - case r.Name != "": - return fmt.Sprintf("%v[name=%v]", r.Type.String(), r.Name) - case r.Group != "": - return fmt.Sprintf("%v[group=%v]%v", r.Type.String(), r.Group, r.GroupIndex) - default: - return r.Type.String() - } -} - -// String implements fmt.Stringer for Group. -func (g *Group) String() string { - return fmt.Sprintf("[type=%v group=%v]", g.Type.String(), g.Name) -} - -// Attributes composes and returns a string of the Result node's attributes. -func (r *Result) Attributes() string { - switch { - case r.Name != "": - return fmt.Sprintf(`label=<%v
Name: %v>`, r.Type, r.Name) - case r.Group != "": - return fmt.Sprintf(`label=<%v
Group: %v>`, r.Type, r.Group) - default: - return fmt.Sprintf(`label=<%v>`, r.Type) - } -} - -// Attributes composes and returns a string of the Group node's attributes. -func (g *Group) Attributes() string { - attr := fmt.Sprintf(`shape=diamond label=<%v
Group: %v>`, g.Type, g.Name) - if g.ErrorType != noError { - attr += " color=" + g.ErrorType.Color() - } - return attr -} - -// Color returns the color representation of each ErrorType. -func (s ErrorType) Color() string { - switch s { - case rootCause: - return "red" - case transitiveFailure: - return "orange" - default: - return "black" - } -} - -func (dg *Graph) addRootCause(r *Result) { - dg.Failed.RootCauses = append(dg.Failed.RootCauses, r) -} - -func (dg *Graph) addTransitiveFailure(r *Result) { - dg.Failed.TransitiveFailures = append(dg.Failed.TransitiveFailures, r) -} diff --git a/vendor/go.uber.org/dig/internal/graph/graph.go b/vendor/go.uber.org/dig/internal/graph/graph.go deleted file mode 100644 index abe6842f1b5..00000000000 --- a/vendor/go.uber.org/dig/internal/graph/graph.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// 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. - -package graph - -// Graph represents a simple interface for representation -// of a directed graph. -// It is assumed that each node in the graph is uniquely -// identified with an incremental positive integer (i.e. 1, 2, 3...). -// A value of 0 for a node represents a sentinel error value. -type Graph interface { - // Order returns the total number of nodes in the graph - Order() int - - // EdgesFrom returns a list of integers that each - // represents a node that has an edge from node u. - EdgesFrom(u int) []int -} - -// IsAcyclic uses depth-first search to find cycles -// in a generic graph represented by Graph interface. -// If a cycle is found, it returns a list of nodes that -// are in the cyclic path, identified by their orders. -func IsAcyclic(g Graph) (bool, []int) { - // cycleStart is a node that introduces a cycle in - // the graph. Values in the range [1, g.Order()) mean - // that there exists a cycle in g. - info := newCycleInfo(g.Order()) - - for i := 0; i < g.Order(); i++ { - info.Reset() - - cycle := isAcyclic(g, i, info, nil /* cycle path */) - if len(cycle) > 0 { - return false, cycle - } - } - - return true, nil -} - -// isAcyclic traverses the given graph starting from a specific node -// using depth-first search using recursion. If a cycle is detected, -// it returns the node that contains the "last" edge that introduces -// a cycle. -// For example, running isAcyclic starting from 1 on the following -// graph will return 3. -// -// 1 -> 2 -> 3 -> 1 -func isAcyclic(g Graph, u int, info cycleInfo, path []int) []int { - // We've already verified that there are no cycles from this node. - if info[u].Visited { - return nil - } - info[u].Visited = true - info[u].OnStack = true - - path = append(path, u) - for _, v := range g.EdgesFrom(u) { - if !info[v].Visited { - if cycle := isAcyclic(g, v, info, path); len(cycle) > 0 { - return cycle - } - } else if info[v].OnStack { - // We've found a cycle, and we have a full path back. - // Prune it down to just the cyclic nodes. - cycle := path - for i := len(cycle) - 1; i >= 0; i-- { - if cycle[i] == v { - cycle = cycle[i:] - break - } - } - - // Complete the cycle by adding this node to it. - return append(cycle, v) - } - } - info[u].OnStack = false - return nil -} - -// cycleNode keeps track of a single node's info for cycle detection. -type cycleNode struct { - Visited bool - OnStack bool -} - -// cycleInfo contains information about each node while we're trying to find -// cycles. -type cycleInfo []cycleNode - -func newCycleInfo(order int) cycleInfo { - return make(cycleInfo, order) -} - -func (info cycleInfo) Reset() { - for i := range info { - info[i].OnStack = false - } -} diff --git a/vendor/go.uber.org/dig/invoke.go b/vendor/go.uber.org/dig/invoke.go deleted file mode 100644 index 8a70121ae6b..00000000000 --- a/vendor/go.uber.org/dig/invoke.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "fmt" - "go.uber.org/dig/internal/digreflect" - "go.uber.org/dig/internal/graph" - "reflect" -) - -// An InvokeOption modifies the default behavior of Invoke. -type InvokeOption interface { - applyInvokeOption(*invokeOptions) -} - -type invokeOptions struct { - Info *InvokeInfo -} - -// InvokeInfo provides information about an Invoke. -type InvokeInfo struct { - Inputs []*Input -} - -// FillInvokeInfo is an InvokeOption that writes information on the types -// accepted by the Invoke function into the specified InvokeInfo. -// For example: -// -// var info dig.InvokeInfo -// err := c.Invoke(func(string, int){}, dig.FillInvokeInfo(&info)) -// -// info.Inputs[0].String() will be string. -// info.Inputs[1].String() will be int. -func FillInvokeInfo(info *InvokeInfo) InvokeOption { - return fillInvokeInfoOption{info: info} -} - -type fillInvokeInfoOption struct { - info *InvokeInfo -} - -func (o fillInvokeInfoOption) String() string { - return fmt.Sprintf("FillInvokeInfo(%p)", o.info) -} - -func (o fillInvokeInfoOption) applyInvokeOption(opts *invokeOptions) { - opts.Info = o.info -} - -// Invoke runs the given function after instantiating its dependencies. -// -// Any arguments that the function has are treated as its dependencies. The -// dependencies are instantiated in an unspecified order along with any -// dependencies that they might have. -// -// The function may return an error to indicate failure. The error will be -// returned to the caller as-is. -// -// If the [RecoverFromPanics] option was given to the container and a panic -// occurs when invoking, a [PanicError] with the panic contained will be -// returned. See [PanicError] for more info. -func (c *Container) Invoke(function interface{}, opts ...InvokeOption) error { - return c.scope.Invoke(function, opts...) -} - -// Invoke runs the given function after instantiating its dependencies. -// -// Any arguments that the function has are treated as its dependencies. The -// dependencies are instantiated in an unspecified order along with any -// dependencies that they might have. -// -// The function may return an error to indicate failure. The error will be -// returned to the caller as-is. -func (s *Scope) Invoke(function interface{}, opts ...InvokeOption) (err error) { - ftype := reflect.TypeOf(function) - if ftype == nil { - return newErrInvalidInput("can't invoke an untyped nil", nil) - } - if ftype.Kind() != reflect.Func { - return newErrInvalidInput( - fmt.Sprintf("can't invoke non-function %v (type %v)", function, ftype), nil) - } - - pl, err := newParamList(ftype, s) - if err != nil { - return err - } - - if err := shallowCheckDependencies(s, pl); err != nil { - return errMissingDependencies{ - Func: digreflect.InspectFunc(function), - Reason: err, - } - } - - if !s.isVerifiedAcyclic { - if ok, cycle := graph.IsAcyclic(s.gh); !ok { - return newErrInvalidInput("cycle detected in dependency graph", s.cycleDetectedError(cycle)) - } - s.isVerifiedAcyclic = true - } - - args, err := pl.BuildList(s) - if err != nil { - return errArgumentsFailed{ - Func: digreflect.InspectFunc(function), - Reason: err, - } - } - if s.recoverFromPanics { - defer func() { - if p := recover(); p != nil { - err = PanicError{ - fn: digreflect.InspectFunc(function), - Panic: p, - } - } - }() - } - - var options invokeOptions - for _, o := range opts { - o.applyInvokeOption(&options) - } - - // Record info for the invoke if requested - if info := options.Info; info != nil { - params := pl.DotParam() - info.Inputs = make([]*Input, len(params)) - for i, p := range params { - info.Inputs[i] = &Input{ - t: p.Type, - optional: p.Optional, - name: p.Name, - group: p.Group, - } - } - - } - - returned := s.invokerFn(reflect.ValueOf(function), args) - if len(returned) == 0 { - return nil - } - if last := returned[len(returned)-1]; isError(last.Type()) { - if err, _ := last.Interface().(error); err != nil { - return err - } - } - - return nil -} - -// Checks that all direct dependencies of the provided parameters are present in -// the container. Returns an error if not. -func shallowCheckDependencies(c containerStore, pl paramList) error { - var err errMissingTypes - - missingDeps := findMissingDependencies(c, pl.Params...) - for _, dep := range missingDeps { - err = append(err, newErrMissingTypes(c, key{name: dep.Name, t: dep.Type})...) - } - - if len(err) > 0 { - return err - } - return nil -} - -func findMissingDependencies(c containerStore, params ...param) []paramSingle { - var missingDeps []paramSingle - - for _, param := range params { - switch p := param.(type) { - case paramSingle: - allProviders := c.getAllValueProviders(p.Name, p.Type) - _, hasDecoratedValue := c.getDecoratedValue(p.Name, p.Type) - // This means that there is no provider that provides this value, - // and it is NOT being decorated and is NOT optional. - // In the case that there is no providers but there is a decorated value - // of this type, it can be provided safely so we can safely skip this. - if len(allProviders) == 0 && !hasDecoratedValue && !p.Optional { - missingDeps = append(missingDeps, p) - } - case paramObject: - for _, f := range p.Fields { - missingDeps = append(missingDeps, findMissingDependencies(c, f.Param)...) - } - } - } - return missingDeps -} diff --git a/vendor/go.uber.org/dig/param.go b/vendor/go.uber.org/dig/param.go deleted file mode 100644 index ca0689759f6..00000000000 --- a/vendor/go.uber.org/dig/param.go +++ /dev/null @@ -1,668 +0,0 @@ -// Copyright (c) 2019-2021 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "fmt" - "reflect" - "strconv" - "strings" - - "go.uber.org/dig/internal/digerror" - "go.uber.org/dig/internal/dot" -) - -// The param interface represents a dependency for a constructor. -// -// The following implementations exist: -// -// paramList All arguments of the constructor. -// paramSingle An explicitly requested type. -// paramObject dig.In struct where each field in the struct can be another -// param. -// paramGroupedSlice -// A slice consuming a value group. This will receive all -// values produced with a `group:".."` tag with the same name -// as a slice. -type param interface { - fmt.Stringer - - // Build this dependency and any of its dependencies from the provided - // Container. - // - // This MAY panic if the param does not produce a single value. - Build(store containerStore) (reflect.Value, error) - - // DotParam returns a slice of dot.Param(s). - DotParam() []*dot.Param -} - -var ( - _ param = paramSingle{} - _ param = paramObject{} - _ param = paramList{} - _ param = paramGroupedSlice{} -) - -// newParam builds a param from the given type. If the provided type is a -// dig.In struct, an paramObject will be returned. -func newParam(t reflect.Type, c containerStore) (param, error) { - switch { - case IsOut(t) || (t.Kind() == reflect.Ptr && IsOut(t.Elem())) || embedsType(t, _outPtrType): - return nil, newErrInvalidInput(fmt.Sprintf( - "cannot depend on result objects: %v embeds a dig.Out", t), nil) - case IsIn(t): - return newParamObject(t, c) - case embedsType(t, _inPtrType): - return nil, newErrInvalidInput(fmt.Sprintf( - "cannot build a parameter object by embedding *dig.In, embed dig.In instead: %v embeds *dig.In", t), nil) - case t.Kind() == reflect.Ptr && IsIn(t.Elem()): - return nil, newErrInvalidInput(fmt.Sprintf( - "cannot depend on a pointer to a parameter object, use a value instead: %v is a pointer to a struct that embeds dig.In", t), nil) - default: - return paramSingle{Type: t}, nil - } -} - -// paramList holds all arguments of the constructor as params. -// -// NOTE: Build() MUST NOT be called on paramList. Instead, BuildList -// must be called. -type paramList struct { - ctype reflect.Type // type of the constructor - - Params []param -} - -func (pl paramList) DotParam() []*dot.Param { - var types []*dot.Param - for _, param := range pl.Params { - types = append(types, param.DotParam()...) - } - return types -} - -func (pl paramList) String() string { - args := make([]string, len(pl.Params)) - for i, p := range pl.Params { - args[i] = p.String() - } - return fmt.Sprint(args) -} - -// newParamList builds a paramList from the provided constructor type. -// -// Variadic arguments of a constructor are ignored and not included as -// dependencies. -func newParamList(ctype reflect.Type, c containerStore) (paramList, error) { - numArgs := ctype.NumIn() - if ctype.IsVariadic() { - // NOTE: If the function is variadic, we skip the last argument - // because we're not filling variadic arguments yet. See #120. - numArgs-- - } - - pl := paramList{ - ctype: ctype, - Params: make([]param, 0, numArgs), - } - - for i := 0; i < numArgs; i++ { - p, err := newParam(ctype.In(i), c) - if err != nil { - return pl, newErrInvalidInput(fmt.Sprintf("bad argument %d", i+1), err) - } - pl.Params = append(pl.Params, p) - } - - return pl, nil -} - -func (pl paramList) Build(containerStore) (reflect.Value, error) { - digerror.BugPanicf("paramList.Build() must never be called") - panic("") // Unreachable, as BugPanicf above will panic. -} - -// BuildList returns an ordered list of values which may be passed directly -// to the underlying constructor. -func (pl paramList) BuildList(c containerStore) ([]reflect.Value, error) { - args := make([]reflect.Value, len(pl.Params)) - for i, p := range pl.Params { - var err error - args[i], err = p.Build(c) - if err != nil { - return nil, err - } - } - return args, nil -} - -// paramSingle is an explicitly requested type, optionally with a name. -// -// This object must be present in the graph as-is unless it's specified as -// optional. -type paramSingle struct { - Name string - Optional bool - Type reflect.Type -} - -func (ps paramSingle) DotParam() []*dot.Param { - return []*dot.Param{ - { - Node: &dot.Node{ - Type: ps.Type, - Name: ps.Name, - }, - Optional: ps.Optional, - }, - } -} - -func (ps paramSingle) String() string { - // tally.Scope[optional] means optional - // tally.Scope[optional, name="foo"] means named optional - - var opts []string - if ps.Optional { - opts = append(opts, "optional") - } - if ps.Name != "" { - opts = append(opts, fmt.Sprintf("name=%q", ps.Name)) - } - - if len(opts) == 0 { - return fmt.Sprint(ps.Type) - } - - return fmt.Sprintf("%v[%v]", ps.Type, strings.Join(opts, ", ")) -} - -// search the given container and its ancestors for a decorated value. -func (ps paramSingle) getDecoratedValue(c containerStore) (reflect.Value, bool) { - for _, c := range c.storesToRoot() { - if v, ok := c.getDecoratedValue(ps.Name, ps.Type); ok { - return v, ok - } - } - return _noValue, false -} - -// builds the parameter using decorators in all scopes that affect the -// current scope, if there are any. If there are multiple Scopes that decorates -// this parameter, the closest one to the Scope that invoked this will be used. -// If there are no decorators associated with this parameter, _noValue is returned. -func (ps paramSingle) buildWithDecorators(c containerStore) (v reflect.Value, found bool, err error) { - var ( - d decorator - decoratingScope containerStore - ) - stores := c.storesToRoot() - - for _, s := range stores { - if d, found = s.getValueDecorator(ps.Name, ps.Type); !found { - continue - } - if d.State() == decoratorOnStack { - // This decorator is already being run. - // Avoid a cycle and look further. - d = nil - continue - } - decoratingScope = s - break - } - if !found || d == nil { - return _noValue, false, nil - } - if err = d.Call(decoratingScope); err != nil { - v, err = _noValue, errParamSingleFailed{ - CtorID: 1, - Key: key{t: ps.Type, name: ps.Name}, - Reason: err, - } - return v, found, err - } - v, _ = decoratingScope.getDecoratedValue(ps.Name, ps.Type) - return -} - -func (ps paramSingle) Build(c containerStore) (reflect.Value, error) { - v, found, err := ps.buildWithDecorators(c) - if found { - return v, err - } - - // Check whether the value is a decorated value first. - if v, ok := ps.getDecoratedValue(c); ok { - return v, nil - } - - // Starting at the given container and working our way up its parents, - // find one that provides this dependency. - // - // Once found, we'll use that container for the rest of the invocation. - // Dependencies of this type will begin searching at that container, - // rather than starting at base. - var providers []provider - var providingContainer containerStore - for _, container := range c.storesToRoot() { - // first check if the scope already has cached a value for the type. - if v, ok := container.getValue(ps.Name, ps.Type); ok { - return v, nil - } - providers = container.getValueProviders(ps.Name, ps.Type) - if len(providers) > 0 { - providingContainer = container - break - } - } - - if len(providers) == 0 { - if ps.Optional { - return reflect.Zero(ps.Type), nil - } - return _noValue, newErrMissingTypes(c, key{name: ps.Name, t: ps.Type}) - } - - for _, n := range providers { - err := n.Call(n.OrigScope()) - if err == nil { - continue - } - - // If we're missing dependencies but the parameter itself is optional, - // we can just move on. - if _, ok := err.(errMissingDependencies); ok && ps.Optional { - return reflect.Zero(ps.Type), nil - } - - return _noValue, errParamSingleFailed{ - CtorID: n.ID(), - Key: key{t: ps.Type, name: ps.Name}, - Reason: err, - } - } - - // If we get here, it's impossible for the value to be absent from the - // container. - v, _ = providingContainer.getValue(ps.Name, ps.Type) - return v, nil -} - -// paramObject is a dig.In struct where each field is another param. -// -// This object is not expected in the graph as-is. -type paramObject struct { - Type reflect.Type - Fields []paramObjectField - FieldOrders []int -} - -func (po paramObject) DotParam() []*dot.Param { - var types []*dot.Param - for _, field := range po.Fields { - types = append(types, field.DotParam()...) - } - return types -} - -func (po paramObject) String() string { - fields := make([]string, len(po.Fields)) - for i, f := range po.Fields { - fields[i] = f.Param.String() - } - return strings.Join(fields, " ") -} - -// getParamOrder returns the order(s) of a parameter type. -func getParamOrder(gh *graphHolder, param param) []int { - var orders []int - switch p := param.(type) { - case paramSingle: - providers := gh.s.getAllValueProviders(p.Name, p.Type) - for _, provider := range providers { - orders = append(orders, provider.Order(gh.s)) - } - case paramGroupedSlice: - // value group parameters have nodes of their own. - // We can directly return that here. - orders = append(orders, p.orders[gh.s]) - case paramObject: - for _, pf := range p.Fields { - orders = append(orders, getParamOrder(gh, pf.Param)...) - } - } - return orders -} - -// newParamObject builds an paramObject from the provided type. The type MUST -// be a dig.In struct. -func newParamObject(t reflect.Type, c containerStore) (paramObject, error) { - po := paramObject{Type: t} - - // Check if the In type supports ignoring unexported fields. - var ignoreUnexported bool - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if f.Type == _inType { - var err error - ignoreUnexported, err = isIgnoreUnexportedSet(f) - if err != nil { - return po, err - } - break - } - } - - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if f.Type == _inType { - // Skip over the dig.In embed. - continue - } - if f.PkgPath != "" && ignoreUnexported { - // Skip over an unexported field if it is allowed. - continue - } - pof, err := newParamObjectField(i, f, c) - if err != nil { - return po, newErrInvalidInput( - fmt.Sprintf("bad field %q of %v", f.Name, t), err) - } - po.Fields = append(po.Fields, pof) - } - return po, nil -} - -func (po paramObject) Build(c containerStore) (reflect.Value, error) { - dest := reflect.New(po.Type).Elem() - // We have to build soft groups after all other fields, to avoid cases - // when a field calls a provider for a soft value group, but the value is - // not provided to it because the value group is declared before the field - var softGroupsQueue []paramObjectField - var fields []paramObjectField - for _, f := range po.Fields { - if p, ok := f.Param.(paramGroupedSlice); ok && p.Soft { - softGroupsQueue = append(softGroupsQueue, f) - continue - } - fields = append(fields, f) - } - fields = append(fields, softGroupsQueue...) - for _, f := range fields { - v, err := f.Build(c) - if err != nil { - return dest, err - } - dest.Field(f.FieldIndex).Set(v) - } - return dest, nil -} - -// paramObjectField is a single field of a dig.In struct. -type paramObjectField struct { - // Name of the field in the struct. - FieldName string - - // Index of this field in the target struct. - // - // We need to track this separately because not all fields of the - // struct map to params. - FieldIndex int - - // The dependency requested by this field. - Param param -} - -func (pof paramObjectField) DotParam() []*dot.Param { - return pof.Param.DotParam() -} - -func newParamObjectField(idx int, f reflect.StructField, c containerStore) (paramObjectField, error) { - pof := paramObjectField{ - FieldName: f.Name, - FieldIndex: idx, - } - - var p param - switch { - case f.PkgPath != "": - return pof, newErrInvalidInput( - fmt.Sprintf("unexported fields not allowed in dig.In, did you mean to export %q (%v)?", f.Name, f.Type), nil) - - case f.Tag.Get(_groupTag) != "": - var err error - p, err = newParamGroupedSlice(f, c) - if err != nil { - return pof, err - } - - default: - var err error - p, err = newParam(f.Type, c) - if err != nil { - return pof, err - } - } - - if ps, ok := p.(paramSingle); ok { - ps.Name = f.Tag.Get(_nameTag) - - var err error - ps.Optional, err = isFieldOptional(f) - if err != nil { - return pof, err - } - - p = ps - } - - pof.Param = p - return pof, nil -} - -func (pof paramObjectField) Build(c containerStore) (reflect.Value, error) { - v, err := pof.Param.Build(c) - if err != nil { - return v, err - } - return v, nil -} - -// paramGroupedSlice is a param which produces a slice of values with the same -// group name. -type paramGroupedSlice struct { - // Name of the group as specified in the `group:".."` tag. - Group string - - // Type of the slice. - Type reflect.Type - - // Soft is used to denote a soft dependency between this param and its - // constructors, if it's true its constructors are only called if they - // provide another value requested in the graph - Soft bool - - orders map[*Scope]int -} - -func (pt paramGroupedSlice) String() string { - // io.Reader[group="foo"] refers to a group of io.Readers called 'foo' - return fmt.Sprintf("%v[group=%q]", pt.Type.Elem(), pt.Group) -} - -func (pt paramGroupedSlice) DotParam() []*dot.Param { - return []*dot.Param{ - { - Node: &dot.Node{ - Type: pt.Type, - Group: pt.Group, - }, - }, - } -} - -// newParamGroupedSlice builds a paramGroupedSlice from the provided type with -// the given name. -// -// The type MUST be a slice type. -func newParamGroupedSlice(f reflect.StructField, c containerStore) (paramGroupedSlice, error) { - g, err := parseGroupString(f.Tag.Get(_groupTag)) - if err != nil { - return paramGroupedSlice{}, err - } - pg := paramGroupedSlice{ - Group: g.Name, - Type: f.Type, - orders: make(map[*Scope]int), - Soft: g.Soft, - } - - name := f.Tag.Get(_nameTag) - optional, _ := isFieldOptional(f) - switch { - case f.Type.Kind() != reflect.Slice: - return pg, newErrInvalidInput( - fmt.Sprintf("value groups may be consumed as slices only: field %q (%v) is not a slice", f.Name, f.Type), nil) - case g.Flatten: - return pg, newErrInvalidInput( - fmt.Sprintf("cannot use flatten in parameter value groups: field %q (%v) specifies flatten", f.Name, f.Type), nil) - case name != "": - return pg, newErrInvalidInput( - fmt.Sprintf("cannot use named values with value groups: name:%q requested with group:%q", name, pg.Group), nil) - case optional: - return pg, newErrInvalidInput("value groups cannot be optional", nil) - } - c.newGraphNode(&pg, pg.orders) - return pg, nil -} - -// retrieves any decorated values that may be committed in this scope, or -// any of the parent Scopes. In the case where there are multiple scopes that -// are decorating the same type, the closest scope in effect will be replacing -// any decorated value groups provided in further scopes. -func (pt paramGroupedSlice) getDecoratedValues(c containerStore) (reflect.Value, bool) { - for _, c := range c.storesToRoot() { - if items, ok := c.getDecoratedValueGroup(pt.Group, pt.Type); ok { - return items, true - } - } - return _noValue, false -} - -// search the given container and its parents for matching group decorators -// and call them to commit values. If any decorators return an error, -// that error is returned immediately. If all decorators succeeds, nil is returned. -// The order in which the decorators are invoked is from the top level scope to -// the current scope, to account for decorators that decorate values that were -// already decorated. -func (pt paramGroupedSlice) callGroupDecorators(c containerStore) error { - stores := c.storesToRoot() - for i := len(stores) - 1; i >= 0; i-- { - c := stores[i] - if d, found := c.getGroupDecorator(pt.Group, pt.Type.Elem()); found { - if d.State() == decoratorOnStack { - // This decorator is already being run. Avoid cycle - // and look further. - continue - } - if err := d.Call(c); err != nil { - return errParamGroupFailed{ - CtorID: d.ID(), - Key: key{group: pt.Group, t: pt.Type.Elem()}, - Reason: err, - } - } - } - } - return nil -} - -// search the given container and its parent for matching group providers and -// call them to commit values. If an error is encountered, return the number -// of providers called and a non-nil error from the first provided. -func (pt paramGroupedSlice) callGroupProviders(c containerStore) (int, error) { - itemCount := 0 - for _, c := range c.storesToRoot() { - providers := c.getGroupProviders(pt.Group, pt.Type.Elem()) - itemCount += len(providers) - for _, n := range providers { - if err := n.Call(n.OrigScope()); err != nil { - return 0, errParamGroupFailed{ - CtorID: n.ID(), - Key: key{group: pt.Group, t: pt.Type.Elem()}, - Reason: err, - } - } - } - } - return itemCount, nil -} - -func (pt paramGroupedSlice) Build(c containerStore) (reflect.Value, error) { - // do not call this if we are already inside a decorator since - // it will result in an infinite recursion. (i.e. decorate -> params.BuildList() -> Decorate -> params.BuildList...) - // this is safe since a value can be decorated at most once in a given scope. - if err := pt.callGroupDecorators(c); err != nil { - return _noValue, err - } - - // Check if we have decorated values - if decoratedItems, ok := pt.getDecoratedValues(c); ok { - return decoratedItems, nil - } - - // If we do not have any decorated values and the group isn't soft, - // find the providers and call them. - itemCount := 0 - if !pt.Soft { - var err error - itemCount, err = pt.callGroupProviders(c) - if err != nil { - return _noValue, err - } - } - - stores := c.storesToRoot() - result := reflect.MakeSlice(pt.Type, 0, itemCount) - for _, c := range stores { - result = reflect.Append(result, c.getValueGroup(pt.Group, pt.Type.Elem())...) - } - return result, nil -} - -// Checks if ignoring unexported files in an In struct is allowed. -// The struct field MUST be an _inType. -func isIgnoreUnexportedSet(f reflect.StructField) (bool, error) { - tag := f.Tag.Get(_ignoreUnexportedTag) - if tag == "" { - return false, nil - } - - allowed, err := strconv.ParseBool(tag) - if err != nil { - err = newErrInvalidInput( - fmt.Sprintf("invalid value %q for %q tag on field %v", tag, _ignoreUnexportedTag, f.Name), err) - } - - return allowed, err -} diff --git a/vendor/go.uber.org/dig/provide.go b/vendor/go.uber.org/dig/provide.go deleted file mode 100644 index f565e732377..00000000000 --- a/vendor/go.uber.org/dig/provide.go +++ /dev/null @@ -1,665 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "bytes" - "fmt" - "reflect" - "strings" - - "go.uber.org/dig/internal/digreflect" - "go.uber.org/dig/internal/dot" - "go.uber.org/dig/internal/graph" -) - -// A ProvideOption modifies the default behavior of Provide. -type ProvideOption interface { - applyProvideOption(*provideOptions) -} - -type provideOptions struct { - Name string - Group string - Info *ProvideInfo - As []interface{} - Location *digreflect.Func - Exported bool - Callback Callback -} - -func (o *provideOptions) Validate() error { - if len(o.Group) > 0 { - if len(o.Name) > 0 { - return newErrInvalidInput( - fmt.Sprintf("cannot use named values with value groups: name:%q provided with group:%q", o.Name, o.Group), nil) - } - } - - // Names must be representable inside a backquoted string. The only - // limitation for raw string literals as per - // https://golang.org/ref/spec#raw_string_lit is that they cannot contain - // backquotes. - if strings.ContainsRune(o.Name, '`') { - return newErrInvalidInput( - fmt.Sprintf("invalid dig.Name(%q): names cannot contain backquotes", o.Name), nil) - } - if strings.ContainsRune(o.Group, '`') { - return newErrInvalidInput( - fmt.Sprintf("invalid dig.Group(%q): group names cannot contain backquotes", o.Group), nil) - } - - for _, i := range o.As { - t := reflect.TypeOf(i) - - if t == nil { - return newErrInvalidInput("invalid dig.As(nil): argument must be a pointer to an interface", nil) - } - - if t.Kind() != reflect.Ptr { - return newErrInvalidInput( - fmt.Sprintf("invalid dig.As(%v): argument must be a pointer to an interface", t), nil) - } - - pointingTo := t.Elem() - if pointingTo.Kind() != reflect.Interface { - return newErrInvalidInput( - fmt.Sprintf("invalid dig.As(*%v): argument must be a pointer to an interface", pointingTo), nil) - } - } - return nil -} - -// Name is a ProvideOption that specifies that all values produced by a -// constructor should have the given name. See also the package documentation -// about Named Values. -// -// Given, -// -// func NewReadOnlyConnection(...) (*Connection, error) -// func NewReadWriteConnection(...) (*Connection, error) -// -// The following will provide two connections to the container: one under the -// name "ro" and the other under the name "rw". -// -// c.Provide(NewReadOnlyConnection, dig.Name("ro")) -// c.Provide(NewReadWriteConnection, dig.Name("rw")) -// -// This option cannot be provided for constructors which produce result -// objects. -func Name(name string) ProvideOption { - return provideNameOption(name) -} - -type provideNameOption string - -func (o provideNameOption) String() string { - return fmt.Sprintf("Name(%q)", string(o)) -} - -func (o provideNameOption) applyProvideOption(opt *provideOptions) { - opt.Name = string(o) -} - -// Group is a ProvideOption that specifies that all values produced by a -// constructor should be added to the specified group. See also the package -// documentation about Value Groups. -// -// This option cannot be provided for constructors which produce result -// objects. -func Group(group string) ProvideOption { - return provideGroupOption(group) -} - -type provideGroupOption string - -func (o provideGroupOption) String() string { - return fmt.Sprintf("Group(%q)", string(o)) -} - -func (o provideGroupOption) applyProvideOption(opt *provideOptions) { - opt.Group = string(o) -} - -// ID is a unique integer representing the constructor node in the dependency graph. -type ID int - -// ProvideInfo provides information about the constructor's inputs and outputs -// types as strings, as well as the ID of the constructor supplied to the Container. -// It contains ID for the constructor, as well as slices of Input and Output types, -// which are Stringers that report the types of the parameters and results respectively. -type ProvideInfo struct { - ID ID - Inputs []*Input - Outputs []*Output -} - -// Input contains information on an input parameter of a function. -type Input struct { - t reflect.Type - optional bool - name, group string -} - -func (i *Input) String() string { - toks := make([]string, 0, 3) - t := i.t.String() - if i.optional { - toks = append(toks, "optional") - } - if i.name != "" { - toks = append(toks, fmt.Sprintf("name = %q", i.name)) - } - if i.group != "" { - toks = append(toks, fmt.Sprintf("group = %q", i.group)) - } - - if len(toks) == 0 { - return t - } - return fmt.Sprintf("%v[%v]", t, strings.Join(toks, ", ")) -} - -// Output contains information on an output produced by a function. -type Output struct { - t reflect.Type - name, group string -} - -func (o *Output) String() string { - toks := make([]string, 0, 2) - t := o.t.String() - if o.name != "" { - toks = append(toks, fmt.Sprintf("name = %q", o.name)) - } - if o.group != "" { - toks = append(toks, fmt.Sprintf("group = %q", o.group)) - } - - if len(toks) == 0 { - return t - } - return fmt.Sprintf("%v[%v]", t, strings.Join(toks, ", ")) -} - -// FillProvideInfo is a ProvideOption that writes info on what Dig was able to get -// out of the provided constructor into the provided ProvideInfo. -func FillProvideInfo(info *ProvideInfo) ProvideOption { - return fillProvideInfoOption{info: info} -} - -type fillProvideInfoOption struct{ info *ProvideInfo } - -func (o fillProvideInfoOption) String() string { - return fmt.Sprintf("FillProvideInfo(%p)", o.info) -} - -func (o fillProvideInfoOption) applyProvideOption(opts *provideOptions) { - opts.Info = o.info -} - -// As is a ProvideOption that specifies that the value produced by the -// constructor implements one or more other interfaces and is provided -// to the container as those interfaces. -// -// As expects one or more pointers to the implemented interfaces. Values -// produced by constructors will be then available in the container as -// implementations of all of those interfaces, but not as the value itself. -// -// For example, the following will make io.Reader and io.Writer available -// in the container, but not buffer. -// -// c.Provide(newBuffer, dig.As(new(io.Reader), new(io.Writer))) -// -// That is, the above is equivalent to the following. -// -// c.Provide(func(...) (io.Reader, io.Writer) { -// b := newBuffer(...) -// return b, b -// }) -// -// If used with dig.Name, the type produced by the constructor and the types -// specified with dig.As will all use the same name. For example, -// -// c.Provide(newFile, dig.As(new(io.Reader)), dig.Name("temp")) -// -// The above is equivalent to the following. -// -// type Result struct { -// dig.Out -// -// Reader io.Reader `name:"temp"` -// } -// -// c.Provide(func(...) Result { -// f := newFile(...) -// return Result{ -// Reader: f, -// } -// }) -// -// This option cannot be provided for constructors which produce result -// objects. -func As(i ...interface{}) ProvideOption { - return provideAsOption(i) -} - -type provideAsOption []interface{} - -func (o provideAsOption) String() string { - buf := bytes.NewBufferString("As(") - for i, iface := range o { - if i > 0 { - buf.WriteString(", ") - } - buf.WriteString(reflect.TypeOf(iface).Elem().String()) - } - buf.WriteString(")") - return buf.String() -} - -func (o provideAsOption) applyProvideOption(opts *provideOptions) { - opts.As = append(opts.As, o...) -} - -// LocationForPC is a ProvideOption which specifies an alternate function program -// counter address to be used for debug information. The package, name, file and -// line number of this alternate function address will be used in error messages -// and DOT graphs. This option is intended to be used with functions created -// with the reflect.MakeFunc method whose error messages are otherwise hard to -// understand -func LocationForPC(pc uintptr) ProvideOption { - return provideLocationOption{ - loc: digreflect.InspectFuncPC(pc), - } -} - -type provideLocationOption struct{ loc *digreflect.Func } - -func (o provideLocationOption) String() string { - return fmt.Sprintf("LocationForPC(%v)", o.loc) -} - -func (o provideLocationOption) applyProvideOption(opts *provideOptions) { - opts.Location = o.loc -} - -// Export is a ProvideOption which specifies that the provided function should -// be made available to all Scopes available in the application, regardless -// of which Scope it was provided from. By default, it is false. -// -// For example, -// -// c := New() -// s1 := c.Scope("child 1") -// s2:= c.Scope("child 2") -// s1.Provide(func() *bytes.Buffer { ... }) -// -// does not allow the constructor returning *bytes.Buffer to be made available to -// the root Container c or its sibling Scope s2. -// -// With Export, you can make this constructor available to all the Scopes: -// -// s1.Provide(func() *bytes.Buffer { ... }, Export(true)) -func Export(export bool) ProvideOption { - return provideExportOption{exported: export} -} - -type provideExportOption struct{ exported bool } - -func (o provideExportOption) String() string { - return fmt.Sprintf("Export(%v)", o.exported) -} - -func (o provideExportOption) applyProvideOption(opts *provideOptions) { - opts.Exported = o.exported -} - -// provider encapsulates a user-provided constructor. -type provider interface { - // ID is a unique numerical identifier for this provider. - ID() dot.CtorID - - // Order reports the order of this provider in the graphHolder. - // This value is usually returned by the graphHolder.NewNode method. - Order(*Scope) int - - // Location returns where this constructor was defined. - Location() *digreflect.Func - - // ParamList returns information about the direct dependencies of this - // constructor. - ParamList() paramList - - // ResultList returns information about the values produced by this - // constructor. - ResultList() resultList - - // Calls the underlying constructor, reading values from the - // containerStore as needed. - // - // The values produced by this provider should be submitted into the - // containerStore. - Call(containerStore) error - - CType() reflect.Type - - OrigScope() *Scope -} - -// Provide teaches the container how to build values of one or more types and -// expresses their dependencies. -// -// The first argument of Provide is a function that accepts zero or more -// parameters and returns one or more results. The function may optionally -// return an error to indicate that it failed to build the value. This -// function will be treated as the constructor for all the types it returns. -// This function will be called AT MOST ONCE when a type produced by it, or a -// type that consumes this function's output, is requested via Invoke. If the -// same types are requested multiple times, the previously produced value will -// be reused. -// -// Provide accepts argument types or dig.In structs as dependencies, and -// separate return values or dig.Out structs for results. -func (c *Container) Provide(constructor interface{}, opts ...ProvideOption) error { - return c.scope.Provide(constructor, opts...) -} - -// Provide teaches the Scope how to build values of one or more types and -// expresses their dependencies. -// -// The first argument of Provide is a function that accepts zero or more -// parameters and returns one or more results. The function may optionally -// return an error to indicate that it failed to build the value. This -// function will be treated as the constructor for all the types it returns. -// This function will be called AT MOST ONCE when a type produced by it, or a -// type that consumes this function's output, is requested via Invoke. If the -// same types are requested multiple times, the previously produced value will -// be reused. -// -// Provide accepts argument types or dig.In structs as dependencies, and -// separate return values or dig.Out structs for results. -// -// When a constructor is Provided to a Scope, it will propagate this to any -// Scopes that are descendents, but not ancestors of this Scope. -// To provide a constructor to all the Scopes available, provide it to -// Container, which is the root Scope. -func (s *Scope) Provide(constructor interface{}, opts ...ProvideOption) error { - ctype := reflect.TypeOf(constructor) - if ctype == nil { - return newErrInvalidInput("can't provide an untyped nil", nil) - } - if ctype.Kind() != reflect.Func { - return newErrInvalidInput( - fmt.Sprintf("must provide constructor function, got %v (type %v)", constructor, ctype), nil) - } - - var options provideOptions - for _, o := range opts { - o.applyProvideOption(&options) - } - if err := options.Validate(); err != nil { - return err - } - - if err := s.provide(constructor, options); err != nil { - var errFunc *digreflect.Func - if options.Location == nil { - errFunc = digreflect.InspectFunc(constructor) - } else { - errFunc = options.Location - } - - return errProvide{ - Func: errFunc, - Reason: err, - } - } - return nil -} - -func (s *Scope) provide(ctor interface{}, opts provideOptions) (err error) { - // If Export option is provided to the constructor, this should be injected to the - // root-level Scope (Container) to allow it to propagate to all other Scopes. - origScope := s - if opts.Exported { - s = s.rootScope() - } - - // For all scopes affected by this change, - // take a snapshot of the current graph state before - // we start making changes to it as we may need to - // undo them upon encountering errors. - allScopes := s.appendSubscopes(nil) - for _, s := range allScopes { - s := s - s.gh.Snapshot() - defer func() { - if err != nil { - s.gh.Rollback() - } - }() - } - - n, err := newConstructorNode( - ctor, - s, - origScope, - constructorOptions{ - ResultName: opts.Name, - ResultGroup: opts.Group, - ResultAs: opts.As, - Location: opts.Location, - Callback: opts.Callback, - }, - ) - if err != nil { - return err - } - - keys, err := s.findAndValidateResults(n.ResultList()) - if err != nil { - return err - } - - ctype := reflect.TypeOf(ctor) - if len(keys) == 0 { - return newErrInvalidInput( - fmt.Sprintf("%v must provide at least one non-error type", ctype), nil) - } - - oldProviders := make(map[key][]*constructorNode) - for k := range keys { - // Cache old providers before running cycle detection. - oldProviders[k] = s.providers[k] - s.providers[k] = append(s.providers[k], n) - } - - for _, s := range allScopes { - s.isVerifiedAcyclic = false - if s.deferAcyclicVerification { - continue - } - if ok, cycle := graph.IsAcyclic(s.gh); !ok { - // When a cycle is detected, recover the old providers to reset - // the providers map back to what it was before this node was - // introduced. - for k, ops := range oldProviders { - s.providers[k] = ops - } - - return newErrInvalidInput("this function introduces a cycle", s.cycleDetectedError(cycle)) - } - s.isVerifiedAcyclic = true - } - - s.nodes = append(s.nodes, n) - - // Record introspection info for caller if Info option is specified - if info := opts.Info; info != nil { - params := n.ParamList().DotParam() - results := n.ResultList().DotResult() - - info.ID = (ID)(n.id) - info.Inputs = make([]*Input, len(params)) - info.Outputs = make([]*Output, len(results)) - - for i, param := range params { - info.Inputs[i] = &Input{ - t: param.Type, - optional: param.Optional, - name: param.Name, - group: param.Group, - } - } - - for i, res := range results { - info.Outputs[i] = &Output{ - t: res.Type, - name: res.Name, - group: res.Group, - } - } - } - return nil -} - -// Builds a collection of all result types produced by this constructor. -func (s *Scope) findAndValidateResults(rl resultList) (map[key]struct{}, error) { - var err error - keyPaths := make(map[key]string) - walkResult(rl, connectionVisitor{ - s: s, - err: &err, - keyPaths: keyPaths, - }) - - if err != nil { - return nil, err - } - - keys := make(map[key]struct{}, len(keyPaths)) - for k := range keyPaths { - keys[k] = struct{}{} - } - return keys, nil -} - -// Visits the results of a node and compiles a collection of all the keys -// produced by that node. -type connectionVisitor struct { - s *Scope - - // If this points to a non-nil value, we've already encountered an error - // and should stop traversing. - err *error - - // Map of keys provided to path that provided this. The path is a string - // documenting which positional return value or dig.Out attribute is - // providing this particular key. - // - // For example, "[0].Foo" indicates that the value was provided by the Foo - // attribute of the dig.Out returned as the first result of the - // constructor. - keyPaths map[key]string - - // We track the path to the current result here. For example, this will - // be, ["[1]", "Foo", "Bar"] when we're visiting Bar in, - // - // func() (io.Writer, struct { - // dig.Out - // - // Foo struct { - // dig.Out - // - // Bar io.Reader - // } - // }) - currentResultPath []string -} - -func (cv connectionVisitor) AnnotateWithField(f resultObjectField) resultVisitor { - cv.currentResultPath = append(cv.currentResultPath, f.FieldName) - return cv -} - -func (cv connectionVisitor) AnnotateWithPosition(i int) resultVisitor { - cv.currentResultPath = append(cv.currentResultPath, fmt.Sprintf("[%d]", i)) - return cv -} - -func (cv connectionVisitor) Visit(res result) resultVisitor { - // Already failed. Stop looking. - if *cv.err != nil { - return nil - } - - path := strings.Join(cv.currentResultPath, ".") - - switch r := res.(type) { - - case resultSingle: - k := key{name: r.Name, t: r.Type} - - if err := cv.checkKey(k, path); err != nil { - *cv.err = err - return nil - } - for _, asType := range r.As { - k := key{name: r.Name, t: asType} - if err := cv.checkKey(k, path); err != nil { - *cv.err = err - return nil - } - } - - case resultGrouped: - // we don't really care about the path for this since conflicts are - // okay for group results. We'll track it for the sake of having a - // value there. - k := key{group: r.Group, t: r.Type} - cv.keyPaths[k] = path - for _, asType := range r.As { - k := key{group: r.Group, t: asType} - cv.keyPaths[k] = path - } - } - - return cv -} - -func (cv connectionVisitor) checkKey(k key, path string) error { - defer func() { cv.keyPaths[k] = path }() - if conflict, ok := cv.keyPaths[k]; ok { - return newErrInvalidInput(fmt.Sprintf("cannot provide %v from %v", k, path), - newErrInvalidInput(fmt.Sprintf("already provided by %v", conflict), nil)) - } - if ps := cv.s.providers[k]; len(ps) > 0 { - cons := make([]string, len(ps)) - for i, p := range ps { - cons[i] = fmt.Sprint(p.Location()) - } - - return newErrInvalidInput(fmt.Sprintf("cannot provide %v from %v", k, path), - newErrInvalidInput(fmt.Sprintf("already provided by %v", strings.Join(cons, "; ")), nil)) - } - return nil -} diff --git a/vendor/go.uber.org/dig/result.go b/vendor/go.uber.org/dig/result.go deleted file mode 100644 index 369cd218ba0..00000000000 --- a/vendor/go.uber.org/dig/result.go +++ /dev/null @@ -1,535 +0,0 @@ -// Copyright (c) 2019-2021 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "fmt" - "reflect" - - "go.uber.org/dig/internal/digerror" - "go.uber.org/dig/internal/dot" -) - -// The result interface represents a result produced by a constructor. -// -// The following implementations exist: -// resultList All values returned by the constructor. -// resultSingle A single value produced by a constructor. -// resultObject dig.Out struct where each field in the struct can be -// another result. -// resultGrouped A value produced by a constructor that is part of a value -// group. - -type result interface { - // Extracts the values for this result from the provided value and - // stores them into the provided containerWriter. - // - // This MAY panic if the result does not consume a single value. - Extract(containerWriter, bool, reflect.Value) - - // DotResult returns a slice of dot.Result(s). - DotResult() []*dot.Result -} - -var ( - _ result = resultSingle{} - _ result = resultObject{} - _ result = resultList{} - _ result = resultGrouped{} -) - -type resultOptions struct { - // If set, this is the name of the associated result value. - // - // For Result Objects, name:".." tags on fields override this. - Name string - Group string - As []interface{} -} - -// newResult builds a result from the given type. -func newResult(t reflect.Type, opts resultOptions) (result, error) { - switch { - case IsIn(t) || (t.Kind() == reflect.Ptr && IsIn(t.Elem())) || embedsType(t, _inPtrType): - return nil, newErrInvalidInput(fmt.Sprintf( - "cannot provide parameter objects: %v embeds a dig.In", t), nil) - case isError(t): - return nil, newErrInvalidInput("cannot return an error here, return it from the constructor instead", nil) - case IsOut(t): - return newResultObject(t, opts) - case embedsType(t, _outPtrType): - return nil, newErrInvalidInput(fmt.Sprintf( - "cannot build a result object by embedding *dig.Out, embed dig.Out instead: %v embeds *dig.Out", t), nil) - case t.Kind() == reflect.Ptr && IsOut(t.Elem()): - return nil, newErrInvalidInput(fmt.Sprintf( - "cannot return a pointer to a result object, use a value instead: %v is a pointer to a struct that embeds dig.Out", t), nil) - case len(opts.Group) > 0: - g, err := parseGroupString(opts.Group) - if err != nil { - return nil, newErrInvalidInput( - fmt.Sprintf("cannot parse group %q", opts.Group), err) - } - rg := resultGrouped{Type: t, Group: g.Name, Flatten: g.Flatten} - if len(opts.As) > 0 { - var asTypes []reflect.Type - for _, as := range opts.As { - ifaceType := reflect.TypeOf(as).Elem() - if ifaceType == t { - continue - } - if !t.Implements(ifaceType) { - return nil, newErrInvalidInput( - fmt.Sprintf("invalid dig.As: %v does not implement %v", t, ifaceType), nil) - } - asTypes = append(asTypes, ifaceType) - } - if len(asTypes) > 0 { - rg.Type = asTypes[0] - rg.As = asTypes[1:] - } - } - if g.Soft { - return nil, newErrInvalidInput(fmt.Sprintf( - "cannot use soft with result value groups: soft was used with group:%q", g.Name), nil) - } - if g.Flatten { - if t.Kind() != reflect.Slice { - return nil, newErrInvalidInput(fmt.Sprintf( - "flatten can be applied to slices only: %v is not a slice", t), nil) - } - rg.Type = rg.Type.Elem() - } - return rg, nil - default: - return newResultSingle(t, opts) - } -} - -// resultVisitor visits every result in a result tree, allowing tracking state -// at each level. -type resultVisitor interface { - // Visit is called on the result being visited. - // - // If Visit returns a non-nil resultVisitor, that resultVisitor visits all - // the child results of this result. - Visit(result) resultVisitor - - // AnnotateWithField is called on each field of a resultObject after - // visiting it but before walking its descendants. - // - // The same resultVisitor is used for all fields: the one returned upon - // visiting the resultObject. - // - // For each visited field, if AnnotateWithField returns a non-nil - // resultVisitor, it will be used to walk the result of that field. - AnnotateWithField(resultObjectField) resultVisitor - - // AnnotateWithPosition is called with the index of each result of a - // resultList after vising it but before walking its descendants. - // - // The same resultVisitor is used for all results: the one returned upon - // visiting the resultList. - // - // For each position, if AnnotateWithPosition returns a non-nil - // resultVisitor, it will be used to walk the result at that index. - AnnotateWithPosition(idx int) resultVisitor -} - -// walkResult walks the result tree for the given result with the provided -// visitor. -// -// resultVisitor.Visit will be called on the provided result and if a non-nil -// resultVisitor is received, it will be used to walk its descendants. If a -// resultObject or resultList was visited, AnnotateWithField and -// AnnotateWithPosition respectively will be called before visiting the -// descendants of that resultObject/resultList. -// -// This is very similar to how go/ast.Walk works. -func walkResult(r result, v resultVisitor) { - v = v.Visit(r) - if v == nil { - return - } - - switch res := r.(type) { - case resultSingle, resultGrouped: - // No sub-results - case resultObject: - w := v - for _, f := range res.Fields { - if v := w.AnnotateWithField(f); v != nil { - walkResult(f.Result, v) - } - } - case resultList: - w := v - for i, r := range res.Results { - if v := w.AnnotateWithPosition(i); v != nil { - walkResult(r, v) - } - } - default: - digerror.BugPanicf("received unknown result type %T", res) - } -} - -// resultList holds all values returned by the constructor as results. -type resultList struct { - ctype reflect.Type - - Results []result - - // For each item at index i returned by the constructor, resultIndexes[i] - // is the index in .Results for the corresponding result object. - // resultIndexes[i] is -1 for errors returned by constructors. - resultIndexes []int -} - -func (rl resultList) DotResult() []*dot.Result { - var types []*dot.Result - for _, result := range rl.Results { - types = append(types, result.DotResult()...) - } - return types -} - -func newResultList(ctype reflect.Type, opts resultOptions) (resultList, error) { - numOut := ctype.NumOut() - rl := resultList{ - ctype: ctype, - Results: make([]result, 0, numOut), - resultIndexes: make([]int, numOut), - } - - resultIdx := 0 - for i := 0; i < numOut; i++ { - t := ctype.Out(i) - if isError(t) { - rl.resultIndexes[i] = -1 - continue - } - - r, err := newResult(t, opts) - if err != nil { - return rl, newErrInvalidInput(fmt.Sprintf("bad result %d", i+1), err) - } - - rl.Results = append(rl.Results, r) - rl.resultIndexes[i] = resultIdx - resultIdx++ - } - - return rl, nil -} - -func (resultList) Extract(containerWriter, bool, reflect.Value) { - digerror.BugPanicf("resultList.Extract() must never be called") -} - -func (rl resultList) ExtractList(cw containerWriter, decorated bool, values []reflect.Value) error { - for i, v := range values { - if resultIdx := rl.resultIndexes[i]; resultIdx >= 0 { - rl.Results[resultIdx].Extract(cw, decorated, v) - continue - } - - if err, _ := v.Interface().(error); err != nil { - return err - } - } - - return nil -} - -// resultSingle is an explicit value produced by a constructor, optionally -// with a name. -// -// This object will be added to the graph as-is. -type resultSingle struct { - Name string - Type reflect.Type - - // If specified, this is a list of types which the value will be made - // available as, in addition to its own type. - As []reflect.Type -} - -func newResultSingle(t reflect.Type, opts resultOptions) (resultSingle, error) { - r := resultSingle{ - Type: t, - Name: opts.Name, - } - - var asTypes []reflect.Type - - for _, as := range opts.As { - ifaceType := reflect.TypeOf(as).Elem() - if ifaceType == t { - // Special case: - // c.Provide(func() io.Reader, As(new(io.Reader))) - // Ignore instead of erroring out. - continue - } - if !t.Implements(ifaceType) { - return r, newErrInvalidInput( - fmt.Sprintf("invalid dig.As: %v does not implement %v", t, ifaceType), nil) - } - asTypes = append(asTypes, ifaceType) - } - - if len(asTypes) == 0 { - return r, nil - } - - return resultSingle{ - Type: asTypes[0], - Name: opts.Name, - As: asTypes[1:], - }, nil -} - -func (rs resultSingle) DotResult() []*dot.Result { - dotResults := make([]*dot.Result, 0, len(rs.As)+1) - dotResults = append(dotResults, &dot.Result{ - Node: &dot.Node{ - Type: rs.Type, - Name: rs.Name, - }, - }) - - for _, asType := range rs.As { - dotResults = append(dotResults, &dot.Result{ - Node: &dot.Node{Type: asType, Name: rs.Name}, - }) - } - - return dotResults -} - -func (rs resultSingle) Extract(cw containerWriter, decorated bool, v reflect.Value) { - if decorated { - cw.setDecoratedValue(rs.Name, rs.Type, v) - return - } - cw.setValue(rs.Name, rs.Type, v) - - for _, asType := range rs.As { - cw.setValue(rs.Name, asType, v) - } -} - -// resultObject is a dig.Out struct where each field is another result. -// -// This object is not added to the graph. Its fields are interpreted as -// results and added to the graph if needed. -type resultObject struct { - Type reflect.Type - Fields []resultObjectField -} - -func (ro resultObject) DotResult() []*dot.Result { - var types []*dot.Result - for _, field := range ro.Fields { - types = append(types, field.DotResult()...) - } - return types -} - -func newResultObject(t reflect.Type, opts resultOptions) (resultObject, error) { - ro := resultObject{Type: t} - if len(opts.Name) > 0 { - return ro, newErrInvalidInput(fmt.Sprintf( - "cannot specify a name for result objects: %v embeds dig.Out", t), nil) - } - - if len(opts.Group) > 0 { - return ro, newErrInvalidInput(fmt.Sprintf( - "cannot specify a group for result objects: %v embeds dig.Out", t), nil) - } - - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if f.Type == _outType { - // Skip over the dig.Out embed. - continue - } - - rof, err := newResultObjectField(i, f, opts) - if err != nil { - return ro, newErrInvalidInput(fmt.Sprintf("bad field %q of %v", f.Name, t), err) - } - - ro.Fields = append(ro.Fields, rof) - } - return ro, nil -} - -func (ro resultObject) Extract(cw containerWriter, decorated bool, v reflect.Value) { - for _, f := range ro.Fields { - f.Result.Extract(cw, decorated, v.Field(f.FieldIndex)) - } -} - -// resultObjectField is a single field inside a dig.Out struct. -type resultObjectField struct { - // Name of the field in the struct. - FieldName string - - // Index of the field in the struct. - // - // We need to track this separately because not all fields of the struct - // map to results. - FieldIndex int - - // Result produced by this field. - Result result -} - -func (rof resultObjectField) DotResult() []*dot.Result { - return rof.Result.DotResult() -} - -// newResultObjectField(i, f, opts) builds a resultObjectField from the field -// f at index i. -func newResultObjectField(idx int, f reflect.StructField, opts resultOptions) (resultObjectField, error) { - rof := resultObjectField{ - FieldName: f.Name, - FieldIndex: idx, - } - - var r result - switch { - case f.PkgPath != "": - return rof, newErrInvalidInput( - fmt.Sprintf("unexported fields not allowed in dig.Out, did you mean to export %q (%v)?", f.Name, f.Type), nil) - - case f.Tag.Get(_groupTag) != "": - var err error - r, err = newResultGrouped(f) - if err != nil { - return rof, err - } - - default: - var err error - if name := f.Tag.Get(_nameTag); len(name) > 0 { - // can modify in-place because options are passed-by-value. - opts.Name = name - } - r, err = newResult(f.Type, opts) - if err != nil { - return rof, err - } - } - - rof.Result = r - return rof, nil -} - -// resultGrouped is a value produced by a constructor that is part of a result -// group. -// -// These will be produced as fields of a dig.Out struct. -type resultGrouped struct { - // Name of the group as specified in the `group:".."` tag. - Group string - - // Type of value produced. - Type reflect.Type - - // Indicates elements of a value are to be injected individually, instead of - // as a group. Requires the value's slice to be a group. If set, Type will be - // the type of individual elements rather than the group. - Flatten bool - - // If specified, this is a list of types which the value will be made - // available as, in addition to its own type. - As []reflect.Type -} - -func (rt resultGrouped) DotResult() []*dot.Result { - dotResults := make([]*dot.Result, 0, len(rt.As)+1) - dotResults = append(dotResults, &dot.Result{ - Node: &dot.Node{ - Type: rt.Type, - Group: rt.Group, - }, - }) - - for _, asType := range rt.As { - dotResults = append(dotResults, &dot.Result{ - Node: &dot.Node{Type: asType, Group: rt.Group}, - }) - } - return dotResults -} - -// newResultGrouped(f) builds a new resultGrouped from the provided field. -func newResultGrouped(f reflect.StructField) (resultGrouped, error) { - g, err := parseGroupString(f.Tag.Get(_groupTag)) - if err != nil { - return resultGrouped{}, err - } - rg := resultGrouped{ - Group: g.Name, - Flatten: g.Flatten, - Type: f.Type, - } - name := f.Tag.Get(_nameTag) - optional, _ := isFieldOptional(f) - switch { - case g.Flatten && f.Type.Kind() != reflect.Slice: - return rg, newErrInvalidInput(fmt.Sprintf( - "flatten can be applied to slices only: field %q (%v) is not a slice", f.Name, f.Type), nil) - case g.Soft: - return rg, newErrInvalidInput(fmt.Sprintf( - "cannot use soft with result value groups: soft was used with group %q", rg.Group), nil) - case name != "": - return rg, newErrInvalidInput(fmt.Sprintf( - "cannot use named values with value groups: name:%q provided with group:%q", name, rg.Group), nil) - case optional: - return rg, newErrInvalidInput("value groups cannot be optional", nil) - } - if g.Flatten { - rg.Type = f.Type.Elem() - } - - return rg, nil -} - -func (rt resultGrouped) Extract(cw containerWriter, decorated bool, v reflect.Value) { - // Decorated values are always flattened. - if !decorated && !rt.Flatten { - cw.submitGroupedValue(rt.Group, rt.Type, v) - for _, asType := range rt.As { - cw.submitGroupedValue(rt.Group, asType, v) - } - return - } - - if decorated { - cw.submitDecoratedGroupedValue(rt.Group, rt.Type, v) - return - } - for i := 0; i < v.Len(); i++ { - cw.submitGroupedValue(rt.Group, rt.Type, v.Index(i)) - } -} diff --git a/vendor/go.uber.org/dig/scope.go b/vendor/go.uber.org/dig/scope.go deleted file mode 100644 index dc0c7ac5b71..00000000000 --- a/vendor/go.uber.org/dig/scope.go +++ /dev/null @@ -1,326 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "bytes" - "fmt" - "math/rand" - "reflect" - "sort" - "time" -) - -// A ScopeOption modifies the default behavior of Scope; currently, -// there are no implementations. -type ScopeOption interface { - noScopeOption() //yet -} - -// Scope is a scoped DAG of types and their dependencies. -// A Scope may also have one or more child Scopes that inherit -// from it. -type Scope struct { - // This implements containerStore interface. - - // Name of the Scope - name string - // Mapping from key to all the constructor node that can provide a value for that - // key. - providers map[key][]*constructorNode - - // Mapping from key to the decorator that decorates a value for that key. - decorators map[key]*decoratorNode - - // constructorNodes provided directly to this Scope. i.e. it does not include - // any nodes that were provided to the parent Scope this inherited from. - nodes []*constructorNode - - // Values that generated via decorators in the Scope. - decoratedValues map[key]reflect.Value - - // Values that generated directly in the Scope. - values map[key]reflect.Value - - // Values groups that generated directly in the Scope. - groups map[key][]reflect.Value - - // Values groups that generated via decoraters in the Scope. - decoratedGroups map[key]reflect.Value - - // Source of randomness. - rand *rand.Rand - - // Flag indicating whether the graph has been checked for cycles. - isVerifiedAcyclic bool - - // Defer acyclic check on provide until Invoke. - deferAcyclicVerification bool - - // Recover from panics in user-provided code and wrap in an exported error type. - recoverFromPanics bool - - // invokerFn calls a function with arguments provided to Provide or Invoke. - invokerFn invokerFn - - // graph of this Scope. Note that this holds the dependency graph of all the - // nodes that affect this Scope, not just the ones provided directly to this Scope. - gh *graphHolder - - // Parent of this Scope. - parentScope *Scope - - // All the child scopes of this Scope. - childScopes []*Scope -} - -func newScope() *Scope { - s := &Scope{ - providers: make(map[key][]*constructorNode), - decorators: make(map[key]*decoratorNode), - values: make(map[key]reflect.Value), - decoratedValues: make(map[key]reflect.Value), - groups: make(map[key][]reflect.Value), - decoratedGroups: make(map[key]reflect.Value), - invokerFn: defaultInvoker, - rand: rand.New(rand.NewSource(time.Now().UnixNano())), - } - s.gh = newGraphHolder(s) - return s -} - -// Scope creates a new Scope with the given name and options from current Scope. -// Any constructors that the current Scope knows about, as well as any modifications -// made to it in the future will be propagated to the child scope. -// However, no modifications made to the child scope being created will be propagated -// to the parent Scope. -func (s *Scope) Scope(name string, opts ...ScopeOption) *Scope { - child := newScope() - child.name = name - child.parentScope = s - child.invokerFn = s.invokerFn - child.deferAcyclicVerification = s.deferAcyclicVerification - child.recoverFromPanics = s.recoverFromPanics - - // child copies the parent's graph nodes. - for _, node := range s.gh.nodes { - child.gh.nodes = append(child.gh.nodes, node) - if ctrNode, ok := node.Wrapped.(*constructorNode); ok { - ctrNode.CopyOrder(s, child) - } - } - - for _, opt := range opts { - opt.noScopeOption() - } - - s.childScopes = append(s.childScopes, child) - return child -} - -// ancestors returns a list of scopes of ancestors of this scope up to the -// root. The scope at at index 0 is this scope itself. -func (s *Scope) ancestors() []*Scope { - var scopes []*Scope - for s := s; s != nil; s = s.parentScope { - scopes = append(scopes, s) - } - return scopes -} - -func (s *Scope) appendSubscopes(dest []*Scope) []*Scope { - dest = append(dest, s) - for _, cs := range s.childScopes { - dest = cs.appendSubscopes(dest) - } - return dest -} - -func (s *Scope) storesToRoot() []containerStore { - scopes := s.ancestors() - stores := make([]containerStore, len(scopes)) - for i, s := range scopes { - stores[i] = s - } - return stores -} - -func (s *Scope) knownTypes() []reflect.Type { - typeSet := make(map[reflect.Type]struct{}, len(s.providers)) - for k := range s.providers { - typeSet[k.t] = struct{}{} - } - - types := make([]reflect.Type, 0, len(typeSet)) - for t := range typeSet { - types = append(types, t) - } - sort.Sort(byTypeName(types)) - return types -} - -func (s *Scope) getValue(name string, t reflect.Type) (v reflect.Value, ok bool) { - v, ok = s.values[key{name: name, t: t}] - return -} - -func (s *Scope) getDecoratedValue(name string, t reflect.Type) (v reflect.Value, ok bool) { - v, ok = s.decoratedValues[key{name: name, t: t}] - return -} - -func (s *Scope) setValue(name string, t reflect.Type, v reflect.Value) { - s.values[key{name: name, t: t}] = v -} - -func (s *Scope) setDecoratedValue(name string, t reflect.Type, v reflect.Value) { - s.decoratedValues[key{name: name, t: t}] = v -} - -func (s *Scope) getValueGroup(name string, t reflect.Type) []reflect.Value { - items := s.groups[key{group: name, t: t}] - // shuffle the list so users don't rely on the ordering of grouped values - return shuffledCopy(s.rand, items) -} - -func (s *Scope) getDecoratedValueGroup(name string, t reflect.Type) (reflect.Value, bool) { - items, ok := s.decoratedGroups[key{group: name, t: t}] - return items, ok -} - -func (s *Scope) submitGroupedValue(name string, t reflect.Type, v reflect.Value) { - k := key{group: name, t: t} - s.groups[k] = append(s.groups[k], v) -} - -func (s *Scope) submitDecoratedGroupedValue(name string, t reflect.Type, v reflect.Value) { - k := key{group: name, t: t} - s.decoratedGroups[k] = v -} - -func (s *Scope) getValueProviders(name string, t reflect.Type) []provider { - return s.getProviders(key{name: name, t: t}) -} - -func (s *Scope) getGroupProviders(name string, t reflect.Type) []provider { - return s.getProviders(key{group: name, t: t}) -} - -func (s *Scope) getValueDecorator(name string, t reflect.Type) (decorator, bool) { - return s.getDecorators(key{name: name, t: t}) -} - -func (s *Scope) getGroupDecorator(name string, t reflect.Type) (decorator, bool) { - return s.getDecorators(key{group: name, t: t}) -} - -func (s *Scope) getDecorators(k key) (decorator, bool) { - d, found := s.decorators[k] - return d, found -} - -func (s *Scope) getProviders(k key) []provider { - nodes := s.providers[k] - providers := make([]provider, len(nodes)) - for i, n := range nodes { - providers[i] = n - } - return providers -} - -func (s *Scope) getAllGroupProviders(name string, t reflect.Type) []provider { - return s.getAllProviders(key{group: name, t: t}) -} - -func (s *Scope) getAllValueProviders(name string, t reflect.Type) []provider { - return s.getAllProviders(key{name: name, t: t}) -} - -func (s *Scope) getAllProviders(k key) []provider { - allScopes := s.ancestors() - var providers []provider - for _, scope := range allScopes { - providers = append(providers, scope.getProviders(k)...) - } - return providers -} - -func (s *Scope) invoker() invokerFn { - return s.invokerFn -} - -// adds a new graphNode to this Scope and all of its descendent -// scope. -func (s *Scope) newGraphNode(wrapped interface{}, orders map[*Scope]int) { - orders[s] = s.gh.NewNode(wrapped) - for _, cs := range s.childScopes { - cs.newGraphNode(wrapped, orders) - } -} - -func (s *Scope) cycleDetectedError(cycle []int) error { - var path []cycleErrPathEntry - for _, n := range cycle { - if n, ok := s.gh.Lookup(n).(*constructorNode); ok { - path = append(path, cycleErrPathEntry{ - Key: key{ - t: n.CType(), - }, - Func: n.Location(), - }) - } - } - return errCycleDetected{Path: path, scope: s} -} - -// Returns the root Scope that can be reached from this Scope. -func (s *Scope) rootScope() *Scope { - curr := s - for curr.parentScope != nil { - curr = curr.parentScope - } - return curr -} - -// String representation of the entire Scope -func (s *Scope) String() string { - b := &bytes.Buffer{} - fmt.Fprintln(b, "nodes: {") - for k, vs := range s.providers { - for _, v := range vs { - fmt.Fprintln(b, "\t", k, "->", v) - } - } - fmt.Fprintln(b, "}") - - fmt.Fprintln(b, "values: {") - for k, v := range s.values { - fmt.Fprintln(b, "\t", k, "=>", v) - } - for k, vs := range s.groups { - for _, v := range vs { - fmt.Fprintln(b, "\t", k, "=>", v) - } - } - fmt.Fprintln(b, "}") - - return b.String() -} diff --git a/vendor/go.uber.org/dig/version.go b/vendor/go.uber.org/dig/version.go deleted file mode 100644 index 7c92d4ab052..00000000000 --- a/vendor/go.uber.org/dig/version.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// 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. - -package dig - -// Version of the library. -const Version = "1.17.1" diff --git a/vendor/go.uber.org/dig/visualize.go b/vendor/go.uber.org/dig/visualize.go deleted file mode 100644 index d7ff3248241..00000000000 --- a/vendor/go.uber.org/dig/visualize.go +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// 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. - -package dig - -import ( - "errors" - "fmt" - "io" - "strconv" - "text/template" - - "go.uber.org/dig/internal/dot" -) - -// A VisualizeOption modifies the default behavior of Visualize. -type VisualizeOption interface { - applyVisualizeOption(*visualizeOptions) -} - -type visualizeOptions struct { - VisualizeError error -} - -// VisualizeError includes a visualization of the given error in the output of -// Visualize if an error was returned by Invoke or Provide. -// -// if err := c.Provide(...); err != nil { -// dig.Visualize(c, w, dig.VisualizeError(err)) -// } -// -// This option has no effect if the error was nil or if it didn't contain any -// information to visualize. -func VisualizeError(err error) VisualizeOption { - return visualizeErrorOption{err} -} - -type visualizeErrorOption struct{ err error } - -func (o visualizeErrorOption) String() string { - return fmt.Sprintf("VisualizeError(%v)", o.err) -} - -func (o visualizeErrorOption) applyVisualizeOption(opt *visualizeOptions) { - opt.VisualizeError = o.err -} - -func updateGraph(dg *dot.Graph, err error) error { - var errs []errVisualizer - // Unwrap error to find the root cause. - for { - if ev, ok := err.(errVisualizer); ok { - errs = append(errs, ev) - } - e := errors.Unwrap(err) - if e == nil { - break - } - err = e - } - - // If there are no errVisualizers included, we do not modify the graph. - if len(errs) == 0 { - return nil - } - - // We iterate in reverse because the last element is the root cause. - for i := len(errs) - 1; i >= 0; i-- { - errs[i].updateGraph(dg) - } - - // Remove non-error entries from the graph for readability. - dg.PruneSuccess() - - return nil -} - -var _graphTmpl = template.Must( - template.New("DotGraph"). - Funcs(template.FuncMap{ - "quote": strconv.Quote, - }). - Parse(`digraph { - rankdir=RL; - graph [compound=true]; - {{range $g := .Groups}} - {{- quote .String}} [{{.Attributes}}]; - {{range .Results}} - {{- quote $g.String}} -> {{quote .String}}; - {{end}} - {{end -}} - {{range $index, $ctor := .Ctors}} - subgraph cluster_{{$index}} { - {{ with .Package }}label = {{ quote .}}; - {{ end -}} - - constructor_{{$index}} [shape=plaintext label={{quote .Name}}]; - {{with .ErrorType}}color={{.Color}};{{end}} - {{range .Results}} - {{- quote .String}} [{{.Attributes}}]; - {{end}} - } - {{range .Params}} - constructor_{{$index}} -> {{quote .String}} [ltail=cluster_{{$index}}{{if .Optional}} style=dashed{{end}}]; - {{end}} - {{range .GroupParams}} - constructor_{{$index}} -> {{quote .String}} [ltail=cluster_{{$index}}]; - {{end -}} - {{end}} - {{range .Failed.TransitiveFailures}} - {{- quote .String}} [color=orange]; - {{end -}} - {{range .Failed.RootCauses}} - {{- quote .String}} [color=red]; - {{end}} -}`)) - -// Visualize parses the graph in Container c into DOT format and writes it to -// io.Writer w. -func Visualize(c *Container, w io.Writer, opts ...VisualizeOption) error { - dg := c.createGraph() - - var options visualizeOptions - for _, o := range opts { - o.applyVisualizeOption(&options) - } - - if options.VisualizeError != nil { - if err := updateGraph(dg, options.VisualizeError); err != nil { - return err - } - } - - return _graphTmpl.Execute(w, dg) -} - -// CanVisualizeError returns true if the error is an errVisualizer. -func CanVisualizeError(err error) bool { - for { - if _, ok := err.(errVisualizer); ok { - return true - } - e := errors.Unwrap(err) - if e == nil { - break - } - err = e - } - - return false -} - -func (c *Container) createGraph() *dot.Graph { - return c.scope.createGraph() -} - -func (s *Scope) createGraph() *dot.Graph { - dg := dot.NewGraph() - - for _, n := range s.nodes { - dg.AddCtor(newDotCtor(n), n.paramList.DotParam(), n.resultList.DotResult()) - } - - return dg -} - -func newDotCtor(n *constructorNode) *dot.Ctor { - return &dot.Ctor{ - ID: n.id, - Name: n.location.Name, - Package: n.location.Package, - File: n.location.File, - Line: n.location.Line, - } -} diff --git a/vendor/go.uber.org/zap/.codecov.yml b/vendor/go.uber.org/zap/.codecov.yml deleted file mode 100644 index 8e5ca7d3e2b..00000000000 --- a/vendor/go.uber.org/zap/.codecov.yml +++ /dev/null @@ -1,17 +0,0 @@ -coverage: - range: 80..100 - round: down - precision: 2 - - status: - project: # measuring the overall project coverage - default: # context, you can create multiple ones with custom titles - enabled: yes # must be yes|true to enable this status - target: 95% # specify the target coverage for each commit status - # option: "auto" (must increase from parent commit or pull request base) - # option: "X%" a static target percentage to hit - if_not_found: success # if parent is not found report status as success, error, or failure - if_ci_failed: error # if ci fails report status as success, error, or failure -ignore: - - internal/readme/readme.go - diff --git a/vendor/go.uber.org/zap/.gitignore b/vendor/go.uber.org/zap/.gitignore deleted file mode 100644 index da9d9d00b47..00000000000 --- a/vendor/go.uber.org/zap/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test -vendor - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof -*.pprof -*.out -*.log - -/bin -cover.out -cover.html diff --git a/vendor/go.uber.org/zap/.golangci.yml b/vendor/go.uber.org/zap/.golangci.yml deleted file mode 100644 index fbc6df79065..00000000000 --- a/vendor/go.uber.org/zap/.golangci.yml +++ /dev/null @@ -1,77 +0,0 @@ -output: - # Make output more digestible with quickfix in vim/emacs/etc. - sort-results: true - print-issued-lines: false - -linters: - # We'll track the golangci-lint default linters manually - # instead of letting them change without our control. - disable-all: true - enable: - # golangci-lint defaults: - - errcheck - - gosimple - - govet - - ineffassign - - staticcheck - - unused - - # Our own extras: - - gofmt - - nolintlint # lints nolint directives - - revive - -linters-settings: - govet: - # These govet checks are disabled by default, but they're useful. - enable: - - niliness - - reflectvaluecompare - - sortslice - - unusedwrite - - errcheck: - exclude-functions: - # These methods can not fail. - # They operate on an in-memory buffer. - - (*go.uber.org/zap/buffer.Buffer).Write - - (*go.uber.org/zap/buffer.Buffer).WriteByte - - (*go.uber.org/zap/buffer.Buffer).WriteString - - - (*go.uber.org/zap/zapio.Writer).Close - - (*go.uber.org/zap/zapio.Writer).Sync - - (*go.uber.org/zap/zapio.Writer).Write - # Write to zapio.Writer cannot fail, - # so io.WriteString on it cannot fail. - - io.WriteString(*go.uber.org/zap/zapio.Writer) - - # Writing a plain string to a fmt.State cannot fail. - - io.WriteString(fmt.State) - -issues: - # Print all issues reported by all linters. - max-issues-per-linter: 0 - max-same-issues: 0 - - # Don't ignore some of the issues that golangci-lint considers okay. - # This includes documenting all exported entities. - exclude-use-default: false - - exclude-rules: - # Don't warn on unused parameters. - # Parameter names are useful; replacing them with '_' is undesirable. - - linters: [revive] - text: 'unused-parameter: parameter \S+ seems to be unused, consider removing or renaming it as _' - - # staticcheck already has smarter checks for empty blocks. - # revive's empty-block linter has false positives. - # For example, as of writing this, the following is not allowed. - # for foo() { } - - linters: [revive] - text: 'empty-block: this block is empty, you can remove it' - - # Ignore logger.Sync() errcheck failures in example_test.go - # since those are intended to be uncomplicated examples. - - linters: [errcheck] - path: example_test.go - text: 'Error return value of `logger.Sync` is not checked' diff --git a/vendor/go.uber.org/zap/.readme.tmpl b/vendor/go.uber.org/zap/.readme.tmpl deleted file mode 100644 index 92aa65d660b..00000000000 --- a/vendor/go.uber.org/zap/.readme.tmpl +++ /dev/null @@ -1,109 +0,0 @@ -# :zap: zap [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] - -Blazing fast, structured, leveled logging in Go. - -## Installation - -`go get -u go.uber.org/zap` - -Note that zap only supports the two most recent minor versions of Go. - -## Quick Start - -In contexts where performance is nice, but not critical, use the -`SugaredLogger`. It's 4-10x faster than other structured logging -packages and includes both structured and `printf`-style APIs. - -```go -logger, _ := zap.NewProduction() -defer logger.Sync() // flushes buffer, if any -sugar := logger.Sugar() -sugar.Infow("failed to fetch URL", - // Structured context as loosely typed key-value pairs. - "url", url, - "attempt", 3, - "backoff", time.Second, -) -sugar.Infof("Failed to fetch URL: %s", url) -``` - -When performance and type safety are critical, use the `Logger`. It's even -faster than the `SugaredLogger` and allocates far less, but it only supports -structured logging. - -```go -logger, _ := zap.NewProduction() -defer logger.Sync() -logger.Info("failed to fetch URL", - // Structured context as strongly typed Field values. - zap.String("url", url), - zap.Int("attempt", 3), - zap.Duration("backoff", time.Second), -) -``` - -See the [documentation][doc] and [FAQ](FAQ.md) for more details. - -## Performance - -For applications that log in the hot path, reflection-based serialization and -string formatting are prohibitively expensive — they're CPU-intensive -and make many small allocations. Put differently, using `encoding/json` and -`fmt.Fprintf` to log tons of `interface{}`s makes your application slow. - -Zap takes a different approach. It includes a reflection-free, zero-allocation -JSON encoder, and the base `Logger` strives to avoid serialization overhead -and allocations wherever possible. By building the high-level `SugaredLogger` -on that foundation, zap lets users *choose* when they need to count every -allocation and when they'd prefer a more familiar, loosely typed API. - -As measured by its own [benchmarking suite][], not only is zap more performant -than comparable structured logging packages — it's also faster than the -standard library. Like all benchmarks, take these with a grain of salt.[1](#footnote-versions) - -Log a message and 10 fields: - -{{.BenchmarkAddingFields}} - -Log a message with a logger that already has 10 fields of context: - -{{.BenchmarkAccumulatedContext}} - -Log a static string, without any context or `printf`-style templating: - -{{.BenchmarkWithoutFields}} - -## Development Status: Stable - -All APIs are finalized, and no breaking changes will be made in the 1.x series -of releases. Users of semver-aware dependency management systems should pin -zap to `^1`. - -## Contributing - -We encourage and support an active, healthy community of contributors — -including you! Details are in the [contribution guide](CONTRIBUTING.md) and -the [code of conduct](CODE_OF_CONDUCT.md). The zap maintainers keep an eye on -issues and pull requests, but you can also report any negative conduct to -oss-conduct@uber.com. That email list is a private, safe space; even the zap -maintainers don't have access, so don't hesitate to hold us to a high -standard. - -
- -Released under the [MIT License](LICENSE.txt). - -1 In particular, keep in mind that we may be -benchmarking against slightly older versions of other packages. Versions are -pinned in the [benchmarks/go.mod][] file. [↩](#anchor-versions) - -[doc-img]: https://pkg.go.dev/badge/go.uber.org/zap -[doc]: https://pkg.go.dev/go.uber.org/zap -[ci-img]: https://github.com/uber-go/zap/actions/workflows/go.yml/badge.svg -[ci]: https://github.com/uber-go/zap/actions/workflows/go.yml -[cov-img]: https://codecov.io/gh/uber-go/zap/branch/master/graph/badge.svg -[cov]: https://codecov.io/gh/uber-go/zap -[benchmarking suite]: https://github.com/uber-go/zap/tree/master/benchmarks -[benchmarks/go.mod]: https://github.com/uber-go/zap/blob/master/benchmarks/go.mod - diff --git a/vendor/go.uber.org/zap/CHANGELOG.md b/vendor/go.uber.org/zap/CHANGELOG.md deleted file mode 100644 index 11b46597612..00000000000 --- a/vendor/go.uber.org/zap/CHANGELOG.md +++ /dev/null @@ -1,671 +0,0 @@ -# Changelog -All notable changes to this project will be documented in this file. - -This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## 1.26.0 (14 Sep 2023) -Enhancements: -* [#1319][]: Add `WithLazy` method to `Logger` which lazily evaluates the structured -context. -* [#1350][]: String encoding is much (~50%) faster now. - -Thanks to @jquirke, @cdvr1993 for their contributions to this release. - -[#1319]: https://github.com/uber-go/zap/pull/1319 -[#1350]: https://github.com/uber-go/zap/pull/1350 - -## 1.25.0 (1 Aug 2023) - -This release contains several improvements including performance, API additions, -and two new experimental packages whose APIs are unstable and may change in the -future. - -Enhancements: -* [#1246][]: Add `zap/exp/zapslog` package for integration with slog. -* [#1273][]: Add `Name` to `Logger` which returns the Logger's name if one is set. -* [#1281][]: Add `zap/exp/expfield` package which contains helper methods -`Str` and `Strs` for constructing String-like zap.Fields. -* [#1310][]: Reduce stack size on `Any`. - -Thanks to @knight42, @dzakaammar, @bcspragu, and @rexywork for their contributions -to this release. - -[#1246]: https://github.com/uber-go/zap/pull/1246 -[#1273]: https://github.com/uber-go/zap/pull/1273 -[#1281]: https://github.com/uber-go/zap/pull/1281 -[#1310]: https://github.com/uber-go/zap/pull/1310 - -## 1.24.0 (30 Nov 2022) - -Enhancements: -* [#1148][]: Add `Level` to both `Logger` and `SugaredLogger` that reports the - current minimum enabled log level. -* [#1185][]: `SugaredLogger` turns errors to zap.Error automatically. - -Thanks to @Abirdcfly, @craigpastro, @nnnkkk7, and @sashamelentyev for their -contributions to this release. - -[#1148]: https://github.coml/uber-go/zap/pull/1148 -[#1185]: https://github.coml/uber-go/zap/pull/1185 - -## 1.23.0 (24 Aug 2022) - -Enhancements: -* [#1147][]: Add a `zapcore.LevelOf` function to determine the level of a - `LevelEnabler` or `Core`. -* [#1155][]: Add `zap.Stringers` field constructor to log arrays of objects - that implement `String() string`. - -[#1147]: https://github.com/uber-go/zap/pull/1147 -[#1155]: https://github.com/uber-go/zap/pull/1155 - -## 1.22.0 (8 Aug 2022) - -Enhancements: -* [#1071][]: Add `zap.Objects` and `zap.ObjectValues` field constructors to log - arrays of objects. With these two constructors, you don't need to implement - `zapcore.ArrayMarshaler` for use with `zap.Array` if those objects implement - `zapcore.ObjectMarshaler`. -* [#1079][]: Add `SugaredLogger.WithOptions` to build a copy of an existing - `SugaredLogger` with the provided options applied. -* [#1080][]: Add `*ln` variants to `SugaredLogger` for each log level. - These functions provide a string joining behavior similar to `fmt.Println`. -* [#1088][]: Add `zap.WithFatalHook` option to control the behavior of the - logger for `Fatal`-level log entries. This defaults to exiting the program. -* [#1108][]: Add a `zap.Must` function that you can use with `NewProduction` or - `NewDevelopment` to panic if the system was unable to build the logger. -* [#1118][]: Add a `Logger.Log` method that allows specifying the log level for - a statement dynamically. - -Thanks to @cardil, @craigpastro, @sashamelentyev, @shota3506, and @zhupeijun -for their contributions to this release. - -[#1071]: https://github.com/uber-go/zap/pull/1071 -[#1079]: https://github.com/uber-go/zap/pull/1079 -[#1080]: https://github.com/uber-go/zap/pull/1080 -[#1088]: https://github.com/uber-go/zap/pull/1088 -[#1108]: https://github.com/uber-go/zap/pull/1108 -[#1118]: https://github.com/uber-go/zap/pull/1118 - -## 1.21.0 (7 Feb 2022) - -Enhancements: -* [#1047][]: Add `zapcore.ParseLevel` to parse a `Level` from a string. -* [#1048][]: Add `zap.ParseAtomicLevel` to parse an `AtomicLevel` from a - string. - -Bugfixes: -* [#1058][]: Fix panic in JSON encoder when `EncodeLevel` is unset. - -Other changes: -* [#1052][]: Improve encoding performance when the `AddCaller` and - `AddStacktrace` options are used together. - -[#1047]: https://github.com/uber-go/zap/pull/1047 -[#1048]: https://github.com/uber-go/zap/pull/1048 -[#1052]: https://github.com/uber-go/zap/pull/1052 -[#1058]: https://github.com/uber-go/zap/pull/1058 - -Thanks to @aerosol and @Techassi for their contributions to this release. - -## 1.20.0 (4 Jan 2022) - -Enhancements: -* [#989][]: Add `EncoderConfig.SkipLineEnding` flag to disable adding newline - characters between log statements. -* [#1039][]: Add `EncoderConfig.NewReflectedEncoder` field to customize JSON - encoding of reflected log fields. - -Bugfixes: -* [#1011][]: Fix inaccurate precision when encoding complex64 as JSON. -* [#554][], [#1017][]: Close JSON namespaces opened in `MarshalLogObject` - methods when the methods return. -* [#1033][]: Avoid panicking in Sampler core if `thereafter` is zero. - -Other changes: -* [#1028][]: Drop support for Go < 1.15. - -[#554]: https://github.com/uber-go/zap/pull/554 -[#989]: https://github.com/uber-go/zap/pull/989 -[#1011]: https://github.com/uber-go/zap/pull/1011 -[#1017]: https://github.com/uber-go/zap/pull/1017 -[#1028]: https://github.com/uber-go/zap/pull/1028 -[#1033]: https://github.com/uber-go/zap/pull/1033 -[#1039]: https://github.com/uber-go/zap/pull/1039 - -Thanks to @psrajat, @lruggieri, @sammyrnycreal for their contributions to this release. - -## 1.19.1 (8 Sep 2021) - -Bugfixes: -* [#1001][]: JSON: Fix complex number encoding with negative imaginary part. Thanks to @hemantjadon. -* [#1003][]: JSON: Fix inaccurate precision when encoding float32. - -[#1001]: https://github.com/uber-go/zap/pull/1001 -[#1003]: https://github.com/uber-go/zap/pull/1003 - -## 1.19.0 (9 Aug 2021) - -Enhancements: -* [#975][]: Avoid panicking in Sampler core if the level is out of bounds. -* [#984][]: Reduce the size of BufferedWriteSyncer by aligning the fields - better. - -[#975]: https://github.com/uber-go/zap/pull/975 -[#984]: https://github.com/uber-go/zap/pull/984 - -Thanks to @lancoLiu and @thockin for their contributions to this release. - -## 1.18.1 (28 Jun 2021) - -Bugfixes: -* [#974][]: Fix nil dereference in logger constructed by `zap.NewNop`. - -[#974]: https://github.com/uber-go/zap/pull/974 - -## 1.18.0 (28 Jun 2021) - -Enhancements: -* [#961][]: Add `zapcore.BufferedWriteSyncer`, a new `WriteSyncer` that buffers - messages in-memory and flushes them periodically. -* [#971][]: Add `zapio.Writer` to use a Zap logger as an `io.Writer`. -* [#897][]: Add `zap.WithClock` option to control the source of time via the - new `zapcore.Clock` interface. -* [#949][]: Avoid panicking in `zap.SugaredLogger` when arguments of `*w` - methods don't match expectations. -* [#943][]: Add support for filtering by level or arbitrary matcher function to - `zaptest/observer`. -* [#691][]: Comply with `io.StringWriter` and `io.ByteWriter` in Zap's - `buffer.Buffer`. - -Thanks to @atrn0, @ernado, @heyanfu, @hnlq715, @zchee -for their contributions to this release. - -[#691]: https://github.com/uber-go/zap/pull/691 -[#897]: https://github.com/uber-go/zap/pull/897 -[#943]: https://github.com/uber-go/zap/pull/943 -[#949]: https://github.com/uber-go/zap/pull/949 -[#961]: https://github.com/uber-go/zap/pull/961 -[#971]: https://github.com/uber-go/zap/pull/971 - -## 1.17.0 (25 May 2021) - -Bugfixes: -* [#867][]: Encode `` for nil `error` instead of a panic. -* [#931][], [#936][]: Update minimum version constraints to address - vulnerabilities in dependencies. - -Enhancements: -* [#865][]: Improve alignment of fields of the Logger struct, reducing its - size from 96 to 80 bytes. -* [#881][]: Support `grpclog.LoggerV2` in zapgrpc. -* [#903][]: Support URL-encoded POST requests to the AtomicLevel HTTP handler - with the `application/x-www-form-urlencoded` content type. -* [#912][]: Support multi-field encoding with `zap.Inline`. -* [#913][]: Speed up SugaredLogger for calls with a single string. -* [#928][]: Add support for filtering by field name to `zaptest/observer`. - -Thanks to @ash2k, @FMLS, @jimmystewpot, @Oncilla, @tsoslow, @tylitianrui, @withshubh, and @wziww for their contributions to this release. - -[#865]: https://github.com/uber-go/zap/pull/865 -[#867]: https://github.com/uber-go/zap/pull/867 -[#881]: https://github.com/uber-go/zap/pull/881 -[#903]: https://github.com/uber-go/zap/pull/903 -[#912]: https://github.com/uber-go/zap/pull/912 -[#913]: https://github.com/uber-go/zap/pull/913 -[#928]: https://github.com/uber-go/zap/pull/928 -[#931]: https://github.com/uber-go/zap/pull/931 -[#936]: https://github.com/uber-go/zap/pull/936 - -## 1.16.0 (1 Sep 2020) - -Bugfixes: -* [#828][]: Fix missing newline in IncreaseLevel error messages. -* [#835][]: Fix panic in JSON encoder when encoding times or durations - without specifying a time or duration encoder. -* [#843][]: Honor CallerSkip when taking stack traces. -* [#862][]: Fix the default file permissions to use `0666` and rely on the umask instead. -* [#854][]: Encode `` for nil `Stringer` instead of a panic error log. - -Enhancements: -* [#629][]: Added `zapcore.TimeEncoderOfLayout` to easily create time encoders - for custom layouts. -* [#697][]: Added support for a configurable delimiter in the console encoder. -* [#852][]: Optimize console encoder by pooling the underlying JSON encoder. -* [#844][]: Add ability to include the calling function as part of logs. -* [#843][]: Add `StackSkip` for including truncated stacks as a field. -* [#861][]: Add options to customize Fatal behaviour for better testability. - -Thanks to @SteelPhase, @tmshn, @lixingwang, @wyxloading, @moul, @segevfiner, @andy-retailnext and @jcorbin for their contributions to this release. - -[#629]: https://github.com/uber-go/zap/pull/629 -[#697]: https://github.com/uber-go/zap/pull/697 -[#828]: https://github.com/uber-go/zap/pull/828 -[#835]: https://github.com/uber-go/zap/pull/835 -[#843]: https://github.com/uber-go/zap/pull/843 -[#844]: https://github.com/uber-go/zap/pull/844 -[#852]: https://github.com/uber-go/zap/pull/852 -[#854]: https://github.com/uber-go/zap/pull/854 -[#861]: https://github.com/uber-go/zap/pull/861 -[#862]: https://github.com/uber-go/zap/pull/862 - -## 1.15.0 (23 Apr 2020) - -Bugfixes: -* [#804][]: Fix handling of `Time` values out of `UnixNano` range. -* [#812][]: Fix `IncreaseLevel` being reset after a call to `With`. - -Enhancements: -* [#806][]: Add `WithCaller` option to supersede the `AddCaller` option. This - allows disabling annotation of log entries with caller information if - previously enabled with `AddCaller`. -* [#813][]: Deprecate `NewSampler` constructor in favor of - `NewSamplerWithOptions` which supports a `SamplerHook` option. This option - adds support for monitoring sampling decisions through a hook. - -Thanks to @danielbprice for their contributions to this release. - -[#804]: https://github.com/uber-go/zap/pull/804 -[#812]: https://github.com/uber-go/zap/pull/812 -[#806]: https://github.com/uber-go/zap/pull/806 -[#813]: https://github.com/uber-go/zap/pull/813 - -## 1.14.1 (14 Mar 2020) - -Bugfixes: -* [#791][]: Fix panic on attempting to build a logger with an invalid Config. -* [#795][]: Vendoring Zap with `go mod vendor` no longer includes Zap's - development-time dependencies. -* [#799][]: Fix issue introduced in 1.14.0 that caused invalid JSON output to - be generated for arrays of `time.Time` objects when using string-based time - formats. - -Thanks to @YashishDua for their contributions to this release. - -[#791]: https://github.com/uber-go/zap/pull/791 -[#795]: https://github.com/uber-go/zap/pull/795 -[#799]: https://github.com/uber-go/zap/pull/799 - -## 1.14.0 (20 Feb 2020) - -Enhancements: -* [#771][]: Optimize calls for disabled log levels. -* [#773][]: Add millisecond duration encoder. -* [#775][]: Add option to increase the level of a logger. -* [#786][]: Optimize time formatters using `Time.AppendFormat` where possible. - -Thanks to @caibirdme for their contributions to this release. - -[#771]: https://github.com/uber-go/zap/pull/771 -[#773]: https://github.com/uber-go/zap/pull/773 -[#775]: https://github.com/uber-go/zap/pull/775 -[#786]: https://github.com/uber-go/zap/pull/786 - -## 1.13.0 (13 Nov 2019) - -Enhancements: -* [#758][]: Add `Intp`, `Stringp`, and other similar `*p` field constructors - to log pointers to primitives with support for `nil` values. - -Thanks to @jbizzle for their contributions to this release. - -[#758]: https://github.com/uber-go/zap/pull/758 - -## 1.12.0 (29 Oct 2019) - -Enhancements: -* [#751][]: Migrate to Go modules. - -[#751]: https://github.com/uber-go/zap/pull/751 - -## 1.11.0 (21 Oct 2019) - -Enhancements: -* [#725][]: Add `zapcore.OmitKey` to omit keys in an `EncoderConfig`. -* [#736][]: Add `RFC3339` and `RFC3339Nano` time encoders. - -Thanks to @juicemia, @uhthomas for their contributions to this release. - -[#725]: https://github.com/uber-go/zap/pull/725 -[#736]: https://github.com/uber-go/zap/pull/736 - -## 1.10.0 (29 Apr 2019) - -Bugfixes: -* [#657][]: Fix `MapObjectEncoder.AppendByteString` not adding value as a - string. -* [#706][]: Fix incorrect call depth to determine caller in Go 1.12. - -Enhancements: -* [#610][]: Add `zaptest.WrapOptions` to wrap `zap.Option` for creating test - loggers. -* [#675][]: Don't panic when encoding a String field. -* [#704][]: Disable HTML escaping for JSON objects encoded using the - reflect-based encoder. - -Thanks to @iaroslav-ciupin, @lelenanam, @joa, @NWilson for their contributions -to this release. - -[#657]: https://github.com/uber-go/zap/pull/657 -[#706]: https://github.com/uber-go/zap/pull/706 -[#610]: https://github.com/uber-go/zap/pull/610 -[#675]: https://github.com/uber-go/zap/pull/675 -[#704]: https://github.com/uber-go/zap/pull/704 - -## v1.9.1 (06 Aug 2018) - -Bugfixes: - -* [#614][]: MapObjectEncoder should not ignore empty slices. - -[#614]: https://github.com/uber-go/zap/pull/614 - -## v1.9.0 (19 Jul 2018) - -Enhancements: -* [#602][]: Reduce number of allocations when logging with reflection. -* [#572][], [#606][]: Expose a registry for third-party logging sinks. - -Thanks to @nfarah86, @AlekSi, @JeanMertz, @philippgille, @etsangsplk, and -@dimroc for their contributions to this release. - -[#602]: https://github.com/uber-go/zap/pull/602 -[#572]: https://github.com/uber-go/zap/pull/572 -[#606]: https://github.com/uber-go/zap/pull/606 - -## v1.8.0 (13 Apr 2018) - -Enhancements: -* [#508][]: Make log level configurable when redirecting the standard - library's logger. -* [#518][]: Add a logger that writes to a `*testing.TB`. -* [#577][]: Add a top-level alias for `zapcore.Field` to clean up GoDoc. - -Bugfixes: -* [#574][]: Add a missing import comment to `go.uber.org/zap/buffer`. - -Thanks to @DiSiqueira and @djui for their contributions to this release. - -[#508]: https://github.com/uber-go/zap/pull/508 -[#518]: https://github.com/uber-go/zap/pull/518 -[#577]: https://github.com/uber-go/zap/pull/577 -[#574]: https://github.com/uber-go/zap/pull/574 - -## v1.7.1 (25 Sep 2017) - -Bugfixes: -* [#504][]: Store strings when using AddByteString with the map encoder. - -[#504]: https://github.com/uber-go/zap/pull/504 - -## v1.7.0 (21 Sep 2017) - -Enhancements: - -* [#487][]: Add `NewStdLogAt`, which extends `NewStdLog` by allowing the user - to specify the level of the logged messages. - -[#487]: https://github.com/uber-go/zap/pull/487 - -## v1.6.0 (30 Aug 2017) - -Enhancements: - -* [#491][]: Omit zap stack frames from stacktraces. -* [#490][]: Add a `ContextMap` method to observer logs for simpler - field validation in tests. - -[#490]: https://github.com/uber-go/zap/pull/490 -[#491]: https://github.com/uber-go/zap/pull/491 - -## v1.5.0 (22 Jul 2017) - -Enhancements: - -* [#460][] and [#470][]: Support errors produced by `go.uber.org/multierr`. -* [#465][]: Support user-supplied encoders for logger names. - -Bugfixes: - -* [#477][]: Fix a bug that incorrectly truncated deep stacktraces. - -Thanks to @richard-tunein and @pavius for their contributions to this release. - -[#477]: https://github.com/uber-go/zap/pull/477 -[#465]: https://github.com/uber-go/zap/pull/465 -[#460]: https://github.com/uber-go/zap/pull/460 -[#470]: https://github.com/uber-go/zap/pull/470 - -## v1.4.1 (08 Jun 2017) - -This release fixes two bugs. - -Bugfixes: - -* [#435][]: Support a variety of case conventions when unmarshaling levels. -* [#444][]: Fix a panic in the observer. - -[#435]: https://github.com/uber-go/zap/pull/435 -[#444]: https://github.com/uber-go/zap/pull/444 - -## v1.4.0 (12 May 2017) - -This release adds a few small features and is fully backward-compatible. - -Enhancements: - -* [#424][]: Add a `LineEnding` field to `EncoderConfig`, allowing users to - override the Unix-style default. -* [#425][]: Preserve time zones when logging times. -* [#431][]: Make `zap.AtomicLevel` implement `fmt.Stringer`, which makes a - variety of operations a bit simpler. - -[#424]: https://github.com/uber-go/zap/pull/424 -[#425]: https://github.com/uber-go/zap/pull/425 -[#431]: https://github.com/uber-go/zap/pull/431 - -## v1.3.0 (25 Apr 2017) - -This release adds an enhancement to zap's testing helpers as well as the -ability to marshal an AtomicLevel. It is fully backward-compatible. - -Enhancements: - -* [#415][]: Add a substring-filtering helper to zap's observer. This is - particularly useful when testing the `SugaredLogger`. -* [#416][]: Make `AtomicLevel` implement `encoding.TextMarshaler`. - -[#415]: https://github.com/uber-go/zap/pull/415 -[#416]: https://github.com/uber-go/zap/pull/416 - -## v1.2.0 (13 Apr 2017) - -This release adds a gRPC compatibility wrapper. It is fully backward-compatible. - -Enhancements: - -* [#402][]: Add a `zapgrpc` package that wraps zap's Logger and implements - `grpclog.Logger`. - -[#402]: https://github.com/uber-go/zap/pull/402 - -## v1.1.0 (31 Mar 2017) - -This release fixes two bugs and adds some enhancements to zap's testing helpers. -It is fully backward-compatible. - -Bugfixes: - -* [#385][]: Fix caller path trimming on Windows. -* [#396][]: Fix a panic when attempting to use non-existent directories with - zap's configuration struct. - -Enhancements: - -* [#386][]: Add filtering helpers to zaptest's observing logger. - -Thanks to @moitias for contributing to this release. - -[#385]: https://github.com/uber-go/zap/pull/385 -[#396]: https://github.com/uber-go/zap/pull/396 -[#386]: https://github.com/uber-go/zap/pull/386 - -## v1.0.0 (14 Mar 2017) - -This is zap's first stable release. All exported APIs are now final, and no -further breaking changes will be made in the 1.x release series. Anyone using a -semver-aware dependency manager should now pin to `^1`. - -Breaking changes: - -* [#366][]: Add byte-oriented APIs to encoders to log UTF-8 encoded text without - casting from `[]byte` to `string`. -* [#364][]: To support buffering outputs, add `Sync` methods to `zapcore.Core`, - `zap.Logger`, and `zap.SugaredLogger`. -* [#371][]: Rename the `testutils` package to `zaptest`, which is less likely to - clash with other testing helpers. - -Bugfixes: - -* [#362][]: Make the ISO8601 time formatters fixed-width, which is friendlier - for tab-separated console output. -* [#369][]: Remove the automatic locks in `zapcore.NewCore`, which allows zap to - work with concurrency-safe `WriteSyncer` implementations. -* [#347][]: Stop reporting errors when trying to `fsync` standard out on Linux - systems. -* [#373][]: Report the correct caller from zap's standard library - interoperability wrappers. - -Enhancements: - -* [#348][]: Add a registry allowing third-party encodings to work with zap's - built-in `Config`. -* [#327][]: Make the representation of logger callers configurable (like times, - levels, and durations). -* [#376][]: Allow third-party encoders to use their own buffer pools, which - removes the last performance advantage that zap's encoders have over plugins. -* [#346][]: Add `CombineWriteSyncers`, a convenience function to tee multiple - `WriteSyncer`s and lock the result. -* [#365][]: Make zap's stacktraces compatible with mid-stack inlining (coming in - Go 1.9). -* [#372][]: Export zap's observing logger as `zaptest/observer`. This makes it - easier for particularly punctilious users to unit test their application's - logging. - -Thanks to @suyash, @htrendev, @flisky, @Ulexus, and @skipor for their -contributions to this release. - -[#366]: https://github.com/uber-go/zap/pull/366 -[#364]: https://github.com/uber-go/zap/pull/364 -[#371]: https://github.com/uber-go/zap/pull/371 -[#362]: https://github.com/uber-go/zap/pull/362 -[#369]: https://github.com/uber-go/zap/pull/369 -[#347]: https://github.com/uber-go/zap/pull/347 -[#373]: https://github.com/uber-go/zap/pull/373 -[#348]: https://github.com/uber-go/zap/pull/348 -[#327]: https://github.com/uber-go/zap/pull/327 -[#376]: https://github.com/uber-go/zap/pull/376 -[#346]: https://github.com/uber-go/zap/pull/346 -[#365]: https://github.com/uber-go/zap/pull/365 -[#372]: https://github.com/uber-go/zap/pull/372 - -## v1.0.0-rc.3 (7 Mar 2017) - -This is the third release candidate for zap's stable release. There are no -breaking changes. - -Bugfixes: - -* [#339][]: Byte slices passed to `zap.Any` are now correctly treated as binary blobs - rather than `[]uint8`. - -Enhancements: - -* [#307][]: Users can opt into colored output for log levels. -* [#353][]: In addition to hijacking the output of the standard library's - package-global logging functions, users can now construct a zap-backed - `log.Logger` instance. -* [#311][]: Frames from common runtime functions and some of zap's internal - machinery are now omitted from stacktraces. - -Thanks to @ansel1 and @suyash for their contributions to this release. - -[#339]: https://github.com/uber-go/zap/pull/339 -[#307]: https://github.com/uber-go/zap/pull/307 -[#353]: https://github.com/uber-go/zap/pull/353 -[#311]: https://github.com/uber-go/zap/pull/311 - -## v1.0.0-rc.2 (21 Feb 2017) - -This is the second release candidate for zap's stable release. It includes two -breaking changes. - -Breaking changes: - -* [#316][]: Zap's global loggers are now fully concurrency-safe - (previously, users had to ensure that `ReplaceGlobals` was called before the - loggers were in use). However, they must now be accessed via the `L()` and - `S()` functions. Users can update their projects with - - ``` - gofmt -r "zap.L -> zap.L()" -w . - gofmt -r "zap.S -> zap.S()" -w . - ``` -* [#309][] and [#317][]: RC1 was mistakenly shipped with invalid - JSON and YAML struct tags on all config structs. This release fixes the tags - and adds static analysis to prevent similar bugs in the future. - -Bugfixes: - -* [#321][]: Redirecting the standard library's `log` output now - correctly reports the logger's caller. - -Enhancements: - -* [#325][] and [#333][]: Zap now transparently supports non-standard, rich - errors like those produced by `github.com/pkg/errors`. -* [#326][]: Though `New(nil)` continues to return a no-op logger, `NewNop()` is - now preferred. Users can update their projects with `gofmt -r 'zap.New(nil) -> - zap.NewNop()' -w .`. -* [#300][]: Incorrectly importing zap as `github.com/uber-go/zap` now returns a - more informative error. - -Thanks to @skipor and @chapsuk for their contributions to this release. - -[#316]: https://github.com/uber-go/zap/pull/316 -[#309]: https://github.com/uber-go/zap/pull/309 -[#317]: https://github.com/uber-go/zap/pull/317 -[#321]: https://github.com/uber-go/zap/pull/321 -[#325]: https://github.com/uber-go/zap/pull/325 -[#333]: https://github.com/uber-go/zap/pull/333 -[#326]: https://github.com/uber-go/zap/pull/326 -[#300]: https://github.com/uber-go/zap/pull/300 - -## v1.0.0-rc.1 (14 Feb 2017) - -This is the first release candidate for zap's stable release. There are multiple -breaking changes and improvements from the pre-release version. Most notably: - -* **Zap's import path is now "go.uber.org/zap"** — all users will - need to update their code. -* User-facing types and functions remain in the `zap` package. Code relevant - largely to extension authors is now in the `zapcore` package. -* The `zapcore.Core` type makes it easy for third-party packages to use zap's - internals but provide a different user-facing API. -* `Logger` is now a concrete type instead of an interface. -* A less verbose (though slower) logging API is included by default. -* Package-global loggers `L` and `S` are included. -* A human-friendly console encoder is included. -* A declarative config struct allows common logger configurations to be managed - as configuration instead of code. -* Sampling is more accurate, and doesn't depend on the standard library's shared - timer heap. - -## v0.1.0-beta.1 (6 Feb 2017) - -This is a minor version, tagged to allow users to pin to the pre-1.0 APIs and -upgrade at their leisure. Since this is the first tagged release, there are no -backward compatibility concerns and all functionality is new. - -Early zap adopters should pin to the 0.1.x minor version until they're ready to -upgrade to the upcoming stable release. diff --git a/vendor/go.uber.org/zap/CODE_OF_CONDUCT.md b/vendor/go.uber.org/zap/CODE_OF_CONDUCT.md deleted file mode 100644 index e327d9aa5cd..00000000000 --- a/vendor/go.uber.org/zap/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,75 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, -body size, disability, ethnicity, gender identity and expression, level of -experience, nationality, personal appearance, race, religion, or sexual -identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an -appointed representative at an online or offline event. Representation of a -project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at oss-conduct@uber.com. The project -team will review and investigate all complaints, and will respond in a way -that it deems appropriate to the circumstances. The project team is obligated -to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 1.4, available at -[http://contributor-covenant.org/version/1/4][version]. - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/go.uber.org/zap/CONTRIBUTING.md b/vendor/go.uber.org/zap/CONTRIBUTING.md deleted file mode 100644 index ea02f3cae2d..00000000000 --- a/vendor/go.uber.org/zap/CONTRIBUTING.md +++ /dev/null @@ -1,70 +0,0 @@ -# Contributing - -We'd love your help making zap the very best structured logging library in Go! - -If you'd like to add new exported APIs, please [open an issue][open-issue] -describing your proposal — discussing API changes ahead of time makes -pull request review much smoother. In your issue, pull request, and any other -communications, please remember to treat your fellow contributors with -respect! We take our [code of conduct](CODE_OF_CONDUCT.md) seriously. - -Note that you'll need to sign [Uber's Contributor License Agreement][cla] -before we can accept any of your contributions. If necessary, a bot will remind -you to accept the CLA when you open your pull request. - -## Setup - -[Fork][fork], then clone the repository: - -```bash -mkdir -p $GOPATH/src/go.uber.org -cd $GOPATH/src/go.uber.org -git clone git@github.com:your_github_username/zap.git -cd zap -git remote add upstream https://github.com/uber-go/zap.git -git fetch upstream -``` - -Make sure that the tests and the linters pass: - -```bash -make test -make lint -``` - -## Making Changes - -Start by creating a new branch for your changes: - -```bash -cd $GOPATH/src/go.uber.org/zap -git checkout master -git fetch upstream -git rebase upstream/master -git checkout -b cool_new_feature -``` - -Make your changes, then ensure that `make lint` and `make test` still pass. If -you're satisfied with your changes, push them to your fork. - -```bash -git push origin cool_new_feature -``` - -Then use the GitHub UI to open a pull request. - -At this point, you're waiting on us to review your changes. We _try_ to respond -to issues and pull requests within a few business days, and we may suggest some -improvements or alternatives. Once your changes are approved, one of the -project maintainers will merge them. - -We're much more likely to approve your changes if you: - -- Add tests for new functionality. -- Write a [good commit message][commit-message]. -- Maintain backward compatibility. - -[fork]: https://github.com/uber-go/zap/fork -[open-issue]: https://github.com/uber-go/zap/issues/new -[cla]: https://cla-assistant.io/uber-go/zap -[commit-message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html diff --git a/vendor/go.uber.org/zap/FAQ.md b/vendor/go.uber.org/zap/FAQ.md deleted file mode 100644 index b183b20bc13..00000000000 --- a/vendor/go.uber.org/zap/FAQ.md +++ /dev/null @@ -1,164 +0,0 @@ -# Frequently Asked Questions - -## Design - -### Why spend so much effort on logger performance? - -Of course, most applications won't notice the impact of a slow logger: they -already take tens or hundreds of milliseconds for each operation, so an extra -millisecond doesn't matter. - -On the other hand, why *not* make structured logging fast? The `SugaredLogger` -isn't any harder to use than other logging packages, and the `Logger` makes -structured logging possible in performance-sensitive contexts. Across a fleet -of Go microservices, making each application even slightly more efficient adds -up quickly. - -### Why aren't `Logger` and `SugaredLogger` interfaces? - -Unlike the familiar `io.Writer` and `http.Handler`, `Logger` and -`SugaredLogger` interfaces would include *many* methods. As [Rob Pike points -out][go-proverbs], "The bigger the interface, the weaker the abstraction." -Interfaces are also rigid — *any* change requires releasing a new major -version, since it breaks all third-party implementations. - -Making the `Logger` and `SugaredLogger` concrete types doesn't sacrifice much -abstraction, and it lets us add methods without introducing breaking changes. -Your applications should define and depend upon an interface that includes -just the methods you use. - -### Why are some of my logs missing? - -Logs are dropped intentionally by zap when sampling is enabled. The production -configuration (as returned by `NewProductionConfig()` enables sampling which will -cause repeated logs within a second to be sampled. See more details on why sampling -is enabled in [Why sample application logs](https://github.com/uber-go/zap/blob/master/FAQ.md#why-sample-application-logs). - -### Why sample application logs? - -Applications often experience runs of errors, either because of a bug or -because of a misbehaving user. Logging errors is usually a good idea, but it -can easily make this bad situation worse: not only is your application coping -with a flood of errors, it's also spending extra CPU cycles and I/O logging -those errors. Since writes are typically serialized, logging limits throughput -when you need it most. - -Sampling fixes this problem by dropping repetitive log entries. Under normal -conditions, your application writes out every entry. When similar entries are -logged hundreds or thousands of times each second, though, zap begins dropping -duplicates to preserve throughput. - -### Why do the structured logging APIs take a message in addition to fields? - -Subjectively, we find it helpful to accompany structured context with a brief -description. This isn't critical during development, but it makes debugging -and operating unfamiliar systems much easier. - -More concretely, zap's sampling algorithm uses the message to identify -duplicate entries. In our experience, this is a practical middle ground -between random sampling (which often drops the exact entry that you need while -debugging) and hashing the complete entry (which is prohibitively expensive). - -### Why include package-global loggers? - -Since so many other logging packages include a global logger, many -applications aren't designed to accept loggers as explicit parameters. -Changing function signatures is often a breaking change, so zap includes -global loggers to simplify migration. - -Avoid them where possible. - -### Why include dedicated Panic and Fatal log levels? - -In general, application code should handle errors gracefully instead of using -`panic` or `os.Exit`. However, every rule has exceptions, and it's common to -crash when an error is truly unrecoverable. To avoid losing any information -— especially the reason for the crash — the logger must flush any -buffered entries before the process exits. - -Zap makes this easy by offering `Panic` and `Fatal` logging methods that -automatically flush before exiting. Of course, this doesn't guarantee that -logs will never be lost, but it eliminates a common error. - -See the discussion in uber-go/zap#207 for more details. - -### What's `DPanic`? - -`DPanic` stands for "panic in development." In development, it logs at -`PanicLevel`; otherwise, it logs at `ErrorLevel`. `DPanic` makes it easier to -catch errors that are theoretically possible, but shouldn't actually happen, -*without* crashing in production. - -If you've ever written code like this, you need `DPanic`: - -```go -if err != nil { - panic(fmt.Sprintf("shouldn't ever get here: %v", err)) -} -``` - -## Installation - -### What does the error `expects import "go.uber.org/zap"` mean? - -Either zap was installed incorrectly or you're referencing the wrong package -name in your code. - -Zap's source code happens to be hosted on GitHub, but the [import -path][import-path] is `go.uber.org/zap`. This gives us, the project -maintainers, the freedom to move the source code if necessary. However, it -means that you need to take a little care when installing and using the -package. - -If you follow two simple rules, everything should work: install zap with `go -get -u go.uber.org/zap`, and always import it in your code with `import -"go.uber.org/zap"`. Your code shouldn't contain *any* references to -`github.com/uber-go/zap`. - -## Usage - -### Does zap support log rotation? - -Zap doesn't natively support rotating log files, since we prefer to leave this -to an external program like `logrotate`. - -However, it's easy to integrate a log rotation package like -[`gopkg.in/natefinch/lumberjack.v2`][lumberjack] as a `zapcore.WriteSyncer`. - -```go -// lumberjack.Logger is already safe for concurrent use, so we don't need to -// lock it. -w := zapcore.AddSync(&lumberjack.Logger{ - Filename: "/var/log/myapp/foo.log", - MaxSize: 500, // megabytes - MaxBackups: 3, - MaxAge: 28, // days -}) -core := zapcore.NewCore( - zapcore.NewJSONEncoder(zap.NewProductionEncoderConfig()), - w, - zap.InfoLevel, -) -logger := zap.New(core) -``` - -## Extensions - -We'd love to support every logging need within zap itself, but we're only -familiar with a handful of log ingestion systems, flag-parsing packages, and -the like. Rather than merging code that we can't effectively debug and -support, we'd rather grow an ecosystem of zap extensions. - -We're aware of the following extensions, but haven't used them ourselves: - -| Package | Integration | -| --- | --- | -| `github.com/tchap/zapext` | Sentry, syslog | -| `github.com/fgrosse/zaptest` | Ginkgo | -| `github.com/blendle/zapdriver` | Stackdriver | -| `github.com/moul/zapgorm` | Gorm | -| `github.com/moul/zapfilter` | Advanced filtering rules | - -[go-proverbs]: https://go-proverbs.github.io/ -[import-path]: https://golang.org/cmd/go/#hdr-Remote_import_paths -[lumberjack]: https://godoc.org/gopkg.in/natefinch/lumberjack.v2 diff --git a/vendor/go.uber.org/zap/LICENSE.txt b/vendor/go.uber.org/zap/LICENSE.txt deleted file mode 100644 index 6652bed45f4..00000000000 --- a/vendor/go.uber.org/zap/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016-2017 Uber Technologies, Inc. - -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/go.uber.org/zap/Makefile b/vendor/go.uber.org/zap/Makefile deleted file mode 100644 index eb1cee53bd5..00000000000 --- a/vendor/go.uber.org/zap/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# Directory containing the Makefile. -PROJECT_ROOT = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) - -export GOBIN ?= $(PROJECT_ROOT)/bin -export PATH := $(GOBIN):$(PATH) - -GOVULNCHECK = $(GOBIN)/govulncheck -BENCH_FLAGS ?= -cpuprofile=cpu.pprof -memprofile=mem.pprof -benchmem - -# Directories containing independent Go modules. -MODULE_DIRS = . ./exp ./benchmarks ./zapgrpc/internal/test - -# Directories that we want to track coverage for. -COVER_DIRS = . ./exp - -.PHONY: all -all: lint test - -.PHONY: lint -lint: golangci-lint tidy-lint license-lint - -.PHONY: golangci-lint -golangci-lint: - @$(foreach mod,$(MODULE_DIRS), \ - (cd $(mod) && \ - echo "[lint] golangci-lint: $(mod)" && \ - golangci-lint run --path-prefix $(mod)) &&) true - -.PHONY: tidy -tidy: - @$(foreach dir,$(MODULE_DIRS), \ - (cd $(dir) && go mod tidy) &&) true - -.PHONY: tidy-lint -tidy-lint: - @$(foreach mod,$(MODULE_DIRS), \ - (cd $(mod) && \ - echo "[lint] tidy: $(mod)" && \ - go mod tidy && \ - git diff --exit-code -- go.mod go.sum) &&) true - - -.PHONY: license-lint -license-lint: - ./checklicense.sh - -$(GOVULNCHECK): - cd tools && go install golang.org/x/vuln/cmd/govulncheck - -.PHONY: test -test: - @$(foreach dir,$(MODULE_DIRS),(cd $(dir) && go test -race ./...) &&) true - -.PHONY: cover -cover: - @$(foreach dir,$(COVER_DIRS), ( \ - cd $(dir) && \ - go test -race -coverprofile=cover.out -coverpkg=./... ./... \ - && go tool cover -html=cover.out -o cover.html) &&) true - -.PHONY: bench -BENCH ?= . -bench: - @$(foreach dir,$(MODULE_DIRS), ( \ - cd $(dir) && \ - go list ./... | xargs -n1 go test -bench=$(BENCH) -run="^$$" $(BENCH_FLAGS) \ - ) &&) true - -.PHONY: updatereadme -updatereadme: - rm -f README.md - cat .readme.tmpl | go run internal/readme/readme.go > README.md - -.PHONY: vulncheck -vulncheck: $(GOVULNCHECK) - $(GOVULNCHECK) ./... diff --git a/vendor/go.uber.org/zap/README.md b/vendor/go.uber.org/zap/README.md deleted file mode 100644 index 9de08927be9..00000000000 --- a/vendor/go.uber.org/zap/README.md +++ /dev/null @@ -1,137 +0,0 @@ -# :zap: zap [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] - -Blazing fast, structured, leveled logging in Go. - -## Installation - -`go get -u go.uber.org/zap` - -Note that zap only supports the two most recent minor versions of Go. - -## Quick Start - -In contexts where performance is nice, but not critical, use the -`SugaredLogger`. It's 4-10x faster than other structured logging -packages and includes both structured and `printf`-style APIs. - -```go -logger, _ := zap.NewProduction() -defer logger.Sync() // flushes buffer, if any -sugar := logger.Sugar() -sugar.Infow("failed to fetch URL", - // Structured context as loosely typed key-value pairs. - "url", url, - "attempt", 3, - "backoff", time.Second, -) -sugar.Infof("Failed to fetch URL: %s", url) -``` - -When performance and type safety are critical, use the `Logger`. It's even -faster than the `SugaredLogger` and allocates far less, but it only supports -structured logging. - -```go -logger, _ := zap.NewProduction() -defer logger.Sync() -logger.Info("failed to fetch URL", - // Structured context as strongly typed Field values. - zap.String("url", url), - zap.Int("attempt", 3), - zap.Duration("backoff", time.Second), -) -``` - -See the [documentation][doc] and [FAQ](FAQ.md) for more details. - -## Performance - -For applications that log in the hot path, reflection-based serialization and -string formatting are prohibitively expensive — they're CPU-intensive -and make many small allocations. Put differently, using `encoding/json` and -`fmt.Fprintf` to log tons of `interface{}`s makes your application slow. - -Zap takes a different approach. It includes a reflection-free, zero-allocation -JSON encoder, and the base `Logger` strives to avoid serialization overhead -and allocations wherever possible. By building the high-level `SugaredLogger` -on that foundation, zap lets users *choose* when they need to count every -allocation and when they'd prefer a more familiar, loosely typed API. - -As measured by its own [benchmarking suite][], not only is zap more performant -than comparable structured logging packages — it's also faster than the -standard library. Like all benchmarks, take these with a grain of salt.[1](#footnote-versions) - -Log a message and 10 fields: - -| Package | Time | Time % to zap | Objects Allocated | -| :------ | :--: | :-----------: | :---------------: | -| :zap: zap | 1744 ns/op | +0% | 5 allocs/op -| :zap: zap (sugared) | 2483 ns/op | +42% | 10 allocs/op -| zerolog | 918 ns/op | -47% | 1 allocs/op -| go-kit | 5590 ns/op | +221% | 57 allocs/op -| slog | 5640 ns/op | +223% | 40 allocs/op -| apex/log | 21184 ns/op | +1115% | 63 allocs/op -| logrus | 24338 ns/op | +1296% | 79 allocs/op -| log15 | 26054 ns/op | +1394% | 74 allocs/op - -Log a message with a logger that already has 10 fields of context: - -| Package | Time | Time % to zap | Objects Allocated | -| :------ | :--: | :-----------: | :---------------: | -| :zap: zap | 193 ns/op | +0% | 0 allocs/op -| :zap: zap (sugared) | 227 ns/op | +18% | 1 allocs/op -| zerolog | 81 ns/op | -58% | 0 allocs/op -| slog | 322 ns/op | +67% | 0 allocs/op -| go-kit | 5377 ns/op | +2686% | 56 allocs/op -| apex/log | 19518 ns/op | +10013% | 53 allocs/op -| log15 | 19812 ns/op | +10165% | 70 allocs/op -| logrus | 21997 ns/op | +11297% | 68 allocs/op - -Log a static string, without any context or `printf`-style templating: - -| Package | Time | Time % to zap | Objects Allocated | -| :------ | :--: | :-----------: | :---------------: | -| :zap: zap | 165 ns/op | +0% | 0 allocs/op -| :zap: zap (sugared) | 212 ns/op | +28% | 1 allocs/op -| zerolog | 95 ns/op | -42% | 0 allocs/op -| slog | 296 ns/op | +79% | 0 allocs/op -| go-kit | 415 ns/op | +152% | 9 allocs/op -| standard library | 422 ns/op | +156% | 2 allocs/op -| apex/log | 1601 ns/op | +870% | 5 allocs/op -| logrus | 3017 ns/op | +1728% | 23 allocs/op -| log15 | 3469 ns/op | +2002% | 20 allocs/op - -## Development Status: Stable - -All APIs are finalized, and no breaking changes will be made in the 1.x series -of releases. Users of semver-aware dependency management systems should pin -zap to `^1`. - -## Contributing - -We encourage and support an active, healthy community of contributors — -including you! Details are in the [contribution guide](CONTRIBUTING.md) and -the [code of conduct](CODE_OF_CONDUCT.md). The zap maintainers keep an eye on -issues and pull requests, but you can also report any negative conduct to -oss-conduct@uber.com. That email list is a private, safe space; even the zap -maintainers don't have access, so don't hesitate to hold us to a high -standard. - -
- -Released under the [MIT License](LICENSE.txt). - -1 In particular, keep in mind that we may be -benchmarking against slightly older versions of other packages. Versions are -pinned in the [benchmarks/go.mod][] file. [↩](#anchor-versions) - -[doc-img]: https://pkg.go.dev/badge/go.uber.org/zap -[doc]: https://pkg.go.dev/go.uber.org/zap -[ci-img]: https://github.com/uber-go/zap/actions/workflows/go.yml/badge.svg -[ci]: https://github.com/uber-go/zap/actions/workflows/go.yml -[cov-img]: https://codecov.io/gh/uber-go/zap/branch/master/graph/badge.svg -[cov]: https://codecov.io/gh/uber-go/zap -[benchmarking suite]: https://github.com/uber-go/zap/tree/master/benchmarks -[benchmarks/go.mod]: https://github.com/uber-go/zap/blob/master/benchmarks/go.mod - diff --git a/vendor/go.uber.org/zap/array.go b/vendor/go.uber.org/zap/array.go deleted file mode 100644 index abfccb566d5..00000000000 --- a/vendor/go.uber.org/zap/array.go +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "fmt" - "time" - - "go.uber.org/zap/zapcore" -) - -// Array constructs a field with the given key and ArrayMarshaler. It provides -// a flexible, but still type-safe and efficient, way to add array-like types -// to the logging context. The struct's MarshalLogArray method is called lazily. -func Array(key string, val zapcore.ArrayMarshaler) Field { - return Field{Key: key, Type: zapcore.ArrayMarshalerType, Interface: val} -} - -// Bools constructs a field that carries a slice of bools. -func Bools(key string, bs []bool) Field { - return Array(key, bools(bs)) -} - -// ByteStrings constructs a field that carries a slice of []byte, each of which -// must be UTF-8 encoded text. -func ByteStrings(key string, bss [][]byte) Field { - return Array(key, byteStringsArray(bss)) -} - -// Complex128s constructs a field that carries a slice of complex numbers. -func Complex128s(key string, nums []complex128) Field { - return Array(key, complex128s(nums)) -} - -// Complex64s constructs a field that carries a slice of complex numbers. -func Complex64s(key string, nums []complex64) Field { - return Array(key, complex64s(nums)) -} - -// Durations constructs a field that carries a slice of time.Durations. -func Durations(key string, ds []time.Duration) Field { - return Array(key, durations(ds)) -} - -// Float64s constructs a field that carries a slice of floats. -func Float64s(key string, nums []float64) Field { - return Array(key, float64s(nums)) -} - -// Float32s constructs a field that carries a slice of floats. -func Float32s(key string, nums []float32) Field { - return Array(key, float32s(nums)) -} - -// Ints constructs a field that carries a slice of integers. -func Ints(key string, nums []int) Field { - return Array(key, ints(nums)) -} - -// Int64s constructs a field that carries a slice of integers. -func Int64s(key string, nums []int64) Field { - return Array(key, int64s(nums)) -} - -// Int32s constructs a field that carries a slice of integers. -func Int32s(key string, nums []int32) Field { - return Array(key, int32s(nums)) -} - -// Int16s constructs a field that carries a slice of integers. -func Int16s(key string, nums []int16) Field { - return Array(key, int16s(nums)) -} - -// Int8s constructs a field that carries a slice of integers. -func Int8s(key string, nums []int8) Field { - return Array(key, int8s(nums)) -} - -// Objects constructs a field with the given key, holding a list of the -// provided objects that can be marshaled by Zap. -// -// Note that these objects must implement zapcore.ObjectMarshaler directly. -// That is, if you're trying to marshal a []Request, the MarshalLogObject -// method must be declared on the Request type, not its pointer (*Request). -// If it's on the pointer, use ObjectValues. -// -// Given an object that implements MarshalLogObject on the value receiver, you -// can log a slice of those objects with Objects like so: -// -// type Author struct{ ... } -// func (a Author) MarshalLogObject(enc zapcore.ObjectEncoder) error -// -// var authors []Author = ... -// logger.Info("loading article", zap.Objects("authors", authors)) -// -// Similarly, given a type that implements MarshalLogObject on its pointer -// receiver, you can log a slice of pointers to that object with Objects like -// so: -// -// type Request struct{ ... } -// func (r *Request) MarshalLogObject(enc zapcore.ObjectEncoder) error -// -// var requests []*Request = ... -// logger.Info("sending requests", zap.Objects("requests", requests)) -// -// If instead, you have a slice of values of such an object, use the -// ObjectValues constructor. -// -// var requests []Request = ... -// logger.Info("sending requests", zap.ObjectValues("requests", requests)) -func Objects[T zapcore.ObjectMarshaler](key string, values []T) Field { - return Array(key, objects[T](values)) -} - -type objects[T zapcore.ObjectMarshaler] []T - -func (os objects[T]) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for _, o := range os { - if err := arr.AppendObject(o); err != nil { - return err - } - } - return nil -} - -// ObjectMarshalerPtr is a constraint that specifies that the given type -// implements zapcore.ObjectMarshaler on a pointer receiver. -type ObjectMarshalerPtr[T any] interface { - *T - zapcore.ObjectMarshaler -} - -// ObjectValues constructs a field with the given key, holding a list of the -// provided objects, where pointers to these objects can be marshaled by Zap. -// -// Note that pointers to these objects must implement zapcore.ObjectMarshaler. -// That is, if you're trying to marshal a []Request, the MarshalLogObject -// method must be declared on the *Request type, not the value (Request). -// If it's on the value, use Objects. -// -// Given an object that implements MarshalLogObject on the pointer receiver, -// you can log a slice of those objects with ObjectValues like so: -// -// type Request struct{ ... } -// func (r *Request) MarshalLogObject(enc zapcore.ObjectEncoder) error -// -// var requests []Request = ... -// logger.Info("sending requests", zap.ObjectValues("requests", requests)) -// -// If instead, you have a slice of pointers of such an object, use the Objects -// field constructor. -// -// var requests []*Request = ... -// logger.Info("sending requests", zap.Objects("requests", requests)) -func ObjectValues[T any, P ObjectMarshalerPtr[T]](key string, values []T) Field { - return Array(key, objectValues[T, P](values)) -} - -type objectValues[T any, P ObjectMarshalerPtr[T]] []T - -func (os objectValues[T, P]) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range os { - // It is necessary for us to explicitly reference the "P" type. - // We cannot simply pass "&os[i]" to AppendObject because its type - // is "*T", which the type system does not consider as - // implementing ObjectMarshaler. - // Only the type "P" satisfies ObjectMarshaler, which we have - // to convert "*T" to explicitly. - var p P = &os[i] - if err := arr.AppendObject(p); err != nil { - return err - } - } - return nil -} - -// Strings constructs a field that carries a slice of strings. -func Strings(key string, ss []string) Field { - return Array(key, stringArray(ss)) -} - -// Stringers constructs a field with the given key, holding a list of the -// output provided by the value's String method -// -// Given an object that implements String on the value receiver, you -// can log a slice of those objects with Objects like so: -// -// type Request struct{ ... } -// func (a Request) String() string -// -// var requests []Request = ... -// logger.Info("sending requests", zap.Stringers("requests", requests)) -// -// Note that these objects must implement fmt.Stringer directly. -// That is, if you're trying to marshal a []Request, the String method -// must be declared on the Request type, not its pointer (*Request). -func Stringers[T fmt.Stringer](key string, values []T) Field { - return Array(key, stringers[T](values)) -} - -type stringers[T fmt.Stringer] []T - -func (os stringers[T]) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for _, o := range os { - arr.AppendString(o.String()) - } - return nil -} - -// Times constructs a field that carries a slice of time.Times. -func Times(key string, ts []time.Time) Field { - return Array(key, times(ts)) -} - -// Uints constructs a field that carries a slice of unsigned integers. -func Uints(key string, nums []uint) Field { - return Array(key, uints(nums)) -} - -// Uint64s constructs a field that carries a slice of unsigned integers. -func Uint64s(key string, nums []uint64) Field { - return Array(key, uint64s(nums)) -} - -// Uint32s constructs a field that carries a slice of unsigned integers. -func Uint32s(key string, nums []uint32) Field { - return Array(key, uint32s(nums)) -} - -// Uint16s constructs a field that carries a slice of unsigned integers. -func Uint16s(key string, nums []uint16) Field { - return Array(key, uint16s(nums)) -} - -// Uint8s constructs a field that carries a slice of unsigned integers. -func Uint8s(key string, nums []uint8) Field { - return Array(key, uint8s(nums)) -} - -// Uintptrs constructs a field that carries a slice of pointer addresses. -func Uintptrs(key string, us []uintptr) Field { - return Array(key, uintptrs(us)) -} - -// Errors constructs a field that carries a slice of errors. -func Errors(key string, errs []error) Field { - return Array(key, errArray(errs)) -} - -type bools []bool - -func (bs bools) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range bs { - arr.AppendBool(bs[i]) - } - return nil -} - -type byteStringsArray [][]byte - -func (bss byteStringsArray) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range bss { - arr.AppendByteString(bss[i]) - } - return nil -} - -type complex128s []complex128 - -func (nums complex128s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendComplex128(nums[i]) - } - return nil -} - -type complex64s []complex64 - -func (nums complex64s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendComplex64(nums[i]) - } - return nil -} - -type durations []time.Duration - -func (ds durations) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range ds { - arr.AppendDuration(ds[i]) - } - return nil -} - -type float64s []float64 - -func (nums float64s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendFloat64(nums[i]) - } - return nil -} - -type float32s []float32 - -func (nums float32s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendFloat32(nums[i]) - } - return nil -} - -type ints []int - -func (nums ints) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendInt(nums[i]) - } - return nil -} - -type int64s []int64 - -func (nums int64s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendInt64(nums[i]) - } - return nil -} - -type int32s []int32 - -func (nums int32s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendInt32(nums[i]) - } - return nil -} - -type int16s []int16 - -func (nums int16s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendInt16(nums[i]) - } - return nil -} - -type int8s []int8 - -func (nums int8s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendInt8(nums[i]) - } - return nil -} - -type stringArray []string - -func (ss stringArray) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range ss { - arr.AppendString(ss[i]) - } - return nil -} - -type times []time.Time - -func (ts times) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range ts { - arr.AppendTime(ts[i]) - } - return nil -} - -type uints []uint - -func (nums uints) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendUint(nums[i]) - } - return nil -} - -type uint64s []uint64 - -func (nums uint64s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendUint64(nums[i]) - } - return nil -} - -type uint32s []uint32 - -func (nums uint32s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendUint32(nums[i]) - } - return nil -} - -type uint16s []uint16 - -func (nums uint16s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendUint16(nums[i]) - } - return nil -} - -type uint8s []uint8 - -func (nums uint8s) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendUint8(nums[i]) - } - return nil -} - -type uintptrs []uintptr - -func (nums uintptrs) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range nums { - arr.AppendUintptr(nums[i]) - } - return nil -} diff --git a/vendor/go.uber.org/zap/buffer/buffer.go b/vendor/go.uber.org/zap/buffer/buffer.go deleted file mode 100644 index 27fb5cd5dab..00000000000 --- a/vendor/go.uber.org/zap/buffer/buffer.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -// Package buffer provides a thin wrapper around a byte slice. Unlike the -// standard library's bytes.Buffer, it supports a portion of the strconv -// package's zero-allocation formatters. -package buffer // import "go.uber.org/zap/buffer" - -import ( - "strconv" - "time" -) - -const _size = 1024 // by default, create 1 KiB buffers - -// Buffer is a thin wrapper around a byte slice. It's intended to be pooled, so -// the only way to construct one is via a Pool. -type Buffer struct { - bs []byte - pool Pool -} - -// AppendByte writes a single byte to the Buffer. -func (b *Buffer) AppendByte(v byte) { - b.bs = append(b.bs, v) -} - -// AppendBytes writes a single byte to the Buffer. -func (b *Buffer) AppendBytes(v []byte) { - b.bs = append(b.bs, v...) -} - -// AppendString writes a string to the Buffer. -func (b *Buffer) AppendString(s string) { - b.bs = append(b.bs, s...) -} - -// AppendInt appends an integer to the underlying buffer (assuming base 10). -func (b *Buffer) AppendInt(i int64) { - b.bs = strconv.AppendInt(b.bs, i, 10) -} - -// AppendTime appends the time formatted using the specified layout. -func (b *Buffer) AppendTime(t time.Time, layout string) { - b.bs = t.AppendFormat(b.bs, layout) -} - -// AppendUint appends an unsigned integer to the underlying buffer (assuming -// base 10). -func (b *Buffer) AppendUint(i uint64) { - b.bs = strconv.AppendUint(b.bs, i, 10) -} - -// AppendBool appends a bool to the underlying buffer. -func (b *Buffer) AppendBool(v bool) { - b.bs = strconv.AppendBool(b.bs, v) -} - -// AppendFloat appends a float to the underlying buffer. It doesn't quote NaN -// or +/- Inf. -func (b *Buffer) AppendFloat(f float64, bitSize int) { - b.bs = strconv.AppendFloat(b.bs, f, 'f', -1, bitSize) -} - -// Len returns the length of the underlying byte slice. -func (b *Buffer) Len() int { - return len(b.bs) -} - -// Cap returns the capacity of the underlying byte slice. -func (b *Buffer) Cap() int { - return cap(b.bs) -} - -// Bytes returns a mutable reference to the underlying byte slice. -func (b *Buffer) Bytes() []byte { - return b.bs -} - -// String returns a string copy of the underlying byte slice. -func (b *Buffer) String() string { - return string(b.bs) -} - -// Reset resets the underlying byte slice. Subsequent writes re-use the slice's -// backing array. -func (b *Buffer) Reset() { - b.bs = b.bs[:0] -} - -// Write implements io.Writer. -func (b *Buffer) Write(bs []byte) (int, error) { - b.bs = append(b.bs, bs...) - return len(bs), nil -} - -// WriteByte writes a single byte to the Buffer. -// -// Error returned is always nil, function signature is compatible -// with bytes.Buffer and bufio.Writer -func (b *Buffer) WriteByte(v byte) error { - b.AppendByte(v) - return nil -} - -// WriteString writes a string to the Buffer. -// -// Error returned is always nil, function signature is compatible -// with bytes.Buffer and bufio.Writer -func (b *Buffer) WriteString(s string) (int, error) { - b.AppendString(s) - return len(s), nil -} - -// TrimNewline trims any final "\n" byte from the end of the buffer. -func (b *Buffer) TrimNewline() { - if i := len(b.bs) - 1; i >= 0 { - if b.bs[i] == '\n' { - b.bs = b.bs[:i] - } - } -} - -// Free returns the Buffer to its Pool. -// -// Callers must not retain references to the Buffer after calling Free. -func (b *Buffer) Free() { - b.pool.put(b) -} diff --git a/vendor/go.uber.org/zap/buffer/pool.go b/vendor/go.uber.org/zap/buffer/pool.go deleted file mode 100644 index 846323360ee..00000000000 --- a/vendor/go.uber.org/zap/buffer/pool.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package buffer - -import ( - "go.uber.org/zap/internal/pool" -) - -// A Pool is a type-safe wrapper around a sync.Pool. -type Pool struct { - p *pool.Pool[*Buffer] -} - -// NewPool constructs a new Pool. -func NewPool() Pool { - return Pool{ - p: pool.New(func() *Buffer { - return &Buffer{ - bs: make([]byte, 0, _size), - } - }), - } -} - -// Get retrieves a Buffer from the pool, creating one if necessary. -func (p Pool) Get() *Buffer { - buf := p.p.Get() - buf.Reset() - buf.pool = p - return buf -} - -func (p Pool) put(buf *Buffer) { - p.p.Put(buf) -} diff --git a/vendor/go.uber.org/zap/checklicense.sh b/vendor/go.uber.org/zap/checklicense.sh deleted file mode 100644 index 345ac8b89ab..00000000000 --- a/vendor/go.uber.org/zap/checklicense.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -e - -ERROR_COUNT=0 -while read -r file -do - case "$(head -1 "${file}")" in - *"Copyright (c) "*" Uber Technologies, Inc.") - # everything's cool - ;; - *) - echo "$file is missing license header." - (( ERROR_COUNT++ )) - ;; - esac -done < <(git ls-files "*\.go") - -exit $ERROR_COUNT diff --git a/vendor/go.uber.org/zap/config.go b/vendor/go.uber.org/zap/config.go deleted file mode 100644 index e76e4e64fbe..00000000000 --- a/vendor/go.uber.org/zap/config.go +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "errors" - "sort" - "time" - - "go.uber.org/zap/zapcore" -) - -// SamplingConfig sets a sampling strategy for the logger. Sampling caps the -// global CPU and I/O load that logging puts on your process while attempting -// to preserve a representative subset of your logs. -// -// If specified, the Sampler will invoke the Hook after each decision. -// -// Values configured here are per-second. See zapcore.NewSamplerWithOptions for -// details. -type SamplingConfig struct { - Initial int `json:"initial" yaml:"initial"` - Thereafter int `json:"thereafter" yaml:"thereafter"` - Hook func(zapcore.Entry, zapcore.SamplingDecision) `json:"-" yaml:"-"` -} - -// Config offers a declarative way to construct a logger. It doesn't do -// anything that can't be done with New, Options, and the various -// zapcore.WriteSyncer and zapcore.Core wrappers, but it's a simpler way to -// toggle common options. -// -// Note that Config intentionally supports only the most common options. More -// unusual logging setups (logging to network connections or message queues, -// splitting output between multiple files, etc.) are possible, but require -// direct use of the zapcore package. For sample code, see the package-level -// BasicConfiguration and AdvancedConfiguration examples. -// -// For an example showing runtime log level changes, see the documentation for -// AtomicLevel. -type Config struct { - // Level is the minimum enabled logging level. Note that this is a dynamic - // level, so calling Config.Level.SetLevel will atomically change the log - // level of all loggers descended from this config. - Level AtomicLevel `json:"level" yaml:"level"` - // Development puts the logger in development mode, which changes the - // behavior of DPanicLevel and takes stacktraces more liberally. - Development bool `json:"development" yaml:"development"` - // DisableCaller stops annotating logs with the calling function's file - // name and line number. By default, all logs are annotated. - DisableCaller bool `json:"disableCaller" yaml:"disableCaller"` - // DisableStacktrace completely disables automatic stacktrace capturing. By - // default, stacktraces are captured for WarnLevel and above logs in - // development and ErrorLevel and above in production. - DisableStacktrace bool `json:"disableStacktrace" yaml:"disableStacktrace"` - // Sampling sets a sampling policy. A nil SamplingConfig disables sampling. - Sampling *SamplingConfig `json:"sampling" yaml:"sampling"` - // Encoding sets the logger's encoding. Valid values are "json" and - // "console", as well as any third-party encodings registered via - // RegisterEncoder. - Encoding string `json:"encoding" yaml:"encoding"` - // EncoderConfig sets options for the chosen encoder. See - // zapcore.EncoderConfig for details. - EncoderConfig zapcore.EncoderConfig `json:"encoderConfig" yaml:"encoderConfig"` - // OutputPaths is a list of URLs or file paths to write logging output to. - // See Open for details. - OutputPaths []string `json:"outputPaths" yaml:"outputPaths"` - // ErrorOutputPaths is a list of URLs to write internal logger errors to. - // The default is standard error. - // - // Note that this setting only affects internal errors; for sample code that - // sends error-level logs to a different location from info- and debug-level - // logs, see the package-level AdvancedConfiguration example. - ErrorOutputPaths []string `json:"errorOutputPaths" yaml:"errorOutputPaths"` - // InitialFields is a collection of fields to add to the root logger. - InitialFields map[string]interface{} `json:"initialFields" yaml:"initialFields"` -} - -// NewProductionEncoderConfig returns an opinionated EncoderConfig for -// production environments. -// -// Messages encoded with this configuration will be JSON-formatted -// and will have the following keys by default: -// -// - "level": The logging level (e.g. "info", "error"). -// - "ts": The current time in number of seconds since the Unix epoch. -// - "msg": The message passed to the log statement. -// - "caller": If available, a short path to the file and line number -// where the log statement was issued. -// The logger configuration determines whether this field is captured. -// - "stacktrace": If available, a stack trace from the line -// where the log statement was issued. -// The logger configuration determines whether this field is captured. -// -// By default, the following formats are used for different types: -// -// - Time is formatted as floating-point number of seconds since the Unix -// epoch. -// - Duration is formatted as floating-point number of seconds. -// -// You may change these by setting the appropriate fields in the returned -// object. -// For example, use the following to change the time encoding format: -// -// cfg := zap.NewProductionEncoderConfig() -// cfg.EncodeTime = zapcore.ISO8601TimeEncoder -func NewProductionEncoderConfig() zapcore.EncoderConfig { - return zapcore.EncoderConfig{ - TimeKey: "ts", - LevelKey: "level", - NameKey: "logger", - CallerKey: "caller", - FunctionKey: zapcore.OmitKey, - MessageKey: "msg", - StacktraceKey: "stacktrace", - LineEnding: zapcore.DefaultLineEnding, - EncodeLevel: zapcore.LowercaseLevelEncoder, - EncodeTime: zapcore.EpochTimeEncoder, - EncodeDuration: zapcore.SecondsDurationEncoder, - EncodeCaller: zapcore.ShortCallerEncoder, - } -} - -// NewProductionConfig builds a reasonable default production logging -// configuration. -// Logging is enabled at InfoLevel and above, and uses a JSON encoder. -// Logs are written to standard error. -// Stacktraces are included on logs of ErrorLevel and above. -// DPanicLevel logs will not panic, but will write a stacktrace. -// -// Sampling is enabled at 100:100 by default, -// meaning that after the first 100 log entries -// with the same level and message in the same second, -// it will log every 100th entry -// with the same level and message in the same second. -// You may disable this behavior by setting Sampling to nil. -// -// See [NewProductionEncoderConfig] for information -// on the default encoder configuration. -func NewProductionConfig() Config { - return Config{ - Level: NewAtomicLevelAt(InfoLevel), - Development: false, - Sampling: &SamplingConfig{ - Initial: 100, - Thereafter: 100, - }, - Encoding: "json", - EncoderConfig: NewProductionEncoderConfig(), - OutputPaths: []string{"stderr"}, - ErrorOutputPaths: []string{"stderr"}, - } -} - -// NewDevelopmentEncoderConfig returns an opinionated EncoderConfig for -// development environments. -// -// Messages encoded with this configuration will use Zap's console encoder -// intended to print human-readable output. -// It will print log messages with the following information: -// -// - The log level (e.g. "INFO", "ERROR"). -// - The time in ISO8601 format (e.g. "2017-01-01T12:00:00Z"). -// - The message passed to the log statement. -// - If available, a short path to the file and line number -// where the log statement was issued. -// The logger configuration determines whether this field is captured. -// - If available, a stacktrace from the line -// where the log statement was issued. -// The logger configuration determines whether this field is captured. -// -// By default, the following formats are used for different types: -// -// - Time is formatted in ISO8601 format (e.g. "2017-01-01T12:00:00Z"). -// - Duration is formatted as a string (e.g. "1.234s"). -// -// You may change these by setting the appropriate fields in the returned -// object. -// For example, use the following to change the time encoding format: -// -// cfg := zap.NewDevelopmentEncoderConfig() -// cfg.EncodeTime = zapcore.ISO8601TimeEncoder -func NewDevelopmentEncoderConfig() zapcore.EncoderConfig { - return zapcore.EncoderConfig{ - // Keys can be anything except the empty string. - TimeKey: "T", - LevelKey: "L", - NameKey: "N", - CallerKey: "C", - FunctionKey: zapcore.OmitKey, - MessageKey: "M", - StacktraceKey: "S", - LineEnding: zapcore.DefaultLineEnding, - EncodeLevel: zapcore.CapitalLevelEncoder, - EncodeTime: zapcore.ISO8601TimeEncoder, - EncodeDuration: zapcore.StringDurationEncoder, - EncodeCaller: zapcore.ShortCallerEncoder, - } -} - -// NewDevelopmentConfig builds a reasonable default development logging -// configuration. -// Logging is enabled at DebugLevel and above, and uses a console encoder. -// Logs are written to standard error. -// Stacktraces are included on logs of WarnLevel and above. -// DPanicLevel logs will panic. -// -// See [NewDevelopmentEncoderConfig] for information -// on the default encoder configuration. -func NewDevelopmentConfig() Config { - return Config{ - Level: NewAtomicLevelAt(DebugLevel), - Development: true, - Encoding: "console", - EncoderConfig: NewDevelopmentEncoderConfig(), - OutputPaths: []string{"stderr"}, - ErrorOutputPaths: []string{"stderr"}, - } -} - -// Build constructs a logger from the Config and Options. -func (cfg Config) Build(opts ...Option) (*Logger, error) { - enc, err := cfg.buildEncoder() - if err != nil { - return nil, err - } - - sink, errSink, err := cfg.openSinks() - if err != nil { - return nil, err - } - - if cfg.Level == (AtomicLevel{}) { - return nil, errors.New("missing Level") - } - - log := New( - zapcore.NewCore(enc, sink, cfg.Level), - cfg.buildOptions(errSink)..., - ) - if len(opts) > 0 { - log = log.WithOptions(opts...) - } - return log, nil -} - -func (cfg Config) buildOptions(errSink zapcore.WriteSyncer) []Option { - opts := []Option{ErrorOutput(errSink)} - - if cfg.Development { - opts = append(opts, Development()) - } - - if !cfg.DisableCaller { - opts = append(opts, AddCaller()) - } - - stackLevel := ErrorLevel - if cfg.Development { - stackLevel = WarnLevel - } - if !cfg.DisableStacktrace { - opts = append(opts, AddStacktrace(stackLevel)) - } - - if scfg := cfg.Sampling; scfg != nil { - opts = append(opts, WrapCore(func(core zapcore.Core) zapcore.Core { - var samplerOpts []zapcore.SamplerOption - if scfg.Hook != nil { - samplerOpts = append(samplerOpts, zapcore.SamplerHook(scfg.Hook)) - } - return zapcore.NewSamplerWithOptions( - core, - time.Second, - cfg.Sampling.Initial, - cfg.Sampling.Thereafter, - samplerOpts..., - ) - })) - } - - if len(cfg.InitialFields) > 0 { - fs := make([]Field, 0, len(cfg.InitialFields)) - keys := make([]string, 0, len(cfg.InitialFields)) - for k := range cfg.InitialFields { - keys = append(keys, k) - } - sort.Strings(keys) - for _, k := range keys { - fs = append(fs, Any(k, cfg.InitialFields[k])) - } - opts = append(opts, Fields(fs...)) - } - - return opts -} - -func (cfg Config) openSinks() (zapcore.WriteSyncer, zapcore.WriteSyncer, error) { - sink, closeOut, err := Open(cfg.OutputPaths...) - if err != nil { - return nil, nil, err - } - errSink, _, err := Open(cfg.ErrorOutputPaths...) - if err != nil { - closeOut() - return nil, nil, err - } - return sink, errSink, nil -} - -func (cfg Config) buildEncoder() (zapcore.Encoder, error) { - return newEncoder(cfg.Encoding, cfg.EncoderConfig) -} diff --git a/vendor/go.uber.org/zap/doc.go b/vendor/go.uber.org/zap/doc.go deleted file mode 100644 index 3c50d7b4d3f..00000000000 --- a/vendor/go.uber.org/zap/doc.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -// Package zap provides fast, structured, leveled logging. -// -// For applications that log in the hot path, reflection-based serialization -// and string formatting are prohibitively expensive - they're CPU-intensive -// and make many small allocations. Put differently, using json.Marshal and -// fmt.Fprintf to log tons of interface{} makes your application slow. -// -// Zap takes a different approach. It includes a reflection-free, -// zero-allocation JSON encoder, and the base Logger strives to avoid -// serialization overhead and allocations wherever possible. By building the -// high-level SugaredLogger on that foundation, zap lets users choose when -// they need to count every allocation and when they'd prefer a more familiar, -// loosely typed API. -// -// # Choosing a Logger -// -// In contexts where performance is nice, but not critical, use the -// SugaredLogger. It's 4-10x faster than other structured logging packages and -// supports both structured and printf-style logging. Like log15 and go-kit, -// the SugaredLogger's structured logging APIs are loosely typed and accept a -// variadic number of key-value pairs. (For more advanced use cases, they also -// accept strongly typed fields - see the SugaredLogger.With documentation for -// details.) -// -// sugar := zap.NewExample().Sugar() -// defer sugar.Sync() -// sugar.Infow("failed to fetch URL", -// "url", "http://example.com", -// "attempt", 3, -// "backoff", time.Second, -// ) -// sugar.Infof("failed to fetch URL: %s", "http://example.com") -// -// By default, loggers are unbuffered. However, since zap's low-level APIs -// allow buffering, calling Sync before letting your process exit is a good -// habit. -// -// In the rare contexts where every microsecond and every allocation matter, -// use the Logger. It's even faster than the SugaredLogger and allocates far -// less, but it only supports strongly-typed, structured logging. -// -// logger := zap.NewExample() -// defer logger.Sync() -// logger.Info("failed to fetch URL", -// zap.String("url", "http://example.com"), -// zap.Int("attempt", 3), -// zap.Duration("backoff", time.Second), -// ) -// -// Choosing between the Logger and SugaredLogger doesn't need to be an -// application-wide decision: converting between the two is simple and -// inexpensive. -// -// logger := zap.NewExample() -// defer logger.Sync() -// sugar := logger.Sugar() -// plain := sugar.Desugar() -// -// # Configuring Zap -// -// The simplest way to build a Logger is to use zap's opinionated presets: -// NewExample, NewProduction, and NewDevelopment. These presets build a logger -// with a single function call: -// -// logger, err := zap.NewProduction() -// if err != nil { -// log.Fatalf("can't initialize zap logger: %v", err) -// } -// defer logger.Sync() -// -// Presets are fine for small projects, but larger projects and organizations -// naturally require a bit more customization. For most users, zap's Config -// struct strikes the right balance between flexibility and convenience. See -// the package-level BasicConfiguration example for sample code. -// -// More unusual configurations (splitting output between files, sending logs -// to a message queue, etc.) are possible, but require direct use of -// go.uber.org/zap/zapcore. See the package-level AdvancedConfiguration -// example for sample code. -// -// # Extending Zap -// -// The zap package itself is a relatively thin wrapper around the interfaces -// in go.uber.org/zap/zapcore. Extending zap to support a new encoding (e.g., -// BSON), a new log sink (e.g., Kafka), or something more exotic (perhaps an -// exception aggregation service, like Sentry or Rollbar) typically requires -// implementing the zapcore.Encoder, zapcore.WriteSyncer, or zapcore.Core -// interfaces. See the zapcore documentation for details. -// -// Similarly, package authors can use the high-performance Encoder and Core -// implementations in the zapcore package to build their own loggers. -// -// # Frequently Asked Questions -// -// An FAQ covering everything from installation errors to design decisions is -// available at https://github.com/uber-go/zap/blob/master/FAQ.md. -package zap // import "go.uber.org/zap" diff --git a/vendor/go.uber.org/zap/encoder.go b/vendor/go.uber.org/zap/encoder.go deleted file mode 100644 index caa04ceefd8..00000000000 --- a/vendor/go.uber.org/zap/encoder.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "errors" - "fmt" - "sync" - - "go.uber.org/zap/zapcore" -) - -var ( - errNoEncoderNameSpecified = errors.New("no encoder name specified") - - _encoderNameToConstructor = map[string]func(zapcore.EncoderConfig) (zapcore.Encoder, error){ - "console": func(encoderConfig zapcore.EncoderConfig) (zapcore.Encoder, error) { - return zapcore.NewConsoleEncoder(encoderConfig), nil - }, - "json": func(encoderConfig zapcore.EncoderConfig) (zapcore.Encoder, error) { - return zapcore.NewJSONEncoder(encoderConfig), nil - }, - } - _encoderMutex sync.RWMutex -) - -// RegisterEncoder registers an encoder constructor, which the Config struct -// can then reference. By default, the "json" and "console" encoders are -// registered. -// -// Attempting to register an encoder whose name is already taken returns an -// error. -func RegisterEncoder(name string, constructor func(zapcore.EncoderConfig) (zapcore.Encoder, error)) error { - _encoderMutex.Lock() - defer _encoderMutex.Unlock() - if name == "" { - return errNoEncoderNameSpecified - } - if _, ok := _encoderNameToConstructor[name]; ok { - return fmt.Errorf("encoder already registered for name %q", name) - } - _encoderNameToConstructor[name] = constructor - return nil -} - -func newEncoder(name string, encoderConfig zapcore.EncoderConfig) (zapcore.Encoder, error) { - if encoderConfig.TimeKey != "" && encoderConfig.EncodeTime == nil { - return nil, errors.New("missing EncodeTime in EncoderConfig") - } - - _encoderMutex.RLock() - defer _encoderMutex.RUnlock() - if name == "" { - return nil, errNoEncoderNameSpecified - } - constructor, ok := _encoderNameToConstructor[name] - if !ok { - return nil, fmt.Errorf("no encoder registered for name %q", name) - } - return constructor(encoderConfig) -} diff --git a/vendor/go.uber.org/zap/error.go b/vendor/go.uber.org/zap/error.go deleted file mode 100644 index 45f7b838dc1..00000000000 --- a/vendor/go.uber.org/zap/error.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2017 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "go.uber.org/zap/internal/pool" - "go.uber.org/zap/zapcore" -) - -var _errArrayElemPool = pool.New(func() *errArrayElem { - return &errArrayElem{} -}) - -// Error is shorthand for the common idiom NamedError("error", err). -func Error(err error) Field { - return NamedError("error", err) -} - -// NamedError constructs a field that lazily stores err.Error() under the -// provided key. Errors which also implement fmt.Formatter (like those produced -// by github.com/pkg/errors) will also have their verbose representation stored -// under key+"Verbose". If passed a nil error, the field is a no-op. -// -// For the common case in which the key is simply "error", the Error function -// is shorter and less repetitive. -func NamedError(key string, err error) Field { - if err == nil { - return Skip() - } - return Field{Key: key, Type: zapcore.ErrorType, Interface: err} -} - -type errArray []error - -func (errs errArray) MarshalLogArray(arr zapcore.ArrayEncoder) error { - for i := range errs { - if errs[i] == nil { - continue - } - // To represent each error as an object with an "error" attribute and - // potentially an "errorVerbose" attribute, we need to wrap it in a - // type that implements LogObjectMarshaler. To prevent this from - // allocating, pool the wrapper type. - elem := _errArrayElemPool.Get() - elem.error = errs[i] - err := arr.AppendObject(elem) - elem.error = nil - _errArrayElemPool.Put(elem) - if err != nil { - return err - } - } - return nil -} - -type errArrayElem struct { - error -} - -func (e *errArrayElem) MarshalLogObject(enc zapcore.ObjectEncoder) error { - // Re-use the error field's logic, which supports non-standard error types. - Error(e.error).AddTo(enc) - return nil -} diff --git a/vendor/go.uber.org/zap/field.go b/vendor/go.uber.org/zap/field.go deleted file mode 100644 index c8dd3358a9c..00000000000 --- a/vendor/go.uber.org/zap/field.go +++ /dev/null @@ -1,613 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "fmt" - "math" - "time" - - "go.uber.org/zap/internal/stacktrace" - "go.uber.org/zap/zapcore" -) - -// Field is an alias for Field. Aliasing this type dramatically -// improves the navigability of this package's API documentation. -type Field = zapcore.Field - -var ( - _minTimeInt64 = time.Unix(0, math.MinInt64) - _maxTimeInt64 = time.Unix(0, math.MaxInt64) -) - -// Skip constructs a no-op field, which is often useful when handling invalid -// inputs in other Field constructors. -func Skip() Field { - return Field{Type: zapcore.SkipType} -} - -// nilField returns a field which will marshal explicitly as nil. See motivation -// in https://github.com/uber-go/zap/issues/753 . If we ever make breaking -// changes and add zapcore.NilType and zapcore.ObjectEncoder.AddNil, the -// implementation here should be changed to reflect that. -func nilField(key string) Field { return Reflect(key, nil) } - -// Binary constructs a field that carries an opaque binary blob. -// -// Binary data is serialized in an encoding-appropriate format. For example, -// zap's JSON encoder base64-encodes binary blobs. To log UTF-8 encoded text, -// use ByteString. -func Binary(key string, val []byte) Field { - return Field{Key: key, Type: zapcore.BinaryType, Interface: val} -} - -// Bool constructs a field that carries a bool. -func Bool(key string, val bool) Field { - var ival int64 - if val { - ival = 1 - } - return Field{Key: key, Type: zapcore.BoolType, Integer: ival} -} - -// Boolp constructs a field that carries a *bool. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Boolp(key string, val *bool) Field { - if val == nil { - return nilField(key) - } - return Bool(key, *val) -} - -// ByteString constructs a field that carries UTF-8 encoded text as a []byte. -// To log opaque binary blobs (which aren't necessarily valid UTF-8), use -// Binary. -func ByteString(key string, val []byte) Field { - return Field{Key: key, Type: zapcore.ByteStringType, Interface: val} -} - -// Complex128 constructs a field that carries a complex number. Unlike most -// numeric fields, this costs an allocation (to convert the complex128 to -// interface{}). -func Complex128(key string, val complex128) Field { - return Field{Key: key, Type: zapcore.Complex128Type, Interface: val} -} - -// Complex128p constructs a field that carries a *complex128. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Complex128p(key string, val *complex128) Field { - if val == nil { - return nilField(key) - } - return Complex128(key, *val) -} - -// Complex64 constructs a field that carries a complex number. Unlike most -// numeric fields, this costs an allocation (to convert the complex64 to -// interface{}). -func Complex64(key string, val complex64) Field { - return Field{Key: key, Type: zapcore.Complex64Type, Interface: val} -} - -// Complex64p constructs a field that carries a *complex64. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Complex64p(key string, val *complex64) Field { - if val == nil { - return nilField(key) - } - return Complex64(key, *val) -} - -// Float64 constructs a field that carries a float64. The way the -// floating-point value is represented is encoder-dependent, so marshaling is -// necessarily lazy. -func Float64(key string, val float64) Field { - return Field{Key: key, Type: zapcore.Float64Type, Integer: int64(math.Float64bits(val))} -} - -// Float64p constructs a field that carries a *float64. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Float64p(key string, val *float64) Field { - if val == nil { - return nilField(key) - } - return Float64(key, *val) -} - -// Float32 constructs a field that carries a float32. The way the -// floating-point value is represented is encoder-dependent, so marshaling is -// necessarily lazy. -func Float32(key string, val float32) Field { - return Field{Key: key, Type: zapcore.Float32Type, Integer: int64(math.Float32bits(val))} -} - -// Float32p constructs a field that carries a *float32. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Float32p(key string, val *float32) Field { - if val == nil { - return nilField(key) - } - return Float32(key, *val) -} - -// Int constructs a field with the given key and value. -func Int(key string, val int) Field { - return Int64(key, int64(val)) -} - -// Intp constructs a field that carries a *int. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Intp(key string, val *int) Field { - if val == nil { - return nilField(key) - } - return Int(key, *val) -} - -// Int64 constructs a field with the given key and value. -func Int64(key string, val int64) Field { - return Field{Key: key, Type: zapcore.Int64Type, Integer: val} -} - -// Int64p constructs a field that carries a *int64. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Int64p(key string, val *int64) Field { - if val == nil { - return nilField(key) - } - return Int64(key, *val) -} - -// Int32 constructs a field with the given key and value. -func Int32(key string, val int32) Field { - return Field{Key: key, Type: zapcore.Int32Type, Integer: int64(val)} -} - -// Int32p constructs a field that carries a *int32. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Int32p(key string, val *int32) Field { - if val == nil { - return nilField(key) - } - return Int32(key, *val) -} - -// Int16 constructs a field with the given key and value. -func Int16(key string, val int16) Field { - return Field{Key: key, Type: zapcore.Int16Type, Integer: int64(val)} -} - -// Int16p constructs a field that carries a *int16. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Int16p(key string, val *int16) Field { - if val == nil { - return nilField(key) - } - return Int16(key, *val) -} - -// Int8 constructs a field with the given key and value. -func Int8(key string, val int8) Field { - return Field{Key: key, Type: zapcore.Int8Type, Integer: int64(val)} -} - -// Int8p constructs a field that carries a *int8. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Int8p(key string, val *int8) Field { - if val == nil { - return nilField(key) - } - return Int8(key, *val) -} - -// String constructs a field with the given key and value. -func String(key string, val string) Field { - return Field{Key: key, Type: zapcore.StringType, String: val} -} - -// Stringp constructs a field that carries a *string. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Stringp(key string, val *string) Field { - if val == nil { - return nilField(key) - } - return String(key, *val) -} - -// Uint constructs a field with the given key and value. -func Uint(key string, val uint) Field { - return Uint64(key, uint64(val)) -} - -// Uintp constructs a field that carries a *uint. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Uintp(key string, val *uint) Field { - if val == nil { - return nilField(key) - } - return Uint(key, *val) -} - -// Uint64 constructs a field with the given key and value. -func Uint64(key string, val uint64) Field { - return Field{Key: key, Type: zapcore.Uint64Type, Integer: int64(val)} -} - -// Uint64p constructs a field that carries a *uint64. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Uint64p(key string, val *uint64) Field { - if val == nil { - return nilField(key) - } - return Uint64(key, *val) -} - -// Uint32 constructs a field with the given key and value. -func Uint32(key string, val uint32) Field { - return Field{Key: key, Type: zapcore.Uint32Type, Integer: int64(val)} -} - -// Uint32p constructs a field that carries a *uint32. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Uint32p(key string, val *uint32) Field { - if val == nil { - return nilField(key) - } - return Uint32(key, *val) -} - -// Uint16 constructs a field with the given key and value. -func Uint16(key string, val uint16) Field { - return Field{Key: key, Type: zapcore.Uint16Type, Integer: int64(val)} -} - -// Uint16p constructs a field that carries a *uint16. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Uint16p(key string, val *uint16) Field { - if val == nil { - return nilField(key) - } - return Uint16(key, *val) -} - -// Uint8 constructs a field with the given key and value. -func Uint8(key string, val uint8) Field { - return Field{Key: key, Type: zapcore.Uint8Type, Integer: int64(val)} -} - -// Uint8p constructs a field that carries a *uint8. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Uint8p(key string, val *uint8) Field { - if val == nil { - return nilField(key) - } - return Uint8(key, *val) -} - -// Uintptr constructs a field with the given key and value. -func Uintptr(key string, val uintptr) Field { - return Field{Key: key, Type: zapcore.UintptrType, Integer: int64(val)} -} - -// Uintptrp constructs a field that carries a *uintptr. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Uintptrp(key string, val *uintptr) Field { - if val == nil { - return nilField(key) - } - return Uintptr(key, *val) -} - -// Reflect constructs a field with the given key and an arbitrary object. It uses -// an encoding-appropriate, reflection-based function to lazily serialize nearly -// any object into the logging context, but it's relatively slow and -// allocation-heavy. Outside tests, Any is always a better choice. -// -// If encoding fails (e.g., trying to serialize a map[int]string to JSON), Reflect -// includes the error message in the final log output. -func Reflect(key string, val interface{}) Field { - return Field{Key: key, Type: zapcore.ReflectType, Interface: val} -} - -// Namespace creates a named, isolated scope within the logger's context. All -// subsequent fields will be added to the new namespace. -// -// This helps prevent key collisions when injecting loggers into sub-components -// or third-party libraries. -func Namespace(key string) Field { - return Field{Key: key, Type: zapcore.NamespaceType} -} - -// Stringer constructs a field with the given key and the output of the value's -// String method. The Stringer's String method is called lazily. -func Stringer(key string, val fmt.Stringer) Field { - return Field{Key: key, Type: zapcore.StringerType, Interface: val} -} - -// Time constructs a Field with the given key and value. The encoder -// controls how the time is serialized. -func Time(key string, val time.Time) Field { - if val.Before(_minTimeInt64) || val.After(_maxTimeInt64) { - return Field{Key: key, Type: zapcore.TimeFullType, Interface: val} - } - return Field{Key: key, Type: zapcore.TimeType, Integer: val.UnixNano(), Interface: val.Location()} -} - -// Timep constructs a field that carries a *time.Time. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Timep(key string, val *time.Time) Field { - if val == nil { - return nilField(key) - } - return Time(key, *val) -} - -// Stack constructs a field that stores a stacktrace of the current goroutine -// under provided key. Keep in mind that taking a stacktrace is eager and -// expensive (relatively speaking); this function both makes an allocation and -// takes about two microseconds. -func Stack(key string) Field { - return StackSkip(key, 1) // skip Stack -} - -// StackSkip constructs a field similarly to Stack, but also skips the given -// number of frames from the top of the stacktrace. -func StackSkip(key string, skip int) Field { - // Returning the stacktrace as a string costs an allocation, but saves us - // from expanding the zapcore.Field union struct to include a byte slice. Since - // taking a stacktrace is already so expensive (~10us), the extra allocation - // is okay. - return String(key, stacktrace.Take(skip+1)) // skip StackSkip -} - -// Duration constructs a field with the given key and value. The encoder -// controls how the duration is serialized. -func Duration(key string, val time.Duration) Field { - return Field{Key: key, Type: zapcore.DurationType, Integer: int64(val)} -} - -// Durationp constructs a field that carries a *time.Duration. The returned Field will safely -// and explicitly represent `nil` when appropriate. -func Durationp(key string, val *time.Duration) Field { - if val == nil { - return nilField(key) - } - return Duration(key, *val) -} - -// Object constructs a field with the given key and ObjectMarshaler. It -// provides a flexible, but still type-safe and efficient, way to add map- or -// struct-like user-defined types to the logging context. The struct's -// MarshalLogObject method is called lazily. -func Object(key string, val zapcore.ObjectMarshaler) Field { - return Field{Key: key, Type: zapcore.ObjectMarshalerType, Interface: val} -} - -// Inline constructs a Field that is similar to Object, but it -// will add the elements of the provided ObjectMarshaler to the -// current namespace. -func Inline(val zapcore.ObjectMarshaler) Field { - return zapcore.Field{ - Type: zapcore.InlineMarshalerType, - Interface: val, - } -} - -// Dict constructs a field containing the provided key-value pairs. -// It acts similar to [Object], but with the fields specified as arguments. -func Dict(key string, val ...Field) Field { - return dictField(key, val) -} - -// We need a function with the signature (string, T) for zap.Any. -func dictField(key string, val []Field) Field { - return Object(key, dictObject(val)) -} - -type dictObject []Field - -func (d dictObject) MarshalLogObject(enc zapcore.ObjectEncoder) error { - for _, f := range d { - f.AddTo(enc) - } - return nil -} - -// We discovered an issue where zap.Any can cause a performance degradation -// when used in new goroutines. -// -// This happens because the compiler assigns 4.8kb (one zap.Field per arm of -// switch statement) of stack space for zap.Any when it takes the form: -// -// switch v := v.(type) { -// case string: -// return String(key, v) -// case int: -// return Int(key, v) -// // ... -// default: -// return Reflect(key, v) -// } -// -// To avoid this, we use the type switch to assign a value to a single local variable -// and then call a function on it. -// The local variable is just a function reference so it doesn't allocate -// when converted to an interface{}. -// -// A fair bit of experimentation went into this. -// See also: -// -// - https://github.com/uber-go/zap/pull/1301 -// - https://github.com/uber-go/zap/pull/1303 -// - https://github.com/uber-go/zap/pull/1304 -// - https://github.com/uber-go/zap/pull/1305 -// - https://github.com/uber-go/zap/pull/1308 -type anyFieldC[T any] func(string, T) Field - -func (f anyFieldC[T]) Any(key string, val any) Field { - v, _ := val.(T) - // val is guaranteed to be a T, except when it's nil. - return f(key, v) -} - -// Any takes a key and an arbitrary value and chooses the best way to represent -// them as a field, falling back to a reflection-based approach only if -// necessary. -// -// Since byte/uint8 and rune/int32 are aliases, Any can't differentiate between -// them. To minimize surprises, []byte values are treated as binary blobs, byte -// values are treated as uint8, and runes are always treated as integers. -func Any(key string, value interface{}) Field { - var c interface{ Any(string, any) Field } - - switch value.(type) { - case zapcore.ObjectMarshaler: - c = anyFieldC[zapcore.ObjectMarshaler](Object) - case zapcore.ArrayMarshaler: - c = anyFieldC[zapcore.ArrayMarshaler](Array) - case []Field: - c = anyFieldC[[]Field](dictField) - case bool: - c = anyFieldC[bool](Bool) - case *bool: - c = anyFieldC[*bool](Boolp) - case []bool: - c = anyFieldC[[]bool](Bools) - case complex128: - c = anyFieldC[complex128](Complex128) - case *complex128: - c = anyFieldC[*complex128](Complex128p) - case []complex128: - c = anyFieldC[[]complex128](Complex128s) - case complex64: - c = anyFieldC[complex64](Complex64) - case *complex64: - c = anyFieldC[*complex64](Complex64p) - case []complex64: - c = anyFieldC[[]complex64](Complex64s) - case float64: - c = anyFieldC[float64](Float64) - case *float64: - c = anyFieldC[*float64](Float64p) - case []float64: - c = anyFieldC[[]float64](Float64s) - case float32: - c = anyFieldC[float32](Float32) - case *float32: - c = anyFieldC[*float32](Float32p) - case []float32: - c = anyFieldC[[]float32](Float32s) - case int: - c = anyFieldC[int](Int) - case *int: - c = anyFieldC[*int](Intp) - case []int: - c = anyFieldC[[]int](Ints) - case int64: - c = anyFieldC[int64](Int64) - case *int64: - c = anyFieldC[*int64](Int64p) - case []int64: - c = anyFieldC[[]int64](Int64s) - case int32: - c = anyFieldC[int32](Int32) - case *int32: - c = anyFieldC[*int32](Int32p) - case []int32: - c = anyFieldC[[]int32](Int32s) - case int16: - c = anyFieldC[int16](Int16) - case *int16: - c = anyFieldC[*int16](Int16p) - case []int16: - c = anyFieldC[[]int16](Int16s) - case int8: - c = anyFieldC[int8](Int8) - case *int8: - c = anyFieldC[*int8](Int8p) - case []int8: - c = anyFieldC[[]int8](Int8s) - case string: - c = anyFieldC[string](String) - case *string: - c = anyFieldC[*string](Stringp) - case []string: - c = anyFieldC[[]string](Strings) - case uint: - c = anyFieldC[uint](Uint) - case *uint: - c = anyFieldC[*uint](Uintp) - case []uint: - c = anyFieldC[[]uint](Uints) - case uint64: - c = anyFieldC[uint64](Uint64) - case *uint64: - c = anyFieldC[*uint64](Uint64p) - case []uint64: - c = anyFieldC[[]uint64](Uint64s) - case uint32: - c = anyFieldC[uint32](Uint32) - case *uint32: - c = anyFieldC[*uint32](Uint32p) - case []uint32: - c = anyFieldC[[]uint32](Uint32s) - case uint16: - c = anyFieldC[uint16](Uint16) - case *uint16: - c = anyFieldC[*uint16](Uint16p) - case []uint16: - c = anyFieldC[[]uint16](Uint16s) - case uint8: - c = anyFieldC[uint8](Uint8) - case *uint8: - c = anyFieldC[*uint8](Uint8p) - case []byte: - c = anyFieldC[[]byte](Binary) - case uintptr: - c = anyFieldC[uintptr](Uintptr) - case *uintptr: - c = anyFieldC[*uintptr](Uintptrp) - case []uintptr: - c = anyFieldC[[]uintptr](Uintptrs) - case time.Time: - c = anyFieldC[time.Time](Time) - case *time.Time: - c = anyFieldC[*time.Time](Timep) - case []time.Time: - c = anyFieldC[[]time.Time](Times) - case time.Duration: - c = anyFieldC[time.Duration](Duration) - case *time.Duration: - c = anyFieldC[*time.Duration](Durationp) - case []time.Duration: - c = anyFieldC[[]time.Duration](Durations) - case error: - c = anyFieldC[error](NamedError) - case []error: - c = anyFieldC[[]error](Errors) - case fmt.Stringer: - c = anyFieldC[fmt.Stringer](Stringer) - default: - c = anyFieldC[any](Reflect) - } - - return c.Any(key, value) -} diff --git a/vendor/go.uber.org/zap/flag.go b/vendor/go.uber.org/zap/flag.go deleted file mode 100644 index 1312875072f..00000000000 --- a/vendor/go.uber.org/zap/flag.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "flag" - - "go.uber.org/zap/zapcore" -) - -// LevelFlag uses the standard library's flag.Var to declare a global flag -// with the specified name, default, and usage guidance. The returned value is -// a pointer to the value of the flag. -// -// If you don't want to use the flag package's global state, you can use any -// non-nil *Level as a flag.Value with your own *flag.FlagSet. -func LevelFlag(name string, defaultLevel zapcore.Level, usage string) *zapcore.Level { - lvl := defaultLevel - flag.Var(&lvl, name, usage) - return &lvl -} diff --git a/vendor/go.uber.org/zap/glide.yaml b/vendor/go.uber.org/zap/glide.yaml deleted file mode 100644 index 8e1d05e9abd..00000000000 --- a/vendor/go.uber.org/zap/glide.yaml +++ /dev/null @@ -1,34 +0,0 @@ -package: go.uber.org/zap -license: MIT -import: -- package: go.uber.org/atomic - version: ^1 -- package: go.uber.org/multierr - version: ^1 -testImport: -- package: github.com/satori/go.uuid -- package: github.com/sirupsen/logrus -- package: github.com/apex/log - subpackages: - - handlers/json -- package: github.com/go-kit/kit - subpackages: - - log -- package: github.com/stretchr/testify - subpackages: - - assert - - require -- package: gopkg.in/inconshreveable/log15.v2 -- package: github.com/mattn/goveralls -- package: github.com/pborman/uuid -- package: github.com/pkg/errors -- package: github.com/rs/zerolog -- package: golang.org/x/tools - subpackages: - - cover -- package: golang.org/x/lint - subpackages: - - golint -- package: github.com/axw/gocov - subpackages: - - gocov diff --git a/vendor/go.uber.org/zap/global.go b/vendor/go.uber.org/zap/global.go deleted file mode 100644 index 3cb46c9e0ac..00000000000 --- a/vendor/go.uber.org/zap/global.go +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "bytes" - "fmt" - "log" - "os" - "sync" - - "go.uber.org/zap/zapcore" -) - -const ( - _stdLogDefaultDepth = 1 - _loggerWriterDepth = 2 - _programmerErrorTemplate = "You've found a bug in zap! Please file a bug at " + - "https://github.com/uber-go/zap/issues/new and reference this error: %v" -) - -var ( - _globalMu sync.RWMutex - _globalL = NewNop() - _globalS = _globalL.Sugar() -) - -// L returns the global Logger, which can be reconfigured with ReplaceGlobals. -// It's safe for concurrent use. -func L() *Logger { - _globalMu.RLock() - l := _globalL - _globalMu.RUnlock() - return l -} - -// S returns the global SugaredLogger, which can be reconfigured with -// ReplaceGlobals. It's safe for concurrent use. -func S() *SugaredLogger { - _globalMu.RLock() - s := _globalS - _globalMu.RUnlock() - return s -} - -// ReplaceGlobals replaces the global Logger and SugaredLogger, and returns a -// function to restore the original values. It's safe for concurrent use. -func ReplaceGlobals(logger *Logger) func() { - _globalMu.Lock() - prev := _globalL - _globalL = logger - _globalS = logger.Sugar() - _globalMu.Unlock() - return func() { ReplaceGlobals(prev) } -} - -// NewStdLog returns a *log.Logger which writes to the supplied zap Logger at -// InfoLevel. To redirect the standard library's package-global logging -// functions, use RedirectStdLog instead. -func NewStdLog(l *Logger) *log.Logger { - logger := l.WithOptions(AddCallerSkip(_stdLogDefaultDepth + _loggerWriterDepth)) - f := logger.Info - return log.New(&loggerWriter{f}, "" /* prefix */, 0 /* flags */) -} - -// NewStdLogAt returns *log.Logger which writes to supplied zap logger at -// required level. -func NewStdLogAt(l *Logger, level zapcore.Level) (*log.Logger, error) { - logger := l.WithOptions(AddCallerSkip(_stdLogDefaultDepth + _loggerWriterDepth)) - logFunc, err := levelToFunc(logger, level) - if err != nil { - return nil, err - } - return log.New(&loggerWriter{logFunc}, "" /* prefix */, 0 /* flags */), nil -} - -// RedirectStdLog redirects output from the standard library's package-global -// logger to the supplied logger at InfoLevel. Since zap already handles caller -// annotations, timestamps, etc., it automatically disables the standard -// library's annotations and prefixing. -// -// It returns a function to restore the original prefix and flags and reset the -// standard library's output to os.Stderr. -func RedirectStdLog(l *Logger) func() { - f, err := redirectStdLogAt(l, InfoLevel) - if err != nil { - // Can't get here, since passing InfoLevel to redirectStdLogAt always - // works. - panic(fmt.Sprintf(_programmerErrorTemplate, err)) - } - return f -} - -// RedirectStdLogAt redirects output from the standard library's package-global -// logger to the supplied logger at the specified level. Since zap already -// handles caller annotations, timestamps, etc., it automatically disables the -// standard library's annotations and prefixing. -// -// It returns a function to restore the original prefix and flags and reset the -// standard library's output to os.Stderr. -func RedirectStdLogAt(l *Logger, level zapcore.Level) (func(), error) { - return redirectStdLogAt(l, level) -} - -func redirectStdLogAt(l *Logger, level zapcore.Level) (func(), error) { - flags := log.Flags() - prefix := log.Prefix() - log.SetFlags(0) - log.SetPrefix("") - logger := l.WithOptions(AddCallerSkip(_stdLogDefaultDepth + _loggerWriterDepth)) - logFunc, err := levelToFunc(logger, level) - if err != nil { - return nil, err - } - log.SetOutput(&loggerWriter{logFunc}) - return func() { - log.SetFlags(flags) - log.SetPrefix(prefix) - log.SetOutput(os.Stderr) - }, nil -} - -func levelToFunc(logger *Logger, lvl zapcore.Level) (func(string, ...Field), error) { - switch lvl { - case DebugLevel: - return logger.Debug, nil - case InfoLevel: - return logger.Info, nil - case WarnLevel: - return logger.Warn, nil - case ErrorLevel: - return logger.Error, nil - case DPanicLevel: - return logger.DPanic, nil - case PanicLevel: - return logger.Panic, nil - case FatalLevel: - return logger.Fatal, nil - } - return nil, fmt.Errorf("unrecognized level: %q", lvl) -} - -type loggerWriter struct { - logFunc func(msg string, fields ...Field) -} - -func (l *loggerWriter) Write(p []byte) (int, error) { - p = bytes.TrimSpace(p) - l.logFunc(string(p)) - return len(p), nil -} diff --git a/vendor/go.uber.org/zap/http_handler.go b/vendor/go.uber.org/zap/http_handler.go deleted file mode 100644 index 2be8f651500..00000000000 --- a/vendor/go.uber.org/zap/http_handler.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - - "go.uber.org/zap/zapcore" -) - -// ServeHTTP is a simple JSON endpoint that can report on or change the current -// logging level. -// -// # GET -// -// The GET request returns a JSON description of the current logging level like: -// -// {"level":"info"} -// -// # PUT -// -// The PUT request changes the logging level. It is perfectly safe to change the -// logging level while a program is running. Two content types are supported: -// -// Content-Type: application/x-www-form-urlencoded -// -// With this content type, the level can be provided through the request body or -// a query parameter. The log level is URL encoded like: -// -// level=debug -// -// The request body takes precedence over the query parameter, if both are -// specified. -// -// This content type is the default for a curl PUT request. Following are two -// example curl requests that both set the logging level to debug. -// -// curl -X PUT localhost:8080/log/level?level=debug -// curl -X PUT localhost:8080/log/level -d level=debug -// -// For any other content type, the payload is expected to be JSON encoded and -// look like: -// -// {"level":"info"} -// -// An example curl request could look like this: -// -// curl -X PUT localhost:8080/log/level -H "Content-Type: application/json" -d '{"level":"debug"}' -func (lvl AtomicLevel) ServeHTTP(w http.ResponseWriter, r *http.Request) { - if err := lvl.serveHTTP(w, r); err != nil { - w.WriteHeader(http.StatusInternalServerError) - fmt.Fprintf(w, "internal error: %v", err) - } -} - -func (lvl AtomicLevel) serveHTTP(w http.ResponseWriter, r *http.Request) error { - type errorResponse struct { - Error string `json:"error"` - } - type payload struct { - Level zapcore.Level `json:"level"` - } - - enc := json.NewEncoder(w) - - switch r.Method { - case http.MethodGet: - return enc.Encode(payload{Level: lvl.Level()}) - - case http.MethodPut: - requestedLvl, err := decodePutRequest(r.Header.Get("Content-Type"), r) - if err != nil { - w.WriteHeader(http.StatusBadRequest) - return enc.Encode(errorResponse{Error: err.Error()}) - } - lvl.SetLevel(requestedLvl) - return enc.Encode(payload{Level: lvl.Level()}) - - default: - w.WriteHeader(http.StatusMethodNotAllowed) - return enc.Encode(errorResponse{ - Error: "Only GET and PUT are supported.", - }) - } -} - -// Decodes incoming PUT requests and returns the requested logging level. -func decodePutRequest(contentType string, r *http.Request) (zapcore.Level, error) { - if contentType == "application/x-www-form-urlencoded" { - return decodePutURL(r) - } - return decodePutJSON(r.Body) -} - -func decodePutURL(r *http.Request) (zapcore.Level, error) { - lvl := r.FormValue("level") - if lvl == "" { - return 0, errors.New("must specify logging level") - } - var l zapcore.Level - if err := l.UnmarshalText([]byte(lvl)); err != nil { - return 0, err - } - return l, nil -} - -func decodePutJSON(body io.Reader) (zapcore.Level, error) { - var pld struct { - Level *zapcore.Level `json:"level"` - } - if err := json.NewDecoder(body).Decode(&pld); err != nil { - return 0, fmt.Errorf("malformed request body: %v", err) - } - if pld.Level == nil { - return 0, errors.New("must specify logging level") - } - return *pld.Level, nil -} diff --git a/vendor/go.uber.org/zap/internal/bufferpool/bufferpool.go b/vendor/go.uber.org/zap/internal/bufferpool/bufferpool.go deleted file mode 100644 index dad583aaa5f..00000000000 --- a/vendor/go.uber.org/zap/internal/bufferpool/bufferpool.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -// Package bufferpool houses zap's shared internal buffer pool. Third-party -// packages can recreate the same functionality with buffers.NewPool. -package bufferpool - -import "go.uber.org/zap/buffer" - -var ( - _pool = buffer.NewPool() - // Get retrieves a buffer from the pool, creating one if necessary. - Get = _pool.Get -) diff --git a/vendor/go.uber.org/zap/internal/color/color.go b/vendor/go.uber.org/zap/internal/color/color.go deleted file mode 100644 index c4d5d02abcc..00000000000 --- a/vendor/go.uber.org/zap/internal/color/color.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -// Package color adds coloring functionality for TTY output. -package color - -import "fmt" - -// Foreground colors. -const ( - Black Color = iota + 30 - Red - Green - Yellow - Blue - Magenta - Cyan - White -) - -// Color represents a text color. -type Color uint8 - -// Add adds the coloring to the given string. -func (c Color) Add(s string) string { - return fmt.Sprintf("\x1b[%dm%s\x1b[0m", uint8(c), s) -} diff --git a/vendor/go.uber.org/zap/internal/exit/exit.go b/vendor/go.uber.org/zap/internal/exit/exit.go deleted file mode 100644 index f673f9947b8..00000000000 --- a/vendor/go.uber.org/zap/internal/exit/exit.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -// Package exit provides stubs so that unit tests can exercise code that calls -// os.Exit(1). -package exit - -import "os" - -var _exit = os.Exit - -// With terminates the process by calling os.Exit(code). If the package is -// stubbed, it instead records a call in the testing spy. -func With(code int) { - _exit(code) -} - -// A StubbedExit is a testing fake for os.Exit. -type StubbedExit struct { - Exited bool - Code int - prev func(code int) -} - -// Stub substitutes a fake for the call to os.Exit(1). -func Stub() *StubbedExit { - s := &StubbedExit{prev: _exit} - _exit = s.exit - return s -} - -// WithStub runs the supplied function with Exit stubbed. It returns the stub -// used, so that users can test whether the process would have crashed. -func WithStub(f func()) *StubbedExit { - s := Stub() - defer s.Unstub() - f() - return s -} - -// Unstub restores the previous exit function. -func (se *StubbedExit) Unstub() { - _exit = se.prev -} - -func (se *StubbedExit) exit(code int) { - se.Exited = true - se.Code = code -} diff --git a/vendor/go.uber.org/zap/internal/level_enabler.go b/vendor/go.uber.org/zap/internal/level_enabler.go deleted file mode 100644 index 40bfed81e6e..00000000000 --- a/vendor/go.uber.org/zap/internal/level_enabler.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2022 Uber Technologies, Inc. -// -// 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. - -// Package internal and its subpackages hold types and functionality -// that are not part of Zap's public API. -package internal - -import "go.uber.org/zap/zapcore" - -// LeveledEnabler is an interface satisfied by LevelEnablers that are able to -// report their own level. -// -// This interface is defined to use more conveniently in tests and non-zapcore -// packages. -// This cannot be imported from zapcore because of the cyclic dependency. -type LeveledEnabler interface { - zapcore.LevelEnabler - - Level() zapcore.Level -} diff --git a/vendor/go.uber.org/zap/internal/pool/pool.go b/vendor/go.uber.org/zap/internal/pool/pool.go deleted file mode 100644 index 60e9d2c432d..00000000000 --- a/vendor/go.uber.org/zap/internal/pool/pool.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2023 Uber Technologies, Inc. -// -// 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. - -// Package pool provides internal pool utilities. -package pool - -import ( - "sync" -) - -// A Pool is a generic wrapper around [sync.Pool] to provide strongly-typed -// object pooling. -// -// Note that SA6002 (ref: https://staticcheck.io/docs/checks/#SA6002) will -// not be detected, so all internal pool use must take care to only store -// pointer types. -type Pool[T any] struct { - pool sync.Pool -} - -// New returns a new [Pool] for T, and will use fn to construct new Ts when -// the pool is empty. -func New[T any](fn func() T) *Pool[T] { - return &Pool[T]{ - pool: sync.Pool{ - New: func() any { - return fn() - }, - }, - } -} - -// Get gets a T from the pool, or creates a new one if the pool is empty. -func (p *Pool[T]) Get() T { - return p.pool.Get().(T) -} - -// Put returns x into the pool. -func (p *Pool[T]) Put(x T) { - p.pool.Put(x) -} diff --git a/vendor/go.uber.org/zap/internal/stacktrace/stack.go b/vendor/go.uber.org/zap/internal/stacktrace/stack.go deleted file mode 100644 index 82af7551f93..00000000000 --- a/vendor/go.uber.org/zap/internal/stacktrace/stack.go +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) 2023 Uber Technologies, Inc. -// -// 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. - -// Package stacktrace provides support for gathering stack traces -// efficiently. -package stacktrace - -import ( - "runtime" - - "go.uber.org/zap/buffer" - "go.uber.org/zap/internal/bufferpool" - "go.uber.org/zap/internal/pool" -) - -var _stackPool = pool.New(func() *Stack { - return &Stack{ - storage: make([]uintptr, 64), - } -}) - -// Stack is a captured stack trace. -type Stack struct { - pcs []uintptr // program counters; always a subslice of storage - frames *runtime.Frames - - // The size of pcs varies depending on requirements: - // it will be one if the only the first frame was requested, - // and otherwise it will reflect the depth of the call stack. - // - // storage decouples the slice we need (pcs) from the slice we pool. - // We will always allocate a reasonably large storage, but we'll use - // only as much of it as we need. - storage []uintptr -} - -// Depth specifies how deep of a stack trace should be captured. -type Depth int - -const ( - // First captures only the first frame. - First Depth = iota - - // Full captures the entire call stack, allocating more - // storage for it if needed. - Full -) - -// Capture captures a stack trace of the specified depth, skipping -// the provided number of frames. skip=0 identifies the caller of -// Capture. -// -// The caller must call Free on the returned stacktrace after using it. -func Capture(skip int, depth Depth) *Stack { - stack := _stackPool.Get() - - switch depth { - case First: - stack.pcs = stack.storage[:1] - case Full: - stack.pcs = stack.storage - } - - // Unlike other "skip"-based APIs, skip=0 identifies runtime.Callers - // itself. +2 to skip captureStacktrace and runtime.Callers. - numFrames := runtime.Callers( - skip+2, - stack.pcs, - ) - - // runtime.Callers truncates the recorded stacktrace if there is no - // room in the provided slice. For the full stack trace, keep expanding - // storage until there are fewer frames than there is room. - if depth == Full { - pcs := stack.pcs - for numFrames == len(pcs) { - pcs = make([]uintptr, len(pcs)*2) - numFrames = runtime.Callers(skip+2, pcs) - } - - // Discard old storage instead of returning it to the pool. - // This will adjust the pool size over time if stack traces are - // consistently very deep. - stack.storage = pcs - stack.pcs = pcs[:numFrames] - } else { - stack.pcs = stack.pcs[:numFrames] - } - - stack.frames = runtime.CallersFrames(stack.pcs) - return stack -} - -// Free releases resources associated with this stacktrace -// and returns it back to the pool. -func (st *Stack) Free() { - st.frames = nil - st.pcs = nil - _stackPool.Put(st) -} - -// Count reports the total number of frames in this stacktrace. -// Count DOES NOT change as Next is called. -func (st *Stack) Count() int { - return len(st.pcs) -} - -// Next returns the next frame in the stack trace, -// and a boolean indicating whether there are more after it. -func (st *Stack) Next() (_ runtime.Frame, more bool) { - return st.frames.Next() -} - -// Take returns a string representation of the current stacktrace. -// -// skip is the number of frames to skip before recording the stack trace. -// skip=0 identifies the caller of Take. -func Take(skip int) string { - stack := Capture(skip+1, Full) - defer stack.Free() - - buffer := bufferpool.Get() - defer buffer.Free() - - stackfmt := NewFormatter(buffer) - stackfmt.FormatStack(stack) - return buffer.String() -} - -// Formatter formats a stack trace into a readable string representation. -type Formatter struct { - b *buffer.Buffer - nonEmpty bool // whehther we've written at least one frame already -} - -// NewFormatter builds a new Formatter. -func NewFormatter(b *buffer.Buffer) Formatter { - return Formatter{b: b} -} - -// FormatStack formats all remaining frames in the provided stacktrace -- minus -// the final runtime.main/runtime.goexit frame. -func (sf *Formatter) FormatStack(stack *Stack) { - // Note: On the last iteration, frames.Next() returns false, with a valid - // frame, but we ignore this frame. The last frame is a runtime frame which - // adds noise, since it's only either runtime.main or runtime.goexit. - for frame, more := stack.Next(); more; frame, more = stack.Next() { - sf.FormatFrame(frame) - } -} - -// FormatFrame formats the given frame. -func (sf *Formatter) FormatFrame(frame runtime.Frame) { - if sf.nonEmpty { - sf.b.AppendByte('\n') - } - sf.nonEmpty = true - sf.b.AppendString(frame.Function) - sf.b.AppendByte('\n') - sf.b.AppendByte('\t') - sf.b.AppendString(frame.File) - sf.b.AppendByte(':') - sf.b.AppendInt(int64(frame.Line)) -} diff --git a/vendor/go.uber.org/zap/level.go b/vendor/go.uber.org/zap/level.go deleted file mode 100644 index 155b208bd3c..00000000000 --- a/vendor/go.uber.org/zap/level.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "sync/atomic" - - "go.uber.org/zap/internal" - "go.uber.org/zap/zapcore" -) - -const ( - // DebugLevel logs are typically voluminous, and are usually disabled in - // production. - DebugLevel = zapcore.DebugLevel - // InfoLevel is the default logging priority. - InfoLevel = zapcore.InfoLevel - // WarnLevel logs are more important than Info, but don't need individual - // human review. - WarnLevel = zapcore.WarnLevel - // ErrorLevel logs are high-priority. If an application is running smoothly, - // it shouldn't generate any error-level logs. - ErrorLevel = zapcore.ErrorLevel - // DPanicLevel logs are particularly important errors. In development the - // logger panics after writing the message. - DPanicLevel = zapcore.DPanicLevel - // PanicLevel logs a message, then panics. - PanicLevel = zapcore.PanicLevel - // FatalLevel logs a message, then calls os.Exit(1). - FatalLevel = zapcore.FatalLevel -) - -// LevelEnablerFunc is a convenient way to implement zapcore.LevelEnabler with -// an anonymous function. -// -// It's particularly useful when splitting log output between different -// outputs (e.g., standard error and standard out). For sample code, see the -// package-level AdvancedConfiguration example. -type LevelEnablerFunc func(zapcore.Level) bool - -// Enabled calls the wrapped function. -func (f LevelEnablerFunc) Enabled(lvl zapcore.Level) bool { return f(lvl) } - -// An AtomicLevel is an atomically changeable, dynamic logging level. It lets -// you safely change the log level of a tree of loggers (the root logger and -// any children created by adding context) at runtime. -// -// The AtomicLevel itself is an http.Handler that serves a JSON endpoint to -// alter its level. -// -// AtomicLevels must be created with the NewAtomicLevel constructor to allocate -// their internal atomic pointer. -type AtomicLevel struct { - l *atomic.Int32 -} - -var _ internal.LeveledEnabler = AtomicLevel{} - -// NewAtomicLevel creates an AtomicLevel with InfoLevel and above logging -// enabled. -func NewAtomicLevel() AtomicLevel { - lvl := AtomicLevel{l: new(atomic.Int32)} - lvl.l.Store(int32(InfoLevel)) - return lvl -} - -// NewAtomicLevelAt is a convenience function that creates an AtomicLevel -// and then calls SetLevel with the given level. -func NewAtomicLevelAt(l zapcore.Level) AtomicLevel { - a := NewAtomicLevel() - a.SetLevel(l) - return a -} - -// ParseAtomicLevel parses an AtomicLevel based on a lowercase or all-caps ASCII -// representation of the log level. If the provided ASCII representation is -// invalid an error is returned. -// -// This is particularly useful when dealing with text input to configure log -// levels. -func ParseAtomicLevel(text string) (AtomicLevel, error) { - a := NewAtomicLevel() - l, err := zapcore.ParseLevel(text) - if err != nil { - return a, err - } - - a.SetLevel(l) - return a, nil -} - -// Enabled implements the zapcore.LevelEnabler interface, which allows the -// AtomicLevel to be used in place of traditional static levels. -func (lvl AtomicLevel) Enabled(l zapcore.Level) bool { - return lvl.Level().Enabled(l) -} - -// Level returns the minimum enabled log level. -func (lvl AtomicLevel) Level() zapcore.Level { - return zapcore.Level(int8(lvl.l.Load())) -} - -// SetLevel alters the logging level. -func (lvl AtomicLevel) SetLevel(l zapcore.Level) { - lvl.l.Store(int32(l)) -} - -// String returns the string representation of the underlying Level. -func (lvl AtomicLevel) String() string { - return lvl.Level().String() -} - -// UnmarshalText unmarshals the text to an AtomicLevel. It uses the same text -// representations as the static zapcore.Levels ("debug", "info", "warn", -// "error", "dpanic", "panic", and "fatal"). -func (lvl *AtomicLevel) UnmarshalText(text []byte) error { - if lvl.l == nil { - lvl.l = &atomic.Int32{} - } - - var l zapcore.Level - if err := l.UnmarshalText(text); err != nil { - return err - } - - lvl.SetLevel(l) - return nil -} - -// MarshalText marshals the AtomicLevel to a byte slice. It uses the same -// text representation as the static zapcore.Levels ("debug", "info", "warn", -// "error", "dpanic", "panic", and "fatal"). -func (lvl AtomicLevel) MarshalText() (text []byte, err error) { - return lvl.Level().MarshalText() -} diff --git a/vendor/go.uber.org/zap/logger.go b/vendor/go.uber.org/zap/logger.go deleted file mode 100644 index 6205fe48a6c..00000000000 --- a/vendor/go.uber.org/zap/logger.go +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "fmt" - "io" - "os" - "strings" - - "go.uber.org/zap/internal/bufferpool" - "go.uber.org/zap/internal/stacktrace" - "go.uber.org/zap/zapcore" -) - -// A Logger provides fast, leveled, structured logging. All methods are safe -// for concurrent use. -// -// The Logger is designed for contexts in which every microsecond and every -// allocation matters, so its API intentionally favors performance and type -// safety over brevity. For most applications, the SugaredLogger strikes a -// better balance between performance and ergonomics. -type Logger struct { - core zapcore.Core - - development bool - addCaller bool - onFatal zapcore.CheckWriteHook // default is WriteThenFatal - - name string - errorOutput zapcore.WriteSyncer - - addStack zapcore.LevelEnabler - - callerSkip int - - clock zapcore.Clock -} - -// New constructs a new Logger from the provided zapcore.Core and Options. If -// the passed zapcore.Core is nil, it falls back to using a no-op -// implementation. -// -// This is the most flexible way to construct a Logger, but also the most -// verbose. For typical use cases, the highly-opinionated presets -// (NewProduction, NewDevelopment, and NewExample) or the Config struct are -// more convenient. -// -// For sample code, see the package-level AdvancedConfiguration example. -func New(core zapcore.Core, options ...Option) *Logger { - if core == nil { - return NewNop() - } - log := &Logger{ - core: core, - errorOutput: zapcore.Lock(os.Stderr), - addStack: zapcore.FatalLevel + 1, - clock: zapcore.DefaultClock, - } - return log.WithOptions(options...) -} - -// NewNop returns a no-op Logger. It never writes out logs or internal errors, -// and it never runs user-defined hooks. -// -// Using WithOptions to replace the Core or error output of a no-op Logger can -// re-enable logging. -func NewNop() *Logger { - return &Logger{ - core: zapcore.NewNopCore(), - errorOutput: zapcore.AddSync(io.Discard), - addStack: zapcore.FatalLevel + 1, - clock: zapcore.DefaultClock, - } -} - -// NewProduction builds a sensible production Logger that writes InfoLevel and -// above logs to standard error as JSON. -// -// It's a shortcut for NewProductionConfig().Build(...Option). -func NewProduction(options ...Option) (*Logger, error) { - return NewProductionConfig().Build(options...) -} - -// NewDevelopment builds a development Logger that writes DebugLevel and above -// logs to standard error in a human-friendly format. -// -// It's a shortcut for NewDevelopmentConfig().Build(...Option). -func NewDevelopment(options ...Option) (*Logger, error) { - return NewDevelopmentConfig().Build(options...) -} - -// Must is a helper that wraps a call to a function returning (*Logger, error) -// and panics if the error is non-nil. It is intended for use in variable -// initialization such as: -// -// var logger = zap.Must(zap.NewProduction()) -func Must(logger *Logger, err error) *Logger { - if err != nil { - panic(err) - } - - return logger -} - -// NewExample builds a Logger that's designed for use in zap's testable -// examples. It writes DebugLevel and above logs to standard out as JSON, but -// omits the timestamp and calling function to keep example output -// short and deterministic. -func NewExample(options ...Option) *Logger { - encoderCfg := zapcore.EncoderConfig{ - MessageKey: "msg", - LevelKey: "level", - NameKey: "logger", - EncodeLevel: zapcore.LowercaseLevelEncoder, - EncodeTime: zapcore.ISO8601TimeEncoder, - EncodeDuration: zapcore.StringDurationEncoder, - } - core := zapcore.NewCore(zapcore.NewJSONEncoder(encoderCfg), os.Stdout, DebugLevel) - return New(core).WithOptions(options...) -} - -// Sugar wraps the Logger to provide a more ergonomic, but slightly slower, -// API. Sugaring a Logger is quite inexpensive, so it's reasonable for a -// single application to use both Loggers and SugaredLoggers, converting -// between them on the boundaries of performance-sensitive code. -func (log *Logger) Sugar() *SugaredLogger { - core := log.clone() - core.callerSkip += 2 - return &SugaredLogger{core} -} - -// Named adds a new path segment to the logger's name. Segments are joined by -// periods. By default, Loggers are unnamed. -func (log *Logger) Named(s string) *Logger { - if s == "" { - return log - } - l := log.clone() - if log.name == "" { - l.name = s - } else { - l.name = strings.Join([]string{l.name, s}, ".") - } - return l -} - -// WithOptions clones the current Logger, applies the supplied Options, and -// returns the resulting Logger. It's safe to use concurrently. -func (log *Logger) WithOptions(opts ...Option) *Logger { - c := log.clone() - for _, opt := range opts { - opt.apply(c) - } - return c -} - -// With creates a child logger and adds structured context to it. Fields added -// to the child don't affect the parent, and vice versa. Any fields that -// require evaluation (such as Objects) are evaluated upon invocation of With. -func (log *Logger) With(fields ...Field) *Logger { - if len(fields) == 0 { - return log - } - l := log.clone() - l.core = l.core.With(fields) - return l -} - -// WithLazy creates a child logger and adds structured context to it lazily. -// -// The fields are evaluated only if the logger is further chained with [With] -// or is written to with any of the log level methods. -// Until that occurs, the logger may retain references to objects inside the fields, -// and logging will reflect the state of an object at the time of logging, -// not the time of WithLazy(). -// -// WithLazy provides a worthwhile performance optimization for contextual loggers -// when the likelihood of using the child logger is low, -// such as error paths and rarely taken branches. -// -// Similar to [With], fields added to the child don't affect the parent, and vice versa. -func (log *Logger) WithLazy(fields ...Field) *Logger { - if len(fields) == 0 { - return log - } - return log.WithOptions(WrapCore(func(core zapcore.Core) zapcore.Core { - return zapcore.NewLazyWith(core, fields) - })) -} - -// Level reports the minimum enabled level for this logger. -// -// For NopLoggers, this is [zapcore.InvalidLevel]. -func (log *Logger) Level() zapcore.Level { - return zapcore.LevelOf(log.core) -} - -// Check returns a CheckedEntry if logging a message at the specified level -// is enabled. It's a completely optional optimization; in high-performance -// applications, Check can help avoid allocating a slice to hold fields. -func (log *Logger) Check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry { - return log.check(lvl, msg) -} - -// Log logs a message at the specified level. The message includes any fields -// passed at the log site, as well as any fields accumulated on the logger. -// Any Fields that require evaluation (such as Objects) are evaluated upon -// invocation of Log. -func (log *Logger) Log(lvl zapcore.Level, msg string, fields ...Field) { - if ce := log.check(lvl, msg); ce != nil { - ce.Write(fields...) - } -} - -// Debug logs a message at DebugLevel. The message includes any fields passed -// at the log site, as well as any fields accumulated on the logger. -func (log *Logger) Debug(msg string, fields ...Field) { - if ce := log.check(DebugLevel, msg); ce != nil { - ce.Write(fields...) - } -} - -// Info logs a message at InfoLevel. The message includes any fields passed -// at the log site, as well as any fields accumulated on the logger. -func (log *Logger) Info(msg string, fields ...Field) { - if ce := log.check(InfoLevel, msg); ce != nil { - ce.Write(fields...) - } -} - -// Warn logs a message at WarnLevel. The message includes any fields passed -// at the log site, as well as any fields accumulated on the logger. -func (log *Logger) Warn(msg string, fields ...Field) { - if ce := log.check(WarnLevel, msg); ce != nil { - ce.Write(fields...) - } -} - -// Error logs a message at ErrorLevel. The message includes any fields passed -// at the log site, as well as any fields accumulated on the logger. -func (log *Logger) Error(msg string, fields ...Field) { - if ce := log.check(ErrorLevel, msg); ce != nil { - ce.Write(fields...) - } -} - -// DPanic logs a message at DPanicLevel. The message includes any fields -// passed at the log site, as well as any fields accumulated on the logger. -// -// If the logger is in development mode, it then panics (DPanic means -// "development panic"). This is useful for catching errors that are -// recoverable, but shouldn't ever happen. -func (log *Logger) DPanic(msg string, fields ...Field) { - if ce := log.check(DPanicLevel, msg); ce != nil { - ce.Write(fields...) - } -} - -// Panic logs a message at PanicLevel. The message includes any fields passed -// at the log site, as well as any fields accumulated on the logger. -// -// The logger then panics, even if logging at PanicLevel is disabled. -func (log *Logger) Panic(msg string, fields ...Field) { - if ce := log.check(PanicLevel, msg); ce != nil { - ce.Write(fields...) - } -} - -// Fatal logs a message at FatalLevel. The message includes any fields passed -// at the log site, as well as any fields accumulated on the logger. -// -// The logger then calls os.Exit(1), even if logging at FatalLevel is -// disabled. -func (log *Logger) Fatal(msg string, fields ...Field) { - if ce := log.check(FatalLevel, msg); ce != nil { - ce.Write(fields...) - } -} - -// Sync calls the underlying Core's Sync method, flushing any buffered log -// entries. Applications should take care to call Sync before exiting. -func (log *Logger) Sync() error { - return log.core.Sync() -} - -// Core returns the Logger's underlying zapcore.Core. -func (log *Logger) Core() zapcore.Core { - return log.core -} - -// Name returns the Logger's underlying name, -// or an empty string if the logger is unnamed. -func (log *Logger) Name() string { - return log.name -} - -func (log *Logger) clone() *Logger { - clone := *log - return &clone -} - -func (log *Logger) check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry { - // Logger.check must always be called directly by a method in the - // Logger interface (e.g., Check, Info, Fatal). - // This skips Logger.check and the Info/Fatal/Check/etc. method that - // called it. - const callerSkipOffset = 2 - - // Check the level first to reduce the cost of disabled log calls. - // Since Panic and higher may exit, we skip the optimization for those levels. - if lvl < zapcore.DPanicLevel && !log.core.Enabled(lvl) { - return nil - } - - // Create basic checked entry thru the core; this will be non-nil if the - // log message will actually be written somewhere. - ent := zapcore.Entry{ - LoggerName: log.name, - Time: log.clock.Now(), - Level: lvl, - Message: msg, - } - ce := log.core.Check(ent, nil) - willWrite := ce != nil - - // Set up any required terminal behavior. - switch ent.Level { - case zapcore.PanicLevel: - ce = ce.After(ent, zapcore.WriteThenPanic) - case zapcore.FatalLevel: - onFatal := log.onFatal - // nil or WriteThenNoop will lead to continued execution after - // a Fatal log entry, which is unexpected. For example, - // - // f, err := os.Open(..) - // if err != nil { - // log.Fatal("cannot open", zap.Error(err)) - // } - // fmt.Println(f.Name()) - // - // The f.Name() will panic if we continue execution after the - // log.Fatal. - if onFatal == nil || onFatal == zapcore.WriteThenNoop { - onFatal = zapcore.WriteThenFatal - } - ce = ce.After(ent, onFatal) - case zapcore.DPanicLevel: - if log.development { - ce = ce.After(ent, zapcore.WriteThenPanic) - } - } - - // Only do further annotation if we're going to write this message; checked - // entries that exist only for terminal behavior don't benefit from - // annotation. - if !willWrite { - return ce - } - - // Thread the error output through to the CheckedEntry. - ce.ErrorOutput = log.errorOutput - - addStack := log.addStack.Enabled(ce.Level) - if !log.addCaller && !addStack { - return ce - } - - // Adding the caller or stack trace requires capturing the callers of - // this function. We'll share information between these two. - stackDepth := stacktrace.First - if addStack { - stackDepth = stacktrace.Full - } - stack := stacktrace.Capture(log.callerSkip+callerSkipOffset, stackDepth) - defer stack.Free() - - if stack.Count() == 0 { - if log.addCaller { - fmt.Fprintf(log.errorOutput, "%v Logger.check error: failed to get caller\n", ent.Time.UTC()) - _ = log.errorOutput.Sync() - } - return ce - } - - frame, more := stack.Next() - - if log.addCaller { - ce.Caller = zapcore.EntryCaller{ - Defined: frame.PC != 0, - PC: frame.PC, - File: frame.File, - Line: frame.Line, - Function: frame.Function, - } - } - - if addStack { - buffer := bufferpool.Get() - defer buffer.Free() - - stackfmt := stacktrace.NewFormatter(buffer) - - // We've already extracted the first frame, so format that - // separately and defer to stackfmt for the rest. - stackfmt.FormatFrame(frame) - if more { - stackfmt.FormatStack(stack) - } - ce.Stack = buffer.String() - } - - return ce -} diff --git a/vendor/go.uber.org/zap/options.go b/vendor/go.uber.org/zap/options.go deleted file mode 100644 index c4f3bca3d20..00000000000 --- a/vendor/go.uber.org/zap/options.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "fmt" - - "go.uber.org/zap/zapcore" -) - -// An Option configures a Logger. -type Option interface { - apply(*Logger) -} - -// optionFunc wraps a func so it satisfies the Option interface. -type optionFunc func(*Logger) - -func (f optionFunc) apply(log *Logger) { - f(log) -} - -// WrapCore wraps or replaces the Logger's underlying zapcore.Core. -func WrapCore(f func(zapcore.Core) zapcore.Core) Option { - return optionFunc(func(log *Logger) { - log.core = f(log.core) - }) -} - -// Hooks registers functions which will be called each time the Logger writes -// out an Entry. Repeated use of Hooks is additive. -// -// Hooks are useful for simple side effects, like capturing metrics for the -// number of emitted logs. More complex side effects, including anything that -// requires access to the Entry's structured fields, should be implemented as -// a zapcore.Core instead. See zapcore.RegisterHooks for details. -func Hooks(hooks ...func(zapcore.Entry) error) Option { - return optionFunc(func(log *Logger) { - log.core = zapcore.RegisterHooks(log.core, hooks...) - }) -} - -// Fields adds fields to the Logger. -func Fields(fs ...Field) Option { - return optionFunc(func(log *Logger) { - log.core = log.core.With(fs) - }) -} - -// ErrorOutput sets the destination for errors generated by the Logger. Note -// that this option only affects internal errors; for sample code that sends -// error-level logs to a different location from info- and debug-level logs, -// see the package-level AdvancedConfiguration example. -// -// The supplied WriteSyncer must be safe for concurrent use. The Open and -// zapcore.Lock functions are the simplest ways to protect files with a mutex. -func ErrorOutput(w zapcore.WriteSyncer) Option { - return optionFunc(func(log *Logger) { - log.errorOutput = w - }) -} - -// Development puts the logger in development mode, which makes DPanic-level -// logs panic instead of simply logging an error. -func Development() Option { - return optionFunc(func(log *Logger) { - log.development = true - }) -} - -// AddCaller configures the Logger to annotate each message with the filename, -// line number, and function name of zap's caller. See also WithCaller. -func AddCaller() Option { - return WithCaller(true) -} - -// WithCaller configures the Logger to annotate each message with the filename, -// line number, and function name of zap's caller, or not, depending on the -// value of enabled. This is a generalized form of AddCaller. -func WithCaller(enabled bool) Option { - return optionFunc(func(log *Logger) { - log.addCaller = enabled - }) -} - -// AddCallerSkip increases the number of callers skipped by caller annotation -// (as enabled by the AddCaller option). When building wrappers around the -// Logger and SugaredLogger, supplying this Option prevents zap from always -// reporting the wrapper code as the caller. -func AddCallerSkip(skip int) Option { - return optionFunc(func(log *Logger) { - log.callerSkip += skip - }) -} - -// AddStacktrace configures the Logger to record a stack trace for all messages at -// or above a given level. -func AddStacktrace(lvl zapcore.LevelEnabler) Option { - return optionFunc(func(log *Logger) { - log.addStack = lvl - }) -} - -// IncreaseLevel increase the level of the logger. It has no effect if -// the passed in level tries to decrease the level of the logger. -func IncreaseLevel(lvl zapcore.LevelEnabler) Option { - return optionFunc(func(log *Logger) { - core, err := zapcore.NewIncreaseLevelCore(log.core, lvl) - if err != nil { - fmt.Fprintf(log.errorOutput, "failed to IncreaseLevel: %v\n", err) - } else { - log.core = core - } - }) -} - -// OnFatal sets the action to take on fatal logs. -// -// Deprecated: Use [WithFatalHook] instead. -func OnFatal(action zapcore.CheckWriteAction) Option { - return WithFatalHook(action) -} - -// WithFatalHook sets a CheckWriteHook to run on fatal logs. -// Zap will call this hook after writing a log statement with a Fatal level. -// -// For example, the following builds a logger that will exit the current -// goroutine after writing a fatal log message, but it will not exit the -// program. -// -// zap.New(core, zap.WithFatalHook(zapcore.WriteThenGoexit)) -// -// It is important that the provided CheckWriteHook stops the control flow at -// the current statement to meet expectations of callers of the logger. -// We recommend calling os.Exit or runtime.Goexit inside custom hooks at -// minimum. -func WithFatalHook(hook zapcore.CheckWriteHook) Option { - return optionFunc(func(log *Logger) { - log.onFatal = hook - }) -} - -// WithClock specifies the clock used by the logger to determine the current -// time for logged entries. Defaults to the system clock with time.Now. -func WithClock(clock zapcore.Clock) Option { - return optionFunc(func(log *Logger) { - log.clock = clock - }) -} diff --git a/vendor/go.uber.org/zap/sink.go b/vendor/go.uber.org/zap/sink.go deleted file mode 100644 index 499772a00dc..00000000000 --- a/vendor/go.uber.org/zap/sink.go +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) 2016-2022 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "errors" - "fmt" - "io" - "net/url" - "os" - "path/filepath" - "strings" - "sync" - - "go.uber.org/zap/zapcore" -) - -const schemeFile = "file" - -var _sinkRegistry = newSinkRegistry() - -// Sink defines the interface to write to and close logger destinations. -type Sink interface { - zapcore.WriteSyncer - io.Closer -} - -type errSinkNotFound struct { - scheme string -} - -func (e *errSinkNotFound) Error() string { - return fmt.Sprintf("no sink found for scheme %q", e.scheme) -} - -type nopCloserSink struct{ zapcore.WriteSyncer } - -func (nopCloserSink) Close() error { return nil } - -type sinkRegistry struct { - mu sync.Mutex - factories map[string]func(*url.URL) (Sink, error) // keyed by scheme - openFile func(string, int, os.FileMode) (*os.File, error) // type matches os.OpenFile -} - -func newSinkRegistry() *sinkRegistry { - sr := &sinkRegistry{ - factories: make(map[string]func(*url.URL) (Sink, error)), - openFile: os.OpenFile, - } - // Infallible operation: the registry is empty, so we can't have a conflict. - _ = sr.RegisterSink(schemeFile, sr.newFileSinkFromURL) - return sr -} - -// RegisterScheme registers the given factory for the specific scheme. -func (sr *sinkRegistry) RegisterSink(scheme string, factory func(*url.URL) (Sink, error)) error { - sr.mu.Lock() - defer sr.mu.Unlock() - - if scheme == "" { - return errors.New("can't register a sink factory for empty string") - } - normalized, err := normalizeScheme(scheme) - if err != nil { - return fmt.Errorf("%q is not a valid scheme: %v", scheme, err) - } - if _, ok := sr.factories[normalized]; ok { - return fmt.Errorf("sink factory already registered for scheme %q", normalized) - } - sr.factories[normalized] = factory - return nil -} - -func (sr *sinkRegistry) newSink(rawURL string) (Sink, error) { - // URL parsing doesn't work well for Windows paths such as `c:\log.txt`, as scheme is set to - // the drive, and path is unset unless `c:/log.txt` is used. - // To avoid Windows-specific URL handling, we instead check IsAbs to open as a file. - // filepath.IsAbs is OS-specific, so IsAbs('c:/log.txt') is false outside of Windows. - if filepath.IsAbs(rawURL) { - return sr.newFileSinkFromPath(rawURL) - } - - u, err := url.Parse(rawURL) - if err != nil { - return nil, fmt.Errorf("can't parse %q as a URL: %v", rawURL, err) - } - if u.Scheme == "" { - u.Scheme = schemeFile - } - - sr.mu.Lock() - factory, ok := sr.factories[u.Scheme] - sr.mu.Unlock() - if !ok { - return nil, &errSinkNotFound{u.Scheme} - } - return factory(u) -} - -// RegisterSink registers a user-supplied factory for all sinks with a -// particular scheme. -// -// All schemes must be ASCII, valid under section 0.1 of RFC 3986 -// (https://tools.ietf.org/html/rfc3983#section-3.1), and must not already -// have a factory registered. Zap automatically registers a factory for the -// "file" scheme. -func RegisterSink(scheme string, factory func(*url.URL) (Sink, error)) error { - return _sinkRegistry.RegisterSink(scheme, factory) -} - -func (sr *sinkRegistry) newFileSinkFromURL(u *url.URL) (Sink, error) { - if u.User != nil { - return nil, fmt.Errorf("user and password not allowed with file URLs: got %v", u) - } - if u.Fragment != "" { - return nil, fmt.Errorf("fragments not allowed with file URLs: got %v", u) - } - if u.RawQuery != "" { - return nil, fmt.Errorf("query parameters not allowed with file URLs: got %v", u) - } - // Error messages are better if we check hostname and port separately. - if u.Port() != "" { - return nil, fmt.Errorf("ports not allowed with file URLs: got %v", u) - } - if hn := u.Hostname(); hn != "" && hn != "localhost" { - return nil, fmt.Errorf("file URLs must leave host empty or use localhost: got %v", u) - } - - return sr.newFileSinkFromPath(u.Path) -} - -func (sr *sinkRegistry) newFileSinkFromPath(path string) (Sink, error) { - switch path { - case "stdout": - return nopCloserSink{os.Stdout}, nil - case "stderr": - return nopCloserSink{os.Stderr}, nil - } - return sr.openFile(path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0o666) -} - -func normalizeScheme(s string) (string, error) { - // https://tools.ietf.org/html/rfc3986#section-3.1 - s = strings.ToLower(s) - if first := s[0]; 'a' > first || 'z' < first { - return "", errors.New("must start with a letter") - } - for i := 1; i < len(s); i++ { // iterate over bytes, not runes - c := s[i] - switch { - case 'a' <= c && c <= 'z': - continue - case '0' <= c && c <= '9': - continue - case c == '.' || c == '+' || c == '-': - continue - } - return "", fmt.Errorf("may not contain %q", c) - } - return s, nil -} diff --git a/vendor/go.uber.org/zap/sugar.go b/vendor/go.uber.org/zap/sugar.go deleted file mode 100644 index 00ac5fe3ac8..00000000000 --- a/vendor/go.uber.org/zap/sugar.go +++ /dev/null @@ -1,437 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "fmt" - - "go.uber.org/zap/zapcore" - - "go.uber.org/multierr" -) - -const ( - _oddNumberErrMsg = "Ignored key without a value." - _nonStringKeyErrMsg = "Ignored key-value pairs with non-string keys." - _multipleErrMsg = "Multiple errors without a key." -) - -// A SugaredLogger wraps the base Logger functionality in a slower, but less -// verbose, API. Any Logger can be converted to a SugaredLogger with its Sugar -// method. -// -// Unlike the Logger, the SugaredLogger doesn't insist on structured logging. -// For each log level, it exposes four methods: -// -// - methods named after the log level for log.Print-style logging -// - methods ending in "w" for loosely-typed structured logging -// - methods ending in "f" for log.Printf-style logging -// - methods ending in "ln" for log.Println-style logging -// -// For example, the methods for InfoLevel are: -// -// Info(...any) Print-style logging -// Infow(...any) Structured logging (read as "info with") -// Infof(string, ...any) Printf-style logging -// Infoln(...any) Println-style logging -type SugaredLogger struct { - base *Logger -} - -// Desugar unwraps a SugaredLogger, exposing the original Logger. Desugaring -// is quite inexpensive, so it's reasonable for a single application to use -// both Loggers and SugaredLoggers, converting between them on the boundaries -// of performance-sensitive code. -func (s *SugaredLogger) Desugar() *Logger { - base := s.base.clone() - base.callerSkip -= 2 - return base -} - -// Named adds a sub-scope to the logger's name. See Logger.Named for details. -func (s *SugaredLogger) Named(name string) *SugaredLogger { - return &SugaredLogger{base: s.base.Named(name)} -} - -// WithOptions clones the current SugaredLogger, applies the supplied Options, -// and returns the result. It's safe to use concurrently. -func (s *SugaredLogger) WithOptions(opts ...Option) *SugaredLogger { - base := s.base.clone() - for _, opt := range opts { - opt.apply(base) - } - return &SugaredLogger{base: base} -} - -// With adds a variadic number of fields to the logging context. It accepts a -// mix of strongly-typed Field objects and loosely-typed key-value pairs. When -// processing pairs, the first element of the pair is used as the field key -// and the second as the field value. -// -// For example, -// -// sugaredLogger.With( -// "hello", "world", -// "failure", errors.New("oh no"), -// Stack(), -// "count", 42, -// "user", User{Name: "alice"}, -// ) -// -// is the equivalent of -// -// unsugared.With( -// String("hello", "world"), -// String("failure", "oh no"), -// Stack(), -// Int("count", 42), -// Object("user", User{Name: "alice"}), -// ) -// -// Note that the keys in key-value pairs should be strings. In development, -// passing a non-string key panics. In production, the logger is more -// forgiving: a separate error is logged, but the key-value pair is skipped -// and execution continues. Passing an orphaned key triggers similar behavior: -// panics in development and errors in production. -func (s *SugaredLogger) With(args ...interface{}) *SugaredLogger { - return &SugaredLogger{base: s.base.With(s.sweetenFields(args)...)} -} - -// Level reports the minimum enabled level for this logger. -// -// For NopLoggers, this is [zapcore.InvalidLevel]. -func (s *SugaredLogger) Level() zapcore.Level { - return zapcore.LevelOf(s.base.core) -} - -// Debug logs the provided arguments at [DebugLevel]. -// Spaces are added between arguments when neither is a string. -func (s *SugaredLogger) Debug(args ...interface{}) { - s.log(DebugLevel, "", args, nil) -} - -// Info logs the provided arguments at [InfoLevel]. -// Spaces are added between arguments when neither is a string. -func (s *SugaredLogger) Info(args ...interface{}) { - s.log(InfoLevel, "", args, nil) -} - -// Warn logs the provided arguments at [WarnLevel]. -// Spaces are added between arguments when neither is a string. -func (s *SugaredLogger) Warn(args ...interface{}) { - s.log(WarnLevel, "", args, nil) -} - -// Error logs the provided arguments at [ErrorLevel]. -// Spaces are added between arguments when neither is a string. -func (s *SugaredLogger) Error(args ...interface{}) { - s.log(ErrorLevel, "", args, nil) -} - -// DPanic logs the provided arguments at [DPanicLevel]. -// In development, the logger then panics. (See [DPanicLevel] for details.) -// Spaces are added between arguments when neither is a string. -func (s *SugaredLogger) DPanic(args ...interface{}) { - s.log(DPanicLevel, "", args, nil) -} - -// Panic constructs a message with the provided arguments and panics. -// Spaces are added between arguments when neither is a string. -func (s *SugaredLogger) Panic(args ...interface{}) { - s.log(PanicLevel, "", args, nil) -} - -// Fatal constructs a message with the provided arguments and calls os.Exit. -// Spaces are added between arguments when neither is a string. -func (s *SugaredLogger) Fatal(args ...interface{}) { - s.log(FatalLevel, "", args, nil) -} - -// Debugf formats the message according to the format specifier -// and logs it at [DebugLevel]. -func (s *SugaredLogger) Debugf(template string, args ...interface{}) { - s.log(DebugLevel, template, args, nil) -} - -// Infof formats the message according to the format specifier -// and logs it at [InfoLevel]. -func (s *SugaredLogger) Infof(template string, args ...interface{}) { - s.log(InfoLevel, template, args, nil) -} - -// Warnf formats the message according to the format specifier -// and logs it at [WarnLevel]. -func (s *SugaredLogger) Warnf(template string, args ...interface{}) { - s.log(WarnLevel, template, args, nil) -} - -// Errorf formats the message according to the format specifier -// and logs it at [ErrorLevel]. -func (s *SugaredLogger) Errorf(template string, args ...interface{}) { - s.log(ErrorLevel, template, args, nil) -} - -// DPanicf formats the message according to the format specifier -// and logs it at [DPanicLevel]. -// In development, the logger then panics. (See [DPanicLevel] for details.) -func (s *SugaredLogger) DPanicf(template string, args ...interface{}) { - s.log(DPanicLevel, template, args, nil) -} - -// Panicf formats the message according to the format specifier -// and panics. -func (s *SugaredLogger) Panicf(template string, args ...interface{}) { - s.log(PanicLevel, template, args, nil) -} - -// Fatalf formats the message according to the format specifier -// and calls os.Exit. -func (s *SugaredLogger) Fatalf(template string, args ...interface{}) { - s.log(FatalLevel, template, args, nil) -} - -// Debugw logs a message with some additional context. The variadic key-value -// pairs are treated as they are in With. -// -// When debug-level logging is disabled, this is much faster than -// -// s.With(keysAndValues).Debug(msg) -func (s *SugaredLogger) Debugw(msg string, keysAndValues ...interface{}) { - s.log(DebugLevel, msg, nil, keysAndValues) -} - -// Infow logs a message with some additional context. The variadic key-value -// pairs are treated as they are in With. -func (s *SugaredLogger) Infow(msg string, keysAndValues ...interface{}) { - s.log(InfoLevel, msg, nil, keysAndValues) -} - -// Warnw logs a message with some additional context. The variadic key-value -// pairs are treated as they are in With. -func (s *SugaredLogger) Warnw(msg string, keysAndValues ...interface{}) { - s.log(WarnLevel, msg, nil, keysAndValues) -} - -// Errorw logs a message with some additional context. The variadic key-value -// pairs are treated as they are in With. -func (s *SugaredLogger) Errorw(msg string, keysAndValues ...interface{}) { - s.log(ErrorLevel, msg, nil, keysAndValues) -} - -// DPanicw logs a message with some additional context. In development, the -// logger then panics. (See DPanicLevel for details.) The variadic key-value -// pairs are treated as they are in With. -func (s *SugaredLogger) DPanicw(msg string, keysAndValues ...interface{}) { - s.log(DPanicLevel, msg, nil, keysAndValues) -} - -// Panicw logs a message with some additional context, then panics. The -// variadic key-value pairs are treated as they are in With. -func (s *SugaredLogger) Panicw(msg string, keysAndValues ...interface{}) { - s.log(PanicLevel, msg, nil, keysAndValues) -} - -// Fatalw logs a message with some additional context, then calls os.Exit. The -// variadic key-value pairs are treated as they are in With. -func (s *SugaredLogger) Fatalw(msg string, keysAndValues ...interface{}) { - s.log(FatalLevel, msg, nil, keysAndValues) -} - -// Debugln logs a message at [DebugLevel]. -// Spaces are always added between arguments. -func (s *SugaredLogger) Debugln(args ...interface{}) { - s.logln(DebugLevel, args, nil) -} - -// Infoln logs a message at [InfoLevel]. -// Spaces are always added between arguments. -func (s *SugaredLogger) Infoln(args ...interface{}) { - s.logln(InfoLevel, args, nil) -} - -// Warnln logs a message at [WarnLevel]. -// Spaces are always added between arguments. -func (s *SugaredLogger) Warnln(args ...interface{}) { - s.logln(WarnLevel, args, nil) -} - -// Errorln logs a message at [ErrorLevel]. -// Spaces are always added between arguments. -func (s *SugaredLogger) Errorln(args ...interface{}) { - s.logln(ErrorLevel, args, nil) -} - -// DPanicln logs a message at [DPanicLevel]. -// In development, the logger then panics. (See [DPanicLevel] for details.) -// Spaces are always added between arguments. -func (s *SugaredLogger) DPanicln(args ...interface{}) { - s.logln(DPanicLevel, args, nil) -} - -// Panicln logs a message at [PanicLevel] and panics. -// Spaces are always added between arguments. -func (s *SugaredLogger) Panicln(args ...interface{}) { - s.logln(PanicLevel, args, nil) -} - -// Fatalln logs a message at [FatalLevel] and calls os.Exit. -// Spaces are always added between arguments. -func (s *SugaredLogger) Fatalln(args ...interface{}) { - s.logln(FatalLevel, args, nil) -} - -// Sync flushes any buffered log entries. -func (s *SugaredLogger) Sync() error { - return s.base.Sync() -} - -// log message with Sprint, Sprintf, or neither. -func (s *SugaredLogger) log(lvl zapcore.Level, template string, fmtArgs []interface{}, context []interface{}) { - // If logging at this level is completely disabled, skip the overhead of - // string formatting. - if lvl < DPanicLevel && !s.base.Core().Enabled(lvl) { - return - } - - msg := getMessage(template, fmtArgs) - if ce := s.base.Check(lvl, msg); ce != nil { - ce.Write(s.sweetenFields(context)...) - } -} - -// logln message with Sprintln -func (s *SugaredLogger) logln(lvl zapcore.Level, fmtArgs []interface{}, context []interface{}) { - if lvl < DPanicLevel && !s.base.Core().Enabled(lvl) { - return - } - - msg := getMessageln(fmtArgs) - if ce := s.base.Check(lvl, msg); ce != nil { - ce.Write(s.sweetenFields(context)...) - } -} - -// getMessage format with Sprint, Sprintf, or neither. -func getMessage(template string, fmtArgs []interface{}) string { - if len(fmtArgs) == 0 { - return template - } - - if template != "" { - return fmt.Sprintf(template, fmtArgs...) - } - - if len(fmtArgs) == 1 { - if str, ok := fmtArgs[0].(string); ok { - return str - } - } - return fmt.Sprint(fmtArgs...) -} - -// getMessageln format with Sprintln. -func getMessageln(fmtArgs []interface{}) string { - msg := fmt.Sprintln(fmtArgs...) - return msg[:len(msg)-1] -} - -func (s *SugaredLogger) sweetenFields(args []interface{}) []Field { - if len(args) == 0 { - return nil - } - - var ( - // Allocate enough space for the worst case; if users pass only structured - // fields, we shouldn't penalize them with extra allocations. - fields = make([]Field, 0, len(args)) - invalid invalidPairs - seenError bool - ) - - for i := 0; i < len(args); { - // This is a strongly-typed field. Consume it and move on. - if f, ok := args[i].(Field); ok { - fields = append(fields, f) - i++ - continue - } - - // If it is an error, consume it and move on. - if err, ok := args[i].(error); ok { - if !seenError { - seenError = true - fields = append(fields, Error(err)) - } else { - s.base.Error(_multipleErrMsg, Error(err)) - } - i++ - continue - } - - // Make sure this element isn't a dangling key. - if i == len(args)-1 { - s.base.Error(_oddNumberErrMsg, Any("ignored", args[i])) - break - } - - // Consume this value and the next, treating them as a key-value pair. If the - // key isn't a string, add this pair to the slice of invalid pairs. - key, val := args[i], args[i+1] - if keyStr, ok := key.(string); !ok { - // Subsequent errors are likely, so allocate once up front. - if cap(invalid) == 0 { - invalid = make(invalidPairs, 0, len(args)/2) - } - invalid = append(invalid, invalidPair{i, key, val}) - } else { - fields = append(fields, Any(keyStr, val)) - } - i += 2 - } - - // If we encountered any invalid key-value pairs, log an error. - if len(invalid) > 0 { - s.base.Error(_nonStringKeyErrMsg, Array("invalid", invalid)) - } - return fields -} - -type invalidPair struct { - position int - key, value interface{} -} - -func (p invalidPair) MarshalLogObject(enc zapcore.ObjectEncoder) error { - enc.AddInt64("position", int64(p.position)) - Any("key", p.key).AddTo(enc) - Any("value", p.value).AddTo(enc) - return nil -} - -type invalidPairs []invalidPair - -func (ps invalidPairs) MarshalLogArray(enc zapcore.ArrayEncoder) error { - var err error - for i := range ps { - err = multierr.Append(err, enc.AppendObject(ps[i])) - } - return err -} diff --git a/vendor/go.uber.org/zap/time.go b/vendor/go.uber.org/zap/time.go deleted file mode 100644 index c5a1f162259..00000000000 --- a/vendor/go.uber.org/zap/time.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zap - -import "time" - -func timeToMillis(t time.Time) int64 { - return t.UnixNano() / int64(time.Millisecond) -} diff --git a/vendor/go.uber.org/zap/writer.go b/vendor/go.uber.org/zap/writer.go deleted file mode 100644 index 06768c67919..00000000000 --- a/vendor/go.uber.org/zap/writer.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2016-2022 Uber Technologies, Inc. -// -// 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. - -package zap - -import ( - "fmt" - "io" - - "go.uber.org/zap/zapcore" - - "go.uber.org/multierr" -) - -// Open is a high-level wrapper that takes a variadic number of URLs, opens or -// creates each of the specified resources, and combines them into a locked -// WriteSyncer. It also returns any error encountered and a function to close -// any opened files. -// -// Passing no URLs returns a no-op WriteSyncer. Zap handles URLs without a -// scheme and URLs with the "file" scheme. Third-party code may register -// factories for other schemes using RegisterSink. -// -// URLs with the "file" scheme must use absolute paths on the local -// filesystem. No user, password, port, fragments, or query parameters are -// allowed, and the hostname must be empty or "localhost". -// -// Since it's common to write logs to the local filesystem, URLs without a -// scheme (e.g., "/var/log/foo.log") are treated as local file paths. Without -// a scheme, the special paths "stdout" and "stderr" are interpreted as -// os.Stdout and os.Stderr. When specified without a scheme, relative file -// paths also work. -func Open(paths ...string) (zapcore.WriteSyncer, func(), error) { - writers, closeAll, err := open(paths) - if err != nil { - return nil, nil, err - } - - writer := CombineWriteSyncers(writers...) - return writer, closeAll, nil -} - -func open(paths []string) ([]zapcore.WriteSyncer, func(), error) { - writers := make([]zapcore.WriteSyncer, 0, len(paths)) - closers := make([]io.Closer, 0, len(paths)) - closeAll := func() { - for _, c := range closers { - _ = c.Close() - } - } - - var openErr error - for _, path := range paths { - sink, err := _sinkRegistry.newSink(path) - if err != nil { - openErr = multierr.Append(openErr, fmt.Errorf("open sink %q: %w", path, err)) - continue - } - writers = append(writers, sink) - closers = append(closers, sink) - } - if openErr != nil { - closeAll() - return nil, nil, openErr - } - - return writers, closeAll, nil -} - -// CombineWriteSyncers is a utility that combines multiple WriteSyncers into a -// single, locked WriteSyncer. If no inputs are supplied, it returns a no-op -// WriteSyncer. -// -// It's provided purely as a convenience; the result is no different from -// using zapcore.NewMultiWriteSyncer and zapcore.Lock individually. -func CombineWriteSyncers(writers ...zapcore.WriteSyncer) zapcore.WriteSyncer { - if len(writers) == 0 { - return zapcore.AddSync(io.Discard) - } - return zapcore.Lock(zapcore.NewMultiWriteSyncer(writers...)) -} diff --git a/vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go b/vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go deleted file mode 100644 index a40e93b3ec8..00000000000 --- a/vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import ( - "bufio" - "sync" - "time" - - "go.uber.org/multierr" -) - -const ( - // _defaultBufferSize specifies the default size used by Buffer. - _defaultBufferSize = 256 * 1024 // 256 kB - - // _defaultFlushInterval specifies the default flush interval for - // Buffer. - _defaultFlushInterval = 30 * time.Second -) - -// A BufferedWriteSyncer is a WriteSyncer that buffers writes in-memory before -// flushing them to a wrapped WriteSyncer after reaching some limit, or at some -// fixed interval--whichever comes first. -// -// BufferedWriteSyncer is safe for concurrent use. You don't need to use -// zapcore.Lock for WriteSyncers with BufferedWriteSyncer. -// -// To set up a BufferedWriteSyncer, construct a WriteSyncer for your log -// destination (*os.File is a valid WriteSyncer), wrap it with -// BufferedWriteSyncer, and defer a Stop() call for when you no longer need the -// object. -// -// func main() { -// ws := ... // your log destination -// bws := &zapcore.BufferedWriteSyncer{WS: ws} -// defer bws.Stop() -// -// // ... -// core := zapcore.NewCore(enc, bws, lvl) -// logger := zap.New(core) -// -// // ... -// } -// -// By default, a BufferedWriteSyncer will buffer up to 256 kilobytes of logs, -// waiting at most 30 seconds between flushes. -// You can customize these parameters by setting the Size or FlushInterval -// fields. -// For example, the following buffers up to 512 kB of logs before flushing them -// to Stderr, with a maximum of one minute between each flush. -// -// ws := &BufferedWriteSyncer{ -// WS: os.Stderr, -// Size: 512 * 1024, // 512 kB -// FlushInterval: time.Minute, -// } -// defer ws.Stop() -type BufferedWriteSyncer struct { - // WS is the WriteSyncer around which BufferedWriteSyncer will buffer - // writes. - // - // This field is required. - WS WriteSyncer - - // Size specifies the maximum amount of data the writer will buffered - // before flushing. - // - // Defaults to 256 kB if unspecified. - Size int - - // FlushInterval specifies how often the writer should flush data if - // there have been no writes. - // - // Defaults to 30 seconds if unspecified. - FlushInterval time.Duration - - // Clock, if specified, provides control of the source of time for the - // writer. - // - // Defaults to the system clock. - Clock Clock - - // unexported fields for state - mu sync.Mutex - initialized bool // whether initialize() has run - stopped bool // whether Stop() has run - writer *bufio.Writer - ticker *time.Ticker - stop chan struct{} // closed when flushLoop should stop - done chan struct{} // closed when flushLoop has stopped -} - -func (s *BufferedWriteSyncer) initialize() { - size := s.Size - if size == 0 { - size = _defaultBufferSize - } - - flushInterval := s.FlushInterval - if flushInterval == 0 { - flushInterval = _defaultFlushInterval - } - - if s.Clock == nil { - s.Clock = DefaultClock - } - - s.ticker = s.Clock.NewTicker(flushInterval) - s.writer = bufio.NewWriterSize(s.WS, size) - s.stop = make(chan struct{}) - s.done = make(chan struct{}) - s.initialized = true - go s.flushLoop() -} - -// Write writes log data into buffer syncer directly, multiple Write calls will be batched, -// and log data will be flushed to disk when the buffer is full or periodically. -func (s *BufferedWriteSyncer) Write(bs []byte) (int, error) { - s.mu.Lock() - defer s.mu.Unlock() - - if !s.initialized { - s.initialize() - } - - // To avoid partial writes from being flushed, we manually flush the existing buffer if: - // * The current write doesn't fit into the buffer fully, and - // * The buffer is not empty (since bufio will not split large writes when the buffer is empty) - if len(bs) > s.writer.Available() && s.writer.Buffered() > 0 { - if err := s.writer.Flush(); err != nil { - return 0, err - } - } - - return s.writer.Write(bs) -} - -// Sync flushes buffered log data into disk directly. -func (s *BufferedWriteSyncer) Sync() error { - s.mu.Lock() - defer s.mu.Unlock() - - var err error - if s.initialized { - err = s.writer.Flush() - } - - return multierr.Append(err, s.WS.Sync()) -} - -// flushLoop flushes the buffer at the configured interval until Stop is -// called. -func (s *BufferedWriteSyncer) flushLoop() { - defer close(s.done) - - for { - select { - case <-s.ticker.C: - // we just simply ignore error here - // because the underlying bufio writer stores any errors - // and we return any error from Sync() as part of the close - _ = s.Sync() - case <-s.stop: - return - } - } -} - -// Stop closes the buffer, cleans up background goroutines, and flushes -// remaining unwritten data. -func (s *BufferedWriteSyncer) Stop() (err error) { - var stopped bool - - // Critical section. - func() { - s.mu.Lock() - defer s.mu.Unlock() - - if !s.initialized { - return - } - - stopped = s.stopped - if stopped { - return - } - s.stopped = true - - s.ticker.Stop() - close(s.stop) // tell flushLoop to stop - <-s.done // and wait until it has - }() - - // Don't call Sync on consecutive Stops. - if !stopped { - err = s.Sync() - } - - return err -} diff --git a/vendor/go.uber.org/zap/zapcore/clock.go b/vendor/go.uber.org/zap/zapcore/clock.go deleted file mode 100644 index 422fd82a6b0..00000000000 --- a/vendor/go.uber.org/zap/zapcore/clock.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import "time" - -// DefaultClock is the default clock used by Zap in operations that require -// time. This clock uses the system clock for all operations. -var DefaultClock = systemClock{} - -// Clock is a source of time for logged entries. -type Clock interface { - // Now returns the current local time. - Now() time.Time - - // NewTicker returns *time.Ticker that holds a channel - // that delivers "ticks" of a clock. - NewTicker(time.Duration) *time.Ticker -} - -// systemClock implements default Clock that uses system time. -type systemClock struct{} - -func (systemClock) Now() time.Time { - return time.Now() -} - -func (systemClock) NewTicker(duration time.Duration) *time.Ticker { - return time.NewTicker(duration) -} diff --git a/vendor/go.uber.org/zap/zapcore/console_encoder.go b/vendor/go.uber.org/zap/zapcore/console_encoder.go deleted file mode 100644 index 8ca0bfaf561..00000000000 --- a/vendor/go.uber.org/zap/zapcore/console_encoder.go +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import ( - "fmt" - - "go.uber.org/zap/buffer" - "go.uber.org/zap/internal/bufferpool" - "go.uber.org/zap/internal/pool" -) - -var _sliceEncoderPool = pool.New(func() *sliceArrayEncoder { - return &sliceArrayEncoder{ - elems: make([]interface{}, 0, 2), - } -}) - -func getSliceEncoder() *sliceArrayEncoder { - return _sliceEncoderPool.Get() -} - -func putSliceEncoder(e *sliceArrayEncoder) { - e.elems = e.elems[:0] - _sliceEncoderPool.Put(e) -} - -type consoleEncoder struct { - *jsonEncoder -} - -// NewConsoleEncoder creates an encoder whose output is designed for human - -// rather than machine - consumption. It serializes the core log entry data -// (message, level, timestamp, etc.) in a plain-text format and leaves the -// structured context as JSON. -// -// Note that although the console encoder doesn't use the keys specified in the -// encoder configuration, it will omit any element whose key is set to the empty -// string. -func NewConsoleEncoder(cfg EncoderConfig) Encoder { - if cfg.ConsoleSeparator == "" { - // Use a default delimiter of '\t' for backwards compatibility - cfg.ConsoleSeparator = "\t" - } - return consoleEncoder{newJSONEncoder(cfg, true)} -} - -func (c consoleEncoder) Clone() Encoder { - return consoleEncoder{c.jsonEncoder.Clone().(*jsonEncoder)} -} - -func (c consoleEncoder) EncodeEntry(ent Entry, fields []Field) (*buffer.Buffer, error) { - line := bufferpool.Get() - - // We don't want the entry's metadata to be quoted and escaped (if it's - // encoded as strings), which means that we can't use the JSON encoder. The - // simplest option is to use the memory encoder and fmt.Fprint. - // - // If this ever becomes a performance bottleneck, we can implement - // ArrayEncoder for our plain-text format. - arr := getSliceEncoder() - if c.TimeKey != "" && c.EncodeTime != nil { - c.EncodeTime(ent.Time, arr) - } - if c.LevelKey != "" && c.EncodeLevel != nil { - c.EncodeLevel(ent.Level, arr) - } - if ent.LoggerName != "" && c.NameKey != "" { - nameEncoder := c.EncodeName - - if nameEncoder == nil { - // Fall back to FullNameEncoder for backward compatibility. - nameEncoder = FullNameEncoder - } - - nameEncoder(ent.LoggerName, arr) - } - if ent.Caller.Defined { - if c.CallerKey != "" && c.EncodeCaller != nil { - c.EncodeCaller(ent.Caller, arr) - } - if c.FunctionKey != "" { - arr.AppendString(ent.Caller.Function) - } - } - for i := range arr.elems { - if i > 0 { - line.AppendString(c.ConsoleSeparator) - } - fmt.Fprint(line, arr.elems[i]) - } - putSliceEncoder(arr) - - // Add the message itself. - if c.MessageKey != "" { - c.addSeparatorIfNecessary(line) - line.AppendString(ent.Message) - } - - // Add any structured context. - c.writeContext(line, fields) - - // If there's no stacktrace key, honor that; this allows users to force - // single-line output. - if ent.Stack != "" && c.StacktraceKey != "" { - line.AppendByte('\n') - line.AppendString(ent.Stack) - } - - line.AppendString(c.LineEnding) - return line, nil -} - -func (c consoleEncoder) writeContext(line *buffer.Buffer, extra []Field) { - context := c.jsonEncoder.Clone().(*jsonEncoder) - defer func() { - // putJSONEncoder assumes the buffer is still used, but we write out the buffer so - // we can free it. - context.buf.Free() - putJSONEncoder(context) - }() - - addFields(context, extra) - context.closeOpenNamespaces() - if context.buf.Len() == 0 { - return - } - - c.addSeparatorIfNecessary(line) - line.AppendByte('{') - line.Write(context.buf.Bytes()) - line.AppendByte('}') -} - -func (c consoleEncoder) addSeparatorIfNecessary(line *buffer.Buffer) { - if line.Len() > 0 { - line.AppendString(c.ConsoleSeparator) - } -} diff --git a/vendor/go.uber.org/zap/zapcore/core.go b/vendor/go.uber.org/zap/zapcore/core.go deleted file mode 100644 index 776e93f6f35..00000000000 --- a/vendor/go.uber.org/zap/zapcore/core.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -// Core is a minimal, fast logger interface. It's designed for library authors -// to wrap in a more user-friendly API. -type Core interface { - LevelEnabler - - // With adds structured context to the Core. - With([]Field) Core - // Check determines whether the supplied Entry should be logged (using the - // embedded LevelEnabler and possibly some extra logic). If the entry - // should be logged, the Core adds itself to the CheckedEntry and returns - // the result. - // - // Callers must use Check before calling Write. - Check(Entry, *CheckedEntry) *CheckedEntry - // Write serializes the Entry and any Fields supplied at the log site and - // writes them to their destination. - // - // If called, Write should always log the Entry and Fields; it should not - // replicate the logic of Check. - Write(Entry, []Field) error - // Sync flushes buffered logs (if any). - Sync() error -} - -type nopCore struct{} - -// NewNopCore returns a no-op Core. -func NewNopCore() Core { return nopCore{} } -func (nopCore) Enabled(Level) bool { return false } -func (n nopCore) With([]Field) Core { return n } -func (nopCore) Check(_ Entry, ce *CheckedEntry) *CheckedEntry { return ce } -func (nopCore) Write(Entry, []Field) error { return nil } -func (nopCore) Sync() error { return nil } - -// NewCore creates a Core that writes logs to a WriteSyncer. -func NewCore(enc Encoder, ws WriteSyncer, enab LevelEnabler) Core { - return &ioCore{ - LevelEnabler: enab, - enc: enc, - out: ws, - } -} - -type ioCore struct { - LevelEnabler - enc Encoder - out WriteSyncer -} - -var ( - _ Core = (*ioCore)(nil) - _ leveledEnabler = (*ioCore)(nil) -) - -func (c *ioCore) Level() Level { - return LevelOf(c.LevelEnabler) -} - -func (c *ioCore) With(fields []Field) Core { - clone := c.clone() - addFields(clone.enc, fields) - return clone -} - -func (c *ioCore) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { - if c.Enabled(ent.Level) { - return ce.AddCore(ent, c) - } - return ce -} - -func (c *ioCore) Write(ent Entry, fields []Field) error { - buf, err := c.enc.EncodeEntry(ent, fields) - if err != nil { - return err - } - _, err = c.out.Write(buf.Bytes()) - buf.Free() - if err != nil { - return err - } - if ent.Level > ErrorLevel { - // Since we may be crashing the program, sync the output. - // Ignore Sync errors, pending a clean solution to issue #370. - _ = c.Sync() - } - return nil -} - -func (c *ioCore) Sync() error { - return c.out.Sync() -} - -func (c *ioCore) clone() *ioCore { - return &ioCore{ - LevelEnabler: c.LevelEnabler, - enc: c.enc.Clone(), - out: c.out, - } -} diff --git a/vendor/go.uber.org/zap/zapcore/doc.go b/vendor/go.uber.org/zap/zapcore/doc.go deleted file mode 100644 index 31000e91f70..00000000000 --- a/vendor/go.uber.org/zap/zapcore/doc.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -// Package zapcore defines and implements the low-level interfaces upon which -// zap is built. By providing alternate implementations of these interfaces, -// external packages can extend zap's capabilities. -package zapcore // import "go.uber.org/zap/zapcore" diff --git a/vendor/go.uber.org/zap/zapcore/encoder.go b/vendor/go.uber.org/zap/zapcore/encoder.go deleted file mode 100644 index 5769ff3e4e5..00000000000 --- a/vendor/go.uber.org/zap/zapcore/encoder.go +++ /dev/null @@ -1,451 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import ( - "encoding/json" - "io" - "time" - - "go.uber.org/zap/buffer" -) - -// DefaultLineEnding defines the default line ending when writing logs. -// Alternate line endings specified in EncoderConfig can override this -// behavior. -const DefaultLineEnding = "\n" - -// OmitKey defines the key to use when callers want to remove a key from log output. -const OmitKey = "" - -// A LevelEncoder serializes a Level to a primitive type. -type LevelEncoder func(Level, PrimitiveArrayEncoder) - -// LowercaseLevelEncoder serializes a Level to a lowercase string. For example, -// InfoLevel is serialized to "info". -func LowercaseLevelEncoder(l Level, enc PrimitiveArrayEncoder) { - enc.AppendString(l.String()) -} - -// LowercaseColorLevelEncoder serializes a Level to a lowercase string and adds coloring. -// For example, InfoLevel is serialized to "info" and colored blue. -func LowercaseColorLevelEncoder(l Level, enc PrimitiveArrayEncoder) { - s, ok := _levelToLowercaseColorString[l] - if !ok { - s = _unknownLevelColor.Add(l.String()) - } - enc.AppendString(s) -} - -// CapitalLevelEncoder serializes a Level to an all-caps string. For example, -// InfoLevel is serialized to "INFO". -func CapitalLevelEncoder(l Level, enc PrimitiveArrayEncoder) { - enc.AppendString(l.CapitalString()) -} - -// CapitalColorLevelEncoder serializes a Level to an all-caps string and adds color. -// For example, InfoLevel is serialized to "INFO" and colored blue. -func CapitalColorLevelEncoder(l Level, enc PrimitiveArrayEncoder) { - s, ok := _levelToCapitalColorString[l] - if !ok { - s = _unknownLevelColor.Add(l.CapitalString()) - } - enc.AppendString(s) -} - -// UnmarshalText unmarshals text to a LevelEncoder. "capital" is unmarshaled to -// CapitalLevelEncoder, "coloredCapital" is unmarshaled to CapitalColorLevelEncoder, -// "colored" is unmarshaled to LowercaseColorLevelEncoder, and anything else -// is unmarshaled to LowercaseLevelEncoder. -func (e *LevelEncoder) UnmarshalText(text []byte) error { - switch string(text) { - case "capital": - *e = CapitalLevelEncoder - case "capitalColor": - *e = CapitalColorLevelEncoder - case "color": - *e = LowercaseColorLevelEncoder - default: - *e = LowercaseLevelEncoder - } - return nil -} - -// A TimeEncoder serializes a time.Time to a primitive type. -type TimeEncoder func(time.Time, PrimitiveArrayEncoder) - -// EpochTimeEncoder serializes a time.Time to a floating-point number of seconds -// since the Unix epoch. -func EpochTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { - nanos := t.UnixNano() - sec := float64(nanos) / float64(time.Second) - enc.AppendFloat64(sec) -} - -// EpochMillisTimeEncoder serializes a time.Time to a floating-point number of -// milliseconds since the Unix epoch. -func EpochMillisTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { - nanos := t.UnixNano() - millis := float64(nanos) / float64(time.Millisecond) - enc.AppendFloat64(millis) -} - -// EpochNanosTimeEncoder serializes a time.Time to an integer number of -// nanoseconds since the Unix epoch. -func EpochNanosTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { - enc.AppendInt64(t.UnixNano()) -} - -func encodeTimeLayout(t time.Time, layout string, enc PrimitiveArrayEncoder) { - type appendTimeEncoder interface { - AppendTimeLayout(time.Time, string) - } - - if enc, ok := enc.(appendTimeEncoder); ok { - enc.AppendTimeLayout(t, layout) - return - } - - enc.AppendString(t.Format(layout)) -} - -// ISO8601TimeEncoder serializes a time.Time to an ISO8601-formatted string -// with millisecond precision. -// -// If enc supports AppendTimeLayout(t time.Time,layout string), it's used -// instead of appending a pre-formatted string value. -func ISO8601TimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { - encodeTimeLayout(t, "2006-01-02T15:04:05.000Z0700", enc) -} - -// RFC3339TimeEncoder serializes a time.Time to an RFC3339-formatted string. -// -// If enc supports AppendTimeLayout(t time.Time,layout string), it's used -// instead of appending a pre-formatted string value. -func RFC3339TimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { - encodeTimeLayout(t, time.RFC3339, enc) -} - -// RFC3339NanoTimeEncoder serializes a time.Time to an RFC3339-formatted string -// with nanosecond precision. -// -// If enc supports AppendTimeLayout(t time.Time,layout string), it's used -// instead of appending a pre-formatted string value. -func RFC3339NanoTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) { - encodeTimeLayout(t, time.RFC3339Nano, enc) -} - -// TimeEncoderOfLayout returns TimeEncoder which serializes a time.Time using -// given layout. -func TimeEncoderOfLayout(layout string) TimeEncoder { - return func(t time.Time, enc PrimitiveArrayEncoder) { - encodeTimeLayout(t, layout, enc) - } -} - -// UnmarshalText unmarshals text to a TimeEncoder. -// "rfc3339nano" and "RFC3339Nano" are unmarshaled to RFC3339NanoTimeEncoder. -// "rfc3339" and "RFC3339" are unmarshaled to RFC3339TimeEncoder. -// "iso8601" and "ISO8601" are unmarshaled to ISO8601TimeEncoder. -// "millis" is unmarshaled to EpochMillisTimeEncoder. -// "nanos" is unmarshaled to EpochNanosEncoder. -// Anything else is unmarshaled to EpochTimeEncoder. -func (e *TimeEncoder) UnmarshalText(text []byte) error { - switch string(text) { - case "rfc3339nano", "RFC3339Nano": - *e = RFC3339NanoTimeEncoder - case "rfc3339", "RFC3339": - *e = RFC3339TimeEncoder - case "iso8601", "ISO8601": - *e = ISO8601TimeEncoder - case "millis": - *e = EpochMillisTimeEncoder - case "nanos": - *e = EpochNanosTimeEncoder - default: - *e = EpochTimeEncoder - } - return nil -} - -// UnmarshalYAML unmarshals YAML to a TimeEncoder. -// If value is an object with a "layout" field, it will be unmarshaled to TimeEncoder with given layout. -// -// timeEncoder: -// layout: 06/01/02 03:04pm -// -// If value is string, it uses UnmarshalText. -// -// timeEncoder: iso8601 -func (e *TimeEncoder) UnmarshalYAML(unmarshal func(interface{}) error) error { - var o struct { - Layout string `json:"layout" yaml:"layout"` - } - if err := unmarshal(&o); err == nil { - *e = TimeEncoderOfLayout(o.Layout) - return nil - } - - var s string - if err := unmarshal(&s); err != nil { - return err - } - return e.UnmarshalText([]byte(s)) -} - -// UnmarshalJSON unmarshals JSON to a TimeEncoder as same way UnmarshalYAML does. -func (e *TimeEncoder) UnmarshalJSON(data []byte) error { - return e.UnmarshalYAML(func(v interface{}) error { - return json.Unmarshal(data, v) - }) -} - -// A DurationEncoder serializes a time.Duration to a primitive type. -type DurationEncoder func(time.Duration, PrimitiveArrayEncoder) - -// SecondsDurationEncoder serializes a time.Duration to a floating-point number of seconds elapsed. -func SecondsDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) { - enc.AppendFloat64(float64(d) / float64(time.Second)) -} - -// NanosDurationEncoder serializes a time.Duration to an integer number of -// nanoseconds elapsed. -func NanosDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) { - enc.AppendInt64(int64(d)) -} - -// MillisDurationEncoder serializes a time.Duration to an integer number of -// milliseconds elapsed. -func MillisDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) { - enc.AppendInt64(d.Nanoseconds() / 1e6) -} - -// StringDurationEncoder serializes a time.Duration using its built-in String -// method. -func StringDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) { - enc.AppendString(d.String()) -} - -// UnmarshalText unmarshals text to a DurationEncoder. "string" is unmarshaled -// to StringDurationEncoder, and anything else is unmarshaled to -// NanosDurationEncoder. -func (e *DurationEncoder) UnmarshalText(text []byte) error { - switch string(text) { - case "string": - *e = StringDurationEncoder - case "nanos": - *e = NanosDurationEncoder - case "ms": - *e = MillisDurationEncoder - default: - *e = SecondsDurationEncoder - } - return nil -} - -// A CallerEncoder serializes an EntryCaller to a primitive type. -type CallerEncoder func(EntryCaller, PrimitiveArrayEncoder) - -// FullCallerEncoder serializes a caller in /full/path/to/package/file:line -// format. -func FullCallerEncoder(caller EntryCaller, enc PrimitiveArrayEncoder) { - // TODO: consider using a byte-oriented API to save an allocation. - enc.AppendString(caller.String()) -} - -// ShortCallerEncoder serializes a caller in package/file:line format, trimming -// all but the final directory from the full path. -func ShortCallerEncoder(caller EntryCaller, enc PrimitiveArrayEncoder) { - // TODO: consider using a byte-oriented API to save an allocation. - enc.AppendString(caller.TrimmedPath()) -} - -// UnmarshalText unmarshals text to a CallerEncoder. "full" is unmarshaled to -// FullCallerEncoder and anything else is unmarshaled to ShortCallerEncoder. -func (e *CallerEncoder) UnmarshalText(text []byte) error { - switch string(text) { - case "full": - *e = FullCallerEncoder - default: - *e = ShortCallerEncoder - } - return nil -} - -// A NameEncoder serializes a period-separated logger name to a primitive -// type. -type NameEncoder func(string, PrimitiveArrayEncoder) - -// FullNameEncoder serializes the logger name as-is. -func FullNameEncoder(loggerName string, enc PrimitiveArrayEncoder) { - enc.AppendString(loggerName) -} - -// UnmarshalText unmarshals text to a NameEncoder. Currently, everything is -// unmarshaled to FullNameEncoder. -func (e *NameEncoder) UnmarshalText(text []byte) error { - switch string(text) { - case "full": - *e = FullNameEncoder - default: - *e = FullNameEncoder - } - return nil -} - -// An EncoderConfig allows users to configure the concrete encoders supplied by -// zapcore. -type EncoderConfig struct { - // Set the keys used for each log entry. If any key is empty, that portion - // of the entry is omitted. - MessageKey string `json:"messageKey" yaml:"messageKey"` - LevelKey string `json:"levelKey" yaml:"levelKey"` - TimeKey string `json:"timeKey" yaml:"timeKey"` - NameKey string `json:"nameKey" yaml:"nameKey"` - CallerKey string `json:"callerKey" yaml:"callerKey"` - FunctionKey string `json:"functionKey" yaml:"functionKey"` - StacktraceKey string `json:"stacktraceKey" yaml:"stacktraceKey"` - SkipLineEnding bool `json:"skipLineEnding" yaml:"skipLineEnding"` - LineEnding string `json:"lineEnding" yaml:"lineEnding"` - // Configure the primitive representations of common complex types. For - // example, some users may want all time.Times serialized as floating-point - // seconds since epoch, while others may prefer ISO8601 strings. - EncodeLevel LevelEncoder `json:"levelEncoder" yaml:"levelEncoder"` - EncodeTime TimeEncoder `json:"timeEncoder" yaml:"timeEncoder"` - EncodeDuration DurationEncoder `json:"durationEncoder" yaml:"durationEncoder"` - EncodeCaller CallerEncoder `json:"callerEncoder" yaml:"callerEncoder"` - // Unlike the other primitive type encoders, EncodeName is optional. The - // zero value falls back to FullNameEncoder. - EncodeName NameEncoder `json:"nameEncoder" yaml:"nameEncoder"` - // Configure the encoder for interface{} type objects. - // If not provided, objects are encoded using json.Encoder - NewReflectedEncoder func(io.Writer) ReflectedEncoder `json:"-" yaml:"-"` - // Configures the field separator used by the console encoder. Defaults - // to tab. - ConsoleSeparator string `json:"consoleSeparator" yaml:"consoleSeparator"` -} - -// ObjectEncoder is a strongly-typed, encoding-agnostic interface for adding a -// map- or struct-like object to the logging context. Like maps, ObjectEncoders -// aren't safe for concurrent use (though typical use shouldn't require locks). -type ObjectEncoder interface { - // Logging-specific marshalers. - AddArray(key string, marshaler ArrayMarshaler) error - AddObject(key string, marshaler ObjectMarshaler) error - - // Built-in types. - AddBinary(key string, value []byte) // for arbitrary bytes - AddByteString(key string, value []byte) // for UTF-8 encoded bytes - AddBool(key string, value bool) - AddComplex128(key string, value complex128) - AddComplex64(key string, value complex64) - AddDuration(key string, value time.Duration) - AddFloat64(key string, value float64) - AddFloat32(key string, value float32) - AddInt(key string, value int) - AddInt64(key string, value int64) - AddInt32(key string, value int32) - AddInt16(key string, value int16) - AddInt8(key string, value int8) - AddString(key, value string) - AddTime(key string, value time.Time) - AddUint(key string, value uint) - AddUint64(key string, value uint64) - AddUint32(key string, value uint32) - AddUint16(key string, value uint16) - AddUint8(key string, value uint8) - AddUintptr(key string, value uintptr) - - // AddReflected uses reflection to serialize arbitrary objects, so it can be - // slow and allocation-heavy. - AddReflected(key string, value interface{}) error - // OpenNamespace opens an isolated namespace where all subsequent fields will - // be added. Applications can use namespaces to prevent key collisions when - // injecting loggers into sub-components or third-party libraries. - OpenNamespace(key string) -} - -// ArrayEncoder is a strongly-typed, encoding-agnostic interface for adding -// array-like objects to the logging context. Of note, it supports mixed-type -// arrays even though they aren't typical in Go. Like slices, ArrayEncoders -// aren't safe for concurrent use (though typical use shouldn't require locks). -type ArrayEncoder interface { - // Built-in types. - PrimitiveArrayEncoder - - // Time-related types. - AppendDuration(time.Duration) - AppendTime(time.Time) - - // Logging-specific marshalers. - AppendArray(ArrayMarshaler) error - AppendObject(ObjectMarshaler) error - - // AppendReflected uses reflection to serialize arbitrary objects, so it's - // slow and allocation-heavy. - AppendReflected(value interface{}) error -} - -// PrimitiveArrayEncoder is the subset of the ArrayEncoder interface that deals -// only in Go's built-in types. It's included only so that Duration- and -// TimeEncoders cannot trigger infinite recursion. -type PrimitiveArrayEncoder interface { - // Built-in types. - AppendBool(bool) - AppendByteString([]byte) // for UTF-8 encoded bytes - AppendComplex128(complex128) - AppendComplex64(complex64) - AppendFloat64(float64) - AppendFloat32(float32) - AppendInt(int) - AppendInt64(int64) - AppendInt32(int32) - AppendInt16(int16) - AppendInt8(int8) - AppendString(string) - AppendUint(uint) - AppendUint64(uint64) - AppendUint32(uint32) - AppendUint16(uint16) - AppendUint8(uint8) - AppendUintptr(uintptr) -} - -// Encoder is a format-agnostic interface for all log entry marshalers. Since -// log encoders don't need to support the same wide range of use cases as -// general-purpose marshalers, it's possible to make them faster and -// lower-allocation. -// -// Implementations of the ObjectEncoder interface's methods can, of course, -// freely modify the receiver. However, the Clone and EncodeEntry methods will -// be called concurrently and shouldn't modify the receiver. -type Encoder interface { - ObjectEncoder - - // Clone copies the encoder, ensuring that adding fields to the copy doesn't - // affect the original. - Clone() Encoder - - // EncodeEntry encodes an entry and fields, along with any accumulated - // context, into a byte buffer and returns it. Any fields that are empty, - // including fields on the `Entry` type, should be omitted. - EncodeEntry(Entry, []Field) (*buffer.Buffer, error) -} diff --git a/vendor/go.uber.org/zap/zapcore/entry.go b/vendor/go.uber.org/zap/zapcore/entry.go deleted file mode 100644 index 459a5d7ce3c..00000000000 --- a/vendor/go.uber.org/zap/zapcore/entry.go +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import ( - "fmt" - "runtime" - "strings" - "time" - - "go.uber.org/multierr" - "go.uber.org/zap/internal/bufferpool" - "go.uber.org/zap/internal/exit" - "go.uber.org/zap/internal/pool" -) - -var _cePool = pool.New(func() *CheckedEntry { - // Pre-allocate some space for cores. - return &CheckedEntry{ - cores: make([]Core, 4), - } -}) - -func getCheckedEntry() *CheckedEntry { - ce := _cePool.Get() - ce.reset() - return ce -} - -func putCheckedEntry(ce *CheckedEntry) { - if ce == nil { - return - } - _cePool.Put(ce) -} - -// NewEntryCaller makes an EntryCaller from the return signature of -// runtime.Caller. -func NewEntryCaller(pc uintptr, file string, line int, ok bool) EntryCaller { - if !ok { - return EntryCaller{} - } - return EntryCaller{ - PC: pc, - File: file, - Line: line, - Defined: true, - } -} - -// EntryCaller represents the caller of a logging function. -type EntryCaller struct { - Defined bool - PC uintptr - File string - Line int - Function string -} - -// String returns the full path and line number of the caller. -func (ec EntryCaller) String() string { - return ec.FullPath() -} - -// FullPath returns a /full/path/to/package/file:line description of the -// caller. -func (ec EntryCaller) FullPath() string { - if !ec.Defined { - return "undefined" - } - buf := bufferpool.Get() - buf.AppendString(ec.File) - buf.AppendByte(':') - buf.AppendInt(int64(ec.Line)) - caller := buf.String() - buf.Free() - return caller -} - -// TrimmedPath returns a package/file:line description of the caller, -// preserving only the leaf directory name and file name. -func (ec EntryCaller) TrimmedPath() string { - if !ec.Defined { - return "undefined" - } - // nb. To make sure we trim the path correctly on Windows too, we - // counter-intuitively need to use '/' and *not* os.PathSeparator here, - // because the path given originates from Go stdlib, specifically - // runtime.Caller() which (as of Mar/17) returns forward slashes even on - // Windows. - // - // See https://github.com/golang/go/issues/3335 - // and https://github.com/golang/go/issues/18151 - // - // for discussion on the issue on Go side. - // - // Find the last separator. - // - idx := strings.LastIndexByte(ec.File, '/') - if idx == -1 { - return ec.FullPath() - } - // Find the penultimate separator. - idx = strings.LastIndexByte(ec.File[:idx], '/') - if idx == -1 { - return ec.FullPath() - } - buf := bufferpool.Get() - // Keep everything after the penultimate separator. - buf.AppendString(ec.File[idx+1:]) - buf.AppendByte(':') - buf.AppendInt(int64(ec.Line)) - caller := buf.String() - buf.Free() - return caller -} - -// An Entry represents a complete log message. The entry's structured context -// is already serialized, but the log level, time, message, and call site -// information are available for inspection and modification. Any fields left -// empty will be omitted when encoding. -// -// Entries are pooled, so any functions that accept them MUST be careful not to -// retain references to them. -type Entry struct { - Level Level - Time time.Time - LoggerName string - Message string - Caller EntryCaller - Stack string -} - -// CheckWriteHook is a custom action that may be executed after an entry is -// written. -// -// Register one on a CheckedEntry with the After method. -// -// if ce := logger.Check(...); ce != nil { -// ce = ce.After(hook) -// ce.Write(...) -// } -// -// You can configure the hook for Fatal log statements at the logger level with -// the zap.WithFatalHook option. -type CheckWriteHook interface { - // OnWrite is invoked with the CheckedEntry that was written and a list - // of fields added with that entry. - // - // The list of fields DOES NOT include fields that were already added - // to the logger with the With method. - OnWrite(*CheckedEntry, []Field) -} - -// CheckWriteAction indicates what action to take after a log entry is -// processed. Actions are ordered in increasing severity. -type CheckWriteAction uint8 - -const ( - // WriteThenNoop indicates that nothing special needs to be done. It's the - // default behavior. - WriteThenNoop CheckWriteAction = iota - // WriteThenGoexit runs runtime.Goexit after Write. - WriteThenGoexit - // WriteThenPanic causes a panic after Write. - WriteThenPanic - // WriteThenFatal causes an os.Exit(1) after Write. - WriteThenFatal -) - -// OnWrite implements the OnWrite method to keep CheckWriteAction compatible -// with the new CheckWriteHook interface which deprecates CheckWriteAction. -func (a CheckWriteAction) OnWrite(ce *CheckedEntry, _ []Field) { - switch a { - case WriteThenGoexit: - runtime.Goexit() - case WriteThenPanic: - panic(ce.Message) - case WriteThenFatal: - exit.With(1) - } -} - -var _ CheckWriteHook = CheckWriteAction(0) - -// CheckedEntry is an Entry together with a collection of Cores that have -// already agreed to log it. -// -// CheckedEntry references should be created by calling AddCore or After on a -// nil *CheckedEntry. References are returned to a pool after Write, and MUST -// NOT be retained after calling their Write method. -type CheckedEntry struct { - Entry - ErrorOutput WriteSyncer - dirty bool // best-effort detection of pool misuse - after CheckWriteHook - cores []Core -} - -func (ce *CheckedEntry) reset() { - ce.Entry = Entry{} - ce.ErrorOutput = nil - ce.dirty = false - ce.after = nil - for i := range ce.cores { - // don't keep references to cores - ce.cores[i] = nil - } - ce.cores = ce.cores[:0] -} - -// Write writes the entry to the stored Cores, returns any errors, and returns -// the CheckedEntry reference to a pool for immediate re-use. Finally, it -// executes any required CheckWriteAction. -func (ce *CheckedEntry) Write(fields ...Field) { - if ce == nil { - return - } - - if ce.dirty { - if ce.ErrorOutput != nil { - // Make a best effort to detect unsafe re-use of this CheckedEntry. - // If the entry is dirty, log an internal error; because the - // CheckedEntry is being used after it was returned to the pool, - // the message may be an amalgamation from multiple call sites. - fmt.Fprintf(ce.ErrorOutput, "%v Unsafe CheckedEntry re-use near Entry %+v.\n", ce.Time, ce.Entry) - _ = ce.ErrorOutput.Sync() // ignore error - } - return - } - ce.dirty = true - - var err error - for i := range ce.cores { - err = multierr.Append(err, ce.cores[i].Write(ce.Entry, fields)) - } - if err != nil && ce.ErrorOutput != nil { - fmt.Fprintf(ce.ErrorOutput, "%v write error: %v\n", ce.Time, err) - _ = ce.ErrorOutput.Sync() // ignore error - } - - hook := ce.after - if hook != nil { - hook.OnWrite(ce, fields) - } - putCheckedEntry(ce) -} - -// AddCore adds a Core that has agreed to log this CheckedEntry. It's intended to be -// used by Core.Check implementations, and is safe to call on nil CheckedEntry -// references. -func (ce *CheckedEntry) AddCore(ent Entry, core Core) *CheckedEntry { - if ce == nil { - ce = getCheckedEntry() - ce.Entry = ent - } - ce.cores = append(ce.cores, core) - return ce -} - -// Should sets this CheckedEntry's CheckWriteAction, which controls whether a -// Core will panic or fatal after writing this log entry. Like AddCore, it's -// safe to call on nil CheckedEntry references. -// -// Deprecated: Use [CheckedEntry.After] instead. -func (ce *CheckedEntry) Should(ent Entry, should CheckWriteAction) *CheckedEntry { - return ce.After(ent, should) -} - -// After sets this CheckEntry's CheckWriteHook, which will be called after this -// log entry has been written. It's safe to call this on nil CheckedEntry -// references. -func (ce *CheckedEntry) After(ent Entry, hook CheckWriteHook) *CheckedEntry { - if ce == nil { - ce = getCheckedEntry() - ce.Entry = ent - } - ce.after = hook - return ce -} diff --git a/vendor/go.uber.org/zap/zapcore/error.go b/vendor/go.uber.org/zap/zapcore/error.go deleted file mode 100644 index c40df13269a..00000000000 --- a/vendor/go.uber.org/zap/zapcore/error.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) 2017 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import ( - "fmt" - "reflect" - - "go.uber.org/zap/internal/pool" -) - -// Encodes the given error into fields of an object. A field with the given -// name is added for the error message. -// -// If the error implements fmt.Formatter, a field with the name ${key}Verbose -// is also added with the full verbose error message. -// -// Finally, if the error implements errorGroup (from go.uber.org/multierr) or -// causer (from github.com/pkg/errors), a ${key}Causes field is added with an -// array of objects containing the errors this error was comprised of. -// -// { -// "error": err.Error(), -// "errorVerbose": fmt.Sprintf("%+v", err), -// "errorCauses": [ -// ... -// ], -// } -func encodeError(key string, err error, enc ObjectEncoder) (retErr error) { - // Try to capture panics (from nil references or otherwise) when calling - // the Error() method - defer func() { - if rerr := recover(); rerr != nil { - // If it's a nil pointer, just say "". The likeliest causes are a - // error that fails to guard against nil or a nil pointer for a - // value receiver, and in either case, "" is a nice result. - if v := reflect.ValueOf(err); v.Kind() == reflect.Ptr && v.IsNil() { - enc.AddString(key, "") - return - } - - retErr = fmt.Errorf("PANIC=%v", rerr) - } - }() - - basic := err.Error() - enc.AddString(key, basic) - - switch e := err.(type) { - case errorGroup: - return enc.AddArray(key+"Causes", errArray(e.Errors())) - case fmt.Formatter: - verbose := fmt.Sprintf("%+v", e) - if verbose != basic { - // This is a rich error type, like those produced by - // github.com/pkg/errors. - enc.AddString(key+"Verbose", verbose) - } - } - return nil -} - -type errorGroup interface { - // Provides read-only access to the underlying list of errors, preferably - // without causing any allocs. - Errors() []error -} - -// Note that errArray and errArrayElem are very similar to the version -// implemented in the top-level error.go file. We can't re-use this because -// that would require exporting errArray as part of the zapcore API. - -// Encodes a list of errors using the standard error encoding logic. -type errArray []error - -func (errs errArray) MarshalLogArray(arr ArrayEncoder) error { - for i := range errs { - if errs[i] == nil { - continue - } - - el := newErrArrayElem(errs[i]) - err := arr.AppendObject(el) - el.Free() - if err != nil { - return err - } - } - return nil -} - -var _errArrayElemPool = pool.New(func() *errArrayElem { - return &errArrayElem{} -}) - -// Encodes any error into a {"error": ...} re-using the same errors logic. -// -// May be passed in place of an array to build a single-element array. -type errArrayElem struct{ err error } - -func newErrArrayElem(err error) *errArrayElem { - e := _errArrayElemPool.Get() - e.err = err - return e -} - -func (e *errArrayElem) MarshalLogArray(arr ArrayEncoder) error { - return arr.AppendObject(e) -} - -func (e *errArrayElem) MarshalLogObject(enc ObjectEncoder) error { - return encodeError("error", e.err, enc) -} - -func (e *errArrayElem) Free() { - e.err = nil - _errArrayElemPool.Put(e) -} diff --git a/vendor/go.uber.org/zap/zapcore/field.go b/vendor/go.uber.org/zap/zapcore/field.go deleted file mode 100644 index 95bdb0a126f..00000000000 --- a/vendor/go.uber.org/zap/zapcore/field.go +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import ( - "bytes" - "fmt" - "math" - "reflect" - "time" -) - -// A FieldType indicates which member of the Field union struct should be used -// and how it should be serialized. -type FieldType uint8 - -const ( - // UnknownType is the default field type. Attempting to add it to an encoder will panic. - UnknownType FieldType = iota - // ArrayMarshalerType indicates that the field carries an ArrayMarshaler. - ArrayMarshalerType - // ObjectMarshalerType indicates that the field carries an ObjectMarshaler. - ObjectMarshalerType - // BinaryType indicates that the field carries an opaque binary blob. - BinaryType - // BoolType indicates that the field carries a bool. - BoolType - // ByteStringType indicates that the field carries UTF-8 encoded bytes. - ByteStringType - // Complex128Type indicates that the field carries a complex128. - Complex128Type - // Complex64Type indicates that the field carries a complex128. - Complex64Type - // DurationType indicates that the field carries a time.Duration. - DurationType - // Float64Type indicates that the field carries a float64. - Float64Type - // Float32Type indicates that the field carries a float32. - Float32Type - // Int64Type indicates that the field carries an int64. - Int64Type - // Int32Type indicates that the field carries an int32. - Int32Type - // Int16Type indicates that the field carries an int16. - Int16Type - // Int8Type indicates that the field carries an int8. - Int8Type - // StringType indicates that the field carries a string. - StringType - // TimeType indicates that the field carries a time.Time that is - // representable by a UnixNano() stored as an int64. - TimeType - // TimeFullType indicates that the field carries a time.Time stored as-is. - TimeFullType - // Uint64Type indicates that the field carries a uint64. - Uint64Type - // Uint32Type indicates that the field carries a uint32. - Uint32Type - // Uint16Type indicates that the field carries a uint16. - Uint16Type - // Uint8Type indicates that the field carries a uint8. - Uint8Type - // UintptrType indicates that the field carries a uintptr. - UintptrType - // ReflectType indicates that the field carries an interface{}, which should - // be serialized using reflection. - ReflectType - // NamespaceType signals the beginning of an isolated namespace. All - // subsequent fields should be added to the new namespace. - NamespaceType - // StringerType indicates that the field carries a fmt.Stringer. - StringerType - // ErrorType indicates that the field carries an error. - ErrorType - // SkipType indicates that the field is a no-op. - SkipType - - // InlineMarshalerType indicates that the field carries an ObjectMarshaler - // that should be inlined. - InlineMarshalerType -) - -// A Field is a marshaling operation used to add a key-value pair to a logger's -// context. Most fields are lazily marshaled, so it's inexpensive to add fields -// to disabled debug-level log statements. -type Field struct { - Key string - Type FieldType - Integer int64 - String string - Interface interface{} -} - -// AddTo exports a field through the ObjectEncoder interface. It's primarily -// useful to library authors, and shouldn't be necessary in most applications. -func (f Field) AddTo(enc ObjectEncoder) { - var err error - - switch f.Type { - case ArrayMarshalerType: - err = enc.AddArray(f.Key, f.Interface.(ArrayMarshaler)) - case ObjectMarshalerType: - err = enc.AddObject(f.Key, f.Interface.(ObjectMarshaler)) - case InlineMarshalerType: - err = f.Interface.(ObjectMarshaler).MarshalLogObject(enc) - case BinaryType: - enc.AddBinary(f.Key, f.Interface.([]byte)) - case BoolType: - enc.AddBool(f.Key, f.Integer == 1) - case ByteStringType: - enc.AddByteString(f.Key, f.Interface.([]byte)) - case Complex128Type: - enc.AddComplex128(f.Key, f.Interface.(complex128)) - case Complex64Type: - enc.AddComplex64(f.Key, f.Interface.(complex64)) - case DurationType: - enc.AddDuration(f.Key, time.Duration(f.Integer)) - case Float64Type: - enc.AddFloat64(f.Key, math.Float64frombits(uint64(f.Integer))) - case Float32Type: - enc.AddFloat32(f.Key, math.Float32frombits(uint32(f.Integer))) - case Int64Type: - enc.AddInt64(f.Key, f.Integer) - case Int32Type: - enc.AddInt32(f.Key, int32(f.Integer)) - case Int16Type: - enc.AddInt16(f.Key, int16(f.Integer)) - case Int8Type: - enc.AddInt8(f.Key, int8(f.Integer)) - case StringType: - enc.AddString(f.Key, f.String) - case TimeType: - if f.Interface != nil { - enc.AddTime(f.Key, time.Unix(0, f.Integer).In(f.Interface.(*time.Location))) - } else { - // Fall back to UTC if location is nil. - enc.AddTime(f.Key, time.Unix(0, f.Integer)) - } - case TimeFullType: - enc.AddTime(f.Key, f.Interface.(time.Time)) - case Uint64Type: - enc.AddUint64(f.Key, uint64(f.Integer)) - case Uint32Type: - enc.AddUint32(f.Key, uint32(f.Integer)) - case Uint16Type: - enc.AddUint16(f.Key, uint16(f.Integer)) - case Uint8Type: - enc.AddUint8(f.Key, uint8(f.Integer)) - case UintptrType: - enc.AddUintptr(f.Key, uintptr(f.Integer)) - case ReflectType: - err = enc.AddReflected(f.Key, f.Interface) - case NamespaceType: - enc.OpenNamespace(f.Key) - case StringerType: - err = encodeStringer(f.Key, f.Interface, enc) - case ErrorType: - err = encodeError(f.Key, f.Interface.(error), enc) - case SkipType: - break - default: - panic(fmt.Sprintf("unknown field type: %v", f)) - } - - if err != nil { - enc.AddString(fmt.Sprintf("%sError", f.Key), err.Error()) - } -} - -// Equals returns whether two fields are equal. For non-primitive types such as -// errors, marshalers, or reflect types, it uses reflect.DeepEqual. -func (f Field) Equals(other Field) bool { - if f.Type != other.Type { - return false - } - if f.Key != other.Key { - return false - } - - switch f.Type { - case BinaryType, ByteStringType: - return bytes.Equal(f.Interface.([]byte), other.Interface.([]byte)) - case ArrayMarshalerType, ObjectMarshalerType, ErrorType, ReflectType: - return reflect.DeepEqual(f.Interface, other.Interface) - default: - return f == other - } -} - -func addFields(enc ObjectEncoder, fields []Field) { - for i := range fields { - fields[i].AddTo(enc) - } -} - -func encodeStringer(key string, stringer interface{}, enc ObjectEncoder) (retErr error) { - // Try to capture panics (from nil references or otherwise) when calling - // the String() method, similar to https://golang.org/src/fmt/print.go#L540 - defer func() { - if err := recover(); err != nil { - // If it's a nil pointer, just say "". The likeliest causes are a - // Stringer that fails to guard against nil or a nil pointer for a - // value receiver, and in either case, "" is a nice result. - if v := reflect.ValueOf(stringer); v.Kind() == reflect.Ptr && v.IsNil() { - enc.AddString(key, "") - return - } - - retErr = fmt.Errorf("PANIC=%v", err) - } - }() - - enc.AddString(key, stringer.(fmt.Stringer).String()) - return nil -} diff --git a/vendor/go.uber.org/zap/zapcore/hook.go b/vendor/go.uber.org/zap/zapcore/hook.go deleted file mode 100644 index 198def9917c..00000000000 --- a/vendor/go.uber.org/zap/zapcore/hook.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import "go.uber.org/multierr" - -type hooked struct { - Core - funcs []func(Entry) error -} - -var ( - _ Core = (*hooked)(nil) - _ leveledEnabler = (*hooked)(nil) -) - -// RegisterHooks wraps a Core and runs a collection of user-defined callback -// hooks each time a message is logged. Execution of the callbacks is blocking. -// -// This offers users an easy way to register simple callbacks (e.g., metrics -// collection) without implementing the full Core interface. -func RegisterHooks(core Core, hooks ...func(Entry) error) Core { - funcs := append([]func(Entry) error{}, hooks...) - return &hooked{ - Core: core, - funcs: funcs, - } -} - -func (h *hooked) Level() Level { - return LevelOf(h.Core) -} - -func (h *hooked) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { - // Let the wrapped Core decide whether to log this message or not. This - // also gives the downstream a chance to register itself directly with the - // CheckedEntry. - if downstream := h.Core.Check(ent, ce); downstream != nil { - return downstream.AddCore(ent, h) - } - return ce -} - -func (h *hooked) With(fields []Field) Core { - return &hooked{ - Core: h.Core.With(fields), - funcs: h.funcs, - } -} - -func (h *hooked) Write(ent Entry, _ []Field) error { - // Since our downstream had a chance to register itself directly with the - // CheckedMessage, we don't need to call it here. - var err error - for i := range h.funcs { - err = multierr.Append(err, h.funcs[i](ent)) - } - return err -} diff --git a/vendor/go.uber.org/zap/zapcore/increase_level.go b/vendor/go.uber.org/zap/zapcore/increase_level.go deleted file mode 100644 index 7a11237ae97..00000000000 --- a/vendor/go.uber.org/zap/zapcore/increase_level.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import "fmt" - -type levelFilterCore struct { - core Core - level LevelEnabler -} - -var ( - _ Core = (*levelFilterCore)(nil) - _ leveledEnabler = (*levelFilterCore)(nil) -) - -// NewIncreaseLevelCore creates a core that can be used to increase the level of -// an existing Core. It cannot be used to decrease the logging level, as it acts -// as a filter before calling the underlying core. If level decreases the log level, -// an error is returned. -func NewIncreaseLevelCore(core Core, level LevelEnabler) (Core, error) { - for l := _maxLevel; l >= _minLevel; l-- { - if !core.Enabled(l) && level.Enabled(l) { - return nil, fmt.Errorf("invalid increase level, as level %q is allowed by increased level, but not by existing core", l) - } - } - - return &levelFilterCore{core, level}, nil -} - -func (c *levelFilterCore) Enabled(lvl Level) bool { - return c.level.Enabled(lvl) -} - -func (c *levelFilterCore) Level() Level { - return LevelOf(c.level) -} - -func (c *levelFilterCore) With(fields []Field) Core { - return &levelFilterCore{c.core.With(fields), c.level} -} - -func (c *levelFilterCore) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { - if !c.Enabled(ent.Level) { - return ce - } - - return c.core.Check(ent, ce) -} - -func (c *levelFilterCore) Write(ent Entry, fields []Field) error { - return c.core.Write(ent, fields) -} - -func (c *levelFilterCore) Sync() error { - return c.core.Sync() -} diff --git a/vendor/go.uber.org/zap/zapcore/json_encoder.go b/vendor/go.uber.org/zap/zapcore/json_encoder.go deleted file mode 100644 index c8ab86979b0..00000000000 --- a/vendor/go.uber.org/zap/zapcore/json_encoder.go +++ /dev/null @@ -1,583 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import ( - "encoding/base64" - "math" - "time" - "unicode/utf8" - - "go.uber.org/zap/buffer" - "go.uber.org/zap/internal/bufferpool" - "go.uber.org/zap/internal/pool" -) - -// For JSON-escaping; see jsonEncoder.safeAddString below. -const _hex = "0123456789abcdef" - -var _jsonPool = pool.New(func() *jsonEncoder { - return &jsonEncoder{} -}) - -func putJSONEncoder(enc *jsonEncoder) { - if enc.reflectBuf != nil { - enc.reflectBuf.Free() - } - enc.EncoderConfig = nil - enc.buf = nil - enc.spaced = false - enc.openNamespaces = 0 - enc.reflectBuf = nil - enc.reflectEnc = nil - _jsonPool.Put(enc) -} - -type jsonEncoder struct { - *EncoderConfig - buf *buffer.Buffer - spaced bool // include spaces after colons and commas - openNamespaces int - - // for encoding generic values by reflection - reflectBuf *buffer.Buffer - reflectEnc ReflectedEncoder -} - -// NewJSONEncoder creates a fast, low-allocation JSON encoder. The encoder -// appropriately escapes all field keys and values. -// -// Note that the encoder doesn't deduplicate keys, so it's possible to produce -// a message like -// -// {"foo":"bar","foo":"baz"} -// -// This is permitted by the JSON specification, but not encouraged. Many -// libraries will ignore duplicate key-value pairs (typically keeping the last -// pair) when unmarshaling, but users should attempt to avoid adding duplicate -// keys. -func NewJSONEncoder(cfg EncoderConfig) Encoder { - return newJSONEncoder(cfg, false) -} - -func newJSONEncoder(cfg EncoderConfig, spaced bool) *jsonEncoder { - if cfg.SkipLineEnding { - cfg.LineEnding = "" - } else if cfg.LineEnding == "" { - cfg.LineEnding = DefaultLineEnding - } - - // If no EncoderConfig.NewReflectedEncoder is provided by the user, then use default - if cfg.NewReflectedEncoder == nil { - cfg.NewReflectedEncoder = defaultReflectedEncoder - } - - return &jsonEncoder{ - EncoderConfig: &cfg, - buf: bufferpool.Get(), - spaced: spaced, - } -} - -func (enc *jsonEncoder) AddArray(key string, arr ArrayMarshaler) error { - enc.addKey(key) - return enc.AppendArray(arr) -} - -func (enc *jsonEncoder) AddObject(key string, obj ObjectMarshaler) error { - enc.addKey(key) - return enc.AppendObject(obj) -} - -func (enc *jsonEncoder) AddBinary(key string, val []byte) { - enc.AddString(key, base64.StdEncoding.EncodeToString(val)) -} - -func (enc *jsonEncoder) AddByteString(key string, val []byte) { - enc.addKey(key) - enc.AppendByteString(val) -} - -func (enc *jsonEncoder) AddBool(key string, val bool) { - enc.addKey(key) - enc.AppendBool(val) -} - -func (enc *jsonEncoder) AddComplex128(key string, val complex128) { - enc.addKey(key) - enc.AppendComplex128(val) -} - -func (enc *jsonEncoder) AddComplex64(key string, val complex64) { - enc.addKey(key) - enc.AppendComplex64(val) -} - -func (enc *jsonEncoder) AddDuration(key string, val time.Duration) { - enc.addKey(key) - enc.AppendDuration(val) -} - -func (enc *jsonEncoder) AddFloat64(key string, val float64) { - enc.addKey(key) - enc.AppendFloat64(val) -} - -func (enc *jsonEncoder) AddFloat32(key string, val float32) { - enc.addKey(key) - enc.AppendFloat32(val) -} - -func (enc *jsonEncoder) AddInt64(key string, val int64) { - enc.addKey(key) - enc.AppendInt64(val) -} - -func (enc *jsonEncoder) resetReflectBuf() { - if enc.reflectBuf == nil { - enc.reflectBuf = bufferpool.Get() - enc.reflectEnc = enc.NewReflectedEncoder(enc.reflectBuf) - } else { - enc.reflectBuf.Reset() - } -} - -var nullLiteralBytes = []byte("null") - -// Only invoke the standard JSON encoder if there is actually something to -// encode; otherwise write JSON null literal directly. -func (enc *jsonEncoder) encodeReflected(obj interface{}) ([]byte, error) { - if obj == nil { - return nullLiteralBytes, nil - } - enc.resetReflectBuf() - if err := enc.reflectEnc.Encode(obj); err != nil { - return nil, err - } - enc.reflectBuf.TrimNewline() - return enc.reflectBuf.Bytes(), nil -} - -func (enc *jsonEncoder) AddReflected(key string, obj interface{}) error { - valueBytes, err := enc.encodeReflected(obj) - if err != nil { - return err - } - enc.addKey(key) - _, err = enc.buf.Write(valueBytes) - return err -} - -func (enc *jsonEncoder) OpenNamespace(key string) { - enc.addKey(key) - enc.buf.AppendByte('{') - enc.openNamespaces++ -} - -func (enc *jsonEncoder) AddString(key, val string) { - enc.addKey(key) - enc.AppendString(val) -} - -func (enc *jsonEncoder) AddTime(key string, val time.Time) { - enc.addKey(key) - enc.AppendTime(val) -} - -func (enc *jsonEncoder) AddUint64(key string, val uint64) { - enc.addKey(key) - enc.AppendUint64(val) -} - -func (enc *jsonEncoder) AppendArray(arr ArrayMarshaler) error { - enc.addElementSeparator() - enc.buf.AppendByte('[') - err := arr.MarshalLogArray(enc) - enc.buf.AppendByte(']') - return err -} - -func (enc *jsonEncoder) AppendObject(obj ObjectMarshaler) error { - // Close ONLY new openNamespaces that are created during - // AppendObject(). - old := enc.openNamespaces - enc.openNamespaces = 0 - enc.addElementSeparator() - enc.buf.AppendByte('{') - err := obj.MarshalLogObject(enc) - enc.buf.AppendByte('}') - enc.closeOpenNamespaces() - enc.openNamespaces = old - return err -} - -func (enc *jsonEncoder) AppendBool(val bool) { - enc.addElementSeparator() - enc.buf.AppendBool(val) -} - -func (enc *jsonEncoder) AppendByteString(val []byte) { - enc.addElementSeparator() - enc.buf.AppendByte('"') - enc.safeAddByteString(val) - enc.buf.AppendByte('"') -} - -// appendComplex appends the encoded form of the provided complex128 value. -// precision specifies the encoding precision for the real and imaginary -// components of the complex number. -func (enc *jsonEncoder) appendComplex(val complex128, precision int) { - enc.addElementSeparator() - // Cast to a platform-independent, fixed-size type. - r, i := float64(real(val)), float64(imag(val)) - enc.buf.AppendByte('"') - // Because we're always in a quoted string, we can use strconv without - // special-casing NaN and +/-Inf. - enc.buf.AppendFloat(r, precision) - // If imaginary part is less than 0, minus (-) sign is added by default - // by AppendFloat. - if i >= 0 { - enc.buf.AppendByte('+') - } - enc.buf.AppendFloat(i, precision) - enc.buf.AppendByte('i') - enc.buf.AppendByte('"') -} - -func (enc *jsonEncoder) AppendDuration(val time.Duration) { - cur := enc.buf.Len() - if e := enc.EncodeDuration; e != nil { - e(val, enc) - } - if cur == enc.buf.Len() { - // User-supplied EncodeDuration is a no-op. Fall back to nanoseconds to keep - // JSON valid. - enc.AppendInt64(int64(val)) - } -} - -func (enc *jsonEncoder) AppendInt64(val int64) { - enc.addElementSeparator() - enc.buf.AppendInt(val) -} - -func (enc *jsonEncoder) AppendReflected(val interface{}) error { - valueBytes, err := enc.encodeReflected(val) - if err != nil { - return err - } - enc.addElementSeparator() - _, err = enc.buf.Write(valueBytes) - return err -} - -func (enc *jsonEncoder) AppendString(val string) { - enc.addElementSeparator() - enc.buf.AppendByte('"') - enc.safeAddString(val) - enc.buf.AppendByte('"') -} - -func (enc *jsonEncoder) AppendTimeLayout(time time.Time, layout string) { - enc.addElementSeparator() - enc.buf.AppendByte('"') - enc.buf.AppendTime(time, layout) - enc.buf.AppendByte('"') -} - -func (enc *jsonEncoder) AppendTime(val time.Time) { - cur := enc.buf.Len() - if e := enc.EncodeTime; e != nil { - e(val, enc) - } - if cur == enc.buf.Len() { - // User-supplied EncodeTime is a no-op. Fall back to nanos since epoch to keep - // output JSON valid. - enc.AppendInt64(val.UnixNano()) - } -} - -func (enc *jsonEncoder) AppendUint64(val uint64) { - enc.addElementSeparator() - enc.buf.AppendUint(val) -} - -func (enc *jsonEncoder) AddInt(k string, v int) { enc.AddInt64(k, int64(v)) } -func (enc *jsonEncoder) AddInt32(k string, v int32) { enc.AddInt64(k, int64(v)) } -func (enc *jsonEncoder) AddInt16(k string, v int16) { enc.AddInt64(k, int64(v)) } -func (enc *jsonEncoder) AddInt8(k string, v int8) { enc.AddInt64(k, int64(v)) } -func (enc *jsonEncoder) AddUint(k string, v uint) { enc.AddUint64(k, uint64(v)) } -func (enc *jsonEncoder) AddUint32(k string, v uint32) { enc.AddUint64(k, uint64(v)) } -func (enc *jsonEncoder) AddUint16(k string, v uint16) { enc.AddUint64(k, uint64(v)) } -func (enc *jsonEncoder) AddUint8(k string, v uint8) { enc.AddUint64(k, uint64(v)) } -func (enc *jsonEncoder) AddUintptr(k string, v uintptr) { enc.AddUint64(k, uint64(v)) } -func (enc *jsonEncoder) AppendComplex64(v complex64) { enc.appendComplex(complex128(v), 32) } -func (enc *jsonEncoder) AppendComplex128(v complex128) { enc.appendComplex(complex128(v), 64) } -func (enc *jsonEncoder) AppendFloat64(v float64) { enc.appendFloat(v, 64) } -func (enc *jsonEncoder) AppendFloat32(v float32) { enc.appendFloat(float64(v), 32) } -func (enc *jsonEncoder) AppendInt(v int) { enc.AppendInt64(int64(v)) } -func (enc *jsonEncoder) AppendInt32(v int32) { enc.AppendInt64(int64(v)) } -func (enc *jsonEncoder) AppendInt16(v int16) { enc.AppendInt64(int64(v)) } -func (enc *jsonEncoder) AppendInt8(v int8) { enc.AppendInt64(int64(v)) } -func (enc *jsonEncoder) AppendUint(v uint) { enc.AppendUint64(uint64(v)) } -func (enc *jsonEncoder) AppendUint32(v uint32) { enc.AppendUint64(uint64(v)) } -func (enc *jsonEncoder) AppendUint16(v uint16) { enc.AppendUint64(uint64(v)) } -func (enc *jsonEncoder) AppendUint8(v uint8) { enc.AppendUint64(uint64(v)) } -func (enc *jsonEncoder) AppendUintptr(v uintptr) { enc.AppendUint64(uint64(v)) } - -func (enc *jsonEncoder) Clone() Encoder { - clone := enc.clone() - clone.buf.Write(enc.buf.Bytes()) - return clone -} - -func (enc *jsonEncoder) clone() *jsonEncoder { - clone := _jsonPool.Get() - clone.EncoderConfig = enc.EncoderConfig - clone.spaced = enc.spaced - clone.openNamespaces = enc.openNamespaces - clone.buf = bufferpool.Get() - return clone -} - -func (enc *jsonEncoder) EncodeEntry(ent Entry, fields []Field) (*buffer.Buffer, error) { - final := enc.clone() - final.buf.AppendByte('{') - - if final.LevelKey != "" && final.EncodeLevel != nil { - final.addKey(final.LevelKey) - cur := final.buf.Len() - final.EncodeLevel(ent.Level, final) - if cur == final.buf.Len() { - // User-supplied EncodeLevel was a no-op. Fall back to strings to keep - // output JSON valid. - final.AppendString(ent.Level.String()) - } - } - if final.TimeKey != "" { - final.AddTime(final.TimeKey, ent.Time) - } - if ent.LoggerName != "" && final.NameKey != "" { - final.addKey(final.NameKey) - cur := final.buf.Len() - nameEncoder := final.EncodeName - - // if no name encoder provided, fall back to FullNameEncoder for backwards - // compatibility - if nameEncoder == nil { - nameEncoder = FullNameEncoder - } - - nameEncoder(ent.LoggerName, final) - if cur == final.buf.Len() { - // User-supplied EncodeName was a no-op. Fall back to strings to - // keep output JSON valid. - final.AppendString(ent.LoggerName) - } - } - if ent.Caller.Defined { - if final.CallerKey != "" { - final.addKey(final.CallerKey) - cur := final.buf.Len() - final.EncodeCaller(ent.Caller, final) - if cur == final.buf.Len() { - // User-supplied EncodeCaller was a no-op. Fall back to strings to - // keep output JSON valid. - final.AppendString(ent.Caller.String()) - } - } - if final.FunctionKey != "" { - final.addKey(final.FunctionKey) - final.AppendString(ent.Caller.Function) - } - } - if final.MessageKey != "" { - final.addKey(enc.MessageKey) - final.AppendString(ent.Message) - } - if enc.buf.Len() > 0 { - final.addElementSeparator() - final.buf.Write(enc.buf.Bytes()) - } - addFields(final, fields) - final.closeOpenNamespaces() - if ent.Stack != "" && final.StacktraceKey != "" { - final.AddString(final.StacktraceKey, ent.Stack) - } - final.buf.AppendByte('}') - final.buf.AppendString(final.LineEnding) - - ret := final.buf - putJSONEncoder(final) - return ret, nil -} - -func (enc *jsonEncoder) truncate() { - enc.buf.Reset() -} - -func (enc *jsonEncoder) closeOpenNamespaces() { - for i := 0; i < enc.openNamespaces; i++ { - enc.buf.AppendByte('}') - } - enc.openNamespaces = 0 -} - -func (enc *jsonEncoder) addKey(key string) { - enc.addElementSeparator() - enc.buf.AppendByte('"') - enc.safeAddString(key) - enc.buf.AppendByte('"') - enc.buf.AppendByte(':') - if enc.spaced { - enc.buf.AppendByte(' ') - } -} - -func (enc *jsonEncoder) addElementSeparator() { - last := enc.buf.Len() - 1 - if last < 0 { - return - } - switch enc.buf.Bytes()[last] { - case '{', '[', ':', ',', ' ': - return - default: - enc.buf.AppendByte(',') - if enc.spaced { - enc.buf.AppendByte(' ') - } - } -} - -func (enc *jsonEncoder) appendFloat(val float64, bitSize int) { - enc.addElementSeparator() - switch { - case math.IsNaN(val): - enc.buf.AppendString(`"NaN"`) - case math.IsInf(val, 1): - enc.buf.AppendString(`"+Inf"`) - case math.IsInf(val, -1): - enc.buf.AppendString(`"-Inf"`) - default: - enc.buf.AppendFloat(val, bitSize) - } -} - -// safeAddString JSON-escapes a string and appends it to the internal buffer. -// Unlike the standard library's encoder, it doesn't attempt to protect the -// user from browser vulnerabilities or JSONP-related problems. -func (enc *jsonEncoder) safeAddString(s string) { - safeAppendStringLike( - (*buffer.Buffer).AppendString, - utf8.DecodeRuneInString, - enc.buf, - s, - ) -} - -// safeAddByteString is no-alloc equivalent of safeAddString(string(s)) for s []byte. -func (enc *jsonEncoder) safeAddByteString(s []byte) { - safeAppendStringLike( - (*buffer.Buffer).AppendBytes, - utf8.DecodeRune, - enc.buf, - s, - ) -} - -// safeAppendStringLike is a generic implementation of safeAddString and safeAddByteString. -// It appends a string or byte slice to the buffer, escaping all special characters. -func safeAppendStringLike[S []byte | string]( - // appendTo appends this string-like object to the buffer. - appendTo func(*buffer.Buffer, S), - // decodeRune decodes the next rune from the string-like object - // and returns its value and width in bytes. - decodeRune func(S) (rune, int), - buf *buffer.Buffer, - s S, -) { - // The encoding logic below works by skipping over characters - // that can be safely copied as-is, - // until a character is found that needs special handling. - // At that point, we copy everything we've seen so far, - // and then handle that special character. - // - // last is the index of the last byte that was copied to the buffer. - last := 0 - for i := 0; i < len(s); { - if s[i] >= utf8.RuneSelf { - // Character >= RuneSelf may be part of a multi-byte rune. - // They need to be decoded before we can decide how to handle them. - r, size := decodeRune(s[i:]) - if r != utf8.RuneError || size != 1 { - // No special handling required. - // Skip over this rune and continue. - i += size - continue - } - - // Invalid UTF-8 sequence. - // Replace it with the Unicode replacement character. - appendTo(buf, s[last:i]) - buf.AppendString(`\ufffd`) - - i++ - last = i - } else { - // Character < RuneSelf is a single-byte UTF-8 rune. - if s[i] >= 0x20 && s[i] != '\\' && s[i] != '"' { - // No escaping necessary. - // Skip over this character and continue. - i++ - continue - } - - // This character needs to be escaped. - appendTo(buf, s[last:i]) - switch s[i] { - case '\\', '"': - buf.AppendByte('\\') - buf.AppendByte(s[i]) - case '\n': - buf.AppendByte('\\') - buf.AppendByte('n') - case '\r': - buf.AppendByte('\\') - buf.AppendByte('r') - case '\t': - buf.AppendByte('\\') - buf.AppendByte('t') - default: - // Encode bytes < 0x20, except for the escape sequences above. - buf.AppendString(`\u00`) - buf.AppendByte(_hex[s[i]>>4]) - buf.AppendByte(_hex[s[i]&0xF]) - } - - i++ - last = i - } - } - - // add remaining - appendTo(buf, s[last:]) -} diff --git a/vendor/go.uber.org/zap/zapcore/lazy_with.go b/vendor/go.uber.org/zap/zapcore/lazy_with.go deleted file mode 100644 index 05288d6a88e..00000000000 --- a/vendor/go.uber.org/zap/zapcore/lazy_with.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2023 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import "sync" - -type lazyWithCore struct { - Core - sync.Once - fields []Field -} - -// NewLazyWith wraps a Core with a "lazy" Core that will only encode fields if -// the logger is written to (or is further chained in a lon-lazy manner). -func NewLazyWith(core Core, fields []Field) Core { - return &lazyWithCore{ - Core: core, - fields: fields, - } -} - -func (d *lazyWithCore) initOnce() { - d.Once.Do(func() { - d.Core = d.Core.With(d.fields) - }) -} - -func (d *lazyWithCore) With(fields []Field) Core { - d.initOnce() - return d.Core.With(fields) -} - -func (d *lazyWithCore) Check(e Entry, ce *CheckedEntry) *CheckedEntry { - d.initOnce() - return d.Core.Check(e, ce) -} diff --git a/vendor/go.uber.org/zap/zapcore/level.go b/vendor/go.uber.org/zap/zapcore/level.go deleted file mode 100644 index e01a2413166..00000000000 --- a/vendor/go.uber.org/zap/zapcore/level.go +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import ( - "bytes" - "errors" - "fmt" -) - -var errUnmarshalNilLevel = errors.New("can't unmarshal a nil *Level") - -// A Level is a logging priority. Higher levels are more important. -type Level int8 - -const ( - // DebugLevel logs are typically voluminous, and are usually disabled in - // production. - DebugLevel Level = iota - 1 - // InfoLevel is the default logging priority. - InfoLevel - // WarnLevel logs are more important than Info, but don't need individual - // human review. - WarnLevel - // ErrorLevel logs are high-priority. If an application is running smoothly, - // it shouldn't generate any error-level logs. - ErrorLevel - // DPanicLevel logs are particularly important errors. In development the - // logger panics after writing the message. - DPanicLevel - // PanicLevel logs a message, then panics. - PanicLevel - // FatalLevel logs a message, then calls os.Exit(1). - FatalLevel - - _minLevel = DebugLevel - _maxLevel = FatalLevel - - // InvalidLevel is an invalid value for Level. - // - // Core implementations may panic if they see messages of this level. - InvalidLevel = _maxLevel + 1 -) - -// ParseLevel parses a level based on the lower-case or all-caps ASCII -// representation of the log level. If the provided ASCII representation is -// invalid an error is returned. -// -// This is particularly useful when dealing with text input to configure log -// levels. -func ParseLevel(text string) (Level, error) { - var level Level - err := level.UnmarshalText([]byte(text)) - return level, err -} - -type leveledEnabler interface { - LevelEnabler - - Level() Level -} - -// LevelOf reports the minimum enabled log level for the given LevelEnabler -// from Zap's supported log levels, or [InvalidLevel] if none of them are -// enabled. -// -// A LevelEnabler may implement a 'Level() Level' method to override the -// behavior of this function. -// -// func (c *core) Level() Level { -// return c.currentLevel -// } -// -// It is recommended that [Core] implementations that wrap other cores use -// LevelOf to retrieve the level of the wrapped core. For example, -// -// func (c *coreWrapper) Level() Level { -// return zapcore.LevelOf(c.wrappedCore) -// } -func LevelOf(enab LevelEnabler) Level { - if lvler, ok := enab.(leveledEnabler); ok { - return lvler.Level() - } - - for lvl := _minLevel; lvl <= _maxLevel; lvl++ { - if enab.Enabled(lvl) { - return lvl - } - } - - return InvalidLevel -} - -// String returns a lower-case ASCII representation of the log level. -func (l Level) String() string { - switch l { - case DebugLevel: - return "debug" - case InfoLevel: - return "info" - case WarnLevel: - return "warn" - case ErrorLevel: - return "error" - case DPanicLevel: - return "dpanic" - case PanicLevel: - return "panic" - case FatalLevel: - return "fatal" - default: - return fmt.Sprintf("Level(%d)", l) - } -} - -// CapitalString returns an all-caps ASCII representation of the log level. -func (l Level) CapitalString() string { - // Printing levels in all-caps is common enough that we should export this - // functionality. - switch l { - case DebugLevel: - return "DEBUG" - case InfoLevel: - return "INFO" - case WarnLevel: - return "WARN" - case ErrorLevel: - return "ERROR" - case DPanicLevel: - return "DPANIC" - case PanicLevel: - return "PANIC" - case FatalLevel: - return "FATAL" - default: - return fmt.Sprintf("LEVEL(%d)", l) - } -} - -// MarshalText marshals the Level to text. Note that the text representation -// drops the -Level suffix (see example). -func (l Level) MarshalText() ([]byte, error) { - return []byte(l.String()), nil -} - -// UnmarshalText unmarshals text to a level. Like MarshalText, UnmarshalText -// expects the text representation of a Level to drop the -Level suffix (see -// example). -// -// In particular, this makes it easy to configure logging levels using YAML, -// TOML, or JSON files. -func (l *Level) UnmarshalText(text []byte) error { - if l == nil { - return errUnmarshalNilLevel - } - if !l.unmarshalText(text) && !l.unmarshalText(bytes.ToLower(text)) { - return fmt.Errorf("unrecognized level: %q", text) - } - return nil -} - -func (l *Level) unmarshalText(text []byte) bool { - switch string(text) { - case "debug", "DEBUG": - *l = DebugLevel - case "info", "INFO", "": // make the zero value useful - *l = InfoLevel - case "warn", "WARN": - *l = WarnLevel - case "error", "ERROR": - *l = ErrorLevel - case "dpanic", "DPANIC": - *l = DPanicLevel - case "panic", "PANIC": - *l = PanicLevel - case "fatal", "FATAL": - *l = FatalLevel - default: - return false - } - return true -} - -// Set sets the level for the flag.Value interface. -func (l *Level) Set(s string) error { - return l.UnmarshalText([]byte(s)) -} - -// Get gets the level for the flag.Getter interface. -func (l *Level) Get() interface{} { - return *l -} - -// Enabled returns true if the given level is at or above this level. -func (l Level) Enabled(lvl Level) bool { - return lvl >= l -} - -// LevelEnabler decides whether a given logging level is enabled when logging a -// message. -// -// Enablers are intended to be used to implement deterministic filters; -// concerns like sampling are better implemented as a Core. -// -// Each concrete Level value implements a static LevelEnabler which returns -// true for itself and all higher logging levels. For example WarnLevel.Enabled() -// will return true for WarnLevel, ErrorLevel, DPanicLevel, PanicLevel, and -// FatalLevel, but return false for InfoLevel and DebugLevel. -type LevelEnabler interface { - Enabled(Level) bool -} diff --git a/vendor/go.uber.org/zap/zapcore/level_strings.go b/vendor/go.uber.org/zap/zapcore/level_strings.go deleted file mode 100644 index 7af8dadcb37..00000000000 --- a/vendor/go.uber.org/zap/zapcore/level_strings.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import "go.uber.org/zap/internal/color" - -var ( - _levelToColor = map[Level]color.Color{ - DebugLevel: color.Magenta, - InfoLevel: color.Blue, - WarnLevel: color.Yellow, - ErrorLevel: color.Red, - DPanicLevel: color.Red, - PanicLevel: color.Red, - FatalLevel: color.Red, - } - _unknownLevelColor = color.Red - - _levelToLowercaseColorString = make(map[Level]string, len(_levelToColor)) - _levelToCapitalColorString = make(map[Level]string, len(_levelToColor)) -) - -func init() { - for level, color := range _levelToColor { - _levelToLowercaseColorString[level] = color.Add(level.String()) - _levelToCapitalColorString[level] = color.Add(level.CapitalString()) - } -} diff --git a/vendor/go.uber.org/zap/zapcore/marshaler.go b/vendor/go.uber.org/zap/zapcore/marshaler.go deleted file mode 100644 index c3c55ba0d9c..00000000000 --- a/vendor/go.uber.org/zap/zapcore/marshaler.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -// ObjectMarshaler allows user-defined types to efficiently add themselves to the -// logging context, and to selectively omit information which shouldn't be -// included in logs (e.g., passwords). -// -// Note: ObjectMarshaler is only used when zap.Object is used or when -// passed directly to zap.Any. It is not used when reflection-based -// encoding is used. -type ObjectMarshaler interface { - MarshalLogObject(ObjectEncoder) error -} - -// ObjectMarshalerFunc is a type adapter that turns a function into an -// ObjectMarshaler. -type ObjectMarshalerFunc func(ObjectEncoder) error - -// MarshalLogObject calls the underlying function. -func (f ObjectMarshalerFunc) MarshalLogObject(enc ObjectEncoder) error { - return f(enc) -} - -// ArrayMarshaler allows user-defined types to efficiently add themselves to the -// logging context, and to selectively omit information which shouldn't be -// included in logs (e.g., passwords). -// -// Note: ArrayMarshaler is only used when zap.Array is used or when -// passed directly to zap.Any. It is not used when reflection-based -// encoding is used. -type ArrayMarshaler interface { - MarshalLogArray(ArrayEncoder) error -} - -// ArrayMarshalerFunc is a type adapter that turns a function into an -// ArrayMarshaler. -type ArrayMarshalerFunc func(ArrayEncoder) error - -// MarshalLogArray calls the underlying function. -func (f ArrayMarshalerFunc) MarshalLogArray(enc ArrayEncoder) error { - return f(enc) -} diff --git a/vendor/go.uber.org/zap/zapcore/memory_encoder.go b/vendor/go.uber.org/zap/zapcore/memory_encoder.go deleted file mode 100644 index dfead0829d6..00000000000 --- a/vendor/go.uber.org/zap/zapcore/memory_encoder.go +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import "time" - -// MapObjectEncoder is an ObjectEncoder backed by a simple -// map[string]interface{}. It's not fast enough for production use, but it's -// helpful in tests. -type MapObjectEncoder struct { - // Fields contains the entire encoded log context. - Fields map[string]interface{} - // cur is a pointer to the namespace we're currently writing to. - cur map[string]interface{} -} - -// NewMapObjectEncoder creates a new map-backed ObjectEncoder. -func NewMapObjectEncoder() *MapObjectEncoder { - m := make(map[string]interface{}) - return &MapObjectEncoder{ - Fields: m, - cur: m, - } -} - -// AddArray implements ObjectEncoder. -func (m *MapObjectEncoder) AddArray(key string, v ArrayMarshaler) error { - arr := &sliceArrayEncoder{elems: make([]interface{}, 0)} - err := v.MarshalLogArray(arr) - m.cur[key] = arr.elems - return err -} - -// AddObject implements ObjectEncoder. -func (m *MapObjectEncoder) AddObject(k string, v ObjectMarshaler) error { - newMap := NewMapObjectEncoder() - m.cur[k] = newMap.Fields - return v.MarshalLogObject(newMap) -} - -// AddBinary implements ObjectEncoder. -func (m *MapObjectEncoder) AddBinary(k string, v []byte) { m.cur[k] = v } - -// AddByteString implements ObjectEncoder. -func (m *MapObjectEncoder) AddByteString(k string, v []byte) { m.cur[k] = string(v) } - -// AddBool implements ObjectEncoder. -func (m *MapObjectEncoder) AddBool(k string, v bool) { m.cur[k] = v } - -// AddDuration implements ObjectEncoder. -func (m MapObjectEncoder) AddDuration(k string, v time.Duration) { m.cur[k] = v } - -// AddComplex128 implements ObjectEncoder. -func (m *MapObjectEncoder) AddComplex128(k string, v complex128) { m.cur[k] = v } - -// AddComplex64 implements ObjectEncoder. -func (m *MapObjectEncoder) AddComplex64(k string, v complex64) { m.cur[k] = v } - -// AddFloat64 implements ObjectEncoder. -func (m *MapObjectEncoder) AddFloat64(k string, v float64) { m.cur[k] = v } - -// AddFloat32 implements ObjectEncoder. -func (m *MapObjectEncoder) AddFloat32(k string, v float32) { m.cur[k] = v } - -// AddInt implements ObjectEncoder. -func (m *MapObjectEncoder) AddInt(k string, v int) { m.cur[k] = v } - -// AddInt64 implements ObjectEncoder. -func (m *MapObjectEncoder) AddInt64(k string, v int64) { m.cur[k] = v } - -// AddInt32 implements ObjectEncoder. -func (m *MapObjectEncoder) AddInt32(k string, v int32) { m.cur[k] = v } - -// AddInt16 implements ObjectEncoder. -func (m *MapObjectEncoder) AddInt16(k string, v int16) { m.cur[k] = v } - -// AddInt8 implements ObjectEncoder. -func (m *MapObjectEncoder) AddInt8(k string, v int8) { m.cur[k] = v } - -// AddString implements ObjectEncoder. -func (m *MapObjectEncoder) AddString(k string, v string) { m.cur[k] = v } - -// AddTime implements ObjectEncoder. -func (m MapObjectEncoder) AddTime(k string, v time.Time) { m.cur[k] = v } - -// AddUint implements ObjectEncoder. -func (m *MapObjectEncoder) AddUint(k string, v uint) { m.cur[k] = v } - -// AddUint64 implements ObjectEncoder. -func (m *MapObjectEncoder) AddUint64(k string, v uint64) { m.cur[k] = v } - -// AddUint32 implements ObjectEncoder. -func (m *MapObjectEncoder) AddUint32(k string, v uint32) { m.cur[k] = v } - -// AddUint16 implements ObjectEncoder. -func (m *MapObjectEncoder) AddUint16(k string, v uint16) { m.cur[k] = v } - -// AddUint8 implements ObjectEncoder. -func (m *MapObjectEncoder) AddUint8(k string, v uint8) { m.cur[k] = v } - -// AddUintptr implements ObjectEncoder. -func (m *MapObjectEncoder) AddUintptr(k string, v uintptr) { m.cur[k] = v } - -// AddReflected implements ObjectEncoder. -func (m *MapObjectEncoder) AddReflected(k string, v interface{}) error { - m.cur[k] = v - return nil -} - -// OpenNamespace implements ObjectEncoder. -func (m *MapObjectEncoder) OpenNamespace(k string) { - ns := make(map[string]interface{}) - m.cur[k] = ns - m.cur = ns -} - -// sliceArrayEncoder is an ArrayEncoder backed by a simple []interface{}. Like -// the MapObjectEncoder, it's not designed for production use. -type sliceArrayEncoder struct { - elems []interface{} -} - -func (s *sliceArrayEncoder) AppendArray(v ArrayMarshaler) error { - enc := &sliceArrayEncoder{} - err := v.MarshalLogArray(enc) - s.elems = append(s.elems, enc.elems) - return err -} - -func (s *sliceArrayEncoder) AppendObject(v ObjectMarshaler) error { - m := NewMapObjectEncoder() - err := v.MarshalLogObject(m) - s.elems = append(s.elems, m.Fields) - return err -} - -func (s *sliceArrayEncoder) AppendReflected(v interface{}) error { - s.elems = append(s.elems, v) - return nil -} - -func (s *sliceArrayEncoder) AppendBool(v bool) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendByteString(v []byte) { s.elems = append(s.elems, string(v)) } -func (s *sliceArrayEncoder) AppendComplex128(v complex128) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendComplex64(v complex64) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendDuration(v time.Duration) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendFloat64(v float64) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendFloat32(v float32) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendInt(v int) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendInt64(v int64) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendInt32(v int32) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendInt16(v int16) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendInt8(v int8) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendString(v string) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendTime(v time.Time) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendUint(v uint) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendUint64(v uint64) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendUint32(v uint32) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendUint16(v uint16) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendUint8(v uint8) { s.elems = append(s.elems, v) } -func (s *sliceArrayEncoder) AppendUintptr(v uintptr) { s.elems = append(s.elems, v) } diff --git a/vendor/go.uber.org/zap/zapcore/reflected_encoder.go b/vendor/go.uber.org/zap/zapcore/reflected_encoder.go deleted file mode 100644 index 8746360eca6..00000000000 --- a/vendor/go.uber.org/zap/zapcore/reflected_encoder.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import ( - "encoding/json" - "io" -) - -// ReflectedEncoder serializes log fields that can't be serialized with Zap's -// JSON encoder. These have the ReflectType field type. -// Use EncoderConfig.NewReflectedEncoder to set this. -type ReflectedEncoder interface { - // Encode encodes and writes to the underlying data stream. - Encode(interface{}) error -} - -func defaultReflectedEncoder(w io.Writer) ReflectedEncoder { - enc := json.NewEncoder(w) - // For consistency with our custom JSON encoder. - enc.SetEscapeHTML(false) - return enc -} diff --git a/vendor/go.uber.org/zap/zapcore/sampler.go b/vendor/go.uber.org/zap/zapcore/sampler.go deleted file mode 100644 index b7c093a4f2d..00000000000 --- a/vendor/go.uber.org/zap/zapcore/sampler.go +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) 2016-2022 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import ( - "sync/atomic" - "time" -) - -const ( - _numLevels = _maxLevel - _minLevel + 1 - _countersPerLevel = 4096 -) - -type counter struct { - resetAt atomic.Int64 - counter atomic.Uint64 -} - -type counters [_numLevels][_countersPerLevel]counter - -func newCounters() *counters { - return &counters{} -} - -func (cs *counters) get(lvl Level, key string) *counter { - i := lvl - _minLevel - j := fnv32a(key) % _countersPerLevel - return &cs[i][j] -} - -// fnv32a, adapted from "hash/fnv", but without a []byte(string) alloc -func fnv32a(s string) uint32 { - const ( - offset32 = 2166136261 - prime32 = 16777619 - ) - hash := uint32(offset32) - for i := 0; i < len(s); i++ { - hash ^= uint32(s[i]) - hash *= prime32 - } - return hash -} - -func (c *counter) IncCheckReset(t time.Time, tick time.Duration) uint64 { - tn := t.UnixNano() - resetAfter := c.resetAt.Load() - if resetAfter > tn { - return c.counter.Add(1) - } - - c.counter.Store(1) - - newResetAfter := tn + tick.Nanoseconds() - if !c.resetAt.CompareAndSwap(resetAfter, newResetAfter) { - // We raced with another goroutine trying to reset, and it also reset - // the counter to 1, so we need to reincrement the counter. - return c.counter.Add(1) - } - - return 1 -} - -// SamplingDecision is a decision represented as a bit field made by sampler. -// More decisions may be added in the future. -type SamplingDecision uint32 - -const ( - // LogDropped indicates that the Sampler dropped a log entry. - LogDropped SamplingDecision = 1 << iota - // LogSampled indicates that the Sampler sampled a log entry. - LogSampled -) - -// optionFunc wraps a func so it satisfies the SamplerOption interface. -type optionFunc func(*sampler) - -func (f optionFunc) apply(s *sampler) { - f(s) -} - -// SamplerOption configures a Sampler. -type SamplerOption interface { - apply(*sampler) -} - -// nopSamplingHook is the default hook used by sampler. -func nopSamplingHook(Entry, SamplingDecision) {} - -// SamplerHook registers a function which will be called when Sampler makes a -// decision. -// -// This hook may be used to get visibility into the performance of the sampler. -// For example, use it to track metrics of dropped versus sampled logs. -// -// var dropped atomic.Int64 -// zapcore.SamplerHook(func(ent zapcore.Entry, dec zapcore.SamplingDecision) { -// if dec&zapcore.LogDropped > 0 { -// dropped.Inc() -// } -// }) -func SamplerHook(hook func(entry Entry, dec SamplingDecision)) SamplerOption { - return optionFunc(func(s *sampler) { - s.hook = hook - }) -} - -// NewSamplerWithOptions creates a Core that samples incoming entries, which -// caps the CPU and I/O load of logging while attempting to preserve a -// representative subset of your logs. -// -// Zap samples by logging the first N entries with a given level and message -// each tick. If more Entries with the same level and message are seen during -// the same interval, every Mth message is logged and the rest are dropped. -// -// For example, -// -// core = NewSamplerWithOptions(core, time.Second, 10, 5) -// -// This will log the first 10 log entries with the same level and message -// in a one second interval as-is. Following that, it will allow through -// every 5th log entry with the same level and message in that interval. -// -// If thereafter is zero, the Core will drop all log entries after the first N -// in that interval. -// -// Sampler can be configured to report sampling decisions with the SamplerHook -// option. -// -// Keep in mind that Zap's sampling implementation is optimized for speed over -// absolute precision; under load, each tick may be slightly over- or -// under-sampled. -func NewSamplerWithOptions(core Core, tick time.Duration, first, thereafter int, opts ...SamplerOption) Core { - s := &sampler{ - Core: core, - tick: tick, - counts: newCounters(), - first: uint64(first), - thereafter: uint64(thereafter), - hook: nopSamplingHook, - } - for _, opt := range opts { - opt.apply(s) - } - - return s -} - -type sampler struct { - Core - - counts *counters - tick time.Duration - first, thereafter uint64 - hook func(Entry, SamplingDecision) -} - -var ( - _ Core = (*sampler)(nil) - _ leveledEnabler = (*sampler)(nil) -) - -// NewSampler creates a Core that samples incoming entries, which -// caps the CPU and I/O load of logging while attempting to preserve a -// representative subset of your logs. -// -// Zap samples by logging the first N entries with a given level and message -// each tick. If more Entries with the same level and message are seen during -// the same interval, every Mth message is logged and the rest are dropped. -// -// Keep in mind that zap's sampling implementation is optimized for speed over -// absolute precision; under load, each tick may be slightly over- or -// under-sampled. -// -// Deprecated: use NewSamplerWithOptions. -func NewSampler(core Core, tick time.Duration, first, thereafter int) Core { - return NewSamplerWithOptions(core, tick, first, thereafter) -} - -func (s *sampler) Level() Level { - return LevelOf(s.Core) -} - -func (s *sampler) With(fields []Field) Core { - return &sampler{ - Core: s.Core.With(fields), - tick: s.tick, - counts: s.counts, - first: s.first, - thereafter: s.thereafter, - hook: s.hook, - } -} - -func (s *sampler) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { - if !s.Enabled(ent.Level) { - return ce - } - - if ent.Level >= _minLevel && ent.Level <= _maxLevel { - counter := s.counts.get(ent.Level, ent.Message) - n := counter.IncCheckReset(ent.Time, s.tick) - if n > s.first && (s.thereafter == 0 || (n-s.first)%s.thereafter != 0) { - s.hook(ent, LogDropped) - return ce - } - s.hook(ent, LogSampled) - } - return s.Core.Check(ent, ce) -} diff --git a/vendor/go.uber.org/zap/zapcore/tee.go b/vendor/go.uber.org/zap/zapcore/tee.go deleted file mode 100644 index 9bb32f05576..00000000000 --- a/vendor/go.uber.org/zap/zapcore/tee.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2016-2022 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import "go.uber.org/multierr" - -type multiCore []Core - -var ( - _ leveledEnabler = multiCore(nil) - _ Core = multiCore(nil) -) - -// NewTee creates a Core that duplicates log entries into two or more -// underlying Cores. -// -// Calling it with a single Core returns the input unchanged, and calling -// it with no input returns a no-op Core. -func NewTee(cores ...Core) Core { - switch len(cores) { - case 0: - return NewNopCore() - case 1: - return cores[0] - default: - return multiCore(cores) - } -} - -func (mc multiCore) With(fields []Field) Core { - clone := make(multiCore, len(mc)) - for i := range mc { - clone[i] = mc[i].With(fields) - } - return clone -} - -func (mc multiCore) Level() Level { - minLvl := _maxLevel // mc is never empty - for i := range mc { - if lvl := LevelOf(mc[i]); lvl < minLvl { - minLvl = lvl - } - } - return minLvl -} - -func (mc multiCore) Enabled(lvl Level) bool { - for i := range mc { - if mc[i].Enabled(lvl) { - return true - } - } - return false -} - -func (mc multiCore) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { - for i := range mc { - ce = mc[i].Check(ent, ce) - } - return ce -} - -func (mc multiCore) Write(ent Entry, fields []Field) error { - var err error - for i := range mc { - err = multierr.Append(err, mc[i].Write(ent, fields)) - } - return err -} - -func (mc multiCore) Sync() error { - var err error - for i := range mc { - err = multierr.Append(err, mc[i].Sync()) - } - return err -} diff --git a/vendor/go.uber.org/zap/zapcore/write_syncer.go b/vendor/go.uber.org/zap/zapcore/write_syncer.go deleted file mode 100644 index d4a1af3d078..00000000000 --- a/vendor/go.uber.org/zap/zapcore/write_syncer.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -package zapcore - -import ( - "io" - "sync" - - "go.uber.org/multierr" -) - -// A WriteSyncer is an io.Writer that can also flush any buffered data. Note -// that *os.File (and thus, os.Stderr and os.Stdout) implement WriteSyncer. -type WriteSyncer interface { - io.Writer - Sync() error -} - -// AddSync converts an io.Writer to a WriteSyncer. It attempts to be -// intelligent: if the concrete type of the io.Writer implements WriteSyncer, -// we'll use the existing Sync method. If it doesn't, we'll add a no-op Sync. -func AddSync(w io.Writer) WriteSyncer { - switch w := w.(type) { - case WriteSyncer: - return w - default: - return writerWrapper{w} - } -} - -type lockedWriteSyncer struct { - sync.Mutex - ws WriteSyncer -} - -// Lock wraps a WriteSyncer in a mutex to make it safe for concurrent use. In -// particular, *os.Files must be locked before use. -func Lock(ws WriteSyncer) WriteSyncer { - if _, ok := ws.(*lockedWriteSyncer); ok { - // no need to layer on another lock - return ws - } - return &lockedWriteSyncer{ws: ws} -} - -func (s *lockedWriteSyncer) Write(bs []byte) (int, error) { - s.Lock() - n, err := s.ws.Write(bs) - s.Unlock() - return n, err -} - -func (s *lockedWriteSyncer) Sync() error { - s.Lock() - err := s.ws.Sync() - s.Unlock() - return err -} - -type writerWrapper struct { - io.Writer -} - -func (w writerWrapper) Sync() error { - return nil -} - -type multiWriteSyncer []WriteSyncer - -// NewMultiWriteSyncer creates a WriteSyncer that duplicates its writes -// and sync calls, much like io.MultiWriter. -func NewMultiWriteSyncer(ws ...WriteSyncer) WriteSyncer { - if len(ws) == 1 { - return ws[0] - } - return multiWriteSyncer(ws) -} - -// See https://golang.org/src/io/multi.go -// When not all underlying syncers write the same number of bytes, -// the smallest number is returned even though Write() is called on -// all of them. -func (ws multiWriteSyncer) Write(p []byte) (int, error) { - var writeErr error - nWritten := 0 - for _, w := range ws { - n, err := w.Write(p) - writeErr = multierr.Append(writeErr, err) - if nWritten == 0 && n != 0 { - nWritten = n - } else if n < nWritten { - nWritten = n - } - } - return nWritten, writeErr -} - -func (ws multiWriteSyncer) Sync() error { - var err error - for _, w := range ws { - err = multierr.Append(err, w.Sync()) - } - return err -} diff --git a/vendor/go.uber.org/zap/zapgrpc/zapgrpc.go b/vendor/go.uber.org/zap/zapgrpc/zapgrpc.go deleted file mode 100644 index 6823773b727..00000000000 --- a/vendor/go.uber.org/zap/zapgrpc/zapgrpc.go +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) 2016 Uber Technologies, Inc. -// -// 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. - -// Package zapgrpc provides a logger that is compatible with grpclog. -package zapgrpc // import "go.uber.org/zap/zapgrpc" - -import ( - "fmt" - - "go.uber.org/zap" - "go.uber.org/zap/zapcore" -) - -// See https://github.com/grpc/grpc-go/blob/v1.35.0/grpclog/loggerv2.go#L77-L86 -const ( - grpcLvlInfo int = iota - grpcLvlWarn - grpcLvlError - grpcLvlFatal -) - -var ( - // _grpcToZapLevel maps gRPC log levels to zap log levels. - // See https://pkg.go.dev/go.uber.org/zap@v1.16.0/zapcore#Level - _grpcToZapLevel = map[int]zapcore.Level{ - grpcLvlInfo: zapcore.InfoLevel, - grpcLvlWarn: zapcore.WarnLevel, - grpcLvlError: zapcore.ErrorLevel, - grpcLvlFatal: zapcore.FatalLevel, - } -) - -// An Option overrides a Logger's default configuration. -type Option interface { - apply(*Logger) -} - -type optionFunc func(*Logger) - -func (f optionFunc) apply(log *Logger) { - f(log) -} - -// WithDebug configures a Logger to print at zap's DebugLevel instead of -// InfoLevel. -// It only affects the Printf, Println and Print methods, which are only used in the gRPC v1 grpclog.Logger API. -// -// Deprecated: use grpclog.SetLoggerV2() for v2 API. -func WithDebug() Option { - return optionFunc(func(logger *Logger) { - logger.print = &printer{ - enab: logger.levelEnabler, - level: zapcore.DebugLevel, - print: logger.delegate.Debug, - printf: logger.delegate.Debugf, - } - }) -} - -// withWarn redirects the fatal level to the warn level, which makes testing -// easier. This is intentionally unexported. -func withWarn() Option { - return optionFunc(func(logger *Logger) { - logger.fatal = &printer{ - enab: logger.levelEnabler, - level: zapcore.WarnLevel, - print: logger.delegate.Warn, - printf: logger.delegate.Warnf, - } - }) -} - -// NewLogger returns a new Logger. -func NewLogger(l *zap.Logger, options ...Option) *Logger { - logger := &Logger{ - delegate: l.Sugar(), - levelEnabler: l.Core(), - } - logger.print = &printer{ - enab: logger.levelEnabler, - level: zapcore.InfoLevel, - print: logger.delegate.Info, - printf: logger.delegate.Infof, - } - logger.fatal = &printer{ - enab: logger.levelEnabler, - level: zapcore.FatalLevel, - print: logger.delegate.Fatal, - printf: logger.delegate.Fatalf, - } - for _, option := range options { - option.apply(logger) - } - return logger -} - -// printer implements Print, Printf, and Println operations for a Zap level. -// -// We use it to customize Debug vs Info, and Warn vs Fatal for Print and Fatal -// respectively. -type printer struct { - enab zapcore.LevelEnabler - level zapcore.Level - print func(...interface{}) - printf func(string, ...interface{}) -} - -func (v *printer) Print(args ...interface{}) { - v.print(args...) -} - -func (v *printer) Printf(format string, args ...interface{}) { - v.printf(format, args...) -} - -func (v *printer) Println(args ...interface{}) { - if v.enab.Enabled(v.level) { - v.print(sprintln(args)) - } -} - -// Logger adapts zap's Logger to be compatible with grpclog.LoggerV2 and the deprecated grpclog.Logger. -type Logger struct { - delegate *zap.SugaredLogger - levelEnabler zapcore.LevelEnabler - print *printer - fatal *printer - // printToDebug bool - // fatalToWarn bool -} - -// Print implements grpclog.Logger. -// -// Deprecated: use [Logger.Info]. -func (l *Logger) Print(args ...interface{}) { - l.print.Print(args...) -} - -// Printf implements grpclog.Logger. -// -// Deprecated: use [Logger.Infof]. -func (l *Logger) Printf(format string, args ...interface{}) { - l.print.Printf(format, args...) -} - -// Println implements grpclog.Logger. -// -// Deprecated: use [Logger.Info]. -func (l *Logger) Println(args ...interface{}) { - l.print.Println(args...) -} - -// Info implements grpclog.LoggerV2. -func (l *Logger) Info(args ...interface{}) { - l.delegate.Info(args...) -} - -// Infoln implements grpclog.LoggerV2. -func (l *Logger) Infoln(args ...interface{}) { - if l.levelEnabler.Enabled(zapcore.InfoLevel) { - l.delegate.Info(sprintln(args)) - } -} - -// Infof implements grpclog.LoggerV2. -func (l *Logger) Infof(format string, args ...interface{}) { - l.delegate.Infof(format, args...) -} - -// Warning implements grpclog.LoggerV2. -func (l *Logger) Warning(args ...interface{}) { - l.delegate.Warn(args...) -} - -// Warningln implements grpclog.LoggerV2. -func (l *Logger) Warningln(args ...interface{}) { - if l.levelEnabler.Enabled(zapcore.WarnLevel) { - l.delegate.Warn(sprintln(args)) - } -} - -// Warningf implements grpclog.LoggerV2. -func (l *Logger) Warningf(format string, args ...interface{}) { - l.delegate.Warnf(format, args...) -} - -// Error implements grpclog.LoggerV2. -func (l *Logger) Error(args ...interface{}) { - l.delegate.Error(args...) -} - -// Errorln implements grpclog.LoggerV2. -func (l *Logger) Errorln(args ...interface{}) { - if l.levelEnabler.Enabled(zapcore.ErrorLevel) { - l.delegate.Error(sprintln(args)) - } -} - -// Errorf implements grpclog.LoggerV2. -func (l *Logger) Errorf(format string, args ...interface{}) { - l.delegate.Errorf(format, args...) -} - -// Fatal implements grpclog.LoggerV2. -func (l *Logger) Fatal(args ...interface{}) { - l.fatal.Print(args...) -} - -// Fatalln implements grpclog.LoggerV2. -func (l *Logger) Fatalln(args ...interface{}) { - l.fatal.Println(args...) -} - -// Fatalf implements grpclog.LoggerV2. -func (l *Logger) Fatalf(format string, args ...interface{}) { - l.fatal.Printf(format, args...) -} - -// V implements grpclog.LoggerV2. -func (l *Logger) V(level int) bool { - return l.levelEnabler.Enabled(_grpcToZapLevel[level]) -} - -func sprintln(args []interface{}) string { - s := fmt.Sprintln(args...) - // Drop the new line character added by Sprintln - return s[:len(s)-1] -} diff --git a/vendor/golang.org/x/net/websocket/client.go b/vendor/golang.org/x/net/websocket/client.go new file mode 100644 index 00000000000..1e64157f3eb --- /dev/null +++ b/vendor/golang.org/x/net/websocket/client.go @@ -0,0 +1,139 @@ +// Copyright 2009 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 websocket + +import ( + "bufio" + "context" + "io" + "net" + "net/http" + "net/url" + "time" +) + +// DialError is an error that occurs while dialling a websocket server. +type DialError struct { + *Config + Err error +} + +func (e *DialError) Error() string { + return "websocket.Dial " + e.Config.Location.String() + ": " + e.Err.Error() +} + +// NewConfig creates a new WebSocket config for client connection. +func NewConfig(server, origin string) (config *Config, err error) { + config = new(Config) + config.Version = ProtocolVersionHybi13 + config.Location, err = url.ParseRequestURI(server) + if err != nil { + return + } + config.Origin, err = url.ParseRequestURI(origin) + if err != nil { + return + } + config.Header = http.Header(make(map[string][]string)) + return +} + +// NewClient creates a new WebSocket client connection over rwc. +func NewClient(config *Config, rwc io.ReadWriteCloser) (ws *Conn, err error) { + br := bufio.NewReader(rwc) + bw := bufio.NewWriter(rwc) + err = hybiClientHandshake(config, br, bw) + if err != nil { + return + } + buf := bufio.NewReadWriter(br, bw) + ws = newHybiClientConn(config, buf, rwc) + return +} + +// Dial opens a new client connection to a WebSocket. +func Dial(url_, protocol, origin string) (ws *Conn, err error) { + config, err := NewConfig(url_, origin) + if err != nil { + return nil, err + } + if protocol != "" { + config.Protocol = []string{protocol} + } + return DialConfig(config) +} + +var portMap = map[string]string{ + "ws": "80", + "wss": "443", +} + +func parseAuthority(location *url.URL) string { + if _, ok := portMap[location.Scheme]; ok { + if _, _, err := net.SplitHostPort(location.Host); err != nil { + return net.JoinHostPort(location.Host, portMap[location.Scheme]) + } + } + return location.Host +} + +// DialConfig opens a new client connection to a WebSocket with a config. +func DialConfig(config *Config) (ws *Conn, err error) { + return config.DialContext(context.Background()) +} + +// DialContext opens a new client connection to a WebSocket, with context support for timeouts/cancellation. +func (config *Config) DialContext(ctx context.Context) (*Conn, error) { + if config.Location == nil { + return nil, &DialError{config, ErrBadWebSocketLocation} + } + if config.Origin == nil { + return nil, &DialError{config, ErrBadWebSocketOrigin} + } + + dialer := config.Dialer + if dialer == nil { + dialer = &net.Dialer{} + } + + client, err := dialWithDialer(ctx, dialer, config) + if err != nil { + return nil, &DialError{config, err} + } + + // Cleanup the connection if we fail to create the websocket successfully + success := false + defer func() { + if !success { + _ = client.Close() + } + }() + + var ws *Conn + var wsErr error + doneConnecting := make(chan struct{}) + go func() { + defer close(doneConnecting) + ws, err = NewClient(config, client) + if err != nil { + wsErr = &DialError{config, err} + } + }() + + // The websocket.NewClient() function can block indefinitely, make sure that we + // respect the deadlines specified by the context. + select { + case <-ctx.Done(): + // Force the pending operations to fail, terminating the pending connection attempt + _ = client.SetDeadline(time.Now()) + <-doneConnecting // Wait for the goroutine that tries to establish the connection to finish + return nil, &DialError{config, ctx.Err()} + case <-doneConnecting: + if wsErr == nil { + success = true // Disarm the deferred connection cleanup + } + return ws, wsErr + } +} diff --git a/vendor/golang.org/x/net/websocket/dial.go b/vendor/golang.org/x/net/websocket/dial.go new file mode 100644 index 00000000000..8a2d83c473b --- /dev/null +++ b/vendor/golang.org/x/net/websocket/dial.go @@ -0,0 +1,29 @@ +// 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 websocket + +import ( + "context" + "crypto/tls" + "net" +) + +func dialWithDialer(ctx context.Context, dialer *net.Dialer, config *Config) (conn net.Conn, err error) { + switch config.Location.Scheme { + case "ws": + conn, err = dialer.DialContext(ctx, "tcp", parseAuthority(config.Location)) + + case "wss": + tlsDialer := &tls.Dialer{ + NetDialer: dialer, + Config: config.TlsConfig, + } + + conn, err = tlsDialer.DialContext(ctx, "tcp", parseAuthority(config.Location)) + default: + err = ErrBadScheme + } + return +} diff --git a/vendor/golang.org/x/net/websocket/hybi.go b/vendor/golang.org/x/net/websocket/hybi.go new file mode 100644 index 00000000000..dda7434666e --- /dev/null +++ b/vendor/golang.org/x/net/websocket/hybi.go @@ -0,0 +1,582 @@ +// 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 websocket + +// This file implements a protocol of hybi draft. +// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17 + +import ( + "bufio" + "bytes" + "crypto/rand" + "crypto/sha1" + "encoding/base64" + "encoding/binary" + "fmt" + "io" + "net/http" + "net/url" + "strings" +) + +const ( + websocketGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" + + closeStatusNormal = 1000 + closeStatusGoingAway = 1001 + closeStatusProtocolError = 1002 + closeStatusUnsupportedData = 1003 + closeStatusFrameTooLarge = 1004 + closeStatusNoStatusRcvd = 1005 + closeStatusAbnormalClosure = 1006 + closeStatusBadMessageData = 1007 + closeStatusPolicyViolation = 1008 + closeStatusTooBigData = 1009 + closeStatusExtensionMismatch = 1010 + + maxControlFramePayloadLength = 125 +) + +var ( + ErrBadMaskingKey = &ProtocolError{"bad masking key"} + ErrBadPongMessage = &ProtocolError{"bad pong message"} + ErrBadClosingStatus = &ProtocolError{"bad closing status"} + ErrUnsupportedExtensions = &ProtocolError{"unsupported extensions"} + ErrNotImplemented = &ProtocolError{"not implemented"} + + handshakeHeader = map[string]bool{ + "Host": true, + "Upgrade": true, + "Connection": true, + "Sec-Websocket-Key": true, + "Sec-Websocket-Origin": true, + "Sec-Websocket-Version": true, + "Sec-Websocket-Protocol": true, + "Sec-Websocket-Accept": true, + } +) + +// A hybiFrameHeader is a frame header as defined in hybi draft. +type hybiFrameHeader struct { + Fin bool + Rsv [3]bool + OpCode byte + Length int64 + MaskingKey []byte + + data *bytes.Buffer +} + +// A hybiFrameReader is a reader for hybi frame. +type hybiFrameReader struct { + reader io.Reader + + header hybiFrameHeader + pos int64 + length int +} + +func (frame *hybiFrameReader) Read(msg []byte) (n int, err error) { + n, err = frame.reader.Read(msg) + if frame.header.MaskingKey != nil { + for i := 0; i < n; i++ { + msg[i] = msg[i] ^ frame.header.MaskingKey[frame.pos%4] + frame.pos++ + } + } + return n, err +} + +func (frame *hybiFrameReader) PayloadType() byte { return frame.header.OpCode } + +func (frame *hybiFrameReader) HeaderReader() io.Reader { + if frame.header.data == nil { + return nil + } + if frame.header.data.Len() == 0 { + return nil + } + return frame.header.data +} + +func (frame *hybiFrameReader) TrailerReader() io.Reader { return nil } + +func (frame *hybiFrameReader) Len() (n int) { return frame.length } + +// A hybiFrameReaderFactory creates new frame reader based on its frame type. +type hybiFrameReaderFactory struct { + *bufio.Reader +} + +// NewFrameReader reads a frame header from the connection, and creates new reader for the frame. +// See Section 5.2 Base Framing protocol for detail. +// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17#section-5.2 +func (buf hybiFrameReaderFactory) NewFrameReader() (frame frameReader, err error) { + hybiFrame := new(hybiFrameReader) + frame = hybiFrame + var header []byte + var b byte + // First byte. FIN/RSV1/RSV2/RSV3/OpCode(4bits) + b, err = buf.ReadByte() + if err != nil { + return + } + header = append(header, b) + hybiFrame.header.Fin = ((header[0] >> 7) & 1) != 0 + for i := 0; i < 3; i++ { + j := uint(6 - i) + hybiFrame.header.Rsv[i] = ((header[0] >> j) & 1) != 0 + } + hybiFrame.header.OpCode = header[0] & 0x0f + + // Second byte. Mask/Payload len(7bits) + b, err = buf.ReadByte() + if err != nil { + return + } + header = append(header, b) + mask := (b & 0x80) != 0 + b &= 0x7f + lengthFields := 0 + switch { + case b <= 125: // Payload length 7bits. + hybiFrame.header.Length = int64(b) + case b == 126: // Payload length 7+16bits + lengthFields = 2 + case b == 127: // Payload length 7+64bits + lengthFields = 8 + } + for i := 0; i < lengthFields; i++ { + b, err = buf.ReadByte() + if err != nil { + return + } + if lengthFields == 8 && i == 0 { // MSB must be zero when 7+64 bits + b &= 0x7f + } + header = append(header, b) + hybiFrame.header.Length = hybiFrame.header.Length*256 + int64(b) + } + if mask { + // Masking key. 4 bytes. + for i := 0; i < 4; i++ { + b, err = buf.ReadByte() + if err != nil { + return + } + header = append(header, b) + hybiFrame.header.MaskingKey = append(hybiFrame.header.MaskingKey, b) + } + } + hybiFrame.reader = io.LimitReader(buf.Reader, hybiFrame.header.Length) + hybiFrame.header.data = bytes.NewBuffer(header) + hybiFrame.length = len(header) + int(hybiFrame.header.Length) + return +} + +// A HybiFrameWriter is a writer for hybi frame. +type hybiFrameWriter struct { + writer *bufio.Writer + + header *hybiFrameHeader +} + +func (frame *hybiFrameWriter) Write(msg []byte) (n int, err error) { + var header []byte + var b byte + if frame.header.Fin { + b |= 0x80 + } + for i := 0; i < 3; i++ { + if frame.header.Rsv[i] { + j := uint(6 - i) + b |= 1 << j + } + } + b |= frame.header.OpCode + header = append(header, b) + if frame.header.MaskingKey != nil { + b = 0x80 + } else { + b = 0 + } + lengthFields := 0 + length := len(msg) + switch { + case length <= 125: + b |= byte(length) + case length < 65536: + b |= 126 + lengthFields = 2 + default: + b |= 127 + lengthFields = 8 + } + header = append(header, b) + for i := 0; i < lengthFields; i++ { + j := uint((lengthFields - i - 1) * 8) + b = byte((length >> j) & 0xff) + header = append(header, b) + } + if frame.header.MaskingKey != nil { + if len(frame.header.MaskingKey) != 4 { + return 0, ErrBadMaskingKey + } + header = append(header, frame.header.MaskingKey...) + frame.writer.Write(header) + data := make([]byte, length) + for i := range data { + data[i] = msg[i] ^ frame.header.MaskingKey[i%4] + } + frame.writer.Write(data) + err = frame.writer.Flush() + return length, err + } + frame.writer.Write(header) + frame.writer.Write(msg) + err = frame.writer.Flush() + return length, err +} + +func (frame *hybiFrameWriter) Close() error { return nil } + +type hybiFrameWriterFactory struct { + *bufio.Writer + needMaskingKey bool +} + +func (buf hybiFrameWriterFactory) NewFrameWriter(payloadType byte) (frame frameWriter, err error) { + frameHeader := &hybiFrameHeader{Fin: true, OpCode: payloadType} + if buf.needMaskingKey { + frameHeader.MaskingKey, err = generateMaskingKey() + if err != nil { + return nil, err + } + } + return &hybiFrameWriter{writer: buf.Writer, header: frameHeader}, nil +} + +type hybiFrameHandler struct { + conn *Conn + payloadType byte +} + +func (handler *hybiFrameHandler) HandleFrame(frame frameReader) (frameReader, error) { + if handler.conn.IsServerConn() { + // The client MUST mask all frames sent to the server. + if frame.(*hybiFrameReader).header.MaskingKey == nil { + handler.WriteClose(closeStatusProtocolError) + return nil, io.EOF + } + } else { + // The server MUST NOT mask all frames. + if frame.(*hybiFrameReader).header.MaskingKey != nil { + handler.WriteClose(closeStatusProtocolError) + return nil, io.EOF + } + } + if header := frame.HeaderReader(); header != nil { + io.Copy(io.Discard, header) + } + switch frame.PayloadType() { + case ContinuationFrame: + frame.(*hybiFrameReader).header.OpCode = handler.payloadType + case TextFrame, BinaryFrame: + handler.payloadType = frame.PayloadType() + case CloseFrame: + return nil, io.EOF + case PingFrame, PongFrame: + b := make([]byte, maxControlFramePayloadLength) + n, err := io.ReadFull(frame, b) + if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF { + return nil, err + } + io.Copy(io.Discard, frame) + if frame.PayloadType() == PingFrame { + if _, err := handler.WritePong(b[:n]); err != nil { + return nil, err + } + } + return nil, nil + } + return frame, nil +} + +func (handler *hybiFrameHandler) WriteClose(status int) (err error) { + handler.conn.wio.Lock() + defer handler.conn.wio.Unlock() + w, err := handler.conn.frameWriterFactory.NewFrameWriter(CloseFrame) + if err != nil { + return err + } + msg := make([]byte, 2) + binary.BigEndian.PutUint16(msg, uint16(status)) + _, err = w.Write(msg) + w.Close() + return err +} + +func (handler *hybiFrameHandler) WritePong(msg []byte) (n int, err error) { + handler.conn.wio.Lock() + defer handler.conn.wio.Unlock() + w, err := handler.conn.frameWriterFactory.NewFrameWriter(PongFrame) + if err != nil { + return 0, err + } + n, err = w.Write(msg) + w.Close() + return n, err +} + +// newHybiConn creates a new WebSocket connection speaking hybi draft protocol. +func newHybiConn(config *Config, buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) *Conn { + if buf == nil { + br := bufio.NewReader(rwc) + bw := bufio.NewWriter(rwc) + buf = bufio.NewReadWriter(br, bw) + } + ws := &Conn{config: config, request: request, buf: buf, rwc: rwc, + frameReaderFactory: hybiFrameReaderFactory{buf.Reader}, + frameWriterFactory: hybiFrameWriterFactory{ + buf.Writer, request == nil}, + PayloadType: TextFrame, + defaultCloseStatus: closeStatusNormal} + ws.frameHandler = &hybiFrameHandler{conn: ws} + return ws +} + +// generateMaskingKey generates a masking key for a frame. +func generateMaskingKey() (maskingKey []byte, err error) { + maskingKey = make([]byte, 4) + if _, err = io.ReadFull(rand.Reader, maskingKey); err != nil { + return + } + return +} + +// generateNonce generates a nonce consisting of a randomly selected 16-byte +// value that has been base64-encoded. +func generateNonce() (nonce []byte) { + key := make([]byte, 16) + if _, err := io.ReadFull(rand.Reader, key); err != nil { + panic(err) + } + nonce = make([]byte, 24) + base64.StdEncoding.Encode(nonce, key) + return +} + +// removeZone removes IPv6 zone identifier from host. +// E.g., "[fe80::1%en0]:8080" to "[fe80::1]:8080" +func removeZone(host string) string { + if !strings.HasPrefix(host, "[") { + return host + } + i := strings.LastIndex(host, "]") + if i < 0 { + return host + } + j := strings.LastIndex(host[:i], "%") + if j < 0 { + return host + } + return host[:j] + host[i:] +} + +// getNonceAccept computes the base64-encoded SHA-1 of the concatenation of +// the nonce ("Sec-WebSocket-Key" value) with the websocket GUID string. +func getNonceAccept(nonce []byte) (expected []byte, err error) { + h := sha1.New() + if _, err = h.Write(nonce); err != nil { + return + } + if _, err = h.Write([]byte(websocketGUID)); err != nil { + return + } + expected = make([]byte, 28) + base64.StdEncoding.Encode(expected, h.Sum(nil)) + return +} + +// Client handshake described in draft-ietf-hybi-thewebsocket-protocol-17 +func hybiClientHandshake(config *Config, br *bufio.Reader, bw *bufio.Writer) (err error) { + bw.WriteString("GET " + config.Location.RequestURI() + " HTTP/1.1\r\n") + + // According to RFC 6874, an HTTP client, proxy, or other + // intermediary must remove any IPv6 zone identifier attached + // to an outgoing URI. + bw.WriteString("Host: " + removeZone(config.Location.Host) + "\r\n") + bw.WriteString("Upgrade: websocket\r\n") + bw.WriteString("Connection: Upgrade\r\n") + nonce := generateNonce() + if config.handshakeData != nil { + nonce = []byte(config.handshakeData["key"]) + } + bw.WriteString("Sec-WebSocket-Key: " + string(nonce) + "\r\n") + bw.WriteString("Origin: " + strings.ToLower(config.Origin.String()) + "\r\n") + + if config.Version != ProtocolVersionHybi13 { + return ErrBadProtocolVersion + } + + bw.WriteString("Sec-WebSocket-Version: " + fmt.Sprintf("%d", config.Version) + "\r\n") + if len(config.Protocol) > 0 { + bw.WriteString("Sec-WebSocket-Protocol: " + strings.Join(config.Protocol, ", ") + "\r\n") + } + // TODO(ukai): send Sec-WebSocket-Extensions. + err = config.Header.WriteSubset(bw, handshakeHeader) + if err != nil { + return err + } + + bw.WriteString("\r\n") + if err = bw.Flush(); err != nil { + return err + } + + resp, err := http.ReadResponse(br, &http.Request{Method: "GET"}) + if err != nil { + return err + } + if resp.StatusCode != 101 { + return ErrBadStatus + } + if strings.ToLower(resp.Header.Get("Upgrade")) != "websocket" || + strings.ToLower(resp.Header.Get("Connection")) != "upgrade" { + return ErrBadUpgrade + } + expectedAccept, err := getNonceAccept(nonce) + if err != nil { + return err + } + if resp.Header.Get("Sec-WebSocket-Accept") != string(expectedAccept) { + return ErrChallengeResponse + } + if resp.Header.Get("Sec-WebSocket-Extensions") != "" { + return ErrUnsupportedExtensions + } + offeredProtocol := resp.Header.Get("Sec-WebSocket-Protocol") + if offeredProtocol != "" { + protocolMatched := false + for i := 0; i < len(config.Protocol); i++ { + if config.Protocol[i] == offeredProtocol { + protocolMatched = true + break + } + } + if !protocolMatched { + return ErrBadWebSocketProtocol + } + config.Protocol = []string{offeredProtocol} + } + + return nil +} + +// newHybiClientConn creates a client WebSocket connection after handshake. +func newHybiClientConn(config *Config, buf *bufio.ReadWriter, rwc io.ReadWriteCloser) *Conn { + return newHybiConn(config, buf, rwc, nil) +} + +// A HybiServerHandshaker performs a server handshake using hybi draft protocol. +type hybiServerHandshaker struct { + *Config + accept []byte +} + +func (c *hybiServerHandshaker) ReadHandshake(buf *bufio.Reader, req *http.Request) (code int, err error) { + c.Version = ProtocolVersionHybi13 + if req.Method != "GET" { + return http.StatusMethodNotAllowed, ErrBadRequestMethod + } + // HTTP version can be safely ignored. + + if strings.ToLower(req.Header.Get("Upgrade")) != "websocket" || + !strings.Contains(strings.ToLower(req.Header.Get("Connection")), "upgrade") { + return http.StatusBadRequest, ErrNotWebSocket + } + + key := req.Header.Get("Sec-Websocket-Key") + if key == "" { + return http.StatusBadRequest, ErrChallengeResponse + } + version := req.Header.Get("Sec-Websocket-Version") + switch version { + case "13": + c.Version = ProtocolVersionHybi13 + default: + return http.StatusBadRequest, ErrBadWebSocketVersion + } + var scheme string + if req.TLS != nil { + scheme = "wss" + } else { + scheme = "ws" + } + c.Location, err = url.ParseRequestURI(scheme + "://" + req.Host + req.URL.RequestURI()) + if err != nil { + return http.StatusBadRequest, err + } + protocol := strings.TrimSpace(req.Header.Get("Sec-Websocket-Protocol")) + if protocol != "" { + protocols := strings.Split(protocol, ",") + for i := 0; i < len(protocols); i++ { + c.Protocol = append(c.Protocol, strings.TrimSpace(protocols[i])) + } + } + c.accept, err = getNonceAccept([]byte(key)) + if err != nil { + return http.StatusInternalServerError, err + } + return http.StatusSwitchingProtocols, nil +} + +// Origin parses the Origin header in req. +// If the Origin header is not set, it returns nil and nil. +func Origin(config *Config, req *http.Request) (*url.URL, error) { + var origin string + switch config.Version { + case ProtocolVersionHybi13: + origin = req.Header.Get("Origin") + } + if origin == "" { + return nil, nil + } + return url.ParseRequestURI(origin) +} + +func (c *hybiServerHandshaker) AcceptHandshake(buf *bufio.Writer) (err error) { + if len(c.Protocol) > 0 { + if len(c.Protocol) != 1 { + // You need choose a Protocol in Handshake func in Server. + return ErrBadWebSocketProtocol + } + } + buf.WriteString("HTTP/1.1 101 Switching Protocols\r\n") + buf.WriteString("Upgrade: websocket\r\n") + buf.WriteString("Connection: Upgrade\r\n") + buf.WriteString("Sec-WebSocket-Accept: " + string(c.accept) + "\r\n") + if len(c.Protocol) > 0 { + buf.WriteString("Sec-WebSocket-Protocol: " + c.Protocol[0] + "\r\n") + } + // TODO(ukai): send Sec-WebSocket-Extensions. + if c.Header != nil { + err := c.Header.WriteSubset(buf, handshakeHeader) + if err != nil { + return err + } + } + buf.WriteString("\r\n") + return buf.Flush() +} + +func (c *hybiServerHandshaker) NewServerConn(buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) *Conn { + return newHybiServerConn(c.Config, buf, rwc, request) +} + +// newHybiServerConn returns a new WebSocket connection speaking hybi draft protocol. +func newHybiServerConn(config *Config, buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) *Conn { + return newHybiConn(config, buf, rwc, request) +} diff --git a/vendor/golang.org/x/net/websocket/server.go b/vendor/golang.org/x/net/websocket/server.go new file mode 100644 index 00000000000..0895dea1905 --- /dev/null +++ b/vendor/golang.org/x/net/websocket/server.go @@ -0,0 +1,113 @@ +// Copyright 2009 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 websocket + +import ( + "bufio" + "fmt" + "io" + "net/http" +) + +func newServerConn(rwc io.ReadWriteCloser, buf *bufio.ReadWriter, req *http.Request, config *Config, handshake func(*Config, *http.Request) error) (conn *Conn, err error) { + var hs serverHandshaker = &hybiServerHandshaker{Config: config} + code, err := hs.ReadHandshake(buf.Reader, req) + if err == ErrBadWebSocketVersion { + fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code)) + fmt.Fprintf(buf, "Sec-WebSocket-Version: %s\r\n", SupportedProtocolVersion) + buf.WriteString("\r\n") + buf.WriteString(err.Error()) + buf.Flush() + return + } + if err != nil { + fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code)) + buf.WriteString("\r\n") + buf.WriteString(err.Error()) + buf.Flush() + return + } + if handshake != nil { + err = handshake(config, req) + if err != nil { + code = http.StatusForbidden + fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code)) + buf.WriteString("\r\n") + buf.Flush() + return + } + } + err = hs.AcceptHandshake(buf.Writer) + if err != nil { + code = http.StatusBadRequest + fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code)) + buf.WriteString("\r\n") + buf.Flush() + return + } + conn = hs.NewServerConn(buf, rwc, req) + return +} + +// Server represents a server of a WebSocket. +type Server struct { + // Config is a WebSocket configuration for new WebSocket connection. + Config + + // Handshake is an optional function in WebSocket handshake. + // For example, you can check, or don't check Origin header. + // Another example, you can select config.Protocol. + Handshake func(*Config, *http.Request) error + + // Handler handles a WebSocket connection. + Handler +} + +// ServeHTTP implements the http.Handler interface for a WebSocket +func (s Server) ServeHTTP(w http.ResponseWriter, req *http.Request) { + s.serveWebSocket(w, req) +} + +func (s Server) serveWebSocket(w http.ResponseWriter, req *http.Request) { + rwc, buf, err := w.(http.Hijacker).Hijack() + if err != nil { + panic("Hijack failed: " + err.Error()) + } + // The server should abort the WebSocket connection if it finds + // the client did not send a handshake that matches with protocol + // specification. + defer rwc.Close() + conn, err := newServerConn(rwc, buf, req, &s.Config, s.Handshake) + if err != nil { + return + } + if conn == nil { + panic("unexpected nil conn") + } + s.Handler(conn) +} + +// Handler is a simple interface to a WebSocket browser client. +// It checks if Origin header is valid URL by default. +// You might want to verify websocket.Conn.Config().Origin in the func. +// If you use Server instead of Handler, you could call websocket.Origin and +// check the origin in your Handshake func. So, if you want to accept +// non-browser clients, which do not send an Origin header, set a +// Server.Handshake that does not check the origin. +type Handler func(*Conn) + +func checkOrigin(config *Config, req *http.Request) (err error) { + config.Origin, err = Origin(config, req) + if err == nil && config.Origin == nil { + return fmt.Errorf("null origin") + } + return err +} + +// ServeHTTP implements the http.Handler interface for a WebSocket +func (h Handler) ServeHTTP(w http.ResponseWriter, req *http.Request) { + s := Server{Handler: h, Handshake: checkOrigin} + s.serveWebSocket(w, req) +} diff --git a/vendor/golang.org/x/net/websocket/websocket.go b/vendor/golang.org/x/net/websocket/websocket.go new file mode 100644 index 00000000000..923a5780ec5 --- /dev/null +++ b/vendor/golang.org/x/net/websocket/websocket.go @@ -0,0 +1,448 @@ +// Copyright 2009 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 websocket implements a client and server for the WebSocket protocol +// as specified in RFC 6455. +// +// This package currently lacks some features found in an alternative +// and more actively maintained WebSocket package: +// +// https://pkg.go.dev/nhooyr.io/websocket +package websocket // import "golang.org/x/net/websocket" + +import ( + "bufio" + "crypto/tls" + "encoding/json" + "errors" + "io" + "net" + "net/http" + "net/url" + "sync" + "time" +) + +const ( + ProtocolVersionHybi13 = 13 + ProtocolVersionHybi = ProtocolVersionHybi13 + SupportedProtocolVersion = "13" + + ContinuationFrame = 0 + TextFrame = 1 + BinaryFrame = 2 + CloseFrame = 8 + PingFrame = 9 + PongFrame = 10 + UnknownFrame = 255 + + DefaultMaxPayloadBytes = 32 << 20 // 32MB +) + +// ProtocolError represents WebSocket protocol errors. +type ProtocolError struct { + ErrorString string +} + +func (err *ProtocolError) Error() string { return err.ErrorString } + +var ( + ErrBadProtocolVersion = &ProtocolError{"bad protocol version"} + ErrBadScheme = &ProtocolError{"bad scheme"} + ErrBadStatus = &ProtocolError{"bad status"} + ErrBadUpgrade = &ProtocolError{"missing or bad upgrade"} + ErrBadWebSocketOrigin = &ProtocolError{"missing or bad WebSocket-Origin"} + ErrBadWebSocketLocation = &ProtocolError{"missing or bad WebSocket-Location"} + ErrBadWebSocketProtocol = &ProtocolError{"missing or bad WebSocket-Protocol"} + ErrBadWebSocketVersion = &ProtocolError{"missing or bad WebSocket Version"} + ErrChallengeResponse = &ProtocolError{"mismatch challenge/response"} + ErrBadFrame = &ProtocolError{"bad frame"} + ErrBadFrameBoundary = &ProtocolError{"not on frame boundary"} + ErrNotWebSocket = &ProtocolError{"not websocket protocol"} + ErrBadRequestMethod = &ProtocolError{"bad method"} + ErrNotSupported = &ProtocolError{"not supported"} +) + +// ErrFrameTooLarge is returned by Codec's Receive method if payload size +// exceeds limit set by Conn.MaxPayloadBytes +var ErrFrameTooLarge = errors.New("websocket: frame payload size exceeds limit") + +// Addr is an implementation of net.Addr for WebSocket. +type Addr struct { + *url.URL +} + +// Network returns the network type for a WebSocket, "websocket". +func (addr *Addr) Network() string { return "websocket" } + +// Config is a WebSocket configuration +type Config struct { + // A WebSocket server address. + Location *url.URL + + // A Websocket client origin. + Origin *url.URL + + // WebSocket subprotocols. + Protocol []string + + // WebSocket protocol version. + Version int + + // TLS config for secure WebSocket (wss). + TlsConfig *tls.Config + + // Additional header fields to be sent in WebSocket opening handshake. + Header http.Header + + // Dialer used when opening websocket connections. + Dialer *net.Dialer + + handshakeData map[string]string +} + +// serverHandshaker is an interface to handle WebSocket server side handshake. +type serverHandshaker interface { + // ReadHandshake reads handshake request message from client. + // Returns http response code and error if any. + ReadHandshake(buf *bufio.Reader, req *http.Request) (code int, err error) + + // AcceptHandshake accepts the client handshake request and sends + // handshake response back to client. + AcceptHandshake(buf *bufio.Writer) (err error) + + // NewServerConn creates a new WebSocket connection. + NewServerConn(buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) (conn *Conn) +} + +// frameReader is an interface to read a WebSocket frame. +type frameReader interface { + // Reader is to read payload of the frame. + io.Reader + + // PayloadType returns payload type. + PayloadType() byte + + // HeaderReader returns a reader to read header of the frame. + HeaderReader() io.Reader + + // TrailerReader returns a reader to read trailer of the frame. + // If it returns nil, there is no trailer in the frame. + TrailerReader() io.Reader + + // Len returns total length of the frame, including header and trailer. + Len() int +} + +// frameReaderFactory is an interface to creates new frame reader. +type frameReaderFactory interface { + NewFrameReader() (r frameReader, err error) +} + +// frameWriter is an interface to write a WebSocket frame. +type frameWriter interface { + // Writer is to write payload of the frame. + io.WriteCloser +} + +// frameWriterFactory is an interface to create new frame writer. +type frameWriterFactory interface { + NewFrameWriter(payloadType byte) (w frameWriter, err error) +} + +type frameHandler interface { + HandleFrame(frame frameReader) (r frameReader, err error) + WriteClose(status int) (err error) +} + +// Conn represents a WebSocket connection. +// +// Multiple goroutines may invoke methods on a Conn simultaneously. +type Conn struct { + config *Config + request *http.Request + + buf *bufio.ReadWriter + rwc io.ReadWriteCloser + + rio sync.Mutex + frameReaderFactory + frameReader + + wio sync.Mutex + frameWriterFactory + + frameHandler + PayloadType byte + defaultCloseStatus int + + // MaxPayloadBytes limits the size of frame payload received over Conn + // by Codec's Receive method. If zero, DefaultMaxPayloadBytes is used. + MaxPayloadBytes int +} + +// Read implements the io.Reader interface: +// it reads data of a frame from the WebSocket connection. +// if msg is not large enough for the frame data, it fills the msg and next Read +// will read the rest of the frame data. +// it reads Text frame or Binary frame. +func (ws *Conn) Read(msg []byte) (n int, err error) { + ws.rio.Lock() + defer ws.rio.Unlock() +again: + if ws.frameReader == nil { + frame, err := ws.frameReaderFactory.NewFrameReader() + if err != nil { + return 0, err + } + ws.frameReader, err = ws.frameHandler.HandleFrame(frame) + if err != nil { + return 0, err + } + if ws.frameReader == nil { + goto again + } + } + n, err = ws.frameReader.Read(msg) + if err == io.EOF { + if trailer := ws.frameReader.TrailerReader(); trailer != nil { + io.Copy(io.Discard, trailer) + } + ws.frameReader = nil + goto again + } + return n, err +} + +// Write implements the io.Writer interface: +// it writes data as a frame to the WebSocket connection. +func (ws *Conn) Write(msg []byte) (n int, err error) { + ws.wio.Lock() + defer ws.wio.Unlock() + w, err := ws.frameWriterFactory.NewFrameWriter(ws.PayloadType) + if err != nil { + return 0, err + } + n, err = w.Write(msg) + w.Close() + return n, err +} + +// Close implements the io.Closer interface. +func (ws *Conn) Close() error { + err := ws.frameHandler.WriteClose(ws.defaultCloseStatus) + err1 := ws.rwc.Close() + if err != nil { + return err + } + return err1 +} + +// IsClientConn reports whether ws is a client-side connection. +func (ws *Conn) IsClientConn() bool { return ws.request == nil } + +// IsServerConn reports whether ws is a server-side connection. +func (ws *Conn) IsServerConn() bool { return ws.request != nil } + +// LocalAddr returns the WebSocket Origin for the connection for client, or +// the WebSocket location for server. +func (ws *Conn) LocalAddr() net.Addr { + if ws.IsClientConn() { + return &Addr{ws.config.Origin} + } + return &Addr{ws.config.Location} +} + +// RemoteAddr returns the WebSocket location for the connection for client, or +// the Websocket Origin for server. +func (ws *Conn) RemoteAddr() net.Addr { + if ws.IsClientConn() { + return &Addr{ws.config.Location} + } + return &Addr{ws.config.Origin} +} + +var errSetDeadline = errors.New("websocket: cannot set deadline: not using a net.Conn") + +// SetDeadline sets the connection's network read & write deadlines. +func (ws *Conn) SetDeadline(t time.Time) error { + if conn, ok := ws.rwc.(net.Conn); ok { + return conn.SetDeadline(t) + } + return errSetDeadline +} + +// SetReadDeadline sets the connection's network read deadline. +func (ws *Conn) SetReadDeadline(t time.Time) error { + if conn, ok := ws.rwc.(net.Conn); ok { + return conn.SetReadDeadline(t) + } + return errSetDeadline +} + +// SetWriteDeadline sets the connection's network write deadline. +func (ws *Conn) SetWriteDeadline(t time.Time) error { + if conn, ok := ws.rwc.(net.Conn); ok { + return conn.SetWriteDeadline(t) + } + return errSetDeadline +} + +// Config returns the WebSocket config. +func (ws *Conn) Config() *Config { return ws.config } + +// Request returns the http request upgraded to the WebSocket. +// It is nil for client side. +func (ws *Conn) Request() *http.Request { return ws.request } + +// Codec represents a symmetric pair of functions that implement a codec. +type Codec struct { + Marshal func(v interface{}) (data []byte, payloadType byte, err error) + Unmarshal func(data []byte, payloadType byte, v interface{}) (err error) +} + +// Send sends v marshaled by cd.Marshal as single frame to ws. +func (cd Codec) Send(ws *Conn, v interface{}) (err error) { + data, payloadType, err := cd.Marshal(v) + if err != nil { + return err + } + ws.wio.Lock() + defer ws.wio.Unlock() + w, err := ws.frameWriterFactory.NewFrameWriter(payloadType) + if err != nil { + return err + } + _, err = w.Write(data) + w.Close() + return err +} + +// Receive receives single frame from ws, unmarshaled by cd.Unmarshal and stores +// in v. The whole frame payload is read to an in-memory buffer; max size of +// payload is defined by ws.MaxPayloadBytes. If frame payload size exceeds +// limit, ErrFrameTooLarge is returned; in this case frame is not read off wire +// completely. The next call to Receive would read and discard leftover data of +// previous oversized frame before processing next frame. +func (cd Codec) Receive(ws *Conn, v interface{}) (err error) { + ws.rio.Lock() + defer ws.rio.Unlock() + if ws.frameReader != nil { + _, err = io.Copy(io.Discard, ws.frameReader) + if err != nil { + return err + } + ws.frameReader = nil + } +again: + frame, err := ws.frameReaderFactory.NewFrameReader() + if err != nil { + return err + } + frame, err = ws.frameHandler.HandleFrame(frame) + if err != nil { + return err + } + if frame == nil { + goto again + } + maxPayloadBytes := ws.MaxPayloadBytes + if maxPayloadBytes == 0 { + maxPayloadBytes = DefaultMaxPayloadBytes + } + if hf, ok := frame.(*hybiFrameReader); ok && hf.header.Length > int64(maxPayloadBytes) { + // payload size exceeds limit, no need to call Unmarshal + // + // set frameReader to current oversized frame so that + // the next call to this function can drain leftover + // data before processing the next frame + ws.frameReader = frame + return ErrFrameTooLarge + } + payloadType := frame.PayloadType() + data, err := io.ReadAll(frame) + if err != nil { + return err + } + return cd.Unmarshal(data, payloadType, v) +} + +func marshal(v interface{}) (msg []byte, payloadType byte, err error) { + switch data := v.(type) { + case string: + return []byte(data), TextFrame, nil + case []byte: + return data, BinaryFrame, nil + } + return nil, UnknownFrame, ErrNotSupported +} + +func unmarshal(msg []byte, payloadType byte, v interface{}) (err error) { + switch data := v.(type) { + case *string: + *data = string(msg) + return nil + case *[]byte: + *data = msg + return nil + } + return ErrNotSupported +} + +/* +Message is a codec to send/receive text/binary data in a frame on WebSocket connection. +To send/receive text frame, use string type. +To send/receive binary frame, use []byte type. + +Trivial usage: + + import "websocket" + + // receive text frame + var message string + websocket.Message.Receive(ws, &message) + + // send text frame + message = "hello" + websocket.Message.Send(ws, message) + + // receive binary frame + var data []byte + websocket.Message.Receive(ws, &data) + + // send binary frame + data = []byte{0, 1, 2} + websocket.Message.Send(ws, data) +*/ +var Message = Codec{marshal, unmarshal} + +func jsonMarshal(v interface{}) (msg []byte, payloadType byte, err error) { + msg, err = json.Marshal(v) + return msg, TextFrame, err +} + +func jsonUnmarshal(msg []byte, payloadType byte, v interface{}) (err error) { + return json.Unmarshal(msg, v) +} + +/* +JSON is a codec to send/receive JSON data in a frame from a WebSocket connection. + +Trivial usage: + + import "websocket" + + type T struct { + Msg string + Count int + } + + // receive JSON type T + var data T + websocket.JSON.Receive(ws, &data) + + // send JSON type T + websocket.JSON.Send(ws, data) +*/ +var JSON = Codec{jsonMarshal, jsonUnmarshal} diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go deleted file mode 100644 index 8b462f3dfee..00000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/annotations.proto - -package annotations - -import ( - reflect "reflect" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var file_google_api_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*HttpRule)(nil), - Field: 72295728, - Name: "google.api.http", - Tag: "bytes,72295728,opt,name=http", - Filename: "google/api/annotations.proto", - }, -} - -// Extension fields to descriptorpb.MethodOptions. -var ( - // See `HttpRule`. - // - // optional google.api.HttpRule http = 72295728; - E_Http = &file_google_api_annotations_proto_extTypes[0] -) - -var File_google_api_annotations_proto protoreflect.FileDescriptor - -var file_google_api_annotations_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x3a, 0x4b, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb0, 0xca, 0xbc, 0x22, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, - 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x42, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, - 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_google_api_annotations_proto_goTypes = []interface{}{ - (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions - (*HttpRule)(nil), // 1: google.api.HttpRule -} -var file_google_api_annotations_proto_depIdxs = []int32{ - 0, // 0: google.api.http:extendee -> google.protobuf.MethodOptions - 1, // 1: google.api.http:type_name -> google.api.HttpRule - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 1, // [1:2] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_api_annotations_proto_init() } -func file_google_api_annotations_proto_init() { - if File_google_api_annotations_proto != nil { - return - } - file_google_api_http_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_annotations_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_google_api_annotations_proto_goTypes, - DependencyIndexes: file_google_api_annotations_proto_depIdxs, - ExtensionInfos: file_google_api_annotations_proto_extTypes, - }.Build() - File_google_api_annotations_proto = out.File - file_google_api_annotations_proto_rawDesc = nil - file_google_api_annotations_proto_goTypes = nil - file_google_api_annotations_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go deleted file mode 100644 index 636edb460a4..00000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go +++ /dev/null @@ -1,1848 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/client.proto - -package annotations - -import ( - reflect "reflect" - sync "sync" - - api "google.golang.org/genproto/googleapis/api" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - durationpb "google.golang.org/protobuf/types/known/durationpb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The organization for which the client libraries are being published. -// Affects the url where generated docs are published, etc. -type ClientLibraryOrganization int32 - -const ( - // Not useful. - ClientLibraryOrganization_CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED ClientLibraryOrganization = 0 - // Google Cloud Platform Org. - ClientLibraryOrganization_CLOUD ClientLibraryOrganization = 1 - // Ads (Advertising) Org. - ClientLibraryOrganization_ADS ClientLibraryOrganization = 2 - // Photos Org. - ClientLibraryOrganization_PHOTOS ClientLibraryOrganization = 3 - // Street View Org. - ClientLibraryOrganization_STREET_VIEW ClientLibraryOrganization = 4 - // Shopping Org. - ClientLibraryOrganization_SHOPPING ClientLibraryOrganization = 5 - // Geo Org. - ClientLibraryOrganization_GEO ClientLibraryOrganization = 6 - // Generative AI - https://developers.generativeai.google - ClientLibraryOrganization_GENERATIVE_AI ClientLibraryOrganization = 7 -) - -// Enum value maps for ClientLibraryOrganization. -var ( - ClientLibraryOrganization_name = map[int32]string{ - 0: "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", - 1: "CLOUD", - 2: "ADS", - 3: "PHOTOS", - 4: "STREET_VIEW", - 5: "SHOPPING", - 6: "GEO", - 7: "GENERATIVE_AI", - } - ClientLibraryOrganization_value = map[string]int32{ - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7, - } -) - -func (x ClientLibraryOrganization) Enum() *ClientLibraryOrganization { - p := new(ClientLibraryOrganization) - *p = x - return p -} - -func (x ClientLibraryOrganization) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ClientLibraryOrganization) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_client_proto_enumTypes[0].Descriptor() -} - -func (ClientLibraryOrganization) Type() protoreflect.EnumType { - return &file_google_api_client_proto_enumTypes[0] -} - -func (x ClientLibraryOrganization) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ClientLibraryOrganization.Descriptor instead. -func (ClientLibraryOrganization) EnumDescriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{0} -} - -// To where should client libraries be published? -type ClientLibraryDestination int32 - -const ( - // Client libraries will neither be generated nor published to package - // managers. - ClientLibraryDestination_CLIENT_LIBRARY_DESTINATION_UNSPECIFIED ClientLibraryDestination = 0 - // Generate the client library in a repo under github.com/googleapis, - // but don't publish it to package managers. - ClientLibraryDestination_GITHUB ClientLibraryDestination = 10 - // Publish the library to package managers like nuget.org and npmjs.com. - ClientLibraryDestination_PACKAGE_MANAGER ClientLibraryDestination = 20 -) - -// Enum value maps for ClientLibraryDestination. -var ( - ClientLibraryDestination_name = map[int32]string{ - 0: "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", - 10: "GITHUB", - 20: "PACKAGE_MANAGER", - } - ClientLibraryDestination_value = map[string]int32{ - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20, - } -) - -func (x ClientLibraryDestination) Enum() *ClientLibraryDestination { - p := new(ClientLibraryDestination) - *p = x - return p -} - -func (x ClientLibraryDestination) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ClientLibraryDestination) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_client_proto_enumTypes[1].Descriptor() -} - -func (ClientLibraryDestination) Type() protoreflect.EnumType { - return &file_google_api_client_proto_enumTypes[1] -} - -func (x ClientLibraryDestination) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ClientLibraryDestination.Descriptor instead. -func (ClientLibraryDestination) EnumDescriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{1} -} - -// Required information for every language. -type CommonLanguageSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Link to automatically generated reference documentation. Example: - // https://cloud.google.com/nodejs/docs/reference/asset/latest - // - // Deprecated: Do not use. - ReferenceDocsUri string `protobuf:"bytes,1,opt,name=reference_docs_uri,json=referenceDocsUri,proto3" json:"reference_docs_uri,omitempty"` - // The destination where API teams want this client library to be published. - Destinations []ClientLibraryDestination `protobuf:"varint,2,rep,packed,name=destinations,proto3,enum=google.api.ClientLibraryDestination" json:"destinations,omitempty"` -} - -func (x *CommonLanguageSettings) Reset() { - *x = CommonLanguageSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonLanguageSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonLanguageSettings) ProtoMessage() {} - -func (x *CommonLanguageSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommonLanguageSettings.ProtoReflect.Descriptor instead. -func (*CommonLanguageSettings) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{0} -} - -// Deprecated: Do not use. -func (x *CommonLanguageSettings) GetReferenceDocsUri() string { - if x != nil { - return x.ReferenceDocsUri - } - return "" -} - -func (x *CommonLanguageSettings) GetDestinations() []ClientLibraryDestination { - if x != nil { - return x.Destinations - } - return nil -} - -// Details about how and where to publish client libraries. -type ClientLibrarySettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Version of the API to apply these settings to. This is the full protobuf - // package for the API, ending in the version element. - // Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // Launch stage of this version of the API. - LaunchStage api.LaunchStage `protobuf:"varint,2,opt,name=launch_stage,json=launchStage,proto3,enum=google.api.LaunchStage" json:"launch_stage,omitempty"` - // When using transport=rest, the client request will encode enums as - // numbers rather than strings. - RestNumericEnums bool `protobuf:"varint,3,opt,name=rest_numeric_enums,json=restNumericEnums,proto3" json:"rest_numeric_enums,omitempty"` - // Settings for legacy Java features, supported in the Service YAML. - JavaSettings *JavaSettings `protobuf:"bytes,21,opt,name=java_settings,json=javaSettings,proto3" json:"java_settings,omitempty"` - // Settings for C++ client libraries. - CppSettings *CppSettings `protobuf:"bytes,22,opt,name=cpp_settings,json=cppSettings,proto3" json:"cpp_settings,omitempty"` - // Settings for PHP client libraries. - PhpSettings *PhpSettings `protobuf:"bytes,23,opt,name=php_settings,json=phpSettings,proto3" json:"php_settings,omitempty"` - // Settings for Python client libraries. - PythonSettings *PythonSettings `protobuf:"bytes,24,opt,name=python_settings,json=pythonSettings,proto3" json:"python_settings,omitempty"` - // Settings for Node client libraries. - NodeSettings *NodeSettings `protobuf:"bytes,25,opt,name=node_settings,json=nodeSettings,proto3" json:"node_settings,omitempty"` - // Settings for .NET client libraries. - DotnetSettings *DotnetSettings `protobuf:"bytes,26,opt,name=dotnet_settings,json=dotnetSettings,proto3" json:"dotnet_settings,omitempty"` - // Settings for Ruby client libraries. - RubySettings *RubySettings `protobuf:"bytes,27,opt,name=ruby_settings,json=rubySettings,proto3" json:"ruby_settings,omitempty"` - // Settings for Go client libraries. - GoSettings *GoSettings `protobuf:"bytes,28,opt,name=go_settings,json=goSettings,proto3" json:"go_settings,omitempty"` -} - -func (x *ClientLibrarySettings) Reset() { - *x = ClientLibrarySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClientLibrarySettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientLibrarySettings) ProtoMessage() {} - -func (x *ClientLibrarySettings) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientLibrarySettings.ProtoReflect.Descriptor instead. -func (*ClientLibrarySettings) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{1} -} - -func (x *ClientLibrarySettings) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *ClientLibrarySettings) GetLaunchStage() api.LaunchStage { - if x != nil { - return x.LaunchStage - } - return api.LaunchStage_LAUNCH_STAGE_UNSPECIFIED -} - -func (x *ClientLibrarySettings) GetRestNumericEnums() bool { - if x != nil { - return x.RestNumericEnums - } - return false -} - -func (x *ClientLibrarySettings) GetJavaSettings() *JavaSettings { - if x != nil { - return x.JavaSettings - } - return nil -} - -func (x *ClientLibrarySettings) GetCppSettings() *CppSettings { - if x != nil { - return x.CppSettings - } - return nil -} - -func (x *ClientLibrarySettings) GetPhpSettings() *PhpSettings { - if x != nil { - return x.PhpSettings - } - return nil -} - -func (x *ClientLibrarySettings) GetPythonSettings() *PythonSettings { - if x != nil { - return x.PythonSettings - } - return nil -} - -func (x *ClientLibrarySettings) GetNodeSettings() *NodeSettings { - if x != nil { - return x.NodeSettings - } - return nil -} - -func (x *ClientLibrarySettings) GetDotnetSettings() *DotnetSettings { - if x != nil { - return x.DotnetSettings - } - return nil -} - -func (x *ClientLibrarySettings) GetRubySettings() *RubySettings { - if x != nil { - return x.RubySettings - } - return nil -} - -func (x *ClientLibrarySettings) GetGoSettings() *GoSettings { - if x != nil { - return x.GoSettings - } - return nil -} - -// This message configures the settings for publishing [Google Cloud Client -// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) -// generated from the service config. -type Publishing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A list of API method settings, e.g. the behavior for methods that use the - // long-running operation pattern. - MethodSettings []*MethodSettings `protobuf:"bytes,2,rep,name=method_settings,json=methodSettings,proto3" json:"method_settings,omitempty"` - // Link to a *public* URI where users can report issues. Example: - // https://issuetracker.google.com/issues/new?component=190865&template=1161103 - NewIssueUri string `protobuf:"bytes,101,opt,name=new_issue_uri,json=newIssueUri,proto3" json:"new_issue_uri,omitempty"` - // Link to product home page. Example: - // https://cloud.google.com/asset-inventory/docs/overview - DocumentationUri string `protobuf:"bytes,102,opt,name=documentation_uri,json=documentationUri,proto3" json:"documentation_uri,omitempty"` - // Used as a tracking tag when collecting data about the APIs developer - // relations artifacts like docs, packages delivered to package managers, - // etc. Example: "speech". - ApiShortName string `protobuf:"bytes,103,opt,name=api_short_name,json=apiShortName,proto3" json:"api_short_name,omitempty"` - // GitHub label to apply to issues and pull requests opened for this API. - GithubLabel string `protobuf:"bytes,104,opt,name=github_label,json=githubLabel,proto3" json:"github_label,omitempty"` - // GitHub teams to be added to CODEOWNERS in the directory in GitHub - // containing source code for the client libraries for this API. - CodeownerGithubTeams []string `protobuf:"bytes,105,rep,name=codeowner_github_teams,json=codeownerGithubTeams,proto3" json:"codeowner_github_teams,omitempty"` - // A prefix used in sample code when demarking regions to be included in - // documentation. - DocTagPrefix string `protobuf:"bytes,106,opt,name=doc_tag_prefix,json=docTagPrefix,proto3" json:"doc_tag_prefix,omitempty"` - // For whom the client library is being published. - Organization ClientLibraryOrganization `protobuf:"varint,107,opt,name=organization,proto3,enum=google.api.ClientLibraryOrganization" json:"organization,omitempty"` - // Client library settings. If the same version string appears multiple - // times in this list, then the last one wins. Settings from earlier - // settings with the same version string are discarded. - LibrarySettings []*ClientLibrarySettings `protobuf:"bytes,109,rep,name=library_settings,json=librarySettings,proto3" json:"library_settings,omitempty"` - // Optional link to proto reference documentation. Example: - // https://cloud.google.com/pubsub/lite/docs/reference/rpc - ProtoReferenceDocumentationUri string `protobuf:"bytes,110,opt,name=proto_reference_documentation_uri,json=protoReferenceDocumentationUri,proto3" json:"proto_reference_documentation_uri,omitempty"` - // Optional link to REST reference documentation. Example: - // https://cloud.google.com/pubsub/lite/docs/reference/rest - RestReferenceDocumentationUri string `protobuf:"bytes,111,opt,name=rest_reference_documentation_uri,json=restReferenceDocumentationUri,proto3" json:"rest_reference_documentation_uri,omitempty"` -} - -func (x *Publishing) Reset() { - *x = Publishing{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Publishing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Publishing) ProtoMessage() {} - -func (x *Publishing) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Publishing.ProtoReflect.Descriptor instead. -func (*Publishing) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{2} -} - -func (x *Publishing) GetMethodSettings() []*MethodSettings { - if x != nil { - return x.MethodSettings - } - return nil -} - -func (x *Publishing) GetNewIssueUri() string { - if x != nil { - return x.NewIssueUri - } - return "" -} - -func (x *Publishing) GetDocumentationUri() string { - if x != nil { - return x.DocumentationUri - } - return "" -} - -func (x *Publishing) GetApiShortName() string { - if x != nil { - return x.ApiShortName - } - return "" -} - -func (x *Publishing) GetGithubLabel() string { - if x != nil { - return x.GithubLabel - } - return "" -} - -func (x *Publishing) GetCodeownerGithubTeams() []string { - if x != nil { - return x.CodeownerGithubTeams - } - return nil -} - -func (x *Publishing) GetDocTagPrefix() string { - if x != nil { - return x.DocTagPrefix - } - return "" -} - -func (x *Publishing) GetOrganization() ClientLibraryOrganization { - if x != nil { - return x.Organization - } - return ClientLibraryOrganization_CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED -} - -func (x *Publishing) GetLibrarySettings() []*ClientLibrarySettings { - if x != nil { - return x.LibrarySettings - } - return nil -} - -func (x *Publishing) GetProtoReferenceDocumentationUri() string { - if x != nil { - return x.ProtoReferenceDocumentationUri - } - return "" -} - -func (x *Publishing) GetRestReferenceDocumentationUri() string { - if x != nil { - return x.RestReferenceDocumentationUri - } - return "" -} - -// Settings for Java client libraries. -type JavaSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The package name to use in Java. Clobbers the java_package option - // set in the protobuf. This should be used **only** by APIs - // who have already set the language_settings.java.package_name" field - // in gapic.yaml. API teams should use the protobuf java_package option - // where possible. - // - // Example of a YAML configuration:: - // - // publishing: - // java_settings: - // library_package: com.google.cloud.pubsub.v1 - LibraryPackage string `protobuf:"bytes,1,opt,name=library_package,json=libraryPackage,proto3" json:"library_package,omitempty"` - // Configure the Java class name to use instead of the service's for its - // corresponding generated GAPIC client. Keys are fully-qualified - // service names as they appear in the protobuf (including the full - // the language_settings.java.interface_names" field in gapic.yaml. API - // teams should otherwise use the service name as it appears in the - // protobuf. - // - // Example of a YAML configuration:: - // - // publishing: - // java_settings: - // service_class_names: - // - google.pubsub.v1.Publisher: TopicAdmin - // - google.pubsub.v1.Subscriber: SubscriptionAdmin - ServiceClassNames map[string]string `protobuf:"bytes,2,rep,name=service_class_names,json=serviceClassNames,proto3" json:"service_class_names,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Some settings. - Common *CommonLanguageSettings `protobuf:"bytes,3,opt,name=common,proto3" json:"common,omitempty"` -} - -func (x *JavaSettings) Reset() { - *x = JavaSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JavaSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JavaSettings) ProtoMessage() {} - -func (x *JavaSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JavaSettings.ProtoReflect.Descriptor instead. -func (*JavaSettings) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{3} -} - -func (x *JavaSettings) GetLibraryPackage() string { - if x != nil { - return x.LibraryPackage - } - return "" -} - -func (x *JavaSettings) GetServiceClassNames() map[string]string { - if x != nil { - return x.ServiceClassNames - } - return nil -} - -func (x *JavaSettings) GetCommon() *CommonLanguageSettings { - if x != nil { - return x.Common - } - return nil -} - -// Settings for C++ client libraries. -type CppSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Some settings. - Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` -} - -func (x *CppSettings) Reset() { - *x = CppSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CppSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CppSettings) ProtoMessage() {} - -func (x *CppSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CppSettings.ProtoReflect.Descriptor instead. -func (*CppSettings) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{4} -} - -func (x *CppSettings) GetCommon() *CommonLanguageSettings { - if x != nil { - return x.Common - } - return nil -} - -// Settings for Php client libraries. -type PhpSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Some settings. - Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` -} - -func (x *PhpSettings) Reset() { - *x = PhpSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PhpSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PhpSettings) ProtoMessage() {} - -func (x *PhpSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PhpSettings.ProtoReflect.Descriptor instead. -func (*PhpSettings) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{5} -} - -func (x *PhpSettings) GetCommon() *CommonLanguageSettings { - if x != nil { - return x.Common - } - return nil -} - -// Settings for Python client libraries. -type PythonSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Some settings. - Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` -} - -func (x *PythonSettings) Reset() { - *x = PythonSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PythonSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PythonSettings) ProtoMessage() {} - -func (x *PythonSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PythonSettings.ProtoReflect.Descriptor instead. -func (*PythonSettings) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{6} -} - -func (x *PythonSettings) GetCommon() *CommonLanguageSettings { - if x != nil { - return x.Common - } - return nil -} - -// Settings for Node client libraries. -type NodeSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Some settings. - Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` -} - -func (x *NodeSettings) Reset() { - *x = NodeSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeSettings) ProtoMessage() {} - -func (x *NodeSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeSettings.ProtoReflect.Descriptor instead. -func (*NodeSettings) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{7} -} - -func (x *NodeSettings) GetCommon() *CommonLanguageSettings { - if x != nil { - return x.Common - } - return nil -} - -// Settings for Dotnet client libraries. -type DotnetSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Some settings. - Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` - // Map from original service names to renamed versions. - // This is used when the default generated types - // would cause a naming conflict. (Neither name is - // fully-qualified.) - // Example: Subscriber to SubscriberServiceApi. - RenamedServices map[string]string `protobuf:"bytes,2,rep,name=renamed_services,json=renamedServices,proto3" json:"renamed_services,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Map from full resource types to the effective short name - // for the resource. This is used when otherwise resource - // named from different services would cause naming collisions. - // Example entry: - // "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - RenamedResources map[string]string `protobuf:"bytes,3,rep,name=renamed_resources,json=renamedResources,proto3" json:"renamed_resources,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // List of full resource types to ignore during generation. - // This is typically used for API-specific Location resources, - // which should be handled by the generator as if they were actually - // the common Location resources. - // Example entry: "documentai.googleapis.com/Location" - IgnoredResources []string `protobuf:"bytes,4,rep,name=ignored_resources,json=ignoredResources,proto3" json:"ignored_resources,omitempty"` - // Namespaces which must be aliased in snippets due to - // a known (but non-generator-predictable) naming collision - ForcedNamespaceAliases []string `protobuf:"bytes,5,rep,name=forced_namespace_aliases,json=forcedNamespaceAliases,proto3" json:"forced_namespace_aliases,omitempty"` - // Method signatures (in the form "service.method(signature)") - // which are provided separately, so shouldn't be generated. - // Snippets *calling* these methods are still generated, however. - HandwrittenSignatures []string `protobuf:"bytes,6,rep,name=handwritten_signatures,json=handwrittenSignatures,proto3" json:"handwritten_signatures,omitempty"` -} - -func (x *DotnetSettings) Reset() { - *x = DotnetSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DotnetSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DotnetSettings) ProtoMessage() {} - -func (x *DotnetSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DotnetSettings.ProtoReflect.Descriptor instead. -func (*DotnetSettings) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{8} -} - -func (x *DotnetSettings) GetCommon() *CommonLanguageSettings { - if x != nil { - return x.Common - } - return nil -} - -func (x *DotnetSettings) GetRenamedServices() map[string]string { - if x != nil { - return x.RenamedServices - } - return nil -} - -func (x *DotnetSettings) GetRenamedResources() map[string]string { - if x != nil { - return x.RenamedResources - } - return nil -} - -func (x *DotnetSettings) GetIgnoredResources() []string { - if x != nil { - return x.IgnoredResources - } - return nil -} - -func (x *DotnetSettings) GetForcedNamespaceAliases() []string { - if x != nil { - return x.ForcedNamespaceAliases - } - return nil -} - -func (x *DotnetSettings) GetHandwrittenSignatures() []string { - if x != nil { - return x.HandwrittenSignatures - } - return nil -} - -// Settings for Ruby client libraries. -type RubySettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Some settings. - Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` -} - -func (x *RubySettings) Reset() { - *x = RubySettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RubySettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RubySettings) ProtoMessage() {} - -func (x *RubySettings) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RubySettings.ProtoReflect.Descriptor instead. -func (*RubySettings) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{9} -} - -func (x *RubySettings) GetCommon() *CommonLanguageSettings { - if x != nil { - return x.Common - } - return nil -} - -// Settings for Go client libraries. -type GoSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Some settings. - Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` -} - -func (x *GoSettings) Reset() { - *x = GoSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GoSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GoSettings) ProtoMessage() {} - -func (x *GoSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GoSettings.ProtoReflect.Descriptor instead. -func (*GoSettings) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{10} -} - -func (x *GoSettings) GetCommon() *CommonLanguageSettings { - if x != nil { - return x.Common - } - return nil -} - -// Describes the generator configuration for a method. -type MethodSettings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The fully qualified name of the method, for which the options below apply. - // This is used to find the method to apply the options. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // Describes settings to use for long-running operations when generating - // API methods for RPCs. Complements RPCs that use the annotations in - // google/longrunning/operations.proto. - // - // Example of a YAML configuration:: - // - // publishing: - // method_settings: - // - selector: google.cloud.speech.v2.Speech.BatchRecognize - // long_running: - // initial_poll_delay: - // seconds: 60 # 1 minute - // poll_delay_multiplier: 1.5 - // max_poll_delay: - // seconds: 360 # 6 minutes - // total_poll_timeout: - // seconds: 54000 # 90 minutes - LongRunning *MethodSettings_LongRunning `protobuf:"bytes,2,opt,name=long_running,json=longRunning,proto3" json:"long_running,omitempty"` - // List of top-level fields of the request message, that should be - // automatically populated by the client libraries based on their - // (google.api.field_info).format. Currently supported format: UUID4. - // - // Example of a YAML configuration: - // - // publishing: - // method_settings: - // - selector: google.example.v1.ExampleService.CreateExample - // auto_populated_fields: - // - request_id - AutoPopulatedFields []string `protobuf:"bytes,3,rep,name=auto_populated_fields,json=autoPopulatedFields,proto3" json:"auto_populated_fields,omitempty"` -} - -func (x *MethodSettings) Reset() { - *x = MethodSettings{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MethodSettings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MethodSettings) ProtoMessage() {} - -func (x *MethodSettings) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MethodSettings.ProtoReflect.Descriptor instead. -func (*MethodSettings) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{11} -} - -func (x *MethodSettings) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (x *MethodSettings) GetLongRunning() *MethodSettings_LongRunning { - if x != nil { - return x.LongRunning - } - return nil -} - -func (x *MethodSettings) GetAutoPopulatedFields() []string { - if x != nil { - return x.AutoPopulatedFields - } - return nil -} - -// Describes settings to use when generating API methods that use the -// long-running operation pattern. -// All default values below are from those used in the client library -// generators (e.g. -// [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). -type MethodSettings_LongRunning struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Initial delay after which the first poll request will be made. - // Default value: 5 seconds. - InitialPollDelay *durationpb.Duration `protobuf:"bytes,1,opt,name=initial_poll_delay,json=initialPollDelay,proto3" json:"initial_poll_delay,omitempty"` - // Multiplier to gradually increase delay between subsequent polls until it - // reaches max_poll_delay. - // Default value: 1.5. - PollDelayMultiplier float32 `protobuf:"fixed32,2,opt,name=poll_delay_multiplier,json=pollDelayMultiplier,proto3" json:"poll_delay_multiplier,omitempty"` - // Maximum time between two subsequent poll requests. - // Default value: 45 seconds. - MaxPollDelay *durationpb.Duration `protobuf:"bytes,3,opt,name=max_poll_delay,json=maxPollDelay,proto3" json:"max_poll_delay,omitempty"` - // Total polling timeout. - // Default value: 5 minutes. - TotalPollTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=total_poll_timeout,json=totalPollTimeout,proto3" json:"total_poll_timeout,omitempty"` -} - -func (x *MethodSettings_LongRunning) Reset() { - *x = MethodSettings_LongRunning{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_client_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MethodSettings_LongRunning) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MethodSettings_LongRunning) ProtoMessage() {} - -func (x *MethodSettings_LongRunning) ProtoReflect() protoreflect.Message { - mi := &file_google_api_client_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MethodSettings_LongRunning.ProtoReflect.Descriptor instead. -func (*MethodSettings_LongRunning) Descriptor() ([]byte, []int) { - return file_google_api_client_proto_rawDescGZIP(), []int{11, 0} -} - -func (x *MethodSettings_LongRunning) GetInitialPollDelay() *durationpb.Duration { - if x != nil { - return x.InitialPollDelay - } - return nil -} - -func (x *MethodSettings_LongRunning) GetPollDelayMultiplier() float32 { - if x != nil { - return x.PollDelayMultiplier - } - return 0 -} - -func (x *MethodSettings_LongRunning) GetMaxPollDelay() *durationpb.Duration { - if x != nil { - return x.MaxPollDelay - } - return nil -} - -func (x *MethodSettings_LongRunning) GetTotalPollTimeout() *durationpb.Duration { - if x != nil { - return x.TotalPollTimeout - } - return nil -} - -var file_google_api_client_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: ([]string)(nil), - Field: 1051, - Name: "google.api.method_signature", - Tag: "bytes,1051,rep,name=method_signature", - Filename: "google/api/client.proto", - }, - { - ExtendedType: (*descriptorpb.ServiceOptions)(nil), - ExtensionType: (*string)(nil), - Field: 1049, - Name: "google.api.default_host", - Tag: "bytes,1049,opt,name=default_host", - Filename: "google/api/client.proto", - }, - { - ExtendedType: (*descriptorpb.ServiceOptions)(nil), - ExtensionType: (*string)(nil), - Field: 1050, - Name: "google.api.oauth_scopes", - Tag: "bytes,1050,opt,name=oauth_scopes", - Filename: "google/api/client.proto", - }, - { - ExtendedType: (*descriptorpb.ServiceOptions)(nil), - ExtensionType: (*string)(nil), - Field: 525000001, - Name: "google.api.api_version", - Tag: "bytes,525000001,opt,name=api_version", - Filename: "google/api/client.proto", - }, -} - -// Extension fields to descriptorpb.MethodOptions. -var ( - // A definition of a client library method signature. - // - // In client libraries, each proto RPC corresponds to one or more methods - // which the end user is able to call, and calls the underlying RPC. - // Normally, this method receives a single argument (a struct or instance - // corresponding to the RPC request object). Defining this field will - // add one or more overloads providing flattened or simpler method signatures - // in some languages. - // - // The fields on the method signature are provided as a comma-separated - // string. - // - // For example, the proto RPC and annotation: - // - // rpc CreateSubscription(CreateSubscriptionRequest) - // returns (Subscription) { - // option (google.api.method_signature) = "name,topic"; - // } - // - // Would add the following Java overload (in addition to the method accepting - // the request object): - // - // public final Subscription createSubscription(String name, String topic) - // - // The following backwards-compatibility guidelines apply: - // - // - Adding this annotation to an unannotated method is backwards - // compatible. - // - Adding this annotation to a method which already has existing - // method signature annotations is backwards compatible if and only if - // the new method signature annotation is last in the sequence. - // - Modifying or removing an existing method signature annotation is - // a breaking change. - // - Re-ordering existing method signature annotations is a breaking - // change. - // - // repeated string method_signature = 1051; - E_MethodSignature = &file_google_api_client_proto_extTypes[0] -) - -// Extension fields to descriptorpb.ServiceOptions. -var ( - // The hostname for this service. - // This should be specified with no prefix or protocol. - // - // Example: - // - // service Foo { - // option (google.api.default_host) = "foo.googleapi.com"; - // ... - // } - // - // optional string default_host = 1049; - E_DefaultHost = &file_google_api_client_proto_extTypes[1] - // OAuth scopes needed for the client. - // - // Example: - // - // service Foo { - // option (google.api.oauth_scopes) = \ - // "https://www.googleapis.com/auth/cloud-platform"; - // ... - // } - // - // If there is more than one scope, use a comma-separated string: - // - // Example: - // - // service Foo { - // option (google.api.oauth_scopes) = \ - // "https://www.googleapis.com/auth/cloud-platform," - // "https://www.googleapis.com/auth/monitoring"; - // ... - // } - // - // optional string oauth_scopes = 1050; - E_OauthScopes = &file_google_api_client_proto_extTypes[2] - // The API version of this service, which should be sent by version-aware - // clients to the service. This allows services to abide by the schema and - // behavior of the service at the time this API version was deployed. - // The format of the API version must be treated as opaque by clients. - // Services may use a format with an apparent structure, but clients must - // not rely on this to determine components within an API version, or attempt - // to construct other valid API versions. Note that this is for upcoming - // functionality and may not be implemented for all services. - // - // Example: - // - // service Foo { - // option (google.api.api_version) = "v1_20230821_preview"; - // } - // - // optional string api_version = 525000001; - E_ApiVersion = &file_google_api_client_proto_extTypes[3] -) - -var File_google_api_client_proto protoreflect.FileDescriptor - -var file_google_api_client_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x1d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x12, 0x30, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x64, - 0x6f, 0x63, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, - 0x01, 0x52, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f, 0x63, 0x73, - 0x55, 0x72, 0x69, 0x12, 0x48, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, - 0x72, 0x61, 0x72, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x93, 0x05, - 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x3a, 0x0a, 0x0c, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, - 0x52, 0x0b, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, - 0x12, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x65, 0x6e, - 0x75, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x65, 0x73, 0x74, 0x4e, - 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x6a, - 0x61, 0x76, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x15, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x6a, 0x61, - 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x63, 0x70, - 0x70, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x70, - 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0b, 0x63, 0x70, 0x70, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x70, 0x68, 0x70, 0x5f, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x68, 0x70, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0b, 0x70, 0x68, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x64, 0x6f, 0x74, 0x6e, 0x65, 0x74, - 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x74, - 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x64, 0x6f, 0x74, - 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x72, - 0x75, 0x62, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1b, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x52, 0x75, 0x62, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x72, 0x75, - 0x62, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x67, 0x6f, - 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x6f, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0a, 0x67, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x22, 0xf4, 0x04, 0x0a, 0x0a, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x12, 0x43, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x69, - 0x73, 0x73, 0x75, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x65, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6e, 0x65, 0x77, 0x49, 0x73, 0x73, 0x75, 0x65, 0x55, 0x72, 0x69, 0x12, 0x2b, 0x0a, 0x11, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x69, - 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x70, 0x69, 0x5f, - 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x67, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x61, 0x70, 0x69, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x68, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x64, 0x65, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x69, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x14, 0x63, 0x6f, 0x64, 0x65, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x47, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x6f, 0x63, 0x5f, 0x74, - 0x61, 0x67, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x64, 0x6f, 0x63, 0x54, 0x61, 0x67, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x49, 0x0a, - 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x6b, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x10, 0x6c, 0x69, 0x62, 0x72, - 0x61, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x6d, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x49, 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x6e, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, - 0x69, 0x12, 0x47, 0x0a, 0x20, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x72, 0x65, 0x73, - 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x22, 0x9a, 0x02, 0x0a, 0x0c, 0x4a, - 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6c, - 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x50, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, - 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, - 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x1a, 0x44, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x49, 0x0a, 0x0b, 0x43, 0x70, 0x70, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, - 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x0b, 0x50, 0x68, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x4c, 0x0a, - 0x0e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x0c, 0x4e, - 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, - 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, - 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xae, 0x04, 0x0a, 0x0e, 0x44, 0x6f, 0x74, 0x6e, - 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, - 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, - 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x6e, - 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x12, 0x5d, 0x0a, 0x11, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x74, 0x6e, 0x65, - 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x10, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x69, 0x67, - 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x38, - 0x0a, 0x18, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x16, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x16, 0x68, 0x61, 0x6e, 0x64, - 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x68, 0x61, 0x6e, 0x64, 0x77, 0x72, - 0x69, 0x74, 0x74, 0x65, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x1a, - 0x42, 0x0a, 0x14, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4a, 0x0a, 0x0c, 0x52, 0x75, 0x62, 0x79, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, - 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x0a, 0x47, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xc2, - 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x49, 0x0a, - 0x0c, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x6c, 0x6f, 0x6e, - 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x75, 0x74, 0x6f, - 0x5f, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x50, 0x6f, 0x70, - 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x94, 0x02, 0x0a, - 0x0b, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x47, 0x0a, 0x12, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, - 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, - 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, - 0x6c, 0x61, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x70, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0e, 0x6d, 0x61, 0x78, - 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, 0x61, - 0x78, 0x50, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x47, 0x0a, 0x12, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x2a, 0xa3, 0x01, 0x0a, 0x19, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, - 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, - 0x41, 0x52, 0x59, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x53, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x48, 0x4f, 0x54, 0x4f, 0x53, 0x10, 0x03, 0x12, 0x0f, - 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x45, 0x45, 0x54, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x10, 0x04, 0x12, - 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x07, 0x0a, - 0x03, 0x47, 0x45, 0x4f, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, - 0x54, 0x49, 0x56, 0x45, 0x5f, 0x41, 0x49, 0x10, 0x07, 0x2a, 0x67, 0x0a, 0x18, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x26, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, - 0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x49, 0x4e, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, 0x10, 0x0a, 0x12, 0x13, 0x0a, - 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x41, 0x47, 0x45, 0x52, - 0x10, 0x14, 0x3a, 0x4a, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x43, - 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1f, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, - 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x61, 0x75, - 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x3a, 0x44, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc1, 0xba, 0xab, 0xfa, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x69, - 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x42, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, - 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_google_api_client_proto_rawDescOnce sync.Once - file_google_api_client_proto_rawDescData = file_google_api_client_proto_rawDesc -) - -func file_google_api_client_proto_rawDescGZIP() []byte { - file_google_api_client_proto_rawDescOnce.Do(func() { - file_google_api_client_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_client_proto_rawDescData) - }) - return file_google_api_client_proto_rawDescData -} - -var file_google_api_client_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_google_api_client_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_google_api_client_proto_goTypes = []interface{}{ - (ClientLibraryOrganization)(0), // 0: google.api.ClientLibraryOrganization - (ClientLibraryDestination)(0), // 1: google.api.ClientLibraryDestination - (*CommonLanguageSettings)(nil), // 2: google.api.CommonLanguageSettings - (*ClientLibrarySettings)(nil), // 3: google.api.ClientLibrarySettings - (*Publishing)(nil), // 4: google.api.Publishing - (*JavaSettings)(nil), // 5: google.api.JavaSettings - (*CppSettings)(nil), // 6: google.api.CppSettings - (*PhpSettings)(nil), // 7: google.api.PhpSettings - (*PythonSettings)(nil), // 8: google.api.PythonSettings - (*NodeSettings)(nil), // 9: google.api.NodeSettings - (*DotnetSettings)(nil), // 10: google.api.DotnetSettings - (*RubySettings)(nil), // 11: google.api.RubySettings - (*GoSettings)(nil), // 12: google.api.GoSettings - (*MethodSettings)(nil), // 13: google.api.MethodSettings - nil, // 14: google.api.JavaSettings.ServiceClassNamesEntry - nil, // 15: google.api.DotnetSettings.RenamedServicesEntry - nil, // 16: google.api.DotnetSettings.RenamedResourcesEntry - (*MethodSettings_LongRunning)(nil), // 17: google.api.MethodSettings.LongRunning - (api.LaunchStage)(0), // 18: google.api.LaunchStage - (*durationpb.Duration)(nil), // 19: google.protobuf.Duration - (*descriptorpb.MethodOptions)(nil), // 20: google.protobuf.MethodOptions - (*descriptorpb.ServiceOptions)(nil), // 21: google.protobuf.ServiceOptions -} -var file_google_api_client_proto_depIdxs = []int32{ - 1, // 0: google.api.CommonLanguageSettings.destinations:type_name -> google.api.ClientLibraryDestination - 18, // 1: google.api.ClientLibrarySettings.launch_stage:type_name -> google.api.LaunchStage - 5, // 2: google.api.ClientLibrarySettings.java_settings:type_name -> google.api.JavaSettings - 6, // 3: google.api.ClientLibrarySettings.cpp_settings:type_name -> google.api.CppSettings - 7, // 4: google.api.ClientLibrarySettings.php_settings:type_name -> google.api.PhpSettings - 8, // 5: google.api.ClientLibrarySettings.python_settings:type_name -> google.api.PythonSettings - 9, // 6: google.api.ClientLibrarySettings.node_settings:type_name -> google.api.NodeSettings - 10, // 7: google.api.ClientLibrarySettings.dotnet_settings:type_name -> google.api.DotnetSettings - 11, // 8: google.api.ClientLibrarySettings.ruby_settings:type_name -> google.api.RubySettings - 12, // 9: google.api.ClientLibrarySettings.go_settings:type_name -> google.api.GoSettings - 13, // 10: google.api.Publishing.method_settings:type_name -> google.api.MethodSettings - 0, // 11: google.api.Publishing.organization:type_name -> google.api.ClientLibraryOrganization - 3, // 12: google.api.Publishing.library_settings:type_name -> google.api.ClientLibrarySettings - 14, // 13: google.api.JavaSettings.service_class_names:type_name -> google.api.JavaSettings.ServiceClassNamesEntry - 2, // 14: google.api.JavaSettings.common:type_name -> google.api.CommonLanguageSettings - 2, // 15: google.api.CppSettings.common:type_name -> google.api.CommonLanguageSettings - 2, // 16: google.api.PhpSettings.common:type_name -> google.api.CommonLanguageSettings - 2, // 17: google.api.PythonSettings.common:type_name -> google.api.CommonLanguageSettings - 2, // 18: google.api.NodeSettings.common:type_name -> google.api.CommonLanguageSettings - 2, // 19: google.api.DotnetSettings.common:type_name -> google.api.CommonLanguageSettings - 15, // 20: google.api.DotnetSettings.renamed_services:type_name -> google.api.DotnetSettings.RenamedServicesEntry - 16, // 21: google.api.DotnetSettings.renamed_resources:type_name -> google.api.DotnetSettings.RenamedResourcesEntry - 2, // 22: google.api.RubySettings.common:type_name -> google.api.CommonLanguageSettings - 2, // 23: google.api.GoSettings.common:type_name -> google.api.CommonLanguageSettings - 17, // 24: google.api.MethodSettings.long_running:type_name -> google.api.MethodSettings.LongRunning - 19, // 25: google.api.MethodSettings.LongRunning.initial_poll_delay:type_name -> google.protobuf.Duration - 19, // 26: google.api.MethodSettings.LongRunning.max_poll_delay:type_name -> google.protobuf.Duration - 19, // 27: google.api.MethodSettings.LongRunning.total_poll_timeout:type_name -> google.protobuf.Duration - 20, // 28: google.api.method_signature:extendee -> google.protobuf.MethodOptions - 21, // 29: google.api.default_host:extendee -> google.protobuf.ServiceOptions - 21, // 30: google.api.oauth_scopes:extendee -> google.protobuf.ServiceOptions - 21, // 31: google.api.api_version:extendee -> google.protobuf.ServiceOptions - 32, // [32:32] is the sub-list for method output_type - 32, // [32:32] is the sub-list for method input_type - 32, // [32:32] is the sub-list for extension type_name - 28, // [28:32] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name -} - -func init() { file_google_api_client_proto_init() } -func file_google_api_client_proto_init() { - if File_google_api_client_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonLanguageSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientLibrarySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Publishing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JavaSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CppSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PhpSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PythonSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DotnetSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RubySettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GoSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MethodSettings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_client_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MethodSettings_LongRunning); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_client_proto_rawDesc, - NumEnums: 2, - NumMessages: 16, - NumExtensions: 4, - NumServices: 0, - }, - GoTypes: file_google_api_client_proto_goTypes, - DependencyIndexes: file_google_api_client_proto_depIdxs, - EnumInfos: file_google_api_client_proto_enumTypes, - MessageInfos: file_google_api_client_proto_msgTypes, - ExtensionInfos: file_google_api_client_proto_extTypes, - }.Build() - File_google_api_client_proto = out.File - file_google_api_client_proto_rawDesc = nil - file_google_api_client_proto_goTypes = nil - file_google_api_client_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go deleted file mode 100644 index 08505ba3fec..00000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_behavior.pb.go +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/field_behavior.proto - -package annotations - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -type FieldBehavior int32 - -const ( - // Conventional default for enums. Do not use this. - FieldBehavior_FIELD_BEHAVIOR_UNSPECIFIED FieldBehavior = 0 - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - FieldBehavior_OPTIONAL FieldBehavior = 1 - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - FieldBehavior_REQUIRED FieldBehavior = 2 - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - FieldBehavior_OUTPUT_ONLY FieldBehavior = 3 - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - FieldBehavior_INPUT_ONLY FieldBehavior = 4 - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - FieldBehavior_IMMUTABLE FieldBehavior = 5 - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - FieldBehavior_UNORDERED_LIST FieldBehavior = 6 - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - FieldBehavior_NON_EMPTY_DEFAULT FieldBehavior = 7 - // Denotes that the field in a resource (a message annotated with - // google.api.resource) is used in the resource name to uniquely identify the - // resource. For AIP-compliant APIs, this should only be applied to the - // `name` field on the resource. - // - // This behavior should not be applied to references to other resources within - // the message. - // - // The identifier field of resources often have different field behavior - // depending on the request it is embedded in (e.g. for Create methods name - // is optional and unused, while for Update methods it is required). Instead - // of method-specific annotations, only `IDENTIFIER` is required. - FieldBehavior_IDENTIFIER FieldBehavior = 8 -) - -// Enum value maps for FieldBehavior. -var ( - FieldBehavior_name = map[int32]string{ - 0: "FIELD_BEHAVIOR_UNSPECIFIED", - 1: "OPTIONAL", - 2: "REQUIRED", - 3: "OUTPUT_ONLY", - 4: "INPUT_ONLY", - 5: "IMMUTABLE", - 6: "UNORDERED_LIST", - 7: "NON_EMPTY_DEFAULT", - 8: "IDENTIFIER", - } - FieldBehavior_value = map[string]int32{ - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8, - } -) - -func (x FieldBehavior) Enum() *FieldBehavior { - p := new(FieldBehavior) - *p = x - return p -} - -func (x FieldBehavior) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FieldBehavior) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_field_behavior_proto_enumTypes[0].Descriptor() -} - -func (FieldBehavior) Type() protoreflect.EnumType { - return &file_google_api_field_behavior_proto_enumTypes[0] -} - -func (x FieldBehavior) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use FieldBehavior.Descriptor instead. -func (FieldBehavior) EnumDescriptor() ([]byte, []int) { - return file_google_api_field_behavior_proto_rawDescGZIP(), []int{0} -} - -var file_google_api_field_behavior_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: ([]FieldBehavior)(nil), - Field: 1052, - Name: "google.api.field_behavior", - Tag: "varint,1052,rep,name=field_behavior,enum=google.api.FieldBehavior", - Filename: "google/api/field_behavior.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - // - // repeated google.api.FieldBehavior field_behavior = 1052; - E_FieldBehavior = &file_google_api_field_behavior_proto_extTypes[0] -) - -var File_google_api_field_behavior_proto protoreflect.FileDescriptor - -var file_google_api_field_behavior_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, - 0xb6, 0x01, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, - 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x42, 0x45, 0x48, 0x41, 0x56, - 0x49, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, - 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0f, 0x0a, - 0x0b, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x0e, - 0x0a, 0x0a, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x49, 0x4d, 0x4d, 0x55, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x12, 0x0a, - 0x0e, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, - 0x06, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x4f, 0x4e, 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x5f, 0x44, - 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4e, - 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x10, 0x08, 0x3a, 0x64, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9c, 0x08, 0x20, 0x03, 0x28, 0x0e, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x02, 0x10, 0x00, 0x52, - 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x70, - 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x42, 0x12, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, - 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_field_behavior_proto_rawDescOnce sync.Once - file_google_api_field_behavior_proto_rawDescData = file_google_api_field_behavior_proto_rawDesc -) - -func file_google_api_field_behavior_proto_rawDescGZIP() []byte { - file_google_api_field_behavior_proto_rawDescOnce.Do(func() { - file_google_api_field_behavior_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_field_behavior_proto_rawDescData) - }) - return file_google_api_field_behavior_proto_rawDescData -} - -var file_google_api_field_behavior_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_api_field_behavior_proto_goTypes = []interface{}{ - (FieldBehavior)(0), // 0: google.api.FieldBehavior - (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions -} -var file_google_api_field_behavior_proto_depIdxs = []int32{ - 1, // 0: google.api.field_behavior:extendee -> google.protobuf.FieldOptions - 0, // 1: google.api.field_behavior:type_name -> google.api.FieldBehavior - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 1, // [1:2] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_api_field_behavior_proto_init() } -func file_google_api_field_behavior_proto_init() { - if File_google_api_field_behavior_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_field_behavior_proto_rawDesc, - NumEnums: 1, - NumMessages: 0, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_google_api_field_behavior_proto_goTypes, - DependencyIndexes: file_google_api_field_behavior_proto_depIdxs, - EnumInfos: file_google_api_field_behavior_proto_enumTypes, - ExtensionInfos: file_google_api_field_behavior_proto_extTypes, - }.Build() - File_google_api_field_behavior_proto = out.File - file_google_api_field_behavior_proto_rawDesc = nil - file_google_api_field_behavior_proto_goTypes = nil - file_google_api_field_behavior_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go deleted file mode 100644 index d339dfb02ac..00000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/field_info.proto - -package annotations - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The standard format of a field value. The supported formats are all backed -// by either an RFC defined by the IETF or a Google-defined AIP. -type FieldInfo_Format int32 - -const ( - // Default, unspecified value. - FieldInfo_FORMAT_UNSPECIFIED FieldInfo_Format = 0 - // Universally Unique Identifier, version 4, value as defined by - // https://datatracker.ietf.org/doc/html/rfc4122. The value may be - // normalized to entirely lowercase letters. For example, the value - // `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - // `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - FieldInfo_UUID4 FieldInfo_Format = 1 - // Internet Protocol v4 value as defined by [RFC - // 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - // condensed, with leading zeros in each octet stripped. For example, - // `001.022.233.040` would be condensed to `1.22.233.40`. - FieldInfo_IPV4 FieldInfo_Format = 2 - // Internet Protocol v6 value as defined by [RFC - // 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - // normalized to entirely lowercase letters with zeros compressed, following - // [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - // the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - FieldInfo_IPV6 FieldInfo_Format = 3 - // An IP address in either v4 or v6 format as described by the individual - // values defined herein. See the comments on the IPV4 and IPV6 types for - // allowed normalizations of each. - FieldInfo_IPV4_OR_IPV6 FieldInfo_Format = 4 -) - -// Enum value maps for FieldInfo_Format. -var ( - FieldInfo_Format_name = map[int32]string{ - 0: "FORMAT_UNSPECIFIED", - 1: "UUID4", - 2: "IPV4", - 3: "IPV6", - 4: "IPV4_OR_IPV6", - } - FieldInfo_Format_value = map[string]int32{ - "FORMAT_UNSPECIFIED": 0, - "UUID4": 1, - "IPV4": 2, - "IPV6": 3, - "IPV4_OR_IPV6": 4, - } -) - -func (x FieldInfo_Format) Enum() *FieldInfo_Format { - p := new(FieldInfo_Format) - *p = x - return p -} - -func (x FieldInfo_Format) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FieldInfo_Format) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_field_info_proto_enumTypes[0].Descriptor() -} - -func (FieldInfo_Format) Type() protoreflect.EnumType { - return &file_google_api_field_info_proto_enumTypes[0] -} - -func (x FieldInfo_Format) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use FieldInfo_Format.Descriptor instead. -func (FieldInfo_Format) EnumDescriptor() ([]byte, []int) { - return file_google_api_field_info_proto_rawDescGZIP(), []int{0, 0} -} - -// Rich semantic information of an API field beyond basic typing. -type FieldInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The standard format of a field value. This does not explicitly configure - // any API consumer, just documents the API's format for the field it is - // applied to. - Format FieldInfo_Format `protobuf:"varint,1,opt,name=format,proto3,enum=google.api.FieldInfo_Format" json:"format,omitempty"` -} - -func (x *FieldInfo) Reset() { - *x = FieldInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_field_info_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldInfo) ProtoMessage() {} - -func (x *FieldInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_api_field_info_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldInfo.ProtoReflect.Descriptor instead. -func (*FieldInfo) Descriptor() ([]byte, []int) { - return file_google_api_field_info_proto_rawDescGZIP(), []int{0} -} - -func (x *FieldInfo) GetFormat() FieldInfo_Format { - if x != nil { - return x.Format - } - return FieldInfo_FORMAT_UNSPECIFIED -} - -var file_google_api_field_info_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*FieldInfo)(nil), - Field: 291403980, - Name: "google.api.field_info", - Tag: "bytes,291403980,opt,name=field_info", - Filename: "google/api/field_info.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // Rich semantic descriptor of an API field beyond the basic typing. - // - // Examples: - // - // string request_id = 1 [(google.api.field_info).format = UUID4]; - // string old_ip_address = 2 [(google.api.field_info).format = IPV4]; - // string new_ip_address = 3 [(google.api.field_info).format = IPV6]; - // string actual_ip_address = 4 [ - // (google.api.field_info).format = IPV4_OR_IPV6 - // ]; - // - // optional google.api.FieldInfo field_info = 291403980; - E_FieldInfo = &file_google_api_field_info_proto_extTypes[0] -) - -var File_google_api_field_info_proto protoreflect.FileDescriptor - -var file_google_api_field_info_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x09, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, - 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, - 0x51, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, - 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x55, 0x49, 0x44, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, - 0x49, 0x50, 0x56, 0x34, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x50, 0x56, 0x36, 0x10, 0x03, - 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x50, 0x56, 0x34, 0x5f, 0x4f, 0x52, 0x5f, 0x49, 0x50, 0x56, 0x36, - 0x10, 0x04, 0x3a, 0x57, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0xcc, 0xf1, 0xf9, 0x8a, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x6c, 0x0a, 0x0e, 0x63, - 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, - 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_google_api_field_info_proto_rawDescOnce sync.Once - file_google_api_field_info_proto_rawDescData = file_google_api_field_info_proto_rawDesc -) - -func file_google_api_field_info_proto_rawDescGZIP() []byte { - file_google_api_field_info_proto_rawDescOnce.Do(func() { - file_google_api_field_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_field_info_proto_rawDescData) - }) - return file_google_api_field_info_proto_rawDescData -} - -var file_google_api_field_info_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_api_field_info_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_api_field_info_proto_goTypes = []interface{}{ - (FieldInfo_Format)(0), // 0: google.api.FieldInfo.Format - (*FieldInfo)(nil), // 1: google.api.FieldInfo - (*descriptorpb.FieldOptions)(nil), // 2: google.protobuf.FieldOptions -} -var file_google_api_field_info_proto_depIdxs = []int32{ - 0, // 0: google.api.FieldInfo.format:type_name -> google.api.FieldInfo.Format - 2, // 1: google.api.field_info:extendee -> google.protobuf.FieldOptions - 1, // 2: google.api.field_info:type_name -> google.api.FieldInfo - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 2, // [2:3] is the sub-list for extension type_name - 1, // [1:2] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_api_field_info_proto_init() } -func file_google_api_field_info_proto_init() { - if File_google_api_field_info_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_field_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_field_info_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_google_api_field_info_proto_goTypes, - DependencyIndexes: file_google_api_field_info_proto_depIdxs, - EnumInfos: file_google_api_field_info_proto_enumTypes, - MessageInfos: file_google_api_field_info_proto_msgTypes, - ExtensionInfos: file_google_api_field_info_proto_extTypes, - }.Build() - File_google_api_field_info_proto = out.File - file_google_api_field_info_proto_rawDesc = nil - file_google_api_field_info_proto_goTypes = nil - file_google_api_field_info_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go deleted file mode 100644 index 76ea76df330..00000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go +++ /dev/null @@ -1,782 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/http.proto - -package annotations - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -type Http struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*HttpRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - FullyDecodeReservedExpansion bool `protobuf:"varint,2,opt,name=fully_decode_reserved_expansion,json=fullyDecodeReservedExpansion,proto3" json:"fully_decode_reserved_expansion,omitempty"` -} - -func (x *Http) Reset() { - *x = Http{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_http_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http) ProtoMessage() {} - -func (x *Http) ProtoReflect() protoreflect.Message { - mi := &file_google_api_http_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Http.ProtoReflect.Descriptor instead. -func (*Http) Descriptor() ([]byte, []int) { - return file_google_api_http_proto_rawDescGZIP(), []int{0} -} - -func (x *Http) GetRules() []*HttpRule { - if x != nil { - return x.Rules - } - return nil -} - -func (x *Http) GetFullyDecodeReservedExpansion() bool { - if x != nil { - return x.FullyDecodeReservedExpansion - } - return false -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -type HttpRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - // - // Types that are assignable to Pattern: - // - // *HttpRule_Get - // *HttpRule_Put - // *HttpRule_Post - // *HttpRule_Delete - // *HttpRule_Patch - // *HttpRule_Custom - Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"` - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - ResponseBody string `protobuf:"bytes,12,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"` - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3" json:"additional_bindings,omitempty"` -} - -func (x *HttpRule) Reset() { - *x = HttpRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_http_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpRule) ProtoMessage() {} - -func (x *HttpRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_http_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpRule.ProtoReflect.Descriptor instead. -func (*HttpRule) Descriptor() ([]byte, []int) { - return file_google_api_http_proto_rawDescGZIP(), []int{1} -} - -func (x *HttpRule) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (m *HttpRule) GetPattern() isHttpRule_Pattern { - if m != nil { - return m.Pattern - } - return nil -} - -func (x *HttpRule) GetGet() string { - if x, ok := x.GetPattern().(*HttpRule_Get); ok { - return x.Get - } - return "" -} - -func (x *HttpRule) GetPut() string { - if x, ok := x.GetPattern().(*HttpRule_Put); ok { - return x.Put - } - return "" -} - -func (x *HttpRule) GetPost() string { - if x, ok := x.GetPattern().(*HttpRule_Post); ok { - return x.Post - } - return "" -} - -func (x *HttpRule) GetDelete() string { - if x, ok := x.GetPattern().(*HttpRule_Delete); ok { - return x.Delete - } - return "" -} - -func (x *HttpRule) GetPatch() string { - if x, ok := x.GetPattern().(*HttpRule_Patch); ok { - return x.Patch - } - return "" -} - -func (x *HttpRule) GetCustom() *CustomHttpPattern { - if x, ok := x.GetPattern().(*HttpRule_Custom); ok { - return x.Custom - } - return nil -} - -func (x *HttpRule) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -func (x *HttpRule) GetResponseBody() string { - if x != nil { - return x.ResponseBody - } - return "" -} - -func (x *HttpRule) GetAdditionalBindings() []*HttpRule { - if x != nil { - return x.AdditionalBindings - } - return nil -} - -type isHttpRule_Pattern interface { - isHttpRule_Pattern() -} - -type HttpRule_Get struct { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"` -} - -type HttpRule_Put struct { - // Maps to HTTP PUT. Used for replacing a resource. - Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"` -} - -type HttpRule_Post struct { - // Maps to HTTP POST. Used for creating a resource or performing an action. - Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"` -} - -type HttpRule_Delete struct { - // Maps to HTTP DELETE. Used for deleting a resource. - Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"` -} - -type HttpRule_Patch struct { - // Maps to HTTP PATCH. Used for updating a resource. - Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"` -} - -type HttpRule_Custom struct { - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,proto3,oneof"` -} - -func (*HttpRule_Get) isHttpRule_Pattern() {} - -func (*HttpRule_Put) isHttpRule_Pattern() {} - -func (*HttpRule_Post) isHttpRule_Pattern() {} - -func (*HttpRule_Delete) isHttpRule_Pattern() {} - -func (*HttpRule_Patch) isHttpRule_Pattern() {} - -func (*HttpRule_Custom) isHttpRule_Pattern() {} - -// A custom pattern is used for defining custom HTTP verb. -type CustomHttpPattern struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of this custom HTTP verb. - Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` - // The path matched by this custom verb. - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *CustomHttpPattern) Reset() { - *x = CustomHttpPattern{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_http_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomHttpPattern) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomHttpPattern) ProtoMessage() {} - -func (x *CustomHttpPattern) ProtoReflect() protoreflect.Message { - mi := &file_google_api_http_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomHttpPattern.ProtoReflect.Descriptor instead. -func (*CustomHttpPattern) Descriptor() ([]byte, []int) { - return file_google_api_http_proto_rawDescGZIP(), []int{2} -} - -func (x *CustomHttpPattern) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *CustomHttpPattern) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -var File_google_api_http_proto protoreflect.FileDescriptor - -var file_google_api_http_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x22, 0x79, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x2a, 0x0a, 0x05, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, - 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x1f, 0x66, 0x75, 0x6c, 0x6c, 0x79, - 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x5f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x1c, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xda, - 0x02, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x03, 0x67, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x70, - 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x70, 0x75, 0x74, 0x12, - 0x14, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, - 0x16, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x61, 0x64, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x12, 0x61, 0x64, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, - 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x22, 0x3b, 0x0a, 0x11, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, - 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_http_proto_rawDescOnce sync.Once - file_google_api_http_proto_rawDescData = file_google_api_http_proto_rawDesc -) - -func file_google_api_http_proto_rawDescGZIP() []byte { - file_google_api_http_proto_rawDescOnce.Do(func() { - file_google_api_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_http_proto_rawDescData) - }) - return file_google_api_http_proto_rawDescData -} - -var file_google_api_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_google_api_http_proto_goTypes = []interface{}{ - (*Http)(nil), // 0: google.api.Http - (*HttpRule)(nil), // 1: google.api.HttpRule - (*CustomHttpPattern)(nil), // 2: google.api.CustomHttpPattern -} -var file_google_api_http_proto_depIdxs = []int32{ - 1, // 0: google.api.Http.rules:type_name -> google.api.HttpRule - 2, // 1: google.api.HttpRule.custom:type_name -> google.api.CustomHttpPattern - 1, // 2: google.api.HttpRule.additional_bindings:type_name -> google.api.HttpRule - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_google_api_http_proto_init() } -func file_google_api_http_proto_init() { - if File_google_api_http_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_http_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_http_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomHttpPattern); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_google_api_http_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*HttpRule_Get)(nil), - (*HttpRule_Put)(nil), - (*HttpRule_Post)(nil), - (*HttpRule_Delete)(nil), - (*HttpRule_Patch)(nil), - (*HttpRule_Custom)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_http_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_http_proto_goTypes, - DependencyIndexes: file_google_api_http_proto_depIdxs, - MessageInfos: file_google_api_http_proto_msgTypes, - }.Build() - File_google_api_http_proto = out.File - file_google_api_http_proto_rawDesc = nil - file_google_api_http_proto_goTypes = nil - file_google_api_http_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go deleted file mode 100644 index 7a3fd93fcd9..00000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go +++ /dev/null @@ -1,655 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/resource.proto - -package annotations - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A description of the historical or future-looking state of the -// resource pattern. -type ResourceDescriptor_History int32 - -const ( - // The "unset" value. - ResourceDescriptor_HISTORY_UNSPECIFIED ResourceDescriptor_History = 0 - // The resource originally had one pattern and launched as such, and - // additional patterns were added later. - ResourceDescriptor_ORIGINALLY_SINGLE_PATTERN ResourceDescriptor_History = 1 - // The resource has one pattern, but the API owner expects to add more - // later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - // that from being necessary once there are multiple patterns.) - ResourceDescriptor_FUTURE_MULTI_PATTERN ResourceDescriptor_History = 2 -) - -// Enum value maps for ResourceDescriptor_History. -var ( - ResourceDescriptor_History_name = map[int32]string{ - 0: "HISTORY_UNSPECIFIED", - 1: "ORIGINALLY_SINGLE_PATTERN", - 2: "FUTURE_MULTI_PATTERN", - } - ResourceDescriptor_History_value = map[string]int32{ - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2, - } -) - -func (x ResourceDescriptor_History) Enum() *ResourceDescriptor_History { - p := new(ResourceDescriptor_History) - *p = x - return p -} - -func (x ResourceDescriptor_History) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ResourceDescriptor_History) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_resource_proto_enumTypes[0].Descriptor() -} - -func (ResourceDescriptor_History) Type() protoreflect.EnumType { - return &file_google_api_resource_proto_enumTypes[0] -} - -func (x ResourceDescriptor_History) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ResourceDescriptor_History.Descriptor instead. -func (ResourceDescriptor_History) EnumDescriptor() ([]byte, []int) { - return file_google_api_resource_proto_rawDescGZIP(), []int{0, 0} -} - -// A flag representing a specific style that a resource claims to conform to. -type ResourceDescriptor_Style int32 - -const ( - // The unspecified value. Do not use. - ResourceDescriptor_STYLE_UNSPECIFIED ResourceDescriptor_Style = 0 - // This resource is intended to be "declarative-friendly". - // - // Declarative-friendly resources must be more strictly consistent, and - // setting this to true communicates to tools that this resource should - // adhere to declarative-friendly expectations. - // - // Note: This is used by the API linter (linter.aip.dev) to enable - // additional checks. - ResourceDescriptor_DECLARATIVE_FRIENDLY ResourceDescriptor_Style = 1 -) - -// Enum value maps for ResourceDescriptor_Style. -var ( - ResourceDescriptor_Style_name = map[int32]string{ - 0: "STYLE_UNSPECIFIED", - 1: "DECLARATIVE_FRIENDLY", - } - ResourceDescriptor_Style_value = map[string]int32{ - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1, - } -) - -func (x ResourceDescriptor_Style) Enum() *ResourceDescriptor_Style { - p := new(ResourceDescriptor_Style) - *p = x - return p -} - -func (x ResourceDescriptor_Style) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ResourceDescriptor_Style) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_resource_proto_enumTypes[1].Descriptor() -} - -func (ResourceDescriptor_Style) Type() protoreflect.EnumType { - return &file_google_api_resource_proto_enumTypes[1] -} - -func (x ResourceDescriptor_Style) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ResourceDescriptor_Style.Descriptor instead. -func (ResourceDescriptor_Style) EnumDescriptor() ([]byte, []int) { - return file_google_api_resource_proto_rawDescGZIP(), []int{0, 1} -} - -// A simple descriptor of a resource type. -// -// ResourceDescriptor annotates a resource message (either by means of a -// protobuf annotation or use in the service config), and associates the -// resource's schema, the resource type, and the pattern of the resource name. -// -// Example: -// -// message Topic { -// // Indicates this message defines a resource schema. -// // Declares the resource type in the format of {service}/{kind}. -// // For Kubernetes resources, the format is {api group}/{kind}. -// option (google.api.resource) = { -// type: "pubsub.googleapis.com/Topic" -// pattern: "projects/{project}/topics/{topic}" -// }; -// } -// -// The ResourceDescriptor Yaml config will look like: -// -// resources: -// - type: "pubsub.googleapis.com/Topic" -// pattern: "projects/{project}/topics/{topic}" -// -// Sometimes, resources have multiple patterns, typically because they can -// live under multiple parents. -// -// Example: -// -// message LogEntry { -// option (google.api.resource) = { -// type: "logging.googleapis.com/LogEntry" -// pattern: "projects/{project}/logs/{log}" -// pattern: "folders/{folder}/logs/{log}" -// pattern: "organizations/{organization}/logs/{log}" -// pattern: "billingAccounts/{billing_account}/logs/{log}" -// }; -// } -// -// The ResourceDescriptor Yaml config will look like: -// -// resources: -// - type: 'logging.googleapis.com/LogEntry' -// pattern: "projects/{project}/logs/{log}" -// pattern: "folders/{folder}/logs/{log}" -// pattern: "organizations/{organization}/logs/{log}" -// pattern: "billingAccounts/{billing_account}/logs/{log}" -type ResourceDescriptor struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource type. It must be in the format of - // {service_name}/{resource_type_kind}. The `resource_type_kind` must be - // singular and must not include version numbers. - // - // Example: `storage.googleapis.com/Bucket` - // - // The value of the resource_type_kind must follow the regular expression - // /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - // should use PascalCase (UpperCamelCase). The maximum number of - // characters allowed for the `resource_type_kind` is 100. - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // Optional. The relative resource name pattern associated with this resource - // type. The DNS prefix of the full resource name shouldn't be specified here. - // - // The path pattern must follow the syntax, which aligns with HTTP binding - // syntax: - // - // Template = Segment { "/" Segment } ; - // Segment = LITERAL | Variable ; - // Variable = "{" LITERAL "}" ; - // - // Examples: - // - // - "projects/{project}/topics/{topic}" - // - "projects/{project}/knowledgeBases/{knowledge_base}" - // - // The components in braces correspond to the IDs for each resource in the - // hierarchy. It is expected that, if multiple patterns are provided, - // the same component name (e.g. "project") refers to IDs of the same - // type of resource. - Pattern []string `protobuf:"bytes,2,rep,name=pattern,proto3" json:"pattern,omitempty"` - // Optional. The field on the resource that designates the resource name - // field. If omitted, this is assumed to be "name". - NameField string `protobuf:"bytes,3,opt,name=name_field,json=nameField,proto3" json:"name_field,omitempty"` - // Optional. The historical or future-looking state of the resource pattern. - // - // Example: - // - // // The InspectTemplate message originally only supported resource - // // names with organization, and project was added later. - // message InspectTemplate { - // option (google.api.resource) = { - // type: "dlp.googleapis.com/InspectTemplate" - // pattern: - // "organizations/{organization}/inspectTemplates/{inspect_template}" - // pattern: "projects/{project}/inspectTemplates/{inspect_template}" - // history: ORIGINALLY_SINGLE_PATTERN - // }; - // } - History ResourceDescriptor_History `protobuf:"varint,4,opt,name=history,proto3,enum=google.api.ResourceDescriptor_History" json:"history,omitempty"` - // The plural name used in the resource name and permission names, such as - // 'projects' for the resource name of 'projects/{project}' and the permission - // name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same - // concept of the `plural` field in k8s CRD spec - // https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - // - // Note: The plural form is required even for singleton resources. See - // https://aip.dev/156 - Plural string `protobuf:"bytes,5,opt,name=plural,proto3" json:"plural,omitempty"` - // The same concept of the `singular` field in k8s CRD spec - // https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - // Such as "project" for the `resourcemanager.googleapis.com/Project` type. - Singular string `protobuf:"bytes,6,opt,name=singular,proto3" json:"singular,omitempty"` - // Style flag(s) for this resource. - // These indicate that a resource is expected to conform to a given - // style. See the specific style flags for additional information. - Style []ResourceDescriptor_Style `protobuf:"varint,10,rep,packed,name=style,proto3,enum=google.api.ResourceDescriptor_Style" json:"style,omitempty"` -} - -func (x *ResourceDescriptor) Reset() { - *x = ResourceDescriptor{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceDescriptor) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceDescriptor) ProtoMessage() {} - -func (x *ResourceDescriptor) ProtoReflect() protoreflect.Message { - mi := &file_google_api_resource_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceDescriptor.ProtoReflect.Descriptor instead. -func (*ResourceDescriptor) Descriptor() ([]byte, []int) { - return file_google_api_resource_proto_rawDescGZIP(), []int{0} -} - -func (x *ResourceDescriptor) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *ResourceDescriptor) GetPattern() []string { - if x != nil { - return x.Pattern - } - return nil -} - -func (x *ResourceDescriptor) GetNameField() string { - if x != nil { - return x.NameField - } - return "" -} - -func (x *ResourceDescriptor) GetHistory() ResourceDescriptor_History { - if x != nil { - return x.History - } - return ResourceDescriptor_HISTORY_UNSPECIFIED -} - -func (x *ResourceDescriptor) GetPlural() string { - if x != nil { - return x.Plural - } - return "" -} - -func (x *ResourceDescriptor) GetSingular() string { - if x != nil { - return x.Singular - } - return "" -} - -func (x *ResourceDescriptor) GetStyle() []ResourceDescriptor_Style { - if x != nil { - return x.Style - } - return nil -} - -// Defines a proto annotation that describes a string field that refers to -// an API resource. -type ResourceReference struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource type that the annotated field references. - // - // Example: - // - // message Subscription { - // string topic = 2 [(google.api.resource_reference) = { - // type: "pubsub.googleapis.com/Topic" - // }]; - // } - // - // Occasionally, a field may reference an arbitrary resource. In this case, - // APIs use the special value * in their resource reference. - // - // Example: - // - // message GetIamPolicyRequest { - // string resource = 2 [(google.api.resource_reference) = { - // type: "*" - // }]; - // } - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // The resource type of a child collection that the annotated field - // references. This is useful for annotating the `parent` field that - // doesn't have a fixed resource type. - // - // Example: - // - // message ListLogEntriesRequest { - // string parent = 1 [(google.api.resource_reference) = { - // child_type: "logging.googleapis.com/LogEntry" - // }; - // } - ChildType string `protobuf:"bytes,2,opt,name=child_type,json=childType,proto3" json:"child_type,omitempty"` -} - -func (x *ResourceReference) Reset() { - *x = ResourceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceReference) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceReference) ProtoMessage() {} - -func (x *ResourceReference) ProtoReflect() protoreflect.Message { - mi := &file_google_api_resource_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceReference.ProtoReflect.Descriptor instead. -func (*ResourceReference) Descriptor() ([]byte, []int) { - return file_google_api_resource_proto_rawDescGZIP(), []int{1} -} - -func (x *ResourceReference) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *ResourceReference) GetChildType() string { - if x != nil { - return x.ChildType - } - return "" -} - -var file_google_api_resource_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*ResourceReference)(nil), - Field: 1055, - Name: "google.api.resource_reference", - Tag: "bytes,1055,opt,name=resource_reference", - Filename: "google/api/resource.proto", - }, - { - ExtendedType: (*descriptorpb.FileOptions)(nil), - ExtensionType: ([]*ResourceDescriptor)(nil), - Field: 1053, - Name: "google.api.resource_definition", - Tag: "bytes,1053,rep,name=resource_definition", - Filename: "google/api/resource.proto", - }, - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*ResourceDescriptor)(nil), - Field: 1053, - Name: "google.api.resource", - Tag: "bytes,1053,opt,name=resource", - Filename: "google/api/resource.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // An annotation that describes a resource reference, see - // [ResourceReference][]. - // - // optional google.api.ResourceReference resource_reference = 1055; - E_ResourceReference = &file_google_api_resource_proto_extTypes[0] -) - -// Extension fields to descriptorpb.FileOptions. -var ( - // An annotation that describes a resource definition without a corresponding - // message; see [ResourceDescriptor][]. - // - // repeated google.api.ResourceDescriptor resource_definition = 1053; - E_ResourceDefinition = &file_google_api_resource_proto_extTypes[1] -) - -// Extension fields to descriptorpb.MessageOptions. -var ( - // An annotation that describes a resource definition, see - // [ResourceDescriptor][]. - // - // optional google.api.ResourceDescriptor resource = 1053; - E_Resource = &file_google_api_resource_proto_extTypes[2] -) - -var File_google_api_resource_proto protoreflect.FileDescriptor - -var file_google_api_resource_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x03, 0x0a, 0x12, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1d, - 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x40, 0x0a, - 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x72, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x70, 0x6c, 0x75, 0x72, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x6e, 0x67, 0x75, - 0x6c, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x69, 0x6e, 0x67, 0x75, - 0x6c, 0x61, 0x72, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x2e, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x05, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x22, - 0x5b, 0x0a, 0x07, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x49, - 0x53, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x41, 0x4c, 0x4c, - 0x59, 0x5f, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x50, 0x41, 0x54, 0x54, 0x45, 0x52, 0x4e, - 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x55, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x4d, 0x55, 0x4c, - 0x54, 0x49, 0x5f, 0x50, 0x41, 0x54, 0x54, 0x45, 0x52, 0x4e, 0x10, 0x02, 0x22, 0x38, 0x0a, 0x05, - 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x59, 0x4c, 0x45, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, - 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x46, 0x52, 0x49, 0x45, - 0x4e, 0x44, 0x4c, 0x59, 0x10, 0x01, 0x22, 0x46, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x6c, - 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x9f, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x3a, 0x6e, 0x0a, 0x13, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x9d, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x5c, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9d, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0d, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, - 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_google_api_resource_proto_rawDescOnce sync.Once - file_google_api_resource_proto_rawDescData = file_google_api_resource_proto_rawDesc -) - -func file_google_api_resource_proto_rawDescGZIP() []byte { - file_google_api_resource_proto_rawDescOnce.Do(func() { - file_google_api_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_resource_proto_rawDescData) - }) - return file_google_api_resource_proto_rawDescData -} - -var file_google_api_resource_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_google_api_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_api_resource_proto_goTypes = []interface{}{ - (ResourceDescriptor_History)(0), // 0: google.api.ResourceDescriptor.History - (ResourceDescriptor_Style)(0), // 1: google.api.ResourceDescriptor.Style - (*ResourceDescriptor)(nil), // 2: google.api.ResourceDescriptor - (*ResourceReference)(nil), // 3: google.api.ResourceReference - (*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions - (*descriptorpb.FileOptions)(nil), // 5: google.protobuf.FileOptions - (*descriptorpb.MessageOptions)(nil), // 6: google.protobuf.MessageOptions -} -var file_google_api_resource_proto_depIdxs = []int32{ - 0, // 0: google.api.ResourceDescriptor.history:type_name -> google.api.ResourceDescriptor.History - 1, // 1: google.api.ResourceDescriptor.style:type_name -> google.api.ResourceDescriptor.Style - 4, // 2: google.api.resource_reference:extendee -> google.protobuf.FieldOptions - 5, // 3: google.api.resource_definition:extendee -> google.protobuf.FileOptions - 6, // 4: google.api.resource:extendee -> google.protobuf.MessageOptions - 3, // 5: google.api.resource_reference:type_name -> google.api.ResourceReference - 2, // 6: google.api.resource_definition:type_name -> google.api.ResourceDescriptor - 2, // 7: google.api.resource:type_name -> google.api.ResourceDescriptor - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 5, // [5:8] is the sub-list for extension type_name - 2, // [2:5] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_google_api_resource_proto_init() } -func file_google_api_resource_proto_init() { - if File_google_api_resource_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceDescriptor); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_resource_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_resource_proto_rawDesc, - NumEnums: 2, - NumMessages: 2, - NumExtensions: 3, - NumServices: 0, - }, - GoTypes: file_google_api_resource_proto_goTypes, - DependencyIndexes: file_google_api_resource_proto_depIdxs, - EnumInfos: file_google_api_resource_proto_enumTypes, - MessageInfos: file_google_api_resource_proto_msgTypes, - ExtensionInfos: file_google_api_resource_proto_extTypes, - }.Build() - File_google_api_resource_proto = out.File - file_google_api_resource_proto_rawDesc = nil - file_google_api_resource_proto_goTypes = nil - file_google_api_resource_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go deleted file mode 100644 index 1d8397b02b4..00000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go +++ /dev/null @@ -1,693 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/routing.proto - -package annotations - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Specifies the routing information that should be sent along with the request -// in the form of routing header. -// **NOTE:** All service configuration rules follow the "last one wins" order. -// -// The examples below will apply to an RPC which has the following request type: -// -// Message Definition: -// -// message Request { -// // The name of the Table -// // Values can be of the following formats: -// // - `projects//tables/` -// // - `projects//instances//tables/
` -// // - `region//zones//tables/
` -// string table_name = 1; -// -// // This value specifies routing for replication. -// // It can be in the following formats: -// // - `profiles/` -// // - a legacy `profile_id` that can be any string -// string app_profile_id = 2; -// } -// -// Example message: -// -// { -// table_name: projects/proj_foo/instances/instance_bar/table/table_baz, -// app_profile_id: profiles/prof_qux -// } -// -// The routing header consists of one or multiple key-value pairs. Every key -// and value must be percent-encoded, and joined together in the format of -// `key1=value1&key2=value2`. -// In the examples below I am skipping the percent-encoding for readablity. -// -// # Example 1 -// -// Extracting a field from the request to put into the routing header -// unchanged, with the key equal to the field name. -// -// annotation: -// -// option (google.api.routing) = { -// // Take the `app_profile_id`. -// routing_parameters { -// field: "app_profile_id" -// } -// }; -// -// result: -// -// x-goog-request-params: app_profile_id=profiles/prof_qux -// -// # Example 2 -// -// Extracting a field from the request to put into the routing header -// unchanged, with the key different from the field name. -// -// annotation: -// -// option (google.api.routing) = { -// // Take the `app_profile_id`, but name it `routing_id` in the header. -// routing_parameters { -// field: "app_profile_id" -// path_template: "{routing_id=**}" -// } -// }; -// -// result: -// -// x-goog-request-params: routing_id=profiles/prof_qux -// -// # Example 3 -// -// Extracting a field from the request to put into the routing -// header, while matching a path template syntax on the field's value. -// -// NB: it is more useful to send nothing than to send garbage for the purpose -// of dynamic routing, since garbage pollutes cache. Thus the matching. -// -// # Sub-example 3a -// -// The field matches the template. -// -// annotation: -// -// option (google.api.routing) = { -// // Take the `table_name`, if it's well-formed (with project-based -// // syntax). -// routing_parameters { -// field: "table_name" -// path_template: "{table_name=projects/*/instances/*/**}" -// } -// }; -// -// result: -// -// x-goog-request-params: -// table_name=projects/proj_foo/instances/instance_bar/table/table_baz -// -// # Sub-example 3b -// -// The field does not match the template. -// -// annotation: -// -// option (google.api.routing) = { -// // Take the `table_name`, if it's well-formed (with region-based -// // syntax). -// routing_parameters { -// field: "table_name" -// path_template: "{table_name=regions/*/zones/*/**}" -// } -// }; -// -// result: -// -// -// -// # Sub-example 3c -// -// Multiple alternative conflictingly named path templates are -// specified. The one that matches is used to construct the header. -// -// annotation: -// -// option (google.api.routing) = { -// // Take the `table_name`, if it's well-formed, whether -// // using the region- or projects-based syntax. -// -// routing_parameters { -// field: "table_name" -// path_template: "{table_name=regions/*/zones/*/**}" -// } -// routing_parameters { -// field: "table_name" -// path_template: "{table_name=projects/*/instances/*/**}" -// } -// }; -// -// result: -// -// x-goog-request-params: -// table_name=projects/proj_foo/instances/instance_bar/table/table_baz -// -// # Example 4 -// -// Extracting a single routing header key-value pair by matching a -// template syntax on (a part of) a single request field. -// -// annotation: -// -// option (google.api.routing) = { -// // Take just the project id from the `table_name` field. -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=projects/*}/**" -// } -// }; -// -// result: -// -// x-goog-request-params: routing_id=projects/proj_foo -// -// # Example 5 -// -// Extracting a single routing header key-value pair by matching -// several conflictingly named path templates on (parts of) a single request -// field. The last template to match "wins" the conflict. -// -// annotation: -// -// option (google.api.routing) = { -// // If the `table_name` does not have instances information, -// // take just the project id for routing. -// // Otherwise take project + instance. -// -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=projects/*}/**" -// } -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=projects/*/instances/*}/**" -// } -// }; -// -// result: -// -// x-goog-request-params: -// routing_id=projects/proj_foo/instances/instance_bar -// -// # Example 6 -// -// Extracting multiple routing header key-value pairs by matching -// several non-conflicting path templates on (parts of) a single request field. -// -// # Sub-example 6a -// -// Make the templates strict, so that if the `table_name` does not -// have an instance information, nothing is sent. -// -// annotation: -// -// option (google.api.routing) = { -// // The routing code needs two keys instead of one composite -// // but works only for the tables with the "project-instance" name -// // syntax. -// -// routing_parameters { -// field: "table_name" -// path_template: "{project_id=projects/*}/instances/*/**" -// } -// routing_parameters { -// field: "table_name" -// path_template: "projects/*/{instance_id=instances/*}/**" -// } -// }; -// -// result: -// -// x-goog-request-params: -// project_id=projects/proj_foo&instance_id=instances/instance_bar -// -// # Sub-example 6b -// -// Make the templates loose, so that if the `table_name` does not -// have an instance information, just the project id part is sent. -// -// annotation: -// -// option (google.api.routing) = { -// // The routing code wants two keys instead of one composite -// // but will work with just the `project_id` for tables without -// // an instance in the `table_name`. -// -// routing_parameters { -// field: "table_name" -// path_template: "{project_id=projects/*}/**" -// } -// routing_parameters { -// field: "table_name" -// path_template: "projects/*/{instance_id=instances/*}/**" -// } -// }; -// -// result (is the same as 6a for our example message because it has the instance -// information): -// -// x-goog-request-params: -// project_id=projects/proj_foo&instance_id=instances/instance_bar -// -// # Example 7 -// -// Extracting multiple routing header key-value pairs by matching -// several path templates on multiple request fields. -// -// NB: note that here there is no way to specify sending nothing if one of the -// fields does not match its template. E.g. if the `table_name` is in the wrong -// format, the `project_id` will not be sent, but the `routing_id` will be. -// The backend routing code has to be aware of that and be prepared to not -// receive a full complement of keys if it expects multiple. -// -// annotation: -// -// option (google.api.routing) = { -// // The routing needs both `project_id` and `routing_id` -// // (from the `app_profile_id` field) for routing. -// -// routing_parameters { -// field: "table_name" -// path_template: "{project_id=projects/*}/**" -// } -// routing_parameters { -// field: "app_profile_id" -// path_template: "{routing_id=**}" -// } -// }; -// -// result: -// -// x-goog-request-params: -// project_id=projects/proj_foo&routing_id=profiles/prof_qux -// -// # Example 8 -// -// Extracting a single routing header key-value pair by matching -// several conflictingly named path templates on several request fields. The -// last template to match "wins" the conflict. -// -// annotation: -// -// option (google.api.routing) = { -// // The `routing_id` can be a project id or a region id depending on -// // the table name format, but only if the `app_profile_id` is not set. -// // If `app_profile_id` is set it should be used instead. -// -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=projects/*}/**" -// } -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=regions/*}/**" -// } -// routing_parameters { -// field: "app_profile_id" -// path_template: "{routing_id=**}" -// } -// }; -// -// result: -// -// x-goog-request-params: routing_id=profiles/prof_qux -// -// # Example 9 -// -// Bringing it all together. -// -// annotation: -// -// option (google.api.routing) = { -// // For routing both `table_location` and a `routing_id` are needed. -// // -// // table_location can be either an instance id or a region+zone id. -// // -// // For `routing_id`, take the value of `app_profile_id` -// // - If it's in the format `profiles/`, send -// // just the `` part. -// // - If it's any other literal, send it as is. -// // If the `app_profile_id` is empty, and the `table_name` starts with -// // the project_id, send that instead. -// -// routing_parameters { -// field: "table_name" -// path_template: "projects/*/{table_location=instances/*}/tables/*" -// } -// routing_parameters { -// field: "table_name" -// path_template: "{table_location=regions/*/zones/*}/tables/*" -// } -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=projects/*}/**" -// } -// routing_parameters { -// field: "app_profile_id" -// path_template: "{routing_id=**}" -// } -// routing_parameters { -// field: "app_profile_id" -// path_template: "profiles/{routing_id=*}" -// } -// }; -// -// result: -// -// x-goog-request-params: -// table_location=instances/instance_bar&routing_id=prof_qux -type RoutingRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A collection of Routing Parameter specifications. - // **NOTE:** If multiple Routing Parameters describe the same key - // (via the `path_template` field or via the `field` field when - // `path_template` is not provided), "last one wins" rule - // determines which Parameter gets used. - // See the examples for more details. - RoutingParameters []*RoutingParameter `protobuf:"bytes,2,rep,name=routing_parameters,json=routingParameters,proto3" json:"routing_parameters,omitempty"` -} - -func (x *RoutingRule) Reset() { - *x = RoutingRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_routing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RoutingRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RoutingRule) ProtoMessage() {} - -func (x *RoutingRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_routing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RoutingRule.ProtoReflect.Descriptor instead. -func (*RoutingRule) Descriptor() ([]byte, []int) { - return file_google_api_routing_proto_rawDescGZIP(), []int{0} -} - -func (x *RoutingRule) GetRoutingParameters() []*RoutingParameter { - if x != nil { - return x.RoutingParameters - } - return nil -} - -// A projection from an input message to the GRPC or REST header. -type RoutingParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A request field to extract the header key-value pair from. - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` - // A pattern matching the key-value field. Optional. - // If not specified, the whole field specified in the `field` field will be - // taken as value, and its name used as key. If specified, it MUST contain - // exactly one named segment (along with any number of unnamed segments) The - // pattern will be matched over the field specified in the `field` field, then - // if the match is successful: - // - the name of the single named segment will be used as a header name, - // - the match value of the segment will be used as a header value; - // if the match is NOT successful, nothing will be sent. - // - // Example: - // - // -- This is a field in the request message - // | that the header value will be extracted from. - // | - // | -- This is the key name in the - // | | routing header. - // V | - // field: "table_name" v - // path_template: "projects/*/{table_location=instances/*}/tables/*" - // ^ ^ - // | | - // In the {} brackets is the pattern that -- | - // specifies what to extract from the | - // field as a value to be sent. | - // | - // The string in the field must match the whole pattern -- - // before brackets, inside brackets, after brackets. - // - // When looking at this specific example, we can see that: - // - A key-value pair with the key `table_location` - // and the value matching `instances/*` should be added - // to the x-goog-request-params routing header. - // - The value is extracted from the request message's `table_name` field - // if it matches the full pattern specified: - // `projects/*/instances/*/tables/*`. - // - // **NB:** If the `path_template` field is not provided, the key name is - // equal to the field name, and the whole field should be sent as a value. - // This makes the pattern for the field and the value functionally equivalent - // to `**`, and the configuration - // - // { - // field: "table_name" - // } - // - // is a functionally equivalent shorthand to: - // - // { - // field: "table_name" - // path_template: "{table_name=**}" - // } - // - // See Example 1 for more details. - PathTemplate string `protobuf:"bytes,2,opt,name=path_template,json=pathTemplate,proto3" json:"path_template,omitempty"` -} - -func (x *RoutingParameter) Reset() { - *x = RoutingParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_routing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RoutingParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RoutingParameter) ProtoMessage() {} - -func (x *RoutingParameter) ProtoReflect() protoreflect.Message { - mi := &file_google_api_routing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RoutingParameter.ProtoReflect.Descriptor instead. -func (*RoutingParameter) Descriptor() ([]byte, []int) { - return file_google_api_routing_proto_rawDescGZIP(), []int{1} -} - -func (x *RoutingParameter) GetField() string { - if x != nil { - return x.Field - } - return "" -} - -func (x *RoutingParameter) GetPathTemplate() string { - if x != nil { - return x.PathTemplate - } - return "" -} - -var file_google_api_routing_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*RoutingRule)(nil), - Field: 72295729, - Name: "google.api.routing", - Tag: "bytes,72295729,opt,name=routing", - Filename: "google/api/routing.proto", - }, -} - -// Extension fields to descriptorpb.MethodOptions. -var ( - // See RoutingRule. - // - // optional google.api.RoutingRule routing = 72295729; - E_Routing = &file_google_api_routing_proto_extTypes[0] -) - -var File_google_api_routing_proto protoreflect.FileDescriptor - -var file_google_api_routing_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x6f, 0x75, - 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, - 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x4b, 0x0a, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x52, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x22, 0x4d, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, - 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x3a, 0x54, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb1, - 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, - 0x52, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0c, 0x52, 0x6f, 0x75, - 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, - 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, - 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_routing_proto_rawDescOnce sync.Once - file_google_api_routing_proto_rawDescData = file_google_api_routing_proto_rawDesc -) - -func file_google_api_routing_proto_rawDescGZIP() []byte { - file_google_api_routing_proto_rawDescOnce.Do(func() { - file_google_api_routing_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_routing_proto_rawDescData) - }) - return file_google_api_routing_proto_rawDescData -} - -var file_google_api_routing_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_api_routing_proto_goTypes = []interface{}{ - (*RoutingRule)(nil), // 0: google.api.RoutingRule - (*RoutingParameter)(nil), // 1: google.api.RoutingParameter - (*descriptorpb.MethodOptions)(nil), // 2: google.protobuf.MethodOptions -} -var file_google_api_routing_proto_depIdxs = []int32{ - 1, // 0: google.api.RoutingRule.routing_parameters:type_name -> google.api.RoutingParameter - 2, // 1: google.api.routing:extendee -> google.protobuf.MethodOptions - 0, // 2: google.api.routing:type_name -> google.api.RoutingRule - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 2, // [2:3] is the sub-list for extension type_name - 1, // [1:2] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_api_routing_proto_init() } -func file_google_api_routing_proto_init() { - if File_google_api_routing_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_routing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoutingRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_routing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoutingParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_routing_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_google_api_routing_proto_goTypes, - DependencyIndexes: file_google_api_routing_proto_depIdxs, - MessageInfos: file_google_api_routing_proto_msgTypes, - ExtensionInfos: file_google_api_routing_proto_extTypes, - }.Build() - File_google_api_routing_proto = out.File - file_google_api_routing_proto_rawDesc = nil - file_google_api_routing_proto_goTypes = nil - file_google_api_routing_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go b/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go deleted file mode 100644 index 498020e33cd..00000000000 --- a/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT 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-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v4.24.4 -// source: google/api/launch_stage.proto - -package api - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The launch stage as defined by [Google Cloud Platform -// Launch Stages](https://cloud.google.com/terms/launch-stages). -type LaunchStage int32 - -const ( - // Do not use this default value. - LaunchStage_LAUNCH_STAGE_UNSPECIFIED LaunchStage = 0 - // The feature is not yet implemented. Users can not use it. - LaunchStage_UNIMPLEMENTED LaunchStage = 6 - // Prelaunch features are hidden from users and are only visible internally. - LaunchStage_PRELAUNCH LaunchStage = 7 - // Early Access features are limited to a closed group of testers. To use - // these features, you must sign up in advance and sign a Trusted Tester - // agreement (which includes confidentiality provisions). These features may - // be unstable, changed in backward-incompatible ways, and are not - // guaranteed to be released. - LaunchStage_EARLY_ACCESS LaunchStage = 1 - // Alpha is a limited availability test for releases before they are cleared - // for widespread use. By Alpha, all significant design issues are resolved - // and we are in the process of verifying functionality. Alpha customers - // need to apply for access, agree to applicable terms, and have their - // projects allowlisted. Alpha releases don't have to be feature complete, - // no SLAs are provided, and there are no technical support obligations, but - // they will be far enough along that customers can actually use them in - // test environments or for limited-use tests -- just like they would in - // normal production cases. - LaunchStage_ALPHA LaunchStage = 2 - // Beta is the point at which we are ready to open a release for any - // customer to use. There are no SLA or technical support obligations in a - // Beta release. Products will be complete from a feature perspective, but - // may have some open outstanding issues. Beta releases are suitable for - // limited production use cases. - LaunchStage_BETA LaunchStage = 3 - // GA features are open to all developers and are considered stable and - // fully qualified for production use. - LaunchStage_GA LaunchStage = 4 - // Deprecated features are scheduled to be shut down and removed. For more - // information, see the "Deprecation Policy" section of our [Terms of - // Service](https://cloud.google.com/terms/) - // and the [Google Cloud Platform Subject to the Deprecation - // Policy](https://cloud.google.com/terms/deprecation) documentation. - LaunchStage_DEPRECATED LaunchStage = 5 -) - -// Enum value maps for LaunchStage. -var ( - LaunchStage_name = map[int32]string{ - 0: "LAUNCH_STAGE_UNSPECIFIED", - 6: "UNIMPLEMENTED", - 7: "PRELAUNCH", - 1: "EARLY_ACCESS", - 2: "ALPHA", - 3: "BETA", - 4: "GA", - 5: "DEPRECATED", - } - LaunchStage_value = map[string]int32{ - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5, - } -) - -func (x LaunchStage) Enum() *LaunchStage { - p := new(LaunchStage) - *p = x - return p -} - -func (x LaunchStage) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LaunchStage) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_launch_stage_proto_enumTypes[0].Descriptor() -} - -func (LaunchStage) Type() protoreflect.EnumType { - return &file_google_api_launch_stage_proto_enumTypes[0] -} - -func (x LaunchStage) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LaunchStage.Descriptor instead. -func (LaunchStage) EnumDescriptor() ([]byte, []int) { - return file_google_api_launch_stage_proto_rawDescGZIP(), []int{0} -} - -var File_google_api_launch_stage_proto protoreflect.FileDescriptor - -var file_google_api_launch_stage_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x75, - 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2a, 0x8c, 0x01, 0x0a, 0x0b, - 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x4c, - 0x41, 0x55, 0x4e, 0x43, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x49, - 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, - 0x50, 0x52, 0x45, 0x4c, 0x41, 0x55, 0x4e, 0x43, 0x48, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x45, - 0x41, 0x52, 0x4c, 0x59, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, - 0x05, 0x41, 0x4c, 0x50, 0x48, 0x41, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x45, 0x54, 0x41, - 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x41, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, - 0x50, 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x05, 0x42, 0x5a, 0x0a, 0x0e, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x10, 0x4c, 0x61, - 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, - 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xa2, - 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_launch_stage_proto_rawDescOnce sync.Once - file_google_api_launch_stage_proto_rawDescData = file_google_api_launch_stage_proto_rawDesc -) - -func file_google_api_launch_stage_proto_rawDescGZIP() []byte { - file_google_api_launch_stage_proto_rawDescOnce.Do(func() { - file_google_api_launch_stage_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_launch_stage_proto_rawDescData) - }) - return file_google_api_launch_stage_proto_rawDescData -} - -var file_google_api_launch_stage_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_api_launch_stage_proto_goTypes = []interface{}{ - (LaunchStage)(0), // 0: google.api.LaunchStage -} -var file_google_api_launch_stage_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_api_launch_stage_proto_init() } -func file_google_api_launch_stage_proto_init() { - if File_google_api_launch_stage_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_launch_stage_proto_rawDesc, - NumEnums: 1, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_launch_stage_proto_goTypes, - DependencyIndexes: file_google_api_launch_stage_proto_depIdxs, - EnumInfos: file_google_api_launch_stage_proto_enumTypes, - }.Build() - File_google_api_launch_stage_proto = out.File - file_google_api_launch_stage_proto_rawDesc = nil - file_google_api_launch_stage_proto_goTypes = nil - file_google_api_launch_stage_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/grpc/resolver/manual/manual.go b/vendor/google.golang.org/grpc/resolver/manual/manual.go deleted file mode 100644 index f2efa2a2cb5..00000000000 --- a/vendor/google.golang.org/grpc/resolver/manual/manual.go +++ /dev/null @@ -1,126 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -// Package manual defines a resolver that can be used to manually send resolved -// addresses to ClientConn. -package manual - -import ( - "sync" - - "google.golang.org/grpc/resolver" -) - -// NewBuilderWithScheme creates a new manual resolver builder with the given -// scheme. Every instance of the manual resolver may only ever be used with a -// single grpc.ClientConn. Otherwise, bad things will happen. -func NewBuilderWithScheme(scheme string) *Resolver { - return &Resolver{ - BuildCallback: func(resolver.Target, resolver.ClientConn, resolver.BuildOptions) {}, - UpdateStateCallback: func(error) {}, - ResolveNowCallback: func(resolver.ResolveNowOptions) {}, - CloseCallback: func() {}, - scheme: scheme, - } -} - -// Resolver is also a resolver builder. -// It's build() function always returns itself. -type Resolver struct { - // BuildCallback is called when the Build method is called. Must not be - // nil. Must not be changed after the resolver may be built. - BuildCallback func(resolver.Target, resolver.ClientConn, resolver.BuildOptions) - // UpdateStateCallback is called when the UpdateState method is called on - // the resolver. The value passed as argument to this callback is the value - // returned by the resolver.ClientConn. Must not be nil. Must not be - // changed after the resolver may be built. - UpdateStateCallback func(err error) - // ResolveNowCallback is called when the ResolveNow method is called on the - // resolver. Must not be nil. Must not be changed after the resolver may - // be built. - ResolveNowCallback func(resolver.ResolveNowOptions) - // CloseCallback is called when the Close method is called. Must not be - // nil. Must not be changed after the resolver may be built. - CloseCallback func() - scheme string - - // Fields actually belong to the resolver. - // Guards access to below fields. - mu sync.Mutex - CC resolver.ClientConn - // Storing the most recent state update makes this resolver resilient to - // restarts, which is possible with channel idleness. - lastSeenState *resolver.State -} - -// InitialState adds initial state to the resolver so that UpdateState doesn't -// need to be explicitly called after Dial. -func (r *Resolver) InitialState(s resolver.State) { - r.lastSeenState = &s -} - -// Build returns itself for Resolver, because it's both a builder and a resolver. -func (r *Resolver) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { - r.BuildCallback(target, cc, opts) - r.mu.Lock() - defer r.mu.Unlock() - r.CC = cc - if r.lastSeenState != nil { - err := r.CC.UpdateState(*r.lastSeenState) - go r.UpdateStateCallback(err) - } - return r, nil -} - -// Scheme returns the manual resolver's scheme. -func (r *Resolver) Scheme() string { - return r.scheme -} - -// ResolveNow is a noop for Resolver. -func (r *Resolver) ResolveNow(o resolver.ResolveNowOptions) { - r.ResolveNowCallback(o) -} - -// Close is a noop for Resolver. -func (r *Resolver) Close() { - r.CloseCallback() -} - -// UpdateState calls CC.UpdateState. -func (r *Resolver) UpdateState(s resolver.State) { - r.mu.Lock() - defer r.mu.Unlock() - var err error - if r.CC == nil { - panic("cannot update state as grpc.Dial with resolver has not been called") - } - err = r.CC.UpdateState(s) - r.lastSeenState = &s - r.UpdateStateCallback(err) -} - -// ReportError calls CC.ReportError. -func (r *Resolver) ReportError(err error) { - r.mu.Lock() - defer r.mu.Unlock() - if r.CC == nil { - panic("cannot report error as grpc.Dial with resolver has not been called") - } - r.CC.ReportError(err) -} diff --git a/vendor/k8s.io/api/admission/v1/generated.pb.go b/vendor/k8s.io/api/admission/v1/generated.pb.go index a2d8ff5dde6..f5c41791982 100644 --- a/vendor/k8s.io/api/admission/v1/generated.pb.go +++ b/vendor/k8s.io/api/admission/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/admission/v1/generated.proto +// source: k8s.io/api/admission/v1/generated.proto package v1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AdmissionRequest) Reset() { *m = AdmissionRequest{} } func (*AdmissionRequest) ProtoMessage() {} func (*AdmissionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4b73421fd5edef9f, []int{0} + return fileDescriptor_7b47d27831186ccf, []int{0} } func (m *AdmissionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_AdmissionRequest proto.InternalMessageInfo func (m *AdmissionResponse) Reset() { *m = AdmissionResponse{} } func (*AdmissionResponse) ProtoMessage() {} func (*AdmissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4b73421fd5edef9f, []int{1} + return fileDescriptor_7b47d27831186ccf, []int{1} } func (m *AdmissionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_AdmissionResponse proto.InternalMessageInfo func (m *AdmissionReview) Reset() { *m = AdmissionReview{} } func (*AdmissionReview) ProtoMessage() {} func (*AdmissionReview) Descriptor() ([]byte, []int) { - return fileDescriptor_4b73421fd5edef9f, []int{2} + return fileDescriptor_7b47d27831186ccf, []int{2} } func (m *AdmissionReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -139,69 +139,68 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/admission/v1/generated.proto", fileDescriptor_4b73421fd5edef9f) + proto.RegisterFile("k8s.io/api/admission/v1/generated.proto", fileDescriptor_7b47d27831186ccf) } -var fileDescriptor_4b73421fd5edef9f = []byte{ - // 921 bytes of a gzipped FileDescriptorProto +var fileDescriptor_7b47d27831186ccf = []byte{ + // 907 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xd6, 0x8e, 0xed, 0x1d, 0x87, 0xda, 0x9d, 0x82, 0xba, 0xf2, 0x61, 0x6d, 0x72, 0x40, - 0x2e, 0x6a, 0x77, 0x49, 0x04, 0x55, 0x54, 0x81, 0xd4, 0x2c, 0xa9, 0x50, 0x40, 0x6a,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 0x60, 0x4c, 0x66, 0xf8, 0x22, 0x6e, 0xeb, 0x77, 0x1b, 0xb4, 0xf6, - 0x52, 0x31, 0x10, 0xf9, 0x29, 0x26, 0x42, 0xc2, 0x00, 0x94, 0x63, 0x3a, 0x74, 0xac, 0xae, 0xd5, - 0xb3, 0x83, 0x4f, 0x4e, 0x97, 0x9d, 0xd2, 0x6a, 0xd9, 0x29, 0x1f, 0x1f, 0xec, 0x9f, 0x2f, 0x3b, - 0x1f, 0xae, 0x2b, 0x24, 0x17, 0x21, 0x11, 0xde, 0xf1, 0xc1, 0x3e, 0x52, 0x60, 0xf8, 0x12, 0x54, - 0x26, 0x94, 0x0d, 0x9d, 0x5b, 0x5d, 0xab, 0xd7, 0xd8, 0x79, 0xe4, 0xe5, 0xe2, 0x67, 0x30, 0x2f, - 0x9c, 0x8c, 0x94, 0x43, 0x78, 0x4a, 0x06, 0x6f, 0xbe, 0xed, 0x7d, 0x15, 0xf1, 0x38, 0xfc, 0x96, - 0x44, 0xaa, 0x99, 0x6f, 0x28, 0x1b, 0x06, 0x9b, 0xa6, 0x78, 0x45, 0x59, 0x48, 0x33, 0xc2, 0x31, - 0xa8, 0x47, 0x44, 0xf0, 0x38, 0x1a, 0x10, 0xa7, 0xac, 0xd9, 0x1f, 0xff, 0x77, 0x76, 0x64, 0x18, - 0x82, 0x96, 0xa9, 0x50, 0x4f, 0x3d, 0x28, 0x63, 0x87, 0x9f, 0x81, 0x86, 0x88, 0xfb, 0x69, 0xc0, - 0xa9, 0x68, 0x3d, 0xee, 0x1a, 0x40, 0xe3, 0x79, 0x1e, 0x42, 0xc5, 0x3c, 0x48, 0x41, 0x23, 0x4a, - 0x94, 0x54, 0x5d, 0x3b, 0xef, 0xdd, 0x48, 0x81, 0xa6, 0x2a, 0x85, 0x72, 0x3a, 0x54, 0xe4, 0x86, - 0x0b, 0xd0, 0x34, 0x66, 0xd6, 0xe5, 0xed, 0x1b, 0x4b, 0x72, 0x77, 0xb5, 0xec, 0x34, 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c, 0x58, 0x50, 0x4a, + 0xb7, 0xf5, 0x47, 0x05, 0xdc, 0x29, 0x5c, 0x28, 0x11, 0x72, 0x26, 0xc8, 0xff, 0x72, 0xa2, 0xee, + 0x83, 0x1a, 0x9e, 0x4c, 0xf8, 0x29, 0x49, 0xae, 0x54, 0x3d, 0x6f, 0x62, 0x2f, 0x71, 0xa3, 0x34, + 0x0e, 0x8f, 0x40, 0x55, 0x48, 0x2c, 0x63, 0x61, 0x2e, 0xce, 0x83, 0xeb, 0xad, 0xd7, 0x33, 0x8d, + 0x49, 0x04, 0x43, 0x44, 0xc4, 0x13, 0x89, 0x0c, 0x0f, 0xec, 0x80, 0x8d, 0x10, 0xcb, 0xfe, 0x48, + 0x5f, 0x95, 0xcd, 0xc0, 0x5e, 0x2e, 0x3a, 0x1b, 0x47, 0xca, 0x81, 0x12, 0x3f, 0xdc, 0x05, 0xb6, + 0x7e, 0x78, 0x3e, 0x0f, 0xd3, 0xc5, 0x68, 0xab, 0x11, 0x1d, 0xa5, 0xce, 0x8b, 0xa2, 0x81, 0xf2, + 0x64, 0xf8, 0xab, 0x05, 0x5a, 0x38, 0x1e, 0x50, 0xb9, 0xc7, 0x18, 0x97, 0x38, 0x99, 0x4a, 0xb5, + 0x5b, 0xee, 0x35, 0x76, 0xbe, 0xf0, 0xd6, 0x7c, 0x04, 0xbd, 0x2b, 0x12, 0x7b, 0x7b, 0x97, 0x28, + 0x9e, 0x30, 0x19, 0xcd, 0x03, 0xc7, 0x68, 0xd4, 0xba, 0x1c, 0x46, 0x57, 0x6a, 0xc2, 0x1e, 0xa8, + 0x9f, 0xe2, 0x88, 0x51, 0x36, 0x14, 0x4e, 0xad, 0x5b, 0x56, 0xab, 0xad, 0x36, 0xe3, 0x3b, 0xe3, + 0x43, 0x59, 0xb4, 0xfd, 0x25, 0x78, 0x6f, 0x65, 0x39, 0xd8, 0x02, 0xe5, 0x31, 0x99, 0x27, 0x73, + 0x46, 0xea, 0x11, 0xbe, 0x0b, 0x36, 0x66, 0x78, 0x12, 0x13, 0x3d, 0x33, 0x1b, 0x25, 0xc6, 0xe3, + 0x5b, 0xbb, 0xd6, 0xd6, 0x9f, 0x16, 0x68, 0x16, 0xfe, 0x8d, 0x19, 0x25, 0xa7, 0xf0, 0x08, 0xd4, + 0xcc, 0xbd, 0xd1, 0x1c, 0x8d, 0x9d, 0xfb, 0xd7, 0x51, 0x40, 0x03, 0x82, 0x86, 0x7a, 0x15, 0xd2, + 0x3b, 0x98, 0xd2, 0xa8, 0xd3, 0x10, 0x19, 0x89, 0xcc, 0xc7, 0xed, 0xa3, 0xeb, 0x8b, 0x9a, 0x08, + 0x90, 0x5a, 0x28, 0x63, 0x0a, 0x3e, 0x3f, 0x3b, 0x77, 0x4b, 0xaf, 0xce, 0xdd, 0xd2, 0xeb, 0x73, + 0xb7, 0xf4, 0xcb, 0xd2, 0xb5, 0xce, 0x96, 0xae, 0xf5, 0x6a, 0xe9, 0x5a, 0xaf, 0x97, 0xae, 0xf5, + 0xd7, 0xd2, 0xb5, 0x7e, 0xfb, 0xdb, 0x2d, 0x7d, 0x7f, 0x6f, 0xcd, 0x6f, 0x9d, 0x7f, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x5c, 0x49, 0x23, 0x22, 0x05, 0x09, 0x00, 0x00, } func (m *AdmissionRequest) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/admission/v1beta1/generated.pb.go b/vendor/k8s.io/api/admission/v1beta1/generated.pb.go index c8839181422..22147cbe947 100644 --- a/vendor/k8s.io/api/admission/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/admission/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/admission/v1beta1/generated.proto +// source: k8s.io/api/admission/v1beta1/generated.proto package v1beta1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AdmissionRequest) Reset() { *m = AdmissionRequest{} } func (*AdmissionRequest) ProtoMessage() {} func (*AdmissionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b87c2352de86eab9, []int{0} + return fileDescriptor_d8f147b43c61e73e, []int{0} } func (m *AdmissionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_AdmissionRequest proto.InternalMessageInfo func (m *AdmissionResponse) Reset() { *m = AdmissionResponse{} } func (*AdmissionResponse) ProtoMessage() {} func (*AdmissionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b87c2352de86eab9, []int{1} + return fileDescriptor_d8f147b43c61e73e, []int{1} } func (m *AdmissionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_AdmissionResponse proto.InternalMessageInfo func (m *AdmissionReview) Reset() { *m = AdmissionReview{} } func (*AdmissionReview) ProtoMessage() {} func (*AdmissionReview) Descriptor() ([]byte, []int) { - return fileDescriptor_b87c2352de86eab9, []int{2} + return fileDescriptor_d8f147b43c61e73e, []int{2} } func (m *AdmissionReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -139,69 +139,68 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/admission/v1beta1/generated.proto", fileDescriptor_b87c2352de86eab9) + proto.RegisterFile("k8s.io/api/admission/v1beta1/generated.proto", fileDescriptor_d8f147b43c61e73e) } -var fileDescriptor_b87c2352de86eab9 = []byte{ - // 928 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcb, 0x6e, 0xdb, 0x46, - 0x17, 0x16, 0x23, 0x59, 0x12, 0x47, 0xfe, 0x23, 0x65, 0xf2, 0x17, 0x20, 0x84, 0x80, 0x52, 0xbd, - 0x28, 0x54, 0x20, 0x19, 0xd6, 0x46, 0x1b, 0x18, 0x41, 0x37, 0x66, 0x6d, 0x14, 0x6e, 0x81, 0xd8, - 0x98, 0x44, 0x6d, 0xda, 0x45, 0x81, 0x91, 0x34, 0x91, 0x58, 0x49, 0x33, 0x2c, 0x67, 0x28, 0x57, - 0xbb, 0xee, 0xbb, 0xe9, 0x1b, 0xf4, 0x05, 0xfa, 0x16, 0xdd, 0x78, 0x99, 0x65, 0x56, 0x42, 0xad, - 0xbe, 0x85, 0x57, 0xc5, 0x0c, 0x87, 0x97, 0xc8, 0x76, 0x9a, 0x4b, 0x57, 0xe6, 0xb9, 0x7c, 0xdf, - 0x39, 0xfe, 0x0e, 0xcf, 0xa1, 0xc0, 0xd1, 0x74, 0x5f, 0xa0, 0x80, 0x7b, 0xd3, 0x78, 0x40, 0x23, - 0x46, 0x25, 0x15, 0xde, 0x82, 0xb2, 0x11, 0x8f, 0x3c, 0x13, 0x20, 0x61, 0xe0, 0x91, 0xd1, 0x3c, - 0x10, 0x22, 0xe0, 0xcc, 0x5b, 0xec, 0x0e, 0xa8, 0x24, 0xbb, 0xde, 0x98, 0x32, 0x1a, 0x11, 0x49, - 0x47, 0x28, 0x8c, 0xb8, 0xe4, 0xf0, 0x5e, 0x92, 0x8d, 0x48, 0x18, 0xa0, 0x2c, 0x1b, 0x99, 0xec, - 0xf6, 0x83, 0x71, 0x20, 0x27, 0xf1, 0x00, 0x0d, 0xf9, 0xdc, 0x1b, 0xf3, 0x31, 0xf7, 0x34, 0x68, - 0x10, 0x3f, 0xd7, 0x96, 0x36, 0xf4, 0x53, 0x42, 0xd6, 0xbe, 0x5f, 0x2c, 0x1d, 0xcb, 0x09, 0x65, - 0x32, 0x18, 0x12, 0x99, 0xd4, 0xdf, 0x2c, 0xdd, 0xfe, 0x34, 0xcf, 0x9e, 0x93, 0xe1, 0x24, 0x60, - 0x34, 0x5a, 0x7a, 0xe1, 0x74, 0xac, 0x1c, 0xc2, 0x9b, 0x53, 0x49, 0xae, 0x43, 0x79, 0x37, 0xa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, 0x0f, 0xd4, 0xcf, 0x48, 0xc4, 0x02, 0x36, 0x16, 0x4e, 0xad, 0x5b, 0x56, 0xfb, 0xad, - 0xd6, 0xe3, 0x5b, 0xe3, 0xc3, 0x59, 0xb4, 0xfd, 0x05, 0xf8, 0xe0, 0xda, 0x72, 0xb0, 0x05, 0xca, - 0x53, 0xba, 0x4c, 0x86, 0x8d, 0xd5, 0x23, 0xfc, 0x3f, 0xd8, 0x5a, 0x90, 0x59, 0x4c, 0xf5, 0xe0, - 0x6c, 0x9c, 0x18, 0x8f, 0x6e, 0xed, 0x5b, 0x3b, 0x7f, 0x5a, 0xa0, 0x59, 0xf8, 0x37, 0x16, 0x01, - 0x3d, 0x83, 0x7d, 0x50, 0x33, 0x47, 0x47, 0x73, 0x34, 0xf6, 0xd0, 0x1b, 0xcb, 0xa0, 0x51, 0x7e, - 0x43, 0xbd, 0x14, 0xe9, 0x45, 0x4c, 0xb9, 0xe0, 0x77, 0xfa, 0x43, 0xa4, 0x75, 0x32, 0x9f, 0x39, - 0xef, 0x2d, 0xe5, 0x4d, 0xa4, 0x48, 0x2d, 0x9c, 0xd1, 0xf9, 0xfe, 0xf9, 0x85, 0x5b, 0x7a, 0x71, - 0xe1, 0x96, 0x5e, 0x5e, 0xb8, 0xa5, 0x5f, 0xd6, 0xae, 0x75, 0xbe, 0x76, 0xad, 0x17, 0x6b, 0xd7, - 0x7a, 0xb9, 0x76, 0xad, 0xbf, 0xd6, 0xae, 0xf5, 0xdb, 0xdf, 0x6e, 0xe9, 0xfb, 0x7b, 0xaf, 0xfb, - 0x11, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x69, 0x3c, 0x61, 0x0b, 0x3c, 0x09, 0x00, 0x00, +var fileDescriptor_d8f147b43c61e73e = []byte{ + // 911 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b,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x29, 0x50, 0xd7, 0xa5, 0x70, + 0x4e, 0x87, 0x57, 0xb9, 0xe1, 0x0c, 0xd4, 0xad, 0xb9, 0xec, 0xf2, 0xf6, 0x3b, 0x4b, 0x72, 0x77, + 0x31, 0x6f, 0xd5, 0xf1, 0x65, 0x5a, 0xbc, 0x5e, 0x07, 0x7e, 0x03, 0xa0, 0x75, 0xad, 0x08, 0xe1, + 0xd5, 0x8d, 0x46, 0x4d, 0xab, 0x11, 0xc4, 0x57, 0x32, 0xf0, 0x35, 0x28, 0xd8, 0x06, 0x25, 0x4e, + 0xa6, 0xd4, 0xdb, 0x30, 0xe8, 0xe5, 0xd0, 0x1f, 0x93, 0x29, 0xc5, 0x26, 0x02, 0x03, 0xe0, 0xea, + 0xbf, 0x32, 0x22, 0x7d, 0xea, 0x95, 0x4d, 0xda, 0x1d, 0x9b, 0xe6, 0x3e, 0xce, 0x02, 0x38, 0xcf, + 0x81, 0x5f, 0x02, 0x57, 0x44, 0xfa, 0x55, 0x67, 0x82, 0x7b, 0x15, 0x03, 0xf0, 0x33, 0xc0, 0x51, + 0x16, 0xb8, 0x58, 0x35, 0x70, 0x0e, 0x80, 0x4f, 0x41, 0x35, 0x91, 0x34, 0x3e, 0xe4, 0xcf, 0x85, + 0x57, 0x35, 0x82, 0x7e, 0x82, 0x56, 0x6f, 0xc8, 0xa5, 0xb5, 0xd7, 0x42, 0x76, 0x6d, 0x76, 0xfe, + 0x3e, 0x65, 0x1e, 0xbc, 0x64, 0x82, 0x5d, 0x50, 0x16, 0xbd, 0x9f, 0x69, 0x5f, 0x79, 0xae, 0xe1, + 0x7c, 0x70, 0xe3, 0x90, 0xec, 0xd6, 0x22, 0x4c, 0x4e, 0x0f, 0x7e, 0x55, 0x94, 0xeb, 0xf9, 0x84, + 0xb7, 0x2d, 0x75, 0xf9, 0xc8, 0x90, 0x60, 0x4b, 0x06, 0x7f, 0x02, 0xae, 0x98, 0x0c, 0x52, 0xa7, + 0x07, 0xde, 0x86, 0x79, 0x29, 0xe5, 0x51, 0xc6, 0x83, 0x73, 0x4a, 0xb8, 0x05, 0xca, 0x83, 0x78, + 0x86, 0x13, 0xee, 0xd5, 0xda, 0x4e, 0xa7, 0x1a, 0x02, 0xdd, 0xc3, 0xbe, 0xf1, 0x60, 0x1b, 0x81, + 0xcf, 0x40, 0x45, 0x44, 0x5a, 0x0c, 0xe9, 0x6d, 0xbe, 0x4d, 0x07, 0x75, 0xdb, 0x41, 0xe5, 0x28, + 0x65, 0xc1, 0x19, 0xdd, 0xd6, 0x5f, 0x25, 0x70, 0x67, 0xe5, 0x42, 0xc9, 0x48, 0x70, 0x49, 0xdf, + 0xcb, 0x89, 0xfa, 0x14, 0x54, 0xc8, 0x64, 0x22, 0x4e, 0x69, 0x7a, 0xa5, 0xaa, 0x79, 0x13, 0x7b, + 0xa9, 0x1b, 0x67, 0x71, 0x78, 0x0c, 0xca, 0x52, 0x11, 0x95, 0x48, 0x7b, 0x71, 0xee, 0xbf, 0xde, + 0x7a, 0x3d, 0x31, 0x98, 0x54, 0x30, 0x4c, 0x65, 0x32, 0x51, 0xd8, 0xf2, 0xc0, 0x16, 0xd8, 0x88, + 0x88, 0xea, 0x8f, 0xcc, 0x55, 0xd9, 0x0c, 0xdd, 0xc5, 0xbc, 0xb5, 0x71, 0xac, 0x1d, 0x38, 0xf5, + 0xc3, 0x5d, 0xe0, 0x9a, 0x87, 0xa7, 0xb3, 0x28, 0x5b, 0x8c, 0xa6, 0x1e, 0xd1, 0x71, 0xe6, 0xbc, + 0x58, 0x35, 0x70, 0x9e, 0x0c, 0x7f, 0x77, 0x40, 0x83, 0x24, 0x03, 0xa6, 0xf6, 0x38, 0x17, 0x8a, + 0xa4, 0x53, 0x29, 0xb7, 0x8b, 0x9d, 0xda, 0xce, 0x01, 0x7a, 0xd5, 0x97, 0x10, 0x5d, 0xd1, 0x19, + 0xed, 0xad, 0xf1, 0x1c, 0x70, 0x15, 0xcf, 0x42, 0xcf, 0x0a, 0xd5, 0x58, 0x0f, 0xe3, 0x2b, 0x85, + 0x61, 0x07, 0x54, 0x4f, 0x49, 0xcc, 0x19, 0x1f, 0x4a, 0xaf, 0xd2, 0x2e, 0xea, 0xfd, 0xd6, 0xeb, + 0xf1, 0xbd, 0xf5, 0xe1, 0x65, 0xb4, 0xf9, 0x15, 0xf8, 0xe8, 0xda, 0x72, 0xb0, 0x01, 0x8a, 0x63, + 0x3a, 0x4b, 0x87, 0x8d, 0xf5, 0x23, 0xfc, 0x10, 0x6c, 0x9c, 0x90, 0x49, 0x42, 0xcd, 0xe0, 0x5c, + 0x9c, 0x1a, 0x8f, 0x6e, 0xed, 0x3a, 0x5b, 0x7f, 0x3b, 0xa0, 0xbe, 0xf2, 0x6f, 0x9c, 0x30, 0x7a, + 0x0a, 0xbb, 0xa0, 0x62, 0x8f, 0x8e, 0xe1, 0xa8, 0xed, 0xa0, 0xd7, 0x96, 0xc1, 0xa0, 0xc2, 0x9a, + 0x7e, 0x29, 0xb2, 0x8b, 0x98, 0x71, 0xc1, 0x1f, 0xcc, 0x87, 0xc8, 0xe8, 0x64, 0x3f, 0x73, 0xc1, + 0x1b, 0xca, 0x9b, 0x4a, 0x91, 0x59, 0x78, 0x49, 0x17, 0x86, 0x67, 0xe7, 0x7e, 0xe1, 0xc5, 0xb9, + 0x5f, 0x78, 0x79, 0xee, 0x17, 0x7e, 0x5b, 0xf8, 0xce, 0xd9, 0xc2, 0x77, 0x5e, 0x2c, 0x7c, 0xe7, + 0xe5, 0xc2, 0x77, 0xfe, 0x59, 0xf8, 0xce, 0x1f, 0xff, 0xfa, 0x85, 0x1f, 0xef, 0xbd, 0xea, 0x47, + 0xd0, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x6e, 0x31, 0x41, 0x23, 0x09, 0x00, 0x00, } func (m *AdmissionRequest) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go b/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go index 9a2d0bccdda..09295734dfe 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go +++ b/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1/generated.proto +// source: k8s.io/api/admissionregistration/v1/generated.proto package v1 @@ -25,6 +25,7 @@ import ( io "io" proto "github.com/gogo/protobuf/proto" + k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" @@ -44,10 +45,66 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } +func (*AuditAnnotation) ProtoMessage() {} +func (*AuditAnnotation) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{0} +} +func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AuditAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *AuditAnnotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_AuditAnnotation.Merge(m, src) +} +func (m *AuditAnnotation) XXX_Size() int { + return m.Size() +} +func (m *AuditAnnotation) XXX_DiscardUnknown() { + xxx_messageInfo_AuditAnnotation.DiscardUnknown(m) +} + +var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo + +func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } +func (*ExpressionWarning) ProtoMessage() {} +func (*ExpressionWarning) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{1} +} +func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExpressionWarning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ExpressionWarning) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExpressionWarning.Merge(m, src) +} +func (m *ExpressionWarning) XXX_Size() int { + return m.Size() +} +func (m *ExpressionWarning) XXX_DiscardUnknown() { + xxx_messageInfo_ExpressionWarning.DiscardUnknown(m) +} + +var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo + func (m *MatchCondition) Reset() { *m = MatchCondition{} } func (*MatchCondition) ProtoMessage() {} func (*MatchCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{0} + return fileDescriptor_3205c7dc5bf0c9bf, []int{2} } func (m *MatchCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -72,10 +129,38 @@ func (m *MatchCondition) XXX_DiscardUnknown() { var xxx_messageInfo_MatchCondition proto.InternalMessageInfo +func (m *MatchResources) Reset() { *m = MatchResources{} } +func (*MatchResources) ProtoMessage() {} +func (*MatchResources) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{3} +} +func (m *MatchResources) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MatchResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MatchResources) XXX_Merge(src proto.Message) { + xxx_messageInfo_MatchResources.Merge(m, src) +} +func (m *MatchResources) XXX_Size() int { + return m.Size() +} +func (m *MatchResources) XXX_DiscardUnknown() { + xxx_messageInfo_MatchResources.DiscardUnknown(m) +} + +var xxx_messageInfo_MatchResources proto.InternalMessageInfo + func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } func (*MutatingWebhook) ProtoMessage() {} func (*MutatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{1} + return fileDescriptor_3205c7dc5bf0c9bf, []int{4} } func (m *MutatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +188,7 @@ var xxx_messageInfo_MutatingWebhook proto.InternalMessageInfo func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} } func (*MutatingWebhookConfiguration) ProtoMessage() {} func (*MutatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{2} + return fileDescriptor_3205c7dc5bf0c9bf, []int{5} } func (m *MutatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +216,7 @@ var xxx_messageInfo_MutatingWebhookConfiguration proto.InternalMessageInfo func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} } func (*MutatingWebhookConfigurationList) ProtoMessage() {} func (*MutatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{3} + return fileDescriptor_3205c7dc5bf0c9bf, []int{6} } func (m *MutatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -156,10 +241,94 @@ func (m *MutatingWebhookConfigurationList) XXX_DiscardUnknown() { var xxx_messageInfo_MutatingWebhookConfigurationList proto.InternalMessageInfo +func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } +func (*NamedRuleWithOperations) ProtoMessage() {} +func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{7} +} +func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedRuleWithOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedRuleWithOperations) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedRuleWithOperations.Merge(m, src) +} +func (m *NamedRuleWithOperations) XXX_Size() int { + return m.Size() +} +func (m *NamedRuleWithOperations) XXX_DiscardUnknown() { + xxx_messageInfo_NamedRuleWithOperations.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo + +func (m *ParamKind) Reset() { *m = ParamKind{} } +func (*ParamKind) ProtoMessage() {} +func (*ParamKind) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{8} +} +func (m *ParamKind) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParamKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ParamKind) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParamKind.Merge(m, src) +} +func (m *ParamKind) XXX_Size() int { + return m.Size() +} +func (m *ParamKind) XXX_DiscardUnknown() { + xxx_messageInfo_ParamKind.DiscardUnknown(m) +} + +var xxx_messageInfo_ParamKind proto.InternalMessageInfo + +func (m *ParamRef) Reset() { *m = ParamRef{} } +func (*ParamRef) ProtoMessage() {} +func (*ParamRef) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{9} +} +func (m *ParamRef) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParamRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ParamRef) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParamRef.Merge(m, src) +} +func (m *ParamRef) XXX_Size() int { + return m.Size() +} +func (m *ParamRef) XXX_DiscardUnknown() { + xxx_messageInfo_ParamRef.DiscardUnknown(m) +} + +var xxx_messageInfo_ParamRef proto.InternalMessageInfo + func (m *Rule) Reset() { *m = Rule{} } func (*Rule) ProtoMessage() {} func (*Rule) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{4} + return fileDescriptor_3205c7dc5bf0c9bf, []int{10} } func (m *Rule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +356,7 @@ var xxx_messageInfo_Rule proto.InternalMessageInfo func (m *RuleWithOperations) Reset() { *m = RuleWithOperations{} } func (*RuleWithOperations) ProtoMessage() {} func (*RuleWithOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{5} + return fileDescriptor_3205c7dc5bf0c9bf, []int{11} } func (m *RuleWithOperations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +384,7 @@ var xxx_messageInfo_RuleWithOperations proto.InternalMessageInfo func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{6} + return fileDescriptor_3205c7dc5bf0c9bf, []int{12} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -240,10 +409,234 @@ func (m *ServiceReference) XXX_DiscardUnknown() { var xxx_messageInfo_ServiceReference proto.InternalMessageInfo +func (m *TypeChecking) Reset() { *m = TypeChecking{} } +func (*TypeChecking) ProtoMessage() {} +func (*TypeChecking) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{13} +} +func (m *TypeChecking) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TypeChecking) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *TypeChecking) XXX_Merge(src proto.Message) { + xxx_messageInfo_TypeChecking.Merge(m, src) +} +func (m *TypeChecking) XXX_Size() int { + return m.Size() +} +func (m *TypeChecking) XXX_DiscardUnknown() { + xxx_messageInfo_TypeChecking.DiscardUnknown(m) +} + +var xxx_messageInfo_TypeChecking proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } +func (*ValidatingAdmissionPolicy) ProtoMessage() {} +func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{14} +} +func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicy.Merge(m, src) +} +func (m *ValidatingAdmissionPolicy) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } +func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} +func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{15} +} +func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicyBinding.Merge(m, src) +} +func (m *ValidatingAdmissionPolicyBinding) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicyBinding) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicyBinding.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } +func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} +func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{16} +} +func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicyBindingList.Merge(m, src) +} +func (m *ValidatingAdmissionPolicyBindingList) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicyBindingList.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } +func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} +func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{17} +} +func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.Merge(m, src) +} +func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } +func (*ValidatingAdmissionPolicyList) ProtoMessage() {} +func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{18} +} +func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicyList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicyList.Merge(m, src) +} +func (m *ValidatingAdmissionPolicyList) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicyList) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicyList.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } +func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} +func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{19} +} +func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicySpec.Merge(m, src) +} +func (m *ValidatingAdmissionPolicySpec) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicySpec) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicySpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo + +func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } +func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} +func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{20} +} +func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatingAdmissionPolicyStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ValidatingAdmissionPolicyStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatingAdmissionPolicyStatus.Merge(m, src) +} +func (m *ValidatingAdmissionPolicyStatus) XXX_Size() int { + return m.Size() +} +func (m *ValidatingAdmissionPolicyStatus) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatingAdmissionPolicyStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo + func (m *ValidatingWebhook) Reset() { *m = ValidatingWebhook{} } func (*ValidatingWebhook) ProtoMessage() {} func (*ValidatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{7} + return fileDescriptor_3205c7dc5bf0c9bf, []int{21} } func (m *ValidatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +664,7 @@ var xxx_messageInfo_ValidatingWebhook proto.InternalMessageInfo func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} } func (*ValidatingWebhookConfiguration) ProtoMessage() {} func (*ValidatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{8} + return fileDescriptor_3205c7dc5bf0c9bf, []int{22} } func (m *ValidatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +692,7 @@ var xxx_messageInfo_ValidatingWebhookConfiguration proto.InternalMessageInfo func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} } func (*ValidatingWebhookConfigurationList) ProtoMessage() {} func (*ValidatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{9} + return fileDescriptor_3205c7dc5bf0c9bf, []int{23} } func (m *ValidatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -324,10 +717,66 @@ func (m *ValidatingWebhookConfigurationList) XXX_DiscardUnknown() { var xxx_messageInfo_ValidatingWebhookConfigurationList proto.InternalMessageInfo +func (m *Validation) Reset() { *m = Validation{} } +func (*Validation) ProtoMessage() {} +func (*Validation) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{24} +} +func (m *Validation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Validation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Validation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Validation.Merge(m, src) +} +func (m *Validation) XXX_Size() int { + return m.Size() +} +func (m *Validation) XXX_DiscardUnknown() { + xxx_messageInfo_Validation.DiscardUnknown(m) +} + +var xxx_messageInfo_Validation proto.InternalMessageInfo + +func (m *Variable) Reset() { *m = Variable{} } +func (*Variable) ProtoMessage() {} +func (*Variable) Descriptor() ([]byte, []int) { + return fileDescriptor_3205c7dc5bf0c9bf, []int{25} +} +func (m *Variable) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Variable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Variable) XXX_Merge(src proto.Message) { + xxx_messageInfo_Variable.Merge(m, src) +} +func (m *Variable) XXX_Size() int { + return m.Size() +} +func (m *Variable) XXX_DiscardUnknown() { + xxx_messageInfo_Variable.DiscardUnknown(m) +} + +var xxx_messageInfo_Variable proto.InternalMessageInfo + func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_aaac5994f79683e8, []int{10} + return fileDescriptor_3205c7dc5bf0c9bf, []int{26} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -353,99 +802,237 @@ func (m *WebhookClientConfig) XXX_DiscardUnknown() { var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo func init() { + proto.RegisterType((*AuditAnnotation)(nil), "k8s.io.api.admissionregistration.v1.AuditAnnotation") + proto.RegisterType((*ExpressionWarning)(nil), "k8s.io.api.admissionregistration.v1.ExpressionWarning") proto.RegisterType((*MatchCondition)(nil), "k8s.io.api.admissionregistration.v1.MatchCondition") + proto.RegisterType((*MatchResources)(nil), "k8s.io.api.admissionregistration.v1.MatchResources") proto.RegisterType((*MutatingWebhook)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhook") proto.RegisterType((*MutatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhookConfiguration") proto.RegisterType((*MutatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhookConfigurationList") + proto.RegisterType((*NamedRuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1.NamedRuleWithOperations") + proto.RegisterType((*ParamKind)(nil), "k8s.io.api.admissionregistration.v1.ParamKind") + proto.RegisterType((*ParamRef)(nil), "k8s.io.api.admissionregistration.v1.ParamRef") proto.RegisterType((*Rule)(nil), "k8s.io.api.admissionregistration.v1.Rule") proto.RegisterType((*RuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1.RuleWithOperations") proto.RegisterType((*ServiceReference)(nil), "k8s.io.api.admissionregistration.v1.ServiceReference") + proto.RegisterType((*TypeChecking)(nil), "k8s.io.api.admissionregistration.v1.TypeChecking") + proto.RegisterType((*ValidatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicy") + proto.RegisterType((*ValidatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding") + proto.RegisterType((*ValidatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingList") + proto.RegisterType((*ValidatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec") + proto.RegisterType((*ValidatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyList") + proto.RegisterType((*ValidatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicySpec") + proto.RegisterType((*ValidatingAdmissionPolicyStatus)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyStatus") proto.RegisterType((*ValidatingWebhook)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhook") proto.RegisterType((*ValidatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhookConfiguration") proto.RegisterType((*ValidatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhookConfigurationList") + proto.RegisterType((*Validation)(nil), "k8s.io.api.admissionregistration.v1.Validation") + proto.RegisterType((*Variable)(nil), "k8s.io.api.admissionregistration.v1.Variable") proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.api.admissionregistration.v1.WebhookClientConfig") } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1/generated.proto", fileDescriptor_aaac5994f79683e8) -} - -var fileDescriptor_aaac5994f79683e8 = []byte{ - // 1169 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xce, 0xc6, 0x36, 0xb1, 0xc7, 0x4e, 0xd2, 0x0c, 0xd0, 0x2e, 0xa5, 0xf2, 0x5a, 0xae, 0x84, - 0x82, 0x00, 0x6f, 0x9b, 0x96, 0x52, 0x71, 0x41, 0xb1, 0x29, 0x28, 0x22, 0x69, 0xa3, 0x49, 0x3f, - 0x10, 0xea, 0xa1, 0xe3, 0xf5, 0xd8, 0x1e, 0x62, 0xef, 0xac, 0x66, 0x66, 0x4d, 0x7b, 0xe3, 0x27, - 0xf0, 0x17, 0xe0, 0x4f, 0xc0, 0x95, 0x5b, 0x8f, 0xbd, 0x91, 0x03, 0x5a, 0x91, 0xe5, 0xc2, 0x81, - 0x5f, 0x90, 0x13, 0x9a, 0xd9, 0xf5, 0xae, 0xbf, 0x12, 0x56, 0x39, 0xe4, 0x94, 0x5b, 0xe6, 0x79, - 0xdf, 0xf7, 0x79, 0xe7, 0x19, 0xbf, 0x1f, 0xab, 0x80, 0xdd, 0xc3, 0xfb, 0xa2, 0x41, 0x99, 0x7d, - 0xe8, 0xb7, 0x09, 0x77, 0x89, 0x24, 0xc2, 0x1e, 0x11, 0xb7, 0xc3, 0xb8, 0x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, 0x3f, 0xbd, 0xb2, - 0x5b, 0xe7, 0xd3, 0x96, 0x65, 0x69, 0xff, 0x66, 0x80, 0xb7, 0x17, 0xcc, 0x4d, 0xf8, 0x1e, 0xc8, - 0xf9, 0x7c, 0x10, 0x8f, 0xfe, 0x95, 0x30, 0xb0, 0x72, 0x4f, 0xd0, 0x2e, 0x52, 0x18, 0x7c, 0x0e, - 0x56, 0x44, 0xb4, 0x7d, 0x62, 0xe5, 0x9f, 0x66, 0xba, 0xde, 0xec, 0xc6, 0x6a, 0x96, 0xc3, 0xc0, - 0x5a, 0x19, 0xa3, 0x63, 0x4a, 0xb8, 0x09, 0x8a, 0x0e, 0x6e, 0xfa, 0x6e, 0x27, 0xde, 0x96, 0x95, - 0x66, 0x45, 0x3d, 0x52, 0x6b, 0x3b, 0xc2, 0x50, 0x62, 0x6d, 0xee, 0xbc, 0x3e, 0xae, 0x2e, 0xbd, - 0x39, 0xae, 0x2e, 0x1d, 0x1d, 0x57, 0x97, 0x7e, 0x0c, 0xab, 0xc6, 0xeb, 0xb0, 0x6a, 0xbc, 0x09, - 0xab, 0xc6, 0x51, 0x58, 0x35, 0xfe, 0x0a, 0xab, 0xc6, 0x4f, 0x7f, 0x57, 0x97, 0xbe, 0xbb, 0x99, - 0xe1, 0xbf, 0x04, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xe1, 0x3a, 0x73, 0x64, 0x10, 0x00, - 0x00, + proto.RegisterFile("k8s.io/api/admissionregistration/v1/generated.proto", fileDescriptor_3205c7dc5bf0c9bf) +} + +var fileDescriptor_3205c7dc5bf0c9bf = []byte{ + // 2075 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xf7, 0x8a, 0x94, 0x44, 0x3e, 0xea, 0x8b, 0x13, 0x27, 0xa2, 0x1d, 0x87, 0x2b, 0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b8, 0x96, 0x90, 0x52, 0xfe, 0x54, 0x16, 0x86, + 0x30, 0xa1, 0x96, 0xe7, 0x68, 0x84, 0xa2, 0x47, 0x50, 0x67, 0x70, 0xd4, 0x56, 0x35, 0xb2, 0x4b, + 0x06, 0x44, 0x73, 0x2d, 0x87, 0x5b, 0xad, 0x5d, 0xbb, 0xde, 0x8a, 0x93, 0x2d, 0xda, 0xb1, 0x96, + 0x7d, 0xd8, 0x63, 0x04, 0xda, 0x62, 0x89, 0xd1, 0x1a, 0xad, 0xb7, 0xee, 0xa9, 0x07, 0x64, 0x10, + 0xaa, 0x76, 0xde, 0x1c, 0xfb, 0x72, 0xfd, 0x7e, 0x16, 0x11, 0x4f, 0x1a, 0x41, 0x16, 0x2c, 0x59, + 0x07, 0x5f, 0x11, 0xcd, 0x8d, 0xcc, 0xce, 0x9c, 0xde, 0x2c, 0x1a, 0xfb, 0xf2, 0xd2, 0x83, 0x14, + 0x1c, 0xce, 0xc0, 0xa3, 0x23, 0x58, 0x74, 0x84, 0xdf, 0xd8, 0x1b, 0x10, 0xda, 0x28, 0xad, 0x95, + 0x2e, 0xd7, 0xae, 0x7d, 0xb7, 0x55, 0xe0, 0x4c, 0xb5, 0x98, 0x4b, 0x3a, 0x53, 0xdb, 0x37, 0xdc, + 0xfe, 0x03, 0x9b, 0x04, 0x1c, 0xda, 0x79, 0x53, 0x84, 0x7c, 0x11, 0x27, 0xa1, 0x71, 0xda, 0x12, + 0xfa, 0x85, 0x04, 0xe7, 0xc9, 0x23, 0x6d, 0xe0, 0xe9, 0x24, 0x25, 0xd7, 0x28, 0xbf, 0x84, 0x25, + 0x5c, 0x12, 0x4b, 0x38, 0x7f, 0x2b, 0xc7, 0x02, 0xce, 0xb5, 0x8b, 0x6e, 0x42, 0x6d, 0xc8, 0x12, + 0x61, 0xc7, 0x1a, 0x18, 0xda, 0x51, 0x63, 0x9e, 0xa7, 0x8f, 0x32, 0xf6, 0xe5, 0xda, 0x76, 0x4c, + 0x3e, 0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7, 0x4d, 0xe9, 0x9b, 0x71, 0x53, 0x7a, 0x32, 0x6e, 0x4a, 0x7f, 0x1b, + 0x37, 0xa5, 0x5f, 0xfe, 0xbd, 0x79, 0xee, 0x07, 0xef, 0x16, 0xf8, 0x6f, 0x8c, 0xff, 0x05, 0x00, + 0x00, 0xff, 0xff, 0x1e, 0x59, 0xab, 0xd9, 0xb3, 0x21, 0x00, 0x00, +} + +func (m *AuditAnnotation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AuditAnnotation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AuditAnnotation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.ValueExpression) + copy(dAtA[i:], m.ValueExpression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ValueExpression))) + i-- + dAtA[i] = 0x12 + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ExpressionWarning) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExpressionWarning) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExpressionWarning) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Warning) + copy(dAtA[i:], m.Warning) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Warning))) + i-- + dAtA[i] = 0x1a + i -= len(m.FieldRef) + copy(dAtA[i:], m.FieldRef) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldRef))) + i-- + dAtA[i] = 0x12 + return len(dAtA) - i, nil } func (m *MatchCondition) Marshal() (dAtA []byte, err error) { @@ -481,6 +1068,88 @@ func (m *MatchCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MatchResources) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MatchResources) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MatchResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MatchPolicy != nil { + i -= len(*m.MatchPolicy) + copy(dAtA[i:], *m.MatchPolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchPolicy))) + i-- + dAtA[i] = 0x3a + } + if len(m.ExcludeResourceRules) > 0 { + for iNdEx := len(m.ExcludeResourceRules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExcludeResourceRules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.ResourceRules) > 0 { + for iNdEx := len(m.ResourceRules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ResourceRules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.ObjectSelector != nil { + { + size, err := m.ObjectSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.NamespaceSelector != nil { + { + size, err := m.NamespaceSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *MutatingWebhook) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -707,6 +1376,133 @@ func (m *MutatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *NamedRuleWithOperations) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NamedRuleWithOperations) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamedRuleWithOperations) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.RuleWithOperations.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.ResourceNames) > 0 { + for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ResourceNames[iNdEx]) + copy(dAtA[i:], m.ResourceNames[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceNames[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ParamKind) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParamKind) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamKind) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Kind) + copy(dAtA[i:], m.Kind) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i-- + dAtA[i] = 0x12 + i -= len(m.APIVersion) + copy(dAtA[i:], m.APIVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ParamRef) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParamRef) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamRef) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ParameterNotFoundAction != nil { + i -= len(*m.ParameterNotFoundAction) + copy(dAtA[i:], *m.ParameterNotFoundAction) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ParameterNotFoundAction))) + i-- + dAtA[i] = 0x22 + } + if m.Selector != nil { + { + size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *Rule) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -851,7 +1647,7 @@ func (m *ServiceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ValidatingWebhook) Marshal() (dAtA []byte, err error) { +func (m *TypeChecking) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -861,20 +1657,20 @@ func (m *ValidatingWebhook) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ValidatingWebhook) MarshalTo(dAtA []byte) (int, error) { +func (m *TypeChecking) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TypeChecking) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.MatchConditions) > 0 { - for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- { + if len(m.ExpressionWarnings) > 0 { + for iNdEx := len(m.ExpressionWarnings) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ExpressionWarnings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -882,84 +1678,87 @@ func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x5a - } - } - if m.ObjectSelector != nil { - { - size, err := m.ObjectSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x52 } - if m.MatchPolicy != nil { - i -= len(*m.MatchPolicy) - copy(dAtA[i:], *m.MatchPolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchPolicy))) - i-- - dAtA[i] = 0x4a + return len(dAtA) - i, nil +} + +func (m *ValidatingAdmissionPolicy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.AdmissionReviewVersions) > 0 { - for iNdEx := len(m.AdmissionReviewVersions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AdmissionReviewVersions[iNdEx]) - copy(dAtA[i:], m.AdmissionReviewVersions[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AdmissionReviewVersions[iNdEx]))) - i-- - dAtA[i] = 0x42 + return dAtA[:n], nil +} + +func (m *ValidatingAdmissionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - if m.TimeoutSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds)) - i-- - dAtA[i] = 0x38 - } - if m.SideEffects != nil { - i -= len(*m.SideEffects) - copy(dAtA[i:], *m.SideEffects) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SideEffects))) - i-- - dAtA[i] = 0x32 - } - if m.NamespaceSelector != nil { - { - size, err := m.NamespaceSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a - } - if m.FailurePolicy != nil { - i -= len(*m.FailurePolicy) - copy(dAtA[i:], *m.FailurePolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy))) - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - if len(m.Rules) > 0 { - for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ValidatingAdmissionPolicyBinding) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ValidatingAdmissionPolicyBinding) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicyBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l { - size, err := m.ClientConfig.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -968,15 +1767,20 @@ func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ValidatingWebhookConfiguration) Marshal() (dAtA []byte, err error) { +func (m *ValidatingAdmissionPolicyBindingList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -986,20 +1790,20 @@ func (m *ValidatingWebhookConfiguration) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ValidatingWebhookConfiguration) MarshalTo(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicyBindingList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicyBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Webhooks) > 0 { - for iNdEx := len(m.Webhooks) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Webhooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1011,7 +1815,7 @@ func (m *ValidatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, } } { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1023,7 +1827,7 @@ func (m *ValidatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *ValidatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) { +func (m *ValidatingAdmissionPolicyBindingSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1033,12 +1837,73 @@ func (m *ValidatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *ValidatingWebhookConfigurationList) MarshalTo(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicyBindingSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicyBindingSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidationActions) > 0 { + for iNdEx := len(m.ValidationActions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ValidationActions[iNdEx]) + copy(dAtA[i:], m.ValidationActions[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ValidationActions[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if m.MatchResources != nil { + { + size, err := m.MatchResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.ParamRef != nil { + { + size, err := m.ParamRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.PolicyName) + copy(dAtA[i:], m.PolicyName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.PolicyName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ValidatingAdmissionPolicyList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatingAdmissionPolicyList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1070,7 +1935,7 @@ func (m *ValidatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } -func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) { +func (m *ValidatingAdmissionPolicySpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1080,33 +1945,94 @@ func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *WebhookClientConfig) MarshalTo(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicySpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *WebhookClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ValidatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.URL != nil { - i -= len(*m.URL) - copy(dAtA[i:], *m.URL) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.URL))) + if len(m.Variables) > 0 { + for iNdEx := len(m.Variables) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Variables[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.MatchConditions) > 0 { + for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.AuditAnnotations) > 0 { + for iNdEx := len(m.AuditAnnotations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AuditAnnotations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if m.FailurePolicy != nil { + i -= len(*m.FailurePolicy) + copy(dAtA[i:], *m.FailurePolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } - if m.CABundle != nil { - i -= len(m.CABundle) - copy(dAtA[i:], m.CABundle) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) + if len(m.Validations) > 0 { + for iNdEx := len(m.Validations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Validations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.MatchConstraints != nil { + { + size, err := m.MatchConstraints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } - if m.Service != nil { + if m.ParamKind != nil { { - size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ParamKind.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1119,191 +2045,488 @@ func (m *WebhookClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *ValidatingAdmissionPolicyStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MatchCondition) Size() (n int) { - if m == nil { - return 0 - } + +func (m *ValidatingAdmissionPolicyStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicyStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Expression) - n += 1 + l + sovGenerated(uint64(l)) - return n + if len(m.Conditions) > 0 { + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.TypeChecking != nil { + { + size, err := m.TypeChecking.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil } -func (m *MutatingWebhook) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingWebhook) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ValidatingWebhook) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingWebhook) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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 len(m.MatchConditions) > 0 { + for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a } } - if m.FailurePolicy != nil { - l = len(*m.FailurePolicy) - n += 1 + l + sovGenerated(uint64(l)) + if m.ObjectSelector != nil { + { + size, err := m.ObjectSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 } - if m.NamespaceSelector != nil { - l = m.NamespaceSelector.Size() - n += 1 + l + sovGenerated(uint64(l)) + if m.MatchPolicy != nil { + i -= len(*m.MatchPolicy) + copy(dAtA[i:], *m.MatchPolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchPolicy))) + i-- + dAtA[i] = 0x4a } - if m.SideEffects != nil { - l = len(*m.SideEffects) - n += 1 + l + sovGenerated(uint64(l)) + if len(m.AdmissionReviewVersions) > 0 { + for iNdEx := len(m.AdmissionReviewVersions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AdmissionReviewVersions[iNdEx]) + copy(dAtA[i:], m.AdmissionReviewVersions[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.AdmissionReviewVersions[iNdEx]))) + i-- + dAtA[i] = 0x42 + } } if m.TimeoutSeconds != nil { - n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) + i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds)) + i-- + dAtA[i] = 0x38 } - if len(m.AdmissionReviewVersions) > 0 { - for _, s := range m.AdmissionReviewVersions { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + if m.SideEffects != nil { + i -= len(*m.SideEffects) + copy(dAtA[i:], *m.SideEffects) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SideEffects))) + i-- + dAtA[i] = 0x32 } - if m.MatchPolicy != nil { - l = len(*m.MatchPolicy) - n += 1 + l + sovGenerated(uint64(l)) + if m.NamespaceSelector != nil { + { + size, err := m.NamespaceSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } - if m.ReinvocationPolicy != nil { - l = len(*m.ReinvocationPolicy) - n += 1 + l + sovGenerated(uint64(l)) + if m.FailurePolicy != nil { + i -= len(*m.FailurePolicy) + copy(dAtA[i:], *m.FailurePolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy))) + i-- + dAtA[i] = 0x22 } - if m.ObjectSelector != nil { - l = m.ObjectSelector.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } - if len(m.MatchConditions) > 0 { - for _, e := range m.MatchConditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + { + size, err := m.ClientConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *MutatingWebhookConfiguration) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingWebhookConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ValidatingWebhookConfiguration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingWebhookConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Webhooks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Webhooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *MutatingWebhookConfigurationList) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingWebhookConfigurationList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ValidatingWebhookConfigurationList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingWebhookConfigurationList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *Rule) Size() (n int) { - if m == nil { - return 0 +func (m *Validation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *Validation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Validation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.APIGroups) > 0 { - for _, s := range m.APIGroups { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + i -= len(m.MessageExpression) + copy(dAtA[i:], m.MessageExpression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.MessageExpression))) + i-- + dAtA[i] = 0x22 + if m.Reason != nil { + i -= len(*m.Reason) + copy(dAtA[i:], *m.Reason) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Reason))) + i-- + dAtA[i] = 0x1a } - if len(m.APIVersions) > 0 { - for _, s := range m.APIVersions { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Variable) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.Resources) > 0 { - for _, s := range m.Resources { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) + return dAtA[:n], nil +} + +func (m *Variable) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Variable) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WebhookClientConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WebhookClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.URL != nil { + i -= len(*m.URL) + copy(dAtA[i:], *m.URL) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.URL))) + i-- + dAtA[i] = 0x1a + } + if m.CABundle != nil { + i -= len(m.CABundle) + copy(dAtA[i:], m.CABundle) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) + i-- + dAtA[i] = 0x12 + } + if m.Service != nil { + { + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - if m.Scope != nil { - l = len(*m.Scope) - n += 1 + l + sovGenerated(uint64(l)) + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AuditAnnotation) Size() (n int) { + if m == nil { + return 0 } + var l int + _ = l + l = len(m.Key) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ValueExpression) + n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *RuleWithOperations) Size() (n int) { +func (m *ExpressionWarning) Size() (n int) { if m == nil { return 0 } 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() + l = len(m.FieldRef) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Warning) n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *ServiceReference) Size() (n int) { +func (m *MatchCondition) Size() (n int) { if m == nil { return 0 } 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) + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *MatchResources) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NamespaceSelector != nil { + l = m.NamespaceSelector.Size() n += 1 + l + sovGenerated(uint64(l)) } - if m.Port != nil { - n += 1 + sovGenerated(uint64(*m.Port)) + if m.ObjectSelector != nil { + l = m.ObjectSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.ResourceRules) > 0 { + for _, e := range m.ResourceRules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ExcludeResourceRules) > 0 { + for _, e := range m.ExcludeResourceRules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.MatchPolicy != nil { + l = len(*m.MatchPolicy) + n += 1 + l + sovGenerated(uint64(l)) } return n } -func (m *ValidatingWebhook) Size() (n int) { +func (m *MutatingWebhook) Size() (n int) { if m == nil { return 0 } @@ -1344,6 +2567,10 @@ func (m *ValidatingWebhook) Size() (n int) { l = len(*m.MatchPolicy) n += 1 + l + sovGenerated(uint64(l)) } + if m.ReinvocationPolicy != nil { + l = len(*m.ReinvocationPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } if m.ObjectSelector != nil { l = m.ObjectSelector.Size() n += 1 + l + sovGenerated(uint64(l)) @@ -1357,7 +2584,7 @@ func (m *ValidatingWebhook) Size() (n int) { return n } -func (m *ValidatingWebhookConfiguration) Size() (n int) { +func (m *MutatingWebhookConfiguration) Size() (n int) { if m == nil { return 0 } @@ -1374,7 +2601,7 @@ func (m *ValidatingWebhookConfiguration) Size() (n int) { return n } -func (m *ValidatingWebhookConfigurationList) Size() (n int) { +func (m *MutatingWebhookConfigurationList) Size() (n int) { if m == nil { return 0 } @@ -1391,227 +2618,2818 @@ func (m *ValidatingWebhookConfigurationList) Size() (n int) { return n } -func (m *WebhookClientConfig) Size() (n int) { +func (m *NamedRuleWithOperations) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Service != nil { - l = m.Service.Size() - 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 m.CABundle != nil { - l = len(m.CABundle) + l = m.RuleWithOperations.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ParamKind) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ParamRef) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + if m.Selector != nil { + l = m.Selector.Size() n += 1 + l + sovGenerated(uint64(l)) } - if m.URL != nil { - l = len(*m.URL) + if m.ParameterNotFoundAction != nil { + l = len(*m.ParameterNotFoundAction) n += 1 + l + sovGenerated(uint64(l)) } return n } -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *MatchCondition) String() string { - if this == nil { - return "nil" +func (m *Rule) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&MatchCondition{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, - `}`, - }, "") - return s -} -func (this *MutatingWebhook) String() string { - if this == nil { - return "nil" + var l int + _ = l + if len(m.APIGroups) > 0 { + for _, s := range m.APIGroups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForRules := "[]RuleWithOperations{" - for _, f := range this.Rules { - repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + "," + if len(m.APIVersions) > 0 { + for _, s := range m.APIVersions { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForRules += "}" - repeatedStringForMatchConditions := "[]MatchCondition{" - for _, f := range this.MatchConditions { - repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + if len(m.Resources) > 0 { + for _, s := range m.Resources { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForMatchConditions += "}" - s := strings.Join([]string{`&MutatingWebhook{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`, - `Rules:` + repeatedStringForRules + `,`, - `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, - `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`, - `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, - `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`, - `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, - `ReinvocationPolicy:` + valueToStringGenerated(this.ReinvocationPolicy) + `,`, - `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `MatchConditions:` + repeatedStringForMatchConditions + `,`, - `}`, - }, "") - return s + if m.Scope != nil { + l = len(*m.Scope) + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (this *MutatingWebhookConfiguration) String() string { - if this == nil { - return "nil" + +func (m *RuleWithOperations) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForWebhooks := "[]MutatingWebhook{" - for _, f := range this.Webhooks { - repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "MutatingWebhook", "MutatingWebhook", 1), `&`, ``, 1) + "," + var l int + _ = l + if len(m.Operations) > 0 { + for _, s := range m.Operations { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForWebhooks += "}" - s := strings.Join([]string{`&MutatingWebhookConfiguration{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Webhooks:` + repeatedStringForWebhooks + `,`, - `}`, - }, "") - return s + l = m.Rule.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *MutatingWebhookConfigurationList) String() string { - if this == nil { - return "nil" + +func (m *ServiceReference) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForItems := "[]MutatingWebhookConfiguration{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "MutatingWebhookConfiguration", "MutatingWebhookConfiguration", 1), `&`, ``, 1) + "," + 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)) } - repeatedStringForItems += "}" - s := strings.Join([]string{`&MutatingWebhookConfigurationList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *Rule) String() string { - if this == nil { - return "nil" + if m.Port != nil { + n += 1 + sovGenerated(uint64(*m.Port)) } - s := strings.Join([]string{`&Rule{`, - `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`, - `APIVersions:` + fmt.Sprintf("%v", this.APIVersions) + `,`, - `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, - `Scope:` + valueToStringGenerated(this.Scope) + `,`, - `}`, - }, "") - return s + return n } -func (this *RuleWithOperations) String() string { - if this == nil { - return "nil" + +func (m *TypeChecking) Size() (n int) { + if m == nil { + return 0 } - 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 + var l int + _ = l + if len(m.ExpressionWarnings) > 0 { + for _, e := range m.ExpressionWarnings { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (this *ServiceReference) String() string { - if this == nil { - return "nil" + +func (m *ValidatingAdmissionPolicy) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ServiceReference{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Path:` + valueToStringGenerated(this.Path) + `,`, - `Port:` + valueToStringGenerated(this.Port) + `,`, - `}`, - }, "") - return s + 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 (this *ValidatingWebhook) String() string { - if this == nil { - return "nil" + +func (m *ValidatingAdmissionPolicyBinding) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForRules := "[]RuleWithOperations{" - for _, f := range this.Rules { - repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + "," + 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 *ValidatingAdmissionPolicyBindingList) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForRules += "}" - repeatedStringForMatchConditions := "[]MatchCondition{" - for _, f := range this.MatchConditions { - repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + 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)) + } } - repeatedStringForMatchConditions += "}" - s := strings.Join([]string{`&ValidatingWebhook{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`, - `Rules:` + repeatedStringForRules + `,`, - `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, - `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`, - `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, - `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`, - `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, - `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `MatchConditions:` + repeatedStringForMatchConditions + `,`, - `}`, - }, "") - return s + return n } -func (this *ValidatingWebhookConfiguration) String() string { - if this == nil { - return "nil" + +func (m *ValidatingAdmissionPolicyBindingSpec) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForWebhooks := "[]ValidatingWebhook{" - for _, f := range this.Webhooks { - repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "ValidatingWebhook", "ValidatingWebhook", 1), `&`, ``, 1) + "," + var l int + _ = l + l = len(m.PolicyName) + n += 1 + l + sovGenerated(uint64(l)) + if m.ParamRef != nil { + l = m.ParamRef.Size() + n += 1 + l + sovGenerated(uint64(l)) } - repeatedStringForWebhooks += "}" - s := strings.Join([]string{`&ValidatingWebhookConfiguration{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Webhooks:` + repeatedStringForWebhooks + `,`, - `}`, - }, "") - return s -} -func (this *ValidatingWebhookConfigurationList) String() string { - if this == nil { - return "nil" + if m.MatchResources != nil { + l = m.MatchResources.Size() + n += 1 + l + sovGenerated(uint64(l)) } - repeatedStringForItems := "[]ValidatingWebhookConfiguration{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingWebhookConfiguration", "ValidatingWebhookConfiguration", 1), `&`, ``, 1) + "," + if len(m.ValidationActions) > 0 { + for _, s := range m.ValidationActions { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ValidatingWebhookConfigurationList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, + return n +} + +func (m *ValidatingAdmissionPolicyList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ValidatingAdmissionPolicySpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ParamKind != nil { + l = m.ParamKind.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.MatchConstraints != nil { + l = m.MatchConstraints.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Validations) > 0 { + for _, e := range m.Validations { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.FailurePolicy != nil { + l = len(*m.FailurePolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.AuditAnnotations) > 0 { + for _, e := range m.AuditAnnotations { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.MatchConditions) > 0 { + for _, e := range m.MatchConditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Variables) > 0 { + for _, e := range m.Variables { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ValidatingAdmissionPolicyStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovGenerated(uint64(m.ObservedGeneration)) + if m.TypeChecking != nil { + l = m.TypeChecking.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 *ValidatingWebhook) Size() (n int) { + if m == nil { + return 0 + } + 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)) + } + if m.SideEffects != nil { + l = len(*m.SideEffects) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.TimeoutSeconds != nil { + n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) + } + if len(m.AdmissionReviewVersions) > 0 { + for _, s := range m.AdmissionReviewVersions { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.MatchPolicy != nil { + l = len(*m.MatchPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ObjectSelector != nil { + l = m.ObjectSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.MatchConditions) > 0 { + for _, e := range m.MatchConditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ValidatingWebhookConfiguration) Size() (n int) { + if m == nil { + return 0 + } + 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) { + if m == nil { + return 0 + } + 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 *Validation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + if m.Reason != nil { + l = len(*m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.MessageExpression) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Variable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *WebhookClientConfig) Size() (n int) { + if m == nil { + return 0 + } + 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) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *AuditAnnotation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AuditAnnotation{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `ValueExpression:` + fmt.Sprintf("%v", this.ValueExpression) + `,`, `}`, }, "") return s } -func (this *WebhookClientConfig) String() string { +func (this *ExpressionWarning) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExpressionWarning{`, + `FieldRef:` + fmt.Sprintf("%v", this.FieldRef) + `,`, + `Warning:` + fmt.Sprintf("%v", this.Warning) + `,`, + `}`, + }, "") + return s +} +func (this *MatchCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MatchCondition{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `}`, + }, "") + return s +} +func (this *MatchResources) String() string { + if this == nil { + return "nil" + } + repeatedStringForResourceRules := "[]NamedRuleWithOperations{" + for _, f := range this.ResourceRules { + repeatedStringForResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + "," + } + repeatedStringForResourceRules += "}" + repeatedStringForExcludeResourceRules := "[]NamedRuleWithOperations{" + for _, f := range this.ExcludeResourceRules { + repeatedStringForExcludeResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + "," + } + repeatedStringForExcludeResourceRules += "}" + s := strings.Join([]string{`&MatchResources{`, + `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `ResourceRules:` + repeatedStringForResourceRules + `,`, + `ExcludeResourceRules:` + repeatedStringForExcludeResourceRules + `,`, + `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, + `}`, + }, "") + return s +} +func (this *MutatingWebhook) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&WebhookClientConfig{`, - `Service:` + strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1) + `,`, - `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, - `URL:` + valueToStringGenerated(this.URL) + `,`, - `}`, - }, "") - return s + repeatedStringForRules := "[]RuleWithOperations{" + for _, f := range this.Rules { + repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + "," + } + repeatedStringForRules += "}" + repeatedStringForMatchConditions := "[]MatchCondition{" + for _, f := range this.MatchConditions { + repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForMatchConditions += "}" + s := strings.Join([]string{`&MutatingWebhook{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`, + `Rules:` + repeatedStringForRules + `,`, + `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, + `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`, + `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, + `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`, + `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, + `ReinvocationPolicy:` + valueToStringGenerated(this.ReinvocationPolicy) + `,`, + `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `MatchConditions:` + repeatedStringForMatchConditions + `,`, + `}`, + }, "") + return s +} +func (this *MutatingWebhookConfiguration) String() string { + if this == nil { + return "nil" + } + repeatedStringForWebhooks := "[]MutatingWebhook{" + for _, f := range this.Webhooks { + repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "MutatingWebhook", "MutatingWebhook", 1), `&`, ``, 1) + "," + } + repeatedStringForWebhooks += "}" + s := strings.Join([]string{`&MutatingWebhookConfiguration{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Webhooks:` + repeatedStringForWebhooks + `,`, + `}`, + }, "") + return s +} +func (this *MutatingWebhookConfigurationList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]MutatingWebhookConfiguration{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "MutatingWebhookConfiguration", "MutatingWebhookConfiguration", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&MutatingWebhookConfigurationList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *NamedRuleWithOperations) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedRuleWithOperations{`, + `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, + `RuleWithOperations:` + strings.Replace(strings.Replace(this.RuleWithOperations.String(), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ParamKind) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ParamKind{`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `}`, + }, "") + return s +} +func (this *ParamRef) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ParamRef{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `ParameterNotFoundAction:` + valueToStringGenerated(this.ParameterNotFoundAction) + `,`, + `}`, + }, "") + 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) + `,`, + `Scope:` + valueToStringGenerated(this.Scope) + `,`, + `}`, + }, "") + 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) + `,`, + `Port:` + valueToStringGenerated(this.Port) + `,`, + `}`, + }, "") + return s +} +func (this *TypeChecking) String() string { + if this == nil { + return "nil" + } + repeatedStringForExpressionWarnings := "[]ExpressionWarning{" + for _, f := range this.ExpressionWarnings { + repeatedStringForExpressionWarnings += strings.Replace(strings.Replace(f.String(), "ExpressionWarning", "ExpressionWarning", 1), `&`, ``, 1) + "," + } + repeatedStringForExpressionWarnings += "}" + s := strings.Join([]string{`&TypeChecking{`, + `ExpressionWarnings:` + repeatedStringForExpressionWarnings + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidatingAdmissionPolicy{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicySpec", "ValidatingAdmissionPolicySpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ValidatingAdmissionPolicyStatus", "ValidatingAdmissionPolicyStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyBinding) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidatingAdmissionPolicyBinding{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicyBindingSpec", "ValidatingAdmissionPolicyBindingSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyBindingList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ValidatingAdmissionPolicyBinding{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicyBinding", "ValidatingAdmissionPolicyBinding", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyBindingSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingSpec{`, + `PolicyName:` + fmt.Sprintf("%v", this.PolicyName) + `,`, + `ParamRef:` + strings.Replace(this.ParamRef.String(), "ParamRef", "ParamRef", 1) + `,`, + `MatchResources:` + strings.Replace(this.MatchResources.String(), "MatchResources", "MatchResources", 1) + `,`, + `ValidationActions:` + fmt.Sprintf("%v", this.ValidationActions) + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ValidatingAdmissionPolicy{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicy", "ValidatingAdmissionPolicy", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicyList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicySpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForValidations := "[]Validation{" + for _, f := range this.Validations { + repeatedStringForValidations += strings.Replace(strings.Replace(f.String(), "Validation", "Validation", 1), `&`, ``, 1) + "," + } + repeatedStringForValidations += "}" + repeatedStringForAuditAnnotations := "[]AuditAnnotation{" + for _, f := range this.AuditAnnotations { + repeatedStringForAuditAnnotations += strings.Replace(strings.Replace(f.String(), "AuditAnnotation", "AuditAnnotation", 1), `&`, ``, 1) + "," + } + repeatedStringForAuditAnnotations += "}" + repeatedStringForMatchConditions := "[]MatchCondition{" + for _, f := range this.MatchConditions { + repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForMatchConditions += "}" + repeatedStringForVariables := "[]Variable{" + for _, f := range this.Variables { + repeatedStringForVariables += strings.Replace(strings.Replace(f.String(), "Variable", "Variable", 1), `&`, ``, 1) + "," + } + repeatedStringForVariables += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicySpec{`, + `ParamKind:` + strings.Replace(this.ParamKind.String(), "ParamKind", "ParamKind", 1) + `,`, + `MatchConstraints:` + strings.Replace(this.MatchConstraints.String(), "MatchResources", "MatchResources", 1) + `,`, + `Validations:` + repeatedStringForValidations + `,`, + `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, + `AuditAnnotations:` + repeatedStringForAuditAnnotations + `,`, + `MatchConditions:` + repeatedStringForMatchConditions + `,`, + `Variables:` + repeatedStringForVariables + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForConditions := "[]Condition{" + for _, f := range this.Conditions { + repeatedStringForConditions += fmt.Sprintf("%v", f) + "," + } + repeatedStringForConditions += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicyStatus{`, + `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, + `TypeChecking:` + strings.Replace(this.TypeChecking.String(), "TypeChecking", "TypeChecking", 1) + `,`, + `Conditions:` + repeatedStringForConditions + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingWebhook) String() string { + if this == nil { + return "nil" + } + repeatedStringForRules := "[]RuleWithOperations{" + for _, f := range this.Rules { + repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + "," + } + repeatedStringForRules += "}" + repeatedStringForMatchConditions := "[]MatchCondition{" + for _, f := range this.MatchConditions { + repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForMatchConditions += "}" + s := strings.Join([]string{`&ValidatingWebhook{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`, + `Rules:` + repeatedStringForRules + `,`, + `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, + `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`, + `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, + `AdmissionReviewVersions:` + fmt.Sprintf("%v", this.AdmissionReviewVersions) + `,`, + `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, + `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `MatchConditions:` + repeatedStringForMatchConditions + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingWebhookConfiguration) String() string { + if this == nil { + return "nil" + } + repeatedStringForWebhooks := "[]ValidatingWebhook{" + for _, f := range this.Webhooks { + repeatedStringForWebhooks += strings.Replace(strings.Replace(f.String(), "ValidatingWebhook", "ValidatingWebhook", 1), `&`, ``, 1) + "," + } + repeatedStringForWebhooks += "}" + s := strings.Join([]string{`&ValidatingWebhookConfiguration{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Webhooks:` + repeatedStringForWebhooks + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingWebhookConfigurationList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ValidatingWebhookConfiguration{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingWebhookConfiguration", "ValidatingWebhookConfiguration", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ValidatingWebhookConfigurationList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *Validation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Validation{`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `Reason:` + valueToStringGenerated(this.Reason) + `,`, + `MessageExpression:` + fmt.Sprintf("%v", this.MessageExpression) + `,`, + `}`, + }, "") + return s +} +func (this *Variable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Variable{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `}`, + }, "") + return s +} +func (this *WebhookClientConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WebhookClientConfig{`, + `Service:` + strings.Replace(this.Service.String(), "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 *AuditAnnotation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuditAnnotation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuditAnnotation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValueExpression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValueExpression = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExpressionWarning) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExpressionWarning: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExpressionWarning: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldRef = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warning", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warning = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MatchCondition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MatchCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MatchCondition: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Expression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Expression = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MatchResources) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MatchResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MatchResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NamespaceSelector == nil { + m.NamespaceSelector = &v1.LabelSelector{} + } + if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectSelector == nil { + m.ObjectSelector = &v1.LabelSelector{} + } + if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceRules = append(m.ResourceRules, NamedRuleWithOperations{}) + if err := m.ResourceRules[len(m.ResourceRules)-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 ExcludeResourceRules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExcludeResourceRules = append(m.ExcludeResourceRules, NamedRuleWithOperations{}) + if err := m.ExcludeResourceRules[len(m.ExcludeResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := MatchPolicyType(dAtA[iNdEx:postIndex]) + m.MatchPolicy = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MutatingWebhook: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MutatingWebhook: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NamespaceSelector == nil { + m.NamespaceSelector = &v1.LabelSelector{} + } + if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SideEffects", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := SideEffectClass(dAtA[iNdEx:postIndex]) + m.SideEffects = &s + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", 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.TimeoutSeconds = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdmissionReviewVersions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AdmissionReviewVersions = append(m.AdmissionReviewVersions, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := MatchPolicyType(dAtA[iNdEx:postIndex]) + m.MatchPolicy = &s + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReinvocationPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := ReinvocationPolicyType(dAtA[iNdEx:postIndex]) + m.ReinvocationPolicy = &s + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectSelector == nil { + m.ObjectSelector = &v1.LabelSelector{} + } + if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchConditions = append(m.MatchConditions, MatchCondition{}) + if err := m.MatchConditions[len(m.MatchConditions)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Webhooks = append(m.Webhooks, MutatingWebhook{}) + 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) || (iNdEx+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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedRuleWithOperations) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedRuleWithOperations: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedRuleWithOperations: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuleWithOperations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RuleWithOperations.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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParamKind) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParamKind: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamKind: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParamRef) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParamRef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamRef: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Selector == nil { + m.Selector = &v1.LabelSelector{} + } + if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParameterNotFoundAction", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := ParameterNotFoundActionType(dAtA[iNdEx:postIndex]) + m.ParameterNotFoundAction = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Scope", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := ScopeType(dAtA[iNdEx:postIndex]) + m.Scope = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *MatchCondition) Unmarshal(dAtA []byte) error { +func (m *ServiceReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1634,13 +5452,45 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MatchCondition: wiretype end group for non-group") + return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MatchCondition: illegal tag %d (wire type %d)", fieldNum, wire) + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) } @@ -1667,16 +5517,119 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error { if postIndex < 0 { return ErrInvalidLengthGenerated } - if postIndex > l { + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Path = &s + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", 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.Port = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TypeChecking) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TypeChecking: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TypeChecking: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExpressionWarnings", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1686,23 +5639,25 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Expression = string(dAtA[iNdEx:postIndex]) + m.ExpressionWarnings = append(m.ExpressionWarnings, ExpressionWarning{}) + if err := m.ExpressionWarnings[len(m.ExpressionWarnings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -1725,7 +5680,7 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error { } return nil } -func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { +func (m *ValidatingAdmissionPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1748,17 +5703,17 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MutatingWebhook: wiretype end group for non-group") + return fmt.Errorf("proto: ValidatingAdmissionPolicy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MutatingWebhook: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidatingAdmissionPolicy: 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) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1768,27 +5723,28 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + 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 ClientConfig", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1815,13 +5771,13 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ClientConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + 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 Rules", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1848,47 +5804,63 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { 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 { + if err := m.Status.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 - } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatingAdmissionPolicyBinding) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - s := FailurePolicyType(dAtA[iNdEx:postIndex]) - m.FailurePolicy = &s - iNdEx = postIndex - case 5: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatingAdmissionPolicyBinding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatingAdmissionPolicyBinding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1915,71 +5887,15 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.NamespaceSelector == nil { - m.NamespaceSelector = &v1.LabelSelector{} - } - if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SideEffects", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := SideEffectClass(dAtA[iNdEx:postIndex]) - m.SideEffects = &s - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", 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.TimeoutSeconds = &v - case 8: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdmissionReviewVersions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1989,93 +5905,78 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.AdmissionReviewVersions = append(m.AdmissionReviewVersions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - s := MatchPolicyType(dAtA[iNdEx:postIndex]) - m.MatchPolicy = &s iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReinvocationPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatingAdmissionPolicyBindingList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - s := ReinvocationPolicyType(dAtA[iNdEx:postIndex]) - m.ReinvocationPolicy = &s - iNdEx = postIndex - case 11: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatingAdmissionPolicyBindingList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatingAdmissionPolicyBindingList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2102,16 +6003,13 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ObjectSelector == nil { - m.ObjectSelector = &v1.LabelSelector{} - } - if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 12: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2138,8 +6036,8 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MatchConditions = append(m.MatchConditions, MatchCondition{}) - if err := m.MatchConditions[len(m.MatchConditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, ValidatingAdmissionPolicyBinding{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2164,7 +6062,7 @@ func (m *MutatingWebhook) Unmarshal(dAtA []byte) error { } return nil } -func (m *MutatingWebhookConfiguration) Unmarshal(dAtA []byte) error { +func (m *ValidatingAdmissionPolicyBindingSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2187,15 +6085,47 @@ func (m *MutatingWebhookConfiguration) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MutatingWebhookConfiguration: wiretype end group for non-group") + return fmt.Errorf("proto: ValidatingAdmissionPolicyBindingSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MutatingWebhookConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidatingAdmissionPolicyBindingSpec: 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) + return fmt.Errorf("proto: wrong wireType = %d for field PolicyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PolicyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParamRef", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2222,13 +6152,16 @@ func (m *MutatingWebhookConfiguration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.ParamRef == nil { + m.ParamRef = &ParamRef{} + } + if err := m.ParamRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Webhooks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchResources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2255,11 +6188,45 @@ func (m *MutatingWebhookConfiguration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Webhooks = append(m.Webhooks, MutatingWebhook{}) - if err := m.Webhooks[len(m.Webhooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.MatchResources == nil { + m.MatchResources = &MatchResources{} + } + if err := m.MatchResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidationActions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidationActions = append(m.ValidationActions, ValidationAction(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2281,7 +6248,7 @@ func (m *MutatingWebhookConfiguration) Unmarshal(dAtA []byte) error { } return nil } -func (m *MutatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { +func (m *ValidatingAdmissionPolicyList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2304,10 +6271,10 @@ func (m *MutatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MutatingWebhookConfigurationList: wiretype end group for non-group") + return fmt.Errorf("proto: ValidatingAdmissionPolicyList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MutatingWebhookConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidatingAdmissionPolicyList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2372,7 +6339,7 @@ func (m *MutatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, MutatingWebhookConfiguration{}) + m.Items = append(m.Items, ValidatingAdmissionPolicy{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2398,7 +6365,7 @@ func (m *MutatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { } return nil } -func (m *Rule) Unmarshal(dAtA []byte) error { +func (m *ValidatingAdmissionPolicySpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2421,17 +6388,17 @@ func (m *Rule) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Rule: wiretype end group for non-group") + return fmt.Errorf("proto: ValidatingAdmissionPolicySpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Rule: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidatingAdmissionPolicySpec: 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) + return fmt.Errorf("proto: wrong wireType = %d for field ParamKind", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2441,29 +6408,33 @@ func (m *Rule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex])) + if m.ParamKind == nil { + m.ParamKind = &ParamKind{} + } + if err := m.ParamKind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIVersions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchConstraints", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2473,29 +6444,33 @@ func (m *Rule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.APIVersions = append(m.APIVersions, string(dAtA[iNdEx:postIndex])) + if m.MatchConstraints == nil { + m.MatchConstraints = &MatchResources{} + } + if err := m.MatchConstraints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Validations", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2505,27 +6480,29 @@ func (m *Rule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex])) + m.Validations = append(m.Validations, Validation{}) + if err := m.Validations[len(m.Validations)-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 Scope", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2553,64 +6530,48 @@ func (m *Rule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := ScopeType(dAtA[iNdEx:postIndex]) - m.Scope = &s + s := FailurePolicyType(dAtA[iNdEx:postIndex]) + m.FailurePolicy = &s iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+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 + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuditAnnotations", wireType) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if msglen < 0 { + return ErrInvalidLengthGenerated } - } - 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: + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AuditAnnotations = append(m.AuditAnnotations, AuditAnnotation{}) + if err := m.AuditAnnotations[len(m.AuditAnnotations)-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 Operations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2620,27 +6581,29 @@ func (m *RuleWithOperations) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Operations = append(m.Operations, OperationType(dAtA[iNdEx:postIndex])) + m.MatchConditions = append(m.MatchConditions, MatchCondition{}) + if err := m.MatchConditions[len(m.MatchConditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Variables", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2667,7 +6630,8 @@ func (m *RuleWithOperations) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Rule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Variables = append(m.Variables, Variable{}) + if err := m.Variables[len(m.Variables)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2692,7 +6656,7 @@ func (m *RuleWithOperations) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceReference) Unmarshal(dAtA []byte) error { +func (m *ValidatingAdmissionPolicyStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2715,17 +6679,17 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group") + return fmt.Errorf("proto: ValidatingAdmissionPolicyStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ValidatingAdmissionPolicyStatus: 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) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) } - var stringLen uint64 + m.ObservedGeneration = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2735,29 +6699,16 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.ObservedGeneration |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - 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) + return fmt.Errorf("proto: wrong wireType = %d for field TypeChecking", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2767,29 +6718,33 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if m.TypeChecking == nil { + m.TypeChecking = &TypeChecking{} + } + if err := m.TypeChecking.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2799,45 +6754,26 @@ func (m *ServiceReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.Path = &s - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", 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.Conditions = append(m.Conditions, v1.Condition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Port = &v + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3108,12 +7044,197 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { break } } - m.TimeoutSeconds = &v - case 8: + m.TimeoutSeconds = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdmissionReviewVersions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AdmissionReviewVersions = append(m.AdmissionReviewVersions, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := MatchPolicyType(dAtA[iNdEx:postIndex]) + m.MatchPolicy = &s + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectSelector == nil { + m.ObjectSelector = &v1.LabelSelector{} + } + if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchConditions = append(m.MatchConditions, MatchCondition{}) + if err := m.MatchConditions[len(m.MatchConditions)-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) || (iNdEx+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 AdmissionReviewVersions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3123,29 +7244,30 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.AdmissionReviewVersions = append(m.AdmissionReviewVersions, string(dAtA[iNdEx:postIndex])) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 9: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Webhooks", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3155,28 +7277,79 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := MatchPolicyType(dAtA[iNdEx:postIndex]) - m.MatchPolicy = &s + m.Webhooks = append(m.Webhooks, ValidatingWebhook{}) + if err := m.Webhooks[len(m.Webhooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 10: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 ObjectSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3203,16 +7376,13 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ObjectSelector == nil { - m.ObjectSelector = &v1.LabelSelector{} - } - if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 11: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3239,8 +7409,8 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MatchConditions = append(m.MatchConditions, MatchCondition{}) - if err := m.MatchConditions[len(m.MatchConditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, ValidatingWebhookConfiguration{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3265,7 +7435,7 @@ func (m *ValidatingWebhook) Unmarshal(dAtA []byte) error { } return nil } -func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error { +func (m *Validation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3288,17 +7458,17 @@ func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ValidatingWebhookConfiguration: wiretype end group for non-group") + return fmt.Errorf("proto: Validation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatingWebhookConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Validation: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3308,30 +7478,29 @@ func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Expression = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Webhooks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3341,25 +7510,88 @@ func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Webhooks = append(m.Webhooks, ValidatingWebhook{}) - if err := m.Webhooks[len(m.Webhooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF } + s := k8s_io_apimachinery_pkg_apis_meta_v1.StatusReason(dAtA[iNdEx:postIndex]) + m.Reason = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MessageExpression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MessageExpression = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3382,7 +7614,7 @@ func (m *ValidatingWebhookConfiguration) Unmarshal(dAtA []byte) error { } return nil } -func (m *ValidatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { +func (m *Variable) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3405,17 +7637,17 @@ func (m *ValidatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ValidatingWebhookConfigurationList: wiretype end group for non-group") + return fmt.Errorf("proto: Variable: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatingWebhookConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Variable: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3425,30 +7657,29 @@ func (m *ValidatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3458,25 +7689,23 @@ func (m *ValidatingWebhookConfigurationList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } 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 - } + m.Expression = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/vendor/k8s.io/api/admissionregistration/v1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1/generated.proto index a8903621c8e..44589007a23 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/generated.proto +++ b/vendor/k8s.io/api/admissionregistration/v1/generated.proto @@ -28,6 +28,56 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". option go_package = "k8s.io/api/admissionregistration/v1"; +// AuditAnnotation describes how to produce an audit annotation for an API request. +message AuditAnnotation { + // key specifies the audit annotation key. The audit annotation keys of + // a ValidatingAdmissionPolicy must be unique. The key must be a qualified + // name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. + // + // The key is combined with the resource name of the + // ValidatingAdmissionPolicy to construct an audit annotation key: + // "{ValidatingAdmissionPolicy name}/{key}". + // + // If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy + // and the same audit annotation key, the annotation key will be identical. + // In this case, the first annotation written with the key will be included + // in the audit event and all subsequent annotations with the same key + // will be discarded. + // + // Required. + optional string key = 1; + + // valueExpression represents the expression which is evaluated by CEL to + // produce an audit annotation value. The expression must evaluate to either + // a string or null value. If the expression evaluates to a string, the + // audit annotation is included with the string value. If the expression + // evaluates to null or empty string the audit annotation will be omitted. + // The valueExpression may be no longer than 5kb in length. + // If the result of the valueExpression is more than 10kb in length, it + // will be truncated to 10kb. + // + // If multiple ValidatingAdmissionPolicyBinding resources match an + // API request, then the valueExpression will be evaluated for + // each binding. All unique values produced by the valueExpressions + // will be joined together in a comma-separated list. + // + // Required. + optional string valueExpression = 2; +} + +// ExpressionWarning is a warning information that targets a specific expression. +message ExpressionWarning { + // The path to the field that refers the expression. + // For example, the reference to the expression of the first item of + // validations is "spec.validations[0].expression" + optional string fieldRef = 2; + + // The content of type checking information in a human-readable form. + // Each line of the warning contains the type that the expression is checked + // against, followed by the type check error from the compiler. + optional string warning = 3; +} + // MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook. message MatchCondition { // Name is an identifier for this match condition, used for strategic merging of MatchConditions, @@ -57,6 +107,101 @@ message MatchCondition { optional string expression = 2; } +// MatchResources decides whether to run the admission control policy on an object based +// on whether it meets the match criteria. +// The exclude rules take precedence over include rules (if a resource matches both, it is excluded) +// +structType=atomic +message MatchResources { + // NamespaceSelector decides whether to run the admission control policy 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 policy. + // + // 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 policy 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 = 1; + + // ObjectSelector decides whether to run the validation based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the cel validation, and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector objectSelector = 2; + + // ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. + // The policy cares about an operation if it matches _any_ Rule. + // +listType=atomic + // +optional + repeated NamedRuleWithOperations resourceRules = 3; + + // ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. + // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) + // +listType=atomic + // +optional + repeated NamedRuleWithOperations excludeResourceRules = 4; + + // matchPolicy defines how the "MatchResources" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. + // + // Defaults to "Equivalent" + // +optional + optional string matchPolicy = 7; +} + // MutatingWebhook describes an admission webhook and the resources and operations it applies to. message MutatingWebhook { // The name of the admission webhook. @@ -76,6 +221,7 @@ message MutatingWebhook { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic repeated RuleWithOperations rules = 3; // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -183,6 +329,7 @@ message MutatingWebhook { // If a persisted webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail // and be subject to the failure policy. + // +listType=atomic repeated string admissionReviewVersions = 8; // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. @@ -215,13 +362,10 @@ message MutatingWebhook { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional repeated MatchCondition matchConditions = 12; } @@ -236,6 +380,8 @@ message MutatingWebhookConfiguration { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated MutatingWebhook Webhooks = 2; } @@ -250,6 +396,88 @@ message MutatingWebhookConfigurationList { repeated MutatingWebhookConfiguration items = 2; } +// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. +// +structType=atomic +message NamedRuleWithOperations { + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +listType=atomic + // +optional + repeated string resourceNames = 1; + + // RuleWithOperations is a tuple of Operations and Resources. + optional RuleWithOperations ruleWithOperations = 2; +} + +// ParamKind is a tuple of Group Kind and Version. +// +structType=atomic +message ParamKind { + // APIVersion is the API group version the resources belong to. + // In format of "group/version". + // Required. + optional string apiVersion = 1; + + // Kind is the API kind the resources belong to. + // Required. + optional string kind = 2; +} + +// ParamRef describes how to locate the params to be used as input to +// expressions of rules applied by a policy binding. +// +structType=atomic +message ParamRef { + // name is the name of the resource being referenced. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + // + // A single parameter used for all admission requests can be configured + // by setting the `name` field, leaving `selector` blank, and setting namespace + // if `paramKind` is namespace-scoped. + optional string name = 1; + + // namespace is the namespace of the referenced resource. Allows limiting + // the search for params to a specific namespace. Applies to both `name` and + // `selector` fields. + // + // A per-namespace parameter may be used by specifying a namespace-scoped + // `paramKind` in the policy and leaving this field empty. + // + // - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this + // field results in a configuration error. + // + // - If `paramKind` is namespace-scoped, the namespace of the object being + // evaluated for admission will be used when this field is left unset. Take + // care that if this is left empty the binding must not match any cluster-scoped + // resources, which will result in an error. + // + // +optional + optional string namespace = 2; + + // selector can be used to match multiple param objects based on their labels. + // Supply selector: {} to match all resources of the ParamKind. + // + // If multiple params are found, they are all evaluated with the policy expressions + // and the results are ANDed together. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + // + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 3; + + // `parameterNotFoundAction` controls the behavior of the binding when the resource + // exists, and name or selector is valid, but there are no parameters + // matched by the binding. If the value is set to `Allow`, then no + // matched parameters will be treated as successful validation by the binding. + // If set to `Deny`, then no matched parameters will be subject to the + // `failurePolicy` of the policy. + // + // Allowed values are `Allow` or `Deny` + // + // Required + optional string parameterNotFoundAction = 4; +} + // Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended // to make sure that all the tuple expansions are valid. message Rule { @@ -333,6 +561,248 @@ message ServiceReference { optional int32 port = 4; } +// TypeChecking contains results of type checking the expressions in the +// ValidatingAdmissionPolicy +message TypeChecking { + // The type checking warnings for each expression. + // +optional + // +listType=atomic + repeated ExpressionWarning expressionWarnings = 1; +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 +// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. +message ValidatingAdmissionPolicy { + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the ValidatingAdmissionPolicy. + optional ValidatingAdmissionPolicySpec spec = 2; + + // The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy + // behaves in the expected way. + // Populated by the system. + // Read-only. + // +optional + optional ValidatingAdmissionPolicyStatus status = 3; +} + +// ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. +// ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. +// +// For a given admission request, each binding will cause its policy to be +// evaluated N times, where N is 1 for policies/bindings that don't use +// params, otherwise N is the number of parameters selected by the binding. +// +// The CEL expressions of a policy must have a computed CEL cost below the maximum +// CEL budget. Each evaluation of the policy is given an independent CEL cost budget. +// Adding/removing policies, bindings, or params can not affect whether a +// given (policy, binding, param) combination is within its own CEL budget. +message ValidatingAdmissionPolicyBinding { + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. + optional ValidatingAdmissionPolicyBindingSpec spec = 2; +} + +// ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. +message ValidatingAdmissionPolicyBindingList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // List of PolicyBinding. + repeated ValidatingAdmissionPolicyBinding items = 2; +} + +// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. +message ValidatingAdmissionPolicyBindingSpec { + // PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. + // If the referenced resource does not exist, this binding is considered invalid and will be ignored + // Required. + optional string policyName = 1; + + // paramRef specifies the parameter resource used to configure the admission control policy. + // It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. + // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. + // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + // +optional + optional ParamRef paramRef = 2; + + // MatchResources declares what resources match this binding and will be validated by it. + // Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. + // If this is unset, all resources matched by the policy are validated by this binding + // When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. + // Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required. + // +optional + optional MatchResources matchResources = 3; + + // validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. + // If a validation evaluates to false it is always enforced according to these actions. + // + // Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according + // to these actions only if the FailurePolicy is set to Fail, otherwise the failures are + // ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. + // + // validationActions is declared as a set of action values. Order does + // not matter. validationActions may not contain duplicates of the same action. + // + // The supported actions values are: + // + // "Deny" specifies that a validation failure results in a denied request. + // + // "Warn" specifies that a validation failure is reported to the request client + // in HTTP Warning headers, with a warning code of 299. Warnings can be sent + // both for allowed or denied admission responses. + // + // "Audit" specifies that a validation failure is included in the published + // audit event for the request. The audit event will contain a + // `validation.policy.admission.k8s.io/validation_failure` audit annotation + // with a value containing the details of the validation failures, formatted as + // a JSON list of objects, each with the following fields: + // - message: The validation failure message string + // - policy: The resource name of the ValidatingAdmissionPolicy + // - binding: The resource name of the ValidatingAdmissionPolicyBinding + // - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy + // - validationActions: The enforcement actions enacted for the validation failure + // Example audit annotation: + // `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"` + // + // Clients should expect to handle additional values by ignoring + // any values not recognized. + // + // "Deny" and "Warn" may not be used together since this combination + // needlessly duplicates the validation failure both in the + // API response body and the HTTP warning headers. + // + // Required. + // +listType=set + repeated string validationActions = 4; +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 +// ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. +message ValidatingAdmissionPolicyList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // List of ValidatingAdmissionPolicy. + repeated ValidatingAdmissionPolicy items = 2; +} + +// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. +message ValidatingAdmissionPolicySpec { + // ParamKind specifies the kind of resources used to parameterize this policy. + // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. + // If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. + // If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null. + // +optional + optional ParamKind paramKind = 1; + + // MatchConstraints specifies what resources this policy is designed to validate. + // The AdmissionPolicy cares about a request if it matches _all_ Constraints. + // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API + // ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. + // Required. + optional MatchResources matchConstraints = 2; + + // Validations contain CEL expressions which is used to apply the validation. + // Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is + // required. + // +listType=atomic + // +optional + repeated Validation validations = 3; + + // failurePolicy defines how to handle failures for the admission policy. Failures can + // occur from CEL expression parse errors, type check errors, runtime errors and invalid + // or mis-configured policy definitions or bindings. + // + // A policy is invalid if spec.paramKind refers to a non-existent Kind. + // A binding is invalid if spec.paramRef.name refers to a non-existent resource. + // + // failurePolicy does not define how validations that evaluate to false are handled. + // + // When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions + // define how failures are enforced. + // + // Allowed values are Ignore or Fail. Defaults to Fail. + // +optional + optional string failurePolicy = 4; + + // auditAnnotations contains CEL expressions which are used to produce audit + // annotations for the audit event of the API request. + // validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is + // required. + // +listType=atomic + // +optional + repeated AuditAnnotation auditAnnotations = 5; + + // MatchConditions is a list of conditions that must be met for a request to be validated. + // Match conditions filter requests that have already been matched by the rules, + // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // If a parameter object is provided, it can be accessed via the `params` handle in the same + // manner as validation expressions. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the policy is skipped + // + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + repeated MatchCondition matchConditions = 6; + + // Variables contain definitions of variables that can be used in composition of other expressions. + // Each variable is defined as a named CEL expression. + // The variables defined here will be available under `variables` in other expressions of the policy + // except MatchConditions because MatchConditions are evaluated before the rest of the policy. + // + // The expression of a variable can refer to other variables defined earlier in the list but not those after. + // Thus, Variables must be sorted by the order of first appearance and acyclic. + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + repeated Variable variables = 7; +} + +// ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. +message ValidatingAdmissionPolicyStatus { + // The generation observed by the controller. + // +optional + optional int64 observedGeneration = 1; + + // The results of type checking for each expression. + // Presence of this field indicates the completion of the type checking. + // +optional + optional TypeChecking typeChecking = 2; + + // The conditions represent the latest available observations of a policy's current state. + // +optional + // +listType=map + // +listMapKey=type + repeated k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 3; +} + // ValidatingWebhook describes an admission webhook and the resources and operations it applies to. message ValidatingWebhook { // The name of the admission webhook. @@ -352,6 +822,7 @@ message ValidatingWebhook { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic repeated RuleWithOperations rules = 3; // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -459,6 +930,7 @@ message ValidatingWebhook { // If a persisted webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail // and be subject to the failure policy. + // +listType=atomic repeated string admissionReviewVersions = 8; // MatchConditions is a list of conditions that must be met for a request to be sent to this @@ -473,13 +945,10 @@ message ValidatingWebhook { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional repeated MatchCondition matchConditions = 11; } @@ -494,6 +963,8 @@ message ValidatingWebhookConfiguration { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated ValidatingWebhook Webhooks = 2; } @@ -508,6 +979,97 @@ message ValidatingWebhookConfigurationList { repeated ValidatingWebhookConfiguration items = 2; } +// Validation specifies the CEL expression which is used to apply the validation. +message Validation { + // Expression represents the expression which will be evaluated by CEL. + // ref: https://github.com/google/cel-spec + // CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object. No other metadata properties are accessible. + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Accessible property names are escaped according to the following rules when accessed in the expression: + // - '__' escapes to '__underscores__' + // - '.' escapes to '__dot__' + // - '-' escapes to '__dash__' + // - '/' escapes to '__slash__' + // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: + // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", + // "import", "let", "loop", "package", "namespace", "return". + // Examples: + // - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"} + // - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"} + // - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"} + // + // Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. + // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: + // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and + // non-intersecting elements in `Y` are appended, retaining their partial order. + // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values + // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with + // non-intersecting keys are appended, retaining their partial order. + // Required. + optional string Expression = 1; + + // Message represents the message displayed when validation fails. The message is required if the Expression contains + // line breaks. The message must not contain line breaks. + // If unset, the message is "failed rule: {Rule}". + // e.g. "must be a URL with the host matching spec.host" + // If the Expression contains line breaks. Message is required. + // The message must not contain line breaks. + // If unset, the message is "failed Expression: {Expression}". + // +optional + optional string message = 2; + + // Reason represents a machine-readable description of why this validation failed. + // If this is the first validation in the list to fail, this reason, as well as the + // corresponding HTTP response code, are used in the + // HTTP response to the client. + // The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". + // If not set, StatusReasonInvalid is used in the response to the client. + // +optional + optional string reason = 3; + + // messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + // Since messageExpression is used as a failure message, it must evaluate to a string. + // If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. + // If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced + // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string + // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and + // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. + // messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. + // Example: + // "object.x must be less than max ("+string(params.max)+")" + // +optional + optional string messageExpression = 4; +} + +// Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. +// +structType=atomic +message Variable { + // Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. + // The variable can be accessed in other expressions through `variables` + // For example, if name is "foo", the variable will be available as `variables.foo` + optional string Name = 1; + + // Expression is the expression that will be evaluated as the value of the variable. + // The CEL expression has access to the same identifiers as the CEL expressions in Validation. + optional string Expression = 2; +} + // WebhookClientConfig contains the information to make a TLS // connection with the webhook message WebhookClientConfig { diff --git a/vendor/k8s.io/api/admissionregistration/v1/register.go b/vendor/k8s.io/api/admissionregistration/v1/register.go index e42a8bce3be..da74379ce2e 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/register.go +++ b/vendor/k8s.io/api/admissionregistration/v1/register.go @@ -50,6 +50,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ValidatingWebhookConfigurationList{}, &MutatingWebhookConfiguration{}, &MutatingWebhookConfigurationList{}, + &ValidatingAdmissionPolicy{}, + &ValidatingAdmissionPolicyList{}, + &ValidatingAdmissionPolicyBinding{}, + &ValidatingAdmissionPolicyBindingList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/k8s.io/api/admissionregistration/v1/types.go b/vendor/k8s.io/api/admissionregistration/v1/types.go index 07ed7a6246b..0510712b246 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/types.go +++ b/vendor/k8s.io/api/admissionregistration/v1/types.go @@ -91,6 +91,18 @@ const ( Fail FailurePolicyType = "Fail" ) +// ParameterNotFoundActionType specifies a failure policy that defines how a binding +// is evaluated when the param referred by its perNamespaceParamRef is not found. +type ParameterNotFoundActionType string + +const ( + // Allow means all requests will be admitted if no param resources + // could be found. + AllowAction ParameterNotFoundActionType = "Allow" + // Deny means all requests will be denied if no param resources are found. + DenyAction ParameterNotFoundActionType = "Deny" +) + // MatchPolicyType specifies the type of match policy. // +enum type MatchPolicyType string @@ -120,6 +132,584 @@ const ( SideEffectClassNoneOnDryRun SideEffectClass = "NoneOnDryRun" ) +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 +// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. +type ValidatingAdmissionPolicy struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the desired behavior of the ValidatingAdmissionPolicy. + Spec ValidatingAdmissionPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + // The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy + // behaves in the expected way. + // Populated by the system. + // Read-only. + // +optional + Status ValidatingAdmissionPolicyStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. +type ValidatingAdmissionPolicyStatus struct { + // The generation observed by the controller. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` + // The results of type checking for each expression. + // Presence of this field indicates the completion of the type checking. + // +optional + TypeChecking *TypeChecking `json:"typeChecking,omitempty" protobuf:"bytes,2,opt,name=typeChecking"` + // The conditions represent the latest available observations of a policy's current state. + // +optional + // +listType=map + // +listMapKey=type + Conditions []metav1.Condition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"` +} + +// ValidatingAdmissionPolicyConditionType is the condition type of admission validation policy. +type ValidatingAdmissionPolicyConditionType string + +// TypeChecking contains results of type checking the expressions in the +// ValidatingAdmissionPolicy +type TypeChecking struct { + // The type checking warnings for each expression. + // +optional + // +listType=atomic + ExpressionWarnings []ExpressionWarning `json:"expressionWarnings,omitempty" protobuf:"bytes,1,rep,name=expressionWarnings"` +} + +// ExpressionWarning is a warning information that targets a specific expression. +type ExpressionWarning struct { + // The path to the field that refers the expression. + // For example, the reference to the expression of the first item of + // validations is "spec.validations[0].expression" + FieldRef string `json:"fieldRef" protobuf:"bytes,2,opt,name=fieldRef"` + // The content of type checking information in a human-readable form. + // Each line of the warning contains the type that the expression is checked + // against, followed by the type check error from the compiler. + Warning string `json:"warning" protobuf:"bytes,3,opt,name=warning"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 +// ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. +type ValidatingAdmissionPolicyList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // List of ValidatingAdmissionPolicy. + Items []ValidatingAdmissionPolicy `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` +} + +// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. +type ValidatingAdmissionPolicySpec struct { + // ParamKind specifies the kind of resources used to parameterize this policy. + // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. + // If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. + // If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null. + // +optional + ParamKind *ParamKind `json:"paramKind,omitempty" protobuf:"bytes,1,rep,name=paramKind"` + + // MatchConstraints specifies what resources this policy is designed to validate. + // The AdmissionPolicy cares about a request if it matches _all_ Constraints. + // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API + // ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. + // Required. + MatchConstraints *MatchResources `json:"matchConstraints,omitempty" protobuf:"bytes,2,rep,name=matchConstraints"` + + // Validations contain CEL expressions which is used to apply the validation. + // Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is + // required. + // +listType=atomic + // +optional + Validations []Validation `json:"validations,omitempty" protobuf:"bytes,3,rep,name=validations"` + + // failurePolicy defines how to handle failures for the admission policy. Failures can + // occur from CEL expression parse errors, type check errors, runtime errors and invalid + // or mis-configured policy definitions or bindings. + // + // A policy is invalid if spec.paramKind refers to a non-existent Kind. + // A binding is invalid if spec.paramRef.name refers to a non-existent resource. + // + // failurePolicy does not define how validations that evaluate to false are handled. + // + // When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions + // define how failures are enforced. + // + // Allowed values are Ignore or Fail. Defaults to Fail. + // +optional + FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"` + + // auditAnnotations contains CEL expressions which are used to produce audit + // annotations for the audit event of the API request. + // validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is + // required. + // +listType=atomic + // +optional + AuditAnnotations []AuditAnnotation `json:"auditAnnotations,omitempty" protobuf:"bytes,5,rep,name=auditAnnotations"` + + // MatchConditions is a list of conditions that must be met for a request to be validated. + // Match conditions filter requests that have already been matched by the rules, + // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // If a parameter object is provided, it can be accessed via the `params` handle in the same + // manner as validation expressions. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the policy is skipped + // + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,6,rep,name=matchConditions"` + + // Variables contain definitions of variables that can be used in composition of other expressions. + // Each variable is defined as a named CEL expression. + // The variables defined here will be available under `variables` in other expressions of the policy + // except MatchConditions because MatchConditions are evaluated before the rest of the policy. + // + // The expression of a variable can refer to other variables defined earlier in the list but not those after. + // Thus, Variables must be sorted by the order of first appearance and acyclic. + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + Variables []Variable `json:"variables,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=variables"` +} + +// ParamKind is a tuple of Group Kind and Version. +// +structType=atomic +type ParamKind struct { + // APIVersion is the API group version the resources belong to. + // In format of "group/version". + // Required. + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,1,rep,name=apiVersion"` + + // Kind is the API kind the resources belong to. + // Required. + Kind string `json:"kind,omitempty" protobuf:"bytes,2,rep,name=kind"` +} + +// Validation specifies the CEL expression which is used to apply the validation. +type Validation struct { + // Expression represents the expression which will be evaluated by CEL. + // ref: https://github.com/google/cel-spec + // CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object. No other metadata properties are accessible. + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Accessible property names are escaped according to the following rules when accessed in the expression: + // - '__' escapes to '__underscores__' + // - '.' escapes to '__dot__' + // - '-' escapes to '__dash__' + // - '/' escapes to '__slash__' + // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: + // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", + // "import", "let", "loop", "package", "namespace", "return". + // Examples: + // - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"} + // - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"} + // - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"} + // + // Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. + // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: + // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and + // non-intersecting elements in `Y` are appended, retaining their partial order. + // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values + // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with + // non-intersecting keys are appended, retaining their partial order. + // Required. + Expression string `json:"expression" protobuf:"bytes,1,opt,name=Expression"` + // Message represents the message displayed when validation fails. The message is required if the Expression contains + // line breaks. The message must not contain line breaks. + // If unset, the message is "failed rule: {Rule}". + // e.g. "must be a URL with the host matching spec.host" + // If the Expression contains line breaks. Message is required. + // The message must not contain line breaks. + // If unset, the message is "failed Expression: {Expression}". + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` + // Reason represents a machine-readable description of why this validation failed. + // If this is the first validation in the list to fail, this reason, as well as the + // corresponding HTTP response code, are used in the + // HTTP response to the client. + // The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". + // If not set, StatusReasonInvalid is used in the response to the client. + // +optional + Reason *metav1.StatusReason `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` + // messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. + // Since messageExpression is used as a failure message, it must evaluate to a string. + // If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. + // If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced + // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string + // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and + // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. + // messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. + // Example: + // "object.x must be less than max ("+string(params.max)+")" + // +optional + MessageExpression string `json:"messageExpression,omitempty" protobuf:"bytes,4,opt,name=messageExpression"` +} + +// Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. +// +structType=atomic +type Variable struct { + // Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. + // The variable can be accessed in other expressions through `variables` + // For example, if name is "foo", the variable will be available as `variables.foo` + Name string `json:"name" protobuf:"bytes,1,opt,name=Name"` + + // Expression is the expression that will be evaluated as the value of the variable. + // The CEL expression has access to the same identifiers as the CEL expressions in Validation. + Expression string `json:"expression" protobuf:"bytes,2,opt,name=Expression"` +} + +// AuditAnnotation describes how to produce an audit annotation for an API request. +type AuditAnnotation struct { + // key specifies the audit annotation key. The audit annotation keys of + // a ValidatingAdmissionPolicy must be unique. The key must be a qualified + // name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. + // + // The key is combined with the resource name of the + // ValidatingAdmissionPolicy to construct an audit annotation key: + // "{ValidatingAdmissionPolicy name}/{key}". + // + // If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy + // and the same audit annotation key, the annotation key will be identical. + // In this case, the first annotation written with the key will be included + // in the audit event and all subsequent annotations with the same key + // will be discarded. + // + // Required. + Key string `json:"key" protobuf:"bytes,1,opt,name=key"` + + // valueExpression represents the expression which is evaluated by CEL to + // produce an audit annotation value. The expression must evaluate to either + // a string or null value. If the expression evaluates to a string, the + // audit annotation is included with the string value. If the expression + // evaluates to null or empty string the audit annotation will be omitted. + // The valueExpression may be no longer than 5kb in length. + // If the result of the valueExpression is more than 10kb in length, it + // will be truncated to 10kb. + // + // If multiple ValidatingAdmissionPolicyBinding resources match an + // API request, then the valueExpression will be evaluated for + // each binding. All unique values produced by the valueExpressions + // will be joined together in a comma-separated list. + // + // Required. + ValueExpression string `json:"valueExpression" protobuf:"bytes,2,opt,name=valueExpression"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. +// ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. +// +// For a given admission request, each binding will cause its policy to be +// evaluated N times, where N is 1 for policies/bindings that don't use +// params, otherwise N is the number of parameters selected by the binding. +// +// The CEL expressions of a policy must have a computed CEL cost below the maximum +// CEL budget. Each evaluation of the policy is given an independent CEL cost budget. +// Adding/removing policies, bindings, or params can not affect whether a +// given (policy, binding, param) combination is within its own CEL budget. +type ValidatingAdmissionPolicyBinding struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. + Spec ValidatingAdmissionPolicyBindingSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. +type ValidatingAdmissionPolicyBindingList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // List of PolicyBinding. + Items []ValidatingAdmissionPolicyBinding `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` +} + +// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. +type ValidatingAdmissionPolicyBindingSpec struct { + // PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. + // If the referenced resource does not exist, this binding is considered invalid and will be ignored + // Required. + PolicyName string `json:"policyName,omitempty" protobuf:"bytes,1,rep,name=policyName"` + + // paramRef specifies the parameter resource used to configure the admission control policy. + // It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. + // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. + // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + // +optional + ParamRef *ParamRef `json:"paramRef,omitempty" protobuf:"bytes,2,rep,name=paramRef"` + + // MatchResources declares what resources match this binding and will be validated by it. + // Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. + // If this is unset, all resources matched by the policy are validated by this binding + // When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. + // Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required. + // +optional + MatchResources *MatchResources `json:"matchResources,omitempty" protobuf:"bytes,3,rep,name=matchResources"` + + // validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. + // If a validation evaluates to false it is always enforced according to these actions. + // + // Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according + // to these actions only if the FailurePolicy is set to Fail, otherwise the failures are + // ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. + // + // validationActions is declared as a set of action values. Order does + // not matter. validationActions may not contain duplicates of the same action. + // + // The supported actions values are: + // + // "Deny" specifies that a validation failure results in a denied request. + // + // "Warn" specifies that a validation failure is reported to the request client + // in HTTP Warning headers, with a warning code of 299. Warnings can be sent + // both for allowed or denied admission responses. + // + // "Audit" specifies that a validation failure is included in the published + // audit event for the request. The audit event will contain a + // `validation.policy.admission.k8s.io/validation_failure` audit annotation + // with a value containing the details of the validation failures, formatted as + // a JSON list of objects, each with the following fields: + // - message: The validation failure message string + // - policy: The resource name of the ValidatingAdmissionPolicy + // - binding: The resource name of the ValidatingAdmissionPolicyBinding + // - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy + // - validationActions: The enforcement actions enacted for the validation failure + // Example audit annotation: + // `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"` + // + // Clients should expect to handle additional values by ignoring + // any values not recognized. + // + // "Deny" and "Warn" may not be used together since this combination + // needlessly duplicates the validation failure both in the + // API response body and the HTTP warning headers. + // + // Required. + // +listType=set + ValidationActions []ValidationAction `json:"validationActions,omitempty" protobuf:"bytes,4,rep,name=validationActions"` +} + +// ParamRef describes how to locate the params to be used as input to +// expressions of rules applied by a policy binding. +// +structType=atomic +type ParamRef struct { + // name is the name of the resource being referenced. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + // + // A single parameter used for all admission requests can be configured + // by setting the `name` field, leaving `selector` blank, and setting namespace + // if `paramKind` is namespace-scoped. + // + Name string `json:"name,omitempty" protobuf:"bytes,1,rep,name=name"` + + // namespace is the namespace of the referenced resource. Allows limiting + // the search for params to a specific namespace. Applies to both `name` and + // `selector` fields. + // + // A per-namespace parameter may be used by specifying a namespace-scoped + // `paramKind` in the policy and leaving this field empty. + // + // - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this + // field results in a configuration error. + // + // - If `paramKind` is namespace-scoped, the namespace of the object being + // evaluated for admission will be used when this field is left unset. Take + // care that if this is left empty the binding must not match any cluster-scoped + // resources, which will result in an error. + // + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,rep,name=namespace"` + + // selector can be used to match multiple param objects based on their labels. + // Supply selector: {} to match all resources of the ParamKind. + // + // If multiple params are found, they are all evaluated with the policy expressions + // and the results are ANDed together. + // + // One of `name` or `selector` must be set, but `name` and `selector` are + // mutually exclusive properties. If one is set, the other must be unset. + // + // +optional + Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,3,rep,name=selector"` + + // `parameterNotFoundAction` controls the behavior of the binding when the resource + // exists, and name or selector is valid, but there are no parameters + // matched by the binding. If the value is set to `Allow`, then no + // matched parameters will be treated as successful validation by the binding. + // If set to `Deny`, then no matched parameters will be subject to the + // `failurePolicy` of the policy. + // + // Allowed values are `Allow` or `Deny` + // + // Required + ParameterNotFoundAction *ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty" protobuf:"bytes,4,rep,name=parameterNotFoundAction"` +} + +// MatchResources decides whether to run the admission control policy on an object based +// on whether it meets the match criteria. +// The exclude rules take precedence over include rules (if a resource matches both, it is excluded) +// +structType=atomic +type MatchResources struct { + // NamespaceSelector decides whether to run the admission control policy 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 policy. + // + // 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 policy 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,1,opt,name=namespaceSelector"` + // ObjectSelector decides whether to run the validation based on if the + // object has matching labels. objectSelector is evaluated against both + // the oldObject and newObject that would be sent to the cel validation, and + // is considered to match if either object matches the selector. A null + // object (oldObject in the case of create, or newObject in the case of + // delete) or an object that cannot have labels (like a + // DeploymentRollback or a PodProxyOptions object) is not considered to + // match. + // Use the object selector only if the webhook is opt-in, because end + // users may skip the admission webhook by setting the labels. + // Default to the empty LabelSelector, which matches everything. + // +optional + ObjectSelector *metav1.LabelSelector `json:"objectSelector,omitempty" protobuf:"bytes,2,opt,name=objectSelector"` + // ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. + // The policy cares about an operation if it matches _any_ Rule. + // +listType=atomic + // +optional + ResourceRules []NamedRuleWithOperations `json:"resourceRules,omitempty" protobuf:"bytes,3,rep,name=resourceRules"` + // ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. + // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) + // +listType=atomic + // +optional + ExcludeResourceRules []NamedRuleWithOperations `json:"excludeResourceRules,omitempty" protobuf:"bytes,4,rep,name=excludeResourceRules"` + // matchPolicy defines how the "MatchResources" list is used to match incoming requests. + // Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. + // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, + // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. + // + // Defaults to "Equivalent" + // +optional + MatchPolicy *MatchPolicyType `json:"matchPolicy,omitempty" protobuf:"bytes,7,opt,name=matchPolicy,casttype=MatchPolicyType"` +} + +// ValidationAction specifies a policy enforcement action. +// +enum +type ValidationAction string + +const ( + // Deny specifies that a validation failure results in a denied request. + Deny ValidationAction = "Deny" + // Warn specifies that a validation failure is reported to the request client + // in HTTP Warning headers, with a warning code of 299. Warnings can be sent + // both for allowed or denied admission responses. + Warn ValidationAction = "Warn" + // Audit specifies that a validation failure is included in the published + // audit event for the request. The audit event will contain a + // `validation.policy.admission.k8s.io/validation_failure` audit annotation + // with a value containing the details of the validation failure. + Audit ValidationAction = "Audit" +) + +// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. +// +structType=atomic +type NamedRuleWithOperations struct { + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +listType=atomic + // +optional + ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,1,rep,name=resourceNames"` + // RuleWithOperations is a tuple of Operations and Resources. + RuleWithOperations `json:",inline" protobuf:"bytes,2,opt,name=ruleWithOperations"` +} + // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -134,6 +724,8 @@ type ValidatingWebhookConfiguration struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Webhooks []ValidatingWebhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"` } @@ -164,6 +756,8 @@ type MutatingWebhookConfiguration struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Webhooks []MutatingWebhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"` } @@ -199,6 +793,7 @@ type ValidatingWebhook struct { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -306,6 +901,7 @@ type ValidatingWebhook struct { // If a persisted webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail // and be subject to the failure policy. + // +listType=atomic AdmissionReviewVersions []string `json:"admissionReviewVersions" protobuf:"bytes,8,rep,name=admissionReviewVersions"` // MatchConditions is a list of conditions that must be met for a request to be sent to this @@ -320,13 +916,10 @@ type ValidatingWebhook struct { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,11,opt,name=matchConditions"` } @@ -350,6 +943,7 @@ type MutatingWebhook struct { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -457,6 +1051,7 @@ type MutatingWebhook struct { // If a persisted webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail // and be subject to the failure policy. + // +listType=atomic AdmissionReviewVersions []string `json:"admissionReviewVersions" protobuf:"bytes,8,rep,name=admissionReviewVersions"` // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. @@ -489,13 +1084,10 @@ type MutatingWebhook struct { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,12,opt,name=matchConditions"` } diff --git a/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go index c41cceb2f24..f43139505d1 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go @@ -27,6 +27,26 @@ package v1 // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_AuditAnnotation = map[string]string{ + "": "AuditAnnotation describes how to produce an audit annotation for an API request.", + "key": "key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\nThe key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.\n\nRequired.", + "valueExpression": "valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.\n\nRequired.", +} + +func (AuditAnnotation) SwaggerDoc() map[string]string { + return map_AuditAnnotation +} + +var map_ExpressionWarning = map[string]string{ + "": "ExpressionWarning is a warning information that targets a specific expression.", + "fieldRef": "The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\"", + "warning": "The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.", +} + +func (ExpressionWarning) SwaggerDoc() map[string]string { + return map_ExpressionWarning +} + var map_MatchCondition = map[string]string{ "": "MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.", "name": "Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\nRequired.", @@ -37,6 +57,19 @@ func (MatchCondition) SwaggerDoc() map[string]string { return map_MatchCondition } +var map_MatchResources = map[string]string{ + "": "MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", + "namespaceSelector": "NamespaceSelector decides whether to run the admission control policy 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 policy.\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 policy 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.", + "objectSelector": "ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", + "resourceRules": "ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.", + "excludeResourceRules": "ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", + "matchPolicy": "matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.\n\nDefaults to \"Equivalent\"", +} + +func (MatchResources) SwaggerDoc() map[string]string { + return map_MatchResources +} + var map_MutatingWebhook = map[string]string{ "": "MutatingWebhook 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.", @@ -50,7 +83,7 @@ var map_MutatingWebhook = map[string]string{ "timeoutSeconds": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.", "admissionReviewVersions": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.", "reinvocationPolicy": "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", - "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.", + "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped", } func (MutatingWebhook) SwaggerDoc() map[string]string { @@ -77,6 +110,37 @@ func (MutatingWebhookConfigurationList) SwaggerDoc() map[string]string { return map_MutatingWebhookConfigurationList } +var map_NamedRuleWithOperations = map[string]string{ + "": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.", + "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", +} + +func (NamedRuleWithOperations) SwaggerDoc() map[string]string { + return map_NamedRuleWithOperations +} + +var map_ParamKind = map[string]string{ + "": "ParamKind is a tuple of Group Kind and Version.", + "apiVersion": "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.", + "kind": "Kind is the API kind the resources belong to. Required.", +} + +func (ParamKind) SwaggerDoc() map[string]string { + return map_ParamKind +} + +var map_ParamRef = map[string]string{ + "": "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.", + "name": "name is the name of the resource being referenced.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.\n\nA single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped.", + "namespace": "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.", + "selector": "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", + "parameterNotFoundAction": "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny`\n\nRequired", +} + +func (ParamRef) SwaggerDoc() map[string]string { + return map_ParamRef +} + 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.", @@ -110,6 +174,94 @@ func (ServiceReference) SwaggerDoc() map[string]string { return map_ServiceReference } +var map_TypeChecking = map[string]string{ + "": "TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy", + "expressionWarnings": "The type checking warnings for each expression.", +} + +func (TypeChecking) SwaggerDoc() map[string]string { + return map_TypeChecking +} + +var map_ValidatingAdmissionPolicy = map[string]string{ + "": "ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "spec": "Specification of the desired behavior of the ValidatingAdmissionPolicy.", + "status": "The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only.", +} + +func (ValidatingAdmissionPolicy) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicy +} + +var map_ValidatingAdmissionPolicyBinding = map[string]string{ + "": "ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.\n\nThe CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "spec": "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.", +} + +func (ValidatingAdmissionPolicyBinding) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicyBinding +} + +var map_ValidatingAdmissionPolicyBindingList = map[string]string{ + "": "ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "items": "List of PolicyBinding.", +} + +func (ValidatingAdmissionPolicyBindingList) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicyBindingList +} + +var map_ValidatingAdmissionPolicyBindingSpec = map[string]string{ + "": "ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.", + "policyName": "PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", + "paramRef": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", + "matchResources": "MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.", + "validationActions": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", +} + +func (ValidatingAdmissionPolicyBindingSpec) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicyBindingSpec +} + +var map_ValidatingAdmissionPolicyList = map[string]string{ + "": "ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "items": "List of ValidatingAdmissionPolicy.", +} + +func (ValidatingAdmissionPolicyList) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicyList +} + +var map_ValidatingAdmissionPolicySpec = map[string]string{ + "": "ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.", + "paramKind": "ParamKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.", + "matchConstraints": "MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.", + "validations": "Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.", + "failurePolicy": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nWhen failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.\n\nAllowed values are Ignore or Fail. Defaults to Fail.", + "auditAnnotations": "auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.", + "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nIf a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the policy is skipped", + "variables": "Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.", +} + +func (ValidatingAdmissionPolicySpec) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicySpec +} + +var map_ValidatingAdmissionPolicyStatus = map[string]string{ + "": "ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.", + "observedGeneration": "The generation observed by the controller.", + "typeChecking": "The results of type checking for each expression. Presence of this field indicates the completion of the type checking.", + "conditions": "The conditions represent the latest available observations of a policy's current state.", +} + +func (ValidatingAdmissionPolicyStatus) SwaggerDoc() map[string]string { + return map_ValidatingAdmissionPolicyStatus +} + var map_ValidatingWebhook = map[string]string{ "": "ValidatingWebhook 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.", @@ -122,7 +274,7 @@ var map_ValidatingWebhook = map[string]string{ "sideEffects": "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.", "timeoutSeconds": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.", "admissionReviewVersions": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.", - "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.", + "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped", } func (ValidatingWebhook) SwaggerDoc() map[string]string { @@ -149,6 +301,28 @@ func (ValidatingWebhookConfigurationList) SwaggerDoc() map[string]string { return map_ValidatingWebhookConfigurationList } +var map_Validation = map[string]string{ + "": "Validation specifies the CEL expression which is used to apply the validation.", + "expression": "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired.", + "message": "Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\".", + "reason": "Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client.", + "messageExpression": "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\"", +} + +func (Validation) SwaggerDoc() map[string]string { + return map_Validation +} + +var map_Variable = map[string]string{ + "": "Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.", + "name": "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`", + "expression": "Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.", +} + +func (Variable) SwaggerDoc() map[string]string { + return map_Variable +} + 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.", diff --git a/vendor/k8s.io/api/admissionregistration/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/admissionregistration/v1/zz_generated.deepcopy.go index b9560991384..bfe599c1d32 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/admissionregistration/v1/zz_generated.deepcopy.go @@ -26,6 +26,38 @@ 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 *AuditAnnotation) DeepCopyInto(out *AuditAnnotation) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditAnnotation. +func (in *AuditAnnotation) DeepCopy() *AuditAnnotation { + if in == nil { + return nil + } + out := new(AuditAnnotation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExpressionWarning) DeepCopyInto(out *ExpressionWarning) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExpressionWarning. +func (in *ExpressionWarning) DeepCopy() *ExpressionWarning { + if in == nil { + return nil + } + out := new(ExpressionWarning) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MatchCondition) DeepCopyInto(out *MatchCondition) { *out = *in @@ -42,6 +74,51 @@ func (in *MatchCondition) DeepCopy() *MatchCondition { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MatchResources) DeepCopyInto(out *MatchResources) { + *out = *in + if in.NamespaceSelector != nil { + in, out := &in.NamespaceSelector, &out.NamespaceSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.ObjectSelector != nil { + in, out := &in.ObjectSelector, &out.ObjectSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.ResourceRules != nil { + in, out := &in.ResourceRules, &out.ResourceRules + *out = make([]NamedRuleWithOperations, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ExcludeResourceRules != nil { + in, out := &in.ExcludeResourceRules, &out.ExcludeResourceRules + *out = make([]NamedRuleWithOperations, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.MatchPolicy != nil { + in, out := &in.MatchPolicy, &out.MatchPolicy + *out = new(MatchPolicyType) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchResources. +func (in *MatchResources) DeepCopy() *MatchResources { + if in == nil { + return nil + } + out := new(MatchResources) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingWebhook) DeepCopyInto(out *MutatingWebhook) { *out = *in @@ -177,6 +254,70 @@ func (in *MutatingWebhookConfigurationList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedRuleWithOperations) DeepCopyInto(out *NamedRuleWithOperations) { + *out = *in + if in.ResourceNames != nil { + in, out := &in.ResourceNames, &out.ResourceNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.RuleWithOperations.DeepCopyInto(&out.RuleWithOperations) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedRuleWithOperations. +func (in *NamedRuleWithOperations) DeepCopy() *NamedRuleWithOperations { + if in == nil { + return nil + } + out := new(NamedRuleWithOperations) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParamKind) DeepCopyInto(out *ParamKind) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamKind. +func (in *ParamKind) DeepCopy() *ParamKind { + if in == nil { + return nil + } + out := new(ParamKind) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParamRef) DeepCopyInto(out *ParamRef) { + *out = *in + if in.Selector != nil { + in, out := &in.Selector, &out.Selector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.ParameterNotFoundAction != nil { + in, out := &in.ParameterNotFoundAction, &out.ParameterNotFoundAction + *out = new(ParameterNotFoundActionType) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamRef. +func (in *ParamRef) DeepCopy() *ParamRef { + if in == nil { + return nil + } + out := new(ParamRef) + in.DeepCopyInto(out) + return out +} + // 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 @@ -261,6 +402,260 @@ func (in *ServiceReference) DeepCopy() *ServiceReference { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TypeChecking) DeepCopyInto(out *TypeChecking) { + *out = *in + if in.ExpressionWarnings != nil { + in, out := &in.ExpressionWarnings, &out.ExpressionWarnings + *out = make([]ExpressionWarning, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeChecking. +func (in *TypeChecking) DeepCopy() *TypeChecking { + if in == nil { + return nil + } + out := new(TypeChecking) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidatingAdmissionPolicy) DeepCopyInto(out *ValidatingAdmissionPolicy) { + *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 ValidatingAdmissionPolicy. +func (in *ValidatingAdmissionPolicy) DeepCopy() *ValidatingAdmissionPolicy { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingAdmissionPolicy) 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 *ValidatingAdmissionPolicyBinding) DeepCopyInto(out *ValidatingAdmissionPolicyBinding) { + *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 ValidatingAdmissionPolicyBinding. +func (in *ValidatingAdmissionPolicyBinding) DeepCopy() *ValidatingAdmissionPolicyBinding { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicyBinding) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingAdmissionPolicyBinding) 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 *ValidatingAdmissionPolicyBindingList) DeepCopyInto(out *ValidatingAdmissionPolicyBindingList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ValidatingAdmissionPolicyBinding, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBindingList. +func (in *ValidatingAdmissionPolicyBindingList) DeepCopy() *ValidatingAdmissionPolicyBindingList { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicyBindingList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingAdmissionPolicyBindingList) 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 *ValidatingAdmissionPolicyBindingSpec) DeepCopyInto(out *ValidatingAdmissionPolicyBindingSpec) { + *out = *in + if in.ParamRef != nil { + in, out := &in.ParamRef, &out.ParamRef + *out = new(ParamRef) + (*in).DeepCopyInto(*out) + } + if in.MatchResources != nil { + in, out := &in.MatchResources, &out.MatchResources + *out = new(MatchResources) + (*in).DeepCopyInto(*out) + } + if in.ValidationActions != nil { + in, out := &in.ValidationActions, &out.ValidationActions + *out = make([]ValidationAction, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBindingSpec. +func (in *ValidatingAdmissionPolicyBindingSpec) DeepCopy() *ValidatingAdmissionPolicyBindingSpec { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicyBindingSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidatingAdmissionPolicyList) DeepCopyInto(out *ValidatingAdmissionPolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ValidatingAdmissionPolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyList. +func (in *ValidatingAdmissionPolicyList) DeepCopy() *ValidatingAdmissionPolicyList { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ValidatingAdmissionPolicyList) 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 *ValidatingAdmissionPolicySpec) DeepCopyInto(out *ValidatingAdmissionPolicySpec) { + *out = *in + if in.ParamKind != nil { + in, out := &in.ParamKind, &out.ParamKind + *out = new(ParamKind) + **out = **in + } + if in.MatchConstraints != nil { + in, out := &in.MatchConstraints, &out.MatchConstraints + *out = new(MatchResources) + (*in).DeepCopyInto(*out) + } + if in.Validations != nil { + in, out := &in.Validations, &out.Validations + *out = make([]Validation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.FailurePolicy != nil { + in, out := &in.FailurePolicy, &out.FailurePolicy + *out = new(FailurePolicyType) + **out = **in + } + if in.AuditAnnotations != nil { + in, out := &in.AuditAnnotations, &out.AuditAnnotations + *out = make([]AuditAnnotation, len(*in)) + copy(*out, *in) + } + if in.MatchConditions != nil { + in, out := &in.MatchConditions, &out.MatchConditions + *out = make([]MatchCondition, len(*in)) + copy(*out, *in) + } + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make([]Variable, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicySpec. +func (in *ValidatingAdmissionPolicySpec) DeepCopy() *ValidatingAdmissionPolicySpec { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidatingAdmissionPolicyStatus) DeepCopyInto(out *ValidatingAdmissionPolicyStatus) { + *out = *in + if in.TypeChecking != nil { + in, out := &in.TypeChecking, &out.TypeChecking + *out = new(TypeChecking) + (*in).DeepCopyInto(*out) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyStatus. +func (in *ValidatingAdmissionPolicyStatus) DeepCopy() *ValidatingAdmissionPolicyStatus { + if in == nil { + return nil + } + out := new(ValidatingAdmissionPolicyStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingWebhook) DeepCopyInto(out *ValidatingWebhook) { *out = *in @@ -391,6 +786,43 @@ func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Validation) DeepCopyInto(out *Validation) { + *out = *in + if in.Reason != nil { + in, out := &in.Reason, &out.Reason + *out = new(metav1.StatusReason) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Validation. +func (in *Validation) DeepCopy() *Validation { + if in == nil { + return nil + } + out := new(Validation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Variable) DeepCopyInto(out *Variable) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. +func (in *Variable) DeepCopy() *Variable { + if in == nil { + return nil + } + out := new(Variable) + 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 diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go index 4f1373ec5a7..111cc728741 100644 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto +// source: k8s.io/api/admissionregistration/v1alpha1/generated.proto package v1alpha1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } func (*AuditAnnotation) ProtoMessage() {} func (*AuditAnnotation) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{0} + return fileDescriptor_2c49182728ae0af5, []int{0} } func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } func (*ExpressionWarning) ProtoMessage() {} func (*ExpressionWarning) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{1} + return fileDescriptor_2c49182728ae0af5, []int{1} } func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -104,7 +104,7 @@ var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo func (m *MatchCondition) Reset() { *m = MatchCondition{} } func (*MatchCondition) ProtoMessage() {} func (*MatchCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{2} + return fileDescriptor_2c49182728ae0af5, []int{2} } func (m *MatchCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +132,7 @@ var xxx_messageInfo_MatchCondition proto.InternalMessageInfo func (m *MatchResources) Reset() { *m = MatchResources{} } func (*MatchResources) ProtoMessage() {} func (*MatchResources) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{3} + return fileDescriptor_2c49182728ae0af5, []int{3} } func (m *MatchResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -160,7 +160,7 @@ var xxx_messageInfo_MatchResources proto.InternalMessageInfo func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } func (*NamedRuleWithOperations) ProtoMessage() {} func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{4} + return fileDescriptor_2c49182728ae0af5, []int{4} } func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -188,7 +188,7 @@ var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo func (m *ParamKind) Reset() { *m = ParamKind{} } func (*ParamKind) ProtoMessage() {} func (*ParamKind) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{5} + return fileDescriptor_2c49182728ae0af5, []int{5} } func (m *ParamKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -216,7 +216,7 @@ var xxx_messageInfo_ParamKind proto.InternalMessageInfo func (m *ParamRef) Reset() { *m = ParamRef{} } func (*ParamRef) ProtoMessage() {} func (*ParamRef) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{6} + return fileDescriptor_2c49182728ae0af5, []int{6} } func (m *ParamRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -244,7 +244,7 @@ var xxx_messageInfo_ParamRef proto.InternalMessageInfo func (m *TypeChecking) Reset() { *m = TypeChecking{} } func (*TypeChecking) ProtoMessage() {} func (*TypeChecking) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{7} + return fileDescriptor_2c49182728ae0af5, []int{7} } func (m *TypeChecking) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,7 +272,7 @@ var xxx_messageInfo_TypeChecking proto.InternalMessageInfo func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } func (*ValidatingAdmissionPolicy) ProtoMessage() {} func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{8} + return fileDescriptor_2c49182728ae0af5, []int{8} } func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -300,7 +300,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{9} + return fileDescriptor_2c49182728ae0af5, []int{9} } func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -328,7 +328,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{10} + return fileDescriptor_2c49182728ae0af5, []int{10} } func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -356,7 +356,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageIn func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{11} + return fileDescriptor_2c49182728ae0af5, []int{11} } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,7 +384,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageIn func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } func (*ValidatingAdmissionPolicyList) ProtoMessage() {} func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{12} + return fileDescriptor_2c49182728ae0af5, []int{12} } func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -412,7 +412,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{13} + return fileDescriptor_2c49182728ae0af5, []int{13} } func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -440,7 +440,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{14} + return fileDescriptor_2c49182728ae0af5, []int{14} } func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -468,7 +468,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo func (m *Validation) Reset() { *m = Validation{} } func (*Validation) ProtoMessage() {} func (*Validation) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{15} + return fileDescriptor_2c49182728ae0af5, []int{15} } func (m *Validation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -496,7 +496,7 @@ var xxx_messageInfo_Validation proto.InternalMessageInfo func (m *Variable) Reset() { *m = Variable{} } func (*Variable) ProtoMessage() {} func (*Variable) Descriptor() ([]byte, []int) { - return fileDescriptor_c3be8d256e3ae3cf, []int{16} + return fileDescriptor_2c49182728ae0af5, []int{16} } func (m *Variable) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -542,106 +542,105 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto", fileDescriptor_c3be8d256e3ae3cf) -} - -var fileDescriptor_c3be8d256e3ae3cf = []byte{ - // 1509 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x6f, 0x1b, 0x45, - 0x18, 0xcf, 0xc6, 0x6e, 0x12, 0x8f, 0xf3, 0xf2, 0xd0, 0x2a, 0x6e, 0xa0, 0xde, 0x68, 0x55, 0xa1, - 0x46, 0x82, 0x35, 0x49, 0x0b, 0x85, 0x0a, 0x09, 0x65, 0xfb, 0xa2, 0x8f, 0x3c, 0x34, 0x45, 0x89, - 0x84, 0x40, 0x62, 0xb2, 0x3b, 0x71, 0xa6, 0xf6, 0x3e, 0xd8, 0x59, 0x9b, 0x46, 0x20, 0x51, 0x89, - 0x0b, 0xdc, 0x38, 0x70, 0xe1, 0xca, 0x9f, 0xc0, 0x7f, 0xc0, 0xad, 0xc7, 0x1e, 0xcb, 0x01, 0x8b, - 0x9a, 0x0b, 0x7f, 0x01, 0x48, 0xb9, 0x80, 0x66, 0x76, 0xf6, 0x69, 0x9b, 0xd8, 0x25, 0x70, 0xf3, - 0x7c, 0x8f, 0xdf, 0xf7, 0x98, 0xef, 0xfb, 0xf6, 0x1b, 0x03, 0xd4, 0x7c, 0x9b, 0xe9, 0xd4, 0xad, - 0x37, 0xdb, 0xfb, 0xc4, 0x77, 0x48, 0x40, 0x58, 0xbd, 0x43, 0x1c, 0xcb, 0xf5, 0xeb, 0x92, 0x81, - 0x3d, 0x5a, 0xc7, 0x96, 0x4d, 0x19, 0xa3, 0xae, 0xe3, 0x93, 0x06, 0x65, 0x81, 0x8f, 0x03, 0xea, - 0x3a, 0xf5, 0xce, 0x1a, 0x6e, 0x79, 0x87, 0x78, 0xad, 0xde, 0x20, 0x0e, 0xf1, 0x71, 0x40, 0x2c, - 0xdd, 0xf3, 0xdd, 0xc0, 0x85, 0xab, 0xa1, 0xaa, 0x8e, 0x3d, 0xaa, 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x51, 0x18, 0x4a, 0x80, 0xb5, 0x9f, 0x26, 0x81, 0x7a, 0xc2, 0xa7, 0x1c, 0xde, 0x05, - 0xd0, 0xdd, 0x67, 0xc4, 0xef, 0x10, 0xeb, 0x76, 0xf8, 0xc6, 0x8f, 0x36, 0xe8, 0x42, 0xb2, 0x5e, - 0x6d, 0xf7, 0x49, 0xa0, 0x01, 0x5a, 0xd0, 0x06, 0xb3, 0x41, 0x6a, 0xf3, 0x1b, 0xe7, 0x45, 0x20, - 0x03, 0x4b, 0x2f, 0x8e, 0xc6, 0x62, 0xaf, 0xab, 0x66, 0x56, 0x49, 0x94, 0x81, 0x87, 0x26, 0x00, - 0x66, 0x72, 0x7b, 0x61, 0x03, 0xd4, 0x47, 0x1b, 0x67, 0xc9, 0x9d, 0xc5, 0x9f, 0xa0, 0xd4, 0x75, - 0xa5, 0x60, 0xb5, 0xbf, 0x14, 0x00, 0x92, 0xae, 0x80, 0x17, 0x41, 0xea, 0x19, 0x2f, 0xbf, 0x62, - 0x45, 0x0e, 0x81, 0x52, 0x74, 0xb8, 0x0a, 0xa6, 0x6d, 0xc2, 0x18, 0x6e, 0x44, 0xef, 0x80, 0xf8, - 0x5f, 0x86, 0xcd, 0x90, 0x8c, 0x22, 0x3e, 0xdc, 0x03, 0x53, 0x3e, 0xc1, 0xcc, 0x75, 0xe4, 0xff, - 0x11, 0xef, 0xf1, 0xb5, 0x0a, 0x09, 0xca, 0x71, 0x57, 0x5d, 0x1b, 0xe5, 0x5f, 0x20, 0x5d, 0x6e, - 0x61, 0x42, 0x09, 0x49, 0x38, 0x78, 0x1b, 0x54, 0xa4, 0x8d, 0x94, 0xc3, 0x61, 0xd7, 0x9e, 0x97, - 0xde, 0x54, 0x36, 0xf3, 0x02, 0xa8, 0x5f, 0x47, 0xbb, 0x0b, 0x66, 0xa2, 0xea, 0x82, 0x55, 0x50, - 0x4c, 0x7d, 0xbe, 0xc3, 0xc0, 0x05, 0x25, 0x97, 0x98, 0xc9, 0xc1, 0x89, 0x31, 0xb6, 0x9f, 0x3c, - 0xaf, 0x4d, 0x3c, 0x7d, 0x5e, 0x9b, 0x78, 0xf6, 0xbc, 0x36, 0xf1, 0xb8, 0x57, 0x53, 0x9e, 0xf4, - 0x6a, 0xca, 0xd3, 0x5e, 0x4d, 0x79, 0xd6, 0xab, 0x29, 0xbf, 0xf6, 0x6a, 0xca, 0xb7, 0xbf, 0xd5, - 0x26, 0x3e, 0x5c, 0x1d, 0xf9, 0x5f, 0xbc, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xad, 0xe2, 0x61, - 0x96, 0x0a, 0x14, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/admissionregistration/v1alpha1/generated.proto", fileDescriptor_2c49182728ae0af5) +} + +var fileDescriptor_2c49182728ae0af5 = []byte{ + // 1498 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5b, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xc6, 0x6e, 0x12, 0x8f, 0x73, 0xb1, 0xe7, 0xdf, 0x2a, 0x6e, 0xfe, 0xd4, 0x1b, 0xad, + 0x2a, 0xd4, 0x48, 0xb0, 0x26, 0x69, 0xa1, 0xb4, 0x42, 0x42, 0xd9, 0xde, 0xe8, 0x25, 0x17, 0x4d, + 0x51, 0x22, 0x21, 0x90, 0x98, 0xec, 0x4e, 0xec, 0x69, 0xbc, 0x17, 0x76, 0xd6, 0xa1, 0x11, 0x48, + 0x54, 0xe2, 0x05, 0xde, 0x78, 0xe0, 0x85, 0x57, 0x3e, 0x02, 0xdf, 0x80, 0xb7, 0x3e, 0xf6, 0xb1, + 0x3c, 0x60, 0x51, 0xf3, 0xc2, 0x27, 0x00, 0x29, 0x2f, 0xa0, 0x99, 0x9d, 0xbd, 0xda, 0x26, 0x76, + 0x09, 0xbc, 0x79, 0xce, 0x9c, 0xf3, 0xfb, 0xcd, 0x39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, 0xde, 0xe5, 0x63, 0x15, 0x12, 0x92, 0xe3, 0xae, 0xba, 0x3a, + 0xca, 0xbf, 0x40, 0xba, 0x9c, 0xc2, 0x84, 0x11, 0x92, 0x70, 0xf0, 0x0e, 0xa8, 0x4a, 0x8e, 0xd4, + 0x81, 0xc3, 0xaa, 0x3d, 0x2f, 0x4f, 0x53, 0xdd, 0xc8, 0x2b, 0xa0, 0x7e, 0x1b, 0xed, 0x1e, 0x98, + 0x89, 0xb2, 0x0b, 0xd6, 0x40, 0x31, 0xf5, 0xf9, 0x0e, 0x1d, 0x17, 0x92, 0x5c, 0x60, 0x26, 0x07, + 0x07, 0xc6, 0xd8, 0x7a, 0xfa, 0xa2, 0x3e, 0xf1, 0xec, 0x45, 0x7d, 0xe2, 0xf9, 0x8b, 0xfa, 0xc4, + 0x93, 0x5e, 0x5d, 0x79, 0xda, 0xab, 0x2b, 0xcf, 0x7a, 0x75, 0xe5, 0x79, 0xaf, 0xae, 0xfc, 0xd2, + 0xab, 0x2b, 0xdf, 0xfc, 0x5a, 0x9f, 0xf8, 0x60, 0x65, 0xe4, 0x7f, 0xf1, 0xfe, 0x0a, 0x00, 0x00, + 0xff, 0xff, 0x22, 0xbd, 0xc5, 0xc7, 0xf1, 0x13, 0x00, 0x00, } func (m *AuditAnnotation) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go index 78d918bc72f..bd6b17e1588 100644 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go @@ -142,7 +142,7 @@ type ValidatingAdmissionPolicyList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingAdmissionPolicy. - Items []ValidatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicy `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. @@ -404,7 +404,7 @@ type ValidatingAdmissionPolicyBindingList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of PolicyBinding. - Items []ValidatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicyBinding `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go index 267ddc1cbd6..261ae41bd03 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto +// source: k8s.io/api/admissionregistration/v1beta1/generated.proto package v1beta1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } func (*AuditAnnotation) ProtoMessage() {} func (*AuditAnnotation) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{0} + return fileDescriptor_7f7c65a4f012fb19, []int{0} } func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } func (*ExpressionWarning) ProtoMessage() {} func (*ExpressionWarning) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{1} + return fileDescriptor_7f7c65a4f012fb19, []int{1} } func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo func (m *MatchCondition) Reset() { *m = MatchCondition{} } func (*MatchCondition) ProtoMessage() {} func (*MatchCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{2} + return fileDescriptor_7f7c65a4f012fb19, []int{2} } func (m *MatchCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_MatchCondition proto.InternalMessageInfo func (m *MatchResources) Reset() { *m = MatchResources{} } func (*MatchResources) ProtoMessage() {} func (*MatchResources) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{3} + return fileDescriptor_7f7c65a4f012fb19, []int{3} } func (m *MatchResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_MatchResources proto.InternalMessageInfo func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } func (*MutatingWebhook) ProtoMessage() {} func (*MutatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{4} + return fileDescriptor_7f7c65a4f012fb19, []int{4} } func (m *MutatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_MutatingWebhook proto.InternalMessageInfo func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} } func (*MutatingWebhookConfiguration) ProtoMessage() {} func (*MutatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{5} + return fileDescriptor_7f7c65a4f012fb19, []int{5} } func (m *MutatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +217,7 @@ var xxx_messageInfo_MutatingWebhookConfiguration proto.InternalMessageInfo func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} } func (*MutatingWebhookConfigurationList) ProtoMessage() {} func (*MutatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{6} + return fileDescriptor_7f7c65a4f012fb19, []int{6} } func (m *MutatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -245,7 +245,7 @@ var xxx_messageInfo_MutatingWebhookConfigurationList proto.InternalMessageInfo func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } func (*NamedRuleWithOperations) ProtoMessage() {} func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{7} + return fileDescriptor_7f7c65a4f012fb19, []int{7} } func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -273,7 +273,7 @@ var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo func (m *ParamKind) Reset() { *m = ParamKind{} } func (*ParamKind) ProtoMessage() {} func (*ParamKind) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{8} + return fileDescriptor_7f7c65a4f012fb19, []int{8} } func (m *ParamKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -301,7 +301,7 @@ var xxx_messageInfo_ParamKind proto.InternalMessageInfo func (m *ParamRef) Reset() { *m = ParamRef{} } func (*ParamRef) ProtoMessage() {} func (*ParamRef) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{9} + return fileDescriptor_7f7c65a4f012fb19, []int{9} } func (m *ParamRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -329,7 +329,7 @@ var xxx_messageInfo_ParamRef proto.InternalMessageInfo func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{10} + return fileDescriptor_7f7c65a4f012fb19, []int{10} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -357,7 +357,7 @@ var xxx_messageInfo_ServiceReference proto.InternalMessageInfo func (m *TypeChecking) Reset() { *m = TypeChecking{} } func (*TypeChecking) ProtoMessage() {} func (*TypeChecking) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{11} + return fileDescriptor_7f7c65a4f012fb19, []int{11} } func (m *TypeChecking) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -385,7 +385,7 @@ var xxx_messageInfo_TypeChecking proto.InternalMessageInfo func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } func (*ValidatingAdmissionPolicy) ProtoMessage() {} func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{12} + return fileDescriptor_7f7c65a4f012fb19, []int{12} } func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -413,7 +413,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{13} + return fileDescriptor_7f7c65a4f012fb19, []int{13} } func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -441,7 +441,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{14} + return fileDescriptor_7f7c65a4f012fb19, []int{14} } func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -469,7 +469,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageIn func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{15} + return fileDescriptor_7f7c65a4f012fb19, []int{15} } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -497,7 +497,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageIn func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } func (*ValidatingAdmissionPolicyList) ProtoMessage() {} func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{16} + return fileDescriptor_7f7c65a4f012fb19, []int{16} } func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -525,7 +525,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{17} + return fileDescriptor_7f7c65a4f012fb19, []int{17} } func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -553,7 +553,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{18} + return fileDescriptor_7f7c65a4f012fb19, []int{18} } func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -581,7 +581,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo func (m *ValidatingWebhook) Reset() { *m = ValidatingWebhook{} } func (*ValidatingWebhook) ProtoMessage() {} func (*ValidatingWebhook) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{19} + return fileDescriptor_7f7c65a4f012fb19, []int{19} } func (m *ValidatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -609,7 +609,7 @@ var xxx_messageInfo_ValidatingWebhook proto.InternalMessageInfo func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} } func (*ValidatingWebhookConfiguration) ProtoMessage() {} func (*ValidatingWebhookConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{20} + return fileDescriptor_7f7c65a4f012fb19, []int{20} } func (m *ValidatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -637,7 +637,7 @@ var xxx_messageInfo_ValidatingWebhookConfiguration proto.InternalMessageInfo func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} } func (*ValidatingWebhookConfigurationList) ProtoMessage() {} func (*ValidatingWebhookConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{21} + return fileDescriptor_7f7c65a4f012fb19, []int{21} } func (m *ValidatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -665,7 +665,7 @@ var xxx_messageInfo_ValidatingWebhookConfigurationList proto.InternalMessageInfo func (m *Validation) Reset() { *m = Validation{} } func (*Validation) ProtoMessage() {} func (*Validation) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{22} + return fileDescriptor_7f7c65a4f012fb19, []int{22} } func (m *Validation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -693,7 +693,7 @@ var xxx_messageInfo_Validation proto.InternalMessageInfo func (m *Variable) Reset() { *m = Variable{} } func (*Variable) ProtoMessage() {} func (*Variable) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{23} + return fileDescriptor_7f7c65a4f012fb19, []int{23} } func (m *Variable) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -721,7 +721,7 @@ var xxx_messageInfo_Variable proto.InternalMessageInfo func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_abeea74cbc46f55a, []int{24} + return fileDescriptor_7f7c65a4f012fb19, []int{24} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -775,135 +775,134 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto", fileDescriptor_abeea74cbc46f55a) -} - -var fileDescriptor_abeea74cbc46f55a = []byte{ - // 1973 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x1a, 0x4d, 0x6f, 0x23, 0x49, - 0x35, 0x1d, 0xe7, 0xc3, 0x7e, 0xce, 0x97, 0x6b, 0x67, 0x89, 0x77, 0x76, 0xd6, 0x8e, 0x5a, 0x2b, - 0x94, 0x91, 0xc0, 0xde, 0xc9, 0xae, 0x76, 0x97, 0x59, 0x21, 0x14, 0x67, 0x67, 0x86, 0x99, 0x9d, - 0x64, 0x42, 0x65, 0x37, 0x91, 0x60, 0x57, 0x9a, 0x72, 0x77, 0xd9, 0x6e, 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 0x6d, 0x8a, - 0xa3, 0x6c, 0xea, 0x1f, 0xf3, 0xb0, 0xba, 0x3b, 0xe0, 0xe9, 0x69, 0xb6, 0x8f, 0x68, 0xb3, 0x63, - 0x59, 0xdd, 0x0c, 0x31, 0xfc, 0x04, 0x96, 0xb4, 0x9e, 0x41, 0x4d, 0x77, 0xc7, 0x32, 0x5b, 0x46, - 0x5b, 0x06, 0xc0, 0xb7, 0xb3, 0x3b, 0x42, 0xaa, 0xda, 0x89, 0x08, 0x69, 0x5c, 0x93, 0x8a, 0x96, - 0xa2, 0x50, 0x1c, 0x53, 0x84, 0x3e, 0x87, 0x79, 0x27, 0x12, 0x02, 0x1f, 0x64, 0xd1, 0x58, 0x4b, - 0x71, 0xf8, 0xb2, 0xd4, 0x35, 0xef, 0x79, 0xd8, 0x13, 0x8a, 0x1e, 0xc2, 0x72, 0x8b, 0x18, 0xbd, - 0x81, 0x43, 0xa5, 0x53, 0xe7, 0x84, 0x07, 0xbe, 0xce, 0x23, 0xe4, 0x6e, 0x14, 0x71, 0x3a, 0xaa, - 0x96, 0x62, 0x00, 0xe1, 0xd8, 0x38, 0x73, 0xf2, 0x82, 0x0a, 0x17, 0xba, 0xa0, 0xf4, 0x3c, 0x9f, - 0xff, 0xff, 0xe4, 0x79, 0xf1, 0xe5, 0xe6, 0xf9, 0xc7, 0x50, 0x64, 0x86, 0x4e, 0xef, 0xb4, 0x5a, - 0x54, 0x73, 0x59, 0x79, 0x21, 0x74, 0xd8, 0x41, 0x08, 0xe6, 0x0e, 0x0b, 0x3f, 0x77, 0x7a, 0x84, - 0x31, 0x1c, 0x65, 0x43, 0xb7, 0x61, 0x85, 0x77, 0x25, 0x6b, 0xe0, 0x1e, 0x50, 0xcd, 0x32, 0x75, - 0x26, 0x52, 0x63, 0xde, 0x3b, 0xc1, 0xa7, 0x31, 0x0c, 0x4e, 0x50, 0xa2, 0xcf, 0x60, 0x3d, 0x88, - 0x22, 0x4c, 0x87, 0x06, 0x7d, 0x72, 0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xcf, 0x85, 0x63, 0x4f, - 0x87, 0xfa, 0x5c, 0x81, 0xf5, 0x29, 0x9d, 0x0a, 0x7d, 0x10, 0xf6, 0x62, 0x51, 0x44, 0xca, 0x8a, - 0xc8, 0x8b, 0x52, 0xb4, 0x89, 0x0a, 0x04, 0x8e, 0xd3, 0xa1, 0x5f, 0x28, 0x80, 0x9c, 0x09, 0x79, - 0xb2, 0x73, 0x5c, 0xb8, 0x8e, 0x5f, 0x97, 0x06, 0xa0, 0x49, 0x1c, 0x4e, 0x51, 0xa7, 0x12, 0x28, - 0xec, 0x13, 0x87, 0xf4, 0x3f, 0x31, 0x4c, 0x9d, 0x4f, 0x62, 0xc4, 0x36, 0x64, 0x96, 0xca, 0x6e, - 0x17, 0x84, 0xd9, 0xf6, 0xfe, 0x7d, 0x89, 0xc1, 0x11, 0x2a, 0xde, 0x1b, 0xbb, 0x86, 0xa9, 0xcb, - 0xb9, 0x2d, 0xe8, 0x8d, 0x5c, 0x1e, 0x16, 0x18, 0xf5, 0x77, 0xb3, 0x90, 0x17, 0x3a, 0xf8, 0x2c, - 0x79, 0x76, 0x2b, 0xad, 0x43, 0x21, 0x28, 0xbd, 0x52, 0x6a, 0x49, 0x92, 0x15, 0x82, 0x32, 0x8d, - 0x43, 0x1a, 0xf4, 0x05, 0xe4, 0x99, 0x5f, 0x90, 0x73, 0x17, 0x2f, 0xc8, 0x4b, 0x3c, 0xd2, 0x82, - 0x52, 0x1c, 0x88, 0x44, 0x2e, 0xac, 0xdb, 0xfc, 0xf4, 0xd4, 0xa5, 0xce, 0x9e, 0xe5, 0xde, 0xb5, - 0x06, 0xa6, 0xbe, 0xad, 0x71, 0xef, 0xc9, 0x6e, 0x78, 0x9b, 0x97, 0xc0, 0xfd, 0x74, 0x92, 0xd3, - 0x51, 0xf5, 0xcd, 0x29, 0x28, 0x51, 0xba, 0xa6, 0x89, 0x56, 0x7f, 0xab, 0xc0, 0xda, 0x01, 0x75, - 0x86, 0x86, 0x46, 0x31, 0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 0xc9, 0xbd, 0x56, - 0xa3, 0xc8, 0xef, 0xc0, 0x87, 0xfa, 0x72, 0xd1, 0x26, 0xe4, 0x35, 0xd2, 0x18, 0x98, 0x7a, 0xcf, - 0xbb, 0xaf, 0x25, 0xef, 0x8d, 0xb7, 0xb3, 0xed, 0xc1, 0x70, 0x80, 0x6d, 0xec, 0x3d, 0x3b, 0xa9, - 0xcc, 0x7c, 0x75, 0x52, 0x99, 0x79, 0x7e, 0x52, 0x99, 0xf9, 0xf9, 0xb8, 0xa2, 0x3c, 0x1b, 0x57, - 0x94, 0xaf, 0xc6, 0x15, 0xe5, 0xf9, 0xb8, 0xa2, 0xfc, 0x75, 0x5c, 0x51, 0x7e, 0xf9, 0xb7, 0xca, - 0xcc, 0xf7, 0x37, 0xb3, 0xfe, 0x97, 0xc3, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x71, 0x54, 0x54, - 0xe6, 0x29, 0x21, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/admissionregistration/v1beta1/generated.proto", fileDescriptor_7f7c65a4f012fb19) +} + +var fileDescriptor_7f7c65a4f012fb19 = []byte{ + // 1957 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x1a, 0x4d, 0x6f, 0x1b, 0xc7, + 0xd5, 0x2b, 0x52, 0x12, 0xf9, 0xa8, 0x2f, 0x4e, 0x9c, 0x8a, 0x76, 0x1c, 0x52, 0x58, 0x04, 0x85, + 0x0c, 0xb4, 0x64, 0xac, 0x04, 0x89, 0xeb, 0xa0, 0x28, 0x44, 0xc5, 0x76, 0xed, 0x58, 0xb2, 0x30, + 0x4a, 0x24, 0xa0, 0x4d, 0x00, 0x8f, 0x76, 0x87, 0xe4, 0x96, 0xe4, 0xee, 0x76, 0x67, 0x49, 0x5b, + 0x2d, 0xd0, 0x16, 0xe8, 0x21, 0xd7, 0x02, 0xbd, 0x14, 0xe8, 0xa9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, 0x1d, 0xfa, 0xa5, 0x02, 0xc8, 0x99, 0x90, + 0x27, 0x3b, 0xc7, 0xb9, 0xeb, 0xf8, 0x75, 0x69, 0x00, 0x9a, 0xc4, 0xe1, 0x14, 0x75, 0x2a, 0x81, + 0xe2, 0x2e, 0x71, 0x48, 0xff, 0x13, 0xc3, 0xd4, 0xf9, 0x24, 0x46, 0x6c, 0x43, 0x66, 0xa9, 0xec, + 0x76, 0x41, 0x98, 0x6d, 0xee, 0x3e, 0x90, 0x18, 0x1c, 0xa1, 0xe2, 0xbd, 0xb1, 0x6b, 0x98, 0xba, + 0x9c, 0xdb, 0x82, 0xde, 0xc8, 0xe5, 0x61, 0x81, 0x51, 0x7f, 0x3f, 0x03, 0x05, 0xa1, 0x83, 0xcf, + 0x92, 0xa7, 0xb7, 0xd2, 0x06, 0x14, 0x83, 0xd2, 0x2b, 0xa5, 0x96, 0x25, 0x59, 0x31, 0x28, 0xd3, + 0x38, 0xa4, 0x41, 0x5f, 0x40, 0x81, 0xf9, 0x05, 0x39, 0x77, 0xfe, 0x82, 0xbc, 0xc0, 0x23, 0x2d, + 0x28, 0xc5, 0x81, 0x48, 0xe4, 0xc2, 0xaa, 0xcd, 0x4f, 0x4f, 0x5d, 0xea, 0xec, 0x58, 0xee, 0x3d, + 0x6b, 0x60, 0xea, 0x9b, 0x1a, 0xf7, 0x9e, 0xec, 0x86, 0x77, 0x78, 0x09, 0xdc, 0x4d, 0x27, 0x39, + 0x19, 0xd5, 0xde, 0x9a, 0x82, 0x12, 0xa5, 0x6b, 0x9a, 0x68, 0xf5, 0x77, 0x0a, 0xac, 0xec, 0x51, + 0x67, 0x68, 0x68, 0x14, 0xd3, 0x16, 0x75, 0xa8, 0xa9, 0x25, 0x5c, 0xa3, 0x64, 0x70, 0x8d, 0xef, + 0xed, 0x99, 0xa9, 0xde, 0xbe, 0x01, 0x79, 0x9b, 0xb8, 0x1d, 0x39, 0xd8, 0x17, 0x38, 0x76, 0x97, + 0xb8, 0x1d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x70, 0x80, 0x6d, 0xee, 0x3c, 0x3f, 0xae, + 0x5e, 0xf9, 0xea, 0xb8, 0x7a, 0xe5, 0xc5, 0x71, 0xf5, 0xca, 0x2f, 0xc6, 0x55, 0xe5, 0xf9, 0xb8, + 0xaa, 0x7c, 0x35, 0xae, 0x2a, 0x2f, 0xc6, 0x55, 0xe5, 0x6f, 0xe3, 0xaa, 0xf2, 0xab, 0xbf, 0x57, + 0xaf, 0xfc, 0x60, 0x3d, 0xeb, 0x7f, 0x39, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x6f, 0xf2, 0xe8, + 0x4a, 0x10, 0x21, 0x00, 0x00, } func (m *AuditAnnotation) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto index 1855cdfc4f7..91479acc20b 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto @@ -222,6 +222,7 @@ message MutatingWebhook { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic repeated k8s.io.api.admissionregistration.v1.RuleWithOperations rules = 3; // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -332,6 +333,7 @@ message MutatingWebhook { // and be subject to the failure policy. // Default to `['v1beta1']`. // +optional + // +listType=atomic repeated string admissionReviewVersions = 8; // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. @@ -364,13 +366,10 @@ message MutatingWebhook { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional repeated MatchCondition matchConditions = 12; } @@ -386,6 +385,8 @@ message MutatingWebhookConfiguration { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated MutatingWebhook Webhooks = 2; } @@ -765,6 +766,7 @@ message ValidatingWebhook { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic repeated k8s.io.api.admissionregistration.v1.RuleWithOperations rules = 3; // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -856,6 +858,7 @@ message ValidatingWebhook { // Requests with the dryRun attribute will be auto-rejected if they match a webhook with // sideEffects == Unknown or Some. Defaults to Unknown. // +optional + // +listType=atomic optional string sideEffects = 6; // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, @@ -875,6 +878,7 @@ message ValidatingWebhook { // and be subject to the failure policy. // Default to `['v1beta1']`. // +optional + // +listType=atomic repeated string admissionReviewVersions = 8; // MatchConditions is a list of conditions that must be met for a request to be sent to this @@ -889,13 +893,10 @@ message ValidatingWebhook { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional repeated MatchCondition matchConditions = 11; } @@ -911,6 +912,8 @@ message ValidatingWebhookConfiguration { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated ValidatingWebhook Webhooks = 2; } diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/types.go b/vendor/k8s.io/api/admissionregistration/v1beta1/types.go index 27085e056a1..cf1e29a6cab 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/types.go +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/types.go @@ -158,7 +158,7 @@ type ValidatingAdmissionPolicyList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingAdmissionPolicy. - Items []ValidatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicy `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. @@ -419,7 +419,7 @@ type ValidatingAdmissionPolicyBindingList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of PolicyBinding. - Items []ValidatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []ValidatingAdmissionPolicyBinding `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. @@ -684,6 +684,8 @@ type ValidatingWebhookConfiguration struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Webhooks []ValidatingWebhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"` } @@ -723,6 +725,8 @@ type MutatingWebhookConfiguration struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Webhooks []MutatingWebhook `json:"webhooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=Webhooks"` } @@ -762,6 +766,7 @@ type ValidatingWebhook struct { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -853,6 +858,7 @@ type ValidatingWebhook struct { // Requests with the dryRun attribute will be auto-rejected if they match a webhook with // sideEffects == Unknown or Some. Defaults to Unknown. // +optional + // +listType=atomic SideEffects *SideEffectClass `json:"sideEffects,omitempty" protobuf:"bytes,6,opt,name=sideEffects,casttype=SideEffectClass"` // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, @@ -872,6 +878,7 @@ type ValidatingWebhook struct { // and be subject to the failure policy. // Default to `['v1beta1']`. // +optional + // +listType=atomic AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty" protobuf:"bytes,8,rep,name=admissionReviewVersions"` // MatchConditions is a list of conditions that must be met for a request to be sent to this @@ -886,13 +893,10 @@ type ValidatingWebhook struct { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,11,rep,name=matchConditions"` } @@ -916,6 +920,7 @@ type MutatingWebhook struct { // from putting the cluster in a state which cannot be recovered from without completely // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + // +listType=atomic Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -1026,6 +1031,7 @@ type MutatingWebhook struct { // and be subject to the failure policy. // Default to `['v1beta1']`. // +optional + // +listType=atomic AdmissionReviewVersions []string `json:"admissionReviewVersions,omitempty" protobuf:"bytes,8,rep,name=admissionReviewVersions"` // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. @@ -1058,13 +1064,10 @@ type MutatingWebhook struct { // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the error is ignored and the webhook is skipped // - // This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=AdmissionWebhookMatchConditions // +optional MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,12,rep,name=matchConditions"` } 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 index adaf4bc11db..cc1509b539a 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go @@ -83,7 +83,7 @@ var map_MutatingWebhook = map[string]string{ "timeoutSeconds": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds.", "admissionReviewVersions": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. Default to `['v1beta1']`.", "reinvocationPolicy": "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", - "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.", + "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped", } func (MutatingWebhook) SwaggerDoc() map[string]string { @@ -253,7 +253,7 @@ var map_ValidatingWebhook = map[string]string{ "sideEffects": "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", "timeoutSeconds": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds.", "admissionReviewVersions": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. Default to `['v1beta1']`.", - "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.", + "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped", } func (ValidatingWebhook) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/component-base/config/doc.go b/vendor/k8s.io/api/apidiscovery/v2/doc.go similarity index 75% rename from vendor/k8s.io/component-base/config/doc.go rename to vendor/k8s.io/api/apidiscovery/v2/doc.go index dd0a5a53a7b..d47aa859768 100644 --- a/vendor/k8s.io/component-base/config/doc.go +++ b/vendor/k8s.io/api/apidiscovery/v2/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,5 +15,9 @@ limitations under the License. */ // +k8s:deepcopy-gen=package +// +k8s:protobuf-gen=package +// +k8s:openapi-gen=true -package config // import "k8s.io/component-base/config" +// +groupName=apidiscovery.k8s.io + +package v2 // import "k8s.io/api/apidiscovery/v2" diff --git a/vendor/k8s.io/api/apidiscovery/v2/generated.pb.go b/vendor/k8s.io/api/apidiscovery/v2/generated.pb.go new file mode 100644 index 00000000000..5c37feaa2ea --- /dev/null +++ b/vendor/k8s.io/api/apidiscovery/v2/generated.pb.go @@ -0,0 +1,1742 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/api/apidiscovery/v2/generated.proto + +package v2 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *APIGroupDiscovery) Reset() { *m = APIGroupDiscovery{} } +func (*APIGroupDiscovery) ProtoMessage() {} +func (*APIGroupDiscovery) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b7287280068d8f, []int{0} +} +func (m *APIGroupDiscovery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APIGroupDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *APIGroupDiscovery) XXX_Merge(src proto.Message) { + xxx_messageInfo_APIGroupDiscovery.Merge(m, src) +} +func (m *APIGroupDiscovery) XXX_Size() int { + return m.Size() +} +func (m *APIGroupDiscovery) XXX_DiscardUnknown() { + xxx_messageInfo_APIGroupDiscovery.DiscardUnknown(m) +} + +var xxx_messageInfo_APIGroupDiscovery proto.InternalMessageInfo + +func (m *APIGroupDiscoveryList) Reset() { *m = APIGroupDiscoveryList{} } +func (*APIGroupDiscoveryList) ProtoMessage() {} +func (*APIGroupDiscoveryList) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b7287280068d8f, []int{1} +} +func (m *APIGroupDiscoveryList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APIGroupDiscoveryList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *APIGroupDiscoveryList) XXX_Merge(src proto.Message) { + xxx_messageInfo_APIGroupDiscoveryList.Merge(m, src) +} +func (m *APIGroupDiscoveryList) XXX_Size() int { + return m.Size() +} +func (m *APIGroupDiscoveryList) XXX_DiscardUnknown() { + xxx_messageInfo_APIGroupDiscoveryList.DiscardUnknown(m) +} + +var xxx_messageInfo_APIGroupDiscoveryList proto.InternalMessageInfo + +func (m *APIResourceDiscovery) Reset() { *m = APIResourceDiscovery{} } +func (*APIResourceDiscovery) ProtoMessage() {} +func (*APIResourceDiscovery) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b7287280068d8f, []int{2} +} +func (m *APIResourceDiscovery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APIResourceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *APIResourceDiscovery) XXX_Merge(src proto.Message) { + xxx_messageInfo_APIResourceDiscovery.Merge(m, src) +} +func (m *APIResourceDiscovery) XXX_Size() int { + return m.Size() +} +func (m *APIResourceDiscovery) XXX_DiscardUnknown() { + xxx_messageInfo_APIResourceDiscovery.DiscardUnknown(m) +} + +var xxx_messageInfo_APIResourceDiscovery proto.InternalMessageInfo + +func (m *APISubresourceDiscovery) Reset() { *m = APISubresourceDiscovery{} } +func (*APISubresourceDiscovery) ProtoMessage() {} +func (*APISubresourceDiscovery) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b7287280068d8f, []int{3} +} +func (m *APISubresourceDiscovery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APISubresourceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *APISubresourceDiscovery) XXX_Merge(src proto.Message) { + xxx_messageInfo_APISubresourceDiscovery.Merge(m, src) +} +func (m *APISubresourceDiscovery) XXX_Size() int { + return m.Size() +} +func (m *APISubresourceDiscovery) XXX_DiscardUnknown() { + xxx_messageInfo_APISubresourceDiscovery.DiscardUnknown(m) +} + +var xxx_messageInfo_APISubresourceDiscovery proto.InternalMessageInfo + +func (m *APIVersionDiscovery) Reset() { *m = APIVersionDiscovery{} } +func (*APIVersionDiscovery) ProtoMessage() {} +func (*APIVersionDiscovery) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b7287280068d8f, []int{4} +} +func (m *APIVersionDiscovery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *APIVersionDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *APIVersionDiscovery) XXX_Merge(src proto.Message) { + xxx_messageInfo_APIVersionDiscovery.Merge(m, src) +} +func (m *APIVersionDiscovery) XXX_Size() int { + return m.Size() +} +func (m *APIVersionDiscovery) XXX_DiscardUnknown() { + xxx_messageInfo_APIVersionDiscovery.DiscardUnknown(m) +} + +var xxx_messageInfo_APIVersionDiscovery proto.InternalMessageInfo + +func init() { + proto.RegisterType((*APIGroupDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APIGroupDiscovery") + proto.RegisterType((*APIGroupDiscoveryList)(nil), "k8s.io.api.apidiscovery.v2.APIGroupDiscoveryList") + proto.RegisterType((*APIResourceDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APIResourceDiscovery") + proto.RegisterType((*APISubresourceDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APISubresourceDiscovery") + proto.RegisterType((*APIVersionDiscovery)(nil), "k8s.io.api.apidiscovery.v2.APIVersionDiscovery") +} + +func init() { + proto.RegisterFile("k8s.io/api/apidiscovery/v2/generated.proto", fileDescriptor_e0b7287280068d8f) +} + +var fileDescriptor_e0b7287280068d8f = []byte{ + // 736 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x4e, 0xdb, 0x4c, + 0x14, 0x8d, 0x09, 0xf9, 0x48, 0x26, 0xc9, 0xd7, 0x30, 0x80, 0x6a, 0x65, 0xe1, 0xa0, 0x6c, 0x4a, + 0xab, 0x32, 0x86, 0x94, 0xa2, 0x2e, 0x9b, 0x94, 0xb6, 0x8a, 0xfa, 0x87, 0x26, 0x15, 0x8b, 0xaa, + 0x95, 0xea, 0x38, 0x83, 0xe3, 0x82, 0x7f, 0x34, 0xe3, 0x44, 0x62, 0xd7, 0x47, 0xe8, 0x13, 0xf4, + 0x79, 0xe8, 0x8e, 0x05, 0x0b, 0x56, 0x51, 0x49, 0x77, 0x7d, 0x04, 0x56, 0xd5, 0x8c, 0xc7, 0x3f, + 0x21, 0x44, 0x41, 0x5d, 0x74, 0x81, 0x84, 0xcf, 0x9c, 0x73, 0xee, 0x3d, 0xd7, 0xd7, 0x13, 0xf0, + 0xe0, 0xe8, 0x09, 0x43, 0xb6, 0xa7, 0x1b, 0xbe, 0xcd, 0xff, 0x7a, 0x36, 0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 0xf5, 0xec, 0x46, 0xa1, 0x55, 0xe0, 0x75, + 0x0f, 0x38, 0x80, 0x43, 0x1c, 0x22, 0x00, 0x58, 0xdf, 0xa3, 0xc1, 0x5b, 0xc3, 0x21, 0x4c, 0xfd, + 0x4f, 0xb0, 0xfe, 0xe7, 0xab, 0xda, 0x89, 0x51, 0x9c, 0x62, 0x70, 0xbe, 0x69, 0x04, 0xc4, 0xf2, + 0xa8, 0x4d, 0x98, 0xba, 0x94, 0xf0, 0x9f, 0xc5, 0x28, 0x4e, 0x31, 0xa0, 0x03, 0x4a, 0x6c, 0xd0, + 0x8d, 0x26, 0xcf, 0xd4, 0xbc, 0x58, 0x86, 0x47, 0x73, 0x96, 0xa1, 0x93, 0x48, 0x92, 0x95, 0x58, + 0x95, 0xb9, 0x4b, 0xa9, 0x53, 0x86, 0x27, 0xec, 0xeb, 0xe7, 0x0b, 0xe0, 0xee, 0x0c, 0x3d, 0x7c, + 0x0c, 0x8a, 0x29, 0xae, 0x5c, 0x93, 0x15, 0x69, 0x5a, 0x4c, 0x49, 0x70, 0x9a, 0xf7, 0x8f, 0x97, + 0x85, 0x81, 0xb2, 0x61, 0x9a, 0xc4, 0x0f, 0x48, 0xef, 0xfd, 0x89, 0x4f, 0x98, 0x9a, 0x15, 0x03, + 0xfb, 0xdb, 0x72, 0x6b, 0x32, 0x5e, 0xb9, 0x99, 0x36, 0xc5, 0x93, 0x35, 0x92, 0x2d, 0x59, 0xbc, + 0x79, 0x4b, 0xea, 0xbf, 0x15, 0xb0, 0x72, 0xc3, 0xbd, 0x03, 0xef, 0x83, 0x25, 0x79, 0xcf, 0xc8, + 0x71, 0xde, 0x91, 0xf5, 0x96, 0x24, 0x15, 0x47, 0xe7, 0xd0, 0x00, 0x85, 0x64, 0x0b, 0xc2, 0x2b, + 0x61, 0x6b, 0xce, 0x16, 0x4c, 0x7d, 0xe6, 0xad, 0x65, 0x69, 0x5f, 0xc0, 0xf1, 0xfb, 0x4f, 0x5c, + 0xe1, 0x73, 0x50, 0x38, 0xa4, 0x84, 0xf5, 0x5d, 0xc2, 0x98, 0xfc, 0xd8, 0xee, 0x45, 0x82, 0x17, + 0xd1, 0xc1, 0xd5, 0xa8, 0x06, 0x63, 0xc3, 0x18, 0xc5, 0x89, 0xb2, 0xf5, 0xf4, 0xf4, 0x52, 0xcb, + 0x9c, 0x5d, 0x6a, 0x99, 0x8b, 0x4b, 0x2d, 0xf3, 0x75, 0xac, 0x29, 0xa7, 0x63, 0x4d, 0x39, 0x1b, + 0x6b, 0xca, 0xc5, 0x58, 0x53, 0x7e, 0x8e, 0x35, 0xe5, 0xdb, 0x2f, 0x2d, 0xf3, 0xa1, 0x3a, 0xfb, + 0x37, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x35, 0x6a, 0x0f, 0x60, 0x07, 0x00, 0x00, +} + +func (m *APIGroupDiscovery) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIGroupDiscovery) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APIGroupDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Versions) > 0 { + for iNdEx := len(m.Versions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Versions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *APIGroupDiscoveryList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIGroupDiscoveryList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APIGroupDiscoveryList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *APIResourceDiscovery) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIResourceDiscovery) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APIResourceDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Subresources) > 0 { + for iNdEx := len(m.Subresources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Subresources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.Categories) > 0 { + for iNdEx := len(m.Categories) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Categories[iNdEx]) + copy(dAtA[i:], m.Categories[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Categories[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.ShortNames) > 0 { + for iNdEx := len(m.ShortNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ShortNames[iNdEx]) + copy(dAtA[i:], m.ShortNames[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ShortNames[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Verbs) > 0 { + for iNdEx := len(m.Verbs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Verbs[iNdEx]) + copy(dAtA[i:], m.Verbs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verbs[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + i -= len(m.SingularResource) + copy(dAtA[i:], m.SingularResource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SingularResource))) + i-- + dAtA[i] = 0x22 + i -= len(m.Scope) + copy(dAtA[i:], m.Scope) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scope))) + i-- + dAtA[i] = 0x1a + if m.ResponseKind != nil { + { + size, err := m.ResponseKind.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *APISubresourceDiscovery) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APISubresourceDiscovery) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APISubresourceDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Verbs) > 0 { + for iNdEx := len(m.Verbs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Verbs[iNdEx]) + copy(dAtA[i:], m.Verbs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verbs[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.AcceptedTypes) > 0 { + for iNdEx := len(m.AcceptedTypes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AcceptedTypes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.ResponseKind != nil { + { + size, err := m.ResponseKind.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.Subresource) + copy(dAtA[i:], m.Subresource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *APIVersionDiscovery) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIVersionDiscovery) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *APIVersionDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Freshness) + copy(dAtA[i:], m.Freshness) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Freshness))) + i-- + dAtA[i] = 0x1a + if len(m.Resources) > 0 { + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *APIGroupDiscovery) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Versions) > 0 { + for _, e := range m.Versions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *APIGroupDiscoveryList) Size() (n int) { + if m == nil { + return 0 + } + 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 *APIResourceDiscovery) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Resource) + n += 1 + l + sovGenerated(uint64(l)) + if m.ResponseKind != nil { + l = m.ResponseKind.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.Scope) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.SingularResource) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ShortNames) > 0 { + for _, s := range m.ShortNames { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Categories) > 0 { + for _, s := range m.Categories { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Subresources) > 0 { + for _, e := range m.Subresources { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *APISubresourceDiscovery) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Subresource) + n += 1 + l + sovGenerated(uint64(l)) + if m.ResponseKind != nil { + l = m.ResponseKind.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.AcceptedTypes) > 0 { + for _, e := range m.AcceptedTypes { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *APIVersionDiscovery) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.Freshness) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *APIGroupDiscovery) String() string { + if this == nil { + return "nil" + } + repeatedStringForVersions := "[]APIVersionDiscovery{" + for _, f := range this.Versions { + repeatedStringForVersions += strings.Replace(strings.Replace(f.String(), "APIVersionDiscovery", "APIVersionDiscovery", 1), `&`, ``, 1) + "," + } + repeatedStringForVersions += "}" + s := strings.Join([]string{`&APIGroupDiscovery{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Versions:` + repeatedStringForVersions + `,`, + `}`, + }, "") + return s +} +func (this *APIGroupDiscoveryList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]APIGroupDiscovery{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "APIGroupDiscovery", "APIGroupDiscovery", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&APIGroupDiscoveryList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *APIResourceDiscovery) String() string { + if this == nil { + return "nil" + } + repeatedStringForSubresources := "[]APISubresourceDiscovery{" + for _, f := range this.Subresources { + repeatedStringForSubresources += strings.Replace(strings.Replace(f.String(), "APISubresourceDiscovery", "APISubresourceDiscovery", 1), `&`, ``, 1) + "," + } + repeatedStringForSubresources += "}" + s := strings.Join([]string{`&APIResourceDiscovery{`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `ResponseKind:` + strings.Replace(fmt.Sprintf("%v", this.ResponseKind), "GroupVersionKind", "v1.GroupVersionKind", 1) + `,`, + `Scope:` + fmt.Sprintf("%v", this.Scope) + `,`, + `SingularResource:` + fmt.Sprintf("%v", this.SingularResource) + `,`, + `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, + `ShortNames:` + fmt.Sprintf("%v", this.ShortNames) + `,`, + `Categories:` + fmt.Sprintf("%v", this.Categories) + `,`, + `Subresources:` + repeatedStringForSubresources + `,`, + `}`, + }, "") + return s +} +func (this *APISubresourceDiscovery) String() string { + if this == nil { + return "nil" + } + repeatedStringForAcceptedTypes := "[]GroupVersionKind{" + for _, f := range this.AcceptedTypes { + repeatedStringForAcceptedTypes += fmt.Sprintf("%v", f) + "," + } + repeatedStringForAcceptedTypes += "}" + s := strings.Join([]string{`&APISubresourceDiscovery{`, + `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`, + `ResponseKind:` + strings.Replace(fmt.Sprintf("%v", this.ResponseKind), "GroupVersionKind", "v1.GroupVersionKind", 1) + `,`, + `AcceptedTypes:` + repeatedStringForAcceptedTypes + `,`, + `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, + `}`, + }, "") + return s +} +func (this *APIVersionDiscovery) String() string { + if this == nil { + return "nil" + } + repeatedStringForResources := "[]APIResourceDiscovery{" + for _, f := range this.Resources { + repeatedStringForResources += strings.Replace(strings.Replace(f.String(), "APIResourceDiscovery", "APIResourceDiscovery", 1), `&`, ``, 1) + "," + } + repeatedStringForResources += "}" + s := strings.Join([]string{`&APIVersionDiscovery{`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `Resources:` + repeatedStringForResources + `,`, + `Freshness:` + fmt.Sprintf("%v", this.Freshness) + `,`, + `}`, + }, "") + 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 *APIGroupDiscovery) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIGroupDiscovery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIGroupDiscovery: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Versions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Versions = append(m.Versions, APIVersionDiscovery{}) + if err := m.Versions[len(m.Versions)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APIGroupDiscoveryList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIGroupDiscoveryList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIGroupDiscoveryList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, APIGroupDiscovery{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APIResourceDiscovery) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIResourceDiscovery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIResourceDiscovery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseKind", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseKind == nil { + m.ResponseKind = &v1.GroupVersionKind{} + } + if err := m.ResponseKind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Scope = ResourceScope(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SingularResource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SingularResource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShortNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShortNames = append(m.ShortNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Categories", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Categories = append(m.Categories, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subresources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subresources = append(m.Subresources, APISubresourceDiscovery{}) + if err := m.Subresources[len(m.Subresources)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APISubresourceDiscovery) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APISubresourceDiscovery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APISubresourceDiscovery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subresource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseKind", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseKind == nil { + m.ResponseKind = &v1.GroupVersionKind{} + } + if err := m.ResponseKind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AcceptedTypes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AcceptedTypes = append(m.AcceptedTypes, v1.GroupVersionKind{}) + if err := m.AcceptedTypes[len(m.AcceptedTypes)-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 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APIVersionDiscovery) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIVersionDiscovery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIVersionDiscovery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, APIResourceDiscovery{}) + if err := m.Resources[len(m.Resources)-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 Freshness", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Freshness = DiscoveryFreshness(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 + depth := 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 + } + } + case 1: + iNdEx += 8 + 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 + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/k8s.io/api/apidiscovery/v2/generated.proto b/vendor/k8s.io/api/apidiscovery/v2/generated.proto new file mode 100644 index 00000000000..fa56318a6de --- /dev/null +++ b/vendor/k8s.io/api/apidiscovery/v2/generated.proto @@ -0,0 +1,156 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = "proto2"; + +package k8s.io.api.apidiscovery.v2; + +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"; + +// Package-wide variables from generator "generated". +option go_package = "k8s.io/api/apidiscovery/v2"; + +// APIGroupDiscovery holds information about which resources are being served for all version of the API Group. +// It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version. +// Versions are in descending order of preference, with the first version being the preferred entry. +message APIGroupDiscovery { + // Standard object's metadata. + // The only field completed will be name. For instance, resourceVersion will be empty. + // name is the name of the API group whose discovery information is presented here. + // name is allowed to be "" to represent the legacy, ungroupified resources. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // versions are the versions supported in this group. They are sorted in descending order of preference, + // with the preferred version being the first entry. + // +listType=map + // +listMapKey=version + repeated APIVersionDiscovery versions = 2; +} + +// APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery. +// This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated +// list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers) +// that a cluster supports. +message APIGroupDiscoveryList { + // ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // items is the list of groups for discovery. The groups are listed in priority order. + repeated APIGroupDiscovery items = 2; +} + +// APIResourceDiscovery provides information about an API resource for discovery. +message APIResourceDiscovery { + // resource is the plural name of the resource. This is used in the URL path and is the unique identifier + // for this resource across all versions in the API group. + // Resources with non-empty groups are located at /apis/// + // Resources with empty groups are located at /api/v1/ + optional string resource = 1; + + // responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. + // APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior. + // This value will be null or empty if an APIService reports subresources but supports no operations on the parent resource + optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind responseKind = 2; + + // scope indicates the scope of a resource, either Cluster or Namespaced + optional string scope = 3; + + // singularResource is the singular name of the resource. This allows clients to handle plural and singular opaquely. + // For many clients the singular form of the resource will be more understandable to users reading messages and should be used when integrating the name of the resource into a sentence. + // The command line tool kubectl, for example, allows use of the singular resource name in place of plurals. + // The singular form of a resource should always be an optional element - when in doubt use the canonical resource name. + optional string singularResource = 4; + + // verbs is a list of supported API operation types (this includes + // but is not limited to get, list, watch, create, update, patch, + // delete, deletecollection, and proxy). + // +listType=set + repeated string verbs = 5; + + // shortNames is a list of suggested short names of the resource. + // +listType=set + repeated string shortNames = 6; + + // categories is a list of the grouped resources this resource belongs to (e.g. 'all'). + // Clients may use this to simplify acting on multiple resource types at once. + // +listType=set + repeated string categories = 7; + + // subresources is a list of subresources provided by this resource. Subresources are located at /apis////name-of-instance/ + // +listType=map + // +listMapKey=subresource + repeated APISubresourceDiscovery subresources = 8; +} + +// APISubresourceDiscovery provides information about an API subresource for discovery. +message APISubresourceDiscovery { + // subresource is the name of the subresource. This is used in the URL path and is the unique identifier + // for this resource across all versions. + optional string subresource = 1; + + // responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. + // Some subresources do not return normal resources, these will have null or empty return types. + optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind responseKind = 2; + + // acceptedTypes describes the kinds that this endpoint accepts. + // Subresources may accept the standard content types or define + // custom negotiation schemes. The list may not be exhaustive for + // all operations. + // +listType=map + // +listMapKey=group + // +listMapKey=version + // +listMapKey=kind + repeated k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind acceptedTypes = 3; + + // verbs is a list of supported API operation types (this includes + // but is not limited to get, list, watch, create, update, patch, + // delete, deletecollection, and proxy). Subresources may define + // custom verbs outside the standard Kubernetes verb set. Clients + // should expect the behavior of standard verbs to align with + // Kubernetes interaction conventions. + // +listType=set + repeated string verbs = 4; +} + +// APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group. +message APIVersionDiscovery { + // version is the name of the version within a group version. + optional string version = 1; + + // resources is a list of APIResourceDiscovery objects for the corresponding group version. + // +listType=map + // +listMapKey=resource + repeated APIResourceDiscovery resources = 2; + + // freshness marks whether a group version's discovery document is up to date. + // "Current" indicates the discovery document was recently + // refreshed. "Stale" indicates the discovery document could not + // be retrieved and the returned discovery document may be + // significantly out of date. Clients that require the latest + // version of the discovery information be retrieved before + // performing an operation should not use the aggregated document + optional string freshness = 3; +} + diff --git a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/register.go b/vendor/k8s.io/api/apidiscovery/v2/register.go similarity index 54% rename from vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/register.go rename to vendor/k8s.io/api/apidiscovery/v2/register.go index 228e1cacfa7..dd759defce5 100644 --- a/vendor/github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1/register.go +++ b/vendor/k8s.io/api/apidiscovery/v2/register.go @@ -1,9 +1,20 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of Cilium +/* +Copyright 2024 The Kubernetes Authors. -// Copyright 2019 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -package v1 + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -11,11 +22,11 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -// GroupName is the group name used in this package -const GroupName = "discovery.k8s.io" +// GroupName is the group name for this API. +const GroupName = "apidiscovery.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2"} // Kind takes an unqualified kind and returns a Group qualified GroupKind func Kind(kind string) schema.GroupKind { @@ -28,17 +39,17 @@ func Resource(resource string) schema.GroupResource { } var ( - // SchemeBuilder is the scheme builder with scheme init functions to run for this API package + // SchemeBuilder installs the api group to a scheme SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme + // AddToScheme adds api to a scheme AddToScheme = SchemeBuilder.AddToScheme ) // Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &EndpointSlice{}, - &EndpointSliceList{}, + &APIGroupDiscoveryList{}, + &APIGroupDiscovery{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/k8s.io/api/apidiscovery/v2/types.go b/vendor/k8s.io/api/apidiscovery/v2/types.go new file mode 100644 index 00000000000..f0e31bcde52 --- /dev/null +++ b/vendor/k8s.io/api/apidiscovery/v2/types.go @@ -0,0 +1,155 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery. +// This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated +// list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers) +// that a cluster supports. +type APIGroupDiscoveryList struct { + v1.TypeMeta `json:",inline"` + // ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // items is the list of groups for discovery. The groups are listed in priority order. + Items []APIGroupDiscovery `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// APIGroupDiscovery holds information about which resources are being served for all version of the API Group. +// It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version. +// Versions are in descending order of preference, with the first version being the preferred entry. +type APIGroupDiscovery struct { + v1.TypeMeta `json:",inline"` + // Standard object's metadata. + // The only field completed will be name. For instance, resourceVersion will be empty. + // name is the name of the API group whose discovery information is presented here. + // name is allowed to be "" to represent the legacy, ungroupified resources. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // versions are the versions supported in this group. They are sorted in descending order of preference, + // with the preferred version being the first entry. + // +listType=map + // +listMapKey=version + Versions []APIVersionDiscovery `json:"versions,omitempty" protobuf:"bytes,2,rep,name=versions"` +} + +// APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group. +type APIVersionDiscovery struct { + // version is the name of the version within a group version. + Version string `json:"version" protobuf:"bytes,1,opt,name=version"` + // resources is a list of APIResourceDiscovery objects for the corresponding group version. + // +listType=map + // +listMapKey=resource + Resources []APIResourceDiscovery `json:"resources,omitempty" protobuf:"bytes,2,rep,name=resources"` + // freshness marks whether a group version's discovery document is up to date. + // "Current" indicates the discovery document was recently + // refreshed. "Stale" indicates the discovery document could not + // be retrieved and the returned discovery document may be + // significantly out of date. Clients that require the latest + // version of the discovery information be retrieved before + // performing an operation should not use the aggregated document + Freshness DiscoveryFreshness `json:"freshness,omitempty" protobuf:"bytes,3,opt,name=freshness"` +} + +// APIResourceDiscovery provides information about an API resource for discovery. +type APIResourceDiscovery struct { + // resource is the plural name of the resource. This is used in the URL path and is the unique identifier + // for this resource across all versions in the API group. + // Resources with non-empty groups are located at /apis/// + // Resources with empty groups are located at /api/v1/ + Resource string `json:"resource" protobuf:"bytes,1,opt,name=resource"` + // responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. + // APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior. + // This value will be null or empty if an APIService reports subresources but supports no operations on the parent resource + ResponseKind *v1.GroupVersionKind `json:"responseKind,omitempty" protobuf:"bytes,2,opt,name=responseKind"` + // scope indicates the scope of a resource, either Cluster or Namespaced + Scope ResourceScope `json:"scope" protobuf:"bytes,3,opt,name=scope"` + // singularResource is the singular name of the resource. This allows clients to handle plural and singular opaquely. + // For many clients the singular form of the resource will be more understandable to users reading messages and should be used when integrating the name of the resource into a sentence. + // The command line tool kubectl, for example, allows use of the singular resource name in place of plurals. + // The singular form of a resource should always be an optional element - when in doubt use the canonical resource name. + SingularResource string `json:"singularResource" protobuf:"bytes,4,opt,name=singularResource"` + // verbs is a list of supported API operation types (this includes + // but is not limited to get, list, watch, create, update, patch, + // delete, deletecollection, and proxy). + // +listType=set + Verbs []string `json:"verbs" protobuf:"bytes,5,opt,name=verbs"` + // shortNames is a list of suggested short names of the resource. + // +listType=set + ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,6,rep,name=shortNames"` + // categories is a list of the grouped resources this resource belongs to (e.g. 'all'). + // Clients may use this to simplify acting on multiple resource types at once. + // +listType=set + Categories []string `json:"categories,omitempty" protobuf:"bytes,7,rep,name=categories"` + // subresources is a list of subresources provided by this resource. Subresources are located at /apis////name-of-instance/ + // +listType=map + // +listMapKey=subresource + Subresources []APISubresourceDiscovery `json:"subresources,omitempty" protobuf:"bytes,8,rep,name=subresources"` +} + +// ResourceScope is an enum defining the different scopes available to a resource. +type ResourceScope string + +const ( + ScopeCluster ResourceScope = "Cluster" + ScopeNamespace ResourceScope = "Namespaced" +) + +// DiscoveryFreshness is an enum defining whether the Discovery document published by an apiservice is up to date (fresh). +type DiscoveryFreshness string + +const ( + DiscoveryFreshnessCurrent DiscoveryFreshness = "Current" + DiscoveryFreshnessStale DiscoveryFreshness = "Stale" +) + +// APISubresourceDiscovery provides information about an API subresource for discovery. +type APISubresourceDiscovery struct { + // subresource is the name of the subresource. This is used in the URL path and is the unique identifier + // for this resource across all versions. + Subresource string `json:"subresource" protobuf:"bytes,1,opt,name=subresource"` + // responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns. + // Some subresources do not return normal resources, these will have null or empty return types. + ResponseKind *v1.GroupVersionKind `json:"responseKind,omitempty" protobuf:"bytes,2,opt,name=responseKind"` + // acceptedTypes describes the kinds that this endpoint accepts. + // Subresources may accept the standard content types or define + // custom negotiation schemes. The list may not be exhaustive for + // all operations. + // +listType=map + // +listMapKey=group + // +listMapKey=version + // +listMapKey=kind + AcceptedTypes []v1.GroupVersionKind `json:"acceptedTypes,omitempty" protobuf:"bytes,3,rep,name=acceptedTypes"` + // verbs is a list of supported API operation types (this includes + // but is not limited to get, list, watch, create, update, patch, + // delete, deletecollection, and proxy). Subresources may define + // custom verbs outside the standard Kubernetes verb set. Clients + // should expect the behavior of standard verbs to align with + // Kubernetes interaction conventions. + // +listType=set + Verbs []string `json:"verbs" protobuf:"bytes,4,opt,name=verbs"` +} diff --git a/vendor/k8s.io/api/apidiscovery/v2/zz_generated.deepcopy.go b/vendor/k8s.io/api/apidiscovery/v2/zz_generated.deepcopy.go new file mode 100644 index 00000000000..029aeeab8c8 --- /dev/null +++ b/vendor/k8s.io/api/apidiscovery/v2/zz_generated.deepcopy.go @@ -0,0 +1,190 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIGroupDiscovery) DeepCopyInto(out *APIGroupDiscovery) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]APIVersionDiscovery, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupDiscovery. +func (in *APIGroupDiscovery) DeepCopy() *APIGroupDiscovery { + if in == nil { + return nil + } + out := new(APIGroupDiscovery) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *APIGroupDiscovery) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIGroupDiscoveryList) DeepCopyInto(out *APIGroupDiscoveryList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]APIGroupDiscovery, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupDiscoveryList. +func (in *APIGroupDiscoveryList) DeepCopy() *APIGroupDiscoveryList { + if in == nil { + return nil + } + out := new(APIGroupDiscoveryList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *APIGroupDiscoveryList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIResourceDiscovery) DeepCopyInto(out *APIResourceDiscovery) { + *out = *in + if in.ResponseKind != nil { + in, out := &in.ResponseKind, &out.ResponseKind + *out = new(v1.GroupVersionKind) + **out = **in + } + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ShortNames != nil { + in, out := &in.ShortNames, &out.ShortNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Categories != nil { + in, out := &in.Categories, &out.Categories + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Subresources != nil { + in, out := &in.Subresources, &out.Subresources + *out = make([]APISubresourceDiscovery, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResourceDiscovery. +func (in *APIResourceDiscovery) DeepCopy() *APIResourceDiscovery { + if in == nil { + return nil + } + out := new(APIResourceDiscovery) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APISubresourceDiscovery) DeepCopyInto(out *APISubresourceDiscovery) { + *out = *in + if in.ResponseKind != nil { + in, out := &in.ResponseKind, &out.ResponseKind + *out = new(v1.GroupVersionKind) + **out = **in + } + if in.AcceptedTypes != nil { + in, out := &in.AcceptedTypes, &out.AcceptedTypes + *out = make([]v1.GroupVersionKind, len(*in)) + copy(*out, *in) + } + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APISubresourceDiscovery. +func (in *APISubresourceDiscovery) DeepCopy() *APISubresourceDiscovery { + if in == nil { + return nil + } + out := new(APISubresourceDiscovery) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIVersionDiscovery) DeepCopyInto(out *APIVersionDiscovery) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]APIResourceDiscovery, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIVersionDiscovery. +func (in *APIVersionDiscovery) DeepCopy() *APIVersionDiscovery { + if in == nil { + return nil + } + out := new(APIVersionDiscovery) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/api/apidiscovery/v2beta1/generated.pb.go b/vendor/k8s.io/api/apidiscovery/v2beta1/generated.pb.go index ba6eee1b327..398c5f94f2a 100644 --- a/vendor/k8s.io/api/apidiscovery/v2beta1/generated.pb.go +++ b/vendor/k8s.io/api/apidiscovery/v2beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/apidiscovery/v2beta1/generated.proto +// source: k8s.io/api/apidiscovery/v2beta1/generated.proto package v2beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *APIGroupDiscovery) Reset() { *m = APIGroupDiscovery{} } func (*APIGroupDiscovery) ProtoMessage() {} func (*APIGroupDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_0442b7af4d680cb7, []int{0} + return fileDescriptor_48661e6ba3d554f3, []int{0} } func (m *APIGroupDiscovery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_APIGroupDiscovery proto.InternalMessageInfo func (m *APIGroupDiscoveryList) Reset() { *m = APIGroupDiscoveryList{} } func (*APIGroupDiscoveryList) ProtoMessage() {} func (*APIGroupDiscoveryList) Descriptor() ([]byte, []int) { - return fileDescriptor_0442b7af4d680cb7, []int{1} + return fileDescriptor_48661e6ba3d554f3, []int{1} } func (m *APIGroupDiscoveryList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_APIGroupDiscoveryList proto.InternalMessageInfo func (m *APIResourceDiscovery) Reset() { *m = APIResourceDiscovery{} } func (*APIResourceDiscovery) ProtoMessage() {} func (*APIResourceDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_0442b7af4d680cb7, []int{2} + return fileDescriptor_48661e6ba3d554f3, []int{2} } func (m *APIResourceDiscovery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_APIResourceDiscovery proto.InternalMessageInfo func (m *APISubresourceDiscovery) Reset() { *m = APISubresourceDiscovery{} } func (*APISubresourceDiscovery) ProtoMessage() {} func (*APISubresourceDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_0442b7af4d680cb7, []int{3} + return fileDescriptor_48661e6ba3d554f3, []int{3} } func (m *APISubresourceDiscovery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_APISubresourceDiscovery proto.InternalMessageInfo func (m *APIVersionDiscovery) Reset() { *m = APIVersionDiscovery{} } func (*APIVersionDiscovery) ProtoMessage() {} func (*APIVersionDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_0442b7af4d680cb7, []int{4} + return fileDescriptor_48661e6ba3d554f3, []int{4} } func (m *APIVersionDiscovery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -193,59 +193,58 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apidiscovery/v2beta1/generated.proto", fileDescriptor_0442b7af4d680cb7) + proto.RegisterFile("k8s.io/api/apidiscovery/v2beta1/generated.proto", fileDescriptor_48661e6ba3d554f3) } -var fileDescriptor_0442b7af4d680cb7 = []byte{ - // 754 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x4e, 0xdb, 0x4c, - 0x14, 0x8d, 0x09, 0xf9, 0x48, 0x26, 0xc9, 0xf7, 0x85, 0x01, 0xf4, 0x59, 0x2c, 0x6c, 0x94, 0x4d, - 0xa9, 0xd4, 0xda, 0x25, 0x02, 0xc4, 0x36, 0x29, 0xb4, 0x8d, 0xfa, 0x87, 0x26, 0x15, 0x95, 0xaa, - 0x2e, 0x6a, 0x3b, 0x17, 0xc7, 0x0d, 0xb1, 0xad, 0x99, 0x71, 0x24, 0x76, 0x7d, 0x84, 0xbe, 0x43, - 0x5f, 0x86, 0x55, 0xc5, 0xa2, 0x0b, 0xba, 0x89, 0x4a, 0xfa, 0x00, 0xdd, 0xb3, 0xaa, 0xec, 0x8c, - 0x7f, 0x42, 0x40, 0x44, 0x5d, 0x74, 0x81, 0x84, 0xcf, 0x3d, 0xe7, 0xdc, 0x7b, 0x2e, 0xd7, 0x06, - 0x3d, 0xeb, 0xef, 0x31, 0xcd, 0xf1, 0xf4, 0x7e, 0x60, 0x02, 0x75, 0x81, 0x03, 0xd3, 0x87, 0xe0, - 0x76, 0x3d, 0xaa, 0x8b, 0x82, 0xe1, 0x3b, 0xe1, 0x4f, 0xd7, 0x61, 0x96, 0x37, 0x04, 0x7a, 0xaa, - 0x0f, 0x1b, 0x26, 0x70, 0x63, 0x4b, 0xb7, 0xc1, 0x05, 0x6a, 0x70, 0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0x2a, 0x8c, 0x24, 0xbe, 0xf5, 0xaf, 0x12, 0x5a, 0x9b, 0xc9, 0xf6, 0xc2, 0x61, 0x1c, 0xbf, - 0x9f, 0xc9, 0xa7, 0xcd, 0x97, 0x2f, 0x54, 0x47, 0xe9, 0x92, 0xbe, 0x31, 0x92, 0xc9, 0xf6, 0x16, - 0x15, 0x1c, 0x0e, 0x83, 0x38, 0x58, 0x63, 0x9e, 0x60, 0xd3, 0x43, 0xb6, 0xaa, 0xc2, 0xbe, 0xd0, - 0x0e, 0x8d, 0xc8, 0xc4, 0xaf, 0xfe, 0x65, 0x11, 0xad, 0x36, 0x0f, 0xdb, 0x04, 0x98, 0x17, 0x50, - 0x0b, 0xd2, 0xbf, 0xd7, 0x03, 0x54, 0xa4, 0x02, 0x8c, 0xf2, 0x94, 0xd2, 0xf9, 0x62, 0x32, 0x49, - 0x18, 0xf8, 0x04, 0x55, 0x28, 0x30, 0xdf, 0x73, 0x19, 0x3c, 0x77, 0xdc, 0xae, 0xbc, 0x10, 0x6d, - 0x60, 0x77, 0xbe, 0x0d, 0x44, 0x83, 0x8a, 0x65, 0x87, 0xea, 0x56, 0x6d, 0x3c, 0x52, 0x2b, 0x24, - 0xe3, 0x47, 0xa6, 0xdc, 0xf1, 0x36, 0x2a, 0x30, 0xcb, 0xf3, 0x41, 0xce, 0x47, 0x83, 0x29, 0x71, - 0xb2, 0x4e, 0x08, 0x5e, 0x8d, 0xd4, 0x6a, 0x3c, 0x61, 0x04, 0x90, 0x09, 0x19, 0xef, 0xa3, 0x1a, - 0x73, 0x5c, 0x3b, 0x38, 0x31, 0x68, 0x5c, 0x97, 0x17, 0x23, 0x03, 0x59, 0x18, 0xd4, 0x3a, 0xd7, - 0xea, 0x64, 0x46, 0x81, 0x55, 0x54, 0x18, 0x02, 0x35, 0x99, 0x5c, 0xd8, 0xc8, 0x6f, 0x96, 0x5a, - 0xa5, 0xb0, 0xef, 0x51, 0x08, 0x90, 0x09, 0x8e, 0x35, 0x84,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 0xc5, 0x82, 0x27, 0x71, 0xe1, 0x6a, 0xa4, 0xe2, 0xc4, 0x30, 0x41, 0x49, 0xaa, 0x6c, 0x1d, 0x9c, - 0x5d, 0x2a, 0xb9, 0xf3, 0x4b, 0x25, 0x77, 0x71, 0xa9, 0xe4, 0x3e, 0x8d, 0x15, 0xe9, 0x6c, 0xac, - 0x48, 0xe7, 0x63, 0x45, 0xba, 0x18, 0x2b, 0xd2, 0x8f, 0xb1, 0x22, 0x7d, 0xfe, 0xa9, 0xe4, 0xde, - 0xa9, 0x77, 0xfc, 0x87, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x66, 0x3b, 0x84, 0x9c, 0x07, - 0x00, 0x00, +var fileDescriptor_48661e6ba3d554f3 = []byte{ + // 740 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x4e, 0xdb, 0x4a, + 0x18, 0x8d, 0x09, 0xb9, 0x24, 0x93, 0xe4, 0xde, 0x30, 0x80, 0xae, 0xc5, 0xc2, 0x46, 0xd9, 0x5c, + 0xae, 0xd4, 0x8e, 0x4b, 0x04, 0x88, 0x6d, 0x52, 0x68, 0x15, 0xf5, 0x0f, 0x4d, 0x2a, 0x2a, 0x55, + 0x5d, 0xd4, 0x71, 0x06, 0xc7, 0x85, 0xd8, 0xd6, 0xcc, 0x24, 0x12, 0xbb, 0x3e, 0x42, 0xdf, 0xa1, + 0x2f, 0xc3, 0xaa, 0x62, 0xd1, 0x05, 0xdd, 0x44, 0x25, 0x7d, 0x80, 0xee, 0x59, 0x55, 0x33, 0x1e, + 0xff, 0x84, 0x80, 0x88, 0xba, 0xe8, 0x22, 0x52, 0x7c, 0xe6, 0x9c, 0xf3, 0x7d, 0xe7, 0xcb, 0xe7, + 0x09, 0xb0, 0x4e, 0xf6, 0x18, 0xf2, 0x02, 0xcb, 0x0e, 0x3d, 0xf1, 0x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0x09, 0x27, 0x4b, 0x90, 0x5a, 0xc3, 0x03, 0x50, 0x3a, 0xa6, 0x84, 0xf5, 0x7d, 0xc2, 0x98, 0x7a, + 0xed, 0xfe, 0x8b, 0x05, 0x4f, 0xe2, 0x83, 0xeb, 0xb1, 0x09, 0x13, 0xc3, 0x04, 0xc5, 0xa9, 0xb2, + 0x75, 0x70, 0x7e, 0x65, 0xe4, 0x2e, 0xae, 0x8c, 0xdc, 0xe5, 0x95, 0x91, 0xfb, 0x38, 0x31, 0xb4, + 0xf3, 0x89, 0xa1, 0x5d, 0x4c, 0x0c, 0xed, 0x72, 0x62, 0x68, 0xdf, 0x27, 0x86, 0xf6, 0xe9, 0x87, + 0x91, 0x7b, 0x6b, 0xde, 0xf3, 0x0f, 0xfb, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x85, 0x3b, 0x06, + 0x83, 0x07, 0x00, 0x00, } func (m *APIGroupDiscovery) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go b/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go index 6871da414c3..b0343ffcfb3 100644 --- a/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto +// source: k8s.io/api/apiserverinternal/v1alpha1/generated.proto package v1alpha1 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ServerStorageVersion) Reset() { *m = ServerStorageVersion{} } func (*ServerStorageVersion) ProtoMessage() {} func (*ServerStorageVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{0} + return fileDescriptor_126bcbf538b54729, []int{0} } func (m *ServerStorageVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ServerStorageVersion proto.InternalMessageInfo func (m *StorageVersion) Reset() { *m = StorageVersion{} } func (*StorageVersion) ProtoMessage() {} func (*StorageVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{1} + return fileDescriptor_126bcbf538b54729, []int{1} } func (m *StorageVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_StorageVersion proto.InternalMessageInfo func (m *StorageVersionCondition) Reset() { *m = StorageVersionCondition{} } func (*StorageVersionCondition) ProtoMessage() {} func (*StorageVersionCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{2} + return fileDescriptor_126bcbf538b54729, []int{2} } func (m *StorageVersionCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_StorageVersionCondition proto.InternalMessageInfo func (m *StorageVersionList) Reset() { *m = StorageVersionList{} } func (*StorageVersionList) ProtoMessage() {} func (*StorageVersionList) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{3} + return fileDescriptor_126bcbf538b54729, []int{3} } func (m *StorageVersionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_StorageVersionList proto.InternalMessageInfo func (m *StorageVersionSpec) Reset() { *m = StorageVersionSpec{} } func (*StorageVersionSpec) ProtoMessage() {} func (*StorageVersionSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{4} + return fileDescriptor_126bcbf538b54729, []int{4} } func (m *StorageVersionSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_StorageVersionSpec proto.InternalMessageInfo func (m *StorageVersionStatus) Reset() { *m = StorageVersionStatus{} } func (*StorageVersionStatus) ProtoMessage() {} func (*StorageVersionStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_a3903ff5e3cc7a03, []int{5} + return fileDescriptor_126bcbf538b54729, []int{5} } func (m *StorageVersionStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -221,61 +221,60 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto", fileDescriptor_a3903ff5e3cc7a03) + proto.RegisterFile("k8s.io/api/apiserverinternal/v1alpha1/generated.proto", fileDescriptor_126bcbf538b54729) } -var fileDescriptor_a3903ff5e3cc7a03 = []byte{ - // 790 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x41, 0x4f, 0xdb, 0x48, - 0x14, 0x8e, 0x49, 0x08, 0x30, 0xd9, 0x4d, 0x96, 0x59, 0x10, 0xd9, 0xac, 0xe4, 0xb0, 0x91, 0x58, - 0xb1, 0xbb, 0x5a, 0x7b, 0x89, 0x96, 0xaa, 0xb4, 0x52, 0x2b, 0x0c, 0xa8, 0xa2, 0x85, 0x52, 0x4d, - 0x50, 0x0f, 0xb4, 0x87, 0x4e, 0xec, 0xa9, 0xe3, 0x26, 0xf6, 0x58, 0x9e, 0x49, 0x24, 0x2e, 0x55, - 0x7f, 0x42, 0xfb, 0x3f, 0x7a, 0xec, 0x8f, 0xe0, 0x54, 0x71, 0x44, 0xaa, 0x14, 0x15, 0xf7, 0x5f, - 0x70, 0xaa, 0x66, 0xec, 0x38, 0x38, 0x09, 0x6a, 0xc4, 0x21, 0x52, 0xe6, 0xbd, 0xf7, 0x7d, 0xef, - 0xcd, 0x37, 0xdf, 0x8c, 0xc1, 0xd3, 0xf6, 0x5d, 0xa6, 0x39, 0x54, 0x6f, 0x77, 0x9b, 0x24, 0xf0, - 0x08, 0x27, 0x4c, 0xef, 0x11, 0xcf, 0xa2, 0x81, 0x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, 0x0c, 0xdf, 0x82, 0x12, - 0x4b, 0xc5, 0x59, 0x59, 0x91, 0x43, 0x4d, 0x7d, 0x39, 0x26, 0x3c, 0x9b, 0xc3, 0x67, 0x2e, 0x1d, - 0x67, 0x68, 0xb4, 0x19, 0x3c, 0x02, 0xcb, 0x26, 0x75, 0x5d, 0xea, 0xed, 0x4d, 0x7c, 0x2f, 0x7f, - 0x0b, 0xfb, 0xd5, 0xe5, 0x9d, 0x49, 0x05, 0x68, 0x32, 0x0e, 0x06, 0x00, 0x98, 0x83, 0x2b, 0x10, - 0x3d, 0x98, 0x85, 0xfa, 0x83, 0x5b, 0x09, 0x9c, 0xdc, 0xa4, 0xe1, 0x9b, 0x95, 0x84, 0x18, 0xba, - 0xd6, 0xc5, 0x78, 0x72, 0x76, 0xa9, 0x66, 0xce, 0x2f, 0xd5, 0xcc, 0xc5, 0xa5, 0x9a, 0x79, 0x17, - 0xaa, 0xca, 0x59, 0xa8, 0x2a, 0xe7, 0xa1, 0xaa, 0x5c, 0x84, 0xaa, 0xf2, 0x35, 0x54, 0x95, 0xf7, - 0xdf, 0xd4, 0xcc, 0xc9, 0xda, 0x54, 0x1f, 0xe4, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x3a, - 0x2e, 0x07, 0xd1, 0x07, 0x00, 0x00, +var fileDescriptor_126bcbf538b54729 = []byte{ + // 770 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x41, 0x4f, 0x13, 0x41, + 0x14, 0xee, 0xd2, 0x52, 0x60, 0xaa, 0xad, 0x8c, 0x10, 0x6a, 0x4d, 0xb6, 0xd8, 0x04, 0x83, 0x1a, + 0x77, 0xa5, 0x11, 0x23, 0x9a, 0x68, 0x58, 0x20, 0x06, 0x85, 0x60, 0xa6, 0xc4, 0x03, 0x7a, 0x70, + 0xba, 0x1d, 0xb7, 0x2b, 0xdd, 0x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0xb8, 0x0a, 0x72, 0xd8, 0xb3, 0xc3, 0xd4, 0xf6, + 0x66, 0x51, 0x59, 0x54, 0x96, 0x67, 0x8c, 0x9b, 0xc7, 0xdd, 0x72, 0x2a, 0xe8, 0x96, 0x73, 0xeb, + 0x6f, 0xb7, 0x7b, 0x29, 0x74, 0xb1, 0x0e, 0xae, 0x83, 0x02, 0x71, 0x4d, 0xda, 0xb0, 0x5d, 0x2b, + 0x62, 0x2a, 0x4e, 0x48, 0xe8, 0x42, 0x04, 0x2d, 0x6c, 0x25, 0xd3, 0x68, 0xb0, 0x1e, 0x6e, 0x80, + 0xd9, 0x06, 0x31, 0x69, 0x03, 0xd7, 0x5b, 0xbd, 0x69, 0x58, 0x31, 0xbd, 0x98, 0x5e, 0x9e, 0x31, + 0xe6, 0x83, 0x6e, 0x79, 0x76, 0x73, 0x30, 0x89, 0x86, 0xeb, 0xe1, 0x33, 0x90, 0x97, 0x07, 0xd8, + 0x88, 0x19, 0x32, 0x92, 0x01, 0x06, 0xdd, 0x72, 0xbe, 0x96, 0xc8, 0xa0, 0x81, 0xca, 0xca, 0xcf, + 0x09, 0x90, 0x1f, 0x50, 0xe3, 0x23, 0x98, 0x16, 0x47, 0xd5, 0xc0, 0x1c, 0x4b, 0x29, 0x72, 0xd5, + 0x47, 0x5a, 0xdf, 0x2e, 0xb1, 0xe2, 0x9a, 0x77, 0x68, 0x49, 0xef, 0x68, 0xa2, 0x5a, 0xeb, 0xac, + 0x68, 0x7b, 0xf5, 0xcf, 0xc4, 0xe4, 0xbb, 0x84, 0x63, 0x03, 0x46, 0x0a, 0x80, 0x7e, 0x0c, 0xc5, + 0xac, 0xf0, 0x3d, 0xc8, 0x30, 0x8f, 0x98, 0x52, 0xad, 0x5c, 0x75, 0x4d, 0x1b, 0xcb, 0x8c, 0x5a, + 0x72, 0xcc, 0x9a, 0x47, 0x4c, 0xe3, 0x5a, 0xd4, 0x26, 0x23, 0x56, 0x48, 0x92, 0x42, 0x13, 0x64, + 0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 0xa5, 0xcf, 0x6f, 0x44, 0x2d, 0xa7, 0x7b, 0x91, + 0x0b, 0x2e, 0x3f, 0x00, 0x93, 0x36, 0x27, 0x8e, 0x38, 0xc5, 0xf4, 0x72, 0xae, 0xba, 0x7a, 0x25, + 0x1f, 0x1a, 0xd7, 0xa3, 0x0e, 0x93, 0xdb, 0x82, 0x0b, 0x85, 0x94, 0x95, 0xb9, 0xc1, 0xfd, 0x88, + 0x0b, 0x50, 0xf9, 0x2d, 0x1e, 0xb8, 0x11, 0x36, 0x86, 0x5f, 0x40, 0x81, 0x25, 0xe2, 0xac, 0xa8, + 0xc8, 0xa1, 0xc6, 0xbe, 0x1c, 0x23, 0x9e, 0xcd, 0xfe, 0x33, 0x97, 0x8c, 0x33, 0x34, 0xd8, 0x0c, + 0xee, 0x81, 0x79, 0x93, 0x3a, 0x0e, 0x75, 0xb7, 0x46, 0xbe, 0x97, 0xb7, 0x82, 0x6e, 0x79, 0x7e, + 0x63, 0x54, 0x01, 0x1a, 0x8d, 0x83, 0x3e, 0x00, 0x66, 0xef, 0x0a, 0x84, 0x0f, 0x66, 0xae, 0xfa, + 0xe2, 0x4a, 0x02, 0xc7, 0x37, 0xa9, 0xff, 0x66, 0xc5, 0x21, 0x86, 0x2e, 0x74, 0x31, 0xde, 0x1c, + 0x9f, 0xa9, 0xa9, 0x93, 0x33, 0x35, 0x75, 0x7a, 0xa6, 0xa6, 0xbe, 0x06, 0xaa, 0x72, 0x1c, 0xa8, + 0xca, 0x49, 0xa0, 0x2a, 0xa7, 0x81, 0xaa, 0xfc, 0x09, 0x54, 0xe5, 0xdb, 0x5f, 0x35, 0x75, 0xb0, + 0x34, 0xd6, 0x07, 0xf9, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0x04, 0x7d, 0x78, 0xb8, 0x07, + 0x00, 0x00, } func (m *ServerStorageVersion) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto b/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto index 6e6bab52182..ef442904802 100644 --- a/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto @@ -77,7 +77,6 @@ message StorageVersionCondition { optional int64 observedGeneration = 3; // Last time the condition transitioned from one status to another. - // +required optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; // The reason for the condition's last transition. diff --git a/vendor/k8s.io/api/apiserverinternal/v1alpha1/types.go b/vendor/k8s.io/api/apiserverinternal/v1alpha1/types.go index 0ffcf95f066..31a419abf13 100644 --- a/vendor/k8s.io/api/apiserverinternal/v1alpha1/types.go +++ b/vendor/k8s.io/api/apiserverinternal/v1alpha1/types.go @@ -111,7 +111,6 @@ type StorageVersionCondition struct { // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` // Last time the condition transitioned from one status to another. - // +required LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` // The reason for the condition's last transition. // +required diff --git a/vendor/k8s.io/api/apps/v1/generated.pb.go b/vendor/k8s.io/api/apps/v1/generated.pb.go index 84a7af5994f..ea62a099fed 100644 --- a/vendor/k8s.io/api/apps/v1/generated.pb.go +++ b/vendor/k8s.io/api/apps/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/apps/v1/generated.proto +// source: k8s.io/api/apps/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } func (*ControllerRevision) ProtoMessage() {} func (*ControllerRevision) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{0} + return fileDescriptor_5b781835628d5338, []int{0} } func (m *ControllerRevision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_ControllerRevision proto.InternalMessageInfo func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } func (*ControllerRevisionList) ProtoMessage() {} func (*ControllerRevisionList) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{1} + return fileDescriptor_5b781835628d5338, []int{1} } func (m *ControllerRevisionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_ControllerRevisionList proto.InternalMessageInfo func (m *DaemonSet) Reset() { *m = DaemonSet{} } func (*DaemonSet) ProtoMessage() {} func (*DaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{2} + return fileDescriptor_5b781835628d5338, []int{2} } func (m *DaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_DaemonSet proto.InternalMessageInfo func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } func (*DaemonSetCondition) ProtoMessage() {} func (*DaemonSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{3} + return fileDescriptor_5b781835628d5338, []int{3} } func (m *DaemonSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_DaemonSetCondition proto.InternalMessageInfo func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } func (*DaemonSetList) ProtoMessage() {} func (*DaemonSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{4} + return fileDescriptor_5b781835628d5338, []int{4} } func (m *DaemonSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_DaemonSetList proto.InternalMessageInfo func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } func (*DaemonSetSpec) ProtoMessage() {} func (*DaemonSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{5} + return fileDescriptor_5b781835628d5338, []int{5} } func (m *DaemonSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_DaemonSetSpec proto.InternalMessageInfo func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} func (*DaemonSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{6} + return fileDescriptor_5b781835628d5338, []int{6} } func (m *DaemonSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_DaemonSetStatus proto.InternalMessageInfo func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } func (*DaemonSetUpdateStrategy) ProtoMessage() {} func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{7} + return fileDescriptor_5b781835628d5338, []int{7} } func (m *DaemonSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_DaemonSetUpdateStrategy proto.InternalMessageInfo func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{8} + return fileDescriptor_5b781835628d5338, []int{8} } func (m *Deployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_Deployment proto.InternalMessageInfo func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } func (*DeploymentCondition) ProtoMessage() {} func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{9} + return fileDescriptor_5b781835628d5338, []int{9} } func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo func (m *DeploymentList) Reset() { *m = DeploymentList{} } func (*DeploymentList) ProtoMessage() {} func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{10} + return fileDescriptor_5b781835628d5338, []int{10} } func (m *DeploymentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_DeploymentList proto.InternalMessageInfo func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } func (*DeploymentSpec) ProtoMessage() {} func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{11} + return fileDescriptor_5b781835628d5338, []int{11} } func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } func (*DeploymentStatus) ProtoMessage() {} func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{12} + return fileDescriptor_5b781835628d5338, []int{12} } func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } func (*DeploymentStrategy) ProtoMessage() {} func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{13} + return fileDescriptor_5b781835628d5338, []int{13} } func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } func (*ReplicaSet) ProtoMessage() {} func (*ReplicaSet) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{14} + return fileDescriptor_5b781835628d5338, []int{14} } func (m *ReplicaSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_ReplicaSet proto.InternalMessageInfo func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } func (*ReplicaSetCondition) ProtoMessage() {} func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{15} + return fileDescriptor_5b781835628d5338, []int{15} } func (m *ReplicaSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_ReplicaSetCondition proto.InternalMessageInfo func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } func (*ReplicaSetList) ProtoMessage() {} func (*ReplicaSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{16} + return fileDescriptor_5b781835628d5338, []int{16} } func (m *ReplicaSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_ReplicaSetList proto.InternalMessageInfo func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } func (*ReplicaSetSpec) ProtoMessage() {} func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{17} + return fileDescriptor_5b781835628d5338, []int{17} } func (m *ReplicaSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_ReplicaSetSpec proto.InternalMessageInfo func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } func (*ReplicaSetStatus) ProtoMessage() {} func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{18} + return fileDescriptor_5b781835628d5338, []int{18} } func (m *ReplicaSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +583,7 @@ var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } func (*RollingUpdateDaemonSet) ProtoMessage() {} func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{19} + return fileDescriptor_5b781835628d5338, []int{19} } func (m *RollingUpdateDaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +611,7 @@ var xxx_messageInfo_RollingUpdateDaemonSet proto.InternalMessageInfo func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{20} + return fileDescriptor_5b781835628d5338, []int{20} } func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +639,7 @@ var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{21} + return fileDescriptor_5b781835628d5338, []int{21} } func (m *RollingUpdateStatefulSetStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -667,7 +667,7 @@ var xxx_messageInfo_RollingUpdateStatefulSetStrategy proto.InternalMessageInfo func (m *StatefulSet) Reset() { *m = StatefulSet{} } func (*StatefulSet) ProtoMessage() {} func (*StatefulSet) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{22} + return fileDescriptor_5b781835628d5338, []int{22} } func (m *StatefulSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -695,7 +695,7 @@ var xxx_messageInfo_StatefulSet proto.InternalMessageInfo func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } func (*StatefulSetCondition) ProtoMessage() {} func (*StatefulSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{23} + return fileDescriptor_5b781835628d5338, []int{23} } func (m *StatefulSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -723,7 +723,7 @@ var xxx_messageInfo_StatefulSetCondition proto.InternalMessageInfo func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } func (*StatefulSetList) ProtoMessage() {} func (*StatefulSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{24} + return fileDescriptor_5b781835628d5338, []int{24} } func (m *StatefulSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -751,7 +751,7 @@ var xxx_messageInfo_StatefulSetList proto.InternalMessageInfo func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } func (*StatefulSetOrdinals) ProtoMessage() {} func (*StatefulSetOrdinals) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{25} + return fileDescriptor_5b781835628d5338, []int{25} } func (m *StatefulSetOrdinals) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -781,7 +781,7 @@ func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) Reset() { } func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} func (*StatefulSetPersistentVolumeClaimRetentionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{26} + return fileDescriptor_5b781835628d5338, []int{26} } func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -809,7 +809,7 @@ var xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy proto.Intern func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } func (*StatefulSetSpec) ProtoMessage() {} func (*StatefulSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{27} + return fileDescriptor_5b781835628d5338, []int{27} } func (m *StatefulSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -837,7 +837,7 @@ var xxx_messageInfo_StatefulSetSpec proto.InternalMessageInfo func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } func (*StatefulSetStatus) ProtoMessage() {} func (*StatefulSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{28} + return fileDescriptor_5b781835628d5338, []int{28} } func (m *StatefulSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -865,7 +865,7 @@ var xxx_messageInfo_StatefulSetStatus proto.InternalMessageInfo func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } func (*StatefulSetUpdateStrategy) ProtoMessage() {} func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_e1014cab6f31e43b, []int{29} + return fileDescriptor_5b781835628d5338, []int{29} } func (m *StatefulSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -924,150 +924,149 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apps/v1/generated.proto", fileDescriptor_e1014cab6f31e43b) + proto.RegisterFile("k8s.io/api/apps/v1/generated.proto", fileDescriptor_5b781835628d5338) } -var fileDescriptor_e1014cab6f31e43b = []byte{ - // 2211 bytes of a gzipped FileDescriptorProto +var fileDescriptor_5b781835628d5338 = []byte{ + // 2194 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, 0x15, 0xd7, 0xf2, 0x43, 0xa2, 0x86, 0x96, 0x64, 0x8f, 0x54, 0x89, 0xb1, 0x1b, 0xd2, 0xdd, 0xb8, - 0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 0x37, 0x69, 0x06, 0x11, 0x23, 0x7f, 0x69, 0xb2, 0xe5, 0x61, 0x16, 0xcd, 0xf3, 0xc2, - 0x0b, 0xb8, 0x91, 0x62, 0x43, 0x92, 0x37, 0xc0, 0xcb, 0x60, 0xda, 0x21, 0xd8, 0xb5, 0xcc, 0x4a, - 0x81, 0x8f, 0x22, 0x98, 0x40, 0xc4, 0x5b, 0x91, 0xe8, 0x85, 0x2f, 0x82, 0x19, 0x83, 0xb8, 0x2e, - 0xee, 0x91, 0x4a, 0x91, 0x03, 0x17, 0x04, 0x70, 0x66, 0xd3, 0x6b, 0x46, 0x7e, 0xbf, 0xfa, 0x07, - 0x05, 0xcc, 0x05, 0x33, 0x77, 0x0a, 0xa9, 0xd2, 0x8c, 0xa7, 0xca, 0xf3, 0x47, 0xc6, 0x49, 0x46, - 0x86, 0x7c, 0x92, 0x8f, 0xf8, 0xcc, 0x82, 0x10, 0xfe, 0x14, 0x94, 0x5c, 0xa2, 0x93, 0x0e, 0xb5, - 0x1c, 0xe1, 0xf3, 0x2b, 0x13, 0xfa, 0x8c, 0xf7, 0x88, 0xde, 0x16, 0xa6, 0xcd, 0x33, 0xcc, 0x69, - 0xff, 0x09, 0x05, 0x94, 0xf0, 0xc7, 0xa0, 0x44, 0x89, 0x61, 0xeb, 0x98, 0x12, 0x91, 0x26, 0xb1, - 0xf8, 0x66, 0xe1, 0xc2, 0xc8, 0x76, 0xac, 0xee, 0x1d, 0x01, 0xe3, 0x89, 0x12, 0xcc, 0x83, 0xdf, - 0x8a, 0x02, 0x1a, 0x78, 0x00, 0xe6, 0xfb, 0x76, 0x97, 0x21, 0x29, 0xdb, 0xba, 0x7b, 0x03, 0x11, - 0x3e, 0x57, 0x8f, 0x9c, 0x90, 0xdd, 0x98, 0x49, 0x73, 0x59, 0xbc, 0x60, 0x3e, 0xde, 0x8e, 0x12, - 0xd4, 0x70, 0x0d, 0x2c, 0x18, 0x9a, 0x89, 0x08, 0xee, 0x0e, 0xda, 0x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a, 0x2a, 0x2d, 0x72, 0xe6, 0x4f, 0x85, 0xe9, 0x1a, 0x58, 0x10, 0xc2, 0xc3, 0xef, 0x14, 0x52, - 0x2c, 0x58, 0x9e, 0xdd, 0x78, 0x37, 0x4a, 0xe2, 0xe1, 0x6d, 0x30, 0xe7, 0x70, 0x6d, 0xe5, 0x13, - 0x78, 0xfa, 0xe4, 0x5b, 0x82, 0x60, 0x0e, 0x45, 0x3b, 0x51, 0x1c, 0xcb, 0xb4, 0x49, 0x28, 0x39, - 0x7c, 0x82, 0x42, 0x5c, 0x9b, 0xac, 0x25, 0x01, 0x28, 0x6d, 0x03, 0x37, 0xc1, 0x62, 0xdf, 0x4c, - 0x53, 0x79, 0xb1, 0x76, 0x41, 0x50, 0x2d, 0xee, 0xa6, 0x21, 0x48, 0x66, 0x07, 0x7f, 0x12, 0x93, - 0x2b, 0xd3, 0x7c, 0x17, 0xb9, 0x72, 0x74, 0x3a, 0x4c, 0xac, 0x57, 0x24, 0x3a, 0xaa, 0x34, 0xa9, - 0x8e, 0x52, 0x3f, 0x52, 0x00, 0x4c, 0xa7, 0xe0, 0xd8, 0xc3, 0x7d, 0xca, 0x22, 0x52, 0x22, 0xbb, - 0x72, 0x85, 0x73, 0x75, 0xbc, 0xc2, 0x09, 0x77, 0xd0, 0xc9, 0x24, 0x8e, 0x98, 0xde, 0xd3, 0xb9, - 0x98, 0x99, 0x40, 0xe2, 0x84, 0xfe, 0x3c, 0x99, 0xc4, 0x89, 0xf0, 0x1c, 0x2d, 0x71, 0xfe, 0x99, - 0x03, 0x8b, 0x21, 0x78, 0x62, 0x89, 0x23, 0x31, 0x79, 0x76, 0x39, 0x33, 0x99, 0xec, 0x08, 0xa7, - 0xee, 0xff, 0x44, 0x76, 0x84, 0x0e, 0x65, 0xc8, 0x8e, 0xdf, 0xe7, 0xa2, 0x5e, 0x1f, 0x53, 0x76, - 0x7c, 0x09, 0x57, 0x15, 0x5f, 0x3b, 0xe5, 0xa2, 0x7e, 0x9a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, 0x72, 0x6d, 0x15, 0x10, 0xf8, + 0xfa, 0xe4, 0x5b, 0x82, 0x60, 0x0e, 0xc5, 0x3b, 0x51, 0x12, 0xcb, 0xb4, 0x49, 0x24, 0x39, 0x02, + 0x82, 0x52, 0x52, 0x9b, 0xac, 0xa5, 0x01, 0x28, 0x6b, 0x03, 0x37, 0xc1, 0xe2, 0xc0, 0xca, 0x52, + 0xf9, 0xb1, 0x76, 0x41, 0x50, 0x2d, 0xee, 0x66, 0x21, 0x48, 0x66, 0x07, 0x7f, 0x92, 0x90, 0x2b, + 0xd3, 0x7c, 0x17, 0xb9, 0x72, 0x74, 0x3a, 0x4c, 0xac, 0x57, 0x24, 0x3a, 0xaa, 0x32, 0xa9, 0x8e, + 0x52, 0x3f, 0x54, 0x00, 0xcc, 0xa6, 0xe0, 0xd8, 0xc3, 0x7d, 0xc6, 0x22, 0x56, 0x22, 0x7b, 0x72, + 0x85, 0x73, 0x75, 0xbc, 0xc2, 0x89, 0x76, 0xd0, 0xc9, 0x24, 0x8e, 0x98, 0xde, 0xd3, 0xb9, 0x98, + 0x99, 0x40, 0xe2, 0x44, 0xfe, 0x3c, 0x99, 0xc4, 0x89, 0xf1, 0x1c, 0x2d, 0x71, 0xfe, 0x59, 0x00, + 0x8b, 0x11, 0x78, 0x62, 0x89, 0x23, 0x31, 0xf9, 0xe6, 0x72, 0x66, 0x32, 0xd9, 0x11, 0x4d, 0xdd, + 0xff, 0x89, 0xec, 0x88, 0x1c, 0xca, 0x91, 0x1d, 0xbf, 0x2f, 0xc4, 0xbd, 0x3e, 0xa6, 0xec, 0xf8, + 0x02, 0xae, 0x2a, 0xbe, 0x72, 0xca, 0x45, 0xfd, 0xa4, 0x08, 0xce, 0xa6, 0x53, 0x30, 0x51, 0x07, + 0x95, 0xb1, 0x75, 0x70, 0x07, 0x2c, 0xdd, 0x1b, 0x18, 0xc6, 0x21, 0x1f, 0x43, 0xac, 0x18, 0xfa, + 0x15, 0xf4, 0xdb, 0xc2, 0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f, 0xca, 0xcf, 0xe7, 0xac, 0x17, 0xe2, 0xef, 0x51, + 0x69, 0x3c, 0x7c, 0x3d, 0x48, 0xd6, 0x90, 0x61, 0x86, 0x33, 0xa4, 0xb2, 0x2f, 0x24, 0x48, 0xa1, + 0x9f, 0xe8, 0x23, 0xea, 0x7b, 0x92, 0x8f, 0xa8, 0xab, 0x63, 0xc2, 0x6c, 0xf2, 0x6b, 0x49, 0xe9, + 0xa1, 0xb3, 0x7a, 0xfc, 0x43, 0xa7, 0xfa, 0x17, 0x05, 0x3c, 0x93, 0xbb, 0x4d, 0xc1, 0xb5, 0x84, + 0x7a, 0xbc, 0x96, 0x52, 0x8f, 0xcf, 0xe6, 0x1a, 0xc6, 0x24, 0xa4, 0x29, 0xbf, 0xb1, 0xbc, 0x39, + 0xf6, 0xc6, 0x52, 0x72, 0x12, 0x19, 0x7f, 0x75, 0xd9, 0x7e, 0xf5, 0xe1, 0xa3, 0xfa, 0xd4, 0xa7, + 0x8f, 0xea, 0x53, 0x9f, 0x3d, 0xaa, 0x4f, 0xfd, 0x72, 0x54, 0x57, 0x1e, 0x8e, 0xea, 0xca, 0xa7, + 0xa3, 0xba, 0xf2, 0xd9, 0xa8, 0xae, 0xfc, 0x7d, 0x54, 0x57, 0x7e, 0xfb, 0x79, 0x7d, 0xea, 0x2e, + 0xcc, 0xfe, 0x2b, 0xf3, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xfa, 0xed, 0x70, 0xaa, 0x29, + 0x00, 0x00, } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/apps/v1/generated.proto b/vendor/k8s.io/api/apps/v1/generated.proto index a7a7e7c5471..90014168615 100644 --- a/vendor/k8s.io/api/apps/v1/generated.proto +++ b/vendor/k8s.io/api/apps/v1/generated.proto @@ -200,6 +200,8 @@ message DaemonSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DaemonSetCondition conditions = 10; } @@ -341,6 +343,8 @@ message DeploymentStatus { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DeploymentCondition conditions = 6; // Count of hash collisions for the Deployment. The Deployment controller uses this @@ -475,6 +479,8 @@ message ReplicaSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated ReplicaSetCondition conditions = 6; } @@ -688,6 +694,7 @@ message StatefulSetSpec { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4; // serviceName is the name of the service that governs this StatefulSet. @@ -782,6 +789,8 @@ message StatefulSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated StatefulSetCondition conditions = 10; // Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. diff --git a/vendor/k8s.io/api/apps/v1/types.go b/vendor/k8s.io/api/apps/v1/types.go index 644d368fe4d..96ff6209869 100644 --- a/vendor/k8s.io/api/apps/v1/types.go +++ b/vendor/k8s.io/api/apps/v1/types.go @@ -211,6 +211,7 @@ type StatefulSetSpec struct { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"` // serviceName is the name of the service that governs this StatefulSet. @@ -305,6 +306,8 @@ type StatefulSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` // Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. @@ -507,6 +510,8 @@ type DeploymentStatus struct { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type 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 @@ -714,6 +719,8 @@ type DaemonSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` } @@ -884,6 +891,8 @@ type ReplicaSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/vendor/k8s.io/api/apps/v1beta1/generated.pb.go b/vendor/k8s.io/api/apps/v1beta1/generated.pb.go index 2f1e7c00a18..76e755b4a36 100644 --- a/vendor/k8s.io/api/apps/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/apps/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta1/generated.proto +// source: k8s.io/api/apps/v1beta1/generated.proto package v1beta1 @@ -52,7 +52,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } func (*ControllerRevision) ProtoMessage() {} func (*ControllerRevision) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{0} + return fileDescriptor_2747f709ac7c95e7, []int{0} } func (m *ControllerRevision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +80,7 @@ var xxx_messageInfo_ControllerRevision proto.InternalMessageInfo func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } func (*ControllerRevisionList) ProtoMessage() {} func (*ControllerRevisionList) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{1} + return fileDescriptor_2747f709ac7c95e7, []int{1} } func (m *ControllerRevisionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,7 +108,7 @@ var xxx_messageInfo_ControllerRevisionList proto.InternalMessageInfo func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{2} + return fileDescriptor_2747f709ac7c95e7, []int{2} } func (m *Deployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -136,7 +136,7 @@ var xxx_messageInfo_Deployment proto.InternalMessageInfo func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } func (*DeploymentCondition) ProtoMessage() {} func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{3} + return fileDescriptor_2747f709ac7c95e7, []int{3} } func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +164,7 @@ var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo func (m *DeploymentList) Reset() { *m = DeploymentList{} } func (*DeploymentList) ProtoMessage() {} func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{4} + return fileDescriptor_2747f709ac7c95e7, []int{4} } func (m *DeploymentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +192,7 @@ var xxx_messageInfo_DeploymentList proto.InternalMessageInfo func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} } func (*DeploymentRollback) ProtoMessage() {} func (*DeploymentRollback) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{5} + return fileDescriptor_2747f709ac7c95e7, []int{5} } func (m *DeploymentRollback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +220,7 @@ var xxx_messageInfo_DeploymentRollback proto.InternalMessageInfo func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } func (*DeploymentSpec) ProtoMessage() {} func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{6} + return fileDescriptor_2747f709ac7c95e7, []int{6} } func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +248,7 @@ var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } func (*DeploymentStatus) ProtoMessage() {} func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{7} + return fileDescriptor_2747f709ac7c95e7, []int{7} } func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +276,7 @@ var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } func (*DeploymentStrategy) ProtoMessage() {} func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{8} + return fileDescriptor_2747f709ac7c95e7, []int{8} } func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -304,7 +304,7 @@ var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } func (*RollbackConfig) ProtoMessage() {} func (*RollbackConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{9} + return fileDescriptor_2747f709ac7c95e7, []int{9} } func (m *RollbackConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +332,7 @@ var xxx_messageInfo_RollbackConfig proto.InternalMessageInfo func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{10} + return fileDescriptor_2747f709ac7c95e7, []int{10} } func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +360,7 @@ var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{11} + return fileDescriptor_2747f709ac7c95e7, []int{11} } func (m *RollingUpdateStatefulSetStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,7 +388,7 @@ var xxx_messageInfo_RollingUpdateStatefulSetStrategy proto.InternalMessageInfo func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{12} + return fileDescriptor_2747f709ac7c95e7, []int{12} } func (m *Scale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +416,7 @@ var xxx_messageInfo_Scale proto.InternalMessageInfo func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{13} + return fileDescriptor_2747f709ac7c95e7, []int{13} } func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,7 +444,7 @@ var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{14} + return fileDescriptor_2747f709ac7c95e7, []int{14} } func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,7 +472,7 @@ var xxx_messageInfo_ScaleStatus proto.InternalMessageInfo func (m *StatefulSet) Reset() { *m = StatefulSet{} } func (*StatefulSet) ProtoMessage() {} func (*StatefulSet) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{15} + return fileDescriptor_2747f709ac7c95e7, []int{15} } func (m *StatefulSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +500,7 @@ var xxx_messageInfo_StatefulSet proto.InternalMessageInfo func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } func (*StatefulSetCondition) ProtoMessage() {} func (*StatefulSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{16} + return fileDescriptor_2747f709ac7c95e7, []int{16} } func (m *StatefulSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +528,7 @@ var xxx_messageInfo_StatefulSetCondition proto.InternalMessageInfo func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } func (*StatefulSetList) ProtoMessage() {} func (*StatefulSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{17} + return fileDescriptor_2747f709ac7c95e7, []int{17} } func (m *StatefulSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +556,7 @@ var xxx_messageInfo_StatefulSetList proto.InternalMessageInfo func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } func (*StatefulSetOrdinals) ProtoMessage() {} func (*StatefulSetOrdinals) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{18} + return fileDescriptor_2747f709ac7c95e7, []int{18} } func (m *StatefulSetOrdinals) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -586,7 +586,7 @@ func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) Reset() { } func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} func (*StatefulSetPersistentVolumeClaimRetentionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{19} + return fileDescriptor_2747f709ac7c95e7, []int{19} } func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -614,7 +614,7 @@ var xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy proto.Intern func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } func (*StatefulSetSpec) ProtoMessage() {} func (*StatefulSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{20} + return fileDescriptor_2747f709ac7c95e7, []int{20} } func (m *StatefulSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -642,7 +642,7 @@ var xxx_messageInfo_StatefulSetSpec proto.InternalMessageInfo func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } func (*StatefulSetStatus) ProtoMessage() {} func (*StatefulSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{21} + return fileDescriptor_2747f709ac7c95e7, []int{21} } func (m *StatefulSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -670,7 +670,7 @@ var xxx_messageInfo_StatefulSetStatus proto.InternalMessageInfo func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } func (*StatefulSetUpdateStrategy) ProtoMessage() {} func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_2a07313e8f66e805, []int{22} + return fileDescriptor_2747f709ac7c95e7, []int{22} } func (m *StatefulSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,138 +724,137 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta1/generated.proto", fileDescriptor_2a07313e8f66e805) + proto.RegisterFile("k8s.io/api/apps/v1beta1/generated.proto", fileDescriptor_2747f709ac7c95e7) } -var fileDescriptor_2a07313e8f66e805 = []byte{ - // 2034 bytes of a gzipped FileDescriptorProto +var fileDescriptor_2747f709ac7c95e7 = []byte{ + // 2018 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x52, 0xa2, 0x44, 0x3d, 0x45, 0x54, 0x3c, 0x52, 0x2d, 0x46, 0x69, 0x25, 0x61, 0x63, - 0x24, 0x4a, 0x62, 0x2f, 0x63, 0x25, 0x0d, 0x12, 0xbb, 0x75, 0x2b, 0x4a, 0x6e, 0xec, 0x40, 0x8a, + 0x15, 0xf7, 0x52, 0xa2, 0x44, 0x3d, 0x45, 0x94, 0x3d, 0x52, 0x2d, 0x46, 0x69, 0x25, 0x61, 0x63, + 0xc4, 0x4a, 0x62, 0x2f, 0x63, 0x25, 0x0d, 0x12, 0xbb, 0x75, 0x21, 0x4a, 0x6e, 0xec, 0x40, 0x8a, 0x94, 0x91, 0x64, 0xa3, 0xe9, 0x07, 0x32, 0x22, 0xc7, 0xd4, 0x46, 0xfb, 0x85, 0xdd, 0x21, 0x63, 0xa2, 0x97, 0xfe, 0x01, 0x05, 0xd2, 0x73, 0xff, 0x8a, 0xf6, 0xd4, 0xa2, 0x45, 0x2f, 0x3d, 0x14, 0x3e, 0x06, 0xbd, 0x34, 0x27, 0xa2, 0x66, 0xae, 0xed, 0xad, 0xbd, 0x18, 0x28, 0x50, 0xcc, 0xec, - 0xec, 0xf7, 0xae, 0xb4, 0x2c, 0x60, 0x01, 0xed, 0x8d, 0x3b, 0xef, 0xbd, 0xdf, 0x7b, 0xf3, 0xe6, - 0xbd, 0x37, 0xef, 0x0d, 0xe1, 0xfb, 0x67, 0xef, 0x79, 0x9a, 0x6e, 0x37, 0xcf, 0x7a, 0x27, 0xd4, - 0xb5, 0x28, 0xa3, 0x5e, 0xb3, 0x4f, 0xad, 0x8e, 0xed, 0x36, 0x25, 0x81, 0x38, 0x7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/vendor/k8s.io/api/apps/v1beta1/generated.proto b/vendor/k8s.io/api/apps/v1beta1/generated.proto index 245ec30f421..8965622257d 100644 --- a/vendor/k8s.io/api/apps/v1beta1/generated.proto +++ b/vendor/k8s.io/api/apps/v1beta1/generated.proto @@ -208,6 +208,8 @@ message DeploymentStatus { // Conditions represent the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DeploymentCondition conditions = 6; // collisionCount is the count of hash collisions for the Deployment. The Deployment controller uses this @@ -445,6 +447,7 @@ message StatefulSetSpec { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4; // serviceName is the name of the service that governs this StatefulSet. @@ -536,6 +539,8 @@ message StatefulSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated StatefulSetCondition conditions = 10; // availableReplicas is the total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. diff --git a/vendor/k8s.io/api/apps/v1beta1/types.go b/vendor/k8s.io/api/apps/v1beta1/types.go index 59ed9c2ac3b..bdf9f93a9b7 100644 --- a/vendor/k8s.io/api/apps/v1beta1/types.go +++ b/vendor/k8s.io/api/apps/v1beta1/types.go @@ -251,6 +251,7 @@ type StatefulSetSpec struct { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"` // serviceName is the name of the service that governs this StatefulSet. @@ -342,6 +343,8 @@ type StatefulSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` // availableReplicas is the total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. @@ -577,6 +580,8 @@ type DeploymentStatus struct { // Conditions represent the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` // collisionCount is the count of hash collisions for the Deployment. The Deployment controller uses this diff --git a/vendor/k8s.io/api/apps/v1beta2/generated.pb.go b/vendor/k8s.io/api/apps/v1beta2/generated.pb.go index 6dfb4d5d2a8..1c3d3be5bc6 100644 --- a/vendor/k8s.io/api/apps/v1beta2/generated.pb.go +++ b/vendor/k8s.io/api/apps/v1beta2/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta2/generated.proto +// source: k8s.io/api/apps/v1beta2/generated.proto package v1beta2 @@ -52,7 +52,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ControllerRevision) Reset() { *m = ControllerRevision{} } func (*ControllerRevision) ProtoMessage() {} func (*ControllerRevision) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{0} + return fileDescriptor_c423c016abf485d4, []int{0} } func (m *ControllerRevision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +80,7 @@ var xxx_messageInfo_ControllerRevision proto.InternalMessageInfo func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} } func (*ControllerRevisionList) ProtoMessage() {} func (*ControllerRevisionList) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{1} + return fileDescriptor_c423c016abf485d4, []int{1} } func (m *ControllerRevisionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,7 +108,7 @@ var xxx_messageInfo_ControllerRevisionList proto.InternalMessageInfo func (m *DaemonSet) Reset() { *m = DaemonSet{} } func (*DaemonSet) ProtoMessage() {} func (*DaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{2} + return fileDescriptor_c423c016abf485d4, []int{2} } func (m *DaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -136,7 +136,7 @@ var xxx_messageInfo_DaemonSet proto.InternalMessageInfo func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } func (*DaemonSetCondition) ProtoMessage() {} func (*DaemonSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{3} + return fileDescriptor_c423c016abf485d4, []int{3} } func (m *DaemonSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +164,7 @@ var xxx_messageInfo_DaemonSetCondition proto.InternalMessageInfo func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } func (*DaemonSetList) ProtoMessage() {} func (*DaemonSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{4} + return fileDescriptor_c423c016abf485d4, []int{4} } func (m *DaemonSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +192,7 @@ var xxx_messageInfo_DaemonSetList proto.InternalMessageInfo func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } func (*DaemonSetSpec) ProtoMessage() {} func (*DaemonSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{5} + return fileDescriptor_c423c016abf485d4, []int{5} } func (m *DaemonSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +220,7 @@ var xxx_messageInfo_DaemonSetSpec proto.InternalMessageInfo func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} func (*DaemonSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{6} + return fileDescriptor_c423c016abf485d4, []int{6} } func (m *DaemonSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +248,7 @@ var xxx_messageInfo_DaemonSetStatus proto.InternalMessageInfo func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } func (*DaemonSetUpdateStrategy) ProtoMessage() {} func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{7} + return fileDescriptor_c423c016abf485d4, []int{7} } func (m *DaemonSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +276,7 @@ var xxx_messageInfo_DaemonSetUpdateStrategy proto.InternalMessageInfo func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{8} + return fileDescriptor_c423c016abf485d4, []int{8} } func (m *Deployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -304,7 +304,7 @@ var xxx_messageInfo_Deployment proto.InternalMessageInfo func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } func (*DeploymentCondition) ProtoMessage() {} func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{9} + return fileDescriptor_c423c016abf485d4, []int{9} } func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +332,7 @@ var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo func (m *DeploymentList) Reset() { *m = DeploymentList{} } func (*DeploymentList) ProtoMessage() {} func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{10} + return fileDescriptor_c423c016abf485d4, []int{10} } func (m *DeploymentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +360,7 @@ var xxx_messageInfo_DeploymentList proto.InternalMessageInfo func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } func (*DeploymentSpec) ProtoMessage() {} func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{11} + return fileDescriptor_c423c016abf485d4, []int{11} } func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,7 +388,7 @@ var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } func (*DeploymentStatus) ProtoMessage() {} func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{12} + return fileDescriptor_c423c016abf485d4, []int{12} } func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +416,7 @@ var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } func (*DeploymentStrategy) ProtoMessage() {} func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{13} + return fileDescriptor_c423c016abf485d4, []int{13} } func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,7 +444,7 @@ var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } func (*ReplicaSet) ProtoMessage() {} func (*ReplicaSet) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{14} + return fileDescriptor_c423c016abf485d4, []int{14} } func (m *ReplicaSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,7 +472,7 @@ var xxx_messageInfo_ReplicaSet proto.InternalMessageInfo func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } func (*ReplicaSetCondition) ProtoMessage() {} func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{15} + return fileDescriptor_c423c016abf485d4, []int{15} } func (m *ReplicaSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +500,7 @@ var xxx_messageInfo_ReplicaSetCondition proto.InternalMessageInfo func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } func (*ReplicaSetList) ProtoMessage() {} func (*ReplicaSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{16} + return fileDescriptor_c423c016abf485d4, []int{16} } func (m *ReplicaSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +528,7 @@ var xxx_messageInfo_ReplicaSetList proto.InternalMessageInfo func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } func (*ReplicaSetSpec) ProtoMessage() {} func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{17} + return fileDescriptor_c423c016abf485d4, []int{17} } func (m *ReplicaSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +556,7 @@ var xxx_messageInfo_ReplicaSetSpec proto.InternalMessageInfo func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } func (*ReplicaSetStatus) ProtoMessage() {} func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{18} + return fileDescriptor_c423c016abf485d4, []int{18} } func (m *ReplicaSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -584,7 +584,7 @@ var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } func (*RollingUpdateDaemonSet) ProtoMessage() {} func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{19} + return fileDescriptor_c423c016abf485d4, []int{19} } func (m *RollingUpdateDaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -612,7 +612,7 @@ var xxx_messageInfo_RollingUpdateDaemonSet proto.InternalMessageInfo func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{20} + return fileDescriptor_c423c016abf485d4, []int{20} } func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -640,7 +640,7 @@ var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} } func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {} func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{21} + return fileDescriptor_c423c016abf485d4, []int{21} } func (m *RollingUpdateStatefulSetStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +668,7 @@ var xxx_messageInfo_RollingUpdateStatefulSetStrategy proto.InternalMessageInfo func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{22} + return fileDescriptor_c423c016abf485d4, []int{22} } func (m *Scale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +696,7 @@ var xxx_messageInfo_Scale proto.InternalMessageInfo func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{23} + return fileDescriptor_c423c016abf485d4, []int{23} } func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,7 +724,7 @@ var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{24} + return fileDescriptor_c423c016abf485d4, []int{24} } func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -752,7 +752,7 @@ var xxx_messageInfo_ScaleStatus proto.InternalMessageInfo func (m *StatefulSet) Reset() { *m = StatefulSet{} } func (*StatefulSet) ProtoMessage() {} func (*StatefulSet) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{25} + return fileDescriptor_c423c016abf485d4, []int{25} } func (m *StatefulSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -780,7 +780,7 @@ var xxx_messageInfo_StatefulSet proto.InternalMessageInfo func (m *StatefulSetCondition) Reset() { *m = StatefulSetCondition{} } func (*StatefulSetCondition) ProtoMessage() {} func (*StatefulSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{26} + return fileDescriptor_c423c016abf485d4, []int{26} } func (m *StatefulSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -808,7 +808,7 @@ var xxx_messageInfo_StatefulSetCondition proto.InternalMessageInfo func (m *StatefulSetList) Reset() { *m = StatefulSetList{} } func (*StatefulSetList) ProtoMessage() {} func (*StatefulSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{27} + return fileDescriptor_c423c016abf485d4, []int{27} } func (m *StatefulSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -836,7 +836,7 @@ var xxx_messageInfo_StatefulSetList proto.InternalMessageInfo func (m *StatefulSetOrdinals) Reset() { *m = StatefulSetOrdinals{} } func (*StatefulSetOrdinals) ProtoMessage() {} func (*StatefulSetOrdinals) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{28} + return fileDescriptor_c423c016abf485d4, []int{28} } func (m *StatefulSetOrdinals) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -866,7 +866,7 @@ func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) Reset() { } func (*StatefulSetPersistentVolumeClaimRetentionPolicy) ProtoMessage() {} func (*StatefulSetPersistentVolumeClaimRetentionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{29} + return fileDescriptor_c423c016abf485d4, []int{29} } func (m *StatefulSetPersistentVolumeClaimRetentionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -894,7 +894,7 @@ var xxx_messageInfo_StatefulSetPersistentVolumeClaimRetentionPolicy proto.Intern func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} } func (*StatefulSetSpec) ProtoMessage() {} func (*StatefulSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{30} + return fileDescriptor_c423c016abf485d4, []int{30} } func (m *StatefulSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -922,7 +922,7 @@ var xxx_messageInfo_StatefulSetSpec proto.InternalMessageInfo func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} } func (*StatefulSetStatus) ProtoMessage() {} func (*StatefulSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{31} + return fileDescriptor_c423c016abf485d4, []int{31} } func (m *StatefulSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -950,7 +950,7 @@ var xxx_messageInfo_StatefulSetStatus proto.InternalMessageInfo func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} } func (*StatefulSetUpdateStrategy) ProtoMessage() {} func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_42fe616264472f7e, []int{32} + return fileDescriptor_c423c016abf485d4, []int{32} } func (m *StatefulSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1013,158 +1013,157 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta2/generated.proto", fileDescriptor_42fe616264472f7e) + proto.RegisterFile("k8s.io/api/apps/v1beta2/generated.proto", fileDescriptor_c423c016abf485d4) } -var fileDescriptor_42fe616264472f7e = []byte{ - // 2345 bytes of a gzipped FileDescriptorProto +var fileDescriptor_c423c016abf485d4 = []byte{ + // 2328 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xf7, 0xf2, 0x43, 0x26, 0x87, 0x96, 0x64, 0x8f, 0x54, 0x89, 0x91, 0x5b, 0xd2, 0x58, 0x1b, - 0x8e, 0x12, 0xdb, 0xa4, 0xad, 0x7c, 0x20, 0xb1, 0xdb, 0xa4, 0xa2, 0x94, 0xda, 0x0e, 0xf4, 0xc1, - 0x0c, 0x2d, 0x07, 0x0d, 0xfa, 0xe1, 0x11, 0x39, 0xa6, 0x36, 0x5a, 0xee, 0x2e, 0x76, 0x87, 0x8c, - 0x89, 0x5e, 0x7a, 0x2d, 0x50, 0xa0, 0xed, 0xb5, 0xff, 0x44, 0xd1, 0x4b, 0x51, 0x34, 0xe8, 0xa5, - 0x08, 0x02, 0x1f, 0x83, 0x5e, 0x92, 0x13, 0x51, 0x33, 0xa7, 0xa2, 0xe8, 0xad, 0xbd, 0x18, 0x28, - 0x50, 0xcc, 0xec, 0xec, 0xf7, 0xae, 0xb9, 0x54, 0x6c, 0xe5, 0x03, 0xb9, 0x71, 0xe7, 0xbd, 0xf7, - 0x9b, 0x37, 0x33, 0xef, 0xcd, 0xfb, 0xcd, 0x0c, 0xc1, 0x0f, 0x0f, 0x5f, 0xb3, 0x6a, 0x8a, 0x5e, - 0x3f, 0xec, 0xef, 0x13, 0x53, 0x23, 0x94, 0x58, 0xf5, 0x01, 0xd1, 0x3a, 0xba, 0x59, 0x17, 0x02, - 0x6c, 0x28, 0x75, 0x6c, 0x18, 0x56, 0x7d, 0x70, 0x6d, 0x9f, 0x50, 0xbc, 0x56, 0xef, 0x12, 0x8d, - 0x98, 0x98, 0x92, 0x4e, 0xcd, 0x30, 0x75, 0xaa, 0xc3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34, 0x08, 0x9f, 0x90, 0x62, 0xe3, 0xa2, 0xe3, 0xca, 0x9d, 0xa1, 0x41, - 0x1e, 0x8f, 0xaa, 0x4b, 0x51, 0x0b, 0x26, 0x41, 0xdc, 0x06, 0x6e, 0xb9, 0x4e, 0x66, 0xb8, 0xf5, - 0xcb, 0xc1, 0xae, 0x1f, 0x8f, 0xaa, 0x31, 0x7b, 0x47, 0xcd, 0x45, 0x0a, 0x3a, 0x08, 0x07, 0x00, - 0xaa, 0xd8, 0xa2, 0x77, 0x4c, 0xac, 0x59, 0x76, 0x4f, 0x4a, 0x8f, 0x88, 0xe1, 0xbf, 0x98, 0x6e, - 0xa1, 0x98, 0x45, 0x63, 0x45, 0x78, 0x01, 0xb7, 0x22, 0x68, 0x28, 0xa6, 0x07, 0x78, 0x11, 0xcc, - 0x98, 0x04, 0x5b, 0xba, 0x56, 0xce, 0xf1, 0x51, 0xb8, 0x13, 0x88, 0x78, 0x2b, 0x12, 0x52, 0xf8, - 0x02, 0x38, 0xd9, 0x23, 0x96, 0x85, 0xbb, 0xa4, 0x9c, 0xe7, 0x8a, 0xf3, 0x42, 0xf1, 0xe4, 0xb6, - 0xdd, 0x8c, 0x1c, 0xb9, 0xfc, 0x27, 0x09, 0xcc, 0xba, 0x33, 0x77, 0x0c, 0x99, 0x73, 0x33, 0x98, - 0x39, 0xf2, 0xe4, 0x60, 0x49, 0x48, 0x98, 0x8f, 0xb2, 0x3e, 0xc7, 0x59, 0x38, 0xc2, 0x9f, 0x82, - 0x82, 0x45, 0x54, 0xd2, 0xa6, 0xba, 0x29, 0x1c, 0x7f, 0x29, 0xa5, 0xe3, 0x78, 0x9f, 0xa8, 0x2d, - 0x61, 0xda, 0x38, 0xc5, 0x3c, 0x77, 0xbe, 0x90, 0x0b, 0x09, 0xdf, 0x01, 0x05, 0x4a, 0x7a, 0x86, - 0x8a, 0x29, 0x11, 0x59, 0x73, 0xde, 0xef, 0x3c, 0x8b, 0x19, 0x06, 0xd6, 0xd4,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, 0x9f, - 0x4b, 0x60, 0x39, 0xa1, 0xaa, 0x7e, 0x83, 0x46, 0xf9, 0x57, 0x09, 0x9c, 0x0b, 0x8c, 0x92, 0xa5, - 0x25, 0xb9, 0xdf, 0x57, 0x79, 0x86, 0x0a, 0x26, 0x73, 0x09, 0x14, 0x0d, 0x6c, 0x52, 0xc5, 0xe5, - 0xc1, 0xf9, 0xc6, 0xec, 0x78, 0x54, 0x2d, 0x36, 0x9d, 0x46, 0xe4, 0xc9, 0x63, 0xe6, 0x26, 0xf3, - 0xec, 0xe6, 0x46, 0xfe, 0x9f, 0x04, 0xf2, 0xad, 0x36, 0x56, 0xc9, 0x31, 0x10, 0x97, 0xcd, 0x00, - 0x71, 0x49, 0x7e, 0x14, 0xe0, 0xfe, 0x24, 0x72, 0x96, 0xad, 0x10, 0x67, 0xb9, 0x30, 0x01, 0xe7, - 0xc9, 0x74, 0xe5, 0x75, 0x50, 0x74, 0xbb, 0x9b, 0x6e, 0x2f, 0x95, 0x7f, 0x9f, 0x01, 0x25, 0x5f, - 0x17, 0x53, 0xee, 0xc4, 0xf7, 0x02, 0xe5, 0x87, 0xed, 0x31, 0x6b, 0x69, 0x06, 0x52, 0x73, 0x4a, - 0xcd, 0x5b, 0x1a, 0x35, 0xfd, 0x67, 0xd5, 0x68, 0x05, 0x7a, 0x03, 0xcc, 0x51, 0x6c, 0x76, 0x09, - 0x75, 0x64, 0x7c, 0xc2, 0x8a, 0xde, 0xdd, 0xcd, 0x9d, 0x80, 0x14, 0x85, 0xb4, 0x57, 0x6e, 0x80, - 0xd9, 0x40, 0x67, 0xf0, 0x34, 0xc8, 0x1e, 0x92, 0xa1, 0xcd, 0xe0, 0x10, 0xfb, 0x09, 0x17, 0x41, - 0x7e, 0x80, 0xd5, 0xbe, 0x1d, 0xa2, 0x45, 0x64, 0x7f, 0x5c, 0xcf, 0xbc, 0x26, 0xc9, 0xbf, 0x61, - 0x93, 0xe3, 0xa5, 0xc2, 0x31, 0x44, 0xd7, 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6c, 0x2d, 0x0b, 0x80, 0xf9, 0xad, 0xb0, 0x18, + 0x45, 0xf5, 0xe1, 0x26, 0x58, 0x74, 0x37, 0xe0, 0x5b, 0x8a, 0x4d, 0x0d, 0x6b, 0xb8, 0xa9, 0x68, + 0x0a, 0xad, 0xce, 0x70, 0x9c, 0xea, 0x78, 0x54, 0x5f, 0x44, 0x09, 0x72, 0x94, 0x68, 0x25, 0xff, + 0x76, 0x06, 0xcc, 0x47, 0xf6, 0x05, 0x78, 0x17, 0x2c, 0x75, 0x07, 0x96, 0x45, 0x74, 0xba, 0x3d, + 0xd0, 0xf6, 0x88, 0xd5, 0xe9, 0xee, 0x93, 0xde, 0x40, 0x25, 0x3d, 0xbe, 0xac, 0xc5, 0x56, 0x4d, + 0xf8, 0xba, 0xb4, 0x9e, 0xa8, 0x85, 0x52, 0xac, 0xe1, 0x3b, 0x00, 0xea, 0xbc, 0x69, 0x4b, 0xb1, + 0x6d, 0x0f, 0x33, 0xc7, 0x31, 0xbd, 0x54, 0xdc, 0x8e, 0x69, 0xa0, 0x04, 0x2b, 0xe6, 0x63, 0x8f, + 0xd8, 0x8a, 0x45, 0x7a, 0x51, 0x1f, 0xf3, 0x61, 0x1f, 0x37, 0x12, 0xb5, 0x50, 0x8a, 0x35, 0x7c, + 0x15, 0x54, 0x9c, 0xde, 0xf8, 0x9c, 0x8b, 0xc5, 0x59, 0x10, 0x60, 0x95, 0x6d, 0x5f, 0x84, 0x82, + 0x7a, 0x6c, 0x68, 0xc6, 0x9e, 0x4d, 0xac, 0x03, 0xd2, 0xbb, 0xe9, 0x90, 0x03, 0x56, 0x41, 0x8b, + 0xbc, 0x82, 0x7a, 0x43, 0xdb, 0x89, 0x69, 0xa0, 0x04, 0x2b, 0x36, 0x34, 0x27, 0x6a, 0x62, 0x43, + 0x9b, 0x09, 0x0f, 0x6d, 0x37, 0x51, 0x0b, 0xa5, 0x58, 0xb3, 0xd8, 0x73, 0x5c, 0x5e, 0x3b, 0xc0, + 0x8a, 0x8a, 0xf7, 0x54, 0x52, 0x3d, 0x1e, 0x8e, 0xbd, 0xed, 0xb0, 0x18, 0x45, 0xf5, 0xe1, 0x4d, + 0x70, 0xca, 0x69, 0xda, 0xd5, 0xb1, 0x07, 0x52, 0xe2, 0x20, 0x2f, 0x08, 0x90, 0x53, 0xdb, 0x51, + 0x05, 0x14, 0xb7, 0x81, 0xd7, 0xc1, 0x5c, 0xd7, 0x50, 0x55, 0x1e, 0x8f, 0xeb, 0xc6, 0x40, 0xa7, + 0xd5, 0x32, 0x47, 0x81, 0x2c, 0x87, 0xd6, 0x43, 0x12, 0x14, 0xd1, 0x84, 0x3f, 0x03, 0xa0, 0xeb, + 0x16, 0x06, 0xbb, 0x0a, 0x26, 0x30, 0x80, 0x78, 0x59, 0xf2, 0x2b, 0xb3, 0xd7, 0x64, 0xa3, 0x00, + 0xa4, 0xfc, 0xb1, 0x04, 0x96, 0x53, 0x12, 0x1d, 0xbe, 0x15, 0x2a, 0x82, 0x97, 0x22, 0x45, 0xf0, + 0x4c, 0x8a, 0x59, 0xa0, 0x12, 0xee, 0x83, 0x59, 0x46, 0x48, 0x14, 0xbd, 0xef, 0xa8, 0x88, 0xbd, + 0xac, 0x99, 0x3a, 0x00, 0x14, 0xd4, 0xf6, 0x77, 0xe5, 0x53, 0xe3, 0x51, 0x7d, 0x36, 0x24, 0x43, + 0x61, 0x60, 0xf9, 0x57, 0x39, 0x00, 0x36, 0x88, 0xa9, 0x1a, 0x43, 0x8d, 0xe8, 0x47, 0xc1, 0x69, + 0x6e, 0x87, 0x38, 0xcd, 0xc5, 0xf4, 0x25, 0xf1, 0x9c, 0x4a, 0x25, 0x35, 0xef, 0x46, 0x48, 0xcd, + 0x8b, 0x59, 0xc0, 0x9e, 0xce, 0x6a, 0x3e, 0xcb, 0x83, 0x05, 0x5f, 0xd9, 0xa7, 0x35, 0x37, 0x42, + 0x2b, 0x7a, 0x31, 0xb2, 0xa2, 0xcb, 0x09, 0x26, 0xcf, 0x8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 0xea, 0x1a, 0x98, 0x17, 0xb4, 0xc4, 0x15, 0x0a, 0xa2, 0xe6, 0x2d, 0xcf, 0x6e, 0x58, 0x8c, 0xa2, + 0xfa, 0xf0, 0x06, 0x98, 0xb5, 0x38, 0xf3, 0x72, 0x01, 0x1c, 0xf6, 0xf2, 0x1d, 0x01, 0x30, 0x8b, + 0x82, 0x42, 0x14, 0xd6, 0x65, 0xcc, 0xc5, 0x27, 0x24, 0x2e, 0x40, 0x21, 0xcc, 0x5c, 0xd6, 0xa2, + 0x0a, 0x28, 0x6e, 0x03, 0xb7, 0xc0, 0xc2, 0x40, 0x8f, 0x43, 0x39, 0xb1, 0x76, 0x46, 0x40, 0x2d, + 0xec, 0xc6, 0x55, 0x50, 0x92, 0x1d, 0xbc, 0x17, 0x22, 0x33, 0x33, 0x7c, 0x3f, 0xb9, 0x9c, 0x21, + 0x27, 0x32, 0xb3, 0x99, 0x04, 0xaa, 0x55, 0xca, 0x4a, 0xb5, 0xe4, 0x8f, 0x24, 0x00, 0xe3, 0x79, + 0x38, 0xf1, 0x26, 0x20, 0x66, 0x11, 0xa8, 0x98, 0x4a, 0x32, 0xff, 0xb9, 0x9a, 0x91, 0xff, 0xf8, + 0x1b, 0x6a, 0x36, 0x02, 0x24, 0x26, 0xfa, 0x68, 0x2e, 0x75, 0xb2, 0x12, 0x20, 0xdf, 0xa9, 0x67, + 0x40, 0x80, 0x02, 0x60, 0x4f, 0x27, 0x40, 0xff, 0xcc, 0x81, 0x05, 0x5f, 0x39, 0x33, 0x01, 0x4a, + 0x30, 0xf9, 0xf6, 0x62, 0x27, 0x1b, 0x29, 0xf1, 0xa7, 0xee, 0xff, 0x89, 0x94, 0xf8, 0x5e, 0xa5, + 0x90, 0x92, 0xdf, 0xe7, 0x82, 0xae, 0x4f, 0x49, 0x4a, 0x9e, 0xc1, 0x0d, 0xc7, 0xd7, 0x8e, 0xd7, + 0xc8, 0x9f, 0xe4, 0xc1, 0xc9, 0x68, 0x1e, 0x86, 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b2, 0xc4, 0x5a, + 0xf6, 0xab, 0xf2, 0xc4, 0x4b, 0x8f, 0xca, 0xf4, 0x97, 0x1e, 0xf2, 0xdf, 0x24, 0xf0, 0x42, 0xea, + 0xae, 0x05, 0xd7, 0x42, 0xb4, 0xf2, 0x4a, 0x84, 0x56, 0x7e, 0x2f, 0xd5, 0x30, 0xc0, 0x2d, 0xad, + 0xe4, 0x5b, 0xf4, 0x37, 0xb2, 0xdd, 0xa2, 0x27, 0x9c, 0x84, 0x27, 0x5f, 0xa7, 0xb7, 0x7e, 0xf0, + 0xe8, 0x71, 0xed, 0xd8, 0xa7, 0x8f, 0x6b, 0xc7, 0x3e, 0x7f, 0x5c, 0x3b, 0xf6, 0x8b, 0x71, 0x4d, + 0x7a, 0x34, 0xae, 0x49, 0x9f, 0x8e, 0x6b, 0xd2, 0xe7, 0xe3, 0x9a, 0xf4, 0xf7, 0x71, 0x4d, 0xfa, + 0xcd, 0x17, 0xb5, 0x63, 0xef, 0x2f, 0xa7, 0xfc, 0xe9, 0xf8, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xa4, 0x79, 0xcd, 0x52, 0x8e, 0x2c, 0x00, 0x00, } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/apps/v1beta2/generated.proto b/vendor/k8s.io/api/apps/v1beta2/generated.proto index ddbe3544114..3ae8a80094a 100644 --- a/vendor/k8s.io/api/apps/v1beta2/generated.proto +++ b/vendor/k8s.io/api/apps/v1beta2/generated.proto @@ -204,6 +204,8 @@ message DaemonSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DaemonSetCondition conditions = 10; } @@ -346,6 +348,8 @@ message DeploymentStatus { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DeploymentCondition conditions = 6; // Count of hash collisions for the Deployment. The Deployment controller uses this @@ -481,6 +485,8 @@ message ReplicaSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated ReplicaSetCondition conditions = 6; } @@ -733,6 +739,7 @@ message StatefulSetSpec { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4; // serviceName is the name of the service that governs this StatefulSet. @@ -824,6 +831,8 @@ message StatefulSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated StatefulSetCondition conditions = 10; // Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. diff --git a/vendor/k8s.io/api/apps/v1beta2/types.go b/vendor/k8s.io/api/apps/v1beta2/types.go index a97ac6fcf0b..6981c2a1758 100644 --- a/vendor/k8s.io/api/apps/v1beta2/types.go +++ b/vendor/k8s.io/api/apps/v1beta2/types.go @@ -261,6 +261,7 @@ type StatefulSetSpec struct { // any volumes in the template, with the same name. // TODO: Define the behavior if a claim already exists with the same name. // +optional + // +listType=atomic VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"` // serviceName is the name of the service that governs this StatefulSet. @@ -352,6 +353,8 @@ type StatefulSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` // Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. @@ -555,6 +558,8 @@ type DeploymentStatus struct { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type 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 @@ -765,6 +770,8 @@ type DaemonSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` } @@ -951,6 +958,8 @@ type ReplicaSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/vendor/k8s.io/api/authentication/v1/generated.pb.go b/vendor/k8s.io/api/authentication/v1/generated.pb.go index 304bbd0744d..6d922030c1c 100644 --- a/vendor/k8s.io/api/authentication/v1/generated.pb.go +++ b/vendor/k8s.io/api/authentication/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1/generated.proto +// source: k8s.io/api/authentication/v1/generated.proto package v1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *BoundObjectReference) Reset() { *m = BoundObjectReference{} } func (*BoundObjectReference) ProtoMessage() {} func (*BoundObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{0} + return fileDescriptor_d1237cbf54dccd53, []int{0} } func (m *BoundObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_BoundObjectReference proto.InternalMessageInfo func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{1} + return fileDescriptor_d1237cbf54dccd53, []int{1} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_ExtraValue proto.InternalMessageInfo func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } func (*SelfSubjectReview) ProtoMessage() {} func (*SelfSubjectReview) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{2} + return fileDescriptor_d1237cbf54dccd53, []int{2} } func (m *SelfSubjectReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_SelfSubjectReview proto.InternalMessageInfo func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } func (*SelfSubjectReviewStatus) ProtoMessage() {} func (*SelfSubjectReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{3} + return fileDescriptor_d1237cbf54dccd53, []int{3} } func (m *SelfSubjectReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_SelfSubjectReviewStatus proto.InternalMessageInfo func (m *TokenRequest) Reset() { *m = TokenRequest{} } func (*TokenRequest) ProtoMessage() {} func (*TokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{4} + return fileDescriptor_d1237cbf54dccd53, []int{4} } func (m *TokenRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_TokenRequest proto.InternalMessageInfo func (m *TokenRequestSpec) Reset() { *m = TokenRequestSpec{} } func (*TokenRequestSpec) ProtoMessage() {} func (*TokenRequestSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{5} + return fileDescriptor_d1237cbf54dccd53, []int{5} } func (m *TokenRequestSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +217,7 @@ var xxx_messageInfo_TokenRequestSpec proto.InternalMessageInfo func (m *TokenRequestStatus) Reset() { *m = TokenRequestStatus{} } func (*TokenRequestStatus) ProtoMessage() {} func (*TokenRequestStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{6} + return fileDescriptor_d1237cbf54dccd53, []int{6} } func (m *TokenRequestStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -245,7 +245,7 @@ var xxx_messageInfo_TokenRequestStatus proto.InternalMessageInfo func (m *TokenReview) Reset() { *m = TokenReview{} } func (*TokenReview) ProtoMessage() {} func (*TokenReview) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{7} + return fileDescriptor_d1237cbf54dccd53, []int{7} } func (m *TokenReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -273,7 +273,7 @@ var xxx_messageInfo_TokenReview proto.InternalMessageInfo func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} } func (*TokenReviewSpec) ProtoMessage() {} func (*TokenReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{8} + return fileDescriptor_d1237cbf54dccd53, []int{8} } func (m *TokenReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -301,7 +301,7 @@ var xxx_messageInfo_TokenReviewSpec proto.InternalMessageInfo func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} } func (*TokenReviewStatus) ProtoMessage() {} func (*TokenReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{9} + return fileDescriptor_d1237cbf54dccd53, []int{9} } func (m *TokenReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -329,7 +329,7 @@ var xxx_messageInfo_TokenReviewStatus proto.InternalMessageInfo func (m *UserInfo) Reset() { *m = UserInfo{} } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_2953ea822e7ffe1e, []int{10} + return fileDescriptor_d1237cbf54dccd53, []int{10} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -370,71 +370,71 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1/generated.proto", fileDescriptor_2953ea822e7ffe1e) -} - -var fileDescriptor_2953ea822e7ffe1e = []byte{ - // 958 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4b, 0x6f, 0x23, 0x45, - 0x10, 0xf6, 0xf8, 0x11, 0xd9, 0xe5, 0x4d, 0x48, 0x7a, 0x59, 0x61, 0x85, 0xc5, 0x0e, 0xb3, 0x12, - 0x8a, 0x80, 0x9d, 0xd9, 0x58, 0x3c, 0x56, 0x8b, 0x84, 0x94, 0x21, 0x16, 0x58, 0x08, 0x76, 0xd5, - 0x4e, 0x02, 0x42, 0x42, 0xa2, 0x3d, 0xae, 0x38, 0x83, 0x77, 0x1e, 0xcc, 0xf4, 0x98, 0xf5, 0x6d, - 0x7f, 0x02, 0x47, 0x90, 0x38, 0xf0, 0x23, 0x90, 0xf8, 0x0b, 0x39, 0xae, 0x10, 0x87, 0x3d, 0x20, - 0x8b, 0x0c, 0x57, 0x8e, 0x9c, 0x38, 0xa1, 0xee, 0xe9, 0xf8, 0x99, 0x4c, 0x7c, 0xda, 0x9b, 0xa7, - 0x1e, 0x5f, 0x55, 0x7d, 0x55, 0x5d, 0x65, 0x68, 0x0d, 0xee, 0x47, 0x86, 0xe3, 0x9b, 0x83, 0xb8, - 0x8b, 0xa1, 0x87, 0x1c, 0x23, 0x73, 0x88, 0x5e, 0xcf, 0x0f, 0x4d, 0xa5, 0x60, 0x81, 0x63, 0xb2, - 0x98, 0x9f, 0xa2, 0xc7, 0x1d, 0x9b, 0x71, 0xc7, 0xf7, 0xcc, 0xe1, 0x9e, 0xd9, 0x47, 0x0f, 0x43, - 0xc6, 0xb1, 0x67, 0x04, 0xa1, 0xcf, 0x7d, 0x72, 0x3b, 0xb5, 0x36, 0x58, 0xe0, 0x18, 0xf3, 0xd6, - 0xc6, 0x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0x64, 0x37, 0x3b, 0xee, 0xf4, - 0xbc, 0xd3, 0xd4, 0xed, 0x41, 0xfe, 0xbe, 0x66, 0x59, 0x67, 0xe7, 0xf5, 0xdc, 0xb3, 0xf3, 0x7a, - 0xee, 0xf9, 0x79, 0x3d, 0xf7, 0x34, 0xa9, 0x6b, 0x67, 0x49, 0x5d, 0x7b, 0x96, 0xd4, 0xb5, 0xe7, - 0x49, 0x5d, 0xfb, 0x2b, 0xa9, 0x6b, 0x3f, 0xfc, 0x5d, 0xcf, 0x7d, 0x75, 0x3b, 0xeb, 0xcf, 0xe0, - 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x9a, 0x38, 0x17, 0x44, 0x0a, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/authentication/v1/generated.proto", fileDescriptor_d1237cbf54dccd53) +} + +var fileDescriptor_d1237cbf54dccd53 = []byte{ + // 947 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4b, 0x6f, 0x23, 0xc5, + 0x13, 0xf7, 0xf8, 0x11, 0xd9, 0xe5, 0x4d, 0xfe, 0x49, 0xef, 0x7f, 0x85, 0x15, 0x16, 0x4f, 0x98, + 0x95, 0x50, 0x04, 0xbb, 0x33, 0x1b, 0x8b, 0xc7, 0x6a, 0x91, 0x90, 0x32, 0xc4, 0x02, 0x0b, 0xc1, + 0xae, 0xda, 0x49, 0x40, 0x48, 0x48, 0xb4, 0xc7, 0x1d, 0xa7, 0xf1, 0xce, 0x83, 0x99, 0x1e, 0xb3, + 0xbe, 0xed, 0x47, 0xe0, 0x08, 0x12, 0x07, 0x3e, 0x04, 0x12, 0x5f, 0x21, 0xc7, 0x15, 0xe2, 0xb0, + 0x07, 0x64, 0x91, 0xe1, 0xca, 0x91, 0x13, 0x27, 0xd4, 0x3d, 0x1d, 0xdb, 0x63, 0x27, 0x13, 0x9f, + 0xf6, 0xe6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52, 0x82, 0x95, 0x06, 0x1d, + 0x43, 0x85, 0x8a, 0xdb, 0x29, 0x6b, 0xa9, 0xb7, 0xf6, 0x56, 0xa3, 0xc6, 0x94, 0xf7, 0xb6, 0xed, + 0xf1, 0x70, 0x3c, 0x57, 0x95, 0x90, 0xe1, 0x14, 0x6e, 0xbb, 0xa7, 0x6e, 0xb2, 0xb4, 0x41, 0x9b, + 0x50, 0x1a, 0xd2, 0x71, 0x5a, 0x11, 0x16, 0x3f, 0xd1, 0x07, 0x50, 0x19, 0x89, 0x73, 0xad, 0x5a, + 0xb2, 0x9b, 0x1f, 0x77, 0x76, 0xde, 0x71, 0xea, 0xf6, 0xb0, 0xf8, 0x40, 0xb3, 0xed, 0xb3, 0xf3, + 0x66, 0xe1, 0xf9, 0x79, 0xb3, 0xf0, 0xe2, 0xbc, 0x59, 0x78, 0x96, 0x34, 0xb5, 0xb3, 0xa4, 0xa9, + 0x3d, 0x4f, 0x9a, 0xda, 0x8b, 0xa4, 0xa9, 0xfd, 0x99, 0x34, 0xb5, 0xef, 0xff, 0x6a, 0x16, 0xbe, + 0xbc, 0x9d, 0xf7, 0x67, 0xf0, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xb7, 0xc1, 0xa0, 0x2b, + 0x0a, 0x00, 0x00, } func (m *BoundObjectReference) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/authentication/v1/generated.proto b/vendor/k8s.io/api/authentication/v1/generated.proto index 1632070c872..1fe2f4f2cec 100644 --- a/vendor/k8s.io/api/authentication/v1/generated.proto +++ b/vendor/k8s.io/api/authentication/v1/generated.proto @@ -99,6 +99,7 @@ message TokenRequestSpec { // 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. + // +listType=atomic repeated string audiences = 1; // ExpirationSeconds is the requested duration of validity of the request. The @@ -154,6 +155,7 @@ message TokenReviewSpec { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic repeated string audiences = 2; } @@ -177,6 +179,7 @@ message TokenReviewStatus { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic repeated string audiences = 4; // Error indicates that the token couldn't be checked @@ -199,6 +202,7 @@ message UserInfo { // The names of groups this user is a part of. // +optional + // +listType=atomic repeated string groups = 3; // Any additional information provided by the authenticator. diff --git a/vendor/k8s.io/api/authentication/v1/types.go b/vendor/k8s.io/api/authentication/v1/types.go index b498007c000..4f4400e305c 100644 --- a/vendor/k8s.io/api/authentication/v1/types.go +++ b/vendor/k8s.io/api/authentication/v1/types.go @@ -75,6 +75,7 @@ type TokenReviewSpec struct { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,2,rep,name=audiences"` } @@ -96,6 +97,7 @@ type TokenReviewStatus struct { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,4,rep,name=audiences"` // Error indicates that the token couldn't be checked // +optional @@ -115,6 +117,7 @@ type UserInfo struct { UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"` // The names of groups this user is a part of. // +optional + // +listType=atomic Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"` // Any additional information provided by the authenticator. // +optional @@ -156,6 +159,7 @@ type TokenRequestSpec struct { // 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. + // +listType=atomic Audiences []string `json:"audiences" protobuf:"bytes,1,rep,name=audiences"` // ExpirationSeconds is the requested duration of validity of the request. The diff --git a/vendor/k8s.io/api/authentication/v1alpha1/generated.pb.go b/vendor/k8s.io/api/authentication/v1alpha1/generated.pb.go index ea274ac07b8..98c106ec65a 100644 --- a/vendor/k8s.io/api/authentication/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/authentication/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1alpha1/generated.proto +// source: k8s.io/api/authentication/v1alpha1/generated.proto package v1alpha1 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } func (*SelfSubjectReview) ProtoMessage() {} func (*SelfSubjectReview) Descriptor() ([]byte, []int) { - return fileDescriptor_05a77aeb710b43c2, []int{0} + return fileDescriptor_f003acd72d3d5efb, []int{0} } func (m *SelfSubjectReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_SelfSubjectReview proto.InternalMessageInfo func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } func (*SelfSubjectReviewStatus) ProtoMessage() {} func (*SelfSubjectReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_05a77aeb710b43c2, []int{1} + return fileDescriptor_f003acd72d3d5efb, []int{1} } func (m *SelfSubjectReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,35 +105,34 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1alpha1/generated.proto", fileDescriptor_05a77aeb710b43c2) + proto.RegisterFile("k8s.io/api/authentication/v1alpha1/generated.proto", fileDescriptor_f003acd72d3d5efb) } -var fileDescriptor_05a77aeb710b43c2 = []byte{ - // 384 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xbd, 0x6e, 0xdb, 0x30, - 0x14, 0x85, 0xc5, 0x0e, 0x86, 0xa1, 0x02, 0x45, 0xab, 0xa5, 0x86, 0x07, 0xba, 0xd0, 0x50, 0x74, - 0x68, 0xc9, 0xba, 0x28, 0x8a, 0x02, 0xdd, 0x34, 0x35, 0x08, 0x82, 0x00, 0x72, 0xb2, 0x64, 0x0a, - 0x25, 0x5f, 0x4b, 0x8c, 0x2c, 0x52, 0x10, 0x49, 0x05, 0xd9, 0xf2, 0x08, 0x79, 0x2c, 0x8f, 0x1e, - 0x8d, 0x0c, 0x46, 0xac, 0xbc, 0x48, 0x20, 0x59, 0xb6, 0x11, 0x3b, 0xb6, 0x37, 0xde, 0xc3, 0xfb, - 0x9d, 0x7b, 0xf8, 0x63, 0x9f, 0x26, 0x7f, 0x15, 0xe1, 0x92, 0x26, 0x26, 0x80, 0x5c, 0x80, 0x06, - 0x45, 0x0b, 0x10, 0x43, 0x99, 0xd3, 0x66, 0x83, 0x65, 0x9c, 0x32, 0xa3, 0x63, 0x10, 0x9a, 0x87, - 0x4c, 0x73, 0x29, 0x68, 0xd1, 0x67, 0xe3, 0x2c, 0x66, 0x7d, 0x1a, 0x81, 0x80, 0x9c, 0x69, 0x18, - 0x92, 0x2c, 0x97, 0x5a, 0x3a, 0xee, 0x92, 0x21, 0x2c, 0xe3, 0xe4, 0x35, 0x43, 0x56, 0x4c, 0xf7, - 0x47, 0xc4, 0x75, 0x6c, 0x02, 0x12, 0xca, 0x94, 0x46, 0x32, 0x92, 0xb4, 0x46, 0x03, 0x33, 0xaa, - 0xab, 0xba, 0xa8, 0x57, 0x4b, 0xcb, 0xee, 0xf7, 0x43, 0x31, 0xb6, 0x03, 0x74, 0x7f, 0x6f, 0xba, - 0x53, 0x16, 0xc6, 0x5c, 0x40, 0x7e, 0x47, 0xb3, 0x24, 0xaa, 0x04, 0x45, 0x53, 0xd0, 0xec, 0x2d, - 0x8a, 0xee, 0xa3, 0x72, 0x23, 0x34, 0x4f, 0x61, 0x07, 0xf8, 0x73, 0x0c, 0x50, 0x61, 0x0c, 0x29, - 0xdb, 0xe6, 0xdc, 0x47, 0x64, 0x7f, 0x1a, 0xc0, 0x78, 0x34, 0x30, 0xc1, 0x0d, 0x84, 0xda, 0x87, - 0x82, 0xc3, 0xad, 0x73, 0x6d, 0xb7, 0xab, 0x64, 0x43, 0xa6, 0x59, 0x07, 0x7d, 0x41, 0xdf, 0xde, - 0xff, 0xfa, 0x49, 0x36, 0x17, 0xb9, 0x1e, 0x40, 0xb2, 0x24, 0xaa, 0x04, 0x45, 0xaa, 0x6e, 0x52, - 0xf4, 0xc9, 0x79, 0xed, 0x72, 0x06, 0x9a, 0x79, 0xce, 0x64, 0xde, 0xb3, 0xca, 0x79, 0xcf, 0xde, - 0x68, 0xfe, 0xda, 0xd5, 0x09, 0xed, 0x96, 0xd2, 0x4c, 0x1b, 0xd5, 0x79, 0x57, 0xfb, 0xff, 0x23, - 0xc7, 0x1f, 0x8a, 0xec, 0x04, 0x1d, 0xd4, 0x16, 0xde, 0x87, 0x66, 0x54, 0x6b, 0x59, 0xfb, 0x8d, - 0xb5, 0x2b, 0xed, 0xcf, 0x7b, 0x10, 0xe7, 0xc2, 0x6e, 0x1b, 0x05, 0xf9, 0x89, 0x18, 0xc9, 0xe6, - 0x84, 0x5f, 0x0f, 0x26, 0x20, 0x97, 0x4d, 0xb7, 0xf7, 0xb1, 0x19, 0xd6, 0x5e, 0x29, 0xfe, 0xda, - 0xc9, 0xfb, 0x3f, 0x59, 0x60, 0x6b, 0xba, 0xc0, 0xd6, 0x6c, 0x81, 0xad, 0xfb, 0x12, 0xa3, 0x49, - 0x89, 0xd1, 0xb4, 0xc4, 0x68, 0x56, 0x62, 0xf4, 0x54, 0x62, 0xf4, 0xf0, 0x8c, 0xad, 0x2b, 0xf7, - 0xf8, 0x3f, 0x7e, 0x09, 0x00, 0x00, 0xff, 0xff, 0xec, 0xf9, 0xa3, 0xcd, 0x05, 0x03, 0x00, 0x00, +var fileDescriptor_f003acd72d3d5efb = []byte{ + // 368 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x4f, 0xe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xaf, 0x8d, 0x83, 0x5e, 0x3b, 0xeb, 0x3c, 0xa1, 0xa7, 0x5c, + 0x1c, 0x0a, 0x7c, 0xb6, 0x1e, 0xcd, 0x6a, 0x91, 0xac, 0x0b, 0x0a, 0x6a, 0xe4, 0x80, 0x1c, 0xfd, + 0x6e, 0x9d, 0xb2, 0xd5, 0x41, 0x2e, 0x17, 0xb0, 0xb8, 0xef, 0x17, 0x8d, 0x94, 0x15, 0xd3, 0x6c, + 0xd8, 0x64, 0xb7, 0xda, 0x72, 0x83, 0x0a, 0x1c, 0x6b, 0x34, 0x6d, 0x18, 0xf9, 0xb4, 0x61, 0xae, + 0x7a, 0xee, 0xd2, 0x6a, 0x79, 0x66, 0x25, 0x55, 0xa0, 0xb2, 0xb4, 0xf6, 0x4b, 0xfb, 0x2f, 0xd9, + 0xfe, 0x8b, 0x62, 0x1b, 0x41, 0xdb, 0x5a, 0xe1, 0xfc, 0x29, 0x57, 0x55, 0xe6, 0xb5, 0x5b, 0xaa, + 0x6d, 0x69, 0xfe, 0xdf, 0x82, 0x58, 0x77, 0x66, 0x35, 0x4b, 0x31, 0xb9, 0x8e, 0x7a, 0xb2, 0xfc, + 0xc3, 0xc3, 0x9d, 0x09, 0xd8, 0x7d, 0x39, 0xed, 0xfc, 0x2d, 0x97, 0x55, 0x17, 0x1d, 0x77, 0x69, + 0x72, 0xae, 0x46, 0x33, 0x6a, 0x8c, 0x67, 0xd4, 0x98, 0xcc, 0xa8, 0xf1, 0x9a, 0x53, 0x32, 0xca, + 0x29, 0x19, 0xe7, 0x94, 0x4c, 0x72, 0x4a, 0x3e, 0x72, 0x4a, 0xde, 0x3e, 0xa9, 0xf1, 0x60, 0xef, + 0x7f, 0xc7, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x04, 0xfb, 0xb6, 0xfb, 0xec, 0x02, 0x00, 0x00, } func (m *SelfSubjectReview) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go b/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go index 7f1d5ca6ce1..41539264478 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1beta1/generated.proto +// source: k8s.io/api/authentication/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{0} + return fileDescriptor_fdc2de40fd7f3b21, []int{0} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_ExtraValue proto.InternalMessageInfo func (m *SelfSubjectReview) Reset() { *m = SelfSubjectReview{} } func (*SelfSubjectReview) ProtoMessage() {} func (*SelfSubjectReview) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{1} + return fileDescriptor_fdc2de40fd7f3b21, []int{1} } func (m *SelfSubjectReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_SelfSubjectReview proto.InternalMessageInfo func (m *SelfSubjectReviewStatus) Reset() { *m = SelfSubjectReviewStatus{} } func (*SelfSubjectReviewStatus) ProtoMessage() {} func (*SelfSubjectReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{2} + return fileDescriptor_fdc2de40fd7f3b21, []int{2} } func (m *SelfSubjectReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_SelfSubjectReviewStatus proto.InternalMessageInfo func (m *TokenReview) Reset() { *m = TokenReview{} } func (*TokenReview) ProtoMessage() {} func (*TokenReview) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{3} + return fileDescriptor_fdc2de40fd7f3b21, []int{3} } func (m *TokenReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_TokenReview proto.InternalMessageInfo func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} } func (*TokenReviewSpec) ProtoMessage() {} func (*TokenReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{4} + return fileDescriptor_fdc2de40fd7f3b21, []int{4} } func (m *TokenReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_TokenReviewSpec proto.InternalMessageInfo func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} } func (*TokenReviewStatus) ProtoMessage() {} func (*TokenReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{5} + return fileDescriptor_fdc2de40fd7f3b21, []int{5} } func (m *TokenReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_TokenReviewStatus proto.InternalMessageInfo func (m *UserInfo) Reset() { *m = UserInfo{} } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_77c9b20d3ad27844, []int{6} + return fileDescriptor_fdc2de40fd7f3b21, []int{6} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -252,57 +252,56 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1beta1/generated.proto", fileDescriptor_77c9b20d3ad27844) -} - -var fileDescriptor_77c9b20d3ad27844 = []byte{ - // 725 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x4f, 0x4f, 0x13, 0x41, - 0x14, 0xef, 0xf6, 0x0f, 0x69, 0xa7, 0x56, 0x61, 0x12, 0x23, 0x69, 0xe2, 0x16, 0x6a, 0x62, 0x48, - 0x80, 0x59, 0x21, 0x04, 0x09, 0x9e, 0x58, 0x25, 0x04, 0x13, 0x62, 0x32, 0x05, 0x0f, 0xea, 0xc1, - 0xe9, 0xf6, 0xb1, 0x5d, 0x4b, 0x77, 0x37, 0xbb, 0xb3, 0x55, 0x6e, 0x7c, 0x04, 0x8f, 0x1e, 0x4d, - 0xfc, 0x24, 0xde, 0x38, 0x72, 0xc4, 0xc4, 0x34, 0xb2, 0x7e, 0x02, 0xbf, 0x81, 0x99, 0xd9, 0x61, - 0xdb, 0x82, 0x14, 0xb8, 0x78, 0xdb, 0xf9, 0xcd, 0xfb, 0xfd, 0xde, 0x7b, 0xbf, 0xf7, 0x32, 0x8b, - 0x5e, 0x76, 0xd6, 0x42, 0xe2, 0x78, 0x46, 0x27, 0x6a, 0x42, 0xe0, 0x02, 0x87, 0xd0, 0xe8, 0x81, - 0xdb, 0xf2, 0x02, 0x43, 0x5d, 0x30, 0xdf, 0x31, 0x58, 0xc4, 0xdb, 0xe0, 0x72, 0xc7, 0x62, 0xdc, - 0xf1, 0x5c, 0xa3, 0xb7, 0xd4, 0x04, 0xce, 0x96, 0x0c, 0x1b, 0x5c, 0x08, 0x18, 0x87, 0x16, 0xf1, - 0x03, 0x8f, 0x7b, 0x78, 0x36, 0xa1, 0x10, 0xe6, 0x3b, 0x64, 0x94, 0x42, 0x14, 0xa5, 0xba, 0x68, - 0x3b, 0xbc, 0x1d, 0x35, 0x89, 0xe5, 0x75, 0x0d, 0xdb, 0xb3, 0x3d, 0x43, 0x32, 0x9b, 0xd1, 0xbe, - 0x3c, 0xc9, 0x83, 0xfc, 0x4a, 0x14, 0xab, 0x0b, 0xe3, 0x8a, 0xb8, 0x98, 0xbf, 0xba, 0x32, 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0xdd, 0x4a, - 0xbc, 0x90, 0x6c, 0xb8, 0xcb, 0xba, 0xa0, 0x5c, 0x1d, 0xd9, 0x5c, 0x81, 0xd3, 0x34, 0x02, 0x3f, - 0x44, 0xb9, 0xc8, 0x69, 0xc9, 0xd6, 0x4a, 0x66, 0x59, 0x05, 0xe6, 0xf6, 0xb6, 0x5f, 0x50, 0x81, - 0xe3, 0x3a, 0x9a, 0xb0, 0x03, 0x2f, 0xf2, 0xc5, 0x42, 0x88, 0x42, 0x91, 0x18, 0xeb, 0x96, 0x44, - 0xa8, 0xba, 0xc1, 0x6f, 0x51, 0x01, 0xc4, 0x13, 0x24, 0x7b, 0x29, 0x2f, 0xaf, 0xde, 0xc2, 0x1f, - 0x22, 0xdf, 0xae, 0x4d, 0x97, 0x07, 0x87, 0x43, 0xad, 0x09, 0x8c, 0x26, 0x9a, 0x55, 0x5b, 0xbd, - 0x6f, 0x32, 0x06, 0x4f, 0xa2, 0x5c, 0x07, 0x0e, 0x93, 0xb6, 0xa8, 0xf8, 0xc4, 0xcf, 0x51, 0xa1, - 0x27, 0x9e, 0x3e, 0x35, 0x9c, 0xc5, 0x1b, 0x24, 0x1f, 0xbc, 0x97, 0x34, 0xe1, 0xae, 0x67, 0xd7, - 0x34, 0x73, 0xeb, 0xf8, 0x4c, 0xcf, 0x9c, 0x9c, 0xe9, 0x99, 0xd3, 0x33, 0x3d, 0x73, 0x14, 0xeb, - 0xda, 0x71, 0xac, 0x6b, 0x27, 0xb1, 0xae, 0x9d, 0xc6, 0xba, 0xf6, 0x2b, 0xd6, 0xb5, 0xcf, 0xbf, - 0xf5, 0xcc, 0x9b, 0xd9, 0x6b, 0x7f, 0x60, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x19, 0x49, - 0x3f, 0xfd, 0x06, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/authentication/v1beta1/generated.proto", fileDescriptor_fdc2de40fd7f3b21) +} + +var fileDescriptor_fdc2de40fd7f3b21 = []byte{ + // 711 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x4e, 0xdb, 0x4e, + 0x10, 0x8e, 0xf3, 0x07, 0x25, 0x9b, 0x5f, 0x7e, 0x85, 0x95, 0xaa, 0xa2, 0x48, 0x75, 0x20, 0x95, + 0x2a, 0x24, 0x60, 0xdd, 0x20, 0x44, 0x11, 0x3d, 0xe1, 0x16, 0x21, 0x0e, 0xa8, 0xd2, 0x06, 0x7a, + 0x68, 0x7b, 0xe8, 0xc6, 0x19, 0x1c, 0x37, 0xc4, 0xb6, 0xec, 0x75, 0x5a, 0x6e, 0x3c, 0x42, 0x8f, + 0x3d, 0x56, 0xea, 0x93, 0xf4, 0xc6, 0x91, 0x23, 0x95, 0xaa, 0xa8, 0xb8, 0x4f, 0xd0, 0x37, 0xa8, + 0x76, 0xbd, 0x38, 0x09, 0x94, 0x00, 0x97, 0xde, 0xbc, 0xdf, 0xce, 0xf7, 0xcd, 0xcc, 0x37, 0xa3, + 0x35, 0x6a, 0x74, 0xd7, 0x43, 0xe2, 0x78, 0x06, 0xf3, 0x1d, 0x83, 0x45, 0xbc, 0x03, 0x2e, 0x77, + 0x2c, 0xc6, 0x1d, 0xcf, 0x35, 0xfa, 0x8d, 0x16, 0x70, 0xd6, 0x30, 0x6c, 0x70, 0x21, 0x60, 0x1c, + 0xda, 0xc4, 0x0f, 0x3c, 0xee, 0xe1, 0xf9, 0x84, 0x42, 0x98, 0xef, 0x90, 0x71, 0x0a, 0x51, 0x94, + 0xea, 0xb2, 0xed, 0xf0, 0x4e, 0xd4, 0x22, 0x96, 0xd7, 0x33, 0x6c, 0xcf, 0xf6, 0x0c, 0xc9, 0x6c, + 0x45, 0x07, 0xf2, 0x24, 0x0f, 0xf2, 0x2b, 0x51, 0xac, 0x2e, 0x4d, 0x2a, 0xe2, 0x72, 0xfe, 0xea, + 0xea, 0x30, 0x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 0x56, 0xe2, 0xa5, 0x64, 0xc3, 0x5d, 0xd6, 0x03, 0xe5, 0xea, 0xd8, 0xe6, 0x0a, 0x9c, 0xa6, + 0x11, 0xf8, 0x21, 0xca, 0x45, 0x4e, 0x5b, 0xb6, 0x56, 0x32, 0xcb, 0x2a, 0x30, 0xb7, 0xbf, 0xf3, + 0x82, 0x0a, 0x1c, 0xd7, 0xd1, 0x94, 0x1d, 0x78, 0x91, 0x2f, 0x16, 0x42, 0x14, 0x8a, 0xc4, 0x58, + 0xb7, 0x25, 0x42, 0xd5, 0x0d, 0x7e, 0x83, 0x0a, 0x20, 0x9e, 0x20, 0xd9, 0x4b, 0x79, 0x65, 0xed, + 0x0e, 0xfe, 0x10, 0xf9, 0x76, 0x6d, 0xb9, 0x3c, 0x38, 0x1a, 0x69, 0x4d, 0x60, 0x34, 0xd1, 0xac, + 0xda, 0xea, 0x7d, 0x93, 0x31, 0x78, 0x1a, 0xe5, 0xba, 0x70, 0x94, 0xb4, 0x45, 0xc5, 0x27, 0x7e, + 0x8e, 0x0a, 0x7d, 0xf1, 0xf4, 0xa9, 0xe1, 0x2c, 0xdf, 0x22, 0xf9, 0xf0, 0xbd, 0xa4, 0x09, 0x77, + 0x23, 0xbb, 0xae, 0x99, 0xdb, 0x27, 0xe7, 0x7a, 0xe6, 0xf4, 0x5c, 0xcf, 0x9c, 0x9d, 0xeb, 0x99, + 0xe3, 0x58, 0xd7, 0x4e, 0x62, 0x5d, 0x3b, 0x8d, 0x75, 0xed, 0x2c, 0xd6, 0xb5, 0x9f, 0xb1, 0xae, + 0x7d, 0xfa, 0xa5, 0x67, 0x5e, 0xcf, 0xdf, 0xf8, 0x03, 0xfb, 0x13, 0x00, 0x00, 0xff, 0xff, 0x45, + 0x72, 0x2b, 0xf2, 0xe4, 0x06, 0x00, 0x00, } func (m ExtraValue) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/authentication/v1beta1/generated.proto b/vendor/k8s.io/api/authentication/v1beta1/generated.proto index 53b4635d7e9..61658245d42 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/generated.proto +++ b/vendor/k8s.io/api/authentication/v1beta1/generated.proto @@ -87,6 +87,7 @@ message TokenReviewSpec { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic repeated string audiences = 2; } @@ -110,6 +111,7 @@ message TokenReviewStatus { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic repeated string audiences = 4; // Error indicates that the token couldn't be checked @@ -132,6 +134,7 @@ message UserInfo { // The names of groups this user is a part of. // +optional + // +listType=atomic repeated string groups = 3; // Any additional information provided by the authenticator. diff --git a/vendor/k8s.io/api/authentication/v1beta1/types.go b/vendor/k8s.io/api/authentication/v1beta1/types.go index 5bce82e7cfd..8038ef7d346 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/types.go +++ b/vendor/k8s.io/api/authentication/v1beta1/types.go @@ -60,6 +60,7 @@ type TokenReviewSpec struct { // this list. If no audiences are provided, the audience will default to the // audience of the Kubernetes apiserver. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,2,rep,name=audiences"` } @@ -81,6 +82,7 @@ type TokenReviewStatus struct { // status.audience field where status.authenticated is "true", the token is // valid against the audience of the Kubernetes API server. // +optional + // +listType=atomic Audiences []string `json:"audiences,omitempty" protobuf:"bytes,4,rep,name=audiences"` // Error indicates that the token couldn't be checked // +optional @@ -100,6 +102,7 @@ type UserInfo struct { UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"` // The names of groups this user is a part of. // +optional + // +listType=atomic Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"` // Any additional information provided by the authenticator. // +optional diff --git a/vendor/k8s.io/api/authorization/v1/generated.pb.go b/vendor/k8s.io/api/authorization/v1/generated.pb.go index 2e8e35a551c..dfa109b4249 100644 --- a/vendor/k8s.io/api/authorization/v1/generated.pb.go +++ b/vendor/k8s.io/api/authorization/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1/generated.proto +// source: k8s.io/api/authorization/v1/generated.proto package v1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{0} + return fileDescriptor_aafd0e5e70cec678, []int{0} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_ExtraValue proto.InternalMessageInfo func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } func (*LocalSubjectAccessReview) ProtoMessage() {} func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{1} + return fileDescriptor_aafd0e5e70cec678, []int{1} } func (m *LocalSubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_LocalSubjectAccessReview proto.InternalMessageInfo func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } func (*NonResourceAttributes) ProtoMessage() {} func (*NonResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{2} + return fileDescriptor_aafd0e5e70cec678, []int{2} } func (m *NonResourceAttributes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_NonResourceAttributes proto.InternalMessageInfo func (m *NonResourceRule) Reset() { *m = NonResourceRule{} } func (*NonResourceRule) ProtoMessage() {} func (*NonResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{3} + return fileDescriptor_aafd0e5e70cec678, []int{3} } func (m *NonResourceRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_NonResourceRule proto.InternalMessageInfo func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } func (*ResourceAttributes) ProtoMessage() {} func (*ResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{4} + return fileDescriptor_aafd0e5e70cec678, []int{4} } func (m *ResourceAttributes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ResourceAttributes proto.InternalMessageInfo func (m *ResourceRule) Reset() { *m = ResourceRule{} } func (*ResourceRule) ProtoMessage() {} func (*ResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{5} + return fileDescriptor_aafd0e5e70cec678, []int{5} } func (m *ResourceRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_ResourceRule proto.InternalMessageInfo func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } func (*SelfSubjectAccessReview) ProtoMessage() {} func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{6} + return fileDescriptor_aafd0e5e70cec678, []int{6} } func (m *SelfSubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_SelfSubjectAccessReview proto.InternalMessageInfo func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{7} + return fileDescriptor_aafd0e5e70cec678, []int{7} } func (m *SelfSubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +271,7 @@ var xxx_messageInfo_SelfSubjectAccessReviewSpec proto.InternalMessageInfo func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} } func (*SelfSubjectRulesReview) ProtoMessage() {} func (*SelfSubjectRulesReview) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{8} + return fileDescriptor_aafd0e5e70cec678, []int{8} } func (m *SelfSubjectRulesReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +299,7 @@ var xxx_messageInfo_SelfSubjectRulesReview proto.InternalMessageInfo func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} } func (*SelfSubjectRulesReviewSpec) ProtoMessage() {} func (*SelfSubjectRulesReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{9} + return fileDescriptor_aafd0e5e70cec678, []int{9} } func (m *SelfSubjectRulesReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +327,7 @@ var xxx_messageInfo_SelfSubjectRulesReviewSpec proto.InternalMessageInfo func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } func (*SubjectAccessReview) ProtoMessage() {} func (*SubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{10} + return fileDescriptor_aafd0e5e70cec678, []int{10} } func (m *SubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +355,7 @@ var xxx_messageInfo_SubjectAccessReview proto.InternalMessageInfo func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } func (*SubjectAccessReviewSpec) ProtoMessage() {} func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{11} + return fileDescriptor_aafd0e5e70cec678, []int{11} } func (m *SubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -383,7 +383,7 @@ var xxx_messageInfo_SubjectAccessReviewSpec proto.InternalMessageInfo func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } func (*SubjectAccessReviewStatus) ProtoMessage() {} func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{12} + return fileDescriptor_aafd0e5e70cec678, []int{12} } func (m *SubjectAccessReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -411,7 +411,7 @@ var xxx_messageInfo_SubjectAccessReviewStatus proto.InternalMessageInfo func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} } func (*SubjectRulesReviewStatus) ProtoMessage() {} func (*SubjectRulesReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e50da13573e369bd, []int{13} + return fileDescriptor_aafd0e5e70cec678, []int{13} } func (m *SubjectRulesReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -455,83 +455,82 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1/generated.proto", fileDescriptor_e50da13573e369bd) + proto.RegisterFile("k8s.io/api/authorization/v1/generated.proto", fileDescriptor_aafd0e5e70cec678) } -var fileDescriptor_e50da13573e369bd = []byte{ - // 1140 bytes of a gzipped FileDescriptorProto +var fileDescriptor_aafd0e5e70cec678 = []byte{ + // 1126 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xfa, 0x4f, 0x62, 0x8f, 0x1b, 0x92, 0x4e, 0x94, 0x66, 0x9b, 0x08, 0x3b, 0x5a, 0x24, - 0x48, 0x45, 0xd9, 0x25, 0x56, 0xdb, 0x44, 0x95, 0x2a, 0x64, 0x2b, 0x11, 0x8a, 0xd4, 0x96, 0x6a, - 0xa2, 0x44, 0xa2, 0x08, 0xc4, 0x78, 0x3d, 0xb1, 0x97, 0xd8, 0xbb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28, 0xc1, 0xcc, 0x73, 0xd5, 0x2a, 0x36, 0xe2, 0x21, - 0x29, 0x45, 0x0a, 0x85, 0x75, 0x30, 0x4f, 0x84, 0x9b, 0xd2, 0xff, 0x1d, 0x4a, 0xbd, 0x61, 0x46, - 0x97, 0x95, 0xc2, 0xfc, 0xce, 0x38, 0x8c, 0xce, 0xf3, 0x8d, 0x7f, 0xb3, 0x40, 0x9f, 0x34, 0xda, - 0xe0, 0x61, 0xbc, 0x8b, 0x48, 0x50, 0xae, 0x43, 0xe5, 0xda, 0xad, 0x4b, 0x35, 0x88, 0xd0, 0x68, - 0x2c, 0x29, 0x47, 0xe6, 0x92, 0xd2, 0xc4, 0xea, 0x22, 0x3f, 0x21, 0x05, 0x0b, 0xee, 0xf8, 0xce, - 0x1c, 0x2d, 0x55, 0xe5, 0xda, 0xed, 0xcb, 0xb6, 0x83, 0x3c, 0x4d, 0x57, 0xa7, 0x2d, 0x9c, 0x03, - 0x18, 0xba, 0x60, 0x1f, 0xd6, 0x00, 0x70, 0x5c, 0xdb, 0xeb, 0xf9, 0x5d, 0xc2, 0x89, 0x0c, 0x5b, - 0x31, 0x9e, 0x83, 0xbb, 0x23, 0x04, 0x25, 0x58, 0x69, 0xf1, 0xce, 0x5f, 0x2d, 0xde, 0x8d, 0xfa, - 0xe9, 0x59, 0x25, 0xf3, 0xfc, 0xac, 0x92, 0x79, 0x71, 0x56, 0xc9, 0x3c, 0x0b, 0x2b, 0xda, 0x69, - 0x58, 0xd1, 0x9e, 0x87, 0x15, 0xed, 0x45, 0x58, 0xd1, 0xfe, 0x0e, 0x2b, 0xda, 0xf7, 0xff, 0x54, - 0x32, 0x4f, 0x57, 0xa7, 0xfc, 0x53, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xea, 0x67, 0x63, 0x89, - 0x60, 0x0f, 0x00, 0x00, + 0x14, 0xf7, 0xfa, 0x4f, 0x6a, 0x3f, 0x37, 0x24, 0x9d, 0x28, 0xcd, 0x36, 0x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16, 0xb5, 0x2d, 0xda, 0x12, 0x8b, 0x51, + 0x31, 0xae, 0xdc, 0x87, 0x42, 0x8a, 0x25, 0xca, 0x79, 0x1e, 0x25, 0xcc, 0xb1, 0xe5, 0x2a, 0x36, + 0xe2, 0x61, 0x21, 0xc5, 0x12, 0x45, 0x75, 0x58, 0xa0, 0xdc, 0x4d, 0xe1, 0xff, 0x8e, 0xe7, 0x39, + 0xc3, 0x8c, 0xae, 0x48, 0x85, 0x85, 0x9d, 0x71, 0x18, 0x9f, 0xe7, 0x6b, 0xff, 0x64, 0x41, 0x9d, + 0x34, 0xda, 0xd0, 0x61, 0xbc, 0x8b, 0x08, 0x50, 0xac, 0x43, 0xe5, 0xda, 0xcd, 0x4b, 0x35, 0x08, + 0xd7, 0x68, 0x2c, 0x4b, 0x47, 0xe6, 0x93, 0xd2, 0xc4, 0xea, 0x22, 0x3e, 0x91, 0x07, 0x8b, 0xf6, + 0xf8, 0xce, 0x1c, 0x2d, 0x55, 0xe5, 0xda, 0xed, 0xcb, 0xb6, 0x83, 0x38, 0x4d, 0x95, 0xa7, 0x2d, + 0x9e, 0x03, 0x18, 0xbe, 0x60, 0x1f, 0xd5, 0x00, 0x2c, 0xdb, 0x74, 0x7a, 0x6e, 0x97, 0xfa, 0x54, + 0x84, 0xad, 0x18, 0xcf, 0xc1, 0xdd, 0x11, 0x82, 0x13, 0xac, 0xb4, 0x78, 0xe7, 0x67, 0x8b, 0x77, + 0xa3, 0x7e, 0x7a, 0x56, 0xc9, 0xbc, 0x38, 0xab, 0x64, 0x5e, 0x9e, 0x55, 0x32, 0xcf, 0xc3, 0x8a, + 0x72, 0x1a, 0x56, 0x94, 0x17, 0x61, 0x45, 0x79, 0x19, 0x56, 0x94, 0xbf, 0xc2, 0x8a, 0xf2, 0xdd, + 0xdf, 0x95, 0xcc, 0xb3, 0xb5, 0x29, 0xff, 0x94, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x45, 0x6f, + 0xe0, 0x61, 0x47, 0x0f, 0x00, 0x00, } func (m ExtraValue) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/authorization/v1/generated.proto b/vendor/k8s.io/api/authorization/v1/generated.proto index 47d3a57a072..83283d0bdbe 100644 --- a/vendor/k8s.io/api/authorization/v1/generated.proto +++ b/vendor/k8s.io/api/authorization/v1/generated.proto @@ -69,11 +69,13 @@ message NonResourceAttributes { // 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. + // +listType=atomic 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 + // +listType=atomic repeated string nonResourceURLs = 2; } @@ -115,20 +117,24 @@ message ResourceAttributes { // 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. + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic repeated string resourceNames = 4; } @@ -220,6 +226,7 @@ message SubjectAccessReviewSpec { // Groups is the groups you're testing for. // +optional + // +listType=atomic repeated string groups = 4; // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer @@ -262,10 +269,12 @@ message SubjectAccessReviewStatus { 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. + // +listType=atomic 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. + // +listType=atomic repeated NonResourceRule nonResourceRules = 2; // Incomplete is true when the rules returned by this call are incomplete. This is most commonly diff --git a/vendor/k8s.io/api/authorization/v1/types.go b/vendor/k8s.io/api/authorization/v1/types.go index d1fe483f964..3b42956f899 100644 --- a/vendor/k8s.io/api/authorization/v1/types.go +++ b/vendor/k8s.io/api/authorization/v1/types.go @@ -143,6 +143,7 @@ type SubjectAccessReviewSpec struct { User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"` // Groups is the groups you're testing for. // +optional + // +listType=atomic 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. @@ -232,9 +233,11 @@ type SelfSubjectRulesReviewSpec struct { 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. + // +listType=atomic 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. + // +listType=atomic 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. @@ -250,28 +253,34 @@ type SubjectRulesReviewStatus struct { // 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. + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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. + // +listType=atomic 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 + // +listType=atomic NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,2,rep,name=nonResourceURLs"` } diff --git a/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go b/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go index aadcf824049..28642ba6380 100644 --- a/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1beta1/generated.proto +// source: k8s.io/api/authorization/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{0} + return fileDescriptor_8eab727787743457, []int{0} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_ExtraValue proto.InternalMessageInfo func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } func (*LocalSubjectAccessReview) ProtoMessage() {} func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{1} + return fileDescriptor_8eab727787743457, []int{1} } func (m *LocalSubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_LocalSubjectAccessReview proto.InternalMessageInfo func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } func (*NonResourceAttributes) ProtoMessage() {} func (*NonResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{2} + return fileDescriptor_8eab727787743457, []int{2} } func (m *NonResourceAttributes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_NonResourceAttributes proto.InternalMessageInfo func (m *NonResourceRule) Reset() { *m = NonResourceRule{} } func (*NonResourceRule) ProtoMessage() {} func (*NonResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{3} + return fileDescriptor_8eab727787743457, []int{3} } func (m *NonResourceRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_NonResourceRule proto.InternalMessageInfo func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } func (*ResourceAttributes) ProtoMessage() {} func (*ResourceAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{4} + return fileDescriptor_8eab727787743457, []int{4} } func (m *ResourceAttributes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ResourceAttributes proto.InternalMessageInfo func (m *ResourceRule) Reset() { *m = ResourceRule{} } func (*ResourceRule) ProtoMessage() {} func (*ResourceRule) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{5} + return fileDescriptor_8eab727787743457, []int{5} } func (m *ResourceRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_ResourceRule proto.InternalMessageInfo func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } func (*SelfSubjectAccessReview) ProtoMessage() {} func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{6} + return fileDescriptor_8eab727787743457, []int{6} } func (m *SelfSubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_SelfSubjectAccessReview proto.InternalMessageInfo func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{7} + return fileDescriptor_8eab727787743457, []int{7} } func (m *SelfSubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +271,7 @@ var xxx_messageInfo_SelfSubjectAccessReviewSpec proto.InternalMessageInfo func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} } func (*SelfSubjectRulesReview) ProtoMessage() {} func (*SelfSubjectRulesReview) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{8} + return fileDescriptor_8eab727787743457, []int{8} } func (m *SelfSubjectRulesReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +299,7 @@ var xxx_messageInfo_SelfSubjectRulesReview proto.InternalMessageInfo func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} } func (*SelfSubjectRulesReviewSpec) ProtoMessage() {} func (*SelfSubjectRulesReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{9} + return fileDescriptor_8eab727787743457, []int{9} } func (m *SelfSubjectRulesReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +327,7 @@ var xxx_messageInfo_SelfSubjectRulesReviewSpec proto.InternalMessageInfo func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } func (*SubjectAccessReview) ProtoMessage() {} func (*SubjectAccessReview) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{10} + return fileDescriptor_8eab727787743457, []int{10} } func (m *SubjectAccessReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +355,7 @@ var xxx_messageInfo_SubjectAccessReview proto.InternalMessageInfo func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } func (*SubjectAccessReviewSpec) ProtoMessage() {} func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{11} + return fileDescriptor_8eab727787743457, []int{11} } func (m *SubjectAccessReviewSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -383,7 +383,7 @@ var xxx_messageInfo_SubjectAccessReviewSpec proto.InternalMessageInfo func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } func (*SubjectAccessReviewStatus) ProtoMessage() {} func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{12} + return fileDescriptor_8eab727787743457, []int{12} } func (m *SubjectAccessReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -411,7 +411,7 @@ var xxx_messageInfo_SubjectAccessReviewStatus proto.InternalMessageInfo func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} } func (*SubjectRulesReviewStatus) ProtoMessage() {} func (*SubjectRulesReviewStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_43130d8376f09103, []int{13} + return fileDescriptor_8eab727787743457, []int{13} } func (m *SubjectRulesReviewStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -455,83 +455,82 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1beta1/generated.proto", fileDescriptor_43130d8376f09103) -} - -var fileDescriptor_43130d8376f09103 = []byte{ - // 1143 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xfa, 0x4f, 0x62, 0x8f, 0x1b, 0x92, 0x4e, 0x94, 0x66, 0x1b, 0x84, 0x6d, 0x19, 0x09, - 0x05, 0x51, 0x76, 0x49, 0x54, 0x48, 0x09, 0xf4, 0x10, 0x2b, 0x01, 0x45, 0x6a, 0x4b, 0x35, 0x51, - 0x72, 0xa0, 0x12, 0x30, 0xbb, 0x9e, 0xd8, 0x8b, 0xed, 0xdd, 0x65, 0x66, 0xd6, 0x21, 0x88, 0x43, - 0x8f, 0x1c, 0x39, 0x72, 0xe4, 0xc4, 0x77, 0xe0, 0x82, 0x04, 0xa7, 0x1c, 0x7b, 0x0c, 0x12, 0xb2, - 0xc8, 0xf2, 0x21, 0xb8, 0xa2, 0x99, 0x1d, 0x7b, 0xd7, 0xc9, 0x26, 0x8e, 0x73, 0xa0, 0x97, 0xde, - 0x3c, 0xef, 0xf7, 0x7b, 0x6f, 0xde, 0x7b, 0xf3, 0xde, 0xdb, 0x67, 0xb0, 0xdb, 0x79, 0xc0, 0x0c, - 0xc7, 0x33, 0x3b, 0x81, 0x45, 0xa8, 0x4b, 0x38, 0x61, 0x66, 0x9f, 0xb8, 0x4d, 0x8f, 0x9a, 0x0a, - 0xc0, 0xbe, 0x63, 0xe2, 0x80, 0xb7, 0x3d, 0xea, 0x7c, 0x87, 0xb9, 0xe3, 0xb9, 0x66, 0x7f, 0xcd, - 0x22, 0x1c, 0xaf, 0x99, 0x2d, 0xe2, 0x12, 0x8a, 0x39, 0x69, 0x1a, 0x3e, 0xf5, 0xb8, 0x07, 0x6b, - 0x91, 0x86, 0x81, 0x7d, 0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x05, 0x90, - 0xeb, 0x90, 0xe3, 0xa8, 0xcf, 0x90, 0xf8, 0x09, 0x1b, 0xa0, 0xd0, 0x17, 0x6b, 0xb9, 0xca, 0xf3, - 0xbd, 0xc9, 0x9e, 0xc6, 0xab, 0x3c, 0x8a, 0x54, 0x37, 0xb3, 0x0f, 0xb4, 0xfa, 0x9f, 0x1a, 0xb8, - 0x7b, 0x69, 0x41, 0x8a, 0x45, 0x09, 0x77, 0xbb, 0xde, 0x11, 0x69, 0xca, 0xbb, 0x8b, 0xf1, 0xa2, - 0xb4, 0x15, 0x89, 0xd1, 0x10, 0x87, 0x6f, 0x81, 0x99, 0x26, 0x71, 0x1d, 0xd2, 0x94, 0x2b, 0x55, - 0x31, 0xae, 0xe5, 0x6d, 0x29, 0x45, 0x0a, 0x15, 0x3c, 0x4a, 0x30, 0xf3, 0x5c, 0xb5, 0xc4, 0x8d, - 0x78, 0x48, 0x4a, 0x91, 0x42, 0xe1, 0x16, 0x98, 0x27, 0xc2, 0x4d, 0x19, 0xc4, 0x0e, 0xa5, 0xde, - 0xf0, 0x65, 0x97, 0x95, 0xc2, 0xfc, 0xce, 0x38, 0x8c, 0xce, 0xf3, 0xeb, 0xff, 0x66, 0x81, 0x7e, - 0xd9, 0xd8, 0x83, 0x9d, 0x78, 0x8b, 0x91, 0xa0, 0x5c, 0xa4, 0xca, 0xeb, 0xc6, 0xf5, 0x5b, 0x46, - 0xa8, 0x35, 0x96, 0x94, 0x37, 0x73, 0x49, 0x69, 0x62, 0xf3, 0x91, 0x47, 0x78, 0x04, 0x16, 0xdc, - 0xf1, 0x95, 0x3b, 0xda, 0xc9, 0xca, 0xeb, 0x6b, 0x53, 0x35, 0x88, 0xbc, 0x52, 0x57, 0x57, 0x2e, - 0x9c, 0x03, 0x18, 0xba, 0x70, 0x09, 0x5c, 0x07, 0xc0, 0x71, 0x6d, 0xaf, 0xe7, 0x77, 0x09, 0x27, - 0x32, 0x81, 0xc5, 0x78, 0x5a, 0xee, 0x8e, 0x10, 0x94, 0x60, 0xa5, 0x65, 0x3e, 0x3f, 0x5d, 0xe6, - 0x1b, 0x9f, 0x9c, 0x9c, 0x55, 0x32, 0x2f, 0xce, 0x2a, 0x99, 0xd3, 0xb3, 0x4a, 0xe6, 0x79, 0x58, - 0xd1, 0x4e, 0xc2, 0x8a, 0xf6, 0x22, 0xac, 0x68, 0xa7, 0x61, 0x45, 0xfb, 0x3b, 0xac, 0x68, 0x3f, - 0xfe, 0x53, 0xc9, 0x7c, 0x5e, 0x9b, 0xf4, 0x0f, 0xfc, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, - 0x16, 0x3a, 0xdf, 0xbd, 0x0f, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/authorization/v1beta1/generated.proto", fileDescriptor_8eab727787743457) +} + +var fileDescriptor_8eab727787743457 = []byte{ + // 1130 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xf7, 0xfa, 0x47, 0x62, 0x3f, 0x37, 0xdf, 0xa4, 0x13, 0xa5, 0xd9, 0xe6, 0x2b, 0x6c, 0xcb, + 0x48, 0x28, 0x88, 0xb2, 0xdb, 0x44, 0x85, 0x94, 0x40, 0x0f, 0xb1, 0x12, 0x50, 0xa4, 0xb6, 0x54, + 0x13, 0x25, 0x07, 0x2a, 0x01, 0xe3, 0xf5, 0xc4, 0x5e, 0x62, 0xef, 0x2e, 0x3b, 0xb3, 0x0e, 0x41, + 0x1c, 0x7a, 0xe4, 0xc8, 0x91, 0x23, 0x27, 0xfe, 0x07, 0x2e, 0x48, 0x70, 0xca, 0xb1, 0xc7, 0x20, + 0x21, 0x8b, 0x2c, 0x7f, 0x04, 0x57, 0x34, 0xb3, 0x63, 0xef, 0x3a, 0xd9, 0xc4, 0x49, 0x0e, 0xf4, + 0xd2, 0x9b, 0xe7, 0x7d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, 0xcb, 0x08, 0xb5, 0xc6, 0x82, 0xf2, 0x66, 0x26, 0x29, 0x4d, 0x6c, 0x3e, 0xf2, 0x88, + 0x0e, 0x61, 0xce, 0x19, 0x5f, 0xb9, 0xa3, 0x9d, 0xac, 0xbc, 0xba, 0x72, 0xad, 0x06, 0x91, 0x57, + 0xea, 0xea, 0xca, 0xb9, 0x33, 0x00, 0xc3, 0xe7, 0x2e, 0x41, 0xab, 0x00, 0xb6, 0x63, 0xb9, 0x3d, + 0xaf, 0x4b, 0x39, 0x95, 0x09, 0x2c, 0xc6, 0xd3, 0x72, 0x7b, 0x84, 0xe0, 0x04, 0x2b, 0x2d, 0xf3, + 0xf9, 0xeb, 0x65, 0xbe, 0xf1, 0xf1, 0xf1, 0x69, 0x25, 0xf3, 0xf2, 0xb4, 0x92, 0x39, 0x39, 0xad, + 0x64, 0x5e, 0x84, 0x15, 0xed, 0x38, 0xac, 0x68, 0x2f, 0xc3, 0x8a, 0x76, 0x12, 0x56, 0xb4, 0xbf, + 0xc2, 0x8a, 0xf6, 0xc3, 0xdf, 0x95, 0xcc, 0x67, 0xb5, 0x49, 0xff, 0xc0, 0xff, 0x0d, 0x00, 0x00, + 0xff, 0xff, 0xcd, 0x08, 0x09, 0x84, 0xa4, 0x0f, 0x00, 0x00, } func (m ExtraValue) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/authorization/v1beta1/generated.proto b/vendor/k8s.io/api/authorization/v1beta1/generated.proto index 01736202f83..43bea7aa12d 100644 --- a/vendor/k8s.io/api/authorization/v1beta1/generated.proto +++ b/vendor/k8s.io/api/authorization/v1beta1/generated.proto @@ -69,11 +69,13 @@ message NonResourceAttributes { // 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. + // +listType=atomic 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 + // +listType=atomic repeated string nonResourceURLs = 2; } @@ -115,20 +117,24 @@ message ResourceAttributes { // 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. + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic repeated string resourceNames = 4; } @@ -220,6 +226,7 @@ message SubjectAccessReviewSpec { // Groups is the groups you're testing for. // +optional + // +listType=atomic repeated string group = 4; // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer @@ -262,10 +269,12 @@ message SubjectAccessReviewStatus { 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. + // +listType=atomic 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. + // +listType=atomic repeated NonResourceRule nonResourceRules = 2; // Incomplete is true when the rules returned by this call are incomplete. This is most commonly diff --git a/vendor/k8s.io/api/authorization/v1beta1/types.go b/vendor/k8s.io/api/authorization/v1beta1/types.go index 26530986556..ef3a501b058 100644 --- a/vendor/k8s.io/api/authorization/v1beta1/types.go +++ b/vendor/k8s.io/api/authorization/v1beta1/types.go @@ -152,6 +152,7 @@ type SubjectAccessReviewSpec struct { User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"` // Groups is the groups you're testing for. // +optional + // +listType=atomic 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. @@ -244,9 +245,11 @@ type SelfSubjectRulesReviewSpec struct { 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. + // +listType=atomic 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. + // +listType=atomic 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. @@ -262,28 +265,34 @@ type SubjectRulesReviewStatus struct { // 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. + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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. + // +listType=atomic 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 + // +listType=atomic NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,2,rep,name=nonResourceURLs"` } diff --git a/vendor/k8s.io/api/autoscaling/v1/generated.pb.go b/vendor/k8s.io/api/autoscaling/v1/generated.pb.go index 289d1b827f6..3e3c2313519 100644 --- a/vendor/k8s.io/api/autoscaling/v1/generated.pb.go +++ b/vendor/k8s.io/api/autoscaling/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v1/generated.proto +// source: k8s.io/api/autoscaling/v1/generated.proto package v1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } func (*ContainerResourceMetricSource) ProtoMessage() {} func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{0} + return fileDescriptor_1972394c0c7aac8b, []int{0} } func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } func (*ContainerResourceMetricStatus) ProtoMessage() {} func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{1} + return fileDescriptor_1972394c0c7aac8b, []int{1} } func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{2} + return fileDescriptor_1972394c0c7aac8b, []int{2} } func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } func (*ExternalMetricSource) ProtoMessage() {} func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{3} + return fileDescriptor_1972394c0c7aac8b, []int{3} } func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{4} + return fileDescriptor_1972394c0c7aac8b, []int{4} } func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{5} + return fileDescriptor_1972394c0c7aac8b, []int{5} } func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{6} + return fileDescriptor_1972394c0c7aac8b, []int{6} } func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{7} + return fileDescriptor_1972394c0c7aac8b, []int{7} } func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{8} + return fileDescriptor_1972394c0c7aac8b, []int{8} } func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{9} + return fileDescriptor_1972394c0c7aac8b, []int{9} } func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +330,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{10} + return fileDescriptor_1972394c0c7aac8b, []int{10} } func (m *MetricSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +358,7 @@ var xxx_messageInfo_MetricSpec proto.InternalMessageInfo func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{11} + return fileDescriptor_1972394c0c7aac8b, []int{11} } func (m *MetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +386,7 @@ var xxx_messageInfo_MetricStatus proto.InternalMessageInfo func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{12} + return fileDescriptor_1972394c0c7aac8b, []int{12} } func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +414,7 @@ var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{13} + return fileDescriptor_1972394c0c7aac8b, []int{13} } func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +442,7 @@ var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{14} + return fileDescriptor_1972394c0c7aac8b, []int{14} } func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +470,7 @@ var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{15} + return fileDescriptor_1972394c0c7aac8b, []int{15} } func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +498,7 @@ var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{16} + return fileDescriptor_1972394c0c7aac8b, []int{16} } func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +526,7 @@ var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{17} + return fileDescriptor_1972394c0c7aac8b, []int{17} } func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +554,7 @@ var xxx_messageInfo_ResourceMetricStatus proto.InternalMessageInfo func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{18} + return fileDescriptor_1972394c0c7aac8b, []int{18} } func (m *Scale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +582,7 @@ var xxx_messageInfo_Scale proto.InternalMessageInfo func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{19} + return fileDescriptor_1972394c0c7aac8b, []int{19} } func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +610,7 @@ var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2bb1f2101a7f10e2, []int{20} + return fileDescriptor_1972394c0c7aac8b, []int{20} } func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -660,112 +660,111 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v1/generated.proto", fileDescriptor_2bb1f2101a7f10e2) -} - -var fileDescriptor_2bb1f2101a7f10e2 = []byte{ - // 1608 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0xd4, 0xc6, - 0x17, 0xcf, 0x7e, 0x24, 0x24, 0x6f, 0x43, 0x3e, 0x06, 0xfe, 0x90, 0x84, 0x3f, 0xeb, 0xc8, 0x7f, - 0x84, 0xf2, 0x6f, 0x8b, 0xdd, 0x6c, 0x29, 0xa2, 0xa7, 0x2a, 0xde, 0x96, 0x82, 0x9a, 0x85, 0x30, - 0x09, 0x94, 0x7e, 0x8a, 0x89, 0x77, 0xd8, 0x98, 0xac, 0xed, 0x95, 0xed, 0x5d, 0x11, 0x24, 0xa4, - 0xf6, 0xd0, 0x7b, 0x2f, 0xb4, 0xd7, 0x56, 0xea, 0xb5, 0x67, 0xce, 0xbd, 0x71, 0xe4, 0x80, 0x54, - 0x4e, 0xab, 0xe2, 0x1e, 0x7a, 0xe8, 0xa9, 0x57, 0x4e, 0x95, 0xc7, 0x63, 0xaf, 0xbd, 0xb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x8d, 0xca, 0x90, 0x37, 0x88, 0x4e, 0xe7, 0x32, 0x8b, 0x99, 0xa5, 0x09, - 0x45, 0x7e, 0xdc, 0x16, 0x46, 0xdc, 0xb6, 0x90, 0xbf, 0x4a, 0x74, 0xfa, 0xa2, 0x2d, 0x08, 0xbd, - 0x8a, 0x93, 0x02, 0x18, 0x8f, 0x04, 0x33, 0x66, 0x74, 0x0b, 0xe6, 0x1c, 0x62, 0xd5, 0xa8, 0xb3, - 0xd2, 0xa2, 0x16, 0xa9, 0xd1, 0x1b, 0x8e, 0x56, 0xd7, 0xee, 0x13, 0x47, 0x33, 0x8d, 0xb9, 0xec, - 0x62, 0x66, 0x69, 0x54, 0xf9, 0xaf, 0xdb, 0x16, 0xe6, 0x36, 0x12, 0x68, 0x70, 0x22, 0x37, 0x6a, - 0x01, 0x8a, 0x9d, 0xdd, 0x24, 0xf5, 0x26, 0x9d, 0xcb, 0x2d, 0x66, 0x96, 0x0a, 0x25, 0x49, 0xea, - 0x38, 0x48, 0xa8, 0x15, 0xa9, 0xb1, 0x5d, 0x63, 0x1e, 0x13, 0x98, 0x4c, 0xba, 0xde, 0x24, 0x86, - 0xa3, 0x39, 0x3b, 0xca, 0x09, 0xb7, 0x2d, 0xa0, 0x8d, 0x1e, 0x34, 0xdc, 0x47, 0x02, 0x92, 0x61, - 0x42, 0x0d, 0xf4, 0x36, 0x37, 0xca, 0x74, 0x33, 0xcb, 0x75, 0x33, 0xd1, 0x51, 0x68, 0x87, 0x46, - 0xfc, 0x33, 0x45, 0xd3, 0x0e, 0x71, 0x9a, 0xf6, 0xc1, 0x68, 0xfa, 0x53, 0x98, 0x57, 0x9b, 0x96, - 0x45, 0x8d, 0x64, 0x55, 0x9f, 0x76, 0xdb, 0xc2, 0x7c, 0x39, 0x89, 0x08, 0x27, 0xf3, 0xa3, 0x07, - 0x70, 0x2c, 0x7e, 0xb8, 0x1f, 0x6d, 0x9f, 0xe2, 0x0f, 0x3c, 0x56, 0xee, 0x85, 0x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x64, 0x70, 0xbb, 0x9c, 0x4b, 0x09, 0xa7, 0xb0, 0xa4, 0x85, 0x40, 0x0a, 0x78, 0xb9, 0x8c, - 0x87, 0x16, 0x07, 0x42, 0x57, 0x20, 0xdf, 0x30, 0xab, 0x41, 0x21, 0x7a, 0x3d, 0x05, 0x70, 0xcd, - 0xac, 0xda, 0x31, 0xb8, 0x71, 0xef, 0xc6, 0xde, 0xaf, 0x98, 0x41, 0xa0, 0x8f, 0x61, 0x3c, 0x28, - 0xf8, 0xbc, 0x3b, 0x90, 0x53, 0xe0, 0xfa, 0x0d, 0xa0, 0xca, 0xa4, 0x97, 0xc8, 0x82, 0x13, 0x1c, - 0xc2, 0xa1, 0x07, 0x30, 0xab, 0x76, 0xcf, 0x53, 0x73, 0x47, 0x76, 0xad, 0x9d, 0xa9, 0xd3, 0xae, - 0xf2, 0x1f, 0xb7, 0x2d, 0xcc, 0xf6, 0x90, 0xe0, 0x5e, 0x49, 0xde, 0xcb, 0x28, 0xef, 0x14, 0x99, - 0x53, 0xa4, 0xbf, 0xac, 0x5f, 0xb7, 0xef, 0xbf, 0x2c, 0x38, 0xc1, 0x21, 0x9c, 0xf8, 0x5d, 0x1e, - 0x26, 0x63, 0xdd, 0xe7, 0x21, 0x7b, 0x86, 0xdf, 0x46, 0x1c, 0x98, 0x67, 0xf8, 0x70, 0x07, 0xea, - 0x19, 0x3e, 0xe4, 0x21, 0x79, 0x86, 0x2f, 0xec, 0x90, 0x3c, 0x23, 0xf2, 0xb2, 0x3e, 0x9e, 0xf1, - 0x34, 0x07, 0xa8, 0x37, 0x88, 0xd1, 0x17, 0x30, 0xe6, 0x97, 0x8b, 0x7d, 0x96, 0xd4, 0xb0, 0xb9, - 0xe1, 0xd5, 0x93, 0xa3, 0x76, 0x4d, 0x3f, 0xd9, 0x81, 0xa6, 0x1f, 0x7a, 0x10, 0x53, 0x62, 0x58, - 0x73, 0x13, 0x27, 0xc5, 0xcf, 0x61, 0xdc, 0x0e, 0xc6, 0x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, - 0x77, 0x1f, 0x3f, 0x2f, 0x8e, 0x3c, 0x79, 0x5e, 0x1c, 0x79, 0xf6, 0xbc, 0x38, 0xf2, 0xa5, 0x5b, - 0xcc, 0x3c, 0x76, 0x8b, 0x99, 0x27, 0x6e, 0x31, 0xf3, 0xcc, 0x2d, 0x66, 0x7e, 0x75, 0x8b, 0x99, - 0x6f, 0x7e, 0x2b, 0x8e, 0x7c, 0x32, 0x9f, 0xf8, 0x2f, 0xd5, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x5d, 0x92, 0x55, 0x29, 0x87, 0x1d, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/autoscaling/v1/generated.proto", fileDescriptor_1972394c0c7aac8b) +} + +var fileDescriptor_1972394c0c7aac8b = []byte{ + // 1593 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0x13, 0xd7, + 0x16, 0x8e, 0x7f, 0x12, 0x92, 0xe3, 0x90, 0x9f, 0x0b, 0x0f, 0x92, 0xf0, 0xf0, 0x44, 0xf3, 0x10, + 0x0a, 0xef, 0x3d, 0xc6, 0x8d, 0x4b, 0x11, 0x5d, 0x55, 0xb1, 0x5b, 0x0a, 0x6a, 0x0c, 0xe1, 0x26, + 0x50, 0xfa, 0x2b, 0x6e, 0xc6, 0x17, 0x67, 0x88, 0x67, 0xc6, 0x9a, 0x19, 0x5b, 0x04, 0x09, 0xa9, + 0x5d, 0x74, 0xdf, 0x0d, 0xed, 0xb6, 0x95, 0xba, 0xed, 0x9a, 0x75, 0x77, 0x2c, 0x59, 0x20, 0x95, + 0x95, 0x55, 0xa6, 0x8b, 0x2e, 0xba, 0xea, 0x96, 0x55, 0x75, 0xef, 0xdc, 0x19, 0xcf, 0xd8, 0x9e, + 0x89, 0xe3, 0x84, 0xa8, 0xad, 0xd8, 0x65, 0x7c, 0xcf, 0xf9, 0xce, 0x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, + 0x4f, 0x7d, 0xfd, 0x6b, 0x7e, 0xe4, 0xe3, 0xf9, 0xd8, 0x7f, 0xa9, 0xfe, 0x19, 0x00, 0x00, 0xff, + 0xff, 0xd7, 0x67, 0xd4, 0x08, 0x6e, 0x1d, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/autoscaling/v2/generated.pb.go b/vendor/k8s.io/api/autoscaling/v2/generated.pb.go index 9f57916d7c9..ece6dedadb1 100644 --- a/vendor/k8s.io/api/autoscaling/v2/generated.pb.go +++ b/vendor/k8s.io/api/autoscaling/v2/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2/generated.proto +// source: k8s.io/api/autoscaling/v2/generated.proto package v2 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } func (*ContainerResourceMetricSource) ProtoMessage() {} func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{0} + return fileDescriptor_4d5f2c8767749221, []int{0} } func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } func (*ContainerResourceMetricStatus) ProtoMessage() {} func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{1} + return fileDescriptor_4d5f2c8767749221, []int{1} } func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{2} + return fileDescriptor_4d5f2c8767749221, []int{2} } func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } func (*ExternalMetricSource) ProtoMessage() {} func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{3} + return fileDescriptor_4d5f2c8767749221, []int{3} } func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{4} + return fileDescriptor_4d5f2c8767749221, []int{4} } func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo func (m *HPAScalingPolicy) Reset() { *m = HPAScalingPolicy{} } func (*HPAScalingPolicy) ProtoMessage() {} func (*HPAScalingPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{5} + return fileDescriptor_4d5f2c8767749221, []int{5} } func (m *HPAScalingPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_HPAScalingPolicy proto.InternalMessageInfo func (m *HPAScalingRules) Reset() { *m = HPAScalingRules{} } func (*HPAScalingRules) ProtoMessage() {} func (*HPAScalingRules) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{6} + return fileDescriptor_4d5f2c8767749221, []int{6} } func (m *HPAScalingRules) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_HPAScalingRules proto.InternalMessageInfo func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{7} + return fileDescriptor_4d5f2c8767749221, []int{7} } func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo func (m *HorizontalPodAutoscalerBehavior) Reset() { *m = HorizontalPodAutoscalerBehavior{} } func (*HorizontalPodAutoscalerBehavior) ProtoMessage() {} func (*HorizontalPodAutoscalerBehavior) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{8} + return fileDescriptor_4d5f2c8767749221, []int{8} } func (m *HorizontalPodAutoscalerBehavior) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerBehavior proto.InternalMessageInfo func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{9} + return fileDescriptor_4d5f2c8767749221, []int{9} } func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +330,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{10} + return fileDescriptor_4d5f2c8767749221, []int{10} } func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +358,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{11} + return fileDescriptor_4d5f2c8767749221, []int{11} } func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +386,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{12} + return fileDescriptor_4d5f2c8767749221, []int{12} } func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +414,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo func (m *MetricIdentifier) Reset() { *m = MetricIdentifier{} } func (*MetricIdentifier) ProtoMessage() {} func (*MetricIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{13} + return fileDescriptor_4d5f2c8767749221, []int{13} } func (m *MetricIdentifier) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +442,7 @@ var xxx_messageInfo_MetricIdentifier proto.InternalMessageInfo func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{14} + return fileDescriptor_4d5f2c8767749221, []int{14} } func (m *MetricSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +470,7 @@ var xxx_messageInfo_MetricSpec proto.InternalMessageInfo func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{15} + return fileDescriptor_4d5f2c8767749221, []int{15} } func (m *MetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +498,7 @@ var xxx_messageInfo_MetricStatus proto.InternalMessageInfo func (m *MetricTarget) Reset() { *m = MetricTarget{} } func (*MetricTarget) ProtoMessage() {} func (*MetricTarget) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{16} + return fileDescriptor_4d5f2c8767749221, []int{16} } func (m *MetricTarget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +526,7 @@ var xxx_messageInfo_MetricTarget proto.InternalMessageInfo func (m *MetricValueStatus) Reset() { *m = MetricValueStatus{} } func (*MetricValueStatus) ProtoMessage() {} func (*MetricValueStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{17} + return fileDescriptor_4d5f2c8767749221, []int{17} } func (m *MetricValueStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +554,7 @@ var xxx_messageInfo_MetricValueStatus proto.InternalMessageInfo func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{18} + return fileDescriptor_4d5f2c8767749221, []int{18} } func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +582,7 @@ var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{19} + return fileDescriptor_4d5f2c8767749221, []int{19} } func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +610,7 @@ var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{20} + return fileDescriptor_4d5f2c8767749221, []int{20} } func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -638,7 +638,7 @@ var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{21} + return fileDescriptor_4d5f2c8767749221, []int{21} } func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -666,7 +666,7 @@ var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{22} + return fileDescriptor_4d5f2c8767749221, []int{22} } func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -694,7 +694,7 @@ var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_b14d4df4b5f3935e, []int{23} + return fileDescriptor_4d5f2c8767749221, []int{23} } func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -747,120 +747,119 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2/generated.proto", fileDescriptor_b14d4df4b5f3935e) -} - -var fileDescriptor_b14d4df4b5f3935e = []byte{ - // 1738 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcb, 0x8f, 0x13, 0xc9, - 0x19, 0x9f, 0xb6, 0x3d, 0xaf, 0xf2, 0x3c, 0x8b, 0x97, 0x19, 0x84, 0x3d, 0xea, 0x90, 0x40, 0x48, - 0x68, 0x07, 0x87, 0x20, 0x14, 0x0e, 0xd1, 0xf4, 0x90, 0x84, 0x11, 0x33, 0x19, 0x53, 0x06, 0x26, - 0x89, 0x92, 0x88, 0x72, 0x77, 0x8d, 0xa7, 0x32, 0x76, 0xb7, 0xd5, 0xdd, 0x36, 0x0c, 0x52, 0xa4, - 0x5c, 0x72, 0x8f, 0x12, 0xa1, 0x28, 0xff, 0x03, 0xca, 0x29, 0x11, 0x39, 0xec, 0x4a, 0x2b, 0xed, - 0x1e, 0xb8, 0xac, 0xc4, 0x61, 0x0f, 0x9c, 0xac, 0xc5, 0x2b, 0xed, 0x71, 0xff, 0x00, 0x4e, 0xab, - 0x7a, 0xf4, 0xd3, 0xaf, 0x31, 0x3b, 0x8c, 0x34, 0x37, 0x57, 0xd5, 0xf7, 0xfd, 0xbe, 0x47, 0x7d, - 0xaf, 0x6a, 0x03, 0x7d, 0xff, 0x96, 0xab, 0x51, 0xbb, 0xb8, 0xdf, 0xaa, 0x12, 0xc7, 0x22, 0x1e, - 0x71, 0x8b, 0x6d, 0x62, 0x99, 0xb6, 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0x79, - 0x56, 0xf4, 0x2b, 0x3e, 0x00, 0x0a, 0xb1, 0xd4, 0xbf, 0xa5, 0xc1, 0xea, 0x00, 0x7b, 0xd6, 0x6d, - 0xcb, 0xa4, 0x2c, 0xc6, 0xe1, 0xdd, 0x58, 0x9a, 0xdf, 0x48, 0xa4, 0xf9, 0xa5, 0x51, 0xfc, 0x91, - 0xb4, 0xdf, 0x0c, 0x2e, 0x28, 0x15, 0xc3, 0x92, 0x6e, 0x7e, 0xd7, 0x29, 0xf4, 0x19, 0xac, 0xb4, - 0x00, 0x29, 0x7e, 0x19, 0xb0, 0x0d, 0x60, 0x1d, 0xbb, 0xde, 0x03, 0x07, 0x5b, 0xae, 0x90, 0x44, - 0x1b, 0x44, 0x5e, 0xfd, 0xd5, 0xc3, 0x05, 0x2d, 0xe3, 0xd0, 0x57, 0xa4, 0x16, 0x70, 0xb3, 0x07, - 0x0d, 0xf5, 0x91, 0x00, 0x7f, 0x00, 0xa6, 0x1c, 0x82, 0x5d, 0xdb, 0xca, 0x65, 0xb8, 0x15, 0x41, - 0xb0, 0x20, 0xbe, 0x8b, 0xe4, 0x29, 0xfc, 0x21, 0x98, 0x6e, 0x10, 0xd7, 0xc5, 0x35, 0x92, 0x9b, - 0xe4, 0x84, 0x41, 0x79, 0xdd, 0x12, 0xdb, 0xc8, 0x3f, 0x57, 0xbf, 0x50, 0xc0, 0x85, 0x01, 0x7e, - 0xdc, 0xa4, 0xae, 0x07, 0xff, 0xd0, 0x93, 0x95, 0xda, 0xe1, 0x0c, 0x64, 0xdc, 0x3c, 0x27, 0x83, + proto.RegisterFile("k8s.io/api/autoscaling/v2/generated.proto", fileDescriptor_4d5f2c8767749221) +} + +var fileDescriptor_4d5f2c8767749221 = []byte{ + // 1722 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcb, 0x8f, 0x1b, 0x49, + 0x19, 0x9f, 0x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74, 0xc0, 0x1a, 0x83, 0xac, 0x53, 0x12, 0x08, + 0xee, 0x8c, 0x1f, 0x25, 0x41, 0xe1, 0x0d, 0x3b, 0x7a, 0xb0, 0xe5, 0xa2, 0x88, 0x08, 0xf5, 0x6f, + 0x0a, 0x58, 0x4a, 0x0e, 0xa9, 0xc1, 0x7b, 0x40, 0x19, 0xf8, 0x1e, 0xf8, 0x1d, 0x98, 0x11, 0x33, + 0x8f, 0xed, 0xc8, 0x6b, 0xff, 0xd1, 0x21, 0xcb, 0x1a, 0xae, 0x92, 0x7a, 0x45, 0xb2, 0x8a, 0x20, + 0xf6, 0x57, 0x28, 0x80, 0x54, 0x5f, 0x64, 0x00, 0x08, 0x73, 0x0a, 0xde, 0x8c, 0xf5, 0xb1, 0xd5, + 0x44, 0x1f, 0x5b, 0x8a, 0x3e, 0x2e, 0x22, 0x3d, 0xeb, 0x01, 0x98, 0xb2, 0x79, 0x99, 0x91, 0x1a, + 0x5e, 0x1f, 0xe2, 0xc7, 0x60, 0xde, 0x09, 0x80, 0x74, 0xc0, 0x1a, 0x83, 0xac, 0x53, 0x12, 0x08, 0x6e, 0x80, 0x4c, 0xd3, 0x36, 0xfd, 0x29, 0x65, 0xd8, 0x58, 0x57, 0xb6, 0x4d, 0x37, 0x06, 0x37, 0xc3, 0x34, 0x66, 0xbb, 0x88, 0x43, 0xb0, 0x29, 0xd1, 0xff, 0x94, 0xc0, 0xc3, 0x31, 0x5b, 0x2a, - 0x0e, 0x81, 0xeb, 0xf7, 0x60, 0x17, 0xde, 0xf3, 0x4f, 0x50, 0x00, 0x07, 0xff, 0x02, 0x96, 0x8d, + 0x0e, 0x81, 0xeb, 0xf7, 0x60, 0x17, 0xde, 0xf3, 0x4f, 0x50, 0x00, 0x07, 0xff, 0x08, 0x96, 0x8d, 0xe4, 0x03, 0x38, 0x37, 0x3d, 0x72, 0xb0, 0x1a, 0xfa, 0x75, 0x40, 0x3f, 0xd3, 0xed, 0x14, 0x96, 0x7b, 0x48,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xc4, 0x5f, - 0xbb, 0x79, 0xe5, 0x55, 0x37, 0xaf, 0xbc, 0xee, 0xe6, 0x95, 0x37, 0xdd, 0xbc, 0xf2, 0x65, 0x37, - 0xaf, 0xfc, 0xfd, 0xab, 0xfc, 0xc4, 0xef, 0xcf, 0x0f, 0xfc, 0xa7, 0xf0, 0xdb, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xc5, 0xb7, 0xf9, 0x52, 0x5e, 0x1c, 0x00, 0x00, + 0xea, 0xff, 0x92, 0x7e, 0x3b, 0x81, 0x9f, 0xcf, 0xfa, 0xdd, 0x72, 0xfa, 0x78, 0x6e, 0x59, 0xfd, + 0x8f, 0x02, 0x96, 0x92, 0x63, 0xc4, 0x09, 0xf9, 0x76, 0xfa, 0xff, 0xb8, 0xea, 0x27, 0xf1, 0xbb, + 0xe9, 0x4b, 0x05, 0x9c, 0x3e, 0x39, 0x7f, 0x93, 0xa8, 0xff, 0xea, 0x55, 0xf7, 0x04, 0xfc, 0xd9, + 0xa1, 0xff, 0xf4, 0xf5, 0xbb, 0xfc, 0xc4, 0x9b, 0x77, 0xf9, 0x89, 0xb7, 0xef, 0xf2, 0x13, 0x7f, + 0xea, 0xe6, 0x95, 0xd7, 0xdd, 0xbc, 0xf2, 0xa6, 0x9b, 0x57, 0xde, 0x76, 0xf3, 0xca, 0x17, 0xdd, + 0xbc, 0xf2, 0x97, 0x2f, 0xf3, 0x13, 0xbf, 0x39, 0x3f, 0xf0, 0x9f, 0xc2, 0x6f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xca, 0x8b, 0x47, 0xba, 0x45, 0x1c, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go b/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go index edda3581e76..69567089b6f 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto +// source: k8s.io/api/autoscaling/v2beta1/generated.proto package v2beta1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } func (*ContainerResourceMetricSource) ProtoMessage() {} func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{0} + return fileDescriptor_ea74040359c1ed83, []int{0} } func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } func (*ContainerResourceMetricStatus) ProtoMessage() {} func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{1} + return fileDescriptor_ea74040359c1ed83, []int{1} } func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{2} + return fileDescriptor_ea74040359c1ed83, []int{2} } func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } func (*ExternalMetricSource) ProtoMessage() {} func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{3} + return fileDescriptor_ea74040359c1ed83, []int{3} } func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{4} + return fileDescriptor_ea74040359c1ed83, []int{4} } func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{5} + return fileDescriptor_ea74040359c1ed83, []int{5} } func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{6} + return fileDescriptor_ea74040359c1ed83, []int{6} } func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{7} + return fileDescriptor_ea74040359c1ed83, []int{7} } func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{8} + return fileDescriptor_ea74040359c1ed83, []int{8} } func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{9} + return fileDescriptor_ea74040359c1ed83, []int{9} } func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +330,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{10} + return fileDescriptor_ea74040359c1ed83, []int{10} } func (m *MetricSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +358,7 @@ var xxx_messageInfo_MetricSpec proto.InternalMessageInfo func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{11} + return fileDescriptor_ea74040359c1ed83, []int{11} } func (m *MetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +386,7 @@ var xxx_messageInfo_MetricStatus proto.InternalMessageInfo func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{12} + return fileDescriptor_ea74040359c1ed83, []int{12} } func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +414,7 @@ var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{13} + return fileDescriptor_ea74040359c1ed83, []int{13} } func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +442,7 @@ var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{14} + return fileDescriptor_ea74040359c1ed83, []int{14} } func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +470,7 @@ var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{15} + return fileDescriptor_ea74040359c1ed83, []int{15} } func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +498,7 @@ var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{16} + return fileDescriptor_ea74040359c1ed83, []int{16} } func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +526,7 @@ var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_26c1bfc7a52d0478, []int{17} + return fileDescriptor_ea74040359c1ed83, []int{17} } func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -573,109 +573,108 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto", fileDescriptor_26c1bfc7a52d0478) -} - -var fileDescriptor_26c1bfc7a52d0478 = []byte{ - // 1565 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0x1b, 0x45, - 0x1b, 0x8e, 0xed, 0x4d, 0x9a, 0xbc, 0x4e, 0xf3, 0x33, 0xed, 0xd7, 0xba, 0xe9, 0x57, 0x3b, 0x5a, - 0x7d, 0xfa, 0x94, 0xaf, 0xfa, 0xd8, 0x6d, 0x4d, 0xf8, 0x91, 0x10, 0x12, 0xb1, 0x0b, 0x6d, 0x45, - 0xd2, 0x96, 0x49, 0x5a, 0x21, 0x68, 0x11, 0x93, 0xf5, 0xd4, 0x59, 0x62, 0xef, 0x5a, 0x3b, 0x63, - 0xab, 0x29, 0x42, 0x42, 0x48, 0xdc, 0xb9, 0xc0, 0x19, 0x24, 0xae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, 0x1e, 0xb4, 0xb2, - 0x89, 0x5f, 0x5a, 0xd9, 0xc4, 0x67, 0xbf, 0x66, 0x27, 0xde, 0xc9, 0x0e, 0xfe, 0x93, 0xf1, 0x8f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x09, 0x76, 0xa2, 0x69, 0x9e, 0x1c, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/autoscaling/v2beta1/generated.proto", fileDescriptor_ea74040359c1ed83) +} + +var fileDescriptor_ea74040359c1ed83 = []byte{ + // 1549 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0x1b, 0xc5, + 0x17, 0x8f, 0xed, 0x4d, 0x9a, 0x3c, 0xa7, 0xf9, 0x98, 0xf6, 0xdf, 0xba, 0xe9, 0xbf, 0x76, 0xb4, + 0xfa, 0xeb, 0xaf, 0x50, 0xc1, 0xba, 0x35, 0xe1, 0x43, 0x42, 0x48, 0xc4, 0x2e, 0xd0, 0x8a, 0xb8, + 0x2d, 0x93, 0xb4, 0x42, 0xd0, 0x22, 0x26, 0xeb, 0xa9, 0xb3, 0xc4, 0xde, 0xb5, 0x76, 0xc6, 0x51, + 0x53, 0x84, 0x84, 0x90, 0xb8, 0x73, 0x81, 0x33, 0x48, 0x5c, 0x11, 0xe2, 0x02, 0x67, 0x6e, 0x3d, + 0xf6, 0xd8, 0x0a, 0x64, 0x51, 0x73, 0xe0, 0xcc, 0xb5, 0x27, 0x34, 0xb3, 0xb3, 0xeb, 0x5d, 0xdb, + 0x6b, 0x3b, 0x6e, 0x1a, 0x3e, 0xd4, 0x9b, 0x77, 0xe7, 0xbd, 0xdf, 0x9b, 0xf9, 0xbd, 0xaf, 0x79, + 0x6b, 0x30, 0x76, 0x5e, 0x66, 0x86, 0xe5, 0xe4, 0x49, 0xc3, 0xca, 0x93, 0x26, 0x77, 0x98, 0x49, + 0x6a, 0x96, 0x5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x8c, 0x91, 0x2a, 0xcd, + 0x4c, 0x4a, 0xc1, 0x79, 0x25, 0x78, 0xa4, 0xec, 0xbd, 0xc6, 0xfe, 0xba, 0xfe, 0x20, 0x01, 0xa7, + 0x63, 0x78, 0x5c, 0xb7, 0x18, 0x47, 0x37, 0x7a, 0xe2, 0xd9, 0x18, 0xb1, 0x76, 0x58, 0xcc, 0x8b, + 0xe6, 0x05, 0x65, 0x7b, 0xda, 0x7f, 0x13, 0x8a, 0xe5, 0x1b, 0x30, 0x69, 0x71, 0x5a, 0x17, 0x5e, + 0x49, 0xad, 0xa4, 0x0b, 0x2f, 0x8d, 0x19, 0x6b, 0xc5, 0xa3, 0xca, 0xc6, 0xe4, 0x25, 0x81, 0x86, + 0x3d, 0x50, 0xfd, 0xe7, 0x64, 0xec, 0xd9, 0x44, 0xc0, 0xa3, 0x8f, 0x60, 0x4e, 0x3e, 0x79, 0x95, + 0x19, 0xd3, 0x5b, 0xea, 0x84, 0x43, 0x73, 0x6a, 0x40, 0x43, 0x2f, 0x9e, 0x50, 0x5b, 0x99, 0xdb, + 0x88, 0x40, 0xe3, 0x2e, 0x53, 0xe8, 0x3c, 0xa4, 0xeb, 0x96, 0x8d, 0x69, 0xa3, 0x66, 0x99, 0x84, + 0xa9, 0x7b, 0x91, 0x6c, 0x49, 0xe5, 0xce, 0x6b, 0x1c, 0x96, 0x41, 0x2f, 0x40, 0xba, 0x4e, 0x6e, + 0x07, 0x2a, 0x29, 0xa9, 0x72, 0x4c, 0xd9, 0x4b, 0x97, 0x3b, 0x4b, 0x38, 0x2c, 0x87, 0xae, 0x89, + 0x68, 0x10, 0x55, 0x9a, 0x65, 0x34, 0x49, 0xf3, 0xd9, 0x61, 0xe7, 0x53, 0x45, 0x5e, 0x94, 0x88, + 0x50, 0xe4, 0x48, 0x08, 0xec, 0x63, 0xe9, 0x3f, 0x68, 0x70, 0x66, 0x60, 0xee, 0xa3, 0x37, 0x00, + 0x39, 0x5b, 0x8c, 0xba, 0xbb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ed, 0x5b, 0xaf, 0x2a, 0xfc, 0x6d, 0x7d, 0x7b, 0x78, 0x53, 0xf1, 0xbf, 0xc2, 0xbd, + 0x5f, 0x27, 0x61, 0xa1, 0xbb, 0xb1, 0x8e, 0xf5, 0xf9, 0xe3, 0x4e, 0xdf, 0x6f, 0x38, 0xc9, 0xb1, + 0x36, 0x1d, 0xcc, 0x6a, 0x23, 0x7e, 0x9d, 0x0d, 0x7b, 0x22, 0x75, 0xe0, 0x9e, 0xd0, 0xbf, 0x89, + 0x72, 0x34, 0xfe, 0x27, 0xa2, 0x98, 0x0f, 0xaa, 0xc9, 0x43, 0xfa, 0xa0, 0xfa, 0x84, 0x69, 0xfa, + 0x36, 0x09, 0xc7, 0x9f, 0xfe, 0xa7, 0x30, 0xfa, 0xd7, 0xc7, 0x1f, 0x7b, 0xf9, 0x7a, 0xfa, 0xcf, + 0xc0, 0x28, 0x81, 0x5c, 0xbc, 0x70, 0xf7, 0x61, 0x76, 0xe2, 0xde, 0xc3, 0xec, 0xc4, 0xfd, 0x87, + 0xd9, 0x89, 0x4f, 0xda, 0xd9, 0xc4, 0xdd, 0x76, 0x36, 0x71, 0xaf, 0x9d, 0x4d, 0xdc, 0x6f, 0x67, + 0x13, 0xbf, 0xb6, 0xb3, 0x89, 0xcf, 0x7f, 0xcb, 0x4e, 0xbc, 0x9b, 0x1d, 0xfc, 0x27, 0xe3, 0x9f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x5b, 0x05, 0xaa, 0x18, 0x85, 0x1c, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto b/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto index 6b3d4152126..e2119d5550d 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto +++ b/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto @@ -220,6 +220,7 @@ message HorizontalPodAutoscalerSpec { // increased, and vice-versa. See the individual metric source types for // more information about how each type of metric must respond. // +optional + // +listType=atomic repeated MetricSpec metrics = 4; } @@ -244,11 +245,13 @@ message HorizontalPodAutoscalerStatus { // currentMetrics is the last read state of the metrics used by this autoscaler. // +optional + // +listType=atomic 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. // +optional + // +listType=atomic repeated HorizontalPodAutoscalerCondition conditions = 6; } diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/types.go b/vendor/k8s.io/api/autoscaling/v2beta1/types.go index 842284072d9..193cc43549d 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/types.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/types.go @@ -56,6 +56,7 @@ type HorizontalPodAutoscalerSpec struct { // increased, and vice-versa. See the individual metric source types for // more information about how each type of metric must respond. // +optional + // +listType=atomic Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"` } @@ -260,11 +261,13 @@ type HorizontalPodAutoscalerStatus struct { // currentMetrics is the last read state of the metrics used by this autoscaler. // +optional + // +listType=atomic 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. // +optional + // +listType=atomic Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go b/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go index 211acd1ae3f..741979505dc 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto +// source: k8s.io/api/autoscaling/v2beta2/generated.proto package v2beta2 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } func (*ContainerResourceMetricSource) ProtoMessage() {} func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{0} + return fileDescriptor_1076ab1fac987148, []int{0} } func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } func (*ContainerResourceMetricStatus) ProtoMessage() {} func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{1} + return fileDescriptor_1076ab1fac987148, []int{1} } func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{2} + return fileDescriptor_1076ab1fac987148, []int{2} } func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } func (*ExternalMetricSource) ProtoMessage() {} func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{3} + return fileDescriptor_1076ab1fac987148, []int{3} } func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{4} + return fileDescriptor_1076ab1fac987148, []int{4} } func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo func (m *HPAScalingPolicy) Reset() { *m = HPAScalingPolicy{} } func (*HPAScalingPolicy) ProtoMessage() {} func (*HPAScalingPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{5} + return fileDescriptor_1076ab1fac987148, []int{5} } func (m *HPAScalingPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_HPAScalingPolicy proto.InternalMessageInfo func (m *HPAScalingRules) Reset() { *m = HPAScalingRules{} } func (*HPAScalingRules) ProtoMessage() {} func (*HPAScalingRules) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{6} + return fileDescriptor_1076ab1fac987148, []int{6} } func (m *HPAScalingRules) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_HPAScalingRules proto.InternalMessageInfo func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{7} + return fileDescriptor_1076ab1fac987148, []int{7} } func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo func (m *HorizontalPodAutoscalerBehavior) Reset() { *m = HorizontalPodAutoscalerBehavior{} } func (*HorizontalPodAutoscalerBehavior) ProtoMessage() {} func (*HorizontalPodAutoscalerBehavior) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{8} + return fileDescriptor_1076ab1fac987148, []int{8} } func (m *HorizontalPodAutoscalerBehavior) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerBehavior proto.InternalMessageInfo func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{9} + return fileDescriptor_1076ab1fac987148, []int{9} } func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +330,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{10} + return fileDescriptor_1076ab1fac987148, []int{10} } func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +358,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{11} + return fileDescriptor_1076ab1fac987148, []int{11} } func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +386,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{12} + return fileDescriptor_1076ab1fac987148, []int{12} } func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +414,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo func (m *MetricIdentifier) Reset() { *m = MetricIdentifier{} } func (*MetricIdentifier) ProtoMessage() {} func (*MetricIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{13} + return fileDescriptor_1076ab1fac987148, []int{13} } func (m *MetricIdentifier) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +442,7 @@ var xxx_messageInfo_MetricIdentifier proto.InternalMessageInfo func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{14} + return fileDescriptor_1076ab1fac987148, []int{14} } func (m *MetricSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +470,7 @@ var xxx_messageInfo_MetricSpec proto.InternalMessageInfo func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{15} + return fileDescriptor_1076ab1fac987148, []int{15} } func (m *MetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +498,7 @@ var xxx_messageInfo_MetricStatus proto.InternalMessageInfo func (m *MetricTarget) Reset() { *m = MetricTarget{} } func (*MetricTarget) ProtoMessage() {} func (*MetricTarget) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{16} + return fileDescriptor_1076ab1fac987148, []int{16} } func (m *MetricTarget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +526,7 @@ var xxx_messageInfo_MetricTarget proto.InternalMessageInfo func (m *MetricValueStatus) Reset() { *m = MetricValueStatus{} } func (*MetricValueStatus) ProtoMessage() {} func (*MetricValueStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{17} + return fileDescriptor_1076ab1fac987148, []int{17} } func (m *MetricValueStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +554,7 @@ var xxx_messageInfo_MetricValueStatus proto.InternalMessageInfo func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{18} + return fileDescriptor_1076ab1fac987148, []int{18} } func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +582,7 @@ var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{19} + return fileDescriptor_1076ab1fac987148, []int{19} } func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +610,7 @@ var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{20} + return fileDescriptor_1076ab1fac987148, []int{20} } func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -638,7 +638,7 @@ var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{21} + return fileDescriptor_1076ab1fac987148, []int{21} } func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -666,7 +666,7 @@ var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{22} + return fileDescriptor_1076ab1fac987148, []int{22} } func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -694,7 +694,7 @@ var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{23} + return fileDescriptor_1076ab1fac987148, []int{23} } func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -747,120 +747,119 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto", fileDescriptor_592ad94d7d6be24f) + proto.RegisterFile("k8s.io/api/autoscaling/v2beta2/generated.proto", fileDescriptor_1076ab1fac987148) } -var fileDescriptor_592ad94d7d6be24f = []byte{ - // 1743 bytes of a gzipped FileDescriptorProto +var fileDescriptor_1076ab1fac987148 = []byte{ + // 1727 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, 0x15, 0xd7, 0x92, 0xd4, 0xd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 0x8f, 0x03, 0x15, 0x71, - 0x9e, 0x9c, 0x91, 0xf6, 0xb2, 0xab, 0xe1, 0x14, 0x8a, 0xca, 0xc1, 0xfb, 0x8c, 0x0d, 0xec, 0x24, - 0x76, 0x73, 0x19, 0x1e, 0xe6, 0xab, 0x83, 0x1d, 0xdc, 0xbc, 0xf8, 0x45, 0x98, 0xc3, 0x21, 0x90, - 0x8f, 0x05, 0x29, 0x18, 0xab, 0xc8, 0x1a, 0xc4, 0x59, 0x96, 0x2d, 0xfd, 0xed, 0xb0, 0xdb, 0x27, - 0x61, 0xf4, 0x09, 0x46, 0x13, 0xff, 0x0b, 0x05, 0xf0, 0xea, 0x27, 0x19, 0x70, 0x69, 0xdf, 0x02, - 0x0a, 0xff, 0x09, 0xa0, 0x5d, 0x71, 0x89, 0xd3, 0x22, 0xe6, 0x4d, 0x71, 0xdf, 0x60, 0x4d, 0x21, - 0xdb, 0xce, 0xb4, 0x7e, 0x9e, 0x65, 0xd8, 0xbd, 0xae, 0x59, 0xd4, 0x43, 0x03, 0x1a, 0x60, 0x92, - 0xe5, 0x9d, 0xd8, 0x3b, 0x2a, 0xfb, 0xcf, 0x83, 0x25, 0xf5, 0x2c, 0x6b, 0x1d, 0x56, 0xa2, 0x20, - 0x28, 0x8e, 0x09, 0x97, 0xc0, 0xb4, 0x6c, 0x7b, 0x12, 0x7b, 0x79, 0x41, 0x06, 0x7b, 0x7a, 0x39, - 0x3e, 0x8d, 0x92, 0xf2, 0x0c, 0xc2, 0x24, 0x2e, 0x75, 0x88, 0x19, 0x40, 0x64, 0xe2, 0x10, 0x37, - 0xe2, 0xd3, 0x28, 0x29, 0x0f, 0x6b, 0x60, 0x4a, 0xa2, 0xca, 0xad, 0xcd, 0x0d, 0x73, 0x76, 0x0c, - 0xd8, 0xa0, 0xca, 0x93, 0x2b, 0xa0, 0xfb, 0x72, 0x0c, 0x0b, 0x25, 0xb0, 0xa1, 0x07, 0x80, 0xe1, - 0x57, 0x53, 0x37, 0x37,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fd, 0x98, 0x1f, 0x7a, 0x2d, 0xbf, 0xff, 0x1f, + 0x9f, 0xbf, 0x04, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x27, 0xde, 0xc0, 0x19, 0x1d, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto b/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto index 5b2fe9442aa..41f7a16ea12 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto +++ b/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto @@ -136,6 +136,7 @@ message HPAScalingRules { // policies is a list of potential scaling polices which can be used during scaling. // At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid // +optional + // +listType=atomic repeated HPAScalingPolicy policies = 2; } @@ -238,6 +239,7 @@ message HorizontalPodAutoscalerSpec { // more information about how each type of metric must respond. // If not set, the default metric will be set to 80% average CPU utilization. // +optional + // +listType=atomic repeated MetricSpec metrics = 4; // behavior configures the scaling behavior of the target @@ -268,11 +270,13 @@ message HorizontalPodAutoscalerStatus { // currentMetrics is the last read state of the metrics used by this autoscaler. // +optional + // +listType=atomic 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. // +optional + // +listType=atomic repeated HorizontalPodAutoscalerCondition conditions = 6; } diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/types.go b/vendor/k8s.io/api/autoscaling/v2beta2/types.go index b0b7681c0eb..2fee0b8a0f0 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/types.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/types.go @@ -76,6 +76,7 @@ type HorizontalPodAutoscalerSpec struct { // more information about how each type of metric must respond. // If not set, the default metric will be set to 80% average CPU utilization. // +optional + // +listType=atomic Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"` // behavior configures the scaling behavior of the target @@ -199,6 +200,7 @@ type HPAScalingRules struct { // policies is a list of potential scaling polices which can be used during scaling. // At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid // +optional + // +listType=atomic Policies []HPAScalingPolicy `json:"policies,omitempty" protobuf:"bytes,2,rep,name=policies"` } @@ -393,11 +395,13 @@ type HorizontalPodAutoscalerStatus struct { // currentMetrics is the last read state of the metrics used by this autoscaler. // +optional + // +listType=atomic 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. // +optional + // +listType=atomic Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"` } diff --git a/vendor/k8s.io/api/batch/v1/generated.pb.go b/vendor/k8s.io/api/batch/v1/generated.pb.go index 59a7482a0d2..6108a60839f 100644 --- a/vendor/k8s.io/api/batch/v1/generated.pb.go +++ b/vendor/k8s.io/api/batch/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/batch/v1/generated.proto +// source: k8s.io/api/batch/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CronJob) Reset() { *m = CronJob{} } func (*CronJob) ProtoMessage() {} func (*CronJob) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{0} + return fileDescriptor_79228dc2c4001a22, []int{0} } func (m *CronJob) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_CronJob proto.InternalMessageInfo func (m *CronJobList) Reset() { *m = CronJobList{} } func (*CronJobList) ProtoMessage() {} func (*CronJobList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{1} + return fileDescriptor_79228dc2c4001a22, []int{1} } func (m *CronJobList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_CronJobList proto.InternalMessageInfo func (m *CronJobSpec) Reset() { *m = CronJobSpec{} } func (*CronJobSpec) ProtoMessage() {} func (*CronJobSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{2} + return fileDescriptor_79228dc2c4001a22, []int{2} } func (m *CronJobSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_CronJobSpec proto.InternalMessageInfo func (m *CronJobStatus) Reset() { *m = CronJobStatus{} } func (*CronJobStatus) ProtoMessage() {} func (*CronJobStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{3} + return fileDescriptor_79228dc2c4001a22, []int{3} } func (m *CronJobStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_CronJobStatus proto.InternalMessageInfo func (m *Job) Reset() { *m = Job{} } func (*Job) ProtoMessage() {} func (*Job) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{4} + return fileDescriptor_79228dc2c4001a22, []int{4} } func (m *Job) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_Job proto.InternalMessageInfo func (m *JobCondition) Reset() { *m = JobCondition{} } func (*JobCondition) ProtoMessage() {} func (*JobCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{5} + return fileDescriptor_79228dc2c4001a22, []int{5} } func (m *JobCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_JobCondition proto.InternalMessageInfo func (m *JobList) Reset() { *m = JobList{} } func (*JobList) ProtoMessage() {} func (*JobList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{6} + return fileDescriptor_79228dc2c4001a22, []int{6} } func (m *JobList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_JobList proto.InternalMessageInfo func (m *JobSpec) Reset() { *m = JobSpec{} } func (*JobSpec) ProtoMessage() {} func (*JobSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{7} + return fileDescriptor_79228dc2c4001a22, []int{7} } func (m *JobSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_JobSpec proto.InternalMessageInfo func (m *JobStatus) Reset() { *m = JobStatus{} } func (*JobStatus) ProtoMessage() {} func (*JobStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{8} + return fileDescriptor_79228dc2c4001a22, []int{8} } func (m *JobStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_JobStatus proto.InternalMessageInfo func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} } func (*JobTemplateSpec) ProtoMessage() {} func (*JobTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{9} + return fileDescriptor_79228dc2c4001a22, []int{9} } func (m *JobTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_JobTemplateSpec proto.InternalMessageInfo func (m *PodFailurePolicy) Reset() { *m = PodFailurePolicy{} } func (*PodFailurePolicy) ProtoMessage() {} func (*PodFailurePolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{10} + return fileDescriptor_79228dc2c4001a22, []int{10} } func (m *PodFailurePolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -361,7 +361,7 @@ func (m *PodFailurePolicyOnExitCodesRequirement) Reset() { } func (*PodFailurePolicyOnExitCodesRequirement) ProtoMessage() {} func (*PodFailurePolicyOnExitCodesRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{11} + return fileDescriptor_79228dc2c4001a22, []int{11} } func (m *PodFailurePolicyOnExitCodesRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -391,7 +391,7 @@ func (m *PodFailurePolicyOnPodConditionsPattern) Reset() { } func (*PodFailurePolicyOnPodConditionsPattern) ProtoMessage() {} func (*PodFailurePolicyOnPodConditionsPattern) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{12} + return fileDescriptor_79228dc2c4001a22, []int{12} } func (m *PodFailurePolicyOnPodConditionsPattern) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -419,7 +419,7 @@ var xxx_messageInfo_PodFailurePolicyOnPodConditionsPattern proto.InternalMessage func (m *PodFailurePolicyRule) Reset() { *m = PodFailurePolicyRule{} } func (*PodFailurePolicyRule) ProtoMessage() {} func (*PodFailurePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{13} + return fileDescriptor_79228dc2c4001a22, []int{13} } func (m *PodFailurePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,10 +444,66 @@ func (m *PodFailurePolicyRule) XXX_DiscardUnknown() { var xxx_messageInfo_PodFailurePolicyRule proto.InternalMessageInfo +func (m *SuccessPolicy) Reset() { *m = SuccessPolicy{} } +func (*SuccessPolicy) ProtoMessage() {} +func (*SuccessPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_79228dc2c4001a22, []int{14} +} +func (m *SuccessPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SuccessPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SuccessPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_SuccessPolicy.Merge(m, src) +} +func (m *SuccessPolicy) XXX_Size() int { + return m.Size() +} +func (m *SuccessPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_SuccessPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_SuccessPolicy proto.InternalMessageInfo + +func (m *SuccessPolicyRule) Reset() { *m = SuccessPolicyRule{} } +func (*SuccessPolicyRule) ProtoMessage() {} +func (*SuccessPolicyRule) Descriptor() ([]byte, []int) { + return fileDescriptor_79228dc2c4001a22, []int{15} +} +func (m *SuccessPolicyRule) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SuccessPolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SuccessPolicyRule) XXX_Merge(src proto.Message) { + xxx_messageInfo_SuccessPolicyRule.Merge(m, src) +} +func (m *SuccessPolicyRule) XXX_Size() int { + return m.Size() +} +func (m *SuccessPolicyRule) XXX_DiscardUnknown() { + xxx_messageInfo_SuccessPolicyRule.DiscardUnknown(m) +} + +var xxx_messageInfo_SuccessPolicyRule proto.InternalMessageInfo + func (m *UncountedTerminatedPods) Reset() { *m = UncountedTerminatedPods{} } func (*UncountedTerminatedPods) ProtoMessage() {} func (*UncountedTerminatedPods) Descriptor() ([]byte, []int) { - return fileDescriptor_3b52da57c93de713, []int{14} + return fileDescriptor_79228dc2c4001a22, []int{16} } func (m *UncountedTerminatedPods) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -487,128 +543,135 @@ func init() { proto.RegisterType((*PodFailurePolicyOnExitCodesRequirement)(nil), "k8s.io.api.batch.v1.PodFailurePolicyOnExitCodesRequirement") proto.RegisterType((*PodFailurePolicyOnPodConditionsPattern)(nil), "k8s.io.api.batch.v1.PodFailurePolicyOnPodConditionsPattern") proto.RegisterType((*PodFailurePolicyRule)(nil), "k8s.io.api.batch.v1.PodFailurePolicyRule") + proto.RegisterType((*SuccessPolicy)(nil), "k8s.io.api.batch.v1.SuccessPolicy") + proto.RegisterType((*SuccessPolicyRule)(nil), "k8s.io.api.batch.v1.SuccessPolicyRule") proto.RegisterType((*UncountedTerminatedPods)(nil), "k8s.io.api.batch.v1.UncountedTerminatedPods") } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/batch/v1/generated.proto", fileDescriptor_3b52da57c93de713) -} - -var fileDescriptor_3b52da57c93de713 = []byte{ - // 1797 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0x23, 0x49, - 0x15, 0x8f, 0x93, 0x38, 0xb1, 0xcb, 0xf9, 0xf0, 0xd4, 0x64, 0x66, 0x4c, 0x58, 0xb9, 0xb3, 0x9e, - 0xdd, 0x55, 0x16, 0x2d, 0xed, 0x9d, 0xec, 0x88, 0xe5, 0x5b, 0x3b, 0x9d, 0x61, 0x96, 0x09, 0xce, - 0x8e, 0x29, 0x67, 0x40, 0x5a, 0x16, 0x44, 0xb9, 0xbb, 0xec, 0xf4, 0xa6, 0xdd, 0xd5, 0x74, 0x55, - 0x47, 0x93, 0x0b, 0x42, 0xe2, 0x0f, 0x80, 0xbf, 0x82, 0x23, 0x17, 0x38, 0xc3, 0x0d, 0xcd, 0x71, - 0xc5, 0x69, 0xc5, 0xa1, 0xc5, 0x34, 0x7f, 0x00, 0xf7, 0x20, 0x24, 0x54, 0xd5, 0xe5, 0xfe, 0x72, - 0x77, 0xc8, 0xac, 0xc4, 0x88, 0x5b, 0xfa, 0xbd, 0xdf, 0xfb, 0xd5, 0xc7, 0x7b, 0xf5, 0x7b, 0x2f, - 0x06, 0xdf, 0x3e, 0xfb, 0x3a, 0xd3, 0x6d, 0xda, 0x3f, 0x0b, 0xc6, 0xc4, 0x77, 0x09, 0x27, 0xac, - 0x7f, 0x4e, 0x5c, 0x8b, 0xfa, 0x7d, 0xe5, 0xc0, 0x9e, 0xdd, 0x1f, 0x63, 0x6e, 0x9e, 0xf6, 0xcf, - 0x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f, 0x71, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x43, 0xdf, 0xa6, - 0x7c, 0xf6, 0x15, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/batch/v1/generated.proto", fileDescriptor_79228dc2c4001a22) +} + +var fileDescriptor_79228dc2c4001a22 = []byte{ + // 1882 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0x37, 0x6d, 0xcb, 0x96, 0x46, 0xfe, 0x90, 0x27, 0x4e, 0xa2, 0xba, 0x0b, 0xd1, 0xab, 0xec, + 0x06, 0xde, 0x76, 0x2b, 0x6d, 0xbc, 0x41, 0xb7, 0x1f, 0x68, 0xb1, 0xa1, 0xd2, 0x6c, 0xe3, 0x95, + 0x37, 0xea, 0xc8, 0x69, 0x81, 0xdd, 0xb4, 0xe8, 0x88, 0x1c, 0xc9, 0xdc, 0x50, 0x1c, 0x96, 0x1c, + 0x1a, 0xf1, 0xa5, 0x28, 0xd0, 0x7f, 0xa0, 0x3d, 0xf6, 0x1f, 0xe8, 0xb1, 0x97, 0xf6, 0xdc, 0xde, + 0x8a, 0x1c, 0x17, 0x3d, 0x2d, 0x7a, 0x20, 0x1a, 0xf6, 0x0f, 0xe8, 0xdd, 0x45, 0x81, 0x62, 0x86, + 0xc3, 0x4f, 0x91, 0x5e, 0x67, 0x81, 0x06, 0xbd, 0x89, 0xef, 0xfd, 0xde, 0x6f, 0x1e, 0xe7, 0x7d, + 0x52, 0xe0, 0xd6, 0xd3, 0x6f, 0x79, 0x3d, 0x93, 0xf6, 0xb1, 0x63, 0xf6, 0x27, 0x98, 0xe9, 0xa7, + 0xfd, 0xb3, 0x3b, 0xfd, 0x19, 0xb1, 0x89, 0x8b, 0x19, 0x31, 0x7a, 0x8e, 0x4b, 0x19, 0x85, 0xd7, + 0x22, 0x50, 0x0f, 0x3b, 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0x6b, 0xaf, 0x08, 0x96, 0xee, 0xa5, 0x2c, + 0x02, 0xa9, 0x6d, 0x49, 0x9e, 0xb5, 0xe8, 0x19, 0x49, 0x86, 0xee, 0x1f, 0x14, 0xd0, 0x94, 0xc8, + 0xa1, 0xe9, 0x31, 0xf8, 0x64, 0xe1, 0x06, 0x7a, 0x57, 0xbb, 0x01, 0x6e, 0x2d, 0xde, 0xbf, 0x25, + 0x4f, 0xaa, 0xc7, 0x92, 0xcc, 0xdb, 0xdf, 0x03, 0x35, 0x93, 0x91, 0xb9, 0xd7, 0x5e, 0xde, 0x5f, + 0x39, 0x68, 0x1e, 0xbe, 0x76, 0x99, 0xe3, 0xda, 0xa6, 0x24, 0xaa, 0x3d, 0xe4, 0x26, 0x28, 0xb2, + 0xec, 0xfe, 0x6d, 0x35, 0x71, 0x98, 0x5f, 0x09, 0x7c, 0x1b, 0xd4, 0x79, 0x60, 0x0d, 0xdf, 0x22, + 0xc2, 0xe1, 0x46, 0xea, 0xc0, 0x58, 0xca, 0x51, 0x82, 0x80, 0x07, 0xa0, 0xce, 0x73, 0xe1, 0x63, + 0x6a, 0x93, 0x76, 0x5d, 0xa0, 0x37, 0x38, 0xf2, 0x44, 0xca, 0x50, 0xa2, 0x85, 0x8f, 0xc1, 0x4d, + 0x8f, 0x61, 0x97, 0x99, 0xf6, 0xec, 0x3e, 0xc1, 0x86, 0x65, 0xda, 0x64, 0x4c, 0x74, 0x6a, 0x1b, + 0x9e, 0x88, 0xdd, 0x8a, 0xf6, 0xd5, 0x30, 0x50, 0x6f, 0x8e, 0xcb, 0x21, 0xa8, 0xca, 0x16, 0x3e, + 0x01, 0x3b, 0x3a, 0xb5, 0x75, 0xdf, 0x75, 0x89, 0xad, 0x9f, 0x8f, 0xa8, 0x65, 0xea, 0xe7, 0x22, + 0x8c, 0x0d, 0xad, 0x27, 0xfd, 0xde, 0x19, 0x14, 0x01, 0x17, 0x65, 0x42, 0xb4, 0x48, 0x04, 0xdf, + 0x04, 0x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x0c, 0xe3, 0x17, 0xd0, 0xd0, 0x0e, + 0x73, 0xf3, 0xeb, 0x22, 0x50, 0x5f, 0xaf, 0xfa, 0xcb, 0x96, 0x27, 0xba, 0xd7, 0x7b, 0xfc, 0xf0, + 0x7e, 0x76, 0xc8, 0x7d, 0x90, 0x0c, 0xb9, 0x65, 0x41, 0xd7, 0x4f, 0x07, 0xdc, 0xd5, 0xb8, 0xa4, + 0xb9, 0xf6, 0xed, 0xe7, 0x2f, 0x3a, 0x4b, 0x9f, 0xbd, 0xe8, 0x2c, 0x7d, 0xfe, 0xa2, 0xb3, 0xf4, + 0xab, 0xb0, 0xa3, 0x3c, 0x0f, 0x3b, 0xca, 0x67, 0x61, 0x47, 0xf9, 0x3c, 0xec, 0x28, 0xff, 0x08, + 0x3b, 0xca, 0x6f, 0xfe, 0xd9, 0x59, 0xfa, 0xf8, 0x5a, 0xc9, 0x7f, 0xe8, 0xff, 0x0d, 0x00, 0x00, + 0xff, 0xff, 0x1e, 0x70, 0x68, 0xe1, 0x59, 0x17, 0x00, 0x00, } func (m *CronJob) Marshal() (dAtA []byte, err error) { @@ -1030,6 +1093,27 @@ func (m *JobSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SuccessPolicy != nil { + { + size, err := m.SuccessPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if m.ManagedBy != nil { + i -= len(*m.ManagedBy) + copy(dAtA[i:], *m.ManagedBy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ManagedBy))) + i-- + dAtA[i] = 0x7a + } if m.PodReplacementPolicy != nil { i -= len(*m.PodReplacementPolicy) copy(dAtA[i:], *m.PodReplacementPolicy) @@ -1449,6 +1533,78 @@ func (m *PodFailurePolicyRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SuccessPolicy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SuccessPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SuccessPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Rules) > 0 { + for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SuccessPolicyRule) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SuccessPolicyRule) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SuccessPolicyRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SucceededCount != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.SucceededCount)) + i-- + dAtA[i] = 0x10 + } + if m.SucceededIndexes != nil { + i -= len(*m.SucceededIndexes) + copy(dAtA[i:], *m.SucceededIndexes) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SucceededIndexes))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *UncountedTerminatedPods) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1691,6 +1847,14 @@ func (m *JobSpec) Size() (n int) { l = len(*m.PodReplacementPolicy) n += 1 + l + sovGenerated(uint64(l)) } + if m.ManagedBy != nil { + l = len(*m.ManagedBy) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.SuccessPolicy != nil { + l = m.SuccessPolicy.Size() + n += 2 + l + sovGenerated(uint64(l)) + } return n } @@ -1818,6 +1982,37 @@ func (m *PodFailurePolicyRule) Size() (n int) { return n } +func (m *SuccessPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *SuccessPolicyRule) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SucceededIndexes != nil { + l = len(*m.SucceededIndexes) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.SucceededCount != nil { + n += 1 + sovGenerated(uint64(*m.SucceededCount)) + } + return n +} + func (m *UncountedTerminatedPods) Size() (n int) { if m == nil { return 0 @@ -1969,6 +2164,8 @@ func (this *JobSpec) String() string { `BackoffLimitPerIndex:` + valueToStringGenerated(this.BackoffLimitPerIndex) + `,`, `MaxFailedIndexes:` + valueToStringGenerated(this.MaxFailedIndexes) + `,`, `PodReplacementPolicy:` + valueToStringGenerated(this.PodReplacementPolicy) + `,`, + `ManagedBy:` + valueToStringGenerated(this.ManagedBy) + `,`, + `SuccessPolicy:` + strings.Replace(this.SuccessPolicy.String(), "SuccessPolicy", "SuccessPolicy", 1) + `,`, `}`, }, "") return s @@ -2064,6 +2261,32 @@ func (this *PodFailurePolicyRule) String() string { }, "") return s } +func (this *SuccessPolicy) String() string { + if this == nil { + return "nil" + } + repeatedStringForRules := "[]SuccessPolicyRule{" + for _, f := range this.Rules { + repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "SuccessPolicyRule", "SuccessPolicyRule", 1), `&`, ``, 1) + "," + } + repeatedStringForRules += "}" + s := strings.Join([]string{`&SuccessPolicy{`, + `Rules:` + repeatedStringForRules + `,`, + `}`, + }, "") + return s +} +func (this *SuccessPolicyRule) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SuccessPolicyRule{`, + `SucceededIndexes:` + valueToStringGenerated(this.SucceededIndexes) + `,`, + `SucceededCount:` + valueToStringGenerated(this.SucceededCount) + `,`, + `}`, + }, "") + return s +} func (this *UncountedTerminatedPods) String() string { if this == nil { return "nil" @@ -3658,6 +3881,75 @@ func (m *JobSpec) Unmarshal(dAtA []byte) error { s := PodReplacementPolicy(dAtA[iNdEx:postIndex]) m.PodReplacementPolicy = &s iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ManagedBy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.ManagedBy = &s + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SuccessPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SuccessPolicy == nil { + m.SuccessPolicy = &SuccessPolicy{} + } + if err := m.SuccessPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -4690,6 +4982,193 @@ func (m *PodFailurePolicyRule) Unmarshal(dAtA []byte) error { } return nil } +func (m *SuccessPolicy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SuccessPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SuccessPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, SuccessPolicyRule{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SuccessPolicyRule) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SuccessPolicyRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SuccessPolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SucceededIndexes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.SucceededIndexes = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SucceededCount", 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.SucceededCount = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *UncountedTerminatedPods) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/vendor/k8s.io/api/batch/v1/generated.proto b/vendor/k8s.io/api/batch/v1/generated.proto index f8997798892..833b118d00e 100644 --- a/vendor/k8s.io/api/batch/v1/generated.proto +++ b/vendor/k8s.io/api/batch/v1/generated.proto @@ -218,6 +218,17 @@ message JobSpec { // +optional optional PodFailurePolicy podFailurePolicy = 11; + // successPolicy specifies the policy when the Job can be declared as succeeded. + // If empty, the default behavior applies - the Job is declared as succeeded + // only when the number of succeeded pods equals to the completions. + // When the field is specified, it must be immutable and works only for the Indexed Jobs. + // Once the Job meets the SuccessPolicy, the lingering pods are terminated. + // + // This field is alpha-level. To use this field, you must enable the + // `JobSuccessPolicy` feature gate (disabled by default). + // +optional + optional SuccessPolicy successPolicy = 16; + // Specifies the number of retries before marking this job failed. // Defaults to 6 // +optional @@ -330,6 +341,20 @@ message JobSpec { // This is on by default. // +optional optional string podReplacementPolicy = 14; + + // ManagedBy field indicates the controller that manages a Job. The k8s Job + // controller reconciles jobs which don't have this field at all or the field + // value is the reserved string `kubernetes.io/job-controller`, but skips + // reconciling Jobs with a custom value for this field. + // The value must be a valid domain-prefixed path (e.g. acme.io/foo) - + // all characters before the first "/" must be a valid subdomain as defined + // by RFC 1123. All characters trailing the first "/" must be valid HTTP Path + // characters as defined by RFC 3986. The value cannot exceed 64 characters. + // + // This field is alpha-level. The job controller accepts setting the field + // when the feature gate JobManagedBy is enabled (disabled by default). + // +optional + optional string managedBy = 15; } // JobStatus represents the current state of a Job. @@ -340,6 +365,12 @@ message JobStatus { // status true; when the Job is resumed, the status of this condition will // become false. When a Job is completed, one of the conditions will have // type "Complete" and status true. + // + // A job is considered finished when it is in a terminal condition, either + // "Complete" or "Failed". A Job cannot have both the "Complete" and "Failed" conditions. + // Additionally, it cannot be in the "Complete" and "FailureTarget" conditions. + // The "Complete", "Failed" and "FailureTarget" conditions cannot be disabled. + // // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ // +optional // +patchMergeKey=type @@ -351,25 +382,36 @@ message JobStatus { // Job is created in the suspended state, this field is not set until the // first time it is resumed. This field is reset every time a Job is resumed // from suspension. It is represented in RFC3339 form and is in UTC. + // + // Once set, the field can only be removed when the job is suspended. + // The field cannot be modified while the job is unsuspended or finished. + // // +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. - // The completion time is only set when the job finishes successfully. + // The completion time is set when the job finishes successfully, and only then. + // The value cannot be updated or removed. The value indicates the same or + // later point in time as the startTime field. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3; - // The number of pending and running pods. + // The number of pending and running pods which are not terminating (without + // a deletionTimestamp). + // The value is zero for finished jobs. // +optional optional int32 active = 4; // The number of pods which reached phase Succeeded. + // The value increases monotonically for a given spec. However, it may + // decrease in reaction to scale down of elastic indexed jobs. // +optional optional int32 succeeded = 5; // The number of pods which reached phase Failed. + // The value increases monotonically. // +optional optional int32 failed = 6; @@ -391,7 +433,7 @@ message JobStatus { // +optional optional string completedIndexes = 7; - // FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. + // FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. // The indexes are represented in the text format analogous as for the // `completedIndexes` field, ie. they are kept as decimal integers // separated by commas. The numbers are listed in increasing order. Three or @@ -399,6 +441,8 @@ message JobStatus { // last element of the series, separated by a hyphen. // For example, if the failed indexes are 1, 3, 4, 5 and 7, they are // represented as "1,3-5,7". + // The set of failed indexes cannot overlap with the set of completed indexes. + // // This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` // feature gate is enabled (enabled by default). // +optional @@ -418,6 +462,7 @@ message JobStatus { // // Old jobs might not be tracked using this field, in which case the field // remains null. + // The structure is empty for finished jobs. // +optional optional UncountedTerminatedPods uncountedTerminatedPods = 8; @@ -532,6 +577,51 @@ message PodFailurePolicyRule { repeated PodFailurePolicyOnPodConditionsPattern onPodConditions = 3; } +// SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes. +message SuccessPolicy { + // rules represents the list of alternative rules for the declaring the Jobs + // as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, + // the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. + // The terminal state for such a Job has the "Complete" condition. + // Additionally, these rules are evaluated in order; Once the Job meets one of the rules, + // other rules are ignored. At most 20 elements are allowed. + // +listType=atomic + repeated SuccessPolicyRule rules = 1; +} + +// SuccessPolicyRule describes rule for declaring a Job as succeeded. +// Each rule must have at least one of the "succeededIndexes" or "succeededCount" specified. +message SuccessPolicyRule { + // succeededIndexes specifies the set of indexes + // which need to be contained in the actual set of the succeeded indexes for the Job. + // The list of indexes must be within 0 to ".spec.completions-1" and + // must not contain duplicates. At least one element is required. + // The indexes are represented as intervals separated by commas. + // The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. + // The number are listed in represented by the first and last element of the series, + // separated by a hyphen. + // For example, if the completed indexes are 1, 3, 4, 5 and 7, they are + // represented as "1,3-5,7". + // When this field is null, this field doesn't default to any value + // and is never evaluated at any time. + // + // +optional + optional string succeededIndexes = 1; + + // succeededCount specifies the minimal required size of the actual set of the succeeded indexes + // for the Job. When succeededCount is used along with succeededIndexes, the check is + // constrained only to the set of indexes specified by succeededIndexes. + // For example, given that succeededIndexes is "1-4", succeededCount is "3", + // and completed indexes are "1", "3", and "5", the Job isn't declared as succeeded + // because only "1" and "3" indexes are considered in that rules. + // When this field is null, this doesn't default to any value and + // is never evaluated at any time. + // When specified it needs to be a positive integer. + // + // +optional + optional int32 succeededCount = 2; +} + // UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't // been accounted in Job status counters. message UncountedTerminatedPods { diff --git a/vendor/k8s.io/api/batch/v1/types.go b/vendor/k8s.io/api/batch/v1/types.go index 65e1d3c5929..49b0ec6441d 100644 --- a/vendor/k8s.io/api/batch/v1/types.go +++ b/vendor/k8s.io/api/batch/v1/types.go @@ -57,6 +57,9 @@ const ( // to the pod, which don't count towards the backoff limit, according to the // pod failure policy. When the annotation is absent zero is implied. JobIndexIgnoredFailureCountAnnotation = labelPrefix + "job-index-ignored-failure-count" + // JobControllerName reserved value for the managedBy field for the built-in + // Job controller. + JobControllerName = "kubernetes.io/job-controller" ) // +genclient @@ -171,7 +174,7 @@ type PodFailurePolicyOnExitCodesRequirement struct { // When specified, it should match one the container or initContainer // names in the pod template. // +optional - ContainerName *string `json:"containerName,omitempty" protobuf:"bytes,1,opt,name=containerName"` + ContainerName *string `json:"containerName" protobuf:"bytes,1,opt,name=containerName"` // Represents the relationship between the container exit code(s) and the // specified values. Containers completed with success (exit code 0) are @@ -231,14 +234,14 @@ type PodFailurePolicyRule struct { // Represents the requirement on the container exit codes. // +optional - OnExitCodes *PodFailurePolicyOnExitCodesRequirement `json:"onExitCodes,omitempty" protobuf:"bytes,2,opt,name=onExitCodes"` + OnExitCodes *PodFailurePolicyOnExitCodesRequirement `json:"onExitCodes" protobuf:"bytes,2,opt,name=onExitCodes"` // Represents the requirement on the pod conditions. The requirement is represented // as a list of pod condition patterns. The requirement is satisfied if at // least one pattern matches an actual pod condition. At most 20 elements are allowed. // +listType=atomic // +optional - OnPodConditions []PodFailurePolicyOnPodConditionsPattern `json:"onPodConditions,omitempty" protobuf:"bytes,3,opt,name=onPodConditions"` + OnPodConditions []PodFailurePolicyOnPodConditionsPattern `json:"onPodConditions" protobuf:"bytes,3,opt,name=onPodConditions"` } // PodFailurePolicy describes how failed pods influence the backoffLimit. @@ -252,6 +255,51 @@ type PodFailurePolicy struct { Rules []PodFailurePolicyRule `json:"rules" protobuf:"bytes,1,opt,name=rules"` } +// SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes. +type SuccessPolicy struct { + // rules represents the list of alternative rules for the declaring the Jobs + // as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, + // the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. + // The terminal state for such a Job has the "Complete" condition. + // Additionally, these rules are evaluated in order; Once the Job meets one of the rules, + // other rules are ignored. At most 20 elements are allowed. + // +listType=atomic + Rules []SuccessPolicyRule `json:"rules" protobuf:"bytes,1,opt,name=rules"` +} + +// SuccessPolicyRule describes rule for declaring a Job as succeeded. +// Each rule must have at least one of the "succeededIndexes" or "succeededCount" specified. +type SuccessPolicyRule struct { + // succeededIndexes specifies the set of indexes + // which need to be contained in the actual set of the succeeded indexes for the Job. + // The list of indexes must be within 0 to ".spec.completions-1" and + // must not contain duplicates. At least one element is required. + // The indexes are represented as intervals separated by commas. + // The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. + // The number are listed in represented by the first and last element of the series, + // separated by a hyphen. + // For example, if the completed indexes are 1, 3, 4, 5 and 7, they are + // represented as "1,3-5,7". + // When this field is null, this field doesn't default to any value + // and is never evaluated at any time. + // + // +optional + SucceededIndexes *string `json:"succeededIndexes,omitempty" protobuf:"bytes,1,opt,name=succeededIndexes"` + + // succeededCount specifies the minimal required size of the actual set of the succeeded indexes + // for the Job. When succeededCount is used along with succeededIndexes, the check is + // constrained only to the set of indexes specified by succeededIndexes. + // For example, given that succeededIndexes is "1-4", succeededCount is "3", + // and completed indexes are "1", "3", and "5", the Job isn't declared as succeeded + // because only "1" and "3" indexes are considered in that rules. + // When this field is null, this doesn't default to any value and + // is never evaluated at any time. + // When specified it needs to be a positive integer. + // + // +optional + SucceededCount *int32 `json:"succeededCount,omitempty" protobuf:"varint,2,opt,name=succeededCount"` +} + // JobSpec describes how the job execution will look like. type JobSpec struct { @@ -293,6 +341,17 @@ type JobSpec struct { // +optional PodFailurePolicy *PodFailurePolicy `json:"podFailurePolicy,omitempty" protobuf:"bytes,11,opt,name=podFailurePolicy"` + // successPolicy specifies the policy when the Job can be declared as succeeded. + // If empty, the default behavior applies - the Job is declared as succeeded + // only when the number of succeeded pods equals to the completions. + // When the field is specified, it must be immutable and works only for the Indexed Jobs. + // Once the Job meets the SuccessPolicy, the lingering pods are terminated. + // + // This field is alpha-level. To use this field, you must enable the + // `JobSuccessPolicy` feature gate (disabled by default). + // +optional + SuccessPolicy *SuccessPolicy `json:"successPolicy,omitempty" protobuf:"bytes,16,opt,name=successPolicy"` + // Specifies the number of retries before marking this job failed. // Defaults to 6 // +optional @@ -410,6 +469,20 @@ type JobSpec struct { // This is on by default. // +optional PodReplacementPolicy *PodReplacementPolicy `json:"podReplacementPolicy,omitempty" protobuf:"bytes,14,opt,name=podReplacementPolicy,casttype=podReplacementPolicy"` + + // ManagedBy field indicates the controller that manages a Job. The k8s Job + // controller reconciles jobs which don't have this field at all or the field + // value is the reserved string `kubernetes.io/job-controller`, but skips + // reconciling Jobs with a custom value for this field. + // The value must be a valid domain-prefixed path (e.g. acme.io/foo) - + // all characters before the first "/" must be a valid subdomain as defined + // by RFC 1123. All characters trailing the first "/" must be valid HTTP Path + // characters as defined by RFC 3986. The value cannot exceed 64 characters. + // + // This field is alpha-level. The job controller accepts setting the field + // when the feature gate JobManagedBy is enabled (disabled by default). + // +optional + ManagedBy *string `json:"managedBy,omitempty" protobuf:"bytes,15,opt,name=managedBy"` } // JobStatus represents the current state of a Job. @@ -420,6 +493,12 @@ type JobStatus struct { // status true; when the Job is resumed, the status of this condition will // become false. When a Job is completed, one of the conditions will have // type "Complete" and status true. + // + // A job is considered finished when it is in a terminal condition, either + // "Complete" or "Failed". A Job cannot have both the "Complete" and "Failed" conditions. + // Additionally, it cannot be in the "Complete" and "FailureTarget" conditions. + // The "Complete", "Failed" and "FailureTarget" conditions cannot be disabled. + // // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ // +optional // +patchMergeKey=type @@ -431,25 +510,36 @@ type JobStatus struct { // Job is created in the suspended state, this field is not set until the // first time it is resumed. This field is reset every time a Job is resumed // from suspension. It is represented in RFC3339 form and is in UTC. + // + // Once set, the field can only be removed when the job is suspended. + // The field cannot be modified while the job is unsuspended or finished. + // // +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. - // The completion time is only set when the job finishes successfully. + // The completion time is set when the job finishes successfully, and only then. + // The value cannot be updated or removed. The value indicates the same or + // later point in time as the startTime field. // +optional CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"` - // The number of pending and running pods. + // The number of pending and running pods which are not terminating (without + // a deletionTimestamp). + // The value is zero for finished jobs. // +optional Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"` // The number of pods which reached phase Succeeded. + // The value increases monotonically for a given spec. However, it may + // decrease in reaction to scale down of elastic indexed jobs. // +optional Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"` // The number of pods which reached phase Failed. + // The value increases monotonically. // +optional Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"` @@ -471,7 +561,7 @@ type JobStatus struct { // +optional CompletedIndexes string `json:"completedIndexes,omitempty" protobuf:"bytes,7,opt,name=completedIndexes"` - // FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. + // FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. // The indexes are represented in the text format analogous as for the // `completedIndexes` field, ie. they are kept as decimal integers // separated by commas. The numbers are listed in increasing order. Three or @@ -479,6 +569,8 @@ type JobStatus struct { // last element of the series, separated by a hyphen. // For example, if the failed indexes are 1, 3, 4, 5 and 7, they are // represented as "1,3-5,7". + // The set of failed indexes cannot overlap with the set of completed indexes. + // // This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` // feature gate is enabled (enabled by default). // +optional @@ -498,6 +590,7 @@ type JobStatus struct { // // Old jobs might not be tracked using this field, in which case the field // remains null. + // The structure is empty for finished jobs. // +optional UncountedTerminatedPods *UncountedTerminatedPods `json:"uncountedTerminatedPods,omitempty" protobuf:"bytes,8,opt,name=uncountedTerminatedPods"` @@ -532,6 +625,8 @@ const ( JobFailed JobConditionType = "Failed" // FailureTarget means the job is about to fail its execution. JobFailureTarget JobConditionType = "FailureTarget" + // JobSuccessCriteriaMet means the Job has been succeeded. + JobSuccessCriteriaMet JobConditionType = "SuccessCriteriaMet" ) const ( @@ -551,6 +646,11 @@ const ( // JobReasonFailedIndexes means Job has failed indexes. // This const is used in beta-level feature: https://kep.k8s.io/3850. JobReasonFailedIndexes string = "FailedIndexes" + // JobReasonSuccessPolicy reason indicates a SuccessCriteriaMet condition is added due to + // a Job met successPolicy. + // https://kep.k8s.io/3998 + // This is currently an alpha field. + JobReasonSuccessPolicy string = "SuccessPolicy" ) // JobCondition describes current state of a job. 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 index 980f1e47505..84073b8d86c 100644 --- a/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go @@ -116,6 +116,7 @@ var map_JobSpec = map[string]string{ "completions": "Specifies the desired number of successfully finished pods the job should be run with. Setting to null 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 continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.", "podFailurePolicy": "Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure.\n\nThis field is beta-level. It can be used when the `JobPodFailurePolicy` feature gate is enabled (enabled by default).", + "successPolicy": "successPolicy specifies the policy when the Job can be declared as succeeded. If empty, the default behavior applies - the Job is declared as succeeded only when the number of succeeded pods equals to the completions. When the field is specified, it must be immutable and works only for the Indexed Jobs. Once the Job meets the SuccessPolicy, the lingering pods are terminated.\n\nThis field is alpha-level. To use this field, you must enable the `JobSuccessPolicy` feature gate (disabled by default).", "backoffLimit": "Specifies the number of retries before marking this job failed. Defaults to 6", "backoffLimitPerIndex": "Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).", "maxFailedIndexes": "Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).", @@ -126,6 +127,7 @@ var map_JobSpec = map[string]string{ "completionMode": "completionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nMore completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, which is possible during upgrades due to version skew, the controller skips updates for the Job.", "suspend": "suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.", "podReplacementPolicy": "podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods\n when they are terminating (has a metadata.deletionTimestamp) or failed.\n- Failed means to wait until a previously created Pod is fully terminated (has phase\n Failed or Succeeded) before creating a replacement Pod.\n\nWhen using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle. This is on by default.", + "managedBy": "ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 64 characters.\n\nThis field is alpha-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (disabled by default).", } func (JobSpec) SwaggerDoc() map[string]string { @@ -134,16 +136,16 @@ func (JobSpec) SwaggerDoc() map[string]string { 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. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - "startTime": "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. 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. The completion time is only set when the job finishes successfully.", - "active": "The number of pending and running pods.", - "succeeded": "The number of pods which reached phase Succeeded.", - "failed": "The number of pods which reached phase Failed.", + "conditions": "The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true.\n\nA job is considered finished when it is in a terminal condition, either \"Complete\" or \"Failed\". A Job cannot have both the \"Complete\" and \"Failed\" conditions. Additionally, it cannot be in the \"Complete\" and \"FailureTarget\" conditions. The \"Complete\", \"Failed\" and \"FailureTarget\" conditions cannot be disabled.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + "startTime": "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.\n\nOnce set, the field can only be removed when the job is suspended. The field cannot be modified while the job is unsuspended or finished.", + "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. The completion time is set when the job finishes successfully, and only then. The value cannot be updated or removed. The value indicates the same or later point in time as the startTime field.", + "active": "The number of pending and running pods which are not terminating (without a deletionTimestamp). The value is zero for finished jobs.", + "succeeded": "The number of pods which reached phase Succeeded. The value increases monotonically for a given spec. However, it may decrease in reaction to scale down of elastic indexed jobs.", + "failed": "The number of pods which reached phase Failed. The value increases monotonically.", "terminating": "The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp).\n\nThis field is beta-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (enabled by default).", "completedIndexes": "completedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".", - "failedIndexes": "FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).", - "uncountedTerminatedPods": "uncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status:\n\n1. Add the pod UID to the arrays in this field. 2. Remove the pod finalizer. 3. Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nOld jobs might not be tracked using this field, in which case the field remains null.", + "failedIndexes": "FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". The set of failed indexes cannot overlap with the set of completed indexes.\n\nThis field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).", + "uncountedTerminatedPods": "uncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status:\n\n1. Add the pod UID to the arrays in this field. 2. Remove the pod finalizer. 3. Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nOld jobs might not be tracked using this field, in which case the field remains null. The structure is empty for finished jobs.", "ready": "The number of pods which have a Ready condition.", } @@ -202,6 +204,25 @@ func (PodFailurePolicyRule) SwaggerDoc() map[string]string { return map_PodFailurePolicyRule } +var map_SuccessPolicy = map[string]string{ + "": "SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes.", + "rules": "rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the \"SucceededCriteriaMet\" condition is added, and the lingering pods are removed. The terminal state for such a Job has the \"Complete\" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.", +} + +func (SuccessPolicy) SwaggerDoc() map[string]string { + return map_SuccessPolicy +} + +var map_SuccessPolicyRule = map[string]string{ + "": "SuccessPolicyRule describes rule for declaring a Job as succeeded. Each rule must have at least one of the \"succeededIndexes\" or \"succeededCount\" specified.", + "succeededIndexes": "succeededIndexes specifies the set of indexes which need to be contained in the actual set of the succeeded indexes for the Job. The list of indexes must be within 0 to \".spec.completions-1\" and must not contain duplicates. At least one element is required. The indexes are represented as intervals separated by commas. The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. The number are listed in represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". When this field is null, this field doesn't default to any value and is never evaluated at any time.", + "succeededCount": "succeededCount specifies the minimal required size of the actual set of the succeeded indexes for the Job. When succeededCount is used along with succeededIndexes, the check is constrained only to the set of indexes specified by succeededIndexes. For example, given that succeededIndexes is \"1-4\", succeededCount is \"3\", and completed indexes are \"1\", \"3\", and \"5\", the Job isn't declared as succeeded because only \"1\" and \"3\" indexes are considered in that rules. When this field is null, this doesn't default to any value and is never evaluated at any time. When specified it needs to be a positive integer.", +} + +func (SuccessPolicyRule) SwaggerDoc() map[string]string { + return map_SuccessPolicyRule +} + var map_UncountedTerminatedPods = map[string]string{ "": "UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.", "succeeded": "succeeded holds UIDs of succeeded Pods.", diff --git a/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go index 43fc41515be..88c58b3d111 100644 --- a/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go @@ -262,6 +262,11 @@ func (in *JobSpec) DeepCopyInto(out *JobSpec) { *out = new(PodFailurePolicy) (*in).DeepCopyInto(*out) } + if in.SuccessPolicy != nil { + in, out := &in.SuccessPolicy, &out.SuccessPolicy + *out = new(SuccessPolicy) + (*in).DeepCopyInto(*out) + } if in.BackoffLimit != nil { in, out := &in.BackoffLimit, &out.BackoffLimit *out = new(int32) @@ -308,6 +313,11 @@ func (in *JobSpec) DeepCopyInto(out *JobSpec) { *out = new(PodReplacementPolicy) **out = **in } + if in.ManagedBy != nil { + in, out := &in.ManagedBy, &out.ManagedBy + *out = new(string) + **out = **in + } return } @@ -481,6 +491,55 @@ func (in *PodFailurePolicyRule) DeepCopy() *PodFailurePolicyRule { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SuccessPolicy) DeepCopyInto(out *SuccessPolicy) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]SuccessPolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SuccessPolicy. +func (in *SuccessPolicy) DeepCopy() *SuccessPolicy { + if in == nil { + return nil + } + out := new(SuccessPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SuccessPolicyRule) DeepCopyInto(out *SuccessPolicyRule) { + *out = *in + if in.SucceededIndexes != nil { + in, out := &in.SucceededIndexes, &out.SucceededIndexes + *out = new(string) + **out = **in + } + if in.SucceededCount != nil { + in, out := &in.SucceededCount, &out.SucceededCount + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SuccessPolicyRule. +func (in *SuccessPolicyRule) DeepCopy() *SuccessPolicyRule { + if in == nil { + return nil + } + out := new(SuccessPolicyRule) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UncountedTerminatedPods) DeepCopyInto(out *UncountedTerminatedPods) { *out = *in diff --git a/vendor/k8s.io/api/batch/v1beta1/generated.pb.go b/vendor/k8s.io/api/batch/v1beta1/generated.pb.go index 03feb2ceafa..895d9c91966 100644 --- a/vendor/k8s.io/api/batch/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/batch/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/batch/v1beta1/generated.proto +// source: k8s.io/api/batch/v1beta1/generated.proto package v1beta1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CronJob) Reset() { *m = CronJob{} } func (*CronJob) ProtoMessage() {} func (*CronJob) Descriptor() ([]byte, []int) { - return fileDescriptor_e57b277b05179ae7, []int{0} + return fileDescriptor_ed95843ae7b4086b, []int{0} } func (m *CronJob) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_CronJob proto.InternalMessageInfo func (m *CronJobList) Reset() { *m = CronJobList{} } func (*CronJobList) ProtoMessage() {} func (*CronJobList) Descriptor() ([]byte, []int) { - return fileDescriptor_e57b277b05179ae7, []int{1} + return fileDescriptor_ed95843ae7b4086b, []int{1} } func (m *CronJobList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -104,7 +104,7 @@ var xxx_messageInfo_CronJobList proto.InternalMessageInfo func (m *CronJobSpec) Reset() { *m = CronJobSpec{} } func (*CronJobSpec) ProtoMessage() {} func (*CronJobSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e57b277b05179ae7, []int{2} + return fileDescriptor_ed95843ae7b4086b, []int{2} } func (m *CronJobSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +132,7 @@ var xxx_messageInfo_CronJobSpec proto.InternalMessageInfo func (m *CronJobStatus) Reset() { *m = CronJobStatus{} } func (*CronJobStatus) ProtoMessage() {} func (*CronJobStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_e57b277b05179ae7, []int{3} + return fileDescriptor_ed95843ae7b4086b, []int{3} } func (m *CronJobStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -160,7 +160,7 @@ var xxx_messageInfo_CronJobStatus proto.InternalMessageInfo func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} } func (*JobTemplateSpec) ProtoMessage() {} func (*JobTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_e57b277b05179ae7, []int{4} + return fileDescriptor_ed95843ae7b4086b, []int{4} } func (m *JobTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -194,60 +194,59 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/batch/v1beta1/generated.proto", fileDescriptor_e57b277b05179ae7) + proto.RegisterFile("k8s.io/api/batch/v1beta1/generated.proto", fileDescriptor_ed95843ae7b4086b) } -var fileDescriptor_e57b277b05179ae7 = []byte{ - // 787 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xbd, 0x49, 0x9c, 0xb8, 0xe3, 0x16, 0xd2, 0x01, 0xa5, 0x2b, 0x83, 0xd6, 0xc1, 0x55, - 0x85, 0x41, 0x30, 0x4b, 0x22, 0x84, 0x38, 0x55, 0xea, 0x16, 0x15, 0x08, 0x41, 0x45, 0xe3, 0x72, - 0xa9, 0x2a, 0xd4, 0xd9, 0xd9, 0x17, 0x67, 0x9a, 0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+var fileDescriptor_ed95843ae7b4086b = []byte{ + // 771 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xcf, 0x8f, 0xdb, 0x44, + 0x14, 0xc7, 0xe3, 0x6c, 0x7e, 0x75, 0xd2, 0xc2, 0x76, 0x40, 0x5b, 0x2b, 0x20, 0x3b, 0xa4, 0xaa, + 0x08, 0x08, 0xc6, 0xec, 0x0a, 0x21, 0x4e, 0x95, 0x70, 0x51, 0x81, 0x25, 0xa8, 0x68, 0x52, 0x2e, + 0x55, 0x85, 0x3a, 0x9e, 0x4c, 0x92, 0xe9, 0xda, 0x1e, 0xcb, 0x33, 0x5e, 0x29, 0x37, 0x2e, 0xdc, + 0xf9, 0x5f, 0xb8, 0x73, 0xde, 0x63, 0x6f, 0xf4, 0x64, 0xb1, 0xe6, 0xbf, 0xe0, 0x84, 0x66, 0xe2, + 0x4d, 0xd2, 0xc4, 0xe9, 0x96, 0x0b, 0xb7, 0xcc, 0xf3, 0xf7, 0xfb, 0x99, 0xa7, 0xf7, 0xde, 0xbc, + 0x80, 0xe1, 0xd9, 0x97, 0x12, 0x71, 0xe1, 0x91, 0x84, 0x7b, 0x01, 0x51, 0x74, 0xee, 0x9d, 0x1f, + 0x07, 0x4c, 0x91, 0x63, 0x6f, 0xc6, 0x62, 0x96, 0x12, 0xc5, 0x26, 0x28, 0x49, 0x85, 0x12, 0xd0, + 0x5e, 0x2a, 0x11, 0x49, 0x38, 0x32, 0x4a, 0x54, 0x2a, 0x7b, 0x9f, 0xce, 0xb8, 0x9a, 0x67, 0x01, + 0xa2, 0x22, 0xf2, 0x66, 0x62, 0x26, 0x3c, 0x63, 0x08, 0xb2, 0xa9, 0x39, 0x99, 0x83, 0xf9, 0xb5, + 0x04, 0xf5, 0xee, 0x56, 0x5c, 0xb9, 0x7d, 0x5b, 0x6f, 0xb0, 0x21, 0xa2, 0x22, 0x65, 0x55,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f, + 0x5c, 0x3a, 0xb5, 0x17, 0x97, 0x4e, 0xed, 0xe5, 0xa5, 0x53, 0xfb, 0xa5, 0x70, 0xac, 0x8b, 0xc2, + 0xb1, 0x5e, 0x14, 0x8e, 0xf5, 0xb2, 0x70, 0xac, 0xbf, 0x0a, 0xc7, 0xfa, 0xed, 0x6f, 0xa7, 0xf6, + 0xc4, 0xde, 0xf7, 0x7f, 0xfc, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xaa, 0x2c, 0x86, 0xaa, 0x07, 0x00, 0x00, } diff --git a/vendor/k8s.io/api/certificates/v1/generated.pb.go b/vendor/k8s.io/api/certificates/v1/generated.pb.go index 37859babcd5..cba4a8ea492 100644 --- a/vendor/k8s.io/api/certificates/v1/generated.pb.go +++ b/vendor/k8s.io/api/certificates/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1/generated.proto +// source: k8s.io/api/certificates/v1/generated.proto package v1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } func (*CertificateSigningRequest) ProtoMessage() {} func (*CertificateSigningRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{0} + return fileDescriptor_5f7d41da689f96f7, []int{0} } func (m *CertificateSigningRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_CertificateSigningRequest proto.InternalMessageInfo func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} } func (*CertificateSigningRequestCondition) ProtoMessage() {} func (*CertificateSigningRequestCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{1} + return fileDescriptor_5f7d41da689f96f7, []int{1} } func (m *CertificateSigningRequestCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_CertificateSigningRequestCondition proto.InternalMessageInfo func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} } func (*CertificateSigningRequestList) ProtoMessage() {} func (*CertificateSigningRequestList) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{2} + return fileDescriptor_5f7d41da689f96f7, []int{2} } func (m *CertificateSigningRequestList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_CertificateSigningRequestList proto.InternalMessageInfo func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} } func (*CertificateSigningRequestSpec) ProtoMessage() {} func (*CertificateSigningRequestSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{3} + return fileDescriptor_5f7d41da689f96f7, []int{3} } func (m *CertificateSigningRequestSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_CertificateSigningRequestSpec proto.InternalMessageInfo func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} } func (*CertificateSigningRequestStatus) ProtoMessage() {} func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{4} + return fileDescriptor_5f7d41da689f96f7, []int{4} } func (m *CertificateSigningRequestStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_CertificateSigningRequestStatus proto.InternalMessageInfo func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_17e045d0de66f3c7, []int{5} + return fileDescriptor_5f7d41da689f96f7, []int{5} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -225,68 +225,67 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1/generated.proto", fileDescriptor_17e045d0de66f3c7) + proto.RegisterFile("k8s.io/api/certificates/v1/generated.proto", fileDescriptor_5f7d41da689f96f7) } -var fileDescriptor_17e045d0de66f3c7 = []byte{ - // 910 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdf, 0x6e, 0x1b, 0xc5, - 0x17, 0xf6, 0xc6, 0x7f, 0x62, 0x8f, 0xf3, 0x4b, 0xdb, 0xd1, 0x8f, 0x6a, 0xb1, 0x54, 0xaf, 0xb5, - 0x82, 0x2a, 0x20, 0xd8, 0x25, 0x51, 0x81, 0x50, 0x10, 0x42, 0x9b, 0x46, 0xa8, 0x22, 0x05, 0x69, - 0x92, 0x70, 0x51, 0xb8, 0xe8, 0x64, 0x7d, 0xba, 0x99, 0xba, 0xfb, 0x87, 0x99, 0x59, 0xab, 0xbe, - 0xeb, 0x23, 0x70, 0xc9, 0x25, 0x2f, 0xc0, 0x33, 0x70, 0x9b, 0xcb, 0x5e, 0x16, 0x09, 0x59, 0xc4, - 0x7d, 0x8b, 0x5c, 0xa1, 0x99, 0x1d, 0xaf, 0x1d, 0x27, 0x6e, 0x4b, 0xee, 0x76, 0xce, 0xf9, 0xce, - 0xf7, 0x9d, 0x73, 0xe6, 0x9c, 0xd1, 0xa2, 0x9d, 0xc1, 0xb6, 0xf0, 0x58, 0xea, 0x0f, 0xf2, 0x23, - 0xe0, 0x09, 0x48, 0x10, 0xfe, 0x10, 0x92, 0x7e, 0xca, 0x7d, 0xe3, 0xa0, 0x19, 0xf3, 0x43, 0xe0, - 0x92, 0x3d, 0x66, 0x21, 0xd5, 0xee, 0x4d, 0x3f, 0x82, 0x04, 0x38, 0x95, 0xd0, 0xf7, 0x32, 0x9e, - 0xca, 0x14, 0x77, 0x0a, 0xac, 0x47, 0x33, 0xe6,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b0, 0xab, - 0x9a, 0xfe, 0xcb, 0xab, 0xd1, 0x6b, 0x8a, 0x60, 0xdd, 0x08, 0x34, 0x8a, 0x33, 0x31, 0xd4, 0xee, - 0xab, 0x2a, 0x72, 0x97, 0xc6, 0xee, 0xa4, 0x49, 0x9f, 0x49, 0x96, 0x26, 0x78, 0x1b, 0xd5, 0xe4, - 0x28, 0x03, 0xdd, 0xc6, 0x56, 0xf0, 0xde, 0x34, 0xdb, 0x83, 0x51, 0x06, 0x67, 0x63, 0xe7, 0xff, - 0x8b, 0x78, 0x65, 0x27, 0x3a, 0x02, 0xef, 0x95, 0x55, 0x34, 0x74, 0xec, 0x9d, 0xf3, 0x89, 0x9c, - 0x8d, 0x9d, 0x4b, 0xe6, 0xd0, 0x2b, 0x99, 0xce, 0xa7, 0x8b, 0x6f, 0xa3, 0x06, 0x07, 0x2a, 0xd2, - 0x44, 0xb7, 0xbc, 0x35, 0x2b, 0x8b, 0x68, 0x2b, 0x31, 0x5e, 0xfc, 0x01, 0x5a, 0x8d, 0x41, 0x08, - 0x1a, 0x81, 0x6e, 0x5e, 0x2b, 0xb8, 0x66, 0x80, 0xab, 0x0f, 0x0a, 0x33, 0x99, 0xfa, 0xf1, 0x13, - 0xb4, 0xfe, 0x94, 0x0a, 0x79, 0x98, 0xf5, 0xa9, 0x84, 0x03, 0x16, 0x83, 0x5d, 0xd3, 0xed, 0xfe, - 0xf0, 0xed, 0x66, 0x45, 0x45, 0x04, 0x37, 0x0d, 0xfb, 0xfa, 0xde, 0x39, 0x26, 0xb2, 0xc0, 0x8c, - 0x87, 0x08, 0x2b, 0xcb, 0x01, 0xa7, 0x89, 0x28, 0x1a, 0xa5, 0xf4, 0xea, 0xff, 0x59, 0xaf, 0x63, - 0xf4, 0xf0, 0xde, 0x05, 0x36, 0x72, 0x89, 0x82, 0xfb, 0x97, 0x85, 0x6e, 0x2d, 0xbd, 0xe5, 0x3d, - 0x26, 0x24, 0xfe, 0xf9, 0xc2, 0xae, 0x78,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d7, 0xfa, 0x67, 0xd2, 0xb5, 0x7e, 0x7d, 0xd5, 0xad, 0x3c, 0xec, 0x2c, 0xff, 0x2f, - 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x00, 0x0c, 0x1b, 0xcd, 0x08, 0x00, 0x00, +var fileDescriptor_5f7d41da689f96f7 = []byte{ + // 896 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xc6, 0x7f, 0x62, 0x8f, 0x43, 0xda, 0x8e, 0xa0, 0x5a, 0x2c, 0xd5, 0x6b, 0xad, 0xa0, + 0x0a, 0x15, 0xcc, 0x92, 0xa8, 0x40, 0x28, 0x08, 0xa1, 0x4d, 0x23, 0x54, 0x91, 0x82, 0x34, 0x49, + 0x38, 0x14, 0x0e, 0x9d, 0xac, 0x5f, 0x37, 0xd3, 0x74, 0xff, 0xb0, 0x33, 0x6b, 0xd5, 0xb7, 0x7e, + 0x04, 0x8e, 0x1c, 0xf9, 0x02, 0x7c, 0x06, 0xae, 0x39, 0xf6, 0x58, 0x24, 0x64, 0x11, 0xf7, 0x5b, + 0xe4, 0x84, 0x66, 0x76, 0xbc, 0x76, 0x9c, 0xb8, 0x0d, 0xb9, 0x79, 0x7e, 0xf3, 0x7b, 0xbf, 0xdf, + 0x7b, 0x6f, 0xdf, 0x1b, 0x19, 0xdd, 0x39, 0xda, 0x14, 0x84, 0x27, 0x1e, 0x4b, 0xb9, 0x17, 0x40, + 0x26, 0xf9, 0x13, 0x1e, 0x30, 0x09, 0xc2, 0x1b, 0xac, 0x7b, 0x21, 0xc4, 0x90, 0x31, 0x09, 0x7d, + 0x92, 0x66, 0x89, 0x4c, 0x70, 0xa7, 0xe0, 0x12, 0x96, 0x72, 0x32, 0xcb, 0x25, 0x83, 0xf5, 0xce, + 0x27, 0x21, 0x97, 0x87, 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xee, 0x5a, 0xbf, 0xbd, 0xee, 0x56, 0x1e, 0x75, 0x16, + 0xff, 0x2f, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x4a, 0x4f, 0xbc, 0xb4, 0x08, 0x00, 0x00, } func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go b/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go index 546ecbefbf7..a62a4005963 100644 --- a/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/certificates/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1alpha1/generated.proto +// source: k8s.io/api/certificates/v1alpha1/generated.proto package v1alpha1 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ClusterTrustBundle) Reset() { *m = ClusterTrustBundle{} } func (*ClusterTrustBundle) ProtoMessage() {} func (*ClusterTrustBundle) Descriptor() ([]byte, []int) { - return fileDescriptor_8915b0d419f9eda6, []int{0} + return fileDescriptor_f73d5fe56c015bb8, []int{0} } func (m *ClusterTrustBundle) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ClusterTrustBundle proto.InternalMessageInfo func (m *ClusterTrustBundleList) Reset() { *m = ClusterTrustBundleList{} } func (*ClusterTrustBundleList) ProtoMessage() {} func (*ClusterTrustBundleList) Descriptor() ([]byte, []int) { - return fileDescriptor_8915b0d419f9eda6, []int{1} + return fileDescriptor_f73d5fe56c015bb8, []int{1} } func (m *ClusterTrustBundleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_ClusterTrustBundleList proto.InternalMessageInfo func (m *ClusterTrustBundleSpec) Reset() { *m = ClusterTrustBundleSpec{} } func (*ClusterTrustBundleSpec) ProtoMessage() {} func (*ClusterTrustBundleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_8915b0d419f9eda6, []int{2} + return fileDescriptor_f73d5fe56c015bb8, []int{2} } func (m *ClusterTrustBundleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,39 +134,39 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1alpha1/generated.proto", fileDescriptor_8915b0d419f9eda6) -} - -var fileDescriptor_8915b0d419f9eda6 = []byte{ - // 448 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0x77, 0x6a, 0x0b, 0xed, 0x44, 0x41, 0x56, 0x90, 0x90, 0xc3, 0x34, 0xe4, 0xd4, 0x8b, - 0x33, 0x26, 0x54, 0xe9, 0x79, 0x05, 0xa1, 0xe0, 0x0f, 0xd8, 0x7a, 0xb1, 0x78, 0x70, 0x32, 0x79, - 0xdd, 0x8c, 0xc9, 0xee, 0x0e, 0x33, 0xb3, 0x01, 0x6f, 0x82, 0xff, 0x80, 0x7f, 0x56, 0x8e, 0xd5, - 0x53, 0x4f, 0xc5, 0xac, 0xff, 0x88, 0xcc, 0x64, 0x93, 0x5d, 0x5c, 0x25, 0xd2, 0xdb, 0xbe, 0x1f, - 0x9f, 0xef, 0x7b, 0xdf, 0xb7, 0x0c, 0x3e, 0x9f, 0x9d, 0x19, 0x2a, 0x73, 0x36, 0x2b, 0xc6, 0xa0, - 0x33, 0xb0, 0x60, 0xd8, 0x02, 0xb2, 0x49, 0xae, 0x59, 0x55, 0xe0, 0x4a, 0x32, 0x01, 0xda, 0xca, - 0x2b, 0x29, 0xb8, 0x2f, 0x0f, 0xf9, 0x5c, 0x4d, 0xf9, 0x90, 0x25, 0x90, 0x81,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, 0xdd, 0xfe, 0x4a, 0x1a, 0x1b, 0x7e, 0x68, 0x19, 0xa3, 0xff, 0x67, 0xcc, 0xd1, - 0xde, 0xd6, 0xc3, 0x6a, 0xe0, 0xe1, 0x26, 0xd3, 0x30, 0xf5, 0x1e, 0x1f, 0x48, 0x0b, 0xa9, 0xe9, - 0xee, 0xf5, 0xef, 0x9d, 0x74, 0x46, 0xa7, 0x77, 0x71, 0x15, 0x3d, 0xa8, 0x06, 0x1c, 0x9c, 0x3b, - 0xa9, 0x78, 0xad, 0x38, 0xf8, 0xfa, 0x57, 0x4f, 0xce, 0x74, 0x38, 0xc2, 0xd8, 0xc8, 0x24, 0x03, - 0xfd, 0x86, 0xa7, 0xe0, 0x5d, 0x1d, 0xd5, 0xc7, 0xbf, 0xd8, 0x56, 0xe2, 0x46, 0x57, 0xf8, 0x0c, - 0x77, 0x6c, 0x2d, 0xe3, 0xff, 0xc2, 0x51, 0xf4, 0xa8, 0x82, 0x3a, 0x8d, 0x09, 0x71, 0xb3, 0x2f, - 0x7a, 0xb9, 0x5c, 0x91, 0xe0, 0x7a, 0x45, 0x82, 0x9b, 0x15, 0x09, 0xbe, 0x94, 0x04, 0x2d, 0x4b, - 0x82, 0xae, 0x4b, 0x82, 0x6e, 0x4a, 0x82, 0x7e, 0x96, 0x04, 0x7d, 0xfb, 0x45, 0x82, 0xcb, 0xfe, - 0xae, 0x67, 0xf7, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x05, 0xe9, 0xaa, 0x07, 0xb2, 0x03, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/certificates/v1alpha1/generated.proto", fileDescriptor_f73d5fe56c015bb8) +} + +var fileDescriptor_f73d5fe56c015bb8 = []byte{ + // 437 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6a, 0xdb, 0x40, + 0x10, 0xc6, 0xb5, 0x69, 0x02, 0x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xe2, 0xe6, 0x5c, 0xf4, 0x62, 0xb9, 0x22, 0xc1, 0xf5, 0x8a, 0x04, 0x37, 0x2b, 0x12, 0x7c, + 0x29, 0x09, 0x5a, 0x96, 0x04, 0x5d, 0x97, 0x04, 0xdd, 0x94, 0x04, 0xfd, 0x2c, 0x09, 0xfa, 0xf6, + 0x8b, 0x04, 0x97, 0xfd, 0x5d, 0xbf, 0xdd, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x1c, 0xcb, + 0xdd, 0x99, 0x03, 0x00, 0x00, } func (m *ClusterTrustBundle) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go b/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go index 352b9faa7a6..b6d8ab3f599 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1beta1/generated.proto +// source: k8s.io/api/certificates/v1beta1/generated.proto package v1beta1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } func (*CertificateSigningRequest) ProtoMessage() {} func (*CertificateSigningRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{0} + return fileDescriptor_6529c11a462c48a5, []int{0} } func (m *CertificateSigningRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_CertificateSigningRequest proto.InternalMessageInfo func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} } func (*CertificateSigningRequestCondition) ProtoMessage() {} func (*CertificateSigningRequestCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{1} + return fileDescriptor_6529c11a462c48a5, []int{1} } func (m *CertificateSigningRequestCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_CertificateSigningRequestCondition proto.InternalMessageInfo func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} } func (*CertificateSigningRequestList) ProtoMessage() {} func (*CertificateSigningRequestList) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{2} + return fileDescriptor_6529c11a462c48a5, []int{2} } func (m *CertificateSigningRequestList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_CertificateSigningRequestList proto.InternalMessageInfo func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} } func (*CertificateSigningRequestSpec) ProtoMessage() {} func (*CertificateSigningRequestSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{3} + return fileDescriptor_6529c11a462c48a5, []int{3} } func (m *CertificateSigningRequestSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_CertificateSigningRequestSpec proto.InternalMessageInfo func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} } func (*CertificateSigningRequestStatus) ProtoMessage() {} func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{4} + return fileDescriptor_6529c11a462c48a5, []int{4} } func (m *CertificateSigningRequestStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_CertificateSigningRequestStatus proto.InternalMessageInfo func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_09d156762b8218ef, []int{5} + return fileDescriptor_6529c11a462c48a5, []int{5} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -225,69 +225,68 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1beta1/generated.proto", fileDescriptor_09d156762b8218ef) + proto.RegisterFile("k8s.io/api/certificates/v1beta1/generated.proto", fileDescriptor_6529c11a462c48a5) } -var fileDescriptor_09d156762b8218ef = []byte{ - // 915 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x5d, 0x6f, 0x1b, 0x45, - 0x17, 0xf6, 0xc6, 0x1f, 0xb1, 0xc7, 0x79, 0xd3, 0x76, 0xf4, 0x52, 0x2d, 0x96, 0xea, 0xb5, 0x2c, - 0x40, 0xe1, 0x6b, 0x96, 0x54, 0x15, 0x44, 0xb9, 0x40, 0xb0, 0x21, 0x82, 0x88, 0x14, 0xa4, 0x49, - 0xc2, 0x05, 0x42, 0xa2, 0xe3, 0xf5, 0xe9, 0x66, 0xea, 0xee, 0x07, 0x3b, 0xb3, 0xa6, 0xbe, 0xeb, - 0x4f, 0xe0, 0x92, 0x4b, 0xfe, 0x03, 0x7f, 0x22, 0x5c, 0x20, 0xf5, 0xb2, 0x17, 0xc8, 0x22, 0xee, - 0xbf, 0xc8, 0x15, 0x9a, 0xd9, 0xf1, 0xda, 0xb1, 0x13, 0x5c, 0xda, 0xbb, 0x9d, 0x67, 0xce, 0xf3, - 0x3c, 0x67, 0xce, 0x9c, 0x33, 0x36, 0xfa, 0x6a, 0xb0, 0x23, 0x08, 0x8f, 0xdd, 0x41, 0xd6, 0x83, - 0x34, 0x02, 0x09, 0xc2, 0x1d, 0x42, 0xd4, 0x8f, 0x53, 0xd7, 0x6c, 0xb0, 0x84, 0xbb, 0x3e, 0xa4, - 0x92, 0x3f, 0xe4, 0x3e, 0xd3, 0xdb, 0xdb, 0x3d, 0x90, 0x6c, 0xdb, 0x0d, 0x20, 0x82, 0x94, 0x49, - 0x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b, 0xa5, 0xa7, 0x93, 0xb6, 0x75, 0x36, 0x69, - 0x5b, 0xcf, 0x26, 0x6d, 0xeb, 0xf9, 0xa4, 0x6d, 0xfd, 0x3d, 0x69, 0x5b, 0xbf, 0xbc, 0x68, 0x97, - 0xbe, 0x77, 0x56, 0xfc, 0x77, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xe7, 0x9b, 0x78, 0xf6, - 0x08, 0x00, 0x00, +var fileDescriptor_6529c11a462c48a5 = []byte{ + // 901 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xf6, 0xc6, 0x1f, 0xb1, 0xc7, 0x21, 0x6d, 0x47, 0x50, 0x2d, 0x96, 0xea, 0xb5, 0x56, 0x80, + 0xc2, 0xd7, 0x2c, 0xa9, 0x2a, 0x88, 0x72, 0x40, 0xb0, 0x21, 0x42, 0x11, 0x29, 0x48, 0x93, 0x84, + 0x03, 0x42, 0xa2, 0x93, 0xf5, 0xdb, 0xcd, 0x34, 0xdd, 0x0f, 0x76, 0x66, 0x4d, 0x7d, 0xeb, 0x4f, + 0xe0, 0xc8, 0x91, 0xff, 0xc0, 0x9f, 0x08, 0x07, 0xa4, 0x1e, 0x7b, 0x40, 0x16, 0x71, 0xff, 0x45, + 0x4e, 0x68, 0x66, 0xc7, 0x6b, 0xc7, 0x4e, 0x70, 0x69, 0x6f, 0x3b, 0xcf, 0xbc, 0xcf, 0xf3, 0xbc, + 0xf3, 0xce, 0xfb, 0x8e, 0x8d, 0xbc, 0xd3, 0x2d, 0x41, 0x78, 0xe2, 0xb1, 0x94, 0x7b, 0x01, 0x64, + 0x92, 0x3f, 0xe4, 0x01, 0x93, 0x20, 0xbc, 0xc1, 0xe6, 0x31, 0x48, 0xb6, 0xe9, 0x85, 0x10, 0x43, + 0xc6, 0x24, 0xf4, 0x49,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x3f, 0xef, 0x56, 0x9e, 0x8e, 0xbb, 0xd6, 0xd9, + 0xb8, 0x6b, 0x3d, 0x1b, 0x77, 0xad, 0xe7, 0xe3, 0xae, 0xf5, 0xcf, 0xb8, 0x6b, 0xfd, 0xfa, 0xa2, + 0x5b, 0xf9, 0xc1, 0x59, 0xf2, 0xdf, 0xe5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0x2f, 0x11, + 0xe8, 0xdd, 0x08, 0x00, 0x00, } func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/coordination/v1/generated.pb.go b/vendor/k8s.io/api/coordination/v1/generated.pb.go index de061060135..8b7ab98caaa 100644 --- a/vendor/k8s.io/api/coordination/v1/generated.pb.go +++ b/vendor/k8s.io/api/coordination/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1/generated.proto +// source: k8s.io/api/coordination/v1/generated.proto package v1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Lease) Reset() { *m = Lease{} } func (*Lease) ProtoMessage() {} func (*Lease) Descriptor() ([]byte, []int) { - return fileDescriptor_929e1148ad9baca3, []int{0} + return fileDescriptor_239d5a4df3139dce, []int{0} } func (m *Lease) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_Lease proto.InternalMessageInfo func (m *LeaseList) Reset() { *m = LeaseList{} } func (*LeaseList) ProtoMessage() {} func (*LeaseList) Descriptor() ([]byte, []int) { - return fileDescriptor_929e1148ad9baca3, []int{1} + return fileDescriptor_239d5a4df3139dce, []int{1} } func (m *LeaseList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_LeaseList proto.InternalMessageInfo func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } func (*LeaseSpec) ProtoMessage() {} func (*LeaseSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_929e1148ad9baca3, []int{2} + return fileDescriptor_239d5a4df3139dce, []int{2} } func (m *LeaseSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,45 +135,44 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1/generated.proto", fileDescriptor_929e1148ad9baca3) -} - -var fileDescriptor_929e1148ad9baca3 = []byte{ - // 539 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcf, 0x6e, 0xd3, 0x4c, - 0x14, 0xc5, 0xe3, 0x36, 0x91, 0x9a, 0xc9, 0xd7, 0x7e, 0x91, 0x95, 0x85, 0x95, 0x85, 0x5d, 0x22, - 0x21, 0x75, 0xc3, 0x0c, 0xa9, 0x10, 0x42, 0xac, 0x8a, 0x41, 0x40, 0xa5, 0x54, 0x48, 0x6e, 0x57, - 0xa8, 0x0b, 0x26, 0xf6, 0xc5, 0x19, 0x52, 0x7b, 0xcc, 0xcc, 0x38, 0xa8, 0x3b, 0x1e, 0x81, 0x2d, - 0x8f, 0x01, 0x4f, 0x91, 0x65, 0x97, 0x5d, 0x59, 0xc4, 0xbc, 0x08, 0x9a, 0x49, 0xda, 0x84, 0xfc, - 0x51, 0x2b, 0x76, 0x9e, 0x7b, 0xef, 0xf9, 0xdd, 0x73, 0xcf, 0xc2, 0xe8, 0xe5, 0xf0, 0x99, 0xc4, - 0x8c, 0x93, 0x61, 0xde, 0x07, 0x91, 0x82, 0x02, 0x49, 0x46, 0x90, 0x46, 0x5c, 0x90, 0x59, 0x83, - 0x66, 0x8c, 0x84, 0x9c, 0x8b, 0x88, 0xa5, 0x54, 0x31, 0x9e, 0x92, 0x51, 0x97, 0xc4, 0x90, 0x82, - 0xa0, 0x0a, 0x22, 0x9c,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 0xe5, 0x7a, 0xe2, 0x56, 0xbe, 0x96, 0xae, 0x35, 0x2e, 0x5d, 0xeb, 0xaa, 0x74, 0xad, 0xeb, 0xd2, - 0xb5, 0x7e, 0x95, 0xae, 0xf5, 0xed, 0xb7, 0x5b, 0x79, 0xdf, 0xde, 0xfc, 0x03, 0xf9, 0x13, 0x00, - 0x00, 0xff, 0xff, 0xef, 0xe4, 0x75, 0x3b, 0x76, 0x04, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/coordination/v1/generated.proto", fileDescriptor_239d5a4df3139dce) +} + +var fileDescriptor_239d5a4df3139dce = []byte{ + // 524 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x6f, 0xd3, 0x30, + 0x18, 0xc6, 0x9b, 0xb5, 0x95, 0x56, 0x97, 0x8d, 0x2a, 0xea, 0x21, 0xea, 0x21, 0x19, 0x95, 0x90, + 0x26, 0x24, 0x1c, 0x3a, 0x21, 0x84, 0x38, 0x8d, 0x08, 0x01, 0x93, 0x3a, 0x21, 0x65, 0x3b, 0xa1, + 0x1d, 0x70, 0x93, 0x97, 0xd4, 0x74, 0x89, 0x83, 0xed, 0x16, 0xed, 0xc6, 0x47, 0xe0, 0xca, 0xc7, + 0x80, 0x4f, 0xd1, 0xe3, 0x8e, 0x3b, 0x45, 0xd4, 0x7c, 0x11, 0x64, 0xb7, 0x5b, 0x4b, 0xff, 0x68, + 0xd3, 0x6e, 0xf1, 0xeb, 0xe7, 0xf9, 0xbd, 0x8f, 0x9f, 0x43, 0xd0, 0x93, 0xc1, 0x4b, 0x81, 0x29, + 0xf3, 0x49, 0x4e, 0xfd, 0x88, 0x31, 0x1e, 0xd3, 0x8c, 0x48, 0xca, 0x32, 0x7f, 0xd4, 0xf1, 0x13, + 0xc8, 0x80, 0x13, 0x09, 0x31, 0xce, 0x39, 0x93, 0xcc, 0x6e, 0x4d, 0xb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0xef, 0xca, 0xb5, 0xc6, 0xca, 0xb5, 0x2e, 0x95, 0x6b, 0x5d, + 0x29, 0xd7, 0xfa, 0xa3, 0x5c, 0xeb, 0xc7, 0x5f, 0xb7, 0xf4, 0xb1, 0xb5, 0xf9, 0x07, 0xf2, 0x2f, + 0x00, 0x00, 0xff, 0xff, 0xb0, 0xb0, 0x3a, 0x46, 0x5d, 0x04, 0x00, 0x00, } func (m *Lease) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go b/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go index 7334290fbbd..655de565901 100644 --- a/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1beta1/generated.proto +// source: k8s.io/api/coordination/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Lease) Reset() { *m = Lease{} } func (*Lease) ProtoMessage() {} func (*Lease) Descriptor() ([]byte, []int) { - return fileDescriptor_daca6bcd2ff63a80, []int{0} + return fileDescriptor_8d4e223b8bb23da3, []int{0} } func (m *Lease) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_Lease proto.InternalMessageInfo func (m *LeaseList) Reset() { *m = LeaseList{} } func (*LeaseList) ProtoMessage() {} func (*LeaseList) Descriptor() ([]byte, []int) { - return fileDescriptor_daca6bcd2ff63a80, []int{1} + return fileDescriptor_8d4e223b8bb23da3, []int{1} } func (m *LeaseList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_LeaseList proto.InternalMessageInfo func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } func (*LeaseSpec) ProtoMessage() {} func (*LeaseSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_daca6bcd2ff63a80, []int{2} + return fileDescriptor_8d4e223b8bb23da3, []int{2} } func (m *LeaseSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,45 +135,44 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1beta1/generated.proto", fileDescriptor_daca6bcd2ff63a80) -} - -var fileDescriptor_daca6bcd2ff63a80 = []byte{ - // 543 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xc1, 0x6e, 0xd3, 0x4e, - 0x10, 0xc6, 0xe3, 0xb6, 0x91, 0x9a, 0xcd, 0xbf, 0xfd, 0x47, 0x56, 0x0e, 0x56, 0x0e, 0x76, 0x95, - 0x03, 0xaa, 0x90, 0xd8, 0x25, 0x15, 0x42, 0x88, 0x13, 0x58, 0x20, 0xb5, 0xc2, 0x15, 0x92, 0xdb, - 0x13, 0xea, 0x81, 0xb5, 0x3d, 0x38, 0x4b, 0x6a, 0xaf, 0xd9, 0x5d, 0x07, 0xf5, 0xc6, 0x23, 0x70, - 0xe5, 0x45, 0xe0, 0x15, 0x72, 0xec, 0xb1, 0x27, 0x8b, 0x98, 0x17, 0x41, 0xde, 0xb8, 0x4d, 0x48, - 0x8a, 0x12, 0x71, 0xf3, 0xce, 0xcc, 0xf7, 0x9b, 0x6f, 0xbe, 0x83, 0xd1, 0xf1, 0xe8, 0x99, 0xc4, - 0x8c, 0x93, 0x51, 0x1e, 0x80, 0x48, 0x41, 0x81, 0x24, 0x63, 0x48, 0x23, 0x2e, 0x48, 0xdd, 0xa0, - 0x19, 0x23, 0x21, 0xe7, 0x22, 0x62, 0x29, 0x55, 0x8c, 0xa7, 0x64, 0x3c, 0x08, 0x40, 0xd1, 0x01, - 0x89, 0x21, 0x05, 0x41, 0x15, 0x44, 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ae, 0xa7, 0x76, 0xe3, 0x66, 0x6a, 0x37, 0xbe, 0x94, 0xb6, 0x31, 0x29, 0x6d, 0xe3, 0xba, - 0xb4, 0x8d, 0x9b, 0xd2, 0x36, 0x7e, 0x96, 0xb6, 0xf1, 0xf5, 0x97, 0xdd, 0x78, 0xe7, 0xac, 0xf9, - 0xa9, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x19, 0x0e, 0xd7, 0x8f, 0x04, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/coordination/v1beta1/generated.proto", fileDescriptor_8d4e223b8bb23da3) +} + +var fileDescriptor_8d4e223b8bb23da3 = []byte{ + // 527 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x9b, 0xb5, 0x95, 0x56, 0x97, 0x8d, 0x2a, 0xea, 0x21, 0xea, 0x21, 0x99, 0x7a, 0x40, + 0x13, 0x12, 0x36, 0x9d, 0x10, 0x42, 0x9c, 0x20, 0x02, 0x89, 0x89, 0x4c, 0x48, 0xd9, 0x4e, 0x68, + 0x07, 0xdc, 0xe4, 0x91, 0x9a, 0x2e, 0x71, 0x88, 0xdd, 0xa2, 0xdd, 0xf8, 0x08, 0x5c, 0xf9, 0x22, + 0xf0, 0x15, 0x7a, 0xdc, 0x71, 0xa7, 0x88, 0x9a, 0x2f, 0x82, 0xec, 0x76, 0x6b, 0x69, 0x87, 0x5a, + 0x71, 0x8b, 0x9f, 0xdf, 0xef, 0xf7, 0xfe, 0x7e, 0x87, 0x20, 0x32, 0x7c, 0x26, 0x30, 0xe3, 0x84, + 0xe6, 0x8c, 0x44, 0x9c, 0x17, 0x31, 0xcb, 0xa8, 0x64, 0x3c, 0x23, 0xe3, 0x5e, 0x1f, 0x24, 0xed, + 0x91, 0x04, 0x32, 0x28, 0xa8, 0x84, 0x18, 0xe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 0xe5, 0x6a, 0xea, 0x56, 0xae, 0xa7, 0x6e, 0xe5, 0xab, 0x72, 0xad, 0x89, 0x72, 0xad, 0x2b, + 0xe5, 0x5a, 0xd7, 0xca, 0xb5, 0x7e, 0x29, 0xd7, 0xfa, 0xf6, 0xdb, 0xad, 0xbc, 0xf7, 0x36, 0xfc, + 0x54, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x81, 0x42, 0xfe, 0x76, 0x04, 0x00, 0x00, } func (m *Lease) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/core/v1/annotation_key_constants.go b/vendor/k8s.io/api/core/v1/annotation_key_constants.go index 106ba14c3df..5cf6f329f13 100644 --- a/vendor/k8s.io/api/core/v1/annotation_key_constants.go +++ b/vendor/k8s.io/api/core/v1/annotation_key_constants.go @@ -54,21 +54,18 @@ const ( // SeccompLocalhostProfileNamePrefix is the prefix for specifying profiles loaded from the node's disk. SeccompLocalhostProfileNamePrefix = "localhost/" - // AppArmorBetaContainerAnnotationKeyPrefix is the prefix to an annotation key specifying a container's apparmor profile. - AppArmorBetaContainerAnnotationKeyPrefix = "container.apparmor.security.beta.kubernetes.io/" - // AppArmorBetaDefaultProfileAnnotationKey is the annotation key specifying the default AppArmor profile. - AppArmorBetaDefaultProfileAnnotationKey = "apparmor.security.beta.kubernetes.io/defaultProfileName" - // AppArmorBetaAllowedProfilesAnnotationKey is the annotation key specifying the allowed AppArmor profiles. - AppArmorBetaAllowedProfilesAnnotationKey = "apparmor.security.beta.kubernetes.io/allowedProfileNames" + // DeprecatedAppArmorBetaContainerAnnotationKeyPrefix is the prefix to an annotation key specifying a container's apparmor profile. + // Deprecated: use a pod or container security context `appArmorProfile` field instead. + DeprecatedAppArmorBetaContainerAnnotationKeyPrefix = "container.apparmor.security.beta.kubernetes.io/" - // AppArmorBetaProfileRuntimeDefault is the profile specifying the runtime default. - AppArmorBetaProfileRuntimeDefault = "runtime/default" + // DeprecatedAppArmorBetaProfileRuntimeDefault is the profile specifying the runtime default. + DeprecatedAppArmorBetaProfileRuntimeDefault = "runtime/default" - // AppArmorBetaProfileNamePrefix is the prefix for specifying profiles loaded on the node. - AppArmorBetaProfileNamePrefix = "localhost/" + // DeprecatedAppArmorBetaProfileNamePrefix is the prefix for specifying profiles loaded on the node. + DeprecatedAppArmorBetaProfileNamePrefix = "localhost/" - // AppArmorBetaProfileNameUnconfined is the Unconfined AppArmor profile - AppArmorBetaProfileNameUnconfined = "unconfined" + // DeprecatedAppArmorBetaProfileNameUnconfined is the Unconfined AppArmor profile + DeprecatedAppArmorBetaProfileNameUnconfined = "unconfined" // DeprecatedSeccompProfileDockerDefault represents the default seccomp profile used by docker. // Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead. diff --git a/vendor/k8s.io/api/core/v1/generated.pb.go b/vendor/k8s.io/api/core/v1/generated.pb.go index 04c7939e0d5..d52d8da1896 100644 --- a/vendor/k8s.io/api/core/v1/generated.pb.go +++ b/vendor/k8s.io/api/core/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/core/v1/generated.proto +// source: k8s.io/api/core/v1/generated.proto package v1 @@ -52,7 +52,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AWSElasticBlockStoreVolumeSource) Reset() { *m = AWSElasticBlockStoreVolumeSource{} } func (*AWSElasticBlockStoreVolumeSource) ProtoMessage() {} func (*AWSElasticBlockStoreVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{0} + return fileDescriptor_6c07b07c062484ab, []int{0} } func (m *AWSElasticBlockStoreVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +80,7 @@ var xxx_messageInfo_AWSElasticBlockStoreVolumeSource proto.InternalMessageInfo func (m *Affinity) Reset() { *m = Affinity{} } func (*Affinity) ProtoMessage() {} func (*Affinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{1} + return fileDescriptor_6c07b07c062484ab, []int{1} } func (m *Affinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,10 +105,38 @@ func (m *Affinity) XXX_DiscardUnknown() { var xxx_messageInfo_Affinity proto.InternalMessageInfo +func (m *AppArmorProfile) Reset() { *m = AppArmorProfile{} } +func (*AppArmorProfile) ProtoMessage() {} +func (*AppArmorProfile) Descriptor() ([]byte, []int) { + return fileDescriptor_6c07b07c062484ab, []int{2} +} +func (m *AppArmorProfile) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AppArmorProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *AppArmorProfile) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppArmorProfile.Merge(m, src) +} +func (m *AppArmorProfile) XXX_Size() int { + return m.Size() +} +func (m *AppArmorProfile) XXX_DiscardUnknown() { + xxx_messageInfo_AppArmorProfile.DiscardUnknown(m) +} + +var xxx_messageInfo_AppArmorProfile proto.InternalMessageInfo + func (m *AttachedVolume) Reset() { *m = AttachedVolume{} } func (*AttachedVolume) ProtoMessage() {} func (*AttachedVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{2} + return fileDescriptor_6c07b07c062484ab, []int{3} } func (m *AttachedVolume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -136,7 +164,7 @@ var xxx_messageInfo_AttachedVolume proto.InternalMessageInfo func (m *AvoidPods) Reset() { *m = AvoidPods{} } func (*AvoidPods) ProtoMessage() {} func (*AvoidPods) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{3} + return fileDescriptor_6c07b07c062484ab, []int{4} } func (m *AvoidPods) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +192,7 @@ var xxx_messageInfo_AvoidPods proto.InternalMessageInfo func (m *AzureDiskVolumeSource) Reset() { *m = AzureDiskVolumeSource{} } func (*AzureDiskVolumeSource) ProtoMessage() {} func (*AzureDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{4} + return fileDescriptor_6c07b07c062484ab, []int{5} } func (m *AzureDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +220,7 @@ var xxx_messageInfo_AzureDiskVolumeSource proto.InternalMessageInfo func (m *AzureFilePersistentVolumeSource) Reset() { *m = AzureFilePersistentVolumeSource{} } func (*AzureFilePersistentVolumeSource) ProtoMessage() {} func (*AzureFilePersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{5} + return fileDescriptor_6c07b07c062484ab, []int{6} } func (m *AzureFilePersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +248,7 @@ var xxx_messageInfo_AzureFilePersistentVolumeSource proto.InternalMessageInfo func (m *AzureFileVolumeSource) Reset() { *m = AzureFileVolumeSource{} } func (*AzureFileVolumeSource) ProtoMessage() {} func (*AzureFileVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{6} + return fileDescriptor_6c07b07c062484ab, []int{7} } func (m *AzureFileVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +276,7 @@ var xxx_messageInfo_AzureFileVolumeSource proto.InternalMessageInfo func (m *Binding) Reset() { *m = Binding{} } func (*Binding) ProtoMessage() {} func (*Binding) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{7} + return fileDescriptor_6c07b07c062484ab, []int{8} } func (m *Binding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +304,7 @@ var xxx_messageInfo_Binding proto.InternalMessageInfo func (m *CSIPersistentVolumeSource) Reset() { *m = CSIPersistentVolumeSource{} } func (*CSIPersistentVolumeSource) ProtoMessage() {} func (*CSIPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{8} + return fileDescriptor_6c07b07c062484ab, []int{9} } func (m *CSIPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -304,7 +332,7 @@ var xxx_messageInfo_CSIPersistentVolumeSource proto.InternalMessageInfo func (m *CSIVolumeSource) Reset() { *m = CSIVolumeSource{} } func (*CSIVolumeSource) ProtoMessage() {} func (*CSIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{9} + return fileDescriptor_6c07b07c062484ab, []int{10} } func (m *CSIVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +360,7 @@ var xxx_messageInfo_CSIVolumeSource proto.InternalMessageInfo func (m *Capabilities) Reset() { *m = Capabilities{} } func (*Capabilities) ProtoMessage() {} func (*Capabilities) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{10} + return fileDescriptor_6c07b07c062484ab, []int{11} } func (m *Capabilities) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +388,7 @@ var xxx_messageInfo_Capabilities proto.InternalMessageInfo func (m *CephFSPersistentVolumeSource) Reset() { *m = CephFSPersistentVolumeSource{} } func (*CephFSPersistentVolumeSource) ProtoMessage() {} func (*CephFSPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{11} + return fileDescriptor_6c07b07c062484ab, []int{12} } func (m *CephFSPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,7 +416,7 @@ var xxx_messageInfo_CephFSPersistentVolumeSource proto.InternalMessageInfo func (m *CephFSVolumeSource) Reset() { *m = CephFSVolumeSource{} } func (*CephFSVolumeSource) ProtoMessage() {} func (*CephFSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{12} + return fileDescriptor_6c07b07c062484ab, []int{13} } func (m *CephFSVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +444,7 @@ var xxx_messageInfo_CephFSVolumeSource proto.InternalMessageInfo func (m *CinderPersistentVolumeSource) Reset() { *m = CinderPersistentVolumeSource{} } func (*CinderPersistentVolumeSource) ProtoMessage() {} func (*CinderPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{13} + return fileDescriptor_6c07b07c062484ab, []int{14} } func (m *CinderPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,7 +472,7 @@ var xxx_messageInfo_CinderPersistentVolumeSource proto.InternalMessageInfo func (m *CinderVolumeSource) Reset() { *m = CinderVolumeSource{} } func (*CinderVolumeSource) ProtoMessage() {} func (*CinderVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{14} + return fileDescriptor_6c07b07c062484ab, []int{15} } func (m *CinderVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,7 +500,7 @@ var xxx_messageInfo_CinderVolumeSource proto.InternalMessageInfo func (m *ClaimSource) Reset() { *m = ClaimSource{} } func (*ClaimSource) ProtoMessage() {} func (*ClaimSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{15} + return fileDescriptor_6c07b07c062484ab, []int{16} } func (m *ClaimSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +528,7 @@ var xxx_messageInfo_ClaimSource proto.InternalMessageInfo func (m *ClientIPConfig) Reset() { *m = ClientIPConfig{} } func (*ClientIPConfig) ProtoMessage() {} func (*ClientIPConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{16} + return fileDescriptor_6c07b07c062484ab, []int{17} } func (m *ClientIPConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +556,7 @@ var xxx_messageInfo_ClientIPConfig proto.InternalMessageInfo func (m *ClusterTrustBundleProjection) Reset() { *m = ClusterTrustBundleProjection{} } func (*ClusterTrustBundleProjection) ProtoMessage() {} func (*ClusterTrustBundleProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{17} + return fileDescriptor_6c07b07c062484ab, []int{18} } func (m *ClusterTrustBundleProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +584,7 @@ var xxx_messageInfo_ClusterTrustBundleProjection proto.InternalMessageInfo func (m *ComponentCondition) Reset() { *m = ComponentCondition{} } func (*ComponentCondition) ProtoMessage() {} func (*ComponentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{18} + return fileDescriptor_6c07b07c062484ab, []int{19} } func (m *ComponentCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -584,7 +612,7 @@ var xxx_messageInfo_ComponentCondition proto.InternalMessageInfo func (m *ComponentStatus) Reset() { *m = ComponentStatus{} } func (*ComponentStatus) ProtoMessage() {} func (*ComponentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{19} + return fileDescriptor_6c07b07c062484ab, []int{20} } func (m *ComponentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -612,7 +640,7 @@ var xxx_messageInfo_ComponentStatus proto.InternalMessageInfo func (m *ComponentStatusList) Reset() { *m = ComponentStatusList{} } func (*ComponentStatusList) ProtoMessage() {} func (*ComponentStatusList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{20} + return fileDescriptor_6c07b07c062484ab, []int{21} } func (m *ComponentStatusList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -640,7 +668,7 @@ var xxx_messageInfo_ComponentStatusList proto.InternalMessageInfo func (m *ConfigMap) Reset() { *m = ConfigMap{} } func (*ConfigMap) ProtoMessage() {} func (*ConfigMap) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{21} + return fileDescriptor_6c07b07c062484ab, []int{22} } func (m *ConfigMap) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +696,7 @@ var xxx_messageInfo_ConfigMap proto.InternalMessageInfo func (m *ConfigMapEnvSource) Reset() { *m = ConfigMapEnvSource{} } func (*ConfigMapEnvSource) ProtoMessage() {} func (*ConfigMapEnvSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{22} + return fileDescriptor_6c07b07c062484ab, []int{23} } func (m *ConfigMapEnvSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +724,7 @@ var xxx_messageInfo_ConfigMapEnvSource proto.InternalMessageInfo func (m *ConfigMapKeySelector) Reset() { *m = ConfigMapKeySelector{} } func (*ConfigMapKeySelector) ProtoMessage() {} func (*ConfigMapKeySelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{23} + return fileDescriptor_6c07b07c062484ab, []int{24} } func (m *ConfigMapKeySelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,7 +752,7 @@ var xxx_messageInfo_ConfigMapKeySelector proto.InternalMessageInfo func (m *ConfigMapList) Reset() { *m = ConfigMapList{} } func (*ConfigMapList) ProtoMessage() {} func (*ConfigMapList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{24} + return fileDescriptor_6c07b07c062484ab, []int{25} } func (m *ConfigMapList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -752,7 +780,7 @@ var xxx_messageInfo_ConfigMapList proto.InternalMessageInfo func (m *ConfigMapNodeConfigSource) Reset() { *m = ConfigMapNodeConfigSource{} } func (*ConfigMapNodeConfigSource) ProtoMessage() {} func (*ConfigMapNodeConfigSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{25} + return fileDescriptor_6c07b07c062484ab, []int{26} } func (m *ConfigMapNodeConfigSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -780,7 +808,7 @@ var xxx_messageInfo_ConfigMapNodeConfigSource proto.InternalMessageInfo func (m *ConfigMapProjection) Reset() { *m = ConfigMapProjection{} } func (*ConfigMapProjection) ProtoMessage() {} func (*ConfigMapProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{26} + return fileDescriptor_6c07b07c062484ab, []int{27} } func (m *ConfigMapProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -808,7 +836,7 @@ var xxx_messageInfo_ConfigMapProjection proto.InternalMessageInfo func (m *ConfigMapVolumeSource) Reset() { *m = ConfigMapVolumeSource{} } func (*ConfigMapVolumeSource) ProtoMessage() {} func (*ConfigMapVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{27} + return fileDescriptor_6c07b07c062484ab, []int{28} } func (m *ConfigMapVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -836,7 +864,7 @@ var xxx_messageInfo_ConfigMapVolumeSource proto.InternalMessageInfo func (m *Container) Reset() { *m = Container{} } func (*Container) ProtoMessage() {} func (*Container) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{28} + return fileDescriptor_6c07b07c062484ab, []int{29} } func (m *Container) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -864,7 +892,7 @@ var xxx_messageInfo_Container proto.InternalMessageInfo func (m *ContainerImage) Reset() { *m = ContainerImage{} } func (*ContainerImage) ProtoMessage() {} func (*ContainerImage) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{29} + return fileDescriptor_6c07b07c062484ab, []int{30} } func (m *ContainerImage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -892,7 +920,7 @@ var xxx_messageInfo_ContainerImage proto.InternalMessageInfo func (m *ContainerPort) Reset() { *m = ContainerPort{} } func (*ContainerPort) ProtoMessage() {} func (*ContainerPort) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{30} + return fileDescriptor_6c07b07c062484ab, []int{31} } func (m *ContainerPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -920,7 +948,7 @@ var xxx_messageInfo_ContainerPort proto.InternalMessageInfo func (m *ContainerResizePolicy) Reset() { *m = ContainerResizePolicy{} } func (*ContainerResizePolicy) ProtoMessage() {} func (*ContainerResizePolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{31} + return fileDescriptor_6c07b07c062484ab, []int{32} } func (m *ContainerResizePolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -948,7 +976,7 @@ var xxx_messageInfo_ContainerResizePolicy proto.InternalMessageInfo func (m *ContainerState) Reset() { *m = ContainerState{} } func (*ContainerState) ProtoMessage() {} func (*ContainerState) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{32} + return fileDescriptor_6c07b07c062484ab, []int{33} } func (m *ContainerState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -976,7 +1004,7 @@ var xxx_messageInfo_ContainerState proto.InternalMessageInfo func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} } func (*ContainerStateRunning) ProtoMessage() {} func (*ContainerStateRunning) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{33} + return fileDescriptor_6c07b07c062484ab, []int{34} } func (m *ContainerStateRunning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1004,7 +1032,7 @@ var xxx_messageInfo_ContainerStateRunning proto.InternalMessageInfo func (m *ContainerStateTerminated) Reset() { *m = ContainerStateTerminated{} } func (*ContainerStateTerminated) ProtoMessage() {} func (*ContainerStateTerminated) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{34} + return fileDescriptor_6c07b07c062484ab, []int{35} } func (m *ContainerStateTerminated) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1032,7 +1060,7 @@ var xxx_messageInfo_ContainerStateTerminated proto.InternalMessageInfo func (m *ContainerStateWaiting) Reset() { *m = ContainerStateWaiting{} } func (*ContainerStateWaiting) ProtoMessage() {} func (*ContainerStateWaiting) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{35} + return fileDescriptor_6c07b07c062484ab, []int{36} } func (m *ContainerStateWaiting) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1060,7 +1088,7 @@ var xxx_messageInfo_ContainerStateWaiting proto.InternalMessageInfo func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } func (*ContainerStatus) ProtoMessage() {} func (*ContainerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{36} + return fileDescriptor_6c07b07c062484ab, []int{37} } func (m *ContainerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1088,7 +1116,7 @@ var xxx_messageInfo_ContainerStatus proto.InternalMessageInfo func (m *DaemonEndpoint) Reset() { *m = DaemonEndpoint{} } func (*DaemonEndpoint) ProtoMessage() {} func (*DaemonEndpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{37} + return fileDescriptor_6c07b07c062484ab, []int{38} } func (m *DaemonEndpoint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1116,7 +1144,7 @@ var xxx_messageInfo_DaemonEndpoint proto.InternalMessageInfo func (m *DownwardAPIProjection) Reset() { *m = DownwardAPIProjection{} } func (*DownwardAPIProjection) ProtoMessage() {} func (*DownwardAPIProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{38} + return fileDescriptor_6c07b07c062484ab, []int{39} } func (m *DownwardAPIProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1144,7 +1172,7 @@ var xxx_messageInfo_DownwardAPIProjection proto.InternalMessageInfo func (m *DownwardAPIVolumeFile) Reset() { *m = DownwardAPIVolumeFile{} } func (*DownwardAPIVolumeFile) ProtoMessage() {} func (*DownwardAPIVolumeFile) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{39} + return fileDescriptor_6c07b07c062484ab, []int{40} } func (m *DownwardAPIVolumeFile) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1172,7 +1200,7 @@ var xxx_messageInfo_DownwardAPIVolumeFile proto.InternalMessageInfo func (m *DownwardAPIVolumeSource) Reset() { *m = DownwardAPIVolumeSource{} } func (*DownwardAPIVolumeSource) ProtoMessage() {} func (*DownwardAPIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{40} + return fileDescriptor_6c07b07c062484ab, []int{41} } func (m *DownwardAPIVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1200,7 +1228,7 @@ var xxx_messageInfo_DownwardAPIVolumeSource proto.InternalMessageInfo func (m *EmptyDirVolumeSource) Reset() { *m = EmptyDirVolumeSource{} } func (*EmptyDirVolumeSource) ProtoMessage() {} func (*EmptyDirVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{41} + return fileDescriptor_6c07b07c062484ab, []int{42} } func (m *EmptyDirVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1228,7 +1256,7 @@ var xxx_messageInfo_EmptyDirVolumeSource proto.InternalMessageInfo func (m *EndpointAddress) Reset() { *m = EndpointAddress{} } func (*EndpointAddress) ProtoMessage() {} func (*EndpointAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{42} + return fileDescriptor_6c07b07c062484ab, []int{43} } func (m *EndpointAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1256,7 +1284,7 @@ var xxx_messageInfo_EndpointAddress proto.InternalMessageInfo func (m *EndpointPort) Reset() { *m = EndpointPort{} } func (*EndpointPort) ProtoMessage() {} func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{43} + return fileDescriptor_6c07b07c062484ab, []int{44} } func (m *EndpointPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1284,7 +1312,7 @@ var xxx_messageInfo_EndpointPort proto.InternalMessageInfo func (m *EndpointSubset) Reset() { *m = EndpointSubset{} } func (*EndpointSubset) ProtoMessage() {} func (*EndpointSubset) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{44} + return fileDescriptor_6c07b07c062484ab, []int{45} } func (m *EndpointSubset) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1312,7 +1340,7 @@ var xxx_messageInfo_EndpointSubset proto.InternalMessageInfo func (m *Endpoints) Reset() { *m = Endpoints{} } func (*Endpoints) ProtoMessage() {} func (*Endpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{45} + return fileDescriptor_6c07b07c062484ab, []int{46} } func (m *Endpoints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1340,7 +1368,7 @@ var xxx_messageInfo_Endpoints proto.InternalMessageInfo func (m *EndpointsList) Reset() { *m = EndpointsList{} } func (*EndpointsList) ProtoMessage() {} func (*EndpointsList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{46} + return fileDescriptor_6c07b07c062484ab, []int{47} } func (m *EndpointsList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1368,7 +1396,7 @@ var xxx_messageInfo_EndpointsList proto.InternalMessageInfo func (m *EnvFromSource) Reset() { *m = EnvFromSource{} } func (*EnvFromSource) ProtoMessage() {} func (*EnvFromSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{47} + return fileDescriptor_6c07b07c062484ab, []int{48} } func (m *EnvFromSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1396,7 +1424,7 @@ var xxx_messageInfo_EnvFromSource proto.InternalMessageInfo func (m *EnvVar) Reset() { *m = EnvVar{} } func (*EnvVar) ProtoMessage() {} func (*EnvVar) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{48} + return fileDescriptor_6c07b07c062484ab, []int{49} } func (m *EnvVar) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1424,7 +1452,7 @@ var xxx_messageInfo_EnvVar proto.InternalMessageInfo func (m *EnvVarSource) Reset() { *m = EnvVarSource{} } func (*EnvVarSource) ProtoMessage() {} func (*EnvVarSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{49} + return fileDescriptor_6c07b07c062484ab, []int{50} } func (m *EnvVarSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1452,7 +1480,7 @@ var xxx_messageInfo_EnvVarSource proto.InternalMessageInfo func (m *EphemeralContainer) Reset() { *m = EphemeralContainer{} } func (*EphemeralContainer) ProtoMessage() {} func (*EphemeralContainer) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{50} + return fileDescriptor_6c07b07c062484ab, []int{51} } func (m *EphemeralContainer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1480,7 +1508,7 @@ var xxx_messageInfo_EphemeralContainer proto.InternalMessageInfo func (m *EphemeralContainerCommon) Reset() { *m = EphemeralContainerCommon{} } func (*EphemeralContainerCommon) ProtoMessage() {} func (*EphemeralContainerCommon) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{51} + return fileDescriptor_6c07b07c062484ab, []int{52} } func (m *EphemeralContainerCommon) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1508,7 +1536,7 @@ var xxx_messageInfo_EphemeralContainerCommon proto.InternalMessageInfo func (m *EphemeralVolumeSource) Reset() { *m = EphemeralVolumeSource{} } func (*EphemeralVolumeSource) ProtoMessage() {} func (*EphemeralVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{52} + return fileDescriptor_6c07b07c062484ab, []int{53} } func (m *EphemeralVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1536,7 +1564,7 @@ var xxx_messageInfo_EphemeralVolumeSource proto.InternalMessageInfo func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{53} + return fileDescriptor_6c07b07c062484ab, []int{54} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1564,7 +1592,7 @@ var xxx_messageInfo_Event proto.InternalMessageInfo func (m *EventList) Reset() { *m = EventList{} } func (*EventList) ProtoMessage() {} func (*EventList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{54} + return fileDescriptor_6c07b07c062484ab, []int{55} } func (m *EventList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1592,7 +1620,7 @@ var xxx_messageInfo_EventList proto.InternalMessageInfo func (m *EventSeries) Reset() { *m = EventSeries{} } func (*EventSeries) ProtoMessage() {} func (*EventSeries) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{55} + return fileDescriptor_6c07b07c062484ab, []int{56} } func (m *EventSeries) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1620,7 +1648,7 @@ var xxx_messageInfo_EventSeries proto.InternalMessageInfo func (m *EventSource) Reset() { *m = EventSource{} } func (*EventSource) ProtoMessage() {} func (*EventSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{56} + return fileDescriptor_6c07b07c062484ab, []int{57} } func (m *EventSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1648,7 +1676,7 @@ var xxx_messageInfo_EventSource proto.InternalMessageInfo func (m *ExecAction) Reset() { *m = ExecAction{} } func (*ExecAction) ProtoMessage() {} func (*ExecAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{57} + return fileDescriptor_6c07b07c062484ab, []int{58} } func (m *ExecAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1676,7 +1704,7 @@ var xxx_messageInfo_ExecAction proto.InternalMessageInfo func (m *FCVolumeSource) Reset() { *m = FCVolumeSource{} } func (*FCVolumeSource) ProtoMessage() {} func (*FCVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{58} + return fileDescriptor_6c07b07c062484ab, []int{59} } func (m *FCVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1704,7 +1732,7 @@ var xxx_messageInfo_FCVolumeSource proto.InternalMessageInfo func (m *FlexPersistentVolumeSource) Reset() { *m = FlexPersistentVolumeSource{} } func (*FlexPersistentVolumeSource) ProtoMessage() {} func (*FlexPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{59} + return fileDescriptor_6c07b07c062484ab, []int{60} } func (m *FlexPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1732,7 +1760,7 @@ var xxx_messageInfo_FlexPersistentVolumeSource proto.InternalMessageInfo func (m *FlexVolumeSource) Reset() { *m = FlexVolumeSource{} } func (*FlexVolumeSource) ProtoMessage() {} func (*FlexVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{60} + return fileDescriptor_6c07b07c062484ab, []int{61} } func (m *FlexVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1760,7 +1788,7 @@ var xxx_messageInfo_FlexVolumeSource proto.InternalMessageInfo func (m *FlockerVolumeSource) Reset() { *m = FlockerVolumeSource{} } func (*FlockerVolumeSource) ProtoMessage() {} func (*FlockerVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{61} + return fileDescriptor_6c07b07c062484ab, []int{62} } func (m *FlockerVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1788,7 +1816,7 @@ var xxx_messageInfo_FlockerVolumeSource proto.InternalMessageInfo func (m *GCEPersistentDiskVolumeSource) Reset() { *m = GCEPersistentDiskVolumeSource{} } func (*GCEPersistentDiskVolumeSource) ProtoMessage() {} func (*GCEPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{62} + return fileDescriptor_6c07b07c062484ab, []int{63} } func (m *GCEPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1816,7 +1844,7 @@ var xxx_messageInfo_GCEPersistentDiskVolumeSource proto.InternalMessageInfo func (m *GRPCAction) Reset() { *m = GRPCAction{} } func (*GRPCAction) ProtoMessage() {} func (*GRPCAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{63} + return fileDescriptor_6c07b07c062484ab, []int{64} } func (m *GRPCAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1844,7 +1872,7 @@ var xxx_messageInfo_GRPCAction proto.InternalMessageInfo func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSource{} } func (*GitRepoVolumeSource) ProtoMessage() {} func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{64} + return fileDescriptor_6c07b07c062484ab, []int{65} } func (m *GitRepoVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1872,7 +1900,7 @@ var xxx_messageInfo_GitRepoVolumeSource proto.InternalMessageInfo func (m *GlusterfsPersistentVolumeSource) Reset() { *m = GlusterfsPersistentVolumeSource{} } func (*GlusterfsPersistentVolumeSource) ProtoMessage() {} func (*GlusterfsPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{65} + return fileDescriptor_6c07b07c062484ab, []int{66} } func (m *GlusterfsPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1900,7 +1928,7 @@ var xxx_messageInfo_GlusterfsPersistentVolumeSource proto.InternalMessageInfo func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} } func (*GlusterfsVolumeSource) ProtoMessage() {} func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{66} + return fileDescriptor_6c07b07c062484ab, []int{67} } func (m *GlusterfsVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1928,7 +1956,7 @@ var xxx_messageInfo_GlusterfsVolumeSource proto.InternalMessageInfo func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} } func (*HTTPGetAction) ProtoMessage() {} func (*HTTPGetAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{67} + return fileDescriptor_6c07b07c062484ab, []int{68} } func (m *HTTPGetAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1956,7 +1984,7 @@ var xxx_messageInfo_HTTPGetAction proto.InternalMessageInfo func (m *HTTPHeader) Reset() { *m = HTTPHeader{} } func (*HTTPHeader) ProtoMessage() {} func (*HTTPHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{68} + return fileDescriptor_6c07b07c062484ab, []int{69} } func (m *HTTPHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1984,7 +2012,7 @@ var xxx_messageInfo_HTTPHeader proto.InternalMessageInfo func (m *HostAlias) Reset() { *m = HostAlias{} } func (*HostAlias) ProtoMessage() {} func (*HostAlias) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{69} + return fileDescriptor_6c07b07c062484ab, []int{70} } func (m *HostAlias) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2012,7 +2040,7 @@ var xxx_messageInfo_HostAlias proto.InternalMessageInfo func (m *HostIP) Reset() { *m = HostIP{} } func (*HostIP) ProtoMessage() {} func (*HostIP) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{70} + return fileDescriptor_6c07b07c062484ab, []int{71} } func (m *HostIP) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2040,7 +2068,7 @@ var xxx_messageInfo_HostIP proto.InternalMessageInfo func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} } func (*HostPathVolumeSource) ProtoMessage() {} func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{71} + return fileDescriptor_6c07b07c062484ab, []int{72} } func (m *HostPathVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2068,7 +2096,7 @@ var xxx_messageInfo_HostPathVolumeSource proto.InternalMessageInfo func (m *ISCSIPersistentVolumeSource) Reset() { *m = ISCSIPersistentVolumeSource{} } func (*ISCSIPersistentVolumeSource) ProtoMessage() {} func (*ISCSIPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{72} + return fileDescriptor_6c07b07c062484ab, []int{73} } func (m *ISCSIPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2096,7 +2124,7 @@ var xxx_messageInfo_ISCSIPersistentVolumeSource proto.InternalMessageInfo func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} } func (*ISCSIVolumeSource) ProtoMessage() {} func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{73} + return fileDescriptor_6c07b07c062484ab, []int{74} } func (m *ISCSIVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2124,7 +2152,7 @@ var xxx_messageInfo_ISCSIVolumeSource proto.InternalMessageInfo func (m *KeyToPath) Reset() { *m = KeyToPath{} } func (*KeyToPath) ProtoMessage() {} func (*KeyToPath) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{74} + return fileDescriptor_6c07b07c062484ab, []int{75} } func (m *KeyToPath) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2152,7 +2180,7 @@ var xxx_messageInfo_KeyToPath proto.InternalMessageInfo func (m *Lifecycle) Reset() { *m = Lifecycle{} } func (*Lifecycle) ProtoMessage() {} func (*Lifecycle) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{75} + return fileDescriptor_6c07b07c062484ab, []int{76} } func (m *Lifecycle) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2180,7 +2208,7 @@ var xxx_messageInfo_Lifecycle proto.InternalMessageInfo func (m *LifecycleHandler) Reset() { *m = LifecycleHandler{} } func (*LifecycleHandler) ProtoMessage() {} func (*LifecycleHandler) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{76} + return fileDescriptor_6c07b07c062484ab, []int{77} } func (m *LifecycleHandler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2208,7 +2236,7 @@ var xxx_messageInfo_LifecycleHandler proto.InternalMessageInfo func (m *LimitRange) Reset() { *m = LimitRange{} } func (*LimitRange) ProtoMessage() {} func (*LimitRange) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{77} + return fileDescriptor_6c07b07c062484ab, []int{78} } func (m *LimitRange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2236,7 +2264,7 @@ var xxx_messageInfo_LimitRange proto.InternalMessageInfo func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} } func (*LimitRangeItem) ProtoMessage() {} func (*LimitRangeItem) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{78} + return fileDescriptor_6c07b07c062484ab, []int{79} } func (m *LimitRangeItem) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2264,7 +2292,7 @@ var xxx_messageInfo_LimitRangeItem proto.InternalMessageInfo func (m *LimitRangeList) Reset() { *m = LimitRangeList{} } func (*LimitRangeList) ProtoMessage() {} func (*LimitRangeList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{79} + return fileDescriptor_6c07b07c062484ab, []int{80} } func (m *LimitRangeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2292,7 +2320,7 @@ var xxx_messageInfo_LimitRangeList proto.InternalMessageInfo func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} } func (*LimitRangeSpec) ProtoMessage() {} func (*LimitRangeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{80} + return fileDescriptor_6c07b07c062484ab, []int{81} } func (m *LimitRangeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2320,7 +2348,7 @@ var xxx_messageInfo_LimitRangeSpec proto.InternalMessageInfo func (m *List) Reset() { *m = List{} } func (*List) ProtoMessage() {} func (*List) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{81} + return fileDescriptor_6c07b07c062484ab, []int{82} } func (m *List) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2348,7 +2376,7 @@ var xxx_messageInfo_List proto.InternalMessageInfo func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} } func (*LoadBalancerIngress) ProtoMessage() {} func (*LoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{82} + return fileDescriptor_6c07b07c062484ab, []int{83} } func (m *LoadBalancerIngress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2376,7 +2404,7 @@ var xxx_messageInfo_LoadBalancerIngress proto.InternalMessageInfo func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} } func (*LoadBalancerStatus) ProtoMessage() {} func (*LoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{83} + return fileDescriptor_6c07b07c062484ab, []int{84} } func (m *LoadBalancerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2404,7 +2432,7 @@ var xxx_messageInfo_LoadBalancerStatus proto.InternalMessageInfo func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} } func (*LocalObjectReference) ProtoMessage() {} func (*LocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{84} + return fileDescriptor_6c07b07c062484ab, []int{85} } func (m *LocalObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2432,7 +2460,7 @@ var xxx_messageInfo_LocalObjectReference proto.InternalMessageInfo func (m *LocalVolumeSource) Reset() { *m = LocalVolumeSource{} } func (*LocalVolumeSource) ProtoMessage() {} func (*LocalVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{85} + return fileDescriptor_6c07b07c062484ab, []int{86} } func (m *LocalVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2460,7 +2488,7 @@ var xxx_messageInfo_LocalVolumeSource proto.InternalMessageInfo func (m *ModifyVolumeStatus) Reset() { *m = ModifyVolumeStatus{} } func (*ModifyVolumeStatus) ProtoMessage() {} func (*ModifyVolumeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{86} + return fileDescriptor_6c07b07c062484ab, []int{87} } func (m *ModifyVolumeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2488,7 +2516,7 @@ var xxx_messageInfo_ModifyVolumeStatus proto.InternalMessageInfo func (m *NFSVolumeSource) Reset() { *m = NFSVolumeSource{} } func (*NFSVolumeSource) ProtoMessage() {} func (*NFSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{87} + return fileDescriptor_6c07b07c062484ab, []int{88} } func (m *NFSVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2516,7 +2544,7 @@ var xxx_messageInfo_NFSVolumeSource proto.InternalMessageInfo func (m *Namespace) Reset() { *m = Namespace{} } func (*Namespace) ProtoMessage() {} func (*Namespace) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{88} + return fileDescriptor_6c07b07c062484ab, []int{89} } func (m *Namespace) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2544,7 +2572,7 @@ var xxx_messageInfo_Namespace proto.InternalMessageInfo func (m *NamespaceCondition) Reset() { *m = NamespaceCondition{} } func (*NamespaceCondition) ProtoMessage() {} func (*NamespaceCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{89} + return fileDescriptor_6c07b07c062484ab, []int{90} } func (m *NamespaceCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2572,7 +2600,7 @@ var xxx_messageInfo_NamespaceCondition proto.InternalMessageInfo func (m *NamespaceList) Reset() { *m = NamespaceList{} } func (*NamespaceList) ProtoMessage() {} func (*NamespaceList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{90} + return fileDescriptor_6c07b07c062484ab, []int{91} } func (m *NamespaceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2600,7 +2628,7 @@ var xxx_messageInfo_NamespaceList proto.InternalMessageInfo func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} } func (*NamespaceSpec) ProtoMessage() {} func (*NamespaceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{91} + return fileDescriptor_6c07b07c062484ab, []int{92} } func (m *NamespaceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2628,7 +2656,7 @@ var xxx_messageInfo_NamespaceSpec proto.InternalMessageInfo func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} } func (*NamespaceStatus) ProtoMessage() {} func (*NamespaceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{92} + return fileDescriptor_6c07b07c062484ab, []int{93} } func (m *NamespaceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2656,7 +2684,7 @@ var xxx_messageInfo_NamespaceStatus proto.InternalMessageInfo func (m *Node) Reset() { *m = Node{} } func (*Node) ProtoMessage() {} func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{93} + return fileDescriptor_6c07b07c062484ab, []int{94} } func (m *Node) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2684,7 +2712,7 @@ var xxx_messageInfo_Node proto.InternalMessageInfo func (m *NodeAddress) Reset() { *m = NodeAddress{} } func (*NodeAddress) ProtoMessage() {} func (*NodeAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{94} + return fileDescriptor_6c07b07c062484ab, []int{95} } func (m *NodeAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2712,7 +2740,7 @@ var xxx_messageInfo_NodeAddress proto.InternalMessageInfo func (m *NodeAffinity) Reset() { *m = NodeAffinity{} } func (*NodeAffinity) ProtoMessage() {} func (*NodeAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{95} + return fileDescriptor_6c07b07c062484ab, []int{96} } func (m *NodeAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2740,7 +2768,7 @@ var xxx_messageInfo_NodeAffinity proto.InternalMessageInfo func (m *NodeCondition) Reset() { *m = NodeCondition{} } func (*NodeCondition) ProtoMessage() {} func (*NodeCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{96} + return fileDescriptor_6c07b07c062484ab, []int{97} } func (m *NodeCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2768,7 +2796,7 @@ var xxx_messageInfo_NodeCondition proto.InternalMessageInfo func (m *NodeConfigSource) Reset() { *m = NodeConfigSource{} } func (*NodeConfigSource) ProtoMessage() {} func (*NodeConfigSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{97} + return fileDescriptor_6c07b07c062484ab, []int{98} } func (m *NodeConfigSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2796,7 +2824,7 @@ var xxx_messageInfo_NodeConfigSource proto.InternalMessageInfo func (m *NodeConfigStatus) Reset() { *m = NodeConfigStatus{} } func (*NodeConfigStatus) ProtoMessage() {} func (*NodeConfigStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{98} + return fileDescriptor_6c07b07c062484ab, []int{99} } func (m *NodeConfigStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2824,7 +2852,7 @@ var xxx_messageInfo_NodeConfigStatus proto.InternalMessageInfo func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} } func (*NodeDaemonEndpoints) ProtoMessage() {} func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{99} + return fileDescriptor_6c07b07c062484ab, []int{100} } func (m *NodeDaemonEndpoints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2852,7 +2880,7 @@ var xxx_messageInfo_NodeDaemonEndpoints proto.InternalMessageInfo func (m *NodeList) Reset() { *m = NodeList{} } func (*NodeList) ProtoMessage() {} func (*NodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{100} + return fileDescriptor_6c07b07c062484ab, []int{101} } func (m *NodeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2880,7 +2908,7 @@ var xxx_messageInfo_NodeList proto.InternalMessageInfo func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} } func (*NodeProxyOptions) ProtoMessage() {} func (*NodeProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{101} + return fileDescriptor_6c07b07c062484ab, []int{102} } func (m *NodeProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2905,15 +2933,15 @@ func (m *NodeProxyOptions) XXX_DiscardUnknown() { var xxx_messageInfo_NodeProxyOptions proto.InternalMessageInfo -func (m *NodeResources) Reset() { *m = NodeResources{} } -func (*NodeResources) ProtoMessage() {} -func (*NodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{102} +func (m *NodeRuntimeHandler) Reset() { *m = NodeRuntimeHandler{} } +func (*NodeRuntimeHandler) ProtoMessage() {} +func (*NodeRuntimeHandler) Descriptor() ([]byte, []int) { + return fileDescriptor_6c07b07c062484ab, []int{103} } -func (m *NodeResources) XXX_Unmarshal(b []byte) error { +func (m *NodeRuntimeHandler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NodeResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *NodeRuntimeHandler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -2921,22 +2949,50 @@ func (m *NodeResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error } return b[:n], nil } -func (m *NodeResources) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeResources.Merge(m, src) +func (m *NodeRuntimeHandler) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeRuntimeHandler.Merge(m, src) } -func (m *NodeResources) XXX_Size() int { +func (m *NodeRuntimeHandler) XXX_Size() int { return m.Size() } -func (m *NodeResources) XXX_DiscardUnknown() { - xxx_messageInfo_NodeResources.DiscardUnknown(m) +func (m *NodeRuntimeHandler) XXX_DiscardUnknown() { + xxx_messageInfo_NodeRuntimeHandler.DiscardUnknown(m) } -var xxx_messageInfo_NodeResources proto.InternalMessageInfo +var xxx_messageInfo_NodeRuntimeHandler proto.InternalMessageInfo + +func (m *NodeRuntimeHandlerFeatures) Reset() { *m = NodeRuntimeHandlerFeatures{} } +func (*NodeRuntimeHandlerFeatures) ProtoMessage() {} +func (*NodeRuntimeHandlerFeatures) Descriptor() ([]byte, []int) { + return fileDescriptor_6c07b07c062484ab, []int{104} +} +func (m *NodeRuntimeHandlerFeatures) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeRuntimeHandlerFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NodeRuntimeHandlerFeatures) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeRuntimeHandlerFeatures.Merge(m, src) +} +func (m *NodeRuntimeHandlerFeatures) XXX_Size() int { + return m.Size() +} +func (m *NodeRuntimeHandlerFeatures) XXX_DiscardUnknown() { + xxx_messageInfo_NodeRuntimeHandlerFeatures.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeRuntimeHandlerFeatures proto.InternalMessageInfo func (m *NodeSelector) Reset() { *m = NodeSelector{} } func (*NodeSelector) ProtoMessage() {} func (*NodeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{103} + return fileDescriptor_6c07b07c062484ab, []int{105} } func (m *NodeSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2964,7 +3020,7 @@ var xxx_messageInfo_NodeSelector proto.InternalMessageInfo func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} } func (*NodeSelectorRequirement) ProtoMessage() {} func (*NodeSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{104} + return fileDescriptor_6c07b07c062484ab, []int{106} } func (m *NodeSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2992,7 +3048,7 @@ var xxx_messageInfo_NodeSelectorRequirement proto.InternalMessageInfo func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} } func (*NodeSelectorTerm) ProtoMessage() {} func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{105} + return fileDescriptor_6c07b07c062484ab, []int{107} } func (m *NodeSelectorTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3020,7 +3076,7 @@ var xxx_messageInfo_NodeSelectorTerm proto.InternalMessageInfo func (m *NodeSpec) Reset() { *m = NodeSpec{} } func (*NodeSpec) ProtoMessage() {} func (*NodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{106} + return fileDescriptor_6c07b07c062484ab, []int{108} } func (m *NodeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3048,7 +3104,7 @@ var xxx_messageInfo_NodeSpec proto.InternalMessageInfo func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{107} + return fileDescriptor_6c07b07c062484ab, []int{109} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3076,7 +3132,7 @@ var xxx_messageInfo_NodeStatus proto.InternalMessageInfo func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} } func (*NodeSystemInfo) ProtoMessage() {} func (*NodeSystemInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{108} + return fileDescriptor_6c07b07c062484ab, []int{110} } func (m *NodeSystemInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3104,7 +3160,7 @@ var xxx_messageInfo_NodeSystemInfo proto.InternalMessageInfo func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} } func (*ObjectFieldSelector) ProtoMessage() {} func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{109} + return fileDescriptor_6c07b07c062484ab, []int{111} } func (m *ObjectFieldSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3132,7 +3188,7 @@ var xxx_messageInfo_ObjectFieldSelector proto.InternalMessageInfo func (m *ObjectReference) Reset() { *m = ObjectReference{} } func (*ObjectReference) ProtoMessage() {} func (*ObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{110} + return fileDescriptor_6c07b07c062484ab, []int{112} } func (m *ObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3160,7 +3216,7 @@ var xxx_messageInfo_ObjectReference proto.InternalMessageInfo func (m *PersistentVolume) Reset() { *m = PersistentVolume{} } func (*PersistentVolume) ProtoMessage() {} func (*PersistentVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{111} + return fileDescriptor_6c07b07c062484ab, []int{113} } func (m *PersistentVolume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3188,7 +3244,7 @@ var xxx_messageInfo_PersistentVolume proto.InternalMessageInfo func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } func (*PersistentVolumeClaim) ProtoMessage() {} func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{112} + return fileDescriptor_6c07b07c062484ab, []int{114} } func (m *PersistentVolumeClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3216,7 +3272,7 @@ var xxx_messageInfo_PersistentVolumeClaim proto.InternalMessageInfo func (m *PersistentVolumeClaimCondition) Reset() { *m = PersistentVolumeClaimCondition{} } func (*PersistentVolumeClaimCondition) ProtoMessage() {} func (*PersistentVolumeClaimCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{113} + return fileDescriptor_6c07b07c062484ab, []int{115} } func (m *PersistentVolumeClaimCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3244,7 +3300,7 @@ var xxx_messageInfo_PersistentVolumeClaimCondition proto.InternalMessageInfo func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} } func (*PersistentVolumeClaimList) ProtoMessage() {} func (*PersistentVolumeClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{114} + return fileDescriptor_6c07b07c062484ab, []int{116} } func (m *PersistentVolumeClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3272,7 +3328,7 @@ var xxx_messageInfo_PersistentVolumeClaimList proto.InternalMessageInfo func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} } func (*PersistentVolumeClaimSpec) ProtoMessage() {} func (*PersistentVolumeClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{115} + return fileDescriptor_6c07b07c062484ab, []int{117} } func (m *PersistentVolumeClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3300,7 +3356,7 @@ var xxx_messageInfo_PersistentVolumeClaimSpec proto.InternalMessageInfo func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} } func (*PersistentVolumeClaimStatus) ProtoMessage() {} func (*PersistentVolumeClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{116} + return fileDescriptor_6c07b07c062484ab, []int{118} } func (m *PersistentVolumeClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3328,7 +3384,7 @@ var xxx_messageInfo_PersistentVolumeClaimStatus proto.InternalMessageInfo func (m *PersistentVolumeClaimTemplate) Reset() { *m = PersistentVolumeClaimTemplate{} } func (*PersistentVolumeClaimTemplate) ProtoMessage() {} func (*PersistentVolumeClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{117} + return fileDescriptor_6c07b07c062484ab, []int{119} } func (m *PersistentVolumeClaimTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3356,7 +3412,7 @@ var xxx_messageInfo_PersistentVolumeClaimTemplate proto.InternalMessageInfo func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} } func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {} func (*PersistentVolumeClaimVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{118} + return fileDescriptor_6c07b07c062484ab, []int{120} } func (m *PersistentVolumeClaimVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3384,7 +3440,7 @@ var xxx_messageInfo_PersistentVolumeClaimVolumeSource proto.InternalMessageInfo func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} } func (*PersistentVolumeList) ProtoMessage() {} func (*PersistentVolumeList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{119} + return fileDescriptor_6c07b07c062484ab, []int{121} } func (m *PersistentVolumeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3412,7 +3468,7 @@ var xxx_messageInfo_PersistentVolumeList proto.InternalMessageInfo func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} } func (*PersistentVolumeSource) ProtoMessage() {} func (*PersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{120} + return fileDescriptor_6c07b07c062484ab, []int{122} } func (m *PersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3440,7 +3496,7 @@ var xxx_messageInfo_PersistentVolumeSource proto.InternalMessageInfo func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} } func (*PersistentVolumeSpec) ProtoMessage() {} func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{121} + return fileDescriptor_6c07b07c062484ab, []int{123} } func (m *PersistentVolumeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3468,7 +3524,7 @@ var xxx_messageInfo_PersistentVolumeSpec proto.InternalMessageInfo func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} } func (*PersistentVolumeStatus) ProtoMessage() {} func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{122} + return fileDescriptor_6c07b07c062484ab, []int{124} } func (m *PersistentVolumeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3496,7 +3552,7 @@ var xxx_messageInfo_PersistentVolumeStatus proto.InternalMessageInfo func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} } func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {} func (*PhotonPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{123} + return fileDescriptor_6c07b07c062484ab, []int{125} } func (m *PhotonPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3524,7 +3580,7 @@ var xxx_messageInfo_PhotonPersistentDiskVolumeSource proto.InternalMessageInfo func (m *Pod) Reset() { *m = Pod{} } func (*Pod) ProtoMessage() {} func (*Pod) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{124} + return fileDescriptor_6c07b07c062484ab, []int{126} } func (m *Pod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3552,7 +3608,7 @@ var xxx_messageInfo_Pod proto.InternalMessageInfo func (m *PodAffinity) Reset() { *m = PodAffinity{} } func (*PodAffinity) ProtoMessage() {} func (*PodAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{125} + return fileDescriptor_6c07b07c062484ab, []int{127} } func (m *PodAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3580,7 +3636,7 @@ var xxx_messageInfo_PodAffinity proto.InternalMessageInfo func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} } func (*PodAffinityTerm) ProtoMessage() {} func (*PodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{126} + return fileDescriptor_6c07b07c062484ab, []int{128} } func (m *PodAffinityTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3608,7 +3664,7 @@ var xxx_messageInfo_PodAffinityTerm proto.InternalMessageInfo func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} } func (*PodAntiAffinity) ProtoMessage() {} func (*PodAntiAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{127} + return fileDescriptor_6c07b07c062484ab, []int{129} } func (m *PodAntiAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3636,7 +3692,7 @@ var xxx_messageInfo_PodAntiAffinity proto.InternalMessageInfo func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} } func (*PodAttachOptions) ProtoMessage() {} func (*PodAttachOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{128} + return fileDescriptor_6c07b07c062484ab, []int{130} } func (m *PodAttachOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3664,7 +3720,7 @@ var xxx_messageInfo_PodAttachOptions proto.InternalMessageInfo func (m *PodCondition) Reset() { *m = PodCondition{} } func (*PodCondition) ProtoMessage() {} func (*PodCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{129} + return fileDescriptor_6c07b07c062484ab, []int{131} } func (m *PodCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3692,7 +3748,7 @@ var xxx_messageInfo_PodCondition proto.InternalMessageInfo func (m *PodDNSConfig) Reset() { *m = PodDNSConfig{} } func (*PodDNSConfig) ProtoMessage() {} func (*PodDNSConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{130} + return fileDescriptor_6c07b07c062484ab, []int{132} } func (m *PodDNSConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3720,7 +3776,7 @@ var xxx_messageInfo_PodDNSConfig proto.InternalMessageInfo func (m *PodDNSConfigOption) Reset() { *m = PodDNSConfigOption{} } func (*PodDNSConfigOption) ProtoMessage() {} func (*PodDNSConfigOption) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{131} + return fileDescriptor_6c07b07c062484ab, []int{133} } func (m *PodDNSConfigOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3748,7 +3804,7 @@ var xxx_messageInfo_PodDNSConfigOption proto.InternalMessageInfo func (m *PodExecOptions) Reset() { *m = PodExecOptions{} } func (*PodExecOptions) ProtoMessage() {} func (*PodExecOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{132} + return fileDescriptor_6c07b07c062484ab, []int{134} } func (m *PodExecOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3776,7 +3832,7 @@ var xxx_messageInfo_PodExecOptions proto.InternalMessageInfo func (m *PodIP) Reset() { *m = PodIP{} } func (*PodIP) ProtoMessage() {} func (*PodIP) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{133} + return fileDescriptor_6c07b07c062484ab, []int{135} } func (m *PodIP) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3804,7 +3860,7 @@ var xxx_messageInfo_PodIP proto.InternalMessageInfo func (m *PodList) Reset() { *m = PodList{} } func (*PodList) ProtoMessage() {} func (*PodList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{134} + return fileDescriptor_6c07b07c062484ab, []int{136} } func (m *PodList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3832,7 +3888,7 @@ var xxx_messageInfo_PodList proto.InternalMessageInfo func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } func (*PodLogOptions) ProtoMessage() {} func (*PodLogOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{135} + return fileDescriptor_6c07b07c062484ab, []int{137} } func (m *PodLogOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3860,7 +3916,7 @@ var xxx_messageInfo_PodLogOptions proto.InternalMessageInfo func (m *PodOS) Reset() { *m = PodOS{} } func (*PodOS) ProtoMessage() {} func (*PodOS) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{136} + return fileDescriptor_6c07b07c062484ab, []int{138} } func (m *PodOS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3888,7 +3944,7 @@ var xxx_messageInfo_PodOS proto.InternalMessageInfo func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } func (*PodPortForwardOptions) ProtoMessage() {} func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{137} + return fileDescriptor_6c07b07c062484ab, []int{139} } func (m *PodPortForwardOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3916,7 +3972,7 @@ var xxx_messageInfo_PodPortForwardOptions proto.InternalMessageInfo func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} func (*PodProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{138} + return fileDescriptor_6c07b07c062484ab, []int{140} } func (m *PodProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3944,7 +4000,7 @@ var xxx_messageInfo_PodProxyOptions proto.InternalMessageInfo func (m *PodReadinessGate) Reset() { *m = PodReadinessGate{} } func (*PodReadinessGate) ProtoMessage() {} func (*PodReadinessGate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{139} + return fileDescriptor_6c07b07c062484ab, []int{141} } func (m *PodReadinessGate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3972,7 +4028,7 @@ var xxx_messageInfo_PodReadinessGate proto.InternalMessageInfo func (m *PodResourceClaim) Reset() { *m = PodResourceClaim{} } func (*PodResourceClaim) ProtoMessage() {} func (*PodResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{140} + return fileDescriptor_6c07b07c062484ab, []int{142} } func (m *PodResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4000,7 +4056,7 @@ var xxx_messageInfo_PodResourceClaim proto.InternalMessageInfo func (m *PodResourceClaimStatus) Reset() { *m = PodResourceClaimStatus{} } func (*PodResourceClaimStatus) ProtoMessage() {} func (*PodResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{141} + return fileDescriptor_6c07b07c062484ab, []int{143} } func (m *PodResourceClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4028,7 +4084,7 @@ var xxx_messageInfo_PodResourceClaimStatus proto.InternalMessageInfo func (m *PodSchedulingGate) Reset() { *m = PodSchedulingGate{} } func (*PodSchedulingGate) ProtoMessage() {} func (*PodSchedulingGate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{142} + return fileDescriptor_6c07b07c062484ab, []int{144} } func (m *PodSchedulingGate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4056,7 +4112,7 @@ var xxx_messageInfo_PodSchedulingGate proto.InternalMessageInfo func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } func (*PodSecurityContext) ProtoMessage() {} func (*PodSecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{143} + return fileDescriptor_6c07b07c062484ab, []int{145} } func (m *PodSecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4084,7 +4140,7 @@ var xxx_messageInfo_PodSecurityContext proto.InternalMessageInfo func (m *PodSignature) Reset() { *m = PodSignature{} } func (*PodSignature) ProtoMessage() {} func (*PodSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{144} + return fileDescriptor_6c07b07c062484ab, []int{146} } func (m *PodSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4112,7 +4168,7 @@ var xxx_messageInfo_PodSignature proto.InternalMessageInfo func (m *PodSpec) Reset() { *m = PodSpec{} } func (*PodSpec) ProtoMessage() {} func (*PodSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{145} + return fileDescriptor_6c07b07c062484ab, []int{147} } func (m *PodSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4140,7 +4196,7 @@ var xxx_messageInfo_PodSpec proto.InternalMessageInfo func (m *PodStatus) Reset() { *m = PodStatus{} } func (*PodStatus) ProtoMessage() {} func (*PodStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{146} + return fileDescriptor_6c07b07c062484ab, []int{148} } func (m *PodStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4168,7 +4224,7 @@ var xxx_messageInfo_PodStatus proto.InternalMessageInfo func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } func (*PodStatusResult) ProtoMessage() {} func (*PodStatusResult) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{147} + return fileDescriptor_6c07b07c062484ab, []int{149} } func (m *PodStatusResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4196,7 +4252,7 @@ var xxx_messageInfo_PodStatusResult proto.InternalMessageInfo func (m *PodTemplate) Reset() { *m = PodTemplate{} } func (*PodTemplate) ProtoMessage() {} func (*PodTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{148} + return fileDescriptor_6c07b07c062484ab, []int{150} } func (m *PodTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4224,7 +4280,7 @@ var xxx_messageInfo_PodTemplate proto.InternalMessageInfo func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } func (*PodTemplateList) ProtoMessage() {} func (*PodTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{149} + return fileDescriptor_6c07b07c062484ab, []int{151} } func (m *PodTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4252,7 +4308,7 @@ var xxx_messageInfo_PodTemplateList proto.InternalMessageInfo func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } func (*PodTemplateSpec) ProtoMessage() {} func (*PodTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{150} + return fileDescriptor_6c07b07c062484ab, []int{152} } func (m *PodTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4280,7 +4336,7 @@ var xxx_messageInfo_PodTemplateSpec proto.InternalMessageInfo func (m *PortStatus) Reset() { *m = PortStatus{} } func (*PortStatus) ProtoMessage() {} func (*PortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{151} + return fileDescriptor_6c07b07c062484ab, []int{153} } func (m *PortStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4308,7 +4364,7 @@ var xxx_messageInfo_PortStatus proto.InternalMessageInfo func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} } func (*PortworxVolumeSource) ProtoMessage() {} func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{152} + return fileDescriptor_6c07b07c062484ab, []int{154} } func (m *PortworxVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4336,7 +4392,7 @@ var xxx_messageInfo_PortworxVolumeSource proto.InternalMessageInfo func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} func (*Preconditions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{153} + return fileDescriptor_6c07b07c062484ab, []int{155} } func (m *Preconditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4364,7 +4420,7 @@ var xxx_messageInfo_Preconditions proto.InternalMessageInfo func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } func (*PreferAvoidPodsEntry) ProtoMessage() {} func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{154} + return fileDescriptor_6c07b07c062484ab, []int{156} } func (m *PreferAvoidPodsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4392,7 +4448,7 @@ var xxx_messageInfo_PreferAvoidPodsEntry proto.InternalMessageInfo func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } func (*PreferredSchedulingTerm) ProtoMessage() {} func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{155} + return fileDescriptor_6c07b07c062484ab, []int{157} } func (m *PreferredSchedulingTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4420,7 +4476,7 @@ var xxx_messageInfo_PreferredSchedulingTerm proto.InternalMessageInfo func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} func (*Probe) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{156} + return fileDescriptor_6c07b07c062484ab, []int{158} } func (m *Probe) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4448,7 +4504,7 @@ var xxx_messageInfo_Probe proto.InternalMessageInfo func (m *ProbeHandler) Reset() { *m = ProbeHandler{} } func (*ProbeHandler) ProtoMessage() {} func (*ProbeHandler) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{157} + return fileDescriptor_6c07b07c062484ab, []int{159} } func (m *ProbeHandler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4476,7 +4532,7 @@ var xxx_messageInfo_ProbeHandler proto.InternalMessageInfo func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } func (*ProjectedVolumeSource) ProtoMessage() {} func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{158} + return fileDescriptor_6c07b07c062484ab, []int{160} } func (m *ProjectedVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4504,7 +4560,7 @@ var xxx_messageInfo_ProjectedVolumeSource proto.InternalMessageInfo func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{159} + return fileDescriptor_6c07b07c062484ab, []int{161} } func (m *QuobyteVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4532,7 +4588,7 @@ var xxx_messageInfo_QuobyteVolumeSource proto.InternalMessageInfo func (m *RBDPersistentVolumeSource) Reset() { *m = RBDPersistentVolumeSource{} } func (*RBDPersistentVolumeSource) ProtoMessage() {} func (*RBDPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{160} + return fileDescriptor_6c07b07c062484ab, []int{162} } func (m *RBDPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4560,7 +4616,7 @@ var xxx_messageInfo_RBDPersistentVolumeSource proto.InternalMessageInfo func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } func (*RBDVolumeSource) ProtoMessage() {} func (*RBDVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{161} + return fileDescriptor_6c07b07c062484ab, []int{163} } func (m *RBDVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4588,7 +4644,7 @@ var xxx_messageInfo_RBDVolumeSource proto.InternalMessageInfo func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} func (*RangeAllocation) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{162} + return fileDescriptor_6c07b07c062484ab, []int{164} } func (m *RangeAllocation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4616,7 +4672,7 @@ var xxx_messageInfo_RangeAllocation proto.InternalMessageInfo func (m *ReplicationController) Reset() { *m = ReplicationController{} } func (*ReplicationController) ProtoMessage() {} func (*ReplicationController) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{163} + return fileDescriptor_6c07b07c062484ab, []int{165} } func (m *ReplicationController) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4644,7 +4700,7 @@ var xxx_messageInfo_ReplicationController proto.InternalMessageInfo func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } func (*ReplicationControllerCondition) ProtoMessage() {} func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{164} + return fileDescriptor_6c07b07c062484ab, []int{166} } func (m *ReplicationControllerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4672,7 +4728,7 @@ var xxx_messageInfo_ReplicationControllerCondition proto.InternalMessageInfo func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } func (*ReplicationControllerList) ProtoMessage() {} func (*ReplicationControllerList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{165} + return fileDescriptor_6c07b07c062484ab, []int{167} } func (m *ReplicationControllerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4700,7 +4756,7 @@ var xxx_messageInfo_ReplicationControllerList proto.InternalMessageInfo func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } func (*ReplicationControllerSpec) ProtoMessage() {} func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{166} + return fileDescriptor_6c07b07c062484ab, []int{168} } func (m *ReplicationControllerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4728,7 +4784,7 @@ var xxx_messageInfo_ReplicationControllerSpec proto.InternalMessageInfo func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } func (*ReplicationControllerStatus) ProtoMessage() {} func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{167} + return fileDescriptor_6c07b07c062484ab, []int{169} } func (m *ReplicationControllerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4756,7 +4812,7 @@ var xxx_messageInfo_ReplicationControllerStatus proto.InternalMessageInfo func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{168} + return fileDescriptor_6c07b07c062484ab, []int{170} } func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4784,7 +4840,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } func (*ResourceFieldSelector) ProtoMessage() {} func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{169} + return fileDescriptor_6c07b07c062484ab, []int{171} } func (m *ResourceFieldSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4812,7 +4868,7 @@ var xxx_messageInfo_ResourceFieldSelector proto.InternalMessageInfo func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} func (*ResourceQuota) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{170} + return fileDescriptor_6c07b07c062484ab, []int{172} } func (m *ResourceQuota) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4840,7 +4896,7 @@ var xxx_messageInfo_ResourceQuota proto.InternalMessageInfo func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } func (*ResourceQuotaList) ProtoMessage() {} func (*ResourceQuotaList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{171} + return fileDescriptor_6c07b07c062484ab, []int{173} } func (m *ResourceQuotaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4868,7 +4924,7 @@ var xxx_messageInfo_ResourceQuotaList proto.InternalMessageInfo func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } func (*ResourceQuotaSpec) ProtoMessage() {} func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{172} + return fileDescriptor_6c07b07c062484ab, []int{174} } func (m *ResourceQuotaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4896,7 +4952,7 @@ var xxx_messageInfo_ResourceQuotaSpec proto.InternalMessageInfo func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } func (*ResourceQuotaStatus) ProtoMessage() {} func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{173} + return fileDescriptor_6c07b07c062484ab, []int{175} } func (m *ResourceQuotaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4924,7 +4980,7 @@ var xxx_messageInfo_ResourceQuotaStatus proto.InternalMessageInfo func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } func (*ResourceRequirements) ProtoMessage() {} func (*ResourceRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{174} + return fileDescriptor_6c07b07c062484ab, []int{176} } func (m *ResourceRequirements) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4952,7 +5008,7 @@ var xxx_messageInfo_ResourceRequirements proto.InternalMessageInfo func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } func (*SELinuxOptions) ProtoMessage() {} func (*SELinuxOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{175} + return fileDescriptor_6c07b07c062484ab, []int{177} } func (m *SELinuxOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4980,7 +5036,7 @@ var xxx_messageInfo_SELinuxOptions proto.InternalMessageInfo func (m *ScaleIOPersistentVolumeSource) Reset() { *m = ScaleIOPersistentVolumeSource{} } func (*ScaleIOPersistentVolumeSource) ProtoMessage() {} func (*ScaleIOPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{176} + return fileDescriptor_6c07b07c062484ab, []int{178} } func (m *ScaleIOPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5008,7 +5064,7 @@ var xxx_messageInfo_ScaleIOPersistentVolumeSource proto.InternalMessageInfo func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} } func (*ScaleIOVolumeSource) ProtoMessage() {} func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{177} + return fileDescriptor_6c07b07c062484ab, []int{179} } func (m *ScaleIOVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5036,7 +5092,7 @@ var xxx_messageInfo_ScaleIOVolumeSource proto.InternalMessageInfo func (m *ScopeSelector) Reset() { *m = ScopeSelector{} } func (*ScopeSelector) ProtoMessage() {} func (*ScopeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{178} + return fileDescriptor_6c07b07c062484ab, []int{180} } func (m *ScopeSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5064,7 +5120,7 @@ var xxx_messageInfo_ScopeSelector proto.InternalMessageInfo func (m *ScopedResourceSelectorRequirement) Reset() { *m = ScopedResourceSelectorRequirement{} } func (*ScopedResourceSelectorRequirement) ProtoMessage() {} func (*ScopedResourceSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{179} + return fileDescriptor_6c07b07c062484ab, []int{181} } func (m *ScopedResourceSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5092,7 +5148,7 @@ var xxx_messageInfo_ScopedResourceSelectorRequirement proto.InternalMessageInfo func (m *SeccompProfile) Reset() { *m = SeccompProfile{} } func (*SeccompProfile) ProtoMessage() {} func (*SeccompProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{180} + return fileDescriptor_6c07b07c062484ab, []int{182} } func (m *SeccompProfile) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5120,7 +5176,7 @@ var xxx_messageInfo_SeccompProfile proto.InternalMessageInfo func (m *Secret) Reset() { *m = Secret{} } func (*Secret) ProtoMessage() {} func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{181} + return fileDescriptor_6c07b07c062484ab, []int{183} } func (m *Secret) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5148,7 +5204,7 @@ var xxx_messageInfo_Secret proto.InternalMessageInfo func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } func (*SecretEnvSource) ProtoMessage() {} func (*SecretEnvSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{182} + return fileDescriptor_6c07b07c062484ab, []int{184} } func (m *SecretEnvSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5176,7 +5232,7 @@ var xxx_messageInfo_SecretEnvSource proto.InternalMessageInfo func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } func (*SecretKeySelector) ProtoMessage() {} func (*SecretKeySelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{183} + return fileDescriptor_6c07b07c062484ab, []int{185} } func (m *SecretKeySelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5204,7 +5260,7 @@ var xxx_messageInfo_SecretKeySelector proto.InternalMessageInfo func (m *SecretList) Reset() { *m = SecretList{} } func (*SecretList) ProtoMessage() {} func (*SecretList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{184} + return fileDescriptor_6c07b07c062484ab, []int{186} } func (m *SecretList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5232,7 +5288,7 @@ var xxx_messageInfo_SecretList proto.InternalMessageInfo func (m *SecretProjection) Reset() { *m = SecretProjection{} } func (*SecretProjection) ProtoMessage() {} func (*SecretProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{185} + return fileDescriptor_6c07b07c062484ab, []int{187} } func (m *SecretProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5260,7 +5316,7 @@ var xxx_messageInfo_SecretProjection proto.InternalMessageInfo func (m *SecretReference) Reset() { *m = SecretReference{} } func (*SecretReference) ProtoMessage() {} func (*SecretReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{186} + return fileDescriptor_6c07b07c062484ab, []int{188} } func (m *SecretReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5288,7 +5344,7 @@ var xxx_messageInfo_SecretReference proto.InternalMessageInfo func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } func (*SecretVolumeSource) ProtoMessage() {} func (*SecretVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{187} + return fileDescriptor_6c07b07c062484ab, []int{189} } func (m *SecretVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5316,7 +5372,7 @@ var xxx_messageInfo_SecretVolumeSource proto.InternalMessageInfo func (m *SecurityContext) Reset() { *m = SecurityContext{} } func (*SecurityContext) ProtoMessage() {} func (*SecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{188} + return fileDescriptor_6c07b07c062484ab, []int{190} } func (m *SecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5344,7 +5400,7 @@ var xxx_messageInfo_SecurityContext proto.InternalMessageInfo func (m *SerializedReference) Reset() { *m = SerializedReference{} } func (*SerializedReference) ProtoMessage() {} func (*SerializedReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{189} + return fileDescriptor_6c07b07c062484ab, []int{191} } func (m *SerializedReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5372,7 +5428,7 @@ var xxx_messageInfo_SerializedReference proto.InternalMessageInfo func (m *Service) Reset() { *m = Service{} } func (*Service) ProtoMessage() {} func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{190} + return fileDescriptor_6c07b07c062484ab, []int{192} } func (m *Service) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5400,7 +5456,7 @@ var xxx_messageInfo_Service proto.InternalMessageInfo func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } func (*ServiceAccount) ProtoMessage() {} func (*ServiceAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{191} + return fileDescriptor_6c07b07c062484ab, []int{193} } func (m *ServiceAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5428,7 +5484,7 @@ var xxx_messageInfo_ServiceAccount proto.InternalMessageInfo func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } func (*ServiceAccountList) ProtoMessage() {} func (*ServiceAccountList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{192} + return fileDescriptor_6c07b07c062484ab, []int{194} } func (m *ServiceAccountList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5456,7 +5512,7 @@ var xxx_messageInfo_ServiceAccountList proto.InternalMessageInfo func (m *ServiceAccountTokenProjection) Reset() { *m = ServiceAccountTokenProjection{} } func (*ServiceAccountTokenProjection) ProtoMessage() {} func (*ServiceAccountTokenProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{193} + return fileDescriptor_6c07b07c062484ab, []int{195} } func (m *ServiceAccountTokenProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5484,7 +5540,7 @@ var xxx_messageInfo_ServiceAccountTokenProjection proto.InternalMessageInfo func (m *ServiceList) Reset() { *m = ServiceList{} } func (*ServiceList) ProtoMessage() {} func (*ServiceList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{194} + return fileDescriptor_6c07b07c062484ab, []int{196} } func (m *ServiceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5512,7 +5568,7 @@ var xxx_messageInfo_ServiceList proto.InternalMessageInfo func (m *ServicePort) Reset() { *m = ServicePort{} } func (*ServicePort) ProtoMessage() {} func (*ServicePort) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{195} + return fileDescriptor_6c07b07c062484ab, []int{197} } func (m *ServicePort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5540,7 +5596,7 @@ var xxx_messageInfo_ServicePort proto.InternalMessageInfo func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } func (*ServiceProxyOptions) ProtoMessage() {} func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{196} + return fileDescriptor_6c07b07c062484ab, []int{198} } func (m *ServiceProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5568,7 +5624,7 @@ var xxx_messageInfo_ServiceProxyOptions proto.InternalMessageInfo func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } func (*ServiceSpec) ProtoMessage() {} func (*ServiceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{197} + return fileDescriptor_6c07b07c062484ab, []int{199} } func (m *ServiceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5596,7 +5652,7 @@ var xxx_messageInfo_ServiceSpec proto.InternalMessageInfo func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} func (*ServiceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{198} + return fileDescriptor_6c07b07c062484ab, []int{200} } func (m *ServiceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5624,7 +5680,7 @@ var xxx_messageInfo_ServiceStatus proto.InternalMessageInfo func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } func (*SessionAffinityConfig) ProtoMessage() {} func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{199} + return fileDescriptor_6c07b07c062484ab, []int{201} } func (m *SessionAffinityConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5652,7 +5708,7 @@ var xxx_messageInfo_SessionAffinityConfig proto.InternalMessageInfo func (m *SleepAction) Reset() { *m = SleepAction{} } func (*SleepAction) ProtoMessage() {} func (*SleepAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{200} + return fileDescriptor_6c07b07c062484ab, []int{202} } func (m *SleepAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5680,7 +5736,7 @@ var xxx_messageInfo_SleepAction proto.InternalMessageInfo func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} } func (*StorageOSPersistentVolumeSource) ProtoMessage() {} func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{201} + return fileDescriptor_6c07b07c062484ab, []int{203} } func (m *StorageOSPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5708,7 +5764,7 @@ var xxx_messageInfo_StorageOSPersistentVolumeSource proto.InternalMessageInfo func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } func (*StorageOSVolumeSource) ProtoMessage() {} func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{202} + return fileDescriptor_6c07b07c062484ab, []int{204} } func (m *StorageOSVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5736,7 +5792,7 @@ var xxx_messageInfo_StorageOSVolumeSource proto.InternalMessageInfo func (m *Sysctl) Reset() { *m = Sysctl{} } func (*Sysctl) ProtoMessage() {} func (*Sysctl) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{203} + return fileDescriptor_6c07b07c062484ab, []int{205} } func (m *Sysctl) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5764,7 +5820,7 @@ var xxx_messageInfo_Sysctl proto.InternalMessageInfo func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } func (*TCPSocketAction) ProtoMessage() {} func (*TCPSocketAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{204} + return fileDescriptor_6c07b07c062484ab, []int{206} } func (m *TCPSocketAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5792,7 +5848,7 @@ var xxx_messageInfo_TCPSocketAction proto.InternalMessageInfo func (m *Taint) Reset() { *m = Taint{} } func (*Taint) ProtoMessage() {} func (*Taint) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{205} + return fileDescriptor_6c07b07c062484ab, []int{207} } func (m *Taint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5820,7 +5876,7 @@ var xxx_messageInfo_Taint proto.InternalMessageInfo func (m *Toleration) Reset() { *m = Toleration{} } func (*Toleration) ProtoMessage() {} func (*Toleration) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{206} + return fileDescriptor_6c07b07c062484ab, []int{208} } func (m *Toleration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5848,7 +5904,7 @@ var xxx_messageInfo_Toleration proto.InternalMessageInfo func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelectorLabelRequirement{} } func (*TopologySelectorLabelRequirement) ProtoMessage() {} func (*TopologySelectorLabelRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{207} + return fileDescriptor_6c07b07c062484ab, []int{209} } func (m *TopologySelectorLabelRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5876,7 +5932,7 @@ var xxx_messageInfo_TopologySelectorLabelRequirement proto.InternalMessageInfo func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} } func (*TopologySelectorTerm) ProtoMessage() {} func (*TopologySelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{208} + return fileDescriptor_6c07b07c062484ab, []int{210} } func (m *TopologySelectorTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5904,7 +5960,7 @@ var xxx_messageInfo_TopologySelectorTerm proto.InternalMessageInfo func (m *TopologySpreadConstraint) Reset() { *m = TopologySpreadConstraint{} } func (*TopologySpreadConstraint) ProtoMessage() {} func (*TopologySpreadConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{209} + return fileDescriptor_6c07b07c062484ab, []int{211} } func (m *TopologySpreadConstraint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5932,7 +5988,7 @@ var xxx_messageInfo_TopologySpreadConstraint proto.InternalMessageInfo func (m *TypedLocalObjectReference) Reset() { *m = TypedLocalObjectReference{} } func (*TypedLocalObjectReference) ProtoMessage() {} func (*TypedLocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{210} + return fileDescriptor_6c07b07c062484ab, []int{212} } func (m *TypedLocalObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5960,7 +6016,7 @@ var xxx_messageInfo_TypedLocalObjectReference proto.InternalMessageInfo func (m *TypedObjectReference) Reset() { *m = TypedObjectReference{} } func (*TypedObjectReference) ProtoMessage() {} func (*TypedObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{211} + return fileDescriptor_6c07b07c062484ab, []int{213} } func (m *TypedObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5988,7 +6044,7 @@ var xxx_messageInfo_TypedObjectReference proto.InternalMessageInfo func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{212} + return fileDescriptor_6c07b07c062484ab, []int{214} } func (m *Volume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6016,7 +6072,7 @@ var xxx_messageInfo_Volume proto.InternalMessageInfo func (m *VolumeDevice) Reset() { *m = VolumeDevice{} } func (*VolumeDevice) ProtoMessage() {} func (*VolumeDevice) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{213} + return fileDescriptor_6c07b07c062484ab, []int{215} } func (m *VolumeDevice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6044,7 +6100,7 @@ var xxx_messageInfo_VolumeDevice proto.InternalMessageInfo func (m *VolumeMount) Reset() { *m = VolumeMount{} } func (*VolumeMount) ProtoMessage() {} func (*VolumeMount) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{214} + return fileDescriptor_6c07b07c062484ab, []int{216} } func (m *VolumeMount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6069,10 +6125,38 @@ func (m *VolumeMount) XXX_DiscardUnknown() { var xxx_messageInfo_VolumeMount proto.InternalMessageInfo +func (m *VolumeMountStatus) Reset() { *m = VolumeMountStatus{} } +func (*VolumeMountStatus) ProtoMessage() {} +func (*VolumeMountStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_6c07b07c062484ab, []int{217} +} +func (m *VolumeMountStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VolumeMountStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *VolumeMountStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_VolumeMountStatus.Merge(m, src) +} +func (m *VolumeMountStatus) XXX_Size() int { + return m.Size() +} +func (m *VolumeMountStatus) XXX_DiscardUnknown() { + xxx_messageInfo_VolumeMountStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_VolumeMountStatus proto.InternalMessageInfo + func (m *VolumeNodeAffinity) Reset() { *m = VolumeNodeAffinity{} } func (*VolumeNodeAffinity) ProtoMessage() {} func (*VolumeNodeAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{215} + return fileDescriptor_6c07b07c062484ab, []int{218} } func (m *VolumeNodeAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6100,7 +6184,7 @@ var xxx_messageInfo_VolumeNodeAffinity proto.InternalMessageInfo func (m *VolumeProjection) Reset() { *m = VolumeProjection{} } func (*VolumeProjection) ProtoMessage() {} func (*VolumeProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{216} + return fileDescriptor_6c07b07c062484ab, []int{219} } func (m *VolumeProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6128,7 +6212,7 @@ var xxx_messageInfo_VolumeProjection proto.InternalMessageInfo func (m *VolumeResourceRequirements) Reset() { *m = VolumeResourceRequirements{} } func (*VolumeResourceRequirements) ProtoMessage() {} func (*VolumeResourceRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{217} + return fileDescriptor_6c07b07c062484ab, []int{220} } func (m *VolumeResourceRequirements) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6156,7 +6240,7 @@ var xxx_messageInfo_VolumeResourceRequirements proto.InternalMessageInfo func (m *VolumeSource) Reset() { *m = VolumeSource{} } func (*VolumeSource) ProtoMessage() {} func (*VolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{218} + return fileDescriptor_6c07b07c062484ab, []int{221} } func (m *VolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6184,7 +6268,7 @@ var xxx_messageInfo_VolumeSource proto.InternalMessageInfo func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{219} + return fileDescriptor_6c07b07c062484ab, []int{222} } func (m *VsphereVirtualDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6212,7 +6296,7 @@ var xxx_messageInfo_VsphereVirtualDiskVolumeSource proto.InternalMessageInfo func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } func (*WeightedPodAffinityTerm) ProtoMessage() {} func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{220} + return fileDescriptor_6c07b07c062484ab, []int{223} } func (m *WeightedPodAffinityTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6240,7 +6324,7 @@ var xxx_messageInfo_WeightedPodAffinityTerm proto.InternalMessageInfo func (m *WindowsSecurityContextOptions) Reset() { *m = WindowsSecurityContextOptions{} } func (*WindowsSecurityContextOptions) ProtoMessage() {} func (*WindowsSecurityContextOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{221} + return fileDescriptor_6c07b07c062484ab, []int{224} } func (m *WindowsSecurityContextOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6268,6 +6352,7 @@ var xxx_messageInfo_WindowsSecurityContextOptions proto.InternalMessageInfo func init() { proto.RegisterType((*AWSElasticBlockStoreVolumeSource)(nil), "k8s.io.api.core.v1.AWSElasticBlockStoreVolumeSource") proto.RegisterType((*Affinity)(nil), "k8s.io.api.core.v1.Affinity") + proto.RegisterType((*AppArmorProfile)(nil), "k8s.io.api.core.v1.AppArmorProfile") proto.RegisterType((*AttachedVolume)(nil), "k8s.io.api.core.v1.AttachedVolume") proto.RegisterType((*AvoidPods)(nil), "k8s.io.api.core.v1.AvoidPods") proto.RegisterType((*AzureDiskVolumeSource)(nil), "k8s.io.api.core.v1.AzureDiskVolumeSource") @@ -6380,8 +6465,8 @@ func init() { proto.RegisterType((*NodeDaemonEndpoints)(nil), "k8s.io.api.core.v1.NodeDaemonEndpoints") proto.RegisterType((*NodeList)(nil), "k8s.io.api.core.v1.NodeList") proto.RegisterType((*NodeProxyOptions)(nil), "k8s.io.api.core.v1.NodeProxyOptions") - proto.RegisterType((*NodeResources)(nil), "k8s.io.api.core.v1.NodeResources") - proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.NodeResources.CapacityEntry") + proto.RegisterType((*NodeRuntimeHandler)(nil), "k8s.io.api.core.v1.NodeRuntimeHandler") + proto.RegisterType((*NodeRuntimeHandlerFeatures)(nil), "k8s.io.api.core.v1.NodeRuntimeHandlerFeatures") proto.RegisterType((*NodeSelector)(nil), "k8s.io.api.core.v1.NodeSelector") proto.RegisterType((*NodeSelectorRequirement)(nil), "k8s.io.api.core.v1.NodeSelectorRequirement") proto.RegisterType((*NodeSelectorTerm)(nil), "k8s.io.api.core.v1.NodeSelectorTerm") @@ -6511,6 +6596,7 @@ func init() { proto.RegisterType((*Volume)(nil), "k8s.io.api.core.v1.Volume") proto.RegisterType((*VolumeDevice)(nil), "k8s.io.api.core.v1.VolumeDevice") proto.RegisterType((*VolumeMount)(nil), "k8s.io.api.core.v1.VolumeMount") + proto.RegisterType((*VolumeMountStatus)(nil), "k8s.io.api.core.v1.VolumeMountStatus") proto.RegisterType((*VolumeNodeAffinity)(nil), "k8s.io.api.core.v1.VolumeNodeAffinity") proto.RegisterType((*VolumeProjection)(nil), "k8s.io.api.core.v1.VolumeProjection") proto.RegisterType((*VolumeResourceRequirements)(nil), "k8s.io.api.core.v1.VolumeResourceRequirements") @@ -6523,978 +6609,993 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/core/v1/generated.proto", fileDescriptor_83c10c24ec417dc9) -} - -var fileDescriptor_83c10c24ec417dc9 = []byte{ - // 15465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x69, 0x90, 0x1c, 0xc9, - 0x75, 0x18, 0xcc, 0xea, 0x9e, 0xab, 0xdf, 0xdc, 0x39, 0x00, 0x76, 0x30, 0x0b, 0xa0, 0xb1, 0xb5, - 0xbb, 0x58, 0xec, 0x35, 0x20, 0xf6, 0x20, 0x97, 0xbb, 0xcb, 0x15, 0xe7, 0x04, 0x66, 0x31, 0x33, - 0xe8, 0xcd, 0x1e, 0x00, 0xe4, 0x72, 0xc9, 0x8f, 0x85, 0xee, 0x9c, 0x99, 0xe2, 0x74, 0x57, 0xf5, - 0x56, 0x55, 0x0f, 0x30, 0xf8, 0xc8, 0x90, 0x44, 0x7d, 0xa2, 0x44, 0x4a, 0x5f, 0x04, 0xe3, 0x0b, - 0x7d, 0x47, 0x50, 0x0a, 0xc5, 0x17, 0x92, 0xac, 0xc3, 0xb4, 0x64, 0xd3, 0x94, 0x25, 0x59, 0xd4, - 0xe5, 0x2b, 0x2c, 0x29, 0x1c, 0xb2, 0xac, 0x08, 0x8b, 0x0a, 0x2b, 0x3c, 0x32, 0x21, 0x47, 0x28, - 0xf4, 0xc3, 0x92, 0x7c, 0xfc, 0xb0, 0x61, 0xd9, 0x72, 0xe4, 0x59, 0x99, 0x75, 0x74, 0xf7, 0x60, - 0x07, 0xc3, 0x25, 0x63, 0xff, 0x75, 0xbf, 0xf7, 0xf2, 0x65, 0x56, 0x9e, 0x2f, 0xdf, 0x7b, 0xf9, - 0x1e, 0xbc, 0xb2, 0xf3, 0x52, 0x38, 0xeb, 0xfa, 0x17, 0x76, 0xda, 0x37, 0x49, 0xe0, 0x91, 0x88, - 0x84, 0x17, 0x76, 0x89, 0x57, 0xf7, 0x83, 0x0b, 0x02, 0xe1, 0xb4, 0xdc, 0x0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0xb5, - 0xbe, 0xfa, 0x18, 0x27, 0xc8, 0x58, 0x5b, 0xe7, 0xb5, 0xa5, 0xd2, 0xcf, 0x96, 0xca, 0x48, 0xf6, - 0x32, 0x41, 0x17, 0xa1, 0x6f, 0xc7, 0xf5, 0xea, 0xd3, 0x03, 0x8c, 0xd7, 0x69, 0x3a, 0xe6, 0x57, - 0x5c, 0xaf, 0x7e, 0x6f, 0xbf, 0x3c, 0x69, 0x34, 0x87, 0x02, 0x31, 0x23, 0xb5, 0xff, 0xb3, 0x05, - 0x65, 0x86, 0x5b, 0x76, 0x1b, 0xa4, 0x42, 0x82, 0xd0, 0x0d, 0x23, 0xe2, 0x45, 0x46, 0x87, 0x3e, - 0x07, 0x10, 0x92, 0x5a, 0x40, 0x22, 0xad, 0x4b, 0xd5, 0xc4, 0xa8, 0x2a, 0x0c, 0xd6, 0xa8, 0xe8, - 0x86, 0x10, 0x6e, 0x3b, 0x01, 0x9b, 0x5f, 0xa2, 0x63, 0xd5, 0x86, 0x50, 0x95, 0x08, 0x1c, 0xd3, - 0x18, 0x1b, 0x42, 0xb1, 0xdb, 0x86, 0x80, 0x3e, 0x0c, 0xe3, 0x71, 0x65, 0x61, 0xcb, 0xa9, 0xc9, - 0x0e, 0x64, 0x4b, 0xa6, 0x6a, 0xa2, 0x70, 0x92, 0xd6, 0xfe, 0xdb, 0x96, 0x98, 0x3c, 0xf4, 0xab, - 0xdf, 0xe5, 0xdf, 0x6a, 0xff, 0x8a, 0x05, 0x83, 0xf3, 0xae, 0x57, 0x77, 0xbd, 0x2d, 0xf4, 0x29, - 0x18, 0xa2, 0x67, 0x53, 0xdd, 0x89, 0x1c, 0xb1, 0xef, 0xbd, 0x5f, 0x5b, 0x5b, 0xea, 0xa8, 0x98, - 0x6d, 0xed, 0x6c, 0x51, 0x40, 0x38, 0x4b, 0xa9, 0xe9, 0x6a, 0xbb, 0x7a, 0xf3, 0xd3, 0xa4, 0x16, + proto.RegisterFile("k8s.io/api/core/v1/generated.proto", fileDescriptor_6c07b07c062484ab) +} + +var fileDescriptor_6c07b07c062484ab = []byte{ + // 15708 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x59, 0x8c, 0x1c, 0xd9, + 0x75, 0x20, 0xaa, 0xc8, 0xac, 0xf5, 0xd4, 0x7e, 0x8b, 0x64, 0x17, 0xab, 0x49, 0x26, 0x3b, 0xba, + 0x9b, 0xcd, 0xde, 0x8a, 0x62, 0x2f, 0xea, 0x56, 0x77, 0xab, 0xad, 0x5a, 0xc9, 0x6c, 0x56, 0x15, + 0xb3, 0x6f, 0x16, 0x49, 0xa9, 0xd5, 0x92, 0x15, 0xcc, 0xbc, 0x55, 0x15, 0xaa, 0xcc, 0x88, 0xec, + 0x88, 0xc8, 0x22, 0x8b, 0x4f, 0x86, 0x6d, 0xf9, 0x59, 0xb6, 0x64, 0x3f, 0x40, 0x78, 0xf0, 0x5b, + 0x20, 0x1b, 0xc6, 0x83, 0x9f, 0x9f, 0x97, 0xa7, 0x67, 0xbf, 0xd1, 0xc8, 0xe3, 0x4d, 0xde, 0xc6, + 0x33, 0x03, 0xd8, 0x83, 0x81, 0xc7, 0x63, 0xc0, 0x96, 0x31, 0xc6, 0x94, 0x47, 0xf4, 0x00, 0x86, + 0x3f, 0xc6, 0x36, 0x3c, 0xf3, 0x31, 0x53, 0xf0, 0x8c, 0x07, 0x77, 0x8d, 0x7b, 0x63, 0xc9, 0xcc, + 0x62, 0x93, 0xa5, 0x96, 0xd0, 0x7f, 0x99, 0xe7, 0x9c, 0x7b, 0xee, 0x8d, 0xbb, 0x9e, 0x7b, 0xce, + 0xb9, 0xe7, 0x80, 0xbd, 0xf3, 0x72, 0x38, 0xe7, 0xfa, 0x17, 0x9c, 0x96, 0x7b, 0xa1, 0xe6, 0x07, + 0xe4, 0xc2, 0xee, 0xc5, 0x0b, 0x5b, 0xc4, 0x23, 0x81, 0x13,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xe8, 0x78, 0xec, - 0xc5, 0x87, 0x68, 0x31, 0xf7, 0x10, 0xfd, 0xee, 0x8c, 0x25, 0xdb, 0xc7, 0x96, 0xec, 0x87, 0x72, - 0x96, 0xec, 0x21, 0x2f, 0xd4, 0xdd, 0x9c, 0x59, 0xdb, 0xcf, 0x06, 0x30, 0x53, 0x42, 0x5a, 0xf5, - 0x6b, 0x4e, 0x23, 0xb9, 0xd5, 0x1e, 0x70, 0xea, 0x1e, 0xce, 0x38, 0xd6, 0x60, 0x64, 0xc1, 0x69, - 0x39, 0x37, 0xdd, 0x86, 0x1b, 0xb9, 0x24, 0x44, 0x4f, 0x40, 0xd1, 0xa9, 0xd7, 0x99, 0x74, 0x57, - 0x9a, 0x3f, 0x7e, 0x77, 0xbf, 0x5c, 0x9c, 0xab, 0x53, 0x31, 0x03, 0x14, 0xd5, 0x1e, 0xa6, 0x14, - 0xe8, 0x29, 0xe8, 0xab, 0x07, 0x7e, 0x6b, 0xba, 0xc0, 0x28, 0xe9, 0x2a, 0xef, 0x5b, 0x0c, 0xfc, - 0x56, 0x82, 0x94, 0xd1, 0xd8, 0xbf, 0x55, 0x80, 0x53, 0x0b, 0xa4, 0xb5, 0xbd, 0x5c, 0xcd, 0x39, - 0x2f, 0xce, 0xc3, 0x50, 0xd3, 0xf7, 0xdc, 0xc8, 0x0f, 0x42, 0x51, 0x35, 0x9b, 0x11, 0x6b, 0x02, - 0x86, 0x15, 0x16, 0x9d, 0x85, 0xbe, 0x56, 0x2c, 0xc4, 0x8e, 0x48, 0x01, 0x98, 0x89, 0xaf, 0x0c, - 0x43, 0x29, 0xda, 0x21, 0x09, 0xc4, 0x8c, 0x51, 0x14, 0xd7, 0x42, 0x12, 0x60, 0x86, 0x89, 0x25, - 0x01, 0x2a, 0x23, 0x88, 0x13, 0x21, 0x21, 0x09, 0x50, 0x0c, 0xd6, 0xa8, 0x50, 0x05, 0x4a, 0x61, - 0x62, 0x64, 0x7b, 0x5a, 0x9a, 0xa3, 0x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x97, 0x3b, 0xba, 0x0a, 0xe3, 0x6c, 0xe7, 0xac, 0xb4, 0x1b, 0x0d, 0x51, 0xe1, 0x18, - 0xab, 0xf0, 0x71, 0x29, 0x47, 0xac, 0x98, 0xe8, 0x7b, 0xfb, 0x65, 0x88, 0xff, 0xe1, 0x64, 0x69, - 0x74, 0x93, 0x99, 0x8d, 0xdb, 0x81, 0x1b, 0xed, 0xd1, 0x55, 0x45, 0x6e, 0x47, 0xd3, 0xe3, 0x1d, - 0x55, 0x68, 0x3a, 0xa9, 0xb2, 0x2d, 0xeb, 0x40, 0x9c, 0x64, 0x48, 0x8f, 0x82, 0x30, 0xaa, 0xbb, - 0xde, 0xf4, 0x04, 0xbf, 0x4f, 0xc9, 0x9d, 0xb4, 0x4a, 0x81, 0x98, 0xe3, 0x98, 0xc9, 0x98, 0xfe, - 0xb8, 0x4a, 0x4f, 0xdc, 0x49, 0x46, 0x18, 0x9b, 0x8c, 0x25, 0x02, 0xc7, 0x34, 0x54, 0x08, 0x8e, - 0xa2, 0xbd, 0x69, 0xc4, 0x48, 0xd5, 0x86, 0xb8, 0xb1, 0xf1, 0x31, 0x4c, 0xe1, 0xf6, 0x4d, 0x18, - 0x53, 0xdb, 0x04, 0xeb, 0x13, 0x54, 0x86, 0x7e, 0x26, 0xf6, 0x09, 0x85, 0x6f, 0x89, 0x36, 0x81, - 0x89, 0x84, 0x98, 0xc3, 0x59, 0x13, 0xdc, 0x3b, 0x64, 0x7e, 0x2f, 0x22, 0x5c, 0x17, 0x51, 0xd4, - 0x9a, 0x20, 0x11, 0x38, 0xa6, 0xb1, 0xff, 0x27, 0x17, 0x9f, 0xe3, 0x53, 0xa2, 0x87, 0x73, 0xf1, - 0x19, 0x18, 0xda, 0xf6, 0xc3, 0x88, 0x52, 0xb3, 0x3a, 0xfa, 0x63, 0x81, 0xf9, 0xb2, 0x80, 0x63, - 0x45, 0x81, 0x5e, 0x81, 0xd1, 0x9a, 0x5e, 0x81, 0x38, 0xd4, 0xd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 0x81, - 0x4d, 0x3a, 0xfb, 0xdf, 0xf7, 0xc1, 0x24, 0x1b, 0xb6, 0xf7, 0x66, 0xd8, 0x77, 0xd2, 0x0c, 0xbb, - 0x96, 0x9e, 0x61, 0x87, 0x21, 0xb9, 0xdf, 0xf7, 0x34, 0xfb, 0x34, 0x94, 0xd4, 0xfb, 0x41, 0xf9, - 0x80, 0xd8, 0xca, 0x79, 0x40, 0xdc, 0xfd, 0xf4, 0x96, 0x2e, 0x69, 0xc5, 0x4c, 0x97, 0xb4, 0xaf, - 0x58, 0x10, 0x1b, 0x16, 0xd0, 0x1b, 0x50, 0x6a, 0xf9, 0xcc, 0xc3, 0x35, 0x90, 0x6e, 0xe3, 0x8f, - 0x75, 0xb4, 0x4c, 0xf0, 0x50, 0x75, 0x01, 0xef, 0x85, 0x8a, 0x2c, 0x8a, 0x63, 0x2e, 0xe8, 0x0a, - 0x0c, 0xb6, 0x02, 0x52, 0x8d, 0x58, 0x1c, 0xa5, 0xde, 0x19, 0xf2, 0x59, 0xc3, 0x0b, 0x62, 0xc9, - 0xc1, 0xfe, 0x85, 0x02, 0x4c, 0x24, 0x49, 0xd1, 0xab, 0xd0, 0x47, 0x6e, 0x93, 0x9a, 0x68, 0x6f, - 0xe6, 0x51, 0x1c, 0xab, 0x26, 0x78, 0x07, 0xd0, 0xff, 0x98, 0x95, 0x42, 0x97, 0x61, 0x90, 0x9e, - 0xc3, 0x97, 0x54, 0xcc, 0xc0, 0x47, 0xf2, 0xce, 0x72, 0x25, 0xd0, 0xf0, 0xc6, 0x09, 0x10, 0x96, - 0xc5, 0x99, 0x1f, 0x58, 0xad, 0x55, 0xa5, 0x57, 0x9c, 0xa8, 0xd3, 0x4d, 0x7c, 0x63, 0xa1, 0xc2, - 0x89, 0x04, 0x37, 0xee, 0x07, 0x26, 0x81, 0x38, 0x66, 0x82, 0x3e, 0x02, 0xfd, 0x61, 0x83, 0x90, - 0x96, 0x30, 0xf4, 0x67, 0x2a, 0x17, 0xab, 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, 0x34, 0x30, 0xe2, 0xc1, 0xdb, 0xf3, 0xc6, - 0x82, 0x2f, 0x27, 0x16, 0xfc, 0xb8, 0x46, 0xaa, 0xad, 0xf4, 0x27, 0x61, 0x50, 0xbc, 0xa0, 0x4a, - 0xbe, 0xe2, 0x16, 0xb4, 0x58, 0xe2, 0xed, 0x1f, 0x2f, 0x82, 0x91, 0x76, 0x06, 0xfd, 0x9a, 0x05, - 0xb3, 0x01, 0xf7, 0xac, 0xae, 0x2f, 0xb6, 0x03, 0xd7, 0xdb, 0xaa, 0xd6, 0xb6, 0x49, 0xbd, 0xdd, - 0x70, 0xbd, 0xad, 0x95, 0x2d, 0xcf, 0x57, 0xe0, 0xa5, 0xdb, 0xa4, 0xd6, 0x66, 0x56, 0xcf, 0x2e, - 0x39, 0x6e, 0xd4, 0x0b, 0x85, 0xe7, 0xee, 0xee, 0x97, 0x67, 0xf1, 0x81, 0x78, 0xe3, 0x03, 0xb6, - 0x05, 0xfd, 0x9e, 0x05, 0x17, 0x78, 0x36, 0x96, 0xde, 0xdb, 0xdf, 0x41, 0x89, 0x50, 0x91, 0xac, - 0x62, 0x26, 0x1b, 0x24, 0x68, 0xce, 0x7f, 0x50, 0x74, 0xe8, 0x85, 0xca, 0xc1, 0xea, 0xc2, 0x07, - 0x6d, 0x9c, 0xfd, 0x8f, 0x8a, 0x30, 0x2a, 0x42, 0xeb, 0x89, 0x33, 0xe0, 0x45, 0x63, 0x4a, 0x3c, - 0x92, 0x98, 0x12, 0x93, 0x06, 0xf1, 0xe1, 0x6c, 0xff, 0x21, 0x4c, 0xd2, 0xcd, 0xf9, 0x32, 0x71, - 0x82, 0xe8, 0x26, 0x71, 0xb8, 0xbf, 0x5d, 0xf1, 0xc0, 0xbb, 0xbf, 0x52, 0xfc, 0xae, 0x26, 0x99, - 0xe1, 0x34, 0xff, 0xef, 0xa4, 0x33, 0xc7, 0x83, 0x89, 0x54, 0x74, 0xc4, 0x37, 0xa1, 0xa4, 0x9e, - 0xff,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0x3f, 0xdc, 0xe7, 0x86, 0x22, 0xd3, 0xd5, 0xe6, 0xaa, 0x28, 0xd6, 0xf9, - 0xa0, 0x0d, 0x3e, 0xdf, 0x59, 0xae, 0x11, 0x12, 0x8a, 0x0c, 0xca, 0xa7, 0xf3, 0x3c, 0xee, 0x18, - 0x99, 0xb9, 0x1c, 0x44, 0x49, 0xac, 0xb3, 0x41, 0x97, 0x60, 0xb2, 0x15, 0xb8, 0x3e, 0x9b, 0x13, - 0xca, 0xd8, 0x3a, 0x6d, 0x66, 0x16, 0xac, 0x24, 0x09, 0x70, 0xba, 0x0c, 0x8b, 0x8d, 0x21, 0x80, - 0xd3, 0x27, 0x79, 0x76, 0x24, 0x7e, 0x95, 0xe6, 0x30, 0xac, 0xb0, 0x68, 0x8d, 0xed, 0xc4, 0x5c, - 0x0b, 0x34, 0x3d, 0x93, 0x1f, 0xba, 0x4c, 0xd7, 0x16, 0x71, 0xe1, 0x55, 0xfd, 0xc5, 0x31, 0x07, - 0x54, 0xd7, 0x92, 0x12, 0xd3, 0x2b, 0x40, 0x38, 0x7d, 0xaa, 0x83, 0xcb, 0x67, 0xe2, 0x56, 0x16, - 0x0b, 0x04, 0x06, 0x38, 0xc4, 0x09, 0x9e, 0xe8, 0x23, 0x30, 0x21, 0xe2, 0xd0, 0xc6, 0xdd, 0x74, - 0x3a, 0x7e, 0x16, 0x83, 0x13, 0x38, 0x9c, 0xa2, 0xe6, 0xd9, 0x89, 0x9c, 0x9b, 0x0d, 0x22, 0xb6, - 0xbe, 0x55, 0xd7, 0xdb, 0x09, 0xa7, 0xcf, 0xb0, 0xfd, 0x41, 0x64, 0x27, 0x4a, 0x62, 0x71, 0x46, - 0x09, 0xb4, 0x01, 0x13, 0xad, 0x80, 0x90, 0x26, 0x13, 0xf4, 0xc5, 0x79, 0x56, 0xe6, 0xa1, 0x61, - 0x68, 0x4b, 0x2a, 0x09, 0xdc, 0xbd, 0x0c, 0x18, 0x4e, 0x71, 0x40, 0xb7, 0x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 0x02, 0xab, 0x0a, 0xbd, 0x04, 0x03, 0x61, 0xcd, 0x6f, 0xa9, 0x37, 0x53, 0x2c, 0xe5, 0x6f, 0x95, - 0x41, 0xee, 0xed, 0x97, 0x91, 0x59, 0x1d, 0x05, 0x63, 0x41, 0x8f, 0xde, 0x84, 0x51, 0xf6, 0x4b, - 0xb9, 0x0d, 0x16, 0xf3, 0x35, 0x18, 0x55, 0x9d, 0x90, 0xfb, 0xd4, 0x1a, 0x20, 0x6c, 0xb2, 0x9a, - 0xd9, 0x82, 0x92, 0xfa, 0xac, 0x07, 0x6a, 0xed, 0xfe, 0x57, 0x45, 0x98, 0xca, 0x98, 0x73, 0x28, - 0x34, 0x46, 0xe2, 0x62, 0x8f, 0x53, 0xf5, 0x1d, 0x8e, 0x45, 0xc8, 0x2e, 0x50, 0x75, 0x31, 0xb7, - 0x7a, 0xae, 0xf4, 0x5a, 0x48, 0x92, 0x95, 0x52, 0x50, 0xf7, 0x4a, 0x69, 0x65, 0x47, 0xd6, 0xd5, - 0xb4, 0x22, 0xd5, 0xd2, 0x07, 0x3a, 0xa6, 0xbf, 0xd1, 0x07, 0xc7, 0xb2, 0xe2, 0x09, 0xa3, 0xcf, - 0x24, 0xf2, 0x88, 0xbf, 0xd0, 0xa9, 0x87, 0xf5, 0x92, 0x3c, 0xb9, 0xb8, 0x08, 0xe3, 0x39, 0x6b, - 0x66, 0x16, 0xef, 0xda, 0xcd, 0xa2, 0x4e, 0x16, 0x5e, 0x27, 0xe0, 0xf9, 0xdf, 0xe5, 0xf6, 0xf1, - 0x81, 0x9e, 0x1b, 0x20, 0x12, 0xc7, 0x87, 0x09, 0x97, 0x24, 0x09, 0xee, 0xee, 0x92, 0x24, 0x6b, - 0x46, 0x2b, 0x30, 0x50, 0xe3, 0xbe, 0x2e, 0xc5, 0xee, 0x5b, 0x18, 0x77, 0x74, 0x51, 0x1b, 0xb0, - 0x70, 0x70, 0x11, 0x0c, 0x66, 0x5c, 0x18, 0xd6, 0x3a, 0xe6, 0x81, 0x4e, 0x9e, 0x1d, 0x7a, 0xf0, - 0x69, 0x5d, 0xf0, 0x40, 0x27, 0xd0, 0x8f, 0x5a, 0x90, 0x78, 0xf0, 0xa2, 0x94, 0x72, 0x56, 0xae, - 0x52, 0xee, 0x2c, 0xf4, 0x05, 0x7e, 0x83, 0x24, 0x93, 0x54, 0x63, 0xbf, 0x41, 0x30, 0xc3, 0x50, - 0x8a, 0x28, 0x56, 0xb5, 0x8c, 0xe8, 0xd7, 0x48, 0x71, 0x41, 0x7c, 0x14, 0xfa, 0x1b, 0x64, 0x97, - 0x34, 0x92, 0xb9, 0x04, 0x57, 0x29, 0x10, 0x73, 0x9c, 0xfd, 0x4b, 0x7d, 0x70, 0xba, 0x63, 0xac, - 0x2b, 0x7a, 0x19, 0xdb, 0x72, 0x22, 0x72, 0xcb, 0xd9, 0x4b, 0x26, 0xfd, 0xba, 0xc4, 0xc1, 0x58, - 0xe2, 0xd9, 0xf3, 0x4f, 0x9e, 0xbb, 0x23, 0xa1, 0xc2, 0x14, 0x29, 0x3b, 0x04, 0xd6, 0x54, 0x89, - 0x15, 0x0f, 0x43, 0x25, 0xf6, 0x1c, 0x40, 0x18, 0x36, 0xb8, 0x5b, 0x60, 0x5d, 0xbc, 0x2b, 0x8d, - 0x73, 0xbc, 0x54, 0x57, 0x05, 0x06, 0x6b, 0x54, 0x68, 0x11, 0x26, 0x5a, 0x81, 0x1f, 0x71, 0x8d, - 0xf0, 0x22, 0xf7, 0x9c, 0xed, 0x37, 0xc3, 0x0c, 0x55, 0x12, 0x78, 0x9c, 0x2a, 0x81, 0x5e, 0x84, - 0x61, 0x11, 0x7a, 0xa8, 0xe2, 0xfb, 0x0d, 0xa1, 0x84, 0x52, 0xce, 0xa4, 0xd5, 0x18, 0x85, 0x75, - 0x3a, 0xad, 0x18, 0x53, 0x33, 0x0f, 0x66, 0x16, 0xe3, 0xaa, 0x66, 0x8d, 0x2e, 0x11, 0xa6, 0x7c, - 0xa8, 0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xee, 0x7e, 0x79, 0x7a, 0x2e, 0x87, 0x06, 0xe7, 0x96, 0x46, 0xaf, 0x42, 0xa9, 0x15, 0xf8, 0xb5, - 0x35, 0xed, 0xf9, 0xf1, 0x19, 0xda, 0x81, 0x15, 0x09, 0xbc, 0xb7, 0x5f, 0x1e, 0x55, 0x7f, 0xd8, - 0x81, 0x1f, 0x17, 0xc8, 0x88, 0x8b, 0x30, 0x7c, 0xa8, 0x71, 0x11, 0x76, 0x60, 0xaa, 0x4a, 0x02, - 0xd7, 0x69, 0xb8, 0x77, 0xa8, 0xbc, 0x2c, 0xf7, 0xa7, 0x0d, 0x28, 0x05, 0x89, 0x1d, 0xb9, 0xa7, - 0x50, 0xc4, 0x5a, 0x36, 0x2e, 0xb9, 0x03, 0xc7, 0x8c, 0xec, 0xff, 0x66, 0xc1, 0xa0, 0x78, 0xc9, - 0x77, 0x04, 0x52, 0xe3, 0x9c, 0x61, 0x94, 0x28, 0x67, 0x77, 0x18, 0x6b, 0x4c, 0xae, 0x39, 0x62, - 0x25, 0x61, 0x8e, 0x78, 0xa4, 0x13, 0x93, 0xce, 0x86, 0x88, 0xff, 0xaf, 0x48, 0xa5, 0x77, 0xe3, - 0x4d, 0xf9, 0x83, 0xef, 0x82, 0x75, 0x18, 0x0c, 0xc5, 0x9b, 0xe6, 0x42, 0xfe, 0x6b, 0x90, 0xe4, - 0x20, 0xc6, 0x5e, 0x74, 0xe2, 0x15, 0xb3, 0x64, 0x92, 0xf9, 0x58, 0xba, 0xf8, 0x00, 0x1f, 0x4b, - 0x77, 0x7b, 0x75, 0xdf, 0x77, 0x18, 0xaf, 0xee, 0xed, 0xaf, 0xb3, 0x93, 0x53, 0x87, 0x1f, 0x81, - 0x50, 0x75, 0xc9, 0x3c, 0x63, 0xed, 0x0e, 0x33, 0x4b, 0x34, 0x2a, 0x47, 0xb8, 0xfa, 0x45, 0x0b, - 0x4e, 0x67, 0x7c, 0x95, 0x26, 0x69, 0x3d, 0x03, 0x43, 0x4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 0x25, + 0xb7, 0xda, 0x43, 0x4e, 0xdd, 0xfb, 0x33, 0x8e, 0x35, 0x18, 0x5d, 0x74, 0x5a, 0xce, 0x4d, 0xb7, + 0xe1, 0x46, 0x2e, 0x09, 0xd1, 0x13, 0x50, 0x74, 0xea, 0x75, 0x26, 0xdd, 0x0d, 0x2f, 0x1c, 0xbf, + 0xbb, 0x5f, 0x2a, 0xce, 0xd7, 0xa9, 0x98, 0x01, 0x8a, 0x6a, 0x0f, 0x53, 0x0a, 0xf4, 0x14, 0xf4, + 0xd5, 0x03, 0xbf, 0x35, 0x53, 0x60, 0x94, 0x74, 0x95, 0xf7, 0x2d, 0x05, 0x7e, 0x2b, 0x41, 0xca, + 0x68, 0xec, 0xdf, 0x29, 0xc0, 0xa9, 0x45, 0xd2, 0xda, 0x5e, 0xa9, 0xe6, 0x9c, 0x17, 0xe7, 0x61, + 0xa8, 0xe9, 0x7b, 0x6e, 0xe4, 0x07, 0xa1, 0xa8, 0x9a, 0xcd, 0x88, 0x35, 0x01, 0xc3, 0x0a, 0x8b, + 0xce, 0x42, 0x5f, 0x2b, 0x16, 0x62, 0x47, 0xa5, 0x00, 0xcc, 0xc4, 0x57, 0x86, 0xa1, 0x14, 0xed, + 0x90, 0x04, 0x62, 0xc6, 0x28, 0x8a, 0x6b, 0x21, 0x09, 0x30, 0xc3, 0xc4, 0x92, 0x00, 0x95, 0x11, + 0xc4, 0x89, 0x90, 0x90, 0x04, 0x28, 0x06, 0x6b, 0x54, 0xa8, 0x02, 0xc3, 0x61, 0x62, 0x64, 0x7b, + 0x5a, 0x9a, 0x63, 0x4c, 0x54, 0x50, 0x23, 0x19, 0x33, 0x31, 0x4e, 0xb0, 0x81, 0xae, 0xa2, 0xc2, + 0xd7, 0x0b, 0x80, 0x78, 0x17, 0x7e, 0x9b, 0x75, 0xdc, 0xb5, 0x74, 0xc7, 0xf5, 0xbe, 0x24, 0xee, + 0x57, 0xef, 0xfd, 0x67, 0x0b, 0x4e, 0x2d, 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73, 0x12, 0x3e, 0xcd, 0x62, 0x19, 0x55, 0x80, 0xb1, 0x64, + 0x81, 0x3e, 0x0c, 0x45, 0xe2, 0xed, 0xce, 0x0c, 0x32, 0x4e, 0xb3, 0x39, 0x9c, 0xae, 0x3b, 0x41, + 0xbc, 0xe7, 0x2f, 0x7b, 0xbb, 0x98, 0x96, 0x41, 0x1f, 0x87, 0x61, 0xb9, 0x61, 0x84, 0x42, 0xef, + 0x9b, 0x39, 0x61, 0xe5, 0x36, 0x83, 0xc9, 0x3b, 0x6d, 0x37, 0x20, 0x4d, 0xe2, 0x45, 0x61, 0xbc, + 0x43, 0x4a, 0x6c, 0x88, 0x63, 0x6e, 0xa8, 0x06, 0xa3, 0x01, 0x09, 0xdd, 0x3b, 0xa4, 0xe2, 0x37, + 0xdc, 0xda, 0xde, 0xcc, 0x43, 0xac, 0x79, 0x4f, 0x76, 0xec, 0x32, 0xac, 0x15, 0x88, 0xed, 0x12, + 0x3a, 0x14, 0x1b, 0x4c, 0xd1, 0x9b, 0x30, 0x16, 0x90, 0x30, 0x72, 0x82, 0x48, 0xd4, 0x32, 0xa3, + 0xec, 0x88, 0x63, 0x58, 0x47, 0xf0, 0xeb, 0x44, 0x5c, 0x4d, 0x8c, 0xc1, 0x26, 0x07, 0xf4, 0x71, + 0x69, 0x24, 0x59, 0xf3, 0xdb, 0x5e, 0x14, 0xce, 0x0c, 0xb3, 0x76, 0x67, 0x5a, 0xd3, 0xaf, 0xc7, + 0x74, 0x49, 0x2b, 0x0a, 0x2f, 0x8c, 0x0d, 0x56, 0xe8, 0x93, 0x30, 0xc6, 0xff, 0x73, 0x23, 0x70, + 0x38, 0x73, 0x9c, 0xf1, 0x3e, 0x9b, 0xcf, 0x9b, 0x13, 0x2e, 0x1c, 0x17, 0xcc, 0xc7, 0x74, 0x68, + 0x88, 0x4d, 0x6e, 0x08, 0xc3, 0x58, 0xc3, 0xdd, 0x25, 0x1e, 0x09, 0xc3, 0x4a, 0xe0, 0xdf, 0x24, + 0x42, 0xa7, 0x7d, 0x32, 0xdb, 0x68, 0xec, 0xdf, 0x24, 0xe2, 0x12, 0xa8, 0x97, 0xc1, 0x26, 0x0b, + 0x74, 0x0d, 0xc6, 0x03, 0xe2, 0xd4, 0xdd, 0x98, 0xe9, 0x48, 0x37, 0xa6, 0xec, 0xe2, 0x8c, 0x8d, + 0x42, 0x38, 0xc1, 0x04, 0x5d, 0x85, 0x51, 0xd6, 0xe7, 0xed, 0x16, 0x67, 0x7a, 0xa2, 0x1b, 0x53, + 0xe6, 0x02, 0x51, 0xd5, 0x8a, 0x60, 0x83, 0x01, 0x7a, 0x03, 0x86, 0x1b, 0xee, 0x26, 0xa9, 0xed, + 0xd5, 0x1a, 0x64, 0x66, 0x94, 0x71, 0xcb, 0xdc, 0x0c, 0x57, 0x25, 0x11, 0x97, 0xcf, 0xd5, 0x5f, + 0x1c, 0x17, 0x47, 0xd7, 0xe1, 0x44, 0x44, 0x82, 0xa6, 0xeb, 0x39, 0x74, 0x13, 0x13, 0x57, 0x42, + 0x66, 0xcb, 0x1f, 0x63, 0xb3, 0xeb, 0x8c, 0x18, 0x8d, 0x13, 0x1b, 0x99, 0x54, 0x38, 0xa7, 0x34, + 0xba, 0x0d, 0x33, 0x19, 0x18, 0x3e, 0x6f, 0x8f, 0x31, 0xce, 0xaf, 0x09, 0xce, 0x33, 0x1b, 0x39, + 0x74, 0x07, 0x1d, 0x70, 0x38, 0x97, 0x3b, 0xba, 0x0a, 0x13, 0x6c, 0xe7, 0xac, 0xb4, 0x1b, 0x0d, + 0x51, 0xe1, 0x38, 0xab, 0xf0, 0x71, 0x29, 0x47, 0x94, 0x4d, 0xf4, 0xc1, 0x7e, 0x09, 0xe2, 0x7f, + 0x38, 0x59, 0x1a, 0xdd, 0x64, 0x66, 0xe3, 0x76, 0xe0, 0x46, 0x7b, 0x74, 0x55, 0x91, 0xdb, 0xd1, + 0xcc, 0x44, 0x47, 0x15, 0x9a, 0x4e, 0xaa, 0x6c, 0xc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 0x7a, 0xa0, + 0x28, 0x5f, 0x28, 0x5b, 0x39, 0x2f, 0x94, 0xbb, 0x9f, 0xde, 0xd2, 0x25, 0xad, 0x98, 0xe9, 0x92, + 0xf6, 0x15, 0x0b, 0x62, 0xc3, 0x02, 0x7a, 0x13, 0x86, 0x5b, 0x3e, 0x73, 0xa1, 0x0d, 0xa4, 0x5f, + 0xfa, 0x63, 0x1d, 0x2d, 0x13, 0x3c, 0x16, 0x5e, 0xc0, 0x7b, 0xa1, 0x22, 0x8b, 0xe2, 0x98, 0x0b, + 0xba, 0x02, 0x83, 0xad, 0x80, 0x54, 0x23, 0x16, 0xa8, 0xa9, 0x77, 0x86, 0x7c, 0xd6, 0xf0, 0x82, + 0x58, 0x72, 0xb0, 0x7f, 0xb1, 0x00, 0x93, 0x49, 0x52, 0xf4, 0x1a, 0xf4, 0x91, 0xdb, 0xa4, 0x26, + 0xda, 0x9b, 0x79, 0x14, 0xc7, 0xaa, 0x09, 0xde, 0x01, 0xf4, 0x3f, 0x66, 0xa5, 0xd0, 0x65, 0x18, + 0xa4, 0xe7, 0xf0, 0x25, 0x15, 0x94, 0xf0, 0x91, 0xbc, 0xb3, 0x5c, 0x09, 0x34, 0xbc, 0x71, 0x02, + 0x84, 0x65, 0x71, 0xe6, 0x07, 0x56, 0x6b, 0x55, 0xe9, 0x15, 0x27, 0xea, 0x74, 0x13, 0xdf, 0x58, + 0xac, 0x70, 0x22, 0xc1, 0x8d, 0xfb, 0x81, 0x49, 0x20, 0x8e, 0x99, 0xa0, 0x8f, 0x42, 0x7f, 0xd8, + 0x20, 0xa4, 0x25, 0x0c, 0xfd, 0x99, 0xca, 0xc5, 0x2a, 0x25, 0x10, 0x9c, 0x98, 0x32, 0x82, 0x01, + 0x30, 0x2f, 0x68, 0xff, 0x92, 0x05, 0xc0, 0x1d, 0xe7, 0x1c, 0x6f, 0x8b, 0x1c, 0x81, 0x3e, 0x7e, + 0x09, 0xfa, 0xc2, 0x16, 0xa9, 0x75, 0x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, 0x67, 0xa7, 0x11, 0x87, 0x60, + 0x51, 0x1e, 0xb9, 0x30, 0x11, 0x18, 0x22, 0x82, 0x0c, 0x2e, 0x75, 0xae, 0x37, 0x39, 0x44, 0x0b, + 0x5b, 0x6e, 0xb2, 0xc1, 0x49, 0xbe, 0xb3, 0x3b, 0x30, 0x66, 0x6c, 0x10, 0x0f, 0xd4, 0xe4, 0xe5, + 0xc1, 0x64, 0x72, 0x37, 0x78, 0xa0, 0x96, 0xae, 0xbf, 0xe8, 0x83, 0x71, 0x73, 0xf6, 0xa2, 0x0b, + 0x30, 0x2c, 0x98, 0xa8, 0x2c, 0x41, 0x6a, 0x41, 0xae, 0x49, 0x04, 0x8e, 0x69, 0x58, 0x72, 0x28, + 0x56, 0x5c, 0x73, 0x09, 0x8f, 0x93, 0x43, 0x29, 0x0c, 0xd6, 0xa8, 0xe8, 0x6d, 0xee, 0xa6, 0xef, + 0x47, 0xea, 0xec, 0x53, 0x53, 0x7c, 0x81, 0x41, 0xb1, 0xc0, 0xd2, 0x33, 0x6f, 0x87, 0x04, 0x1e, + 0x69, 0x98, 0x41, 0xe7, 0xd5, 0x99, 0x77, 0x45, 0x47, 0x62, 0x93, 0x96, 0x9e, 0xdc, 0x7e, 0xc8, + 0xd6, 0x8c, 0xb8, 0x33, 0xc6, 0x2e, 0xf6, 0x55, 0x1e, 0x2c, 0x40, 0xe2, 0xd1, 0xc7, 0xe1, 0x21, + 0x15, 0xe0, 0x4d, 0xcc, 0x08, 0x59, 0xe3, 0x80, 0xa1, 0xe2, 0x79, 0x68, 0x31, 0x9b, 0x0c, 0xe7, + 0x95, 0x47, 0xaf, 0xc3, 0xb8, 0xb8, 0x57, 0x48, 0x8e, 0x83, 0xa6, 0xbf, 0xd8, 0x15, 0x03, 0x8b, + 0x13, 0xd4, 0x32, 0x6c, 0x3e, 0x13, 0xed, 0x25, 0x87, 0xa1, 0x74, 0xd8, 0x7c, 0x1d, 0x8f, 0x53, + 0x25, 0xd0, 0x3c, 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, 0x63, 0xdf, 0x72, 0xc2, 0xd8, 0x77, 0x3a, 0x8f, 0x41, + 0x67, 0xd3, 0xde, 0x4f, 0x17, 0x61, 0xa4, 0xe2, 0xd7, 0xd5, 0x3a, 0xfb, 0x67, 0xf7, 0xf2, 0xaa, + 0x25, 0x37, 0xc9, 0x90, 0xc6, 0x99, 0x79, 0xe1, 0xca, 0x38, 0x07, 0xdf, 0x66, 0x8f, 0x5b, 0x6e, + 0x10, 0x77, 0x6b, 0x3b, 0x22, 0xf5, 0xe4, 0xe7, 0x1c, 0xdd, 0xe3, 0x96, 0x6f, 0x16, 0x61, 0x22, + 0x51, 0x3b, 0x6a, 0xc0, 0x58, 0x43, 0x37, 0x25, 0x89, 0x79, 0x7a, 0x4f, 0x56, 0x28, 0xf1, 0x38, + 0x40, 0x03, 0x61, 0x93, 0x39, 0x9a, 0x03, 0x50, 0xbe, 0x15, 0x52, 0xdb, 0xcf, 0xae, 0x35, 0xca, + 0xf9, 0x22, 0xc4, 0x1a, 0x05, 0x7a, 0x11, 0x46, 0x22, 0xbf, 0xe5, 0x37, 0xfc, 0xad, 0xbd, 0x2b, + 0x44, 0x06, 0x30, 0x54, 0x8e, 0xbe, 0x1b, 0x31, 0x0a, 0xeb, 0x74, 0xe8, 0x36, 0x4c, 0x29, 0x26, + 0xd5, 0xfb, 0x60, 0x5e, 0x63, 0x6a, 0x93, 0xf5, 0x24, 0x47, 0x9c, 0xae, 0x04, 0xbd, 0x02, 0xe3, + 0xcc, 0xe3, 0x98, 0x95, 0xbf, 0x42, 0xf6, 0x64, 0x60, 0x5b, 0x26, 0x61, 0xaf, 0x19, 0x18, 0x9c, + 0xa0, 0x44, 0x8b, 0x30, 0xd5, 0x74, 0xc3, 0x44, 0xf1, 0x01, 0x56, 0x9c, 0x35, 0x60, 0x2d, 0x89, + 0xc4, 0x69, 0x7a, 0xfb, 0xe7, 0xc4, 0x18, 0x7b, 0x91, 0xfb, 0xfe, 0x72, 0x7c, 0x6f, 0x2f, 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05, 0xa3, 0x2d, 0x4d, 0x37, 0xdd, 0x29, 0x4a, 0xb7, + 0xae, 0xc3, 0x8e, 0xb5, 0x69, 0x3a, 0x14, 0x1b, 0xbc, 0x50, 0x1d, 0x46, 0xc9, 0xae, 0x5b, 0x53, + 0xde, 0x25, 0x85, 0x43, 0x1f, 0xd2, 0xaa, 0x96, 0x65, 0x8d, 0x0f, 0x36, 0xb8, 0xf6, 0xec, 0xce, + 0xab, 0x89, 0x68, 0x7d, 0x5d, 0x3c, 0x4a, 0x7e, 0xdc, 0x82, 0x87, 0x72, 0x62, 0x7a, 0xd3, 0xea, + 0x6e, 0x31, 0x17, 0x2c, 0x31, 0x6d, 0x55, 0x75, 0xdc, 0x31, 0x0b, 0x0b, 0x2c, 0xfa, 0x18, 0x00, + 0x77, 0xac, 0x22, 0x5e, 0xad, 0x6b, 0xf0, 0x63, 0x23, 0x5a, 0xab, 0x16, 0x78, 0x53, 0x96, 0xc7, + 0x1a, 0x2f, 0xfb, 0xcb, 0x7d, 0xd0, 0xcf, 0x1c, 0x79, 0x50, 0x05, 0x06, 0xb7, 0x79, 0x5c, 0xb8, + 0x8e, 0xe3, 0x46, 0x69, 0x65, 0xa0, 0xb9, 0x78, 0xdc, 0x34, 0x28, 0x96, 0x6c, 0xd0, 0x1a, 0x4c, + 0xf3, 0x2c, 0x84, 0x8d, 0x25, 0xd2, 0x70, 0xf6, 0xa4, 0xda, 0x97, 0x27, 0xd6, 0x57, 0xea, 0xef, + 0x72, 0x9a, 0x04, 0x67, 0x95, 0x43, 0xaf, 0xc3, 0x38, 0xbd, 0x86, 0xfb, 0xed, 0x48, 0x72, 0xe2, + 0xf9, 0x07, 0xd5, 0xcd, 0x64, 0xc3, 0xc0, 0xe2, 0x04, 0x35, 0x7a, 0x15, 0xc6, 0x5a, 0x29, 0x05, + 0x77, 0x7f, 0xac, 0x09, 0x32, 0x95, 0xda, 0x26, 0x2d, 0x7b, 0x57, 0xd0, 0x66, 0xaf, 0x28, 0x36, +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x90, 0xbd, + 0xf3, 0x10, 0x4f, 0xee, 0x0a, 0xb1, 0x2f, 0xf7, 0x6a, 0x02, 0x87, 0x53, 0xd4, 0xf6, 0x5f, 0x16, + 0x61, 0x80, 0x2f, 0xbf, 0x23, 0xb8, 0x5e, 0x3e, 0x0d, 0xc3, 0x6e, 0xb3, 0xd9, 0xe6, 0x09, 0x14, + 0xfb, 0x63, 0xcf, 0xe0, 0xb2, 0x04, 0xe2, 0x18, 0x8f, 0x56, 0x84, 0xbe, 0xbb, 0x43, 0x68, 0x65, + 0xde, 0xf0, 0xb9, 0x25, 0x27, 0x72, 0xb8, 0xac, 0xa4, 0xce, 0xd9, 0x58, 0x33, 0x8e, 0x3e, 0x05, + 0x10, 0x46, 0x81, 0xeb, 0x6d, 0x51, 0x98, 0x88, 0xbf, 0xff, 0x54, 0x07, 0x6e, 0x55, 0x45, 0xcc, + 0x79, 0xc6, 0x7b, 0x8e, 0x42, 0x60, 0x8d, 0x23, 0x9a, 0x33, 0x4e, 0xfa, 0xd9, 0xc4, 0xd8, 0x01, + 0xe7, 0x1a, 0x8f, 0xd9, 0xec, 0x4b, 0x30, 0xac, 0x98, 0x77, 0xd3, 0x7e, 0x8d, 0xea, 0x62, 0xd1, + 0x47, 0x60, 0x22, 0xd1, 0xb6, 0x43, 0x29, 0xcf, 0x7e, 0xc5, 0x82, 0x09, 0xde, 0x98, 0x65, 0x6f, + 0x57, 0x9c, 0x06, 0x77, 0xe0, 0x58, 0x23, 0x63, 0x57, 0x16, 0xc3, 0xdf, 0xfb, 0x2e, 0xae, 0x94, + 0x65, 0x59, 0x58, 0x9c, 0x59, 0x07, 0x3a, 0x4f, 0x57, 0x1c, 0xdd, 0x75, 0x9d, 0x86, 0x88, 0xa1, + 0x30, 0xca, 0x57, 0x1b, 0x87, 0x61, 0x85, 0xb5, 0xff, 0xd4, 0x82, 0x29, 0xde, 0xf2, 0x2b, 0x64, + 0x4f, 0xed, 0x4d, 0xdf, 0xca, 0xb6, 0x8b, 0xd4, 0xbd, 0x85, 0x9c, 0xd4, 0xbd, 0xfa, 0xa7, 0x15, + 0x3b, 0x7e, 0xda, 0x57, 0x2c, 0x10, 0x33, 0xe4, 0x08, 0xf4, 0x19, 0xdf, 0x65, 0xea, 0x33, 0x66, + 0xf3, 0x17, 0x41, 0x8e, 0x22, 0xe3, 0xef, 0x2d, 0x98, 0xe4, 0x04, 0xb1, 0xad, 0xfe, 0x5b, 0x3a, + 0x0e, 0x0b, 0xe6, 0x17, 0x65, 0x3a, 0x5f, 0x5e, 0x21, 0x7b, 0x1b, 0x7e, 0xc5, 0x89, 0xb6, 0xb3, + 0x3f, 0xca, 0x18, 0xac, 0xbe, 0x8e, 0x83, 0x55, 0x97, 0x0b, 0xc8, 0x48, 0x37, 0xd7, 0x25, 0x08, + 0xc1, 0x61, 0xd3, 0xcd, 0xd9, 0x7f, 0x65, 0x01, 0xe2, 0xd5, 0x18, 0x82, 0x1b, 0x15, 0x87, 0x18, + 0x54, 0x3b, 0xe8, 0xe2, 0xad, 0x49, 0x61, 0xb0, 0x46, 0x75, 0x5f, 0xba, 0x27, 0xe1, 0x70, 0x51, + 0xec, 0xee, 0x70, 0x71, 0x88, 0x1e, 0xfd, 0xca, 0x20, 0x24, 0x5f, 0xf6, 0xa1, 0xeb, 0x30, 0x5a, + 0x73, 0x5a, 0xce, 0x4d, 0xb7, 0xe1, 0x46, 0x2e, 0x09, 0x3b, 0x79, 0x63, 0x2d, 0x6a, 0x74, 0xc2, + 0x44, 0xae, 0x41, 0xb0, 0xc1, 0x07, 0xcd, 0x01, 0xb4, 0x02, 0x77, 0xd7, 0x6d, 0x90, 0x2d, 0xa6, + 0x76, 0x61, 0x51, 0x5b, 0xb8, 0x6b, 0x98, 0x84, 0x62, 0x8d, 0x22, 0x23, 0x54, 0x43, 0xf1, 0x01, + 0x87, 0x6a, 0x80, 0x23, 0x0b, 0xd5, 0xd0, 0x77, 0xa8, 0x50, 0x0d, 0x43, 0x87, 0x0e, 0xd5, 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x2f, 0x4e, 0x92, 0x83, 0x18, 0x7b, 0xea, 0x89, 0x97, 0xd2, 0x92, 0x49, + 0xe6, 0x83, 0xec, 0xe2, 0x03, 0x7c, 0x90, 0xdd, 0xed, 0x65, 0x7f, 0xdf, 0xfd, 0x78, 0xd9, 0x6f, + 0x7f, 0x9d, 0x9d, 0xce, 0x3a, 0xfc, 0x08, 0x04, 0xb7, 0x4b, 0xe6, 0x39, 0x6e, 0x77, 0x98, 0x59, + 0xa2, 0x51, 0x39, 0x02, 0xdc, 0x2f, 0x59, 0x70, 0x3a, 0xe3, 0xab, 0x34, 0x69, 0xee, 0x19, 0x18, + 0x72, 0xda, 0x75, 0x57, 0xad, 0x65, 0xcd, 0xfc, 0x39, 0x2f, 0xe0, 0x58, 0x51, 0xa0, 0x45, 0x98, + 0x22, 0xb7, 0x5b, 0x2e, 0x37, 0x16, 0xeb, 0x0e, 0xce, 0x45, 0xfe, 0xc4, 0x74, 0x39, 0x89, 0xc4, + 0x69, 0x7a, 0x15, 0xe8, 0xaa, 0x98, 0x1b, 0xe8, 0xea, 0x17, 0x2c, 0x18, 0x51, 0x2f, 0x87, 0x1f, + 0x78, 0x6f, 0x7f, 0xd4, 0xec, 0xed, 0x87, 0x3b, 0xf4, 0x76, 0x4e, 0x37, 0xff, 0x51, 0x41, 0xb5, + 0xb7, 0xe2, 0x07, 0x51, 0x0f, 0x52, 0xe2, 0xbd, 0x3f, 0xce, 0xb8, 0x08, 0x23, 0x4e, 0xab, 0x25, + 0x11, 0xd2, 0xcb, 0x8e, 0x05, 0xc8, 0x8f, 0xc1, 0x58, 0xa7, 0x51, 0x6f, 0x45, 0x8a, 0xb9, 0x6f, + 0x45, 0xea, 0x00, 0x91, 0x13, 0x6c, 0x91, 0x88, 0xc2, 0x84, 0x53, 0x70, 0xfe, 0x7e, 0xd3, 0x8e, + 0xdc, 0xc6, 0x9c, 0xeb, 0x45, 0x61, 0x14, 0xcc, 0x95, 0xbd, 0xe8, 0x6a, 0xc0, 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cf, 0xe6, 0x3f, 0x5a, 0x17, 0xe1, 0xeb, 0x95, 0x88, 0x6e, 0x24, 0xb5, 0x34, 0x78, 0xd9, + 0x75, 0x10, 0xd8, 0x25, 0xc2, 0xac, 0x1a, 0xdd, 0x5b, 0xf3, 0x1c, 0x40, 0x9d, 0xd1, 0xb2, 0xec, + 0xd7, 0x05, 0x53, 0xe2, 0x5a, 0x52, 0x18, 0xac, 0x51, 0xd9, 0x3f, 0x57, 0x84, 0x11, 0x99, 0x58, + 0xb1, 0xed, 0xf5, 0xa2, 0x7b, 0x3c, 0x54, 0xa6, 0x75, 0xf4, 0x36, 0x4c, 0x05, 0xa4, 0xd6, 0x0e, + 0x42, 0x77, 0x97, 0x48, 0xb4, 0x58, 0x24, 0x73, 0x3c, 0xa8, 0x7e, 0x02, 0x79, 0xc0, 0x02, 0x39, + 0x25, 0x80, 0xcc, 0x68, 0x9c, 0x66, 0x84, 0x2e, 0xc0, 0x30, 0x53, 0xbd, 0x57, 0x62, 0x85, 0xb0, + 0x52, 0x7c, 0xad, 0x49, 0x04, 0x8e, 0x69, 0xd8, 0xe5, 0xa0, 0x7d, 0x93, 0x91, 0x27, 0xde, 0x2b, + 0x57, 0x39, 0x18, 0x4b, 0x3c, 0xfa, 0x18, 0x4c, 0xf2, 0x72, 0x81, 0xdf, 0x72, 0xb6, 0xb8, 0x49, + 0xb0, 0x5f, 0x05, 0x81, 0x99, 0x5c, 0x4b, 0xe0, 0x0e, 0xf6, 0x4b, 0xc7, 0x92, 0x30, 0xd6, 0xec, + 0x14, 0x17, 0xe6, 0xf9, 0xc7, 0x2b, 0xa1, 0x67, 0x46, 0xca, 0x61, 0x30, 0x46, 0x61, 0x9d, 0xce, + 0xfe, 0x3b, 0x0b, 0xa6, 0xb4, 0xa1, 0xea, 0x39, 0xaf, 0x81, 0xd1, 0x49, 0x85, 0x1e, 0x3a, 0xe9, + 0x70, 0x31, 0x09, 0x32, 0x47, 0xb8, 0xef, 0x3e, 0x8d, 0xb0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0xad, 0x75, 0x13, 0x26, 0x5a, + 0x66, 0xd1, 0x2e, 0x01, 0xa6, 0x8d, 0xdc, 0xdb, 0xaa, 0xad, 0x09, 0x04, 0x4e, 0x32, 0xb5, 0x7f, + 0xb6, 0x00, 0xa7, 0x3b, 0xfa, 0xc5, 0x23, 0x0c, 0x27, 0xb6, 0x9a, 0xa1, 0xb3, 0x18, 0x90, 0x3a, + 0xf1, 0x22, 0xd7, 0x69, 0x54, 0x5b, 0xa4, 0xa6, 0x59, 0x2f, 0x99, 0x83, 0xf9, 0xa5, 0xb5, 0xea, + 0x7c, 0x9a, 0x02, 0xe7, 0x94, 0x44, 0x2b, 0x80, 0xd2, 0x18, 0x31, 0xc2, 0xec, 0x6a, 0x9a, 0xe6, + 0x87, 0x33, 0x4a, 0xa0, 0x97, 0x60, 0x4c, 0xf9, 0xdb, 0x6b, 0x23, 0xce, 0x36, 0x76, 0xac, 0x23, + 0xb0, 0x49, 0x87, 0x2e, 0xf2, 0xec, 0x39, 0x22, 0xcf, 0x92, 0x30, 0x75, 0x4e, 0xc8, 0xd4, 0x38, + 0x02, 0x8c, 0x75, 0x9a, 0x85, 0x97, 0x7f, 0xef, 0x9b, 0x67, 0x3e, 0xf0, 0x87, 0xdf, 0x3c, 0xf3, + 0x81, 0x3f, 0xfd, 0xe6, 0x99, 0x0f, 0x7c, 0xdf, 0xdd, 0x33, 0xd6, 0xef, 0xdd, 0x3d, 0x63, 0xfd, + 0xe1, 0xdd, 0x33, 0xd6, 0x9f, 0xde, 0x3d, 0x63, 0xfd, 0xfb, 0xbb, 0x67, 0xac, 0x2f, 0xfd, 0xc5, + 0x99, 0x0f, 0xbc, 0x85, 0xe2, 0xf8, 0xc7, 0x17, 0xe8, 0xe8, 0x5c, 0xd8, 0xbd, 0xf8, 0x3f, 0x02, + 0x00, 0x00, 0xff, 0xff, 0xfd, 0xca, 0x84, 0xba, 0xa5, 0x1e, 0x01, 0x00, } func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) { @@ -7600,6 +7701,41 @@ func (m *Affinity) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *AppArmorProfile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AppArmorProfile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AppArmorProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LocalhostProfile != nil { + i -= len(*m.LocalhostProfile) + copy(dAtA[i:], *m.LocalhostProfile) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.LocalhostProfile))) + i-- + dAtA[i] = 0x12 + } + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *AttachedVolume) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -9617,6 +9753,20 @@ func (m *ContainerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.VolumeMounts) > 0 { + for iNdEx := len(m.VolumeMounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.VolumeMounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } if m.Resources != nil { { size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) @@ -13185,7 +13335,7 @@ func (m *NodeProxyOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *NodeResources) Marshal() (dAtA []byte, err error) { +func (m *NodeRuntimeHandler) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -13195,44 +13345,65 @@ func (m *NodeResources) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NodeResources) MarshalTo(dAtA []byte) (int, error) { +func (m *NodeRuntimeHandler) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NodeResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NodeRuntimeHandler) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Capacity) > 0 { - keysForCapacity := make([]string, 0, len(m.Capacity)) - for k := range m.Capacity { - keysForCapacity = append(keysForCapacity, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) - for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { - v := m.Capacity[ResourceName(keysForCapacity[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + if m.Features != nil { + { + size, err := m.Features.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 - i -= len(keysForCapacity[iNdEx]) - copy(dAtA[i:], keysForCapacity[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCapacity[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *NodeRuntimeHandlerFeatures) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodeRuntimeHandlerFeatures) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeRuntimeHandlerFeatures) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RecursiveReadOnlyMounts != nil { + i-- + if *m.RecursiveReadOnlyMounts { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -13468,6 +13639,20 @@ func (m *NodeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.RuntimeHandlers) > 0 { + for iNdEx := len(m.RuntimeHandlers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RuntimeHandlers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } if m.Config != nil { { size, err := m.Config.MarshalToSizedBuffer(dAtA[:i]) @@ -15818,6 +16003,18 @@ func (m *PodSecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.AppArmorProfile != nil { + { + size, err := m.AppArmorProfile.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } if m.SeccompProfile != nil { { size, err := m.SeccompProfile.MarshalToSizedBuffer(dAtA[:i]) @@ -18813,6 +19010,18 @@ func (m *SecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.AppArmorProfile != nil { + { + size, err := m.AppArmorProfile.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } if m.SeccompProfile != nil { { size, err := m.SeccompProfile.MarshalToSizedBuffer(dAtA[:i]) @@ -19314,6 +19523,15 @@ func (m *ServiceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.TrafficDistribution != nil { + i -= len(*m.TrafficDistribution) + copy(dAtA[i:], *m.TrafficDistribution) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.TrafficDistribution))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } if m.InternalTrafficPolicy != nil { i -= len(*m.InternalTrafficPolicy) copy(dAtA[i:], *m.InternalTrafficPolicy) @@ -20208,6 +20426,13 @@ func (m *VolumeMount) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.RecursiveReadOnly != nil { + i -= len(*m.RecursiveReadOnly) + copy(dAtA[i:], *m.RecursiveReadOnly) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.RecursiveReadOnly))) + i-- + dAtA[i] = 0x3a + } i -= len(m.SubPathExpr) copy(dAtA[i:], m.SubPathExpr) i = encodeVarintGenerated(dAtA, i, uint64(len(m.SubPathExpr))) @@ -20246,6 +20471,54 @@ func (m *VolumeMount) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *VolumeMountStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VolumeMountStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VolumeMountStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RecursiveReadOnly != nil { + i -= len(*m.RecursiveReadOnly) + copy(dAtA[i:], *m.RecursiveReadOnly) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.RecursiveReadOnly))) + i-- + dAtA[i] = 0x22 + } + i-- + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + i -= len(m.MountPath) + copy(dAtA[i:], m.MountPath) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.MountPath))) + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *VolumeNodeAffinity) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -21024,6 +21297,21 @@ func (m *Affinity) Size() (n int) { return n } +func (m *AppArmorProfile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + if m.LocalhostProfile != nil { + l = len(*m.LocalhostProfile) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *AttachedVolume) Size() (n int) { if m == nil { return 0 @@ -21803,6 +22091,12 @@ func (m *ContainerStatus) Size() (n int) { l = m.Resources.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 } @@ -23080,20 +23374,29 @@ func (m *NodeProxyOptions) Size() (n int) { return n } -func (m *NodeResources) Size() (n int) { +func (m *NodeRuntimeHandler) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Capacity) > 0 { - for k, v := range m.Capacity { - _ = 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.Name) + n += 1 + l + sovGenerated(uint64(l)) + if m.Features != nil { + l = m.Features.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *NodeRuntimeHandlerFeatures) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RecursiveReadOnlyMounts != nil { + n += 2 } return n } @@ -23249,6 +23552,12 @@ func (m *NodeStatus) Size() (n int) { l = m.Config.Size() n += 1 + l + sovGenerated(uint64(l)) } + if len(m.RuntimeHandlers) > 0 { + for _, e := range m.RuntimeHandlers { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -24088,6 +24397,10 @@ func (m *PodSecurityContext) Size() (n int) { l = m.SeccompProfile.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.AppArmorProfile != nil { + l = m.AppArmorProfile.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -25172,6 +25485,10 @@ func (m *SecurityContext) Size() (n int) { l = m.SeccompProfile.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.AppArmorProfile != nil { + l = m.AppArmorProfile.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -25386,6 +25703,10 @@ func (m *ServiceSpec) Size() (n int) { l = len(*m.InternalTrafficPolicy) n += 2 + l + sovGenerated(uint64(l)) } + if m.TrafficDistribution != nil { + l = len(*m.TrafficDistribution) + n += 2 + l + sovGenerated(uint64(l)) + } return n } @@ -25684,6 +26005,28 @@ func (m *VolumeMount) Size() (n int) { } l = len(m.SubPathExpr) n += 1 + l + sovGenerated(uint64(l)) + if m.RecursiveReadOnly != nil { + l = len(*m.RecursiveReadOnly) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *VolumeMountStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.MountPath) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + if m.RecursiveReadOnly != nil { + l = len(*m.RecursiveReadOnly) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -25965,6 +26308,17 @@ func (this *Affinity) String() string { }, "") return s } +func (this *AppArmorProfile) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AppArmorProfile{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `LocalhostProfile:` + valueToStringGenerated(this.LocalhostProfile) + `,`, + `}`, + }, "") + return s +} func (this *AttachedVolume) String() string { if this == nil { return "nil" @@ -26515,6 +26869,11 @@ func (this *ContainerStatus) String() string { if this == nil { return "nil" } + repeatedStringForVolumeMounts := "[]VolumeMountStatus{" + for _, f := range this.VolumeMounts { + repeatedStringForVolumeMounts += strings.Replace(strings.Replace(f.String(), "VolumeMountStatus", "VolumeMountStatus", 1), `&`, ``, 1) + "," + } + repeatedStringForVolumeMounts += "}" keysForAllocatedResources := make([]string, 0, len(this.AllocatedResources)) for k := range this.AllocatedResources { keysForAllocatedResources = append(keysForAllocatedResources, string(k)) @@ -26537,6 +26896,7 @@ func (this *ContainerStatus) String() string { `Started:` + valueToStringGenerated(this.Started) + `,`, `AllocatedResources:` + mapStringForAllocatedResources + `,`, `Resources:` + strings.Replace(this.Resources.String(), "ResourceRequirements", "ResourceRequirements", 1) + `,`, + `VolumeMounts:` + repeatedStringForVolumeMounts + `,`, `}`, }, "") return s @@ -27537,22 +27897,23 @@ func (this *NodeProxyOptions) String() string { }, "") return s } -func (this *NodeResources) String() string { +func (this *NodeRuntimeHandler) String() string { if this == nil { return "nil" } - keysForCapacity := make([]string, 0, len(this.Capacity)) - for k := range this.Capacity { - keysForCapacity = append(keysForCapacity, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) - mapStringForCapacity := "ResourceList{" - for _, k := range keysForCapacity { - mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)]) + s := strings.Join([]string{`&NodeRuntimeHandler{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Features:` + strings.Replace(this.Features.String(), "NodeRuntimeHandlerFeatures", "NodeRuntimeHandlerFeatures", 1) + `,`, + `}`, + }, "") + return s +} +func (this *NodeRuntimeHandlerFeatures) String() string { + if this == nil { + return "nil" } - mapStringForCapacity += "}" - s := strings.Join([]string{`&NodeResources{`, - `Capacity:` + mapStringForCapacity + `,`, + s := strings.Join([]string{`&NodeRuntimeHandlerFeatures{`, + `RecursiveReadOnlyMounts:` + valueToStringGenerated(this.RecursiveReadOnlyMounts) + `,`, `}`, }, "") return s @@ -27650,6 +28011,11 @@ func (this *NodeStatus) String() string { repeatedStringForVolumesAttached += strings.Replace(strings.Replace(f.String(), "AttachedVolume", "AttachedVolume", 1), `&`, ``, 1) + "," } repeatedStringForVolumesAttached += "}" + repeatedStringForRuntimeHandlers := "[]NodeRuntimeHandler{" + for _, f := range this.RuntimeHandlers { + repeatedStringForRuntimeHandlers += strings.Replace(strings.Replace(f.String(), "NodeRuntimeHandler", "NodeRuntimeHandler", 1), `&`, ``, 1) + "," + } + repeatedStringForRuntimeHandlers += "}" keysForCapacity := make([]string, 0, len(this.Capacity)) for k := range this.Capacity { keysForCapacity = append(keysForCapacity, string(k)) @@ -27682,6 +28048,7 @@ func (this *NodeStatus) String() string { `VolumesInUse:` + fmt.Sprintf("%v", this.VolumesInUse) + `,`, `VolumesAttached:` + repeatedStringForVolumesAttached + `,`, `Config:` + strings.Replace(this.Config.String(), "NodeConfigStatus", "NodeConfigStatus", 1) + `,`, + `RuntimeHandlers:` + repeatedStringForRuntimeHandlers + `,`, `}`, }, "") return s @@ -28256,6 +28623,7 @@ func (this *PodSecurityContext) String() string { `WindowsOptions:` + strings.Replace(this.WindowsOptions.String(), "WindowsSecurityContextOptions", "WindowsSecurityContextOptions", 1) + `,`, `FSGroupChangePolicy:` + valueToStringGenerated(this.FSGroupChangePolicy) + `,`, `SeccompProfile:` + strings.Replace(this.SeccompProfile.String(), "SeccompProfile", "SeccompProfile", 1) + `,`, + `AppArmorProfile:` + strings.Replace(this.AppArmorProfile.String(), "AppArmorProfile", "AppArmorProfile", 1) + `,`, `}`, }, "") return s @@ -29115,6 +29483,7 @@ func (this *SecurityContext) String() string { `ProcMount:` + valueToStringGenerated(this.ProcMount) + `,`, `WindowsOptions:` + strings.Replace(this.WindowsOptions.String(), "WindowsSecurityContextOptions", "WindowsSecurityContextOptions", 1) + `,`, `SeccompProfile:` + strings.Replace(this.SeccompProfile.String(), "SeccompProfile", "SeccompProfile", 1) + `,`, + `AppArmorProfile:` + strings.Replace(this.AppArmorProfile.String(), "AppArmorProfile", "AppArmorProfile", 1) + `,`, `}`, }, "") return s @@ -29272,6 +29641,7 @@ func (this *ServiceSpec) String() string { `AllocateLoadBalancerNodePorts:` + valueToStringGenerated(this.AllocateLoadBalancerNodePorts) + `,`, `LoadBalancerClass:` + valueToStringGenerated(this.LoadBalancerClass) + `,`, `InternalTrafficPolicy:` + valueToStringGenerated(this.InternalTrafficPolicy) + `,`, + `TrafficDistribution:` + valueToStringGenerated(this.TrafficDistribution) + `,`, `}`, }, "") return s @@ -29490,6 +29860,20 @@ func (this *VolumeMount) String() string { `SubPath:` + fmt.Sprintf("%v", this.SubPath) + `,`, `MountPropagation:` + valueToStringGenerated(this.MountPropagation) + `,`, `SubPathExpr:` + fmt.Sprintf("%v", this.SubPathExpr) + `,`, + `RecursiveReadOnly:` + valueToStringGenerated(this.RecursiveReadOnly) + `,`, + `}`, + }, "") + return s +} +func (this *VolumeMountStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VolumeMountStatus{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `MountPath:` + fmt.Sprintf("%v", this.MountPath) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `RecursiveReadOnly:` + valueToStringGenerated(this.RecursiveReadOnly) + `,`, `}`, }, "") return s @@ -29943,6 +30327,121 @@ func (m *Affinity) Unmarshal(dAtA []byte) error { } return nil } +func (m *AppArmorProfile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AppArmorProfile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AppArmorProfile: 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = AppArmorProfileType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalhostProfile", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.LocalhostProfile = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *AttachedVolume) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -36779,6 +37278,40 @@ func (m *ContainerStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VolumeMounts = append(m.VolumeMounts, VolumeMountStatus{}) + 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:]) @@ -47676,7 +48209,7 @@ func (m *NodeProxyOptions) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeResources) Unmarshal(dAtA []byte) error { +func (m *NodeRuntimeHandler) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -47699,15 +48232,47 @@ func (m *NodeResources) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NodeResources: wiretype end group for non-group") + return fmt.Errorf("proto: NodeRuntimeHandler: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NodeResources: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NodeRuntimeHandler: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Features", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -47734,106 +48299,84 @@ func (m *NodeResources) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Capacity == nil { - m.Capacity = make(ResourceList) + if m.Features == nil { + m.Features = &NodeRuntimeHandlerFeatures{} } - var mapkey ResourceName - mapvalue := &resource.Quantity{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if err := m.Features.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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeRuntimeHandlerFeatures) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeRuntimeHandlerFeatures: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeRuntimeHandlerFeatures: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RecursiveReadOnlyMounts", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = ResourceName(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - 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 postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &resource.Quantity{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break } } - m.Capacity[ResourceName(mapkey)] = *mapvalue - iNdEx = postIndex + b := bool(v != 0) + m.RecursiveReadOnlyMounts = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -49060,6 +49603,40 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeHandlers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuntimeHandlers = append(m.RuntimeHandlers, NodeRuntimeHandler{}) + if err := m.RuntimeHandlers[len(m.RuntimeHandlers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -56398,10 +56975,46 @@ func (m *PodSecurityContext) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SeccompProfile == nil { - m.SeccompProfile = &SeccompProfile{} + if m.SeccompProfile == nil { + m.SeccompProfile = &SeccompProfile{} + } + if err := m.SeccompProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppArmorProfile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AppArmorProfile == nil { + m.AppArmorProfile = &AppArmorProfile{} } - if err := m.SeccompProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.AppArmorProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -66074,6 +66687,42 @@ func (m *SecurityContext) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppArmorProfile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AppArmorProfile == nil { + m.AppArmorProfile = &AppArmorProfile{} + } + if err := m.AppArmorProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -67872,6 +68521,39 @@ func (m *ServiceSpec) Unmarshal(dAtA []byte) error { s := ServiceInternalTrafficPolicy(dAtA[iNdEx:postIndex]) m.InternalTrafficPolicy = &s iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TrafficDistribution", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.TrafficDistribution = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -70429,6 +71111,206 @@ func (m *VolumeMount) Unmarshal(dAtA []byte) error { } m.SubPathExpr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecursiveReadOnly", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := RecursiveReadOnlyMode(dAtA[iNdEx:postIndex]) + m.RecursiveReadOnly = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VolumeMountStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VolumeMountStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VolumeMountStatus: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 MountPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MountPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", 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.ReadOnly = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecursiveReadOnly", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := RecursiveReadOnlyMode(dAtA[iNdEx:postIndex]) + m.RecursiveReadOnly = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/api/core/v1/generated.proto b/vendor/k8s.io/api/core/v1/generated.proto index d099238cdf6..f3b47c722d1 100644 --- a/vendor/k8s.io/api/core/v1/generated.proto +++ b/vendor/k8s.io/api/core/v1/generated.proto @@ -77,6 +77,25 @@ message Affinity { optional PodAntiAffinity podAntiAffinity = 3; } +// AppArmorProfile defines a pod or container's AppArmor settings. +// +union +message AppArmorProfile { + // type indicates which kind of AppArmor profile will be applied. + // Valid options are: + // Localhost - a profile pre-loaded on the node. + // RuntimeDefault - the container runtime's default profile. + // Unconfined - no AppArmor enforcement. + // +unionDiscriminator + optional string type = 1; + + // localhostProfile indicates a profile loaded on the node that should be used. + // The profile must be preconfigured on the node to work. + // Must match the loaded name of the profile. + // Must be set if and only if type is "Localhost". + // +optional + optional string localhostProfile = 2; +} + // AttachedVolume describes a volume attached to a node message AttachedVolume { // Name of the attached volume @@ -93,6 +112,7 @@ message AvoidPods { // Bounded-sized list of signatures of pods that should avoid this node, sorted // in timestamp order from oldest to newest. Size of the slice is unspecified. // +optional + // +listType=atomic repeated PreferAvoidPodsEntry preferAvoidPods = 1; } @@ -269,10 +289,12 @@ message CSIVolumeSource { message Capabilities { // Added capabilities // +optional + // +listType=atomic repeated string add = 1; // Removed capabilities // +optional + // +listType=atomic repeated string drop = 2; } @@ -281,6 +303,7 @@ message Capabilities { message CephFSPersistentVolumeSource { // monitors is Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +listType=atomic repeated string monitors = 1; // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / @@ -314,6 +337,7 @@ message CephFSPersistentVolumeSource { message CephFSVolumeSource { // monitors is Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +listType=atomic repeated string monitors = 1; // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / @@ -498,6 +522,8 @@ message ComponentStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated ComponentCondition conditions = 2; } @@ -628,6 +654,7 @@ message ConfigMapProjection { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic repeated KeyToPath items = 2; // optional specify whether the ConfigMap or its keys must be defined @@ -652,6 +679,7 @@ message ConfigMapVolumeSource { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic repeated KeyToPath items = 2; // defaultMode is optional: mode bits used to set permissions on created files by default. @@ -692,6 +720,7 @@ message Container { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic repeated string command = 3; // Arguments to the entrypoint. @@ -703,6 +732,7 @@ message Container { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic repeated string args = 4; // Container's working directory. @@ -734,6 +764,7 @@ message Container { // Values defined by an Env with a duplicate key will take precedence. // Cannot be updated. // +optional + // +listType=atomic repeated EnvFromSource envFrom = 19; // List of environment variables to set in the container. @@ -741,6 +772,8 @@ message Container { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated EnvVar env = 7; // Compute Resources required by this container. @@ -779,11 +812,15 @@ message Container { // +optional // +patchMergeKey=mountPath // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath repeated VolumeMount volumeMounts = 9; // volumeDevices is the list of block devices to be used by the container. // +patchMergeKey=devicePath // +patchStrategy=merge + // +listType=map + // +listMapKey=devicePath // +optional repeated VolumeDevice volumeDevices = 21; @@ -877,6 +914,7 @@ message ContainerImage { // Names by which this image is known. // e.g. ["kubernetes.example/hyperkube:v1.0.7", "cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7"] // +optional + // +listType=atomic repeated string names = 1; // The size of the image in bytes. @@ -1062,6 +1100,15 @@ message ContainerStatus { // +featureGate=InPlacePodVerticalScaling // +optional optional ResourceRequirements resources = 11; + + // Status of volume mounts. + // +optional + // +patchMergeKey=mountPath + // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath + // +featureGate=RecursiveReadOnlyMounts + repeated VolumeMountStatus volumeMounts = 12; } // DaemonEndpoint contains information about a single Daemon endpoint. @@ -1076,6 +1123,7 @@ message DaemonEndpoint { message DownwardAPIProjection { // Items is a list of DownwardAPIVolume file // +optional + // +listType=atomic repeated DownwardAPIVolumeFile items = 1; } @@ -1084,7 +1132,7 @@ message DownwardAPIVolumeFile { // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' optional string path = 1; - // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + // Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. // +optional optional ObjectFieldSelector fieldRef = 2; @@ -1108,6 +1156,7 @@ message DownwardAPIVolumeFile { message DownwardAPIVolumeSource { // Items is a list of downward API volume file // +optional + // +listType=atomic repeated DownwardAPIVolumeFile items = 1; // Optional: mode bits to use on created files by default. Must be a @@ -1218,16 +1267,19 @@ message EndpointSubset { // IP addresses which offer the related ports that are marked as ready. These endpoints // should be considered safe for load balancers and clients to utilize. // +optional + // +listType=atomic repeated EndpointAddress addresses = 1; // IP addresses which offer the related ports but are not currently marked as ready // because they have not yet finished starting, have recently failed a readiness check, // or have recently failed a liveness check. // +optional + // +listType=atomic repeated EndpointAddress notReadyAddresses = 2; // Port numbers available on the related IP addresses. // +optional + // +listType=atomic repeated EndpointPort ports = 3; } @@ -1258,6 +1310,7 @@ message Endpoints { // NotReadyAddresses in the same subset. // Sets of addresses and ports that comprise a service. // +optional + // +listType=atomic repeated EndpointSubset subsets = 2; } @@ -1377,6 +1430,7 @@ message EphemeralContainerCommon { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic repeated string command = 3; // Arguments to the entrypoint. @@ -1388,6 +1442,7 @@ message EphemeralContainerCommon { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic repeated string args = 4; // Container's working directory. @@ -1413,6 +1468,7 @@ message EphemeralContainerCommon { // Values defined by an Env with a duplicate key will take precedence. // Cannot be updated. // +optional + // +listType=atomic repeated EnvFromSource envFrom = 19; // List of environment variables to set in the container. @@ -1420,6 +1476,8 @@ message EphemeralContainerCommon { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated EnvVar env = 7; // Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources @@ -1446,11 +1504,15 @@ message EphemeralContainerCommon { // +optional // +patchMergeKey=mountPath // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath repeated VolumeMount volumeMounts = 9; // volumeDevices is the list of block devices to be used by the container. // +patchMergeKey=devicePath // +patchStrategy=merge + // +listType=map + // +listMapKey=devicePath // +optional repeated VolumeDevice volumeDevices = 21; @@ -1661,6 +1723,7 @@ message ExecAction { // a shell, you need to explicitly call out to that shell. // Exit status of 0 is treated as live/healthy and non-zero is unhealthy. // +optional + // +listType=atomic repeated string command = 1; } @@ -1670,6 +1733,7 @@ message ExecAction { message FCVolumeSource { // targetWWNs is Optional: FC target worldwide names (WWNs) // +optional + // +listType=atomic repeated string targetWWNs = 1; // lun is Optional: FC target lun number @@ -1691,6 +1755,7 @@ message FCVolumeSource { // wwids Optional: FC volume world wide identifiers (wwids) // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. // +optional + // +listType=atomic repeated string wwids = 5; } @@ -1903,6 +1968,7 @@ message HTTPGetAction { // Custom headers to set in the request. HTTP allows repeated headers. // +optional + // +listType=atomic repeated HTTPHeader httpHeaders = 5; } @@ -1920,9 +1986,11 @@ message HTTPHeader { // pod's hosts file. message HostAlias { // IP address of the host file entry. + // +required optional string ip = 1; // Hostnames for the above IP address. + // +listType=atomic repeated string hostnames = 2; } @@ -1982,6 +2050,7 @@ message ISCSIPersistentVolumeSource { // portals is the iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional + // +listType=atomic repeated string portals = 7; // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication @@ -2038,6 +2107,7 @@ message ISCSIVolumeSource { // portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional + // +listType=atomic repeated string portals = 7; // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication @@ -2181,6 +2251,7 @@ message LimitRangeList { // LimitRangeSpec defines a min/max usage limit for resources that match on kind. message LimitRangeSpec { // Limits is the list of LimitRangeItem objects that are enforced. + // +listType=atomic repeated LimitRangeItem limits = 1; } @@ -2229,6 +2300,7 @@ message LoadBalancerStatus { // Ingress is a list containing ingress points for the load-balancer. // Traffic intended for the service should be sent to these ingress points. // +optional + // +listType=atomic repeated LoadBalancerIngress ingress = 1; } @@ -2237,9 +2309,15 @@ message LoadBalancerStatus { // +structType=atomic message LocalObjectReference { // Name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + // This field is effectively required, but due to backwards compatibility is + // allowed to be empty. Instances of this type with an empty value here are + // almost certainly wrong. // TODO: Add other useful fields. apiVersion, kind, uid? + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // +optional + // +default="" + // +kubebuilder:default="" + // TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. optional string name = 1; } @@ -2347,6 +2425,7 @@ message NamespaceSpec { // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ // +optional + // +listType=atomic repeated string finalizers = 1; } @@ -2361,6 +2440,8 @@ message NamespaceStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated NamespaceCondition conditions = 2; } @@ -2414,6 +2495,7 @@ message NodeAffinity { // "weight" to the sum if the node matches the corresponding matchExpressions; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic repeated PreferredSchedulingTerm preferredDuringSchedulingIgnoredDuringExecution = 2; } @@ -2524,11 +2606,24 @@ message NodeProxyOptions { optional string path = 1; } -// NodeResources is an object for conveying resource information about a node. -// see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details. -message NodeResources { - // Capacity represents the available resources of a node - map capacity = 1; +// NodeRuntimeHandler is a set of runtime handler information. +message NodeRuntimeHandler { + // Runtime handler name. + // Empty for the default runtime handler. + // +optional + optional string name = 1; + + // Supported features. + // +optional + optional NodeRuntimeHandlerFeatures features = 2; +} + +// NodeRuntimeHandlerFeatures is a set of runtime features. +message NodeRuntimeHandlerFeatures { + // RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts. + // +featureGate=RecursiveReadOnlyMounts + // +optional + optional bool recursiveReadOnlyMounts = 1; } // A node selector represents the union of the results of one or more label queries @@ -2537,6 +2632,7 @@ message NodeResources { // +structType=atomic message NodeSelector { // Required. A list of node selector terms. The terms are ORed. + // +listType=atomic repeated NodeSelectorTerm nodeSelectorTerms = 1; } @@ -2556,6 +2652,7 @@ message NodeSelectorRequirement { // array must have a single element, which will be interpreted as an integer. // This array is replaced during a strategic merge patch. // +optional + // +listType=atomic repeated string values = 3; } @@ -2566,10 +2663,12 @@ message NodeSelectorRequirement { message NodeSelectorTerm { // A list of node selector requirements by node's labels. // +optional + // +listType=atomic repeated NodeSelectorRequirement matchExpressions = 1; // A list of node selector requirements by node's fields. // +optional + // +listType=atomic repeated NodeSelectorRequirement matchFields = 2; } @@ -2584,6 +2683,7 @@ message NodeSpec { // each of IPv4 and IPv6. // +optional // +patchStrategy=merge + // +listType=set repeated string podCIDRs = 7; // ID of the node assigned by the cloud provider in the format: :// @@ -2597,6 +2697,7 @@ message NodeSpec { // If specified, the node's taints. // +optional + // +listType=atomic repeated Taint taints = 5; // Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed. @@ -2632,6 +2733,8 @@ message NodeStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated NodeCondition conditions = 4; // List of addresses reachable to the node. @@ -2647,6 +2750,8 @@ message NodeStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated NodeAddress addresses = 5; // Endpoints of daemons running on the Node. @@ -2660,19 +2765,28 @@ message NodeStatus { // List of container images on this node // +optional + // +listType=atomic repeated ContainerImage images = 8; // List of attachable volumes in use (mounted) by the node. // +optional + // +listType=atomic repeated string volumesInUse = 9; // List of volumes that are attached to the node. // +optional + // +listType=atomic repeated AttachedVolume volumesAttached = 10; // Status of the config assigned to the node via the dynamic Kubelet config feature. // +optional optional NodeConfigStatus config = 11; + + // The available runtime handlers. + // +featureGate=RecursiveReadOnlyMounts + // +optional + // +listType=atomic + repeated NodeRuntimeHandler runtimeHandlers = 12; } // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. @@ -2840,7 +2954,7 @@ message PersistentVolumeClaimCondition { optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; // reason is a unique, this should be a short, machine understandable string that gives the reason - // for condition's last transition. If it reports "ResizeStarted" that means the underlying + // for condition's last transition. If it reports "Resizing" that means the underlying // persistent volume is being resized. // +optional optional string reason = 5; @@ -2868,6 +2982,7 @@ message PersistentVolumeClaimSpec { // accessModes contains the desired access modes the volume should have. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional + // +listType=atomic repeated string accessModes = 1; // selector is a label query over volumes to consider for binding. @@ -2943,7 +3058,7 @@ message PersistentVolumeClaimSpec { // If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be // set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource // exists. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass + // More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ // (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. // +featureGate=VolumeAttributesClass // +optional @@ -2959,6 +3074,7 @@ message PersistentVolumeClaimStatus { // accessModes contains the actual access modes the volume backing the PVC has. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional + // +listType=atomic repeated string accessModes = 2; // capacity represents the actual resources of the underlying volume. @@ -2966,10 +3082,12 @@ message PersistentVolumeClaimStatus { map capacity = 3; // conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - // resized then the Condition will be set to 'ResizeStarted'. + // resized then the Condition will be set to 'Resizing'. // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated PersistentVolumeClaimCondition conditions = 4; // allocatedResources tracks the resources allocated to a PVC including its capacity. @@ -3217,6 +3335,7 @@ message PersistentVolumeSpec { // accessModes contains all ways the volume can be mounted. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes // +optional + // +listType=atomic repeated string accessModes = 3; // claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. @@ -3244,6 +3363,7 @@ message PersistentVolumeSpec { // simply fail if one is invalid. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options // +optional + // +listType=atomic repeated string mountOptions = 7; // volumeMode defines if a volume is intended to be used with a formatted filesystem @@ -3335,6 +3455,7 @@ message PodAffinity { // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. // +optional + // +listType=atomic repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1; // The scheduler will prefer to schedule pods to nodes that satisfy @@ -3347,6 +3468,7 @@ message PodAffinity { // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2; } @@ -3367,6 +3489,7 @@ message PodAffinityTerm { // and the ones selected by namespaceSelector. // null or empty namespaces list and null namespaceSelector means "this pod's namespace". // +optional + // +listType=atomic repeated string namespaces = 2; // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching @@ -3386,12 +3509,12 @@ message PodAffinityTerm { // MatchLabelKeys is a set of pod label keys to select which pods will // be taken into consideration. The keys are used to lookup values from the - // incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` + // incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` // to select the group of existing pods which pods will be taken into consideration // for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming // pod labels will be ignored. The default value is empty. - // The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. - // Also, MatchLabelKeys cannot be set when LabelSelector isn't set. + // The same key is forbidden to exist in both matchLabelKeys and labelSelector. + // Also, matchLabelKeys cannot be set when labelSelector isn't set. // This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. // +listType=atomic // +optional @@ -3399,12 +3522,12 @@ message PodAffinityTerm { // MismatchLabelKeys is a set of pod label keys to select which pods will // be taken into consideration. The keys are used to lookup values from the - // incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` + // incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` // to select the group of existing pods which pods will be taken into consideration // for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming // pod labels will be ignored. The default value is empty. - // The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. - // Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. + // The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + // Also, mismatchLabelKeys cannot be set when labelSelector isn't set. // This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. // +listType=atomic // +optional @@ -3421,6 +3544,7 @@ message PodAntiAffinity { // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. // +optional + // +listType=atomic repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1; // The scheduler will prefer to schedule pods to nodes that satisfy @@ -3433,6 +3557,7 @@ message PodAntiAffinity { // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2; } @@ -3504,12 +3629,14 @@ message PodDNSConfig { // This will be appended to the base nameservers generated from DNSPolicy. // Duplicated nameservers will be removed. // +optional + // +listType=atomic repeated string nameservers = 1; // A list of DNS search domains for host-name lookup. // This will be appended to the base search paths generated from DNSPolicy. // Duplicated search paths will be removed. // +optional + // +listType=atomic repeated string searches = 2; // A list of DNS resolver options. @@ -3517,6 +3644,7 @@ message PodDNSConfig { // Duplicated entries will be removed. Resolution options given in Options // will override those that appear in the base DNSPolicy. // +optional + // +listType=atomic repeated PodDNSConfigOption options = 3; } @@ -3558,6 +3686,7 @@ message PodExecOptions { optional string container = 5; // Command is the remote command to execute. argv array. Not executed within a shell. + // +listType=atomic repeated string command = 6; } @@ -3652,6 +3781,7 @@ message PodPortForwardOptions { // List of ports to forward // Required when using WebSockets // +optional + // +listType=atomic repeated int32 ports = 1; } @@ -3760,6 +3890,7 @@ message PodSecurityContext { // even if they are not included in this list. // Note that this field cannot be set when spec.os.name is windows. // +optional + // +listType=atomic repeated int64 supplementalGroups = 4; // A special supplemental group that applies to all containers in a pod. @@ -3779,6 +3910,7 @@ message PodSecurityContext { // sysctls (by the container runtime) might fail to launch. // Note that this field cannot be set when spec.os.name is windows. // +optional + // +listType=atomic repeated Sysctl sysctls = 7; // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume @@ -3795,6 +3927,11 @@ message PodSecurityContext { // Note that this field cannot be set when spec.os.name is windows. // +optional optional SeccompProfile seccompProfile = 10; + + // appArmorProfile is the AppArmor options to use by the containers in this pod. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + optional AppArmorProfile appArmorProfile = 11; } // Describes the class of pods that should avoid this node. @@ -3812,6 +3949,8 @@ message PodSpec { // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys + // +listType=map + // +listMapKey=name repeated Volume volumes = 1; // List of initialization containers belonging to the pod. @@ -3829,6 +3968,8 @@ message PodSpec { // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated Container initContainers = 20; // List of containers belonging to the pod. @@ -3837,6 +3978,8 @@ message PodSpec { // Cannot be updated. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated Container containers = 2; // List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing @@ -3846,6 +3989,8 @@ message PodSpec { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated EphemeralContainer ephemeralContainers = 34; // Restart policy for all containers within the pod. @@ -3893,7 +4038,7 @@ message PodSpec { // +optional optional string serviceAccountName = 8; - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. + // DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. // Deprecated: Use serviceAccountName instead. // +k8s:conversion-gen=false // +optional @@ -3948,6 +4093,8 @@ message PodSpec { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated LocalObjectReference imagePullSecrets = 15; // Specifies the hostname of the Pod @@ -3971,13 +4118,16 @@ message PodSpec { // If specified, the pod's tolerations. // +optional + // +listType=atomic repeated Toleration tolerations = 22; // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts - // file if specified. This is only valid for non-hostNetwork pods. + // file if specified. // +optional // +patchMergeKey=ip // +patchStrategy=merge + // +listType=map + // +listMapKey=ip repeated HostAlias hostAliases = 23; // If specified, indicates the pod's priority. "system-node-critical" and @@ -4008,6 +4158,7 @@ message PodSpec { // all conditions specified in the readiness gates have status equal to "True" // More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates // +optional + // +listType=atomic repeated PodReadinessGate readinessGates = 28; // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used @@ -4069,6 +4220,7 @@ message PodSpec { // - spec.hostPID // - spec.hostIPC // - spec.hostUsers + // - spec.securityContext.appArmorProfile // - spec.securityContext.seLinuxOptions // - spec.securityContext.seccompProfile // - spec.securityContext.fsGroup @@ -4078,6 +4230,7 @@ message PodSpec { // - spec.securityContext.runAsUser // - spec.securityContext.runAsGroup // - spec.securityContext.supplementalGroups + // - spec.containers[*].securityContext.appArmorProfile // - spec.containers[*].securityContext.seLinuxOptions // - spec.containers[*].securityContext.seccompProfile // - spec.containers[*].securityContext.capabilities @@ -4109,13 +4262,10 @@ message PodSpec { // // SchedulingGates can only be set at pod creation time, and be removed only afterwards. // - // This is a beta feature enabled by the PodSchedulingReadiness feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=PodSchedulingReadiness // +optional repeated PodSchedulingGate schedulingGates = 38; @@ -4168,6 +4318,8 @@ message PodStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated PodCondition conditions = 2; // A human readable message indicating details about why the pod is in this condition. @@ -4216,6 +4368,8 @@ message PodStatus { // +optional // +patchStrategy=merge // +patchMergeKey=ip + // +listType=map + // +listMapKey=ip repeated PodIP podIPs = 12; // RFC 3339 date and time at which the object was acknowledged by the Kubelet. @@ -4227,11 +4381,13 @@ message PodStatus { // init container will have ready = true, the most recently started container will have // startTime set. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status + // +listType=atomic repeated ContainerStatus initContainerStatuses = 10; // The list has one entry per container in the manifest. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status // +optional + // +listType=atomic repeated ContainerStatus containerStatuses = 8; // The Quality of Service (QOS) classification assigned to the pod based on resource requirements @@ -4242,6 +4398,7 @@ message PodStatus { // Status for any ephemeral containers that have run in this pod. // +optional + // +listType=atomic repeated ContainerStatus ephemeralContainerStatuses = 13; // Status of resources resize desired for pod's containers. @@ -4459,6 +4616,7 @@ message ProbeHandler { message ProjectedVolumeSource { // sources is the list of volume projections // +optional + // +listType=atomic repeated VolumeProjection sources = 1; // defaultMode are the mode bits used to set permissions on created files by default. @@ -4508,6 +4666,7 @@ message QuobyteVolumeSource { message RBDPersistentVolumeSource { // monitors is a collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +listType=atomic repeated string monitors = 1; // image is the rados image name. @@ -4559,6 +4718,7 @@ message RBDPersistentVolumeSource { message RBDVolumeSource { // monitors is a collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +listType=atomic repeated string monitors = 1; // image is the rados image name. @@ -4733,6 +4893,8 @@ message ReplicationControllerStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated ReplicationControllerCondition conditions = 6; } @@ -4799,6 +4961,7 @@ message ResourceQuotaSpec { // A collection of filters that must match each object tracked by a quota. // If not specified, the quota matches all objects. // +optional + // +listType=atomic repeated string scopes = 2; // scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota @@ -4966,6 +5129,7 @@ message ScaleIOVolumeSource { message ScopeSelector { // A list of scope selector requirements by scope of the resources. // +optional + // +listType=atomic repeated ScopedResourceSelectorRequirement matchExpressions = 1; } @@ -4984,6 +5148,7 @@ message ScopedResourceSelectorRequirement { // the values array must be empty. // This array is replaced during a strategic merge patch. // +optional + // +listType=atomic repeated string values = 3; } @@ -5101,6 +5266,7 @@ message SecretProjection { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic repeated KeyToPath items = 2; // optional field specify whether the Secret or its key must be defined @@ -5140,6 +5306,7 @@ message SecretVolumeSource { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic repeated KeyToPath items = 2; // defaultMode is Optional: mode bits used to set permissions on created files by default. @@ -5244,6 +5411,12 @@ message SecurityContext { // Note that this field cannot be set when spec.os.name is windows. // +optional optional SeccompProfile seccompProfile = 11; + + // appArmorProfile is the AppArmor options to use by this container. If set, this profile + // overrides the pod's appArmorProfile. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + optional AppArmorProfile appArmorProfile = 12; } // SerializedReference is a reference to serialized object. @@ -5293,6 +5466,8 @@ message ServiceAccount { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated ObjectReference secrets = 2; // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images @@ -5300,6 +5475,7 @@ message ServiceAccount { // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod // +optional + // +listType=atomic repeated LocalObjectReference imagePullSecrets = 3; // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. @@ -5520,6 +5696,7 @@ message ServiceSpec { // at a node with this IP. A common example is external load-balancers // that are not part of the Kubernetes system. // +optional + // +listType=atomic repeated string externalIPs = 5; // Supports "ClientIP" and "None". Used to maintain session affinity. @@ -5545,6 +5722,7 @@ message ServiceSpec { // cloud-provider does not support the feature." // More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/ // +optional + // +listType=atomic repeated string loadBalancerSourceRanges = 9; // externalName is the external reference that discovery mechanisms will @@ -5660,6 +5838,17 @@ message ServiceSpec { // (possibly modified by topology and other features). // +optional optional string internalTrafficPolicy = 22; + + // TrafficDistribution offers a way to express preferences for how traffic is + // distributed to Service endpoints. Implementations can use this field as a + // hint, but are not required to guarantee strict adherence. If the field is + // not set, the implementation will apply its default routing strategy. If set + // to "PreferClose", implementations should prioritize endpoints that are + // topologically close (e.g., same zone). + // This is an alpha field and requires enabling ServiceTrafficDistribution feature. + // +featureGate=ServiceTrafficDistribution + // +optional + optional string trafficDistribution = 23; } // ServiceStatus represents the current status of a service. @@ -5838,6 +6027,7 @@ message TopologySelectorLabelRequirement { // An array of string values. One value must match the label to be selected. // Each entry in Values is ORed. + // +listType=atomic repeated string values = 2; } @@ -5850,6 +6040,7 @@ message TopologySelectorLabelRequirement { message TopologySelectorTerm { // A list of topology selector requirements by labels. // +optional + // +listType=atomic repeated TopologySelectorLabelRequirement matchLabelExpressions = 1; } @@ -5940,8 +6131,6 @@ message TopologySpreadConstraint { // In this situation, new pod with the same labelSelector cannot be scheduled, // because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, // it will violate MaxSkew. - // - // This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default). // +optional optional int32 minDomains = 5; @@ -6051,6 +6240,27 @@ message VolumeMount { // +optional optional bool readOnly = 2; + // RecursiveReadOnly specifies whether read-only mounts should be handled + // recursively. + // + // If ReadOnly is false, this field has no meaning and must be unspecified. + // + // If ReadOnly is true, and this field is set to Disabled, the mount is not made + // recursively read-only. If this field is set to IfPossible, the mount is made + // recursively read-only, if it is supported by the container runtime. If this + // field is set to Enabled, the mount is made recursively read-only if it is + // supported by the container runtime, otherwise the pod will not be started and + // an error will be generated to indicate the reason. + // + // If this field is set to IfPossible or Enabled, MountPropagation must be set to + // None (or be unspecified, which defaults to None). + // + // If this field is not specified, it is treated as an equivalent of Disabled. + // + // +featureGate=RecursiveReadOnlyMounts + // +optional + optional string recursiveReadOnly = 7; + // Path within the container at which the volume should be mounted. Must // not contain ':'. optional string mountPath = 3; @@ -6064,6 +6274,8 @@ message VolumeMount { // to container and the other way around. // When not set, MountPropagationNone is used. // This field is beta in 1.10. + // When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + // (which defaults to None). // +optional optional string mountPropagation = 5; @@ -6075,6 +6287,26 @@ message VolumeMount { optional string subPathExpr = 6; } +// VolumeMountStatus shows status of volume mounts. +message VolumeMountStatus { + // Name corresponds to the name of the original VolumeMount. + optional string name = 1; + + // MountPath corresponds to the original VolumeMount. + optional string mountPath = 2; + + // ReadOnly corresponds to the original VolumeMount. + // +optional + optional bool readOnly = 3; + + // RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). + // An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, + // depending on the mount result. + // +featureGate=RecursiveReadOnlyMounts + // +optional + optional string recursiveReadOnly = 4; +} + // VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. message VolumeNodeAffinity { // required specifies hard node constraints that must be met. diff --git a/vendor/k8s.io/api/core/v1/types.go b/vendor/k8s.io/api/core/v1/types.go index 61ba21bcad4..328df9a7b7d 100644 --- a/vendor/k8s.io/api/core/v1/types.go +++ b/vendor/k8s.io/api/core/v1/types.go @@ -331,6 +331,7 @@ type PersistentVolumeSpec struct { // accessModes contains all ways the volume can be mounted. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes // +optional + // +listType=atomic AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,3,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` // claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. // Expected to be non-nil when bound. @@ -354,6 +355,7 @@ type PersistentVolumeSpec struct { // simply fail if one is invalid. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options // +optional + // +listType=atomic MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,7,opt,name=mountOptions"` // volumeMode defines if a volume is intended to be used with a formatted filesystem // or to remain in raw block state. Value of Filesystem is implied when not included in spec. @@ -486,6 +488,7 @@ type PersistentVolumeClaimSpec struct { // accessModes contains the desired access modes the volume should have. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional + // +listType=atomic AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` // selector is a label query over volumes to consider for binding. // +optional @@ -553,7 +556,7 @@ type PersistentVolumeClaimSpec struct { // If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be // set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource // exists. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass + // More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ // (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. // +featureGate=VolumeAttributesClass // +optional @@ -660,7 +663,7 @@ type PersistentVolumeClaimCondition struct { // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` // reason is a unique, this should be a short, machine understandable string that gives the reason - // for condition's last transition. If it reports "ResizeStarted" that means the underlying + // for condition's last transition. If it reports "Resizing" that means the underlying // persistent volume is being resized. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` @@ -677,15 +680,18 @@ type PersistentVolumeClaimStatus struct { // accessModes contains the actual access modes the volume backing the PVC has. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional + // +listType=atomic AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,2,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` // capacity represents the actual resources of the underlying volume. // +optional Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,3,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` // conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - // resized then the Condition will be set to 'ResizeStarted'. + // resized then the Condition will be set to 'Resizing'. // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []PersistentVolumeClaimCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` // allocatedResources tracks the resources allocated to a PVC including its capacity. // Key names follow standard Kubernetes label syntax. Valid values are either: @@ -921,6 +927,7 @@ type GlusterfsPersistentVolumeSource struct { type RBDVolumeSource struct { // monitors is a collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +listType=atomic CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` // image is the rados image name. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it @@ -965,6 +972,7 @@ type RBDVolumeSource struct { type RBDPersistentVolumeSource struct { // monitors is a collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +listType=atomic CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` // image is the rados image name. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it @@ -1059,6 +1067,7 @@ type CinderPersistentVolumeSource struct { type CephFSVolumeSource struct { // monitors is Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +listType=atomic Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / // +optional @@ -1099,6 +1108,7 @@ type SecretReference struct { type CephFSPersistentVolumeSource struct { // monitors is Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +listType=atomic Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / // +optional @@ -1341,6 +1351,7 @@ type SecretVolumeSource struct { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // defaultMode is Optional: mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. @@ -1376,6 +1387,7 @@ type SecretProjection struct { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // optional field specify whether the Secret or its key must be defined // +optional @@ -1429,6 +1441,7 @@ type ISCSIVolumeSource struct { // portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional + // +listType=atomic Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"` // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication // +optional @@ -1475,6 +1488,7 @@ type ISCSIPersistentVolumeSource struct { // portals is the iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional + // +listType=atomic Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"` // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication // +optional @@ -1498,6 +1512,7 @@ type ISCSIPersistentVolumeSource struct { type FCVolumeSource struct { // targetWWNs is Optional: FC target worldwide names (WWNs) // +optional + // +listType=atomic TargetWWNs []string `json:"targetWWNs,omitempty" protobuf:"bytes,1,rep,name=targetWWNs"` // lun is Optional: FC target lun number // +optional @@ -1515,6 +1530,7 @@ type FCVolumeSource struct { // wwids Optional: FC volume world wide identifiers (wwids) // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. // +optional + // +listType=atomic WWIDs []string `json:"wwids,omitempty" protobuf:"bytes,5,rep,name=wwids"` } @@ -1771,6 +1787,7 @@ type ConfigMapVolumeSource struct { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // defaultMode is optional: mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. @@ -1807,6 +1824,7 @@ type ConfigMapProjection struct { // the volume setup will error unless it is marked optional. Paths must be // relative and may not contain the '..' path or start with '..'. // +optional + // +listType=atomic Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // optional specify whether the ConfigMap or its keys must be defined // +optional @@ -1875,6 +1893,7 @@ type ClusterTrustBundleProjection struct { type ProjectedVolumeSource struct { // sources is the list of volume projections // +optional + // +listType=atomic Sources []VolumeProjection `json:"sources" protobuf:"bytes,1,rep,name=sources"` // defaultMode are the mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. @@ -2137,6 +2156,26 @@ type VolumeMount struct { // Defaults to false. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` + // RecursiveReadOnly specifies whether read-only mounts should be handled + // recursively. + // + // If ReadOnly is false, this field has no meaning and must be unspecified. + // + // If ReadOnly is true, and this field is set to Disabled, the mount is not made + // recursively read-only. If this field is set to IfPossible, the mount is made + // recursively read-only, if it is supported by the container runtime. If this + // field is set to Enabled, the mount is made recursively read-only if it is + // supported by the container runtime, otherwise the pod will not be started and + // an error will be generated to indicate the reason. + // + // If this field is set to IfPossible or Enabled, MountPropagation must be set to + // None (or be unspecified, which defaults to None). + // + // If this field is not specified, it is treated as an equivalent of Disabled. + // + // +featureGate=RecursiveReadOnlyMounts + // +optional + RecursiveReadOnly *RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty" protobuf:"bytes,7,opt,name=recursiveReadOnly,casttype=RecursiveReadOnlyMode"` // Path within the container at which the volume should be mounted. Must // not contain ':'. MountPath string `json:"mountPath" protobuf:"bytes,3,opt,name=mountPath"` @@ -2148,6 +2187,8 @@ type VolumeMount struct { // to container and the other way around. // When not set, MountPropagationNone is used. // This field is beta in 1.10. + // When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + // (which defaults to None). // +optional MountPropagation *MountPropagationMode `json:"mountPropagation,omitempty" protobuf:"bytes,5,opt,name=mountPropagation,casttype=MountPropagationMode"` // Expanded path within the volume from which the container's volume should be mounted. @@ -2184,6 +2225,18 @@ const ( MountPropagationBidirectional MountPropagationMode = "Bidirectional" ) +// RecursiveReadOnlyMode describes recursive-readonly mode. +type RecursiveReadOnlyMode string + +const ( + // RecursiveReadOnlyDisabled disables recursive-readonly mode. + RecursiveReadOnlyDisabled RecursiveReadOnlyMode = "Disabled" + // RecursiveReadOnlyIfPossible enables recursive-readonly mode if possible. + RecursiveReadOnlyIfPossible RecursiveReadOnlyMode = "IfPossible" + // RecursiveReadOnlyEnabled enables recursive-readonly mode, or raise an error. + RecursiveReadOnlyEnabled RecursiveReadOnlyMode = "Enabled" +) + // volumeDevice describes a mapping of a raw block device within a container. type VolumeDevice struct { // name must match the name of a persistentVolumeClaim in the pod @@ -2347,6 +2400,7 @@ type HTTPGetAction struct { Scheme URIScheme `json:"scheme,omitempty" protobuf:"bytes,4,opt,name=scheme,casttype=URIScheme"` // Custom headers to set in the request. HTTP allows repeated headers. // +optional + // +listType=atomic HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty" protobuf:"bytes,5,rep,name=httpHeaders"` } @@ -2393,6 +2447,7 @@ type ExecAction struct { // a shell, you need to explicitly call out to that shell. // Exit status of 0 is treated as live/healthy and non-zero is unhealthy. // +optional + // +listType=atomic Command []string `json:"command,omitempty" protobuf:"bytes,1,rep,name=command"` } @@ -2514,9 +2569,11 @@ type Capability string type Capabilities struct { // Added capabilities // +optional + // +listType=atomic Add []Capability `json:"add,omitempty" protobuf:"bytes,1,rep,name=add,casttype=Capability"` // Removed capabilities // +optional + // +listType=atomic Drop []Capability `json:"drop,omitempty" protobuf:"bytes,2,rep,name=drop,casttype=Capability"` } @@ -2602,6 +2659,7 @@ type Container struct { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` // Arguments to the entrypoint. // The container image's CMD is used if this is not provided. @@ -2612,6 +2670,7 @@ type Container struct { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"` // Container's working directory. // If not specified, the container runtime's default will be used, which @@ -2640,12 +2699,15 @@ type Container struct { // Values defined by an Env with a duplicate key will take precedence. // Cannot be updated. // +optional + // +listType=atomic EnvFrom []EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"` // List of environment variables to set in the container. // Cannot be updated. // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` // Compute Resources required by this container. // Cannot be updated. @@ -2680,10 +2742,14 @@ type Container struct { // +optional // +patchMergeKey=mountPath // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` // volumeDevices is the list of block devices to be used by the container. // +patchMergeKey=devicePath // +patchStrategy=merge + // +listType=map + // +listMapKey=devicePath // +optional VolumeDevices []VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath" protobuf:"bytes,21,rep,name=volumeDevices"` // Periodic probe of container liveness. @@ -2956,6 +3022,14 @@ type ContainerStatus struct { // +featureGate=InPlacePodVerticalScaling // +optional Resources *ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,11,opt,name=resources"` + // Status of volume mounts. + // +optional + // +patchMergeKey=mountPath + // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath + // +featureGate=RecursiveReadOnlyMounts + VolumeMounts []VolumeMountStatus `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,12,rep,name=volumeMounts"` } // PodPhase is a label for the condition of a pod at the current time. @@ -3065,6 +3139,23 @@ const ( PodResizeStatusInfeasible PodResizeStatus = "Infeasible" ) +// VolumeMountStatus shows status of volume mounts. +type VolumeMountStatus struct { + // Name corresponds to the name of the original VolumeMount. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // MountPath corresponds to the original VolumeMount. + MountPath string `json:"mountPath" protobuf:"bytes,2,opt,name=mountPath"` + // ReadOnly corresponds to the original VolumeMount. + // +optional + ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` + // RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). + // An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, + // depending on the mount result. + // +featureGate=RecursiveReadOnlyMounts + // +optional + RecursiveReadOnly *RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty" protobuf:"bytes,4,opt,name=recursiveReadOnly,casttype=RecursiveReadOnlyMode"` +} + // RestartPolicy describes how the container should be restarted. // Only one of the following restart policies may be specified. // If none of the following policies is specified, the default one @@ -3123,6 +3214,7 @@ const ( // +structType=atomic type NodeSelector struct { // Required. A list of node selector terms. The terms are ORed. + // +listType=atomic NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms" protobuf:"bytes,1,rep,name=nodeSelectorTerms"` } @@ -3133,9 +3225,11 @@ type NodeSelector struct { type NodeSelectorTerm struct { // A list of node selector requirements by node's labels. // +optional + // +listType=atomic MatchExpressions []NodeSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,1,rep,name=matchExpressions"` // A list of node selector requirements by node's fields. // +optional + // +listType=atomic MatchFields []NodeSelectorRequirement `json:"matchFields,omitempty" protobuf:"bytes,2,rep,name=matchFields"` } @@ -3153,6 +3247,7 @@ type NodeSelectorRequirement struct { // array must have a single element, which will be interpreted as an integer. // This array is replaced during a strategic merge patch. // +optional + // +listType=atomic Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` } @@ -3181,6 +3276,7 @@ type TopologySelectorTerm struct { // A list of topology selector requirements by labels. // +optional + // +listType=atomic MatchLabelExpressions []TopologySelectorLabelRequirement `json:"matchLabelExpressions,omitempty" protobuf:"bytes,1,rep,name=matchLabelExpressions"` } @@ -3191,6 +3287,7 @@ type TopologySelectorLabelRequirement struct { Key string `json:"key" protobuf:"bytes,1,opt,name=key"` // An array of string values. One value must match the label to be selected. // Each entry in Values is ORed. + // +listType=atomic Values []string `json:"values" protobuf:"bytes,2,rep,name=values"` } @@ -3228,6 +3325,7 @@ type PodAffinity struct { // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. // +optional + // +listType=atomic RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"` // The scheduler will prefer to schedule pods to nodes that satisfy // the affinity expressions specified by this field, but it may choose @@ -3239,6 +3337,7 @@ type PodAffinity struct { // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` } @@ -3263,6 +3362,7 @@ type PodAntiAffinity struct { // When there are multiple elements, the lists of nodes corresponding to each // podAffinityTerm are intersected, i.e. all terms must be satisfied. // +optional + // +listType=atomic RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"` // The scheduler will prefer to schedule pods to nodes that satisfy // the anti-affinity expressions specified by this field, but it may choose @@ -3274,6 +3374,7 @@ type PodAntiAffinity struct { // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` } @@ -3302,6 +3403,7 @@ type PodAffinityTerm struct { // and the ones selected by namespaceSelector. // null or empty namespaces list and null namespaceSelector means "this pod's namespace". // +optional + // +listType=atomic Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"` // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching // the labelSelector in the specified namespaces, where co-located is defined as running on a node @@ -3318,24 +3420,24 @@ type PodAffinityTerm struct { NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,4,opt,name=namespaceSelector"` // MatchLabelKeys is a set of pod label keys to select which pods will // be taken into consideration. The keys are used to lookup values from the - // incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` + // incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` // to select the group of existing pods which pods will be taken into consideration // for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming // pod labels will be ignored. The default value is empty. - // The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. - // Also, MatchLabelKeys cannot be set when LabelSelector isn't set. + // The same key is forbidden to exist in both matchLabelKeys and labelSelector. + // Also, matchLabelKeys cannot be set when labelSelector isn't set. // This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. // +listType=atomic // +optional MatchLabelKeys []string `json:"matchLabelKeys,omitempty" protobuf:"bytes,5,opt,name=matchLabelKeys"` // MismatchLabelKeys is a set of pod label keys to select which pods will // be taken into consideration. The keys are used to lookup values from the - // incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` + // incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` // to select the group of existing pods which pods will be taken into consideration // for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming // pod labels will be ignored. The default value is empty. - // The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. - // Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. + // The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + // Also, mismatchLabelKeys cannot be set when labelSelector isn't set. // This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. // +listType=atomic // +optional @@ -3370,6 +3472,7 @@ type NodeAffinity struct { // "weight" to the sum if the node matches the corresponding matchExpressions; the // node(s) with the highest sum are the most preferred. // +optional + // +listType=atomic PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"` } @@ -3475,6 +3578,8 @@ type PodSpec struct { // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys + // +listType=map + // +listMapKey=name Volumes []Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"` // List of initialization containers belonging to the pod. // Init containers are executed in order prior to containers being started. If any @@ -3491,6 +3596,8 @@ type PodSpec struct { // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name InitContainers []Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,20,rep,name=initContainers"` // List of containers belonging to the pod. // Containers cannot currently be added or removed. @@ -3498,6 +3605,8 @@ type PodSpec struct { // Cannot be updated. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Containers []Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"` // List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing // pod to perform user-initiated actions such as debugging. This list cannot be specified when @@ -3506,6 +3615,8 @@ type PodSpec struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name EphemeralContainers []EphemeralContainer `json:"ephemeralContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,34,rep,name=ephemeralContainers"` // Restart policy for all containers within the pod. // One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. @@ -3547,7 +3658,7 @@ type PodSpec struct { // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ // +optional ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,8,opt,name=serviceAccountName"` - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. + // DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. // Deprecated: Use serviceAccountName instead. // +k8s:conversion-gen=false // +optional @@ -3595,6 +3706,8 @@ type PodSpec struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"` // Specifies the hostname of the Pod // If not specified, the pod's hostname will be set to a system-defined value. @@ -3613,12 +3726,15 @@ type PodSpec struct { SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,19,opt,name=schedulerName"` // If specified, the pod's tolerations. // +optional + // +listType=atomic Tolerations []Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"` // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts - // file if specified. This is only valid for non-hostNetwork pods. + // file if specified. // +optional // +patchMergeKey=ip // +patchStrategy=merge + // +listType=map + // +listMapKey=ip HostAliases []HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"ip" protobuf:"bytes,23,rep,name=hostAliases"` // If specified, indicates the pod's priority. "system-node-critical" and // "system-cluster-critical" are two special keywords which indicate the @@ -3645,6 +3761,7 @@ type PodSpec struct { // all conditions specified in the readiness gates have status equal to "True" // More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates // +optional + // +listType=atomic ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" protobuf:"bytes,28,opt,name=readinessGates"` // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used // to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. @@ -3699,6 +3816,7 @@ type PodSpec struct { // - spec.hostPID // - spec.hostIPC // - spec.hostUsers + // - spec.securityContext.appArmorProfile // - spec.securityContext.seLinuxOptions // - spec.securityContext.seccompProfile // - spec.securityContext.fsGroup @@ -3708,6 +3826,7 @@ type PodSpec struct { // - spec.securityContext.runAsUser // - spec.securityContext.runAsGroup // - spec.securityContext.supplementalGroups + // - spec.containers[*].securityContext.appArmorProfile // - spec.containers[*].securityContext.seLinuxOptions // - spec.containers[*].securityContext.seccompProfile // - spec.containers[*].securityContext.capabilities @@ -3739,13 +3858,10 @@ type PodSpec struct { // // SchedulingGates can only be set at pod creation time, and be removed only afterwards. // - // This is a beta feature enabled by the PodSchedulingReadiness feature gate. - // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name - // +featureGate=PodSchedulingReadiness // +optional SchedulingGates []PodSchedulingGate `json:"schedulingGates,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,38,opt,name=schedulingGates"` // ResourceClaims defines which ResourceClaims must be allocated @@ -3952,8 +4068,6 @@ type TopologySpreadConstraint struct { // In this situation, new pod with the same labelSelector cannot be scheduled, // because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, // it will violate MaxSkew. - // - // This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default). // +optional MinDomains *int32 `json:"minDomains,omitempty" protobuf:"varint,5,opt,name=minDomains"` // NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector @@ -3999,8 +4113,10 @@ const ( // pod's hosts file. type HostAlias struct { // IP address of the host file entry. - IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"` + // +required + IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"` // Hostnames for the above IP address. + // +listType=atomic Hostnames []string `json:"hostnames,omitempty" protobuf:"bytes,2,rep,name=hostnames"` } @@ -4071,6 +4187,7 @@ type PodSecurityContext struct { // even if they are not included in this list. // Note that this field cannot be set when spec.os.name is windows. // +optional + // +listType=atomic SupplementalGroups []int64 `json:"supplementalGroups,omitempty" protobuf:"varint,4,rep,name=supplementalGroups"` // A special supplemental group that applies to all containers in a pod. // Some volume types allow the Kubelet to change the ownership of that volume @@ -4088,6 +4205,7 @@ type PodSecurityContext struct { // sysctls (by the container runtime) might fail to launch. // Note that this field cannot be set when spec.os.name is windows. // +optional + // +listType=atomic Sysctls []Sysctl `json:"sysctls,omitempty" protobuf:"bytes,7,rep,name=sysctls"` // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume // before being exposed inside Pod. This field will only apply to @@ -4102,6 +4220,10 @@ type PodSecurityContext struct { // Note that this field cannot be set when spec.os.name is windows. // +optional SeccompProfile *SeccompProfile `json:"seccompProfile,omitempty" protobuf:"bytes,10,opt,name=seccompProfile"` + // appArmorProfile is the AppArmor options to use by the containers in this pod. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + AppArmorProfile *AppArmorProfile `json:"appArmorProfile,omitempty" protobuf:"bytes,11,opt,name=appArmorProfile"` } // SeccompProfile defines a pod/container's seccomp profile settings. @@ -4138,6 +4260,38 @@ const ( SeccompProfileTypeLocalhost SeccompProfileType = "Localhost" ) +// AppArmorProfile defines a pod or container's AppArmor settings. +// +union +type AppArmorProfile struct { + // type indicates which kind of AppArmor profile will be applied. + // Valid options are: + // Localhost - a profile pre-loaded on the node. + // RuntimeDefault - the container runtime's default profile. + // Unconfined - no AppArmor enforcement. + // +unionDiscriminator + Type AppArmorProfileType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=AppArmorProfileType"` + + // localhostProfile indicates a profile loaded on the node that should be used. + // The profile must be preconfigured on the node to work. + // Must match the loaded name of the profile. + // Must be set if and only if type is "Localhost". + // +optional + LocalhostProfile *string `json:"localhostProfile,omitempty" protobuf:"bytes,2,opt,name=localhostProfile"` +} + +// +enum +type AppArmorProfileType string + +const ( + // AppArmorProfileTypeUnconfined indicates that no AppArmor profile should be enforced. + AppArmorProfileTypeUnconfined AppArmorProfileType = "Unconfined" + // AppArmorProfileTypeRuntimeDefault indicates that the container runtime's default AppArmor + // profile should be used. + AppArmorProfileTypeRuntimeDefault AppArmorProfileType = "RuntimeDefault" + // AppArmorProfileTypeLocalhost indicates that a profile pre-loaded on the node should be used. + AppArmorProfileTypeLocalhost AppArmorProfileType = "Localhost" +) + // PodQOSClass defines the supported qos classes of Pods. // +enum type PodQOSClass string @@ -4158,17 +4312,20 @@ type PodDNSConfig struct { // This will be appended to the base nameservers generated from DNSPolicy. // Duplicated nameservers will be removed. // +optional + // +listType=atomic Nameservers []string `json:"nameservers,omitempty" protobuf:"bytes,1,rep,name=nameservers"` // A list of DNS search domains for host-name lookup. // This will be appended to the base search paths generated from DNSPolicy. // Duplicated search paths will be removed. // +optional + // +listType=atomic Searches []string `json:"searches,omitempty" protobuf:"bytes,2,rep,name=searches"` // A list of DNS resolver options. // This will be merged with the base options generated from DNSPolicy. // Duplicated entries will be removed. Resolution options given in Options // will override those that appear in the base DNSPolicy. // +optional + // +listType=atomic Options []PodDNSConfigOption `json:"options,omitempty" protobuf:"bytes,3,rep,name=options"` } @@ -4212,6 +4369,7 @@ type EphemeralContainerCommon struct { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` // Arguments to the entrypoint. // The image's CMD is used if this is not provided. @@ -4222,6 +4380,7 @@ type EphemeralContainerCommon struct { // of whether the variable exists or not. Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional + // +listType=atomic Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"` // Container's working directory. // If not specified, the container runtime's default will be used, which @@ -4244,12 +4403,15 @@ type EphemeralContainerCommon struct { // Values defined by an Env with a duplicate key will take precedence. // Cannot be updated. // +optional + // +listType=atomic EnvFrom []EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"` // List of environment variables to set in the container. // Cannot be updated. // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` // Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources // already allocated to the pod. @@ -4272,10 +4434,14 @@ type EphemeralContainerCommon struct { // +optional // +patchMergeKey=mountPath // +patchStrategy=merge + // +listType=map + // +listMapKey=mountPath VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` // volumeDevices is the list of block devices to be used by the container. // +patchMergeKey=devicePath // +patchStrategy=merge + // +listType=map + // +listMapKey=devicePath // +optional VolumeDevices []VolumeDevice `json:"volumeDevices,omitempty" patchStrategy:"merge" patchMergeKey:"devicePath" protobuf:"bytes,21,rep,name=volumeDevices"` // Probes are not allowed for ephemeral containers. @@ -4401,6 +4567,8 @@ type PodStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []PodCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` // A human readable message indicating details about why the pod is in this condition. // +optional @@ -4446,6 +4614,8 @@ type PodStatus struct { // +optional // +patchStrategy=merge // +patchMergeKey=ip + // +listType=map + // +listMapKey=ip PodIPs []PodIP `json:"podIPs,omitempty" protobuf:"bytes,12,rep,name=podIPs" patchStrategy:"merge" patchMergeKey:"ip"` // RFC 3339 date and time at which the object was acknowledged by the Kubelet. @@ -4457,11 +4627,13 @@ type PodStatus struct { // init container will have ready = true, the most recently started container will have // startTime set. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status + // +listType=atomic InitContainerStatuses []ContainerStatus `json:"initContainerStatuses,omitempty" protobuf:"bytes,10,rep,name=initContainerStatuses"` // The list has one entry per container in the manifest. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status // +optional + // +listType=atomic ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty" protobuf:"bytes,8,rep,name=containerStatuses"` // The Quality of Service (QOS) classification assigned to the pod based on resource requirements // See PodQOSClass type for available QOS classes @@ -4470,6 +4642,7 @@ type PodStatus struct { QOSClass PodQOSClass `json:"qosClass,omitempty" protobuf:"bytes,9,rep,name=qosClass"` // Status for any ephemeral containers that have run in this pod. // +optional + // +listType=atomic EphemeralContainerStatuses []ContainerStatus `json:"ephemeralContainerStatuses,omitempty" protobuf:"bytes,13,rep,name=ephemeralContainerStatuses"` // Status of resources resize desired for pod's containers. @@ -4658,6 +4831,8 @@ type ReplicationControllerStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []ReplicationControllerCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } @@ -4829,6 +5004,18 @@ const ( ServiceExternalTrafficPolicyTypeCluster = ServiceExternalTrafficPolicyCluster ) +// These are valid values for the TrafficDistribution field of a Service. +const ( + // Indicates a preference for routing traffic to endpoints that are + // topologically proximate to the client. The interpretation of "topologically + // proximate" may vary across implementations and could encompass endpoints + // within the same node, rack, zone, or even region. Setting this value gives + // implementations permission to make different tradeoffs, e.g. optimizing for + // proximity rather than equal distribution of load. Users should not set this + // value if such tradeoffs are not acceptable. + ServiceTrafficDistributionPreferClose = "PreferClose" +) + // These are the valid conditions of a service. const ( // LoadBalancerPortsError represents the condition of the requested ports @@ -4859,6 +5046,7 @@ type LoadBalancerStatus struct { // Ingress is a list containing ingress points for the load-balancer. // Traffic intended for the service should be sent to these ingress points. // +optional + // +listType=atomic Ingress []LoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` } @@ -5024,6 +5212,7 @@ type ServiceSpec struct { // at a node with this IP. A common example is external load-balancers // that are not part of the Kubernetes system. // +optional + // +listType=atomic ExternalIPs []string `json:"externalIPs,omitempty" protobuf:"bytes,5,rep,name=externalIPs"` // Supports "ClientIP" and "None". Used to maintain session affinity. @@ -5049,6 +5238,7 @@ type ServiceSpec struct { // cloud-provider does not support the feature." // More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/ // +optional + // +listType=atomic LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"` // externalName is the external reference that discovery mechanisms will @@ -5170,6 +5360,17 @@ type ServiceSpec struct { // (possibly modified by topology and other features). // +optional InternalTrafficPolicy *ServiceInternalTrafficPolicy `json:"internalTrafficPolicy,omitempty" protobuf:"bytes,22,opt,name=internalTrafficPolicy"` + + // TrafficDistribution offers a way to express preferences for how traffic is + // distributed to Service endpoints. Implementations can use this field as a + // hint, but are not required to guarantee strict adherence. If the field is + // not set, the implementation will apply its default routing strategy. If set + // to "PreferClose", implementations should prioritize endpoints that are + // topologically close (e.g., same zone). + // This is an alpha field and requires enabling ServiceTrafficDistribution feature. + // +featureGate=ServiceTrafficDistribution + // +optional + TrafficDistribution *string `json:"trafficDistribution,omitempty" protobuf:"bytes,23,opt,name=trafficDistribution"` } // ServicePort contains information on service's port. @@ -5303,6 +5504,8 @@ type ServiceAccount struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Secrets []ObjectReference `json:"secrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=secrets"` // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images @@ -5310,6 +5513,7 @@ type ServiceAccount struct { // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod // +optional + // +listType=atomic ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" protobuf:"bytes,3,rep,name=imagePullSecrets"` // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. @@ -5364,6 +5568,7 @@ type Endpoints struct { // NotReadyAddresses in the same subset. // Sets of addresses and ports that comprise a service. // +optional + // +listType=atomic Subsets []EndpointSubset `json:"subsets,omitempty" protobuf:"bytes,2,rep,name=subsets"` } @@ -5384,14 +5589,17 @@ type EndpointSubset struct { // IP addresses which offer the related ports that are marked as ready. These endpoints // should be considered safe for load balancers and clients to utilize. // +optional + // +listType=atomic Addresses []EndpointAddress `json:"addresses,omitempty" protobuf:"bytes,1,rep,name=addresses"` // IP addresses which offer the related ports but are not currently marked as ready // because they have not yet finished starting, have recently failed a readiness check, // or have recently failed a liveness check. // +optional + // +listType=atomic NotReadyAddresses []EndpointAddress `json:"notReadyAddresses,omitempty" protobuf:"bytes,2,rep,name=notReadyAddresses"` // Port numbers available on the related IP addresses. // +optional + // +listType=atomic Ports []EndpointPort `json:"ports,omitempty" protobuf:"bytes,3,rep,name=ports"` } @@ -5476,6 +5684,7 @@ type NodeSpec struct { // each of IPv4 and IPv6. // +optional // +patchStrategy=merge + // +listType=set PodCIDRs []string `json:"podCIDRs,omitempty" protobuf:"bytes,7,opt,name=podCIDRs" patchStrategy:"merge"` // ID of the node assigned by the cloud provider in the format: :// @@ -5487,6 +5696,7 @@ type NodeSpec struct { Unschedulable bool `json:"unschedulable,omitempty" protobuf:"varint,4,opt,name=unschedulable"` // If specified, the node's taints. // +optional + // +listType=atomic Taints []Taint `json:"taints,omitempty" protobuf:"bytes,5,opt,name=taints"` // Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed. @@ -5562,6 +5772,26 @@ type NodeDaemonEndpoints struct { KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty" protobuf:"bytes,1,opt,name=kubeletEndpoint"` } +// NodeRuntimeHandlerFeatures is a set of runtime features. +type NodeRuntimeHandlerFeatures struct { + // RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts. + // +featureGate=RecursiveReadOnlyMounts + // +optional + RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty" protobuf:"varint,1,opt,name=recursiveReadOnlyMounts"` + // Reserved: UserNamespaces *bool (varint 2, for consistency with CRI API) +} + +// NodeRuntimeHandler is a set of runtime handler information. +type NodeRuntimeHandler struct { + // Runtime handler name. + // Empty for the default runtime handler. + // +optional + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // Supported features. + // +optional + Features *NodeRuntimeHandlerFeatures `json:"features,omitempty" protobuf:"bytes,2,opt,name=features"` +} + // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. type NodeSystemInfo struct { // MachineID reported by the node. For unique machine identification @@ -5657,6 +5887,8 @@ type NodeStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []NodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` // List of addresses reachable to the node. // Queried from cloud provider, if available. @@ -5671,6 +5903,8 @@ type NodeStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Addresses []NodeAddress `json:"addresses,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,5,rep,name=addresses"` // Endpoints of daemons running on the Node. // +optional @@ -5681,16 +5915,24 @@ type NodeStatus struct { NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty" protobuf:"bytes,7,opt,name=nodeInfo"` // List of container images on this node // +optional + // +listType=atomic Images []ContainerImage `json:"images,omitempty" protobuf:"bytes,8,rep,name=images"` // List of attachable volumes in use (mounted) by the node. // +optional + // +listType=atomic VolumesInUse []UniqueVolumeName `json:"volumesInUse,omitempty" protobuf:"bytes,9,rep,name=volumesInUse"` // List of volumes that are attached to the node. // +optional + // +listType=atomic VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty" protobuf:"bytes,10,rep,name=volumesAttached"` // Status of the config assigned to the node via the dynamic Kubelet config feature. // +optional Config *NodeConfigStatus `json:"config,omitempty" protobuf:"bytes,11,opt,name=config"` + // The available runtime handlers. + // +featureGate=RecursiveReadOnlyMounts + // +optional + // +listType=atomic + RuntimeHandlers []NodeRuntimeHandler `json:"runtimeHandlers,omitempty" protobuf:"bytes,12,rep,name=runtimeHandlers"` } type UniqueVolumeName string @@ -5711,6 +5953,7 @@ type AvoidPods struct { // Bounded-sized list of signatures of pods that should avoid this node, sorted // in timestamp order from oldest to newest. Size of the slice is unspecified. // +optional + // +listType=atomic PreferAvoidPods []PreferAvoidPodsEntry `json:"preferAvoidPods,omitempty" protobuf:"bytes,1,rep,name=preferAvoidPods"` } @@ -5742,6 +5985,7 @@ type ContainerImage struct { // Names by which this image is known. // e.g. ["kubernetes.example/hyperkube:v1.0.7", "cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7"] // +optional + // +listType=atomic Names []string `json:"names" protobuf:"bytes,1,rep,name=names"` // The size of the image in bytes. // +optional @@ -5764,8 +6008,7 @@ const ( type NodeConditionType string // These are valid but not exhaustive conditions of node. A cloud provider may set a condition not listed here. -// The built-in set of conditions are: -// NodeReachable, NodeLive, NodeReady, NodeSchedulable, NodeRunnable. +// Relevant events contain "NodeReady", "NodeNotReady", "NodeSchedulable", and "NodeNotSchedulable". const ( // NodeReady means kubelet is healthy and ready to accept pods. NodeReady NodeConditionType = "Ready" @@ -5867,7 +6110,6 @@ const ( // Volume size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024) ResourceStorage ResourceName = "storage" // Local ephemeral storage, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) - // The resource name for ResourceEphemeralStorage is alpha and it can change across releases. ResourceEphemeralStorage ResourceName = "ephemeral-storage" ) @@ -5937,6 +6179,7 @@ type NamespaceSpec struct { // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ // +optional + // +listType=atomic Finalizers []FinalizerName `json:"finalizers,omitempty" protobuf:"bytes,1,rep,name=finalizers,casttype=FinalizerName"` } @@ -5951,6 +6194,8 @@ type NamespaceStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []NamespaceCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` } @@ -6188,6 +6433,7 @@ type PodExecOptions struct { Container string `json:"container,omitempty" protobuf:"bytes,5,opt,name=container"` // Command is the remote command to execute. argv array. Not executed within a shell. + // +listType=atomic Command []string `json:"command" protobuf:"bytes,6,rep,name=command"` } @@ -6206,6 +6452,7 @@ type PodPortForwardOptions struct { // List of ports to forward // Required when using WebSockets // +optional + // +listType=atomic Ports []int32 `json:"ports,omitempty" protobuf:"varint,1,rep,name=ports"` } @@ -6309,9 +6556,15 @@ type ObjectReference struct { // +structType=atomic type LocalObjectReference struct { // Name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + // This field is effectively required, but due to backwards compatibility is + // allowed to be empty. Instances of this type with an empty value here are + // almost certainly wrong. // TODO: Add other useful fields. apiVersion, kind, uid? + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // +optional + // +default="" + // +kubebuilder:default="" + // TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896. Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` } @@ -6499,6 +6752,7 @@ type LimitRangeItem struct { // LimitRangeSpec defines a min/max usage limit for resources that match on kind. type LimitRangeSpec struct { // Limits is the list of LimitRangeItem objects that are enforced. + // +listType=atomic Limits []LimitRangeItem `json:"limits" protobuf:"bytes,1,rep,name=limits"` } @@ -6607,6 +6861,7 @@ type ResourceQuotaSpec struct { // A collection of filters that must match each object tracked by a quota. // If not specified, the quota matches all objects. // +optional + // +listType=atomic Scopes []ResourceQuotaScope `json:"scopes,omitempty" protobuf:"bytes,2,rep,name=scopes,casttype=ResourceQuotaScope"` // scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota // but expressed using ScopeSelectorOperator in combination with possible values. @@ -6621,6 +6876,7 @@ type ResourceQuotaSpec struct { type ScopeSelector struct { // A list of scope selector requirements by scope of the resources. // +optional + // +listType=atomic MatchExpressions []ScopedResourceSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,1,rep,name=matchExpressions"` } @@ -6637,6 +6893,7 @@ type ScopedResourceSelectorRequirement struct { // the values array must be empty. // This array is replaced during a strategic merge patch. // +optional + // +listType=atomic Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` } @@ -6936,6 +7193,8 @@ type ComponentStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []ComponentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` } @@ -6959,6 +7218,7 @@ type ComponentStatusList struct { type DownwardAPIVolumeSource struct { // Items is a list of downward API volume file // +optional + // +listType=atomic Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"` // Optional: mode bits to use on created files by default. Must be a // Optional: mode bits used to set permissions on created files by default. @@ -6980,7 +7240,7 @@ const ( type DownwardAPIVolumeFile struct { // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' Path string `json:"path" protobuf:"bytes,1,opt,name=path"` - // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + // Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. // +optional FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,2,opt,name=fieldRef"` // Selects a resource of the container: only resources limits and requests @@ -7003,6 +7263,7 @@ type DownwardAPIVolumeFile struct { type DownwardAPIProjection struct { // Items is a list of DownwardAPIVolume file // +optional + // +listType=atomic Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"` } @@ -7083,6 +7344,11 @@ type SecurityContext struct { // Note that this field cannot be set when spec.os.name is windows. // +optional SeccompProfile *SeccompProfile `json:"seccompProfile,omitempty" protobuf:"bytes,11,opt,name=seccompProfile"` + // appArmorProfile is the AppArmor options to use by this container. If set, this profile + // overrides the pod's appArmorProfile. + // Note that this field cannot be set when spec.os.name is windows. + // +optional + AppArmorProfile *AppArmorProfile `json:"appArmorProfile,omitempty" protobuf:"bytes,12,opt,name=appArmorProfile"` } // +enum @@ -7178,13 +7444,6 @@ type Sysctl struct { Value string `json:"value" protobuf:"bytes,2,opt,name=value"` } -// NodeResources is an object for conveying resource information about a node. -// see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details. -type NodeResources struct { - // Capacity represents the available resources of a node - Capacity ResourceList `protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` -} - const ( // Enable stdin for remote command execution ExecStdinParam = "input" diff --git a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index fd6f7dc61b9..c54f2a2fe50 100644 --- a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -50,6 +50,16 @@ func (Affinity) SwaggerDoc() map[string]string { return map_Affinity } +var map_AppArmorProfile = map[string]string{ + "": "AppArmorProfile defines a pod or container's AppArmor settings.", + "type": "type indicates which kind of AppArmor profile will be applied. Valid options are:\n Localhost - a profile pre-loaded on the node.\n RuntimeDefault - the container runtime's default profile.\n Unconfined - no AppArmor enforcement.", + "localhostProfile": "localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is \"Localhost\".", +} + +func (AppArmorProfile) SwaggerDoc() map[string]string { + return map_AppArmorProfile +} + var map_AttachedVolume = map[string]string{ "": "AttachedVolume describes a volume attached to a node", "name": "Name of the attached volume", @@ -471,6 +481,7 @@ var map_ContainerStatus = map[string]string{ "started": "Started indicates whether the container has finished its postStart lifecycle hook and passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. In both cases, startup probes will run again. Is always true when no startupProbe is defined and container is running and has passed the postStart lifecycle hook. The null value must be treated the same as false.", "allocatedResources": "AllocatedResources represents the compute resources allocated for this container by the node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission and after successfully admitting desired pod resize.", "resources": "Resources represents the compute resource requests and limits that have been successfully enacted on the running container after it has been started or has been successfully resized.", + "volumeMounts": "Status of volume mounts.", } func (ContainerStatus) SwaggerDoc() map[string]string { @@ -498,7 +509,7 @@ func (DownwardAPIProjection) SwaggerDoc() map[string]string { var map_DownwardAPIVolumeFile = map[string]string{ "": "DownwardAPIVolumeFile represents information to create the file containing the pod field", "path": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", - "fieldRef": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", + "fieldRef": "Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported.", "resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", "mode": "Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", } @@ -1021,7 +1032,7 @@ func (LoadBalancerStatus) SwaggerDoc() map[string]string { var map_LocalObjectReference = map[string]string{ "": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", - "name": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "name": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", } func (LocalObjectReference) SwaggerDoc() map[string]string { @@ -1203,13 +1214,23 @@ func (NodeProxyOptions) SwaggerDoc() map[string]string { return map_NodeProxyOptions } -var map_NodeResources = map[string]string{ - "": "NodeResources is an object for conveying resource information about a node. see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details.", - "Capacity": "Capacity represents the available resources of a node", +var map_NodeRuntimeHandler = map[string]string{ + "": "NodeRuntimeHandler is a set of runtime handler information.", + "name": "Runtime handler name. Empty for the default runtime handler.", + "features": "Supported features.", +} + +func (NodeRuntimeHandler) SwaggerDoc() map[string]string { + return map_NodeRuntimeHandler } -func (NodeResources) SwaggerDoc() map[string]string { - return map_NodeResources +var map_NodeRuntimeHandlerFeatures = map[string]string{ + "": "NodeRuntimeHandlerFeatures is a set of runtime features.", + "recursiveReadOnlyMounts": "RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts.", +} + +func (NodeRuntimeHandlerFeatures) SwaggerDoc() map[string]string { + return map_NodeRuntimeHandlerFeatures } var map_NodeSelector = map[string]string{ @@ -1270,6 +1291,7 @@ var map_NodeStatus = map[string]string{ "volumesInUse": "List of attachable volumes in use (mounted) by the node.", "volumesAttached": "List of volumes that are attached to the node.", "config": "Status of the config assigned to the node via the dynamic Kubelet config feature.", + "runtimeHandlers": "The available runtime handlers.", } func (NodeStatus) SwaggerDoc() map[string]string { @@ -1345,7 +1367,7 @@ var map_PersistentVolumeClaimCondition = map[string]string{ "": "PersistentVolumeClaimCondition contains details about state of pvc", "lastProbeTime": "lastProbeTime is the time we probed the condition.", "lastTransitionTime": "lastTransitionTime is the time the condition transitioned from one status to another.", - "reason": "reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.", + "reason": "reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"Resizing\" that means the underlying persistent volume is being resized.", "message": "message is the human-readable message indicating details about last transition.", } @@ -1373,7 +1395,7 @@ var map_PersistentVolumeClaimSpec = map[string]string{ "volumeMode": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", "dataSource": "dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.", "dataSourceRef": "dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While dataSource ignores disallowed values (dropping them), dataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n* While dataSource only allows local objects, dataSourceRef allows objects\n in any namespaces.\n(Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.", - "volumeAttributesClassName": "volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled.", + "volumeAttributesClassName": "volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled.", } func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string { @@ -1385,7 +1407,7 @@ var map_PersistentVolumeClaimStatus = map[string]string{ "phase": "phase represents the current phase of PersistentVolumeClaim.", "accessModes": "accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", "capacity": "capacity represents the actual resources of the underlying volume.", - "conditions": "conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.", + "conditions": "conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'Resizing'.", "allocatedResources": "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", "allocatedResourceStatuses": "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", "currentVolumeAttributesClassName": "currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim This is an alpha field and requires enabling VolumeAttributesClass feature.", @@ -1522,8 +1544,8 @@ var map_PodAffinityTerm = map[string]string{ "namespaces": "namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\".", "topologyKey": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", "namespaceSelector": "A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces.", - "matchLabelKeys": "MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.", - "mismatchLabelKeys": "MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.", + "matchLabelKeys": "MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.", + "mismatchLabelKeys": "MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.", } func (PodAffinityTerm) SwaggerDoc() map[string]string { @@ -1714,6 +1736,7 @@ var map_PodSecurityContext = map[string]string{ "sysctls": "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.", "fsGroupChangePolicy": "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used. Note that this field cannot be set when spec.os.name is windows.", "seccompProfile": "The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", + "appArmorProfile": "appArmorProfile is the AppArmor options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", } func (PodSecurityContext) SwaggerDoc() map[string]string { @@ -1741,7 +1764,7 @@ var map_PodSpec = map[string]string{ "dnsPolicy": "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", "nodeSelector": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", "serviceAccountName": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", - "serviceAccount": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", + "serviceAccount": "DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", "automountServiceAccountToken": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", "nodeName": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.", "hostNetwork": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", @@ -1755,7 +1778,7 @@ var map_PodSpec = map[string]string{ "affinity": "If specified, the pod's scheduling constraints", "schedulerName": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", "tolerations": "If specified, the pod's tolerations.", - "hostAliases": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.", + "hostAliases": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified.", "priorityClassName": "If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.", "priority": "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.", "dnsConfig": "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", @@ -1766,9 +1789,9 @@ var map_PodSpec = map[string]string{ "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md", "topologySpreadConstraints": "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.", "setHostnameAsFQDN": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", - "os": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", + "os": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.appArmorProfile - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.appArmorProfile - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", "hostUsers": "Use the host's user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature.", - "schedulingGates": "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod.\n\nSchedulingGates can only be set at pod creation time, and be removed only afterwards.\n\nThis is a beta feature enabled by the PodSchedulingReadiness feature gate.", + "schedulingGates": "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod.\n\nSchedulingGates can only be set at pod creation time, and be removed only afterwards.", "resourceClaims": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", } @@ -2283,6 +2306,7 @@ var map_SecurityContext = map[string]string{ "allowPrivilegeEscalation": "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.", "procMount": "procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.", "seccompProfile": "The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.", + "appArmorProfile": "appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows.", } func (SecurityContext) SwaggerDoc() map[string]string { @@ -2396,6 +2420,7 @@ var map_ServiceSpec = map[string]string{ "allocateLoadBalancerNodePorts": "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.", "loadBalancerClass": "loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.", "internalTrafficPolicy": "InternalTrafficPolicy describes how nodes distribute service traffic they receive on the ClusterIP. If set to \"Local\", the proxy will assume that pods only want to talk to endpoints of the service on the same node as the pod, dropping the traffic if there are no local endpoints. The default value, \"Cluster\", uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features).", + "trafficDistribution": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature.", } func (ServiceSpec) SwaggerDoc() map[string]string { @@ -2578,19 +2603,32 @@ func (VolumeDevice) SwaggerDoc() map[string]string { } var map_VolumeMount = map[string]string{ - "": "VolumeMount describes a mounting of a Volume within a container.", - "name": "This must match the Name of a Volume.", - "readOnly": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", - "mountPath": "Path within the container at which the volume should be mounted. Must not contain ':'.", - "subPath": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", - "mountPropagation": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.", - "subPathExpr": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.", + "": "VolumeMount describes a mounting of a Volume within a container.", + "name": "This must match the Name of a Volume.", + "readOnly": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", + "recursiveReadOnly": "RecursiveReadOnly specifies whether read-only mounts should be handled recursively.\n\nIf ReadOnly is false, this field has no meaning and must be unspecified.\n\nIf ReadOnly is true, and this field is set to Disabled, the mount is not made recursively read-only. If this field is set to IfPossible, the mount is made recursively read-only, if it is supported by the container runtime. If this field is set to Enabled, the mount is made recursively read-only if it is supported by the container runtime, otherwise the pod will not be started and an error will be generated to indicate the reason.\n\nIf this field is set to IfPossible or Enabled, MountPropagation must be set to None (or be unspecified, which defaults to None).\n\nIf this field is not specified, it is treated as an equivalent of Disabled.", + "mountPath": "Path within the container at which the volume should be mounted. Must not contain ':'.", + "subPath": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", + "mountPropagation": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified (which defaults to None).", + "subPathExpr": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.", } func (VolumeMount) SwaggerDoc() map[string]string { return map_VolumeMount } +var map_VolumeMountStatus = map[string]string{ + "": "VolumeMountStatus shows status of volume mounts.", + "name": "Name corresponds to the name of the original VolumeMount.", + "mountPath": "MountPath corresponds to the original VolumeMount.", + "readOnly": "ReadOnly corresponds to the original VolumeMount.", + "recursiveReadOnly": "RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, depending on the mount result.", +} + +func (VolumeMountStatus) SwaggerDoc() map[string]string { + return map_VolumeMountStatus +} + var map_VolumeNodeAffinity = map[string]string{ "": "VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.", "required": "required specifies hard node constraints that must be met.", diff --git a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go index 45172e0e233..08e927848ec 100644 --- a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go @@ -74,6 +74,27 @@ func (in *Affinity) DeepCopy() *Affinity { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AppArmorProfile) DeepCopyInto(out *AppArmorProfile) { + *out = *in + if in.LocalhostProfile != nil { + in, out := &in.LocalhostProfile, &out.LocalhostProfile + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppArmorProfile. +func (in *AppArmorProfile) DeepCopy() *AppArmorProfile { + if in == nil { + return nil + } + out := new(AppArmorProfile) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AttachedVolume) DeepCopyInto(out *AttachedVolume) { *out = *in @@ -1041,6 +1062,13 @@ func (in *ContainerStatus) DeepCopyInto(out *ContainerStatus) { *out = new(ResourceRequirements) (*in).DeepCopyInto(*out) } + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]VolumeMountStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -2726,24 +2754,43 @@ func (in *NodeProxyOptions) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeResources) DeepCopyInto(out *NodeResources) { +func (in *NodeRuntimeHandler) DeepCopyInto(out *NodeRuntimeHandler) { *out = *in - if in.Capacity != nil { - in, out := &in.Capacity, &out.Capacity - *out = make(ResourceList, len(*in)) - for key, val := range *in { - (*out)[key] = val.DeepCopy() - } + if in.Features != nil { + in, out := &in.Features, &out.Features + *out = new(NodeRuntimeHandlerFeatures) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandler. +func (in *NodeRuntimeHandler) DeepCopy() *NodeRuntimeHandler { + if in == nil { + return nil + } + out := new(NodeRuntimeHandler) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeRuntimeHandlerFeatures) DeepCopyInto(out *NodeRuntimeHandlerFeatures) { + *out = *in + if in.RecursiveReadOnlyMounts != nil { + in, out := &in.RecursiveReadOnlyMounts, &out.RecursiveReadOnlyMounts + *out = new(bool) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResources. -func (in *NodeResources) DeepCopy() *NodeResources { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeRuntimeHandlerFeatures. +func (in *NodeRuntimeHandlerFeatures) DeepCopy() *NodeRuntimeHandlerFeatures { if in == nil { return nil } - out := new(NodeResources) + out := new(NodeRuntimeHandlerFeatures) in.DeepCopyInto(out) return out } @@ -2908,6 +2955,13 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { *out = new(NodeConfigStatus) (*in).DeepCopyInto(*out) } + if in.RuntimeHandlers != nil { + in, out := &in.RuntimeHandlers, &out.RuntimeHandlers + *out = make([]NodeRuntimeHandler, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -4021,6 +4075,11 @@ func (in *PodSecurityContext) DeepCopyInto(out *PodSecurityContext) { *out = new(SeccompProfile) (*in).DeepCopyInto(*out) } + if in.AppArmorProfile != nil { + in, out := &in.AppArmorProfile, &out.AppArmorProfile + *out = new(AppArmorProfile) + (*in).DeepCopyInto(*out) + } return } @@ -5411,6 +5470,11 @@ func (in *SecurityContext) DeepCopyInto(out *SecurityContext) { *out = new(SeccompProfile) (*in).DeepCopyInto(*out) } + if in.AppArmorProfile != nil { + in, out := &in.AppArmorProfile, &out.AppArmorProfile + *out = new(AppArmorProfile) + (*in).DeepCopyInto(*out) + } return } @@ -5715,6 +5779,11 @@ func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { *out = new(ServiceInternalTrafficPolicy) **out = **in } + if in.TrafficDistribution != nil { + in, out := &in.TrafficDistribution, &out.TrafficDistribution + *out = new(string) + **out = **in + } return } @@ -6073,6 +6142,11 @@ func (in *VolumeDevice) DeepCopy() *VolumeDevice { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VolumeMount) DeepCopyInto(out *VolumeMount) { *out = *in + if in.RecursiveReadOnly != nil { + in, out := &in.RecursiveReadOnly, &out.RecursiveReadOnly + *out = new(RecursiveReadOnlyMode) + **out = **in + } if in.MountPropagation != nil { in, out := &in.MountPropagation, &out.MountPropagation *out = new(MountPropagationMode) @@ -6091,6 +6165,27 @@ func (in *VolumeMount) DeepCopy() *VolumeMount { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeMountStatus) DeepCopyInto(out *VolumeMountStatus) { + *out = *in + if in.RecursiveReadOnly != nil { + in, out := &in.RecursiveReadOnly, &out.RecursiveReadOnly + *out = new(RecursiveReadOnlyMode) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeMountStatus. +func (in *VolumeMountStatus) DeepCopy() *VolumeMountStatus { + if in == nil { + return nil + } + out := new(VolumeMountStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VolumeNodeAffinity) DeepCopyInto(out *VolumeNodeAffinity) { *out = *in diff --git a/vendor/k8s.io/api/discovery/v1/generated.pb.go b/vendor/k8s.io/api/discovery/v1/generated.pb.go index 79f2cc09d8d..5792481dc18 100644 --- a/vendor/k8s.io/api/discovery/v1/generated.pb.go +++ b/vendor/k8s.io/api/discovery/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1/generated.proto +// source: k8s.io/api/discovery/v1/generated.proto package v1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Endpoint) Reset() { *m = Endpoint{} } func (*Endpoint) ProtoMessage() {} func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{0} + return fileDescriptor_2237b452324cf77e, []int{0} } func (m *Endpoint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_Endpoint proto.InternalMessageInfo func (m *EndpointConditions) Reset() { *m = EndpointConditions{} } func (*EndpointConditions) ProtoMessage() {} func (*EndpointConditions) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{1} + return fileDescriptor_2237b452324cf77e, []int{1} } func (m *EndpointConditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_EndpointConditions proto.InternalMessageInfo func (m *EndpointHints) Reset() { *m = EndpointHints{} } func (*EndpointHints) ProtoMessage() {} func (*EndpointHints) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{2} + return fileDescriptor_2237b452324cf77e, []int{2} } func (m *EndpointHints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_EndpointHints proto.InternalMessageInfo func (m *EndpointPort) Reset() { *m = EndpointPort{} } func (*EndpointPort) ProtoMessage() {} func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{3} + return fileDescriptor_2237b452324cf77e, []int{3} } func (m *EndpointPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_EndpointPort proto.InternalMessageInfo func (m *EndpointSlice) Reset() { *m = EndpointSlice{} } func (*EndpointSlice) ProtoMessage() {} func (*EndpointSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{4} + return fileDescriptor_2237b452324cf77e, []int{4} } func (m *EndpointSlice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_EndpointSlice proto.InternalMessageInfo func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} } func (*EndpointSliceList) ProtoMessage() {} func (*EndpointSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{5} + return fileDescriptor_2237b452324cf77e, []int{5} } func (m *EndpointSliceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +217,7 @@ var xxx_messageInfo_EndpointSliceList proto.InternalMessageInfo func (m *ForZone) Reset() { *m = ForZone{} } func (*ForZone) ProtoMessage() {} func (*ForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_3a5d310fb1396ddf, []int{6} + return fileDescriptor_2237b452324cf77e, []int{6} } func (m *ForZone) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -254,67 +254,66 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1/generated.proto", fileDescriptor_3a5d310fb1396ddf) -} - -var fileDescriptor_3a5d310fb1396ddf = []byte{ - // 893 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4d, 0x6f, 0xe3, 0x44, - 0x18, 0x8e, 0x9b, 0x86, 0xda, 0x93, 0x56, 0xec, 0x8e, 0x90, 0x1a, 0x05, 0x14, 0x87, 0xa0, 0x45, - 0x91, 0x2a, 0x6c, 0x5a, 0x21, 0xb4, 0x20, 0x21, 0x51, 0xb3, 0x65, 0x97, 0xaf, 0x52, 0xcd, 0xf6, - 0xb4, 0x42, 0x5a, 0x5c, 0xfb, 0xad, 0x63, 0xd2, 0xcc, 0x58, 0x33, 0x93, 0x48, 0xe1, 0xc4, 0x85, - 0x33, 0xfc, 0x22, 0x8e, 0xa8, 0xc7, 0xbd, 0xb1, 0x27, 0x8b, 0x9a, 0xbf, 0xc0, 0x69, 0x4f, 0x68, - 0xc6, 0x9f, 0x25, 0x8d, 0xb2, 0x37, 0xcf, 0x33, 0xcf, 0xf3, 0x7e, 0x3c, 0x33, 0xf3, 0x1a, 0x7d, - 0x3e, 0x7d, 0x28, 0x9c, 0x98, 0xb9, 0xd3, 0xf9, 0x05, 0x70, 0x0a, 0x12, 0x84, 0xbb, 0x00, 0x1a, - 0x32, 0xee, 0x16, 0x1b, 0x7e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, 0xeb, - 0xe5, 0xcd, 0xa0, 0xf5, 0x4b, 0x36, 0x30, 0xae, 0xb3, 0x81, 0xf1, 0x22, 0x1b, 0x18, 0x2f, 0xb3, - 0x81, 0xf1, 0x77, 0x36, 0x30, 0x7e, 0xff, 0x67, 0xd0, 0x7a, 0xb6, 0xbf, 0xe6, 0xa7, 0xfe, 0x5f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x2e, 0xd0, 0xcc, 0x2e, 0x07, 0x08, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/discovery/v1/generated.proto", fileDescriptor_2237b452324cf77e) +} + +var fileDescriptor_2237b452324cf77e = []byte{ + // 877 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4d, 0x6f, 0xdc, 0x44, + 0x18, 0x5e, 0x67, 0x63, 0x62, 0x8f, 0x13, 0xd1, 0x8e, 0x90, 0x62, 0x2d, 0xc8, 0x5e, 0x8c, 0x0a, + 0x2b, 0x45, 0x78, 0x49, 0x84, 0x50, 0x41, 0xe2, 0x10, 0xd3, 0xd0, 0xf2, 0x15, 0xa2, 0x69, 0x4e, + 0x15, 0x52, 0x71, 0xec, 0x37, 0x5e, 0x93, 0xd8, 0x63, 0x79, 0x26, 0x2b, 0x2d, 0x27, 0x2e, 0x9c, + 0xe1, 0x17, 0x71, 0x44, 0x39, 0xf6, 0x46, 0x4f, 0x16, 0x31, 0x7f, 0x81, 0x53, 0x4f, 0x68, 0xc6, + 0x9f, 0x61, 0xb3, 0xda, 0xde, 0x3c, 0xcf, 0x3c, 0xcf, 0xfb, 0xf1, 0xcc, 0xcc, 0x6b, 0xf4, 0xc1, + 0xc5, 0x43, 0xe6, 0xc6, 0x74, 0xea, 0x67, 0xf1, 0x34, 0x8c, 0x59, 0x40, 0xe7, 0x90, 0x2f, 0xa6, + 0xf3, 0xfd, 0x69, 0x04, 0x29, 0xe4, 0x3e, 0x87, 0xd0, 0xcd, 0x72, 0xca, 0x29, 0xde, 0xad, 0x88, + 0xae, 0x9f, 0xc5, 0x6e, 0x4b, 0x74, 0xe7, 0xfb, 0xa3, 0x0f, 0xa3, 0x98, 0xcf, 0xae, 0xce, 0xdc, + 0x80, 0x26, 0xd3, 0x88, 0x46, 0x74, 0x2a, 0xf9, 0x67, 0x57, 0xe7, 0x72, 0x25, 0x17, 0xf2, 0xab, + 0x8a, 0x33, 0x72, 0x7a, 0x09, 0x03, 0x9a, 0xc3, 0x1d, 0xb9, 0x46, 0x1f, 0x77, 0x9c, 0xc4, 0x0f, + 0x66, 0x71, 0x2a, 0x6a, 0xca, 0x2e, 0x22, 0x01, 0xb0, 0x69, 0x02, 0xdc, 0xbf, 0x4b, 0x35, 0x5d, + 0xa5, 0xca, 0xaf, 0x52, 0x1e, 0x27, 0xb0, 0x24, 0xf8, 0x64, 0x9d, 0x80, 0x05, 0x33, 0x48, 0xfc, + 0xff, 0xeb, 0x9c, 0x7f, 0x37, 0x91, 0x76, 0x94, 0x86, 0x19, 0x8d, 0x53, 0x8e, 0xf7, 0x90, 0xee, + 0x87, 0x61, 0x0e, 0x8c, 0x01, 0x33, 0x95, 0xf1, 0x70, 0xa2, 0x7b, 0x3b, 0x65, 0x61, 0xeb, 0x87, + 0x0d, 0x48, 0xba, 0x7d, 0xfc, 0x1c, 0xa1, 0x80, 0xa6, 0x61, 0xcc, 0x63, 0x9a, 0x32, 0x73, 0x63, + 0xac, 0x4c, 0x8c, 0x83, 0x3d, 0x77, 0x85, 0xb3, 0x6e, 0x93, 0xe3, 0x8b, 0x56, 0xe2, 0xe1, 0xeb, + 0xc2, 0x1e, 0x94, 0x85, 0x8d, 0x3a, 0x8c, 0xf4, 0x42, 0xe2, 0x09, 0xd2, 0x66, 0x94, 0xf1, 0xd4, + 0x4f, 0xc0, 0x1c, 0x8e, 0x95, 0x89, 0xee, 0x6d, 0x97, 0x85, 0xad, 0x3d, 0xa9, 0x31, 0xd2, 0x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x4b, 0xf9, 0xbb, 0xb4, 0x94, 0xdf, 0xff, 0xb1, 0x06, 0xcf, 0x76, 0x57, 0xfc, 0xd4, 0xff, + 0x0b, 0x00, 0x00, 0xff, 0xff, 0x76, 0x4b, 0x26, 0xe3, 0xee, 0x07, 0x00, 0x00, } func (m *Endpoint) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go b/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go index fcb9136e742..46935574bf6 100644 --- a/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1beta1/generated.proto +// source: k8s.io/api/discovery/v1beta1/generated.proto package v1beta1 @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Endpoint) Reset() { *m = Endpoint{} } func (*Endpoint) ProtoMessage() {} func (*Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{0} + return fileDescriptor_6555bad15de200e0, []int{0} } func (m *Endpoint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_Endpoint proto.InternalMessageInfo func (m *EndpointConditions) Reset() { *m = EndpointConditions{} } func (*EndpointConditions) ProtoMessage() {} func (*EndpointConditions) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{1} + return fileDescriptor_6555bad15de200e0, []int{1} } func (m *EndpointConditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_EndpointConditions proto.InternalMessageInfo func (m *EndpointHints) Reset() { *m = EndpointHints{} } func (*EndpointHints) ProtoMessage() {} func (*EndpointHints) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{2} + return fileDescriptor_6555bad15de200e0, []int{2} } func (m *EndpointHints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +133,7 @@ var xxx_messageInfo_EndpointHints proto.InternalMessageInfo func (m *EndpointPort) Reset() { *m = EndpointPort{} } func (*EndpointPort) ProtoMessage() {} func (*EndpointPort) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{3} + return fileDescriptor_6555bad15de200e0, []int{3} } func (m *EndpointPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +161,7 @@ var xxx_messageInfo_EndpointPort proto.InternalMessageInfo func (m *EndpointSlice) Reset() { *m = EndpointSlice{} } func (*EndpointSlice) ProtoMessage() {} func (*EndpointSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{4} + return fileDescriptor_6555bad15de200e0, []int{4} } func (m *EndpointSlice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ var xxx_messageInfo_EndpointSlice proto.InternalMessageInfo func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} } func (*EndpointSliceList) ProtoMessage() {} func (*EndpointSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{5} + return fileDescriptor_6555bad15de200e0, []int{5} } func (m *EndpointSliceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +217,7 @@ var xxx_messageInfo_EndpointSliceList proto.InternalMessageInfo func (m *ForZone) Reset() { *m = ForZone{} } func (*ForZone) ProtoMessage() {} func (*ForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_ece80bbc872d519b, []int{6} + return fileDescriptor_6555bad15de200e0, []int{6} } func (m *ForZone) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -254,66 +254,65 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1beta1/generated.proto", fileDescriptor_ece80bbc872d519b) -} - -var fileDescriptor_ece80bbc872d519b = []byte{ - // 871 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0x8e, 0x9b, 0x86, 0xda, 0x93, 0x56, 0xec, 0x8e, 0x38, 0x44, 0xa5, 0xb2, 0x23, 0xa3, 0x45, - 0x11, 0x15, 0x36, 0xad, 0x56, 0x68, 0x05, 0xa7, 0x1a, 0x0a, 0x8b, 0xb4, 0xec, 0x56, 0xd3, 0x4a, - 0x48, 0x2b, 0x0e, 0x4c, 0xec, 0xa9, 0x63, 0xd2, 0xcc, 0x58, 0x33, 0x93, 0x48, 0xb9, 0xf1, 0x0f, - 0xe0, 0xb7, 0xf0, 0x17, 0x90, 0x50, 0x8f, 0x7b, 0xdc, 0x93, 0x45, 0xcd, 0xbf, 0xe8, 0x09, 0xcd, - 0x78, 0x6c, 0x27, 0x04, 0xba, 0xb9, 0x79, 0xbe, 0x79, 0xdf, 0xf7, 0xde, 0xfb, 0xde, 0xcc, 0x18, - 0x9c, 0x4f, 0x9f, 0x89, 0x20, 0x63, 0xe1, 0x74, 0x3e, 0x26, 0x9c, 0x12, 0x49, 0x44, 0xb8, 0x20, - 0x34, 0x61, 0x3c, 0x34, 0x1b, 0x38, 0xcf, 0xc2, 0x24, 0x13, 0x31, 0x5b, 0x10, 0xbe, 0x0c, 0x17, - 0x27, 0x63, 0x22, 0xf1, 0x49, 0x98, 0x12, 0x4a, 0x38, 0x96, 0x24, 0x09, 0x72, 0xce, 0x24, 0x83, - 0x47, 0x55, 0x74, 0x80, 0xf3, 0x2c, 0x68, 0xa2, 0x03, 0x13, 0x7d, 0xf8, 0x69, 0x9a, 0xc9, 0xc9, - 0x7c, 0x1c, 0xc4, 0x6c, 0x16, 0xa6, 0x2c, 0x65, 0xa1, 0x26, 0x8d, 0xe7, 0xd7, 0x7a, 0xa5, 0x17, - 0xfa, 0xab, 0x12, 0x3b, 0xf4, 0x57, 0x52, 0xc7, 0x8c, 0x93, 0x70, 0xb1, 0x91, 0xf0, 0xf0, 0x69, - 0x1b, 0x33, 0xc3, 0xf1, 0x24, 0xa3, 0xaa, 0xba, 0x7c, 0x9a, 0x2a, 0x40, 0x84, 0x33, 0x22, 0xf1, - 0x7f, 0xb1, 0xc2, 0xff, 0x63, 0xf1, 0x39, 0x95, 0xd9, 0x8c, 0x6c, 0x10, 0x3e, 0x7f, 0x17, 0x41, - 0xc4, 0x13, 0x32, 0xc3, 0xff, 0xe6, 0xf9, 0xbf, 0xef, 0x02, 0xfb, 0x9c, 0x26, 0x39, 0xcb, 0xa8, - 0x84, 0xc7, 0xc0, 0xc1, 0x49, 0xc2, 0x89, 0x10, 0x44, 0x0c, 0xac, 0x61, 0x77, 0xe4, 0x44, 0x07, - 0x65, 0xe1, 0x39, 0x67, 0x35, 0x88, 0xda, 0x7d, 0x98, 0x00, 0x10, 0x33, 0x9a, 0x64, 0x32, 0x63, - 0x54, 0x0c, 0x76, 0x86, 0xd6, 0xa8, 0x7f, 0xfa, 0x59, 0xf0, 0x90, 0xbd, 0x41, 0x9d, 0xe8, 0xab, - 0x86, 0x17, 0xc1, 0xdb, 0xc2, 0xeb, 0x94, 0x85, 0x07, 0x5a, 0x0c, 0xad, 0xe8, 0xc2, 0x11, 0xb0, - 0x27, 0x4c, 0x48, 0x8a, 0x67, 0x64, 0xd0, 0x1d, 0x5a, 0x23, 0x27, 0xda, 0x2f, 0x0b, 0xcf, 0x7e, - 0x6e, 0x30, 0xd4, 0xec, 0xc2, 0x0b, 0xe0, 0x48, 0xcc, 0x53, 0x22, 0x11, 0xb9, 0x1e, 0xec, 0xea, - 0x72, 0x3e, 0x5a, 0x2d, 0x47, 0x0d, 0x28, 0x58, 0x9c, 0x04, 0xaf, 0xc6, 0x3f, 0x93, 0x58, 0x05, - 0x11, 0x4e, 0x68, 0x4c, 0xaa, 0x0e, 0xaf, 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c7, 0xdb, 0xdd, 0x84, 0xe8, 0xb1, 0xc9, 0xe5, 0xd4, 0x88, 0x40, 0xad, 0x16, 0x7c, 0x05, - 0x7a, 0xca, 0x4d, 0x31, 0xe8, 0x6a, 0xd1, 0x4f, 0xb6, 0x13, 0x55, 0x63, 0x88, 0x0e, 0x8c, 0x70, - 0x4f, 0xad, 0x04, 0xaa, 0x74, 0xfc, 0x3f, 0x2c, 0xf0, 0x78, 0xcd, 0xe3, 0x17, 0x99, 0x90, 0xf0, - 0xc7, 0x0d, 0x9f, 0x83, 0xed, 0x7c, 0x56, 0x6c, 0xed, 0x72, 0x73, 0x40, 0x6b, 0x64, 0xc5, 0xe3, - 0x0b, 0xd0, 0xcb, 0x24, 0x99, 0xd5, 0xce, 0x6c, 0xf9, 0x46, 0xe8, 0xea, 0xda, 0x2e, 0xbe, 0x53, - 0x0a, 0xa8, 0x12, 0xf2, 0x8f, 0xc1, 0x9e, 0xb9, 0x08, 0x70, 0xb8, 0x76, 0xd8, 0xf7, 0x4d, 0xf8, - 0xca, 0x81, 0x8f, 0xa2, 0xdb, 0x3b, 0xb7, 0xf3, 0xe6, 0xce, 0xed, 0xbc, 0xbd, 0x73, 0x3b, 0xbf, - 0x94, 0xae, 0x75, 0x5b, 0xba, 0xd6, 0x9b, 0xd2, 0xb5, 0xde, 0x96, 0xae, 0xf5, 0x57, 0xe9, 0x5a, - 0xbf, 0xfd, 0xed, 0x76, 0x5e, 0x1f, 0x3d, 0xf4, 0xc3, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0xd2, - 0xeb, 0x52, 0x19, 0xe8, 0x07, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/discovery/v1beta1/generated.proto", fileDescriptor_6555bad15de200e0) +} + +var fileDescriptor_6555bad15de200e0 = []byte{ + // 857 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4f, 0x6f, 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d, 0xef, 0x77, 0x03, 0x3c, 0x5c, 0xf3, 0xf8, 0x39, + 0xe5, 0x02, 0xfe, 0xb0, 0xe1, 0xb3, 0xbf, 0x9d, 0xcf, 0x92, 0xad, 0x5c, 0x6e, 0x0f, 0x68, 0x83, + 0xf4, 0x3c, 0x3e, 0x07, 0x26, 0x15, 0x24, 0x6d, 0x9c, 0xd9, 0xf2, 0x8d, 0x50, 0xd5, 0x75, 0x5d, + 0x7c, 0x2b, 0x15, 0x50, 0x2d, 0xe4, 0x1d, 0x83, 0x3d, 0x7d, 0x11, 0xe0, 0x64, 0xed, 0xb0, 0xef, + 0xeb, 0xf0, 0xde, 0x81, 0x0f, 0xc3, 0xbb, 0x95, 0x33, 0x78, 0xbd, 0x72, 0x06, 0x6f, 0x56, 0xce, + 0xe0, 0xe7, 0xca, 0x31, 0xee, 0x2a, 0xc7, 0x78, 0x5d, 0x39, 0xc6, 0x9b, 0xca, 0x31, 0xfe, 0xac, + 0x1c, 0xe3, 0xd7, 0xbf, 0x9c, 0xc1, 0xab, 0xa3, 0xfb, 0x7e, 0xd8, 0x7f, 0x07, 0x00, 0x00, 0xff, + 0xff, 0x1c, 0xe6, 0x20, 0x06, 0xcf, 0x07, 0x00, 0x00, } func (m *Endpoint) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/events/v1/generated.pb.go b/vendor/k8s.io/api/events/v1/generated.pb.go index 2ec919a95aa..96a6047e860 100644 --- a/vendor/k8s.io/api/events/v1/generated.pb.go +++ b/vendor/k8s.io/api/events/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/events/v1/generated.proto +// source: k8s.io/api/events/v1/generated.proto package v1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_ee2600587b650fac, []int{0} + return fileDescriptor_d3a3e1495c224e47, []int{0} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_Event proto.InternalMessageInfo func (m *EventList) Reset() { *m = EventList{} } func (*EventList) ProtoMessage() {} func (*EventList) Descriptor() ([]byte, []int) { - return fileDescriptor_ee2600587b650fac, []int{1} + return fileDescriptor_d3a3e1495c224e47, []int{1} } func (m *EventList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_EventList proto.InternalMessageInfo func (m *EventSeries) Reset() { *m = EventSeries{} } func (*EventSeries) ProtoMessage() {} func (*EventSeries) Descriptor() ([]byte, []int) { - return fileDescriptor_ee2600587b650fac, []int{2} + return fileDescriptor_d3a3e1495c224e47, []int{2} } func (m *EventSeries) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,60 +135,59 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/events/v1/generated.proto", fileDescriptor_ee2600587b650fac) + proto.RegisterFile("k8s.io/api/events/v1/generated.proto", fileDescriptor_d3a3e1495c224e47) } -var fileDescriptor_ee2600587b650fac = []byte{ - // 775 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0x77, 0x9b, 0xb4, 0x99, 0xec, 0x6e, 0xd3, 0xd9, 0x95, 0x3a, 0x74, 0x25, 0x27, 0x64, - 0x25, 0x14, 0x21, 0x61, 0xd3, 0x0a, 0x21, 0x84, 0x84, 0x44, 0xdd, 0x14, 0x54, 0xd4, 0x52, 0x69, - 0xda, 0x13, 0xe2, 0xd0, 0x89, 0xf3, 0xea, 0x9a, 0xc4, 0x33, 0xd6, 0xcc, 0x24, 0x52, 0x6f, 0x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 0xb4, 0xda, 0x65, 0x6f, 0x37, 0x97, 0xdc, 0xee, 0x3c, 0x4d, 0xd3, 0x79, 0x7c, 0xeb, - 0x4f, 0x0b, 0x65, 0x3f, 0xf5, 0xd3, 0x50, 0x69, 0xfc, 0xe3, 0xc2, 0x8e, 0x72, 0xd6, 0x6b, 0x24, - 0x65, 0x9b, 0x0d, 0x55, 0xcf, 0x9d, 0xb7, 0x26, 0x91, 0x99, 0xfd, 0xf4, 0x35, 0x2a, 0x87, 0x1a, - 0x22, 0x45, 0x9e, 0x35, 0x9f, 0xb7, 0x6b, 0x07, 0x6f, 0xff, 0x65, 0x79, 0x78, 0x2f, 0x73, 0x9d, - 0xf2, 0x49, 0xca, 0xa0, 0x19, 0xb1, 0xf5, 0x87, 0x85, 0x6a, 0x33, 0xcb, 0x05, 0xbf, 0x43, 0x65, - 0xdf, 0xb4, 0x6d, 0x99, 0xb6, 0xa7, 0xa4, 0xac, 0xd9, 0x2c, 0x87, 0x87, 0xa8, 0x3e, 0x60, 0x4a, - 0x9f, 0x77, 0x15, 0xc8, 0x11, 0xf4, 0xde, 0x67, 0x3b, 0x4e, 0xe7, 0xf5, 0x74, 0x4e, 0x90, 0x2e, - 0x58, 0x78, 0x5f, 0xde, 0x3d, 0xda, 0xa5, 0xfb, 0x47, 0xbb, 0xf4, 0xf0, 0x68, 0x97, 0x7e, 0x4e, - 0x6c, 0xeb, 0x2e, 0xb1, 0xad, 0xfb, 0xc4, 0xb6, 0x1e, 0x12, 0xdb, 0xfa, 0x2b, 0xb1, 0xad, 0xdf, - 0xfe, 0xb6, 0x4b, 0x3f, 0xbc, 0x59, 0xf6, 0x6f, 0xfa, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, - 0xc8, 0x73, 0x3d, 0x7d, 0x07, 0x00, 0x00, +var fileDescriptor_d3a3e1495c224e47 = []byte{ + // 759 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x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x2a, 0xb6, 0x4e, 0x47, 0x01, 0x74, 0x9c, 0x83, 0x7f, 0x45, 0x05, 0x66, + 0x4b, 0x97, 0xfb, 0xa4, 0xa0, 0xd8, 0xab, 0x29, 0xbb, 0x70, 0xa0, 0xa2, 0x34, 0xcd, 0xc6, 0x38, + 0x01, 0x2c, 0xe4, 0x3e, 0x59, 0x7c, 0x8a, 0xa3, 0x2a, 0x4a, 0xd3, 0x2c, 0xbe, 0x40, 0x45, 0x01, + 0x0e, 0x13, 0x2d, 0xd7, 0x77, 0xc8, 0x92, 0xba, 0xb1, 0xdd, 0xe1, 0x1b, 0x8b, 0x67, 0x3a, 0x7b, + 0x61, 0x0a, 0x57, 0x20, 0xc0, 0xb7, 0x87, 0x1e, 0x81, 0xf6, 0xd9, 0x34, 0x13, 0xc2, 0xcf, 0xd0, + 0xa2, 0x80, 0x76, 0x3c, 0x63, 0xa4, 0x38, 0xbb, 0x66, 0x29, 0xea, 0x55, 0x16, 0x69, 0xc2, 0xa3, + 0x7d, 0x01, 0x5c, 0x45, 0x0b, 0x3e, 0x97, 0x40, 0x90, 0xea, 0x63, 0x39, 0xf5, 0x5d, 0x78, 0xce, + 0x25, 0x50, 0x95, 0x89, 0x11, 0xf2, 0x36, 0x00, 0x52, 0x7a, 0x8a, 0xb8, 0xb8, 0x0d, 0x80, 0xaa, + 0x0c, 0x06, 0x54, 0x6e, 0x41, 0x20, 0xc0, 0x8e, 0x15, 0xcf, 0x79, 0x47, 0xd8, 0x40, 0x96, 0x55, + 0x61, 0x95, 0x49, 0x85, 0x25, 0xc3, 0xa1, 0x60, 0x16, 0x49, 0xe5, 0xca, 0x8d, 0x11, 0x01, 0x3a, + 0x26, 0x89, 0xdf, 0x6a, 0x88, 0x64, 0xc1, 0xff, 0x5c, 0x11, 0xaa, 0x99, 0x0c, 0x25, 0xf3, 0x02, + 0xb2, 0xa2, 0xfc, 0x7e, 0x9b, 0x6d, 0xda, 0xd5, 0xa0, 0x57, 0x53, 0x6b, 0x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0xd6, 0x73, 0x2f, 0x36, 0x27, 0xfd, 0x9b, 0x7e, 0x09, 0x00, 0x00, 0xff, 0xff, 0x6f, + 0x4f, 0x7a, 0xe4, 0x64, 0x07, 0x00, 0x00, } func (m *Event) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/events/v1beta1/generated.pb.go b/vendor/k8s.io/api/events/v1beta1/generated.pb.go index 701127ff945..5d7881e8c09 100644 --- a/vendor/k8s.io/api/events/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/events/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/events/v1beta1/generated.proto +// source: k8s.io/api/events/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_4f97f691c32a5ac8, []int{0} + return fileDescriptor_99027a32dee7673b, []int{0} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_Event proto.InternalMessageInfo func (m *EventList) Reset() { *m = EventList{} } func (*EventList) ProtoMessage() {} func (*EventList) Descriptor() ([]byte, []int) { - return fileDescriptor_4f97f691c32a5ac8, []int{1} + return fileDescriptor_99027a32dee7673b, []int{1} } func (m *EventList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_EventList proto.InternalMessageInfo func (m *EventSeries) Reset() { *m = EventSeries{} } func (*EventSeries) ProtoMessage() {} func (*EventSeries) Descriptor() ([]byte, []int) { - return fileDescriptor_4f97f691c32a5ac8, []int{2} + return fileDescriptor_99027a32dee7673b, []int{2} } func (m *EventSeries) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,60 +135,59 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/events/v1beta1/generated.proto", fileDescriptor_4f97f691c32a5ac8) + proto.RegisterFile("k8s.io/api/events/v1beta1/generated.proto", fileDescriptor_99027a32dee7673b) } -var fileDescriptor_4f97f691c32a5ac8 = []byte{ - // 779 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x6e, 0xdb, 0x46, - 0x10, 0xc6, 0xc5, 0xc4, 0x92, 0xad, 0x55, 0x12, 0xcb, 0x9b, 0x83, 0xd7, 0x2e, 0x40, 0x09, 0x0a, - 0x10, 0x08, 0x05, 0x4a, 0xd6, 0x41, 0x51, 0xf4, 0x56, 0x84, 0x91, 0x5b, 0x24, 0xb0, 0x1b, 0x60, - 0xe3, 0x53, 0xd1, 0x43, 0x56, 0xd4, 0x84, 0x66, 0x25, 0xee, 0x12, 0xbb, 0x2b, 0x01, 0xbe, 0xf5, - 0x52, 0xa0, 0xc7, 0x3e, 0x43, 0x6f, 0xbd, 0xf5, 0x31, 0x7c, 0xf4, 0xd1, 0x27, 0xa1, 0x66, 0x5f, - 0xa4, 0xe0, 0x72, 0x25, 0xca, 0xfa, 0x03, 0xab, 0xe8, 0x8d, 0x9c, 0xf9, 0xbe, 0xdf, 0xcc, 0x2e, - 0x47, 0x23, 0x14, 0x0c, 0xbf, 0x51, 0x5e, 0x2c, 0xfc, 0xe1, 0xb8, 0x0f, 0x92, 0x83, 0x06, 0xe5, - 0x4f, 0x80, 0x0f, 0x84, 0xf4, 0x6d, 0x82, 0xa5, 0xb1, 0x0f, 0x13, 0xe0, 0x5a, 0xf9, 0x93, 0x93, - 0x3e, 0x68, 0x76, 0xe2, 0x47, 0xc0, 0x41, 0x32, 0x0d, 0x03, 0x2f, 0x95, 0x42, 0x0b, 0x7c, 0x54, - 0x48, 0x3d, 0x96, 0xc6, 0x5e, 0x21, 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 0x9f, 0x9b, 0x8a, 0x13, 0x17, 0x39, 0x3c, - 0x46, 0xcd, 0x11, 0x53, 0xfa, 0x7d, 0x5f, 0x81, 0x9c, 0xc0, 0xe0, 0xff, 0xec, 0xc9, 0xf9, 0xd0, - 0x9e, 0x2d, 0x01, 0xe9, 0x4a, 0x89, 0xe0, 0xdb, 0xeb, 0x3b, 0xb7, 0x72, 0x73, 0xe7, 0x56, 0x6e, - 0xef, 0xdc, 0xca, 0x2f, 0x99, 0xeb, 0x5c, 0x67, 0xae, 0x73, 0x93, 0xb9, 0xce, 0x6d, 0xe6, 0x3a, - 0x7f, 0x67, 0xae, 0xf3, 0xfb, 0x3f, 0x6e, 0xe5, 0xc7, 0xa3, 0x8d, 0xff, 0xb0, 0xff, 0x06, 0x00, - 0x00, 0xff, 0xff, 0xae, 0x19, 0x45, 0xf5, 0x96, 0x07, 0x00, 0x00, +var fileDescriptor_99027a32dee7673b = []byte{ + // 764 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x4f, 0xdb, 0x48, + 0x14, 0xc7, 0x63, 0x20, 0x81, 0x4c, 0xf8, 0x11, 0x86, 0x03, 0x03, 0x2b, 0x39, 0x51, 0x90, 0x50, + 0x76, 0xa5, 0xb5, 0x17, 0xb4, 0x5a, 0xed, 0x6d, 0x85, 0x09, 0x5b, 0x81, 0xa0, 0x48, 0x03, 0xa7, + 0xaa, 0x07, 0x26, 0xce, 0xc3, 0xb8, 0xc4, 0x1e, 0x6b, 0x3c, 0x89, 0xc4, 0xad, 0x97, 0x4a, 0x3d, + 0xf6, 0x6f, 0xe8, 0xad, 0xb7, 0xfe, 0x19, 0x1c, 0x39, 0x72, 0x8a, 0x8a, 0xfb, 0x8f, 0x54, 0x1e, + 0x3b, 0x71, 0xc8, 0x0f, 0x91, 0xaa, 0x37, 0xfb, 0xbd, 0xef, 0xf7, 0xf3, 0xde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32, + 0xb4, 0xa4, 0x8e, 0x50, 0xde, 0x95, 0xe0, 0x85, 0x64, 0xae, 0x3a, 0x5f, 0x2f, 0xed, 0x57, 0x5f, + 0xda, 0x20, 0xd6, 0x4a, 0x0a, 0xcb, 0x1f, 0xc7, 0x36, 0x9a, 0xb8, 0x6b, 0x5f, 0x34, 0x54, 0x1a, + 0xda, 0x30, 0x78, 0x07, 0xe5, 0x6d, 0x75, 0x76, 0x4d, 0x9d, 0x7d, 0x60, 0x4a, 0x4e, 0x9c, 0xe4, + 0x70, 0x07, 0x95, 0xdb, 0x2c, 0x94, 0xe7, 0xcd, 0x10, 0x44, 0x17, 0x5a, 0xbf, 0xb2, 0x27, 0x07, + 0x43, 0x7b, 0x3a, 0x02, 0xa4, 0x63, 0x25, 0xac, 0xff, 0xee, 0x9f, 0xf4, 0xdc, 0xc3, 0x93, 0x9e, + 0x7b, 0x7c, 0xd2, 0x73, 0xef, 0x23, 0x5d, 0xbb, 0x8f, 0x74, 0xed, 0x21, 0xd2, 0xb5, 0xc7, 0x48, + 0xd7, 0xbe, 0x45, 0xba, 0xf6, 0xe9, 0xbb, 0x9e, 0x7b, 0xb3, 0x35, 0xf5, 0x1f, 0xf6, 0x47, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x2b, 0xc1, 0x64, 0x36, 0x7d, 0x07, 0x00, 0x00, } func (m *Event) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go b/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go index d967e381068..818486f39d6 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/extensions/v1beta1/generated.proto +// source: k8s.io/api/extensions/v1beta1/generated.proto package v1beta1 @@ -52,7 +52,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *DaemonSet) Reset() { *m = DaemonSet{} } func (*DaemonSet) ProtoMessage() {} func (*DaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{0} + return fileDescriptor_90a532284de28347, []int{0} } func (m *DaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +80,7 @@ var xxx_messageInfo_DaemonSet proto.InternalMessageInfo func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } func (*DaemonSetCondition) ProtoMessage() {} func (*DaemonSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{1} + return fileDescriptor_90a532284de28347, []int{1} } func (m *DaemonSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,7 +108,7 @@ var xxx_messageInfo_DaemonSetCondition proto.InternalMessageInfo func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } func (*DaemonSetList) ProtoMessage() {} func (*DaemonSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{2} + return fileDescriptor_90a532284de28347, []int{2} } func (m *DaemonSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -136,7 +136,7 @@ var xxx_messageInfo_DaemonSetList proto.InternalMessageInfo func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } func (*DaemonSetSpec) ProtoMessage() {} func (*DaemonSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{3} + return fileDescriptor_90a532284de28347, []int{3} } func (m *DaemonSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +164,7 @@ var xxx_messageInfo_DaemonSetSpec proto.InternalMessageInfo func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} func (*DaemonSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{4} + return fileDescriptor_90a532284de28347, []int{4} } func (m *DaemonSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +192,7 @@ var xxx_messageInfo_DaemonSetStatus proto.InternalMessageInfo func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } func (*DaemonSetUpdateStrategy) ProtoMessage() {} func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{5} + return fileDescriptor_90a532284de28347, []int{5} } func (m *DaemonSetUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +220,7 @@ var xxx_messageInfo_DaemonSetUpdateStrategy proto.InternalMessageInfo func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} func (*Deployment) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{6} + return fileDescriptor_90a532284de28347, []int{6} } func (m *Deployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +248,7 @@ var xxx_messageInfo_Deployment proto.InternalMessageInfo func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } func (*DeploymentCondition) ProtoMessage() {} func (*DeploymentCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{7} + return fileDescriptor_90a532284de28347, []int{7} } func (m *DeploymentCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +276,7 @@ var xxx_messageInfo_DeploymentCondition proto.InternalMessageInfo func (m *DeploymentList) Reset() { *m = DeploymentList{} } func (*DeploymentList) ProtoMessage() {} func (*DeploymentList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{8} + return fileDescriptor_90a532284de28347, []int{8} } func (m *DeploymentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -304,7 +304,7 @@ var xxx_messageInfo_DeploymentList proto.InternalMessageInfo func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} } func (*DeploymentRollback) ProtoMessage() {} func (*DeploymentRollback) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{9} + return fileDescriptor_90a532284de28347, []int{9} } func (m *DeploymentRollback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +332,7 @@ var xxx_messageInfo_DeploymentRollback proto.InternalMessageInfo func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } func (*DeploymentSpec) ProtoMessage() {} func (*DeploymentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{10} + return fileDescriptor_90a532284de28347, []int{10} } func (m *DeploymentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +360,7 @@ var xxx_messageInfo_DeploymentSpec proto.InternalMessageInfo func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } func (*DeploymentStatus) ProtoMessage() {} func (*DeploymentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{11} + return fileDescriptor_90a532284de28347, []int{11} } func (m *DeploymentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,7 +388,7 @@ var xxx_messageInfo_DeploymentStatus proto.InternalMessageInfo func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } func (*DeploymentStrategy) ProtoMessage() {} func (*DeploymentStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{12} + return fileDescriptor_90a532284de28347, []int{12} } func (m *DeploymentStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +416,7 @@ var xxx_messageInfo_DeploymentStrategy proto.InternalMessageInfo func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } func (*HTTPIngressPath) ProtoMessage() {} func (*HTTPIngressPath) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{13} + return fileDescriptor_90a532284de28347, []int{13} } func (m *HTTPIngressPath) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,7 +444,7 @@ var xxx_messageInfo_HTTPIngressPath proto.InternalMessageInfo func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } func (*HTTPIngressRuleValue) ProtoMessage() {} func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{14} + return fileDescriptor_90a532284de28347, []int{14} } func (m *HTTPIngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,7 +472,7 @@ var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo func (m *IPBlock) Reset() { *m = IPBlock{} } func (*IPBlock) ProtoMessage() {} func (*IPBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{15} + return fileDescriptor_90a532284de28347, []int{15} } func (m *IPBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +500,7 @@ var xxx_messageInfo_IPBlock proto.InternalMessageInfo func (m *Ingress) Reset() { *m = Ingress{} } func (*Ingress) ProtoMessage() {} func (*Ingress) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{16} + return fileDescriptor_90a532284de28347, []int{16} } func (m *Ingress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +528,7 @@ var xxx_messageInfo_Ingress proto.InternalMessageInfo func (m *IngressBackend) Reset() { *m = IngressBackend{} } func (*IngressBackend) ProtoMessage() {} func (*IngressBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{17} + return fileDescriptor_90a532284de28347, []int{17} } func (m *IngressBackend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +556,7 @@ var xxx_messageInfo_IngressBackend proto.InternalMessageInfo func (m *IngressList) Reset() { *m = IngressList{} } func (*IngressList) ProtoMessage() {} func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{18} + return fileDescriptor_90a532284de28347, []int{18} } func (m *IngressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -584,7 +584,7 @@ var xxx_messageInfo_IngressList proto.InternalMessageInfo func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } func (*IngressLoadBalancerIngress) ProtoMessage() {} func (*IngressLoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{19} + return fileDescriptor_90a532284de28347, []int{19} } func (m *IngressLoadBalancerIngress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -612,7 +612,7 @@ var xxx_messageInfo_IngressLoadBalancerIngress proto.InternalMessageInfo func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } func (*IngressLoadBalancerStatus) ProtoMessage() {} func (*IngressLoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{20} + return fileDescriptor_90a532284de28347, []int{20} } func (m *IngressLoadBalancerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -640,7 +640,7 @@ var xxx_messageInfo_IngressLoadBalancerStatus proto.InternalMessageInfo func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } func (*IngressPortStatus) ProtoMessage() {} func (*IngressPortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{21} + return fileDescriptor_90a532284de28347, []int{21} } func (m *IngressPortStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +668,7 @@ var xxx_messageInfo_IngressPortStatus proto.InternalMessageInfo func (m *IngressRule) Reset() { *m = IngressRule{} } func (*IngressRule) ProtoMessage() {} func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{22} + return fileDescriptor_90a532284de28347, []int{22} } func (m *IngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +696,7 @@ var xxx_messageInfo_IngressRule proto.InternalMessageInfo func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } func (*IngressRuleValue) ProtoMessage() {} func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{23} + return fileDescriptor_90a532284de28347, []int{23} } func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,7 +724,7 @@ var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo func (m *IngressSpec) Reset() { *m = IngressSpec{} } func (*IngressSpec) ProtoMessage() {} func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{24} + return fileDescriptor_90a532284de28347, []int{24} } func (m *IngressSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -752,7 +752,7 @@ var xxx_messageInfo_IngressSpec proto.InternalMessageInfo func (m *IngressStatus) Reset() { *m = IngressStatus{} } func (*IngressStatus) ProtoMessage() {} func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{25} + return fileDescriptor_90a532284de28347, []int{25} } func (m *IngressStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -780,7 +780,7 @@ var xxx_messageInfo_IngressStatus proto.InternalMessageInfo func (m *IngressTLS) Reset() { *m = IngressTLS{} } func (*IngressTLS) ProtoMessage() {} func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{26} + return fileDescriptor_90a532284de28347, []int{26} } func (m *IngressTLS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -808,7 +808,7 @@ var xxx_messageInfo_IngressTLS proto.InternalMessageInfo func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } func (*NetworkPolicy) ProtoMessage() {} func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{27} + return fileDescriptor_90a532284de28347, []int{27} } func (m *NetworkPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -836,7 +836,7 @@ var xxx_messageInfo_NetworkPolicy proto.InternalMessageInfo func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } func (*NetworkPolicyEgressRule) ProtoMessage() {} func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{28} + return fileDescriptor_90a532284de28347, []int{28} } func (m *NetworkPolicyEgressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -864,7 +864,7 @@ var xxx_messageInfo_NetworkPolicyEgressRule proto.InternalMessageInfo func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } func (*NetworkPolicyIngressRule) ProtoMessage() {} func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{29} + return fileDescriptor_90a532284de28347, []int{29} } func (m *NetworkPolicyIngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -892,7 +892,7 @@ var xxx_messageInfo_NetworkPolicyIngressRule proto.InternalMessageInfo func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } func (*NetworkPolicyList) ProtoMessage() {} func (*NetworkPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{30} + return fileDescriptor_90a532284de28347, []int{30} } func (m *NetworkPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -920,7 +920,7 @@ var xxx_messageInfo_NetworkPolicyList proto.InternalMessageInfo func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } func (*NetworkPolicyPeer) ProtoMessage() {} func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{31} + return fileDescriptor_90a532284de28347, []int{31} } func (m *NetworkPolicyPeer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -948,7 +948,7 @@ var xxx_messageInfo_NetworkPolicyPeer proto.InternalMessageInfo func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } func (*NetworkPolicyPort) ProtoMessage() {} func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{32} + return fileDescriptor_90a532284de28347, []int{32} } func (m *NetworkPolicyPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -976,7 +976,7 @@ var xxx_messageInfo_NetworkPolicyPort proto.InternalMessageInfo func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } func (*NetworkPolicySpec) ProtoMessage() {} func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{33} + return fileDescriptor_90a532284de28347, []int{33} } func (m *NetworkPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1004,7 +1004,7 @@ var xxx_messageInfo_NetworkPolicySpec proto.InternalMessageInfo func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } func (*ReplicaSet) ProtoMessage() {} func (*ReplicaSet) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{34} + return fileDescriptor_90a532284de28347, []int{34} } func (m *ReplicaSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1032,7 +1032,7 @@ var xxx_messageInfo_ReplicaSet proto.InternalMessageInfo func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } func (*ReplicaSetCondition) ProtoMessage() {} func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{35} + return fileDescriptor_90a532284de28347, []int{35} } func (m *ReplicaSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1060,7 +1060,7 @@ var xxx_messageInfo_ReplicaSetCondition proto.InternalMessageInfo func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } func (*ReplicaSetList) ProtoMessage() {} func (*ReplicaSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{36} + return fileDescriptor_90a532284de28347, []int{36} } func (m *ReplicaSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1088,7 +1088,7 @@ var xxx_messageInfo_ReplicaSetList proto.InternalMessageInfo func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } func (*ReplicaSetSpec) ProtoMessage() {} func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{37} + return fileDescriptor_90a532284de28347, []int{37} } func (m *ReplicaSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1116,7 +1116,7 @@ var xxx_messageInfo_ReplicaSetSpec proto.InternalMessageInfo func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } func (*ReplicaSetStatus) ProtoMessage() {} func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{38} + return fileDescriptor_90a532284de28347, []int{38} } func (m *ReplicaSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1144,7 +1144,7 @@ var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } func (*RollbackConfig) ProtoMessage() {} func (*RollbackConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{39} + return fileDescriptor_90a532284de28347, []int{39} } func (m *RollbackConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1172,7 +1172,7 @@ var xxx_messageInfo_RollbackConfig proto.InternalMessageInfo func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } func (*RollingUpdateDaemonSet) ProtoMessage() {} func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{40} + return fileDescriptor_90a532284de28347, []int{40} } func (m *RollingUpdateDaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1200,7 +1200,7 @@ var xxx_messageInfo_RollingUpdateDaemonSet proto.InternalMessageInfo func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{41} + return fileDescriptor_90a532284de28347, []int{41} } func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1228,7 +1228,7 @@ var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{42} + return fileDescriptor_90a532284de28347, []int{42} } func (m *Scale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1256,7 +1256,7 @@ var xxx_messageInfo_Scale proto.InternalMessageInfo func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{43} + return fileDescriptor_90a532284de28347, []int{43} } func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1284,7 +1284,7 @@ var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{44} + return fileDescriptor_90a532284de28347, []int{44} } func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1360,190 +1360,189 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/extensions/v1beta1/generated.proto", fileDescriptor_cdc93917efc28165) + proto.RegisterFile("k8s.io/api/extensions/v1beta1/generated.proto", fileDescriptor_90a532284de28347) } -var fileDescriptor_cdc93917efc28165 = []byte{ - // 2858 bytes of a gzipped FileDescriptorProto +var fileDescriptor_90a532284de28347 = []byte{ + // 2842 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcd, 0x6f, 0x24, 0x47, 0x15, 0xdf, 0x9e, 0xf1, 0xd8, 0xe3, 0xe7, 0xb5, 0xbd, 0x5b, 0xeb, 0xac, 0x1d, 0x2f, 0xb1, 0xa3, - 0x46, 0x84, 0x4d, 0xd8, 0xcc, 0xb0, 0x9b, 0x64, 0xc9, 0x87, 0x94, 0xb0, 0xe3, 0xdd, 0x64, 0x9d, - 0xd8, 0xe3, 0x49, 0xcd, 0x38, 0x41, 0x11, 0x01, 0xda, 0x3d, 0xe5, 0x71, 0xc7, 0x3d, 0xdd, 0xa3, - 0xee, 0x1a, 0xb3, 0xbe, 0x81, 0xe0, 0x92, 0x13, 0x5c, 0x02, 0x1c, 0x91, 0x90, 0xb8, 0x72, 0xe5, - 0x10, 0x22, 0x10, 0x41, 0x5a, 0x21, 0x0e, 0x91, 0x38, 0x90, 0x93, 0x45, 0x9c, 0x13, 0xe2, 0x1f, - 0x40, 0x7b, 0x42, 0xf5, 0xd1, 0xd5, 0xdf, 0x76, 0x8f, 0xf1, 0x5a, 0x04, 0x71, 0x5a, 0x4f, 0xbd, - 0xf7, 0x7e, 0xf5, 0xaa, 0xea, 0xd5, 0x7b, 0xbf, 0xaa, 0xea, 0x85, 0x57, 0x77, 0x9f, 0xf7, 0x6b, - 0x96, 0x5b, 0xdf, 0x1d, 0x6e, 0x11, 0xcf, 0x21, 0x94, 0xf8, 0xf5, 0x3d, 0xe2, 0x74, 0x5d, 0xaf, - 0x2e, 0x05, 0xc6, 0xc0, 0xaa, 0x93, 0x7b, 0x94, 0x38, 0xbe, 0xe5, 0x3a, 0x7e, 0x7d, 0xef, 0xfa, - 0x16, 0xa1, 0xc6, 0xf5, 0x7a, 0x8f, 0x38, 0xc4, 0x33, 0x28, 0xe9, 0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, } func (m *DaemonSet) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.proto b/vendor/k8s.io/api/extensions/v1beta1/generated.proto index 3f2549681ec..60effc8f711 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/generated.proto +++ b/vendor/k8s.io/api/extensions/v1beta1/generated.proto @@ -176,6 +176,8 @@ message DaemonSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DaemonSetCondition conditions = 10; } @@ -343,6 +345,8 @@ message DeploymentStatus { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated DeploymentCondition conditions = 6; // Count of hash collisions for the Deployment. The Deployment controller uses this @@ -406,6 +410,7 @@ message HTTPIngressPath { // or '#'. message HTTPIngressRuleValue { // A collection of paths that map requests to backends. + // +listType=atomic repeated HTTPIngressPath paths = 1; } @@ -422,6 +427,7 @@ message IPBlock { // Valid examples are "192.168.1.0/24" or "2001:db8::/64" // Except values will be rejected if they are outside the CIDR range // +optional + // +listType=atomic repeated string except = 2; } @@ -495,6 +501,7 @@ message IngressLoadBalancerIngress { message IngressLoadBalancerStatus { // Ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic repeated IngressLoadBalancerIngress ingress = 1; } @@ -602,11 +609,13 @@ message IngressSpec { // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. // +optional + // +listType=atomic 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 + // +listType=atomic repeated IngressRule rules = 3; } @@ -624,6 +633,7 @@ message IngressTLS { // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. // +optional + // +listType=atomic repeated string hosts = 1; // SecretName is the name of the secret used to terminate SSL traffic on 443. @@ -659,6 +669,7 @@ message NetworkPolicyEgressRule { // 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 + // +listType=atomic repeated NetworkPolicyPort ports = 1; // List of destinations for outgoing traffic of pods selected for this rule. @@ -667,6 +678,7 @@ message NetworkPolicyEgressRule { // 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 + // +listType=atomic repeated NetworkPolicyPeer to = 2; } @@ -679,6 +691,7 @@ message NetworkPolicyIngressRule { // 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 + // +listType=atomic repeated NetworkPolicyPort ports = 1; // List of sources which should be able to access the pods selected for this rule. @@ -687,6 +700,7 @@ message NetworkPolicyIngressRule { // 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 from list. // +optional + // +listType=atomic repeated NetworkPolicyPeer from = 2; } @@ -767,6 +781,7 @@ message NetworkPolicySpec { // 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 + // +listType=atomic repeated NetworkPolicyIngressRule ingress = 2; // List of egress rules to be applied to the selected pods. Outgoing traffic is @@ -777,6 +792,7 @@ message NetworkPolicySpec { // solely to ensure that the pods it selects are isolated by default). // This field is beta-level in 1.8 // +optional + // +listType=atomic repeated NetworkPolicyEgressRule egress = 3; // List of rule types that the NetworkPolicy relates to. @@ -790,6 +806,7 @@ message NetworkPolicySpec { // an Egress section and would otherwise default to just [ "Ingress" ]). // This field is beta-level in 1.8 // +optional + // +listType=atomic repeated string policyTypes = 4; } @@ -905,6 +922,8 @@ message ReplicaSetStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated ReplicaSetCondition conditions = 6; } diff --git a/vendor/k8s.io/api/extensions/v1beta1/types.go b/vendor/k8s.io/api/extensions/v1beta1/types.go index 70b349f654b..cc2deadac0a 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/types.go +++ b/vendor/k8s.io/api/extensions/v1beta1/types.go @@ -270,6 +270,8 @@ type DeploymentStatus struct { // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type 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 @@ -490,6 +492,8 @@ type DaemonSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []DaemonSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,10,rep,name=conditions"` } @@ -652,11 +656,13 @@ type IngressSpec struct { // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. // +optional + // +listType=atomic 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 + // +listType=atomic Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // TODO: Add the ability to specify load-balancer IP through claims } @@ -668,6 +674,7 @@ type IngressTLS struct { // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. // +optional + // +listType=atomic 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. @@ -690,6 +697,7 @@ type IngressStatus struct { type IngressLoadBalancerStatus struct { // Ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic Ingress []IngressLoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` } @@ -797,6 +805,7 @@ type IngressRuleValue struct { // or '#'. type HTTPIngressRuleValue struct { // A collection of paths that map requests to backends. + // +listType=atomic 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. @@ -991,6 +1000,8 @@ type ReplicaSetStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"` } @@ -1076,6 +1087,7 @@ type NetworkPolicySpec struct { // 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 + // +listType=atomic 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 @@ -1086,6 +1098,7 @@ type NetworkPolicySpec struct { // solely to ensure that the pods it selects are isolated by default). // This field is beta-level in 1.8 // +optional + // +listType=atomic Egress []NetworkPolicyEgressRule `json:"egress,omitempty" protobuf:"bytes,3,rep,name=egress"` // List of rule types that the NetworkPolicy relates to. @@ -1099,6 +1112,7 @@ type NetworkPolicySpec struct { // an Egress section and would otherwise default to just [ "Ingress" ]). // This field is beta-level in 1.8 // +optional + // +listType=atomic PolicyTypes []PolicyType `json:"policyTypes,omitempty" protobuf:"bytes,4,rep,name=policyTypes,casttype=PolicyType"` } @@ -1111,6 +1125,7 @@ type NetworkPolicyIngressRule struct { // 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 + // +listType=atomic 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. @@ -1119,6 +1134,7 @@ type NetworkPolicyIngressRule struct { // 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 from list. // +optional + // +listType=atomic From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"` } @@ -1133,6 +1149,7 @@ type NetworkPolicyEgressRule struct { // 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 + // +listType=atomic Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"` // List of destinations for outgoing traffic of pods selected for this rule. @@ -1141,6 +1158,7 @@ type NetworkPolicyEgressRule struct { // 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 + // +listType=atomic To []NetworkPolicyPeer `json:"to,omitempty" protobuf:"bytes,2,rep,name=to"` } @@ -1178,6 +1196,7 @@ type IPBlock struct { // Valid examples are "192.168.1.0/24" or "2001:db8::/64" // Except values will be rejected if they are outside the CIDR range // +optional + // +listType=atomic Except []string `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"` } diff --git a/vendor/k8s.io/api/flowcontrol/v1/generated.pb.go b/vendor/k8s.io/api/flowcontrol/v1/generated.pb.go index c235ba10dee..b342445f71b 100644 --- a/vendor/k8s.io/api/flowcontrol/v1/generated.pb.go +++ b/vendor/k8s.io/api/flowcontrol/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1/generated.proto +// source: k8s.io/api/flowcontrol/v1/generated.proto package v1 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{0} + return fileDescriptor_5d08a1401821035d, []int{0} } func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } func (*FlowDistinguisherMethod) ProtoMessage() {} func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{1} + return fileDescriptor_5d08a1401821035d, []int{1} } func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo func (m *FlowSchema) Reset() { *m = FlowSchema{} } func (*FlowSchema) ProtoMessage() {} func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{2} + return fileDescriptor_5d08a1401821035d, []int{2} } func (m *FlowSchema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_FlowSchema proto.InternalMessageInfo func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } func (*FlowSchemaCondition) ProtoMessage() {} func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{3} + return fileDescriptor_5d08a1401821035d, []int{3} } func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } func (*FlowSchemaList) ProtoMessage() {} func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{4} + return fileDescriptor_5d08a1401821035d, []int{4} } func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } func (*FlowSchemaSpec) ProtoMessage() {} func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{5} + return fileDescriptor_5d08a1401821035d, []int{5} } func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +214,7 @@ var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } func (*FlowSchemaStatus) ProtoMessage() {} func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{6} + return fileDescriptor_5d08a1401821035d, []int{6} } func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo func (m *GroupSubject) Reset() { *m = GroupSubject{} } func (*GroupSubject) ProtoMessage() {} func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{7} + return fileDescriptor_5d08a1401821035d, []int{7} } func (m *GroupSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +270,7 @@ var xxx_messageInfo_GroupSubject proto.InternalMessageInfo func (m *LimitResponse) Reset() { *m = LimitResponse{} } func (*LimitResponse) ProtoMessage() {} func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{8} + return fileDescriptor_5d08a1401821035d, []int{8} } func (m *LimitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,7 +298,7 @@ var xxx_messageInfo_LimitResponse proto.InternalMessageInfo func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{9} + return fileDescriptor_5d08a1401821035d, []int{9} } func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +326,7 @@ var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } func (*NonResourcePolicyRule) ProtoMessage() {} func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{10} + return fileDescriptor_5d08a1401821035d, []int{10} } func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,7 +354,7 @@ var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } func (*PolicyRulesWithSubjects) ProtoMessage() {} func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{11} + return fileDescriptor_5d08a1401821035d, []int{11} } func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -382,7 +382,7 @@ var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } func (*PriorityLevelConfiguration) ProtoMessage() {} func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{12} + return fileDescriptor_5d08a1401821035d, []int{12} } func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -410,7 +410,7 @@ var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } func (*PriorityLevelConfigurationCondition) ProtoMessage() {} func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{13} + return fileDescriptor_5d08a1401821035d, []int{13} } func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -438,7 +438,7 @@ var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInf func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } func (*PriorityLevelConfigurationList) ProtoMessage() {} func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{14} + return fileDescriptor_5d08a1401821035d, []int{14} } func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,7 +466,7 @@ var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } func (*PriorityLevelConfigurationReference) ProtoMessage() {} func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{15} + return fileDescriptor_5d08a1401821035d, []int{15} } func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -494,7 +494,7 @@ var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInf func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } func (*PriorityLevelConfigurationSpec) ProtoMessage() {} func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{16} + return fileDescriptor_5d08a1401821035d, []int{16} } func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,7 +522,7 @@ var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } func (*PriorityLevelConfigurationStatus) ProtoMessage() {} func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{17} + return fileDescriptor_5d08a1401821035d, []int{17} } func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -550,7 +550,7 @@ var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } func (*QueuingConfiguration) ProtoMessage() {} func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{18} + return fileDescriptor_5d08a1401821035d, []int{18} } func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +578,7 @@ var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } func (*ResourcePolicyRule) ProtoMessage() {} func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{19} + return fileDescriptor_5d08a1401821035d, []int{19} } func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -606,7 +606,7 @@ var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } func (*ServiceAccountSubject) ProtoMessage() {} func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{20} + return fileDescriptor_5d08a1401821035d, []int{20} } func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -634,7 +634,7 @@ var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{21} + return fileDescriptor_5d08a1401821035d, []int{21} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +662,7 @@ var xxx_messageInfo_Subject proto.InternalMessageInfo func (m *UserSubject) Reset() { *m = UserSubject{} } func (*UserSubject) ProtoMessage() {} func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_f8a25df358697d27, []int{22} + return fileDescriptor_5d08a1401821035d, []int{22} } func (m *UserSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -714,111 +714,110 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1/generated.proto", fileDescriptor_f8a25df358697d27) -} - -var fileDescriptor_f8a25df358697d27 = []byte{ - // 1588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4b, 0x73, 0x1b, 0xc5, - 0x16, 0xb6, 0x64, 0xc9, 0xb6, 0x8e, 0x9f, 0x69, 0xc7, 0x65, 0xc5, 0xb9, 0x25, 0x39, 0x73, 0xeb, - 0xe6, 0x71, 0x43, 0xa4, 0xc4, 0x45, 0x20, 0xa9, 0x00, 0xa9, 0x4c, 0x12, 0xf2, 0xb2, 0x1d, 0xa7, - 0x95, 0x07, 0x15, 0xa8, 0x82, 0xd1, 0xa8, 0x2d, 0x4d, 0x2c, 0xcd, 0x0c, 0xdd, 0x33, 0x32, 0xa6, - 0x8a, 0x2a, 0x7e, 0x42, 0x56, 0x2c, 0x59, 0xc0, 0x3f, 0x60, 0x45, 0xc1, 0x86, 0x65, 0x76, 0x64, - 0x19, 0x58, 0xa8, 0x88, 0xf8, 0x0b, 0x2c, 0x20, 0x2b, 0xaa, 0x7b, 0x7a, 0x66, 0x34, 0x92, 0x66, - 0xac, 0xf2, 0x22, 0x6c, 0xd8, 0x79, 0xce, 0xf9, 0xce, 0x77, 0xba, 0x4f, 0x9f, 0x97, 0x0c, 0xea, - 0xce, 0x05, 0x56, 0x32, 0xac, 0xf2, 0x8e, 0x5b, 0x25, 0xd4, 0x24, 0x0e, 0x61, 0xe5, 0x36, 0x31, - 0x6b, 0x16, 0x2d, 0x4b, 0x85, 0x66, 0x1b, 0xe5, 0xed, 0xa6, 0xb5, 0xab, 0x5b, 0xa6, 0x43, 0xad, - 0x66, 0xb9, 0x7d, 0xae, 0x5c, 0x27, 0x26, 0xa1, 0x9a, 0x43, 0x6a, 0x25, 0x9b, 0x5a, 0x8e, 0x85, - 0x8e, 0x78, 0xd0, 0x92, 0x66, 0x1b, 0xa5, 0x1e, 0x68, 0xa9, 0x7d, 0x6e, 0xe5, 0x4c, 0xdd, 0x70, - 0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0x96, 0xc0, 0x6c, 0xb3, 0xf7, 0xca, 0xf2, 0x76, 0x27, 0x13, - 0x6e, 0x17, 0x09, 0x91, 0xba, 0x24, 0x23, 0x18, 0x0d, 0x33, 0x8e, 0xb2, 0x0e, 0x9b, 0xe9, 0xe3, - 0xa3, 0xcf, 0x74, 0x74, 0x17, 0x96, 0xaa, 0x16, 0xa5, 0xd6, 0xae, 0x61, 0xd6, 0x85, 0x1f, 0x9f, - 0x24, 0x23, 0x48, 0x8e, 0x74, 0x3b, 0xc5, 0x25, 0x75, 0x18, 0x00, 0x0f, 0xb7, 0x53, 0x76, 0x61, - 0x69, 0x93, 0x77, 0x0d, 0x66, 0xb9, 0x54, 0x27, 0x61, 0xf6, 0xa3, 0x22, 0x64, 0xdb, 0x84, 0x56, - 0xbd, 0x0c, 0xce, 0xa9, 0x39, 0x9e, 0xfb, 0x0f, 0xb9, 0x00, 0x7b, 0x72, 0x7e, 0x13, 0x33, 0xb4, - 0x7c, 0x80, 0xd7, 0x59, 0x7e, 0x42, 0x40, 0xc5, 0x4d, 0x36, 0xa3, 0x2a, 0xdc, 0x8f, 0x55, 0x7e, - 0x4e, 0xc3, 0x72, 0x4c, 0xb1, 0xa1, 0x2d, 0x98, 0x62, 0xf2, 0x6f, 0x59, 0x40, 0x4a, 0xc2, 0x33, - 0x48, 0xb3, 0xb0, 0xa1, 0xfb, 0x3c, 0x38, 0x60, 0x41, 0x4f, 0x60, 0x96, 0x4a, 0xef, 0xc2, 0x9d, - 0x6c, 0xec, 0x67, 0x12, 0x68, 0x07, 0x63, 0x12, 0x3e, 0x31, 0xee, 0xe5, 0xc2, 0x51, 0x6a, 0xd4, - 0x86, 0x85, 0x9e, 0xcb, 0x7a, 0xee, 0xc6, 0x85, 0xbb, 0xb3, 0x09, 0xee, 0x86, 0xbe, 0x82, 0x9a, - 0x97, 0x1e, 0x17, 0x36, 0xfb, 0x18, 0xf1, 0x80, 0x0f, 0xe5, 0xa7, 0x34, 0x24, 0xf4, 0x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12, 0xc6, 0x3f, 0xb1, 0x00, - 0xa2, 0x6b, 0x90, 0x71, 0x19, 0xa1, 0xb2, 0x6a, 0x8f, 0x27, 0xe4, 0xf1, 0x03, 0x46, 0xa8, 0xbf, - 0x32, 0x4d, 0x71, 0x52, 0x2e, 0xc0, 0xc2, 0x1a, 0xdd, 0x84, 0x6c, 0x9d, 0xbf, 0x87, 0x2c, 0xcc, - 0x13, 0x09, 0x34, 0xbd, 0xbf, 0x3f, 0xbc, 0xc7, 0x17, 0x12, 0xec, 0x11, 0xa0, 0x26, 0xcc, 0xb1, - 0x48, 0xe0, 0xc4, 0x23, 0x25, 0xaf, 0x40, 0x43, 0x23, 0xad, 0xa2, 0x6e, 0xa7, 0x38, 0x17, 0x55, - 0xe1, 0x3e, 0x6e, 0xa5, 0x0c, 0xd3, 0x3d, 0xd7, 0xda, 0xbf, 0x8f, 0xaa, 0x97, 0x9f, 0xbd, 0x2c, - 0x8c, 0x3d, 0x7f, 0x59, 0x18, 0x7b, 0xf1, 0xb2, 0x30, 0xf6, 0x65, 0xb7, 0x90, 0x7a, 0xd6, 0x2d, - 0xa4, 0x9e, 0x77, 0x0b, 0xa9, 0x17, 0xdd, 0x42, 0xea, 0xb7, 0x6e, 0x21, 0xf5, 0xf4, 0xf7, 0xc2, - 0xd8, 0xe3, 0x23, 0xb1, 0xff, 0x13, 0xfd, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x0a, 0x3e, 0x83, - 0x48, 0x15, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/flowcontrol/v1/generated.proto", fileDescriptor_5d08a1401821035d) +} + +var fileDescriptor_5d08a1401821035d = []byte{ + // 1575 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4b, 0x6f, 0xdb, 0x56, + 0x16, 0x36, 0x65, 0xc9, 0xb6, 0x8e, 0x9f, 0xb9, 0x8e, 0x61, 0x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, 0x23, 0x78, 0x7c, 0x2e, 0xc1, 0x01, 0x01, + 0x6a, 0xc1, 0x1c, 0x4d, 0x04, 0x8e, 0x3f, 0x52, 0xf6, 0x0a, 0x34, 0x34, 0xd2, 0x2a, 0xea, 0x76, + 0x2a, 0x73, 0x49, 0x15, 0xee, 0xe3, 0x96, 0xab, 0x30, 0xdd, 0x73, 0xad, 0x83, 0xfb, 0xa8, 0x7a, + 0xf5, 0xc5, 0xeb, 0xf2, 0xd8, 0xcb, 0xd7, 0xe5, 0xb1, 0x57, 0xaf, 0xcb, 0x63, 0x9f, 0x76, 0xcb, + 0xd2, 0x8b, 0x6e, 0x59, 0x7a, 0xd9, 0x2d, 0x4b, 0xaf, 0xba, 0x65, 0xe9, 0xa7, 0x6e, 0x59, 0x7a, + 0xfe, 0x73, 0x79, 0xec, 0xe9, 0xb1, 0xd4, 0xff, 0x89, 0xfe, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x16, + 0x4e, 0x14, 0xcf, 0x2f, 0x15, 0x00, 0x00, } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go b/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go index 33f4b97e391..96e368f6fdb 100644 --- a/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta1/generated.proto +// source: k8s.io/api/flowcontrol/v1beta1/generated.proto package v1beta1 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{0} + return fileDescriptor_3a5cb22a034fcb2a, []int{0} } func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } func (*FlowDistinguisherMethod) ProtoMessage() {} func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{1} + return fileDescriptor_3a5cb22a034fcb2a, []int{1} } func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo func (m *FlowSchema) Reset() { *m = FlowSchema{} } func (*FlowSchema) ProtoMessage() {} func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{2} + return fileDescriptor_3a5cb22a034fcb2a, []int{2} } func (m *FlowSchema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_FlowSchema proto.InternalMessageInfo func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } func (*FlowSchemaCondition) ProtoMessage() {} func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{3} + return fileDescriptor_3a5cb22a034fcb2a, []int{3} } func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } func (*FlowSchemaList) ProtoMessage() {} func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{4} + return fileDescriptor_3a5cb22a034fcb2a, []int{4} } func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } func (*FlowSchemaSpec) ProtoMessage() {} func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{5} + return fileDescriptor_3a5cb22a034fcb2a, []int{5} } func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +214,7 @@ var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } func (*FlowSchemaStatus) ProtoMessage() {} func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{6} + return fileDescriptor_3a5cb22a034fcb2a, []int{6} } func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo func (m *GroupSubject) Reset() { *m = GroupSubject{} } func (*GroupSubject) ProtoMessage() {} func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{7} + return fileDescriptor_3a5cb22a034fcb2a, []int{7} } func (m *GroupSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +270,7 @@ var xxx_messageInfo_GroupSubject proto.InternalMessageInfo func (m *LimitResponse) Reset() { *m = LimitResponse{} } func (*LimitResponse) ProtoMessage() {} func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{8} + return fileDescriptor_3a5cb22a034fcb2a, []int{8} } func (m *LimitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,7 +298,7 @@ var xxx_messageInfo_LimitResponse proto.InternalMessageInfo func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{9} + return fileDescriptor_3a5cb22a034fcb2a, []int{9} } func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +326,7 @@ var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } func (*NonResourcePolicyRule) ProtoMessage() {} func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{10} + return fileDescriptor_3a5cb22a034fcb2a, []int{10} } func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,7 +354,7 @@ var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } func (*PolicyRulesWithSubjects) ProtoMessage() {} func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{11} + return fileDescriptor_3a5cb22a034fcb2a, []int{11} } func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -382,7 +382,7 @@ var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } func (*PriorityLevelConfiguration) ProtoMessage() {} func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{12} + return fileDescriptor_3a5cb22a034fcb2a, []int{12} } func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -410,7 +410,7 @@ var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } func (*PriorityLevelConfigurationCondition) ProtoMessage() {} func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{13} + return fileDescriptor_3a5cb22a034fcb2a, []int{13} } func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -438,7 +438,7 @@ var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInf func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } func (*PriorityLevelConfigurationList) ProtoMessage() {} func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{14} + return fileDescriptor_3a5cb22a034fcb2a, []int{14} } func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,7 +466,7 @@ var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } func (*PriorityLevelConfigurationReference) ProtoMessage() {} func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{15} + return fileDescriptor_3a5cb22a034fcb2a, []int{15} } func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -494,7 +494,7 @@ var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInf func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } func (*PriorityLevelConfigurationSpec) ProtoMessage() {} func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{16} + return fileDescriptor_3a5cb22a034fcb2a, []int{16} } func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,7 +522,7 @@ var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } func (*PriorityLevelConfigurationStatus) ProtoMessage() {} func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{17} + return fileDescriptor_3a5cb22a034fcb2a, []int{17} } func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -550,7 +550,7 @@ var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } func (*QueuingConfiguration) ProtoMessage() {} func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{18} + return fileDescriptor_3a5cb22a034fcb2a, []int{18} } func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +578,7 @@ var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } func (*ResourcePolicyRule) ProtoMessage() {} func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{19} + return fileDescriptor_3a5cb22a034fcb2a, []int{19} } func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -606,7 +606,7 @@ var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } func (*ServiceAccountSubject) ProtoMessage() {} func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{20} + return fileDescriptor_3a5cb22a034fcb2a, []int{20} } func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -634,7 +634,7 @@ var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{21} + return fileDescriptor_3a5cb22a034fcb2a, []int{21} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +662,7 @@ var xxx_messageInfo_Subject proto.InternalMessageInfo func (m *UserSubject) Reset() { *m = UserSubject{} } func (*UserSubject) ProtoMessage() {} func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_80171c2a4e3669de, []int{22} + return fileDescriptor_3a5cb22a034fcb2a, []int{22} } func (m *UserSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -714,112 +714,111 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta1/generated.proto", fileDescriptor_80171c2a4e3669de) + proto.RegisterFile("k8s.io/api/flowcontrol/v1beta1/generated.proto", fileDescriptor_3a5cb22a034fcb2a) } -var fileDescriptor_80171c2a4e3669de = []byte{ - // 1614 bytes of a gzipped FileDescriptorProto +var fileDescriptor_3a5cb22a034fcb2a = []byte{ + // 1599 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x73, 0xdb, 0xc4, 0x17, 0x8f, 0x1c, 0x3b, 0x89, 0x5f, 0x7e, 0x76, 0xd3, 0x4c, 0xfc, 0x4d, 0xbf, 0x63, 0xa7, 0x62, 0x86, 0x02, 0x6d, 0xe5, 0xb6, 0xb4, 0xb4, 0xc0, 0xf0, 0x23, 0x4a, 0x4b, 0x29, 0x4d, 0xd2, 0x74, - 0xd3, 0x42, 0xa7, 0x74, 0x86, 0xca, 0xf2, 0xc6, 0x56, 0x63, 0x4b, 0xea, 0xae, 0xe4, 0x10, 0x7a, - 0x61, 0xf8, 0x0b, 0x38, 0xc3, 0x91, 0x03, 0x27, 0x2e, 0x5c, 0x39, 0x70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6, 0xf5, 0xd1, 0xb3, 0x2a, 0xac, 0xf1, 0xa8, 0x5f, 0x86, 0x22, 0x86, 0x3b, 0xa8, 0xd5, - 0x53, 0x30, 0x73, 0x99, 0x3a, 0xbe, 0x2b, 0xcf, 0x88, 0x56, 0x21, 0x6d, 0x1b, 0xf5, 0x76, 0xf7, - 0x09, 0x3b, 0xe2, 0x96, 0x51, 0x27, 0x58, 0x68, 0xd4, 0xef, 0x14, 0x98, 0xdd, 0xb0, 0xea, 0x96, - 0x87, 0x09, 0x73, 0x1d, 0x9b, 0x11, 0x74, 0x2e, 0xd6, 0xb1, 0x8e, 0x76, 0x75, 0xac, 0x43, 0x31, - 0x70, 0x47, 0xaf, 0xfa, 0x14, 0x26, 0xef, 0xfb, 0xc4, 0xb7, 0xec, 0x8a, 0xec, 0xd7, 0x67, 0x93, - 0x2e, 0x78, 0x3d, 0x80, 0xc7, 0xb2, 0x4d, 0x9f, 0xe6, 0x2d, 0x40, 0x6a, 0x70, 0x9b, 0x51, 0xfd, - 0x27, 0x05, 0x47, 0x85, 0x63, 0x52, 0x1e, 0x32, 0x95, 0xef, 0x40, 0xce, 0x60, 0xcc, 0xa7, 0xa4, - 0x3c, 0x68, 0x2a, 0xaf, 0xca, 0xdb, 0xe4, 0xd6, 0x06, 0xe0, 0xf0, 0x40, 0x06, 0x74, 0x0f, 0x66, - 0x6b, 0x9d, 0x77, 0x97, 0xd7, 0x3c, 0x99, 0x74, 0xcd, 0x58, 0xc0, 0xf4, 0x25, 0x79, 0x82, 0x78, - 0xd0, 0x71, 0x9c, 0xba, 0xdf, 0x16, 0x30, 0x3e, 0xfa, 0x16, 0x80, 0xae, 0xc1, 0x52, 0xc9, 0xa1, - 0xd4, 0xd9, 0xb7, 0xec, 0x8a, 0xf0, 0xd3, 0x26, 0x49, 0x0b, 0x92, 0xff, 0xb5, 0x9a, 0x85, 0x25, - 0xbd, 0x1f, 0x00, 0xf7, 0xb7, 0x53, 0xf7, 0x61, 0x69, 0x8b, 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x98, 0xa8, 0xbc, 0x43, 0xc2, 0x7e, 0x31, 0xe2, 0xc2, 0x31, 0x26, 0x2a, 0xf5, 0x5c, 0x6a, 0xa9, + 0xff, 0x92, 0x83, 0xf1, 0x98, 0x3e, 0xbf, 0x6b, 0x58, 0x35, 0xc1, 0x7c, 0x24, 0x44, 0x5f, 0x35, + 0xac, 0xda, 0xd3, 0x56, 0x65, 0x52, 0xc0, 0xd8, 0x27, 0xe6, 0x40, 0x74, 0x05, 0xf2, 0x3e, 0x25, + 0xae, 0x28, 0xe2, 0xe3, 0x59, 0xc9, 0x7c, 0x93, 0x12, 0x37, 0xdc, 0xaf, 0x26, 0x18, 0x33, 0x13, + 0x60, 0x4e, 0x81, 0xd6, 0xa1, 0x50, 0x67, 0x8f, 0x22, 0xea, 0xf4, 0x44, 0x16, 0x57, 0xe7, 0x8f, + 0x98, 0x20, 0x0d, 0xb8, 0x04, 0x07, 0x2c, 0xe8, 0x3e, 0xcc, 0xd0, 0x44, 0x08, 0xf9, 0x73, 0x0d, + 0xb1, 0x2f, 0xf5, 0x0d, 0xbc, 0x8a, 0xda, 0xad, 0xca, 0x4c, 0xf2, 0x08, 0x77, 0x19, 0x90, 0xab, + 0x30, 0xd9, 0xe1, 0x60, 0x76, 0x97, 0x55, 0x2f, 0x3e, 0x7c, 0x52, 0x1e, 0x79, 0xf4, 0xa4, 0x3c, + 0xf2, 0xf8, 0x49, 0x79, 0xe4, 0xcb, 0x76, 0x59, 0x7a, 0xd8, 0x2e, 0x4b, 0x8f, 0xda, 0x65, 0xe9, + 0x71, 0xbb, 0x2c, 0xfd, 0xde, 0x2e, 0x4b, 0x5f, 0xff, 0x51, 0x1e, 0xb9, 0x5d, 0x1e, 0xfc, 0xbf, + 0xd8, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x24, 0x42, 0x4c, 0x0f, 0xac, 0x15, 0x00, 0x00, } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go b/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go index 7f8ee085063..f646446df9d 100644 --- a/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go +++ b/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta2/generated.proto +// source: k8s.io/api/flowcontrol/v1beta2/generated.proto package v1beta2 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{0} + return fileDescriptor_2e620af2eea53237, []int{0} } func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } func (*FlowDistinguisherMethod) ProtoMessage() {} func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{1} + return fileDescriptor_2e620af2eea53237, []int{1} } func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo func (m *FlowSchema) Reset() { *m = FlowSchema{} } func (*FlowSchema) ProtoMessage() {} func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{2} + return fileDescriptor_2e620af2eea53237, []int{2} } func (m *FlowSchema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_FlowSchema proto.InternalMessageInfo func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } func (*FlowSchemaCondition) ProtoMessage() {} func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{3} + return fileDescriptor_2e620af2eea53237, []int{3} } func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } func (*FlowSchemaList) ProtoMessage() {} func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{4} + return fileDescriptor_2e620af2eea53237, []int{4} } func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } func (*FlowSchemaSpec) ProtoMessage() {} func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{5} + return fileDescriptor_2e620af2eea53237, []int{5} } func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +214,7 @@ var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } func (*FlowSchemaStatus) ProtoMessage() {} func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{6} + return fileDescriptor_2e620af2eea53237, []int{6} } func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo func (m *GroupSubject) Reset() { *m = GroupSubject{} } func (*GroupSubject) ProtoMessage() {} func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{7} + return fileDescriptor_2e620af2eea53237, []int{7} } func (m *GroupSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +270,7 @@ var xxx_messageInfo_GroupSubject proto.InternalMessageInfo func (m *LimitResponse) Reset() { *m = LimitResponse{} } func (*LimitResponse) ProtoMessage() {} func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{8} + return fileDescriptor_2e620af2eea53237, []int{8} } func (m *LimitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,7 +298,7 @@ var xxx_messageInfo_LimitResponse proto.InternalMessageInfo func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{9} + return fileDescriptor_2e620af2eea53237, []int{9} } func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +326,7 @@ var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } func (*NonResourcePolicyRule) ProtoMessage() {} func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{10} + return fileDescriptor_2e620af2eea53237, []int{10} } func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,7 +354,7 @@ var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } func (*PolicyRulesWithSubjects) ProtoMessage() {} func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{11} + return fileDescriptor_2e620af2eea53237, []int{11} } func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -382,7 +382,7 @@ var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } func (*PriorityLevelConfiguration) ProtoMessage() {} func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{12} + return fileDescriptor_2e620af2eea53237, []int{12} } func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -410,7 +410,7 @@ var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } func (*PriorityLevelConfigurationCondition) ProtoMessage() {} func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{13} + return fileDescriptor_2e620af2eea53237, []int{13} } func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -438,7 +438,7 @@ var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInf func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } func (*PriorityLevelConfigurationList) ProtoMessage() {} func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{14} + return fileDescriptor_2e620af2eea53237, []int{14} } func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,7 +466,7 @@ var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } func (*PriorityLevelConfigurationReference) ProtoMessage() {} func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{15} + return fileDescriptor_2e620af2eea53237, []int{15} } func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -494,7 +494,7 @@ var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInf func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } func (*PriorityLevelConfigurationSpec) ProtoMessage() {} func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{16} + return fileDescriptor_2e620af2eea53237, []int{16} } func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,7 +522,7 @@ var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } func (*PriorityLevelConfigurationStatus) ProtoMessage() {} func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{17} + return fileDescriptor_2e620af2eea53237, []int{17} } func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -550,7 +550,7 @@ var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } func (*QueuingConfiguration) ProtoMessage() {} func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{18} + return fileDescriptor_2e620af2eea53237, []int{18} } func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +578,7 @@ var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } func (*ResourcePolicyRule) ProtoMessage() {} func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{19} + return fileDescriptor_2e620af2eea53237, []int{19} } func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -606,7 +606,7 @@ var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } func (*ServiceAccountSubject) ProtoMessage() {} func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{20} + return fileDescriptor_2e620af2eea53237, []int{20} } func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -634,7 +634,7 @@ var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{21} + return fileDescriptor_2e620af2eea53237, []int{21} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +662,7 @@ var xxx_messageInfo_Subject proto.InternalMessageInfo func (m *UserSubject) Reset() { *m = UserSubject{} } func (*UserSubject) ProtoMessage() {} func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_ed300aa8e672704e, []int{22} + return fileDescriptor_2e620af2eea53237, []int{22} } func (m *UserSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -714,113 +714,112 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta2/generated.proto", fileDescriptor_ed300aa8e672704e) -} - -var fileDescriptor_ed300aa8e672704e = []byte{ - // 1617 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4b, 0x73, 0x1b, 0xc5, - 0x16, 0xf6, 0xc8, 0x92, 0x6d, 0x1d, 0x3f, 0xd3, 0x8e, 0xcb, 0xba, 0xce, 0x2d, 0xc9, 0x99, 0x5b, - 0x75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x2e, 0x2d, 0x8e, 0x1c, 0xc6, 0x0b, 0x0b, 0x29, - 0x96, 0x5a, 0xf4, 0x7f, 0x98, 0xac, 0x13, 0xc6, 0x8c, 0x0a, 0xc9, 0x65, 0x04, 0x70, 0x5e, 0x02, - 0x27, 0xb7, 0x02, 0x31, 0x6e, 0xeb, 0xd5, 0x1f, 0x15, 0x98, 0x8b, 0xe2, 0xb4, 0x69, 0x31, 0x0f, - 0xdd, 0xed, 0xc9, 0x3d, 0x6d, 0xb4, 0x3b, 0x71, 0x6b, 0x91, 0x79, 0x0b, 0xd2, 0xdd, 0x54, 0x5b, - 0xd2, 0x91, 0x77, 0xd7, 0x21, 0x63, 0x79, 0xa4, 0xce, 0xa3, 0x3e, 0xde, 0x15, 0xae, 0x84, 0x24, - 0xd1, 0x67, 0x25, 0x6d, 0xe6, 0x2a, 0x27, 0xc0, 0x01, 0x8f, 0xfa, 0xfb, 0x78, 0xe7, 0x0d, 0x78, - 0x3e, 0xa2, 0x6f, 0x15, 0x58, 0x71, 0x07, 0x36, 0x18, 0x79, 0xa9, 0x8d, 0x24, 0xcf, 0x83, 0x5b, - 0x14, 0x26, 0x7b, 0x84, 0xf7, 0x15, 0xa2, 0xab, 0xf2, 0x48, 0x2b, 0x43, 0xc0, 0x43, 0x8e, 0x82, - 0x3e, 0x00, 0x54, 0x37, 0x3c, 0x1e, 0xd1, 0xca, 0x0e, 0x25, 0x26, 0x29, 0x73, 0x56, 0xd9, 0x94, - 0xc2, 0xec, 0xd8, 0xea, 0x41, 0xe0, 0x3e, 0x56, 0xe8, 0x0b, 0x05, 0x16, 0xcb, 0xbd, 0x4d, 0x46, - 0xe6, 0xe5, 0x85, 0x51, 0x02, 0xdd, 0xa7, 0x47, 0xe9, 0xcb, 0xad, 0x66, 0x61, 0xb1, 0x8f, 0x02, - 0xf7, 0x73, 0x86, 0xee, 0x42, 0x86, 0xfa, 0x35, 0xc2, 0x72, 0x69, 0xf1, 0xbc, 0x89, 0x5e, 0x77, - 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e6, 0x5b, 0x8c, 0xd0, 0xf6, 0x7e, 0x35, 0xc5, - 0x99, 0xb9, 0x00, 0x0b, 0x0a, 0xb4, 0x05, 0x99, 0x0a, 0x7f, 0x14, 0x59, 0xa7, 0xa7, 0x92, 0xb8, - 0x3a, 0x7f, 0xc4, 0x04, 0x69, 0x20, 0x24, 0x38, 0x60, 0x41, 0x0f, 0x60, 0x8e, 0xc5, 0x42, 0x28, - 0x9e, 0x6b, 0x84, 0x7d, 0xa9, 0x6f, 0xe0, 0x75, 0xd4, 0x6a, 0x16, 0xe6, 0xe2, 0x2a, 0xdc, 0xe5, - 0x40, 0x2d, 0xc2, 0x74, 0xc7, 0x05, 0x93, 0xbb, 0xac, 0x7e, 0xe9, 0xd1, 0xd3, 0xfc, 0xd8, 0xe3, - 0xa7, 0xf9, 0xb1, 0x27, 0x4f, 0xf3, 0x63, 0x9f, 0xb7, 0xf2, 0xca, 0xa3, 0x56, 0x5e, 0x79, 0xdc, - 0xca, 0x2b, 0x4f, 0x5a, 0x79, 0xe5, 0xd7, 0x56, 0x5e, 0xf9, 0xf2, 0xb7, 0xfc, 0xd8, 0x9d, 0xfc, - 0xf0, 0xff, 0xc5, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x4d, 0x1e, 0x25, 0xc5, 0x15, 0x00, - 0x00, + proto.RegisterFile("k8s.io/api/flowcontrol/v1beta2/generated.proto", fileDescriptor_2e620af2eea53237) +} + +var fileDescriptor_2e620af2eea53237 = []byte{ + // 1602 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x73, 0xdb, 0xd4, + 0x16, 0x8f, 0x1c, 0x3b, 0x89, 0x4f, 0x3e, 0x7b, 0xd3, 0x4c, 0xfc, 0xd2, 0x37, 0x76, 0xaa, 0x37, + 0xf3, 0xfa, 0x1e, 0x6d, 0xe5, 0x36, 0xb4, 0xb4, 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a, 0x12, + 0x4d, 0x9d, 0x1b, 0x5d, 0xe7, 0xb8, 0x47, 0x43, 0xfe, 0x53, 0x02, 0xf4, 0x3c, 0xdb, 0xc4, 0x49, + 0x28, 0x6a, 0x8e, 0xc1, 0x57, 0xdc, 0xa0, 0xd0, 0x8a, 0xea, 0x74, 0xbb, 0x55, 0x29, 0xae, 0x6e, + 0x5d, 0x0d, 0x84, 0x38, 0x3e, 0x67, 0xe0, 0x70, 0xd0, 0x06, 0x03, 0x55, 0x80, 0x43, 0xc3, 0x14, + 0xc7, 0xe7, 0xe8, 0x22, 0x4c, 0xe9, 0x4d, 0x9f, 0x7a, 0xc4, 0xdd, 0xd6, 0x6d, 0x87, 0xf0, 0xc6, + 0x34, 0xa1, 0x1e, 0x15, 0x3e, 0x4d, 0xad, 0x75, 0x9c, 0xe1, 0x04, 0x12, 0x29, 0x00, 0xac, 0xac, + 0xa8, 0xa3, 0x31, 0x3b, 0x05, 0x6e, 0x67, 0x86, 0x3d, 0xd8, 0x66, 0x24, 0xc5, 0x1d, 0x08, 0xf9, + 0x3e, 0x2c, 0x6c, 0x13, 0x77, 0xdf, 0xd0, 0xc9, 0xaa, 0xae, 0xdb, 0xbe, 0xe5, 0x85, 0xcb, 0x7a, + 0x15, 0x8a, 0x11, 0x4c, 0x54, 0xde, 0x11, 0x61, 0xbf, 0x18, 0x71, 0xe1, 0x18, 0x13, 0x95, 0x7a, + 0x2e, 0xb5, 0xd4, 0x7f, 0xca, 0xc1, 0x78, 0x4c, 0x9f, 0xdf, 0x33, 0xac, 0x9a, 0x60, 0x3e, 0x16, + 0xa2, 0xaf, 0x19, 0x56, 0xed, 0x59, 0xab, 0x32, 0x29, 0x60, 0xec, 0x13, 0x73, 0x20, 0xba, 0x0a, + 0x79, 0x9f, 0x12, 0x57, 0x14, 0xf1, 0xc9, 0xac, 0x64, 0xbe, 0x45, 0x89, 0x1b, 0xee, 0x57, 0x13, + 0x8c, 0x99, 0x09, 0x30, 0xa7, 0x40, 0x1b, 0x50, 0xa8, 0xb3, 0x47, 0x11, 0x75, 0x7a, 0x2a, 0x8b, + 0xab, 0xf3, 0x47, 0x4c, 0x90, 0x06, 0x5c, 0x82, 0x03, 0x16, 0xf4, 0x00, 0x66, 0x68, 0x22, 0x84, + 0xfc, 0xb9, 0x86, 0xd8, 0x97, 0xfa, 0x06, 0x5e, 0x45, 0xed, 0x56, 0x65, 0x26, 0x79, 0x84, 0xbb, + 0x0c, 0xc8, 0x55, 0x98, 0xec, 0x70, 0x30, 0xbb, 0xcb, 0xaa, 0x97, 0x1e, 0x3d, 0x2d, 0x8f, 0x3c, + 0x7e, 0x5a, 0x1e, 0x79, 0xf2, 0xb4, 0x3c, 0xf2, 0x79, 0xbb, 0x2c, 0x3d, 0x6a, 0x97, 0xa5, 0xc7, + 0xed, 0xb2, 0xf4, 0xa4, 0x5d, 0x96, 0x7e, 0x6d, 0x97, 0xa5, 0x2f, 0x7f, 0x2b, 0x8f, 0xdc, 0x29, + 0x0f, 0xfe, 0x5f, 0xec, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe3, 0xd5, 0xd0, 0x62, 0xac, 0x15, + 0x00, 0x00, } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/flowcontrol/v1beta3/generated.pb.go b/vendor/k8s.io/api/flowcontrol/v1beta3/generated.pb.go index c6598306d99..e0a3fc1e180 100644 --- a/vendor/k8s.io/api/flowcontrol/v1beta3/generated.pb.go +++ b/vendor/k8s.io/api/flowcontrol/v1beta3/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta3/generated.proto +// source: k8s.io/api/flowcontrol/v1beta3/generated.proto package v1beta3 @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ExemptPriorityLevelConfiguration) Reset() { *m = ExemptPriorityLevelConfiguration{} } func (*ExemptPriorityLevelConfiguration) ProtoMessage() {} func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{0} + return fileDescriptor_52ab6629c083d251, []int{0} } func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_ExemptPriorityLevelConfiguration proto.InternalMessageInfo func (m *FlowDistinguisherMethod) Reset() { *m = FlowDistinguisherMethod{} } func (*FlowDistinguisherMethod) ProtoMessage() {} func (*FlowDistinguisherMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{1} + return fileDescriptor_52ab6629c083d251, []int{1} } func (m *FlowDistinguisherMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_FlowDistinguisherMethod proto.InternalMessageInfo func (m *FlowSchema) Reset() { *m = FlowSchema{} } func (*FlowSchema) ProtoMessage() {} func (*FlowSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{2} + return fileDescriptor_52ab6629c083d251, []int{2} } func (m *FlowSchema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_FlowSchema proto.InternalMessageInfo func (m *FlowSchemaCondition) Reset() { *m = FlowSchemaCondition{} } func (*FlowSchemaCondition) ProtoMessage() {} func (*FlowSchemaCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{3} + return fileDescriptor_52ab6629c083d251, []int{3} } func (m *FlowSchemaCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_FlowSchemaCondition proto.InternalMessageInfo func (m *FlowSchemaList) Reset() { *m = FlowSchemaList{} } func (*FlowSchemaList) ProtoMessage() {} func (*FlowSchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{4} + return fileDescriptor_52ab6629c083d251, []int{4} } func (m *FlowSchemaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_FlowSchemaList proto.InternalMessageInfo func (m *FlowSchemaSpec) Reset() { *m = FlowSchemaSpec{} } func (*FlowSchemaSpec) ProtoMessage() {} func (*FlowSchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{5} + return fileDescriptor_52ab6629c083d251, []int{5} } func (m *FlowSchemaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +214,7 @@ var xxx_messageInfo_FlowSchemaSpec proto.InternalMessageInfo func (m *FlowSchemaStatus) Reset() { *m = FlowSchemaStatus{} } func (*FlowSchemaStatus) ProtoMessage() {} func (*FlowSchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{6} + return fileDescriptor_52ab6629c083d251, []int{6} } func (m *FlowSchemaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ var xxx_messageInfo_FlowSchemaStatus proto.InternalMessageInfo func (m *GroupSubject) Reset() { *m = GroupSubject{} } func (*GroupSubject) ProtoMessage() {} func (*GroupSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{7} + return fileDescriptor_52ab6629c083d251, []int{7} } func (m *GroupSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +270,7 @@ var xxx_messageInfo_GroupSubject proto.InternalMessageInfo func (m *LimitResponse) Reset() { *m = LimitResponse{} } func (*LimitResponse) ProtoMessage() {} func (*LimitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{8} + return fileDescriptor_52ab6629c083d251, []int{8} } func (m *LimitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,7 +298,7 @@ var xxx_messageInfo_LimitResponse proto.InternalMessageInfo func (m *LimitedPriorityLevelConfiguration) Reset() { *m = LimitedPriorityLevelConfiguration{} } func (*LimitedPriorityLevelConfiguration) ProtoMessage() {} func (*LimitedPriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{9} + return fileDescriptor_52ab6629c083d251, []int{9} } func (m *LimitedPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +326,7 @@ var xxx_messageInfo_LimitedPriorityLevelConfiguration proto.InternalMessageInfo func (m *NonResourcePolicyRule) Reset() { *m = NonResourcePolicyRule{} } func (*NonResourcePolicyRule) ProtoMessage() {} func (*NonResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{10} + return fileDescriptor_52ab6629c083d251, []int{10} } func (m *NonResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,7 +354,7 @@ var xxx_messageInfo_NonResourcePolicyRule proto.InternalMessageInfo func (m *PolicyRulesWithSubjects) Reset() { *m = PolicyRulesWithSubjects{} } func (*PolicyRulesWithSubjects) ProtoMessage() {} func (*PolicyRulesWithSubjects) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{11} + return fileDescriptor_52ab6629c083d251, []int{11} } func (m *PolicyRulesWithSubjects) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -382,7 +382,7 @@ var xxx_messageInfo_PolicyRulesWithSubjects proto.InternalMessageInfo func (m *PriorityLevelConfiguration) Reset() { *m = PriorityLevelConfiguration{} } func (*PriorityLevelConfiguration) ProtoMessage() {} func (*PriorityLevelConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{12} + return fileDescriptor_52ab6629c083d251, []int{12} } func (m *PriorityLevelConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -410,7 +410,7 @@ var xxx_messageInfo_PriorityLevelConfiguration proto.InternalMessageInfo func (m *PriorityLevelConfigurationCondition) Reset() { *m = PriorityLevelConfigurationCondition{} } func (*PriorityLevelConfigurationCondition) ProtoMessage() {} func (*PriorityLevelConfigurationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{13} + return fileDescriptor_52ab6629c083d251, []int{13} } func (m *PriorityLevelConfigurationCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -438,7 +438,7 @@ var xxx_messageInfo_PriorityLevelConfigurationCondition proto.InternalMessageInf func (m *PriorityLevelConfigurationList) Reset() { *m = PriorityLevelConfigurationList{} } func (*PriorityLevelConfigurationList) ProtoMessage() {} func (*PriorityLevelConfigurationList) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{14} + return fileDescriptor_52ab6629c083d251, []int{14} } func (m *PriorityLevelConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,7 +466,7 @@ var xxx_messageInfo_PriorityLevelConfigurationList proto.InternalMessageInfo func (m *PriorityLevelConfigurationReference) Reset() { *m = PriorityLevelConfigurationReference{} } func (*PriorityLevelConfigurationReference) ProtoMessage() {} func (*PriorityLevelConfigurationReference) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{15} + return fileDescriptor_52ab6629c083d251, []int{15} } func (m *PriorityLevelConfigurationReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -494,7 +494,7 @@ var xxx_messageInfo_PriorityLevelConfigurationReference proto.InternalMessageInf func (m *PriorityLevelConfigurationSpec) Reset() { *m = PriorityLevelConfigurationSpec{} } func (*PriorityLevelConfigurationSpec) ProtoMessage() {} func (*PriorityLevelConfigurationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{16} + return fileDescriptor_52ab6629c083d251, []int{16} } func (m *PriorityLevelConfigurationSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,7 +522,7 @@ var xxx_messageInfo_PriorityLevelConfigurationSpec proto.InternalMessageInfo func (m *PriorityLevelConfigurationStatus) Reset() { *m = PriorityLevelConfigurationStatus{} } func (*PriorityLevelConfigurationStatus) ProtoMessage() {} func (*PriorityLevelConfigurationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{17} + return fileDescriptor_52ab6629c083d251, []int{17} } func (m *PriorityLevelConfigurationStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -550,7 +550,7 @@ var xxx_messageInfo_PriorityLevelConfigurationStatus proto.InternalMessageInfo func (m *QueuingConfiguration) Reset() { *m = QueuingConfiguration{} } func (*QueuingConfiguration) ProtoMessage() {} func (*QueuingConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{18} + return fileDescriptor_52ab6629c083d251, []int{18} } func (m *QueuingConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +578,7 @@ var xxx_messageInfo_QueuingConfiguration proto.InternalMessageInfo func (m *ResourcePolicyRule) Reset() { *m = ResourcePolicyRule{} } func (*ResourcePolicyRule) ProtoMessage() {} func (*ResourcePolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{19} + return fileDescriptor_52ab6629c083d251, []int{19} } func (m *ResourcePolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -606,7 +606,7 @@ var xxx_messageInfo_ResourcePolicyRule proto.InternalMessageInfo func (m *ServiceAccountSubject) Reset() { *m = ServiceAccountSubject{} } func (*ServiceAccountSubject) ProtoMessage() {} func (*ServiceAccountSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{20} + return fileDescriptor_52ab6629c083d251, []int{20} } func (m *ServiceAccountSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -634,7 +634,7 @@ var xxx_messageInfo_ServiceAccountSubject proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{21} + return fileDescriptor_52ab6629c083d251, []int{21} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +662,7 @@ var xxx_messageInfo_Subject proto.InternalMessageInfo func (m *UserSubject) Reset() { *m = UserSubject{} } func (*UserSubject) ProtoMessage() {} func (*UserSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_803504887082f044, []int{22} + return fileDescriptor_52ab6629c083d251, []int{22} } func (m *UserSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -714,112 +714,111 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/flowcontrol/v1beta3/generated.proto", fileDescriptor_803504887082f044) -} - -var fileDescriptor_803504887082f044 = []byte{ - // 1604 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcb, 0x73, 0xdb, 0x54, - 0x17, 0x8f, 0x1c, 0x3b, 0x89, 0x4f, 0x9e, 0xbd, 0x69, 0x26, 0xfe, 0xd2, 0x6f, 0xec, 0x54, 0xdf, - 0xcc, 0x57, 0xa0, 0xad, 0xdc, 0x27, 0x2d, 0x30, 0x3c, 0xaa, 0xb4, 0x94, 0xd2, 0x24, 0x4d, 0x6f, - 0x5a, 0xe8, 0x94, 0xce, 0x50, 0x59, 0xbe, 0xb1, 0xd5, 0x58, 0x8f, 0xea, 0x4a, 0x0e, 0xa1, 0x1b, - 0x86, 0xbf, 0x80, 0x35, 0x2c, 0x59, 0xb0, 0x62, 0xc3, 0x96, 0x05, 0x4b, 0x3a, 0xac, 0xba, 0xec, - 0xca, 0x50, 0xb3, 0xe2, 0x3f, 0x80, 0xce, 0x30, 0xc3, 0xdc, 0xab, 0x2b, 0xc9, 0xf2, 0x4b, 0x9e, - 0x74, 0xa6, 0x2b, 0x76, 0xd1, 0x79, 0xfc, 0xce, 0xbd, 0xe7, 0x9e, 0xc7, 0xcf, 0x81, 0xab, 0xbb, - 0x17, 0xa9, 0x62, 0xd8, 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0xdb, 0x45, 0xe9, 0xb7, 0x76, 0x51, 0xfa, 0xea, 0xf7, 0xe2, - 0xd8, 0xdd, 0xe2, 0xf0, 0xff, 0xc5, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xc5, 0x22, 0x46, - 0xc5, 0x15, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/flowcontrol/v1beta3/generated.proto", fileDescriptor_52ab6629c083d251) +} + +var fileDescriptor_52ab6629c083d251 = []byte{ + // 1589 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcb, 0x6f, 0xdc, 0x54, + 0x17, 0x8f, 0x27, 0x33, 0x49, 0xe6, 0xe4, 0xd9, 0x9b, 0x46, 0x99, 0x2f, 0xfd, 0x34, 0x93, 0xfa, + 0x93, 0xbe, 0x02, 0x6d, 0x3d, 0x7d, 0xd2, 0x02, 0xe2, 0x51, 0xa7, 0xa5, 0x94, 0x26, 0x69, 0x7a, + 0xd3, 0x42, 0x55, 0x2a, 0x51, 0xc7, 0x73, 0xe3, 0x71, 0x33, 0x7e, 0xd4, 0xd7, 0x4e, 0x08, 0xdd, + 0x20, 0xfe, 0x02, 0xd6, 0xb0, 0x64, 0xc1, 0x8a, 0x0d, 0x5b, 0x16, 0x2c, 0xa9, 0x58, 0x75, 0xd9, + 0xd5, 0x40, 0x87, 0x15, 0xff, 0x01, 0x54, 0x42, 0x42, 0xf7, 0xfa, 0xda, 0x1e, 0xcf, 0xcb, 0xa3, + 0x54, 0xea, 0x8a, 0x5d, 0x7c, 0xee, 0x39, 0xbf, 0x73, 0xcf, 0xb9, 0xe7, 0xf1, 0x9b, 0x80, 0xb2, + 0x73, 0x91, 0x2a, 0xa6, 0x53, 0xd5, 0x5c, 0xb3, 0xba, 0xdd, 0x70, 0xf6, 0x74, 0xc7, 0xf6, 0x3d, + 0xa7, 0x51, 0xdd, 0x3d, 0xbd, 0x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, 0x22, 0xeb, 0x55, 0x28, 0xc6, 0x6a, 0xa2, 0xf3, 0x0e, 0x09, 0xff, 0xc5, 0x18, 0x0b, 0x27, + 0x3a, 0x71, 0xab, 0xe7, 0xfa, 0xb6, 0xfa, 0xcf, 0x39, 0x18, 0x4f, 0xe0, 0xf3, 0x3b, 0xa6, 0x5d, + 0x13, 0xc8, 0x47, 0x22, 0xed, 0xeb, 0xa6, 0x5d, 0x7b, 0xde, 0xac, 0x4c, 0x0a, 0x35, 0xf6, 0x89, + 0xb9, 0x22, 0xba, 0x06, 0xf9, 0x80, 0x12, 0x4f, 0x34, 0xf1, 0xf1, 0xac, 0x62, 0xbe, 0x4d, 0x89, + 0x17, 0xf1, 0xab, 0x09, 0x86, 0xcc, 0x04, 0x98, 0x43, 0xa0, 0x35, 0x28, 0x18, 0xec, 0x51, 0x44, + 0x9f, 0x9e, 0xc8, 0xc2, 0x6a, 0xff, 0x11, 0x13, 0x96, 0x01, 0x97, 0xe0, 0x10, 0x05, 0x3d, 0x84, + 0x19, 0x9a, 0x4a, 0x21, 0x7f, 0xae, 0x21, 0xf8, 0x52, 0xcf, 0xc4, 0xab, 0xa8, 0xd5, 0xac, 0xcc, + 0xa4, 0x8f, 0x70, 0x87, 0x03, 0xb9, 0x0a, 0x93, 0x6d, 0x01, 0x66, 0x4f, 0x59, 0xf5, 0xf2, 0xe3, + 0x67, 0xe5, 0x91, 0x27, 0xcf, 0xca, 0x23, 0x4f, 0x9f, 0x95, 0x47, 0xbe, 0x68, 0x95, 0xa5, 0xc7, + 0xad, 0xb2, 0xf4, 0xa4, 0x55, 0x96, 0x9e, 0xb6, 0xca, 0xd2, 0x6f, 0xad, 0xb2, 0xf4, 0xd5, 0xef, + 0xe5, 0x91, 0xbb, 0xe5, 0xc1, 0xff, 0x8b, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0x03, 0x5d, 0xec, + 0x01, 0xac, 0x15, 0x00, 0x00, } func (m *ExemptPriorityLevelConfiguration) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/networking/v1/generated.pb.go b/vendor/k8s.io/api/networking/v1/generated.pb.go index daeaea5dce7..7c023e6903f 100644 --- a/vendor/k8s.io/api/networking/v1/generated.pb.go +++ b/vendor/k8s.io/api/networking/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/networking/v1/generated.proto +// source: k8s.io/api/networking/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } func (*HTTPIngressPath) ProtoMessage() {} func (*HTTPIngressPath) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{0} + return fileDescriptor_2c41434372fec1d7, []int{0} } func (m *HTTPIngressPath) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_HTTPIngressPath proto.InternalMessageInfo func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } func (*HTTPIngressRuleValue) ProtoMessage() {} func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{1} + return fileDescriptor_2c41434372fec1d7, []int{1} } func (m *HTTPIngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo func (m *IPBlock) Reset() { *m = IPBlock{} } func (*IPBlock) ProtoMessage() {} func (*IPBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{2} + return fileDescriptor_2c41434372fec1d7, []int{2} } func (m *IPBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_IPBlock proto.InternalMessageInfo func (m *Ingress) Reset() { *m = Ingress{} } func (*Ingress) ProtoMessage() {} func (*Ingress) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{3} + return fileDescriptor_2c41434372fec1d7, []int{3} } func (m *Ingress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_Ingress proto.InternalMessageInfo func (m *IngressBackend) Reset() { *m = IngressBackend{} } func (*IngressBackend) ProtoMessage() {} func (*IngressBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{4} + return fileDescriptor_2c41434372fec1d7, []int{4} } func (m *IngressBackend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_IngressBackend proto.InternalMessageInfo func (m *IngressClass) Reset() { *m = IngressClass{} } func (*IngressClass) ProtoMessage() {} func (*IngressClass) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{5} + return fileDescriptor_2c41434372fec1d7, []int{5} } func (m *IngressClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_IngressClass proto.InternalMessageInfo func (m *IngressClassList) Reset() { *m = IngressClassList{} } func (*IngressClassList) ProtoMessage() {} func (*IngressClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{6} + return fileDescriptor_2c41434372fec1d7, []int{6} } func (m *IngressClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_IngressClassList proto.InternalMessageInfo func (m *IngressClassParametersReference) Reset() { *m = IngressClassParametersReference{} } func (*IngressClassParametersReference) ProtoMessage() {} func (*IngressClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{7} + return fileDescriptor_2c41434372fec1d7, []int{7} } func (m *IngressClassParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_IngressClassParametersReference proto.InternalMessageInfo func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } func (*IngressClassSpec) ProtoMessage() {} func (*IngressClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{8} + return fileDescriptor_2c41434372fec1d7, []int{8} } func (m *IngressClassSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_IngressClassSpec proto.InternalMessageInfo func (m *IngressList) Reset() { *m = IngressList{} } func (*IngressList) ProtoMessage() {} func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{9} + return fileDescriptor_2c41434372fec1d7, []int{9} } func (m *IngressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_IngressList proto.InternalMessageInfo func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } func (*IngressLoadBalancerIngress) ProtoMessage() {} func (*IngressLoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{10} + return fileDescriptor_2c41434372fec1d7, []int{10} } func (m *IngressLoadBalancerIngress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_IngressLoadBalancerIngress proto.InternalMessageInfo func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } func (*IngressLoadBalancerStatus) ProtoMessage() {} func (*IngressLoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{11} + return fileDescriptor_2c41434372fec1d7, []int{11} } func (m *IngressLoadBalancerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_IngressLoadBalancerStatus proto.InternalMessageInfo func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } func (*IngressPortStatus) ProtoMessage() {} func (*IngressPortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{12} + return fileDescriptor_2c41434372fec1d7, []int{12} } func (m *IngressPortStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_IngressPortStatus proto.InternalMessageInfo func (m *IngressRule) Reset() { *m = IngressRule{} } func (*IngressRule) ProtoMessage() {} func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{13} + return fileDescriptor_2c41434372fec1d7, []int{13} } func (m *IngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_IngressRule proto.InternalMessageInfo func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } func (*IngressRuleValue) ProtoMessage() {} func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{14} + return fileDescriptor_2c41434372fec1d7, []int{14} } func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo func (m *IngressServiceBackend) Reset() { *m = IngressServiceBackend{} } func (*IngressServiceBackend) ProtoMessage() {} func (*IngressServiceBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{15} + return fileDescriptor_2c41434372fec1d7, []int{15} } func (m *IngressServiceBackend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_IngressServiceBackend proto.InternalMessageInfo func (m *IngressSpec) Reset() { *m = IngressSpec{} } func (*IngressSpec) ProtoMessage() {} func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{16} + return fileDescriptor_2c41434372fec1d7, []int{16} } func (m *IngressSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_IngressSpec proto.InternalMessageInfo func (m *IngressStatus) Reset() { *m = IngressStatus{} } func (*IngressStatus) ProtoMessage() {} func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{17} + return fileDescriptor_2c41434372fec1d7, []int{17} } func (m *IngressStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_IngressStatus proto.InternalMessageInfo func (m *IngressTLS) Reset() { *m = IngressTLS{} } func (*IngressTLS) ProtoMessage() {} func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{18} + return fileDescriptor_2c41434372fec1d7, []int{18} } func (m *IngressTLS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +583,7 @@ var xxx_messageInfo_IngressTLS proto.InternalMessageInfo func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } func (*NetworkPolicy) ProtoMessage() {} func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{19} + return fileDescriptor_2c41434372fec1d7, []int{19} } func (m *NetworkPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +611,7 @@ var xxx_messageInfo_NetworkPolicy proto.InternalMessageInfo func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } func (*NetworkPolicyEgressRule) ProtoMessage() {} func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{20} + return fileDescriptor_2c41434372fec1d7, []int{20} } func (m *NetworkPolicyEgressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +639,7 @@ var xxx_messageInfo_NetworkPolicyEgressRule proto.InternalMessageInfo func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } func (*NetworkPolicyIngressRule) ProtoMessage() {} func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{21} + return fileDescriptor_2c41434372fec1d7, []int{21} } func (m *NetworkPolicyIngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -667,7 +667,7 @@ var xxx_messageInfo_NetworkPolicyIngressRule proto.InternalMessageInfo func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } func (*NetworkPolicyList) ProtoMessage() {} func (*NetworkPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{22} + return fileDescriptor_2c41434372fec1d7, []int{22} } func (m *NetworkPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -695,7 +695,7 @@ var xxx_messageInfo_NetworkPolicyList proto.InternalMessageInfo func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } func (*NetworkPolicyPeer) ProtoMessage() {} func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{23} + return fileDescriptor_2c41434372fec1d7, []int{23} } func (m *NetworkPolicyPeer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -723,7 +723,7 @@ var xxx_messageInfo_NetworkPolicyPeer proto.InternalMessageInfo func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } func (*NetworkPolicyPort) ProtoMessage() {} func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{24} + return fileDescriptor_2c41434372fec1d7, []int{24} } func (m *NetworkPolicyPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -751,7 +751,7 @@ var xxx_messageInfo_NetworkPolicyPort proto.InternalMessageInfo func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } func (*NetworkPolicySpec) ProtoMessage() {} func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{25} + return fileDescriptor_2c41434372fec1d7, []int{25} } func (m *NetworkPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -779,7 +779,7 @@ var xxx_messageInfo_NetworkPolicySpec proto.InternalMessageInfo func (m *ServiceBackendPort) Reset() { *m = ServiceBackendPort{} } func (*ServiceBackendPort) ProtoMessage() {} func (*ServiceBackendPort) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{26} + return fileDescriptor_2c41434372fec1d7, []int{26} } func (m *ServiceBackendPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -835,116 +835,115 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/networking/v1/generated.proto", fileDescriptor_1c72867a70a7cc90) -} - -var fileDescriptor_1c72867a70a7cc90 = []byte{ - // 1671 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x6f, 0x1b, 0xd5, - 0x1a, 0xcf, 0x38, 0x71, 0xec, 0x1c, 0x27, 0x69, 0x72, 0x6e, 0xab, 0xeb, 0x9b, 0xab, 0x6b, 0xe7, - 0x8e, 0x68, 0x1b, 0x68, 0x6b, 0xd3, 0xb4, 0x42, 0xb0, 0x01, 0x3a, 0x69, 0x9a, 0x86, 0xa6, 0x8e, - 0x75, 0x6c, 0x15, 0x81, 0x78, 0x74, 0x32, 0x3e, 0xb1, 0xa7, 0x1e, 0xcf, 0x19, 0x9d, 0x39, 0x0e, - 0xad, 0x84, 0x10, 0x1b, 0x16, 0xec, 0xf8, 0x17, 0x10, 0x7f, 0x01, 0x82, 0x05, 0x12, 0x82, 0xc2, - 0x06, 0x75, 0x59, 0x89, 0x4d, 0x37, 0x58, 0xd4, 0xfc, 0x17, 0x59, 0xa1, 0xf3, 0x98, 0x97, 0x1f, - 0xb5, 0xa9, 0xaa, 0xac, 0x92, 0xf3, 0x7d, 0xdf, 0xf9, 0x7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0xce, 0x09, 0x7e, 0x5b, 0xb8, 0xb0, - 0xa2, 0x54, 0x65, 0x03, 0x4a, 0xcc, 0x81, 0x5b, 0x20, 0x6d, 0x33, 0xdc, 0xf1, 0x45, 0x89, 0xe4, - 0x36, 0xcf, 0x4d, 0xe7, 0x41, 0x54, 0x9d, 0xbb, 0xfc, 0x32, 0x92, 0x18, 0xfa, 0x1f, 0x1a, 0x28, - 0xc6, 0xc5, 0xaa, 0x26, 0x35, 0x3b, 0x98, 0x61, 0xea, 0x87, 0x8f, 0x07, 0x37, 0x40, 0xd6, 0xac, - 0xee, 0xee, 0x50, 0xd2, 0xf5, 0x82, 0xd2, 0xe5, 0xa6, 0x5d, 0x53, 0x34, 0x14, 0x72, 0x79, 0x81, - 0xb7, 0x6d, 0xd5, 0xa5, 0x62, 0x05, 0x7e, 0xcb, 0x76, 0x1b, 0x48, 0x70, 0xb8, 0x84, 0x6b, 0x76, - 0x82, 0xe6, 0x17, 0x4a, 0x54, 0xcc, 0x0e, 0x46, 0x82, 0x03, 0x8b, 0x20, 0xed, 0x5b, 0xc4, 0x93, - 0x19, 0xbc, 0x60, 0x2c, 0x70, 0x93, 0x6b, 0x9c, 0x80, 0x24, 0x1d, 0x5e, 0x00, 0x0b, 0x5c, 0xd0, - 0xf7, 0x4c, 0x0b, 0xe7, 0xd3, 0x42, 0x68, 0xa9, 0xdf, 0x2b, 0x2e, 0x54, 0x02, 0x22, 0x8a, 0xf8, - 0xfa, 0xb7, 0x03, 0xef, 0xc3, 0x9f, 0x0e, 0x6e, 0x02, 0x60, 0x11, 0x97, 0x51, 0xe2, 0x38, 0x38, - 0xe8, 0x46, 0x61, 0xd2, 0x6c, 0x85, 0x1c, 0x14, 0x93, 0x82, 0x36, 0x00, 0x5e, 0x18, 0x1b, 0x95, - 0x3c, 0x6f, 0x4c, 0x17, 0xfa, 0x11, 0x31, 0x35, 0x96, 0xb9, 0xaa, 0x18, 0x23, 0x06, 0xae, 0x7f, - 0xa7, 0x81, 0x9c, 0xba, 0x7f, 0x02, 0xe9, 0x74, 0x23, 0x99, 0x4e, 0xff, 0x9f, 0x3c, 0x5a, 0x46, - 0x67, 0xd2, 0x0f, 0x1a, 0x58, 0x0b, 0xac, 0x26, 0x66, 0xc3, 0x30, 0x1d, 0xd3, 0xb5, 0x30, 0x0d, - 0x3a, 0xf5, 0x1a, 0x48, 0xd9, 0x41, 0xfa, 0x00, 0x05, 0x90, 0xda, 0xad, 0xa2, 0x94, 0xed, 0xc1, - 0x8b, 0x20, 0xdb, 0x22, 0x3e, 0x13, 0x89, 0x21, 0x53, 0x27, 0x34, 0xf8, 0xa6, 0xa2, 0xa3, 0x50, - 0x02, 0x56, 0x41, 0xda, 0x23, 0x94, 0xf9, 0xf9, 0x39, 0x61, 0xf0, 0x85, 0x89, 0x06, 0x57, 0x09, - 0x65, 0xaa, 0x97, 0x46, 0x23, 0x8a, 0x23, 0x20, 0x09, 0xa4, 0x7f, 0x0a, 0xfe, 0x33, 0xc2, 0x72, - 0x79, 0x05, 0x7e, 0x0c, 0x32, 0xb6, 0x64, 0xaa, 0x89, 0x78, 0x75, 0xa2, 0xc2, 0x11, 0xfe, 0x47, - 0x83, 0x38, 0x18, 0xb8, 0x01, 0xaa, 0xfe, 0x8d, 0x06, 0x56, 0x87, 0x2c, 0x15, 0xbb, 0x04, 0xa1, - 0x4c, 0x44, 0x2c, 0x1d, 0xdb, 0x25, 0x08, 0x65, 0x48, 0x70, 0xe0, 0x2d, 0x90, 0x15, 0xab, 0x88, - 0x45, 0x1c, 0x15, 0xb5, 0x72, 0x10, 0xb5, 0xaa, 0xa2, 0x1f, 0xf7, 0x8a, 0xff, 0x1d, 0xde, 0xcf, - 0x4a, 0x01, 0x1b, 0x85, 0x00, 0xbc, 0xea, 0x30, 0xa5, 0x84, 0xaa, 0xc2, 0x14, 0x55, 0xb7, 0xcd, - 0x09, 0x48, 0xd2, 0xf5, 0xaf, 0xa3, 0xa4, 0xe4, 0xbb, 0x02, 0xb7, 0x8f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78, 0x94, - 0xb8, 0x2c, 0xff, 0xe0, 0x97, 0x7b, 0xf8, 0x82, 0xf1, 0x3f, 0xe9, 0x6c, 0x48, 0x3e, 0xe6, 0x1f, - 0x38, 0xe1, 0x11, 0xc5, 0x6f, 0xe8, 0x1f, 0x01, 0x38, 0xbc, 0xe4, 0x4c, 0xb1, 0x42, 0x9d, 0x03, - 0xf3, 0x6e, 0xb7, 0x73, 0x80, 0x65, 0x0d, 0xa5, 0x23, 0x03, 0x2b, 0x82, 0x8a, 0x14, 0xd7, 0x78, - 0xf3, 0xd1, 0xd3, 0xc2, 0xcc, 0xe3, 0xa7, 0x85, 0x99, 0x27, 0x4f, 0x0b, 0x33, 0x9f, 0xf7, 0x0b, - 0xda, 0xa3, 0x7e, 0x41, 0x7b, 0xdc, 0x2f, 0x68, 0x4f, 0xfa, 0x05, 0xed, 0xcf, 0x7e, 0x41, 0xfb, - 0xea, 0xaf, 0xc2, 0xcc, 0xfb, 0xf9, 0x71, 0xbf, 0x96, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xd4, - 0x46, 0x40, 0xf2, 0x61, 0x15, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/networking/v1/generated.proto", fileDescriptor_2c41434372fec1d7) +} + +var fileDescriptor_2c41434372fec1d7 = []byte{ + // 1652 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x6f, 0x1b, 0x55, + 0x14, 0xce, 0x38, 0x71, 0xec, 0x1c, 0x27, 0x69, 0x72, 0x69, 0x85, 0x09, 0xc2, 0x0e, 0x23, 0xda, + 0x06, 0xda, 0xda, 0x34, 0xad, 0x10, 0x6c, 0x78, 0x4c, 0x9a, 0xa6, 0xa1, 0xa9, 0x63, 0x5d, 0x5b, + 0x45, 0x20, 0x1e, 0x9d, 0x8c, 0x6f, 0x9c, 0x69, 0xc6, 0x33, 0xa3, 0x3b,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0x33, 0x7d, 0x7d, 0xc2, 0x4c, + 0x4f, 0x4e, 0xb4, 0x91, 0x6b, 0x25, 0xfa, 0x10, 0x66, 0x89, 0x44, 0x97, 0x23, 0xf2, 0xe2, 0x84, + 0xe8, 0x71, 0x5b, 0x8d, 0x7f, 0x79, 0x50, 0x34, 0x05, 0x88, 0xde, 0xe1, 0x51, 0xe2, 0xb2, 0xfc, + 0x83, 0x5f, 0xee, 0xe1, 0x73, 0xc6, 0x4b, 0xd2, 0xd9, 0x88, 0x7c, 0xc4, 0x3f, 0x70, 0xa2, 0x23, + 0x4e, 0xde, 0xd0, 0x3f, 0x05, 0x34, 0xb8, 0xe4, 0x4c, 0xb0, 0x42, 0x9d, 0x81, 0x59, 0xb7, 0xdd, + 0xda, 0x23, 0xb2, 0x86, 0xd2, 0xb1, 0x81, 0x15, 0x41, 0xc5, 0x8a, 0x6b, 0xbc, 0xfd, 0xe0, 0x71, + 0x61, 0xea, 0xe1, 0xe3, 0xc2, 0xd4, 0xa3, 0xc7, 0x85, 0xa9, 0xaf, 0xba, 0x05, 0xed, 0x41, 0xb7, + 0xa0, 0x3d, 0xec, 0x16, 0xb4, 0x47, 0xdd, 0x82, 0xf6, 0x4f, 0xb7, 0xa0, 0x7d, 0xfb, 0x6f, 0x61, + 0xea, 0xa3, 0xfc, 0xa8, 0x5f, 0x4b, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x24, 0x03, 0xec, 0x04, + 0x48, 0x15, 0x00, 0x00, } func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/networking/v1/generated.proto b/vendor/k8s.io/api/networking/v1/generated.proto index b50dd491e0f..22a9085a54a 100644 --- a/vendor/k8s.io/api/networking/v1/generated.proto +++ b/vendor/k8s.io/api/networking/v1/generated.proto @@ -84,6 +84,7 @@ message IPBlock { // Valid examples are "192.168.1.0/24" or "2001:db8::/64" // Except values will be rejected if they are outside the cidr range // +optional + // +listType=atomic repeated string except = 2; } @@ -225,6 +226,7 @@ message IngressLoadBalancerIngress { message IngressLoadBalancerStatus { // ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic repeated IngressLoadBalancerIngress ingress = 1; } @@ -396,6 +398,7 @@ message NetworkPolicyEgressRule { // 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 + // +listType=atomic repeated NetworkPolicyPort ports = 1; // to is a list of destinations for outgoing traffic of pods selected for this rule. @@ -404,6 +407,7 @@ message NetworkPolicyEgressRule { // 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 + // +listType=atomic repeated NetworkPolicyPeer to = 2; } @@ -416,6 +420,7 @@ message NetworkPolicyIngressRule { // 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 + // +listType=atomic repeated NetworkPolicyPort ports = 1; // from is a list of sources which should be able to access the pods selected for this rule. @@ -424,6 +429,7 @@ message NetworkPolicyIngressRule { // source). 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 from list. // +optional + // +listType=atomic repeated NetworkPolicyPeer from = 2; } @@ -505,6 +511,7 @@ message NetworkPolicySpec { // 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 + // +listType=atomic repeated NetworkPolicyIngressRule ingress = 2; // egress is a list of egress rules to be applied to the selected pods. Outgoing traffic @@ -515,6 +522,7 @@ message NetworkPolicySpec { // solely to ensure that the pods it selects are isolated by default). // This field is beta-level in 1.8 // +optional + // +listType=atomic repeated NetworkPolicyEgressRule egress = 3; // policyTypes is a list of rule types that the NetworkPolicy relates to. @@ -528,6 +536,7 @@ message NetworkPolicySpec { // an egress section and would otherwise default to just [ "Ingress" ]). // This field is beta-level in 1.8 // +optional + // +listType=atomic repeated string policyTypes = 4; } diff --git a/vendor/k8s.io/api/networking/v1/types.go b/vendor/k8s.io/api/networking/v1/types.go index a17e2cb5b39..8ee62918b0a 100644 --- a/vendor/k8s.io/api/networking/v1/types.go +++ b/vendor/k8s.io/api/networking/v1/types.go @@ -74,6 +74,7 @@ type NetworkPolicySpec struct { // 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 + // +listType=atomic Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"` // egress is a list of egress rules to be applied to the selected pods. Outgoing traffic @@ -84,6 +85,7 @@ type NetworkPolicySpec struct { // solely to ensure that the pods it selects are isolated by default). // This field is beta-level in 1.8 // +optional + // +listType=atomic Egress []NetworkPolicyEgressRule `json:"egress,omitempty" protobuf:"bytes,3,rep,name=egress"` // policyTypes is a list of rule types that the NetworkPolicy relates to. @@ -97,6 +99,7 @@ type NetworkPolicySpec struct { // an egress section and would otherwise default to just [ "Ingress" ]). // This field is beta-level in 1.8 // +optional + // +listType=atomic PolicyTypes []PolicyType `json:"policyTypes,omitempty" protobuf:"bytes,4,rep,name=policyTypes,casttype=PolicyType"` } @@ -109,6 +112,7 @@ type NetworkPolicyIngressRule struct { // 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 + // +listType=atomic Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"` // from is a list of sources which should be able to access the pods selected for this rule. @@ -117,6 +121,7 @@ type NetworkPolicyIngressRule struct { // source). 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 from list. // +optional + // +listType=atomic From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"` } @@ -130,6 +135,7 @@ type NetworkPolicyEgressRule struct { // 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 + // +listType=atomic Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"` // to is a list of destinations for outgoing traffic of pods selected for this rule. @@ -138,6 +144,7 @@ type NetworkPolicyEgressRule struct { // 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 + // +listType=atomic To []NetworkPolicyPeer `json:"to,omitempty" protobuf:"bytes,2,rep,name=to"` } @@ -175,6 +182,7 @@ type IPBlock struct { // Valid examples are "192.168.1.0/24" or "2001:db8::/64" // Except values will be rejected if they are outside the cidr range // +optional + // +listType=atomic Except []string `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"` } @@ -329,6 +337,7 @@ type IngressStatus struct { type IngressLoadBalancerStatus struct { // ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic Ingress []IngressLoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` } diff --git a/vendor/k8s.io/api/networking/v1alpha1/generated.pb.go b/vendor/k8s.io/api/networking/v1alpha1/generated.pb.go index 949ea513fe5..0d42034837f 100644 --- a/vendor/k8s.io/api/networking/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/networking/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/networking/v1alpha1/generated.proto +// source: k8s.io/api/networking/v1alpha1/generated.proto package v1alpha1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *IPAddress) Reset() { *m = IPAddress{} } func (*IPAddress) ProtoMessage() {} func (*IPAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{0} + return fileDescriptor_c1cb39e7b48ce50d, []int{0} } func (m *IPAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_IPAddress proto.InternalMessageInfo func (m *IPAddressList) Reset() { *m = IPAddressList{} } func (*IPAddressList) ProtoMessage() {} func (*IPAddressList) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{1} + return fileDescriptor_c1cb39e7b48ce50d, []int{1} } func (m *IPAddressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_IPAddressList proto.InternalMessageInfo func (m *IPAddressSpec) Reset() { *m = IPAddressSpec{} } func (*IPAddressSpec) ProtoMessage() {} func (*IPAddressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{2} + return fileDescriptor_c1cb39e7b48ce50d, []int{2} } func (m *IPAddressSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_IPAddressSpec proto.InternalMessageInfo func (m *ParentReference) Reset() { *m = ParentReference{} } func (*ParentReference) ProtoMessage() {} func (*ParentReference) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{3} + return fileDescriptor_c1cb39e7b48ce50d, []int{3} } func (m *ParentReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_ParentReference proto.InternalMessageInfo func (m *ServiceCIDR) Reset() { *m = ServiceCIDR{} } func (*ServiceCIDR) ProtoMessage() {} func (*ServiceCIDR) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{4} + return fileDescriptor_c1cb39e7b48ce50d, []int{4} } func (m *ServiceCIDR) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ServiceCIDR proto.InternalMessageInfo func (m *ServiceCIDRList) Reset() { *m = ServiceCIDRList{} } func (*ServiceCIDRList) ProtoMessage() {} func (*ServiceCIDRList) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{5} + return fileDescriptor_c1cb39e7b48ce50d, []int{5} } func (m *ServiceCIDRList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_ServiceCIDRList proto.InternalMessageInfo func (m *ServiceCIDRSpec) Reset() { *m = ServiceCIDRSpec{} } func (*ServiceCIDRSpec) ProtoMessage() {} func (*ServiceCIDRSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{6} + return fileDescriptor_c1cb39e7b48ce50d, []int{6} } func (m *ServiceCIDRSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_ServiceCIDRSpec proto.InternalMessageInfo func (m *ServiceCIDRStatus) Reset() { *m = ServiceCIDRStatus{} } func (*ServiceCIDRStatus) ProtoMessage() {} func (*ServiceCIDRStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c1b7ac8d7d97acec, []int{7} + return fileDescriptor_c1cb39e7b48ce50d, []int{7} } func (m *ServiceCIDRStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -280,52 +280,51 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/networking/v1alpha1/generated.proto", fileDescriptor_c1b7ac8d7d97acec) -} - -var fileDescriptor_c1b7ac8d7d97acec = []byte{ - // 648 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0x8d, 0xdb, 0xa4, 0xaa, 0x27, 0x5f, 0xbf, 0x52, 0xaf, 0xa2, 0x2e, 0x9c, 0x28, 0x6c, 0x8a, - 0xa0, 0x33, 0x24, 0x42, 0x88, 0x2d, 0x6e, 0xa5, 0xaa, 0x12, 0xb4, 0x65, 0xba, 0x02, 0x75, 0xc1, - 0xc4, 0xbe, 0x75, 0x4c, 0xf0, 0x8f, 0x66, 0xc6, 0x01, 0x76, 0x3c, 0x02, 0x2f, 0xc0, 0x73, 0xb0, - 0x02, 0x89, 0x5d, 0x97, 0x5d, 0x76, 0x55, 0x51, 0xf3, 0x22, 0x68, 0xc6, 0x8e, 0x9d, 0x34, 0xea, - 0xdf, 0xa6, 0x3b, 0xc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75, 0x72, 0xde, 0xae, 0x65, - 0xe7, 0x6d, 0x54, 0x61, 0xb4, 0x74, 0xb5, 0xf6, 0x51, 0x5d, 0x24, 0xe0, 0xb6, 0x16, 0xb4, 0xfb, - 0x26, 0xbe, 0x7e, 0xd8, 0xb8, 0x6c, 0xed, 0x30, 0x01, 0xd7, 0xf9, 0xaf, 0xb0, 0xae, 0xab, 0x15, - 0xd5, 0x46, 0xdd, 0x9f, 0x06, 0x5a, 0x29, 0x59, 0xaf, 0x02, 0x21, 0xad, 0xa3, 0xb9, 0x10, 0xf8, - 0x76, 0x21, 0x94, 0x5a, 0x47, 0x78, 0x50, 0xec, 0xb3, 0x3c, 0x41, 0xa6, 0x02, 0xec, 0xa1, 0x46, - 0x20, 0x21, 0x14, 0xad, 0x85, 0xce, 0xe2, 0x46, 0xb3, 0xff, 0xe8, 0xd6, 0x09, 0x9c, 0x95, 0xc2, - 0xb5, 0xb1, 0xab, 0xf4, 0x34, 0xb7, 0xe9, 0x86, 0x53, 0xed, 0xab, 0x58, 0xd6, 0x11, 0x32, 0x13, - 0xc6, 0x21, 0x92, 0x14, 0x8e, 0x8b, 0xfe, 0xc9, 0x4d, 0x9b, 0x1c, 0x4c, 0x04, 0xc0, 0x21, 0x72, - 0xc1, 0x59, 0xc9, 0xce, 0xdb, 0x66, 0x09, 0xd2, 0xca, 0xb0, 0xfb, 0xc3, 0x40, 0xab, 0x97, 0xd8, - 0xd6, 0x43, 0xd4, 0xf0, 0x79, 0x9c, 0x26, 0x7a, 0x37, 0xb3, 0xea, 0x73, 0x47, 0x81, 0x34, 0xaf, - 0x59, 0x4f, 0xd0, 0x32, 0x07, 0x11, 0xa7, 0xdc, 0x05, 0x7d, 0x78, 0x66, 0x35, 0x25, 0x5a, 0xe0, - 0xb4, 0x64, 0x58, 0x04, 0x99, 0x11, 0x0b, 0x41, 0x24, 0xcc, 0x85, 0xd6, 0xa2, 0xa6, 0xaf, 0x15, - 0x74, 0x73, 0x6f, 0x52, 0xa0,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0xff, 0xcf, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x29, 0x82, 0x11, 0x57, 0xb9, 0x06, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/networking/v1alpha1/generated.proto", fileDescriptor_c1cb39e7b48ce50d) +} + +var fileDescriptor_c1cb39e7b48ce50d = []byte{ + // 634 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x4a, + 0x18, 0x8d, 0xdb, 0xa4, 0xaa, 0x27, 0xb7, 0xb7, 0xb7, 0x5e, 0x45, 0x5d, 0x38, 0x91, 0xef, 0xa6, + 0x08, 0x3a, 0x26, 0x11, 0x42, 0x6c, 0x71, 0x2b, 0xa1, 0x4a, 0xd0, 0x96, 0xe9, 0x0a, 0xd4, 0x05, + 0xd3, 0xc9, 0x57, 0x67, 0x08, 0xfe, 0xd1, 0xcc, 0x24, 0xc0, 0x8e, 0x47, 0xe0, 0x05, 0x78, 0x0e, + 0x56, 0x20, 0xb1, 0xeb, 0xb2, 0xcb, 0xae, 0x2a, 0x6a, 0x5e, 0x04, 0xcd, 0xd8, 0xb1, 0x93, 0x46, + 0xfd, 0xdb, 0x74, 0xe7, 0xef, 0xcc, 0x39, 0x67, 0xbe, 0xf3, 0xcd, 0x8c, 0x8c, 0xf0, 0xf0, 0x99, + 0xc4, 0x3c, 0xf1, 0x69, 0xca, 0xfd, 0x18, 0xd4, 0xc7, 0x44, 0x0c, 0x79, 0x1c, 0xfa, 0xe3, 0x2e, + 0xfd, 0x90, 0x0e, 0x68, 0xd7, 0x0f, 0x21, 0x06, 0x41, 0x15, 0xf4, 0x71, 0x2a, 0x12, 0x95, 0x38, + 0x6e, 0xce, 0xc7, 0x34, 0xe5, 0xb8, 0xe2, 0xe3, 0x09, 0x7f, 0x7d, 0x33, 0xe4, 0x6a, 0x30, 0x3a, + 0xc2, 0x2c, 0x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, 0x56, + 0xa7, 0xd8, 0xf7, 0xf0, 0x14, 0xf6, 0x67, 0x9f, 0xc2, 0xc3, 0x3b, 0x64, 0xb9, 0xe2, 0x31, 0xf4, + 0x66, 0x22, 0x98, 0xe7, 0xd0, 0x46, 0x0d, 0xc6, 0xfb, 0x42, 0xb6, 0xac, 0xce, 0xe2, 0x86, 0x1d, + 0xd8, 0x5a, 0xa3, 0x17, 0x25, 0xc9, 0x71, 0xef, 0x13, 0x5a, 0x9b, 0x1b, 0x92, 0xc3, 0x10, 0x62, + 0x49, 0xdc, 0xe7, 0x8a, 0x27, 0x71, 0x2e, 0x9d, 0x3d, 0xc0, 0x6b, 0xa2, 0x6f, 0x4d, 0x74, 0xd5, + 0xed, 0x28, 0x21, 0x49, 0xa6, 0x6c, 0x83, 0xed, 0x93, 0x0b, 0xb7, 0x76, 0x7a, 0xe1, 0xd6, 0xce, + 0x2e, 0xdc, 0xda, 0x97, 0xcc, 0xb5, 0x4e, 0x32, 0xd7, 0x3a, 0xcd, 0x5c, 0xeb, 0x2c, 0x73, 0xad, + 0xdf, 0x99, 0x6b, 0x7d, 0xfd, 0xe3, 0xd6, 0xde, 0xba, 0xd7, 0xff, 0x7f, 0xfe, 0x06, 0x00, 0x00, + 0xff, 0xff, 0xb1, 0xd0, 0x33, 0x02, 0xa0, 0x06, 0x00, 0x00, } func (m *IPAddress) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/networking/v1alpha1/generated.proto b/vendor/k8s.io/api/networking/v1alpha1/generated.proto index fb7971745d4..8914fffcf87 100644 --- a/vendor/k8s.io/api/networking/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/networking/v1alpha1/generated.proto @@ -121,6 +121,7 @@ message ServiceCIDRSpec { // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. // This field is immutable. // +optional + // +listType=atomic repeated string cidrs = 1; } diff --git a/vendor/k8s.io/api/networking/v1alpha1/types.go b/vendor/k8s.io/api/networking/v1alpha1/types.go index 9d56ca193e6..bcdc33b4599 100644 --- a/vendor/k8s.io/api/networking/v1alpha1/types.go +++ b/vendor/k8s.io/api/networking/v1alpha1/types.go @@ -111,6 +111,7 @@ type ServiceCIDRSpec struct { // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. // This field is immutable. // +optional + // +listType=atomic CIDRs []string `json:"cidrs,omitempty" protobuf:"bytes,1,opt,name=cidrs"` } diff --git a/vendor/k8s.io/api/networking/v1beta1/generated.pb.go b/vendor/k8s.io/api/networking/v1beta1/generated.pb.go index 6f298cd7811..13d4f53855c 100644 --- a/vendor/k8s.io/api/networking/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/networking/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/networking/v1beta1/generated.proto +// source: k8s.io/api/networking/v1beta1/generated.proto package v1beta1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } func (*HTTPIngressPath) ProtoMessage() {} func (*HTTPIngressPath) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{0} + return fileDescriptor_9497719c79c89d2d, []int{0} } func (m *HTTPIngressPath) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_HTTPIngressPath proto.InternalMessageInfo func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } func (*HTTPIngressRuleValue) ProtoMessage() {} func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{1} + return fileDescriptor_9497719c79c89d2d, []int{1} } func (m *HTTPIngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -104,7 +104,7 @@ var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo func (m *Ingress) Reset() { *m = Ingress{} } func (*Ingress) ProtoMessage() {} func (*Ingress) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{2} + return fileDescriptor_9497719c79c89d2d, []int{2} } func (m *Ingress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +132,7 @@ var xxx_messageInfo_Ingress proto.InternalMessageInfo func (m *IngressBackend) Reset() { *m = IngressBackend{} } func (*IngressBackend) ProtoMessage() {} func (*IngressBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{3} + return fileDescriptor_9497719c79c89d2d, []int{3} } func (m *IngressBackend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -160,7 +160,7 @@ var xxx_messageInfo_IngressBackend proto.InternalMessageInfo func (m *IngressClass) Reset() { *m = IngressClass{} } func (*IngressClass) ProtoMessage() {} func (*IngressClass) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{4} + return fileDescriptor_9497719c79c89d2d, []int{4} } func (m *IngressClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -188,7 +188,7 @@ var xxx_messageInfo_IngressClass proto.InternalMessageInfo func (m *IngressClassList) Reset() { *m = IngressClassList{} } func (*IngressClassList) ProtoMessage() {} func (*IngressClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{5} + return fileDescriptor_9497719c79c89d2d, []int{5} } func (m *IngressClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -216,7 +216,7 @@ var xxx_messageInfo_IngressClassList proto.InternalMessageInfo func (m *IngressClassParametersReference) Reset() { *m = IngressClassParametersReference{} } func (*IngressClassParametersReference) ProtoMessage() {} func (*IngressClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{6} + return fileDescriptor_9497719c79c89d2d, []int{6} } func (m *IngressClassParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -244,7 +244,7 @@ var xxx_messageInfo_IngressClassParametersReference proto.InternalMessageInfo func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } func (*IngressClassSpec) ProtoMessage() {} func (*IngressClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{7} + return fileDescriptor_9497719c79c89d2d, []int{7} } func (m *IngressClassSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,7 +272,7 @@ var xxx_messageInfo_IngressClassSpec proto.InternalMessageInfo func (m *IngressList) Reset() { *m = IngressList{} } func (*IngressList) ProtoMessage() {} func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{8} + return fileDescriptor_9497719c79c89d2d, []int{8} } func (m *IngressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -300,7 +300,7 @@ var xxx_messageInfo_IngressList proto.InternalMessageInfo func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } func (*IngressLoadBalancerIngress) ProtoMessage() {} func (*IngressLoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{9} + return fileDescriptor_9497719c79c89d2d, []int{9} } func (m *IngressLoadBalancerIngress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -328,7 +328,7 @@ var xxx_messageInfo_IngressLoadBalancerIngress proto.InternalMessageInfo func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } func (*IngressLoadBalancerStatus) ProtoMessage() {} func (*IngressLoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{10} + return fileDescriptor_9497719c79c89d2d, []int{10} } func (m *IngressLoadBalancerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -356,7 +356,7 @@ var xxx_messageInfo_IngressLoadBalancerStatus proto.InternalMessageInfo func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } func (*IngressPortStatus) ProtoMessage() {} func (*IngressPortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{11} + return fileDescriptor_9497719c79c89d2d, []int{11} } func (m *IngressPortStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,7 +384,7 @@ var xxx_messageInfo_IngressPortStatus proto.InternalMessageInfo func (m *IngressRule) Reset() { *m = IngressRule{} } func (*IngressRule) ProtoMessage() {} func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{12} + return fileDescriptor_9497719c79c89d2d, []int{12} } func (m *IngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -412,7 +412,7 @@ var xxx_messageInfo_IngressRule proto.InternalMessageInfo func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } func (*IngressRuleValue) ProtoMessage() {} func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{13} + return fileDescriptor_9497719c79c89d2d, []int{13} } func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -440,7 +440,7 @@ var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo func (m *IngressSpec) Reset() { *m = IngressSpec{} } func (*IngressSpec) ProtoMessage() {} func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{14} + return fileDescriptor_9497719c79c89d2d, []int{14} } func (m *IngressSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -468,7 +468,7 @@ var xxx_messageInfo_IngressSpec proto.InternalMessageInfo func (m *IngressStatus) Reset() { *m = IngressStatus{} } func (*IngressStatus) ProtoMessage() {} func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{15} + return fileDescriptor_9497719c79c89d2d, []int{15} } func (m *IngressStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -496,7 +496,7 @@ var xxx_messageInfo_IngressStatus proto.InternalMessageInfo func (m *IngressTLS) Reset() { *m = IngressTLS{} } func (*IngressTLS) ProtoMessage() {} func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_5bea11de0ceb8f53, []int{16} + return fileDescriptor_9497719c79c89d2d, []int{16} } func (m *IngressTLS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -542,89 +542,89 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/networking/v1beta1/generated.proto", fileDescriptor_5bea11de0ceb8f53) -} - -var fileDescriptor_5bea11de0ceb8f53 = []byte{ - // 1247 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcb, 0x6f, 0x1b, 0x45, - 0x18, 0xcf, 0xda, 0x71, 0xe3, 0x8c, 0xd3, 0x36, 0x0c, 0x3d, 0x98, 0xa0, 0xda, 0xd1, 0x1e, 0x50, - 0xa0, 0xed, 0x6e, 0x93, 0x16, 0x54, 0x2e, 0x08, 0x36, 0x02, 0x12, 0x25, 0x24, 0x66, 0x6c, 0x1e, - 0x42, 0x1c, 0x18, 0xaf, 0xa7, 0xf6, 0xe2, 0xf5, 0xee, 0x6a, 0x66, 0x36, 0xa8, 0x37, 0x10, 0x27, - 0x4e, 0xf0, 0x3f, 0x20, 0xf1, 0x27, 0x20, 0x2e, 0x48, 0x08, 0x2e, 0x39, 0xf6, 0xd8, 0x0b, 0x11, - 0x31, 0xff, 0x45, 0x4f, 0xe8, 0x9b, 0x9d, 0x7d, 0xf8, 0x91, 0xd6, 0xe1, 0xd0, 0x53, 0xbc, 0xdf, - 0xe3, 0xf7, 0xbd, 0xbf, 0xf9, 0x82, 0x3e, 0x18, 0x3e, 0x10, 0x96, 0x17, 0xda, 0xc3, 0xb8, 0xcb, - 0x78, 0xc0, 0x24, 0x13, 0xf6, 0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x1a, 0xf1, 0x4a, 0xf2, 0x4d, 0x34, 0x96, 0xf9, 0x43, 0x09, 0x5d, 0x9b, 0xac, 0x15, 0x7e, 0x13, - 0xd5, 0x04, 0xe3, 0x27, 0x9e, 0xcb, 0x8e, 0xe8, 0x88, 0xe9, 0x56, 0x7a, 0x59, 0xeb, 0xd7, 0xda, - 0x39, 0x8b, 0x14, 0xe5, 0x70, 0x3f, 0x53, 0x6b, 0x85, 0x5c, 0xea, 0xa0, 0x2f, 0x4e, 0x29, 0x74, - 0xb6, 0x95, 0x74, 0xb6, 0xb5, 0x1f, 0xc8, 0x63, 0xde, 0x96, 0xdc, 0x0b, 0xfa, 0x33, 0x86, 0x00, - 0x8c, 0x14, 0x91, 0xf1, 0x67, 0xa8, 0xca, 0x99, 0x08, 0x63, 0xee, 0x32, 0x9d, 0x8a, 0x89, 0x66, - 0x84, 0x15, 0x00, 0x65, 0x82, 0xbe, 0xed, 0x1d, 0x86, 0x2e, 0xf5, 0x93, 0xe2, 0x10, 0xf6, 0x90, - 0x71, 0x16, 0xb8, 0xcc, 0x59, 0x83, 0x86, 0x27, 0x1a, 0x82, 0x64, 0x60, 0x30, 0x50, 0x6b, 0x3a, - 0x17, 0xbb, 0x3e, 0x7d, 0x21, 0x2d, 0xf2, 0xf1, 0x44, 0x8b, 0xd8, 0x8b, 0x95, 0x54, 0x39, 0x77, - 0x51, 0x9f, 0x98, 0x7f, 0x1a, 0x68, 0xbd, 0x28, 0x78, 0xe8, 0x09, 0x89, 0xbf, 0x9c, 0x89, 0xc4, - 0x5a, 0x2c, 0x12, 0xd0, 0x56, 0x71, 0xac, 0x6b, 0x53, 0xd5, 0x94, 0x52, 0x88, 0xa2, 0x85, 0x2a, - 0x9e, 0x64, 0x23, 0x51, 0x2f, 0xa9, 0x59, 0xbd, 0x75, 0x89, 0x30, 0xf2, 0x41, 0xdd, 0x07, 0x04, - 0x92, 0x00, 0x99, 0x7f, 0x1b, 0xa8, 0x59, 0x14, 0x6b, 0x51,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, 0xf1, 0xb8, 0x61, 0x3c, - 0x19, 0x37, 0x8c, 0x7f, 0xc6, 0x0d, 0xe3, 0xa7, 0x7f, 0x1b, 0x4b, 0x5f, 0xdc, 0x7c, 0xe6, 0x3f, - 0x7c, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x08, 0x04, 0x22, 0x31, 0x29, 0x0e, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/networking/v1beta1/generated.proto", fileDescriptor_9497719c79c89d2d) +} + +var fileDescriptor_9497719c79c89d2d = []byte{ + // 1234 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0x1b, 0xc5, + 0x1b, 0xcf, 0xda, 0x71, 0xe3, 0x8c, 0xd3, 0x34, 0xff, 0xf9, 0xe7, 0x60, 0x82, 0x6a, 0x47, 0x7b, + 0x40, 0x81, 0x36, 0xbb, 0x4d, 0x5a, 0x50, 0xb9, 0x20, 0xd8, 0x08, 0x91, 0x28, 0x21, 0x31, 0x63, + 0xf3, 0x22, 0xc4, 0x81, 0xc9, 0x7a, 0x6a, 0x2f, 0x5e, 0xef, 0xae, 0x66, 0x66, 0x83, 0x7a, 0x03, + 0x71, 0xe2, 0x04, 0xdf, 0x01, 0x89, 0x8f, 0x80, 0xb8, 0x20, 0x21, 0xb8, 0xe4, 0xd8, 0x63, 0x2f, + 0x44, 0xc4, 0x7c, 0x8b, 0x9e, 0xd0, 0x33, 0x3b, 0xfb, 0xe2, 0x97, 0xb4, 0x0e, 0x87, 0x9e, 0xe2, + 0x7d, 0x5e, 0x7e, 0xcf, 0xfb, 0x33, 0x4f, 0xd0, 0xf6, 0xe0, 0xa1, 0xb0, 0xbc, 0xd0, 0xa6, 0x91, + 0x67, 0x07, 0x4c, 0x7e, 0x1d, 0xf2, 0x81, 0x17, 0xf4, 0xec, 0xb3, 0x9d, 0x53, 0x26, 0xe9, 0x8e, +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00, 0x00, 0x00, 0xff, 0xff, 0xea, 0xf6, 0xe9, 0x27, 0x10, 0x0e, + 0x00, 0x00, } func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/networking/v1beta1/generated.proto b/vendor/k8s.io/api/networking/v1beta1/generated.proto index 46bb7f66f22..f36df9ec194 100644 --- a/vendor/k8s.io/api/networking/v1beta1/generated.proto +++ b/vendor/k8s.io/api/networking/v1beta1/generated.proto @@ -69,6 +69,7 @@ message HTTPIngressPath { // or '#'. message HTTPIngressRuleValue { // paths is a collection of paths that map requests to backends. + // +listType=atomic repeated HTTPIngressPath paths = 1; } @@ -211,6 +212,7 @@ message IngressLoadBalancerIngress { message IngressLoadBalancerStatus { // ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic repeated IngressLoadBalancerIngress ingress = 1; } @@ -313,11 +315,13 @@ message IngressSpec { // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. // +optional + // +listType=atomic repeated IngressTLS tls = 2; // rules is 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 + // +listType=atomic repeated IngressRule rules = 3; } @@ -335,6 +339,7 @@ message IngressTLS { // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. // +optional + // +listType=atomic repeated string hosts = 1; // secretName is the name of the secret used to terminate TLS traffic on diff --git a/vendor/k8s.io/api/networking/v1beta1/types.go b/vendor/k8s.io/api/networking/v1beta1/types.go index 87cc91654b8..34dfe76aa3e 100644 --- a/vendor/k8s.io/api/networking/v1beta1/types.go +++ b/vendor/k8s.io/api/networking/v1beta1/types.go @@ -97,11 +97,13 @@ type IngressSpec struct { // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. // +optional + // +listType=atomic TLS []IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"` // rules is 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 + // +listType=atomic Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // TODO: Add the ability to specify load-balancer IP through claims } @@ -113,6 +115,7 @@ type IngressTLS struct { // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. // +optional + // +listType=atomic Hosts []string `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"` // secretName is the name of the secret used to terminate TLS traffic on @@ -136,6 +139,7 @@ type IngressStatus struct { type IngressLoadBalancerStatus struct { // ingress is a list containing ingress points for the load-balancer. // +optional + // +listType=atomic Ingress []IngressLoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` } @@ -239,6 +243,7 @@ type IngressRuleValue struct { // or '#'. type HTTPIngressRuleValue struct { // paths is a collection of paths that map requests to backends. + // +listType=atomic 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. diff --git a/vendor/k8s.io/api/node/v1/generated.pb.go b/vendor/k8s.io/api/node/v1/generated.pb.go index 5355cbae7d1..4c304f55f9c 100644 --- a/vendor/k8s.io/api/node/v1/generated.pb.go +++ b/vendor/k8s.io/api/node/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/node/v1/generated.proto +// source: k8s.io/api/node/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Overhead) Reset() { *m = Overhead{} } func (*Overhead) ProtoMessage() {} func (*Overhead) Descriptor() ([]byte, []int) { - return fileDescriptor_6ac9be560e26ae98, []int{0} + return fileDescriptor_9007436710e7565b, []int{0} } func (m *Overhead) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_Overhead proto.InternalMessageInfo func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } func (*RuntimeClass) ProtoMessage() {} func (*RuntimeClass) Descriptor() ([]byte, []int) { - return fileDescriptor_6ac9be560e26ae98, []int{1} + return fileDescriptor_9007436710e7565b, []int{1} } func (m *RuntimeClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_RuntimeClass proto.InternalMessageInfo func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } func (*RuntimeClassList) ProtoMessage() {} func (*RuntimeClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_6ac9be560e26ae98, []int{2} + return fileDescriptor_9007436710e7565b, []int{2} } func (m *RuntimeClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_RuntimeClassList proto.InternalMessageInfo func (m *Scheduling) Reset() { *m = Scheduling{} } func (*Scheduling) ProtoMessage() {} func (*Scheduling) Descriptor() ([]byte, []int) { - return fileDescriptor_6ac9be560e26ae98, []int{3} + return fileDescriptor_9007436710e7565b, []int{3} } func (m *Scheduling) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,53 +170,52 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/node/v1/generated.proto", fileDescriptor_6ac9be560e26ae98) + proto.RegisterFile("k8s.io/api/node/v1/generated.proto", fileDescriptor_9007436710e7565b) } -var fileDescriptor_6ac9be560e26ae98 = []byte{ - // 660 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x6f, 0xd3, 0x4a, - 0x10, 0xce, 0xa6, 0xaf, 0x6a, 0xba, 0x49, 0xdf, 0xeb, 0x5b, 0x7a, 0x88, 0x22, 0xe4, 0x44, 0x39, - 0x15, 0xa4, 0xae, 0xdb, 0x0a, 0xa1, 0x0a, 0x0e, 0x48, 0x86, 0x56, 0x20, 0x41, 0x01, 0x17, 0x2e, - 0x88, 0x03, 0x1b, 0x7b, 0x70, 0xdc, 0xc4, 0xde, 0x68, 0xbd, 0x8e, 0xc8, 0x0d, 0x71, 0x41, 0xe2, - 0xd4, 0xff, 0xc2, 0x81, 0xbf, 0x50, 0x71, 0xea, 0xb1, 0xa7, 0x96, 0x86, 0x7f, 0xc1, 0x09, 0xed, - 0xda, 0x4e, 0x5c, 0x1c, 0x42, 0xb9, 0x79, 0x67, 0xbf, 0xef, 0x9b, 0x99, 0x6f, 0x76, 0x8c, 0xef, - 0xf6, 0x76, 0x22, 0xea, 0x73, 0xb3, 0x17, 0x77, 0x40, 0x84, 0x20, 0x21, 0x32, 0x87, 0x10, 0xba, - 0x5c, 0x98, 0xe9, 0x05, 0x1b, 0xf8, 0x66, 0xc8, 0x5d, 0x30, 0x87, 0x5b, 0xa6, 0x07, 0x21, 0x08, - 0x26, 0xc1, 0xa5, 0x03, 0xc1, 0x25, 0x27, 0x24, 0xc1, 0x50, 0x36, 0xf0, 0xa9, 0xc2, 0xd0, 0xe1, - 0x56, 0x63, 0xc3, 0xf3, 0x65, 0x37, 0xee, 0x50, 0x87, 0x07, 0xa6, 0xc7, 0x3d, 0x6e, 0x6a, 0x68, - 0x27, 0x7e, 0xab, 0x4f, 0xfa, 0xa0, 0xbf, 0x12, 0x89, 0x46, 0x3b, 0x97, 0xc6, 0xe1, 0x62, 0x56, - 0x9a, 0xc6, 0xad, 0x29, 0x26, 0x60, 0x4e, 0xd7, 0x0f, 0x41, 0x8c, 0xcc, 0x41, 0xcf, 0xd3, 0x24, - 0x01, 0x11, 0x8f, 0x85, 0x03, 0x7f, 0xc5, 0x8a, 0xcc, 0x00, 0x24, 0x9b, 0x95, 0xcb, 0xfc, 0x1d, - 0x4b, 0xc4, 0xa1, 0xf4, 0x83, 0x62, 0x9a, 0xdb, 0x7f, 0x22, 0x44, 0x4e, 0x17, 0x02, 0xf6, 0x2b, - 0xaf, 0xfd, 0xb5, 0x8c, 0x2b, 0x4f, 0x87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0x3d, 0xfc, 0x7f, 0xa1, 0x9e, 0x19, 0x2b, 0xb3, 0x96, 0x5f, 0x99, 0xe5, 0xdc, 0x0a, - 0x58, 0x3b, 0xc7, 0x17, 0x46, 0xe9, 0xe4, 0xc2, 0x28, 0x9d, 0x5e, 0x18, 0xa5, 0xf7, 0x63, 0x03, - 0x1d, 0x8f, 0x0d, 0x74, 0x32, 0x36, 0xd0, 0xe9, 0xd8, 0x40, 0xdf, 0xc6, 0x06, 0x3a, 0xfa, 0x6e, - 0x94, 0x5e, 0x91, 0xe2, 0x5f, 0xfd, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x46, 0x77, 0x65, 0x3b, - 0x03, 0x06, 0x00, 0x00, +var fileDescriptor_9007436710e7565b = []byte{ + // 643 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x6f, 0xd3, 0x4e, + 0x10, 0xcd, 0xa6, 0xbf, 0xaa, 0xe9, 0x26, 0xfd, 0x51, 0x96, 0x1e, 0xa2, 0x08, 0x39, 0x51, 0x4e, + 0x05, 0xa9, 0xeb, 0xb6, 0x42, 0xa8, 0xe2, 0x82, 0x64, 0x68, 0x05, 0x12, 0x14, 0x70, 0xe1, 0x82, + 0x38, 0xb0, 0xb5, 0x17, 0x67, 0x9b, 0xd8, 0x1b, 0xd9, 0xeb, 0x88, 0xdc, 0x10, 0x17, 0x24, 0x4e, + 0xfd, 0x2e, 0x1c, 0xf8, 0x0a, 0x15, 0xa7, 0x1e, 0x7b, 0x6a, 0xa9, 0xf9, 0x16, 0x9c, 0xd0, 0xae, + 0xff, 0x64, 0x83, 0x43, 0x28, 0x37, 0xef, 0xec, 0x7b, 0x6f, 0x66, 0xde, 0xec, 0x18, 0x76, 0xfb, + 0x3b, 0x11, 0x66, 0xdc, 0x24, 0x43, 0x66, 0x06, 0xdc, 0xa5, 0xe6, 0x68, 0xcb, 0xf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0x9c, 0xc3, 0x57, 0x73, 0x4e, 0xb2, 0x95, 0x6f, + 0xab, 0xf9, 0x63, 0xcc, 0x23, 0x9a, 0x6b, 0xbb, 0x70, 0x91, 0x09, 0xea, 0x47, 0xcd, 0xaa, 0x7a, + 0xe4, 0x9d, 0x59, 0xd5, 0xeb, 0x25, 0x59, 0x2b, 0x99, 0xd8, 0xe2, 0x63, 0x49, 0xb3, 0x53, 0x76, + 0xf7, 0xb8, 0x0a, 0xb5, 0xa6, 0xd0, 0x11, 0x6c, 0x48, 0xf2, 0x01, 0x1d, 0x50, 0x47, 0xf0, 0x30, + 0xdb, 0xa0, 0xcd, 0xf9, 0xd6, 0xe0, 0x7d, 0x8d, 0x92, 0xee, 0xd1, 0x5a, 0x96, 0xac, 0xa1, 0x5f, + 0xd9, 0x53, 0xda, 0xe8, 0x15, 0xac, 0x0b, 0x3e, 0x90, 0xab, 0xcc, 0x78, 0x90, 0xf7, 0x31, 0x35, + 0x05, 0xb9, 0x49, 0x32, 0xd5, 0xcb, 0x02, 0x66, 0xdd, 0xc8, 0x84, 0xeb, 0x93, 0x58, 0x64, 0xeb, + 0x3a, 0xad, 0xfb, 0xf0, 0x7a, 0xa9, 0x9e, 0x19, 0x2b, 0xb3, 0xa6, 0xaf, 0xcc, 0xb2, 0xb6, 0x02, + 0xd6, 0xce, 0xc9, 0xa5, 0x51, 0x39, 0xbd, 0x34, 0x2a, 0x67, 0x97, 0x46, 0xe5, 0x43, 0x62, 0x80, + 0x93, 0xc4, 0x00, 0xa7, 0x89, 0x01, 0xce, 0x12, 0x03, 0x7c, 0x4f, 0x0c, 0x70, 0xfc, 0xc3, 0xa8, + 0xbc, 0x46, 0xe5, 0xbf, 0xfa, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x3f, 0x9c, 0xd0, 0xea, + 0x05, 0x00, 0x00, } func (m *Overhead) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/node/v1alpha1/generated.pb.go b/vendor/k8s.io/api/node/v1alpha1/generated.pb.go index 9f876d4b44d..16ac696433f 100644 --- a/vendor/k8s.io/api/node/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/node/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/node/v1alpha1/generated.proto +// source: k8s.io/api/node/v1alpha1/generated.proto package v1alpha1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Overhead) Reset() { *m = Overhead{} } func (*Overhead) ProtoMessage() {} func (*Overhead) Descriptor() ([]byte, []int) { - return fileDescriptor_82a78945ab308218, []int{0} + return fileDescriptor_a8fee97bf5273e47, []int{0} } func (m *Overhead) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_Overhead proto.InternalMessageInfo func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } func (*RuntimeClass) ProtoMessage() {} func (*RuntimeClass) Descriptor() ([]byte, []int) { - return fileDescriptor_82a78945ab308218, []int{1} + return fileDescriptor_a8fee97bf5273e47, []int{1} } func (m *RuntimeClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_RuntimeClass proto.InternalMessageInfo func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } func (*RuntimeClassList) ProtoMessage() {} func (*RuntimeClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_82a78945ab308218, []int{2} + return fileDescriptor_a8fee97bf5273e47, []int{2} } func (m *RuntimeClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_RuntimeClassList proto.InternalMessageInfo func (m *RuntimeClassSpec) Reset() { *m = RuntimeClassSpec{} } func (*RuntimeClassSpec) ProtoMessage() {} func (*RuntimeClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_82a78945ab308218, []int{3} + return fileDescriptor_a8fee97bf5273e47, []int{3} } func (m *RuntimeClassSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_RuntimeClassSpec proto.InternalMessageInfo func (m *Scheduling) Reset() { *m = Scheduling{} } func (*Scheduling) ProtoMessage() {} func (*Scheduling) Descriptor() ([]byte, []int) { - return fileDescriptor_82a78945ab308218, []int{4} + return fileDescriptor_a8fee97bf5273e47, []int{4} } func (m *Scheduling) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -199,55 +199,54 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/node/v1alpha1/generated.proto", fileDescriptor_82a78945ab308218) + proto.RegisterFile("k8s.io/api/node/v1alpha1/generated.proto", fileDescriptor_a8fee97bf5273e47) } -var fileDescriptor_82a78945ab308218 = []byte{ - // 699 bytes of a gzipped FileDescriptorProto +var fileDescriptor_a8fee97bf5273e47 = []byte{ + // 683 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x3d, 0x6f, 0xd3, 0x4c, - 0x1c, 0xcf, 0xa5, 0xad, 0x94, 0x5e, 0xd2, 0xaa, 0x8f, 0x9f, 0xea, 0x51, 0x94, 0xc1, 0xa9, 0xac, - 0x47, 0xa8, 0x42, 0xea, 0x99, 0x56, 0xa8, 0xaa, 0x18, 0x8a, 0x30, 0x2f, 0x02, 0x51, 0x5a, 0x70, - 0xcb, 0x82, 0x18, 0xb8, 0xd8, 0x7f, 0x1c, 0x13, 0xdb, 0x67, 0xd9, 0xe7, 0x88, 0x6c, 0x88, 0x05, - 0x89, 0x89, 0x89, 0x6f, 0x03, 0x73, 0xc7, 0x4e, 0xa8, 0x53, 0x4b, 0xc3, 0x77, 0x60, 0x60, 0x42, - 0x67, 0x9f, 0x13, 0x27, 0x69, 0x68,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, 0x77, 0x3d, 0xde, 0x4e, 0x8f, 0x90, 0xcd, 0x02, 0xd3, + 0x65, 0x2e, 0x33, 0x33, 0xc2, 0x51, 0xfa, 0x26, 0x3b, 0x65, 0x87, 0xec, 0x2b, 0x17, 0x6a, 0x18, + 0x8a, 0xa5, 0xcd, 0x62, 0x61, 0x39, 0x6e, 0xd6, 0xb8, 0x3d, 0xc4, 0x04, 0xc4, 0x6e, 0x7b, 0x21, + 0x8d, 0x7b, 0x66, 0xd4, 0x71, 0x33, 0x52, 0x4c, 0x13, 0x96, 0xc6, 0x36, 0xfd, 0x27, 0x56, 0x62, + 0x06, 0x94, 0x93, 0xcb, 0xbc, 0xcc, 0x69, 0xac, 0x38, 0x0d, 0xb9, 0x17, 0x4c, 0xda, 0x6c, 0x5d, + 0x45, 0x48, 0xec, 0x36, 0x0d, 0xc8, 0x38, 0xcf, 0x38, 0x29, 0xc3, 0xca, 0x7e, 0x97, 0xc6, 0x6d, + 0x4a, 0x1c, 0xed, 0x3b, 0x80, 0x95, 0x88, 0x39, 0x0f, 0xbd, 0x77, 0xd4, 0xa9, 0x83, 0xb5, 0xb9, + 0x56, 0x75, 0xf3, 0x16, 0x9a, 0x56, 0x62, 0x54, 0xd0, 0xd0, 0x33, 0x49, 0x79, 0x10, 0xf2, 0xb8, + 0x67, 0x7d, 0x04, 0xc7, 0x67, 0xcd, 0x52, 0xff, 0xac, 0x59, 0x29, 0xee, 0x7f, 0x9f, 0x35, 0x9b, + 0x93, 0xf5, 0x45, 0x58, 0x96, 0x6c, 0xd7, 0x4b, 0xf8, 0x87, 0xf3, 0xbf, 0x42, 0xf6, 0x48, 0x40, + 0x3f, 0x9d, 0x37, 0xd7, 0x67, 0xe9, 0x00, 0x7a, 0x9e, 0x92, 0x90, 0x7b, 0xbc, 0x87, 0x07, 0xb9, + 0x34, 0x3a, 0x70, 0x69, 0x24, 0x48, 0x6d, 0x05, 0xce, 0x75, 0x68, 0xaf, 0x0e, 0xd6, 0x40, 0x6b,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x63, 0x68, 0x6d, 0x17, 0x56, 0x98, 0x1c, 0x78, 0x59, 0x66, 0xe3, + 0xea, 0xd5, 0xb0, 0x6a, 0x22, 0xdf, 0xe2, 0x84, 0x07, 0x0a, 0xda, 0x21, 0x84, 0x62, 0x21, 0x9d, + 0xd4, 0xf7, 0x42, 0xb7, 0x3e, 0x97, 0xe9, 0x5d, 0x9f, 0xae, 0x77, 0x30, 0xc0, 0x5a, 0xcb, 0x62, + 0x08, 0x86, 0x67, 0xac, 0xe8, 0x18, 0x5f, 0xca, 0x50, 0x79, 0xd2, 0x22, 0x58, 0x13, 0x32, 0x07, + 0xd4, 0xa7, 0x36, 0x67, 0xb1, 0xdc, 0xe8, 0xad, 0x59, 0x6c, 0xd0, 0x9e, 0x42, 0xcc, 0xf7, 0x7a, + 0x55, 0x16, 0xaa, 0xa6, 0x3e, 0xe1, 0x11, 0x07, 0xed, 0x05, 0xac, 0x72, 0xe6, 0x8b, 0x1f, 0x18, + 0x8f, 0x85, 0x45, 0x33, 0x75, 0xd5, 0x50, 0x6c, 0xb6, 0x98, 0x8a, 0xc3, 0x01, 0xcc, 0xfa, 0x5f, + 0x0a, 0x57, 0x87, 0x77, 0x09, 0x56, 0x75, 0x1a, 0x77, 0xe1, 0x7f, 0x13, 0xf1, 0x5c, 0xb2, 0xc2, + 0xab, 0xea, 0x0a, 0x2f, 0x2a, 0x2b, 0x69, 0xed, 0x1c, 0x5f, 0xe8, 0xa5, 0x93, 0x0b, 0xbd, 0x74, + 0x7a, 0xa1, 0x97, 0xde, 0xf7, 0x75, 0x70, 0xdc, 0xd7, 0xc1, 0x49, 0x5f, 0x07, 0xa7, 0x7d, 0x1d, + 0xfc, 0xe8, 0xeb, 0xe0, 0xf3, 0x4f, 0xbd, 0xf4, 0xb2, 0x3e, 0xed, 0x7f, 0xe7, 0x4f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xa7, 0x9b, 0x7f, 0x45, 0x92, 0x06, 0x00, 0x00, } func (m *Overhead) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/node/v1beta1/generated.pb.go b/vendor/k8s.io/api/node/v1beta1/generated.pb.go index 8cd5a4cc359..537961c259a 100644 --- a/vendor/k8s.io/api/node/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/node/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/node/v1beta1/generated.proto +// source: k8s.io/api/node/v1beta1/generated.proto package v1beta1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Overhead) Reset() { *m = Overhead{} } func (*Overhead) ProtoMessage() {} func (*Overhead) Descriptor() ([]byte, []int) { - return fileDescriptor_f977b0dddc93b4ec, []int{0} + return fileDescriptor_73bb62abe8438af4, []int{0} } func (m *Overhead) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_Overhead proto.InternalMessageInfo func (m *RuntimeClass) Reset() { *m = RuntimeClass{} } func (*RuntimeClass) ProtoMessage() {} func (*RuntimeClass) Descriptor() ([]byte, []int) { - return fileDescriptor_f977b0dddc93b4ec, []int{1} + return fileDescriptor_73bb62abe8438af4, []int{1} } func (m *RuntimeClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_RuntimeClass proto.InternalMessageInfo func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} } func (*RuntimeClassList) ProtoMessage() {} func (*RuntimeClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_f977b0dddc93b4ec, []int{2} + return fileDescriptor_73bb62abe8438af4, []int{2} } func (m *RuntimeClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_RuntimeClassList proto.InternalMessageInfo func (m *Scheduling) Reset() { *m = Scheduling{} } func (*Scheduling) ProtoMessage() {} func (*Scheduling) Descriptor() ([]byte, []int) { - return fileDescriptor_f977b0dddc93b4ec, []int{3} + return fileDescriptor_73bb62abe8438af4, []int{3} } func (m *Scheduling) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,53 +170,52 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/node/v1beta1/generated.proto", fileDescriptor_f977b0dddc93b4ec) + proto.RegisterFile("k8s.io/api/node/v1beta1/generated.proto", fileDescriptor_73bb62abe8438af4) } -var fileDescriptor_f977b0dddc93b4ec = []byte{ - // 668 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbb, 0x6f, 0xd3, 0x40, - 0x18, 0xcf, 0xa5, 0x54, 0x4d, 0x2f, 0x29, 0x14, 0x53, 0xa9, 0x51, 0x06, 0xa7, 0x04, 0x21, 0x95, - 0xa1, 0x67, 0x5a, 0x01, 0xaa, 0x90, 0x10, 0xc8, 0x3c, 0xc4, 0xb3, 0x05, 0x17, 0x16, 0xc4, 0xc0, - 0xc5, 0xfe, 0x70, 0x4c, 0x62, 0x5f, 0x74, 0x3e, 0x47, 0x64, 0x43, 0x2c, 0x48, 0x4c, 0x2c, 0xfc, - 0x37, 0xb0, 0x77, 0xa3, 0x0b, 0x52, 0xa7, 0x96, 0x86, 0xff, 0x82, 0x09, 0x9d, 0x5f, 0xb9, 0x36, - 0x4d, 0x1b, 0x36, 0xdf, 0xdd, 0xef, 0x71, 0xdf, 0xef, 0xbb, 0xcf, 0xf8, 0x4e, 0x7b, 0x3d, 0x24, - 0x1e, 0x33, 0xda, 0x51, 0x13, 0x78, 0x00, 0x02, 0x42, 0xa3, 0x07, 0x81, 0xc3, 0xb8, 0x91, 0x1e, - 0xd0, 0xae, 0x67, 0x04, 0xcc, 0x01, 0xa3, 0xb7, 0xda, 0x04, 0x41, 0x57, 0x0d, 0x17,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Descriptor_73bb62abe8438af4 = []byte{ + // 654 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbb, 0x6f, 0x13, 0x31, + 0x18, 0x8f, 0x53, 0xaa, 0xa6, 0x4e, 0x0a, 0xc5, 0x54, 0x6a, 0x94, 0xe1, 0x52, 0x82, 0x10, 0x65, + 0xa8, 0x8f, 0x56, 0x80, 0x2a, 0x24, 0x84, 0x74, 0x3c, 0xc4, 0xb3, 0x85, 0x2b, 0x2c, 0x88, 0x01, + 0xe7, 0xce, 0x5c, 0x4c, 0x72, 0xe7, 0xe8, 0xce, 0x17, 0x91, 0x0d, 0xb1, 0x20, 0x31, 0xb1, 0xf0, + 0xdf, 0xc0, 0xde, 0x8d, 0x2e, 0x48, 0x9d, 0x5a, 0x1a, 0xfe, 0x0b, 0x26, 0x64, 0xdf, 0x23, 0x6e, + 0xd3, 0xb4, 0x61, 0x8b, 0x7d, 0xbf, 0xc7, 0xf7, 0xfd, 0x3e, 0x7f, 0x81, 0x57, 0xda, 0xeb, 0x11, + 0x66, 0xdc, 0x24, 0x5d, 0x66, 0x06, 0xdc, 0xa5, 0x66, 0x6f, 0xb5, 0x49, 0x05, 0x59, 0x35, 0x3d, + 0x1a, 0xd0, 0x90, 0x08, 0xea, 0xe2, 0x6e, 0xc8, 0x05, 0x47, 0x8b, 0x09, 0x10, 0x93, 0x2e, 0xc3, + 0x12, 0x88, 0x53, 0x60, 0x6d, 0xc5, 0x63, 0xa2, 0x15, 0x37, 0xb1, 0xc3, 0x7d, 0xd3, 0xe3, 0x1e, + 0x37, 0x15, 0xbe, 0x19, 0xbf, 0x53, 0x27, 0x75, 0x50, 0xbf, 0x12, 0x9d, 0x5a, 0x43, 0x33, 0x74, + 0x78, 0x28, 0x0d, 0x8f, 0x7a, 0xd5, 0xae, 0x0f, 0x31, 0x3e, 0x71, 0x5a, 0x2c, 0xa0, 0x61, 0x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 0xdd, 0x98, 0x20, 0x24, 0xbc, 0xa1, + 0xf1, 0x92, 0xdd, 0x5a, 0x48, 0x1d, 0x2b, 0xfa, 0x27, 0xfb, 0x90, 0x01, 0x7a, 0x05, 0xcb, 0x82, + 0x77, 0xe4, 0x8e, 0x33, 0x1e, 0x64, 0x1d, 0x19, 0xba, 0x9f, 0xdc, 0x2e, 0x19, 0xcd, 0xcb, 0x1c, + 0x66, 0x5d, 0x48, 0x85, 0xcb, 0xc3, 0xbb, 0xc8, 0xd6, 0x75, 0x6a, 0x77, 0xe0, 0xf9, 0x91, 0x7a, + 0x8e, 0x59, 0xa3, 0x05, 0x7d, 0x8d, 0x66, 0xb5, 0xb5, 0xb0, 0x6e, 0x6f, 0x1f, 0x18, 0x85, 0x9d, + 0x03, 0xa3, 0xb0, 0x7b, 0x60, 0x14, 0x3e, 0x0e, 0x0c, 0xb0, 0x3d, 0x30, 0xc0, 0xce, 0xc0, 0x00, + 0xbb, 0x03, 0x03, 0xfc, 0x1e, 0x18, 0xe0, 0xeb, 0x1f, 0xa3, 0xf0, 0x7a, 0x71, 0xcc, 0x1f, 0xff, + 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x67, 0x22, 0x03, 0x12, 0x06, 0x00, 0x00, } func (m *Overhead) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/policy/v1/generated.pb.go b/vendor/k8s.io/api/policy/v1/generated.pb.go index d7e467a9215..dd61b7266c4 100644 --- a/vendor/k8s.io/api/policy/v1/generated.pb.go +++ b/vendor/k8s.io/api/policy/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/policy/v1/generated.proto +// source: k8s.io/api/policy/v1/generated.proto package v1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Eviction) Reset() { *m = Eviction{} } func (*Eviction) ProtoMessage() {} func (*Eviction) Descriptor() ([]byte, []int) { - return fileDescriptor_2d50488813b2d18e, []int{0} + return fileDescriptor_204bc6fa48ff56f7, []int{0} } func (m *Eviction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_Eviction proto.InternalMessageInfo func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } func (*PodDisruptionBudget) ProtoMessage() {} func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { - return fileDescriptor_2d50488813b2d18e, []int{1} + return fileDescriptor_204bc6fa48ff56f7, []int{1} } func (m *PodDisruptionBudget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_PodDisruptionBudget proto.InternalMessageInfo func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } func (*PodDisruptionBudgetList) ProtoMessage() {} func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { - return fileDescriptor_2d50488813b2d18e, []int{2} + return fileDescriptor_204bc6fa48ff56f7, []int{2} } func (m *PodDisruptionBudgetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_PodDisruptionBudgetList proto.InternalMessageInfo func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } func (*PodDisruptionBudgetSpec) ProtoMessage() {} func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2d50488813b2d18e, []int{3} + return fileDescriptor_204bc6fa48ff56f7, []int{3} } func (m *PodDisruptionBudgetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_PodDisruptionBudgetSpec proto.InternalMessageInfo func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (*PodDisruptionBudgetStatus) ProtoMessage() {} func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2d50488813b2d18e, []int{4} + return fileDescriptor_204bc6fa48ff56f7, []int{4} } func (m *PodDisruptionBudgetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -197,65 +197,64 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/policy/v1/generated.proto", fileDescriptor_2d50488813b2d18e) + proto.RegisterFile("k8s.io/api/policy/v1/generated.proto", fileDescriptor_204bc6fa48ff56f7) } -var fileDescriptor_2d50488813b2d18e = []byte{ - // 854 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcf, 0x8f, 0xdb, 0x44, - 0x14, 0xc7, 0xe3, 0xcd, 0x66, 0xd9, 0x4e, 0x93, 0x68, 0x19, 0x16, 0x58, 0x72, 0x70, 0xaa, 0x9c, - 0x16, 0xa4, 0x8e, 0xd9, 0x16, 0xa1, 0x55, 0x25, 0x50, 0xeb, 0x66, 0x05, 0x45, 0x5d, 0xb2, 0x9a, - 0x6d, 0x85, 0x84, 0x40, 0x62, 0x62, 0xbf, 0x26, 0x43, 0x6c, 0x8f, 0xe5, 0x19, 0x87, 0xe6, 0x44, - 0xff, 0x04, 0xfe, 0x05, 0xfe, 0x14, 0x4e, 0xec, 0xb1, 0xdc, 0x2a, 0x0e, 0x11, 0x6b, 0xfe, 0x0b, - 0x4e, 0xc8, 0x63, 0xe7, 0x87, 0x37, 0x0e, 0xcd, 0x72, 0xe8, 0xcd, 0xf3, 0xde, 0xfb, 0x7e, 0x9e, - 0xdf, 0x8f, 0x71, 0x82, 0x3e, 0x1b, 0x1d, 0x4b, 0xc2, 0x85, 0x35, 0x8a, 0xfb, 0x10, 0x05, 0xa0, - 0x40, 0x5a, 0x63, 0x08, 0x5c, 0x11, 0x59, 0xb9, 0x83, 0x85, 0xdc, 0x0a, 0x85, 0xc7, 0x9d, 0x89, - 0x35, 0x3e, 0xb2, 0x06, 0x10, 0x40, 0xc4, 0x14, 0xb8, 0x24, 0x8c, 0x84, 0x12, 0x78, 0x3f, 0x8b, - 0x22, 0x2c, 0xe4, 0x24, 0x8b, 0x22, 0xe3, 0xa3, 0xd6, 0xed, 0x01, 0x57, 0xc3, 0xb8, 0x4f, 0x1c, - 0xe1, 0x5b, 0x03, 0x31, 0x10, 0x96, 0x0e, 0xee, 0xc7, 0xcf, 0xf4, 0x49, 0x1f, 0xf4, 0x53, 0x06, - 0x69, 0x7d, 0xb2, 0x48, 0xe5, 0x33, 0x67, 0xc8, 0x03, 0x88, 0x26, 0x56, 0x38, 0x1a, 0xa4, 0x06, - 0x69, 0xf9, 0xa0, 0x58, 0x49, 0xea, 0x96, 0xb5, 0x4e, 0x15, 0xc5, 0x81, 0xe2, 0x3e, 0xac, 0x08, - 0x3e, 0x7d, 0x9d, 0x40, 0x3a, 0x43, 0xf0, 0xd9, 0x8a, 0xee, 0xee, 0x3a, 0x5d, 0xac, 0xb8, 0x67, - 0xf1, 0x40, 0x49, 0x15, 0x5d, 0x15, 0x75, 0xfe, 0x34, 0xd0, 0xee, 0xc9, 0x98, 0x3b, 0x8a, 0x8b, - 0x00, 0xff, 0x80, 0x76, 0xd3, 0x2a, 0x5c, 0xa6, 0xd8, 0x81, 0x71, 0xcb, 0x38, 0xbc, 0x79, 0xe7, - 0x63, 0xb2, 0x68, 0xdc, 0x1c, 0x4a, 0xc2, 0xd1, 0x20, 0x35, 0x48, 0x92, 0x46, 0x93, 0xf1, 0x11, - 0xe9, 0xf5, 0x7f, 0x04, 0x47, 0x9d, 0x82, 0x62, 0x36, 0xbe, 0x98, 0xb6, 0x2b, 0xc9, 0xb4, 0x8d, - 0x16, 0x36, 0x3a, 0xa7, 0x62, 0x0f, 0x35, 0x5c, 0xf0, 0x40, 0x41, 0x2f, 0x4c, 0x33, 0xca, 0x83, - 0x2d, 0x9d, 0xe6, 0xee, 0x66, 0x69, 0xba, 0xcb, 0x52, 0xfb, 0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+ // 840 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x8f, 0xdb, 0x44, + 0x18, 0xc7, 0xe3, 0xcd, 0x66, 0xd9, 0x4e, 0x93, 0x68, 0x19, 0x16, 0x58, 0x72, 0x70, 0xaa, 0x88, + 0xc3, 0x82, 0xd4, 0x31, 0xdb, 0x22, 0xb4, 0xea, 0x01, 0xb5, 0x6e, 0x56, 0x50, 0xd4, 0x25, 0xab, + 0xd9, 0x56, 0x48, 0x08, 0x24, 0x26, 0xf6, 0xd3, 0x64, 0x58, 0xdb, 0x63, 0x79, 0xc6, 0xa1, 0x39, + 0xd1, 0x8f, 0xc0, 0x57, 0xe0, 0xa3, 0x70, 0x62, 0x8f, 0xe5, 0x56, 0x71, 0x88, 0x58, 0xf3, 0x2d, + 0x38, 0x21, 0x8f, 0x9d, 0x17, 0x27, 0x0e, 0xcd, 0x72, 0xe8, 0xcd, 0xf3, 0xcc, 0xf3, 0xff, 0x3d, + 0xf3, 0xbc, 0xcc, 0x24, 0xe8, 0xc3, 0x8b, 0x63, 0x49, 0xb8, 0xb0, 0x58, 0xc8, 0xad, 0x50, 0x78, + 0xdc, 0x19, 0x5b, 0xa3, 0x23, 0x6b, 0x00, 0x01, 0x44, 0x4c, 0x81, 0x4b, 0xc2, 0x48, 0x28, 0x81, + 0xf7, 0x33, 0x2f, 0xc2, 0x42, 0x4e, 0x32, 0x2f, 0x32, 0x3a, 0x6a, 0xdd, 0x1e, 0x70, 0x35, 0x8c, + 0xfb, 0xc4, 0x11, 0xbe, 0x35, 0x10, 0x03, 0x61, 0x69, 0xe7, 0x7e, 0xfc, 0x4c, 0xaf, 0xf4, 0x42, + 0x7f, 0x65, 0x90, 0xd6, 0xa7, 0xf3, 0x50, 0x3e, 0x73, 0x86, 0x3c, 0x80, 0x68, 0x6c, 0x85, 0x17, + 0x83, 0xd4, 0x20, 0x2d, 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 0x44, 0xe0, 0xf2, 0xec, 0xd7, 0xe1, 0x2d, 0xdd, 0x03, 0x6b, 0xb3, + 0x2b, 0xf4, 0x70, 0xaa, 0x9b, 0xbf, 0xcd, 0x33, 0x93, 0xa4, 0x0b, 0xd8, 0x96, 0x87, 0xf0, 0x6a, + 0x9b, 0xf0, 0x1e, 0xaa, 0x5e, 0xc0, 0x58, 0x8f, 0xcf, 0x0d, 0x9a, 0x7e, 0xe2, 0xfb, 0xa8, 0x36, + 0x62, 0x5e, 0x0c, 0xf9, 0x55, 0xfe, 0x78, 0xb3, 0x73, 0x3c, 0xe1, 0x3e, 0xd0, 0x4c, 0x78, 0x6f, + 0xeb, 0xd8, 0xb0, 0xef, 0x5d, 0x5e, 0x99, 0x95, 0x97, 0x57, 0x66, 0xe5, 0xd5, 0x95, 0x59, 0x79, + 0x91, 0x98, 0xc6, 0x65, 0x62, 0x1a, 0x2f, 0x13, 0xd3, 0x78, 0x95, 0x98, 0xc6, 0x5f, 0x89, 0x69, + 0xfc, 0xf2, 0xb7, 0x59, 0xf9, 0x76, 0xbf, 0xec, 0x7f, 0xcc, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x0f, 0x42, 0xd2, 0x33, 0xde, 0x08, 0x00, 0x00, } func (m *Eviction) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/policy/v1beta1/generated.pb.go b/vendor/k8s.io/api/policy/v1beta1/generated.pb.go index efba41b3fda..c3845e994e5 100644 --- a/vendor/k8s.io/api/policy/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/policy/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/policy/v1beta1/generated.proto +// source: k8s.io/api/policy/v1beta1/generated.proto package v1beta1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Eviction) Reset() { *m = Eviction{} } func (*Eviction) ProtoMessage() {} func (*Eviction) Descriptor() ([]byte, []int) { - return fileDescriptor_014060e454a820dc, []int{0} + return fileDescriptor_68b366237812cc96, []int{0} } func (m *Eviction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_Eviction proto.InternalMessageInfo func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } func (*PodDisruptionBudget) ProtoMessage() {} func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { - return fileDescriptor_014060e454a820dc, []int{1} + return fileDescriptor_68b366237812cc96, []int{1} } func (m *PodDisruptionBudget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_PodDisruptionBudget proto.InternalMessageInfo func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } func (*PodDisruptionBudgetList) ProtoMessage() {} func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { - return fileDescriptor_014060e454a820dc, []int{2} + return fileDescriptor_68b366237812cc96, []int{2} } func (m *PodDisruptionBudgetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_PodDisruptionBudgetList proto.InternalMessageInfo func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } func (*PodDisruptionBudgetSpec) ProtoMessage() {} func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_014060e454a820dc, []int{3} + return fileDescriptor_68b366237812cc96, []int{3} } func (m *PodDisruptionBudgetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_PodDisruptionBudgetSpec proto.InternalMessageInfo func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (*PodDisruptionBudgetStatus) ProtoMessage() {} func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_014060e454a820dc, []int{4} + return fileDescriptor_68b366237812cc96, []int{4} } func (m *PodDisruptionBudgetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -197,65 +197,64 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/policy/v1beta1/generated.proto", fileDescriptor_014060e454a820dc) + proto.RegisterFile("k8s.io/api/policy/v1beta1/generated.proto", fileDescriptor_68b366237812cc96) } -var fileDescriptor_014060e454a820dc = []byte{ - // 857 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0xc7, 0x45, 0xcb, 0x72, 0x9d, 0xad, 0x24, 0xb8, 0xdb, 0x2f, 0x5b, 0x07, 0x2a, 0xd0, 0x29, - 0x28, 0xd0, 0x65, 0x9d, 0x04, 0x85, 0xd1, 0x43, 0x9b, 0x30, 0x32, 0xd2, 0x14, 0x31, 0x6c, 0xac, - 0x9c, 0x4b, 0x91, 0x02, 0x5d, 0x91, 0x13, 0x69, 0x2b, 0x92, 0x4b, 0x70, 0x97, 0x6c, 0x74, 0xcb, - 0xa1, 0x0f, 0xd0, 0xf7, 0xe8, 0x83, 0xd4, 0x87, 0x1e, 0xd2, 0x5b, 0xd0, 0x83, 0x50, 0xb3, 0x6f, - 0xd1, 0x53, 0xc1, 0x25, 0xf5, 0x41, 0x7d, 0x34, 0x4a, 0x0e, 0xb9, 0x71, 0x67, 0xe6, 0xff, 0x1b, - 0xce, 0xc7, 0x52, 0x42, 0xf6, 0xe8, 0x44, 0x12, 0x2e, 0xac, 0x51, 0xdc, 0x87, 0x28, 0x00, 0x05, - 0xd2, 0x4a, 0x20, 0x70, 0x45, 0x64, 0x15, 0x0e, 0x16, 0x72, 0x2b, 0x14, 0x1e, 0x77, 0xc6, 0x56, - 0x72, 0xdc, 0x07, 0xc5, 0x8e, 0xad, 0x01, 0x04, 0x10, 0x31, 0x05, 0x2e, 0x09, 0x23, 0xa1, 0x04, - 0x3e, 0xca, 0x43, 0x09, 0x0b, 0x39, 0xc9, 0x43, 0x49, 0x11, 0xda, 0xfa, 0x7c, 0xc0, 0xd5, 0x30, - 0xee, 0x13, 0x47, 0xf8, 0xd6, 0x40, 0x0c, 0x84, 0xa5, 0x15, 0xfd, 0xf8, 0x99, 0x3e, 0xe9, 0x83, - 0x7e, 0xca, 0x49, 0xad, 0xbb, 0xf3, 0xa4, 0x3e, 0x73, 0x86, 0x3c, 0x80, 0x68, 0x6c, 0x85, 0xa3, - 0x41, 0x66, 0x90, 0x96, 0x0f, 0x8a, 0x59, 0xc9, 0x4a, 0xfe, 0x96, 0xb5, 0x49, 0x15, 0xc5, 0x81, - 0xe2, 0x3e, 0xac, 0x08, 0xbe, 0x7c, 0x9d, 0x40, 0x3a, 0x43, 0xf0, 0xd9, 0x8a, 0xee, 0xce, 0x26, - 0x5d, 0xac, 0xb8, 0x67, 0xf1, 0x40, 0x49, 0x15, 0x2d, 0x8b, 0x3a, 0x7f, 0x19, 0x68, 0xff, 0x34, - 0xe1, 0x8e, 0xe2, 0x22, 0xc0, 0x3f, 0xa2, 0xfd, 0xac, 0x0a, 0x97, 0x29, 0x76, 0x68, 0xdc, 0x34, - 0x6e, 0xbd, 0x7f, 0xfb, 0x0b, 0x32, 0xef, 0xde, 0x0c, 0x4a, 0xc2, 0xd1, 0x20, 0x33, 0x48, 0x92, - 0x45, 0x93, 0xe4, 0x98, 0x9c, 0xf7, 0x7f, 0x02, 0x47, 0x9d, 0x81, 0x62, 0x36, 0xbe, 0x9a, 0xb4, - 0x2b, 0xe9, 0xa4, 0x8d, 0xe6, 0x36, 0x3a, 0xa3, 0x62, 0x0f, 0x35, 0x5c, 0xf0, 0x40, 0xc1, 0x79, - 0x98, 0x65, 0x94, 0x87, 0x3b, 0x3a, 0xcd, 0x9d, 0xed, 0xd2, 0x74, 0x17, 0xa5, 0xf6, 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0x5f, 0xa3, 0xa6, 0x13, 0x47, 0x11, 0x04, 0xea, 0xdb, 0xbc, - 0xbf, 0x7a, 0x64, 0x35, 0xfb, 0x93, 0x82, 0xd3, 0x7c, 0x50, 0xf2, 0xd2, 0xa5, 0xe8, 0x4c, 0xef, - 0x82, 0xe4, 0x11, 0xb8, 0x53, 0x7d, 0xad, 0xac, 0xef, 0x96, 0xbc, 0x74, 0x29, 0x1a, 0x9f, 0xa0, - 0x3a, 0x3c, 0x0f, 0xc1, 0x99, 0x36, 0x74, 0x4f, 0xab, 0x3f, 0x2a, 0xd4, 0xf5, 0xd3, 0x05, 0x1f, - 0x2d, 0x45, 0x62, 0x07, 0x21, 0x47, 0x04, 0x2e, 0xcf, 0x7f, 0x32, 0xde, 0xd3, 0x83, 0xb0, 0xb6, - 0xbb, 0x48, 0x0f, 0xa6, 0xba, 0xf9, 0x07, 0x7b, 0x66, 0x92, 0x74, 0x01, 0xdb, 0xf2, 0x10, 0x5e, - 0x1d, 0x13, 0x3e, 0x40, 0xd5, 0x11, 0x8c, 0xf5, 0x12, 0xdd, 0xa0, 0xd9, 0x23, 0xbe, 0x87, 0x6a, - 0x09, 0xf3, 0x62, 0x28, 0x2e, 0xf4, 0x67, 0xdb, 0xbd, 0xc7, 0x25, 0xf7, 0x81, 0xe6, 0xc2, 0xaf, - 0x76, 0x4e, 0x0c, 0xfb, 0x9b, 0xab, 0x6b, 0xb3, 0xf2, 0xf2, 0xda, 0xac, 0xbc, 0xba, 0x36, 0x2b, - 0x2f, 0x52, 0xd3, 0xb8, 0x4a, 0x4d, 0xe3, 0x65, 0x6a, 0x1a, 0xaf, 0x52, 0xd3, 0xf8, 0x3b, 0x35, - 0x8d, 0x5f, 0xff, 0x31, 0x2b, 0xdf, 0x1f, 0x6d, 0xfc, 0x9b, 0xf3, 0x5f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x96, 0x9a, 0x3a, 0xb5, 0x1b, 0x09, 0x00, 0x00, +var fileDescriptor_68b366237812cc96 = []byte{ + // 843 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x8f, 0xdb, 0x44, + 0x18, 0xc7, 0xe3, 0xcd, 0x66, 0xd9, 0x0e, 0x49, 0xb4, 0x0c, 0x6f, 0xbb, 0x39, 0x38, 0x55, 0x4e, + 0x05, 0x89, 0x31, 0xdb, 0x56, 0x68, 0xc5, 0x01, 0x5a, 0x37, 0xab, 0x52, 0xd4, 0xd5, 0xae, 0x26, + 0xdb, 0x0b, 0x2a, 0x12, 0x13, 0xfb, 0xa9, 0x33, 0xc4, 0xf6, 0x58, 0x9e, 0x71, 0x68, 0x6e, 0x3d, + 0xf0, 0x01, 0xf8, 0x1e, 0x7c, 0x10, 0xf6, 0xc0, 0xa1, 0xdc, 0x2a, 0x0e, 0x11, 0x6b, 0xbe, 0x05, + 0x27, 0xe4, 0xb1, 0xf3, 0xe2, 0xbc, 0xd0, 0xb4, 0x07, 0x6e, 0x9e, 0x67, 0x9e, 0xff, 0xef, 0x99, + 0xe7, 0x65, 0x26, 0x41, 0x9f, 0x0c, 0x4f, 0x24, 0xe1, 0xc2, 0x62, 0x11, 0xb7, 0x22, 0xe1, 0x73, + 0x67, 0x6c, 0x8d, 0x8e, 0xfb, 0xa0, 0xd8, 0xb1, 0xe5, 0x41, 0x08, 0x31, 0x53, 0xe0, 0x92, 0x28, + 0x16, 0x4a, 0xe0, 0xa3, 0xdc, 0x95, 0xb0, 0x88, 0x93, 0xdc, 0x95, 0x14, 0xae, 0xad, 0xcf, 0x3c, + 0xae, 0x06, 0x49, 0x9f, 0x38, 0x22, 0xb0, 0x3c, 0xe1, 0x09, 0x4b, 0x2b, 0xfa, 0xc9, 0x33, 0xbd, + 0xd2, 0x0b, 0xfd, 0x95, 0x93, 0x5a, 0x77, 0xe7, 0x41, 0x03, 0xe6, 0x0c, 0x78, 0x08, 0xf1, 0xd8, + 0x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0x92, 0x27, 0x76, 0x10, 0x72, 0x44, 0xe8, 0xf2, 0xfc, 0x27, 0xe3, 0x1d, 0xdd, + 0x08, 0x6b, 0xbb, 0x8b, 0xf4, 0x60, 0xaa, 0x9b, 0x3f, 0xd8, 0x33, 0x93, 0xa4, 0x0b, 0xd8, 0x96, + 0x8f, 0xf0, 0x6a, 0x9b, 0xf0, 0x01, 0xaa, 0x0e, 0x61, 0xac, 0x87, 0xe8, 0x06, 0xcd, 0x3e, 0xf1, + 0x3d, 0x54, 0x1b, 0x31, 0x3f, 0x81, 0xe2, 0x42, 0x7f, 0xba, 0xdd, 0x39, 0x2e, 0x79, 0x00, 0x34, + 0x17, 0x7e, 0xb9, 0x73, 0x62, 0xd8, 0x5f, 0x5f, 0x5d, 0x9b, 0x95, 0x97, 0xd7, 0x66, 0xe5, 0xd5, + 0xb5, 0x59, 0x79, 0x91, 0x9a, 0xc6, 0x55, 0x6a, 0x1a, 0x2f, 0x53, 0xd3, 0x78, 0x95, 0x9a, 0xc6, + 0x5f, 0xa9, 0x69, 0xfc, 0xf2, 0xb7, 0x59, 0xf9, 0xee, 0x68, 0xe3, 0xdf, 0x9c, 0x7f, 0x03, 0x00, + 0x00, 0xff, 0xff, 0x3c, 0xbe, 0x15, 0xfb, 0x02, 0x09, 0x00, 0x00, } func (m *Eviction) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/rbac/v1/generated.pb.go b/vendor/k8s.io/api/rbac/v1/generated.pb.go index 4e466eb285a..112d18fb065 100644 --- a/vendor/k8s.io/api/rbac/v1/generated.pb.go +++ b/vendor/k8s.io/api/rbac/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1/generated.proto +// source: k8s.io/api/rbac/v1/generated.proto package v1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AggregationRule) Reset() { *m = AggregationRule{} } func (*AggregationRule) ProtoMessage() {} func (*AggregationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{0} + return fileDescriptor_c8ba2e7dd472de66, []int{0} } func (m *AggregationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_AggregationRule proto.InternalMessageInfo func (m *ClusterRole) Reset() { *m = ClusterRole{} } func (*ClusterRole) ProtoMessage() {} func (*ClusterRole) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{1} + return fileDescriptor_c8ba2e7dd472de66, []int{1} } func (m *ClusterRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_ClusterRole proto.InternalMessageInfo func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } func (*ClusterRoleBinding) ProtoMessage() {} func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{2} + return fileDescriptor_c8ba2e7dd472de66, []int{2} } func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_ClusterRoleBinding proto.InternalMessageInfo func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } func (*ClusterRoleBindingList) ProtoMessage() {} func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{3} + return fileDescriptor_c8ba2e7dd472de66, []int{3} } func (m *ClusterRoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_ClusterRoleBindingList proto.InternalMessageInfo func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } func (*ClusterRoleList) ProtoMessage() {} func (*ClusterRoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{4} + return fileDescriptor_c8ba2e7dd472de66, []int{4} } func (m *ClusterRoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ClusterRoleList proto.InternalMessageInfo func (m *PolicyRule) Reset() { *m = PolicyRule{} } func (*PolicyRule) ProtoMessage() {} func (*PolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{5} + return fileDescriptor_c8ba2e7dd472de66, []int{5} } func (m *PolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_PolicyRule proto.InternalMessageInfo func (m *Role) Reset() { *m = Role{} } func (*Role) ProtoMessage() {} func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{6} + return fileDescriptor_c8ba2e7dd472de66, []int{6} } func (m *Role) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_Role proto.InternalMessageInfo func (m *RoleBinding) Reset() { *m = RoleBinding{} } func (*RoleBinding) ProtoMessage() {} func (*RoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{7} + return fileDescriptor_c8ba2e7dd472de66, []int{7} } func (m *RoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +271,7 @@ var xxx_messageInfo_RoleBinding proto.InternalMessageInfo func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } func (*RoleBindingList) ProtoMessage() {} func (*RoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{8} + return fileDescriptor_c8ba2e7dd472de66, []int{8} } func (m *RoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +299,7 @@ var xxx_messageInfo_RoleBindingList proto.InternalMessageInfo func (m *RoleList) Reset() { *m = RoleList{} } func (*RoleList) ProtoMessage() {} func (*RoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{9} + return fileDescriptor_c8ba2e7dd472de66, []int{9} } func (m *RoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +327,7 @@ var xxx_messageInfo_RoleList proto.InternalMessageInfo func (m *RoleRef) Reset() { *m = RoleRef{} } func (*RoleRef) ProtoMessage() {} func (*RoleRef) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{10} + return fileDescriptor_c8ba2e7dd472de66, []int{10} } func (m *RoleRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +355,7 @@ var xxx_messageInfo_RoleRef proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_979ffd7b30c07419, []int{11} + return fileDescriptor_c8ba2e7dd472de66, []int{11} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -396,62 +396,61 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1/generated.proto", fileDescriptor_979ffd7b30c07419) -} - -var fileDescriptor_979ffd7b30c07419 = []byte{ - // 809 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcf, 0x6b, 0xe3, 0x46, - 0x14, 0xf6, 0x38, 0x36, 0xb1, 0xc6, 0x35, 0x6e, 0xa6, 0xa1, 0x88, 0xb4, 0xc8, 0x41, 0x85, 0x12, - 0x68, 0x2b, 0x35, 0x69, 0x69, 0x03, 0x25, 0x87, 0x28, 0xa5, 0x25, 0x24, 0x4d, 0xc3, 0x84, 0xf6, - 0x50, 0x7a, 0xe8, 0x48, 0x9e, 0x28, 0x53, 0xeb, 0x17, 0x33, 0x92, 0x21, 0xf4, 0x52, 0x0a, 0x3d, - 0xec, 0x6d, 0x8f, 0xbb, 0x7f, 0xc1, 0x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, 0xff, - 0xff, 0xec, 0x4f, 0xa6, 0x29, 0xdf, 0x0a, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/rbac/v1/generated.proto", fileDescriptor_c8ba2e7dd472de66) +} + +var fileDescriptor_c8ba2e7dd472de66 = []byte{ + // 790 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0x4d, 0x6f, 0xd3, 0x4a, + 0x14, 0xcd, 0xa4, 0x89, 0x1a, 0x4f, 0x5e, 0x94, 0xd7, 0x79, 0xd5, 0x93, 0xd5, 0xf7, 0xe4, 0x54, + 0x46, 0x42, 0x95, 0x00, 0x9b, 0x16, 0x04, 0xdd, 0x74, 0x51, 0x17, 0x81, 0xaa, 0x96, 0x52, 0x4d, + 0x05, 0x0b, 0xc4, 0x82, 0x89, 0x33, 0x75, 0x87, 0xf8, 0x4b, 0x1e, 0x3b, 0x52, 0xc5, 0x06, 0x21, + 0xb1, 0x60, 0xc7, 0x12, 0x7e, 0x01, 0x1b, 0x58, 0xf2, 0x0b, 0xd8, 0x74, 0xd9, 0x65, 0x57, 0x11, + 0x35, 0x3f, 0x04, 0xe4, 0xaf, 0x38, 0x1f, 0x2e, 0xcd, 0x2a, 0x12, 0x62, 0x95, 0xcc, 0xbd, 0xe7, + 0x9e, 0x7b, 0xe6, 0xd8, 0xf7, 0x26, 0x50, 0xee, 0xae, 0x73, 0x85, 0x39, 0x2a, 0x71, 0x99, 0xea, + 0xb5, 0x89, 0xae, 0xf6, 0x56, 0x55, 0x83, 0xda, 0xd4, 0x23, 0x3e, 0xed, 0x28, 0xae, 0xe7, 0xf8, + 0x0e, 0x42, 0x09, 0x46, 0x21, 0x2e, 0x53, 0x22, 0x8c, 0xd2, 0x5b, 0x5d, 0xba, 0x61, 0x30, 0xff, + 0x28, 0x68, 0x2b, 0xba, 0x63, 0xa9, 0x86, 0x63, 0x38, 0x6a, 0x0c, 0x6d, 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, + 0xf4, 0xed, 0x19, 0xf0, 0x81, 0x0b, 0xf9, 0x86, 0xf5, 0x95, 0xa7, 0xd1, 0xf7, 0xeb, 0xee, 0x48, + 0x85, 0x42, 0xf4, 0xc9, 0x5d, 0xa2, 0x53, 0xb1, 0x12, 0xc3, 0x16, 0x52, 0x98, 0xb0, 0x97, 0x25, + 0x70, 0x8e, 0xd1, 0xd6, 0x4f, 0xce, 0xa5, 0xd2, 0xe9, 0xb9, 0x54, 0x3a, 0x3b, 0x97, 0x4a, 0xaf, + 0x42, 0x09, 0x9c, 0x84, 0x12, 0x38, 0x0d, 0x25, 0x70, 0x16, 0x4a, 0xe0, 0x5b, 0x28, 0x81, 0x77, + 0xdf, 0xa5, 0xd2, 0x53, 0x34, 0xf9, 0x8f, 0xf5, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x67, 0xff, + 0x5a, 0x4f, 0xc6, 0x0a, 0x00, 0x00, } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/rbac/v1/generated.proto b/vendor/k8s.io/api/rbac/v1/generated.proto index 13ff60ea718..62f5e558ba7 100644 --- a/vendor/k8s.io/api/rbac/v1/generated.proto +++ b/vendor/k8s.io/api/rbac/v1/generated.proto @@ -33,6 +33,7 @@ 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 + // +listType=atomic repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1; } @@ -44,6 +45,7 @@ message ClusterRole { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic repeated PolicyRule rules = 2; // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. @@ -62,6 +64,7 @@ message ClusterRoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can only reference a ClusterRole in the global namespace. @@ -94,25 +97,30 @@ message ClusterRoleList { // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic repeated string apiGroups = 2; // Resources is a list of resources this rule applies to. '*' represents all resources. // +optional + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic repeated string nonResourceURLs = 5; } @@ -124,6 +132,7 @@ message Role { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic repeated PolicyRule rules = 2; } @@ -137,6 +146,7 @@ message RoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. diff --git a/vendor/k8s.io/api/rbac/v1/types.go b/vendor/k8s.io/api/rbac/v1/types.go index ce845d69b42..8bef1ac462b 100644 --- a/vendor/k8s.io/api/rbac/v1/types.go +++ b/vendor/k8s.io/api/rbac/v1/types.go @@ -48,23 +48,28 @@ const ( // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"` // Resources is a list of resources this rule applies to. '*' represents all resources. // +optional + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,5,rep,name=nonResourceURLs"` } @@ -111,6 +116,7 @@ type Role struct { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` } @@ -128,6 +134,7 @@ type RoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. @@ -175,6 +182,7 @@ type ClusterRole struct { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic 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. @@ -189,6 +197,7 @@ 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 + // +listType=atomic ClusterRoleSelectors []metav1.LabelSelector `json:"clusterRoleSelectors,omitempty" protobuf:"bytes,1,rep,name=clusterRoleSelectors"` } @@ -206,6 +215,7 @@ type ClusterRoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can only reference a ClusterRole in the global namespace. diff --git a/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go b/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go index 5cce23ea124..ee3c7bfcc0c 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1alpha1/generated.proto +// source: k8s.io/api/rbac/v1alpha1/generated.proto package v1alpha1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AggregationRule) Reset() { *m = AggregationRule{} } func (*AggregationRule) ProtoMessage() {} func (*AggregationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{0} + return fileDescriptor_758889dfd9a88fa6, []int{0} } func (m *AggregationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_AggregationRule proto.InternalMessageInfo func (m *ClusterRole) Reset() { *m = ClusterRole{} } func (*ClusterRole) ProtoMessage() {} func (*ClusterRole) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{1} + return fileDescriptor_758889dfd9a88fa6, []int{1} } func (m *ClusterRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_ClusterRole proto.InternalMessageInfo func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } func (*ClusterRoleBinding) ProtoMessage() {} func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{2} + return fileDescriptor_758889dfd9a88fa6, []int{2} } func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_ClusterRoleBinding proto.InternalMessageInfo func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } func (*ClusterRoleBindingList) ProtoMessage() {} func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{3} + return fileDescriptor_758889dfd9a88fa6, []int{3} } func (m *ClusterRoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_ClusterRoleBindingList proto.InternalMessageInfo func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } func (*ClusterRoleList) ProtoMessage() {} func (*ClusterRoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{4} + return fileDescriptor_758889dfd9a88fa6, []int{4} } func (m *ClusterRoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ClusterRoleList proto.InternalMessageInfo func (m *PolicyRule) Reset() { *m = PolicyRule{} } func (*PolicyRule) ProtoMessage() {} func (*PolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{5} + return fileDescriptor_758889dfd9a88fa6, []int{5} } func (m *PolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_PolicyRule proto.InternalMessageInfo func (m *Role) Reset() { *m = Role{} } func (*Role) ProtoMessage() {} func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{6} + return fileDescriptor_758889dfd9a88fa6, []int{6} } func (m *Role) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_Role proto.InternalMessageInfo func (m *RoleBinding) Reset() { *m = RoleBinding{} } func (*RoleBinding) ProtoMessage() {} func (*RoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{7} + return fileDescriptor_758889dfd9a88fa6, []int{7} } func (m *RoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +271,7 @@ var xxx_messageInfo_RoleBinding proto.InternalMessageInfo func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } func (*RoleBindingList) ProtoMessage() {} func (*RoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{8} + return fileDescriptor_758889dfd9a88fa6, []int{8} } func (m *RoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +299,7 @@ var xxx_messageInfo_RoleBindingList proto.InternalMessageInfo func (m *RoleList) Reset() { *m = RoleList{} } func (*RoleList) ProtoMessage() {} func (*RoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{9} + return fileDescriptor_758889dfd9a88fa6, []int{9} } func (m *RoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +327,7 @@ var xxx_messageInfo_RoleList proto.InternalMessageInfo func (m *RoleRef) Reset() { *m = RoleRef{} } func (*RoleRef) ProtoMessage() {} func (*RoleRef) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{10} + return fileDescriptor_758889dfd9a88fa6, []int{10} } func (m *RoleRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +355,7 @@ var xxx_messageInfo_RoleRef proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_b59b0bd5e7cb9590, []int{11} + return fileDescriptor_758889dfd9a88fa6, []int{11} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -396,64 +396,63 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1alpha1/generated.proto", fileDescriptor_b59b0bd5e7cb9590) -} - -var fileDescriptor_b59b0bd5e7cb9590 = []byte{ - // 833 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xbf, 0x8f, 0xe3, 0x44, - 0x14, 0xce, 0x64, 0x13, 0x36, 0x99, 0x25, 0x0a, 0x37, 0x9c, 0x90, 0xb5, 0x42, 0xce, 0x62, 0x81, - 0x74, 0x88, 0xc3, 0x66, 0x17, 0x04, 0x34, 0x20, 0xc5, 0x57, 0xa0, 0x40, 0xd8, 0x5b, 0xe6, 0xc4, - 0x15, 0x88, 0x82, 0x89, 0x33, 0xe7, 0x0c, 0xb1, 0x3d, 0xd6, 0x8c, 0x1d, 0xe9, 0x44, 0x43, 0x43, - 0x8b, 0x68, 0x28, 0xe8, 0x69, 0x69, 0xa0, 0xe4, 0x1f, 0x58, 0xba, 0x2b, 0xb7, 0x8a, 0x58, 0xf3, - 0x87, 0x80, 0x3c, 0xb6, 0x63, 0xe7, 0x17, 0x49, 0x15, 0x09, 0x89, 0x2a, 0x99, 0xf7, 0xbe, 0xf7, - 0xbd, 0xf7, 0xbe, 0x99, 0xf7, 0x12, 0xd8, 0x9f, 0xbe, 0x2f, 0x4d, 0xc6, 0xad, 0x69, 0x3c, 0xa2, - 0x22, 0xa0, 0x11, 0x95, 0xd6, 0x8c, 0x06, 0x63, 0x2e, 0xac, 0xdc, 0x41, 0x42, 0x66, 0x89, 0x11, - 0x71, 0xac, 0xd9, 0x39, 0xf1, 0xc2, 0x09, 0x39, 0xb7, 0x5c, 0x1a, 0x50, 0x41, 0x22, 0x3a, 0x36, - 0x43, 0xc1, 0x23, 0x8e, 0xb4, 0x0c, 0x69, 0x92, 0x90, 0x99, 0x29, 0xd2, 0x2c, 0x90, 0xa7, 0x6f, - 0xba, 0x2c, 0x9a, 0xc4, 0x23, 0xd3, 0xe1, 0xbe, 0xe5, 0x72, 0x97, 0x5b, 0x2a, 0x60, 0x14, 0x3f, - 0x51, 0x27, 0x75, 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 0x18, 0xbf, 0x02, 0x78, 0x9c, 0xbf, 0xa7, 0x05, 0x1f, 0xd8, - 0xca, 0x77, 0x01, 0x21, 0x09, 0xd9, 0x63, 0x2a, 0x24, 0xe3, 0x41, 0x9e, 0x77, 0xf1, 0xd2, 0xfb, - 0x57, 0x83, 0xdc, 0x83, 0x2b, 0xa8, 0xdd, 0x35, 0x20, 0x0b, 0xb6, 0xd3, 0x4f, 0x19, 0x12, 0x87, - 0x6a, 0x0d, 0x05, 0xbb, 0x93, 0xc3, 0xda, 0x97, 0x85, 0x03, 0x97, 0x18, 0xfb, 0xc3, 0xeb, 0x5b, - 0xbd, 0xf6, 0xec, 0x56, 0xaf, 0xdd, 0xdc, 0xea, 0xb5, 0x6f, 0x13, 0x1d, 0x5c, 0x27, 0x3a, 0x78, - 0x96, 0xe8, 0xe0, 0x26, 0xd1, 0xc1, 0x9f, 0x89, 0x0e, 0x7e, 0xf8, 0x4b, 0xaf, 0x7d, 0xa1, 0x6d, - 0xfb, 0x17, 0xfc, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x0e, 0xba, 0xc2, 0x39, 0x0b, 0x00, - 0x00, + proto.RegisterFile("k8s.io/api/rbac/v1alpha1/generated.proto", fileDescriptor_758889dfd9a88fa6) +} + +var fileDescriptor_758889dfd9a88fa6 = []byte{ + // 819 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xce, 0xa4, 0x09, 0x4d, 0x26, 0x44, 0xa1, 0x43, 0x85, 0xac, 0x0a, 0x39, 0xc5, 0x02, 0xa9, + 0x88, 0x62, 0xd3, 0x82, 0x80, 0x0b, 0x48, 0x75, 0x0f, 0x28, 0x10, 0xda, 0x32, 0x15, 0x3d, 0x20, + 0x0e, 0x4c, 0x9c, 0xa9, 0x33, 0xc4, 0xbf, 0xe4, 0xb1, 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 0xaf, 0x60, 0xcb, 0x71, 0x9d, 0x0c, 0xf2, 0x23, 0xee, + 0x72, 0xe9, 0x0d, 0x11, 0x2a, 0x66, 0xf4, 0x6c, 0xda, 0x85, 0x67, 0xb1, 0xca, 0x23, 0x00, 0x2b, + 0xaf, 0xdc, 0x0e, 0x53, 0xfe, 0x2c, 0xc3, 0xc6, 0xeb, 0x95, 0x52, 0x58, 0x29, 0xf1, 0x18, 0x6e, + 0x76, 0x97, 0xac, 0x3f, 0x86, 0xab, 0x97, 0xc8, 0x7f, 0x00, 0xd6, 0x36, 0xb4, 0x3d, 0x4e, 0xa7, + 0xcb, 0x96, 0x57, 0x94, 0xbd, 0xb8, 0xde, 0xdf, 0x60, 0x76, 0x03, 0xe8, 0x10, 0xd6, 0xb2, 0x89, + 0x17, 0xd5, 0xd6, 0xf3, 0xec, 0xd9, 0x52, 0xc0, 0x13, 0x04, 0xda, 0x87, 0x95, 0x21, 0x73, 0xfa, + 0x52, 0x59, 0x20, 0xdf, 0x4c, 0x91, 0x95, 0xef, 0x98, 0xd3, 0xc7, 0xc2, 0x13, 0x23, 0x1c, 0x62, + 0x27, 0x3f, 0xc9, 0x05, 0x44, 0x3c, 0xeb, 0x58, 0x78, 0x94, 0xff, 0x01, 0xdc, 0x4e, 0xdf, 0xd3, + 0x84, 0x0f, 0x2c, 0xe5, 0x3b, 0x86, 0x90, 0x78, 0xec, 0x8a, 0xfa, 0x9c, 0xb9, 0x4e, 0x9a, 0x77, + 0xf2, 0xd2, 0x4f, 0x2e, 0x3a, 0xa9, 0x07, 0x17, 0x50, 0xab, 0x6b, 0x40, 0x1a, 0xac, 0xc7, 0x9f, + 0xdc, 0x23, 0x06, 0x95, 0x2a, 0x02, 0xb6, 0x93, 0xc2, 0xea, 0x67, 0x99, 0x03, 0xe7, 0x18, 0xfd, + 0xeb, 0xdb, 0x07, 0xb9, 0x74, 0xf7, 0x20, 0x97, 0xee, 0x1f, 0xe4, 0xd2, 0xef, 0x91, 0x0c, 0x6e, + 0x23, 0x19, 0xdc, 0x45, 0x32, 0xb8, 0x8f, 0x64, 0xf0, 0x34, 0x92, 0xc1, 0x5f, 0xcf, 0xe4, 0xd2, + 0x4f, 0xd2, 0xb2, 0x7f, 0xc1, 0x2f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x02, 0x55, 0xe5, 0x20, + 0x0b, 0x00, 0x00, } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/rbac/v1alpha1/generated.proto b/vendor/k8s.io/api/rbac/v1alpha1/generated.proto index d5ceaa0e824..170e008a568 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/rbac/v1alpha1/generated.proto @@ -33,6 +33,7 @@ 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 + // +listType=atomic repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1; } @@ -45,6 +46,7 @@ message ClusterRole { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic repeated PolicyRule rules = 2; // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. @@ -64,6 +66,7 @@ message ClusterRoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can only reference a ClusterRole in the global namespace. @@ -97,25 +100,30 @@ message ClusterRoleList { // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic repeated string apiGroups = 3; // Resources is a list of resources this rule applies to. '*' represents all resources. // +optional + // +listType=atomic 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 + // +listType=atomic 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 // 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 + // +listType=atomic repeated string nonResourceURLs = 6; } @@ -128,6 +136,7 @@ message Role { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic repeated PolicyRule rules = 2; } @@ -142,6 +151,7 @@ message RoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. diff --git a/vendor/k8s.io/api/rbac/v1alpha1/types.go b/vendor/k8s.io/api/rbac/v1alpha1/types.go index e0e75b1503b..9a0a2197749 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/types.go +++ b/vendor/k8s.io/api/rbac/v1alpha1/types.go @@ -48,23 +48,28 @@ const ( // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,3,rep,name=apiGroups"` // Resources is a list of resources this rule applies to. '*' represents all resources. // +optional + // +listType=atomic 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 + // +listType=atomic 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 // 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 + // +listType=atomic NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"` } @@ -111,6 +116,7 @@ type Role struct { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` } @@ -129,6 +135,7 @@ type RoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. @@ -178,6 +185,7 @@ type ClusterRole struct { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic 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. @@ -192,6 +200,7 @@ 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 + // +listType=atomic ClusterRoleSelectors []metav1.LabelSelector `json:"clusterRoleSelectors,omitempty" protobuf:"bytes,1,rep,name=clusterRoleSelectors"` } @@ -210,6 +219,7 @@ type ClusterRoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can only reference a ClusterRole in the global namespace. diff --git a/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go b/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go index ad6685591eb..9052d7e8dbb 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1beta1/generated.proto +// source: k8s.io/api/rbac/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AggregationRule) Reset() { *m = AggregationRule{} } func (*AggregationRule) ProtoMessage() {} func (*AggregationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{0} + return fileDescriptor_c5bc2d145acd4e45, []int{0} } func (m *AggregationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +75,7 @@ var xxx_messageInfo_AggregationRule proto.InternalMessageInfo func (m *ClusterRole) Reset() { *m = ClusterRole{} } func (*ClusterRole) ProtoMessage() {} func (*ClusterRole) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{1} + return fileDescriptor_c5bc2d145acd4e45, []int{1} } func (m *ClusterRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +103,7 @@ var xxx_messageInfo_ClusterRole proto.InternalMessageInfo func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } func (*ClusterRoleBinding) ProtoMessage() {} func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{2} + return fileDescriptor_c5bc2d145acd4e45, []int{2} } func (m *ClusterRoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ var xxx_messageInfo_ClusterRoleBinding proto.InternalMessageInfo func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } func (*ClusterRoleBindingList) ProtoMessage() {} func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{3} + return fileDescriptor_c5bc2d145acd4e45, []int{3} } func (m *ClusterRoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ var xxx_messageInfo_ClusterRoleBindingList proto.InternalMessageInfo func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } func (*ClusterRoleList) ProtoMessage() {} func (*ClusterRoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{4} + return fileDescriptor_c5bc2d145acd4e45, []int{4} } func (m *ClusterRoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +187,7 @@ var xxx_messageInfo_ClusterRoleList proto.InternalMessageInfo func (m *PolicyRule) Reset() { *m = PolicyRule{} } func (*PolicyRule) ProtoMessage() {} func (*PolicyRule) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{5} + return fileDescriptor_c5bc2d145acd4e45, []int{5} } func (m *PolicyRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ var xxx_messageInfo_PolicyRule proto.InternalMessageInfo func (m *Role) Reset() { *m = Role{} } func (*Role) ProtoMessage() {} func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{6} + return fileDescriptor_c5bc2d145acd4e45, []int{6} } func (m *Role) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +243,7 @@ var xxx_messageInfo_Role proto.InternalMessageInfo func (m *RoleBinding) Reset() { *m = RoleBinding{} } func (*RoleBinding) ProtoMessage() {} func (*RoleBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{7} + return fileDescriptor_c5bc2d145acd4e45, []int{7} } func (m *RoleBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -271,7 +271,7 @@ var xxx_messageInfo_RoleBinding proto.InternalMessageInfo func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } func (*RoleBindingList) ProtoMessage() {} func (*RoleBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{8} + return fileDescriptor_c5bc2d145acd4e45, []int{8} } func (m *RoleBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +299,7 @@ var xxx_messageInfo_RoleBindingList proto.InternalMessageInfo func (m *RoleList) Reset() { *m = RoleList{} } func (*RoleList) ProtoMessage() {} func (*RoleList) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{9} + return fileDescriptor_c5bc2d145acd4e45, []int{9} } func (m *RoleList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +327,7 @@ var xxx_messageInfo_RoleList proto.InternalMessageInfo func (m *RoleRef) Reset() { *m = RoleRef{} } func (*RoleRef) ProtoMessage() {} func (*RoleRef) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{10} + return fileDescriptor_c5bc2d145acd4e45, []int{10} } func (m *RoleRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +355,7 @@ var xxx_messageInfo_RoleRef proto.InternalMessageInfo func (m *Subject) Reset() { *m = Subject{} } func (*Subject) ProtoMessage() {} func (*Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_99f6bec96facc83d, []int{11} + return fileDescriptor_c5bc2d145acd4e45, []int{11} } func (m *Subject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -396,62 +396,61 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1beta1/generated.proto", fileDescriptor_99f6bec96facc83d) -} - -var fileDescriptor_99f6bec96facc83d = []byte{ - // 812 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xbd, 0x6f, 0x2b, 0x45, - 0x10, 0xf7, 0x3a, 0xb6, 0xe2, 0x5b, 0x63, 0x99, 0xb7, 0x3c, 0xf1, 0x4e, 0x11, 0x9c, 0x2d, 0x43, - 0x11, 0xe9, 0xc1, 0x1d, 0x79, 0x20, 0xa0, 0x89, 0x44, 0x8e, 0x02, 0xa2, 0x04, 0x13, 0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44, 0x03, 0xd3, 0x44, 0x03, 0xb7, 0x89, 0x06, 0xee, 0x12, - 0x0d, 0xfc, 0x9d, 0x68, 0xe0, 0x97, 0x7f, 0xb4, 0xda, 0x37, 0xcf, 0x2a, 0xfe, 0xf2, 0xfe, 0x17, - 0x00, 0x00, 0xff, 0xff, 0xf7, 0xdd, 0xcc, 0x2b, 0x25, 0x0b, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/rbac/v1beta1/generated.proto", fileDescriptor_c5bc2d145acd4e45) +} + +var fileDescriptor_c5bc2d145acd4e45 = []byte{ + // 800 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x3b, 0x6f, 0xe3, 0x46, + 0x10, 0xd6, 0xca, 0x12, 0x2c, 0xae, 0x22, 0x28, 0xde, 0x18, 0x31, 0x61, 0x24, 0x94, 0xa0, 0x04, + 0x88, 0x01, 0x27, 0x64, 0xec, 0x04, 0x49, 0x1a, 0x17, 0x66, 0x8a, 0xc4, 0xb0, 0xa3, 0x18, 0x6b, + 0x24, 0x45, 0x90, 0x22, 0x2b, 0x6a, 0x4d, 0x6f, 0xc4, 0x17, 0xb8, 0xa4, 0x00, 0x23, 0x4d, 0x9a, + 0xeb, 0xae, 0x38, 0xe0, 0xaa, 0x6b, 0xaf, 0xbe, 0xea, 0xca, 0xfb, 0x05, 0x2a, 0x5d, 0xba, 0x12, + 0xce, 0xbc, 0x1f, 0x72, 0x87, 0xe5, 0x43, 0xd4, 0x8b, 0xb6, 0x2a, 0x01, 0x07, 0x5c, 0x25, 0xed, + 0xcc, 0x37, 0xdf, 0xcc, 0x7c, 0xbb, 0x33, 0x12, 0xfc, 0x6a, 0xf0, 0x13, 0x57, 0x99, 0xab, 0x11, + 0x8f, 0x69, 0x7e, 0x8f, 0x18, 0xda, 0xf0, 0xa0, 0x47, 0x03, 0x72, 0xa0, 0x99, 0xd4, 0xa1, 0x3e, +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b, 0x07, 0x78, 0x82, 0x40, 0x6d, 0x58, 0x19, 0x30, 0xa7, 0x2f, 0x97, + 0x63, 0xe4, 0x47, 0x29, 0xb2, 0x72, 0xca, 0x9c, 0x3e, 0x8e, 0x3d, 0x02, 0xe1, 0x10, 0x3b, 0xf9, + 0x21, 0x9e, 0x42, 0x88, 0x31, 0xc7, 0xb1, 0x47, 0x68, 0xb5, 0x99, 0x3e, 0xa6, 0x09, 0x1f, 0x28, + 0xe4, 0x9b, 0xae, 0xaf, 0xbc, 0x4a, 0x7d, 0xf7, 0x67, 0x47, 0x1a, 0x94, 0xc4, 0x27, 0xf7, 0x88, + 0x41, 0xe5, 0x4a, 0x0c, 0xdb, 0x4a, 0x61, 0x52, 0x37, 0x73, 0xe0, 0x1c, 0xa3, 0x1f, 0x8d, 0xee, + 0x94, 0xd2, 0xcd, 0x9d, 0x52, 0xba, 0xbd, 0x53, 0x4a, 0xff, 0x47, 0x0a, 0x18, 0x45, 0x0a, 0xb8, + 0x89, 0x14, 0x70, 0x1b, 0x29, 0xe0, 0x75, 0xa4, 0x80, 0x27, 0x6f, 0x94, 0xd2, 0x5f, 0x3b, 0x05, + 0x7f, 0x79, 0xdf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x75, 0xfb, 0x5a, 0x79, 0x0c, 0x0b, 0x00, 0x00, } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/rbac/v1beta1/generated.proto b/vendor/k8s.io/api/rbac/v1beta1/generated.proto index f6b2f0dde1a..7dfc50d7eb6 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/generated.proto +++ b/vendor/k8s.io/api/rbac/v1beta1/generated.proto @@ -33,6 +33,7 @@ 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 + // +listType=atomic repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1; } @@ -45,6 +46,7 @@ message ClusterRole { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic repeated PolicyRule rules = 2; // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. @@ -64,6 +66,7 @@ message ClusterRoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can only reference a ClusterRole in the global namespace. @@ -97,26 +100,31 @@ message ClusterRoleList { // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic repeated string nonResourceURLs = 5; } @@ -129,6 +137,7 @@ message Role { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic repeated PolicyRule rules = 2; } @@ -143,6 +152,7 @@ message RoleBinding { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic repeated Subject subjects = 2; // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. diff --git a/vendor/k8s.io/api/rbac/v1beta1/types.go b/vendor/k8s.io/api/rbac/v1beta1/types.go index 4941cd2abce..f761f81a6f5 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/types.go +++ b/vendor/k8s.io/api/rbac/v1beta1/types.go @@ -48,24 +48,29 @@ const ( // 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 contained in this rule. '*' represents all verbs. + // +listType=atomic 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. "" represents the core API group and "*" represents all API groups. // +optional + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic 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 + // +listType=atomic NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,5,rep,name=nonResourceURLs"` } @@ -115,6 +120,7 @@ type Role struct { // Rules holds all the PolicyRules for this Role // +optional + // +listType=atomic Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` } @@ -137,6 +143,7 @@ type RoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. @@ -198,6 +205,7 @@ type ClusterRole struct { // Rules holds all the PolicyRules for this ClusterRole // +optional + // +listType=atomic 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 @@ -211,6 +219,7 @@ 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 + // +listType=atomic ClusterRoleSelectors []metav1.LabelSelector `json:"clusterRoleSelectors,omitempty" protobuf:"bytes,1,rep,name=clusterRoleSelectors"` } @@ -233,6 +242,7 @@ type ClusterRoleBinding struct { // Subjects holds references to the objects the role applies to. // +optional + // +listType=atomic Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can only reference a ClusterRole in the global namespace. diff --git a/vendor/k8s.io/api/resource/v1alpha2/generated.pb.go b/vendor/k8s.io/api/resource/v1alpha2/generated.pb.go index 2e8f9c724a5..6c6ba438e38 100644 --- a/vendor/k8s.io/api/resource/v1alpha2/generated.pb.go +++ b/vendor/k8s.io/api/resource/v1alpha2/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/resource/v1alpha2/generated.proto +// source: k8s.io/api/resource/v1alpha2/generated.proto package v1alpha2 @@ -26,6 +26,7 @@ import ( proto "github.com/gogo/protobuf/proto" v1 "k8s.io/api/core/v1" + resource "k8s.io/apimachinery/pkg/api/resource" math "math" math_bits "math/bits" @@ -49,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AllocationResult) Reset() { *m = AllocationResult{} } func (*AllocationResult) ProtoMessage() {} func (*AllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{0} + return fileDescriptor_4312f5b44a31ec02, []int{0} } func (m *AllocationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,10 +75,346 @@ func (m *AllocationResult) XXX_DiscardUnknown() { var xxx_messageInfo_AllocationResult proto.InternalMessageInfo +func (m *AllocationResultModel) Reset() { *m = AllocationResultModel{} } +func (*AllocationResultModel) ProtoMessage() {} +func (*AllocationResultModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{1} +} +func (m *AllocationResultModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllocationResultModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *AllocationResultModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllocationResultModel.Merge(m, src) +} +func (m *AllocationResultModel) XXX_Size() int { + return m.Size() +} +func (m *AllocationResultModel) XXX_DiscardUnknown() { + xxx_messageInfo_AllocationResultModel.DiscardUnknown(m) +} + +var xxx_messageInfo_AllocationResultModel proto.InternalMessageInfo + +func (m *DriverAllocationResult) Reset() { *m = DriverAllocationResult{} } +func (*DriverAllocationResult) ProtoMessage() {} +func (*DriverAllocationResult) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{2} +} +func (m *DriverAllocationResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DriverAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DriverAllocationResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_DriverAllocationResult.Merge(m, src) +} +func (m *DriverAllocationResult) XXX_Size() int { + return m.Size() +} +func (m *DriverAllocationResult) XXX_DiscardUnknown() { + xxx_messageInfo_DriverAllocationResult.DiscardUnknown(m) +} + +var xxx_messageInfo_DriverAllocationResult proto.InternalMessageInfo + +func (m *DriverRequests) Reset() { *m = DriverRequests{} } +func (*DriverRequests) ProtoMessage() {} +func (*DriverRequests) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{3} +} +func (m *DriverRequests) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DriverRequests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DriverRequests) XXX_Merge(src proto.Message) { + xxx_messageInfo_DriverRequests.Merge(m, src) +} +func (m *DriverRequests) XXX_Size() int { + return m.Size() +} +func (m *DriverRequests) XXX_DiscardUnknown() { + xxx_messageInfo_DriverRequests.DiscardUnknown(m) +} + +var xxx_messageInfo_DriverRequests proto.InternalMessageInfo + +func (m *NamedResourcesAllocationResult) Reset() { *m = NamedResourcesAllocationResult{} } +func (*NamedResourcesAllocationResult) ProtoMessage() {} +func (*NamedResourcesAllocationResult) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{4} +} +func (m *NamedResourcesAllocationResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesAllocationResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesAllocationResult.Merge(m, src) +} +func (m *NamedResourcesAllocationResult) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesAllocationResult) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesAllocationResult.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesAllocationResult proto.InternalMessageInfo + +func (m *NamedResourcesAttribute) Reset() { *m = NamedResourcesAttribute{} } +func (*NamedResourcesAttribute) ProtoMessage() {} +func (*NamedResourcesAttribute) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{5} +} +func (m *NamedResourcesAttribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesAttribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesAttribute.Merge(m, src) +} +func (m *NamedResourcesAttribute) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesAttribute) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesAttribute.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesAttribute proto.InternalMessageInfo + +func (m *NamedResourcesAttributeValue) Reset() { *m = NamedResourcesAttributeValue{} } +func (*NamedResourcesAttributeValue) ProtoMessage() {} +func (*NamedResourcesAttributeValue) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{6} +} +func (m *NamedResourcesAttributeValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesAttributeValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesAttributeValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesAttributeValue.Merge(m, src) +} +func (m *NamedResourcesAttributeValue) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesAttributeValue) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesAttributeValue.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesAttributeValue proto.InternalMessageInfo + +func (m *NamedResourcesFilter) Reset() { *m = NamedResourcesFilter{} } +func (*NamedResourcesFilter) ProtoMessage() {} +func (*NamedResourcesFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{7} +} +func (m *NamedResourcesFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesFilter.Merge(m, src) +} +func (m *NamedResourcesFilter) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesFilter) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesFilter proto.InternalMessageInfo + +func (m *NamedResourcesInstance) Reset() { *m = NamedResourcesInstance{} } +func (*NamedResourcesInstance) ProtoMessage() {} +func (*NamedResourcesInstance) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{8} +} +func (m *NamedResourcesInstance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesInstance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesInstance) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesInstance.Merge(m, src) +} +func (m *NamedResourcesInstance) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesInstance) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesInstance.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesInstance proto.InternalMessageInfo + +func (m *NamedResourcesIntSlice) Reset() { *m = NamedResourcesIntSlice{} } +func (*NamedResourcesIntSlice) ProtoMessage() {} +func (*NamedResourcesIntSlice) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{9} +} +func (m *NamedResourcesIntSlice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesIntSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesIntSlice) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesIntSlice.Merge(m, src) +} +func (m *NamedResourcesIntSlice) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesIntSlice) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesIntSlice.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesIntSlice proto.InternalMessageInfo + +func (m *NamedResourcesRequest) Reset() { *m = NamedResourcesRequest{} } +func (*NamedResourcesRequest) ProtoMessage() {} +func (*NamedResourcesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{10} +} +func (m *NamedResourcesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesRequest.Merge(m, src) +} +func (m *NamedResourcesRequest) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesRequest proto.InternalMessageInfo + +func (m *NamedResourcesResources) Reset() { *m = NamedResourcesResources{} } +func (*NamedResourcesResources) ProtoMessage() {} +func (*NamedResourcesResources) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{11} +} +func (m *NamedResourcesResources) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesResources) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesResources.Merge(m, src) +} +func (m *NamedResourcesResources) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesResources) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesResources.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesResources proto.InternalMessageInfo + +func (m *NamedResourcesStringSlice) Reset() { *m = NamedResourcesStringSlice{} } +func (*NamedResourcesStringSlice) ProtoMessage() {} +func (*NamedResourcesStringSlice) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{12} +} +func (m *NamedResourcesStringSlice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamedResourcesStringSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamedResourcesStringSlice) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamedResourcesStringSlice.Merge(m, src) +} +func (m *NamedResourcesStringSlice) XXX_Size() int { + return m.Size() +} +func (m *NamedResourcesStringSlice) XXX_DiscardUnknown() { + xxx_messageInfo_NamedResourcesStringSlice.DiscardUnknown(m) +} + +var xxx_messageInfo_NamedResourcesStringSlice proto.InternalMessageInfo + func (m *PodSchedulingContext) Reset() { *m = PodSchedulingContext{} } func (*PodSchedulingContext) ProtoMessage() {} func (*PodSchedulingContext) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{1} + return fileDescriptor_4312f5b44a31ec02, []int{13} } func (m *PodSchedulingContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +442,7 @@ var xxx_messageInfo_PodSchedulingContext proto.InternalMessageInfo func (m *PodSchedulingContextList) Reset() { *m = PodSchedulingContextList{} } func (*PodSchedulingContextList) ProtoMessage() {} func (*PodSchedulingContextList) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{2} + return fileDescriptor_4312f5b44a31ec02, []int{14} } func (m *PodSchedulingContextList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,7 +470,7 @@ var xxx_messageInfo_PodSchedulingContextList proto.InternalMessageInfo func (m *PodSchedulingContextSpec) Reset() { *m = PodSchedulingContextSpec{} } func (*PodSchedulingContextSpec) ProtoMessage() {} func (*PodSchedulingContextSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{3} + return fileDescriptor_4312f5b44a31ec02, []int{15} } func (m *PodSchedulingContextSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +498,7 @@ var xxx_messageInfo_PodSchedulingContextSpec proto.InternalMessageInfo func (m *PodSchedulingContextStatus) Reset() { *m = PodSchedulingContextStatus{} } func (*PodSchedulingContextStatus) ProtoMessage() {} func (*PodSchedulingContextStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{4} + return fileDescriptor_4312f5b44a31ec02, []int{16} } func (m *PodSchedulingContextStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +526,7 @@ var xxx_messageInfo_PodSchedulingContextStatus proto.InternalMessageInfo func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{5} + return fileDescriptor_4312f5b44a31ec02, []int{17} } func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +554,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } func (*ResourceClaimConsumerReference) ProtoMessage() {} func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{6} + return fileDescriptor_4312f5b44a31ec02, []int{18} } func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -245,7 +582,7 @@ var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } func (*ResourceClaimList) ProtoMessage() {} func (*ResourceClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{7} + return fileDescriptor_4312f5b44a31ec02, []int{19} } func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,10 +607,66 @@ func (m *ResourceClaimList) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo +func (m *ResourceClaimParameters) Reset() { *m = ResourceClaimParameters{} } +func (*ResourceClaimParameters) ProtoMessage() {} +func (*ResourceClaimParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{20} +} +func (m *ResourceClaimParameters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimParameters.Merge(m, src) +} +func (m *ResourceClaimParameters) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimParameters) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimParameters proto.InternalMessageInfo + +func (m *ResourceClaimParametersList) Reset() { *m = ResourceClaimParametersList{} } +func (*ResourceClaimParametersList) ProtoMessage() {} +func (*ResourceClaimParametersList) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{21} +} +func (m *ResourceClaimParametersList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimParametersList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimParametersList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimParametersList.Merge(m, src) +} +func (m *ResourceClaimParametersList) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimParametersList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimParametersList.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimParametersList proto.InternalMessageInfo + func (m *ResourceClaimParametersReference) Reset() { *m = ResourceClaimParametersReference{} } func (*ResourceClaimParametersReference) ProtoMessage() {} func (*ResourceClaimParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{8} + return fileDescriptor_4312f5b44a31ec02, []int{22} } func (m *ResourceClaimParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -301,7 +694,7 @@ var xxx_messageInfo_ResourceClaimParametersReference proto.InternalMessageInfo func (m *ResourceClaimSchedulingStatus) Reset() { *m = ResourceClaimSchedulingStatus{} } func (*ResourceClaimSchedulingStatus) ProtoMessage() {} func (*ResourceClaimSchedulingStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{9} + return fileDescriptor_4312f5b44a31ec02, []int{23} } func (m *ResourceClaimSchedulingStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -329,7 +722,7 @@ var xxx_messageInfo_ResourceClaimSchedulingStatus proto.InternalMessageInfo func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } func (*ResourceClaimSpec) ProtoMessage() {} func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{10} + return fileDescriptor_4312f5b44a31ec02, []int{24} } func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -357,7 +750,7 @@ var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } func (*ResourceClaimStatus) ProtoMessage() {} func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{11} + return fileDescriptor_4312f5b44a31ec02, []int{25} } func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -385,7 +778,7 @@ var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } func (*ResourceClaimTemplate) ProtoMessage() {} func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{12} + return fileDescriptor_4312f5b44a31ec02, []int{26} } func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -413,7 +806,7 @@ var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } func (*ResourceClaimTemplateList) ProtoMessage() {} func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{13} + return fileDescriptor_4312f5b44a31ec02, []int{27} } func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -441,7 +834,7 @@ var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } func (*ResourceClaimTemplateSpec) ProtoMessage() {} func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{14} + return fileDescriptor_4312f5b44a31ec02, []int{28} } func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -469,7 +862,7 @@ var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo func (m *ResourceClass) Reset() { *m = ResourceClass{} } func (*ResourceClass) ProtoMessage() {} func (*ResourceClass) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{15} + return fileDescriptor_4312f5b44a31ec02, []int{29} } func (m *ResourceClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -497,7 +890,7 @@ var xxx_messageInfo_ResourceClass proto.InternalMessageInfo func (m *ResourceClassList) Reset() { *m = ResourceClassList{} } func (*ResourceClassList) ProtoMessage() {} func (*ResourceClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{16} + return fileDescriptor_4312f5b44a31ec02, []int{30} } func (m *ResourceClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,15 +915,15 @@ func (m *ResourceClassList) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceClassList proto.InternalMessageInfo -func (m *ResourceClassParametersReference) Reset() { *m = ResourceClassParametersReference{} } -func (*ResourceClassParametersReference) ProtoMessage() {} -func (*ResourceClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{17} +func (m *ResourceClassParameters) Reset() { *m = ResourceClassParameters{} } +func (*ResourceClassParameters) ProtoMessage() {} +func (*ResourceClassParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{31} } -func (m *ResourceClassParametersReference) XXX_Unmarshal(b []byte) error { +func (m *ResourceClassParameters) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ResourceClassParametersReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ResourceClassParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -538,27 +931,27 @@ func (m *ResourceClassParametersReference) XXX_Marshal(b []byte, deterministic b } return b[:n], nil } -func (m *ResourceClassParametersReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClassParametersReference.Merge(m, src) +func (m *ResourceClassParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClassParameters.Merge(m, src) } -func (m *ResourceClassParametersReference) XXX_Size() int { +func (m *ResourceClassParameters) XXX_Size() int { return m.Size() } -func (m *ResourceClassParametersReference) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClassParametersReference.DiscardUnknown(m) +func (m *ResourceClassParameters) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClassParameters.DiscardUnknown(m) } -var xxx_messageInfo_ResourceClassParametersReference proto.InternalMessageInfo +var xxx_messageInfo_ResourceClassParameters proto.InternalMessageInfo -func (m *ResourceHandle) Reset() { *m = ResourceHandle{} } -func (*ResourceHandle) ProtoMessage() {} -func (*ResourceHandle) Descriptor() ([]byte, []int) { - return fileDescriptor_3add37bbd52889e0, []int{18} +func (m *ResourceClassParametersList) Reset() { *m = ResourceClassParametersList{} } +func (*ResourceClassParametersList) ProtoMessage() {} +func (*ResourceClassParametersList) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{32} } -func (m *ResourceHandle) XXX_Unmarshal(b []byte) error { +func (m *ResourceClassParametersList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ResourceHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ResourceClassParametersList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -566,28 +959,350 @@ func (m *ResourceHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro } return b[:n], nil } -func (m *ResourceHandle) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceHandle.Merge(m, src) +func (m *ResourceClassParametersList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClassParametersList.Merge(m, src) } -func (m *ResourceHandle) XXX_Size() int { +func (m *ResourceClassParametersList) XXX_Size() int { return m.Size() } -func (m *ResourceHandle) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceHandle.DiscardUnknown(m) +func (m *ResourceClassParametersList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClassParametersList.DiscardUnknown(m) } -var xxx_messageInfo_ResourceHandle proto.InternalMessageInfo +var xxx_messageInfo_ResourceClassParametersList proto.InternalMessageInfo -func init() { - proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha2.AllocationResult") - proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContext") - proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextList") - proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextSpec") - proto.RegisterType((*PodSchedulingContextStatus)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextStatus") - proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaim") - proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimConsumerReference") - proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimList") - proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersReference") +func (m *ResourceClassParametersReference) Reset() { *m = ResourceClassParametersReference{} } +func (*ResourceClassParametersReference) ProtoMessage() {} +func (*ResourceClassParametersReference) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{33} +} +func (m *ResourceClassParametersReference) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClassParametersReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClassParametersReference) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClassParametersReference.Merge(m, src) +} +func (m *ResourceClassParametersReference) XXX_Size() int { + return m.Size() +} +func (m *ResourceClassParametersReference) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClassParametersReference.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClassParametersReference proto.InternalMessageInfo + +func (m *ResourceFilter) Reset() { *m = ResourceFilter{} } +func (*ResourceFilter) ProtoMessage() {} +func (*ResourceFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{34} +} +func (m *ResourceFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceFilter.Merge(m, src) +} +func (m *ResourceFilter) XXX_Size() int { + return m.Size() +} +func (m *ResourceFilter) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceFilter proto.InternalMessageInfo + +func (m *ResourceFilterModel) Reset() { *m = ResourceFilterModel{} } +func (*ResourceFilterModel) ProtoMessage() {} +func (*ResourceFilterModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{35} +} +func (m *ResourceFilterModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceFilterModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceFilterModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceFilterModel.Merge(m, src) +} +func (m *ResourceFilterModel) XXX_Size() int { + return m.Size() +} +func (m *ResourceFilterModel) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceFilterModel.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceFilterModel proto.InternalMessageInfo + +func (m *ResourceHandle) Reset() { *m = ResourceHandle{} } +func (*ResourceHandle) ProtoMessage() {} +func (*ResourceHandle) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{36} +} +func (m *ResourceHandle) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceHandle) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceHandle.Merge(m, src) +} +func (m *ResourceHandle) XXX_Size() int { + return m.Size() +} +func (m *ResourceHandle) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceHandle.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceHandle proto.InternalMessageInfo + +func (m *ResourceModel) Reset() { *m = ResourceModel{} } +func (*ResourceModel) ProtoMessage() {} +func (*ResourceModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{37} +} +func (m *ResourceModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceModel.Merge(m, src) +} +func (m *ResourceModel) XXX_Size() int { + return m.Size() +} +func (m *ResourceModel) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceModel.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceModel proto.InternalMessageInfo + +func (m *ResourceRequest) Reset() { *m = ResourceRequest{} } +func (*ResourceRequest) ProtoMessage() {} +func (*ResourceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{38} +} +func (m *ResourceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceRequest.Merge(m, src) +} +func (m *ResourceRequest) XXX_Size() int { + return m.Size() +} +func (m *ResourceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceRequest proto.InternalMessageInfo + +func (m *ResourceRequestModel) Reset() { *m = ResourceRequestModel{} } +func (*ResourceRequestModel) ProtoMessage() {} +func (*ResourceRequestModel) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{39} +} +func (m *ResourceRequestModel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceRequestModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceRequestModel) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceRequestModel.Merge(m, src) +} +func (m *ResourceRequestModel) XXX_Size() int { + return m.Size() +} +func (m *ResourceRequestModel) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceRequestModel.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceRequestModel proto.InternalMessageInfo + +func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } +func (*ResourceSlice) ProtoMessage() {} +func (*ResourceSlice) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{40} +} +func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceSlice) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceSlice.Merge(m, src) +} +func (m *ResourceSlice) XXX_Size() int { + return m.Size() +} +func (m *ResourceSlice) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceSlice.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo + +func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } +func (*ResourceSliceList) ProtoMessage() {} +func (*ResourceSliceList) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{41} +} +func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceSliceList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceSliceList.Merge(m, src) +} +func (m *ResourceSliceList) XXX_Size() int { + return m.Size() +} +func (m *ResourceSliceList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceSliceList.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo + +func (m *StructuredResourceHandle) Reset() { *m = StructuredResourceHandle{} } +func (*StructuredResourceHandle) ProtoMessage() {} +func (*StructuredResourceHandle) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{42} +} +func (m *StructuredResourceHandle) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StructuredResourceHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *StructuredResourceHandle) XXX_Merge(src proto.Message) { + xxx_messageInfo_StructuredResourceHandle.Merge(m, src) +} +func (m *StructuredResourceHandle) XXX_Size() int { + return m.Size() +} +func (m *StructuredResourceHandle) XXX_DiscardUnknown() { + xxx_messageInfo_StructuredResourceHandle.DiscardUnknown(m) +} + +var xxx_messageInfo_StructuredResourceHandle proto.InternalMessageInfo + +func (m *VendorParameters) Reset() { *m = VendorParameters{} } +func (*VendorParameters) ProtoMessage() {} +func (*VendorParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_4312f5b44a31ec02, []int{43} +} +func (m *VendorParameters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VendorParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *VendorParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_VendorParameters.Merge(m, src) +} +func (m *VendorParameters) XXX_Size() int { + return m.Size() +} +func (m *VendorParameters) XXX_DiscardUnknown() { + xxx_messageInfo_VendorParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_VendorParameters proto.InternalMessageInfo + +func init() { + proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha2.AllocationResult") + proto.RegisterType((*AllocationResultModel)(nil), "k8s.io.api.resource.v1alpha2.AllocationResultModel") + proto.RegisterType((*DriverAllocationResult)(nil), "k8s.io.api.resource.v1alpha2.DriverAllocationResult") + proto.RegisterType((*DriverRequests)(nil), "k8s.io.api.resource.v1alpha2.DriverRequests") + proto.RegisterType((*NamedResourcesAllocationResult)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAllocationResult") + proto.RegisterType((*NamedResourcesAttribute)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAttribute") + proto.RegisterType((*NamedResourcesAttributeValue)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAttributeValue") + proto.RegisterType((*NamedResourcesFilter)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesFilter") + proto.RegisterType((*NamedResourcesInstance)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesInstance") + proto.RegisterType((*NamedResourcesIntSlice)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesIntSlice") + proto.RegisterType((*NamedResourcesRequest)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesRequest") + proto.RegisterType((*NamedResourcesResources)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesResources") + proto.RegisterType((*NamedResourcesStringSlice)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesStringSlice") + proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContext") + proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextList") + proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextSpec") + proto.RegisterType((*PodSchedulingContextStatus)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextStatus") + proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaim") + proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimConsumerReference") + proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimList") + proto.RegisterType((*ResourceClaimParameters)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParameters") + proto.RegisterType((*ResourceClaimParametersList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersList") + proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersReference") proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSchedulingStatus") proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSpec") proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimStatus") @@ -596,94 +1311,168 @@ func init() { proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplateSpec") proto.RegisterType((*ResourceClass)(nil), "k8s.io.api.resource.v1alpha2.ResourceClass") proto.RegisterType((*ResourceClassList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassList") + proto.RegisterType((*ResourceClassParameters)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParameters") + proto.RegisterType((*ResourceClassParametersList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParametersList") proto.RegisterType((*ResourceClassParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParametersReference") + proto.RegisterType((*ResourceFilter)(nil), "k8s.io.api.resource.v1alpha2.ResourceFilter") + proto.RegisterType((*ResourceFilterModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceFilterModel") proto.RegisterType((*ResourceHandle)(nil), "k8s.io.api.resource.v1alpha2.ResourceHandle") + proto.RegisterType((*ResourceModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceModel") + proto.RegisterType((*ResourceRequest)(nil), "k8s.io.api.resource.v1alpha2.ResourceRequest") + proto.RegisterType((*ResourceRequestModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceRequestModel") + proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1alpha2.ResourceSlice") + proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1alpha2.ResourceSliceList") + proto.RegisterType((*StructuredResourceHandle)(nil), "k8s.io.api.resource.v1alpha2.StructuredResourceHandle") + proto.RegisterType((*VendorParameters)(nil), "k8s.io.api.resource.v1alpha2.VendorParameters") } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/resource/v1alpha2/generated.proto", fileDescriptor_3add37bbd52889e0) -} - -var fileDescriptor_3add37bbd52889e0 = []byte{ - // 1233 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x6e, 0x95, 0x4c, 0x1a, 0x37, 0xd9, 0xb6, 0xe0, 0x46, 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 0xa0, 0xf4, 0xbf, 0xfc, 0xf6, 0xa0, 0xb4, 0xa4, 0x29, 0x7e, 0x91, 0xdf, 0x1e, 0x13, 0xf3, 0x3c, - 0xff, 0xb7, 0x07, 0xff, 0x94, 0xe6, 0x7f, 0x69, 0x48, 0xac, 0xf4, 0x0d, 0x99, 0x7d, 0x4a, 0xef, - 0xa5, 0x02, 0x3c, 0xc2, 0x68, 0xf7, 0x51, 0x5d, 0xfe, 0x0d, 0xe0, 0x58, 0x37, 0x5f, 0x0b, 0xd5, - 0x44, 0xe5, 0x0a, 0xae, 0xef, 0x10, 0x46, 0xb0, 0x90, 0x98, 0xe6, 0xe3, 0x67, 0xcd, 0x85, 0x27, - 0xcf, 0x9a, 0x0b, 0x4f, 0x9f, 0x35, 0x17, 0x1e, 0x0e, 0x9a, 0xca, 0xe3, 0x41, 0x53, 0x79, 0x32, - 0x68, 0x2a, 0x4f, 0x07, 0x4d, 0xe5, 0x8f, 0x41, 0x53, 0x79, 0xf4, 0x67, 0x73, 0xe1, 0xd3, 0x0b, - 0xd3, 0x7e, 0x31, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0x67, 0xe4, 0xf6, 0x18, 0x69, 0x12, 0x00, - 0x00, + proto.RegisterFile("k8s.io/api/resource/v1alpha2/generated.proto", fileDescriptor_4312f5b44a31ec02) +} + +var fileDescriptor_4312f5b44a31ec02 = []byte{ + // 2242 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x1a, 0x4d, 0x6c, 0x1c, 0x57, + 0xd9, 0xb3, 0xbb, 0x89, 0xd7, 0x9f, 0xed, 0xb5, 0x33, 0xb6, 0xe3, 0x4d, 0xea, 0xee, 0x6e, 0x47, + 0x20, 0x2c, 0x70, 0x76, 0x1b, 0xa7, 0x4d, 0xa3, 0x52, 0x90, 0x32, 0x71, 0x13, 0x2c, 0x9a, 0xd4, + 0x7d, 0x4b, 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xb7, 0xe5, 0x3f, 0x28, + 0x00, 0x00, } func (m *AllocationResult) Marshal() (dAtA []byte, err error) { @@ -743,7 +1532,7 @@ func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PodSchedulingContext) Marshal() (dAtA []byte, err error) { +func (m *AllocationResultModel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -753,28 +1542,53 @@ func (m *PodSchedulingContext) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PodSchedulingContext) MarshalTo(dAtA []byte) (int, error) { +func (m *AllocationResultModel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AllocationResultModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.NamedResources != nil { + { + size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x1a + return len(dAtA) - i, nil +} + +func (m *DriverAllocationResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DriverAllocationResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DriverAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.AllocationResultModel.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -784,7 +1598,7 @@ func (m *PodSchedulingContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.VendorRequestParameters.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -796,7 +1610,7 @@ func (m *PodSchedulingContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PodSchedulingContextList) Marshal() (dAtA []byte, err error) { +func (m *DriverRequests) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -806,20 +1620,20 @@ func (m *PodSchedulingContextList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PodSchedulingContextList) MarshalTo(dAtA []byte) (int, error) { +func (m *DriverRequests) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContextList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DriverRequests) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Requests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -827,11 +1641,11 @@ func (m *PodSchedulingContextList) MarshalToSizedBuffer(dAtA []byte) (int, error i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.VendorParameters.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -839,11 +1653,16 @@ func (m *PodSchedulingContextList) MarshalToSizedBuffer(dAtA []byte) (int, error i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x12 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *PodSchedulingContextSpec) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesAllocationResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -853,34 +1672,25 @@ func (m *PodSchedulingContextSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PodSchedulingContextSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesAllocationResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContextSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.PotentialNodes) > 0 { - for iNdEx := len(m.PotentialNodes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PotentialNodes[iNdEx]) - copy(dAtA[i:], m.PotentialNodes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.PotentialNodes[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.SelectedNode) - copy(dAtA[i:], m.SelectedNode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelectedNode))) + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *PodSchedulingContextStatus) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesAttribute) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -890,34 +1700,35 @@ func (m *PodSchedulingContextStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PodSchedulingContextStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesAttribute) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContextStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.ResourceClaims) > 0 { - for iNdEx := len(m.ResourceClaims) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceClaims[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + { + size, err := m.NamedResourcesAttributeValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaim) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesAttributeValue) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -927,50 +1738,85 @@ func (m *ResourceClaim) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaim) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesAttributeValue) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesAttributeValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.VersionValue != nil { + i -= len(*m.VersionValue) + copy(dAtA[i:], *m.VersionValue) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.VersionValue))) + i-- + dAtA[i] = 0x52 + } + if m.StringSliceValue != nil { + { + size, err := m.StringSliceValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.IntSliceValue != nil { + { + size, err := m.IntSliceValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.IntValue != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.IntValue)) + i-- + dAtA[i] = 0x38 + } + if m.QuantityValue != nil { + { + size, err := m.QuantityValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + if m.StringValue != nil { + i -= len(*m.StringValue) + copy(dAtA[i:], *m.StringValue) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.StringValue))) + i-- + dAtA[i] = 0x2a + } + if m.BoolValue != nil { + i-- + if *m.BoolValue { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesFilter) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -980,40 +1826,25 @@ func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimConsumerReference) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesFilter) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimConsumerReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i-- - dAtA[i] = 0x2a - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x22 - i -= len(m.Resource) - copy(dAtA[i:], m.Resource) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) - i-- - dAtA[i] = 0x1a - i -= len(m.APIGroup) - copy(dAtA[i:], m.APIGroup) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) + i -= len(m.Selector) + copy(dAtA[i:], m.Selector) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Selector))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesInstance) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1023,20 +1854,20 @@ func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimList) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesInstance) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesInstance) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1047,20 +1878,15 @@ func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimParametersReference) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesIntSlice) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1070,35 +1896,27 @@ func (m *ResourceClaimParametersReference) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimParametersReference) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesIntSlice) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimParametersReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesIntSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0x12 - i -= len(m.APIGroup) - copy(dAtA[i:], m.APIGroup) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) - i-- - dAtA[i] = 0xa + if len(m.Ints) > 0 { + for iNdEx := len(m.Ints) - 1; iNdEx >= 0; iNdEx-- { + i = encodeVarintGenerated(dAtA, i, uint64(m.Ints[iNdEx])) + i-- + dAtA[i] = 0x8 + } + } return len(dAtA) - i, nil } -func (m *ResourceClaimSchedulingStatus) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1108,34 +1926,25 @@ func (m *ResourceClaimSchedulingStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimSchedulingStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimSchedulingStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.UnsuitableNodes) > 0 { - for iNdEx := len(m.UnsuitableNodes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UnsuitableNodes[iNdEx]) - copy(dAtA[i:], m.UnsuitableNodes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UnsuitableNodes[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i -= len(m.Selector) + copy(dAtA[i:], m.Selector) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Selector))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesResources) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1145,42 +1954,34 @@ func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesResources) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.AllocationMode) - copy(dAtA[i:], m.AllocationMode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllocationMode))) - i-- - dAtA[i] = 0x1a - if m.ParametersRef != nil { - { - size, err := m.ParametersRef.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Instances) > 0 { + for iNdEx := len(m.Instances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Instances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x12 } - i -= len(m.ResourceClassName) - copy(dAtA[i:], m.ResourceClassName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceClassName))) - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) { +func (m *NamedResourcesStringSlice) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1190,59 +1991,29 @@ func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedResourcesStringSlice) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedResourcesStringSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i-- - if m.DeallocationRequested { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - if len(m.ReservedFor) > 0 { - for iNdEx := len(m.ReservedFor) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ReservedFor[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + if len(m.Strings) > 0 { + for iNdEx := len(m.Strings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Strings[iNdEx]) + copy(dAtA[i:], m.Strings[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strings[iNdEx]))) i-- - dAtA[i] = 0x1a - } - } - if m.Allocation != nil { - { - size, err := m.Allocation.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x12 } - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error) { +func (m *PodSchedulingContext) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1252,16 +2023,26 @@ func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimTemplate) MarshalTo(dAtA []byte) (int, error) { +func (m *PodSchedulingContext) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PodSchedulingContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1285,7 +2066,7 @@ func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error) { +func (m *PodSchedulingContextList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1295,12 +2076,12 @@ func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimTemplateList) MarshalTo(dAtA []byte) (int, error) { +func (m *PodSchedulingContextList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PodSchedulingContextList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1332,7 +2113,7 @@ func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error) { +func (m *PodSchedulingContextSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1342,16 +2123,100 @@ func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimTemplateSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *PodSchedulingContextSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PodSchedulingContextSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PotentialNodes) > 0 { + for iNdEx := len(m.PotentialNodes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PotentialNodes[iNdEx]) + copy(dAtA[i:], m.PotentialNodes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.PotentialNodes[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.SelectedNode) + copy(dAtA[i:], m.SelectedNode) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelectedNode))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PodSchedulingContextStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PodSchedulingContextStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PodSchedulingContextStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ResourceClaims) > 0 { + for iNdEx := len(m.ResourceClaims) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ResourceClaims[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ResourceClaim) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaim) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1375,7 +2240,7 @@ func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *ResourceClass) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1385,31 +2250,131 @@ func (m *ResourceClass) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClass) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimConsumerReference) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimConsumerReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.SuitableNodes != nil { - { - size, err := m.SuitableNodes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + i -= len(m.UID) + copy(dAtA[i:], m.UID) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i-- + dAtA[i] = 0x2a + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x22 + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0x1a + i -= len(m.APIGroup) + copy(dAtA[i:], m.APIGroup) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x22 } - if m.ParametersRef != nil { + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DriverRequests) > 0 { + for iNdEx := len(m.DriverRequests) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DriverRequests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + i-- + if m.Shareable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + if m.GeneratedFrom != nil { { - size, err := m.ParametersRef.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.GeneratedFrom.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1417,13 +2382,8 @@ func (m *ResourceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) - i-- - dAtA[i] = 0x12 { size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1437,7 +2397,7 @@ func (m *ResourceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClassList) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimParametersList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1447,12 +2407,12 @@ func (m *ResourceClassList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClassList) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimParametersList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimParametersList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1484,7 +2444,7 @@ func (m *ResourceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClassParametersReference) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimParametersReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1494,21 +2454,16 @@ func (m *ResourceClassParametersReference) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClassParametersReference) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimParametersReference) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClassParametersReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimParametersReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x22 i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) @@ -1527,7 +2482,7 @@ func (m *ResourceClassParametersReference) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *ResourceHandle) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimSchedulingStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1537,626 +2492,5457 @@ func (m *ResourceHandle) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceHandle) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimSchedulingStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceHandle) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimSchedulingStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + if len(m.UnsuitableNodes) > 0 { + for iNdEx := len(m.UnsuitableNodes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UnsuitableNodes[iNdEx]) + copy(dAtA[i:], m.UnsuitableNodes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UnsuitableNodes[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *AllocationResult) Size() (n int) { - if m == nil { - return 0 - } + +func (m *ResourceClaimSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.ResourceHandles) > 0 { - for _, e := range m.ResourceHandles { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + i -= len(m.AllocationMode) + copy(dAtA[i:], m.AllocationMode) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllocationMode))) + i-- + dAtA[i] = 0x1a + if m.ParametersRef != nil { + { + size, err := m.ParametersRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - if m.AvailableOnNodes != nil { - l = m.AvailableOnNodes.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 2 - return n + i -= len(m.ResourceClassName) + copy(dAtA[i:], m.ResourceClassName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceClassName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *PodSchedulingContext) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - 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 + return dAtA[:n], nil } -func (m *PodSchedulingContextList) Size() (n int) { - if m == nil { - return 0 - } - 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 *ResourceClaimStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContextSpec) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SelectedNode) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.PotentialNodes) > 0 { - for _, s := range m.PotentialNodes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) + i-- + if m.DeallocationRequested { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + if len(m.ReservedFor) > 0 { + for iNdEx := len(m.ReservedFor) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ReservedFor[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } } - return n + if m.Allocation != nil { + { + size, err := m.Allocation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *PodSchedulingContextStatus) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ResourceClaimTemplate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.ResourceClaims) > 0 { - for _, e := range m.ResourceClaims { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClaim) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - 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 + return dAtA[:n], nil } -func (m *ResourceClaimConsumerReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.APIGroup) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Resource) - 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 *ResourceClaimTemplateList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimList) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClaimParametersReference) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - 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 + return dAtA[:n], nil } -func (m *ResourceClaimSchedulingStatus) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClaimTemplateSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.UnsuitableNodes) > 0 { - for _, s := range m.UnsuitableNodes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClaimSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ResourceClassName) - n += 1 + l + sovGenerated(uint64(l)) - if m.ParametersRef != nil { - l = m.ParametersRef.Size() - n += 1 + l + sovGenerated(uint64(l)) +func (m *ResourceClass) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - l = len(m.AllocationMode) - n += 1 + l + sovGenerated(uint64(l)) - return n + return dAtA[:n], nil } -func (m *ResourceClaimStatus) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClass) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - if m.Allocation != nil { - l = m.Allocation.Size() - n += 1 + l + sovGenerated(uint64(l)) + if m.StructuredParameters != nil { + i-- + if *m.StructuredParameters { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 } - if len(m.ReservedFor) > 0 { - for _, e := range m.ReservedFor { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + if m.SuitableNodes != nil { + { + size, err := m.SuitableNodes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 } - n += 2 - return n + if m.ParametersRef != nil { + { + size, err := m.ParametersRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClaimTemplate) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClassList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - 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 + return dAtA[:n], nil } -func (m *ResourceClaimTemplateList) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClassList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClaimTemplateSpec) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClassParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - 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 + return dAtA[:n], nil } -func (m *ResourceClass) Size() (n int) { - if m == nil { - return 0 - } +func (m *ResourceClassParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClassParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - if m.ParametersRef != nil { - l = m.ParametersRef.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Filters) > 0 { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Filters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } } - if m.SuitableNodes != nil { - l = m.SuitableNodes.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.VendorParameters) > 0 { + for iNdEx := len(m.VendorParameters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.VendorParameters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } - return n + if m.GeneratedFrom != nil { + { + size, err := m.GeneratedFrom.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClassList) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClassParametersList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ResourceClassParametersList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClassParametersList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceClassParametersReference) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceClassParametersReference) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ResourceClassParametersReference) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClassParametersReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - return n + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x22 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + i -= len(m.Kind) + copy(dAtA[i:], m.Kind) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i-- + dAtA[i] = 0x12 + i -= len(m.APIGroup) + copy(dAtA[i:], m.APIGroup) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ResourceHandle) Size() (n int) { - if m == nil { - return 0 +func (m *ResourceFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ResourceFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Data) - n += 1 + l + sovGenerated(uint64(l)) - return n + { + size, err := m.ResourceFilterModel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 +func (m *ResourceFilterModel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + +func (m *ResourceFilterModel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (this *AllocationResult) String() string { - if this == nil { - return "nil" - } - repeatedStringForResourceHandles := "[]ResourceHandle{" - for _, f := range this.ResourceHandles { - repeatedStringForResourceHandles += strings.Replace(strings.Replace(f.String(), "ResourceHandle", "ResourceHandle", 1), `&`, ``, 1) + "," + +func (m *ResourceFilterModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NamedResources != nil { + { + size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - repeatedStringForResourceHandles += "}" - s := strings.Join([]string{`&AllocationResult{`, - `ResourceHandles:` + repeatedStringForResourceHandles + `,`, - `AvailableOnNodes:` + strings.Replace(fmt.Sprintf("%v", this.AvailableOnNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, - `Shareable:` + fmt.Sprintf("%v", this.Shareable) + `,`, - `}`, - }, "") - return s + return len(dAtA) - i, nil } -func (this *PodSchedulingContext) String() string { - if this == nil { - return "nil" + +func (m *ResourceHandle) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - s := strings.Join([]string{`&PodSchedulingContext{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSchedulingContextSpec", "PodSchedulingContextSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodSchedulingContextStatus", "PodSchedulingContextStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *PodSchedulingContextList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]PodSchedulingContext{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PodSchedulingContext", "PodSchedulingContext", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&PodSchedulingContextList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + +func (m *ResourceHandle) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (this *PodSchedulingContextSpec) String() string { - if this == nil { - return "nil" + +func (m *ResourceHandle) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.StructuredData != nil { + { + size, err := m.StructuredData.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } - s := strings.Join([]string{`&PodSchedulingContextSpec{`, - `SelectedNode:` + fmt.Sprintf("%v", this.SelectedNode) + `,`, - `PotentialNodes:` + fmt.Sprintf("%v", this.PotentialNodes) + `,`, - `}`, - }, "") - return s + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (this *PodSchedulingContextStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForResourceClaims := "[]ResourceClaimSchedulingStatus{" - for _, f := range this.ResourceClaims { - repeatedStringForResourceClaims += strings.Replace(strings.Replace(f.String(), "ResourceClaimSchedulingStatus", "ResourceClaimSchedulingStatus", 1), `&`, ``, 1) + "," + +func (m *ResourceModel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - repeatedStringForResourceClaims += "}" - s := strings.Join([]string{`&PodSchedulingContextStatus{`, - `ResourceClaims:` + repeatedStringForResourceClaims + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *ResourceClaim) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaim{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceClaimStatus", "ResourceClaimStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + +func (m *ResourceModel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (this *ResourceClaimConsumerReference) String() string { - if this == nil { - return "nil" + +func (m *ResourceModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NamedResources != nil { + { + size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - s := strings.Join([]string{`&ResourceClaimConsumerReference{`, - `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, - `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `}`, - }, "") - return s + return len(dAtA) - i, nil } -func (this *ResourceClaimList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ResourceClaim{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaim", "ResourceClaim", 1), `&`, ``, 1) + "," + +func (m *ResourceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceClaimList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *ResourceClaimParametersReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimParametersReference{`, - `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s + +func (m *ResourceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (this *ResourceClaimSchedulingStatus) String() string { - if this == nil { - return "nil" + +func (m *ResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ResourceRequestModel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - s := strings.Join([]string{`&ResourceClaimSchedulingStatus{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `UnsuitableNodes:` + fmt.Sprintf("%v", this.UnsuitableNodes) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimSpec) String() string { - if this == nil { - return "nil" + i-- + dAtA[i] = 0x12 + { + size, err := m.VendorParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - s := strings.Join([]string{`&ResourceClaimSpec{`, - `ResourceClassName:` + fmt.Sprintf("%v", this.ResourceClassName) + `,`, - `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClaimParametersReference", "ResourceClaimParametersReference", 1) + `,`, - `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`, - `}`, - }, "") - return s + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (this *ResourceClaimStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForReservedFor := "[]ResourceClaimConsumerReference{" - for _, f := range this.ReservedFor { - repeatedStringForReservedFor += strings.Replace(strings.Replace(f.String(), "ResourceClaimConsumerReference", "ResourceClaimConsumerReference", 1), `&`, ``, 1) + "," + +func (m *ResourceRequestModel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - repeatedStringForReservedFor += "}" - s := strings.Join([]string{`&ResourceClaimStatus{`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `Allocation:` + strings.Replace(this.Allocation.String(), "AllocationResult", "AllocationResult", 1) + `,`, - `ReservedFor:` + repeatedStringForReservedFor + `,`, - `DeallocationRequested:` + fmt.Sprintf("%v", this.DeallocationRequested) + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *ResourceClaimTemplate) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimTemplateSpec", "ResourceClaimTemplateSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + +func (m *ResourceRequestModel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (this *ResourceClaimTemplateList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ResourceClaimTemplate{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimTemplate", "ResourceClaimTemplate", 1), `&`, ``, 1) + "," + +func (m *ResourceRequestModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NamedResources != nil { + { + size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceClaimTemplateList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + return len(dAtA) - i, nil } -func (this *ResourceClaimTemplateSpec) String() string { - if this == nil { - return "nil" + +func (m *ResourceSlice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - s := strings.Join([]string{`&ResourceClaimTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *ResourceClass) String() string { - if this == nil { + +func (m *ResourceSlice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ResourceModel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0x1a + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceSliceList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceSliceList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StructuredResourceHandle) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StructuredResourceHandle) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StructuredResourceHandle) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x22 + { + size, err := m.VendorClaimParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.VendorClassParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *VendorParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VendorParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VendorParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AllocationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ResourceHandles) > 0 { + for _, e := range m.ResourceHandles { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.AvailableOnNodes != nil { + l = m.AvailableOnNodes.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 2 + return n +} + +func (m *AllocationResultModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NamedResources != nil { + l = m.NamedResources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *DriverAllocationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.VendorRequestParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.AllocationResultModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *DriverRequests) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.VendorParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Requests) > 0 { + for _, e := range m.Requests { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *NamedResourcesAllocationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *NamedResourcesAttribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = m.NamedResourcesAttributeValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *NamedResourcesAttributeValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BoolValue != nil { + n += 2 + } + if m.StringValue != nil { + l = len(*m.StringValue) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.QuantityValue != nil { + l = m.QuantityValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.IntValue != nil { + n += 1 + sovGenerated(uint64(*m.IntValue)) + } + if m.IntSliceValue != nil { + l = m.IntSliceValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.StringSliceValue != nil { + l = m.StringSliceValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.VersionValue != nil { + l = len(*m.VersionValue) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *NamedResourcesFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Selector) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *NamedResourcesInstance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *NamedResourcesIntSlice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Ints) > 0 { + for _, e := range m.Ints { + n += 1 + sovGenerated(uint64(e)) + } + } + return n +} + +func (m *NamedResourcesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Selector) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *NamedResourcesResources) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Instances) > 0 { + for _, e := range m.Instances { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *NamedResourcesStringSlice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Strings) > 0 { + for _, s := range m.Strings { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PodSchedulingContext) Size() (n int) { + if m == nil { + return 0 + } + 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 *PodSchedulingContextList) Size() (n int) { + if m == nil { + return 0 + } + 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 *PodSchedulingContextSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SelectedNode) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.PotentialNodes) > 0 { + for _, s := range m.PotentialNodes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PodSchedulingContextStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ResourceClaims) > 0 { + for _, e := range m.ResourceClaims { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ResourceClaim) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimConsumerReference) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.APIGroup) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Resource) + 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 *ResourceClaimList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.GeneratedFrom != nil { + l = m.GeneratedFrom.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 2 + if len(m.DriverRequests) > 0 { + for _, e := range m.DriverRequests { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ResourceClaimParametersList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimParametersReference) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimSchedulingStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.UnsuitableNodes) > 0 { + for _, s := range m.UnsuitableNodes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ResourceClaimSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ResourceClassName) + n += 1 + l + sovGenerated(uint64(l)) + if m.ParametersRef != nil { + l = m.ParametersRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.AllocationMode) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceClaimStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + if m.Allocation != nil { + l = m.Allocation.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.ReservedFor) > 0 { + for _, e := range m.ReservedFor { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + n += 2 + return n +} + +func (m *ResourceClaimTemplate) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimTemplateList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimTemplateSpec) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClass) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + if m.ParametersRef != nil { + l = m.ParametersRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.SuitableNodes != nil { + l = m.SuitableNodes.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.StructuredParameters != nil { + n += 2 + } + return n +} + +func (m *ResourceClassList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClassParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.GeneratedFrom != nil { + l = m.GeneratedFrom.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.VendorParameters) > 0 { + for _, e := range m.VendorParameters { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Filters) > 0 { + for _, e := range m.Filters { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ResourceClassParametersList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClassParametersReference) Size() (n int) { + if m == nil { + return 0 + } + 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)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.ResourceFilterModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceFilterModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NamedResources != nil { + l = m.NamedResources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ResourceHandle) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Data) + n += 1 + l + sovGenerated(uint64(l)) + if m.StructuredData != nil { + l = m.StructuredData.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ResourceModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NamedResources != nil { + l = m.NamedResources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ResourceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.VendorParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.ResourceRequestModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceRequestModel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NamedResources != nil { + l = m.NamedResources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ResourceSlice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.NodeName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.ResourceModel.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceSliceList) Size() (n int) { + if m == nil { + return 0 + } + 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 *StructuredResourceHandle) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.VendorClassParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.VendorClaimParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.NodeName) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *VendorParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DriverName) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Parameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *AllocationResult) String() string { + if this == nil { + return "nil" + } + repeatedStringForResourceHandles := "[]ResourceHandle{" + for _, f := range this.ResourceHandles { + repeatedStringForResourceHandles += strings.Replace(strings.Replace(f.String(), "ResourceHandle", "ResourceHandle", 1), `&`, ``, 1) + "," + } + repeatedStringForResourceHandles += "}" + s := strings.Join([]string{`&AllocationResult{`, + `ResourceHandles:` + repeatedStringForResourceHandles + `,`, + `AvailableOnNodes:` + strings.Replace(fmt.Sprintf("%v", this.AvailableOnNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, + `Shareable:` + fmt.Sprintf("%v", this.Shareable) + `,`, + `}`, + }, "") + return s +} +func (this *AllocationResultModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllocationResultModel{`, + `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesAllocationResult", "NamedResourcesAllocationResult", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DriverAllocationResult) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DriverAllocationResult{`, + `VendorRequestParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorRequestParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `AllocationResultModel:` + strings.Replace(strings.Replace(this.AllocationResultModel.String(), "AllocationResultModel", "AllocationResultModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DriverRequests) String() string { + if this == nil { + return "nil" + } + repeatedStringForRequests := "[]ResourceRequest{" + for _, f := range this.Requests { + repeatedStringForRequests += strings.Replace(strings.Replace(f.String(), "ResourceRequest", "ResourceRequest", 1), `&`, ``, 1) + "," + } + repeatedStringForRequests += "}" + s := strings.Join([]string{`&DriverRequests{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `VendorParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `Requests:` + repeatedStringForRequests + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesAllocationResult) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesAllocationResult{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesAttribute) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesAttribute{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `NamedResourcesAttributeValue:` + strings.Replace(strings.Replace(this.NamedResourcesAttributeValue.String(), "NamedResourcesAttributeValue", "NamedResourcesAttributeValue", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesAttributeValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesAttributeValue{`, + `BoolValue:` + valueToStringGenerated(this.BoolValue) + `,`, + `StringValue:` + valueToStringGenerated(this.StringValue) + `,`, + `QuantityValue:` + strings.Replace(fmt.Sprintf("%v", this.QuantityValue), "Quantity", "resource.Quantity", 1) + `,`, + `IntValue:` + valueToStringGenerated(this.IntValue) + `,`, + `IntSliceValue:` + strings.Replace(this.IntSliceValue.String(), "NamedResourcesIntSlice", "NamedResourcesIntSlice", 1) + `,`, + `StringSliceValue:` + strings.Replace(this.StringSliceValue.String(), "NamedResourcesStringSlice", "NamedResourcesStringSlice", 1) + `,`, + `VersionValue:` + valueToStringGenerated(this.VersionValue) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesFilter) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesFilter{`, + `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesInstance) String() string { + if this == nil { + return "nil" + } + repeatedStringForAttributes := "[]NamedResourcesAttribute{" + for _, f := range this.Attributes { + repeatedStringForAttributes += strings.Replace(strings.Replace(f.String(), "NamedResourcesAttribute", "NamedResourcesAttribute", 1), `&`, ``, 1) + "," + } + repeatedStringForAttributes += "}" + s := strings.Join([]string{`&NamedResourcesInstance{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Attributes:` + repeatedStringForAttributes + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesIntSlice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesIntSlice{`, + `Ints:` + fmt.Sprintf("%v", this.Ints) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesRequest{`, + `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesResources) String() string { + if this == nil { + return "nil" + } + repeatedStringForInstances := "[]NamedResourcesInstance{" + for _, f := range this.Instances { + repeatedStringForInstances += strings.Replace(strings.Replace(f.String(), "NamedResourcesInstance", "NamedResourcesInstance", 1), `&`, ``, 1) + "," + } + repeatedStringForInstances += "}" + s := strings.Join([]string{`&NamedResourcesResources{`, + `Instances:` + repeatedStringForInstances + `,`, + `}`, + }, "") + return s +} +func (this *NamedResourcesStringSlice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedResourcesStringSlice{`, + `Strings:` + fmt.Sprintf("%v", this.Strings) + `,`, + `}`, + }, "") + return s +} +func (this *PodSchedulingContext) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSchedulingContext{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSchedulingContextSpec", "PodSchedulingContextSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodSchedulingContextStatus", "PodSchedulingContextStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodSchedulingContextList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]PodSchedulingContext{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PodSchedulingContext", "PodSchedulingContext", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&PodSchedulingContextList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *PodSchedulingContextSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSchedulingContextSpec{`, + `SelectedNode:` + fmt.Sprintf("%v", this.SelectedNode) + `,`, + `PotentialNodes:` + fmt.Sprintf("%v", this.PotentialNodes) + `,`, + `}`, + }, "") + return s +} +func (this *PodSchedulingContextStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForResourceClaims := "[]ResourceClaimSchedulingStatus{" + for _, f := range this.ResourceClaims { + repeatedStringForResourceClaims += strings.Replace(strings.Replace(f.String(), "ResourceClaimSchedulingStatus", "ResourceClaimSchedulingStatus", 1), `&`, ``, 1) + "," + } + repeatedStringForResourceClaims += "}" + s := strings.Join([]string{`&PodSchedulingContextStatus{`, + `ResourceClaims:` + repeatedStringForResourceClaims + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaim) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaim{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceClaimStatus", "ResourceClaimStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimConsumerReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimConsumerReference{`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClaim{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaim", "ResourceClaim", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClaimList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimParameters) String() string { + if this == nil { + return "nil" + } + repeatedStringForDriverRequests := "[]DriverRequests{" + for _, f := range this.DriverRequests { + repeatedStringForDriverRequests += strings.Replace(strings.Replace(f.String(), "DriverRequests", "DriverRequests", 1), `&`, ``, 1) + "," + } + repeatedStringForDriverRequests += "}" + s := strings.Join([]string{`&ResourceClaimParameters{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `GeneratedFrom:` + strings.Replace(this.GeneratedFrom.String(), "ResourceClaimParametersReference", "ResourceClaimParametersReference", 1) + `,`, + `Shareable:` + fmt.Sprintf("%v", this.Shareable) + `,`, + `DriverRequests:` + repeatedStringForDriverRequests + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimParametersList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClaimParameters{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimParameters", "ResourceClaimParameters", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClaimParametersList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimParametersReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimParametersReference{`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimSchedulingStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimSchedulingStatus{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UnsuitableNodes:` + fmt.Sprintf("%v", this.UnsuitableNodes) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimSpec{`, + `ResourceClassName:` + fmt.Sprintf("%v", this.ResourceClassName) + `,`, + `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClaimParametersReference", "ResourceClaimParametersReference", 1) + `,`, + `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForReservedFor := "[]ResourceClaimConsumerReference{" + for _, f := range this.ReservedFor { + repeatedStringForReservedFor += strings.Replace(strings.Replace(f.String(), "ResourceClaimConsumerReference", "ResourceClaimConsumerReference", 1), `&`, ``, 1) + "," + } + repeatedStringForReservedFor += "}" + s := strings.Join([]string{`&ResourceClaimStatus{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `Allocation:` + strings.Replace(this.Allocation.String(), "AllocationResult", "AllocationResult", 1) + `,`, + `ReservedFor:` + repeatedStringForReservedFor + `,`, + `DeallocationRequested:` + fmt.Sprintf("%v", this.DeallocationRequested) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimTemplate) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimTemplate{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimTemplateSpec", "ResourceClaimTemplateSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimTemplateList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClaimTemplate{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimTemplate", "ResourceClaimTemplate", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClaimTemplateList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimTemplateSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimTemplateSpec{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClass) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClass{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClassParametersReference", "ResourceClassParametersReference", 1) + `,`, + `SuitableNodes:` + strings.Replace(fmt.Sprintf("%v", this.SuitableNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, + `StructuredParameters:` + valueToStringGenerated(this.StructuredParameters) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClassList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClass{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClass", "ResourceClass", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClassList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClassParameters) String() string { + if this == nil { + return "nil" + } + repeatedStringForVendorParameters := "[]VendorParameters{" + for _, f := range this.VendorParameters { + repeatedStringForVendorParameters += strings.Replace(strings.Replace(f.String(), "VendorParameters", "VendorParameters", 1), `&`, ``, 1) + "," + } + repeatedStringForVendorParameters += "}" + repeatedStringForFilters := "[]ResourceFilter{" + for _, f := range this.Filters { + repeatedStringForFilters += strings.Replace(strings.Replace(f.String(), "ResourceFilter", "ResourceFilter", 1), `&`, ``, 1) + "," + } + repeatedStringForFilters += "}" + s := strings.Join([]string{`&ResourceClassParameters{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `GeneratedFrom:` + strings.Replace(this.GeneratedFrom.String(), "ResourceClassParametersReference", "ResourceClassParametersReference", 1) + `,`, + `VendorParameters:` + repeatedStringForVendorParameters + `,`, + `Filters:` + repeatedStringForFilters + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClassParametersList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClassParameters{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClassParameters", "ResourceClassParameters", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClassParametersList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClassParametersReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClassParametersReference{`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceFilter) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceFilter{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `ResourceFilterModel:` + strings.Replace(strings.Replace(this.ResourceFilterModel.String(), "ResourceFilterModel", "ResourceFilterModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceFilterModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceFilterModel{`, + `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesFilter", "NamedResourcesFilter", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceHandle) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceHandle{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `StructuredData:` + strings.Replace(this.StructuredData.String(), "StructuredResourceHandle", "StructuredResourceHandle", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceModel{`, + `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesResources", "NamedResourcesResources", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceRequest{`, + `VendorParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `ResourceRequestModel:` + strings.Replace(strings.Replace(this.ResourceRequestModel.String(), "ResourceRequestModel", "ResourceRequestModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceRequestModel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceRequestModel{`, + `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesRequest", "NamedResourcesRequest", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceSlice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceSlice{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `ResourceModel:` + strings.Replace(strings.Replace(this.ResourceModel.String(), "ResourceModel", "ResourceModel", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceSliceList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceSlice{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceSlice", "ResourceSlice", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceSliceList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *StructuredResourceHandle) String() string { + if this == nil { + return "nil" + } + repeatedStringForResults := "[]DriverAllocationResult{" + for _, f := range this.Results { + repeatedStringForResults += strings.Replace(strings.Replace(f.String(), "DriverAllocationResult", "DriverAllocationResult", 1), `&`, ``, 1) + "," + } + repeatedStringForResults += "}" + s := strings.Join([]string{`&StructuredResourceHandle{`, + `VendorClassParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorClassParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `VendorClaimParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorClaimParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, + `Results:` + repeatedStringForResults + `,`, + `}`, + }, "") + return s +} +func (this *VendorParameters) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VendorParameters{`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { return "nil" } - s := strings.Join([]string{`&ResourceClass{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClassParametersReference", "ResourceClassParametersReference", 1) + `,`, - `SuitableNodes:` + strings.Replace(fmt.Sprintf("%v", this.SuitableNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, - `}`, - }, "") - return s + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *AllocationResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceHandles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceHandles = append(m.ResourceHandles, ResourceHandle{}) + if err := m.ResourceHandles[len(m.ResourceHandles)-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 AvailableOnNodes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AvailableOnNodes == nil { + m.AvailableOnNodes = &v1.NodeSelector{} + } + if err := m.AvailableOnNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Shareable", 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.Shareable = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllocationResultModel) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllocationResultModel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllocationResultModel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NamedResources == nil { + m.NamedResources = &NamedResourcesAllocationResult{} + } + if err := m.NamedResources.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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DriverAllocationResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DriverAllocationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DriverAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VendorRequestParameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VendorRequestParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocationResultModel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AllocationResultModel.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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DriverRequests) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DriverRequests: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DriverRequests: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VendorParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Requests = append(m.Requests, ResourceRequest{}) + if err := m.Requests[len(m.Requests)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesAllocationResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesAllocationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesAllocationResult: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesAttribute) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesAttribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesAttribute: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 NamedResourcesAttributeValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NamedResourcesAttributeValue.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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesAttributeValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesAttributeValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesAttributeValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", 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.BoolValue = &b + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.StringValue = &s + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QuantityValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.QuantityValue == nil { + m.QuantityValue = &resource.Quantity{} + } + if err := m.QuantityValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IntValue", 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.IntValue = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IntSliceValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.IntSliceValue == nil { + m.IntSliceValue = &NamedResourcesIntSlice{} + } + if err := m.IntSliceValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringSliceValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringSliceValue == nil { + m.StringSliceValue = &NamedResourcesStringSlice{} + } + if err := m.StringSliceValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.VersionValue = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesFilter: 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 stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesInstance) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesInstance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesInstance: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, NamedResourcesAttribute{}) + if err := m.Attributes[len(m.Attributes)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesIntSlice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesIntSlice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesIntSlice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + 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.Ints = append(m.Ints, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Ints) == 0 { + m.Ints = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + 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.Ints = append(m.Ints, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Ints", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesRequest: 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 stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesResources) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Instances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Instances = append(m.Instances, NamedResourcesInstance{}) + if err := m.Instances[len(m.Instances)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamedResourcesStringSlice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamedResourcesStringSlice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamedResourcesStringSlice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Strings = append(m.Strings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSchedulingContext: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSchedulingContext: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSchedulingContextList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSchedulingContextList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, PodSchedulingContext{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSchedulingContextSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSchedulingContextSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelectedNode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelectedNode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PotentialNodes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PotentialNodes = append(m.PotentialNodes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSchedulingContextStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSchedulingContextStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceClaims", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceClaims = append(m.ResourceClaims, ResourceClaimSchedulingStatus{}) + if err := m.ResourceClaims[len(m.ResourceClaims)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaim) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaim: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaim: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimConsumerReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimConsumerReference: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ResourceClaim{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimParameters) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimParameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimParameters: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 GeneratedFrom", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GeneratedFrom == nil { + m.GeneratedFrom = &ResourceClaimParametersReference{} + } + if err := m.GeneratedFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Shareable", 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.Shareable = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverRequests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverRequests = append(m.DriverRequests, DriverRequests{}) + if err := m.DriverRequests[len(m.DriverRequests)-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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimParametersList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimParametersList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimParametersList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ResourceClaimParameters{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (this *ResourceClassList) String() string { - if this == nil { - return "nil" +func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimParametersReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimParametersReference: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - repeatedStringForItems := "[]ResourceClass{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClass", "ResourceClass", 1), `&`, ``, 1) + "," + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimSchedulingStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimSchedulingStatus: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 UnsuitableNodes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnsuitableNodes = append(m.UnsuitableNodes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceClassList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClassParametersReference) String() string { - if this == nil { - return "nil" + + if iNdEx > l { + return io.ErrUnexpectedEOF } - s := strings.Join([]string{`&ResourceClassParametersReference{`, - `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `}`, - }, "") - return s + return nil } -func (this *ResourceHandle) String() string { - if this == nil { - return "nil" +func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceClassName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceClassName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParametersRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ParametersRef == nil { + m.ParametersRef = &ResourceClaimParametersReference{} + } + if err := m.ParametersRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllocationMode = AllocationMode(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - s := strings.Join([]string{`&ResourceHandle{`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } -func (m *AllocationResult) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2175,19 +7961,51 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { if b < 0x80 { break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceHandles", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Allocation", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2214,14 +8032,16 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceHandles = append(m.ResourceHandles, ResourceHandle{}) - if err := m.ResourceHandles[len(m.ResourceHandles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Allocation == nil { + m.Allocation = &AllocationResult{} + } + if err := m.Allocation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AvailableOnNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ReservedFor", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2248,16 +8068,14 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.AvailableOnNodes == nil { - m.AvailableOnNodes = &v1.NodeSelector{} - } - if err := m.AvailableOnNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ReservedFor = append(m.ReservedFor, ResourceClaimConsumerReference{}) + if err := m.ReservedFor[len(m.ReservedFor)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Shareable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeallocationRequested", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -2274,7 +8092,7 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { break } } - m.Shareable = bool(v != 0) + m.DeallocationRequested = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2296,7 +8114,7 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2319,10 +8137,10 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContext: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimTemplate: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContext: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimTemplate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2391,39 +8209,6 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { 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 < 0 { - return ErrInvalidLengthGenerated - } - 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:]) @@ -2445,7 +8230,7 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2468,10 +8253,10 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextList: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimTemplateList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimTemplateList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2536,7 +8321,7 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, PodSchedulingContext{}) + m.Items = append(m.Items, ResourceClaimTemplate{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2562,7 +8347,7 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2585,17 +8370,17 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextSpec: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimTemplateSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SelectedNode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2605,29 +8390,30 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.SelectedNode = string(dAtA[iNdEx:postIndex]) + 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 PotentialNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2637,23 +8423,24 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.PotentialNodes = append(m.PotentialNodes, string(dAtA[iNdEx:postIndex])) + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -2676,7 +8463,7 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { +func (m *ResourceClass) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2699,15 +8486,15 @@ func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextStatus: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClass: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClass: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceClaims", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2734,11 +8521,135 @@ func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceClaims = append(m.ResourceClaims, ResourceClaimSchedulingStatus{}) - if err := m.ResourceClaims[len(m.ResourceClaims)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + 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 DriverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParametersRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ParametersRef == nil { + m.ParametersRef = &ResourceClassParametersReference{} + } + if err := m.ParametersRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SuitableNodes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SuitableNodes == nil { + m.SuitableNodes = &v1.NodeSelector{} + } + if err := m.SuitableNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - iNdEx = postIndex + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StructuredParameters", 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.StructuredParameters = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2760,7 +8671,7 @@ func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaim) Unmarshal(dAtA []byte) error { +func (m *ResourceClassList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2783,15 +8694,15 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaim: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClassList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaim: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClassList: 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) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2818,46 +8729,13 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + 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 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 < 0 { - return ErrInvalidLengthGenerated - } - 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) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2884,7 +8762,8 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, ResourceClass{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2909,7 +8788,7 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { +func (m *ResourceClassParameters) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2932,17 +8811,17 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimConsumerReference: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClassParameters: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimConsumerReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClassParameters: 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) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2952,29 +8831,30 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.APIGroup = string(dAtA[iNdEx:postIndex]) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GeneratedFrom", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2984,29 +8864,33 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Resource = string(dAtA[iNdEx:postIndex]) + if m.GeneratedFrom == nil { + m.GeneratedFrom = &ResourceClassParametersReference{} + } + if err := m.GeneratedFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3016,29 +8900,31 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.VendorParameters = append(m.VendorParameters, VendorParameters{}) + if err := m.VendorParameters[len(m.VendorParameters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 5: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3048,23 +8934,25 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + m.Filters = append(m.Filters, ResourceFilter{}) + if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3087,7 +8975,7 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { +func (m *ResourceClassParametersList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3110,10 +8998,10 @@ func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimList: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClassParametersList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClassParametersList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3178,7 +9066,7 @@ func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ResourceClaim{}) + m.Items = append(m.Items, ResourceClassParameters{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3204,7 +9092,7 @@ func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { +func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3227,10 +9115,10 @@ func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimParametersReference: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClassParametersReference: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimParametersReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClassParametersReference: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3329,6 +9217,38 @@ func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { } 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3350,7 +9270,7 @@ func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { +func (m *ResourceFilter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3373,15 +9293,15 @@ func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimSchedulingStatus: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimSchedulingStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceFilter: 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) + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3409,13 +9329,13 @@ func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.DriverName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnsuitableNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceFilterModel", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3425,23 +9345,24 @@ func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.UnsuitableNodes = append(m.UnsuitableNodes, string(dAtA[iNdEx:postIndex])) + if err := m.ResourceFilterModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3464,7 +9385,7 @@ func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { +func (m *ResourceFilterModel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3479,93 +9400,25 @@ func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceClassName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceClassName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParametersRef", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParametersRef == nil { - m.ParametersRef = &ResourceClaimParametersReference{} - } - if err := m.ParametersRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 3: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceFilterModel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceFilterModel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3575,23 +9428,27 @@ func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.AllocationMode = AllocationMode(dAtA[iNdEx:postIndex]) + if m.NamedResources == nil { + m.NamedResources = &NamedResourcesFilter{} + } + if err := m.NamedResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3614,7 +9471,7 @@ func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { +func (m *ResourceHandle) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3637,10 +9494,10 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimStatus: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceHandle: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceHandle: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3677,9 +9534,9 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Allocation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3689,31 +9546,27 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Allocation == nil { - m.Allocation = &AllocationResult{} - } - if err := m.Allocation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Data = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReservedFor", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StructuredData", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3740,31 +9593,13 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ReservedFor = append(m.ReservedFor, ResourceClaimConsumerReference{}) - if err := m.ReservedFor[len(m.ReservedFor)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.StructuredData == nil { + m.StructuredData = &StructuredResourceHandle{} + } + if err := m.StructuredData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeallocationRequested", 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.DeallocationRequested = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3786,7 +9621,7 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { +func (m *ResourceModel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3809,15 +9644,15 @@ func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimTemplate: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceModel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimTemplate: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceModel: 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) + return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3844,40 +9679,10 @@ func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + if m.NamedResources == nil { + m.NamedResources = &NamedResourcesResources{} } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.NamedResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3902,7 +9707,7 @@ func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { +func (m *ResourceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3925,15 +9730,15 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimTemplateList: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimTemplateList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceRequest: 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) + return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3960,13 +9765,13 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.VendorParameters.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) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceRequestModel", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3993,8 +9798,7 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ResourceClaimTemplate{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ResourceRequestModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4019,7 +9823,7 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { +func (m *ResourceRequestModel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4042,15 +9846,15 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimTemplateSpec: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceRequestModel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceRequestModel: 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) + return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4077,40 +9881,10 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + if m.NamedResources == nil { + m.NamedResources = &NamedResourcesRequest{} } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.NamedResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4135,7 +9909,7 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClass) Unmarshal(dAtA []byte) error { +func (m *ResourceSlice) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4158,10 +9932,10 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClass: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceSlice: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClass: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceSlice: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4199,7 +9973,7 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4227,13 +10001,13 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DriverName = string(dAtA[iNdEx:postIndex]) + m.NodeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParametersRef", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4243,31 +10017,27 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.ParametersRef == nil { - m.ParametersRef = &ResourceClassParametersReference{} - } - if err := m.ParametersRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.DriverName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuitableNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceModel", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4294,10 +10064,7 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SuitableNodes == nil { - m.SuitableNodes = &v1.NodeSelector{} - } - if err := m.SuitableNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ResourceModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4322,7 +10089,7 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClassList) Unmarshal(dAtA []byte) error { +func (m *ResourceSliceList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4345,10 +10112,10 @@ func (m *ResourceClassList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClassList: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceSliceList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClassList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceSliceList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4413,7 +10180,7 @@ func (m *ResourceClassList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ResourceClass{}) + m.Items = append(m.Items, ResourceSlice{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4439,7 +10206,7 @@ func (m *ResourceClassList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { +func (m *StructuredResourceHandle) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4462,17 +10229,17 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClassParametersReference: wiretype end group for non-group") + return fmt.Errorf("proto: StructuredResourceHandle: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClassParametersReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StructuredResourceHandle: 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) + return fmt.Errorf("proto: wrong wireType = %d for field VendorClassParameters", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4482,29 +10249,30 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.APIGroup = string(dAtA[iNdEx:postIndex]) + if err := m.VendorClassParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VendorClaimParameters", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4514,27 +10282,28 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Kind = string(dAtA[iNdEx:postIndex]) + if err := m.VendorClaimParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4562,13 +10331,13 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.NodeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4578,23 +10347,25 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.Results = append(m.Results, DriverAllocationResult{}) + if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -4617,7 +10388,7 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceHandle) Unmarshal(dAtA []byte) error { +func (m *VendorParameters) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4640,10 +10411,10 @@ func (m *ResourceHandle) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceHandle: wiretype end group for non-group") + return fmt.Errorf("proto: VendorParameters: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceHandle: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VendorParameters: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4680,9 +10451,9 @@ func (m *ResourceHandle) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4692,23 +10463,24 @@ func (m *ResourceHandle) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = string(dAtA[iNdEx:postIndex]) + if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/vendor/k8s.io/api/resource/v1alpha2/generated.proto b/vendor/k8s.io/api/resource/v1alpha2/generated.proto index f7748f9a1a2..4a6a5bab6c5 100644 --- a/vendor/k8s.io/api/resource/v1alpha2/generated.proto +++ b/vendor/k8s.io/api/resource/v1alpha2/generated.proto @@ -22,6 +22,7 @@ syntax = "proto2"; package k8s.io.api.resource.v1alpha2; 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"; @@ -63,6 +64,150 @@ message AllocationResult { optional bool shareable = 3; } +// AllocationResultModel must have one and only one field set. +message AllocationResultModel { + // NamedResources describes the allocation result when using the named resources model. + // + // +optional + optional NamedResourcesAllocationResult namedResources = 1; +} + +// DriverAllocationResult contains vendor parameters and the allocation result for +// one request. +message DriverAllocationResult { + // VendorRequestParameters are the per-request configuration parameters + // from the time that the claim was allocated. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorRequestParameters = 1; + + optional AllocationResultModel allocationResultModel = 2; +} + +// DriverRequests describes all resources that are needed from one particular driver. +message DriverRequests { + // DriverName is the name used by the DRA driver kubelet plugin. + optional string driverName = 1; + + // VendorParameters are arbitrary setup parameters for all requests of the + // claim. They are ignored while allocating the claim. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorParameters = 2; + + // Requests describes all resources that are needed from the driver. + // +listType=atomic + repeated ResourceRequest requests = 3; +} + +// NamedResourcesAllocationResult is used in AllocationResultModel. +message NamedResourcesAllocationResult { + // Name is the name of the selected resource instance. + optional string name = 1; +} + +// NamedResourcesAttribute is a combination of an attribute name and its value. +message NamedResourcesAttribute { + // Name is unique identifier among all resource instances managed by + // the driver on the node. It must be a DNS subdomain. + optional string name = 1; + + optional NamedResourcesAttributeValue attributeValue = 2; +} + +// NamedResourcesAttributeValue must have one and only one field set. +message NamedResourcesAttributeValue { + // QuantityValue is a quantity. + optional k8s.io.apimachinery.pkg.api.resource.Quantity quantity = 6; + + // BoolValue is a true/false value. + optional bool bool = 2; + + // IntValue is a 64-bit integer. + optional int64 int = 7; + + // IntSliceValue is an array of 64-bit integers. + optional NamedResourcesIntSlice intSlice = 8; + + // StringValue is a string. + optional string string = 5; + + // StringSliceValue is an array of strings. + optional NamedResourcesStringSlice stringSlice = 9; + + // VersionValue is a semantic version according to semver.org spec 2.0.0. + optional string version = 10; +} + +// NamedResourcesFilter is used in ResourceFilterModel. +message NamedResourcesFilter { + // Selector is a CEL expression which must evaluate to true if a + // resource instance is suitable. The language is as defined in + // https://kubernetes.io/docs/reference/using-api/cel/ + // + // In addition, for each type NamedResourcesin AttributeValue there is a map that + // resolves to the corresponding value of the instance under evaluation. + // For example: + // + // attributes.quantity["a"].isGreaterThan(quantity("0")) && + // attributes.stringslice["b"].isSorted() + optional string selector = 1; +} + +// NamedResourcesInstance represents one individual hardware instance that can be selected based +// on its attributes. +message NamedResourcesInstance { + // Name is unique identifier among all resource instances managed by + // the driver on the node. It must be a DNS subdomain. + optional string name = 1; + + // Attributes defines the attributes of this resource instance. + // The name of each attribute must be unique. + // + // +listType=atomic + // +optional + repeated NamedResourcesAttribute attributes = 2; +} + +// NamedResourcesIntSlice contains a slice of 64-bit integers. +message NamedResourcesIntSlice { + // Ints is the slice of 64-bit integers. + // + // +listType=atomic + repeated int64 ints = 1; +} + +// NamedResourcesRequest is used in ResourceRequestModel. +message NamedResourcesRequest { + // Selector is a CEL expression which must evaluate to true if a + // resource instance is suitable. The language is as defined in + // https://kubernetes.io/docs/reference/using-api/cel/ + // + // In addition, for each type NamedResourcesin AttributeValue there is a map that + // resolves to the corresponding value of the instance under evaluation. + // For example: + // + // attributes.quantity["a"].isGreaterThan(quantity("0")) && + // attributes.stringslice["b"].isSorted() + optional string selector = 1; +} + +// NamedResourcesResources is used in ResourceModel. +message NamedResourcesResources { + // The list of all individual resources instances currently available. + // + // +listType=atomic + repeated NamedResourcesInstance instances = 1; +} + +// NamedResourcesStringSlice contains a slice of strings. +message NamedResourcesStringSlice { + // Strings is the slice of strings. + // + // +listType=atomic + repeated string strings = 1; +} + // PodSchedulingContext objects hold information that is needed to schedule // a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation // mode. @@ -176,6 +321,45 @@ message ResourceClaimList { repeated ResourceClaim items = 2; } +// ResourceClaimParameters defines resource requests for a ResourceClaim in an +// in-tree format understood by Kubernetes. +message ResourceClaimParameters { + // Standard object metadata + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the claim parameters when the parameter reference of the claim refers + // to some unknown type. + // +optional + optional ResourceClaimParametersReference generatedFrom = 2; + + // Shareable indicates whether the allocated claim is meant to be shareable + // by multiple consumers at the same time. + // +optional + optional bool shareable = 3; + + // DriverRequests describes all resources that are needed for the + // allocated claim. A single claim may use resources coming from + // different drivers. For each driver, this array has at most one + // entry which then may have one or more per-driver requests. + // + // May be empty, in which case the claim can always be allocated. + // + // +listType=atomic + repeated DriverRequests driverRequests = 4; +} + +// ResourceClaimParametersList is a collection of ResourceClaimParameters. +message ResourceClaimParametersList { + // Standard list metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of node resource capacity objects. + repeated ResourceClaimParameters items = 2; +} + // ResourceClaimParametersReference contains enough information to let you // locate the parameters for a ResourceClaim. The object must be in the same // namespace as the ResourceClaim. @@ -257,6 +441,8 @@ message ResourceClaimStatus { // // +listType=map // +listMapKey=uid + // +patchStrategy=merge + // +patchMergeKey=uid // +optional repeated ResourceClaimConsumerReference reservedFor = 3; @@ -342,6 +528,11 @@ message ResourceClass { // Setting this field is optional. If null, all nodes are candidates. // +optional optional k8s.io.api.core.v1.NodeSelector suitableNodes = 4; + + // If and only if allocation of claims using this class is handled + // via structured parameters, then StructuredParameters must be set to true. + // +optional + optional bool structuredParameters = 5; } // ResourceClassList is a collection of classes. @@ -354,6 +545,43 @@ message ResourceClassList { repeated ResourceClass items = 2; } +// ResourceClassParameters defines resource requests for a ResourceClass in an +// in-tree format understood by Kubernetes. +message ResourceClassParameters { + // Standard object metadata + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the class parameters when the parameter reference of the class refers + // to some unknown type. + // +optional + optional ResourceClassParametersReference generatedFrom = 2; + + // VendorParameters are arbitrary setup parameters for all claims using + // this class. They are ignored while allocating the claim. There must + // not be more than one entry per driver. + // + // +listType=atomic + // +optional + repeated VendorParameters vendorParameters = 3; + + // Filters describes additional contraints that must be met when using the class. + // + // +listType=atomic + repeated ResourceFilter filters = 4; +} + +// ResourceClassParametersList is a collection of ResourceClassParameters. +message ResourceClassParametersList { + // Standard list metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of node resource capacity objects. + repeated ResourceClassParameters items = 2; +} + // ResourceClassParametersReference contains enough information to let you // locate the parameters for a ResourceClass. message ResourceClassParametersReference { @@ -377,6 +605,22 @@ message ResourceClassParametersReference { optional string namespace = 4; } +// ResourceFilter is a filter for resources from one particular driver. +message ResourceFilter { + // DriverName is the name used by the DRA driver kubelet plugin. + optional string driverName = 1; + + optional ResourceFilterModel resourceFilterModel = 2; +} + +// ResourceFilterModel must have one and only one field set. +message ResourceFilterModel { + // NamedResources describes a resource filter using the named resources model. + // + // +optional + optional NamedResourcesFilter namedResources = 1; +} + // ResourceHandle holds opaque resource data for processing by a specific kubelet plugin. message ResourceHandle { // DriverName specifies the name of the resource driver whose kubelet @@ -396,5 +640,110 @@ message ResourceHandle { // future, but not reduced. // +optional optional string data = 2; + + // If StructuredData is set, then it needs to be used instead of Data. + // + // +optional + optional StructuredResourceHandle structuredData = 5; +} + +// ResourceModel must have one and only one field set. +message ResourceModel { + // NamedResources describes available resources using the named resources model. + // + // +optional + optional NamedResourcesResources namedResources = 1; +} + +// ResourceRequest is a request for resources from one particular driver. +message ResourceRequest { + // VendorParameters are arbitrary setup parameters for the requested + // resource. They are ignored while allocating a claim. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorParameters = 1; + + optional ResourceRequestModel resourceRequestModel = 2; +} + +// ResourceRequestModel must have one and only one field set. +message ResourceRequestModel { + // NamedResources describes a request for resources with the named resources model. + // + // +optional + optional NamedResourcesRequest namedResources = 1; +} + +// ResourceSlice provides information about available +// resources on individual nodes. +message ResourceSlice { + // Standard object metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // NodeName identifies the node which provides the resources + // if they are local to a node. + // + // A field selector can be used to list only ResourceSlice + // objects with a certain node name. + // + // +optional + optional string nodeName = 2; + + // DriverName identifies the DRA driver providing the capacity information. + // A field selector can be used to list only ResourceSlice + // objects with a certain driver name. + optional string driverName = 3; + + optional ResourceModel resourceModel = 4; +} + +// ResourceSliceList is a collection of ResourceSlices. +message ResourceSliceList { + // Standard list metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of node resource capacity objects. + repeated ResourceSlice items = 2; +} + +// StructuredResourceHandle is the in-tree representation of the allocation result. +message StructuredResourceHandle { + // VendorClassParameters are the per-claim configuration parameters + // from the resource class at the time that the claim was allocated. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorClassParameters = 1; + + // VendorClaimParameters are the per-claim configuration parameters + // from the resource claim parameters at the time that the claim was + // allocated. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension vendorClaimParameters = 2; + + // NodeName is the name of the node providing the necessary resources + // if the resources are local to a node. + // + // +optional + optional string nodeName = 4; + + // Results lists all allocated driver resources. + // + // +listType=atomic + repeated DriverAllocationResult results = 5; +} + +// VendorParameters are opaque parameters for one particular driver. +message VendorParameters { + // DriverName is the name used by the DRA driver kubelet plugin. + optional string driverName = 1; + + // Parameters can be arbitrary setup parameters. They are ignored while + // allocating a claim. + // + // +optional + optional k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 2; } diff --git a/vendor/k8s.io/api/resource/v1alpha2/namedresources.go b/vendor/k8s.io/api/resource/v1alpha2/namedresources.go new file mode 100644 index 00000000000..b80c5c1432f --- /dev/null +++ b/vendor/k8s.io/api/resource/v1alpha2/namedresources.go @@ -0,0 +1,127 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha2 + +import ( + "k8s.io/apimachinery/pkg/api/resource" +) + +// NamedResourcesResources is used in ResourceModel. +type NamedResourcesResources struct { + // The list of all individual resources instances currently available. + // + // +listType=atomic + Instances []NamedResourcesInstance `json:"instances" protobuf:"bytes,1,name=instances"` +} + +// NamedResourcesInstance represents one individual hardware instance that can be selected based +// on its attributes. +type NamedResourcesInstance struct { + // Name is unique identifier among all resource instances managed by + // the driver on the node. It must be a DNS subdomain. + Name string `json:"name" protobuf:"bytes,1,name=name"` + + // Attributes defines the attributes of this resource instance. + // The name of each attribute must be unique. + // + // +listType=atomic + // +optional + Attributes []NamedResourcesAttribute `json:"attributes,omitempty" protobuf:"bytes,2,opt,name=attributes"` +} + +// NamedResourcesAttribute is a combination of an attribute name and its value. +type NamedResourcesAttribute struct { + // Name is unique identifier among all resource instances managed by + // the driver on the node. It must be a DNS subdomain. + Name string `json:"name" protobuf:"bytes,1,name=name"` + + NamedResourcesAttributeValue `json:",inline" protobuf:"bytes,2,opt,name=attributeValue"` +} + +// The Go field names below have a Value suffix to avoid a conflict between the +// field "String" and the corresponding method. That method is required. +// The Kubernetes API is defined without that suffix to keep it more natural. + +// NamedResourcesAttributeValue must have one and only one field set. +type NamedResourcesAttributeValue struct { + // QuantityValue is a quantity. + QuantityValue *resource.Quantity `json:"quantity,omitempty" protobuf:"bytes,6,opt,name=quantity"` + // BoolValue is a true/false value. + BoolValue *bool `json:"bool,omitempty" protobuf:"bytes,2,opt,name=bool"` + // IntValue is a 64-bit integer. + IntValue *int64 `json:"int,omitempty" protobuf:"varint,7,opt,name=int"` + // IntSliceValue is an array of 64-bit integers. + IntSliceValue *NamedResourcesIntSlice `json:"intSlice,omitempty" protobuf:"varint,8,rep,name=intSlice"` + // StringValue is a string. + StringValue *string `json:"string,omitempty" protobuf:"bytes,5,opt,name=string"` + // StringSliceValue is an array of strings. + StringSliceValue *NamedResourcesStringSlice `json:"stringSlice,omitempty" protobuf:"bytes,9,rep,name=stringSlice"` + // VersionValue is a semantic version according to semver.org spec 2.0.0. + VersionValue *string `json:"version,omitempty" protobuf:"bytes,10,opt,name=version"` +} + +// NamedResourcesIntSlice contains a slice of 64-bit integers. +type NamedResourcesIntSlice struct { + // Ints is the slice of 64-bit integers. + // + // +listType=atomic + Ints []int64 `json:"ints" protobuf:"bytes,1,opt,name=ints"` +} + +// NamedResourcesStringSlice contains a slice of strings. +type NamedResourcesStringSlice struct { + // Strings is the slice of strings. + // + // +listType=atomic + Strings []string `json:"strings" protobuf:"bytes,1,opt,name=strings"` +} + +// NamedResourcesRequest is used in ResourceRequestModel. +type NamedResourcesRequest struct { + // Selector is a CEL expression which must evaluate to true if a + // resource instance is suitable. The language is as defined in + // https://kubernetes.io/docs/reference/using-api/cel/ + // + // In addition, for each type NamedResourcesin AttributeValue there is a map that + // resolves to the corresponding value of the instance under evaluation. + // For example: + // + // attributes.quantity["a"].isGreaterThan(quantity("0")) && + // attributes.stringslice["b"].isSorted() + Selector string `json:"selector" protobuf:"bytes,1,name=selector"` +} + +// NamedResourcesFilter is used in ResourceFilterModel. +type NamedResourcesFilter struct { + // Selector is a CEL expression which must evaluate to true if a + // resource instance is suitable. The language is as defined in + // https://kubernetes.io/docs/reference/using-api/cel/ + // + // In addition, for each type NamedResourcesin AttributeValue there is a map that + // resolves to the corresponding value of the instance under evaluation. + // For example: + // + // attributes.quantity["a"].isGreaterThan(quantity("0")) && + // attributes.stringslice["b"].isSorted() + Selector string `json:"selector" protobuf:"bytes,1,name=selector"` +} + +// NamedResourcesAllocationResult is used in AllocationResultModel. +type NamedResourcesAllocationResult struct { + // Name is the name of the selected resource instance. + Name string `json:"name" protobuf:"bytes,1,name=name"` +} diff --git a/vendor/k8s.io/api/resource/v1alpha2/register.go b/vendor/k8s.io/api/resource/v1alpha2/register.go index 6e0d7ceb988..893fb4c1e52 100644 --- a/vendor/k8s.io/api/resource/v1alpha2/register.go +++ b/vendor/k8s.io/api/resource/v1alpha2/register.go @@ -52,6 +52,12 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ResourceClaimTemplateList{}, &PodSchedulingContext{}, &PodSchedulingContextList{}, + &ResourceSlice{}, + &ResourceSliceList{}, + &ResourceClaimParameters{}, + &ResourceClaimParametersList{}, + &ResourceClassParameters{}, + &ResourceClassParametersList{}, ) // Add common types diff --git a/vendor/k8s.io/api/resource/v1alpha2/types.go b/vendor/k8s.io/api/resource/v1alpha2/types.go index a614ff9dc1b..9005144cf69 100644 --- a/vendor/k8s.io/api/resource/v1alpha2/types.go +++ b/vendor/k8s.io/api/resource/v1alpha2/types.go @@ -19,9 +19,16 @@ package v1alpha2 import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" ) +const ( + // Finalizer is the finalizer that gets set for claims + // which were allocated through a builtin controller. + Finalizer = "dra.k8s.io/delete-protection" +) + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 @@ -114,8 +121,10 @@ type ResourceClaimStatus struct { // // +listType=map // +listMapKey=uid + // +patchStrategy=merge + // +patchMergeKey=uid // +optional - ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,3,opt,name=reservedFor"` + ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,3,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"` // DeallocationRequested indicates that a ResourceClaim is to be // deallocated. @@ -190,11 +199,63 @@ type ResourceHandle struct { // future, but not reduced. // +optional Data string `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"` + + // If StructuredData is set, then it needs to be used instead of Data. + // + // +optional + StructuredData *StructuredResourceHandle `json:"structuredData,omitempty" protobuf:"bytes,5,opt,name=structuredData"` } // ResourceHandleDataMaxSize represents the maximum size of resourceHandle.data. const ResourceHandleDataMaxSize = 16 * 1024 +// StructuredResourceHandle is the in-tree representation of the allocation result. +type StructuredResourceHandle struct { + // VendorClassParameters are the per-claim configuration parameters + // from the resource class at the time that the claim was allocated. + // + // +optional + VendorClassParameters runtime.RawExtension `json:"vendorClassParameters,omitempty" protobuf:"bytes,1,opt,name=vendorClassParameters"` + + // VendorClaimParameters are the per-claim configuration parameters + // from the resource claim parameters at the time that the claim was + // allocated. + // + // +optional + VendorClaimParameters runtime.RawExtension `json:"vendorClaimParameters,omitempty" protobuf:"bytes,2,opt,name=vendorClaimParameters"` + + // NodeName is the name of the node providing the necessary resources + // if the resources are local to a node. + // + // +optional + NodeName string `json:"nodeName,omitempty" protobuf:"bytes,4,name=nodeName"` + + // Results lists all allocated driver resources. + // + // +listType=atomic + Results []DriverAllocationResult `json:"results" protobuf:"bytes,5,name=results"` +} + +// DriverAllocationResult contains vendor parameters and the allocation result for +// one request. +type DriverAllocationResult struct { + // VendorRequestParameters are the per-request configuration parameters + // from the time that the claim was allocated. + // + // +optional + VendorRequestParameters runtime.RawExtension `json:"vendorRequestParameters,omitempty" protobuf:"bytes,1,opt,name=vendorRequestParameters"` + + AllocationResultModel `json:",inline" protobuf:"bytes,2,name=allocationResultModel"` +} + +// AllocationResultModel must have one and only one field set. +type AllocationResultModel struct { + // NamedResources describes the allocation result when using the named resources model. + // + // +optional + NamedResources *NamedResourcesAllocationResult `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 @@ -345,6 +406,11 @@ type ResourceClass struct { // Setting this field is optional. If null, all nodes are candidates. // +optional SuitableNodes *v1.NodeSelector `json:"suitableNodes,omitempty" protobuf:"bytes,4,opt,name=suitableNodes"` + + // If and only if allocation of claims using this class is handled + // via structured parameters, then StructuredParameters must be set to true. + // +optional + StructuredParameters *bool `json:"structuredParameters,omitempty" protobuf:"bytes,5,opt,name=structuredParameters"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -460,3 +526,212 @@ type ResourceClaimTemplateList struct { // Items is the list of resource claim templates. Items []ResourceClaimTemplate `json:"items" protobuf:"bytes,2,rep,name=items"` } + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceSlice provides information about available +// resources on individual nodes. +type ResourceSlice struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // NodeName identifies the node which provides the resources + // if they are local to a node. + // + // A field selector can be used to list only ResourceSlice + // objects with a certain node name. + // + // +optional + NodeName string `json:"nodeName,omitempty" protobuf:"bytes,2,opt,name=nodeName"` + + // DriverName identifies the DRA driver providing the capacity information. + // A field selector can be used to list only ResourceSlice + // objects with a certain driver name. + DriverName string `json:"driverName" protobuf:"bytes,3,name=driverName"` + + ResourceModel `json:",inline" protobuf:"bytes,4,name=resourceModel"` +} + +// ResourceModel must have one and only one field set. +type ResourceModel struct { + // NamedResources describes available resources using the named resources model. + // + // +optional + NamedResources *NamedResourcesResources `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceSliceList is a collection of ResourceSlices. +type ResourceSliceList 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 node resource capacity objects. + Items []ResourceSlice `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClaimParameters defines resource requests for a ResourceClaim in an +// in-tree format understood by Kubernetes. +type ResourceClaimParameters struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the claim parameters when the parameter reference of the claim refers + // to some unknown type. + // +optional + GeneratedFrom *ResourceClaimParametersReference `json:"generatedFrom,omitempty" protobuf:"bytes,2,opt,name=generatedFrom"` + + // Shareable indicates whether the allocated claim is meant to be shareable + // by multiple consumers at the same time. + // +optional + Shareable bool `json:"shareable,omitempty" protobuf:"bytes,3,opt,name=shareable"` + + // DriverRequests describes all resources that are needed for the + // allocated claim. A single claim may use resources coming from + // different drivers. For each driver, this array has at most one + // entry which then may have one or more per-driver requests. + // + // May be empty, in which case the claim can always be allocated. + // + // +listType=atomic + DriverRequests []DriverRequests `json:"driverRequests,omitempty" protobuf:"bytes,4,opt,name=driverRequests"` +} + +// DriverRequests describes all resources that are needed from one particular driver. +type DriverRequests struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` + + // VendorParameters are arbitrary setup parameters for all requests of the + // claim. They are ignored while allocating the claim. + // + // +optional + VendorParameters runtime.RawExtension `json:"vendorParameters,omitempty" protobuf:"bytes,2,opt,name=vendorParameters"` + + // Requests describes all resources that are needed from the driver. + // +listType=atomic + Requests []ResourceRequest `json:"requests,omitempty" protobuf:"bytes,3,opt,name=requests"` +} + +// ResourceRequest is a request for resources from one particular driver. +type ResourceRequest struct { + // VendorParameters are arbitrary setup parameters for the requested + // resource. They are ignored while allocating a claim. + // + // +optional + VendorParameters runtime.RawExtension `json:"vendorParameters,omitempty" protobuf:"bytes,1,opt,name=vendorParameters"` + + ResourceRequestModel `json:",inline" protobuf:"bytes,2,name=resourceRequestModel"` +} + +// ResourceRequestModel must have one and only one field set. +type ResourceRequestModel struct { + // NamedResources describes a request for resources with the named resources model. + // + // +optional + NamedResources *NamedResourcesRequest `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClaimParametersList is a collection of ResourceClaimParameters. +type ResourceClaimParametersList 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 node resource capacity objects. + Items []ResourceClaimParameters `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClassParameters defines resource requests for a ResourceClass in an +// in-tree format understood by Kubernetes. +type ResourceClassParameters struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // If this object was created from some other resource, then this links + // back to that resource. This field is used to find the in-tree representation + // of the class parameters when the parameter reference of the class refers + // to some unknown type. + // +optional + GeneratedFrom *ResourceClassParametersReference `json:"generatedFrom,omitempty" protobuf:"bytes,2,opt,name=generatedFrom"` + + // VendorParameters are arbitrary setup parameters for all claims using + // this class. They are ignored while allocating the claim. There must + // not be more than one entry per driver. + // + // +listType=atomic + // +optional + VendorParameters []VendorParameters `json:"vendorParameters,omitempty" protobuf:"bytes,3,opt,name=vendorParameters"` + + // Filters describes additional contraints that must be met when using the class. + // + // +listType=atomic + Filters []ResourceFilter `json:"filters,omitempty" protobuf:"bytes,4,opt,name=filters"` +} + +// ResourceFilter is a filter for resources from one particular driver. +type ResourceFilter struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` + + ResourceFilterModel `json:",inline" protobuf:"bytes,2,name=resourceFilterModel"` +} + +// ResourceFilterModel must have one and only one field set. +type ResourceFilterModel struct { + // NamedResources describes a resource filter using the named resources model. + // + // +optional + NamedResources *NamedResourcesFilter `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// ResourceClassParametersList is a collection of ResourceClassParameters. +type ResourceClassParametersList 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 node resource capacity objects. + Items []ResourceClassParameters `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// VendorParameters are opaque parameters for one particular driver. +type VendorParameters struct { + // DriverName is the name used by the DRA driver kubelet plugin. + DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` + + // Parameters can be arbitrary setup parameters. They are ignored while + // allocating a claim. + // + // +optional + Parameters runtime.RawExtension `json:"parameters,omitempty" protobuf:"bytes,2,opt,name=parameters"` +} diff --git a/vendor/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go b/vendor/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go index 474be8c85ce..11f9ffbead2 100644 --- a/vendor/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go @@ -38,6 +38,35 @@ func (AllocationResult) SwaggerDoc() map[string]string { return map_AllocationResult } +var map_AllocationResultModel = map[string]string{ + "": "AllocationResultModel must have one and only one field set.", + "namedResources": "NamedResources describes the allocation result when using the named resources model.", +} + +func (AllocationResultModel) SwaggerDoc() map[string]string { + return map_AllocationResultModel +} + +var map_DriverAllocationResult = map[string]string{ + "": "DriverAllocationResult contains vendor parameters and the allocation result for one request.", + "vendorRequestParameters": "VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated.", +} + +func (DriverAllocationResult) SwaggerDoc() map[string]string { + return map_DriverAllocationResult +} + +var map_DriverRequests = map[string]string{ + "": "DriverRequests describes all resources that are needed from one particular driver.", + "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", + "vendorParameters": "VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim.", + "requests": "Requests describes all resources that are needed from the driver.", +} + +func (DriverRequests) SwaggerDoc() map[string]string { + return map_DriverRequests +} + var map_PodSchedulingContext = map[string]string{ "": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "metadata": "Standard object metadata", @@ -111,6 +140,28 @@ func (ResourceClaimList) SwaggerDoc() map[string]string { return map_ResourceClaimList } +var map_ResourceClaimParameters = map[string]string{ + "": "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", + "metadata": "Standard object metadata", + "generatedFrom": "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the claim parameters when the parameter reference of the claim refers to some unknown type.", + "shareable": "Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time.", + "driverRequests": "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", +} + +func (ResourceClaimParameters) SwaggerDoc() map[string]string { + return map_ResourceClaimParameters +} + +var map_ResourceClaimParametersList = map[string]string{ + "": "ResourceClaimParametersList is a collection of ResourceClaimParameters.", + "metadata": "Standard list metadata", + "items": "Items is the list of node resource capacity objects.", +} + +func (ResourceClaimParametersList) SwaggerDoc() map[string]string { + return map_ResourceClaimParametersList +} + var map_ResourceClaimParametersReference = map[string]string{ "": "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.", "apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", @@ -186,11 +237,12 @@ func (ResourceClaimTemplateSpec) SwaggerDoc() map[string]string { } var map_ResourceClass = map[string]string{ - "": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", - "metadata": "Standard object metadata", - "driverName": "DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.\n\nResource drivers have a unique name in forward domain order (acme.example.com).", - "parametersRef": "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.", - "suitableNodes": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates.", + "": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "metadata": "Standard object metadata", + "driverName": "DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.\n\nResource drivers have a unique name in forward domain order (acme.example.com).", + "parametersRef": "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.", + "suitableNodes": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates.", + "structuredParameters": "If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true.", } func (ResourceClass) SwaggerDoc() map[string]string { @@ -207,6 +259,28 @@ func (ResourceClassList) SwaggerDoc() map[string]string { return map_ResourceClassList } +var map_ResourceClassParameters = map[string]string{ + "": "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", + "metadata": "Standard object metadata", + "generatedFrom": "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the class parameters when the parameter reference of the class refers to some unknown type.", + "vendorParameters": "VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver.", + "filters": "Filters describes additional contraints that must be met when using the class.", +} + +func (ResourceClassParameters) SwaggerDoc() map[string]string { + return map_ResourceClassParameters +} + +var map_ResourceClassParametersList = map[string]string{ + "": "ResourceClassParametersList is a collection of ResourceClassParameters.", + "metadata": "Standard list metadata", + "items": "Items is the list of node resource capacity objects.", +} + +func (ResourceClassParametersList) SwaggerDoc() map[string]string { + return map_ResourceClassParametersList +} + var map_ResourceClassParametersReference = map[string]string{ "": "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.", "apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", @@ -219,14 +293,103 @@ func (ResourceClassParametersReference) SwaggerDoc() map[string]string { return map_ResourceClassParametersReference } +var map_ResourceFilter = map[string]string{ + "": "ResourceFilter is a filter for resources from one particular driver.", + "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", +} + +func (ResourceFilter) SwaggerDoc() map[string]string { + return map_ResourceFilter +} + +var map_ResourceFilterModel = map[string]string{ + "": "ResourceFilterModel must have one and only one field set.", + "namedResources": "NamedResources describes a resource filter using the named resources model.", +} + +func (ResourceFilterModel) SwaggerDoc() map[string]string { + return map_ResourceFilterModel +} + var map_ResourceHandle = map[string]string{ - "": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", - "driverName": "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.", - "data": "Data contains the opaque data associated with this ResourceHandle. It is set by the controller component of the resource driver whose name matches the DriverName set in the ResourceClaimStatus this ResourceHandle is embedded in. It is set at allocation time and is intended for processing by the kubelet plugin whose name matches the DriverName set in this ResourceHandle.\n\nThe maximum size of this field is 16KiB. This may get increased in the future, but not reduced.", + "": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", + "driverName": "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.", + "data": "Data contains the opaque data associated with this ResourceHandle. It is set by the controller component of the resource driver whose name matches the DriverName set in the ResourceClaimStatus this ResourceHandle is embedded in. It is set at allocation time and is intended for processing by the kubelet plugin whose name matches the DriverName set in this ResourceHandle.\n\nThe maximum size of this field is 16KiB. This may get increased in the future, but not reduced.", + "structuredData": "If StructuredData is set, then it needs to be used instead of Data.", } func (ResourceHandle) SwaggerDoc() map[string]string { return map_ResourceHandle } +var map_ResourceModel = map[string]string{ + "": "ResourceModel must have one and only one field set.", + "namedResources": "NamedResources describes available resources using the named resources model.", +} + +func (ResourceModel) SwaggerDoc() map[string]string { + return map_ResourceModel +} + +var map_ResourceRequest = map[string]string{ + "": "ResourceRequest is a request for resources from one particular driver.", + "vendorParameters": "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim.", +} + +func (ResourceRequest) SwaggerDoc() map[string]string { + return map_ResourceRequest +} + +var map_ResourceRequestModel = map[string]string{ + "": "ResourceRequestModel must have one and only one field set.", + "namedResources": "NamedResources describes a request for resources with the named resources model.", +} + +func (ResourceRequestModel) SwaggerDoc() map[string]string { + return map_ResourceRequestModel +} + +var map_ResourceSlice = map[string]string{ + "": "ResourceSlice provides information about available resources on individual nodes.", + "metadata": "Standard object metadata", + "nodeName": "NodeName identifies the node which provides the resources if they are local to a node.\n\nA field selector can be used to list only ResourceSlice objects with a certain node name.", + "driverName": "DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.", +} + +func (ResourceSlice) SwaggerDoc() map[string]string { + return map_ResourceSlice +} + +var map_ResourceSliceList = map[string]string{ + "": "ResourceSliceList is a collection of ResourceSlices.", + "metadata": "Standard list metadata", + "items": "Items is the list of node resource capacity objects.", +} + +func (ResourceSliceList) SwaggerDoc() map[string]string { + return map_ResourceSliceList +} + +var map_StructuredResourceHandle = map[string]string{ + "": "StructuredResourceHandle is the in-tree representation of the allocation result.", + "vendorClassParameters": "VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated.", + "vendorClaimParameters": "VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated.", + "nodeName": "NodeName is the name of the node providing the necessary resources if the resources are local to a node.", + "results": "Results lists all allocated driver resources.", +} + +func (StructuredResourceHandle) SwaggerDoc() map[string]string { + return map_StructuredResourceHandle +} + +var map_VendorParameters = map[string]string{ + "": "VendorParameters are opaque parameters for one particular driver.", + "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", + "parameters": "Parameters can be arbitrary setup parameters. They are ignored while allocating a claim.", +} + +func (VendorParameters) SwaggerDoc() map[string]string { + return map_VendorParameters +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go b/vendor/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go index 89d521bf05a..52de8e1ad53 100644 --- a/vendor/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go @@ -32,7 +32,9 @@ func (in *AllocationResult) DeepCopyInto(out *AllocationResult) { if in.ResourceHandles != nil { in, out := &in.ResourceHandles, &out.ResourceHandles *out = make([]ResourceHandle, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.AvailableOnNodes != nil { in, out := &in.AvailableOnNodes, &out.AvailableOnNodes @@ -52,6 +54,273 @@ func (in *AllocationResult) DeepCopy() *AllocationResult { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllocationResultModel) DeepCopyInto(out *AllocationResultModel) { + *out = *in + if in.NamedResources != nil { + in, out := &in.NamedResources, &out.NamedResources + *out = new(NamedResourcesAllocationResult) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResultModel. +func (in *AllocationResultModel) DeepCopy() *AllocationResultModel { + if in == nil { + return nil + } + out := new(AllocationResultModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DriverAllocationResult) DeepCopyInto(out *DriverAllocationResult) { + *out = *in + in.VendorRequestParameters.DeepCopyInto(&out.VendorRequestParameters) + in.AllocationResultModel.DeepCopyInto(&out.AllocationResultModel) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverAllocationResult. +func (in *DriverAllocationResult) DeepCopy() *DriverAllocationResult { + if in == nil { + return nil + } + out := new(DriverAllocationResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DriverRequests) DeepCopyInto(out *DriverRequests) { + *out = *in + in.VendorParameters.DeepCopyInto(&out.VendorParameters) + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]ResourceRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverRequests. +func (in *DriverRequests) DeepCopy() *DriverRequests { + if in == nil { + return nil + } + out := new(DriverRequests) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesAllocationResult) DeepCopyInto(out *NamedResourcesAllocationResult) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAllocationResult. +func (in *NamedResourcesAllocationResult) DeepCopy() *NamedResourcesAllocationResult { + if in == nil { + return nil + } + out := new(NamedResourcesAllocationResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesAttribute) DeepCopyInto(out *NamedResourcesAttribute) { + *out = *in + in.NamedResourcesAttributeValue.DeepCopyInto(&out.NamedResourcesAttributeValue) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAttribute. +func (in *NamedResourcesAttribute) DeepCopy() *NamedResourcesAttribute { + if in == nil { + return nil + } + out := new(NamedResourcesAttribute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesAttributeValue) DeepCopyInto(out *NamedResourcesAttributeValue) { + *out = *in + if in.QuantityValue != nil { + in, out := &in.QuantityValue, &out.QuantityValue + x := (*in).DeepCopy() + *out = &x + } + if in.BoolValue != nil { + in, out := &in.BoolValue, &out.BoolValue + *out = new(bool) + **out = **in + } + if in.IntValue != nil { + in, out := &in.IntValue, &out.IntValue + *out = new(int64) + **out = **in + } + if in.IntSliceValue != nil { + in, out := &in.IntSliceValue, &out.IntSliceValue + *out = new(NamedResourcesIntSlice) + (*in).DeepCopyInto(*out) + } + if in.StringValue != nil { + in, out := &in.StringValue, &out.StringValue + *out = new(string) + **out = **in + } + if in.StringSliceValue != nil { + in, out := &in.StringSliceValue, &out.StringSliceValue + *out = new(NamedResourcesStringSlice) + (*in).DeepCopyInto(*out) + } + if in.VersionValue != nil { + in, out := &in.VersionValue, &out.VersionValue + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAttributeValue. +func (in *NamedResourcesAttributeValue) DeepCopy() *NamedResourcesAttributeValue { + if in == nil { + return nil + } + out := new(NamedResourcesAttributeValue) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesFilter) DeepCopyInto(out *NamedResourcesFilter) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesFilter. +func (in *NamedResourcesFilter) DeepCopy() *NamedResourcesFilter { + if in == nil { + return nil + } + out := new(NamedResourcesFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesInstance) DeepCopyInto(out *NamedResourcesInstance) { + *out = *in + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make([]NamedResourcesAttribute, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesInstance. +func (in *NamedResourcesInstance) DeepCopy() *NamedResourcesInstance { + if in == nil { + return nil + } + out := new(NamedResourcesInstance) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesIntSlice) DeepCopyInto(out *NamedResourcesIntSlice) { + *out = *in + if in.Ints != nil { + in, out := &in.Ints, &out.Ints + *out = make([]int64, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesIntSlice. +func (in *NamedResourcesIntSlice) DeepCopy() *NamedResourcesIntSlice { + if in == nil { + return nil + } + out := new(NamedResourcesIntSlice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesRequest) DeepCopyInto(out *NamedResourcesRequest) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesRequest. +func (in *NamedResourcesRequest) DeepCopy() *NamedResourcesRequest { + if in == nil { + return nil + } + out := new(NamedResourcesRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesResources) DeepCopyInto(out *NamedResourcesResources) { + *out = *in + if in.Instances != nil { + in, out := &in.Instances, &out.Instances + *out = make([]NamedResourcesInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesResources. +func (in *NamedResourcesResources) DeepCopy() *NamedResourcesResources { + if in == nil { + return nil + } + out := new(NamedResourcesResources) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedResourcesStringSlice) DeepCopyInto(out *NamedResourcesStringSlice) { + *out = *in + if in.Strings != nil { + in, out := &in.Strings, &out.Strings + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesStringSlice. +func (in *NamedResourcesStringSlice) DeepCopy() *NamedResourcesStringSlice { + if in == nil { + return nil + } + out := new(NamedResourcesStringSlice) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodSchedulingContext) DeepCopyInto(out *PodSchedulingContext) { *out = *in @@ -234,6 +503,77 @@ func (in *ResourceClaimList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimParameters) DeepCopyInto(out *ResourceClaimParameters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.GeneratedFrom != nil { + in, out := &in.GeneratedFrom, &out.GeneratedFrom + *out = new(ResourceClaimParametersReference) + **out = **in + } + if in.DriverRequests != nil { + in, out := &in.DriverRequests, &out.DriverRequests + *out = make([]DriverRequests, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParameters. +func (in *ResourceClaimParameters) DeepCopy() *ResourceClaimParameters { + if in == nil { + return nil + } + out := new(ResourceClaimParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaimParameters) 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 *ResourceClaimParametersList) DeepCopyInto(out *ResourceClaimParametersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceClaimParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParametersList. +func (in *ResourceClaimParametersList) DeepCopy() *ResourceClaimParametersList { + if in == nil { + return nil + } + out := new(ResourceClaimParametersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaimParametersList) 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 *ResourceClaimParametersReference) DeepCopyInto(out *ResourceClaimParametersReference) { *out = *in @@ -411,6 +751,11 @@ func (in *ResourceClass) DeepCopyInto(out *ResourceClass) { *out = new(v1.NodeSelector) (*in).DeepCopyInto(*out) } + if in.StructuredParameters != nil { + in, out := &in.StructuredParameters, &out.StructuredParameters + *out = new(bool) + **out = **in + } return } @@ -465,6 +810,84 @@ func (in *ResourceClassList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClassParameters) DeepCopyInto(out *ResourceClassParameters) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.GeneratedFrom != nil { + in, out := &in.GeneratedFrom, &out.GeneratedFrom + *out = new(ResourceClassParametersReference) + **out = **in + } + if in.VendorParameters != nil { + in, out := &in.VendorParameters, &out.VendorParameters + *out = make([]VendorParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Filters != nil { + in, out := &in.Filters, &out.Filters + *out = make([]ResourceFilter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParameters. +func (in *ResourceClassParameters) DeepCopy() *ResourceClassParameters { + if in == nil { + return nil + } + out := new(ResourceClassParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClassParameters) 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 *ResourceClassParametersList) DeepCopyInto(out *ResourceClassParametersList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceClassParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParametersList. +func (in *ResourceClassParametersList) DeepCopy() *ResourceClassParametersList { + if in == nil { + return nil + } + out := new(ResourceClassParametersList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClassParametersList) 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 *ResourceClassParametersReference) DeepCopyInto(out *ResourceClassParametersReference) { *out = *in @@ -481,9 +904,52 @@ func (in *ResourceClassParametersReference) DeepCopy() *ResourceClassParametersR return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceFilter) DeepCopyInto(out *ResourceFilter) { + *out = *in + in.ResourceFilterModel.DeepCopyInto(&out.ResourceFilterModel) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilter. +func (in *ResourceFilter) DeepCopy() *ResourceFilter { + if in == nil { + return nil + } + out := new(ResourceFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceFilterModel) DeepCopyInto(out *ResourceFilterModel) { + *out = *in + if in.NamedResources != nil { + in, out := &in.NamedResources, &out.NamedResources + *out = new(NamedResourcesFilter) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilterModel. +func (in *ResourceFilterModel) DeepCopy() *ResourceFilterModel { + if in == nil { + return nil + } + out := new(ResourceFilterModel) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceHandle) DeepCopyInto(out *ResourceHandle) { *out = *in + if in.StructuredData != nil { + in, out := &in.StructuredData, &out.StructuredData + *out = new(StructuredResourceHandle) + (*in).DeepCopyInto(*out) + } return } @@ -496,3 +962,165 @@ func (in *ResourceHandle) DeepCopy() *ResourceHandle { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceModel) DeepCopyInto(out *ResourceModel) { + *out = *in + if in.NamedResources != nil { + in, out := &in.NamedResources, &out.NamedResources + *out = new(NamedResourcesResources) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceModel. +func (in *ResourceModel) DeepCopy() *ResourceModel { + if in == nil { + return nil + } + out := new(ResourceModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest) { + *out = *in + in.VendorParameters.DeepCopyInto(&out.VendorParameters) + in.ResourceRequestModel.DeepCopyInto(&out.ResourceRequestModel) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequest. +func (in *ResourceRequest) DeepCopy() *ResourceRequest { + if in == nil { + return nil + } + out := new(ResourceRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceRequestModel) DeepCopyInto(out *ResourceRequestModel) { + *out = *in + if in.NamedResources != nil { + in, out := &in.NamedResources, &out.NamedResources + *out = new(NamedResourcesRequest) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequestModel. +func (in *ResourceRequestModel) DeepCopy() *ResourceRequestModel { + if in == nil { + return nil + } + out := new(ResourceRequestModel) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceSlice) DeepCopyInto(out *ResourceSlice) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.ResourceModel.DeepCopyInto(&out.ResourceModel) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSlice. +func (in *ResourceSlice) DeepCopy() *ResourceSlice { + if in == nil { + return nil + } + out := new(ResourceSlice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceSlice) 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 *ResourceSliceList) DeepCopyInto(out *ResourceSliceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceSlice, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceList. +func (in *ResourceSliceList) DeepCopy() *ResourceSliceList { + if in == nil { + return nil + } + out := new(ResourceSliceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceSliceList) 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 *StructuredResourceHandle) DeepCopyInto(out *StructuredResourceHandle) { + *out = *in + in.VendorClassParameters.DeepCopyInto(&out.VendorClassParameters) + in.VendorClaimParameters.DeepCopyInto(&out.VendorClaimParameters) + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]DriverAllocationResult, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StructuredResourceHandle. +func (in *StructuredResourceHandle) DeepCopy() *StructuredResourceHandle { + if in == nil { + return nil + } + out := new(StructuredResourceHandle) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VendorParameters) DeepCopyInto(out *VendorParameters) { + *out = *in + in.Parameters.DeepCopyInto(&out.Parameters) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VendorParameters. +func (in *VendorParameters) DeepCopy() *VendorParameters { + if in == nil { + return nil + } + out := new(VendorParameters) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/api/scheduling/v1/generated.pb.go b/vendor/k8s.io/api/scheduling/v1/generated.pb.go index 373c901e6b6..6fef1a9379a 100644 --- a/vendor/k8s.io/api/scheduling/v1/generated.pb.go +++ b/vendor/k8s.io/api/scheduling/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1/generated.proto +// source: k8s.io/api/scheduling/v1/generated.proto package v1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PriorityClass) Reset() { *m = PriorityClass{} } func (*PriorityClass) ProtoMessage() {} func (*PriorityClass) Descriptor() ([]byte, []int) { - return fileDescriptor_277b2f43b72fffd5, []int{0} + return fileDescriptor_3f12bd05064e996e, []int{0} } func (m *PriorityClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_PriorityClass proto.InternalMessageInfo func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } func (*PriorityClassList) ProtoMessage() {} func (*PriorityClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_277b2f43b72fffd5, []int{1} + return fileDescriptor_3f12bd05064e996e, []int{1} } func (m *PriorityClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,42 +107,41 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1/generated.proto", fileDescriptor_277b2f43b72fffd5) + proto.RegisterFile("k8s.io/api/scheduling/v1/generated.proto", fileDescriptor_3f12bd05064e996e) } -var fileDescriptor_277b2f43b72fffd5 = []byte{ - // 492 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x8b, 0xd3, 0x4e, - 0x18, 0xc7, 0x3b, 0xdd, 0x5f, 0xa1, 0xbf, 0x29, 0x85, 0x1a, 0x11, 0x42, 0x0f, 0x69, 0xe9, 0x1e, - 0xec, 0xc5, 0x19, 0xbb, 0xa8, 0x08, 0x0b, 0x82, 0x71, 0x41, 0x84, 0x15, 0x4b, 0x0e, 0x1e, 0xc4, - 0x83, 0x93, 0xe4, 0xd9, 0x74, 0x6c, 0x92, 0x09, 0x33, 0x93, 0x40, 0x6f, 0xbe, 0x04, 0xdf, 0x91, - 0xd7, 0x1e, 0xf7, 0xb8, 0xa7, 0x62, 0xe3, 0x4b, 0xf0, 0xe6, 0x49, 0x92, 0xc6, 0x4d, 0xff, 0x6c, - 0xd1, 0x5b, 0x9e, 0xe7, 0xf9, 0x7e, 0xbe, 0x33, 0xf3, 0xcd, 0x0c, 0x7e, 0x39, 0x7f, 0xae, 0x08, - 0x17, 0x74, 0x9e, 0xba, 0x20, 0x63, 0xd0, 0xa0, 0x68, 0x06, 0xb1, 0x2f, 0x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 0xac, 0xc6, 0x07, 0xf3, 0xd8, 0x9b, 0xfc, 0x1d, - 0x00, 0x00, 0xff, 0xff, 0xa9, 0x88, 0x2b, 0xa0, 0xc7, 0x03, 0x00, 0x00, +var fileDescriptor_3f12bd05064e996e = []byte{ + // 476 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x3f, 0x8f, 0xd3, 0x30, + 0x18, 0xc6, 0xe3, 0x1e, 0x91, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xea, 0xe0, 0x46, 0xbd, 0x81, + 0x2c, 0xd8, 0xf4, 0x04, 0x08, 0xe9, 0x24, 0x86, 0x70, 0x12, 0x42, 0x3a, 0x44, 0x95, 0x81, 0x01, + 0x31, 0xe0, 0xa6, 0x3e, 0xd7, 0x34, 0x89, 0x23, 0xdb, 0xa9, 0xd4, 0x8d, 0x8f, 0xc0, 0x37, 0x62, + 0xed, 0x78, 0xe3, 0x4d, 0x15, 0x0d, 0x1f, 0x81, 0x8d, 0x09, 0x25, 0x2d, 0x97, 0xfe, 0xb9, 0x0a, + 0xb6, 0xbc, 0xef, 0xfb, 0xfc, 0x1e, 0xdb, 0x4f, 0x6c, 0xe8, 0x4f, 0x5f, 0x6a, 0x2c, 0x24, 0xa1, + 0x99, 0x20, 0x3a, 0x9a, 0xb0, 0x71, 0x1e, 0x8b, 0x94, 0x93, 0xd9, 0x80, 0x70, 0x96, 0x32, 0x45, + 0x0d, 0x1b, 0xe3, 0x4c, 0x49, 0x23, 0x1d, 0x77, 0xad, 0xc4, 0x34, 0x13, 0xb8, 0x56, 0xe2, 0xd9, + 0xa0, 0xfb, 0x84, 0x0b, 0x33, 0xc9, 0x47, 0x38, 0x92, 0x09, 0xe1, 0x92, 0x4b, 0x52, 0x01, 0xa3, + 0xfc, 0xaa, 0xaa, 0xaa, 0xa2, 0xfa, 0x5a, 0x1b, 0x75, 0xfb, 0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, 0x1c, 0x76, 0x32, 0xc5, 0x58, 0x52, 0x55, 0x43, 0x19, 0x8b, 0x68, 0xee, 0xda, 0x15, + 0x7b, 0x5e, 0x2c, 0x7b, 0x9d, 0xe1, 0xde, 0xec, 0xf7, 0xb2, 0x77, 0x7a, 0x78, 0x03, 0xf0, 0xbe, + 0x2c, 0x3c, 0x30, 0xed, 0x7f, 0x07, 0xf0, 0xc1, 0x4e, 0xea, 0x97, 0x42, 0x1b, 0xe7, 0xd3, 0x41, + 0xf2, 0xf8, 0xff, 0x92, 0x2f, 0xe9, 0x2a, 0xf7, 0xce, 0xe6, 0x88, 0xcd, 0xbf, 0x9d, 0xad, 0xd4, + 0x2f, 0xa1, 0x2d, 0x0c, 0x4b, 0xb4, 0xdb, 0xf0, 0x4e, 0xfc, 0xd6, 0xd9, 0x63, 0x7c, 0xec, 0x15, + 0xe0, 0x9d, 0x9d, 0xd5, 0xbf, 0xe7, 0x6d, 0x49, 0x87, 0x6b, 0x93, 0xe0, 0xd5, 0x62, 0x85, 0xac, + 0xeb, 0x15, 0xb2, 0x6e, 0x56, 0xc8, 0xfa, 0x5a, 0x20, 0xb0, 0x28, 0x10, 0xb8, 0x2e, 0x10, 0xb8, + 0x29, 0x10, 0xf8, 0x51, 0x20, 0xf0, 0xed, 0x27, 0xb2, 0x3e, 0xba, 0xc7, 0xde, 0xe4, 0x9f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x9a, 0x3d, 0x5f, 0x2e, 0xae, 0x03, 0x00, 0x00, } func (m *PriorityClass) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go b/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go index d2c5d2f33f9..83e504b5a33 100644 --- a/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto +// source: k8s.io/api/scheduling/v1alpha1/generated.proto package v1alpha1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PriorityClass) Reset() { *m = PriorityClass{} } func (*PriorityClass) ProtoMessage() {} func (*PriorityClass) Descriptor() ([]byte, []int) { - return fileDescriptor_f033641dd0b95dce, []int{0} + return fileDescriptor_260442fbb28d876a, []int{0} } func (m *PriorityClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_PriorityClass proto.InternalMessageInfo func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } func (*PriorityClassList) ProtoMessage() {} func (*PriorityClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_f033641dd0b95dce, []int{1} + return fileDescriptor_260442fbb28d876a, []int{1} } func (m *PriorityClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,42 +107,41 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto", fileDescriptor_f033641dd0b95dce) + proto.RegisterFile("k8s.io/api/scheduling/v1alpha1/generated.proto", fileDescriptor_260442fbb28d876a) } -var fileDescriptor_f033641dd0b95dce = []byte{ - // 495 bytes of a gzipped FileDescriptorProto +var fileDescriptor_260442fbb28d876a = []byte{ + // 480 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x8f, 0xd3, 0x30, - 0x14, 0xc7, 0xeb, 0x1e, 0x95, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xea, 0xe0, 0x56, 0xbd, 0xa5, - 0xcb, 0xd9, 0xf4, 0x04, 0x08, 0xe9, 0xb6, 0x52, 0xe9, 0x84, 0x04, 0xa2, 0xca, 0xc0, 0x80, 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 0xef, 0x14, 0x47, 0x6c, 0xde, 0x76, - 0xf6, 0x52, 0x77, 0x70, 0x43, 0x18, 0x08, 0xb4, 0x5d, 0xef, 0x9f, 0x0c, 0x5b, 0xe7, 0x67, 0xf4, - 0xfe, 0xb7, 0x40, 0x0f, 0xf6, 0x57, 0xfe, 0xa4, 0xd7, 0x99, 0x87, 0xb3, 0xb3, 0x1a, 0x4f, 0xd6, - 0x5b, 0x52, 0xbb, 0xde, 0x92, 0xda, 0xcd, 0x96, 0xd4, 0xbe, 0xa4, 0x04, 0xad, 0x53, 0x82, 0xae, - 0x53, 0x82, 0x6e, 0x52, 0x82, 0xbe, 0xa7, 0x04, 0x7d, 0xfd, 0x41, 0x6a, 0x1f, 0xc8, 0xfd, 0xaf, - 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbd, 0xf8, 0x5a, 0x80, 0xdf, 0x03, 0x00, 0x00, + 0x18, 0x86, 0xeb, 0x1e, 0x91, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xea, 0xe0, 0x46, 0xbd, 0x25, + 0xcb, 0xd9, 0xf4, 0x04, 0x08, 0xe9, 0xb6, 0x50, 0x09, 0x21, 0x81, 0xa8, 0x32, 0x30, 0x20, 0x06, + 0xdc, 0xd4, 0xe7, 0x9a, 0x26, 0x71, 0x64, 0x3b, 0x95, 0xba, 0xf1, 0x13, 0xf8, 0x53, 0x48, 0x1d, + 0x6f, 0xbc, 0xa9, 0xa2, 0xe1, 0x27, 0xb0, 0x31, 0xa1, 0xa4, 0xbd, 0x4b, 0xdb, 0xc0, 0x71, 0x5b, + 0xbe, 0xef, 0x7b, 0xde, 0xd7, 0xf6, 0x1b, 0x1b, 0xe2, 0xf9, 0x4b, 0x8d, 0x85, 0x24, 0x34, 0x15, + 0x44, 0x87, 0x33, 0x36, 0xcd, 0x22, 0x91, 0x70, 0xb2, 0x18, 0xd2, 0x28, 0x9d, 0xd1, 0x21, 0xe1, + 0x2c, 0x61, 0x8a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x00, 0x00, } func (m *PriorityClass) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go b/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go index 262caf7f1d6..68e8e90d1d9 100644 --- a/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1beta1/generated.proto +// source: k8s.io/api/scheduling/v1beta1/generated.proto package v1beta1 @@ -48,7 +48,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PriorityClass) Reset() { *m = PriorityClass{} } func (*PriorityClass) ProtoMessage() {} func (*PriorityClass) Descriptor() ([]byte, []int) { - return fileDescriptor_6cd406dede2d3f42, []int{0} + return fileDescriptor_9edc3acf997efcf2, []int{0} } func (m *PriorityClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +76,7 @@ var xxx_messageInfo_PriorityClass proto.InternalMessageInfo func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } func (*PriorityClassList) ProtoMessage() {} func (*PriorityClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_6cd406dede2d3f42, []int{1} + return fileDescriptor_9edc3acf997efcf2, []int{1} } func (m *PriorityClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,42 +107,41 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1beta1/generated.proto", fileDescriptor_6cd406dede2d3f42) + proto.RegisterFile("k8s.io/api/scheduling/v1beta1/generated.proto", fileDescriptor_9edc3acf997efcf2) } -var fileDescriptor_6cd406dede2d3f42 = []byte{ - // 497 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 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 0x6f, 0x76, 0x30, 0xfb, 0xb1, 0x1e, 0x9c, 0xd4, 0x6f, - 0x00, 0x39, 0xc4, 0xec, 0x9a, 0xe9, 0xe8, 0x0b, 0xc2, 0x77, 0xf6, 0x52, 0x7f, 0xc9, 0x95, 0x36, - 0xde, 0xd7, 0x92, 0x27, 0xff, 0x96, 0x7c, 0xae, 0x2e, 0x72, 0xef, 0x95, 0x47, 0x6c, 0xff, 0xea, - 0xec, 0xa4, 0xfe, 0x06, 0xb7, 0xb8, 0x86, 0x50, 0x99, 0xcd, 0xe1, 0xd1, 0xb8, 0x73, 0x7a, 0x9f, - 0xdc, 0xfa, 0x14, 0xc8, 0xde, 0xf6, 0xaa, 0x7f, 0xf4, 0x22, 0xb7, 0xb0, 0xb7, 0x4e, 0xd3, 0xf3, - 0xd5, 0xc6, 0x6a, 0x5c, 0x6d, 0xac, 0xc6, 0xf5, 0xc6, 0x6a, 0x7c, 0xca, 0x2c, 0xb4, 0xca, 0x2c, - 0x74, 0x95, 0x59, 0xe8, 0x3a, 0xb3, 0xd0, 0xd7, 0xcc, 0x42, 0x9f, 0xbf, 0x59, 0x8d, 0x77, 0xc7, - 0xb7, 0x3e, 0xd1, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x6c, 0x56, 0x80, 0xdb, 0x03, 0x00, +var fileDescriptor_9edc3acf997efcf2 = []byte{ + // 481 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x8f, 0xd3, 0x30, + 0x18, 0x86, 0xe3, 0x1e, 0x91, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xaa, 0x74, 0x69, 0xd4, 0x5b, + 0x32, 0x70, 0x36, 0x3d, 0x01, 0x42, 0xba, 0x2d, 0x77, 0x12, 0x42, 0x02, 0x51, 0x32, 0x30, 0x20, + 0x06, 0x9c, 0xd4, 0x97, 0x9a, 0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, 0xe8, 0xe0, 0x53, 0x40, 0x3b, 0xdb, 0xab, 0xff, 0xd1, 0xab, 0xc2, 0xc2, 0xdb, 0x38, 0xb9, + 0x17, 0xcb, 0xb5, 0xa5, 0x5d, 0xaf, 0x2d, 0xed, 0x66, 0x6d, 0x69, 0x5f, 0x72, 0x0b, 0x2c, 0x73, + 0x0b, 0x5c, 0xe7, 0x16, 0xb8, 0xc9, 0x2d, 0xf0, 0x3d, 0xb7, 0xc0, 0xd7, 0x1f, 0x96, 0xf6, 0xe1, + 0xf8, 0xe0, 0x13, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x04, 0x2e, 0xb0, 0xce, 0xc2, 0x03, 0x00, 0x00, } diff --git a/vendor/k8s.io/api/storage/v1/generated.pb.go b/vendor/k8s.io/api/storage/v1/generated.pb.go index d36497432de..11c8c97c241 100644 --- a/vendor/k8s.io/api/storage/v1/generated.pb.go +++ b/vendor/k8s.io/api/storage/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/storage/v1/generated.proto +// source: k8s.io/api/storage/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CSIDriver) Reset() { *m = CSIDriver{} } func (*CSIDriver) ProtoMessage() {} func (*CSIDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{0} + return fileDescriptor_662262cc70094b41, []int{0} } func (m *CSIDriver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_CSIDriver proto.InternalMessageInfo func (m *CSIDriverList) Reset() { *m = CSIDriverList{} } func (*CSIDriverList) ProtoMessage() {} func (*CSIDriverList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{1} + return fileDescriptor_662262cc70094b41, []int{1} } func (m *CSIDriverList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_CSIDriverList proto.InternalMessageInfo func (m *CSIDriverSpec) Reset() { *m = CSIDriverSpec{} } func (*CSIDriverSpec) ProtoMessage() {} func (*CSIDriverSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{2} + return fileDescriptor_662262cc70094b41, []int{2} } func (m *CSIDriverSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_CSIDriverSpec proto.InternalMessageInfo func (m *CSINode) Reset() { *m = CSINode{} } func (*CSINode) ProtoMessage() {} func (*CSINode) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{3} + return fileDescriptor_662262cc70094b41, []int{3} } func (m *CSINode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_CSINode proto.InternalMessageInfo func (m *CSINodeDriver) Reset() { *m = CSINodeDriver{} } func (*CSINodeDriver) ProtoMessage() {} func (*CSINodeDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{4} + return fileDescriptor_662262cc70094b41, []int{4} } func (m *CSINodeDriver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_CSINodeDriver proto.InternalMessageInfo func (m *CSINodeList) Reset() { *m = CSINodeList{} } func (*CSINodeList) ProtoMessage() {} func (*CSINodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{5} + return fileDescriptor_662262cc70094b41, []int{5} } func (m *CSINodeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_CSINodeList proto.InternalMessageInfo func (m *CSINodeSpec) Reset() { *m = CSINodeSpec{} } func (*CSINodeSpec) ProtoMessage() {} func (*CSINodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{6} + return fileDescriptor_662262cc70094b41, []int{6} } func (m *CSINodeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_CSINodeSpec proto.InternalMessageInfo func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } func (*CSIStorageCapacity) ProtoMessage() {} func (*CSIStorageCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{7} + return fileDescriptor_662262cc70094b41, []int{7} } func (m *CSIStorageCapacity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_CSIStorageCapacity proto.InternalMessageInfo func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } func (*CSIStorageCapacityList) ProtoMessage() {} func (*CSIStorageCapacityList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{8} + return fileDescriptor_662262cc70094b41, []int{8} } func (m *CSIStorageCapacityList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_CSIStorageCapacityList proto.InternalMessageInfo func (m *StorageClass) Reset() { *m = StorageClass{} } func (*StorageClass) ProtoMessage() {} func (*StorageClass) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{9} + return fileDescriptor_662262cc70094b41, []int{9} } func (m *StorageClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_StorageClass proto.InternalMessageInfo func (m *StorageClassList) Reset() { *m = StorageClassList{} } func (*StorageClassList) ProtoMessage() {} func (*StorageClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{10} + return fileDescriptor_662262cc70094b41, []int{10} } func (m *StorageClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_StorageClassList proto.InternalMessageInfo func (m *TokenRequest) Reset() { *m = TokenRequest{} } func (*TokenRequest) ProtoMessage() {} func (*TokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{11} + return fileDescriptor_662262cc70094b41, []int{11} } func (m *TokenRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_TokenRequest proto.InternalMessageInfo func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } func (*VolumeAttachment) ProtoMessage() {} func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{12} + return fileDescriptor_662262cc70094b41, []int{12} } func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } func (*VolumeAttachmentList) ProtoMessage() {} func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{13} + return fileDescriptor_662262cc70094b41, []int{13} } func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } func (*VolumeAttachmentSource) ProtoMessage() {} func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{14} + return fileDescriptor_662262cc70094b41, []int{14} } func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } func (*VolumeAttachmentSpec) ProtoMessage() {} func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{15} + return fileDescriptor_662262cc70094b41, []int{15} } func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } func (*VolumeAttachmentStatus) ProtoMessage() {} func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{16} + return fileDescriptor_662262cc70094b41, []int{16} } func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo func (m *VolumeError) Reset() { *m = VolumeError{} } func (*VolumeError) ProtoMessage() {} func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{17} + return fileDescriptor_662262cc70094b41, []int{17} } func (m *VolumeError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_VolumeError proto.InternalMessageInfo func (m *VolumeNodeResources) Reset() { *m = VolumeNodeResources{} } func (*VolumeNodeResources) ProtoMessage() {} func (*VolumeNodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{18} + return fileDescriptor_662262cc70094b41, []int{18} } func (m *VolumeNodeResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -605,116 +605,115 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/storage/v1/generated.proto", fileDescriptor_3b530c1983504d8d) -} - -var fileDescriptor_3b530c1983504d8d = []byte{ - // 1670 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x73, 0x1b, 0x4b, - 0x11, 0xf7, 0x5a, 0xf2, 0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32, 0x9a, 0xf8, 0x09, 0xb4, 0xc5, 0x51, 0xba, 0x2d, 0x3e, 0x1f, 0x5f, - 0xc0, 0x99, 0xd8, 0xc6, 0x74, 0xc8, 0xef, 0x66, 0xc1, 0x62, 0x32, 0x7d, 0x13, 0xa8, 0xdd, 0xef, - 0x81, 0x92, 0x1f, 0x78, 0x1d, 0xca, 0xa8, 0xe7, 0x92, 0x40, 0x31, 0xe1, 0x9a, 0x32, 0x29, 0x9d, - 0xc4, 0x22, 0x94, 0xd4, 0x83, 0x2d, 0x00, 0x7c, 0x1c, 0x60, 0x87, 0x70, 0xd1, 0xbf, 0x05, 0x79, - 0xfc, 0x07, 0x63, 0x8e, 0x9f, 0x3c, 0x91, 0x71, 0x32, 0xb4, 0xaa, 0xbb, 0x3c, 0xe8, 0xc6, 0xd1, - 0xc5, 0x02, 0x94, 0x80, 0x86, 0x97, 0x60, 0x29, 0x20, 0x56, 0x1b, 0x53, 0x47, 0xbd, 0xd9, 0x45, - 0x19, 0x61, 0x5d, 0x3c, 0xa0, 0x28, 0x29, 0xb8, 0xee, 0x55, 0xbf, 0x1a, 0x9d, 0xba, 0x8d, 0x13, - 0x12, 0x30, 0xca, 0x38, 0x71, 0x79, 0x54, 0x30, 0x29, 0x1b, 0x94, 0xc6, 0x16, 0x4c, 0xef, 0x88, - 0x27, 0xf0, 0xd8, 0xe7, 0xd4, 0x73, 0x59, 0x79, 0x26, 0x66, 0xfa, 0x46, 0x62, 0x1f, 0xa5, 0xb4, - 0xe0, 0x21, 0x58, 0x17, 0xcc, 0xfc, 0xcb, 0xc8, 0x41, 0xfd, 0xca, 0xc7, 0xae, 0xb8, 0xa5, 0xf2, - 0xac, 0x7c, 0x6d, 0xcb, 0x62, 0xf4, 0xd9, 0xcd, 0x91, 0xa3, 0x5c, 0x2b, 0xf8, 0x12, 0xac, 0x46, - 0xb3, 0x8f, 0x49, 0x5d, 0x9b, 0xba, 0x2d, 0x31, 0xf9, 0xc8, 0x87, 0x7f, 0xc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27, 0x60, 0x96, 0x71, 0xcc, 0x43, 0x26, 0x9f, 0xba, 0xd2, 0xce, 0x97, 0xb7, - 0x05, 0x94, 0x46, 0xf1, 0x5c, 0x17, 0xad, 0x91, 0x02, 0xd3, 0xff, 0xae, 0x81, 0xf5, 0xac, 0xc9, - 0x04, 0x2a, 0xec, 0x30, 0x5d, 0x61, 0xdf, 0xbe, 0xe5, 0x61, 0xc6, 0x7d, 0x01, 0x6a, 0xe0, 0x93, - 0x91, 0x73, 0xcb, 0x97, 0x54, 0xf0, 0x92, 0x9f, 0x61, 0xbf, 0xa3, 0x78, 0x22, 0x96, 0xbc, 0x74, - 0x92, 0x23, 0x47, 0xb9, 0x56, 0xf0, 0x35, 0x58, 0xa1, 0x6e, 0x9b, 0xba, 0x44, 0x3d, 0xbc, 0x71, - 0x7e, 0x73, 0xc9, 0x23, 0x8b, 0x2c, 0x93, 0xbb, 0x2e, 0xe6, 0x93, 0x83, 0x0c, 0x0a, 0x1a, 0xc1, - 0xd5, 0xff, 0x99, 0x93, 0x19, 0x39, 0x33, 0x8a, 0x16, 0x92, 0x3b, 0x24, 0x18, 0x69, 0x21, 0xb5, - 0x8f, 0x86, 0x1a, 0xb2, 0x6e, 0xe4, 0x55, 0xa8, 0x40, 0x6f, 0x5d, 0x37, 0xd2, 0x28, 0x51, 0x37, - 0x72, 0x8d, 0x14, 0x98, 0x08, 0x42, 0xcc, 0x64, 0x89, 0xd9, 0x6b, 0x18, 0xc4, 0x91, 0xda, 0x47, - 0x43, 0x0d, 0xfd, 0xbf, 0x85, 0x9c, 0x04, 0xc9, 0x02, 0x4c, 0x9c, 0x66, 0xf0, 0x95, 0x9e, 0x3d, - 0x8d, 0x3d, 0x3c, 0x8d, 0x0d, 0xff, 0xa0, 0x01, 0x88, 0x87, 0x10, 0x8d, 0x41, 0x81, 0x46, 0x55, - 0x54, 0xbf, 0x53, 0x4b, 0x18, 0xbb, 0x23, 0x38, 0xd1, 0x6b, 0xbc, 0xa9, 0xfc, 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 0x00, 0x00, + proto.RegisterFile("k8s.io/api/storage/v1/generated.proto", fileDescriptor_662262cc70094b41) +} + +var fileDescriptor_662262cc70094b41 = []byte{ + // 1655 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xbd, 0x6f, 0x1b, 0xc9, + 0x15, 0xd7, 0x8a, 0xd4, 0xd7, 0x50, 0xb2, 0xa4, 0x91, 0xe4, 0x30, 0x2a, 0x48, 0x61, 0xed, 0x24, + 0xb2, 0x13, 0x2f, 0x6d, 0xd9, 0x31, 0x0c, 0x07, 0x2e, 0xb4, 0x12, 0x1d, 0x0b, 0x11, 0x25, 0x65, + 0xa8, 0x18, 0x46, 0x90, 0x04, 0x1e, 0xed, 0x8e, 0xa8, 0xb1, 0xb8, 0x1f, 0xde, 0x19, 0x2a, 0x62, + 0xaa, 0xa4, 0x49, 0x17, 0x20, 0x69, 0xf3, 0x57, 0x24, 0x40, 0xd2, 0x5c, 0x79, 0xc5, 0xc1, 0xd7, + 0x19, 0x57, 0xb9, 0x22, 0xce, 0xbc, 0xfa, 0xae, 0xbc, 0x42, 0xd5, 0x61, 0x66, 0x87, 0xdc, 0x0f, + 0x2e, 0x65, 0xa9, 0x61, 0xc7, 0x99, 0xf7, 0xde, 0xef, 0xbd, 0x99, 0xf7, 0xde, 0x6f, 0xde, 0x12, + 0xfc, 0xe4, 0xf4, 0x09, 0x33, 0xa8, 0x57, 0xc1, 0x3e, 0xad, 0x30, 0xee, 0x05, 0xb8, 0x41, 0x2a, + 0x67, 0x0f, 0x2a, 0x0d, 0xe2, 0x92, 0x00, 0x73, 0x62, 0x1b, 0x7e, 0xe0, 0x71, 0x0f, 0xae, 0x84, + 0x6a, 0x06, 0xf6, 0xa9, 0xa1, 0xd4, 0x8c, 0xb3, 0x07, 0xab, 0xf7, 0x1a, 0x94, 0x9f, 0xb4, 0x8e, + 0x0c, 0xcb, 0x73, 0x2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0xa2, 0x83, 0xcf, 0xa9, 0xd3, 0x72, + 0xc2, 0x92, 0xae, 0xd3, 0xbf, 0x10, 0x49, 0xb3, 0xd7, 0x77, 0x21, 0x69, 0xae, 0x96, 0x06, 0x43, + 0x83, 0xf8, 0xfa, 0x17, 0x1a, 0xb8, 0x39, 0x98, 0xf8, 0x11, 0xb4, 0xc5, 0x5e, 0xb2, 0x2d, 0xee, + 0x0c, 0x2f, 0xe0, 0x54, 0x6c, 0x43, 0x3a, 0xe4, 0x1f, 0x93, 0x60, 0x36, 0x9e, 0xbe, 0x11, 0xd4, + 0xee, 0x2f, 0x41, 0xc1, 0x0f, 0xbc, 0x33, 0xca, 0xa8, 0xe7, 0x92, 0x40, 0x31, 0xe1, 0x92, 0x32, + 0x29, 0x1c, 0x44, 0x22, 0x14, 0xd7, 0x83, 0x0d, 0x00, 0x7c, 0x1c, 0x60, 0x87, 0x70, 0xd1, 0xbf, + 0x39, 0x79, 0xfc, 0x87, 0x43, 0x8e, 0x1f, 0x3f, 0x91, 0x71, 0xd0, 0xb7, 0xaa, 0xba, 0x3c, 0x68, + 0x47, 0xd1, 0x45, 0x02, 0x14, 0x83, 0x86, 0xa7, 0x60, 0x2e, 0x20, 0x56, 0x13, 0x53, 0x47, 0xbd, + 0xd9, 0x79, 0x19, 0x61, 0x55, 0x3c, 0xa0, 0x28, 0x2e, 0xb8, 0xe8, 0x94, 0xef, 0x0f, 0x4e, 0xdd, + 0xc6, 0x01, 0x09, 0x18, 0x65, 0x9c, 0xb8, 0x3c, 0x2c, 0x98, 0x84, 0x0d, 0x4a, 0x62, 0x0b, 0xa6, + 0x77, 0xc4, 0x13, 0xb8, 0xef, 0x73, 0xea, 0xb9, 0xac, 0x38, 0x11, 0x31, 0x7d, 0x2d, 0xb6, 0x8f, + 0x12, 0x5a, 0x70, 0x17, 0x2c, 0x0b, 0x66, 0xfe, 0x73, 0xe8, 0xa0, 0x7a, 0xee, 0x63, 0x57, 0xdc, + 0x52, 0x71, 0x52,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c7, 0xc1, 0x42, 0x58, 0x1b, 0xe1, + 0xe8, 0xef, 0x10, 0x97, 0x8f, 0x80, 0x54, 0x6a, 0x89, 0x99, 0xee, 0xe7, 0x97, 0x0e, 0x3d, 0x51, + 0x60, 0xc3, 0x86, 0x3b, 0xf8, 0x3b, 0x30, 0xc9, 0x38, 0xe6, 0x2d, 0x26, 0x9f, 0xba, 0xc2, 0xc6, + 0xbd, 0xab, 0x02, 0x4a, 0xa3, 0x68, 0xae, 0x0b, 0xd7, 0x48, 0x81, 0xe9, 0x9f, 0x6b, 0x60, 0x39, + 0x6d, 0x32, 0x82, 0x0a, 0xdb, 0x4d, 0x56, 0xd8, 0xcf, 0xae, 0x78, 0x98, 0x61, 0x5f, 0x80, 0x1a, + 0xb8, 0x39, 0x70, 0x6e, 0xf9, 0x92, 0x0a, 0x5e, 0xf2, 0x53, 0xec, 0xb7, 0x17, 0x4d, 0xc4, 0x92, + 0x97, 0x0e, 0x32, 0xe4, 0x28, 0xd3, 0x0a, 0xbe, 0x01, 0x0b, 0xd4, 0x6d, 0x52, 0x97, 0xa8, 0x87, + 0x37, 0xca, 0x6f, 0x26, 0x79, 0xa4, 0x91, 0x65, 0x72, 0x97, 0xc5, 0x7c, 0xb2, 0x93, 0x42, 0x41, + 0x03, 0xb8, 0xfa, 0x97, 0x19, 0x99, 0x91, 0x33, 0xa3, 0x68, 0x21, 0xb9, 0x43, 0x82, 0x81, 0x16, + 0x52, 0xfb, 0xa8, 0xaf, 0x21, 0xeb, 0x46, 0x5e, 0x85, 0x0a, 0xf4, 0xca, 0x75, 0x23, 0x8d, 0x62, + 0x75, 0x23, 0xd7, 0x48, 0x81, 0x89, 0x20, 0xc4, 0x4c, 0x16, 0x9b, 0xbd, 0xfa, 0x41, 0xec, 0xa9, + 0x7d, 0xd4, 0xd7, 0xd0, 0xbf, 0xcd, 0x65, 0x24, 0x48, 0x16, 0x60, 0xec, 0x34, 0xbd, 0xaf, 0xf4, + 0xf4, 0x69, 0xec, 0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 0x96, 0xb4, 0xaf, 0xbb, 0x25, 0xed, 0x9f, + 0xdf, 0x94, 0xc6, 0x7e, 0xbf, 0x92, 0xf9, 0x77, 0xea, 0x0f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7a, + 0x55, 0x95, 0x9f, 0x66, 0x15, 0x00, 0x00, } func (m *CSIDriver) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/storage/v1/generated.proto b/vendor/k8s.io/api/storage/v1/generated.proto index b35f708c663..06bbe3d5cff 100644 --- a/vendor/k8s.io/api/storage/v1/generated.proto +++ b/vendor/k8s.io/api/storage/v1/generated.proto @@ -103,7 +103,7 @@ message CSIDriverSpec { // deployed on such a cluster and the deployment determines which mode that is, for example // via a command line parameter of the driver. // - // This field is immutable. + // This field was immutable in Kubernetes < 1.29 and now is mutable. // // +optional optional bool podInfoOnMount = 2; @@ -150,7 +150,7 @@ message CSIDriverSpec { // permission of the volume before being mounted. // Refer to the specific FSGroupPolicy values for additional details. // - // This field is immutable. + // This field was immutable in Kubernetes < 1.29 and now is mutable. // // Defaults to ReadWriteOnceWithFSType, which will examine each volume // to determine if Kubernetes should modify ownership and permissions of the volume. @@ -261,6 +261,7 @@ message CSINodeDriver { // It is possible for different nodes to use different topology keys. // This can be empty if driver does not support topology. // +optional + // +listType=atomic repeated string topologyKeys = 3; // allocatable represents the volume resources of a node that are available for scheduling. @@ -286,6 +287,8 @@ message CSINodeSpec { // If all drivers in the list are uninstalled, this can become empty. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated CSINodeDriver drivers = 1; } @@ -378,8 +381,6 @@ message CSIStorageCapacityList { optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name repeated CSIStorageCapacity items = 2; } @@ -411,6 +412,7 @@ message StorageClass { // e.g. ["ro", "soft"]. Not validated - // mount of the PVs will simply fail if one is invalid. // +optional + // +listType=atomic repeated string mountOptions = 5; // allowVolumeExpansion shows whether the storage class allow volume expand. diff --git a/vendor/k8s.io/api/storage/v1/types.go b/vendor/k8s.io/api/storage/v1/types.go index 7d7b7664b89..a94c7f44c53 100644 --- a/vendor/k8s.io/api/storage/v1/types.go +++ b/vendor/k8s.io/api/storage/v1/types.go @@ -56,6 +56,7 @@ type StorageClass struct { // e.g. ["ro", "soft"]. Not validated - // mount of the PVs will simply fail if one is invalid. // +optional + // +listType=atomic MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,5,opt,name=mountOptions"` // allowVolumeExpansion shows whether the storage class allow volume expand. @@ -306,7 +307,7 @@ type CSIDriverSpec struct { // deployed on such a cluster and the deployment determines which mode that is, for example // via a command line parameter of the driver. // - // This field is immutable. + // This field was immutable in Kubernetes < 1.29 and now is mutable. // // +optional PodInfoOnMount *bool `json:"podInfoOnMount,omitempty" protobuf:"bytes,2,opt,name=podInfoOnMount"` @@ -353,7 +354,7 @@ type CSIDriverSpec struct { // permission of the volume before being mounted. // Refer to the specific FSGroupPolicy values for additional details. // - // This field is immutable. + // This field was immutable in Kubernetes < 1.29 and now is mutable. // // Defaults to ReadWriteOnceWithFSType, which will examine each volume // to determine if Kubernetes should modify ownership and permissions of the volume. @@ -517,6 +518,8 @@ type CSINodeSpec struct { // If all drivers in the list are uninstalled, this can become empty. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Drivers []CSINodeDriver `json:"drivers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=drivers"` } @@ -549,6 +552,7 @@ type CSINodeDriver struct { // It is possible for different nodes to use different topology keys. // This can be empty if driver does not support topology. // +optional + // +listType=atomic TopologyKeys []string `json:"topologyKeys" protobuf:"bytes,3,rep,name=topologyKeys"` // allocatable represents the volume resources of a node that are available for scheduling. @@ -680,7 +684,5 @@ type CSIStorageCapacityList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name Items []CSIStorageCapacity `json:"items" protobuf:"bytes,2,rep,name=items"` } 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 index 69ee6836107..89b1cbb2010 100644 --- a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go @@ -50,10 +50,10 @@ func (CSIDriverList) SwaggerDoc() map[string]string { var map_CSIDriverSpec = map[string]string{ "": "CSIDriverSpec is the specification of a CSIDriver.", "attachRequired": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable.", - "podInfoOnMount": "podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false.\n\nThe CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext.\n\nThe following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable.", + "podInfoOnMount": "podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false.\n\nThe CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext.\n\nThe following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field was immutable in Kubernetes < 1.29 and now is mutable.", "volumeLifecycleModes": "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism.\n\nThe other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume.\n\nFor more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.\n\nThis field is beta. This field is immutable.", "storageCapacity": "storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information, if set to true.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field was immutable in Kubernetes <= 1.22 and now is mutable.", - "fsGroupPolicy": "fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details.\n\nThis field is immutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", + "fsGroupPolicy": "fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details.\n\nThis field was immutable in Kubernetes < 1.29 and now is mutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", "tokenRequests": "tokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\": {\n \"token\": ,\n \"expirationTimestamp\": ,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.", "requiresRepublish": "requiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.", "seLinuxMount": "seLinuxMount specifies if the CSI driver supports \"-o context\" mount option.\n\nWhen \"true\", the CSI driver must ensure that all volumes provided by this CSI driver can be mounted separately with different `-o context` options. This is typical for storage backends that provide volumes as filesystems on block devices or as independent shared volumes. Kubernetes will call NodeStage / NodePublish with \"-o context=xyz\" mount option when mounting a ReadWriteOncePod volume used in Pod that has explicitly set SELinux context. In the future, it may be expanded to other volume AccessModes. In any case, Kubernetes will ensure that the volume is mounted only with a single SELinux context.\n\nWhen \"false\", Kubernetes won't pass any special SELinux mount options to the driver. This is typical for volumes that represent subdirectories of a bigger shared filesystem.\n\nDefault is \"false\".", diff --git a/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go b/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go index 2b15ec3feb0..86343b170a5 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/storage/v1alpha1/generated.proto +// source: k8s.io/api/storage/v1alpha1/generated.proto package v1alpha1 @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } func (*CSIStorageCapacity) ProtoMessage() {} func (*CSIStorageCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{0} + return fileDescriptor_02e7952e43280c27, []int{0} } func (m *CSIStorageCapacity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_CSIStorageCapacity proto.InternalMessageInfo func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } func (*CSIStorageCapacityList) ProtoMessage() {} func (*CSIStorageCapacityList) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{1} + return fileDescriptor_02e7952e43280c27, []int{1} } func (m *CSIStorageCapacityList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_CSIStorageCapacityList proto.InternalMessageInfo func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } func (*VolumeAttachment) ProtoMessage() {} func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{2} + return fileDescriptor_02e7952e43280c27, []int{2} } func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } func (*VolumeAttachmentList) ProtoMessage() {} func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{3} + return fileDescriptor_02e7952e43280c27, []int{3} } func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } func (*VolumeAttachmentSource) ProtoMessage() {} func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{4} + return fileDescriptor_02e7952e43280c27, []int{4} } func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } func (*VolumeAttachmentSpec) ProtoMessage() {} func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{5} + return fileDescriptor_02e7952e43280c27, []int{5} } func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } func (*VolumeAttachmentStatus) ProtoMessage() {} func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{6} + return fileDescriptor_02e7952e43280c27, []int{6} } func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo func (m *VolumeAttributesClass) Reset() { *m = VolumeAttributesClass{} } func (*VolumeAttributesClass) ProtoMessage() {} func (*VolumeAttributesClass) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{7} + return fileDescriptor_02e7952e43280c27, []int{7} } func (m *VolumeAttributesClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_VolumeAttributesClass proto.InternalMessageInfo func (m *VolumeAttributesClassList) Reset() { *m = VolumeAttributesClassList{} } func (*VolumeAttributesClassList) ProtoMessage() {} func (*VolumeAttributesClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{8} + return fileDescriptor_02e7952e43280c27, []int{8} } func (m *VolumeAttributesClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_VolumeAttributesClassList proto.InternalMessageInfo func (m *VolumeError) Reset() { *m = VolumeError{} } func (*VolumeError) ProtoMessage() {} func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{9} + return fileDescriptor_02e7952e43280c27, []int{9} } func (m *VolumeError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -343,75 +343,75 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/storage/v1alpha1/generated.proto", fileDescriptor_10f856db1e670dc4) -} - -var fileDescriptor_10f856db1e670dc4 = []byte{ - // 1023 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcb, 0x6e, 0x23, 0x45, - 0x17, 0x4e, 0xe7, 0x32, 0xe3, 0xa9, 0xe4, 0xff, 0xc7, 0x53, 0xca, 0x0c, 0xc6, 0x23, 0xb5, 0x23, - 0xaf, 0x0c, 0x62, 0xba, 0x49, 0x40, 0x68, 0x84, 0xc4, 0xc2, 0x9d, 0x64, 0x11, 0x91, 0x84, 0xa1, - 0x1c, 0x01, 0x02, 0x16, 0x94, 0xdb, 0x07, 0xbb, 0x62, 0xf7, 0x45, 0x55, 0xd5, 0x16, 0x66, 0xc5, - 0x8a, 0x35, 0x3b, 0xde, 0x80, 0x67, 0xc9, 0x02, 0x89, 0xd1, 0xac, 0x66, 0x65, 0x91, 0x86, 0x67, - 0x60, 0xc1, 0x06, 0xd4, 0xd5, 0xe5, 0x76, 0xc7, 0x6d, 0x07, 0x27, 0x8b, 0xec, 0x5c, 0xe7, 0xf2, - 0x9d, 0xdb, 0x77, 0x4e, 0x27, 0xe8, 0xa0, 0xff, 0x5c, 0x58, 0x2c, 0xb0, 0xfb, 0x51, 0x1b, 0xb8, - 0x0f, 0x12, 0x84, 0x3d, 0x04, 0xbf, 0x13, 0x70, 0x5b, 0x2b, 0x68, 0xc8, 0x6c, 0x21, 0x03, 0x4e, - 0xbb, 0x60, 0x0f, 0x77, 0xe9, 0x20, 0xec, 0xd1, 0x5d, 0xbb, 0x0b, 0x3e, 0x70, 0x2a, 0xa1, 0x63, - 0x85, 0x3c, 0x90, 0x01, 0x7e, 0x9a, 0x1a, 0x5b, 0x34, 0x64, 0x96, 0x36, 0xb6, 0x26, 0xc6, 0xd5, - 0x67, 0x5d, 0x26, 0x7b, 0x51, 0xdb, 0x72, 0x03, 0xcf, 0xee, 0x06, 0xdd, 0xc0, 0x56, 0x3e, 0xed, - 0xe8, 0x5b, 0xf5, 0x52, 0x0f, 0xf5, 0x2b, 0xc5, 0xaa, 0xd6, 0x73, 0x81, 0xdd, 0x80, 0x27, 0x51, - 0x67, 0xe3,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e, 0x47, 0x03, 0xe5, 0xf9, - 0x89, 0x8f, 0xd1, 0x7a, 0xf2, 0xf7, 0xac, 0x2e, 0xe1, 0xed, 0xe5, 0x4a, 0x38, 0x63, 0x1e, 0x4c, - 0x3f, 0xb5, 0xc9, 0x8b, 0x28, 0x14, 0xfc, 0x16, 0xba, 0xef, 0x81, 0x10, 0xb4, 0x3b, 0xa1, 0xc6, - 0x43, 0x6d, 0x74, 0xff, 0x24, 0x15, 0x93, 0x89, 0xde, 0x69, 0x5e, 0x5c, 0x9a, 0x2b, 0x2f, 0x2f, - 0xcd, 0x95, 0xd7, 0x97, 0xe6, 0xca, 0x0f, 0xb1, 0x69, 0x5c, 0xc4, 0xa6, 0xf1, 0x32, 0x36, 0x8d, - 0xd7, 0xb1, 0x69, 0xfc, 0x1e, 0x9b, 0xc6, 0x4f, 0x7f, 0x98, 0x2b, 0x5f, 0x3e, 0xbd, 0xe6, 0x3f, - 0x98, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x2f, 0x75, 0xee, 0xf8, 0x0c, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/storage/v1alpha1/generated.proto", fileDescriptor_02e7952e43280c27) +} + +var fileDescriptor_02e7952e43280c27 = []byte{ + // 1009 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x3d, 0x6f, 0x23, 0x45, + 0x18, 0xce, 0xda, 0xce, 0x9d, 0x6f, 0x1c, 0x38, 0xdf, 0xc8, 0x77, 0x18, 0x9f, 0xb4, 0x3e, 0xb9, + 0x32, 0x1f, 0x37, 0x4b, 0x02, 0x42, 0x27, 0x24, 0x0a, 0x6f, 0x92, 0x22, 0x22, 0x09, 0xc7, 0x38, + 0x02, 0x04, 0x14, 0x8c, 0xd7, 0x83, 0x3d, 0x89, 0xf7, 0x43, 0x33, 0xb3, 0x16, 0xa6, 0xa2, 0xa2, + 0xa6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0xfc, 0xcc, 0x3b, 0xde, 0xce, 0xe6, 0x11, 0x7f, 0x38, 0xe2, 0x82, 0x2c, 0x22, 0xab, + 0x46, 0xd7, 0xe2, 0x35, 0x73, 0xb0, 0x80, 0x82, 0x73, 0xb8, 0xad, 0xdf, 0x97, 0xf4, 0x27, 0x7e, + 0x80, 0xef, 0x82, 0x32, 0x51, 0x37, 0x94, 0xeb, 0x34, 0xd2, 0x7a, 0x77, 0xf4, 0x3d, 0x4e, 0x2d, + 0x94, 0x86, 0x54, 0x29, 0x96, 0x2c, 0xd6, 0x35, 0x34, 0xa4, 0x5c, 0x33, 0x1a, 0x52, 0x67, 0xac, + 0x21, 0xe3, 0x50, 0xe2, 0x05, 0x9b, 0x59, 0xa4, 0x69, 0x28, 0xc7, 0xfa, 0x1e, 0xa7, 0x16, 0xad, + 0x7f, 0x8b, 0x4b, 0xda, 0xa4, 0xc4, 0x98, 0xc9, 0xa9, 0xaf, 0x72, 0x2a, 0xe7, 0x72, 0xea, 0xa7, + 0x39, 0xf5, 0xe1, 0x2f, 0x06, 0x80, 0x24, 0x85, 0x38, 0x9a, 0x89, 0x35, 0x51, 0xd4, 0x27, 0x37, + 0x18, 0x12, 0xd4, 0xc9, 0xa1, 0xed, 0x7b, 0x92, 0x4f, 0xec, 0x86, 0x8e, 0x02, 0xe6, 0x0d, 0xf0, + 0x92, 0x10, 0xe0, 0x29, 0xa8, 0x24, 0xb7, 0xfb, 0x9c, 0xfb, 0x5c, 0x8f, 0x6d, 0x7b, 0x8d, 0x88, + 0x94, 0xbd, 0x6d, 0x46, 0xd3, 0x66, 0xa5, 0x33, 0x07, 0xf8, 0x67, 0xda, 0xac, 0x64, 0xde, 0x71, + 0x16, 0x3c, 0xe6, 0xea, 0xd3, 0x39, 0x57, 0xe9, 0x26, 0x5c, 0x7b, 0x74, 0x35, 0x57, 0x06, 0xbc, + 0xb1, 0x0f, 0xde, 0x58, 0x51, 0x22, 0x58, 0x05, 0xc5, 0x33, 0x3a, 0x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0x57, 0x91, 0x69, 0xfc, 0x11, 0x99, 0xc6, 0xcf, 0x7f, 0x9a, 0x1b, 0x5f, 0x3d, 0xbe, + 0xe2, 0x3f, 0x98, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x19, 0x2c, 0xaa, 0xdf, 0x0c, 0x00, + 0x00, } func (m *CSIStorageCapacity) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/storage/v1alpha1/generated.proto b/vendor/k8s.io/api/storage/v1alpha1/generated.proto index 49e522be53c..93aefd933a1 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/storage/v1alpha1/generated.proto @@ -119,8 +119,6 @@ message CSIStorageCapacityList { optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name repeated CSIStorageCapacity items = 2; } diff --git a/vendor/k8s.io/api/storage/v1alpha1/types.go b/vendor/k8s.io/api/storage/v1alpha1/types.go index 5957e480749..1fbf65f8190 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/types.go +++ b/vendor/k8s.io/api/storage/v1alpha1/types.go @@ -247,8 +247,6 @@ type CSIStorageCapacityList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name Items []CSIStorageCapacity `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.pb.go b/vendor/k8s.io/api/storage/v1beta1/generated.pb.go index 42ef65ca0fa..c503ec6511c 100644 --- a/vendor/k8s.io/api/storage/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/storage/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/storage/v1beta1/generated.proto +// source: k8s.io/api/storage/v1beta1/generated.proto package v1beta1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *CSIDriver) Reset() { *m = CSIDriver{} } func (*CSIDriver) ProtoMessage() {} func (*CSIDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{0} + return fileDescriptor_73e4f72503e71065, []int{0} } func (m *CSIDriver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_CSIDriver proto.InternalMessageInfo func (m *CSIDriverList) Reset() { *m = CSIDriverList{} } func (*CSIDriverList) ProtoMessage() {} func (*CSIDriverList) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{1} + return fileDescriptor_73e4f72503e71065, []int{1} } func (m *CSIDriverList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_CSIDriverList proto.InternalMessageInfo func (m *CSIDriverSpec) Reset() { *m = CSIDriverSpec{} } func (*CSIDriverSpec) ProtoMessage() {} func (*CSIDriverSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{2} + return fileDescriptor_73e4f72503e71065, []int{2} } func (m *CSIDriverSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_CSIDriverSpec proto.InternalMessageInfo func (m *CSINode) Reset() { *m = CSINode{} } func (*CSINode) ProtoMessage() {} func (*CSINode) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{3} + return fileDescriptor_73e4f72503e71065, []int{3} } func (m *CSINode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_CSINode proto.InternalMessageInfo func (m *CSINodeDriver) Reset() { *m = CSINodeDriver{} } func (*CSINodeDriver) ProtoMessage() {} func (*CSINodeDriver) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{4} + return fileDescriptor_73e4f72503e71065, []int{4} } func (m *CSINodeDriver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_CSINodeDriver proto.InternalMessageInfo func (m *CSINodeList) Reset() { *m = CSINodeList{} } func (*CSINodeList) ProtoMessage() {} func (*CSINodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{5} + return fileDescriptor_73e4f72503e71065, []int{5} } func (m *CSINodeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_CSINodeList proto.InternalMessageInfo func (m *CSINodeSpec) Reset() { *m = CSINodeSpec{} } func (*CSINodeSpec) ProtoMessage() {} func (*CSINodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{6} + return fileDescriptor_73e4f72503e71065, []int{6} } func (m *CSINodeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_CSINodeSpec proto.InternalMessageInfo func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } func (*CSIStorageCapacity) ProtoMessage() {} func (*CSIStorageCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{7} + return fileDescriptor_73e4f72503e71065, []int{7} } func (m *CSIStorageCapacity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_CSIStorageCapacity proto.InternalMessageInfo func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } func (*CSIStorageCapacityList) ProtoMessage() {} func (*CSIStorageCapacityList) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{8} + return fileDescriptor_73e4f72503e71065, []int{8} } func (m *CSIStorageCapacityList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_CSIStorageCapacityList proto.InternalMessageInfo func (m *StorageClass) Reset() { *m = StorageClass{} } func (*StorageClass) ProtoMessage() {} func (*StorageClass) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{9} + return fileDescriptor_73e4f72503e71065, []int{9} } func (m *StorageClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_StorageClass proto.InternalMessageInfo func (m *StorageClassList) Reset() { *m = StorageClassList{} } func (*StorageClassList) ProtoMessage() {} func (*StorageClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{10} + return fileDescriptor_73e4f72503e71065, []int{10} } func (m *StorageClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_StorageClassList proto.InternalMessageInfo func (m *TokenRequest) Reset() { *m = TokenRequest{} } func (*TokenRequest) ProtoMessage() {} func (*TokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{11} + return fileDescriptor_73e4f72503e71065, []int{11} } func (m *TokenRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_TokenRequest proto.InternalMessageInfo func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } func (*VolumeAttachment) ProtoMessage() {} func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{12} + return fileDescriptor_73e4f72503e71065, []int{12} } func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } func (*VolumeAttachmentList) ProtoMessage() {} func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{13} + return fileDescriptor_73e4f72503e71065, []int{13} } func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } func (*VolumeAttachmentSource) ProtoMessage() {} func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{14} + return fileDescriptor_73e4f72503e71065, []int{14} } func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } func (*VolumeAttachmentSpec) ProtoMessage() {} func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{15} + return fileDescriptor_73e4f72503e71065, []int{15} } func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } func (*VolumeAttachmentStatus) ProtoMessage() {} func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{16} + return fileDescriptor_73e4f72503e71065, []int{16} } func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo func (m *VolumeError) Reset() { *m = VolumeError{} } func (*VolumeError) ProtoMessage() {} func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{17} + return fileDescriptor_73e4f72503e71065, []int{17} } func (m *VolumeError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_VolumeError proto.InternalMessageInfo func (m *VolumeNodeResources) Reset() { *m = VolumeNodeResources{} } func (*VolumeNodeResources) ProtoMessage() {} func (*VolumeNodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_7d2980599fd0de80, []int{18} + return fileDescriptor_73e4f72503e71065, []int{18} } func (m *VolumeNodeResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -605,116 +605,115 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/storage/v1beta1/generated.proto", fileDescriptor_7d2980599fd0de80) -} - -var fileDescriptor_7d2980599fd0de80 = []byte{ - // 1672 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1b, 0x4d, - 0x19, 0xcf, 0xc6, 0xce, 0xd7, 0x38, 0x69, 0x92, 0x49, 0x5a, 0x8c, 0x0f, 0x76, 0x64, 0x04, 0x4d, - 0xab, 0xb2, 0x6e, 0x43, 0xa9, 0xaa, 0x4a, 0x95, 0xc8, 0x26, 0x81, 0xba, 0x8d, 0xd3, 0x74, 0x1c, - 0x55, 0x55, 0xc5, 0x81, 0xf1, 0xee, 0xc4, 0x99, 0xc6, 0xfb, 0xd1, 0x9d, 0xd9, 0x10, 0x73, 0x82, - 0x0b, 0x67, 0xc4, 0x81, 0xbf, 0x80, 0x7f, 0x01, 0x24, 0xb8, 0x70, 0xa4, 0x12, 0x12, 0xaa, 0xb8, - 0xd0, 0x93, 0x45, 0xcd, 0x9f, 0xf0, 0x4a, 0xef, 0x21, 0x7a, 0x0f, 0xaf, 0x66, 0x76, 0xec, 0xfd, - 0xb2, 0x9b, 0xe4, 0x3d, 0xf8, 0xe6, 0x79, 0x3e, 0x7e, 0xcf, 0x33, 0xf3, 0x7c, 0xae, 0xc1, 0xce, - 0xe9, 0x63, 0xa6, 0x53, 0xb7, 0x76, 0x1a, 0xb4, 0x88, 0xef, 0x10, 0x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 0x59, 0xc8, 0xa8, 0x7e, 0xb4, - 0x01, 0xf2, 0x0e, 0xb6, 0x89, 0x74, 0x7d, 0x21, 0xd2, 0x39, 0xc0, 0x36, 0x41, 0x92, 0x03, 0x7f, - 0x04, 0x66, 0x1d, 0xd7, 0x22, 0xf5, 0x5d, 0xe9, 0xc0, 0x82, 0x71, 0x43, 0xc9, 0xcc, 0x1e, 0x48, - 0x2a, 0x52, 0x5c, 0xf1, 0x94, 0xdc, 0xf5, 0xdc, 0x8e, 0xdb, 0xee, 0xbe, 0x20, 0xdd, 0x41, 0x72, - 0xcb, 0xa7, 0x3c, 0x8a, 0xd1, 0x51, 0x42, 0x0a, 0xb6, 0x40, 0x01, 0x77, 0x3a, 0xae, 0x89, 0x39, - 0x6e, 0x75, 0x88, 0xcc, 0xd8, 0xc2, 0x56, 0xed, 0x4b, 0x77, 0x0c, 0x2b, 0x42, 0x18, 0x47, 0x6a, - 0x22, 0x30, 0x63, 0xb9, 0xdf, 0xab, 0x14, 0xb6, 0x23, 0x1c, 0x14, 0x07, 0xad, 0xfe, 0x45, 0x03, - 0x05, 0x75, 0xeb, 0x09, 0xb4, 0xb0, 0x67, 0xc9, 0x16, 0xf6, 0x83, 0x2b, 0xc4, 0x6b, 0x4c, 0x03, - 0x33, 0x87, 0x6e, 0xcb, 0xee, 0x75, 0x04, 0xe6, 0x2c, 0x19, 0x34, 0x56, 0xd4, 0x24, 0xf4, 0x9d, - 0x2b, 0x40, 0xab, 0x0e, 0xb9, 0xac, 0x0c, 0xcc, 0x85, 0x67, 0x86, 0x06, 0x50, 0xd5, 0xaf, 0x73, - 0x00, 0xee, 0x34, 0xeb, 0xa9, 0xfe, 0x30, 0x81, 0xb4, 0xa6, 0x60, 0x51, 0x64, 0xce, 0x20, 0x37, - 0x54, 0x7a, 0xff, 0xe4, 0x8a, 0x91, 0xc0, 0x2d, 0xd2, 0x69, 0x92, 0x0e, 0x31, 0xb9, 0xeb, 0x87, - 0x49, 0x76, 0x10, 0x03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 0xa0, - 0x1a, 0x21, 0x19, 0x0d, 0xf8, 0xd5, 0x47, 0x60, 0x6d, 0xc4, 0x27, 0x29, 0xac, 0x80, 0x19, 0x53, - 0xfe, 0xa5, 0x20, 0x1c, 0x9a, 0x31, 0x16, 0x44, 0x97, 0xd9, 0x91, 0xff, 0x25, 0x84, 0x74, 0xe3, - 0x67, 0x1f, 0x3e, 0x97, 0xa7, 0x3e, 0x7e, 0x2e, 0x4f, 0x7d, 0xfa, 0x5c, 0x9e, 0xfa, 0x6d, 0xbf, - 0xac, 0x7d, 0xe8, 0x97, 0xb5, 0x8f, 0xfd, 0xb2, 0xf6, 0xa9, 0x5f, 0xd6, 0xfe, 0xd7, 0x2f, 0x6b, - 0x7f, 0xf8, 0x7f, 0x79, 0xea, 0x6d, 0x69, 0xfc, 0xbf, 0xb5, 0xdf, 0x06, 0x00, 0x00, 0xff, 0xff, - 0xee, 0x44, 0x0b, 0xed, 0xe3, 0x15, 0x00, 0x00, + proto.RegisterFile("k8s.io/api/storage/v1beta1/generated.proto", fileDescriptor_73e4f72503e71065) +} + +var fileDescriptor_73e4f72503e71065 = []byte{ + // 1655 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4d, 0x6f, 0x1b, 0xc5, + 0x1b, 0xcf, 0xc6, 0xce, 0xdb, 0x38, 0x69, 0x92, 0x49, 0xda, 0xbf, 0xff, 0x3e, 0xd8, 0x91, 0x11, + 0x34, 0xad, 0xca, 0xba, 0x0d, 0xa5, 0xaa, 0x2a, 0x55, 0x22, 0x9b, 0x04, 0xea, 0x36, 0x4e, 0xd3, + 0x71, 0x54, 0x55, 0x15, 0x07, 0xc6, 0xeb, 0x89, 0x33, 0x8d, 0xf7, 0xa5, 0x3b, 0xe3, 0x10, 0x73, + 0x82, 0x0b, 0x67, 0xc4, 0x81, 0x4f, 0xc0, 0x57, 0x00, 0x09, 0x2e, 0x1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 0x38, 0xab, 0xad, 0x68, 0xab, 0x99, 0xb5, 0xeb, 0x7a, 0xf0, 0xc8, 0x7d, 0x60, 0xdd, 0x3d, + 0x6c, 0x08, 0x02, 0xd3, 0x85, 0xb4, 0x7e, 0x74, 0x43, 0x7f, 0x58, 0x7b, 0x46, 0x4c, 0x5e, 0x21, + 0x1c, 0x1b, 0xf0, 0x45, 0xa7, 0x30, 0xd6, 0xed, 0x14, 0x40, 0x40, 0x43, 0x7d, 0x54, 0xf8, 0x00, + 0xa4, 0x99, 0x4b, 0xcc, 0xec, 0xb8, 0x44, 0xbf, 0xa2, 0x0f, 0x0f, 0xa1, 0xde, 0x77, 0xab, 0xea, + 0x12, 0xd3, 0x98, 0x55, 0xb0, 0x69, 0x71, 0x42, 0x12, 0xa4, 0xf8, 0x83, 0x06, 0xe6, 0xfa, 0x52, + 0xdb, 0x94, 0x71, 0xf8, 0x71, 0xe2, 0x02, 0xfa, 0xd9, 0x2e, 0x20, 0xb4, 0xa5, 0xfb, 0x0b, 0xca, + 0xce, 0x74, 0x8f, 0x12, 0x72, 0xfe, 0x3e, 0x98, 0xa0, 0x9c, 0x58, 0x2c, 0x3b, 0xbe, 0x92, 0x5a, + 0xcd, 0xac, 0xbd, 0x7d, 0x26, 0xef, 0x8d, 0x39, 0x85, 0x38, 0x51, 0x16, 0xba, 0xc8, 0x87, 0x28, + 0xfe, 0x9e, 0x0e, 0xf9, 0x2e, 0xee, 0x04, 0xef, 0x80, 0x0b, 0x98, 0x73, 0x6c, 0x1e, 0x20, 0xf2, + 0xbc, 0x45, 0x3d, 0x52, 0x97, 0x37, 0x98, 0x36, 0x60, 0xb7, 0x53, 0xb8, 0xb0, 0x1e, 0xe1, 0xa0, + 0x98, 0xa4, 0xd0, 0x75, 0x9d, 0x7a, 0xd9, 0xde, 0x77, 0x1e, 0xda, 0x15, 0xa7, 0x65, 0x73, 0xf9, + 0xc0, 0x4a, 0x77, 0x37, 0xc2, 0x41, 0x31, 0x49, 0x68, 0x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xef, 0x35, 0x30, 0xb5, 0x51, 0x2d, 0xef, 0x38, 0x75, 0x32, 0x82, 0x82, 0x2e, 0x47, 0x0a, 0xfa, + 0xf2, 0x29, 0x25, 0x21, 0x9c, 0x1a, 0x5a, 0xce, 0x7f, 0xf9, 0xe5, 0x2c, 0x64, 0x54, 0x3f, 0x5a, + 0x01, 0x69, 0x1b, 0x5b, 0x44, 0xba, 0x3e, 0x13, 0xe8, 0xec, 0x60, 0x8b, 0x20, 0xc9, 0x81, 0xef, + 0x80, 0x49, 0xdb, 0xa9, 0x93, 0xf2, 0xa6, 0x74, 0x60, 0xc6, 0xb8, 0xa0, 0x64, 0x26, 0x77, 0x24, + 0x15, 0x29, 0xae, 0x78, 0x4a, 0xee, 0xb8, 0x4e, 0xd3, 0x69, 0xb4, 0x1f, 0x90, 0x76, 0x2f, 0xb9, + 0xe5, 0x53, 0xee, 0x85, 0xe8, 0x28, 0x22, 0x05, 0x6b, 0x20, 0x83, 0x9b, 0x4d, 0xc7, 0xc4, 0x1c, + 0xd7, 0x9a, 0x44, 0x66, 0x6c, 0x66, 0xad, 0xf4, 0xa6, 0x3b, 0xfa, 0x15, 0x21, 0x8c, 0x23, 0x35, + 0x11, 0x98, 0x31, 0xdf, 0xed, 0x14, 0x32, 0xeb, 0x01, 0x0e, 0x0a, 0x83, 0x16, 0xbf, 0xd3, 0x40, + 0x46, 0xdd, 0x7a, 0x04, 0x2d, 0xec, 0x5e, 0xb4, 0x85, 0xbd, 0x75, 0x86, 0x78, 0x0d, 0x69, 0x60, + 0x66, 0xdf, 0x6d, 0xd9, 0xbd, 0xf6, 0xc0, 0x54, 0x5d, 0x06, 0x8d, 0x65, 0x35, 0x09, 0x7d, 0xe5, + 0x0c, 0xd0, 0xaa, 0x43, 0xce, 0x2b, 0x03, 0x53, 0xfe, 0x99, 0xa1, 0x1e, 0x54, 0xf1, 0xef, 0x14, + 0x80, 0x1b, 0xd5, 0x72, 0xac, 0x3f, 0x8c, 0x20, 0xad, 0x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9, + 0xdc, 0x6b, 0x07, 0x2e, 0x06, 0x0c, 0x14, 0xc2, 0x87, 0x87, 0x60, 0xce, 0x23, 0x66, 0x13, 0x53, + 0x4b, 0x8d, 0xf5, 0xb4, 0x74, 0x73, 0x4b, 0x8c, 0x57, 0x14, 0x66, 0x9c, 0x74, 0x0a, 0xd7, 0x93, + 0x2b, 0xba, 0xbe, 0x4b, 0x3c, 0x46, 0x19, 0x27, 0x36, 0xf7, 0x53, 0x27, 0xa2, 0x83, 0xa2, 0xd8, + 0x62, 0x04, 0x58, 0x62, 0x40, 0x3e, 0x74, 0x39, 0x75, 0x6c, 0x96, 0x9d, 0x08, 0x46, 0x40, 0x25, + 0x44, 0x47, 0x11, 0x29, 0xb8, 0x0d, 0x96, 0x45, 0xb7, 0xfe, 0xd4, 0x37, 0xb0, 0x75, 0xec, 0x62, + 0x5b, 0x3c, 0x55, 0x76, 0x52, 0xce, 0xe2, 0xac, 0xd8, 0x8e, 0xd6, 0x07, 0xf0, 0xd1, 0x40, 0x2d, + 0xf8, 0x04, 0x2c, 0xfa, 0xeb, 0x91, 0x41, 0xed, 0x3a, 0xb5, 0x1b, 0x62, 0x39, 0x92, 0x6b, 0xc1, + 0x8c, 0x71, 0x55, 0xd4, 0xc6, 0xe3, 0x38, 0xf3, 0x64, 0x10, 0x11, 0x25, 0x41, 0xe0, 0x73, 0xb0, + 0x28, 0x2d, 0x92, 0xba, 0x6a, 0x2c, 0x94, 0xb0, 0xec, 0x74, 0x72, 0xb7, 0x11, 0x4f, 0x27, 0x12, + 0xa9, 0xd7, 0x7e, 0x7a, 0x6d, 0x6a, 0x8f, 0x78, 0x96, 0xf1, 0x7f, 0x15, 0xaf, 0xc5, 0xf5, 0x38, + 0x14, 0x4a, 0xa2, 0xe7, 0xee, 0x82, 0xf9, 0x58, 0xc0, 0xe1, 0x02, 0x48, 0x1d, 0x92, 0xb6, 0x3f, + 0xaf, 0x91, 0xf8, 0x09, 0x97, 0xc1, 0xc4, 0x11, 0x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x35, 0x96, + 0x83, 0x70, 0x0f, 0x6c, 0x28, 0x71, 0x64, 0x19, 0xe6, 0x65, 0xb1, 0xbd, 0x94, 0x63, 0x28, 0x28, + 0x81, 0x5b, 0xfc, 0x75, 0x40, 0x78, 0xe4, 0x5a, 0x29, 0x2a, 0x4a, 0x52, 0x88, 0x97, 0xa8, 0x28, + 0x45, 0x47, 0x7d, 0x09, 0x99, 0x41, 0xf2, 0x29, 0x94, 0xa3, 0xe7, 0xcb, 0x20, 0xa9, 0x19, 0xca, + 0x20, 0x79, 0x46, 0x0a, 0x51, 0x78, 0x22, 0xd6, 0xb6, 0xd0, 0x7a, 0xd6, 0xf7, 0x64, 0x47, 0xd1, + 0x51, 0x5f, 0xa2, 0xf8, 0x4f, 0x6a, 0x40, 0x94, 0x64, 0x2a, 0x86, 0xae, 0xd4, 0xfb, 0xc2, 0x8f, + 0x5f, 0xa9, 0xde, 0xbf, 0x52, 0x1d, 0x7e, 0xa3, 0x01, 0x88, 0xfb, 0x10, 0x95, 0x5e, 0xaa, 0xfa, + 0xf9, 0x74, 0xff, 0xfc, 0x15, 0xa2, 0xaf, 0x27, 0xc0, 0xfc, 0x59, 0x9d, 0x53, 0x4e, 0xc0, 0xa4, + 0x00, 0x1a, 0xe0, 0x01, 0xa4, 0x20, 0xe3, 0x53, 0xb7, 0x3c, 0xcf, 0xf1, 0x54, 0xc9, 0x5e, 0x3e, + 0xdd, 0x21, 0x29, 0x6e, 0xe4, 0xe5, 0x37, 0x51, 0xa0, 0x7f, 0xd2, 0x29, 0x64, 0x42, 0x7c, 0x14, + 0xc6, 0x16, 0xa6, 0xea, 0x24, 0x30, 0x95, 0xfe, 0x0f, 0xa6, 0x36, 0xc9, 0x70, 0x53, 0x21, 0xec, + 0xdc, 0x16, 0xf8, 0xdf, 0x90, 0x07, 0x3a, 0xd7, 0x6c, 0xfb, 0x52, 0x03, 0x61, 0x1b, 0x70, 0x1b, + 0xa4, 0x39, 0x55, 0x95, 0x98, 0x59, 0xbb, 0x7a, 0xb6, 0x0e, 0xb3, 0x47, 0x2d, 0x12, 0x34, 0x4a, + 0x71, 0x42, 0x12, 0x05, 0x5e, 0x01, 0x53, 0x16, 0x61, 0x0c, 0x37, 0x94, 0xe5, 0xe0, 0x03, 0xaa, + 0xe2, 0x93, 0x51, 0x8f, 0x5f, 0xbc, 0x05, 0x96, 0x06, 0x7c, 0x92, 0xc2, 0x02, 0x98, 0x30, 0xe5, + 0x5f, 0x0a, 0xc2, 0xa1, 0x09, 0x63, 0x46, 0x74, 0x99, 0x0d, 0xf9, 0x5f, 0x82, 0x4f, 0x37, 0x3e, + 0x78, 0xf1, 0x3a, 0x3f, 0xf6, 0xf2, 0x75, 0x7e, 0xec, 0xd5, 0xeb, 0xfc, 0xd8, 0xe7, 0xdd, 0xbc, + 0xf6, 0xa2, 0x9b, 0xd7, 0x5e, 0x76, 0xf3, 0xda, 0xab, 0x6e, 0x5e, 0xfb, 0xa3, 0x9b, 0xd7, 0xbe, + 0xfa, 0x33, 0x3f, 0xf6, 0x34, 0x37, 0xfc, 0xdf, 0xda, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x12, + 0x41, 0x18, 0xc9, 0xca, 0x15, 0x00, 0x00, } func (m *CSIDriver) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.proto b/vendor/k8s.io/api/storage/v1beta1/generated.proto index b99fd39e48a..f6e619d05da 100644 --- a/vendor/k8s.io/api/storage/v1beta1/generated.proto +++ b/vendor/k8s.io/api/storage/v1beta1/generated.proto @@ -127,6 +127,7 @@ message CSIDriverSpec { // This field is immutable. // // +optional + // +listType=atomic repeated string volumeLifecycleModes = 3; // storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage @@ -263,6 +264,7 @@ message CSINodeDriver { // It is possible for different nodes to use different topology keys. // This can be empty if driver does not support topology. // +optional + // +listType=atomic repeated string topologyKeys = 3; // allocatable represents the volume resources of a node that are available for scheduling. @@ -287,6 +289,8 @@ message CSINodeSpec { // If all drivers in the list are uninstalled, this can become empty. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name repeated CSINodeDriver drivers = 1; } @@ -379,8 +383,6 @@ message CSIStorageCapacityList { optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name repeated CSIStorageCapacity items = 2; } @@ -412,6 +414,7 @@ message StorageClass { // e.g. ["ro", "soft"]. Not validated - // mount of the PVs will simply fail if one is invalid. // +optional + // +listType=atomic repeated string mountOptions = 5; // allowVolumeExpansion shows whether the storage class allow volume expand diff --git a/vendor/k8s.io/api/storage/v1beta1/types.go b/vendor/k8s.io/api/storage/v1beta1/types.go index 0f5ade3c138..9333a28b8d0 100644 --- a/vendor/k8s.io/api/storage/v1beta1/types.go +++ b/vendor/k8s.io/api/storage/v1beta1/types.go @@ -59,6 +59,7 @@ type StorageClass struct { // e.g. ["ro", "soft"]. Not validated - // mount of the PVs will simply fail if one is invalid. // +optional + // +listType=atomic MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,5,opt,name=mountOptions"` // allowVolumeExpansion shows whether the storage class allow volume expand @@ -347,6 +348,7 @@ type CSIDriverSpec struct { // This field is immutable. // // +optional + // +listType=atomic VolumeLifecycleModes []VolumeLifecycleMode `json:"volumeLifecycleModes,omitempty" protobuf:"bytes,3,opt,name=volumeLifecycleModes"` // storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage @@ -535,6 +537,8 @@ type CSINodeSpec struct { // If all drivers in the list are uninstalled, this can become empty. // +patchMergeKey=name // +patchStrategy=merge + // +listType=map + // +listMapKey=name Drivers []CSINodeDriver `json:"drivers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=drivers"` } @@ -567,6 +571,7 @@ type CSINodeDriver struct { // It is possible for different nodes to use different topology keys. // This can be empty if driver does not support topology. // +optional + // +listType=atomic TopologyKeys []string `json:"topologyKeys" protobuf:"bytes,3,rep,name=topologyKeys"` // allocatable represents the volume resources of a node that are available for scheduling. @@ -707,7 +712,5 @@ type CSIStorageCapacityList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name Items []CSIStorageCapacity `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go b/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go new file mode 100644 index 00000000000..192f9ff3c3c --- /dev/null +++ b/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go @@ -0,0 +1,23 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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:protobuf-gen=package +// +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true +// +groupName=storagemigration.k8s.io + +package v1alpha1 // import "k8s.io/api/storagemigration/v1alpha1" diff --git a/vendor/k8s.io/api/storagemigration/v1alpha1/generated.pb.go b/vendor/k8s.io/api/storagemigration/v1alpha1/generated.pb.go new file mode 100644 index 00000000000..ed57f34b59e --- /dev/null +++ b/vendor/k8s.io/api/storagemigration/v1alpha1/generated.pb.go @@ -0,0 +1,1688 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/api/storagemigration/v1alpha1/generated.proto + +package v1alpha1 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + + k8s_io_api_core_v1 "k8s.io/api/core/v1" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } +func (*GroupVersionResource) ProtoMessage() {} +func (*GroupVersionResource) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{0} +} +func (m *GroupVersionResource) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupVersionResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GroupVersionResource) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupVersionResource.Merge(m, src) +} +func (m *GroupVersionResource) XXX_Size() int { + return m.Size() +} +func (m *GroupVersionResource) XXX_DiscardUnknown() { + xxx_messageInfo_GroupVersionResource.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupVersionResource proto.InternalMessageInfo + +func (m *MigrationCondition) Reset() { *m = MigrationCondition{} } +func (*MigrationCondition) ProtoMessage() {} +func (*MigrationCondition) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{1} +} +func (m *MigrationCondition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MigrationCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MigrationCondition) XXX_Merge(src proto.Message) { + xxx_messageInfo_MigrationCondition.Merge(m, src) +} +func (m *MigrationCondition) XXX_Size() int { + return m.Size() +} +func (m *MigrationCondition) XXX_DiscardUnknown() { + xxx_messageInfo_MigrationCondition.DiscardUnknown(m) +} + +var xxx_messageInfo_MigrationCondition proto.InternalMessageInfo + +func (m *StorageVersionMigration) Reset() { *m = StorageVersionMigration{} } +func (*StorageVersionMigration) ProtoMessage() {} +func (*StorageVersionMigration) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{2} +} +func (m *StorageVersionMigration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageVersionMigration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *StorageVersionMigration) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageVersionMigration.Merge(m, src) +} +func (m *StorageVersionMigration) XXX_Size() int { + return m.Size() +} +func (m *StorageVersionMigration) XXX_DiscardUnknown() { + xxx_messageInfo_StorageVersionMigration.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageVersionMigration proto.InternalMessageInfo + +func (m *StorageVersionMigrationList) Reset() { *m = StorageVersionMigrationList{} } +func (*StorageVersionMigrationList) ProtoMessage() {} +func (*StorageVersionMigrationList) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{3} +} +func (m *StorageVersionMigrationList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageVersionMigrationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *StorageVersionMigrationList) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageVersionMigrationList.Merge(m, src) +} +func (m *StorageVersionMigrationList) XXX_Size() int { + return m.Size() +} +func (m *StorageVersionMigrationList) XXX_DiscardUnknown() { + xxx_messageInfo_StorageVersionMigrationList.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageVersionMigrationList proto.InternalMessageInfo + +func (m *StorageVersionMigrationSpec) Reset() { *m = StorageVersionMigrationSpec{} } +func (*StorageVersionMigrationSpec) ProtoMessage() {} +func (*StorageVersionMigrationSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{4} +} +func (m *StorageVersionMigrationSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageVersionMigrationSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *StorageVersionMigrationSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageVersionMigrationSpec.Merge(m, src) +} +func (m *StorageVersionMigrationSpec) XXX_Size() int { + return m.Size() +} +func (m *StorageVersionMigrationSpec) XXX_DiscardUnknown() { + xxx_messageInfo_StorageVersionMigrationSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageVersionMigrationSpec proto.InternalMessageInfo + +func (m *StorageVersionMigrationStatus) Reset() { *m = StorageVersionMigrationStatus{} } +func (*StorageVersionMigrationStatus) ProtoMessage() {} +func (*StorageVersionMigrationStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_0117377a57b172b9, []int{5} +} +func (m *StorageVersionMigrationStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StorageVersionMigrationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *StorageVersionMigrationStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageVersionMigrationStatus.Merge(m, src) +} +func (m *StorageVersionMigrationStatus) XXX_Size() int { + return m.Size() +} +func (m *StorageVersionMigrationStatus) XXX_DiscardUnknown() { + xxx_messageInfo_StorageVersionMigrationStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageVersionMigrationStatus proto.InternalMessageInfo + +func init() { + proto.RegisterType((*GroupVersionResource)(nil), "k8s.io.api.storagemigration.v1alpha1.GroupVersionResource") + proto.RegisterType((*MigrationCondition)(nil), "k8s.io.api.storagemigration.v1alpha1.MigrationCondition") + proto.RegisterType((*StorageVersionMigration)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigration") + proto.RegisterType((*StorageVersionMigrationList)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationList") + proto.RegisterType((*StorageVersionMigrationSpec)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationSpec") + proto.RegisterType((*StorageVersionMigrationStatus)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationStatus") +} + +func init() { + proto.RegisterFile("k8s.io/api/storagemigration/v1alpha1/generated.proto", fileDescriptor_0117377a57b172b9) +} + +var fileDescriptor_0117377a57b172b9 = []byte{ + // 719 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x4f, 0x13, 0x4f, + 0x14, 0xef, 0x42, 0x0b, 0x7c, 0xa7, 0x5f, 0xc0, 0x4c, 0x14, 0x1a, 0x8c, 0x5b, 0x53, 0x09, 0x41, + 0xa3, 0xb3, 0xd2, 0x10, 0x43, 0x30, 0x1e, 0x28, 0x07, 0xa3, 0x81, 0x98, 0x0c, 0xc8, 0xc1, 0x78, + 0x70, 0xba, 0x1d, 0xb7, 0x43, 0xd9, 0x9d, 0xcd, 0xce, 0x6c, 0x13, 0x6e, 0xfe, 0x09, 0x1e, 0xfc, + 0x93, 0x3c, 0x70, 0x31, 0xe1, 0xc8, 0xc5, 0x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x39, 0xb7, 0xc0, 0x83, 0x1b, + 0x25, 0x86, 0x27, 0x00, 0xb8, 0xe9, 0xd0, 0x8b, 0x92, 0xa5, 0x3b, 0xba, 0x35, 0x59, 0x29, 0xa3, + 0xfb, 0xa7, 0x37, 0x08, 0x99, 0x49, 0xe0, 0x3e, 0x7e, 0xb8, 0x03, 0x16, 0xd3, 0xc2, 0x8e, 0x06, + 0x36, 0xe9, 0xb2, 0x01, 0x2e, 0xe2, 0x41, 0x37, 0x1e, 0x8e, 0xaf, 0xbd, 0x3d, 0xbb, 0xb4, 0x73, + 0xe7, 0x97, 0x76, 0xee, 0xe2, 0xd2, 0xce, 0x7d, 0xe9, 0xda, 0xd6, 0x59, 0xd7, 0xb6, 0xce, 0xbb, + 0xb6, 0x75, 0xd1, 0xb5, 0xad, 0xdf, 0x5d, 0xdb, 0xfa, 0xfa, 0xc7, 0xce, 0x7d, 0x58, 0x9d, 0xe4, + 0xb7, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x01, 0xc1, 0xb1, 0xd8, 0x5d, 0x07, 0x00, 0x00, +} + +func (m *GroupVersionResource) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupVersionResource) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupVersionResource) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0x1a + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + i -= len(m.Group) + copy(dAtA[i:], m.Group) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MigrationCondition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MigrationCondition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MigrationCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x2a + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x22 + { + size, err := m.LastUpdateTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0x12 + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StorageVersionMigration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageVersionMigration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageVersionMigration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StorageVersionMigrationList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageVersionMigrationList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageVersionMigrationList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StorageVersionMigrationSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageVersionMigrationSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageVersionMigrationSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.ContinueToken) + copy(dAtA[i:], m.ContinueToken) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContinueToken))) + i-- + dAtA[i] = 0x12 + { + size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *StorageVersionMigrationStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageVersionMigrationStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageVersionMigrationStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x12 + if len(m.Conditions) > 0 { + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GroupVersionResource) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = 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)) + return n +} + +func (m *MigrationCondition) Size() (n int) { + if m == nil { + return 0 + } + 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.LastUpdateTime.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 *StorageVersionMigration) Size() (n int) { + if m == nil { + return 0 + } + 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 *StorageVersionMigrationList) Size() (n int) { + if m == nil { + return 0 + } + 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 *StorageVersionMigrationSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Resource.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ContinueToken) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *StorageVersionMigrationStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *GroupVersionResource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GroupVersionResource{`, + `Group:` + fmt.Sprintf("%v", this.Group) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `}`, + }, "") + return s +} +func (this *MigrationCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MigrationCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `LastUpdateTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastUpdateTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `}`, + }, "") + return s +} +func (this *StorageVersionMigration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StorageVersionMigration{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StorageVersionMigrationSpec", "StorageVersionMigrationSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StorageVersionMigrationStatus", "StorageVersionMigrationStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *StorageVersionMigrationList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]StorageVersionMigration{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "StorageVersionMigration", "StorageVersionMigration", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&StorageVersionMigrationList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *StorageVersionMigrationSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StorageVersionMigrationSpec{`, + `Resource:` + strings.Replace(strings.Replace(this.Resource.String(), "GroupVersionResource", "GroupVersionResource", 1), `&`, ``, 1) + `,`, + `ContinueToken:` + fmt.Sprintf("%v", this.ContinueToken) + `,`, + `}`, + }, "") + return s +} +func (this *StorageVersionMigrationStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForConditions := "[]MigrationCondition{" + for _, f := range this.Conditions { + repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "MigrationCondition", "MigrationCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForConditions += "}" + s := strings.Join([]string{`&StorageVersionMigrationStatus{`, + `Conditions:` + repeatedStringForConditions + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `}`, + }, "") + 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 *GroupVersionResource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupVersionResource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupVersionResource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MigrationCondition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MigrationCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MigrationCondition: 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = MigrationConditionType(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 < 0 { + return ErrInvalidLengthGenerated + } + 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 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastUpdateTime.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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageVersionMigration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageVersionMigration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageVersionMigration: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageVersionMigrationList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageVersionMigrationList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageVersionMigrationList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, StorageVersionMigration{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageVersionMigrationSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageVersionMigrationSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageVersionMigrationSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContinueToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContinueToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageVersionMigrationStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageVersionMigrationStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageVersionMigrationStatus: 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, MigrationCondition{}) + 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 ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 + depth := 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 + } + } + case 1: + iNdEx += 8 + 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 + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/k8s.io/api/storagemigration/v1alpha1/generated.proto b/vendor/k8s.io/api/storagemigration/v1alpha1/generated.proto new file mode 100644 index 00000000000..fc8a3346e2e --- /dev/null +++ b/vendor/k8s.io/api/storagemigration/v1alpha1/generated.proto @@ -0,0 +1,127 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = "proto2"; + +package k8s.io.api.storagemigration.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"; + +// Package-wide variables from generator "generated". +option go_package = "k8s.io/api/storagemigration/v1alpha1"; + +// The names of the group, the version, and the resource. +message GroupVersionResource { + // The name of the group. + optional string group = 1; + + // The name of the version. + optional string version = 2; + + // The name of the resource. + optional string resource = 3; +} + +// Describes the state of a migration at a certain point. +message MigrationCondition { + // Type of the 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 + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 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; +} + +// StorageVersionMigration represents a migration of stored data to the latest +// storage version. +message StorageVersionMigration { + // Standard object metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the migration. + // +optional + optional StorageVersionMigrationSpec spec = 2; + + // Status of the migration. + // +optional + optional StorageVersionMigrationStatus status = 3; +} + +// StorageVersionMigrationList is a collection of storage version migrations. +message StorageVersionMigrationList { + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of StorageVersionMigration + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + repeated StorageVersionMigration items = 2; +} + +// Spec of the storage version migration. +message StorageVersionMigrationSpec { + // The resource that is being migrated. The migrator sends requests to + // the endpoint serving the resource. + // Immutable. + optional GroupVersionResource resource = 1; + + // The token used in the list options to get the next chunk of objects + // to migrate. When the .status.conditions indicates the migration is + // "Running", users can use this token to check the progress of the + // migration. + // +optional + optional string continueToken = 2; +} + +// Status of the storage version migration. +message StorageVersionMigrationStatus { + // The latest available observations of the migration's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + repeated MigrationCondition conditions = 1; + + // ResourceVersion to compare with the GC cache for performing the migration. + // This is the current resource version of given group, version and resource when + // kube-controller-manager first observes this StorageVersionMigration resource. + optional string resourceVersion = 2; +} + diff --git a/vendor/k8s.io/api/storagemigration/v1alpha1/register.go b/vendor/k8s.io/api/storagemigration/v1alpha1/register.go new file mode 100644 index 00000000000..c9706050f12 --- /dev/null +++ b/vendor/k8s.io/api/storagemigration/v1alpha1/register.go @@ -0,0 +1,58 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// GroupName is the group name use in this package +const GroupName = "storagemigration.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = 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, + &StorageVersionMigration{}, + &StorageVersionMigrationList{}, + ) + + // Add the watch version that applies + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/api/storagemigration/v1alpha1/types.go b/vendor/k8s.io/api/storagemigration/v1alpha1/types.go new file mode 100644 index 00000000000..0f343d1e956 --- /dev/null +++ b/vendor/k8s.io/api/storagemigration/v1alpha1/types.go @@ -0,0 +1,131 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 ( + corev1 "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 +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// StorageVersionMigration represents a migration of stored data to the latest +// storage version. +type StorageVersionMigration struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the migration. + // +optional + Spec StorageVersionMigrationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + // Status of the migration. + // +optional + Status StorageVersionMigrationStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// Spec of the storage version migration. +type StorageVersionMigrationSpec struct { + // The resource that is being migrated. The migrator sends requests to + // the endpoint serving the resource. + // Immutable. + Resource GroupVersionResource `json:"resource" protobuf:"bytes,1,opt,name=resource"` + // The token used in the list options to get the next chunk of objects + // to migrate. When the .status.conditions indicates the migration is + // "Running", users can use this token to check the progress of the + // migration. + // +optional + ContinueToken string `json:"continueToken,omitempty" protobuf:"bytes,2,opt,name=continueToken"` + // TODO: consider recording the storage version hash when the migration + // is created. It can avoid races. +} + +// The names of the group, the version, and the resource. +type GroupVersionResource struct { + // The name of the group. + Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` + // The name of the version. + Version string `json:"version,omitempty" protobuf:"bytes,2,opt,name=version"` + // The name of the resource. + Resource string `json:"resource,omitempty" protobuf:"bytes,3,opt,name=resource"` +} + +type MigrationConditionType string + +const ( + // Indicates that the migration is running. + MigrationRunning MigrationConditionType = "Running" + // Indicates that the migration has completed successfully. + MigrationSucceeded MigrationConditionType = "Succeeded" + // Indicates that the migration has failed. + MigrationFailed MigrationConditionType = "Failed" +) + +// Describes the state of a migration at a certain point. +type MigrationCondition struct { + // Type of the condition. + Type MigrationConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=MigrationConditionType"` + // Status of the condition, one of True, False, Unknown. + Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` + // The last time this condition was updated. + // +optional + LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,3,opt,name=lastUpdateTime"` + // 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"` +} + +// Status of the storage version migration. +type StorageVersionMigrationStatus struct { + // The latest available observations of the migration's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []MigrationCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` + // ResourceVersion to compare with the GC cache for performing the migration. + // This is the current resource version of given group, version and resource when + // kube-controller-manager first observes this StorageVersionMigration resource. + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.30 + +// StorageVersionMigrationList is a collection of storage version migrations. +type StorageVersionMigrationList struct { + metav1.TypeMeta `json:",inline"` + + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Items is the list of StorageVersionMigration + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Items []StorageVersionMigration `json:"items" listType:"map" listMapKey:"type" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/api/storagemigration/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storagemigration/v1alpha1/types_swagger_doc_generated.go new file mode 100644 index 00000000000..257d72a2363 --- /dev/null +++ b/vendor/k8s.io/api/storagemigration/v1alpha1/types_swagger_doc_generated.go @@ -0,0 +1,95 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +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-codegen.sh + +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_GroupVersionResource = map[string]string{ + "": "The names of the group, the version, and the resource.", + "group": "The name of the group.", + "version": "The name of the version.", + "resource": "The name of the resource.", +} + +func (GroupVersionResource) SwaggerDoc() map[string]string { + return map_GroupVersionResource +} + +var map_MigrationCondition = map[string]string{ + "": "Describes the state of a migration at a certain point.", + "type": "Type of the condition.", + "status": "Status of the condition, one of True, False, Unknown.", + "lastUpdateTime": "The last time this condition was updated.", + "reason": "The reason for the condition's last transition.", + "message": "A human readable message indicating details about the transition.", +} + +func (MigrationCondition) SwaggerDoc() map[string]string { + return map_MigrationCondition +} + +var map_StorageVersionMigration = map[string]string{ + "": "StorageVersionMigration represents a migration of stored data to the latest storage version.", + "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the migration.", + "status": "Status of the migration.", +} + +func (StorageVersionMigration) SwaggerDoc() map[string]string { + return map_StorageVersionMigration +} + +var map_StorageVersionMigrationList = map[string]string{ + "": "StorageVersionMigrationList is a collection of storage version migrations.", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "Items is the list of StorageVersionMigration", +} + +func (StorageVersionMigrationList) SwaggerDoc() map[string]string { + return map_StorageVersionMigrationList +} + +var map_StorageVersionMigrationSpec = map[string]string{ + "": "Spec of the storage version migration.", + "resource": "The resource that is being migrated. The migrator sends requests to the endpoint serving the resource. Immutable.", + "continueToken": "The token used in the list options to get the next chunk of objects to migrate. When the .status.conditions indicates the migration is \"Running\", users can use this token to check the progress of the migration.", +} + +func (StorageVersionMigrationSpec) SwaggerDoc() map[string]string { + return map_StorageVersionMigrationSpec +} + +var map_StorageVersionMigrationStatus = map[string]string{ + "": "Status of the storage version migration.", + "conditions": "The latest available observations of the migration's current state.", + "resourceVersion": "ResourceVersion to compare with the GC cache for performing the migration. This is the current resource version of given group, version and resource when kube-controller-manager first observes this StorageVersionMigration resource.", +} + +func (StorageVersionMigrationStatus) SwaggerDoc() map[string]string { + return map_StorageVersionMigrationStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000000..9d35011d59c --- /dev/null +++ b/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,160 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package 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 *GroupVersionResource) DeepCopyInto(out *GroupVersionResource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionResource. +func (in *GroupVersionResource) DeepCopy() *GroupVersionResource { + if in == nil { + return nil + } + out := new(GroupVersionResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MigrationCondition) DeepCopyInto(out *MigrationCondition) { + *out = *in + in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigrationCondition. +func (in *MigrationCondition) DeepCopy() *MigrationCondition { + if in == nil { + return nil + } + out := new(MigrationCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageVersionMigration) DeepCopyInto(out *StorageVersionMigration) { + *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 StorageVersionMigration. +func (in *StorageVersionMigration) DeepCopy() *StorageVersionMigration { + if in == nil { + return nil + } + out := new(StorageVersionMigration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageVersionMigration) 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 *StorageVersionMigrationList) DeepCopyInto(out *StorageVersionMigrationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]StorageVersionMigration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationList. +func (in *StorageVersionMigrationList) DeepCopy() *StorageVersionMigrationList { + if in == nil { + return nil + } + out := new(StorageVersionMigrationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StorageVersionMigrationList) 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 *StorageVersionMigrationSpec) DeepCopyInto(out *StorageVersionMigrationSpec) { + *out = *in + out.Resource = in.Resource + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationSpec. +func (in *StorageVersionMigrationSpec) DeepCopy() *StorageVersionMigrationSpec { + if in == nil { + return nil + } + out := new(StorageVersionMigrationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StorageVersionMigrationStatus) DeepCopyInto(out *StorageVersionMigrationStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]MigrationCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationStatus. +func (in *StorageVersionMigrationStatus) DeepCopy() *StorageVersionMigrationStatus { + if in == nil { + return nil + } + out := new(StorageVersionMigrationStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..acdb5743512 --- /dev/null +++ b/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,58 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1alpha1 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *StorageVersionMigration) APILifecycleIntroduced() (major, minor int) { + return 1, 30 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *StorageVersionMigration) APILifecycleDeprecated() (major, minor int) { + return 1, 33 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *StorageVersionMigration) APILifecycleRemoved() (major, minor int) { + return 1, 36 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *StorageVersionMigrationList) APILifecycleIntroduced() (major, minor int) { + return 1, 30 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *StorageVersionMigrationList) APILifecycleDeprecated() (major, minor int) { + return 1, 33 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *StorageVersionMigrationList) APILifecycleRemoved() (major, minor int) { + return 1, 36 +} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go index b1c5f6f4c09..6556eda65d5 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go @@ -70,6 +70,12 @@ type CustomResourceDefinitionSpec struct { // Top-level and per-version columns are mutually exclusive. // +optional AdditionalPrinterColumns []CustomResourceColumnDefinition + // selectableFields specifies paths to fields that may be used as field selectors. + // A maximum of 8 selectable fields are allowed. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // Top-level and per-version columns are mutually exclusive. + // +optional + SelectableFields []SelectableField // `conversion` defines conversion settings for the CRD. Conversion *CustomResourceConversion @@ -207,6 +213,25 @@ type CustomResourceDefinitionVersion struct { // be explicitly set to null // +optional AdditionalPrinterColumns []CustomResourceColumnDefinition + + // selectableFields specifies paths to fields that may be used as field selectors. + // A maximum of 8 selectable fields are allowed. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // +optional + SelectableFields []SelectableField +} + +// SelectableField specifies the JSON path of a field that may be used with field selectors. +type SelectableField struct { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. + JSONPath string } // CustomResourceColumnDefinition specifies a column for server side printing. diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go index 4d29ff8235d..2ca72bb16b3 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go @@ -80,7 +80,7 @@ func Convert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefi out.Versions = []CustomResourceDefinitionVersion{{Name: in.Version, Served: true, Storage: true}} } - // If spec.{subresources,validation,additionalPrinterColumns} exists, move to versions + // If spec.{subresources,validation,additionalPrinterColumns,selectableFields} exists, move to versions if in.Subresources != nil { subresources := &CustomResourceSubresources{} if err := Convert_apiextensions_CustomResourceSubresources_To_v1_CustomResourceSubresources(in.Subresources, subresources, s); err != nil { @@ -110,6 +110,17 @@ func Convert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefi out.Versions[i].AdditionalPrinterColumns = additionalPrinterColumns } } + if in.SelectableFields != nil { + selectableFields := make([]SelectableField, len(in.SelectableFields)) + for i := range in.SelectableFields { + if err := Convert_apiextensions_SelectableField_To_v1_SelectableField(&in.SelectableFields[i], &selectableFields[i], s); err != nil { + return err + } + } + for i := range out.Versions { + out.Versions[i].SelectableFields = selectableFields + } + } return nil } @@ -125,13 +136,15 @@ func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefi // Copy versions[0] to version out.Version = out.Versions[0].Name - // If versions[*].{subresources,schema,additionalPrinterColumns} are identical, move to spec + // If versions[*].{subresources,schema,additionalPrinterColumns,selectableFields} are identical, move to spec subresources := out.Versions[0].Subresources subresourcesIdentical := true validation := out.Versions[0].Schema validationIdentical := true additionalPrinterColumns := out.Versions[0].AdditionalPrinterColumns additionalPrinterColumnsIdentical := true + selectableFields := out.Versions[0].SelectableFields + selectableFieldsIdentical := true // Detect if per-version fields are identical for _, v := range out.Versions { @@ -144,6 +157,9 @@ func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefi if additionalPrinterColumnsIdentical && !apiequality.Semantic.DeepEqual(v.AdditionalPrinterColumns, additionalPrinterColumns) { additionalPrinterColumnsIdentical = false } + if selectableFieldsIdentical && !apiequality.Semantic.DeepEqual(v.SelectableFields, selectableFields) { + selectableFieldsIdentical = false + } } // If they are, set the top-level fields and clear the per-version fields @@ -156,6 +172,9 @@ func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefi if additionalPrinterColumnsIdentical { out.AdditionalPrinterColumns = additionalPrinterColumns } + if selectableFieldsIdentical { + out.SelectableFields = selectableFields + } for i := range out.Versions { if subresourcesIdentical { out.Versions[i].Subresources = nil @@ -166,6 +185,9 @@ func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefi if additionalPrinterColumnsIdentical { out.Versions[i].AdditionalPrinterColumns = nil } + if selectableFieldsIdentical { + out.Versions[i].SelectableFields = nil + } } return nil diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go index 6c22a516985..8e081e4b1c5 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto +// source: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto package v1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } func (*ConversionRequest) ProtoMessage() {} func (*ConversionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{0} + return fileDescriptor_c5e101a0235c8c62, []int{0} } func (m *ConversionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_ConversionRequest proto.InternalMessageInfo func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } func (*ConversionResponse) ProtoMessage() {} func (*ConversionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{1} + return fileDescriptor_c5e101a0235c8c62, []int{1} } func (m *ConversionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_ConversionResponse proto.InternalMessageInfo func (m *ConversionReview) Reset() { *m = ConversionReview{} } func (*ConversionReview) ProtoMessage() {} func (*ConversionReview) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{2} + return fileDescriptor_c5e101a0235c8c62, []int{2} } func (m *ConversionReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_ConversionReview proto.InternalMessageInfo func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } func (*CustomResourceColumnDefinition) ProtoMessage() {} func (*CustomResourceColumnDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{3} + return fileDescriptor_c5e101a0235c8c62, []int{3} } func (m *CustomResourceColumnDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_CustomResourceColumnDefinition proto.InternalMessageInfo func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } func (*CustomResourceConversion) ProtoMessage() {} func (*CustomResourceConversion) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{4} + return fileDescriptor_c5e101a0235c8c62, []int{4} } func (m *CustomResourceConversion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_CustomResourceConversion proto.InternalMessageInfo func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } func (*CustomResourceDefinition) ProtoMessage() {} func (*CustomResourceDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{5} + return fileDescriptor_c5e101a0235c8c62, []int{5} } func (m *CustomResourceDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_CustomResourceDefinition proto.InternalMessageInfo func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } func (*CustomResourceDefinitionCondition) ProtoMessage() {} func (*CustomResourceDefinitionCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{6} + return fileDescriptor_c5e101a0235c8c62, []int{6} } func (m *CustomResourceDefinitionCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_CustomResourceDefinitionCondition proto.InternalMessageInfo func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } func (*CustomResourceDefinitionList) ProtoMessage() {} func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{7} + return fileDescriptor_c5e101a0235c8c62, []int{7} } func (m *CustomResourceDefinitionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_CustomResourceDefinitionList proto.InternalMessageInfo func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } func (*CustomResourceDefinitionNames) ProtoMessage() {} func (*CustomResourceDefinitionNames) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{8} + return fileDescriptor_c5e101a0235c8c62, []int{8} } func (m *CustomResourceDefinitionNames) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_CustomResourceDefinitionNames proto.InternalMessageInfo func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } func (*CustomResourceDefinitionSpec) ProtoMessage() {} func (*CustomResourceDefinitionSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{9} + return fileDescriptor_c5e101a0235c8c62, []int{9} } func (m *CustomResourceDefinitionSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_CustomResourceDefinitionSpec proto.InternalMessageInfo func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } func (*CustomResourceDefinitionStatus) ProtoMessage() {} func (*CustomResourceDefinitionStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{10} + return fileDescriptor_c5e101a0235c8c62, []int{10} } func (m *CustomResourceDefinitionStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_CustomResourceDefinitionStatus proto.InternalMessageInfo func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } func (*CustomResourceDefinitionVersion) ProtoMessage() {} func (*CustomResourceDefinitionVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{11} + return fileDescriptor_c5e101a0235c8c62, []int{11} } func (m *CustomResourceDefinitionVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_CustomResourceDefinitionVersion proto.InternalMessageInfo func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } func (*CustomResourceSubresourceScale) ProtoMessage() {} func (*CustomResourceSubresourceScale) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{12} + return fileDescriptor_c5e101a0235c8c62, []int{12} } func (m *CustomResourceSubresourceScale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_CustomResourceSubresourceScale proto.InternalMessageInfo func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } func (*CustomResourceSubresourceStatus) ProtoMessage() {} func (*CustomResourceSubresourceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{13} + return fileDescriptor_c5e101a0235c8c62, []int{13} } func (m *CustomResourceSubresourceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_CustomResourceSubresourceStatus proto.InternalMessageInfo func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } func (*CustomResourceSubresources) ProtoMessage() {} func (*CustomResourceSubresources) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{14} + return fileDescriptor_c5e101a0235c8c62, []int{14} } func (m *CustomResourceSubresources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_CustomResourceSubresources proto.InternalMessageInfo func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } func (*CustomResourceValidation) ProtoMessage() {} func (*CustomResourceValidation) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{15} + return fileDescriptor_c5e101a0235c8c62, []int{15} } func (m *CustomResourceValidation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_CustomResourceValidation proto.InternalMessageInfo func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } func (*ExternalDocumentation) ProtoMessage() {} func (*ExternalDocumentation) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{16} + return fileDescriptor_c5e101a0235c8c62, []int{16} } func (m *ExternalDocumentation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_ExternalDocumentation proto.InternalMessageInfo func (m *JSON) Reset() { *m = JSON{} } func (*JSON) ProtoMessage() {} func (*JSON) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{17} + return fileDescriptor_c5e101a0235c8c62, []int{17} } func (m *JSON) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_JSON proto.InternalMessageInfo func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } func (*JSONSchemaProps) ProtoMessage() {} func (*JSONSchemaProps) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{18} + return fileDescriptor_c5e101a0235c8c62, []int{18} } func (m *JSONSchemaProps) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +583,7 @@ var xxx_messageInfo_JSONSchemaProps proto.InternalMessageInfo func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } func (*JSONSchemaPropsOrArray) ProtoMessage() {} func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{19} + return fileDescriptor_c5e101a0235c8c62, []int{19} } func (m *JSONSchemaPropsOrArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +611,7 @@ var xxx_messageInfo_JSONSchemaPropsOrArray proto.InternalMessageInfo func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } func (*JSONSchemaPropsOrBool) ProtoMessage() {} func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{20} + return fileDescriptor_c5e101a0235c8c62, []int{20} } func (m *JSONSchemaPropsOrBool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +639,7 @@ var xxx_messageInfo_JSONSchemaPropsOrBool proto.InternalMessageInfo func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} func (*JSONSchemaPropsOrStringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{21} + return fileDescriptor_c5e101a0235c8c62, []int{21} } func (m *JSONSchemaPropsOrStringArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -664,10 +664,38 @@ func (m *JSONSchemaPropsOrStringArray) XXX_DiscardUnknown() { var xxx_messageInfo_JSONSchemaPropsOrStringArray proto.InternalMessageInfo +func (m *SelectableField) Reset() { *m = SelectableField{} } +func (*SelectableField) ProtoMessage() {} +func (*SelectableField) Descriptor() ([]byte, []int) { + return fileDescriptor_c5e101a0235c8c62, []int{22} +} +func (m *SelectableField) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SelectableField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SelectableField) XXX_Merge(src proto.Message) { + xxx_messageInfo_SelectableField.Merge(m, src) +} +func (m *SelectableField) XXX_Size() int { + return m.Size() +} +func (m *SelectableField) XXX_DiscardUnknown() { + xxx_messageInfo_SelectableField.DiscardUnknown(m) +} + +var xxx_messageInfo_SelectableField proto.InternalMessageInfo + func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{22} + return fileDescriptor_c5e101a0235c8c62, []int{23} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -695,7 +723,7 @@ var xxx_messageInfo_ServiceReference proto.InternalMessageInfo func (m *ValidationRule) Reset() { *m = ValidationRule{} } func (*ValidationRule) ProtoMessage() {} func (*ValidationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{23} + return fileDescriptor_c5e101a0235c8c62, []int{24} } func (m *ValidationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -723,7 +751,7 @@ var xxx_messageInfo_ValidationRule proto.InternalMessageInfo func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{24} + return fileDescriptor_c5e101a0235c8c62, []int{25} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -751,7 +779,7 @@ var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo func (m *WebhookConversion) Reset() { *m = WebhookConversion{} } func (*WebhookConversion) ProtoMessage() {} func (*WebhookConversion) Descriptor() ([]byte, []int) { - return fileDescriptor_f5a35c9667703937, []int{25} + return fileDescriptor_c5e101a0235c8c62, []int{26} } func (m *WebhookConversion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -803,6 +831,7 @@ func init() { proto.RegisterType((*JSONSchemaPropsOrArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray") proto.RegisterType((*JSONSchemaPropsOrBool)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool") proto.RegisterType((*JSONSchemaPropsOrStringArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrStringArray") + proto.RegisterType((*SelectableField)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.SelectableField") proto.RegisterType((*ServiceReference)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ServiceReference") proto.RegisterType((*ValidationRule)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.ValidationRule") proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.WebhookClientConfig") @@ -810,208 +839,209 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto", fileDescriptor_f5a35c9667703937) -} - -var fileDescriptor_f5a35c9667703937 = []byte{ - // 3137 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xdf, 0x6f, 0x5c, 0x47, - 0xf5, 0xcf, 0x5d, 0x7b, 0xed, 0xf5, 0xd8, 0x89, 0xed, 0x49, 0xec, 0xef, 0x8d, 0x9b, 0x78, 0x9d, - 0xcd, 0xb7, 0xc1, 0x6d, 0xd3, 0x75, 0x1b, 0x5a, 0x1a, 0xca, 0x2f, 0x79, 0x6d, 0xa7, 0x75, 0x13, - 0xc7, 0xd6, 0x6c, 0x92, 0xba, 0x2d, 0xa2, 0xbd, 0xde, 0x3b, 0xbb, 0xbe, 0xf5, 0xfd, 0x95, 0x99, - 0x7b, 0xfd, 0x43, 0x02, 0xa9, 0x02, 0x55, 0x40, 0x25, 0x28, 0x0f, 0xa8, 0x3c, 0x21, 0x84, 0x50, - 0x1f, 0xe0, 0x01, 0xde, 0xe0, 0x5f, 0xe8, 0x0b, 0x52, 0x25, 0x24, 0x54, 0x09, 0x69, 0x45, 0x97, - 0x7f, 0x00, 0x09, 0x10, 0xc2, 0x0f, 0x08, 0xcd, 0x8f, 0x3b, 0x77, 0xf6, 0xee, 0x6e, 0x12, 0xd9, - 0xeb, 0xf6, 0x6d, 0xf7, 0x9c, 0x33, 0xe7, 0x73, 0xe6, 0xcc, 0x99, 0x33, 0x67, 0xce, 0x1d, 0x60, - 0xed, 0x5c, 0xa7, 0x65, 0x27, 0x58, 0xd8, 0x89, 0xb7, 0x30, 0xf1, 0x71, 0x84, 0xe9, 0xc2, 0x2e, - 0xf6, 0xed, 0x80, 0x2c, 0x48, 0x86, 0x15, 0x3a, 0x78, 0x3f, 0xc2, 0x3e, 0x75, 0x02, 0x9f, 0x3e, - 0x6d, 0x85, 0x0e, 0xc5, 0x64, 0x17, 0x93, 0x85, 0x70, 0xa7, 0xc1, 0x78, 0xb4, 0x5d, 0x60, 0x61, - 0xf7, 0xd9, 0x85, 0x06, 0xf6, 0x31, 0xb1, 0x22, 0x6c, 0x97, 0x43, 0x12, 0x44, 0x01, 0xbc, 0x2e, - 0x34, 0x95, 0xdb, 0x04, 0xdf, 0x54, 0x9a, 0xca, 0xe1, 0x4e, 0x83, 0xf1, 0x68, 0xbb, 0x40, 0x79, - 0xf7, 0xd9, 0x99, 0xa7, 0x1b, 0x4e, 0xb4, 0x1d, 0x6f, 0x95, 0x6b, 0x81, 0xb7, 0xd0, 0x08, 0x1a, - 0xc1, 0x02, 0x57, 0xb8, 0x15, 0xd7, 0xf9, 0x3f, 0xfe, 0x87, 0xff, 0x12, 0x40, 0x33, 0xcf, 0xa5, - 0x26, 0x7b, 0x56, 0x6d, 0xdb, 0xf1, 0x31, 0x39, 0x48, 0xed, 0xf4, 0x70, 0x64, 0x75, 0x31, 0x6f, - 0x66, 0xa1, 0xd7, 0x28, 0x12, 0xfb, 0x91, 0xe3, 0xe1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 0xf0, 0x4c, 0xde, - 0x11, 0xff, 0x91, 0xc4, 0x2d, 0xfd, 0x33, 0x07, 0x2e, 0xf5, 0x1a, 0xba, 0x14, 0xf8, 0xb6, 0x58, - 0x84, 0x55, 0xb9, 0xaf, 0x44, 0x64, 0x3d, 0xaf, 0xef, 0xab, 0xc3, 0x66, 0xf1, 0xf1, 0x87, 0x2a, - 0xd0, 0x36, 0xe0, 0x97, 0xd5, 0x94, 0xc5, 0x26, 0xbd, 0xd4, 0x6e, 0xd8, 0x61, 0xb3, 0x38, 0xae, - 0x86, 0xb5, 0xdb, 0x0a, 0x77, 0x01, 0x74, 0x2d, 0x1a, 0xdd, 0x21, 0x96, 0x4f, 0x85, 0x5a, 0xc7, - 0xc3, 0xd2, 0x73, 0x4f, 0x3e, 0x5a, 0x50, 0xb0, 0x11, 0x95, 0x19, 0x09, 0x09, 0x6f, 0x75, 0x68, - 0x43, 0x5d, 0x10, 0x58, 0xce, 0x20, 0xd8, 0xa2, 0x2a, 0x0d, 0x68, 0x39, 0x9c, 0x51, 0x91, 0xe4, - 0xc2, 0x27, 0xc0, 0xb0, 0x87, 0x29, 0xb5, 0x1a, 0x98, 0xef, 0xfd, 0x91, 0xf4, 0x50, 0x5c, 0x13, - 0x64, 0x94, 0xf0, 0x4b, 0xff, 0x32, 0xc0, 0x85, 0x5e, 0x5e, 0xbb, 0xe5, 0xd0, 0x08, 0x7e, 0xb3, - 0x23, 0xec, 0xcb, 0x8f, 0x36, 0x43, 0x36, 0x9a, 0x07, 0xbd, 0x4a, 0x25, 0x09, 0x45, 0x0b, 0xf9, - 0x3d, 0x90, 0x77, 0x22, 0xec, 0x25, 0xa7, 0x25, 0xea, 0x7f, 0xd8, 0x55, 0x4e, 0x4b, 0xf8, 0xfc, - 0x2a, 0x03, 0x42, 0x02, 0xaf, 0xf4, 0x61, 0x0e, 0x5c, 0xec, 0x35, 0x84, 0xe5, 0x71, 0xca, 0x9c, - 0x1d, 0xba, 0x31, 0xb1, 0x5c, 0x19, 0x6c, 0xca, 0xd9, 0x1b, 0x9c, 0x8a, 0x24, 0x97, 0xe5, 0x4e, - 0xea, 0xf8, 0x8d, 0xd8, 0xb5, 0x88, 0x8c, 0x24, 0x35, 0xe1, 0xaa, 0xa4, 0x23, 0x25, 0x01, 0xcb, - 0x00, 0xd0, 0xed, 0x80, 0x44, 0x1c, 0x83, 0x57, 0x38, 0x23, 0x95, 0x33, 0x2c, 0x23, 0x54, 0x15, - 0x15, 0x69, 0x12, 0xec, 0x20, 0xd9, 0x71, 0x7c, 0x5b, 0x2e, 0xb8, 0xda, 0xbb, 0x37, 0x1d, 0xdf, - 0x46, 0x9c, 0xc3, 0xf0, 0x5d, 0x87, 0x46, 0x8c, 0x22, 0x57, 0xbb, 0xcd, 0xe1, 0x5c, 0x52, 0x49, - 0x30, 0xfc, 0x1a, 0x4b, 0xb0, 0x01, 0x71, 0x30, 0x35, 0x87, 0x52, 0xfc, 0x25, 0x45, 0x45, 0x9a, - 0x44, 0xe9, 0x2f, 0x83, 0xbd, 0xe3, 0x83, 0x25, 0x10, 0x78, 0x19, 0xe4, 0x1b, 0x24, 0x88, 0x43, - 0xe9, 0x25, 0xe5, 0xed, 0x97, 0x18, 0x11, 0x09, 0x1e, 0xfc, 0x36, 0xc8, 0xfb, 0x72, 0xc2, 0x2c, - 0x82, 0x5e, 0xed, 0xff, 0x32, 0x73, 0x6f, 0xa5, 0xe8, 0xc2, 0x91, 0x02, 0x14, 0x3e, 0x07, 0xf2, - 0xb4, 0x16, 0x84, 0x58, 0x3a, 0x71, 0x36, 0x11, 0xaa, 0x32, 0xe2, 0x61, 0xb3, 0x78, 0x3a, 0x51, - 0xc7, 0x09, 0x48, 0x08, 0xc3, 0xef, 0x1b, 0xa0, 0x20, 0x8f, 0x0b, 0x6a, 0x0e, 0xf3, 0xf0, 0x7c, - 0xad, 0xff, 0x76, 0xcb, 0xb2, 0x37, 0x5d, 0x33, 0x49, 0xa0, 0x48, 0x81, 0xc3, 0xef, 0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, 0x65, 0x24, 0xdb, 0x1c, 0xe6, 0xd2, 0x6a, 0x7d, 0x96, 0x15, 0x07, - 0x69, 0x52, 0xf0, 0x06, 0x80, 0xc9, 0x3f, 0x27, 0xf0, 0x5f, 0xb5, 0x88, 0xef, 0xf8, 0x0d, 0xb3, - 0xc0, 0xcd, 0x9e, 0x66, 0xa7, 0xed, 0x72, 0x07, 0x17, 0x75, 0x19, 0x01, 0x77, 0xc1, 0x90, 0xb8, - 0x46, 0xf3, 0xbc, 0xd1, 0xc7, 0x1d, 0x77, 0xcf, 0x72, 0x1d, 0x9b, 0x43, 0x55, 0x00, 0x77, 0x0f, - 0x47, 0x41, 0x12, 0x0d, 0xbe, 0x67, 0x80, 0x31, 0x1a, 0x6f, 0x11, 0x29, 0x4d, 0x79, 0x56, 0x1f, - 0xbd, 0x76, 0xa7, 0x5f, 0xf0, 0x55, 0x4d, 0x77, 0x65, 0xa2, 0xd5, 0x2c, 0x8e, 0xe9, 0x14, 0xd4, - 0x86, 0x0d, 0x7f, 0x6f, 0x00, 0xd3, 0xb2, 0x45, 0xe8, 0x5b, 0xee, 0x06, 0x71, 0xfc, 0x08, 0x13, - 0x71, 0x21, 0x12, 0xc7, 0x47, 0x1f, 0x6b, 0xc5, 0xec, 0x3d, 0xab, 0x32, 0x27, 0x57, 0xda, 0x5c, - 0xec, 0x61, 0x01, 0xea, 0x69, 0x5b, 0xe9, 0xdf, 0x46, 0x36, 0xb5, 0x68, 0xb3, 0xac, 0xd6, 0x2c, - 0x17, 0xc3, 0x65, 0x30, 0xc1, 0xaa, 0x5f, 0x84, 0x43, 0xd7, 0xa9, 0x59, 0x94, 0xdf, 0x7e, 0x44, - 0x74, 0xab, 0x6b, 0x78, 0x35, 0xc3, 0x47, 0x1d, 0x23, 0xe0, 0x2b, 0x00, 0x8a, 0xb2, 0xb0, 0x4d, - 0x8f, 0xa8, 0x04, 0x54, 0x81, 0x57, 0xed, 0x90, 0x40, 0x5d, 0x46, 0xc1, 0x25, 0x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 0x16, 0xc9, 0x35, 0xab, 0x12, 0xfb, 0xb6, 0x6c, 0xa1, 0x8f, 0x89, 0x48, 0x5e, 0x5a, 0x14, 0x34, - 0xa4, 0xb8, 0xa5, 0x7f, 0x18, 0x60, 0xb2, 0xe3, 0x71, 0x14, 0xfc, 0x9e, 0x01, 0xc6, 0x6a, 0xda, - 0xf4, 0x64, 0x3e, 0x58, 0x3b, 0xfe, 0x03, 0x2c, 0x4d, 0xa9, 0x28, 0xa1, 0x74, 0x0a, 0x6a, 0x03, - 0x85, 0x9b, 0xc0, 0xac, 0x65, 0xde, 0x21, 0x66, 0xbe, 0x6c, 0x5e, 0x68, 0x35, 0x8b, 0xe6, 0x52, - 0x0f, 0x19, 0xd4, 0x73, 0x74, 0xe5, 0x5b, 0x1f, 0x7d, 0x3a, 0x7b, 0xea, 0xe3, 0x4f, 0x67, 0x4f, - 0x7d, 0xf2, 0xe9, 0xec, 0xa9, 0x77, 0x5a, 0xb3, 0xc6, 0x47, 0xad, 0x59, 0xe3, 0xe3, 0xd6, 0xac, - 0xf1, 0x49, 0x6b, 0xd6, 0xf8, 0x6b, 0x6b, 0xd6, 0xf8, 0xc9, 0xdf, 0x66, 0x4f, 0xbd, 0x7e, 0xfd, - 0xa8, 0xaf, 0x8f, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0x28, 0x77, 0xf5, 0x22, 0xd1, 0x2c, 0x00, - 0x00, + proto.RegisterFile("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto", fileDescriptor_c5e101a0235c8c62) +} + +var fileDescriptor_c5e101a0235c8c62 = []byte{ + // 3166 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xdb, 0x6f, 0x1b, 0xc7, + 0xd5, 0xf7, 0x52, 0x37, 0x6a, 0x24, 0x59, 0xd2, 0xd8, 0xd2, 0xb7, 0x56, 0x6c, 0x51, 0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 0x2a, 0x89, + 0x29, 0x5a, 0xc8, 0x1f, 0x80, 0x01, 0x27, 0xc4, 0x8d, 0xf8, 0xb4, 0x44, 0xbd, 0x0f, 0xbb, 0xf2, + 0x98, 0x84, 0x1f, 0x58, 0x63, 0x40, 0x48, 0xe0, 0x15, 0x3f, 0xca, 0x81, 0x4b, 0xdd, 0x86, 0xb0, + 0x3c, 0x4e, 0x99, 0xb3, 0x03, 0x37, 0x22, 0x96, 0x2b, 0x83, 0x4d, 0x39, 0x7b, 0x8b, 0x53, 0x91, + 0xe4, 0xb2, 0xdc, 0x49, 0x1d, 0xaf, 0x1e, 0xb9, 0x16, 0x91, 0x91, 0xa4, 0x26, 0x5c, 0x91, 0x74, + 0xa4, 0x24, 0x60, 0x09, 0x00, 0xba, 0xeb, 0x93, 0x90, 0x63, 0xf0, 0x0a, 0x67, 0xb8, 0x7c, 0x96, + 0x65, 0x84, 0x8a, 0xa2, 0x22, 0x4d, 0x82, 0x1d, 0x24, 0x7b, 0x8e, 0x67, 0xcb, 0x05, 0x57, 0x7b, + 0xf7, 0xa6, 0xe3, 0xd9, 0x88, 0x73, 0x18, 0xbe, 0xeb, 0xd0, 0x90, 0x51, 0xe4, 0x6a, 0xa7, 0x1c, + 0xce, 0x25, 0x95, 0x04, 0xc3, 0xaf, 0xb2, 0x04, 0xeb, 0x13, 0x07, 0x53, 0x73, 0x30, 0xc1, 0x5f, + 0x56, 0x54, 0xa4, 0x49, 0x14, 0xff, 0xdc, 0xdf, 0x3d, 0x3e, 0x58, 0x02, 0x81, 0x57, 0xc0, 0x40, + 0x9d, 0xf8, 0x51, 0x20, 0xbd, 0xa4, 0xbc, 0xfd, 0x32, 0x23, 0x22, 0xc1, 0x83, 0xdf, 0x02, 0x03, + 0x9e, 0x9c, 0x30, 0x8b, 0xa0, 0xd7, 0x7a, 0xbf, 0xcc, 0xdc, 0x5b, 0x09, 0xba, 0x70, 0xa4, 0x00, + 0x85, 0xcf, 0x81, 0x01, 0x5a, 0xf5, 0x03, 0x2c, 0x9d, 0x38, 0x1b, 0x0b, 0x55, 0x18, 0xf1, 0xb8, + 0x59, 0x18, 0x8b, 0xd5, 0x71, 0x02, 0x12, 0xc2, 0xf0, 0x7b, 0x06, 0xc8, 0xcb, 0xe3, 0x82, 0x9a, + 0x43, 0x3c, 0x3c, 0x5f, 0xef, 0xbd, 0xdd, 0xb2, 0xec, 0x4d, 0xd6, 0x4c, 0x12, 0x28, 0x52, 0xe0, + 0xf0, 0x3b, 0x06, 0x00, 0x55, 0x75, 0x76, 0x99, 0xc3, 0xdc, 0x87, 0x3d, 0xdb, 0x2a, 0xda, 0xa9, + 0x28, 0x02, 0x21, 0x29, 0x95, 0x34, 0x54, 0x58, 0x01, 0x53, 0x01, 0xc1, 0x5c, 0xf7, 0x1d, 0x6f, + 0xcf, 0xf3, 0x0f, 0xbc, 0x1b, 0x0e, 0x76, 0x6d, 0x6a, 0x82, 0x39, 0x63, 0x3e, 0x5f, 0xbe, 0x24, + 0xed, 0x9f, 0xda, 0xea, 0x24, 0x84, 0x3a, 0x8f, 0x2d, 0xbe, 0xd7, 0x97, 0xad, 0xb5, 0xb2, 0xe7, + 0x05, 0xfc, 0x40, 0x4c, 0x5e, 0xe4, 0x61, 0x6a, 0x1a, 0x7c, 0x21, 0xde, 0xec, 0xfd, 0x42, 0xa8, + 0x5c, 0x9f, 0x1c, 0xd2, 0x8a, 0x44, 0x91, 0x66, 0x02, 0xfc, 0x89, 0x01, 0xc6, 0xac, 0x6a, 0x15, + 0x07, 0x21, 0xb6, 0xc5, 0x36, 0xce, 0x9d, 0x6e, 0x54, 0x4f, 0x49, 0x83, 0xc6, 0x96, 0x74, 0x54, + 0x94, 0x36, 0x02, 0xbe, 0x08, 0xce, 0xd2, 0xd0, 0x27, 0xd8, 0x8e, 0x23, 0x48, 0x66, 0x17, 0xd8, + 0x6a, 0x16, 0xce, 0x56, 0x52, 0x1c, 0x94, 0x91, 0x2c, 0xb6, 0x06, 0x41, 0xe1, 0x01,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97, 0x7d, 0xaf, 0xe6, 0xd4, 0xe1, 0x05, 0xd1, + 0x7f, 0xd5, 0x9a, 0x9a, 0x71, 0xef, 0x15, 0xde, 0x03, 0x43, 0x54, 0xc4, 0x8a, 0xdc, 0x07, 0xaf, + 0x9e, 0xe4, 0x83, 0x4a, 0x3a, 0xe8, 0x44, 0xf9, 0x18, 0x53, 0x63, 0x1c, 0xb6, 0x15, 0xaa, 0x56, + 0x39, 0xf2, 0x6c, 0xd9, 0x83, 0x1f, 0x15, 0x5b, 0x61, 0x79, 0x49, 0xd0, 0x90, 0xe2, 0x16, 0xff, + 0x6e, 0x80, 0xc9, 0xb6, 0xf7, 0x5e, 0xf0, 0xbb, 0x06, 0x18, 0xad, 0x6a, 0xd3, 0x93, 0x09, 0x65, + 0xe3, 0xe4, 0x6f, 0xca, 0x34, 0xa5, 0xa2, 0x06, 0xd3, 0x29, 0x28, 0x05, 0x0a, 0xb7, 0x81, 0x59, + 0xcd, 0x3c, 0xad, 0xcc, 0x7c, 0xac, 0xbd, 0xd8, 0x6a, 0x16, 0xcc, 0xe5, 0x2e, 0x32, 0xa8, 0xeb, + 0xe8, 0xf2, 0x37, 0x3f, 0xfe, 0x6c, 0xf6, 0xcc, 0x27, 0x9f, 0xcd, 0x9e, 0xf9, 0xf4, 0xb3, 0xd9, + 0x33, 0xef, 0xb6, 0x66, 0x8d, 0x8f, 0x5b, 0xb3, 0xc6, 0x27, 0xad, 0x59, 0xe3, 0xd3, 0xd6, 0xac, + 0xf1, 0x97, 0xd6, 0xac, 0xf1, 0xe3, 0xbf, 0xce, 0x9e, 0x79, 0xe3, 0xfa, 0xa3, 0x3e, 0xa8, 0xfe, + 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x1c, 0x7a, 0x10, 0x8b, 0x2d, 0x00, 0x00, } func (m *ConversionRequest) Marshal() (dAtA []byte, err error) { @@ -1618,6 +1648,20 @@ func (m *CustomResourceDefinitionVersion) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l + if len(m.SelectableFields) > 0 { + for iNdEx := len(m.SelectableFields) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SelectableFields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } if m.DeprecationWarning != nil { i -= len(*m.DeprecationWarning) copy(dAtA[i:], *m.DeprecationWarning) @@ -2570,6 +2614,34 @@ func (m *JSONSchemaPropsOrStringArray) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *SelectableField) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SelectableField) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SelectableField) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.JSONPath) + copy(dAtA[i:], m.JSONPath) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.JSONPath))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *ServiceReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3027,6 +3099,12 @@ func (m *CustomResourceDefinitionVersion) Size() (n int) { l = len(*m.DeprecationWarning) n += 1 + l + sovGenerated(uint64(l)) } + if len(m.SelectableFields) > 0 { + for _, e := range m.SelectableFields { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -3341,6 +3419,17 @@ func (m *JSONSchemaPropsOrStringArray) Size() (n int) { return n } +func (m *SelectableField) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.JSONPath) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *ServiceReference) Size() (n int) { if m == nil { return 0 @@ -3605,6 +3694,11 @@ func (this *CustomResourceDefinitionVersion) String() string { repeatedStringForAdditionalPrinterColumns += strings.Replace(strings.Replace(f.String(), "CustomResourceColumnDefinition", "CustomResourceColumnDefinition", 1), `&`, ``, 1) + "," } repeatedStringForAdditionalPrinterColumns += "}" + repeatedStringForSelectableFields := "[]SelectableField{" + for _, f := range this.SelectableFields { + repeatedStringForSelectableFields += strings.Replace(strings.Replace(f.String(), "SelectableField", "SelectableField", 1), `&`, ``, 1) + "," + } + repeatedStringForSelectableFields += "}" s := strings.Join([]string{`&CustomResourceDefinitionVersion{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Served:` + fmt.Sprintf("%v", this.Served) + `,`, @@ -3614,6 +3708,7 @@ func (this *CustomResourceDefinitionVersion) String() string { `AdditionalPrinterColumns:` + repeatedStringForAdditionalPrinterColumns + `,`, `Deprecated:` + fmt.Sprintf("%v", this.Deprecated) + `,`, `DeprecationWarning:` + valueToStringGenerated(this.DeprecationWarning) + `,`, + `SelectableFields:` + repeatedStringForSelectableFields + `,`, `}`, }, "") return s @@ -3837,6 +3932,16 @@ func (this *JSONSchemaPropsOrStringArray) String() string { }, "") return s } +func (this *SelectableField) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SelectableField{`, + `JSONPath:` + fmt.Sprintf("%v", this.JSONPath) + `,`, + `}`, + }, "") + return s +} func (this *ServiceReference) String() string { if this == nil { return "nil" @@ -6027,6 +6132,40 @@ func (m *CustomResourceDefinitionVersion) Unmarshal(dAtA []byte) error { s := string(dAtA[iNdEx:postIndex]) m.DeprecationWarning = &s iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelectableFields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelectableFields = append(m.SelectableFields, SelectableField{}) + if err := m.SelectableFields[len(m.SelectableFields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -8667,6 +8806,88 @@ func (m *JSONSchemaPropsOrStringArray) Unmarshal(dAtA []byte) error { } return nil } +func (m *SelectableField) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SelectableField: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SelectableField: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JSONPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JSONPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto index 3c39d63a5f2..2ad78822f8b 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto @@ -40,6 +40,7 @@ message ConversionRequest { optional string desiredAPIVersion = 2; // objects is the list of custom resource objects to be converted. + // +listType=atomic repeated k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3; } @@ -53,6 +54,7 @@ message ConversionResponse { // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. + // +listType=atomic repeated k8s.io.apimachinery.pkg.runtime.RawExtension convertedObjects = 2; // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if @@ -182,6 +184,7 @@ message CustomResourceDefinitionNames { // and used by clients to support invocations like `kubectl get `. // It must be all lowercase. // +optional + // +listType=atomic repeated string shortNames = 3; // kind is the serialized kind of the resource. It is normally CamelCase and singular. @@ -196,6 +199,7 @@ message CustomResourceDefinitionNames { // This is published in API discovery documents, and used by clients to support invocations like // `kubectl get all`. // +optional + // +listType=atomic repeated string categories = 6; } @@ -221,6 +225,7 @@ message CustomResourceDefinitionSpec { // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing // major version, then minor version. An example sorted list of versions: // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. + // +listType=atomic repeated CustomResourceDefinitionVersion versions = 7; // conversion defines conversion settings for the CRD. @@ -256,6 +261,7 @@ message CustomResourceDefinitionStatus { // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. // +optional + // +listType=atomic repeated string storedVersions = 3; } @@ -297,7 +303,17 @@ message CustomResourceDefinitionVersion { // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. // If no columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic repeated CustomResourceColumnDefinition additionalPrinterColumns = 6; + + // selectableFields specifies paths to fields that may be used as field selectors. + // A maximum of 8 selectable fields are allowed. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + repeated SelectableField selectableFields = 9; } // CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. @@ -439,20 +455,25 @@ message JSONSchemaProps { optional double multipleOf = 19; + // +listType=atomic repeated JSON enum = 20; optional int64 maxProperties = 21; optional int64 minProperties = 22; + // +listType=atomic repeated string required = 23; optional JSONSchemaPropsOrArray items = 24; + // +listType=atomic repeated JSONSchemaProps allOf = 25; + // +listType=atomic repeated JSONSchemaProps oneOf = 26; + // +listType=atomic repeated JSONSchemaProps anyOf = 27; optional JSONSchemaProps not = 28; @@ -518,6 +539,7 @@ message JSONSchemaProps { // to ensure those properties are present for all list items. // // +optional + // +listType=atomic repeated string xKubernetesListMapKeys = 41; // x-kubernetes-list-type annotates an array to further describe its topology. @@ -564,6 +586,7 @@ message JSONSchemaProps { message JSONSchemaPropsOrArray { optional JSONSchemaProps schema = 1; + // +listType=atomic repeated JSONSchemaProps jSONSchemas = 2; } @@ -579,9 +602,23 @@ message JSONSchemaPropsOrBool { message JSONSchemaPropsOrStringArray { optional JSONSchemaProps schema = 1; + // +listType=atomic repeated string property = 2; } +// SelectableField specifies the JSON path of a field that may be used with field selectors. +message SelectableField { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. + optional string jsonPath = 1; +} + // ServiceReference holds a reference to Service.legacy.k8s.io message ServiceReference { // namespace is the namespace of the service. @@ -787,6 +824,7 @@ message WebhookConversion { // are supported by API server, conversion will fail for the custom resource. // If a persisted Webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail. + // +listType=atomic repeated string conversionReviewVersions = 3; } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go index 59ec0e372b8..e1d1e0be390 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go @@ -56,6 +56,7 @@ type CustomResourceDefinitionSpec struct { // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing // major version, then minor version. An example sorted list of versions: // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. + // +listType=atomic Versions []CustomResourceDefinitionVersion `json:"versions" protobuf:"bytes,7,rep,name=versions"` // conversion defines conversion settings for the CRD. @@ -96,6 +97,7 @@ type WebhookConversion struct { // are supported by API server, conversion will fail for the custom resource. // If a persisted Webhook configuration specifies allowed versions and does not // include any versions known to the API Server, calls to the webhook will fail. + // +listType=atomic ConversionReviewVersions []string `json:"conversionReviewVersions" protobuf:"bytes,3,rep,name=conversionReviewVersions"` } @@ -195,7 +197,30 @@ type CustomResourceDefinitionVersion struct { // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. // If no columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,6,rep,name=additionalPrinterColumns"` + + // selectableFields specifies paths to fields that may be used as field selectors. + // A maximum of 8 selectable fields are allowed. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,9,rep,name=selectableFields"` +} + +// SelectableField specifies the JSON path of a field that may be used with field selectors. +type SelectableField struct { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. + JSONPath string `json:"jsonPath" protobuf:"bytes,1,opt,name=jsonPath"` } // CustomResourceColumnDefinition specifies a column for server side printing. @@ -237,6 +262,7 @@ type CustomResourceDefinitionNames struct { // and used by clients to support invocations like `kubectl get `. // It must be all lowercase. // +optional + // +listType=atomic ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,3,opt,name=shortNames"` // kind is the serialized kind of the resource. It is normally CamelCase and singular. // Custom resource instances will use this value as the `kind` attribute in API calls. @@ -248,6 +274,7 @@ type CustomResourceDefinitionNames struct { // This is published in API discovery documents, and used by clients to support invocations like // `kubectl get all`. // +optional + // +listType=atomic Categories []string `json:"categories,omitempty" protobuf:"bytes,6,rep,name=categories"` } @@ -345,6 +372,7 @@ type CustomResourceDefinitionStatus struct { // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. // +optional + // +listType=atomic StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` } @@ -463,6 +491,7 @@ type ConversionRequest struct { // desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1" DesiredAPIVersion string `json:"desiredAPIVersion" protobuf:"bytes,2,name=desiredAPIVersion"` // objects is the list of custom resource objects to be converted. + // +listType=atomic Objects []runtime.RawExtension `json:"objects" protobuf:"bytes,3,rep,name=objects"` } @@ -475,6 +504,7 @@ type ConversionResponse struct { // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. + // +listType=atomic ConvertedObjects []runtime.RawExtension `json:"convertedObjects" protobuf:"bytes,2,rep,name=convertedObjects"` // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if // the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go index a81451ad6ef..5dbdf576b3e 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go @@ -76,25 +76,30 @@ type JSONSchemaProps struct { // default is a default value for undefined object fields. // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. // Defaulting requires spec.preserveUnknownFields to be false. - Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` - Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` - ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` - Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` - ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` - MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` - MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` - Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` - MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` - MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` - UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` - MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` - Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` - MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` - MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` - Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` - Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` - AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` - OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` + Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` + Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` + ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` + Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` + ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` + MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` + MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` + Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` + MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` + MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` + UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` + MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` + // +listType=atomic + Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` + MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` + MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` + // +listType=atomic + Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` + Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` + // +listType=atomic + AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` + // +listType=atomic + OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` + // +listType=atomic AnyOf []JSONSchemaProps `json:"anyOf,omitempty" protobuf:"bytes,27,rep,name=anyOf"` Not *JSONSchemaProps `json:"not,omitempty" protobuf:"bytes,28,opt,name=not"` Properties map[string]JSONSchemaProps `json:"properties,omitempty" protobuf:"bytes,29,rep,name=properties"` @@ -150,6 +155,7 @@ type JSONSchemaProps struct { // to ensure those properties are present for all list items. // // +optional + // +listType=atomic XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty" protobuf:"bytes,41,rep,name=xKubernetesListMapKeys"` // x-kubernetes-list-type annotates an array to further describe its topology. @@ -343,7 +349,8 @@ type JSONSchemaURL string // JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps // or an array of JSONSchemaProps. Mainly here for serialization purposes. type JSONSchemaPropsOrArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + // +listType=atomic JSONSchemas []JSONSchemaProps `protobuf:"bytes,2,rep,name=jSONSchemas"` } @@ -385,8 +392,9 @@ type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray // JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. type JSONSchemaPropsOrStringArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` - Property []string `protobuf:"bytes,2,rep,name=property"` + Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + // +listType=atomic + Property []string `protobuf:"bytes,2,rep,name=property"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go index 405021bf389..bb1d7e01429 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go @@ -192,6 +192,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*SelectableField)(nil), (*apiextensions.SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SelectableField_To_apiextensions_SelectableField(a.(*SelectableField), b.(*apiextensions.SelectableField), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.SelectableField)(nil), (*SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_SelectableField_To_v1_SelectableField(a.(*apiextensions.SelectableField), b.(*SelectableField), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ServiceReference)(nil), (*apiextensions.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_ServiceReference_To_apiextensions_ServiceReference(a.(*ServiceReference), b.(*apiextensions.ServiceReference), scope) }); err != nil { @@ -493,6 +503,7 @@ func autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResource out.Versions = nil } // WARNING: in.AdditionalPrinterColumns requires manual conversion: does not exist in peer-type + // WARNING: in.SelectableFields requires manual conversion: does not exist in peer-type if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) @@ -553,6 +564,7 @@ func autoConvert_v1_CustomResourceDefinitionVersion_To_apiextensions_CustomResou } out.Subresources = (*apiextensions.CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) out.AdditionalPrinterColumns = *(*[]apiextensions.CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]apiextensions.SelectableField)(unsafe.Pointer(&in.SelectableFields)) return nil } @@ -578,6 +590,7 @@ func autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1_CustomResou } out.Subresources = (*CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) out.AdditionalPrinterColumns = *(*[]CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]SelectableField)(unsafe.Pointer(&in.SelectableFields)) return nil } @@ -1225,6 +1238,26 @@ func Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1_JSONSchemaPropsOrS return autoConvert_apiextensions_JSONSchemaPropsOrStringArray_To_v1_JSONSchemaPropsOrStringArray(in, out, s) } +func autoConvert_v1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { + out.JSONPath = in.JSONPath + return nil +} + +// Convert_v1_SelectableField_To_apiextensions_SelectableField is an autogenerated conversion function. +func Convert_v1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { + return autoConvert_v1_SelectableField_To_apiextensions_SelectableField(in, out, s) +} + +func autoConvert_apiextensions_SelectableField_To_v1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { + out.JSONPath = in.JSONPath + return nil +} + +// Convert_apiextensions_SelectableField_To_v1_SelectableField is an autogenerated conversion function. +func Convert_apiextensions_SelectableField_To_v1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { + return autoConvert_apiextensions_SelectableField_To_v1_SelectableField(in, out, s) +} + func autoConvert_v1_ServiceReference_To_apiextensions_ServiceReference(in *ServiceReference, out *apiextensions.ServiceReference, s conversion.Scope) error { out.Namespace = in.Namespace out.Name = in.Name diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go index bc23fcd86ff..f85a0b0677d 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go @@ -329,6 +329,11 @@ func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefin *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } + if in.SelectableFields != nil { + in, out := &in.SelectableFields, &out.SelectableFields + *out = make([]SelectableField, len(*in)) + copy(*out, *in) + } return } @@ -585,6 +590,22 @@ func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelectableField) DeepCopyInto(out *SelectableField) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. +func (in *SelectableField) DeepCopy() *SelectableField { + if in == nil { + return nil + } + out := new(SelectableField) + 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 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go index c81fa6bc31b..32e58324071 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto +// source: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto package v1beta1 @@ -51,7 +51,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } func (*ConversionRequest) ProtoMessage() {} func (*ConversionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{0} + return fileDescriptor_3623d6c0bd238430, []int{0} } func (m *ConversionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ var xxx_messageInfo_ConversionRequest proto.InternalMessageInfo func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } func (*ConversionResponse) ProtoMessage() {} func (*ConversionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{1} + return fileDescriptor_3623d6c0bd238430, []int{1} } func (m *ConversionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +107,7 @@ var xxx_messageInfo_ConversionResponse proto.InternalMessageInfo func (m *ConversionReview) Reset() { *m = ConversionReview{} } func (*ConversionReview) ProtoMessage() {} func (*ConversionReview) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{2} + return fileDescriptor_3623d6c0bd238430, []int{2} } func (m *ConversionReview) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ var xxx_messageInfo_ConversionReview proto.InternalMessageInfo func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } func (*CustomResourceColumnDefinition) ProtoMessage() {} func (*CustomResourceColumnDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{3} + return fileDescriptor_3623d6c0bd238430, []int{3} } func (m *CustomResourceColumnDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ var xxx_messageInfo_CustomResourceColumnDefinition proto.InternalMessageInfo func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } func (*CustomResourceConversion) ProtoMessage() {} func (*CustomResourceConversion) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{4} + return fileDescriptor_3623d6c0bd238430, []int{4} } func (m *CustomResourceConversion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ var xxx_messageInfo_CustomResourceConversion proto.InternalMessageInfo func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } func (*CustomResourceDefinition) ProtoMessage() {} func (*CustomResourceDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{5} + return fileDescriptor_3623d6c0bd238430, []int{5} } func (m *CustomResourceDefinition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ var xxx_messageInfo_CustomResourceDefinition proto.InternalMessageInfo func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } func (*CustomResourceDefinitionCondition) ProtoMessage() {} func (*CustomResourceDefinitionCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{6} + return fileDescriptor_3623d6c0bd238430, []int{6} } func (m *CustomResourceDefinitionCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ var xxx_messageInfo_CustomResourceDefinitionCondition proto.InternalMessageInfo func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } func (*CustomResourceDefinitionList) ProtoMessage() {} func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{7} + return fileDescriptor_3623d6c0bd238430, []int{7} } func (m *CustomResourceDefinitionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ var xxx_messageInfo_CustomResourceDefinitionList proto.InternalMessageInfo func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } func (*CustomResourceDefinitionNames) ProtoMessage() {} func (*CustomResourceDefinitionNames) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{8} + return fileDescriptor_3623d6c0bd238430, []int{8} } func (m *CustomResourceDefinitionNames) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +303,7 @@ var xxx_messageInfo_CustomResourceDefinitionNames proto.InternalMessageInfo func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } func (*CustomResourceDefinitionSpec) ProtoMessage() {} func (*CustomResourceDefinitionSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{9} + return fileDescriptor_3623d6c0bd238430, []int{9} } func (m *CustomResourceDefinitionSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ var xxx_messageInfo_CustomResourceDefinitionSpec proto.InternalMessageInfo func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } func (*CustomResourceDefinitionStatus) ProtoMessage() {} func (*CustomResourceDefinitionStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{10} + return fileDescriptor_3623d6c0bd238430, []int{10} } func (m *CustomResourceDefinitionStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +359,7 @@ var xxx_messageInfo_CustomResourceDefinitionStatus proto.InternalMessageInfo func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } func (*CustomResourceDefinitionVersion) ProtoMessage() {} func (*CustomResourceDefinitionVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{11} + return fileDescriptor_3623d6c0bd238430, []int{11} } func (m *CustomResourceDefinitionVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +387,7 @@ var xxx_messageInfo_CustomResourceDefinitionVersion proto.InternalMessageInfo func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } func (*CustomResourceSubresourceScale) ProtoMessage() {} func (*CustomResourceSubresourceScale) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{12} + return fileDescriptor_3623d6c0bd238430, []int{12} } func (m *CustomResourceSubresourceScale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +415,7 @@ var xxx_messageInfo_CustomResourceSubresourceScale proto.InternalMessageInfo func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } func (*CustomResourceSubresourceStatus) ProtoMessage() {} func (*CustomResourceSubresourceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{13} + return fileDescriptor_3623d6c0bd238430, []int{13} } func (m *CustomResourceSubresourceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +443,7 @@ var xxx_messageInfo_CustomResourceSubresourceStatus proto.InternalMessageInfo func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } func (*CustomResourceSubresources) ProtoMessage() {} func (*CustomResourceSubresources) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{14} + return fileDescriptor_3623d6c0bd238430, []int{14} } func (m *CustomResourceSubresources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ var xxx_messageInfo_CustomResourceSubresources proto.InternalMessageInfo func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } func (*CustomResourceValidation) ProtoMessage() {} func (*CustomResourceValidation) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{15} + return fileDescriptor_3623d6c0bd238430, []int{15} } func (m *CustomResourceValidation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +499,7 @@ var xxx_messageInfo_CustomResourceValidation proto.InternalMessageInfo func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } func (*ExternalDocumentation) ProtoMessage() {} func (*ExternalDocumentation) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{16} + return fileDescriptor_3623d6c0bd238430, []int{16} } func (m *ExternalDocumentation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ var xxx_messageInfo_ExternalDocumentation proto.InternalMessageInfo func (m *JSON) Reset() { *m = JSON{} } func (*JSON) ProtoMessage() {} func (*JSON) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{17} + return fileDescriptor_3623d6c0bd238430, []int{17} } func (m *JSON) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +555,7 @@ var xxx_messageInfo_JSON proto.InternalMessageInfo func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } func (*JSONSchemaProps) ProtoMessage() {} func (*JSONSchemaProps) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{18} + return fileDescriptor_3623d6c0bd238430, []int{18} } func (m *JSONSchemaProps) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +583,7 @@ var xxx_messageInfo_JSONSchemaProps proto.InternalMessageInfo func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } func (*JSONSchemaPropsOrArray) ProtoMessage() {} func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{19} + return fileDescriptor_3623d6c0bd238430, []int{19} } func (m *JSONSchemaPropsOrArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +611,7 @@ var xxx_messageInfo_JSONSchemaPropsOrArray proto.InternalMessageInfo func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } func (*JSONSchemaPropsOrBool) ProtoMessage() {} func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{20} + return fileDescriptor_3623d6c0bd238430, []int{20} } func (m *JSONSchemaPropsOrBool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +639,7 @@ var xxx_messageInfo_JSONSchemaPropsOrBool proto.InternalMessageInfo func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} func (*JSONSchemaPropsOrStringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{21} + return fileDescriptor_3623d6c0bd238430, []int{21} } func (m *JSONSchemaPropsOrStringArray) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -664,10 +664,38 @@ func (m *JSONSchemaPropsOrStringArray) XXX_DiscardUnknown() { var xxx_messageInfo_JSONSchemaPropsOrStringArray proto.InternalMessageInfo +func (m *SelectableField) Reset() { *m = SelectableField{} } +func (*SelectableField) ProtoMessage() {} +func (*SelectableField) Descriptor() ([]byte, []int) { + return fileDescriptor_3623d6c0bd238430, []int{22} +} +func (m *SelectableField) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SelectableField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SelectableField) XXX_Merge(src proto.Message) { + xxx_messageInfo_SelectableField.Merge(m, src) +} +func (m *SelectableField) XXX_Size() int { + return m.Size() +} +func (m *SelectableField) XXX_DiscardUnknown() { + xxx_messageInfo_SelectableField.DiscardUnknown(m) +} + +var xxx_messageInfo_SelectableField proto.InternalMessageInfo + func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{22} + return fileDescriptor_3623d6c0bd238430, []int{23} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -695,7 +723,7 @@ var xxx_messageInfo_ServiceReference proto.InternalMessageInfo func (m *ValidationRule) Reset() { *m = ValidationRule{} } func (*ValidationRule) ProtoMessage() {} func (*ValidationRule) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{23} + return fileDescriptor_3623d6c0bd238430, []int{24} } func (m *ValidationRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -723,7 +751,7 @@ var xxx_messageInfo_ValidationRule proto.InternalMessageInfo func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_98a4cc6918394e53, []int{24} + return fileDescriptor_3623d6c0bd238430, []int{25} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -775,216 +803,219 @@ func init() { proto.RegisterType((*JSONSchemaPropsOrArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray") proto.RegisterType((*JSONSchemaPropsOrBool)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool") proto.RegisterType((*JSONSchemaPropsOrStringArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray") + proto.RegisterType((*SelectableField)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.SelectableField") proto.RegisterType((*ServiceReference)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ServiceReference") proto.RegisterType((*ValidationRule)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ValidationRule") proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.WebhookClientConfig") } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto", fileDescriptor_98a4cc6918394e53) -} - -var fileDescriptor_98a4cc6918394e53 = []byte{ - // 3170 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x73, 0x1c, 0x47, - 0xd9, 0xf7, 0xec, 0x6a, 0xa5, 0x55, 0x4b, 0xb6, 0xa4, 0xb6, 0xa5, 0x8c, 0x15, 0x47, 0x2b, 0xaf, - 0xdf, 0xf8, 0x55, 0x12, 0x67, 0x95, 0xf8, 0x4d, 0xde, 0xe4, 0xcd, 0x4b, 0x8a, 0xd2, 0x4a, 0x72, - 0x50, 0x62, 0x59, 0xa2, 0xd7, 0x76, 0x04, 0xf9, 0x1c, 0xed, 0xf4, 0xae, 0x27, 0x9a, 0x9d, 0x19, - 0x77, 0xcf, 0xac, 0xa4, 0x0a, 0x50, 0x7c, 0x54, 0x0a, 0x8a, 0x02, 0x42, 0x91, 0x5c, 0x28, 0xe0, - 0x10, 0x28, 0x2e, 0x1c, 0xe0, 0x00, 0x37, 0xf8, 0x03, 0x72, 0x4c, 0x01, 0x87, 0x1c, 0xa8, 0x85, - 0x2c, 0x57, 0x8e, 0x54, 0x51, 0xa5, 0x13, 0xd5, 0x1f, 0xd3, 0xd3, 0x3b, 0xbb, 0x6b, 0xbb, 0xa2, - 0xdd, 0x98, 0xdb, 0xee, 0xf3, 0xf5, 0x7b, 0xe6, 0xe9, 0xa7, 0x9f, 0x7e, 0xfa, 0x99, 0x01, 0xb5, - 0xbd, 0x67, 0x69, 0xc9, 0xf1, 0x97, 0xf7, 0xa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0xc4, 0xb7, 0x39, 0x15, 0x49, 0x2e, 0x2b, 0xf9, 0xd4, 0xf1, 0xea, - 0x91, 0x6b, 0x11, 0x99, 0x4e, 0xea, 0xa9, 0x2b, 0x92, 0x8e, 0x94, 0x04, 0x2c, 0x01, 0x40, 0x6f, - 0xf9, 0x24, 0xe4, 0x18, 0xb2, 0x7a, 0x9d, 0x62, 0x05, 0xa2, 0xa2, 0xa8, 0x48, 0x93, 0x60, 0x27, - 0xda, 0x9e, 0xe3, 0xd9, 0x72, 0xd5, 0xd5, 0x2e, 0x7e, 0xc9, 0xf1, 0x6c, 0xc4, 0x39, 0x0c, 0xdf, - 0x75, 0x68, 0xc8, 0x28, 0x72, 0xc9, 0x3b, 0xa2, 0xce, 0x25, 0x95, 0x04, 0xc3, 0xaf, 0xb2, 0xaa, - 0xef, 0x13, 0x07, 0x53, 0x73, 0x34, 0xc1, 0x5f, 0x55, 0x54, 0xa4, 0x49, 0x14, 0xff, 0x91, 0xef, - 0x9f, 0x24, 0xac, 0x94, 0xc0, 0x0b, 0x20, 0x57, 0x27, 0x7e, 0x14, 0xc8, 0x28, 0xa9, 0x68, 0xbf, - 0xc0, 0x88, 0x48, 0xf0, 0x58, 0x56, 0x36, 0x3b, 0xda, 0x54, 0x95, 0x95, 0x71, 0x73, 0x1a, 0xf3, - 0xe1, 0x37, 0x0c, 0x90, 0xf3, 0x64, 0x70, 0x58, 0xca, 0xbd, 0x3a, 0xa4, 0xbc, 0xe0, 0xe1, 0x4d, - 0xdc, 0x15, 0x91, 0x17, 0xc8, 0xf0, 0x29, 0x90, 0xa3, 0x55, 0x3f, 0xc0, 0x32, 0xea, 0x0b, 0xb1, - 0x50, 0x85, 0x11, 0x8f, 0x5a, 0x85, 0x93, 0xb1, 0x39, 0x4e, 0x40, 0x42, 0x18, 0x7e, 0xdb, 0x00, - 0xa0, 0x69, 0xb9, 0x8e, 0x6d, 0xf1, 0x96, 0x21, 0xc7, 0xdd, 0x1f, 0x6c, 0x5a, 0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 0x31, - 0xf1, 0x2c, 0x77, 0xcd, 0xaf, 0x46, 0x0d, 0xec, 0x85, 0xc2, 0xd1, 0xd4, 0xc4, 0xcb, 0xb8, 0xc7, - 0x89, 0xd7, 0x43, 0x20, 0x1b, 0x11, 0x57, 0x66, 0xf1, 0x84, 0x9a, 0xe8, 0xa2, 0xab, 0x88, 0xd1, - 0x8b, 0xe7, 0xc1, 0x08, 0xf3, 0x13, 0x9e, 0x05, 0x59, 0x62, 0xed, 0x73, 0xab, 0x93, 0xe5, 0x31, - 0x26, 0x82, 0xac, 0x7d, 0xc4, 0x68, 0xc5, 0x3f, 0x9f, 0x07, 0x53, 0xa9, 0x67, 0x81, 0xf3, 0x20, - 0xa3, 0xc6, 0xc4, 0x40, 0x1a, 0xcd, 0x6c, 0xac, 0xa1, 0x8c, 0x63, 0xc3, 0x67, 0x54, 0xf1, 0x15, - 0xa0, 0x05, 0x75, 0x96, 0x70, 0x2a, 0xeb, 0xcf, 0x13, 0x73, 0xcc, 0x91, 0xb8, 0x70, 0x32, 0x1f, - 0x70, 0x4d, 0xee, 0x12, 0xe1, 0x03, 0xae, 0x21, 0x46, 0xfb, 0xb4, 0xe3, 0xbe, 0x78, 0xde, 0x98, - 0xbb, 0x87, 0x79, 0xe3, 0xe8, 0x1d, 0xe7, 0x8d, 0x17, 0x40, 0x2e, 0x74, 0x42, 0x17, 0xf3, 0x83, - 0x4c, 0xbb, 0x46, 0x5d, 0x67, 0x44, 0x24, 0x78, 0xf0, 0x2d, 0x30, 0x66, 0xe3, 0x9a, 0x15, 0xb9, - 0x21, 0x3f, 0xb3, 0x26, 0x2e, 0xaf, 0x0e, 0x20, 0x85, 0xc4, 0x30, 0x78, 0x4d, 0xd8, 0x45, 0x31, - 0x00, 0x7c, 0x18, 0x8c, 0x35, 0xac, 0x03, 0xa7, 0x11, 0x35, 0x78, 0x83, 0x69, 0x08, 0xb1, 0x4d, - 0x41, 0x42, 0x31, 0x8f, 0x55, 0x46, 0x7c, 0x50, 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, 0x6c, 0xf1, - 0x8f, 0x06, 0xe8, 0xf5, 0xa1, 0x1d, 0x3c, 0x2b, 0xc6, 0xb6, 0xda, 0x2c, 0x34, 0x1e, 0xd9, 0xc2, - 0x26, 0x18, 0xa3, 0x22, 0x57, 0x64, 0x2e, 0x6f, 0x1d, 0x33, 0x97, 0xd3, 0x99, 0x27, 0xfa, 0xc5, - 0x98, 0x1a, 0x83, 0xb1, 0x74, 0xae, 0x5a, 0xe5, 0xc8, 0xb3, 0xe5, 0x24, 0x7f, 0x52, 0xa4, 0xf3, - 0xea, 0x8a, 0xa0, 0x21, 0xc5, 0x2d, 0x57, 0x3f, 0xfc, 0x64, 0xe1, 0xc4, 0x47, 0x9f, 0x2c, 0x9c, - 0xf8, 0xf8, 0x93, 0x85, 0x13, 0x5f, 0x6f, 0x2f, 0x18, 0x1f, 0xb6, 0x17, 0x8c, 0x8f, 0xda, 0x0b, - 0xc6, 0xc7, 0xed, 0x05, 0xe3, 0x6f, 0xed, 0x05, 0xe3, 0x87, 0x7f, 0x5f, 0x38, 0xf1, 0xe5, 0xe7, - 0x8f, 0xf5, 0x6d, 0xfb, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x16, 0x56, 0x59, 0x35, 0x34, 0x2f, - 0x00, 0x00, + proto.RegisterFile("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto", fileDescriptor_3623d6c0bd238430) +} + +var fileDescriptor_3623d6c0bd238430 = []byte{ + // 3214 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0xcf, 0x73, 0x1c, 0x57, + 0xf1, 0xf7, 0xac, 0xb4, 0xd2, 0xaa, 0x25, 0x5b, 0xd2, 0xb3, 0xa5, 0x8c, 0x15, 0x47, 0x2b, 0xaf, + 0xbf, 0xf1, 0x57, 0x49, 0x9c, 0x55, 0xe2, 0x6f, 0xf2, 0x4d, 0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xd6, 0x57, 0x71, 0xce, 0x32, 0xd1, 0x33, 0x71, + 0x4d, 0x10, 0xa0, 0xc5, 0xb8, 0xc4, 0x71, 0x2a, 0xbb, 0xcd, 0x24, 0xea, 0x98, 0x21, 0x51, 0x3e, + 0x67, 0x36, 0x90, 0x5d, 0x79, 0x4a, 0x84, 0x0d, 0x64, 0x17, 0x33, 0xda, 0x67, 0x1d, 0x8e, 0x46, + 0xd3, 0xd9, 0xfc, 0x3d, 0x4c, 0x67, 0x47, 0xee, 0x38, 0x9d, 0x3d, 0x07, 0xf9, 0xc0, 0x0a, 0x6c, + 0xc2, 0xeb, 0xab, 0x72, 0xe9, 0xbc, 0xca, 0x88, 0x58, 0xf0, 0xd0, 0x4d, 0x18, 0x35, 0xc9, 0xae, + 0x11, 0xda, 0x01, 0x2f, 0xa5, 0xe3, 0x17, 0x57, 0xfa, 0x10, 0x42, 0x62, 0x74, 0xbe, 0x2a, 0xf4, + 0xe2, 0x08, 0x00, 0x3d, 0x0c, 0xa3, 0x0d, 0x63, 0xdf, 0x6a, 0x84, 0x0d, 0xde, 0xf7, 0x6a, 0x42, + 0x6c, 0x43, 0x90, 0x70, 0xc4, 0x63, 0x99, 0x91, 0xec, 0xd7, 0xec, 0x90, 0x5a, 0x4d, 0x22, 0x99, + 0xb2, 0x27, 0x8d, 0x33, 0xe3, 0x5a, 0x86, 0x8f, 0x3b, 0x56, 0x70, 0x30, 0xcb, 0xe1, 0x8b, 0xc7, + 0x15, 0x30, 0x41, 0xc2, 0x11, 0x2f, 0x0d, 0x26, 0xe5, 0x27, 0x7a, 0x81, 0xc9, 0xc5, 0x1d, 0x2b, + 0xd0, 0x63, 0x30, 0xd6, 0x30, 0xf6, 0x2f, 0x13, 0xa7, 0x1e, 0xdc, 0xd0, 0x8f, 0x2f, 0x68, 0x8b, + 0x43, 0x95, 0xe3, 0xed, 0x56, 0x71, 0x6c, 0x23, 0x22, 0xe2, 0x84, 0xcf, 0x85, 0x2d, 0x47, 0x0a, + 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4, 0x9b, 0xfe, 0xb2, 0xef, 0x1b, 0x07, 0xa2, 0xd2, 0xa8, 0x33, + 0x3e, 0x44, 0x21, 0x6f, 0xd8, 0xf6, 0xe6, 0xae, 0x7e, 0xba, 0x2f, 0x5d, 0x53, 0xb6, 0x82, 0xc4, + 0x59, 0x67, 0x99, 0x81, 0x60, 0x81, 0xc5, 0x40, 0x5d, 0x87, 0x85, 0xc6, 0xdc, 0x60, 0x41, 0x37, + 0x19, 0x08, 0x16, 0x58, 0xfc, 0x49, 0x9d, 0x83, 0xcd, 0x5d, 0xfd, 0xc1, 0x01, 0x3f, 0x29, 0x03, + 0xc1, 0x02, 0x0b, 0x59, 0x30, 0xe4, 0xb8, 0x81, 0x7e, 0x66, 0x20, 0xe5, 0x99, 0x17, 0x9c, 0x2b, + 0x6e, 0x80, 0x19, 0x06, 0xfa, 0x89, 0x06, 0xe0, 0x25, 0x21, 0xfa, 0x50, 0x5f, 0x06, 0x48, 0x19, + 0xc8, 0x72, 0x12, 0xdb, 0x6b, 0x4e, 0xe0, 0x1f, 0x24, 0xb7, 0x36, 0xe5, 0x0c, 0x28, 0x56, 0xa0, + 0x5f, 0x6a, 0x70, 0x4a, 0xed, 0xde, 0x63, 0xf3, 0xe6, 0xb9, 0x47, 0xae, 0xf6, 0x3b, 0xcc, 0x2b, + 0xae, 0x6b, 0x57, 0xf4, 0x76, 0xab, 0x78, 0x6a, 0xb9, 0x0b, 0x2a, 0xee, 0x6a, 0x0b, 0xfa, 0xad, + 0x06, 0xd3, 0x32, 0x8b, 0x2a, 0x16, 0x16, 0xb9, 0x03, 0x49, 0xbf, 0x1d, 0x98, 0xc5, 0x11, 0x7e, + 0x8c, 0x3f, 0x49, 0xe8, 0xe0, 0xe3, 0x4e, 0xd3, 0xd0, 0x1f, 0x34, 0x98, 0x30, 0x89, 0x47, 0x1c, + 0x93, 0x38, 0x35, 0x66, 0xeb, 0x42, 0x5f, 0x26, 0x29, 0x59, 0x5b, 0x57, 0x15, 0x08,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94, 0xaf, 0x02, 0x26, 0xc4, 0x79, 0x58, 0x59, 0x16, 0x34, 0x1c, + 0x73, 0x2b, 0xb5, 0x8f, 0x3e, 0x9d, 0x3f, 0xf6, 0xf1, 0xa7, 0xf3, 0xc7, 0x3e, 0xf9, 0x74, 0xfe, + 0xd8, 0xb7, 0xda, 0xf3, 0xda, 0x47, 0xed, 0x79, 0xed, 0xe3, 0xf6, 0xbc, 0xf6, 0x49, 0x7b, 0x5e, + 0xfb, 0x7b, 0x7b, 0x5e, 0xfb, 0xf1, 0x3f, 0xe6, 0x8f, 0x7d, 0xed, 0xf9, 0x23, 0xfd, 0x2b, 0xc1, + 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xe3, 0x03, 0xa1, 0x8a, 0x30, 0x00, 0x00, } func (m *ConversionRequest) Marshal() (dAtA []byte, err error) { @@ -1467,6 +1498,20 @@ func (m *CustomResourceDefinitionSpec) MarshalToSizedBuffer(dAtA []byte) (int, e _ = i var l int _ = l + if len(m.SelectableFields) > 0 { + for iNdEx := len(m.SelectableFields) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SelectableFields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } if m.PreserveUnknownFields != nil { i-- if *m.PreserveUnknownFields { @@ -1645,6 +1690,20 @@ func (m *CustomResourceDefinitionVersion) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l + if len(m.SelectableFields) > 0 { + for iNdEx := len(m.SelectableFields) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SelectableFields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } if m.DeprecationWarning != nil { i -= len(*m.DeprecationWarning) copy(dAtA[i:], *m.DeprecationWarning) @@ -2597,6 +2656,34 @@ func (m *JSONSchemaPropsOrStringArray) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *SelectableField) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SelectableField) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SelectableField) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.JSONPath) + copy(dAtA[i:], m.JSONPath) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.JSONPath))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *ServiceReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2979,6 +3066,12 @@ func (m *CustomResourceDefinitionSpec) Size() (n int) { if m.PreserveUnknownFields != nil { n += 2 } + if len(m.SelectableFields) > 0 { + for _, e := range m.SelectableFields { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -3034,6 +3127,12 @@ func (m *CustomResourceDefinitionVersion) Size() (n int) { l = len(*m.DeprecationWarning) n += 1 + l + sovGenerated(uint64(l)) } + if len(m.SelectableFields) > 0 { + for _, e := range m.SelectableFields { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -3348,6 +3447,17 @@ func (m *JSONSchemaPropsOrStringArray) Size() (n int) { return n } +func (m *SelectableField) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.JSONPath) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *ServiceReference) Size() (n int) { if m == nil { return 0 @@ -3562,6 +3672,11 @@ func (this *CustomResourceDefinitionSpec) String() string { repeatedStringForAdditionalPrinterColumns += strings.Replace(strings.Replace(f.String(), "CustomResourceColumnDefinition", "CustomResourceColumnDefinition", 1), `&`, ``, 1) + "," } repeatedStringForAdditionalPrinterColumns += "}" + repeatedStringForSelectableFields := "[]SelectableField{" + for _, f := range this.SelectableFields { + repeatedStringForSelectableFields += strings.Replace(strings.Replace(f.String(), "SelectableField", "SelectableField", 1), `&`, ``, 1) + "," + } + repeatedStringForSelectableFields += "}" s := strings.Join([]string{`&CustomResourceDefinitionSpec{`, `Group:` + fmt.Sprintf("%v", this.Group) + `,`, `Version:` + fmt.Sprintf("%v", this.Version) + `,`, @@ -3573,6 +3688,7 @@ func (this *CustomResourceDefinitionSpec) String() string { `AdditionalPrinterColumns:` + repeatedStringForAdditionalPrinterColumns + `,`, `Conversion:` + strings.Replace(this.Conversion.String(), "CustomResourceConversion", "CustomResourceConversion", 1) + `,`, `PreserveUnknownFields:` + valueToStringGenerated(this.PreserveUnknownFields) + `,`, + `SelectableFields:` + repeatedStringForSelectableFields + `,`, `}`, }, "") return s @@ -3603,6 +3719,11 @@ func (this *CustomResourceDefinitionVersion) String() string { repeatedStringForAdditionalPrinterColumns += strings.Replace(strings.Replace(f.String(), "CustomResourceColumnDefinition", "CustomResourceColumnDefinition", 1), `&`, ``, 1) + "," } repeatedStringForAdditionalPrinterColumns += "}" + repeatedStringForSelectableFields := "[]SelectableField{" + for _, f := range this.SelectableFields { + repeatedStringForSelectableFields += strings.Replace(strings.Replace(f.String(), "SelectableField", "SelectableField", 1), `&`, ``, 1) + "," + } + repeatedStringForSelectableFields += "}" s := strings.Join([]string{`&CustomResourceDefinitionVersion{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Served:` + fmt.Sprintf("%v", this.Served) + `,`, @@ -3612,6 +3733,7 @@ func (this *CustomResourceDefinitionVersion) String() string { `AdditionalPrinterColumns:` + repeatedStringForAdditionalPrinterColumns + `,`, `Deprecated:` + fmt.Sprintf("%v", this.Deprecated) + `,`, `DeprecationWarning:` + valueToStringGenerated(this.DeprecationWarning) + `,`, + `SelectableFields:` + repeatedStringForSelectableFields + `,`, `}`, }, "") return s @@ -3835,6 +3957,16 @@ func (this *JSONSchemaPropsOrStringArray) String() string { }, "") return s } +func (this *SelectableField) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SelectableField{`, + `JSONPath:` + fmt.Sprintf("%v", this.JSONPath) + `,`, + `}`, + }, "") + return s +} func (this *ServiceReference) String() string { if this == nil { return "nil" @@ -5755,6 +5887,40 @@ func (m *CustomResourceDefinitionSpec) Unmarshal(dAtA []byte) error { } b := bool(v != 0) m.PreserveUnknownFields = &b + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelectableFields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelectableFields = append(m.SelectableFields, SelectableField{}) + if err := m.SelectableFields[len(m.SelectableFields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -6185,6 +6351,40 @@ func (m *CustomResourceDefinitionVersion) Unmarshal(dAtA []byte) error { s := string(dAtA[iNdEx:postIndex]) m.DeprecationWarning = &s iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelectableFields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelectableFields = append(m.SelectableFields, SelectableField{}) + if err := m.SelectableFields[len(m.SelectableFields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -8825,6 +9025,88 @@ func (m *JSONSchemaPropsOrStringArray) Unmarshal(dAtA []byte) error { } return nil } +func (m *SelectableField) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SelectableField: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SelectableField: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JSONPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JSONPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto index b8477322b70..62d7a33dcd1 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto @@ -40,6 +40,7 @@ message ConversionRequest { optional string desiredAPIVersion = 2; // objects is the list of custom resource objects to be converted. + // +listType=atomic repeated k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3; } @@ -53,6 +54,7 @@ message ConversionResponse { // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. + // +listType=atomic repeated k8s.io.apimachinery.pkg.runtime.RawExtension convertedObjects = 2; // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if @@ -125,6 +127,7 @@ message CustomResourceConversion { // include any versions known to the API Server, calls to the webhook will fail. // Defaults to `["v1beta1"]`. // +optional + // +listType=atomic repeated string conversionReviewVersions = 3; } @@ -194,6 +197,7 @@ message CustomResourceDefinitionNames { // and used by clients to support invocations like `kubectl get `. // It must be all lowercase. // +optional + // +listType=atomic repeated string shortNames = 3; // kind is the serialized kind of the resource. It is normally CamelCase and singular. @@ -208,6 +212,7 @@ message CustomResourceDefinitionNames { // This is published in API discovery documents, and used by clients to support invocations like // `kubectl get all`. // +optional + // +listType=atomic repeated string categories = 6; } @@ -256,6 +261,7 @@ message CustomResourceDefinitionSpec { // major version, then minor version. An example sorted list of versions: // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. // +optional + // +listType=atomic repeated CustomResourceDefinitionVersion versions = 7; // additionalPrinterColumns specifies additional columns returned in Table output. @@ -264,8 +270,17 @@ message CustomResourceDefinitionSpec { // Top-level and per-version columns are mutually exclusive. // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic repeated CustomResourceColumnDefinition additionalPrinterColumns = 8; + // selectableFields specifies paths to fields that may be used as field selectors. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + repeated SelectableField selectableFields = 11; + // conversion defines conversion settings for the CRD. // +optional optional CustomResourceConversion conversion = 9; @@ -302,6 +317,7 @@ message CustomResourceDefinitionStatus { // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. // +optional + // +listType=atomic repeated string storedVersions = 3; } @@ -349,7 +365,16 @@ message CustomResourceDefinitionVersion { // Per-version columns must not all be set to identical values (top-level columns should be used instead). // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic repeated CustomResourceColumnDefinition additionalPrinterColumns = 6; + + // selectableFields specifies paths to fields that may be used as field selectors. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + repeated SelectableField selectableFields = 9; } // CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. @@ -491,20 +516,25 @@ message JSONSchemaProps { optional double multipleOf = 19; + // +listType=atomic repeated JSON enum = 20; optional int64 maxProperties = 21; optional int64 minProperties = 22; + // +listType=atomic repeated string required = 23; optional JSONSchemaPropsOrArray items = 24; + // +listType=atomic repeated JSONSchemaProps allOf = 25; + // +listType=atomic repeated JSONSchemaProps oneOf = 26; + // +listType=atomic repeated JSONSchemaProps anyOf = 27; optional JSONSchemaProps not = 28; @@ -570,6 +600,7 @@ message JSONSchemaProps { // to ensure those properties are present for all list items. // // +optional + // +listType=atomic repeated string xKubernetesListMapKeys = 41; // x-kubernetes-list-type annotates an array to further describe its topology. @@ -616,6 +647,7 @@ message JSONSchemaProps { message JSONSchemaPropsOrArray { optional JSONSchemaProps schema = 1; + // +listType=atomic repeated JSONSchemaProps jSONSchemas = 2; } @@ -631,9 +663,23 @@ message JSONSchemaPropsOrBool { message JSONSchemaPropsOrStringArray { optional JSONSchemaProps schema = 1; + // +listType=atomic repeated string property = 2; } +// SelectableField specifies the JSON path of a field that may be used with field selectors. +message SelectableField { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. + optional string jsonPath = 1; +} + // ServiceReference holds a reference to Service.legacy.k8s.io message ServiceReference { // namespace is the namespace of the service. diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go index db445b10d2b..153f7233775 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go @@ -76,6 +76,7 @@ type CustomResourceDefinitionSpec struct { // major version, then minor version. An example sorted list of versions: // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. // +optional + // +listType=atomic Versions []CustomResourceDefinitionVersion `json:"versions,omitempty" protobuf:"bytes,7,rep,name=versions"` // additionalPrinterColumns specifies additional columns returned in Table output. // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. @@ -83,8 +84,17 @@ type CustomResourceDefinitionSpec struct { // Top-level and per-version columns are mutually exclusive. // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,8,rep,name=additionalPrinterColumns"` + // selectableFields specifies paths to fields that may be used as field selectors. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,11,rep,name=selectableFields"` + // conversion defines conversion settings for the CRD. // +optional Conversion *CustomResourceConversion `json:"conversion,omitempty" protobuf:"bytes,9,opt,name=conversion"` @@ -122,6 +132,7 @@ type CustomResourceConversion struct { // include any versions known to the API Server, calls to the webhook will fail. // Defaults to `["v1beta1"]`. // +optional + // +listType=atomic ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty" protobuf:"bytes,3,rep,name=conversionReviewVersions"` } @@ -227,7 +238,29 @@ type CustomResourceDefinitionVersion struct { // Per-version columns must not all be set to identical values (top-level columns should be used instead). // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. // +optional + // +listType=atomic AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,6,rep,name=additionalPrinterColumns"` + + // selectableFields specifies paths to fields that may be used as field selectors. + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors + // + // +featureGate=CustomResourceFieldSelectors + // +optional + // +listType=atomic + SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,9,rep,name=selectableFields"` +} + +// SelectableField specifies the JSON path of a field that may be used with field selectors. +type SelectableField struct { + // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a + // field selector value. + // Only JSON paths without the array notation are allowed. + // Must point to a field of type string, boolean or integer. Types with enum values + // and strings with formats are allowed. + // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. + // Must not point to metdata fields. + // Required. + JSONPath string `json:"jsonPath" protobuf:"bytes,1,opt,name=jsonPath"` } // CustomResourceColumnDefinition specifies a column for server side printing. @@ -269,6 +302,7 @@ type CustomResourceDefinitionNames struct { // and used by clients to support invocations like `kubectl get `. // It must be all lowercase. // +optional + // +listType=atomic ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,3,opt,name=shortNames"` // kind is the serialized kind of the resource. It is normally CamelCase and singular. // Custom resource instances will use this value as the `kind` attribute in API calls. @@ -280,6 +314,7 @@ type CustomResourceDefinitionNames struct { // This is published in API discovery documents, and used by clients to support invocations like // `kubectl get all`. // +optional + // +listType=atomic Categories []string `json:"categories,omitempty" protobuf:"bytes,6,rep,name=categories"` } @@ -377,6 +412,7 @@ type CustomResourceDefinitionStatus struct { // versions from this list. // Versions may not be removed from `spec.versions` while they exist in this list. // +optional + // +listType=atomic StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` } @@ -509,6 +545,7 @@ type ConversionRequest struct { // desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1" DesiredAPIVersion string `json:"desiredAPIVersion" protobuf:"bytes,2,name=desiredAPIVersion"` // objects is the list of custom resource objects to be converted. + // +listType=atomic Objects []runtime.RawExtension `json:"objects" protobuf:"bytes,3,rep,name=objects"` } @@ -521,6 +558,7 @@ type ConversionResponse struct { // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. + // +listType=atomic ConvertedObjects []runtime.RawExtension `json:"convertedObjects" protobuf:"bytes,2,rep,name=convertedObjects"` // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if // the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go index 24c45bb04eb..86013e39f7c 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go @@ -76,25 +76,30 @@ type JSONSchemaProps struct { // default is a default value for undefined object fields. // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. // CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API. - Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` - Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` - ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` - Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` - ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` - MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` - MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` - Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` - MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` - MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` - UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` - MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` - Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` - MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` - MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` - Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` - Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` - AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` - OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` + Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` + Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` + ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` + Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` + ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` + MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` + MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` + Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` + MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` + MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` + UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` + MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` + // +listType=atomic + Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` + MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` + MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` + // +listType=atomic + Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` + Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` + // +listType=atomic + AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` + // +listType=atomic + OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` + // +listType=atomic AnyOf []JSONSchemaProps `json:"anyOf,omitempty" protobuf:"bytes,27,rep,name=anyOf"` Not *JSONSchemaProps `json:"not,omitempty" protobuf:"bytes,28,opt,name=not"` Properties map[string]JSONSchemaProps `json:"properties,omitempty" protobuf:"bytes,29,rep,name=properties"` @@ -150,6 +155,7 @@ type JSONSchemaProps struct { // to ensure those properties are present for all list items. // // +optional + // +listType=atomic XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty" protobuf:"bytes,41,rep,name=xKubernetesListMapKeys"` // x-kubernetes-list-type annotates an array to further describe its topology. @@ -343,7 +349,8 @@ type JSONSchemaURL string // JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps // or an array of JSONSchemaProps. Mainly here for serialization purposes. type JSONSchemaPropsOrArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + // +listType=atomic JSONSchemas []JSONSchemaProps `protobuf:"bytes,2,rep,name=jSONSchemas"` } @@ -385,8 +392,9 @@ type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray // JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. type JSONSchemaPropsOrStringArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` - Property []string `protobuf:"bytes,2,rep,name=property"` + Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` + // +listType=atomic + Property []string `protobuf:"bytes,2,rep,name=property"` } // OpenAPISchemaType is used by the kube-openapi generator when constructing diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go index fa6e0ef24e7..d59274e8da6 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go @@ -212,6 +212,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*SelectableField)(nil), (*apiextensions.SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_SelectableField_To_apiextensions_SelectableField(a.(*SelectableField), b.(*apiextensions.SelectableField), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.SelectableField)(nil), (*SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_SelectableField_To_v1beta1_SelectableField(a.(*apiextensions.SelectableField), b.(*SelectableField), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ServiceReference)(nil), (*apiextensions.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_ServiceReference_To_apiextensions_ServiceReference(a.(*ServiceReference), b.(*apiextensions.ServiceReference), scope) }); err != nil { @@ -491,6 +501,7 @@ func autoConvert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomRes out.Versions = nil } out.AdditionalPrinterColumns = *(*[]apiextensions.CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]apiextensions.SelectableField)(unsafe.Pointer(&in.SelectableFields)) if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(apiextensions.CustomResourceConversion) @@ -538,6 +549,7 @@ func autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomRes out.Versions = nil } out.AdditionalPrinterColumns = *(*[]CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]SelectableField)(unsafe.Pointer(&in.SelectableFields)) if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) @@ -601,6 +613,7 @@ func autoConvert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_Custom } out.Subresources = (*apiextensions.CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) out.AdditionalPrinterColumns = *(*[]apiextensions.CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]apiextensions.SelectableField)(unsafe.Pointer(&in.SelectableFields)) return nil } @@ -626,6 +639,7 @@ func autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_Custom } out.Subresources = (*CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) out.AdditionalPrinterColumns = *(*[]CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) + out.SelectableFields = *(*[]SelectableField)(unsafe.Pointer(&in.SelectableFields)) return nil } @@ -1273,6 +1287,26 @@ func Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPro return autoConvert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPropsOrStringArray(in, out, s) } +func autoConvert_v1beta1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { + out.JSONPath = in.JSONPath + return nil +} + +// Convert_v1beta1_SelectableField_To_apiextensions_SelectableField is an autogenerated conversion function. +func Convert_v1beta1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { + return autoConvert_v1beta1_SelectableField_To_apiextensions_SelectableField(in, out, s) +} + +func autoConvert_apiextensions_SelectableField_To_v1beta1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { + out.JSONPath = in.JSONPath + return nil +} + +// Convert_apiextensions_SelectableField_To_v1beta1_SelectableField is an autogenerated conversion function. +func Convert_apiextensions_SelectableField_To_v1beta1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { + return autoConvert_apiextensions_SelectableField_To_v1beta1_SelectableField(in, out, s) +} + func autoConvert_v1beta1_ServiceReference_To_apiextensions_ServiceReference(in *ServiceReference, out *apiextensions.ServiceReference, s conversion.Scope) error { out.Namespace = in.Namespace out.Name = in.Name diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go index bb8ab06cb95..18740925c35 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go @@ -279,6 +279,11 @@ func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefiniti *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } + if in.SelectableFields != nil { + in, out := &in.SelectableFields, &out.SelectableFields + *out = make([]SelectableField, len(*in)) + copy(*out, *in) + } if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) @@ -354,6 +359,11 @@ func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefin *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } + if in.SelectableFields != nil { + in, out := &in.SelectableFields, &out.SelectableFields + *out = make([]SelectableField, len(*in)) + copy(*out, *in) + } return } @@ -610,6 +620,22 @@ func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelectableField) DeepCopyInto(out *SelectableField) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. +func (in *SelectableField) DeepCopy() *SelectableField { + if in == nil { + return nil + } + out := new(SelectableField) + 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 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go index b5e5c35c550..3be35f30858 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go @@ -197,6 +197,11 @@ func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefiniti *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } + if in.SelectableFields != nil { + in, out := &in.SelectableFields, &out.SelectableFields + *out = make([]SelectableField, len(*in)) + copy(*out, *in) + } if in.Conversion != nil { in, out := &in.Conversion, &out.Conversion *out = new(CustomResourceConversion) @@ -272,6 +277,11 @@ func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefin *out = make([]CustomResourceColumnDefinition, len(*in)) copy(*out, *in) } + if in.SelectableFields != nil { + in, out := &in.SelectableFields, &out.SelectableFields + *out = make([]SelectableField, len(*in)) + copy(*out, *in) + } return } @@ -507,6 +517,22 @@ func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SelectableField) DeepCopyInto(out *SelectableField) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. +func (in *SelectableField) DeepCopy() *SelectableField { + if in == nil { + return nil + } + out := new(SelectableField) + 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 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go index 2a3248090cd..4f065a18fb7 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go @@ -17,7 +17,6 @@ limitations under the License. package cel import ( - "errors" "fmt" "strings" "time" @@ -126,9 +125,6 @@ func Compile(s *schema.Structural, declType *apiservercel.DeclType, perCallLimit if len(s.Extensions.XValidations) == 0 { return nil, nil } - if declType == nil { - return nil, errors.New("failed to convert to declType for CEL validation rules") - } celRules := s.Extensions.XValidations oldSelfEnvSet, optionalOldSelfEnvSet, err := prepareEnvSet(baseEnvSet, declType) @@ -286,7 +282,7 @@ func compileRule(s *schema.Structural, rule apiextensions.ValidationRule, envSet compilationResult.MessageExpressionMaxCost = costEst.Max } if rule.FieldPath != "" { - validFieldPath, err := ValidFieldPath(rule.FieldPath, s) + validFieldPath, _, err := ValidFieldPath(rule.FieldPath, s) if err == nil { compilationResult.NormalizedRuleFieldPath = validFieldPath.String() } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model/adaptor.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model/adaptor.go index aeed2a858cc..0bc109a73f8 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model/adaptor.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model/adaptor.go @@ -62,9 +62,6 @@ func (s *Structural) Pattern() string { } func (s *Structural) Items() common.Schema { - if s.Structural.Items == nil { - return nil - } return &Structural{Structural: s.Structural.Items} } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go index f78c38faa4c..d9b595805ba 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go @@ -31,9 +31,6 @@ import ( "github.com/google/cel-go/common/types/ref" "github.com/google/cel-go/interpreter" - "k8s.io/klog/v2" - "k8s.io/utils/ptr" - apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apiextensions-apiserver/pkg/apiserver/schema" "k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model" @@ -45,6 +42,8 @@ import ( "k8s.io/apiserver/pkg/cel/metrics" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/apiserver/pkg/warning" + "k8s.io/klog/v2" + "k8s.io/utils/ptr" celconfig "k8s.io/apiserver/pkg/apis/cel" ) @@ -91,17 +90,12 @@ func NewValidator(s *schema.Structural, isResourceRoot bool, perCallLimit uint64 // exist. declType is expected to be a CEL DeclType corresponding to the structural schema. // perCallLimit was added for testing purpose only. Callers should always use const PerCallLimit from k8s.io/apiserver/pkg/apis/cel/config.go as input. func validator(s *schema.Structural, isResourceRoot bool, declType *cel.DeclType, perCallLimit uint64) *Validator { - compiledRules, err := Compile(s, declType, perCallLimit, environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion()), StoredExpressionsEnvLoader()) + // strictCost is always true to enforce cost limits. + compiledRules, err := Compile(s, declType, perCallLimit, environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), true), StoredExpressionsEnvLoader()) var itemsValidator, additionalPropertiesValidator *Validator var propertiesValidators map[string]Validator - var elemType *cel.DeclType - if declType != nil { - elemType = declType.ElemType - } else { - elemType = declType - } if s.Items != nil { - itemsValidator = validator(s.Items, s.Items.XEmbeddedResource, elemType, perCallLimit) + itemsValidator = validator(s.Items, s.Items.XEmbeddedResource, declType.ElemType, perCallLimit) } if len(s.Properties) > 0 { propertiesValidators = make(map[string]Validator, len(s.Properties)) @@ -109,9 +103,6 @@ func validator(s *schema.Structural, isResourceRoot bool, declType *cel.DeclType prop := p var fieldType *cel.DeclType if escapedPropName, ok := cel.Escape(k); ok { - if declType == nil { - continue - } if f, ok := declType.Fields[escapedPropName]; ok { fieldType = f.Type } else { @@ -132,7 +123,7 @@ func validator(s *schema.Structural, isResourceRoot bool, declType *cel.DeclType } } if s.AdditionalProperties != nil && s.AdditionalProperties.Structural != nil { - additionalPropertiesValidator = validator(s.AdditionalProperties.Structural, s.AdditionalProperties.Structural.XEmbeddedResource, elemType, perCallLimit) + additionalPropertiesValidator = validator(s.AdditionalProperties.Structural, s.AdditionalProperties.Structural.XEmbeddedResource, declType.ElemType, perCallLimit) } if len(compiledRules) > 0 || err != nil || itemsValidator != nil || additionalPropertiesValidator != nil || len(propertiesValidators) > 0 { activationFactory := validationActivationWithoutOldSelf @@ -219,8 +210,16 @@ func (r ratchetingOptions) shouldRatchetError() bool { func (r ratchetingOptions) key(field string) ratchetingOptions { if r.currentCorrelation == nil { return r + } else if r.nearestParentCorrelation == nil && (field == "apiVersion" || field == "kind") { + // We cannot ratchet changes to the APIVersion and kind fields field since + // they aren't visible. (both old and new are converted to the same type) + // + return ratchetingOptions{} } + // nearestParentCorrelation is always non-nil except for the root node. + // The below line ensures that the next nearestParentCorrelation is set + // to a non-nil r.currentCorrelation return ratchetingOptions{currentCorrelation: r.currentCorrelation.Key(field), nearestParentCorrelation: r.currentCorrelation} } @@ -370,8 +369,9 @@ func (s *Validator) validateExpressions(ctx context.Context, fldPath *field.Path continue } if evalResult != types.True { + currentFldPath := fldPath if len(compiled.NormalizedRuleFieldPath) > 0 { - fldPath = fldPath.Child(compiled.NormalizedRuleFieldPath) + currentFldPath = currentFldPath.Child(compiled.NormalizedRuleFieldPath) } addErr := func(e *field.Error) { @@ -386,22 +386,22 @@ func (s *Validator) validateExpressions(ctx context.Context, fldPath *field.Path messageExpression, newRemainingBudget, msgErr := evalMessageExpression(ctx, compiled.MessageExpression, rule.MessageExpression, activation, remainingBudget) if msgErr != nil { if msgErr.Type == cel.ErrorTypeInternal { - addErr(field.InternalError(fldPath, msgErr)) + addErr(field.InternalError(currentFldPath, msgErr)) return errs, -1 } else if msgErr.Type == cel.ErrorTypeInvalid { - addErr(field.Invalid(fldPath, sts.Type, msgErr.Error())) + addErr(field.Invalid(currentFldPath, sts.Type, msgErr.Error())) return errs, -1 } else { klog.V(2).ErrorS(msgErr, "messageExpression evaluation failed") - addErr(fieldErrorForReason(fldPath, sts.Type, ruleMessageOrDefault(rule), rule.Reason)) + addErr(fieldErrorForReason(currentFldPath, sts.Type, ruleMessageOrDefault(rule), rule.Reason)) remainingBudget = newRemainingBudget } } else { - addErr(fieldErrorForReason(fldPath, sts.Type, messageExpression, rule.Reason)) + addErr(fieldErrorForReason(currentFldPath, sts.Type, messageExpression, rule.Reason)) remainingBudget = newRemainingBudget } } else { - addErr(fieldErrorForReason(fldPath, sts.Type, ruleMessageOrDefault(rule), rule.Reason)) + addErr(fieldErrorForReason(currentFldPath, sts.Type, ruleMessageOrDefault(rule), rule.Reason)) } } } @@ -441,9 +441,30 @@ func unescapeSingleQuote(s string) (string, error) { return unescaped, err } +type validFieldPathOptions struct { + allowArrayNotation bool +} + +// ValidFieldPathOption provides vararg options for ValidFieldPath. +type ValidFieldPathOption func(*validFieldPathOptions) + +// WithFieldPathAllowArrayNotation sets of array annotation ('[]') is allowed +// in field paths. +// Defaults to true +func WithFieldPathAllowArrayNotation(allow bool) ValidFieldPathOption { + return func(options *validFieldPathOptions) { + options.allowArrayNotation = allow + } +} + // ValidFieldPath validates that jsonPath is a valid JSON Path containing only field and map accessors // that are valid for the given schema, and returns a field.Path representation of the validated jsonPath or an error. -func ValidFieldPath(jsonPath string, schema *schema.Structural) (validFieldPath *field.Path, err error) { +func ValidFieldPath(jsonPath string, schema *schema.Structural, options ...ValidFieldPathOption) (validFieldPath *field.Path, foundSchema *schema.Structural, err error) { + opts := &validFieldPathOptions{allowArrayNotation: true} + for _, opt := range options { + opt(opts) + } + appendToPath := func(name string, isNamed bool) error { if !isNamed { validFieldPath = validFieldPath.Key(name) @@ -504,16 +525,19 @@ func ValidFieldPath(jsonPath string, schema *schema.Structural) (validFieldPath tok = scanner.Text() switch tok { case "[": + if !opts.allowArrayNotation { + return nil, nil, fmt.Errorf("array notation is not allowed") + } if !scanner.Scan() { - return nil, fmt.Errorf("unexpected end of JSON path") + return nil, nil, fmt.Errorf("unexpected end of JSON path") } tok = scanner.Text() if len(tok) < 2 || tok[0] != '\'' || tok[len(tok)-1] != '\'' { - return nil, fmt.Errorf("expected single quoted string but got %s", tok) + return nil, nil, fmt.Errorf("expected single quoted string but got %s", tok) } unescaped, err := unescapeSingleQuote(tok[1 : len(tok)-1]) if err != nil { - return nil, fmt.Errorf("invalid string literal: %v", err) + return nil, nil, fmt.Errorf("invalid string literal: %w", err) } if schema.Properties != nil { @@ -521,21 +545,21 @@ func ValidFieldPath(jsonPath string, schema *schema.Structural) (validFieldPath } else if schema.AdditionalProperties != nil { isNamed = false } else { - return nil, fmt.Errorf("does not refer to a valid field") + return nil, nil, fmt.Errorf("does not refer to a valid field") } if err := appendToPath(unescaped, isNamed); err != nil { - return nil, err + return nil, nil, err } if !scanner.Scan() { - return nil, fmt.Errorf("unexpected end of JSON path") + return nil, nil, fmt.Errorf("unexpected end of JSON path") } tok = scanner.Text() if tok != "]" { - return nil, fmt.Errorf("expected ] but got %s", tok) + return nil, nil, fmt.Errorf("expected ] but got %s", tok) } case ".": if !scanner.Scan() { - return nil, fmt.Errorf("unexpected end of JSON path") + return nil, nil, fmt.Errorf("unexpected end of JSON path") } tok = scanner.Text() if schema.Properties != nil { @@ -543,16 +567,17 @@ func ValidFieldPath(jsonPath string, schema *schema.Structural) (validFieldPath } else if schema.AdditionalProperties != nil { isNamed = false } else { - return nil, fmt.Errorf("does not refer to a valid field") + return nil, nil, fmt.Errorf("does not refer to a valid field") } if err := appendToPath(tok, isNamed); err != nil { - return nil, err + return nil, nil, err } default: - return nil, fmt.Errorf("expected [ or . but got: %s", tok) + return nil, nil, fmt.Errorf("expected [ or . but got: %s", tok) } } - return validFieldPath, nil + + return validFieldPath, schema, nil } func fieldErrorForReason(fldPath *field.Path, value interface{}, detail string, reason *apiextensions.FieldValueErrorReason) *field.Error { diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/ratcheting.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/ratcheting.go index 3cc653e7466..9cd01686863 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/ratcheting.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/ratcheting.go @@ -165,7 +165,13 @@ func (r *ratchetingValueValidator) Validate(new interface{}) *validate.Result { // If the old value cannot be correlated, then default validation is used. func (r *ratchetingValueValidator) SubPropertyValidator(field string, schema *spec.Schema, rootSchema interface{}, root string, formats strfmt.Registry, options ...validate.Option) validate.ValueValidator { childNode := r.correlation.Key(field) - if childNode == nil { + if childNode == nil || (r.path == "" && isTypeMetaField(field)) { + // Defer to default validation if we cannot correlate the old value + // or if we are validating the root object and the field is a metadata + // field. + // + // We cannot ratchet changes to the APIVersion field since they aren't visible. + // (both old and new are converted to the same type) return validate.NewSchemaValidator(schema, rootSchema, root, formats, options...) } @@ -210,3 +216,7 @@ func (r ratchetingValueValidator) SetPath(path string) { func (r ratchetingValueValidator) Applies(source interface{}, valueKind reflect.Kind) bool { return true } + +func isTypeMetaField(path string) bool { + return path == "kind" || path == "apiVersion" +} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go index 1019b03e9dc..aaf2a139cfa 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go @@ -29,6 +29,7 @@ type CustomResourceDefinitionVersionApplyConfiguration struct { Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` + SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` } // CustomResourceDefinitionVersionApplyConfiguration constructs an declarative configuration of the CustomResourceDefinitionVersion type for use with @@ -105,3 +106,16 @@ func (b *CustomResourceDefinitionVersionApplyConfiguration) WithAdditionalPrinte } return b } + +// WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the SelectableFields field. +func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSelectableFields") + } + b.SelectableFields = append(b.SelectableFields, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go new file mode 100644 index 00000000000..876dfa71c77 --- /dev/null +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// SelectableFieldApplyConfiguration represents an declarative configuration of the SelectableField type for use +// with apply. +type SelectableFieldApplyConfiguration struct { + JSONPath *string `json:"jsonPath,omitempty"` +} + +// SelectableFieldApplyConfiguration constructs an declarative configuration of the SelectableField type for use with +// apply. +func SelectableField() *SelectableFieldApplyConfiguration { + return &SelectableFieldApplyConfiguration{} +} + +// WithJSONPath sets the JSONPath field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the JSONPath field is set to the value of the last call. +func (b *SelectableFieldApplyConfiguration) WithJSONPath(value string) *SelectableFieldApplyConfiguration { + b.JSONPath = &value + return b +} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go index f8c2903757b..49f4e433c74 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go @@ -33,6 +33,7 @@ type CustomResourceDefinitionSpecApplyConfiguration struct { Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` Versions []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"` AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` + SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty"` } @@ -117,6 +118,19 @@ func (b *CustomResourceDefinitionSpecApplyConfiguration) WithAdditionalPrinterCo return b } +// WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the SelectableFields field. +func (b *CustomResourceDefinitionSpecApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSelectableFields") + } + b.SelectableFields = append(b.SelectableFields, *values[i]) + } + return b +} + // WithConversion sets the Conversion field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Conversion field is set to the value of the last call. diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go index 605a9f0a3fc..e110a1ec5bb 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go @@ -29,6 +29,7 @@ type CustomResourceDefinitionVersionApplyConfiguration struct { Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` + SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` } // CustomResourceDefinitionVersionApplyConfiguration constructs an declarative configuration of the CustomResourceDefinitionVersion type for use with @@ -105,3 +106,16 @@ func (b *CustomResourceDefinitionVersionApplyConfiguration) WithAdditionalPrinte } return b } + +// WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the SelectableFields field. +func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSelectableFields") + } + b.SelectableFields = append(b.SelectableFields, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go new file mode 100644 index 00000000000..8729d9586b6 --- /dev/null +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +// SelectableFieldApplyConfiguration represents an declarative configuration of the SelectableField type for use +// with apply. +type SelectableFieldApplyConfiguration struct { + JSONPath *string `json:"jsonPath,omitempty"` +} + +// SelectableFieldApplyConfiguration constructs an declarative configuration of the SelectableField type for use with +// apply. +func SelectableField() *SelectableFieldApplyConfiguration { + return &SelectableFieldApplyConfiguration{} +} + +// WithJSONPath sets the JSONPath field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the JSONPath field is set to the value of the last call. +func (b *SelectableFieldApplyConfiguration) WithJSONPath(value string) *SelectableFieldApplyConfiguration { + b.JSONPath = &value + return b +} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go deleted file mode 100644 index 325781f5fda..00000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" - fakeapiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1" - fakeapiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var ( - _ clientset.Interface = &Clientset{} - _ testing.FakeClient = &Clientset{} -) - -// ApiextensionsV1 retrieves the ApiextensionsV1Client -func (c *Clientset) ApiextensionsV1() apiextensionsv1.ApiextensionsV1Interface { - return &fakeapiextensionsv1.FakeApiextensionsV1{Fake: &c.Fake} -} - -// ApiextensionsV1beta1 retrieves the ApiextensionsV1beta1Client -func (c *Clientset) ApiextensionsV1beta1() apiextensionsv1beta1.ApiextensionsV1beta1Interface { - return &fakeapiextensionsv1beta1.FakeApiextensionsV1beta1{Fake: &c.Fake} -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/register.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/register.go deleted file mode 100644 index 355c699073f..00000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/register.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/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" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - apiextensionsv1.AddToScheme, - apiextensionsv1beta1.AddToScheme, -} - -// 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. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go deleted file mode 100644 index 9402e056975..00000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - json "encoding/json" - "fmt" - - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCustomResourceDefinitions implements CustomResourceDefinitionInterface -type FakeCustomResourceDefinitions struct { - Fake *FakeApiextensionsV1 -} - -var customresourcedefinitionsResource = v1.SchemeGroupVersion.WithResource("customresourcedefinitions") - -var customresourcedefinitionsKind = v1.SchemeGroupVersion.WithKind("CustomResourceDefinition") - -// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any. -func (c *FakeCustomResourceDefinitions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(customresourcedefinitionsResource, name), &v1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1.CustomResourceDefinition), err -} - -// List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. -func (c *FakeCustomResourceDefinitions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CustomResourceDefinitionList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(customresourcedefinitionsResource, customresourcedefinitionsKind, opts), &v1.CustomResourceDefinitionList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.CustomResourceDefinitionList{ListMeta: obj.(*v1.CustomResourceDefinitionList).ListMeta} - for _, item := range obj.(*v1.CustomResourceDefinitionList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested customResourceDefinitions. -func (c *FakeCustomResourceDefinitions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(customresourcedefinitionsResource, opts)) -} - -// Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.CreateOptions) (result *v1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(customresourcedefinitionsResource, customResourceDefinition), &v1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1.CustomResourceDefinition), err -} - -// Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (result *v1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(customresourcedefinitionsResource, customResourceDefinition), &v1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1.CustomResourceDefinition), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (*v1.CustomResourceDefinition, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(customresourcedefinitionsResource, "status", customResourceDefinition), &v1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1.CustomResourceDefinition), err -} - -// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. -func (c *FakeCustomResourceDefinitions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(customresourcedefinitionsResource, name, opts), &v1.CustomResourceDefinition{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v1.CustomResourceDefinitionList{}) - return err -} - -// Patch applies the patch and returns the patched customResourceDefinition. -func (c *FakeCustomResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, name, pt, data, subresources...), &v1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1.CustomResourceDefinition), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied customResourceDefinition. -func (c *FakeCustomResourceDefinitions) Apply(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinitionApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CustomResourceDefinition, err error) { - if customResourceDefinition == nil { - return nil, fmt.Errorf("customResourceDefinition provided to Apply must not be nil") - } - data, err := json.Marshal(customResourceDefinition) - if err != nil { - return nil, err - } - name := customResourceDefinition.Name - if name == nil { - return nil, fmt.Errorf("customResourceDefinition.Name must be provided to Apply") - } - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, *name, types.ApplyPatchType, data), &v1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1.CustomResourceDefinition), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeCustomResourceDefinitions) ApplyStatus(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinitionApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CustomResourceDefinition, err error) { - if customResourceDefinition == nil { - return nil, fmt.Errorf("customResourceDefinition provided to Apply must not be nil") - } - data, err := json.Marshal(customResourceDefinition) - if err != nil { - return nil, err - } - name := customResourceDefinition.Name - if name == nil { - return nil, fmt.Errorf("customResourceDefinition.Name must be provided to Apply") - } - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, *name, types.ApplyPatchType, data, "status"), &v1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1.CustomResourceDefinition), err -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go deleted file mode 100644 index 288683ef978..00000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1beta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeApiextensionsV1beta1 struct { - *testing.Fake -} - -func (c *FakeApiextensionsV1beta1) CustomResourceDefinitions() v1beta1.CustomResourceDefinitionInterface { - return &FakeCustomResourceDefinitions{c} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeApiextensionsV1beta1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go deleted file mode 100644 index 250d69a6346..00000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - json "encoding/json" - "fmt" - - v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeCustomResourceDefinitions implements CustomResourceDefinitionInterface -type FakeCustomResourceDefinitions struct { - Fake *FakeApiextensionsV1beta1 -} - -var customresourcedefinitionsResource = v1beta1.SchemeGroupVersion.WithResource("customresourcedefinitions") - -var customresourcedefinitionsKind = v1beta1.SchemeGroupVersion.WithKind("CustomResourceDefinition") - -// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any. -func (c *FakeCustomResourceDefinitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(customresourcedefinitionsResource, name), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} - -// List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. -func (c *FakeCustomResourceDefinitions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(customresourcedefinitionsResource, customresourcedefinitionsKind, opts), &v1beta1.CustomResourceDefinitionList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.CustomResourceDefinitionList{ListMeta: obj.(*v1beta1.CustomResourceDefinitionList).ListMeta} - for _, item := range obj.(*v1beta1.CustomResourceDefinitionList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested customResourceDefinitions. -func (c *FakeCustomResourceDefinitions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(customresourcedefinitionsResource, opts)) -} - -// Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.CreateOptions) (result *v1beta1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(customresourcedefinitionsResource, customResourceDefinition), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} - -// Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (result *v1beta1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(customresourcedefinitionsResource, customResourceDefinition), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(customresourcedefinitionsResource, "status", customResourceDefinition), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} - -// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs. -func (c *FakeCustomResourceDefinitions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(customresourcedefinitionsResource, name, opts), &v1beta1.CustomResourceDefinition{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOpts) - - _, err := c.Fake.Invokes(action, &v1beta1.CustomResourceDefinitionList{}) - return err -} - -// Patch applies the patch and returns the patched customResourceDefinition. -func (c *FakeCustomResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, name, pt, data, subresources...), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied customResourceDefinition. -func (c *FakeCustomResourceDefinitions) Apply(ctx context.Context, customResourceDefinition *apiextensionsv1beta1.CustomResourceDefinitionApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.CustomResourceDefinition, err error) { - if customResourceDefinition == nil { - return nil, fmt.Errorf("customResourceDefinition provided to Apply must not be nil") - } - data, err := json.Marshal(customResourceDefinition) - if err != nil { - return nil, err - } - name := customResourceDefinition.Name - if name == nil { - return nil, fmt.Errorf("customResourceDefinition.Name must be provided to Apply") - } - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, *name, types.ApplyPatchType, data), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeCustomResourceDefinitions) ApplyStatus(ctx context.Context, customResourceDefinition *apiextensionsv1beta1.CustomResourceDefinitionApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.CustomResourceDefinition, err error) { - if customResourceDefinition == nil { - return nil, fmt.Errorf("customResourceDefinition provided to Apply must not be nil") - } - data, err := json.Marshal(customResourceDefinition) - if err != nil { - return nil, err - } - name := customResourceDefinition.Name - if name == nil { - return nil, fmt.Errorf("customResourceDefinition.Name must be provided to Apply") - } - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, *name, types.ApplyPatchType, data, "status"), &v1beta1.CustomResourceDefinition{}) - if obj == nil { - return nil, err - } - return obj.(*v1beta1.CustomResourceDefinition), err -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go b/vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go index 1844ed8d1eb..7773f3d1465 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go @@ -34,6 +34,13 @@ const ( // Ignores errors raised on unchanged fields of Custom Resources // across UPDATE/PATCH requests. CRDValidationRatcheting featuregate.Feature = "CRDValidationRatcheting" + + // owner: @jpbetz + // alpha: v1.30 + // + // CustomResourceDefinitions may include SelectableFields to declare which fields + // may be used as field selectors. + CustomResourceFieldSelectors featuregate.Feature = "CustomResourceFieldSelectors" ) func init() { @@ -44,5 +51,6 @@ func init() { // 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[featuregate.Feature]featuregate.FeatureSpec{ - CRDValidationRatcheting: {Default: false, PreRelease: featuregate.Alpha}, + CRDValidationRatcheting: {Default: true, PreRelease: featuregate.Beta}, + CustomResourceFieldSelectors: {Default: false, PreRelease: featuregate.Alpha}, } diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go index 53a25d34490..c3a272168e8 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto +// source: k8s.io/apimachinery/pkg/api/resource/generated.proto package resource @@ -41,7 +41,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Quantity) Reset() { *m = Quantity{} } func (*Quantity) ProtoMessage() {} func (*Quantity) Descriptor() ([]byte, []int) { - return fileDescriptor_612bba87bd70906c, []int{0} + return fileDescriptor_7288c78ff45111e9, []int{0} } func (m *Quantity) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Quantity.Unmarshal(m, b) @@ -64,7 +64,7 @@ var xxx_messageInfo_Quantity proto.InternalMessageInfo func (m *QuantityValue) Reset() { *m = QuantityValue{} } func (*QuantityValue) ProtoMessage() {} func (*QuantityValue) Descriptor() ([]byte, []int) { - return fileDescriptor_612bba87bd70906c, []int{1} + return fileDescriptor_7288c78ff45111e9, []int{1} } func (m *QuantityValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuantityValue.Unmarshal(m, b) @@ -90,25 +90,24 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto", fileDescriptor_612bba87bd70906c) + proto.RegisterFile("k8s.io/apimachinery/pkg/api/resource/generated.proto", fileDescriptor_7288c78ff45111e9) } -var fileDescriptor_612bba87bd70906c = []byte{ - // 254 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0xcd, 0xb6, 0x28, 0xd6, - 0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2d, 0x49, 0x2d, 0xd6, 0x2f, 0x4b, - 0xcd, 0x4b, 0xc9, 0x2f, 0xd2, 0x87, 0x4a, 0x24, 0x16, 0x64, 0xe6, 0x26, 0x26, 0x67, 0x64, 0xe6, - 0xa5, 0x16, 0x55, 0xea, 0x17, 0x64, 0xa7, 0x83, 0x04, 0xf4, 0x8b, 0x52, 0x8b, 0xf3, 0x4b, 0x8b, - 0x92, 0x53, 0xf5, 0xd3, 0x53, 0xf3, 0x52, 0x8b, 0x12, 0x4b, 0x52, 0x53, 0xf4, 0x0a, 0x8a, 0xf2, - 0x4b, 0xf2, 0x85, 0x54, 0x20, 0xba, 0xf4, 0x90, 0x75, 0xe9, 0x15, 0x64, 0xa7, 0x83, 0x04, 0xf4, - 0x60, 0xba, 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, - 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x9a, 0x93, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x18, - 0xaa, 0x64, 0xc1, 0xc5, 0x11, 0x58, 0x9a, 0x98, 0x57, 0x92, 0x59, 0x52, 0x29, 0x24, 0xc6, 0xc5, - 0x56, 0x5c, 0x52, 0x94, 0x99, 0x97, 0x2e, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe5, 0x59, - 0x89, 0xcc, 0x58, 0x20, 0xcf, 0xd0, 0xb1, 0x50, 0x9e, 0x61, 0xc2, 0x42, 0x79, 0x86, 0x05, 0x0b, - 0xe5, 0x19, 0x1a, 0xee, 0x28, 0x30, 0x28, 0xd9, 0x72, 0xf1, 0xc2, 0x74, 0x86, 0x25, 0xe6, 0x94, - 0xa6, 0x92, 0xa6, 0xdd, 0xc9, 0xeb, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, - 0x94, 0x63, 0x68, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x37, - 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x43, 0x94, 0x0a, 0x31, 0x21, - 0x05, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x70, 0x98, 0xa3, 0x69, 0x01, 0x00, 0x00, +var fileDescriptor_7288c78ff45111e9 = []byte{ + // 234 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xc9, 0xb6, 0x28, 0xd6, + 0xcb, 0xcc, 0xd7, 0x4f, 0x2c, 0xc8, 0xcc, 0x4d, 0x4c, 0xce, 0xc8, 0xcc, 0x4b, 0x2d, 0xaa, 0xd4, + 0x2f, 0xc8, 0x4e, 0x07, 0x09, 0xe8, 0x17, 0xa5, 0x16, 0xe7, 0x97, 0x16, 0x25, 0xa7, 0xea, 0xa7, + 0xa7, 0xe6, 0xa5, 0x16, 0x25, 0x96, 0xa4, 0xa6, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xa9, + 0x40, 0x74, 0xe9, 0x21, 0xeb, 0xd2, 0x2b, 0xc8, 0x4e, 0x07, 0x09, 0xe8, 0xc1, 0x74, 0x49, 0xe9, + 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, + 0x83, 0x35, 0x27, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0x31, 0x54, 0xc9, 0x82, 0x8b, + 0x23, 0xb0, 0x34, 0x31, 0xaf, 0x24, 0xb3, 0xa4, 0x52, 0x48, 0x8c, 0x8b, 0xad, 0xb8, 0xa4, 0x28, + 0x33, 0x2f, 0x5d, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xca, 0xb3, 0x12, 0x99, 0xb1, 0x40, + 0x9e, 0xa1, 0x63, 0xa1, 0x3c, 0xc3, 0x84, 0x85, 0xf2, 0x0c, 0x0b, 0x16, 0xca, 0x33, 0x34, 0xdc, + 0x51, 0x60, 0x50, 0xb2, 0xe5, 0xe2, 0x85, 0xe9, 0x0c, 0x4b, 0xcc, 0x29, 0x4d, 0x25, 0x4d, 0xbb, + 0x93, 0xd7, 0x89, 0x87, 0x72, 0x0c, 0x17, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xd0, 0xf0, + 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x6f, 0x3c, 0x92, 0x63, 0x7c, + 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x28, 0x15, 0x62, 0x42, 0x0a, 0x10, 0x00, 0x00, + 0xff, 0xff, 0x50, 0x91, 0xd0, 0x9c, 0x50, 0x01, 0x00, 0x00, } diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS new file mode 100644 index 00000000000..40237324761 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS @@ -0,0 +1,11 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +# Disable inheritance as this is an api owners file +options: + no_parent_owners: true +approvers: + - api-approvers +reviewers: + - api-reviewers +labels: + - kind/api-change diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 1a641e7c122..75b88890f6f 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +// source: k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto package v1 @@ -52,7 +52,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *APIGroup) Reset() { *m = APIGroup{} } func (*APIGroup) ProtoMessage() {} func (*APIGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{0} + return fileDescriptor_a8431b6e0aeeb761, []int{0} } func (m *APIGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +80,7 @@ var xxx_messageInfo_APIGroup proto.InternalMessageInfo func (m *APIGroupList) Reset() { *m = APIGroupList{} } func (*APIGroupList) ProtoMessage() {} func (*APIGroupList) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{1} + return fileDescriptor_a8431b6e0aeeb761, []int{1} } func (m *APIGroupList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,7 +108,7 @@ var xxx_messageInfo_APIGroupList proto.InternalMessageInfo func (m *APIResource) Reset() { *m = APIResource{} } func (*APIResource) ProtoMessage() {} func (*APIResource) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{2} + return fileDescriptor_a8431b6e0aeeb761, []int{2} } func (m *APIResource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -136,7 +136,7 @@ var xxx_messageInfo_APIResource proto.InternalMessageInfo func (m *APIResourceList) Reset() { *m = APIResourceList{} } func (*APIResourceList) ProtoMessage() {} func (*APIResourceList) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{3} + return fileDescriptor_a8431b6e0aeeb761, []int{3} } func (m *APIResourceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +164,7 @@ var xxx_messageInfo_APIResourceList proto.InternalMessageInfo func (m *APIVersions) Reset() { *m = APIVersions{} } func (*APIVersions) ProtoMessage() {} func (*APIVersions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{4} + return fileDescriptor_a8431b6e0aeeb761, []int{4} } func (m *APIVersions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -192,7 +192,7 @@ var xxx_messageInfo_APIVersions proto.InternalMessageInfo func (m *ApplyOptions) Reset() { *m = ApplyOptions{} } func (*ApplyOptions) ProtoMessage() {} func (*ApplyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{5} + return fileDescriptor_a8431b6e0aeeb761, []int{5} } func (m *ApplyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +220,7 @@ var xxx_messageInfo_ApplyOptions proto.InternalMessageInfo func (m *Condition) Reset() { *m = Condition{} } func (*Condition) ProtoMessage() {} func (*Condition) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{6} + return fileDescriptor_a8431b6e0aeeb761, []int{6} } func (m *Condition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +248,7 @@ var xxx_messageInfo_Condition proto.InternalMessageInfo func (m *CreateOptions) Reset() { *m = CreateOptions{} } func (*CreateOptions) ProtoMessage() {} func (*CreateOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{7} + return fileDescriptor_a8431b6e0aeeb761, []int{7} } func (m *CreateOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +276,7 @@ var xxx_messageInfo_CreateOptions proto.InternalMessageInfo func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } func (*DeleteOptions) ProtoMessage() {} func (*DeleteOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{8} + return fileDescriptor_a8431b6e0aeeb761, []int{8} } func (m *DeleteOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -304,7 +304,7 @@ var xxx_messageInfo_DeleteOptions proto.InternalMessageInfo func (m *Duration) Reset() { *m = Duration{} } func (*Duration) ProtoMessage() {} func (*Duration) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{9} + return fileDescriptor_a8431b6e0aeeb761, []int{9} } func (m *Duration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +332,7 @@ var xxx_messageInfo_Duration proto.InternalMessageInfo func (m *FieldsV1) Reset() { *m = FieldsV1{} } func (*FieldsV1) ProtoMessage() {} func (*FieldsV1) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{10} + return fileDescriptor_a8431b6e0aeeb761, []int{10} } func (m *FieldsV1) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +360,7 @@ var xxx_messageInfo_FieldsV1 proto.InternalMessageInfo func (m *GetOptions) Reset() { *m = GetOptions{} } func (*GetOptions) ProtoMessage() {} func (*GetOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{11} + return fileDescriptor_a8431b6e0aeeb761, []int{11} } func (m *GetOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,7 +388,7 @@ var xxx_messageInfo_GetOptions proto.InternalMessageInfo func (m *GroupKind) Reset() { *m = GroupKind{} } func (*GroupKind) ProtoMessage() {} func (*GroupKind) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{12} + return fileDescriptor_a8431b6e0aeeb761, []int{12} } func (m *GroupKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +416,7 @@ var xxx_messageInfo_GroupKind proto.InternalMessageInfo func (m *GroupResource) Reset() { *m = GroupResource{} } func (*GroupResource) ProtoMessage() {} func (*GroupResource) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{13} + return fileDescriptor_a8431b6e0aeeb761, []int{13} } func (m *GroupResource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,7 +444,7 @@ var xxx_messageInfo_GroupResource proto.InternalMessageInfo func (m *GroupVersion) Reset() { *m = GroupVersion{} } func (*GroupVersion) ProtoMessage() {} func (*GroupVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{14} + return fileDescriptor_a8431b6e0aeeb761, []int{14} } func (m *GroupVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,7 +472,7 @@ var xxx_messageInfo_GroupVersion proto.InternalMessageInfo func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} } func (*GroupVersionForDiscovery) ProtoMessage() {} func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{15} + return fileDescriptor_a8431b6e0aeeb761, []int{15} } func (m *GroupVersionForDiscovery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +500,7 @@ var xxx_messageInfo_GroupVersionForDiscovery proto.InternalMessageInfo func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } func (*GroupVersionKind) ProtoMessage() {} func (*GroupVersionKind) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{16} + return fileDescriptor_a8431b6e0aeeb761, []int{16} } func (m *GroupVersionKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +528,7 @@ var xxx_messageInfo_GroupVersionKind proto.InternalMessageInfo func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } func (*GroupVersionResource) ProtoMessage() {} func (*GroupVersionResource) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{17} + return fileDescriptor_a8431b6e0aeeb761, []int{17} } func (m *GroupVersionResource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +556,7 @@ var xxx_messageInfo_GroupVersionResource proto.InternalMessageInfo func (m *LabelSelector) Reset() { *m = LabelSelector{} } func (*LabelSelector) ProtoMessage() {} func (*LabelSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{18} + return fileDescriptor_a8431b6e0aeeb761, []int{18} } func (m *LabelSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -584,7 +584,7 @@ var xxx_messageInfo_LabelSelector proto.InternalMessageInfo func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } func (*LabelSelectorRequirement) ProtoMessage() {} func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{19} + return fileDescriptor_a8431b6e0aeeb761, []int{19} } func (m *LabelSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -612,7 +612,7 @@ var xxx_messageInfo_LabelSelectorRequirement proto.InternalMessageInfo func (m *List) Reset() { *m = List{} } func (*List) ProtoMessage() {} func (*List) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{20} + return fileDescriptor_a8431b6e0aeeb761, []int{20} } func (m *List) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -640,7 +640,7 @@ var xxx_messageInfo_List proto.InternalMessageInfo func (m *ListMeta) Reset() { *m = ListMeta{} } func (*ListMeta) ProtoMessage() {} func (*ListMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{21} + return fileDescriptor_a8431b6e0aeeb761, []int{21} } func (m *ListMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +668,7 @@ var xxx_messageInfo_ListMeta proto.InternalMessageInfo func (m *ListOptions) Reset() { *m = ListOptions{} } func (*ListOptions) ProtoMessage() {} func (*ListOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{22} + return fileDescriptor_a8431b6e0aeeb761, []int{22} } func (m *ListOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +696,7 @@ var xxx_messageInfo_ListOptions proto.InternalMessageInfo func (m *ManagedFieldsEntry) Reset() { *m = ManagedFieldsEntry{} } func (*ManagedFieldsEntry) ProtoMessage() {} func (*ManagedFieldsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{23} + return fileDescriptor_a8431b6e0aeeb761, []int{23} } func (m *ManagedFieldsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,7 +724,7 @@ var xxx_messageInfo_ManagedFieldsEntry proto.InternalMessageInfo func (m *MicroTime) Reset() { *m = MicroTime{} } func (*MicroTime) ProtoMessage() {} func (*MicroTime) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{24} + return fileDescriptor_a8431b6e0aeeb761, []int{24} } func (m *MicroTime) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MicroTime.Unmarshal(m, b) @@ -747,7 +747,7 @@ var xxx_messageInfo_MicroTime proto.InternalMessageInfo func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } func (*ObjectMeta) ProtoMessage() {} func (*ObjectMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{25} + return fileDescriptor_a8431b6e0aeeb761, []int{25} } func (m *ObjectMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -775,7 +775,7 @@ var xxx_messageInfo_ObjectMeta proto.InternalMessageInfo func (m *OwnerReference) Reset() { *m = OwnerReference{} } func (*OwnerReference) ProtoMessage() {} func (*OwnerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{26} + return fileDescriptor_a8431b6e0aeeb761, []int{26} } func (m *OwnerReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -803,7 +803,7 @@ var xxx_messageInfo_OwnerReference proto.InternalMessageInfo func (m *PartialObjectMetadata) Reset() { *m = PartialObjectMetadata{} } func (*PartialObjectMetadata) ProtoMessage() {} func (*PartialObjectMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{27} + return fileDescriptor_a8431b6e0aeeb761, []int{27} } func (m *PartialObjectMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -831,7 +831,7 @@ var xxx_messageInfo_PartialObjectMetadata proto.InternalMessageInfo func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } func (*PartialObjectMetadataList) ProtoMessage() {} func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{28} + return fileDescriptor_a8431b6e0aeeb761, []int{28} } func (m *PartialObjectMetadataList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -859,7 +859,7 @@ var xxx_messageInfo_PartialObjectMetadataList proto.InternalMessageInfo func (m *Patch) Reset() { *m = Patch{} } func (*Patch) ProtoMessage() {} func (*Patch) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{29} + return fileDescriptor_a8431b6e0aeeb761, []int{29} } func (m *Patch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -887,7 +887,7 @@ var xxx_messageInfo_Patch proto.InternalMessageInfo func (m *PatchOptions) Reset() { *m = PatchOptions{} } func (*PatchOptions) ProtoMessage() {} func (*PatchOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{30} + return fileDescriptor_a8431b6e0aeeb761, []int{30} } func (m *PatchOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -915,7 +915,7 @@ var xxx_messageInfo_PatchOptions proto.InternalMessageInfo func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} func (*Preconditions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{31} + return fileDescriptor_a8431b6e0aeeb761, []int{31} } func (m *Preconditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -943,7 +943,7 @@ var xxx_messageInfo_Preconditions proto.InternalMessageInfo func (m *RootPaths) Reset() { *m = RootPaths{} } func (*RootPaths) ProtoMessage() {} func (*RootPaths) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{32} + return fileDescriptor_a8431b6e0aeeb761, []int{32} } func (m *RootPaths) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -971,7 +971,7 @@ var xxx_messageInfo_RootPaths proto.InternalMessageInfo func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } func (*ServerAddressByClientCIDR) ProtoMessage() {} func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{33} + return fileDescriptor_a8431b6e0aeeb761, []int{33} } func (m *ServerAddressByClientCIDR) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -999,7 +999,7 @@ var xxx_messageInfo_ServerAddressByClientCIDR proto.InternalMessageInfo func (m *Status) Reset() { *m = Status{} } func (*Status) ProtoMessage() {} func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{34} + return fileDescriptor_a8431b6e0aeeb761, []int{34} } func (m *Status) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1027,7 +1027,7 @@ var xxx_messageInfo_Status proto.InternalMessageInfo func (m *StatusCause) Reset() { *m = StatusCause{} } func (*StatusCause) ProtoMessage() {} func (*StatusCause) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{35} + return fileDescriptor_a8431b6e0aeeb761, []int{35} } func (m *StatusCause) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1055,7 +1055,7 @@ var xxx_messageInfo_StatusCause proto.InternalMessageInfo func (m *StatusDetails) Reset() { *m = StatusDetails{} } func (*StatusDetails) ProtoMessage() {} func (*StatusDetails) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{36} + return fileDescriptor_a8431b6e0aeeb761, []int{36} } func (m *StatusDetails) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1083,7 +1083,7 @@ var xxx_messageInfo_StatusDetails proto.InternalMessageInfo func (m *TableOptions) Reset() { *m = TableOptions{} } func (*TableOptions) ProtoMessage() {} func (*TableOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{37} + return fileDescriptor_a8431b6e0aeeb761, []int{37} } func (m *TableOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1111,7 +1111,7 @@ var xxx_messageInfo_TableOptions proto.InternalMessageInfo func (m *Time) Reset() { *m = Time{} } func (*Time) ProtoMessage() {} func (*Time) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{38} + return fileDescriptor_a8431b6e0aeeb761, []int{38} } func (m *Time) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Time.Unmarshal(m, b) @@ -1134,7 +1134,7 @@ var xxx_messageInfo_Time proto.InternalMessageInfo func (m *Timestamp) Reset() { *m = Timestamp{} } func (*Timestamp) ProtoMessage() {} func (*Timestamp) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{39} + return fileDescriptor_a8431b6e0aeeb761, []int{39} } func (m *Timestamp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1162,7 +1162,7 @@ var xxx_messageInfo_Timestamp proto.InternalMessageInfo func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (*TypeMeta) ProtoMessage() {} func (*TypeMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{40} + return fileDescriptor_a8431b6e0aeeb761, []int{40} } func (m *TypeMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1190,7 +1190,7 @@ var xxx_messageInfo_TypeMeta proto.InternalMessageInfo func (m *UpdateOptions) Reset() { *m = UpdateOptions{} } func (*UpdateOptions) ProtoMessage() {} func (*UpdateOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{41} + return fileDescriptor_a8431b6e0aeeb761, []int{41} } func (m *UpdateOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1218,7 +1218,7 @@ var xxx_messageInfo_UpdateOptions proto.InternalMessageInfo func (m *Verbs) Reset() { *m = Verbs{} } func (*Verbs) ProtoMessage() {} func (*Verbs) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{42} + return fileDescriptor_a8431b6e0aeeb761, []int{42} } func (m *Verbs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1246,7 +1246,7 @@ var xxx_messageInfo_Verbs proto.InternalMessageInfo func (m *WatchEvent) Reset() { *m = WatchEvent{} } func (*WatchEvent) ProtoMessage() {} func (*WatchEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{43} + return fileDescriptor_a8431b6e0aeeb761, []int{43} } func (m *WatchEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1322,11 +1322,11 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto", fileDescriptor_cf52fa777ced5367) + proto.RegisterFile("k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto", fileDescriptor_a8431b6e0aeeb761) } -var fileDescriptor_cf52fa777ced5367 = []byte{ - // 2867 bytes of a gzipped FileDescriptorProto +var fileDescriptor_a8431b6e0aeeb761 = []byte{ + // 2853 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x1a, 0x4b, 0x6f, 0x24, 0x47, 0xd9, 0x3d, 0x0f, 0x7b, 0xe6, 0x9b, 0x19, 0x3f, 0x6a, 0xbd, 0x30, 0x6b, 0x84, 0xc7, 0xe9, 0x44, 0xd1, 0x06, 0x92, 0x71, 0x76, 0x09, 0xd1, 0x66, 0x43, 0x02, 0x1e, 0xcf, 0x7a, 0xe3, 0x64, 0x1d, @@ -1334,179 +1334,178 @@ var fileDescriptor_cf52fa777ced5367 = []byte{ 0xbc, 0x19, 0x38, 0x90, 0x03, 0x08, 0x90, 0x50, 0x14, 0x6e, 0x9c, 0x50, 0x22, 0xf8, 0x01, 0x88, 0x13, 0x77, 0x90, 0xc8, 0x31, 0x88, 0x4b, 0x24, 0xd0, 0x28, 0x31, 0x07, 0x8e, 0x88, 0xab, 0x85, 0x04, 0xaa, 0x47, 0x77, 0x57, 0xcf, 0x63, 0xdd, 0x93, 0x5d, 0x22, 0x6e, 0xd3, 0xdf, 0xbb, 0xaa, - 0xbe, 0xfa, 0xea, 0x7b, 0x0c, 0xec, 0x1c, 0x5f, 0x63, 0x75, 0xc7, 0x5f, 0x3f, 0xee, 0x1d, 0x10, - 0xea, 0x91, 0x80, 0xb0, 0xf5, 0x13, 0xe2, 0xd9, 0x3e, 0x5d, 0x57, 0x08, 0xab, 0xeb, 0x74, 0xac, - 0xd6, 0x91, 0xe3, 0x11, 0xda, 0x5f, 0xef, 0x1e, 0xb7, 0x39, 0x80, 0xad, 0x77, 0x48, 0x60, 0xad, - 0x9f, 0x5c, 0x59, 0x6f, 0x13, 0x8f, 0x50, 0x2b, 0x20, 0x76, 0xbd, 0x4b, 0xfd, 0xc0, 0x47, 0x8f, - 0x49, 0xae, 0xba, 0xce, 0x55, 0xef, 0x1e, 0xb7, 0x39,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ee, 0xf1, 0x61, 0x8d, + 0x7a, 0x4e, 0x96, 0x94, 0xcc, 0xbd, 0x32, 0x69, 0x72, 0x2f, 0x31, 0x64, 0xbd, 0xd3, 0xb5, 0x1f, + 0x70, 0xc8, 0x9a, 0x79, 0x90, 0x97, 0x2f, 0x3b, 0xe5, 0xcb, 0x77, 0x15, 0xe4, 0x1f, 0x51, 0xf8, + 0x23, 0x23, 0x13, 0x08, 0xed, 0x91, 0xd1, 0xdf, 0x7f, 0x6d, 0xc2, 0xf0, 0x63, 0x03, 0x40, 0xb4, + 0xf2, 0x44, 0x1b, 0x29, 0xc5, 0x38, 0xff, 0x0e, 0xcc, 0xfa, 0xd2, 0x23, 0xe5, 0xa0, 0x75, 0xca, + 0x7e, 0x71, 0x74, 0x91, 0xa4, 0x4f, 0x62, 0x25, 0xac, 0xf1, 0xf2, 0x07, 0x9f, 0xac, 0xce, 0x7c, + 0xf8, 0xc9, 0xea, 0xcc, 0x47, 0x9f, 0xac, 0xce, 0xbc, 0x7d, 0xba, 0x6a, 0x7c, 0x70, 0xba, 0x6a, + 0x7c, 0x78, 0xba, 0x6a, 0x7c, 0x74, 0xba, 0x6a, 0x7c, 0x7c, 0xba, 0x6a, 0xbc, 0xfb, 0xf7, 0xd5, + 0x99, 0xd7, 0x1e, 0x4b, 0xf3, 0x07, 0xbf, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x82, 0xff, + 0xd4, 0x07, 0x28, 0x00, 0x00, } func (m *APIGroup) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index a2cd8015fb5..2b95700f720 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -34,6 +34,7 @@ message APIGroup { optional string name = 1; // versions are the versions supported in this group. + // +listType=atomic repeated GroupVersionForDiscovery versions = 2; // preferredVersion is the version preferred by the API server, which @@ -49,6 +50,7 @@ message APIGroup { // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. // +optional + // +listType=atomic repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 4; } @@ -56,6 +58,7 @@ message APIGroup { // /apis. message APIGroupList { // groups is a list of APIGroup. + // +listType=atomic repeated APIGroup groups = 1; } @@ -88,9 +91,11 @@ message APIResource { optional Verbs verbs = 4; // shortNames is a list of suggested short names of the resource. + // +listType=atomic repeated string shortNames = 5; // categories is a list of the grouped resources this resource belongs to (e.g. 'all') + // +listType=atomic repeated string categories = 7; // The hash value of the storage version, the version this resource is @@ -112,6 +117,7 @@ message APIResourceList { optional string groupVersion = 1; // resources contains the name of the resources and if they are namespaced. + // +listType=atomic repeated APIResource resources = 2; } @@ -122,6 +128,7 @@ message APIResourceList { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message APIVersions { // versions are the api versions that are available. + // +listType=atomic repeated string versions = 1; // a map of client CIDR to server address that is serving this group. @@ -131,6 +138,7 @@ message APIVersions { // The server returns only those CIDRs that it thinks that the client can match. // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + // +listType=atomic repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 2; } @@ -145,6 +153,7 @@ message ApplyOptions { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic repeated string dryRun = 1; // Force is going to "force" Apply requests. It means user will @@ -235,6 +244,7 @@ message CreateOptions { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic repeated string dryRun = 1; // fieldManager is a name associated with the actor or entity @@ -303,6 +313,7 @@ message DeleteOptions { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic repeated string dryRun = 5; } @@ -418,6 +429,7 @@ message LabelSelector { // matchExpressions is a list of label selector requirements. The requirements are ANDed. // +optional + // +listType=atomic repeated LabelSelectorRequirement matchExpressions = 2; } @@ -436,6 +448,7 @@ message LabelSelectorRequirement { // the values array must be empty. This array is replaced during a strategic // merge patch. // +optional + // +listType=atomic repeated string values = 3; } @@ -788,6 +801,8 @@ message ObjectMeta { // +optional // +patchMergeKey=uid // +patchStrategy=merge + // +listType=map + // +listMapKey=uid repeated OwnerReference ownerReferences = 13; // Must be empty before the object is deleted from the registry. Each entry @@ -805,6 +820,7 @@ message ObjectMeta { // are not vulnerable to ordering changes in the list. // +optional // +patchStrategy=merge + // +listType=set repeated string finalizers = 14; // ManagedFields maps workflow-id and version to the set of fields @@ -816,6 +832,7 @@ message ObjectMeta { // workflow used when modifying the object. // // +optional + // +listType=atomic repeated ManagedFieldsEntry managedFields = 17; } @@ -890,6 +907,7 @@ message PatchOptions { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic repeated string dryRun = 1; // Force is going to "force" Apply requests. It means user will @@ -943,6 +961,7 @@ message Preconditions { // For example: "/healthz", "/apis". message RootPaths { // paths are the paths available at root. + // +listType=atomic repeated string paths = 1; } @@ -985,6 +1004,7 @@ message Status { // is not guaranteed to conform to any schema except that defined by // the reason type. // +optional + // +listType=atomic optional StatusDetails details = 5; // Suggested HTTP return code for this status, 0 if not set. @@ -1049,6 +1069,7 @@ message StatusDetails { // The Causes array includes more details associated with the StatusReason // failure. Not all StatusReasons may provide detailed causes. // +optional + // +listType=atomic repeated StatusCause causes = 4; // If specified, the time in seconds before the operation should be retried. Some errors may indicate @@ -1135,6 +1156,7 @@ message UpdateOptions { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic repeated string dryRun = 1; // fieldManager is a name associated with the actor or entity diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 8a8ff701899..9695ba50b4d 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -236,6 +236,8 @@ type ObjectMeta struct { // +optional // +patchMergeKey=uid // +patchStrategy=merge + // +listType=map + // +listMapKey=uid OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` // Must be empty before the object is deleted from the registry. Each entry @@ -253,6 +255,7 @@ type ObjectMeta struct { // are not vulnerable to ordering changes in the list. // +optional // +patchStrategy=merge + // +listType=set Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` // Tombstone: ClusterName was a legacy field that was always cleared by @@ -268,6 +271,7 @@ type ObjectMeta struct { // workflow used when modifying the object. // // +optional + // +listType=atomic ManagedFields []ManagedFieldsEntry `json:"managedFields,omitempty" protobuf:"bytes,17,rep,name=managedFields"` } @@ -428,6 +432,15 @@ type ListOptions struct { SendInitialEvents *bool `json:"sendInitialEvents,omitempty" protobuf:"varint,11,opt,name=sendInitialEvents"` } +const ( + // InitialEventsAnnotationKey the name of the key + // under which an annotation marking the end of + // a watchlist stream is stored. + // + // The annotation is added to a "Bookmark" event. + InitialEventsAnnotationKey = "k8s.io/initial-events-end" +) + // resourceVersionMatch specifies how the resourceVersion parameter is applied. resourceVersionMatch // may only be set if resourceVersion is also set. // @@ -531,6 +544,7 @@ type DeleteOptions struct { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,5,rep,name=dryRun"` } @@ -556,6 +570,7 @@ type CreateOptions struct { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` // +k8s:deprecated=includeUninitialized,protobuf=2 @@ -600,6 +615,7 @@ type PatchOptions struct { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` // Force is going to "force" Apply requests. It means user will @@ -651,6 +667,7 @@ type ApplyOptions struct { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` // Force is going to "force" Apply requests. It means user will @@ -683,6 +700,7 @@ type UpdateOptions struct { // request. Valid values are: // - All: all dry run stages will be processed // +optional + // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` // fieldManager is a name associated with the actor or entity @@ -751,6 +769,7 @@ type Status struct { // is not guaranteed to conform to any schema except that defined by // the reason type. // +optional + // +listType=atomic Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"` // Suggested HTTP return code for this status, 0 if not set. // +optional @@ -784,6 +803,7 @@ type StatusDetails struct { // The Causes array includes more details associated with the StatusReason // failure. Not all StatusReasons may provide detailed causes. // +optional + // +listType=atomic Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"` // If specified, the time in seconds before the operation should be retried. Some errors may indicate // the client must take an alternate action - for those errors this field may indicate how long to wait @@ -1047,6 +1067,7 @@ type List struct { type APIVersions struct { TypeMeta `json:",inline"` // versions are the api versions that are available. + // +listType=atomic Versions []string `json:"versions" protobuf:"bytes,1,rep,name=versions"` // a map of client CIDR to server address that is serving this group. // This is to help clients reach servers in the most network-efficient way possible. @@ -1055,6 +1076,7 @@ type APIVersions struct { // The server returns only those CIDRs that it thinks that the client can match. // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + // +listType=atomic ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,2,rep,name=serverAddressByClientCIDRs"` } @@ -1065,6 +1087,7 @@ type APIVersions struct { type APIGroupList struct { TypeMeta `json:",inline"` // groups is a list of APIGroup. + // +listType=atomic Groups []APIGroup `json:"groups" protobuf:"bytes,1,rep,name=groups"` } @@ -1077,6 +1100,7 @@ type APIGroup struct { // name is the name of the group. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // versions are the versions supported in this group. + // +listType=atomic Versions []GroupVersionForDiscovery `json:"versions" protobuf:"bytes,2,rep,name=versions"` // preferredVersion is the version preferred by the API server, which // probably is the storage version. @@ -1090,6 +1114,7 @@ type APIGroup struct { // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. // +optional + // +listType=atomic ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs,omitempty" protobuf:"bytes,4,rep,name=serverAddressByClientCIDRs"` } @@ -1134,8 +1159,10 @@ type APIResource struct { // update, patch, delete, deletecollection, and proxy) Verbs Verbs `json:"verbs" protobuf:"bytes,4,opt,name=verbs"` // shortNames is a list of suggested short names of the resource. + // +listType=atomic ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,5,rep,name=shortNames"` // categories is a list of the grouped resources this resource belongs to (e.g. 'all') + // +listType=atomic Categories []string `json:"categories,omitempty" protobuf:"bytes,7,rep,name=categories"` // The hash value of the storage version, the version this resource is // converted to when written to the data store. Value must be treated @@ -1168,6 +1195,7 @@ type APIResourceList struct { // groupVersion is the group and version this APIResourceList is for. GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"` // resources contains the name of the resources and if they are namespaced. + // +listType=atomic APIResources []APIResource `json:"resources" protobuf:"bytes,2,rep,name=resources"` } @@ -1175,6 +1203,7 @@ type APIResourceList struct { // For example: "/healthz", "/apis". type RootPaths struct { // paths are the paths available at root. + // +listType=atomic Paths []string `json:"paths" protobuf:"bytes,1,rep,name=paths"` } @@ -1218,6 +1247,7 @@ type LabelSelector struct { MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` // matchExpressions is a list of label selector requirements. The requirements are ANDed. // +optional + // +listType=atomic MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` } @@ -1234,6 +1264,7 @@ type LabelSelectorRequirement struct { // the values array must be empty. This array is replaced during a strategic // merge patch. // +optional + // +listType=atomic Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` } @@ -1335,8 +1366,10 @@ type Table struct { // columnDefinitions describes each column in the returned items array. The number of cells per row // will always match the number of column definitions. + // +listType=atomic ColumnDefinitions []TableColumnDefinition `json:"columnDefinitions"` // rows is the list of items in the table. + // +listType=atomic Rows []TableRow `json:"rows"` } @@ -1369,12 +1402,14 @@ type TableRow struct { // cells will be as wide as the column definitions array and may contain strings, numbers (float64 or // int64), booleans, simple maps, lists, or null. See the type field of the column definition for a // more detailed description. + // +listType=atomic Cells []interface{} `json:"cells"` // conditions describe additional status of a row that are relevant for a human user. These conditions // apply to the row, not to the object, and will be specific to table output. The only defined // condition type is 'Completed', for a row that indicates a resource that has run to completion and // can be given less visual priority. // +optional + // +listType=atomic 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 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 index a2abc67c151..819d936fe5b 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto +// source: k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto package v1beta1 @@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } func (*PartialObjectMetadataList) ProtoMessage() {} func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) { - return fileDescriptor_90ec10f86b91f9a8, []int{0} + return fileDescriptor_39237a8d8061b52f, []int{0} } func (m *PartialObjectMetadataList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,31 +77,30 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto", fileDescriptor_90ec10f86b91f9a8) + proto.RegisterFile("k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto", fileDescriptor_39237a8d8061b52f) } -var fileDescriptor_90ec10f86b91f9a8 = []byte{ - // 317 bytes of a gzipped FileDescriptorProto +var fileDescriptor_39237a8d8061b52f = []byte{ + // 303 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x4b, 0xf3, 0x30, 0x1c, 0xc6, 0x9b, 0xf7, 0x65, 0x30, 0x3a, 0x04, 0xd9, 0x69, 0xee, 0x90, 0x0d, 0x4f, 0xdb, 0xc1, - 0x84, 0x0d, 0x11, 0xc1, 0xdb, 0x6e, 0x82, 0x32, 0xd9, 0x51, 0x3c, 0x98, 0x76, 0x7f, 0xbb, 0x58, - 0xd3, 0x94, 0xe4, 0xdf, 0x81, 0x37, 0x3f, 0x82, 0x1f, 0x6b, 0xc7, 0x1d, 0x07, 0xc2, 0x70, 0xf5, - 0x8b, 0x48, 0xda, 0x2a, 0x32, 0x14, 0x7a, 0xeb, 0xf3, 0x94, 0xdf, 0x2f, 0x4f, 0x20, 0xfe, 0x2c, - 0x3e, 0xb7, 0x4c, 0x6a, 0x1e, 0x67, 0x01, 0x98, 0x04, 0x10, 0x2c, 0x5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 0xed, 0x72, 0x87, + 0x6f, 0xc8, 0x3f, 0xb8, 0x66, 0x29, 0x48, 0xf6, 0x38, 0x0f, 0x1e, 0x78, 0x08, 0x57, 0x1c, 0xd8, + 0x92, 0x01, 0xbb, 0x94, 0x06, 0xba, 0xb7, 0x7e, 0x5b, 0xd5, 0xb9, 0xf7, 0x6f, 0x88, 0x46, 0x9d, + 0x29, 0x21, 0x4d, 0x1e, 0x4e, 0x1c, 0xed, 0x4c, 0xb3, 0xfd, 0x7c, 0x3b, 0xf0, 0xec, 0x76, 0xd0, + 0xfe, 0x6a, 0x16, 0xdf, 0xc6, 0xee, 0x9d, 0xdf, 0x92, 0xc0, 0x95, 0xe9, 0xa1, 0xe1, 0xff, 0x51, + 0x67, 0x7a, 0xde, 0x4c, 0xfd, 0xeb, 0xda, 0xd9, 0x5e, 0x7d, 0x4f, 0xeb, 0xc2, 0x19, 0x17, 0x95, + 0x78, 0x36, 0xcf, 0x0b, 0xec, 0xad, 0x0b, 0xec, 0x6d, 0x0a, 0xec, 0xbd, 0x58, 0x8c, 0x72, 0x8b, + 0xd1, 0xda, 0x62, 0xb4, 0xb1, 0x18, 0xbd, 0x5b, 0x8c, 0x5e, 0x3f, 0xb0, 0x77, 0x33, 0x6e, 0xfc, + 0x0d, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x0f, 0xd7, 0x36, 0x32, 0x02, 0x00, 0x00, } func (m *PartialObjectMetadataList) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go index ec677a7d962..2e40e140aec 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto +// source: k8s.io/apimachinery/pkg/runtime/generated.proto package runtime @@ -45,7 +45,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *RawExtension) Reset() { *m = RawExtension{} } func (*RawExtension) ProtoMessage() {} func (*RawExtension) Descriptor() ([]byte, []int) { - return fileDescriptor_9d3c45d7f546725c, []int{0} + return fileDescriptor_2e0e4b920403a48c, []int{0} } func (m *RawExtension) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -73,7 +73,7 @@ var xxx_messageInfo_RawExtension proto.InternalMessageInfo func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (*TypeMeta) ProtoMessage() {} func (*TypeMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_9d3c45d7f546725c, []int{1} + return fileDescriptor_2e0e4b920403a48c, []int{1} } func (m *TypeMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -101,7 +101,7 @@ var xxx_messageInfo_TypeMeta proto.InternalMessageInfo func (m *Unknown) Reset() { *m = Unknown{} } func (*Unknown) ProtoMessage() {} func (*Unknown) Descriptor() ([]byte, []int) { - return fileDescriptor_9d3c45d7f546725c, []int{2} + return fileDescriptor_2e0e4b920403a48c, []int{2} } func (m *Unknown) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -133,35 +133,34 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto", fileDescriptor_9d3c45d7f546725c) -} - -var fileDescriptor_9d3c45d7f546725c = []byte{ - // 380 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0xaa, 0x13, 0x31, - 0x14, 0xc6, 0x27, 0xb7, 0x85, 0x7b, 0x4d, 0x0b, 0x57, 0xe2, 0xc2, 0xd1, 0x45, 0xe6, 0xd2, 0x95, - 0x77, 0x61, 0x02, 0x17, 0x04, 0xb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, 0x89, 0xda, 0x4d, - 0x82, 0x87, 0x6f, 0x5e, 0x06, 0x45, 0x9c, 0xb8, 0xc8, 0x0d, 0xee, 0x96, 0x1a, 0xf2, 0xf8, 0xc2, - 0xbb, 0xfb, 0xc1, 0xdd, 0x7d, 0xa5, 0x21, 0x17, 0x5e, 0x19, 0xfc, 0x42, 0xf8, 0xf2, 0x1d, 0x94, - 0x60, 0x1a, 0x20, 0x1f, 0xf0, 0x95, 0x0b, 0xd3, 0x7c, 0x7e, 0xef, 0xee, 0x96, 0x9d, 0xb9, 0x9d, - 0x1d, 0xd6, 0x4b, 0xef, 0x87, 0xf0, 0xe3, 0xc2, 0xe2, 0x18, 0x76, 0xb8, 0xf0, 0xe2, 0xff, 0x0b, - 0xc9, 0x10, 0x5f, 0x67, 0x06, 0x9c, 0x02, 0x37, 0x86, 0xcc, 0xe4, 0x1a, 0x8a, 0xb8, 0xe3, 0x97, - 0x7d, 0x18, 0xf2, 0xae, 0x47, 0x7f, 0xcb, 0xe2, 0x5f, 0x3f, 0x79, 0x86, 0x7b, 0xa1, 0xb5, 0x1b, - 0x1d, 0x77, 0x3d, 0xfe, 0x20, 0xe0, 0xbd, 0xd1, 0x1f, 0x49, 0x9c, 0xfa, 0xd2, 0xf1, 0x72, 0x4b, - 0xa3, 0xd5, 0x96, 0x46, 0xeb, 0x2d, 0x8d, 0xbe, 0xb5, 0x14, 0x2d, 0x5b, 0x8a, 0x56, 0x2d, 0x45, - 0xeb, 0x96, 0xa2, 0x1f, 0x2d, 0x45, 0xdf, 0x7f, 0xd2, 0xe8, 0x63, 0x72, 0xe6, 0xb7, 0xfc, 0x0e, - 0x00, 0x00, 0xff, 0xff, 0x1f, 0x32, 0xd5, 0x68, 0x68, 0x02, 0x00, 0x00, + proto.RegisterFile("k8s.io/apimachinery/pkg/runtime/generated.proto", fileDescriptor_2e0e4b920403a48c) +} + +var fileDescriptor_2e0e4b920403a48c = []byte{ + // 365 bytes of a gzipped FileDescriptorProto + 0x1f, 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} func (m *RawExtension) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/helper.go b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go index f46a24cc6c3..cc0a77bba6f 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/helper.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go @@ -236,10 +236,14 @@ func (e WithVersionEncoder) Encode(obj Object, stream io.Writer) error { gvk = preferredGVK } } - kind.SetGroupVersionKind(gvk) - err = e.Encoder.Encode(obj, stream) - kind.SetGroupVersionKind(oldGVK) - return err + + // The gvk only needs to be set if not already as desired. + if gvk != oldGVK { + kind.SetGroupVersionKind(gvk) + defer kind.SetGroupVersionKind(oldGVK) + } + + return e.Encoder.Encode(obj, stream) } // WithoutVersionDecoder clears the group version kind of a deserialized object. diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go index 46b1e787bde..7a26d2798ed 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto +// source: k8s.io/apimachinery/pkg/runtime/schema/generated.proto package schema @@ -39,21 +39,20 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto", fileDescriptor_0462724132518e0d) + proto.RegisterFile("k8s.io/apimachinery/pkg/runtime/schema/generated.proto", fileDescriptor_25f8f0eed21c6089) } -var fileDescriptor_0462724132518e0d = []byte{ - // 186 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xce, 0xad, 0x8e, 0xc3, 0x30, - 0x0c, 0xc0, 0xf1, 0x84, 0x1e, 0x3c, 0x78, 0xc0, 0xb0, 0xec, 0x62, 0x7a, 0xf8, 0xf0, 0xa4, 0xf1, - 0xb1, 0xb4, 0xf5, 0xd2, 0x28, 0xca, 0x87, 0xd2, 0x64, 0xd2, 0xd8, 0x1e, 0x61, 0x8f, 0x55, 0x58, - 0x58, 0xb8, 0x66, 0x2f, 0x32, 0x29, 0x2d, 0x18, 0x1c, 0xf3, 0x5f, 0xd6, 0xcf, 0xf2, 0xd7, 0xd1, - 0xfc, 0x8d, 0x42, 0x7b, 0x34, 0xb9, 0xa5, 0xe8, 0x28, 0xd1, 0x88, 0x17, 0x72, 0xbd, 0x8f, 0xb8, - 0x2f, 0x64, 0xd0, 0x56, 0x76, 0x83, 0x76, 0x14, 0xaf, 0x18, 0x8c, 0xc2, 0x98, 0x5d, 0xd2, 0x96, - 0x70, 0xec, 0x06, 0xb2, 0x12, 0x15, 0x39, 0x8a, 0x32, 0x51, 0x2f, 0x42, 0xf4, 0xc9, 0x7f, 0x37, - 0x9b, 0x13, 0xef, 0x4e, 0x04, 0xa3, 0xc4, 0xee, 0xc4, 0xe6, 0x7e, 0x7e, 0x95, 0x4e, 0x43, 0x6e, - 0x45, 0xe7, 0x2d, 0x2a, 0xaf, 0x3c, 0x56, 0xde, 0xe6, 0x73, 0xad, 0x1a, 0x75, 0xda, 0xce, 0xfe, - 0x1f, 0xa6, 0x15, 0xd8, 0xbc, 0x02, 0x5b, 0x56, 0x60, 0xb7, 0x02, 0x7c, 0x2a, 0xc0, 0xe7, 0x02, - 0x7c, 0x29, 0xc0, 0x1f, 0x05, 0xf8, 0xfd, 0x09, 0xec, 0xd4, 0x7c, 0xf6, 0xf4, 0x2b, 0x00, 0x00, - 0xff, 0xff, 0x12, 0xb4, 0xae, 0x48, 0xf6, 0x00, 0x00, 0x00, +var fileDescriptor_25f8f0eed21c6089 = []byte{ + // 170 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xce, 0xa1, 0x0e, 0xc2, 0x30, + 0x10, 0xc6, 0xf1, 0xd6, 0x22, 0x91, 0x88, 0x93, 0x73, 0xdc, 0x39, 0x82, 0x46, 0xf3, 0x04, 0xb8, + 0x6e, 0x94, 0xae, 0x59, 0xba, 0x6b, 0xba, 0x4e, 0xe0, 0x78, 0x04, 0x1e, 0x6b, 0x72, 0x72, 0x92, + 0x95, 0x17, 0x21, 0x69, 0x11, 0x48, 0xdc, 0xfd, 0xc5, 0xef, 0xf2, 0x6d, 0x0e, 0xdd, 0x71, 0x40, + 0xcb, 0xa4, 0xbc, 0x75, 0xaa, 0x69, 0x6d, 0xaf, 0xc3, 0x9d, 0x7c, 0x67, 0x28, 0x8c, 0x7d, 0xb4, + 0x4e, 0xd3, 0xd0, 0xb4, 0xda, 0x29, 0x32, 0xba, 0xd7, 0x41, 0x45, 0x7d, 0x45, 0x1f, 0x38, 0xf2, + 0xb6, 0x2a, 0x0e, 0x7f, 0x1d, 0xfa, 0xce, 0xe0, 0xd7, 0x61, 0x71, 0xbb, 0xbd, 0xb1, 0xb1, 0x1d, + 0x6b, 0x6c, 0xd8, 0x91, 0x61, 0xc3, 0x94, 0x79, 0x3d, 0xde, 0x72, 0xe5, 0xc8, 0x57, 0x79, 0x7b, + 0x3a, 0x4f, 0x2b, 0x88, 0x79, 0x05, 0xb1, 0xac, 0x20, 0x1e, 0x09, 0xe4, 0x94, 0x40, 0xce, 0x09, + 0xe4, 0x92, 0x40, 0xbe, 0x12, 0xc8, 0xe7, 0x1b, 0xc4, 0xa5, 0xfa, 0x6f, 0xf4, 0x27, 0x00, 0x00, + 0xff, 0xff, 0x97, 0xb8, 0x4d, 0x1f, 0xdd, 0x00, 0x00, 0x00, } diff --git a/vendor/k8s.io/apimachinery/pkg/util/duration/duration.go b/vendor/k8s.io/apimachinery/pkg/util/duration/duration.go deleted file mode 100644 index a20136a4e5d..00000000000 --- a/vendor/k8s.io/apimachinery/pkg/util/duration/duration.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 duration - -import ( - "fmt" - "time" -) - -// ShortHumanDuration returns a succinct representation of the provided duration -// with limited precision for consumption by humans. -func ShortHumanDuration(d time.Duration) string { - // Allow deviation no more than 2 seconds(excluded) to tolerate machine time - // inconsistence, it can be considered as almost now. - if seconds := int(d.Seconds()); seconds < -1 { - return "" - } else if seconds < 0 { - return "0s" - } else if seconds < 60 { - return fmt.Sprintf("%ds", seconds) - } else if minutes := int(d.Minutes()); minutes < 60 { - return fmt.Sprintf("%dm", minutes) - } else if hours := int(d.Hours()); hours < 24 { - return fmt.Sprintf("%dh", hours) - } else if hours < 24*365 { - return fmt.Sprintf("%dd", hours/24) - } - return fmt.Sprintf("%dy", int(d.Hours()/24/365)) -} - -// HumanDuration returns a succinct representation of the provided duration -// with limited precision for consumption by humans. It provides ~2-3 significant -// figures of duration. -func HumanDuration(d time.Duration) string { - // Allow deviation no more than 2 seconds(excluded) to tolerate machine time - // inconsistence, it can be considered as almost now. - if seconds := int(d.Seconds()); seconds < -1 { - return "" - } else if seconds < 0 { - return "0s" - } else if seconds < 60*2 { - return fmt.Sprintf("%ds", seconds) - } - minutes := int(d / time.Minute) - if minutes < 10 { - s := int(d/time.Second) % 60 - if s == 0 { - return fmt.Sprintf("%dm", minutes) - } - return fmt.Sprintf("%dm%ds", minutes, s) - } else if minutes < 60*3 { - return fmt.Sprintf("%dm", minutes) - } - hours := int(d / time.Hour) - if hours < 8 { - m := int(d/time.Minute) % 60 - if m == 0 { - return fmt.Sprintf("%dh", hours) - } - return fmt.Sprintf("%dh%dm", hours, m) - } else if hours < 48 { - return fmt.Sprintf("%dh", hours) - } else if hours < 24*8 { - h := hours % 24 - if h == 0 { - return fmt.Sprintf("%dd", hours/24) - } - return fmt.Sprintf("%dd%dh", hours/24, h) - } else if hours < 24*365*2 { - return fmt.Sprintf("%dd", hours/24) - } else if hours < 24*365*8 { - dy := int(hours/24) % 365 - if dy == 0 { - return fmt.Sprintf("%dy", hours/24/365) - } - return fmt.Sprintf("%dy%dd", hours/24/365, dy) - } - return fmt.Sprintf("%dy", int(hours/24/365)) -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go new file mode 100644 index 00000000000..2e477fee2ae --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go @@ -0,0 +1,452 @@ +/* +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 wsstream + +import ( + "encoding/base64" + "fmt" + "io" + "net/http" + "strings" + "time" + + "golang.org/x/net/websocket" + + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/portforward" + "k8s.io/apimachinery/pkg/util/remotecommand" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/klog/v2" +) + +const WebSocketProtocolHeader = "Sec-Websocket-Protocol" + +// The Websocket subprotocol "channel.k8s.io" prepends each binary message with a byte indicating +// the channel number (zero indexed) the message was sent on. Messages in both directions should +// prefix their messages with this channel byte. When used for remote execution, the channel numbers +// are by convention defined to match the POSIX file-descriptors assigned to STDIN, STDOUT, and STDERR +// (0, 1, and 2). No other conversion is performed on the raw subprotocol - writes are sent as they +// are received by the server. +// +// Example client session: +// +// CONNECT http://server.com with subprotocol "channel.k8s.io" +// WRITE []byte{0, 102, 111, 111, 10} # send "foo\n" on channel 0 (STDIN) +// READ []byte{1, 10} # receive "\n" on channel 1 (STDOUT) +// CLOSE +const ChannelWebSocketProtocol = "channel.k8s.io" + +// The Websocket subprotocol "base64.channel.k8s.io" base64 encodes each message with a character +// indicating the channel number (zero indexed) the message was sent on. Messages in both directions +// should prefix their messages with this channel char. When used for remote execution, the channel +// numbers are by convention defined to match the POSIX file-descriptors assigned to STDIN, STDOUT, +// and STDERR ('0', '1', and '2'). The data received on the server is base64 decoded (and must be +// be valid) and data written by the server to the client is base64 encoded. +// +// Example client session: +// +// CONNECT http://server.com with subprotocol "base64.channel.k8s.io" +// WRITE []byte{48, 90, 109, 57, 118, 67, 103, 111, 61} # send "foo\n" (base64: "Zm9vCgo=") on channel '0' (STDIN) +// READ []byte{49, 67, 103, 61, 61} # receive "\n" (base64: "Cg==") on channel '1' (STDOUT) +// CLOSE +const Base64ChannelWebSocketProtocol = "base64.channel.k8s.io" + +type codecType int + +const ( + rawCodec codecType = iota + base64Codec +) + +type ChannelType int + +const ( + IgnoreChannel ChannelType = iota + ReadChannel + WriteChannel + ReadWriteChannel +) + +// IsWebSocketRequest returns true if the incoming request contains connection upgrade headers +// for WebSockets. +func IsWebSocketRequest(req *http.Request) bool { + if !strings.EqualFold(req.Header.Get("Upgrade"), "websocket") { + return false + } + return httpstream.IsUpgradeRequest(req) +} + +// IsWebSocketRequestWithStreamCloseProtocol returns true if the request contains headers +// identifying that it is requesting a websocket upgrade with a remotecommand protocol +// version that supports the "CLOSE" signal; false otherwise. +func IsWebSocketRequestWithStreamCloseProtocol(req *http.Request) bool { + if !IsWebSocketRequest(req) { + return false + } + requestedProtocols := strings.TrimSpace(req.Header.Get(WebSocketProtocolHeader)) + for _, requestedProtocol := range strings.Split(requestedProtocols, ",") { + if protocolSupportsStreamClose(strings.TrimSpace(requestedProtocol)) { + return true + } + } + + return false +} + +// IsWebSocketRequestWithTunnelingProtocol returns true if the request contains headers +// identifying that it is requesting a websocket upgrade with a tunneling protocol; +// false otherwise. +func IsWebSocketRequestWithTunnelingProtocol(req *http.Request) bool { + if !IsWebSocketRequest(req) { + return false + } + requestedProtocols := strings.TrimSpace(req.Header.Get(WebSocketProtocolHeader)) + for _, requestedProtocol := range strings.Split(requestedProtocols, ",") { + if protocolSupportsWebsocketTunneling(strings.TrimSpace(requestedProtocol)) { + return true + } + } + + return false +} + +// IgnoreReceives reads from a WebSocket until it is closed, then returns. If timeout is set, the +// read and write deadlines are pushed every time a new message is received. +func IgnoreReceives(ws *websocket.Conn, timeout time.Duration) { + defer runtime.HandleCrash() + var data []byte + for { + resetTimeout(ws, timeout) + if err := websocket.Message.Receive(ws, &data); err != nil { + return + } + } +} + +// handshake ensures the provided user protocol matches one of the allowed protocols. It returns +// no error if no protocol is specified. +func handshake(config *websocket.Config, req *http.Request, allowed []string) error { + protocols := config.Protocol + if len(protocols) == 0 { + protocols = []string{""} + } + + for _, protocol := range protocols { + for _, allow := range allowed { + if allow == protocol { + config.Protocol = []string{protocol} + return nil + } + } + } + + return fmt.Errorf("requested protocol(s) are not supported: %v; supports %v", config.Protocol, allowed) +} + +// ChannelProtocolConfig describes a websocket subprotocol with channels. +type ChannelProtocolConfig struct { + Binary bool + Channels []ChannelType +} + +// NewDefaultChannelProtocols returns a channel protocol map with the +// subprotocols "", "channel.k8s.io", "base64.channel.k8s.io" and the given +// channels. +func NewDefaultChannelProtocols(channels []ChannelType) map[string]ChannelProtocolConfig { + return map[string]ChannelProtocolConfig{ + "": {Binary: true, Channels: channels}, + ChannelWebSocketProtocol: {Binary: true, Channels: channels}, + Base64ChannelWebSocketProtocol: {Binary: false, Channels: channels}, + } +} + +// Conn supports sending multiple binary channels over a websocket connection. +type Conn struct { + protocols map[string]ChannelProtocolConfig + selectedProtocol string + channels []*websocketChannel + codec codecType + ready chan struct{} + ws *websocket.Conn + timeout time.Duration +} + +// NewConn creates a WebSocket connection that supports a set of channels. Channels begin each +// web socket message with a single byte indicating the channel number (0-N). 255 is reserved for +// future use. The channel types for each channel are passed as an array, supporting the different +// duplex modes. Read and Write refer to whether the channel can be used as a Reader or Writer. +// +// The protocols parameter maps subprotocol names to ChannelProtocols. The empty string subprotocol +// name is used if websocket.Config.Protocol is empty. +func NewConn(protocols map[string]ChannelProtocolConfig) *Conn { + return &Conn{ + ready: make(chan struct{}), + protocols: protocols, + } +} + +// SetIdleTimeout sets the interval for both reads and writes before timeout. If not specified, +// there is no timeout on the connection. +func (conn *Conn) SetIdleTimeout(duration time.Duration) { + conn.timeout = duration +} + +// SetWriteDeadline sets a timeout on writing to the websocket connection. The +// passed "duration" identifies how far into the future the write must complete +// by before the timeout fires. +func (conn *Conn) SetWriteDeadline(duration time.Duration) { + conn.ws.SetWriteDeadline(time.Now().Add(duration)) //nolint:errcheck +} + +// Open the connection and create channels for reading and writing. It returns +// the selected subprotocol, a slice of channels and an error. +func (conn *Conn) Open(w http.ResponseWriter, req *http.Request) (string, []io.ReadWriteCloser, error) { + // serveHTTPComplete is channel that is closed/selected when "websocket#ServeHTTP" finishes. + serveHTTPComplete := make(chan struct{}) + // Ensure panic in spawned goroutine is propagated into the parent goroutine. + panicChan := make(chan any, 1) + go func() { + // If websocket server returns, propagate panic if necessary. Otherwise, + // signal HTTPServe finished by closing "serveHTTPComplete". + defer func() { + if p := recover(); p != nil { + panicChan <- p + } else { + close(serveHTTPComplete) + } + }() + websocket.Server{Handshake: conn.handshake, Handler: conn.handle}.ServeHTTP(w, req) + }() + + // In normal circumstances, "websocket.Server#ServeHTTP" calls "initialize" which closes + // "conn.ready" and then blocks until serving is complete. + select { + case <-conn.ready: + klog.V(8).Infof("websocket server initialized--serving") + case <-serveHTTPComplete: + // websocket server returned before completing initialization; cleanup and return error. + conn.closeNonThreadSafe() //nolint:errcheck + return "", nil, fmt.Errorf("websocket server finished before becoming ready") + case p := <-panicChan: + panic(p) + } + + rwc := make([]io.ReadWriteCloser, len(conn.channels)) + for i := range conn.channels { + rwc[i] = conn.channels[i] + } + return conn.selectedProtocol, rwc, nil +} + +func (conn *Conn) initialize(ws *websocket.Conn) { + negotiated := ws.Config().Protocol + conn.selectedProtocol = negotiated[0] + p := conn.protocols[conn.selectedProtocol] + if p.Binary { + conn.codec = rawCodec + } else { + conn.codec = base64Codec + } + conn.ws = ws + conn.channels = make([]*websocketChannel, len(p.Channels)) + for i, t := range p.Channels { + switch t { + case ReadChannel: + conn.channels[i] = newWebsocketChannel(conn, byte(i), true, false) + case WriteChannel: + conn.channels[i] = newWebsocketChannel(conn, byte(i), false, true) + case ReadWriteChannel: + conn.channels[i] = newWebsocketChannel(conn, byte(i), true, true) + case IgnoreChannel: + conn.channels[i] = newWebsocketChannel(conn, byte(i), false, false) + } + } + + close(conn.ready) +} + +func (conn *Conn) handshake(config *websocket.Config, req *http.Request) error { + supportedProtocols := make([]string, 0, len(conn.protocols)) + for p := range conn.protocols { + supportedProtocols = append(supportedProtocols, p) + } + return handshake(config, req, supportedProtocols) +} + +func (conn *Conn) resetTimeout() { + if conn.timeout > 0 { + conn.ws.SetDeadline(time.Now().Add(conn.timeout)) + } +} + +// closeNonThreadSafe cleans up by closing streams and the websocket +// connection *without* waiting for the "ready" channel. +func (conn *Conn) closeNonThreadSafe() error { + for _, s := range conn.channels { + s.Close() + } + var err error + if conn.ws != nil { + err = conn.ws.Close() + } + return err +} + +// Close is only valid after Open has been called +func (conn *Conn) Close() error { + <-conn.ready + return conn.closeNonThreadSafe() +} + +// protocolSupportsStreamClose returns true if the passed protocol +// supports the stream close signal (currently only V5 remotecommand); +// false otherwise. +func protocolSupportsStreamClose(protocol string) bool { + return protocol == remotecommand.StreamProtocolV5Name +} + +// protocolSupportsWebsocketTunneling returns true if the passed protocol +// is a tunneled Kubernetes spdy protocol; false otherwise. +func protocolSupportsWebsocketTunneling(protocol string) bool { + return strings.HasPrefix(protocol, portforward.WebsocketsSPDYTunnelingPrefix) && strings.HasSuffix(protocol, portforward.KubernetesSuffix) +} + +// handle implements a websocket handler. +func (conn *Conn) handle(ws *websocket.Conn) { + conn.initialize(ws) + defer conn.Close() + supportsStreamClose := protocolSupportsStreamClose(conn.selectedProtocol) + + for { + conn.resetTimeout() + var data []byte + if err := websocket.Message.Receive(ws, &data); err != nil { + if err != io.EOF { + klog.Errorf("Error on socket receive: %v", err) + } + break + } + if len(data) == 0 { + continue + } + if supportsStreamClose && data[0] == remotecommand.StreamClose { + if len(data) != 2 { + klog.Errorf("Single channel byte should follow stream close signal. Got %d bytes", len(data)-1) + break + } else { + channel := data[1] + if int(channel) >= len(conn.channels) { + klog.Errorf("Close is targeted for a channel %d that is not valid, possible protocol error", channel) + break + } + klog.V(4).Infof("Received half-close signal from client; close %d stream", channel) + conn.channels[channel].Close() // After first Close, other closes are noop. + } + continue + } + channel := data[0] + if conn.codec == base64Codec { + channel = channel - '0' + } + data = data[1:] + if int(channel) >= len(conn.channels) { + klog.V(6).Infof("Frame is targeted for a reader %d that is not valid, possible protocol error", channel) + continue + } + if _, err := conn.channels[channel].DataFromSocket(data); err != nil { + klog.Errorf("Unable to write frame (%d bytes) to %d: %v", len(data), channel, err) + continue + } + } +} + +// write multiplexes the specified channel onto the websocket +func (conn *Conn) write(num byte, data []byte) (int, error) { + conn.resetTimeout() + switch conn.codec { + case rawCodec: + frame := make([]byte, len(data)+1) + frame[0] = num + copy(frame[1:], data) + if err := websocket.Message.Send(conn.ws, frame); err != nil { + return 0, err + } + case base64Codec: + frame := string('0'+num) + base64.StdEncoding.EncodeToString(data) + if err := websocket.Message.Send(conn.ws, frame); err != nil { + return 0, err + } + } + return len(data), nil +} + +// websocketChannel represents a channel in a connection +type websocketChannel struct { + conn *Conn + num byte + r io.Reader + w io.WriteCloser + + read, write bool +} + +// newWebsocketChannel creates a pipe for writing to a websocket. Do not write to this pipe +// prior to the connection being opened. It may be no, half, or full duplex depending on +// read and write. +func newWebsocketChannel(conn *Conn, num byte, read, write bool) *websocketChannel { + r, w := io.Pipe() + return &websocketChannel{conn, num, r, w, read, write} +} + +func (p *websocketChannel) Write(data []byte) (int, error) { + if !p.write { + return len(data), nil + } + return p.conn.write(p.num, data) +} + +// DataFromSocket is invoked by the connection receiver to move data from the connection +// into a specific channel. +func (p *websocketChannel) DataFromSocket(data []byte) (int, error) { + if !p.read { + return len(data), nil + } + + switch p.conn.codec { + case rawCodec: + return p.w.Write(data) + case base64Codec: + dst := make([]byte, len(data)) + n, err := base64.StdEncoding.Decode(dst, data) + if err != nil { + return 0, err + } + return p.w.Write(dst[:n]) + } + return 0, nil +} + +func (p *websocketChannel) Read(data []byte) (int, error) { + if !p.read { + return 0, io.EOF + } + return p.r.Read(data) +} + +func (p *websocketChannel) Close() error { + return p.w.Close() +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/doc.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/doc.go new file mode 100644 index 00000000000..3dd6f828b70 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/doc.go @@ -0,0 +1,69 @@ +/* +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 wsstream contains utilities for streaming content over WebSockets. +// The Conn type allows callers to multiplex multiple read/write channels over +// a single websocket. +// +// "channel.k8s.io" +// +// The Websocket RemoteCommand subprotocol "channel.k8s.io" prepends each binary message with a +// byte indicating the channel number (zero indexed) the message was sent on. Messages in both +// directions should prefix their messages with this channel byte. Used for remote execution, +// the channel numbers are by convention defined to match the POSIX file-descriptors assigned +// to STDIN, STDOUT, and STDERR (0, 1, and 2). No other conversion is performed on the raw +// subprotocol - writes are sent as they are received by the server. +// +// Example client session: +// +// CONNECT http://server.com with subprotocol "channel.k8s.io" +// WRITE []byte{0, 102, 111, 111, 10} # send "foo\n" on channel 0 (STDIN) +// READ []byte{1, 10} # receive "\n" on channel 1 (STDOUT) +// CLOSE +// +// "v2.channel.k8s.io" +// +// The second Websocket subprotocol version "v2.channel.k8s.io" is the same as version 1, +// but it is the first "versioned" subprotocol. +// +// "v3.channel.k8s.io" +// +// The third version of the Websocket RemoteCommand subprotocol adds another channel +// for terminal resizing events. This channel is prepended with the byte '3', and it +// transmits two window sizes (encoding TerminalSize struct) with integers in the range +// (0,65536]. +// +// "v4.channel.k8s.io" +// +// The fourth version of the Websocket RemoteCommand subprotocol adds a channel for +// errors. This channel returns structured errors containing process exit codes. The +// error is "apierrors.StatusError{}". +// +// "v5.channel.k8s.io" +// +// The fifth version of the Websocket RemoteCommand subprotocol adds a CLOSE signal, +// which is sent as the first byte of the message. The second byte is the channel +// id. This CLOSE signal is handled by the websocket server by closing the stream, +// allowing the other streams to complete transmission if necessary, and gracefully +// shutdown the connection. +// +// Example client session: +// +// CONNECT http://server.com with subprotocol "v5.channel.k8s.io" +// WRITE []byte{0, 102, 111, 111, 10} # send "foo\n" on channel 0 (STDIN) +// WRITE []byte{255, 0} # send CLOSE signal (STDIN) +// CLOSE +package wsstream // import "k8s.io/apimachinery/pkg/util/httpstream/wsstream" diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/stream.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/stream.go new file mode 100644 index 00000000000..ba7e6a519af --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/stream.go @@ -0,0 +1,177 @@ +/* +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 wsstream + +import ( + "encoding/base64" + "io" + "net/http" + "sync" + "time" + + "golang.org/x/net/websocket" + + "k8s.io/apimachinery/pkg/util/runtime" +) + +// The WebSocket subprotocol "binary.k8s.io" will only send messages to the +// client and ignore messages sent to the server. The received messages are +// the exact bytes written to the stream. Zero byte messages are possible. +const binaryWebSocketProtocol = "binary.k8s.io" + +// The WebSocket subprotocol "base64.binary.k8s.io" will only send messages to the +// client and ignore messages sent to the server. The received messages are +// a base64 version of the bytes written to the stream. Zero byte messages are +// possible. +const base64BinaryWebSocketProtocol = "base64.binary.k8s.io" + +// ReaderProtocolConfig describes a websocket subprotocol with one stream. +type ReaderProtocolConfig struct { + Binary bool +} + +// NewDefaultReaderProtocols returns a stream protocol map with the +// subprotocols "", "channel.k8s.io", "base64.channel.k8s.io". +func NewDefaultReaderProtocols() map[string]ReaderProtocolConfig { + return map[string]ReaderProtocolConfig{ + "": {Binary: true}, + binaryWebSocketProtocol: {Binary: true}, + base64BinaryWebSocketProtocol: {Binary: false}, + } +} + +// Reader supports returning an arbitrary byte stream over a websocket channel. +type Reader struct { + err chan error + r io.Reader + ping bool + timeout time.Duration + protocols map[string]ReaderProtocolConfig + selectedProtocol string + + handleCrash func(additionalHandlers ...func(interface{})) // overridable for testing +} + +// NewReader creates a WebSocket pipe that will copy the contents of r to a provided +// WebSocket connection. If ping is true, a zero length message will be sent to the client +// before the stream begins reading. +// +// The protocols parameter maps subprotocol names to StreamProtocols. The empty string +// subprotocol name is used if websocket.Config.Protocol is empty. +func NewReader(r io.Reader, ping bool, protocols map[string]ReaderProtocolConfig) *Reader { + return &Reader{ + r: r, + err: make(chan error), + ping: ping, + protocols: protocols, + handleCrash: runtime.HandleCrash, + } +} + +// SetIdleTimeout sets the interval for both reads and writes before timeout. If not specified, +// there is no timeout on the reader. +func (r *Reader) SetIdleTimeout(duration time.Duration) { + r.timeout = duration +} + +func (r *Reader) handshake(config *websocket.Config, req *http.Request) error { + supportedProtocols := make([]string, 0, len(r.protocols)) + for p := range r.protocols { + supportedProtocols = append(supportedProtocols, p) + } + return handshake(config, req, supportedProtocols) +} + +// Copy the reader to the response. The created WebSocket is closed after this +// method completes. +func (r *Reader) Copy(w http.ResponseWriter, req *http.Request) error { + go func() { + defer r.handleCrash() + websocket.Server{Handshake: r.handshake, Handler: r.handle}.ServeHTTP(w, req) + }() + return <-r.err +} + +// handle implements a WebSocket handler. +func (r *Reader) handle(ws *websocket.Conn) { + // Close the connection when the client requests it, or when we finish streaming, whichever happens first + closeConnOnce := &sync.Once{} + closeConn := func() { + closeConnOnce.Do(func() { + ws.Close() + }) + } + + negotiated := ws.Config().Protocol + r.selectedProtocol = negotiated[0] + defer close(r.err) + defer closeConn() + + go func() { + defer runtime.HandleCrash() + // This blocks until the connection is closed. + // Client should not send anything. + IgnoreReceives(ws, r.timeout) + // Once the client closes, we should also close + closeConn() + }() + + r.err <- messageCopy(ws, r.r, !r.protocols[r.selectedProtocol].Binary, r.ping, r.timeout) +} + +func resetTimeout(ws *websocket.Conn, timeout time.Duration) { + if timeout > 0 { + ws.SetDeadline(time.Now().Add(timeout)) + } +} + +func messageCopy(ws *websocket.Conn, r io.Reader, base64Encode, ping bool, timeout time.Duration) error { + buf := make([]byte, 2048) + if ping { + resetTimeout(ws, timeout) + if base64Encode { + if err := websocket.Message.Send(ws, ""); err != nil { + return err + } + } else { + if err := websocket.Message.Send(ws, []byte{}); err != nil { + return err + } + } + } + for { + resetTimeout(ws, timeout) + n, err := r.Read(buf) + if err != nil { + if err == io.EOF { + return nil + } + return err + } + if n > 0 { + if base64Encode { + if err := websocket.Message.Send(ws, base64.StdEncoding.EncodeToString(buf[:n])); err != nil { + return err + } + } else { + if err := websocket.Message.Send(ws, buf[:n]); err != nil { + return err + } + } + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go index 8f9ced93fb6..1f2877399fc 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go @@ -15,7 +15,7 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto +// source: k8s.io/apimachinery/pkg/util/intstr/generated.proto package intstr @@ -43,7 +43,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *IntOrString) Reset() { *m = IntOrString{} } func (*IntOrString) ProtoMessage() {} func (*IntOrString) Descriptor() ([]byte, []int) { - return fileDescriptor_94e046ae3ce6121c, []int{0} + return fileDescriptor_771bacc35a5ec189, []int{0} } func (m *IntOrString) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -73,30 +73,29 @@ func init() { } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto", fileDescriptor_94e046ae3ce6121c) + proto.RegisterFile("k8s.io/apimachinery/pkg/util/intstr/generated.proto", fileDescriptor_771bacc35a5ec189) } -var fileDescriptor_94e046ae3ce6121c = []byte{ - // 292 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xb1, 0x4a, 0x03, 0x31, - 0x1c, 0xc6, 0x13, 0x5b, 0x8b, 0x9e, 0xe0, 0x50, 0x1c, 0x8a, 0x43, 0x7a, 0x58, 0x90, 0x5b, 0x4c, - 0x56, 0x71, 0xec, 0x56, 0x10, 0x84, 0x56, 0x1c, 0xdc, 0xee, 0xda, 0x98, 0x86, 0x6b, 0x93, 0x90, - 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 0x3a, 0x21, 0x8e, 0x8e, 0x7f, 0xb9, 0x99, 0x6f, 0xa7, 0xed, 0x7a, 0x73, 0xf4, - 0xf6, 0x3e, 0x44, 0x9b, 0x8f, 0x10, 0x8d, 0x27, 0x65, 0x45, 0xd0, 0xb6, 0x22, 0x68, 0x57, 0x11, - 0xb4, 0x71, 0x04, 0x97, 0x8e, 0xe0, 0xad, 0x23, 0x78, 0xe7, 0x08, 0xfe, 0x74, 0x04, 0xbf, 0x7c, - 0x11, 0xf4, 0x38, 0xfa, 0xc7, 0x17, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xc4, 0xf0, 0xa0, - 0x81, 0x01, 0x00, 0x00, +var fileDescriptor_771bacc35a5ec189 = []byte{ + // 277 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xce, 0xb6, 0x28, 0xd6, + 0xcb, 0xcc, 0xd7, 0x4f, 0x2c, 0xc8, 0xcc, 0x4d, 0x4c, 0xce, 0xc8, 0xcc, 0x4b, 0x2d, 0xaa, 0xd4, + 0x2f, 0xc8, 0x4e, 0xd7, 0x2f, 0x2d, 0xc9, 0xcc, 0xd1, 0xcf, 0xcc, 0x2b, 0x29, 0x2e, 0x29, 0xd2, + 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, + 0x52, 0x86, 0x68, 0xd2, 0x43, 0xd6, 0xa4, 0x57, 0x90, 0x9d, 0xae, 0x07, 0xd2, 0xa4, 0x07, 0xd1, + 0x24, 0xa5, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, + 0x9e, 0xaf, 0x0f, 0xd6, 0x9b, 0x54, 0x9a, 0x06, 0xe6, 0x81, 0x39, 0x60, 0x16, 0xc4, 0x4c, 0xa5, + 0x89, 0x8c, 0x5c, 0xdc, 0x9e, 0x79, 0x25, 0xfe, 0x45, 0xc1, 0x25, 0x45, 0x99, 0x79, 0xe9, 0x42, + 0x1a, 0x5c, 0x2c, 0x25, 0x95, 0x05, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x4e, 0x22, 0x27, + 0xee, 0xc9, 0x33, 0x3c, 0xba, 0x27, 0xcf, 0x12, 0x52, 0x59, 0x90, 0xfa, 0x0b, 0x4a, 0x07, 0x81, + 0x55, 0x08, 0xa9, 0x71, 0xb1, 0x65, 0xe6, 0x95, 0x84, 0x25, 0xe6, 0x48, 0x30, 0x29, 0x30, 0x6a, + 0xb0, 0x3a, 0xf1, 0x41, 0xd5, 0xb2, 0x79, 0x82, 0x45, 0x83, 0xa0, 0xb2, 0x20, 0x75, 0xc5, 0x25, + 0x45, 0x20, 0x75, 0xcc, 0x0a, 0x8c, 0x1a, 0x9c, 0x08, 0x75, 0xc1, 0x60, 0xd1, 0x20, 0xa8, 0xac, + 0x15, 0xc7, 0x8c, 0x05, 0xf2, 0x0c, 0x0d, 0x77, 0x14, 0x18, 0x9c, 0x3c, 0x4f, 0x3c, 0x94, 0x63, + 0xb8, 0xf0, 0x50, 0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, + 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, + 0xcb, 0x31, 0x44, 0x29, 0x13, 0x11, 0x84, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0xa1, 0x0b, + 0x1e, 0x68, 0x01, 0x00, 0x00, } func (m *IntOrString) Marshal() (dAtA []byte, err error) { diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml b/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml index 66e849f23fb..a7f2d54fdf7 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml +++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml @@ -120,7 +120,7 @@ status: type: PIDPressure - lastHeartbeatTime: "2019-09-20T19:32:50Z" lastTransitionTime: "2019-07-09T16:17:49Z" - message: kubelet is posting ready status. AppArmor enabled + message: kubelet is posting ready status reason: KubeletReady status: "True" type: Ready diff --git a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/empty.go b/vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go similarity index 62% rename from pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/empty.go rename to vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go index e11e622c5ba..68532881565 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/empty.go +++ b/vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go @@ -1,5 +1,5 @@ /* -Copyright The Kubernetes Authors. +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. @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by set-gen. DO NOT EDIT. +package portforward -package sets - -// Empty is public since it is used by some internal API objects for conversions between external -// string arrays and internal sets, and conversion logic requires public types today. -type Empty struct{} +const ( + PortForwardV1Name = "portforward.k8s.io" + WebsocketsSPDYTunnelingPrefix = "SPDY/3.1+" + KubernetesSuffix = ".k8s.io" + WebsocketsSPDYTunnelingPortForwardV1 = WebsocketsSPDYTunnelingPrefix + PortForwardV1Name +) diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go b/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go index 76acdfb4aca..8c30a366de9 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go +++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go @@ -36,6 +36,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "github.com/mxk/go-flowrate/flowrate" + "k8s.io/klog/v2" ) @@ -336,6 +337,7 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques clone.Host = h.Location.Host } clone.URL = &location + klog.V(6).Infof("UpgradeAwareProxy: dialing for SPDY upgrade with headers: %v", clone.Header) backendConn, err = h.DialForUpgrade(clone) if err != nil { klog.V(6).Infof("Proxy connection error: %v", err) @@ -370,13 +372,13 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques // hijacking should be the last step in the upgrade. requestHijacker, ok := w.(http.Hijacker) if !ok { - klog.V(6).Infof("Unable to hijack response writer: %T", w) + klog.Errorf("Unable to hijack response writer: %T", w) h.Responder.Error(w, req, fmt.Errorf("request connection cannot be hijacked: %T", w)) return true } requestHijackedConn, _, err := requestHijacker.Hijack() if err != nil { - klog.V(6).Infof("Unable to hijack response: %v", err) + klog.Errorf("Unable to hijack response: %v", err) h.Responder.Error(w, req, fmt.Errorf("error hijacking connection: %v", err)) return true } diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go b/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go index 194883390cf..fd281bdb88c 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package sets has generic set and specified sets. Generic set will // replace specified ones over time. And specific ones are deprecated. -package sets +package sets // import "k8s.io/apimachinery/pkg/util/sets" diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go b/vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go deleted file mode 100644 index 443dac62eb3..00000000000 --- a/vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package sets - -// ordered is a constraint that permits any ordered type: any type -// that supports the operators < <= >= >. -// If future releases of Go add new ordered types, -// this constraint will be modified to include them. -type ordered interface { - integer | float | ~string -} - -// integer is a constraint that permits any integer type. -// If future releases of Go add new predeclared integer types, -// this constraint will be modified to include them. -type integer interface { - signed | unsigned -} - -// float is a constraint that permits any floating-point type. -// If future releases of Go add new predeclared floating-point types, -// this constraint will be modified to include them. -type float interface { - ~float32 | ~float64 -} - -// signed is a constraint that permits any signed integer type. -// If future releases of Go add new predeclared signed integer types, -// this constraint will be modified to include them. -type signed interface { - ~int | ~int8 | ~int16 | ~int32 | ~int64 -} - -// unsigned is a constraint that permits any unsigned integer type. -// If future releases of Go add new predeclared unsigned integer types, -// this constraint will be modified to include them. -type unsigned interface { - ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/set.go b/vendor/k8s.io/apimachinery/pkg/util/sets/set.go index d50526f4262..b76129a1ca2 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/sets/set.go +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/set.go @@ -17,6 +17,7 @@ limitations under the License. package sets import ( + "cmp" "sort" ) @@ -37,7 +38,7 @@ func New[T comparable](items ...T) Set[T] { // KeySet creates a Set from a keys of a map[comparable](? extends interface{}). // If the value passed in is not actually a map, this will panic. func KeySet[T comparable, V any](theMap map[T]V) Set[T] { - ret := Set[T]{} + ret := make(Set[T], len(theMap)) for keyValue := range theMap { ret.Insert(keyValue) } @@ -193,7 +194,7 @@ func (s1 Set[T]) Equal(s2 Set[T]) bool { return len(s1) == len(s2) && s1.IsSuperset(s2) } -type sortableSliceOfGeneric[T ordered] []T +type sortableSliceOfGeneric[T cmp.Ordered] []T func (g sortableSliceOfGeneric[T]) Len() int { return len(g) } func (g sortableSliceOfGeneric[T]) Less(i, j int) bool { return less[T](g[i], g[j]) } @@ -203,7 +204,7 @@ func (g sortableSliceOfGeneric[T]) Swap(i, j int) { g[i], g[j] = g[j], g[i] // // This is a separate function and not a method because not all types supported // by Generic are ordered and only those can be sorted. -func List[T ordered](s Set[T]) []T { +func List[T cmp.Ordered](s Set[T]) []T { res := make(sortableSliceOfGeneric[T], 0, len(s)) for key := range s { res = append(res, key) @@ -236,6 +237,6 @@ func (s Set[T]) Len() int { return len(s) } -func less[T ordered](lhs, rhs T) bool { +func less[T cmp.Ordered](lhs, rhs T) bool { return lhs < rhs } diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS b/vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS new file mode 100644 index 00000000000..40237324761 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS @@ -0,0 +1,11 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +# Disable inheritance as this is an api owners file +options: + no_parent_owners: true +approvers: + - api-approvers +reviewers: + - api-reviewers +labels: + - kind/api-change diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go index 0b8a6cb354a..b32644902b0 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go @@ -19,10 +19,9 @@ package validation import ( "fmt" "math" - "net" "regexp" - "strconv" "strings" + "unicode" "k8s.io/apimachinery/pkg/util/validation/field" netutils "k8s.io/utils/net" @@ -352,11 +351,12 @@ func IsValidPortName(port string) []string { } // IsValidIP tests that the argument is a valid IP address. -func IsValidIP(value string) []string { +func IsValidIP(fldPath *field.Path, value string) field.ErrorList { + var allErrors field.ErrorList if netutils.ParseIPSloppy(value) == nil { - return []string{"must be a valid IP address, (e.g. 10.9.8.7 or 2001:db8::ffff)"} + allErrors = append(allErrors, field.Invalid(fldPath, value, "must be a valid IP address, (e.g. 10.9.8.7 or 2001:db8::ffff)")) } - return nil + return allErrors } // IsValidIPv4Address tests that the argument is a valid IPv4 address. @@ -379,6 +379,16 @@ func IsValidIPv6Address(fldPath *field.Path, value string) field.ErrorList { return allErrors } +// IsValidCIDR tests that the argument is a valid CIDR value. +func IsValidCIDR(fldPath *field.Path, value string) field.ErrorList { + var allErrors field.ErrorList + _, _, err := netutils.ParseCIDRSloppy(value) + if err != nil { + allErrors = append(allErrors, field.Invalid(fldPath, value, "must be a valid CIDR value, (e.g. 10.9.8.0/24 or 2001:db8::/64)")) + } + return allErrors +} + const percentFmt string = "[0-9]+%" const percentErrMsg string = "a valid percent string must be a numeric string followed by an ending '%'" @@ -409,6 +419,9 @@ func IsHTTPHeaderName(value string) []string { const envVarNameFmt = "[-._a-zA-Z][-._a-zA-Z0-9]*" const envVarNameFmtErrMsg string = "a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit" +// TODO(hirazawaui): Rename this when the RelaxedEnvironmentVariableValidation gate is removed. +const relaxedEnvVarNameFmtErrMsg string = "a valid environment variable name must consist only of printable ASCII characters other than '='" + var envVarNameRegexp = regexp.MustCompile("^" + envVarNameFmt + "$") // IsEnvVarName tests if a string is a valid environment variable name. @@ -422,6 +435,24 @@ func IsEnvVarName(value string) []string { return errs } +// IsRelaxedEnvVarName tests if a string is a valid environment variable name. +func IsRelaxedEnvVarName(value string) []string { + var errs []string + + if len(value) == 0 { + errs = append(errs, "environment variable name "+EmptyError()) + } + + for _, r := range value { + if r > unicode.MaxASCII || !unicode.IsPrint(r) || r == '=' { + errs = append(errs, relaxedEnvVarNameFmtErrMsg) + break + } + } + + return errs +} + const configMapKeyFmt = `[-._a-zA-Z0-9]+` const configMapKeyErrMsg string = "a valid config key must consist of alphanumeric characters, '-', '_' or '.'" @@ -493,18 +524,3 @@ func hasChDirPrefix(value string) []string { } return errs } - -// IsValidSocketAddr checks that string represents a valid socket address -// as defined in RFC 789. (e.g 0.0.0.0:10254 or [::]:10254)) -func IsValidSocketAddr(value string) []string { - var errs []string - ip, port, err := net.SplitHostPort(value) - if err != nil { - errs = append(errs, "must be a valid socket address format, (e.g. 0.0.0.0:10254 or [::]:10254)") - return errs - } - portInt, _ := strconv.Atoi(port) - errs = append(errs, IsValidPortNum(portInt)...) - errs = append(errs, IsValidIP(ip)...) - return errs -} diff --git a/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go b/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go index c55fe5d2ed6..3e29d4e71c9 100644 --- a/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go +++ b/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go @@ -39,6 +39,12 @@ const ( // CredentialIDKey is the key used in a user's "extra" to specify the unique // identifier for this identity document). CredentialIDKey = "authentication.kubernetes.io/credential-id" + // IssuedCredentialIDAuditAnnotationKey is the annotation key used in the audit event that is persisted to the + // '/token' endpoint for service accounts. + // This annotation indicates the generated credential identifier for the service account token being issued. + // This is useful when tracing back the origin of tokens that have gone on to make request that have persisted + // their credential-identifier into the audit log via the user's extra info stored on subsequent audit events. + IssuedCredentialIDAuditAnnotationKey = "authentication.kubernetes.io/issued-credential-id" // PodNameKey is the key used in a user's "extra" to specify the pod name of // the authenticating request. PodNameKey = "authentication.kubernetes.io/pod-name" diff --git a/vendor/k8s.io/apiserver/pkg/authorization/authorizer/interfaces.go b/vendor/k8s.io/apiserver/pkg/authorization/authorizer/interfaces.go index 2a826981cfd..8261c5b5830 100644 --- a/vendor/k8s.io/apiserver/pkg/authorization/authorizer/interfaces.go +++ b/vendor/k8s.io/apiserver/pkg/authorization/authorizer/interfaces.go @@ -153,7 +153,7 @@ const ( DecisionDeny Decision = iota // DecisionAllow means that an authorizer decided to allow the action. DecisionAllow - // DecisionNoOpionion means that an authorizer has no opinion on whether + // DecisionNoOpinion means that an authorizer has no opinion on whether // to allow or deny an action. DecisionNoOpinion ) diff --git a/vendor/k8s.io/apiserver/pkg/cel/cidr.go b/vendor/k8s.io/apiserver/pkg/cel/cidr.go new file mode 100644 index 00000000000..8e97f63cd74 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/cel/cidr.go @@ -0,0 +1,87 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cel + +import ( + "fmt" + "math" + "net/netip" + "reflect" + + "github.com/google/cel-go/cel" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" +) + +// CIDR provides a CEL representation of an network address. +type CIDR struct { + netip.Prefix +} + +var ( + CIDRType = cel.OpaqueType("net.CIDR") +) + +// ConvertToNative implements ref.Val.ConvertToNative. +func (d CIDR) ConvertToNative(typeDesc reflect.Type) (any, error) { + if reflect.TypeOf(d.Prefix).AssignableTo(typeDesc) { + return d.Prefix, nil + } + if reflect.TypeOf("").AssignableTo(typeDesc) { + return d.Prefix.String(), nil + } + return nil, fmt.Errorf("type conversion error from 'CIDR' to '%v'", typeDesc) +} + +// ConvertToType implements ref.Val.ConvertToType. +func (d CIDR) ConvertToType(typeVal ref.Type) ref.Val { + switch typeVal { + case CIDRType: + return d + case types.TypeType: + return CIDRType + case types.StringType: + return types.String(d.Prefix.String()) + } + return types.NewErr("type conversion error from '%s' to '%s'", CIDRType, typeVal) +} + +// Equal implements ref.Val.Equal. +func (d CIDR) Equal(other ref.Val) ref.Val { + otherD, ok := other.(CIDR) + if !ok { + return types.ValOrErr(other, "no such overload") + } + + return types.Bool(d.Prefix == otherD.Prefix) +} + +// Type implements ref.Val.Type. +func (d CIDR) Type() ref.Type { + return CIDRType +} + +// Value implements ref.Val.Value. +func (d CIDR) Value() any { + return d.Prefix +} + +// Size returns the size of the CIDR prefix address in bytes. +// Used in the size estimation of the runtime cost. +func (d CIDR) Size() ref.Val { + return types.Int(int(math.Ceil(float64(d.Prefix.Bits()) / 8))) +} diff --git a/vendor/k8s.io/apiserver/pkg/cel/environment/base.go b/vendor/k8s.io/apiserver/pkg/cel/environment/base.go index 0c1dee82dc5..2cea83c2e12 100644 --- a/vendor/k8s.io/apiserver/pkg/cel/environment/base.go +++ b/vendor/k8s.io/apiserver/pkg/cel/environment/base.go @@ -43,10 +43,12 @@ import ( // desirable because it means that CEL expressions are portable across a wider range // of Kubernetes versions. func DefaultCompatibilityVersion() *version.Version { - return version.MajorMinor(1, 28) + return version.MajorMinor(1, 29) } -var baseOpts = []VersionedOptions{ +var baseOpts = append(baseOptsWithoutStrictCost, StrictCostOpt) + +var baseOptsWithoutStrictCost = []VersionedOptions{ { // CEL epoch was actually 1.23, but we artificially set it to 1.0 because these // options should always be present. @@ -123,6 +125,21 @@ var baseOpts = []VersionedOptions{ ext.Sets(), }, }, + { + IntroducedVersion: version.MajorMinor(1, 30), + EnvOptions: []cel.EnvOption{ + library.IP(), + library.CIDR(), + }, + }, +} + +var StrictCostOpt = VersionedOptions{ + // This is to configure the cost calculation for extended libraries + IntroducedVersion: version.MajorMinor(1, 0), + ProgramOptions: []cel.ProgramOption{ + cel.CostTracking(&library.CostEstimator{}), + }, } // MustBaseEnvSet returns the common CEL base environments for Kubernetes for Version, or panics @@ -134,7 +151,8 @@ var baseOpts = []VersionedOptions{ // The returned environment contains no CEL variable definitions or custom type declarations and // should be extended to construct environments with the appropriate variable definitions, // type declarations and any other needed configuration. -func MustBaseEnvSet(ver *version.Version) *EnvSet { +// strictCost is used to determine whether to enforce strict cost calculation for CEL expressions. +func MustBaseEnvSet(ver *version.Version, strictCost bool) *EnvSet { if ver == nil { panic("version must be non-nil") } @@ -142,19 +160,33 @@ func MustBaseEnvSet(ver *version.Version) *EnvSet { panic(fmt.Sprintf("version must contain an major and minor component, but got: %s", ver.String())) } key := strconv.FormatUint(uint64(ver.Major()), 10) + "." + strconv.FormatUint(uint64(ver.Minor()), 10) - if entry, ok := baseEnvs.Load(key); ok { - return entry.(*EnvSet) + var entry interface{} + if strictCost { + if entry, ok := baseEnvs.Load(key); ok { + return entry.(*EnvSet) + } + entry, _, _ = baseEnvsSingleflight.Do(key, func() (interface{}, error) { + entry := mustNewEnvSet(ver, baseOpts) + baseEnvs.Store(key, entry) + return entry, nil + }) + } else { + if entry, ok := baseEnvsWithOption.Load(key); ok { + return entry.(*EnvSet) + } + entry, _, _ = baseEnvsWithOptionSingleflight.Do(key, func() (interface{}, error) { + entry := mustNewEnvSet(ver, baseOptsWithoutStrictCost) + baseEnvsWithOption.Store(key, entry) + return entry, nil + }) } - entry, _, _ := baseEnvsSingleflight.Do(key, func() (interface{}, error) { - entry := mustNewEnvSet(ver, baseOpts) - baseEnvs.Store(key, entry) - return entry, nil - }) return entry.(*EnvSet) } var ( - baseEnvs = sync.Map{} - baseEnvsSingleflight = &singleflight.Group{} + baseEnvs = sync.Map{} + baseEnvsWithOption = sync.Map{} + baseEnvsSingleflight = &singleflight.Group{} + baseEnvsWithOptionSingleflight = &singleflight.Group{} ) diff --git a/vendor/k8s.io/apiserver/pkg/cel/ip.go b/vendor/k8s.io/apiserver/pkg/cel/ip.go new file mode 100644 index 00000000000..f91c6cb7a86 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/cel/ip.go @@ -0,0 +1,86 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cel + +import ( + "fmt" + "math" + "net/netip" + "reflect" + + "github.com/google/cel-go/cel" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" +) + +// IP provides a CEL representation of an IP address. +type IP struct { + netip.Addr +} + +var ( + IPType = cel.OpaqueType("net.IP") +) + +// ConvertToNative implements ref.Val.ConvertToNative. +func (d IP) ConvertToNative(typeDesc reflect.Type) (any, error) { + if reflect.TypeOf(d.Addr).AssignableTo(typeDesc) { + return d.Addr, nil + } + if reflect.TypeOf("").AssignableTo(typeDesc) { + return d.Addr.String(), nil + } + return nil, fmt.Errorf("type conversion error from 'IP' to '%v'", typeDesc) +} + +// ConvertToType implements ref.Val.ConvertToType. +func (d IP) ConvertToType(typeVal ref.Type) ref.Val { + switch typeVal { + case IPType: + return d + case types.TypeType: + return IPType + case types.StringType: + return types.String(d.Addr.String()) + } + return types.NewErr("type conversion error from '%s' to '%s'", IPType, typeVal) +} + +// Equal implements ref.Val.Equal. +func (d IP) Equal(other ref.Val) ref.Val { + otherD, ok := other.(IP) + if !ok { + return types.ValOrErr(other, "no such overload") + } + return types.Bool(d.Addr == otherD.Addr) +} + +// Type implements ref.Val.Type. +func (d IP) Type() ref.Type { + return IPType +} + +// Value implements ref.Val.Value. +func (d IP) Value() any { + return d.Addr +} + +// Size returns the size of the IP address in bytes. +// Used in the size estimation of the runtime cost. +func (d IP) Size() ref.Val { + return types.Int(int(math.Ceil(float64(d.Addr.BitLen()) / 8))) +} diff --git a/vendor/k8s.io/apiserver/pkg/cel/library/cidr.go b/vendor/k8s.io/apiserver/pkg/cel/library/cidr.go new file mode 100644 index 00000000000..c4259daed97 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/cel/library/cidr.go @@ -0,0 +1,287 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package library + +import ( + "fmt" + "net/netip" + + "github.com/google/cel-go/cel" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" + + apiservercel "k8s.io/apiserver/pkg/cel" +) + +// CIDR provides a CEL function library extension of CIDR notation parsing functions. +// +// cidr +// +// Converts a string in CIDR notation to a network address representation or results in an error if the string is not a valid CIDR notation. +// The CIDR must be an IPv4 or IPv6 subnet address with a mask. +// Leading zeros in IPv4 address octets are not allowed. +// IPv4-mapped IPv6 addresses (e.g. ::ffff:1.2.3.4/24) are not allowed. +// +// cidr() +// +// Examples: +// +// cidr('192.168.0.0/16') // returns an IPv4 address with a CIDR mask +// cidr('::1/128') // returns an IPv6 address with a CIDR mask +// cidr('192.168.0.0/33') // error +// cidr('::1/129') // error +// cidr('192.168.0.1/16') // error, because there are non-0 bits after the prefix +// +// isCIDR +// +// Returns true if a string is a valid CIDR notation respresentation of a subnet with mask. +// The CIDR must be an IPv4 or IPv6 subnet address with a mask. +// Leading zeros in IPv4 address octets are not allowed. +// IPv4-mapped IPv6 addresses (e.g. ::ffff:1.2.3.4/24) are not allowed. +// +// isCIDR() +// +// Examples: +// +// isCIDR('192.168.0.0/16') // returns true +// isCIDR('::1/128') // returns true +// isCIDR('192.168.0.0/33') // returns false +// isCIDR('::1/129') // returns false +// +// containsIP / containerCIDR / ip / masked / prefixLength +// +// - containsIP: Returns true if a the CIDR contains the given IP address. +// The IP address must be an IPv4 or IPv6 address. +// May take either a string or IP address as an argument. +// +// - containsCIDR: Returns true if a the CIDR contains the given CIDR. +// The CIDR must be an IPv4 or IPv6 subnet address with a mask. +// May take either a string or CIDR as an argument. +// +// - ip: Returns the IP address representation of the CIDR. +// +// - masked: Returns the CIDR representation of the network address with a masked prefix. +// This can be used to return the canonical form of the CIDR network. +// +// - prefixLength: Returns the prefix length of the CIDR in bits. +// This is the number of bits in the mask. +// +// Examples: +// +// cidr('192.168.0.0/24').containsIP(ip('192.168.0.1')) // returns true +// cidr('192.168.0.0/24').containsIP(ip('192.168.1.1')) // returns false +// cidr('192.168.0.0/24').containsIP('192.168.0.1') // returns true +// cidr('192.168.0.0/24').containsIP('192.168.1.1') // returns false +// cidr('192.168.0.0/16').containsCIDR(cidr('192.168.10.0/24')) // returns true +// cidr('192.168.1.0/24').containsCIDR(cidr('192.168.2.0/24')) // returns false +// cidr('192.168.0.0/16').containsCIDR('192.168.10.0/24') // returns true +// cidr('192.168.1.0/24').containsCIDR('192.168.2.0/24') // returns false +// cidr('192.168.0.1/24').ip() // returns ipAddr('192.168.0.1') +// cidr('192.168.0.1/24').ip().family() // returns '4' +// cidr('::1/128').ip() // returns ipAddr('::1') +// cidr('::1/128').ip().family() // returns '6' +// cidr('192.168.0.0/24').masked() // returns cidr('192.168.0.0/24') +// cidr('192.168.0.1/24').masked() // returns cidr('192.168.0.0/24') +// cidr('192.168.0.0/24') == cidr('192.168.0.0/24').masked() // returns true, CIDR was already in canonical format +// cidr('192.168.0.1/24') == cidr('192.168.0.1/24').masked() // returns false, CIDR was not in canonical format +// cidr('192.168.0.0/16').prefixLength() // returns 16 +// cidr('::1/128').prefixLength() // returns 128 +func CIDR() cel.EnvOption { + return cel.Lib(cidrsLib) +} + +var cidrsLib = &cidrs{} + +type cidrs struct{} + +func (*cidrs) LibraryName() string { + return "net.cidr" +} + +var cidrLibraryDecls = map[string][]cel.FunctionOpt{ + "cidr": { + cel.Overload("string_to_cidr", []*cel.Type{cel.StringType}, apiservercel.CIDRType, + cel.UnaryBinding(stringToCIDR)), + }, + "containsIP": { + cel.MemberOverload("cidr_contains_ip_string", []*cel.Type{apiservercel.CIDRType, cel.StringType}, cel.BoolType, + cel.BinaryBinding(cidrContainsIPString)), + cel.MemberOverload("cidr_contains_ip_ip", []*cel.Type{apiservercel.CIDRType, apiservercel.IPType}, cel.BoolType, + cel.BinaryBinding(cidrContainsIP)), + }, + "containsCIDR": { + cel.MemberOverload("cidr_contains_cidr_string", []*cel.Type{apiservercel.CIDRType, cel.StringType}, cel.BoolType, + cel.BinaryBinding(cidrContainsCIDRString)), + cel.MemberOverload("cidr_contains_cidr", []*cel.Type{apiservercel.CIDRType, apiservercel.CIDRType}, cel.BoolType, + cel.BinaryBinding(cidrContainsCIDR)), + }, + "ip": { + cel.MemberOverload("cidr_ip", []*cel.Type{apiservercel.CIDRType}, apiservercel.IPType, + cel.UnaryBinding(cidrToIP)), + }, + "prefixLength": { + cel.MemberOverload("cidr_prefix_length", []*cel.Type{apiservercel.CIDRType}, cel.IntType, + cel.UnaryBinding(prefixLength)), + }, + "masked": { + cel.MemberOverload("cidr_masked", []*cel.Type{apiservercel.CIDRType}, apiservercel.CIDRType, + cel.UnaryBinding(masked)), + }, + "isCIDR": { + cel.Overload("is_cidr", []*cel.Type{cel.StringType}, cel.BoolType, + cel.UnaryBinding(isCIDR)), + }, + "string": { + cel.Overload("cidr_to_string", []*cel.Type{apiservercel.CIDRType}, cel.StringType, + cel.UnaryBinding(cidrToString)), + }, +} + +func (*cidrs) CompileOptions() []cel.EnvOption { + options := []cel.EnvOption{cel.Types(apiservercel.CIDRType), + cel.Variable(apiservercel.CIDRType.TypeName(), types.NewTypeTypeWithParam(apiservercel.CIDRType)), + } + for name, overloads := range cidrLibraryDecls { + options = append(options, cel.Function(name, overloads...)) + } + return options +} + +func (*cidrs) ProgramOptions() []cel.ProgramOption { + return []cel.ProgramOption{} +} + +func stringToCIDR(arg ref.Val) ref.Val { + s, ok := arg.Value().(string) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + net, err := parseCIDR(s) + if err != nil { + return types.NewErr("network address parse error during conversion from string: %v", err) + } + + return apiservercel.CIDR{ + Prefix: net, + } +} + +func cidrToString(arg ref.Val) ref.Val { + cidr, ok := arg.(apiservercel.CIDR) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + return types.String(cidr.Prefix.String()) +} + +func cidrContainsIPString(arg ref.Val, other ref.Val) ref.Val { + return cidrContainsIP(arg, stringToIP(other)) +} + +func cidrContainsCIDRString(arg ref.Val, other ref.Val) ref.Val { + return cidrContainsCIDR(arg, stringToCIDR(other)) +} + +func cidrContainsIP(arg ref.Val, other ref.Val) ref.Val { + cidr, ok := arg.(apiservercel.CIDR) + if !ok { + return types.MaybeNoSuchOverloadErr(other) + } + + ip, ok := other.(apiservercel.IP) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + return types.Bool(cidr.Contains(ip.Addr)) +} + +func cidrContainsCIDR(arg ref.Val, other ref.Val) ref.Val { + cidr, ok := arg.(apiservercel.CIDR) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + containsCIDR, ok := other.(apiservercel.CIDR) + if !ok { + return types.MaybeNoSuchOverloadErr(other) + } + + equalMasked := cidr.Prefix.Masked() == netip.PrefixFrom(containsCIDR.Prefix.Addr(), cidr.Prefix.Bits()) + return types.Bool(equalMasked && cidr.Prefix.Bits() <= containsCIDR.Prefix.Bits()) +} + +func prefixLength(arg ref.Val) ref.Val { + cidr, ok := arg.(apiservercel.CIDR) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + return types.Int(cidr.Prefix.Bits()) +} + +func isCIDR(arg ref.Val) ref.Val { + s, ok := arg.Value().(string) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + _, err := parseCIDR(s) + return types.Bool(err == nil) +} + +func cidrToIP(arg ref.Val) ref.Val { + cidr, ok := arg.(apiservercel.CIDR) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + return apiservercel.IP{ + Addr: cidr.Prefix.Addr(), + } +} + +func masked(arg ref.Val) ref.Val { + cidr, ok := arg.(apiservercel.CIDR) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + maskedCIDR := cidr.Prefix.Masked() + return apiservercel.CIDR{ + Prefix: maskedCIDR, + } +} + +// parseCIDR parses a string into an CIDR. +// We use this function to parse CIDR notation in the CEL library +// so that we can share the common logic of rejecting strings +// that IPv4-mapped IPv6 addresses or contain non-zero bits after the mask. +func parseCIDR(raw string) (netip.Prefix, error) { + net, err := netip.ParsePrefix(raw) + if err != nil { + return netip.Prefix{}, fmt.Errorf("network address parse error during conversion from string: %v", err) + } + + if net.Addr().Is4In6() { + return netip.Prefix{}, fmt.Errorf("IPv4-mapped IPv6 address %q is not allowed", raw) + } + + return net, nil +} diff --git a/vendor/k8s.io/apiserver/pkg/cel/library/cost.go b/vendor/k8s.io/apiserver/pkg/cel/library/cost.go index d18c138ec8f..e3bde017bea 100644 --- a/vendor/k8s.io/apiserver/pkg/cel/library/cost.go +++ b/vendor/k8s.io/apiserver/pkg/cel/library/cost.go @@ -79,6 +79,82 @@ func (l *CostEstimator) CallCost(function, overloadId string, args []ref.Val, re cost := strCost * regexCost return &cost } + case "cidr", "isIP", "isCIDR": + // IP and CIDR parsing is a string traversal. + if len(args) >= 1 { + cost := uint64(math.Ceil(float64(actualSize(args[0])) * common.StringTraversalCostFactor)) + return &cost + } + case "ip": + // IP and CIDR parsing is a string traversal. + if len(args) >= 1 { + if overloadId == "cidr_ip" { + // The IP member of the CIDR object is just accessing a field. + // Nominal cost. + cost := uint64(1) + return &cost + } + + cost := uint64(math.Ceil(float64(actualSize(args[0])) * common.StringTraversalCostFactor)) + return &cost + } + case "ip.isCanonical": + if len(args) >= 1 { + // We have to parse the string and then compare the parsed string to the original string. + // So we double the cost of parsing the string. + cost := uint64(math.Ceil(float64(actualSize(args[0])) * 2 * common.StringTraversalCostFactor)) + return &cost + } + case "masked", "prefixLength", "family", "isUnspecified", "isLoopback", "isLinkLocalMulticast", "isLinkLocalUnicast": + // IP and CIDR accessors are nominal cost. + cost := uint64(1) + return &cost + case "containsIP": + if len(args) >= 2 { + cidrSize := actualSize(args[0]) + otherSize := actualSize(args[1]) + + // This is the base cost of comparing two byte lists. + // We will compare only up to the length of the CIDR prefix in bytes, so use the cidrSize twice. + cost := uint64(math.Ceil(float64(cidrSize+cidrSize) * common.StringTraversalCostFactor)) + + if overloadId == "cidr_contains_ip_string" { + // If we are comparing a string, we must parse the string to into the right type, so add the cost of traversing the string again. + cost += uint64(math.Ceil(float64(otherSize) * common.StringTraversalCostFactor)) + + } + + return &cost + } + case "containsCIDR": + if len(args) >= 2 { + cidrSize := actualSize(args[0]) + otherSize := actualSize(args[1]) + + // This is the base cost of comparing two byte lists. + // We will compare only up to the length of the CIDR prefix in bytes, so use the cidrSize twice. + cost := uint64(math.Ceil(float64(cidrSize+cidrSize) * common.StringTraversalCostFactor)) + + // As we are comparing if a CIDR is within another CIDR, we first mask the base CIDR and + // also compare the CIDR bits. + // This has an additional cost of the length of the IP being traversed again, plus 1. + cost += uint64(math.Ceil(float64(cidrSize)*common.StringTraversalCostFactor)) + 1 + + if overloadId == "cidr_contains_cidr_string" { + // If we are comparing a string, we must parse the string to into the right type, so add the cost of traversing the string again. + cost += uint64(math.Ceil(float64(otherSize) * common.StringTraversalCostFactor)) + } + + return &cost + } + case "quantity", "isQuantity": + if len(args) >= 1 { + cost := uint64(math.Ceil(float64(actualSize(args[0])) * common.StringTraversalCostFactor)) + return &cost + } + case "sign", "asInteger", "isInteger", "asApproximateFloat", "isGreaterThan", "isLessThan", "compareTo", "add", "sub": + cost := uint64(1) + return &cost } return nil } @@ -225,6 +301,80 @@ func (l *CostEstimator) EstimateCallCost(function, overloadId string, target *ch // worst case size of result is that every char is returned as separate find result. return &checker.CallEstimate{CostEstimate: strCost.Multiply(regexCost), ResultSize: &checker.SizeEstimate{Min: 0, Max: sz.Max}} } + case "cidr", "isIP", "isCIDR": + if target != nil { + sz := l.sizeEstimate(args[0]) + return &checker.CallEstimate{CostEstimate: sz.MultiplyByCostFactor(common.StringTraversalCostFactor)} + } + case "ip": + if target != nil && len(args) >= 1 { + if overloadId == "cidr_ip" { + // The IP member of the CIDR object is just accessing a field. + // Nominal cost. + return &checker.CallEstimate{CostEstimate: checker.CostEstimate{Min: 1, Max: 1}} + } + + sz := l.sizeEstimate(args[0]) + return &checker.CallEstimate{CostEstimate: sz.MultiplyByCostFactor(common.StringTraversalCostFactor)} + } else if target != nil { + // The IP member of a CIDR is a just accessing a field, nominal cost. + return &checker.CallEstimate{CostEstimate: checker.CostEstimate{Min: 1, Max: 1}} + } + case "ip.isCanonical": + if target != nil && len(args) >= 1 { + sz := l.sizeEstimate(args[0]) + // We have to parse the string and then compare the parsed string to the original string. + // So we double the cost of parsing the string. + return &checker.CallEstimate{CostEstimate: sz.MultiplyByCostFactor(2 * common.StringTraversalCostFactor)} + } + case "masked", "prefixLength", "family", "isUnspecified", "isLoopback", "isLinkLocalMulticast", "isLinkLocalUnicast": + // IP and CIDR accessors are nominal cost. + return &checker.CallEstimate{CostEstimate: checker.CostEstimate{Min: 1, Max: 1}} + case "containsIP": + if target != nil && len(args) >= 1 { + // The base cost of the function is the cost of comparing two byte lists. + // The byte lists will be either ipv4 or ipv6 so will have a length of 4, or 16 bytes. + sz := checker.SizeEstimate{Min: 4, Max: 16} + + // We have to compare the two strings to determine if the CIDR/IP is in the other CIDR. + ipCompCost := sz.Add(sz).MultiplyByCostFactor(common.StringTraversalCostFactor) + + if overloadId == "cidr_contains_ip_string" { + // If we are comparing a string, we must parse the string to into the right type, so add the cost of traversing the string again. + ipCompCost = ipCompCost.Add(checker.CostEstimate(l.sizeEstimate(args[0])).MultiplyByCostFactor(common.StringTraversalCostFactor)) + } + + return &checker.CallEstimate{CostEstimate: ipCompCost} + } + case "containsCIDR": + if target != nil && len(args) >= 1 { + // The base cost of the function is the cost of comparing two byte lists. + // The byte lists will be either ipv4 or ipv6 so will have a length of 4, or 16 bytes. + sz := checker.SizeEstimate{Min: 4, Max: 16} + + // We have to compare the two strings to determine if the CIDR/IP is in the other CIDR. + ipCompCost := sz.Add(sz).MultiplyByCostFactor(common.StringTraversalCostFactor) + + // As we are comparing if a CIDR is within another CIDR, we first mask the base CIDR and + // also compare the CIDR bits. + // This has an additional cost of the length of the IP being traversed again, plus 1. + ipCompCost = ipCompCost.Add(sz.MultiplyByCostFactor(common.StringTraversalCostFactor)) + ipCompCost = ipCompCost.Add(checker.CostEstimate{Min: 1, Max: 1}) + + if overloadId == "cidr_contains_cidr_string" { + // If we are comparing a string, we must parse the string to into the right type, so add the cost of traversing the string again. + ipCompCost = ipCompCost.Add(checker.CostEstimate(l.sizeEstimate(args[0])).MultiplyByCostFactor(common.StringTraversalCostFactor)) + } + + return &checker.CallEstimate{CostEstimate: ipCompCost} + } + case "quantity", "isQuantity": + if target != nil { + sz := l.sizeEstimate(args[0]) + return &checker.CallEstimate{CostEstimate: sz.MultiplyByCostFactor(common.StringTraversalCostFactor)} + } + case "sign", "asInteger", "isInteger", "asApproximateFloat", "isGreaterThan", "isLessThan", "compareTo", "add", "sub": + return &checker.CallEstimate{CostEstimate: checker.CostEstimate{Min: 1, Max: 1}} } return nil } diff --git a/vendor/k8s.io/apiserver/pkg/cel/library/ip.go b/vendor/k8s.io/apiserver/pkg/cel/library/ip.go new file mode 100644 index 00000000000..cdfeb1daf2b --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/cel/library/ip.go @@ -0,0 +1,329 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package library + +import ( + "fmt" + "net/netip" + + "github.com/google/cel-go/cel" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" + + apiservercel "k8s.io/apiserver/pkg/cel" +) + +// IP provides a CEL function library extension of IP address parsing functions. +// +// ip +// +// Converts a string to an IP address or results in an error if the string is not a valid IP address. +// The IP address must be an IPv4 or IPv6 address. +// IPv4-mapped IPv6 addresses (e.g. ::ffff:1.2.3.4) are not allowed. +// IP addresses with zones (e.g. fe80::1%eth0) are not allowed. +// Leading zeros in IPv4 address octets are not allowed. +// +// ip() +// +// Examples: +// +// ip('127.0.0.1') // returns an IPv4 address +// ip('::1') // returns an IPv6 address +// ip('127.0.0.256') // error +// ip(':::1') // error +// +// isIP +// +// Returns true if a string is a valid IP address. +// The IP address must be an IPv4 or IPv6 address. +// IPv4-mapped IPv6 addresses (e.g. ::ffff:1.2.3.4) are not allowed. +// IP addresses with zones (e.g. fe80::1%eth0) are not allowed. +// Leading zeros in IPv4 address octets are not allowed. +// +// isIP() +// +// Examples: +// +// isIP('127.0.0.1') // returns true +// isIP('::1') // returns true +// isIP('127.0.0.256') // returns false +// isIP(':::1') // returns false +// +// ip.isCanonical +// +// Returns true if the IP address is in its canonical form. +// There is exactly one canonical form for every IP address, so fields containing +// IPs in canonical form can just be treated as strings when checking for equality or uniqueness. +// +// ip.isCanonical() +// +// Examples: +// +// ip.isCanonical('127.0.0.1') // returns true; all valid IPv4 addresses are canonical +// ip.isCanonical('2001:db8::abcd') // returns true +// ip.isCanonical('2001:DB8::ABCD') // returns false +// ip.isCanonical('2001:db8::0:0:0:abcd') // returns false +// +// family / isUnspecified / isLoopback / isLinkLocalMulticast / isLinkLocalUnicast / isGlobalUnicast +// +// - family: returns the IP addresses' family (IPv4 or IPv6) as an integer, either '4' or '6'. +// +// - isUnspecified: returns true if the IP address is the unspecified address. +// Either the IPv4 address "0.0.0.0" or the IPv6 address "::". +// +// - isLoopback: returns true if the IP address is the loopback address. +// Either an IPv4 address with a value of 127.x.x.x or an IPv6 address with a value of ::1. +// +// - isLinkLocalMulticast: returns true if the IP address is a link-local multicast address. +// Either an IPv4 address with a value of 224.0.0.x or an IPv6 address in the network ff00::/8. +// +// - isLinkLocalUnicast: returns true if the IP address is a link-local unicast address. +// Either an IPv4 address with a value of 169.254.x.x or an IPv6 address in the network fe80::/10. +// +// - isGlobalUnicast: returns true if the IP address is a global unicast address. +// Either an IPv4 address that is not zero or 255.255.255.255 or an IPv6 address that is not a link-local unicast, loopback or multicast address. +// +// Examples: +// +// ip('127.0.0.1').family() // returns '4” +// ip('::1').family() // returns '6' +// ip('127.0.0.1').family() == 4 // returns true +// ip('::1').family() == 6 // returns true +// ip('0.0.0.0').isUnspecified() // returns true +// ip('127.0.0.1').isUnspecified() // returns false +// ip('::').isUnspecified() // returns true +// ip('::1').isUnspecified() // returns false +// ip('127.0.0.1').isLoopback() // returns true +// ip('192.168.0.1').isLoopback() // returns false +// ip('::1').isLoopback() // returns true +// ip('2001:db8::abcd').isLoopback() // returns false +// ip('224.0.0.1').isLinkLocalMulticast() // returns true +// ip('224.0.1.1').isLinkLocalMulticast() // returns false +// ip('ff02::1').isLinkLocalMulticast() // returns true +// ip('fd00::1').isLinkLocalMulticast() // returns false +// ip('169.254.169.254').isLinkLocalUnicast() // returns true +// ip('192.168.0.1').isLinkLocalUnicast() // returns false +// ip('fe80::1').isLinkLocalUnicast() // returns true +// ip('fd80::1').isLinkLocalUnicast() // returns false +// ip('192.168.0.1').isGlobalUnicast() // returns true +// ip('255.255.255.255').isGlobalUnicast() // returns false +// ip('2001:db8::abcd').isGlobalUnicast() // returns true +// ip('ff00::1').isGlobalUnicast() // returns false +func IP() cel.EnvOption { + return cel.Lib(ipLib) +} + +var ipLib = &ip{} + +type ip struct{} + +func (*ip) LibraryName() string { + return "net.ip" +} + +var ipLibraryDecls = map[string][]cel.FunctionOpt{ + "ip": { + cel.Overload("string_to_ip", []*cel.Type{cel.StringType}, apiservercel.IPType, + cel.UnaryBinding(stringToIP)), + }, + "family": { + cel.MemberOverload("ip_family", []*cel.Type{apiservercel.IPType}, cel.IntType, + cel.UnaryBinding(family)), + }, + "ip.isCanonical": { + cel.Overload("ip_is_canonical", []*cel.Type{cel.StringType}, cel.BoolType, + cel.UnaryBinding(ipIsCanonical)), + }, + "isUnspecified": { + cel.MemberOverload("ip_is_unspecified", []*cel.Type{apiservercel.IPType}, cel.BoolType, + cel.UnaryBinding(isUnspecified)), + }, + "isLoopback": { + cel.MemberOverload("ip_is_loopback", []*cel.Type{apiservercel.IPType}, cel.BoolType, + cel.UnaryBinding(isLoopback)), + }, + "isLinkLocalMulticast": { + cel.MemberOverload("ip_is_link_local_multicast", []*cel.Type{apiservercel.IPType}, cel.BoolType, + cel.UnaryBinding(isLinkLocalMulticast)), + }, + "isLinkLocalUnicast": { + cel.MemberOverload("ip_is_link_local_unicast", []*cel.Type{apiservercel.IPType}, cel.BoolType, + cel.UnaryBinding(isLinkLocalUnicast)), + }, + "isGlobalUnicast": { + cel.MemberOverload("ip_is_global_unicast", []*cel.Type{apiservercel.IPType}, cel.BoolType, + cel.UnaryBinding(isGlobalUnicast)), + }, + "isIP": { + cel.Overload("is_ip", []*cel.Type{cel.StringType}, cel.BoolType, + cel.UnaryBinding(isIP)), + }, + "string": { + cel.Overload("ip_to_string", []*cel.Type{apiservercel.IPType}, cel.StringType, + cel.UnaryBinding(ipToString)), + }, +} + +func (*ip) CompileOptions() []cel.EnvOption { + options := []cel.EnvOption{cel.Types(apiservercel.IPType), + cel.Variable(apiservercel.IPType.TypeName(), types.NewTypeTypeWithParam(apiservercel.IPType)), + } + for name, overloads := range ipLibraryDecls { + options = append(options, cel.Function(name, overloads...)) + } + return options +} + +func (*ip) ProgramOptions() []cel.ProgramOption { + return []cel.ProgramOption{} +} + +func stringToIP(arg ref.Val) ref.Val { + s, ok := arg.Value().(string) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + addr, err := parseIPAddr(s) + if err != nil { + // Don't add context, we control the error message already. + return types.NewErr("%v", err) + } + + return apiservercel.IP{ + Addr: addr, + } +} + +func ipToString(arg ref.Val) ref.Val { + ip, ok := arg.(apiservercel.IP) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + return types.String(ip.Addr.String()) +} + +func family(arg ref.Val) ref.Val { + ip, ok := arg.(apiservercel.IP) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + switch { + case ip.Addr.Is4(): + return types.Int(4) + case ip.Addr.Is6(): + return types.Int(6) + default: + return types.NewErr("IP address %q is not an IPv4 or IPv6 address", ip.Addr.String()) + } +} + +func ipIsCanonical(arg ref.Val) ref.Val { + s, ok := arg.Value().(string) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + addr, err := parseIPAddr(s) + if err != nil { + // Don't add context, we control the error message already. + return types.NewErr("%v", err) + } + + // Addr.String() always returns the canonical form of the IP address. + // Therefore comparing this with the original string representation + // will tell us if the IP address is in its canonical form. + return types.Bool(addr.String() == s) +} + +func isIP(arg ref.Val) ref.Val { + s, ok := arg.Value().(string) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + _, err := parseIPAddr(s) + return types.Bool(err == nil) +} + +func isUnspecified(arg ref.Val) ref.Val { + ip, ok := arg.(apiservercel.IP) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + return types.Bool(ip.Addr.IsUnspecified()) +} + +func isLoopback(arg ref.Val) ref.Val { + ip, ok := arg.(apiservercel.IP) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + return types.Bool(ip.Addr.IsLoopback()) +} + +func isLinkLocalMulticast(arg ref.Val) ref.Val { + ip, ok := arg.(apiservercel.IP) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + return types.Bool(ip.Addr.IsLinkLocalMulticast()) +} + +func isLinkLocalUnicast(arg ref.Val) ref.Val { + ip, ok := arg.(apiservercel.IP) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + return types.Bool(ip.Addr.IsLinkLocalUnicast()) +} + +func isGlobalUnicast(arg ref.Val) ref.Val { + ip, ok := arg.(apiservercel.IP) + if !ok { + return types.MaybeNoSuchOverloadErr(arg) + } + + return types.Bool(ip.Addr.IsGlobalUnicast()) +} + +// parseIPAddr parses a string into an IP address. +// We use this function to parse IP addresses in the CEL library +// so that we can share the common logic of rejecting IP addresses +// that contain zones or are IPv4-mapped IPv6 addresses. +func parseIPAddr(raw string) (netip.Addr, error) { + addr, err := netip.ParseAddr(raw) + if err != nil { + return netip.Addr{}, fmt.Errorf("IP Address %q parse error during conversion from string: %v", raw, err) + } + + if addr.Zone() != "" { + return netip.Addr{}, fmt.Errorf("IP address %q with zone value is not allowed", raw) + } + + if addr.Is4In6() { + return netip.Addr{}, fmt.Errorf("IPv4-mapped IPv6 address %q is not allowed", raw) + } + + return addr, nil +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go new file mode 100644 index 00000000000..64422c1df41 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/auditannotation.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// AuditAnnotationApplyConfiguration represents an declarative configuration of the AuditAnnotation type for use +// with apply. +type AuditAnnotationApplyConfiguration struct { + Key *string `json:"key,omitempty"` + ValueExpression *string `json:"valueExpression,omitempty"` +} + +// AuditAnnotationApplyConfiguration constructs an declarative configuration of the AuditAnnotation type for use with +// apply. +func AuditAnnotation() *AuditAnnotationApplyConfiguration { + return &AuditAnnotationApplyConfiguration{} +} + +// WithKey sets the Key field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Key field is set to the value of the last call. +func (b *AuditAnnotationApplyConfiguration) WithKey(value string) *AuditAnnotationApplyConfiguration { + b.Key = &value + return b +} + +// WithValueExpression sets the ValueExpression field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ValueExpression field is set to the value of the last call. +func (b *AuditAnnotationApplyConfiguration) WithValueExpression(value string) *AuditAnnotationApplyConfiguration { + b.ValueExpression = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go new file mode 100644 index 00000000000..38b7475cc4d --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/expressionwarning.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ExpressionWarningApplyConfiguration represents an declarative configuration of the ExpressionWarning type for use +// with apply. +type ExpressionWarningApplyConfiguration struct { + FieldRef *string `json:"fieldRef,omitempty"` + Warning *string `json:"warning,omitempty"` +} + +// ExpressionWarningApplyConfiguration constructs an declarative configuration of the ExpressionWarning type for use with +// apply. +func ExpressionWarning() *ExpressionWarningApplyConfiguration { + return &ExpressionWarningApplyConfiguration{} +} + +// WithFieldRef sets the FieldRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FieldRef field is set to the value of the last call. +func (b *ExpressionWarningApplyConfiguration) WithFieldRef(value string) *ExpressionWarningApplyConfiguration { + b.FieldRef = &value + return b +} + +// WithWarning sets the Warning field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Warning field is set to the value of the last call. +func (b *ExpressionWarningApplyConfiguration) WithWarning(value string) *ExpressionWarningApplyConfiguration { + b.Warning = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go new file mode 100644 index 00000000000..d8e98289473 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/matchresources.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MatchResourcesApplyConfiguration represents an declarative configuration of the MatchResources type for use +// with apply. +type MatchResourcesApplyConfiguration struct { + NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + ObjectSelector *v1.LabelSelectorApplyConfiguration `json:"objectSelector,omitempty"` + ResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"resourceRules,omitempty"` + ExcludeResourceRules []NamedRuleWithOperationsApplyConfiguration `json:"excludeResourceRules,omitempty"` + MatchPolicy *apiadmissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty"` +} + +// MatchResourcesApplyConfiguration constructs an declarative configuration of the MatchResources type for use with +// apply. +func MatchResources() *MatchResourcesApplyConfiguration { + return &MatchResourcesApplyConfiguration{} +} + +// WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamespaceSelector field is set to the value of the last call. +func (b *MatchResourcesApplyConfiguration) WithNamespaceSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration { + b.NamespaceSelector = value + return b +} + +// WithObjectSelector sets the ObjectSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObjectSelector field is set to the value of the last call. +func (b *MatchResourcesApplyConfiguration) WithObjectSelector(value *v1.LabelSelectorApplyConfiguration) *MatchResourcesApplyConfiguration { + b.ObjectSelector = value + return b +} + +// WithResourceRules adds the given value to the ResourceRules field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ResourceRules field. +func (b *MatchResourcesApplyConfiguration) WithResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithResourceRules") + } + b.ResourceRules = append(b.ResourceRules, *values[i]) + } + return b +} + +// WithExcludeResourceRules adds the given value to the ExcludeResourceRules field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ExcludeResourceRules field. +func (b *MatchResourcesApplyConfiguration) WithExcludeResourceRules(values ...*NamedRuleWithOperationsApplyConfiguration) *MatchResourcesApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithExcludeResourceRules") + } + b.ExcludeResourceRules = append(b.ExcludeResourceRules, *values[i]) + } + return b +} + +// WithMatchPolicy sets the MatchPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MatchPolicy field is set to the value of the last call. +func (b *MatchResourcesApplyConfiguration) WithMatchPolicy(value apiadmissionregistrationv1.MatchPolicyType) *MatchResourcesApplyConfiguration { + b.MatchPolicy = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go new file mode 100644 index 00000000000..be8d5206cb0 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/namedrulewithoperations.go @@ -0,0 +1,94 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" +) + +// NamedRuleWithOperationsApplyConfiguration represents an declarative configuration of the NamedRuleWithOperations type for use +// with apply. +type NamedRuleWithOperationsApplyConfiguration struct { + ResourceNames []string `json:"resourceNames,omitempty"` + RuleWithOperationsApplyConfiguration `json:",inline"` +} + +// NamedRuleWithOperationsApplyConfiguration constructs an declarative configuration of the NamedRuleWithOperations type for use with +// apply. +func NamedRuleWithOperations() *NamedRuleWithOperationsApplyConfiguration { + return &NamedRuleWithOperationsApplyConfiguration{} +} + +// WithResourceNames adds the given value to the ResourceNames field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ResourceNames field. +func (b *NamedRuleWithOperationsApplyConfiguration) WithResourceNames(values ...string) *NamedRuleWithOperationsApplyConfiguration { + for i := range values { + b.ResourceNames = append(b.ResourceNames, values[i]) + } + return b +} + +// WithOperations adds the given value to the Operations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Operations field. +func (b *NamedRuleWithOperationsApplyConfiguration) WithOperations(values ...admissionregistrationv1.OperationType) *NamedRuleWithOperationsApplyConfiguration { + for i := range values { + b.Operations = append(b.Operations, values[i]) + } + return b +} + +// WithAPIGroups adds the given value to the APIGroups field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the APIGroups field. +func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIGroups(values ...string) *NamedRuleWithOperationsApplyConfiguration { + for i := range values { + b.APIGroups = append(b.APIGroups, values[i]) + } + return b +} + +// WithAPIVersions adds the given value to the APIVersions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the APIVersions field. +func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIVersions(values ...string) *NamedRuleWithOperationsApplyConfiguration { + for i := range values { + b.APIVersions = append(b.APIVersions, values[i]) + } + return b +} + +// WithResources adds the given value to the Resources field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Resources field. +func (b *NamedRuleWithOperationsApplyConfiguration) WithResources(values ...string) *NamedRuleWithOperationsApplyConfiguration { + for i := range values { + b.Resources = append(b.Resources, values[i]) + } + return b +} + +// WithScope sets the Scope field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Scope field is set to the value of the last call. +func (b *NamedRuleWithOperationsApplyConfiguration) WithScope(value admissionregistrationv1.ScopeType) *NamedRuleWithOperationsApplyConfiguration { + b.Scope = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go new file mode 100644 index 00000000000..b77a30cf913 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramkind.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ParamKindApplyConfiguration represents an declarative configuration of the ParamKind type for use +// with apply. +type ParamKindApplyConfiguration struct { + APIVersion *string `json:"apiVersion,omitempty"` + Kind *string `json:"kind,omitempty"` +} + +// ParamKindApplyConfiguration constructs an declarative configuration of the ParamKind type for use with +// apply. +func ParamKind() *ParamKindApplyConfiguration { + return &ParamKindApplyConfiguration{} +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ParamKindApplyConfiguration) WithAPIVersion(value string) *ParamKindApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ParamKindApplyConfiguration) WithKind(value string) *ParamKindApplyConfiguration { + b.Kind = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go new file mode 100644 index 00000000000..b52becda5ec --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/paramref.go @@ -0,0 +1,71 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ParamRefApplyConfiguration represents an declarative configuration of the ParamRef type for use +// with apply. +type ParamRefApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + ParameterNotFoundAction *admissionregistrationv1.ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty"` +} + +// ParamRefApplyConfiguration constructs an declarative configuration of the ParamRef type for use with +// apply. +func ParamRef() *ParamRefApplyConfiguration { + return &ParamRefApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ParamRefApplyConfiguration) WithName(value string) *ParamRefApplyConfiguration { + b.Name = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ParamRefApplyConfiguration) WithNamespace(value string) *ParamRefApplyConfiguration { + b.Namespace = &value + return b +} + +// WithSelector sets the Selector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Selector field is set to the value of the last call. +func (b *ParamRefApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *ParamRefApplyConfiguration { + b.Selector = value + return b +} + +// WithParameterNotFoundAction sets the ParameterNotFoundAction field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ParameterNotFoundAction field is set to the value of the last call. +func (b *ParamRefApplyConfiguration) WithParameterNotFoundAction(value admissionregistrationv1.ParameterNotFoundActionType) *ParamRefApplyConfiguration { + b.ParameterNotFoundAction = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go new file mode 100644 index 00000000000..8621ce71ec7 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/typechecking.go @@ -0,0 +1,44 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// TypeCheckingApplyConfiguration represents an declarative configuration of the TypeChecking type for use +// with apply. +type TypeCheckingApplyConfiguration struct { + ExpressionWarnings []ExpressionWarningApplyConfiguration `json:"expressionWarnings,omitempty"` +} + +// TypeCheckingApplyConfiguration constructs an declarative configuration of the TypeChecking type for use with +// apply. +func TypeChecking() *TypeCheckingApplyConfiguration { + return &TypeCheckingApplyConfiguration{} +} + +// WithExpressionWarnings adds the given value to the ExpressionWarnings field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ExpressionWarnings field. +func (b *TypeCheckingApplyConfiguration) WithExpressionWarnings(values ...*ExpressionWarningApplyConfiguration) *TypeCheckingApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithExpressionWarnings") + } + b.ExpressionWarnings = append(b.ExpressionWarnings, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go new file mode 100644 index 00000000000..fc96a8bdc67 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicy.go @@ -0,0 +1,256 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ValidatingAdmissionPolicyApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicy type for use +// with apply. +type ValidatingAdmissionPolicyApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ValidatingAdmissionPolicySpecApplyConfiguration `json:"spec,omitempty"` + Status *ValidatingAdmissionPolicyStatusApplyConfiguration `json:"status,omitempty"` +} + +// ValidatingAdmissionPolicy constructs an declarative configuration of the ValidatingAdmissionPolicy type for use with +// apply. +func ValidatingAdmissionPolicy(name string) *ValidatingAdmissionPolicyApplyConfiguration { + b := &ValidatingAdmissionPolicyApplyConfiguration{} + b.WithName(name) + b.WithKind("ValidatingAdmissionPolicy") + b.WithAPIVersion("admissionregistration.k8s.io/v1") + return b +} + +// ExtractValidatingAdmissionPolicy extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicy. If no managedFields are found in validatingAdmissionPolicy for fieldManager, a +// ValidatingAdmissionPolicyApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// validatingAdmissionPolicy must be a unmodified ValidatingAdmissionPolicy API object that was retrieved from the Kubernetes API. +// ExtractValidatingAdmissionPolicy provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractValidatingAdmissionPolicy(validatingAdmissionPolicy *apiadmissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { + return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "") +} + +// ExtractValidatingAdmissionPolicyStatus is the same as ExtractValidatingAdmissionPolicy except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractValidatingAdmissionPolicyStatus(validatingAdmissionPolicy *apiadmissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { + return extractValidatingAdmissionPolicy(validatingAdmissionPolicy, fieldManager, "status") +} + +func extractValidatingAdmissionPolicy(validatingAdmissionPolicy *apiadmissionregistrationv1.ValidatingAdmissionPolicy, fieldManager string, subresource string) (*ValidatingAdmissionPolicyApplyConfiguration, error) { + b := &ValidatingAdmissionPolicyApplyConfiguration{} + err := managedfields.ExtractInto(validatingAdmissionPolicy, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(validatingAdmissionPolicy.Name) + + b.WithKind("ValidatingAdmissionPolicy") + b.WithAPIVersion("admissionregistration.k8s.io/v1") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ValidatingAdmissionPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicySpecApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyApplyConfiguration) WithStatus(value *ValidatingAdmissionPolicyStatusApplyConfiguration) *ValidatingAdmissionPolicyApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go new file mode 100644 index 00000000000..5bc41a0f521 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybinding.go @@ -0,0 +1,247 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ValidatingAdmissionPolicyBindingApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBinding type for use +// with apply. +type ValidatingAdmissionPolicyBindingApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ValidatingAdmissionPolicyBindingSpecApplyConfiguration `json:"spec,omitempty"` +} + +// ValidatingAdmissionPolicyBinding constructs an declarative configuration of the ValidatingAdmissionPolicyBinding type for use with +// apply. +func ValidatingAdmissionPolicyBinding(name string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b := &ValidatingAdmissionPolicyBindingApplyConfiguration{} + b.WithName(name) + b.WithKind("ValidatingAdmissionPolicyBinding") + b.WithAPIVersion("admissionregistration.k8s.io/v1") + return b +} + +// ExtractValidatingAdmissionPolicyBinding extracts the applied configuration owned by fieldManager from +// validatingAdmissionPolicyBinding. If no managedFields are found in validatingAdmissionPolicyBinding for fieldManager, a +// ValidatingAdmissionPolicyBindingApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// validatingAdmissionPolicyBinding must be a unmodified ValidatingAdmissionPolicyBinding API object that was retrieved from the Kubernetes API. +// ExtractValidatingAdmissionPolicyBinding provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { + return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "") +} + +// ExtractValidatingAdmissionPolicyBindingStatus is the same as ExtractValidatingAdmissionPolicyBinding except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractValidatingAdmissionPolicyBindingStatus(validatingAdmissionPolicyBinding *apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { + return extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding, fieldManager, "status") +} + +func extractValidatingAdmissionPolicyBinding(validatingAdmissionPolicyBinding *apiadmissionregistrationv1.ValidatingAdmissionPolicyBinding, fieldManager string, subresource string) (*ValidatingAdmissionPolicyBindingApplyConfiguration, error) { + b := &ValidatingAdmissionPolicyBindingApplyConfiguration{} + err := managedfields.ExtractInto(validatingAdmissionPolicyBinding, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(validatingAdmissionPolicyBinding.Name) + + b.WithKind("ValidatingAdmissionPolicyBinding") + b.WithAPIVersion("admissionregistration.k8s.io/v1") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithKind(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAPIVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGenerateName(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithNamespace(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithUID(value types.UID) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithResourceVersion(value string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithGeneration(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithLabels(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithAnnotations(entries map[string]string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithFinalizers(values ...string) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingApplyConfiguration) WithSpec(value *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) *ValidatingAdmissionPolicyBindingApplyConfiguration { + b.Spec = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go new file mode 100644 index 00000000000..da6ecbe371c --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicybindingspec.go @@ -0,0 +1,72 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" +) + +// ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use +// with apply. +type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct { + PolicyName *string `json:"policyName,omitempty"` + ParamRef *ParamRefApplyConfiguration `json:"paramRef,omitempty"` + MatchResources *MatchResourcesApplyConfiguration `json:"matchResources,omitempty"` + ValidationActions []admissionregistrationv1.ValidationAction `json:"validationActions,omitempty"` +} + +// ValidatingAdmissionPolicyBindingSpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use with +// apply. +func ValidatingAdmissionPolicyBindingSpec() *ValidatingAdmissionPolicyBindingSpecApplyConfiguration { + return &ValidatingAdmissionPolicyBindingSpecApplyConfiguration{} +} + +// WithPolicyName sets the PolicyName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PolicyName field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration { + b.PolicyName = &value + return b +} + +// WithParamRef sets the ParamRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ParamRef field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration { + b.ParamRef = value + return b +} + +// WithMatchResources sets the MatchResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MatchResources field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration { + b.MatchResources = value + return b +} + +// WithValidationActions adds the given value to the ValidationActions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ValidationActions field. +func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithValidationActions(values ...admissionregistrationv1.ValidationAction) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration { + for i := range values { + b.ValidationActions = append(b.ValidationActions, values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go new file mode 100644 index 00000000000..eb930b9b1cd --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicyspec.go @@ -0,0 +1,117 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" +) + +// ValidatingAdmissionPolicySpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicySpec type for use +// with apply. +type ValidatingAdmissionPolicySpecApplyConfiguration struct { + ParamKind *ParamKindApplyConfiguration `json:"paramKind,omitempty"` + MatchConstraints *MatchResourcesApplyConfiguration `json:"matchConstraints,omitempty"` + Validations []ValidationApplyConfiguration `json:"validations,omitempty"` + FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty"` + AuditAnnotations []AuditAnnotationApplyConfiguration `json:"auditAnnotations,omitempty"` + MatchConditions []MatchConditionApplyConfiguration `json:"matchConditions,omitempty"` + Variables []VariableApplyConfiguration `json:"variables,omitempty"` +} + +// ValidatingAdmissionPolicySpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicySpec type for use with +// apply. +func ValidatingAdmissionPolicySpec() *ValidatingAdmissionPolicySpecApplyConfiguration { + return &ValidatingAdmissionPolicySpecApplyConfiguration{} +} + +// WithParamKind sets the ParamKind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ParamKind field is set to the value of the last call. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithParamKind(value *ParamKindApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + b.ParamKind = value + return b +} + +// WithMatchConstraints sets the MatchConstraints field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MatchConstraints field is set to the value of the last call. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConstraints(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + b.MatchConstraints = value + return b +} + +// WithValidations adds the given value to the Validations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Validations field. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithValidations(values ...*ValidationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithValidations") + } + b.Validations = append(b.Validations, *values[i]) + } + return b +} + +// WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FailurePolicy field is set to the value of the last call. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithFailurePolicy(value admissionregistrationv1.FailurePolicyType) *ValidatingAdmissionPolicySpecApplyConfiguration { + b.FailurePolicy = &value + return b +} + +// WithAuditAnnotations adds the given value to the AuditAnnotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AuditAnnotations field. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithAuditAnnotations(values ...*AuditAnnotationApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAuditAnnotations") + } + b.AuditAnnotations = append(b.AuditAnnotations, *values[i]) + } + return b +} + +// WithMatchConditions adds the given value to the MatchConditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the MatchConditions field. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithMatchConditions(values ...*MatchConditionApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithMatchConditions") + } + b.MatchConditions = append(b.MatchConditions, *values[i]) + } + return b +} + +// WithVariables adds the given value to the Variables field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Variables field. +func (b *ValidatingAdmissionPolicySpecApplyConfiguration) WithVariables(values ...*VariableApplyConfiguration) *ValidatingAdmissionPolicySpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithVariables") + } + b.Variables = append(b.Variables, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go new file mode 100644 index 00000000000..25cd67f08d8 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingadmissionpolicystatus.go @@ -0,0 +1,66 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ValidatingAdmissionPolicyStatusApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyStatus type for use +// with apply. +type ValidatingAdmissionPolicyStatusApplyConfiguration struct { + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"` + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// ValidatingAdmissionPolicyStatusApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyStatus type for use with +// apply. +func ValidatingAdmissionPolicyStatus() *ValidatingAdmissionPolicyStatusApplyConfiguration { + return &ValidatingAdmissionPolicyStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithObservedGeneration(value int64) *ValidatingAdmissionPolicyStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithTypeChecking sets the TypeChecking field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TypeChecking field is set to the value of the last call. +func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithTypeChecking(value *TypeCheckingApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration { + b.TypeChecking = value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go new file mode 100644 index 00000000000..ac29d143621 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validation.go @@ -0,0 +1,70 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ValidationApplyConfiguration represents an declarative configuration of the Validation type for use +// with apply. +type ValidationApplyConfiguration struct { + Expression *string `json:"expression,omitempty"` + Message *string `json:"message,omitempty"` + Reason *v1.StatusReason `json:"reason,omitempty"` + MessageExpression *string `json:"messageExpression,omitempty"` +} + +// ValidationApplyConfiguration constructs an declarative configuration of the Validation type for use with +// apply. +func Validation() *ValidationApplyConfiguration { + return &ValidationApplyConfiguration{} +} + +// WithExpression sets the Expression field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Expression field is set to the value of the last call. +func (b *ValidationApplyConfiguration) WithExpression(value string) *ValidationApplyConfiguration { + b.Expression = &value + return b +} + +// WithMessage sets the Message field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Message field is set to the value of the last call. +func (b *ValidationApplyConfiguration) WithMessage(value string) *ValidationApplyConfiguration { + b.Message = &value + return b +} + +// WithReason sets the Reason field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Reason field is set to the value of the last call. +func (b *ValidationApplyConfiguration) WithReason(value v1.StatusReason) *ValidationApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessageExpression sets the MessageExpression field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MessageExpression field is set to the value of the last call. +func (b *ValidationApplyConfiguration) WithMessageExpression(value string) *ValidationApplyConfiguration { + b.MessageExpression = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go new file mode 100644 index 00000000000..d55f29a38bb --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/variable.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// VariableApplyConfiguration represents an declarative configuration of the Variable type for use +// with apply. +type VariableApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Expression *string `json:"expression,omitempty"` +} + +// VariableApplyConfiguration constructs an declarative configuration of the Variable type for use with +// apply. +func Variable() *VariableApplyConfiguration { + return &VariableApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *VariableApplyConfiguration) WithName(value string) *VariableApplyConfiguration { + b.Name = &value + return b +} + +// WithExpression sets the Expression field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Expression field is set to the value of the last call. +func (b *VariableApplyConfiguration) WithExpression(value string) *VariableApplyConfiguration { + b.Expression = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go b/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go index 3d46a3ecf9b..bbcff71c860 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go +++ b/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobspec.go @@ -31,6 +31,7 @@ type JobSpecApplyConfiguration struct { Completions *int32 `json:"completions,omitempty"` ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` PodFailurePolicy *PodFailurePolicyApplyConfiguration `json:"podFailurePolicy,omitempty"` + SuccessPolicy *SuccessPolicyApplyConfiguration `json:"successPolicy,omitempty"` BackoffLimit *int32 `json:"backoffLimit,omitempty"` BackoffLimitPerIndex *int32 `json:"backoffLimitPerIndex,omitempty"` MaxFailedIndexes *int32 `json:"maxFailedIndexes,omitempty"` @@ -41,6 +42,7 @@ type JobSpecApplyConfiguration struct { CompletionMode *batchv1.CompletionMode `json:"completionMode,omitempty"` Suspend *bool `json:"suspend,omitempty"` PodReplacementPolicy *batchv1.PodReplacementPolicy `json:"podReplacementPolicy,omitempty"` + ManagedBy *string `json:"managedBy,omitempty"` } // JobSpecApplyConfiguration constructs an declarative configuration of the JobSpec type for use with @@ -81,6 +83,14 @@ func (b *JobSpecApplyConfiguration) WithPodFailurePolicy(value *PodFailurePolicy return b } +// WithSuccessPolicy sets the SuccessPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SuccessPolicy field is set to the value of the last call. +func (b *JobSpecApplyConfiguration) WithSuccessPolicy(value *SuccessPolicyApplyConfiguration) *JobSpecApplyConfiguration { + b.SuccessPolicy = value + return b +} + // WithBackoffLimit sets the BackoffLimit field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the BackoffLimit field is set to the value of the last call. @@ -160,3 +170,11 @@ func (b *JobSpecApplyConfiguration) WithPodReplacementPolicy(value batchv1.PodRe b.PodReplacementPolicy = &value return b } + +// WithManagedBy sets the ManagedBy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ManagedBy field is set to the value of the last call. +func (b *JobSpecApplyConfiguration) WithManagedBy(value string) *JobSpecApplyConfiguration { + b.ManagedBy = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go b/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go new file mode 100644 index 00000000000..327aa1f5a4b --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicy.go @@ -0,0 +1,44 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// SuccessPolicyApplyConfiguration represents an declarative configuration of the SuccessPolicy type for use +// with apply. +type SuccessPolicyApplyConfiguration struct { + Rules []SuccessPolicyRuleApplyConfiguration `json:"rules,omitempty"` +} + +// SuccessPolicyApplyConfiguration constructs an declarative configuration of the SuccessPolicy type for use with +// apply. +func SuccessPolicy() *SuccessPolicyApplyConfiguration { + return &SuccessPolicyApplyConfiguration{} +} + +// WithRules adds the given value to the Rules field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Rules field. +func (b *SuccessPolicyApplyConfiguration) WithRules(values ...*SuccessPolicyRuleApplyConfiguration) *SuccessPolicyApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithRules") + } + b.Rules = append(b.Rules, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go b/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go new file mode 100644 index 00000000000..4c862e6821e --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/batch/v1/successpolicyrule.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// SuccessPolicyRuleApplyConfiguration represents an declarative configuration of the SuccessPolicyRule type for use +// with apply. +type SuccessPolicyRuleApplyConfiguration struct { + SucceededIndexes *string `json:"succeededIndexes,omitempty"` + SucceededCount *int32 `json:"succeededCount,omitempty"` +} + +// SuccessPolicyRuleApplyConfiguration constructs an declarative configuration of the SuccessPolicyRule type for use with +// apply. +func SuccessPolicyRule() *SuccessPolicyRuleApplyConfiguration { + return &SuccessPolicyRuleApplyConfiguration{} +} + +// WithSucceededIndexes sets the SucceededIndexes field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SucceededIndexes field is set to the value of the last call. +func (b *SuccessPolicyRuleApplyConfiguration) WithSucceededIndexes(value string) *SuccessPolicyRuleApplyConfiguration { + b.SucceededIndexes = &value + return b +} + +// WithSucceededCount sets the SucceededCount field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SucceededCount field is set to the value of the last call. +func (b *SuccessPolicyRuleApplyConfiguration) WithSucceededCount(value int32) *SuccessPolicyRuleApplyConfiguration { + b.SucceededCount = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go new file mode 100644 index 00000000000..7f3c22afa1b --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/core/v1" +) + +// AppArmorProfileApplyConfiguration represents an declarative configuration of the AppArmorProfile type for use +// with apply. +type AppArmorProfileApplyConfiguration struct { + Type *v1.AppArmorProfileType `json:"type,omitempty"` + LocalhostProfile *string `json:"localhostProfile,omitempty"` +} + +// AppArmorProfileApplyConfiguration constructs an declarative configuration of the AppArmorProfile type for use with +// apply. +func AppArmorProfile() *AppArmorProfileApplyConfiguration { + return &AppArmorProfileApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *AppArmorProfileApplyConfiguration) WithType(value v1.AppArmorProfileType) *AppArmorProfileApplyConfiguration { + b.Type = &value + return b +} + +// WithLocalhostProfile sets the LocalhostProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LocalhostProfile field is set to the value of the last call. +func (b *AppArmorProfileApplyConfiguration) WithLocalhostProfile(value string) *AppArmorProfileApplyConfiguration { + b.LocalhostProfile = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go index 2b98c4658f2..e3f774bbb3d 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstatus.go @@ -36,6 +36,7 @@ type ContainerStatusApplyConfiguration struct { Started *bool `json:"started,omitempty"` AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"` Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` + VolumeMounts []VolumeMountStatusApplyConfiguration `json:"volumeMounts,omitempty"` } // ContainerStatusApplyConfiguration constructs an declarative configuration of the ContainerStatus type for use with @@ -131,3 +132,16 @@ func (b *ContainerStatusApplyConfiguration) WithResources(value *ResourceRequire b.Resources = value return b } + +// WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the VolumeMounts field. +func (b *ContainerStatusApplyConfiguration) WithVolumeMounts(values ...*VolumeMountStatusApplyConfiguration) *ContainerStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithVolumeMounts") + } + b.VolumeMounts = append(b.VolumeMounts, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go new file mode 100644 index 00000000000..9ada0a18efd --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandler.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// NodeRuntimeHandlerApplyConfiguration represents an declarative configuration of the NodeRuntimeHandler type for use +// with apply. +type NodeRuntimeHandlerApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Features *NodeRuntimeHandlerFeaturesApplyConfiguration `json:"features,omitempty"` +} + +// NodeRuntimeHandlerApplyConfiguration constructs an declarative configuration of the NodeRuntimeHandler type for use with +// apply. +func NodeRuntimeHandler() *NodeRuntimeHandlerApplyConfiguration { + return &NodeRuntimeHandlerApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NodeRuntimeHandlerApplyConfiguration) WithName(value string) *NodeRuntimeHandlerApplyConfiguration { + b.Name = &value + return b +} + +// WithFeatures sets the Features field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Features field is set to the value of the last call. +func (b *NodeRuntimeHandlerApplyConfiguration) WithFeatures(value *NodeRuntimeHandlerFeaturesApplyConfiguration) *NodeRuntimeHandlerApplyConfiguration { + b.Features = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go new file mode 100644 index 00000000000..a3e3a52e887 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/noderuntimehandlerfeatures.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// NodeRuntimeHandlerFeaturesApplyConfiguration represents an declarative configuration of the NodeRuntimeHandlerFeatures type for use +// with apply. +type NodeRuntimeHandlerFeaturesApplyConfiguration struct { + RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty"` +} + +// NodeRuntimeHandlerFeaturesApplyConfiguration constructs an declarative configuration of the NodeRuntimeHandlerFeatures type for use with +// apply. +func NodeRuntimeHandlerFeatures() *NodeRuntimeHandlerFeaturesApplyConfiguration { + return &NodeRuntimeHandlerFeaturesApplyConfiguration{} +} + +// WithRecursiveReadOnlyMounts sets the RecursiveReadOnlyMounts field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RecursiveReadOnlyMounts field is set to the value of the last call. +func (b *NodeRuntimeHandlerFeaturesApplyConfiguration) WithRecursiveReadOnlyMounts(value bool) *NodeRuntimeHandlerFeaturesApplyConfiguration { + b.RecursiveReadOnlyMounts = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go index aa3603f4fc0..a4a30a26853 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go @@ -36,6 +36,7 @@ type NodeStatusApplyConfiguration struct { VolumesInUse []v1.UniqueVolumeName `json:"volumesInUse,omitempty"` VolumesAttached []AttachedVolumeApplyConfiguration `json:"volumesAttached,omitempty"` Config *NodeConfigStatusApplyConfiguration `json:"config,omitempty"` + RuntimeHandlers []NodeRuntimeHandlerApplyConfiguration `json:"runtimeHandlers,omitempty"` } // NodeStatusApplyConfiguration constructs an declarative configuration of the NodeStatus type for use with @@ -153,3 +154,16 @@ func (b *NodeStatusApplyConfiguration) WithConfig(value *NodeConfigStatusApplyCo b.Config = value return b } + +// WithRuntimeHandlers adds the given value to the RuntimeHandlers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the RuntimeHandlers field. +func (b *NodeStatusApplyConfiguration) WithRuntimeHandlers(values ...*NodeRuntimeHandlerApplyConfiguration) *NodeStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithRuntimeHandlers") + } + b.RuntimeHandlers = append(b.RuntimeHandlers, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go index 6db09aa32f1..6b340294ebc 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go @@ -35,6 +35,7 @@ type PodSecurityContextApplyConfiguration struct { Sysctls []SysctlApplyConfiguration `json:"sysctls,omitempty"` FSGroupChangePolicy *corev1.PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty"` SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"` + AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"` } // PodSecurityContextApplyConfiguration constructs an declarative configuration of the PodSecurityContext type for use with @@ -129,3 +130,11 @@ func (b *PodSecurityContextApplyConfiguration) WithSeccompProfile(value *Seccomp b.SeccompProfile = value return b } + +// WithAppArmorProfile sets the AppArmorProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AppArmorProfile field is set to the value of the last call. +func (b *PodSecurityContextApplyConfiguration) WithAppArmorProfile(value *AppArmorProfileApplyConfiguration) *PodSecurityContextApplyConfiguration { + b.AppArmorProfile = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go index 8f01537eb37..4146b765daa 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/securitycontext.go @@ -36,6 +36,7 @@ type SecurityContextApplyConfiguration struct { AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"` ProcMount *corev1.ProcMountType `json:"procMount,omitempty"` SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"` + AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"` } // SecurityContextApplyConfiguration constructs an declarative configuration of the SecurityContext type for use with @@ -131,3 +132,11 @@ func (b *SecurityContextApplyConfiguration) WithSeccompProfile(value *SeccompPro b.SeccompProfile = value return b } + +// WithAppArmorProfile sets the AppArmorProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AppArmorProfile field is set to the value of the last call. +func (b *SecurityContextApplyConfiguration) WithAppArmorProfile(value *AppArmorProfileApplyConfiguration) *SecurityContextApplyConfiguration { + b.AppArmorProfile = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go index 493af6fb3c1..5cfbcb700fe 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/servicespec.go @@ -44,6 +44,7 @@ type ServiceSpecApplyConfiguration struct { AllocateLoadBalancerNodePorts *bool `json:"allocateLoadBalancerNodePorts,omitempty"` LoadBalancerClass *string `json:"loadBalancerClass,omitempty"` InternalTrafficPolicy *corev1.ServiceInternalTrafficPolicy `json:"internalTrafficPolicy,omitempty"` + TrafficDistribution *string `json:"trafficDistribution,omitempty"` } // ServiceSpecApplyConfiguration constructs an declarative configuration of the ServiceSpec type for use with @@ -222,3 +223,11 @@ func (b *ServiceSpecApplyConfiguration) WithInternalTrafficPolicy(value corev1.S b.InternalTrafficPolicy = &value return b } + +// WithTrafficDistribution sets the TrafficDistribution field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TrafficDistribution field is set to the value of the last call. +func (b *ServiceSpecApplyConfiguration) WithTrafficDistribution(value string) *ServiceSpecApplyConfiguration { + b.TrafficDistribution = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go index b0bec9ffed9..358658350e8 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go @@ -25,12 +25,13 @@ import ( // VolumeMountApplyConfiguration represents an declarative configuration of the VolumeMount type for use // with apply. type VolumeMountApplyConfiguration struct { - Name *string `json:"name,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - MountPath *string `json:"mountPath,omitempty"` - SubPath *string `json:"subPath,omitempty"` - MountPropagation *v1.MountPropagationMode `json:"mountPropagation,omitempty"` - SubPathExpr *string `json:"subPathExpr,omitempty"` + Name *string `json:"name,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + RecursiveReadOnly *v1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"` + MountPath *string `json:"mountPath,omitempty"` + SubPath *string `json:"subPath,omitempty"` + MountPropagation *v1.MountPropagationMode `json:"mountPropagation,omitempty"` + SubPathExpr *string `json:"subPathExpr,omitempty"` } // VolumeMountApplyConfiguration constructs an declarative configuration of the VolumeMount type for use with @@ -55,6 +56,14 @@ func (b *VolumeMountApplyConfiguration) WithReadOnly(value bool) *VolumeMountApp return b } +// WithRecursiveReadOnly sets the RecursiveReadOnly field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RecursiveReadOnly field is set to the value of the last call. +func (b *VolumeMountApplyConfiguration) WithRecursiveReadOnly(value v1.RecursiveReadOnlyMode) *VolumeMountApplyConfiguration { + b.RecursiveReadOnly = &value + return b +} + // WithMountPath sets the MountPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MountPath field is set to the value of the last call. diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go new file mode 100644 index 00000000000..c3d187fdfac --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go @@ -0,0 +1,70 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/core/v1" +) + +// VolumeMountStatusApplyConfiguration represents an declarative configuration of the VolumeMountStatus type for use +// with apply. +type VolumeMountStatusApplyConfiguration struct { + Name *string `json:"name,omitempty"` + MountPath *string `json:"mountPath,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + RecursiveReadOnly *v1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"` +} + +// VolumeMountStatusApplyConfiguration constructs an declarative configuration of the VolumeMountStatus type for use with +// apply. +func VolumeMountStatus() *VolumeMountStatusApplyConfiguration { + return &VolumeMountStatusApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *VolumeMountStatusApplyConfiguration) WithName(value string) *VolumeMountStatusApplyConfiguration { + b.Name = &value + return b +} + +// WithMountPath sets the MountPath field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MountPath field is set to the value of the last call. +func (b *VolumeMountStatusApplyConfiguration) WithMountPath(value string) *VolumeMountStatusApplyConfiguration { + b.MountPath = &value + return b +} + +// WithReadOnly sets the ReadOnly field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ReadOnly field is set to the value of the last call. +func (b *VolumeMountStatusApplyConfiguration) WithReadOnly(value bool) *VolumeMountStatusApplyConfiguration { + b.ReadOnly = &value + return b +} + +// WithRecursiveReadOnly sets the RecursiveReadOnly field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RecursiveReadOnly field is set to the value of the last call. +func (b *VolumeMountStatusApplyConfiguration) WithRecursiveReadOnly(value v1.RecursiveReadOnlyMode) *VolumeMountStatusApplyConfiguration { + b.RecursiveReadOnly = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go b/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go index 2ceb262217d..47bfb44e0c3 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -39,6 +39,28 @@ func Parser() *typed.Parser { var parserOnce sync.Once var parser *typed.Parser var schemaYAML = typed.YAMLObject(`types: +- name: io.k8s.api.admissionregistration.v1.AuditAnnotation + map: + fields: + - name: key + type: + scalar: string + default: "" + - name: valueExpression + type: + scalar: string + default: "" +- name: io.k8s.api.admissionregistration.v1.ExpressionWarning + map: + fields: + - name: fieldRef + type: + scalar: string + default: "" + - name: warning + type: + scalar: string + default: "" - name: io.k8s.api.admissionregistration.v1.MatchCondition map: fields: @@ -50,6 +72,31 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" +- name: io.k8s.api.admissionregistration.v1.MatchResources + map: + fields: + - name: excludeResourceRules + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.NamedRuleWithOperations + elementRelationship: atomic + - name: matchPolicy + type: + scalar: string + - name: namespaceSelector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: objectSelector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: resourceRules + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.NamedRuleWithOperations + elementRelationship: atomic + elementRelationship: atomic - name: io.k8s.api.admissionregistration.v1.MutatingWebhook map: fields: @@ -123,6 +170,69 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - name +- name: io.k8s.api.admissionregistration.v1.NamedRuleWithOperations + map: + fields: + - name: apiGroups + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: apiVersions + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: operations + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: resourceNames + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: resources + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: scope + type: + scalar: string + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1.ParamKind + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1.ParamRef + map: + fields: + - name: name + type: + scalar: string + - name: namespace + type: + scalar: string + - name: parameterNotFoundAction + type: + scalar: string + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + elementRelationship: atomic - name: io.k8s.api.admissionregistration.v1.RuleWithOperations map: fields: @@ -170,6 +280,128 @@ var schemaYAML = typed.YAMLObject(`types: - name: port type: scalar: numeric +- name: io.k8s.api.admissionregistration.v1.TypeChecking + map: + fields: + - name: expressionWarnings + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.ExpressionWarning + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicySpec + default: {} + - name: status + type: + namedType: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyStatus + default: {} +- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec + default: {} +- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec + map: + fields: + - name: matchResources + type: + namedType: io.k8s.api.admissionregistration.v1.MatchResources + - name: paramRef + type: + namedType: io.k8s.api.admissionregistration.v1.ParamRef + - name: policyName + type: + scalar: string + - name: validationActions + type: + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicySpec + map: + fields: + - name: auditAnnotations + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.AuditAnnotation + elementRelationship: atomic + - name: failurePolicy + type: + scalar: string + - name: matchConditions + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.MatchCondition + elementRelationship: associative + keys: + - name + - name: matchConstraints + type: + namedType: io.k8s.api.admissionregistration.v1.MatchResources + - name: paramKind + type: + namedType: io.k8s.api.admissionregistration.v1.ParamKind + - name: validations + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.Validation + elementRelationship: atomic + - name: variables + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.Variable + elementRelationship: associative + keys: + - name +- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: observedGeneration + type: + scalar: numeric + - name: typeChecking + type: + namedType: io.k8s.api.admissionregistration.v1.TypeChecking - name: io.k8s.api.admissionregistration.v1.ValidatingWebhook map: fields: @@ -240,6 +472,34 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - name +- name: io.k8s.api.admissionregistration.v1.Validation + map: + fields: + - name: expression + type: + scalar: string + default: "" + - name: message + type: + scalar: string + - name: messageExpression + type: + scalar: string + - name: reason + type: + scalar: string +- name: io.k8s.api.admissionregistration.v1.Variable + map: + fields: + - name: expression + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + elementRelationship: atomic - name: io.k8s.api.admissionregistration.v1.WebhookClientConfig map: fields: @@ -3599,6 +3859,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: completions type: scalar: numeric + - name: managedBy + type: + scalar: string - name: manualSelector type: scalar: boolean @@ -3617,6 +3880,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: successPolicy + type: + namedType: io.k8s.api.batch.v1.SuccessPolicy - name: suspend type: scalar: boolean @@ -3729,6 +3995,24 @@ var schemaYAML = typed.YAMLObject(`types: elementType: namedType: io.k8s.api.batch.v1.PodFailurePolicyOnPodConditionsPattern elementRelationship: atomic +- name: io.k8s.api.batch.v1.SuccessPolicy + map: + fields: + - name: rules + type: + list: + elementType: + namedType: io.k8s.api.batch.v1.SuccessPolicyRule + elementRelationship: atomic +- name: io.k8s.api.batch.v1.SuccessPolicyRule + map: + fields: + - name: succeededCount + type: + scalar: numeric + - name: succeededIndexes + type: + scalar: string - name: io.k8s.api.batch.v1.UncountedTerminatedPods map: fields: @@ -4138,6 +4422,21 @@ var schemaYAML = typed.YAMLObject(`types: - name: podAntiAffinity type: namedType: io.k8s.api.core.v1.PodAntiAffinity +- name: io.k8s.api.core.v1.AppArmorProfile + map: + fields: + - name: localhostProfile + type: + scalar: string + - name: type + type: + scalar: string + default: "" + unions: + - discriminator: type + fields: + - fieldName: localhostProfile + discriminatorValue: LocalhostProfile - name: io.k8s.api.core.v1.AttachedVolume map: fields: @@ -4460,6 +4759,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -4473,6 +4773,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -4510,6 +4811,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -4528,6 +4830,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -4781,6 +5084,14 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.core.v1.ContainerState default: {} + - name: volumeMounts + type: + list: + elementType: + namedType: io.k8s.api.core.v1.VolumeMountStatus + elementRelationship: associative + keys: + - mountPath - name: io.k8s.api.core.v1.DaemonEndpoint map: fields: @@ -5343,6 +5654,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: ip type: scalar: string + default: "" - name: io.k8s.api.core.v1.HostIP map: fields: @@ -5572,6 +5884,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" elementRelationship: atomic - name: io.k8s.api.core.v1.LocalVolumeSource map: @@ -5766,6 +6079,22 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.core.v1.DaemonEndpoint default: {} +- name: io.k8s.api.core.v1.NodeRuntimeHandler + map: + fields: + - name: features + type: + namedType: io.k8s.api.core.v1.NodeRuntimeHandlerFeatures + - name: name + type: + scalar: string + default: "" +- name: io.k8s.api.core.v1.NodeRuntimeHandlerFeatures + map: + fields: + - name: recursiveReadOnlyMounts + type: + scalar: boolean - name: io.k8s.api.core.v1.NodeSelector map: fields: @@ -5888,6 +6217,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: phase type: scalar: string + - name: runtimeHandlers + type: + list: + elementType: + namedType: io.k8s.api.core.v1.NodeRuntimeHandler + elementRelationship: atomic - name: volumesAttached type: list: @@ -6457,6 +6792,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.core.v1.PodSecurityContext map: fields: + - name: appArmorProfile + type: + namedType: io.k8s.api.core.v1.AppArmorProfile - name: fsGroup type: scalar: numeric @@ -7285,6 +7623,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -7298,6 +7637,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -7314,6 +7654,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string + default: "" - name: optional type: scalar: boolean @@ -7351,6 +7692,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: allowPrivilegeEscalation type: scalar: boolean + - name: appArmorProfile + type: + namedType: io.k8s.api.core.v1.AppArmorProfile - name: capabilities type: namedType: io.k8s.api.core.v1.Capabilities @@ -7546,6 +7890,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: sessionAffinityConfig type: namedType: io.k8s.api.core.v1.SessionAffinityConfig + - name: trafficDistribution + type: + scalar: string - name: type type: scalar: string @@ -7860,17 +8207,40 @@ var schemaYAML = typed.YAMLObject(`types: - name: name type: scalar: string - default: "" -- name: io.k8s.api.core.v1.VolumeMount + default: "" +- name: io.k8s.api.core.v1.VolumeMount + map: + fields: + - name: mountPath + type: + scalar: string + default: "" + - name: mountPropagation + type: + scalar: string + - name: name + type: + scalar: string + default: "" + - name: readOnly + type: + scalar: boolean + - name: recursiveReadOnly + type: + scalar: string + - name: subPath + type: + scalar: string + - name: subPathExpr + type: + scalar: string +- name: io.k8s.api.core.v1.VolumeMountStatus map: fields: - name: mountPath type: scalar: string default: "" - - name: mountPropagation - type: - scalar: string - name: name type: scalar: string @@ -7878,10 +8248,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: readOnly type: scalar: boolean - - name: subPath - type: - scalar: string - - name: subPathExpr + - name: recursiveReadOnly type: scalar: string - name: io.k8s.api.core.v1.VolumeNodeAffinity @@ -11658,6 +12025,119 @@ var schemaYAML = typed.YAMLObject(`types: - name: shareable type: scalar: boolean +- name: io.k8s.api.resource.v1alpha2.DriverAllocationResult + map: + fields: + - name: namedResources + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult + - name: vendorRequestParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.DriverRequests + map: + fields: + - name: driverName + type: + scalar: string + - name: requests + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.ResourceRequest + elementRelationship: atomic + - name: vendorParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult + map: + fields: + - name: name + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha2.NamedResourcesAttribute + map: + fields: + - name: bool + type: + scalar: boolean + - name: int + type: + scalar: numeric + - name: intSlice + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice + - name: name + type: + scalar: string + default: "" + - name: quantity + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: string + type: + scalar: string + - name: stringSlice + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice + - name: version + type: + scalar: string +- name: io.k8s.api.resource.v1alpha2.NamedResourcesFilter + map: + fields: + - name: selector + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha2.NamedResourcesInstance + map: + fields: + - name: attributes + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesAttribute + elementRelationship: atomic + - name: name + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice + map: + fields: + - name: ints + type: + list: + elementType: + scalar: numeric + elementRelationship: atomic +- name: io.k8s.api.resource.v1alpha2.NamedResourcesRequest + map: + fields: + - name: selector + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha2.NamedResourcesResources + map: + fields: + - name: instances + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesInstance + elementRelationship: atomic +- name: io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice + map: + fields: + - name: strings + type: + list: + elementType: + scalar: string + elementRelationship: atomic - name: io.k8s.api.resource.v1alpha2.PodSchedulingContext map: fields: @@ -11741,6 +12221,31 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" +- name: io.k8s.api.resource.v1alpha2.ResourceClaimParameters + map: + fields: + - name: apiVersion + type: + scalar: string + - name: driverRequests + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.DriverRequests + elementRelationship: atomic + - name: generatedFrom + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: shareable + type: + scalar: boolean - name: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference map: fields: @@ -11848,9 +12353,40 @@ var schemaYAML = typed.YAMLObject(`types: - name: parametersRef type: namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference + - name: structuredParameters + type: + scalar: boolean - name: suitableNodes type: namedType: io.k8s.api.core.v1.NodeSelector +- name: io.k8s.api.resource.v1alpha2.ResourceClassParameters + map: + fields: + - name: apiVersion + type: + scalar: string + - name: filters + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.ResourceFilter + elementRelationship: atomic + - name: generatedFrom + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: vendorParameters + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.VendorParameters + elementRelationship: atomic - name: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference map: fields: @@ -11868,6 +12404,15 @@ var schemaYAML = typed.YAMLObject(`types: - name: namespace type: scalar: string +- name: io.k8s.api.resource.v1alpha2.ResourceFilter + map: + fields: + - name: driverName + type: + scalar: string + - name: namedResources + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesFilter - name: io.k8s.api.resource.v1alpha2.ResourceHandle map: fields: @@ -11877,6 +12422,68 @@ var schemaYAML = typed.YAMLObject(`types: - name: driverName type: scalar: string + - name: structuredData + type: + namedType: io.k8s.api.resource.v1alpha2.StructuredResourceHandle +- name: io.k8s.api.resource.v1alpha2.ResourceRequest + map: + fields: + - name: namedResources + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesRequest + - name: vendorParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.ResourceSlice + map: + fields: + - name: apiVersion + type: + scalar: string + - name: driverName + type: + scalar: string + default: "" + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: namedResources + type: + namedType: io.k8s.api.resource.v1alpha2.NamedResourcesResources + - name: nodeName + type: + scalar: string +- name: io.k8s.api.resource.v1alpha2.StructuredResourceHandle + map: + fields: + - name: nodeName + type: + scalar: string + - name: results + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.DriverAllocationResult + elementRelationship: atomic + - name: vendorClaimParameters + type: + namedType: __untyped_atomic_ + - name: vendorClassParameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1alpha2.VendorParameters + map: + fields: + - name: driverName + type: + scalar: string + - name: parameters + type: + namedType: __untyped_atomic_ - name: io.k8s.api.scheduling.v1.PriorityClass map: fields: @@ -12585,6 +13192,83 @@ var schemaYAML = typed.YAMLObject(`types: - name: count type: scalar: numeric +- name: io.k8s.api.storagemigration.v1alpha1.GroupVersionResource + map: + fields: + - name: group + type: + scalar: string + - name: resource + type: + scalar: string + - name: version + type: + scalar: string +- name: io.k8s.api.storagemigration.v1alpha1.MigrationCondition + map: + fields: + - name: lastUpdateTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: message + type: + scalar: string + - name: reason + type: + scalar: string + - name: status + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec + default: {} + - name: status + type: + namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus + default: {} +- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec + map: + fields: + - name: continueToken + type: + scalar: string + - name: resource + type: + namedType: io.k8s.api.storagemigration.v1alpha1.GroupVersionResource + default: {} +- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.api.storagemigration.v1alpha1.MigrationCondition + elementRelationship: associative + keys: + - type + - name: resourceVersion + type: + scalar: string - name: io.k8s.apimachinery.pkg.api.resource.Quantity scalar: untyped - name: io.k8s.apimachinery.pkg.apis.meta.v1.Condition diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresultmodel.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresultmodel.go new file mode 100644 index 00000000000..0c8be0e6aa3 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresultmodel.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// AllocationResultModelApplyConfiguration represents an declarative configuration of the AllocationResultModel type for use +// with apply. +type AllocationResultModelApplyConfiguration struct { + NamedResources *NamedResourcesAllocationResultApplyConfiguration `json:"namedResources,omitempty"` +} + +// AllocationResultModelApplyConfiguration constructs an declarative configuration of the AllocationResultModel type for use with +// apply. +func AllocationResultModel() *AllocationResultModelApplyConfiguration { + return &AllocationResultModelApplyConfiguration{} +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *AllocationResultModelApplyConfiguration) WithNamedResources(value *NamedResourcesAllocationResultApplyConfiguration) *AllocationResultModelApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go new file mode 100644 index 00000000000..a1f082fad7b --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DriverAllocationResultApplyConfiguration represents an declarative configuration of the DriverAllocationResult type for use +// with apply. +type DriverAllocationResultApplyConfiguration struct { + VendorRequestParameters *runtime.RawExtension `json:"vendorRequestParameters,omitempty"` + AllocationResultModelApplyConfiguration `json:",inline"` +} + +// DriverAllocationResultApplyConfiguration constructs an declarative configuration of the DriverAllocationResult type for use with +// apply. +func DriverAllocationResult() *DriverAllocationResultApplyConfiguration { + return &DriverAllocationResultApplyConfiguration{} +} + +// WithVendorRequestParameters sets the VendorRequestParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorRequestParameters field is set to the value of the last call. +func (b *DriverAllocationResultApplyConfiguration) WithVendorRequestParameters(value runtime.RawExtension) *DriverAllocationResultApplyConfiguration { + b.VendorRequestParameters = &value + return b +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *DriverAllocationResultApplyConfiguration) WithNamedResources(value *NamedResourcesAllocationResultApplyConfiguration) *DriverAllocationResultApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go new file mode 100644 index 00000000000..8052915784a --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go @@ -0,0 +1,66 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DriverRequestsApplyConfiguration represents an declarative configuration of the DriverRequests type for use +// with apply. +type DriverRequestsApplyConfiguration struct { + DriverName *string `json:"driverName,omitempty"` + VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"` + Requests []ResourceRequestApplyConfiguration `json:"requests,omitempty"` +} + +// DriverRequestsApplyConfiguration constructs an declarative configuration of the DriverRequests type for use with +// apply. +func DriverRequests() *DriverRequestsApplyConfiguration { + return &DriverRequestsApplyConfiguration{} +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *DriverRequestsApplyConfiguration) WithDriverName(value string) *DriverRequestsApplyConfiguration { + b.DriverName = &value + return b +} + +// WithVendorParameters sets the VendorParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorParameters field is set to the value of the last call. +func (b *DriverRequestsApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *DriverRequestsApplyConfiguration { + b.VendorParameters = &value + return b +} + +// WithRequests adds the given value to the Requests field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Requests field. +func (b *DriverRequestsApplyConfiguration) WithRequests(values ...*ResourceRequestApplyConfiguration) *DriverRequestsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithRequests") + } + b.Requests = append(b.Requests, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesallocationresult.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesallocationresult.go new file mode 100644 index 00000000000..311edbac800 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesallocationresult.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesAllocationResultApplyConfiguration represents an declarative configuration of the NamedResourcesAllocationResult type for use +// with apply. +type NamedResourcesAllocationResultApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// NamedResourcesAllocationResultApplyConfiguration constructs an declarative configuration of the NamedResourcesAllocationResult type for use with +// apply. +func NamedResourcesAllocationResult() *NamedResourcesAllocationResultApplyConfiguration { + return &NamedResourcesAllocationResultApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NamedResourcesAllocationResultApplyConfiguration) WithName(value string) *NamedResourcesAllocationResultApplyConfiguration { + b.Name = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattribute.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattribute.go new file mode 100644 index 00000000000..d9545d054f3 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattribute.go @@ -0,0 +1,100 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resource "k8s.io/apimachinery/pkg/api/resource" +) + +// NamedResourcesAttributeApplyConfiguration represents an declarative configuration of the NamedResourcesAttribute type for use +// with apply. +type NamedResourcesAttributeApplyConfiguration struct { + Name *string `json:"name,omitempty"` + NamedResourcesAttributeValueApplyConfiguration `json:",inline"` +} + +// NamedResourcesAttributeApplyConfiguration constructs an declarative configuration of the NamedResourcesAttribute type for use with +// apply. +func NamedResourcesAttribute() *NamedResourcesAttributeApplyConfiguration { + return &NamedResourcesAttributeApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithName(value string) *NamedResourcesAttributeApplyConfiguration { + b.Name = &value + return b +} + +// WithQuantityValue sets the QuantityValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the QuantityValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithQuantityValue(value resource.Quantity) *NamedResourcesAttributeApplyConfiguration { + b.QuantityValue = &value + return b +} + +// WithBoolValue sets the BoolValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BoolValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithBoolValue(value bool) *NamedResourcesAttributeApplyConfiguration { + b.BoolValue = &value + return b +} + +// WithIntValue sets the IntValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IntValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithIntValue(value int64) *NamedResourcesAttributeApplyConfiguration { + b.IntValue = &value + return b +} + +// WithIntSliceValue sets the IntSliceValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IntSliceValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithIntSliceValue(value *NamedResourcesIntSliceApplyConfiguration) *NamedResourcesAttributeApplyConfiguration { + b.IntSliceValue = value + return b +} + +// WithStringValue sets the StringValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StringValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithStringValue(value string) *NamedResourcesAttributeApplyConfiguration { + b.StringValue = &value + return b +} + +// WithStringSliceValue sets the StringSliceValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StringSliceValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithStringSliceValue(value *NamedResourcesStringSliceApplyConfiguration) *NamedResourcesAttributeApplyConfiguration { + b.StringSliceValue = value + return b +} + +// WithVersionValue sets the VersionValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VersionValue field is set to the value of the last call. +func (b *NamedResourcesAttributeApplyConfiguration) WithVersionValue(value string) *NamedResourcesAttributeApplyConfiguration { + b.VersionValue = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattributevalue.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattributevalue.go new file mode 100644 index 00000000000..e0b19650a92 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattributevalue.go @@ -0,0 +1,97 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resource "k8s.io/apimachinery/pkg/api/resource" +) + +// NamedResourcesAttributeValueApplyConfiguration represents an declarative configuration of the NamedResourcesAttributeValue type for use +// with apply. +type NamedResourcesAttributeValueApplyConfiguration struct { + QuantityValue *resource.Quantity `json:"quantity,omitempty"` + BoolValue *bool `json:"bool,omitempty"` + IntValue *int64 `json:"int,omitempty"` + IntSliceValue *NamedResourcesIntSliceApplyConfiguration `json:"intSlice,omitempty"` + StringValue *string `json:"string,omitempty"` + StringSliceValue *NamedResourcesStringSliceApplyConfiguration `json:"stringSlice,omitempty"` + VersionValue *string `json:"version,omitempty"` +} + +// NamedResourcesAttributeValueApplyConfiguration constructs an declarative configuration of the NamedResourcesAttributeValue type for use with +// apply. +func NamedResourcesAttributeValue() *NamedResourcesAttributeValueApplyConfiguration { + return &NamedResourcesAttributeValueApplyConfiguration{} +} + +// WithQuantityValue sets the QuantityValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the QuantityValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithQuantityValue(value resource.Quantity) *NamedResourcesAttributeValueApplyConfiguration { + b.QuantityValue = &value + return b +} + +// WithBoolValue sets the BoolValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BoolValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithBoolValue(value bool) *NamedResourcesAttributeValueApplyConfiguration { + b.BoolValue = &value + return b +} + +// WithIntValue sets the IntValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IntValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithIntValue(value int64) *NamedResourcesAttributeValueApplyConfiguration { + b.IntValue = &value + return b +} + +// WithIntSliceValue sets the IntSliceValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IntSliceValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithIntSliceValue(value *NamedResourcesIntSliceApplyConfiguration) *NamedResourcesAttributeValueApplyConfiguration { + b.IntSliceValue = value + return b +} + +// WithStringValue sets the StringValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StringValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithStringValue(value string) *NamedResourcesAttributeValueApplyConfiguration { + b.StringValue = &value + return b +} + +// WithStringSliceValue sets the StringSliceValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StringSliceValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithStringSliceValue(value *NamedResourcesStringSliceApplyConfiguration) *NamedResourcesAttributeValueApplyConfiguration { + b.StringSliceValue = value + return b +} + +// WithVersionValue sets the VersionValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VersionValue field is set to the value of the last call. +func (b *NamedResourcesAttributeValueApplyConfiguration) WithVersionValue(value string) *NamedResourcesAttributeValueApplyConfiguration { + b.VersionValue = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesfilter.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesfilter.go new file mode 100644 index 00000000000..e483d8622fa --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesfilter.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesFilterApplyConfiguration represents an declarative configuration of the NamedResourcesFilter type for use +// with apply. +type NamedResourcesFilterApplyConfiguration struct { + Selector *string `json:"selector,omitempty"` +} + +// NamedResourcesFilterApplyConfiguration constructs an declarative configuration of the NamedResourcesFilter type for use with +// apply. +func NamedResourcesFilter() *NamedResourcesFilterApplyConfiguration { + return &NamedResourcesFilterApplyConfiguration{} +} + +// WithSelector sets the Selector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Selector field is set to the value of the last call. +func (b *NamedResourcesFilterApplyConfiguration) WithSelector(value string) *NamedResourcesFilterApplyConfiguration { + b.Selector = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesinstance.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesinstance.go new file mode 100644 index 00000000000..4f01372e4c9 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesinstance.go @@ -0,0 +1,53 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesInstanceApplyConfiguration represents an declarative configuration of the NamedResourcesInstance type for use +// with apply. +type NamedResourcesInstanceApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Attributes []NamedResourcesAttributeApplyConfiguration `json:"attributes,omitempty"` +} + +// NamedResourcesInstanceApplyConfiguration constructs an declarative configuration of the NamedResourcesInstance type for use with +// apply. +func NamedResourcesInstance() *NamedResourcesInstanceApplyConfiguration { + return &NamedResourcesInstanceApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NamedResourcesInstanceApplyConfiguration) WithName(value string) *NamedResourcesInstanceApplyConfiguration { + b.Name = &value + return b +} + +// WithAttributes adds the given value to the Attributes field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Attributes field. +func (b *NamedResourcesInstanceApplyConfiguration) WithAttributes(values ...*NamedResourcesAttributeApplyConfiguration) *NamedResourcesInstanceApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAttributes") + } + b.Attributes = append(b.Attributes, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesintslice.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesintslice.go new file mode 100644 index 00000000000..ea00bffe516 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesintslice.go @@ -0,0 +1,41 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesIntSliceApplyConfiguration represents an declarative configuration of the NamedResourcesIntSlice type for use +// with apply. +type NamedResourcesIntSliceApplyConfiguration struct { + Ints []int64 `json:"ints,omitempty"` +} + +// NamedResourcesIntSliceApplyConfiguration constructs an declarative configuration of the NamedResourcesIntSlice type for use with +// apply. +func NamedResourcesIntSlice() *NamedResourcesIntSliceApplyConfiguration { + return &NamedResourcesIntSliceApplyConfiguration{} +} + +// WithInts adds the given value to the Ints field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Ints field. +func (b *NamedResourcesIntSliceApplyConfiguration) WithInts(values ...int64) *NamedResourcesIntSliceApplyConfiguration { + for i := range values { + b.Ints = append(b.Ints, values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesrequest.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesrequest.go new file mode 100644 index 00000000000..5adfd84ee54 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesrequest.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesRequestApplyConfiguration represents an declarative configuration of the NamedResourcesRequest type for use +// with apply. +type NamedResourcesRequestApplyConfiguration struct { + Selector *string `json:"selector,omitempty"` +} + +// NamedResourcesRequestApplyConfiguration constructs an declarative configuration of the NamedResourcesRequest type for use with +// apply. +func NamedResourcesRequest() *NamedResourcesRequestApplyConfiguration { + return &NamedResourcesRequestApplyConfiguration{} +} + +// WithSelector sets the Selector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Selector field is set to the value of the last call. +func (b *NamedResourcesRequestApplyConfiguration) WithSelector(value string) *NamedResourcesRequestApplyConfiguration { + b.Selector = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesresources.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesresources.go new file mode 100644 index 00000000000..f01ff8699aa --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesresources.go @@ -0,0 +1,44 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesResourcesApplyConfiguration represents an declarative configuration of the NamedResourcesResources type for use +// with apply. +type NamedResourcesResourcesApplyConfiguration struct { + Instances []NamedResourcesInstanceApplyConfiguration `json:"instances,omitempty"` +} + +// NamedResourcesResourcesApplyConfiguration constructs an declarative configuration of the NamedResourcesResources type for use with +// apply. +func NamedResourcesResources() *NamedResourcesResourcesApplyConfiguration { + return &NamedResourcesResourcesApplyConfiguration{} +} + +// WithInstances adds the given value to the Instances field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Instances field. +func (b *NamedResourcesResourcesApplyConfiguration) WithInstances(values ...*NamedResourcesInstanceApplyConfiguration) *NamedResourcesResourcesApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithInstances") + } + b.Instances = append(b.Instances, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesstringslice.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesstringslice.go new file mode 100644 index 00000000000..1e938735469 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesstringslice.go @@ -0,0 +1,41 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// NamedResourcesStringSliceApplyConfiguration represents an declarative configuration of the NamedResourcesStringSlice type for use +// with apply. +type NamedResourcesStringSliceApplyConfiguration struct { + Strings []string `json:"strings,omitempty"` +} + +// NamedResourcesStringSliceApplyConfiguration constructs an declarative configuration of the NamedResourcesStringSlice type for use with +// apply. +func NamedResourcesStringSlice() *NamedResourcesStringSliceApplyConfiguration { + return &NamedResourcesStringSliceApplyConfiguration{} +} + +// WithStrings adds the given value to the Strings field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Strings field. +func (b *NamedResourcesStringSliceApplyConfiguration) WithStrings(values ...string) *NamedResourcesStringSliceApplyConfiguration { + for i := range values { + b.Strings = append(b.Strings, values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 00000000000..ea13570e335 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,272 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ResourceClaimParametersApplyConfiguration represents an declarative configuration of the ResourceClaimParameters type for use +// with apply. +type ResourceClaimParametersApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + GeneratedFrom *ResourceClaimParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"` + Shareable *bool `json:"shareable,omitempty"` + DriverRequests []DriverRequestsApplyConfiguration `json:"driverRequests,omitempty"` +} + +// ResourceClaimParameters constructs an declarative configuration of the ResourceClaimParameters type for use with +// apply. +func ResourceClaimParameters(name, namespace string) *ResourceClaimParametersApplyConfiguration { + b := &ResourceClaimParametersApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("ResourceClaimParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b +} + +// ExtractResourceClaimParameters extracts the applied configuration owned by fieldManager from +// resourceClaimParameters. If no managedFields are found in resourceClaimParameters for fieldManager, a +// ResourceClaimParametersApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// resourceClaimParameters must be a unmodified ResourceClaimParameters API object that was retrieved from the Kubernetes API. +// ExtractResourceClaimParameters provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractResourceClaimParameters(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { + return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "") +} + +// ExtractResourceClaimParametersStatus is the same as ExtractResourceClaimParameters except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractResourceClaimParametersStatus(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { + return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "status") +} + +func extractResourceClaimParameters(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string, subresource string) (*ResourceClaimParametersApplyConfiguration, error) { + b := &ResourceClaimParametersApplyConfiguration{} + err := managedfields.ExtractInto(resourceClaimParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClaimParameters"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(resourceClaimParameters.Name) + b.WithNamespace(resourceClaimParameters.Namespace) + + b.WithKind("ResourceClaimParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithKind(value string) *ResourceClaimParametersApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClaimParametersApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithName(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithGenerateName(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithNamespace(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithUID(value types.UID) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithGeneration(value int64) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ResourceClaimParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ResourceClaimParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ResourceClaimParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ResourceClaimParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ResourceClaimParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithGeneratedFrom sets the GeneratedFrom field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GeneratedFrom field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClaimParametersReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration { + b.GeneratedFrom = value + return b +} + +// WithShareable sets the Shareable field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Shareable field is set to the value of the last call. +func (b *ResourceClaimParametersApplyConfiguration) WithShareable(value bool) *ResourceClaimParametersApplyConfiguration { + b.Shareable = &value + return b +} + +// WithDriverRequests adds the given value to the DriverRequests field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the DriverRequests field. +func (b *ResourceClaimParametersApplyConfiguration) WithDriverRequests(values ...*DriverRequestsApplyConfiguration) *ResourceClaimParametersApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithDriverRequests") + } + b.DriverRequests = append(b.DriverRequests, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go index 724c9e88e00..364fda9d006 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go @@ -36,6 +36,7 @@ type ResourceClassApplyConfiguration struct { DriverName *string `json:"driverName,omitempty"` ParametersRef *ResourceClassParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"` SuitableNodes *corev1.NodeSelectorApplyConfiguration `json:"suitableNodes,omitempty"` + StructuredParameters *bool `json:"structuredParameters,omitempty"` } // ResourceClass constructs an declarative configuration of the ResourceClass type for use with @@ -264,3 +265,11 @@ func (b *ResourceClassApplyConfiguration) WithSuitableNodes(value *corev1.NodeSe b.SuitableNodes = value return b } + +// WithStructuredParameters sets the StructuredParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StructuredParameters field is set to the value of the last call. +func (b *ResourceClassApplyConfiguration) WithStructuredParameters(value bool) *ResourceClassApplyConfiguration { + b.StructuredParameters = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 00000000000..028d0d612d9 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,277 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ResourceClassParametersApplyConfiguration represents an declarative configuration of the ResourceClassParameters type for use +// with apply. +type ResourceClassParametersApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + GeneratedFrom *ResourceClassParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"` + VendorParameters []VendorParametersApplyConfiguration `json:"vendorParameters,omitempty"` + Filters []ResourceFilterApplyConfiguration `json:"filters,omitempty"` +} + +// ResourceClassParameters constructs an declarative configuration of the ResourceClassParameters type for use with +// apply. +func ResourceClassParameters(name, namespace string) *ResourceClassParametersApplyConfiguration { + b := &ResourceClassParametersApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("ResourceClassParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b +} + +// ExtractResourceClassParameters extracts the applied configuration owned by fieldManager from +// resourceClassParameters. If no managedFields are found in resourceClassParameters for fieldManager, a +// ResourceClassParametersApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// resourceClassParameters must be a unmodified ResourceClassParameters API object that was retrieved from the Kubernetes API. +// ExtractResourceClassParameters provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractResourceClassParameters(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { + return extractResourceClassParameters(resourceClassParameters, fieldManager, "") +} + +// ExtractResourceClassParametersStatus is the same as ExtractResourceClassParameters except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractResourceClassParametersStatus(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { + return extractResourceClassParameters(resourceClassParameters, fieldManager, "status") +} + +func extractResourceClassParameters(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string, subresource string) (*ResourceClassParametersApplyConfiguration, error) { + b := &ResourceClassParametersApplyConfiguration{} + err := managedfields.ExtractInto(resourceClassParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClassParameters"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(resourceClassParameters.Name) + b.WithNamespace(resourceClassParameters.Namespace) + + b.WithKind("ResourceClassParameters") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithKind(value string) *ResourceClassParametersApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClassParametersApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithName(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithGenerateName(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithNamespace(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithUID(value types.UID) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithGeneration(value int64) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ResourceClassParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ResourceClassParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ResourceClassParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ResourceClassParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClassParametersApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ResourceClassParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithGeneratedFrom sets the GeneratedFrom field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GeneratedFrom field is set to the value of the last call. +func (b *ResourceClassParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClassParametersReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration { + b.GeneratedFrom = value + return b +} + +// WithVendorParameters adds the given value to the VendorParameters field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the VendorParameters field. +func (b *ResourceClassParametersApplyConfiguration) WithVendorParameters(values ...*VendorParametersApplyConfiguration) *ResourceClassParametersApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithVendorParameters") + } + b.VendorParameters = append(b.VendorParameters, *values[i]) + } + return b +} + +// WithFilters adds the given value to the Filters field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Filters field. +func (b *ResourceClassParametersApplyConfiguration) WithFilters(values ...*ResourceFilterApplyConfiguration) *ResourceClassParametersApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithFilters") + } + b.Filters = append(b.Filters, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go new file mode 100644 index 00000000000..15371b44a92 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// ResourceFilterApplyConfiguration represents an declarative configuration of the ResourceFilter type for use +// with apply. +type ResourceFilterApplyConfiguration struct { + DriverName *string `json:"driverName,omitempty"` + ResourceFilterModelApplyConfiguration `json:",inline"` +} + +// ResourceFilterApplyConfiguration constructs an declarative configuration of the ResourceFilter type for use with +// apply. +func ResourceFilter() *ResourceFilterApplyConfiguration { + return &ResourceFilterApplyConfiguration{} +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *ResourceFilterApplyConfiguration) WithDriverName(value string) *ResourceFilterApplyConfiguration { + b.DriverName = &value + return b +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceFilterApplyConfiguration) WithNamedResources(value *NamedResourcesFilterApplyConfiguration) *ResourceFilterApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefiltermodel.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefiltermodel.go new file mode 100644 index 00000000000..4f8d138f71f --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefiltermodel.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// ResourceFilterModelApplyConfiguration represents an declarative configuration of the ResourceFilterModel type for use +// with apply. +type ResourceFilterModelApplyConfiguration struct { + NamedResources *NamedResourcesFilterApplyConfiguration `json:"namedResources,omitempty"` +} + +// ResourceFilterModelApplyConfiguration constructs an declarative configuration of the ResourceFilterModel type for use with +// apply. +func ResourceFilterModel() *ResourceFilterModelApplyConfiguration { + return &ResourceFilterModelApplyConfiguration{} +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceFilterModelApplyConfiguration) WithNamedResources(value *NamedResourcesFilterApplyConfiguration) *ResourceFilterModelApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go index 028cbaa1a7e..b4f3da735d0 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go @@ -21,8 +21,9 @@ package v1alpha2 // ResourceHandleApplyConfiguration represents an declarative configuration of the ResourceHandle type for use // with apply. type ResourceHandleApplyConfiguration struct { - DriverName *string `json:"driverName,omitempty"` - Data *string `json:"data,omitempty"` + DriverName *string `json:"driverName,omitempty"` + Data *string `json:"data,omitempty"` + StructuredData *StructuredResourceHandleApplyConfiguration `json:"structuredData,omitempty"` } // ResourceHandleApplyConfiguration constructs an declarative configuration of the ResourceHandle type for use with @@ -46,3 +47,11 @@ func (b *ResourceHandleApplyConfiguration) WithData(value string) *ResourceHandl b.Data = &value return b } + +// WithStructuredData sets the StructuredData field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StructuredData field is set to the value of the last call. +func (b *ResourceHandleApplyConfiguration) WithStructuredData(value *StructuredResourceHandleApplyConfiguration) *ResourceHandleApplyConfiguration { + b.StructuredData = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcemodel.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcemodel.go new file mode 100644 index 00000000000..8ad7bdf2306 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcemodel.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// ResourceModelApplyConfiguration represents an declarative configuration of the ResourceModel type for use +// with apply. +type ResourceModelApplyConfiguration struct { + NamedResources *NamedResourcesResourcesApplyConfiguration `json:"namedResources,omitempty"` +} + +// ResourceModelApplyConfiguration constructs an declarative configuration of the ResourceModel type for use with +// apply. +func ResourceModel() *ResourceModelApplyConfiguration { + return &ResourceModelApplyConfiguration{} +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceModelApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *ResourceModelApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go new file mode 100644 index 00000000000..0243d06f894 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// ResourceRequestApplyConfiguration represents an declarative configuration of the ResourceRequest type for use +// with apply. +type ResourceRequestApplyConfiguration struct { + VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"` + ResourceRequestModelApplyConfiguration `json:",inline"` +} + +// ResourceRequestApplyConfiguration constructs an declarative configuration of the ResourceRequest type for use with +// apply. +func ResourceRequest() *ResourceRequestApplyConfiguration { + return &ResourceRequestApplyConfiguration{} +} + +// WithVendorParameters sets the VendorParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorParameters field is set to the value of the last call. +func (b *ResourceRequestApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *ResourceRequestApplyConfiguration { + b.VendorParameters = &value + return b +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceRequestApplyConfiguration) WithNamedResources(value *NamedResourcesRequestApplyConfiguration) *ResourceRequestApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequestmodel.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequestmodel.go new file mode 100644 index 00000000000..35bd1d88fea --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequestmodel.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +// ResourceRequestModelApplyConfiguration represents an declarative configuration of the ResourceRequestModel type for use +// with apply. +type ResourceRequestModelApplyConfiguration struct { + NamedResources *NamedResourcesRequestApplyConfiguration `json:"namedResources,omitempty"` +} + +// ResourceRequestModelApplyConfiguration constructs an declarative configuration of the ResourceRequestModel type for use with +// apply. +func ResourceRequestModel() *ResourceRequestModelApplyConfiguration { + return &ResourceRequestModelApplyConfiguration{} +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceRequestModelApplyConfiguration) WithNamedResources(value *NamedResourcesRequestApplyConfiguration) *ResourceRequestModelApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceslice.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceslice.go new file mode 100644 index 00000000000..ff737ce672e --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceslice.go @@ -0,0 +1,265 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ResourceSliceApplyConfiguration represents an declarative configuration of the ResourceSlice type for use +// with apply. +type ResourceSliceApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + NodeName *string `json:"nodeName,omitempty"` + DriverName *string `json:"driverName,omitempty"` + ResourceModelApplyConfiguration `json:",inline"` +} + +// ResourceSlice constructs an declarative configuration of the ResourceSlice type for use with +// apply. +func ResourceSlice(name string) *ResourceSliceApplyConfiguration { + b := &ResourceSliceApplyConfiguration{} + b.WithName(name) + b.WithKind("ResourceSlice") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b +} + +// ExtractResourceSlice extracts the applied configuration owned by fieldManager from +// resourceSlice. If no managedFields are found in resourceSlice for fieldManager, a +// ResourceSliceApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// resourceSlice must be a unmodified ResourceSlice API object that was retrieved from the Kubernetes API. +// ExtractResourceSlice provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractResourceSlice(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) { + return extractResourceSlice(resourceSlice, fieldManager, "") +} + +// ExtractResourceSliceStatus is the same as ExtractResourceSlice except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractResourceSliceStatus(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) { + return extractResourceSlice(resourceSlice, fieldManager, "status") +} + +func extractResourceSlice(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string, subresource string) (*ResourceSliceApplyConfiguration, error) { + b := &ResourceSliceApplyConfiguration{} + err := managedfields.ExtractInto(resourceSlice, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceSlice"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(resourceSlice.Name) + + b.WithKind("ResourceSlice") + b.WithAPIVersion("resource.k8s.io/v1alpha2") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithKind(value string) *ResourceSliceApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithAPIVersion(value string) *ResourceSliceApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithName(value string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithGenerateName(value string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithNamespace(value string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithUID(value types.UID) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithResourceVersion(value string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithGeneration(value int64) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ResourceSliceApplyConfiguration) WithLabels(entries map[string]string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ResourceSliceApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ResourceSliceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ResourceSliceApplyConfiguration) WithFinalizers(values ...string) *ResourceSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ResourceSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithNodeName sets the NodeName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeName field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithNodeName(value string) *ResourceSliceApplyConfiguration { + b.NodeName = &value + return b +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithDriverName(value string) *ResourceSliceApplyConfiguration { + b.DriverName = &value + return b +} + +// WithNamedResources sets the NamedResources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamedResources field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *ResourceSliceApplyConfiguration { + b.NamedResources = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go new file mode 100644 index 00000000000..e6efcbfef3c --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go @@ -0,0 +1,75 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// StructuredResourceHandleApplyConfiguration represents an declarative configuration of the StructuredResourceHandle type for use +// with apply. +type StructuredResourceHandleApplyConfiguration struct { + VendorClassParameters *runtime.RawExtension `json:"vendorClassParameters,omitempty"` + VendorClaimParameters *runtime.RawExtension `json:"vendorClaimParameters,omitempty"` + NodeName *string `json:"nodeName,omitempty"` + Results []DriverAllocationResultApplyConfiguration `json:"results,omitempty"` +} + +// StructuredResourceHandleApplyConfiguration constructs an declarative configuration of the StructuredResourceHandle type for use with +// apply. +func StructuredResourceHandle() *StructuredResourceHandleApplyConfiguration { + return &StructuredResourceHandleApplyConfiguration{} +} + +// WithVendorClassParameters sets the VendorClassParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorClassParameters field is set to the value of the last call. +func (b *StructuredResourceHandleApplyConfiguration) WithVendorClassParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration { + b.VendorClassParameters = &value + return b +} + +// WithVendorClaimParameters sets the VendorClaimParameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VendorClaimParameters field is set to the value of the last call. +func (b *StructuredResourceHandleApplyConfiguration) WithVendorClaimParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration { + b.VendorClaimParameters = &value + return b +} + +// WithNodeName sets the NodeName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeName field is set to the value of the last call. +func (b *StructuredResourceHandleApplyConfiguration) WithNodeName(value string) *StructuredResourceHandleApplyConfiguration { + b.NodeName = &value + return b +} + +// WithResults adds the given value to the Results field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Results field. +func (b *StructuredResourceHandleApplyConfiguration) WithResults(values ...*DriverAllocationResultApplyConfiguration) *StructuredResourceHandleApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithResults") + } + b.Results = append(b.Results, *values[i]) + } + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go new file mode 100644 index 00000000000..f7a8ff9ecef --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// VendorParametersApplyConfiguration represents an declarative configuration of the VendorParameters type for use +// with apply. +type VendorParametersApplyConfiguration struct { + DriverName *string `json:"driverName,omitempty"` + Parameters *runtime.RawExtension `json:"parameters,omitempty"` +} + +// VendorParametersApplyConfiguration constructs an declarative configuration of the VendorParameters type for use with +// apply. +func VendorParameters() *VendorParametersApplyConfiguration { + return &VendorParametersApplyConfiguration{} +} + +// WithDriverName sets the DriverName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DriverName field is set to the value of the last call. +func (b *VendorParametersApplyConfiguration) WithDriverName(value string) *VendorParametersApplyConfiguration { + b.DriverName = &value + return b +} + +// WithParameters sets the Parameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Parameters field is set to the value of the last call. +func (b *VendorParametersApplyConfiguration) WithParameters(value runtime.RawExtension) *VendorParametersApplyConfiguration { + b.Parameters = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/groupversionresource.go b/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/groupversionresource.go new file mode 100644 index 00000000000..c733ac5c04b --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/groupversionresource.go @@ -0,0 +1,57 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// GroupVersionResourceApplyConfiguration represents an declarative configuration of the GroupVersionResource type for use +// with apply. +type GroupVersionResourceApplyConfiguration struct { + Group *string `json:"group,omitempty"` + Version *string `json:"version,omitempty"` + Resource *string `json:"resource,omitempty"` +} + +// GroupVersionResourceApplyConfiguration constructs an declarative configuration of the GroupVersionResource type for use with +// apply. +func GroupVersionResource() *GroupVersionResourceApplyConfiguration { + return &GroupVersionResourceApplyConfiguration{} +} + +// WithGroup sets the Group field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Group field is set to the value of the last call. +func (b *GroupVersionResourceApplyConfiguration) WithGroup(value string) *GroupVersionResourceApplyConfiguration { + b.Group = &value + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *GroupVersionResourceApplyConfiguration) WithVersion(value string) *GroupVersionResourceApplyConfiguration { + b.Version = &value + return b +} + +// WithResource sets the Resource field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resource field is set to the value of the last call. +func (b *GroupVersionResourceApplyConfiguration) WithResource(value string) *GroupVersionResourceApplyConfiguration { + b.Resource = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/migrationcondition.go b/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/migrationcondition.go new file mode 100644 index 00000000000..d0f863446ee --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/migrationcondition.go @@ -0,0 +1,81 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" + v1alpha1 "k8s.io/api/storagemigration/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// MigrationConditionApplyConfiguration represents an declarative configuration of the MigrationCondition type for use +// with apply. +type MigrationConditionApplyConfiguration struct { + Type *v1alpha1.MigrationConditionType `json:"type,omitempty"` + Status *v1.ConditionStatus `json:"status,omitempty"` + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` +} + +// MigrationConditionApplyConfiguration constructs an declarative configuration of the MigrationCondition type for use with +// apply. +func MigrationCondition() *MigrationConditionApplyConfiguration { + return &MigrationConditionApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *MigrationConditionApplyConfiguration) WithType(value v1alpha1.MigrationConditionType) *MigrationConditionApplyConfiguration { + b.Type = &value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *MigrationConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *MigrationConditionApplyConfiguration { + b.Status = &value + return b +} + +// WithLastUpdateTime sets the LastUpdateTime field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastUpdateTime field is set to the value of the last call. +func (b *MigrationConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *MigrationConditionApplyConfiguration { + b.LastUpdateTime = &value + return b +} + +// WithReason sets the Reason field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Reason field is set to the value of the last call. +func (b *MigrationConditionApplyConfiguration) WithReason(value string) *MigrationConditionApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessage sets the Message field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Message field is set to the value of the last call. +func (b *MigrationConditionApplyConfiguration) WithMessage(value string) *MigrationConditionApplyConfiguration { + b.Message = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigration.go b/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigration.go new file mode 100644 index 00000000000..cc57b2b1268 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigration.go @@ -0,0 +1,256 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// StorageVersionMigrationApplyConfiguration represents an declarative configuration of the StorageVersionMigration type for use +// with apply. +type StorageVersionMigrationApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *StorageVersionMigrationSpecApplyConfiguration `json:"spec,omitempty"` + Status *StorageVersionMigrationStatusApplyConfiguration `json:"status,omitempty"` +} + +// StorageVersionMigration constructs an declarative configuration of the StorageVersionMigration type for use with +// apply. +func StorageVersionMigration(name string) *StorageVersionMigrationApplyConfiguration { + b := &StorageVersionMigrationApplyConfiguration{} + b.WithName(name) + b.WithKind("StorageVersionMigration") + b.WithAPIVersion("storagemigration.k8s.io/v1alpha1") + return b +} + +// ExtractStorageVersionMigration extracts the applied configuration owned by fieldManager from +// storageVersionMigration. If no managedFields are found in storageVersionMigration for fieldManager, a +// StorageVersionMigrationApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// storageVersionMigration must be a unmodified StorageVersionMigration API object that was retrieved from the Kubernetes API. +// ExtractStorageVersionMigration provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractStorageVersionMigration(storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) { + return extractStorageVersionMigration(storageVersionMigration, fieldManager, "") +} + +// ExtractStorageVersionMigrationStatus is the same as ExtractStorageVersionMigration except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractStorageVersionMigrationStatus(storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string) (*StorageVersionMigrationApplyConfiguration, error) { + return extractStorageVersionMigration(storageVersionMigration, fieldManager, "status") +} + +func extractStorageVersionMigration(storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, fieldManager string, subresource string) (*StorageVersionMigrationApplyConfiguration, error) { + b := &StorageVersionMigrationApplyConfiguration{} + err := managedfields.ExtractInto(storageVersionMigration, internal.Parser().Type("io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(storageVersionMigration.Name) + + b.WithKind("StorageVersionMigration") + b.WithAPIVersion("storagemigration.k8s.io/v1alpha1") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithKind(value string) *StorageVersionMigrationApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithAPIVersion(value string) *StorageVersionMigrationApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithName(value string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithGenerateName(value string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithNamespace(value string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithUID(value types.UID) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithResourceVersion(value string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithGeneration(value int64) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *StorageVersionMigrationApplyConfiguration) WithLabels(entries map[string]string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *StorageVersionMigrationApplyConfiguration) WithAnnotations(entries map[string]string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *StorageVersionMigrationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *StorageVersionMigrationApplyConfiguration) WithFinalizers(values ...string) *StorageVersionMigrationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *StorageVersionMigrationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithSpec(value *StorageVersionMigrationSpecApplyConfiguration) *StorageVersionMigrationApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *StorageVersionMigrationApplyConfiguration) WithStatus(value *StorageVersionMigrationStatusApplyConfiguration) *StorageVersionMigrationApplyConfiguration { + b.Status = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationspec.go b/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationspec.go new file mode 100644 index 00000000000..6c7c5b2645f --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationspec.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// StorageVersionMigrationSpecApplyConfiguration represents an declarative configuration of the StorageVersionMigrationSpec type for use +// with apply. +type StorageVersionMigrationSpecApplyConfiguration struct { + Resource *GroupVersionResourceApplyConfiguration `json:"resource,omitempty"` + ContinueToken *string `json:"continueToken,omitempty"` +} + +// StorageVersionMigrationSpecApplyConfiguration constructs an declarative configuration of the StorageVersionMigrationSpec type for use with +// apply. +func StorageVersionMigrationSpec() *StorageVersionMigrationSpecApplyConfiguration { + return &StorageVersionMigrationSpecApplyConfiguration{} +} + +// WithResource sets the Resource field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resource field is set to the value of the last call. +func (b *StorageVersionMigrationSpecApplyConfiguration) WithResource(value *GroupVersionResourceApplyConfiguration) *StorageVersionMigrationSpecApplyConfiguration { + b.Resource = value + return b +} + +// WithContinueToken sets the ContinueToken field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ContinueToken field is set to the value of the last call. +func (b *StorageVersionMigrationSpecApplyConfiguration) WithContinueToken(value string) *StorageVersionMigrationSpecApplyConfiguration { + b.ContinueToken = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationstatus.go b/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationstatus.go new file mode 100644 index 00000000000..b8d397548a5 --- /dev/null +++ b/vendor/k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1/storageversionmigrationstatus.go @@ -0,0 +1,53 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// StorageVersionMigrationStatusApplyConfiguration represents an declarative configuration of the StorageVersionMigrationStatus type for use +// with apply. +type StorageVersionMigrationStatusApplyConfiguration struct { + Conditions []MigrationConditionApplyConfiguration `json:"conditions,omitempty"` + ResourceVersion *string `json:"resourceVersion,omitempty"` +} + +// StorageVersionMigrationStatusApplyConfiguration constructs an declarative configuration of the StorageVersionMigrationStatus type for use with +// apply. +func StorageVersionMigrationStatus() *StorageVersionMigrationStatusApplyConfiguration { + return &StorageVersionMigrationStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *StorageVersionMigrationStatusApplyConfiguration) WithConditions(values ...*MigrationConditionApplyConfiguration) *StorageVersionMigrationStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *StorageVersionMigrationStatusApplyConfiguration) WithResourceVersion(value string) *StorageVersionMigrationStatusApplyConfiguration { + b.ResourceVersion = &value + return b +} diff --git a/vendor/k8s.io/client-go/discovery/aggregated_discovery.go b/vendor/k8s.io/client-go/discovery/aggregated_discovery.go index f72c42051b9..f5eaaedab3a 100644 --- a/vendor/k8s.io/client-go/discovery/aggregated_discovery.go +++ b/vendor/k8s.io/client-go/discovery/aggregated_discovery.go @@ -19,7 +19,8 @@ package discovery import ( "fmt" - apidiscovery "k8s.io/api/apidiscovery/v2beta1" + apidiscovery "k8s.io/api/apidiscovery/v2" + apidiscoveryv2beta1 "k8s.io/api/apidiscovery/v2beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -154,3 +155,124 @@ func convertAPISubresource(parent metav1.APIResource, in apidiscovery.APISubreso result.Verbs = in.Verbs return result, nil } + +// Please note the functions below will be removed in v1.33. They facilitate conversion +// between the deprecated type apidiscoveryv2beta1.APIGroupDiscoveryList. + +// SplitGroupsAndResourcesV2Beta1 transforms "aggregated" discovery top-level structure into +// the previous "unaggregated" discovery groups and resources. +// Deprecated: Please use SplitGroupsAndResources +func SplitGroupsAndResourcesV2Beta1(aggregatedGroups apidiscoveryv2beta1.APIGroupDiscoveryList) ( + *metav1.APIGroupList, + map[schema.GroupVersion]*metav1.APIResourceList, + map[schema.GroupVersion]error) { + // Aggregated group list will contain the entirety of discovery, including + // groups, versions, and resources. GroupVersions marked "stale" are failed. + groups := []*metav1.APIGroup{} + failedGVs := map[schema.GroupVersion]error{} + resourcesByGV := map[schema.GroupVersion]*metav1.APIResourceList{} + for _, aggGroup := range aggregatedGroups.Items { + group, resources, failed := convertAPIGroupv2beta1(aggGroup) + groups = append(groups, group) + for gv, resourceList := range resources { + resourcesByGV[gv] = resourceList + } + for gv, err := range failed { + failedGVs[gv] = err + } + } + // Transform slice of groups to group list before returning. + groupList := &metav1.APIGroupList{} + groupList.Groups = make([]metav1.APIGroup, 0, len(groups)) + for _, group := range groups { + groupList.Groups = append(groupList.Groups, *group) + } + return groupList, resourcesByGV, failedGVs +} + +// convertAPIGroupv2beta1 tranforms an "aggregated" APIGroupDiscovery to an "legacy" APIGroup, +// also returning the map of APIResourceList for resources within GroupVersions. +func convertAPIGroupv2beta1(g apidiscoveryv2beta1.APIGroupDiscovery) ( + *metav1.APIGroup, + map[schema.GroupVersion]*metav1.APIResourceList, + map[schema.GroupVersion]error) { + // Iterate through versions to convert to group and resources. + group := &metav1.APIGroup{} + gvResources := map[schema.GroupVersion]*metav1.APIResourceList{} + failedGVs := map[schema.GroupVersion]error{} + group.Name = g.ObjectMeta.Name + for _, v := range g.Versions { + gv := schema.GroupVersion{Group: g.Name, Version: v.Version} + if v.Freshness == apidiscoveryv2beta1.DiscoveryFreshnessStale { + failedGVs[gv] = StaleGroupVersionError{gv: gv} + continue + } + version := metav1.GroupVersionForDiscovery{} + version.GroupVersion = gv.String() + version.Version = v.Version + group.Versions = append(group.Versions, version) + // PreferredVersion is first non-stale Version + if group.PreferredVersion == (metav1.GroupVersionForDiscovery{}) { + group.PreferredVersion = version + } + resourceList := &metav1.APIResourceList{} + resourceList.GroupVersion = gv.String() + for _, r := range v.Resources { + resource, err := convertAPIResourcev2beta1(r) + if err == nil { + resourceList.APIResources = append(resourceList.APIResources, resource) + } + // Subresources field in new format get transformed into full APIResources. + // It is possible a partial result with an error was returned to be used + // as the parent resource for the subresource. + for _, subresource := range r.Subresources { + sr, err := convertAPISubresourcev2beta1(resource, subresource) + if err == nil { + resourceList.APIResources = append(resourceList.APIResources, sr) + } + } + } + gvResources[gv] = resourceList + } + return group, gvResources, failedGVs +} + +// convertAPIResource tranforms a APIResourceDiscovery to an APIResource. We are +// resilient to missing GVK, since this resource might be the parent resource +// for a subresource. If the parent is missing a GVK, it is not returned in +// discovery, and the subresource MUST have the GVK. +func convertAPIResourcev2beta1(in apidiscoveryv2beta1.APIResourceDiscovery) (metav1.APIResource, error) { + result := metav1.APIResource{ + Name: in.Resource, + SingularName: in.SingularResource, + Namespaced: in.Scope == apidiscoveryv2beta1.ScopeNamespace, + Verbs: in.Verbs, + ShortNames: in.ShortNames, + Categories: in.Categories, + } + // Can return partial result with error, which can be the parent for a + // subresource. Do not add this result to the returned discovery resources. + if in.ResponseKind == nil || (*in.ResponseKind) == emptyKind { + return result, fmt.Errorf("discovery resource %s missing GVK", in.Resource) + } + result.Group = in.ResponseKind.Group + result.Version = in.ResponseKind.Version + result.Kind = in.ResponseKind.Kind + return result, nil +} + +// convertAPISubresource tranforms a APISubresourceDiscovery to an APIResource. +func convertAPISubresourcev2beta1(parent metav1.APIResource, in apidiscoveryv2beta1.APISubresourceDiscovery) (metav1.APIResource, error) { + result := metav1.APIResource{} + if in.ResponseKind == nil || (*in.ResponseKind) == emptyKind { + return result, fmt.Errorf("subresource %s/%s missing GVK", parent.Name, in.Subresource) + } + result.Name = fmt.Sprintf("%s/%s", parent.Name, in.Subresource) + result.SingularName = parent.SingularName + result.Namespaced = parent.Namespaced + result.Group = in.ResponseKind.Group + result.Version = in.ResponseKind.Version + result.Kind = in.ResponseKind.Kind + result.Verbs = in.Verbs + return result, nil +} diff --git a/vendor/k8s.io/client-go/discovery/discovery_client.go b/vendor/k8s.io/client-go/discovery/discovery_client.go index df0e0f9974e..ef14fee5f09 100644 --- a/vendor/k8s.io/client-go/discovery/discovery_client.go +++ b/vendor/k8s.io/client-go/discovery/discovery_client.go @@ -33,7 +33,8 @@ import ( "github.com/golang/protobuf/proto" openapi_v2 "github.com/google/gnostic-models/openapiv2" - apidiscovery "k8s.io/api/apidiscovery/v2beta1" + apidiscoveryv2 "k8s.io/api/apidiscovery/v2" + apidiscoveryv2beta1 "k8s.io/api/apidiscovery/v2beta1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -64,12 +65,14 @@ const ( // MUST be ordered (g, v, as) for server in "Accept" header (BUT we are resilient // to ordering when comparing returned values in "Content-Type" header). AcceptV2Beta1 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList" + AcceptV2 = runtime.ContentTypeJSON + ";" + "g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList" // Prioritize aggregated discovery by placing first in the order of discovery accept types. - acceptDiscoveryFormats = AcceptV2Beta1 + "," + AcceptV1 + acceptDiscoveryFormats = AcceptV2 + "," + AcceptV2Beta1 + "," + AcceptV1 ) // Aggregated discovery content-type GVK. var v2Beta1GVK = schema.GroupVersionKind{Group: "apidiscovery.k8s.io", Version: "v2beta1", Kind: "APIGroupDiscoveryList"} +var v2GVK = schema.GroupVersionKind{Group: "apidiscovery.k8s.io", Version: "v2", Kind: "APIGroupDiscoveryList"} // DiscoveryInterface holds the methods that discover server-supported API groups, // versions and resources. @@ -265,13 +268,20 @@ func (d *DiscoveryClient) downloadLegacy() ( var resourcesByGV map[schema.GroupVersion]*metav1.APIResourceList // Based on the content-type server responded with: aggregated or unaggregated. - if isGVK, _ := ContentTypeIsGVK(responseContentType, v2Beta1GVK); isGVK { - var aggregatedDiscovery apidiscovery.APIGroupDiscoveryList + if isGVK, _ := ContentTypeIsGVK(responseContentType, v2GVK); isGVK { + var aggregatedDiscovery apidiscoveryv2.APIGroupDiscoveryList err = json.Unmarshal(body, &aggregatedDiscovery) if err != nil { return nil, nil, nil, err } apiGroupList, resourcesByGV, failedGVs = SplitGroupsAndResources(aggregatedDiscovery) + } else if isGVK, _ := ContentTypeIsGVK(responseContentType, v2Beta1GVK); isGVK { + var aggregatedDiscovery apidiscoveryv2beta1.APIGroupDiscoveryList + err = json.Unmarshal(body, &aggregatedDiscovery) + if err != nil { + return nil, nil, nil, err + } + apiGroupList, resourcesByGV, failedGVs = SplitGroupsAndResourcesV2Beta1(aggregatedDiscovery) } else { // Default is unaggregated discovery v1. var v metav1.APIVersions @@ -317,13 +327,20 @@ func (d *DiscoveryClient) downloadAPIs() ( failedGVs := map[schema.GroupVersion]error{} var resourcesByGV map[schema.GroupVersion]*metav1.APIResourceList // Based on the content-type server responded with: aggregated or unaggregated. - if isGVK, _ := ContentTypeIsGVK(responseContentType, v2Beta1GVK); isGVK { - var aggregatedDiscovery apidiscovery.APIGroupDiscoveryList + if isGVK, _ := ContentTypeIsGVK(responseContentType, v2GVK); isGVK { + var aggregatedDiscovery apidiscoveryv2.APIGroupDiscoveryList err = json.Unmarshal(body, &aggregatedDiscovery) if err != nil { return nil, nil, nil, err } apiGroupList, resourcesByGV, failedGVs = SplitGroupsAndResources(aggregatedDiscovery) + } else if isGVK, _ := ContentTypeIsGVK(responseContentType, v2Beta1GVK); isGVK { + var aggregatedDiscovery apidiscoveryv2beta1.APIGroupDiscoveryList + err = json.Unmarshal(body, &aggregatedDiscovery) + if err != nil { + return nil, nil, nil, err + } + apiGroupList, resourcesByGV, failedGVs = SplitGroupsAndResourcesV2Beta1(aggregatedDiscovery) } else { // Default is unaggregated discovery v1. err = json.Unmarshal(body, apiGroupList) diff --git a/vendor/k8s.io/client-go/features/envvar.go b/vendor/k8s.io/client-go/features/envvar.go new file mode 100644 index 00000000000..f9edfdf0d91 --- /dev/null +++ b/vendor/k8s.io/client-go/features/envvar.go @@ -0,0 +1,138 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 ( + "fmt" + "os" + "strconv" + "sync" + "sync/atomic" + + "k8s.io/apimachinery/pkg/util/naming" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/klog/v2" +) + +// internalPackages are packages that ignored when creating a name for featureGates. These packages are in the common +// call chains, so they'd be unhelpful as names. +var internalPackages = []string{"k8s.io/client-go/features/envvar.go"} + +var _ Gates = &envVarFeatureGates{} + +// newEnvVarFeatureGates creates a feature gate that allows for registration +// of features and checking if the features are enabled. +// +// On the first call to Enabled, the effective state of all known features is loaded from +// environment variables. The environment variable read for a given feature is formed by +// concatenating the prefix "KUBE_FEATURE_" with the feature's name. +// +// For example, if you have a feature named "MyFeature" +// setting an environmental variable "KUBE_FEATURE_MyFeature" +// will allow you to configure the state of that feature. +// +// Please note that environmental variables can only be set to the boolean value. +// Incorrect values will be ignored and logged. +func newEnvVarFeatureGates(features map[Feature]FeatureSpec) *envVarFeatureGates { + known := map[Feature]FeatureSpec{} + for name, spec := range features { + known[name] = spec + } + + fg := &envVarFeatureGates{ + callSiteName: naming.GetNameFromCallsite(internalPackages...), + known: known, + } + fg.enabled.Store(map[Feature]bool{}) + + return fg +} + +// envVarFeatureGates implements Gates and allows for feature registration. +type envVarFeatureGates struct { + // callSiteName holds the name of the file + // that created this instance + callSiteName string + + // readEnvVarsOnce guards reading environmental variables + readEnvVarsOnce sync.Once + + // known holds known feature gates + known map[Feature]FeatureSpec + + // enabled holds a map[Feature]bool + // with values explicitly set via env var + enabled atomic.Value + + // readEnvVars holds the boolean value which + // indicates whether readEnvVarsOnce has been called. + readEnvVars atomic.Bool +} + +// Enabled returns true if the key is enabled. If the key is not known, this call will panic. +func (f *envVarFeatureGates) Enabled(key Feature) bool { + if v, ok := f.getEnabledMapFromEnvVar()[key]; ok { + return v + } + if v, ok := f.known[key]; ok { + return v.Default + } + panic(fmt.Errorf("feature %q is not registered in FeatureGates %q", key, f.callSiteName)) +} + +// getEnabledMapFromEnvVar will fill the enabled map on the first call. +// This is the only time a known feature can be set to a value +// read from the corresponding environmental variable. +func (f *envVarFeatureGates) getEnabledMapFromEnvVar() map[Feature]bool { + f.readEnvVarsOnce.Do(func() { + featureGatesState := map[Feature]bool{} + for feature, featureSpec := range f.known { + featureState, featureStateSet := os.LookupEnv(fmt.Sprintf("KUBE_FEATURE_%s", feature)) + if !featureStateSet { + continue + } + boolVal, boolErr := strconv.ParseBool(featureState) + switch { + case boolErr != nil: + utilruntime.HandleError(fmt.Errorf("cannot set feature gate %q to %q, due to %v", feature, featureState, boolErr)) + case featureSpec.LockToDefault: + if boolVal != featureSpec.Default { + utilruntime.HandleError(fmt.Errorf("cannot set feature gate %q to %q, feature is locked to %v", feature, featureState, featureSpec.Default)) + break + } + featureGatesState[feature] = featureSpec.Default + default: + featureGatesState[feature] = boolVal + } + } + f.enabled.Store(featureGatesState) + f.readEnvVars.Store(true) + + for feature, featureSpec := range f.known { + if featureState, ok := featureGatesState[feature]; ok { + klog.V(1).InfoS("Feature gate updated state", "feature", feature, "enabled", featureState) + continue + } + klog.V(1).InfoS("Feature gate default state", "feature", feature, "enabled", featureSpec.Default) + } + }) + return f.enabled.Load().(map[Feature]bool) +} + +func (f *envVarFeatureGates) hasAlreadyReadEnvVar() bool { + return f.readEnvVars.Load() +} diff --git a/vendor/k8s.io/client-go/features/features.go b/vendor/k8s.io/client-go/features/features.go new file mode 100644 index 00000000000..afb67f509eb --- /dev/null +++ b/vendor/k8s.io/client-go/features/features.go @@ -0,0 +1,143 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 ( + "errors" + + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "sync/atomic" +) + +// NOTE: types Feature, FeatureSpec, prerelease (and its values) +// were duplicated from the component-base repository +// +// for more information please refer to https://docs.google.com/document/d/1g9BGCRw-7ucUxO6OtCWbb3lfzUGA_uU9178wLdXAIfs + +const ( + // Values for PreRelease. + Alpha = prerelease("ALPHA") + Beta = prerelease("BETA") + GA = prerelease("") + + // Deprecated + Deprecated = prerelease("DEPRECATED") +) + +type prerelease string + +type Feature string + +type FeatureSpec struct { + // Default is the default enablement state for the feature + Default bool + // LockToDefault indicates that the feature is locked to its default and cannot be changed + LockToDefault bool + // PreRelease indicates the maturity level of the feature + PreRelease prerelease +} + +// Gates indicates whether a given feature is enabled or not. +type Gates interface { + // Enabled returns true if the key is enabled. + Enabled(key Feature) bool +} + +// Registry represents an external feature gates registry. +type Registry interface { + // Add adds existing feature gates to the provided registry. + // + // As of today, this method is used by AddFeaturesToExistingFeatureGates and + // ReplaceFeatureGates to take control of the features exposed by this library. + Add(map[Feature]FeatureSpec) error +} + +// FeatureGates returns the feature gates exposed by this library. +// +// By default, only the default features gates will be returned. +// The default implementation allows controlling the features +// via environmental variables. +// For example, if you have a feature named "MyFeature" +// setting an environmental variable "KUBE_FEATURE_MyFeature" +// will allow you to configure the state of that feature. +// +// Please note that the actual set of the feature gates +// might be overwritten by calling ReplaceFeatureGates method. +func FeatureGates() Gates { + return featureGates.Load().(*featureGatesWrapper).Gates +} + +// AddFeaturesToExistingFeatureGates adds the default feature gates to the provided registry. +// Usually this function is combined with ReplaceFeatureGates to take control of the +// features exposed by this library. +func AddFeaturesToExistingFeatureGates(registry Registry) error { + return registry.Add(defaultKubernetesFeatureGates) +} + +// ReplaceFeatureGates overwrites the default implementation of the feature gates +// used by this library. +// +// Useful for binaries that would like to have full control of the features +// exposed by this library, such as allowing consumers of a binary +// to interact with the features via a command line flag. +// +// For example: +// +// // first, register client-go's features to your registry. +// clientgofeaturegate.AddFeaturesToExistingFeatureGates(utilfeature.DefaultMutableFeatureGate) +// // then replace client-go's feature gates implementation with your implementation +// clientgofeaturegate.ReplaceFeatureGates(utilfeature.DefaultMutableFeatureGate) +func ReplaceFeatureGates(newFeatureGates Gates) { + if replaceFeatureGatesWithWarningIndicator(newFeatureGates) { + utilruntime.HandleError(errors.New("the default feature gates implementation has already been used and now it's being overwritten. This might lead to unexpected behaviour. Check your initialization order")) + } +} + +func replaceFeatureGatesWithWarningIndicator(newFeatureGates Gates) bool { + shouldProduceWarning := false + + if defaultFeatureGates, ok := FeatureGates().(*envVarFeatureGates); ok { + if defaultFeatureGates.hasAlreadyReadEnvVar() { + shouldProduceWarning = true + } + } + wrappedFeatureGates := &featureGatesWrapper{newFeatureGates} + featureGates.Store(wrappedFeatureGates) + + return shouldProduceWarning +} + +func init() { + envVarGates := newEnvVarFeatureGates(defaultKubernetesFeatureGates) + + wrappedFeatureGates := &featureGatesWrapper{envVarGates} + featureGates.Store(wrappedFeatureGates) +} + +// featureGatesWrapper a thin wrapper to satisfy featureGates variable (atomic.Value). +// That is, all calls to Store for a given Value must use values of the same concrete type. +type featureGatesWrapper struct { + Gates +} + +var ( + // featureGates is a shared global FeatureGates. + // + // Top-level commands/options setup that needs to modify this feature gates + // should use AddFeaturesToExistingFeatureGates followed by ReplaceFeatureGates. + featureGates = &atomic.Value{} +) diff --git a/vendor/k8s.io/client-go/features/known_features.go b/vendor/k8s.io/client-go/features/known_features.go new file mode 100644 index 00000000000..0c972a46fd5 --- /dev/null +++ b/vendor/k8s.io/client-go/features/known_features.go @@ -0,0 +1,54 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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 + +const ( + // Every feature gate should add method here following this template: + // + // // owner: @username + // // alpha: v1.4 + // MyFeature featuregate.Feature = "MyFeature" + // + // Feature gates should be listed in alphabetical, case-sensitive + // (upper before any lower case character) order. This reduces the risk + // of code conflicts because changes are more likely to be scattered + // across the file. + + // owner: @p0lyn0mial + // beta: v1.30 + // + // Allow the client to get a stream of individual items instead of chunking from the server. + // + // NOTE: + // The feature is disabled in Beta by default because + // it will only be turned on for selected control plane component(s). + WatchListClient Feature = "WatchListClient" + + // owner: @nilekhc + // alpha: v1.30 + InformerResourceVersion Feature = "InformerResourceVersion" +) + +// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys. +// +// To add a new feature, define a key for it above and add it here. +// After registering with the binary, the features are, by default, controllable using environment variables. +// For more details, please see envVarFeatureGates implementation. +var defaultKubernetesFeatureGates = map[Feature]FeatureSpec{ + WatchListClient: {Default: false, PreRelease: Beta}, + InformerResourceVersion: {Default: false, PreRelease: Alpha}, +} diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/v1/interface.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1/interface.go index 1ecae9ecf70..08769d3cca4 100644 --- a/vendor/k8s.io/client-go/informers/admissionregistration/v1/interface.go +++ b/vendor/k8s.io/client-go/informers/admissionregistration/v1/interface.go @@ -26,6 +26,10 @@ import ( type Interface interface { // MutatingWebhookConfigurations returns a MutatingWebhookConfigurationInformer. MutatingWebhookConfigurations() MutatingWebhookConfigurationInformer + // ValidatingAdmissionPolicies returns a ValidatingAdmissionPolicyInformer. + ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInformer + // ValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindingInformer. + ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInformer // ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer. ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer } @@ -46,6 +50,16 @@ func (v *version) MutatingWebhookConfigurations() MutatingWebhookConfigurationIn return &mutatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } +// ValidatingAdmissionPolicies returns a ValidatingAdmissionPolicyInformer. +func (v *version) ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInformer { + return &validatingAdmissionPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// ValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindingInformer. +func (v *version) ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInformer { + return &validatingAdmissionPolicyBindingInformer{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/v1/validatingadmissionpolicy.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingadmissionpolicy.go new file mode 100644 index 00000000000..eaf9414e269 --- /dev/null +++ b/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingadmissionpolicy.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + time "time" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "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/admissionregistration/v1" + cache "k8s.io/client-go/tools/cache" +) + +// ValidatingAdmissionPolicyInformer provides access to a shared informer and lister for +// ValidatingAdmissionPolicies. +type ValidatingAdmissionPolicyInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.ValidatingAdmissionPolicyLister +} + +type validatingAdmissionPolicyInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewValidatingAdmissionPolicyInformer constructs a new informer for ValidatingAdmissionPolicy 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 NewValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredValidatingAdmissionPolicyInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredValidatingAdmissionPolicyInformer constructs a new informer for ValidatingAdmissionPolicy 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 NewFilteredValidatingAdmissionPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1().ValidatingAdmissionPolicies().List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1().ValidatingAdmissionPolicies().Watch(context.TODO(), options) + }, + }, + &admissionregistrationv1.ValidatingAdmissionPolicy{}, + resyncPeriod, + indexers, + ) +} + +func (f *validatingAdmissionPolicyInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredValidatingAdmissionPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *validatingAdmissionPolicyInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&admissionregistrationv1.ValidatingAdmissionPolicy{}, f.defaultInformer) +} + +func (f *validatingAdmissionPolicyInformer) Lister() v1.ValidatingAdmissionPolicyLister { + return v1.NewValidatingAdmissionPolicyLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingadmissionpolicybinding.go b/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingadmissionpolicybinding.go new file mode 100644 index 00000000000..8cd61bf28a3 --- /dev/null +++ b/vendor/k8s.io/client-go/informers/admissionregistration/v1/validatingadmissionpolicybinding.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + time "time" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "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/admissionregistration/v1" + cache "k8s.io/client-go/tools/cache" +) + +// ValidatingAdmissionPolicyBindingInformer provides access to a shared informer and lister for +// ValidatingAdmissionPolicyBindings. +type ValidatingAdmissionPolicyBindingInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.ValidatingAdmissionPolicyBindingLister +} + +type validatingAdmissionPolicyBindingInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewValidatingAdmissionPolicyBindingInformer constructs a new informer for ValidatingAdmissionPolicyBinding 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 NewValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredValidatingAdmissionPolicyBindingInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredValidatingAdmissionPolicyBindingInformer constructs a new informer for ValidatingAdmissionPolicyBinding 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 NewFilteredValidatingAdmissionPolicyBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Watch(context.TODO(), options) + }, + }, + &admissionregistrationv1.ValidatingAdmissionPolicyBinding{}, + resyncPeriod, + indexers, + ) +} + +func (f *validatingAdmissionPolicyBindingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredValidatingAdmissionPolicyBindingInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *validatingAdmissionPolicyBindingInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&admissionregistrationv1.ValidatingAdmissionPolicyBinding{}, f.defaultInformer) +} + +func (f *validatingAdmissionPolicyBindingInformer) Lister() v1.ValidatingAdmissionPolicyBindingLister { + return v1.NewValidatingAdmissionPolicyBindingLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/doc.go b/vendor/k8s.io/client-go/informers/doc.go index 231bffb69bd..f37c3e4d015 100644 --- a/vendor/k8s.io/client-go/informers/doc.go +++ b/vendor/k8s.io/client-go/informers/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package informers provides generated informers for Kubernetes APIs. -package informers +package informers // import "k8s.io/client-go/informers" diff --git a/vendor/k8s.io/client-go/informers/factory.go b/vendor/k8s.io/client-go/informers/factory.go index 9fc86441a19..f2fef0e0b2e 100644 --- a/vendor/k8s.io/client-go/informers/factory.go +++ b/vendor/k8s.io/client-go/informers/factory.go @@ -46,6 +46,7 @@ import ( resource "k8s.io/client-go/informers/resource" scheduling "k8s.io/client-go/informers/scheduling" storage "k8s.io/client-go/informers/storage" + storagemigration "k8s.io/client-go/informers/storagemigration" kubernetes "k8s.io/client-go/kubernetes" cache "k8s.io/client-go/tools/cache" ) @@ -290,6 +291,7 @@ type SharedInformerFactory interface { Resource() resource.Interface Scheduling() scheduling.Interface Storage() storage.Interface + Storagemigration() storagemigration.Interface } func (f *sharedInformerFactory) Admissionregistration() admissionregistration.Interface { @@ -367,3 +369,7 @@ func (f *sharedInformerFactory) Scheduling() scheduling.Interface { func (f *sharedInformerFactory) Storage() storage.Interface { return storage.New(f, f.namespace, f.tweakListOptions) } + +func (f *sharedInformerFactory) Storagemigration() storagemigration.Interface { + return storagemigration.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 index 680768815bd..d85117587c1 100644 --- a/vendor/k8s.io/client-go/informers/generic.go +++ b/vendor/k8s.io/client-go/informers/generic.go @@ -67,6 +67,7 @@ import ( storagev1 "k8s.io/api/storage/v1" storagev1alpha1 "k8s.io/api/storage/v1alpha1" storagev1beta1 "k8s.io/api/storage/v1beta1" + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -100,6 +101,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=admissionregistration.k8s.io, Version=v1 case v1.SchemeGroupVersion.WithResource("mutatingwebhookconfigurations"): return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1().MutatingWebhookConfigurations().Informer()}, nil + case v1.SchemeGroupVersion.WithResource("validatingadmissionpolicies"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1().ValidatingAdmissionPolicies().Informer()}, nil + case v1.SchemeGroupVersion.WithResource("validatingadmissionpolicybindings"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1().ValidatingAdmissionPolicyBindings().Informer()}, nil case v1.SchemeGroupVersion.WithResource("validatingwebhookconfigurations"): return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1().ValidatingWebhookConfigurations().Informer()}, nil @@ -362,10 +367,16 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().PodSchedulingContexts().Informer()}, nil case v1alpha2.SchemeGroupVersion.WithResource("resourceclaims"): return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaims().Informer()}, nil + case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimparameters"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimParameters().Informer()}, nil case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates"): return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimTemplates().Informer()}, nil case v1alpha2.SchemeGroupVersion.WithResource("resourceclasses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClasses().Informer()}, nil + case v1alpha2.SchemeGroupVersion.WithResource("resourceclassparameters"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClassParameters().Informer()}, nil + case v1alpha2.SchemeGroupVersion.WithResource("resourceslices"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceSlices().Informer()}, nil // Group=scheduling.k8s.io, Version=v1 case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"): @@ -411,6 +422,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case storagev1beta1.SchemeGroupVersion.WithResource("volumeattachments"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().VolumeAttachments().Informer()}, nil + // Group=storagemigration.k8s.io, Version=v1alpha1 + case storagemigrationv1alpha1.SchemeGroupVersion.WithResource("storageversionmigrations"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Storagemigration().V1alpha1().StorageVersionMigrations().Informer()}, nil + } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/vendor/k8s.io/client-go/informers/resource/v1alpha2/interface.go b/vendor/k8s.io/client-go/informers/resource/v1alpha2/interface.go index 23f817c62eb..aa4a5ae7dca 100644 --- a/vendor/k8s.io/client-go/informers/resource/v1alpha2/interface.go +++ b/vendor/k8s.io/client-go/informers/resource/v1alpha2/interface.go @@ -28,10 +28,16 @@ type Interface interface { PodSchedulingContexts() PodSchedulingContextInformer // ResourceClaims returns a ResourceClaimInformer. ResourceClaims() ResourceClaimInformer + // ResourceClaimParameters returns a ResourceClaimParametersInformer. + ResourceClaimParameters() ResourceClaimParametersInformer // ResourceClaimTemplates returns a ResourceClaimTemplateInformer. ResourceClaimTemplates() ResourceClaimTemplateInformer // ResourceClasses returns a ResourceClassInformer. ResourceClasses() ResourceClassInformer + // ResourceClassParameters returns a ResourceClassParametersInformer. + ResourceClassParameters() ResourceClassParametersInformer + // ResourceSlices returns a ResourceSliceInformer. + ResourceSlices() ResourceSliceInformer } type version struct { @@ -55,6 +61,11 @@ func (v *version) ResourceClaims() ResourceClaimInformer { return &resourceClaimInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } +// ResourceClaimParameters returns a ResourceClaimParametersInformer. +func (v *version) ResourceClaimParameters() ResourceClaimParametersInformer { + return &resourceClaimParametersInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // ResourceClaimTemplates returns a ResourceClaimTemplateInformer. func (v *version) ResourceClaimTemplates() ResourceClaimTemplateInformer { return &resourceClaimTemplateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} @@ -64,3 +75,13 @@ func (v *version) ResourceClaimTemplates() ResourceClaimTemplateInformer { func (v *version) ResourceClasses() ResourceClassInformer { return &resourceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } + +// ResourceClassParameters returns a ResourceClassParametersInformer. +func (v *version) ResourceClassParameters() ResourceClassParametersInformer { + return &resourceClassParametersInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// ResourceSlices returns a ResourceSliceInformer. +func (v *version) ResourceSlices() ResourceSliceInformer { + return &resourceSliceInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimparameters.go b/vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 00000000000..3064ac9f559 --- /dev/null +++ b/vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + time "time" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + 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" + v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + cache "k8s.io/client-go/tools/cache" +) + +// ResourceClaimParametersInformer provides access to a shared informer and lister for +// ResourceClaimParameters. +type ResourceClaimParametersInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha2.ResourceClaimParametersLister +} + +type resourceClaimParametersInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewResourceClaimParametersInformer constructs a new informer for ResourceClaimParameters 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 NewResourceClaimParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredResourceClaimParametersInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredResourceClaimParametersInformer constructs a new informer for ResourceClaimParameters 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 NewFilteredResourceClaimParametersInformer(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.ResourceV1alpha2().ResourceClaimParameters(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ResourceV1alpha2().ResourceClaimParameters(namespace).Watch(context.TODO(), options) + }, + }, + &resourcev1alpha2.ResourceClaimParameters{}, + resyncPeriod, + indexers, + ) +} + +func (f *resourceClaimParametersInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredResourceClaimParametersInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *resourceClaimParametersInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&resourcev1alpha2.ResourceClaimParameters{}, f.defaultInformer) +} + +func (f *resourceClaimParametersInformer) Lister() v1alpha2.ResourceClaimParametersLister { + return v1alpha2.NewResourceClaimParametersLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceclassparameters.go b/vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 00000000000..71fbefe1620 --- /dev/null +++ b/vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + time "time" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + 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" + v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + cache "k8s.io/client-go/tools/cache" +) + +// ResourceClassParametersInformer provides access to a shared informer and lister for +// ResourceClassParameters. +type ResourceClassParametersInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha2.ResourceClassParametersLister +} + +type resourceClassParametersInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewResourceClassParametersInformer constructs a new informer for ResourceClassParameters 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 NewResourceClassParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredResourceClassParametersInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredResourceClassParametersInformer constructs a new informer for ResourceClassParameters 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 NewFilteredResourceClassParametersInformer(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.ResourceV1alpha2().ResourceClassParameters(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ResourceV1alpha2().ResourceClassParameters(namespace).Watch(context.TODO(), options) + }, + }, + &resourcev1alpha2.ResourceClassParameters{}, + resyncPeriod, + indexers, + ) +} + +func (f *resourceClassParametersInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredResourceClassParametersInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *resourceClassParametersInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&resourcev1alpha2.ResourceClassParameters{}, f.defaultInformer) +} + +func (f *resourceClassParametersInformer) Lister() v1alpha2.ResourceClassParametersLister { + return v1alpha2.NewResourceClassParametersLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceslice.go b/vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceslice.go new file mode 100644 index 00000000000..da9d2a0243c --- /dev/null +++ b/vendor/k8s.io/client-go/informers/resource/v1alpha2/resourceslice.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + time "time" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + 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" + v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + cache "k8s.io/client-go/tools/cache" +) + +// ResourceSliceInformer provides access to a shared informer and lister for +// ResourceSlices. +type ResourceSliceInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha2.ResourceSliceLister +} + +type resourceSliceInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewResourceSliceInformer constructs a new informer for ResourceSlice 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 NewResourceSliceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredResourceSliceInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredResourceSliceInformer constructs a new informer for ResourceSlice 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 NewFilteredResourceSliceInformer(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.ResourceV1alpha2().ResourceSlices().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ResourceV1alpha2().ResourceSlices().Watch(context.TODO(), options) + }, + }, + &resourcev1alpha2.ResourceSlice{}, + resyncPeriod, + indexers, + ) +} + +func (f *resourceSliceInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredResourceSliceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *resourceSliceInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&resourcev1alpha2.ResourceSlice{}, f.defaultInformer) +} + +func (f *resourceSliceInformer) Lister() v1alpha2.ResourceSliceLister { + return v1alpha2.NewResourceSliceLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/storagemigration/interface.go b/vendor/k8s.io/client-go/informers/storagemigration/interface.go new file mode 100644 index 00000000000..1f7030fea8d --- /dev/null +++ b/vendor/k8s.io/client-go/informers/storagemigration/interface.go @@ -0,0 +1,46 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package storagemigration + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + v1alpha1 "k8s.io/client-go/informers/storagemigration/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/storagemigration/v1alpha1/interface.go b/vendor/k8s.io/client-go/informers/storagemigration/v1alpha1/interface.go new file mode 100644 index 00000000000..60724e7a287 --- /dev/null +++ b/vendor/k8s.io/client-go/informers/storagemigration/v1alpha1/interface.go @@ -0,0 +1,45 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // StorageVersionMigrations returns a StorageVersionMigrationInformer. + StorageVersionMigrations() StorageVersionMigrationInformer +} + +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} +} + +// StorageVersionMigrations returns a StorageVersionMigrationInformer. +func (v *version) StorageVersionMigrations() StorageVersionMigrationInformer { + return &storageVersionMigrationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/k8s.io/client-go/informers/storagemigration/v1alpha1/storageversionmigration.go b/vendor/k8s.io/client-go/informers/storagemigration/v1alpha1/storageversionmigration.go new file mode 100644 index 00000000000..70e7c72797a --- /dev/null +++ b/vendor/k8s.io/client-go/informers/storagemigration/v1alpha1/storageversionmigration.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + storagemigrationv1alpha1 "k8s.io/api/storagemigration/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/storagemigration/v1alpha1" + cache "k8s.io/client-go/tools/cache" +) + +// StorageVersionMigrationInformer provides access to a shared informer and lister for +// StorageVersionMigrations. +type StorageVersionMigrationInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.StorageVersionMigrationLister +} + +type storageVersionMigrationInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewStorageVersionMigrationInformer constructs a new informer for StorageVersionMigration 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 NewStorageVersionMigrationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredStorageVersionMigrationInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredStorageVersionMigrationInformer constructs a new informer for StorageVersionMigration 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 NewFilteredStorageVersionMigrationInformer(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.StoragemigrationV1alpha1().StorageVersionMigrations().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StoragemigrationV1alpha1().StorageVersionMigrations().Watch(context.TODO(), options) + }, + }, + &storagemigrationv1alpha1.StorageVersionMigration{}, + resyncPeriod, + indexers, + ) +} + +func (f *storageVersionMigrationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredStorageVersionMigrationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *storageVersionMigrationInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&storagemigrationv1alpha1.StorageVersionMigration{}, f.defaultInformer) +} + +func (f *storageVersionMigrationInformer) Lister() v1alpha1.StorageVersionMigrationLister { + return v1alpha1.NewStorageVersionMigrationLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/kubernetes/clientset.go b/vendor/k8s.io/client-go/kubernetes/clientset.go index a0095d086fd..eaa206ff65d 100644 --- a/vendor/k8s.io/client-go/kubernetes/clientset.go +++ b/vendor/k8s.io/client-go/kubernetes/clientset.go @@ -74,6 +74,7 @@ import ( 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" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" ) @@ -131,6 +132,7 @@ type Interface interface { StorageV1beta1() storagev1beta1.StorageV1beta1Interface StorageV1() storagev1.StorageV1Interface StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface + StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface } // Clientset contains the clients for groups. @@ -187,6 +189,7 @@ type Clientset struct { storageV1beta1 *storagev1beta1.StorageV1beta1Client storageV1 *storagev1.StorageV1Client storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client + storagemigrationV1alpha1 *storagemigrationv1alpha1.StoragemigrationV1alpha1Client } // AdmissionregistrationV1 retrieves the AdmissionregistrationV1Client @@ -444,6 +447,11 @@ func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { return c.storageV1alpha1 } +// StoragemigrationV1alpha1 retrieves the StoragemigrationV1alpha1Client +func (c *Clientset) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + return c.storagemigrationV1alpha1 +} + // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -692,6 +700,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } + cs.storagemigrationV1alpha1, err = storagemigrationv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -764,6 +776,7 @@ func New(c rest.Interface) *Clientset { cs.storageV1beta1 = storagev1beta1.New(c) cs.storageV1 = storagev1.New(c) cs.storageV1alpha1 = storagev1alpha1.New(c) + cs.storagemigrationV1alpha1 = storagemigrationv1alpha1.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 index 9cef4242f2f..e052f81b852 100644 --- a/vendor/k8s.io/client-go/kubernetes/doc.go +++ b/vendor/k8s.io/client-go/kubernetes/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package kubernetes holds packages which implement a clientset for Kubernetes // APIs. -package kubernetes +package kubernetes // import "k8s.io/client-go/kubernetes" diff --git a/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go b/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go index fc529873f18..a62b8f7c450 100644 --- a/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go +++ b/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go @@ -126,6 +126,8 @@ import ( fakestoragev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake" storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" fakestoragev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + fakestoragemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake" "k8s.io/client-go/testing" ) @@ -433,3 +435,8 @@ func (c *Clientset) StorageV1() storagev1.StorageV1Interface { func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { return &fakestoragev1alpha1.FakeStorageV1alpha1{Fake: &c.Fake} } + +// StoragemigrationV1alpha1 retrieves the StoragemigrationV1alpha1Client +func (c *Clientset) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + return &fakestoragemigrationv1alpha1.FakeStoragemigrationV1alpha1{Fake: &c.Fake} +} diff --git a/vendor/k8s.io/client-go/kubernetes/fake/register.go b/vendor/k8s.io/client-go/kubernetes/fake/register.go index 6b80d683391..339983fe0af 100644 --- a/vendor/k8s.io/client-go/kubernetes/fake/register.go +++ b/vendor/k8s.io/client-go/kubernetes/fake/register.go @@ -70,6 +70,7 @@ import ( storagev1 "k8s.io/api/storage/v1" storagev1alpha1 "k8s.io/api/storage/v1alpha1" storagev1beta1 "k8s.io/api/storage/v1beta1" + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -132,6 +133,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ storagev1beta1.AddToScheme, storagev1.AddToScheme, storagev1alpha1.AddToScheme, + storagemigrationv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/register.go b/vendor/k8s.io/client-go/kubernetes/scheme/register.go index f44055fbfc7..8ebfb7cea56 100644 --- a/vendor/k8s.io/client-go/kubernetes/scheme/register.go +++ b/vendor/k8s.io/client-go/kubernetes/scheme/register.go @@ -70,6 +70,7 @@ import ( storagev1 "k8s.io/api/storage/v1" storagev1alpha1 "k8s.io/api/storage/v1alpha1" storagev1beta1 "k8s.io/api/storage/v1beta1" + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -132,6 +133,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ storagev1beta1.AddToScheme, storagev1.AddToScheme, storagev1alpha1.AddToScheme, + storagemigrationv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go index 10848bed17a..a81b2b68292 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go @@ -29,6 +29,8 @@ import ( type AdmissionregistrationV1Interface interface { RESTClient() rest.Interface MutatingWebhookConfigurationsGetter + ValidatingAdmissionPoliciesGetter + ValidatingAdmissionPolicyBindingsGetter ValidatingWebhookConfigurationsGetter } @@ -41,6 +43,14 @@ func (c *AdmissionregistrationV1Client) MutatingWebhookConfigurations() Mutating return newMutatingWebhookConfigurations(c) } +func (c *AdmissionregistrationV1Client) ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInterface { + return newValidatingAdmissionPolicies(c) +} + +func (c *AdmissionregistrationV1Client) ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInterface { + return newValidatingAdmissionPolicyBindings(c) +} + func (c *AdmissionregistrationV1Client) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface { return newValidatingWebhookConfigurations(c) } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_admissionregistration_client.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_admissionregistration_client.go index a5a570ad155..b7487c2fbdf 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_admissionregistration_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_admissionregistration_client.go @@ -32,6 +32,14 @@ func (c *FakeAdmissionregistrationV1) MutatingWebhookConfigurations() v1.Mutatin return &FakeMutatingWebhookConfigurations{c} } +func (c *FakeAdmissionregistrationV1) ValidatingAdmissionPolicies() v1.ValidatingAdmissionPolicyInterface { + return &FakeValidatingAdmissionPolicies{c} +} + +func (c *FakeAdmissionregistrationV1) ValidatingAdmissionPolicyBindings() v1.ValidatingAdmissionPolicyBindingInterface { + return &FakeValidatingAdmissionPolicyBindings{c} +} + func (c *FakeAdmissionregistrationV1) ValidatingWebhookConfigurations() v1.ValidatingWebhookConfigurationInterface { return &FakeValidatingWebhookConfigurations{c} } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingadmissionpolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingadmissionpolicy.go new file mode 100644 index 00000000000..c947e6572f8 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingadmissionpolicy.go @@ -0,0 +1,178 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + testing "k8s.io/client-go/testing" +) + +// FakeValidatingAdmissionPolicies implements ValidatingAdmissionPolicyInterface +type FakeValidatingAdmissionPolicies struct { + Fake *FakeAdmissionregistrationV1 +} + +var validatingadmissionpoliciesResource = v1.SchemeGroupVersion.WithResource("validatingadmissionpolicies") + +var validatingadmissionpoliciesKind = v1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicy") + +// Get takes name of the validatingAdmissionPolicy, and returns the corresponding validatingAdmissionPolicy object, and an error if there is any. +func (c *FakeValidatingAdmissionPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(validatingadmissionpoliciesResource, name), &v1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicy), err +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors. +func (c *FakeValidatingAdmissionPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(validatingadmissionpoliciesResource, validatingadmissionpoliciesKind, opts), &v1.ValidatingAdmissionPolicyList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1.ValidatingAdmissionPolicyList{ListMeta: obj.(*v1.ValidatingAdmissionPolicyList).ListMeta} + for _, item := range obj.(*v1.ValidatingAdmissionPolicyList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicies. +func (c *FakeValidatingAdmissionPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(validatingadmissionpoliciesResource, opts)) +} + +// Create takes the representation of a validatingAdmissionPolicy and creates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any. +func (c *FakeValidatingAdmissionPolicies) Create(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.CreateOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), &v1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicy), err +} + +// Update takes the representation of a validatingAdmissionPolicy and updates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any. +func (c *FakeValidatingAdmissionPolicies) Update(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), &v1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicy), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeValidatingAdmissionPolicies) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (*v1.ValidatingAdmissionPolicy, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(validatingadmissionpoliciesResource, "status", validatingAdmissionPolicy), &v1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicy), err +} + +// Delete takes name of the validatingAdmissionPolicy and deletes it. Returns an error if one occurs. +func (c *FakeValidatingAdmissionPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(validatingadmissionpoliciesResource, name, opts), &v1.ValidatingAdmissionPolicy{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeValidatingAdmissionPolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(validatingadmissionpoliciesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1.ValidatingAdmissionPolicyList{}) + return err +} + +// Patch applies the patch and returns the patched validatingAdmissionPolicy. +func (c *FakeValidatingAdmissionPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, name, pt, data, subresources...), &v1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicy), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied validatingAdmissionPolicy. +func (c *FakeValidatingAdmissionPolicies) Apply(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + if validatingAdmissionPolicy == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy provided to Apply must not be nil") + } + data, err := json.Marshal(validatingAdmissionPolicy) + if err != nil { + return nil, err + } + name := validatingAdmissionPolicy.Name + if name == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data), &v1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicy), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeValidatingAdmissionPolicies) ApplyStatus(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + if validatingAdmissionPolicy == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy provided to Apply must not be nil") + } + data, err := json.Marshal(validatingAdmissionPolicy) + if err != nil { + return nil, err + } + name := validatingAdmissionPolicy.Name + if name == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data, "status"), &v1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicy), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingadmissionpolicybinding.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingadmissionpolicybinding.go new file mode 100644 index 00000000000..9ace7359300 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingadmissionpolicybinding.go @@ -0,0 +1,145 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + testing "k8s.io/client-go/testing" +) + +// FakeValidatingAdmissionPolicyBindings implements ValidatingAdmissionPolicyBindingInterface +type FakeValidatingAdmissionPolicyBindings struct { + Fake *FakeAdmissionregistrationV1 +} + +var validatingadmissionpolicybindingsResource = v1.SchemeGroupVersion.WithResource("validatingadmissionpolicybindings") + +var validatingadmissionpolicybindingsKind = v1.SchemeGroupVersion.WithKind("ValidatingAdmissionPolicyBinding") + +// Get takes name of the validatingAdmissionPolicyBinding, and returns the corresponding validatingAdmissionPolicyBinding object, and an error if there is any. +func (c *FakeValidatingAdmissionPolicyBindings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(validatingadmissionpolicybindingsResource, name), &v1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicyBinding), err +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors. +func (c *FakeValidatingAdmissionPolicyBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyBindingList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(validatingadmissionpolicybindingsResource, validatingadmissionpolicybindingsKind, opts), &v1.ValidatingAdmissionPolicyBindingList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1.ValidatingAdmissionPolicyBindingList{ListMeta: obj.(*v1.ValidatingAdmissionPolicyBindingList).ListMeta} + for _, item := range obj.(*v1.ValidatingAdmissionPolicyBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicyBindings. +func (c *FakeValidatingAdmissionPolicyBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(validatingadmissionpolicybindingsResource, opts)) +} + +// Create takes the representation of a validatingAdmissionPolicyBinding and creates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any. +func (c *FakeValidatingAdmissionPolicyBindings) Create(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.CreateOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), &v1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicyBinding), err +} + +// Update takes the representation of a validatingAdmissionPolicyBinding and updates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any. +func (c *FakeValidatingAdmissionPolicyBindings) Update(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.UpdateOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), &v1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicyBinding), err +} + +// Delete takes name of the validatingAdmissionPolicyBinding and deletes it. Returns an error if one occurs. +func (c *FakeValidatingAdmissionPolicyBindings) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(validatingadmissionpolicybindingsResource, name, opts), &v1.ValidatingAdmissionPolicyBinding{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeValidatingAdmissionPolicyBindings) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(validatingadmissionpolicybindingsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1.ValidatingAdmissionPolicyBindingList{}) + return err +} + +// Patch applies the patch and returns the patched validatingAdmissionPolicyBinding. +func (c *FakeValidatingAdmissionPolicyBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, name, pt, data, subresources...), &v1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicyBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied validatingAdmissionPolicyBinding. +func (c *FakeValidatingAdmissionPolicyBindings) Apply(ctx context.Context, validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBindingApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + if validatingAdmissionPolicyBinding == nil { + return nil, fmt.Errorf("validatingAdmissionPolicyBinding provided to Apply must not be nil") + } + data, err := json.Marshal(validatingAdmissionPolicyBinding) + if err != nil { + return nil, err + } + name := validatingAdmissionPolicyBinding.Name + if name == nil { + return nil, fmt.Errorf("validatingAdmissionPolicyBinding.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, *name, types.ApplyPatchType, data), &v1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ValidatingAdmissionPolicyBinding), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/generated_expansion.go index a5b062e37fd..d81e1c87fcd 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/generated_expansion.go @@ -20,4 +20,8 @@ package v1 type MutatingWebhookConfigurationExpansion interface{} +type ValidatingAdmissionPolicyExpansion interface{} + +type ValidatingAdmissionPolicyBindingExpansion interface{} + type ValidatingWebhookConfigurationExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go new file mode 100644 index 00000000000..0b0b05acd41 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go @@ -0,0 +1,243 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ValidatingAdmissionPoliciesGetter has a method to return a ValidatingAdmissionPolicyInterface. +// A group's client should implement this interface. +type ValidatingAdmissionPoliciesGetter interface { + ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInterface +} + +// ValidatingAdmissionPolicyInterface has methods to work with ValidatingAdmissionPolicy resources. +type ValidatingAdmissionPolicyInterface interface { + Create(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.CreateOptions) (*v1.ValidatingAdmissionPolicy, error) + Update(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (*v1.ValidatingAdmissionPolicy, error) + UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (*v1.ValidatingAdmissionPolicy, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ValidatingAdmissionPolicy, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingAdmissionPolicyList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicy, err error) + Apply(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicy, err error) + ApplyStatus(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicy, err error) + ValidatingAdmissionPolicyExpansion +} + +// validatingAdmissionPolicies implements ValidatingAdmissionPolicyInterface +type validatingAdmissionPolicies struct { + client rest.Interface +} + +// newValidatingAdmissionPolicies returns a ValidatingAdmissionPolicies +func newValidatingAdmissionPolicies(c *AdmissionregistrationV1Client) *validatingAdmissionPolicies { + return &validatingAdmissionPolicies{ + client: c.RESTClient(), + } +} + +// Get takes name of the validatingAdmissionPolicy, and returns the corresponding validatingAdmissionPolicy object, and an error if there is any. +func (c *validatingAdmissionPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Get(). + Resource("validatingadmissionpolicies"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors. +func (c *validatingAdmissionPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ValidatingAdmissionPolicyList{} + err = c.client.Get(). + Resource("validatingadmissionpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicies. +func (c *validatingAdmissionPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("validatingadmissionpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a validatingAdmissionPolicy and creates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any. +func (c *validatingAdmissionPolicies) Create(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.CreateOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Post(). + Resource("validatingadmissionpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(validatingAdmissionPolicy). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a validatingAdmissionPolicy and updates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any. +func (c *validatingAdmissionPolicies) Update(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Put(). + Resource("validatingadmissionpolicies"). + Name(validatingAdmissionPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(validatingAdmissionPolicy). + Do(ctx). + 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 *validatingAdmissionPolicies) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Put(). + Resource("validatingadmissionpolicies"). + Name(validatingAdmissionPolicy.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(validatingAdmissionPolicy). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the validatingAdmissionPolicy and deletes it. Returns an error if one occurs. +func (c *validatingAdmissionPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("validatingadmissionpolicies"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *validatingAdmissionPolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("validatingadmissionpolicies"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched validatingAdmissionPolicy. +func (c *validatingAdmissionPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicy, err error) { + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Patch(pt). + Resource("validatingadmissionpolicies"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied validatingAdmissionPolicy. +func (c *validatingAdmissionPolicies) Apply(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + if validatingAdmissionPolicy == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(validatingAdmissionPolicy) + if err != nil { + return nil, err + } + name := validatingAdmissionPolicy.Name + if name == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply") + } + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Patch(types.ApplyPatchType). + Resource("validatingadmissionpolicies"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *validatingAdmissionPolicies) ApplyStatus(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicy, err error) { + if validatingAdmissionPolicy == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(validatingAdmissionPolicy) + if err != nil { + return nil, err + } + + name := validatingAdmissionPolicy.Name + if name == nil { + return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply") + } + + result = &v1.ValidatingAdmissionPolicy{} + err = c.client.Patch(types.ApplyPatchType). + Resource("validatingadmissionpolicies"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go new file mode 100644 index 00000000000..83a8ef163d2 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go @@ -0,0 +1,197 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ValidatingAdmissionPolicyBindingsGetter has a method to return a ValidatingAdmissionPolicyBindingInterface. +// A group's client should implement this interface. +type ValidatingAdmissionPolicyBindingsGetter interface { + ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInterface +} + +// ValidatingAdmissionPolicyBindingInterface has methods to work with ValidatingAdmissionPolicyBinding resources. +type ValidatingAdmissionPolicyBindingInterface interface { + Create(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.CreateOptions) (*v1.ValidatingAdmissionPolicyBinding, error) + Update(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.UpdateOptions) (*v1.ValidatingAdmissionPolicyBinding, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ValidatingAdmissionPolicyBinding, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingAdmissionPolicyBindingList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicyBinding, err error) + Apply(ctx context.Context, validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBindingApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) + ValidatingAdmissionPolicyBindingExpansion +} + +// validatingAdmissionPolicyBindings implements ValidatingAdmissionPolicyBindingInterface +type validatingAdmissionPolicyBindings struct { + client rest.Interface +} + +// newValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindings +func newValidatingAdmissionPolicyBindings(c *AdmissionregistrationV1Client) *validatingAdmissionPolicyBindings { + return &validatingAdmissionPolicyBindings{ + client: c.RESTClient(), + } +} + +// Get takes name of the validatingAdmissionPolicyBinding, and returns the corresponding validatingAdmissionPolicyBinding object, and an error if there is any. +func (c *validatingAdmissionPolicyBindings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + result = &v1.ValidatingAdmissionPolicyBinding{} + err = c.client.Get(). + Resource("validatingadmissionpolicybindings"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors. +func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyBindingList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.ValidatingAdmissionPolicyBindingList{} + err = c.client.Get(). + Resource("validatingadmissionpolicybindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicyBindings. +func (c *validatingAdmissionPolicyBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("validatingadmissionpolicybindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a validatingAdmissionPolicyBinding and creates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any. +func (c *validatingAdmissionPolicyBindings) Create(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.CreateOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + result = &v1.ValidatingAdmissionPolicyBinding{} + err = c.client.Post(). + Resource("validatingadmissionpolicybindings"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(validatingAdmissionPolicyBinding). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a validatingAdmissionPolicyBinding and updates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any. +func (c *validatingAdmissionPolicyBindings) Update(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.UpdateOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + result = &v1.ValidatingAdmissionPolicyBinding{} + err = c.client.Put(). + Resource("validatingadmissionpolicybindings"). + Name(validatingAdmissionPolicyBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(validatingAdmissionPolicyBinding). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the validatingAdmissionPolicyBinding and deletes it. Returns an error if one occurs. +func (c *validatingAdmissionPolicyBindings) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("validatingadmissionpolicybindings"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *validatingAdmissionPolicyBindings) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("validatingadmissionpolicybindings"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched validatingAdmissionPolicyBinding. +func (c *validatingAdmissionPolicyBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + result = &v1.ValidatingAdmissionPolicyBinding{} + err = c.client.Patch(pt). + Resource("validatingadmissionpolicybindings"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied validatingAdmissionPolicyBinding. +func (c *validatingAdmissionPolicyBindings) Apply(ctx context.Context, validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBindingApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) { + if validatingAdmissionPolicyBinding == nil { + return nil, fmt.Errorf("validatingAdmissionPolicyBinding provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(validatingAdmissionPolicyBinding) + if err != nil { + return nil, err + } + name := validatingAdmissionPolicyBinding.Name + if name == nil { + return nil, fmt.Errorf("validatingAdmissionPolicyBinding.Name must be provided to Apply") + } + result = &v1.ValidatingAdmissionPolicyBinding{} + err = c.client.Patch(types.ApplyPatchType). + Resource("validatingadmissionpolicybindings"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resource_client.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resource_client.go index 20538773208..6f69d0fa795 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resource_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resource_client.go @@ -36,6 +36,10 @@ func (c *FakeResourceV1alpha2) ResourceClaims(namespace string) v1alpha2.Resourc return &FakeResourceClaims{c, namespace} } +func (c *FakeResourceV1alpha2) ResourceClaimParameters(namespace string) v1alpha2.ResourceClaimParametersInterface { + return &FakeResourceClaimParameters{c, namespace} +} + func (c *FakeResourceV1alpha2) ResourceClaimTemplates(namespace string) v1alpha2.ResourceClaimTemplateInterface { return &FakeResourceClaimTemplates{c, namespace} } @@ -44,6 +48,14 @@ func (c *FakeResourceV1alpha2) ResourceClasses() v1alpha2.ResourceClassInterface return &FakeResourceClasses{c} } +func (c *FakeResourceV1alpha2) ResourceClassParameters(namespace string) v1alpha2.ResourceClassParametersInterface { + return &FakeResourceClassParameters{c, namespace} +} + +func (c *FakeResourceV1alpha2) ResourceSlices() v1alpha2.ResourceSliceInterface { + return &FakeResourceSlices{c} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeResourceV1alpha2) RESTClient() rest.Interface { diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimparameters.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimparameters.go new file mode 100644 index 00000000000..da32b5caec5 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimparameters.go @@ -0,0 +1,154 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + testing "k8s.io/client-go/testing" +) + +// FakeResourceClaimParameters implements ResourceClaimParametersInterface +type FakeResourceClaimParameters struct { + Fake *FakeResourceV1alpha2 + ns string +} + +var resourceclaimparametersResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclaimparameters") + +var resourceclaimparametersKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParameters") + +// Get takes name of the resourceClaimParameters, and returns the corresponding resourceClaimParameters object, and an error if there is any. +func (c *FakeResourceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(resourceclaimparametersResource, c.ns, name), &v1alpha2.ResourceClaimParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClaimParameters), err +} + +// List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors. +func (c *FakeResourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimParametersList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(resourceclaimparametersResource, resourceclaimparametersKind, c.ns, opts), &v1alpha2.ResourceClaimParametersList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.ResourceClaimParametersList{ListMeta: obj.(*v1alpha2.ResourceClaimParametersList).ListMeta} + for _, item := range obj.(*v1alpha2.ResourceClaimParametersList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested resourceClaimParameters. +func (c *FakeResourceClaimParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(resourceclaimparametersResource, c.ns, opts)) + +} + +// Create takes the representation of a resourceClaimParameters and creates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. +func (c *FakeResourceClaimParameters) Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(resourceclaimparametersResource, c.ns, resourceClaimParameters), &v1alpha2.ResourceClaimParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClaimParameters), err +} + +// Update takes the representation of a resourceClaimParameters and updates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. +func (c *FakeResourceClaimParameters) Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(resourceclaimparametersResource, c.ns, resourceClaimParameters), &v1alpha2.ResourceClaimParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClaimParameters), err +} + +// Delete takes name of the resourceClaimParameters and deletes it. Returns an error if one occurs. +func (c *FakeResourceClaimParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(resourceclaimparametersResource, c.ns, name, opts), &v1alpha2.ResourceClaimParameters{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeResourceClaimParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(resourceclaimparametersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClaimParametersList{}) + return err +} + +// Patch applies the patch and returns the patched resourceClaimParameters. +func (c *FakeResourceClaimParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclaimparametersResource, c.ns, name, pt, data, subresources...), &v1alpha2.ResourceClaimParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClaimParameters), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimParameters. +func (c *FakeResourceClaimParameters) Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + if resourceClaimParameters == nil { + return nil, fmt.Errorf("resourceClaimParameters provided to Apply must not be nil") + } + data, err := json.Marshal(resourceClaimParameters) + if err != nil { + return nil, err + } + name := resourceClaimParameters.Name + if name == nil { + return nil, fmt.Errorf("resourceClaimParameters.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclaimparametersResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClaimParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClaimParameters), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclassparameters.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclassparameters.go new file mode 100644 index 00000000000..c11762963f2 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclassparameters.go @@ -0,0 +1,154 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + testing "k8s.io/client-go/testing" +) + +// FakeResourceClassParameters implements ResourceClassParametersInterface +type FakeResourceClassParameters struct { + Fake *FakeResourceV1alpha2 + ns string +} + +var resourceclassparametersResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclassparameters") + +var resourceclassparametersKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParameters") + +// Get takes name of the resourceClassParameters, and returns the corresponding resourceClassParameters object, and an error if there is any. +func (c *FakeResourceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClassParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(resourceclassparametersResource, c.ns, name), &v1alpha2.ResourceClassParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClassParameters), err +} + +// List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors. +func (c *FakeResourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassParametersList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(resourceclassparametersResource, resourceclassparametersKind, c.ns, opts), &v1alpha2.ResourceClassParametersList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.ResourceClassParametersList{ListMeta: obj.(*v1alpha2.ResourceClassParametersList).ListMeta} + for _, item := range obj.(*v1alpha2.ResourceClassParametersList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested resourceClassParameters. +func (c *FakeResourceClassParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(resourceclassparametersResource, c.ns, opts)) + +} + +// Create takes the representation of a resourceClassParameters and creates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. +func (c *FakeResourceClassParameters) Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClassParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(resourceclassparametersResource, c.ns, resourceClassParameters), &v1alpha2.ResourceClassParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClassParameters), err +} + +// Update takes the representation of a resourceClassParameters and updates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. +func (c *FakeResourceClassParameters) Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClassParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(resourceclassparametersResource, c.ns, resourceClassParameters), &v1alpha2.ResourceClassParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClassParameters), err +} + +// Delete takes name of the resourceClassParameters and deletes it. Returns an error if one occurs. +func (c *FakeResourceClassParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(resourceclassparametersResource, c.ns, name, opts), &v1alpha2.ResourceClassParameters{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeResourceClassParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(resourceclassparametersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClassParametersList{}) + return err +} + +// Patch applies the patch and returns the patched resourceClassParameters. +func (c *FakeResourceClassParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclassparametersResource, c.ns, name, pt, data, subresources...), &v1alpha2.ResourceClassParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClassParameters), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClassParameters. +func (c *FakeResourceClassParameters) Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) { + if resourceClassParameters == nil { + return nil, fmt.Errorf("resourceClassParameters provided to Apply must not be nil") + } + data, err := json.Marshal(resourceClassParameters) + if err != nil { + return nil, err + } + name := resourceClassParameters.Name + if name == nil { + return nil, fmt.Errorf("resourceClassParameters.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourceclassparametersResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClassParameters{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceClassParameters), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceslice.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceslice.go new file mode 100644 index 00000000000..325e729e92f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceslice.go @@ -0,0 +1,145 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + testing "k8s.io/client-go/testing" +) + +// FakeResourceSlices implements ResourceSliceInterface +type FakeResourceSlices struct { + Fake *FakeResourceV1alpha2 +} + +var resourceslicesResource = v1alpha2.SchemeGroupVersion.WithResource("resourceslices") + +var resourceslicesKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceSlice") + +// Get takes name of the resourceSlice, and returns the corresponding resourceSlice object, and an error if there is any. +func (c *FakeResourceSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(resourceslicesResource, name), &v1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceSlice), err +} + +// List takes label and field selectors, and returns the list of ResourceSlices that match those selectors. +func (c *FakeResourceSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceSliceList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(resourceslicesResource, resourceslicesKind, opts), &v1alpha2.ResourceSliceList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.ResourceSliceList{ListMeta: obj.(*v1alpha2.ResourceSliceList).ListMeta} + for _, item := range obj.(*v1alpha2.ResourceSliceList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested resourceSlices. +func (c *FakeResourceSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(resourceslicesResource, opts)) +} + +// Create takes the representation of a resourceSlice and creates it. Returns the server's representation of the resourceSlice, and an error, if there is any. +func (c *FakeResourceSlices) Create(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.CreateOptions) (result *v1alpha2.ResourceSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(resourceslicesResource, resourceSlice), &v1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceSlice), err +} + +// Update takes the representation of a resourceSlice and updates it. Returns the server's representation of the resourceSlice, and an error, if there is any. +func (c *FakeResourceSlices) Update(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.UpdateOptions) (result *v1alpha2.ResourceSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(resourceslicesResource, resourceSlice), &v1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceSlice), err +} + +// Delete takes name of the resourceSlice and deletes it. Returns an error if one occurs. +func (c *FakeResourceSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(resourceslicesResource, name, opts), &v1alpha2.ResourceSlice{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeResourceSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(resourceslicesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.ResourceSliceList{}) + return err +} + +// Patch applies the patch and returns the patched resourceSlice. +func (c *FakeResourceSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceSlice, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(resourceslicesResource, name, pt, data, subresources...), &v1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceSlice), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceSlice. +func (c *FakeResourceSlices) Apply(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceSlice, err error) { + if resourceSlice == nil { + return nil, fmt.Errorf("resourceSlice provided to Apply must not be nil") + } + data, err := json.Marshal(resourceSlice) + if err != nil { + return nil, err + } + name := resourceSlice.Name + if name == nil { + return nil, fmt.Errorf("resourceSlice.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(resourceslicesResource, *name, types.ApplyPatchType, data), &v1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.ResourceSlice), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go index 2c02e9ce74e..d11410bb9b9 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go @@ -22,6 +22,12 @@ type PodSchedulingContextExpansion interface{} type ResourceClaimExpansion interface{} +type ResourceClaimParametersExpansion interface{} + type ResourceClaimTemplateExpansion interface{} type ResourceClassExpansion interface{} + +type ResourceClassParametersExpansion interface{} + +type ResourceSliceExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go index d5795fd6286..8e258b3e1ca 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go @@ -30,8 +30,11 @@ type ResourceV1alpha2Interface interface { RESTClient() rest.Interface PodSchedulingContextsGetter ResourceClaimsGetter + ResourceClaimParametersGetter ResourceClaimTemplatesGetter ResourceClassesGetter + ResourceClassParametersGetter + ResourceSlicesGetter } // ResourceV1alpha2Client is used to interact with features provided by the resource.k8s.io group. @@ -47,6 +50,10 @@ func (c *ResourceV1alpha2Client) ResourceClaims(namespace string) ResourceClaimI return newResourceClaims(c, namespace) } +func (c *ResourceV1alpha2Client) ResourceClaimParameters(namespace string) ResourceClaimParametersInterface { + return newResourceClaimParameters(c, namespace) +} + func (c *ResourceV1alpha2Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface { return newResourceClaimTemplates(c, namespace) } @@ -55,6 +62,14 @@ func (c *ResourceV1alpha2Client) ResourceClasses() ResourceClassInterface { return newResourceClasses(c) } +func (c *ResourceV1alpha2Client) ResourceClassParameters(namespace string) ResourceClassParametersInterface { + return newResourceClassParameters(c, namespace) +} + +func (c *ResourceV1alpha2Client) ResourceSlices() ResourceSliceInterface { + return newResourceSlices(c) +} + // NewForConfig creates a new ResourceV1alpha2Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 00000000000..d08afcb611b --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,208 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ResourceClaimParametersGetter has a method to return a ResourceClaimParametersInterface. +// A group's client should implement this interface. +type ResourceClaimParametersGetter interface { + ResourceClaimParameters(namespace string) ResourceClaimParametersInterface +} + +// ResourceClaimParametersInterface has methods to work with ResourceClaimParameters resources. +type ResourceClaimParametersInterface interface { + Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (*v1alpha2.ResourceClaimParameters, error) + Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (*v1alpha2.ResourceClaimParameters, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClaimParameters, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClaimParametersList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) + Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) + ResourceClaimParametersExpansion +} + +// resourceClaimParameters implements ResourceClaimParametersInterface +type resourceClaimParameters struct { + client rest.Interface + ns string +} + +// newResourceClaimParameters returns a ResourceClaimParameters +func newResourceClaimParameters(c *ResourceV1alpha2Client, namespace string) *resourceClaimParameters { + return &resourceClaimParameters{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the resourceClaimParameters, and returns the corresponding resourceClaimParameters object, and an error if there is any. +func (c *resourceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors. +func (c *resourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimParametersList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha2.ResourceClaimParametersList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested resourceClaimParameters. +func (c *resourceClaimParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a resourceClaimParameters and creates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. +func (c *resourceClaimParameters) Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Post(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClaimParameters). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a resourceClaimParameters and updates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. +func (c *resourceClaimParameters) Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Put(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(resourceClaimParameters.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClaimParameters). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the resourceClaimParameters and deletes it. Returns an error if one occurs. +func (c *resourceClaimParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *resourceClaimParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclaimparameters"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched resourceClaimParameters. +func (c *resourceClaimParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) { + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimParameters. +func (c *resourceClaimParameters) Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) { + if resourceClaimParameters == nil { + return nil, fmt.Errorf("resourceClaimParameters provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(resourceClaimParameters) + if err != nil { + return nil, err + } + name := resourceClaimParameters.Name + if name == nil { + return nil, fmt.Errorf("resourceClaimParameters.Name must be provided to Apply") + } + result = &v1alpha2.ResourceClaimParameters{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("resourceclaimparameters"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 00000000000..8ac9be0784a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,208 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ResourceClassParametersGetter has a method to return a ResourceClassParametersInterface. +// A group's client should implement this interface. +type ResourceClassParametersGetter interface { + ResourceClassParameters(namespace string) ResourceClassParametersInterface +} + +// ResourceClassParametersInterface has methods to work with ResourceClassParameters resources. +type ResourceClassParametersInterface interface { + Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (*v1alpha2.ResourceClassParameters, error) + Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (*v1alpha2.ResourceClassParameters, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClassParameters, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClassParametersList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) + Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) + ResourceClassParametersExpansion +} + +// resourceClassParameters implements ResourceClassParametersInterface +type resourceClassParameters struct { + client rest.Interface + ns string +} + +// newResourceClassParameters returns a ResourceClassParameters +func newResourceClassParameters(c *ResourceV1alpha2Client, namespace string) *resourceClassParameters { + return &resourceClassParameters{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the resourceClassParameters, and returns the corresponding resourceClassParameters object, and an error if there is any. +func (c *resourceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors. +func (c *resourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassParametersList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha2.ResourceClassParametersList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested resourceClassParameters. +func (c *resourceClassParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a resourceClassParameters and creates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. +func (c *resourceClassParameters) Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Post(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClassParameters). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a resourceClassParameters and updates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. +func (c *resourceClassParameters) Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Put(). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(resourceClassParameters.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceClassParameters). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the resourceClassParameters and deletes it. Returns an error if one occurs. +func (c *resourceClassParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *resourceClassParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("resourceclassparameters"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched resourceClassParameters. +func (c *resourceClassParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) { + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClassParameters. +func (c *resourceClassParameters) Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) { + if resourceClassParameters == nil { + return nil, fmt.Errorf("resourceClassParameters provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(resourceClassParameters) + if err != nil { + return nil, err + } + name := resourceClassParameters.Name + if name == nil { + return nil, fmt.Errorf("resourceClassParameters.Name must be provided to Apply") + } + result = &v1alpha2.ResourceClassParameters{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("resourceclassparameters"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go new file mode 100644 index 00000000000..302f370d525 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go @@ -0,0 +1,197 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha2 "k8s.io/api/resource/v1alpha2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// ResourceSlicesGetter has a method to return a ResourceSliceInterface. +// A group's client should implement this interface. +type ResourceSlicesGetter interface { + ResourceSlices() ResourceSliceInterface +} + +// ResourceSliceInterface has methods to work with ResourceSlice resources. +type ResourceSliceInterface interface { + Create(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.CreateOptions) (*v1alpha2.ResourceSlice, error) + Update(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.UpdateOptions) (*v1alpha2.ResourceSlice, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceSlice, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceSliceList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceSlice, err error) + Apply(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceSlice, err error) + ResourceSliceExpansion +} + +// resourceSlices implements ResourceSliceInterface +type resourceSlices struct { + client rest.Interface +} + +// newResourceSlices returns a ResourceSlices +func newResourceSlices(c *ResourceV1alpha2Client) *resourceSlices { + return &resourceSlices{ + client: c.RESTClient(), + } +} + +// Get takes name of the resourceSlice, and returns the corresponding resourceSlice object, and an error if there is any. +func (c *resourceSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceSlice, err error) { + result = &v1alpha2.ResourceSlice{} + err = c.client.Get(). + Resource("resourceslices"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ResourceSlices that match those selectors. +func (c *resourceSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceSliceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha2.ResourceSliceList{} + err = c.client.Get(). + Resource("resourceslices"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested resourceSlices. +func (c *resourceSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("resourceslices"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a resourceSlice and creates it. Returns the server's representation of the resourceSlice, and an error, if there is any. +func (c *resourceSlices) Create(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.CreateOptions) (result *v1alpha2.ResourceSlice, err error) { + result = &v1alpha2.ResourceSlice{} + err = c.client.Post(). + Resource("resourceslices"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceSlice). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a resourceSlice and updates it. Returns the server's representation of the resourceSlice, and an error, if there is any. +func (c *resourceSlices) Update(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.UpdateOptions) (result *v1alpha2.ResourceSlice, err error) { + result = &v1alpha2.ResourceSlice{} + err = c.client.Put(). + Resource("resourceslices"). + Name(resourceSlice.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceSlice). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the resourceSlice and deletes it. Returns an error if one occurs. +func (c *resourceSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("resourceslices"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *resourceSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("resourceslices"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched resourceSlice. +func (c *resourceSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceSlice, err error) { + result = &v1alpha2.ResourceSlice{} + err = c.client.Patch(pt). + Resource("resourceslices"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resourceSlice. +func (c *resourceSlices) Apply(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceSlice, err error) { + if resourceSlice == nil { + return nil, fmt.Errorf("resourceSlice provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(resourceSlice) + if err != nil { + return nil, err + } + name := resourceSlice.Name + if name == nil { + return nil, fmt.Errorf("resourceSlice.Name must be provided to Apply") + } + result = &v1alpha2.ResourceSlice{} + err = c.client.Patch(types.ApplyPatchType). + Resource("resourceslices"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/doc.go similarity index 81% rename from pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/doc.go rename to vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/doc.go index b152a0bf00f..df51baa4d4c 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/sets/doc.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by set-gen. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. -// Package sets has auto-generated set types. -package sets +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake/doc.go similarity index 100% rename from vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/doc.go rename to vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake/doc.go diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_apiextensions_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake/fake_storagemigration_client.go similarity index 72% rename from vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_apiextensions_client.go rename to vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake/fake_storagemigration_client.go index 43b4ee7a2f8..3ae8f4ae56e 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_apiextensions_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake/fake_storagemigration_client.go @@ -19,22 +19,22 @@ limitations under the License. package fake import ( - v1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" + v1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeApiextensionsV1 struct { +type FakeStoragemigrationV1alpha1 struct { *testing.Fake } -func (c *FakeApiextensionsV1) CustomResourceDefinitions() v1.CustomResourceDefinitionInterface { - return &FakeCustomResourceDefinitions{c} +func (c *FakeStoragemigrationV1alpha1) StorageVersionMigrations() v1alpha1.StorageVersionMigrationInterface { + return &FakeStorageVersionMigrations{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeApiextensionsV1) RESTClient() rest.Interface { +func (c *FakeStoragemigrationV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake/fake_storageversionmigration.go b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake/fake_storageversionmigration.go new file mode 100644 index 00000000000..9b5da88c72a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake/fake_storageversionmigration.go @@ -0,0 +1,178 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "k8s.io/api/storagemigration/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + storagemigrationv1alpha1 "k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1" + testing "k8s.io/client-go/testing" +) + +// FakeStorageVersionMigrations implements StorageVersionMigrationInterface +type FakeStorageVersionMigrations struct { + Fake *FakeStoragemigrationV1alpha1 +} + +var storageversionmigrationsResource = v1alpha1.SchemeGroupVersion.WithResource("storageversionmigrations") + +var storageversionmigrationsKind = v1alpha1.SchemeGroupVersion.WithKind("StorageVersionMigration") + +// Get takes name of the storageVersionMigration, and returns the corresponding storageVersionMigration object, and an error if there is any. +func (c *FakeStorageVersionMigrations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StorageVersionMigration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(storageversionmigrationsResource, name), &v1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersionMigration), err +} + +// List takes label and field selectors, and returns the list of StorageVersionMigrations that match those selectors. +func (c *FakeStorageVersionMigrations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionMigrationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(storageversionmigrationsResource, storageversionmigrationsKind, opts), &v1alpha1.StorageVersionMigrationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.StorageVersionMigrationList{ListMeta: obj.(*v1alpha1.StorageVersionMigrationList).ListMeta} + for _, item := range obj.(*v1alpha1.StorageVersionMigrationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested storageVersionMigrations. +func (c *FakeStorageVersionMigrations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(storageversionmigrationsResource, opts)) +} + +// Create takes the representation of a storageVersionMigration and creates it. Returns the server's representation of the storageVersionMigration, and an error, if there is any. +func (c *FakeStorageVersionMigrations) Create(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.CreateOptions) (result *v1alpha1.StorageVersionMigration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(storageversionmigrationsResource, storageVersionMigration), &v1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersionMigration), err +} + +// Update takes the representation of a storageVersionMigration and updates it. Returns the server's representation of the storageVersionMigration, and an error, if there is any. +func (c *FakeStorageVersionMigrations) Update(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (result *v1alpha1.StorageVersionMigration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(storageversionmigrationsResource, storageVersionMigration), &v1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersionMigration), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeStorageVersionMigrations) UpdateStatus(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (*v1alpha1.StorageVersionMigration, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(storageversionmigrationsResource, "status", storageVersionMigration), &v1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersionMigration), err +} + +// Delete takes name of the storageVersionMigration and deletes it. Returns an error if one occurs. +func (c *FakeStorageVersionMigrations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(storageversionmigrationsResource, name, opts), &v1alpha1.StorageVersionMigration{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeStorageVersionMigrations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(storageversionmigrationsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.StorageVersionMigrationList{}) + return err +} + +// Patch applies the patch and returns the patched storageVersionMigration. +func (c *FakeStorageVersionMigrations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageVersionMigration, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageversionmigrationsResource, name, pt, data, subresources...), &v1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersionMigration), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied storageVersionMigration. +func (c *FakeStorageVersionMigrations) Apply(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersionMigration, err error) { + if storageVersionMigration == nil { + return nil, fmt.Errorf("storageVersionMigration provided to Apply must not be nil") + } + data, err := json.Marshal(storageVersionMigration) + if err != nil { + return nil, err + } + name := storageVersionMigration.Name + if name == nil { + return nil, fmt.Errorf("storageVersionMigration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageversionmigrationsResource, *name, types.ApplyPatchType, data), &v1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersionMigration), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeStorageVersionMigrations) ApplyStatus(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersionMigration, err error) { + if storageVersionMigration == nil { + return nil, fmt.Errorf("storageVersionMigration provided to Apply must not be nil") + } + data, err := json.Marshal(storageVersionMigration) + if err != nil { + return nil, err + } + name := storageVersionMigration.Name + if name == nil { + return nil, fmt.Errorf("storageVersionMigration.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageversionmigrationsResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageVersionMigration), err +} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go similarity index 88% rename from vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/doc.go rename to vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go index 9b99e716709..89220c3ce98 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/doc.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/generated_expansion.go @@ -16,5 +16,6 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -// This package has the automatically generated fake clientset. -package fake +package v1alpha1 + +type StorageVersionMigrationExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storagemigration_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storagemigration_client.go new file mode 100644 index 00000000000..613e4535598 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storagemigration_client.go @@ -0,0 +1,107 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "k8s.io/api/storagemigration/v1alpha1" + "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +type StoragemigrationV1alpha1Interface interface { + RESTClient() rest.Interface + StorageVersionMigrationsGetter +} + +// StoragemigrationV1alpha1Client is used to interact with features provided by the storagemigration.k8s.io group. +type StoragemigrationV1alpha1Client struct { + restClient rest.Interface +} + +func (c *StoragemigrationV1alpha1Client) StorageVersionMigrations() StorageVersionMigrationInterface { + return newStorageVersionMigrations(c) +} + +// NewForConfig creates a new StoragemigrationV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*StoragemigrationV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new StoragemigrationV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*StoragemigrationV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &StoragemigrationV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new StoragemigrationV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *StoragemigrationV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new StoragemigrationV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *StoragemigrationV1alpha1Client { + return &StoragemigrationV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *StoragemigrationV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go new file mode 100644 index 00000000000..be66a5b9463 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go @@ -0,0 +1,243 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "k8s.io/api/storagemigration/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + storagemigrationv1alpha1 "k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// StorageVersionMigrationsGetter has a method to return a StorageVersionMigrationInterface. +// A group's client should implement this interface. +type StorageVersionMigrationsGetter interface { + StorageVersionMigrations() StorageVersionMigrationInterface +} + +// StorageVersionMigrationInterface has methods to work with StorageVersionMigration resources. +type StorageVersionMigrationInterface interface { + Create(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.CreateOptions) (*v1alpha1.StorageVersionMigration, error) + Update(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (*v1alpha1.StorageVersionMigration, error) + UpdateStatus(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (*v1alpha1.StorageVersionMigration, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.StorageVersionMigration, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.StorageVersionMigrationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageVersionMigration, err error) + Apply(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersionMigration, err error) + ApplyStatus(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersionMigration, err error) + StorageVersionMigrationExpansion +} + +// storageVersionMigrations implements StorageVersionMigrationInterface +type storageVersionMigrations struct { + client rest.Interface +} + +// newStorageVersionMigrations returns a StorageVersionMigrations +func newStorageVersionMigrations(c *StoragemigrationV1alpha1Client) *storageVersionMigrations { + return &storageVersionMigrations{ + client: c.RESTClient(), + } +} + +// Get takes name of the storageVersionMigration, and returns the corresponding storageVersionMigration object, and an error if there is any. +func (c *storageVersionMigrations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StorageVersionMigration, err error) { + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Get(). + Resource("storageversionmigrations"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of StorageVersionMigrations that match those selectors. +func (c *storageVersionMigrations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionMigrationList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.StorageVersionMigrationList{} + err = c.client.Get(). + Resource("storageversionmigrations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested storageVersionMigrations. +func (c *storageVersionMigrations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("storageversionmigrations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a storageVersionMigration and creates it. Returns the server's representation of the storageVersionMigration, and an error, if there is any. +func (c *storageVersionMigrations) Create(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.CreateOptions) (result *v1alpha1.StorageVersionMigration, err error) { + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Post(). + Resource("storageversionmigrations"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(storageVersionMigration). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a storageVersionMigration and updates it. Returns the server's representation of the storageVersionMigration, and an error, if there is any. +func (c *storageVersionMigrations) Update(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (result *v1alpha1.StorageVersionMigration, err error) { + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Put(). + Resource("storageversionmigrations"). + Name(storageVersionMigration.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(storageVersionMigration). + Do(ctx). + 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 *storageVersionMigrations) UpdateStatus(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (result *v1alpha1.StorageVersionMigration, err error) { + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Put(). + Resource("storageversionmigrations"). + Name(storageVersionMigration.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(storageVersionMigration). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the storageVersionMigration and deletes it. Returns an error if one occurs. +func (c *storageVersionMigrations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("storageversionmigrations"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *storageVersionMigrations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("storageversionmigrations"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched storageVersionMigration. +func (c *storageVersionMigrations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageVersionMigration, err error) { + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Patch(pt). + Resource("storageversionmigrations"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied storageVersionMigration. +func (c *storageVersionMigrations) Apply(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersionMigration, err error) { + if storageVersionMigration == nil { + return nil, fmt.Errorf("storageVersionMigration provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(storageVersionMigration) + if err != nil { + return nil, err + } + name := storageVersionMigration.Name + if name == nil { + return nil, fmt.Errorf("storageVersionMigration.Name must be provided to Apply") + } + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Patch(types.ApplyPatchType). + Resource("storageversionmigrations"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *storageVersionMigrations) ApplyStatus(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.StorageVersionMigration, err error) { + if storageVersionMigration == nil { + return nil, fmt.Errorf("storageVersionMigration provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(storageVersionMigration) + if err != nil { + return nil, err + } + + name := storageVersionMigration.Name + if name == nil { + return nil, fmt.Errorf("storageVersionMigration.Name must be provided to Apply") + } + + result = &v1alpha1.StorageVersionMigration{} + err = c.client.Patch(types.ApplyPatchType). + Resource("storageversionmigrations"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1/expansion_generated.go index e121ae41a3e..9002ad6ea3b 100644 --- a/vendor/k8s.io/client-go/listers/admissionregistration/v1/expansion_generated.go +++ b/vendor/k8s.io/client-go/listers/admissionregistration/v1/expansion_generated.go @@ -22,6 +22,14 @@ package v1 // MutatingWebhookConfigurationLister. type MutatingWebhookConfigurationListerExpansion interface{} +// ValidatingAdmissionPolicyListerExpansion allows custom methods to be added to +// ValidatingAdmissionPolicyLister. +type ValidatingAdmissionPolicyListerExpansion interface{} + +// ValidatingAdmissionPolicyBindingListerExpansion allows custom methods to be added to +// ValidatingAdmissionPolicyBindingLister. +type ValidatingAdmissionPolicyBindingListerExpansion interface{} + // ValidatingWebhookConfigurationListerExpansion allows custom methods to be added to // ValidatingWebhookConfigurationLister. type ValidatingWebhookConfigurationListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingadmissionpolicy.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingadmissionpolicy.go new file mode 100644 index 00000000000..fff072f4c2e --- /dev/null +++ b/vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingadmissionpolicy.go @@ -0,0 +1,68 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/admissionregistration/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ValidatingAdmissionPolicyLister helps list ValidatingAdmissionPolicies. +// All objects returned here must be treated as read-only. +type ValidatingAdmissionPolicyLister interface { + // List lists all ValidatingAdmissionPolicies in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1.ValidatingAdmissionPolicy, err error) + // Get retrieves the ValidatingAdmissionPolicy from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1.ValidatingAdmissionPolicy, error) + ValidatingAdmissionPolicyListerExpansion +} + +// validatingAdmissionPolicyLister implements the ValidatingAdmissionPolicyLister interface. +type validatingAdmissionPolicyLister struct { + indexer cache.Indexer +} + +// NewValidatingAdmissionPolicyLister returns a new ValidatingAdmissionPolicyLister. +func NewValidatingAdmissionPolicyLister(indexer cache.Indexer) ValidatingAdmissionPolicyLister { + return &validatingAdmissionPolicyLister{indexer: indexer} +} + +// List lists all ValidatingAdmissionPolicies in the indexer. +func (s *validatingAdmissionPolicyLister) List(selector labels.Selector) (ret []*v1.ValidatingAdmissionPolicy, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ValidatingAdmissionPolicy)) + }) + return ret, err +} + +// Get retrieves the ValidatingAdmissionPolicy from the index for a given name. +func (s *validatingAdmissionPolicyLister) Get(name string) (*v1.ValidatingAdmissionPolicy, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("validatingadmissionpolicy"), name) + } + return obj.(*v1.ValidatingAdmissionPolicy), nil +} diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingadmissionpolicybinding.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingadmissionpolicybinding.go new file mode 100644 index 00000000000..07856981e56 --- /dev/null +++ b/vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingadmissionpolicybinding.go @@ -0,0 +1,68 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/admissionregistration/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ValidatingAdmissionPolicyBindingLister helps list ValidatingAdmissionPolicyBindings. +// All objects returned here must be treated as read-only. +type ValidatingAdmissionPolicyBindingLister interface { + // List lists all ValidatingAdmissionPolicyBindings in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1.ValidatingAdmissionPolicyBinding, err error) + // Get retrieves the ValidatingAdmissionPolicyBinding from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1.ValidatingAdmissionPolicyBinding, error) + ValidatingAdmissionPolicyBindingListerExpansion +} + +// validatingAdmissionPolicyBindingLister implements the ValidatingAdmissionPolicyBindingLister interface. +type validatingAdmissionPolicyBindingLister struct { + indexer cache.Indexer +} + +// NewValidatingAdmissionPolicyBindingLister returns a new ValidatingAdmissionPolicyBindingLister. +func NewValidatingAdmissionPolicyBindingLister(indexer cache.Indexer) ValidatingAdmissionPolicyBindingLister { + return &validatingAdmissionPolicyBindingLister{indexer: indexer} +} + +// List lists all ValidatingAdmissionPolicyBindings in the indexer. +func (s *validatingAdmissionPolicyBindingLister) List(selector labels.Selector) (ret []*v1.ValidatingAdmissionPolicyBinding, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ValidatingAdmissionPolicyBinding)) + }) + return ret, err +} + +// Get retrieves the ValidatingAdmissionPolicyBinding from the index for a given name. +func (s *validatingAdmissionPolicyBindingLister) Get(name string) (*v1.ValidatingAdmissionPolicyBinding, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("validatingadmissionpolicybinding"), name) + } + return obj.(*v1.ValidatingAdmissionPolicyBinding), nil +} diff --git a/vendor/k8s.io/client-go/listers/resource/v1alpha2/expansion_generated.go b/vendor/k8s.io/client-go/listers/resource/v1alpha2/expansion_generated.go index 3b16e44290c..68861832d9c 100644 --- a/vendor/k8s.io/client-go/listers/resource/v1alpha2/expansion_generated.go +++ b/vendor/k8s.io/client-go/listers/resource/v1alpha2/expansion_generated.go @@ -34,6 +34,14 @@ type ResourceClaimListerExpansion interface{} // ResourceClaimNamespaceLister. type ResourceClaimNamespaceListerExpansion interface{} +// ResourceClaimParametersListerExpansion allows custom methods to be added to +// ResourceClaimParametersLister. +type ResourceClaimParametersListerExpansion interface{} + +// ResourceClaimParametersNamespaceListerExpansion allows custom methods to be added to +// ResourceClaimParametersNamespaceLister. +type ResourceClaimParametersNamespaceListerExpansion interface{} + // ResourceClaimTemplateListerExpansion allows custom methods to be added to // ResourceClaimTemplateLister. type ResourceClaimTemplateListerExpansion interface{} @@ -45,3 +53,15 @@ type ResourceClaimTemplateNamespaceListerExpansion interface{} // ResourceClassListerExpansion allows custom methods to be added to // ResourceClassLister. type ResourceClassListerExpansion interface{} + +// ResourceClassParametersListerExpansion allows custom methods to be added to +// ResourceClassParametersLister. +type ResourceClassParametersListerExpansion interface{} + +// ResourceClassParametersNamespaceListerExpansion allows custom methods to be added to +// ResourceClassParametersNamespaceLister. +type ResourceClassParametersNamespaceListerExpansion interface{} + +// ResourceSliceListerExpansion allows custom methods to be added to +// ResourceSliceLister. +type ResourceSliceListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimparameters.go b/vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 00000000000..1a561ef7a58 --- /dev/null +++ b/vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,99 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1alpha2 "k8s.io/api/resource/v1alpha2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ResourceClaimParametersLister helps list ResourceClaimParameters. +// All objects returned here must be treated as read-only. +type ResourceClaimParametersLister interface { + // List lists all ResourceClaimParameters in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) + // ResourceClaimParameters returns an object that can list and get ResourceClaimParameters. + ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister + ResourceClaimParametersListerExpansion +} + +// resourceClaimParametersLister implements the ResourceClaimParametersLister interface. +type resourceClaimParametersLister struct { + indexer cache.Indexer +} + +// NewResourceClaimParametersLister returns a new ResourceClaimParametersLister. +func NewResourceClaimParametersLister(indexer cache.Indexer) ResourceClaimParametersLister { + return &resourceClaimParametersLister{indexer: indexer} +} + +// List lists all ResourceClaimParameters in the indexer. +func (s *resourceClaimParametersLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.ResourceClaimParameters)) + }) + return ret, err +} + +// ResourceClaimParameters returns an object that can list and get ResourceClaimParameters. +func (s *resourceClaimParametersLister) ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister { + return resourceClaimParametersNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ResourceClaimParametersNamespaceLister helps list and get ResourceClaimParameters. +// All objects returned here must be treated as read-only. +type ResourceClaimParametersNamespaceLister interface { + // List lists all ResourceClaimParameters in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) + // Get retrieves the ResourceClaimParameters from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha2.ResourceClaimParameters, error) + ResourceClaimParametersNamespaceListerExpansion +} + +// resourceClaimParametersNamespaceLister implements the ResourceClaimParametersNamespaceLister +// interface. +type resourceClaimParametersNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ResourceClaimParameters in the indexer for a given namespace. +func (s resourceClaimParametersNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.ResourceClaimParameters)) + }) + return ret, err +} + +// Get retrieves the ResourceClaimParameters from the indexer for a given namespace and name. +func (s resourceClaimParametersNamespaceLister) Get(name string) (*v1alpha2.ResourceClaimParameters, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha2.Resource("resourceclaimparameters"), name) + } + return obj.(*v1alpha2.ResourceClaimParameters), nil +} diff --git a/vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceclassparameters.go b/vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 00000000000..26fb95e6d22 --- /dev/null +++ b/vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,99 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1alpha2 "k8s.io/api/resource/v1alpha2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ResourceClassParametersLister helps list ResourceClassParameters. +// All objects returned here must be treated as read-only. +type ResourceClassParametersLister interface { + // List lists all ResourceClassParameters in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) + // ResourceClassParameters returns an object that can list and get ResourceClassParameters. + ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister + ResourceClassParametersListerExpansion +} + +// resourceClassParametersLister implements the ResourceClassParametersLister interface. +type resourceClassParametersLister struct { + indexer cache.Indexer +} + +// NewResourceClassParametersLister returns a new ResourceClassParametersLister. +func NewResourceClassParametersLister(indexer cache.Indexer) ResourceClassParametersLister { + return &resourceClassParametersLister{indexer: indexer} +} + +// List lists all ResourceClassParameters in the indexer. +func (s *resourceClassParametersLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.ResourceClassParameters)) + }) + return ret, err +} + +// ResourceClassParameters returns an object that can list and get ResourceClassParameters. +func (s *resourceClassParametersLister) ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister { + return resourceClassParametersNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ResourceClassParametersNamespaceLister helps list and get ResourceClassParameters. +// All objects returned here must be treated as read-only. +type ResourceClassParametersNamespaceLister interface { + // List lists all ResourceClassParameters in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) + // Get retrieves the ResourceClassParameters from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha2.ResourceClassParameters, error) + ResourceClassParametersNamespaceListerExpansion +} + +// resourceClassParametersNamespaceLister implements the ResourceClassParametersNamespaceLister +// interface. +type resourceClassParametersNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ResourceClassParameters in the indexer for a given namespace. +func (s resourceClassParametersNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.ResourceClassParameters)) + }) + return ret, err +} + +// Get retrieves the ResourceClassParameters from the indexer for a given namespace and name. +func (s resourceClassParametersNamespaceLister) Get(name string) (*v1alpha2.ResourceClassParameters, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha2.Resource("resourceclassparameters"), name) + } + return obj.(*v1alpha2.ResourceClassParameters), nil +} diff --git a/vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceslice.go b/vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceslice.go new file mode 100644 index 00000000000..4301cea2e36 --- /dev/null +++ b/vendor/k8s.io/client-go/listers/resource/v1alpha2/resourceslice.go @@ -0,0 +1,68 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1alpha2 "k8s.io/api/resource/v1alpha2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ResourceSliceLister helps list ResourceSlices. +// All objects returned here must be treated as read-only. +type ResourceSliceLister interface { + // List lists all ResourceSlices in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.ResourceSlice, err error) + // Get retrieves the ResourceSlice from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha2.ResourceSlice, error) + ResourceSliceListerExpansion +} + +// resourceSliceLister implements the ResourceSliceLister interface. +type resourceSliceLister struct { + indexer cache.Indexer +} + +// NewResourceSliceLister returns a new ResourceSliceLister. +func NewResourceSliceLister(indexer cache.Indexer) ResourceSliceLister { + return &resourceSliceLister{indexer: indexer} +} + +// List lists all ResourceSlices in the indexer. +func (s *resourceSliceLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceSlice, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.ResourceSlice)) + }) + return ret, err +} + +// Get retrieves the ResourceSlice from the index for a given name. +func (s *resourceSliceLister) Get(name string) (*v1alpha2.ResourceSlice, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha2.Resource("resourceslice"), name) + } + return obj.(*v1alpha2.ResourceSlice), nil +} diff --git a/vendor/k8s.io/client-go/listers/storagemigration/v1alpha1/expansion_generated.go b/vendor/k8s.io/client-go/listers/storagemigration/v1alpha1/expansion_generated.go new file mode 100644 index 00000000000..92eb5c65b4f --- /dev/null +++ b/vendor/k8s.io/client-go/listers/storagemigration/v1alpha1/expansion_generated.go @@ -0,0 +1,23 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +// StorageVersionMigrationListerExpansion allows custom methods to be added to +// StorageVersionMigrationLister. +type StorageVersionMigrationListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/storagemigration/v1alpha1/storageversionmigration.go b/vendor/k8s.io/client-go/listers/storagemigration/v1alpha1/storageversionmigration.go new file mode 100644 index 00000000000..b65bf25324a --- /dev/null +++ b/vendor/k8s.io/client-go/listers/storagemigration/v1alpha1/storageversionmigration.go @@ -0,0 +1,68 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "k8s.io/api/storagemigration/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// StorageVersionMigrationLister helps list StorageVersionMigrations. +// All objects returned here must be treated as read-only. +type StorageVersionMigrationLister interface { + // List lists all StorageVersionMigrations in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.StorageVersionMigration, err error) + // Get retrieves the StorageVersionMigration from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.StorageVersionMigration, error) + StorageVersionMigrationListerExpansion +} + +// storageVersionMigrationLister implements the StorageVersionMigrationLister interface. +type storageVersionMigrationLister struct { + indexer cache.Indexer +} + +// NewStorageVersionMigrationLister returns a new StorageVersionMigrationLister. +func NewStorageVersionMigrationLister(indexer cache.Indexer) StorageVersionMigrationLister { + return &storageVersionMigrationLister{indexer: indexer} +} + +// List lists all StorageVersionMigrations in the indexer. +func (s *storageVersionMigrationLister) List(selector labels.Selector) (ret []*v1alpha1.StorageVersionMigration, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.StorageVersionMigration)) + }) + return ret, err +} + +// Get retrieves the StorageVersionMigration from the index for a given name. +func (s *storageVersionMigrationLister) Get(name string) (*v1alpha1.StorageVersionMigration, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("storageversionmigration"), name) + } + return obj.(*v1alpha1.StorageVersionMigration), nil +} diff --git a/vendor/k8s.io/client-go/metadata/metadata.go b/vendor/k8s.io/client-go/metadata/metadata.go index 8152aa12489..2cc7e22adf7 100644 --- a/vendor/k8s.io/client-go/metadata/metadata.go +++ b/vendor/k8s.io/client-go/metadata/metadata.go @@ -191,7 +191,7 @@ func (c *client) Get(ctx context.Context, name string, opts metav1.GetOptions, s } obj, err := result.Get() if runtime.IsNotRegisteredError(err) { - klog.V(5).Infof("Unable to retrieve PartialObjectMetadata: %#v", err) + klog.FromContext(ctx).V(5).Info("Could not retrieve PartialObjectMetadata", "err", err) rawBytes, err := result.Raw() if err != nil { return nil, err @@ -227,7 +227,7 @@ func (c *client) List(ctx context.Context, opts metav1.ListOptions) (*metav1.Par } obj, err := result.Get() if runtime.IsNotRegisteredError(err) { - klog.V(5).Infof("Unable to retrieve PartialObjectMetadataList: %#v", err) + klog.FromContext(ctx).V(5).Info("Could not retrieve PartialObjectMetadataList", "err", err) rawBytes, err := result.Raw() if err != nil { return nil, err diff --git a/vendor/k8s.io/client-go/restmapper/shortcut.go b/vendor/k8s.io/client-go/restmapper/shortcut.go index ca517a01d4d..0afc8689d7a 100644 --- a/vendor/k8s.io/client-go/restmapper/shortcut.go +++ b/vendor/k8s.io/client-go/restmapper/shortcut.go @@ -50,7 +50,7 @@ func (e shortcutExpander) KindFor(resource schema.GroupVersionResource) (schema. // In case of new CRDs this means we potentially don't have current state of discovery. // In the current wiring in k8s.io/cli-runtime/pkg/genericclioptions/config_flags.go#toRESTMapper, // we are using DeferredDiscoveryRESTMapper which on KindFor failure will clear the - // cache and fetch all data from a cluster (see vendor/k8s.io/client-go/restmapper/discovery.go#KindFor). + // cache and fetch all data from a cluster (see k8s.io/client-go/restmapper/discovery.go#KindFor). // Thus another call to expandResourceShortcut, after a NoMatchError should successfully // read Kind to the user or an error. gvk, err := e.RESTMapper.KindFor(e.expandResourceShortcut(resource)) diff --git a/vendor/k8s.io/client-go/tools/cache/controller.go b/vendor/k8s.io/client-go/tools/cache/controller.go index 8a1104bde80..ee19a5af95c 100644 --- a/vendor/k8s.io/client-go/tools/cache/controller.go +++ b/vendor/k8s.io/client-go/tools/cache/controller.go @@ -336,6 +336,16 @@ func DeletionHandlingMetaNamespaceKeyFunc(obj interface{}) (string, error) { return MetaNamespaceKeyFunc(obj) } +// DeletionHandlingObjectToName checks for +// DeletedFinalStateUnknown objects before calling +// ObjectToName. +func DeletionHandlingObjectToName(obj interface{}) (ObjectName, error) { + if d, ok := obj.(DeletedFinalStateUnknown); ok { + return ParseObjectName(d.Key) + } + return ObjectToName(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 diff --git a/vendor/k8s.io/client-go/tools/cache/index.go b/vendor/k8s.io/client-go/tools/cache/index.go index b78d3086b8c..c5819fb6f86 100644 --- a/vendor/k8s.io/client-go/tools/cache/index.go +++ b/vendor/k8s.io/client-go/tools/cache/index.go @@ -50,8 +50,7 @@ type Indexer interface { // GetIndexers 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 adds more indexers to this store. This supports adding indexes after the store already has items. AddIndexers(newIndexers Indexers) error } diff --git a/vendor/k8s.io/client-go/tools/cache/reflector.go b/vendor/k8s.io/client-go/tools/cache/reflector.go index c1ea13de574..f733e244ccc 100644 --- a/vendor/k8s.io/client-go/tools/cache/reflector.go +++ b/vendor/k8s.io/client-go/tools/cache/reflector.go @@ -43,6 +43,7 @@ import ( "k8s.io/klog/v2" "k8s.io/utils/clock" "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "k8s.io/utils/trace" ) @@ -107,7 +108,9 @@ type Reflector struct { // might result in an increased memory consumption of the APIServer. // // See https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/3157-watch-list#design-details - UseWatchList bool + // + // TODO(#115478): Consider making reflector.UseWatchList a private field. Since we implemented "api streaming" on the etcd storage layer it should work. + UseWatchList *bool } // ResourceVersionUpdater is an interface that allows store implementation to @@ -237,8 +240,12 @@ func NewReflectorWithOptions(lw ListerWatcher, expectedType interface{}, store S r.expectedGVK = getExpectedGVKFromObject(expectedType) } - if s := os.Getenv("ENABLE_CLIENT_GO_WATCH_LIST_ALPHA"); len(s) > 0 { - r.UseWatchList = true + // don't overwrite UseWatchList if already set + // because the higher layers (e.g. storage/cacher) disabled it on purpose + if r.UseWatchList == nil { + if s := os.Getenv("ENABLE_CLIENT_GO_WATCH_LIST_ALPHA"); len(s) > 0 { + r.UseWatchList = ptr.To(true) + } } return r @@ -325,9 +332,10 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { klog.V(3).Infof("Listing and watching %v from %s", r.typeDescription, r.name) var err error var w watch.Interface - fallbackToList := !r.UseWatchList + useWatchList := ptr.Deref(r.UseWatchList, false) + fallbackToList := !useWatchList - if r.UseWatchList { + if useWatchList { w, err = r.watchList(stopCh) if w == nil && err == nil { // stopCh was closed diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go index b3f37431d5c..c805030bd73 100644 --- a/vendor/k8s.io/client-go/tools/cache/shared_informer.go +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -31,6 +31,8 @@ import ( "k8s.io/utils/clock" "k8s.io/klog/v2" + + clientgofeaturegate "k8s.io/client-go/features" ) // SharedInformer provides eventually consistent linkage of its @@ -409,6 +411,10 @@ func (v *dummyController) HasSynced() bool { } func (v *dummyController) LastSyncResourceVersion() string { + if clientgofeaturegate.FeatureGates().Enabled(clientgofeaturegate.InformerResourceVersion) { + return v.informer.LastSyncResourceVersion() + } + return "" } @@ -540,8 +546,8 @@ func (s *sharedIndexInformer) AddIndexers(indexers Indexers) error { s.startedLock.Lock() defer s.startedLock.Unlock() - if s.started { - return fmt.Errorf("informer has already started") + if s.stopped { + return fmt.Errorf("indexer was not added because it has stopped already") } return s.indexer.AddIndexers(indexers) 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 index 145e93ee535..7a4df0e1bae 100644 --- a/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go +++ b/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go @@ -52,8 +52,7 @@ type ThreadSafeStore interface { ByIndex(indexName, indexedValue 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 adds more indexers to this store. This supports adding indexes after the store already has items. AddIndexers(newIndexers Indexers) error // Resync is a no-op and is deprecated Resync() error @@ -135,50 +134,66 @@ func (i *storeIndex) addIndexers(newIndexers Indexers) error { return nil } -// updateIndices modifies the objects location in the managed indexes: +// updateSingleIndex modifies the objects location in the named index: // - for create you must provide only the newObj // - for update you must provide both the oldObj and the newObj // - for delete you must provide only the oldObj -// updateIndices must be called from a function that already has a lock on the cache -func (i *storeIndex) updateIndices(oldObj interface{}, newObj interface{}, key string) { +// updateSingleIndex must be called from a function that already has a lock on the cache +func (i *storeIndex) updateSingleIndex(name string, oldObj interface{}, newObj interface{}, key string) { var oldIndexValues, indexValues []string - var err error - for name, indexFunc := range i.indexers { - if oldObj != nil { - oldIndexValues, err = indexFunc(oldObj) - } else { - oldIndexValues = oldIndexValues[:0] - } + indexFunc, ok := i.indexers[name] + if !ok { + // Should never happen. Caller is responsible for ensuring this exists, and should call with lock + // held to avoid any races. + panic(fmt.Errorf("indexer %q does not exist", name)) + } + if oldObj != nil { + var err error + oldIndexValues, err = indexFunc(oldObj) if err != nil { panic(fmt.Errorf("unable to calculate an index entry for key %q on index %q: %v", key, name, err)) } + } else { + oldIndexValues = oldIndexValues[:0] + } - if newObj != nil { - indexValues, err = indexFunc(newObj) - } else { - indexValues = indexValues[:0] - } + if newObj != nil { + var err error + 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)) } + } else { + indexValues = indexValues[:0] + } - index := i.indices[name] - if index == nil { - index = Index{} - i.indices[name] = index - } + index := i.indices[name] + if index == nil { + index = Index{} + i.indices[name] = index + } - if len(indexValues) == 1 && len(oldIndexValues) == 1 && indexValues[0] == oldIndexValues[0] { - // We optimize for the most common case where indexFunc returns a single value which has not been changed - continue - } + if len(indexValues) == 1 && len(oldIndexValues) == 1 && indexValues[0] == oldIndexValues[0] { + // We optimize for the most common case where indexFunc returns a single value which has not been changed + return + } - for _, value := range oldIndexValues { - i.deleteKeyFromIndex(key, value, index) - } - for _, value := range indexValues { - i.addKeyToIndex(key, value, index) - } + for _, value := range oldIndexValues { + i.deleteKeyFromIndex(key, value, index) + } + for _, value := range indexValues { + i.addKeyToIndex(key, value, index) + } +} + +// updateIndices modifies the objects location in the managed indexes: +// - for create you must provide only the newObj +// - for update you must provide both the oldObj and the newObj +// - for delete you must provide only the oldObj +// updateIndices must be called from a function that already has a lock on the cache +func (i *storeIndex) updateIndices(oldObj interface{}, newObj interface{}, key string) { + for name := range i.indexers { + i.updateSingleIndex(name, oldObj, newObj, key) } } @@ -339,11 +354,18 @@ 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") + if err := c.index.addIndexers(newIndexers); err != nil { + return err + } + + // If there are already items, index them + for key, item := range c.items { + for name := range newIndexers { + c.index.updateSingleIndex(name, nil, item, key) + } } - return c.index.addIndexers(newIndexers) + return nil } func (c *threadSafeMap) Resync() error { diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/doc.go b/vendor/k8s.io/client-go/tools/clientcmd/api/doc.go index 5871575a669..fd913a30832 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/doc.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/doc.go @@ -16,4 +16,4 @@ limitations under the License. // +k8s:deepcopy-gen=package -package api +package api // import "k8s.io/client-go/tools/clientcmd/api" diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/doc.go b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/doc.go index 3ccdebc1c37..9e483e9d75c 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/doc.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:defaulter-gen=Kind -package v1 +package v1 // import "k8s.io/client-go/tools/clientcmd/api/v1" diff --git a/vendor/k8s.io/client-go/tools/clientcmd/client_config.go b/vendor/k8s.io/client-go/tools/clientcmd/client_config.go index ae0f01f3257..952f6d7eb6c 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/client_config.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/client_config.go @@ -72,6 +72,13 @@ type ClientConfig interface { ConfigAccess() ConfigAccess } +// OverridingClientConfig is used to enable overrriding the raw KubeConfig +type OverridingClientConfig interface { + ClientConfig + // MergedRawConfig return the RawConfig merged with all overrides. + MergedRawConfig() (clientcmdapi.Config, error) +} + type PersistAuthProviderConfigForUser func(user string) restclient.AuthProviderConfigPersister type promptedCredentials struct { @@ -91,22 +98,22 @@ type DirectClientConfig struct { } // NewDefaultClientConfig creates a DirectClientConfig using the config.CurrentContext as the context name -func NewDefaultClientConfig(config clientcmdapi.Config, overrides *ConfigOverrides) ClientConfig { +func NewDefaultClientConfig(config clientcmdapi.Config, overrides *ConfigOverrides) OverridingClientConfig { return &DirectClientConfig{config, config.CurrentContext, overrides, nil, NewDefaultClientConfigLoadingRules(), promptedCredentials{}} } // NewNonInteractiveClientConfig creates a DirectClientConfig using the passed context name and does not have a fallback reader for auth information -func NewNonInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, configAccess ConfigAccess) ClientConfig { +func NewNonInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, configAccess ConfigAccess) OverridingClientConfig { return &DirectClientConfig{config, contextName, overrides, nil, configAccess, promptedCredentials{}} } // NewInteractiveClientConfig creates a DirectClientConfig using the passed context name and a reader in case auth information is not provided via files or flags -func NewInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, fallbackReader io.Reader, configAccess ConfigAccess) ClientConfig { +func NewInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, fallbackReader io.Reader, configAccess ConfigAccess) OverridingClientConfig { return &DirectClientConfig{config, contextName, overrides, fallbackReader, configAccess, promptedCredentials{}} } // NewClientConfigFromBytes takes your kubeconfig and gives you back a ClientConfig -func NewClientConfigFromBytes(configBytes []byte) (ClientConfig, error) { +func NewClientConfigFromBytes(configBytes []byte) (OverridingClientConfig, error) { config, err := Load(configBytes) if err != nil { return nil, err @@ -129,6 +136,40 @@ func (config *DirectClientConfig) RawConfig() (clientcmdapi.Config, error) { return config.config, nil } +// MergedRawConfig returns the raw kube config merged with the overrides +func (config *DirectClientConfig) MergedRawConfig() (clientcmdapi.Config, error) { + if err := config.ConfirmUsable(); err != nil { + return clientcmdapi.Config{}, err + } + merged := config.config.DeepCopy() + + // set the AuthInfo merged with overrides in the merged config + mergedAuthInfo, err := config.getAuthInfo() + if err != nil { + return clientcmdapi.Config{}, err + } + mergedAuthInfoName, _ := config.getAuthInfoName() + merged.AuthInfos[mergedAuthInfoName] = &mergedAuthInfo + + // set the Context merged with overrides in the merged config + mergedContext, err := config.getContext() + if err != nil { + return clientcmdapi.Config{}, err + } + mergedContextName, _ := config.getContextName() + merged.Contexts[mergedContextName] = &mergedContext + merged.CurrentContext = mergedContextName + + // set the Cluster merged with overrides in the merged config + configClusterInfo, err := config.getCluster() + if err != nil { + return clientcmdapi.Config{}, err + } + configClusterName, _ := config.getClusterName() + merged.Clusters[configClusterName] = &configClusterInfo + return *merged, nil +} + // ClientConfig implements ClientConfig func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) { // check that getAuthInfo, getContext, and getCluster do not return an error. diff --git a/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go b/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go index c1151baf207..af840c4a251 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go +++ b/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go @@ -325,7 +325,22 @@ func (le *LeaderElector) tryAcquireOrRenew(ctx context.Context) bool { AcquireTime: now, } - // 1. obtain or create the ElectionRecord + // 1. fast path for the leader to update optimistically assuming that the record observed + // last time is the current version. + if le.IsLeader() && le.isLeaseValid(now.Time) { + oldObservedRecord := le.getObservedRecord() + leaderElectionRecord.AcquireTime = oldObservedRecord.AcquireTime + leaderElectionRecord.LeaderTransitions = oldObservedRecord.LeaderTransitions + + err := le.config.Lock.Update(ctx, leaderElectionRecord) + if err == nil { + le.setObservedRecord(&leaderElectionRecord) + return true + } + klog.Errorf("Failed to update lock optimitically: %v, falling back to slow path", err) + } + + // 2. obtain or create the ElectionRecord oldLeaderElectionRecord, oldLeaderElectionRawRecord, err := le.config.Lock.Get(ctx) if err != nil { if !errors.IsNotFound(err) { @@ -342,24 +357,23 @@ func (le *LeaderElector) tryAcquireOrRenew(ctx context.Context) bool { return true } - // 2. Record obtained, check the Identity & Time + // 3. Record obtained, check the Identity & Time if !bytes.Equal(le.observedRawRecord, oldLeaderElectionRawRecord) { le.setObservedRecord(oldLeaderElectionRecord) le.observedRawRecord = oldLeaderElectionRawRecord } - if len(oldLeaderElectionRecord.HolderIdentity) > 0 && - le.observedTime.Add(time.Second*time.Duration(oldLeaderElectionRecord.LeaseDurationSeconds)).After(now.Time) && - !le.IsLeader() { + if len(oldLeaderElectionRecord.HolderIdentity) > 0 && le.isLeaseValid(now.Time) && !le.IsLeader() { klog.V(4).Infof("lock is held by %v and has not yet expired", oldLeaderElectionRecord.HolderIdentity) return false } - // 3. We're going to try to update. The leaderElectionRecord is set to it's default + // 4. We're going to try to update. The leaderElectionRecord is set to it's default // here. Let's correct it before updating. if le.IsLeader() { leaderElectionRecord.AcquireTime = oldLeaderElectionRecord.AcquireTime leaderElectionRecord.LeaderTransitions = oldLeaderElectionRecord.LeaderTransitions + le.metrics.slowpathExercised(le.config.Name) } else { leaderElectionRecord.LeaderTransitions = oldLeaderElectionRecord.LeaderTransitions + 1 } @@ -400,6 +414,10 @@ func (le *LeaderElector) Check(maxTolerableExpiredLease time.Duration) error { return nil } +func (le *LeaderElector) isLeaseValid(now time.Time) bool { + return le.observedTime.Add(time.Second * time.Duration(le.getObservedRecord().LeaseDurationSeconds)).After(now) +} + // setObservedRecord will set a new observedRecord and update observedTime to the current time. // Protect critical sections with lock. func (le *LeaderElector) setObservedRecord(observedRecord *rl.LeaderElectionRecord) { diff --git a/vendor/k8s.io/client-go/tools/leaderelection/metrics.go b/vendor/k8s.io/client-go/tools/leaderelection/metrics.go index 65917bf88e1..7438345fb15 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/metrics.go +++ b/vendor/k8s.io/client-go/tools/leaderelection/metrics.go @@ -26,24 +26,26 @@ import ( type leaderMetricsAdapter interface { leaderOn(name string) leaderOff(name string) + slowpathExercised(name string) } -// GaugeMetric represents a single numerical value that can arbitrarily go up -// and down. -type SwitchMetric interface { +// LeaderMetric instruments metrics used in leader election. +type LeaderMetric interface { On(name string) Off(name string) + SlowpathExercised(name string) } type noopMetric struct{} -func (noopMetric) On(name string) {} -func (noopMetric) Off(name string) {} +func (noopMetric) On(name string) {} +func (noopMetric) Off(name string) {} +func (noopMetric) SlowpathExercised(name string) {} // defaultLeaderMetrics expects the caller to lock before setting any metrics. type defaultLeaderMetrics struct { // leader's value indicates if the current process is the owner of name lease - leader SwitchMetric + leader LeaderMetric } func (m *defaultLeaderMetrics) leaderOn(name string) { @@ -60,19 +62,27 @@ func (m *defaultLeaderMetrics) leaderOff(name string) { m.leader.Off(name) } +func (m *defaultLeaderMetrics) slowpathExercised(name string) { + if m == nil { + return + } + m.leader.SlowpathExercised(name) +} + type noMetrics struct{} -func (noMetrics) leaderOn(name string) {} -func (noMetrics) leaderOff(name string) {} +func (noMetrics) leaderOn(name string) {} +func (noMetrics) leaderOff(name string) {} +func (noMetrics) slowpathExercised(name string) {} // MetricsProvider generates various metrics used by the leader election. type MetricsProvider interface { - NewLeaderMetric() SwitchMetric + NewLeaderMetric() LeaderMetric } type noopMetricsProvider struct{} -func (_ noopMetricsProvider) NewLeaderMetric() SwitchMetric { +func (noopMetricsProvider) NewLeaderMetric() LeaderMetric { return noopMetric{} } diff --git a/vendor/k8s.io/client-go/tools/portforward/OWNERS b/vendor/k8s.io/client-go/tools/portforward/OWNERS new file mode 100644 index 00000000000..3078483072f --- /dev/null +++ b/vendor/k8s.io/client-go/tools/portforward/OWNERS @@ -0,0 +1,10 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: + - aojea + - liggitt + - seans3 +reviewers: + - aojea + - liggitt + - seans3 diff --git a/vendor/k8s.io/client-go/tools/portforward/fallback_dialer.go b/vendor/k8s.io/client-go/tools/portforward/fallback_dialer.go new file mode 100644 index 00000000000..8fb74a41857 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/portforward/fallback_dialer.go @@ -0,0 +1,57 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package portforward + +import ( + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/klog/v2" +) + +var _ httpstream.Dialer = &fallbackDialer{} + +// fallbackDialer encapsulates a primary and secondary dialer, including +// the boolean function to determine if the primary dialer failed. Implements +// the httpstream.Dialer interface. +type fallbackDialer struct { + primary httpstream.Dialer + secondary httpstream.Dialer + shouldFallback func(error) bool +} + +// NewFallbackDialer creates the fallbackDialer with the primary and secondary dialers, +// as well as the boolean function to determine if the primary dialer failed. +func NewFallbackDialer(primary, secondary httpstream.Dialer, shouldFallback func(error) bool) httpstream.Dialer { + return &fallbackDialer{ + primary: primary, + secondary: secondary, + shouldFallback: shouldFallback, + } +} + +// Dial is the single function necessary to implement the "httpstream.Dialer" interface. +// It takes the protocol version strings to request, returning an the upgraded +// httstream.Connection and the negotiated protocol version accepted. If the initial +// primary dialer fails, this function attempts the secondary dialer. Returns an error +// if one occurs. +func (f *fallbackDialer) Dial(protocols ...string) (httpstream.Connection, string, error) { + conn, version, err := f.primary.Dial(protocols...) + if err != nil && f.shouldFallback(err) { + klog.V(4).Infof("fallback to secondary dialer from primary dialer err: %v", err) + return f.secondary.Dial(protocols...) + } + return conn, version, err +} diff --git a/vendor/k8s.io/client-go/tools/portforward/portforward.go b/vendor/k8s.io/client-go/tools/portforward/portforward.go index b581043f6ee..83ef3e929b3 100644 --- a/vendor/k8s.io/client-go/tools/portforward/portforward.go +++ b/vendor/k8s.io/client-go/tools/portforward/portforward.go @@ -191,11 +191,15 @@ func (pf *PortForwarder) ForwardPorts() error { defer pf.Close() var err error - pf.streamConn, _, err = pf.dialer.Dial(PortForwardProtocolV1Name) + var protocol string + pf.streamConn, protocol, err = pf.dialer.Dial(PortForwardProtocolV1Name) if err != nil { return fmt.Errorf("error upgrading connection: %s", err) } defer pf.streamConn.Close() + if protocol != PortForwardProtocolV1Name { + return fmt.Errorf("unable to negotiate protocol: client supports %q, server returned %q", PortForwardProtocolV1Name, protocol) + } return pf.forward() } diff --git a/vendor/k8s.io/client-go/tools/portforward/tunneling_connection.go b/vendor/k8s.io/client-go/tools/portforward/tunneling_connection.go new file mode 100644 index 00000000000..a9c9b18fd60 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/portforward/tunneling_connection.go @@ -0,0 +1,158 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package portforward + +import ( + "errors" + "fmt" + "io" + "net" + "sync" + "time" + + gwebsocket "github.com/gorilla/websocket" + + "k8s.io/klog/v2" +) + +var _ net.Conn = &TunnelingConnection{} + +// TunnelingConnection implements the "httpstream.Connection" interface, wrapping +// a websocket connection that tunnels SPDY. +type TunnelingConnection struct { + name string + conn *gwebsocket.Conn + inProgressMessage io.Reader + closeOnce sync.Once +} + +// NewTunnelingConnection wraps the passed gorilla/websockets connection +// with the TunnelingConnection struct (implementing net.Conn). +func NewTunnelingConnection(name string, conn *gwebsocket.Conn) *TunnelingConnection { + return &TunnelingConnection{ + name: name, + conn: conn, + } +} + +// Read implements "io.Reader" interface, reading from the stored connection +// into the passed buffer "p". Returns the number of bytes read and an error. +// Can keep track of the "inProgress" messsage from the tunneled connection. +func (c *TunnelingConnection) Read(p []byte) (int, error) { + klog.V(7).Infof("%s: tunneling connection read...", c.name) + defer klog.V(7).Infof("%s: tunneling connection read...complete", c.name) + for { + if c.inProgressMessage == nil { + klog.V(8).Infof("%s: tunneling connection read before NextReader()...", c.name) + messageType, nextReader, err := c.conn.NextReader() + if err != nil { + closeError := &gwebsocket.CloseError{} + if errors.As(err, &closeError) && closeError.Code == gwebsocket.CloseNormalClosure { + return 0, io.EOF + } + klog.V(4).Infof("%s:tunneling connection NextReader() error: %v", c.name, err) + return 0, err + } + if messageType != gwebsocket.BinaryMessage { + return 0, fmt.Errorf("invalid message type received") + } + c.inProgressMessage = nextReader + } + klog.V(8).Infof("%s: tunneling connection read in progress message...", c.name) + i, err := c.inProgressMessage.Read(p) + if i == 0 && err == io.EOF { + c.inProgressMessage = nil + } else { + klog.V(8).Infof("%s: read %d bytes, error=%v, bytes=% X", c.name, i, err, p[:i]) + return i, err + } + } +} + +// Write implements "io.Writer" interface, copying the data in the passed +// byte array "p" into the stored tunneled connection. Returns the number +// of bytes written and an error. +func (c *TunnelingConnection) Write(p []byte) (n int, err error) { + klog.V(7).Infof("%s: write: %d bytes, bytes=% X", c.name, len(p), p) + defer klog.V(7).Infof("%s: tunneling connection write...complete", c.name) + w, err := c.conn.NextWriter(gwebsocket.BinaryMessage) + if err != nil { + return 0, err + } + defer func() { + // close, which flushes the message + closeErr := w.Close() + if closeErr != nil && err == nil { + // if closing/flushing errored and we weren't already returning an error, return the close error + err = closeErr + } + }() + + n, err = w.Write(p) + return +} + +// Close implements "io.Closer" interface, signaling the other tunneled connection +// endpoint, and closing the tunneled connection only once. +func (c *TunnelingConnection) Close() error { + var err error + c.closeOnce.Do(func() { + klog.V(7).Infof("%s: tunneling connection Close()...", c.name) + // Signal other endpoint that websocket connection is closing; ignore error. + normalCloseMsg := gwebsocket.FormatCloseMessage(gwebsocket.CloseNormalClosure, "") + writeControlErr := c.conn.WriteControl(gwebsocket.CloseMessage, normalCloseMsg, time.Now().Add(time.Second)) + closeErr := c.conn.Close() + if closeErr != nil { + err = closeErr + } else if writeControlErr != nil { + err = writeControlErr + } + }) + return err +} + +// LocalAddr implements part of the "net.Conn" interface, returning the local +// endpoint network address of the tunneled connection. +func (c *TunnelingConnection) LocalAddr() net.Addr { + return c.conn.LocalAddr() +} + +// LocalAddr implements part of the "net.Conn" interface, returning the remote +// endpoint network address of the tunneled connection. +func (c *TunnelingConnection) RemoteAddr() net.Addr { + return c.conn.RemoteAddr() +} + +// SetDeadline sets the *absolute* time in the future for both +// read and write deadlines. Returns an error if one occurs. +func (c *TunnelingConnection) SetDeadline(t time.Time) error { + rerr := c.SetReadDeadline(t) + werr := c.SetWriteDeadline(t) + return errors.Join(rerr, werr) +} + +// SetDeadline sets the *absolute* time in the future for the +// read deadlines. Returns an error if one occurs. +func (c *TunnelingConnection) SetReadDeadline(t time.Time) error { + return c.conn.SetReadDeadline(t) +} + +// SetDeadline sets the *absolute* time in the future for the +// write deadlines. Returns an error if one occurs. +func (c *TunnelingConnection) SetWriteDeadline(t time.Time) error { + return c.conn.SetWriteDeadline(t) +} diff --git a/vendor/k8s.io/client-go/tools/portforward/tunneling_dialer.go b/vendor/k8s.io/client-go/tools/portforward/tunneling_dialer.go new file mode 100644 index 00000000000..2bef5ecd720 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/portforward/tunneling_dialer.go @@ -0,0 +1,93 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package portforward + +import ( + "fmt" + "net/http" + "net/url" + "strings" + "time" + + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/httpstream/spdy" + constants "k8s.io/apimachinery/pkg/util/portforward" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/transport/websocket" + "k8s.io/klog/v2" +) + +const PingPeriod = 10 * time.Second + +// tunnelingDialer implements "httpstream.Dial" interface +type tunnelingDialer struct { + url *url.URL + transport http.RoundTripper + holder websocket.ConnectionHolder +} + +// NewTunnelingDialer creates and returns the tunnelingDialer structure which implemements the "httpstream.Dialer" +// interface. The dialer can upgrade a websocket request, creating a websocket connection. This function +// returns an error if one occurs. +func NewSPDYOverWebsocketDialer(url *url.URL, config *restclient.Config) (httpstream.Dialer, error) { + transport, holder, err := websocket.RoundTripperFor(config) + if err != nil { + return nil, err + } + return &tunnelingDialer{ + url: url, + transport: transport, + holder: holder, + }, nil +} + +// Dial upgrades to a tunneling streaming connection, returning a SPDY connection +// containing a WebSockets connection (which implements "net.Conn"). Also +// returns the protocol negotiated, or an error. +func (d *tunnelingDialer) Dial(protocols ...string) (httpstream.Connection, string, error) { + // There is no passed context, so skip the context when creating request for now. + // Websockets requires "GET" method: RFC 6455 Sec. 4.1 (page 17). + req, err := http.NewRequest("GET", d.url.String(), nil) + if err != nil { + return nil, "", err + } + // Add the spdy tunneling prefix to the requested protocols. The tunneling + // handler will know how to negotiate these protocols. + tunnelingProtocols := []string{} + for _, protocol := range protocols { + tunnelingProtocol := constants.WebsocketsSPDYTunnelingPrefix + protocol + tunnelingProtocols = append(tunnelingProtocols, tunnelingProtocol) + } + klog.V(4).Infoln("Before WebSocket Upgrade Connection...") + conn, err := websocket.Negotiate(d.transport, d.holder, req, tunnelingProtocols...) + if err != nil { + return nil, "", err + } + if conn == nil { + return nil, "", fmt.Errorf("negotiated websocket connection is nil") + } + protocol := conn.Subprotocol() + protocol = strings.TrimPrefix(protocol, constants.WebsocketsSPDYTunnelingPrefix) + klog.V(4).Infof("negotiated protocol: %s", protocol) + + // Wrap the websocket connection which implements "net.Conn". + tConn := NewTunnelingConnection("client", conn) + // Create SPDY connection injecting the previously created tunneling connection. + spdyConn, err := spdy.NewClientConnectionWithPings(tConn, PingPeriod) + + return spdyConn, protocol, err +} diff --git a/vendor/k8s.io/client-go/tools/record/event.go b/vendor/k8s.io/client-go/tools/record/event.go index d1511696d0f..0745fb4a357 100644 --- a/vendor/k8s.io/client-go/tools/record/event.go +++ b/vendor/k8s.io/client-go/tools/record/event.go @@ -198,16 +198,29 @@ func NewBroadcaster(opts ...BroadcasterOption) EventBroadcaster { ctx := c.Context if ctx == nil { ctx = context.Background() - } else { + } + // The are two scenarios where it makes no sense to wait for context cancelation: + // - The context was nil. + // - The context was context.Background() to begin with. + // + // Both cases get checked here. + haveCtxCancelation := ctx.Done() == nil + + eventBroadcaster.cancelationCtx, eventBroadcaster.cancel = context.WithCancel(ctx) + + if haveCtxCancelation { // Calling Shutdown is not required when a context was provided: // when the context is canceled, this goroutine will shut down // the broadcaster. + // + // If Shutdown is called first, then this goroutine will + // also stop. go func() { - <-ctx.Done() + <-eventBroadcaster.cancelationCtx.Done() eventBroadcaster.Broadcaster.Shutdown() }() } - eventBroadcaster.cancelationCtx, eventBroadcaster.cancel = context.WithCancel(ctx) + return eventBroadcaster } diff --git a/vendor/k8s.io/client-go/tools/remotecommand/OWNERS b/vendor/k8s.io/client-go/tools/remotecommand/OWNERS new file mode 100644 index 00000000000..3078483072f --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/OWNERS @@ -0,0 +1,10 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: + - aojea + - liggitt + - seans3 +reviewers: + - aojea + - liggitt + - seans3 diff --git a/vendor/k8s.io/client-go/tools/remotecommand/fallback.go b/vendor/k8s.io/client-go/tools/remotecommand/fallback.go index 4846cdb5509..3efde3c5883 100644 --- a/vendor/k8s.io/client-go/tools/remotecommand/fallback.go +++ b/vendor/k8s.io/client-go/tools/remotecommand/fallback.go @@ -20,9 +20,9 @@ import ( "context" ) -var _ Executor = &fallbackExecutor{} +var _ Executor = &FallbackExecutor{} -type fallbackExecutor struct { +type FallbackExecutor struct { primary Executor secondary Executor shouldFallback func(error) bool @@ -33,7 +33,7 @@ type fallbackExecutor struct { // websocket "StreamWithContext" call fails. // func NewFallbackExecutor(config *restclient.Config, method string, url *url.URL) (Executor, error) { func NewFallbackExecutor(primary, secondary Executor, shouldFallback func(error) bool) (Executor, error) { - return &fallbackExecutor{ + return &FallbackExecutor{ primary: primary, secondary: secondary, shouldFallback: shouldFallback, @@ -41,14 +41,14 @@ func NewFallbackExecutor(primary, secondary Executor, shouldFallback func(error) } // Stream is deprecated. Please use "StreamWithContext". -func (f *fallbackExecutor) Stream(options StreamOptions) error { +func (f *FallbackExecutor) Stream(options StreamOptions) error { return f.StreamWithContext(context.Background(), options) } // StreamWithContext initially attempts to call "StreamWithContext" using the // primary executor, falling back to calling the secondary executor if the // initial primary call to upgrade to a websocket connection fails. -func (f *fallbackExecutor) StreamWithContext(ctx context.Context, options StreamOptions) error { +func (f *FallbackExecutor) StreamWithContext(ctx context.Context, options StreamOptions) error { err := f.primary.StreamWithContext(ctx, options) if f.shouldFallback(err) { return f.secondary.StreamWithContext(ctx, options) diff --git a/vendor/k8s.io/client-go/tools/remotecommand/websocket.go b/vendor/k8s.io/client-go/tools/remotecommand/websocket.go index 49ef4717cd9..1dc679cb1fb 100644 --- a/vendor/k8s.io/client-go/tools/remotecommand/websocket.go +++ b/vendor/k8s.io/client-go/tools/remotecommand/websocket.go @@ -36,13 +36,9 @@ import ( "k8s.io/klog/v2" ) -// writeDeadline defines the time that a write to the websocket connection -// must complete by, otherwise an i/o timeout occurs. The writeDeadline -// has nothing to do with a response from the other websocket connection -// endpoint; only that the message was successfully processed by the -// local websocket connection. The typical write deadline within the websocket -// library is one second. -const writeDeadline = 2 * time.Second +// writeDeadline defines the time that a client-side write to the websocket +// connection must complete before an i/o timeout occurs. +const writeDeadline = 60 * time.Second var ( _ Executor = &wsStreamExecutor{} @@ -65,8 +61,8 @@ const ( // "pong" message before a timeout error occurs for websocket reading. // This duration must always be greater than the "pingPeriod". By defining // this deadline in terms of the ping period, we are essentially saying - // we can drop "X-1" (e.g. 3-1=2) pings before firing the timeout. - pingReadDeadline = (pingPeriod * 3) + (1 * time.Second) + // we can drop "X" (e.g. 12) pings before firing the timeout. + pingReadDeadline = (pingPeriod * 12) + (1 * time.Second) ) // wsStreamExecutor handles transporting standard shell streams over an httpstream connection. @@ -497,7 +493,7 @@ func (h *heartbeat) start() { // "WriteControl" does not need to be protected by a mutex. According to // gorilla/websockets library docs: "The Close and WriteControl methods can // be called concurrently with all other methods." - if err := h.conn.WriteControl(gwebsocket.PingMessage, h.message, time.Now().Add(writeDeadline)); err == nil { + if err := h.conn.WriteControl(gwebsocket.PingMessage, h.message, time.Now().Add(pingReadDeadline)); err == nil { klog.V(8).Infof("Websocket Ping succeeeded") } else { klog.Errorf("Websocket Ping failed: %v", err) diff --git a/vendor/k8s.io/client-go/transport/websocket/roundtripper.go b/vendor/k8s.io/client-go/transport/websocket/roundtripper.go index 010f916bc7b..624dd5473a1 100644 --- a/vendor/k8s.io/client-go/transport/websocket/roundtripper.go +++ b/vendor/k8s.io/client-go/transport/websocket/roundtripper.go @@ -18,6 +18,7 @@ package websocket import ( "crypto/tls" + "errors" "fmt" "net/http" "net/url" @@ -25,6 +26,7 @@ import ( gwebsocket "github.com/gorilla/websocket" "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/httpstream/wsstream" utilnet "k8s.io/apimachinery/pkg/util/net" restclient "k8s.io/client-go/rest" "k8s.io/client-go/transport" @@ -88,8 +90,8 @@ func (rt *RoundTripper) RoundTrip(request *http.Request) (retResp *http.Response }() // set the protocol version directly on the dialer from the header - protocolVersions := request.Header[httpstream.HeaderProtocolVersion] - delete(request.Header, httpstream.HeaderProtocolVersion) + protocolVersions := request.Header[wsstream.WebSocketProtocolHeader] + delete(request.Header, wsstream.WebSocketProtocolHeader) dialer := gwebsocket.Dialer{ Proxy: rt.Proxier, @@ -108,7 +110,23 @@ func (rt *RoundTripper) RoundTrip(request *http.Request) (retResp *http.Response } wsConn, resp, err := dialer.DialContext(request.Context(), request.URL.String(), request.Header) if err != nil { - return nil, &httpstream.UpgradeFailureError{Cause: err} + if errors.Is(err, gwebsocket.ErrBadHandshake) { + return nil, &httpstream.UpgradeFailureError{Cause: err} + } + return nil, err + } + + // Ensure we got back a protocol we understand + foundProtocol := false + for _, protocolVersion := range protocolVersions { + if protocolVersion == wsConn.Subprotocol() { + foundProtocol = true + break + } + } + if !foundProtocol { + wsConn.Close() // nolint:errcheck + return nil, &httpstream.UpgradeFailureError{Cause: fmt.Errorf("invalid protocol, expected one of %q, got %q", protocolVersions, wsConn.Subprotocol())} } rt.Conn = wsConn @@ -149,7 +167,8 @@ func RoundTripperFor(config *restclient.Config) (http.RoundTripper, ConnectionHo // a WebSocket connection. Upon success, it returns the negotiated connection. // The round tripper rt must use the WebSocket round tripper wsRt - see RoundTripperFor. func Negotiate(rt http.RoundTripper, connectionInfo ConnectionHolder, req *http.Request, protocols ...string) (*gwebsocket.Conn, error) { - req.Header[httpstream.HeaderProtocolVersion] = protocols + // Plumb protocols to RoundTripper#RoundTrip + req.Header[wsstream.WebSocketProtocolHeader] = protocols resp, err := rt.RoundTrip(req) if err != nil { return nil, err diff --git a/vendor/k8s.io/client-go/util/flowcontrol/backoff.go b/vendor/k8s.io/client-go/util/flowcontrol/backoff.go index 3ef88dbdb89..82e4c4c4089 100644 --- a/vendor/k8s.io/client-go/util/flowcontrol/backoff.go +++ b/vendor/k8s.io/client-go/util/flowcontrol/backoff.go @@ -23,7 +23,6 @@ import ( "k8s.io/utils/clock" testingclock "k8s.io/utils/clock/testing" - "k8s.io/utils/integer" ) type backoffEntry struct { @@ -100,7 +99,7 @@ func (p *Backoff) Next(id string, eventTime time.Time) { } else { delay := entry.backoff * 2 // exponential delay += p.jitter(entry.backoff) // add some jitter to the delay - entry.backoff = time.Duration(integer.Int64Min(int64(delay), int64(p.maxDuration))) + entry.backoff = min(delay, p.maxDuration) } entry.lastUpdate = p.Clock.Now() } diff --git a/vendor/k8s.io/code-generator/README.md b/vendor/k8s.io/code-generator/README.md index 122868a5c63..b0055265ec3 100644 --- a/vendor/k8s.io/code-generator/README.md +++ b/vendor/k8s.io/code-generator/README.md @@ -14,6 +14,10 @@ These code-generators can be used - The example [sample controller](https://github.com/kubernetes/sample-controller) shows a code example of a controller that uses the clients, listers and informers generated by this library. - The article [Kubernetes Deep Dive: Code Generation for CustomResources](https://cloud.redhat.com/blog/kubernetes-deep-dive-code-generation-customresources/) gives a step by step instruction on how to use this library. +## Usage + +The examples above are dated. The current recommended script to use is [kube_codegen.sh](kube_codegen.sh). + ## Compatibility HEAD of this repo will match HEAD of k8s.io/apiserver, k8s.io/apimachinery, and k8s.io/client-go. diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/args.go index 78f364841f2..36aa7a3710f 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/args.go @@ -18,17 +18,18 @@ package args import ( "fmt" - "path" "github.com/spf13/pflag" - "k8s.io/gengo/args" - "k8s.io/gengo/types" - - codegenutil "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/v2/types" ) -// CustomArgs is a wrapper for arguments to applyconfiguration-gen. -type CustomArgs struct { +// Args is a wrapper for arguments to applyconfiguration-gen. +type Args struct { + OutputDir string // must be a directory path + OutputPkg string // must be a Go import-path + + GoHeaderFile string + // ExternalApplyConfigurations provides the locations of externally generated // apply configuration types for types referenced by the go structs provided as input. // Locations are provided as a comma separated list of .: @@ -44,38 +45,44 @@ type CustomArgs struct { OpenAPISchemaFilePath string } -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{ +// New returns default arguments for the generator. +func New() *Args { + return &Args{ ExternalApplyConfigurations: map[types.Name]string{ - // Always include TypeMeta and ObjectMeta. They are sufficient for the vast majority of use cases. - {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "TypeMeta"}: "k8s.io/client-go/applyconfigurations/meta/v1", - {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ObjectMeta"}: "k8s.io/client-go/applyconfigurations/meta/v1", - {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "OwnerReference"}: "k8s.io/client-go/applyconfigurations/meta/v1", + // Always include the applyconfigurations we've generated in client-go. They are sufficient for the vast majority of use cases. + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "Condition"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "DeleteOptions"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "LabelSelector"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "LabelSelectorRequirement"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ManagedFieldsEntry"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ObjectMeta"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "OwnerReference"}: "k8s.io/client-go/applyconfigurations/meta/v1", + {Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "TypeMeta"}: "k8s.io/client-go/applyconfigurations/meta/v1", }, } - genericArgs.CustomArgs = customArgs - - if pkg := codegenutil.CurrentPackage(); len(pkg) != 0 { - genericArgs.OutputPackagePath = path.Join(pkg, "pkg/client/applyconfigurations") - } - - return genericArgs, customArgs } -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet, inputBase string) { - pflag.Var(NewExternalApplyConfigurationValue(&ca.ExternalApplyConfigurations, nil), "external-applyconfigurations", +func (args *Args) AddFlags(fs *pflag.FlagSet, inputBase string) { + fs.StringVar(&args.OutputDir, "output-dir", "", + "the base directory under which to generate results") + fs.StringVar(&args.OutputPkg, "output-pkg", args.OutputPkg, + "the Go import-path of the generated results") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") + fs.Var(NewExternalApplyConfigurationValue(&args.ExternalApplyConfigurations, nil), "external-applyconfigurations", "list of comma separated external apply configurations locations in .: form."+ "For example: k8s.io/api/apps/v1.Deployment:k8s.io/client-go/applyconfigurations/apps/v1") - pflag.StringVar(&ca.OpenAPISchemaFilePath, "openapi-schema", "", + fs.StringVar(&args.OpenAPISchemaFilePath, "openapi-schema", "", "path to the openapi schema containing all the types that apply configurations will be generated for") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - if len(genericArgs.OutputPackagePath) == 0 { - return fmt.Errorf("output package cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputDir) == 0 { + return fmt.Errorf("--output-dir must be specified") + } + if len(args.OutputPkg) == 0 { + return fmt.Errorf("--output-pkg must be specified") } return nil } diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/externaltypes.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/externaltypes.go index 0785fbea0e3..fd9b6098992 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/externaltypes.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/args/externaltypes.go @@ -23,7 +23,7 @@ import ( "fmt" "strings" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" ) type externalApplyConfigurationValue struct { diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go index 8e02bb233bc..ee4743aa279 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go @@ -18,11 +18,12 @@ package generators import ( "io" + "path" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" "k8s.io/code-generator/cmd/client-gen/generators/util" @@ -31,14 +32,15 @@ import ( // applyConfigurationGenerator produces apply configurations for a given GroupVersion and type. type applyConfigurationGenerator struct { - generator.DefaultGen - outputPackage string - localPackage types.Name - groupVersion clientgentypes.GroupVersion - applyConfig applyConfig - imports namer.ImportTracker - refGraph refGraph - openAPIType *string // if absent, extraction function cannot be generated + generator.GoGenerator + // outPkgBase is the base package, under which the "internal" and GV-specific subdirs live + outPkgBase string // must be a Go import-path + localPkg string + groupVersion clientgentypes.GroupVersion + applyConfig applyConfig + imports namer.ImportTracker + refGraph refGraph + openAPIType *string // if absent, extraction function cannot be generated } var _ generator.Generator = &applyConfigurationGenerator{} @@ -49,7 +51,7 @@ func (g *applyConfigurationGenerator) Filter(_ *generator.Context, t *types.Type func (g *applyConfigurationGenerator) Namers(*generator.Context) namer.NameSystems { return namer.NameSystems{ - "raw": namer.NewRawNamer(g.localPackage.Package, g.imports), + "raw": namer.NewRawNamer(g.localPkg, g.imports), "singularKind": namer.NewPublicNamer(0), } } @@ -90,7 +92,7 @@ func (g *applyConfigurationGenerator) GenerateType(c *generator.Context, t *type Tags: genclientTags(t), APIVersion: g.groupVersion.ToAPIVersion(), ExtractInto: extractInto, - ParserFunc: types.Ref(g.outputPackage+"/internal", "Parser"), + ParserFunc: types.Ref(path.Join(g.outPkgBase, "internal"), "Parser"), OpenAPIType: g.openAPIType, } @@ -334,7 +336,7 @@ func (b *$.ApplyConfig.ApplyConfiguration|public$) ensure$.MemberType.Elem|publi var clientgenTypeConstructorNamespaced = ` // $.ApplyConfig.Type|public$ constructs an declarative configuration of the $.ApplyConfig.Type|public$ type for use with -// apply. +// apply. func $.ApplyConfig.Type|public$(name, namespace string) *$.ApplyConfig.ApplyConfiguration|public$ { b := &$.ApplyConfig.ApplyConfiguration|public${} b.WithName(name) diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go index 2871b9d7f5e..abd65010007 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go @@ -23,14 +23,14 @@ import ( "k8s.io/kube-openapi/pkg/schemaconv" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // utilGenerator generates the ForKind() utility function. type internalGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker typeModels *typeModels diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/jsontagutil.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/jsontagutil.go index 2a643290bb9..c11d05deef7 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/jsontagutil.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/jsontagutil.go @@ -20,7 +20,7 @@ import ( "reflect" "strings" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" ) // TODO: This implements the same functionality as https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go#L236 diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go index 00d119dd65c..00ca1a99bfb 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go @@ -23,7 +23,7 @@ import ( "strings" openapiv2 "github.com/google/gnostic-models/openapiv2" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" utilproto "k8s.io/kube-openapi/pkg/util/proto" "k8s.io/kube-openapi/pkg/validation/spec" ) diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/refgraph.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/refgraph.go index d1f95112796..8b46755298c 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/refgraph.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/refgraph.go @@ -17,7 +17,7 @@ limitations under the License. package generators import ( - "k8s.io/gengo/types" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" ) @@ -171,9 +171,5 @@ func requiresApplyConfiguration(t *types.Type) bool { hasJSONTaggedMembers = true } } - if !hasJSONTaggedMembers { - return false - } - - return true + return hasJSONTaggedMembers } diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/packages.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go similarity index 64% rename from vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/packages.go rename to vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go index bfeffda593d..debab90e115 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/packages.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go @@ -23,13 +23,13 @@ import ( "sort" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" - applygenargs "k8s.io/code-generator/cmd/applyconfiguration-gen/args" + "k8s.io/code-generator/cmd/applyconfiguration-gen/args" "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" ) @@ -54,32 +54,29 @@ func DefaultNameSystem() string { return "public" } -// Packages makes the client package definition. -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +// GetTargets makes the client target definition. +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, "", gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - pkgTypes := packageTypesForInputDirs(context, arguments.InputDirs, arguments.OutputPackagePath) - customArgs := arguments.CustomArgs.(*applygenargs.CustomArgs) - initialTypes := customArgs.ExternalApplyConfigurations + pkgTypes := packageTypesForInputs(context, args.OutputPkg) + initialTypes := args.ExternalApplyConfigurations refs := refGraphForReachableTypes(context.Universe, pkgTypes, initialTypes) - typeModels, err := newTypeModels(customArgs.OpenAPISchemaFilePath, pkgTypes) + typeModels, err := newTypeModels(args.OpenAPISchemaFilePath, pkgTypes) if err != nil { - klog.Fatalf("Failed build type models from typeModels %s: %v", customArgs.OpenAPISchemaFilePath, err) + klog.Fatalf("Failed build type models from typeModels %s: %v", args.OpenAPISchemaFilePath, err) } groupVersions := make(map[string]clientgentypes.GroupVersions) groupGoNames := make(map[string]string) applyConfigsForGroupVersion := make(map[clientgentypes.GroupVersion][]applyConfig) - var packageList generator.Packages + var targetList []generator.Target for pkg, p := range pkgTypes { gv := groupVersion(p) - pkgType := types.Name{Name: gv.Group.PackageName(), Package: pkg} - var toGenerate []applyConfig for _, t := range p.Types { // If we don't have an ObjectMeta field, we lack the information required to make the Apply or ApplyStatus call @@ -101,8 +98,17 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat } sort.Sort(applyConfigSort(toGenerate)) + // Apparently we allow the groupName to be overridden in a way that it + // no longer maps to a Go package by name. So we have to figure out + // the offset of this particular output package (pkg) from the base + // output package (args.OutputPkg). + pkgSubdir := strings.TrimPrefix(pkg, args.OutputPkg+"/") + // generate the apply configurations - packageList = append(packageList, generatorForApplyConfigurationsPackage(arguments.OutputPackagePath, boilerplate, pkgType, gv, toGenerate, refs, typeModels)) + targetList = append(targetList, + targetForApplyConfigurationsPackage( + args.OutputDir, args.OutputPkg, pkgSubdir, + boilerplate, gv, toGenerate, refs, typeModels)) // group all the generated apply configurations by gv so ForKind() can be generated groupPackageName := gv.Group.NonEmpty() @@ -124,11 +130,15 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat } // generate ForKind() utility function - packageList = append(packageList, generatorForUtils(arguments.OutputPackagePath, boilerplate, groupVersions, applyConfigsForGroupVersion, groupGoNames)) + targetList = append(targetList, + targetForUtils(args.OutputDir, args.OutputPkg, + boilerplate, groupVersions, applyConfigsForGroupVersion, groupGoNames)) // generate internal embedded schema, required for generated Extract functions - packageList = append(packageList, generatorForInternal(filepath.Join(arguments.OutputPackagePath, "internal"), boilerplate, typeModels)) + targetList = append(targetList, + targetForInternal(args.OutputDir, args.OutputPkg, + boilerplate, typeModels)) - return packageList + return targetList } func friendlyName(name string) string { @@ -146,18 +156,19 @@ func friendlyName(name string) string { func typeName(t *types.Type) string { typePackage := t.Name.Package - if strings.Contains(typePackage, "/vendor/") { - typePackage = typePackage[strings.Index(typePackage, "/vendor/")+len("/vendor/"):] - } return fmt.Sprintf("%s.%s", typePackage, t.Name.Name) } -func generatorForApplyConfigurationsPackage(outputPackagePath string, boilerplate []byte, packageName types.Name, gv clientgentypes.GroupVersion, typesToGenerate []applyConfig, refs refGraph, models *typeModels) *generator.DefaultPackage { - return &generator.DefaultPackage{ - PackageName: gv.Version.PackageName(), - PackagePath: packageName.Package, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { +func targetForApplyConfigurationsPackage(outputDirBase, outputPkgBase, pkgSubdir string, boilerplate []byte, gv clientgentypes.GroupVersion, typesToGenerate []applyConfig, refs refGraph, models *typeModels) generator.Target { + outputDir := filepath.Join(outputDirBase, pkgSubdir) + outputPkg := path.Join(outputPkgBase, pkgSubdir) + + return &generator.SimpleTarget{ + PkgName: gv.Version.PackageName(), + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { for _, toGenerate := range typesToGenerate { var openAPIType *string gvk := gvk{ @@ -170,16 +181,16 @@ func generatorForApplyConfigurationsPackage(outputPackagePath string, boilerplat } generators = append(generators, &applyConfigurationGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: strings.ToLower(toGenerate.Type.Name.Name), + GoGenerator: generator.GoGenerator{ + OutputFilename: strings.ToLower(toGenerate.Type.Name.Name) + ".go", }, - outputPackage: outputPackagePath, - localPackage: packageName, - groupVersion: gv, - applyConfig: toGenerate, - imports: generator.NewImportTracker(), - refGraph: refs, - openAPIType: openAPIType, + outPkgBase: outputPkgBase, + localPkg: outputPkg, + groupVersion: gv, + applyConfig: toGenerate, + imports: generator.NewImportTracker(), + refGraph: refs, + openAPIType: openAPIType, }) } return generators @@ -187,17 +198,18 @@ func generatorForApplyConfigurationsPackage(outputPackagePath string, boilerplat } } -func generatorForUtils(outPackagePath string, boilerplate []byte, groupVersions map[string]clientgentypes.GroupVersions, applyConfigsForGroupVersion map[clientgentypes.GroupVersion][]applyConfig, groupGoNames map[string]string) *generator.DefaultPackage { - return &generator.DefaultPackage{ - PackageName: filepath.Base(outPackagePath), - PackagePath: outPackagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { +func targetForUtils(outputDirBase, outputPkgBase string, boilerplate []byte, groupVersions map[string]clientgentypes.GroupVersions, applyConfigsForGroupVersion map[clientgentypes.GroupVersion][]applyConfig, groupGoNames map[string]string) generator.Target { + return &generator.SimpleTarget{ + PkgName: path.Base(outputPkgBase), + PkgPath: outputPkgBase, + PkgDir: outputDirBase, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &utilGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "utils", + GoGenerator: generator.GoGenerator{ + OutputFilename: "utils.go", }, - outputPackage: outPackagePath, + outputPackage: outputPkgBase, imports: generator.NewImportTracker(), groupVersions: groupVersions, typesForGroupVersion: applyConfigsForGroupVersion, @@ -208,17 +220,20 @@ func generatorForUtils(outPackagePath string, boilerplate []byte, groupVersions } } -func generatorForInternal(outPackagePath string, boilerplate []byte, models *typeModels) *generator.DefaultPackage { - return &generator.DefaultPackage{ - PackageName: filepath.Base(outPackagePath), - PackagePath: outPackagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { +func targetForInternal(outputDirBase, outputPkgBase string, boilerplate []byte, models *typeModels) generator.Target { + outputDir := filepath.Join(outputDirBase, "internal") + outputPkg := path.Join(outputPkgBase, "internal") + return &generator.SimpleTarget{ + PkgName: path.Base(outputPkg), + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &internalGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "internal", + GoGenerator: generator.GoGenerator{ + OutputFilename: "internal.go", }, - outputPackage: outPackagePath, + outputPackage: outputPkgBase, imports: generator.NewImportTracker(), typeModels: models, }) @@ -229,15 +244,15 @@ func generatorForInternal(outPackagePath string, boilerplate []byte, models *typ func goName(gv clientgentypes.GroupVersion, p *types.Package) string { goName := namer.IC(strings.Split(gv.Group.NonEmpty(), ".")[0]) - if override := types.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { goName = namer.IC(override[0]) } return goName } -func packageTypesForInputDirs(context *generator.Context, inputDirs []string, outputPath string) map[string]*types.Package { +func packageTypesForInputs(context *generator.Context, outPkgBase string) map[string]*types.Package { pkgTypes := map[string]*types.Package{} - for _, inputDir := range inputDirs { + for _, inputDir := range context.Inputs { p := context.Universe.Package(inputDir) internal := isInternalPackage(p) if internal { @@ -249,7 +264,7 @@ func packageTypesForInputDirs(context *generator.Context, inputDirs []string, ou // For example, if openshift/api/cloudnetwork/v1 contains an apigroup cloud.network.openshift.io, the client-gen // builds a package called cloudnetwork/v1 to contain it. This change makes the applyconfiguration-gen use the same. _, gvPackageString := util.ParsePathGroupVersion(p.Path) - pkg := filepath.Join(outputPath, strings.ToLower(gvPackageString)) + pkg := path.Join(outPkgBase, strings.ToLower(gvPackageString)) pkgTypes[pkg] = p } return pkgTypes @@ -263,7 +278,7 @@ func groupVersion(p *types.Package) (gv clientgentypes.GroupVersion) { // If there's a comment of the form "// +groupName=somegroup" or // "// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as the name of the // group when generating. - if override := types.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { gv.Group = clientgentypes.Group(override[0]) } return gv diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go index 66578ae0489..1e7718f4782 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go @@ -16,7 +16,7 @@ limitations under the License. package generators -import "k8s.io/gengo/types" +import "k8s.io/gengo/v2/types" var ( applyConfiguration = types.Ref("k8s.io/apimachinery/pkg/runtime", "ApplyConfiguration") diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/util.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/util.go index 258293afea5..4d4333d755a 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/util.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/util.go @@ -23,14 +23,14 @@ import ( clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // utilGenerator generates the ForKind() utility function. type utilGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker groupVersions map[string]clientgentypes.GroupVersions diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/main.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/main.go index b4e264042aa..f6b03f8877b 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/main.go @@ -14,39 +14,45 @@ See the License for the specific language governing permissions and limitations under the License. */ -// typebuilder-gen is a tool for auto-generating apply builder functions. +// applyconfiguration-gen is a tool for auto-generating apply builder functions. package main import ( "flag" "github.com/spf13/pflag" - "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/applyconfiguration-gen/args" + "k8s.io/code-generator/cmd/applyconfiguration-gen/args" "k8s.io/code-generator/cmd/applyconfiguration-gen/generators" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/klog/v2" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine, "k8s.io/kubernetes/pkg/apis") // TODO: move this input path out of applyconfiguration-gen + args := args.New() + args.AddFlags(pflag.CommandLine, "k8s.io/kubernetes/pkg/apis") // TODO: move this input path out of applyconfiguration-gen if err := flag.Set("logtostderr", "true"); err != nil { klog.Fatalf("Error: %v", err) } pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( + if err := gengo.Execute( generators.NameSystems(), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go index 4460ad26a25..e0914e69d2f 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go @@ -18,19 +18,22 @@ package args import ( "fmt" - "path" "github.com/spf13/pflag" - "k8s.io/gengo/args" "k8s.io/code-generator/cmd/client-gen/types" - codegenutil "k8s.io/code-generator/pkg/util" ) -var DefaultInputDirs = []string{} +type Args struct { + // The directory for the generated results. + OutputDir string + + // The Go import-path of the generated results. + OutputPkg string + + // The boilerplate header for Go files. + GoHeaderFile string -// CustomArgs is a wrapper for arguments to client-gen. -type CustomArgs struct { // A sorted list of group versions to generate. For each of them the package path is found // in GroupVersionToInputPath. Groups []types.GroupVersions @@ -53,69 +56,75 @@ type CustomArgs struct { // For example 'Endpoints:Endpoints', otherwise the pluralizer will generate 'Endpointes'. PluralExceptions []string - // ApplyConfigurationPackage is the package of apply builders generated by typebuilder-gen. + // ApplyConfigurationPackage is the package of apply builders generated by + // applyconfiguration-gen. // If non-empty, Apply functions are generated for each type and reference the apply builders. // If empty (""), Apply functions are not generated. ApplyConfigurationPackage string } -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{ +func New() *Args { + return &Args{ ClientsetName: "internalclientset", ClientsetAPIPath: "/apis", ClientsetOnly: false, FakeClient: true, - PluralExceptions: []string{"Endpoints:Endpoints"}, ApplyConfigurationPackage: "", } - genericArgs.CustomArgs = customArgs - genericArgs.InputDirs = DefaultInputDirs - - if pkg := codegenutil.CurrentPackage(); len(pkg) != 0 { - genericArgs.OutputPackagePath = path.Join(pkg, "pkg/client/clientset") - } - - return genericArgs, customArgs } -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet, inputBase string) { - gvsBuilder := NewGroupVersionsBuilder(&ca.Groups) - pflag.Var(NewGVPackagesValue(gvsBuilder, nil), "input", "group/versions that client-gen will generate clients for. At most one version per group is allowed. Specified in the format \"group1/version1,group2/version2...\".") - pflag.Var(NewGVTypesValue(&ca.IncludedTypesOverrides, []string{}), "included-types-overrides", "list of group/version/type for which client should be generated. By default, client is generated for all types which have genclient in types.go. This overrides that. For each groupVersion in this list, only the types mentioned here will be included. The default check of genclient will be used for other group versions.") - pflag.Var(NewInputBasePathValue(gvsBuilder, inputBase), "input-base", "base path to look for the api group.") - pflag.StringVarP(&ca.ClientsetName, "clientset-name", "n", ca.ClientsetName, "the name of the generated clientset package.") - pflag.StringVarP(&ca.ClientsetAPIPath, "clientset-api-path", "", ca.ClientsetAPIPath, "the value of default API HTTP path, starting with / and without trailing /.") - pflag.BoolVar(&ca.ClientsetOnly, "clientset-only", ca.ClientsetOnly, "when set, client-gen only generates the clientset shell, without generating the individual typed clients") - pflag.BoolVar(&ca.FakeClient, "fake-clientset", ca.FakeClient, "when set, client-gen will generate the fake clientset that can be used in tests") - - fs.StringSliceVar(&ca.PluralExceptions, "plural-exceptions", ca.PluralExceptions, "list of comma separated plural exception definitions in Type:PluralizedType form") - fs.StringVar(&ca.ApplyConfigurationPackage, "apply-configuration-package", ca.ApplyConfigurationPackage, "optional package of apply configurations, generated by applyconfiguration-gen, that are required to generate Apply functions for each type in the clientset. By default Apply functions are not generated.") +func (args *Args) AddFlags(fs *pflag.FlagSet, inputBase string) { + gvsBuilder := NewGroupVersionsBuilder(&args.Groups) + fs.StringVar(&args.OutputDir, "output-dir", "", + "the base directory under which to generate results") + fs.StringVar(&args.OutputPkg, "output-pkg", args.OutputPkg, + "the Go import-path of the generated results") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") + fs.Var(NewGVPackagesValue(gvsBuilder, nil), "input", + "group/versions that client-gen will generate clients for. At most one version per group is allowed. Specified in the format \"group1/version1,group2/version2...\".") + fs.Var(NewGVTypesValue(&args.IncludedTypesOverrides, []string{}), "included-types-overrides", + "list of group/version/type for which client should be generated. By default, client is generated for all types which have genclient in types.go. This overrides that. For each groupVersion in this list, only the types mentioned here will be included. The default check of genclient will be used for other group versions.") + fs.Var(NewInputBasePathValue(gvsBuilder, inputBase), "input-base", + "base path to look for the api group.") + fs.StringVarP(&args.ClientsetName, "clientset-name", "n", args.ClientsetName, + "the name of the generated clientset package.") + fs.StringVarP(&args.ClientsetAPIPath, "clientset-api-path", "", args.ClientsetAPIPath, + "the value of default API HTTP path, starting with / and without trailing /.") + fs.BoolVar(&args.ClientsetOnly, "clientset-only", args.ClientsetOnly, + "when set, client-gen only generates the clientset shell, without generating the individual typed clients") + fs.BoolVar(&args.FakeClient, "fake-clientset", args.FakeClient, + "when set, client-gen will generate the fake clientset that can be used in tests") + fs.StringSliceVar(&args.PluralExceptions, "plural-exceptions", args.PluralExceptions, + "list of comma separated plural exception definitions in Type:PluralizedType form") + fs.StringVar(&args.ApplyConfigurationPackage, "apply-configuration-package", args.ApplyConfigurationPackage, + "optional package of apply configurations, generated by applyconfiguration-gen, that are required to generate Apply functions for each type in the clientset. By default Apply functions are not generated.") // support old flags - fs.SetNormalizeFunc(mapFlagName("clientset-path", "output-package", fs.GetNormalizeFunc())) + fs.SetNormalizeFunc(mapFlagName("clientset-path", "output-pkg", fs.GetNormalizeFunc())) } -func Validate(genericArgs *args.GeneratorArgs) error { - customArgs := genericArgs.CustomArgs.(*CustomArgs) - - if len(genericArgs.OutputPackagePath) == 0 { - return fmt.Errorf("output package cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputDir) == 0 { + return fmt.Errorf("--output-dir must be specified") + } + if len(args.OutputPkg) == 0 { + return fmt.Errorf("--output-pkg must be specified") } - if len(customArgs.ClientsetName) == 0 { - return fmt.Errorf("clientset name cannot be empty") + if len(args.ClientsetName) == 0 { + return fmt.Errorf("--clientset-name must be specified") } - if len(customArgs.ClientsetAPIPath) == 0 { - return fmt.Errorf("clientset API path cannot be empty") + if len(args.ClientsetAPIPath) == 0 { + return fmt.Errorf("--clientset-api-path cannot be empty") } return nil } // GroupVersionPackages returns a map from GroupVersion to the package with the types.go. -func (ca *CustomArgs) GroupVersionPackages() map[types.GroupVersion]string { +func (args *Args) GroupVersionPackages() map[types.GroupVersion]string { res := map[types.GroupVersion]string{} - for _, pkg := range ca.Groups { + for _, pkg := range args.Groups { for _, v := range pkg.Versions { res[types.GroupVersion{Group: pkg.Group, Version: v.Version}] = v.Package } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages.go b/vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages.go index 50d29a95be1..f5e7f4063aa 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages.go @@ -129,7 +129,9 @@ func (p *groupVersionsBuilder) update() error { versionPkg := types.PackageVersion{Package: path.Join(p.importBasePath, pth, gv.Group.NonEmpty(), gv.Version.String()), Version: gv.Version} if group, ok := seenGroups[gv.Group]; ok { - seenGroups[gv.Group].Versions = append(group.Versions, versionPkg) + vers := group.Versions + vers = append(vers, versionPkg) + seenGroups[gv.Group].Versions = vers } else { seenGroups[gv.Group] = &types.GroupVersions{ PackageName: gv.Group.NonEmpty(), diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go index ef4466d8005..84193f91503 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go @@ -18,21 +18,21 @@ limitations under the License. package generators import ( + "fmt" + "path" "path/filepath" "strings" - clientgenargs "k8s.io/code-generator/cmd/client-gen/args" + "k8s.io/code-generator/cmd/client-gen/args" "k8s.io/code-generator/cmd/client-gen/generators/fake" "k8s.io/code-generator/cmd/client-gen/generators/scheme" "k8s.io/code-generator/cmd/client-gen/generators/util" - "k8s.io/code-generator/cmd/client-gen/path" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" codegennamer "k8s.io/code-generator/pkg/namer" - genutil "k8s.io/code-generator/pkg/util" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) @@ -128,31 +128,35 @@ func DefaultNameSystem() string { return "public" } -func packageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clientsetPackage string, groupPackageName string, groupGoName string, apiPath string, srcTreePath string, inputPackage string, applyBuilderPackage string, boilerplate []byte) generator.Package { - groupVersionClientPackage := filepath.Join(clientsetPackage, "typed", strings.ToLower(groupPackageName), strings.ToLower(gv.Version.NonEmpty())) - return &generator.DefaultPackage{ - PackageName: strings.ToLower(gv.Version.NonEmpty()), - PackagePath: groupVersionClientPackage, - HeaderText: boilerplate, - PackageDocumentation: []byte("// This package has the automatically generated typed clients.\n"), - // GeneratorFunc returns a list of generators. Each generator makes a +func targetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clientsetDir, clientsetPkg string, groupPkgName string, groupGoName string, apiPath string, inputPkg string, applyBuilderPkg string, boilerplate []byte) generator.Target { + subdir := []string{"typed", strings.ToLower(groupPkgName), strings.ToLower(gv.Version.NonEmpty())} + gvDir := filepath.Join(clientsetDir, filepath.Join(subdir...)) + gvPkg := path.Join(clientsetPkg, path.Join(subdir...)) + + return &generator.SimpleTarget{ + PkgName: strings.ToLower(gv.Version.NonEmpty()), + PkgPath: gvPkg, + PkgDir: gvDir, + HeaderComment: boilerplate, + PkgDocComment: []byte("// This package has the automatically generated typed clients.\n"), + // GeneratorsFunc returns a list of generators. Each generator makes a // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = []generator.Generator{ // Always generate a "doc.go" file. - generator.DefaultGen{OptionalName: "doc"}, + generator.GoGenerator{OutputFilename: "doc.go"}, } // Since we want a file per type that we generate a client for, we // have to provide a function for this. for _, t := range typeList { generators = append(generators, &genClientForType{ - DefaultGen: generator.DefaultGen{ - OptionalName: strings.ToLower(c.Namers["private"].Name(t)), + GoGenerator: generator.GoGenerator{ + OutputFilename: strings.ToLower(c.Namers["private"].Name(t)) + ".go", }, - outputPackage: groupVersionClientPackage, - inputPackage: inputPackage, - clientsetPackage: clientsetPackage, - applyConfigurationPackage: applyBuilderPackage, + outputPackage: gvPkg, + inputPackage: inputPkg, + clientsetPackage: clientsetPkg, + applyConfigurationPackage: applyBuilderPkg, group: gv.Group.NonEmpty(), version: gv.Version.String(), groupGoName: groupGoName, @@ -162,12 +166,12 @@ func packageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, cli } generators = append(generators, &genGroup{ - DefaultGen: generator.DefaultGen{ - OptionalName: groupPackageName + "_client", + GoGenerator: generator.GoGenerator{ + OutputFilename: groupPkgName + "_client.go", }, - outputPackage: groupVersionClientPackage, - inputPackage: inputPackage, - clientsetPackage: clientsetPackage, + outputPackage: gvPkg, + inputPackage: inputPkg, + clientsetPackage: clientsetPkg, group: gv.Group.NonEmpty(), version: gv.Version.String(), groupGoName: groupGoName, @@ -176,11 +180,11 @@ func packageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, cli imports: generator.NewImportTracker(), }) - expansionFileName := "generated_expansion" + expansionFileName := "generated_expansion.go" generators = append(generators, &genExpansion{ - groupPackagePath: filepath.Join(srcTreePath, groupVersionClientPackage), - DefaultGen: generator.DefaultGen{ - OptionalName: expansionFileName, + groupPackagePath: gvDir, + GoGenerator: generator.GoGenerator{ + OutputFilename: expansionFileName, }, types: typeList, }) @@ -193,23 +197,23 @@ func packageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, cli } } -func packageForClientset(customArgs *clientgenargs.CustomArgs, clientsetPackage string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Package { - return &generator.DefaultPackage{ - PackageName: customArgs.ClientsetName, - PackagePath: clientsetPackage, - HeaderText: boilerplate, - // GeneratorFunc returns a list of generators. Each generator generates a +func targetForClientset(args *args.Args, clientsetDir, clientsetPkg string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Target { + return &generator.SimpleTarget{ + PkgName: args.ClientsetName, + PkgPath: clientsetPkg, + PkgDir: clientsetDir, + HeaderComment: boilerplate, + // GeneratorsFunc returns a list of generators. Each generator generates a // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = []generator.Generator{ &genClientset{ - DefaultGen: generator.DefaultGen{ - OptionalName: "clientset", + GoGenerator: generator.GoGenerator{ + OutputFilename: "clientset.go", }, - groups: customArgs.Groups, + groups: args.Groups, groupGoNames: groupGoNames, - clientsetPackage: clientsetPackage, - outputPackage: customArgs.ClientsetName, + clientsetPackage: clientsetPkg, imports: generator.NewImportTracker(), }, } @@ -218,13 +222,14 @@ func packageForClientset(customArgs *clientgenargs.CustomArgs, clientsetPackage } } -func packageForScheme(customArgs *clientgenargs.CustomArgs, clientsetPackage string, srcTreePath string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Package { - schemePackage := filepath.Join(clientsetPackage, "scheme") +func targetForScheme(args *args.Args, clientsetDir, clientsetPkg string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Target { + schemeDir := filepath.Join(clientsetDir, "scheme") + schemePkg := path.Join(clientsetPkg, "scheme") // create runtime.Registry for internal client because it has to know about group versions internalClient := false NextGroup: - for _, group := range customArgs.Groups { + for _, group := range args.Groups { for _, v := range group.Versions { if v.String() == "" { internalClient = true @@ -233,26 +238,27 @@ NextGroup: } } - return &generator.DefaultPackage{ - PackageName: "scheme", - PackagePath: schemePackage, - HeaderText: boilerplate, - PackageDocumentation: []byte("// This package contains the scheme of the automatically generated clientset.\n"), - // GeneratorFunc returns a list of generators. Each generator generates a + return &generator.SimpleTarget{ + PkgName: "scheme", + PkgPath: schemePkg, + PkgDir: schemeDir, + HeaderComment: boilerplate, + PkgDocComment: []byte("// This package contains the scheme of the automatically generated clientset.\n"), + // GeneratorsFunc returns a list of generators. Each generator generates a // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = []generator.Generator{ // Always generate a "doc.go" file. - generator.DefaultGen{OptionalName: "doc"}, + generator.GoGenerator{OutputFilename: "doc.go"}, &scheme.GenScheme{ - DefaultGen: generator.DefaultGen{ - OptionalName: "register", + GoGenerator: generator.GoGenerator{ + OutputFilename: "register.go", }, - InputPackages: customArgs.GroupVersionPackages(), - OutputPackage: schemePackage, - OutputPath: filepath.Join(srcTreePath, schemePackage), - Groups: customArgs.Groups, + InputPackages: args.GroupVersionPackages(), + OutputPkg: schemePkg, + OutputPath: schemeDir, + Groups: args.Groups, GroupGoNames: groupGoNames, ImportTracker: generator.NewImportTracker(), CreateRegistry: internalClient, @@ -268,12 +274,12 @@ NextGroup: // first field (somegroup) as the name of the group in Go code, e.g. as the func name in a clientset. // // If the first field of the groupName is not unique within the clientset, use "// +groupName=unique -func applyGroupOverrides(universe types.Universe, customArgs *clientgenargs.CustomArgs) { +func applyGroupOverrides(universe types.Universe, args *args.Args) { // Create a map from "old GV" to "new GV" so we know what changes we need to make. changes := make(map[clientgentypes.GroupVersion]clientgentypes.GroupVersion) - for gv, inputDir := range customArgs.GroupVersionPackages() { - p := universe.Package(genutil.Vendorless(inputDir)) - if override := types.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { + for gv, inputDir := range args.GroupVersionPackages() { + p := universe.Package(inputDir) + if override := gengo.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { newGV := clientgentypes.GroupVersion{ Group: clientgentypes.Group(override[0]), Version: gv.Version, @@ -282,9 +288,9 @@ func applyGroupOverrides(universe types.Universe, customArgs *clientgenargs.Cust } } - // Modify customArgs.Groups based on the groupName overrides. - newGroups := make([]clientgentypes.GroupVersions, 0, len(customArgs.Groups)) - for _, gvs := range customArgs.Groups { + // Modify args.Groups based on the groupName overrides. + newGroups := make([]clientgentypes.GroupVersions, 0, len(args.Groups)) + for _, gvs := range args.Groups { gv := clientgentypes.GroupVersion{ Group: gvs.Group, Version: gvs.Versions[0].Version, // we only need a version, and the first will do @@ -302,37 +308,64 @@ func applyGroupOverrides(universe types.Universe, customArgs *clientgenargs.Cust newGroups = append(newGroups, gvs) } } - customArgs.Groups = newGroups + args.Groups = newGroups } -// Packages makes the client package definition. -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +// Because we try to assemble inputs from an input-base and a set of +// group-version arguments, sometimes that comes in as a filesystem path. This +// function rewrites them all as their canonical Go import-paths. +// +// TODO: Change this tool to just take inputs as Go "patterns" like every other +// gengo tool, then extract GVs from those. +func sanitizePackagePaths(context *generator.Context, args *args.Args) error { + for i := range args.Groups { + pkg := &args.Groups[i] + for j := range pkg.Versions { + ver := &pkg.Versions[j] + input := ver.Package + p := context.Universe[input] + if p == nil || p.Name == "" { + pkgs, err := context.FindPackages(input) + if err != nil { + return fmt.Errorf("can't find input package %q: %w", input, err) + } + p = context.Universe[pkgs[0]] + if p == nil { + return fmt.Errorf("can't find input package %q in universe", input) + } + ver.Package = p.Path + } + } + } + return nil +} + +// GetTargets makes the client target definition. +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, "", gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - customArgs, ok := arguments.CustomArgs.(*clientgenargs.CustomArgs) - if !ok { - klog.Fatalf("cannot convert arguments.CustomArgs to clientgenargs.CustomArgs") - } - includedTypesOverrides := customArgs.IncludedTypesOverrides + includedTypesOverrides := args.IncludedTypesOverrides - applyGroupOverrides(context.Universe, customArgs) + if err := sanitizePackagePaths(context, args); err != nil { + klog.Fatalf("cannot sanitize inputs: %v", err) + } + applyGroupOverrides(context.Universe, args) gvToTypes := map[clientgentypes.GroupVersion][]*types.Type{} groupGoNames := make(map[clientgentypes.GroupVersion]string) - for gv, inputDir := range customArgs.GroupVersionPackages() { - p := context.Universe.Package(path.Vendorless(inputDir)) + for gv, inputDir := range args.GroupVersionPackages() { + p := context.Universe.Package(inputDir) // If there's a comment of the form "// +groupGoName=SomeUniqueShortName", use that as // the Go group identifier in CamelCase. It defaults groupGoNames[gv] = namer.IC(strings.Split(gv.Group.NonEmpty(), ".")[0]) - if override := types.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { groupGoNames[gv] = namer.IC(override[0]) } - // Package are indexed with the vendor prefix stripped for n, t := range p.Types { // filter out types which are not included in user specified overrides. typesOverride, ok := includedTypesOverrides[gv] @@ -361,33 +394,43 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat } } - var packageList []generator.Package - clientsetPackage := filepath.Join(arguments.OutputPackagePath, customArgs.ClientsetName) + clientsetDir := filepath.Join(args.OutputDir, args.ClientsetName) + clientsetPkg := path.Join(args.OutputPkg, args.ClientsetName) + + var targetList []generator.Target - packageList = append(packageList, packageForClientset(customArgs, clientsetPackage, groupGoNames, boilerplate)) - packageList = append(packageList, packageForScheme(customArgs, clientsetPackage, arguments.OutputBase, groupGoNames, boilerplate)) - if customArgs.FakeClient { - packageList = append(packageList, fake.PackageForClientset(customArgs, clientsetPackage, groupGoNames, boilerplate)) + targetList = append(targetList, + targetForClientset(args, clientsetDir, clientsetPkg, groupGoNames, boilerplate)) + targetList = append(targetList, + targetForScheme(args, clientsetDir, clientsetPkg, groupGoNames, boilerplate)) + if args.FakeClient { + targetList = append(targetList, + fake.TargetForClientset(args, clientsetDir, clientsetPkg, groupGoNames, boilerplate)) } // If --clientset-only=true, we don't regenerate the individual typed clients. - if customArgs.ClientsetOnly { - return generator.Packages(packageList) + if args.ClientsetOnly { + return []generator.Target(targetList) } orderer := namer.Orderer{Namer: namer.NewPrivateNamer(0)} - gvPackages := customArgs.GroupVersionPackages() - for _, group := range customArgs.Groups { + gvPackages := args.GroupVersionPackages() + for _, group := range args.Groups { for _, version := range group.Versions { gv := clientgentypes.GroupVersion{Group: group.Group, Version: version.Version} types := gvToTypes[gv] inputPath := gvPackages[gv] - packageList = append(packageList, packageForGroup(gv, orderer.OrderTypes(types), clientsetPackage, group.PackageName, groupGoNames[gv], customArgs.ClientsetAPIPath, arguments.OutputBase, inputPath, customArgs.ApplyConfigurationPackage, boilerplate)) - if customArgs.FakeClient { - packageList = append(packageList, fake.PackageForGroup(gv, orderer.OrderTypes(types), clientsetPackage, group.PackageName, groupGoNames[gv], inputPath, customArgs.ApplyConfigurationPackage, boilerplate)) + targetList = append(targetList, + targetForGroup( + gv, orderer.OrderTypes(types), clientsetDir, clientsetPkg, + group.PackageName, groupGoNames[gv], args.ClientsetAPIPath, + inputPath, args.ApplyConfigurationPackage, boilerplate)) + if args.FakeClient { + targetList = append(targetList, + fake.TargetForGroup(gv, orderer.OrderTypes(types), clientsetDir, clientsetPkg, group.PackageName, groupGoNames[gv], inputPath, args.ApplyConfigurationPackage, boilerplate)) } } } - return generator.Packages(packageList) + return targetList } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go index 1794909148f..47b90ed570f 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go @@ -17,45 +17,48 @@ limitations under the License. package fake import ( + "path" "path/filepath" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/types" - clientgenargs "k8s.io/code-generator/cmd/client-gen/args" + "k8s.io/code-generator/cmd/client-gen/args" scheme "k8s.io/code-generator/cmd/client-gen/generators/scheme" "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" ) -func PackageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clientsetPackage string, groupPackageName string, groupGoName string, inputPackage string, applyBuilderPackage string, boilerplate []byte) generator.Package { - outputPackage := filepath.Join(clientsetPackage, "typed", strings.ToLower(groupPackageName), strings.ToLower(gv.Version.NonEmpty()), "fake") +func TargetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clientsetDir, clientsetPkg string, groupPkgName string, groupGoName string, inputPkg string, applyBuilderPackage string, boilerplate []byte) generator.Target { // TODO: should make this a function, called by here and in client-generator.go - realClientPackage := filepath.Join(clientsetPackage, "typed", strings.ToLower(groupPackageName), strings.ToLower(gv.Version.NonEmpty())) - return &generator.DefaultPackage{ - PackageName: "fake", - PackagePath: outputPackage, - HeaderText: boilerplate, - PackageDocumentation: []byte( - `// Package fake has the automatically generated clients. -`), - // GeneratorFunc returns a list of generators. Each generator makes a + subdir := []string{"typed", strings.ToLower(groupPkgName), strings.ToLower(gv.Version.NonEmpty())} + outputDir := filepath.Join(clientsetDir, filepath.Join(subdir...), "fake") + outputPkg := path.Join(clientsetPkg, path.Join(subdir...), "fake") + realClientPkg := path.Join(clientsetPkg, path.Join(subdir...)) + + return &generator.SimpleTarget{ + PkgName: "fake", + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + PkgDocComment: []byte("// Package fake has the automatically generated clients.\n"), + // GeneratorsFunc returns a list of generators. Each generator makes a // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = []generator.Generator{ // Always generate a "doc.go" file. - generator.DefaultGen{OptionalName: "doc"}, + generator.GoGenerator{OutputFilename: "doc.go"}, } // Since we want a file per type that we generate a client for, we // have to provide a function for this. for _, t := range typeList { generators = append(generators, &genFakeForType{ - DefaultGen: generator.DefaultGen{ - OptionalName: "fake_" + strings.ToLower(c.Namers["private"].Name(t)), + GoGenerator: generator.GoGenerator{ + OutputFilename: "fake_" + strings.ToLower(c.Namers["private"].Name(t)) + ".go", }, - outputPackage: outputPackage, - inputPackage: inputPackage, + outputPackage: outputPkg, + inputPackage: inputPkg, group: gv.Group.NonEmpty(), version: gv.Version.String(), groupGoName: groupGoName, @@ -66,11 +69,11 @@ func PackageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, cli } generators = append(generators, &genFakeForGroup{ - DefaultGen: generator.DefaultGen{ - OptionalName: "fake_" + groupPackageName + "_client", + GoGenerator: generator.GoGenerator{ + OutputFilename: "fake_" + groupPkgName + "_client.go", }, - outputPackage: outputPackage, - realClientPackage: realClientPackage, + outputPackage: outputPkg, + realClientPackage: realClientPkg, group: gv.Group.NonEmpty(), version: gv.Version.String(), groupGoName: groupGoName, @@ -85,41 +88,39 @@ func PackageForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, cli } } -func PackageForClientset(customArgs *clientgenargs.CustomArgs, clientsetPackage string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Package { - return &generator.DefaultPackage{ +func TargetForClientset(args *args.Args, clientsetDir, clientsetPkg string, groupGoNames map[clientgentypes.GroupVersion]string, boilerplate []byte) generator.Target { + return &generator.SimpleTarget{ // TODO: we'll generate fake clientset for different release in the future. // Package name and path are hard coded for now. - PackageName: "fake", - PackagePath: filepath.Join(clientsetPackage, "fake"), - HeaderText: boilerplate, - PackageDocumentation: []byte( - `// This package has the automatically generated fake clientset. -`), - // GeneratorFunc returns a list of generators. Each generator generates a + PkgName: "fake", + PkgPath: path.Join(clientsetPkg, "fake"), + PkgDir: filepath.Join(clientsetDir, "fake"), + HeaderComment: boilerplate, + PkgDocComment: []byte("// This package has the automatically generated fake clientset.\n"), + // GeneratorsFunc returns a list of generators. Each generator generates a // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = []generator.Generator{ // Always generate a "doc.go" file. - generator.DefaultGen{OptionalName: "doc"}, + generator.GoGenerator{OutputFilename: "doc.go"}, &genClientset{ - DefaultGen: generator.DefaultGen{ - OptionalName: "clientset_generated", + GoGenerator: generator.GoGenerator{ + OutputFilename: "clientset_generated.go", }, - groups: customArgs.Groups, + groups: args.Groups, groupGoNames: groupGoNames, - fakeClientsetPackage: clientsetPackage, - outputPackage: "fake", + fakeClientsetPackage: clientsetPkg, imports: generator.NewImportTracker(), - realClientsetPackage: clientsetPackage, + realClientsetPackage: clientsetPkg, }, &scheme.GenScheme{ - DefaultGen: generator.DefaultGen{ - OptionalName: "register", + GoGenerator: generator.GoGenerator{ + OutputFilename: "register.go", }, - InputPackages: customArgs.GroupVersionPackages(), - OutputPackage: clientsetPackage, - Groups: customArgs.Groups, + InputPackages: args.GroupVersionPackages(), + OutputPkg: clientsetPkg, + Groups: args.Groups, GroupGoNames: groupGoNames, ImportTracker: generator.NewImportTracker(), PrivateScheme: true, diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go index cd731cb9d66..0e3051114e7 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go @@ -19,33 +19,32 @@ package fake import ( "fmt" "io" - "path/filepath" + "path" "strings" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // genClientset generates a package for a clientset. type genClientset struct { - generator.DefaultGen + generator.GoGenerator groups []clientgentypes.GroupVersions groupGoNames map[clientgentypes.GroupVersion]string - fakeClientsetPackage string - outputPackage string + fakeClientsetPackage string // must be a Go import-path imports namer.ImportTracker clientsetGenerated bool // the import path of the generated real clientset. - realClientsetPackage string + realClientsetPackage string // must be a Go import-path } var _ generator.Generator = &genClientset{} func (g *genClientset) Namers(c *generator.Context) namer.NameSystems { return namer.NameSystems{ - "raw": namer.NewRawNamer(g.outputPackage, g.imports), + "raw": namer.NewRawNamer(g.fakeClientsetPackage, g.imports), } } @@ -60,8 +59,8 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) for _, group := range g.groups { for _, version := range group.Versions { - groupClientPackage := filepath.Join(g.fakeClientsetPackage, "typed", strings.ToLower(group.PackageName), strings.ToLower(version.NonEmpty())) - fakeGroupClientPackage := filepath.Join(groupClientPackage, "fake") + groupClientPackage := path.Join(g.fakeClientsetPackage, "typed", strings.ToLower(group.PackageName), strings.ToLower(version.NonEmpty())) + fakeGroupClientPackage := path.Join(groupClientPackage, "fake") groupAlias := strings.ToLower(g.groupGoNames[clientgentypes.GroupVersion{Group: group.Group, Version: version.Version}]) imports = append(imports, fmt.Sprintf("%s%s \"%s\"", groupAlias, strings.ToLower(version.NonEmpty()), groupClientPackage)) diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go index 8f4d5785ef9..d9c9b8bac42 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go @@ -19,21 +19,21 @@ package fake import ( "fmt" "io" - "path/filepath" + "path" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" ) // genFakeForGroup produces a file for a group client, e.g. ExtensionsClient for the extension group. type genFakeForGroup struct { - generator.DefaultGen - outputPackage string - realClientPackage string + generator.GoGenerator + outputPackage string // must be a Go import-path + realClientPackage string // must be a Go import-path group string version string groupGoName string @@ -64,7 +64,7 @@ func (g *genFakeForGroup) Namers(c *generator.Context) namer.NameSystems { func (g *genFakeForGroup) Imports(c *generator.Context) (imports []string) { imports = g.imports.ImportLines() if len(g.types) != 0 { - imports = append(imports, fmt.Sprintf("%s \"%s\"", strings.ToLower(filepath.Base(g.realClientPackage)), g.realClientPackage)) + imports = append(imports, fmt.Sprintf("%s \"%s\"", strings.ToLower(path.Base(g.realClientPackage)), g.realClientPackage)) } return imports } @@ -90,7 +90,7 @@ func (g *genFakeForGroup) GenerateType(c *generator.Context, t *types.Type, w io "type": t, "GroupGoName": g.groupGoName, "Version": namer.IC(g.version), - "realClientPackage": strings.ToLower(filepath.Base(g.realClientPackage)), + "realClientPackage": strings.ToLower(path.Base(g.realClientPackage)), } if tags.NonNamespaced { sw.Do(getterImplNonNamespaced, wrapper) diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go index 28b829cc139..6b032fd99c2 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go @@ -18,21 +18,20 @@ package fake import ( "io" - gopath "path" - "path/filepath" + "path" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" ) // genFakeForType produces a file for each top-level type. type genFakeForType struct { - generator.DefaultGen - outputPackage string + generator.GoGenerator + outputPackage string // Must be a Go import-path group string version string groupGoName string @@ -87,7 +86,7 @@ func hasObjectMeta(t *types.Type) bool { // GenerateType makes the body of a file implementing the individual typed client for type t. func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { sw := generator.NewSnippetWriter(w, c, "$", "$") - pkg := filepath.Base(t.Name.Package) + pkg := path.Base(t.Name.Package) tags, err := util.ParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) if err != nil { return err @@ -153,7 +152,7 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. if generateApply { // Generated apply builder type references required for generated Apply function _, gvString := util.ParsePathGroupVersion(g.inputPackage) - m["inputApplyConfig"] = types.Ref(gopath.Join(g.applyConfigurationPackage, gvString), t.Name.Name+"ApplyConfiguration") + m["inputApplyConfig"] = types.Ref(path.Join(g.applyConfigurationPackage, gvString), t.Name.Name+"ApplyConfiguration") } if tags.NonNamespaced { @@ -237,7 +236,7 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. m["resultType"] = &resultType m["subresourcePath"] = e.SubResourcePath if e.HasVerb("apply") { - m["inputApplyConfig"] = types.Ref(gopath.Join(g.applyConfigurationPackage, inputGVString), inputType.Name.Name+"ApplyConfiguration") + m["inputApplyConfig"] = types.Ref(path.Join(g.applyConfigurationPackage, inputGVString), inputType.Name.Name+"ApplyConfiguration") } if e.HasVerb("get") { @@ -300,7 +299,9 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. // TODO: Make the verbs in templates parametrized so the strings.Replace() is // not needed. func adjustTemplate(name, verbType, template string) string { - return strings.Replace(template, " "+strings.Title(verbType), " "+name, -1) + //nolint:staticcheck + // TODO: convert this to use golang.org/x/text/cases + return strings.ReplaceAll(template, " "+strings.Title(verbType), " "+name) } // template for the struct that implements the type's interface diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go index 6bf1ca37f88..0c043cee9e8 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go @@ -19,22 +19,21 @@ package generators import ( "fmt" "io" - "path/filepath" + "path" "strings" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // genClientset generates a package for a clientset. type genClientset struct { - generator.DefaultGen + generator.GoGenerator groups []clientgentypes.GroupVersions groupGoNames map[clientgentypes.GroupVersion]string - clientsetPackage string - outputPackage string + clientsetPackage string // must be a Go import-path imports namer.ImportTracker clientsetGenerated bool } @@ -43,7 +42,7 @@ var _ generator.Generator = &genClientset{} func (g *genClientset) Namers(c *generator.Context) namer.NameSystems { return namer.NameSystems{ - "raw": namer.NewRawNamer(g.outputPackage, g.imports), + "raw": namer.NewRawNamer(g.clientsetPackage, g.imports), } } @@ -58,7 +57,7 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) for _, group := range g.groups { for _, version := range group.Versions { - typedClientPath := filepath.Join(g.clientsetPackage, "typed", strings.ToLower(group.PackageName), strings.ToLower(version.NonEmpty())) + typedClientPath := path.Join(g.clientsetPackage, "typed", strings.ToLower(group.PackageName), strings.ToLower(version.NonEmpty())) groupAlias := strings.ToLower(g.groupGoNames[clientgentypes.GroupVersion{Group: group.Group, Version: version.Version}]) imports = append(imports, fmt.Sprintf("%s%s \"%s\"", groupAlias, strings.ToLower(version.NonEmpty()), typedClientPath)) } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_expansion.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_expansion.go index f47c079e02f..5971cc5bcd2 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_expansion.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_expansion.go @@ -22,13 +22,13 @@ import ( "path/filepath" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/types" ) // genExpansion produces a file for a group client, e.g. ExtensionsClient for the extension group. type genExpansion struct { - generator.DefaultGen + generator.GoGenerator groupPackagePath string // types in a group types []*types.Type diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go index 30284990037..2a7ac1e9a49 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go @@ -18,19 +18,19 @@ package generators import ( "io" - "path/filepath" + "path" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" - "k8s.io/code-generator/cmd/client-gen/path" ) // genGroup produces a file for a group client, e.g. ExtensionsClient for the extension group. type genGroup struct { - generator.DefaultGen + generator.GoGenerator outputPackage string group string version string @@ -40,7 +40,7 @@ type genGroup struct { types []*types.Type imports namer.ImportTracker inputPackage string - clientsetPackage string + clientsetPackage string // must be a Go import-path // If the genGroup has been called. This generator should only execute once. called bool } @@ -64,7 +64,7 @@ func (g *genGroup) Namers(c *generator.Context) namer.NameSystems { func (g *genGroup) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) - imports = append(imports, filepath.Join(g.clientsetPackage, "scheme")) + imports = append(imports, path.Join(g.clientsetPackage, "scheme")) return } @@ -83,8 +83,8 @@ func (g *genGroup) GenerateType(c *generator.Context, t *types.Type, w io.Writer groupName = "" } // allow user to define a group name that's different from the one parsed from the directory. - p := c.Universe.Package(path.Vendorless(g.inputPackage)) - if override := types.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { + p := c.Universe.Package(g.inputPackage) + if override := gengo.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { groupName = override[0] } @@ -104,7 +104,7 @@ func (g *genGroup) GenerateType(c *generator.Context, t *types.Type, w io.Writer "RESTHTTPClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "HTTPClientFor"}), "restRESTClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientFor"}), "restRESTClientForConfigAndClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientForConfigAndClient"}), - "SchemeGroupVersion": c.Universe.Variable(types.Name{Package: path.Vendorless(g.inputPackage), Name: "SchemeGroupVersion"}), + "SchemeGroupVersion": c.Universe.Variable(types.Name{Package: g.inputPackage, Name: "SchemeGroupVersion"}), } sw.Do(groupInterfaceTemplate, m) sw.Do(groupClientTemplate, m) diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go index fe63dd19895..e65b86cbd0f 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go @@ -19,23 +19,22 @@ package generators import ( "io" "path" - "path/filepath" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" ) // genClientForType produces a file for each top-level type. type genClientForType struct { - generator.DefaultGen - outputPackage string + generator.GoGenerator + outputPackage string // must be a Go import-path inputPackage string - clientsetPackage string - applyConfigurationPackage string + clientsetPackage string // must be a Go import-path + applyConfigurationPackage string // must be a Go import-path group string version string groupGoName string @@ -81,7 +80,7 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i defaultVerbTemplates := buildDefaultVerbTemplates(generateApply) subresourceDefaultVerbTemplates := buildSubresourceDefaultVerbTemplates(generateApply) sw := generator.NewSnippetWriter(w, c, "$", "$") - pkg := filepath.Base(t.Name.Package) + pkg := path.Base(t.Name.Package) tags, err := util.ParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) if err != nil { return err @@ -120,8 +119,12 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i } var updatedVerbtemplate string if _, exists := subresourceDefaultVerbTemplates[e.VerbType]; e.IsSubresource() && exists { + //nolint:staticcheck + // TODO: convert this to use golang.org/x/text/cases updatedVerbtemplate = e.VerbName + "(" + strings.TrimPrefix(subresourceDefaultVerbTemplates[e.VerbType], strings.Title(e.VerbType)+"(") } else { + //nolint:staticcheck + // TODO: convert this to use golang.org/x/text/cases updatedVerbtemplate = e.VerbName + "(" + strings.TrimPrefix(defaultVerbTemplates[e.VerbType], strings.Title(e.VerbType)+"(") } extendedMethod := extendedInterfaceMethod{ @@ -167,7 +170,7 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "ApplyPatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "ApplyPatchType"}), "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}), "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), - "schemeParameterCodec": c.Universe.Variable(types.Name{Package: filepath.Join(g.clientsetPackage, "scheme"), Name: "ParameterCodec"}), + "schemeParameterCodec": c.Universe.Variable(types.Name{Package: path.Join(g.clientsetPackage, "scheme"), Name: "ParameterCodec"}), "jsonMarshal": c.Universe.Type(types.Name{Package: "encoding/json", Name: "Marshal"}), } @@ -345,7 +348,9 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i // TODO: Make the verbs in templates parametrized so the strings.Replace() is // not needed. func adjustTemplate(name, verbType, template string) string { - return strings.Replace(template, " "+strings.Title(verbType), " "+name, -1) + //nolint:staticcheck + // TODO: convert this to use golang.org/x/text/cases + return strings.ReplaceAll(template, " "+strings.Title(verbType), " "+name) } func generateInterface(defaultVerbTemplates map[string]string, tags util.Tags) string { diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go index a87d7571eb6..7229055799f 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go @@ -20,24 +20,24 @@ import ( "fmt" "io" "os" + "path" "path/filepath" "strings" - "k8s.io/code-generator/cmd/client-gen/path" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // GenScheme produces a package for a clientset with the scheme, codecs and parameter codecs. type GenScheme struct { - generator.DefaultGen - OutputPackage string + generator.GoGenerator + OutputPkg string // Must be a Go import-path + OutputPath string // optional Groups []clientgentypes.GroupVersions GroupGoNames map[clientgentypes.GroupVersion]string InputPackages map[clientgentypes.GroupVersion]string - OutputPath string ImportTracker namer.ImportTracker PrivateScheme bool CreateRegistry bool @@ -46,7 +46,7 @@ type GenScheme struct { func (g *GenScheme) Namers(c *generator.Context) namer.NameSystems { return namer.NameSystems{ - "raw": namer.NewRawNamer(g.OutputPackage, g.ImportTracker), + "raw": namer.NewRawNamer(g.OutputPkg, g.ImportTracker), } } @@ -66,14 +66,14 @@ func (g *GenScheme) Imports(c *generator.Context) (imports []string) { if g.CreateRegistry { // import the install package for internal clientsets instead of the type package with register.go if version.Version != "" { - packagePath = filepath.Dir(packagePath) + packagePath = path.Dir(packagePath) } - packagePath = filepath.Join(packagePath, "install") + packagePath = path.Join(packagePath, "install") - imports = append(imports, fmt.Sprintf("%s \"%s\"", groupAlias, path.Vendorless(packagePath))) + imports = append(imports, fmt.Sprintf("%s \"%s\"", groupAlias, packagePath)) break } else { - imports = append(imports, fmt.Sprintf("%s%s \"%s\"", groupAlias, strings.ToLower(version.Version.NonEmpty()), path.Vendorless(packagePath))) + imports = append(imports, fmt.Sprintf("%s%s \"%s\"", groupAlias, strings.ToLower(version.Version.NonEmpty()), packagePath)) } } } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags.go index e74de077629..5218dfad3b1 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags.go @@ -21,7 +21,7 @@ import ( "fmt" "strings" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" ) var supportedTags = []string{ @@ -192,7 +192,7 @@ func MustParseClientGenTags(lines []string) Tags { // tags are provided. func ParseClientGenTags(lines []string) (Tags, error) { ret := Tags{} - values := types.ExtractCommentTags("+", lines) + values := gengo.ExtractCommentTags("+", lines) var value []string value, ret.GenerateClient = values["genclient"] // Check the old format and error when used to avoid generating client when //+genclient=false diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/main.go b/vendor/k8s.io/code-generator/cmd/client-gen/main.go index 64a1274dfc0..09866e93c36 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/main.go @@ -23,40 +23,44 @@ import ( "github.com/spf13/pflag" "k8s.io/klog/v2" - generatorargs "k8s.io/code-generator/cmd/client-gen/args" + "k8s.io/code-generator/cmd/client-gen/args" "k8s.io/code-generator/cmd/client-gen/generators" "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() + args := args.New() - // Override defaults. - // TODO: move this out of client-gen - genericArgs.OutputPackagePath = "k8s.io/kubernetes/pkg/client/clientset_generated/" - - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine, "k8s.io/kubernetes/pkg/apis") // TODO: move this input path out of client-gen + args.AddFlags(pflag.CommandLine, "k8s.io/kubernetes/pkg/apis") // TODO: move this input path out of client-gen flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() // add group version package as input dirs for gengo - for _, pkg := range customArgs.Groups { + inputPkgs := []string{} + for _, pkg := range args.Groups { for _, v := range pkg.Versions { - genericArgs.InputDirs = append(genericArgs.InputDirs, v.Package) + inputPkgs = append(inputPkgs, v.Package) } } - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } - if err := genericArgs.Execute( - generators.NameSystems(util.PluralExceptionListToMapOrDie(customArgs.PluralExceptions)), + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + + if err := gengo.Execute( + generators.NameSystems(util.PluralExceptionListToMapOrDie(args.PluralExceptions)), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + inputPkgs, ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/path/path.go b/vendor/k8s.io/code-generator/cmd/client-gen/path/path.go deleted file mode 100644 index 19b269bdf28..00000000000 --- a/vendor/k8s.io/code-generator/cmd/client-gen/path/path.go +++ /dev/null @@ -1,31 +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 path - -import "strings" - -// Vendorless removes the longest match of "*/vendor/" from the front of p. -// It is useful if a package locates in vendor/, e.g., -// k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1, because gengo -// indexes the package with its import path, e.g., -// k8s.io/apimachinery/pkg/apis/meta/v1, -func Vendorless(p string) string { - if pos := strings.LastIndex(p, "/vendor/"); pos != -1 { - return p[pos+len("/vendor/"):] - } - return p -} diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/types/helpers.go b/vendor/k8s.io/code-generator/cmd/client-gen/types/helpers.go index 59f2fd4449b..c84a7753177 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/types/helpers.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/types/helpers.go @@ -22,7 +22,7 @@ import ( "sort" "strings" - "k8s.io/gengo/namer" + "k8s.io/gengo/v2/namer" ) // ToGroupVersion turns "group/version" string into a GroupVersion struct. It reports error @@ -116,6 +116,6 @@ func ToGroupInstallPackages(groups []GroupVersions, groupGoNames map[GroupVersio } // NormalizeGroupVersion calls normalizes the GroupVersion. -//func NormalizeGroupVersion(gv GroupVersion) GroupVersion { -// return GroupVersion{Group: gv.Group.NonEmpty(), Version: gv.Version, NonEmptyVersion: normalization.Version(gv.Version)} -//} +// func NormalizeGroupVersion(gv GroupVersion) GroupVersion { +// return GroupVersion{Group: gv.Group.NonEmpty(), Version: gv.Version, NonEmptyVersion: normalization.Version(gv.Version)} +// } diff --git a/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go index c69280b1063..cc61c48d49f 100644 --- a/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go @@ -20,7 +20,6 @@ import ( "fmt" "github.com/spf13/pflag" - "k8s.io/gengo/args" ) // DefaultBasePeerDirs are the peer-dirs nearly everybody will use, i.e. those coming from @@ -31,8 +30,10 @@ var DefaultBasePeerDirs = []string{ "k8s.io/apimachinery/pkg/runtime", } -// CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs struct { +type Args struct { + // The filename of the generated results. + OutputFile string + // Base peer dirs which nearly everybody will use, i.e. outside of Kubernetes core. Peer dirs // are declared to make the generator pick up manually written conversion funcs from external // packages. @@ -52,39 +53,40 @@ type CustomArgs struct { // (within the allowed uses of unsafe) and is equivalent to a proposed Golang change to // allow structs that are identical to be assigned to each other. SkipUnsafe bool + + // GoHeaderFile is the path to a boilerplate header file for generated + // code. + GoHeaderFile string } -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{ +// New returns default arguments for the generator. +func New() *Args { + return &Args{ BasePeerDirs: DefaultBasePeerDirs, SkipUnsafe: false, } - genericArgs.CustomArgs = customArgs - genericArgs.OutputFileBaseName = "conversion_generated" - return genericArgs, customArgs } // AddFlags add the generator flags to the flag set. -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { - pflag.CommandLine.StringSliceVar(&ca.BasePeerDirs, "base-peer-dirs", ca.BasePeerDirs, +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputFile, "output-file", "generated.conversion.go", + "the name of the file to be generated") + fs.StringSliceVar(&args.BasePeerDirs, "base-peer-dirs", args.BasePeerDirs, "Comma-separated list of apimachinery import paths which are considered, after tag-specified peers, for conversions. Only change these if you have very good reasons.") - pflag.CommandLine.StringSliceVar(&ca.ExtraPeerDirs, "extra-peer-dirs", ca.ExtraPeerDirs, + fs.StringSliceVar(&args.ExtraPeerDirs, "extra-peer-dirs", args.ExtraPeerDirs, "Application specific comma-separated list of import paths which are considered, after tag-specified peers and base-peer-dirs, for conversions.") - pflag.CommandLine.StringSliceVar(&ca.ExtraDirs, "extra-dirs", ca.ExtraDirs, + fs.StringSliceVar(&args.ExtraDirs, "extra-dirs", args.ExtraDirs, "Application specific comma-separated list of import paths which are loaded and considered for callable conversions, but are not considered peers for conversion.") - pflag.CommandLine.BoolVar(&ca.SkipUnsafe, "skip-unsafe", ca.SkipUnsafe, + fs.BoolVar(&args.SkipUnsafe, "skip-unsafe", args.SkipUnsafe, "If true, will not generate code using unsafe pointer conversions; resulting code may be slower.") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - _ = genericArgs.CustomArgs.(*CustomArgs) - - if len(genericArgs.OutputFileBaseName) == 0 { - return fmt.Errorf("output file base name cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputFile) == 0 { + return fmt.Errorf("--output-file must be specified") } - return nil } diff --git a/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go b/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go index 5b7347971f1..f58130af255 100644 --- a/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go +++ b/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go @@ -20,20 +20,17 @@ import ( "bytes" "fmt" "io" - "path/filepath" + "path" "reflect" "sort" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - + "k8s.io/code-generator/cmd/conversion-gen/args" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" - - conversionargs "k8s.io/code-generator/cmd/conversion-gen/args" - genutil "k8s.io/code-generator/pkg/util" ) // These are the comment tags that carry parameters for conversion generation. @@ -52,24 +49,24 @@ const ( ) func extractTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[tagName] + return gengo.ExtractCommentTags("+", comments)[tagName] } func extractExplicitFromTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[explicitFromTagName] + return gengo.ExtractCommentTags("+", comments)[explicitFromTagName] } func extractExternalTypesTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[externalTypesTagName] + return gengo.ExtractCommentTags("+", comments)[externalTypesTagName] } func isCopyOnly(comments []string) bool { - values := types.ExtractCommentTags("+", comments)["k8s:conversion-fn"] + values := gengo.ExtractCommentTags("+", comments)["k8s:conversion-fn"] return len(values) == 1 && values[0] == "copy-only" } func isDrop(comments []string) bool { - values := types.ExtractCommentTags("+", comments)["k8s:conversion-fn"] + values := gengo.ExtractCommentTags("+", comments)["k8s:conversion-fn"] return len(values) == 1 && values[0] == "drop" } @@ -136,7 +133,7 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package klog.Warning("Skipping nil package passed to getManualConversionFunctions") return } - klog.V(5).Infof("Scanning for conversion functions in %v", pkg.Name) + klog.V(3).Infof("Scanning for conversion functions in %v", pkg.Path) scopeName := types.Ref(conversionPackagePath, "Scope").Name errorName := types.Ref("", "error").Name @@ -152,27 +149,27 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package klog.Errorf("Function without signature: %#v", f) continue } - klog.V(8).Infof("Considering function %s", f.Name) + klog.V(6).Infof("Considering function %s", f.Name) signature := f.Underlying.Signature // Check whether the function is conversion function. // Note that all of them have signature: // func Convert_inType_To_outType(inType, outType, conversion.Scope) error if signature.Receiver != nil { - klog.V(8).Infof("%s has a receiver", f.Name) + klog.V(6).Infof("%s has a receiver", f.Name) continue } if len(signature.Parameters) != 3 || signature.Parameters[2].Name != scopeName { - klog.V(8).Infof("%s has wrong parameters", f.Name) + klog.V(6).Infof("%s has wrong parameters", f.Name) continue } if len(signature.Results) != 1 || signature.Results[0].Name != errorName { - klog.V(8).Infof("%s has wrong results", f.Name) + klog.V(6).Infof("%s has wrong results", f.Name) continue } inType := signature.Parameters[0] outType := signature.Parameters[1] if inType.Kind != types.Pointer || outType.Kind != types.Pointer { - klog.V(8).Infof("%s has wrong parameter types", f.Name) + klog.V(6).Infof("%s has wrong parameter types", f.Name) continue } // Now check if the name satisfies the convention. @@ -180,7 +177,7 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package args := argsFromType(inType.Elem, outType.Elem) sw.Do("Convert_$.inType|public$_To_$.outType|public$", args) if f.Name.Name == buffer.String() { - klog.V(4).Infof("Found conversion function %s", f.Name) + klog.V(2).Infof("Found conversion function %s", f.Name) key := conversionPair{inType.Elem, outType.Elem} // We might scan the same package twice, and that's OK. if v, ok := manualMap[key]; ok && v != nil && v.Name.Package != pkg.Path { @@ -192,20 +189,19 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package if strings.HasPrefix(f.Name.Name, "Convert_") { klog.Errorf("Rename function %s %s -> %s to match expected conversion signature", f.Name.Package, f.Name.Name, buffer.String()) } - klog.V(8).Infof("%s has wrong name", f.Name) + klog.V(3).Infof("%s has wrong name", f.Name) } buffer.Reset() } } -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - packages := generator.Packages{} - header := append([]byte(fmt.Sprintf("// +build !%s\n\n", arguments.GeneratedBuildTag)), boilerplate...) + targets := []generator.Target{} // Accumulate pre-existing conversion functions. // TODO: This is too ad-hoc. We need a better way. @@ -219,131 +215,122 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // have non-trivial conversion memoryEquivalentTypes := equalMemoryTypes{} - // We are generating conversions only for packages that are explicitly - // passed as InputDir. - processed := map[string]bool{} + // First load other "input" packages. We do this as a single call because + // it is MUCH faster. + filteredInputs := make([]string, 0, len(context.Inputs)) + otherPkgs := make([]string, 0, len(context.Inputs)) + pkgToPeers := map[string][]string{} + pkgToExternal := map[string]string{} for _, i := range context.Inputs { - // skip duplicates - if processed[i] { - continue - } - processed[i] = true + klog.V(3).Infof("pre-processing pkg %q", i) - klog.V(5).Infof("considering pkg %q", i) pkg := context.Universe[i] - // typesPkg is where the versioned types are defined. Sometimes it is - // different from pkg. For example, kubernetes core/v1 types are defined - // in vendor/k8s.io/api/core/v1, while pkg is at pkg/api/v1. - typesPkg := pkg - if pkg == nil { - // If the input had no Go files, for example. - continue - } - - // Add conversion and defaulting functions. - getManualConversionFunctions(context, pkg, manualConversions) // Only generate conversions for packages which explicitly request it // by specifying one or more "+k8s:conversion-gen=" // in their doc.go file. peerPkgs := extractTag(pkg.Comments) - if peerPkgs != nil { - klog.V(5).Infof(" tags: %q", peerPkgs) - if len(peerPkgs) == 1 && peerPkgs[0] == "false" { - // If a single +k8s:conversion-gen=false tag is defined, we still want - // the generator to fire for this package for explicit conversions, but - // we are clearing the peerPkgs to not generate any standard conversions. - peerPkgs = nil - } - } else { - klog.V(5).Infof(" no tag") + if peerPkgs == nil { + klog.V(3).Infof(" no tag") continue } - skipUnsafe := false - extraDirs := []string{} - if customArgs, ok := arguments.CustomArgs.(*conversionargs.CustomArgs); ok { - if len(peerPkgs) > 0 { - peerPkgs = append(peerPkgs, customArgs.BasePeerDirs...) - peerPkgs = append(peerPkgs, customArgs.ExtraPeerDirs...) - } - extraDirs = customArgs.ExtraDirs - skipUnsafe = customArgs.SkipUnsafe + klog.V(3).Infof(" tags: %q", peerPkgs) + if len(peerPkgs) == 1 && peerPkgs[0] == "false" { + // If a single +k8s:conversion-gen=false tag is defined, we still want + // the generator to fire for this package for explicit conversions, but + // we are clearing the peerPkgs to not generate any standard conversions. + peerPkgs = nil + } else { + // Save peers for each input + pkgToPeers[i] = peerPkgs } + otherPkgs = append(otherPkgs, peerPkgs...) + // Keep this one for further processing. + filteredInputs = append(filteredInputs, i) - // if the external types are not in the same package where the conversion functions to be generated + // if the external types are not in the same package where the + // conversion functions to be generated externalTypesValues := extractExternalTypesTag(pkg.Comments) if externalTypesValues != nil { if len(externalTypesValues) != 1 { klog.Fatalf(" expect only one value for %q tag, got: %q", externalTypesTagName, externalTypesValues) } externalTypes := externalTypesValues[0] - klog.V(5).Infof(" external types tags: %q", externalTypes) - var err error - typesPkg, err = context.AddDirectory(externalTypes) - if err != nil { - klog.Fatalf("cannot import package %s", externalTypes) - } - // update context.Order to the latest context.Universe - orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)} - context.Order = orderer.OrderUniverse(context.Universe) + klog.V(3).Infof(" external types tags: %q", externalTypes) + otherPkgs = append(otherPkgs, externalTypes) + pkgToExternal[i] = externalTypes + } else { + pkgToExternal[i] = i } + } - // if the source path is within a /vendor/ directory (for example, - // k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1), allow - // generation to output to the proper relative path (under vendor). - // Otherwise, the generator will create the file in the wrong location - // in the output directory. - // TODO: build a more fundamental concept in gengo for dealing with modifications - // to vendored packages. - for i := range peerPkgs { - peerPkgs[i] = genutil.Vendorless(peerPkgs[i]) + // Make sure explicit peer-packages are added. + peers := args.BasePeerDirs + peers = append(peers, args.ExtraPeerDirs...) + if expanded, err := context.FindPackages(peers...); err != nil { + klog.Fatalf("cannot find peer packages: %v", err) + } else { + otherPkgs = append(otherPkgs, expanded...) + // for each pkg, add these extras, too + for k := range pkgToPeers { + pkgToPeers[k] = append(pkgToPeers[k], expanded...) } - for i := range extraDirs { - extraDirs[i] = genutil.Vendorless(extraDirs[i]) + } + + if len(otherPkgs) > 0 { + if _, err := context.LoadPackages(otherPkgs...); err != nil { + klog.Fatalf("cannot load packages: %v", err) } + } + // update context.Order to the latest context.Universe + orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)} + context.Order = orderer.OrderUniverse(context.Universe) - // Make sure our peer-packages are added and fully parsed. - for _, pp := range append(peerPkgs, extraDirs...) { - context.AddDir(pp) - p := context.Universe[pp] - if nil == p { - klog.Fatalf("failed to find pkg: %s", pp) - } - getManualConversionFunctions(context, p, manualConversions) + // Look for conversion functions in the peer-packages. + for _, pp := range otherPkgs { + p := context.Universe[pp] + if p == nil { + klog.Fatalf("failed to find pkg: %s", pp) } + getManualConversionFunctions(context, p, manualConversions) + } + + // We are generating conversions only for packages that are explicitly + // passed as InputDir. + for _, i := range filteredInputs { + klog.V(3).Infof("considering pkg %q", i) + pkg := context.Universe[i] + // typesPkg is where the versioned types are defined. Sometimes it is + // different from pkg. For example, kubernetes core/v1 types are defined + // in k8s.io/api/core/v1, while pkg is at pkg/api/v1. + typesPkg := pkg + + // Add conversion and defaulting functions. + getManualConversionFunctions(context, pkg, manualConversions) + + // Find the right input pkg, which might not be this one. + externalTypes := pkgToExternal[i] + typesPkg = context.Universe[externalTypes] unsafeEquality := TypesEqual(memoryEquivalentTypes) - if skipUnsafe { + if args.SkipUnsafe { unsafeEquality = noEquality{} } - path := pkg.Path - // if the source path is within a /vendor/ directory (for example, - // k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1), allow - // generation to output to the proper relative path (under vendor). - // Otherwise, the generator will create the file in the wrong location - // in the output directory. - // TODO: build a more fundamental concept in gengo for dealing with modifications - // to vendored packages. - if strings.HasPrefix(pkg.SourcePath, arguments.OutputBase) { - expandedPath := strings.TrimPrefix(pkg.SourcePath, arguments.OutputBase) - if strings.Contains(expandedPath, "/vendor/") { - path = expandedPath - } - } - packages = append(packages, - &generator.DefaultPackage{ - PackageName: filepath.Base(pkg.Path), - PackagePath: path, - HeaderText: header, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - return []generator.Generator{ - NewGenConversion(arguments.OutputFileBaseName, typesPkg.Path, pkg.Path, manualConversions, peerPkgs, unsafeEquality), - } - }, + targets = append(targets, + &generator.SimpleTarget{ + PkgName: path.Base(pkg.Path), + PkgPath: pkg.Path, + PkgDir: pkg.Dir, // output pkg is the same as the input + HeaderComment: boilerplate, FilterFunc: func(c *generator.Context, t *types.Type) bool { return t.Name.Package == typesPkg.Path }, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { + return []generator.Generator{ + NewGenConversion(args.OutputFile, typesPkg.Path, pkg.Path, manualConversions, pkgToPeers[pkg.Path], unsafeEquality), + } + }, }) } @@ -351,14 +338,14 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // from being a candidate for unsafe conversion for k, v := range manualConversions { if isCopyOnly(v.CommentLines) { - klog.V(5).Infof("Conversion function %s will not block memory copy because it is copy-only", v.Name) + klog.V(4).Infof("Conversion function %s will not block memory copy because it is copy-only", v.Name) continue } // this type should be excluded from all equivalence, because the converter must be called. memoryEquivalentTypes.Skip(k.inType, k.outType) } - return packages + return targets } type equalMemoryTypes map[conversionPair]bool @@ -466,7 +453,7 @@ type TypesEqual interface { // genConversion produces a file with a autogenerated conversions. type genConversion struct { - generator.DefaultGen + generator.GoGenerator // the package that contains the types that conversion func are going to be // generated for typesPackage string @@ -482,10 +469,10 @@ type genConversion struct { useUnsafe TypesEqual } -func NewGenConversion(sanitizedName, typesPackage, outputPackage string, manualConversions conversionFuncMap, peerPkgs []string, useUnsafe TypesEqual) generator.Generator { +func NewGenConversion(outputFilename, typesPackage, outputPackage string, manualConversions conversionFuncMap, peerPkgs []string, useUnsafe TypesEqual) generator.Generator { return &genConversion{ - DefaultGen: generator.DefaultGen{ - OptionalName: sanitizedName, + GoGenerator: generator.GoGenerator{ + OutputFilename: outputFilename, }, typesPackage: typesPackage, outputPackage: outputPackage, @@ -538,7 +525,7 @@ func (g *genConversion) convertibleOnlyWithinPackage(inType, outType *types.Type if tagvals[0] != "false" { klog.Fatalf("Type %v: unsupported %s value: %q", t, tagName, tagvals[0]) } - klog.V(5).Infof("type %v requests no conversion generation, skipping", t) + klog.V(2).Infof("type %v requests no conversion generation, skipping", t) return false } // TODO: Consider generating functions for other kinds too. @@ -553,7 +540,8 @@ func (g *genConversion) convertibleOnlyWithinPackage(inType, outType *types.Type } func getExplicitFromTypes(t *types.Type) []types.Name { - comments := append(t.SecondClosestCommentLines, t.CommentLines...) + comments := t.SecondClosestCommentLines + comments = append(comments, t.CommentLines...) paths := extractExplicitFromTag(comments) result := []types.Name{} for _, path := range paths { @@ -638,7 +626,7 @@ func (g *genConversion) preexists(inType, outType *types.Type) (*types.Type, boo } func (g *genConversion) Init(c *generator.Context, w io.Writer) error { - klogV := klog.V(5) + klogV := klog.V(6) if klogV.Enabled() { if m, ok := g.useUnsafe.(equalMemoryTypes); ok { var result []string @@ -694,10 +682,7 @@ func (g *genConversion) Init(c *generator.Context, w io.Writer) error { } // sort by name of the conversion function sort.Slice(pairs, func(i, j int) bool { - if g.manualConversions[pairs[i]].Name.Name < g.manualConversions[pairs[j]].Name.Name { - return true - } - return false + return g.manualConversions[pairs[i]].Name.Name < g.manualConversions[pairs[j]].Name.Name }) for _, pair := range pairs { args := argsFromType(pair.inType, pair.outType).With("Scope", types.Ref(conversionPackagePath, "Scope")).With("fn", g.manualConversions[pair]) @@ -731,7 +716,7 @@ func (g *genConversion) GenerateType(c *generator.Context, t *types.Type, w io.W } switch { case inType.Name.Package == "net/url" && inType.Name.Name == "Values": - g.generateFromUrlValues(inType, t, sw) + g.generateFromURLValues(inType, t, sw) default: klog.Errorf("Not supported input type: %#v", inType.Name) } @@ -771,7 +756,7 @@ func (g *genConversion) generateConversion(inType, outType *types.Type, sw *gene // at any nesting level. This makes the autogenerator easy to understand, and // the compiler shouldn't care. func (g *genConversion) generateFor(inType, outType *types.Type, sw *generator.SnippetWriter) { - klog.V(5).Infof("generating %v -> %v", inType, outType) + klog.V(4).Infof("generating %v -> %v", inType, outType) var f func(*types.Type, *types.Type, *generator.SnippetWriter) switch inType.Kind { @@ -948,7 +933,7 @@ func (g *genConversion) doStruct(inType, outType *types.Type, sw *generator.Snip sw.Do("}\n", nil) continue } - klog.V(5).Infof("Skipped function %s because it is copy-only and we can use direct assignment", function.Name) + klog.V(2).Infof("Skipped function %s because it is copy-only and we can use direct assignment", function.Name) } // If we can't auto-convert, punt before we emit any code. @@ -1087,7 +1072,7 @@ func (g *genConversion) doUnknown(inType, outType *types.Type, sw *generator.Sni sw.Do("// FIXME: Type $.|raw$ is unsupported.\n", inType) } -func (g *genConversion) generateFromUrlValues(inType, outType *types.Type, sw *generator.SnippetWriter) { +func (g *genConversion) generateFromURLValues(inType, outType *types.Type, sw *generator.SnippetWriter) { args := generator.Args{ "inType": inType, "outType": outType, diff --git a/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go b/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go index 5a461d27090..cd52a9b9643 100644 --- a/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go @@ -102,36 +102,34 @@ import ( generatorargs "k8s.io/code-generator/cmd/conversion-gen/args" "k8s.io/code-generator/cmd/conversion-gen/generators" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() + args := generatorargs.New() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - // k8s.io/apimachinery/pkg/runtime contains a number of manual conversions, - // that we need to generate conversions. - // Packages being dependencies of explicitly requested packages are only - // partially scanned - only types explicitly used are being traversed. - // Not used functions or types are omitted. - // Adding this explicitly to InputDirs ensures that the package is fully - // scanned and all functions are parsed and processed. - genericArgs.InputDirs = append(genericArgs.InputDirs, "k8s.io/apimachinery/pkg/runtime") - - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( + if err := gengo.Execute( generators.NameSystems(), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/vendor/k8s.io/code-generator/cmd/deepcopy-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/deepcopy-gen/args/args.go index 789713012ad..f5207a980e3 100644 --- a/vendor/k8s.io/code-generator/cmd/deepcopy-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/deepcopy-gen/args/args.go @@ -20,35 +20,33 @@ import ( "fmt" "github.com/spf13/pflag" - "k8s.io/gengo/args" - "k8s.io/gengo/examples/deepcopy-gen/generators" ) -// CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs generators.CustomArgs +type Args struct { + OutputFile string + BoundingDirs []string // Only deal with types rooted under these dirs. + GoHeaderFile string +} -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{} - genericArgs.CustomArgs = (*generators.CustomArgs)(customArgs) // convert to upstream type to make type-casts work there - genericArgs.OutputFileBaseName = "deepcopy_generated" - return genericArgs, customArgs +// New returns default arguments for the generator. +func New() *Args { + return &Args{} } // AddFlags add the generator flags to the flag set. -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { - pflag.CommandLine.StringSliceVar(&ca.BoundingDirs, "bounding-dirs", ca.BoundingDirs, +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputFile, "output-file", "generated.deepcopy.go", + "the name of the file to be generated") + fs.StringSliceVar(&args.BoundingDirs, "bounding-dirs", args.BoundingDirs, "Comma-separated list of import paths which bound the types for which deep-copies will be generated.") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - _ = genericArgs.CustomArgs.(*generators.CustomArgs) - - if len(genericArgs.OutputFileBaseName) == 0 { - return fmt.Errorf("output file base name cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputFile) == 0 { + return fmt.Errorf("--output-file must be specified") } - return nil } diff --git a/pkg/k8s/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go b/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go similarity index 86% rename from pkg/k8s/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go rename to vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go index 170f6d7f162..c6047aacae0 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go +++ b/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go @@ -19,25 +19,18 @@ package generators import ( "fmt" "io" - "path/filepath" + "path" "sort" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/examples/set-gen/sets" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - + "k8s.io/code-generator/cmd/deepcopy-gen/args" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) -// CustomArgs is used tby the go2idl framework to pass args specific to this -// generator. -type CustomArgs struct { - BoundingDirs []string // Only deal with types rooted under these dirs. -} - // This is the comment tag that carries parameters for deep-copy generation. const ( tagEnabledName = "k8s:deepcopy-gen" @@ -60,7 +53,7 @@ func extractEnabledTypeTag(t *types.Type) *enabledTagValue { } func extractEnabledTag(comments []string) *enabledTagValue { - tagVals := types.ExtractCommentTags("+", comments)[tagEnabledName] + tagVals := gengo.ExtractCommentTags("+", comments)[tagEnabledName] if tagVals == nil { // No match for the tag. return nil @@ -125,35 +118,28 @@ func DefaultNameSystem() string { return "public" } -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - inputs := sets.NewString(context.Inputs...) - packages := generator.Packages{} - header := append([]byte(fmt.Sprintf("//go:build !%s\n// +build !%s\n\n", arguments.GeneratedBuildTag, arguments.GeneratedBuildTag)), boilerplate...) - boundingDirs := []string{} - if customArgs, ok := arguments.CustomArgs.(*CustomArgs); ok { - if customArgs.BoundingDirs == nil { - customArgs.BoundingDirs = context.Inputs - } - for i := range customArgs.BoundingDirs { - // Strip any trailing slashes - they are not exactly "correct" but - // this is friendlier. - boundingDirs = append(boundingDirs, strings.TrimRight(customArgs.BoundingDirs[i], "/")) - } + if args.BoundingDirs == nil { + args.BoundingDirs = context.Inputs } + for i := range args.BoundingDirs { + // Strip any trailing slashes - they are not exactly "correct" but + // this is friendlier. + boundingDirs = append(boundingDirs, strings.TrimRight(args.BoundingDirs[i], "/")) + } + + targets := []generator.Target{} + + for _, i := range context.Inputs { + klog.V(3).Infof("Considering pkg %q", i) - for i := range inputs { - klog.V(5).Infof("Considering pkg %q", i) pkg := context.Universe[i] - if pkg == nil { - // If the input had no Go files, for example. - continue - } ptag := extractEnabledTag(pkg.Comments) ptagValue := "" @@ -164,9 +150,9 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat klog.Fatalf("Package %v: unsupported %s value: %q", i, tagEnabledName, ptagValue) } ptagRegister = ptag.register - klog.V(5).Infof(" tag.value: %q, tag.register: %t", ptagValue, ptagRegister) + klog.V(3).Infof(" tag.value: %q, tag.register: %t", ptagValue, ptagRegister) } else { - klog.V(5).Infof(" no tag") + klog.V(3).Infof(" no tag") } // If the pkg-scoped tag says to generate, we can skip scanning types. @@ -177,10 +163,10 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // can be copied. var uncopyable []string for _, t := range pkg.Types { - klog.V(5).Infof(" considering type %q", t.Name.String()) + klog.V(3).Infof(" considering type %q", t.Name.String()) ttag := extractEnabledTypeTag(t) if ttag != nil && ttag.value == "true" { - klog.V(5).Infof(" tag=true") + klog.V(3).Infof(" tag=true") if !copyableType(t) { uncopyable = append(uncopyable, fmt.Sprintf("%v", t)) } else { @@ -196,42 +182,29 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat if pkgNeedsGeneration { klog.V(3).Infof("Package %q needs generation", i) - path := pkg.Path - // if the source path is within a /vendor/ directory (for example, - // k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1), allow - // generation to output to the proper relative path (under vendor). - // Otherwise, the generator will create the file in the wrong location - // in the output directory. - // TODO: build a more fundamental concept in gengo for dealing with modifications - // to vendored packages. - if strings.HasPrefix(pkg.SourcePath, arguments.OutputBase) { - expandedPath := strings.TrimPrefix(pkg.SourcePath, arguments.OutputBase) - if strings.Contains(expandedPath, "/vendor/") { - path = expandedPath - } - } - packages = append(packages, - &generator.DefaultPackage{ - PackageName: strings.Split(filepath.Base(pkg.Path), ".")[0], - PackagePath: path, - HeaderText: header, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - return []generator.Generator{ - NewGenDeepCopy(arguments.OutputFileBaseName, pkg.Path, boundingDirs, (ptagValue == tagValuePackage), ptagRegister), - } - }, + targets = append(targets, + &generator.SimpleTarget{ + PkgName: strings.Split(path.Base(pkg.Path), ".")[0], + PkgPath: pkg.Path, + PkgDir: pkg.Dir, // output pkg is the same as the input + HeaderComment: boilerplate, FilterFunc: func(c *generator.Context, t *types.Type) bool { return t.Name.Package == pkg.Path }, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { + return []generator.Generator{ + NewGenDeepCopy(args.OutputFile, pkg.Path, boundingDirs, (ptagValue == tagValuePackage), ptagRegister), + } + }, }) } } - return packages + return targets } // genDeepCopy produces a file with autogenerated deep-copy functions. type genDeepCopy struct { - generator.DefaultGen + generator.GoGenerator targetPackage string boundingDirs []string allTypes bool @@ -240,10 +213,10 @@ type genDeepCopy struct { typesForInit []*types.Type } -func NewGenDeepCopy(sanitizedName, targetPackage string, boundingDirs []string, allTypes, registerTypes bool) generator.Generator { +func NewGenDeepCopy(outputFilename, targetPackage string, boundingDirs []string, allTypes, registerTypes bool) generator.Generator { return &genDeepCopy{ - DefaultGen: generator.DefaultGen{ - OptionalName: sanitizedName, + GoGenerator: generator.GoGenerator{ + OutputFilename: outputFilename, }, targetPackage: targetPackage, boundingDirs: boundingDirs, @@ -274,32 +247,24 @@ func (g *genDeepCopy) Filter(c *generator.Context, t *types.Type) bool { return false } if !copyableType(t) { - klog.V(2).Infof("Type %v is not copyable", t) + klog.V(3).Infof("Type %v is not copyable", t) return false } - klog.V(4).Infof("Type %v is copyable", t) + klog.V(3).Infof("Type %v is copyable", t) g.typesForInit = append(g.typesForInit, t) return true } -func (g *genDeepCopy) copyableAndInBounds(t *types.Type) bool { - if !copyableType(t) { - return false - } - // Only packages within the restricted range can be processed. - if !isRootedUnder(t.Name.Package, g.boundingDirs) { - return false - } - return true -} - // deepCopyMethod returns the signature of a DeepCopy() method, nil or an error // if the type does not match. This allows more efficient deep copy // implementations to be defined by the type's author. The correct signature // for a type T is: -// func (t T) DeepCopy() T +// +// func (t T) DeepCopy() T +// // or: -// func (t *T) DeepCopy() *T +// +// func (t *T) DeepCopy() *T func deepCopyMethod(t *types.Type) (*types.Signature, error) { f, found := t.Methods["DeepCopy"] if !found { @@ -346,9 +311,12 @@ func deepCopyMethodOrDie(t *types.Type) *types.Signature { // if the type is wrong. DeepCopyInto allows more efficient deep copy // implementations to be defined by the type's author. The correct signature // for a type T is: -// func (t T) DeepCopyInto(t *T) +// +// func (t T) DeepCopyInto(t *T) +// // or: -// func (t *T) DeepCopyInto(t *T) +// +// func (t *T) DeepCopyInto(t *T) func deepCopyIntoMethod(t *types.Type) (*types.Signature, error) { f, found := t.Methods["DeepCopyInto"] if !found { @@ -388,18 +356,6 @@ func deepCopyIntoMethodOrDie(t *types.Type) *types.Signature { return ret } -func isRootedUnder(pkg string, roots []string) bool { - // Add trailing / to avoid false matches, e.g. foo/bar vs foo/barn. This - // assumes that bounding dirs do not have trailing slashes. - pkg = pkg + "/" - for _, root := range roots { - if strings.HasPrefix(pkg, root+"/") { - return true - } - } - return false -} - func copyableType(t *types.Type) bool { // If the type opts out of copy-generation, stop. ttag := extractEnabledTypeTag(t) @@ -481,12 +437,12 @@ func (g *genDeepCopy) needsGeneration(t *types.Type) bool { } if g.allTypes && tv == "false" { // The whole package is being generated, but this type has opted out. - klog.V(5).Infof("Not generating for type %v because type opted out", t) + klog.V(2).Infof("Not generating for type %v because type opted out", t) return false } if !g.allTypes && tv != "true" { // The whole package is NOT being generated, and this type has NOT opted in. - klog.V(5).Infof("Not generating for type %v because type did not opt in", t) + klog.V(2).Infof("Not generating for type %v because type did not opt in", t) return false } return true @@ -495,7 +451,7 @@ func (g *genDeepCopy) needsGeneration(t *types.Type) bool { func extractInterfacesTag(t *types.Type) []string { var result []string comments := append(append([]string{}, t.SecondClosestCommentLines...), t.CommentLines...) - values := types.ExtractCommentTags("+", comments)[interfacesTagName] + values := gengo.ExtractCommentTags("+", comments)[interfacesTagName] for _, v := range values { if len(v) == 0 { continue @@ -513,7 +469,7 @@ func extractInterfacesTag(t *types.Type) []string { func extractNonPointerInterfaces(t *types.Type) (bool, error) { comments := append(append([]string{}, t.SecondClosestCommentLines...), t.CommentLines...) - values := types.ExtractCommentTags("+", comments)[interfacesNonPointerTagName] + values := gengo.ExtractCommentTags("+", comments)[interfacesNonPointerTagName] if len(values) == 0 { return false, nil } @@ -536,7 +492,8 @@ func (g *genDeepCopy) deepCopyableInterfacesInner(c *generator.Context, t *types var ts []*types.Type for _, intf := range intfs { t := types.ParseFullyQualifiedName(intf) - err := c.AddDir(t.Package) + klog.V(3).Infof("Loading package for interface %v", intf) + _, err := c.LoadPackages(t.Package) if err != nil { return nil, err } @@ -592,7 +549,7 @@ func (g *genDeepCopy) GenerateType(c *generator.Context, t *types.Type, w io.Wri if !g.needsGeneration(t) { return nil } - klog.V(5).Infof("Generating deepcopy function for type %v", t) + klog.V(2).Infof("Generating deepcopy functions for type %v", t) sw := generator.NewSnippetWriter(w, c, "$", "$") args := argsFromType(t) @@ -893,7 +850,7 @@ func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) { sw.Do(fmt.Sprintf("out.$.name$ = in.$.name$.DeepCopy%s()\n", uft.Name.Name), args) sw.Do("}\n", nil) default: - klog.Fatalf("Hit an unsupported type %v for %v, from %v", uft, ft, t) + klog.Fatalf("Hit an unsupported type '%v' for '%v', from %v.%v", uft, ft, t, m.Name) } } } diff --git a/vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go b/vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go index 5622c1a1beb..aaa3155a010 100644 --- a/vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go @@ -16,14 +16,24 @@ limitations under the License. // deepcopy-gen is a tool for auto-generating DeepCopy functions. // -// Given a list of input directories, it will generate functions that -// efficiently perform a full deep-copy of each type. For any type that -// offers a `.DeepCopy()` method, it will simply call that. Otherwise it will -// use standard value assignment whenever possible. If that is not possible it -// will try to call its own generated copy function for the type, if the type is -// within the allowed root packages. Failing that, it will fall back on -// `conversion.Cloner.DeepCopy(val)` to make the copy. The resulting file will -// be stored in the same directory as the processed source package. +// Given a list of input directories, it will generate DeepCopy and +// DeepCopyInto methods that efficiently perform a full deep-copy of each type. +// If these methods already exist (are predefined by the developer), they are +// used instead of generating new ones. Generated code will use standard value +// assignment whenever possible. If that is not possible it will try to call +// its own generated copy function for the type. Failing that, it will fall +// back on `conversion.Cloner.DeepCopy(val)` to make the copy. The resulting +// file will be stored in the same directory as the processed source package. +// +// If interfaces are referenced in types, it is expected that corresponding +// DeepCopyInterfaceName methods exist, e.g. DeepCopyObject for runtime.Object. +// These can be predefined by the developer or generated through tags, see +// below. They must be added to the interfaces themselves manually, e.g. +// +// type Object interface { +// ... +// DeepCopyObject() Object +// } // // Generation is governed by comment tags in the source. Any package may // request DeepCopy generation by including a comment in the file-comments of @@ -32,48 +42,67 @@ limitations under the License. // // +k8s:deepcopy-gen=package // // DeepCopy functions can be generated for individual types, rather than the -// entire package by specifying a comment on the type definion of the form: +// entire package by specifying a comment on the type definition of the form: // // // +k8s:deepcopy-gen=true // // When generating for a whole package, individual types may opt out of -// DeepCopy generation by specifying a comment on the of the form: +// DeepCopy generation by specifying a comment on the type definition of the +// form: // // // +k8s:deepcopy-gen=false // -// Note that registration is a whole-package option, and is not available for -// individual types. +// Additional DeepCopyInterfaceName methods can be generated by specifying a +// comment on the type definition of the form: +// +// // +k8s:deepcopy-gen:interfaces=k8s.io/kubernetes/runtime.Object,k8s.io/kubernetes/runtime.List +// +// This leads to the generation of DeepCopyObject and DeepCopyList with the given +// interfaces as return types. We say that the tagged type implements deepcopy for the +// interfaces. +// +// The deepcopy funcs for interfaces using "+k8s:deepcopy-gen:interfaces" use the pointer +// of the type as receiver. For those special cases where the non-pointer object should +// implement the interface, this can be done with: +// +// // +k8s:deepcopy-gen:nonpointer-interfaces=true package main import ( "flag" "github.com/spf13/pflag" - "k8s.io/gengo/examples/deepcopy-gen/generators" + "k8s.io/code-generator/cmd/deepcopy-gen/args" + "k8s.io/code-generator/cmd/deepcopy-gen/generators" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/deepcopy-gen/args" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() + args := args.New() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( + if err := gengo.Execute( generators.NameSystems(), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go index 3c5a042c7ca..52a9d1c67d0 100644 --- a/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go @@ -20,34 +20,33 @@ import ( "fmt" "github.com/spf13/pflag" - "k8s.io/gengo/args" - "k8s.io/gengo/examples/defaulter-gen/generators" ) -// CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs generators.CustomArgs +type Args struct { + OutputFile string + ExtraPeerDirs []string // Always consider these as last-ditch possibilities for conversions. + GoHeaderFile string +} -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{} - genericArgs.CustomArgs = (*generators.CustomArgs)(customArgs) // convert to upstream type to make type-casts work there - genericArgs.OutputFileBaseName = "zz_generated.defaults" - return genericArgs, customArgs +// New returns default arguments for the generator. +func New() *Args { + return &Args{} } // AddFlags add the generator flags to the flag set. -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { - pflag.CommandLine.StringSliceVar(&ca.ExtraPeerDirs, "extra-peer-dirs", ca.ExtraPeerDirs, +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputFile, "output-file", "generated.defaults.go", + "the name of the file to be generated") + fs.StringSliceVar(&args.ExtraPeerDirs, "extra-peer-dirs", args.ExtraPeerDirs, "Comma-separated list of import paths which are considered, after tag-specified peers, for conversions.") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - _ = genericArgs.CustomArgs.(*generators.CustomArgs) - - if len(genericArgs.OutputFileBaseName) == 0 { - return fmt.Errorf("output file base name cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputFile) == 0 { + return fmt.Errorf("--output-file must be specified") } return nil diff --git a/pkg/k8s/vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go b/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go similarity index 87% rename from pkg/k8s/vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go rename to vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go index e9ed41de36d..64b9ff29998 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go +++ b/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go @@ -21,26 +21,20 @@ import ( "encoding/json" "fmt" "io" - "path/filepath" + "path" "reflect" "regexp" "strconv" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - + "k8s.io/code-generator/cmd/defaulter-gen/args" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) -// CustomArgs is used tby the go2idl framework to pass args specific to this -// generator. -type CustomArgs struct { - ExtraPeerDirs []string // Always consider these as last-ditch possibilities for conversions. -} - var typeZeroValue = map[string]interface{}{ "uint": 0., "uint8": 0., @@ -71,19 +65,19 @@ const inputTagName = "k8s:defaulter-gen-input" const defaultTagName = "default" func extractDefaultTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[defaultTagName] + return gengo.ExtractCommentTags("+", comments)[defaultTagName] } func extractTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[tagName] + return gengo.ExtractCommentTags("+", comments)[tagName] } func extractInputTag(comments []string) []string { - return types.ExtractCommentTags("+", comments)[inputTagName] + return gengo.ExtractCommentTags("+", comments)[inputTagName] } func checkTag(comments []string, require ...string) bool { - values := types.ExtractCommentTags("+", comments)[tagName] + values := gengo.ExtractCommentTags("+", comments)[tagName] if len(require) == 0 { return len(values) == 1 && values[0] == "" } @@ -227,14 +221,13 @@ func getManualDefaultingFunctions(context *generator.Context, pkg *types.Package } } -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - packages := generator.Packages{} - header := append([]byte(fmt.Sprintf("// +build !%s\n\n", arguments.GeneratedBuildTag)), boilerplate...) + targets := []generator.Target{} // Accumulate pre-existing default functions. // TODO: This is too ad-hoc. We need a better way. @@ -243,36 +236,77 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat buffer := &bytes.Buffer{} sw := generator.NewSnippetWriter(buffer, context, "$", "$") - // We are generating defaults only for packages that are explicitly - // passed as InputDir. + // First load other "input" packages. We do this as a single call because + // it is MUCH faster. + inputPkgs := make([]string, 0, len(context.Inputs)) + pkgToInput := map[string]string{} for _, i := range context.Inputs { klog.V(5).Infof("considering pkg %q", i) + pkg := context.Universe[i] - if pkg == nil { - // If the input had no Go files, for example. - continue + + // if the types are not in the same package where the defaulter functions to be generated + inputTags := extractInputTag(pkg.Comments) + if len(inputTags) > 1 { + panic(fmt.Sprintf("there may only be one input tag, got %#v", inputTags)) + } + if len(inputTags) == 1 { + inputPath := inputTags[0] + if strings.HasPrefix(inputPath, "./") || strings.HasPrefix(inputPath, "../") { + // this is a relative dir, which will not work under gomodules. + // join with the local package path, but warn + klog.Warningf("relative path %s=%s will not work under gomodule mode; use full package path (as used by 'import') instead", inputTagName, inputPath) + inputPath = path.Join(pkg.Path, inputTags[0]) + } + + klog.V(5).Infof(" input pkg %v", inputPath) + inputPkgs = append(inputPkgs, inputPath) + pkgToInput[i] = inputPath + } else { + pkgToInput[i] = i + } + } + + // Make sure explicit peer-packages are added. + var peerPkgs []string + for _, pkg := range args.ExtraPeerDirs { + // In case someone specifies a peer as a path into vendor, convert + // it to its "real" package path. + if i := strings.Index(pkg, "/vendor/"); i != -1 { + pkg = pkg[i+len("/vendor/"):] + } + peerPkgs = append(peerPkgs, pkg) + } + if expanded, err := context.FindPackages(peerPkgs...); err != nil { + klog.Fatalf("cannot find peer packages: %v", err) + } else { + peerPkgs = expanded // now in fully canonical form + } + inputPkgs = append(inputPkgs, peerPkgs...) + + if len(inputPkgs) > 0 { + if _, err := context.LoadPackages(inputPkgs...); err != nil { + klog.Fatalf("cannot load packages: %v", err) } + } + // update context.Order to the latest context.Universe + orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)} + context.Order = orderer.OrderUniverse(context.Universe) + + for _, i := range context.Inputs { + pkg := context.Universe[i] + // typesPkg is where the types that needs defaulter are defined. // Sometimes it is different from pkg. For example, kubernetes core/v1 - // types are defined in vendor/k8s.io/api/core/v1, while pkg is at - // pkg/api/v1. + // types are defined in k8s.io/api/core/v1, while the pkg which holds + // defaulter code is at k/k/pkg/api/v1. typesPkg := pkg // Add defaulting functions. getManualDefaultingFunctions(context, pkg, existingDefaulters) - var peerPkgs []string - if customArgs, ok := arguments.CustomArgs.(*CustomArgs); ok { - for _, pkg := range customArgs.ExtraPeerDirs { - if i := strings.Index(pkg, "/vendor/"); i != -1 { - pkg = pkg[i+len("/vendor/"):] - } - peerPkgs = append(peerPkgs, pkg) - } - } - // Make sure our peer-packages are added and fully parsed. + // Also look for defaulting functions in peer-packages. for _, pp := range peerPkgs { - context.AddDir(pp) getManualDefaultingFunctions(context, context.Universe[pp], existingDefaulters) } @@ -312,30 +346,9 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat return false } - // if the types are not in the same package where the defaulter functions to be generated - inputTags := extractInputTag(pkg.Comments) - if len(inputTags) > 1 { - panic(fmt.Sprintf("there could only be one input tag, got %#v", inputTags)) - } - if len(inputTags) == 1 { - var err error - - inputPath := inputTags[0] - if strings.HasPrefix(inputPath, "./") || strings.HasPrefix(inputPath, "../") { - // this is a relative dir, which will not work under gomodules. - // join with the local package path, but warn - klog.Warningf("relative path %s=%s will not work under gomodule mode; use full package path (as used by 'import') instead", inputTagName, inputPath) - inputPath = filepath.Join(pkg.Path, inputTags[0]) - } - - typesPkg, err = context.AddDirectory(inputPath) - if err != nil { - klog.Fatalf("cannot import package %s", inputPath) - } - // update context.Order to the latest context.Universe - orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)} - context.Order = orderer.OrderUniverse(context.Universe) - } + // Find the right input pkg, which might not be this one. + inputPath := pkgToInput[i] + typesPkg = context.Universe[inputPath] newDefaulters := defaulterFuncMap{} for _, t := range typesPkg.Types { @@ -394,37 +407,25 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat klog.V(5).Infof("no defaulters in package %s", pkg.Name) } - path := pkg.Path - // if the source path is within a /vendor/ directory (for example, - // k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1), allow - // generation to output to the proper relative path (under vendor). - // Otherwise, the generator will create the file in the wrong location - // in the output directory. - // TODO: build a more fundamental concept in gengo for dealing with modifications - // to vendored packages. - if strings.HasPrefix(pkg.SourcePath, arguments.OutputBase) { - expandedPath := strings.TrimPrefix(pkg.SourcePath, arguments.OutputBase) - if strings.Contains(expandedPath, "/vendor/") { - path = expandedPath - } - } + targets = append(targets, + &generator.SimpleTarget{ + PkgName: path.Base(pkg.Path), + PkgPath: pkg.Path, + PkgDir: pkg.Dir, // output pkg is the same as the input + HeaderComment: boilerplate, - packages = append(packages, - &generator.DefaultPackage{ - PackageName: filepath.Base(pkg.Path), - PackagePath: path, - HeaderText: header, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - return []generator.Generator{ - NewGenDefaulter(arguments.OutputFileBaseName, typesPkg.Path, pkg.Path, existingDefaulters, newDefaulters, peerPkgs), - } - }, FilterFunc: func(c *generator.Context, t *types.Type) bool { return t.Name.Package == typesPkg.Path }, + + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { + return []generator.Generator{ + NewGenDefaulter(args.OutputFile, typesPkg.Path, pkg.Path, existingDefaulters, newDefaulters, peerPkgs), + } + }, }) } - return packages + return targets } // callTreeForType contains fields necessary to build a tree for types. @@ -513,39 +514,16 @@ func getNestedDefault(t *types.Type) string { return "" } -func mustEnforceDefault(t *types.Type, depth int, omitEmpty bool) (interface{}, error) { - if depth > 0 { - return nil, nil - } - switch t.Kind { - case types.Pointer, types.Map, types.Slice, types.Array, types.Interface: - return nil, nil - case types.Struct: - return map[string]interface{}{}, nil - case types.Builtin: - if !omitEmpty { - if zero, ok := typeZeroValue[t.String()]; ok { - return zero, nil - } else { - return nil, fmt.Errorf("please add type %v to typeZeroValue struct", t) - } - } - return nil, nil - default: - return nil, fmt.Errorf("not sure how to enforce default for %v", t.Kind) - } -} - var refRE = regexp.MustCompile(`^ref\((?P[^"]+)\)$`) var refREIdentIndex = refRE.SubexpIndex("reference") -// ParseSymbolReference looks for strings that match one of the following: +// parseSymbolReference looks for strings that match one of the following: // - ref(Ident) // - ref(pkgpath.Ident) // If the input string matches either of these, it will return the (optional) // pkgpath, the Ident, and true. Otherwise it will return empty strings and // false. -func ParseSymbolReference(s, sourcePackage string) (types.Name, bool) { +func parseSymbolReference(s, sourcePackage string) (types.Name, bool) { matches := refRE.FindStringSubmatch(s) if len(matches) < refREIdentIndex || matches[refREIdentIndex] == "" { return types.Name{}, false @@ -578,26 +556,19 @@ func populateDefaultValue(node *callNode, t *types.Type, tags string, commentLin } var symbolReference types.Name var defaultValue interface{} - if id, ok := ParseSymbolReference(defaultString, commentPackage); ok { + if id, ok := parseSymbolReference(defaultString, commentPackage); ok { symbolReference = id defaultString = "" } else if err := json.Unmarshal([]byte(defaultString), &defaultValue); err != nil { klog.Fatalf("Failed to unmarshal default: %v", err) } - omitEmpty := strings.Contains(reflect.StructTag(tags).Get("json"), "omitempty") - if enforced, err := mustEnforceDefault(baseT, depth, omitEmpty); err != nil { - klog.Fatal(err) - } else if enforced != nil { - if defaultValue != nil { - if reflect.DeepEqual(defaultValue, enforced) { - // If the default value annotation matches the default value for the type, - // do not generate any defaulting function - return node - } else { - enforcedJSON, _ := json.Marshal(enforced) - klog.Fatalf("Invalid default value (%#v) for non-pointer/non-omitempty. If specified, must be: %v", defaultValue, string(enforcedJSON)) - } + if defaultValue != nil { + zero := typeZeroValue[t.String()] + if reflect.DeepEqual(defaultValue, zero) { + // If the default value annotation matches the default value for the type, + // do not generate any defaulting function + return node } } @@ -632,7 +603,7 @@ func (c *callTreeForType) build(t *types.Type, root bool) *callNode { parent.elem = true } - defaults, _ := c.existingDefaulters[t] + defaults := c.existingDefaulters[t] newDefaults, generated := c.newDefaulters[t] switch { case !root && generated && newDefaults.object != nil: @@ -725,7 +696,7 @@ func (c *callTreeForType) build(t *types.Type, root bool) *callNode { } } if len(parent.children) == 0 && len(parent.call) == 0 { - //klog.V(6).Infof("decided type %s needs no generation", t.Name) + // klog.V(6).Infof("decided type %s needs no generation", t.Name) return nil } return parent @@ -738,7 +709,7 @@ const ( // genDefaulter produces a file with a autogenerated conversions. type genDefaulter struct { - generator.DefaultGen + generator.GoGenerator typesPackage string outputPackage string peerPackages []string @@ -748,10 +719,10 @@ type genDefaulter struct { typesForInit []*types.Type } -func NewGenDefaulter(sanitizedName, typesPackage, outputPackage string, existingDefaulters, newDefaulters defaulterFuncMap, peerPkgs []string) generator.Generator { +func NewGenDefaulter(outputFilename, typesPackage, outputPackage string, existingDefaulters, newDefaulters defaulterFuncMap, peerPkgs []string) generator.Generator { return &genDefaulter{ - DefaultGen: generator.DefaultGen{ - OptionalName: sanitizedName, + GoGenerator: generator.GoGenerator{ + OutputFilename: outputFilename, }, typesPackage: typesPackage, outputPackage: outputPackage, @@ -1015,7 +986,7 @@ func (n *callNode) writeCalls(varName string, isVarPointer bool, sw *generator.S func getTypeZeroValue(t string) (interface{}, error) { defaultZero, ok := typeZeroValue[t] if !ok { - return nil, fmt.Errorf("Cannot find zero value for type %v in typeZeroValue", t) + return nil, fmt.Errorf("cannot find zero value for type %v in typeZeroValue", t) } // To generate the code for empty string, they must be quoted @@ -1230,13 +1201,13 @@ func (path callPath) String() string { } case p.index: if len(parts) > 0 { - parts[last] = parts[last] + "[i]" + parts[last] += "[i]" } else { parts = append(parts, "[i]") } case p.key: if len(parts) > 0 { - parts[last] = parts[last] + "[key]" + parts[last] += "[key]" } else { parts = append(parts, "[key]") } diff --git a/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go b/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go index 23d5d3271bb..d57ca0666cd 100644 --- a/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go @@ -45,31 +45,37 @@ import ( "flag" "github.com/spf13/pflag" - "k8s.io/gengo/examples/defaulter-gen/generators" + "k8s.io/code-generator/cmd/defaulter-gen/args" + "k8s.io/code-generator/cmd/defaulter-gen/generators" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/defaulter-gen/args" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() + args := args.New() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( + if err := gengo.Execute( generators.NameSystems(), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go index ff267e2610e..ca21c76c344 100644 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go @@ -22,7 +22,6 @@ import ( "bytes" "fmt" "log" - "os" "os/exec" "path/filepath" "sort" @@ -30,19 +29,18 @@ import ( flag "github.com/spf13/pflag" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/parser" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/parser" + "k8s.io/gengo/v2/types" ) type Generator struct { - Common args.GeneratorArgs + GoHeaderFile string APIMachineryPackages string Packages string - OutputBase string - VendorOutputBase string + OutputDir string ProtoImport []string Conditional string Clean bool @@ -50,24 +48,12 @@ type Generator struct { KeepGogoproto bool SkipGeneratedRewrite bool DropEmbeddedFields string - TrimPathPrefix string } func New() *Generator { - sourceTree := args.DefaultSourceTree() - common := args.GeneratorArgs{ - OutputBase: sourceTree, - } - defaultProtoImport := filepath.Join(sourceTree, "k8s.io", "kubernetes", "vendor", "github.com", "gogo", "protobuf", "protobuf") - cwd, err := os.Getwd() - if err != nil { - log.Fatalf("Cannot get current directory.") - } + defaultSourceTree := "." return &Generator{ - Common: common, - OutputBase: sourceTree, - VendorOutputBase: filepath.Join(cwd, "vendor"), - ProtoImport: []string{defaultProtoImport}, + OutputDir: defaultSourceTree, APIMachineryPackages: strings.Join([]string{ `+k8s.io/apimachinery/pkg/util/intstr`, `+k8s.io/apimachinery/pkg/api/resource`, @@ -83,74 +69,56 @@ func New() *Generator { } func (g *Generator) BindFlags(flag *flag.FlagSet) { - flag.StringVarP(&g.Common.GoHeaderFilePath, "go-header-file", "h", g.Common.GoHeaderFilePath, "File containing boilerplate header text. The string YEAR will be replaced with the current 4-digit year.") - flag.BoolVar(&g.Common.VerifyOnly, "verify-only", g.Common.VerifyOnly, "If true, only verify existing output, do not write anything.") + flag.StringVarP(&g.GoHeaderFile, "go-header-file", "h", "", "File containing boilerplate header text. The string YEAR will be replaced with the current 4-digit year.") flag.StringVarP(&g.Packages, "packages", "p", g.Packages, "comma-separated list of directories to get input types from. Directories prefixed with '-' are not generated, directories prefixed with '+' only create types with explicit IDL instructions.") flag.StringVar(&g.APIMachineryPackages, "apimachinery-packages", g.APIMachineryPackages, "comma-separated list of directories to get apimachinery input types from which are needed by any API. Directories prefixed with '-' are not generated, directories prefixed with '+' only create types with explicit IDL instructions.") - flag.StringVarP(&g.OutputBase, "output-base", "o", g.OutputBase, "Output base; defaults to $GOPATH/src/") - flag.StringVar(&g.VendorOutputBase, "vendor-output-base", g.VendorOutputBase, "The vendor/ directory to look for packages in; defaults to $PWD/vendor/.") - flag.StringSliceVar(&g.ProtoImport, "proto-import", g.ProtoImport, "The search path for the core protobuf .protos, required; defaults $GOPATH/src/k8s.io/kubernetes/vendor/github.com/gogo/protobuf/protobuf.") + flag.StringVar(&g.OutputDir, "output-dir", g.OutputDir, "The base directory under which to generate results.") + flag.StringSliceVar(&g.ProtoImport, "proto-import", g.ProtoImport, "A search path for imported protobufs (may be repeated).") flag.StringVar(&g.Conditional, "conditional", g.Conditional, "An optional Golang build tag condition to add to the generated Go code") flag.BoolVar(&g.Clean, "clean", g.Clean, "If true, remove all generated files for the specified Packages.") flag.BoolVar(&g.OnlyIDL, "only-idl", g.OnlyIDL, "If true, only generate the IDL for each package.") flag.BoolVar(&g.KeepGogoproto, "keep-gogoproto", g.KeepGogoproto, "If true, the generated IDL will contain gogoprotobuf extensions which are normally removed") flag.BoolVar(&g.SkipGeneratedRewrite, "skip-generated-rewrite", g.SkipGeneratedRewrite, "If true, skip fixing up the generated.pb.go file (debugging only).") flag.StringVar(&g.DropEmbeddedFields, "drop-embedded-fields", g.DropEmbeddedFields, "Comma-delimited list of embedded Go types to omit from generated protobufs") - flag.StringVar(&g.TrimPathPrefix, "trim-path-prefix", g.TrimPathPrefix, "If set, trim the specified prefix from --output-package when generating files.") } +// This roughly models gengo/v2.Execute. func Run(g *Generator) { - if g.Common.VerifyOnly { - g.OnlyIDL = true - g.Clean = false - } - - b := parser.New() - b.AddBuildTags("proto") - - omitTypes := map[types.Name]struct{}{} - for _, t := range strings.Split(g.DropEmbeddedFields, ",") { - name := types.Name{} - if i := strings.LastIndex(t, "."); i != -1 { - name.Package, name.Name = t[:i], t[i+1:] - } else { - name.Name = t - } - if len(name.Name) == 0 { - log.Fatalf("--drop-embedded-types requires names in the form of [GOPACKAGE.]TYPENAME: %v", t) - } - omitTypes[name] = struct{}{} - } - - boilerplate, err := g.Common.LoadGoBoilerplate() - if err != nil { - log.Fatalf("Failed loading boilerplate (consider using the go-header-file flag): %v", err) - } + // Roughly models gengo/v2.newBuilder. - protobufNames := NewProtobufNamer() - outputPackages := generator.Packages{} - nonOutputPackages := map[string]struct{}{} + p := parser.NewWithOptions(parser.Options{BuildTags: []string{"proto"}}) - var packages []string + var allInputs []string if len(g.APIMachineryPackages) != 0 { - packages = append(packages, strings.Split(g.APIMachineryPackages, ",")...) + allInputs = append(allInputs, strings.Split(g.APIMachineryPackages, ",")...) } if len(g.Packages) != 0 { - packages = append(packages, strings.Split(g.Packages, ",")...) + allInputs = append(allInputs, strings.Split(g.Packages, ",")...) } - if len(packages) == 0 { + if len(allInputs) == 0 { log.Fatalf("Both apimachinery-packages and packages are empty. At least one package must be specified.") } - for _, d := range packages { - generateAllTypes, outputPackage := true, true + // Build up a list of packages to load from all the inputs. Track the + // special modifiers for each. NOTE: This does not support pkg/... syntax. + type modifier struct { + allTypes bool + output bool + name string + } + inputModifiers := map[string]modifier{} + packages := make([]string, 0, len(allInputs)) + + for _, d := range allInputs { + modifier := modifier{allTypes: true, output: true} + switch { case strings.HasPrefix(d, "+"): d = d[1:] - generateAllTypes = false + modifier.allTypes = false case strings.HasPrefix(d, "-"): d = d[1:] - outputPackage = false + modifier.output = false } name := protoSafePackage(d) parts := strings.SplitN(d, "=", 2) @@ -158,41 +126,21 @@ func Run(g *Generator) { d = parts[0] name = parts[1] } - p := newProtobufPackage(d, name, generateAllTypes, omitTypes) - header := append([]byte{}, boilerplate...) - header = append(header, p.HeaderText...) - p.HeaderText = header - protobufNames.Add(p) - if outputPackage { - outputPackages = append(outputPackages, p) - } else { - nonOutputPackages[name] = struct{}{} - } - } + modifier.name = name - if !g.Common.VerifyOnly { - for _, p := range outputPackages { - if err := p.(*protobufPackage).Clean(g.OutputBase); err != nil { - log.Fatalf("Unable to clean package %s: %v", p.Name(), err) - } - } - } - - if g.Clean { - return + packages = append(packages, d) + inputModifiers[d] = modifier } - for _, p := range protobufNames.List() { - if err := b.AddDir(p.Path()); err != nil { - log.Fatalf("Unable to add directory %q: %v", p.Path(), err) - } + // Load all the packages at once. + if err := p.LoadPackages(packages...); err != nil { + log.Fatalf("Unable to load packages: %v", err) } c, err := generator.NewContext( - b, + p, namer.NameSystems{ "public": namer.NewPublicNamer(3), - "proto": protobufNames, }, "public", ) @@ -200,9 +148,62 @@ func Run(g *Generator) { log.Fatalf("Failed making a context: %v", err) } - c.Verify = g.Common.VerifyOnly c.FileTypes["protoidl"] = NewProtoFile() - c.TrimPathPrefix = g.TrimPathPrefix + + // Roughly models gengo/v2.Execute calling the + // tool-provided Targets() callback. + + boilerplate, err := gengo.GoBoilerplate(g.GoHeaderFile, "", "") + if err != nil { + log.Fatalf("Failed loading boilerplate (consider using the go-header-file flag): %v", err) + } + + omitTypes := map[types.Name]struct{}{} + for _, t := range strings.Split(g.DropEmbeddedFields, ",") { + name := types.Name{} + if i := strings.LastIndex(t, "."); i != -1 { + name.Package, name.Name = t[:i], t[i+1:] + } else { + name.Name = t + } + if len(name.Name) == 0 { + log.Fatalf("--drop-embedded-types requires names in the form of [GOPACKAGE.]TYPENAME: %v", t) + } + omitTypes[name] = struct{}{} + } + + protobufNames := NewProtobufNamer() + outputPackages := []generator.Target{} + nonOutputPackages := map[string]struct{}{} + + for _, input := range c.Inputs { + mod, found := inputModifiers[input] + if !found { + log.Fatalf("BUG: can't find input modifiers for %q", input) + } + pkg := c.Universe[input] + protopkg := newProtobufPackage(pkg.Path, pkg.Dir, mod.name, mod.allTypes, omitTypes) + header := append([]byte{}, boilerplate...) + header = append(header, protopkg.HeaderComment...) + protopkg.HeaderComment = header + protobufNames.Add(protopkg) + if mod.output { + outputPackages = append(outputPackages, protopkg) + } else { + nonOutputPackages[mod.name] = struct{}{} + } + } + c.Namers["proto"] = protobufNames + + for _, p := range outputPackages { + if err := p.(*protobufPackage).Clean(); err != nil { + log.Fatalf("Unable to clean package %s: %v", p.Name(), err) + } + } + + if g.Clean { + return + } // order package by imports, importees first deps := deps(c, protobufNames.packages) @@ -216,28 +217,20 @@ func Run(g *Generator) { } sort.Sort(positionOrder{topologicalPos, protobufNames.packages}) - var vendoredOutputPackages, localOutputPackages generator.Packages + var localOutputPackages []generator.Target for _, p := range protobufNames.packages { if _, ok := nonOutputPackages[p.Name()]; ok { // if we're not outputting the package, don't include it in either package list continue } - p.Vendored = strings.Contains(c.Universe[p.PackagePath].SourcePath, "/vendor/") - if p.Vendored { - vendoredOutputPackages = append(vendoredOutputPackages, p) - } else { - localOutputPackages = append(localOutputPackages, p) - } + localOutputPackages = append(localOutputPackages, p) } if err := protobufNames.AssignTypesToPackages(c); err != nil { log.Fatalf("Failed to identify Common types: %v", err) } - if err := c.ExecutePackages(g.VendorOutputBase, vendoredOutputPackages); err != nil { - log.Fatalf("Failed executing vendor generator: %v", err) - } - if err := c.ExecutePackages(g.OutputBase, localOutputPackages); err != nil { + if err := c.ExecuteTargets(localOutputPackages); err != nil { log.Fatalf("Failed executing local generator: %v", err) } @@ -249,13 +242,24 @@ func Run(g *Generator) { log.Fatalf("Unable to find 'protoc': %v", err) } - searchArgs := []string{"-I", ".", "-I", g.OutputBase} + searchArgs := []string{"-I", ".", "-I", g.OutputDir} if len(g.ProtoImport) != 0 { for _, s := range g.ProtoImport { searchArgs = append(searchArgs, "-I", s) } } - args := append(searchArgs, fmt.Sprintf("--gogo_out=%s", g.OutputBase)) + // Despite docs saying that `--gogo_out=paths=source_relative:.` will + // output the .pb.go file to the same directory as the .proto file, it + // doesn't. Given example.com/foo/bar.proto (found in one of the -I paths + // above), the output becomes + // $output_base/example.com/foo/example.com/foo/bar.pb.go - basically + // useless. Users should set the output-dir to a single dir under which + // all the packages in question live (e.g. staging/src in kubernetes). + // Alternately, we could generate into a temp path and then move the + // resulting file back to the input dir, but that seems brittle in other + // ways. + args := searchArgs + args = append(args, fmt.Sprintf("--gogo_out=%s", g.OutputDir)) buf := &bytes.Buffer{} if len(g.Conditional) > 0 { @@ -266,28 +270,8 @@ func Run(g *Generator) { for _, outputPackage := range outputPackages { p := outputPackage.(*protobufPackage) - path := filepath.Join(g.OutputBase, p.ImportPath()) - outputPath := filepath.Join(g.OutputBase, p.OutputPath()) - if p.Vendored { - path = filepath.Join(g.VendorOutputBase, p.ImportPath()) - outputPath = filepath.Join(g.VendorOutputBase, p.OutputPath()) - } - - // When working outside of GOPATH, we typically won't want to generate the - // full path for a package. For example, if our current project's root/base - // package is github.com/foo/bar, outDir=., p.Path()=github.com/foo/bar/generated, - // then we really want to be writing files to ./generated, not ./github.com/foo/bar/generated. - // The following will trim a path prefix (github.com/foo/bar) from p.Path() to arrive at - // a relative path that works with projects not in GOPATH. - if g.TrimPathPrefix != "" { - separator := string(filepath.Separator) - if !strings.HasSuffix(g.TrimPathPrefix, separator) { - g.TrimPathPrefix += separator - } - - path = strings.TrimPrefix(path, g.TrimPathPrefix) - outputPath = strings.TrimPrefix(outputPath, g.TrimPathPrefix) - } + path := filepath.Join(g.OutputDir, p.ImportPath()) + outputPath := filepath.Join(g.OutputDir, p.OutputPath()) // generate the gogoprotobuf protoc cmd := exec.Command("protoc", append(args, path)...) @@ -295,7 +279,7 @@ func Run(g *Generator) { if err != nil { log.Println(strings.Join(cmd.Args, " ")) log.Println(string(out)) - log.Fatalf("Unable to generate protoc on %s: %v", p.PackageName, err) + log.Fatalf("Unable to run protoc on %s: %v", p.Name(), err) } if g.SkipGeneratedRewrite { @@ -316,7 +300,7 @@ func Run(g *Generator) { } if err != nil { log.Println(strings.Join(cmd.Args, " ")) - log.Fatalf("Unable to rewrite imports for %s: %v", p.PackageName, err) + log.Fatalf("Unable to rewrite imports for %s: %v", p.Name(), err) } // format and simplify the generated file @@ -327,7 +311,7 @@ func Run(g *Generator) { } if err != nil { log.Println(strings.Join(cmd.Args, " ")) - log.Fatalf("Unable to apply gofmt for %s: %v", p.PackageName, err) + log.Fatalf("Unable to apply gofmt for %s: %v", p.Name(), err) } } @@ -341,10 +325,7 @@ func Run(g *Generator) { p := outputPackage.(*protobufPackage) p.OmitGogo = true } - if err := c.ExecutePackages(g.VendorOutputBase, vendoredOutputPackages); err != nil { - log.Fatalf("Failed executing vendor generator: %v", err) - } - if err := c.ExecutePackages(g.OutputBase, localOutputPackages); err != nil { + if err := c.ExecuteTargets(localOutputPackages); err != nil { log.Fatalf("Failed executing local generator: %v", err) } } @@ -356,10 +337,7 @@ func Run(g *Generator) { continue } - pattern := filepath.Join(g.OutputBase, p.PackagePath, "*.go") - if p.Vendored { - pattern = filepath.Join(g.VendorOutputBase, p.PackagePath, "*.go") - } + pattern := filepath.Join(g.OutputDir, p.Path(), "*.go") files, err := filepath.Glob(pattern) if err != nil { log.Fatalf("Can't glob pattern %q: %v", pattern, err) @@ -379,13 +357,13 @@ func Run(g *Generator) { func deps(c *generator.Context, pkgs []*protobufPackage) map[string][]string { ret := map[string][]string{} for _, p := range pkgs { - pkg, ok := c.Universe[p.PackagePath] + pkg, ok := c.Universe[p.Path()] if !ok { - log.Fatalf("Unrecognized package: %s", p.PackagePath) + log.Fatalf("Unrecognized package: %s", p.Path()) } for _, d := range pkg.Imports { - ret[p.PackagePath] = append(ret[p.PackagePath], d.Path) + ret[p.Path()] = append(ret[p.Path()], d.Path) } } return ret @@ -414,9 +392,9 @@ func importOrder(deps map[string][]string) ([]string, error) { if len(remainingNodes) > 0 { return nil, fmt.Errorf("cycle: remaining nodes: %#v, remaining edges: %#v", remainingNodes, graph) } - //for _, n := range sorted { - // fmt.Println("topological order", n) - //} + // for _, n := range sorted { + // fmt.Println("topological order", n) + // } return sorted, nil } @@ -470,11 +448,9 @@ func (o positionOrder) Len() int { } func (o positionOrder) Less(i, j int) bool { - return o.pos[o.elements[i].PackagePath] < o.pos[o.elements[j].PackagePath] + return o.pos[o.elements[i].Path()] < o.pos[o.elements[j].Path()] } func (o positionOrder) Swap(i, j int) { - x := o.elements[i] - o.elements[i] = o.elements[j] - o.elements[j] = x + o.elements[i], o.elements[j] = o.elements[j], o.elements[i] } diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go index c480a8a62ea..0fc653dda1c 100644 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go @@ -25,16 +25,18 @@ import ( "strconv" "strings" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" - - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" ) // genProtoIDL produces a .proto IDL. type genProtoIDL struct { - generator.DefaultGen + // This base type is close enough to what we need, if we redefine some + // methods. + generator.GoGenerator localPackage types.Name localGoPackage types.Name imports namer.ImportTracker @@ -63,8 +65,11 @@ func (g *genProtoIDL) PackageVars(c *generator.Context) []string { fmt.Sprintf("option go_package = %q;", g.localGoPackage.Package), } } -func (g *genProtoIDL) Filename() string { return g.OptionalName + ".proto" } + +func (g *genProtoIDL) Filename() string { return g.OutputFilename + ".proto" } + func (g *genProtoIDL) FileType() string { return "protoidl" } + func (g *genProtoIDL) Namers(c *generator.Context) namer.NameSystems { return namer.NameSystems{ // The local namer returns the correct protobuf name for a proto type @@ -75,7 +80,7 @@ func (g *genProtoIDL) Namers(c *generator.Context) namer.NameSystems { // Filter ignores types that are identified as not exportable. func (g *genProtoIDL) Filter(c *generator.Context, t *types.Type) bool { - tagVals := types.ExtractCommentTags("+", t.CommentLines)["protobuf"] + tagVals := gengo.ExtractCommentTags("+", t.CommentLines)["protobuf"] if tagVals != nil { if tagVals[0] == "false" { // Type specified "false". @@ -224,9 +229,8 @@ func (p protobufLocator) GoTypeForName(name types.Name) *types.Type { // ProtoTypeFor locates a Protobuf type for the provided Go type (if possible). func (p protobufLocator) ProtoTypeFor(t *types.Type) (*types.Type, error) { - switch { // we've already converted the type, or it's a map - case t.Kind == types.Protobuf || t.Kind == types.Map: + if t.Kind == types.Protobuf || t.Kind == types.Map { p.tracker.AddType(t) return t, nil } @@ -304,7 +308,7 @@ func (b bodyGen) doStruct(sw *generator.SnippetWriter) error { var alias *types.Type var fields []protoField options := []string{} - allOptions := types.ExtractCommentTags("+", b.t.CommentLines) + allOptions := gengo.ExtractCommentTags("+", b.t.CommentLines) for k, v := range allOptions { switch { case strings.HasPrefix(k, "protobuf.options."): @@ -554,11 +558,11 @@ func protobufTagToField(tag string, field *protoField, m types.Member, t *types. // protobuf:"bytes,3,opt,name=Id,customtype=github.com/gogo/protobuf/test.Uuid" parts := strings.Split(tag, ",") if len(parts) < 3 { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, not enough segments\n", m.Name, t.Name) + return fmt.Errorf("member %q of %q malformed 'protobuf' tag, not enough segments", m.Name, t.Name) } protoTag, err := strconv.Atoi(parts[1]) if err != nil { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, field ID is %q which is not an integer: %v\n", m.Name, t.Name, parts[1], err) + return fmt.Errorf("member %q of %q malformed 'protobuf' tag, field ID is %q which is not an integer: %w", m.Name, t.Name, parts[1], err) } field.Tag = protoTag @@ -579,7 +583,7 @@ func protobufTagToField(tag string, field *protoField, m types.Member, t *types. name = types.Name{ Name: parts[0][last+1:], Package: prefix, - Path: strings.Replace(prefix, ".", "/", -1), + Path: strings.ReplaceAll(prefix, ".", "/"), } } else { name = types.Name{ @@ -598,7 +602,7 @@ func protobufTagToField(tag string, field *protoField, m types.Member, t *types. for i, extra := range parts[3:] { parts := strings.SplitN(extra, "=", 2) if len(parts) != 2 { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, tag %d should be key=value, got %q\n", m.Name, t.Name, i+4, extra) + return fmt.Errorf("member %q of %q malformed 'protobuf' tag, tag %d should be key=value, got %q", m.Name, t.Name, i+4, extra) } switch parts[0] { case "name": diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go index 08a991b1554..0031c9bd831 100644 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go @@ -17,8 +17,8 @@ limitations under the License. package protobuf import ( - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) type ImportTracker struct { diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go index e3b21c6703f..54806384739 100644 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go @@ -21,9 +21,9 @@ import ( "reflect" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) type localNamer struct { @@ -41,7 +41,8 @@ func (n localNamer) Name(t *types.Type) string { } type protobufNamer struct { - packages []*protobufPackage + packages []*protobufPackage + // The key here is a Go import-path. packagesByPath map[string]*protobufPackage } @@ -58,17 +59,9 @@ func (n *protobufNamer) Name(t *types.Type) string { return t.Name.String() } -func (n *protobufNamer) List() []generator.Package { - packages := make([]generator.Package, 0, len(n.packages)) - for i := range n.packages { - packages = append(packages, n.packages[i]) - } - return packages -} - func (n *protobufNamer) Add(p *protobufPackage) { - if _, ok := n.packagesByPath[p.PackagePath]; !ok { - n.packagesByPath[p.PackagePath] = p + if _, ok := n.packagesByPath[p.Path()]; !ok { + n.packagesByPath[p.Path()] = p n.packages = append(n.packages, p) } } @@ -77,7 +70,7 @@ func (n *protobufNamer) GoNameToProtoName(name types.Name) types.Name { if p, ok := n.packagesByPath[name.Package]; ok { return types.Name{ Name: name.Name, - Package: p.PackageName, + Package: p.Name(), Path: p.ImportPath(), } } @@ -85,7 +78,7 @@ func (n *protobufNamer) GoNameToProtoName(name types.Name) types.Name { if _, ok := p.FilterTypes[name]; ok { return types.Name{ Name: name.Name, - Package: p.PackageName, + Package: p.Name(), Path: p.ImportPath(), } } @@ -94,8 +87,8 @@ func (n *protobufNamer) GoNameToProtoName(name types.Name) types.Name { } func protoSafePackage(name string) string { - pkg := strings.Replace(name, "/", ".", -1) - return strings.Replace(pkg, "-", "_", -1) + pkg := strings.ReplaceAll(name, "/", ".") + return strings.ReplaceAll(pkg, "-", "_") } type typeNameSet map[types.Name]*protobufPackage @@ -116,7 +109,7 @@ func assignGoTypeToProtoPackage(p *protobufPackage, t *types.Type, local, global } return } - if t.Name.Package == p.PackagePath { + if t.Name.Package == p.Path() { // Associate types only to their own package global[t.Name] = p } @@ -182,7 +175,7 @@ func (n *protobufNamer) AssignTypesToPackages(c *generator.Context) error { optional := make(map[types.Name]struct{}) p.Imports = NewImportTracker(p.ProtoTypeName()) for _, t := range c.Order { - if t.Name.Package != p.PackagePath { + if t.Name.Package != p.Path() { continue } if !isTypeApplicableToProtobuf(t) { diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go index bed4c3e3061..b31a7c4dd79 100644 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go @@ -25,41 +25,31 @@ import ( "reflect" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/types" ) -func newProtobufPackage(packagePath, packageName string, generateAll bool, omitFieldTypes map[types.Name]struct{}) *protobufPackage { +func newProtobufPackage(packagePath, packageDir, packageName string, generateAll bool, omitFieldTypes map[types.Name]struct{}) *protobufPackage { pkg := &protobufPackage{ - DefaultPackage: generator.DefaultPackage{ + SimpleTarget: generator.SimpleTarget{ // The protobuf package name (foo.bar.baz) - PackageName: packageName, - // A path segment relative to the GOPATH root (foo/bar/baz) - PackagePath: packagePath, - HeaderText: []byte( - ` -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -`), - PackageDocumentation: []byte(fmt.Sprintf( - `// Package %s is an autogenerated protobuf IDL. -`, packageName)), + PkgName: packageName, + PkgPath: packagePath, + PkgDir: packageDir, + HeaderComment: []byte("// This file was autogenerated by go-to-protobuf. Do not edit it manually!\n\n"), + PkgDocComment: []byte(fmt.Sprintf("// Package %s is an autogenerated protobuf IDL.\n", packageName)), }, GenerateAll: generateAll, OmitFieldTypes: omitFieldTypes, } pkg.FilterFunc = pkg.filterFunc - pkg.GeneratorFunc = pkg.generatorFunc + pkg.GeneratorsFunc = pkg.generatorsFunc return pkg } // protobufPackage contains the protobuf implementation of Package. type protobufPackage struct { - generator.DefaultPackage - - // If true, this package has been vendored into our source tree and thus can - // only be generated by changing the vendor tree. - Vendored bool + generator.SimpleTarget // If true, generate protobuf serializations for all public types. // If false, only generate protobuf serializations for structs that @@ -89,9 +79,9 @@ type protobufPackage struct { Imports *ImportTracker } -func (p *protobufPackage) Clean(outputBase string) error { +func (p *protobufPackage) Clean() error { for _, s := range []string{p.ImportPath(), p.OutputPath()} { - if err := os.Remove(filepath.Join(outputBase, s)); err != nil && !os.IsNotExist(err) { + if err := os.Remove(filepath.Join(p.Dir(), filepath.Base(s))); err != nil && !os.IsNotExist(err) { return err } } @@ -179,17 +169,17 @@ func (p *protobufPackage) ExtractGeneratedType(t *ast.TypeSpec) bool { return true } -func (p *protobufPackage) generatorFunc(c *generator.Context) []generator.Generator { +func (p *protobufPackage) generatorsFunc(c *generator.Context) []generator.Generator { generators := []generator.Generator{} p.Imports.AddNullable() generators = append(generators, &genProtoIDL{ - DefaultGen: generator.DefaultGen{ - OptionalName: "generated", + GoGenerator: generator.GoGenerator{ + OutputFilename: "generated", // the extension is added later }, - localPackage: types.Name{Package: p.PackageName, Path: p.PackagePath}, - localGoPackage: types.Name{Package: p.PackagePath, Name: p.GoPackageName()}, + localPackage: types.Name{Package: p.Name(), Path: p.Path()}, + localGoPackage: types.Name{Package: p.Path(), Name: p.GoPackageName()}, imports: p.Imports, generateAll: p.GenerateAll, omitGogo: p.OmitGogo, @@ -199,17 +189,17 @@ func (p *protobufPackage) generatorFunc(c *generator.Context) []generator.Genera } func (p *protobufPackage) GoPackageName() string { - return filepath.Base(p.PackagePath) + return filepath.Base(p.Path()) } func (p *protobufPackage) ImportPath() string { - return filepath.Join(p.PackagePath, "generated.proto") + return filepath.Join(p.Path(), "generated.proto") } func (p *protobufPackage) OutputPath() string { - return filepath.Join(p.PackagePath, "generated.pb.go") + return filepath.Join(p.Path(), "generated.pb.go") } var ( - _ = generator.Package(&protobufPackage{}) + _ = generator.Target(&protobufPackage{}) ) diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go index c4cf66e7447..32f9e0da274 100644 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go @@ -111,8 +111,7 @@ func RewriteGeneratedGogoProtobufFile(name string, extractFn ExtractFunc, option // TODO: move into upstream gogo-protobuf once https://github.com/gogo/protobuf/issues/181 // has agreement func rewriteOptionalMethods(decl ast.Decl, isOptional OptionalFunc) { - switch t := decl.(type) { - case *ast.FuncDecl: + if t, ok := decl.(*ast.FuncDecl); ok { ident, ptr, ok := receiver(t) if !ok { return @@ -150,8 +149,7 @@ type optionalAssignmentVisitor struct { // Visit walks the provided node, transforming field initializations of the form // m.Field = &OptionalType{} -> m.Field = OptionalType{} func (v optionalAssignmentVisitor) Visit(n ast.Node) ast.Visitor { - switch t := n.(type) { - case *ast.AssignStmt: + if t, ok := n.(*ast.AssignStmt); ok { if len(t.Lhs) == 1 && len(t.Rhs) == 1 { if !isFieldSelector(t.Lhs[0], "m", "") { return nil @@ -195,13 +193,11 @@ func (v *optionalItemsVisitor) Visit(n ast.Node) ast.Visitor { t.Lhs[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} } } - switch rhs := t.Rhs[0].(type) { - case *ast.CallExpr: + if rhs, ok := t.Rhs[0].(*ast.CallExpr); ok { if ident, ok := rhs.Fun.(*ast.Ident); ok && ident.Name == "append" { ast.Walk(v, rhs) if len(rhs.Args) > 0 { - switch arg := rhs.Args[0].(type) { - case *ast.Ident: + if arg, ok := rhs.Args[0].(*ast.Ident); ok { if arg.Name == "m" { rhs.Args[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} } @@ -212,8 +208,7 @@ func (v *optionalItemsVisitor) Visit(n ast.Node) ast.Visitor { } } case *ast.IfStmt: - switch cond := t.Cond.(type) { - case *ast.BinaryExpr: + if cond, ok := t.Cond.(*ast.BinaryExpr); ok { if cond.Op == token.EQL { if isFieldSelector(cond.X, "m", "Items") && isIdent(cond.Y, "nil") { cond.X = &ast.StarExpr{X: &ast.Ident{Name: "m"}} @@ -225,8 +220,7 @@ func (v *optionalItemsVisitor) Visit(n ast.Node) ast.Visitor { // if err := m[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { // return err // } - switch s := t.Init.(type) { - case *ast.AssignStmt: + if s, ok := t.Init.(*ast.AssignStmt); ok { if call, ok := s.Rhs[0].(*ast.CallExpr); ok { if sel, ok := call.Fun.(*ast.SelectorExpr); ok { if x, ok := sel.X.(*ast.IndexExpr); ok { @@ -302,15 +296,13 @@ func receiver(f *ast.FuncDecl) (ident *ast.Ident, pointer bool, ok bool) { // dropExistingTypeDeclarations removes any type declaration for which extractFn returns true. The function // returns true if the entire declaration should be dropped. func dropExistingTypeDeclarations(decl ast.Decl, extractFn ExtractFunc) bool { - switch t := decl.(type) { - case *ast.GenDecl: + if t, ok := decl.(*ast.GenDecl); ok { if t.Tok != token.TYPE { return false } specs := []ast.Spec{} for _, s := range t.Specs { - switch spec := s.(type) { - case *ast.TypeSpec: + if spec, ok := s.(*ast.TypeSpec); ok { if extractFn(spec) { continue } @@ -329,15 +321,13 @@ func dropExistingTypeDeclarations(decl ast.Decl, extractFn ExtractFunc) bool { // to prevent generation from being able to define side-effects. The function returns true // if the entire declaration should be dropped. func dropEmptyImportDeclarations(decl ast.Decl) bool { - switch t := decl.(type) { - case *ast.GenDecl: + if t, ok := decl.(*ast.GenDecl); ok { if t.Tok != token.IMPORT { return false } specs := []ast.Spec{} for _, s := range t.Specs { - switch spec := s.(type) { - case *ast.ImportSpec: + if spec, ok := s.(*ast.ImportSpec); ok { if spec.Name != nil && spec.Name.Name == "_" { continue } diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go index 6cfa37886b4..44ca07d1a84 100644 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go @@ -17,7 +17,7 @@ limitations under the License. package protobuf import ( - "k8s.io/gengo/types" + "k8s.io/gengo/v2" "k8s.io/klog/v2" ) @@ -25,7 +25,7 @@ import ( // it exists, the value is boolean. If the tag did not exist, it returns // false. func extractBoolTagOrDie(key string, lines []string) bool { - val, err := types.ExtractSingleBoolCommentTag("+", key, false, lines) + val, err := gengo.ExtractSingleBoolCommentTag("+", key, false, lines) if err != nil { klog.Fatal(err) } diff --git a/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore b/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore deleted file mode 100644 index a5c47b66f83..00000000000 --- a/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore +++ /dev/null @@ -1 +0,0 @@ -import-boss diff --git a/vendor/k8s.io/code-generator/cmd/import-boss/README.md b/vendor/k8s.io/code-generator/cmd/import-boss/README.md deleted file mode 100644 index 88dc010ef68..00000000000 --- a/vendor/k8s.io/code-generator/cmd/import-boss/README.md +++ /dev/null @@ -1,97 +0,0 @@ -## Purpose - -- `import-boss` enforces import restrictions against all pull requests submitted to the [k/k](https://github.com/kubernetes/kubernetes) repository. There are a number of `.import-restrictions` files that in the [k/k](https://github.com/kubernetes/kubernetes) repository, all of which are defined in `YAML` (or `JSON`) format. - -## How does it work? - -- When a directory is verified, `import-boss` looks for a file called `.import-restrictions`. If this file is not found, `import-boss` will go up to the parent directory until it finds this `.import-restrictions` file. - -- Adding `.import-restrictions` files does not add them to CI runs. They need to be explicitly added to `hack/verify-import-boss.sh`. Once an `.import-restrictions` file is added, all of the sub-packages of this file's directory are added as well. - -### What are Rules? - -- If an `.import-restrictions` file is found, then all imports of the package are checked against each `rule` in the file. A `rule` consists of three parts: - - A `SelectorRegexp`, to select the import paths that the rule applies to. - - A list of `AllowedPrefixes` - - A list of `ForbiddenPrefixes` - -- An import is allowed if it matches at least one allowed prefix and does not match any forbidden prefixes. An example `.import-restrictions` file looks like this: - -```json -{ - "Rules": [ - { - "SelectorRegexp": "k8s[.]io", - "AllowedPrefixes": [ - "k8s.io/gengo/examples", - "k8s.io/kubernetes/third_party" - ], - "ForbiddenPrefixes": [ - "k8s.io/kubernetes/pkg/third_party/deprecated" - ] - }, - { - "SelectorRegexp": "^unsafe$", - "AllowedPrefixes": [ - ], - "ForbiddenPrefixes": [ - "" - ] - } - ] -} -``` -- Take note of `"SelectorRegexp": "k8s[.]io"` in the first block. This specifies that we are applying these rules to the `"k8s.io"` import path. -- The second block explicitly matches the "unsafe" package, and forbids it ("" is a prefix of everything). - -### What are Inverse Rules? - -- In contrast to non-inverse rules, which are defined in importing packages, inverse rules are defined in imported packages. - -- Inverse rules allow for fine-grained import restrictions for "private packages" where we don't want to spread use inside of [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes). - -- If an `.import-restrictions` file is found, then all imports of the package are checked against each `inverse rule` in the file. This check will continue, climbing up the directory tree, until a match is found and accepted. - -- Inverse rules also have a boolean `transitive` option. When this option is true, the import rule is also applied to `transitive` imports. - - `transitive` imports are dependencies not directly depended on by the code, but are needed to run the application. Use this option if you want to apply restrictions to those indirect dependencies. - -```yaml -rules: - - selectorRegexp: k8s[.]io - allowedPrefixes: - - k8s.io/gengo/examples - - k8s.io/kubernetes/third_party - forbiddenPrefixes: - - k8s.io/kubernetes/pkg/third_party/deprecated - - selectorRegexp: ^unsafe$ - forbiddenPrefixes: - - "" -inverseRules: - - selectorRegexp: k8s[.]io - allowedPrefixes: - - k8s.io/same-repo - - k8s.io/kubernetes/pkg/legacy - forbiddenPrefixes: - - k8s.io/kubernetes/pkg/legacy/subpkg - - selectorRegexp: k8s[.]io - transitive: true - forbiddenPrefixes: - - k8s.io/kubernetes/cmd/kubelet - - k8s.io/kubernetes/cmd/kubectl -``` - -## How do I run import-boss within the k/k repo? - -- In order to include _test.go files, make sure to pass in the `include-test-files` flag: - ```sh - hack/verify-import-boss.sh --include-test-files=true - ``` - -- To include other directories, pass in a directory or directories using the `input-dirs` flag: - ```sh - hack/verify-import-boss.sh --input-dirs="k8s.io/kubernetes/test/e2e/framework/..." - ``` - -## Reference - -- [import-boss](https://github.com/kubernetes/gengo/tree/master/examples/import-boss) \ No newline at end of file diff --git a/vendor/k8s.io/code-generator/cmd/import-boss/main.go b/vendor/k8s.io/code-generator/cmd/import-boss/main.go deleted file mode 100644 index 34373c54117..00000000000 --- a/vendor/k8s.io/code-generator/cmd/import-boss/main.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. -*/ - -// import-boss enforces import restrictions in a given repository. -package main - -import ( - "os" - - "github.com/spf13/pflag" - "k8s.io/gengo/args" - "k8s.io/gengo/examples/import-boss/generators" - - "k8s.io/klog/v2" -) - -func main() { - klog.InitFlags(nil) - arguments := args.Default() - - pflag.CommandLine.BoolVar(&arguments.IncludeTestFiles, "include-test-files", false, "If true, include *_test.go files.") - - if err := arguments.Execute( - generators.NameSystems(), - generators.DefaultNameSystem(), - generators.Packages, - ); err != nil { - klog.Errorf("Error: %v", err) - os.Exit(1) - } - klog.V(2).Info("Completed successfully.") -} diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go index ffd073a86b4..8052578c543 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/args/args.go @@ -18,18 +18,18 @@ package args import ( "fmt" - "path" "github.com/spf13/pflag" - codegenutil "k8s.io/code-generator/pkg/util" - "k8s.io/gengo/args" ) -// CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs struct { - VersionedClientSetPackage string - InternalClientSetPackage string - ListersPackage string +// Args is used by the gengo framework to pass args specific to this generator. +type Args struct { + OutputDir string // must be a directory path + OutputPkg string // must be a Go import-path + GoHeaderFile string + VersionedClientSetPackage string // must be a Go import-path + InternalClientSetPackage string // must be a Go import-path + ListersPackage string // must be a Go import-path SingleDirectory bool // PluralExceptions define a list of pluralizer exceptions in Type:PluralType format. @@ -37,47 +37,46 @@ type CustomArgs struct { PluralExceptions []string } -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{ - SingleDirectory: false, - PluralExceptions: []string{"Endpoints:Endpoints"}, +// New returns default arguments for the generator. +func New() *Args { + return &Args{ + SingleDirectory: false, } - genericArgs.CustomArgs = customArgs - - if pkg := codegenutil.CurrentPackage(); len(pkg) != 0 { - genericArgs.OutputPackagePath = path.Join(pkg, "pkg/client/informers") - customArgs.VersionedClientSetPackage = path.Join(pkg, "pkg/client/clientset/versioned") - customArgs.InternalClientSetPackage = path.Join(pkg, "pkg/client/clientset/internalversion") - customArgs.ListersPackage = path.Join(pkg, "pkg/client/listers") - } - - return genericArgs, customArgs } // AddFlags add the generator flags to the flag set. -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { - fs.StringVar(&ca.InternalClientSetPackage, "internal-clientset-package", ca.InternalClientSetPackage, "the full package name for the internal clientset to use") - fs.StringVar(&ca.VersionedClientSetPackage, "versioned-clientset-package", ca.VersionedClientSetPackage, "the full package name for the versioned clientset to use") - fs.StringVar(&ca.ListersPackage, "listers-package", ca.ListersPackage, "the full package name for the listers to use") - fs.BoolVar(&ca.SingleDirectory, "single-directory", ca.SingleDirectory, "if true, omit the intermediate \"internalversion\" and \"externalversions\" subdirectories") - fs.StringSliceVar(&ca.PluralExceptions, "plural-exceptions", ca.PluralExceptions, "list of comma separated plural exception definitions in Type:PluralizedType format") +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputDir, "output-dir", "", + "the base directory under which to generate results") + fs.StringVar(&args.OutputPkg, "output-pkg", args.OutputPkg, + "the Go import-path of the generated results") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") + fs.StringVar(&args.InternalClientSetPackage, "internal-clientset-package", args.InternalClientSetPackage, + "the Go import-path of the internal clientset to use") + fs.StringVar(&args.VersionedClientSetPackage, "versioned-clientset-package", args.VersionedClientSetPackage, + "the Go import-path of the versioned clientset to use") + fs.StringVar(&args.ListersPackage, "listers-package", args.ListersPackage, + "the Go import-path of the listers to use") + fs.BoolVar(&args.SingleDirectory, "single-directory", args.SingleDirectory, + "if true, omit the intermediate \"internalversion\" and \"externalversions\" subdirectories") + fs.StringSliceVar(&args.PluralExceptions, "plural-exceptions", args.PluralExceptions, + "list of comma separated plural exception definitions in Type:PluralizedType format") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - customArgs := genericArgs.CustomArgs.(*CustomArgs) - - if len(genericArgs.OutputPackagePath) == 0 { - return fmt.Errorf("output package cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputDir) == 0 { + return fmt.Errorf("--output-dir must be specified") } - if len(customArgs.VersionedClientSetPackage) == 0 { - return fmt.Errorf("versioned clientset package cannot be empty") + if len(args.OutputPkg) == 0 { + return fmt.Errorf("--output-pkg must be specified") } - if len(customArgs.ListersPackage) == 0 { - return fmt.Errorf("listers package cannot be empty") + if len(args.VersionedClientSetPackage) == 0 { + return fmt.Errorf("--versioned-clientset-package must be specified") + } + if len(args.ListersPackage) == 0 { + return fmt.Errorf("--listers-package must be specified") } - return nil } diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go index 4875393913b..ee69aac35d9 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go @@ -21,9 +21,9 @@ import ( "path" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) @@ -31,7 +31,7 @@ import ( // factoryGenerator produces a file of listers for a given GroupVersion and // type. type factoryGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker groupVersions map[string]clientgentypes.GroupVersions diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go index 70826ebaad5..278f8ed915c 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go @@ -19,9 +19,9 @@ package generators import ( "io" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) @@ -29,7 +29,7 @@ import ( // factoryInterfaceGenerator produces a file of interfaces used to break a dependency cycle for // informer registration type factoryInterfaceGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker clientSetPackage string diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go index a5a42953d22..d8e8873aab6 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go @@ -23,14 +23,14 @@ import ( clientgentypes "k8s.io/code-generator/cmd/client-gen/types" codegennamer "k8s.io/code-generator/pkg/namer" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // genericGenerator generates the generic informer. type genericGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker groupVersions map[string]clientgentypes.GroupVersions diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/groupinterface.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/groupinterface.go index 0bba93c4b2e..5342e25d97e 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/groupinterface.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/groupinterface.go @@ -18,18 +18,18 @@ package generators import ( "io" - "path/filepath" + "path" "strings" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // groupInterfaceGenerator generates the per-group interface file. type groupInterfaceGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker groupVersions clientgentypes.GroupVersions @@ -70,7 +70,7 @@ func (g *groupInterfaceGenerator) GenerateType(c *generator.Context, t *types.Ty versions := make([]versionData, 0, len(g.groupVersions.Versions)) for _, version := range g.groupVersions.Versions { gv := clientgentypes.GroupVersion{Group: g.groupVersions.Group, Version: version.Version} - versionPackage := filepath.Join(g.outputPackage, strings.ToLower(gv.Version.NonEmpty())) + versionPackage := path.Join(g.outputPackage, strings.ToLower(gv.Version.NonEmpty())) iface := c.Universe.Type(types.Name{Package: versionPackage, Name: "Interface"}) versions = append(versions, versionData{ Name: namer.IC(version.Version.NonEmpty()), diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go index da00e6e61fe..9d786ea07d6 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go @@ -21,9 +21,9 @@ import ( "io" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" @@ -34,7 +34,7 @@ import ( // informerGenerator produces a file of listers for a given GroupVersion and // type. type informerGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string groupPkgName string groupVersion clientgentypes.GroupVersion diff --git a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go similarity index 56% rename from pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go rename to vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go index dd2c9cceb93..65dc89d0385 100644 --- a/pkg/k8s/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go @@ -22,16 +22,15 @@ import ( "path/filepath" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - "k8s.io/klog/v2" - "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - informergenargs "k8s.io/code-generator/cmd/informer-gen/args" + "k8s.io/code-generator/cmd/informer-gen/args" genutil "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" + "k8s.io/klog/v2" ) // NameSystems returns the name system used by the generators in this package. @@ -85,37 +84,34 @@ func isInternal(m types.Member) bool { return !strings.Contains(m.Tags, "json") } -func packageForInternalInterfaces(base string) string { - return filepath.Join(base, "internalinterfaces") -} +const subdirForInternalInterfaces = "internalinterfaces" -// Packages makes the client package definition. -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +// GetTargets makes the client target definition. +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, "", gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - customArgs, ok := arguments.CustomArgs.(*informergenargs.CustomArgs) - if !ok { - klog.Fatalf("Wrong CustomArgs type: %T", arguments.CustomArgs) + internalVersionOutputDir := args.OutputDir + internalVersionOutputPkg := args.OutputPkg + externalVersionOutputDir := args.OutputDir + externalVersionOutputPkg := args.OutputPkg + if !args.SingleDirectory { + internalVersionOutputDir = filepath.Join(internalVersionOutputDir, "internalversion") + internalVersionOutputPkg = path.Join(internalVersionOutputPkg, "internalversion") + externalVersionOutputDir = filepath.Join(externalVersionOutputDir, "externalversions") + externalVersionOutputPkg = path.Join(externalVersionOutputPkg, "externalversions") } - internalVersionPackagePath := filepath.Join(arguments.OutputPackagePath) - externalVersionPackagePath := filepath.Join(arguments.OutputPackagePath) - if !customArgs.SingleDirectory { - internalVersionPackagePath = filepath.Join(arguments.OutputPackagePath, "internalversion") - externalVersionPackagePath = filepath.Join(arguments.OutputPackagePath, "externalversions") - } - - var packageList generator.Packages + var targetList []generator.Target typesForGroupVersion := make(map[clientgentypes.GroupVersion][]*types.Type) externalGroupVersions := make(map[string]clientgentypes.GroupVersions) internalGroupVersions := make(map[string]clientgentypes.GroupVersions) groupGoNames := make(map[string]string) - for _, inputDir := range arguments.InputDirs { - p := context.Universe.Package(genutil.Vendorless(inputDir)) + for _, inputPkg := range context.Inputs { + p := context.Universe.Package(inputPkg) objectMeta, internal, err := objectMetaForPackage(p) if err != nil { @@ -148,14 +144,14 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // If there's a comment of the form "// +groupName=somegroup" or // "// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as the name of the // group when generating. - if override := types.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { gv.Group = clientgentypes.Group(override[0]) } // If there's a comment of the form "// +groupGoName=SomeUniqueShortName", use that as // the Go group identifier in CamelCase. It defaults groupGoNames[groupPackageName] = namer.IC(strings.Split(gv.Group.NonEmpty(), ".")[0]) - if override := types.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupGoName"]; override != nil { groupGoNames[groupPackageName] = namer.IC(override[0]) } @@ -191,57 +187,80 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat typesToGenerate = orderer.OrderTypes(typesToGenerate) if internal { - packageList = append(packageList, versionPackage(internalVersionPackagePath, groupPackageName, gv, groupGoNames[groupPackageName], boilerplate, typesToGenerate, customArgs.InternalClientSetPackage, customArgs.ListersPackage)) + targetList = append(targetList, + versionTarget( + internalVersionOutputDir, internalVersionOutputPkg, + groupPackageName, gv, groupGoNames[groupPackageName], + boilerplate, typesToGenerate, + args.InternalClientSetPackage, args.ListersPackage)) } else { - packageList = append(packageList, versionPackage(externalVersionPackagePath, groupPackageName, gv, groupGoNames[groupPackageName], boilerplate, typesToGenerate, customArgs.VersionedClientSetPackage, customArgs.ListersPackage)) + targetList = append(targetList, + versionTarget( + externalVersionOutputDir, externalVersionOutputPkg, + groupPackageName, gv, groupGoNames[groupPackageName], + boilerplate, typesToGenerate, + args.VersionedClientSetPackage, args.ListersPackage)) } } if len(externalGroupVersions) != 0 { - packageList = append(packageList, factoryInterfacePackage(externalVersionPackagePath, boilerplate, customArgs.VersionedClientSetPackage)) - packageList = append(packageList, factoryPackage(externalVersionPackagePath, boilerplate, groupGoNames, genutil.PluralExceptionListToMapOrDie(customArgs.PluralExceptions), externalGroupVersions, - customArgs.VersionedClientSetPackage, - typesForGroupVersion)) + targetList = append(targetList, + factoryInterfaceTarget( + externalVersionOutputDir, externalVersionOutputPkg, + boilerplate, args.VersionedClientSetPackage)) + targetList = append(targetList, + factoryTarget( + externalVersionOutputDir, externalVersionOutputPkg, + boilerplate, groupGoNames, genutil.PluralExceptionListToMapOrDie(args.PluralExceptions), + externalGroupVersions, args.VersionedClientSetPackage, typesForGroupVersion)) for _, gvs := range externalGroupVersions { - packageList = append(packageList, groupPackage(externalVersionPackagePath, gvs, boilerplate)) + targetList = append(targetList, + groupTarget(externalVersionOutputDir, externalVersionOutputPkg, gvs, boilerplate)) } } if len(internalGroupVersions) != 0 { - packageList = append(packageList, factoryInterfacePackage(internalVersionPackagePath, boilerplate, customArgs.InternalClientSetPackage)) - packageList = append(packageList, factoryPackage(internalVersionPackagePath, boilerplate, groupGoNames, genutil.PluralExceptionListToMapOrDie(customArgs.PluralExceptions), internalGroupVersions, customArgs.InternalClientSetPackage, typesForGroupVersion)) + targetList = append(targetList, + factoryInterfaceTarget(internalVersionOutputDir, internalVersionOutputPkg, boilerplate, args.InternalClientSetPackage)) + targetList = append(targetList, + factoryTarget( + internalVersionOutputDir, internalVersionOutputPkg, + boilerplate, groupGoNames, genutil.PluralExceptionListToMapOrDie(args.PluralExceptions), + internalGroupVersions, args.InternalClientSetPackage, typesForGroupVersion)) for _, gvs := range internalGroupVersions { - packageList = append(packageList, groupPackage(internalVersionPackagePath, gvs, boilerplate)) + targetList = append(targetList, + groupTarget(internalVersionOutputDir, internalVersionOutputPkg, gvs, boilerplate)) } } - return packageList + return targetList } -func factoryPackage(basePackage string, boilerplate []byte, groupGoNames, pluralExceptions map[string]string, groupVersions map[string]clientgentypes.GroupVersions, clientSetPackage string, - typesForGroupVersion map[clientgentypes.GroupVersion][]*types.Type) generator.Package { - return &generator.DefaultPackage{ - PackageName: filepath.Base(basePackage), - PackagePath: basePackage, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { +func factoryTarget(outputDirBase, outputPkgBase string, boilerplate []byte, groupGoNames, pluralExceptions map[string]string, groupVersions map[string]clientgentypes.GroupVersions, clientSetPackage string, + typesForGroupVersion map[clientgentypes.GroupVersion][]*types.Type) generator.Target { + return &generator.SimpleTarget{ + PkgName: path.Base(outputDirBase), + PkgPath: outputPkgBase, + PkgDir: outputDirBase, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &factoryGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "factory", + GoGenerator: generator.GoGenerator{ + OutputFilename: "factory.go", }, - outputPackage: basePackage, + outputPackage: outputPkgBase, imports: generator.NewImportTracker(), groupVersions: groupVersions, clientSetPackage: clientSetPackage, - internalInterfacesPackage: packageForInternalInterfaces(basePackage), + internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), gvGoNames: groupGoNames, }) generators = append(generators, &genericGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "generic", + GoGenerator: generator.GoGenerator{ + OutputFilename: "generic.go", }, - outputPackage: basePackage, + outputPackage: outputPkgBase, imports: generator.NewImportTracker(), groupVersions: groupVersions, pluralExceptions: pluralExceptions, @@ -254,19 +273,21 @@ func factoryPackage(basePackage string, boilerplate []byte, groupGoNames, plural } } -func factoryInterfacePackage(basePackage string, boilerplate []byte, clientSetPackage string) generator.Package { - packagePath := packageForInternalInterfaces(basePackage) +func factoryInterfaceTarget(outputDirBase, outputPkgBase string, boilerplate []byte, clientSetPackage string) generator.Target { + outputDir := filepath.Join(outputDirBase, subdirForInternalInterfaces) + outputPkg := path.Join(outputPkgBase, subdirForInternalInterfaces) - return &generator.DefaultPackage{ - PackageName: filepath.Base(packagePath), - PackagePath: packagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + return &generator.SimpleTarget{ + PkgName: path.Base(outputDir), + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &factoryInterfaceGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "factory_interfaces", + GoGenerator: generator.GoGenerator{ + OutputFilename: "factory_interfaces.go", }, - outputPackage: packagePath, + outputPackage: outputPkg, imports: generator.NewImportTracker(), clientSetPackage: clientSetPackage, }) @@ -276,23 +297,25 @@ func factoryInterfacePackage(basePackage string, boilerplate []byte, clientSetPa } } -func groupPackage(basePackage string, groupVersions clientgentypes.GroupVersions, boilerplate []byte) generator.Package { - packagePath := filepath.Join(basePackage, groupVersions.PackageName) +func groupTarget(outputDirBase, outputPackageBase string, groupVersions clientgentypes.GroupVersions, boilerplate []byte) generator.Target { + outputDir := filepath.Join(outputDirBase, groupVersions.PackageName) + outputPkg := path.Join(outputPackageBase, groupVersions.PackageName) groupPkgName := strings.Split(string(groupVersions.PackageName), ".")[0] - return &generator.DefaultPackage{ - PackageName: groupPkgName, - PackagePath: packagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + return &generator.SimpleTarget{ + PkgName: groupPkgName, + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &groupInterfaceGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "interface", + GoGenerator: generator.GoGenerator{ + OutputFilename: "interface.go", }, - outputPackage: packagePath, + outputPackage: outputPkg, groupVersions: groupVersions, imports: generator.NewImportTracker(), - internalInterfacesPackage: packageForInternalInterfaces(basePackage), + internalInterfacesPackage: path.Join(outputPackageBase, subdirForInternalInterfaces), }) return generators }, @@ -303,30 +326,33 @@ func groupPackage(basePackage string, groupVersions clientgentypes.GroupVersions } } -func versionPackage(basePackage string, groupPkgName string, gv clientgentypes.GroupVersion, groupGoName string, boilerplate []byte, typesToGenerate []*types.Type, clientSetPackage, listersPackage string) generator.Package { - packagePath := filepath.Join(basePackage, groupPkgName, strings.ToLower(gv.Version.NonEmpty())) - - return &generator.DefaultPackage{ - PackageName: strings.ToLower(gv.Version.NonEmpty()), - PackagePath: packagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { +func versionTarget(outputDirBase, outputPkgBase string, groupPkgName string, gv clientgentypes.GroupVersion, groupGoName string, boilerplate []byte, typesToGenerate []*types.Type, clientSetPackage, listersPackage string) generator.Target { + subdir := []string{groupPkgName, strings.ToLower(gv.Version.NonEmpty())} + outputDir := filepath.Join(outputDirBase, filepath.Join(subdir...)) + outputPkg := path.Join(outputPkgBase, path.Join(subdir...)) + + return &generator.SimpleTarget{ + PkgName: strings.ToLower(gv.Version.NonEmpty()), + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &versionInterfaceGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "interface", + GoGenerator: generator.GoGenerator{ + OutputFilename: "interface.go", }, - outputPackage: packagePath, + outputPackage: outputPkg, imports: generator.NewImportTracker(), types: typesToGenerate, - internalInterfacesPackage: packageForInternalInterfaces(basePackage), + internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), }) for _, t := range typesToGenerate { generators = append(generators, &informerGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: strings.ToLower(t.Name.Name), + GoGenerator: generator.GoGenerator{ + OutputFilename: strings.ToLower(t.Name.Name) + ".go", }, - outputPackage: packagePath, + outputPackage: outputPkg, groupPkgName: groupPkgName, groupVersion: gv, groupGoName: groupGoName, @@ -334,7 +360,7 @@ func versionPackage(basePackage string, groupPkgName string, gv clientgentypes.G imports: generator.NewImportTracker(), clientSetPackage: clientSetPackage, listersPackage: listersPackage, - internalInterfacesPackage: packageForInternalInterfaces(basePackage), + internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), }) } return generators diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go index fc1f7786f66..4ca511ea4ed 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go @@ -16,7 +16,7 @@ limitations under the License. package generators -import "k8s.io/gengo/types" +import "k8s.io/gengo/v2/types" var ( apiScheme = types.Name{Package: "k8s.io/kubernetes/pkg/api/legacyscheme", Name: "Scheme"} diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go index 3b51f8dc826..5f9a0c218d6 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/versioninterface.go @@ -19,16 +19,16 @@ package generators import ( "io" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/code-generator/cmd/client-gen/generators/util" ) // versionInterfaceGenerator generates the per-version interface file. type versionInterfaceGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string imports namer.ImportTracker types []*types.Type diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/main.go b/vendor/k8s.io/code-generator/cmd/informer-gen/main.go index 1247c35b37a..b0fc48517bf 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/main.go @@ -20,39 +20,38 @@ import ( "flag" "github.com/spf13/pflag" + "k8s.io/code-generator/cmd/informer-gen/args" "k8s.io/code-generator/cmd/informer-gen/generators" "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/informer-gen/args" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() - - // Override defaults. - // TODO: move out of informer-gen - genericArgs.OutputPackagePath = "k8s.io/kubernetes/pkg/client/informers/informers_generated" - customArgs.VersionedClientSetPackage = "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - customArgs.InternalClientSetPackage = "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - customArgs.ListersPackage = "k8s.io/kubernetes/pkg/client/listers" + args := args.New() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( - generators.NameSystems(util.PluralExceptionListToMapOrDie(customArgs.PluralExceptions)), + if err := gengo.Execute( + generators.NameSystems(util.PluralExceptionListToMapOrDie(args.PluralExceptions)), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go index 170334505ab..e6b9e00ab92 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/args/args.go @@ -18,47 +18,45 @@ package args import ( "fmt" - "path" "github.com/spf13/pflag" - codegenutil "k8s.io/code-generator/pkg/util" - "k8s.io/gengo/args" ) -// CustomArgs is used by the gengo framework to pass args specific to this generator. -type CustomArgs struct { +// Args is used by the gengo framework to pass args specific to this generator. +type Args struct { + OutputDir string // must be a directory path + OutputPkg string // must be a Go import-path + GoHeaderFile string + // PluralExceptions specify list of exceptions used when pluralizing certain types. // For example 'Endpoints:Endpoints', otherwise the pluralizer will generate 'Endpointes'. PluralExceptions []string } -// NewDefaults returns default arguments for the generator. -func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { - genericArgs := args.Default().WithoutDefaultFlagParsing() - customArgs := &CustomArgs{ - PluralExceptions: []string{"Endpoints:Endpoints"}, - } - genericArgs.CustomArgs = customArgs - - if pkg := codegenutil.CurrentPackage(); len(pkg) != 0 { - genericArgs.OutputPackagePath = path.Join(pkg, "pkg/client/listers") - } - - return genericArgs, customArgs +// New returns default arguments for the generator. +func New() *Args { + return &Args{} } // AddFlags add the generator flags to the flag set. -func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { - fs.StringSliceVar(&ca.PluralExceptions, "plural-exceptions", ca.PluralExceptions, "list of comma separated plural exception definitions in Type:PluralizedType format") +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputDir, "output-dir", "", + "the base directory under which to generate results") + fs.StringVar(&args.OutputPkg, "output-pkg", "", + "the base Go import-path under which to generate results") + fs.StringSliceVar(&args.PluralExceptions, "plural-exceptions", args.PluralExceptions, + "list of comma separated plural exception definitions in Type:PluralizedType format") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - _ = genericArgs.CustomArgs.(*CustomArgs) - - if len(genericArgs.OutputPackagePath) == 0 { - return fmt.Errorf("output package cannot be empty") +func (args *Args) Validate() error { + if len(args.OutputDir) == 0 { + return fmt.Errorf("--output-dir must be specified") + } + if len(args.OutputPkg) == 0 { + return fmt.Errorf("--output-pkg must be specified") } - return nil } diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/expansion.go b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/expansion.go index dd45d7749c7..4755f2ed1e6 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/expansion.go +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/expansion.go @@ -22,17 +22,18 @@ import ( "path/filepath" "strings" - "k8s.io/gengo/generator" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/types" + "k8s.io/klog/v2" "k8s.io/code-generator/cmd/client-gen/generators/util" ) // expansionGenerator produces a file for a expansion interfaces. type expansionGenerator struct { - generator.DefaultGen - packagePath string - types []*types.Type + generator.GoGenerator + outputPath string + types []*types.Type } // We only want to call GenerateType() once per group. @@ -44,11 +45,16 @@ func (g *expansionGenerator) GenerateType(c *generator.Context, t *types.Type, w sw := generator.NewSnippetWriter(w, c, "$", "$") for _, t := range g.types { tags := util.MustParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) - if _, err := os.Stat(filepath.Join(g.packagePath, strings.ToLower(t.Name.Name+"_expansion.go"))); os.IsNotExist(err) { + manualFile := filepath.Join(g.outputPath, strings.ToLower(t.Name.Name+"_expansion.go")) + if _, err := os.Stat(manualFile); err == nil { + klog.V(4).Infof("file %q exists, not generating", manualFile) + } else if os.IsNotExist(err) { sw.Do(expansionInterfaceTemplate, t) if !tags.NonNamespaced { sw.Do(namespacedExpansionInterfaceTemplate, t) } + } else { + return err } } return sw.Error() diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go index 8ada4946903..ce1f9eac713 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go @@ -19,17 +19,17 @@ package generators import ( "fmt" "io" + "path" "path/filepath" "strings" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - + "k8s.io/code-generator/cmd/lister-gen/args" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) @@ -59,16 +59,16 @@ func DefaultNameSystem() string { return "public" } -// Packages makes the client package definition. -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +// GetTargets makes the client target definition. +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, "", gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - var packageList generator.Packages - for _, inputDir := range arguments.InputDirs { - p := context.Universe.Package(inputDir) + var targetList []generator.Target + for _, inputPkg := range context.Inputs { + p := context.Universe.Package(inputPkg) objectMeta, internal, err := objectMetaForPackage(p) if err != nil { @@ -101,7 +101,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // If there's a comment of the form "// +groupName=somegroup" or // "// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as the name of the // group when generating. - if override := types.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { + if override := gengo.ExtractCommentTags("+", p.Comments)["groupName"]; override != nil { gv.Group = clientgentypes.Group(strings.SplitN(override[0], ".", 2)[0]) } @@ -119,26 +119,33 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat orderer := namer.Orderer{Namer: namer.NewPrivateNamer(0)} typesToGenerate = orderer.OrderTypes(typesToGenerate) - packagePath := filepath.Join(arguments.OutputPackagePath, groupPackageName, strings.ToLower(gv.Version.NonEmpty())) - packageList = append(packageList, &generator.DefaultPackage{ - PackageName: strings.ToLower(gv.Version.NonEmpty()), - PackagePath: packagePath, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + subdir := []string{groupPackageName, strings.ToLower(gv.Version.NonEmpty())} + outputDir := filepath.Join(args.OutputDir, filepath.Join(subdir...)) + outputPkg := path.Join(args.OutputPkg, path.Join(subdir...)) + targetList = append(targetList, &generator.SimpleTarget{ + PkgName: strings.ToLower(gv.Version.NonEmpty()), + PkgPath: outputPkg, + PkgDir: outputDir, + HeaderComment: boilerplate, + FilterFunc: func(c *generator.Context, t *types.Type) bool { + tags := util.MustParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) + return tags.GenerateClient && tags.HasVerb("list") && tags.HasVerb("get") + }, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { generators = append(generators, &expansionGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: "expansion_generated", + GoGenerator: generator.GoGenerator{ + OutputFilename: "expansion_generated.go", }, - packagePath: filepath.Join(arguments.OutputBase, packagePath), - types: typesToGenerate, + outputPath: outputDir, + types: typesToGenerate, }) for _, t := range typesToGenerate { generators = append(generators, &listerGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: strings.ToLower(t.Name.Name), + GoGenerator: generator.GoGenerator{ + OutputFilename: strings.ToLower(t.Name.Name) + ".go", }, - outputPackage: arguments.OutputPackagePath, + outputPackage: outputPkg, groupVersion: gv, internalGVPkg: internalGVPkg, typeToGenerate: t, @@ -148,14 +155,10 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat } return generators }, - FilterFunc: func(c *generator.Context, t *types.Type) bool { - tags := util.MustParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) - return tags.GenerateClient && tags.HasVerb("list") && tags.HasVerb("get") - }, }) } - return packageList + return targetList } // objectMetaForPackage returns the type of ObjectMeta used by package p. @@ -187,7 +190,7 @@ func isInternal(m types.Member) bool { // listerGenerator produces a file of listers for a given GroupVersion and // type. type listerGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string groupVersion clientgentypes.GroupVersion internalGVPkg string @@ -233,25 +236,25 @@ func (g *listerGenerator) GenerateType(c *generator.Context, t *types.Type, w io } if tags.NonNamespaced { - sw.Do(typeListerInterface_NonNamespaced, m) + sw.Do(typeListerInterfaceNonNamespaced, m) } else { sw.Do(typeListerInterface, m) } sw.Do(typeListerStruct, m) sw.Do(typeListerConstructor, m) - sw.Do(typeLister_List, m) + sw.Do(typeListerList, m) if tags.NonNamespaced { - sw.Do(typeLister_NonNamespacedGet, m) + sw.Do(typeListerNonNamespacedGet, m) return sw.Error() } - sw.Do(typeLister_NamespaceLister, m) + sw.Do(typeListerNamespaceLister, m) sw.Do(namespaceListerInterface, m) sw.Do(namespaceListerStruct, m) - sw.Do(namespaceLister_List, m) - sw.Do(namespaceLister_Get, m) + sw.Do(namespaceListerList, m) + sw.Do(namespaceListerGet, m) return sw.Error() } @@ -269,7 +272,7 @@ type $.type|public$Lister interface { } ` -var typeListerInterface_NonNamespaced = ` +var typeListerInterfaceNonNamespaced = ` // $.type|public$Lister helps list $.type|publicPlural$. // All objects returned here must be treated as read-only. type $.type|public$Lister interface { @@ -297,7 +300,7 @@ func New$.type|public$Lister(indexer cache.Indexer) $.type|public$Lister { } ` -var typeLister_List = ` +var typeListerList = ` // List lists all $.type|publicPlural$ in the indexer. func (s *$.type|private$Lister) List(selector labels.Selector) (ret []*$.type|raw$, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { @@ -307,14 +310,14 @@ func (s *$.type|private$Lister) List(selector labels.Selector) (ret []*$.type|ra } ` -var typeLister_NamespaceLister = ` +var typeListerNamespaceLister = ` // $.type|publicPlural$ returns an object that can list and get $.type|publicPlural$. func (s *$.type|private$Lister) $.type|publicPlural$(namespace string) $.type|public$NamespaceLister { return $.type|private$NamespaceLister{indexer: s.indexer, namespace: namespace} } ` -var typeLister_NonNamespacedGet = ` +var typeListerNonNamespacedGet = ` // Get retrieves the $.type|public$ from the index for a given name. func (s *$.type|private$Lister) Get(name string) (*$.type|raw$, error) { obj, exists, err := s.indexer.GetByKey(name) @@ -351,7 +354,7 @@ type $.type|private$NamespaceLister struct { } ` -var namespaceLister_List = ` +var namespaceListerList = ` // List lists all $.type|publicPlural$ in the indexer for a given namespace. func (s $.type|private$NamespaceLister) List(selector labels.Selector) (ret []*$.type|raw$, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { @@ -361,7 +364,7 @@ func (s $.type|private$NamespaceLister) List(selector labels.Selector) (ret []*$ } ` -var namespaceLister_Get = ` +var namespaceListerGet = ` // Get retrieves the $.type|public$ from the indexer for a given namespace and name. func (s $.type|private$NamespaceLister) Get(name string) (*$.type|raw$, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/main.go b/vendor/k8s.io/code-generator/cmd/lister-gen/main.go index a7d7b610878..8dde18bab98 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/main.go @@ -20,36 +20,38 @@ import ( "flag" "github.com/spf13/pflag" + "k8s.io/code-generator/cmd/lister-gen/args" "k8s.io/code-generator/cmd/lister-gen/generators" "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/lister-gen/args" ) func main() { klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() - - // Override defaults. - // TODO: move this out of lister-gen - genericArgs.OutputPackagePath = "k8s.io/kubernetes/pkg/client/listers" + args := args.New() - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + // Run it. - if err := genericArgs.Execute( - generators.NameSystems(util.PluralExceptionListToMapOrDie(customArgs.PluralExceptions)), + if err := gengo.Execute( + generators.NameSystems(util.PluralExceptionListToMapOrDie(args.PluralExceptions)), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/vendor/k8s.io/code-generator/cmd/openapi-gen/main.go b/vendor/k8s.io/code-generator/cmd/openapi-gen/main.go deleted file mode 100644 index c446e80b8a0..00000000000 --- a/vendor/k8s.io/code-generator/cmd/openapi-gen/main.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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 generates openAPI definition file to be used in open API spec generation on API servers. To generate -// definition for a specific type or package add "+k8s:openapi-gen=true" tag to the type/package comment lines. To -// exclude a type from a tagged package, add "+k8s:openapi-gen=false" tag to the type comment lines. - -package main - -import ( - "flag" - "log" - - generatorargs "k8s.io/kube-openapi/cmd/openapi-gen/args" - "k8s.io/kube-openapi/pkg/generators" - - "github.com/spf13/pflag" - - "k8s.io/klog/v2" -) - -func main() { - klog.InitFlags(nil) - genericArgs, customArgs := generatorargs.NewDefaults() - - genericArgs.AddFlags(pflag.CommandLine) - customArgs.AddFlags(pflag.CommandLine) - flag.Set("logtostderr", "true") - pflag.CommandLine.AddGoFlagSet(flag.CommandLine) - pflag.Parse() - - if err := generatorargs.Validate(genericArgs); err != nil { - log.Fatalf("Arguments validation error: %v", err) - } - - // Generates the code for the OpenAPIDefinitions. - if err := genericArgs.Execute( - generators.NameSystems(), - generators.DefaultNameSystem(), - generators.Packages, - ); err != nil { - log.Fatalf("OpenAPI code generation error: %v", err) - } -} diff --git a/vendor/k8s.io/code-generator/cmd/register-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/register-gen/args/args.go index 2e3ab084e20..cc1fdafc83d 100644 --- a/vendor/k8s.io/code-generator/cmd/register-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/register-gen/args/args.go @@ -19,19 +19,30 @@ package args import ( "fmt" - "k8s.io/gengo/args" + "github.com/spf13/pflag" ) -// NewDefaults returns default arguments for the generator. -func NewDefaults() *args.GeneratorArgs { - genericArgs := args.Default().WithoutDefaultFlagParsing() - genericArgs.OutputFileBaseName = "zz_generated.register" - return genericArgs +type Args struct { + OutputFile string + GoHeaderFile string +} + +// New returns default arguments for the generator. +func New() *Args { + return &Args{} +} + +// AddFlags add the generator flags to the flag set. +func (args *Args) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&args.OutputFile, "output-file", "generated.register.go", + "the name of the file to be generated") + fs.StringVar(&args.GoHeaderFile, "go-header-file", "", + "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") } // Validate checks the given arguments. -func Validate(genericArgs *args.GeneratorArgs) error { - if len(genericArgs.OutputFileBaseName) == 0 { +func (args *Args) Validate() error { + if len(args.OutputFile) == 0 { return fmt.Errorf("output file base name cannot be empty") } diff --git a/vendor/k8s.io/code-generator/cmd/register-gen/generators/register_external.go b/vendor/k8s.io/code-generator/cmd/register-gen/generators/register_external.go index c831c575d6d..7eb7793e408 100644 --- a/vendor/k8s.io/code-generator/cmd/register-gen/generators/register_external.go +++ b/vendor/k8s.io/code-generator/cmd/register-gen/generators/register_external.go @@ -21,13 +21,13 @@ import ( "sort" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) type registerExternalGenerator struct { - generator.DefaultGen + generator.GoGenerator outputPackage string gv clientgentypes.GroupVersion typesToGenerate []*types.Type @@ -91,7 +91,7 @@ var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder localSchemeBuilder = &SchemeBuilder - // Depreciated: use Install instead + // Deprecated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme ) diff --git a/vendor/k8s.io/code-generator/cmd/register-gen/generators/packages.go b/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go similarity index 74% rename from vendor/k8s.io/code-generator/cmd/register-gen/generators/packages.go rename to vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go index fa8e3f1c356..d2998261c8d 100644 --- a/vendor/k8s.io/code-generator/cmd/register-gen/generators/packages.go +++ b/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go @@ -25,10 +25,11 @@ import ( "k8s.io/klog/v2" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/code-generator/cmd/register-gen/args" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // NameSystems returns the name system used by the generators in this package. @@ -42,29 +43,29 @@ func DefaultNameSystem() string { return "public" } -// Packages makes packages to generate. -func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() +// GetTargets makes targets to generate. +func GetTargets(context *generator.Context, args *args.Args) []generator.Target { + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } - packages := generator.Packages{} - for _, inputDir := range arguments.InputDirs { - pkg := context.Universe.Package(inputDir) + targets := []generator.Target{} + for _, input := range context.Inputs { + pkg := context.Universe.Package(input) internal, err := isInternal(pkg) if err != nil { - klog.V(5).Infof("skipping the generation of %s file, due to err %v", arguments.OutputFileBaseName, err) + klog.V(5).Infof("skipping the generation of %s file, due to err %v", args.OutputFile, err) continue } if internal { - klog.V(5).Infof("skipping the generation of %s file because %s package contains internal types, note that internal types don't have \"json\" tags", arguments.OutputFileBaseName, pkg.Name) + klog.V(5).Infof("skipping the generation of %s file because %s package contains internal types, note that internal types don't have \"json\" tags", args.OutputFile, pkg.Name) continue } registerFileName := "register.go" - searchPath := path.Join(args.DefaultSourceTree(), inputDir, registerFileName) + searchPath := path.Join(pkg.Dir, registerFileName) if _, err := os.Stat(path.Join(searchPath)); err == nil { - klog.V(5).Infof("skipping the generation of %s file because %s already exists in the path %s", arguments.OutputFileBaseName, registerFileName, searchPath) + klog.V(5).Infof("skipping the generation of %s file because %s already exists in the path %s", args.OutputFile, registerFileName, searchPath) continue } else if err != nil && !os.IsNotExist(err) { klog.Fatalf("an error %v has occurred while checking if %s exists", err, registerFileName) @@ -82,7 +83,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat // if there is a comment of the form "// +groupName=somegroup" or "// +groupName=somegroup.foo.bar.io", // extract the fully qualified API group name from it and overwrite the group inferred from the package path - if override := types.ExtractCommentTags("+", pkg.Comments)["groupName"]; override != nil { + if override := gengo.ExtractCommentTags("+", pkg.Comments)["groupName"]; override != nil { groupName := override[0] klog.V(5).Infof("overriding the group name with = %s", groupName) gv.Group = clientgentypes.Group(groupName) @@ -99,16 +100,17 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat } } - packages = append(packages, - &generator.DefaultPackage{ - PackageName: pkg.Name, - PackagePath: pkg.Path, - HeaderText: boilerplate, - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + targets = append(targets, + &generator.SimpleTarget{ + PkgName: pkg.Name, + PkgPath: pkg.Path, // output to same pkg as input + PkgDir: pkg.Dir, // output to same pkg as input + HeaderComment: boilerplate, + GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { return []generator.Generator{ ®isterExternalGenerator{ - DefaultGen: generator.DefaultGen{ - OptionalName: arguments.OutputFileBaseName, + GoGenerator: generator.GoGenerator{ + OutputFilename: args.OutputFile, }, gv: gv, typesToGenerate: typesToRegister, @@ -120,7 +122,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat }) } - return packages + return targets } // isInternal determines whether the given package diff --git a/vendor/k8s.io/code-generator/cmd/register-gen/main.go b/vendor/k8s.io/code-generator/cmd/register-gen/main.go index dc29144481b..ac28f87fb72 100644 --- a/vendor/k8s.io/code-generator/cmd/register-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/register-gen/main.go @@ -20,28 +20,35 @@ import ( "flag" "github.com/spf13/pflag" - "k8s.io/klog/v2" - - generatorargs "k8s.io/code-generator/cmd/register-gen/args" + "k8s.io/code-generator/cmd/register-gen/args" "k8s.io/code-generator/cmd/register-gen/generators" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/generator" + "k8s.io/klog/v2" ) func main() { klog.InitFlags(nil) - genericArgs := generatorargs.NewDefaults() - genericArgs.AddFlags(pflag.CommandLine) + args := args.New() + args.AddFlags(pflag.CommandLine) flag.Set("logtostderr", "true") pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Parse() - if err := generatorargs.Validate(genericArgs); err != nil { + if err := args.Validate(); err != nil { klog.Fatalf("Error: %v", err) } - if err := genericArgs.Execute( + myTargets := func(context *generator.Context) []generator.Target { + return generators.GetTargets(context, args) + } + + if err := gengo.Execute( generators.NameSystems(), generators.DefaultNameSystem(), - generators.Packages, + myTargets, + gengo.StdBuildTag, + pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) } diff --git a/vendor/k8s.io/code-generator/cmd/set-gen/.gitignore b/vendor/k8s.io/code-generator/cmd/set-gen/.gitignore deleted file mode 100644 index ffe6458c963..00000000000 --- a/vendor/k8s.io/code-generator/cmd/set-gen/.gitignore +++ /dev/null @@ -1 +0,0 @@ -set-gen diff --git a/vendor/k8s.io/code-generator/cmd/set-gen/main.go b/vendor/k8s.io/code-generator/cmd/set-gen/main.go deleted file mode 100644 index 0968ce762b9..00000000000 --- a/vendor/k8s.io/code-generator/cmd/set-gen/main.go +++ /dev/null @@ -1,53 +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. -*/ - -// set-gen is an example usage of gengo. -// -// Structs in the input directories with the below line in their comments will -// have sets generated for them. -// // +genset -// -// Any builtin type referenced anywhere in the input directories will have a -// set generated for it. -package main - -import ( - "os" - - "k8s.io/gengo/args" - "k8s.io/gengo/examples/set-gen/generators" - - "k8s.io/klog/v2" -) - -func main() { - klog.InitFlags(nil) - arguments := args.Default() - - // Override defaults. - arguments.InputDirs = []string{"k8s.io/kubernetes/pkg/util/sets/types"} - arguments.OutputPackagePath = "k8s.io/apimachinery/pkg/util/sets" - - if err := arguments.Execute( - generators.NameSystems(), - generators.DefaultNameSystem(), - generators.Packages, - ); err != nil { - klog.Errorf("Error: %v", err) - os.Exit(1) - } - klog.V(2).Info("Completed successfully.") -} diff --git a/vendor/k8s.io/code-generator/generate-groups.sh b/vendor/k8s.io/code-generator/generate-groups.sh index a21d2184f0b..65b0abda5a6 100644 --- a/vendor/k8s.io/code-generator/generate-groups.sh +++ b/vendor/k8s.io/code-generator/generate-groups.sh @@ -14,53 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -o errexit -set -o nounset -set -o pipefail - -# generate-groups generates everything for a project with external types only, e.g. a project based -# on CustomResourceDefinitions. - -if [ "$#" -lt 4 ] || [ "${1}" == "--help" ]; then - cat < ... - - the generators comma separated to run (deepcopy,defaulter,applyconfiguration,client,lister,informer). - the output package name (e.g. github.com/example/project/pkg/generated). - the external types dir (e.g. github.com/example/api or github.com/example/project/pkg/apis). - the groups and their versions in the format "groupA:v1,v2 groupB:v1 groupC:v2", relative - to . - ... arbitrary flags passed to all generator binaries. - - -Example: - $(basename "$0") \ - deepcopy,client \ - github.com/example/project/pkg/client \ - github.com/example/project/pkg/apis \ - "foo:v1 bar:v1alpha1,v1beta1" -EOF - exit 0 -fi - -GENS="$1" -OUTPUT_PKG="$2" -APIS_PKG="$3" -GROUPS_WITH_VERSIONS="$4" -shift 4 - -echo "WARNING: $(basename "$0") is deprecated." -echo "WARNING: Please use k8s.io/code-generator/kube_codegen.sh instead." +echo "ERROR: $(basename "$0") has been removed." +echo "ERROR: Please use k8s.io/code-generator/kube_codegen.sh instead." echo - -if [ "${GENS}" = "all" ] || grep -qw "all" <<<"${GENS}"; then - ALL="applyconfiguration,client,deepcopy,informer,lister" - echo "WARNING: Specifying \"all\" as a generator is deprecated." - echo "WARNING: Please list the specific generators needed." - echo "WARNING: \"all\" is now an alias for \"${ALL}\"; new code generators WILL NOT be added to this set" - echo - GENS="${ALL}" -fi - -INT_APIS_PKG="" -exec "$(dirname "${BASH_SOURCE[0]}")/generate-internal-groups.sh" "${GENS}" "${OUTPUT_PKG}" "${INT_APIS_PKG}" "${APIS_PKG}" "${GROUPS_WITH_VERSIONS}" "$@" +exit 1 diff --git a/vendor/k8s.io/code-generator/generate-internal-groups.sh b/vendor/k8s.io/code-generator/generate-internal-groups.sh index 415b0b67c64..65b0abda5a6 100644 --- a/vendor/k8s.io/code-generator/generate-internal-groups.sh +++ b/vendor/k8s.io/code-generator/generate-internal-groups.sh @@ -14,281 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -o errexit -set -o nounset -set -o pipefail - -# generate-internal-groups generates everything for a project with internal types, e.g. an -# user-provided API server based on k8s.io/apiserver. - -if [ "$#" -lt 5 ] || [ "${1}" == "--help" ]; then - cat < ... - - the generators comma separated to run (applyconfiguration,client,conversion,deepcopy,defaulter,informer,lister,openapi). - the output package name (e.g. github.com/example/project/pkg/generated). - the internal types dir (e.g. github.com/example/project/pkg/apis) or "" if none. - the external types dir (e.g. github.com/example/project/pkg/apis or githubcom/example/apis). - the groups and their versions in the format "groupA:v1,v2 groupB:v1 groupC:v2", relative - to . - ... arbitrary flags passed to all generator binaries. - -Example: - $(basename "$0") \ - deepcopy,defaulter,conversion \ - github.com/example/project/pkg/client \ - github.com/example/project/pkg/apis \ - github.com/example/project/apis \ - "foo:v1 bar:v1alpha1,v1beta1" -EOF - exit 0 -fi - -GENS="$1" -OUTPUT_PKG="$2" -INT_APIS_PKG="$3" -EXT_APIS_PKG="$4" -GROUPS_WITH_VERSIONS="$5" -shift 5 - -echo "WARNING: $(basename "$0") is deprecated." -echo "WARNING: Please use k8s.io/code-generator/kube_codegen.sh instead." +echo "ERROR: $(basename "$0") has been removed." +echo "ERROR: Please use k8s.io/code-generator/kube_codegen.sh instead." echo - -# If verification only is requested, avoid deleting files -verify_only="" -for ((i = 1; i <= $#; i++)); do - if [ "${!i}" = --verify-only ]; then verify_only=1; fi -done - -if [ "${GENS}" = "all" ] || grep -qw "all" <<<"${GENS}"; then - ALL="client,conversion,deepcopy,defaulter,informer,lister,openapi" - echo "WARNING: Specifying \"all\" as a generator is deprecated." - echo "WARNING: Please list the specific generators needed." - echo "WARNING: \"all\" is now an alias for \"${ALL}\"; new code generators WILL NOT be added to this set" - echo - GENS="${ALL}" -fi - -( - # To support running this script from anywhere, first cd into this directory, - # and then install with forced module mode on and fully qualified name. - cd "$(dirname "${0}")" - BINS=( - applyconfiguration-gen - client-gen - conversion-gen - deepcopy-gen - defaulter-gen - informer-gen - lister-gen - openapi-gen - ) - # Compile all the tools at once - it's slightly faster but also just simpler. - # shellcheck disable=2046 # printf word-splitting is intentional - GO111MODULE=on go install $(printf "k8s.io/code-generator/cmd/%s " "${BINS[@]}") -) - -# Go installs the above commands to get installed in $GOBIN if defined, and $GOPATH/bin otherwise: -GOBIN="$(go env GOBIN)" -gobin="${GOBIN:-$(go env GOPATH)/bin}" - -function git_find() { - # Similar to find but faster and easier to understand. We want to include - # modified and untracked files because this might be running against code - # which is not tracked by git yet. - git ls-files -cmo --exclude-standard "$@" -} - -function git_grep() { - # We want to include modified and untracked files because this might be - # running against code which is not tracked by git yet. - git grep --untracked "$@" -} -function codegen::join() { local IFS="$1"; shift; echo "$*"; } - -# enumerate group versions -ALL_FQ_APIS=() # e.g. k8s.io/kubernetes/pkg/apis/apps k8s.io/api/apps/v1 -EXT_FQ_APIS=() # e.g. k8s.io/api/apps/v1 -GROUP_VERSIONS=() # e.g. apps/v1 -for GVs in ${GROUPS_WITH_VERSIONS}; do - IFS=: read -r G Vs <<<"${GVs}" - - if [ -n "${INT_APIS_PKG}" ]; then - ALL_FQ_APIS+=("${INT_APIS_PKG}/${G}") - fi - - # enumerate versions - for V in ${Vs//,/ }; do - ALL_FQ_APIS+=("${EXT_APIS_PKG}/${G}/${V}") - EXT_FQ_APIS+=("${EXT_APIS_PKG}/${G}/${V}") - GROUP_VERSIONS+=("${G}/${V}") - done -done - -CLIENTSET_PKG="${CLIENTSET_PKG_NAME:-clientset}" -CLIENTSET_NAME="${CLIENTSET_NAME_VERSIONED:-versioned}" - -if grep -qw "deepcopy" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - for dir in $(GO111MODULE=on go list -f '{{.Dir}}' "${ALL_FQ_APIS[@]}"); do - pushd "${dir}" >/dev/null - git_find -z ':(glob)**'/zz_generated.deepcopy.go | xargs -0 rm -f - popd >/dev/null - done - fi - - echo "Generating deepcopy funcs" - "${gobin}/deepcopy-gen" \ - --input-dirs "$(codegen::join , "${ALL_FQ_APIS[@]}")" \ - -O zz_generated.deepcopy \ - "$@" -fi - -if grep -qw "defaulter" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - for dir in $(GO111MODULE=on go list -f '{{.Dir}}' "${ALL_FQ_APIS[@]}"); do - pushd "${dir}" >/dev/null - git_find -z ':(glob)**'/zz_generated.defaults.go | xargs -0 rm -f - popd >/dev/null - done - fi - - echo "Generating defaulters" - "${gobin}/defaulter-gen" \ - --input-dirs "$(codegen::join , "${EXT_FQ_APIS[@]}")" \ - -O zz_generated.defaults \ - "$@" -fi - -if grep -qw "conversion" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - for dir in $(GO111MODULE=on go list -f '{{.Dir}}' "${ALL_FQ_APIS[@]}"); do - pushd "${dir}" >/dev/null - git_find -z ':(glob)**'/zz_generated.conversion.go | xargs -0 rm -f - popd >/dev/null - done - fi - - echo "Generating conversions" - "${gobin}/conversion-gen" \ - --input-dirs "$(codegen::join , "${ALL_FQ_APIS[@]}")" \ - -O zz_generated.conversion \ - "$@" -fi - -if grep -qw "applyconfiguration" <<<"${GENS}"; then - APPLY_CONFIGURATION_PACKAGE="${OUTPUT_PKG}/${APPLYCONFIGURATION_PKG_NAME:-applyconfiguration}" - - if [ ! "$verify_only" ]; then - # Nuke existing files - root="$(GO111MODULE=on go list -f '{{.Dir}}' "${APPLY_CONFIGURATION_PACKAGE}" 2>/dev/null || true)" - if [ -n "${root}" ]; then - pushd "${root}" >/dev/null - git_grep -l --null \ - -e '^// Code generated by applyconfiguration-gen. DO NOT EDIT.$' \ - ':(glob)**/*.go' \ - | xargs -0 rm -f - popd >/dev/null - fi - fi - - echo "Generating apply configuration for ${GROUPS_WITH_VERSIONS} at ${APPLY_CONFIGURATION_PACKAGE}" - "${gobin}/applyconfiguration-gen" \ - --input-dirs "$(codegen::join , "${EXT_FQ_APIS[@]}")" \ - --output-package "${APPLY_CONFIGURATION_PACKAGE}" \ - "$@" -fi - -if grep -qw "client" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - root="$(GO111MODULE=on go list -f '{{.Dir}}' "${OUTPUT_PKG}/${CLIENTSET_PKG}/${CLIENTSET_NAME}" 2>/dev/null || true)" - if [ -n "${root}" ]; then - pushd "${root}" >/dev/null - git_grep -l --null \ - -e '^// Code generated by client-gen. DO NOT EDIT.$' \ - ':(glob)**/*.go' \ - | xargs -0 rm -f - popd >/dev/null - fi - fi - - echo "Generating clientset for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/${CLIENTSET_PKG}" - "${gobin}/client-gen" \ - --clientset-name "${CLIENTSET_NAME}" \ - --input-base "" \ - --input "$(codegen::join , "${EXT_FQ_APIS[@]}")" \ - --output-package "${OUTPUT_PKG}/${CLIENTSET_PKG}" \ - --apply-configuration-package "${APPLY_CONFIGURATION_PACKAGE:-}" \ - "$@" -fi - -if grep -qw "lister" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - for gv in "${GROUP_VERSIONS[@]}"; do - root="$(GO111MODULE=on go list -f '{{.Dir}}' "${OUTPUT_PKG}/listers/${gv}" 2>/dev/null || true)" - if [ -n "${root}" ]; then - pushd "${root}" >/dev/null - git_grep -l --null \ - -e '^// Code generated by lister-gen. DO NOT EDIT.$' \ - ':(glob)**/*.go' \ - | xargs -0 rm -f - popd >/dev/null - fi - done - fi - - echo "Generating listers for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/listers" - "${gobin}/lister-gen" \ - --input-dirs "$(codegen::join , "${EXT_FQ_APIS[@]}")" \ - --output-package "${OUTPUT_PKG}/listers" \ - "$@" -fi - -if grep -qw "informer" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - root="$(GO111MODULE=on go list -f '{{.Dir}}' "${OUTPUT_PKG}/informers/externalversions" 2>/dev/null || true)" - if [ -n "${root}" ]; then - pushd "${root}" >/dev/null - git_grep -l --null \ - -e '^// Code generated by informer-gen. DO NOT EDIT.$' \ - ':(glob)**/*.go' \ - | xargs -0 rm -f - popd >/dev/null - fi - fi - - echo "Generating informers for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/informers" - "${gobin}/informer-gen" \ - --input-dirs "$(codegen::join , "${EXT_FQ_APIS[@]}")" \ - --versioned-clientset-package "${OUTPUT_PKG}/${CLIENTSET_PKG}/${CLIENTSET_NAME}" \ - --listers-package "${OUTPUT_PKG}/listers" \ - --output-package "${OUTPUT_PKG}/informers" \ - "$@" -fi - -if grep -qw "openapi" <<<"${GENS}"; then - if [ ! "$verify_only" ]; then - # Nuke existing files - for dir in $(GO111MODULE=on go list -f '{{.Dir}}' "${FQ_APIS[@]}"); do - pushd "${dir}" >/dev/null - git_find -z ':(glob)**'/zz_generated.openapi.go | xargs -0 rm -f - popd >/dev/null - done - fi - - echo "Generating OpenAPI definitions for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/openapi" - declare -a OPENAPI_EXTRA_PACKAGES - "${gobin}/openapi-gen" \ - --input-dirs "$(codegen::join , "${EXT_FQ_APIS[@]}" "${OPENAPI_EXTRA_PACKAGES[@]+"${OPENAPI_EXTRA_PACKAGES[@]}"}")" \ - --input-dirs "k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/version" \ - --output-package "${OUTPUT_PKG}/openapi" \ - -O zz_generated.openapi \ - "$@" -fi +exit 1 diff --git a/vendor/k8s.io/code-generator/kube_codegen.sh b/vendor/k8s.io/code-generator/kube_codegen.sh index 6ded2048368..6ca83a6c5d3 100644 --- a/vendor/k8s.io/code-generator/kube_codegen.sh +++ b/vendor/k8s.io/code-generator/kube_codegen.sh @@ -17,35 +17,43 @@ # This presents several functions for packages which want to use kubernetes # code-generation tools. +# These functions insist that your input IDL (commented go) files be located in +# go packages following the pattern $input_pkg_root/$something_sans_slash/$api_version . +# Those $something_sans_slash will be propagated into the output directory structure. + set -o errexit set -o nounset set -o pipefail KUBE_CODEGEN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" -function kube::codegen::internal::git_find() { - # Similar to find but faster and easier to understand. We want to include - # modified and untracked files because this might be running against code - # which is not tracked by git yet. - git ls-files -cmo --exclude-standard "$@" +function kube::codegen::internal::findz() { + # We use `find` rather than `git ls-files` because sometimes external + # projects use this across repos. This is an imperfect wrapper of find, + # but good enough for this script. + find "$@" -print0 } -function kube::codegen::internal::git_grep() { - # We want to include modified and untracked files because this might be - # running against code which is not tracked by git yet. - git grep --untracked "$@" +function kube::codegen::internal::grep() { + # We use `grep` rather than `git grep` because sometimes external projects + # use this across repos. + grep "$@" \ + --exclude-dir .git \ + --exclude-dir _output \ + --exclude-dir vendor } # Generate tagged helper code: conversions, deepcopy, and defaults # -# Args: -# --input-pkg-root -# The root package under which to search for files which request code to be -# generated. This must be Go package syntax, e.g. "k8s.io/foo/bar". +# USAGE: kube::codegen::gen_helpers [FLAGS] +# +# +# The root directory under which to search for Go files which request code to +# be generated. This must be a local path, not a Go package. +# +# See note at the top about package structure below that. # -# --output-base -# The root directory under which to emit code. The concatenation of -# + must be valid. +# FLAGS: # # --boilerplate # An optional override for the header file to insert into generated files. @@ -55,22 +63,13 @@ function kube::codegen::internal::git_grep() { # directories to consider during conversion generation. # function kube::codegen::gen_helpers() { - local in_pkg_root="" - local out_base="" # gengo needs the output dir must be $out_base/$out_pkg_root + local in_dir="" local boilerplate="${KUBE_CODEGEN_ROOT}/hack/boilerplate.go.txt" local v="${KUBE_VERBOSE:-0}" local extra_peers=() while [ "$#" -gt 0 ]; do case "$1" in - "--input-pkg-root") - in_pkg_root="$2" - shift 2 - ;; - "--output-base") - out_base="$2" - shift 2 - ;; "--boilerplate") boilerplate="$2" shift 2 @@ -80,18 +79,22 @@ function kube::codegen::gen_helpers() { shift 2 ;; *) - echo "unknown argument: $1" >&2 - return 1 + if [[ "$1" =~ ^-- ]]; then + echo "unknown argument: $1" >&2 + return 1 + fi + if [ -n "$in_dir" ]; then + echo "too many arguments: $1 (already have $in_dir)" >&2 + return 1 + fi + in_dir="$1" + shift ;; esac done - if [ -z "${in_pkg_root}" ]; then - echo "--input-pkg-root is required" >&2 - return 1 - fi - if [ -z "${out_base}" ]; then - echo "--output-base is required" >&2 + if [ -z "${in_dir}" ]; then + echo "input-dir argument is required" >&2 return 1 fi @@ -110,136 +113,125 @@ function kube::codegen::gen_helpers() { # Go installs in $GOBIN if defined, and $GOPATH/bin otherwise gobin="${GOBIN:-$(go env GOPATH)/bin}" - # These tools all assume out-dir == in-dir. - root="${out_base}/${in_pkg_root}" - mkdir -p "${root}" - root="$(cd "${root}" && pwd -P)" - # Deepcopy # local input_pkgs=() - while read -r file; do - dir="$(dirname "${file}")" + while read -r dir; do pkg="$(cd "${dir}" && GO111MODULE=on go list -find .)" input_pkgs+=("${pkg}") done < <( - ( kube::codegen::internal::git_grep -l \ + ( kube::codegen::internal::grep -l --null \ -e '+k8s:deepcopy-gen=' \ - ":(glob)${root}"/'**/*.go' \ + -r "${in_dir}" \ + --include '*.go' \ || true \ - ) | LC_ALL=C sort -u + ) | while read -r -d $'\0' F; do dirname "${F}"; done \ + | LC_ALL=C sort -u ) if [ "${#input_pkgs[@]}" != 0 ]; then echo "Generating deepcopy code for ${#input_pkgs[@]} targets" - kube::codegen::internal::git_find -z \ - ":(glob)${root}"/'**/zz_generated.deepcopy.go' \ + kube::codegen::internal::findz \ + "${in_dir}" \ + -type f \ + -name zz_generated.deepcopy.go \ | xargs -0 rm -f - local input_args=() - for arg in "${input_pkgs[@]}"; do - input_args+=("--input-dirs" "$arg") - done "${gobin}/deepcopy-gen" \ -v "${v}" \ - -O zz_generated.deepcopy \ + --output-file zz_generated.deepcopy.go \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - "${input_args[@]}" + "${input_pkgs[@]}" fi # Defaults # local input_pkgs=() - while read -r file; do - dir="$(dirname "${file}")" + while read -r dir; do pkg="$(cd "${dir}" && GO111MODULE=on go list -find .)" input_pkgs+=("${pkg}") done < <( - ( kube::codegen::internal::git_grep -l \ + ( kube::codegen::internal::grep -l --null \ -e '+k8s:defaulter-gen=' \ - ":(glob)${root}"/'**/*.go' \ + -r "${in_dir}" \ + --include '*.go' \ || true \ - ) | LC_ALL=C sort -u + ) | while read -r -d $'\0' F; do dirname "${F}"; done \ + | LC_ALL=C sort -u ) if [ "${#input_pkgs[@]}" != 0 ]; then echo "Generating defaulter code for ${#input_pkgs[@]} targets" - kube::codegen::internal::git_find -z \ - ":(glob)${root}"/'**/zz_generated.defaults.go' \ + kube::codegen::internal::findz \ + "${in_dir}" \ + -type f \ + -name zz_generated.defaults.go \ | xargs -0 rm -f - local input_args=() - for arg in "${input_pkgs[@]}"; do - input_args+=("--input-dirs" "$arg") - done "${gobin}/defaulter-gen" \ -v "${v}" \ - -O zz_generated.defaults \ + --output-file zz_generated.defaults.go \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - "${input_args[@]}" + "${input_pkgs[@]}" fi # Conversions # local input_pkgs=() - while read -r file; do - dir="$(dirname "${file}")" + while read -r dir; do pkg="$(cd "${dir}" && GO111MODULE=on go list -find .)" input_pkgs+=("${pkg}") done < <( - ( kube::codegen::internal::git_grep -l \ + ( kube::codegen::internal::grep -l --null \ -e '+k8s:conversion-gen=' \ - ":(glob)${root}"/'**/*.go' \ + -r "${in_dir}" \ + --include '*.go' \ || true \ - ) | LC_ALL=C sort -u + ) | while read -r -d $'\0' F; do dirname "${F}"; done \ + | LC_ALL=C sort -u ) if [ "${#input_pkgs[@]}" != 0 ]; then echo "Generating conversion code for ${#input_pkgs[@]} targets" - kube::codegen::internal::git_find -z \ - ":(glob)${root}"/'**/zz_generated.conversion.go' \ + kube::codegen::internal::findz \ + "${in_dir}" \ + -type f \ + -name zz_generated.conversion.go \ | xargs -0 rm -f - local input_args=() - for arg in "${input_pkgs[@]}"; do - input_args+=("--input-dirs" "$arg") - done local extra_peer_args=() for arg in "${extra_peers[@]:+"${extra_peers[@]}"}"; do extra_peer_args+=("--extra-peer-dirs" "$arg") done "${gobin}/conversion-gen" \ -v "${v}" \ - -O zz_generated.conversion \ + --output-file zz_generated.conversion.go \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ "${extra_peer_args[@]:+"${extra_peer_args[@]}"}" \ - "${input_args[@]}" + "${input_pkgs[@]}" fi } # Generate openapi code # -# Args: -# --input-pkg-root -# The root package under which to search for files which request openapi to -# be generated. This must be Go package syntax, e.g. "k8s.io/foo/bar". +# USAGE: kube::codegen::gen_openapi [FLAGS] +# +# +# The root directory under which to search for Go files which request openapi +# to be generated. This must be a local path, not a Go package. +# +# See note at the top about package structure below that. # -# --output-pkg-root -# The root package under which generated directories and files -# will be placed. This must be go package syntax, e.g. "k8s.io/foo/bar". +# FLAGS: # -# --output-base -# The root directory under which to emit code. The concatenation of -# + must be valid. +# --output-dir +# The directory into which to emit code. # -# --openapi-name -# An optional override for the leaf name of the generated directory. +# --output-pkg +# The Go package path (import path) of the --output-dir. # # --extra-pkgs # An optional list of additional packages to be imported during openapi @@ -258,10 +250,9 @@ function kube::codegen::gen_helpers() { # An optional override for the header file to insert into generated files. # function kube::codegen::gen_openapi() { - local in_pkg_root="" - local out_pkg_root="" - local out_base="" # gengo needs the output dir must be $out_base/$out_pkg_root - local openapi_subdir="openapi" + local in_dir="" + local out_dir="" + local out_pkg="" local extra_pkgs=() local report="/dev/null" local update_report="" @@ -270,20 +261,12 @@ function kube::codegen::gen_openapi() { while [ "$#" -gt 0 ]; do case "$1" in - "--input-pkg-root") - in_pkg_root="$2" + "--output-dir") + out_dir="$2" shift 2 ;; - "--output-pkg-root") - out_pkg_root="$2" - shift 2 - ;; - "--output-base") - out_base="$2" - shift 2 - ;; - "--openapi-name") - openapi_subdir="$2" + "--output-pkg") + out_pkg="$2" shift 2 ;; "--extra-pkgs") @@ -303,22 +286,30 @@ function kube::codegen::gen_openapi() { shift 2 ;; *) - echo "unknown argument: $1" >&2 - return 1 + if [[ "$1" =~ ^-- ]]; then + echo "unknown argument: $1" >&2 + return 1 + fi + if [ -n "$in_dir" ]; then + echo "too many arguments: $1 (already have $in_dir)" >&2 + return 1 + fi + in_dir="$1" + shift ;; esac done - if [ -z "${in_pkg_root}" ]; then - echo "--input-pkg-root is required" >&2 + if [ -z "${in_dir}" ]; then + echo "input-dir argument is required" >&2 return 1 fi - if [ -z "${out_pkg_root}" ]; then - echo "--output-pkg-root is required" >&2 + if [ -z "${out_dir}" ]; then + echo "--output-dir is required" >&2 return 1 fi - if [ -z "${out_base}" ]; then - echo "--output-base is required" >&2 + if [ -z "${out_pkg}" ]; then + echo "--output-pkg is required" >&2 return 1 fi @@ -336,51 +327,45 @@ function kube::codegen::gen_openapi() { openapi-gen ) # shellcheck disable=2046 # printf word-splitting is intentional - GO111MODULE=on go install $(printf "k8s.io/code-generator/cmd/%s " "${BINS[@]}") + GO111MODULE=on go install $(printf "k8s.io/kube-openapi/cmd/%s " "${BINS[@]}") ) # Go installs in $GOBIN if defined, and $GOPATH/bin otherwise gobin="${GOBIN:-$(go env GOPATH)/bin}" - # These tools all assume out-dir == in-dir. - root="${out_base}/${in_pkg_root}" - mkdir -p "${root}" - root="$(cd "${root}" && pwd -P)" - local input_pkgs=( "${extra_pkgs[@]:+"${extra_pkgs[@]}"}") - while read -r file; do - dir="$(dirname "${file}")" + while read -r dir; do pkg="$(cd "${dir}" && GO111MODULE=on go list -find .)" input_pkgs+=("${pkg}") done < <( - ( kube::codegen::internal::git_grep -l \ + ( kube::codegen::internal::grep -l --null \ -e '+k8s:openapi-gen=' \ - ":(glob)${root}"/'**/*.go' \ + -r "${in_dir}" \ + --include '*.go' \ || true \ - ) | LC_ALL=C sort -u + ) | while read -r -d $'\0' F; do dirname "${F}"; done \ + | LC_ALL=C sort -u ) if [ "${#input_pkgs[@]}" != 0 ]; then echo "Generating openapi code for ${#input_pkgs[@]} targets" - kube::codegen::internal::git_find -z \ - ":(glob)${root}"/'**/zz_generated.openapi.go' \ + kube::codegen::internal::findz \ + "${in_dir}" \ + -type f \ + -name zz_generated.openapi.go \ | xargs -0 rm -f - local inputs=() - for arg in "${input_pkgs[@]}"; do - inputs+=("--input-dirs" "$arg") - done "${gobin}/openapi-gen" \ -v "${v}" \ - -O zz_generated.openapi \ + --output-file zz_generated.openapi.go \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - --output-package "${out_pkg_root}/${openapi_subdir}" \ + --output-dir "${out_dir}" \ + --output-pkg "${out_pkg}" \ --report-filename "${new_report}" \ - --input-dirs "k8s.io/apimachinery/pkg/apis/meta/v1" \ - --input-dirs "k8s.io/apimachinery/pkg/runtime" \ - --input-dirs "k8s.io/apimachinery/pkg/version" \ - "${inputs[@]}" + "k8s.io/apimachinery/pkg/apis/meta/v1" \ + "k8s.io/apimachinery/pkg/runtime" \ + "k8s.io/apimachinery/pkg/version" \ + "${input_pkgs[@]}" fi touch "${report}" # in case it doesn't exist yet @@ -394,19 +379,27 @@ function kube::codegen::gen_openapi() { # Generate client code # -# Args: -# --input-pkg-root -# The root package under which to search for types.go files which request -# clients to be generated. This must be Go package syntax, e.g. -# "k8s.io/foo/bar". +# USAGE: kube::codegen::gen_client [FLAGS] +# +# +# The root package under which to search for Go files which request clients +# to be generated. This must be a local path, not a Go package. +# +# See note at the top about package structure below that. +# +# FLAGS: +# --one-input-api +# A specific API (a directory) under the input-dir for which to generate a +# client. If this is not set, clients for all APIs under the input-dir +# will be generated (under the --output-pkg). # -# --output-pkg-root -# The root package into which generated directories and files will be -# placed. This must be Go package syntax, e.g. "k8s.io/foo/bar". +# --output-dir +# The root directory under which to emit code. Each aspect of client +# generation will make one or more subdirectories. # -# --output-base -# The root directory under which to emit code. The concatenation of -# + must be valid. +# --output-pkg +# The Go package path (import path) of the --output-dir. Each aspect of +# client generation will make one or more sub-packages. # # --boilerplate # An optional override for the header file to insert into generated files. @@ -424,6 +417,10 @@ function kube::codegen::gen_openapi() { # --applyconfig-name # An optional override for the leaf name of the generated "applyconfiguration" directory. # +# --applyconfig-externals +# An optional list of comma separated external apply configurations locations +# in .: form. +# # --with-watch # Enables generation of listers and informers for APIs which support WATCH. # @@ -433,32 +430,39 @@ function kube::codegen::gen_openapi() { # --informers-name # An optional override for the leaf name of the generated "informers" directory. # +# --plural-exceptions +# An optional list of comma separated plural exception definitions in Type:PluralizedType form. +# function kube::codegen::gen_client() { - local in_pkg_root="" - local out_pkg_root="" - local out_base="" # gengo needs the output dir must be $out_base/$out_pkg_root + local in_dir="" + local one_input_api="" + local out_dir="" + local out_pkg="" local clientset_subdir="clientset" local clientset_versioned_name="versioned" local applyconfig="false" local applyconfig_subdir="applyconfiguration" + local applyconfig_external="" + local applyconfig_openapi_schema="" local watchable="false" local listers_subdir="listers" local informers_subdir="informers" local boilerplate="${KUBE_CODEGEN_ROOT}/hack/boilerplate.go.txt" + local plural_exceptions="" local v="${KUBE_VERBOSE:-0}" while [ "$#" -gt 0 ]; do case "$1" in - "--input-pkg-root") - in_pkg_root="$2" + "--one-input-api") + one_input_api="/$2" shift 2 ;; - "--output-pkg-root") - out_pkg_root="$2" + "--output-dir") + out_dir="$2" shift 2 ;; - "--output-base") - out_base="$2" + "--output-pkg") + out_pkg="$2" shift 2 ;; "--boilerplate") @@ -481,6 +485,14 @@ function kube::codegen::gen_client() { applyconfig_subdir="$2" shift 2 ;; + "--applyconfig-externals") + applyconfig_external="$2" + shift 2 + ;; + "--applyconfig-openapi-schema") + applyconfig_openapi_schema="$2" + shift 2 + ;; "--with-watch") watchable="true" shift @@ -493,26 +505,39 @@ function kube::codegen::gen_client() { informers_subdir="$2" shift 2 ;; + "--plural-exceptions") + plural_exceptions="$2" + shift 2 + ;; *) - echo "unknown argument: $1" >&2 - return 1 + if [[ "$1" =~ ^-- ]]; then + echo "unknown argument: $1" >&2 + return 1 + fi + if [ -n "$in_dir" ]; then + echo "too many arguments: $1 (already have $in_dir)" >&2 + return 1 + fi + in_dir="$1" + shift ;; esac done - if [ -z "${in_pkg_root}" ]; then - echo "--input-pkg-root is required" >&2 + if [ -z "${in_dir}" ]; then + echo "input-dir argument is required" >&2 return 1 fi - if [ -z "${out_pkg_root}" ]; then - echo "--output-pkg-root is required" >&2 + if [ -z "${out_dir}" ]; then + echo "--output-dir is required" >&2 return 1 fi - if [ -z "${out_base}" ]; then - echo "--output-base is required" >&2 - return 1 + if [ -z "${out_pkg}" ]; then + echo "--output-pkg is required" >&2 fi + mkdir -p "${out_dir}" + ( # To support running this from anywhere, first cd into this directory, # and then install with forced module mode on and fully qualified name. @@ -529,17 +554,9 @@ function kube::codegen::gen_client() { # Go installs in $GOBIN if defined, and $GOPATH/bin otherwise gobin="${GOBIN:-$(go env GOPATH)/bin}" - in_root="${out_base}/${in_pkg_root}" - mkdir -p "${in_root}" - in_root="$(cd "${in_root}" && pwd -P)" - out_root="${out_base}/${out_pkg_root}" - mkdir -p "${out_root}" - out_root="$(cd "${out_root}" && pwd -P)" - local group_versions=() local input_pkgs=() - while read -r file; do - dir="$(dirname "${file}")" + while read -r dir; do pkg="$(cd "${dir}" && GO111MODULE=on go list -find .)" leaf="$(basename "${dir}")" if grep -E -q '^v[0-9]+((alpha|beta)[0-9]+)?$' <<< "${leaf}"; then @@ -550,11 +567,13 @@ function kube::codegen::gen_client() { group_versions+=("${leaf2}/${leaf}") fi done < <( - ( kube::codegen::internal::git_grep -l \ + ( kube::codegen::internal::grep -l --null \ -e '+genclient' \ - ":(glob)${in_root}"/'**/types.go' \ + -r "${in_dir}${one_input_api}" \ + --include '*.go' \ || true \ - ) | LC_ALL=C sort -u + ) | while read -r -d $'\0' F; do dirname "${F}"; done \ + | LC_ALL=C sort -u ) if [ "${#group_versions[@]}" == 0 ]; then @@ -563,33 +582,33 @@ function kube::codegen::gen_client() { applyconfig_pkg="" # set this for later use, iff enabled if [ "${applyconfig}" == "true" ]; then - applyconfig_pkg="${out_pkg_root}/${applyconfig_subdir}" + applyconfig_pkg="${out_pkg}/${applyconfig_subdir}" echo "Generating applyconfig code for ${#input_pkgs[@]} targets" - ( kube::codegen::internal::git_grep -l --null \ + ( kube::codegen::internal::grep -l --null \ -e '^// Code generated by applyconfiguration-gen. DO NOT EDIT.$' \ - ":(glob)${out_root}/${applyconfig_subdir}"/'**/*.go' \ + -r "${out_dir}/${applyconfig_subdir}" \ + --include '*.go' \ || true \ ) | xargs -0 rm -f - local inputs=() - for arg in "${input_pkgs[@]}"; do - inputs+=("--input-dirs" "$arg") - done "${gobin}/applyconfiguration-gen" \ -v "${v}" \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - --output-package "${out_pkg_root}/${applyconfig_subdir}" \ - "${inputs[@]}" + --output-dir "${out_dir}/${applyconfig_subdir}" \ + --output-pkg "${applyconfig_pkg}" \ + --external-applyconfigurations "${applyconfig_external}" \ + --openapi-schema "${applyconfig_openapi_schema}" \ + "${input_pkgs[@]}" fi echo "Generating client code for ${#group_versions[@]} targets" - ( kube::codegen::internal::git_grep -l --null \ + ( kube::codegen::internal::grep -l --null \ -e '^// Code generated by client-gen. DO NOT EDIT.$' \ - ":(glob)${out_root}/${clientset_subdir}"/'**/*.go' \ + -r "${out_dir}/${clientset_subdir}" \ + --include '*.go' \ || true \ ) | xargs -0 rm -f @@ -597,55 +616,52 @@ function kube::codegen::gen_client() { for arg in "${group_versions[@]}"; do inputs+=("--input" "$arg") done - "${gobin}/client-gen" \ + "${gobin}/client-gen" \ -v "${v}" \ --go-header-file "${boilerplate}" \ + --output-dir "${out_dir}/${clientset_subdir}" \ + --output-pkg "${out_pkg}/${clientset_subdir}" \ --clientset-name "${clientset_versioned_name}" \ - --input-base "${in_pkg_root}" \ - --output-base "${out_base}" \ - --output-package "${out_pkg_root}/${clientset_subdir}" \ --apply-configuration-package "${applyconfig_pkg}" \ + --input-base "$(cd "${in_dir}" && pwd -P)" `# must be absolute path or Go import path"` \ + --plural-exceptions "${plural_exceptions}" \ "${inputs[@]}" if [ "${watchable}" == "true" ]; then echo "Generating lister code for ${#input_pkgs[@]} targets" - ( kube::codegen::internal::git_grep -l --null \ + ( kube::codegen::internal::grep -l --null \ -e '^// Code generated by lister-gen. DO NOT EDIT.$' \ - ":(glob)${out_root}/${listers_subdir}"/'**/*.go' \ + -r "${out_dir}/${listers_subdir}" \ + --include '*.go' \ || true \ ) | xargs -0 rm -f - local inputs=() - for arg in "${input_pkgs[@]}"; do - inputs+=("--input-dirs" "$arg") - done "${gobin}/lister-gen" \ -v "${v}" \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - --output-package "${out_pkg_root}/${listers_subdir}" \ - "${inputs[@]}" + --output-dir "${out_dir}/${listers_subdir}" \ + --output-pkg "${out_pkg}/${listers_subdir}" \ + --plural-exceptions "${plural_exceptions}" \ + "${input_pkgs[@]}" echo "Generating informer code for ${#input_pkgs[@]} targets" - ( kube::codegen::internal::git_grep -l --null \ + ( kube::codegen::internal::grep -l --null \ -e '^// Code generated by informer-gen. DO NOT EDIT.$' \ - ":(glob)${out_root}/${informers_subdir}"/'**/*.go' \ + -r "${out_dir}/${informers_subdir}" \ + --include '*.go' \ || true \ ) | xargs -0 rm -f - local inputs=() - for arg in "${input_pkgs[@]}"; do - inputs+=("--input-dirs" "$arg") - done "${gobin}/informer-gen" \ -v "${v}" \ --go-header-file "${boilerplate}" \ - --output-base "${out_base}" \ - --output-package "${out_pkg_root}/${informers_subdir}" \ - --versioned-clientset-package "${out_pkg_root}/${clientset_subdir}/${clientset_versioned_name}" \ - --listers-package "${out_pkg_root}/${listers_subdir}" \ - "${inputs[@]}" + --output-dir "${out_dir}/${informers_subdir}" \ + --output-pkg "${out_pkg}/${informers_subdir}" \ + --versioned-clientset-package "${out_pkg}/${clientset_subdir}/${clientset_versioned_name}" \ + --listers-package "${out_pkg}/${listers_subdir}" \ + --plural-exceptions "${plural_exceptions}" \ + "${input_pkgs[@]}" fi } diff --git a/vendor/k8s.io/code-generator/pkg/namer/tag-override.go b/vendor/k8s.io/code-generator/pkg/namer/tag-override.go index fd8c3a8553c..59ee489f0f7 100644 --- a/vendor/k8s.io/code-generator/pkg/namer/tag-override.go +++ b/vendor/k8s.io/code-generator/pkg/namer/tag-override.go @@ -17,8 +17,9 @@ limitations under the License. package namer import ( - "k8s.io/gengo/namer" - "k8s.io/gengo/types" + "k8s.io/gengo/v2" + "k8s.io/gengo/v2/namer" + "k8s.io/gengo/v2/types" ) // TagOverrideNamer is a namer which pulls names from a given tag, if specified, @@ -49,7 +50,7 @@ func NewTagOverrideNamer(tagName string, fallback namer.Namer) namer.Namer { // extractTag gets the comment-tags for the key. If the tag did not exist, it // returns the empty string. func extractTag(key string, lines []string) string { - val, present := types.ExtractCommentTags("+", lines)[key] + val, present := gengo.ExtractCommentTags("+", lines)[key] if !present || len(val) < 1 { return "" } diff --git a/vendor/k8s.io/code-generator/pkg/util/build.go b/vendor/k8s.io/code-generator/pkg/util/build.go deleted file mode 100644 index 53f93afe349..00000000000 --- a/vendor/k8s.io/code-generator/pkg/util/build.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 util - -import ( - gobuild "go/build" - "path/filepath" - "strings" -) - -// CurrentPackage returns the go package of the current directory, or "" if it cannot -// be derived from the GOPATH. -func CurrentPackage() string { - for _, root := range gobuild.Default.SrcDirs() { - if pkg, ok := hasSubdir(root, "."); ok { - return pkg - } - } - return "" -} - -func hasSubdir(root, dir string) (rel string, ok bool) { - // ensure a tailing separator to properly compare on word-boundaries - const sep = string(filepath.Separator) - root = filepath.Clean(root) - if !strings.HasSuffix(root, sep) { - root += sep - } - - // check whether root dir starts with root - dir = filepath.Clean(dir) - if !strings.HasPrefix(dir, root) { - return "", false - } - - // cut off root - return filepath.ToSlash(dir[len(root):]), true -} - -// Vendorless trims vendor prefix from a package path to make it canonical -func Vendorless(p string) string { - if pos := strings.LastIndex(p, "/vendor/"); pos != -1 { - return p[pos+len("/vendor/"):] - } - return p -} diff --git a/vendor/k8s.io/code-generator/tools.go b/vendor/k8s.io/code-generator/tools.go index 90b942b0703..d0e2c7764f2 100644 --- a/vendor/k8s.io/code-generator/tools.go +++ b/vendor/k8s.io/code-generator/tools.go @@ -28,10 +28,7 @@ import ( _ "k8s.io/code-generator/cmd/deepcopy-gen" _ "k8s.io/code-generator/cmd/defaulter-gen" _ "k8s.io/code-generator/cmd/go-to-protobuf" - _ "k8s.io/code-generator/cmd/import-boss" _ "k8s.io/code-generator/cmd/informer-gen" _ "k8s.io/code-generator/cmd/lister-gen" - _ "k8s.io/code-generator/cmd/openapi-gen" _ "k8s.io/code-generator/cmd/register-gen" - _ "k8s.io/code-generator/cmd/set-gen" ) diff --git a/vendor/k8s.io/component-base/config/types.go b/vendor/k8s.io/component-base/config/types.go deleted file mode 100644 index e1b9469d76e..00000000000 --- a/vendor/k8s.io/component-base/config/types.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package config - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// ClientConnectionConfiguration contains details for constructing a client. -type ClientConnectionConfiguration struct { - // kubeconfig is the path to a KubeConfig file. - Kubeconfig string - // acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the - // default value of 'application/json'. This field will control all connections to the server used by a particular - // client. - AcceptContentTypes string - // contentType is the content type used when sending data to the server from this client. - ContentType string - // qps controls the number of queries per second allowed for this connection. - QPS float32 - // burst allows extra queries to accumulate when a client is exceeding its rate. - Burst int32 -} - -// LeaderElectionConfiguration defines the configuration of leader election -// clients for components that can run with leader election enabled. -type LeaderElectionConfiguration struct { - // leaderElect enables a leader election client to gain leadership - // before executing the main loop. Enable this when running replicated - // components for high availability. - LeaderElect bool - // leaseDuration is the duration that non-leader candidates will wait - // after observing a leadership renewal until attempting to acquire - // leadership of a led but unrenewed leader slot. This is effectively the - // maximum duration that a leader can be stopped before it is replaced - // by another candidate. This is only applicable if leader election is - // enabled. - LeaseDuration metav1.Duration - // renewDeadline is the interval between attempts by the acting master to - // renew a leadership slot before it stops leading. This must be less - // than or equal to the lease duration. This is only applicable if leader - // election is enabled. - RenewDeadline metav1.Duration - // retryPeriod is the duration the clients should wait between attempting - // acquisition and renewal of a leadership. This is only applicable if - // leader election is enabled. - RetryPeriod metav1.Duration - // resourceLock indicates the resource object type that will be used to lock - // during leader election cycles. - ResourceLock string - // resourceName indicates the name of resource object that will be used to lock - // during leader election cycles. - ResourceName string - // resourceNamespace indicates the namespace of resource object that will be used to lock - // during leader election cycles. - ResourceNamespace string -} - -// DebuggingConfiguration holds configuration for Debugging related features. -type DebuggingConfiguration struct { - // enableProfiling enables profiling via web interface host:port/debug/pprof/ - EnableProfiling bool - // enableContentionProfiling enables block profiling, if - // enableProfiling is true. - EnableContentionProfiling bool -} diff --git a/vendor/k8s.io/component-base/config/v1alpha1/conversion.go b/vendor/k8s.io/component-base/config/v1alpha1/conversion.go deleted file mode 100644 index e2951e310d5..00000000000 --- a/vendor/k8s.io/component-base/config/v1alpha1/conversion.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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/apimachinery/pkg/conversion" - "k8s.io/component-base/config" -) - -// Important! The public back-and-forth conversion functions for the types in this generic -// package with ComponentConfig types need to be manually exposed like this in order for -// other packages that reference this package to be able to call these conversion functions -// in an autogenerated manner. -// TODO: Fix the bug in conversion-gen so it automatically discovers these Convert_* functions -// in autogenerated code as well. - -func Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(in *ClientConnectionConfiguration, out *config.ClientConnectionConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(in, out, s) -} - -func Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in *config.ClientConnectionConfiguration, out *ClientConnectionConfiguration, s conversion.Scope) error { - return autoConvert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in, out, s) -} - -func Convert_v1alpha1_DebuggingConfiguration_To_config_DebuggingConfiguration(in *DebuggingConfiguration, out *config.DebuggingConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha1_DebuggingConfiguration_To_config_DebuggingConfiguration(in, out, s) -} - -func Convert_config_DebuggingConfiguration_To_v1alpha1_DebuggingConfiguration(in *config.DebuggingConfiguration, out *DebuggingConfiguration, s conversion.Scope) error { - return autoConvert_config_DebuggingConfiguration_To_v1alpha1_DebuggingConfiguration(in, out, s) -} - -func Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(in *LeaderElectionConfiguration, out *config.LeaderElectionConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(in, out, s) -} - -func Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *config.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error { - return autoConvert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in, out, s) -} diff --git a/vendor/k8s.io/component-base/config/v1alpha1/defaults.go b/vendor/k8s.io/component-base/config/v1alpha1/defaults.go deleted file mode 100644 index cd7f820e97e..00000000000 --- a/vendor/k8s.io/component-base/config/v1alpha1/defaults.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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 ( - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - utilpointer "k8s.io/utils/pointer" -) - -// RecommendedDefaultLeaderElectionConfiguration defaults a pointer to a -// LeaderElectionConfiguration struct. This will set the recommended default -// values, but they may be subject to change between API versions. This function -// is intentionally not registered in the scheme as a "normal" `SetDefaults_Foo` -// function to allow consumers of this type to set whatever defaults for their -// embedded configs. Forcing consumers to use these defaults would be problematic -// as defaulting in the scheme is done as part of the conversion, and there would -// be no easy way to opt-out. Instead, if you want to use this defaulting method -// run it in your wrapper struct of this type in its `SetDefaults_` method. -func RecommendedDefaultLeaderElectionConfiguration(obj *LeaderElectionConfiguration) { - zero := metav1.Duration{} - if obj.LeaseDuration == zero { - obj.LeaseDuration = metav1.Duration{Duration: 15 * time.Second} - } - if obj.RenewDeadline == zero { - obj.RenewDeadline = metav1.Duration{Duration: 10 * time.Second} - } - if obj.RetryPeriod == zero { - obj.RetryPeriod = metav1.Duration{Duration: 2 * time.Second} - } - if obj.ResourceLock == "" { - // TODO(#80289): Figure out how to migrate to LeaseLock at this point. - // This will most probably require going through EndpointsLease first. - obj.ResourceLock = EndpointsResourceLock - } - if obj.LeaderElect == nil { - obj.LeaderElect = utilpointer.BoolPtr(true) - } -} - -// RecommendedDefaultClientConnectionConfiguration defaults a pointer to a -// ClientConnectionConfiguration struct. This will set the recommended default -// values, but they may be subject to change between API versions. This function -// is intentionally not registered in the scheme as a "normal" `SetDefaults_Foo` -// function to allow consumers of this type to set whatever defaults for their -// embedded configs. Forcing consumers to use these defaults would be problematic -// as defaulting in the scheme is done as part of the conversion, and there would -// be no easy way to opt-out. Instead, if you want to use this defaulting method -// run it in your wrapper struct of this type in its `SetDefaults_` method. -func RecommendedDefaultClientConnectionConfiguration(obj *ClientConnectionConfiguration) { - if len(obj.ContentType) == 0 { - obj.ContentType = "application/vnd.kubernetes.protobuf" - } - if obj.QPS == 0.0 { - obj.QPS = 50.0 - } - if obj.Burst == 0 { - obj.Burst = 100 - } -} - -// RecommendedDebuggingConfiguration defaults profiling and debugging configuration. -// This will set the recommended default -// values, but they may be subject to change between API versions. This function -// is intentionally not registered in the scheme as a "normal" `SetDefaults_Foo` -// function to allow consumers of this type to set whatever defaults for their -// embedded configs. Forcing consumers to use these defaults would be problematic -// as defaulting in the scheme is done as part of the conversion, and there would -// be no easy way to opt-out. Instead, if you want to use this defaulting method -// run it in your wrapper struct of this type in its `SetDefaults_` method. -func RecommendedDebuggingConfiguration(obj *DebuggingConfiguration) { - if obj.EnableProfiling == nil { - obj.EnableProfiling = utilpointer.BoolPtr(true) // profile debugging is cheap to have exposed and standard on kube binaries - } -} - -// NewRecommendedDebuggingConfiguration returns the current recommended DebuggingConfiguration. -// This may change between releases as recommendations shift. -func NewRecommendedDebuggingConfiguration() *DebuggingConfiguration { - ret := &DebuggingConfiguration{} - RecommendedDebuggingConfiguration(ret) - return ret -} diff --git a/vendor/k8s.io/component-base/config/v1alpha1/register.go b/vendor/k8s.io/component-base/config/v1alpha1/register.go deleted file mode 100644 index ddc186c9aa4..00000000000 --- a/vendor/k8s.io/component-base/config/v1alpha1/register.go +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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/apimachinery/pkg/runtime" -) - -var ( - // SchemeBuilder is the scheme builder with scheme init functions to run for this API package - SchemeBuilder runtime.SchemeBuilder - // localSchemeBuilder extends the SchemeBuilder instance with the external types. In this package, - // defaulting and conversion init funcs are registered as well. - localSchemeBuilder = &SchemeBuilder - // AddToScheme is a global function that registers this API group & version to a scheme - AddToScheme = localSchemeBuilder.AddToScheme -) diff --git a/vendor/k8s.io/component-base/config/v1alpha1/types.go b/vendor/k8s.io/component-base/config/v1alpha1/types.go deleted file mode 100644 index 3c5f004f27d..00000000000 --- a/vendor/k8s.io/component-base/config/v1alpha1/types.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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" -) - -const EndpointsResourceLock = "endpoints" - -// LeaderElectionConfiguration defines the configuration of leader election -// clients for components that can run with leader election enabled. -type LeaderElectionConfiguration struct { - // leaderElect enables a leader election client to gain leadership - // before executing the main loop. Enable this when running replicated - // components for high availability. - LeaderElect *bool `json:"leaderElect"` - // leaseDuration is the duration that non-leader candidates will wait - // after observing a leadership renewal until attempting to acquire - // leadership of a led but unrenewed leader slot. This is effectively the - // maximum duration that a leader can be stopped before it is replaced - // by another candidate. This is only applicable if leader election is - // enabled. - LeaseDuration metav1.Duration `json:"leaseDuration"` - // renewDeadline is the interval between attempts by the acting master to - // renew a leadership slot before it stops leading. This must be less - // than or equal to the lease duration. This is only applicable if leader - // election is enabled. - RenewDeadline metav1.Duration `json:"renewDeadline"` - // retryPeriod is the duration the clients should wait between attempting - // acquisition and renewal of a leadership. This is only applicable if - // leader election is enabled. - RetryPeriod metav1.Duration `json:"retryPeriod"` - // resourceLock indicates the resource object type that will be used to lock - // during leader election cycles. - ResourceLock string `json:"resourceLock"` - // resourceName indicates the name of resource object that will be used to lock - // during leader election cycles. - ResourceName string `json:"resourceName"` - // resourceName indicates the namespace of resource object that will be used to lock - // during leader election cycles. - ResourceNamespace string `json:"resourceNamespace"` -} - -// DebuggingConfiguration holds configuration for Debugging related features. -type DebuggingConfiguration struct { - // enableProfiling enables profiling via web interface host:port/debug/pprof/ - EnableProfiling *bool `json:"enableProfiling,omitempty"` - // enableContentionProfiling enables block profiling, if - // enableProfiling is true. - EnableContentionProfiling *bool `json:"enableContentionProfiling,omitempty"` -} - -// ClientConnectionConfiguration contains details for constructing a client. -type ClientConnectionConfiguration struct { - // kubeconfig is the path to a KubeConfig file. - Kubeconfig string `json:"kubeconfig"` - // acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the - // default value of 'application/json'. This field will control all connections to the server used by a particular - // client. - AcceptContentTypes string `json:"acceptContentTypes"` - // contentType is the content type used when sending data to the server from this client. - ContentType string `json:"contentType"` - // qps controls the number of queries per second allowed for this connection. - QPS float32 `json:"qps"` - // burst allows extra queries to accumulate when a client is exceeding its rate. - Burst int32 `json:"burst"` -} diff --git a/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index a911bb50d8a..00000000000 --- a/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,133 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - config "k8s.io/component-base/config" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddConversionFunc((*config.ClientConnectionConfiguration)(nil), (*ClientConnectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(a.(*config.ClientConnectionConfiguration), b.(*ClientConnectionConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*config.DebuggingConfiguration)(nil), (*DebuggingConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_DebuggingConfiguration_To_v1alpha1_DebuggingConfiguration(a.(*config.DebuggingConfiguration), b.(*DebuggingConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*config.LeaderElectionConfiguration)(nil), (*LeaderElectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(a.(*config.LeaderElectionConfiguration), b.(*LeaderElectionConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*ClientConnectionConfiguration)(nil), (*config.ClientConnectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(a.(*ClientConnectionConfiguration), b.(*config.ClientConnectionConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*DebuggingConfiguration)(nil), (*config.DebuggingConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_DebuggingConfiguration_To_config_DebuggingConfiguration(a.(*DebuggingConfiguration), b.(*config.DebuggingConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*LeaderElectionConfiguration)(nil), (*config.LeaderElectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(a.(*LeaderElectionConfiguration), b.(*config.LeaderElectionConfiguration), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(in *ClientConnectionConfiguration, out *config.ClientConnectionConfiguration, s conversion.Scope) error { - out.Kubeconfig = in.Kubeconfig - out.AcceptContentTypes = in.AcceptContentTypes - out.ContentType = in.ContentType - out.QPS = in.QPS - out.Burst = in.Burst - return nil -} - -func autoConvert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in *config.ClientConnectionConfiguration, out *ClientConnectionConfiguration, s conversion.Scope) error { - out.Kubeconfig = in.Kubeconfig - out.AcceptContentTypes = in.AcceptContentTypes - out.ContentType = in.ContentType - out.QPS = in.QPS - out.Burst = in.Burst - return nil -} - -func autoConvert_v1alpha1_DebuggingConfiguration_To_config_DebuggingConfiguration(in *DebuggingConfiguration, out *config.DebuggingConfiguration, s conversion.Scope) error { - if err := v1.Convert_Pointer_bool_To_bool(&in.EnableProfiling, &out.EnableProfiling, s); err != nil { - return err - } - if err := v1.Convert_Pointer_bool_To_bool(&in.EnableContentionProfiling, &out.EnableContentionProfiling, s); err != nil { - return err - } - return nil -} - -func autoConvert_config_DebuggingConfiguration_To_v1alpha1_DebuggingConfiguration(in *config.DebuggingConfiguration, out *DebuggingConfiguration, s conversion.Scope) error { - if err := v1.Convert_bool_To_Pointer_bool(&in.EnableProfiling, &out.EnableProfiling, s); err != nil { - return err - } - if err := v1.Convert_bool_To_Pointer_bool(&in.EnableContentionProfiling, &out.EnableContentionProfiling, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(in *LeaderElectionConfiguration, out *config.LeaderElectionConfiguration, s conversion.Scope) error { - if err := v1.Convert_Pointer_bool_To_bool(&in.LeaderElect, &out.LeaderElect, s); err != nil { - return err - } - out.LeaseDuration = in.LeaseDuration - out.RenewDeadline = in.RenewDeadline - out.RetryPeriod = in.RetryPeriod - out.ResourceLock = in.ResourceLock - out.ResourceName = in.ResourceName - out.ResourceNamespace = in.ResourceNamespace - return nil -} - -func autoConvert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *config.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error { - if err := v1.Convert_bool_To_Pointer_bool(&in.LeaderElect, &out.LeaderElect, s); err != nil { - return err - } - out.LeaseDuration = in.LeaseDuration - out.RenewDeadline = in.RenewDeadline - out.RetryPeriod = in.RetryPeriod - out.ResourceLock = in.ResourceLock - out.ResourceName = in.ResourceName - out.ResourceNamespace = in.ResourceNamespace - return nil -} diff --git a/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 92176d9944c..00000000000 --- a/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,88 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClientConnectionConfiguration) DeepCopyInto(out *ClientConnectionConfiguration) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientConnectionConfiguration. -func (in *ClientConnectionConfiguration) DeepCopy() *ClientConnectionConfiguration { - if in == nil { - return nil - } - out := new(ClientConnectionConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DebuggingConfiguration) DeepCopyInto(out *DebuggingConfiguration) { - *out = *in - if in.EnableProfiling != nil { - in, out := &in.EnableProfiling, &out.EnableProfiling - *out = new(bool) - **out = **in - } - if in.EnableContentionProfiling != nil { - in, out := &in.EnableContentionProfiling, &out.EnableContentionProfiling - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DebuggingConfiguration. -func (in *DebuggingConfiguration) DeepCopy() *DebuggingConfiguration { - if in == nil { - return nil - } - out := new(DebuggingConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LeaderElectionConfiguration) DeepCopyInto(out *LeaderElectionConfiguration) { - *out = *in - if in.LeaderElect != nil { - in, out := &in.LeaderElect, &out.LeaderElect - *out = new(bool) - **out = **in - } - out.LeaseDuration = in.LeaseDuration - out.RenewDeadline = in.RenewDeadline - out.RetryPeriod = in.RetryPeriod - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaderElectionConfiguration. -func (in *LeaderElectionConfiguration) DeepCopy() *LeaderElectionConfiguration { - if in == nil { - return nil - } - out := new(LeaderElectionConfiguration) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/component-base/config/zz_generated.deepcopy.go b/vendor/k8s.io/component-base/config/zz_generated.deepcopy.go deleted file mode 100644 index fb0c1f1e6a8..00000000000 --- a/vendor/k8s.io/component-base/config/zz_generated.deepcopy.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package config - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClientConnectionConfiguration) DeepCopyInto(out *ClientConnectionConfiguration) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientConnectionConfiguration. -func (in *ClientConnectionConfiguration) DeepCopy() *ClientConnectionConfiguration { - if in == nil { - return nil - } - out := new(ClientConnectionConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DebuggingConfiguration) DeepCopyInto(out *DebuggingConfiguration) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DebuggingConfiguration. -func (in *DebuggingConfiguration) DeepCopy() *DebuggingConfiguration { - if in == nil { - return nil - } - out := new(DebuggingConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LeaderElectionConfiguration) DeepCopyInto(out *LeaderElectionConfiguration) { - *out = *in - out.LeaseDuration = in.LeaseDuration - out.RenewDeadline = in.RenewDeadline - out.RetryPeriod = in.RetryPeriod - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaderElectionConfiguration. -func (in *LeaderElectionConfiguration) DeepCopy() *LeaderElectionConfiguration { - if in == nil { - return nil - } - out := new(LeaderElectionConfiguration) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/component-base/featuregate/feature_gate.go b/vendor/k8s.io/component-base/featuregate/feature_gate.go index a826b0e67ef..1e441289ea5 100644 --- a/vendor/k8s.io/component-base/featuregate/feature_gate.go +++ b/vendor/k8s.io/component-base/featuregate/feature_gate.go @@ -115,6 +115,17 @@ type MutableFeatureGate interface { GetAll() map[Feature]FeatureSpec // AddMetrics adds feature enablement metrics AddMetrics() + // OverrideDefault sets a local override for the registered default value of a named + // feature. If the feature has not been previously registered (e.g. by a call to Add), has a + // locked default, or if the gate has already registered itself with a FlagSet, a non-nil + // error is returned. + // + // When two or more components consume a common feature, one component can override its + // default at runtime in order to adopt new defaults before or after the other + // components. For example, a new feature can be evaluated with a limited blast radius by + // overriding its default to true for a limited number of components without simultaneously + // changing its default for all consuming components. + OverrideDefault(name Feature, override bool) error } // featureGate implements FeatureGate as well as pflag.Value for flag parsing. @@ -126,9 +137,9 @@ type featureGate struct { // lock guards writes to known, enabled, and reads/writes of closed lock sync.Mutex // known holds a map[Feature]FeatureSpec - known *atomic.Value + known atomic.Value // enabled holds a map[Feature]bool - enabled *atomic.Value + enabled atomic.Value // closed is set to true when AddFlag is called, and prevents subsequent calls to Add closed bool } @@ -166,19 +177,13 @@ func NewFeatureGate() *featureGate { known[k] = v } - knownValue := &atomic.Value{} - knownValue.Store(known) - - enabled := map[Feature]bool{} - enabledValue := &atomic.Value{} - enabledValue.Store(enabled) - f := &featureGate{ featureGateName: naming.GetNameFromCallsite(internalPackages...), - known: knownValue, special: specialFeatures, - enabled: enabledValue, } + f.known.Store(known) + f.enabled.Store(map[Feature]bool{}) + return f } @@ -296,6 +301,38 @@ func (f *featureGate) Add(features map[Feature]FeatureSpec) error { return nil } +func (f *featureGate) OverrideDefault(name Feature, override bool) error { + f.lock.Lock() + defer f.lock.Unlock() + + if f.closed { + return fmt.Errorf("cannot override default for feature %q: gates already added to a flag set", name) + } + + known := map[Feature]FeatureSpec{} + for name, spec := range f.known.Load().(map[Feature]FeatureSpec) { + known[name] = spec + } + + spec, ok := known[name] + switch { + case !ok: + return fmt.Errorf("cannot override default: feature %q is not registered", name) + case spec.LockToDefault: + return fmt.Errorf("cannot override default: feature %q default is locked to %t", name, spec.Default) + case spec.PreRelease == Deprecated: + klog.Warningf("Overriding default of deprecated feature gate %s=%t. It will be removed in a future release.", name, override) + case spec.PreRelease == GA: + klog.Warningf("Overriding default of GA feature gate %s=%t. It will be removed in a future release.", name, override) + } + + spec.Default = override + known[name] = spec + f.known.Store(known) + + return nil +} + // GetAll returns a copy of the map of known feature names to feature specs. func (f *featureGate) GetAll() map[Feature]FeatureSpec { retval := map[Feature]FeatureSpec{} @@ -367,19 +404,16 @@ func (f *featureGate) DeepCopy() MutableFeatureGate { enabled[k] = v } - // Store copied state in new atomics. - knownValue := &atomic.Value{} - knownValue.Store(known) - enabledValue := &atomic.Value{} - enabledValue.Store(enabled) - // Construct a new featureGate around the copied state. // Note that specialFeatures is treated as immutable by convention, // and we maintain the value of f.closed across the copy. - return &featureGate{ + fg := &featureGate{ special: specialFeatures, - known: knownValue, - enabled: enabledValue, closed: f.closed, } + + fg.known.Store(known) + fg.enabled.Store(enabled) + + return fg } diff --git a/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go b/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go index cb6c725e65b..d9f51eb05d4 100644 --- a/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go +++ b/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go @@ -155,6 +155,40 @@ func (NamespaceMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_00212fb1f9d3bf1c, []int{2} } +// SupplementalGroupsPolicy defines how supplemental groups +// of the first container processes are calculated. +type SupplementalGroupsPolicy int32 + +const ( + // Merge means that the container's provided SupplementalGroups + // and FsGroup (specified in SecurityContext) will be merged with + // the primary user's groups as defined in the container image + // (in /etc/group). + SupplementalGroupsPolicy_Merge SupplementalGroupsPolicy = 0 + // Strict means that the container's provided SupplementalGroups + // and FsGroup (specified in SecurityContext) will be used instead of + // any groups defined in the container image. + SupplementalGroupsPolicy_Strict SupplementalGroupsPolicy = 1 +) + +var SupplementalGroupsPolicy_name = map[int32]string{ + 0: "Merge", + 1: "Strict", +} + +var SupplementalGroupsPolicy_value = map[string]int32{ + "Merge": 0, + "Strict": 1, +} + +func (x SupplementalGroupsPolicy) String() string { + return proto.EnumName(SupplementalGroupsPolicy_name, int32(x)) +} + +func (SupplementalGroupsPolicy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{3} +} + type PodSandboxState int32 const ( @@ -177,7 +211,7 @@ func (x PodSandboxState) String() string { } func (PodSandboxState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{3} + return fileDescriptor_00212fb1f9d3bf1c, []int{4} } type ContainerState int32 @@ -208,7 +242,7 @@ func (x ContainerState) String() string { } func (ContainerState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{4} + return fileDescriptor_00212fb1f9d3bf1c, []int{5} } type ContainerEventType int32 @@ -243,7 +277,7 @@ func (x ContainerEventType) String() string { } func (ContainerEventType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{5} + return fileDescriptor_00212fb1f9d3bf1c, []int{6} } type MetricType int32 @@ -268,7 +302,7 @@ func (x MetricType) String() string { } func (MetricType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{6} + return fileDescriptor_00212fb1f9d3bf1c, []int{7} } type CgroupDriver int32 @@ -293,7 +327,7 @@ func (x CgroupDriver) String() string { } func (CgroupDriver) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{7} + return fileDescriptor_00212fb1f9d3bf1c, []int{8} } // Available profile types. @@ -615,9 +649,18 @@ type Mount struct { // - nil is just treated as false // - when set to true, readonly must be explicitly set to true, and propagation must be PRIVATE (0). // - (readonly == false && recursive_read_only == false) does not make the mount read-only. - RecursiveReadOnly bool `protobuf:"varint,8,opt,name=recursive_read_only,json=recursiveReadOnly,proto3" json:"recursive_read_only,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + RecursiveReadOnly bool `protobuf:"varint,8,opt,name=recursive_read_only,json=recursiveReadOnly,proto3" json:"recursive_read_only,omitempty"` + // Mount an image reference (image ID, with or without digest), which is a + // special use case for image volume mounts. If this field is set, then + // host_path should be unset. All OCI mounts are per feature definition + // readonly. The kubelet does an PullImage RPC and evaluates the returned + // PullImageResponse.image_ref value, which is then set to the + // ImageSpec.image field. Runtimes are expected to mount the image as + // required. + // Introduced in the OCI Volume Source KEP: https://kep.k8s.io/4639 + Image *ImageSpec `protobuf:"bytes,9,opt,name=image,proto3" json:"image,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Mount) Reset() { *m = Mount{} } @@ -708,6 +751,13 @@ func (m *Mount) GetRecursiveReadOnly() bool { return false } +func (m *Mount) GetImage() *ImageSpec { + if m != nil { + return m.Image + } + return nil +} + // IDMapping describes host to container ID mappings for a pod sandbox. type IDMapping struct { // HostId is the id on the host. @@ -1000,13 +1050,14 @@ type LinuxSandboxSecurityContext struct { RunAsGroup *Int64Value `protobuf:"bytes,8,opt,name=run_as_group,json=runAsGroup,proto3" json:"run_as_group,omitempty"` // If set, the root filesystem of the sandbox is read-only. ReadonlyRootfs bool `protobuf:"varint,4,opt,name=readonly_rootfs,json=readonlyRootfs,proto3" json:"readonly_rootfs,omitempty"` - // List of groups applied to the first process run in the sandbox, in - // addition to the sandbox's primary GID, and group memberships defined - // in the container image for the sandbox's primary UID of the container process. - // If the list is empty, no additional groups are added to any container. - // Note that group memberships defined in the container image for the sandbox's primary UID - // of the container process are still effective, even if they are not included in this list. + // List of groups applied to the first process run in each container. + // supplemental_groups_policy can control how groups will be calculated. SupplementalGroups []int64 `protobuf:"varint,5,rep,packed,name=supplemental_groups,json=supplementalGroups,proto3" json:"supplemental_groups,omitempty"` + // supplemental_groups_policy defines how supplemental groups of the first + // container processes are calculated. + // Valid values are "Merge" and "Strict". + // If not specified, "Merge" is used. + SupplementalGroupsPolicy SupplementalGroupsPolicy `protobuf:"varint,11,opt,name=supplemental_groups_policy,json=supplementalGroupsPolicy,proto3,enum=runtime.v1.SupplementalGroupsPolicy" json:"supplemental_groups_policy,omitempty"` // Indicates whether the sandbox will be asked to run a privileged // container. If a privileged container is to be executed within it, this // MUST be true. @@ -1103,6 +1154,13 @@ func (m *LinuxSandboxSecurityContext) GetSupplementalGroups() []int64 { return nil } +func (m *LinuxSandboxSecurityContext) GetSupplementalGroupsPolicy() SupplementalGroupsPolicy { + if m != nil { + return m.SupplementalGroupsPolicy + } + return SupplementalGroupsPolicy_Merge +} + func (m *LinuxSandboxSecurityContext) GetPrivileged() bool { if m != nil { return m.Privileged @@ -3999,13 +4057,14 @@ type LinuxContainerSecurityContext struct { RunAsUsername string `protobuf:"bytes,6,opt,name=run_as_username,json=runAsUsername,proto3" json:"run_as_username,omitempty"` // If set, the root filesystem of the container is read-only. ReadonlyRootfs bool `protobuf:"varint,7,opt,name=readonly_rootfs,json=readonlyRootfs,proto3" json:"readonly_rootfs,omitempty"` - // List of groups applied to the first process run in the container, in - // addition to the container's primary GID, and group memberships defined - // in the container image for the container's primary UID of the container process. - // If the list is empty, no additional groups are added to any container. - // Note that group memberships defined in the container image for the container's primary UID - // of the container process are still effective, even if they are not included in this list. + // List of groups applied to the first process run in each container. + // supplemental_groups_policy can control how groups will be calculated. SupplementalGroups []int64 `protobuf:"varint,8,rep,packed,name=supplemental_groups,json=supplementalGroups,proto3" json:"supplemental_groups,omitempty"` + // supplemental_groups_policy defines how supplemental groups of the first + // container processes are calculated. + // Valid values are "Merge" and "Strict". + // If not specified, "Merge" is used. + SupplementalGroupsPolicy SupplementalGroupsPolicy `protobuf:"varint,17,opt,name=supplemental_groups_policy,json=supplementalGroupsPolicy,proto3,enum=runtime.v1.SupplementalGroupsPolicy" json:"supplemental_groups_policy,omitempty"` // no_new_privs defines if the flag for no_new_privs should be set on the // container. NoNewPrivs bool `protobuf:"varint,11,opt,name=no_new_privs,json=noNewPrivs,proto3" json:"no_new_privs,omitempty"` @@ -4133,6 +4192,13 @@ func (m *LinuxContainerSecurityContext) GetSupplementalGroups() []int64 { return nil } +func (m *LinuxContainerSecurityContext) GetSupplementalGroupsPolicy() SupplementalGroupsPolicy { + if m != nil { + return m.SupplementalGroupsPolicy + } + return SupplementalGroupsPolicy_Merge +} + func (m *LinuxContainerSecurityContext) GetNoNewPrivs() bool { if m != nil { return m.NoNewPrivs @@ -4241,6 +4307,70 @@ func (m *LinuxContainerConfig) GetSecurityContext() *LinuxContainerSecurityConte return nil } +type LinuxContainerUser struct { + // uid is the primary uid initially attached to the first process in the container + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + // gid is the primary gid initially attached to the first process in the container + Gid int64 `protobuf:"varint,2,opt,name=gid,proto3" json:"gid,omitempty"` + // supplemental_groups are the supplemental groups initially attached to the first process in the container + SupplementalGroups []int64 `protobuf:"varint,3,rep,packed,name=supplemental_groups,json=supplementalGroups,proto3" json:"supplemental_groups,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LinuxContainerUser) Reset() { *m = LinuxContainerUser{} } +func (*LinuxContainerUser) ProtoMessage() {} +func (*LinuxContainerUser) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{55} +} +func (m *LinuxContainerUser) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LinuxContainerUser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LinuxContainerUser.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LinuxContainerUser) XXX_Merge(src proto.Message) { + xxx_messageInfo_LinuxContainerUser.Merge(m, src) +} +func (m *LinuxContainerUser) XXX_Size() int { + return m.Size() +} +func (m *LinuxContainerUser) XXX_DiscardUnknown() { + xxx_messageInfo_LinuxContainerUser.DiscardUnknown(m) +} + +var xxx_messageInfo_LinuxContainerUser proto.InternalMessageInfo + +func (m *LinuxContainerUser) GetUid() int64 { + if m != nil { + return m.Uid + } + return 0 +} + +func (m *LinuxContainerUser) GetGid() int64 { + if m != nil { + return m.Gid + } + return 0 +} + +func (m *LinuxContainerUser) GetSupplementalGroups() []int64 { + if m != nil { + return m.SupplementalGroups + } + return nil +} + // WindowsNamespaceOption provides options for Windows namespaces. type WindowsNamespaceOption struct { // Network namespace for this container/sandbox. @@ -4253,7 +4383,7 @@ type WindowsNamespaceOption struct { func (m *WindowsNamespaceOption) Reset() { *m = WindowsNamespaceOption{} } func (*WindowsNamespaceOption) ProtoMessage() {} func (*WindowsNamespaceOption) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{55} + return fileDescriptor_00212fb1f9d3bf1c, []int{56} } func (m *WindowsNamespaceOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4310,7 +4440,7 @@ type WindowsSandboxSecurityContext struct { func (m *WindowsSandboxSecurityContext) Reset() { *m = WindowsSandboxSecurityContext{} } func (*WindowsSandboxSecurityContext) ProtoMessage() {} func (*WindowsSandboxSecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{56} + return fileDescriptor_00212fb1f9d3bf1c, []int{57} } func (m *WindowsSandboxSecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4379,7 +4509,7 @@ type WindowsPodSandboxConfig struct { func (m *WindowsPodSandboxConfig) Reset() { *m = WindowsPodSandboxConfig{} } func (*WindowsPodSandboxConfig) ProtoMessage() {} func (*WindowsPodSandboxConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{57} + return fileDescriptor_00212fb1f9d3bf1c, []int{58} } func (m *WindowsPodSandboxConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4432,7 +4562,7 @@ type WindowsContainerSecurityContext struct { func (m *WindowsContainerSecurityContext) Reset() { *m = WindowsContainerSecurityContext{} } func (*WindowsContainerSecurityContext) ProtoMessage() {} func (*WindowsContainerSecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{58} + return fileDescriptor_00212fb1f9d3bf1c, []int{59} } func (m *WindowsContainerSecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4496,7 +4626,7 @@ type WindowsContainerConfig struct { func (m *WindowsContainerConfig) Reset() { *m = WindowsContainerConfig{} } func (*WindowsContainerConfig) ProtoMessage() {} func (*WindowsContainerConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{59} + return fileDescriptor_00212fb1f9d3bf1c, []int{60} } func (m *WindowsContainerConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4559,7 +4689,7 @@ type WindowsContainerResources struct { func (m *WindowsContainerResources) Reset() { *m = WindowsContainerResources{} } func (*WindowsContainerResources) ProtoMessage() {} func (*WindowsContainerResources) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{60} + return fileDescriptor_00212fb1f9d3bf1c, []int{61} } func (m *WindowsContainerResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4640,7 +4770,7 @@ type ContainerMetadata struct { func (m *ContainerMetadata) Reset() { *m = ContainerMetadata{} } func (*ContainerMetadata) ProtoMessage() {} func (*ContainerMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{61} + return fileDescriptor_00212fb1f9d3bf1c, []int{62} } func (m *ContainerMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4701,7 +4831,7 @@ type Device struct { func (m *Device) Reset() { *m = Device{} } func (*Device) ProtoMessage() {} func (*Device) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{62} + return fileDescriptor_00212fb1f9d3bf1c, []int{63} } func (m *Device) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4765,7 +4895,7 @@ type CDIDevice struct { func (m *CDIDevice) Reset() { *m = CDIDevice{} } func (*CDIDevice) ProtoMessage() {} func (*CDIDevice) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{63} + return fileDescriptor_00212fb1f9d3bf1c, []int{64} } func (m *CDIDevice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4867,7 +4997,7 @@ type ContainerConfig struct { func (m *ContainerConfig) Reset() { *m = ContainerConfig{} } func (*ContainerConfig) ProtoMessage() {} func (*ContainerConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{64} + return fileDescriptor_00212fb1f9d3bf1c, []int{65} } func (m *ContainerConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5032,7 +5162,7 @@ type CreateContainerRequest struct { func (m *CreateContainerRequest) Reset() { *m = CreateContainerRequest{} } func (*CreateContainerRequest) ProtoMessage() {} func (*CreateContainerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{65} + return fileDescriptor_00212fb1f9d3bf1c, []int{66} } func (m *CreateContainerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5092,7 +5222,7 @@ type CreateContainerResponse struct { func (m *CreateContainerResponse) Reset() { *m = CreateContainerResponse{} } func (*CreateContainerResponse) ProtoMessage() {} func (*CreateContainerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{66} + return fileDescriptor_00212fb1f9d3bf1c, []int{67} } func (m *CreateContainerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5138,7 +5268,7 @@ type StartContainerRequest struct { func (m *StartContainerRequest) Reset() { *m = StartContainerRequest{} } func (*StartContainerRequest) ProtoMessage() {} func (*StartContainerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{67} + return fileDescriptor_00212fb1f9d3bf1c, []int{68} } func (m *StartContainerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5182,7 +5312,7 @@ type StartContainerResponse struct { func (m *StartContainerResponse) Reset() { *m = StartContainerResponse{} } func (*StartContainerResponse) ProtoMessage() {} func (*StartContainerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{68} + return fileDescriptor_00212fb1f9d3bf1c, []int{69} } func (m *StartContainerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5224,7 +5354,7 @@ type StopContainerRequest struct { func (m *StopContainerRequest) Reset() { *m = StopContainerRequest{} } func (*StopContainerRequest) ProtoMessage() {} func (*StopContainerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{69} + return fileDescriptor_00212fb1f9d3bf1c, []int{70} } func (m *StopContainerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5275,7 +5405,7 @@ type StopContainerResponse struct { func (m *StopContainerResponse) Reset() { *m = StopContainerResponse{} } func (*StopContainerResponse) ProtoMessage() {} func (*StopContainerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{70} + return fileDescriptor_00212fb1f9d3bf1c, []int{71} } func (m *StopContainerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5314,7 +5444,7 @@ type RemoveContainerRequest struct { func (m *RemoveContainerRequest) Reset() { *m = RemoveContainerRequest{} } func (*RemoveContainerRequest) ProtoMessage() {} func (*RemoveContainerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{71} + return fileDescriptor_00212fb1f9d3bf1c, []int{72} } func (m *RemoveContainerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5358,7 +5488,7 @@ type RemoveContainerResponse struct { func (m *RemoveContainerResponse) Reset() { *m = RemoveContainerResponse{} } func (*RemoveContainerResponse) ProtoMessage() {} func (*RemoveContainerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{72} + return fileDescriptor_00212fb1f9d3bf1c, []int{73} } func (m *RemoveContainerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5398,7 +5528,7 @@ type ContainerStateValue struct { func (m *ContainerStateValue) Reset() { *m = ContainerStateValue{} } func (*ContainerStateValue) ProtoMessage() {} func (*ContainerStateValue) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{73} + return fileDescriptor_00212fb1f9d3bf1c, []int{74} } func (m *ContainerStateValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5454,7 +5584,7 @@ type ContainerFilter struct { func (m *ContainerFilter) Reset() { *m = ContainerFilter{} } func (*ContainerFilter) ProtoMessage() {} func (*ContainerFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{74} + return fileDescriptor_00212fb1f9d3bf1c, []int{75} } func (m *ContainerFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5520,7 +5650,7 @@ type ListContainersRequest struct { func (m *ListContainersRequest) Reset() { *m = ListContainersRequest{} } func (*ListContainersRequest) ProtoMessage() {} func (*ListContainersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{75} + return fileDescriptor_00212fb1f9d3bf1c, []int{76} } func (m *ListContainersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5598,7 +5728,7 @@ type Container struct { func (m *Container) Reset() { *m = Container{} } func (*Container) ProtoMessage() {} func (*Container) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{76} + return fileDescriptor_00212fb1f9d3bf1c, []int{77} } func (m *Container) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5707,7 +5837,7 @@ type ListContainersResponse struct { func (m *ListContainersResponse) Reset() { *m = ListContainersResponse{} } func (*ListContainersResponse) ProtoMessage() {} func (*ListContainersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{77} + return fileDescriptor_00212fb1f9d3bf1c, []int{78} } func (m *ListContainersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5755,7 +5885,7 @@ type ContainerStatusRequest struct { func (m *ContainerStatusRequest) Reset() { *m = ContainerStatusRequest{} } func (*ContainerStatusRequest) ProtoMessage() {} func (*ContainerStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{78} + return fileDescriptor_00212fb1f9d3bf1c, []int{79} } func (m *ContainerStatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5844,15 +5974,17 @@ type ContainerStatus struct { // runtimes to reference images by digest. To separate and avoid possible // misusage, we now introduce the image_id field, which should always refer // to a unique image identifier on the node. - ImageId string `protobuf:"bytes,17,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + ImageId string `protobuf:"bytes,17,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"` + // User identities initially attached to the container + User *ContainerUser `protobuf:"bytes,18,opt,name=user,proto3" json:"user,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } func (*ContainerStatus) ProtoMessage() {} func (*ContainerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{79} + return fileDescriptor_00212fb1f9d3bf1c, []int{80} } func (m *ContainerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6000,6 +6132,13 @@ func (m *ContainerStatus) GetImageId() string { return "" } +func (m *ContainerStatus) GetUser() *ContainerUser { + if m != nil { + return m.User + } + return nil +} + type ContainerStatusResponse struct { // Status of the container. Status *ContainerStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` @@ -6015,7 +6154,7 @@ type ContainerStatusResponse struct { func (m *ContainerStatusResponse) Reset() { *m = ContainerStatusResponse{} } func (*ContainerStatusResponse) ProtoMessage() {} func (*ContainerStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{80} + return fileDescriptor_00212fb1f9d3bf1c, []int{81} } func (m *ContainerStatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6071,7 +6210,7 @@ type ContainerResources struct { func (m *ContainerResources) Reset() { *m = ContainerResources{} } func (*ContainerResources) ProtoMessage() {} func (*ContainerResources) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{81} + return fileDescriptor_00212fb1f9d3bf1c, []int{82} } func (m *ContainerResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6114,6 +6253,53 @@ func (m *ContainerResources) GetWindows() *WindowsContainerResources { return nil } +type ContainerUser struct { + // User identities initially attached to first process in the Linux container. + // Note that the actual running identity can be changed if the process has enough privilege to do so. + Linux *LinuxContainerUser `protobuf:"bytes,1,opt,name=linux,proto3" json:"linux,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainerUser) Reset() { *m = ContainerUser{} } +func (*ContainerUser) ProtoMessage() {} +func (*ContainerUser) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{83} +} +func (m *ContainerUser) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainerUser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainerUser.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ContainerUser) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainerUser.Merge(m, src) +} +func (m *ContainerUser) XXX_Size() int { + return m.Size() +} +func (m *ContainerUser) XXX_DiscardUnknown() { + xxx_messageInfo_ContainerUser.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainerUser proto.InternalMessageInfo + +func (m *ContainerUser) GetLinux() *LinuxContainerUser { + if m != nil { + return m.Linux + } + return nil +} + type UpdateContainerResourcesRequest struct { // ID of the container to update. ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` @@ -6132,7 +6318,7 @@ type UpdateContainerResourcesRequest struct { func (m *UpdateContainerResourcesRequest) Reset() { *m = UpdateContainerResourcesRequest{} } func (*UpdateContainerResourcesRequest) ProtoMessage() {} func (*UpdateContainerResourcesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{82} + return fileDescriptor_00212fb1f9d3bf1c, []int{84} } func (m *UpdateContainerResourcesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6197,7 +6383,7 @@ type UpdateContainerResourcesResponse struct { func (m *UpdateContainerResourcesResponse) Reset() { *m = UpdateContainerResourcesResponse{} } func (*UpdateContainerResourcesResponse) ProtoMessage() {} func (*UpdateContainerResourcesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{83} + return fileDescriptor_00212fb1f9d3bf1c, []int{85} } func (m *UpdateContainerResourcesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6240,7 +6426,7 @@ type ExecSyncRequest struct { func (m *ExecSyncRequest) Reset() { *m = ExecSyncRequest{} } func (*ExecSyncRequest) ProtoMessage() {} func (*ExecSyncRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{84} + return fileDescriptor_00212fb1f9d3bf1c, []int{86} } func (m *ExecSyncRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6312,7 +6498,7 @@ type ExecSyncResponse struct { func (m *ExecSyncResponse) Reset() { *m = ExecSyncResponse{} } func (*ExecSyncResponse) ProtoMessage() {} func (*ExecSyncResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{85} + return fileDescriptor_00212fb1f9d3bf1c, []int{87} } func (m *ExecSyncResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6388,7 +6574,7 @@ type ExecRequest struct { func (m *ExecRequest) Reset() { *m = ExecRequest{} } func (*ExecRequest) ProtoMessage() {} func (*ExecRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{86} + return fileDescriptor_00212fb1f9d3bf1c, []int{88} } func (m *ExecRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6469,7 +6655,7 @@ type ExecResponse struct { func (m *ExecResponse) Reset() { *m = ExecResponse{} } func (*ExecResponse) ProtoMessage() {} func (*ExecResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{87} + return fileDescriptor_00212fb1f9d3bf1c, []int{89} } func (m *ExecResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6530,7 +6716,7 @@ type AttachRequest struct { func (m *AttachRequest) Reset() { *m = AttachRequest{} } func (*AttachRequest) ProtoMessage() {} func (*AttachRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{88} + return fileDescriptor_00212fb1f9d3bf1c, []int{90} } func (m *AttachRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6604,7 +6790,7 @@ type AttachResponse struct { func (m *AttachResponse) Reset() { *m = AttachResponse{} } func (*AttachResponse) ProtoMessage() {} func (*AttachResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{89} + return fileDescriptor_00212fb1f9d3bf1c, []int{91} } func (m *AttachResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6652,7 +6838,7 @@ type PortForwardRequest struct { func (m *PortForwardRequest) Reset() { *m = PortForwardRequest{} } func (*PortForwardRequest) ProtoMessage() {} func (*PortForwardRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{90} + return fileDescriptor_00212fb1f9d3bf1c, []int{92} } func (m *PortForwardRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6705,7 +6891,7 @@ type PortForwardResponse struct { func (m *PortForwardResponse) Reset() { *m = PortForwardResponse{} } func (*PortForwardResponse) ProtoMessage() {} func (*PortForwardResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{91} + return fileDescriptor_00212fb1f9d3bf1c, []int{93} } func (m *PortForwardResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6751,7 +6937,7 @@ type ImageFilter struct { func (m *ImageFilter) Reset() { *m = ImageFilter{} } func (*ImageFilter) ProtoMessage() {} func (*ImageFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{92} + return fileDescriptor_00212fb1f9d3bf1c, []int{94} } func (m *ImageFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6797,7 +6983,7 @@ type ListImagesRequest struct { func (m *ListImagesRequest) Reset() { *m = ListImagesRequest{} } func (*ListImagesRequest) ProtoMessage() {} func (*ListImagesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{93} + return fileDescriptor_00212fb1f9d3bf1c, []int{95} } func (m *ListImagesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6863,7 +7049,7 @@ type Image struct { func (m *Image) Reset() { *m = Image{} } func (*Image) ProtoMessage() {} func (*Image) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{94} + return fileDescriptor_00212fb1f9d3bf1c, []int{96} } func (m *Image) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6958,7 +7144,7 @@ type ListImagesResponse struct { func (m *ListImagesResponse) Reset() { *m = ListImagesResponse{} } func (*ListImagesResponse) ProtoMessage() {} func (*ListImagesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{95} + return fileDescriptor_00212fb1f9d3bf1c, []int{97} } func (m *ListImagesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7006,7 +7192,7 @@ type ImageStatusRequest struct { func (m *ImageStatusRequest) Reset() { *m = ImageStatusRequest{} } func (*ImageStatusRequest) ProtoMessage() {} func (*ImageStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{96} + return fileDescriptor_00212fb1f9d3bf1c, []int{98} } func (m *ImageStatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7064,7 +7250,7 @@ type ImageStatusResponse struct { func (m *ImageStatusResponse) Reset() { *m = ImageStatusResponse{} } func (*ImageStatusResponse) ProtoMessage() {} func (*ImageStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{97} + return fileDescriptor_00212fb1f9d3bf1c, []int{99} } func (m *ImageStatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7125,7 +7311,7 @@ type AuthConfig struct { func (m *AuthConfig) Reset() { *m = AuthConfig{} } func (*AuthConfig) ProtoMessage() {} func (*AuthConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{98} + return fileDescriptor_00212fb1f9d3bf1c, []int{100} } func (m *AuthConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7210,7 +7396,7 @@ type PullImageRequest struct { func (m *PullImageRequest) Reset() { *m = PullImageRequest{} } func (*PullImageRequest) ProtoMessage() {} func (*PullImageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{99} + return fileDescriptor_00212fb1f9d3bf1c, []int{101} } func (m *PullImageRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7271,7 +7457,7 @@ type PullImageResponse struct { func (m *PullImageResponse) Reset() { *m = PullImageResponse{} } func (*PullImageResponse) ProtoMessage() {} func (*PullImageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{100} + return fileDescriptor_00212fb1f9d3bf1c, []int{102} } func (m *PullImageResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7317,7 +7503,7 @@ type RemoveImageRequest struct { func (m *RemoveImageRequest) Reset() { *m = RemoveImageRequest{} } func (*RemoveImageRequest) ProtoMessage() {} func (*RemoveImageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{101} + return fileDescriptor_00212fb1f9d3bf1c, []int{103} } func (m *RemoveImageRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7361,7 +7547,7 @@ type RemoveImageResponse struct { func (m *RemoveImageResponse) Reset() { *m = RemoveImageResponse{} } func (*RemoveImageResponse) ProtoMessage() {} func (*RemoveImageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{102} + return fileDescriptor_00212fb1f9d3bf1c, []int{104} } func (m *RemoveImageResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7401,7 +7587,7 @@ type NetworkConfig struct { func (m *NetworkConfig) Reset() { *m = NetworkConfig{} } func (*NetworkConfig) ProtoMessage() {} func (*NetworkConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{103} + return fileDescriptor_00212fb1f9d3bf1c, []int{105} } func (m *NetworkConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7446,7 +7632,7 @@ type RuntimeConfig struct { func (m *RuntimeConfig) Reset() { *m = RuntimeConfig{} } func (*RuntimeConfig) ProtoMessage() {} func (*RuntimeConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{104} + return fileDescriptor_00212fb1f9d3bf1c, []int{106} } func (m *RuntimeConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7491,7 +7677,7 @@ type UpdateRuntimeConfigRequest struct { func (m *UpdateRuntimeConfigRequest) Reset() { *m = UpdateRuntimeConfigRequest{} } func (*UpdateRuntimeConfigRequest) ProtoMessage() {} func (*UpdateRuntimeConfigRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{105} + return fileDescriptor_00212fb1f9d3bf1c, []int{107} } func (m *UpdateRuntimeConfigRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7535,7 +7721,7 @@ type UpdateRuntimeConfigResponse struct { func (m *UpdateRuntimeConfigResponse) Reset() { *m = UpdateRuntimeConfigResponse{} } func (*UpdateRuntimeConfigResponse) ProtoMessage() {} func (*UpdateRuntimeConfigResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{106} + return fileDescriptor_00212fb1f9d3bf1c, []int{108} } func (m *UpdateRuntimeConfigResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7594,7 +7780,7 @@ type RuntimeCondition struct { func (m *RuntimeCondition) Reset() { *m = RuntimeCondition{} } func (*RuntimeCondition) ProtoMessage() {} func (*RuntimeCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{107} + return fileDescriptor_00212fb1f9d3bf1c, []int{109} } func (m *RuntimeCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7662,7 +7848,7 @@ type RuntimeStatus struct { func (m *RuntimeStatus) Reset() { *m = RuntimeStatus{} } func (*RuntimeStatus) ProtoMessage() {} func (*RuntimeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{108} + return fileDescriptor_00212fb1f9d3bf1c, []int{110} } func (m *RuntimeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7708,7 +7894,7 @@ type StatusRequest struct { func (m *StatusRequest) Reset() { *m = StatusRequest{} } func (*StatusRequest) ProtoMessage() {} func (*StatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{109} + return fileDescriptor_00212fb1f9d3bf1c, []int{111} } func (m *StatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7744,6 +7930,7 @@ func (m *StatusRequest) GetVerbose() bool { return false } +// RuntimeHandlerFeatures is a set of features implemented by the runtime handler. type RuntimeHandlerFeatures struct { // recursive_read_only_mounts is set to true if the runtime handler supports // recursive read-only mounts. @@ -7760,7 +7947,7 @@ type RuntimeHandlerFeatures struct { func (m *RuntimeHandlerFeatures) Reset() { *m = RuntimeHandlerFeatures{} } func (*RuntimeHandlerFeatures) ProtoMessage() {} func (*RuntimeHandlerFeatures) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{110} + return fileDescriptor_00212fb1f9d3bf1c, []int{112} } func (m *RuntimeHandlerFeatures) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7816,7 +8003,7 @@ type RuntimeHandler struct { func (m *RuntimeHandler) Reset() { *m = RuntimeHandler{} } func (*RuntimeHandler) ProtoMessage() {} func (*RuntimeHandler) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{111} + return fileDescriptor_00212fb1f9d3bf1c, []int{113} } func (m *RuntimeHandler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7859,6 +8046,55 @@ func (m *RuntimeHandler) GetFeatures() *RuntimeHandlerFeatures { return nil } +// RuntimeFeatures describes the set of features implemented by the CRI implementation. +// The features contained in the RuntimeFeatures should depend only on the cri implementation +// independent of runtime handlers. +type RuntimeFeatures struct { + // supplemental_groups_policy is set to true if the runtime supports SupplementalGroupsPolicy and ContainerUser. + SupplementalGroupsPolicy bool `protobuf:"varint,1,opt,name=supplemental_groups_policy,json=supplementalGroupsPolicy,proto3" json:"supplemental_groups_policy,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RuntimeFeatures) Reset() { *m = RuntimeFeatures{} } +func (*RuntimeFeatures) ProtoMessage() {} +func (*RuntimeFeatures) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{114} +} +func (m *RuntimeFeatures) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RuntimeFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RuntimeFeatures.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RuntimeFeatures) XXX_Merge(src proto.Message) { + xxx_messageInfo_RuntimeFeatures.Merge(m, src) +} +func (m *RuntimeFeatures) XXX_Size() int { + return m.Size() +} +func (m *RuntimeFeatures) XXX_DiscardUnknown() { + xxx_messageInfo_RuntimeFeatures.DiscardUnknown(m) +} + +var xxx_messageInfo_RuntimeFeatures proto.InternalMessageInfo + +func (m *RuntimeFeatures) GetSupplementalGroupsPolicy() bool { + if m != nil { + return m.SupplementalGroupsPolicy + } + return false +} + type StatusResponse struct { // Status of the Runtime. Status *RuntimeStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` @@ -7868,15 +8104,18 @@ type StatusResponse struct { // It should only be returned non-empty when Verbose is true. Info map[string]string `protobuf:"bytes,2,rep,name=info,proto3" json:"info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Runtime handlers. - RuntimeHandlers []*RuntimeHandler `protobuf:"bytes,3,rep,name=runtime_handlers,json=runtimeHandlers,proto3" json:"runtime_handlers,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + RuntimeHandlers []*RuntimeHandler `protobuf:"bytes,3,rep,name=runtime_handlers,json=runtimeHandlers,proto3" json:"runtime_handlers,omitempty"` + // features describes the set of features implemented by the CRI implementation. + // This field is supposed to propagate to NodeFeatures in Kubernetes API. + Features *RuntimeFeatures `protobuf:"bytes,4,opt,name=features,proto3" json:"features,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *StatusResponse) Reset() { *m = StatusResponse{} } func (*StatusResponse) ProtoMessage() {} func (*StatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{112} + return fileDescriptor_00212fb1f9d3bf1c, []int{115} } func (m *StatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7926,6 +8165,13 @@ func (m *StatusResponse) GetRuntimeHandlers() []*RuntimeHandler { return nil } +func (m *StatusResponse) GetFeatures() *RuntimeFeatures { + if m != nil { + return m.Features + } + return nil +} + type ImageFsInfoRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` @@ -7934,7 +8180,7 @@ type ImageFsInfoRequest struct { func (m *ImageFsInfoRequest) Reset() { *m = ImageFsInfoRequest{} } func (*ImageFsInfoRequest) ProtoMessage() {} func (*ImageFsInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{113} + return fileDescriptor_00212fb1f9d3bf1c, []int{116} } func (m *ImageFsInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -7974,7 +8220,7 @@ type UInt64Value struct { func (m *UInt64Value) Reset() { *m = UInt64Value{} } func (*UInt64Value) ProtoMessage() {} func (*UInt64Value) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{114} + return fileDescriptor_00212fb1f9d3bf1c, []int{117} } func (m *UInt64Value) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8021,7 +8267,7 @@ type FilesystemIdentifier struct { func (m *FilesystemIdentifier) Reset() { *m = FilesystemIdentifier{} } func (*FilesystemIdentifier) ProtoMessage() {} func (*FilesystemIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{115} + return fileDescriptor_00212fb1f9d3bf1c, []int{118} } func (m *FilesystemIdentifier) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8078,7 +8324,7 @@ type FilesystemUsage struct { func (m *FilesystemUsage) Reset() { *m = FilesystemUsage{} } func (*FilesystemUsage) ProtoMessage() {} func (*FilesystemUsage) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{116} + return fileDescriptor_00212fb1f9d3bf1c, []int{119} } func (m *FilesystemUsage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8152,7 +8398,7 @@ type WindowsFilesystemUsage struct { func (m *WindowsFilesystemUsage) Reset() { *m = WindowsFilesystemUsage{} } func (*WindowsFilesystemUsage) ProtoMessage() {} func (*WindowsFilesystemUsage) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{117} + return fileDescriptor_00212fb1f9d3bf1c, []int{120} } func (m *WindowsFilesystemUsage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8217,7 +8463,7 @@ type ImageFsInfoResponse struct { func (m *ImageFsInfoResponse) Reset() { *m = ImageFsInfoResponse{} } func (*ImageFsInfoResponse) ProtoMessage() {} func (*ImageFsInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{118} + return fileDescriptor_00212fb1f9d3bf1c, []int{121} } func (m *ImageFsInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8270,7 +8516,7 @@ type ContainerStatsRequest struct { func (m *ContainerStatsRequest) Reset() { *m = ContainerStatsRequest{} } func (*ContainerStatsRequest) ProtoMessage() {} func (*ContainerStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{119} + return fileDescriptor_00212fb1f9d3bf1c, []int{122} } func (m *ContainerStatsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8316,7 +8562,7 @@ type ContainerStatsResponse struct { func (m *ContainerStatsResponse) Reset() { *m = ContainerStatsResponse{} } func (*ContainerStatsResponse) ProtoMessage() {} func (*ContainerStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{120} + return fileDescriptor_00212fb1f9d3bf1c, []int{123} } func (m *ContainerStatsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8362,7 +8608,7 @@ type ListContainerStatsRequest struct { func (m *ListContainerStatsRequest) Reset() { *m = ListContainerStatsRequest{} } func (*ListContainerStatsRequest) ProtoMessage() {} func (*ListContainerStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{121} + return fileDescriptor_00212fb1f9d3bf1c, []int{124} } func (m *ListContainerStatsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8416,7 +8662,7 @@ type ContainerStatsFilter struct { func (m *ContainerStatsFilter) Reset() { *m = ContainerStatsFilter{} } func (*ContainerStatsFilter) ProtoMessage() {} func (*ContainerStatsFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{122} + return fileDescriptor_00212fb1f9d3bf1c, []int{125} } func (m *ContainerStatsFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8476,7 +8722,7 @@ type ListContainerStatsResponse struct { func (m *ListContainerStatsResponse) Reset() { *m = ListContainerStatsResponse{} } func (*ListContainerStatsResponse) ProtoMessage() {} func (*ListContainerStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{123} + return fileDescriptor_00212fb1f9d3bf1c, []int{126} } func (m *ListContainerStatsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8532,7 +8778,7 @@ type ContainerAttributes struct { func (m *ContainerAttributes) Reset() { *m = ContainerAttributes{} } func (*ContainerAttributes) ProtoMessage() {} func (*ContainerAttributes) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{124} + return fileDescriptor_00212fb1f9d3bf1c, []int{127} } func (m *ContainerAttributes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8608,7 +8854,7 @@ type ContainerStats struct { func (m *ContainerStats) Reset() { *m = ContainerStats{} } func (*ContainerStats) ProtoMessage() {} func (*ContainerStats) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{125} + return fileDescriptor_00212fb1f9d3bf1c, []int{128} } func (m *ContainerStats) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8689,7 +8935,7 @@ type WindowsContainerStats struct { func (m *WindowsContainerStats) Reset() { *m = WindowsContainerStats{} } func (*WindowsContainerStats) ProtoMessage() {} func (*WindowsContainerStats) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{126} + return fileDescriptor_00212fb1f9d3bf1c, []int{129} } func (m *WindowsContainerStats) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8762,7 +9008,7 @@ type CpuUsage struct { func (m *CpuUsage) Reset() { *m = CpuUsage{} } func (*CpuUsage) ProtoMessage() {} func (*CpuUsage) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{127} + return fileDescriptor_00212fb1f9d3bf1c, []int{130} } func (m *CpuUsage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8828,7 +9074,7 @@ type WindowsCpuUsage struct { func (m *WindowsCpuUsage) Reset() { *m = WindowsCpuUsage{} } func (*WindowsCpuUsage) ProtoMessage() {} func (*WindowsCpuUsage) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{128} + return fileDescriptor_00212fb1f9d3bf1c, []int{131} } func (m *WindowsCpuUsage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8901,7 +9147,7 @@ type MemoryUsage struct { func (m *MemoryUsage) Reset() { *m = MemoryUsage{} } func (*MemoryUsage) ProtoMessage() {} func (*MemoryUsage) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{129} + return fileDescriptor_00212fb1f9d3bf1c, []int{132} } func (m *MemoryUsage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -8993,7 +9239,7 @@ type SwapUsage struct { func (m *SwapUsage) Reset() { *m = SwapUsage{} } func (*SwapUsage) ProtoMessage() {} func (*SwapUsage) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{130} + return fileDescriptor_00212fb1f9d3bf1c, []int{133} } func (m *SwapUsage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9062,7 +9308,7 @@ type WindowsMemoryUsage struct { func (m *WindowsMemoryUsage) Reset() { *m = WindowsMemoryUsage{} } func (*WindowsMemoryUsage) ProtoMessage() {} func (*WindowsMemoryUsage) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{131} + return fileDescriptor_00212fb1f9d3bf1c, []int{134} } func (m *WindowsMemoryUsage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9136,7 +9382,7 @@ type ReopenContainerLogRequest struct { func (m *ReopenContainerLogRequest) Reset() { *m = ReopenContainerLogRequest{} } func (*ReopenContainerLogRequest) ProtoMessage() {} func (*ReopenContainerLogRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{132} + return fileDescriptor_00212fb1f9d3bf1c, []int{135} } func (m *ReopenContainerLogRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9180,7 +9426,7 @@ type ReopenContainerLogResponse struct { func (m *ReopenContainerLogResponse) Reset() { *m = ReopenContainerLogResponse{} } func (*ReopenContainerLogResponse) ProtoMessage() {} func (*ReopenContainerLogResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{133} + return fileDescriptor_00212fb1f9d3bf1c, []int{136} } func (m *ReopenContainerLogResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9225,7 +9471,7 @@ type CheckpointContainerRequest struct { func (m *CheckpointContainerRequest) Reset() { *m = CheckpointContainerRequest{} } func (*CheckpointContainerRequest) ProtoMessage() {} func (*CheckpointContainerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{134} + return fileDescriptor_00212fb1f9d3bf1c, []int{137} } func (m *CheckpointContainerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9283,7 +9529,7 @@ type CheckpointContainerResponse struct { func (m *CheckpointContainerResponse) Reset() { *m = CheckpointContainerResponse{} } func (*CheckpointContainerResponse) ProtoMessage() {} func (*CheckpointContainerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{135} + return fileDescriptor_00212fb1f9d3bf1c, []int{138} } func (m *CheckpointContainerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9320,7 +9566,7 @@ type GetEventsRequest struct { func (m *GetEventsRequest) Reset() { *m = GetEventsRequest{} } func (*GetEventsRequest) ProtoMessage() {} func (*GetEventsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{136} + return fileDescriptor_00212fb1f9d3bf1c, []int{139} } func (m *GetEventsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9367,7 +9613,7 @@ type ContainerEventResponse struct { func (m *ContainerEventResponse) Reset() { *m = ContainerEventResponse{} } func (*ContainerEventResponse) ProtoMessage() {} func (*ContainerEventResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{137} + return fileDescriptor_00212fb1f9d3bf1c, []int{140} } func (m *ContainerEventResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9439,7 +9685,7 @@ type ListMetricDescriptorsRequest struct { func (m *ListMetricDescriptorsRequest) Reset() { *m = ListMetricDescriptorsRequest{} } func (*ListMetricDescriptorsRequest) ProtoMessage() {} func (*ListMetricDescriptorsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{138} + return fileDescriptor_00212fb1f9d3bf1c, []int{141} } func (m *ListMetricDescriptorsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9477,7 +9723,7 @@ type ListMetricDescriptorsResponse struct { func (m *ListMetricDescriptorsResponse) Reset() { *m = ListMetricDescriptorsResponse{} } func (*ListMetricDescriptorsResponse) ProtoMessage() {} func (*ListMetricDescriptorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{139} + return fileDescriptor_00212fb1f9d3bf1c, []int{142} } func (m *ListMetricDescriptorsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9530,7 +9776,7 @@ type MetricDescriptor struct { func (m *MetricDescriptor) Reset() { *m = MetricDescriptor{} } func (*MetricDescriptor) ProtoMessage() {} func (*MetricDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{140} + return fileDescriptor_00212fb1f9d3bf1c, []int{143} } func (m *MetricDescriptor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9588,7 +9834,7 @@ type ListPodSandboxMetricsRequest struct { func (m *ListPodSandboxMetricsRequest) Reset() { *m = ListPodSandboxMetricsRequest{} } func (*ListPodSandboxMetricsRequest) ProtoMessage() {} func (*ListPodSandboxMetricsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{141} + return fileDescriptor_00212fb1f9d3bf1c, []int{144} } func (m *ListPodSandboxMetricsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9626,7 +9872,7 @@ type ListPodSandboxMetricsResponse struct { func (m *ListPodSandboxMetricsResponse) Reset() { *m = ListPodSandboxMetricsResponse{} } func (*ListPodSandboxMetricsResponse) ProtoMessage() {} func (*ListPodSandboxMetricsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{142} + return fileDescriptor_00212fb1f9d3bf1c, []int{145} } func (m *ListPodSandboxMetricsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9673,7 +9919,7 @@ type PodSandboxMetrics struct { func (m *PodSandboxMetrics) Reset() { *m = PodSandboxMetrics{} } func (*PodSandboxMetrics) ProtoMessage() {} func (*PodSandboxMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{143} + return fileDescriptor_00212fb1f9d3bf1c, []int{146} } func (m *PodSandboxMetrics) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9733,7 +9979,7 @@ type ContainerMetrics struct { func (m *ContainerMetrics) Reset() { *m = ContainerMetrics{} } func (*ContainerMetrics) ProtoMessage() {} func (*ContainerMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{144} + return fileDescriptor_00212fb1f9d3bf1c, []int{147} } func (m *ContainerMetrics) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9796,7 +10042,7 @@ type Metric struct { func (m *Metric) Reset() { *m = Metric{} } func (*Metric) ProtoMessage() {} func (*Metric) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{145} + return fileDescriptor_00212fb1f9d3bf1c, []int{148} } func (m *Metric) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9868,7 +10114,7 @@ type RuntimeConfigRequest struct { func (m *RuntimeConfigRequest) Reset() { *m = RuntimeConfigRequest{} } func (*RuntimeConfigRequest) ProtoMessage() {} func (*RuntimeConfigRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{146} + return fileDescriptor_00212fb1f9d3bf1c, []int{149} } func (m *RuntimeConfigRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9909,7 +10155,7 @@ type RuntimeConfigResponse struct { func (m *RuntimeConfigResponse) Reset() { *m = RuntimeConfigResponse{} } func (*RuntimeConfigResponse) ProtoMessage() {} func (*RuntimeConfigResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{147} + return fileDescriptor_00212fb1f9d3bf1c, []int{150} } func (m *RuntimeConfigResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -9961,7 +10207,7 @@ type LinuxRuntimeConfiguration struct { func (m *LinuxRuntimeConfiguration) Reset() { *m = LinuxRuntimeConfiguration{} } func (*LinuxRuntimeConfiguration) ProtoMessage() {} func (*LinuxRuntimeConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{148} + return fileDescriptor_00212fb1f9d3bf1c, []int{151} } func (m *LinuxRuntimeConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -10001,6 +10247,7 @@ func init() { proto.RegisterEnum("runtime.v1.Protocol", Protocol_name, Protocol_value) proto.RegisterEnum("runtime.v1.MountPropagation", MountPropagation_name, MountPropagation_value) proto.RegisterEnum("runtime.v1.NamespaceMode", NamespaceMode_name, NamespaceMode_value) + proto.RegisterEnum("runtime.v1.SupplementalGroupsPolicy", SupplementalGroupsPolicy_name, SupplementalGroupsPolicy_value) proto.RegisterEnum("runtime.v1.PodSandboxState", PodSandboxState_name, PodSandboxState_value) proto.RegisterEnum("runtime.v1.ContainerState", ContainerState_name, ContainerState_value) proto.RegisterEnum("runtime.v1.ContainerEventType", ContainerEventType_name, ContainerEventType_value) @@ -10076,6 +10323,7 @@ func init() { proto.RegisterType((*Capability)(nil), "runtime.v1.Capability") proto.RegisterType((*LinuxContainerSecurityContext)(nil), "runtime.v1.LinuxContainerSecurityContext") proto.RegisterType((*LinuxContainerConfig)(nil), "runtime.v1.LinuxContainerConfig") + proto.RegisterType((*LinuxContainerUser)(nil), "runtime.v1.LinuxContainerUser") proto.RegisterType((*WindowsNamespaceOption)(nil), "runtime.v1.WindowsNamespaceOption") proto.RegisterType((*WindowsSandboxSecurityContext)(nil), "runtime.v1.WindowsSandboxSecurityContext") proto.RegisterType((*WindowsPodSandboxConfig)(nil), "runtime.v1.WindowsPodSandboxConfig") @@ -10111,6 +10359,7 @@ func init() { proto.RegisterType((*ContainerStatusResponse)(nil), "runtime.v1.ContainerStatusResponse") proto.RegisterMapType((map[string]string)(nil), "runtime.v1.ContainerStatusResponse.InfoEntry") proto.RegisterType((*ContainerResources)(nil), "runtime.v1.ContainerResources") + proto.RegisterType((*ContainerUser)(nil), "runtime.v1.ContainerUser") proto.RegisterType((*UpdateContainerResourcesRequest)(nil), "runtime.v1.UpdateContainerResourcesRequest") proto.RegisterMapType((map[string]string)(nil), "runtime.v1.UpdateContainerResourcesRequest.AnnotationsEntry") proto.RegisterType((*UpdateContainerResourcesResponse)(nil), "runtime.v1.UpdateContainerResourcesResponse") @@ -10143,6 +10392,7 @@ func init() { proto.RegisterType((*StatusRequest)(nil), "runtime.v1.StatusRequest") proto.RegisterType((*RuntimeHandlerFeatures)(nil), "runtime.v1.RuntimeHandlerFeatures") proto.RegisterType((*RuntimeHandler)(nil), "runtime.v1.RuntimeHandler") + proto.RegisterType((*RuntimeFeatures)(nil), "runtime.v1.RuntimeFeatures") proto.RegisterType((*StatusResponse)(nil), "runtime.v1.StatusResponse") proto.RegisterMapType((map[string]string)(nil), "runtime.v1.StatusResponse.InfoEntry") proto.RegisterType((*ImageFsInfoRequest)(nil), "runtime.v1.ImageFsInfoRequest") @@ -10189,443 +10439,453 @@ func init() { func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 6961 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5d, 0x4b, 0x6c, 0x24, 0x49, - 0x5a, 0x76, 0x56, 0x95, 0xed, 0xaa, 0xbf, 0x5c, 0x76, 0x39, 0xda, 0x6d, 0xbb, 0xab, 0xdf, 0x39, - 0xaf, 0xee, 0x9e, 0xe9, 0xc7, 0xf4, 0xbc, 0xba, 0x7b, 0x5e, 0x5d, 0x6d, 0xbb, 0x7b, 0x6a, 0xb6, - 0xdb, 0xae, 0xcd, 0xb2, 0x67, 0x77, 0x66, 0xd1, 0x26, 0xd9, 0x95, 0xe1, 0x72, 0x4e, 0x57, 0x65, - 0xe6, 0x66, 0x66, 0xb9, 0xdb, 0x7b, 0x40, 0x9c, 0x10, 0xec, 0x69, 0x25, 0x58, 0x21, 0x56,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, 0x50, 0xb5, - 0xac, 0x9e, 0x57, 0x13, 0xea, 0x39, 0x93, 0xc1, 0x91, 0xa5, 0xa5, 0x9b, 0x49, 0x2d, 0x9d, 0xcd, - 0x60, 0xcc, 0x56, 0xd6, 0xcd, 0xa4, 0xb2, 0xb2, 0x58, 0xb3, 0x75, 0xd6, 0xcc, 0xd0, 0xd9, 0xf9, - 0xac, 0x36, 0xe6, 0xab, 0xee, 0xaf, 0x14, 0x98, 0x8b, 0xd7, 0x4b, 0x0e, 0x59, 0x95, 0x44, 0xc8, - 0x8a, 0x36, 0x61, 0xd1, 0x64, 0x3b, 0xb7, 0xba, 0x65, 0x07, 0xd8, 0xdb, 0x35, 0xba, 0x22, 0x2a, - 0x3c, 0x9f, 0x61, 0x17, 0x2d, 0x41, 0xc3, 0x2a, 0x5e, 0xe7, 0xbc, 0x61, 0x32, 0x69, 0x41, 0x28, - 0x47, 0x78, 0xad, 0x09, 0x04, 0xc5, 0x98, 0xd4, 0x7f, 0x52, 0xe0, 0x58, 0x86, 0x82, 0xc7, 0x34, - 0x64, 0x27, 0xbf, 0x21, 0x17, 0xf2, 0xbb, 0x6e, 0x6c, 0x7b, 0xde, 0xc9, 0x68, 0xcf, 0xe4, 0xf2, - 0xe2, 0xcd, 0xfa, 0xa9, 0x02, 0xc7, 0x33, 0xa9, 0x32, 0xb7, 0x57, 0xaf, 0x43, 0xd9, 0x7b, 0xa2, - 0x3f, 0x3c, 0x08, 0xb0, 0x9f, 0x35, 0xb0, 0x77, 0x62, 0x67, 0x28, 0xb3, 0xde, 0x93, 0x3b, 0x84, - 0x0e, 0xbd, 0x0c, 0x15, 0xef, 0x89, 0x8e, 0x3d, 0xcf, 0xf1, 0x84, 0x2f, 0xca, 0x65, 0x2a, 0x7b, - 0x4f, 0x36, 0x28, 0x21, 0x29, 0x29, 0x10, 0x25, 0x95, 0xc6, 0x94, 0x14, 0x44, 0x25, 0x05, 0x61, - 0x49, 0xd3, 0x63, 0x4a, 0x0a, 0x78,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0x66, 0x14, 0x9d, 0xc7, 0x86, 0x1b, 0xd7, 0x58, 0xe3, 0x16, 0xcc, 0xc5, 0x85, 0x1e, - 0xca, 0x96, 0xee, 0x40, 0x4d, 0x6a, 0x24, 0xe9, 0x6d, 0xaa, 0x14, 0xdf, 0xfa, 0xba, 0x18, 0x5b, - 0x65, 0x92, 0xd0, 0xb1, 0xbe, 0x4e, 0x31, 0x0a, 0xb4, 0x66, 0x54, 0x4e, 0x49, 0x63, 0x1f, 0xaa, - 0x01, 0x35, 0x09, 0x16, 0x40, 0x5c, 0x32, 0x3d, 0xff, 0xe7, 0x2e, 0x99, 0xfc, 0x26, 0x69, 0x9e, - 0xd3, 0x17, 0x35, 0xa0, 0xbf, 0x49, 0x1a, 0x3d, 0x80, 0x66, 0xc7, 0x69, 0xf4, 0x37, 0x2d, 0x02, - 0xef, 0x73, 0x3c, 0x50, 0x45, 0x63, 0x1f, 0xea, 0x6f, 0x29, 0x00, 0x6b, 0x86, 0x6b, 0x3c, 0xb4, - 0xfa, 0x56, 0x70, 0x80, 0x2e, 0x42, 0xdd, 0x30, 0x4d, 0xbd, 0x2b, 0x52, 0x2c, 0x2c, 0x00, 0x5a, - 0x0b, 0x86, 0x69, 0xae, 0xc5, 0x92, 0xd1, 0xf3, 0xb0, 0x48, 0x1c, 0xaa, 0x4c, 0xcb, 0x10, 0x5b, - 0x75, 0x92, 0x21, 0x11, 0xdf, 0x80, 0x55, 0x22, 0xd7, 0x18, 0x3c, 0xb4, 0xb0, 0x1d, 0xc8, 0x3c, - 0x0c, 0xca, 0xb5, 0x6c, 0x98, 0x66, 0x93, 0x65, 0xc7, 0x39, 0xd5, 0xbf, 0x9c, 0x81, 0xd3, 0x72, - 0x8f, 0x27, 0x91, 0x1a, 0xb7, 0x60, 0x2e, 0x51, 0xdf, 0x14, 0xc6, 0x21, 0x6a, 0xa1, 0x26, 0xd1, - 0x26, 0xb0, 0x08, 0x85, 0x14, 0x16, 0x21, 0x13, 0x05, 0x52, 0x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 0x53, 0x92, 0x57, 0x8b, 0x33, 0xa8, 0xef, 0x43, 0x3d, 0x49, - 0x90, 0xb9, 0x7f, 0x83, 0xa0, 0xb4, 0x87, 0xfb, 0xae, 0xb8, 0x7e, 0x45, 0x7e, 0x13, 0xad, 0xb3, - 0xb5, 0xcb, 0x23, 0x7c, 0x20, 0xce, 0x21, 0x2a, 0x34, 0xe5, 0x0b, 0xf8, 0x20, 0x6c, 0x9b, 0xf4, - 0xd6, 0x84, 0x67, 0x75, 0x93, 0x6d, 0xcb, 0xc8, 0x8f, 0xda, 0x46, 0xba, 0x6d, 0xc0, 0x92, 0x79, - 0xdb, 0x4e, 0xe7, 0xbe, 0x63, 0x41, 0x79, 0xc1, 0x75, 0x4c, 0xfe, 0x5b, 0xfd, 0xae, 0x02, 0x8b, - 0x29, 0x8a, 0x09, 0xcf, 0x96, 0x5e, 0x80, 0x59, 0x51, 0x6e, 0x21, 0x0d, 0xe9, 0x65, 0xb2, 0x34, - 0x41, 0x82, 0x5a, 0xb0, 0x18, 0x59, 0xb4, 0xe0, 0x2b, 0xa6, 0xfb, 0x22, 0xbe, 0x70, 0xa1, 0xd5, - 0xad, 0x77, 0x13, 0x29, 0x6a, 0x17, 0xea, 0x49, 0xaa, 0x49, 0xc6, 0xd4, 0xa1, 0xea, 0xab, 0xfe, - 0xad, 0x02, 0x33, 0x2c, 0x2d, 0xb3, 0xb3, 0xa5, 0xe9, 0xa0, 0x90, 0x9c, 0x0e, 0x5e, 0x83, 0x2a, - 0x93, 0xa3, 0x87, 0x97, 0xef, 0xe6, 0xe5, 0xed, 0x75, 0x26, 0x9a, 0x8e, 0x56, 0x18, 0x84, 0xbf, - 0x49, 0x33, 0x98, 0xbd, 0xd0, 0x95, 0x89, 0x00, 0x6e, 0x57, 0x69, 0x1a, 0x75, 0xb9, 0x24, 0x64, - 0xe6, 0x6b, 0x98, 0x31, 0xbe, 0x99, 0x6f, 0x6d, 0x2d, 0xd3, 0x97, 0x13, 0x53, 0x1b, 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, 0xe6, 0x32, 0x30, 0x79, 0xea, 0x14, 0x7a, 0x17, - 0x2a, 0x21, 0x92, 0x4b, 0x36, 0x9e, 0x24, 0x24, 0xad, 0x71, 0x3a, 0x27, 0x37, 0x5e, 0xbb, 0x18, - 0x40, 0x4b, 0xae, 0x5d, 0x1a, 0xfc, 0x25, 0xd7, 0x2e, 0x0b, 0xd9, 0x15, 0xb5, 0x97, 0x81, 0x02, - 0x32, 0xda, 0x2b, 0x81, 0x44, 0x32, 0xda, 0x2b, 0xa3, 0x09, 0xd4, 0xa9, 0x3b, 0xb7, 0x7f, 0xf0, - 0xe3, 0x33, 0xca, 0x0f, 0x7f, 0x7c, 0x66, 0xea, 0x17, 0x3f, 0x3a, 0xa3, 0xfc, 0xe0, 0xa3, 0x33, - 0xca, 0x3f, 0x7e, 0x74, 0x46, 0xf9, 0xd1, 0x47, 0x67, 0x94, 0x6f, 0xfe, 0xdb, 0x99, 0xa9, 0x0f, - 0xd4, 0x47, 0x37, 0xfc, 0x2b, 0x96, 0x73, 0xb5, 0xeb, 0x59, 0x97, 0x0d, 0xd7, 0xba, 0xea, 0x3e, - 0xea, 0x5d, 0x35, 0x5c, 0xcb, 0xbf, 0xca, 0xe5, 0x5e, 0xdd, 0x7f, 0xf1, 0xe1, 0x0c, 0xfd, 0x0f, - 0x63, 0x2f, 0xfd, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x60, 0x6a, 0x8a, 0x1b, 0x6e, 0x00, - 0x00, + // 7123 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x7d, 0x5d, 0x6c, 0x1c, 0xc9, + 0x75, 0x2e, 0x7b, 0x66, 0x48, 0xce, 0x1c, 0x72, 0xc8, 0x61, 0x89, 0x22, 0xa9, 0x91, 0x44, 0x49, + 0xbd, 0x7f, 0x92, 0x76, 0xf5, 0xb3, 0x5a, 0xed, 0xae, 0xa4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 0x74, 0xcc, 0xce, 0xb0, 0xb4, 0x16, 0x49, 0x42, 0x2f, 0x40, 0xd8, 0x56, 0x4e, 0x34, 0x47, 0x89, + 0xaa, 0x22, 0x95, 0x91, 0xc5, 0xd0, 0x2d, 0xf3, 0x47, 0x44, 0xb7, 0xd4, 0x0e, 0x83, 0x6e, 0xb9, + 0x04, 0x35, 0xf1, 0x5b, 0xc0, 0x5b, 0xd8, 0x69, 0x05, 0x45, 0xb6, 0xcc, 0x8b, 0x3c, 0x01, 0x61, + 0xc9, 0x03, 0xc3, 0xc0, 0x50, 0x30, 0xcc, 0x1f, 0x2a, 0x3c, 0x6e, 0x0e, 0x27, 0x29, 0x3f, 0x85, + 0x97, 0x00, 0x14, 0xca, 0x51, 0x00, 0x14, 0x68, 0x27, 0x17, 0x62, 0x72, 0x21, 0x5f, 0xd2, 0x28, + 0x90, 0x89, 0x6a, 0x01, 0x92, 0x39, 0xe8, 0x44, 0xe1, 0x30, 0x0a, 0xb6, 0x52, 0x53, 0x18, 0x45, + 0x0d, 0x8a, 0x5d, 0x0e, 0xac, 0x28, 0x6a, 0xe4, 0x67, 0xde, 0x08, 0x2e, 0xe6, 0x8d, 0x60, 0x75, + 0x33, 0x8c, 0x9e, 0x9f, 0x05, 0xf2, 0x4f, 0xfd, 0x37, 0x05, 0x4e, 0x73, 0x79, 0x39, 0xf0, 0xb8, + 0x8c, 0x49, 0xab, 0xe4, 0x4c, 0xda, 0x8e, 0x87, 0x4d, 0x6c, 0x07, 0x96, 0xd1, 0xa3, 0xfe, 0x98, + 0x38, 0x10, 0x8f, 0x92, 0xa9, 0x4b, 0x78, 0x0e, 0x66, 0x19, 0x3c, 0x96, 0x07, 0xd2, 0x0c, 0x05, + 0x3b, 0x43, 0x11, 0xb2, 0x3c, 0x56, 0xde, 0xce, 0x32, 0x94, 0xa5, 0xdc, 0x1d, 0x98, 0x91, 0xf6, + 0x52, 0x75, 0x60, 0x39, 0x07, 0x9a, 0x90, 0x39, 0x22, 0x94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xf9, 0xfb, 0x2c, 0x7f, 0x8a, 0x05, 0x0d, 0x22, 0xa9, 0x41, 0xf7, 0x67, 0xf1, + 0x53, 0x2b, 0xd0, 0x3b, 0x8e, 0x89, 0xe9, 0x80, 0x9e, 0xd4, 0xca, 0x24, 0x61, 0xcd, 0x31, 0x71, + 0x34, 0xd5, 0xca, 0x87, 0x9d, 0x6a, 0x95, 0xc4, 0x54, 0x5b, 0x82, 0x29, 0x0f, 0x1b, 0xbe, 0x63, + 0xf3, 0x21, 0xc9, 0xbf, 0x48, 0x47, 0xf4, 0xb1, 0xef, 0x93, 0x32, 0xb8, 0x6f, 0xc6, 0x3f, 0x63, + 0x7e, 0xe4, 0xec, 0x10, 0x3f, 0x72, 0x08, 0x00, 0x36, 0xe1, 0x47, 0x56, 0x87, 0xf8, 0x91, 0x63, + 0xe1, 0x5f, 0x23, 0x8f, 0x79, 0x6e, 0x94, 0xc7, 0x1c, 0x77, 0x39, 0xe7, 0x65, 0x97, 0xf3, 0x76, + 0x3c, 0x78, 0xad, 0xa5, 0xe1, 0x00, 0xc3, 0xa3, 0xd6, 0xf8, 0xdc, 0x5e, 0x90, 0xe6, 0x36, 0xba, + 0xc4, 0x37, 0xc9, 0x51, 0x7a, 0x7b, 0x55, 0xda, 0xed, 0x61, 0xfb, 0xe7, 0x9f, 0xa7, 0x29, 0xf8, + 0x3b, 0x05, 0x96, 0x53, 0x53, 0x97, 0x1b, 0x83, 0xd7, 0x12, 0x18, 0xdd, 0xa1, 0xe0, 0x58, 0x01, + 0xd1, 0x6d, 0x48, 0x10, 0xdd, 0x4b, 0xc3, 0x58, 0x72, 0x10, 0xba, 0x47, 0x47, 0xcd, 0x7e, 0x5b, + 0x01, 0x94, 0x11, 0xe8, 0xdf, 0x14, 0x21, 0xc1, 0x21, 0x76, 0xff, 0x78, 0x54, 0xf0, 0x6e, 0x14, + 0x15, 0x14, 0x0e, 0xb3, 0xb9, 0x11, 0xc2, 0x79, 0x36, 0xa0, 0x2a, 0xef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 0xca, 0xe3, 0x1d, 0x74, 0x01, 0xa6, 0xa8, + 0x6e, 0x85, 0x57, 0xbd, 0x90, 0x12, 0xad, 0x71, 0x02, 0xf5, 0x6b, 0x80, 0x58, 0x59, 0x92, 0x27, + 0x7d, 0x98, 0x0e, 0x1c, 0xe2, 0x53, 0xff, 0x50, 0x81, 0x63, 0x92, 0x74, 0x5e, 0xbf, 0x97, 0x64, + 0xf1, 0x19, 0xd5, 0xe3, 0xa2, 0xdf, 0x96, 0x16, 0xf8, 0x0b, 0xe9, 0x6a, 0xfc, 0x0f, 0x2d, 0xee, + 0x7f, 0xaf, 0x00, 0x34, 0x06, 0xc1, 0x3e, 0xdf, 0x14, 0x8e, 0x77, 0xa2, 0x92, 0xe8, 0xc4, 0x3a, + 0x94, 0x5d, 0xc3, 0xf7, 0x9f, 0x38, 0x9e, 0x08, 0x78, 0xc3, 0x6f, 0xba, 0x95, 0x3b, 0xe0, 0x6f, + 0x75, 0x54, 0x34, 0xfa, 0x1b, 0xbd, 0x00, 0x73, 0xec, 0x31, 0x1a, 0xdd, 0x30, 0x4d, 0x4f, 0xe0, + 0x34, 0x2b, 0x5a, 0x95, 0xa5, 0x36, 0x58, 0x22, 0x21, 0xb3, 0xe8, 0xc9, 0x49, 0x70, 0xa0, 0x07, + 0xce, 0x23, 0x6c, 0xf3, 0x20, 0xb6, 0x2a, 0x52, 0x77, 0x48, 0x22, 0x3b, 0x85, 0xed, 0x5a, 0x7e, + 0xe0, 0x09, 0x32, 0x71, 0x5e, 0xcd, 0x53, 0x29, 0x99, 0xfa, 0x47, 0x0a, 0xd4, 0x5a, 0x83, 0x5e, + 0x8f, 0x29, 0xf7, 0x28, 0x9d, 0x7c, 0x91, 0x37, 0xa5, 0x90, 0x1e, 0xf2, 0x91, 0xa2, 0x78, 0x13, + 0x9f, 0xc9, 0xbe, 0xdb, 0x55, 0x58, 0x88, 0xd5, 0x98, 0x0f, 0x1c, 0x29, 0xd4, 0x50, 0xe4, 0x50, + 0x43, 0x6d, 0x00, 0x62, 0x5b, 0x4d, 0x47, 0x6e, 0xa5, 0x7a, 0x1c, 0x8e, 0x49, 0x22, 0xf8, 0x52, + 0x7c, 0x11, 0xaa, 0x1c, 0x33, 0xc8, 0x07, 0xc4, 0x09, 0x28, 0x13, 0x93, 0xda, 0xb1, 0x4c, 0x01, + 0x4e, 0x99, 0x76, 0x1d, 0x73, 0xcd, 0x32, 0x3d, 0xf5, 0xcb, 0x50, 0xe5, 0x8f, 0x12, 0x70, 0xda, + 0x3b, 0x30, 0xc7, 0xcf, 0x32, 0x75, 0xe9, 0x16, 0xef, 0x89, 0x0c, 0x60, 0xaa, 0x50, 0x85, 0x1d, + 0xff, 0x54, 0xbf, 0x0e, 0x75, 0xe6, 0x2d, 0x48, 0x82, 0x45, 0x03, 0xef, 0x80, 0xc0, 0x85, 0x0d, + 0x91, 0x2f, 0x73, 0x56, 0xbd, 0xf8, 0xa7, 0x7a, 0x1a, 0x4e, 0x66, 0xca, 0xe7, 0xad, 0x77, 0xa1, + 0x16, 0x65, 0xb0, 0xab, 0xa6, 0x21, 0xe2, 0x46, 0x89, 0x21, 0x6e, 0x96, 0x42, 0x17, 0xbe, 0x20, + 0x56, 0x2e, 0xea, 0xa5, 0x47, 0x21, 0x60, 0x31, 0x2f, 0x04, 0x2c, 0x49, 0x21, 0xa0, 0xba, 0x19, + 0xea, 0x90, 0x07, 0xe2, 0xb7, 0xe9, 0x56, 0x01, 0x2b, 0x5b, 0x18, 0xb5, 0x53, 0xd9, 0xed, 0x63, + 0x44, 0x5a, 0x8c, 0x5e, 0xbd, 0x00, 0x55, 0xd9, 0xbc, 0xc5, 0x2c, 0x96, 0x22, 0x5b, 0xac, 0xff, + 0x03, 0x4b, 0x9a, 0x04, 0xb2, 0xbb, 0x87, 0x8d, 0x60, 0xe0, 0x61, 0x1f, 0xbd, 0x05, 0xf5, 0x8c, + 0xf7, 0x81, 0x74, 0x1e, 0x19, 0x32, 0x31, 0xcb, 0xa9, 0x67, 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0x90, 0x07, 0x62, 0xd6, 0xa5, 0x89, 0xfa, 0xb9, 0x21, 0x14, 0x71, 0x85, 0x24, 0xae, 0x31, + 0xc8, 0x0a, 0xc9, 0xbe, 0x20, 0x51, 0x7f, 0x6e, 0x28, 0x4d, 0xb2, 0x27, 0x23, 0x8c, 0x74, 0xba, + 0x27, 0x53, 0x10, 0xfe, 0x74, 0x4f, 0xa6, 0x21, 0xd6, 0xbc, 0x27, 0x13, 0xa8, 0x66, 0x75, 0x28, + 0x4e, 0x32, 0xab, 0x27, 0xb3, 0xb1, 0x94, 0xea, 0x04, 0x7a, 0x02, 0x2b, 0x79, 0x38, 0x36, 0xf4, + 0xf2, 0x21, 0xe0, 0x76, 0xf5, 0x57, 0xc6, 0x23, 0x0e, 0x0b, 0xc6, 0x80, 0xd2, 0x11, 0x17, 0x7a, + 0x41, 0x56, 0x77, 0x4e, 0x44, 0x57, 0x7f, 0x71, 0x14, 0x59, 0x58, 0xcc, 0x7d, 0x28, 0x0b, 0x84, + 0x1c, 0x92, 0x4c, 0x60, 0x02, 0x99, 0x57, 0x3f, 0x95, 0x9d, 0x19, 0x0a, 0x7a, 0x0b, 0x4a, 0x24, + 0x15, 0x2d, 0x27, 0xe9, 0x84, 0x80, 0x95, 0x74, 0x46, 0xc8, 0xdc, 0x80, 0x29, 0x06, 0xfd, 0x42, + 0xd2, 0x21, 0xaa, 0x04, 0x4d, 0xab, 0xd7, 0xb3, 0xb2, 0x42, 0x11, 0x2d, 0xf6, 0x0f, 0x8c, 0x38, + 0x92, 0x0b, 0xad, 0x26, 0x9f, 0x85, 0x97, 0x21, 0x63, 0xf5, 0x33, 0xb9, 0xf9, 0xf1, 0x31, 0x9b, + 0xd8, 0x58, 0x3d, 0x37, 0xe4, 0xa0, 0x20, 0x6b, 0xcc, 0x66, 0x1f, 0x3f, 0xb0, 0xce, 0x4d, 0x1f, + 0x4f, 0xa0, 0x17, 0x72, 0xc7, 0xbb, 0x54, 0xc4, 0x8b, 0xa3, 0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 0x33, 0x17, 0xc3, 0x05, 0xca, 0x66, 0x2e, 0x0d, 0x73, 0x94, 0xcd, 0x5c, 0x06, 0xa0, 0x50, 0x9d, + 0x40, 0xef, 0x43, 0x25, 0x84, 0xa1, 0xc9, 0x83, 0x27, 0x89, 0xa7, 0xab, 0x9f, 0xce, 0xc9, 0x8d, + 0xd7, 0x2e, 0x86, 0x2e, 0x93, 0x6b, 0x97, 0x46, 0xae, 0xc9, 0xb5, 0xcb, 0x82, 0xa5, 0x45, 0xed, + 0x65, 0x38, 0x82, 0x8c, 0xf6, 0x4a, 0xb8, 0x92, 0x8c, 0xf6, 0xca, 0x00, 0x04, 0x75, 0xe2, 0xee, + 0x9d, 0x9f, 0xfc, 0x7c, 0x55, 0xf9, 0xe9, 0xcf, 0x57, 0x27, 0xfe, 0xef, 0x27, 0xab, 0xca, 0x4f, + 0x3e, 0x59, 0x55, 0xfe, 0xe1, 0x93, 0x55, 0xe5, 0x67, 0x9f, 0xac, 0x2a, 0xdf, 0xfe, 0xd7, 0xd5, + 0x89, 0x8f, 0xd4, 0x47, 0x37, 0xfc, 0xcb, 0x96, 0x73, 0xa5, 0xe3, 0x59, 0x97, 0x0c, 0xd7, 0xba, + 0xe2, 0x3e, 0xea, 0x5e, 0x31, 0x5c, 0xcb, 0xbf, 0xc2, 0xe5, 0x5e, 0x79, 0xfc, 0xea, 0xc3, 0x29, + 0xfa, 0x4f, 0xef, 0x5e, 0xfb, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x2f, 0xd6, 0x6d, 0xae, + 0x70, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -12308,6 +12568,18 @@ func (m *Mount) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Image != nil { + { + size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } if m.RecursiveReadOnly { i-- if m.RecursiveReadOnly { @@ -12587,6 +12859,11 @@ func (m *LinuxSandboxSecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l + if m.SupplementalGroupsPolicy != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.SupplementalGroupsPolicy)) + i-- + dAtA[i] = 0x58 + } if m.Apparmor != nil { { size, err := m.Apparmor.MarshalToSizedBuffer(dAtA[:i]) @@ -12641,21 +12918,21 @@ func (m *LinuxSandboxSecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, er dAtA[i] = 0x30 } if len(m.SupplementalGroups) > 0 { - dAtA6 := make([]byte, len(m.SupplementalGroups)*10) - var j5 int + dAtA7 := make([]byte, len(m.SupplementalGroups)*10) + var j6 int for _, num1 := range m.SupplementalGroups { num := uint64(num1) for num >= 1<<7 { - dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) + dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j5++ + j6++ } - dAtA6[j5] = uint8(num) - j5++ + dAtA7[j6] = uint8(num) + j6++ } - i -= j5 - copy(dAtA[i:], dAtA6[:j5]) - i = encodeVarintApi(dAtA, i, uint64(j5)) + i -= j6 + copy(dAtA[i:], dAtA7[:j6]) + i = encodeVarintApi(dAtA, i, uint64(j6)) i-- dAtA[i] = 0x2a } @@ -15027,6 +15304,13 @@ func (m *LinuxContainerSecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l + if m.SupplementalGroupsPolicy != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.SupplementalGroupsPolicy)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x88 + } if m.Apparmor != nil { { size, err := m.Apparmor.MarshalToSizedBuffer(dAtA[:i]) @@ -15108,21 +15392,21 @@ func (m *LinuxContainerSecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, dAtA[i] = 0x4a } if len(m.SupplementalGroups) > 0 { - dAtA57 := make([]byte, len(m.SupplementalGroups)*10) - var j56 int + dAtA58 := make([]byte, len(m.SupplementalGroups)*10) + var j57 int for _, num1 := range m.SupplementalGroups { num := uint64(num1) for num >= 1<<7 { - dAtA57[j56] = uint8(uint64(num)&0x7f | 0x80) + dAtA58[j57] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j56++ + j57++ } - dAtA57[j56] = uint8(num) - j56++ + dAtA58[j57] = uint8(num) + j57++ } - i -= j56 - copy(dAtA[i:], dAtA57[:j56]) - i = encodeVarintApi(dAtA, i, uint64(j56)) + i -= j57 + copy(dAtA[i:], dAtA58[:j57]) + i = encodeVarintApi(dAtA, i, uint64(j57)) i-- dAtA[i] = 0x42 } @@ -15251,6 +15535,58 @@ func (m *LinuxContainerConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *LinuxContainerUser) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LinuxContainerUser) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LinuxContainerUser) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SupplementalGroups) > 0 { + dAtA66 := make([]byte, len(m.SupplementalGroups)*10) + var j65 int + for _, num1 := range m.SupplementalGroups { + num := uint64(num1) + for num >= 1<<7 { + dAtA66[j65] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j65++ + } + dAtA66[j65] = uint8(num) + j65++ + } + i -= j65 + copy(dAtA[i:], dAtA66[:j65]) + i = encodeVarintApi(dAtA, i, uint64(j65)) + i-- + dAtA[i] = 0x1a + } + if m.Gid != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.Gid)) + i-- + dAtA[i] = 0x10 + } + if m.Uid != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.Uid)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *WindowsNamespaceOption) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -16454,6 +16790,20 @@ func (m *ContainerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.User != nil { + { + size, err := m.User.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } if len(m.ImageId) > 0 { i -= len(m.ImageId) copy(dAtA[i:], m.ImageId) @@ -16717,6 +17067,41 @@ func (m *ContainerResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ContainerUser) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerUser) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContainerUser) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Linux != nil { + { + size, err := m.Linux.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *UpdateContainerResourcesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -17129,21 +17514,21 @@ func (m *PortForwardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.Port) > 0 { - dAtA87 := make([]byte, len(m.Port)*10) - var j86 int + dAtA92 := make([]byte, len(m.Port)*10) + var j91 int for _, num1 := range m.Port { num := uint64(num1) for num >= 1<<7 { - dAtA87[j86] = uint8(uint64(num)&0x7f | 0x80) + dAtA92[j91] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j86++ + j91++ } - dAtA87[j86] = uint8(num) - j86++ + dAtA92[j91] = uint8(num) + j91++ } - i -= j86 - copy(dAtA[i:], dAtA87[:j86]) - i = encodeVarintApi(dAtA, i, uint64(j86)) + i -= j91 + copy(dAtA[i:], dAtA92[:j91]) + i = encodeVarintApi(dAtA, i, uint64(j91)) i-- dAtA[i] = 0x12 } @@ -18031,6 +18416,39 @@ func (m *RuntimeHandler) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *RuntimeFeatures) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RuntimeFeatures) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RuntimeFeatures) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SupplementalGroupsPolicy { + i-- + if m.SupplementalGroupsPolicy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *StatusResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -18051,6 +18469,18 @@ func (m *StatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Features != nil { + { + size, err := m.Features.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } if len(m.RuntimeHandlers) > 0 { for iNdEx := len(m.RuntimeHandlers) - 1; iNdEx >= 0; iNdEx-- { { @@ -19864,6 +20294,10 @@ func (m *Mount) Size() (n int) { if m.RecursiveReadOnly { n += 2 } + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } return n } @@ -19994,6 +20428,9 @@ func (m *LinuxSandboxSecurityContext) Size() (n int) { l = m.Apparmor.Size() n += 1 + l + sovApi(uint64(l)) } + if m.SupplementalGroupsPolicy != 0 { + n += 1 + sovApi(uint64(m.SupplementalGroupsPolicy)) + } return n } @@ -21024,6 +21461,9 @@ func (m *LinuxContainerSecurityContext) Size() (n int) { l = m.Apparmor.Size() n += 2 + l + sovApi(uint64(l)) } + if m.SupplementalGroupsPolicy != 0 { + n += 2 + sovApi(uint64(m.SupplementalGroupsPolicy)) + } return n } @@ -21044,6 +21484,28 @@ func (m *LinuxContainerConfig) Size() (n int) { return n } +func (m *LinuxContainerUser) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Uid != 0 { + n += 1 + sovApi(uint64(m.Uid)) + } + if m.Gid != 0 { + n += 1 + sovApi(uint64(m.Gid)) + } + if len(m.SupplementalGroups) > 0 { + l = 0 + for _, e := range m.SupplementalGroups { + l += sovApi(uint64(e)) + } + n += 1 + sovApi(uint64(l)) + l + } + return n +} + func (m *WindowsNamespaceOption) Size() (n int) { if m == nil { return 0 @@ -21620,6 +22082,10 @@ func (m *ContainerStatus) Size() (n int) { if l > 0 { n += 2 + l + sovApi(uint64(l)) } + if m.User != nil { + l = m.User.Size() + n += 2 + l + sovApi(uint64(l)) + } return n } @@ -21661,6 +22127,19 @@ func (m *ContainerResources) Size() (n int) { return n } +func (m *ContainerUser) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Linux != nil { + l = m.Linux.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + func (m *UpdateContainerResourcesRequest) Size() (n int) { if m == nil { return 0 @@ -22197,6 +22676,18 @@ func (m *RuntimeHandler) Size() (n int) { return n } +func (m *RuntimeFeatures) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SupplementalGroupsPolicy { + n += 2 + } + return n +} + func (m *StatusResponse) Size() (n int) { if m == nil { return 0 @@ -22221,6 +22712,10 @@ func (m *StatusResponse) Size() (n int) { n += 1 + l + sovApi(uint64(l)) } } + if m.Features != nil { + l = m.Features.Size() + n += 1 + l + sovApi(uint64(l)) + } return n } @@ -22957,6 +23452,7 @@ func (this *Mount) String() string { `UidMappings:` + repeatedStringForUidMappings + `,`, `GidMappings:` + repeatedStringForGidMappings + `,`, `RecursiveReadOnly:` + fmt.Sprintf("%v", this.RecursiveReadOnly) + `,`, + `Image:` + strings.Replace(this.Image.String(), "ImageSpec", "ImageSpec", 1) + `,`, `}`, }, "") return s @@ -23034,6 +23530,7 @@ func (this *LinuxSandboxSecurityContext) String() string { `RunAsGroup:` + strings.Replace(this.RunAsGroup.String(), "Int64Value", "Int64Value", 1) + `,`, `Seccomp:` + strings.Replace(this.Seccomp.String(), "SecurityProfile", "SecurityProfile", 1) + `,`, `Apparmor:` + strings.Replace(this.Apparmor.String(), "SecurityProfile", "SecurityProfile", 1) + `,`, + `SupplementalGroupsPolicy:` + fmt.Sprintf("%v", this.SupplementalGroupsPolicy) + `,`, `}`, }, "") return s @@ -23762,6 +24259,7 @@ func (this *LinuxContainerSecurityContext) String() string { `ReadonlyPaths:` + fmt.Sprintf("%v", this.ReadonlyPaths) + `,`, `Seccomp:` + strings.Replace(this.Seccomp.String(), "SecurityProfile", "SecurityProfile", 1) + `,`, `Apparmor:` + strings.Replace(this.Apparmor.String(), "SecurityProfile", "SecurityProfile", 1) + `,`, + `SupplementalGroupsPolicy:` + fmt.Sprintf("%v", this.SupplementalGroupsPolicy) + `,`, `}`, }, "") return s @@ -23777,6 +24275,18 @@ func (this *LinuxContainerConfig) String() string { }, "") return s } +func (this *LinuxContainerUser) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxContainerUser{`, + `Uid:` + fmt.Sprintf("%v", this.Uid) + `,`, + `Gid:` + fmt.Sprintf("%v", this.Gid) + `,`, + `SupplementalGroups:` + fmt.Sprintf("%v", this.SupplementalGroups) + `,`, + `}`, + }, "") + return s +} func (this *WindowsNamespaceOption) String() string { if this == nil { return "nil" @@ -24181,6 +24691,7 @@ func (this *ContainerStatus) String() string { `LogPath:` + fmt.Sprintf("%v", this.LogPath) + `,`, `Resources:` + strings.Replace(this.Resources.String(), "ContainerResources", "ContainerResources", 1) + `,`, `ImageId:` + fmt.Sprintf("%v", this.ImageId) + `,`, + `User:` + strings.Replace(this.User.String(), "ContainerUser", "ContainerUser", 1) + `,`, `}`, }, "") return s @@ -24217,6 +24728,16 @@ func (this *ContainerResources) String() string { }, "") return s } +func (this *ContainerUser) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerUser{`, + `Linux:` + strings.Replace(this.Linux.String(), "LinuxContainerUser", "LinuxContainerUser", 1) + `,`, + `}`, + }, "") + return s +} func (this *UpdateContainerResourcesRequest) String() string { if this == nil { return "nil" @@ -24582,6 +25103,16 @@ func (this *RuntimeHandler) String() string { }, "") return s } +func (this *RuntimeFeatures) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RuntimeFeatures{`, + `SupplementalGroupsPolicy:` + fmt.Sprintf("%v", this.SupplementalGroupsPolicy) + `,`, + `}`, + }, "") + return s +} func (this *StatusResponse) String() string { if this == nil { return "nil" @@ -24605,6 +25136,7 @@ func (this *StatusResponse) String() string { `Status:` + strings.Replace(this.Status.String(), "RuntimeStatus", "RuntimeStatus", 1) + `,`, `Info:` + mapStringForInfo + `,`, `RuntimeHandlers:` + repeatedStringForRuntimeHandlers + `,`, + `Features:` + strings.Replace(this.Features.String(), "RuntimeFeatures", "RuntimeFeatures", 1) + `,`, `}`, }, "") return s @@ -25879,6 +26411,42 @@ func (m *Mount) Unmarshal(dAtA []byte) error { } } m.RecursiveReadOnly = bool(v != 0) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -26781,6 +27349,25 @@ func (m *LinuxSandboxSecurityContext) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroupsPolicy", wireType) + } + m.SupplementalGroupsPolicy = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SupplementalGroupsPolicy |= SupplementalGroupsPolicy(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -34824,6 +35411,25 @@ func (m *LinuxContainerSecurityContext) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroupsPolicy", wireType) + } + m.SupplementalGroupsPolicy = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SupplementalGroupsPolicy |= SupplementalGroupsPolicy(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -34967,6 +35573,170 @@ func (m *LinuxContainerConfig) Unmarshal(dAtA []byte) error { } return nil } +func (m *LinuxContainerUser) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxContainerUser: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxContainerUser: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) + } + m.Uid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Uid |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Gid", wireType) + } + m.Gid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Gid |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SupplementalGroups = append(m.SupplementalGroups, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.SupplementalGroups) == 0 { + m.SupplementalGroups = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SupplementalGroups = append(m.SupplementalGroups, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *WindowsNamespaceOption) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -39317,6 +40087,42 @@ func (m *ContainerStatus) Unmarshal(dAtA []byte) error { } m.ImageId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 18: + 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 ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.User == nil { + m.User = &ContainerUser{} + } + if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -39673,6 +40479,92 @@ func (m *ContainerResources) Unmarshal(dAtA []byte) error { } return nil } +func (m *ContainerUser) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerUser: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerUser: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Linux == nil { + m.Linux = &LinuxContainerUser{} + } + if err := m.Linux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *UpdateContainerResourcesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -43348,6 +44240,76 @@ func (m *RuntimeHandler) Unmarshal(dAtA []byte) error { } return nil } +func (m *RuntimeFeatures) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RuntimeFeatures: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RuntimeFeatures: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroupsPolicy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SupplementalGroupsPolicy = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *StatusResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -43574,6 +44536,42 @@ func (m *StatusResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Features", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Features == nil { + m.Features = &RuntimeFeatures{} + } + if err := m.Features.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto b/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto index d707716cbda..9938c6a60a8 100644 --- a/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto +++ b/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto @@ -244,6 +244,15 @@ message Mount { // - when set to true, readonly must be explicitly set to true, and propagation must be PRIVATE (0). // - (readonly == false && recursive_read_only == false) does not make the mount read-only. bool recursive_read_only = 8; + // Mount an image reference (image ID, with or without digest), which is a + // special use case for image volume mounts. If this field is set, then + // host_path should be unset. All OCI mounts are per feature definition + // readonly. The kubelet does an PullImage RPC and evaluates the returned + // PullImageResponse.image_ref value, which is then set to the + // ImageSpec.image field. Runtimes are expected to mount the image as + // required. + // Introduced in the OCI Volume Source KEP: https://kep.k8s.io/4639 + ImageSpec image = 9; } // IDMapping describes host to container ID mappings for a pod sandbox. @@ -321,6 +330,20 @@ message NamespaceOption { UserNamespace userns_options = 5; } +// SupplementalGroupsPolicy defines how supplemental groups +// of the first container processes are calculated. +enum SupplementalGroupsPolicy { + // Merge means that the container's provided SupplementalGroups + // and FsGroup (specified in SecurityContext) will be merged with + // the primary user's groups as defined in the container image + // (in /etc/group). + Merge = 0; + // Strict means that the container's provided SupplementalGroups + // and FsGroup (specified in SecurityContext) will be used instead of + // any groups defined in the container image. + Strict = 1; +} + // Int64Value is the wrapper of int64. message Int64Value { // The value. @@ -345,13 +368,14 @@ message LinuxSandboxSecurityContext { Int64Value run_as_group = 8; // If set, the root filesystem of the sandbox is read-only. bool readonly_rootfs = 4; - // List of groups applied to the first process run in the sandbox, in - // addition to the sandbox's primary GID, and group memberships defined - // in the container image for the sandbox's primary UID of the container process. - // If the list is empty, no additional groups are added to any container. - // Note that group memberships defined in the container image for the sandbox's primary UID - // of the container process are still effective, even if they are not included in this list. + // List of groups applied to the first process run in each container. + // supplemental_groups_policy can control how groups will be calculated. repeated int64 supplemental_groups = 5; + // supplemental_groups_policy defines how supplemental groups of the first + // container processes are calculated. + // Valid values are "Merge" and "Strict". + // If not specified, "Merge" is used. + SupplementalGroupsPolicy supplemental_groups_policy = 11; // Indicates whether the sandbox will be asked to run a privileged // container. If a privileged container is to be executed within it, this // MUST be true. @@ -905,13 +929,14 @@ message LinuxContainerSecurityContext { string run_as_username = 6; // If set, the root filesystem of the container is read-only. bool readonly_rootfs = 7; - // List of groups applied to the first process run in the container, in - // addition to the container's primary GID, and group memberships defined - // in the container image for the container's primary UID of the container process. - // If the list is empty, no additional groups are added to any container. - // Note that group memberships defined in the container image for the container's primary UID - // of the container process are still effective, even if they are not included in this list. + // List of groups applied to the first process run in each container. + // supplemental_groups_policy can control how groups will be calculated. repeated int64 supplemental_groups = 8; + // supplemental_groups_policy defines how supplemental groups of the first + // container processes are calculated. + // Valid values are "Merge" and "Strict". + // If not specified, "Merge" is used. + SupplementalGroupsPolicy supplemental_groups_policy = 17; // no_new_privs defines if the flag for no_new_privs should be set on the // container. bool no_new_privs = 11; @@ -950,6 +975,15 @@ message LinuxContainerConfig { LinuxContainerSecurityContext security_context = 2; } +message LinuxContainerUser { + // uid is the primary uid initially attached to the first process in the container + int64 uid = 1; + // gid is the primary gid initially attached to the first process in the container + int64 gid = 2; + // supplemental_groups are the supplemental groups initially attached to the first process in the container + repeated int64 supplemental_groups = 3; +} + // WindowsNamespaceOption provides options for Windows namespaces. message WindowsNamespaceOption { // Network namespace for this container/sandbox. @@ -1286,6 +1320,8 @@ message ContainerStatus { // misusage, we now introduce the image_id field, which should always refer // to a unique image identifier on the node. string image_id = 17; + // User identities initially attached to the container + ContainerUser user = 18; } message ContainerStatusResponse { @@ -1306,6 +1342,17 @@ message ContainerResources { WindowsContainerResources windows = 2; } +message ContainerUser { + // User identities initially attached to first process in the Linux container. + // Note that the actual running identity can be changed if the process has enough privilege to do so. + LinuxContainerUser linux = 1; + + // User identities initially attached to first process in the Windows container + // This is just reserved for future use. + // WindowsContainerUser windows = 2; +} + + message UpdateContainerResourcesRequest { // ID of the container to update. string container_id = 1; @@ -1553,6 +1600,7 @@ message StatusRequest { bool verbose = 1; } +// RuntimeHandlerFeatures is a set of features implemented by the runtime handler. message RuntimeHandlerFeatures { // recursive_read_only_mounts is set to true if the runtime handler supports // recursive read-only mounts. @@ -1573,6 +1621,14 @@ message RuntimeHandler { RuntimeHandlerFeatures features = 2; } +// RuntimeFeatures describes the set of features implemented by the CRI implementation. +// The features contained in the RuntimeFeatures should depend only on the cri implementation +// independent of runtime handlers. +message RuntimeFeatures { + // supplemental_groups_policy is set to true if the runtime supports SupplementalGroupsPolicy and ContainerUser. + bool supplemental_groups_policy = 1; +} + message StatusResponse { // Status of the Runtime. RuntimeStatus status = 1; @@ -1583,6 +1639,9 @@ message StatusResponse { map info = 2; // Runtime handlers. repeated RuntimeHandler runtime_handlers = 3; + // features describes the set of features implemented by the CRI implementation. + // This field is supposed to propagate to NodeFeatures in Kubernetes API. + RuntimeFeatures features = 4; } message ImageFsInfoRequest {} diff --git a/vendor/k8s.io/gengo/LICENSE b/vendor/k8s.io/gengo/LICENSE deleted file mode 100644 index 00b2401109f..00000000000 --- a/vendor/k8s.io/gengo/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 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. diff --git a/vendor/k8s.io/gengo/args/args.go b/vendor/k8s.io/gengo/args/args.go deleted file mode 100644 index b81ceb93afb..00000000000 --- a/vendor/k8s.io/gengo/args/args.go +++ /dev/null @@ -1,199 +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 args has common command-line flags for generation programs. -package args - -import ( - "bytes" - goflag "flag" - "fmt" - "io/ioutil" - "os" - "path" - "path/filepath" - "strconv" - "strings" - "time" - - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/parser" - - "github.com/spf13/pflag" -) - -// Default returns a defaulted GeneratorArgs. You may change the defaults -// before calling AddFlags. -func Default() *GeneratorArgs { - return &GeneratorArgs{ - OutputBase: DefaultSourceTree(), - GoHeaderFilePath: filepath.Join(DefaultSourceTree(), "k8s.io/gengo/boilerplate/boilerplate.go.txt"), - GeneratedBuildTag: "ignore_autogenerated", - GeneratedByCommentTemplate: "// Code generated by GENERATOR_NAME. DO NOT EDIT.", - defaultCommandLineFlags: true, - } -} - -// GeneratorArgs has arguments that are passed to generators. -type GeneratorArgs struct { - // Which directories to parse. - InputDirs []string - - // Source tree to write results to. - OutputBase string - - // Package path within the source tree. - OutputPackagePath string - - // Output file name. - OutputFileBaseName string - - // Where to get copyright header text. - GoHeaderFilePath string - - // If GeneratedByCommentTemplate is set, generate a "Code generated by" comment - // below the bloilerplate, of the format defined by this string. - // Any instances of "GENERATOR_NAME" will be replaced with the name of the code generator. - GeneratedByCommentTemplate string - - // If true, only verify, don't write anything. - VerifyOnly bool - - // If true, include *_test.go files - IncludeTestFiles bool - - // GeneratedBuildTag is the tag used to identify code generated by execution - // of this type. Each generator should use a different tag, and different - // groups of generators (external API that depends on Kube generations) should - // keep tags distinct as well. - GeneratedBuildTag string - - // Any custom arguments go here - CustomArgs interface{} - - // If specified, trim the prefix from OutputPackagePath before writing files. - TrimPathPrefix string - - // Whether to use default command line flags - defaultCommandLineFlags bool -} - -// WithoutDefaultFlagParsing disables implicit addition of command line flags and parsing. -func (g *GeneratorArgs) WithoutDefaultFlagParsing() *GeneratorArgs { - g.defaultCommandLineFlags = false - return g -} - -func (g *GeneratorArgs) AddFlags(fs *pflag.FlagSet) { - fs.StringSliceVarP(&g.InputDirs, "input-dirs", "i", g.InputDirs, "Comma-separated list of import paths to get input types from.") - fs.StringVarP(&g.OutputBase, "output-base", "o", g.OutputBase, "Output base; defaults to $GOPATH/src/ or ./ if $GOPATH is not set.") - fs.StringVarP(&g.OutputPackagePath, "output-package", "p", g.OutputPackagePath, "Base package path.") - fs.StringVarP(&g.OutputFileBaseName, "output-file-base", "O", g.OutputFileBaseName, "Base name (without .go suffix) for output files.") - fs.StringVarP(&g.GoHeaderFilePath, "go-header-file", "h", g.GoHeaderFilePath, "File containing boilerplate header text. The string YEAR will be replaced with the current 4-digit year.") - fs.BoolVar(&g.VerifyOnly, "verify-only", g.VerifyOnly, "If true, only verify existing output, do not write anything.") - fs.StringVar(&g.GeneratedBuildTag, "build-tag", g.GeneratedBuildTag, "A Go build tag to use to identify files generated by this command. Should be unique.") - fs.StringVar(&g.TrimPathPrefix, "trim-path-prefix", g.TrimPathPrefix, "If set, trim the specified prefix from --output-package when generating files.") -} - -// LoadGoBoilerplate loads the boilerplate file passed to --go-header-file. -func (g *GeneratorArgs) LoadGoBoilerplate() ([]byte, error) { - b, err := ioutil.ReadFile(g.GoHeaderFilePath) - if err != nil { - return nil, err - } - b = bytes.Replace(b, []byte("YEAR"), []byte(strconv.Itoa(time.Now().UTC().Year())), -1) - - if g.GeneratedByCommentTemplate != "" { - if len(b) != 0 { - b = append(b, byte('\n')) - } - generatorName := path.Base(os.Args[0]) - generatedByComment := strings.Replace(g.GeneratedByCommentTemplate, "GENERATOR_NAME", generatorName, -1) - s := fmt.Sprintf("%s\n\n", generatedByComment) - b = append(b, []byte(s)...) - } - return b, nil -} - -// NewBuilder makes a new parser.Builder and populates it with the input -// directories. -func (g *GeneratorArgs) NewBuilder() (*parser.Builder, error) { - b := parser.New() - - // flag for including *_test.go - b.IncludeTestFiles = g.IncludeTestFiles - - // Ignore all auto-generated files. - b.AddBuildTags(g.GeneratedBuildTag) - - for _, d := range g.InputDirs { - var err error - if strings.HasSuffix(d, "/...") { - err = b.AddDirRecursive(strings.TrimSuffix(d, "/...")) - } else { - err = b.AddDir(d) - } - if err != nil { - return nil, fmt.Errorf("unable to add directory %q: %v", d, err) - } - } - return b, nil -} - -// DefaultSourceTree returns the /src directory of the first entry in $GOPATH. -// If $GOPATH is empty, it returns "./". Useful as a default output location. -func DefaultSourceTree() string { - paths := strings.Split(os.Getenv("GOPATH"), string(filepath.ListSeparator)) - if len(paths) > 0 && len(paths[0]) > 0 { - return filepath.Join(paths[0], "src") - } - return "./" -} - -// Execute implements main(). -// If you don't need any non-default behavior, use as: -// args.Default().Execute(...) -func (g *GeneratorArgs) Execute(nameSystems namer.NameSystems, defaultSystem string, pkgs func(*generator.Context, *GeneratorArgs) generator.Packages) error { - if g.defaultCommandLineFlags { - g.AddFlags(pflag.CommandLine) - pflag.CommandLine.AddGoFlagSet(goflag.CommandLine) - pflag.Parse() - } - - b, err := g.NewBuilder() - if err != nil { - return fmt.Errorf("Failed making a parser: %v", err) - } - - // pass through the flag on whether to include *_test.go files - b.IncludeTestFiles = g.IncludeTestFiles - - c, err := generator.NewContext(b, nameSystems, defaultSystem) - if err != nil { - return fmt.Errorf("Failed making a context: %v", err) - } - - c.TrimPathPrefix = g.TrimPathPrefix - - c.Verify = g.VerifyOnly - packages := pkgs(c, g) - if err := c.ExecutePackages(g.OutputBase, packages); err != nil { - return fmt.Errorf("Failed executing generator: %v", err) - } - - return nil -} diff --git a/vendor/k8s.io/gengo/examples/import-boss/generators/import_restrict.go b/vendor/k8s.io/gengo/examples/import-boss/generators/import_restrict.go deleted file mode 100644 index d7eb20b8596..00000000000 --- a/vendor/k8s.io/gengo/examples/import-boss/generators/import_restrict.go +++ /dev/null @@ -1,443 +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 generators has the generators for the import-boss utility. -package generators - -import ( - "encoding/json" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "regexp" - "sort" - "strings" - - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - "sigs.k8s.io/yaml" - - "k8s.io/klog/v2" -) - -const ( - goModFile = "go.mod" - importBossFileType = "import-boss" -) - -// NameSystems returns the name system used by the generators in this package. -func NameSystems() namer.NameSystems { - return namer.NameSystems{ - "raw": namer.NewRawNamer("", nil), - } -} - -// DefaultNameSystem returns the default name system for ordering the types to be -// processed by the generators in this package. -func DefaultNameSystem() string { - return "raw" -} - -// Packages makes the import-boss package definition. -func Packages(c *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - pkgs := generator.Packages{} - c.FileTypes = map[string]generator.FileType{ - importBossFileType: importRuleFile{c}, - } - - for _, p := range c.Universe { - if !inputIncludes(arguments.InputDirs, p) { - // Don't run on e.g. third party dependencies. - continue - } - savedPackage := p - pkgs = append(pkgs, &generator.DefaultPackage{ - PackageName: p.Name, - PackagePath: p.Path, - Source: p.SourcePath, - // GeneratorFunc returns a list of generators. Each generator makes a - // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - return []generator.Generator{&importRules{ - myPackage: savedPackage, - }} - }, - FilterFunc: func(c *generator.Context, t *types.Type) bool { - return false - }, - }) - } - - return pkgs -} - -// inputIncludes returns true if the given package is a (sub) package of one of -// the InputDirs. -func inputIncludes(inputs []string, p *types.Package) bool { - // TODO: This does not handle conversion of local paths (./foo) into - // canonical packages (github.com/example/project/foo). - for _, input := range inputs { - // Normalize paths - input := strings.TrimSuffix(input, "/") - input = strings.TrimPrefix(input, "./vendor/") - seek := strings.TrimSuffix(p.Path, "/") - - if input == seek { - return true - } - if strings.HasSuffix(input, "...") { - input = strings.TrimSuffix(input, "...") - if strings.HasPrefix(seek+"/", input) { - return true - } - } - } - return false -} - -// A single import restriction rule. -type Rule struct { - // All import paths that match this regexp... - SelectorRegexp string - // ... must have one of these prefixes ... - AllowedPrefixes []string - // ... and must not have one of these prefixes. - ForbiddenPrefixes []string -} - -type InverseRule struct { - Rule - // True if the rule is to be applied to transitive imports. - Transitive bool -} - -type fileFormat struct { - CurrentImports []string - - Rules []Rule - InverseRules []InverseRule - - path string -} - -func readFile(path string) (*fileFormat, error) { - currentBytes, err := ioutil.ReadFile(path) - if err != nil { - return nil, fmt.Errorf("couldn't read %v: %v", path, err) - } - - var current fileFormat - err = yaml.Unmarshal(currentBytes, ¤t) - if err != nil { - return nil, fmt.Errorf("couldn't unmarshal %v: %v", path, err) - } - current.path = path - return ¤t, nil -} - -func writeFile(path string, ff *fileFormat) error { - raw, err := json.MarshalIndent(ff, "", "\t") - if err != nil { - return fmt.Errorf("couldn't format data for file %v.\n%#v", path, ff) - } - f, err := os.Create(path) - if err != nil { - return fmt.Errorf("couldn't open %v for writing: %v", path, err) - } - defer f.Close() - _, err = f.Write(raw) - return err -} - -// This does the actual checking, since it knows the literal destination file. -type importRuleFile struct { - context *generator.Context -} - -func (irf importRuleFile) AssembleFile(f *generator.File, path string) error { - return irf.VerifyFile(f, path) -} - -// TODO: make a flag to enable this, or expose this information in some other way. -func (importRuleFile) listEntireImportTree(f *generator.File, path string) error { - // If the file exists, populate its current imports. This is mostly to help - // humans figure out what they need to fix. - if _, err := os.Stat(path); err != nil { - // Ignore packages which haven't opted in by adding an .import-restrictions file. - return nil - } - - current, err := readFile(path) - if err != nil { - return err - } - - current.CurrentImports = []string{} - for v := range f.Imports { - current.CurrentImports = append(current.CurrentImports, v) - } - sort.Strings(current.CurrentImports) - - return writeFile(path, current) -} - -// removeLastDir removes the last directory, but leaves the file name -// unchanged. It returns the new path and the removed directory. So: -// "a/b/c/file" -> ("a/b/file", "c") -func removeLastDir(path string) (newPath, removedDir string) { - dir, file := filepath.Split(path) - dir = strings.TrimSuffix(dir, string(filepath.Separator)) - return filepath.Join(filepath.Dir(dir), file), filepath.Base(dir) -} - -// isGoModRoot checks if a directory is the root directory for a package -// by checking for the existence of a 'go.mod' file in that directory. -func isGoModRoot(path string) bool { - _, err := os.Stat(filepath.Join(filepath.Dir(path), goModFile)) - return err == nil -} - -// recursiveRead collects all '.import-restriction' files, between the current directory, -// and the package root when Go modules are enabled, or $GOPATH/src when they are not. -func recursiveRead(path string) ([]*fileFormat, error) { - restrictionFiles := make([]*fileFormat, 0) - - for { - if _, err := os.Stat(path); err == nil { - rules, err := readFile(path) - if err != nil { - return nil, err - } - - restrictionFiles = append(restrictionFiles, rules) - } - - nextPath, removedDir := removeLastDir(path) - if nextPath == path || isGoModRoot(path) || removedDir == "src" { - break - } - - path = nextPath - } - - return restrictionFiles, nil -} - -func (irf importRuleFile) VerifyFile(f *generator.File, path string) error { - restrictionFiles, err := recursiveRead(filepath.Join(f.PackageSourcePath, f.Name)) - if err != nil { - return fmt.Errorf("error finding rules file: %v", err) - } - - if err := irf.verifyRules(restrictionFiles, f); err != nil { - return err - } - - return irf.verifyInverseRules(restrictionFiles, f) -} - -func (irf importRuleFile) verifyRules(restrictionFiles []*fileFormat, f *generator.File) error { - selectors := make([][]*regexp.Regexp, len(restrictionFiles)) - for i, restrictionFile := range restrictionFiles { - for _, r := range restrictionFile.Rules { - re, err := regexp.Compile(r.SelectorRegexp) - if err != nil { - return fmt.Errorf("regexp `%s` in file %q doesn't compile: %v", r.SelectorRegexp, restrictionFile.path, err) - } - - selectors[i] = append(selectors[i], re) - } - } - - forbiddenImports := map[string]string{} - allowedMismatchedImports := []string{} - - for v := range f.Imports { - explicitlyAllowed := false - - NextRestrictionFiles: - for i, rules := range restrictionFiles { - for j, r := range rules.Rules { - matching := selectors[i][j].MatchString(v) - klog.V(5).Infof("Checking %v matches %v: %v\n", r.SelectorRegexp, v, matching) - if !matching { - continue - } - for _, forbidden := range r.ForbiddenPrefixes { - klog.V(4).Infof("Checking %v against %v\n", v, forbidden) - if strings.HasPrefix(v, forbidden) { - forbiddenImports[v] = forbidden - } - } - for _, allowed := range r.AllowedPrefixes { - klog.V(4).Infof("Checking %v against %v\n", v, allowed) - if strings.HasPrefix(v, allowed) { - explicitlyAllowed = true - break - } - } - - if !explicitlyAllowed { - allowedMismatchedImports = append(allowedMismatchedImports, v) - } else { - klog.V(2).Infof("%v importing %v allowed by %v\n", f.PackagePath, v, restrictionFiles[i].path) - break NextRestrictionFiles - } - } - } - } - - if len(forbiddenImports) > 0 || len(allowedMismatchedImports) > 0 { - var errorBuilder strings.Builder - for i, f := range forbiddenImports { - fmt.Fprintf(&errorBuilder, "import %v has forbidden prefix %v\n", i, f) - } - if len(allowedMismatchedImports) > 0 { - sort.Sort(sort.StringSlice(allowedMismatchedImports)) - fmt.Fprintf(&errorBuilder, "the following imports did not match any allowed prefix:\n") - for _, i := range allowedMismatchedImports { - fmt.Fprintf(&errorBuilder, " %v\n", i) - } - } - return errors.New(errorBuilder.String()) - } - - return nil -} - -// verifyInverseRules checks that all packages that import a package are allowed to import it. -func (irf importRuleFile) verifyInverseRules(restrictionFiles []*fileFormat, f *generator.File) error { - // compile all Selector regex in all restriction files - selectors := make([][]*regexp.Regexp, len(restrictionFiles)) - for i, restrictionFile := range restrictionFiles { - for _, r := range restrictionFile.InverseRules { - re, err := regexp.Compile(r.SelectorRegexp) - if err != nil { - return fmt.Errorf("regexp `%s` in file %q doesn't compile: %v", r.SelectorRegexp, restrictionFile.path, err) - } - - selectors[i] = append(selectors[i], re) - } - } - - directImport := map[string]bool{} - for _, imp := range irf.context.IncomingImports()[f.PackagePath] { - directImport[imp] = true - } - - forbiddenImports := map[string]string{} - allowedMismatchedImports := []string{} - - for _, v := range irf.context.TransitiveIncomingImports()[f.PackagePath] { - explicitlyAllowed := false - - NextRestrictionFiles: - for i, rules := range restrictionFiles { - for j, r := range rules.InverseRules { - if !r.Transitive && !directImport[v] { - continue - } - - re := selectors[i][j] - matching := re.MatchString(v) - klog.V(4).Infof("Checking %v matches %v (importing %v: %v\n", r.SelectorRegexp, v, f.PackagePath, matching) - if !matching { - continue - } - for _, forbidden := range r.ForbiddenPrefixes { - klog.V(4).Infof("Checking %v against %v\n", v, forbidden) - if strings.HasPrefix(v, forbidden) { - forbiddenImports[v] = forbidden - } - } - for _, allowed := range r.AllowedPrefixes { - klog.V(4).Infof("Checking %v against %v\n", v, allowed) - if strings.HasPrefix(v, allowed) { - explicitlyAllowed = true - break - } - } - if !explicitlyAllowed { - allowedMismatchedImports = append(allowedMismatchedImports, v) - } else { - klog.V(2).Infof("%v importing %v allowed by %v\n", v, f.PackagePath, restrictionFiles[i].path) - break NextRestrictionFiles - } - } - } - } - - if len(forbiddenImports) > 0 || len(allowedMismatchedImports) > 0 { - var errorBuilder strings.Builder - for i, f := range forbiddenImports { - fmt.Fprintf(&errorBuilder, "(inverse): import %v has forbidden prefix %v\n", i, f) - } - if len(allowedMismatchedImports) > 0 { - sort.Sort(sort.StringSlice(allowedMismatchedImports)) - fmt.Fprintf(&errorBuilder, "(inverse): the following imports did not match any allowed prefix:\n") - for _, i := range allowedMismatchedImports { - fmt.Fprintf(&errorBuilder, " %v\n", i) - } - } - return errors.New(errorBuilder.String()) - } - - return nil -} - -// importRules produces a file with a set for a single type. -type importRules struct { - myPackage *types.Package - imports namer.ImportTracker -} - -var ( - _ = generator.Generator(&importRules{}) - _ = generator.FileType(importRuleFile{}) -) - -func (r *importRules) Name() string { return "import rules" } -func (r *importRules) Filter(*generator.Context, *types.Type) bool { return false } -func (r *importRules) Namers(*generator.Context) namer.NameSystems { return nil } -func (r *importRules) PackageVars(*generator.Context) []string { return []string{} } -func (r *importRules) PackageConsts(*generator.Context) []string { return []string{} } -func (r *importRules) GenerateType(*generator.Context, *types.Type, io.Writer) error { return nil } -func (r *importRules) Filename() string { return ".import-restrictions" } -func (r *importRules) FileType() string { return importBossFileType } -func (r *importRules) Init(c *generator.Context, w io.Writer) error { return nil } -func (r *importRules) Finalize(*generator.Context, io.Writer) error { return nil } - -func dfsImports(dest *[]string, seen map[string]bool, p *types.Package) { - for _, p2 := range p.Imports { - if seen[p2.Path] { - continue - } - seen[p2.Path] = true - dfsImports(dest, seen, p2) - *dest = append(*dest, p2.Path) - } -} - -func (r *importRules) Imports(*generator.Context) []string { - all := []string{} - dfsImports(&all, map[string]bool{}, r.myPackage) - return all -} diff --git a/vendor/k8s.io/gengo/examples/set-gen/generators/sets.go b/vendor/k8s.io/gengo/examples/set-gen/generators/sets.go deleted file mode 100644 index e89f5ad7616..00000000000 --- a/vendor/k8s.io/gengo/examples/set-gen/generators/sets.go +++ /dev/null @@ -1,378 +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 generators has the generators for the set-gen utility. -package generators - -import ( - "io" - - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - - "k8s.io/klog/v2" -) - -// NameSystems returns the name system used by the generators in this package. -func NameSystems() namer.NameSystems { - return namer.NameSystems{ - "public": namer.NewPublicNamer(0), - "private": namer.NewPrivateNamer(0), - "raw": namer.NewRawNamer("", nil), - } -} - -// DefaultNameSystem returns the default name system for ordering the types to be -// processed by the generators in this package. -func DefaultNameSystem() string { - return "public" -} - -// Packages makes the sets package definition. -func Packages(_ *generator.Context, arguments *args.GeneratorArgs) generator.Packages { - boilerplate, err := arguments.LoadGoBoilerplate() - if err != nil { - klog.Fatalf("Failed loading boilerplate: %v", err) - } - - return generator.Packages{&generator.DefaultPackage{ - PackageName: "sets", - PackagePath: arguments.OutputPackagePath, - HeaderText: boilerplate, - PackageDocumentation: []byte( - `// Package sets has auto-generated set types. -`), - // GeneratorFunc returns a list of generators. Each generator makes a - // single file. - GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - generators = []generator.Generator{ - // Always generate a "doc.go" file. - generator.DefaultGen{OptionalName: "doc"}, - // Make a separate file for the Empty type, since it's shared by every type. - generator.DefaultGen{ - OptionalName: "empty", - OptionalBody: []byte(emptyTypeDecl), - }, - } - // Since we want a file per type that we generate a set for, we - // have to provide a function for this. - for _, t := range c.Order { - generators = append(generators, &genSet{ - DefaultGen: generator.DefaultGen{ - // Use the privatized version of the - // type name as the file name. - // - // TODO: make a namer that converts - // camelCase to '-' separation for file - // names? - OptionalName: c.Namers["private"].Name(t), - }, - outputPackage: arguments.OutputPackagePath, - typeToMatch: t, - imports: generator.NewImportTracker(), - }) - } - return generators - }, - FilterFunc: func(c *generator.Context, t *types.Type) bool { - // It would be reasonable to filter by the type's package here. - // It might be necessary if your input directory has a big - // import graph. - switch t.Kind { - case types.Map, types.Slice, types.Pointer: - // These types can't be keys in a map. - return false - case types.Builtin: - return true - case types.Struct: - // Only some structs can be keys in a map. This is triggered by the line - // // +genset - // or - // // +genset=true - return extractBoolTagOrDie("genset", t.CommentLines) == true - } - return false - }, - }} -} - -// genSet produces a file with a set for a single type. -type genSet struct { - generator.DefaultGen - outputPackage string - typeToMatch *types.Type - imports namer.ImportTracker -} - -// Filter ignores all but one type because we're making a single file per type. -func (g *genSet) Filter(c *generator.Context, t *types.Type) bool { return t == g.typeToMatch } - -func (g *genSet) Namers(c *generator.Context) namer.NameSystems { - return namer.NameSystems{ - "raw": namer.NewRawNamer(g.outputPackage, g.imports), - } -} - -func (g *genSet) Imports(c *generator.Context) (imports []string) { - return append(g.imports.ImportLines(), "reflect", "sort") -} - -// args constructs arguments for templates. Usage: -// g.args(t, "key1", value1, "key2", value2, ...) -// -// 't' is loaded with the key 'type'. -// -// We could use t directly as the argument, but doing it this way makes it easy -// to mix in additional parameters. This feature is not used in this set -// generator, but is present as an example. -func (g *genSet) args(t *types.Type, kv ...interface{}) interface{} { - m := map[interface{}]interface{}{"type": t} - for i := 0; i < len(kv)/2; i++ { - m[kv[i*2]] = kv[i*2+1] - } - return m -} - -// GenerateType makes the body of a file implementing a set for type t. -func (g *genSet) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { - sw := generator.NewSnippetWriter(w, c, "$", "$") - sw.Do(setCode, g.args(t)) - sw.Do("func less$.type|public$(lhs, rhs $.type|raw$) bool {\n", g.args(t)) - g.lessBody(sw, t) - sw.Do("}\n", g.args(t)) - return sw.Error() -} - -func (g *genSet) lessBody(sw *generator.SnippetWriter, t *types.Type) { - // TODO: make this recursive, handle pointers and multiple nested structs... - switch t.Kind { - case types.Struct: - for _, m := range types.FlattenMembers(t.Members) { - sw.Do("if lhs.$.Name$ < rhs.$.Name$ { return true }\n", m) - sw.Do("if lhs.$.Name$ > rhs.$.Name$ { return false }\n", m) - } - sw.Do("return false\n", nil) - default: - sw.Do("return lhs < rhs\n", nil) - } -} - -// written to the "empty.go" file. -var emptyTypeDecl = ` -// Empty is public since it is used by some internal API objects for conversions between external -// string arrays and internal sets, and conversion logic requires public types today. -type Empty struct{} -` - -// Written for every type. If you've never used text/template before: -// $.type$ refers to the source type; |public means to -// call the function giving the public name, |raw the raw type name. -var setCode = `// sets.$.type|public$ is a set of $.type|raw$s, implemented via map[$.type|raw$]struct{} for minimal memory consumption. -type $.type|public$ map[$.type|raw$]Empty - -// New$.type|public$ creates a $.type|public$ from a list of values. -func New$.type|public$(items ...$.type|raw$) $.type|public$ { - ss := make($.type|public$, len(items)) - ss.Insert(items...) - return ss -} - -// $.type|public$KeySet creates a $.type|public$ from a keys of a map[$.type|raw$](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func $.type|public$KeySet(theMap interface{}) $.type|public$ { - v := reflect.ValueOf(theMap) - ret := $.type|public${} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().($.type|raw$)) - } - return ret -} - -// Insert adds items to the set. -func (s $.type|public$) Insert(items ...$.type|raw$) $.type|public$ { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s $.type|public$) Delete(items ...$.type|raw$) $.type|public$ { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s $.type|public$) Has(item $.type|raw$) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s $.type|public$) HasAll(items ...$.type|raw$) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s $.type|public$) HasAny(items ...$.type|raw$) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Clone returns a new set which is a copy of the current set. -func (s $.type|public$) Clone() $.type|public$ { - result := make($.type|public$, len(s)) - for key := range s { - result.Insert(key) - } - return result -} - -// Difference returns a set of objects that are not in s2. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s1 $.type|public$) Difference(s2 $.type|public$) $.type|public$ { - result := New$.type|public$() - for key := range s1 { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.SymmetricDifference(s2) = {a3, a4, a5} -// s2.SymmetricDifference(s1) = {a3, a4, a5} -func (s1 $.type|public$) SymmetricDifference(s2 $.type|public$) $.type|public$ { - return s1.Difference(s2).Union(s2.Difference(s1)) -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 $.type|public$) Union(s2 $.type|public$) $.type|public$ { - result := s1.Clone() - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 $.type|public$) Intersection(s2 $.type|public$) $.type|public$ { - var walk, other $.type|public$ - result := New$.type|public$() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 $.type|public$) IsSuperset(s2 $.type|public$) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 $.type|public$) Equal(s2 $.type|public$) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOf$.type|public$ []$.type|raw$ - -func (s sortableSliceOf$.type|public$) Len() int { return len(s) } -func (s sortableSliceOf$.type|public$) Less(i, j int) bool { return less$.type|public$(s[i], s[j]) } -func (s sortableSliceOf$.type|public$) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted $.type|raw$ slice. -func (s $.type|public$) List() []$.type|raw$ { - res := make(sortableSliceOf$.type|public$, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []$.type|raw$(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s $.type|public$) UnsortedList() []$.type|raw$ { - res :=make([]$.type|raw$, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s $.type|public$) PopAny() ($.type|raw$, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue $.type|raw$ - return zeroValue, false -} - -// Len returns the size of the set. -func (s $.type|public$) Len() int { - return len(s) -} - -` diff --git a/vendor/k8s.io/gengo/examples/set-gen/sets/byte.go b/vendor/k8s.io/gengo/examples/set-gen/sets/byte.go deleted file mode 100644 index e9660c2f3a9..00000000000 --- a/vendor/k8s.io/gengo/examples/set-gen/sets/byte.go +++ /dev/null @@ -1,221 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Byte is a set of bytes, implemented via map[byte]struct{} for minimal memory consumption. -type Byte map[byte]Empty - -// NewByte creates a Byte from a list of values. -func NewByte(items ...byte) Byte { - ss := make(Byte, len(items)) - ss.Insert(items...) - return ss -} - -// ByteKeySet creates a Byte from a keys of a map[byte](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func ByteKeySet(theMap interface{}) Byte { - v := reflect.ValueOf(theMap) - ret := Byte{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(byte)) - } - return ret -} - -// Insert adds items to the set. -func (s Byte) Insert(items ...byte) Byte { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Byte) Delete(items ...byte) Byte { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Byte) Has(item byte) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Byte) HasAll(items ...byte) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Byte) HasAny(items ...byte) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Clone returns a new set which is a copy of the current set. -func (s Byte) Clone() Byte { - result := make(Byte, len(s)) - for key := range s { - result.Insert(key) - } - return result -} - -// Difference returns a set of objects that are not in s2. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s1 Byte) Difference(s2 Byte) Byte { - result := NewByte() - for key := range s1 { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.SymmetricDifference(s2) = {a3, a4, a5} -// s2.SymmetricDifference(s1) = {a3, a4, a5} -func (s1 Byte) SymmetricDifference(s2 Byte) Byte { - return s1.Difference(s2).Union(s2.Difference(s1)) -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Byte) Union(s2 Byte) Byte { - result := s1.Clone() - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Byte) Intersection(s2 Byte) Byte { - var walk, other Byte - result := NewByte() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Byte) IsSuperset(s2 Byte) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Byte) Equal(s2 Byte) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfByte []byte - -func (s sortableSliceOfByte) Len() int { return len(s) } -func (s sortableSliceOfByte) Less(i, j int) bool { return lessByte(s[i], s[j]) } -func (s sortableSliceOfByte) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted byte slice. -func (s Byte) List() []byte { - res := make(sortableSliceOfByte, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []byte(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Byte) UnsortedList() []byte { - res := make([]byte, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Byte) PopAny() (byte, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue byte - return zeroValue, false -} - -// Len returns the size of the set. -func (s Byte) Len() int { - return len(s) -} - -func lessByte(lhs, rhs byte) bool { - return lhs < rhs -} diff --git a/vendor/k8s.io/gengo/examples/set-gen/sets/empty.go b/vendor/k8s.io/gengo/examples/set-gen/sets/empty.go deleted file mode 100644 index e11e622c5ba..00000000000 --- a/vendor/k8s.io/gengo/examples/set-gen/sets/empty.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -// Empty is public since it is used by some internal API objects for conversions between external -// string arrays and internal sets, and conversion logic requires public types today. -type Empty struct{} diff --git a/vendor/k8s.io/gengo/examples/set-gen/sets/int.go b/vendor/k8s.io/gengo/examples/set-gen/sets/int.go deleted file mode 100644 index f614f06e1f9..00000000000 --- a/vendor/k8s.io/gengo/examples/set-gen/sets/int.go +++ /dev/null @@ -1,221 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Int is a set of ints, implemented via map[int]struct{} for minimal memory consumption. -type Int map[int]Empty - -// NewInt creates a Int from a list of values. -func NewInt(items ...int) Int { - ss := make(Int, len(items)) - ss.Insert(items...) - return ss -} - -// IntKeySet creates a Int from a keys of a map[int](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func IntKeySet(theMap interface{}) Int { - v := reflect.ValueOf(theMap) - ret := Int{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(int)) - } - return ret -} - -// Insert adds items to the set. -func (s Int) Insert(items ...int) Int { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Int) Delete(items ...int) Int { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Int) Has(item int) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Int) HasAll(items ...int) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Int) HasAny(items ...int) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Clone returns a new set which is a copy of the current set. -func (s Int) Clone() Int { - result := make(Int, len(s)) - for key := range s { - result.Insert(key) - } - return result -} - -// Difference returns a set of objects that are not in s2. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s1 Int) Difference(s2 Int) Int { - result := NewInt() - for key := range s1 { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.SymmetricDifference(s2) = {a3, a4, a5} -// s2.SymmetricDifference(s1) = {a3, a4, a5} -func (s1 Int) SymmetricDifference(s2 Int) Int { - return s1.Difference(s2).Union(s2.Difference(s1)) -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Int) Union(s2 Int) Int { - result := s1.Clone() - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Int) Intersection(s2 Int) Int { - var walk, other Int - result := NewInt() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Int) IsSuperset(s2 Int) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Int) Equal(s2 Int) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfInt []int - -func (s sortableSliceOfInt) Len() int { return len(s) } -func (s sortableSliceOfInt) Less(i, j int) bool { return lessInt(s[i], s[j]) } -func (s sortableSliceOfInt) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted int slice. -func (s Int) List() []int { - res := make(sortableSliceOfInt, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []int(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Int) UnsortedList() []int { - res := make([]int, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Int) PopAny() (int, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue int - return zeroValue, false -} - -// Len returns the size of the set. -func (s Int) Len() int { - return len(s) -} - -func lessInt(lhs, rhs int) bool { - return lhs < rhs -} diff --git a/vendor/k8s.io/gengo/examples/set-gen/sets/int64.go b/vendor/k8s.io/gengo/examples/set-gen/sets/int64.go deleted file mode 100644 index 995d99bd90d..00000000000 --- a/vendor/k8s.io/gengo/examples/set-gen/sets/int64.go +++ /dev/null @@ -1,221 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Int64 is a set of int64s, implemented via map[int64]struct{} for minimal memory consumption. -type Int64 map[int64]Empty - -// NewInt64 creates a Int64 from a list of values. -func NewInt64(items ...int64) Int64 { - ss := make(Int64, len(items)) - ss.Insert(items...) - return ss -} - -// Int64KeySet creates a Int64 from a keys of a map[int64](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func Int64KeySet(theMap interface{}) Int64 { - v := reflect.ValueOf(theMap) - ret := Int64{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(int64)) - } - return ret -} - -// Insert adds items to the set. -func (s Int64) Insert(items ...int64) Int64 { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Int64) Delete(items ...int64) Int64 { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Int64) Has(item int64) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Int64) HasAll(items ...int64) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Int64) HasAny(items ...int64) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Clone returns a new set which is a copy of the current set. -func (s Int64) Clone() Int64 { - result := make(Int64, len(s)) - for key := range s { - result.Insert(key) - } - return result -} - -// Difference returns a set of objects that are not in s2. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s1 Int64) Difference(s2 Int64) Int64 { - result := NewInt64() - for key := range s1 { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.SymmetricDifference(s2) = {a3, a4, a5} -// s2.SymmetricDifference(s1) = {a3, a4, a5} -func (s1 Int64) SymmetricDifference(s2 Int64) Int64 { - return s1.Difference(s2).Union(s2.Difference(s1)) -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Int64) Union(s2 Int64) Int64 { - result := s1.Clone() - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Int64) Intersection(s2 Int64) Int64 { - var walk, other Int64 - result := NewInt64() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Int64) IsSuperset(s2 Int64) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Int64) Equal(s2 Int64) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfInt64 []int64 - -func (s sortableSliceOfInt64) Len() int { return len(s) } -func (s sortableSliceOfInt64) Less(i, j int) bool { return lessInt64(s[i], s[j]) } -func (s sortableSliceOfInt64) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted int64 slice. -func (s Int64) List() []int64 { - res := make(sortableSliceOfInt64, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []int64(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Int64) UnsortedList() []int64 { - res := make([]int64, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Int64) PopAny() (int64, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue int64 - return zeroValue, false -} - -// Len returns the size of the set. -func (s Int64) Len() int { - return len(s) -} - -func lessInt64(lhs, rhs int64) bool { - return lhs < rhs -} diff --git a/vendor/k8s.io/gengo/examples/set-gen/sets/string.go b/vendor/k8s.io/gengo/examples/set-gen/sets/string.go deleted file mode 100644 index 4a4a92fd21f..00000000000 --- a/vendor/k8s.io/gengo/examples/set-gen/sets/string.go +++ /dev/null @@ -1,221 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption. -type String map[string]Empty - -// NewString creates a String from a list of values. -func NewString(items ...string) String { - ss := make(String, len(items)) - ss.Insert(items...) - return ss -} - -// StringKeySet creates a String from a keys of a map[string](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func StringKeySet(theMap interface{}) String { - v := reflect.ValueOf(theMap) - ret := String{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(string)) - } - return ret -} - -// Insert adds items to the set. -func (s String) Insert(items ...string) String { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s String) Delete(items ...string) String { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s String) Has(item string) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s String) HasAll(items ...string) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s String) HasAny(items ...string) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Clone returns a new set which is a copy of the current set. -func (s String) Clone() String { - result := make(String, len(s)) - for key := range s { - result.Insert(key) - } - return result -} - -// Difference returns a set of objects that are not in s2. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s1 String) Difference(s2 String) String { - result := NewString() - for key := range s1 { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// SymmetricDifference returns a set of elements which are in either of the sets, but not in their intersection. -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.SymmetricDifference(s2) = {a3, a4, a5} -// s2.SymmetricDifference(s1) = {a3, a4, a5} -func (s1 String) SymmetricDifference(s2 String) String { - return s1.Difference(s2).Union(s2.Difference(s1)) -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 String) Union(s2 String) String { - result := s1.Clone() - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 String) Intersection(s2 String) String { - var walk, other String - result := NewString() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 String) IsSuperset(s2 String) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 String) Equal(s2 String) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfString []string - -func (s sortableSliceOfString) Len() int { return len(s) } -func (s sortableSliceOfString) Less(i, j int) bool { return lessString(s[i], s[j]) } -func (s sortableSliceOfString) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted string slice. -func (s String) List() []string { - res := make(sortableSliceOfString, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []string(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s String) UnsortedList() []string { - res := make([]string, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s String) PopAny() (string, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue string - return zeroValue, false -} - -// Len returns the size of the set. -func (s String) Len() int { - return len(s) -} - -func lessString(lhs, rhs string) bool { - return lhs < rhs -} diff --git a/vendor/k8s.io/gengo/generator/default_generator.go b/vendor/k8s.io/gengo/generator/default_generator.go deleted file mode 100644 index f9476682148..00000000000 --- a/vendor/k8s.io/gengo/generator/default_generator.go +++ /dev/null @@ -1,62 +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 generator - -import ( - "io" - - "k8s.io/gengo/namer" - "k8s.io/gengo/types" -) - -const ( - GolangFileType = "golang" -) - -// DefaultGen implements a do-nothing Generator. -// -// It can be used to implement static content files. -type DefaultGen struct { - // OptionalName, if present, will be used for the generator's name, and - // the filename (with ".go" appended). - OptionalName string - - // OptionalBody, if present, will be used as the return from the "Init" - // method. This causes it to be static content for the entire file if - // no other generator touches the file. - OptionalBody []byte -} - -func (d DefaultGen) Name() string { return d.OptionalName } -func (d DefaultGen) Filter(*Context, *types.Type) bool { return true } -func (d DefaultGen) Namers(*Context) namer.NameSystems { return nil } -func (d DefaultGen) Imports(*Context) []string { return []string{} } -func (d DefaultGen) PackageVars(*Context) []string { return []string{} } -func (d DefaultGen) PackageConsts(*Context) []string { return []string{} } -func (d DefaultGen) GenerateType(*Context, *types.Type, io.Writer) error { return nil } -func (d DefaultGen) Filename() string { return d.OptionalName + ".go" } -func (d DefaultGen) FileType() string { return GolangFileType } -func (d DefaultGen) Finalize(*Context, io.Writer) error { return nil } - -func (d DefaultGen) Init(c *Context, w io.Writer) error { - _, err := w.Write(d.OptionalBody) - return err -} - -var ( - _ = Generator(DefaultGen{}) -) diff --git a/vendor/k8s.io/gengo/generator/default_package.go b/vendor/k8s.io/gengo/generator/default_package.go deleted file mode 100644 index dcf0883235d..00000000000 --- a/vendor/k8s.io/gengo/generator/default_package.go +++ /dev/null @@ -1,75 +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 generator - -import ( - "k8s.io/gengo/types" -) - -// DefaultPackage contains a default implementation of Package. -type DefaultPackage struct { - // Short name of package, used in the "package xxxx" line. - PackageName string - // Import path of the package, and the location on disk of the package. - PackagePath string - // The location of the package on disk. - Source string - - // Emitted at the top of every file. - HeaderText []byte - - // Emitted only for a "doc.go" file; appended to the HeaderText for - // that file. - PackageDocumentation []byte - - // If non-nil, will be called on "Generators"; otherwise, the static - // list will be used. So you should set only one of these two fields. - GeneratorFunc func(*Context) []Generator - GeneratorList []Generator - - // Optional; filters the types exposed to the generators. - FilterFunc func(*Context, *types.Type) bool -} - -func (d *DefaultPackage) Name() string { return d.PackageName } -func (d *DefaultPackage) Path() string { return d.PackagePath } -func (d *DefaultPackage) SourcePath() string { return d.Source } - -func (d *DefaultPackage) Filter(c *Context, t *types.Type) bool { - if d.FilterFunc != nil { - return d.FilterFunc(c, t) - } - return true -} - -func (d *DefaultPackage) Generators(c *Context) []Generator { - if d.GeneratorFunc != nil { - return d.GeneratorFunc(c) - } - return d.GeneratorList -} - -func (d *DefaultPackage) Header(filename string) []byte { - if filename == "doc.go" { - return append(d.HeaderText, d.PackageDocumentation...) - } - return d.HeaderText -} - -var ( - _ = Package(&DefaultPackage{}) -) diff --git a/vendor/k8s.io/gengo/generator/doc.go b/vendor/k8s.io/gengo/generator/doc.go deleted file mode 100644 index d8e12534a44..00000000000 --- a/vendor/k8s.io/gengo/generator/doc.go +++ /dev/null @@ -1,31 +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 generator defines an interface for code generators to implement. -// -// To use this package, you'll implement the "Package" and "Generator" -// interfaces; you'll call NewContext to load up the types you want to work -// with, and then you'll call one or more of the Execute methods. See the -// interface definitions for explanations. All output will have gofmt called on -// it automatically, so you do not need to worry about generating correct -// indentation. -// -// This package also exposes SnippetWriter. SnippetWriter reduces to a minimum -// the boilerplate involved in setting up a template from go's text/template -// package. Additionally, all naming systems in the Context will be added as -// functions to the parsed template, so that they can be called directly from -// your templates! -package generator // import "k8s.io/gengo/generator" diff --git a/vendor/k8s.io/gengo/generator/error_tracker.go b/vendor/k8s.io/gengo/generator/error_tracker.go deleted file mode 100644 index 964dae37ba5..00000000000 --- a/vendor/k8s.io/gengo/generator/error_tracker.go +++ /dev/null @@ -1,50 +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 generator - -import ( - "io" -) - -// ErrorTracker tracks errors to the underlying writer, so that you can ignore -// them until you're ready to return. -type ErrorTracker struct { - io.Writer - err error -} - -// NewErrorTracker makes a new error tracker; note that it implements io.Writer. -func NewErrorTracker(w io.Writer) *ErrorTracker { - return &ErrorTracker{Writer: w} -} - -// Write intercepts calls to Write. -func (et *ErrorTracker) Write(p []byte) (n int, err error) { - if et.err != nil { - return 0, et.err - } - n, err = et.Writer.Write(p) - if err != nil { - et.err = err - } - return n, err -} - -// Error returns nil if no error has occurred, otherwise it returns the error. -func (et *ErrorTracker) Error() error { - return et.err -} diff --git a/vendor/k8s.io/gengo/generator/execute.go b/vendor/k8s.io/gengo/generator/execute.go deleted file mode 100644 index f096741bc86..00000000000 --- a/vendor/k8s.io/gengo/generator/execute.go +++ /dev/null @@ -1,329 +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 generator - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "strings" - - "golang.org/x/tools/imports" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" - - "k8s.io/klog/v2" -) - -func errs2strings(errors []error) []string { - strs := make([]string, len(errors)) - for i := range errors { - strs[i] = errors[i].Error() - } - return strs -} - -// ExecutePackages runs the generators for every package in 'packages'. 'outDir' -// is the base directory in which to place all the generated packages; it -// should be a physical path on disk, not an import path. e.g.: -// /path/to/home/path/to/gopath/src/ -// Each package has its import path already, this will be appended to 'outDir'. -func (c *Context) ExecutePackages(outDir string, packages Packages) error { - var errors []error - for _, p := range packages { - if err := c.ExecutePackage(outDir, p); err != nil { - errors = append(errors, err) - } - } - if len(errors) > 0 { - return fmt.Errorf("some packages had errors:\n%v\n", strings.Join(errs2strings(errors), "\n")) - } - return nil -} - -type DefaultFileType struct { - Format func([]byte) ([]byte, error) - Assemble func(io.Writer, *File) -} - -func (ft DefaultFileType) AssembleFile(f *File, pathname string) error { - klog.V(5).Infof("Assembling file %q", pathname) - destFile, err := os.Create(pathname) - if err != nil { - return err - } - defer destFile.Close() - - b := &bytes.Buffer{} - et := NewErrorTracker(b) - ft.Assemble(et, f) - if et.Error() != nil { - return et.Error() - } - if formatted, err := ft.Format(b.Bytes()); err != nil { - err = fmt.Errorf("unable to format file %q (%v).", pathname, err) - // Write the file anyway, so they can see what's going wrong and fix the generator. - if _, err2 := destFile.Write(b.Bytes()); err2 != nil { - return err2 - } - return err - } else { - _, err = destFile.Write(formatted) - return err - } -} - -func (ft DefaultFileType) VerifyFile(f *File, pathname string) error { - klog.V(5).Infof("Verifying file %q", pathname) - friendlyName := filepath.Join(f.PackageName, f.Name) - b := &bytes.Buffer{} - et := NewErrorTracker(b) - ft.Assemble(et, f) - if et.Error() != nil { - return et.Error() - } - formatted, err := ft.Format(b.Bytes()) - if err != nil { - return fmt.Errorf("unable to format the output for %q: %v", friendlyName, err) - } - existing, err := ioutil.ReadFile(pathname) - if err != nil { - return fmt.Errorf("unable to read file %q for comparison: %v", friendlyName, err) - } - if bytes.Compare(formatted, existing) == 0 { - return nil - } - // Be nice and find the first place where they differ - i := 0 - for i < len(formatted) && i < len(existing) && formatted[i] == existing[i] { - i++ - } - eDiff, fDiff := existing[i:], formatted[i:] - if len(eDiff) > 100 { - eDiff = eDiff[:100] - } - if len(fDiff) > 100 { - fDiff = fDiff[:100] - } - return fmt.Errorf("output for %q differs; first existing/expected diff: \n %q\n %q", friendlyName, string(eDiff), string(fDiff)) -} - -func assembleGolangFile(w io.Writer, f *File) { - w.Write(f.Header) - fmt.Fprintf(w, "package %v\n\n", f.PackageName) - - if len(f.Imports) > 0 { - fmt.Fprint(w, "import (\n") - for i := range f.Imports { - if strings.Contains(i, "\"") { - // they included quotes, or are using the - // `name "path/to/pkg"` format. - fmt.Fprintf(w, "\t%s\n", i) - } else { - fmt.Fprintf(w, "\t%q\n", i) - } - } - fmt.Fprint(w, ")\n\n") - } - - if f.Vars.Len() > 0 { - fmt.Fprint(w, "var (\n") - w.Write(f.Vars.Bytes()) - fmt.Fprint(w, ")\n\n") - } - - if f.Consts.Len() > 0 { - fmt.Fprint(w, "const (\n") - w.Write(f.Consts.Bytes()) - fmt.Fprint(w, ")\n\n") - } - - w.Write(f.Body.Bytes()) -} - -func importsWrapper(src []byte) ([]byte, error) { - return imports.Process("", src, nil) -} - -func NewGolangFile() *DefaultFileType { - return &DefaultFileType{ - Format: importsWrapper, - Assemble: assembleGolangFile, - } -} - -// format should be one line only, and not end with \n. -func addIndentHeaderComment(b *bytes.Buffer, format string, args ...interface{}) { - if b.Len() > 0 { - fmt.Fprintf(b, "\n// "+format+"\n", args...) - } else { - fmt.Fprintf(b, "// "+format+"\n", args...) - } -} - -func (c *Context) filteredBy(f func(*Context, *types.Type) bool) *Context { - c2 := *c - c2.Order = []*types.Type{} - for _, t := range c.Order { - if f(c, t) { - c2.Order = append(c2.Order, t) - } - } - return &c2 -} - -// make a new context; inheret c.Namers, but add on 'namers'. In case of a name -// collision, the namer in 'namers' wins. -func (c *Context) addNameSystems(namers namer.NameSystems) *Context { - if namers == nil { - return c - } - c2 := *c - // Copy the existing name systems so we don't corrupt a parent context - c2.Namers = namer.NameSystems{} - for k, v := range c.Namers { - c2.Namers[k] = v - } - - for name, namer := range namers { - c2.Namers[name] = namer - } - return &c2 -} - -// ExecutePackage executes a single package. 'outDir' is the base directory in -// which to place the package; it should be a physical path on disk, not an -// import path. e.g.: '/path/to/home/path/to/gopath/src/' The package knows its -// import path already, this will be appended to 'outDir'. -func (c *Context) ExecutePackage(outDir string, p Package) error { - path := filepath.Join(outDir, p.Path()) - - // When working outside of GOPATH, we typically won't want to generate the - // full path for a package. For example, if our current project's root/base - // package is github.com/foo/bar, outDir=., p.Path()=github.com/foo/bar/generated, - // then we really want to be writing files to ./generated, not ./github.com/foo/bar/generated. - // The following will trim a path prefix (github.com/foo/bar) from p.Path() to arrive at - // a relative path that works with projects not in GOPATH. - if c.TrimPathPrefix != "" { - separator := string(filepath.Separator) - if !strings.HasSuffix(c.TrimPathPrefix, separator) { - c.TrimPathPrefix += separator - } - - path = strings.TrimPrefix(path, c.TrimPathPrefix) - } - klog.V(5).Infof("Processing package %q, disk location %q", p.Name(), path) - // Filter out any types the *package* doesn't care about. - packageContext := c.filteredBy(p.Filter) - os.MkdirAll(path, 0755) - files := map[string]*File{} - for _, g := range p.Generators(packageContext) { - // Filter out types the *generator* doesn't care about. - genContext := packageContext.filteredBy(g.Filter) - // Now add any extra name systems defined by this generator - genContext = genContext.addNameSystems(g.Namers(genContext)) - - fileType := g.FileType() - if len(fileType) == 0 { - return fmt.Errorf("generator %q must specify a file type", g.Name()) - } - f := files[g.Filename()] - if f == nil { - // This is the first generator to reference this file, so start it. - f = &File{ - Name: g.Filename(), - FileType: fileType, - PackageName: p.Name(), - PackagePath: p.Path(), - PackageSourcePath: p.SourcePath(), - Header: p.Header(g.Filename()), - Imports: map[string]struct{}{}, - } - files[f.Name] = f - } else { - if f.FileType != g.FileType() { - return fmt.Errorf("file %q already has type %q, but generator %q wants to use type %q", f.Name, f.FileType, g.Name(), g.FileType()) - } - } - - if vars := g.PackageVars(genContext); len(vars) > 0 { - addIndentHeaderComment(&f.Vars, "Package-wide variables from generator %q.", g.Name()) - for _, v := range vars { - if _, err := fmt.Fprintf(&f.Vars, "%s\n", v); err != nil { - return err - } - } - } - if consts := g.PackageConsts(genContext); len(consts) > 0 { - addIndentHeaderComment(&f.Consts, "Package-wide consts from generator %q.", g.Name()) - for _, v := range consts { - if _, err := fmt.Fprintf(&f.Consts, "%s\n", v); err != nil { - return err - } - } - } - if err := genContext.executeBody(&f.Body, g); err != nil { - return err - } - if imports := g.Imports(genContext); len(imports) > 0 { - for _, i := range imports { - f.Imports[i] = struct{}{} - } - } - } - - var errors []error - for _, f := range files { - finalPath := filepath.Join(path, f.Name) - assembler, ok := c.FileTypes[f.FileType] - if !ok { - return fmt.Errorf("the file type %q registered for file %q does not exist in the context", f.FileType, f.Name) - } - var err error - if c.Verify { - err = assembler.VerifyFile(f, finalPath) - } else { - err = assembler.AssembleFile(f, finalPath) - } - if err != nil { - errors = append(errors, err) - } - } - if len(errors) > 0 { - return fmt.Errorf("errors in package %q:\n%v\n", p.Path(), strings.Join(errs2strings(errors), "\n")) - } - return nil -} - -func (c *Context) executeBody(w io.Writer, generator Generator) error { - et := NewErrorTracker(w) - if err := generator.Init(c, et); err != nil { - return err - } - for _, t := range c.Order { - if err := generator.GenerateType(c, t, et); err != nil { - return err - } - } - if err := generator.Finalize(c, et); err != nil { - return err - } - return et.Error() -} diff --git a/vendor/k8s.io/gengo/generator/import_tracker.go b/vendor/k8s.io/gengo/generator/import_tracker.go deleted file mode 100644 index 99525c40ba0..00000000000 --- a/vendor/k8s.io/gengo/generator/import_tracker.go +++ /dev/null @@ -1,89 +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 generator - -import ( - "go/token" - "strings" - - "k8s.io/klog/v2" - - "k8s.io/gengo/namer" - "k8s.io/gengo/types" -) - -// NewImportTrackerForPackage creates a new import tracker which is aware -// of a generator's output package. The tracker will not add import lines -// when symbols or types are added from the same package, and LocalNameOf -// will return empty string for the output package. -// -// e.g.: -// -// tracker := NewImportTrackerForPackage("bar.com/pkg/foo") -// tracker.AddSymbol(types.Name{"bar.com/pkg/foo.MyType"}) -// tracker.AddSymbol(types.Name{"bar.com/pkg/baz.MyType"}) -// tracker.AddSymbol(types.Name{"bar.com/pkg/baz/baz.MyType"}) -// -// tracker.LocalNameOf("bar.com/pkg/foo") -> "" -// tracker.LocalNameOf("bar.com/pkg/baz") -> "baz" -// tracker.LocalNameOf("bar.com/pkg/baz/baz") -> "bazbaz" -// tracker.ImportLines() -> {`baz "bar.com/pkg/baz"`, `bazbaz "bar.com/pkg/baz/baz"`} -func NewImportTrackerForPackage(local string, typesToAdd ...*types.Type) *namer.DefaultImportTracker { - tracker := namer.NewDefaultImportTracker(types.Name{Package: local}) - tracker.IsInvalidType = func(*types.Type) bool { return false } - tracker.LocalName = func(name types.Name) string { return golangTrackerLocalName(&tracker, name) } - tracker.PrintImport = func(path, name string) string { return name + " \"" + path + "\"" } - - tracker.AddTypes(typesToAdd...) - return &tracker -} - -func NewImportTracker(typesToAdd ...*types.Type) *namer.DefaultImportTracker { - return NewImportTrackerForPackage("", typesToAdd...) -} - -func golangTrackerLocalName(tracker namer.ImportTracker, t types.Name) string { - path := t.Package - - // Using backslashes in package names causes gengo to produce Go code which - // will not compile with the gc compiler. See the comment on GoSeperator. - if strings.ContainsRune(path, '\\') { - klog.Warningf("Warning: backslash used in import path '%v', this is unsupported.\n", path) - } - - dirs := strings.Split(path, namer.GoSeperator) - for n := len(dirs) - 1; n >= 0; n-- { - // follow kube convention of not having anything between directory names - name := strings.Join(dirs[n:], "") - name = strings.Replace(name, "_", "", -1) - // These characters commonly appear in import paths for go - // packages, but aren't legal go names. So we'll sanitize. - name = strings.Replace(name, ".", "", -1) - name = strings.Replace(name, "-", "", -1) - if _, found := tracker.PathOf(name); found { - // This name collides with some other package - continue - } - - // If the import name is a Go keyword, prefix with an underscore. - if token.Lookup(name).IsKeyword() { - name = "_" + name - } - return name - } - panic("can't find import for " + path) -} diff --git a/vendor/k8s.io/gengo/generator/transitive_closure.go b/vendor/k8s.io/gengo/generator/transitive_closure.go deleted file mode 100644 index 385a49fce31..00000000000 --- a/vendor/k8s.io/gengo/generator/transitive_closure.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package generator - -import "sort" - -type edge struct { - from string - to string -} - -func transitiveClosure(in map[string][]string) map[string][]string { - adj := make(map[edge]bool) - imports := make(map[string]struct{}) - for from, tos := range in { - for _, to := range tos { - adj[edge{from, to}] = true - imports[to] = struct{}{} - } - } - - // Warshal's algorithm - for k := range in { - for i := range in { - if !adj[edge{i, k}] { - continue - } - for j := range imports { - if adj[edge{i, j}] { - continue - } - if adj[edge{k, j}] { - adj[edge{i, j}] = true - } - } - } - } - - out := make(map[string][]string, len(in)) - for i := range in { - for j := range imports { - if adj[edge{i, j}] { - out[i] = append(out[i], j) - } - } - - sort.Strings(out[i]) - } - - return out -} diff --git a/vendor/k8s.io/gengo/namer/import_tracker.go b/vendor/k8s.io/gengo/namer/import_tracker.go deleted file mode 100644 index 2bf1d503f94..00000000000 --- a/vendor/k8s.io/gengo/namer/import_tracker.go +++ /dev/null @@ -1,121 +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 namer - -import ( - "sort" - - "k8s.io/gengo/types" -) - -// ImportTracker may be passed to a namer.RawNamer, to track the imports needed -// for the types it names. -// -// TODO: pay attention to the package name (instead of renaming every package). -type DefaultImportTracker struct { - pathToName map[string]string - // forbidden names are in here. (e.g. "go" is a directory in which - // there is code, but "go" is not a legal name for a package, so we put - // it here to prevent us from naming any package "go") - nameToPath map[string]string - local types.Name - - // Returns true if a given types is an invalid type and should be ignored. - IsInvalidType func(*types.Type) bool - // Returns the final local name for the given name - LocalName func(types.Name) string - // Returns the "import" line for a given (path, name). - PrintImport func(string, string) string -} - -func NewDefaultImportTracker(local types.Name) DefaultImportTracker { - return DefaultImportTracker{ - pathToName: map[string]string{}, - nameToPath: map[string]string{}, - local: local, - } -} - -func (tracker *DefaultImportTracker) AddTypes(types ...*types.Type) { - for _, t := range types { - tracker.AddType(t) - } -} -func (tracker *DefaultImportTracker) AddSymbol(symbol types.Name) { - if tracker.local.Package == symbol.Package { - return - } - - if len(symbol.Package) == 0 { - return - } - path := symbol.Path - if len(path) == 0 { - path = symbol.Package - } - if _, ok := tracker.pathToName[path]; ok { - return - } - - name := tracker.LocalName(symbol) - tracker.nameToPath[name] = path - tracker.pathToName[path] = name -} - -func (tracker *DefaultImportTracker) AddType(t *types.Type) { - if tracker.local.Package == t.Name.Package { - return - } - - if tracker.IsInvalidType(t) { - if t.Kind == types.Builtin { - return - } - if _, ok := tracker.nameToPath[t.Name.Package]; !ok { - tracker.nameToPath[t.Name.Package] = "" - } - return - } - - tracker.AddSymbol(t.Name) -} - -func (tracker *DefaultImportTracker) ImportLines() []string { - importPaths := []string{} - for path := range tracker.pathToName { - importPaths = append(importPaths, path) - } - sort.Sort(sort.StringSlice(importPaths)) - out := []string{} - for _, path := range importPaths { - out = append(out, tracker.PrintImport(path, tracker.pathToName[path])) - } - return out -} - -// LocalNameOf returns the name you would use to refer to the package at the -// specified path within the body of a file. -func (tracker *DefaultImportTracker) LocalNameOf(path string) string { - return tracker.pathToName[path] -} - -// PathOf returns the path that a given localName is referring to within the -// body of a file. -func (tracker *DefaultImportTracker) PathOf(localName string) (string, bool) { - name, ok := tracker.nameToPath[localName] - return name, ok -} diff --git a/vendor/k8s.io/gengo/namer/namer.go b/vendor/k8s.io/gengo/namer/namer.go deleted file mode 100644 index a0f1a24abe9..00000000000 --- a/vendor/k8s.io/gengo/namer/namer.go +++ /dev/null @@ -1,395 +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 namer - -import ( - "fmt" - "path/filepath" - "strconv" - "strings" - - "k8s.io/gengo/types" -) - -const ( - // GoSeperator is used to split go import paths. - // Forward slash is used instead of filepath.Seperator because it is the - // only universally-accepted path delimiter and the only delimiter not - // potentially forbidden by Go compilers. (In particular gc does not allow - // the use of backslashes in import paths.) - // See https://golang.org/ref/spec#Import_declarations. - // See also https://github.com/kubernetes/gengo/issues/83#issuecomment-367040772. - GoSeperator = "/" -) - -// Returns whether a name is a private Go name. -func IsPrivateGoName(name string) bool { - return len(name) == 0 || strings.ToLower(name[:1]) == name[:1] -} - -// NewPublicNamer is a helper function that returns a namer that makes -// CamelCase names. See the NameStrategy struct for an explanation of the -// arguments to this constructor. -func NewPublicNamer(prependPackageNames int, ignoreWords ...string) *NameStrategy { - n := &NameStrategy{ - Join: Joiner(IC, IC), - IgnoreWords: map[string]bool{}, - PrependPackageNames: prependPackageNames, - } - for _, w := range ignoreWords { - n.IgnoreWords[w] = true - } - return n -} - -// NewPrivateNamer is a helper function that returns a namer that makes -// camelCase names. See the NameStrategy struct for an explanation of the -// arguments to this constructor. -func NewPrivateNamer(prependPackageNames int, ignoreWords ...string) *NameStrategy { - n := &NameStrategy{ - Join: Joiner(IL, IC), - IgnoreWords: map[string]bool{}, - PrependPackageNames: prependPackageNames, - } - for _, w := range ignoreWords { - n.IgnoreWords[w] = true - } - return n -} - -// NewRawNamer will return a Namer that makes a name by which you would -// directly refer to a type, optionally keeping track of the import paths -// necessary to reference the names it provides. Tracker may be nil. -// The 'pkg' is the full package name, in which the Namer is used - all -// types from that package will be referenced by just type name without -// referencing the package. -// -// For example, if the type is map[string]int, a raw namer will literally -// return "map[string]int". -// -// Or if the type, in package foo, is "type Bar struct { ... }", then the raw -// namer will return "foo.Bar" as the name of the type, and if 'tracker' was -// not nil, will record that package foo needs to be imported. -func NewRawNamer(pkg string, tracker ImportTracker) *rawNamer { - return &rawNamer{pkg: pkg, tracker: tracker} -} - -// Names is a map from Type to name, as defined by some Namer. -type Names map[*types.Type]string - -// Namer takes a type, and assigns a name. -// -// The purpose of this complexity is so that you can assign coherent -// side-by-side systems of names for the types. For example, you might want a -// public interface, a private implementation struct, and also to reference -// literally the type name. -// -// Note that it is safe to call your own Name() function recursively to find -// the names of keys, elements, etc. This is because anonymous types can't have -// cycles in their names, and named types don't require the sort of recursion -// that would be problematic. -type Namer interface { - Name(*types.Type) string -} - -// NameSystems is a map of a system name to a namer for that system. -type NameSystems map[string]Namer - -// NameStrategy is a general Namer. The easiest way to use it is to copy the -// Public/PrivateNamer variables, and modify the members you wish to change. -// -// The Name method produces a name for the given type, of the forms: -// Anonymous types: -// Named types: -// -// In all cases, every part of the name is run through the capitalization -// functions. -// -// The IgnoreWords map can be set if you have directory names that are -// semantically meaningless for naming purposes, e.g. "proto". -// -// Prefix and Suffix can be used to disambiguate parallel systems of type -// names. For example, if you want to generate an interface and an -// implementation, you might want to suffix one with "Interface" and the other -// with "Implementation". Another common use-- if you want to generate private -// types, and one of your source types could be "string", you can't use the -// default lowercase private namer. You'll have to add a suffix or prefix. -type NameStrategy struct { - Prefix, Suffix string - Join func(pre string, parts []string, post string) string - - // Add non-meaningful package directory names here (e.g. "proto") and - // they will be ignored. - IgnoreWords map[string]bool - - // If > 0, prepend exactly that many package directory names (or as - // many as there are). Package names listed in "IgnoreWords" will be - // ignored. - // - // For example, if Ignore words lists "proto" and type Foo is in - // pkg/server/frobbing/proto, then a value of 1 will give a type name - // of FrobbingFoo, 2 gives ServerFrobbingFoo, etc. - PrependPackageNames int - - // A cache of names thus far assigned by this namer. - Names -} - -// IC ensures the first character is uppercase. -func IC(in string) string { - if in == "" { - return in - } - return strings.ToUpper(in[:1]) + in[1:] -} - -// IL ensures the first character is lowercase. -func IL(in string) string { - if in == "" { - return in - } - return strings.ToLower(in[:1]) + in[1:] -} - -// Joiner lets you specify functions that preprocess the various components of -// a name before joining them. You can construct e.g. camelCase or CamelCase or -// any other way of joining words. (See the IC and IL convenience functions.) -func Joiner(first, others func(string) string) func(pre string, in []string, post string) string { - return func(pre string, in []string, post string) string { - tmp := []string{others(pre)} - for i := range in { - tmp = append(tmp, others(in[i])) - } - tmp = append(tmp, others(post)) - return first(strings.Join(tmp, "")) - } -} - -func (ns *NameStrategy) removePrefixAndSuffix(s string) string { - // The join function may have changed capitalization. - lowerIn := strings.ToLower(s) - lowerP := strings.ToLower(ns.Prefix) - lowerS := strings.ToLower(ns.Suffix) - b, e := 0, len(s) - if strings.HasPrefix(lowerIn, lowerP) { - b = len(ns.Prefix) - } - if strings.HasSuffix(lowerIn, lowerS) { - e -= len(ns.Suffix) - } - return s[b:e] -} - -var ( - importPathNameSanitizer = strings.NewReplacer("-", "_", ".", "") -) - -// filters out unwanted directory names and sanitizes remaining names. -func (ns *NameStrategy) filterDirs(path string) []string { - allDirs := strings.Split(path, GoSeperator) - dirs := make([]string, 0, len(allDirs)) - for _, p := range allDirs { - if ns.IgnoreWords == nil || !ns.IgnoreWords[p] { - dirs = append(dirs, importPathNameSanitizer.Replace(p)) - } - } - return dirs -} - -// See the comment on NameStrategy. -func (ns *NameStrategy) Name(t *types.Type) string { - if ns.Names == nil { - ns.Names = Names{} - } - if s, ok := ns.Names[t]; ok { - return s - } - - if t.Name.Package != "" { - dirs := append(ns.filterDirs(t.Name.Package), t.Name.Name) - i := ns.PrependPackageNames + 1 - dn := len(dirs) - if i > dn { - i = dn - } - name := ns.Join(ns.Prefix, dirs[dn-i:], ns.Suffix) - ns.Names[t] = name - return name - } - - // Only anonymous types remain. - var name string - switch t.Kind { - case types.Builtin: - name = ns.Join(ns.Prefix, []string{t.Name.Name}, ns.Suffix) - case types.Map: - name = ns.Join(ns.Prefix, []string{ - "Map", - ns.removePrefixAndSuffix(ns.Name(t.Key)), - "To", - ns.removePrefixAndSuffix(ns.Name(t.Elem)), - }, ns.Suffix) - case types.Slice: - name = ns.Join(ns.Prefix, []string{ - "Slice", - ns.removePrefixAndSuffix(ns.Name(t.Elem)), - }, ns.Suffix) - case types.Array: - name = ns.Join(ns.Prefix, []string{ - "Array", - ns.removePrefixAndSuffix(fmt.Sprintf("%d", t.Len)), - ns.removePrefixAndSuffix(ns.Name(t.Elem)), - }, ns.Suffix) - case types.Pointer: - name = ns.Join(ns.Prefix, []string{ - "Pointer", - ns.removePrefixAndSuffix(ns.Name(t.Elem)), - }, ns.Suffix) - case types.Struct: - names := []string{"Struct"} - for _, m := range t.Members { - names = append(names, ns.removePrefixAndSuffix(ns.Name(m.Type))) - } - name = ns.Join(ns.Prefix, names, ns.Suffix) - case types.Chan: - name = ns.Join(ns.Prefix, []string{ - "Chan", - ns.removePrefixAndSuffix(ns.Name(t.Elem)), - }, ns.Suffix) - case types.Interface: - // TODO: add to name test - names := []string{"Interface"} - for _, m := range t.Methods { - // TODO: include function signature - names = append(names, m.Name.Name) - } - name = ns.Join(ns.Prefix, names, ns.Suffix) - case types.Func: - // TODO: add to name test - parts := []string{"Func"} - for _, pt := range t.Signature.Parameters { - parts = append(parts, ns.removePrefixAndSuffix(ns.Name(pt))) - } - parts = append(parts, "Returns") - for _, rt := range t.Signature.Results { - parts = append(parts, ns.removePrefixAndSuffix(ns.Name(rt))) - } - name = ns.Join(ns.Prefix, parts, ns.Suffix) - default: - name = "unnameable_" + string(t.Kind) - } - ns.Names[t] = name - return name -} - -// ImportTracker allows a raw namer to keep track of the packages needed for -// import. You can implement yourself or use the one in the generation package. -type ImportTracker interface { - AddType(*types.Type) - AddSymbol(types.Name) - LocalNameOf(packagePath string) string - PathOf(localName string) (string, bool) - ImportLines() []string -} - -type rawNamer struct { - pkg string - tracker ImportTracker - Names -} - -// Name makes a name the way you'd write it to literally refer to type t, -// making ordinary assumptions about how you've imported t's package (or using -// r.tracker to specifically track the package imports). -func (r *rawNamer) Name(t *types.Type) string { - if r.Names == nil { - r.Names = Names{} - } - if name, ok := r.Names[t]; ok { - return name - } - if t.Name.Package != "" { - var name string - if r.tracker != nil { - r.tracker.AddType(t) - if t.Name.Package == r.pkg { - name = t.Name.Name - } else { - name = r.tracker.LocalNameOf(t.Name.Package) + "." + t.Name.Name - } - } else { - if t.Name.Package == r.pkg { - name = t.Name.Name - } else { - name = filepath.Base(t.Name.Package) + "." + t.Name.Name - } - } - r.Names[t] = name - return name - } - var name string - switch t.Kind { - case types.Builtin: - name = t.Name.Name - case types.Map: - name = "map[" + r.Name(t.Key) + "]" + r.Name(t.Elem) - case types.Slice: - name = "[]" + r.Name(t.Elem) - case types.Array: - l := strconv.Itoa(int(t.Len)) - name = "[" + l + "]" + r.Name(t.Elem) - case types.Pointer: - name = "*" + r.Name(t.Elem) - case types.Struct: - elems := []string{} - for _, m := range t.Members { - elems = append(elems, m.Name+" "+r.Name(m.Type)) - } - name = "struct{" + strings.Join(elems, "; ") + "}" - case types.Chan: - // TODO: include directionality - name = "chan " + r.Name(t.Elem) - case types.Interface: - // TODO: add to name test - elems := []string{} - for _, m := range t.Methods { - // TODO: include function signature - elems = append(elems, m.Name.Name) - } - name = "interface{" + strings.Join(elems, "; ") + "}" - case types.Func: - // TODO: add to name test - params := []string{} - for _, pt := range t.Signature.Parameters { - params = append(params, r.Name(pt)) - } - results := []string{} - for _, rt := range t.Signature.Results { - results = append(results, r.Name(rt)) - } - name = "func(" + strings.Join(params, ",") + ")" - if len(results) == 1 { - name += " " + results[0] - } else if len(results) > 1 { - name += " (" + strings.Join(results, ",") + ")" - } - default: - name = "unnameable_" + string(t.Kind) - } - r.Names[t] = name - return name -} diff --git a/vendor/k8s.io/gengo/namer/order.go b/vendor/k8s.io/gengo/namer/order.go deleted file mode 100644 index fd89be9b083..00000000000 --- a/vendor/k8s.io/gengo/namer/order.go +++ /dev/null @@ -1,72 +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 namer - -import ( - "sort" - - "k8s.io/gengo/types" -) - -// Orderer produces an ordering of types given a Namer. -type Orderer struct { - Namer -} - -// OrderUniverse assigns a name to every type in the Universe, including Types, -// Functions and Variables, and returns a list sorted by those names. -func (o *Orderer) OrderUniverse(u types.Universe) []*types.Type { - list := tList{ - namer: o.Namer, - } - for _, p := range u { - for _, t := range p.Types { - list.types = append(list.types, t) - } - for _, f := range p.Functions { - list.types = append(list.types, f) - } - for _, v := range p.Variables { - list.types = append(list.types, v) - } - for _, v := range p.Constants { - list.types = append(list.types, v) - } - } - sort.Sort(list) - return list.types -} - -// OrderTypes assigns a name to every type, and returns a list sorted by those -// names. -func (o *Orderer) OrderTypes(typeList []*types.Type) []*types.Type { - list := tList{ - namer: o.Namer, - types: typeList, - } - sort.Sort(list) - return list.types -} - -type tList struct { - namer Namer - types []*types.Type -} - -func (t tList) Len() int { return len(t.types) } -func (t tList) Less(i, j int) bool { return t.namer.Name(t.types[i]) < t.namer.Name(t.types[j]) } -func (t tList) Swap(i, j int) { t.types[i], t.types[j] = t.types[j], t.types[i] } diff --git a/vendor/k8s.io/gengo/parser/parse.go b/vendor/k8s.io/gengo/parser/parse.go deleted file mode 100644 index bbd719295e6..00000000000 --- a/vendor/k8s.io/gengo/parser/parse.go +++ /dev/null @@ -1,925 +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 parser - -import ( - "fmt" - "go/ast" - "go/build" - "go/constant" - "go/parser" - "go/token" - tc "go/types" - "io/ioutil" - "os" - "os/exec" - "path" - "path/filepath" - "regexp" - "sort" - "strings" - - "k8s.io/gengo/types" - "k8s.io/klog/v2" -) - -// This clarifies when a pkg path has been canonicalized. -type importPathString string - -// Builder lets you add all the go files in all the packages that you care -// about, then constructs the type source data. -type Builder struct { - context *build.Context - - // If true, include *_test.go - IncludeTestFiles bool - - // Map of package names to more canonical information about the package. - // This might hold the same value for multiple names, e.g. if someone - // referenced ./pkg/name or in the case of vendoring, which canonicalizes - // differently that what humans would type. - // - // This must only be accessed via getLoadedBuildPackage and setLoadedBuildPackage - buildPackages map[importPathString]*build.Package - - fset *token.FileSet - // map of package path to list of parsed files - parsed map[importPathString][]parsedFile - // map of package path to absolute path (to prevent overlap) - absPaths map[importPathString]string - - // Set by typeCheckPackage(), used by importPackage() and friends. - typeCheckedPackages map[importPathString]*tc.Package - - // Map of package path to whether the user requested it or it was from - // an import. - userRequested map[importPathString]bool - - // All comments from everywhere in every parsed file. - endLineToCommentGroup map[fileLine]*ast.CommentGroup - - // map of package to list of packages it imports. - importGraph map[importPathString]map[string]struct{} -} - -// parsedFile is for tracking files with name -type parsedFile struct { - name string - file *ast.File -} - -// key type for finding comments. -type fileLine struct { - file string - line int -} - -// New constructs a new builder. -func New() *Builder { - c := build.Default - if c.GOROOT == "" { - if p, err := exec.Command("which", "go").CombinedOutput(); err == nil { - // The returned string will have some/path/bin/go, so remove the last two elements. - c.GOROOT = filepath.Dir(filepath.Dir(strings.Trim(string(p), "\n"))) - } else { - klog.Warningf("Warning: $GOROOT not set, and unable to run `which go` to find it: %v\n", err) - } - } - // Force this to off, since we don't properly parse CGo. All symbols must - // have non-CGo equivalents. - c.CgoEnabled = false - return &Builder{ - context: &c, - buildPackages: map[importPathString]*build.Package{}, - typeCheckedPackages: map[importPathString]*tc.Package{}, - fset: token.NewFileSet(), - parsed: map[importPathString][]parsedFile{}, - absPaths: map[importPathString]string{}, - userRequested: map[importPathString]bool{}, - endLineToCommentGroup: map[fileLine]*ast.CommentGroup{}, - importGraph: map[importPathString]map[string]struct{}{}, - } -} - -// AddBuildTags adds the specified build tags to the parse context. -func (b *Builder) AddBuildTags(tags ...string) { - b.context.BuildTags = append(b.context.BuildTags, tags...) -} - -func (b *Builder) getLoadedBuildPackage(importPath string) (*build.Package, bool) { - canonicalized := canonicalizeImportPath(importPath) - if string(canonicalized) != importPath { - klog.V(5).Infof("getLoadedBuildPackage: %s normalized to %s", importPath, canonicalized) - } - buildPkg, ok := b.buildPackages[canonicalized] - return buildPkg, ok -} -func (b *Builder) setLoadedBuildPackage(importPath string, buildPkg *build.Package) { - canonicalizedImportPath := canonicalizeImportPath(importPath) - if string(canonicalizedImportPath) != importPath { - klog.V(5).Infof("setLoadedBuildPackage: importPath %s normalized to %s", importPath, canonicalizedImportPath) - } - - canonicalizedBuildPkgImportPath := canonicalizeImportPath(buildPkg.ImportPath) - if string(canonicalizedBuildPkgImportPath) != buildPkg.ImportPath { - klog.V(5).Infof("setLoadedBuildPackage: buildPkg.ImportPath %s normalized to %s", buildPkg.ImportPath, canonicalizedBuildPkgImportPath) - } - - if canonicalizedImportPath != canonicalizedBuildPkgImportPath { - klog.V(5).Infof("setLoadedBuildPackage: normalized importPath (%s) differs from buildPkg.ImportPath (%s)", canonicalizedImportPath, canonicalizedBuildPkgImportPath) - } - b.buildPackages[canonicalizedImportPath] = buildPkg - b.buildPackages[canonicalizedBuildPkgImportPath] = buildPkg -} - -// Get package information from the go/build package. Automatically excludes -// e.g. test files and files for other platforms-- there is quite a bit of -// logic of that nature in the build package. -func (b *Builder) importBuildPackage(dir string) (*build.Package, error) { - if buildPkg, ok := b.getLoadedBuildPackage(dir); ok { - return buildPkg, nil - } - // This validates the `package foo // github.com/bar/foo` comments. - buildPkg, err := b.importWithMode(dir, build.ImportComment) - if err != nil { - if _, ok := err.(*build.NoGoError); !ok { - return nil, fmt.Errorf("unable to import %q: %v", dir, err) - } - } - if buildPkg == nil { - // Might be an empty directory. Try to just find the dir. - buildPkg, err = b.importWithMode(dir, build.FindOnly) - if err != nil { - return nil, err - } - } - - // Remember it under the user-provided name. - klog.V(5).Infof("saving buildPackage %s", dir) - b.setLoadedBuildPackage(dir, buildPkg) - - return buildPkg, nil -} - -// AddFileForTest adds a file to the set, without verifying that the provided -// pkg actually exists on disk. The pkg must be of the form "canonical/pkg/path" -// and the path must be the absolute path to the file. Because this bypasses -// the normal recursive finding of package dependencies (on disk), test should -// sort their test files topologically first, so all deps are resolved by the -// time we need them. -func (b *Builder) AddFileForTest(pkg string, path string, src []byte) error { - if err := b.addFile(importPathString(pkg), path, src, true); err != nil { - return err - } - if _, err := b.typeCheckPackage(importPathString(pkg), true); err != nil { - return err - } - return nil -} - -// addFile adds a file to the set. The pkgPath must be of the form -// "canonical/pkg/path" and the path must be the absolute path to the file. A -// flag indicates whether this file was user-requested or just from following -// the import graph. -func (b *Builder) addFile(pkgPath importPathString, path string, src []byte, userRequested bool) error { - for _, p := range b.parsed[pkgPath] { - if path == p.name { - klog.V(5).Infof("addFile %s %s already parsed, skipping", pkgPath, path) - return nil - } - } - klog.V(6).Infof("addFile %s %s", pkgPath, path) - p, err := parser.ParseFile(b.fset, path, src, parser.DeclarationErrors|parser.ParseComments) - if err != nil { - return err - } - - // This is redundant with addDir, but some tests call AddFileForTest, which - // call into here without calling addDir. - b.userRequested[pkgPath] = userRequested || b.userRequested[pkgPath] - - b.parsed[pkgPath] = append(b.parsed[pkgPath], parsedFile{path, p}) - for _, c := range p.Comments { - position := b.fset.Position(c.End()) - b.endLineToCommentGroup[fileLine{position.Filename, position.Line}] = c - } - - // We have to get the packages from this specific file, in case the - // user added individual files instead of entire directories. - if b.importGraph[pkgPath] == nil { - b.importGraph[pkgPath] = map[string]struct{}{} - } - for _, im := range p.Imports { - importedPath := strings.Trim(im.Path.Value, `"`) - b.importGraph[pkgPath][importedPath] = struct{}{} - } - return nil -} - -// AddDir adds an entire directory, scanning it for go files. 'dir' should have -// a single go package in it. GOPATH, GOROOT, and the location of your go -// binary (`which go`) will all be searched if dir doesn't literally resolve. -func (b *Builder) AddDir(dir string) error { - _, err := b.importPackage(dir, true) - return err -} - -// AddDirRecursive is just like AddDir, but it also recursively adds -// subdirectories; it returns an error only if the path couldn't be resolved; -// any directories recursed into without go source are ignored. -func (b *Builder) AddDirRecursive(dir string) error { - // Add the root. - if _, err := b.importPackage(dir, true); err != nil { - klog.Warningf("Ignoring directory %v: %v", dir, err) - } - - // filepath.Walk does not follow symlinks. We therefore evaluate symlinks and use that with - // filepath.Walk. - buildPkg, ok := b.getLoadedBuildPackage(dir) - if !ok { - return fmt.Errorf("no loaded build package for %s", dir) - } - realPath, err := filepath.EvalSymlinks(buildPkg.Dir) - if err != nil { - return err - } - - fn := func(filePath string, info os.FileInfo, err error) error { - if info != nil && info.IsDir() { - rel := filepath.ToSlash(strings.TrimPrefix(filePath, realPath)) - if rel != "" { - // Make a pkg path. - buildPkg, ok := b.getLoadedBuildPackage(dir) - if !ok { - return fmt.Errorf("no loaded build package for %s", dir) - } - pkg := path.Join(string(canonicalizeImportPath(buildPkg.ImportPath)), rel) - - // Add it. - if _, err := b.importPackage(pkg, true); err != nil { - klog.Warningf("Ignoring child directory %v: %v", pkg, err) - } - } - } - return nil - } - if err := filepath.Walk(realPath, fn); err != nil { - return err - } - return nil -} - -// AddDirTo adds an entire directory to a given Universe. Unlike AddDir, this -// processes the package immediately, which makes it safe to use from within a -// generator (rather than just at init time. 'dir' must be a single go package. -// GOPATH, GOROOT, and the location of your go binary (`which go`) will all be -// searched if dir doesn't literally resolve. -// Deprecated. Please use AddDirectoryTo. -func (b *Builder) AddDirTo(dir string, u *types.Universe) error { - // We want all types from this package, as if they were directly added - // by the user. They WERE added by the user, in effect. - if _, err := b.importPackage(dir, true); err != nil { - return err - } - pkg, ok := b.getLoadedBuildPackage(dir) - if !ok { - return fmt.Errorf("no such package: %q", dir) - } - return b.findTypesIn(canonicalizeImportPath(pkg.ImportPath), u) -} - -// AddDirectoryTo adds an entire directory to a given Universe. Unlike AddDir, -// this processes the package immediately, which makes it safe to use from -// within a generator (rather than just at init time. 'dir' must be a single go -// package. GOPATH, GOROOT, and the location of your go binary (`which go`) -// will all be searched if dir doesn't literally resolve. -func (b *Builder) AddDirectoryTo(dir string, u *types.Universe) (*types.Package, error) { - // We want all types from this package, as if they were directly added - // by the user. They WERE added by the user, in effect. - if _, err := b.importPackage(dir, true); err != nil { - return nil, err - } - pkg, ok := b.getLoadedBuildPackage(dir) - if !ok || pkg == nil { - return nil, fmt.Errorf("no such package: %q", dir) - } - path := canonicalizeImportPath(pkg.ImportPath) - if err := b.findTypesIn(path, u); err != nil { - return nil, err - } - return u.Package(string(path)), nil -} - -// The implementation of AddDir. A flag indicates whether this directory was -// user-requested or just from following the import graph. -func (b *Builder) addDir(dir string, userRequested bool) error { - klog.V(5).Infof("addDir %s", dir) - buildPkg, err := b.importBuildPackage(dir) - if err != nil { - return err - } - canonicalPackage := canonicalizeImportPath(buildPkg.ImportPath) - pkgPath := canonicalPackage - if dir != string(canonicalPackage) { - klog.V(5).Infof("addDir %s, canonical path is %s", dir, pkgPath) - } - - // Sanity check the pkg dir has not changed. - if prev, found := b.absPaths[pkgPath]; found { - if buildPkg.Dir != prev { - return fmt.Errorf("package %q (%s) previously resolved to %s", pkgPath, buildPkg.Dir, prev) - } - } else { - b.absPaths[pkgPath] = buildPkg.Dir - } - - files := []string{} - files = append(files, buildPkg.GoFiles...) - if b.IncludeTestFiles { - files = append(files, buildPkg.TestGoFiles...) - } - - for _, file := range files { - if !strings.HasSuffix(file, ".go") { - continue - } - absPath := filepath.Join(buildPkg.Dir, file) - data, err := ioutil.ReadFile(absPath) - if err != nil { - return fmt.Errorf("while loading %q: %v", absPath, err) - } - err = b.addFile(pkgPath, absPath, data, userRequested) - if err != nil { - return fmt.Errorf("while parsing %q: %v", absPath, err) - } - } - return nil -} - -// regexErrPackageNotFound helps test the expected error for not finding a package. -var regexErrPackageNotFound = regexp.MustCompile(`^unable to import ".*?":.*`) - -func isErrPackageNotFound(err error) bool { - return regexErrPackageNotFound.MatchString(err.Error()) -} - -// importPackage is a function that will be called by the type check package when it -// needs to import a go package. 'path' is the import path. -func (b *Builder) importPackage(dir string, userRequested bool) (*tc.Package, error) { - klog.V(5).Infof("importPackage %s", dir) - - var pkgPath = importPathString(dir) - - // Get the canonical path if we can. - if buildPkg, _ := b.getLoadedBuildPackage(dir); buildPkg != nil { - canonicalPackage := canonicalizeImportPath(buildPkg.ImportPath) - klog.V(5).Infof("importPackage %s, canonical path is %s", dir, canonicalPackage) - pkgPath = canonicalPackage - } - - // If we have not seen this before, process it now. - ignoreError := false - if _, found := b.parsed[pkgPath]; !found { - // Ignore errors in paths that we're importing solely because - // they're referenced by other packages. - ignoreError = true - - // Add it. - if err := b.addDir(dir, userRequested); err != nil { - if isErrPackageNotFound(err) { - klog.V(6).Info(err) - return nil, nil - } - - return nil, err - } - - // Get the canonical path now that it has been added. - if buildPkg, _ := b.getLoadedBuildPackage(dir); buildPkg != nil { - canonicalPackage := canonicalizeImportPath(buildPkg.ImportPath) - klog.V(5).Infof("importPackage %s, canonical path is %s", dir, canonicalPackage) - pkgPath = canonicalPackage - } - } - - // If it was previously known, just check that the user-requestedness hasn't - // changed. - b.userRequested[pkgPath] = userRequested || b.userRequested[pkgPath] - - // Run the type checker. We may end up doing this to pkgs that are already - // done, or are in the queue to be done later, but it will short-circuit, - // and we can't miss pkgs that are only depended on. - pkg, err := b.typeCheckPackage(pkgPath, !ignoreError) - if err != nil { - switch { - case ignoreError && pkg != nil: - klog.V(4).Infof("type checking encountered some issues in %q, but ignoring.\n", pkgPath) - case !ignoreError && pkg != nil: - klog.V(3).Infof("type checking encountered some errors in %q\n", pkgPath) - return nil, err - default: - return nil, err - } - } - - return pkg, nil -} - -type importAdapter struct { - b *Builder -} - -func (a importAdapter) Import(path string) (*tc.Package, error) { - return a.b.importPackage(path, false) -} - -// typeCheckPackage will attempt to return the package even if there are some -// errors, so you may check whether the package is nil or not even if you get -// an error. -func (b *Builder) typeCheckPackage(pkgPath importPathString, logErr bool) (*tc.Package, error) { - klog.V(5).Infof("typeCheckPackage %s", pkgPath) - if pkg, ok := b.typeCheckedPackages[pkgPath]; ok { - if pkg != nil { - klog.V(6).Infof("typeCheckPackage %s already done", pkgPath) - return pkg, nil - } - // We store a nil right before starting work on a package. So - // if we get here and it's present and nil, that means there's - // another invocation of this function on the call stack - // already processing this package. - return nil, fmt.Errorf("circular dependency for %q", pkgPath) - } - parsedFiles, ok := b.parsed[pkgPath] - if !ok { - return nil, fmt.Errorf("No files for pkg %q", pkgPath) - } - files := make([]*ast.File, len(parsedFiles)) - for i := range parsedFiles { - files[i] = parsedFiles[i].file - } - b.typeCheckedPackages[pkgPath] = nil - c := tc.Config{ - IgnoreFuncBodies: true, - // Note that importAdapter can call b.importPackage which calls this - // method. So there can't be cycles in the import graph. - Importer: importAdapter{b}, - Error: func(err error) { - if logErr { - klog.V(2).Infof("type checker: %v\n", err) - } else { - klog.V(3).Infof("type checker: %v\n", err) - } - }, - } - pkg, err := c.Check(string(pkgPath), b.fset, files, nil) - b.typeCheckedPackages[pkgPath] = pkg // record the result whether or not there was an error - return pkg, err -} - -// FindPackages fetches a list of the user-imported packages. -// Note that you need to call b.FindTypes() first. -func (b *Builder) FindPackages() []string { - // Iterate packages in a predictable order. - pkgPaths := []string{} - for k := range b.typeCheckedPackages { - pkgPaths = append(pkgPaths, string(k)) - } - sort.Strings(pkgPaths) - - result := []string{} - for _, pkgPath := range pkgPaths { - if b.userRequested[importPathString(pkgPath)] { - // Since walkType is recursive, all types that are in packages that - // were directly mentioned will be included. We don't need to - // include all types in all transitive packages, though. - result = append(result, pkgPath) - } - } - return result -} - -// FindTypes finalizes the package imports, and searches through all the -// packages for types. -func (b *Builder) FindTypes() (types.Universe, error) { - // Take a snapshot of pkgs to iterate, since this will recursively mutate - // b.parsed. Iterate in a predictable order. - pkgPaths := []string{} - for pkgPath := range b.parsed { - pkgPaths = append(pkgPaths, string(pkgPath)) - } - sort.Strings(pkgPaths) - - u := types.Universe{} - for _, pkgPath := range pkgPaths { - if err := b.findTypesIn(importPathString(pkgPath), &u); err != nil { - return nil, err - } - } - return u, nil -} - -// addCommentsToType takes any accumulated comment lines prior to obj and -// attaches them to the type t. -func (b *Builder) addCommentsToType(obj tc.Object, t *types.Type) { - c1 := b.priorCommentLines(obj.Pos(), 1) - // c1.Text() is safe if c1 is nil - t.CommentLines = splitLines(c1.Text()) - if c1 == nil { - t.SecondClosestCommentLines = splitLines(b.priorCommentLines(obj.Pos(), 2).Text()) - } else { - t.SecondClosestCommentLines = splitLines(b.priorCommentLines(c1.List[0].Slash, 2).Text()) - } -} - -// findTypesIn finalizes the package import and searches through the package -// for types. -func (b *Builder) findTypesIn(pkgPath importPathString, u *types.Universe) error { - klog.V(5).Infof("findTypesIn %s", pkgPath) - pkg := b.typeCheckedPackages[pkgPath] - if pkg == nil { - return fmt.Errorf("findTypesIn(%s): package is not known", pkgPath) - } - if !b.userRequested[pkgPath] { - // Since walkType is recursive, all types that the - // packages they asked for depend on will be included. - // But we don't need to include all types in all - // *packages* they depend on. - klog.V(5).Infof("findTypesIn %s: package is not user requested", pkgPath) - return nil - } - - // We're keeping this package. This call will create the record. - u.Package(string(pkgPath)).Name = pkg.Name() - u.Package(string(pkgPath)).Path = pkg.Path() - u.Package(string(pkgPath)).SourcePath = b.absPaths[pkgPath] - - for _, f := range b.parsed[pkgPath] { - if _, fileName := filepath.Split(f.name); fileName == "doc.go" { - tp := u.Package(string(pkgPath)) - // findTypesIn might be called multiple times. Clean up tp.Comments - // to avoid repeatedly fill same comments to it. - tp.Comments = []string{} - for i := range f.file.Comments { - tp.Comments = append(tp.Comments, splitLines(f.file.Comments[i].Text())...) - } - if f.file.Doc != nil { - tp.DocComments = splitLines(f.file.Doc.Text()) - } - } - } - - s := pkg.Scope() - for _, n := range s.Names() { - obj := s.Lookup(n) - tn, ok := obj.(*tc.TypeName) - if ok { - t := b.walkType(*u, nil, tn.Type()) - b.addCommentsToType(obj, t) - } - tf, ok := obj.(*tc.Func) - // We only care about functions, not concrete/abstract methods. - if ok && tf.Type() != nil && tf.Type().(*tc.Signature).Recv() == nil { - t := b.addFunction(*u, nil, tf) - b.addCommentsToType(obj, t) - } - tv, ok := obj.(*tc.Var) - if ok && !tv.IsField() { - t := b.addVariable(*u, nil, tv) - b.addCommentsToType(obj, t) - } - tconst, ok := obj.(*tc.Const) - if ok { - t := b.addConstant(*u, nil, tconst) - b.addCommentsToType(obj, t) - } - } - - importedPkgs := []string{} - for k := range b.importGraph[pkgPath] { - importedPkgs = append(importedPkgs, string(k)) - } - sort.Strings(importedPkgs) - for _, p := range importedPkgs { - u.AddImports(string(pkgPath), p) - } - return nil -} - -func (b *Builder) importWithMode(dir string, mode build.ImportMode) (*build.Package, error) { - // This is a bit of a hack. The srcDir argument to Import() should - // properly be the dir of the file which depends on the package to be - // imported, so that vendoring can work properly and local paths can - // resolve. We assume that there is only one level of vendoring, and that - // the CWD is inside the GOPATH, so this should be safe. Nobody should be - // using local (relative) paths except on the CLI, so CWD is also - // sufficient. - cwd, err := os.Getwd() - if err != nil { - return nil, fmt.Errorf("unable to get current directory: %v", err) - } - - // normalize to drop /vendor/ if present - dir = string(canonicalizeImportPath(dir)) - - buildPkg, err := b.context.Import(filepath.ToSlash(dir), cwd, mode) - if err != nil { - return nil, err - } - return buildPkg, nil -} - -// if there's a comment on the line `lines` before pos, return its text, otherwise "". -func (b *Builder) priorCommentLines(pos token.Pos, lines int) *ast.CommentGroup { - position := b.fset.Position(pos) - key := fileLine{position.Filename, position.Line - lines} - return b.endLineToCommentGroup[key] -} - -func splitLines(str string) []string { - return strings.Split(strings.TrimRight(str, "\n"), "\n") -} - -func tcFuncNameToName(in string) types.Name { - name := strings.TrimPrefix(in, "func ") - nameParts := strings.Split(name, "(") - return tcNameToName(nameParts[0]) -} - -func tcVarNameToName(in string) types.Name { - nameParts := strings.Split(in, " ") - // nameParts[0] is "var". - // nameParts[2:] is the type of the variable, we ignore it for now. - return tcNameToName(nameParts[1]) -} - -func tcNameToName(in string) types.Name { - // Detect anonymous type names. (These may have '.' characters because - // embedded types may have packages, so we detect them specially.) - if strings.HasPrefix(in, "struct{") || - strings.HasPrefix(in, "<-chan") || - strings.HasPrefix(in, "chan<-") || - strings.HasPrefix(in, "chan ") || - strings.HasPrefix(in, "func(") || - strings.HasPrefix(in, "func (") || - strings.HasPrefix(in, "*") || - strings.HasPrefix(in, "map[") || - strings.HasPrefix(in, "[") { - return types.Name{Name: in} - } - - // Otherwise, if there are '.' characters present, the name has a - // package path in front. - nameParts := strings.Split(in, ".") - name := types.Name{Name: in} - if n := len(nameParts); n >= 2 { - // The final "." is the name of the type--previous ones must - // have been in the package path. - name.Package, name.Name = strings.Join(nameParts[:n-1], "."), nameParts[n-1] - } - return name -} - -func (b *Builder) convertSignature(u types.Universe, t *tc.Signature) *types.Signature { - signature := &types.Signature{} - for i := 0; i < t.Params().Len(); i++ { - signature.Parameters = append(signature.Parameters, b.walkType(u, nil, t.Params().At(i).Type())) - signature.ParameterNames = append(signature.ParameterNames, t.Params().At(i).Name()) - } - for i := 0; i < t.Results().Len(); i++ { - signature.Results = append(signature.Results, b.walkType(u, nil, t.Results().At(i).Type())) - signature.ResultNames = append(signature.ResultNames, t.Results().At(i).Name()) - } - if r := t.Recv(); r != nil { - signature.Receiver = b.walkType(u, nil, r.Type()) - } - signature.Variadic = t.Variadic() - return signature -} - -// walkType adds the type, and any necessary child types. -func (b *Builder) walkType(u types.Universe, useName *types.Name, in tc.Type) *types.Type { - // Most of the cases are underlying types of the named type. - name := tcNameToName(in.String()) - if useName != nil { - name = *useName - } - - switch t := in.(type) { - case *tc.Struct: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Struct - for i := 0; i < t.NumFields(); i++ { - f := t.Field(i) - m := types.Member{ - Name: f.Name(), - Embedded: f.Anonymous(), - Tags: t.Tag(i), - Type: b.walkType(u, nil, f.Type()), - CommentLines: splitLines(b.priorCommentLines(f.Pos(), 1).Text()), - } - out.Members = append(out.Members, m) - } - return out - case *tc.Map: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Map - out.Elem = b.walkType(u, nil, t.Elem()) - out.Key = b.walkType(u, nil, t.Key()) - return out - case *tc.Pointer: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Pointer - out.Elem = b.walkType(u, nil, t.Elem()) - return out - case *tc.Slice: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Slice - out.Elem = b.walkType(u, nil, t.Elem()) - return out - case *tc.Array: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Array - out.Elem = b.walkType(u, nil, t.Elem()) - out.Len = in.(*tc.Array).Len() - return out - case *tc.Chan: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Chan - out.Elem = b.walkType(u, nil, t.Elem()) - // TODO: need to store direction, otherwise raw type name - // cannot be properly written. - return out - case *tc.Basic: - out := u.Type(types.Name{ - Package: "", - Name: t.Name(), - }) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Unsupported - return out - case *tc.Signature: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Func - out.Signature = b.convertSignature(u, t) - return out - case *tc.Interface: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Interface - t.Complete() - for i := 0; i < t.NumMethods(); i++ { - if out.Methods == nil { - out.Methods = map[string]*types.Type{} - } - method := t.Method(i) - name := tcNameToName(method.String()) - mt := b.walkType(u, &name, method.Type()) - mt.CommentLines = splitLines(b.priorCommentLines(method.Pos(), 1).Text()) - out.Methods[method.Name()] = mt - } - return out - case *tc.Named: - var out *types.Type - switch t.Underlying().(type) { - case *tc.Named, *tc.Basic, *tc.Map, *tc.Slice: - name := tcNameToName(t.String()) - out = u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Alias - out.Underlying = b.walkType(u, nil, t.Underlying()) - default: - // tc package makes everything "named" with an - // underlying anonymous type--we remove that annoying - // "feature" for users. This flattens those types - // together. - name := tcNameToName(t.String()) - if out := u.Type(name); out.Kind != types.Unknown { - return out // short circuit if we've already made this. - } - out = b.walkType(u, &name, t.Underlying()) - } - // If the underlying type didn't already add methods, add them. - // (Interface types will have already added methods.) - if len(out.Methods) == 0 { - for i := 0; i < t.NumMethods(); i++ { - if out.Methods == nil { - out.Methods = map[string]*types.Type{} - } - method := t.Method(i) - name := tcNameToName(method.String()) - mt := b.walkType(u, &name, method.Type()) - mt.CommentLines = splitLines(b.priorCommentLines(method.Pos(), 1).Text()) - out.Methods[method.Name()] = mt - } - } - return out - default: - out := u.Type(name) - if out.Kind != types.Unknown { - return out - } - out.Kind = types.Unsupported - klog.Warningf("Making unsupported type entry %q for: %#v\n", out, t) - return out - } -} - -func (b *Builder) addFunction(u types.Universe, useName *types.Name, in *tc.Func) *types.Type { - name := tcFuncNameToName(in.String()) - if useName != nil { - name = *useName - } - out := u.Function(name) - out.Kind = types.DeclarationOf - out.Underlying = b.walkType(u, nil, in.Type()) - return out -} - -func (b *Builder) addVariable(u types.Universe, useName *types.Name, in *tc.Var) *types.Type { - name := tcVarNameToName(in.String()) - if useName != nil { - name = *useName - } - out := u.Variable(name) - out.Kind = types.DeclarationOf - out.Underlying = b.walkType(u, nil, in.Type()) - return out -} - -func (b *Builder) addConstant(u types.Universe, useName *types.Name, in *tc.Const) *types.Type { - name := tcVarNameToName(in.String()) - if useName != nil { - name = *useName - } - out := u.Constant(name) - out.Kind = types.DeclarationOf - out.Underlying = b.walkType(u, nil, in.Type()) - - var constval string - - // For strings, we use `StringVal()` to get the un-truncated, - // un-quoted string. For other values, `.String()` is preferable to - // get something relatively human readable (especially since for - // floating point types, `ExactString()` will generate numeric - // expressions using `big.(*Float).Text()`. - switch in.Val().Kind() { - case constant.String: - constval = constant.StringVal(in.Val()) - default: - constval = in.Val().String() - } - - out.ConstValue = &constval - return out -} - -// canonicalizeImportPath takes an import path and returns the actual package. -// It doesn't support nested vendoring. -func canonicalizeImportPath(importPath string) importPathString { - if !strings.Contains(importPath, "/vendor/") { - return importPathString(importPath) - } - - return importPathString(importPath[strings.Index(importPath, "/vendor/")+len("/vendor/"):]) -} diff --git a/vendor/k8s.io/gengo/types/comments.go b/vendor/k8s.io/gengo/types/comments.go deleted file mode 100644 index 8150c383875..00000000000 --- a/vendor/k8s.io/gengo/types/comments.go +++ /dev/null @@ -1,82 +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 types contains go type information, packaged in a way that makes -// auto-generation convenient, whether by template or straight go functions. -package types - -import ( - "fmt" - "strings" -) - -// ExtractCommentTags parses comments for lines of the form: -// -// 'marker' + "key=value". -// -// Values are optional; "" is the default. A tag can be specified more than -// one time and all values are returned. If the resulting map has an entry for -// a key, the value (a slice) is guaranteed to have at least 1 element. -// -// Example: if you pass "+" for 'marker', and the following lines are in -// the comments: -// +foo=value1 -// +bar -// +foo=value2 -// +baz="qux" -// Then this function will return: -// map[string][]string{"foo":{"value1, "value2"}, "bar": {""}, "baz": {"qux"}} -func ExtractCommentTags(marker string, lines []string) map[string][]string { - out := map[string][]string{} - for _, line := range lines { - line = strings.Trim(line, " ") - if len(line) == 0 { - continue - } - if !strings.HasPrefix(line, marker) { - continue - } - // TODO: we could support multiple values per key if we split on spaces - kv := strings.SplitN(line[len(marker):], "=", 2) - if len(kv) == 2 { - out[kv[0]] = append(out[kv[0]], kv[1]) - } else if len(kv) == 1 { - out[kv[0]] = append(out[kv[0]], "") - } - } - return out -} - -// ExtractSingleBoolCommentTag parses comments for lines of the form: -// -// 'marker' + "key=value1" -// -// If the tag is not found, the default value is returned. Values are asserted -// to be boolean ("true" or "false"), and any other value will cause an error -// to be returned. If the key has multiple values, the first one will be used. -func ExtractSingleBoolCommentTag(marker string, key string, defaultVal bool, lines []string) (bool, error) { - values := ExtractCommentTags(marker, lines)[key] - if values == nil { - return defaultVal, nil - } - if values[0] == "true" { - return true, nil - } - if values[0] == "false" { - return false, nil - } - return false, fmt.Errorf("tag value for %q is not boolean: %q", key, values[0]) -} diff --git a/vendor/k8s.io/gengo/types/flatten.go b/vendor/k8s.io/gengo/types/flatten.go deleted file mode 100644 index 585014e8ba0..00000000000 --- a/vendor/k8s.io/gengo/types/flatten.go +++ /dev/null @@ -1,57 +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 types - -// FlattenMembers recursively takes any embedded members and puts them in the -// top level, correctly hiding them if the top level hides them. There must not -// be a cycle-- that implies infinite members. -// -// This is useful for e.g. computing all the valid keys in a json struct, -// properly considering any configuration of embedded structs. -func FlattenMembers(m []Member) []Member { - embedded := []Member{} - normal := []Member{} - type nameInfo struct { - top bool - i int - } - names := map[string]nameInfo{} - for i := range m { - if m[i].Embedded && m[i].Type.Kind == Struct { - embedded = append(embedded, m[i]) - } else { - normal = append(normal, m[i]) - names[m[i].Name] = nameInfo{true, len(normal) - 1} - } - } - for i := range embedded { - for _, e := range FlattenMembers(embedded[i].Type.Members) { - if info, found := names[e.Name]; found { - if info.top { - continue - } - if n := normal[info.i]; n.Name == e.Name && n.Type == e.Type { - continue - } - panic("conflicting members") - } - normal = append(normal, e) - names[e.Name] = nameInfo{false, len(normal) - 1} - } - } - return normal -} diff --git a/vendor/k8s.io/gengo/types/types.go b/vendor/k8s.io/gengo/types/types.go deleted file mode 100644 index 77650255acd..00000000000 --- a/vendor/k8s.io/gengo/types/types.go +++ /dev/null @@ -1,537 +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 types - -import "strings" - -// Ref makes a reference to the given type. It can only be used for e.g. -// passing to namers. -func Ref(packageName, typeName string) *Type { - return &Type{Name: Name{ - Name: typeName, - Package: packageName, - }} -} - -// A type name may have a package qualifier. -type Name struct { - // Empty if embedded or builtin. This is the package path unless Path is specified. - Package string - // The type name. - Name string - // An optional location of the type definition for languages that can have disjoint - // packages and paths. - Path string -} - -// String returns the name formatted as a string. -func (n Name) String() string { - if n.Package == "" { - return n.Name - } - return n.Package + "." + n.Name -} - -// ParseFullyQualifiedName parses a name like k8s.io/kubernetes/pkg/api.Pod into a Name. -func ParseFullyQualifiedName(fqn string) Name { - cs := strings.Split(fqn, ".") - pkg := "" - if len(cs) > 1 { - pkg = strings.Join(cs[0:len(cs)-1], ".") - } - return Name{ - Name: cs[len(cs)-1], - Package: pkg, - } -} - -// The possible classes of types. -type Kind string - -const ( - // Builtin is a primitive, like bool, string, int. - Builtin Kind = "Builtin" - Struct Kind = "Struct" - Map Kind = "Map" - Slice Kind = "Slice" - Pointer Kind = "Pointer" - - // Alias is an alias of another type, e.g. in: - // type Foo string - // type Bar Foo - // Bar is an alias of Foo. - // - // In the real go type system, Foo is a "Named" string; but to simplify - // generation, this type system will just say that Foo *is* a builtin. - // We then need "Alias" as a way for us to say that Bar *is* a Foo. - Alias Kind = "Alias" - - // Interface is any type that could have differing types at run time. - Interface Kind = "Interface" - - // Array is just like slice, but has a fixed length. - Array Kind = "Array" - - // The remaining types are included for completeness, but are not well - // supported. - Chan Kind = "Chan" - Func Kind = "Func" - - // DeclarationOf is different from other Kinds; it indicates that instead of - // representing an actual Type, the type is a declaration of an instance of - // a type. E.g., a top-level function, variable, or constant. See the - // comment for Type.Name for more detail. - DeclarationOf Kind = "DeclarationOf" - Unknown Kind = "" - Unsupported Kind = "Unsupported" - - // Protobuf is protobuf type. - Protobuf Kind = "Protobuf" -) - -// Package holds package-level information. -// Fields are public, as everything in this package, to enable consumption by -// templates (for example). But it is strongly encouraged for code to build by -// using the provided functions. -type Package struct { - // Canonical name of this package-- its path. - Path string - - // The location this package was loaded from - SourcePath string - - // Short name of this package; the name that appears in the - // 'package x' line. - Name string - - // The comment right above the package declaration in doc.go, if any. - DocComments []string - - // All comments from doc.go, if any. - // TODO: remove Comments and use DocComments everywhere. - Comments []string - - // Types within this package, indexed by their name (*not* including - // package name). - Types map[string]*Type - - // Functions within this package, indexed by their name (*not* including - // package name). - Functions map[string]*Type - - // Global variables within this package, indexed by their name (*not* including - // package name). - Variables map[string]*Type - - // Global constants within this package, indexed by their name (*not* including - // package name). - Constants map[string]*Type - - // Packages imported by this package, indexed by (canonicalized) - // package path. - Imports map[string]*Package -} - -// Has returns true if the given name references a type known to this package. -func (p *Package) Has(name string) bool { - _, has := p.Types[name] - return has -} - -// Type gets the given Type in this Package. If the Type is not already -// defined, this will add it and return the new Type value. The caller is -// expected to finish initialization. -func (p *Package) Type(typeName string) *Type { - if t, ok := p.Types[typeName]; ok { - return t - } - if p.Path == "" { - // Import the standard builtin types! - if t, ok := builtins.Types[typeName]; ok { - p.Types[typeName] = t - return t - } - } - t := &Type{Name: Name{Package: p.Path, Name: typeName}} - p.Types[typeName] = t - return t -} - -// Function gets the given function Type in this Package. If the function is -// not already defined, this will add it. If a function is added, it's the -// caller's responsibility to finish construction of the function by setting -// Underlying to the correct type. -func (p *Package) Function(funcName string) *Type { - if t, ok := p.Functions[funcName]; ok { - return t - } - t := &Type{Name: Name{Package: p.Path, Name: funcName}} - t.Kind = DeclarationOf - p.Functions[funcName] = t - return t -} - -// Variable gets the given variable Type in this Package. If the variable is -// not already defined, this will add it. If a variable is added, it's the caller's -// responsibility to finish construction of the variable by setting Underlying -// to the correct type. -func (p *Package) Variable(varName string) *Type { - if t, ok := p.Variables[varName]; ok { - return t - } - t := &Type{Name: Name{Package: p.Path, Name: varName}} - t.Kind = DeclarationOf - p.Variables[varName] = t - return t -} - -// Constant gets the given constant Type in this Package. If the constant is -// not already defined, this will add it. If a constant is added, it's the caller's -// responsibility to finish construction of the constant by setting Underlying -// to the correct type. -func (p *Package) Constant(constName string) *Type { - if t, ok := p.Constants[constName]; ok { - return t - } - t := &Type{Name: Name{Package: p.Path, Name: constName}} - t.Kind = DeclarationOf - p.Constants[constName] = t - return t -} - -// HasImport returns true if p imports packageName. Package names include the -// package directory. -func (p *Package) HasImport(packageName string) bool { - _, has := p.Imports[packageName] - return has -} - -// Universe is a map of all packages. The key is the package name, but you -// should use Package(), Type(), Function(), or Variable() instead of direct -// access. -type Universe map[string]*Package - -// Type returns the canonical type for the given fully-qualified name. Builtin -// types will always be found, even if they haven't been explicitly added to -// the map. If a non-existing type is requested, this will create (a marker for) -// it. -func (u Universe) Type(n Name) *Type { - return u.Package(n.Package).Type(n.Name) -} - -// Function returns the canonical function for the given fully-qualified name. -// If a non-existing function is requested, this will create (a marker for) it. -// If a marker is created, it's the caller's responsibility to finish -// construction of the function by setting Underlying to the correct type. -func (u Universe) Function(n Name) *Type { - return u.Package(n.Package).Function(n.Name) -} - -// Variable returns the canonical variable for the given fully-qualified name. -// If a non-existing variable is requested, this will create (a marker for) it. -// If a marker is created, it's the caller's responsibility to finish -// construction of the variable by setting Underlying to the correct type. -func (u Universe) Variable(n Name) *Type { - return u.Package(n.Package).Variable(n.Name) -} - -// Constant returns the canonical constant for the given fully-qualified name. -// If a non-existing constant is requested, this will create (a marker for) it. -// If a marker is created, it's the caller's responsibility to finish -// construction of the constant by setting Underlying to the correct type. -func (u Universe) Constant(n Name) *Type { - return u.Package(n.Package).Constant(n.Name) -} - -// AddImports registers import lines for packageName. May be called multiple times. -// You are responsible for canonicalizing all package paths. -func (u Universe) AddImports(packagePath string, importPaths ...string) { - p := u.Package(packagePath) - for _, i := range importPaths { - p.Imports[i] = u.Package(i) - } -} - -// Package returns the Package for the given path. -// If a non-existing package is requested, this will create (a marker for) it. -// If a marker is created, it's the caller's responsibility to finish -// construction of the package. -func (u Universe) Package(packagePath string) *Package { - if p, ok := u[packagePath]; ok { - return p - } - p := &Package{ - Path: packagePath, - Types: map[string]*Type{}, - Functions: map[string]*Type{}, - Variables: map[string]*Type{}, - Constants: map[string]*Type{}, - Imports: map[string]*Package{}, - } - u[packagePath] = p - return p -} - -// Type represents a subset of possible go types. -type Type struct { - // There are two general categories of types, those explicitly named - // and those anonymous. Named ones will have a non-empty package in the - // name field. - // - // An exception: If Kind == DeclarationOf, then this name is the name of a - // top-level function, variable, or const, and the type can be found in Underlying. - // We do this to allow the naming system to work against these objects, even - // though they aren't strictly speaking types. - Name Name - - // The general kind of this type. - Kind Kind - - // If there are comment lines immediately before the type definition, - // they will be recorded here. - CommentLines []string - - // If there are comment lines preceding the `CommentLines`, they will be - // recorded here. There are two cases: - // --- - // SecondClosestCommentLines - // a blank line - // CommentLines - // type definition - // --- - // - // or - // --- - // SecondClosestCommentLines - // a blank line - // type definition - // --- - SecondClosestCommentLines []string - - // If Kind == Struct - Members []Member - - // If Kind == Map, Slice, Pointer, or Chan - Elem *Type - - // If Kind == Map, this is the map's key type. - Key *Type - - // If Kind == Alias, this is the underlying type. - // If Kind == DeclarationOf, this is the type of the declaration. - Underlying *Type - - // If Kind == Interface, this is the set of all required functions. - // Otherwise, if this is a named type, this is the list of methods that - // type has. (All elements will have Kind=="Func") - Methods map[string]*Type - - // If Kind == func, this is the signature of the function. - Signature *Signature - - // ConstValue contains a stringified constant value if - // Kind == DeclarationOf and this is a constant value - // declaration. For string constants, this field contains - // the entire, un-quoted value. For other types, it contains - // a human-readable literal. - ConstValue *string - - // TODO: Add: - // * channel direction - - // If Kind == Array - Len int64 -} - -// String returns the name of the type. -func (t *Type) String() string { - return t.Name.String() -} - -// IsPrimitive returns whether the type is a built-in type or is an alias to a -// built-in type. For example: strings and aliases of strings are primitives, -// structs are not. -func (t *Type) IsPrimitive() bool { - if t.Kind == Builtin || (t.Kind == Alias && t.Underlying.Kind == Builtin) { - return true - } - return false -} - -// IsAssignable returns whether the type is deep-assignable. For example, -// slices and maps and pointers are shallow copies, but ints and strings are -// complete. -func (t *Type) IsAssignable() bool { - if t.IsPrimitive() { - return true - } - if t.Kind == Struct { - for _, m := range t.Members { - if !m.Type.IsAssignable() { - return false - } - } - return true - } - return false -} - -// IsAnonymousStruct returns true if the type is an anonymous struct or an alias -// to an anonymous struct. -func (t *Type) IsAnonymousStruct() bool { - return (t.Kind == Struct && t.Name.Name == "struct{}") || (t.Kind == Alias && t.Underlying.IsAnonymousStruct()) -} - -// A single struct member -type Member struct { - // The name of the member. - Name string - - // If the member is embedded (anonymous) this will be true, and the - // Name will be the type name. - Embedded bool - - // If there are comment lines immediately before the member in the type - // definition, they will be recorded here. - CommentLines []string - - // If there are tags along with this member, they will be saved here. - Tags string - - // The type of this member. - Type *Type -} - -// String returns the name and type of the member. -func (m Member) String() string { - return m.Name + " " + m.Type.String() -} - -// Signature is a function's signature. -type Signature struct { - // If a method of some type, this is the type it's a member of. - Receiver *Type - Parameters []*Type - ParameterNames []string - Results []*Type - ResultNames []string - - // True if the last in parameter is of the form ...T. - Variadic bool - - // If there are comment lines immediately before this - // signature/method/function declaration, they will be recorded here. - CommentLines []string -} - -// Built in types. -var ( - String = &Type{ - Name: Name{Name: "string"}, - Kind: Builtin, - } - Int64 = &Type{ - Name: Name{Name: "int64"}, - Kind: Builtin, - } - Int32 = &Type{ - Name: Name{Name: "int32"}, - Kind: Builtin, - } - Int16 = &Type{ - Name: Name{Name: "int16"}, - Kind: Builtin, - } - Int = &Type{ - Name: Name{Name: "int"}, - Kind: Builtin, - } - Uint64 = &Type{ - Name: Name{Name: "uint64"}, - Kind: Builtin, - } - Uint32 = &Type{ - Name: Name{Name: "uint32"}, - Kind: Builtin, - } - Uint16 = &Type{ - Name: Name{Name: "uint16"}, - Kind: Builtin, - } - Uint = &Type{ - Name: Name{Name: "uint"}, - Kind: Builtin, - } - Uintptr = &Type{ - Name: Name{Name: "uintptr"}, - Kind: Builtin, - } - Float64 = &Type{ - Name: Name{Name: "float64"}, - Kind: Builtin, - } - Float32 = &Type{ - Name: Name{Name: "float32"}, - Kind: Builtin, - } - Float = &Type{ - Name: Name{Name: "float"}, - Kind: Builtin, - } - Bool = &Type{ - Name: Name{Name: "bool"}, - Kind: Builtin, - } - Byte = &Type{ - Name: Name{Name: "byte"}, - Kind: Builtin, - } - - builtins = &Package{ - Types: map[string]*Type{ - "bool": Bool, - "string": String, - "int": Int, - "int64": Int64, - "int32": Int32, - "int16": Int16, - "int8": Byte, - "uint": Uint, - "uint64": Uint64, - "uint32": Uint32, - "uint16": Uint16, - "uint8": Byte, - "uintptr": Uintptr, - "byte": Byte, - "float": Float, - "float64": Float64, - "float32": Float32, - }, - Imports: map[string]*Package{}, - Path: "", - Name: "", - } -) - -func IsInteger(t *Type) bool { - switch t { - case Int, Int64, Int32, Int16, Uint, Uint64, Uint32, Uint16, Byte: - return true - default: - return false - } -} diff --git a/vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go b/vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go deleted file mode 100644 index 153784ed9b0..00000000000 --- a/vendor/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package args - -import ( - "fmt" - - "github.com/spf13/pflag" -) - -type Args struct { - OutputDir string // must be a directory path - OutputPkg string // must be a Go import-path - OutputFile string - - GoHeaderFile string - - // ReportFilename is added to Args for specifying name of report file used - // by API linter. If specified, API rule violations will be printed to report file. - // Otherwise default value "-" will be used which indicates stdout. - ReportFilename string -} - -// New returns default arguments for the generator. Returning the arguments instead -// of using default flag parsing allows registering custom arguments afterwards -func New() *Args { - args := &Args{} - - // Default value for report filename is "-", which stands for stdout - args.ReportFilename = "-" - - return args -} - -// AddFlags add the generator flags to the flag set. -func (args *Args) AddFlags(fs *pflag.FlagSet) { - fs.StringVar(&args.OutputDir, "output-dir", "", - "the base directory under which to generate results") - fs.StringVar(&args.OutputPkg, "output-pkg", "", - "the base Go import-path under which to generate results") - fs.StringVar(&args.OutputFile, "output-file", "generated.openapi.go", - "the name of the file to be generated") - fs.StringVar(&args.GoHeaderFile, "go-header-file", "", - "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") - fs.StringVarP(&args.ReportFilename, "report-filename", "r", args.ReportFilename, - "Name of report file used by API linter to print API violations. Default \"-\" stands for standard output. NOTE that if valid filename other than \"-\" is specified, API linter won't return error on detected API violations. This allows further check of existing API violations without stopping the OpenAPI generation toolchain.") -} - -// Validate checks the given arguments. -func (args *Args) Validate() error { - if len(args.OutputDir) == 0 { - return fmt.Errorf("--output-dir must be specified") - } - if len(args.OutputPkg) == 0 { - return fmt.Errorf("--output-pkg must be specified") - } - if len(args.OutputFile) == 0 { - return fmt.Errorf("--output-file must be specified") - } - if len(args.ReportFilename) == 0 { - return fmt.Errorf("--report-filename must be specified (use \"-\" for stdout)") - } - return nil -} diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/README.md b/vendor/k8s.io/kube-openapi/pkg/generators/README.md deleted file mode 100644 index 72b4e5fb439..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# Generate OpenAPI definitions - -- To generate definition for a specific type or package add "+k8s:openapi-gen=true" tag to the type/package comment lines. -- To exclude a type or a member from a tagged package/type, add "+k8s:openapi-gen=false" tag to the comment lines. - -# OpenAPI Extensions - -OpenAPI spec can have extensions on types. To define one or more extensions on a type or its member -add `+k8s:openapi-gen=x-kubernetes-$NAME:$VALUE` to the comment lines before type/member. A type/member can -have multiple extensions. The rest of the line in the comment will be used as $VALUE so there is no need to -escape or quote the value string. Extensions can be used to pass more information to client generators or -documentation generators. For example a type might have a friendly name to be displayed in documentation or -being used in a client's fluent interface. - -# Custom OpenAPI type definitions - -Custom types which otherwise don't map directly to OpenAPI can override their -OpenAPI definition by implementing a function named "OpenAPIDefinition" with -the following signature: - -```go - import openapi "k8s.io/kube-openapi/pkg/common" - - // ... - - type Time struct { - time.Time - } - - func (_ Time) OpenAPIDefinition() openapi.OpenAPIDefinition { - return openapi.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "date-time", - }, - }, - } - } -``` - -Alternatively, the type can avoid the "openapi" import by defining the following -methods. The following example produces the same OpenAPI definition as the -example above: - -```go - func (_ Time) OpenAPISchemaType() []string { return []string{"string"} } - func (_ Time) OpenAPISchemaFormat() string { return "date-time" } -``` diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go b/vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go deleted file mode 100644 index 5deff4d5a1f..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/api_linter.go +++ /dev/null @@ -1,219 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package generators - -import ( - "bytes" - "fmt" - "io" - "os" - "sort" - - "k8s.io/kube-openapi/pkg/generators/rules" - - "k8s.io/gengo/v2/generator" - "k8s.io/gengo/v2/types" - "k8s.io/klog/v2" -) - -const apiViolationFileType = "api-violation" - -type apiViolationFile struct { - // Since our file actually is unrelated to the package structure, use a - // path that hasn't been mangled by the framework. - unmangledPath string -} - -func (a apiViolationFile) AssembleFile(f *generator.File, path string) error { - path = a.unmangledPath - klog.V(2).Infof("Assembling file %q", path) - if path == "-" { - _, err := io.Copy(os.Stdout, &f.Body) - return err - } - - output, err := os.Create(path) - if err != nil { - return err - } - defer output.Close() - _, err = io.Copy(output, &f.Body) - return err -} - -func (a apiViolationFile) VerifyFile(f *generator.File, path string) error { - if path == "-" { - // Nothing to verify against. - return nil - } - path = a.unmangledPath - - formatted := f.Body.Bytes() - existing, err := os.ReadFile(path) - if err != nil { - return fmt.Errorf("unable to read file %q for comparison: %v", path, err) - } - if bytes.Compare(formatted, existing) == 0 { - return nil - } - - // Be nice and find the first place where they differ - // (Copied from gengo's default file type) - i := 0 - for i < len(formatted) && i < len(existing) && formatted[i] == existing[i] { - i++ - } - eDiff, fDiff := existing[i:], formatted[i:] - if len(eDiff) > 100 { - eDiff = eDiff[:100] - } - if len(fDiff) > 100 { - fDiff = fDiff[:100] - } - return fmt.Errorf("output for %q differs; first existing/expected diff: \n %q\n %q", path, string(eDiff), string(fDiff)) -} - -func newAPIViolationGen() *apiViolationGen { - return &apiViolationGen{ - linter: newAPILinter(), - } -} - -type apiViolationGen struct { - generator.GoGenerator - - linter *apiLinter -} - -func (v *apiViolationGen) FileType() string { return apiViolationFileType } -func (v *apiViolationGen) Filename() string { - return "this file is ignored by the file assembler" -} - -func (v *apiViolationGen) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { - klog.V(5).Infof("validating API rules for type %v", t) - if err := v.linter.validate(t); err != nil { - return err - } - return nil -} - -// Finalize prints the API rule violations to report file (if specified from -// arguments) or stdout (default) -func (v *apiViolationGen) Finalize(c *generator.Context, w io.Writer) error { - // NOTE: we don't return error here because we assume that the report file will - // get evaluated afterwards to determine if error should be raised. For example, - // you can have make rules that compare the report file with existing known - // violations (whitelist) and determine no error if no change is detected. - v.linter.report(w) - return nil -} - -// apiLinter is the framework hosting multiple API rules and recording API rule -// violations -type apiLinter struct { - // API rules that implement APIRule interface and output API rule violations - rules []APIRule - violations []apiViolation -} - -// newAPILinter creates an apiLinter object with API rules in package rules. Please -// add APIRule here when new API rule is implemented. -func newAPILinter() *apiLinter { - return &apiLinter{ - rules: []APIRule{ - &rules.NamesMatch{}, - &rules.OmitEmptyMatchCase{}, - &rules.ListTypeMissing{}, - }, - } -} - -// apiViolation uniquely identifies single API rule violation -type apiViolation struct { - // Name of rule from APIRule.Name() - rule string - - packageName string - typeName string - - // Optional: name of field that violates API rule. Empty fieldName implies that - // the entire type violates the rule. - field string -} - -// apiViolations implements sort.Interface for []apiViolation based on the fields: rule, -// packageName, typeName and field. -type apiViolations []apiViolation - -func (a apiViolations) Len() int { return len(a) } -func (a apiViolations) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a apiViolations) Less(i, j int) bool { - if a[i].rule != a[j].rule { - return a[i].rule < a[j].rule - } - if a[i].packageName != a[j].packageName { - return a[i].packageName < a[j].packageName - } - if a[i].typeName != a[j].typeName { - return a[i].typeName < a[j].typeName - } - return a[i].field < a[j].field -} - -// APIRule is the interface for validating API rule on Go types -type APIRule interface { - // Validate evaluates API rule on type t and returns a list of field names in - // the type that violate the rule. Empty field name [""] implies the entire - // type violates the rule. - Validate(t *types.Type) ([]string, error) - - // Name returns the name of APIRule - Name() string -} - -// validate runs all API rules on type t and records any API rule violation -func (l *apiLinter) validate(t *types.Type) error { - for _, r := range l.rules { - klog.V(5).Infof("validating API rule %v for type %v", r.Name(), t) - fields, err := r.Validate(t) - if err != nil { - return err - } - for _, field := range fields { - l.violations = append(l.violations, apiViolation{ - rule: r.Name(), - packageName: t.Name.Package, - typeName: t.Name.Name, - field: field, - }) - } - } - return nil -} - -// report prints any API rule violation to writer w and returns error if violation exists -func (l *apiLinter) report(w io.Writer) error { - sort.Sort(apiViolations(l.violations)) - for _, v := range l.violations { - fmt.Fprintf(w, "API rule violation: %s,%s,%s,%s\n", v.rule, v.packageName, v.typeName, v.field) - } - if len(l.violations) > 0 { - return fmt.Errorf("API rule violations exist") - } - return nil -} diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/config.go b/vendor/k8s.io/kube-openapi/pkg/generators/config.go deleted file mode 100644 index 1fbd775985c..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/config.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package generators - -import ( - "path" - - "k8s.io/gengo/v2" - "k8s.io/gengo/v2/generator" - "k8s.io/gengo/v2/namer" - "k8s.io/gengo/v2/types" - "k8s.io/klog/v2" - "k8s.io/kube-openapi/cmd/openapi-gen/args" -) - -type identityNamer struct{} - -func (_ identityNamer) Name(t *types.Type) string { - return t.Name.String() -} - -var _ namer.Namer = identityNamer{} - -// NameSystems returns the name system used by the generators in this package. -func NameSystems() namer.NameSystems { - return namer.NameSystems{ - "raw": namer.NewRawNamer("", nil), - "sorting_namer": identityNamer{}, - } -} - -// DefaultNameSystem returns the default name system for ordering the types to be -// processed by the generators in this package. -func DefaultNameSystem() string { - return "sorting_namer" -} - -func GetTargets(context *generator.Context, args *args.Args) []generator.Target { - boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy) - if err != nil { - klog.Fatalf("Failed loading boilerplate: %v", err) - } - - reportPath := "-" - if args.ReportFilename != "" { - reportPath = args.ReportFilename - } - context.FileTypes[apiViolationFileType] = apiViolationFile{ - unmangledPath: reportPath, - } - - return []generator.Target{ - &generator.SimpleTarget{ - PkgName: path.Base(args.OutputPkg), // `path` vs. `filepath` because packages use '/' - PkgPath: args.OutputPkg, - PkgDir: args.OutputDir, - HeaderComment: boilerplate, - GeneratorsFunc: func(c *generator.Context) (generators []generator.Generator) { - return []generator.Generator{ - newOpenAPIGen( - args.OutputFile, - args.OutputPkg, - ), - newAPIViolationGen(), - } - }, - FilterFunc: apiTypeFilterFunc, - }, - } -} diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/enum.go b/vendor/k8s.io/kube-openapi/pkg/generators/enum.go deleted file mode 100644 index 3db034d6c6f..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/enum.go +++ /dev/null @@ -1,177 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package generators - -import ( - "fmt" - "regexp" - "sort" - "strings" - - "k8s.io/gengo/v2" - "k8s.io/gengo/v2/generator" - "k8s.io/gengo/v2/types" -) - -const tagEnumType = "enum" -const enumTypeDescriptionHeader = "Possible enum values:" - -type enumValue struct { - Name string - Value string - Comment string -} - -type enumType struct { - Name types.Name - Values []*enumValue -} - -// enumMap is a map from the name to the matching enum type. -type enumMap map[types.Name]*enumType - -type enumContext struct { - enumTypes enumMap -} - -func newEnumContext(c *generator.Context) *enumContext { - return &enumContext{enumTypes: parseEnums(c)} -} - -// EnumType checks and finds the enumType for a given type. -// If the given type is a known enum type, returns the enumType, true -// Otherwise, returns nil, false -func (ec *enumContext) EnumType(t *types.Type) (enum *enumType, isEnum bool) { - // if t is a pointer, use its underlying type instead - if t.Kind == types.Pointer { - t = t.Elem - } - enum, ok := ec.enumTypes[t.Name] - return enum, ok -} - -// ValueStrings returns all possible values of the enum type as strings -// the results are sorted and quoted as Go literals. -func (et *enumType) ValueStrings() []string { - var values []string - for _, value := range et.Values { - // use "%q" format to generate a Go literal of the string const value - values = append(values, fmt.Sprintf("%q", value.Value)) - } - sort.Strings(values) - return values -} - -// DescriptionLines returns a description of the enum in this format: -// -// Possible enum values: -// - `"value1"` description 1 -// - `"value2"` description 2 -func (et *enumType) DescriptionLines() []string { - if len(et.Values) == 0 { - return nil - } - var lines []string - for _, value := range et.Values { - lines = append(lines, value.Description()) - } - sort.Strings(lines) - // Prepend an empty string to initiate a new paragraph. - return append([]string{"", enumTypeDescriptionHeader}, lines...) -} - -func parseEnums(c *generator.Context) enumMap { - // First, find the builtin "string" type - stringType := c.Universe.Type(types.Name{Name: "string"}) - - // find all enum types. - enumTypes := make(enumMap) - for _, p := range c.Universe { - for _, t := range p.Types { - if isEnumType(stringType, t) { - if _, ok := enumTypes[t.Name]; !ok { - enumTypes[t.Name] = &enumType{ - Name: t.Name, - } - } - } - } - } - - // find all enum values from constants, and try to match each with its type. - for _, p := range c.Universe { - for _, c := range p.Constants { - enumType := c.Underlying - if _, ok := enumTypes[enumType.Name]; ok { - value := &enumValue{ - Name: c.Name.Name, - Value: *c.ConstValue, - Comment: strings.Join(c.CommentLines, " "), - } - enumTypes[enumType.Name].addIfNotPresent(value) - } - } - } - - return enumTypes -} - -func (et *enumType) addIfNotPresent(value *enumValue) { - // If we already have an enum case with the same value, then ignore this new - // one. This can happen if an enum aliases one from another package and - // re-exports the cases. - for i, existing := range et.Values { - if existing.Value == value.Value { - - // Take the value of the longer comment (or some other deterministic tie breaker) - if len(existing.Comment) < len(value.Comment) || (len(existing.Comment) == len(value.Comment) && existing.Comment > value.Comment) { - et.Values[i] = value - } - - return - } - } - et.Values = append(et.Values, value) -} - -// Description returns the description line for the enumValue -// with the format: -// - `"FooValue"` is the Foo value -func (ev *enumValue) Description() string { - comment := strings.TrimSpace(ev.Comment) - // The comment should starts with the type name, trim it first. - comment = strings.TrimPrefix(comment, ev.Name) - // Trim the possible space after previous step. - comment = strings.TrimSpace(comment) - // The comment may be multiline, cascade all consecutive whitespaces. - comment = whitespaceRegex.ReplaceAllString(comment, " ") - return fmt.Sprintf(" - `%q` %s", ev.Value, comment) -} - -// isEnumType checks if a given type is an enum by the definition -// An enum type should be an alias of string and has tag '+enum' in its comment. -// Additionally, pass the type of builtin 'string' to check against. -func isEnumType(stringType *types.Type, t *types.Type) bool { - return t.Kind == types.Alias && t.Underlying == stringType && hasEnumTag(t) -} - -func hasEnumTag(t *types.Type) bool { - return gengo.ExtractCommentTags("+", t.CommentLines)[tagEnumType] != nil -} - -// whitespaceRegex is the regex for consecutive whitespaces. -var whitespaceRegex = regexp.MustCompile(`\s+`) diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/extension.go b/vendor/k8s.io/kube-openapi/pkg/generators/extension.go deleted file mode 100644 index 42d385416fb..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/extension.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 generators - -import ( - "fmt" - "sort" - "strings" - - "k8s.io/gengo/v2" - "k8s.io/gengo/v2/types" - "k8s.io/kube-openapi/pkg/util/sets" -) - -const extensionPrefix = "x-kubernetes-" - -// extensionAttributes encapsulates common traits for particular extensions. -type extensionAttributes struct { - xName string - kind types.Kind - allowedValues sets.String - enforceArray bool -} - -// Extension tag to openapi extension attributes -var tagToExtension = map[string]extensionAttributes{ - "patchMergeKey": { - xName: "x-kubernetes-patch-merge-key", - kind: types.Slice, - }, - "patchStrategy": { - xName: "x-kubernetes-patch-strategy", - kind: types.Slice, - allowedValues: sets.NewString("merge", "retainKeys"), - }, - "listMapKey": { - xName: "x-kubernetes-list-map-keys", - kind: types.Slice, - enforceArray: true, - }, - "listType": { - xName: "x-kubernetes-list-type", - kind: types.Slice, - allowedValues: sets.NewString("atomic", "set", "map"), - }, - "mapType": { - xName: "x-kubernetes-map-type", - kind: types.Map, - allowedValues: sets.NewString("atomic", "granular"), - }, - "structType": { - xName: "x-kubernetes-map-type", - kind: types.Struct, - allowedValues: sets.NewString("atomic", "granular"), - }, - "validations": { - xName: "x-kubernetes-validations", - kind: types.Slice, - }, -} - -// Extension encapsulates information necessary to generate an OpenAPI extension. -type extension struct { - idlTag string // Example: listType - xName string // Example: x-kubernetes-list-type - values []string // Example: [atomic] -} - -func (e extension) hasAllowedValues() bool { - return tagToExtension[e.idlTag].allowedValues.Len() > 0 -} - -func (e extension) allowedValues() sets.String { - return tagToExtension[e.idlTag].allowedValues -} - -func (e extension) hasKind() bool { - return len(tagToExtension[e.idlTag].kind) > 0 -} - -func (e extension) kind() types.Kind { - return tagToExtension[e.idlTag].kind -} - -func (e extension) validateAllowedValues() error { - // allowedValues not set means no restrictions on values. - if !e.hasAllowedValues() { - return nil - } - // Check for missing value. - if len(e.values) == 0 { - return fmt.Errorf("%s needs a value, none given.", e.idlTag) - } - // For each extension value, validate that it is allowed. - allowedValues := e.allowedValues() - if !allowedValues.HasAll(e.values...) { - return fmt.Errorf("%v not allowed for %s. Allowed values: %v", - e.values, e.idlTag, allowedValues.List()) - } - return nil -} - -func (e extension) validateType(kind types.Kind) error { - // If this extension class has no kind, then don't validate the type. - if !e.hasKind() { - return nil - } - if kind != e.kind() { - return fmt.Errorf("tag %s on type %v; only allowed on type %v", - e.idlTag, kind, e.kind()) - } - return nil -} - -func (e extension) hasMultipleValues() bool { - return len(e.values) > 1 -} - -func (e extension) isAlwaysArrayFormat() bool { - return tagToExtension[e.idlTag].enforceArray -} - -// Returns sorted list of map keys. Needed for deterministic testing. -func sortedMapKeys(m map[string][]string) []string { - keys := make([]string, len(m)) - i := 0 - for k := range m { - keys[i] = k - i++ - } - sort.Strings(keys) - return keys -} - -// Parses comments to return openapi extensions. Returns a list of -// extensions which parsed correctly, as well as a list of the -// parse errors. Validating extensions is performed separately. -// NOTE: Non-empty errors does not mean extensions is empty. -func parseExtensions(comments []string) ([]extension, []error) { - extensions := []extension{} - errors := []error{} - // First, generate extensions from "+k8s:openapi-gen=x-kubernetes-*" annotations. - values := getOpenAPITagValue(comments) - for _, val := range values { - // Example: x-kubernetes-member-tag:member_test - if strings.HasPrefix(val, extensionPrefix) { - parts := strings.SplitN(val, ":", 2) - if len(parts) != 2 { - errors = append(errors, fmt.Errorf("invalid extension value: %v", val)) - continue - } - e := extension{ - idlTag: tagName, // Example: k8s:openapi-gen - xName: parts[0], // Example: x-kubernetes-member-tag - values: []string{parts[1]}, // Example: member_test - } - extensions = append(extensions, e) - } - } - // Next, generate extensions from "idlTags" (e.g. +listType) - tagValues := gengo.ExtractCommentTags("+", comments) - for _, idlTag := range sortedMapKeys(tagValues) { - xAttrs, exists := tagToExtension[idlTag] - if !exists { - continue - } - values := tagValues[idlTag] - e := extension{ - idlTag: idlTag, // listType - xName: xAttrs.xName, // x-kubernetes-list-type - values: values, // [atomic] - } - extensions = append(extensions, e) - } - return extensions, errors -} - -func validateMemberExtensions(extensions []extension, m *types.Member) []error { - errors := []error{} - for _, e := range extensions { - if err := e.validateAllowedValues(); err != nil { - errors = append(errors, err) - } - if err := e.validateType(m.Type.Kind); err != nil { - errors = append(errors, err) - } - } - return errors -} diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/markers.go b/vendor/k8s.io/kube-openapi/pkg/generators/markers.go deleted file mode 100644 index 7f0fe985a6a..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/markers.go +++ /dev/null @@ -1,613 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package generators - -import ( - "encoding/json" - "errors" - "fmt" - "regexp" - "strconv" - "strings" - - "k8s.io/gengo/v2/types" - openapi "k8s.io/kube-openapi/pkg/common" - "k8s.io/kube-openapi/pkg/validation/spec" -) - -type CELTag struct { - Rule string `json:"rule,omitempty"` - Message string `json:"message,omitempty"` - MessageExpression string `json:"messageExpression,omitempty"` - OptionalOldSelf *bool `json:"optionalOldSelf,omitempty"` - Reason string `json:"reason,omitempty"` - FieldPath string `json:"fieldPath,omitempty"` -} - -func (c *CELTag) Validate() error { - if c == nil || *c == (CELTag{}) { - return fmt.Errorf("empty CEL tag is not allowed") - } - - var errs []error - if c.Rule == "" { - errs = append(errs, fmt.Errorf("rule cannot be empty")) - } - if c.Message == "" && c.MessageExpression == "" { - errs = append(errs, fmt.Errorf("message or messageExpression must be set")) - } - if c.Message != "" && c.MessageExpression != "" { - errs = append(errs, fmt.Errorf("message and messageExpression cannot be set at the same time")) - } - - if len(errs) > 0 { - return errors.Join(errs...) - } - - return nil -} - -// commentTags represents the parsed comment tags for a given type. These types are then used to generate schema validations. -// These only include the newer prefixed tags. The older tags are still supported, -// but are not included in this struct. Comment Tags are transformed into a -// *spec.Schema, which is then combined with the older marker comments to produce -// the generated OpenAPI spec. -// -// List of tags not included in this struct: -// -// - +optional -// - +default -// - +listType -// - +listMapKeys -// - +mapType -type commentTags struct { - spec.SchemaProps - - CEL []CELTag `json:"cel,omitempty"` - - // Future markers can all be parsed into this centralized struct... - // Optional bool `json:"optional,omitempty"` - // Default any `json:"default,omitempty"` -} - -// Returns the schema for the given CommentTags instance. -// This is the final authoritative schema for the comment tags -func (c commentTags) ValidationSchema() (*spec.Schema, error) { - res := spec.Schema{ - SchemaProps: c.SchemaProps, - } - - if len(c.CEL) > 0 { - // Convert the CELTag to a map[string]interface{} via JSON - celTagJSON, err := json.Marshal(c.CEL) - if err != nil { - return nil, fmt.Errorf("failed to marshal CEL tag: %w", err) - } - var celTagMap []interface{} - if err := json.Unmarshal(celTagJSON, &celTagMap); err != nil { - return nil, fmt.Errorf("failed to unmarshal CEL tag: %w", err) - } - - res.VendorExtensible.AddExtension("x-kubernetes-validations", celTagMap) - } - - return &res, nil -} - -// validates the parameters in a CommentTags instance. Returns any errors encountered. -func (c commentTags) Validate() error { - - var err error - - if c.MinLength != nil && *c.MinLength < 0 { - err = errors.Join(err, fmt.Errorf("minLength cannot be negative")) - } - if c.MaxLength != nil && *c.MaxLength < 0 { - err = errors.Join(err, fmt.Errorf("maxLength cannot be negative")) - } - if c.MinItems != nil && *c.MinItems < 0 { - err = errors.Join(err, fmt.Errorf("minItems cannot be negative")) - } - if c.MaxItems != nil && *c.MaxItems < 0 { - err = errors.Join(err, fmt.Errorf("maxItems cannot be negative")) - } - if c.MinProperties != nil && *c.MinProperties < 0 { - err = errors.Join(err, fmt.Errorf("minProperties cannot be negative")) - } - if c.MaxProperties != nil && *c.MaxProperties < 0 { - err = errors.Join(err, fmt.Errorf("maxProperties cannot be negative")) - } - if c.Minimum != nil && c.Maximum != nil && *c.Minimum > *c.Maximum { - err = errors.Join(err, fmt.Errorf("minimum %f is greater than maximum %f", *c.Minimum, *c.Maximum)) - } - if (c.ExclusiveMinimum || c.ExclusiveMaximum) && c.Minimum != nil && c.Maximum != nil && *c.Minimum == *c.Maximum { - err = errors.Join(err, fmt.Errorf("exclusiveMinimum/Maximum cannot be set when minimum == maximum")) - } - if c.MinLength != nil && c.MaxLength != nil && *c.MinLength > *c.MaxLength { - err = errors.Join(err, fmt.Errorf("minLength %d is greater than maxLength %d", *c.MinLength, *c.MaxLength)) - } - if c.MinItems != nil && c.MaxItems != nil && *c.MinItems > *c.MaxItems { - err = errors.Join(err, fmt.Errorf("minItems %d is greater than maxItems %d", *c.MinItems, *c.MaxItems)) - } - if c.MinProperties != nil && c.MaxProperties != nil && *c.MinProperties > *c.MaxProperties { - err = errors.Join(err, fmt.Errorf("minProperties %d is greater than maxProperties %d", *c.MinProperties, *c.MaxProperties)) - } - if c.Pattern != "" { - _, e := regexp.Compile(c.Pattern) - if e != nil { - err = errors.Join(err, fmt.Errorf("invalid pattern %q: %v", c.Pattern, e)) - } - } - if c.MultipleOf != nil && *c.MultipleOf == 0 { - err = errors.Join(err, fmt.Errorf("multipleOf cannot be 0")) - } - - for i, celTag := range c.CEL { - celError := celTag.Validate() - if celError == nil { - continue - } - err = errors.Join(err, fmt.Errorf("invalid CEL tag at index %d: %w", i, celError)) - } - - return err -} - -// Performs type-specific validation for CommentTags porameters. Accepts a Type instance and returns any errors encountered during validation. -func (c commentTags) ValidateType(t *types.Type) error { - var err error - - resolvedType := resolveAliasAndPtrType(t) - typeString, _ := openapi.OpenAPITypeFormat(resolvedType.String()) // will be empty for complicated types - - // Structs and interfaces may dynamically be any type, so we cant validate them - // easily. We may be able to if we check that they don't implement all the - // override functions, but for now we just skip them. - if resolvedType.Kind == types.Interface || resolvedType.Kind == types.Struct { - return nil - } - - isArray := resolvedType.Kind == types.Slice || resolvedType.Kind == types.Array - isMap := resolvedType.Kind == types.Map - isString := typeString == "string" - isInt := typeString == "integer" - isFloat := typeString == "number" - - if c.MaxItems != nil && !isArray { - err = errors.Join(err, fmt.Errorf("maxItems can only be used on array types")) - } - if c.MinItems != nil && !isArray { - err = errors.Join(err, fmt.Errorf("minItems can only be used on array types")) - } - if c.UniqueItems && !isArray { - err = errors.Join(err, fmt.Errorf("uniqueItems can only be used on array types")) - } - if c.MaxProperties != nil && !isMap { - err = errors.Join(err, fmt.Errorf("maxProperties can only be used on map types")) - } - if c.MinProperties != nil && !isMap { - err = errors.Join(err, fmt.Errorf("minProperties can only be used on map types")) - } - if c.MinLength != nil && !isString { - err = errors.Join(err, fmt.Errorf("minLength can only be used on string types")) - } - if c.MaxLength != nil && !isString { - err = errors.Join(err, fmt.Errorf("maxLength can only be used on string types")) - } - if c.Pattern != "" && !isString { - err = errors.Join(err, fmt.Errorf("pattern can only be used on string types")) - } - if c.Minimum != nil && !isInt && !isFloat { - err = errors.Join(err, fmt.Errorf("minimum can only be used on numeric types")) - } - if c.Maximum != nil && !isInt && !isFloat { - err = errors.Join(err, fmt.Errorf("maximum can only be used on numeric types")) - } - if c.MultipleOf != nil && !isInt && !isFloat { - err = errors.Join(err, fmt.Errorf("multipleOf can only be used on numeric types")) - } - if c.ExclusiveMinimum && !isInt && !isFloat { - err = errors.Join(err, fmt.Errorf("exclusiveMinimum can only be used on numeric types")) - } - if c.ExclusiveMaximum && !isInt && !isFloat { - err = errors.Join(err, fmt.Errorf("exclusiveMaximum can only be used on numeric types")) - } - - return err -} - -// Parses the given comments into a CommentTags type. Validates the parsed comment tags, and returns the result. -// Accepts an optional type to validate against, and a prefix to filter out markers not related to validation. -// Accepts a prefix to filter out markers not related to validation. -// Returns any errors encountered while parsing or validating the comment tags. -func ParseCommentTags(t *types.Type, comments []string, prefix string) (*spec.Schema, error) { - - markers, err := parseMarkers(comments, prefix) - if err != nil { - return nil, fmt.Errorf("failed to parse marker comments: %w", err) - } - nested, err := nestMarkers(markers) - if err != nil { - return nil, fmt.Errorf("invalid marker comments: %w", err) - } - - // Parse the map into a CommentTags type by marshalling and unmarshalling - // as JSON in leiu of an unstructured converter. - out, err := json.Marshal(nested) - if err != nil { - return nil, fmt.Errorf("failed to marshal marker comments: %w", err) - } - - var commentTags commentTags - if err = json.Unmarshal(out, &commentTags); err != nil { - return nil, fmt.Errorf("failed to unmarshal marker comments: %w", err) - } - - // Validate the parsed comment tags - validationErrors := commentTags.Validate() - - if t != nil { - validationErrors = errors.Join(validationErrors, commentTags.ValidateType(t)) - } - - if validationErrors != nil { - return nil, fmt.Errorf("invalid marker comments: %w", validationErrors) - } - - return commentTags.ValidationSchema() -} - -var ( - allowedKeyCharacterSet = `[:_a-zA-Z0-9\[\]\-]` - valueEmpty = regexp.MustCompile(fmt.Sprintf(`^(%s*)$`, allowedKeyCharacterSet)) - valueAssign = regexp.MustCompile(fmt.Sprintf(`^(%s*)=(.*)$`, allowedKeyCharacterSet)) - valueRawString = regexp.MustCompile(fmt.Sprintf(`^(%s*)>(.*)$`, allowedKeyCharacterSet)) -) - -// extractCommentTags parses comments for lines of the form: -// -// 'marker' + "key=value" -// -// or to specify truthy boolean keys: -// -// 'marker' + "key" -// -// Values are optional; "" is the default. A tag can be specified more than -// one time and all values are returned. Returns a map with an entry for -// for each key and a value. -// -// Similar to version from gengo, but this version support only allows one -// value per key (preferring explicit array indices), supports raw strings -// with concatenation, and limits the usable characters allowed in a key -// (for simpler parsing). -// -// Assignments and empty values have the same syntax as from gengo. Raw strings -// have the syntax: -// -// 'marker' + "key>value" -// 'marker' + "key>value" -// -// Successive usages of the same raw string key results in concatenating each -// line with `\n` in between. It is an error to use `=` to assing to a previously -// assigned key -// (in contrast to types.ExtractCommentTags which allows array-typed -// values to be specified using `=`). -func extractCommentTags(marker string, lines []string) (map[string]string, error) { - out := map[string]string{} - - // Used to track the the line immediately prior to the one being iterated. - // If there was an invalid or ignored line, these values get reset. - lastKey := "" - lastIndex := -1 - lastArrayKey := "" - - var lintErrors []error - - for _, line := range lines { - line = strings.Trim(line, " ") - - // Track the current value of the last vars to use in this loop iteration - // before they are reset for the next iteration. - previousKey := lastKey - previousArrayKey := lastArrayKey - previousIndex := lastIndex - - // Make sure last vars gets reset if we `continue` - lastIndex = -1 - lastArrayKey = "" - lastKey = "" - - if len(line) == 0 { - continue - } else if !strings.HasPrefix(line, marker) { - continue - } - - line = strings.TrimPrefix(line, marker) - - key := "" - value := "" - - if matches := valueAssign.FindStringSubmatch(line); matches != nil { - key = matches[1] - value = matches[2] - - // If key exists, throw error. - // Some of the old kube open-api gen marker comments like - // `+listMapKeys` allowed a list to be specified by writing key=value - // multiple times. - // - // This is not longer supported for the prefixed marker comments. - // This is to prevent confusion with the new array syntax which - // supports lists of objects. - // - // The old marker comments like +listMapKeys will remain functional, - // but new markers will not support it. - if _, ok := out[key]; ok { - return nil, fmt.Errorf("cannot have multiple values for key '%v'", key) - } - - } else if matches := valueEmpty.FindStringSubmatch(line); matches != nil { - key = matches[1] - value = "" - - } else if matches := valueRawString.FindStringSubmatch(line); matches != nil { - toAdd := strings.Trim(string(matches[2]), " ") - - key = matches[1] - - // First usage as a raw string. - if existing, exists := out[key]; !exists { - - // Encode the raw string as JSON to ensure that it is properly escaped. - valueBytes, err := json.Marshal(toAdd) - if err != nil { - return nil, fmt.Errorf("invalid value for key %v: %w", key, err) - } - - value = string(valueBytes) - } else if key != previousKey { - // Successive usages of the same key of a raw string must be - // consecutive - return nil, fmt.Errorf("concatenations to key '%s' must be consecutive with its assignment", key) - } else { - // If it is a consecutive repeat usage, concatenate to the - // existing value. - // - // Decode JSON string, append to it, re-encode JSON string. - // Kinda janky but this is a code-generator... - var unmarshalled string - if err := json.Unmarshal([]byte(existing), &unmarshalled); err != nil { - return nil, fmt.Errorf("invalid value for key %v: %w", key, err) - } else { - unmarshalled += "\n" + toAdd - valueBytes, err := json.Marshal(unmarshalled) - if err != nil { - return nil, fmt.Errorf("invalid value for key %v: %w", key, err) - } - - value = string(valueBytes) - } - } - } else { - // Comment has the correct prefix, but incorrect syntax, so it is an - // error - return nil, fmt.Errorf("invalid marker comment does not match expected `+key=` pattern: %v", line) - } - - out[key] = value - lastKey = key - - // Lint the array subscript for common mistakes. This only lints the last - // array index used, (since we do not have a need for nested arrays yet - // in markers) - if arrayPath, index, hasSubscript, err := extractArraySubscript(key); hasSubscript { - // If index is non-zero, check that that previous line was for the same - // key and either the same or previous index - if err != nil { - lintErrors = append(lintErrors, fmt.Errorf("error parsing %v: expected integer index in key '%v'", line, key)) - } else if previousArrayKey != arrayPath && index != 0 { - lintErrors = append(lintErrors, fmt.Errorf("error parsing %v: non-consecutive index %v for key '%v'", line, index, arrayPath)) - } else if index != previousIndex+1 && index != previousIndex { - lintErrors = append(lintErrors, fmt.Errorf("error parsing %v: non-consecutive index %v for key '%v'", line, index, arrayPath)) - } - - lastIndex = index - lastArrayKey = arrayPath - } - } - - if len(lintErrors) > 0 { - return nil, errors.Join(lintErrors...) - } - - return out, nil -} - -// Extracts and parses the given marker comments into a map of key -> value. -// Accepts a prefix to filter out markers not related to validation. -// The prefix is removed from the key in the returned map. -// Empty keys and invalid values will return errors, refs are currently unsupported and will be skipped. -func parseMarkers(markerComments []string, prefix string) (map[string]any, error) { - markers, err := extractCommentTags(prefix, markerComments) - if err != nil { - return nil, err - } - - // Parse the values as JSON - result := map[string]any{} - for key, value := range markers { - var unmarshalled interface{} - - if len(key) == 0 { - return nil, fmt.Errorf("cannot have empty key for marker comment") - } else if _, ok := parseSymbolReference(value, ""); ok { - // Skip ref markers - continue - } else if len(value) == 0 { - // Empty value means key is implicitly a bool - result[key] = true - } else if err := json.Unmarshal([]byte(value), &unmarshalled); err != nil { - // Not valid JSON, throw error - return nil, fmt.Errorf("failed to parse value for key %v as JSON: %w", key, err) - } else { - // Is is valid JSON, use as a JSON value - result[key] = unmarshalled - } - } - return result, nil -} - -// Converts a map of: -// -// "a:b:c": 1 -// "a:b:d": 2 -// "a:e": 3 -// "f": 4 -// -// Into: -// -// map[string]any{ -// "a": map[string]any{ -// "b": map[string]any{ -// "c": 1, -// "d": 2, -// }, -// "e": 3, -// }, -// "f": 4, -// } -// -// Returns a list of joined errors for any invalid keys. See putNestedValue for more details. -func nestMarkers(markers map[string]any) (map[string]any, error) { - nested := make(map[string]any) - var errs []error - for key, value := range markers { - var err error - keys := strings.Split(key, ":") - - if err = putNestedValue(nested, keys, value); err != nil { - errs = append(errs, err) - } - } - - if len(errs) > 0 { - return nil, errors.Join(errs...) - } - - return nested, nil -} - -// Recursively puts a value into the given keypath, creating intermediate maps -// and slices as needed. If a key is of the form `foo[bar]`, then bar will be -// treated as an index into the array foo. If bar is not a valid integer, putNestedValue returns an error. -func putNestedValue(m map[string]any, k []string, v any) error { - if len(k) == 0 { - return nil - } - - key := k[0] - rest := k[1:] - - // Array case - if arrayKeyWithoutSubscript, index, hasSubscript, err := extractArraySubscript(key); err != nil { - return fmt.Errorf("error parsing subscript for key %v: %w", key, err) - } else if hasSubscript { - key = arrayKeyWithoutSubscript - var arrayDestination []any - if existing, ok := m[key]; !ok { - arrayDestination = make([]any, index+1) - } else if existing, ok := existing.([]any); !ok { - // Error case. Existing isn't of correct type. Can happen if - // someone is subscripting a field that was previously not an array - return fmt.Errorf("expected []any at key %v, got %T", key, existing) - } else if index >= len(existing) { - // Ensure array is big enough - arrayDestination = append(existing, make([]any, index-len(existing)+1)...) - } else { - arrayDestination = existing - } - - m[key] = arrayDestination - if arrayDestination[index] == nil { - // Doesn't exist case, create the destination. - // Assumes the destination is a map for now. Theoretically could be - // extended to support arrays of arrays, but that's not needed yet. - destination := make(map[string]any) - arrayDestination[index] = destination - if err = putNestedValue(destination, rest, v); err != nil { - return err - } - } else if dst, ok := arrayDestination[index].(map[string]any); ok { - // Already exists case, correct type - if putNestedValue(dst, rest, v); err != nil { - return err - } - } else { - // Already exists, incorrect type. Error - // This shouldn't be possible. - return fmt.Errorf("expected map at %v[%v], got %T", key, index, arrayDestination[index]) - } - - return nil - } else if len(rest) == 0 { - // Base case. Single key. Just set into destination - m[key] = v - return nil - } - - if existing, ok := m[key]; !ok { - destination := make(map[string]any) - m[key] = destination - return putNestedValue(destination, rest, v) - } else if destination, ok := existing.(map[string]any); ok { - return putNestedValue(destination, rest, v) - } else { - // Error case. Existing isn't of correct type. Can happen if prior comment - // referred to value as an error - return fmt.Errorf("expected map[string]any at key %v, got %T", key, existing) - } -} - -// extractArraySubscript extracts the left array subscript from a key of -// the form `foo[bar][baz]` -> "bar". -// Returns the key without the subscript, the index, and a bool indicating if -// the key had a subscript. -// If the key has a subscript, but the subscript is not a valid integer, returns an error. -// -// This can be adapted to support multidimensional subscripts probably fairly -// easily by retuning a list of ints -func extractArraySubscript(str string) (string, int, bool, error) { - subscriptIdx := strings.Index(str, "[") - if subscriptIdx == -1 { - return "", -1, false, nil - } - - subscript := strings.Split(str[subscriptIdx+1:], "]")[0] - if len(subscript) == 0 { - return "", -1, false, fmt.Errorf("empty subscript not allowed") - } - - index, err := strconv.Atoi(subscript) - if err != nil { - return "", -1, false, fmt.Errorf("expected integer index in key %v", str) - } else if index < 0 { - return "", -1, false, fmt.Errorf("subscript '%v' is invalid. index must be positive", subscript) - } - - return str[:subscriptIdx], index, true, nil -} diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go b/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go deleted file mode 100644 index 1ffcf909491..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go +++ /dev/null @@ -1,1024 +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 generators - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "path" - "reflect" - "regexp" - "sort" - "strings" - - "k8s.io/gengo/v2" - "k8s.io/gengo/v2/generator" - "k8s.io/gengo/v2/namer" - "k8s.io/gengo/v2/types" - openapi "k8s.io/kube-openapi/pkg/common" - "k8s.io/kube-openapi/pkg/validation/spec" - - "k8s.io/klog/v2" -) - -// This is the comment tag that carries parameters for open API generation. -const tagName = "k8s:openapi-gen" -const markerPrefix = "+k8s:validation:" -const tagOptional = "optional" -const tagRequired = "required" -const tagDefault = "default" - -// Known values for the tag. -const ( - tagValueTrue = "true" - tagValueFalse = "false" -) - -// Used for temporary validation of patch struct tags. -// TODO: Remove patch struct tag validation because they we are now consuming OpenAPI on server. -var tempPatchTags = [...]string{ - "patchMergeKey", - "patchStrategy", -} - -func getOpenAPITagValue(comments []string) []string { - return gengo.ExtractCommentTags("+", comments)[tagName] -} - -func getSingleTagsValue(comments []string, tag string) (string, error) { - tags, ok := gengo.ExtractCommentTags("+", comments)[tag] - if !ok || len(tags) == 0 { - return "", nil - } - if len(tags) > 1 { - return "", fmt.Errorf("multiple values are not allowed for tag %s", tag) - } - return tags[0], nil -} - -func hasOpenAPITagValue(comments []string, value string) bool { - tagValues := getOpenAPITagValue(comments) - for _, val := range tagValues { - if val == value { - return true - } - } - return false -} - -// isOptional returns error if the member has +optional and +required in -// its comments. If +optional is present it returns true. If +required is present -// it returns false. Otherwise, it returns true if `omitempty` JSON tag is present -func isOptional(m *types.Member) (bool, error) { - hasOptionalCommentTag := gengo.ExtractCommentTags( - "+", m.CommentLines)[tagOptional] != nil - hasRequiredCommentTag := gengo.ExtractCommentTags( - "+", m.CommentLines)[tagRequired] != nil - if hasOptionalCommentTag && hasRequiredCommentTag { - return false, fmt.Errorf("member %s cannot be both optional and required", m.Name) - } else if hasRequiredCommentTag { - return false, nil - } else if hasOptionalCommentTag { - return true, nil - } - - // If neither +optional nor +required is present in the comments, - // infer optional from the json tags. - return strings.Contains(reflect.StructTag(m.Tags).Get("json"), "omitempty"), nil -} - -func apiTypeFilterFunc(c *generator.Context, t *types.Type) bool { - // There is a conflict between this codegen and codecgen, we should avoid types generated for codecgen - if strings.HasPrefix(t.Name.Name, "codecSelfer") { - return false - } - pkg := c.Universe.Package(t.Name.Package) - if hasOpenAPITagValue(pkg.Comments, tagValueTrue) { - return !hasOpenAPITagValue(t.CommentLines, tagValueFalse) - } - if hasOpenAPITagValue(t.CommentLines, tagValueTrue) { - return true - } - return false -} - -const ( - specPackagePath = "k8s.io/kube-openapi/pkg/validation/spec" - openAPICommonPackagePath = "k8s.io/kube-openapi/pkg/common" -) - -// openApiGen produces a file with auto-generated OpenAPI functions. -type openAPIGen struct { - generator.GoGenerator - // TargetPackage is the package that will get GetOpenAPIDefinitions function returns all open API definitions. - targetPackage string - imports namer.ImportTracker -} - -func newOpenAPIGen(outputFilename string, targetPackage string) generator.Generator { - return &openAPIGen{ - GoGenerator: generator.GoGenerator{ - OutputFilename: outputFilename, - }, - imports: generator.NewImportTrackerForPackage(targetPackage), - targetPackage: targetPackage, - } -} - -const nameTmpl = "schema_$.type|private$" - -func (g *openAPIGen) Namers(c *generator.Context) namer.NameSystems { - // Have the raw namer for this file track what it imports. - return namer.NameSystems{ - "raw": namer.NewRawNamer(g.targetPackage, g.imports), - "private": &namer.NameStrategy{ - Join: func(pre string, in []string, post string) string { - return strings.Join(in, "_") - }, - PrependPackageNames: 4, // enough to fully qualify from k8s.io/api/... - }, - } -} - -func (g *openAPIGen) Imports(c *generator.Context) []string { - importLines := []string{} - for _, singleImport := range g.imports.ImportLines() { - importLines = append(importLines, singleImport) - } - return importLines -} - -func argsFromType(t *types.Type) generator.Args { - return generator.Args{ - "type": t, - "ReferenceCallback": types.Ref(openAPICommonPackagePath, "ReferenceCallback"), - "OpenAPIDefinition": types.Ref(openAPICommonPackagePath, "OpenAPIDefinition"), - "SpecSchemaType": types.Ref(specPackagePath, "Schema"), - } -} - -func (g *openAPIGen) Init(c *generator.Context, w io.Writer) error { - sw := generator.NewSnippetWriter(w, c, "$", "$") - sw.Do("func GetOpenAPIDefinitions(ref $.ReferenceCallback|raw$) map[string]$.OpenAPIDefinition|raw$ {\n", argsFromType(nil)) - sw.Do("return map[string]$.OpenAPIDefinition|raw${\n", argsFromType(nil)) - - for _, t := range c.Order { - err := newOpenAPITypeWriter(sw, c).generateCall(t) - if err != nil { - return err - } - } - - sw.Do("}\n", nil) - sw.Do("}\n\n", nil) - - return sw.Error() -} - -func (g *openAPIGen) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { - klog.V(5).Infof("generating for type %v", t) - sw := generator.NewSnippetWriter(w, c, "$", "$") - err := newOpenAPITypeWriter(sw, c).generate(t) - if err != nil { - return err - } - return sw.Error() -} - -func getJsonTags(m *types.Member) []string { - jsonTag := reflect.StructTag(m.Tags).Get("json") - if jsonTag == "" { - return []string{} - } - return strings.Split(jsonTag, ",") -} - -func getReferableName(m *types.Member) string { - jsonTags := getJsonTags(m) - if len(jsonTags) > 0 { - if jsonTags[0] == "-" { - return "" - } else { - return jsonTags[0] - } - } else { - return m.Name - } -} - -func shouldInlineMembers(m *types.Member) bool { - jsonTags := getJsonTags(m) - return len(jsonTags) > 1 && jsonTags[1] == "inline" -} - -type openAPITypeWriter struct { - *generator.SnippetWriter - context *generator.Context - refTypes map[string]*types.Type - enumContext *enumContext - GetDefinitionInterface *types.Type -} - -func newOpenAPITypeWriter(sw *generator.SnippetWriter, c *generator.Context) openAPITypeWriter { - return openAPITypeWriter{ - SnippetWriter: sw, - context: c, - refTypes: map[string]*types.Type{}, - enumContext: newEnumContext(c), - } -} - -func methodReturnsValue(mt *types.Type, pkg, name string) bool { - if len(mt.Signature.Parameters) != 0 || len(mt.Signature.Results) != 1 { - return false - } - r := mt.Signature.Results[0] - return r.Name.Name == name && r.Name.Package == pkg -} - -func hasOpenAPIV3DefinitionMethod(t *types.Type) bool { - for mn, mt := range t.Methods { - if mn != "OpenAPIV3Definition" { - continue - } - return methodReturnsValue(mt, openAPICommonPackagePath, "OpenAPIDefinition") - } - return false -} - -func hasOpenAPIDefinitionMethod(t *types.Type) bool { - for mn, mt := range t.Methods { - if mn != "OpenAPIDefinition" { - continue - } - return methodReturnsValue(mt, openAPICommonPackagePath, "OpenAPIDefinition") - } - return false -} - -func hasOpenAPIDefinitionMethods(t *types.Type) bool { - var hasSchemaTypeMethod, hasOpenAPISchemaFormat bool - for mn, mt := range t.Methods { - switch mn { - case "OpenAPISchemaType": - hasSchemaTypeMethod = methodReturnsValue(mt, "", "[]string") - case "OpenAPISchemaFormat": - hasOpenAPISchemaFormat = methodReturnsValue(mt, "", "string") - } - } - return hasSchemaTypeMethod && hasOpenAPISchemaFormat -} - -func hasOpenAPIV3OneOfMethod(t *types.Type) bool { - for mn, mt := range t.Methods { - if mn != "OpenAPIV3OneOfTypes" { - continue - } - return methodReturnsValue(mt, "", "[]string") - } - return false -} - -// typeShortName returns short package name (e.g. the name x appears in package x definition) dot type name. -func typeShortName(t *types.Type) string { - // `path` vs. `filepath` because packages use '/' - return path.Base(t.Name.Package) + "." + t.Name.Name -} - -func (g openAPITypeWriter) generateMembers(t *types.Type, required []string) ([]string, error) { - var err error - for t.Kind == types.Pointer { // fast-forward to effective type containing members - t = t.Elem - } - for _, m := range t.Members { - if hasOpenAPITagValue(m.CommentLines, tagValueFalse) { - continue - } - if shouldInlineMembers(&m) { - required, err = g.generateMembers(m.Type, required) - if err != nil { - return required, err - } - continue - } - name := getReferableName(&m) - if name == "" { - continue - } - if isOptional, err := isOptional(&m); err != nil { - klog.Errorf("Error when generating: %v, %v\n", name, m) - return required, err - } else if !isOptional { - required = append(required, name) - } - if err = g.generateProperty(&m, t); err != nil { - klog.Errorf("Error when generating: %v, %v\n", name, m) - return required, err - } - } - return required, nil -} - -func (g openAPITypeWriter) generateCall(t *types.Type) error { - // Only generate for struct type and ignore the rest - switch t.Kind { - case types.Struct: - args := argsFromType(t) - g.Do("\"$.$\": ", t.Name) - - hasV2Definition := hasOpenAPIDefinitionMethod(t) - hasV2DefinitionTypeAndFormat := hasOpenAPIDefinitionMethods(t) - hasV3Definition := hasOpenAPIV3DefinitionMethod(t) - - switch { - case hasV2DefinitionTypeAndFormat: - g.Do(nameTmpl+"(ref),\n", args) - case hasV2Definition && hasV3Definition: - g.Do("common.EmbedOpenAPIDefinitionIntoV2Extension($.type|raw${}.OpenAPIV3Definition(), $.type|raw${}.OpenAPIDefinition()),\n", args) - case hasV2Definition: - g.Do("$.type|raw${}.OpenAPIDefinition(),\n", args) - case hasV3Definition: - g.Do("$.type|raw${}.OpenAPIV3Definition(),\n", args) - default: - g.Do(nameTmpl+"(ref),\n", args) - } - } - return g.Error() -} - -func (g openAPITypeWriter) generateValueValidations(vs *spec.SchemaProps) error { - - if vs == nil { - return nil - } - args := generator.Args{ - "ptrTo": &types.Type{ - Name: types.Name{ - Package: "k8s.io/utils/ptr", - Name: "To", - }}, - "spec": vs, - } - if vs.Minimum != nil { - g.Do("Minimum: $.ptrTo|raw$[float64]($.spec.Minimum$),\n", args) - } - if vs.Maximum != nil { - g.Do("Maximum: $.ptrTo|raw$[float64]($.spec.Maximum$),\n", args) - } - if vs.ExclusiveMinimum { - g.Do("ExclusiveMinimum: true,\n", args) - } - if vs.ExclusiveMaximum { - g.Do("ExclusiveMaximum: true,\n", args) - } - if vs.MinLength != nil { - g.Do("MinLength: $.ptrTo|raw$[int64]($.spec.MinLength$),\n", args) - } - if vs.MaxLength != nil { - g.Do("MaxLength: $.ptrTo|raw$[int64]($.spec.MaxLength$),\n", args) - } - - if vs.MinProperties != nil { - g.Do("MinProperties: $.ptrTo|raw$[int64]($.spec.MinProperties$),\n", args) - } - if vs.MaxProperties != nil { - g.Do("MaxProperties: $.ptrTo|raw$[int64]($.spec.MaxProperties$),\n", args) - } - if len(vs.Pattern) > 0 { - p, err := json.Marshal(vs.Pattern) - if err != nil { - return err - } - g.Do("Pattern: $.$,\n", string(p)) - } - if vs.MultipleOf != nil { - g.Do("MultipleOf: $.ptrTo|raw$[float64]($.spec.MultipleOf$),\n", args) - } - if vs.MinItems != nil { - g.Do("MinItems: $.ptrTo|raw$[int64]($.spec.MinItems$),\n", args) - } - if vs.MaxItems != nil { - g.Do("MaxItems: $.ptrTo|raw$[int64]($.spec.MaxItems$),\n", args) - } - if vs.UniqueItems { - g.Do("UniqueItems: true,\n", nil) - } - - return nil -} - -func (g openAPITypeWriter) generate(t *types.Type) error { - // Only generate for struct type and ignore the rest - switch t.Kind { - case types.Struct: - validationSchema, err := ParseCommentTags(t, t.CommentLines, markerPrefix) - if err != nil { - return err - } - - hasV2Definition := hasOpenAPIDefinitionMethod(t) - hasV2DefinitionTypeAndFormat := hasOpenAPIDefinitionMethods(t) - hasV3OneOfTypes := hasOpenAPIV3OneOfMethod(t) - hasV3Definition := hasOpenAPIV3DefinitionMethod(t) - - if hasV2Definition || (hasV3Definition && !hasV2DefinitionTypeAndFormat) { - // already invoked directly - return nil - } - - args := argsFromType(t) - g.Do("func "+nameTmpl+"(ref $.ReferenceCallback|raw$) $.OpenAPIDefinition|raw$ {\n", args) - switch { - case hasV2DefinitionTypeAndFormat && hasV3Definition: - g.Do("return common.EmbedOpenAPIDefinitionIntoV2Extension($.type|raw${}.OpenAPIV3Definition(), $.OpenAPIDefinition|raw${\n"+ - "Schema: spec.Schema{\n"+ - "SchemaProps: spec.SchemaProps{\n", args) - g.generateDescription(t.CommentLines) - g.Do("Type:$.type|raw${}.OpenAPISchemaType(),\n"+ - "Format:$.type|raw${}.OpenAPISchemaFormat(),\n", args) - err = g.generateValueValidations(&validationSchema.SchemaProps) - if err != nil { - return err - } - g.Do("},\n", nil) - if err := g.generateStructExtensions(t, validationSchema.Extensions); err != nil { - return err - } - g.Do("},\n", nil) - g.Do("})\n}\n\n", args) - return nil - case hasV2DefinitionTypeAndFormat && hasV3OneOfTypes: - // generate v3 def. - g.Do("return common.EmbedOpenAPIDefinitionIntoV2Extension($.OpenAPIDefinition|raw${\n"+ - "Schema: spec.Schema{\n"+ - "SchemaProps: spec.SchemaProps{\n", args) - g.generateDescription(t.CommentLines) - g.Do("OneOf:common.GenerateOpenAPIV3OneOfSchema($.type|raw${}.OpenAPIV3OneOfTypes()),\n"+ - "Format:$.type|raw${}.OpenAPISchemaFormat(),\n", args) - err = g.generateValueValidations(&validationSchema.SchemaProps) - if err != nil { - return err - } - g.Do("},\n", nil) - if err := g.generateStructExtensions(t, validationSchema.Extensions); err != nil { - return err - } - g.Do("},\n", nil) - g.Do("},", args) - // generate v2 def. - g.Do("$.OpenAPIDefinition|raw${\n"+ - "Schema: spec.Schema{\n"+ - "SchemaProps: spec.SchemaProps{\n", args) - g.generateDescription(t.CommentLines) - g.Do("Type:$.type|raw${}.OpenAPISchemaType(),\n"+ - "Format:$.type|raw${}.OpenAPISchemaFormat(),\n", args) - err = g.generateValueValidations(&validationSchema.SchemaProps) - if err != nil { - return err - } - g.Do("},\n", nil) - if err := g.generateStructExtensions(t, validationSchema.Extensions); err != nil { - return err - } - g.Do("},\n", nil) - g.Do("})\n}\n\n", args) - return nil - case hasV2DefinitionTypeAndFormat: - g.Do("return $.OpenAPIDefinition|raw${\n"+ - "Schema: spec.Schema{\n"+ - "SchemaProps: spec.SchemaProps{\n", args) - g.generateDescription(t.CommentLines) - g.Do("Type:$.type|raw${}.OpenAPISchemaType(),\n"+ - "Format:$.type|raw${}.OpenAPISchemaFormat(),\n", args) - err = g.generateValueValidations(&validationSchema.SchemaProps) - if err != nil { - return err - } - g.Do("},\n", nil) - if err := g.generateStructExtensions(t, validationSchema.Extensions); err != nil { - return err - } - g.Do("},\n", nil) - g.Do("}\n}\n\n", args) - return nil - case hasV3OneOfTypes: - // having v3 oneOf types without custom v2 type or format does not make sense. - return fmt.Errorf("type %q has v3 one of types but not v2 type or format", t.Name) - } - - g.Do("return $.OpenAPIDefinition|raw${\nSchema: spec.Schema{\nSchemaProps: spec.SchemaProps{\n", args) - g.generateDescription(t.CommentLines) - g.Do("Type: []string{\"object\"},\n", nil) - err = g.generateValueValidations(&validationSchema.SchemaProps) - if err != nil { - return err - } - - // write members into a temporary buffer, in order to postpone writing out the Properties field. We only do - // that if it is not empty. - propertiesBuf := bytes.Buffer{} - bsw := g - bsw.SnippetWriter = generator.NewSnippetWriter(&propertiesBuf, g.context, "$", "$") - required, err := bsw.generateMembers(t, []string{}) - if err != nil { - return err - } - if propertiesBuf.Len() > 0 { - g.Do("Properties: map[string]$.SpecSchemaType|raw${\n", args) - g.Do(strings.Replace(propertiesBuf.String(), "$", "$\"$\"$", -1), nil) // escape $ (used as delimiter of the templates) - g.Do("},\n", nil) - } - - if len(required) > 0 { - g.Do("Required: []string{\"$.$\"},\n", strings.Join(required, "\",\"")) - } - g.Do("},\n", nil) - if err := g.generateStructExtensions(t, validationSchema.Extensions); err != nil { - return err - } - g.Do("},\n", nil) - - // Map order is undefined, sort them or we may get a different file generated each time. - keys := []string{} - for k := range g.refTypes { - keys = append(keys, k) - } - sort.Strings(keys) - deps := []string{} - for _, k := range keys { - v := g.refTypes[k] - if t, _ := openapi.OpenAPITypeFormat(v.String()); t != "" { - // This is a known type, we do not need a reference to it - // Will eliminate special case of time.Time - continue - } - deps = append(deps, k) - } - if len(deps) > 0 { - g.Do("Dependencies: []string{\n", args) - for _, k := range deps { - g.Do("\"$.$\",", k) - } - g.Do("},\n", nil) - } - g.Do("}\n}\n\n", nil) - } - return nil -} - -func (g openAPITypeWriter) generateStructExtensions(t *types.Type, otherExtensions map[string]interface{}) error { - extensions, errors := parseExtensions(t.CommentLines) - // Initially, we will only log struct extension errors. - if len(errors) > 0 { - for _, e := range errors { - klog.Errorf("[%s]: %s\n", t.String(), e) - } - } - unions, errors := parseUnions(t) - if len(errors) > 0 { - for _, e := range errors { - klog.Errorf("[%s]: %s\n", t.String(), e) - } - } - - // TODO(seans3): Validate struct extensions here. - g.emitExtensions(extensions, unions, otherExtensions) - return nil -} - -func (g openAPITypeWriter) generateMemberExtensions(m *types.Member, parent *types.Type, otherExtensions map[string]interface{}) error { - extensions, parseErrors := parseExtensions(m.CommentLines) - validationErrors := validateMemberExtensions(extensions, m) - errors := append(parseErrors, validationErrors...) - // Initially, we will only log member extension errors. - if len(errors) > 0 { - errorPrefix := fmt.Sprintf("[%s] %s:", parent.String(), m.String()) - for _, e := range errors { - klog.V(2).Infof("%s %s\n", errorPrefix, e) - } - } - g.emitExtensions(extensions, nil, otherExtensions) - return nil -} - -func (g openAPITypeWriter) emitExtensions(extensions []extension, unions []union, otherExtensions map[string]interface{}) { - // If any extensions exist, then emit code to create them. - if len(extensions) == 0 && len(unions) == 0 && len(otherExtensions) == 0 { - return - } - g.Do("VendorExtensible: spec.VendorExtensible{\nExtensions: spec.Extensions{\n", nil) - for _, extension := range extensions { - g.Do("\"$.$\": ", extension.xName) - if extension.hasMultipleValues() || extension.isAlwaysArrayFormat() { - g.Do("[]interface{}{\n", nil) - } - for _, value := range extension.values { - g.Do("\"$.$\",\n", value) - } - if extension.hasMultipleValues() || extension.isAlwaysArrayFormat() { - g.Do("},\n", nil) - } - } - if len(unions) > 0 { - g.Do("\"x-kubernetes-unions\": []interface{}{\n", nil) - for _, u := range unions { - u.emit(g) - } - g.Do("},\n", nil) - } - - if len(otherExtensions) > 0 { - for k, v := range otherExtensions { - g.Do("$.key$: $.value$,\n", map[string]interface{}{ - "key": fmt.Sprintf("%#v", k), - "value": fmt.Sprintf("%#v", v), - }) - } - } - - g.Do("},\n},\n", nil) -} - -// TODO(#44005): Move this validation outside of this generator (probably to policy verifier) -func (g openAPITypeWriter) validatePatchTags(m *types.Member, parent *types.Type) error { - // TODO: Remove patch struct tag validation because they we are now consuming OpenAPI on server. - for _, tagKey := range tempPatchTags { - structTagValue := reflect.StructTag(m.Tags).Get(tagKey) - commentTagValue, err := getSingleTagsValue(m.CommentLines, tagKey) - if err != nil { - return err - } - if structTagValue != commentTagValue { - return fmt.Errorf("Tags in comment and struct should match for member (%s) of (%s)", - m.Name, parent.Name.String()) - } - } - return nil -} - -func defaultFromComments(comments []string, commentPath string, t *types.Type) (interface{}, *types.Name, error) { - var tag string - - for { - var err error - tag, err = getSingleTagsValue(comments, tagDefault) - if err != nil { - return nil, nil, err - } - - if t == nil || len(tag) > 0 { - break - } - - comments = t.CommentLines - commentPath = t.Name.Package - switch t.Kind { - case types.Pointer: - t = t.Elem - case types.Alias: - t = t.Underlying - default: - t = nil - } - } - - if tag == "" { - return nil, nil, nil - } - - var i interface{} - if id, ok := parseSymbolReference(tag, commentPath); ok { - klog.V(5).Infof("%v, %v", id, commentPath) - return nil, &id, nil - } else if err := json.Unmarshal([]byte(tag), &i); err != nil { - return nil, nil, fmt.Errorf("failed to unmarshal default: %v", err) - } - return i, nil, nil -} - -var refRE = regexp.MustCompile(`^ref\((?P[^"]+)\)$`) -var refREIdentIndex = refRE.SubexpIndex("reference") - -// parseSymbolReference looks for strings that match one of the following: -// - ref(Ident) -// - ref(pkgpath.Ident) -// If the input string matches either of these, it will return the (optional) -// pkgpath, the Ident, and true. Otherwise it will return empty strings and -// false. -// -// This is borrowed from k8s.io/code-generator. -func parseSymbolReference(s, sourcePackage string) (types.Name, bool) { - matches := refRE.FindStringSubmatch(s) - if len(matches) < refREIdentIndex || matches[refREIdentIndex] == "" { - return types.Name{}, false - } - - contents := matches[refREIdentIndex] - name := types.ParseFullyQualifiedName(contents) - if len(name.Package) == 0 { - name.Package = sourcePackage - } - return name, true -} - -func implementsCustomUnmarshalling(t *types.Type) bool { - switch t.Kind { - case types.Pointer: - unmarshaller, isUnmarshaller := t.Elem.Methods["UnmarshalJSON"] - return isUnmarshaller && unmarshaller.Signature.Receiver.Kind == types.Pointer - case types.Struct: - _, isUnmarshaller := t.Methods["UnmarshalJSON"] - return isUnmarshaller - default: - return false - } -} - -func mustEnforceDefault(t *types.Type, omitEmpty bool) (interface{}, error) { - // Treat types with custom unmarshalling as a value - // (Can be alias, struct, or pointer) - if implementsCustomUnmarshalling(t) { - // Since Go JSON deserializer always feeds `null` when present - // to structs with custom UnmarshalJSON, the zero value for - // these structs is also null. - // - // In general, Kubernetes API types with custom marshalling should - // marshal their empty values to `null`. - return nil, nil - } - - switch t.Kind { - case types.Alias: - return mustEnforceDefault(t.Underlying, omitEmpty) - case types.Pointer, types.Map, types.Slice, types.Array, types.Interface: - return nil, nil - case types.Struct: - if len(t.Members) == 1 && t.Members[0].Embedded { - // Treat a struct with a single embedded member the same as an alias - return mustEnforceDefault(t.Members[0].Type, omitEmpty) - } - - return map[string]interface{}{}, nil - case types.Builtin: - if !omitEmpty { - if zero, ok := openapi.OpenAPIZeroValue(t.String()); ok { - return zero, nil - } else { - return nil, fmt.Errorf("please add type %v to getOpenAPITypeFormat function", t) - } - } - return nil, nil - default: - return nil, fmt.Errorf("not sure how to enforce default for %v", t.Kind) - } -} - -func (g openAPITypeWriter) generateDefault(comments []string, t *types.Type, omitEmpty bool, commentOwningType *types.Type) error { - def, ref, err := defaultFromComments(comments, commentOwningType.Name.Package, t) - if err != nil { - return err - } - if enforced, err := mustEnforceDefault(t, omitEmpty); err != nil { - return err - } else if enforced != nil { - if def == nil { - def = enforced - } else if !reflect.DeepEqual(def, enforced) { - enforcedJson, _ := json.Marshal(enforced) - return fmt.Errorf("invalid default value (%#v) for non-pointer/non-omitempty. If specified, must be: %v", def, string(enforcedJson)) - } - } - if def != nil { - g.Do("Default: $.$,\n", fmt.Sprintf("%#v", def)) - } else if ref != nil { - g.Do("Default: $.|raw$,\n", &types.Type{Name: *ref}) - } - return nil -} - -func (g openAPITypeWriter) generateDescription(CommentLines []string) { - var buffer bytes.Buffer - delPrevChar := func() { - if buffer.Len() > 0 { - buffer.Truncate(buffer.Len() - 1) // Delete the last " " or "\n" - } - } - - for _, line := range CommentLines { - // Ignore all lines after --- - if line == "---" { - break - } - line = strings.TrimRight(line, " ") - leading := strings.TrimLeft(line, " ") - switch { - case len(line) == 0: // Keep paragraphs - delPrevChar() - buffer.WriteString("\n\n") - case strings.HasPrefix(leading, "TODO"): // Ignore one line TODOs - case strings.HasPrefix(leading, "+"): // Ignore instructions to go2idl - default: - if strings.HasPrefix(line, " ") || strings.HasPrefix(line, "\t") { - delPrevChar() - line = "\n" + line + "\n" // Replace it with newline. This is useful when we have a line with: "Example:\n\tJSON-something..." - } else { - line += " " - } - buffer.WriteString(line) - } - } - - postDoc := strings.TrimSpace(buffer.String()) - if len(postDoc) > 0 { - g.Do("Description: $.$,\n", fmt.Sprintf("%#v", postDoc)) - } -} - -func (g openAPITypeWriter) generateProperty(m *types.Member, parent *types.Type) error { - name := getReferableName(m) - if name == "" { - return nil - } - validationSchema, err := ParseCommentTags(m.Type, m.CommentLines, markerPrefix) - if err != nil { - return err - } - if err := g.validatePatchTags(m, parent); err != nil { - return err - } - g.Do("\"$.$\": {\n", name) - if err := g.generateMemberExtensions(m, parent, validationSchema.Extensions); err != nil { - return err - } - g.Do("SchemaProps: spec.SchemaProps{\n", nil) - var extraComments []string - if enumType, isEnum := g.enumContext.EnumType(m.Type); isEnum { - extraComments = enumType.DescriptionLines() - } - g.generateDescription(append(m.CommentLines, extraComments...)) - jsonTags := getJsonTags(m) - if len(jsonTags) > 1 && jsonTags[1] == "string" { - g.generateSimpleProperty("string", "") - g.Do("},\n},\n", nil) - return nil - } - omitEmpty := strings.Contains(reflect.StructTag(m.Tags).Get("json"), "omitempty") - if err := g.generateDefault(m.CommentLines, m.Type, omitEmpty, parent); err != nil { - return fmt.Errorf("failed to generate default in %v: %v: %v", parent, m.Name, err) - } - err = g.generateValueValidations(&validationSchema.SchemaProps) - if err != nil { - return err - } - t := resolveAliasAndPtrType(m.Type) - // If we can get a openAPI type and format for this type, we consider it to be simple property - typeString, format := openapi.OpenAPITypeFormat(t.String()) - if typeString != "" { - g.generateSimpleProperty(typeString, format) - if enumType, isEnum := g.enumContext.EnumType(m.Type); isEnum { - // original type is an enum, add "Enum: " and the values - g.Do("Enum: []interface{}{$.$},\n", strings.Join(enumType.ValueStrings(), ", ")) - } - g.Do("},\n},\n", nil) - return nil - } - switch t.Kind { - case types.Builtin: - return fmt.Errorf("please add type %v to getOpenAPITypeFormat function", t) - case types.Map: - if err := g.generateMapProperty(t); err != nil { - return fmt.Errorf("failed to generate map property in %v: %v: %v", parent, m.Name, err) - } - case types.Slice, types.Array: - if err := g.generateSliceProperty(t); err != nil { - return fmt.Errorf("failed to generate slice property in %v: %v: %v", parent, m.Name, err) - } - case types.Struct, types.Interface: - g.generateReferenceProperty(t) - default: - return fmt.Errorf("cannot generate spec for type %v", t) - } - g.Do("},\n},\n", nil) - return g.Error() -} - -func (g openAPITypeWriter) generateSimpleProperty(typeString, format string) { - g.Do("Type: []string{\"$.$\"},\n", typeString) - g.Do("Format: \"$.$\",\n", format) -} - -func (g openAPITypeWriter) generateReferenceProperty(t *types.Type) { - g.refTypes[t.Name.String()] = t - g.Do("Ref: ref(\"$.$\"),\n", t.Name.String()) -} - -func resolveAliasAndPtrType(t *types.Type) *types.Type { - var prev *types.Type - for prev != t { - prev = t - if t.Kind == types.Alias { - t = t.Underlying - } - if t.Kind == types.Pointer { - t = t.Elem - } - } - return t -} - -func (g openAPITypeWriter) generateMapProperty(t *types.Type) error { - keyType := resolveAliasAndPtrType(t.Key) - elemType := resolveAliasAndPtrType(t.Elem) - - // According to OpenAPI examples, only map from string is supported - if keyType.Name.Name != "string" { - return fmt.Errorf("map with non-string keys are not supported by OpenAPI in %v", t) - } - - g.Do("Type: []string{\"object\"},\n", nil) - g.Do("AdditionalProperties: &spec.SchemaOrBool{\nAllows: true,\nSchema: &spec.Schema{\nSchemaProps: spec.SchemaProps{\n", nil) - if err := g.generateDefault(t.Elem.CommentLines, t.Elem, false, t.Elem); err != nil { - return err - } - typeString, format := openapi.OpenAPITypeFormat(elemType.String()) - if typeString != "" { - g.generateSimpleProperty(typeString, format) - if enumType, isEnum := g.enumContext.EnumType(t.Elem); isEnum { - // original type is an enum, add "Enum: " and the values - g.Do("Enum: []interface{}{$.$},\n", strings.Join(enumType.ValueStrings(), ", ")) - } - g.Do("},\n},\n},\n", nil) - return nil - } - switch elemType.Kind { - case types.Builtin: - return fmt.Errorf("please add type %v to getOpenAPITypeFormat function", elemType) - case types.Struct: - g.generateReferenceProperty(elemType) - case types.Slice, types.Array: - if err := g.generateSliceProperty(elemType); err != nil { - return err - } - case types.Map: - if err := g.generateMapProperty(elemType); err != nil { - return err - } - default: - return fmt.Errorf("map Element kind %v is not supported in %v", elemType.Kind, t.Name) - } - g.Do("},\n},\n},\n", nil) - return nil -} - -func (g openAPITypeWriter) generateSliceProperty(t *types.Type) error { - elemType := resolveAliasAndPtrType(t.Elem) - g.Do("Type: []string{\"array\"},\n", nil) - g.Do("Items: &spec.SchemaOrArray{\nSchema: &spec.Schema{\nSchemaProps: spec.SchemaProps{\n", nil) - if err := g.generateDefault(t.Elem.CommentLines, t.Elem, false, t.Elem); err != nil { - return err - } - typeString, format := openapi.OpenAPITypeFormat(elemType.String()) - if typeString != "" { - g.generateSimpleProperty(typeString, format) - if enumType, isEnum := g.enumContext.EnumType(t.Elem); isEnum { - // original type is an enum, add "Enum: " and the values - g.Do("Enum: []interface{}{$.$},\n", strings.Join(enumType.ValueStrings(), ", ")) - } - g.Do("},\n},\n},\n", nil) - return nil - } - switch elemType.Kind { - case types.Builtin: - return fmt.Errorf("please add type %v to getOpenAPITypeFormat function", elemType) - case types.Struct: - g.generateReferenceProperty(elemType) - case types.Slice, types.Array: - if err := g.generateSliceProperty(elemType); err != nil { - return err - } - case types.Map: - if err := g.generateMapProperty(elemType); err != nil { - return err - } - default: - return fmt.Errorf("slice Element kind %v is not supported in %v", elemType.Kind, t) - } - g.Do("},\n},\n},\n", nil) - return nil -} diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/rules/OWNERS b/vendor/k8s.io/kube-openapi/pkg/generators/rules/OWNERS deleted file mode 100644 index 235bc545b88..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/rules/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -reviewers: -- roycaihw -approvers: -- roycaihw diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/rules/doc.go b/vendor/k8s.io/kube-openapi/pkg/generators/rules/doc.go deleted file mode 100644 index 384a44dca07..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/rules/doc.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. -*/ - -// Package rules contains API rules that are enforced in OpenAPI spec generation -// as part of the machinery. Files under this package implement APIRule interface -// which evaluates Go type and produces list of API rule violations. -// -// Implementations of APIRule should be added to API linter under openAPIGen code- -// generator to get integrated in the generation process. -package rules diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/rules/idl_tag.go b/vendor/k8s.io/kube-openapi/pkg/generators/rules/idl_tag.go deleted file mode 100644 index e4b0f7cd396..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/rules/idl_tag.go +++ /dev/null @@ -1,55 +0,0 @@ -package rules - -import ( - "k8s.io/gengo/v2" - "k8s.io/gengo/v2/types" -) - -const ListTypeIDLTag = "listType" - -// ListTypeMissing implements APIRule interface. -// A list type is required for inlined list. -type ListTypeMissing struct{} - -// Name returns the name of APIRule -func (l *ListTypeMissing) Name() string { - return "list_type_missing" -} - -// Validate evaluates API rule on type t and returns a list of field names in -// the type that violate the rule. Empty field name [""] implies the entire -// type violates the rule. -func (l *ListTypeMissing) Validate(t *types.Type) ([]string, error) { - fields := make([]string, 0) - - switch t.Kind { - case types.Struct: - for _, m := range t.Members { - hasListType := gengo.ExtractCommentTags("+", m.CommentLines)[ListTypeIDLTag] != nil - - if m.Name == "Items" && m.Type.Kind == types.Slice && hasNamedMember(t, "ListMeta") { - if hasListType { - fields = append(fields, m.Name) - } - continue - } - - // All slice fields must have a list-type tag except []byte - if m.Type.Kind == types.Slice && m.Type.Elem != types.Byte && !hasListType { - fields = append(fields, m.Name) - continue - } - } - } - - return fields, nil -} - -func hasNamedMember(t *types.Type, name string) bool { - for _, m := range t.Members { - if m.Name == name { - return true - } - } - return false -} diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go b/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go deleted file mode 100644 index af30edc5ed0..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package rules - -import ( - "reflect" - "strings" - - "k8s.io/kube-openapi/pkg/util/sets" - - "k8s.io/gengo/v2/types" -) - -var ( - // Blacklist of JSON tags that should skip match evaluation - jsonTagBlacklist = sets.NewString( - // Omitted field is ignored by the package - "-", - ) - - // Blacklist of JSON names that should skip match evaluation - jsonNameBlacklist = sets.NewString( - // Empty name is used for inline struct field (e.g. metav1.TypeMeta) - "", - // Special case for object and list meta - "metadata", - ) - - // List of substrings that aren't allowed in Go name and JSON name - disallowedNameSubstrings = sets.NewString( - // Underscore is not allowed in either name - "_", - // Dash is not allowed in either name. Note that since dash is a valid JSON tag, this should be checked - // after JSON tag blacklist check. - "-", - ) -) - -/* -NamesMatch implements APIRule interface. -Go field names must be CamelCase. JSON field names must be camelCase. Other than capitalization of the -initial letter, the two should almost always match. No underscores nor dashes in either. -This rule verifies the convention "Other than capitalization of the initial letter, the two should almost always match." -Examples (also in unit test): - - Go name | JSON name | match - podSpec false - PodSpec podSpec true - PodSpec PodSpec false - podSpec podSpec false - PodSpec spec false - Spec podSpec false - JSONSpec jsonSpec true - JSONSpec jsonspec false - HTTPJSONSpec httpJSONSpec true - -NOTE: this validator cannot tell two sequential all-capital words from one word, therefore the case below -is also considered matched. - - HTTPJSONSpec httpjsonSpec true - -NOTE: JSON names in jsonNameBlacklist should skip evaluation - - true - podSpec true - podSpec - true - podSpec metadata true -*/ -type NamesMatch struct{} - -// Name returns the name of APIRule -func (n *NamesMatch) Name() string { - return "names_match" -} - -// Validate evaluates API rule on type t and returns a list of field names in -// the type that violate the rule. Empty field name [""] implies the entire -// type violates the rule. -func (n *NamesMatch) Validate(t *types.Type) ([]string, error) { - fields := make([]string, 0) - - // Only validate struct type and ignore the rest - switch t.Kind { - case types.Struct: - for _, m := range t.Members { - goName := m.Name - jsonTag, ok := reflect.StructTag(m.Tags).Lookup("json") - // Distinguish empty JSON tag and missing JSON tag. Empty JSON tag / name is - // allowed (in JSON name blacklist) but missing JSON tag is invalid. - if !ok { - fields = append(fields, goName) - continue - } - if jsonTagBlacklist.Has(jsonTag) { - continue - } - jsonName := strings.Split(jsonTag, ",")[0] - if !namesMatch(goName, jsonName) { - fields = append(fields, goName) - } - } - } - return fields, nil -} - -// namesMatch evaluates if goName and jsonName match the API rule -// TODO: Use an off-the-shelf CamelCase solution instead of implementing this logic. The following existing -// -// packages have been tried out: -// github.com/markbates/inflect -// github.com/segmentio/go-camelcase -// github.com/iancoleman/strcase -// github.com/fatih/camelcase -// Please see https://github.com/kubernetes/kube-openapi/pull/83#issuecomment-400842314 for more details -// about why they don't satisfy our need. What we need can be a function that detects an acronym at the -// beginning of a string. -func namesMatch(goName, jsonName string) bool { - if jsonNameBlacklist.Has(jsonName) { - return true - } - if !isAllowedName(goName) || !isAllowedName(jsonName) { - return false - } - if !strings.EqualFold(goName, jsonName) { - return false - } - // Go field names must be CamelCase. JSON field names must be camelCase. - if !isCapital(goName[0]) || isCapital(jsonName[0]) { - return false - } - for i := 0; i < len(goName); i++ { - if goName[i] == jsonName[i] { - // goName[0:i-1] is uppercase and jsonName[0:i-1] is lowercase, goName[i:] - // and jsonName[i:] should match; - // goName[i] should be lowercase if i is equal to 1, e.g.: - // goName | jsonName - // PodSpec podSpec - // or uppercase if i is greater than 1, e.g.: - // goname | jsonName - // JSONSpec jsonSpec - // This is to rule out cases like: - // goname | jsonName - // JSONSpec jsonspec - return goName[i:] == jsonName[i:] && (i == 1 || isCapital(goName[i])) - } - } - return true -} - -// isCapital returns true if one character is capital -func isCapital(b byte) bool { - return b >= 'A' && b <= 'Z' -} - -// isAllowedName checks the list of disallowedNameSubstrings and returns true if name doesn't contain -// any disallowed substring. -func isAllowedName(name string) bool { - for _, substr := range disallowedNameSubstrings.UnsortedList() { - if strings.Contains(name, substr) { - return false - } - } - return true -} diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/rules/omitempty_match_case.go b/vendor/k8s.io/kube-openapi/pkg/generators/rules/omitempty_match_case.go deleted file mode 100644 index d8387596400..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/rules/omitempty_match_case.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package rules - -import ( - "reflect" - "strings" - - "k8s.io/gengo/v2/types" -) - -// OmitEmptyMatchCase implements APIRule interface. -// "omitempty" must appear verbatim (no case variants). -type OmitEmptyMatchCase struct{} - -func (n *OmitEmptyMatchCase) Name() string { - return "omitempty_match_case" -} - -func (n *OmitEmptyMatchCase) Validate(t *types.Type) ([]string, error) { - fields := make([]string, 0) - - // Only validate struct type and ignore the rest - switch t.Kind { - case types.Struct: - for _, m := range t.Members { - goName := m.Name - jsonTag, ok := reflect.StructTag(m.Tags).Lookup("json") - if !ok { - continue - } - - parts := strings.Split(jsonTag, ",") - if len(parts) < 2 { - // no tags other than name - continue - } - if parts[0] == "-" { - // not serialized - continue - } - for _, part := range parts[1:] { - if strings.EqualFold(part, "omitempty") && part != "omitempty" { - fields = append(fields, goName) - } - } - } - } - return fields, nil -} diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/union.go b/vendor/k8s.io/kube-openapi/pkg/generators/union.go deleted file mode 100644 index bfcba1ad703..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/generators/union.go +++ /dev/null @@ -1,208 +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 generators - -import ( - "fmt" - "sort" - - "k8s.io/gengo/v2" - "k8s.io/gengo/v2/types" -) - -const tagUnionMember = "union" -const tagUnionDeprecated = "unionDeprecated" -const tagUnionDiscriminator = "unionDiscriminator" - -type union struct { - discriminator string - fieldsToDiscriminated map[string]string -} - -// emit prints the union, can be called on a nil union (emits nothing) -func (u *union) emit(g openAPITypeWriter) { - if u == nil { - return - } - g.Do("map[string]interface{}{\n", nil) - if u.discriminator != "" { - g.Do("\"discriminator\": \"$.$\",\n", u.discriminator) - } - g.Do("\"fields-to-discriminateBy\": map[string]interface{}{\n", nil) - keys := []string{} - for field := range u.fieldsToDiscriminated { - keys = append(keys, field) - } - sort.Strings(keys) - for _, field := range keys { - g.Do("\"$.$\": ", field) - g.Do("\"$.$\",\n", u.fieldsToDiscriminated[field]) - } - g.Do("},\n", nil) - g.Do("},\n", nil) -} - -// Sets the discriminator if it's not set yet, otherwise return an error -func (u *union) setDiscriminator(value string) []error { - errors := []error{} - if u.discriminator != "" { - errors = append(errors, fmt.Errorf("at least two discriminators found: %v and %v", value, u.discriminator)) - } - u.discriminator = value - return errors -} - -// Add a new member to the union -func (u *union) addMember(jsonName, variableName string) { - if _, ok := u.fieldsToDiscriminated[jsonName]; ok { - panic(fmt.Errorf("same field (%v) found multiple times", jsonName)) - } - u.fieldsToDiscriminated[jsonName] = variableName -} - -// Makes sure that the union is valid, specifically looking for re-used discriminated -func (u *union) isValid() []error { - errors := []error{} - // Case 1: discriminator but no fields - if u.discriminator != "" && len(u.fieldsToDiscriminated) == 0 { - errors = append(errors, fmt.Errorf("discriminator set with no fields in union")) - } - // Case 2: two fields have the same discriminated value - discriminated := map[string]struct{}{} - for _, d := range u.fieldsToDiscriminated { - if _, ok := discriminated[d]; ok { - errors = append(errors, fmt.Errorf("discriminated value is used twice: %v", d)) - } - discriminated[d] = struct{}{} - } - // Case 3: a field is both discriminator AND part of the union - if u.discriminator != "" { - if _, ok := u.fieldsToDiscriminated[u.discriminator]; ok { - errors = append(errors, fmt.Errorf("%v can't be both discriminator and part of the union", u.discriminator)) - } - } - return errors -} - -// Find unions either directly on the members (or inlined members, not -// going across types) or on the type itself, or on embedded types. -func parseUnions(t *types.Type) ([]union, []error) { - errors := []error{} - unions := []union{} - su, err := parseUnionStruct(t) - if su != nil { - unions = append(unions, *su) - } - errors = append(errors, err...) - eu, err := parseEmbeddedUnion(t) - unions = append(unions, eu...) - errors = append(errors, err...) - mu, err := parseUnionMembers(t) - if mu != nil { - unions = append(unions, *mu) - } - errors = append(errors, err...) - return unions, errors -} - -// Find unions in embedded types, unions shouldn't go across types. -func parseEmbeddedUnion(t *types.Type) ([]union, []error) { - errors := []error{} - unions := []union{} - for _, m := range t.Members { - if hasOpenAPITagValue(m.CommentLines, tagValueFalse) { - continue - } - if !shouldInlineMembers(&m) { - continue - } - u, err := parseUnions(m.Type) - unions = append(unions, u...) - errors = append(errors, err...) - } - return unions, errors -} - -// Look for union tag on a struct, and then include all the fields -// (except the discriminator if there is one). The struct shouldn't have -// embedded types. -func parseUnionStruct(t *types.Type) (*union, []error) { - errors := []error{} - if gengo.ExtractCommentTags("+", t.CommentLines)[tagUnionMember] == nil { - return nil, nil - } - - u := &union{fieldsToDiscriminated: map[string]string{}} - - for _, m := range t.Members { - jsonName := getReferableName(&m) - if jsonName == "" { - continue - } - if shouldInlineMembers(&m) { - errors = append(errors, fmt.Errorf("union structures can't have embedded fields: %v.%v", t.Name, m.Name)) - continue - } - if gengo.ExtractCommentTags("+", m.CommentLines)[tagUnionDeprecated] != nil { - errors = append(errors, fmt.Errorf("union struct can't have unionDeprecated members: %v.%v", t.Name, m.Name)) - continue - } - if gengo.ExtractCommentTags("+", m.CommentLines)[tagUnionDiscriminator] != nil { - errors = append(errors, u.setDiscriminator(jsonName)...) - } else { - if optional, err := isOptional(&m); !optional || err != nil { - errors = append(errors, fmt.Errorf("union members must be optional: %v.%v", t.Name, m.Name)) - } - u.addMember(jsonName, m.Name) - } - } - - return u, errors -} - -// Find unions specifically on members. -func parseUnionMembers(t *types.Type) (*union, []error) { - errors := []error{} - u := &union{fieldsToDiscriminated: map[string]string{}} - - for _, m := range t.Members { - jsonName := getReferableName(&m) - if jsonName == "" { - continue - } - if shouldInlineMembers(&m) { - continue - } - if gengo.ExtractCommentTags("+", m.CommentLines)[tagUnionDiscriminator] != nil { - errors = append(errors, u.setDiscriminator(jsonName)...) - } - if gengo.ExtractCommentTags("+", m.CommentLines)[tagUnionMember] != nil { - errors = append(errors, fmt.Errorf("union tag is not accepted on struct members: %v.%v", t.Name, m.Name)) - continue - } - if gengo.ExtractCommentTags("+", m.CommentLines)[tagUnionDeprecated] != nil { - if optional, err := isOptional(&m); !optional || err != nil { - errors = append(errors, fmt.Errorf("union members must be optional: %v.%v", t.Name, m.Name)) - } - u.addMember(jsonName, m.Name) - } - } - if len(u.fieldsToDiscriminated) == 0 { - return nil, nil - } - return u, append(errors, u.isValid()...) -} diff --git a/vendor/k8s.io/kube-openapi/pkg/util/sets/empty.go b/vendor/k8s.io/kube-openapi/pkg/util/sets/empty.go deleted file mode 100644 index 13303ea8900..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/util/sets/empty.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -// NOTE: This file is copied from k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/sets/empty.go -// because in Kubernetes we don't allowed vendor code to import staging code. See -// https://github.com/kubernetes/kube-openapi/pull/90 for more details. - -package sets - -// Empty is public since it is used by some internal API objects for conversions between external -// string arrays and internal sets, and conversion logic requires public types today. -type Empty struct{} diff --git a/vendor/k8s.io/kube-openapi/pkg/util/sets/string.go b/vendor/k8s.io/kube-openapi/pkg/util/sets/string.go deleted file mode 100644 index 53f2bc12aae..00000000000 --- a/vendor/k8s.io/kube-openapi/pkg/util/sets/string.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -// NOTE: This file is copied from k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/sets/string.go -// because in Kubernetes we don't allowed vendor code to import staging code. See -// https://github.com/kubernetes/kube-openapi/pull/90 for more details. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption. -type String map[string]Empty - -// NewString creates a String from a list of values. -func NewString(items ...string) String { - ss := String{} - ss.Insert(items...) - return ss -} - -// StringKeySet creates a String from a keys of a map[string](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func StringKeySet(theMap interface{}) String { - v := reflect.ValueOf(theMap) - ret := String{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(string)) - } - return ret -} - -// Insert adds items to the set. -func (s String) Insert(items ...string) { - for _, item := range items { - s[item] = Empty{} - } -} - -// Delete removes all items from the set. -func (s String) Delete(items ...string) { - for _, item := range items { - delete(s, item) - } -} - -// Has returns true if and only if item is contained in the set. -func (s String) Has(item string) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s String) HasAll(items ...string) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s String) HasAny(items ...string) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s String) Difference(s2 String) String { - result := NewString() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 String) Union(s2 String) String { - result := NewString() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 String) Intersection(s2 String) String { - var walk, other String - result := NewString() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 String) IsSuperset(s2 String) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 String) Equal(s2 String) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfString []string - -func (s sortableSliceOfString) Len() int { return len(s) } -func (s sortableSliceOfString) Less(i, j int) bool { return lessString(s[i], s[j]) } -func (s sortableSliceOfString) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted string slice. -func (s String) List() []string { - res := make(sortableSliceOfString, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []string(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s String) UnsortedList() []string { - res := make([]string, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s String) PopAny() (string, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue string - return zeroValue, false -} - -// Len returns the size of the set. -func (s String) Len() int { - return len(s) -} - -func lessString(lhs, rhs string) bool { - return lhs < rhs -} diff --git a/vendor/k8s.io/utils/integer/integer.go b/vendor/k8s.io/utils/integer/integer.go deleted file mode 100644 index e0811e8344c..00000000000 --- a/vendor/k8s.io/utils/integer/integer.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 integer - -import "math" - -// IntMax returns the maximum of the params -func IntMax(a, b int) int { - if b > a { - return b - } - return a -} - -// IntMin returns the minimum of the params -func IntMin(a, b int) int { - if b < a { - return b - } - return a -} - -// Int32Max returns the maximum of the params -func Int32Max(a, b int32) int32 { - if b > a { - return b - } - return a -} - -// Int32Min returns the minimum of the params -func Int32Min(a, b int32) int32 { - if b < a { - return b - } - return a -} - -// Int64Max returns the maximum of the params -func Int64Max(a, b int64) int64 { - if b > a { - return b - } - return a -} - -// Int64Min returns the minimum of the params -func Int64Min(a, b int64) int64 { - if b < a { - return b - } - return a -} - -// RoundToInt32 rounds floats into integer numbers. -// Deprecated: use math.Round() and a cast directly. -func RoundToInt32(a float64) int32 { - return int32(math.Round(a)) -} diff --git a/vendor/k8s.io/utils/trace/trace.go b/vendor/k8s.io/utils/trace/trace.go index 187eb5d8c5e..559aebb59a5 100644 --- a/vendor/k8s.io/utils/trace/trace.go +++ b/vendor/k8s.io/utils/trace/trace.go @@ -192,7 +192,7 @@ func (t *Trace) Log() { t.endTime = &endTime t.lock.Unlock() // an explicit logging request should dump all the steps out at the higher level - if t.parentTrace == nil { // We don't start logging until Log or LogIfLong is called on the root trace + if t.parentTrace == nil && klogV(2) { // We don't start logging until Log or LogIfLong is called on the root trace t.logTrace() } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 96ae0e8d231..9e139785b6c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,7 +1,4 @@ -# cel.dev/expr v0.15.0 -## explicit; go 1.18 -cel.dev/expr -# github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 +# github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 ## explicit; go 1.16 github.com/Azure/go-ansiterm github.com/Azure/go-ansiterm/winterm @@ -12,12 +9,9 @@ github.com/Microsoft/go-winio/internal/fs github.com/Microsoft/go-winio/internal/socket github.com/Microsoft/go-winio/internal/stringbuffer github.com/Microsoft/go-winio/pkg/guid -# github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230512164433-5d1fd1a340c9 -## explicit; go 1.18 -github.com/antlr/antlr4/runtime/Go/antlr/v4 -# github.com/armon/go-metrics v0.4.1 -## explicit; go 1.12 -github.com/armon/go-metrics +# github.com/antlr4-go/antlr/v4 v4.13.0 +## explicit; go 1.20 +github.com/antlr4-go/antlr/v4 # github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 ## explicit; go 1.13 github.com/asaskevich/govalidator @@ -33,171 +27,35 @@ github.com/bombsimon/logrusr/v4 # github.com/cespare/xxhash/v2 v2.3.0 ## explicit; go 1.11 github.com/cespare/xxhash/v2 -# github.com/cilium/cilium v1.15.7 -## explicit; go 1.21.0 -github.com/cilium/cilium/api/v1/client -github.com/cilium/cilium/api/v1/client/bgp -github.com/cilium/cilium/api/v1/client/daemon -github.com/cilium/cilium/api/v1/client/endpoint -github.com/cilium/cilium/api/v1/client/ipam -github.com/cilium/cilium/api/v1/client/metrics -github.com/cilium/cilium/api/v1/client/policy -github.com/cilium/cilium/api/v1/client/prefilter -github.com/cilium/cilium/api/v1/client/recorder -github.com/cilium/cilium/api/v1/client/service -github.com/cilium/cilium/api/v1/client/statedb +# github.com/cilium/cilium v1.16.1 +## explicit; go 1.22.0 github.com/cilium/cilium/api/v1/flow -github.com/cilium/cilium/api/v1/health/client -github.com/cilium/cilium/api/v1/health/client/connectivity -github.com/cilium/cilium/api/v1/health/client/restapi -github.com/cilium/cilium/api/v1/health/models github.com/cilium/cilium/api/v1/models -github.com/cilium/cilium/pkg/alibabacloud/eni/types github.com/cilium/cilium/pkg/alignchecker -github.com/cilium/cilium/pkg/allocator -github.com/cilium/cilium/pkg/annotation -github.com/cilium/cilium/pkg/api -github.com/cilium/cilium/pkg/aws/eni/types -github.com/cilium/cilium/pkg/azure/types -github.com/cilium/cilium/pkg/backoff -github.com/cilium/cilium/pkg/bpf -github.com/cilium/cilium/pkg/byteorder github.com/cilium/cilium/pkg/cidr -github.com/cilium/cilium/pkg/client github.com/cilium/cilium/pkg/clustermesh/types github.com/cilium/cilium/pkg/command -github.com/cilium/cilium/pkg/command/exec -github.com/cilium/cilium/pkg/common -github.com/cilium/cilium/pkg/comparator -github.com/cilium/cilium/pkg/components -github.com/cilium/cilium/pkg/container -github.com/cilium/cilium/pkg/controller -github.com/cilium/cilium/pkg/counter -github.com/cilium/cilium/pkg/crypto/certificatemanager -github.com/cilium/cilium/pkg/datapath/linux/bandwidth -github.com/cilium/cilium/pkg/datapath/linux/config/defines -github.com/cilium/cilium/pkg/datapath/linux/probes -github.com/cilium/cilium/pkg/datapath/loader/metrics -github.com/cilium/cilium/pkg/datapath/tunnel -github.com/cilium/cilium/pkg/datapath/types -github.com/cilium/cilium/pkg/debug github.com/cilium/cilium/pkg/defaults -github.com/cilium/cilium/pkg/ebpf -github.com/cilium/cilium/pkg/endpoint/id -github.com/cilium/cilium/pkg/endpoint/regeneration -github.com/cilium/cilium/pkg/eventqueue -github.com/cilium/cilium/pkg/fqdn/dns -github.com/cilium/cilium/pkg/fqdn/matchpattern -github.com/cilium/cilium/pkg/fqdn/re -github.com/cilium/cilium/pkg/fqdn/restore -github.com/cilium/cilium/pkg/health/client -github.com/cilium/cilium/pkg/health/defaults -github.com/cilium/cilium/pkg/hive -github.com/cilium/cilium/pkg/hive/cell -github.com/cilium/cilium/pkg/hive/internal -github.com/cilium/cilium/pkg/hive/metrics github.com/cilium/cilium/pkg/hubble/api/v1 github.com/cilium/cilium/pkg/hubble/filters github.com/cilium/cilium/pkg/hubble/k8s -github.com/cilium/cilium/pkg/iana -github.com/cilium/cilium/pkg/identity -github.com/cilium/cilium/pkg/identity/cache -github.com/cilium/cilium/pkg/identity/identitymanager -github.com/cilium/cilium/pkg/identity/key -github.com/cilium/cilium/pkg/identity/model -github.com/cilium/cilium/pkg/idpool -github.com/cilium/cilium/pkg/inctimer github.com/cilium/cilium/pkg/ip github.com/cilium/cilium/pkg/ipam/option -github.com/cilium/cilium/pkg/ipam/types -github.com/cilium/cilium/pkg/ipcache/types -github.com/cilium/cilium/pkg/k8s/apis/cilium.io -github.com/cilium/cilium/pkg/k8s/apis/cilium.io/utils -github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2 -github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1 -github.com/cilium/cilium/pkg/k8s/client -github.com/cilium/cilium/pkg/k8s/client/clientset/versioned -github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/fake -github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme -github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2 -github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake -github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1 -github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake -github.com/cilium/cilium/pkg/k8s/constants -github.com/cilium/cilium/pkg/k8s/identitybackend -github.com/cilium/cilium/pkg/k8s/informer -github.com/cilium/cilium/pkg/k8s/metrics -github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1 -github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1 -github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1 -github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1 -github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme -github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1 -github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-clientset -github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1 github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1 -github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1/validation -github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1 github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/selection -github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr -github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned -github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/fake -github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme -github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1 -github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake -github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1 -github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake -github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1 -github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake -github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1 -github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake -github.com/cilium/cilium/pkg/k8s/utils -github.com/cilium/cilium/pkg/k8s/version -github.com/cilium/cilium/pkg/kvstore -github.com/cilium/cilium/pkg/kvstore/allocator -github.com/cilium/cilium/pkg/kvstore/store github.com/cilium/cilium/pkg/labels -github.com/cilium/cilium/pkg/loadbalancer github.com/cilium/cilium/pkg/lock github.com/cilium/cilium/pkg/logging github.com/cilium/cilium/pkg/logging/logfields github.com/cilium/cilium/pkg/mac -github.com/cilium/cilium/pkg/maps/bwmap -github.com/cilium/cilium/pkg/maps/callsmap -github.com/cilium/cilium/pkg/maps/lxcmap -github.com/cilium/cilium/pkg/metrics -github.com/cilium/cilium/pkg/metrics/metric -github.com/cilium/cilium/pkg/metrics/metric/collections github.com/cilium/cilium/pkg/monitor/api github.com/cilium/cilium/pkg/monitor/notifications -github.com/cilium/cilium/pkg/mountinfo -github.com/cilium/cilium/pkg/node -github.com/cilium/cilium/pkg/node/addressing -github.com/cilium/cilium/pkg/node/types github.com/cilium/cilium/pkg/option -github.com/cilium/cilium/pkg/policy -github.com/cilium/cilium/pkg/policy/api -github.com/cilium/cilium/pkg/policy/trafficdirection -github.com/cilium/cilium/pkg/promise -github.com/cilium/cilium/pkg/proxy/accesslog -github.com/cilium/cilium/pkg/rand -github.com/cilium/cilium/pkg/rate -github.com/cilium/cilium/pkg/rate/metrics -github.com/cilium/cilium/pkg/safeio -github.com/cilium/cilium/pkg/safetime github.com/cilium/cilium/pkg/slices -github.com/cilium/cilium/pkg/source -github.com/cilium/cilium/pkg/spanstat -github.com/cilium/cilium/pkg/stream -github.com/cilium/cilium/pkg/sysctl github.com/cilium/cilium/pkg/time -github.com/cilium/cilium/pkg/trigger -github.com/cilium/cilium/pkg/types -github.com/cilium/cilium/pkg/u8proto github.com/cilium/cilium/pkg/version github.com/cilium/cilium/pkg/versioncheck -github.com/cilium/cilium/pkg/wireguard/types # github.com/cilium/ebpf v0.16.0 ## explicit; go 1.21 github.com/cilium/ebpf @@ -226,18 +84,6 @@ github.com/cilium/little-vm-helper/pkg/step # github.com/cilium/lumberjack/v2 v2.3.0 ## explicit; go 1.13 github.com/cilium/lumberjack/v2 -# github.com/cilium/proxy v0.0.0-20231031145409-f19708f3d018 -## explicit; go 1.20 -github.com/cilium/proxy/go/cilium/api -github.com/cilium/proxy/go/envoy/annotations -github.com/cilium/proxy/go/envoy/config/core/v3 -github.com/cilium/proxy/go/envoy/config/route/v3 -github.com/cilium/proxy/go/envoy/service/discovery/v3 -github.com/cilium/proxy/go/envoy/type/matcher/v3 -github.com/cilium/proxy/go/envoy/type/metadata/v3 -github.com/cilium/proxy/go/envoy/type/tracing/v3 -github.com/cilium/proxy/go/envoy/type/v3 -github.com/cilium/proxy/pkg/policy/api/kafka # github.com/cilium/tetragon/api v0.0.0-00010101000000-000000000000 => ./api ## explicit; go 1.22.1 github.com/cilium/tetragon/api/v1/tetragon @@ -259,26 +105,15 @@ github.com/cilium/tetragon/pkg/k8s/client/informers/externalversions/internalint github.com/cilium/tetragon/pkg/k8s/client/listers/cilium.io/v1alpha1 github.com/cilium/tetragon/pkg/k8s/crdutils github.com/cilium/tetragon/pkg/k8s/version -# github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b -## explicit; go 1.19 -github.com/cncf/xds/go/udpa/annotations -github.com/cncf/xds/go/xds/annotations/v3 -github.com/cncf/xds/go/xds/core/v3 -github.com/cncf/xds/go/xds/type/matcher/v3 -github.com/cncf/xds/go/xds/type/v3 # github.com/containerd/cgroups v1.1.0 ## explicit; go 1.17 github.com/containerd/cgroups github.com/containerd/cgroups/stats/v1 github.com/containerd/cgroups/v2 github.com/containerd/cgroups/v2/stats -# github.com/coreos/go-semver v0.3.1 -## explicit; go 1.8 -github.com/coreos/go-semver/semver # github.com/coreos/go-systemd/v22 v22.5.0 ## explicit; go 1.12 github.com/coreos/go-systemd/v22/dbus -github.com/coreos/go-systemd/v22/journal # github.com/cpuguy83/go-md2man/v2 v2.0.4 ## explicit; go 1.11 github.com/cpuguy83/go-md2man/v2/md2man @@ -323,19 +158,17 @@ github.com/docker/go-connections/tlsconfig # github.com/docker/go-units v0.5.0 ## explicit github.com/docker/go-units -# github.com/emicklei/go-restful/v3 v3.11.2 +# github.com/emicklei/go-restful/v3 v3.12.0 ## explicit; go 1.13 github.com/emicklei/go-restful/v3 github.com/emicklei/go-restful/v3/log -# github.com/envoyproxy/protoc-gen-validate v1.0.4 -## explicit; go 1.19 -github.com/envoyproxy/protoc-gen-validate/validate -# github.com/evanphx/json-patch v5.7.0+incompatible +# github.com/evanphx/json-patch v5.9.0+incompatible ## explicit github.com/evanphx/json-patch -# github.com/evanphx/json-patch/v5 v5.7.0 +# github.com/evanphx/json-patch/v5 v5.9.0 ## explicit; go 1.18 github.com/evanphx/json-patch/v5 +github.com/evanphx/json-patch/v5/internal/json # github.com/fatih/color v1.17.0 ## explicit; go 1.17 github.com/fatih/color @@ -352,12 +185,8 @@ github.com/go-logr/logr/funcr # github.com/go-logr/stdr v1.2.2 ## explicit; go 1.16 github.com/go-logr/stdr -# github.com/go-ole/go-ole v1.2.6 -## explicit; go 1.12 -github.com/go-ole/go-ole -github.com/go-ole/go-ole/oleutil -# github.com/go-openapi/analysis v0.21.4 -## explicit; go 1.13 +# github.com/go-openapi/analysis v0.23.0 +## explicit; go 1.20 github.com/go-openapi/analysis github.com/go-openapi/analysis/internal/debug github.com/go-openapi/analysis/internal/flatten/normalize @@ -368,38 +197,27 @@ github.com/go-openapi/analysis/internal/flatten/sortref # github.com/go-openapi/errors v0.22.0 ## explicit; go 1.20 github.com/go-openapi/errors -# github.com/go-openapi/jsonpointer v0.20.2 -## explicit; go 1.19 +# github.com/go-openapi/jsonpointer v0.21.0 +## explicit; go 1.20 github.com/go-openapi/jsonpointer -# github.com/go-openapi/jsonreference v0.20.4 -## explicit; go 1.19 +# github.com/go-openapi/jsonreference v0.21.0 +## explicit; go 1.20 github.com/go-openapi/jsonreference github.com/go-openapi/jsonreference/internal -# github.com/go-openapi/loads v0.21.2 -## explicit; go 1.13 +# github.com/go-openapi/loads v0.22.0 +## explicit; go 1.20 github.com/go-openapi/loads -# github.com/go-openapi/runtime v0.26.2 -## explicit; go 1.19 -github.com/go-openapi/runtime -github.com/go-openapi/runtime/client -github.com/go-openapi/runtime/logger -github.com/go-openapi/runtime/middleware -github.com/go-openapi/runtime/middleware/denco -github.com/go-openapi/runtime/middleware/header -github.com/go-openapi/runtime/middleware/untyped -github.com/go-openapi/runtime/security -github.com/go-openapi/runtime/yamlpc -# github.com/go-openapi/spec v0.20.11 -## explicit; go 1.13 +# github.com/go-openapi/spec v0.21.0 +## explicit; go 1.20 github.com/go-openapi/spec # github.com/go-openapi/strfmt v0.23.0 ## explicit; go 1.20 github.com/go-openapi/strfmt -# github.com/go-openapi/swag v0.22.7 -## explicit; go 1.19 +# github.com/go-openapi/swag v0.23.0 +## explicit; go 1.20 github.com/go-openapi/swag -# github.com/go-openapi/validate v0.22.3 -## explicit; go 1.18 +# github.com/go-openapi/validate v0.24.0 +## explicit; go 1.20 github.com/go-openapi/validate # github.com/gobuffalo/flect v1.0.2 ## explicit; go 1.16 @@ -423,7 +241,7 @@ github.com/golang/protobuf/ptypes github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/duration github.com/golang/protobuf/ptypes/timestamp -# github.com/google/cel-go v0.17.7 +# github.com/google/cel-go v0.20.1 ## explicit; go 1.18 github.com/google/cel-go/cel github.com/google/cel-go/checker @@ -466,10 +284,6 @@ github.com/google/go-cmp/cmp/internal/value ## explicit; go 1.12 github.com/google/gofuzz github.com/google/gofuzz/bytesource -# github.com/google/gopacket v1.1.19 -## explicit; go 1.12 -github.com/google/gopacket -github.com/google/gopacket/layers # github.com/google/gops v0.3.28 ## explicit; go 1.17 github.com/google/gops/agent @@ -487,39 +301,13 @@ github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus # github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 ## explicit; go 1.19 github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors -# github.com/hashicorp/consul/api v1.28.2 -## explicit; go 1.19 -github.com/hashicorp/consul/api -# github.com/hashicorp/errwrap v1.1.0 -## explicit -github.com/hashicorp/errwrap -# github.com/hashicorp/go-cleanhttp v0.5.2 -## explicit; go 1.13 -github.com/hashicorp/go-cleanhttp -# github.com/hashicorp/go-hclog v1.5.0 -## explicit; go 1.13 -github.com/hashicorp/go-hclog -# github.com/hashicorp/go-immutable-radix v1.3.1 -## explicit -github.com/hashicorp/go-immutable-radix -# github.com/hashicorp/go-multierror v1.1.1 -## explicit; go 1.13 -github.com/hashicorp/go-multierror -# github.com/hashicorp/go-rootcerts v1.0.2 -## explicit; go 1.12 -github.com/hashicorp/go-rootcerts -# github.com/hashicorp/go-version v1.6.0 -## explicit -# github.com/hashicorp/golang-lru v0.5.4 -## explicit; go 1.12 -github.com/hashicorp/golang-lru/simplelru # github.com/hashicorp/golang-lru/v2 v2.0.7 ## explicit; go 1.18 github.com/hashicorp/golang-lru/v2 github.com/hashicorp/golang-lru/v2/internal github.com/hashicorp/golang-lru/v2/simplelru -# github.com/hashicorp/hcl v1.0.0 -## explicit +# github.com/hashicorp/hcl v1.0.1-vault-5 +## explicit; go 1.15 github.com/hashicorp/hcl github.com/hashicorp/hcl/hcl/ast github.com/hashicorp/hcl/hcl/parser @@ -530,9 +318,6 @@ github.com/hashicorp/hcl/hcl/token github.com/hashicorp/hcl/json/parser github.com/hashicorp/hcl/json/scanner github.com/hashicorp/hcl/json/token -# github.com/hashicorp/serf v0.10.1 -## explicit; go 1.12 -github.com/hashicorp/serf/coordinate # github.com/iancoleman/strcase v0.3.0 ## explicit; go 1.16 github.com/iancoleman/strcase @@ -557,15 +342,9 @@ github.com/json-iterator/go # github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 ## explicit github.com/kballard/go-shellquote -# github.com/kr/pretty v0.3.1 -## explicit; go 1.12 -github.com/kr/pretty -# github.com/kr/text v0.2.0 -## explicit -github.com/kr/text -# github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 -## explicit; go 1.16 -github.com/lufia/plan9stats +# github.com/mackerelio/go-osstat v0.2.5 +## explicit; go 1.18 +github.com/mackerelio/go-osstat/memory # github.com/magiconair/properties v1.8.7 ## explicit; go 1.19 github.com/magiconair/properties @@ -583,9 +362,6 @@ github.com/mattn/go-isatty # github.com/mennanov/fieldmask-utils v1.1.2 ## explicit; go 1.16 github.com/mennanov/fieldmask-utils -# github.com/mitchellh/go-homedir v1.1.0 -## explicit -github.com/mitchellh/go-homedir # github.com/mitchellh/mapstructure v1.5.0 ## explicit; go 1.14 github.com/mitchellh/mapstructure @@ -628,11 +404,6 @@ github.com/opencontainers/image-spec/specs-go/v1 # github.com/opencontainers/runtime-spec v1.2.0 ## explicit github.com/opencontainers/runtime-spec/specs-go -# github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b -## explicit; go 1.14 -github.com/opentracing/opentracing-go -github.com/opentracing/opentracing-go/ext -github.com/opentracing/opentracing-go/log # github.com/pelletier/go-toml/v2 v2.2.2 ## explicit; go 1.16 github.com/pelletier/go-toml/v2 @@ -649,9 +420,6 @@ github.com/pkg/errors # github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 ## explicit github.com/pmezard/go-difflib/difflib -# github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c -## explicit; go 1.14 -github.com/power-devops/perfstat # github.com/prometheus/client_golang v1.19.1 ## explicit; go 1.20 github.com/prometheus/client_golang/prometheus @@ -674,9 +442,6 @@ github.com/prometheus/common/model github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util -# github.com/rogpeppe/go-internal v1.11.0 -## explicit; go 1.19 -github.com/rogpeppe/go-internal/fmtsort # github.com/russross/blackfriday/v2 v2.1.0 ## explicit github.com/russross/blackfriday/v2 @@ -689,11 +454,6 @@ github.com/sagikazarmark/slog-shim # github.com/sasha-s/go-deadlock v0.3.1 ## explicit github.com/sasha-s/go-deadlock -# github.com/shirou/gopsutil/v3 v3.23.7 -## explicit; go 1.15 -github.com/shirou/gopsutil/v3/common -github.com/shirou/gopsutil/v3/internal/common -github.com/shirou/gopsutil/v3/mem # github.com/sirupsen/logrus v1.9.3 ## explicit; go 1.13 github.com/sirupsen/logrus @@ -716,7 +476,7 @@ github.com/spf13/cast ## explicit; go 1.15 github.com/spf13/cobra github.com/spf13/cobra/doc -# github.com/spf13/pflag v1.0.5 +# github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace ## explicit; go 1.12 github.com/spf13/pflag # github.com/spf13/viper v1.19.0 @@ -754,12 +514,6 @@ github.com/tidwall/match # github.com/tidwall/pretty v1.2.0 ## explicit; go 1.16 github.com/tidwall/pretty -# github.com/tklauser/go-sysconf v0.3.11 -## explicit; go 1.13 -github.com/tklauser/go-sysconf -# github.com/tklauser/numcpus v0.6.0 -## explicit; go 1.13 -github.com/tklauser/numcpus # github.com/vishvananda/netlink v1.2.1 ## explicit; go 1.12 github.com/vishvananda/netlink @@ -775,31 +529,6 @@ github.com/vladimirvivien/gexe/fs github.com/vladimirvivien/gexe/http github.com/vladimirvivien/gexe/prog github.com/vladimirvivien/gexe/vars -# github.com/yusufpapurcu/wmi v1.2.3 -## explicit; go 1.16 -github.com/yusufpapurcu/wmi -# go.etcd.io/etcd/api/v3 v3.5.12 -## explicit; go 1.20 -go.etcd.io/etcd/api/v3/authpb -go.etcd.io/etcd/api/v3/etcdserverpb -go.etcd.io/etcd/api/v3/membershippb -go.etcd.io/etcd/api/v3/mvccpb -go.etcd.io/etcd/api/v3/v3rpc/rpctypes -go.etcd.io/etcd/api/v3/version -# go.etcd.io/etcd/client/pkg/v3 v3.5.12 -## explicit; go 1.20 -go.etcd.io/etcd/client/pkg/v3/logutil -go.etcd.io/etcd/client/pkg/v3/systemd -go.etcd.io/etcd/client/pkg/v3/tlsutil -go.etcd.io/etcd/client/pkg/v3/types -# go.etcd.io/etcd/client/v3 v3.5.12 -## explicit; go 1.20 -go.etcd.io/etcd/client/v3 -go.etcd.io/etcd/client/v3/concurrency -go.etcd.io/etcd/client/v3/credentials -go.etcd.io/etcd/client/v3/internal/endpoint -go.etcd.io/etcd/client/v3/internal/resolver -go.etcd.io/etcd/client/v3/yaml # go.mongodb.org/mongo-driver v1.14.0 ## explicit; go 1.18 go.mongodb.org/mongo-driver/bson @@ -813,8 +542,8 @@ go.mongodb.org/mongo-driver/x/bsonx/bsoncore ## explicit; go 1.20 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil -# go.opentelemetry.io/otel v1.24.0 -## explicit; go 1.20 +# go.opentelemetry.io/otel v1.27.0 +## explicit; go 1.21 go.opentelemetry.io/otel go.opentelemetry.io/otel/attribute go.opentelemetry.io/otel/baggage @@ -824,43 +553,23 @@ go.opentelemetry.io/otel/internal/attribute go.opentelemetry.io/otel/internal/baggage go.opentelemetry.io/otel/internal/global go.opentelemetry.io/otel/propagation -go.opentelemetry.io/otel/semconv/internal/v2 -go.opentelemetry.io/otel/semconv/v1.17.0 -go.opentelemetry.io/otel/semconv/v1.17.0/httpconv go.opentelemetry.io/otel/semconv/v1.20.0 -# go.opentelemetry.io/otel/metric v1.24.0 -## explicit; go 1.20 +# go.opentelemetry.io/otel/metric v1.27.0 +## explicit; go 1.21 go.opentelemetry.io/otel/metric go.opentelemetry.io/otel/metric/embedded -# go.opentelemetry.io/otel/trace v1.24.0 +# go.opentelemetry.io/otel/sdk v1.24.0 ## explicit; go 1.20 +# go.opentelemetry.io/otel/trace v1.27.0 +## explicit; go 1.21 go.opentelemetry.io/otel/trace go.opentelemetry.io/otel/trace/embedded # go.uber.org/atomic v1.11.0 ## explicit; go 1.18 go.uber.org/atomic -# go.uber.org/dig v1.17.1 -## explicit; go 1.20 -go.uber.org/dig -go.uber.org/dig/internal/digerror -go.uber.org/dig/internal/digreflect -go.uber.org/dig/internal/dot -go.uber.org/dig/internal/graph # go.uber.org/multierr v1.11.0 ## explicit; go 1.19 go.uber.org/multierr -# go.uber.org/zap v1.26.0 -## explicit; go 1.19 -go.uber.org/zap -go.uber.org/zap/buffer -go.uber.org/zap/internal -go.uber.org/zap/internal/bufferpool -go.uber.org/zap/internal/color -go.uber.org/zap/internal/exit -go.uber.org/zap/internal/pool -go.uber.org/zap/internal/stacktrace -go.uber.org/zap/zapcore -go.uber.org/zap/zapgrpc # go4.org/netipx v0.0.0-20231129151722-fdeea329fbba ## explicit; go 1.18 go4.org/netipx @@ -889,6 +598,7 @@ golang.org/x/net/internal/socks golang.org/x/net/internal/timeseries golang.org/x/net/proxy golang.org/x/net/trace +golang.org/x/net/websocket # golang.org/x/oauth2 v0.20.0 ## explicit; go 1.18 golang.org/x/oauth2 @@ -964,10 +674,8 @@ gomodules.xyz/jsonpatch/v2 google.golang.org/genproto/protobuf/field_mask # google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 ## explicit; go 1.20 -google.golang.org/genproto/googleapis/api -google.golang.org/genproto/googleapis/api/annotations google.golang.org/genproto/googleapis/api/expr/v1alpha1 -# google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 ## explicit; go 1.20 google.golang.org/genproto/googleapis/rpc/status # google.golang.org/grpc v1.65.0 @@ -1025,7 +733,6 @@ google.golang.org/grpc/reflection/grpc_reflection_v1alpha google.golang.org/grpc/reflection/internal google.golang.org/grpc/resolver google.golang.org/grpc/resolver/dns -google.golang.org/grpc/resolver/manual google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats google.golang.org/grpc/status @@ -1088,13 +795,14 @@ gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# k8s.io/api v0.29.8 -## explicit; go 1.21 +# k8s.io/api v0.30.3 +## explicit; go 1.22.0 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 k8s.io/api/admissionregistration/v1 k8s.io/api/admissionregistration/v1alpha1 k8s.io/api/admissionregistration/v1beta1 +k8s.io/api/apidiscovery/v2 k8s.io/api/apidiscovery/v2beta1 k8s.io/api/apiserverinternal/v1alpha1 k8s.io/api/apps/v1 @@ -1144,8 +852,9 @@ k8s.io/api/scheduling/v1beta1 k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 -# k8s.io/apiextensions-apiserver v0.29.8 -## explicit; go 1.21 +k8s.io/api/storagemigration/v1alpha1 +# k8s.io/apiextensions-apiserver v0.30.2 +## explicit; go 1.22.0 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1 @@ -1159,18 +868,15 @@ k8s.io/apiextensions-apiserver/pkg/apiserver/validation k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1 k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset -k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 -k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 -k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/features -# k8s.io/apimachinery v0.29.8 -## explicit; go 1.21 +# k8s.io/apimachinery v0.30.3 +## explicit; go 1.22.0 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors k8s.io/apimachinery/pkg/api/meta @@ -1200,11 +906,11 @@ k8s.io/apimachinery/pkg/types k8s.io/apimachinery/pkg/util/cache k8s.io/apimachinery/pkg/util/diff k8s.io/apimachinery/pkg/util/dump -k8s.io/apimachinery/pkg/util/duration k8s.io/apimachinery/pkg/util/errors k8s.io/apimachinery/pkg/util/framer k8s.io/apimachinery/pkg/util/httpstream k8s.io/apimachinery/pkg/util/httpstream/spdy +k8s.io/apimachinery/pkg/util/httpstream/wsstream k8s.io/apimachinery/pkg/util/intstr k8s.io/apimachinery/pkg/util/json k8s.io/apimachinery/pkg/util/managedfields @@ -1212,6 +918,7 @@ k8s.io/apimachinery/pkg/util/managedfields/internal k8s.io/apimachinery/pkg/util/mergepatch k8s.io/apimachinery/pkg/util/naming k8s.io/apimachinery/pkg/util/net +k8s.io/apimachinery/pkg/util/portforward k8s.io/apimachinery/pkg/util/proxy k8s.io/apimachinery/pkg/util/rand k8s.io/apimachinery/pkg/util/remotecommand @@ -1229,8 +936,8 @@ k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/netutil k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/apiserver v0.29.8 -## explicit; go 1.21 +# k8s.io/apiserver v0.30.3 +## explicit; go 1.22.0 k8s.io/apiserver/pkg/apis/cel k8s.io/apiserver/pkg/authentication/serviceaccount k8s.io/apiserver/pkg/authentication/user @@ -1243,8 +950,8 @@ k8s.io/apiserver/pkg/cel/metrics k8s.io/apiserver/pkg/cel/openapi k8s.io/apiserver/pkg/util/feature k8s.io/apiserver/pkg/warning -# k8s.io/client-go v0.29.8 -## explicit; go 1.21 +# k8s.io/client-go v0.30.3 +## explicit; go 1.22.0 k8s.io/client-go/applyconfigurations/admissionregistration/v1 k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1 k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1 @@ -1293,9 +1000,11 @@ k8s.io/client-go/applyconfigurations/scheduling/v1beta1 k8s.io/client-go/applyconfigurations/storage/v1 k8s.io/client-go/applyconfigurations/storage/v1alpha1 k8s.io/client-go/applyconfigurations/storage/v1beta1 +k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1 k8s.io/client-go/discovery k8s.io/client-go/discovery/fake k8s.io/client-go/dynamic +k8s.io/client-go/features k8s.io/client-go/informers k8s.io/client-go/informers/admissionregistration k8s.io/client-go/informers/admissionregistration/v1 @@ -1363,6 +1072,8 @@ k8s.io/client-go/informers/storage k8s.io/client-go/informers/storage/v1 k8s.io/client-go/informers/storage/v1alpha1 k8s.io/client-go/informers/storage/v1beta1 +k8s.io/client-go/informers/storagemigration +k8s.io/client-go/informers/storagemigration/v1alpha1 k8s.io/client-go/kubernetes k8s.io/client-go/kubernetes/fake k8s.io/client-go/kubernetes/scheme @@ -1468,6 +1179,8 @@ k8s.io/client-go/kubernetes/typed/storage/v1alpha1 k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake k8s.io/client-go/kubernetes/typed/storage/v1beta1 k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake +k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1 +k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake k8s.io/client-go/listers/admissionregistration/v1 k8s.io/client-go/listers/admissionregistration/v1alpha1 k8s.io/client-go/listers/admissionregistration/v1beta1 @@ -1514,6 +1227,7 @@ k8s.io/client-go/listers/scheduling/v1beta1 k8s.io/client-go/listers/storage/v1 k8s.io/client-go/listers/storage/v1alpha1 k8s.io/client-go/listers/storage/v1beta1 +k8s.io/client-go/listers/storagemigration/v1alpha1 k8s.io/client-go/metadata k8s.io/client-go/openapi k8s.io/client-go/pkg/apis/clientauthentication @@ -1561,8 +1275,8 @@ k8s.io/client-go/util/jsonpath k8s.io/client-go/util/keyutil k8s.io/client-go/util/retry k8s.io/client-go/util/workqueue -# k8s.io/code-generator v0.29.8 -## explicit; go 1.21 +# k8s.io/code-generator v0.30.2 +## explicit; go 1.22.0 k8s.io/code-generator k8s.io/code-generator/cmd/applyconfiguration-gen k8s.io/code-generator/cmd/applyconfiguration-gen/args @@ -1573,57 +1287,41 @@ k8s.io/code-generator/cmd/client-gen/generators k8s.io/code-generator/cmd/client-gen/generators/fake k8s.io/code-generator/cmd/client-gen/generators/scheme k8s.io/code-generator/cmd/client-gen/generators/util -k8s.io/code-generator/cmd/client-gen/path k8s.io/code-generator/cmd/client-gen/types k8s.io/code-generator/cmd/conversion-gen k8s.io/code-generator/cmd/conversion-gen/args k8s.io/code-generator/cmd/conversion-gen/generators k8s.io/code-generator/cmd/deepcopy-gen k8s.io/code-generator/cmd/deepcopy-gen/args +k8s.io/code-generator/cmd/deepcopy-gen/generators k8s.io/code-generator/cmd/defaulter-gen k8s.io/code-generator/cmd/defaulter-gen/args +k8s.io/code-generator/cmd/defaulter-gen/generators k8s.io/code-generator/cmd/go-to-protobuf k8s.io/code-generator/cmd/go-to-protobuf/protobuf -k8s.io/code-generator/cmd/import-boss k8s.io/code-generator/cmd/informer-gen k8s.io/code-generator/cmd/informer-gen/args k8s.io/code-generator/cmd/informer-gen/generators k8s.io/code-generator/cmd/lister-gen k8s.io/code-generator/cmd/lister-gen/args k8s.io/code-generator/cmd/lister-gen/generators -k8s.io/code-generator/cmd/openapi-gen k8s.io/code-generator/cmd/register-gen k8s.io/code-generator/cmd/register-gen/args k8s.io/code-generator/cmd/register-gen/generators -k8s.io/code-generator/cmd/set-gen k8s.io/code-generator/pkg/namer k8s.io/code-generator/pkg/util k8s.io/code-generator/third_party/forked/golang/reflect -# k8s.io/component-base v0.29.8 -## explicit; go 1.21 -k8s.io/component-base/config -k8s.io/component-base/config/v1alpha1 +# k8s.io/component-base v0.30.3 +## explicit; go 1.22.0 k8s.io/component-base/featuregate k8s.io/component-base/metrics k8s.io/component-base/metrics/legacyregistry k8s.io/component-base/metrics/prometheus/feature k8s.io/component-base/metrics/prometheusextension k8s.io/component-base/version -# k8s.io/cri-api v0.30.4 +# k8s.io/cri-api v0.31.0 ## explicit; go 1.22.0 k8s.io/cri-api/pkg/apis/runtime/v1 -# k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 -## explicit; go 1.13 -k8s.io/gengo/args -k8s.io/gengo/examples/deepcopy-gen/generators -k8s.io/gengo/examples/defaulter-gen/generators -k8s.io/gengo/examples/import-boss/generators -k8s.io/gengo/examples/set-gen/generators -k8s.io/gengo/examples/set-gen/sets -k8s.io/gengo/generator -k8s.io/gengo/namer -k8s.io/gengo/parser -k8s.io/gengo/types # k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 ## explicit; go 1.20 k8s.io/gengo/v2 @@ -1644,37 +1342,32 @@ k8s.io/klog/v2/internal/verbosity k8s.io/klog/v2/textlogger # k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f ## explicit; go 1.20 -k8s.io/kube-openapi/cmd/openapi-gen/args k8s.io/kube-openapi/pkg/cached k8s.io/kube-openapi/pkg/common -k8s.io/kube-openapi/pkg/generators -k8s.io/kube-openapi/pkg/generators/rules k8s.io/kube-openapi/pkg/handler3 k8s.io/kube-openapi/pkg/internal k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json k8s.io/kube-openapi/pkg/schemaconv k8s.io/kube-openapi/pkg/spec3 k8s.io/kube-openapi/pkg/util/proto -k8s.io/kube-openapi/pkg/util/sets k8s.io/kube-openapi/pkg/validation/errors k8s.io/kube-openapi/pkg/validation/spec k8s.io/kube-openapi/pkg/validation/strfmt k8s.io/kube-openapi/pkg/validation/strfmt/bson k8s.io/kube-openapi/pkg/validation/validate -# k8s.io/utils v0.0.0-20240102154912-e7106e64919e +# k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 ## explicit; go 1.18 k8s.io/utils/buffer k8s.io/utils/clock k8s.io/utils/clock/testing -k8s.io/utils/integer k8s.io/utils/internal/third_party/forked/golang/net k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/ptr k8s.io/utils/strings/slices k8s.io/utils/trace -# sigs.k8s.io/controller-runtime v0.16.6 -## explicit; go 1.20 +# sigs.k8s.io/controller-runtime v0.18.4 +## explicit; go 1.22.0 sigs.k8s.io/controller-runtime sigs.k8s.io/controller-runtime/pkg/builder sigs.k8s.io/controller-runtime/pkg/cache @@ -1688,7 +1381,6 @@ sigs.k8s.io/controller-runtime/pkg/client/fake sigs.k8s.io/controller-runtime/pkg/client/interceptor sigs.k8s.io/controller-runtime/pkg/cluster sigs.k8s.io/controller-runtime/pkg/config -sigs.k8s.io/controller-runtime/pkg/config/v1alpha1 sigs.k8s.io/controller-runtime/pkg/controller sigs.k8s.io/controller-runtime/pkg/controller/controllerutil sigs.k8s.io/controller-runtime/pkg/conversion @@ -1705,6 +1397,7 @@ sigs.k8s.io/controller-runtime/pkg/internal/log sigs.k8s.io/controller-runtime/pkg/internal/objectutil sigs.k8s.io/controller-runtime/pkg/internal/recorder sigs.k8s.io/controller-runtime/pkg/internal/source +sigs.k8s.io/controller-runtime/pkg/internal/syncs sigs.k8s.io/controller-runtime/pkg/internal/testing/addr sigs.k8s.io/controller-runtime/pkg/internal/testing/certs sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane @@ -1725,7 +1418,7 @@ sigs.k8s.io/controller-runtime/pkg/webhook sigs.k8s.io/controller-runtime/pkg/webhook/admission sigs.k8s.io/controller-runtime/pkg/webhook/conversion sigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics -# sigs.k8s.io/controller-tools v0.14.0 => github.com/cilium/controller-tools v0.8.0-1 +# sigs.k8s.io/controller-tools v0.15.0 => github.com/cilium/controller-tools v0.8.0-2 ## explicit; go 1.17 sigs.k8s.io/controller-tools/cmd/controller-gen sigs.k8s.io/controller-tools/pkg/crd @@ -1777,4 +1470,4 @@ sigs.k8s.io/yaml/goyaml.v2 # github.com/cilium/tetragon/api => ./api # github.com/cilium/tetragon/pkg/k8s => ./pkg/k8s # go.universe.tf/metallb => github.com/cilium/metallb v0.1.1-0.20220829170633-5d7dfb1129f7 -# sigs.k8s.io/controller-tools => github.com/cilium/controller-tools v0.8.0-1 +# sigs.k8s.io/controller-tools => github.com/cilium/controller-tools v0.8.0-2 diff --git a/vendor/sigs.k8s.io/controller-runtime/.golangci.yml b/vendor/sigs.k8s.io/controller-runtime/.golangci.yml index deb6a783da8..4c43665e2bf 100644 --- a/vendor/sigs.k8s.io/controller-runtime/.golangci.yml +++ b/vendor/sigs.k8s.io/controller-runtime/.golangci.yml @@ -41,6 +41,11 @@ linters: - whitespace linters-settings: + govet: + enable-all: true + disable: + - fieldalignment + - shadow importas: no-unaliased: true alias: @@ -58,10 +63,6 @@ linters-settings: # Controller Runtime - pkg: sigs.k8s.io/controller-runtime alias: ctrl - staticcheck: - go: "1.20" - stylecheck: - go: "1.20" revive: rules: # The following rules are recommended https://github.com/mgechev/revive#recommended-configuration @@ -105,6 +106,9 @@ issues: - Subprocess launch(ed with variable|ing should be audited) - (G204|G104|G307) - "ST1000: at least one file in a package should have a package comment" + exclude-files: + - "zz_generated.*\\.go$" + - ".*conversion.*\\.go$" exclude-rules: - linters: - gosec @@ -163,8 +167,6 @@ issues: path: _test\.go run: + go: "1.22" timeout: 10m - skip-files: - - "zz_generated.*\\.go$" - - ".*conversion.*\\.go$" allow-parallel-runners: true diff --git a/vendor/sigs.k8s.io/controller-runtime/FAQ.md b/vendor/sigs.k8s.io/controller-runtime/FAQ.md index c21b29e287a..9c36c8112e7 100644 --- a/vendor/sigs.k8s.io/controller-runtime/FAQ.md +++ b/vendor/sigs.k8s.io/controller-runtime/FAQ.md @@ -4,13 +4,13 @@ **A**: Each controller should only reconcile one object type. Other affected objects should be mapped to a single type of root object, using -the `EnqueueRequestForOwner` or `EnqueueRequestsFromMapFunc` event +the `handler.EnqueueRequestForOwner` or `handler.EnqueueRequestsFromMapFunc` event handlers, and potentially indices. Then, your Reconcile method should attempt to reconcile *all* state for that given root objects. ### Q: How do I have different logic in my reconciler for different types of events (e.g. create, update, delete)? -**A**: You should not. Reconcile functions should be idempotent, and +**A**: You should not. Reconcile functions should be idempotent, and should always reconcile state by reading all the state it needs, then writing updates. This allows your reconciler to correctly respond to generic events, adjust to skipped or coalesced events, and easily deal diff --git a/vendor/sigs.k8s.io/controller-runtime/Makefile b/vendor/sigs.k8s.io/controller-runtime/Makefile index 007889c5a5a..438613b3ebe 100644 --- a/vendor/sigs.k8s.io/controller-runtime/Makefile +++ b/vendor/sigs.k8s.io/controller-runtime/Makefile @@ -36,12 +36,13 @@ export GO111MODULE=on # Tools. TOOLS_DIR := hack/tools -TOOLS_BIN_DIR := $(TOOLS_DIR)/bin +TOOLS_BIN_DIR := $(abspath $(TOOLS_DIR)/bin) GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/golangci-lint) GO_APIDIFF := $(TOOLS_BIN_DIR)/go-apidiff CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen ENVTEST_DIR := $(abspath tools/setup-envtest) SCRATCH_ENV_DIR := $(abspath examples/scratch-env) +GO_INSTALL := ./hack/go-install.sh # The help will print out all targets with their descriptions organized bellow their categories. The categories are represented by `##@` and the target descriptions by `##`. # The awk commands is responsible to read the entire set of makefiles included in this invocation, looking for lines of the file as xyz: ## something, and then pretty-format the target and help. Then, if there's a line with ##@ something, that gets pretty-printed as a category. @@ -67,16 +68,29 @@ test-tools: ## tests the tools codebase (setup-envtest) ## Binaries ## -------------------------------------- -$(GO_APIDIFF): $(TOOLS_DIR)/go.mod # Build go-apidiff from tools folder. - cd $(TOOLS_DIR) && go build -tags=tools -o bin/go-apidiff github.com/joelanford/go-apidiff +GO_APIDIFF_VER := v0.8.2 +GO_APIDIFF_BIN := go-apidiff +GO_APIDIFF := $(abspath $(TOOLS_BIN_DIR)/$(GO_APIDIFF_BIN)-$(GO_APIDIFF_VER)) +GO_APIDIFF_PKG := github.com/joelanford/go-apidiff -$(CONTROLLER_GEN): $(TOOLS_DIR)/go.mod # Build controller-gen from tools folder. - cd $(TOOLS_DIR) && go build -tags=tools -o bin/controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen +$(GO_APIDIFF): # Build go-apidiff from tools folder. + GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(GO_APIDIFF_PKG) $(GO_APIDIFF_BIN) $(GO_APIDIFF_VER) -$(GOLANGCI_LINT): .github/workflows/golangci-lint.yml # Download golanci-lint using hack script into tools folder. - hack/ensure-golangci-lint.sh \ - -b $(TOOLS_BIN_DIR) \ - $(shell cat .github/workflows/golangci-lint.yml | grep "version: v" | sed 's/.*version: //') +CONTROLLER_GEN_VER := v0.14.0 +CONTROLLER_GEN_BIN := controller-gen +CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)) +CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen + +$(CONTROLLER_GEN): # Build controller-gen from tools folder. + GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(CONTROLLER_GEN_PKG) $(CONTROLLER_GEN_BIN) $(CONTROLLER_GEN_VER) + +GOLANGCI_LINT_BIN := golangci-lint +GOLANGCI_LINT_VER := $(shell cat .github/workflows/golangci-lint.yml | grep [[:space:]]version: | sed 's/.*version: //') +GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)) +GOLANGCI_LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint + +$(GOLANGCI_LINT): # Build golangci-lint from tools folder. + GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(GOLANGCI_LINT_PKG) $(GOLANGCI_LINT_BIN) $(GOLANGCI_LINT_VER) ## -------------------------------------- ## Linting @@ -102,10 +116,6 @@ modules: ## Runs go mod to ensure modules are up to date. cd $(ENVTEST_DIR); go mod tidy cd $(SCRATCH_ENV_DIR); go mod tidy -.PHONY: generate -generate: $(CONTROLLER_GEN) ## Runs controller-gen for internal types for config file - $(CONTROLLER_GEN) object paths="./pkg/config/v1alpha1/...;./examples/configfile/custom/v1alpha1/..." - ## -------------------------------------- ## Cleanup / Verification ## -------------------------------------- @@ -126,9 +136,10 @@ verify-modules: modules ## Verify go modules are up to date echo "go module files are out of date, please run 'make modules'"; exit 1; \ fi -.PHONY: verify-generate -verify-generate: generate ## Verify generated files are up to date - @if !(git diff --quiet HEAD); then \ - git diff; \ - echo "generated files are out of date, run make generate"; exit 1; \ - fi +APIDIFF_OLD_COMMIT ?= $(shell git rev-parse origin/main) + +.PHONY: apidiff +verify-apidiff: $(GO_APIDIFF) ## Check for API differences + $(GO_APIDIFF) $(APIDIFF_OLD_COMMIT) --print-compatible + + diff --git a/vendor/sigs.k8s.io/controller-runtime/OWNERS b/vendor/sigs.k8s.io/controller-runtime/OWNERS index 4b1fa044bf7..9f2d296e4c7 100644 --- a/vendor/sigs.k8s.io/controller-runtime/OWNERS +++ b/vendor/sigs.k8s.io/controller-runtime/OWNERS @@ -6,5 +6,6 @@ approvers: - controller-runtime-approvers reviewers: - controller-runtime-admins - - controller-runtime-reviewers + - controller-runtime-maintainers - controller-runtime-approvers + - controller-runtime-reviewers diff --git a/vendor/sigs.k8s.io/controller-runtime/OWNERS_ALIASES b/vendor/sigs.k8s.io/controller-runtime/OWNERS_ALIASES index 7848941d534..e465c3d5b02 100644 --- a/vendor/sigs.k8s.io/controller-runtime/OWNERS_ALIASES +++ b/vendor/sigs.k8s.io/controller-runtime/OWNERS_ALIASES @@ -25,12 +25,6 @@ aliases: - varshaprasad96 - inteon - # folks to can approve things in the directly-ported - # testing_frameworks portions of the codebase - testing-integration-approvers: - - apelisse - - hoegaarden - # folks who may have context on ancient history, # but are no longer directly involved controller-runtime-emeritus-maintainers: diff --git a/vendor/sigs.k8s.io/controller-runtime/RELEASE.md b/vendor/sigs.k8s.io/controller-runtime/RELEASE.md index f234494fe1c..2a857b976e3 100644 --- a/vendor/sigs.k8s.io/controller-runtime/RELEASE.md +++ b/vendor/sigs.k8s.io/controller-runtime/RELEASE.md @@ -4,9 +4,9 @@ The Kubernetes controller-runtime Project is released on an as-needed basis. The **Note:** Releases are done from the `release-MAJOR.MINOR` branches. For PATCH releases is not required to create a new branch you will just need to ensure that all big fixes are cherry-picked into the respective -`release-MAJOR.MINOR` branch. To know more about versioning check https://semver.org/. +`release-MAJOR.MINOR` branch. To know more about versioning check https://semver.org/. -## How to do a release +## How to do a release ### Create the new branch and the release tag @@ -15,7 +15,7 @@ to create a new branch you will just need to ensure that all big fixes are cherr ### Now, let's generate the changelog -1. Create the changelog from the new branch `release-` (`git checkout release-`). +1. Create the changelog from the new branch `release-` (`git checkout release-`). You will need to use the [kubebuilder-release-tools][kubebuilder-release-tools] to generate the notes. See [here][release-notes-generation] > **Note** @@ -24,12 +24,12 @@ You will need to use the [kubebuilder-release-tools][kubebuilder-release-tools] ### Draft a new release from GitHub -1. Create a new tag with the correct version from the new `release-` branch +1. Create a new tag with the correct version from the new `release-` branch 2. Add the changelog on it and publish. Now, the code source is released ! ### Add a new Prow test the for the new branch release -1. Create a new prow test under [github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/controller-runtime](https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/controller-runtime) +1. Create a new prow test under [github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/controller-runtime](https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/controller-runtime) for the new `release-` branch. (i.e. for the `0.11.0` release see the PR: https://github.com/kubernetes/test-infra/pull/25205) 2. Ping the infra PR in the controller-runtime slack channel for reviews. @@ -45,3 +45,7 @@ For more info, see the release page: https://github.com/kubernetes-sigs/controll ```` 2. An announcement email is sent to `kubebuilder@googlegroups.com` with the subject `[ANNOUNCE] Controller-Runtime $VERSION is released` + +[kubebuilder-release-tools]: https://github.com/kubernetes-sigs/kubebuilder-release-tools +[release-notes-generation]: https://github.com/kubernetes-sigs/kubebuilder-release-tools/blob/master/README.md#release-notes-generation +[release-process]: https://github.com/kubernetes-sigs/kubebuilder/blob/master/VERSIONING.md#releasing diff --git a/vendor/sigs.k8s.io/controller-runtime/alias.go b/vendor/sigs.k8s.io/controller-runtime/alias.go index 1f8092f4aea..e4f61b1538e 100644 --- a/vendor/sigs.k8s.io/controller-runtime/alias.go +++ b/vendor/sigs.k8s.io/controller-runtime/alias.go @@ -21,7 +21,6 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/client/config" - cfg "sigs.k8s.io/controller-runtime/pkg/config" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -96,13 +95,6 @@ var ( // * $HOME/.kube/config if exists. GetConfig = config.GetConfig - // ConfigFile returns the cfg.File function for deferred config file loading, - // this is passed into Options{}.From() to populate the Options fields for - // the manager. - // - // Deprecated: This is deprecated in favor of using Options directly. - ConfigFile = cfg.File - // NewControllerManagedBy returns a new controller builder that will be started by the provided Manager. NewControllerManagedBy = builder.ControllerManagedBy diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/builder/controller.go b/vendor/sigs.k8s.io/controller-runtime/pkg/builder/controller.go index 1a115f2f7b3..2c0063a8378 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/builder/controller.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/builder/controller.go @@ -30,7 +30,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/apiutil" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" - internalsource "sigs.k8s.io/controller-runtime/pkg/internal/source" "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/reconcile" @@ -56,6 +55,7 @@ const ( type Builder struct { forInput ForInput ownsInput []OwnsInput + rawSources []source.Source watchesInput []WatchesInput mgr manager.Manager globalPredicates []predicate.Predicate @@ -123,8 +123,8 @@ func (blder *Builder) Owns(object client.Object, opts ...OwnsOption) *Builder { // WatchesInput represents the information set by Watches method. type WatchesInput struct { - src source.Source - eventHandler handler.EventHandler + obj client.Object + handler handler.EventHandler predicates []predicate.Predicate objectProjection objectProjection } @@ -133,10 +133,19 @@ type WatchesInput struct { // update events by *reconciling the object* with the given EventHandler. // // This is the equivalent of calling -// WatchesRawSource(source.Kind(cache, object), eventHandler, opts...). +// WatchesRawSource(source.Kind(cache, object, eventHandler, predicates...)). func (blder *Builder) Watches(object client.Object, eventHandler handler.EventHandler, opts ...WatchesOption) *Builder { - src := source.Kind(blder.mgr.GetCache(), object) - return blder.WatchesRawSource(src, eventHandler, opts...) + input := WatchesInput{ + obj: object, + handler: eventHandler, + } + for _, opt := range opts { + opt.ApplyToWatches(&input) + } + + blder.watchesInput = append(blder.watchesInput, input) + + return blder } // WatchesMetadata is the same as Watches, but forces the internal cache to only watch PartialObjectMetadata. @@ -176,13 +185,11 @@ func (blder *Builder) WatchesMetadata(object client.Object, eventHandler handler // // STOP! Consider using For(...), Owns(...), Watches(...), WatchesMetadata(...) instead. // This method is only exposed for more advanced use cases, most users should use one of the higher level functions. -func (blder *Builder) WatchesRawSource(src source.Source, eventHandler handler.EventHandler, opts ...WatchesOption) *Builder { - input := WatchesInput{src: src, eventHandler: eventHandler} - for _, opt := range opts { - opt.ApplyToWatches(&input) - } +// +// WatchesRawSource does not respect predicates configured through WithEventFilter. +func (blder *Builder) WatchesRawSource(src source.Source) *Builder { + blder.rawSources = append(blder.rawSources, src) - blder.watchesInput = append(blder.watchesInput, input) return blder } @@ -272,11 +279,11 @@ func (blder *Builder) doWatch() error { if err != nil { return err } - src := source.Kind(blder.mgr.GetCache(), obj) hdler := &handler.EnqueueRequestForObject{} allPredicates := append([]predicate.Predicate(nil), blder.globalPredicates...) allPredicates = append(allPredicates, blder.forInput.predicates...) - if err := blder.ctrl.Watch(src, hdler, allPredicates...); err != nil { + src := source.Kind(blder.mgr.GetCache(), obj, hdler, allPredicates...) + if err := blder.ctrl.Watch(src); err != nil { return err } } @@ -290,7 +297,6 @@ func (blder *Builder) doWatch() error { if err != nil { return err } - src := source.Kind(blder.mgr.GetCache(), obj) opts := []handler.OwnerOption{} if !own.matchEveryOwner { opts = append(opts, handler.OnlyControllerOwner()) @@ -302,27 +308,29 @@ func (blder *Builder) doWatch() error { ) allPredicates := append([]predicate.Predicate(nil), blder.globalPredicates...) allPredicates = append(allPredicates, own.predicates...) - if err := blder.ctrl.Watch(src, hdler, allPredicates...); err != nil { + src := source.Kind(blder.mgr.GetCache(), obj, hdler, allPredicates...) + if err := blder.ctrl.Watch(src); err != nil { return err } } // Do the watch requests - if len(blder.watchesInput) == 0 && blder.forInput.object == nil { - return errors.New("there are no watches configured, controller will never get triggered. Use For(), Owns() or Watches() to set them up") + if len(blder.watchesInput) == 0 && blder.forInput.object == nil && len(blder.rawSources) == 0 { + return errors.New("there are no watches configured, controller will never get triggered. Use For(), Owns(), Watches() or WatchesRawSource() to set them up") } for _, w := range blder.watchesInput { - // If the source of this watch is of type Kind, project it. - if srcKind, ok := w.src.(*internalsource.Kind); ok { - typeForSrc, err := blder.project(srcKind.Type, w.objectProjection) - if err != nil { - return err - } - srcKind.Type = typeForSrc + projected, err := blder.project(w.obj, w.objectProjection) + if err != nil { + return fmt.Errorf("failed to project for %T: %w", w.obj, err) } allPredicates := append([]predicate.Predicate(nil), blder.globalPredicates...) allPredicates = append(allPredicates, w.predicates...) - if err := blder.ctrl.Watch(w.src, w.eventHandler, allPredicates...); err != nil { + if err := blder.ctrl.Watch(source.Kind(blder.mgr.GetCache(), projected, w.handler, allPredicates...)); err != nil { + return err + } + } + for _, src := range blder.rawSources { + if err := blder.ctrl.Watch(src); err != nil { return err } } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/builder/webhook.go b/vendor/sigs.k8s.io/controller-runtime/pkg/builder/webhook.go index 1a3712eff2a..6170180c740 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/builder/webhook.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/builder/webhook.go @@ -44,6 +44,7 @@ type WebhookBuilder struct { config *rest.Config recoverPanic bool logConstructor func(base logr.Logger, req *admission.Request) logr.Logger + err error } // WebhookManagedBy returns a new webhook builder. @@ -57,6 +58,9 @@ func WebhookManagedBy(m manager.Manager) *WebhookBuilder { // If the given object implements the admission.Defaulter interface, a MutatingWebhook will be wired for this type. // If the given object implements the admission.Validator interface, a ValidatingWebhook will be wired for this type. func (blder *WebhookBuilder) For(apiType runtime.Object) *WebhookBuilder { + if blder.apiType != nil { + blder.err = errors.New("For(...) should only be called once, could not assign multiple objects for webhook registration") + } blder.apiType = apiType return blder } @@ -142,7 +146,7 @@ func (blder *WebhookBuilder) registerWebhooks() error { if err != nil { return err } - return nil + return blder.err } // registerDefaultingWebhook registers a defaulting webhook if necessary. diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go index 5410e1cdd47..612dcca8b37 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/cache.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "net/http" + "sort" "time" "golang.org/x/exp/maps" @@ -33,16 +34,14 @@ import ( "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" toolscache "k8s.io/client-go/tools/cache" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/cache/internal" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" - logf "sigs.k8s.io/controller-runtime/pkg/internal/log" ) var ( - log = logf.RuntimeLog.WithName("object-cache") defaultSyncPeriod = 10 * time.Hour ) @@ -83,6 +82,9 @@ type Informers interface { // of the underlying object. GetInformerForKind(ctx context.Context, gvk schema.GroupVersionKind, opts ...InformerGetOption) (Informer, error) + // RemoveInformer removes an informer entry and stops it if it was running. + RemoveInformer(ctx context.Context, obj client.Object) error + // Start runs all the informers known to this cache until the context is closed. // It blocks. Start(ctx context.Context) error @@ -121,6 +123,8 @@ type Informer interface { // HasSynced return true if the informers underlying store has synced. HasSynced() bool + // IsStopped returns true if the informer has been stopped. + IsStopped() bool } // AllNamespaces should be used as the map key to deliminate namespace settings @@ -197,8 +201,17 @@ type Options struct { // DefaultTransform will be used as transform for all object types // unless there is already one set in ByObject or DefaultNamespaces. + // + // A typical usecase for this is to use TransformStripManagedFields + // to reduce the caches memory usage. DefaultTransform toolscache.TransformFunc + // DefaultWatchErrorHandler will be used to the WatchErrorHandler which is called + // whenever ListAndWatch drops the connection with an error. + // + // After calling this handler, the informer will backoff and retry. + DefaultWatchErrorHandler toolscache.WatchErrorHandler + // DefaultUnsafeDisableDeepCopy is the default for UnsafeDisableDeepCopy // for everything that doesn't specify this. // @@ -210,7 +223,7 @@ type Options struct { DefaultUnsafeDisableDeepCopy *bool // ByObject restricts the cache's ListWatch to the desired fields per GVK at the specified object. - // object, this will fall through to Default* settings. + // If unset, this will fall through to the Default* settings. ByObject map[client.Object]ByObject // newInformer allows overriding of NewSharedIndexInformer for testing. @@ -334,6 +347,20 @@ func New(cfg *rest.Config, opts Options) (Cache, error) { return delegating, nil } +// TransformStripManagedFields strips the managed fields of an object before it is committed to the cache. +// If you are not explicitly accessing managedFields from your code, setting this as `DefaultTransform` +// on the cache can lead to a significant reduction in memory usage. +func TransformStripManagedFields() toolscache.TransformFunc { + return func(in any) (any, error) { + // Nilcheck managed fields to avoid hitting https://github.com/kubernetes/kubernetes/issues/124337 + if obj, err := meta.Accessor(in); err == nil && obj.GetManagedFields() != nil { + obj.SetManagedFields(nil) + } + + return in, nil + } +} + func optionDefaultsToConfig(opts *Options) Config { return Config{ LabelSelector: opts.DefaultLabelSelector, @@ -369,7 +396,8 @@ func newCache(restConfig *rest.Config, opts Options) newCacheFunc { Field: config.FieldSelector, }, Transform: config.Transform, - UnsafeDisableDeepCopy: pointer.BoolDeref(config.UnsafeDisableDeepCopy, false), + WatchErrorHandler: opts.DefaultWatchErrorHandler, + UnsafeDisableDeepCopy: ptr.Deref(config.UnsafeDisableDeepCopy, false), NewInformer: opts.newInformer, }), readerFailOnMissingInformer: opts.ReaderFailOnMissingInformer, @@ -400,20 +428,12 @@ func defaultOpts(config *rest.Config, opts Options) (Options, error) { // Construct a new Mapper if unset if opts.Mapper == nil { var err error - opts.Mapper, err = apiutil.NewDiscoveryRESTMapper(config, opts.HTTPClient) + opts.Mapper, err = apiutil.NewDynamicRESTMapper(config, opts.HTTPClient) if err != nil { return Options{}, fmt.Errorf("could not create RESTMapper from config: %w", err) } } - for namespace, cfg := range opts.DefaultNamespaces { - cfg = defaultConfig(cfg, optionDefaultsToConfig(&opts)) - if namespace == metav1.NamespaceAll { - cfg.FieldSelector = fields.AndSelectors(appendIfNotNil(namespaceAllSelector(maps.Keys(opts.DefaultNamespaces)), cfg.FieldSelector)...) - } - opts.DefaultNamespaces[namespace] = cfg - } - for obj, byObject := range opts.ByObject { isNamespaced, err := apiutil.IsObjectNamespaced(obj, opts.Scheme, opts.Mapper) if err != nil { @@ -423,7 +443,12 @@ func defaultOpts(config *rest.Config, opts Options) (Options, error) { return opts, fmt.Errorf("type %T is not namespaced, but its ByObject.Namespaces setting is not nil", obj) } - // Default the namespace-level configs first, because they need to use the undefaulted type-level config. + if isNamespaced && byObject.Namespaces == nil { + byObject.Namespaces = maps.Clone(opts.DefaultNamespaces) + } + + // Default the namespace-level configs first, because they need to use the undefaulted type-level config + // to be able to potentially fall through to settings from DefaultNamespaces. for namespace, config := range byObject.Namespaces { // 1. Default from the undefaulted type-level config config = defaultConfig(config, byObjectToConfig(byObject)) @@ -449,19 +474,35 @@ func defaultOpts(config *rest.Config, opts Options) (Options, error) { byObject.Namespaces[namespace] = config } - defaultedConfig := defaultConfig(byObjectToConfig(byObject), optionDefaultsToConfig(&opts)) - byObject.Label = defaultedConfig.LabelSelector - byObject.Field = defaultedConfig.FieldSelector - byObject.Transform = defaultedConfig.Transform - byObject.UnsafeDisableDeepCopy = defaultedConfig.UnsafeDisableDeepCopy - - if isNamespaced && byObject.Namespaces == nil { - byObject.Namespaces = opts.DefaultNamespaces + // Only default ByObject iself if it isn't namespaced or has no namespaces configured, as only + // then any of this will be honored. + if !isNamespaced || len(byObject.Namespaces) == 0 { + defaultedConfig := defaultConfig(byObjectToConfig(byObject), optionDefaultsToConfig(&opts)) + byObject.Label = defaultedConfig.LabelSelector + byObject.Field = defaultedConfig.FieldSelector + byObject.Transform = defaultedConfig.Transform + byObject.UnsafeDisableDeepCopy = defaultedConfig.UnsafeDisableDeepCopy } opts.ByObject[obj] = byObject } + // Default namespaces after byObject has been defaulted, otherwise a namespace without selectors + // will get the `Default` selectors, then get copied to byObject and then not get defaulted from + // byObject, as it already has selectors. + for namespace, cfg := range opts.DefaultNamespaces { + cfg = defaultConfig(cfg, optionDefaultsToConfig(&opts)) + if namespace == metav1.NamespaceAll { + cfg.FieldSelector = fields.AndSelectors( + appendIfNotNil( + namespaceAllSelector(maps.Keys(opts.DefaultNamespaces)), + cfg.FieldSelector, + )..., + ) + } + opts.DefaultNamespaces[namespace] = cfg + } + // Default the resync period to 10 hours if unset if opts.SyncPeriod == nil { opts.SyncPeriod = &defaultSyncPeriod @@ -486,20 +527,21 @@ func defaultConfig(toDefault, defaultFrom Config) Config { return toDefault } -func namespaceAllSelector(namespaces []string) fields.Selector { +func namespaceAllSelector(namespaces []string) []fields.Selector { selectors := make([]fields.Selector, 0, len(namespaces)-1) + sort.Strings(namespaces) for _, namespace := range namespaces { if namespace != metav1.NamespaceAll { selectors = append(selectors, fields.OneTermNotEqualSelector("metadata.namespace", namespace)) } } - return fields.AndSelectors(selectors...) + return selectors } -func appendIfNotNil[T comparable](a, b T) []T { +func appendIfNotNil[T comparable](a []T, b T) []T { if b != *new(T) { - return []T{a, b} + return append(a, b) } - return []T{a} + return a } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/delegating_by_gvk_cache.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/delegating_by_gvk_cache.go index f3fa4800d26..4db8208a63f 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/delegating_by_gvk_cache.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/delegating_by_gvk_cache.go @@ -52,6 +52,14 @@ func (dbt *delegatingByGVKCache) List(ctx context.Context, list client.ObjectLis return cache.List(ctx, list, opts...) } +func (dbt *delegatingByGVKCache) RemoveInformer(ctx context.Context, obj client.Object) error { + cache, err := dbt.cacheForObject(obj) + if err != nil { + return err + } + return cache.RemoveInformer(ctx, obj) +} + func (dbt *delegatingByGVKCache) GetInformer(ctx context.Context, obj client.Object, opts ...InformerGetOption) (Informer, error) { cache, err := dbt.cacheForObject(obj) if err != nil { diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/informer_cache.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/informer_cache.go index 0f1b4e93d23..091667b7faa 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/informer_cache.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/informer_cache.go @@ -190,6 +190,17 @@ func (ic *informerCache) getInformerForKind(ctx context.Context, gvk schema.Grou return ic.Informers.Get(ctx, gvk, obj, &internal.GetOptions{}) } +// RemoveInformer deactivates and removes the informer from the cache. +func (ic *informerCache) RemoveInformer(_ context.Context, obj client.Object) error { + gvk, err := apiutil.GVKForObject(obj, ic.scheme) + if err != nil { + return err + } + + ic.Informers.Remove(gvk, obj) + return nil +} + // NeedLeaderElection implements the LeaderElectionRunnable interface // to indicate that this can be started without requiring the leader lock. func (ic *informerCache) NeedLeaderElection() bool { diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/cache_reader.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/cache_reader.go index eb941f034ed..81ee960b738 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/cache_reader.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/cache_reader.go @@ -23,6 +23,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" apimeta "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -35,7 +36,7 @@ import ( // CacheReader is a client.Reader. var _ client.Reader = &CacheReader{} -// CacheReader wraps a cache.Index to implement the client.CacheReader interface for a single type. +// CacheReader wraps a cache.Index to implement the client.Reader interface for a single type. type CacheReader struct { // indexer is the underlying indexer wrapped by this cache. indexer cache.Indexer @@ -117,16 +118,14 @@ func (c *CacheReader) List(_ context.Context, out client.ObjectList, opts ...cli switch { case listOpts.FieldSelector != nil: - // TODO(directxman12): support more complicated field selectors by - // combining multiple indices, GetIndexers, etc - field, val, requiresExact := selector.RequiresExactMatch(listOpts.FieldSelector) + requiresExact := selector.RequiresExactMatch(listOpts.FieldSelector) if !requiresExact { return fmt.Errorf("non-exact field matches are not supported by the cache") } // list all objects by the field selector. If this is namespaced and we have one, ask for the // namespaced index key. Otherwise, ask for the non-namespaced variant by using the fake "all namespaces" // namespace. - objs, err = c.indexer.ByIndex(FieldIndexName(field), KeyToNamespacedKey(listOpts.Namespace, val)) + objs, err = byIndexes(c.indexer, listOpts.FieldSelector.Requirements(), listOpts.Namespace) case listOpts.Namespace != "": objs, err = c.indexer.ByIndex(cache.NamespaceIndex, listOpts.Namespace) default: @@ -178,6 +177,54 @@ func (c *CacheReader) List(_ context.Context, out client.ObjectList, opts ...cli return apimeta.SetList(out, runtimeObjs) } +func byIndexes(indexer cache.Indexer, requires fields.Requirements, namespace string) ([]interface{}, error) { + var ( + err error + objs []interface{} + vals []string + ) + indexers := indexer.GetIndexers() + for idx, req := range requires { + indexName := FieldIndexName(req.Field) + indexedValue := KeyToNamespacedKey(namespace, req.Value) + if idx == 0 { + // we use first require to get snapshot data + // TODO(halfcrazy): use complicated index when client-go provides byIndexes + // https://github.com/kubernetes/kubernetes/issues/109329 + objs, err = indexer.ByIndex(indexName, indexedValue) + if err != nil { + return nil, err + } + if len(objs) == 0 { + return nil, nil + } + continue + } + fn, exist := indexers[indexName] + if !exist { + return nil, fmt.Errorf("index with name %s does not exist", indexName) + } + filteredObjects := make([]interface{}, 0, len(objs)) + for _, obj := range objs { + vals, err = fn(obj) + if err != nil { + return nil, err + } + for _, val := range vals { + if val == indexedValue { + filteredObjects = append(filteredObjects, obj) + break + } + } + } + if len(filteredObjects) == 0 { + return nil, nil + } + objs = filteredObjects + } + return objs, nil +} + // objectKeyToStorageKey converts an object key to store key. // It's akin to MetaNamespaceKeyFunc. It's separate from // String to allow keeping the key format easily in sync with diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/informers.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/informers.go index 1d2c9ce2b43..cd8c6774cac 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/informers.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/internal/informers.go @@ -18,6 +18,7 @@ package internal import ( "context" + "errors" "fmt" "math/rand" "net/http" @@ -36,6 +37,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" + "sigs.k8s.io/controller-runtime/pkg/internal/syncs" ) // InformersOpts configures an InformerMap. @@ -49,6 +51,7 @@ type InformersOpts struct { Selector Selector Transform cache.TransformFunc UnsafeDisableDeepCopy bool + WatchErrorHandler cache.WatchErrorHandler } // NewInformers creates a new InformersMap that can create informers under the hood. @@ -76,6 +79,7 @@ func NewInformers(config *rest.Config, options *InformersOpts) *Informers { transform: options.Transform, unsafeDisableDeepCopy: options.UnsafeDisableDeepCopy, newInformer: newInformer, + watchErrorHandler: options.WatchErrorHandler, } } @@ -86,6 +90,20 @@ type Cache struct { // CacheReader wraps Informer and implements the CacheReader interface for a single type Reader CacheReader + + // Stop can be used to stop this individual informer. + stop chan struct{} +} + +// Start starts the informer managed by a MapEntry. +// Blocks until the informer stops. The informer can be stopped +// either individually (via the entry's stop channel) or globally +// via the provided stop argument. +func (c *Cache) Start(stop <-chan struct{}) { + // Stop on either the whole map stopping or just this informer being removed. + internalStop, cancel := syncs.MergeChans(stop, c.stop) + defer cancel() + c.Informer.Run(internalStop) } type tracker struct { @@ -159,33 +177,46 @@ type Informers struct { // NewInformer allows overriding of the shared index informer constructor for testing. newInformer func(cache.ListerWatcher, runtime.Object, time.Duration, cache.Indexers) cache.SharedIndexInformer + + // WatchErrorHandler allows the shared index informer's + // watchErrorHandler to be set by overriding the options + // or to use the default watchErrorHandler + watchErrorHandler cache.WatchErrorHandler } // Start calls Run on each of the informers and sets started to true. Blocks on the context. // It doesn't return start because it can't return an error, and it's not a runnable directly. func (ip *Informers) Start(ctx context.Context) error { - func() { + if err := func() error { ip.mu.Lock() defer ip.mu.Unlock() + if ip.started { + return errors.New("Informer already started") //nolint:stylecheck + } + // Set the context so it can be passed to informers that are added later ip.ctx = ctx // Start each informer for _, i := range ip.tracker.Structured { - ip.startInformerLocked(i.Informer) + ip.startInformerLocked(i) } for _, i := range ip.tracker.Unstructured { - ip.startInformerLocked(i.Informer) + ip.startInformerLocked(i) } for _, i := range ip.tracker.Metadata { - ip.startInformerLocked(i.Informer) + ip.startInformerLocked(i) } // Set started to true so we immediately start any informers added later. ip.started = true close(ip.startWait) - }() + + return nil + }(); err != nil { + return err + } <-ctx.Done() // Block until the context is done ip.mu.Lock() ip.stopped = true // Set stopped to true so we don't start any new informers @@ -194,7 +225,7 @@ func (ip *Informers) Start(ctx context.Context) error { return nil } -func (ip *Informers) startInformerLocked(informer cache.SharedIndexInformer) { +func (ip *Informers) startInformerLocked(cacheEntry *Cache) { // Don't start the informer in case we are already waiting for the items in // the waitGroup to finish, since waitGroups don't support waiting and adding // at the same time. @@ -205,7 +236,7 @@ func (ip *Informers) startInformerLocked(informer cache.SharedIndexInformer) { ip.waitGroup.Add(1) go func() { defer ip.waitGroup.Done() - informer.Run(ip.ctx.Done()) + cacheEntry.Start(ip.ctx.Done()) }() } @@ -281,6 +312,21 @@ func (ip *Informers) Get(ctx context.Context, gvk schema.GroupVersionKind, obj r return started, i, nil } +// Remove removes an informer entry and stops it if it was running. +func (ip *Informers) Remove(gvk schema.GroupVersionKind, obj runtime.Object) { + ip.mu.Lock() + defer ip.mu.Unlock() + + informerMap := ip.informersByType(obj) + + entry, ok := informerMap[gvk] + if !ok { + return + } + close(entry.stop) + delete(informerMap, gvk) +} + func (ip *Informers) informersByType(obj runtime.Object) map[schema.GroupVersionKind]*Cache { switch obj.(type) { case runtime.Unstructured: @@ -323,6 +369,13 @@ func (ip *Informers) addInformerToMap(gvk schema.GroupVersionKind, obj runtime.O cache.NamespaceIndex: cache.MetaNamespaceIndexFunc, }) + // Set WatchErrorHandler on SharedIndexInformer if set + if ip.watchErrorHandler != nil { + if err := sharedIndexInformer.SetWatchErrorHandler(ip.watchErrorHandler); err != nil { + return nil, false, err + } + } + // Check to see if there is a transformer for this gvk if err := sharedIndexInformer.SetTransform(ip.transform); err != nil { return nil, false, err @@ -342,13 +395,14 @@ func (ip *Informers) addInformerToMap(gvk schema.GroupVersionKind, obj runtime.O scopeName: mapping.Scope.Name(), disableDeepCopy: ip.unsafeDisableDeepCopy, }, + stop: make(chan struct{}), } ip.informersByType(obj)[gvk] = i // Start the informer in case the InformersMap has started, otherwise it will be // started when the InformersMap starts. if ip.started { - ip.startInformerLocked(i.Informer) + ip.startInformerLocked(i) } return i, ip.started, nil } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/multi_namespace_cache.go b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/multi_namespace_cache.go index 87c31a7c037..da69f40f65e 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/cache/multi_namespace_cache.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/cache/multi_namespace_cache.go @@ -109,6 +109,27 @@ func (c *multiNamespaceCache) GetInformer(ctx context.Context, obj client.Object return &multiNamespaceInformer{namespaceToInformer: namespaceToInformer}, nil } +func (c *multiNamespaceCache) RemoveInformer(ctx context.Context, obj client.Object) error { + // If the object is clusterscoped, get the informer from clusterCache, + // if not use the namespaced caches. + isNamespaced, err := apiutil.IsObjectNamespaced(obj, c.Scheme, c.RESTMapper) + if err != nil { + return err + } + if !isNamespaced { + return c.clusterCache.RemoveInformer(ctx, obj) + } + + for _, cache := range c.namespaceToCache { + err := cache.RemoveInformer(ctx, obj) + if err != nil { + return err + } + } + + return nil +} + func (c *multiNamespaceCache) GetInformerForKind(ctx context.Context, gvk schema.GroupVersionKind, opts ...InformerGetOption) (Informer, error) { // If the object is cluster scoped, get the informer from clusterCache, // if not use the namespaced caches. @@ -142,12 +163,13 @@ func (c *multiNamespaceCache) GetInformerForKind(ctx context.Context, gvk schema } func (c *multiNamespaceCache) Start(ctx context.Context) error { + errs := make(chan error) // start global cache if c.clusterCache != nil { go func() { err := c.clusterCache.Start(ctx) if err != nil { - log.Error(err, "cluster scoped cache failed to start") + errs <- fmt.Errorf("failed to start cluster-scoped cache: %w", err) } }() } @@ -156,13 +178,16 @@ func (c *multiNamespaceCache) Start(ctx context.Context) error { for ns, cache := range c.namespaceToCache { go func(ns string, cache Cache) { if err := cache.Start(ctx); err != nil { - log.Error(err, "multi-namespace cache failed to start namespaced informer", "namespace", ns) + errs <- fmt.Errorf("failed to start cache for namespace %s: %w", ns, err) } }(ns, cache) } - - <-ctx.Done() - return nil + select { + case <-ctx.Done(): + return nil + case err := <-errs: + return err + } } func (c *multiNamespaceCache) WaitForCacheSync(ctx context.Context) bool { @@ -391,3 +416,13 @@ func (i *multiNamespaceInformer) HasSynced() bool { } return true } + +// IsStopped checks if each namespaced informer has stopped, returns false if any are still running. +func (i *multiNamespaceInformer) IsStopped() bool { + for _, informer := range i.namespaceToInformer { + if stopped := informer.IsStopped(); !stopped { + return false + } + } + return true +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/apimachinery.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/apimachinery.go index 6a1bfb546ea..3c0206bea53 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/apimachinery.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/apimachinery.go @@ -31,11 +31,9 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/client-go/discovery" "k8s.io/client-go/dynamic" clientgoscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" - "k8s.io/client-go/restmapper" ) var ( @@ -60,25 +58,6 @@ func AddToProtobufScheme(addToScheme func(*runtime.Scheme) error) error { return addToScheme(protobufScheme) } -// NewDiscoveryRESTMapper constructs a new RESTMapper based on discovery -// information fetched by a new client with the given config. -func NewDiscoveryRESTMapper(c *rest.Config, httpClient *http.Client) (meta.RESTMapper, error) { - if httpClient == nil { - return nil, fmt.Errorf("httpClient must not be nil, consider using rest.HTTPClientFor(c) to create a client") - } - - // Get a mapper - dc, err := discovery.NewDiscoveryClientForConfigAndClient(c, httpClient) - if err != nil { - return nil, err - } - gr, err := restmapper.GetAPIGroupResources(dc) - if err != nil { - return nil, err - } - return restmapper.NewDiscoveryRESTMapper(gr), nil -} - // IsObjectNamespaced returns true if the object is namespace scoped. // For unstructured objects the gvk is found from the object itself. func IsObjectNamespaced(obj runtime.Object, scheme *runtime.Scheme, restmapper meta.RESTMapper) (bool, error) { diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/restmapper.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/restmapper.go index 496b4c78630..927be22b4e7 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/restmapper.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/restmapper.go @@ -167,8 +167,10 @@ func (m *mapper) addKnownGroupAndReload(groupName string, versions ...string) er if err != nil { return err } - for _, version := range apiGroup.Versions { - versions = append(versions, version.Version) + if apiGroup != nil { + for _, version := range apiGroup.Versions { + versions = append(versions, version.Version) + } } } @@ -222,7 +224,12 @@ func (m *mapper) addKnownGroupAndReload(groupName string, versions ...string) er m.knownGroups[groupName] = groupResources // Finally, update the group with received information and regenerate the mapper. - m.refreshMapper() + updatedGroupResources := make([]*restmapper.APIGroupResources, 0, len(m.knownGroups)) + for _, agr := range m.knownGroups { + updatedGroupResources = append(updatedGroupResources, agr) + } + + m.mapper = restmapper.NewDiscoveryRESTMapper(updatedGroupResources) return nil } @@ -255,17 +262,12 @@ func (m *mapper) findAPIGroupByName(groupName string) (*metav1.APIGroup, error) m.mu.Unlock() // Looking in the cache again. - { - m.mu.RLock() - group, ok := m.apiGroups[groupName] - m.mu.RUnlock() - if ok { - return group, nil - } - } + m.mu.RLock() + defer m.mu.RUnlock() - // If there is still nothing, return an error. - return nil, fmt.Errorf("failed to find API group %q", groupName) + // Don't return an error here if the API group is not present. + // The reloaded RESTMapper will take care of returning a NoMatchError. + return m.apiGroups[groupName], nil } // fetchGroupVersionResourcesLocked fetches the resources for the specified group and its versions. @@ -281,24 +283,14 @@ func (m *mapper) fetchGroupVersionResourcesLocked(groupName string, versions ... if apierrors.IsNotFound(err) { // If the version is not found, we remove the group from the cache // so it gets refreshed on the next call. - cacheInvalidated := false if m.isAPIGroupCached(groupVersion) { delete(m.apiGroups, groupName) - cacheInvalidated = true } if m.isGroupVersionCached(groupVersion) { delete(m.knownGroups, groupName) - cacheInvalidated = true - } - // It's important to refresh the mapper after invalidating the cache, since returning an error - // aborts the call and leaves the underlying mapper unchanged. If not refreshed, the next call - // will still return a match for the NotFound version. - if cacheInvalidated { - m.refreshMapper() } - } - - if err != nil { + continue + } else if err != nil { failedGroups[groupVersion] = err } @@ -341,11 +333,3 @@ func (m *mapper) isAPIGroupCached(gv schema.GroupVersion) bool { return false } - -func (m *mapper) refreshMapper() { - updatedGroupResources := make([]*restmapper.APIGroupResources, 0, len(m.knownGroups)) - for _, agr := range m.knownGroups { - updatedGroupResources = append(updatedGroupResources, agr) - } - m.mapper = restmapper.NewDiscoveryRESTMapper(updatedGroupResources) -} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go index 2fb0acb7b39..e6c075eb008 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go @@ -90,11 +90,18 @@ type CacheOptions struct { type NewClientFunc func(config *rest.Config, options Options) (Client, error) // New returns a new Client using the provided config and Options. -// The returned client reads *and* writes directly from the server -// (it doesn't use object caches). It understands how to work with -// normal types (both custom resources and aggregated/built-in resources), -// as well as unstructured types. // +// The client's read behavior is determined by Options.Cache. +// If either Options.Cache or Options.Cache.Reader is nil, +// the client reads directly from the API server. +// If both Options.Cache and Options.Cache.Reader are non-nil, +// the client reads from a local cache. However, specific +// resources can still be configured to bypass the cache based +// on Options.Cache.Unstructured and Options.Cache.DisableFor. +// Write operations are always performed directly on the API server. +// +// The client understands how to work with normal types (both custom resources +// and aggregated/built-in resources), as well as unstructured types. // In the case of normal types, the scheme will be used to look up the // corresponding group, version, and kind for the given type. In the // case of unstructured types, the group, version, and kind will be extracted @@ -210,7 +217,8 @@ func newClient(config *rest.Config, options Options) (*client, error) { var _ Client = &client{} -// client is a client.Client that reads and writes directly from/to an API server. +// client is a client.Client configured to either read from a local cache or directly from the API server. +// Write operations are always performed directly on the API server. // It lazily initializes new clients at the time they are used. type client struct { typedClient typedClient @@ -515,8 +523,8 @@ func (co *SubResourceCreateOptions) ApplyOptions(opts []SubResourceCreateOption) return co } -// ApplyToSubresourceCreate applies the the configuration on the given create options. -func (co *SubResourceCreateOptions) ApplyToSubresourceCreate(o *SubResourceCreateOptions) { +// ApplyToSubResourceCreate applies the the configuration on the given create options. +func (co *SubResourceCreateOptions) ApplyToSubResourceCreate(o *SubResourceCreateOptions) { co.CreateOptions.ApplyToCreate(&co.CreateOptions) } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/client.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/client.go index 9deb6756c38..2e982e3a55f 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/client.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/client.go @@ -334,10 +334,12 @@ func (t versionedTracker) Create(gvr schema.GroupVersionResource, obj runtime.Ob // tries to assign whatever it finds into a ListType it gets from schema.New() - Thus we have to ensure // we save as the very same type, otherwise subsequent List requests will fail. func convertFromUnstructuredIfNecessary(s *runtime.Scheme, o runtime.Object) (runtime.Object, error) { - gvk := o.GetObjectKind().GroupVersionKind() - u, isUnstructured := o.(runtime.Unstructured) - if !isUnstructured || !s.Recognizes(gvk) { + if !isUnstructured { + return o, nil + } + gvk := o.GetObjectKind().GroupVersionKind() + if !s.Recognizes(gvk) { return o, nil } @@ -380,12 +382,9 @@ func (t versionedTracker) update(gvr schema.GroupVersionResource, obj runtime.Ob field.ErrorList{field.Required(field.NewPath("metadata.name"), "name is required")}) } - gvk := obj.GetObjectKind().GroupVersionKind() - if gvk.Empty() { - gvk, err = apiutil.GVKForObject(obj, t.scheme) - if err != nil { - return err - } + gvk, err := apiutil.GVKForObject(obj, t.scheme) + if err != nil { + return err } oldObject, err := t.ObjectTracker.Get(gvr, ns, accessor.GetName()) @@ -424,9 +423,18 @@ func (t versionedTracker) update(gvr schema.GroupVersionResource, obj runtime.Ob // If the new object does not have the resource version set and it allows unconditional update, // default it to the resource version of the existing resource - if accessor.GetResourceVersion() == "" && allowsUnconditionalUpdate(gvk) { - accessor.SetResourceVersion(oldAccessor.GetResourceVersion()) + if accessor.GetResourceVersion() == "" { + switch { + case allowsUnconditionalUpdate(gvk): + accessor.SetResourceVersion(oldAccessor.GetResourceVersion()) + case bytes. + Contains(debug.Stack(), []byte("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeClient).Patch")): + // We apply patches using a client-go reaction that ends up calling the trackers Update. As we can't change + // that reaction, we use the callstack to figure out if this originated from the "fakeClient.Patch" func. + accessor.SetResourceVersion(oldAccessor.GetResourceVersion()) + } } + if accessor.GetResourceVersion() != oldAccessor.GetResourceVersion() { return apierrors.NewConflict(gvr.GroupResource(), accessor.GetName(), errors.New("object was modified")) } @@ -464,25 +472,25 @@ func (c *fakeClient) Get(ctx context.Context, key client.ObjectKey, obj client.O return err } - gvk, err := apiutil.GVKForObject(obj, c.scheme) - if err != nil { - return err - } - ta, err := meta.TypeAccessor(o) - if err != nil { - return err + if _, isUnstructured := obj.(runtime.Unstructured); isUnstructured { + gvk, err := apiutil.GVKForObject(obj, c.scheme) + if err != nil { + return err + } + ta, err := meta.TypeAccessor(o) + if err != nil { + return err + } + ta.SetKind(gvk.Kind) + ta.SetAPIVersion(gvk.GroupVersion().String()) } - ta.SetKind(gvk.Kind) - ta.SetAPIVersion(gvk.GroupVersion().String()) j, err := json.Marshal(o) if err != nil { return err } - decoder := scheme.Codecs.UniversalDecoder() zero(obj) - _, _, err = decoder.Decode(j, nil, obj) - return err + return json.Unmarshal(j, obj) } func (c *fakeClient) Watch(ctx context.Context, list client.ObjectList, opts ...client.ListOption) (watch.Interface, error) { @@ -527,21 +535,21 @@ func (c *fakeClient) List(ctx context.Context, obj client.ObjectList, opts ...cl return err } - ta, err := meta.TypeAccessor(o) - if err != nil { - return err + if _, isUnstructured := obj.(runtime.Unstructured); isUnstructured { + ta, err := meta.TypeAccessor(o) + if err != nil { + return err + } + ta.SetKind(originalKind) + ta.SetAPIVersion(gvk.GroupVersion().String()) } - ta.SetKind(originalKind) - ta.SetAPIVersion(gvk.GroupVersion().String()) j, err := json.Marshal(o) if err != nil { return err } - decoder := scheme.Codecs.UniversalDecoder() zero(obj) - _, _, err = decoder.Decode(j, nil, obj) - if err != nil { + if err := json.Unmarshal(j, obj); err != nil { return err } @@ -588,9 +596,7 @@ func (c *fakeClient) filterList(list []runtime.Object, gvk schema.GroupVersionKi } func (c *fakeClient) filterWithFields(list []runtime.Object, gvk schema.GroupVersionKind, fs fields.Selector) ([]runtime.Object, error) { - // We only allow filtering on the basis of a single field to ensure consistency with the - // behavior of the cache reader (which we're faking here). - fieldKey, fieldVal, requiresExact := selector.RequiresExactMatch(fs) + requiresExact := selector.RequiresExactMatch(fs) if !requiresExact { return nil, fmt.Errorf("field selector %s is not in one of the two supported forms \"key==val\" or \"key=val\"", fs) @@ -599,15 +605,24 @@ func (c *fakeClient) filterWithFields(list []runtime.Object, gvk schema.GroupVer // Field selection is mimicked via indexes, so there's no sane answer this function can give // if there are no indexes registered for the GroupVersionKind of the objects in the list. indexes := c.indexes[gvk] - if len(indexes) == 0 || indexes[fieldKey] == nil { - return nil, fmt.Errorf("List on GroupVersionKind %v specifies selector on field %s, but no "+ - "index with name %s has been registered for GroupVersionKind %v", gvk, fieldKey, fieldKey, gvk) + for _, req := range fs.Requirements() { + if len(indexes) == 0 || indexes[req.Field] == nil { + return nil, fmt.Errorf("List on GroupVersionKind %v specifies selector on field %s, but no "+ + "index with name %s has been registered for GroupVersionKind %v", gvk, req.Field, req.Field, gvk) + } } - indexExtractor := indexes[fieldKey] filteredList := make([]runtime.Object, 0, len(list)) for _, obj := range list { - if c.objMatchesFieldSelector(obj, indexExtractor, fieldVal) { + matches := true + for _, req := range fs.Requirements() { + indexExtractor := indexes[req.Field] + if !c.objMatchesFieldSelector(obj, indexExtractor, req.Value) { + matches = false + break + } + } + if matches { filteredList = append(filteredList, obj) } } @@ -862,21 +877,22 @@ func (c *fakeClient) patch(obj client.Object, patch client.Patch, opts ...client if !handled { panic("tracker could not handle patch method") } - ta, err := meta.TypeAccessor(o) - if err != nil { - return err + + if _, isUnstructured := obj.(runtime.Unstructured); isUnstructured { + ta, err := meta.TypeAccessor(o) + if err != nil { + return err + } + ta.SetKind(gvk.Kind) + ta.SetAPIVersion(gvk.GroupVersion().String()) } - ta.SetKind(gvk.Kind) - ta.SetAPIVersion(gvk.GroupVersion().String()) j, err := json.Marshal(o) if err != nil { return err } - decoder := scheme.Codecs.UniversalDecoder() zero(obj) - _, _, err = decoder.Decode(j, nil, obj) - return err + return json.Unmarshal(j, obj) } // Applying a patch results in a deletionTimestamp that is truncated to the nearest second. @@ -940,7 +956,7 @@ func dryPatch(action testing.PatchActionImpl, tracker testing.ObjectTracker) (ru if err := json.Unmarshal(modified, obj); err != nil { return nil, err } - case types.StrategicMergePatchType, types.ApplyPatchType: + case types.StrategicMergePatchType: mergedByte, err := strategicpatch.StrategicMergePatch(old, action.GetPatch(), obj) if err != nil { return nil, err @@ -948,8 +964,10 @@ func dryPatch(action testing.PatchActionImpl, tracker testing.ObjectTracker) (ru if err = json.Unmarshal(mergedByte, obj); err != nil { return nil, err } + case types.ApplyPatchType: + return nil, errors.New("apply patches are not supported in the fake client. Follow https://github.com/kubernetes/kubernetes/issues/115598 for the current status") default: - return nil, fmt.Errorf("PatchType is not supported") + return nil, fmt.Errorf("%s PatchType is not supported", action.GetPatchType()) } return obj, nil } @@ -1247,6 +1265,8 @@ func inTreeResourcesWithStatus() []schema.GroupVersionKind { {Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "FlowSchema"}, {Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "PriorityLevelConfiguration"}, + {Group: "flowcontrol.apiserver.k8s.io", Version: "v1", Kind: "FlowSchema"}, + {Group: "flowcontrol.apiserver.k8s.io", Version: "v1", Kind: "PriorityLevelConfiguration"}, } } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldowner.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldowner.go index 2f2f892ef3f..07183cd192e 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldowner.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/fieldowner.go @@ -30,28 +30,28 @@ import ( // will be overridden. func WithFieldOwner(c Client, fieldOwner string) Client { return &clientWithFieldManager{ - manager: fieldOwner, - c: c, - Reader: c, + owner: fieldOwner, + c: c, + Reader: c, } } type clientWithFieldManager struct { - manager string - c Client + owner string + c Client Reader } func (f *clientWithFieldManager) Create(ctx context.Context, obj Object, opts ...CreateOption) error { - return f.c.Create(ctx, obj, append([]CreateOption{FieldOwner(f.manager)}, opts...)...) + return f.c.Create(ctx, obj, append([]CreateOption{FieldOwner(f.owner)}, opts...)...) } func (f *clientWithFieldManager) Update(ctx context.Context, obj Object, opts ...UpdateOption) error { - return f.c.Update(ctx, obj, append([]UpdateOption{FieldOwner(f.manager)}, opts...)...) + return f.c.Update(ctx, obj, append([]UpdateOption{FieldOwner(f.owner)}, opts...)...) } func (f *clientWithFieldManager) Patch(ctx context.Context, obj Object, patch Patch, opts ...PatchOption) error { - return f.c.Patch(ctx, obj, patch, append([]PatchOption{FieldOwner(f.manager)}, opts...)...) + return f.c.Patch(ctx, obj, patch, append([]PatchOption{FieldOwner(f.owner)}, opts...)...) } func (f *clientWithFieldManager) Delete(ctx context.Context, obj Object, opts ...DeleteOption) error { @@ -73,7 +73,7 @@ func (f *clientWithFieldManager) IsObjectNamespaced(obj runtime.Object) (bool, e func (f *clientWithFieldManager) Status() StatusWriter { return &subresourceClientWithFieldOwner{ - owner: f.manager, + owner: f.owner, subresourceWriter: f.c.Status(), } } @@ -81,7 +81,7 @@ func (f *clientWithFieldManager) Status() StatusWriter { func (f *clientWithFieldManager) SubResource(subresource string) SubResourceClient { c := f.c.SubResource(subresource) return &subresourceClientWithFieldOwner{ - owner: f.manager, + owner: f.owner, subresourceWriter: c, SubResourceReader: c, } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/options.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/options.go index ee6489b7c7a..798506f4865 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/options.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/options.go @@ -419,7 +419,7 @@ type ListOptions struct { LabelSelector labels.Selector // FieldSelector filters results by a particular field. In order // to use this with cache-based implementations, restrict usage to - // a single field-value pair that's been added to the indexers. + // exact match field-value pair that's been added to the indexers. FieldSelector fields.Selector // Namespace represents the namespace to list for, or empty for diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/config/config.go b/vendor/sigs.k8s.io/controller-runtime/pkg/config/config.go deleted file mode 100644 index 9c7b875a860..00000000000 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/config/config.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package config - -import ( - "fmt" - "os" - "sync" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "sigs.k8s.io/controller-runtime/pkg/config/v1alpha1" -) - -// ControllerManagerConfiguration defines the functions necessary to parse a config file -// and to configure the Options struct for the ctrl.Manager. -// -// Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. -type ControllerManagerConfiguration interface { - runtime.Object - - // Complete returns the versioned configuration - Complete() (v1alpha1.ControllerManagerConfigurationSpec, error) -} - -// DeferredFileLoader is used to configure the decoder for loading controller -// runtime component config types. -// -// Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. -type DeferredFileLoader struct { - ControllerManagerConfiguration - path string - scheme *runtime.Scheme - once sync.Once - err error -} - -// File will set up the deferred file loader for the configuration -// this will also configure the defaults for the loader if nothing is -// -// Defaults: -// * Path: "./config.yaml" -// * Kind: GenericControllerManagerConfiguration -// -// Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. -func File() *DeferredFileLoader { - scheme := runtime.NewScheme() - utilruntime.Must(v1alpha1.AddToScheme(scheme)) - return &DeferredFileLoader{ - path: "./config.yaml", - ControllerManagerConfiguration: &v1alpha1.ControllerManagerConfiguration{}, - scheme: scheme, - } -} - -// Complete will use sync.Once to set the scheme. -func (d *DeferredFileLoader) Complete() (v1alpha1.ControllerManagerConfigurationSpec, error) { - d.once.Do(d.loadFile) - if d.err != nil { - return v1alpha1.ControllerManagerConfigurationSpec{}, d.err - } - return d.ControllerManagerConfiguration.Complete() -} - -// AtPath will set the path to load the file for the decoder. -func (d *DeferredFileLoader) AtPath(path string) *DeferredFileLoader { - d.path = path - return d -} - -// OfKind will set the type to be used for decoding the file into. -func (d *DeferredFileLoader) OfKind(obj ControllerManagerConfiguration) *DeferredFileLoader { - d.ControllerManagerConfiguration = obj - return d -} - -// loadFile is used from the mutex.Once to load the file. -func (d *DeferredFileLoader) loadFile() { - if d.scheme == nil { - d.err = fmt.Errorf("scheme not supplied to controller configuration loader") - return - } - - content, err := os.ReadFile(d.path) - if err != nil { - d.err = fmt.Errorf("could not read file at %s", d.path) - return - } - - codecs := serializer.NewCodecFactory(d.scheme) - - // Regardless of if the bytes are of any external version, - // it will be read successfully and converted into the internal version - if err = runtime.DecodeInto(codecs.UniversalDecoder(), content, d.ControllerManagerConfiguration); err != nil { - d.err = fmt.Errorf("could not decode file into runtime.Object") - } -} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/config/doc.go b/vendor/sigs.k8s.io/controller-runtime/pkg/config/doc.go deleted file mode 100644 index 47a5a2f1d73..00000000000 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/config/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package config contains functionality for interacting with -// configuration for controller-runtime components. -package config diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/doc.go b/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/doc.go deleted file mode 100644 index 8fdf14d39ad..00000000000 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/doc.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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 provides the ControllerManagerConfiguration used for -// configuring ctrl.Manager -// +kubebuilder:object:generate=true -// -// Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. -package v1alpha1 diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/register.go b/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/register.go deleted file mode 100644 index ca854bcf300..00000000000 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects. - // - // Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. - GroupVersion = schema.GroupVersion{Group: "controller-runtime.sigs.k8s.io", Version: "v1alpha1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme. - // - // Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - // - // Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. - AddToScheme = SchemeBuilder.AddToScheme -) - -func init() { - SchemeBuilder.Register(&ControllerManagerConfiguration{}) -} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/types.go b/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/types.go deleted file mode 100644 index 52c8ab300f2..00000000000 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/types.go +++ /dev/null @@ -1,179 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES 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 ( - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - configv1alpha1 "k8s.io/component-base/config/v1alpha1" -) - -// ControllerManagerConfigurationSpec defines the desired state of GenericControllerManagerConfiguration. -// -// Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. -type ControllerManagerConfigurationSpec struct { - // SyncPeriod determines the minimum frequency at which watched resources are - // reconciled. A lower period will correct entropy more quickly, but reduce - // responsiveness to change if there are many watched resources. Change this - // value only if you know what you are doing. Defaults to 10 hours if unset. - // there will a 10 percent jitter between the SyncPeriod of all controllers - // so that all controllers will not send list requests simultaneously. - // +optional - SyncPeriod *metav1.Duration `json:"syncPeriod,omitempty"` - - // LeaderElection is the LeaderElection config to be used when configuring - // the manager.Manager leader election - // +optional - LeaderElection *configv1alpha1.LeaderElectionConfiguration `json:"leaderElection,omitempty"` - - // CacheNamespace if specified restricts the manager's cache to watch objects in - // the desired namespace Defaults to all namespaces - // - // Note: If a namespace is specified, controllers can still Watch for a - // cluster-scoped resource (e.g Node). For namespaced resources the cache - // will only hold objects from the desired namespace. - // +optional - CacheNamespace string `json:"cacheNamespace,omitempty"` - - // GracefulShutdownTimeout is the duration given to runnable to stop before the manager actually returns on stop. - // To disable graceful shutdown, set to time.Duration(0) - // To use graceful shutdown without timeout, set to a negative duration, e.G. time.Duration(-1) - // The graceful shutdown is skipped for safety reasons in case the leader election lease is lost. - GracefulShutdownTimeout *metav1.Duration `json:"gracefulShutDown,omitempty"` - - // Controller contains global configuration options for controllers - // registered within this manager. - // +optional - Controller *ControllerConfigurationSpec `json:"controller,omitempty"` - - // Metrics contains the controller metrics configuration - // +optional - Metrics ControllerMetrics `json:"metrics,omitempty"` - - // Health contains the controller health configuration - // +optional - Health ControllerHealth `json:"health,omitempty"` - - // Webhook contains the controllers webhook configuration - // +optional - Webhook ControllerWebhook `json:"webhook,omitempty"` -} - -// ControllerConfigurationSpec defines the global configuration for -// controllers registered with the manager. -// -// Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. -// -// Deprecated: Controller global configuration can now be set at the manager level, -// using the manager.Options.Controller field. -type ControllerConfigurationSpec struct { - // GroupKindConcurrency is a map from a Kind to the number of concurrent reconciliation - // allowed for that controller. - // - // When a controller is registered within this manager using the builder utilities, - // users have to specify the type the controller reconciles in the For(...) call. - // If the object's kind passed matches one of the keys in this map, the concurrency - // for that controller is set to the number specified. - // - // The key is expected to be consistent in form with GroupKind.String(), - // e.g. ReplicaSet in apps group (regardless of version) would be `ReplicaSet.apps`. - // - // +optional - GroupKindConcurrency map[string]int `json:"groupKindConcurrency,omitempty"` - - // CacheSyncTimeout refers to the time limit set to wait for syncing caches. - // Defaults to 2 minutes if not set. - // +optional - CacheSyncTimeout *time.Duration `json:"cacheSyncTimeout,omitempty"` - - // RecoverPanic indicates if panics should be recovered. - // +optional - RecoverPanic *bool `json:"recoverPanic,omitempty"` -} - -// ControllerMetrics defines the metrics configs. -// -// Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. -type ControllerMetrics struct { - // BindAddress is the TCP address that the controller should bind to - // for serving prometheus metrics. - // It can be set to "0" to disable the metrics serving. - // +optional - BindAddress string `json:"bindAddress,omitempty"` -} - -// ControllerHealth defines the health configs. -// -// Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. -type ControllerHealth struct { - // HealthProbeBindAddress is the TCP address that the controller should bind to - // for serving health probes - // It can be set to "0" or "" to disable serving the health probe. - // +optional - HealthProbeBindAddress string `json:"healthProbeBindAddress,omitempty"` - - // ReadinessEndpointName, defaults to "readyz" - // +optional - ReadinessEndpointName string `json:"readinessEndpointName,omitempty"` - - // LivenessEndpointName, defaults to "healthz" - // +optional - LivenessEndpointName string `json:"livenessEndpointName,omitempty"` -} - -// ControllerWebhook defines the webhook server for the controller. -// -// Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. -type ControllerWebhook struct { - // Port is the port that the webhook server serves at. - // It is used to set webhook.Server.Port. - // +optional - Port *int `json:"port,omitempty"` - - // Host is the hostname that the webhook server binds to. - // It is used to set webhook.Server.Host. - // +optional - Host string `json:"host,omitempty"` - - // CertDir is the directory that contains the server key and certificate. - // if not set, webhook server would look up the server key and certificate in - // {TempDir}/k8s-webhook-server/serving-certs. The server key and certificate - // must be named tls.key and tls.crt, respectively. - // +optional - CertDir string `json:"certDir,omitempty"` -} - -// +kubebuilder:object:root=true - -// ControllerManagerConfiguration is the Schema for the GenericControllerManagerConfigurations API. -// -// Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. -type ControllerManagerConfiguration struct { - metav1.TypeMeta `json:",inline"` - - // ControllerManagerConfiguration returns the contfigurations for controllers - ControllerManagerConfigurationSpec `json:",inline"` -} - -// Complete returns the configuration for controller-runtime. -// -// Deprecated: The component config package has been deprecated and will be removed in a future release. Users should migrate to their own config implementation, please share feedback in https://github.com/kubernetes-sigs/controller-runtime/issues/895. -func (c *ControllerManagerConfigurationSpec) Complete() (ControllerManagerConfigurationSpec, error) { - return *c, nil -} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index ff14c055da8..00000000000 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/config/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,157 +0,0 @@ -//go:build !ignore_autogenerated - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - configv1alpha1 "k8s.io/component-base/config/v1alpha1" - timex "time" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControllerConfigurationSpec) DeepCopyInto(out *ControllerConfigurationSpec) { - *out = *in - if in.GroupKindConcurrency != nil { - in, out := &in.GroupKindConcurrency, &out.GroupKindConcurrency - *out = make(map[string]int, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.CacheSyncTimeout != nil { - in, out := &in.CacheSyncTimeout, &out.CacheSyncTimeout - *out = new(timex.Duration) - **out = **in - } - if in.RecoverPanic != nil { - in, out := &in.RecoverPanic, &out.RecoverPanic - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerConfigurationSpec. -func (in *ControllerConfigurationSpec) DeepCopy() *ControllerConfigurationSpec { - if in == nil { - return nil - } - out := new(ControllerConfigurationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControllerHealth) DeepCopyInto(out *ControllerHealth) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerHealth. -func (in *ControllerHealth) DeepCopy() *ControllerHealth { - if in == nil { - return nil - } - out := new(ControllerHealth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControllerManagerConfiguration) DeepCopyInto(out *ControllerManagerConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ControllerManagerConfigurationSpec.DeepCopyInto(&out.ControllerManagerConfigurationSpec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerConfiguration. -func (in *ControllerManagerConfiguration) DeepCopy() *ControllerManagerConfiguration { - if in == nil { - return nil - } - out := new(ControllerManagerConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ControllerManagerConfiguration) 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 *ControllerManagerConfigurationSpec) DeepCopyInto(out *ControllerManagerConfigurationSpec) { - *out = *in - if in.SyncPeriod != nil { - in, out := &in.SyncPeriod, &out.SyncPeriod - *out = new(v1.Duration) - **out = **in - } - if in.LeaderElection != nil { - in, out := &in.LeaderElection, &out.LeaderElection - *out = new(configv1alpha1.LeaderElectionConfiguration) - (*in).DeepCopyInto(*out) - } - if in.GracefulShutdownTimeout != nil { - in, out := &in.GracefulShutdownTimeout, &out.GracefulShutdownTimeout - *out = new(v1.Duration) - **out = **in - } - if in.Controller != nil { - in, out := &in.Controller, &out.Controller - *out = new(ControllerConfigurationSpec) - (*in).DeepCopyInto(*out) - } - out.Metrics = in.Metrics - out.Health = in.Health - in.Webhook.DeepCopyInto(&out.Webhook) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerConfigurationSpec. -func (in *ControllerManagerConfigurationSpec) DeepCopy() *ControllerManagerConfigurationSpec { - if in == nil { - return nil - } - out := new(ControllerManagerConfigurationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControllerMetrics) DeepCopyInto(out *ControllerMetrics) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerMetrics. -func (in *ControllerMetrics) DeepCopy() *ControllerMetrics { - if in == nil { - return nil - } - out := new(ControllerMetrics) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControllerWebhook) DeepCopyInto(out *ControllerWebhook) { - *out = *in - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerWebhook. -func (in *ControllerWebhook) DeepCopy() *ControllerWebhook { - if in == nil { - return nil - } - out := new(ControllerWebhook) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controller.go b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controller.go index e48db41f945..5c9e48beaeb 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controller.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controller.go @@ -25,10 +25,8 @@ import ( "k8s.io/client-go/util/workqueue" "k8s.io/klog/v2" - "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/internal/controller" "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/ratelimiter" "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" @@ -59,6 +57,18 @@ type Options struct { // The overall is a token bucket and the per-item is exponential. RateLimiter ratelimiter.RateLimiter + // NewQueue constructs the queue for this controller once the controller is ready to start. + // With NewQueue a custom queue implementation can be used, e.g. a priority queue to prioritize with which + // priority/order objects are reconciled (e.g. to reconcile objects with changes first). + // This is a func because the standard Kubernetes work queues start themselves immediately, which + // leads to goroutine leaks if something calls controller.New repeatedly. + // The NewQueue func gets the controller name and the RateLimiter option (defaulted if necessary) passed in. + // NewQueue defaults to NewRateLimitingQueueWithConfig. + // + // NOTE: LOW LEVEL PRIMITIVE! + // Only use a custom NewQueue if you know what you are doing. + NewQueue func(controllerName string, rateLimiter ratelimiter.RateLimiter) workqueue.RateLimitingInterface + // LogConstructor is used to construct a logger used for this controller and passed // to each reconciliation via the context field. LogConstructor func(request *reconcile.Request) logr.Logger @@ -72,13 +82,8 @@ type Controller interface { // Reconciler is called to reconcile an object by Namespace/Name reconcile.Reconciler - // Watch takes events provided by a Source and uses the EventHandler to - // enqueue reconcile.Requests in response to the events. - // - // Watch may be provided one or more Predicates to filter events before - // they are given to the EventHandler. Events will be passed to the - // EventHandler if all provided Predicates evaluate to true. - Watch(src source.Source, eventhandler handler.EventHandler, predicates ...predicate.Predicate) error + // Watch watches the provided Source. + Watch(src source.Source) error // Start starts the controller. Start blocks until the context is closed or a // controller has an error starting. @@ -147,6 +152,14 @@ func NewUnmanaged(name string, mgr manager.Manager, options Options) (Controller options.RateLimiter = workqueue.DefaultControllerRateLimiter() } + if options.NewQueue == nil { + options.NewQueue = func(controllerName string, rateLimiter ratelimiter.RateLimiter) workqueue.RateLimitingInterface { + return workqueue.NewRateLimitingQueueWithConfig(rateLimiter, workqueue.RateLimitingQueueConfig{ + Name: controllerName, + }) + } + } + if options.RecoverPanic == nil { options.RecoverPanic = mgr.GetControllerOptions().RecoverPanic } @@ -157,12 +170,9 @@ func NewUnmanaged(name string, mgr manager.Manager, options Options) (Controller // Create controller with dependencies set return &controller.Controller{ - Do: options.Reconciler, - MakeQueue: func() workqueue.RateLimitingInterface { - return workqueue.NewRateLimitingQueueWithConfig(options.RateLimiter, workqueue.RateLimitingQueueConfig{ - Name: name, - }) - }, + Do: options.Reconciler, + RateLimiter: options.RateLimiter, + NewQueue: options.NewQueue, MaxConcurrentReconciles: options.MaxConcurrentReconciles, CacheSyncTimeout: options.CacheSyncTimeout, Name: name, diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controllerutil/controllerutil.go b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controllerutil/controllerutil.go index f76e012ea8a..176ce0db0f1 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controllerutil/controllerutil.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/controller/controllerutil/controllerutil.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" @@ -52,12 +52,22 @@ func newAlreadyOwnedError(obj metav1.Object, owner metav1.OwnerReference) *Alrea } } +// OwnerReferenceOption is a function that can modify a `metav1.OwnerReference`. +type OwnerReferenceOption func(*metav1.OwnerReference) + +// WithBlockOwnerDeletion allows configuring the BlockOwnerDeletion field on the `metav1.OwnerReference`. +func WithBlockOwnerDeletion(blockOwnerDeletion bool) OwnerReferenceOption { + return func(ref *metav1.OwnerReference) { + ref.BlockOwnerDeletion = &blockOwnerDeletion + } +} + // SetControllerReference sets owner as a Controller OwnerReference on controlled. // This is used for garbage collection of the controlled object and for // reconciling the owner object on changes to controlled (with a Watch + EnqueueRequestForOwner). // Since only one OwnerReference can be a controller, it returns an error if // there is another OwnerReference with Controller flag set. -func SetControllerReference(owner, controlled metav1.Object, scheme *runtime.Scheme) error { +func SetControllerReference(owner, controlled metav1.Object, scheme *runtime.Scheme, opts ...OwnerReferenceOption) error { // Validate the owner. ro, ok := owner.(runtime.Object) if !ok { @@ -77,8 +87,11 @@ func SetControllerReference(owner, controlled metav1.Object, scheme *runtime.Sch Kind: gvk.Kind, Name: owner.GetName(), UID: owner.GetUID(), - BlockOwnerDeletion: pointer.Bool(true), - Controller: pointer.Bool(true), + BlockOwnerDeletion: ptr.To(true), + Controller: ptr.To(true), + } + for _, opt := range opts { + opt(&ref) } // Return early with an error if the object is already controlled. @@ -94,7 +107,7 @@ func SetControllerReference(owner, controlled metav1.Object, scheme *runtime.Sch // SetOwnerReference is a helper method to make sure the given object contains an object reference to the object provided. // This allows you to declare that owner has a dependency on the object without specifying it as a controller. // If a reference to the same object already exists, it'll be overwritten with the newly provided version. -func SetOwnerReference(owner, object metav1.Object, scheme *runtime.Scheme) error { +func SetOwnerReference(owner, object metav1.Object, scheme *runtime.Scheme, opts ...OwnerReferenceOption) error { // Validate the owner. ro, ok := owner.(runtime.Object) if !ok { @@ -115,12 +128,93 @@ func SetOwnerReference(owner, object metav1.Object, scheme *runtime.Scheme) erro UID: owner.GetUID(), Name: owner.GetName(), } + for _, opt := range opts { + opt(&ref) + } // Update owner references and return. upsertOwnerRef(ref, object) return nil } +// RemoveOwnerReference is a helper method to make sure the given object removes an owner reference to the object provided. +// This allows you to remove the owner to establish a new owner of the object in a subsequent call. +func RemoveOwnerReference(owner, object metav1.Object, scheme *runtime.Scheme) error { + owners := object.GetOwnerReferences() + length := len(owners) + if length < 1 { + return fmt.Errorf("%T does not have any owner references", object) + } + ro, ok := owner.(runtime.Object) + if !ok { + return fmt.Errorf("%T is not a runtime.Object, cannot call RemoveOwnerReference", owner) + } + gvk, err := apiutil.GVKForObject(ro, scheme) + if err != nil { + return err + } + + index := indexOwnerRef(owners, metav1.OwnerReference{ + APIVersion: gvk.GroupVersion().String(), + Name: owner.GetName(), + Kind: gvk.Kind, + }) + if index == -1 { + return fmt.Errorf("%T does not have an owner reference for %T", object, owner) + } + + owners = append(owners[:index], owners[index+1:]...) + object.SetOwnerReferences(owners) + return nil +} + +// HasControllerReference returns true if the object +// has an owner ref with controller equal to true +func HasControllerReference(object metav1.Object) bool { + owners := object.GetOwnerReferences() + for _, owner := range owners { + isTrue := owner.Controller + if owner.Controller != nil && *isTrue { + return true + } + } + return false +} + +// RemoveControllerReference removes an owner reference where the controller +// equals true +func RemoveControllerReference(owner, object metav1.Object, scheme *runtime.Scheme) error { + if ok := HasControllerReference(object); !ok { + return fmt.Errorf("%T does not have a owner reference with controller equals true", object) + } + ro, ok := owner.(runtime.Object) + if !ok { + return fmt.Errorf("%T is not a runtime.Object, cannot call RemoveControllerReference", owner) + } + gvk, err := apiutil.GVKForObject(ro, scheme) + if err != nil { + return err + } + ownerRefs := object.GetOwnerReferences() + index := indexOwnerRef(ownerRefs, metav1.OwnerReference{ + APIVersion: gvk.GroupVersion().String(), + Name: owner.GetName(), + Kind: gvk.Kind, + }) + + if index == -1 { + return fmt.Errorf("%T does not have an controller reference for %T", object, owner) + } + + if ownerRefs[index].Controller == nil || !*ownerRefs[index].Controller { + return fmt.Errorf("%T owner is not the controller reference for %T", owner, object) + } + + ownerRefs = append(ownerRefs[:index], ownerRefs[index+1:]...) + object.SetOwnerReferences(ownerRefs) + return nil +} + func upsertOwnerRef(ref metav1.OwnerReference, object metav1.Object) { owners := object.GetOwnerReferences() if idx := indexOwnerRef(owners, ref); idx == -1 { @@ -166,7 +260,6 @@ func referSameObject(a, b metav1.OwnerReference) bool { if err != nil { return false } - return aGV.Group == bGV.Group && a.Kind == b.Kind && a.Name == b.Name } @@ -193,6 +286,9 @@ const ( // They should complete the sentence "Deployment default/foo has been .. // The MutateFn is called regardless of creating or updating an object. // // It returns the executed operation and an error. +// +// Note: changes made by MutateFn to any sub-resource (status...), will be +// discarded. func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object, f MutateFn) (OperationResult, error) { key := client.ObjectKeyFromObject(obj) if err := c.Get(ctx, key, obj); err != nil { @@ -230,6 +326,12 @@ func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object, f M // The MutateFn is called regardless of creating or updating an object. // // It returns the executed operation and an error. +// +// Note: changes to any sub-resource other than status will be ignored. +// Changes to the status sub-resource will only be applied if the object +// already exist. To change the status on object creation, the easiest +// way is to requeue the object in the controller if OperationResult is +// OperationResultCreated func CreateOrPatch(ctx context.Context, c client.Client, obj client.Object, f MutateFn) (OperationResult, error) { key := client.ObjectKeyFromObject(obj) if err := c.Get(ctx, key, obj); err != nil { diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/crd.go b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/crd.go index f9c58ea26a3..5fdd657cd7f 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/crd.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/crd.go @@ -38,7 +38,7 @@ import ( "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" "k8s.io/client-go/util/retry" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "sigs.k8s.io/yaml" "sigs.k8s.io/controller-runtime/pkg/client" @@ -364,19 +364,26 @@ func modifyConversionWebhooks(crds []*apiextensionsv1.CustomResourceDefinition, if err != nil { return err } - url := pointer.String(fmt.Sprintf("https://%s/convert", hostPort)) + url := ptr.To(fmt.Sprintf("https://%s/convert", hostPort)) for i := range crds { // Continue if we're preserving unknown fields. if crds[i].Spec.PreserveUnknownFields { continue } - // Continue if the GroupKind isn't registered as being convertible. - if _, ok := convertibles[schema.GroupKind{ - Group: crds[i].Spec.Group, - Kind: crds[i].Spec.Names.Kind, - }]; !ok { - continue + if !webhookOptions.IgnoreSchemeConvertible { + // Continue if the GroupKind isn't registered as being convertible, + // and remove any existing conversion webhooks if they exist. + // This is to prevent the CRD from being rejected by the apiserver, usually + // manifests that are generated by controller-gen will have a conversion + // webhook set, but we don't want to enable it if the type isn't registered. + if _, ok := convertibles[schema.GroupKind{ + Group: crds[i].Spec.Group, + Kind: crds[i].Spec.Names.Kind, + }]; !ok { + crds[i].Spec.Conversion = nil + continue + } } if crds[i].Spec.Conversion == nil { crds[i].Spec.Conversion = &apiextensionsv1.CustomResourceConversion{ diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/server.go b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/server.go index 690483fe3cc..85436576456 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/server.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/server.go @@ -17,15 +17,20 @@ limitations under the License. package envtest import ( + "context" "fmt" "os" "strings" "time" + corev1 "k8s.io/api/core/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/config" logf "sigs.k8s.io/controller-runtime/pkg/internal/log" @@ -265,6 +270,12 @@ func (te *Environment) Start() (*rest.Config, error) { te.Scheme = scheme.Scheme } + // If we are bringing etcd up for the first time, it can take some time for the + // default namespace to actually be created and seen as available to the apiserver + if err := te.waitForDefaultNamespace(te.Config); err != nil { + return nil, fmt.Errorf("default namespace didn't register within deadline: %w", err) + } + // Call PrepWithoutInstalling to setup certificates first // and have them available to patch CRD conversion webhook as well. if err := te.WebhookInstallOptions.PrepWithoutInstalling(); err != nil { @@ -322,6 +333,20 @@ func (te *Environment) startControlPlane() error { return nil } +func (te *Environment) waitForDefaultNamespace(config *rest.Config) error { + cs, err := client.New(config, client.Options{}) + if err != nil { + return fmt.Errorf("unable to create client: %w", err) + } + // It shouldn't take longer than 5s for the default namespace to be brought up in etcd + return wait.PollUntilContextTimeout(context.TODO(), time.Millisecond*50, time.Second*5, true, func(ctx context.Context) (bool, error) { + if err = cs.Get(ctx, types.NamespacedName{Name: "default"}, &corev1.Namespace{}); err != nil { + return false, nil //nolint:nilerr + } + return true, nil + }) +} + func (te *Environment) defaultTimeouts() error { var err error if te.ControlPlaneStartTimeout == 0 { diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/webhook.go b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/webhook.go index f7e43a14802..e4e54e472c7 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/webhook.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/envtest/webhook.go @@ -49,6 +49,11 @@ type WebhookInstallOptions struct { // ValidatingWebhooks is a list of ValidatingWebhookConfigurations to install ValidatingWebhooks []*admissionv1.ValidatingWebhookConfiguration + // IgnoreSchemeConvertible, will modify any CRD conversion webhook to use the local serving host and port, + // bypassing the need to have the types registered in the Scheme. This is useful for testing CRD conversion webhooks + // with unregistered or unstructured types. + IgnoreSchemeConvertible bool + // IgnoreErrorIfPathMissing will ignore an error if a DirectoryPath does not exist when set to true IgnoreErrorIfPathMissing bool @@ -184,7 +189,8 @@ func defaultWebhookOptions(o *WebhookInstallOptions) { func WaitForWebhooks(config *rest.Config, mutatingWebhooks []*admissionv1.MutatingWebhookConfiguration, validatingWebhooks []*admissionv1.ValidatingWebhookConfiguration, - options WebhookInstallOptions) error { + options WebhookInstallOptions, +) error { waitingFor := map[schema.GroupVersionKind]*sets.Set[string]{} for _, hook := range mutatingWebhooks { @@ -242,7 +248,7 @@ func (p *webhookPoller) poll(ctx context.Context) (done bool, err error) { continue } for _, name := range names.UnsortedList() { - var obj = &unstructured.Unstructured{} + obj := &unstructured.Unstructured{} obj.SetGroupVersionKind(gvk) err := c.Get(context.Background(), client.ObjectKey{ Namespace: "", diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/event/event.go b/vendor/sigs.k8s.io/controller-runtime/pkg/event/event.go index 271b3c00fb3..e99c2100727 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/event/event.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/event/event.go @@ -18,38 +18,55 @@ package event import "sigs.k8s.io/controller-runtime/pkg/client" -// CreateEvent is an event where a Kubernetes object was created. CreateEvent should be generated +// CreateEvent is an event where a Kubernetes object was created. CreateEvent should be generated +// by a source.Source and transformed into a reconcile.Request by a handler.EventHandler. +type CreateEvent = TypedCreateEvent[client.Object] + +// UpdateEvent is an event where a Kubernetes object was updated. UpdateEvent should be generated +// by a source.Source and transformed into a reconcile.Request by an handler.EventHandler. +type UpdateEvent = TypedUpdateEvent[client.Object] + +// DeleteEvent is an event where a Kubernetes object was deleted. DeleteEvent should be generated // by a source.Source and transformed into a reconcile.Request by an handler.EventHandler. -type CreateEvent struct { +type DeleteEvent = TypedDeleteEvent[client.Object] + +// GenericEvent is an event where the operation type is unknown (e.g. polling or event originating outside the cluster). +// GenericEvent should be generated by a source.Source and transformed into a reconcile.Request by an +// handler.EventHandler. +type GenericEvent = TypedGenericEvent[client.Object] + +// TypedCreateEvent is an event where a Kubernetes object was created. TypedCreateEvent should be generated +// by a source.Source and transformed into a reconcile.Request by an handler.TypedEventHandler. +type TypedCreateEvent[T any] struct { // Object is the object from the event - Object client.Object + Object T } -// UpdateEvent is an event where a Kubernetes object was updated. UpdateEvent should be generated -// by a source.Source and transformed into a reconcile.Request by an handler.EventHandler. -type UpdateEvent struct { +// TypedUpdateEvent is an event where a Kubernetes object was updated. TypedUpdateEvent should be generated +// by a source.Source and transformed into a reconcile.Request by an handler.TypedEventHandler. +type TypedUpdateEvent[T any] struct { // ObjectOld is the object from the event - ObjectOld client.Object + ObjectOld T // ObjectNew is the object from the event - ObjectNew client.Object + ObjectNew T } -// DeleteEvent is an event where a Kubernetes object was deleted. DeleteEvent should be generated -// by a source.Source and transformed into a reconcile.Request by an handler.EventHandler. -type DeleteEvent struct { +// TypedDeleteEvent is an event where a Kubernetes object was deleted. TypedDeleteEvent should be generated +// by a source.Source and transformed into a reconcile.Request by an handler.TypedEventHandler. +type TypedDeleteEvent[T any] struct { // Object is the object from the event - Object client.Object + Object T // DeleteStateUnknown is true if the Delete event was missed but we identified the object // as having been deleted. DeleteStateUnknown bool } -// GenericEvent is an event where the operation type is unknown (e.g. polling or event originating outside the cluster). -// GenericEvent should be generated by a source.Source and transformed into a reconcile.Request by an -// handler.EventHandler. -type GenericEvent struct { +// TypedGenericEvent is an event where the operation type is unknown (e.g. polling or event originating outside the cluster). +// TypedGenericEvent should be generated by a source.Source and transformed into a reconcile.Request by an +// handler.TypedEventHandler. +type TypedGenericEvent[T any] struct { // Object is the object from the event - Object client.Object + Object T } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue.go b/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue.go index c72b2e1ebb1..c9c76938540 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue.go @@ -18,9 +18,11 @@ package handler import ( "context" + "reflect" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/util/workqueue" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" logf "sigs.k8s.io/controller-runtime/pkg/internal/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" @@ -33,13 +35,20 @@ type empty struct{} var _ EventHandler = &EnqueueRequestForObject{} // EnqueueRequestForObject enqueues a Request containing the Name and Namespace of the object that is the source of the Event. -// (e.g. the created / deleted / updated objects Name and Namespace). handler.EnqueueRequestForObject is used by almost all +// (e.g. the created / deleted / updated objects Name and Namespace). handler.EnqueueRequestForObject is used by almost all // Controllers that have associated Resources (e.g. CRDs) to reconcile the associated Resource. -type EnqueueRequestForObject struct{} +type EnqueueRequestForObject = TypedEnqueueRequestForObject[client.Object] + +// TypedEnqueueRequestForObject enqueues a Request containing the Name and Namespace of the object that is the source of the Event. +// (e.g. the created / deleted / updated objects Name and Namespace). handler.TypedEnqueueRequestForObject is used by almost all +// Controllers that have associated Resources (e.g. CRDs) to reconcile the associated Resource. +// +// TypedEnqueueRequestForObject is experimental and subject to future change. +type TypedEnqueueRequestForObject[T client.Object] struct{} // Create implements EventHandler. -func (e *EnqueueRequestForObject) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface) { - if evt.Object == nil { +func (e *TypedEnqueueRequestForObject[T]) Create(ctx context.Context, evt event.TypedCreateEvent[T], q workqueue.RateLimitingInterface) { + if isNil(evt.Object) { enqueueLog.Error(nil, "CreateEvent received with no metadata", "event", evt) return } @@ -50,14 +59,14 @@ func (e *EnqueueRequestForObject) Create(ctx context.Context, evt event.CreateEv } // Update implements EventHandler. -func (e *EnqueueRequestForObject) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface) { +func (e *TypedEnqueueRequestForObject[T]) Update(ctx context.Context, evt event.TypedUpdateEvent[T], q workqueue.RateLimitingInterface) { switch { - case evt.ObjectNew != nil: + case !isNil(evt.ObjectNew): q.Add(reconcile.Request{NamespacedName: types.NamespacedName{ Name: evt.ObjectNew.GetName(), Namespace: evt.ObjectNew.GetNamespace(), }}) - case evt.ObjectOld != nil: + case !isNil(evt.ObjectOld): q.Add(reconcile.Request{NamespacedName: types.NamespacedName{ Name: evt.ObjectOld.GetName(), Namespace: evt.ObjectOld.GetNamespace(), @@ -68,8 +77,8 @@ func (e *EnqueueRequestForObject) Update(ctx context.Context, evt event.UpdateEv } // Delete implements EventHandler. -func (e *EnqueueRequestForObject) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface) { - if evt.Object == nil { +func (e *TypedEnqueueRequestForObject[T]) Delete(ctx context.Context, evt event.TypedDeleteEvent[T], q workqueue.RateLimitingInterface) { + if isNil(evt.Object) { enqueueLog.Error(nil, "DeleteEvent received with no metadata", "event", evt) return } @@ -80,8 +89,8 @@ func (e *EnqueueRequestForObject) Delete(ctx context.Context, evt event.DeleteEv } // Generic implements EventHandler. -func (e *EnqueueRequestForObject) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface) { - if evt.Object == nil { +func (e *TypedEnqueueRequestForObject[T]) Generic(ctx context.Context, evt event.TypedGenericEvent[T], q workqueue.RateLimitingInterface) { + if isNil(evt.Object) { enqueueLog.Error(nil, "GenericEvent received with no metadata", "event", evt) return } @@ -90,3 +99,15 @@ func (e *EnqueueRequestForObject) Generic(ctx context.Context, evt event.Generic Namespace: evt.Object.GetNamespace(), }}) } + +func isNil(arg any) bool { + if v := reflect.ValueOf(arg); !v.IsValid() || ((v.Kind() == reflect.Ptr || + v.Kind() == reflect.Interface || + v.Kind() == reflect.Slice || + v.Kind() == reflect.Map || + v.Kind() == reflect.Chan || + v.Kind() == reflect.Func) && v.IsNil()) { + return true + } + return false +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue_mapped.go b/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue_mapped.go index b55fdde6ba5..6e34e2ae457 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue_mapped.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue_mapped.go @@ -27,7 +27,13 @@ import ( // MapFunc is the signature required for enqueueing requests from a generic function. // This type is usually used with EnqueueRequestsFromMapFunc when registering an event handler. -type MapFunc func(context.Context, client.Object) []reconcile.Request +type MapFunc = TypedMapFunc[client.Object] + +// TypedMapFunc is the signature required for enqueueing requests from a generic function. +// This type is usually used with EnqueueRequestsFromTypedMapFunc when registering an event handler. +// +// TypedMapFunc is experimental and subject to future change. +type TypedMapFunc[T any] func(context.Context, T) []reconcile.Request // EnqueueRequestsFromMapFunc enqueues Requests by running a transformation function that outputs a collection // of reconcile.Requests on each Event. The reconcile.Requests may be for an arbitrary set of objects @@ -40,44 +46,60 @@ type MapFunc func(context.Context, client.Object) []reconcile.Request // For UpdateEvents which contain both a new and old object, the transformation function is run on both // objects and both sets of Requests are enqueue. func EnqueueRequestsFromMapFunc(fn MapFunc) EventHandler { - return &enqueueRequestsFromMapFunc{ + return TypedEnqueueRequestsFromMapFunc(fn) +} + +// TypedEnqueueRequestsFromMapFunc enqueues Requests by running a transformation function that outputs a collection +// of reconcile.Requests on each Event. The reconcile.Requests may be for an arbitrary set of objects +// defined by some user specified transformation of the source Event. (e.g. trigger Reconciler for a set of objects +// in response to a cluster resize event caused by adding or deleting a Node) +// +// TypedEnqueueRequestsFromMapFunc is frequently used to fan-out updates from one object to one or more other +// objects of a differing type. +// +// For TypedUpdateEvents which contain both a new and old object, the transformation function is run on both +// objects and both sets of Requests are enqueue. +// +// TypedEnqueueRequestsFromMapFunc is experimental and subject to future change. +func TypedEnqueueRequestsFromMapFunc[T any](fn TypedMapFunc[T]) TypedEventHandler[T] { + return &enqueueRequestsFromMapFunc[T]{ toRequests: fn, } } -var _ EventHandler = &enqueueRequestsFromMapFunc{} +var _ EventHandler = &enqueueRequestsFromMapFunc[client.Object]{} -type enqueueRequestsFromMapFunc struct { +type enqueueRequestsFromMapFunc[T any] struct { // Mapper transforms the argument into a slice of keys to be reconciled - toRequests MapFunc + toRequests TypedMapFunc[T] } // Create implements EventHandler. -func (e *enqueueRequestsFromMapFunc) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface) { +func (e *enqueueRequestsFromMapFunc[T]) Create(ctx context.Context, evt event.TypedCreateEvent[T], q workqueue.RateLimitingInterface) { reqs := map[reconcile.Request]empty{} e.mapAndEnqueue(ctx, q, evt.Object, reqs) } // Update implements EventHandler. -func (e *enqueueRequestsFromMapFunc) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface) { +func (e *enqueueRequestsFromMapFunc[T]) Update(ctx context.Context, evt event.TypedUpdateEvent[T], q workqueue.RateLimitingInterface) { reqs := map[reconcile.Request]empty{} e.mapAndEnqueue(ctx, q, evt.ObjectOld, reqs) e.mapAndEnqueue(ctx, q, evt.ObjectNew, reqs) } // Delete implements EventHandler. -func (e *enqueueRequestsFromMapFunc) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface) { +func (e *enqueueRequestsFromMapFunc[T]) Delete(ctx context.Context, evt event.TypedDeleteEvent[T], q workqueue.RateLimitingInterface) { reqs := map[reconcile.Request]empty{} e.mapAndEnqueue(ctx, q, evt.Object, reqs) } // Generic implements EventHandler. -func (e *enqueueRequestsFromMapFunc) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface) { +func (e *enqueueRequestsFromMapFunc[T]) Generic(ctx context.Context, evt event.TypedGenericEvent[T], q workqueue.RateLimitingInterface) { reqs := map[reconcile.Request]empty{} e.mapAndEnqueue(ctx, q, evt.Object, reqs) } -func (e *enqueueRequestsFromMapFunc) mapAndEnqueue(ctx context.Context, q workqueue.RateLimitingInterface, object client.Object, reqs map[reconcile.Request]empty) { +func (e *enqueueRequestsFromMapFunc[T]) mapAndEnqueue(ctx context.Context, q workqueue.RateLimitingInterface, object T, reqs map[reconcile.Request]empty) { for _, req := range e.toRequests(ctx, object) { _, ok := reqs[req] if !ok { diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue_owner.go b/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue_owner.go index 02e7d756f80..052a3140e1e 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue_owner.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/handler/enqueue_owner.go @@ -32,12 +32,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" ) -var _ EventHandler = &enqueueRequestForOwner{} +var _ EventHandler = &enqueueRequestForOwner[client.Object]{} var log = logf.RuntimeLog.WithName("eventhandler").WithName("enqueueRequestForOwner") // OwnerOption modifies an EnqueueRequestForOwner EventHandler. -type OwnerOption func(e *enqueueRequestForOwner) +type OwnerOption func(e enqueueRequestForOwnerInterface) // EnqueueRequestForOwner enqueues Requests for the Owners of an object. E.g. the object that created // the object that was the source of the Event. @@ -48,7 +48,21 @@ type OwnerOption func(e *enqueueRequestForOwner) // // - a handler.enqueueRequestForOwner EventHandler with an OwnerType of ReplicaSet and OnlyControllerOwner set to true. func EnqueueRequestForOwner(scheme *runtime.Scheme, mapper meta.RESTMapper, ownerType client.Object, opts ...OwnerOption) EventHandler { - e := &enqueueRequestForOwner{ + return TypedEnqueueRequestForOwner[client.Object](scheme, mapper, ownerType, opts...) +} + +// TypedEnqueueRequestForOwner enqueues Requests for the Owners of an object. E.g. the object that created +// the object that was the source of the Event. +// +// If a ReplicaSet creates Pods, users may reconcile the ReplicaSet in response to Pod Events using: +// +// - a source.Kind Source with Type of Pod. +// +// - a handler.typedEnqueueRequestForOwner EventHandler with an OwnerType of ReplicaSet and OnlyControllerOwner set to true. +// +// TypedEnqueueRequestForOwner is experimental and subject to future change. +func TypedEnqueueRequestForOwner[T client.Object](scheme *runtime.Scheme, mapper meta.RESTMapper, ownerType client.Object, opts ...OwnerOption) TypedEventHandler[T] { + e := &enqueueRequestForOwner[T]{ ownerType: ownerType, mapper: mapper, } @@ -63,12 +77,16 @@ func EnqueueRequestForOwner(scheme *runtime.Scheme, mapper meta.RESTMapper, owne // OnlyControllerOwner if provided will only look at the first OwnerReference with Controller: true. func OnlyControllerOwner() OwnerOption { - return func(e *enqueueRequestForOwner) { - e.isController = true + return func(e enqueueRequestForOwnerInterface) { + e.setIsController(true) } } -type enqueueRequestForOwner struct { +type enqueueRequestForOwnerInterface interface { + setIsController(bool) +} + +type enqueueRequestForOwner[T client.Object] struct { // ownerType is the type of the Owner object to look for in OwnerReferences. Only Group and Kind are compared. ownerType runtime.Object @@ -82,8 +100,12 @@ type enqueueRequestForOwner struct { mapper meta.RESTMapper } +func (e *enqueueRequestForOwner[T]) setIsController(isController bool) { + e.isController = isController +} + // Create implements EventHandler. -func (e *enqueueRequestForOwner) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface) { +func (e *enqueueRequestForOwner[T]) Create(ctx context.Context, evt event.TypedCreateEvent[T], q workqueue.RateLimitingInterface) { reqs := map[reconcile.Request]empty{} e.getOwnerReconcileRequest(evt.Object, reqs) for req := range reqs { @@ -92,7 +114,7 @@ func (e *enqueueRequestForOwner) Create(ctx context.Context, evt event.CreateEve } // Update implements EventHandler. -func (e *enqueueRequestForOwner) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface) { +func (e *enqueueRequestForOwner[T]) Update(ctx context.Context, evt event.TypedUpdateEvent[T], q workqueue.RateLimitingInterface) { reqs := map[reconcile.Request]empty{} e.getOwnerReconcileRequest(evt.ObjectOld, reqs) e.getOwnerReconcileRequest(evt.ObjectNew, reqs) @@ -102,7 +124,7 @@ func (e *enqueueRequestForOwner) Update(ctx context.Context, evt event.UpdateEve } // Delete implements EventHandler. -func (e *enqueueRequestForOwner) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface) { +func (e *enqueueRequestForOwner[T]) Delete(ctx context.Context, evt event.TypedDeleteEvent[T], q workqueue.RateLimitingInterface) { reqs := map[reconcile.Request]empty{} e.getOwnerReconcileRequest(evt.Object, reqs) for req := range reqs { @@ -111,7 +133,7 @@ func (e *enqueueRequestForOwner) Delete(ctx context.Context, evt event.DeleteEve } // Generic implements EventHandler. -func (e *enqueueRequestForOwner) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface) { +func (e *enqueueRequestForOwner[T]) Generic(ctx context.Context, evt event.TypedGenericEvent[T], q workqueue.RateLimitingInterface) { reqs := map[reconcile.Request]empty{} e.getOwnerReconcileRequest(evt.Object, reqs) for req := range reqs { @@ -121,7 +143,7 @@ func (e *enqueueRequestForOwner) Generic(ctx context.Context, evt event.GenericE // parseOwnerTypeGroupKind parses the OwnerType into a Group and Kind and caches the result. Returns false // if the OwnerType could not be parsed using the scheme. -func (e *enqueueRequestForOwner) parseOwnerTypeGroupKind(scheme *runtime.Scheme) error { +func (e *enqueueRequestForOwner[T]) parseOwnerTypeGroupKind(scheme *runtime.Scheme) error { // Get the kinds of the type kinds, _, err := scheme.ObjectKinds(e.ownerType) if err != nil { @@ -141,7 +163,7 @@ func (e *enqueueRequestForOwner) parseOwnerTypeGroupKind(scheme *runtime.Scheme) // getOwnerReconcileRequest looks at object and builds a map of reconcile.Request to reconcile // owners of object that match e.OwnerType. -func (e *enqueueRequestForOwner) getOwnerReconcileRequest(object metav1.Object, result map[reconcile.Request]empty) { +func (e *enqueueRequestForOwner[T]) getOwnerReconcileRequest(object metav1.Object, result map[reconcile.Request]empty) { // Iterate through the OwnerReferences looking for a match on Group and Kind against what was requested // by the user for _, ref := range e.getOwnersReferences(object) { @@ -181,7 +203,7 @@ func (e *enqueueRequestForOwner) getOwnerReconcileRequest(object metav1.Object, // getOwnersReferences returns the OwnerReferences for an object as specified by the enqueueRequestForOwner // - if IsController is true: only take the Controller OwnerReference (if found) // - if IsController is false: take all OwnerReferences. -func (e *enqueueRequestForOwner) getOwnersReferences(object metav1.Object) []metav1.OwnerReference { +func (e *enqueueRequestForOwner[T]) getOwnersReferences(object metav1.Object) []metav1.OwnerReference { if object == nil { return nil } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/handler/eventhandler.go b/vendor/sigs.k8s.io/controller-runtime/pkg/handler/eventhandler.go index 2f380f4fc4d..1756ffefa39 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/handler/eventhandler.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/handler/eventhandler.go @@ -20,12 +20,13 @@ import ( "context" "k8s.io/client-go/util/workqueue" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" ) // EventHandler enqueues reconcile.Requests in response to events (e.g. Pod Create). EventHandlers map an Event // for one object to trigger Reconciles for either the same object or different objects - e.g. if there is an -// Event for object with type Foo (using source.KindSource) then reconcile one or more object(s) with type Bar. +// Event for object with type Foo (using source.Kind) then reconcile one or more object(s) with type Bar. // // Identical reconcile.Requests will be batched together through the queuing mechanism before reconcile is called. // @@ -41,65 +42,92 @@ import ( // // Unless you are implementing your own EventHandler, you can ignore the functions on the EventHandler interface. // Most users shouldn't need to implement their own EventHandler. -type EventHandler interface { - // Create is called in response to an create event - e.g. Pod Creation. - Create(context.Context, event.CreateEvent, workqueue.RateLimitingInterface) +type EventHandler TypedEventHandler[client.Object] + +// TypedEventHandler enqueues reconcile.Requests in response to events (e.g. Pod Create). TypedEventHandlers map an Event +// for one object to trigger Reconciles for either the same object or different objects - e.g. if there is an +// Event for object with type Foo (using source.Kind) then reconcile one or more object(s) with type Bar. +// +// Identical reconcile.Requests will be batched together through the queuing mechanism before reconcile is called. +// +// * Use TypedEnqueueRequestForObject to reconcile the object the event is for +// - do this for events for the type the Controller Reconciles. (e.g. Deployment for a Deployment Controller) +// +// * Use TypedEnqueueRequestForOwner to reconcile the owner of the object the event is for +// - do this for events for the types the Controller creates. (e.g. ReplicaSets created by a Deployment Controller) +// +// * Use TypedEnqueueRequestsFromMapFunc to transform an event for an object to a reconcile of an object +// of a different type - do this for events for types the Controller may be interested in, but doesn't create. +// (e.g. If Foo responds to cluster size events, map Node events to Foo objects.) +// +// Unless you are implementing your own TypedEventHandler, you can ignore the functions on the TypedEventHandler interface. +// Most users shouldn't need to implement their own TypedEventHandler. +// +// TypedEventHandler is experimental and subject to future change. +type TypedEventHandler[T any] interface { + // Create is called in response to a create event - e.g. Pod Creation. + Create(context.Context, event.TypedCreateEvent[T], workqueue.RateLimitingInterface) // Update is called in response to an update event - e.g. Pod Updated. - Update(context.Context, event.UpdateEvent, workqueue.RateLimitingInterface) + Update(context.Context, event.TypedUpdateEvent[T], workqueue.RateLimitingInterface) // Delete is called in response to a delete event - e.g. Pod Deleted. - Delete(context.Context, event.DeleteEvent, workqueue.RateLimitingInterface) + Delete(context.Context, event.TypedDeleteEvent[T], workqueue.RateLimitingInterface) // Generic is called in response to an event of an unknown type or a synthetic event triggered as a cron or // external trigger request - e.g. reconcile Autoscaling, or a Webhook. - Generic(context.Context, event.GenericEvent, workqueue.RateLimitingInterface) + Generic(context.Context, event.TypedGenericEvent[T], workqueue.RateLimitingInterface) } var _ EventHandler = Funcs{} -// Funcs implements EventHandler. -type Funcs struct { +// Funcs implements eventhandler. +type Funcs = TypedFuncs[client.Object] + +// TypedFuncs implements eventhandler. +// +// TypedFuncs is experimental and subject to future change. +type TypedFuncs[T any] struct { // Create is called in response to an add event. Defaults to no-op. // RateLimitingInterface is used to enqueue reconcile.Requests. - CreateFunc func(context.Context, event.CreateEvent, workqueue.RateLimitingInterface) + CreateFunc func(context.Context, event.TypedCreateEvent[T], workqueue.RateLimitingInterface) // Update is called in response to an update event. Defaults to no-op. // RateLimitingInterface is used to enqueue reconcile.Requests. - UpdateFunc func(context.Context, event.UpdateEvent, workqueue.RateLimitingInterface) + UpdateFunc func(context.Context, event.TypedUpdateEvent[T], workqueue.RateLimitingInterface) // Delete is called in response to a delete event. Defaults to no-op. // RateLimitingInterface is used to enqueue reconcile.Requests. - DeleteFunc func(context.Context, event.DeleteEvent, workqueue.RateLimitingInterface) + DeleteFunc func(context.Context, event.TypedDeleteEvent[T], workqueue.RateLimitingInterface) // GenericFunc is called in response to a generic event. Defaults to no-op. // RateLimitingInterface is used to enqueue reconcile.Requests. - GenericFunc func(context.Context, event.GenericEvent, workqueue.RateLimitingInterface) + GenericFunc func(context.Context, event.TypedGenericEvent[T], workqueue.RateLimitingInterface) } // Create implements EventHandler. -func (h Funcs) Create(ctx context.Context, e event.CreateEvent, q workqueue.RateLimitingInterface) { +func (h TypedFuncs[T]) Create(ctx context.Context, e event.TypedCreateEvent[T], q workqueue.RateLimitingInterface) { if h.CreateFunc != nil { h.CreateFunc(ctx, e, q) } } // Delete implements EventHandler. -func (h Funcs) Delete(ctx context.Context, e event.DeleteEvent, q workqueue.RateLimitingInterface) { +func (h TypedFuncs[T]) Delete(ctx context.Context, e event.TypedDeleteEvent[T], q workqueue.RateLimitingInterface) { if h.DeleteFunc != nil { h.DeleteFunc(ctx, e, q) } } // Update implements EventHandler. -func (h Funcs) Update(ctx context.Context, e event.UpdateEvent, q workqueue.RateLimitingInterface) { +func (h TypedFuncs[T]) Update(ctx context.Context, e event.TypedUpdateEvent[T], q workqueue.RateLimitingInterface) { if h.UpdateFunc != nil { h.UpdateFunc(ctx, e, q) } } // Generic implements EventHandler. -func (h Funcs) Generic(ctx context.Context, e event.GenericEvent, q workqueue.RateLimitingInterface) { +func (h TypedFuncs[T]) Generic(ctx context.Context, e event.TypedGenericEvent[T], q workqueue.RateLimitingInterface) { if h.GenericFunc != nil { h.GenericFunc(ctx, e, q) } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go index 33883647b90..9c709404b50 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go @@ -29,10 +29,9 @@ import ( "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/client-go/util/workqueue" - "sigs.k8s.io/controller-runtime/pkg/handler" ctrlmetrics "sigs.k8s.io/controller-runtime/pkg/internal/controller/metrics" logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/predicate" + "sigs.k8s.io/controller-runtime/pkg/ratelimiter" "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" ) @@ -50,10 +49,13 @@ type Controller struct { // Defaults to the DefaultReconcileFunc. Do reconcile.Reconciler - // MakeQueue constructs the queue for this controller once the controller is ready to start. - // This exists because the standard Kubernetes workqueues start themselves immediately, which + // RateLimiter is used to limit how frequently requests may be queued into the work queue. + RateLimiter ratelimiter.RateLimiter + + // NewQueue constructs the queue for this controller once the controller is ready to start. + // This is a func because the standard Kubernetes work queues start themselves immediately, which // leads to goroutine leaks if something calls controller.New repeatedly. - MakeQueue func() workqueue.RateLimitingInterface + NewQueue func(controllerName string, rateLimiter ratelimiter.RateLimiter) workqueue.RateLimitingInterface // Queue is an listeningQueue that listens for events from Informers and adds object keys to // the Queue for processing @@ -77,7 +79,7 @@ type Controller struct { CacheSyncTimeout time.Duration // startWatches maintains a list of sources, handlers, and predicates to start when the controller is started. - startWatches []watchDescription + startWatches []source.Source // LogConstructor is used to construct a logger to then log messages to users during reconciliation, // or for example when a watch is started. @@ -92,13 +94,6 @@ type Controller struct { LeaderElected *bool } -// watchDescription contains all the information necessary to start a watch. -type watchDescription struct { - src source.Source - handler handler.EventHandler - predicates []predicate.Predicate -} - // Reconcile implements reconcile.Reconciler. func (c *Controller) Reconcile(ctx context.Context, req reconcile.Request) (_ reconcile.Result, err error) { defer func() { @@ -120,7 +115,7 @@ func (c *Controller) Reconcile(ctx context.Context, req reconcile.Request) (_ re } // Watch implements controller.Controller. -func (c *Controller) Watch(src source.Source, evthdler handler.EventHandler, prct ...predicate.Predicate) error { +func (c *Controller) Watch(src source.Source) error { c.mu.Lock() defer c.mu.Unlock() @@ -128,12 +123,12 @@ func (c *Controller) Watch(src source.Source, evthdler handler.EventHandler, prc // // These watches are going to be held on the controller struct until the manager or user calls Start(...). if !c.Started { - c.startWatches = append(c.startWatches, watchDescription{src: src, handler: evthdler, predicates: prct}) + c.startWatches = append(c.startWatches, src) return nil } c.LogConstructor(nil).Info("Starting EventSource", "source", src) - return src.Start(c.ctx, evthdler, c.Queue, prct...) + return src.Start(c.ctx, c.Queue) } // NeedLeaderElection implements the manager.LeaderElectionRunnable interface. @@ -158,7 +153,7 @@ func (c *Controller) Start(ctx context.Context) error { // Set the internal context. c.ctx = ctx - c.Queue = c.MakeQueue() + c.Queue = c.NewQueue(c.Name, c.RateLimiter) go func() { <-ctx.Done() c.Queue.ShutDown() @@ -175,9 +170,9 @@ func (c *Controller) Start(ctx context.Context) error { // caches to sync so that they have a chance to register their intendeded // caches. for _, watch := range c.startWatches { - c.LogConstructor(nil).Info("Starting EventSource", "source", fmt.Sprintf("%s", watch.src)) + c.LogConstructor(nil).Info("Starting EventSource", "source", fmt.Sprintf("%s", watch)) - if err := watch.src.Start(ctx, watch.handler, c.Queue, watch.predicates...); err != nil { + if err := watch.Start(ctx, c.Queue); err != nil { return err } } @@ -186,7 +181,7 @@ func (c *Controller) Start(ctx context.Context) error { c.LogConstructor(nil).Info("Starting Controller") for _, watch := range c.startWatches { - syncingSource, ok := watch.src.(source.SyncingSource) + syncingSource, ok := watch.(source.SyncingSource) if !ok { continue } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/field/selector/utils.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/field/selector/utils.go index 4f6d0843184..8f6dc71ede5 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/field/selector/utils.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/field/selector/utils.go @@ -22,14 +22,16 @@ import ( ) // RequiresExactMatch checks if the given field selector is of the form `k=v` or `k==v`. -func RequiresExactMatch(sel fields.Selector) (field, val string, required bool) { +func RequiresExactMatch(sel fields.Selector) bool { reqs := sel.Requirements() - if len(reqs) != 1 { - return "", "", false + if len(reqs) == 0 { + return false } - req := reqs[0] - if req.Operator != selection.Equals && req.Operator != selection.DoubleEquals { - return "", "", false + + for _, req := range reqs { + if req.Operator != selection.Equals && req.Operator != selection.DoubleEquals { + return false + } } - return req.Field, req.Value, true + return true } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/event_handler.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/event_handler.go index ae8404a1fa4..8651ea453e8 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/event_handler.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/event_handler.go @@ -33,8 +33,8 @@ import ( var log = logf.RuntimeLog.WithName("source").WithName("EventHandler") // NewEventHandler creates a new EventHandler. -func NewEventHandler(ctx context.Context, queue workqueue.RateLimitingInterface, handler handler.EventHandler, predicates []predicate.Predicate) *EventHandler { - return &EventHandler{ +func NewEventHandler[T client.Object](ctx context.Context, queue workqueue.RateLimitingInterface, handler handler.TypedEventHandler[T], predicates []predicate.TypedPredicate[T]) *EventHandler[T] { + return &EventHandler[T]{ ctx: ctx, handler: handler, queue: queue, @@ -43,19 +43,19 @@ func NewEventHandler(ctx context.Context, queue workqueue.RateLimitingInterface, } // EventHandler adapts a handler.EventHandler interface to a cache.ResourceEventHandler interface. -type EventHandler struct { +type EventHandler[T client.Object] struct { // ctx stores the context that created the event handler // that is used to propagate cancellation signals to each handler function. ctx context.Context - handler handler.EventHandler + handler handler.TypedEventHandler[T] queue workqueue.RateLimitingInterface - predicates []predicate.Predicate + predicates []predicate.TypedPredicate[T] } // HandlerFuncs converts EventHandler to a ResourceEventHandlerFuncs // TODO: switch to ResourceEventHandlerDetailedFuncs with client-go 1.27 -func (e *EventHandler) HandlerFuncs() cache.ResourceEventHandlerFuncs { +func (e *EventHandler[T]) HandlerFuncs() cache.ResourceEventHandlerFuncs { return cache.ResourceEventHandlerFuncs{ AddFunc: e.OnAdd, UpdateFunc: e.OnUpdate, @@ -64,11 +64,11 @@ func (e *EventHandler) HandlerFuncs() cache.ResourceEventHandlerFuncs { } // OnAdd creates CreateEvent and calls Create on EventHandler. -func (e *EventHandler) OnAdd(obj interface{}) { - c := event.CreateEvent{} +func (e *EventHandler[T]) OnAdd(obj interface{}) { + c := event.TypedCreateEvent[T]{} // Pull Object out of the object - if o, ok := obj.(client.Object); ok { + if o, ok := obj.(T); ok { c.Object = o } else { log.Error(nil, "OnAdd missing Object", @@ -89,10 +89,10 @@ func (e *EventHandler) OnAdd(obj interface{}) { } // OnUpdate creates UpdateEvent and calls Update on EventHandler. -func (e *EventHandler) OnUpdate(oldObj, newObj interface{}) { - u := event.UpdateEvent{} +func (e *EventHandler[T]) OnUpdate(oldObj, newObj interface{}) { + u := event.TypedUpdateEvent[T]{} - if o, ok := oldObj.(client.Object); ok { + if o, ok := oldObj.(T); ok { u.ObjectOld = o } else { log.Error(nil, "OnUpdate missing ObjectOld", @@ -101,7 +101,7 @@ func (e *EventHandler) OnUpdate(oldObj, newObj interface{}) { } // Pull Object out of the object - if o, ok := newObj.(client.Object); ok { + if o, ok := newObj.(T); ok { u.ObjectNew = o } else { log.Error(nil, "OnUpdate missing ObjectNew", @@ -122,8 +122,8 @@ func (e *EventHandler) OnUpdate(oldObj, newObj interface{}) { } // OnDelete creates DeleteEvent and calls Delete on EventHandler. -func (e *EventHandler) OnDelete(obj interface{}) { - d := event.DeleteEvent{} +func (e *EventHandler[T]) OnDelete(obj interface{}) { + d := event.TypedDeleteEvent[T]{} // Deal with tombstone events by pulling the object out. Tombstone events wrap the object in a // DeleteFinalStateUnknown struct, so the object needs to be pulled out. @@ -149,7 +149,7 @@ func (e *EventHandler) OnDelete(obj interface{}) { } // Pull Object out of the object - if o, ok := obj.(client.Object); ok { + if o, ok := obj.(T); ok { d.Object = o } else { log.Error(nil, "OnDelete missing Object", diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/kind.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/kind.go index b3a82271256..3a8db96e3c5 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/kind.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/source/kind.go @@ -4,12 +4,14 @@ import ( "context" "errors" "fmt" + "reflect" "time" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/workqueue" + "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/handler" @@ -17,34 +19,40 @@ import ( ) // Kind is used to provide a source of events originating inside the cluster from Watches (e.g. Pod Create). -type Kind struct { +type Kind[T client.Object] struct { // Type is the type of object to watch. e.g. &v1.Pod{} - Type client.Object + Type T // Cache used to watch APIs Cache cache.Cache - // started may contain an error if one was encountered during startup. If its closed and does not + Handler handler.TypedEventHandler[T] + + Predicates []predicate.TypedPredicate[T] + + // startedErr may contain an error if one was encountered during startup. If its closed and does not // contain an error, startup and syncing finished. - started chan error + startedErr chan error startCancel func() } // Start is internal and should be called only by the Controller to register an EventHandler with the Informer // to enqueue reconcile.Requests. -func (ks *Kind) Start(ctx context.Context, handler handler.EventHandler, queue workqueue.RateLimitingInterface, - prct ...predicate.Predicate) error { - if ks.Type == nil { +func (ks *Kind[T]) Start(ctx context.Context, queue workqueue.RateLimitingInterface) error { + if isNil(ks.Type) { return fmt.Errorf("must create Kind with a non-nil object") } - if ks.Cache == nil { + if isNil(ks.Cache) { return fmt.Errorf("must create Kind with a non-nil cache") } + if isNil(ks.Handler) { + return errors.New("must create Kind with non-nil handler") + } // cache.GetInformer will block until its context is cancelled if the cache was already started and it can not // sync that informer (most commonly due to RBAC issues). ctx, ks.startCancel = context.WithCancel(ctx) - ks.started = make(chan error) + ks.startedErr = make(chan error) go func() { var ( i cache.Informer @@ -72,30 +80,30 @@ func (ks *Kind) Start(ctx context.Context, handler handler.EventHandler, queue w return true, nil }); err != nil { if lastErr != nil { - ks.started <- fmt.Errorf("failed to get informer from cache: %w", lastErr) + ks.startedErr <- fmt.Errorf("failed to get informer from cache: %w", lastErr) return } - ks.started <- err + ks.startedErr <- err return } - _, err := i.AddEventHandler(NewEventHandler(ctx, queue, handler, prct).HandlerFuncs()) + _, err := i.AddEventHandler(NewEventHandler(ctx, queue, ks.Handler, ks.Predicates).HandlerFuncs()) if err != nil { - ks.started <- err + ks.startedErr <- err return } if !ks.Cache.WaitForCacheSync(ctx) { // Would be great to return something more informative here - ks.started <- errors.New("cache did not sync") + ks.startedErr <- errors.New("cache did not sync") } - close(ks.started) + close(ks.startedErr) }() return nil } -func (ks *Kind) String() string { - if ks.Type != nil { +func (ks *Kind[T]) String() string { + if !isNil(ks.Type) { return fmt.Sprintf("kind source: %T", ks.Type) } return "kind source: unknown type" @@ -103,9 +111,9 @@ func (ks *Kind) String() string { // WaitForSync implements SyncingSource to allow controllers to wait with starting // workers until the cache is synced. -func (ks *Kind) WaitForSync(ctx context.Context) error { +func (ks *Kind[T]) WaitForSync(ctx context.Context) error { select { - case err := <-ks.started: + case err := <-ks.startedErr: return err case <-ctx.Done(): ks.startCancel() @@ -115,3 +123,15 @@ func (ks *Kind) WaitForSync(ctx context.Context) error { return fmt.Errorf("timed out waiting for cache to be synced for Kind %T", ks.Type) } } + +func isNil(arg any) bool { + if v := reflect.ValueOf(arg); !v.IsValid() || ((v.Kind() == reflect.Ptr || + v.Kind() == reflect.Interface || + v.Kind() == reflect.Slice || + v.Kind() == reflect.Map || + v.Kind() == reflect.Chan || + v.Kind() == reflect.Func) && v.IsNil()) { + return true + } + return false +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/syncs/syncs.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/syncs/syncs.go new file mode 100644 index 00000000000..c78a30377a3 --- /dev/null +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/syncs/syncs.go @@ -0,0 +1,38 @@ +package syncs + +import ( + "context" + "reflect" + "sync" +) + +// MergeChans returns a channel that is closed when any of the input channels are signaled. +// The caller must call the returned CancelFunc to ensure no resources are leaked. +func MergeChans[T any](chans ...<-chan T) (<-chan T, context.CancelFunc) { + var once sync.Once + out := make(chan T) + cancel := make(chan T) + cancelFunc := func() { + once.Do(func() { + close(cancel) + }) + <-out + } + cases := make([]reflect.SelectCase, len(chans)+1) + for i := range chans { + cases[i] = reflect.SelectCase{ + Dir: reflect.SelectRecv, + Chan: reflect.ValueOf(chans[i]), + } + } + cases[len(cases)-1] = reflect.SelectCase{ + Dir: reflect.SelectRecv, + Chan: reflect.ValueOf(cancel), + } + go func() { + defer close(out) + _, _, _ = reflect.Select(cases) + }() + + return out, cancelFunc +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/kubectl.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/kubectl.go index a27b7a0ff88..a41bb77c4dd 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/kubectl.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane/kubectl.go @@ -112,6 +112,7 @@ func (k *KubeCtl) Run(args ...string) (stdout, stderr io.Reader, err error) { cmd := exec.Command(k.Path, allArgs...) cmd.Stdout = stdoutBuffer cmd.Stderr = stderrBuffer + cmd.SysProcAttr = process.GetSysProcAttr() err = cmd.Run() diff --git a/vendor/k8s.io/gengo/examples/set-gen/generators/tags.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_other.go similarity index 57% rename from vendor/k8s.io/gengo/examples/set-gen/generators/tags.go rename to vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_other.go index 52e87677183..df13b341a48 100644 --- a/vendor/k8s.io/gengo/examples/set-gen/generators/tags.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_other.go @@ -1,3 +1,6 @@ +//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos +// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos + /* Copyright 2016 The Kubernetes Authors. @@ -14,20 +17,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -package generators +package process -import ( - "k8s.io/gengo/types" - "k8s.io/klog/v2" -) +import "syscall" -// extractBoolTagOrDie gets the comment-tags for the key and asserts that, if -// it exists, the value is boolean. If the tag did not exist, it returns -// false. -func extractBoolTagOrDie(key string, lines []string) bool { - val, err := types.ExtractSingleBoolCommentTag("+", key, false, lines) - if err != nil { - klog.Fatalf(err.Error()) - } - return val +// GetSysProcAttr returns the SysProcAttr to use for the process, +// for non-unix systems this returns nil. +func GetSysProcAttr() *syscall.SysProcAttr { + return nil } diff --git a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/generators/tags.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_unix.go similarity index 51% rename from pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/generators/tags.go rename to vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_unix.go index 52e87677183..83ad509af0f 100644 --- a/pkg/k8s/vendor/k8s.io/gengo/examples/set-gen/generators/tags.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/procattr_unix.go @@ -1,5 +1,8 @@ +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos + /* -Copyright 2016 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,20 +17,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -package generators +package process import ( - "k8s.io/gengo/types" - "k8s.io/klog/v2" + "golang.org/x/sys/unix" ) -// extractBoolTagOrDie gets the comment-tags for the key and asserts that, if -// it exists, the value is boolean. If the tag did not exist, it returns -// false. -func extractBoolTagOrDie(key string, lines []string) bool { - val, err := types.ExtractSingleBoolCommentTag("+", key, false, lines) - if err != nil { - klog.Fatalf(err.Error()) +// GetSysProcAttr returns the SysProcAttr to use for the process, +// for unix systems this returns a SysProcAttr with Setpgid set to true, +// which inherits the parent's process group id. +func GetSysProcAttr() *unix.SysProcAttr { + return &unix.SysProcAttr{ + Setpgid: true, } - return val } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/process.go b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/process.go index af83c70a2fa..03f252524a3 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/process.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/internal/testing/process/process.go @@ -155,6 +155,7 @@ func (ps *State) Start(stdout, stderr io.Writer) (err error) { ps.Cmd = exec.Command(ps.Path, ps.Args...) ps.Cmd.Stdout = stdout ps.Cmd.Stderr = stderr + ps.Cmd.SysProcAttr = GetSysProcAttr() ready := make(chan bool) timedOut := time.After(ps.StartTimeout) @@ -265,6 +266,9 @@ func (ps *State) Stop() error { case <-ps.waitDone: break case <-timedOut: + if err := ps.Cmd.Process.Signal(syscall.SIGKILL); err != nil { + return fmt.Errorf("unable to kill process %s: %w", ps.Path, err) + } return fmt.Errorf("timeout waiting for process %s to stop", path.Base(ps.Path)) } ps.ready = false diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/internal.go b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/internal.go index dc702861da8..2ce02b105c5 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/internal.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/internal.go @@ -302,9 +302,8 @@ func (cm *controllerManager) addHealthProbeServer() error { mux.Handle(cm.livenessEndpointName+"/", http.StripPrefix(cm.livenessEndpointName, cm.healthzHandler)) } - return cm.add(&server{ - Kind: "health probe", - Log: cm.logger, + return cm.add(&Server{ + Name: "health probe", Server: srv, Listener: cm.healthProbeListener, }) @@ -320,9 +319,8 @@ func (cm *controllerManager) addPprofServer() error { mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol) mux.HandleFunc("/debug/pprof/trace", pprof.Trace) - return cm.add(&server{ - Kind: "pprof", - Log: cm.logger, + return cm.add(&Server{ + Name: "pprof", Server: srv, Listener: cm.pprofListener, }) @@ -402,14 +400,13 @@ func (cm *controllerManager) Start(ctx context.Context) (err error) { } } - // First start any internal HTTP servers, which includes health probes, metrics and profiling if enabled. + // First start any HTTP servers, which includes health probes, metrics and profiling if enabled. // - // WARNING: Internal HTTP servers MUST start before any cache is populated, otherwise it would block - // conversion webhooks to be ready for serving which make the cache never get ready. - if err := cm.runnables.HTTPServers.Start(cm.internalCtx); err != nil { - if err != nil { - return fmt.Errorf("failed to start HTTP servers: %w", err) - } + // WARNING: HTTPServers includes the health probes, which MUST start before any cache is populated, otherwise + // it would block conversion webhooks to be ready for serving which make the cache never get ready. + logCtx := logr.NewContext(cm.internalCtx, cm.logger) + if err := cm.runnables.HTTPServers.Start(logCtx); err != nil { + return fmt.Errorf("failed to start HTTP servers: %w", err) } // Start any webhook servers, which includes conversion, validation, and defaulting @@ -419,23 +416,17 @@ func (cm *controllerManager) Start(ctx context.Context) (err error) { // between conversion webhooks and the cache sync (usually initial list) which causes the webhooks // to never start because no cache can be populated. if err := cm.runnables.Webhooks.Start(cm.internalCtx); err != nil { - if err != nil { - return fmt.Errorf("failed to start webhooks: %w", err) - } + return fmt.Errorf("failed to start webhooks: %w", err) } // Start and wait for caches. if err := cm.runnables.Caches.Start(cm.internalCtx); err != nil { - if err != nil { - return fmt.Errorf("failed to start caches: %w", err) - } + return fmt.Errorf("failed to start caches: %w", err) } // Start the non-leaderelection Runnables after the cache has synced. if err := cm.runnables.Others.Start(cm.internalCtx); err != nil { - if err != nil { - return fmt.Errorf("failed to start other runnables: %w", err) - } + return fmt.Errorf("failed to start other runnables: %w", err) } // Start the leader election and all required runnables. @@ -536,6 +527,8 @@ func (cm *controllerManager) engageStopProcedure(stopComplete <-chan struct{}) e // Stop all the leader election runnables, which includes reconcilers. cm.logger.Info("Stopping and waiting for leader election runnables") + // Prevent leader election when shutting down a non-elected manager + cm.runnables.LeaderElection.startOnce.Do(func() {}) cm.runnables.LeaderElection.StopAndWait(cm.shutdownCtx) // Stop the caches before the leader election runnables, this is an important diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/manager.go b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/manager.go index 647ea4370e3..3166f4818fb 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/manager.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/manager.go @@ -22,26 +22,23 @@ import ( "fmt" "net" "net/http" - "reflect" "time" "github.com/go-logr/logr" coordinationv1 "k8s.io/api/coordination/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" "k8s.io/client-go/tools/leaderelection/resourcelock" "k8s.io/client-go/tools/record" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/cluster" "sigs.k8s.io/controller-runtime/pkg/config" - "sigs.k8s.io/controller-runtime/pkg/config/v1alpha1" "sigs.k8s.io/controller-runtime/pkg/healthz" intrec "sigs.k8s.io/controller-runtime/pkg/internal/recorder" "sigs.k8s.io/controller-runtime/pkg/leaderelection" @@ -418,10 +415,10 @@ func New(config *rest.Config, options Options) (Manager, error) { return nil, fmt.Errorf("failed to new pprof listener: %w", err) } - errChan := make(chan error) + errChan := make(chan error, 1) runnables := newRunnables(options.BaseContext, errChan) return &controllerManager{ - stopProcedureEngaged: pointer.Int64(0), + stopProcedureEngaged: ptr.To(int64(0)), cluster: cluster, runnables: runnables, errChan: errChan, @@ -447,126 +444,6 @@ func New(config *rest.Config, options Options) (Manager, error) { }, nil } -// AndFrom will use a supplied type and convert to Options -// any options already set on Options will be ignored, this is used to allow -// cli flags to override anything specified in the config file. -// -// Deprecated: This function has been deprecated and will be removed in a future release, -// The Component Configuration package has been unmaintained for over a year and is no longer -// actively developed. Users should migrate to their own configuration format -// and configure Manager.Options directly. -// See https://github.com/kubernetes-sigs/controller-runtime/issues/895 -// for more information, feedback, and comments. -func (o Options) AndFrom(loader config.ControllerManagerConfiguration) (Options, error) { - newObj, err := loader.Complete() - if err != nil { - return o, err - } - - o = o.setLeaderElectionConfig(newObj) - - if o.Cache.SyncPeriod == nil && newObj.SyncPeriod != nil { - o.Cache.SyncPeriod = &newObj.SyncPeriod.Duration - } - - if len(o.Cache.DefaultNamespaces) == 0 && newObj.CacheNamespace != "" { - o.Cache.DefaultNamespaces = map[string]cache.Config{newObj.CacheNamespace: {}} - } - - if o.Metrics.BindAddress == "" && newObj.Metrics.BindAddress != "" { - o.Metrics.BindAddress = newObj.Metrics.BindAddress - } - - if o.HealthProbeBindAddress == "" && newObj.Health.HealthProbeBindAddress != "" { - o.HealthProbeBindAddress = newObj.Health.HealthProbeBindAddress - } - - if o.ReadinessEndpointName == "" && newObj.Health.ReadinessEndpointName != "" { - o.ReadinessEndpointName = newObj.Health.ReadinessEndpointName - } - - if o.LivenessEndpointName == "" && newObj.Health.LivenessEndpointName != "" { - o.LivenessEndpointName = newObj.Health.LivenessEndpointName - } - - if o.WebhookServer == nil { - port := 0 - if newObj.Webhook.Port != nil { - port = *newObj.Webhook.Port - } - o.WebhookServer = webhook.NewServer(webhook.Options{ - Port: port, - Host: newObj.Webhook.Host, - CertDir: newObj.Webhook.CertDir, - }) - } - - if newObj.Controller != nil { - if o.Controller.CacheSyncTimeout == 0 && newObj.Controller.CacheSyncTimeout != nil { - o.Controller.CacheSyncTimeout = *newObj.Controller.CacheSyncTimeout - } - - if len(o.Controller.GroupKindConcurrency) == 0 && len(newObj.Controller.GroupKindConcurrency) > 0 { - o.Controller.GroupKindConcurrency = newObj.Controller.GroupKindConcurrency - } - } - - return o, nil -} - -// AndFromOrDie will use options.AndFrom() and will panic if there are errors. -// -// Deprecated: This function has been deprecated and will be removed in a future release, -// The Component Configuration package has been unmaintained for over a year and is no longer -// actively developed. Users should migrate to their own configuration format -// and configure Manager.Options directly. -// See https://github.com/kubernetes-sigs/controller-runtime/issues/895 -// for more information, feedback, and comments. -func (o Options) AndFromOrDie(loader config.ControllerManagerConfiguration) Options { - o, err := o.AndFrom(loader) - if err != nil { - panic(fmt.Sprintf("could not parse config file: %v", err)) - } - return o -} - -func (o Options) setLeaderElectionConfig(obj v1alpha1.ControllerManagerConfigurationSpec) Options { - if obj.LeaderElection == nil { - // The source does not have any configuration; noop - return o - } - - if !o.LeaderElection && obj.LeaderElection.LeaderElect != nil { - o.LeaderElection = *obj.LeaderElection.LeaderElect - } - - if o.LeaderElectionResourceLock == "" && obj.LeaderElection.ResourceLock != "" { - o.LeaderElectionResourceLock = obj.LeaderElection.ResourceLock - } - - if o.LeaderElectionNamespace == "" && obj.LeaderElection.ResourceNamespace != "" { - o.LeaderElectionNamespace = obj.LeaderElection.ResourceNamespace - } - - if o.LeaderElectionID == "" && obj.LeaderElection.ResourceName != "" { - o.LeaderElectionID = obj.LeaderElection.ResourceName - } - - if o.LeaseDuration == nil && !reflect.DeepEqual(obj.LeaderElection.LeaseDuration, metav1.Duration{}) { - o.LeaseDuration = &obj.LeaderElection.LeaseDuration.Duration - } - - if o.RenewDeadline == nil && !reflect.DeepEqual(obj.LeaderElection.RenewDeadline, metav1.Duration{}) { - o.RenewDeadline = &obj.LeaderElection.RenewDeadline.Duration - } - - if o.RetryPeriod == nil && !reflect.DeepEqual(obj.LeaderElection.RetryPeriod, metav1.Duration{}) { - o.RetryPeriod = &obj.LeaderElection.RetryPeriod.Duration - } - - return o -} - // defaultHealthProbeListener creates the default health probes listener bound to the given address. func defaultHealthProbeListener(addr string) (net.Listener, error) { if addr == "" || addr == "0" { diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/runnable_group.go b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/runnable_group.go index 96566f5df11..db5cda7c88f 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/runnable_group.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/runnable_group.go @@ -54,7 +54,10 @@ func newRunnables(baseContext BaseContextFunc, errChan chan error) *runnables { // The runnables added after Start are started directly. func (r *runnables) Add(fn Runnable) error { switch runnable := fn.(type) { - case *server: + case *Server: + if runnable.NeedLeaderElection() { + return r.LeaderElection.Add(fn, nil) + } return r.HTTPServers.Add(fn, nil) case hasCache: return r.Caches.Add(fn, func(ctx context.Context) bool { @@ -263,6 +266,15 @@ func (r *runnableGroup) Add(rn Runnable, ready runnableCheck) error { r.start.Unlock() } + // Recheck if we're stopped and hold the readlock, given that the stop and start can be called + // at the same time, we can end up in a situation where the runnable is added + // after the group is stopped and the channel is closed. + r.stop.RLock() + defer r.stop.RUnlock() + if r.stopped { + return errRunnableGroupStopped + } + // Enqueue the runnable. r.ch <- readyRunnable return nil @@ -272,7 +284,11 @@ func (r *runnableGroup) Add(rn Runnable, ready runnableCheck) error { func (r *runnableGroup) StopAndWait(ctx context.Context) { r.stopOnce.Do(func() { // Close the reconciler channel once we're done. - defer close(r.ch) + defer func() { + r.stop.Lock() + close(r.ch) + r.stop.Unlock() + }() _ = r.Start(ctx) r.stop.Lock() diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/server.go b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/server.go index b6509f48f24..76f6165b532 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/manager/server.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/manager/server.go @@ -21,34 +21,67 @@ import ( "errors" "net" "net/http" + "time" - "github.com/go-logr/logr" + crlog "sigs.k8s.io/controller-runtime/pkg/log" ) -// server is a general purpose HTTP server Runnable for a manager -// to serve some internal handlers such as health probes, metrics and profiling. -type server struct { - Kind string - Log logr.Logger - Server *http.Server +var ( + _ Runnable = (*Server)(nil) + _ LeaderElectionRunnable = (*Server)(nil) +) + +// Server is a general purpose HTTP server Runnable for a manager. +// It is used to serve some internal handlers for health probes and profiling, +// but it can also be used to run custom servers. +type Server struct { + // Name is an optional string that describes the purpose of the server. It is used in logs to distinguish + // among multiple servers. + Name string + + // Server is the HTTP server to run. It is required. + Server *http.Server + + // Listener is an optional listener to use. If not set, the server start a listener using the server.Addr. + // Using a listener is useful when the port reservation needs to happen in advance of this runnable starting. Listener net.Listener + + // OnlyServeWhenLeader is an optional bool that indicates that the server should only be started when the manager is the leader. + OnlyServeWhenLeader bool + + // ShutdownTimeout is an optional duration that indicates how long to wait for the server to shutdown gracefully. If not set, + // the server will wait indefinitely for all connections to close. + ShutdownTimeout *time.Duration } -func (s *server) Start(ctx context.Context) error { - log := s.Log.WithValues("kind", s.Kind, "addr", s.Listener.Addr()) +// Start starts the server. It will block until the server is stopped or an error occurs. +func (s *Server) Start(ctx context.Context) error { + log := crlog.FromContext(ctx) + if s.Name != "" { + log = log.WithValues("name", s.Name) + } + log = log.WithValues("addr", s.addr()) serverShutdown := make(chan struct{}) go func() { <-ctx.Done() log.Info("shutting down server") - if err := s.Server.Shutdown(context.Background()); err != nil { + + shutdownCtx := context.Background() + if s.ShutdownTimeout != nil { + var shutdownCancel context.CancelFunc + shutdownCtx, shutdownCancel = context.WithTimeout(context.Background(), *s.ShutdownTimeout) + defer shutdownCancel() + } + + if err := s.Server.Shutdown(shutdownCtx); err != nil { log.Error(err, "error shutting down server") } close(serverShutdown) }() log.Info("starting server") - if err := s.Server.Serve(s.Listener); err != nil && !errors.Is(err, http.ErrServerClosed) { + if err := s.serve(); err != nil && !errors.Is(err, http.ErrServerClosed) { return err } @@ -56,6 +89,21 @@ func (s *server) Start(ctx context.Context) error { return nil } -func (s *server) NeedLeaderElection() bool { - return false +// NeedLeaderElection returns true if the server should only be started when the manager is the leader. +func (s *Server) NeedLeaderElection() bool { + return s.OnlyServeWhenLeader +} + +func (s *Server) addr() string { + if s.Listener != nil { + return s.Listener.Addr().String() + } + return s.Server.Addr +} + +func (s *Server) serve() error { + if s.Listener != nil { + return s.Server.Serve(s.Listener) + } + return s.Server.ListenAndServe() } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/leaderelection.go b/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/leaderelection.go index a19c099602e..61e1009d32b 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/leaderelection.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/leaderelection.go @@ -14,6 +14,11 @@ var ( Name: "leader_election_master_status", Help: "Gauge of if the reporting system is master of the relevant lease, 0 indicates backup, 1 indicates master. 'name' is the string used to identify the lease. Please make sure to group by name.", }, []string{"name"}) + + leaderSlowpathCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ + Name: "leader_election_slowpath_total", + Help: "Total number of slow path exercised in renewing leader leases. 'name' is the string used to identify the lease. Please make sure to group by name.", + }, []string{"name"}) ) func init() { @@ -23,18 +28,20 @@ func init() { type leaderelectionMetricsProvider struct{} -func (leaderelectionMetricsProvider) NewLeaderMetric() leaderelection.SwitchMetric { - return &switchAdapter{gauge: leaderGauge} +func (leaderelectionMetricsProvider) NewLeaderMetric() leaderelection.LeaderMetric { + return leaderElectionPrometheusAdapter{} } -type switchAdapter struct { - gauge *prometheus.GaugeVec +type leaderElectionPrometheusAdapter struct{} + +func (s leaderElectionPrometheusAdapter) On(name string) { + leaderGauge.WithLabelValues(name).Set(1.0) } -func (s *switchAdapter) On(name string) { - s.gauge.WithLabelValues(name).Set(1.0) +func (s leaderElectionPrometheusAdapter) Off(name string) { + leaderGauge.WithLabelValues(name).Set(0.0) } -func (s *switchAdapter) Off(name string) { - s.gauge.WithLabelValues(name).Set(0.0) +func (leaderElectionPrometheusAdapter) SlowpathExercised(name string) { + leaderSlowpathCounter.WithLabelValues(name).Inc() } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/server/server.go b/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/server/server.go index 40eb9db8cc5..5eb0c62a723 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/server/server.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/server/server.go @@ -104,6 +104,9 @@ type Options struct { // TLSOpts is used to allow configuring the TLS config used for the server. // This also allows providing a certificate via GetCertificate. TLSOpts []func(*tls.Config) + + // ListenConfig contains options for listening to an address on the metric server. + ListenConfig net.ListenConfig } // Filter is a func that is added around metrics and extra handlers on the metrics server. @@ -269,7 +272,7 @@ func (s *defaultServer) Start(ctx context.Context) error { func (s *defaultServer) createListener(ctx context.Context, log logr.Logger) (net.Listener, error) { if !s.options.SecureServing { - return net.Listen("tcp", s.options.BindAddress) + return s.options.ListenConfig.Listen(ctx, "tcp", s.options.BindAddress) } cfg := &tls.Config{ //nolint:gosec @@ -322,7 +325,12 @@ func (s *defaultServer) createListener(ctx context.Context, log logr.Logger) (ne cfg.Certificates = []tls.Certificate{keyPair} } - return tls.Listen("tcp", s.options.BindAddress, cfg) + l, err := s.options.ListenConfig.Listen(ctx, "tcp", s.options.BindAddress) + if err != nil { + return nil, err + } + + return tls.NewListener(l, cfg), nil } func (s *defaultServer) GetBindAddr() string { diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/workqueue.go b/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/workqueue.go index 277b8788100..cff1de4c1c8 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/workqueue.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/metrics/workqueue.go @@ -54,14 +54,14 @@ var ( Subsystem: WorkQueueSubsystem, Name: QueueLatencyKey, Help: "How long in seconds an item stays in workqueue before being requested", - Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10), + Buckets: prometheus.ExponentialBuckets(10e-9, 10, 12), }, []string{"name"}) workDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Subsystem: WorkQueueSubsystem, Name: WorkDurationKey, Help: "How long in seconds processing an item from workqueue takes.", - Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10), + Buckets: prometheus.ExponentialBuckets(10e-9, 10, 12), }, []string{"name"}) unfinished = prometheus.NewGaugeVec(prometheus.GaugeOpts{ diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/predicate/predicate.go b/vendor/sigs.k8s.io/controller-runtime/pkg/predicate/predicate.go index 314635875e5..f74889d1ccf 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/predicate/predicate.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/predicate/predicate.go @@ -17,6 +17,7 @@ limitations under the License. package predicate import ( + "maps" "reflect" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -29,45 +30,51 @@ import ( var log = logf.RuntimeLog.WithName("predicate").WithName("eventFilters") // Predicate filters events before enqueuing the keys. -type Predicate interface { +type Predicate = TypedPredicate[client.Object] + +// TypedPredicate filters events before enqueuing the keys. +type TypedPredicate[T any] interface { // Create returns true if the Create event should be processed - Create(event.CreateEvent) bool + Create(event.TypedCreateEvent[T]) bool // Delete returns true if the Delete event should be processed - Delete(event.DeleteEvent) bool + Delete(event.TypedDeleteEvent[T]) bool // Update returns true if the Update event should be processed - Update(event.UpdateEvent) bool + Update(event.TypedUpdateEvent[T]) bool // Generic returns true if the Generic event should be processed - Generic(event.GenericEvent) bool + Generic(event.TypedGenericEvent[T]) bool } var _ Predicate = Funcs{} var _ Predicate = ResourceVersionChangedPredicate{} var _ Predicate = GenerationChangedPredicate{} var _ Predicate = AnnotationChangedPredicate{} -var _ Predicate = or{} -var _ Predicate = and{} -var _ Predicate = not{} +var _ Predicate = or[client.Object]{} +var _ Predicate = and[client.Object]{} +var _ Predicate = not[client.Object]{} // Funcs is a function that implements Predicate. -type Funcs struct { +type Funcs = TypedFuncs[client.Object] + +// TypedFuncs is a function that implements TypedPredicate. +type TypedFuncs[T any] struct { // Create returns true if the Create event should be processed - CreateFunc func(event.CreateEvent) bool + CreateFunc func(event.TypedCreateEvent[T]) bool // Delete returns true if the Delete event should be processed - DeleteFunc func(event.DeleteEvent) bool + DeleteFunc func(event.TypedDeleteEvent[T]) bool // Update returns true if the Update event should be processed - UpdateFunc func(event.UpdateEvent) bool + UpdateFunc func(event.TypedUpdateEvent[T]) bool // Generic returns true if the Generic event should be processed - GenericFunc func(event.GenericEvent) bool + GenericFunc func(event.TypedGenericEvent[T]) bool } // Create implements Predicate. -func (p Funcs) Create(e event.CreateEvent) bool { +func (p TypedFuncs[T]) Create(e event.TypedCreateEvent[T]) bool { if p.CreateFunc != nil { return p.CreateFunc(e) } @@ -75,7 +82,7 @@ func (p Funcs) Create(e event.CreateEvent) bool { } // Delete implements Predicate. -func (p Funcs) Delete(e event.DeleteEvent) bool { +func (p TypedFuncs[T]) Delete(e event.TypedDeleteEvent[T]) bool { if p.DeleteFunc != nil { return p.DeleteFunc(e) } @@ -83,7 +90,7 @@ func (p Funcs) Delete(e event.DeleteEvent) bool { } // Update implements Predicate. -func (p Funcs) Update(e event.UpdateEvent) bool { +func (p TypedFuncs[T]) Update(e event.TypedUpdateEvent[T]) bool { if p.UpdateFunc != nil { return p.UpdateFunc(e) } @@ -91,7 +98,7 @@ func (p Funcs) Update(e event.UpdateEvent) bool { } // Generic implements Predicate. -func (p Funcs) Generic(e event.GenericEvent) bool { +func (p TypedFuncs[T]) Generic(e event.TypedGenericEvent[T]) bool { if p.GenericFunc != nil { return p.GenericFunc(e) } @@ -118,6 +125,26 @@ func NewPredicateFuncs(filter func(object client.Object) bool) Funcs { } } +// NewTypedPredicateFuncs returns a predicate funcs that applies the given filter function +// on CREATE, UPDATE, DELETE and GENERIC events. For UPDATE events, the filter is applied +// to the new object. +func NewTypedPredicateFuncs[T any](filter func(object T) bool) TypedFuncs[T] { + return TypedFuncs[T]{ + CreateFunc: func(e event.TypedCreateEvent[T]) bool { + return filter(e.Object) + }, + UpdateFunc: func(e event.TypedUpdateEvent[T]) bool { + return filter(e.ObjectNew) + }, + DeleteFunc: func(e event.TypedDeleteEvent[T]) bool { + return filter(e.Object) + }, + GenericFunc: func(e event.TypedGenericEvent[T]) bool { + return filter(e.Object) + }, + } +} + // ResourceVersionChangedPredicate implements a default update predicate function on resource version change. type ResourceVersionChangedPredicate struct { Funcs @@ -153,17 +180,35 @@ func (ResourceVersionChangedPredicate) Update(e event.UpdateEvent) bool { // // * With this predicate, any update events with writes only to the status field will not be reconciled. // So in the event that the status block is overwritten or wiped by someone else the controller will not self-correct to restore the correct status. -type GenerationChangedPredicate struct { - Funcs +type GenerationChangedPredicate = TypedGenerationChangedPredicate[client.Object] + +// TypedGenerationChangedPredicate implements a default update predicate function on Generation change. +// +// This predicate will skip update events that have no change in the object's metadata.generation field. +// The metadata.generation field of an object is incremented by the API server when writes are made to the spec field of an object. +// This allows a controller to ignore update events where the spec is unchanged, and only the metadata and/or status fields are changed. +// +// For CustomResource objects the Generation is only incremented when the status subresource is enabled. +// +// Caveats: +// +// * The assumption that the Generation is incremented only on writing to the spec does not hold for all APIs. +// E.g For Deployment objects the Generation is also incremented on writes to the metadata.annotations field. +// For object types other than CustomResources be sure to verify which fields will trigger a Generation increment when they are written to. +// +// * With this predicate, any update events with writes only to the status field will not be reconciled. +// So in the event that the status block is overwritten or wiped by someone else the controller will not self-correct to restore the correct status. +type TypedGenerationChangedPredicate[T metav1.Object] struct { + TypedFuncs[T] } // Update implements default UpdateEvent filter for validating generation change. -func (GenerationChangedPredicate) Update(e event.UpdateEvent) bool { - if e.ObjectOld == nil { +func (TypedGenerationChangedPredicate[T]) Update(e event.TypedUpdateEvent[T]) bool { + if isNil(e.ObjectOld) { log.Error(nil, "Update event has no old object to update", "event", e) return false } - if e.ObjectNew == nil { + if isNil(e.ObjectNew) { log.Error(nil, "Update event has no new object for update", "event", e) return false } @@ -183,22 +228,25 @@ func (GenerationChangedPredicate) Update(e event.UpdateEvent) bool { // // This is mostly useful for controllers that needs to trigger both when the resource's generation is incremented // (i.e., when the resource' .spec changes), or an annotation changes (e.g., for a staging/alpha API). -type AnnotationChangedPredicate struct { - Funcs +type AnnotationChangedPredicate = TypedAnnotationChangedPredicate[client.Object] + +// TypedAnnotationChangedPredicate implements a default update predicate function on annotation change. +type TypedAnnotationChangedPredicate[T metav1.Object] struct { + TypedFuncs[T] } // Update implements default UpdateEvent filter for validating annotation change. -func (AnnotationChangedPredicate) Update(e event.UpdateEvent) bool { - if e.ObjectOld == nil { +func (TypedAnnotationChangedPredicate[T]) Update(e event.TypedUpdateEvent[T]) bool { + if isNil(e.ObjectOld) { log.Error(nil, "Update event has no old object to update", "event", e) return false } - if e.ObjectNew == nil { + if isNil(e.ObjectNew) { log.Error(nil, "Update event has no new object for update", "event", e) return false } - return !reflect.DeepEqual(e.ObjectNew.GetAnnotations(), e.ObjectOld.GetAnnotations()) + return !maps.Equal(e.ObjectNew.GetAnnotations(), e.ObjectOld.GetAnnotations()) } // LabelChangedPredicate implements a default update predicate function on label change. @@ -214,34 +262,37 @@ func (AnnotationChangedPredicate) Update(e event.UpdateEvent) bool { // // This will be helpful when object's labels is carrying some extra specification information beyond object's spec, // and the controller will be triggered if any valid spec change (not only in spec, but also in labels) happens. -type LabelChangedPredicate struct { - Funcs +type LabelChangedPredicate = TypedLabelChangedPredicate[client.Object] + +// TypedLabelChangedPredicate implements a default update predicate function on label change. +type TypedLabelChangedPredicate[T metav1.Object] struct { + TypedFuncs[T] } // Update implements default UpdateEvent filter for checking label change. -func (LabelChangedPredicate) Update(e event.UpdateEvent) bool { - if e.ObjectOld == nil { +func (TypedLabelChangedPredicate[T]) Update(e event.TypedUpdateEvent[T]) bool { + if isNil(e.ObjectOld) { log.Error(nil, "Update event has no old object to update", "event", e) return false } - if e.ObjectNew == nil { + if isNil(e.ObjectNew) { log.Error(nil, "Update event has no new object for update", "event", e) return false } - return !reflect.DeepEqual(e.ObjectNew.GetLabels(), e.ObjectOld.GetLabels()) + return !maps.Equal(e.ObjectNew.GetLabels(), e.ObjectOld.GetLabels()) } // And returns a composite predicate that implements a logical AND of the predicates passed to it. -func And(predicates ...Predicate) Predicate { - return and{predicates} +func And[T any](predicates ...TypedPredicate[T]) TypedPredicate[T] { + return and[T]{predicates} } -type and struct { - predicates []Predicate +type and[T any] struct { + predicates []TypedPredicate[T] } -func (a and) Create(e event.CreateEvent) bool { +func (a and[T]) Create(e event.TypedCreateEvent[T]) bool { for _, p := range a.predicates { if !p.Create(e) { return false @@ -250,7 +301,7 @@ func (a and) Create(e event.CreateEvent) bool { return true } -func (a and) Update(e event.UpdateEvent) bool { +func (a and[T]) Update(e event.TypedUpdateEvent[T]) bool { for _, p := range a.predicates { if !p.Update(e) { return false @@ -259,7 +310,7 @@ func (a and) Update(e event.UpdateEvent) bool { return true } -func (a and) Delete(e event.DeleteEvent) bool { +func (a and[T]) Delete(e event.TypedDeleteEvent[T]) bool { for _, p := range a.predicates { if !p.Delete(e) { return false @@ -268,7 +319,7 @@ func (a and) Delete(e event.DeleteEvent) bool { return true } -func (a and) Generic(e event.GenericEvent) bool { +func (a and[T]) Generic(e event.TypedGenericEvent[T]) bool { for _, p := range a.predicates { if !p.Generic(e) { return false @@ -278,15 +329,15 @@ func (a and) Generic(e event.GenericEvent) bool { } // Or returns a composite predicate that implements a logical OR of the predicates passed to it. -func Or(predicates ...Predicate) Predicate { - return or{predicates} +func Or[T any](predicates ...TypedPredicate[T]) TypedPredicate[T] { + return or[T]{predicates} } -type or struct { - predicates []Predicate +type or[T any] struct { + predicates []TypedPredicate[T] } -func (o or) Create(e event.CreateEvent) bool { +func (o or[T]) Create(e event.TypedCreateEvent[T]) bool { for _, p := range o.predicates { if p.Create(e) { return true @@ -295,7 +346,7 @@ func (o or) Create(e event.CreateEvent) bool { return false } -func (o or) Update(e event.UpdateEvent) bool { +func (o or[T]) Update(e event.TypedUpdateEvent[T]) bool { for _, p := range o.predicates { if p.Update(e) { return true @@ -304,7 +355,7 @@ func (o or) Update(e event.UpdateEvent) bool { return false } -func (o or) Delete(e event.DeleteEvent) bool { +func (o or[T]) Delete(e event.TypedDeleteEvent[T]) bool { for _, p := range o.predicates { if p.Delete(e) { return true @@ -313,7 +364,7 @@ func (o or) Delete(e event.DeleteEvent) bool { return false } -func (o or) Generic(e event.GenericEvent) bool { +func (o or[T]) Generic(e event.TypedGenericEvent[T]) bool { for _, p := range o.predicates { if p.Generic(e) { return true @@ -323,27 +374,27 @@ func (o or) Generic(e event.GenericEvent) bool { } // Not returns a predicate that implements a logical NOT of the predicate passed to it. -func Not(predicate Predicate) Predicate { - return not{predicate} +func Not[T any](predicate TypedPredicate[T]) TypedPredicate[T] { + return not[T]{predicate} } -type not struct { - predicate Predicate +type not[T any] struct { + predicate TypedPredicate[T] } -func (n not) Create(e event.CreateEvent) bool { +func (n not[T]) Create(e event.TypedCreateEvent[T]) bool { return !n.predicate.Create(e) } -func (n not) Update(e event.UpdateEvent) bool { +func (n not[T]) Update(e event.TypedUpdateEvent[T]) bool { return !n.predicate.Update(e) } -func (n not) Delete(e event.DeleteEvent) bool { +func (n not[T]) Delete(e event.TypedDeleteEvent[T]) bool { return !n.predicate.Delete(e) } -func (n not) Generic(e event.GenericEvent) bool { +func (n not[T]) Generic(e event.TypedGenericEvent[T]) bool { return !n.predicate.Generic(e) } @@ -358,3 +409,15 @@ func LabelSelectorPredicate(s metav1.LabelSelector) (Predicate, error) { return selector.Matches(labels.Set(o.GetLabels())) }), nil } + +func isNil(arg any) bool { + if v := reflect.ValueOf(arg); !v.IsValid() || ((v.Kind() == reflect.Ptr || + v.Kind() == reflect.Interface || + v.Kind() == reflect.Slice || + v.Kind() == reflect.Map || + v.Kind() == reflect.Chan || + v.Kind() == reflect.Func) && v.IsNil()) { + return true + } + return false +} diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/reconcile/reconcile.go b/vendor/sigs.k8s.io/controller-runtime/pkg/reconcile/reconcile.go index 0f4e7e16bb0..f1cce87c857 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/reconcile/reconcile.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/reconcile/reconcile.go @@ -19,9 +19,11 @@ package reconcile import ( "context" "errors" + "reflect" "time" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" ) // Result contains the result of a Reconciler invocation. @@ -97,7 +99,7 @@ type Reconciler interface { // If the error is nil and the returned Result has a non-zero result.RequeueAfter, the request // will be requeued after the specified duration. // - // If the error is nil and result.RequeueAfter is zero and result.Reque is true, the request + // If the error is nil and result.RequeueAfter is zero and result.Requeue is true, the request // will be requeued using exponential backoff. Reconcile(context.Context, Request) (Result, error) } @@ -110,6 +112,36 @@ var _ Reconciler = Func(nil) // Reconcile implements Reconciler. func (r Func) Reconcile(ctx context.Context, o Request) (Result, error) { return r(ctx, o) } +// ObjectReconciler is a specialized version of Reconciler that acts on instances of client.Object. Each reconciliation +// event gets the associated object from Kubernetes before passing it to Reconcile. An ObjectReconciler can be used in +// Builder.Complete by calling AsReconciler. See Reconciler for more details. +type ObjectReconciler[T client.Object] interface { + Reconcile(context.Context, T) (Result, error) +} + +// AsReconciler creates a Reconciler based on the given ObjectReconciler. +func AsReconciler[T client.Object](client client.Client, rec ObjectReconciler[T]) Reconciler { + return &objectReconcilerAdapter[T]{ + objReconciler: rec, + client: client, + } +} + +type objectReconcilerAdapter[T client.Object] struct { + objReconciler ObjectReconciler[T] + client client.Client +} + +// Reconcile implements Reconciler. +func (a *objectReconcilerAdapter[T]) Reconcile(ctx context.Context, req Request) (Result, error) { + o := reflect.New(reflect.TypeOf(*new(T)).Elem()).Interface().(T) + if err := a.client.Get(ctx, req.NamespacedName, o); err != nil { + return Result{}, client.IgnoreNotFound(err) + } + + return a.objReconciler.Reconcile(ctx, o) +} + // TerminalError is an error that will not be retried but still be logged // and recorded in metrics. func TerminalError(wrapped error) error { diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/source/source.go b/vendor/sigs.k8s.io/controller-runtime/pkg/source/source.go index 099c8d68fa4..26e53022bf3 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/source/source.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/source/source.go @@ -18,10 +18,12 @@ package source import ( "context" + "errors" "fmt" "sync" "k8s.io/client-go/util/workqueue" + "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" "sigs.k8s.io/controller-runtime/pkg/handler" @@ -31,23 +33,18 @@ import ( "sigs.k8s.io/controller-runtime/pkg/predicate" ) -const ( - // defaultBufferSize is the default number of event notifications that can be buffered. - defaultBufferSize = 1024 -) - -// Source is a source of events (eh.g. Create, Update, Delete operations on Kubernetes Objects, Webhook callbacks, etc) +// Source is a source of events (e.g. Create, Update, Delete operations on Kubernetes Objects, Webhook callbacks, etc) // which should be processed by event.EventHandlers to enqueue reconcile.Requests. // // * Use Kind for events originating in the cluster (e.g. Pod Create, Pod Update, Deployment Update). // -// * Use Channel for events originating outside the cluster (eh.g. GitHub Webhook callback, Polling external urls). +// * Use Channel for events originating outside the cluster (e.g. GitHub Webhook callback, Polling external urls). // // Users may build their own Source implementations. type Source interface { // Start is internal and should be called only by the Controller to register an EventHandler with the Informer // to enqueue reconcile.Requests. - Start(context.Context, handler.EventHandler, workqueue.RateLimitingInterface, ...predicate.Predicate) error + Start(context.Context, workqueue.RateLimitingInterface) error } // SyncingSource is a source that needs syncing prior to being usable. The controller @@ -58,54 +55,92 @@ type SyncingSource interface { } // Kind creates a KindSource with the given cache provider. -func Kind(cache cache.Cache, object client.Object) SyncingSource { - return &internal.Kind{Type: object, Cache: cache} +func Kind[T client.Object](cache cache.Cache, object T, handler handler.TypedEventHandler[T], predicates ...predicate.TypedPredicate[T]) SyncingSource { + return &internal.Kind[T]{ + Type: object, + Cache: cache, + Handler: handler, + Predicates: predicates, + } } -var _ Source = &Channel{} +var _ Source = &channel[string]{} + +// ChannelOpt allows to configure a source.Channel. +type ChannelOpt[T any] func(*channel[T]) + +// WithPredicates adds the configured predicates to a source.Channel. +func WithPredicates[T any](p ...predicate.TypedPredicate[T]) ChannelOpt[T] { + return func(c *channel[T]) { + c.predicates = append(c.predicates, p...) + } +} + +// WithBufferSize configures the buffer size for a source.Channel. By +// default, the buffer size is 1024. +func WithBufferSize[T any](bufferSize int) ChannelOpt[T] { + return func(c *channel[T]) { + c.bufferSize = &bufferSize + } +} // Channel is used to provide a source of events originating outside the cluster // (e.g. GitHub Webhook callback). Channel requires the user to wire the external -// source (eh.g. http handler) to write GenericEvents to the underlying channel. -type Channel struct { +// source (e.g. http handler) to write GenericEvents to the underlying channel. +func Channel[T any](source <-chan event.TypedGenericEvent[T], handler handler.TypedEventHandler[T], opts ...ChannelOpt[T]) Source { + c := &channel[T]{ + source: source, + handler: handler, + } + for _, opt := range opts { + opt(c) + } + + return c +} + +type channel[T any] struct { // once ensures the event distribution goroutine will be performed only once once sync.Once - // Source is the source channel to fetch GenericEvents - Source <-chan event.GenericEvent + // source is the source channel to fetch GenericEvents + source <-chan event.TypedGenericEvent[T] - // dest is the destination channels of the added event handlers - dest []chan event.GenericEvent + handler handler.TypedEventHandler[T] - // DestBufferSize is the specified buffer size of dest channels. - // Default to 1024 if not specified. - DestBufferSize int + predicates []predicate.TypedPredicate[T] + + bufferSize *int + + // dest is the destination channels of the added event handlers + dest []chan event.TypedGenericEvent[T] // destLock is to ensure the destination channels are safely added/removed destLock sync.Mutex } -func (cs *Channel) String() string { +func (cs *channel[T]) String() string { return fmt.Sprintf("channel source: %p", cs) } // Start implements Source and should only be called by the Controller. -func (cs *Channel) Start( +func (cs *channel[T]) Start( ctx context.Context, - handler handler.EventHandler, queue workqueue.RateLimitingInterface, - prct ...predicate.Predicate) error { +) error { // Source should have been specified by the user. - if cs.Source == nil { + if cs.source == nil { return fmt.Errorf("must specify Channel.Source") } + if cs.handler == nil { + return errors.New("must specify Channel.Handler") + } - // use default value if DestBufferSize not specified - if cs.DestBufferSize == 0 { - cs.DestBufferSize = defaultBufferSize + if cs.bufferSize == nil { + cs.bufferSize = ptr.To(1024) } - dst := make(chan event.GenericEvent, cs.DestBufferSize) + dst := make(chan event.TypedGenericEvent[T], *cs.bufferSize) cs.destLock.Lock() cs.dest = append(cs.dest, dst) @@ -119,7 +154,7 @@ func (cs *Channel) Start( go func() { for evt := range dst { shouldHandle := true - for _, p := range prct { + for _, p := range cs.predicates { if !p.Generic(evt) { shouldHandle = false break @@ -130,7 +165,7 @@ func (cs *Channel) Start( func() { ctx, cancel := context.WithCancel(ctx) defer cancel() - handler.Generic(ctx, evt, queue) + cs.handler.Generic(ctx, evt, queue) }() } } @@ -139,7 +174,7 @@ func (cs *Channel) Start( return nil } -func (cs *Channel) doStop() { +func (cs *channel[T]) doStop() { cs.destLock.Lock() defer cs.destLock.Unlock() @@ -148,7 +183,7 @@ func (cs *Channel) doStop() { } } -func (cs *Channel) distribute(evt event.GenericEvent) { +func (cs *channel[T]) distribute(evt event.TypedGenericEvent[T]) { cs.destLock.Lock() defer cs.destLock.Unlock() @@ -162,14 +197,14 @@ func (cs *Channel) distribute(evt event.GenericEvent) { } } -func (cs *Channel) syncLoop(ctx context.Context) { +func (cs *channel[T]) syncLoop(ctx context.Context) { for { select { case <-ctx.Done(): // Close destination channels cs.doStop() return - case evt, stillOpen := <-cs.Source: + case evt, stillOpen := <-cs.source: if !stillOpen { // if the source channel is closed, we're never gonna get // anything more on it, so stop & bail @@ -184,21 +219,25 @@ func (cs *Channel) syncLoop(ctx context.Context) { // Informer is used to provide a source of events originating inside the cluster from Watches (e.g. Pod Create). type Informer struct { // Informer is the controller-runtime Informer - Informer cache.Informer + Informer cache.Informer + Handler handler.EventHandler + Predicates []predicate.Predicate } var _ Source = &Informer{} // Start is internal and should be called only by the Controller to register an EventHandler with the Informer // to enqueue reconcile.Requests. -func (is *Informer) Start(ctx context.Context, handler handler.EventHandler, queue workqueue.RateLimitingInterface, - prct ...predicate.Predicate) error { +func (is *Informer) Start(ctx context.Context, queue workqueue.RateLimitingInterface) error { // Informer should have been specified by the user. if is.Informer == nil { return fmt.Errorf("must specify Informer.Informer") } + if is.Handler == nil { + return errors.New("must specify Informer.Handler") + } - _, err := is.Informer.AddEventHandler(internal.NewEventHandler(ctx, queue, handler, prct).HandlerFuncs()) + _, err := is.Informer.AddEventHandler(internal.NewEventHandler(ctx, queue, is.Handler, is.Predicates).HandlerFuncs()) if err != nil { return err } @@ -212,12 +251,11 @@ func (is *Informer) String() string { var _ Source = Func(nil) // Func is a function that implements Source. -type Func func(context.Context, handler.EventHandler, workqueue.RateLimitingInterface, ...predicate.Predicate) error +type Func func(context.Context, workqueue.RateLimitingInterface) error // Start implements Source. -func (f Func) Start(ctx context.Context, evt handler.EventHandler, queue workqueue.RateLimitingInterface, - pr ...predicate.Predicate) error { - return f(ctx, evt, queue, pr...) +func (f Func) Start(ctx context.Context, queue workqueue.RateLimitingInterface) error { + return f(ctx, queue) } func (f Func) String() string { diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/decode.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/decode.go index 7e9c0a96bcc..55f1cafb5ea 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/decode.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/decode.go @@ -26,22 +26,35 @@ import ( // Decoder knows how to decode the contents of an admission // request into a concrete object. -type Decoder struct { +type Decoder interface { + // Decode decodes the inlined object in the AdmissionRequest into the passed-in runtime.Object. + // If you want decode the OldObject in the AdmissionRequest, use DecodeRaw. + // It errors out if req.Object.Raw is empty i.e. containing 0 raw bytes. + Decode(req Request, into runtime.Object) error + + // DecodeRaw decodes a RawExtension object into the passed-in runtime.Object. + // It errors out if rawObj is empty i.e. containing 0 raw bytes. + DecodeRaw(rawObj runtime.RawExtension, into runtime.Object) error +} + +// decoder knows how to decode the contents of an admission +// request into a concrete object. +type decoder struct { codecs serializer.CodecFactory } -// NewDecoder creates a Decoder given the runtime.Scheme. -func NewDecoder(scheme *runtime.Scheme) *Decoder { +// NewDecoder creates a decoder given the runtime.Scheme. +func NewDecoder(scheme *runtime.Scheme) Decoder { if scheme == nil { panic("scheme should never be nil") } - return &Decoder{codecs: serializer.NewCodecFactory(scheme)} + return &decoder{codecs: serializer.NewCodecFactory(scheme)} } // Decode decodes the inlined object in the AdmissionRequest into the passed-in runtime.Object. // If you want decode the OldObject in the AdmissionRequest, use DecodeRaw. // It errors out if req.Object.Raw is empty i.e. containing 0 raw bytes. -func (d *Decoder) Decode(req Request, into runtime.Object) error { +func (d *decoder) Decode(req Request, into runtime.Object) error { // we error out if rawObj is an empty object. if len(req.Object.Raw) == 0 { return fmt.Errorf("there is no content to decode") @@ -51,7 +64,7 @@ func (d *Decoder) Decode(req Request, into runtime.Object) error { // DecodeRaw decodes a RawExtension object into the passed-in runtime.Object. // It errors out if rawObj is empty i.e. containing 0 raw bytes. -func (d *Decoder) DecodeRaw(rawObj runtime.RawExtension, into runtime.Object) error { +func (d *decoder) DecodeRaw(rawObj runtime.RawExtension, into runtime.Object) error { // NB(directxman12): there's a bug/weird interaction between decoders and // the API server where the API server doesn't send a GVK on the embedded // objects, which means the unstructured decoder refuses to decode. It diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter.go index a3b72071687..efbbf602827 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter.go @@ -27,12 +27,14 @@ import ( ) // Defaulter defines functions for setting defaults on resources. +// Deprecated: Ue CustomDefaulter instead. type Defaulter interface { runtime.Object Default() } // DefaultingWebhookFor creates a new Webhook for Defaulting the provided type. +// Deprecated: Use WithCustomDefaulter instead. func DefaultingWebhookFor(scheme *runtime.Scheme, defaulter Defaulter) *Webhook { return &Webhook{ Handler: &mutatingHandler{defaulter: defaulter, decoder: NewDecoder(scheme)}, @@ -41,7 +43,7 @@ func DefaultingWebhookFor(scheme *runtime.Scheme, defaulter Defaulter) *Webhook type mutatingHandler struct { defaulter Defaulter - decoder *Decoder + decoder Decoder } // Handle handles admission requests. diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter_custom.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter_custom.go index 5f697e7dce7..d15dec7a051 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter_custom.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter_custom.go @@ -43,7 +43,7 @@ func WithCustomDefaulter(scheme *runtime.Scheme, obj runtime.Object, defaulter C type defaulterForType struct { defaulter CustomDefaulter object runtime.Object - decoder *Decoder + decoder Decoder } // Handle handles admission requests. diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/http.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/http.go index 57e465abb3b..f049fb66e6a 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/http.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/http.go @@ -34,6 +34,26 @@ import ( var admissionScheme = runtime.NewScheme() var admissionCodecs = serializer.NewCodecFactory(admissionScheme) +// adapted from https://github.com/kubernetes/kubernetes/blob/c28c2009181fcc44c5f6b47e10e62dacf53e4da0/staging/src/k8s.io/pod-security-admission/cmd/webhook/server/server.go +// +// From https://github.com/kubernetes/apiserver/blob/d6876a0600de06fef75968c4641c64d7da499f25/pkg/server/config.go#L433-L442C5: +// +// 1.5MB is the recommended client request size in byte +// the etcd server should accept. See +// https://github.com/etcd-io/etcd/blob/release-3.4/embed/config.go#L56. +// A request body might be encoded in json, and is converted to +// proto when persisted in etcd, so we allow 2x as the largest request +// body size to be accepted and decoded in a write request. +// +// For the admission request, we can infer that it contains at most two objects +// (the old and new versions of the object being admitted), each of which can +// be at most 3MB in size. For the rest of the request, we can assume that +// it will be less than 1MB in size. Therefore, we can set the max request +// size to 7MB. +// If your use case requires larger max request sizes, please +// open an issue (https://github.com/kubernetes-sigs/controller-runtime/issues/new). +const maxRequestSize = int64(7 * 1024 * 1024) + func init() { utilruntime.Must(v1.AddToScheme(admissionScheme)) utilruntime.Must(v1beta1.AddToScheme(admissionScheme)) @@ -42,27 +62,30 @@ func init() { var _ http.Handler = &Webhook{} func (wh *Webhook) ServeHTTP(w http.ResponseWriter, r *http.Request) { - var body []byte - var err error ctx := r.Context() if wh.WithContextFunc != nil { ctx = wh.WithContextFunc(ctx, r) } - var reviewResponse Response - if r.Body == nil { - err = errors.New("request body is empty") + if r.Body == nil || r.Body == http.NoBody { + err := errors.New("request body is empty") wh.getLogger(nil).Error(err, "bad request") - reviewResponse = Errored(http.StatusBadRequest, err) - wh.writeResponse(w, reviewResponse) + wh.writeResponse(w, Errored(http.StatusBadRequest, err)) return } defer r.Body.Close() - if body, err = io.ReadAll(r.Body); err != nil { + limitedReader := &io.LimitedReader{R: r.Body, N: maxRequestSize} + body, err := io.ReadAll(limitedReader) + if err != nil { wh.getLogger(nil).Error(err, "unable to read the body from the incoming request") - reviewResponse = Errored(http.StatusBadRequest, err) - wh.writeResponse(w, reviewResponse) + wh.writeResponse(w, Errored(http.StatusBadRequest, err)) + return + } + if limitedReader.N <= 0 { + err := fmt.Errorf("request entity is too large; limit is %d bytes", maxRequestSize) + wh.getLogger(nil).Error(err, "unable to read the body from the incoming request; limit reached") + wh.writeResponse(w, Errored(http.StatusRequestEntityTooLarge, err)) return } @@ -70,8 +93,7 @@ func (wh *Webhook) ServeHTTP(w http.ResponseWriter, r *http.Request) { if contentType := r.Header.Get("Content-Type"); contentType != "application/json" { err = fmt.Errorf("contentType=%s, expected application/json", contentType) wh.getLogger(nil).Error(err, "unable to process a request with unknown content type") - reviewResponse = Errored(http.StatusBadRequest, err) - wh.writeResponse(w, reviewResponse) + wh.writeResponse(w, Errored(http.StatusBadRequest, err)) return } @@ -89,14 +111,12 @@ func (wh *Webhook) ServeHTTP(w http.ResponseWriter, r *http.Request) { _, actualAdmRevGVK, err := admissionCodecs.UniversalDeserializer().Decode(body, nil, &ar) if err != nil { wh.getLogger(nil).Error(err, "unable to decode the request") - reviewResponse = Errored(http.StatusBadRequest, err) - wh.writeResponse(w, reviewResponse) + wh.writeResponse(w, Errored(http.StatusBadRequest, err)) return } wh.getLogger(&req).V(5).Info("received request") - reviewResponse = wh.Handle(ctx, req) - wh.writeResponseTyped(w, reviewResponse, actualAdmRevGVK) + wh.writeResponseTyped(w, wh.Handle(ctx, req), actualAdmRevGVK) } // writeResponse writes response to w generically, i.e. without encoding GVK information. diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator.go index 00bda8a4ce5..b28a56eef89 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator.go @@ -33,6 +33,7 @@ type Warnings []string // Validator defines functions for validating an operation. // The custom resource kind which implements this interface can validate itself. // To validate the custom resource with another specific struct, use CustomValidator instead. +// Deprecated: Use CustomValidator instead. type Validator interface { runtime.Object @@ -53,6 +54,7 @@ type Validator interface { } // ValidatingWebhookFor creates a new Webhook for validating the provided type. +// Deprecated: Use WithCustomValidator instead. func ValidatingWebhookFor(scheme *runtime.Scheme, validator Validator) *Webhook { return &Webhook{ Handler: &validatingHandler{validator: validator, decoder: NewDecoder(scheme)}, @@ -61,7 +63,7 @@ func ValidatingWebhookFor(scheme *runtime.Scheme, validator Validator) *Webhook type validatingHandler struct { validator Validator - decoder *Decoder + decoder Decoder } // Handle handles admission requests. diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go index e99fbd8a857..b8f194401ec 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go @@ -30,7 +30,6 @@ import ( // CustomValidator defines functions for validating an operation. // The object to be validated is passed into methods as a parameter. type CustomValidator interface { - // ValidateCreate validates the object on creation. // The optional warnings will be added to the response as warning messages. // Return an error if the object is invalid. @@ -57,7 +56,7 @@ func WithCustomValidator(scheme *runtime.Scheme, obj runtime.Object, validator C type validatorForType struct { validator CustomValidator object runtime.Object - decoder *Decoder + decoder Decoder } // Handle handles admission requests. diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/alias.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/alias.go index 293137db498..e8439e2ea23 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/alias.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/alias.go @@ -24,9 +24,11 @@ import ( // define some aliases for common bits of the webhook functionality // Defaulter defines functions for setting defaults on resources. +// Deprecated: Use CustomDefaulter instead. type Defaulter = admission.Defaulter // Validator defines functions for validating an operation. +// Deprecated: Use CustomValidator instead. type Validator = admission.Validator // CustomDefaulter defines functions for setting defaults on resources. diff --git a/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go b/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go index 2fba83e95af..946f21834af 100644 --- a/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go +++ b/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go @@ -67,6 +67,7 @@ var ValidationMarkers = mustMakeAllWithPrefix("kubebuilder:validation", markers. XPreserveUnknownFields{}, XEmbeddedResource{}, XIntOrString{}, + XValidation{}, ) // FieldOnlyMarkers list field-specific validation markers (i.e. those markers that don't make @@ -256,6 +257,17 @@ type XIntOrString struct{} // to be used only as a last resort. type Schemaless struct{} +// +controllertools:marker:generateHelp:category="CRD validation" +// XValidation marks a field as requiring a value for which a given +// expression evaluates to true. +// +// This marker may be repeated to specify multiple expressions, all of +// which must evaluate to true. +type XValidation struct { + Rule string + Message string `marker:",optional"` +} + func (m Maximum) ApplyToSchema(schema *apiext.JSONSchemaProps) error { if schema.Type != "integer" { return fmt.Errorf("must apply maximum to an integer") @@ -433,3 +445,11 @@ func (m XIntOrString) ApplyToSchema(schema *apiext.JSONSchemaProps) error { } func (m XIntOrString) ApplyFirst() {} + +func (m XValidation) ApplyToSchema(schema *apiext.JSONSchemaProps) error { + schema.XValidations = append(schema.XValidations, apiext.ValidationRule{ + Rule: m.Rule, + Message: m.Message, + }) + return nil +} diff --git a/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/zz_generated.markerhelp.go b/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/zz_generated.markerhelp.go index 03d663601e3..9a007e792d5 100644 --- a/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/zz_generated.markerhelp.go +++ b/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/zz_generated.markerhelp.go @@ -467,3 +467,23 @@ func (XPreserveUnknownFields) Help() *markers.DefinitionHelp { FieldHelp: map[string]markers.DetailedHelp{}, } } + +func (XValidation) Help() *markers.DefinitionHelp { + return &markers.DefinitionHelp{ + Category: "CRD validation", + DetailedHelp: markers.DetailedHelp{ + Summary: "marks a field as requiring a value for which a given expression evaluates to true. ", + Details: "This marker may be repeated to specify multiple expressions, all of which must evaluate to true.", + }, + FieldHelp: map[string]markers.DetailedHelp{ + "Rule": { + Summary: "", + Details: "", + }, + "Message": { + Summary: "", + Details: "", + }, + }, + } +}